From 265cdcdc12bcdc4c10529a046c4fc1a36a2cc65f Mon Sep 17 00:00:00 2001 From: Scott Date: Sun, 23 May 2021 16:17:43 -0400 Subject: [PATCH 001/417] Handle GetAbilityBySpecies edge cases --- include/constants/pokemon.h | 4 +++- src/pokemon.c | 22 +++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index dfd1a496f9..cbec5bdb53 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -368,6 +368,8 @@ #define MON_PIC_SIZE (64 * 64 / 2) -#define NUM_ABILITY_SLOTS 3 +#define NUM_ABILITY_SLOTS (NUM_NORMAL_ABILITY_SLOTS + NUM_HIDDEN_ABILITY_SLOTS) +#define NUM_NORMAL_ABILITY_SLOTS 2 +#define NUM_HIDDEN_ABILITY_SLOTS 1 #endif // GUARD_CONSTANTS_POKEMON_H diff --git a/src/pokemon.c b/src/pokemon.c index baf408fcec..e0e4f6b74c 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5369,14 +5369,26 @@ u8 GetMonsStateToDoubles_2(void) u8 GetAbilityBySpecies(u16 species, u8 abilityNum) { + int i; + if (abilityNum < NUM_ABILITY_SLOTS) gLastUsedAbility = gBaseStats[species].abilities[abilityNum]; else - gLastUsedAbility = gBaseStats[species].abilities[0]; - - if (gLastUsedAbility == ABILITY_NONE) - gLastUsedAbility = gBaseStats[species].abilities[0]; - + gLastUsedAbility = ABILITY_NONE; + + if (abilityNum >= NUM_NORMAL_ABILITY_SLOTS) // if abilityNum is empty hidden ability, look for other hidden abilities + { + for (i = NUM_NORMAL_ABILITY_SLOTS; i < NUM_ABILITY_SLOTS && gLastUsedAbility == ABILITY_NONE; i++) + { + gLastUsedAbility = gBaseStats[species].abilities[i]; + } + } + + for (i = 0; i < NUM_ABILITY_SLOTS && gLastUsedAbility == ABILITY_NONE; i++) // look for any non-empty ability + { + gLastUsedAbility = gBaseStats[species].abilities[i]; + } + return gLastUsedAbility; } From 01f2381e017a25b5e1bdefb4b18e73097192fc51 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 11 Jul 2021 16:23:19 -0400 Subject: [PATCH 002/417] Add LINK_MANAGER field comments from SDK --- include/AgbRfu_LinkManager.h | 75 +++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/include/AgbRfu_LinkManager.h b/include/AgbRfu_LinkManager.h index d4ef13183e..3b38b85fc9 100644 --- a/include/AgbRfu_LinkManager.h +++ b/include/AgbRfu_LinkManager.h @@ -120,10 +120,10 @@ typedef struct InitializeParametersTag { // rfu_REQ_configSystem argument u8 maxMFrame; // Maximum number of times to re-transmit of RFU level u8 MC_TimerCount; // MC_Timer count (x16.7ms) - u16 availSlot_flag; // Use RFU-API constant "AVAIL_SLOT1-4" to specify the maximum number of child devices (1 - 4) that can be connected to a parent device. + u16 availSlot_flag; // Use RFU-API constant "AVAIL_SLOT1-4" to specify the maximum number of child devices (1 - 4) that can be connected to a parent device. // rfu_REQB_configGameData argument - u8 mboot_flag; // Multiplayer boot flag + u8 mboot_flag; // Multiplayer boot flag u16 serialNo; // Game serial number u8 *gameName; // Game name u8 *userName; // User name @@ -132,8 +132,8 @@ typedef struct InitializeParametersTag { u8 fastSearchParent_flag; // Flag indicating whether parent fast search operation to be performed by child. // Link recovery settings - u8 linkRecovery_enable; // Determines whether or not to execute the link recovery process when a link cut occurs - u16 linkRecovery_period; // Time to spend on the link recovery process (x 16.7 ms) Note: Runs for unlimited time when specifying 0. + u8 linkRecovery_enable; // Determines whether or not to execute the link recovery process when a link cut occurs + u16 linkRecovery_period; // Time to spend on the link recovery process (x 16.7 ms) Note: Runs for unlimited time when specifying 0. // Setting for NI-type data transmit/receive period u16 NI_failCounter_limit; // Limit for failCounter during NI type data transmit/receive (x 16.7 ms) Note: Runs for unlimited time when specifying 0. @@ -142,44 +142,49 @@ typedef struct InitializeParametersTag { // Timer that counts with the V-Blank cycle typedef struct VblankTimerTag { - u8 active; // Timer ON/OFF (bits 0 - 3 indicate ON/OFF for each connected slot) - u16 count_max; // Maximum count value (x16.7ms) + u8 active; // Timer ON/OFF (bits 0 - 3 indicate ON/OFF for each connected slot) + u16 count_max; // Maximum count value (x16.7ms) u16 count[RFU_CHILD_MAX]; // Current count value (x 16.7 ms) for each connected slot }VBL_TIMER; typedef struct linkManagerTag { - /* 0x000 */ u8 acceptSlot_flag; - /* 0x001 */ u8 acceptCount; - /* 0x002 */ vu8 childClockSlave_flag; - /* 0x003 */ vu8 parentAck_flag; - /* 0x004 */ u8 state; - /* 0x005 */ u8 next_state; - /* 0x006 */ u8 parent_child; - /* 0x007 */ u8 pcswitch_flag; - /* 0x008 */ u8 RFU_powerOn_flag; - /* 0x009 */ u8 linkRecovery_enable; - /* 0x00a */ u8 linkRecovery_start_flag; - /* 0x00b */ u8 fastSearchParent_flag; - /* 0x00c */ u8 connectSlot_flag_old; - /* 0x00d */ u8 reserveDisconnectSlot_flag; - /* 0x00e */ u8 active; - /* 0x00f */ u8 msc_exe_flag; - /* 0x010 */ u8 child_slot; - /* 0x011 */ u8 state_bak[2]; - /* 0x014 */ u16 param[2]; - /* 0x018 */ u16 NI_failCounter_limit; - /* 0x01a */ u16 connect_period; - /* 0x01c */ u16 pcswitch_period_bak; - /* 0x01e */ u16 work; - /* 0x020 */ u16 *acceptable_serialNo_list; - /* 0x024 */ VBL_TIMER nameAcceptTimer; - /* 0x030 */ VBL_TIMER linkRecoveryTimer; - /* 0x03c */ INIT_PARAM *init_param; - /* 0x040 */ void (*LMAN_callback)(u8, u8); - /* 0x044 */ void (*MSC_callback)(u16); + u8 acceptSlot_flag; // Connection slot of child for which Link Manager accepted connection, expressed in bits. (This bit is not dropped for a broken link but is dropped with complete disconnection.) + u8 acceptCount; // Number of child devices for which connections accepted by Link Manager. + vu8 childClockSlave_flag; // Flag indicating whether AGB clock slave state is currently being maintained by child. + vu8 parentAck_flag; // Flag indicating the child devices for which the parent received ACK by UNI commmunication. + u8 state; // Current link manager state + u8 next_state; // State that the link manager transitions to when it is next called. + u8 parent_child; // Shows whether operating on a parent or child. + u8 pcswitch_flag; // Flag for parent-child switching search. + u8 RFU_powerOn_flag; // Flag indicating whether RFU has been powered down. + u8 linkRecovery_enable; // ON/OFF flag for the link recovery process. + u8 linkRecovery_start_flag; // Link recovery start flag + u8 fastSearchParent_flag; // ON/OFF flag for parent fast search by child. + u8 connectSlot_flag_old; // Value of rfuLinkStatus->connectSlot_flag (internally used by the API) when the link manager was called previously. + u8 reserveDisconnectSlot_flag; // Bit indication of the child slot that was reject by child connection authentication and is waiting for disconnect. + u8 active; // Link manager operating flag (internally used by the API) + u8 msc_exe_flag; // MSC callback executing flag (internally used by the API) + u8 child_slot; // Slot number where child device connected (internally used by the API) + u8 state_bak[2]; // Backup of link manager state (internally used by the API) + u16 param[2]; // Region where parameters returned when LMAN callback occurs are stored. + u16 NI_failCounter_limit; // Period of failCounter during NI type data transmit/receive (x 16.7 ms) Note: Runs for unlimited time when specifying 0 + u16 connect_period; // Count for the period to execute a connection process (x 16.7 ms). Note: Runs for unlimited time when specifying 0. + u16 pcswitch_period_bak; // Backup for No. 3 SC period during parent-child switching search. + u16 work; // Work region used by the link manager. + u16 *acceptable_serialNo_list; // List of game serial numbers that can accept connections. (See Note below) + VBL_TIMER nameAcceptTimer; // Timer for period to receive game names from child device. + VBL_TIMER linkRecoveryTimer; // Timer for the link recovery process period for both parent and child. Note: Runs for unlimited time when specifying 0. + INIT_PARAM *init_param; // Pointer to parameter when executing initial setting process. + void (*LMAN_callback)(u8 msg,u8 param_count); // Pointer to user-defined LMAN callback routine generated by link manager operation. + void (*MSC_callback)(u16 REQ_commandID); // User-defined MSC callback function. (When defining the link manager, defines the MSC callback using rfu_LMAN_initializeManager or rfu_LMAN_setMSCCallback without using rfu_setMSCCallback.) } LINK_MANAGER; +/* Note: The acceptable_serialNo_list uses the following format to specify a list of game serial numbers that the parent device can accept connections from and terminates with 0xffff. (maximum 16 devices) + + u16 acceptable_serialNo_list[]={0x0001, 0x0002, 0x0003, 0xffff}; +*/ + extern struct linkManagerTag lman; u32 rfu_LMAN_REQBN_softReset_and_checkID(void); From e01ae55c13f9717f6b0f781846d9ceaeeb2a250d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 11 Jul 2021 20:42:05 -0400 Subject: [PATCH 003/417] Start more link_rfu_2 documentation --- include/link_rfu.h | 12 +-- src/data/union_room.h | 2 +- src/link.c | 20 +--- src/link_rfu_2.c | 211 ++++++++++++++++++++++++------------------ src/union_room.c | 23 +++-- 5 files changed, 144 insertions(+), 124 deletions(-) diff --git a/include/link_rfu.h b/include/link_rfu.h index e1c3a6fba1..da13fe539f 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -41,8 +41,8 @@ #define RFU_STATUS_WAIT_ACK_JOIN_GROUP 7 #define RFU_STATUS_LEAVE_GROUP_NOTICE 8 #define RFU_STATUS_LEAVE_GROUP 9 -#define RFU_STATUS_10 10 -#define RFU_STATUS_11 11 +#define RFU_STATUS_CHILD_LEAVE_READY 10 +#define RFU_STATUS_CHILD_LEAVE 11 #define RFU_STATUS_ACK_JOIN_GROUP 12 // RfuTgtData.gname is read as these structs. @@ -213,8 +213,8 @@ void Rfu_SetLinkStandbyCallback(void); void ResetLinkRfuGFLayer(void); void UpdateWirelessStatusIndicatorSprite(void); void InitRFU(void); -bool32 sub_8010EC0(void); -bool32 sub_8010F1C(void); +bool32 RfuMain1(void); +bool32 RfuMain2(void); bool32 RfuHasErrored(void); bool32 IsRfuRecvQueueEmpty(void); u32 GetRfuRecvQueueLength(void); @@ -229,9 +229,9 @@ u8 sub_801048C(bool32 a0); void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *buff1, u8 *buff2); void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, bool32 started); void InitializeRfuLinkManager_LinkLeader(u32 a0); -bool32 sub_8012240(void); +bool32 IsRfuCommunicatingWithAllChildren(void); void LinkRfu_StopManagerAndFinalizeSlots(void); -bool32 sub_80105EC(void); +bool32 RfuTryDisconnectLeavingChildren(void); bool32 HasTrainerLeftPartnersList(u16 trainerId, const u8 *name); void SendRfuStatusToPartner(u8 status, u16 trainerId, const u8 *name); u32 WaitSendRfuStatusToPartner(u16 trainerId, const u8 *name); diff --git a/src/data/union_room.h b/src/data/union_room.h index be7bfae71e..a130681467 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -986,7 +986,7 @@ static const struct ListMenuItem sEmptyListMenuItems[] = { static const struct ListMenuTemplate sUnknownListMenuTemplate = { .items = sEmptyListMenuItems, .moveCursorFunc = ListMenuDefaultCursorMoveFunc, - .itemPrintFunc = nullsub_14, + .itemPrintFunc = ItemPrintFunc_EmptyList, .totalItems = ARRAY_COUNT(sEmptyListMenuItems), .maxShowed = 4, .windowId = 0, diff --git a/src/link.c b/src/link.c index 8a04b53e58..c32ee07d26 100644 --- a/src/link.c +++ b/src/link.c @@ -485,21 +485,17 @@ u16 LinkMain2(const u16 *heldKeys) u8 i; if (!sLinkOpen) - { return 0; - } + for (i = 0; i < CMD_LENGTH; i++) - { gSendCmd[i] = 0; - } + gLinkHeldKeys = *heldKeys; if (gLinkStatus & LINK_STAT_CONN_ESTABLISHED) { ProcessRecvCmds(SIO_MULTI_CNT->id); if (gLinkCallback != NULL) - { gLinkCallback(); - } CheckErrorStatus(); } return gLinkStatus; @@ -1796,8 +1792,8 @@ bool8 HandleLinkConnection(void) } else { - r4 = sub_8010EC0(); - r5 = sub_8010F1C(); + r4 = RfuMain1(); + r5 = RfuMain2(); if (IsSendingKeysOverCable() == TRUE) { if (r4 == TRUE || IsRfuRecvQueueEmpty() || r5) @@ -1916,9 +1912,7 @@ u32 LinkMain1(u8 *shouldAdvanceLinkState, u16 *sendCmd, u16 (*recvCmds)[CMD_LENG break; case 1: if (gLink.isMaster == LINK_MASTER && gLink.playerCount > 1) - { gLink.handshakeAsMaster = TRUE; - } break; case 2: gLink.state = LINK_STATE_START0; @@ -1974,20 +1968,14 @@ u32 LinkMain1(u8 *shouldAdvanceLinkState, u16 *sendCmd, u16 (*recvCmds)[CMD_LENG } if (gLink.lag == LAG_MASTER) - { retVal |= LINK_STAT_ERROR_LAG_MASTER; - } if (gLink.localId >= MAX_LINK_PLAYERS) - { retVal |= LINK_STAT_ERROR_INVALID_ID; - } retVal2 = retVal; if (gLink.lag == LAG_SLAVE) - { retVal2 |= LINK_STAT_ERROR_LAG_SLAVE; - } return retVal2; } diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index 6366b97047..b27694960c 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -18,6 +18,35 @@ #include "save.h" #include "mystery_gift.h" +enum { + RFUSTATE_INIT, + RFUSTATE_INIT_END, + RFUSTATE_PARENT_CONNECT, + RFUSTATE_PARENT_CONNECT_END, + RFUSTATE_STOP_MANAGER, + RFUSTATE_STOP_MANAGER_END, + RFUSTATE_CHILD_CONNECT, + RFUSTATE_CHILD_CONNECT_END, + RFUSTATE_8, // Unused + RFUSTATE_RECONNECTED, + RFUSTATE_10, + RFUSTATE_CHILD_TRY_JOIN, + RFUSTATE_CHILD_JOINED, + RFUSTATE_13, + RFUSTATE_14, + RFUSTATE_15, + RFUSTATE_UR_FINALIZE, +}; +// These states are re-used for different purposes +#define RFUSTATE_17 17 +#define RFUSTATE_18 18 + +#define RFUSTATE_PARENT_FINALIZE_START 17 +#define RFUSTATE_PARENT_FINALIZE 18 +#define RFUSTATE_UR_CONNECT 17 +#define RFUSTATE_UR_CONNECT_END 18 +#define RFUSTATE_20 20 + struct SioInfo { char magic[15]; // PokemonSioInfo @@ -193,9 +222,9 @@ static const TaskFunc sUnknown_082ED7E0[] = { static const char sASCII_PokemonSioInfo[] = "PokemonSioInfo"; static const char sASCII_LinkLossDisconnect[] = "LINK LOSS DISCONNECT!"; static const char sASCII_LinkLossRecoveryNow[] = "LINK LOSS RECOVERY NOW"; -ALIGNED(4) static const char sASCII_30Commas[31] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','\0'}; -static const char sASCII_15Commas[16] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','\0'}; -static const char sASCII_8Commas[9] = {' ',' ',' ',' ',' ',' ',' ',' ','\0'}; +ALIGNED(4) static const char sASCII_30Spaces[31] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','\0'}; +static const char sASCII_15Spaces[16] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','\0'}; +static const char sASCII_8Spaces[9] = {' ',' ',' ',' ',' ',' ',' ',' ','\0'}; ALIGNED(4) static const char sASCII_Space[2] = {' ','\0'}; static const char sASCII_Asterisk[2] = {'*','\0'}; static const char sASCII_NowSlot[8] = "NOWSLOT"; @@ -277,32 +306,32 @@ static void Task_LinkLeaderSearchForChildren(u8 taskId) UpdateChildStatuses(); switch (Rfu.state) { - case 0: + case RFUSTATE_INIT: rfu_LMAN_initializeRFU(&sRfuReqConfig); - Rfu.state = 1; + Rfu.state = RFUSTATE_INIT_END; gTasks[taskId].data[1] = 1; break; - case 1: + case RFUSTATE_INIT_END: break; - case 2: + case RFUSTATE_PARENT_CONNECT: rfu_LMAN_establishConnection(Rfu.parentChild, 0, 240, (u16 *)sAcceptedSerialNos); - Rfu.state = 3; + Rfu.state = RFUSTATE_PARENT_CONNECT_END; gTasks[taskId].data[1] = 6; break; - case 3: + case RFUSTATE_PARENT_CONNECT_END: break; - case 4: + case RFUSTATE_STOP_MANAGER: rfu_LMAN_stopManager(FALSE); - Rfu.state = 5; + Rfu.state = RFUSTATE_STOP_MANAGER_END; break; - case 5: + case RFUSTATE_STOP_MANAGER_END: break; - case 18: + case RFUSTATE_PARENT_FINALIZE: Rfu.unk_cdb = FALSE; rfu_LMAN_setMSCCallback(sub_800EDBC); sub_800EAB4(); sub_800EAFC(); - Rfu.state = 20; + Rfu.state = RFUSTATE_20; gTasks[taskId].data[1] = 8; CreateTask(sub_801084C, 5); DestroyTask(taskId); @@ -363,28 +392,28 @@ static void Task_JoinGroupSearchForParent(u8 taskId) { switch (Rfu.state) { - case 0: + case RFUSTATE_INIT: rfu_LMAN_initializeRFU((INIT_PARAM *)&sRfuReqConfigTemplate); - Rfu.state = 1; + Rfu.state = RFUSTATE_INIT_END; gTasks[taskId].data[1] = 1; break; - case 1: + case RFUSTATE_INIT_END: break; - case 6: + case RFUSTATE_CHILD_CONNECT: rfu_LMAN_establishConnection(Rfu.parentChild, 0, 240, (u16 *)sAcceptedSerialNos); - Rfu.state = 7; + Rfu.state = RFUSTATE_CHILD_CONNECT_END; gTasks[taskId].data[1] = 7; break; - case 7: + case RFUSTATE_CHILD_CONNECT_END: break; - case 9: + case RFUSTATE_RECONNECTED: gTasks[taskId].data[1] = 10; break; - case 11: + case RFUSTATE_CHILD_TRY_JOIN: switch (sub_80107A0()) { case RFU_STATUS_JOIN_GROUP_OK: - Rfu.state = 12; + Rfu.state = RFUSTATE_CHILD_JOINED; break; case RFU_STATUS_JOIN_GROUP_NO: case RFU_STATUS_LEAVE_GROUP: @@ -394,7 +423,7 @@ static void Task_JoinGroupSearchForParent(u8 taskId) break; } break; - case 12: + case RFUSTATE_CHILD_JOINED: { u8 bmChildSlot = 1 << Rfu.childSlot; rfu_clearSlot(TYPE_NI_SEND | TYPE_NI_RECV, Rfu.childSlot); @@ -448,48 +477,44 @@ static void Task_LinkRfu_UnionRoomListen(u8 taskId) } switch (Rfu.state) { - case 0: + case RFUSTATE_INIT: rfu_LMAN_initializeRFU(&sRfuReqConfig); - Rfu.state = 1; + Rfu.state = RFUSTATE_INIT_END; gTasks[taskId].data[1] = 1; break; - case 1: + case RFUSTATE_INIT_END: break; - case 17: + case RFUSTATE_UR_CONNECT: rfu_LMAN_establishConnection(2, 0, 240, (u16 *)sAcceptedSerialNos); rfu_LMAN_setMSCCallback(sub_800ED34); - Rfu.state = 18; + Rfu.state = RFUSTATE_UR_CONNECT_END; break; - case 18: + case RFUSTATE_UR_CONNECT_END: break; - case 13: + case RFUSTATE_13: if (rfu_UNI_setSendData(1 << Rfu.childSlot, Rfu.unk_4c, sizeof(Rfu.unk_4c)) == 0) { Rfu.parentChild = MODE_CHILD; DestroyTask(taskId); if (gTasks[taskId].data[7]) - { CreateTask(sub_8010D0C, 1); - } else - { CreateTask(sub_801084C, 5); - } } break; - case 14: + case RFUSTATE_14: rfu_LMAN_stopManager(0); - Rfu.state = 15; + Rfu.state = RFUSTATE_15; break; - case 15: + case RFUSTATE_15: break; - case 16: + case RFUSTATE_UR_FINALIZE: Rfu.unk_cdb = FALSE; rfu_LMAN_setMSCCallback(sub_800EDBC); UpdateGameData_GroupLockedIn(TRUE); sub_800EAB4(); sub_800EAFC(); - Rfu.state = 20; + Rfu.state = RFUSTATE_20; gTasks[taskId].data[1] = 8; Rfu.parentChild = MODE_PARENT; CreateTask(sub_801084C, 5); @@ -557,7 +582,7 @@ void LinkRfu_Shutdown(void) ResetLinkRfuGFLayer(); } } - else if (Rfu.parentChild == 2) + else if (Rfu.parentChild == MODE_P_C_SWITCH) { if (FuncIsActiveTask(Task_LinkRfu_UnionRoomListen) == TRUE) { @@ -581,7 +606,7 @@ static void CreateTask_LinkLeaderSearchForChildren(void) static bool8 sub_800EE94(void) { - if (Rfu.state == 7 && Rfu.parentId) + if (Rfu.state == RFUSTATE_CHILD_CONNECT_END && Rfu.parentId) { return TRUE; } @@ -590,9 +615,9 @@ static bool8 sub_800EE94(void) static bool32 IsParentSuccessfullyReconnected(void) { - if (Rfu.state == 7 && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[Rfu.unk_c3d].id, 240)) + if (Rfu.state == RFUSTATE_CHILD_CONNECT_END && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[Rfu.unk_c3d].id, 240)) { - Rfu.state = 9; + Rfu.state = RFUSTATE_RECONNECTED; return TRUE; } return FALSE; @@ -614,15 +639,15 @@ bool8 LmanAcceptSlotFlagIsNotZero(void) void LinkRfu_StopManagerAndFinalizeSlots(void) { - Rfu.state = 4; + Rfu.state = RFUSTATE_STOP_MANAGER; Rfu.acceptSlot_flag = lman.acceptSlot_flag; } bool32 WaitRfuState(bool32 force) { - if (Rfu.state == 17 || force) + if (Rfu.state == RFUSTATE_PARENT_FINALIZE_START || force) { - Rfu.state = 18; + Rfu.state = RFUSTATE_PARENT_FINALIZE; return TRUE; } return FALSE; @@ -630,7 +655,7 @@ bool32 WaitRfuState(bool32 force) void sub_800EF7C(void) { - Rfu.state = 14; + Rfu.state = RFUSTATE_14; } static void sub_800EF88(u8 a0) @@ -720,7 +745,7 @@ bool32 IsRfuRecvQueueEmpty(void) static bool32 sub_800F0F8(void) { - if (Rfu.state < 20) + if (Rfu.state < RFUSTATE_20) { rfu_REQ_recvData(); rfu_waitREQComplete(); @@ -772,15 +797,13 @@ static bool32 sub_800F1E0(void) u16 j; u8 retval; - if (Rfu.state >= 20 && Rfu.unk_0e == TRUE) + if (Rfu.state >= RFUSTATE_20 && Rfu.unk_0e == TRUE) { rfu_waitREQComplete(); while (Rfu.unk_cdb == FALSE) { if (Rfu.errorState != 0) - { return FALSE; - } } rfu_REQ_recvData(); rfu_waitREQComplete(); @@ -885,9 +908,7 @@ static bool32 RfuProcessEnqueuedRecvBlock(void) for (i = 0; i < MAX_RFU_PLAYERS; i++) { for (j = 0; j < CMD_LENGTH - 1; j++) - { gRecvCmds[i][j] = (sp00[i * 14 + (j << 1) + 1] << 8) | sp00[i * 14 + (j << 1) + 0]; - } } RfuHandleReceiveCommand(0); if (lman.childClockSlave_flag == 0 && Rfu.unk_ce4) @@ -1563,7 +1584,7 @@ static bool8 CheckForLeavingGroupMembers(void) if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_LEAVE_GROUP_NOTICE) { Rfu.partnerSendStatuses[i] = RFU_STATUS_LEAVE_GROUP; - Rfu.partnerRecvStatuses[i] = RFU_STATUS_10; + Rfu.partnerRecvStatuses[i] = RFU_STATUS_CHILD_LEAVE_READY; rfu_clearSlot(TYPE_NI_RECV, i); rfu_NI_setSendData(1 << i, 8, &Rfu.partnerSendStatuses[i], 1); memberLeft = TRUE; @@ -1580,27 +1601,33 @@ static bool8 CheckForLeavingGroupMembers(void) return memberLeft; } -bool32 sub_80105EC(void) +bool32 RfuTryDisconnectLeavingChildren(void) { - u8 flags = 0; + u8 childrenLeaving = 0; s32 i; + + // Check all children, get those waiting to be disconnected for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_11) + if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE) { - flags |= (1 << i); + childrenLeaving |= (1 << i); Rfu.partnerRecvStatuses[i] = RFU_STATUS_OK; } } - if (flags) + + // Disconnect any leaving children + if (childrenLeaving) { - rfu_REQ_disconnect(flags); + rfu_REQ_disconnect(childrenLeaving); rfu_waitREQComplete(); } + + // Return true if any children have left or are still waiting to leave for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_10 - || Rfu.partnerRecvStatuses[i] == RFU_STATUS_11) + if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE_READY + || Rfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE) return TRUE; } return FALSE; @@ -1651,8 +1678,8 @@ static void UpdateChildStatuses(void) if (gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_SUCCESS || gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_FAILED) { - if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_10) - Rfu.partnerRecvStatuses[i] = RFU_STATUS_11; + if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE_READY) + Rfu.partnerRecvStatuses[i] = RFU_STATUS_CHILD_LEAVE; rfu_clearSlot(TYPE_NI_SEND, i); } } @@ -1939,7 +1966,8 @@ static void rfu_REQ_recvData_then_sendData(void) } } -bool32 sub_8010EC0(void) +// Rfu equivalent of LinkMain1 +bool32 RfuMain1(void) { bool32 retval = FALSE; Rfu.parentId = 0; @@ -1954,7 +1982,7 @@ bool32 sub_8010EC0(void) case MODE_CHILD: retval = RfuProcessEnqueuedRecvBlock(); break; - case 2: + case MODE_P_C_SWITCH: rfu_REQ_recvData_then_sendData(); break; } @@ -1962,7 +1990,8 @@ bool32 sub_8010EC0(void) return retval; } -bool32 sub_8010F1C(void) +// Rfu equivalent of LinkMain2 +bool32 RfuMain2(void) { bool32 retval = FALSE; if (!Rfu.isShuttingDown) @@ -2101,7 +2130,7 @@ static void sub_801120C(u8 msg, u8 paramCount) switch (msg) { case LMAN_MSG_INITIALIZE_COMPLETED: - Rfu.state = 2; + Rfu.state = RFUSTATE_PARENT_CONNECT; break; case LMAN_MSG_NEW_CHILD_CONNECT_DETECTED: break; @@ -2140,7 +2169,7 @@ static void sub_801120C(u8 msg, u8 paramCount) rfu_REQ_disconnect(Rfu.acceptSlot_flag ^ lman.acceptSlot_flag); rfu_waitREQComplete(); } - Rfu.state = 17; + Rfu.state = RFUSTATE_PARENT_FINALIZE_START; break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_START_RECOVERY: Rfu.linkLossRecoveryState = 1; @@ -2161,8 +2190,7 @@ static void sub_801120C(u8 msg, u8 paramCount) } RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; - case 0x34: - break; + case 0x34: // ? Not a valid LMAN_MSG value case LMAN_MSG_RFU_POWER_DOWN: case LMAN_MSG_MANAGER_STOPPED: case LMAN_MSG_MANAGER_FORCED_STOPPED_AND_RFU_RESET: @@ -2188,7 +2216,7 @@ void sub_8011404(u8 msg, u8 unused1) switch (msg) { case LMAN_MSG_INITIALIZE_COMPLETED: - Rfu.state = 6; + Rfu.state = RFUSTATE_CHILD_CONNECT; break; case LMAN_MSG_PARENT_FOUND: Rfu.parentId = lman.param[0]; @@ -2202,7 +2230,7 @@ void sub_8011404(u8 msg, u8 unused1) RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; case LMAN_MSG_CHILD_NAME_SEND_COMPLETED: - Rfu.state = 11; + Rfu.state = RFUSTATE_CHILD_TRY_JOIN; Rfu.unk_c85 = 0; Rfu.recvStatus = RFU_STATUS_OK; rfu_setRecvBuffer(TYPE_NI, Rfu.childSlot, &Rfu.recvStatus, 1); @@ -2293,7 +2321,7 @@ static void sub_8011674(u8 msg, u8 paramCount) switch (msg) { case LMAN_MSG_INITIALIZE_COMPLETED: - Rfu.state = 17; + Rfu.state = RFUSTATE_17; break; case LMAN_MSG_NEW_CHILD_CONNECT_DETECTED: RfuSetStatus(RFU_STATUS_NEW_CHILD_DETECTED, 0); @@ -2340,8 +2368,8 @@ static void sub_8011674(u8 msg, u8 paramCount) rfu_REQ_disconnect(lman.acceptSlot_flag ^ r1); rfu_waitREQComplete(); } - if (Rfu.state == 15) - Rfu.state = 16; + if (Rfu.state == RFUSTATE_15) + Rfu.state = RFUSTATE_UR_FINALIZE; break; break; case LMAN_MSG_PARENT_FOUND: @@ -2353,7 +2381,7 @@ static void sub_8011674(u8 msg, u8 paramCount) Rfu.childSlot = lman.param[0]; break; case LMAN_MSG_CONNECT_PARENT_FAILED: - Rfu.state = 18; + Rfu.state = RFUSTATE_18; if (Rfu.unk_ccf < 2) { Rfu.unk_ccf++; @@ -2365,7 +2393,7 @@ static void sub_8011674(u8 msg, u8 paramCount) } break; case LMAN_MSG_CHILD_NAME_SEND_COMPLETED: - Rfu.state = 13; + Rfu.state = RFUSTATE_13; RfuSetStatus(RFU_STATUS_CHILD_SEND_COMPLETE, 0); rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, 70); break; @@ -2403,8 +2431,10 @@ static void sub_8011674(u8 msg, u8 paramCount) rfu_LMAN_stopManager(0); } - if (gRfuLinkStatus->parentChild == MODE_NEUTRAL && lman.pcswitch_flag == 0 && FuncIsActiveTask(Task_LinkRfu_UnionRoomListen) == TRUE) - Rfu.state = 17; + if (gRfuLinkStatus->parentChild == MODE_NEUTRAL + && lman.pcswitch_flag == 0 + && FuncIsActiveTask(Task_LinkRfu_UnionRoomListen) == TRUE) + Rfu.state = RFUSTATE_17; RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; @@ -2557,7 +2587,7 @@ void InitializeRfuLinkManager_JoinGroup(void) void InitializeRfuLinkManager_EnterUnionRoom(void) { - Rfu.parentChild = 2; + Rfu.parentChild = MODE_P_C_SWITCH; CopyPlayerNameToUnameBuffer(); rfu_LMAN_initializeManager(sub_8011674, NULL); sRfuReqConfig = sRfuReqConfigTemplate; @@ -2765,7 +2795,7 @@ static void sub_801209C(u8 taskId) { if (gRfuLinkStatus->partner[id].slot != 0xFF && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[id].id, 0x5A)) { - Rfu.state = 0xA; + Rfu.state = RFUSTATE_10; DestroyTask(taskId); } } @@ -2810,12 +2840,15 @@ bool8 IsRfuRecoveringFromLinkLoss(void) return FALSE; } -bool32 sub_8012240(void) +bool32 IsRfuCommunicatingWithAllChildren(void) { s32 i; for (i = 0; i < RFU_CHILD_MAX; i++) { + // RFU_STATUS_OK is the default status. + // If any connected child is receiving a status other + // than OK, then the parent is communicating with them if ((lman.acceptSlot_flag >> i) & 1 && Rfu.partnerSendStatuses[i] == RFU_STATUS_OK) return FALSE; } @@ -2828,7 +2861,7 @@ static void Debug_PrintEmpty(void) s32 i; for (i = 0; i < 20; i++) - Debug_PrintString(sASCII_30Commas, 0, i); + Debug_PrintString(sASCII_30Spaces, 0, i); } static void Debug_PrintStatus(void) @@ -2863,8 +2896,8 @@ static void Debug_PrintStatus(void) for (i = 0; i < RFU_CHILD_MAX; i++) { Debug_PrintNum(0, 1, i + 3, 4); - Debug_PrintString(sASCII_15Commas, 6, i + 3); - Debug_PrintString(sASCII_8Commas, 0x16, i + 3); + Debug_PrintString(sASCII_15Spaces, 6, i + 3); + Debug_PrintString(sASCII_8Spaces, 0x16, i + 3); } Debug_PrintNum(gRfuLinkStatus->partner[Rfu.childSlot].serialNo, 1, 3, 4); Debug_PrintString((void*)gRfuLinkStatus->partner[Rfu.childSlot].gname, 6, 3); @@ -2884,8 +2917,8 @@ static void Debug_PrintStatus(void) for (; i < RFU_CHILD_MAX; i++) { Debug_PrintNum(0, 1, i + 3, 4); - Debug_PrintString(sASCII_15Commas, 6, i + 3); - Debug_PrintString(sASCII_8Commas, 0x16, i + 3); + Debug_PrintString(sASCII_15Spaces, 6, i + 3); + Debug_PrintString(sASCII_8Spaces, 0x16, i + 3); } } } diff --git a/src/union_room.c b/src/union_room.c index 8d02a260d9..d9242bf9c1 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -129,7 +129,7 @@ enum { LL_STATE_PRINT_AWAITING_PLAYERS, LL_STATE_AWAIT_PLAYERS, LL_STATE_ACCEPT_NEW_MEMBER_PROMPT, - LL_STATE_9 = 9, + LL_STATE_WAIT_DISCONNECT_CHILD = 9, LL_STATE_MEMBER_LEFT, LL_STATE_ACCEPT_NEW_MEMBER_PROMPT_HANDLE_INPUT, LL_STATE_UPDATE_AFTER_JOIN_REQUEST, @@ -184,12 +184,10 @@ EWRAM_DATA u16 gUnionRoomOfferedSpecies = 0; EWRAM_DATA u8 gUnionRoomRequestedMonType = 0; static EWRAM_DATA struct UnionRoomTrade sUnionRoomTrade = {}; -// IWRAM vars static struct WirelessLink_Leader *sLeader; static struct WirelessLink_Group *sGroup; static struct WirelessLink_URoom *sURoom; -// this file's functions static void UR_AddTextPrinterParameterized(u8, u8, const u8 *, u8, u8, u8); static u16 ReadAsU16(const u8 *); static void Task_TryBecomeLinkLeader(u8); @@ -256,11 +254,10 @@ static bool8 AreGnameUnameDifferent(struct WirelessGnameUnamePair*, const struct static void ItemPrintFunc_PossibleGroupMembers(u8 windowId, u32 id, u8 y); static void ListMenuItemPrintFunc_UnionRoomGroups(u8 windowId, u32 id, u8 y); static void TradeBoardListMenuItemPrintFunc(u8 windowId, u32 id, u8 y); -static void nullsub_14(u8 windowId, u32 id, u8 y); +static void ItemPrintFunc_EmptyList(u8 windowId, u32 id, u8 y); #include "data/union_room.h" -// code static void PrintNumPlayersWaitingForMsg(u8 windowId, u8 capacityCode, u8 stringId) { FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); @@ -461,19 +458,21 @@ static void Task_TryBecomeLinkLeader(u8 taskId) if (GROUP_MIN(sPlayerActivityGroupSize) != 0 && data->playerCount > GROUP_MIN(sPlayerActivityGroupSize) - 1 && GROUP_MAX(sPlayerActivityGroupSize) != 0 - && sub_8012240() + && IsRfuCommunicatingWithAllChildren() && JOY_NEW(START_BUTTON)) { data->state = LL_STATE_MEMBERS_OK_PROMPT; LinkRfu_StopManagerAndFinalizeSlots(); } - if (data->state == LL_STATE_AWAIT_PLAYERS && sub_80105EC()) + if (data->state == LL_STATE_AWAIT_PLAYERS && RfuTryDisconnectLeavingChildren()) { - data->state = LL_STATE_9; + // At least 1 group member has left or is trying to leave + data->state = LL_STATE_WAIT_DISCONNECT_CHILD; } break; - case LL_STATE_9: - if (!sub_80105EC()) + case LL_STATE_WAIT_DISCONNECT_CHILD: + // Resume after ensuring all members trying to leave have left + if (!RfuTryDisconnectLeavingChildren()) { data->state = LL_STATE_AWAIT_PLAYERS; data->playerCount = sub_8013398(data->field_0); @@ -525,7 +524,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) data->state = LL_STATE_UPDATE_AFTER_JOIN_REQUEST; break; case -3: - data->state = LL_STATE_9; + data->state = LL_STATE_WAIT_DISCONNECT_CHILD; break; } break; @@ -4074,7 +4073,7 @@ static s32 UnionRoomGetPlayerInteractionResponse(struct UnkStruct_Main0 *main0, } } -void nullsub_14(u8 windowId, u32 itemId, u8 y) +void ItemPrintFunc_EmptyList(u8 windowId, u32 itemId, u8 y) { } From dfdcfc1568ad8d3c4efbe36f06c1b883b677abd2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 15 Aug 2021 16:11:30 -0400 Subject: [PATCH 004/417] Document remaining functions in cable_club --- data/specials.inc | 2 +- include/link.h | 34 +++++++++++----------------------- src/battle_controllers.c | 2 +- src/battle_main.c | 34 +++++++++++++++++----------------- src/battle_tower.c | 4 ++-- src/berry_blender.c | 2 +- src/cable_club.c | 28 +++++++++++++++------------- src/contest_link.c | 8 ++++---- src/field_specials.c | 4 ++-- src/link.c | 16 ++++++++-------- src/link_rfu_2.c | 12 ++++++------ src/record_mixing.c | 2 +- src/trade.c | 24 +++++++----------------- src/union_room.c | 2 +- 14 files changed, 77 insertions(+), 97 deletions(-) diff --git a/data/specials.inc b/data/specials.inc index eacc6bf5e7..e9eadac4c0 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -43,7 +43,7 @@ gSpecials:: @ 81DBA64 def_special CloseLink def_special ColosseumPlayerSpotTriggered def_special PlayerEnteredTradeSeat - def_special nullsub_37 + def_special Script_StartWiredTrade def_special CableClubSaveGame def_special TryBerryBlenderLinkup def_special GetLinkPartnerNames diff --git a/include/link.h b/include/link.h index 407dbabb9c..8dd2328d08 100644 --- a/include/link.h +++ b/include/link.h @@ -104,6 +104,14 @@ #define LINKTYPE_CONTEST_GMODE 0x6601 #define LINKTYPE_CONTEST_EMODE 0x6602 +enum { + BLOCK_REQ_SIZE_NONE, // Identical to 200 + BLOCK_REQ_SIZE_200, + BLOCK_REQ_SIZE_100, + BLOCK_REQ_SIZE_220, + BLOCK_REQ_SIZE_40, +}; + struct LinkStatus { u32 localId:2; @@ -227,8 +235,6 @@ struct BlockRequest u32 size; }; -extern const struct BlockRequest sBlockRequestLookupTable[5]; - extern struct Link gLink; extern u16 gRecvCmds[MAX_RFU_PLAYERS][CMD_LENGTH]; extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE]; @@ -236,8 +242,7 @@ extern u16 gLinkType; extern u32 gLinkStatus; extern u16 gBlockRecvBuffer[MAX_RFU_PLAYERS][BLOCK_BUFFER_SIZE / 2]; extern u16 gSendCmd[CMD_LENGTH]; -extern struct LinkPlayer gLinkPlayers[5]; -extern u16 word_3002910[]; +extern struct LinkPlayer gLinkPlayers[MAX_RFU_PLAYERS]; extern bool8 gReceivedRemoteLinkPlayers; extern u32 gBerryBlenderKeySendAttempts; extern bool8 gLinkVSyncDisabled; @@ -249,8 +254,6 @@ void Task_DestroySelf(u8 taskId); void OpenLink(void); void CloseLink(void); u16 LinkMain2(const u16 *); -void sub_8007B14(void); -bool32 sub_8007B24(void); void ClearLinkCallback(void); void ClearLinkCallback_2(void); u8 GetLinkPlayerCount(void); @@ -259,10 +262,8 @@ u8 GetLinkPlayerDataExchangeStatusTimed(int lower, int upper); bool8 IsLinkPlayerDataExchangeComplete(void); u32 GetLinkPlayerTrainerId(u8); void ResetLinkPlayers(void); -void sub_8007E24(void); -void sub_8007E4C(void); u8 GetMultiplayerId(void); -u8 bitmask_all_link_players_but_self(void); +u8 BitmaskAllOtherLinkPlayers(void); bool8 SendBlock(u8, const void *, u16); u8 GetBlockReceivedStatus(void); void ResetBlockReceivedFlags(void); @@ -270,7 +271,7 @@ void ResetBlockReceivedFlag(u8); u8 GetLinkPlayerCount_2(void); bool8 IsLinkMaster(void); void CB2_LinkError(void); -u8 GetSioMultiSI(void); +bool8 GetSioMultiSI(void); bool8 IsLinkConnectionEstablished(void); bool8 HasLinkErrorOccurred(void); void ResetSerial(void); @@ -285,14 +286,12 @@ void CreateWirelessStatusIndicatorSprite(u8, u8); void SetLinkStandbyCallback(void); void SetWirelessCommType1(void); void CheckShouldAdvanceLinkState(void); -u8 IsLinkMaster(void); void SetCloseLinkCallback(void); bool8 HandleLinkConnection(void); void SetLinkDebugValues(u32 seed, u32 flags); void SetBerryBlenderLinkCallback(void); void SetSuppressLinkErrorMessage(bool8 flag); void ConvertLinkPlayerName(struct LinkPlayer *linkPlayer); -u8 GetSioMultiSI(void); void ClearSavedLinkPlayers(void); void BufferLinkErrorInfo(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, bool8 disconnected); void LocalLinkPlayerToBlock(void); @@ -312,8 +311,6 @@ extern bool8 gRemoteLinkPlayersNotReceived[MAX_LINK_PLAYERS]; extern u8 gBlockReceivedStatus[MAX_LINK_PLAYERS]; extern u16 gLinkHeldKeys; extern u32 gLinkStatus; -extern u8 gUnknown_030030E4; -extern u8 gUnknown_030030E8; extern bool8 gReadyToExitStandby[MAX_LINK_PLAYERS]; extern bool8 gReadyToCloseLink[MAX_LINK_PLAYERS]; extern u16 gReadyCloseLinkType; @@ -329,23 +326,14 @@ extern u8 gBlockRequestType; extern u8 gLastSendQueueCount; extern u8 gLastRecvQueueCount; extern u16 gLinkSavedIme; -extern u32 gFiller_03003074; -extern u32 gFiller_03003154; -extern u32 gFiller_03003158; -extern u32 gFiller_0300315c; -extern u32 gFiller_03004138; -extern u32 gFiller_0300413C; -extern u32 gFiller_03003080; extern struct LinkPlayer gLocalLinkPlayer; bool32 Link_AnyPartnersPlayingRubyOrSapphire(void); bool32 LinkDummy_Return2(void); void SetLocalLinkPlayerId(u8); u8 GetSavedPlayerCount(void); -void sub_8009FAC(void); bool8 SendBlockRequest(u8 type); u8 GetLinkPlayerCountAsBitFlags(void); -u8 sub_800A0C8(s32, s32); u8 GetSavedLinkPlayerCountAsBitFlags(void); void SetCloseLinkCallbackHandleJP(void); void CheckLinkPlayersMatchSaved(void); diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 0f32345791..0a8ecac021 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -789,7 +789,7 @@ static void Task_HandleSendLinkBuffersData(u8 taskId) gTasks[taskId].data[15] = 0; } blockSize = (gLinkBattleSendBuffer[gTasks[taskId].data[15] + LINK_BUFF_SIZE_LO] | (gLinkBattleSendBuffer[gTasks[taskId].data[15] + LINK_BUFF_SIZE_HI] << 8)) + LINK_BUFF_DATA; - SendBlock(bitmask_all_link_players_but_self(), &gLinkBattleSendBuffer[gTasks[taskId].data[15]], blockSize); + SendBlock(BitmaskAllOtherLinkPlayers(), &gLinkBattleSendBuffer[gTasks[taskId].data[15]], blockSize); gTasks[taskId].data[11]++; } else diff --git a/src/battle_main.c b/src/battle_main.c index 977bcbd9c1..7a72837140 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -986,7 +986,7 @@ static void CB2_HandleStartBattle(void) gLinkPlayers[1].id = 1; } - SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader)); + SendBlock(BitmaskAllOtherLinkPlayers(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader)); gBattleCommunication[MULTIUSE_STATE] = 2; } if (gWirelessCommType) @@ -1024,7 +1024,7 @@ static void CB2_HandleStartBattle(void) case 3: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); + SendBlock(BitmaskAllOtherLinkPlayers(), gPlayerParty, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1039,7 +1039,7 @@ static void CB2_HandleStartBattle(void) case 7: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon) * 2); + SendBlock(BitmaskAllOtherLinkPlayers(), gPlayerParty + 2, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1054,7 +1054,7 @@ static void CB2_HandleStartBattle(void) case 11: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 4, sizeof(struct Pokemon) * 2); + SendBlock(BitmaskAllOtherLinkPlayers(), gPlayerParty + 4, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1096,7 +1096,7 @@ static void CB2_HandleStartBattle(void) case 16: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed)); + SendBlock(BitmaskAllOtherLinkPlayers(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed)); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1188,7 +1188,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) *(&gBattleStruct->multiBuffer.linkBattlerHeader.versionSignatureHi) = 3; BufferPartyVsScreenHealth_AtStart(); SetPlayerBerryDataInBattleStruct(); - SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader)); + SendBlock(BitmaskAllOtherLinkPlayers(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader)); gBattleCommunication[MULTIUSE_STATE] = 2; } @@ -1224,7 +1224,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 3: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); + SendBlock(BitmaskAllOtherLinkPlayers(), gPlayerParty, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1248,7 +1248,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 5: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon)); + SendBlock(BitmaskAllOtherLinkPlayers(), gPlayerParty + 2, sizeof(struct Pokemon)); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1272,7 +1272,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 7: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gEnemyParty, sizeof(struct Pokemon) * 2); + SendBlock(BitmaskAllOtherLinkPlayers(), gEnemyParty, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1290,7 +1290,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 9: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gEnemyParty + 2, sizeof(struct Pokemon) * 2); + SendBlock(BitmaskAllOtherLinkPlayers(), gEnemyParty + 2, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1308,7 +1308,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 11: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gEnemyParty + 4, sizeof(struct Pokemon) * 2); + SendBlock(BitmaskAllOtherLinkPlayers(), gEnemyParty + 4, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1350,7 +1350,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 14: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed)); + SendBlock(BitmaskAllOtherLinkPlayers(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed)); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1432,7 +1432,7 @@ static void CB2_PreInitMultiBattle(void) { sMultiPartnerPartyBuffer = Alloc(sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); sub_80379F8(0); - SendBlock(bitmask_all_link_players_but_self(), sMultiPartnerPartyBuffer, sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); + SendBlock(BitmaskAllOtherLinkPlayers(), sMultiPartnerPartyBuffer, sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1577,7 +1577,7 @@ static void CB2_HandleStartMultiBattle(void) BufferPartyVsScreenHealth_AtStart(); SetPlayerBerryDataInBattleStruct(); - SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader)); + SendBlock(BitmaskAllOtherLinkPlayers(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader)); gBattleCommunication[MULTIUSE_STATE]++; } if (gWirelessCommType) @@ -1634,7 +1634,7 @@ static void CB2_HandleStartMultiBattle(void) case 3: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); + SendBlock(BitmaskAllOtherLinkPlayers(), gPlayerParty, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1697,7 +1697,7 @@ static void CB2_HandleStartMultiBattle(void) case 5: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon)); + SendBlock(BitmaskAllOtherLinkPlayers(), gPlayerParty + 2, sizeof(struct Pokemon)); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1796,7 +1796,7 @@ static void CB2_HandleStartMultiBattle(void) u32* ptr = gBattleStruct->multiBuffer.battleVideo; ptr[0] = gBattleTypeFlags; ptr[1] = gRecordedBattleRngSeed; // UB: overwrites berry data - SendBlock(bitmask_all_link_players_but_self(), ptr, sizeof(gBattleStruct->multiBuffer.battleVideo)); + SendBlock(BitmaskAllOtherLinkPlayers(), ptr, sizeof(gBattleStruct->multiBuffer.battleVideo)); gBattleCommunication[MULTIUSE_STATE]++; } break; diff --git a/src/battle_tower.c b/src/battle_tower.c index 082ea6822f..f2ffd97a64 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -2575,7 +2575,7 @@ static void LoadLinkMultiOpponentsData(void) challengeNum = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode] / 7; if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), &challengeNum, sizeof(challengeNum)); + SendBlock(BitmaskAllOtherLinkPlayers(), &challengeNum, sizeof(challengeNum)); gSpecialVar_Result = 1; } } @@ -2612,7 +2612,7 @@ static void LoadLinkMultiOpponentsData(void) case 2: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), &gSaveBlock2Ptr->frontier.trainerIds, sizeof(gSaveBlock2Ptr->frontier.trainerIds)); + SendBlock(BitmaskAllOtherLinkPlayers(), &gSaveBlock2Ptr->frontier.trainerIds, sizeof(gSaveBlock2Ptr->frontier.trainerIds)); gSpecialVar_Result = 3; } break; diff --git a/src/berry_blender.c b/src/berry_blender.c index d47aa707dd..e84c2d5b30 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -1355,7 +1355,7 @@ static void CB2_StartBlenderLink(void) { ResetBlockReceivedFlags(); if (GetMultiplayerId() == 0) - SendBlockRequest(4); + SendBlockRequest(BLOCK_REQ_SIZE_40); sBerryBlender->mainState++; } break; diff --git a/src/cable_club.c b/src/cable_club.c index abe1d5d4dd..2fbe55f88a 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -185,9 +185,9 @@ static bool32 CheckLinkCanceled(u8 taskId) return FALSE; } -static bool32 sub_80B25CC(u8 taskId) +static bool32 CheckSioErrored(u8 taskId) { - if (GetSioMultiSI() == 1) + if (GetSioMultiSI() == TRUE) { gTasks[taskId].func = Task_LinkupConnectionError; return TRUE; @@ -196,12 +196,12 @@ static bool32 sub_80B25CC(u8 taskId) } // Unused -static void sub_80B2600(u8 taskId) +static void Task_DelayedBlockRequest(u8 taskId) { gTasks[taskId].data[0]++; if (gTasks[taskId].data[0] == 10) { - SendBlockRequest(2); + SendBlockRequest(BLOCK_REQ_SIZE_100); DestroyTask(taskId); } } @@ -252,7 +252,7 @@ static void Task_LinkupAwaitConnection(u8 taskId) static void Task_LinkupConfirmWhenReady(u8 taskId) { if (CheckLinkCanceledBeforeConnection(taskId) == TRUE - || sub_80B25CC(taskId) == TRUE + || CheckSioErrored(taskId) == TRUE || CheckLinkErrored(taskId) == TRUE) return; @@ -269,7 +269,7 @@ static void Task_LinkupAwaitConfirmation(u8 taskId) s32 linkPlayerCount = GetLinkPlayerCount_2(); if (CheckLinkCanceledBeforeConnection(taskId) == TRUE - || sub_80B25CC(taskId) == TRUE + || CheckSioErrored(taskId) == TRUE || CheckLinkErrored(taskId) == TRUE) return; @@ -291,7 +291,7 @@ static void Task_LinkupAwaitConfirmation(u8 taskId) static void Task_LinkupTryConfirmation(u8 taskId) { if (CheckLinkCanceledBeforeConnection(taskId) == TRUE - || sub_80B25CC(taskId) == TRUE + || CheckSioErrored(taskId) == TRUE || CheckLinkErrored(taskId) == TRUE) return; @@ -424,7 +424,7 @@ static void Task_LinkupCheckStatusAfterConfirm(u8 taskId) card->monSpecies[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES, NULL); card->monSpecies[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL); gTasks[taskId].func = Task_LinkupAwaitTrainerCardData; - SendBlockRequest(2); + SendBlockRequest(BLOCK_REQ_SIZE_100); } } @@ -1172,9 +1172,11 @@ static void CreateTask_StartWiredTrade(void) CreateTask(Task_StartWiredTrade, 80); } -void nullsub_37(void) +// Unused, implemented in Ruby/Sapphire +void Script_StartWiredTrade(void) { - + // CreateTask_StartWiredTrade(); + // ScriptContext1_Stop(); } void ColosseumPlayerSpotTriggered(void) @@ -1251,7 +1253,7 @@ void Task_WaitForLinkPlayerConnection(u8 taskId) #undef tTimer -static void sub_80B3AAC(u8 taskId) +static void Task_WaitExitToScript(u8 taskId) { if (!gReceivedRemoteLinkPlayers) { @@ -1261,10 +1263,10 @@ static void sub_80B3AAC(u8 taskId) } // Unused -static void sub_80B3AD0(u8 taskId) +static void ExitLinkToScript(u8 taskId) { SetCloseLinkCallback(); - gTasks[taskId].func = sub_80B3AAC; + gTasks[taskId].func = Task_WaitExitToScript; } #define tTimer data[1] diff --git a/src/contest_link.c b/src/contest_link.c index ae6975268f..4905fb8daf 100644 --- a/src/contest_link.c +++ b/src/contest_link.c @@ -22,7 +22,7 @@ static void Task_LinkContest_InitFlags(u8); bool32 LinkContest_SendBlock(void *src, u16 size) { memcpy(gDecompressionBuffer, src, size); - if (SendBlock(bitmask_all_link_players_but_self(), gDecompressionBuffer, size)) + if (SendBlock(BitmaskAllOtherLinkPlayers(), gDecompressionBuffer, size)) return TRUE; else return FALSE; @@ -162,7 +162,7 @@ void Task_LinkContest_CommunicateMonsRS(u8 taskId) // Only if leader. Request other players data if (++gTasks[taskId].tTimer > 300) { - SendBlockRequest(2); + SendBlockRequest(BLOCK_REQ_SIZE_100); gTasks[taskId].tState = 1; } break; @@ -238,7 +238,7 @@ void Task_LinkContest_CommunicateCategoryRS(u8 taskId) case 10: if (++gTasks[taskId].tTimer > 10) { - SendBlockRequest(2); + SendBlockRequest(BLOCK_REQ_SIZE_100); gTasks[taskId].tState = 1; } break; @@ -491,7 +491,7 @@ void Task_LinkContest_CommunicateLeaderIdsRS(u8 taskId) case 10: if (++gTasks[taskId].tTimer > 10) { - SendBlockRequest(2); + SendBlockRequest(BLOCK_REQ_SIZE_100); gTasks[taskId].tState = 1; } break; diff --git a/src/field_specials.c b/src/field_specials.c index 83857e1ffe..fd5760c3b0 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3779,7 +3779,7 @@ static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId) { // Send value of gSpecialVar_0x8004 to leader // Will either be BATTLE_TOWER_LINK_CONTINUE or BATTLE_TOWER_LINK_RETIRE - SendBlock(bitmask_all_link_players_but_self(), &gSpecialVar_0x8004, sizeof(gSpecialVar_0x8004)); + SendBlock(BitmaskAllOtherLinkPlayers(), &gSpecialVar_0x8004, sizeof(gSpecialVar_0x8004)); gTasks[taskId].tState++; } } @@ -3828,7 +3828,7 @@ static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId) else { // Send whether or not play should continue - SendBlock(bitmask_all_link_players_but_self(), &gSpecialVar_Result, sizeof(gSpecialVar_Result)); + SendBlock(BitmaskAllOtherLinkPlayers(), &gSpecialVar_Result, sizeof(gSpecialVar_Result)); gTasks[taskId].tState++; } } diff --git a/src/link.c b/src/link.c index c32ee07d26..39f6568de3 100644 --- a/src/link.c +++ b/src/link.c @@ -166,11 +166,11 @@ static const u16 sLinkTestDigitsGfx[] = INCBIN_U16("graphics/interface/link_test static const u8 sUnusedTransparentWhite[] = _("{HIGHLIGHT TRANSPARENT}{COLOR WHITE}"); static const u16 sCommErrorBg_Gfx[] = INCBIN_U16("graphics/interface/comm_error_bg.4bpp"); static const struct BlockRequest sBlockRequests[] = { - {gBlockSendBuffer, 200}, - {gBlockSendBuffer, 200}, - {gBlockSendBuffer, 100}, - {gBlockSendBuffer, 220}, - {gBlockSendBuffer, 40} + [BLOCK_REQ_SIZE_NONE] = {gBlockSendBuffer, 200}, + [BLOCK_REQ_SIZE_200] = {gBlockSendBuffer, 200}, + [BLOCK_REQ_SIZE_100] = {gBlockSendBuffer, 100}, + [BLOCK_REQ_SIZE_220] = {gBlockSendBuffer, 220}, + [BLOCK_REQ_SIZE_40] = {gBlockSendBuffer, 40} }; static const u8 sBGControlRegs[] = { REG_OFFSET_BG0CNT, @@ -1025,7 +1025,7 @@ u8 GetMultiplayerId(void) return SIO_MULTI_CNT->id; } -u8 bitmask_all_link_players_but_self(void) +u8 BitmaskAllOtherLinkPlayers(void) { u8 mpId; @@ -1727,12 +1727,12 @@ static void CB2_PrintErrorMessage(void) bool8 GetSioMultiSI(void) { - return (REG_SIOCNT & 0x04) != 0; + return (REG_SIOCNT & SIO_MULTI_SI) != 0; } static bool8 IsSioMultiMaster(void) { - return (REG_SIOCNT & 0x8) && !(REG_SIOCNT & 0x04); + return (REG_SIOCNT & SIO_MULTI_SD) && (REG_SIOCNT & SIO_MULTI_SI) == 0; } bool8 IsLinkConnectionEstablished(void) diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index b27694960c..ffa78b21d5 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -177,11 +177,11 @@ static const u8 sUnknown_082ED6A5[] = { }; static const struct BlockRequest sBlockRequests[] = { - { gBlockSendBuffer, 200 }, - { gBlockSendBuffer, 200 }, - { gBlockSendBuffer, 100 }, - { gBlockSendBuffer, 220 }, - { gBlockSendBuffer, 40 } + [BLOCK_REQ_SIZE_NONE] = { gBlockSendBuffer, 200 }, + [BLOCK_REQ_SIZE_200] = { gBlockSendBuffer, 200 }, + [BLOCK_REQ_SIZE_100] = { gBlockSendBuffer, 100 }, + [BLOCK_REQ_SIZE_220] = { gBlockSendBuffer, 220 }, + [BLOCK_REQ_SIZE_40] = { gBlockSendBuffer, 40 } }; static const u16 sAcceptedSerialNos[] = { @@ -1753,7 +1753,7 @@ static void sub_801084C(u8 taskId) { if (AreNoPlayersReceiving()) { - Rfu.blockRequestType = 0; + Rfu.blockRequestType = BLOCK_REQ_SIZE_NONE; RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_REQ); gTasks[taskId].data[0]++; } diff --git a/src/record_mixing.c b/src/record_mixing.c index aa6e4eef2a..2f551436e0 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -499,7 +499,7 @@ static void Task_SendPacket(u8 taskId) break; case 1: if (GetMultiplayerId() == 0) - SendBlockRequest(1); + SendBlockRequest(BLOCK_REQ_SIZE_200); task->data[0]++; break; case 2: diff --git a/src/trade.c b/src/trade.c index 78d7399fa3..da994011b7 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1008,9 +1008,7 @@ static bool8 BufferTradeParties(void) break; case 3: if (id == 0) - { - RequestLinkData(1); - } + RequestLinkData(BLOCK_REQ_SIZE_200); sTradeMenuData->bufferPartyState++; break; case 4: @@ -1027,9 +1025,7 @@ static bool8 BufferTradeParties(void) break; case 7: if (id == 0) - { - RequestLinkData(1); - } + RequestLinkData(BLOCK_REQ_SIZE_200); sTradeMenuData->bufferPartyState++; break; case 8: @@ -1046,9 +1042,7 @@ static bool8 BufferTradeParties(void) break; case 11: if (id == 0) - { - RequestLinkData(1); - } + RequestLinkData(BLOCK_REQ_SIZE_200); sTradeMenuData->bufferPartyState++; break; case 12: @@ -1065,9 +1059,7 @@ static bool8 BufferTradeParties(void) break; case 15: if (id == 0) - { - RequestLinkData(3); - } + RequestLinkData(BLOCK_REQ_SIZE_220); sTradeMenuData->bufferPartyState++; break; case 16: @@ -1084,9 +1076,7 @@ static bool8 BufferTradeParties(void) break; case 19: if (id == 0) - { - RequestLinkData(4); - } + RequestLinkData(BLOCK_REQ_SIZE_40); sTradeMenuData->bufferPartyState++; break; case 20: @@ -3096,7 +3086,7 @@ static void TrySendTradeFinishData(void) case 1: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), sTradeData->linkData, sizeof(sTradeData->linkData)); + SendBlock(BitmaskAllOtherLinkPlayers(), sTradeData->linkData, sizeof(sTradeData->linkData)); sTradeData->sendTradeFinishState++; } // fallthrough @@ -4632,7 +4622,7 @@ static void CB2_TryFinishTrade(void) && sTradeData->partnerLinkFlagFinishTrade == READY_FINISH_TRADE) { sTradeData->linkData[0] = LINKCMD_CONFIRM_FINISH_TRADE; - SendBlock(bitmask_all_link_players_but_self(), sTradeData->linkData, sizeof(sTradeData->linkData)); + SendBlock(BitmaskAllOtherLinkPlayers(), sTradeData->linkData, sizeof(sTradeData->linkData)); sTradeData->playerLinkFlagFinishTrade = FINISH_TRADE; sTradeData->partnerLinkFlagFinishTrade = FINISH_TRADE; } diff --git a/src/union_room.c b/src/union_room.c index d9242bf9c1..c2bc47aa4c 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1494,7 +1494,7 @@ static void Task_ExchangeCards(u8 taskId) { case 0: if (GetMultiplayerId() == 0) - SendBlockRequest(2); + SendBlockRequest(BLOCK_REQ_SIZE_100); gTasks[taskId].data[0]++; break; case 1: From 8f5e2bbebaae3857cbe95b40b0d889f73f7d80f0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 21 Aug 2021 11:04:28 -0400 Subject: [PATCH 005/417] Label swap line margin flag --- include/menu_helpers.h | 5 +---- src/battle_pyramid_bag.c | 2 +- src/item_menu_icons.c | 2 +- src/menu_helpers.c | 10 +++++++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/menu_helpers.h b/include/menu_helpers.h index 1434efcf3d..df71ce2521 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -7,7 +7,7 @@ #define MENU_L_PRESSED 1 #define MENU_R_PRESSED 2 -// Exported type declarations +#define SWAP_LINE_HAS_MARGIN (1 << 7) struct YesNoFuncTable { @@ -15,9 +15,6 @@ struct YesNoFuncTable TaskFunc noFunc; }; -// Exported RAM declarations - -// Exported ROM declarations void ResetVramOamAndBgCntRegs(void); void ResetAllBgsCoordinates(void); void SetVBlankHBlankCallbacksToNull(void); diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 83bf35090b..9cc65e14d6 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -1608,5 +1608,5 @@ static void SetSwapLineInvisibility(bool8 invisible) static void UpdateSwapLinePos(u8 y) { - UpdateSwapLineSpritesPos(&gPyramidBagMenu->spriteIds[PBAG_SPRITE_SWAP_LINE_START], NUM_SWAP_LINE_SPRITES | 0x80, 120, (y + 1) * 16); + UpdateSwapLineSpritesPos(&gPyramidBagMenu->spriteIds[PBAG_SPRITE_SWAP_LINE_START], NUM_SWAP_LINE_SPRITES | SWAP_LINE_HAS_MARGIN, 120, (y + 1) * 16); } diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index c8d1cd8d08..8bcf506fbf 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -559,7 +559,7 @@ void SetItemMenuSwapLineInvisibility(bool8 invisible) void UpdateItemMenuSwapLinePos(u8 y) { - UpdateSwapLineSpritesPos(&gBagMenu->spriteIds[ITEMMENUSPRITE_SWAP_LINE], ITEMMENU_SWAP_LINE_LENGTH | 0x80, 120, (y + 1) * 16); + UpdateSwapLineSpritesPos(&gBagMenu->spriteIds[ITEMMENUSPRITE_SWAP_LINE], ITEMMENU_SWAP_LINE_LENGTH | SWAP_LINE_HAS_MARGIN, 120, (y + 1) * 16); } static void sub_80D5018(void *mem0, void *mem1) diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 3e8148a42b..95b67f78c3 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -440,12 +440,16 @@ void SetSwapLineSpritesInvisibility(u8 *spriteIds, u8 count, bool8 invisible) void UpdateSwapLineSpritesPos(u8 *spriteIds, u8 count, s16 x, u16 y) { u8 i; - bool8 unknownBit = count & 0x80; - count &= ~(0x80); + bool8 hasMargin = count & SWAP_LINE_HAS_MARGIN; + count &= ~SWAP_LINE_HAS_MARGIN; for (i = 0; i < count; i++) { - if (i == count - 1 && unknownBit) + // If the list menu has a right margin, the swap line + // shouldn't extend all the way to the edge of the screen. + // If this is the last sprite in the line, move it a bit + // to the left to keep it out of the margin. + if (i == count - 1 && hasMargin) gSprites[spriteIds[i]].x2 = x - 8; else gSprites[spriteIds[i]].x2 = x; From 554210c5e315e786ddc6eef888e9ff6065ad73f8 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 24 Aug 2021 19:59:32 -0300 Subject: [PATCH 006/417] Removed trailing spaces in the most relevant files Command used for the job: egrep -rl ' $' --include *.c --include *.h --include *.s --include *.inc --include *.txt * | xargs sed -i 's/\s\+$//g' Credits to Grant Murphy from Stack Overflow. --- asm/macros/battle_frontier/apprentice.inc | 6 +- asm/macros/battle_frontier/battle_factory.inc | 2 +- asm/macros/battle_frontier/battle_palace.inc | 2 +- asm/macros/battle_frontier/battle_pyramid.inc | 12 +- asm/macros/battle_tent.inc | 18 +- asm/macros/event.inc | 60 +- data/contest_ai_scripts.s | 6 +- data/maps/BattleFrontier_Lounge2/scripts.inc | 2 +- data/maps/DewfordTown/scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/LilycoveCity_Harbor/scripts.inc | 2 +- data/maps/Route104/scripts.inc | 2 +- data/maps/Route109/scripts.inc | 2 +- data/maps/VictoryRoad_1F/scripts.inc | 2 +- data/scripts/berry_blender.inc | 2 +- gflib/io_reg.c | 4 +- gflib/sprite.c | 8 +- gflib/string_util.c | 22 +- gflib/text.h | 4 +- include/constants/battle_dome.h | 2 +- include/constants/battle_frontier_trainers.h | 2 +- include/constants/battle_pyramid.h | 2 +- include/constants/field_effects.h | 2 +- include/constants/flags.h | 26 +- include/constants/item_effects.h | 2 +- include/constants/lilycove_lady.h | 4 +- include/constants/map_scripts.h | 2 +- include/constants/metatile_labels.h | 4 +- include/constants/party_menu.h | 16 +- include/constants/pokemon.h | 2 +- include/constants/script_menu.h | 6 +- include/constants/songs.h | 2 +- include/constants/tv.h | 2 +- include/constants/vars.h | 2 +- include/constants/weather.h | 2 +- include/event_scripts.h | 74 +- include/global.fieldmap.h | 2 +- include/global.h | 4 +- include/librfu.h | 14 +- include/link.h | 4 +- include/overworld.h | 2 +- include/pokeball.h | 2 +- include/pokemon_storage_system.h | 4 +- include/strings.h | 72 +- include/trainer_hill.h | 10 +- sound/cry_tables.inc | 1552 +++++++-------- sound/songs/se_m_absorb.s | 2 +- sound/songs/se_m_absorb_2.s | 20 +- sound/songs/se_m_acid_armor.s | 30 +- sound/songs/se_m_attract2.s | 6 +- sound/songs/se_m_bite.s | 6 +- sound/songs/se_m_bonemerang.s | 10 +- sound/songs/se_m_brick_break.s | 10 +- sound/songs/se_m_bubble.s | 2 +- sound/songs/se_m_bubble3.s | 2 +- sound/songs/se_m_charm.s | 2 +- sound/songs/se_m_confuse_ray.s | 4 +- sound/songs/se_m_cosmic_power.s | 20 +- sound/songs/se_m_detect.s | 8 +- sound/songs/se_m_dig.s | 2 +- sound/songs/se_m_dive.s | 4 +- sound/songs/se_m_dizzy_punch.s | 2 +- sound/songs/se_m_dragon_rage.s | 10 +- sound/songs/se_m_earthquake.s | 36 +- sound/songs/se_m_encore2.s | 2 +- sound/songs/se_m_explosion.s | 12 +- sound/songs/se_m_flamethrower.s | 2 +- sound/songs/se_m_flatter.s | 4 +- sound/songs/se_m_grasswhistle.s | 12 +- sound/songs/se_m_hail.s | 14 +- sound/songs/se_m_haze.s | 18 +- sound/songs/se_m_heal_bell.s | 4 +- sound/songs/se_m_heat_wave.s | 2 +- sound/songs/se_m_hydro_pump.s | 2 +- sound/songs/se_m_hyper_beam.s | 18 +- sound/songs/se_m_hyper_beam2.s | 18 +- sound/songs/se_m_icy_wind.s | 6 +- sound/songs/se_m_lock_on.s | 2 +- sound/songs/se_m_milk_drink.s | 2 +- sound/songs/se_m_minimize.s | 2 +- sound/songs/se_m_moonlight.s | 50 +- sound/songs/se_m_morning_sun.s | 2 +- sound/songs/se_m_nightmare.s | 34 +- sound/songs/se_m_petal_dance.s | 8 +- sound/songs/se_m_rain_dance.s | 2 +- sound/songs/se_m_reversal.s | 22 +- sound/songs/se_m_sacred_fire.s | 6 +- sound/songs/se_m_sand_tomb.s | 14 +- sound/songs/se_m_sandstorm.s | 20 +- sound/songs/se_m_self_destruct.s | 4 +- sound/songs/se_m_sing.s | 4 +- sound/songs/se_m_sketch.s | 4 +- sound/songs/se_m_sky_uppercut.s | 6 +- sound/songs/se_m_snore.s | 18 +- sound/songs/se_m_solar_beam.s | 2 +- sound/songs/se_m_spit_up.s | 4 +- sound/songs/se_m_stat_decrease.s | 82 +- sound/songs/se_m_stat_increase.s | 82 +- sound/songs/se_m_strength.s | 4 +- sound/songs/se_m_string_shot2.s | 12 +- sound/songs/se_m_supersonic.s | 2 +- sound/songs/se_m_sweet_scent.s | 4 +- sound/songs/se_m_swift.s | 2 +- sound/songs/se_m_teleport.s | 2 +- sound/songs/se_m_thunder_wave.s | 8 +- sound/songs/se_m_toxic.s | 14 +- sound/songs/se_m_tri_attack.s | 12 +- sound/songs/se_m_tri_attack2.s | 2 +- sound/songs/se_m_twister.s | 4 +- sound/songs/se_m_vital_throw.s | 6 +- sound/songs/se_m_vital_throw2.s | 8 +- sound/songs/se_m_waterfall.s | 8 +- sound/songs/se_m_whirlpool.s | 2 +- sound/songs/se_win_open.s | 2 +- sound/voicegroups/voicegroup000.inc | 124 +- sound/voicegroups/voicegroup001.inc | 58 +- sound/voicegroups/voicegroup002.inc | 108 +- sound/voicegroups/voicegroup003.inc | 108 +- sound/voicegroups/voicegroup004.inc | 180 +- sound/voicegroups/voicegroup005.inc | 8 +- sound/voicegroups/voicegroup006.inc | 6 +- sound/voicegroups/voicegroup007.inc | 262 +-- sound/voicegroups/voicegroup008.inc | 4 +- sound/voicegroups/voicegroup009.inc | 4 +- sound/voicegroups/voicegroup010.inc | 168 +- sound/voicegroups/voicegroup011.inc | 256 +-- sound/voicegroups/voicegroup012.inc | 204 +- sound/voicegroups/voicegroup013.inc | 180 +- sound/voicegroups/voicegroup014.inc | 170 +- sound/voicegroups/voicegroup015.inc | 184 +- sound/voicegroups/voicegroup016.inc | 130 +- sound/voicegroups/voicegroup017.inc | 182 +- sound/voicegroups/voicegroup018.inc | 256 +-- sound/voicegroups/voicegroup019.inc | 170 +- sound/voicegroups/voicegroup020.inc | 174 +- sound/voicegroups/voicegroup021.inc | 102 +- sound/voicegroups/voicegroup022.inc | 130 +- sound/voicegroups/voicegroup023.inc | 178 +- sound/voicegroups/voicegroup024.inc | 182 +- sound/voicegroups/voicegroup025.inc | 168 +- sound/voicegroups/voicegroup026.inc | 170 +- sound/voicegroups/voicegroup027.inc | 256 +-- sound/voicegroups/voicegroup028.inc | 166 +- sound/voicegroups/voicegroup029.inc | 176 +- sound/voicegroups/voicegroup030.inc | 110 +- sound/voicegroups/voicegroup031.inc | 130 +- sound/voicegroups/voicegroup032.inc | 256 +-- sound/voicegroups/voicegroup033.inc | 166 +- sound/voicegroups/voicegroup034.inc | 168 +- sound/voicegroups/voicegroup035.inc | 170 +- sound/voicegroups/voicegroup036.inc | 256 +-- sound/voicegroups/voicegroup037.inc | 178 +- sound/voicegroups/voicegroup038.inc | 164 +- sound/voicegroups/voicegroup039.inc | 256 +-- sound/voicegroups/voicegroup040.inc | 256 +-- sound/voicegroups/voicegroup041.inc | 256 +-- sound/voicegroups/voicegroup042.inc | 256 +-- sound/voicegroups/voicegroup043.inc | 162 +- sound/voicegroups/voicegroup044.inc | 162 +- sound/voicegroups/voicegroup045.inc | 256 +-- sound/voicegroups/voicegroup046.inc | 256 +-- sound/voicegroups/voicegroup047.inc | 256 +-- sound/voicegroups/voicegroup048.inc | 176 +- sound/voicegroups/voicegroup049.inc | 256 +-- sound/voicegroups/voicegroup050.inc | 256 +-- sound/voicegroups/voicegroup051.inc | 148 +- sound/voicegroups/voicegroup052.inc | 256 +-- sound/voicegroups/voicegroup053.inc | 256 +-- sound/voicegroups/voicegroup054.inc | 256 +-- sound/voicegroups/voicegroup055.inc | 256 +-- sound/voicegroups/voicegroup056.inc | 256 +-- sound/voicegroups/voicegroup057.inc | 256 +-- sound/voicegroups/voicegroup058.inc | 256 +-- sound/voicegroups/voicegroup059.inc | 178 +- sound/voicegroups/voicegroup060.inc | 256 +-- sound/voicegroups/voicegroup061.inc | 256 +-- sound/voicegroups/voicegroup062.inc | 256 +-- sound/voicegroups/voicegroup063.inc | 256 +-- sound/voicegroups/voicegroup064.inc | 256 +-- sound/voicegroups/voicegroup065.inc | 256 +-- sound/voicegroups/voicegroup066.inc | 256 +-- sound/voicegroups/voicegroup067.inc | 256 +-- sound/voicegroups/voicegroup068.inc | 256 +-- sound/voicegroups/voicegroup069.inc | 256 +-- sound/voicegroups/voicegroup070.inc | 256 +-- sound/voicegroups/voicegroup071.inc | 256 +-- sound/voicegroups/voicegroup072.inc | 256 +-- sound/voicegroups/voicegroup073.inc | 256 +-- sound/voicegroups/voicegroup074.inc | 256 +-- sound/voicegroups/voicegroup075.inc | 256 +-- sound/voicegroups/voicegroup076.inc | 256 +-- sound/voicegroups/voicegroup077.inc | 256 +-- sound/voicegroups/voicegroup078.inc | 256 +-- sound/voicegroups/voicegroup079.inc | 256 +-- sound/voicegroups/voicegroup080.inc | 256 +-- sound/voicegroups/voicegroup081.inc | 4 +- sound/voicegroups/voicegroup082.inc | 256 +-- sound/voicegroups/voicegroup083.inc | 168 +- sound/voicegroups/voicegroup084.inc | 256 +-- sound/voicegroups/voicegroup085.inc | 256 +-- sound/voicegroups/voicegroup086.inc | 256 +-- sound/voicegroups/voicegroup087.inc | 256 +-- sound/voicegroups/voicegroup088.inc | 256 +-- sound/voicegroups/voicegroup089.inc | 256 +-- sound/voicegroups/voicegroup090.inc | 256 +-- sound/voicegroups/voicegroup091.inc | 256 +-- sound/voicegroups/voicegroup092.inc | 256 +-- sound/voicegroups/voicegroup093.inc | 256 +-- sound/voicegroups/voicegroup094.inc | 256 +-- sound/voicegroups/voicegroup095.inc | 256 +-- sound/voicegroups/voicegroup096.inc | 256 +-- sound/voicegroups/voicegroup097.inc | 256 +-- sound/voicegroups/voicegroup098.inc | 256 +-- sound/voicegroups/voicegroup099.inc | 256 +-- sound/voicegroups/voicegroup100.inc | 256 +-- sound/voicegroups/voicegroup101.inc | 220 +-- sound/voicegroups/voicegroup102.inc | 164 +- sound/voicegroups/voicegroup103.inc | 256 +-- sound/voicegroups/voicegroup104.inc | 216 +-- sound/voicegroups/voicegroup105.inc | 166 +- sound/voicegroups/voicegroup106.inc | 256 +-- sound/voicegroups/voicegroup107.inc | 256 +-- sound/voicegroups/voicegroup108.inc | 256 +-- sound/voicegroups/voicegroup109.inc | 166 +- sound/voicegroups/voicegroup110.inc | 256 +-- sound/voicegroups/voicegroup111.inc | 256 +-- sound/voicegroups/voicegroup112.inc | 256 +-- sound/voicegroups/voicegroup113.inc | 256 +-- sound/voicegroups/voicegroup114.inc | 256 +-- sound/voicegroups/voicegroup115.inc | 256 +-- sound/voicegroups/voicegroup116.inc | 256 +-- sound/voicegroups/voicegroup117.inc | 164 +- sound/voicegroups/voicegroup118.inc | 182 +- sound/voicegroups/voicegroup119.inc | 182 +- sound/voicegroups/voicegroup120.inc | 182 +- sound/voicegroups/voicegroup121.inc | 172 +- sound/voicegroups/voicegroup122.inc | 168 +- sound/voicegroups/voicegroup123.inc | 256 +-- sound/voicegroups/voicegroup124.inc | 174 +- sound/voicegroups/voicegroup125.inc | 168 +- sound/voicegroups/voicegroup126.inc | 256 +-- sound/voicegroups/voicegroup127.inc | 256 +-- sound/voicegroups/voicegroup128.inc | 258 +-- sound/voicegroups/voicegroup129.inc | 256 +-- sound/voicegroups/voicegroup130.inc | 358 ++-- sound/voicegroups/voicegroup131.inc | 256 +-- sound/voicegroups/voicegroup132.inc | 256 +-- sound/voicegroups/voicegroup133.inc | 256 +-- sound/voicegroups/voicegroup134.inc | 180 +- sound/voicegroups/voicegroup135.inc | 166 +- sound/voicegroups/voicegroup136.inc | 256 +-- sound/voicegroups/voicegroup137.inc | 256 +-- sound/voicegroups/voicegroup138.inc | 256 +-- sound/voicegroups/voicegroup139.inc | 256 +-- sound/voicegroups/voicegroup140.inc | 8 +- sound/voicegroups/voicegroup141.inc | 256 +-- sound/voicegroups/voicegroup142.inc | 168 +- sound/voicegroups/voicegroup143.inc | 256 +-- sound/voicegroups/voicegroup144.inc | 256 +-- sound/voicegroups/voicegroup145.inc | 256 +-- sound/voicegroups/voicegroup146.inc | 256 +-- sound/voicegroups/voicegroup147.inc | 168 +- sound/voicegroups/voicegroup148.inc | 256 +-- sound/voicegroups/voicegroup149.inc | 186 +- sound/voicegroups/voicegroup150.inc | 256 +-- sound/voicegroups/voicegroup151.inc | 176 +- sound/voicegroups/voicegroup152.inc | 256 +-- sound/voicegroups/voicegroup153.inc | 256 +-- sound/voicegroups/voicegroup154.inc | 186 +- sound/voicegroups/voicegroup155.inc | 256 +-- sound/voicegroups/voicegroup156.inc | 256 +-- sound/voicegroups/voicegroup157.inc | 256 +-- sound/voicegroups/voicegroup158.inc | 256 +-- sound/voicegroups/voicegroup159.inc | 256 +-- sound/voicegroups/voicegroup160.inc | 176 +- sound/voicegroups/voicegroup161.inc | 256 +-- sound/voicegroups/voicegroup162.inc | 186 +- sound/voicegroups/voicegroup163.inc | 256 +-- sound/voicegroups/voicegroup164.inc | 256 +-- sound/voicegroups/voicegroup165.inc | 256 +-- sound/voicegroups/voicegroup166.inc | 256 +-- sound/voicegroups/voicegroup167.inc | 256 +-- sound/voicegroups/voicegroup168.inc | 256 +-- sound/voicegroups/voicegroup169.inc | 256 +-- sound/voicegroups/voicegroup170.inc | 168 +- sound/voicegroups/voicegroup171.inc | 182 +- sound/voicegroups/voicegroup172.inc | 256 +-- sound/voicegroups/voicegroup173.inc | 256 +-- sound/voicegroups/voicegroup174.inc | 314 +-- sound/voicegroups/voicegroup175.inc | 104 +- sound/voicegroups/voicegroup176.inc | 96 +- sound/voicegroups/voicegroup177.inc | 180 +- sound/voicegroups/voicegroup178.inc | 176 +- sound/voicegroups/voicegroup179.inc | 176 +- sound/voicegroups/voicegroup180.inc | 256 +-- sound/voicegroups/voicegroup181.inc | 94 +- sound/voicegroups/voicegroup182.inc | 176 +- sound/voicegroups/voicegroup183.inc | 256 +-- sound/voicegroups/voicegroup184.inc | 172 +- sound/voicegroups/voicegroup185.inc | 256 +-- sound/voicegroups/voicegroup186.inc | 256 +-- sound/voicegroups/voicegroup187.inc | 256 +-- sound/voicegroups/voicegroup188.inc | 256 +-- sound/voicegroups/voicegroup189.inc | 184 +- sound/voicegroups/voicegroup190.inc | 176 +- src/apprentice.c | 10 +- src/battle_ai_switch_items.c | 2 +- src/battle_anim_effects_2.c | 2 +- src/battle_anim_electric.c | 2 +- src/battle_anim_fire.c | 6 +- src/battle_anim_flying.c | 2 +- src/battle_anim_ground.c | 2 +- src/battle_anim_normal.c | 6 +- src/battle_anim_psychic.c | 6 +- src/battle_anim_smokescreen.c | 58 +- src/battle_anim_sound_tasks.c | 4 +- src/battle_anim_status_effects.c | 38 +- src/battle_anim_throw.c | 8 +- src/battle_anim_water.c | 2 +- src/battle_controller_opponent.c | 30 +- src/battle_controller_player.c | 8 +- src/battle_controller_recorded_opponent.c | 4 +- src/battle_controller_wally.c | 4 +- src/battle_dome.c | 2 +- src/battle_factory.c | 12 +- src/battle_factory_screen.c | 10 +- src/battle_gfx_sfx_util.c | 4 +- src/battle_interface.c | 288 +-- src/battle_main.c | 6 +- src/battle_message.c | 4 +- src/battle_palace.c | 30 +- src/battle_pyramid_bag.c | 14 +- src/battle_script_commands.c | 14 +- src/battle_setup.c | 28 +- src/battle_tower.c | 6 +- src/battle_tv.c | 580 +++--- src/battle_util.c | 12 +- src/berry_blender.c | 62 +- src/berry_crush.c | 304 +-- src/berry_fix_program.c | 94 +- src/berry_powder.c | 84 +- src/bike.c | 2 +- src/cable_car.c | 4 +- src/cable_club.c | 12 +- src/contest.c | 22 +- src/contest_ai.c | 4 +- src/contest_effect.c | 6 +- src/contest_link.c | 4 +- src/contest_link_util.c | 10 +- src/contest_util.c | 8 +- src/credits.c | 14 +- src/crt0.s | 2 +- src/data/battle_frontier/apprentice.h | 18 +- .../battle_frontier_exchange_corner.h | 82 +- .../battle_frontier_trainer_mons.h | 796 ++++---- src/data/battle_frontier/battle_tent.h | 192 +- src/data/battle_frontier/trainer_hill.h | 544 +++--- src/data/contest_opponents.h | 8 +- src/data/contest_text_tables.h | 2 +- src/data/decoration/header.h | 240 +-- src/data/decoration/icon.h | 2 +- src/data/field_effects/field_effect_objects.h | 28 +- src/data/graphics/rayquaza_scene.h | 2 +- src/data/lilycove_lady.h | 4 +- src/data/object_events/object_event_anims.h | 2 +- .../object_events/object_event_subsprites.h | 1722 ++++++++--------- src/data/party_menu.h | 34 +- src/data/region_map/city_map_entries.h | 2 +- src/data/script_menu.h | 42 +- src/data/text/gift_ribbon_descriptions.h | 2 +- src/data/text/match_call_messages.h | 2 +- src/data/text/nature_names.h | 2 +- src/data/text/ribbon_descriptions.h | 2 +- src/data/trade.h | 58 +- src/data/union_room.h | 96 +- src/daycare.c | 2 +- src/dewford_trend.c | 28 +- src/dodrio_berry_picking.c | 258 +-- src/easy_chat.c | 26 +- src/ereader_helpers.c | 2 +- src/ereader_screen.c | 2 +- src/event_object_movement.c | 6 +- src/evolution_scene.c | 2 +- src/field_door.c | 6 +- src/field_effect.c | 94 +- src/field_effect_helpers.c | 28 +- src/field_message_box.c | 2 +- src/field_player_avatar.c | 16 +- src/field_special_scene.c | 8 +- src/field_specials.c | 330 ++-- src/field_weather.c | 4 +- src/fldeff_escalator.c | 4 +- src/frontier_pass.c | 12 +- src/frontier_util.c | 2 +- src/hall_of_fame.c | 50 +- src/image_processing_effects.c | 6 +- src/intro.c | 22 +- src/intro_credits_graphics.c | 4 +- src/item_menu.c | 36 +- src/item_use.c | 2 +- src/librfu_rfu.c | 2 +- src/librfu_stwi.c | 6 +- src/lilycove_lady.c | 8 +- src/link.c | 8 +- src/link_rfu_2.c | 20 +- src/link_rfu_3.c | 296 +-- src/mail.c | 164 +- src/main_menu.c | 36 +- src/match_call.c | 14 +- src/mauville_old_man.c | 216 +-- src/menu.c | 10 +- src/menu_helpers.c | 2 +- src/metatile_behavior.c | 6 +- src/minigame_countdown.c | 2 +- src/mirage_tower.c | 8 +- src/move_relearner.c | 24 +- src/naming_screen.c | 280 +-- src/overworld.c | 8 +- src/palette.c | 8 +- src/palette_util.c | 6 +- src/player_pc.c | 18 +- src/pokeblock.c | 6 +- src/pokeblock_feed.c | 10 +- src/pokedex.c | 2 +- src/pokedex_area_screen.c | 2 +- src/pokedex_cry_screen.c | 6 +- src/pokemon.c | 8 +- src/pokemon_animation.c | 4 +- src/pokemon_icon.c | 6 +- src/pokemon_jump.c | 82 +- src/pokemon_storage_system.c | 34 +- src/pokenav.c | 30 +- src/pokenav_conditions_1.c | 2 +- src/pokenav_conditions_2.c | 10 +- src/pokenav_conditions_3.c | 6 +- src/pokenav_match_call_1.c | 10 +- src/pokenav_match_call_2.c | 24 +- src/pokenav_match_call_data.c | 60 +- src/pokenav_match_call_ui.c | 8 +- src/pokenav_menu_handler_2.c | 14 +- src/pokenav_region_map.c | 14 +- src/pokenav_ribbons_2.c | 6 +- src/post_battle_event_funcs.c | 2 +- src/rayquaza_scene.c | 2 +- src/record_mixing.c | 2 +- src/reset_rtc_screen.c | 40 +- src/rotating_tile_puzzle.c | 6 +- src/roulette.c | 30 +- src/scrcmd.c | 4 +- src/script_movement.c | 2 +- src/secret_base.c | 28 +- src/slot_machine.c | 1112 +++++------ src/start_menu.c | 12 +- src/strings.c | 2 +- src/title_screen.c | 2 +- src/trade.c | 20 +- src/trainer_card.c | 28 +- src/trainer_hill.c | 12 +- src/tv.c | 130 +- src/union_room.c | 44 +- src/union_room_battle.c | 2 +- src/union_room_chat.c | 228 +-- src/union_room_player_avatar.c | 50 +- src/use_pokeblock.c | 14 +- src/wireless_communication_status_screen.c | 6 +- tools/gbagfx/rl.c | 2 +- 466 files changed, 26928 insertions(+), 26928 deletions(-) diff --git a/asm/macros/battle_frontier/apprentice.inc b/asm/macros/battle_frontier/apprentice.inc index 5d9ab8e3b9..83871880b6 100644 --- a/asm/macros/battle_frontier/apprentice.inc +++ b/asm/macros/battle_frontier/apprentice.inc @@ -53,7 +53,7 @@ special CallApprenticeFunction .endm - @ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason + @ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason .macro apprentice_shouldcheckgone setvar VAR_0x8004, APPRENTICE_FUNC_CHECK_GONE special CallApprenticeFunction @@ -109,7 +109,7 @@ special CallApprenticeFunction .endm - @ Set which mon the Apprentice should lead with + @ Set which mon the Apprentice should lead with .macro apprentice_setleadmon monId:req copyvar VAR_0x8005, \monId setvar VAR_0x8004, APPRENTICE_FUNC_SET_LEAD_MON @@ -141,7 +141,7 @@ special CallApprenticeFunction .endm - @ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason + @ Always returns TRUE. No side effect. May have been for debug or dummied for some other reason .macro apprentice_shouldleave setvar VAR_0x8004, APPRENTICE_FUNC_SHOULD_LEAVE special CallApprenticeFunction diff --git a/asm/macros/battle_frontier/battle_factory.inc b/asm/macros/battle_frontier/battle_factory.inc index 684eeb98dc..2d49d44668 100644 --- a/asm/macros/battle_frontier/battle_factory.inc +++ b/asm/macros/battle_frontier/battle_factory.inc @@ -88,7 +88,7 @@ .endm @ Return the FACTORY_STYLE_* dependent on what types of moves the opponents team has, or FACTORY_NUM_STYLES if multiple styles tie for the same amount of moves - .macro factory_getopponentstyle + .macro factory_getopponentstyle setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE special CallBattleFactoryFunction .endm diff --git a/asm/macros/battle_frontier/battle_palace.inc b/asm/macros/battle_frontier/battle_palace.inc index f326c11546..37c80467a7 100644 --- a/asm/macros/battle_frontier/battle_palace.inc +++ b/asm/macros/battle_frontier/battle_palace.inc @@ -31,7 +31,7 @@ special CallBattlePalaceFunction .endm - @ Buffer the opponents intro speech to gStringVar4. Also used by Battle Arena and Factory + @ Buffer the opponents intro speech to gStringVar4. Also used by Battle Arena and Factory .macro palace_getopponentintro setvar VAR_0x8004, BATTLE_PALACE_FUNC_GET_OPPONENT_INTRO special CallBattlePalaceFunction diff --git a/asm/macros/battle_frontier/battle_pyramid.inc b/asm/macros/battle_frontier/battle_pyramid.inc index f8141e2dd6..bb5069f18a 100644 --- a/asm/macros/battle_frontier/battle_pyramid.inc +++ b/asm/macros/battle_frontier/battle_pyramid.inc @@ -1,7 +1,7 @@ @ Initialize the Battle Pyramid challenge .macro pyramid_init setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT - special CallBattlePyramidFunction + special CallBattlePyramidFunction .endm @ Get the value of some PYRAMID_DATA_*. See GetBattlePyramidData for the data types that can be retrieved @@ -59,7 +59,7 @@ @ Set the facility trainers to gBattleFrontierTrainers .macro pyramid_settrainers setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_TRAINERS - special CallBattlePyramidFunction + special CallBattlePyramidFunction .endm @ Show the post-battle hint text @@ -68,11 +68,11 @@ special CallBattlePyramidFunction .endm - @ VAR_RESULT is 1 if player is on a Pyramid floor, 2 if on the Pyramid peak, 0 otherwise + @ VAR_RESULT is 1 if player is on a Pyramid floor, 2 if on the Pyramid peak, 0 otherwise .macro pyramid_inchallenge setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN special CallBattlePyramidFunction - .endm + .endm @ Update the light around the player. 2 different modes, for setting or incrementing light. See PYRAMID_LIGHT_* .macro pyramid_updatelight radius:req, mode:req, sound=0xFFFF @@ -83,7 +83,7 @@ setvar VAR_0x8007, \sound .endif special CallBattlePyramidFunction - .endm + .endm @ Reset the held items to what they were at the start of the challenge .macro pyramid_clearhelditems @@ -100,5 +100,5 @@ @ Reset sketched moves and update the party order in the saveblock .macro pyramid_resetparty setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY - special CallBattlePyramidFunction + special CallBattlePyramidFunction .endm diff --git a/asm/macros/battle_tent.inc b/asm/macros/battle_tent.inc index 663d1d344d..142457ed98 100644 --- a/asm/macros/battle_tent.inc +++ b/asm/macros/battle_tent.inc @@ -26,7 +26,7 @@ special CallVerdanturfTentFunction .endm - @ Buffers the opponents intro speech to STR_VAR_4. Despite being a Verdanturf Tent function, it serves the same purpose for all 3 tents. + @ Buffers the opponents intro speech to STR_VAR_4. Despite being a Verdanturf Tent function, it serves the same purpose for all 3 tents. .macro battletent_getopponentintro setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GET_OPPONENT_INTRO special CallVerdanturfTentFunction @@ -36,7 +36,7 @@ .macro verdanturftent_save challengeStatus:req setvar VAR_0x8004, VERDANTURF_TENT_FUNC_SAVE setvar VAR_0x8005, \challengeStatus - special CallVerdanturfTentFunction + special CallVerdanturfTentFunction .endm @ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item @@ -49,7 +49,7 @@ .macro verdanturftent_giveprize setvar VAR_0x8004, VERDANTURF_TENT_FUNC_GIVE_PRIZE special CallVerdanturfTentFunction - .endm + .endm @ Fallarbor Tent @@ -79,7 +79,7 @@ setvar VAR_0x8004, FALLARBOR_TENT_FUNC_SAVE setvar VAR_0x8005, \challengeStatus special CallFallarborTentFunction - .endm + .endm @ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item .macro fallarbortent_setrandomprize @@ -97,7 +97,7 @@ .macro fallarbortent_getopponentname setvar VAR_0x8004, FALLARBOR_TENT_FUNC_GET_OPPONENT_NAME special CallFallarborTentFunction - .endm + .endm @ Slateport Tent @@ -127,15 +127,15 @@ setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SAVE setvar VAR_0x8005, \challengeStatus special CallSlateportTentFunction - .endm + .endm - @ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item + @ Set the prize item as randomly selected from a list. Randomness unnecessary, as the list is only 1 item .macro slateporttent_setrandomprize setvar VAR_0x8004, SLATEPORT_TENT_FUNC_SET_RANDOM_PRIZE special CallSlateportTentFunction .endm - @ Give the current prize item. FALSE if no room for prize + @ Give the current prize item. FALSE if no room for prize .macro slateporttent_giveprize setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GIVE_PRIZE special CallSlateportTentFunction @@ -157,7 +157,7 @@ .macro slateporttent_generateopponentmons setvar VAR_0x8004, SLATEPORT_TENT_FUNC_GENERATE_OPPONENT_MONS special CallSlateportTentFunction - .endm + .endm @ Slateport Tent's version of factory_generaterentalmons .macro slateporttent_generaterentalmons diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 73aef33b58..480684ef6e 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -274,8 +274,8 @@ .2byte \functionId .endm - @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific - @ commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock + @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific + @ commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock @ state, the script will remain blocked indefinitely (essentially a hang). .macro waitstate .byte 0x27 @@ -317,7 +317,7 @@ .byte 0x2d .endm - @ Sets the values of variables 0x8000, 0x8001, and 0x8002 to the current hour, minute, and second. In FRLG, + @ Sets the values of variables 0x8000, 0x8001, and 0x8002 to the current hour, minute, and second. In FRLG, @ this command sets those variables to zero. .macro gettime .byte 0x2e @@ -382,7 +382,7 @@ .byte \speed .endm - @ Sends the player to Warp warp on Map bank.map. If the specified warp is 0xFF, + @ Sends the player to Warp warp on Map bank.map. If the specified warp is 0xFF, @ then the player will instead be sent to (X, Y) on the map. .macro warp map:req, warp:req, X:req, Y:req .byte 0x39 @@ -434,7 +434,7 @@ .2byte \Y .endm - @ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to. + @ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to. @ Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). .macro setdynamicwarp map:req, warp:req, X:req, Y:req .byte 0x3f @@ -474,7 +474,7 @@ .byte 0x43 .endm - @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and + @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and @ VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE. .macro additem index:req, quantity=1 .byte 0x44 @@ -489,7 +489,7 @@ .2byte \quantity .endm - @ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to + @ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to @ TRUE if there is room, or FALSE is there is no room. .macro checkitemspace index:req, quantity:req .byte 0x46 @@ -505,7 +505,7 @@ .2byte \quantity .endm - @ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. + @ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. @ This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE). .macro checkitemtype index:req .byte 0x48 @@ -544,7 +544,7 @@ .2byte \decoration .endm - @ Checks if the player has enough space in their PC to hold decoration. Sets VAR_RESULT to TRUE if there is room, or + @ Checks if the player has enough space in their PC to hold decoration. Sets VAR_RESULT to TRUE if there is room, or @ FALSE is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.) .macro checkdecorspace decoration:req .byte 0x4e @@ -567,9 +567,9 @@ .endif .endm - @ Blocks script execution until the movements being applied to the specified (index) Object finish. - @ If the specified Object is 0x0000, then the command will block script execution until all Objects - @ affected by applymovement finish their movements. If the specified Object is not currently being + @ Blocks script execution until the movements being applied to the specified (index) Object finish. + @ If the specified Object is 0x0000, then the command will block script execution until all Objects + @ affected by applymovement finish their movements. If the specified Object is not currently being @ manipulated with applymovement, then this command does nothing. @ If no map is specified, then the current map is used. .macro waitmovement index:req, map @@ -583,8 +583,8 @@ .endif .endm - @ Attempts to hide the specified (index) Object on the specified (map_group, map_num) map, - @ by setting its visibility flag if it has a valid one. If the Object does not have a valid + @ Attempts to hide the specified (index) Object on the specified (map_group, map_num) map, + @ by setting its visibility flag if it has a valid one. If the Object does not have a valid @ visibility flag, this command does nothing. @ If no map is specified, then the current map is used. .macro removeobject index:req, map @@ -598,7 +598,7 @@ .endif .endm - @ Unsets the specified (index) Object's visibility flag on the specified (map_group, map_num) map if it has a valid one. + @ Unsets the specified (index) Object's visibility flag on the specified (map_group, map_num) map if it has a valid one. @ If the Object does not have a valid visibility flag, this command does nothing. @ If no map is specified, then the current map is used. .macro addobject index:req, map @@ -740,7 +740,7 @@ .endm - @ Starts a trainer battle using the battle information stored in RAM (usually by trainerbattle, which actually calls this + @ Starts a trainer battle using the battle information stored in RAM (usually by trainerbattle, which actually calls this @ command behind-the-scenes), and blocks script execution until the battle finishes. .macro trainerbattlebegin .byte 0x5d @@ -781,7 +781,7 @@ .2byte \y .endm - @ Copies a live object event's xy position to its template, so that if the sprite goes off screen, + @ Copies a live object event's xy position to its template, so that if the sprite goes off screen, @ it'll still be there when it comes back on screen. .macro copyobjectxytoperm index:req .byte 0x64 @@ -794,14 +794,14 @@ .byte \byte .endm - @ If a standard message box (or its text) is being drawn on-screen, this command blocks script execution until the + @ If a standard message box (or its text) is being drawn on-screen, this command blocks script execution until the @ box and its text have been fully drawn. .macro waitmessage .byte 0x66 .endm - @ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at - @ that offset will be loaded and used. If text is script bank 0, then the value of script bank 0 will be treated as + @ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at + @ that offset will be loaded and used. If text is script bank 0, then the value of script bank 0 will be treated as @ a pointer to the text. (You can use loadpointer to place a string pointer in a script bank.) .macro message text:req .byte 0x67 @@ -846,7 +846,7 @@ .byte \y .endm - @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. + @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId. @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. .macro multichoice x:req, y:req, multichoiceId:req, ignoreBPress:req @@ -859,7 +859,7 @@ @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId. - @ The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. + @ The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. .macro multichoicedefault x:req, y:req, multichoiceId:req, default:req, ignoreBPress:req .byte 0x70 @@ -925,8 +925,8 @@ .byte \winnerId .endm - @ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille - @ characters and needs to provide six extra starting characters that are skipped (in RS, these characters determined the + @ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille + @ characters and needs to provide six extra starting characters that are skipped (in RS, these characters determined the @ box's size and position, but in Emerald these are calculated automatically). .macro braillemessage text:req .byte 0x78 @@ -996,7 +996,7 @@ .2byte \slot .endm - @ Writes the name of the item at index item to the specified buffer. If the specified index is larger than + @ Writes the name of the item at index item to the specified buffer. If the specified index is larger than @ the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. .macro bufferitemname out:req, item:req .byte 0x80 @@ -1112,7 +1112,7 @@ .byte \check .endm - @ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player + @ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player @ has enough money, or FALSE if they do not. .macro checkmoney value:req, check:req .byte 0x92 @@ -1446,7 +1446,7 @@ .2byte \box .endm - @ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text, + @ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text, @ 0xFF resets the color to the default for the current OW's gender, and all other values produce black text. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro textcolor color:req @@ -1454,7 +1454,7 @@ .byte \color .endm - @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom + @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom @ of the screen when the Main Menu is opened. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro loadhelp pointer:req @@ -1643,7 +1643,7 @@ .macro goto_if_lt dest:req @ LESS THAN goto_if 0, \dest - .endm + .endm .macro goto_if_eq dest:req @ EQUAL goto_if 1, \dest @@ -1677,7 +1677,7 @@ .macro call_if_lt dest:req @ LESS THAN call_if 0, \dest - .endm + .endm .macro call_if_eq dest:req @ EQUAL call_if 1, \dest diff --git a/data/contest_ai_scripts.s b/data/contest_ai_scripts.s index f0972264f0..ef4feb25ff 100644 --- a/data/contest_ai_scripts.s +++ b/data/contest_ai_scripts.s @@ -48,7 +48,7 @@ gContestAI_ScriptsTable:: .4byte AI_Nothing @ CONTEST_AI_DUMMY_25 -@ Unused. Encourages improving condition on the 1st appeal, or startling mons if the users turn is later +@ Unused. Encourages improving condition on the 1st appeal, or startling mons if the users turn is later AI_CheckTiming: if_appeal_num_not_eq 0, AI_CheckTiming_SkipCondition if_effect_not_eq CONTEST_EFFECT_IMPROVE_CONDITION_PREVENT_NERVOUSNESS, AI_CheckTiming_SkipCondition @@ -388,7 +388,7 @@ AI_CGM_AppealAsGoodAsPrevOnes_Last: score +20 end -@ Encourages move more for each opponent who will have a turn before the user +@ Encourages move more for each opponent who will have a turn before the user AI_CGM_AppealAsGoodAsPrevOne: if_user_order_eq MON_1, AI_CGM_AppealAsGoodAsPrevOne_1stUp if_user_order_eq MON_2, AI_CGM_AppealAsGoodAsPrevOne_2ndUp @@ -456,7 +456,7 @@ AI_CGM_BetterWhenAudienceExcited_Not1stUp: score +10 end -@ Encourage move more for each condition star the prev mons have +@ Encourage move more for each condition star the prev mons have AI_CGM_WorsenConditionOfPrevMons: if_user_order_eq MON_1, AI_CGM_End goto AI_CGM_WorsenConditionOfPrevMons_CheckMon1 diff --git a/data/maps/BattleFrontier_Lounge2/scripts.inc b/data/maps/BattleFrontier_Lounge2/scripts.inc index 106d1d1793..d98a9f64e1 100644 --- a/data/maps/BattleFrontier_Lounge2/scripts.inc +++ b/data/maps/BattleFrontier_Lounge2/scripts.inc @@ -2,7 +2,7 @@ BattleFrontier_Lounge2_MapScripts:: .byte 0 @ This NPC gives hints about a random facility or battle mode. -@ For battle modes he gives generic advice +@ For battle modes he gives generic advice @ For facilities, depending on how far the player has progressed he will say either @ The name of the Frontier Brain there @ The type and description of the 3 pokemon they use in their silver battle diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index fdf8c785ef..52b9be2642 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -4,7 +4,7 @@ .equ LOCALID_BRINEY_DEWFORD, 2 .equ LOCALID_BOAT_DEWFORD, 4 -.equ LOCALID_BOAT_R109, 1 +.equ LOCALID_BOAT_R109, 1 .equ LOCALID_BRINEY_R109, 2 .equ LOCALID_BOAT_R104, 7 diff --git a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc index 374bd8df73..185d49551c 100644 --- a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc @@ -33,7 +33,7 @@ LilycoveCity_DepartmentStore_5F_Pokemart_Dolls: .2byte DECOR_PIKACHU_DOLL .2byte DECOR_MARILL_DOLL .2byte DECOR_JIGGLYPUFF_DOLL - .2byte DECOR_DUSKULL_DOLL + .2byte DECOR_DUSKULL_DOLL .2byte DECOR_WYNAUT_DOLL .2byte DECOR_BALTOY_DOLL .2byte DECOR_KECLEON_DOLL diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index 8f7f7d15ca..0e15c20486 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -29,7 +29,7 @@ LilycoveCity_Harbor_EventScript_FerryAttendant:: goto_if_eq LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime compare VAR_TEMP_B, 4 goto_if_eq LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime - compare VAR_TEMP_B, 8 + compare VAR_TEMP_B, 8 goto_if_eq LilycoveCity_Harbor_EventScript_MysticTicketFirstTime compare VAR_TEMP_B, 0 goto_if_ne LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index 87880ab59b..e527c055e3 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -1,4 +1,4 @@ -@ NOTE: Route 104's sail to Dewford script references local IDs from Dewford's map. +@ NOTE: Route 104's sail to Dewford script references local IDs from Dewford's map. @ These are labeled in DewfordTown/scripts.inc .set LOCALID_RIVAL, 34 diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index ff1ac4ac05..6c38a8bd76 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -1,4 +1,4 @@ -@ NOTE: Route 109's sail to Dewford script references local IDs from Dewford's map. +@ NOTE: Route 109's sail to Dewford script references local IDs from Dewford's map. @ These are labeled in DewfordTown/scripts.inc Route109_MapScripts:: diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc index a194e61e0c..7f6669f7bd 100644 --- a/data/maps/VictoryRoad_1F/scripts.inc +++ b/data/maps/VictoryRoad_1F/scripts.inc @@ -84,7 +84,7 @@ VictoryRoad_1F_EventScript_EntranceWally:: msgbox VictoryRoad_1F_Text_WallyPostEntranceBattle, MSGBOX_NPC end -@ This Wally appears and remains at the exit after the Hall of Fame is entered +@ This Wally appears and remains at the exit after the Hall of Fame is entered VictoryRoad_1F_EventScript_ExitWally:: trainerbattle_single TRAINER_WALLY_VR_2, VictoryRoad_1F_Text_WallyIntro, VictoryRoad_1F_Text_WallyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc index 921fa9582c..1e4f551690 100644 --- a/data/scripts/berry_blender.inc +++ b/data/scripts/berry_blender.inc @@ -641,7 +641,7 @@ BerryBlender_EventScript_DoLinkBerryBlending: fadescreen FADE_TO_BLACK removeobject 240 @ Unclear where these local IDs come from, removeobject 239 @ but presumably they'd be the 4 link players - removeobject 238 + removeobject 238 removeobject 237 special DoBerryBlending waitstate diff --git a/gflib/io_reg.c b/gflib/io_reg.c index 44364349d9..66b8dbe64c 100644 --- a/gflib/io_reg.c +++ b/gflib/io_reg.c @@ -17,8 +17,8 @@ static const u32 sUnused[] = { (1 << 26) | (1 << 4) | (1 << 2) | (1 << 1), (1 << 26) | (1 << 4) | (1 << 3) | (1 << 1), (1 << 26) | (1 << 4) | (1 << 3) | (1 << 2) | (1 << 1), - (1 << 25) | (1 << 8), - (1 << 27) | (1 << 10), + (1 << 25) | (1 << 8), + (1 << 27) | (1 << 10), }; const u16 gOverworldBackgroundLayerFlags[] = { diff --git a/gflib/sprite.c b/gflib/sprite.c index 408daf6f91..43432cf3a3 100644 --- a/gflib/sprite.c +++ b/gflib/sprite.c @@ -248,7 +248,7 @@ static const AffineAnimCmdFunc sAffineAnimCmdFuncs[] = static const struct OamDimensions32 sOamDimensions32[3][4] = { - [ST_OAM_SQUARE] = + [ST_OAM_SQUARE] = { [SPRITE_SIZE(8x8)] = { 8, 8 }, [SPRITE_SIZE(16x16)] = { 16, 16 }, @@ -262,7 +262,7 @@ static const struct OamDimensions32 sOamDimensions32[3][4] = [SPRITE_SIZE(32x16)] = { 32, 16 }, [SPRITE_SIZE(64x32)] = { 64, 32 }, }, - [ST_OAM_V_RECTANGLE] = + [ST_OAM_V_RECTANGLE] = { [SPRITE_SIZE(8x16)] = { 8, 16 }, [SPRITE_SIZE(8x32)] = { 8, 32 }, @@ -273,7 +273,7 @@ static const struct OamDimensions32 sOamDimensions32[3][4] = static const struct OamDimensions sOamDimensions[3][4] = { - [ST_OAM_SQUARE] = + [ST_OAM_SQUARE] = { [SPRITE_SIZE(8x8)] = { 8, 8 }, [SPRITE_SIZE(16x16)] = { 16, 16 }, @@ -287,7 +287,7 @@ static const struct OamDimensions sOamDimensions[3][4] = [SPRITE_SIZE(32x16)] = { 32, 16 }, [SPRITE_SIZE(64x32)] = { 64, 32 }, }, - [ST_OAM_V_RECTANGLE] = + [ST_OAM_V_RECTANGLE] = { [SPRITE_SIZE(8x16)] = { 8, 16 }, [SPRITE_SIZE(8x32)] = { 8, 32 }, diff --git a/gflib/string_util.c b/gflib/string_util.c index 92f8eea5af..addc7e4f28 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -384,18 +384,18 @@ u8 *StringExpandPlaceholders(u8 *dest, const u8 *src) u8 *StringBraille(u8 *dest, const u8 *src) { - const u8 setBrailleFont[] = { - EXT_CTRL_CODE_BEGIN, - EXT_CTRL_CODE_SIZE, - 6, - EOS + const u8 setBrailleFont[] = { + EXT_CTRL_CODE_BEGIN, + EXT_CTRL_CODE_SIZE, + 6, + EOS }; - const u8 gotoLine2[] = { - CHAR_NEWLINE, - EXT_CTRL_CODE_BEGIN, - EXT_CTRL_CODE_SHIFT_DOWN, - 2, - EOS + const u8 gotoLine2[] = { + CHAR_NEWLINE, + EXT_CTRL_CODE_BEGIN, + EXT_CTRL_CODE_SHIFT_DOWN, + 2, + EOS }; dest = StringCopy(dest, setBrailleFont); diff --git a/gflib/text.h b/gflib/text.h index 3edd0fc624..f660eb8d1d 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -18,7 +18,7 @@ #define CHAR_O_ACUTE 0x0E #define CHAR_O_CIRCUMFLEX 0x0F #define CHAR_OE 0x10 -#define CHAR_U_GRAVE 0x11 +#define CHAR_U_GRAVE 0x11 #define CHAR_U_ACUTE 0x12 #define CHAR_U_CIRCUMFLEX 0x13 #define CHAR_N_TILDE 0x14 @@ -258,7 +258,7 @@ #define PLACEHOLDER_ID_VERSION 0x7 #define PLACEHOLDER_ID_AQUA 0x8 #define PLACEHOLDER_ID_MAGMA 0x9 -#define PLACEHOLDER_ID_ARCHIE 0xA +#define PLACEHOLDER_ID_ARCHIE 0xA #define PLACEHOLDER_ID_MAXIE 0xB #define PLACEHOLDER_ID_KYOGRE 0xC #define PLACEHOLDER_ID_GROUDON 0xD diff --git a/include/constants/battle_dome.h b/include/constants/battle_dome.h index ea7310e559..adac0a938d 100644 --- a/include/constants/battle_dome.h +++ b/include/constants/battle_dome.h @@ -118,7 +118,7 @@ #define MOVE_POINTS_ACCURATE 9 #define MOVE_POINTS_POWERFUL 10 // Most of the moves that are >= 100 power #define MOVE_POINTS_POPULAR 11 // Group seems arbitrary. All using it are TM/HMs, but its only 11/58 -#define MOVE_POINTS_LUCK 12 +#define MOVE_POINTS_LUCK 12 #define MOVE_POINTS_STRONG 13 // Most of the moves that are >= 90 power #define MOVE_POINTS_LOW_PP 14 #define MOVE_POINTS_EFFECT 15 // Moves with additional effects diff --git a/include/constants/battle_frontier_trainers.h b/include/constants/battle_frontier_trainers.h index 2914b153fa..af530a7597 100644 --- a/include/constants/battle_frontier_trainers.h +++ b/include/constants/battle_frontier_trainers.h @@ -2,7 +2,7 @@ #define GUARD_CONSTANTS_BATTLE_FRONTIER_TRAINERS_H #define FRONTIER_TRAINER_BRADY 0 -#define FRONTIER_TRAINER_CONNER 1 +#define FRONTIER_TRAINER_CONNER 1 #define FRONTIER_TRAINER_BRADLEY 2 #define FRONTIER_TRAINER_CYBIL 3 #define FRONTIER_TRAINER_RODETTE 4 diff --git a/include/constants/battle_pyramid.h b/include/constants/battle_pyramid.h index 004df71552..1be3c11157 100644 --- a/include/constants/battle_pyramid.h +++ b/include/constants/battle_pyramid.h @@ -23,7 +23,7 @@ #define OBJ_POSITIONS_UNIFORM 0 #define OBJ_POSITIONS_IN_AND_NEAR_ENTRANCE 1 #define OBJ_POSITIONS_IN_AND_NEAR_EXIT 2 -#define OBJ_POSITIONS_NEAR_ENTRANCE 3 +#define OBJ_POSITIONS_NEAR_ENTRANCE 3 #define OBJ_POSITIONS_NEAR_EXIT 4 // Functions IDs for sBattlePyramidFunctions / CallBattlePyramidFunction diff --git a/include/constants/field_effects.h b/include/constants/field_effects.h index dc1085f7ca..e02e01efbf 100644 --- a/include/constants/field_effects.h +++ b/include/constants/field_effects.h @@ -1,7 +1,7 @@ #ifndef GUARD_FIELD_EFFECT_CONSTANTS_H #define GUARD_FIELD_EFFECT_CONSTANTS_H -#define FLDEFF_EXCLAMATION_MARK_ICON 0 +#define FLDEFF_EXCLAMATION_MARK_ICON 0 #define FLDEFF_USE_CUT_ON_GRASS 1 #define FLDEFF_USE_CUT_ON_TREE 2 #define FLDEFF_SHADOW 3 diff --git a/include/constants/flags.h b/include/constants/flags.h index 6702fa5eec..ef5a9a75e6 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -337,7 +337,7 @@ #define FLAG_BEAT_MAGMA_GRUNT_JAGGED_PASS 0x139 #define FLAG_RECEIVED_AURORA_TICKET 0x13A #define FLAG_RECEIVED_MYSTIC_TICKET 0x13B -#define FLAG_RECEIVED_OLD_SEA_MAP 0x13C +#define FLAG_RECEIVED_OLD_SEA_MAP 0x13C #define FLAG_UNUSED_MYSTERY_GIFT_0x13D 0x13D #define FLAG_UNUSED_MYSTERY_GIFT_0x13E 0x13E #define FLAG_UNUSED_MYSTERY_GIFT_0x13F 0x13F @@ -1135,18 +1135,18 @@ #define FLAG_ITEM_VICTORY_ROAD_B2F_FULL_HEAL 0x440 #define FLAG_ITEM_MT_PYRE_6F_TM_30 0x441 #define FLAG_ITEM_SEAFLOOR_CAVERN_ROOM_9_TM_26 0x442 -#define FLAG_ITEM_FIERY_PATH_TM06 0x443 -#define FLAG_ITEM_ROUTE_124_RED_SHARD 0x444 -#define FLAG_ITEM_ROUTE_124_BLUE_SHARD 0x445 -#define FLAG_ITEM_SAFARI_ZONE_NORTH_WEST_TM_22 0x446 -#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_1F_HARBOR_MAIL 0x447 -#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_B1F_ESCAPE_ROPE 0x448 -#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_2_B1F_DIVE_BALL 0x449 -#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_B1F_TM_13 0x44A -#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_2_1F_REVIVE 0x44B -#define FLAG_ITEM_ABANDONED_SHIP_CAPTAINS_OFFICE_STORAGE_KEY 0x44C -#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_3_WATER_STONE 0x44D -#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_1_TM_18 0x44E +#define FLAG_ITEM_FIERY_PATH_TM06 0x443 +#define FLAG_ITEM_ROUTE_124_RED_SHARD 0x444 +#define FLAG_ITEM_ROUTE_124_BLUE_SHARD 0x445 +#define FLAG_ITEM_SAFARI_ZONE_NORTH_WEST_TM_22 0x446 +#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_1F_HARBOR_MAIL 0x447 +#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_B1F_ESCAPE_ROPE 0x448 +#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_2_B1F_DIVE_BALL 0x449 +#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_B1F_TM_13 0x44A +#define FLAG_ITEM_ABANDONED_SHIP_ROOMS_2_1F_REVIVE 0x44B +#define FLAG_ITEM_ABANDONED_SHIP_CAPTAINS_OFFICE_STORAGE_KEY 0x44C +#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_3_WATER_STONE 0x44D +#define FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_1_TM_18 0x44E #define FLAG_ITEM_ROUTE_121_CARBOS 0x44F #define FLAG_ITEM_ROUTE_123_ULTRA_BALL 0x450 #define FLAG_ITEM_ROUTE_126_GREEN_SHARD 0x451 diff --git a/include/constants/item_effects.h b/include/constants/item_effects.h index 9a6bcd05ec..f08b17ee9a 100644 --- a/include/constants/item_effects.h +++ b/include/constants/item_effects.h @@ -23,7 +23,7 @@ #define ITEM3_POISON 0x10 #define ITEM3_SLEEP 0x20 #define ITEM3_LEVEL_UP 0x40 -#define ITEM3_GUARD_SPEC 0x80 // Works the same way as the move Mist. +#define ITEM3_GUARD_SPEC 0x80 // Works the same way as the move Mist. #define ITEM3_STATUS_ALL (ITEM3_CONFUSION | ITEM3_PARALYSIS | ITEM3_FREEZE | ITEM3_BURN | ITEM3_POISON | ITEM3_SLEEP) diff --git a/include/constants/lilycove_lady.h b/include/constants/lilycove_lady.h index 11b9b31e93..9c494823ea 100644 --- a/include/constants/lilycove_lady.h +++ b/include/constants/lilycove_lady.h @@ -10,7 +10,7 @@ #define LILYCOVE_LADY_STATE_COMPLETED 1 #define LILYCOVE_LADY_STATE_PRIZE 2 -#define LILYCOVE_LADY_GIFT_THRESHOLD 5 +#define LILYCOVE_LADY_GIFT_THRESHOLD 5 #define QUIZ_AUTHOR_PLAYER 0 #define QUIZ_AUTHOR_OTHER_PLAYER 1 @@ -20,7 +20,7 @@ #define QUIZ_AUTHOR_NAME_LADY 0 #define QUIZ_AUTHOR_NAME_PLAYER 1 #define QUIZ_AUTHOR_NAME_OTHER_PLAYER 2 - + #define QUIZ_QUESTION_LEN 9 // Constants for how many good Pokéblocks the Contest Lady was given diff --git a/include/constants/map_scripts.h b/include/constants/map_scripts.h index 68d3609551..7a56cc9085 100644 --- a/include/constants/map_scripts.h +++ b/include/constants/map_scripts.h @@ -9,7 +9,7 @@ They are numbered in the order that they will be called when entering a map (from a warp or camera transition). NOTE: These descriptions are just of what they generally do, not what they always or have to do - 3. ON_LOAD: Run after the layout is loaded (but not drawn yet). + 3. ON_LOAD: Run after the layout is loaded (but not drawn yet). Almost exclusively used to set metatiles on the map before it's first drawn 6. ON_FRAME_TABLE: Run every frame after the map has faded in, before player input is processed. diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index b5ef690469..6159bf6cb4 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -16,7 +16,7 @@ #define METATILE_General_MuddySlope_Frame2 0x0EA #define METATILE_General_MuddySlope_Frame3 0x0EB #define METATILE_General_SandPit_Center 0x121 -#define METATILE_General_Door 0x021 +#define METATILE_General_Door 0x021 #define METATILE_General_Door_PokeMart 0x041 #define METATILE_General_Door_PokeCenter 0x061 #define METATILE_General_Door_Gym 0x1CD @@ -35,7 +35,7 @@ #define METATILE_General_SecretBase_VineLeft 0x036 #define METATILE_General_SecretBase_VineRight 0x037 #define METATILE_General_RedCaveIndent 0x1A0 -#define METATILE_General_RedCaveOpen 0x1A1 +#define METATILE_General_RedCaveOpen 0x1A1 #define METATILE_General_YellowCaveIndent 0x1A8 #define METATILE_General_YellowCaveOpen 0x1A9 #define METATILE_General_BlueCaveIndent 0x1B0 diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h index 7953967ed7..e31debb49b 100644 --- a/include/constants/party_menu.h +++ b/include/constants/party_menu.h @@ -49,14 +49,14 @@ #define PARTY_LAYOUT_COUNT 4 #define KEEP_PARTY_LAYOUT 0xFF -#define PARTY_MENU_TYPE_FIELD 0 -#define PARTY_MENU_TYPE_IN_BATTLE 1 -#define PARTY_MENU_TYPE_CONTEST 2 -#define PARTY_MENU_TYPE_CHOOSE_MON 3 +#define PARTY_MENU_TYPE_FIELD 0 +#define PARTY_MENU_TYPE_IN_BATTLE 1 +#define PARTY_MENU_TYPE_CONTEST 2 +#define PARTY_MENU_TYPE_CHOOSE_MON 3 #define PARTY_MENU_TYPE_CHOOSE_HALF 4 // multi battles, eReader battles, and some battle facilities #define PARTY_MENU_TYPE_MULTI_SHOWCASE 5 -#define PARTY_MENU_TYPE_DAYCARE 6 -#define PARTY_MENU_TYPE_MOVE_RELEARNER 7 +#define PARTY_MENU_TYPE_DAYCARE 6 +#define PARTY_MENU_TYPE_MOVE_RELEARNER 7 #define PARTY_MENU_TYPE_UNION_ROOM_REGISTER 8 // trading board #define PARTY_MENU_TYPE_UNION_ROOM_TRADE 9 // trading board #define PARTY_MENU_TYPE_SPIN_TRADE 10 // Unused beta for Gen IV's Spin Trade @@ -68,7 +68,7 @@ #define PARTY_ACTION_CANT_SWITCH 2 #define PARTY_ACTION_USE_ITEM 3 #define PARTY_ACTION_ABILITY_PREVENTS 4 -#define PARTY_ACTION_GIVE_ITEM 5 +#define PARTY_ACTION_GIVE_ITEM 5 #define PARTY_ACTION_GIVE_PC_ITEM 6 // Unused. Not possible to give non-mail items directly from PC #define PARTY_ACTION_GIVE_MAILBOX_MAIL 7 #define PARTY_ACTION_SWITCH 8 @@ -83,7 +83,7 @@ #define PARTY_MSG_CHOOSE_MON 0 #define PARTY_MSG_CHOOSE_MON_OR_CANCEL 1 #define PARTY_MSG_CHOOSE_MON_AND_CONFIRM 2 -#define PARTY_MSG_MOVE_TO_WHERE 3 +#define PARTY_MSG_MOVE_TO_WHERE 3 #define PARTY_MSG_TEACH_WHICH_MON 4 #define PARTY_MSG_USE_ON_WHICH_MON 5 #define PARTY_MSG_GIVE_TO_WHICH_MON 6 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 63c0318240..9bafa0a0bd 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -225,7 +225,7 @@ // 1 bit each in the Pokémon struct. Gen 4 hard-codes // each of these to the given name. In Gen 3 they're // used to get an index into giftRibbons in the save block, -// which can have a value 0-64 (0 is 'no ribbon') that +// which can have a value 0-64 (0 is 'no ribbon') that // corresponds to one of the special ribbons listed // in gGiftRibbonDescriptionPointers. Most of these were // never distributed diff --git a/include/constants/script_menu.h b/include/constants/script_menu.h index 928ca00e06..c58df7335f 100644 --- a/include/constants/script_menu.h +++ b/include/constants/script_menu.h @@ -65,7 +65,7 @@ #define MULTI_RIGHTLEFT 54 #define MULTI_GAME_CORNER_TMS 55 #define MULTI_SSTIDAL_SLATEPORT_NO_BF 56 -#define MULTI_FLOORS 57 +#define MULTI_FLOORS 57 #define MULTI_SHARDS_R 58 #define MULTI_SHARDS_Y 59 #define MULTI_SHARDS_RY 60 @@ -82,9 +82,9 @@ #define MULTI_SHARDS_YBG 71 #define MULTI_SHARDS_RYBG 72 #define MULTI_TOURNEY_WITH_RECORD 73 -#define MULTI_CABLE_CLUB_NO_RECORD_MIX 74 +#define MULTI_CABLE_CLUB_NO_RECORD_MIX 74 #define MULTI_WIRELESS_NO_RECORD_BERRY 75 -#define MULTI_CABLE_CLUB_WITH_RECORD_MIX 76 +#define MULTI_CABLE_CLUB_WITH_RECORD_MIX 76 #define MULTI_WIRELESS_NO_BERRY 77 #define MULTI_WIRELESS_NO_RECORD 78 #define MULTI_WIRELESS_ALL_SERVICES 79 diff --git a/include/constants/songs.h b/include/constants/songs.h index a78ee6fafe..d6a4184959 100644 --- a/include/constants/songs.h +++ b/include/constants/songs.h @@ -267,7 +267,7 @@ #define SE_RG_HELP_ERROR 259 // SE_RG_HELP_NG #define SE_RG_DEOXYS_MOVE 260 // SE_RG_DEOMOV #define SE_RG_POKE_JUMP_SUCCESS 261 // SE_RG_EXCELLENT -#define SE_RG_POKE_JUMP_FAILURE 262 // SE_RG_NAWAMISS +#define SE_RG_POKE_JUMP_FAILURE 262 // SE_RG_NAWAMISS // New Emerald SFX #define SE_POKENAV_CALL 263 // SE_TOREEYE #define SE_POKENAV_HANG_UP 264 // SE_TOREOFF diff --git a/include/constants/tv.h b/include/constants/tv.h index 095a6ddca7..3fe6c57b24 100644 --- a/include/constants/tv.h +++ b/include/constants/tv.h @@ -35,7 +35,7 @@ // TVGROUP_RECORD_MIX #define TVGROUP_RECORD_MIX_START 21 -#define TVSHOW_POKEMON_TODAY_CAUGHT 21 +#define TVSHOW_POKEMON_TODAY_CAUGHT 21 #define TVSHOW_SMART_SHOPPER 22 #define TVSHOW_POKEMON_TODAY_FAILED 23 #define TVSHOW_FISHING_ADVICE 24 diff --git a/include/constants/vars.h b/include/constants/vars.h index d3d1aba87d..2cbe3e9b80 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -149,7 +149,7 @@ #define VAR_LITTLEROOT_HOUSES_STATE_MAY 0x4082 #define VAR_UNUSED_0x4083 0x4083 // Unused Var #define VAR_BIRCH_LAB_STATE 0x4084 -#define VAR_PETALBURG_GYM_STATE 0x4085 // 0-1: Wally tutorial, 2-6: 0-4 badges, 7: Defeated Norman, 8: Rematch Norman +#define VAR_PETALBURG_GYM_STATE 0x4085 // 0-1: Wally tutorial, 2-6: 0-4 badges, 7: Defeated Norman, 8: Rematch Norman #define VAR_CONTEST_HALL_STATE 0x4086 #define VAR_CABLE_CLUB_STATE 0x4087 #define VAR_CONTEST_TYPE 0x4088 diff --git a/include/constants/weather.h b/include/constants/weather.h index becbdda877..c4a23a18bc 100644 --- a/include/constants/weather.h +++ b/include/constants/weather.h @@ -16,7 +16,7 @@ #define WEATHER_DROUGHT 12 #define WEATHER_DOWNPOUR 13 #define WEATHER_UNDERWATER_BUBBLES 14 -#define WEATHER_ABNORMAL 15 // The alternating weather during Groudon/Kyogre conflict +#define WEATHER_ABNORMAL 15 // The alternating weather during Groudon/Kyogre conflict #define WEATHER_ROUTE119_CYCLE 20 #define WEATHER_ROUTE123_CYCLE 21 diff --git a/include/event_scripts.h b/include/event_scripts.h index c478f41f83..1a24aa59d3 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -240,48 +240,48 @@ extern const u8 gTVWhatsNo1InHoennTodayText05[]; extern const u8 gTVWhatsNo1InHoennTodayText06[]; extern const u8 gTVWhatsNo1InHoennTodayText07[]; extern const u8 gTVWhatsNo1InHoennTodayText08[]; -extern const u8 TVSecretBaseSecrets_Text_Intro[]; +extern const u8 TVSecretBaseSecrets_Text_Intro[]; extern const u8 TVSecretBaseSecrets_Text_WhatWillPlayerDoNext1[]; extern const u8 TVSecretBaseSecrets_Text_WhatWillPlayerDoNext2[]; extern const u8 TVSecretBaseSecrets_Text_TookXStepsBeforeLeaving[]; -extern const u8 TVSecretBaseSecrets_Text_BaseFailedToInterestPlayer[]; -extern const u8 TVSecretBaseSecrets_Text_PlayerEnjoyedBase[]; +extern const u8 TVSecretBaseSecrets_Text_BaseFailedToInterestPlayer[]; +extern const u8 TVSecretBaseSecrets_Text_PlayerEnjoyedBase[]; extern const u8 TVSecretBaseSecrets_Text_PlayerHugeFanOfBase[]; -extern const u8 TVSecretBaseSecrets_Text_Outro[]; -extern const u8 TVSecretBaseSecrets_Text_StoppedMoving1[]; -extern const u8 TVSecretBaseSecrets_Text_StoppedMoving2[]; -extern const u8 TVSecretBaseSecrets_Text_UsedChair[]; -extern const u8 TVSecretBaseSecrets_Text_UsedBalloon[]; -extern const u8 TVSecretBaseSecrets_Text_UsedTent[]; -extern const u8 TVSecretBaseSecrets_Text_UsedPlant[]; -extern const u8 TVSecretBaseSecrets_Text_UsedGoldShield[]; -extern const u8 TVSecretBaseSecrets_Text_UsedSilverShield[]; -extern const u8 TVSecretBaseSecrets_Text_UsedGlassOrnament[]; -extern const u8 TVSecretBaseSecrets_Text_UsedTV[]; -extern const u8 TVSecretBaseSecrets_Text_UsedMudBall[]; -extern const u8 TVSecretBaseSecrets_Text_UsedBag[]; -extern const u8 TVSecretBaseSecrets_Text_UsedCushion[]; -extern const u8 TVSecretBaseSecrets_Text_HitCushion[]; -extern const u8 TVSecretBaseSecrets_Text_HuggedCushion[]; -extern const u8 TVSecretBaseSecrets_Text_BattledWon[]; -extern const u8 TVSecretBaseSecrets_Text_BattledLost[]; -extern const u8 TVSecretBaseSecrets_Text_DeclinedBattle[]; -extern const u8 TVSecretBaseSecrets_Text_UsedPoster[]; -extern const u8 TVSecretBaseSecrets_Text_UsedNoteMat[]; -extern const u8 TVSecretBaseSecrets_Text_BattledDraw[]; -extern const u8 TVSecretBaseSecrets_Text_UsedSpinMat[]; -extern const u8 TVSecretBaseSecrets_Text_UsedSandOrnament[]; -extern const u8 TVSecretBaseSecrets_Text_UsedDesk[]; -extern const u8 TVSecretBaseSecrets_Text_UsedBrick[]; -extern const u8 TVSecretBaseSecrets_Text_UsedSolidBoard[]; -extern const u8 TVSecretBaseSecrets_Text_UsedFence[]; -extern const u8 TVSecretBaseSecrets_Text_UsedGlitterMat[]; -extern const u8 TVSecretBaseSecrets_Text_UsedTire[]; -extern const u8 TVSecretBaseSecrets_Text_UsedStand[]; +extern const u8 TVSecretBaseSecrets_Text_Outro[]; +extern const u8 TVSecretBaseSecrets_Text_StoppedMoving1[]; +extern const u8 TVSecretBaseSecrets_Text_StoppedMoving2[]; +extern const u8 TVSecretBaseSecrets_Text_UsedChair[]; +extern const u8 TVSecretBaseSecrets_Text_UsedBalloon[]; +extern const u8 TVSecretBaseSecrets_Text_UsedTent[]; +extern const u8 TVSecretBaseSecrets_Text_UsedPlant[]; +extern const u8 TVSecretBaseSecrets_Text_UsedGoldShield[]; +extern const u8 TVSecretBaseSecrets_Text_UsedSilverShield[]; +extern const u8 TVSecretBaseSecrets_Text_UsedGlassOrnament[]; +extern const u8 TVSecretBaseSecrets_Text_UsedTV[]; +extern const u8 TVSecretBaseSecrets_Text_UsedMudBall[]; +extern const u8 TVSecretBaseSecrets_Text_UsedBag[]; +extern const u8 TVSecretBaseSecrets_Text_UsedCushion[]; +extern const u8 TVSecretBaseSecrets_Text_HitCushion[]; +extern const u8 TVSecretBaseSecrets_Text_HuggedCushion[]; +extern const u8 TVSecretBaseSecrets_Text_BattledWon[]; +extern const u8 TVSecretBaseSecrets_Text_BattledLost[]; +extern const u8 TVSecretBaseSecrets_Text_DeclinedBattle[]; +extern const u8 TVSecretBaseSecrets_Text_UsedPoster[]; +extern const u8 TVSecretBaseSecrets_Text_UsedNoteMat[]; +extern const u8 TVSecretBaseSecrets_Text_BattledDraw[]; +extern const u8 TVSecretBaseSecrets_Text_UsedSpinMat[]; +extern const u8 TVSecretBaseSecrets_Text_UsedSandOrnament[]; +extern const u8 TVSecretBaseSecrets_Text_UsedDesk[]; +extern const u8 TVSecretBaseSecrets_Text_UsedBrick[]; +extern const u8 TVSecretBaseSecrets_Text_UsedSolidBoard[]; +extern const u8 TVSecretBaseSecrets_Text_UsedFence[]; +extern const u8 TVSecretBaseSecrets_Text_UsedGlitterMat[]; +extern const u8 TVSecretBaseSecrets_Text_UsedTire[]; +extern const u8 TVSecretBaseSecrets_Text_UsedStand[]; extern const u8 TVSecretBaseSecrets_Text_BrokeDoor[]; -extern const u8 TVSecretBaseSecrets_Text_UsedDoll[]; -extern const u8 TVSecretBaseSecrets_Text_UsedSlide[]; -extern const u8 TVSecretBaseSecrets_Text_UsedSlideButDidntGoDown[]; +extern const u8 TVSecretBaseSecrets_Text_UsedDoll[]; +extern const u8 TVSecretBaseSecrets_Text_UsedSlide[]; +extern const u8 TVSecretBaseSecrets_Text_UsedSlideButDidntGoDown[]; extern const u8 TVSecretBaseSecrets_Text_UsedJumpMat[]; extern const u8 gTVSafariFanClubText00[]; extern const u8 gTVSafariFanClubText01[]; diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 6bafa97479..41b8539ffd 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -146,7 +146,7 @@ struct MapHeader /* 0x1A */ bool8 allowCycling:1; bool8 allowEscaping:1; // Escape Rope and Dig bool8 allowRunning:1; - bool8 showMapName:5; // the last 4 bits are unused + bool8 showMapName:5; // the last 4 bits are unused // but the 5 bit sized bitfield is required to match /* 0x1B */ u8 battleType; }; diff --git a/include/global.h b/include/global.h index e4c11f9ef2..4719df40b7 100644 --- a/include/global.h +++ b/include/global.h @@ -312,7 +312,7 @@ struct BattleTowerEReaderTrainer /*0xB8*/ u32 checksum; }; -// For displaying party information on the player's Battle Dome tourney page +// For displaying party information on the player's Battle Dome tourney page struct DomeMonData { u16 moves[MAX_MON_MOVES]; @@ -436,7 +436,7 @@ struct PlayersApprentice /*0xB1*/ u8 questionsAnswered:4; /*0xB1*/ u8 leadMonId:2; /*0xB2*/ u8 party:3; - /*0xB2*/ u8 saveId:2; + /*0xB2*/ u8 saveId:2; /*0xB3*/ u8 unused; /*0xB4*/ u8 speciesIds[MULTI_PARTY_SIZE]; /*0xB8*/ struct ApprenticeQuestion questions[APPRENTICE_MAX_QUESTIONS]; diff --git a/include/librfu.h b/include/librfu.h index 69c6961729..0026adecea 100644 --- a/include/librfu.h +++ b/include/librfu.h @@ -30,12 +30,12 @@ Calculate the number of the transferable DMA count based on this 42 cycles and the access cycles of the destination and source. For example, if both the CPU internal RAM --> VRAM have a one cycle access, then a 21 count DMA can occur. - - If RFU is used outside of these restrictions, problems, such as the loss of data caused by the failure of the AGB, as a clock slave, + + If RFU is used outside of these restrictions, problems, such as the loss of data caused by the failure of the AGB, as a clock slave, to notify that data has been received from the RFU, will occur. When this problem occurs, the REQ callback will send a REQ_commandID=ID_CLOCK_SLAVE_MS_CHANGE_ERROR_BY_DMA_REQ notification. (When using Link Manager, the LMAN call back will send a LMAN_msg=LMAN_MSG_CLOCK_SLAVE_MS_CHANGE_ERROR_BY_DMA notification.) - + */ // REQ-COMMAND (STWI) ID CODE LIST @@ -137,7 +137,7 @@ // Definition Data Returned by Return Values for Library Functions // ******************************************************* -// The function doesn't have return value. +// The function doesn't have return value. // Value of u8 *status for rfu_REQ_pollConnectParent (Connection Trial Status) // #define CP_STATUS_DONE 0x00 // Connection successful // #define CP_STATUS_IN_PROCESS 0x01 // Connecting @@ -145,7 +145,7 @@ // #define CP_STATUS_DISCONNECTED 0x03 // Disconnected by parent device while connecting // #define CP_STATUS_UNKNOWN 0xff // Cannot read status due to REQ-API execution error -// The function doesn't exist. +// The function doesn't exist. // Value of u8 *status argument for rfu_REQ_pollRecoveryConnect (Link Restore Status) // #define RC_STATUS_DONE 0x00 // Connection restore successful // #define RC_STATUS_FAILED 0x01 // Connection restore failure (meaningless to try anymore) @@ -324,7 +324,7 @@ struct STWIStatus vu8 sending; }; -// This struct is used as u8 array in SDK. +// This struct is used as u8 array in SDK. struct RfuIntrStruct { union RfuPacket rxPacketAlloc; @@ -475,7 +475,7 @@ extern struct RfuSlotStatusUNI *gRfuSlotStatusUNI[RFU_CHILD_MAX]; // librfu_sio32id s32 AgbRFU_checkID(u8 maxTries); -// Arguments with "bm..." specify slots of the form (0x01 << slot number) that are the object of a function operation. +// Arguments with "bm..." specify slots of the form (0x01 << slot number) that are the object of a function operation. // librfu_rfu // API Initialization and Initial Settings diff --git a/include/link.h b/include/link.h index 407dbabb9c..5479d77d4f 100644 --- a/include/link.h +++ b/include/link.h @@ -75,7 +75,7 @@ #define LINKCMD_SEND_BLOCK_REQ 0xCCCC #define LINKCMD_START_TRADE 0xCCDD #define LINKCMD_CONFIRM_FINISH_TRADE 0xDCBA -#define LINKCMD_SET_MONS_TO_TRADE 0xDDDD +#define LINKCMD_SET_MONS_TO_TRADE 0xDDDD #define LINKCMD_PLAYER_CANCEL_TRADE 0xDDEE #define LINKCMD_REQUEST_CANCEL 0xEEAA #define LINKCMD_BOTH_CANCEL_TRADE 0xEEBB @@ -92,7 +92,7 @@ #define LINKTYPE_DOUBLE_BATTLE 0x2244 #define LINKTYPE_MULTI_BATTLE 0x2255 #define LINKTYPE_BATTLE_TOWER_50 0x2266 -#define LINKTYPE_BATTLE_TOWER_OPEN 0x2277 +#define LINKTYPE_BATTLE_TOWER_OPEN 0x2277 #define LINKTYPE_BATTLE_TOWER 0x2288 #define LINKTYPE_RECORD_MIX_BEFORE 0x3311 #define LINKTYPE_RECORD_MIX_AFTER 0x3322 diff --git a/include/overworld.h b/include/overworld.h index 16c75861cf..8005a22228 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -15,7 +15,7 @@ // These two are a hack to stop user input until link stuff can be // resolved. -#define LINK_KEY_CODE_HANDLE_RECV_QUEUE 0x1B +#define LINK_KEY_CODE_HANDLE_RECV_QUEUE 0x1B #define LINK_KEY_CODE_HANDLE_SEND_QUEUE 0x1C #define LINK_KEY_CODE_EXIT_SEAT 0x1D #define LINK_KEY_CODE_UNK_8 0x1E diff --git a/include/pokeball.h b/include/pokeball.h index 8ea675ce4a..d88e80173b 100644 --- a/include/pokeball.h +++ b/include/pokeball.h @@ -21,7 +21,7 @@ enum enum { BALL_AFFINE_ANIM_0, BALL_ROTATE_RIGHT, - BALL_ROTATE_LEFT, + BALL_ROTATE_LEFT, BALL_AFFINE_ANIM_3, BALL_AFFINE_ANIM_4 }; diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 73a7833ee4..a0e4f89478 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -6,8 +6,8 @@ #define IN_BOX_COLUMNS 6 // Number of columns, 5 Pokémon per column #define IN_BOX_COUNT (IN_BOX_ROWS * IN_BOX_COLUMNS) -/* - COLUMNS +/* + COLUMNS ROWS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 diff --git a/include/strings.h b/include/strings.h index 2357e37771..7317f8aac8 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1607,10 +1607,10 @@ extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperMon1[] extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BirdKeeperReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyMon2Ask[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyAccept[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_NinjaBoyReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ParasolLadyIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ParasolLadyMon1[]; @@ -1620,8 +1620,8 @@ extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_ParasolLadyRejec extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacMon2Ask[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacAccept[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacReject[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacAccept[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_BugManiacReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SailorIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SailorMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SailorMon2Ask[]; @@ -1634,13 +1634,13 @@ extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CollectorAccept[ extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CollectorReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMMon1[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMMon2Ask[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerMReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFMon2Ask[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFAccept[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnRangerFReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyMon1[]; @@ -1649,20 +1649,20 @@ extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyAccept[ extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_AromaLadyReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacMon1[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacMon2Ask[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_RuinManiacReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMAccept[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFIntro[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFMon1[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerMReject[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CoolTrainerFReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokemaniacAccept[]; @@ -1673,28 +1673,28 @@ extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_KindlerMon2Ask[] extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_KindlerAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_KindlerReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperIntro[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperMon1[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperMon2Ask[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperAccept[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerIntro[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerMon1[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperMon1[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperMon2Ask[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperAccept[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_CamperReject[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerMon2Ask[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerAccept[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PicnickerReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMMon1[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMMon2Ask[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMAccept[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFIntro[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFMon1[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicMReject[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFMon2Ask[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFAccept[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PsychicFReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFIntro[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFMon1[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFMon2Ask[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFMon1[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SchoolKidFReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PkmnBreederFIntro[]; @@ -1706,27 +1706,27 @@ extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFAccept[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFReject[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_PokefanFReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFIntro[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFMon1[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFAccept[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerFReject[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMMon2Ask[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMAccept[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteMReject[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFIntro[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFMon1[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFIntro[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFMon1[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFAccept[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmingTriathleteFReject[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMIntro[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMMon1[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMMon2Ask[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMMon2Ask[]; extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMAccept[]; -extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMReject[]; +extern const u8 BattleFrontier_BattleTowerMultiPartnerRoom_Text_SwimmerMReject[]; // Battle Dome. extern const u8 BattleDome_Text_Potential1[]; diff --git a/include/trainer_hill.h b/include/trainer_hill.h index acf8faccaa..647ba96470 100644 --- a/include/trainer_hill.h +++ b/include/trainer_hill.h @@ -23,19 +23,19 @@ struct TrHillRoomTrainers struct TrHillDisplay { - // Metatile data. Add 0x200 to the values in this array to get metatiles. + // Metatile data. Add 0x200 to the values in this array to get metatiles. // This data then overwrites the metatiles in the map starting at (0,5) - u8 metatileData[0x100]; - // Collision data. One bit for each tile in column-major order, + u8 metatileData[0x100]; + // Collision data. One bit for each tile in column-major order, // so every array entry is one row. 1 = impassable, 0 = passable u16 collisionData[16]; // Trainer coordinates, starting at (0,6). Format is 0bYYYYXXXX. u8 coords[2]; - // Trainer facing directions. Same as (DIR_* - 1). + // Trainer facing directions. Same as (DIR_* - 1). // Effectively an array of nibbles, one for each trainer. u8 direction; // Trainer sight ranges. Effectively an array of nibbles, one for each trainer. - u8 range; + u8 range; }; struct TrHillFloor diff --git a/sound/cry_tables.inc b/sound/cry_tables.inc index 5654856766..bceb1ccb49 100644 --- a/sound/cry_tables.inc +++ b/sound/cry_tables.inc @@ -1,781 +1,781 @@ .align 2 gCryTable:: - cry Cry_Bulbasaur - cry Cry_Ivysaur - cry Cry_Venusaur - cry Cry_Charmander - cry Cry_Charmeleon - cry Cry_Charizard - cry Cry_Squirtle - cry Cry_Wartortle - cry Cry_Blastoise - cry Cry_Caterpie - cry Cry_Metapod - cry Cry_Butterfree - cry Cry_Weedle - cry Cry_Kakuna - cry Cry_Beedrill - cry Cry_Pidgey - cry Cry_Pidgeotto - cry Cry_Pidgeot - cry Cry_Rattata - cry Cry_Raticate - cry Cry_Spearow - cry Cry_Fearow - cry Cry_Ekans - cry Cry_Arbok - cry Cry_Pikachu - cry Cry_Raichu - cry Cry_Sandshrew - cry Cry_Sandslash - cry Cry_NidoranF - cry Cry_Nidorina - cry Cry_Nidoqueen - cry Cry_NidoranM - cry Cry_Nidorino - cry Cry_Nidoking - cry Cry_Clefairy - cry Cry_Clefable - cry Cry_Vulpix - cry Cry_Ninetales - cry Cry_Jigglypuff - cry Cry_Wigglytuff - cry Cry_Zubat - cry Cry_Golbat - cry Cry_Oddish - cry Cry_Gloom - cry Cry_Vileplume - cry Cry_Paras - cry Cry_Parasect - cry Cry_Venonat - cry Cry_Venomoth - cry Cry_Diglett - cry Cry_Dugtrio - cry Cry_Meowth - cry Cry_Persian - cry Cry_Psyduck - cry Cry_Golduck - cry Cry_Mankey - cry Cry_Primeape - cry Cry_Growlithe - cry Cry_Arcanine - cry Cry_Poliwag - cry Cry_Poliwhirl - cry Cry_Poliwrath - cry Cry_Abra - cry Cry_Kadabra - cry Cry_Alakazam - cry Cry_Machop - cry Cry_Machoke - cry Cry_Machamp - cry Cry_Bellsprout - cry Cry_Weepinbell - cry Cry_Victreebel - cry Cry_Tentacool - cry Cry_Tentacruel - cry Cry_Geodude - cry Cry_Graveler - cry Cry_Golem - cry Cry_Ponyta - cry Cry_Rapidash - cry Cry_Slowpoke - cry Cry_Slowbro - cry Cry_Magnemite - cry Cry_Magneton - cry Cry_Farfetchd - cry Cry_Doduo - cry Cry_Dodrio - cry Cry_Seel - cry Cry_Dewgong - cry Cry_Grimer - cry Cry_Muk - cry Cry_Shellder - cry Cry_Cloyster - cry Cry_Gastly - cry Cry_Haunter - cry Cry_Gengar - cry Cry_Onix - cry Cry_Drowzee - cry Cry_Hypno - cry Cry_Krabby - cry Cry_Kingler - cry Cry_Voltorb - cry Cry_Electrode - cry Cry_Exeggcute - cry Cry_Exeggutor - cry Cry_Cubone - cry Cry_Marowak - cry Cry_Hitmonlee - cry Cry_Hitmonchan - cry Cry_Lickitung - cry Cry_Koffing - cry Cry_Weezing - cry Cry_Rhyhorn - cry Cry_Rhydon - cry Cry_Chansey - cry Cry_Tangela - cry Cry_Kangaskhan - cry Cry_Horsea - cry Cry_Seadra - cry Cry_Goldeen - cry Cry_Seaking - cry Cry_Staryu - cry Cry_Starmie - cry Cry_MrMime - cry Cry_Scyther - cry Cry_Jynx - cry Cry_Electabuzz - cry Cry_Magmar - cry Cry_Pinsir - cry Cry_Tauros - cry Cry_Magikarp - cry Cry_Gyarados - cry Cry_Lapras - cry Cry_Ditto - cry Cry_Eevee - cry Cry_Vaporeon - cry Cry_Jolteon - cry Cry_Flareon - cry Cry_Porygon - cry Cry_Omanyte - cry Cry_Omastar - cry Cry_Kabuto - cry Cry_Kabutops - cry Cry_Aerodactyl - cry Cry_Snorlax - cry Cry_Articuno - cry Cry_Zapdos - cry Cry_Moltres - cry Cry_Dratini - cry Cry_Dragonair - cry Cry_Dragonite - cry Cry_Mewtwo - cry Cry_Mew - cry Cry_Chikorita - cry Cry_Bayleef - cry Cry_Meganium - cry Cry_Cyndaquil - cry Cry_Quilava - cry Cry_Typhlosion - cry Cry_Totodile - cry Cry_Croconaw - cry Cry_Feraligatr - cry Cry_Sentret - cry Cry_Furret - cry Cry_Hoothoot - cry Cry_Noctowl - cry Cry_Ledyba - cry Cry_Ledian - cry Cry_Spinarak - cry Cry_Ariados - cry Cry_Crobat - cry Cry_Chinchou - cry Cry_Lanturn - cry Cry_Pichu - cry Cry_Cleffa - cry Cry_Igglybuff - cry Cry_Togepi - cry Cry_Togetic - cry Cry_Natu - cry Cry_Xatu - cry Cry_Mareep - cry Cry_Flaaffy - cry Cry_Ampharos - cry Cry_Bellossom - cry Cry_Marill - cry Cry_Azumarill - cry Cry_Sudowoodo - cry Cry_Politoed - cry Cry_Hoppip - cry Cry_Skiploom - cry Cry_Jumpluff - cry Cry_Aipom - cry Cry_Sunkern - cry Cry_Sunflora - cry Cry_Yanma - cry Cry_Wooper - cry Cry_Quagsire - cry Cry_Espeon - cry Cry_Umbreon - cry Cry_Murkrow - cry Cry_Slowking - cry Cry_Misdreavus - cry Cry_Unown - cry Cry_Wobbuffet - cry Cry_Girafarig - cry Cry_Pineco - cry Cry_Forretress - cry Cry_Dunsparce - cry Cry_Gligar - cry Cry_Steelix - cry Cry_Snubbull - cry Cry_Granbull - cry Cry_Qwilfish - cry Cry_Scizor - cry Cry_Shuckle - cry Cry_Heracross - cry Cry_Sneasel - cry Cry_Teddiursa - cry Cry_Ursaring - cry Cry_Slugma - cry Cry_Magcargo - cry Cry_Swinub - cry Cry_Piloswine - cry Cry_Corsola - cry Cry_Remoraid - cry Cry_Octillery - cry Cry_Delibird - cry Cry_Mantine - cry Cry_Skarmory - cry Cry_Houndour - cry Cry_Houndoom - cry Cry_Kingdra - cry Cry_Phanpy - cry Cry_Donphan - cry Cry_Porygon2 - cry Cry_Stantler - cry Cry_Smeargle - cry Cry_Tyrogue - cry Cry_Hitmontop - cry Cry_Smoochum - cry Cry_Elekid - cry Cry_Magby - cry Cry_Miltank - cry Cry_Blissey - cry Cry_Raikou - cry Cry_Entei - cry Cry_Suicune - cry Cry_Larvitar - cry Cry_Pupitar - cry Cry_Tyranitar - cry Cry_Lugia - cry Cry_HoOh - cry Cry_Celebi - cry Cry_Kecleon - cry Cry_Roselia - cry Cry_Torkoal - cry Cry_Electrike - cry Cry_Manectric - cry Cry_Duskull - cry Cry_Latias - cry Cry_Wynaut - cry Cry_Seviper - cry Cry_Sharpedo - cry Cry_Zangoose - cry Cry_Azurill - cry Cry_Swablu - cry Cry_Altaria - cry Cry_Unused265 - cry Cry_Taillow - cry Cry_Swellow - cry Cry_Unused268 - cry Cry_Spinda - cry Cry_Torchic - cry Cry_Combusken - cry Cry_Blaziken - cry Cry_Treecko - cry Cry_Grovyle - cry Cry_Sceptile - cry Cry_Mudkip - cry Cry_Marshtomp - cry Cry_Swampert - cry Cry_Pelipper - cry Cry_Wingull - cry Cry_Banette - cry Cry_Shuppet - cry Cry_Lotad - cry Cry_Lombre - cry Cry_Ludicolo - cry Cry_Seedot - cry Cry_Nuzleaf - cry Cry_Shiftry - cry Cry_Carvanha - cry Cry_Wurmple - cry Cry_Silcoon - cry Cry_Beautifly - cry Cry_Cascoon - cry Cry_Dustox - cry Cry_Ralts - cry Cry_Kirlia - cry Cry_Gardevoir - cry Cry_Slakoth - cry Cry_Vigoroth - cry Cry_Slaking - cry Cry_Nincada - cry Cry_Ninjask - cry Cry_Shedinja - cry Cry_Makuhita - cry Cry_Hariyama - cry Cry_Nosepass - cry Cry_Glalie - cry Cry_Plusle - cry Cry_Minun - cry Cry_Surskit - cry Cry_Masquerain - cry Cry_Skitty - cry Cry_Delcatty - cry Cry_Gulpin - cry Cry_Swalot - cry Cry_Numel - cry Cry_Camerupt - cry Cry_Barboach - cry Cry_Whiscash - cry Cry_Corphish - cry Cry_Crawdaunt - cry Cry_Spoink - cry Cry_Grumpig - cry Cry_Trapinch - cry Cry_Vibrava - cry Cry_Flygon - cry Cry_Cacnea - cry Cry_Cacturne - cry Cry_Baltoy - cry Cry_Claydol - cry Cry_Lunatone - cry Cry_Solrock - cry Cry_Feebas - cry Cry_Milotic - cry Cry_Absol - cry Cry_Meditite - cry Cry_Medicham - cry Cry_Spheal - cry Cry_Sealeo - cry Cry_Walrein - cry Cry_Clamperl - cry Cry_Huntail - cry Cry_Gorebyss - cry Cry_Lileep - cry Cry_Cradily - cry Cry_Anorith - cry Cry_Armaldo - cry Cry_Beldum - cry Cry_Metang - cry Cry_Metagross - cry Cry_Bagon - cry Cry_Shelgon - cry Cry_Regirock - cry Cry_Regice - cry Cry_Registeel - cry Cry_Castform - cry Cry_Volbeat - cry Cry_Illumise - cry Cry_Poochyena - cry Cry_Mightyena - cry Cry_Dusclops - cry Cry_Sableye - cry Cry_Mawile - cry Cry_Aron - cry Cry_Lairon - cry Cry_Aggron - cry Cry_Relicanth - cry Cry_Luvdisc - cry Cry_Groudon - cry Cry_Kyogre - cry Cry_Rayquaza - cry Cry_Salamence - cry Cry_Breloom - cry Cry_Shroomish - cry Cry_Linoone - cry Cry_Tropius - cry Cry_Wailmer - cry Cry_Zigzagoon - cry Cry_Exploud - cry Cry_Loudred - cry Cry_Wailord - cry Cry_Whismur - cry Cry_Snorunt - cry Cry_Latios - cry Cry_Jirachi - cry Cry_Deoxys - cry Cry_Chimecho + cry Cry_Bulbasaur + cry Cry_Ivysaur + cry Cry_Venusaur + cry Cry_Charmander + cry Cry_Charmeleon + cry Cry_Charizard + cry Cry_Squirtle + cry Cry_Wartortle + cry Cry_Blastoise + cry Cry_Caterpie + cry Cry_Metapod + cry Cry_Butterfree + cry Cry_Weedle + cry Cry_Kakuna + cry Cry_Beedrill + cry Cry_Pidgey + cry Cry_Pidgeotto + cry Cry_Pidgeot + cry Cry_Rattata + cry Cry_Raticate + cry Cry_Spearow + cry Cry_Fearow + cry Cry_Ekans + cry Cry_Arbok + cry Cry_Pikachu + cry Cry_Raichu + cry Cry_Sandshrew + cry Cry_Sandslash + cry Cry_NidoranF + cry Cry_Nidorina + cry Cry_Nidoqueen + cry Cry_NidoranM + cry Cry_Nidorino + cry Cry_Nidoking + cry Cry_Clefairy + cry Cry_Clefable + cry Cry_Vulpix + cry Cry_Ninetales + cry Cry_Jigglypuff + cry Cry_Wigglytuff + cry Cry_Zubat + cry Cry_Golbat + cry Cry_Oddish + cry Cry_Gloom + cry Cry_Vileplume + cry Cry_Paras + cry Cry_Parasect + cry Cry_Venonat + cry Cry_Venomoth + cry Cry_Diglett + cry Cry_Dugtrio + cry Cry_Meowth + cry Cry_Persian + cry Cry_Psyduck + cry Cry_Golduck + cry Cry_Mankey + cry Cry_Primeape + cry Cry_Growlithe + cry Cry_Arcanine + cry Cry_Poliwag + cry Cry_Poliwhirl + cry Cry_Poliwrath + cry Cry_Abra + cry Cry_Kadabra + cry Cry_Alakazam + cry Cry_Machop + cry Cry_Machoke + cry Cry_Machamp + cry Cry_Bellsprout + cry Cry_Weepinbell + cry Cry_Victreebel + cry Cry_Tentacool + cry Cry_Tentacruel + cry Cry_Geodude + cry Cry_Graveler + cry Cry_Golem + cry Cry_Ponyta + cry Cry_Rapidash + cry Cry_Slowpoke + cry Cry_Slowbro + cry Cry_Magnemite + cry Cry_Magneton + cry Cry_Farfetchd + cry Cry_Doduo + cry Cry_Dodrio + cry Cry_Seel + cry Cry_Dewgong + cry Cry_Grimer + cry Cry_Muk + cry Cry_Shellder + cry Cry_Cloyster + cry Cry_Gastly + cry Cry_Haunter + cry Cry_Gengar + cry Cry_Onix + cry Cry_Drowzee + cry Cry_Hypno + cry Cry_Krabby + cry Cry_Kingler + cry Cry_Voltorb + cry Cry_Electrode + cry Cry_Exeggcute + cry Cry_Exeggutor + cry Cry_Cubone + cry Cry_Marowak + cry Cry_Hitmonlee + cry Cry_Hitmonchan + cry Cry_Lickitung + cry Cry_Koffing + cry Cry_Weezing + cry Cry_Rhyhorn + cry Cry_Rhydon + cry Cry_Chansey + cry Cry_Tangela + cry Cry_Kangaskhan + cry Cry_Horsea + cry Cry_Seadra + cry Cry_Goldeen + cry Cry_Seaking + cry Cry_Staryu + cry Cry_Starmie + cry Cry_MrMime + cry Cry_Scyther + cry Cry_Jynx + cry Cry_Electabuzz + cry Cry_Magmar + cry Cry_Pinsir + cry Cry_Tauros + cry Cry_Magikarp + cry Cry_Gyarados + cry Cry_Lapras + cry Cry_Ditto + cry Cry_Eevee + cry Cry_Vaporeon + cry Cry_Jolteon + cry Cry_Flareon + cry Cry_Porygon + cry Cry_Omanyte + cry Cry_Omastar + cry Cry_Kabuto + cry Cry_Kabutops + cry Cry_Aerodactyl + cry Cry_Snorlax + cry Cry_Articuno + cry Cry_Zapdos + cry Cry_Moltres + cry Cry_Dratini + cry Cry_Dragonair + cry Cry_Dragonite + cry Cry_Mewtwo + cry Cry_Mew + cry Cry_Chikorita + cry Cry_Bayleef + cry Cry_Meganium + cry Cry_Cyndaquil + cry Cry_Quilava + cry Cry_Typhlosion + cry Cry_Totodile + cry Cry_Croconaw + cry Cry_Feraligatr + cry Cry_Sentret + cry Cry_Furret + cry Cry_Hoothoot + cry Cry_Noctowl + cry Cry_Ledyba + cry Cry_Ledian + cry Cry_Spinarak + cry Cry_Ariados + cry Cry_Crobat + cry Cry_Chinchou + cry Cry_Lanturn + cry Cry_Pichu + cry Cry_Cleffa + cry Cry_Igglybuff + cry Cry_Togepi + cry Cry_Togetic + cry Cry_Natu + cry Cry_Xatu + cry Cry_Mareep + cry Cry_Flaaffy + cry Cry_Ampharos + cry Cry_Bellossom + cry Cry_Marill + cry Cry_Azumarill + cry Cry_Sudowoodo + cry Cry_Politoed + cry Cry_Hoppip + cry Cry_Skiploom + cry Cry_Jumpluff + cry Cry_Aipom + cry Cry_Sunkern + cry Cry_Sunflora + cry Cry_Yanma + cry Cry_Wooper + cry Cry_Quagsire + cry Cry_Espeon + cry Cry_Umbreon + cry Cry_Murkrow + cry Cry_Slowking + cry Cry_Misdreavus + cry Cry_Unown + cry Cry_Wobbuffet + cry Cry_Girafarig + cry Cry_Pineco + cry Cry_Forretress + cry Cry_Dunsparce + cry Cry_Gligar + cry Cry_Steelix + cry Cry_Snubbull + cry Cry_Granbull + cry Cry_Qwilfish + cry Cry_Scizor + cry Cry_Shuckle + cry Cry_Heracross + cry Cry_Sneasel + cry Cry_Teddiursa + cry Cry_Ursaring + cry Cry_Slugma + cry Cry_Magcargo + cry Cry_Swinub + cry Cry_Piloswine + cry Cry_Corsola + cry Cry_Remoraid + cry Cry_Octillery + cry Cry_Delibird + cry Cry_Mantine + cry Cry_Skarmory + cry Cry_Houndour + cry Cry_Houndoom + cry Cry_Kingdra + cry Cry_Phanpy + cry Cry_Donphan + cry Cry_Porygon2 + cry Cry_Stantler + cry Cry_Smeargle + cry Cry_Tyrogue + cry Cry_Hitmontop + cry Cry_Smoochum + cry Cry_Elekid + cry Cry_Magby + cry Cry_Miltank + cry Cry_Blissey + cry Cry_Raikou + cry Cry_Entei + cry Cry_Suicune + cry Cry_Larvitar + cry Cry_Pupitar + cry Cry_Tyranitar + cry Cry_Lugia + cry Cry_HoOh + cry Cry_Celebi + cry Cry_Kecleon + cry Cry_Roselia + cry Cry_Torkoal + cry Cry_Electrike + cry Cry_Manectric + cry Cry_Duskull + cry Cry_Latias + cry Cry_Wynaut + cry Cry_Seviper + cry Cry_Sharpedo + cry Cry_Zangoose + cry Cry_Azurill + cry Cry_Swablu + cry Cry_Altaria + cry Cry_Unused265 + cry Cry_Taillow + cry Cry_Swellow + cry Cry_Unused268 + cry Cry_Spinda + cry Cry_Torchic + cry Cry_Combusken + cry Cry_Blaziken + cry Cry_Treecko + cry Cry_Grovyle + cry Cry_Sceptile + cry Cry_Mudkip + cry Cry_Marshtomp + cry Cry_Swampert + cry Cry_Pelipper + cry Cry_Wingull + cry Cry_Banette + cry Cry_Shuppet + cry Cry_Lotad + cry Cry_Lombre + cry Cry_Ludicolo + cry Cry_Seedot + cry Cry_Nuzleaf + cry Cry_Shiftry + cry Cry_Carvanha + cry Cry_Wurmple + cry Cry_Silcoon + cry Cry_Beautifly + cry Cry_Cascoon + cry Cry_Dustox + cry Cry_Ralts + cry Cry_Kirlia + cry Cry_Gardevoir + cry Cry_Slakoth + cry Cry_Vigoroth + cry Cry_Slaking + cry Cry_Nincada + cry Cry_Ninjask + cry Cry_Shedinja + cry Cry_Makuhita + cry Cry_Hariyama + cry Cry_Nosepass + cry Cry_Glalie + cry Cry_Plusle + cry Cry_Minun + cry Cry_Surskit + cry Cry_Masquerain + cry Cry_Skitty + cry Cry_Delcatty + cry Cry_Gulpin + cry Cry_Swalot + cry Cry_Numel + cry Cry_Camerupt + cry Cry_Barboach + cry Cry_Whiscash + cry Cry_Corphish + cry Cry_Crawdaunt + cry Cry_Spoink + cry Cry_Grumpig + cry Cry_Trapinch + cry Cry_Vibrava + cry Cry_Flygon + cry Cry_Cacnea + cry Cry_Cacturne + cry Cry_Baltoy + cry Cry_Claydol + cry Cry_Lunatone + cry Cry_Solrock + cry Cry_Feebas + cry Cry_Milotic + cry Cry_Absol + cry Cry_Meditite + cry Cry_Medicham + cry Cry_Spheal + cry Cry_Sealeo + cry Cry_Walrein + cry Cry_Clamperl + cry Cry_Huntail + cry Cry_Gorebyss + cry Cry_Lileep + cry Cry_Cradily + cry Cry_Anorith + cry Cry_Armaldo + cry Cry_Beldum + cry Cry_Metang + cry Cry_Metagross + cry Cry_Bagon + cry Cry_Shelgon + cry Cry_Regirock + cry Cry_Regice + cry Cry_Registeel + cry Cry_Castform + cry Cry_Volbeat + cry Cry_Illumise + cry Cry_Poochyena + cry Cry_Mightyena + cry Cry_Dusclops + cry Cry_Sableye + cry Cry_Mawile + cry Cry_Aron + cry Cry_Lairon + cry Cry_Aggron + cry Cry_Relicanth + cry Cry_Luvdisc + cry Cry_Groudon + cry Cry_Kyogre + cry Cry_Rayquaza + cry Cry_Salamence + cry Cry_Breloom + cry Cry_Shroomish + cry Cry_Linoone + cry Cry_Tropius + cry Cry_Wailmer + cry Cry_Zigzagoon + cry Cry_Exploud + cry Cry_Loudred + cry Cry_Wailord + cry Cry_Whismur + cry Cry_Snorunt + cry Cry_Latios + cry Cry_Jirachi + cry Cry_Deoxys + cry Cry_Chimecho .align 2 gCryTable2:: - cry2 Cry_Bulbasaur - cry2 Cry_Ivysaur - cry2 Cry_Venusaur - cry2 Cry_Charmander - cry2 Cry_Charmeleon - cry2 Cry_Charizard - cry2 Cry_Squirtle - cry2 Cry_Wartortle - cry2 Cry_Blastoise - cry2 Cry_Caterpie - cry2 Cry_Metapod - cry2 Cry_Butterfree - cry2 Cry_Weedle - cry2 Cry_Kakuna - cry2 Cry_Beedrill - cry2 Cry_Pidgey - cry2 Cry_Pidgeotto - cry2 Cry_Pidgeot - cry2 Cry_Rattata - cry2 Cry_Raticate - cry2 Cry_Spearow - cry2 Cry_Fearow - cry2 Cry_Ekans - cry2 Cry_Arbok - cry2 Cry_Pikachu - cry2 Cry_Raichu - cry2 Cry_Sandshrew - cry2 Cry_Sandslash - cry2 Cry_NidoranF - cry2 Cry_Nidorina - cry2 Cry_Nidoqueen - cry2 Cry_NidoranM - cry2 Cry_Nidorino - cry2 Cry_Nidoking - cry2 Cry_Clefairy - cry2 Cry_Clefable - cry2 Cry_Vulpix - cry2 Cry_Ninetales - cry2 Cry_Jigglypuff - cry2 Cry_Wigglytuff - cry2 Cry_Zubat - cry2 Cry_Golbat - cry2 Cry_Oddish - cry2 Cry_Gloom - cry2 Cry_Vileplume - cry2 Cry_Paras - cry2 Cry_Parasect - cry2 Cry_Venonat - cry2 Cry_Venomoth - cry2 Cry_Diglett - cry2 Cry_Dugtrio - cry2 Cry_Meowth - cry2 Cry_Persian - cry2 Cry_Psyduck - cry2 Cry_Golduck - cry2 Cry_Mankey - cry2 Cry_Primeape - cry2 Cry_Growlithe - cry2 Cry_Arcanine - cry2 Cry_Poliwag - cry2 Cry_Poliwhirl - cry2 Cry_Poliwrath - cry2 Cry_Abra - cry2 Cry_Kadabra - cry2 Cry_Alakazam - cry2 Cry_Machop - cry2 Cry_Machoke - cry2 Cry_Machamp - cry2 Cry_Bellsprout - cry2 Cry_Weepinbell - cry2 Cry_Victreebel - cry2 Cry_Tentacool - cry2 Cry_Tentacruel - cry2 Cry_Geodude - cry2 Cry_Graveler - cry2 Cry_Golem - cry2 Cry_Ponyta - cry2 Cry_Rapidash - cry2 Cry_Slowpoke - cry2 Cry_Slowbro - cry2 Cry_Magnemite - cry2 Cry_Magneton - cry2 Cry_Farfetchd - cry2 Cry_Doduo - cry2 Cry_Dodrio - cry2 Cry_Seel - cry2 Cry_Dewgong - cry2 Cry_Grimer - cry2 Cry_Muk - cry2 Cry_Shellder - cry2 Cry_Cloyster - cry2 Cry_Gastly - cry2 Cry_Haunter - cry2 Cry_Gengar - cry2 Cry_Onix - cry2 Cry_Drowzee - cry2 Cry_Hypno - cry2 Cry_Krabby - cry2 Cry_Kingler - cry2 Cry_Voltorb - cry2 Cry_Electrode - cry2 Cry_Exeggcute - cry2 Cry_Exeggutor - cry2 Cry_Cubone - cry2 Cry_Marowak - cry2 Cry_Hitmonlee - cry2 Cry_Hitmonchan - cry2 Cry_Lickitung - cry2 Cry_Koffing - cry2 Cry_Weezing - cry2 Cry_Rhyhorn - cry2 Cry_Rhydon - cry2 Cry_Chansey - cry2 Cry_Tangela - cry2 Cry_Kangaskhan - cry2 Cry_Horsea - cry2 Cry_Seadra - cry2 Cry_Goldeen - cry2 Cry_Seaking - cry2 Cry_Staryu - cry2 Cry_Starmie - cry2 Cry_MrMime - cry2 Cry_Scyther - cry2 Cry_Jynx - cry2 Cry_Electabuzz - cry2 Cry_Magmar - cry2 Cry_Pinsir - cry2 Cry_Tauros - cry2 Cry_Magikarp - cry2 Cry_Gyarados - cry2 Cry_Lapras - cry2 Cry_Ditto - cry2 Cry_Eevee - cry2 Cry_Vaporeon - cry2 Cry_Jolteon - cry2 Cry_Flareon - cry2 Cry_Porygon - cry2 Cry_Omanyte - cry2 Cry_Omastar - cry2 Cry_Kabuto - cry2 Cry_Kabutops - cry2 Cry_Aerodactyl - cry2 Cry_Snorlax - cry2 Cry_Articuno - cry2 Cry_Zapdos - cry2 Cry_Moltres - cry2 Cry_Dratini - cry2 Cry_Dragonair - cry2 Cry_Dragonite - cry2 Cry_Mewtwo - cry2 Cry_Mew - cry2 Cry_Chikorita - cry2 Cry_Bayleef - cry2 Cry_Meganium - cry2 Cry_Cyndaquil - cry2 Cry_Quilava - cry2 Cry_Typhlosion - cry2 Cry_Totodile - cry2 Cry_Croconaw - cry2 Cry_Feraligatr - cry2 Cry_Sentret - cry2 Cry_Furret - cry2 Cry_Hoothoot - cry2 Cry_Noctowl - cry2 Cry_Ledyba - cry2 Cry_Ledian - cry2 Cry_Spinarak - cry2 Cry_Ariados - cry2 Cry_Crobat - cry2 Cry_Chinchou - cry2 Cry_Lanturn - cry2 Cry_Pichu - cry2 Cry_Cleffa - cry2 Cry_Igglybuff - cry2 Cry_Togepi - cry2 Cry_Togetic - cry2 Cry_Natu - cry2 Cry_Xatu - cry2 Cry_Mareep - cry2 Cry_Flaaffy - cry2 Cry_Ampharos - cry2 Cry_Bellossom - cry2 Cry_Marill - cry2 Cry_Azumarill - cry2 Cry_Sudowoodo - cry2 Cry_Politoed - cry2 Cry_Hoppip - cry2 Cry_Skiploom - cry2 Cry_Jumpluff - cry2 Cry_Aipom - cry2 Cry_Sunkern - cry2 Cry_Sunflora - cry2 Cry_Yanma - cry2 Cry_Wooper - cry2 Cry_Quagsire - cry2 Cry_Espeon - cry2 Cry_Umbreon - cry2 Cry_Murkrow - cry2 Cry_Slowking - cry2 Cry_Misdreavus - cry2 Cry_Unown - cry2 Cry_Wobbuffet - cry2 Cry_Girafarig - cry2 Cry_Pineco - cry2 Cry_Forretress - cry2 Cry_Dunsparce - cry2 Cry_Gligar - cry2 Cry_Steelix - cry2 Cry_Snubbull - cry2 Cry_Granbull - cry2 Cry_Qwilfish - cry2 Cry_Scizor - cry2 Cry_Shuckle - cry2 Cry_Heracross - cry2 Cry_Sneasel - cry2 Cry_Teddiursa - cry2 Cry_Ursaring - cry2 Cry_Slugma - cry2 Cry_Magcargo - cry2 Cry_Swinub - cry2 Cry_Piloswine - cry2 Cry_Corsola - cry2 Cry_Remoraid - cry2 Cry_Octillery - cry2 Cry_Delibird - cry2 Cry_Mantine - cry2 Cry_Skarmory - cry2 Cry_Houndour - cry2 Cry_Houndoom - cry2 Cry_Kingdra - cry2 Cry_Phanpy - cry2 Cry_Donphan - cry2 Cry_Porygon2 - cry2 Cry_Stantler - cry2 Cry_Smeargle - cry2 Cry_Tyrogue - cry2 Cry_Hitmontop - cry2 Cry_Smoochum - cry2 Cry_Elekid - cry2 Cry_Magby - cry2 Cry_Miltank - cry2 Cry_Blissey - cry2 Cry_Raikou - cry2 Cry_Entei - cry2 Cry_Suicune - cry2 Cry_Larvitar - cry2 Cry_Pupitar - cry2 Cry_Tyranitar - cry2 Cry_Lugia - cry2 Cry_HoOh - cry2 Cry_Celebi - cry2 Cry_Kecleon - cry2 Cry_Roselia - cry2 Cry_Torkoal - cry2 Cry_Electrike - cry2 Cry_Manectric - cry2 Cry_Duskull - cry2 Cry_Latias - cry2 Cry_Wynaut - cry2 Cry_Seviper - cry2 Cry_Sharpedo - cry2 Cry_Zangoose - cry2 Cry_Azurill - cry2 Cry_Swablu - cry2 Cry_Altaria - cry2 Cry_Unused265 - cry2 Cry_Taillow - cry2 Cry_Swellow - cry2 Cry_Unused268 - cry2 Cry_Spinda - cry2 Cry_Torchic - cry2 Cry_Combusken - cry2 Cry_Blaziken - cry2 Cry_Treecko - cry2 Cry_Grovyle - cry2 Cry_Sceptile - cry2 Cry_Mudkip - cry2 Cry_Marshtomp - cry2 Cry_Swampert - cry2 Cry_Pelipper - cry2 Cry_Wingull - cry2 Cry_Banette - cry2 Cry_Shuppet - cry2 Cry_Lotad - cry2 Cry_Lombre - cry2 Cry_Ludicolo - cry2 Cry_Seedot - cry2 Cry_Nuzleaf - cry2 Cry_Shiftry - cry2 Cry_Carvanha - cry2 Cry_Wurmple - cry2 Cry_Silcoon - cry2 Cry_Beautifly - cry2 Cry_Cascoon - cry2 Cry_Dustox - cry2 Cry_Ralts - cry2 Cry_Kirlia - cry2 Cry_Gardevoir - cry2 Cry_Slakoth - cry2 Cry_Vigoroth - cry2 Cry_Slaking - cry2 Cry_Nincada - cry2 Cry_Ninjask - cry2 Cry_Shedinja - cry2 Cry_Makuhita - cry2 Cry_Hariyama - cry2 Cry_Nosepass - cry2 Cry_Glalie - cry2 Cry_Plusle - cry2 Cry_Minun - cry2 Cry_Surskit - cry2 Cry_Masquerain - cry2 Cry_Skitty - cry2 Cry_Delcatty - cry2 Cry_Gulpin - cry2 Cry_Swalot - cry2 Cry_Numel - cry2 Cry_Camerupt - cry2 Cry_Barboach - cry2 Cry_Whiscash - cry2 Cry_Corphish - cry2 Cry_Crawdaunt - cry2 Cry_Spoink - cry2 Cry_Grumpig - cry2 Cry_Trapinch - cry2 Cry_Vibrava - cry2 Cry_Flygon - cry2 Cry_Cacnea - cry2 Cry_Cacturne - cry2 Cry_Baltoy - cry2 Cry_Claydol - cry2 Cry_Lunatone - cry2 Cry_Solrock - cry2 Cry_Feebas - cry2 Cry_Milotic - cry2 Cry_Absol - cry2 Cry_Meditite - cry2 Cry_Medicham - cry2 Cry_Spheal - cry2 Cry_Sealeo - cry2 Cry_Walrein - cry2 Cry_Clamperl - cry2 Cry_Huntail - cry2 Cry_Gorebyss - cry2 Cry_Lileep - cry2 Cry_Cradily - cry2 Cry_Anorith - cry2 Cry_Armaldo - cry2 Cry_Beldum - cry2 Cry_Metang - cry2 Cry_Metagross - cry2 Cry_Bagon - cry2 Cry_Shelgon - cry2 Cry_Regirock - cry2 Cry_Regice - cry2 Cry_Registeel - cry2 Cry_Castform - cry2 Cry_Volbeat - cry2 Cry_Illumise - cry2 Cry_Poochyena - cry2 Cry_Mightyena - cry2 Cry_Dusclops - cry2 Cry_Sableye - cry2 Cry_Mawile - cry2 Cry_Aron - cry2 Cry_Lairon - cry2 Cry_Aggron - cry2 Cry_Relicanth - cry2 Cry_Luvdisc - cry2 Cry_Groudon - cry2 Cry_Kyogre - cry2 Cry_Rayquaza - cry2 Cry_Salamence - cry2 Cry_Breloom - cry2 Cry_Shroomish - cry2 Cry_Linoone - cry2 Cry_Tropius - cry2 Cry_Wailmer - cry2 Cry_Zigzagoon - cry2 Cry_Exploud - cry2 Cry_Loudred - cry2 Cry_Wailord - cry2 Cry_Whismur - cry2 Cry_Snorunt - cry2 Cry_Latios - cry2 Cry_Jirachi - cry2 Cry_Deoxys - cry2 Cry_Chimecho + cry2 Cry_Bulbasaur + cry2 Cry_Ivysaur + cry2 Cry_Venusaur + cry2 Cry_Charmander + cry2 Cry_Charmeleon + cry2 Cry_Charizard + cry2 Cry_Squirtle + cry2 Cry_Wartortle + cry2 Cry_Blastoise + cry2 Cry_Caterpie + cry2 Cry_Metapod + cry2 Cry_Butterfree + cry2 Cry_Weedle + cry2 Cry_Kakuna + cry2 Cry_Beedrill + cry2 Cry_Pidgey + cry2 Cry_Pidgeotto + cry2 Cry_Pidgeot + cry2 Cry_Rattata + cry2 Cry_Raticate + cry2 Cry_Spearow + cry2 Cry_Fearow + cry2 Cry_Ekans + cry2 Cry_Arbok + cry2 Cry_Pikachu + cry2 Cry_Raichu + cry2 Cry_Sandshrew + cry2 Cry_Sandslash + cry2 Cry_NidoranF + cry2 Cry_Nidorina + cry2 Cry_Nidoqueen + cry2 Cry_NidoranM + cry2 Cry_Nidorino + cry2 Cry_Nidoking + cry2 Cry_Clefairy + cry2 Cry_Clefable + cry2 Cry_Vulpix + cry2 Cry_Ninetales + cry2 Cry_Jigglypuff + cry2 Cry_Wigglytuff + cry2 Cry_Zubat + cry2 Cry_Golbat + cry2 Cry_Oddish + cry2 Cry_Gloom + cry2 Cry_Vileplume + cry2 Cry_Paras + cry2 Cry_Parasect + cry2 Cry_Venonat + cry2 Cry_Venomoth + cry2 Cry_Diglett + cry2 Cry_Dugtrio + cry2 Cry_Meowth + cry2 Cry_Persian + cry2 Cry_Psyduck + cry2 Cry_Golduck + cry2 Cry_Mankey + cry2 Cry_Primeape + cry2 Cry_Growlithe + cry2 Cry_Arcanine + cry2 Cry_Poliwag + cry2 Cry_Poliwhirl + cry2 Cry_Poliwrath + cry2 Cry_Abra + cry2 Cry_Kadabra + cry2 Cry_Alakazam + cry2 Cry_Machop + cry2 Cry_Machoke + cry2 Cry_Machamp + cry2 Cry_Bellsprout + cry2 Cry_Weepinbell + cry2 Cry_Victreebel + cry2 Cry_Tentacool + cry2 Cry_Tentacruel + cry2 Cry_Geodude + cry2 Cry_Graveler + cry2 Cry_Golem + cry2 Cry_Ponyta + cry2 Cry_Rapidash + cry2 Cry_Slowpoke + cry2 Cry_Slowbro + cry2 Cry_Magnemite + cry2 Cry_Magneton + cry2 Cry_Farfetchd + cry2 Cry_Doduo + cry2 Cry_Dodrio + cry2 Cry_Seel + cry2 Cry_Dewgong + cry2 Cry_Grimer + cry2 Cry_Muk + cry2 Cry_Shellder + cry2 Cry_Cloyster + cry2 Cry_Gastly + cry2 Cry_Haunter + cry2 Cry_Gengar + cry2 Cry_Onix + cry2 Cry_Drowzee + cry2 Cry_Hypno + cry2 Cry_Krabby + cry2 Cry_Kingler + cry2 Cry_Voltorb + cry2 Cry_Electrode + cry2 Cry_Exeggcute + cry2 Cry_Exeggutor + cry2 Cry_Cubone + cry2 Cry_Marowak + cry2 Cry_Hitmonlee + cry2 Cry_Hitmonchan + cry2 Cry_Lickitung + cry2 Cry_Koffing + cry2 Cry_Weezing + cry2 Cry_Rhyhorn + cry2 Cry_Rhydon + cry2 Cry_Chansey + cry2 Cry_Tangela + cry2 Cry_Kangaskhan + cry2 Cry_Horsea + cry2 Cry_Seadra + cry2 Cry_Goldeen + cry2 Cry_Seaking + cry2 Cry_Staryu + cry2 Cry_Starmie + cry2 Cry_MrMime + cry2 Cry_Scyther + cry2 Cry_Jynx + cry2 Cry_Electabuzz + cry2 Cry_Magmar + cry2 Cry_Pinsir + cry2 Cry_Tauros + cry2 Cry_Magikarp + cry2 Cry_Gyarados + cry2 Cry_Lapras + cry2 Cry_Ditto + cry2 Cry_Eevee + cry2 Cry_Vaporeon + cry2 Cry_Jolteon + cry2 Cry_Flareon + cry2 Cry_Porygon + cry2 Cry_Omanyte + cry2 Cry_Omastar + cry2 Cry_Kabuto + cry2 Cry_Kabutops + cry2 Cry_Aerodactyl + cry2 Cry_Snorlax + cry2 Cry_Articuno + cry2 Cry_Zapdos + cry2 Cry_Moltres + cry2 Cry_Dratini + cry2 Cry_Dragonair + cry2 Cry_Dragonite + cry2 Cry_Mewtwo + cry2 Cry_Mew + cry2 Cry_Chikorita + cry2 Cry_Bayleef + cry2 Cry_Meganium + cry2 Cry_Cyndaquil + cry2 Cry_Quilava + cry2 Cry_Typhlosion + cry2 Cry_Totodile + cry2 Cry_Croconaw + cry2 Cry_Feraligatr + cry2 Cry_Sentret + cry2 Cry_Furret + cry2 Cry_Hoothoot + cry2 Cry_Noctowl + cry2 Cry_Ledyba + cry2 Cry_Ledian + cry2 Cry_Spinarak + cry2 Cry_Ariados + cry2 Cry_Crobat + cry2 Cry_Chinchou + cry2 Cry_Lanturn + cry2 Cry_Pichu + cry2 Cry_Cleffa + cry2 Cry_Igglybuff + cry2 Cry_Togepi + cry2 Cry_Togetic + cry2 Cry_Natu + cry2 Cry_Xatu + cry2 Cry_Mareep + cry2 Cry_Flaaffy + cry2 Cry_Ampharos + cry2 Cry_Bellossom + cry2 Cry_Marill + cry2 Cry_Azumarill + cry2 Cry_Sudowoodo + cry2 Cry_Politoed + cry2 Cry_Hoppip + cry2 Cry_Skiploom + cry2 Cry_Jumpluff + cry2 Cry_Aipom + cry2 Cry_Sunkern + cry2 Cry_Sunflora + cry2 Cry_Yanma + cry2 Cry_Wooper + cry2 Cry_Quagsire + cry2 Cry_Espeon + cry2 Cry_Umbreon + cry2 Cry_Murkrow + cry2 Cry_Slowking + cry2 Cry_Misdreavus + cry2 Cry_Unown + cry2 Cry_Wobbuffet + cry2 Cry_Girafarig + cry2 Cry_Pineco + cry2 Cry_Forretress + cry2 Cry_Dunsparce + cry2 Cry_Gligar + cry2 Cry_Steelix + cry2 Cry_Snubbull + cry2 Cry_Granbull + cry2 Cry_Qwilfish + cry2 Cry_Scizor + cry2 Cry_Shuckle + cry2 Cry_Heracross + cry2 Cry_Sneasel + cry2 Cry_Teddiursa + cry2 Cry_Ursaring + cry2 Cry_Slugma + cry2 Cry_Magcargo + cry2 Cry_Swinub + cry2 Cry_Piloswine + cry2 Cry_Corsola + cry2 Cry_Remoraid + cry2 Cry_Octillery + cry2 Cry_Delibird + cry2 Cry_Mantine + cry2 Cry_Skarmory + cry2 Cry_Houndour + cry2 Cry_Houndoom + cry2 Cry_Kingdra + cry2 Cry_Phanpy + cry2 Cry_Donphan + cry2 Cry_Porygon2 + cry2 Cry_Stantler + cry2 Cry_Smeargle + cry2 Cry_Tyrogue + cry2 Cry_Hitmontop + cry2 Cry_Smoochum + cry2 Cry_Elekid + cry2 Cry_Magby + cry2 Cry_Miltank + cry2 Cry_Blissey + cry2 Cry_Raikou + cry2 Cry_Entei + cry2 Cry_Suicune + cry2 Cry_Larvitar + cry2 Cry_Pupitar + cry2 Cry_Tyranitar + cry2 Cry_Lugia + cry2 Cry_HoOh + cry2 Cry_Celebi + cry2 Cry_Kecleon + cry2 Cry_Roselia + cry2 Cry_Torkoal + cry2 Cry_Electrike + cry2 Cry_Manectric + cry2 Cry_Duskull + cry2 Cry_Latias + cry2 Cry_Wynaut + cry2 Cry_Seviper + cry2 Cry_Sharpedo + cry2 Cry_Zangoose + cry2 Cry_Azurill + cry2 Cry_Swablu + cry2 Cry_Altaria + cry2 Cry_Unused265 + cry2 Cry_Taillow + cry2 Cry_Swellow + cry2 Cry_Unused268 + cry2 Cry_Spinda + cry2 Cry_Torchic + cry2 Cry_Combusken + cry2 Cry_Blaziken + cry2 Cry_Treecko + cry2 Cry_Grovyle + cry2 Cry_Sceptile + cry2 Cry_Mudkip + cry2 Cry_Marshtomp + cry2 Cry_Swampert + cry2 Cry_Pelipper + cry2 Cry_Wingull + cry2 Cry_Banette + cry2 Cry_Shuppet + cry2 Cry_Lotad + cry2 Cry_Lombre + cry2 Cry_Ludicolo + cry2 Cry_Seedot + cry2 Cry_Nuzleaf + cry2 Cry_Shiftry + cry2 Cry_Carvanha + cry2 Cry_Wurmple + cry2 Cry_Silcoon + cry2 Cry_Beautifly + cry2 Cry_Cascoon + cry2 Cry_Dustox + cry2 Cry_Ralts + cry2 Cry_Kirlia + cry2 Cry_Gardevoir + cry2 Cry_Slakoth + cry2 Cry_Vigoroth + cry2 Cry_Slaking + cry2 Cry_Nincada + cry2 Cry_Ninjask + cry2 Cry_Shedinja + cry2 Cry_Makuhita + cry2 Cry_Hariyama + cry2 Cry_Nosepass + cry2 Cry_Glalie + cry2 Cry_Plusle + cry2 Cry_Minun + cry2 Cry_Surskit + cry2 Cry_Masquerain + cry2 Cry_Skitty + cry2 Cry_Delcatty + cry2 Cry_Gulpin + cry2 Cry_Swalot + cry2 Cry_Numel + cry2 Cry_Camerupt + cry2 Cry_Barboach + cry2 Cry_Whiscash + cry2 Cry_Corphish + cry2 Cry_Crawdaunt + cry2 Cry_Spoink + cry2 Cry_Grumpig + cry2 Cry_Trapinch + cry2 Cry_Vibrava + cry2 Cry_Flygon + cry2 Cry_Cacnea + cry2 Cry_Cacturne + cry2 Cry_Baltoy + cry2 Cry_Claydol + cry2 Cry_Lunatone + cry2 Cry_Solrock + cry2 Cry_Feebas + cry2 Cry_Milotic + cry2 Cry_Absol + cry2 Cry_Meditite + cry2 Cry_Medicham + cry2 Cry_Spheal + cry2 Cry_Sealeo + cry2 Cry_Walrein + cry2 Cry_Clamperl + cry2 Cry_Huntail + cry2 Cry_Gorebyss + cry2 Cry_Lileep + cry2 Cry_Cradily + cry2 Cry_Anorith + cry2 Cry_Armaldo + cry2 Cry_Beldum + cry2 Cry_Metang + cry2 Cry_Metagross + cry2 Cry_Bagon + cry2 Cry_Shelgon + cry2 Cry_Regirock + cry2 Cry_Regice + cry2 Cry_Registeel + cry2 Cry_Castform + cry2 Cry_Volbeat + cry2 Cry_Illumise + cry2 Cry_Poochyena + cry2 Cry_Mightyena + cry2 Cry_Dusclops + cry2 Cry_Sableye + cry2 Cry_Mawile + cry2 Cry_Aron + cry2 Cry_Lairon + cry2 Cry_Aggron + cry2 Cry_Relicanth + cry2 Cry_Luvdisc + cry2 Cry_Groudon + cry2 Cry_Kyogre + cry2 Cry_Rayquaza + cry2 Cry_Salamence + cry2 Cry_Breloom + cry2 Cry_Shroomish + cry2 Cry_Linoone + cry2 Cry_Tropius + cry2 Cry_Wailmer + cry2 Cry_Zigzagoon + cry2 Cry_Exploud + cry2 Cry_Loudred + cry2 Cry_Wailord + cry2 Cry_Whismur + cry2 Cry_Snorunt + cry2 Cry_Latios + cry2 Cry_Jirachi + cry2 Cry_Deoxys + cry2 Cry_Chimecho diff --git a/sound/songs/se_m_absorb.s b/sound/songs/se_m_absorb.s index 35213fdaa9..6cd6223664 100644 --- a/sound/songs/se_m_absorb.s +++ b/sound/songs/se_m_absorb.s @@ -29,7 +29,7 @@ se_m_absorb_1: .byte W01 .byte VOICE , 38 .byte VOL , 58*se_m_absorb_mvl/mxv - .byte N08 , Gn4 + .byte N08 , Gn4 .byte W01 .byte VOL , 68*se_m_absorb_mvl/mxv .byte PAN , c_v+8 diff --git a/sound/songs/se_m_absorb_2.s b/sound/songs/se_m_absorb_2.s index 3f9df6dc40..6192013338 100644 --- a/sound/songs/se_m_absorb_2.s +++ b/sound/songs/se_m_absorb_2.s @@ -26,15 +26,15 @@ se_m_absorb_2_1: .byte W01 .byte N02 , Dn6 , v112 .byte W02 - .byte Cs6 + .byte Cs6 .byte W03 .byte PAN , c_v+8 - .byte N02 , An5 + .byte N02 , An5 .byte W02 - .byte Fs5 + .byte Fs5 .byte W01 .byte W01 - .byte Dn5 + .byte Dn5 .byte W02 .byte PAN , c_v-7 .byte W01 @@ -52,7 +52,7 @@ se_m_absorb_2_1: .byte W02 .byte PAN , c_v+15 .byte W01 - .byte N02 , Dn6 + .byte N02 , Dn6 .byte W02 .byte Cs6 , v084 .byte W03 @@ -89,17 +89,17 @@ se_m_absorb_2_2: .byte BEND , c_v+15 .byte N02 , An6 , v112 .byte W02 - .byte Fs6 + .byte Fs6 .byte W01 .byte W01 - .byte Dn6 + .byte Dn6 .byte W02 .byte W01 - .byte Cs6 + .byte Cs6 .byte W02 - .byte An5 + .byte An5 .byte W03 - .byte N02 + .byte N02 .byte W02 .byte Fs5 , v104 .byte W01 diff --git a/sound/songs/se_m_acid_armor.s b/sound/songs/se_m_acid_armor.s index c7f350a9b5..346c766047 100644 --- a/sound/songs/se_m_acid_armor.s +++ b/sound/songs/se_m_acid_armor.s @@ -35,15 +35,15 @@ se_m_acid_armor_1: .byte W02 .byte VOICE , 23 .byte PAN , c_v+11 - .byte N01 , Cn1 + .byte N01 , Cn1 .byte W01 .byte PAN , c_v-10 - .byte N01 , Cn2 + .byte N01 , Cn2 .byte W01 .byte VOICE , 31 .byte PAN , c_v+6 .byte BEND , c_v-37 - .byte N06 , Dn1 + .byte N06 , Dn1 .byte W01 .byte BEND , c_v-16 .byte W01 @@ -55,15 +55,15 @@ se_m_acid_armor_1: .byte W01 .byte VOICE , 23 .byte PAN , c_v-1 - .byte N01 , Fn1 + .byte N01 , Fn1 .byte W01 .byte PAN , c_v-10 - .byte N01 , Fn2 + .byte N01 , Fn2 .byte W01 .byte VOICE , 31 .byte PAN , c_v+0 .byte BEND , c_v-37 - .byte N02 , Gn0 + .byte N02 , Gn0 .byte W02 .byte BEND , c_v-16 .byte W01 @@ -71,21 +71,21 @@ se_m_acid_armor_1: .byte W01 .byte PAN , c_v+5 .byte BEND , c_v+27 - .byte N02 + .byte N02 .byte W01 .byte BEND , c_v+46 .byte W01 .byte VOICE , 23 .byte PAN , c_v+10 - .byte N01 , Cn1 + .byte N01 , Cn1 .byte W02 .byte PAN , c_v-9 - .byte N01 , Cn2 + .byte N01 , Cn2 .byte W01 .byte VOICE , 31 .byte PAN , c_v+0 .byte BEND , c_v-37 - .byte N06 , Dn1 + .byte N06 , Dn1 .byte W01 .byte BEND , c_v-16 .byte W01 @@ -97,10 +97,10 @@ se_m_acid_armor_1: .byte W01 .byte VOICE , 23 .byte PAN , c_v+5 - .byte N01 , Cn1 + .byte N01 , Cn1 .byte W01 .byte PAN , c_v-8 - .byte N01 , Cn2 + .byte N01 , Cn2 .byte W01 .byte VOICE , 31 .byte PAN , c_v+0 @@ -125,7 +125,7 @@ se_m_acid_armor_1: .byte VOICE , 31 .byte PAN , c_v+6 .byte BEND , c_v-37 - .byte N06 , Dn1 + .byte N06 , Dn1 .byte W01 .byte BEND , c_v-16 .byte W01 @@ -140,7 +140,7 @@ se_m_acid_armor_1: .byte N01 , Fn1 , v084 .byte W01 .byte PAN , c_v-10 - .byte N01 , Fn2 + .byte N01 , Fn2 .byte W01 .byte VOICE , 31 .byte PAN , c_v+0 @@ -162,7 +162,7 @@ se_m_acid_armor_1: .byte N01 , Cn1 , v068 .byte W01 .byte PAN , c_v-9 - .byte N01 , Cn2 + .byte N01 , Cn2 .byte W01 .byte VOICE , 31 .byte PAN , c_v+0 diff --git a/sound/songs/se_m_attract2.s b/sound/songs/se_m_attract2.s index 7d3d6f3c55..9b846f13e4 100644 --- a/sound/songs/se_m_attract2.s +++ b/sound/songs/se_m_attract2.s @@ -34,7 +34,7 @@ se_m_attract2_1: .byte W12 .byte c_v+0 .byte W06 - .byte N54 , Cn4 + .byte N54 , Cn4 .byte W06 .byte PAN , c_v+6 .byte W12 @@ -45,7 +45,7 @@ se_m_attract2_1: .byte c_v+0 .byte W12 .byte c_v-4 - .byte N54 , Dn4 + .byte N54 , Dn4 .byte W12 .byte PAN , c_v-10 .byte W12 @@ -55,7 +55,7 @@ se_m_attract2_1: .byte W12 .byte c_v+6 .byte W06 - .byte N54 , Cn4 + .byte N54 , Cn4 .byte W06 .byte PAN , c_v+9 .byte W12 diff --git a/sound/songs/se_m_bite.s b/sound/songs/se_m_bite.s index 3c51a8f2ff..15d690e2e8 100644 --- a/sound/songs/se_m_bite.s +++ b/sound/songs/se_m_bite.s @@ -25,11 +25,11 @@ se_m_bite_1: .byte BEND , c_v+0 .byte N02 , Gn3 , v112 .byte W02 - .byte Gs3 + .byte Gs3 .byte W01 .byte PAN , c_v-7 .byte W01 - .byte N02 , An3 + .byte N02 , An3 .byte W02 .byte PAN , c_v+7 .byte W02 @@ -79,7 +79,7 @@ se_m_bite_2: .byte W10 .byte N01 , Gn2 , v040 .byte W08 - .byte N01 + .byte N01 .byte W06 .byte FINE diff --git a/sound/songs/se_m_bonemerang.s b/sound/songs/se_m_bonemerang.s index 11f035347e..9339809364 100644 --- a/sound/songs/se_m_bonemerang.s +++ b/sound/songs/se_m_bonemerang.s @@ -26,18 +26,18 @@ se_m_bonemerang_1: .byte N01 , Cn5 , v127 .byte W01 .byte PAN , c_v+10 - .byte N01 , Cn6 + .byte N01 , Cn6 .byte W01 .byte PAN , c_v+0 - .byte N01 , Cn5 + .byte N01 , Cn5 .byte W04 - .byte N01 + .byte N01 .byte W01 .byte PAN , c_v-11 - .byte N01 , Cn6 + .byte N01 , Cn6 .byte W01 .byte PAN , c_v+0 - .byte N01 , Cn5 + .byte N01 , Cn5 .byte W04 .byte FINE diff --git a/sound/songs/se_m_brick_break.s b/sound/songs/se_m_brick_break.s index 08058089f0..ce13218d24 100644 --- a/sound/songs/se_m_brick_break.s +++ b/sound/songs/se_m_brick_break.s @@ -23,7 +23,7 @@ se_m_brick_break_1: .byte PAN , c_v+0 .byte N01 , Cn4 , v127 .byte W01 - .byte N03 , Cn5 + .byte N03 , Cn5 .byte W01 .byte PAN , c_v+5 .byte W01 @@ -63,23 +63,23 @@ se_m_brick_break_2: .byte PAN , c_v+0 .byte N01 , Cn3 , v064 .byte W01 - .byte N03 , Gn3 + .byte N03 , Gn3 .byte W05 .byte W01 .byte N02 , En4 , v040 .byte W05 - .byte Gn3 + .byte Gn3 .byte W04 .byte En4 , v032 .byte W02 .byte W03 - .byte Gn3 + .byte Gn3 .byte W03 .byte W02 .byte En4 , v020 .byte W04 .byte W01 - .byte Gn3 + .byte Gn3 .byte W05 .byte FINE diff --git a/sound/songs/se_m_bubble.s b/sound/songs/se_m_bubble.s index ee31a176b1..4e1b988d59 100644 --- a/sound/songs/se_m_bubble.s +++ b/sound/songs/se_m_bubble.s @@ -37,7 +37,7 @@ se_m_bubble_1: .byte W02 .byte PAN , c_v+0 .byte BEND , c_v-1 - .byte N03 , En3 + .byte N03 , En3 .byte W15 .byte FINE diff --git a/sound/songs/se_m_bubble3.s b/sound/songs/se_m_bubble3.s index c14badb5a9..d9a7f1e82b 100644 --- a/sound/songs/se_m_bubble3.s +++ b/sound/songs/se_m_bubble3.s @@ -38,7 +38,7 @@ se_m_bubble3_1: .byte PAN , c_v+0 .byte BEND , c_v-1 .byte W03 - .byte N06 + .byte N06 .byte W03 .byte BEND , c_v+6 .byte W01 diff --git a/sound/songs/se_m_charm.s b/sound/songs/se_m_charm.s index ef10cb3e3f..2bb2e0ef37 100644 --- a/sound/songs/se_m_charm.s +++ b/sound/songs/se_m_charm.s @@ -32,7 +32,7 @@ se_m_charm_1: .byte VOL , 62*se_m_charm_mvl/mxv .byte PAN , c_v-4 .byte BEND , c_v+0 - .byte N15 + .byte N15 .byte W01 .byte VOL , 77*se_m_charm_mvl/mxv .byte PAN , c_v+0 diff --git a/sound/songs/se_m_confuse_ray.s b/sound/songs/se_m_confuse_ray.s index 12aea8ab8d..78407b8c11 100644 --- a/sound/songs/se_m_confuse_ray.s +++ b/sound/songs/se_m_confuse_ray.s @@ -56,7 +56,7 @@ se_m_confuse_ray_1: .byte c_v-17 .byte W01 .byte c_v-1 - .byte N12 , As2 + .byte N12 , As2 .byte W02 .byte PAN , c_v+4 .byte BEND , c_v+8 @@ -82,7 +82,7 @@ se_m_confuse_ray_1: .byte c_v-16 .byte W01 .byte c_v-1 - .byte N12 , As2 + .byte N12 , As2 .byte W03 .byte PAN , c_v+4 .byte BEND , c_v+8 diff --git a/sound/songs/se_m_cosmic_power.s b/sound/songs/se_m_cosmic_power.s index 76812478b3..3e3f53c5ec 100644 --- a/sound/songs/se_m_cosmic_power.s +++ b/sound/songs/se_m_cosmic_power.s @@ -27,24 +27,24 @@ se_m_cosmic_power_1: .byte W06 .byte W03 .byte PAN , c_v-5 - .byte N08 , Cn5 + .byte N08 , Cn5 .byte W03 .byte W06 .byte PAN , c_v-9 - .byte N10 , Gn5 + .byte N10 , Gn5 .byte W06 .byte W04 .byte PAN , c_v-5 - .byte N09 , Fn6 + .byte N09 , Fn6 .byte W02 .byte W06 .byte W02 .byte PAN , c_v+0 - .byte N09 , An5 + .byte N09 , An5 .byte W04 .byte W06 .byte PAN , c_v+4 - .byte N09 , As5 + .byte N09 , As5 .byte W06 .byte W03 .byte PAN , c_v+9 @@ -129,19 +129,19 @@ se_m_cosmic_power_2: .byte W02 .byte W06 .byte W01 - .byte N10 , Ds5 + .byte N10 , Ds5 .byte W05 .byte W06 - .byte N09 , As6 + .byte N09 , As6 .byte W06 .byte W03 - .byte Cn6 + .byte Cn6 .byte W03 .byte W06 - .byte N10 , Fn5 + .byte N10 , Fn5 .byte W06 .byte W04 - .byte N08 + .byte N08 .byte W02 .byte W06 .byte W01 diff --git a/sound/songs/se_m_detect.s b/sound/songs/se_m_detect.s index 181fb4079a..f06802802a 100644 --- a/sound/songs/se_m_detect.s +++ b/sound/songs/se_m_detect.s @@ -31,7 +31,7 @@ se_m_detect_1: .byte c_v+4 .byte W01 .byte c_v+1 - .byte N06 , Bn5 + .byte N06 , Bn5 .byte W01 .byte PAN , c_v+0 .byte W02 @@ -45,7 +45,7 @@ se_m_detect_1: .byte c_v+4 .byte W01 .byte c_v+1 - .byte N06 , Bn5 + .byte N06 , Bn5 .byte W01 .byte PAN , c_v+0 .byte W04 @@ -59,7 +59,7 @@ se_m_detect_1: .byte c_v+4 .byte W01 .byte c_v+1 - .byte N06 , Bn5 + .byte N06 , Bn5 .byte W02 .byte PAN , c_v+0 .byte W04 @@ -72,7 +72,7 @@ se_m_detect_1: .byte c_v+4 .byte W01 .byte c_v+1 - .byte N06 , Bn5 + .byte N06 , Bn5 .byte W01 .byte PAN , c_v+0 .byte W03 diff --git a/sound/songs/se_m_dig.s b/sound/songs/se_m_dig.s index 42fed8ab56..f8d3597d95 100644 --- a/sound/songs/se_m_dig.s +++ b/sound/songs/se_m_dig.s @@ -32,7 +32,7 @@ se_m_dig_1: .byte BEND , c_v+4 .byte W01 .byte c_v+16 - .byte N03 + .byte N03 .byte W01 .byte PAN , c_v-8 .byte BEND , c_v+28 diff --git a/sound/songs/se_m_dive.s b/sound/songs/se_m_dive.s index 2313667fcb..83cc423564 100644 --- a/sound/songs/se_m_dive.s +++ b/sound/songs/se_m_dive.s @@ -30,7 +30,7 @@ se_m_dive_1: .byte W04 .byte PAN , c_v+6 .byte BEND , c_v-14 - .byte N04 + .byte N04 .byte W03 .byte PAN , c_v+3 .byte BEND , c_v-11 @@ -90,7 +90,7 @@ se_m_dive_2: .byte VOL , 105*se_m_dive_mvl/mxv .byte N06 , An2 , v040 .byte W06 - .byte Gn2 + .byte Gn2 .byte W06 .byte Gs3 , v044 .byte W07 diff --git a/sound/songs/se_m_dizzy_punch.s b/sound/songs/se_m_dizzy_punch.s index 886a4bc4e4..31ab74a77f 100644 --- a/sound/songs/se_m_dizzy_punch.s +++ b/sound/songs/se_m_dizzy_punch.s @@ -46,7 +46,7 @@ se_m_dizzy_punch_1: .byte W01 .byte PAN , c_v-13 .byte BEND , c_v+0 - .byte N04 , Cn6 + .byte N04 , Cn6 .byte W01 .byte VOL , 66*se_m_dizzy_punch_mvl/mxv .byte PAN , c_v+0 diff --git a/sound/songs/se_m_dragon_rage.s b/sound/songs/se_m_dragon_rage.s index e9eaefca0b..608d926115 100644 --- a/sound/songs/se_m_dragon_rage.s +++ b/sound/songs/se_m_dragon_rage.s @@ -39,7 +39,7 @@ se_m_dragon_rage_1: .byte W01 .byte VOL , 21*se_m_dragon_rage_mvl/mxv .byte BEND , c_v+10 - .byte N10 , Bn2 + .byte N10 , Bn2 .byte W02 .byte PAN , c_v+5 .byte W01 @@ -54,7 +54,7 @@ se_m_dragon_rage_1: .byte PAN , c_v-2 .byte VOL , 21*se_m_dragon_rage_mvl/mxv .byte BEND , c_v+18 - .byte N10 , Cs3 + .byte N10 , Cs3 .byte W03 .byte PAN , c_v+5 .byte VOL , 47*se_m_dragon_rage_mvl/mxv @@ -69,7 +69,7 @@ se_m_dragon_rage_1: .byte W02 .byte VOL , 20*se_m_dragon_rage_mvl/mxv .byte BEND , c_v+29 - .byte N10 , Dn3 + .byte N10 , Dn3 .byte W01 .byte PAN , c_v+0 .byte W01 @@ -86,7 +86,7 @@ se_m_dragon_rage_1: .byte W01 .byte VOL , 21*se_m_dragon_rage_mvl/mxv .byte BEND , c_v+37 - .byte N10 , En3 + .byte N10 , En3 .byte W02 .byte PAN , c_v-2 .byte VOL , 46*se_m_dragon_rage_mvl/mxv @@ -101,7 +101,7 @@ se_m_dragon_rage_1: .byte c_v-5 .byte VOL , 20*se_m_dragon_rage_mvl/mxv .byte BEND , c_v+42 - .byte N20 , Fs3 + .byte N20 , Fs3 .byte W02 .byte VOL , 47*se_m_dragon_rage_mvl/mxv .byte W01 diff --git a/sound/songs/se_m_earthquake.s b/sound/songs/se_m_earthquake.s index 104eb1befa..928ddfacd8 100644 --- a/sound/songs/se_m_earthquake.s +++ b/sound/songs/se_m_earthquake.s @@ -209,9 +209,9 @@ se_m_earthquake_2: .byte VOL , 110*se_m_earthquake_mvl/mxv .byte N02 , Fn2 , v072 .byte W02 - .byte N01 + .byte N01 .byte W01 - .byte N02 , Gn2 + .byte N02 , Gn2 .byte W03 .byte N01 , Gs2 , v060 .byte W06 @@ -223,87 +223,87 @@ se_m_earthquake_2_000: .byte N06 , Bn1 , v080 .byte W06 .byte PEND - .byte N06 + .byte N06 .byte W06 - .byte N06 + .byte N06 .byte W06 .byte PATT .word se_m_earthquake_2_000 .byte N06 , Bn1 , v080 .byte W06 - .byte N06 + .byte N06 .byte W06 .byte PATT .word se_m_earthquake_2_000 .byte N06 , Bn1 , v080 .byte W06 - .byte N06 + .byte N06 .byte W06 .byte PATT .word se_m_earthquake_2_000 .byte N06 , Bn1 , v080 .byte W06 - .byte N06 + .byte N06 .byte W06 .byte PATT .word se_m_earthquake_2_000 .byte N06 , Bn1 , v080 .byte W06 - .byte N06 + .byte N06 .byte W06 .byte PATT .word se_m_earthquake_2_000 .byte N06 , Bn1 , v080 .byte W06 - .byte N06 + .byte N06 .byte W06 .byte PATT .word se_m_earthquake_2_000 .byte N06 , Bn1 , v080 .byte W06 - .byte N06 + .byte N06 .byte W06 .byte PATT .word se_m_earthquake_2_000 .byte N06 , Bn1 , v080 .byte W06 - .byte N06 + .byte N06 .byte W06 .byte VOL , 106*se_m_earthquake_mvl/mxv .byte PAN , c_v+0 - .byte N06 + .byte N06 .byte W03 .byte VOL , 103*se_m_earthquake_mvl/mxv .byte W03 - .byte N06 + .byte N06 .byte W01 .byte VOL , 97*se_m_earthquake_mvl/mxv .byte W03 .byte 89*se_m_earthquake_mvl/mxv .byte W02 - .byte N06 + .byte N06 .byte W02 .byte VOL , 85*se_m_earthquake_mvl/mxv .byte W04 .byte 78*se_m_earthquake_mvl/mxv .byte PAN , c_v+0 - .byte N06 + .byte N06 .byte W03 .byte VOL , 72*se_m_earthquake_mvl/mxv .byte W03 - .byte N06 + .byte N06 .byte W01 .byte VOL , 66*se_m_earthquake_mvl/mxv .byte W03 .byte 58*se_m_earthquake_mvl/mxv .byte W02 - .byte N06 + .byte N06 .byte W02 .byte VOL , 46*se_m_earthquake_mvl/mxv .byte W04 .byte 30*se_m_earthquake_mvl/mxv .byte PAN , c_v+0 - .byte N06 + .byte N06 .byte W03 .byte VOL , 12*se_m_earthquake_mvl/mxv .byte W03 diff --git a/sound/songs/se_m_encore2.s b/sound/songs/se_m_encore2.s index 9c53cdfe3c..61e522acac 100644 --- a/sound/songs/se_m_encore2.s +++ b/sound/songs/se_m_encore2.s @@ -154,7 +154,7 @@ se_m_encore2_1_000: .byte 12*se_m_encore2_mvl/mxv .byte PAN , c_v-2 .byte W02 - .byte EOT , Cn3 + .byte EOT , Cn3 .byte FINE @******************************************************@ diff --git a/sound/songs/se_m_explosion.s b/sound/songs/se_m_explosion.s index c93f485b88..039c563f78 100644 --- a/sound/songs/se_m_explosion.s +++ b/sound/songs/se_m_explosion.s @@ -25,19 +25,19 @@ se_m_explosion_1: .byte BEND , c_v+0 .byte N01 , Ds3 , v127 .byte W01 - .byte As2 + .byte As2 .byte W02 .byte PAN , c_v-8 - .byte N02 , Gn3 + .byte N02 , Gn3 .byte W01 .byte PAN , c_v+7 .byte W03 .byte c_v+0 - .byte N01 , Ds3 + .byte N01 , Ds3 .byte W01 - .byte As2 + .byte As2 .byte W02 - .byte N54 , Fn3 + .byte N54 , Fn3 .byte W11 .byte BEND , c_v+3 .byte W03 @@ -93,7 +93,7 @@ se_m_explosion_2: .byte VOL , 74*se_m_explosion_mvl/mxv .byte W06 .byte 125*se_m_explosion_mvl/mxv - .byte N02 + .byte N02 .byte W01 .byte VOL , 74*se_m_explosion_mvl/mxv .byte W16 diff --git a/sound/songs/se_m_flamethrower.s b/sound/songs/se_m_flamethrower.s index 29438337ff..4c0c892c1e 100644 --- a/sound/songs/se_m_flamethrower.s +++ b/sound/songs/se_m_flamethrower.s @@ -129,7 +129,7 @@ se_m_flamethrower_1_000: .byte W03 .byte c_v+0 .byte W03 - .byte EOT , Cn3 + .byte EOT , Cn3 .byte FINE @********************** Track 2 **********************@ diff --git a/sound/songs/se_m_flatter.s b/sound/songs/se_m_flatter.s index e3746c990a..799fdba912 100644 --- a/sound/songs/se_m_flatter.s +++ b/sound/songs/se_m_flatter.s @@ -25,9 +25,9 @@ se_m_flatter_1: .byte BEND , c_v+0 .byte N01 , Dn5 , v127 .byte W01 - .byte Gn4 + .byte Gn4 .byte W01 - .byte N09 , En5 + .byte N09 , En5 .byte W02 .byte PAN , c_v+6 .byte W02 diff --git a/sound/songs/se_m_grasswhistle.s b/sound/songs/se_m_grasswhistle.s index 111bc2166d..10c7447873 100644 --- a/sound/songs/se_m_grasswhistle.s +++ b/sound/songs/se_m_grasswhistle.s @@ -35,12 +35,12 @@ se_m_grasswhistle_1: .byte W09 .byte 0 .byte W03 - .byte N09 , An5 + .byte N09 , An5 .byte W12 - .byte En5 + .byte En5 .byte W12 .byte BEND , c_v-14 - .byte N66 , Gn5 + .byte N66 , Gn5 .byte W06 .byte BEND , c_v-8 .byte W06 @@ -85,14 +85,14 @@ se_m_grasswhistle_2: .byte 0 .byte W03 .byte PAN , c_v-12 - .byte N09 , An5 + .byte N09 , An5 .byte W12 .byte PAN , c_v+14 - .byte N09 , En5 + .byte N09 , En5 .byte W12 .byte PAN , c_v-15 .byte BEND , c_v-14 - .byte N66 , Gn5 + .byte N66 , Gn5 .byte W06 .byte BEND , c_v-8 .byte W06 diff --git a/sound/songs/se_m_hail.s b/sound/songs/se_m_hail.s index 0c04af2125..7f1d1c67da 100644 --- a/sound/songs/se_m_hail.s +++ b/sound/songs/se_m_hail.s @@ -31,7 +31,7 @@ se_m_hail_1: .byte N01 , Gn4 , v112 .byte W01 .byte PAN , c_v+0 - .byte N01 , Ds5 + .byte N01 , Ds5 .byte W03 .byte W01 .byte PAN , c_v+6 @@ -41,7 +41,7 @@ se_m_hail_1: .byte N01 , Gn4 , v064 .byte W02 .byte PAN , c_v+0 - .byte N01 , Ds5 + .byte N01 , Ds5 .byte W03 .byte PAN , c_v+11 .byte N02 , Ds5 , v020 @@ -51,7 +51,7 @@ se_m_hail_1: .byte N01 , Gn4 , v064 .byte W01 .byte PAN , c_v+0 - .byte N01 , Ds5 + .byte N01 , Ds5 .byte W04 .byte FINE @@ -64,20 +64,20 @@ se_m_hail_2: .byte PAN , c_v+0 .byte N01 , Dn4 , v040 .byte W04 - .byte Bn3 + .byte Bn3 .byte W02 .byte W03 - .byte Dn4 + .byte Dn4 .byte W03 .byte W01 .byte Bn3 , v032 .byte W05 - .byte Dn4 + .byte Dn4 .byte W03 .byte Bn3 , v012 .byte W03 .byte W02 - .byte Dn4 + .byte Dn4 .byte W04 .byte FINE diff --git a/sound/songs/se_m_haze.s b/sound/songs/se_m_haze.s index 4bf61faa69..11497c8465 100644 --- a/sound/songs/se_m_haze.s +++ b/sound/songs/se_m_haze.s @@ -175,7 +175,7 @@ se_m_haze_1: .byte W03 .byte 6*se_m_haze_mvl/mxv .byte W02 - .byte EOT + .byte EOT .byte FINE @********************** Track 2 **********************@ @@ -192,42 +192,42 @@ se_m_haze_2: .byte W06 .byte W06 .byte W06 - .byte Fs4 + .byte Fs4 .byte W06 .byte W06 .byte W06 .byte W06 - .byte Gn4 + .byte Gn4 .byte W06 .byte W06 .byte W06 .byte W06 - .byte Gs4 + .byte Gs4 .byte W06 .byte W06 .byte W06 .byte W06 - .byte Gn4 + .byte Gn4 .byte W06 .byte W06 .byte W06 .byte W06 - .byte Fs4 + .byte Fs4 .byte W06 .byte W06 .byte W06 .byte W06 - .byte Fn4 + .byte Fn4 .byte W06 .byte W06 .byte W06 .byte W06 - .byte En4 + .byte En4 .byte W06 .byte W06 .byte W06 .byte W06 - .byte N18 , Ds4 + .byte N18 , Ds4 .byte W06 .byte W06 .byte W06 diff --git a/sound/songs/se_m_heal_bell.s b/sound/songs/se_m_heal_bell.s index b2b17f7d84..fbe315c878 100644 --- a/sound/songs/se_m_heal_bell.s +++ b/sound/songs/se_m_heal_bell.s @@ -30,10 +30,10 @@ se_m_heal_bell_1: .byte c_v+11 .byte W01 .byte c_v+1 - .byte N01 , An5 + .byte N01 , An5 .byte W01 .byte MOD , 7 - .byte N18 , Bn5 + .byte N18 , Bn5 .byte W02 .byte PAN , c_v+11 .byte W01 diff --git a/sound/songs/se_m_heat_wave.s b/sound/songs/se_m_heat_wave.s index a4b5cc8962..da5842f8f8 100644 --- a/sound/songs/se_m_heat_wave.s +++ b/sound/songs/se_m_heat_wave.s @@ -145,7 +145,7 @@ se_m_heat_wave_1: .byte W02 .byte VOL , 17*se_m_heat_wave_mvl/mxv .byte W03 - .byte EOT + .byte EOT .byte FINE @********************** Track 2 **********************@ diff --git a/sound/songs/se_m_hydro_pump.s b/sound/songs/se_m_hydro_pump.s index 050f6281be..c214985e47 100644 --- a/sound/songs/se_m_hydro_pump.s +++ b/sound/songs/se_m_hydro_pump.s @@ -76,7 +76,7 @@ se_m_hydro_pump_1: .byte W01 .byte VOL , 6*se_m_hydro_pump_mvl/mxv .byte W05 - .byte EOT + .byte EOT .byte FINE @********************** Track 2 **********************@ diff --git a/sound/songs/se_m_hyper_beam.s b/sound/songs/se_m_hyper_beam.s index bce85a21a2..b6ffcfc2f7 100644 --- a/sound/songs/se_m_hyper_beam.s +++ b/sound/songs/se_m_hyper_beam.s @@ -25,21 +25,21 @@ se_m_hyper_beam_1: .byte BEND , c_v+0 .byte N02 , En3 , v127 .byte W03 - .byte N01 , As3 + .byte N01 , As3 .byte W03 - .byte N02 , Gn3 + .byte N02 , Gn3 .byte W03 - .byte N01 , Cs4 + .byte N01 , Cs4 .byte W03 .byte PAN , c_v+7 .byte N02 , En3 , v072 .byte W03 - .byte N01 , As3 + .byte N01 , As3 .byte W03 .byte PAN , c_v-7 .byte N02 , Gn3 , v040 .byte W03 - .byte N01 , Cs4 + .byte N01 , Cs4 .byte W03 .byte FINE @@ -51,16 +51,16 @@ se_m_hyper_beam_2: .byte VOL , 110*se_m_hyper_beam_mvl/mxv .byte N01 , Cn3 , v040 .byte W02 - .byte N01 + .byte N01 .byte W04 - .byte N01 + .byte N01 .byte W02 - .byte N01 + .byte N01 .byte W04 se_m_hyper_beam_2_000: .byte N01 , Cn3 , v020 .byte W02 - .byte N01 + .byte N01 .byte W04 .byte PEND .byte PATT diff --git a/sound/songs/se_m_hyper_beam2.s b/sound/songs/se_m_hyper_beam2.s index 304fa7b3f2..fb21834222 100644 --- a/sound/songs/se_m_hyper_beam2.s +++ b/sound/songs/se_m_hyper_beam2.s @@ -30,19 +30,19 @@ se_m_hyper_beam2_1: .byte c_v+28 .byte W01 .byte c_v+0 - .byte N02 , Cs4 + .byte N02 , Cs4 .byte W01 .byte BEND , c_v+30 .byte W02 .byte c_v+0 - .byte N03 , As3 + .byte N03 , As3 .byte W01 .byte BEND , c_v+11 .byte W01 .byte c_v+28 .byte W01 .byte c_v+0 - .byte N02 , En4 + .byte N02 , En4 .byte W01 .byte BEND , c_v+30 .byte W02 @@ -55,7 +55,7 @@ se_m_hyper_beam2_1: .byte c_v+28 .byte W01 .byte c_v+0 - .byte N02 , Cs4 + .byte N02 , Cs4 .byte W01 .byte BEND , c_v+30 .byte W02 @@ -68,7 +68,7 @@ se_m_hyper_beam2_1: .byte c_v+28 .byte W01 .byte c_v+0 - .byte N02 , En4 + .byte N02 , En4 .byte W01 .byte BEND , c_v+30 .byte W02 @@ -82,16 +82,16 @@ se_m_hyper_beam2_2: .byte VOL , 110*se_m_hyper_beam2_mvl/mxv .byte N01 , Cn3 , v032 .byte W02 - .byte N01 + .byte N01 .byte W04 - .byte N01 + .byte N01 .byte W02 - .byte N01 + .byte N01 .byte W04 se_m_hyper_beam2_2_000: .byte N01 , Cn3 , v020 .byte W02 - .byte N01 + .byte N01 .byte W04 .byte PEND .byte PATT diff --git a/sound/songs/se_m_icy_wind.s b/sound/songs/se_m_icy_wind.s index d15350525e..b7e83e0321 100644 --- a/sound/songs/se_m_icy_wind.s +++ b/sound/songs/se_m_icy_wind.s @@ -30,7 +30,7 @@ se_m_icy_wind_1: .byte N01 , Ds4 , v112 .byte W01 .byte PAN , c_v+0 - .byte N01 , Bn4 + .byte N01 , Bn4 .byte W03 .byte FINE @@ -43,13 +43,13 @@ se_m_icy_wind_2: .byte PAN , c_v+0 .byte N01 , Dn4 , v040 .byte W04 - .byte Bn3 + .byte Bn3 .byte W02 .byte PAN , c_v-7 .byte W02 .byte c_v+9 .byte W01 - .byte N01 , Dn4 + .byte N01 , Dn4 .byte W01 .byte PAN , c_v-7 .byte W02 diff --git a/sound/songs/se_m_lock_on.s b/sound/songs/se_m_lock_on.s index d8e1de5b0f..9c9576d97c 100644 --- a/sound/songs/se_m_lock_on.s +++ b/sound/songs/se_m_lock_on.s @@ -37,7 +37,7 @@ se_m_lock_on_1: .byte W02 .byte PAN , c_v+6 .byte BEND , c_v+6 - .byte N01 , Cn4 + .byte N01 , Cn4 .byte W01 .byte Gn3 , v064 .byte W02 diff --git a/sound/songs/se_m_milk_drink.s b/sound/songs/se_m_milk_drink.s index 30a051540c..57e3a581d6 100644 --- a/sound/songs/se_m_milk_drink.s +++ b/sound/songs/se_m_milk_drink.s @@ -103,7 +103,7 @@ se_m_milk_drink_2: .byte N06 , Fs6 , v040 .byte W04 .byte W04 - .byte N06 + .byte N06 .byte W02 .byte W06 .byte W01 diff --git a/sound/songs/se_m_minimize.s b/sound/songs/se_m_minimize.s index 565450b2b4..778e0ec7c9 100644 --- a/sound/songs/se_m_minimize.s +++ b/sound/songs/se_m_minimize.s @@ -68,7 +68,7 @@ se_m_minimize_1: .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+28 - .byte N06 , An3 + .byte N06 , An3 .byte W01 .byte BEND , c_v+20 .byte W01 diff --git a/sound/songs/se_m_moonlight.s b/sound/songs/se_m_moonlight.s index bd4410b323..f76181a874 100644 --- a/sound/songs/se_m_moonlight.s +++ b/sound/songs/se_m_moonlight.s @@ -26,18 +26,18 @@ se_m_moonlight_1: .byte BEND , c_v+3 .byte N01 , Ds6 , v092 .byte W01 - .byte Dn6 + .byte Dn6 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 .byte N20 , Gn6 , v100 .byte W21 se_m_moonlight_1_000: .byte N01 , Ds6 , v056 .byte W01 - .byte Dn6 + .byte Dn6 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 .byte N20 , Gn6 , v064 .byte W03 @@ -54,9 +54,9 @@ se_m_moonlight_1_001: .byte PAN , c_v+0 .byte N01 , Gs5 , v092 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 - .byte Cn5 + .byte Cn5 .byte W01 .byte N20 , Cn6 , v100 .byte W21 @@ -65,9 +65,9 @@ se_m_moonlight_1_002: .byte PAN , c_v+16 .byte N01 , Gs5 , v056 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 - .byte Cn5 + .byte Cn5 .byte W01 .byte N20 , Cn6 , v064 .byte W21 @@ -76,31 +76,31 @@ se_m_moonlight_1_003: .byte PAN , c_v-16 .byte N01 , Gs5 , v040 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 - .byte Cn5 + .byte Cn5 .byte W01 - .byte N20 , Cn6 + .byte N20 , Cn6 .byte W21 .byte PEND se_m_moonlight_1_004: .byte PAN , c_v+32 .byte N01 , Gs5 , v020 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 - .byte Cn5 + .byte Cn5 .byte W01 .byte PAN , c_v-32 - .byte N20 , Cn6 + .byte N20 , Cn6 .byte W21 .byte PEND .byte PAN , c_v+0 .byte N01 , Ds6 , v092 .byte W01 - .byte Dn6 + .byte Dn6 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 .byte N20 , Gn6 , v100 .byte W21 @@ -127,11 +127,11 @@ se_m_moonlight_2: .byte W10 .byte N01 , Ds6 , v112 .byte W02 - .byte Dn6 + .byte Dn6 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 - .byte N04 , Gn6 + .byte N04 , Gn6 .byte W05 .byte Gn6 , v096 .byte W05 @@ -154,11 +154,11 @@ se_m_moonlight_2_001: .byte W10 .byte N01 , Gs5 , v112 .byte W02 - .byte Gn5 + .byte Gn5 .byte W01 - .byte Cn5 + .byte Cn5 .byte W01 - .byte N04 , Cn6 + .byte N04 , Cn6 .byte W05 .byte Cn6 , v096 .byte W05 @@ -183,11 +183,11 @@ se_m_moonlight_2_002: .byte W10 .byte N01 , Ds6 , v112 .byte W02 - .byte Dn6 + .byte Dn6 .byte W01 - .byte Gn5 + .byte Gn5 .byte W01 - .byte N04 , Gn6 + .byte N04 , Gn6 .byte W05 .byte Gn6 , v096 .byte W05 diff --git a/sound/songs/se_m_morning_sun.s b/sound/songs/se_m_morning_sun.s index ac7667246f..227098da1f 100644 --- a/sound/songs/se_m_morning_sun.s +++ b/sound/songs/se_m_morning_sun.s @@ -82,7 +82,7 @@ se_m_morning_sun_2: .byte N06 , Gs6 , v108 .byte W03 .byte W03 - .byte Bn5 + .byte Bn5 .byte W03 .byte W03 .byte Gs6 , v100 diff --git a/sound/songs/se_m_nightmare.s b/sound/songs/se_m_nightmare.s index 825bfaea20..f995d13103 100644 --- a/sound/songs/se_m_nightmare.s +++ b/sound/songs/se_m_nightmare.s @@ -37,10 +37,10 @@ se_m_nightmare_1: .byte N03 , Fs3 , v088 .byte W06 .byte PAN , c_v+0 - .byte N03 , Ds3 + .byte N03 , Ds3 .byte W06 .byte PAN , c_v-16 - .byte N03 + .byte N03 .byte W09 .byte PAN , c_v-1 .byte N03 , An2 , v096 @@ -56,10 +56,10 @@ se_m_nightmare_1: .byte W03 .byte W03 .byte PAN , c_v-1 - .byte N03 , Fn3 + .byte N03 , Fn3 .byte W06 .byte PAN , c_v+16 - .byte N03 + .byte N03 .byte W15 .byte FINE @@ -77,55 +77,55 @@ se_m_nightmare_2: .byte W06 .byte PAN , c_v+6 .byte BEND , c_v+36 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v-7 .byte BEND , c_v+17 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v+6 .byte BEND , c_v+2 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v-7 .byte BEND , c_v-8 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v+6 .byte BEND , c_v+12 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v-7 .byte BEND , c_v+6 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v+6 .byte BEND , c_v+0 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v-7 .byte BEND , c_v-6 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v+6 .byte BEND , c_v-19 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v-7 .byte BEND , c_v-31 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v+6 .byte BEND , c_v-44 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v-7 .byte BEND , c_v-55 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v+6 .byte BEND , c_v-64 - .byte N03 + .byte N03 .byte W18 .byte FINE diff --git a/sound/songs/se_m_petal_dance.s b/sound/songs/se_m_petal_dance.s index c8ad2810d9..df5752e4bd 100644 --- a/sound/songs/se_m_petal_dance.s +++ b/sound/songs/se_m_petal_dance.s @@ -33,7 +33,7 @@ se_m_petal_dance_1: .byte Dn6 , v100 .byte W03 .byte W03 - .byte An5 + .byte An5 .byte W03 .byte W03 .byte PAN , c_v-4 @@ -61,7 +61,7 @@ se_m_petal_dance_1: .byte W03 .byte W03 .byte PAN , c_v+4 - .byte N06 , Dn6 + .byte N06 , Dn6 .byte W03 .byte W03 .byte PAN , c_v+0 @@ -137,7 +137,7 @@ se_m_petal_dance_2: .byte Bn5 , v088 .byte W03 .byte W03 - .byte En6 + .byte En6 .byte W03 .byte W03 .byte Bn5 , v084 @@ -158,7 +158,7 @@ se_m_petal_dance_2: .byte En6 , v064 .byte W03 .byte W03 - .byte Bn5 + .byte Bn5 .byte W03 .byte W03 .byte En6 , v060 diff --git a/sound/songs/se_m_rain_dance.s b/sound/songs/se_m_rain_dance.s index 810be06633..bba4dc2b05 100644 --- a/sound/songs/se_m_rain_dance.s +++ b/sound/songs/se_m_rain_dance.s @@ -97,7 +97,7 @@ se_m_rain_dance_1: .byte 1*se_m_rain_dance_mvl/mxv .byte PAN , c_v+4 .byte W06 - .byte EOT + .byte EOT .byte FINE @******************************************************@ diff --git a/sound/songs/se_m_reversal.s b/sound/songs/se_m_reversal.s index 609c399f50..5b62d7156e 100644 --- a/sound/songs/se_m_reversal.s +++ b/sound/songs/se_m_reversal.s @@ -232,35 +232,35 @@ se_m_reversal_2: .byte W02 .byte W01 .byte c_v+31 - .byte N03 , Cs5 + .byte N03 , Cs5 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-33 .byte W03 .byte c_v+31 - .byte N03 , Dn5 + .byte N03 , Dn5 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-33 .byte W02 .byte c_v+31 - .byte N03 , Ds5 + .byte N03 , Ds5 .byte W02 .byte BEND , c_v+0 .byte W01 .byte c_v-33 .byte W02 .byte c_v+31 - .byte N03 , En5 + .byte N03 , En5 .byte W01 .byte BEND , c_v+0 .byte W02 .byte c_v-33 .byte W02 .byte c_v+31 - .byte N03 , Fn5 + .byte N03 , Fn5 .byte W01 .byte BEND , c_v+0 .byte W01 @@ -268,35 +268,35 @@ se_m_reversal_2: .byte W02 .byte W01 .byte c_v+31 - .byte N03 , Fs5 + .byte N03 , Fs5 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-33 .byte W03 .byte c_v+31 - .byte N03 , Gn5 + .byte N03 , Gn5 .byte W01 .byte BEND , c_v+0 .byte W01 .byte c_v-33 .byte W02 .byte c_v+31 - .byte N03 , Gs5 + .byte N03 , Gs5 .byte W02 .byte BEND , c_v+0 .byte W01 .byte c_v-33 .byte W02 .byte c_v+31 - .byte N03 , An5 + .byte N03 , An5 .byte W01 .byte BEND , c_v+0 .byte W02 .byte c_v-33 .byte W02 .byte c_v+31 - .byte N03 , As5 + .byte N03 , As5 .byte W01 .byte BEND , c_v+0 .byte W01 @@ -304,7 +304,7 @@ se_m_reversal_2: .byte W02 .byte W01 .byte c_v+31 - .byte N03 , Bn5 + .byte N03 , Bn5 .byte W01 .byte BEND , c_v+0 .byte W01 diff --git a/sound/songs/se_m_sacred_fire.s b/sound/songs/se_m_sacred_fire.s index 5e6c864e20..0fda9c757a 100644 --- a/sound/songs/se_m_sacred_fire.s +++ b/sound/songs/se_m_sacred_fire.s @@ -27,7 +27,7 @@ se_m_sacred_fire_1: .byte W03 .byte PAN , c_v+0 .byte W01 - .byte N18 , Gn4 + .byte N18 , Gn4 .byte W02 .byte PAN , c_v-5 .byte W01 @@ -70,9 +70,9 @@ se_m_sacred_fire_2: .byte VOL , 110*se_m_sacred_fire_mvl/mxv .byte N01 , Gn2 , v032 .byte W02 - .byte N01 + .byte N01 .byte W02 - .byte N18 + .byte N18 .byte W03 .byte VOL , 98*se_m_sacred_fire_mvl/mxv .byte W03 diff --git a/sound/songs/se_m_sand_tomb.s b/sound/songs/se_m_sand_tomb.s index 8edf0abf88..4c14aabcc4 100644 --- a/sound/songs/se_m_sand_tomb.s +++ b/sound/songs/se_m_sand_tomb.s @@ -126,45 +126,45 @@ se_m_sand_tomb_2: .byte W03 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v100 .byte W04 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v100 .byte W03 .byte W01 .byte En3 , v080 .byte W03 - .byte Dn3 + .byte Dn3 .byte W04 .byte Cn3 , v100 .byte W04 .byte En3 , v080 .byte W03 - .byte Dn3 + .byte Dn3 .byte W04 .byte Cn3 , v100 .byte W03 .byte En3 , v080 .byte W02 .byte W02 - .byte Dn3 + .byte Dn3 .byte W04 .byte Cn3 , v100 .byte W03 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v100 .byte W04 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v092 .byte W04 diff --git a/sound/songs/se_m_sandstorm.s b/sound/songs/se_m_sandstorm.s index 9674cd043f..4cb12a3892 100644 --- a/sound/songs/se_m_sandstorm.s +++ b/sound/songs/se_m_sandstorm.s @@ -161,7 +161,7 @@ se_m_sandstorm_1: .byte 13*se_m_sandstorm_mvl/mxv .byte BEND , c_v-6 .byte W03 - .byte EOT + .byte EOT .byte FINE @********************** Track 2 **********************@ @@ -175,13 +175,13 @@ se_m_sandstorm_2: .byte W03 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v100 .byte W04 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v100 .byte W03 @@ -189,13 +189,13 @@ se_m_sandstorm_2_000: .byte W01 .byte N03 , En3 , v080 .byte W03 - .byte Dn3 + .byte Dn3 .byte W04 .byte Cn3 , v100 .byte W04 .byte En3 , v080 .byte W03 - .byte Dn3 + .byte Dn3 .byte W04 .byte Cn3 , v100 .byte W03 @@ -203,13 +203,13 @@ se_m_sandstorm_2_000: .byte W02 .byte PEND .byte W02 - .byte Dn3 + .byte Dn3 .byte W04 .byte Cn3 , v100 .byte W03 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v100 .byte W04 @@ -219,13 +219,13 @@ se_m_sandstorm_2_000: .byte W03 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v100 .byte W04 .byte En3 , v080 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v100 .byte W03 @@ -254,7 +254,7 @@ se_m_sandstorm_2_000: .byte W04 .byte En3 , v032 .byte W04 - .byte Dn3 + .byte Dn3 .byte W03 .byte Cn3 , v048 .byte W03 diff --git a/sound/songs/se_m_self_destruct.s b/sound/songs/se_m_self_destruct.s index f2ab617ca8..645085e1e5 100644 --- a/sound/songs/se_m_self_destruct.s +++ b/sound/songs/se_m_self_destruct.s @@ -25,9 +25,9 @@ se_m_self_destruct_1: .byte BEND , c_v+0 .byte N01 , Gn3 , v127 .byte W01 - .byte Cn3 + .byte Cn3 .byte W01 - .byte N24 , An3 + .byte N24 , An3 .byte W06 .byte PAN , c_v+6 .byte W04 diff --git a/sound/songs/se_m_sing.s b/sound/songs/se_m_sing.s index f12509f56e..8c48c82247 100644 --- a/sound/songs/se_m_sing.s +++ b/sound/songs/se_m_sing.s @@ -46,7 +46,7 @@ se_m_sing_1: .byte MOD , 0 .byte W03 .byte VOL , 95*se_m_sing_mvl/mxv - .byte N21 , Fn5 + .byte N21 , Fn5 .byte W06 .byte W06 se_m_sing_1_000: @@ -128,7 +128,7 @@ se_m_sing_2: .byte W03 .byte VOL , 95*se_m_sing_mvl/mxv .byte PAN , c_v-12 - .byte N21 , Fn5 + .byte N21 , Fn5 .byte W06 .byte W06 se_m_sing_2_000: diff --git a/sound/songs/se_m_sketch.s b/sound/songs/se_m_sketch.s index 3657d20092..c17c4056f2 100644 --- a/sound/songs/se_m_sketch.s +++ b/sound/songs/se_m_sketch.s @@ -31,7 +31,7 @@ se_m_sketch_1: .byte VOICE , 31 .byte VOL , 40*se_m_sketch_mvl/mxv .byte BEND , c_v-1 - .byte N03 , Cs5 + .byte N03 , Cs5 .byte W01 .byte VOL , 64*se_m_sketch_mvl/mxv .byte PAN , c_v-6 @@ -44,7 +44,7 @@ se_m_sketch_1: .byte VOL , 110*se_m_sketch_mvl/mxv .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N02 , As5 + .byte N02 , As5 .byte W01 .byte BEND , c_v+12 .byte W01 diff --git a/sound/songs/se_m_sky_uppercut.s b/sound/songs/se_m_sky_uppercut.s index 66a791f96c..bed6c19c5f 100644 --- a/sound/songs/se_m_sky_uppercut.s +++ b/sound/songs/se_m_sky_uppercut.s @@ -29,7 +29,7 @@ se_m_sky_uppercut_1: .byte W03 .byte 93*se_m_sky_uppercut_mvl/mxv .byte PAN , c_v-6 - .byte N02 , Cn5 + .byte N02 , Cn5 .byte W03 .byte VOL , 110*se_m_sky_uppercut_mvl/mxv .byte W01 @@ -74,9 +74,9 @@ se_m_sky_uppercut_2: .byte VOL , 110*se_m_sky_uppercut_mvl/mxv .byte N02 , Cn3 , v060 .byte W03 - .byte Gn2 + .byte Gn2 .byte W03 - .byte Gs4 + .byte Gs4 .byte W04 .byte Gs4 , v020 .byte W02 diff --git a/sound/songs/se_m_snore.s b/sound/songs/se_m_snore.s index aff9ef5e37..13e2f6f52b 100644 --- a/sound/songs/se_m_snore.s +++ b/sound/songs/se_m_snore.s @@ -63,28 +63,28 @@ se_m_snore_2: .byte VOICE , 27 .byte N01 , En2 , v052 .byte W02 - .byte Dn2 + .byte Dn2 .byte W02 - .byte En2 + .byte En2 .byte W02 .byte W01 - .byte Dn2 + .byte Dn2 .byte W02 - .byte En2 + .byte En2 .byte W03 .byte W01 .byte En2 , v064 .byte W02 - .byte Gs2 + .byte Gs2 .byte W03 - .byte Dn3 + .byte Dn3 .byte W02 - .byte En2 + .byte En2 .byte W02 - .byte Gs2 + .byte Gs2 .byte W02 .byte W01 - .byte Dn3 + .byte Dn3 .byte W05 .byte FINE diff --git a/sound/songs/se_m_solar_beam.s b/sound/songs/se_m_solar_beam.s index c260c332ab..6a12b4a10e 100644 --- a/sound/songs/se_m_solar_beam.s +++ b/sound/songs/se_m_solar_beam.s @@ -145,7 +145,7 @@ se_m_solar_beam_1: .byte W02 .byte VOL , 5*se_m_solar_beam_mvl/mxv .byte W04 - .byte EOT + .byte EOT .byte FINE @******************************************************@ diff --git a/sound/songs/se_m_spit_up.s b/sound/songs/se_m_spit_up.s index 5d96c7b869..1073ad01fc 100644 --- a/sound/songs/se_m_spit_up.s +++ b/sound/songs/se_m_spit_up.s @@ -34,7 +34,7 @@ se_m_spit_up_1: .byte W01 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N03 , Gn4 + .byte N03 , Gn4 .byte W02 .byte PAN , c_v-7 .byte BEND , c_v+15 @@ -63,7 +63,7 @@ se_m_spit_up_2: .byte N03 , En3 , v052 .byte W03 .byte W01 - .byte N03 + .byte N03 .byte W02 .byte W03 .byte En3 , v032 diff --git a/sound/songs/se_m_stat_decrease.s b/sound/songs/se_m_stat_decrease.s index 5cdf8ac36d..51218db1e7 100644 --- a/sound/songs/se_m_stat_decrease.s +++ b/sound/songs/se_m_stat_decrease.s @@ -30,13 +30,13 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+16 - .byte N02 , Cs5 + .byte N02 , Cs5 .byte W01 .byte BEND , c_v+12 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+8 - .byte N02 , Fs5 + .byte N02 , Fs5 .byte W01 .byte BEND , c_v+5 .byte W01 @@ -44,11 +44,11 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v-6 .byte BEND , c_v+0 - .byte N02 , Fs4 + .byte N02 , Fs4 .byte W03 .byte PAN , c_v+0 .byte BEND , c_v+42 - .byte N02 , Cn6 + .byte N02 , Cn6 .byte W01 .byte BEND , c_v+31 .byte W01 @@ -56,13 +56,13 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+16 - .byte N02 , Cn5 + .byte N02 , Cn5 .byte W01 .byte BEND , c_v+12 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+8 - .byte N02 , Fn5 + .byte N02 , Fn5 .byte W01 .byte BEND , c_v+5 .byte W01 @@ -70,11 +70,11 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v-6 .byte BEND , c_v+0 - .byte N02 , Fn4 + .byte N02 , Fn4 .byte W03 .byte PAN , c_v+0 .byte BEND , c_v+42 - .byte N02 , Bn5 + .byte N02 , Bn5 .byte W01 .byte BEND , c_v+31 .byte W01 @@ -82,13 +82,13 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+16 - .byte N02 , Bn4 + .byte N02 , Bn4 .byte W01 .byte BEND , c_v+12 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+8 - .byte N02 , En5 + .byte N02 , En5 .byte W01 .byte BEND , c_v+5 .byte W01 @@ -96,11 +96,11 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v-6 .byte BEND , c_v+0 - .byte N02 , En4 + .byte N02 , En4 .byte W03 .byte PAN , c_v+0 .byte BEND , c_v+42 - .byte N02 , As5 + .byte N02 , As5 .byte W01 .byte BEND , c_v+31 .byte W01 @@ -108,13 +108,13 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+16 - .byte N02 , As4 + .byte N02 , As4 .byte W01 .byte BEND , c_v+12 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+8 - .byte N02 , Ds5 + .byte N02 , Ds5 .byte W01 .byte BEND , c_v+5 .byte W01 @@ -122,11 +122,11 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v-6 .byte BEND , c_v+0 - .byte N02 , Ds4 + .byte N02 , Ds4 .byte W03 .byte PAN , c_v+0 .byte BEND , c_v+42 - .byte N02 , An5 + .byte N02 , An5 .byte W01 .byte BEND , c_v+31 .byte W01 @@ -134,7 +134,7 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+16 - .byte N02 , An4 + .byte N02 , An4 .byte W01 .byte BEND , c_v+12 .byte W02 @@ -148,11 +148,11 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v-12 .byte BEND , c_v+0 - .byte N02 , Cs4 + .byte N02 , Cs4 .byte W03 .byte PAN , c_v+0 .byte BEND , c_v+42 - .byte N02 , An5 + .byte N02 , An5 .byte W01 .byte BEND , c_v+31 .byte W01 @@ -160,7 +160,7 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v+12 .byte BEND , c_v+16 - .byte N02 , An4 + .byte N02 , An4 .byte W01 .byte BEND , c_v+12 .byte W02 @@ -174,11 +174,11 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v-16 .byte BEND , c_v+0 - .byte N02 , Cs4 + .byte N02 , Cs4 .byte W03 .byte PAN , c_v+0 .byte BEND , c_v+42 - .byte N02 , An5 + .byte N02 , An5 .byte W01 .byte BEND , c_v+31 .byte W01 @@ -186,7 +186,7 @@ se_m_stat_decrease_1: .byte W01 .byte PAN , c_v+16 .byte BEND , c_v+16 - .byte N02 , An4 + .byte N02 , An4 .byte W01 .byte BEND , c_v+12 .byte W02 @@ -202,55 +202,55 @@ se_m_stat_decrease_2: .byte VOL , 70*se_m_stat_decrease_mvl/mxv .byte N02 , As3 , v052 .byte W03 - .byte N02 + .byte N02 .byte W03 .byte W01 - .byte An3 + .byte An3 .byte W03 - .byte N02 + .byte N02 .byte W02 .byte W02 - .byte Gs3 + .byte Gs3 .byte W04 - .byte N02 + .byte N02 .byte W03 - .byte Gn3 + .byte Gn3 .byte W03 .byte W01 - .byte N02 + .byte N02 .byte W03 - .byte Fs3 + .byte Fs3 .byte W02 .byte W02 - .byte N02 + .byte N02 .byte W04 - .byte Fn3 + .byte Fn3 .byte W03 - .byte N02 + .byte N02 .byte W03 .byte W01 - .byte En3 + .byte En3 .byte W03 - .byte N02 + .byte N02 .byte W02 .byte W02 - .byte Ds3 + .byte Ds3 .byte W04 .byte Ds3 , v032 .byte W03 - .byte Dn3 + .byte Dn3 .byte W03 .byte W01 - .byte N02 + .byte N02 .byte W03 .byte Cs3 , v020 .byte W02 .byte W02 - .byte N02 + .byte N02 .byte W04 .byte Cn3 , v012 .byte W03 - .byte N02 + .byte N02 .byte W03 .byte FINE diff --git a/sound/songs/se_m_stat_increase.s b/sound/songs/se_m_stat_increase.s index e9eea563a0..2556b6afa7 100644 --- a/sound/songs/se_m_stat_increase.s +++ b/sound/songs/se_m_stat_increase.s @@ -30,13 +30,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+5 - .byte N02 , An4 + .byte N02 , An4 .byte W01 .byte BEND , c_v+8 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+12 - .byte N02 , Dn5 + .byte N02 , Dn5 .byte W01 .byte BEND , c_v+16 .byte W01 @@ -44,13 +44,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v-6 .byte BEND , c_v+32 - .byte N02 , Dn4 + .byte N02 , Dn4 .byte W01 .byte BEND , c_v+42 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N02 , As5 + .byte N02 , As5 .byte W01 .byte BEND , c_v+0 .byte W01 @@ -58,13 +58,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+5 - .byte N02 , As4 + .byte N02 , As4 .byte W01 .byte BEND , c_v+8 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+12 - .byte N02 , Ds5 + .byte N02 , Ds5 .byte W01 .byte BEND , c_v+16 .byte W01 @@ -72,13 +72,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v-6 .byte BEND , c_v+32 - .byte N02 , Ds4 + .byte N02 , Ds4 .byte W01 .byte BEND , c_v+42 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N02 , Bn5 + .byte N02 , Bn5 .byte W01 .byte BEND , c_v+0 .byte W01 @@ -86,13 +86,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+5 - .byte N02 , Bn4 + .byte N02 , Bn4 .byte W01 .byte BEND , c_v+8 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+12 - .byte N02 , En5 + .byte N02 , En5 .byte W01 .byte BEND , c_v+16 .byte W01 @@ -100,13 +100,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v-6 .byte BEND , c_v+32 - .byte N02 , En4 + .byte N02 , En4 .byte W01 .byte BEND , c_v+42 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N02 , Cn6 + .byte N02 , Cn6 .byte W01 .byte BEND , c_v+0 .byte W01 @@ -114,13 +114,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+5 - .byte N02 , Cn5 + .byte N02 , Cn5 .byte W01 .byte BEND , c_v+8 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+12 - .byte N02 , Fn5 + .byte N02 , Fn5 .byte W01 .byte BEND , c_v+16 .byte W01 @@ -128,13 +128,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v-6 .byte BEND , c_v+32 - .byte N02 , Fn4 + .byte N02 , Fn4 .byte W01 .byte BEND , c_v+42 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N02 , Cs6 + .byte N02 , Cs6 .byte W01 .byte BEND , c_v+0 .byte W01 @@ -142,7 +142,7 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v+6 .byte BEND , c_v+5 - .byte N02 , Cs5 + .byte N02 , Cs5 .byte W01 .byte BEND , c_v+8 .byte W02 @@ -156,13 +156,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v-12 .byte BEND , c_v+32 - .byte N02 , Fn4 + .byte N02 , Fn4 .byte W01 .byte BEND , c_v+42 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N02 , Cs6 + .byte N02 , Cs6 .byte W01 .byte BEND , c_v+0 .byte W01 @@ -170,7 +170,7 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v+12 .byte BEND , c_v+5 - .byte N02 , Cs5 + .byte N02 , Cs5 .byte W01 .byte BEND , c_v+8 .byte W02 @@ -184,13 +184,13 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v-16 .byte BEND , c_v+32 - .byte N02 , Fn4 + .byte N02 , Fn4 .byte W01 .byte BEND , c_v+42 .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N02 , Cs6 + .byte N02 , Cs6 .byte W01 .byte BEND , c_v+0 .byte W01 @@ -198,7 +198,7 @@ se_m_stat_increase_1: .byte W01 .byte PAN , c_v+16 .byte BEND , c_v+5 - .byte N02 , Cs5 + .byte N02 , Cs5 .byte W01 .byte BEND , c_v+8 .byte W02 @@ -214,55 +214,55 @@ se_m_stat_increase_2: .byte VOL , 70*se_m_stat_increase_mvl/mxv .byte N02 , Cn3 , v052 .byte W03 - .byte N02 + .byte N02 .byte W03 .byte W01 - .byte Cs3 + .byte Cs3 .byte W03 - .byte N02 + .byte N02 .byte W02 .byte W02 - .byte Dn3 + .byte Dn3 .byte W04 - .byte N02 + .byte N02 .byte W03 - .byte Ds3 + .byte Ds3 .byte W03 .byte W01 - .byte N02 + .byte N02 .byte W03 - .byte En3 + .byte En3 .byte W02 .byte W02 - .byte N02 + .byte N02 .byte W04 - .byte Fn3 + .byte Fn3 .byte W03 - .byte N02 + .byte N02 .byte W03 .byte W01 - .byte Fs3 + .byte Fs3 .byte W03 - .byte N02 + .byte N02 .byte W02 .byte W02 - .byte Gn3 + .byte Gn3 .byte W04 .byte Gn3 , v032 .byte W03 - .byte Gs3 + .byte Gs3 .byte W03 .byte W01 - .byte N02 + .byte N02 .byte W03 .byte An3 , v020 .byte W02 .byte W02 - .byte N02 + .byte N02 .byte W04 .byte As3 , v012 .byte W03 - .byte N02 + .byte N02 .byte W03 .byte FINE diff --git a/sound/songs/se_m_strength.s b/sound/songs/se_m_strength.s index 0fca48906f..bda5fc61e5 100644 --- a/sound/songs/se_m_strength.s +++ b/sound/songs/se_m_strength.s @@ -51,9 +51,9 @@ se_m_strength_2: .byte VOL , 110*se_m_strength_mvl/mxv .byte N02 , Fn2 , v072 .byte W02 - .byte N01 + .byte N01 .byte W01 - .byte N02 , Gn2 + .byte N02 , Gn2 .byte W03 .byte N01 , Gs2 , v060 .byte W01 diff --git a/sound/songs/se_m_string_shot2.s b/sound/songs/se_m_string_shot2.s index 7bd0a74275..b885a7d1a8 100644 --- a/sound/songs/se_m_string_shot2.s +++ b/sound/songs/se_m_string_shot2.s @@ -32,7 +32,7 @@ se_m_string_shot2_1: .byte c_v+8 .byte W01 .byte PAN , c_v+16 - .byte N09 , Gn4 + .byte N09 , Gn4 .byte W03 .byte BEND , c_v-8 .byte W03 @@ -40,7 +40,7 @@ se_m_string_shot2_1: .byte W06 .byte PAN , c_v+0 .byte BEND , c_v-11 - .byte N09 , En4 + .byte N09 , En4 .byte W03 .byte BEND , c_v-5 .byte W03 @@ -49,7 +49,7 @@ se_m_string_shot2_1: .byte c_v-3 .byte W01 .byte PAN , c_v-16 - .byte N09 , Gn4 + .byte N09 , Gn4 .byte W03 .byte BEND , c_v-19 .byte W03 @@ -57,7 +57,7 @@ se_m_string_shot2_1: .byte W06 .byte PAN , c_v+0 .byte BEND , c_v-19 - .byte N09 , En4 + .byte N09 , En4 .byte W03 .byte BEND , c_v-13 .byte W03 @@ -101,14 +101,14 @@ se_m_string_shot2_2: .byte N09 , Cn3 , v052 .byte W12 .byte PAN , c_v-7 - .byte N09 , Gn2 + .byte N09 , Gn2 .byte W12 se_m_string_shot2_2_000: .byte PAN , c_v+9 .byte N09 , Cn3 , v052 .byte W12 .byte PAN , c_v-6 - .byte N09 , Gn2 + .byte N09 , Gn2 .byte W12 .byte PEND .byte PATT diff --git a/sound/songs/se_m_supersonic.s b/sound/songs/se_m_supersonic.s index f791c9b15c..c975dad4b6 100644 --- a/sound/songs/se_m_supersonic.s +++ b/sound/songs/se_m_supersonic.s @@ -44,7 +44,7 @@ se_m_supersonic_1: .byte VOL , 0*se_m_supersonic_mvl/mxv .byte PAN , c_v+0 .byte BEND , c_v-4 - .byte N32 + .byte N32 .byte W01 .byte PAN , c_v+6 .byte BEND , c_v-1 diff --git a/sound/songs/se_m_sweet_scent.s b/sound/songs/se_m_sweet_scent.s index 0abf858d27..3b9bd527c8 100644 --- a/sound/songs/se_m_sweet_scent.s +++ b/sound/songs/se_m_sweet_scent.s @@ -33,7 +33,7 @@ se_m_sweet_scent_1: .byte W12 .byte PAN , c_v-4 .byte BEND , c_v+5 - .byte N36 , Fn3 + .byte N36 , Fn3 .byte W12 .byte PAN , c_v+0 .byte BEND , c_v+6 @@ -172,7 +172,7 @@ se_m_sweet_scent_2: .byte W02 .byte VOL , 12*se_m_sweet_scent_mvl/mxv .byte W03 - .byte EOT + .byte EOT .byte FINE @******************************************************@ diff --git a/sound/songs/se_m_swift.s b/sound/songs/se_m_swift.s index 10649a80e5..c87cbea419 100644 --- a/sound/songs/se_m_swift.s +++ b/sound/songs/se_m_swift.s @@ -41,7 +41,7 @@ se_m_swift_1: .byte W02 .byte VOL , 100*se_m_swift_mvl/mxv .byte BEND , c_v+0 - .byte N06 + .byte N06 .byte W01 .byte PAN , c_v+5 .byte BEND , c_v-11 diff --git a/sound/songs/se_m_teleport.s b/sound/songs/se_m_teleport.s index 2c4ad40e8a..60f7945d7b 100644 --- a/sound/songs/se_m_teleport.s +++ b/sound/songs/se_m_teleport.s @@ -68,7 +68,7 @@ se_m_teleport_1: .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+6 - .byte N06 , Fn3 + .byte N06 , Fn3 .byte W01 .byte BEND , c_v+11 .byte W01 diff --git a/sound/songs/se_m_thunder_wave.s b/sound/songs/se_m_thunder_wave.s index c265355006..a0b06cb5de 100644 --- a/sound/songs/se_m_thunder_wave.s +++ b/sound/songs/se_m_thunder_wave.s @@ -31,7 +31,7 @@ se_m_thunder_wave_1: .byte W03 .byte PAN , c_v+0 .byte BEND , c_v+32 - .byte N04 , Cn3 + .byte N04 , Cn3 .byte W02 .byte PAN , c_v+9 .byte W01 @@ -39,11 +39,11 @@ se_m_thunder_wave_1: .byte W03 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N01 , Gn3 + .byte N01 , Gn3 .byte W02 - .byte Bn2 + .byte Bn2 .byte W02 - .byte N13 , Gn3 + .byte N13 , Gn3 .byte W02 .byte VOL , 96*se_m_thunder_wave_mvl/mxv .byte W01 diff --git a/sound/songs/se_m_toxic.s b/sound/songs/se_m_toxic.s index 0e3ebe2204..ae460ad773 100644 --- a/sound/songs/se_m_toxic.s +++ b/sound/songs/se_m_toxic.s @@ -36,7 +36,7 @@ se_m_toxic_1: .byte W01 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N02 , Cn2 + .byte N02 , Cn2 .byte W02 .byte PAN , c_v-7 .byte BEND , c_v+16 @@ -44,18 +44,18 @@ se_m_toxic_1: .byte PAN , c_v+0 .byte BEND , c_v+0 .byte W01 - .byte N01 + .byte N01 .byte W01 .byte PAN , c_v+8 - .byte N01 , Cn3 + .byte N01 , Cn3 .byte W01 .byte VOICE , 31 .byte PAN , c_v-16 - .byte N01 , Dn2 + .byte N01 , Dn2 .byte W02 .byte VOICE , 23 .byte PAN , c_v+0 - .byte N01 , Cn2 + .byte N01 , Cn2 .byte W01 .byte VOICE , 31 .byte PAN , c_v+16 @@ -64,10 +64,10 @@ se_m_toxic_1: .byte VOICE , 23 .byte PAN , c_v-8 .byte BEND , c_v+16 - .byte N01 , Cn3 + .byte N01 , Cn3 .byte W02 .byte PAN , c_v+8 - .byte N01 , Cn2 + .byte N01 , Cn2 .byte W08 .byte FINE diff --git a/sound/songs/se_m_tri_attack.s b/sound/songs/se_m_tri_attack.s index 448998e779..13947e6f1a 100644 --- a/sound/songs/se_m_tri_attack.s +++ b/sound/songs/se_m_tri_attack.s @@ -68,17 +68,17 @@ se_m_tri_attack_2: .byte VOL , 110*se_m_tri_attack_mvl/mxv .byte N02 , Gs3 , v032 .byte W02 - .byte Gn3 + .byte Gn3 .byte W02 - .byte Fn3 + .byte Fn3 .byte W03 - .byte En3 + .byte En3 .byte W02 - .byte Dn3 + .byte Dn3 .byte W03 - .byte Cn3 + .byte Cn3 .byte W02 - .byte Gs2 + .byte Gs2 .byte W10 .byte FINE diff --git a/sound/songs/se_m_tri_attack2.s b/sound/songs/se_m_tri_attack2.s index 0afade13c6..61f11c3967 100644 --- a/sound/songs/se_m_tri_attack2.s +++ b/sound/songs/se_m_tri_attack2.s @@ -100,7 +100,7 @@ se_m_tri_attack2_2: .byte VOL , 110*se_m_tri_attack2_mvl/mxv .byte N06 , Cn3 , v060 .byte W09 - .byte N15 + .byte N15 .byte W15 .byte W24 .byte W24 diff --git a/sound/songs/se_m_twister.s b/sound/songs/se_m_twister.s index e95e9b3224..bbb4f1ec03 100644 --- a/sound/songs/se_m_twister.s +++ b/sound/songs/se_m_twister.s @@ -147,7 +147,7 @@ se_m_twister_1: .byte W02 .byte PAN , c_v-11 .byte W03 - .byte EOT + .byte EOT .byte FINE @********************** Track 2 **********************@ @@ -190,7 +190,7 @@ se_m_twister_2: .byte W05 .byte 18*se_m_twister_mvl/mxv .byte W05 - .byte EOT + .byte EOT .byte FINE @******************************************************@ diff --git a/sound/songs/se_m_vital_throw.s b/sound/songs/se_m_vital_throw.s index c89d003b6e..3e04b43e5b 100644 --- a/sound/songs/se_m_vital_throw.s +++ b/sound/songs/se_m_vital_throw.s @@ -36,10 +36,10 @@ se_m_vital_throw_1: .byte VOICE , 21 .byte VOL , 110*se_m_vital_throw_mvl/mxv .byte BEND , c_v+0 - .byte N03 , Gn4 + .byte N03 , Gn4 .byte W06 .byte PAN , c_v+16 - .byte N03 , Cn5 + .byte N03 , Cn5 .byte W09 .byte FINE @@ -54,7 +54,7 @@ se_m_vital_throw_2: .byte N03 , Cn3 , v052 .byte W06 .byte PAN , c_v-7 - .byte N03 + .byte N03 .byte W09 .byte FINE diff --git a/sound/songs/se_m_vital_throw2.s b/sound/songs/se_m_vital_throw2.s index 3bffdeb258..0d1e64ecb5 100644 --- a/sound/songs/se_m_vital_throw2.s +++ b/sound/songs/se_m_vital_throw2.s @@ -36,7 +36,7 @@ se_m_vital_throw2_1: .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N06 , En3 + .byte N06 , En3 .byte W01 .byte BEND , c_v-9 .byte W01 @@ -49,7 +49,7 @@ se_m_vital_throw2_1: .byte W02 .byte PAN , c_v+0 .byte BEND , c_v+0 - .byte N09 , An2 + .byte N09 , An2 .byte W01 .byte BEND , c_v-9 .byte W01 @@ -84,10 +84,10 @@ se_m_vital_throw2_2: .byte N03 , Gs2 , v052 .byte W06 .byte PAN , c_v-7 - .byte N03 + .byte N03 .byte W06 .byte PAN , c_v+0 - .byte N03 + .byte N03 .byte W12 .byte FINE diff --git a/sound/songs/se_m_waterfall.s b/sound/songs/se_m_waterfall.s index a07e7e9713..9e16b9ee76 100644 --- a/sound/songs/se_m_waterfall.s +++ b/sound/songs/se_m_waterfall.s @@ -100,23 +100,23 @@ se_m_waterfall_2: .byte VOL , 115*se_m_waterfall_mvl/mxv .byte N06 , Cn3 , v040 .byte W06 - .byte Gn2 + .byte Gn2 .byte W06 se_m_waterfall_2_000: .byte N06 , Cn3 , v040 .byte W06 - .byte Gn2 + .byte Gn2 .byte W06 .byte PEND .byte PATT .word se_m_waterfall_2_000 .byte N06 , Cn3 , v032 .byte W06 - .byte Gn2 + .byte Gn2 .byte W06 .byte Cn3 , v012 .byte W06 - .byte Gn2 + .byte Gn2 .byte W06 .byte FINE diff --git a/sound/songs/se_m_whirlpool.s b/sound/songs/se_m_whirlpool.s index bac3fa5bcf..bf0b9cc722 100644 --- a/sound/songs/se_m_whirlpool.s +++ b/sound/songs/se_m_whirlpool.s @@ -106,7 +106,7 @@ se_m_whirlpool_1: .byte W01 .byte BEND , c_v-28 .byte W04 - .byte EOT + .byte EOT .byte FINE @******************************************************@ diff --git a/sound/songs/se_win_open.s b/sound/songs/se_win_open.s index 74656e9c0f..b5d582a8d9 100644 --- a/sound/songs/se_win_open.s +++ b/sound/songs/se_win_open.s @@ -22,7 +22,7 @@ se_win_open_1: .byte VOL , 110*se_win_open_mvl/mxv .byte N03 , Ds3 , v127 .byte W03 - .byte N15 , Gn4 + .byte N15 , Gn4 .byte W21 .byte FINE diff --git a/sound/voicegroups/voicegroup000.inc b/sound/voicegroups/voicegroup000.inc index 275b64993d..7a2c5772f9 100644 --- a/sound/voicegroups/voicegroup000.inc +++ b/sound/voicegroups/voicegroup000.inc @@ -1,65 +1,65 @@ .align 2 voicegroup000:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 0, 9, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 204, 193, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 0, 9, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 204, 193, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup001.inc b/sound/voicegroups/voicegroup001.inc index a22c5b6c52..9960daf4a9 100644 --- a/sound/voicegroups/voicegroup001.inc +++ b/sound/voicegroups/voicegroup001.inc @@ -1,32 +1,32 @@ .align 2 voicegroup001:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 1, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 6, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 1, 6, 0 - voice_square_2 60, 0, 3, 0, 1, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 0, 0, 1, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 1, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 6, 0 + voice_programmable_wave 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 1, 6, 0 + voice_square_2 60, 0, 3, 0, 1, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 0, 0, 1, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 diff --git a/sound/voicegroups/voicegroup002.inc b/sound/voicegroups/voicegroup002.inc index 3f5d846d4b..bd6f080aa4 100644 --- a/sound/voicegroups/voicegroup002.inc +++ b/sound/voicegroups/voicegroup002.inc @@ -1,57 +1,57 @@ .align 2 voicegroup002:: - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_oboe, 255, 165, 154, 127 - voice_directsound 60, 0, DirectSoundWaveData_unused_sd90_oboe, 255, 165, 154, 127 - voice_directsound 60, 0, DirectSoundWaveData_unused_guitar_separates_power_chord, 255, 165, 206, 127 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88pro_unison_slap, 255, 165, 206, 127 - voice_directsound 60, 0, DirectSoundWaveData_unknown_snare, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 255, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_kick, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_directsound 48, 44, DirectSoundWaveData_unused_sc55_tom, 255, 210, 77, 204 - voice_directsound_no_resample 60, 79, DirectSoundWaveData_unknown_close_hihat, 255, 127, 0, 188 - voice_directsound 51, 54, DirectSoundWaveData_unused_sc55_tom, 255, 216, 77, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 54, 64, DirectSoundWaveData_unused_sc55_tom, 255, 216, 77, 204 - voice_directsound_no_resample 60, 79, DirectSoundWaveData_unknown_open_hihat, 255, 242, 141, 0 - voice_directsound 57, 69, DirectSoundWaveData_unused_sc55_tom, 255, 210, 77, 204 - voice_directsound 60, 79, DirectSoundWaveData_unused_sc55_tom, 255, 204, 77, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 62, 84, DirectSoundWaveData_unused_sc55_tom, 255, 204, 77, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 70, 49, DirectSoundWaveData_unknown_bell, 255, 165, 103, 231 - voice_directsound_no_resample 32, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_directsound_no_resample 60, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 235, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 - voice_directsound_no_resample 30, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 72, 104, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 72, 94, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound 84, 104, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_oboe, 255, 165, 154, 127 + voice_directsound 60, 0, DirectSoundWaveData_unused_sd90_oboe, 255, 165, 154, 127 + voice_directsound 60, 0, DirectSoundWaveData_unused_guitar_separates_power_chord, 255, 165, 206, 127 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88pro_unison_slap, 255, 165, 206, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_snare, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 255, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_kick, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_directsound 48, 44, DirectSoundWaveData_unused_sc55_tom, 255, 210, 77, 204 + voice_directsound_no_resample 60, 79, DirectSoundWaveData_unknown_close_hihat, 255, 127, 0, 188 + voice_directsound 51, 54, DirectSoundWaveData_unused_sc55_tom, 255, 216, 77, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 54, 64, DirectSoundWaveData_unused_sc55_tom, 255, 216, 77, 204 + voice_directsound_no_resample 60, 79, DirectSoundWaveData_unknown_open_hihat, 255, 242, 141, 0 + voice_directsound 57, 69, DirectSoundWaveData_unused_sc55_tom, 255, 210, 77, 204 + voice_directsound 60, 79, DirectSoundWaveData_unused_sc55_tom, 255, 204, 77, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 62, 84, DirectSoundWaveData_unused_sc55_tom, 255, 204, 77, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 70, 49, DirectSoundWaveData_unknown_bell, 255, 165, 103, 231 + voice_directsound_no_resample 32, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_directsound_no_resample 60, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 235, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 + voice_directsound_no_resample 30, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 72, 104, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 72, 94, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound 84, 104, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 diff --git a/sound/voicegroups/voicegroup003.inc b/sound/voicegroups/voicegroup003.inc index 6c6193e7d5..d77150fc12 100644 --- a/sound/voicegroups/voicegroup003.inc +++ b/sound/voicegroups/voicegroup003.inc @@ -1,57 +1,57 @@ .align 2 voicegroup003:: - voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 - voice_directsound_no_resample 64, 89, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 - voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 - voice_directsound_no_resample 64, 94, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound_no_resample 64, 79, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 104, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 - voice_directsound 50, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 - voice_directsound 64, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound 64, 104, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 + voice_directsound_no_resample 64, 89, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 + voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 + voice_directsound_no_resample 64, 94, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound_no_resample 64, 79, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 104, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 + voice_directsound 50, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 + voice_directsound 64, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 33, 89, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound 64, 104, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 diff --git a/sound/voicegroups/voicegroup004.inc b/sound/voicegroups/voicegroup004.inc index 786010cb02..6aa28d6a9f 100644 --- a/sound/voicegroups/voicegroup004.inc +++ b/sound/voicegroups/voicegroup004.inc @@ -1,93 +1,93 @@ .align 2 voicegroup004:: - voice_directsound_no_resample 66, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 - voice_directsound_no_resample 64, 89, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 - voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 - voice_directsound_no_resample 64, 94, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 61, 84, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound_no_resample 64, 79, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 104, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 - voice_directsound 50, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 - voice_directsound 64, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 - voice_directsound 62, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_directsound 65, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound 56, 89, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound 64, 104, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 - voice_directsound_no_resample 66, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_directsound 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 - voice_directsound 64, 89, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 - voice_directsound 60, 29, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 58, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound 62, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 - voice_directsound 64, 94, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 - voice_directsound 64, 34, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_directsound 64, 34, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_directsound 64, 90, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 61, 84, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 255, 0 - voice_directsound 64, 64, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound 64, 79, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 64, 104, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 - voice_directsound 50, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 - voice_directsound 64, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 + voice_directsound_no_resample 66, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 + voice_directsound_no_resample 64, 89, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 + voice_directsound_no_resample 64, 29, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 + voice_directsound_no_resample 64, 94, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 61, 84, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound_no_resample 64, 79, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 104, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 + voice_directsound 50, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 + voice_directsound 64, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 + voice_directsound 62, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 + voice_directsound 65, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 64, 80, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_directsound 68, 34, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_directsound 72, 44, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 76, 84, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound 80, 94, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound 56, 89, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound 64, 104, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 + voice_directsound_no_resample 66, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_directsound 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 + voice_directsound 64, 89, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 + voice_directsound 60, 29, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 58, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound 62, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 + voice_directsound 64, 94, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 + voice_directsound 64, 34, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_directsound 64, 34, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_directsound 64, 90, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 61, 84, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 255, 0 + voice_directsound 64, 64, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound 64, 79, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 64, 104, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 + voice_directsound 50, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 + voice_directsound 64, 84, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 diff --git a/sound/voicegroups/voicegroup005.inc b/sound/voicegroups/voicegroup005.inc index efeab963b5..584451a62f 100644 --- a/sound/voicegroups/voicegroup005.inc +++ b/sound/voicegroups/voicegroup005.inc @@ -1,7 +1,7 @@ .align 2 voicegroup005:: - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_piano1_48, 255, 252, 0, 239 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_piano1_60, 255, 250, 0, 221 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_piano1_72, 255, 250, 0, 221 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_piano1_84, 255, 247, 0, 221 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_piano1_48, 255, 252, 0, 239 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_piano1_60, 255, 250, 0, 221 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_piano1_72, 255, 250, 0, 221 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_piano1_84, 255, 247, 0, 221 diff --git a/sound/voicegroups/voicegroup006.inc b/sound/voicegroups/voicegroup006.inc index 156caa6b5d..52b2b335f2 100644 --- a/sound/voicegroups/voicegroup006.inc +++ b/sound/voicegroups/voicegroup006.inc @@ -1,6 +1,6 @@ .align 2 voicegroup006:: - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_string_ensemble_60, 255, 0, 255, 196 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_string_ensemble_72, 255, 0, 255, 196 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_string_ensemble_84, 255, 0, 255, 196 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_string_ensemble_60, 255, 0, 255, 196 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_string_ensemble_72, 255, 0, 255, 196 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_string_ensemble_84, 255, 0, 255, 196 diff --git a/sound/voicegroups/voicegroup007.inc b/sound/voicegroups/voicegroup007.inc index be49a69410..66bcd3fa6c 100644 --- a/sound/voicegroups/voicegroup007.inc +++ b/sound/voicegroups/voicegroup007.inc @@ -1,134 +1,134 @@ .align 2 voicegroup007:: - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_trumpet_60, 255, 0, 193, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_trumpet_72, 255, 0, 193, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_trumpet_84, 255, 0, 193, 127 - voice_square_1_alt 60, 0, 38, 2, 1, 0, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 36, 2, 0, 1, 4, 2 - voice_square_1_alt 60, 0, 21, 2, 0, 0, 15, 2 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_trumpet_60, 255, 0, 193, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_trumpet_72, 255, 0, 193, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_trumpet_84, 255, 0, 193, 127 + voice_square_1_alt 60, 0, 38, 2, 1, 0, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 36, 2, 0, 1, 4, 2 + voice_square_1_alt 60, 0, 21, 2, 0, 0, 15, 2 diff --git a/sound/voicegroups/voicegroup008.inc b/sound/voicegroups/voicegroup008.inc index ba9ba6b27c..7fc874e87a 100644 --- a/sound/voicegroups/voicegroup008.inc +++ b/sound/voicegroups/voicegroup008.inc @@ -1,5 +1,5 @@ .align 2 voicegroup008:: - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tuba_39, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tuba_51, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tuba_39, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tuba_51, 255, 0, 255, 165 diff --git a/sound/voicegroups/voicegroup009.inc b/sound/voicegroups/voicegroup009.inc index afa7a0f6ca..4a51a02ca3 100644 --- a/sound/voicegroups/voicegroup009.inc +++ b/sound/voicegroups/voicegroup009.inc @@ -1,5 +1,5 @@ .align 2 voicegroup009:: - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_french_horn_60, 255, 0, 224, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_french_horn_72, 255, 0, 218, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_french_horn_60, 255, 0, 224, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_french_horn_72, 255, 0, 218, 165 diff --git a/sound/voicegroups/voicegroup010.inc b/sound/voicegroups/voicegroup010.inc index c92a030f2d..e2b38fcbd2 100644 --- a/sound/voicegroups/voicegroup010.inc +++ b/sound/voicegroups/voicegroup010.inc @@ -1,87 +1,87 @@ .align 2 voicegroup010:: - voice_keysplit_all voicegroup031 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 0, 4, 0, 1 - voice_square_1 60, 0, 0, 3, 0, 4, 0, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 + voice_keysplit_all voicegroup031 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 0, 4, 0, 1 + voice_square_1 60, 0, 0, 3, 0, 4, 0, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup011.inc b/sound/voicegroups/voicegroup011.inc index 8c9b120c90..a8655cb8c9 100644 --- a/sound/voicegroups/voicegroup011.inc +++ b/sound/voicegroups/voicegroup011.inc @@ -1,131 +1,131 @@ .align 2 voicegroup011:: - voice_keysplit_all voicegroup022 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 4, 0 - voice_square_2_alt 60, 0, 2, 0, 3, 0, 0 - voice_square_2_alt 60, 0, 2, 0, 3, 0, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 3, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 1, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 2, 1, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup022 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 4, 0 + voice_square_2_alt 60, 0, 2, 0, 3, 0, 0 + voice_square_2_alt 60, 0, 2, 0, 3, 0, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 3, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 1, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 2, 1, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup012.inc b/sound/voicegroups/voicegroup012.inc index 4f94f1b1d3..d92c270cbb 100644 --- a/sound/voicegroups/voicegroup012.inc +++ b/sound/voicegroups/voicegroup012.inc @@ -1,105 +1,105 @@ .align 2 voicegroup012:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 255, 178, 180, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 29, 2, 0, 2, 0, 0 - voice_square_1_alt 60, 0, 22, 2, 0, 2, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 255, 178, 180, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 29, 2, 0, 2, 0, 0 + voice_square_1_alt 60, 0, 22, 2, 0, 2, 0, 0 diff --git a/sound/voicegroups/voicegroup013.inc b/sound/voicegroups/voicegroup013.inc index 4625bd9d82..f17ad599a0 100644 --- a/sound/voicegroups/voicegroup013.inc +++ b/sound/voicegroups/voicegroup013.inc @@ -1,93 +1,93 @@ .align 2 voicegroup013:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 0, 7, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 1 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 0, 7, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup014.inc b/sound/voicegroups/voicegroup014.inc index d9cb8b079e..c3136f2fd2 100644 --- a/sound/voicegroups/voicegroup014.inc +++ b/sound/voicegroups/voicegroup014.inc @@ -1,88 +1,88 @@ .align 2 voicegroup014:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 6, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 6, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 diff --git a/sound/voicegroups/voicegroup015.inc b/sound/voicegroups/voicegroup015.inc index 530e017cd0..81e200180e 100644 --- a/sound/voicegroups/voicegroup015.inc +++ b/sound/voicegroups/voicegroup015.inc @@ -1,95 +1,95 @@ .align 2 voicegroup015:: - voice_keysplit_all voicegroup016 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 0, 2, 0, 0 - voice_square_1 60, 0, 0, 3, 0, 2, 0, 0 - voice_square_2 60, 0, 3, 0, 6, 0, 0 - voice_square_1 60, 0, 0, 3, 0, 6, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit_all voicegroup016 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 0, 2, 0, 0 + voice_square_1 60, 0, 0, 3, 0, 2, 0, 0 + voice_square_2 60, 0, 3, 0, 6, 0, 0 + voice_square_1 60, 0, 0, 3, 0, 6, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup016.inc b/sound/voicegroups/voicegroup016.inc index 2013f88828..1b17ac49c7 100644 --- a/sound/voicegroups/voicegroup016.inc +++ b/sound/voicegroups/voicegroup016.inc @@ -1,68 +1,68 @@ .align 2 voicegroup016:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 0, 2 - voice_noise_alt 60, 0, 0, 0, 1, 0, 1 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_kick, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 32, 74, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 72, 66, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 72, 62, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 0, 2 + voice_noise_alt 60, 0, 0, 0, 1, 0, 1 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_kick, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 32, 74, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 72, 66, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 72, 62, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 diff --git a/sound/voicegroups/voicegroup017.inc b/sound/voicegroups/voicegroup017.inc index ac3768c10d..f963fb77e8 100644 --- a/sound/voicegroups/voicegroup017.inc +++ b/sound/voicegroups/voicegroup017.inc @@ -1,94 +1,94 @@ .align 2 voicegroup017:: - voice_keysplit_all voicegroup001 - voice_square_2_alt 60, 0, 2, 0, 3, 3, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 3, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 2 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 2 - voice_square_2_alt 60, 0, 2, 1, 1, 0, 0 - voice_square_1_alt 60, 0, 0, 2, 1, 1, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 1, 1, 7, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 - voice_square_1_alt 60, 0, 0, 2, 1, 1, 7, 2 - voice_square_2_alt 60, 0, 3, 1, 1, 7, 2 - voice_square_1_alt 60, 0, 0, 3, 1, 1, 7, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 2 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 2 - voice_square_2_alt 60, 0, 1, 1, 2, 6, 2 - voice_square_1_alt 60, 0, 0, 1, 1, 2, 6, 2 - voice_square_1_alt 60, 0, 0, 1, 0, 0, 6, 2 + voice_keysplit_all voicegroup001 + voice_square_2_alt 60, 0, 2, 0, 3, 3, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 3, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 2 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 2 + voice_square_2_alt 60, 0, 2, 1, 1, 0, 0 + voice_square_1_alt 60, 0, 0, 2, 1, 1, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 1, 1, 7, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_square_1_alt 60, 0, 0, 2, 1, 1, 7, 2 + voice_square_2_alt 60, 0, 3, 1, 1, 7, 2 + voice_square_1_alt 60, 0, 0, 3, 1, 1, 7, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 2 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 2 + voice_square_2_alt 60, 0, 1, 1, 2, 6, 2 + voice_square_1_alt 60, 0, 0, 1, 1, 2, 6, 2 + voice_square_1_alt 60, 0, 0, 1, 0, 0, 6, 2 diff --git a/sound/voicegroups/voicegroup018.inc b/sound/voicegroups/voicegroup018.inc index 466f423856..0364349f04 100644 --- a/sound/voicegroups/voicegroup018.inc +++ b/sound/voicegroups/voicegroup018.inc @@ -1,131 +1,131 @@ .align 2 voicegroup018:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 0, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 1, 0, 1, 0, 3 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 1, 0, 1, 0, 3 diff --git a/sound/voicegroups/voicegroup019.inc b/sound/voicegroups/voicegroup019.inc index 5d18c1e692..d15be40a14 100644 --- a/sound/voicegroups/voicegroup019.inc +++ b/sound/voicegroups/voicegroup019.inc @@ -1,88 +1,88 @@ .align 2 voicegroup019:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 2 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 2 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup020.inc b/sound/voicegroups/voicegroup020.inc index 2c5494c791..8449fbdd60 100644 --- a/sound/voicegroups/voicegroup020.inc +++ b/sound/voicegroups/voicegroup020.inc @@ -1,90 +1,90 @@ .align 2 voicegroup020:: - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 6, 2 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 6, 2 - voice_square_1_alt 60, 0, 0, 1, 0, 0, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 7, 1 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 6, 2 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 6, 2 + voice_square_1_alt 60, 0, 0, 1, 0, 0, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup021.inc b/sound/voicegroups/voicegroup021.inc index 70698a668e..43aa9150ee 100644 --- a/sound/voicegroups/voicegroup021.inc +++ b/sound/voicegroups/voicegroup021.inc @@ -1,54 +1,54 @@ .align 2 voicegroup021:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 6, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 6, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup022.inc b/sound/voicegroups/voicegroup022.inc index bd64fd856c..2a1bba75d4 100644 --- a/sound/voicegroups/voicegroup022.inc +++ b/sound/voicegroups/voicegroup022.inc @@ -1,68 +1,68 @@ .align 2 voicegroup022:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 0, 7, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_kick, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 32, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 72, 67, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 72, 61, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 0, 7, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_kick, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 32, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 72, 67, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 72, 61, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 diff --git a/sound/voicegroups/voicegroup023.inc b/sound/voicegroups/voicegroup023.inc index 059999c8b8..df0f663a79 100644 --- a/sound/voicegroups/voicegroup023.inc +++ b/sound/voicegroups/voicegroup023.inc @@ -1,92 +1,92 @@ .align 2 voicegroup023:: - voice_keysplit voicegroup005, KeySplitTable1 - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 + voice_keysplit voicegroup005, KeySplitTable1 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 diff --git a/sound/voicegroups/voicegroup024.inc b/sound/voicegroups/voicegroup024.inc index ca05a59165..d4e1397046 100644 --- a/sound/voicegroups/voicegroup024.inc +++ b/sound/voicegroups/voicegroup024.inc @@ -1,94 +1,94 @@ .align 2 voicegroup024:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 0, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 0, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 diff --git a/sound/voicegroups/voicegroup025.inc b/sound/voicegroups/voicegroup025.inc index 01716b47d9..1be1beea6b 100644 --- a/sound/voicegroups/voicegroup025.inc +++ b/sound/voicegroups/voicegroup025.inc @@ -1,87 +1,87 @@ .align 2 voicegroup025:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup026.inc b/sound/voicegroups/voicegroup026.inc index 7911f04099..5012411663 100644 --- a/sound/voicegroups/voicegroup026.inc +++ b/sound/voicegroups/voicegroup026.inc @@ -1,88 +1,88 @@ .align 2 voicegroup026:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 9, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 9, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 9, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 9, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 diff --git a/sound/voicegroups/voicegroup027.inc b/sound/voicegroups/voicegroup027.inc index c350886569..ef84f846ec 100644 --- a/sound/voicegroups/voicegroup027.inc +++ b/sound/voicegroups/voicegroup027.inc @@ -1,131 +1,131 @@ .align 2 voicegroup027:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 1, 0, 2, 0, 0 - voice_square_1 60, 0, 0, 1, 0, 2, 0, 0 - voice_square_2 60, 0, 1, 0, 6, 0, 0 - voice_square_1 60, 0, 0, 1, 0, 6, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 4, 1, 4 - voice_noise_alt 60, 0, 0, 0, 1, 0, 2 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 1, 0, 2, 0, 0 + voice_square_1 60, 0, 0, 1, 0, 2, 0, 0 + voice_square_2 60, 0, 1, 0, 6, 0, 0 + voice_square_1 60, 0, 0, 1, 0, 6, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 4, 1, 4 + voice_noise_alt 60, 0, 0, 0, 1, 0, 2 diff --git a/sound/voicegroups/voicegroup028.inc b/sound/voicegroups/voicegroup028.inc index 73413c99e9..6d1071850d 100644 --- a/sound/voicegroups/voicegroup028.inc +++ b/sound/voicegroups/voicegroup028.inc @@ -1,86 +1,86 @@ .align 2 voicegroup028:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 3, 0, 1, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 0, 0, 2, 0, 0 - voice_square_1 60, 0, 0, 0, 0, 2, 0, 0 - voice_square_2 60, 0, 0, 0, 6, 0, 0 - voice_square_1 60, 0, 0, 0, 0, 6, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 2, 0, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_2 60, 0, 3, 0, 4, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 3, 0, 1, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 0, 0, 2, 0, 0 + voice_square_1 60, 0, 0, 0, 0, 2, 0, 0 + voice_square_2 60, 0, 0, 0, 6, 0, 0 + voice_square_1 60, 0, 0, 0, 0, 6, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 2, 0, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_2 60, 0, 3, 0, 4, 0, 0 diff --git a/sound/voicegroups/voicegroup029.inc b/sound/voicegroups/voicegroup029.inc index 4b7704be04..e65818f90f 100644 --- a/sound/voicegroups/voicegroup029.inc +++ b/sound/voicegroups/voicegroup029.inc @@ -1,91 +1,91 @@ .align 2 voicegroup029:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 0, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 0, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 0 diff --git a/sound/voicegroups/voicegroup030.inc b/sound/voicegroups/voicegroup030.inc index 11856b6a6a..1e1b5088dd 100644 --- a/sound/voicegroups/voicegroup030.inc +++ b/sound/voicegroups/voicegroup030.inc @@ -1,58 +1,58 @@ .align 2 voicegroup030:: - voice_keysplit_all voicegroup031 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 4, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 37, 165, 180, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit_all voicegroup031 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 4, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 37, 165, 180, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup031.inc b/sound/voicegroups/voicegroup031.inc index f65481a9d1..a24251c78c 100644 --- a/sound/voicegroups/voicegroup031.inc +++ b/sound/voicegroups/voicegroup031.inc @@ -1,68 +1,68 @@ .align 2 voicegroup031:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_trinity_big_boned, 255, 165, 154, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 32, 49, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 72, 79, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 72, 74, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_trinity_big_boned, 255, 165, 154, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 32, 49, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 30, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 72, 79, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 72, 74, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 diff --git a/sound/voicegroups/voicegroup032.inc b/sound/voicegroups/voicegroup032.inc index 22919a9a0c..f50eb844ba 100644 --- a/sound/voicegroups/voicegroup032.inc +++ b/sound/voicegroups/voicegroup032.inc @@ -1,131 +1,131 @@ .align 2 voicegroup032:: - voice_keysplit_all voicegroup016 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 3, 4, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 3, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 250, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 - voice_noise_alt 60, 0, 0, 0, 4, 1, 4 - voice_noise_alt 60, 0, 0, 0, 1, 0, 2 + voice_keysplit_all voicegroup016 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 3, 4, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 3, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 250, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_noise_alt 60, 0, 0, 0, 4, 1, 4 + voice_noise_alt 60, 0, 0, 0, 1, 0, 2 diff --git a/sound/voicegroups/voicegroup033.inc b/sound/voicegroups/voicegroup033.inc index d414fa0bcb..34e7e43b71 100644 --- a/sound/voicegroups/voicegroup033.inc +++ b/sound/voicegroups/voicegroup033.inc @@ -1,86 +1,86 @@ .align 2 voicegroup033:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 diff --git a/sound/voicegroups/voicegroup034.inc b/sound/voicegroups/voicegroup034.inc index 43b2e67a99..6dc04e97a6 100644 --- a/sound/voicegroups/voicegroup034.inc +++ b/sound/voicegroups/voicegroup034.inc @@ -1,87 +1,87 @@ .align 2 voicegroup034:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 4, 2 - voice_square_1 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 2 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 4, 2 + voice_square_1 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup035.inc b/sound/voicegroups/voicegroup035.inc index 4afb126c39..359a43a8c9 100644 --- a/sound/voicegroups/voicegroup035.inc +++ b/sound/voicegroups/voicegroup035.inc @@ -1,88 +1,88 @@ .align 2 voicegroup035:: - voice_keysplit_all voicegroup031 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 6, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 6, 1 + voice_keysplit_all voicegroup031 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 6, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 6, 1 diff --git a/sound/voicegroups/voicegroup036.inc b/sound/voicegroups/voicegroup036.inc index 2161259d7e..b3ef9cfbc7 100644 --- a/sound/voicegroups/voicegroup036.inc +++ b/sound/voicegroups/voicegroup036.inc @@ -1,131 +1,131 @@ .align 2 voicegroup036:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 4, 1, 4 - voice_noise_alt 60, 0, 0, 0, 1, 0, 2 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 4, 1, 4 + voice_noise_alt 60, 0, 0, 0, 1, 0, 2 diff --git a/sound/voicegroups/voicegroup037.inc b/sound/voicegroups/voicegroup037.inc index 29f33cbe7c..d05a4c6e24 100644 --- a/sound/voicegroups/voicegroup037.inc +++ b/sound/voicegroups/voicegroup037.inc @@ -1,92 +1,92 @@ .align 2 voicegroup037:: - voice_keysplit_all voicegroup031 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 0, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_keysplit_all voicegroup031 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup038.inc b/sound/voicegroups/voicegroup038.inc index 42c63281d5..61ecc67460 100644 --- a/sound/voicegroups/voicegroup038.inc +++ b/sound/voicegroups/voicegroup038.inc @@ -1,85 +1,85 @@ .align 2 voicegroup038:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup039.inc b/sound/voicegroups/voicegroup039.inc index c8597bb479..887f238dc8 100644 --- a/sound/voicegroups/voicegroup039.inc +++ b/sound/voicegroups/voicegroup039.inc @@ -1,131 +1,131 @@ .align 2 voicegroup039:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup040.inc b/sound/voicegroups/voicegroup040.inc index 4ee10e72fe..4e523072a7 100644 --- a/sound/voicegroups/voicegroup040.inc +++ b/sound/voicegroups/voicegroup040.inc @@ -1,131 +1,131 @@ .align 2 voicegroup040:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup041.inc b/sound/voicegroups/voicegroup041.inc index dc23fd7ad8..101a6ddb7b 100644 --- a/sound/voicegroups/voicegroup041.inc +++ b/sound/voicegroups/voicegroup041.inc @@ -1,131 +1,131 @@ .align 2 voicegroup041:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup042.inc b/sound/voicegroups/voicegroup042.inc index 0166ef9e3c..55fa84d60d 100644 --- a/sound/voicegroups/voicegroup042.inc +++ b/sound/voicegroups/voicegroup042.inc @@ -1,131 +1,131 @@ .align 2 voicegroup042:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup043.inc b/sound/voicegroups/voicegroup043.inc index d2ca0101b2..d6bd30bcba 100644 --- a/sound/voicegroups/voicegroup043.inc +++ b/sound/voicegroups/voicegroup043.inc @@ -1,84 +1,84 @@ .align 2 voicegroup043:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 diff --git a/sound/voicegroups/voicegroup044.inc b/sound/voicegroups/voicegroup044.inc index 4717b4273f..838f58fbde 100644 --- a/sound/voicegroups/voicegroup044.inc +++ b/sound/voicegroups/voicegroup044.inc @@ -1,84 +1,84 @@ .align 2 voicegroup044:: - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 5, 1, 7 - voice_square_2_alt 60, 0, 3, 0, 4, 3, 6 - voice_square_2_alt 60, 0, 2, 1, 1, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 224 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 5, 1, 7 + voice_square_2_alt 60, 0, 3, 0, 4, 3, 6 + voice_square_2_alt 60, 0, 2, 1, 1, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 224 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 diff --git a/sound/voicegroups/voicegroup045.inc b/sound/voicegroups/voicegroup045.inc index f0bc78c58b..9647f7e457 100644 --- a/sound/voicegroups/voicegroup045.inc +++ b/sound/voicegroups/voicegroup045.inc @@ -1,131 +1,131 @@ .align 2 voicegroup045:: - voice_keysplit_all voicegroup001 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 0, 1 - voice_square_1_alt 60, 0, 0, 3, 1, 2, 6, 0 - voice_square_2_alt 60, 0, 3, 1, 2, 6, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 0, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 1, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 0, 1 + voice_square_1_alt 60, 0, 0, 3, 1, 2, 6, 0 + voice_square_2_alt 60, 0, 3, 1, 2, 6, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 0, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 1, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup046.inc b/sound/voicegroups/voicegroup046.inc index e2ecb76104..e8165dcc6e 100644 --- a/sound/voicegroups/voicegroup046.inc +++ b/sound/voicegroups/voicegroup046.inc @@ -1,131 +1,131 @@ .align 2 voicegroup046:: - voice_keysplit voicegroup005, KeySplitTable1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 1, 12, 0 - voice_square_1_alt 60, 0, 0, 0, 1, 1, 9, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 216 - voice_square_2_alt 60, 0, 1, 0, 2, 6, 3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit voicegroup005, KeySplitTable1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 1, 12, 0 + voice_square_1_alt 60, 0, 0, 0, 1, 1, 9, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 216 + voice_square_2_alt 60, 0, 1, 0, 2, 6, 3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup047.inc b/sound/voicegroups/voicegroup047.inc index 403d53d423..80faa09c3c 100644 --- a/sound/voicegroups/voicegroup047.inc +++ b/sound/voicegroups/voicegroup047.inc @@ -1,131 +1,131 @@ .align 2 voicegroup047:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 204, 193, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 1, 7, 15, 2 - voice_square_2_alt 60, 0, 1, 1, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 1, 1, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 204, 193, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 1, 7, 15, 2 + voice_square_2_alt 60, 0, 1, 1, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 1, 1, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup048.inc b/sound/voicegroups/voicegroup048.inc index b819395a6a..c81ebf39ff 100644 --- a/sound/voicegroups/voicegroup048.inc +++ b/sound/voicegroups/voicegroup048.inc @@ -1,91 +1,91 @@ .align 2 voicegroup048:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 7, 3, 3 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 204, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 4, 4, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 3, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 3, 3, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 12, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 2, 4, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 7, 3, 3 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 204, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 4, 4, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 3, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 3, 3, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 12, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 2, 4, 0 diff --git a/sound/voicegroups/voicegroup049.inc b/sound/voicegroups/voicegroup049.inc index ed830a1a9c..4ece4cb76a 100644 --- a/sound/voicegroups/voicegroup049.inc +++ b/sound/voicegroups/voicegroup049.inc @@ -1,131 +1,131 @@ .align 2 voicegroup049:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 - voice_square_2_alt 60, 0, 1, 1, 3, 4, 2 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 1, 7, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 4, 2 - voice_square_2_alt 60, 0, 1, 1, 3, 4, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 1, 4, 4, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 + voice_square_2_alt 60, 0, 1, 1, 3, 4, 2 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 1, 7, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 4, 2 + voice_square_2_alt 60, 0, 1, 1, 3, 4, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 1, 4, 4, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup050.inc b/sound/voicegroups/voicegroup050.inc index ed5f1ba71d..6f401b9593 100644 --- a/sound/voicegroups/voicegroup050.inc +++ b/sound/voicegroups/voicegroup050.inc @@ -1,131 +1,131 @@ .align 2 voicegroup050:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup051.inc b/sound/voicegroups/voicegroup051.inc index 31b69cd879..d3a144622a 100644 --- a/sound/voicegroups/voicegroup051.inc +++ b/sound/voicegroups/voicegroup051.inc @@ -1,77 +1,77 @@ .align 2 voicegroup051:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 1, 4, 4, 2 - voice_square_1_alt 60, 0, 0, 2, 0, 3, 4, 1 - voice_square_2_alt 60, 0, 2, 1, 3, 4, 2 - voice_square_1_alt 60, 0, 0, 2, 0, 3, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 1, 4, 4, 2 + voice_square_1_alt 60, 0, 0, 2, 0, 3, 4, 1 + voice_square_2_alt 60, 0, 2, 1, 3, 4, 2 + voice_square_1_alt 60, 0, 0, 2, 0, 3, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 diff --git a/sound/voicegroups/voicegroup052.inc b/sound/voicegroups/voicegroup052.inc index b7020362df..ce6c19e3a0 100644 --- a/sound/voicegroups/voicegroup052.inc +++ b/sound/voicegroups/voicegroup052.inc @@ -1,131 +1,131 @@ .align 2 voicegroup052:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 3, 1, 2, 6, 0 - voice_square_2 60, 0, 3, 1, 2, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 1, 6, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 7, 6, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 9, 4 - voice_noise_alt 60, 0, 0, 3, 1, 10, 0 - voice_noise_alt 60, 0, 0, 0, 2, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 3, 1, 2, 6, 0 + voice_square_2 60, 0, 3, 1, 2, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 1, 6, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 7, 6, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 9, 4 + voice_noise_alt 60, 0, 0, 3, 1, 10, 0 + voice_noise_alt 60, 0, 0, 0, 2, 0, 0 diff --git a/sound/voicegroups/voicegroup053.inc b/sound/voicegroups/voicegroup053.inc index 3d3312b1d2..f9c21afe3a 100644 --- a/sound/voicegroups/voicegroup053.inc +++ b/sound/voicegroups/voicegroup053.inc @@ -1,131 +1,131 @@ .align 2 voicegroup053:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup054.inc b/sound/voicegroups/voicegroup054.inc index 9d762c5616..4cd90843c4 100644 --- a/sound/voicegroups/voicegroup054.inc +++ b/sound/voicegroups/voicegroup054.inc @@ -1,131 +1,131 @@ .align 2 voicegroup054:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 5, 2 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 5, 2 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup055.inc b/sound/voicegroups/voicegroup055.inc index 90f10a26c8..aa9f7d1139 100644 --- a/sound/voicegroups/voicegroup055.inc +++ b/sound/voicegroups/voicegroup055.inc @@ -1,131 +1,131 @@ .align 2 voicegroup055:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 204, 193, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 2 - voice_square_2_alt 60, 0, 1, 1, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 204, 193, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 2 + voice_square_2_alt 60, 0, 1, 1, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup056.inc b/sound/voicegroups/voicegroup056.inc index 5d945f3663..42f7791001 100644 --- a/sound/voicegroups/voicegroup056.inc +++ b/sound/voicegroups/voicegroup056.inc @@ -1,131 +1,131 @@ .align 2 voicegroup056:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup057.inc b/sound/voicegroups/voicegroup057.inc index dbdb059cee..6bd58e87eb 100644 --- a/sound/voicegroups/voicegroup057.inc +++ b/sound/voicegroups/voicegroup057.inc @@ -1,131 +1,131 @@ .align 2 voicegroup057:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 188, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 128, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_bubbles, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 1, 4, 10, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 1, 5, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 188, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 128, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_bubbles, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 1, 4, 10, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 1, 5, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup058.inc b/sound/voicegroups/voicegroup058.inc index 0af41d7890..af043d943e 100644 --- a/sound/voicegroups/voicegroup058.inc +++ b/sound/voicegroups/voicegroup058.inc @@ -1,131 +1,131 @@ .align 2 voicegroup058:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup059.inc b/sound/voicegroups/voicegroup059.inc index 4a9fccbc5d..f0c4d3415d 100644 --- a/sound/voicegroups/voicegroup059.inc +++ b/sound/voicegroups/voicegroup059.inc @@ -1,92 +1,92 @@ .align 2 voicegroup059:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 1, 1, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 2 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 1, 1, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 1, 1, 6, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 2 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 1, 1, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 diff --git a/sound/voicegroups/voicegroup060.inc b/sound/voicegroups/voicegroup060.inc index e63327194d..448841e625 100644 --- a/sound/voicegroups/voicegroup060.inc +++ b/sound/voicegroups/voicegroup060.inc @@ -1,131 +1,131 @@ .align 2 voicegroup060:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 128, 226, 0, 38 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 1, 1, 6, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 4, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 7, 3, 3 - voice_square_1_alt 60, 0, 0, 2, 0, 7, 3, 3 - voice_square_1_alt 60, 0, 0, 3, 2, 2, 7, 0 - voice_square_2_alt 60, 0, 1, 1, 2, 3, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 128, 226, 0, 38 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 1, 1, 6, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 4, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 7, 3, 3 + voice_square_1_alt 60, 0, 0, 2, 0, 7, 3, 3 + voice_square_1_alt 60, 0, 0, 3, 2, 2, 7, 0 + voice_square_2_alt 60, 0, 1, 1, 2, 3, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup061.inc b/sound/voicegroups/voicegroup061.inc index 2775a7c2c5..af46400940 100644 --- a/sound/voicegroups/voicegroup061.inc +++ b/sound/voicegroups/voicegroup061.inc @@ -1,131 +1,131 @@ .align 2 voicegroup061:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup062.inc b/sound/voicegroups/voicegroup062.inc index 1687aa535a..d3745820e9 100644 --- a/sound/voicegroups/voicegroup062.inc +++ b/sound/voicegroups/voicegroup062.inc @@ -1,131 +1,131 @@ .align 2 voicegroup062:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup063.inc b/sound/voicegroups/voicegroup063.inc index 6461b3aa21..bd316ea2c5 100644 --- a/sound/voicegroups/voicegroup063.inc +++ b/sound/voicegroups/voicegroup063.inc @@ -1,131 +1,131 @@ .align 2 voicegroup063:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup064.inc b/sound/voicegroups/voicegroup064.inc index 9199434001..e617f0ffd2 100644 --- a/sound/voicegroups/voicegroup064.inc +++ b/sound/voicegroups/voicegroup064.inc @@ -1,131 +1,131 @@ .align 2 voicegroup064:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup065.inc b/sound/voicegroups/voicegroup065.inc index 3ec97c6b63..d435a0a306 100644 --- a/sound/voicegroups/voicegroup065.inc +++ b/sound/voicegroups/voicegroup065.inc @@ -1,131 +1,131 @@ .align 2 voicegroup065:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup066.inc b/sound/voicegroups/voicegroup066.inc index fff4e5a672..d5bffde63e 100644 --- a/sound/voicegroups/voicegroup066.inc +++ b/sound/voicegroups/voicegroup066.inc @@ -1,131 +1,131 @@ .align 2 voicegroup066:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup067.inc b/sound/voicegroups/voicegroup067.inc index 6484d44790..dffd21a706 100644 --- a/sound/voicegroups/voicegroup067.inc +++ b/sound/voicegroups/voicegroup067.inc @@ -1,131 +1,131 @@ .align 2 voicegroup067:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup068.inc b/sound/voicegroups/voicegroup068.inc index 3a7b4b034f..fc3f7246d8 100644 --- a/sound/voicegroups/voicegroup068.inc +++ b/sound/voicegroups/voicegroup068.inc @@ -1,131 +1,131 @@ .align 2 voicegroup068:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 2, 3, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 2, 3, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup069.inc b/sound/voicegroups/voicegroup069.inc index d2372c0cd7..477fd538b4 100644 --- a/sound/voicegroups/voicegroup069.inc +++ b/sound/voicegroups/voicegroup069.inc @@ -1,131 +1,131 @@ .align 2 voicegroup069:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup070.inc b/sound/voicegroups/voicegroup070.inc index 965cf73a88..aaa4078028 100644 --- a/sound/voicegroups/voicegroup070.inc +++ b/sound/voicegroups/voicegroup070.inc @@ -1,131 +1,131 @@ .align 2 voicegroup070:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup071.inc b/sound/voicegroups/voicegroup071.inc index 0d247bb5e5..c6c7414e3f 100644 --- a/sound/voicegroups/voicegroup071.inc +++ b/sound/voicegroups/voicegroup071.inc @@ -1,131 +1,131 @@ .align 2 voicegroup071:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup072.inc b/sound/voicegroups/voicegroup072.inc index 6c4c840ad2..7c040a3e77 100644 --- a/sound/voicegroups/voicegroup072.inc +++ b/sound/voicegroups/voicegroup072.inc @@ -1,131 +1,131 @@ .align 2 voicegroup072:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup073.inc b/sound/voicegroups/voicegroup073.inc index bc859f0e75..9692cc87db 100644 --- a/sound/voicegroups/voicegroup073.inc +++ b/sound/voicegroups/voicegroup073.inc @@ -1,131 +1,131 @@ .align 2 voicegroup073:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup074.inc b/sound/voicegroups/voicegroup074.inc index da9bbb03ce..5be06711b5 100644 --- a/sound/voicegroups/voicegroup074.inc +++ b/sound/voicegroups/voicegroup074.inc @@ -1,131 +1,131 @@ .align 2 voicegroup074:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup075.inc b/sound/voicegroups/voicegroup075.inc index 908ca57074..72b144a13a 100644 --- a/sound/voicegroups/voicegroup075.inc +++ b/sound/voicegroups/voicegroup075.inc @@ -1,131 +1,131 @@ .align 2 voicegroup075:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 3, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 3, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup076.inc b/sound/voicegroups/voicegroup076.inc index c8faabe75c..a4eadcef3f 100644 --- a/sound/voicegroups/voicegroup076.inc +++ b/sound/voicegroups/voicegroup076.inc @@ -1,131 +1,131 @@ .align 2 voicegroup076:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup077.inc b/sound/voicegroups/voicegroup077.inc index 3bf100be53..08f0e5e389 100644 --- a/sound/voicegroups/voicegroup077.inc +++ b/sound/voicegroups/voicegroup077.inc @@ -1,131 +1,131 @@ .align 2 voicegroup077:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 196 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 196 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup078.inc b/sound/voicegroups/voicegroup078.inc index 721b804309..b6dba9dca1 100644 --- a/sound/voicegroups/voicegroup078.inc +++ b/sound/voicegroups/voicegroup078.inc @@ -1,131 +1,131 @@ .align 2 voicegroup078:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 196 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 2, 0, 2 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 196 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 2, 0, 2 diff --git a/sound/voicegroups/voicegroup079.inc b/sound/voicegroups/voicegroup079.inc index 7923d4d32d..ecea4eca18 100644 --- a/sound/voicegroups/voicegroup079.inc +++ b/sound/voicegroups/voicegroup079.inc @@ -1,131 +1,131 @@ .align 2 voicegroup079:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 1 - voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 5 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 4, 4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 1 + voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 5 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 4, 4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup080.inc b/sound/voicegroups/voicegroup080.inc index 4db39381d4..a6827083c6 100644 --- a/sound/voicegroups/voicegroup080.inc +++ b/sound/voicegroups/voicegroup080.inc @@ -1,131 +1,131 @@ .align 2 voicegroup080:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup081.inc b/sound/voicegroups/voicegroup081.inc index f47f89a8d4..e9c2011e40 100644 --- a/sound/voicegroups/voicegroup081.inc +++ b/sound/voicegroups/voicegroup081.inc @@ -1,5 +1,5 @@ .align 2 voicegroup081:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup005, KeySplitTable1 diff --git a/sound/voicegroups/voicegroup082.inc b/sound/voicegroups/voicegroup082.inc index 676900e7f7..9aa1d7c5b4 100644 --- a/sound/voicegroups/voicegroup082.inc +++ b/sound/voicegroups/voicegroup082.inc @@ -1,131 +1,131 @@ .align 2 voicegroup082:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 1 - voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 4, 4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 1 + voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 4, 4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup083.inc b/sound/voicegroups/voicegroup083.inc index 7a345fdb1b..09cee33e15 100644 --- a/sound/voicegroups/voicegroup083.inc +++ b/sound/voicegroups/voicegroup083.inc @@ -1,87 +1,87 @@ .align 2 voicegroup083:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 72, 249 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 6, 4 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 6, 1 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 72, 249 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 6, 4 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 6, 1 diff --git a/sound/voicegroups/voicegroup084.inc b/sound/voicegroups/voicegroup084.inc index 8b30d81255..ee994d84d3 100644 --- a/sound/voicegroups/voicegroup084.inc +++ b/sound/voicegroups/voicegroup084.inc @@ -1,131 +1,131 @@ .align 2 voicegroup084:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup085.inc b/sound/voicegroups/voicegroup085.inc index 0cd2dcc2f7..bd2cc348f0 100644 --- a/sound/voicegroups/voicegroup085.inc +++ b/sound/voicegroups/voicegroup085.inc @@ -1,131 +1,131 @@ .align 2 voicegroup085:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 1, 2, 4, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 13, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 1, 2, 4, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 13, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup086.inc b/sound/voicegroups/voicegroup086.inc index 57069bf8af..482a7729e3 100644 --- a/sound/voicegroups/voicegroup086.inc +++ b/sound/voicegroups/voicegroup086.inc @@ -1,131 +1,131 @@ .align 2 voicegroup086:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup087.inc b/sound/voicegroups/voicegroup087.inc index 59e24b7cce..d9295b3fe7 100644 --- a/sound/voicegroups/voicegroup087.inc +++ b/sound/voicegroups/voicegroup087.inc @@ -1,131 +1,131 @@ .align 2 voicegroup087:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup088.inc b/sound/voicegroups/voicegroup088.inc index 77fe56d2d8..82afd10f63 100644 --- a/sound/voicegroups/voicegroup088.inc +++ b/sound/voicegroups/voicegroup088.inc @@ -1,131 +1,131 @@ .align 2 voicegroup088:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 1, 1, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 6, 2 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 1, 1, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 6, 2 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup089.inc b/sound/voicegroups/voicegroup089.inc index 531e5f543a..7d71119ba3 100644 --- a/sound/voicegroups/voicegroup089.inc +++ b/sound/voicegroups/voicegroup089.inc @@ -1,131 +1,131 @@ .align 2 voicegroup089:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 3 - voice_square_2_alt 60, 0, 2, 0, 2, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 3 + voice_square_2_alt 60, 0, 2, 0, 2, 4, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup090.inc b/sound/voicegroups/voicegroup090.inc index dd3301845f..f66d09b65c 100644 --- a/sound/voicegroups/voicegroup090.inc +++ b/sound/voicegroups/voicegroup090.inc @@ -1,131 +1,131 @@ .align 2 voicegroup090:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 2, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 2, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup091.inc b/sound/voicegroups/voicegroup091.inc index 59230282e5..df866235ed 100644 --- a/sound/voicegroups/voicegroup091.inc +++ b/sound/voicegroups/voicegroup091.inc @@ -1,131 +1,131 @@ .align 2 voicegroup091:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 72, 249 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 5, 2 - voice_square_2_alt 60, 0, 2, 0, 1, 5, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 72, 249 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 226, 0, 38 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 5, 2 + voice_square_2_alt 60, 0, 2, 0, 1, 5, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup092.inc b/sound/voicegroups/voicegroup092.inc index 0fff2f1214..9b91a44aa2 100644 --- a/sound/voicegroups/voicegroup092.inc +++ b/sound/voicegroups/voicegroup092.inc @@ -1,131 +1,131 @@ .align 2 voicegroup092:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup093.inc b/sound/voicegroups/voicegroup093.inc index 2d1b721daf..44149b083c 100644 --- a/sound/voicegroups/voicegroup093.inc +++ b/sound/voicegroups/voicegroup093.inc @@ -1,131 +1,131 @@ .align 2 voicegroup093:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup094.inc b/sound/voicegroups/voicegroup094.inc index 72bc1098c4..21cab6cd2a 100644 --- a/sound/voicegroups/voicegroup094.inc +++ b/sound/voicegroups/voicegroup094.inc @@ -1,131 +1,131 @@ .align 2 voicegroup094:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 72, 249 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 72, 249 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup095.inc b/sound/voicegroups/voicegroup095.inc index 83afb58b13..0c791dc9eb 100644 --- a/sound/voicegroups/voicegroup095.inc +++ b/sound/voicegroups/voicegroup095.inc @@ -1,131 +1,131 @@ .align 2 voicegroup095:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup096.inc b/sound/voicegroups/voicegroup096.inc index bf0bd6badb..8fe0892e69 100644 --- a/sound/voicegroups/voicegroup096.inc +++ b/sound/voicegroups/voicegroup096.inc @@ -1,131 +1,131 @@ .align 2 voicegroup096:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup097.inc b/sound/voicegroups/voicegroup097.inc index 8c4cea3b7b..e184093479 100644 --- a/sound/voicegroups/voicegroup097.inc +++ b/sound/voicegroups/voicegroup097.inc @@ -1,131 +1,131 @@ .align 2 voicegroup097:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 249 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 249 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup098.inc b/sound/voicegroups/voicegroup098.inc index e49d32b427..001bd5222a 100644 --- a/sound/voicegroups/voicegroup098.inc +++ b/sound/voicegroups/voicegroup098.inc @@ -1,131 +1,131 @@ .align 2 voicegroup098:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_873ECD8, 255, 255, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_873ECD8, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup099.inc b/sound/voicegroups/voicegroup099.inc index 60b93f6156..f4031beebb 100644 --- a/sound/voicegroups/voicegroup099.inc +++ b/sound/voicegroups/voicegroup099.inc @@ -1,131 +1,131 @@ .align 2 voicegroup099:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 - voice_square_1_alt 60, 0, 0, 1, 2, 1, 5, 0 - voice_square_2_alt 60, 0, 1, 2, 1, 5, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 + voice_square_1_alt 60, 0, 0, 1, 2, 1, 5, 0 + voice_square_2_alt 60, 0, 1, 2, 1, 5, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup100.inc b/sound/voicegroups/voicegroup100.inc index f096a9d8a4..fa936e9590 100644 --- a/sound/voicegroups/voicegroup100.inc +++ b/sound/voicegroups/voicegroup100.inc @@ -1,131 +1,131 @@ .align 2 voicegroup100:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 2, 1, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 1, 1, 4, 1 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 2, 1, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 1, 1, 4, 1 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup101.inc b/sound/voicegroups/voicegroup101.inc index 53f34ae295..5527ec7964 100644 --- a/sound/voicegroups/voicegroup101.inc +++ b/sound/voicegroups/voicegroup101.inc @@ -1,113 +1,113 @@ .align 2 voicegroup101:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 1, 5, 2, 4 - voice_square_2_alt 60, 0, 1, 1, 5, 2, 4 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 1, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 1, 1, 6, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 4, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 1, 4, 6, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 1, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 1, 1, 6, 1 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 1, 5, 2, 4 + voice_square_2_alt 60, 0, 1, 1, 5, 2, 4 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 1, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 1, 1, 6, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 4, 6, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 1, 4, 6, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 1, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 1, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup102.inc b/sound/voicegroups/voicegroup102.inc index 2f1fbb6671..197ed891be 100644 --- a/sound/voicegroups/voicegroup102.inc +++ b/sound/voicegroups/voicegroup102.inc @@ -1,85 +1,85 @@ .align 2 voicegroup102:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 248 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 6, 0, 6 - voice_square_2_alt 60, 0, 2, 0, 6, 0, 6 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 248 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 6, 0, 6 + voice_square_2_alt 60, 0, 2, 0, 6, 0, 6 diff --git a/sound/voicegroups/voicegroup103.inc b/sound/voicegroups/voicegroup103.inc index 784b39ee22..e60c3c1aae 100644 --- a/sound/voicegroups/voicegroup103.inc +++ b/sound/voicegroups/voicegroup103.inc @@ -1,131 +1,131 @@ .align 2 voicegroup103:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 0, 10, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 0, 10, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 1 diff --git a/sound/voicegroups/voicegroup104.inc b/sound/voicegroups/voicegroup104.inc index bd59914635..9ca1a88484 100644 --- a/sound/voicegroups/voicegroup104.inc +++ b/sound/voicegroups/voicegroup104.inc @@ -1,111 +1,111 @@ .align 2 voicegroup104:: - voice_keysplit_all voicegroup003 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_unknown_koto_high, 255, 0, 206, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_shakuhachi, 255, 0, 255, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 2, 0, 12, 5 - voice_square_2_alt 60, 0, 0, 0, 0, 10, 4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 2, 0, 12, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_unknown_koto_low, 255, 0, 206, 242 + voice_keysplit_all voicegroup003 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_unknown_koto_high, 255, 0, 206, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_shakuhachi, 255, 0, 255, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 2, 0, 12, 5 + voice_square_2_alt 60, 0, 0, 0, 0, 10, 4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 2, 0, 12, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_unknown_koto_low, 255, 0, 206, 242 diff --git a/sound/voicegroups/voicegroup105.inc b/sound/voicegroups/voicegroup105.inc index 3355294178..c3bfdec9aa 100644 --- a/sound/voicegroups/voicegroup105.inc +++ b/sound/voicegroups/voicegroup105.inc @@ -1,86 +1,86 @@ .align 2 voicegroup105:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 9, 4 - voice_square_2_alt 60, 0, 2, 0, 2, 9, 4 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 9, 4 + voice_square_2_alt 60, 0, 2, 0, 2, 9, 4 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 diff --git a/sound/voicegroups/voicegroup106.inc b/sound/voicegroups/voicegroup106.inc index b20862853f..834b9a8a26 100644 --- a/sound/voicegroups/voicegroup106.inc +++ b/sound/voicegroups/voicegroup106.inc @@ -1,131 +1,131 @@ .align 2 voicegroup106:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 64, 38, 128, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 64, 38, 128, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup107.inc b/sound/voicegroups/voicegroup107.inc index 45f1cfdc9f..e2945809e6 100644 --- a/sound/voicegroups/voicegroup107.inc +++ b/sound/voicegroups/voicegroup107.inc @@ -1,131 +1,131 @@ .align 2 voicegroup107:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup108.inc b/sound/voicegroups/voicegroup108.inc index 1821dd6a1e..b539070109 100644 --- a/sound/voicegroups/voicegroup108.inc +++ b/sound/voicegroups/voicegroup108.inc @@ -1,131 +1,131 @@ .align 2 voicegroup108:: - voice_keysplit_all voicegroup004 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_heart_of_asia_gamelan, 255, 188, 139, 239 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 13, 4 - voice_square_2_alt 60, 0, 0, 0, 0, 9, 2 - voice_square_2_alt 60, 0, 1, 0, 0, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup004 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_heart_of_asia_gamelan, 255, 188, 139, 239 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 13, 4 + voice_square_2_alt 60, 0, 0, 0, 0, 9, 2 + voice_square_2_alt 60, 0, 1, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup109.inc b/sound/voicegroups/voicegroup109.inc index 984367a4e9..52942e9ecf 100644 --- a/sound/voicegroups/voicegroup109.inc +++ b/sound/voicegroups/voicegroup109.inc @@ -1,86 +1,86 @@ .align 2 voicegroup109:: - voice_keysplit_all voicegroup004 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_church_organ3_low, 255, 76, 154, 188 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_church_organ3_high, 255, 76, 154, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 0, 13, 1 - voice_square_2_alt 60, 0, 0, 0, 0, 12, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_keysplit_all voicegroup004 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_church_organ3_low, 255, 76, 154, 188 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_church_organ3_high, 255, 76, 154, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 0, 13, 1 + voice_square_2_alt 60, 0, 0, 0, 0, 12, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup110.inc b/sound/voicegroups/voicegroup110.inc index dcd51d9eb1..a13facb2cf 100644 --- a/sound/voicegroups/voicegroup110.inc +++ b/sound/voicegroups/voicegroup110.inc @@ -1,131 +1,131 @@ .align 2 voicegroup110:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 0, 10, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 239 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 0, 10, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 1 diff --git a/sound/voicegroups/voicegroup111.inc b/sound/voicegroups/voicegroup111.inc index f05cda8069..546ed3a465 100644 --- a/sound/voicegroups/voicegroup111.inc +++ b/sound/voicegroups/voicegroup111.inc @@ -1,131 +1,131 @@ .align 2 voicegroup111:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 226 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 195 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 195 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 195 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 2, 6, 1 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 226 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 195 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 195 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 195 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 2, 6, 1 diff --git a/sound/voicegroups/voicegroup112.inc b/sound/voicegroups/voicegroup112.inc index bd58c332d7..ad1c4a1b7d 100644 --- a/sound/voicegroups/voicegroup112.inc +++ b/sound/voicegroups/voicegroup112.inc @@ -1,131 +1,131 @@ .align 2 voicegroup112:: - voice_keysplit_all voicegroup003 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 128, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 128, 165, 128, 188 - voice_directsound 60, 0, DirectSoundWaveData_unknown_female_voice, 128, 165, 128, 204 - voice_directsound 60, 0, DirectSoundWaveData_unused_unknown_male_voice, 128, 165, 128, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 0, 7, 0 - voice_square_2_alt 60, 0, 1, 0, 0, 6, 0 - voice_square_2_alt 60, 0, 3, 0, 0, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 7, 10, 1 - voice_noise_alt 60, 0, 0, 0, 2, 6, 1 + voice_keysplit_all voicegroup003 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 76 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 128, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 128, 165, 128, 188 + voice_directsound 60, 0, DirectSoundWaveData_unknown_female_voice, 128, 165, 128, 204 + voice_directsound 60, 0, DirectSoundWaveData_unused_unknown_male_voice, 128, 165, 128, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 0, 7, 0 + voice_square_2_alt 60, 0, 1, 0, 0, 6, 0 + voice_square_2_alt 60, 0, 3, 0, 0, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 7, 10, 1 + voice_noise_alt 60, 0, 0, 0, 2, 6, 1 diff --git a/sound/voicegroups/voicegroup113.inc b/sound/voicegroups/voicegroup113.inc index 309f1f39eb..cfe06aa97b 100644 --- a/sound/voicegroups/voicegroup113.inc +++ b/sound/voicegroups/voicegroup113.inc @@ -1,131 +1,131 @@ .align 2 voicegroup113:: - voice_keysplit_all voicegroup002 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4990, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B49B0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B49A0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4980, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48B0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48C0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48D0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48E0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48F0, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 195 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 7, 7, 0 - voice_square_2_alt 60, 0, 2, 0, 7, 7, 0 - voice_square_2_alt 60, 0, 1, 0, 7, 7, 0 - voice_square_2_alt 60, 0, 0, 0, 7, 7, 0 - voice_square_2_alt 60, 0, 3, 0, 7, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 7, 7, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 7, 7, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 7, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 - voice_noise_alt 60, 0, 0, 0, 2, 6, 1 + voice_keysplit_all voicegroup002 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4990, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B49B0, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B49A0, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4980, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48B0, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48C0, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48D0, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48E0, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48F0, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 195 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 180, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 7, 7, 0 + voice_square_2_alt 60, 0, 2, 0, 7, 7, 0 + voice_square_2_alt 60, 0, 1, 0, 7, 7, 0 + voice_square_2_alt 60, 0, 0, 0, 7, 7, 0 + voice_square_2_alt 60, 0, 3, 0, 7, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 7, 7, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 7, 7, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 7, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_noise_alt 60, 0, 0, 0, 2, 6, 1 diff --git a/sound/voicegroups/voicegroup114.inc b/sound/voicegroups/voicegroup114.inc index 03ac0cdcfe..cb078d24c3 100644 --- a/sound/voicegroups/voicegroup114.inc +++ b/sound/voicegroups/voicegroup114.inc @@ -1,131 +1,131 @@ .align 2 voicegroup114:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 diff --git a/sound/voicegroups/voicegroup115.inc b/sound/voicegroups/voicegroup115.inc index bb9c4f4ba9..afdfebaf7b 100644 --- a/sound/voicegroups/voicegroup115.inc +++ b/sound/voicegroups/voicegroup115.inc @@ -1,131 +1,131 @@ .align 2 voicegroup115:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 128, 249, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 188, 103, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 165, 154, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 198 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 146 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 165, 180, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 6, 0 - voice_square_2_alt 60, 0, 3, 0, 3, 6, 2 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 1, 9, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 2 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 128, 249, 0, 188 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 188, 103, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 165, 154, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 198 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 146 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 165, 180, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 6, 0 + voice_square_2_alt 60, 0, 3, 0, 3, 6, 2 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 1, 9, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 2 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup116.inc b/sound/voicegroups/voicegroup116.inc index 028bbc32bd..c5b16797ae 100644 --- a/sound/voicegroups/voicegroup116.inc +++ b/sound/voicegroups/voicegroup116.inc @@ -1,131 +1,131 @@ .align 2 voicegroup116:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 190, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88pro_unison_slap, 255, 165, 180, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 - voice_square_2_alt 60, 0, 3, 0, 3, 3, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 3, 6, 5 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 7, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 190, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88pro_unison_slap, 255, 165, 180, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 + voice_square_2_alt 60, 0, 3, 0, 3, 3, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 3, 6, 5 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 7, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup117.inc b/sound/voicegroups/voicegroup117.inc index a149f727fa..da6a16d7af 100644 --- a/sound/voicegroups/voicegroup117.inc +++ b/sound/voicegroups/voicegroup117.inc @@ -1,85 +1,85 @@ .align 2 voicegroup117:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 1, 1 - voice_square_1 60, 0, 0, 2, 0, 1, 1, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 1, 1 + voice_square_1 60, 0, 0, 2, 0, 1, 1, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup118.inc b/sound/voicegroups/voicegroup118.inc index a4d6263309..129831d75e 100644 --- a/sound/voicegroups/voicegroup118.inc +++ b/sound/voicegroups/voicegroup118.inc @@ -1,94 +1,94 @@ .align 2 voicegroup118:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 0, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 0, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 250, 0, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_trinity_big_boned, 255, 0, 255, 127 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 0, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 0, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 250, 0, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_trinity_big_boned, 255, 0, 255, 127 diff --git a/sound/voicegroups/voicegroup119.inc b/sound/voicegroups/voicegroup119.inc index 91051a6729..063ed24b96 100644 --- a/sound/voicegroups/voicegroup119.inc +++ b/sound/voicegroups/voicegroup119.inc @@ -1,94 +1,94 @@ .align 2 voicegroup119:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 0, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 0, 0, 2, 4, 1 - voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 0, DirectSoundWaveData_sc88pro_timpani_with_snare, 255, 246, 0, 226 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_2 60, 0, 1, 0, 1, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 0, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 0, 0, 2, 4, 1 + voice_square_2 60, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 0, DirectSoundWaveData_sc88pro_timpani_with_snare, 255, 246, 0, 226 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_2 60, 0, 1, 0, 1, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup120.inc b/sound/voicegroups/voicegroup120.inc index 5c65be3382..f80380fc48 100644 --- a/sound/voicegroups/voicegroup120.inc +++ b/sound/voicegroups/voicegroup120.inc @@ -1,94 +1,94 @@ .align 2 voicegroup120:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 2, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 2, 6, 1 - voice_square_2 60, 0, 3, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 3, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 7, 1 - voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 2, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 2, 6, 1 + voice_square_2 60, 0, 3, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 3, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 7, 1 + voice_square_2 60, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup121.inc b/sound/voicegroups/voicegroup121.inc index d50d9eea3d..2c9e9fa3e6 100644 --- a/sound/voicegroups/voicegroup121.inc +++ b/sound/voicegroups/voicegroup121.inc @@ -1,89 +1,89 @@ .align 2 voicegroup121:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_2 60, 0, 0, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 0, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 0, 0, 0, 7, 1 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_2 60, 0, 0, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 0, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 0, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup122.inc b/sound/voicegroups/voicegroup122.inc index a2241b6d21..ca64a7c009 100644 --- a/sound/voicegroups/voicegroup122.inc +++ b/sound/voicegroups/voicegroup122.inc @@ -1,87 +1,87 @@ .align 2 voicegroup122:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 1, 0, 1, 6, 1 - voice_square_1 60, 0, 0, 1, 0, 1, 6, 1 - voice_square_2 60, 0, 2, 0, 1, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 1, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_trinity_big_boned, 255, 165, 154, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 3, 0, 1, 9, 1 - voice_square_1 60, 0, 0, 3, 0, 0, 9, 1 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 1, 0, 1, 6, 1 + voice_square_1 60, 0, 0, 1, 0, 1, 6, 1 + voice_square_2 60, 0, 2, 0, 1, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 1, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_trinity_big_boned, 255, 165, 154, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 3, 0, 1, 9, 1 + voice_square_1 60, 0, 0, 3, 0, 0, 9, 1 diff --git a/sound/voicegroups/voicegroup123.inc b/sound/voicegroups/voicegroup123.inc index cb2e39045c..6178994cca 100644 --- a/sound/voicegroups/voicegroup123.inc +++ b/sound/voicegroups/voicegroup123.inc @@ -1,131 +1,131 @@ .align 2 voicegroup123:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 216, 90, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 diff --git a/sound/voicegroups/voicegroup124.inc b/sound/voicegroups/voicegroup124.inc index c7f9c475a3..6f5d263b3d 100644 --- a/sound/voicegroups/voicegroup124.inc +++ b/sound/voicegroups/voicegroup124.inc @@ -1,90 +1,90 @@ .align 2 voicegroup124:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_2 60, 0, 3, 0, 2, 7, 1 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_2 60, 0, 3, 0, 2, 7, 1 diff --git a/sound/voicegroups/voicegroup125.inc b/sound/voicegroups/voicegroup125.inc index e5f2ddf3eb..afe16b0b0f 100644 --- a/sound/voicegroups/voicegroup125.inc +++ b/sound/voicegroups/voicegroup125.inc @@ -1,87 +1,87 @@ .align 2 voicegroup125:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 2, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 2, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup126.inc b/sound/voicegroups/voicegroup126.inc index 53ff6eb193..a2e663cf12 100644 --- a/sound/voicegroups/voicegroup126.inc +++ b/sound/voicegroups/voicegroup126.inc @@ -1,131 +1,131 @@ .align 2 voicegroup126:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 0, 1, 1, 7, 1 - voice_square_1 60, 0, 0, 0, 1, 1, 7, 1 - voice_square_1 60, 0, 0, 0, 0, 0, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2 60, 0, 3, 1, 1, 6, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 3, 1, 1, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 216 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 0, 1, 1, 7, 1 + voice_square_1 60, 0, 0, 0, 1, 1, 7, 1 + voice_square_1 60, 0, 0, 0, 0, 0, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2 60, 0, 3, 1, 1, 6, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 3, 1, 1, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 216 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 246, 0, 216 diff --git a/sound/voicegroups/voicegroup127.inc b/sound/voicegroups/voicegroup127.inc index c812157da4..476d3f48f6 100644 --- a/sound/voicegroups/voicegroup127.inc +++ b/sound/voicegroups/voicegroup127.inc @@ -1,131 +1,131 @@ .align 2 voicegroup127:: - voice_directsound 60, 0, DirectSoundWaveData_unknown_synth_snare, 255, 249, 103, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 0, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 4, 0, 1 - voice_square_1_alt 60, 0, 44, 2, 0, 4, 0, 0 - voice_square_1_alt 60, 0, 38, 0, 0, 4, 0, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 7, 0, 0 - voice_square_1_alt 60, 0, 0, 2, 2, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 2, 0, 15, 0 - voice_square_1_alt 60, 0, 23, 1, 0, 1, 9, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 226, 0, 165 - voice_square_1_alt 60, 0, 0, 2, 0, 6, 0, 1 - voice_square_1_alt 60, 0, 36, 0, 0, 2, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 0, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 0, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 46, 2, 0, 4, 0, 0 - voice_square_1_alt 60, 0, 38, 2, 0, 4, 0, 0 - voice_square_1_alt 60, 0, 119, 2, 0, 0, 15, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 1 - voice_square_1_alt 60, 0, 106, 2, 0, 2, 0, 0 - voice_square_1_alt 60, 0, 23, 2, 0, 1, 9, 0 - voice_square_1_alt 60, 0, 21, 2, 0, 1, 9, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 0, 15, 1 - voice_square_1_alt 60, 0, 47, 2, 0, 2, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise 60, 0, 0, 0, 7, 15, 0 - voice_noise 60, 0, 0, 2, 7, 15, 0 - voice_noise_alt 60, 0, 0, 2, 0, 15, 0 - voice_noise_alt 60, 0, 1, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 3, 0, 0 - voice_noise_alt 60, 0, 0, 0, 2, 0, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 1 + voice_directsound 60, 0, DirectSoundWaveData_unknown_synth_snare, 255, 249, 103, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 0, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 4, 0, 1 + voice_square_1_alt 60, 0, 44, 2, 0, 4, 0, 0 + voice_square_1_alt 60, 0, 38, 0, 0, 4, 0, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 7, 0, 0 + voice_square_1_alt 60, 0, 0, 2, 2, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 2, 0, 15, 0 + voice_square_1_alt 60, 0, 23, 1, 0, 1, 9, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 226, 0, 165 + voice_square_1_alt 60, 0, 0, 2, 0, 6, 0, 1 + voice_square_1_alt 60, 0, 36, 0, 0, 2, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 0, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 0, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 46, 2, 0, 4, 0, 0 + voice_square_1_alt 60, 0, 38, 2, 0, 4, 0, 0 + voice_square_1_alt 60, 0, 119, 2, 0, 0, 15, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 1 + voice_square_1_alt 60, 0, 106, 2, 0, 2, 0, 0 + voice_square_1_alt 60, 0, 23, 2, 0, 1, 9, 0 + voice_square_1_alt 60, 0, 21, 2, 0, 1, 9, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 0, 15, 1 + voice_square_1_alt 60, 0, 47, 2, 0, 2, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise 60, 0, 0, 0, 7, 15, 0 + voice_noise 60, 0, 0, 2, 7, 15, 0 + voice_noise_alt 60, 0, 0, 2, 0, 15, 0 + voice_noise_alt 60, 0, 1, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 3, 0, 0 + voice_noise_alt 60, 0, 0, 0, 2, 0, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 1 diff --git a/sound/voicegroups/voicegroup128.inc b/sound/voicegroups/voicegroup128.inc index 78e0bf43af..ce4904626a 100644 --- a/sound/voicegroups/voicegroup128.inc +++ b/sound/voicegroups/voicegroup128.inc @@ -1,131 +1,131 @@ .align 2 voicegroup128:: - voice_directsound_no_resample 60, 0, DirectSoundWaveData_bicycle_bell, 255, 249, 0, 165 - voice_directsound_alt 60, 0, DirectSoundWaveData_bicycle_bell, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_unknown_synth_snare, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 242, 0, 127 - voice_noise_alt 60, 0, 0, 0, 1, 0, 1 - voice_noise_alt 60, 0, 1, 0, 1, 0, 1 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 255, 165 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 1 - voice_directsound 60, 0, DirectSoundWaveData_8725A2C, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_872762C, 255, 0, 255, 127 - voice_noise_alt 60, 0, 1, 0, 2, 0, 0 - voice_square_1 60, 0, 103, 3, 2, 7, 0, 0 - voice_square_2 60, 0, 3, 2, 7, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 226, 0, 127 - voice_directsound 60, 0, DirectSoundWaveData_872921C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 204, 0, 127 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 1 - voice_directsound 60, 0, DirectSoundWaveData_872A5D0, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 - voice_square_1 60, 0, 103, 0, 0, 7, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_wind, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_bubbles, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 127 - voice_noise_alt 60, 0, 0, 0, 7, 15, 1 - voice_directsound 60, 0, DirectSoundWaveData_872EEA8, 255, 0, 255, 127 - voice_noise_alt 60, 0, 1, 0, 7, 15, 1 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 246, 0, 127 - voice_directsound 60, 0, DirectSoundWaveData_87301B0, 255, 0, 255, 127 - voice_square_1_alt 60, 0, 19, 2, 0, 2, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 255, 0, 255, 127 - voice_square_1 60, 0, 103, 0, 0, 0, 15, 0 - voice_directsound_alt 60, 0, DirectSoundWaveData_87301B0, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 255, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_8734298, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 255, 242, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_87364A8, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_directsound 60, 0, DirectSoundWaveData_unknown_close_hihat, 255, 127, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_87385E4, 255, 249, 0, 165 - voice_square_1 60, 0, 0, 0, 4, 6, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 13, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 13, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_trinity_big_boned, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 252, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 0, 4, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 188, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 226, 0, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 26, 0, 255, 127 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 252, 0, 127 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 127, 0, 127 - voice_noise_alt 60, 0, 0, 1, 6, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 255, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_873ECD8, 255, 255, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_french_horn_72, 11, 242, 0, 127 - voice_square_1_alt 60, 0, 0, 2, 4, 6, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_8740818, 255, 255, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc55_tom, 255, 0, 255, 165 - voice_noise_alt 60, 0, 0, 5, 7, 15, 1 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 128, 242, 0, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_string_ensemble_72, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 0, 1, 5, 0, 0 - voice_noise_alt 60, 0, 0, 6, 6, 0, 1 - voice_noise_alt 60, 0, 0, 3, 6, 0, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 15, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_87424B0, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_87430C0, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_8743C50, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_87446EC, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_8745034, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_8745A7C, 255, 0, 255, 165 - + voice_directsound_no_resample 60, 0, DirectSoundWaveData_bicycle_bell, 255, 249, 0, 165 + voice_directsound_alt 60, 0, DirectSoundWaveData_bicycle_bell, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_synth_snare, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 242, 0, 127 + voice_noise_alt 60, 0, 0, 0, 1, 0, 1 + voice_noise_alt 60, 0, 1, 0, 1, 0, 1 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 255, 165 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 1 + voice_directsound 60, 0, DirectSoundWaveData_8725A2C, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_872762C, 255, 0, 255, 127 + voice_noise_alt 60, 0, 1, 0, 2, 0, 0 + voice_square_1 60, 0, 103, 3, 2, 7, 0, 0 + voice_square_2 60, 0, 3, 2, 7, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 226, 0, 127 + voice_directsound 60, 0, DirectSoundWaveData_872921C, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 204, 0, 127 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 1 + voice_directsound 60, 0, DirectSoundWaveData_872A5D0, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 + voice_square_1 60, 0, 103, 0, 0, 7, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_wind, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_bubbles, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 127 + voice_noise_alt 60, 0, 0, 0, 7, 15, 1 + voice_directsound 60, 0, DirectSoundWaveData_872EEA8, 255, 0, 255, 127 + voice_noise_alt 60, 0, 1, 0, 7, 15, 1 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 246, 0, 127 + voice_directsound 60, 0, DirectSoundWaveData_87301B0, 255, 0, 255, 127 + voice_square_1_alt 60, 0, 19, 2, 0, 2, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 255, 0, 255, 127 + voice_square_1 60, 0, 103, 0, 0, 0, 15, 0 + voice_directsound_alt 60, 0, DirectSoundWaveData_87301B0, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_8734298, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 255, 242, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_87364A8, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_directsound 60, 0, DirectSoundWaveData_unknown_close_hihat, 255, 127, 0, 188 + voice_directsound 60, 0, DirectSoundWaveData_87385E4, 255, 249, 0, 165 + voice_square_1 60, 0, 0, 0, 4, 6, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 13, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 13, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_trinity_big_boned, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 252, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 0, 4, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 188, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 226, 0, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 26, 0, 255, 127 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 252, 0, 127 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 127, 0, 127 + voice_noise_alt 60, 0, 0, 1, 6, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_873ECD8, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_french_horn_72, 11, 242, 0, 127 + voice_square_1_alt 60, 0, 0, 2, 4, 6, 0, 0 + voice_directsound 60, 0, DirectSoundWaveData_8740818, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc55_tom, 255, 0, 255, 165 + voice_noise_alt 60, 0, 0, 5, 7, 15, 1 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 128, 242, 0, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_string_ensemble_72, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 0, 1, 5, 0, 0 + voice_noise_alt 60, 0, 0, 6, 6, 0, 1 + voice_noise_alt 60, 0, 0, 3, 6, 0, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 15, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_87424B0, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_87430C0, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_8743C50, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_87446EC, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_8745034, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_8745A7C, 255, 0, 255, 165 + diff --git a/sound/voicegroups/voicegroup129.inc b/sound/voicegroups/voicegroup129.inc index 89ba4a59b7..ad94d1f704 100644 --- a/sound/voicegroups/voicegroup129.inc +++ b/sound/voicegroups/voicegroup129.inc @@ -1,131 +1,131 @@ .align 2 voicegroup129:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 226, 25, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_8725A2C, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 - voice_directsound 60, 0, DirectSoundWaveData_sd90_open_triangle, 255, 204, 128, 249 - voice_directsound 60, 0, DirectSoundWaveData_register_noise, 255, 0, 255, 76 - voice_directsound 60, 0, DirectSoundWaveData_88D6978, 255, 0, 206, 204 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 206, 38 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 206, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 252, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 204, 0, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 10, 4 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 10, 3 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 10, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 0, 15, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 6 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 29, 2, 0, 2, 0, 0 - voice_square_1_alt 60, 0, 22, 2, 0, 2, 0, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 9, 2 - voice_noise_alt 60, 0, 0, 0, 4, 3, 1 - voice_noise_alt 60, 0, 0, 0, 1, 12, 0 - voice_noise_alt 60, 0, 1, 0, 1, 9, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 226, 25, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_8725A2C, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 + voice_directsound 60, 0, DirectSoundWaveData_sd90_open_triangle, 255, 204, 128, 249 + voice_directsound 60, 0, DirectSoundWaveData_register_noise, 255, 0, 255, 76 + voice_directsound 60, 0, DirectSoundWaveData_88D6978, 255, 0, 206, 204 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 206, 38 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 206, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 252, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 204, 0, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 10, 4 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 10, 3 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 10, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 0, 15, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 6 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 29, 2, 0, 2, 0, 0 + voice_square_1_alt 60, 0, 22, 2, 0, 2, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 9, 2 + voice_noise_alt 60, 0, 0, 0, 4, 3, 1 + voice_noise_alt 60, 0, 0, 0, 1, 12, 0 + voice_noise_alt 60, 0, 1, 0, 1, 9, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 diff --git a/sound/voicegroups/voicegroup130.inc b/sound/voicegroups/voicegroup130.inc index 63e42a489f..6f06938aae 100644 --- a/sound/voicegroups/voicegroup130.inc +++ b/sound/voicegroups/voicegroup130.inc @@ -1,182 +1,182 @@ .align 2 voicegroup130:: - voice_directsound 60, 0, DirectSoundWaveData_88DBBC0, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DC220, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DC704, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DD054, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DDAC4, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DDDE4, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DEA6C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DF08C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DF414, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E01F8, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E0B68, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E0F04, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E16B8, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E2414, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E2658, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E3498, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E3DEC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E4140, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E4774, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E53E0, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E5978, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E647C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E6A80, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E6C78, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E75DC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E8568, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E8BA0, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E9674, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EA5B8, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EAB30, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EB97C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EC884, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88ED358, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EDEEC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EE8C4, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EEF04, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EF9E4, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F0020, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F0738, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F1074, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F1830, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F1D94, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F2B08, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F2F84, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F3470, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F3C38, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F4834, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F4BAC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F5368, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F5FCC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F6498, 255, 0, 255, 0 - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion_duplicate, 255, 249, 25, 248 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 7, 1 + voice_directsound 60, 0, DirectSoundWaveData_88DBBC0, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88DC220, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88DC704, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88DD054, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88DDAC4, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88DDDE4, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88DEA6C, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88DF08C, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88DF414, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E01F8, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E0B68, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E0F04, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E16B8, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E2414, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E2658, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E3498, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E3DEC, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E4140, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E4774, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E53E0, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E5978, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E647C, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E6A80, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E6C78, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E75DC, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E8568, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E8BA0, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88E9674, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88EA5B8, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88EAB30, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88EB97C, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88EC884, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88ED358, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88EDEEC, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88EE8C4, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88EEF04, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88EF9E4, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F0020, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F0738, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F1074, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F1830, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F1D94, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F2B08, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F2F84, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F3470, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F3C38, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F4834, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F4BAC, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F5368, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F5FCC, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_88F6498, 255, 0, 255, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion_duplicate, 255, 249, 25, 248 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 7, 1 diff --git a/sound/voicegroups/voicegroup131.inc b/sound/voicegroups/voicegroup131.inc index 3b0377b5e7..e0e8c6ceed 100644 --- a/sound/voicegroups/voicegroup131.inc +++ b/sound/voicegroups/voicegroup131.inc @@ -1,131 +1,131 @@ .align 2 voicegroup131:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 128, 204, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 204, 103, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 5 - voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 128, 204, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 204, 103, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 5 + voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 1 diff --git a/sound/voicegroups/voicegroup132.inc b/sound/voicegroups/voicegroup132.inc index 92e565468e..2e7dbc825a 100644 --- a/sound/voicegroups/voicegroup132.inc +++ b/sound/voicegroups/voicegroup132.inc @@ -1,131 +1,131 @@ .align 2 voicegroup132:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 97, 236 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 118, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 51, 204, 92, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 165, 154, 235 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 4, 2, 2 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 5 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 4, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 4, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 4, 2, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 2, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 8, 1 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 97, 236 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 118, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 51, 204, 92, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 165, 154, 235 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 4, 2, 2 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 5 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 4, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 4, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 4, 2, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 2, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 8, 1 diff --git a/sound/voicegroups/voicegroup133.inc b/sound/voicegroups/voicegroup133.inc index ff98e8ff2c..23bfa92495 100644 --- a/sound/voicegroups/voicegroup133.inc +++ b/sound/voicegroups/voicegroup133.inc @@ -1,131 +1,131 @@ .align 2 voicegroup133:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 108, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 204, 103, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 153 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 9, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 1, 0, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 8, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 108, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 204, 103, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 153 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 9, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 1, 0, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 8, 1 diff --git a/sound/voicegroups/voicegroup134.inc b/sound/voicegroups/voicegroup134.inc index 470a6613a3..2266c55dee 100644 --- a/sound/voicegroups/voicegroup134.inc +++ b/sound/voicegroups/voicegroup134.inc @@ -1,93 +1,93 @@ .align 2 voicegroup134:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 1 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 1 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 1 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup135.inc b/sound/voicegroups/voicegroup135.inc index 48ed76c036..2ea22bf969 100644 --- a/sound/voicegroups/voicegroup135.inc +++ b/sound/voicegroups/voicegroup135.inc @@ -1,86 +1,86 @@ .align 2 voicegroup135:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 85, 137, 180, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 9, 0 - voice_square_2_alt 60, 0, 2, 0, 0, 9, 0 - voice_square_1_alt 60, 0, 0, 0, 1, 2, 6, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 85, 137, 180, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 9, 0 + voice_square_2_alt 60, 0, 2, 0, 0, 9, 0 + voice_square_1_alt 60, 0, 0, 0, 1, 2, 6, 0 diff --git a/sound/voicegroups/voicegroup136.inc b/sound/voicegroups/voicegroup136.inc index 3b053ce2d9..672c9435c3 100644 --- a/sound/voicegroups/voicegroup136.inc +++ b/sound/voicegroups/voicegroup136.inc @@ -1,131 +1,131 @@ .align 2 voicegroup136:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 0, 0, 5, 0, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 5, 0, 0 - voice_square_1_alt 60, 0, 0, 2, 2, 4, 10, 0 - voice_square_2_alt 60, 0, 0, 0, 5, 0, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 5, 0, 0 - voice_square_2_alt 60, 0, 3, 2, 4, 10, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 1, 5, 0, 3 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 1, 5, 0, 3 - voice_square_2_alt 60, 0, 1, 0, 1, 10, 2 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 10, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 0, 0, 5, 0, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 5, 0, 0 + voice_square_1_alt 60, 0, 0, 2, 2, 4, 10, 0 + voice_square_2_alt 60, 0, 0, 0, 5, 0, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 5, 0, 0 + voice_square_2_alt 60, 0, 3, 2, 4, 10, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 1, 5, 0, 3 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 1, 5, 0, 3 + voice_square_2_alt 60, 0, 1, 0, 1, 10, 2 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 10, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup137.inc b/sound/voicegroups/voicegroup137.inc index 8eb7910397..494b82d375 100644 --- a/sound/voicegroups/voicegroup137.inc +++ b/sound/voicegroups/voicegroup137.inc @@ -1,131 +1,131 @@ .align 2 voicegroup137:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 165, 180, 165 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 137, 154, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 204, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 153 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 1, 2, 3, 1 - voice_square_2_alt 60, 0, 1, 1, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 2, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 1 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 165, 180, 165 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 137, 154, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 204, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 0, 242 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 153 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 1, 2, 3, 1 + voice_square_2_alt 60, 0, 1, 1, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 2, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 1 diff --git a/sound/voicegroups/voicegroup138.inc b/sound/voicegroups/voicegroup138.inc index 0439e92f5f..599dd92fff 100644 --- a/sound/voicegroups/voicegroup138.inc +++ b/sound/voicegroups/voicegroup138.inc @@ -1,131 +1,131 @@ .align 2 voicegroup138:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 - voice_square_2_alt 60, 0, 3, 0, 1, 6, 3 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 + voice_square_2_alt 60, 0, 3, 0, 1, 6, 3 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup139.inc b/sound/voicegroups/voicegroup139.inc index 5d22231360..32250fd92e 100644 --- a/sound/voicegroups/voicegroup139.inc +++ b/sound/voicegroups/voicegroup139.inc @@ -1,131 +1,131 @@ .align 2 voicegroup139:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 127, 103, 201 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 37, 127, 77, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 51, 204, 92, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 - voice_square_2_alt 60, 0, 3, 0, 2, 7, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 127, 103, 201 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 37, 127, 77, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 51, 204, 92, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 + voice_square_2_alt 60, 0, 3, 0, 2, 7, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup140.inc b/sound/voicegroups/voicegroup140.inc index 7dfc37f745..a12a9f30a8 100644 --- a/sound/voicegroups/voicegroup140.inc +++ b/sound/voicegroups/voicegroup140.inc @@ -1,7 +1,7 @@ .align 2 voicegroup140:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 2, 3, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 2, 3, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup141.inc b/sound/voicegroups/voicegroup141.inc index 7a866f991e..6373309ed5 100644 --- a/sound/voicegroups/voicegroup141.inc +++ b/sound/voicegroups/voicegroup141.inc @@ -1,131 +1,131 @@ .align 2 voicegroup141:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 - voice_square_2_alt 60, 0, 3, 0, 2, 7, 3 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 5 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 1, 7, 0, 6 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 2, 9, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 + voice_square_2_alt 60, 0, 3, 0, 2, 7, 3 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 5 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 1, 7, 0, 6 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 2, 9, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup142.inc b/sound/voicegroups/voicegroup142.inc index aa7e8b2043..3764a327f3 100644 --- a/sound/voicegroups/voicegroup142.inc +++ b/sound/voicegroups/voicegroup142.inc @@ -1,87 +1,87 @@ .align 2 voicegroup142:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 64, 188, 128, 201 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 195, 103, 220 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 195, 72, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 85, 188, 103, 160 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 128, 188, 77, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 175, 154, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 4 - voice_square_2_alt 60, 0, 2, 0, 2, 5, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 7, 15, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 64, 188, 128, 201 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 195, 103, 220 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 195, 72, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 85, 188, 103, 160 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 128, 188, 77, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 175, 154, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 4 + voice_square_2_alt 60, 0, 2, 0, 2, 5, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup143.inc b/sound/voicegroups/voicegroup143.inc index d668337f87..346c644d80 100644 --- a/sound/voicegroups/voicegroup143.inc +++ b/sound/voicegroups/voicegroup143.inc @@ -1,131 +1,131 @@ .align 2 voicegroup143:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 160, 123, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 3, 2 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 9, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 160, 123, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 3, 2 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 9, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup144.inc b/sound/voicegroups/voicegroup144.inc index 43ed4dbab2..60bd142ade 100644 --- a/sound/voicegroups/voicegroup144.inc +++ b/sound/voicegroups/voicegroup144.inc @@ -1,131 +1,131 @@ .align 2 voicegroup144:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 85, 188, 92, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 85, 127, 180, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 51, 204, 92, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 4, 2 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 9, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 85, 188, 92, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 85, 127, 180, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 51, 204, 92, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 4, 2 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 9, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup145.inc b/sound/voicegroups/voicegroup145.inc index a14803a12c..374987162b 100644 --- a/sound/voicegroups/voicegroup145.inc +++ b/sound/voicegroups/voicegroup145.inc @@ -1,131 +1,131 @@ .align 2 voicegroup145:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 - voice_square_2_alt 60, 0, 3, 0, 0, 9, 0 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 + voice_square_2_alt 60, 0, 3, 0, 0, 9, 0 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup146.inc b/sound/voicegroups/voicegroup146.inc index d78b991e33..fcbfedcfed 100644 --- a/sound/voicegroups/voicegroup146.inc +++ b/sound/voicegroups/voicegroup146.inc @@ -1,131 +1,131 @@ .align 2 voicegroup146:: - voice_keysplit_all voicegroup002 - voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 255, 165, 103, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 249, 25, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 43, 76, 103, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 4, 4 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 9, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 2 + voice_keysplit_all voicegroup002 + voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 255, 165, 103, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 249, 25, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 43, 76, 103, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 4, 4 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 9, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 2 diff --git a/sound/voicegroups/voicegroup147.inc b/sound/voicegroups/voicegroup147.inc index 35fb9dc5b3..de4c5a02ff 100644 --- a/sound/voicegroups/voicegroup147.inc +++ b/sound/voicegroups/voicegroup147.inc @@ -1,87 +1,87 @@ .align 2 voicegroup147:: - voice_keysplit_all voicegroup001 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 249, 25, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 6, 1 - voice_square_2_alt 60, 0, 2, 0, 0, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 4, 2 + voice_keysplit_all voicegroup001 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 249, 25, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 6, 1 + voice_square_2_alt 60, 0, 2, 0, 0, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 4, 2 diff --git a/sound/voicegroups/voicegroup148.inc b/sound/voicegroups/voicegroup148.inc index 1ada1b89c6..ba25340f0d 100644 --- a/sound/voicegroups/voicegroup148.inc +++ b/sound/voicegroups/voicegroup148.inc @@ -1,131 +1,131 @@ .align 2 voicegroup148:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 226, 0, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 12, 0 - voice_square_2_alt 60, 0, 2, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 3, 5, 2 - voice_noise_alt 60, 0, 0, 0, 1, 6, 5 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 226, 0, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 12, 0 + voice_square_2_alt 60, 0, 2, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 3, 5, 2 + voice_noise_alt 60, 0, 0, 0, 1, 6, 5 diff --git a/sound/voicegroups/voicegroup149.inc b/sound/voicegroups/voicegroup149.inc index 78c29fb840..50c47bc356 100644 --- a/sound/voicegroups/voicegroup149.inc +++ b/sound/voicegroups/voicegroup149.inc @@ -1,96 +1,96 @@ .align 2 voicegroup149:: - voice_keysplit_all voicegroup190 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 165, 154, 153 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_oboe, 43, 188, 103, 165 - voice_directsound 60, 0, DirectSoundWaveData_unused_sd90_oboe, 43, 165, 103, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 1, 2, 3, 1 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 2 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 6, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_keysplit_all voicegroup190 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 165, 154, 153 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_oboe, 43, 188, 103, 165 + voice_directsound 60, 0, DirectSoundWaveData_unused_sd90_oboe, 43, 165, 103, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 1, 2, 3, 1 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 2 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 6, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup150.inc b/sound/voicegroups/voicegroup150.inc index 233981ebdf..97de70ac64 100644 --- a/sound/voicegroups/voicegroup150.inc +++ b/sound/voicegroups/voicegroup150.inc @@ -1,131 +1,131 @@ .align 2 voicegroup150:: - voice_keysplit_all voicegroup002 - voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 255, 165, 103, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 85, 204, 77, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 1, 4, 6 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup002 + voice_directsound 60, 0, DirectSoundWaveData_steinway_b_piano, 255, 165, 103, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 85, 204, 77, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 1, 4, 6 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup151.inc b/sound/voicegroups/voicegroup151.inc index 3688a2541d..c7e150baf2 100644 --- a/sound/voicegroups/voicegroup151.inc +++ b/sound/voicegroups/voicegroup151.inc @@ -1,91 +1,91 @@ .align 2 voicegroup151:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 127 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 1, 2, 3, 1 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 127 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 1, 2, 3, 1 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup152.inc b/sound/voicegroups/voicegroup152.inc index bf07b260ca..19340b82c3 100644 --- a/sound/voicegroups/voicegroup152.inc +++ b/sound/voicegroups/voicegroup152.inc @@ -1,131 +1,131 @@ .align 2 voicegroup152:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 97, 236 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 160, 175, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 127, 154, 235 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 4, 2, 1 - voice_square_2_alt 60, 0, 3, 0, 1, 5, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 4, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 4, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 2, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 97, 236 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 160, 175, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 127, 154, 235 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 4, 2, 1 + voice_square_2_alt 60, 0, 3, 0, 1, 5, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 4, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 4, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 2, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup153.inc b/sound/voicegroups/voicegroup153.inc index 90840698e4..4284b89913 100644 --- a/sound/voicegroups/voicegroup153.inc +++ b/sound/voicegroups/voicegroup153.inc @@ -1,131 +1,131 @@ .align 2 voicegroup153:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 97, 236 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 127, 154, 235 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 3, 5, 2 - voice_square_2_alt 60, 0, 3, 0, 3, 4, 2 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48A0, 0, 1, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 2 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 97, 236 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 127, 154, 235 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 3, 5, 2 + voice_square_2_alt 60, 0, 3, 0, 3, 4, 2 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48A0, 0, 1, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 2 diff --git a/sound/voicegroups/voicegroup154.inc b/sound/voicegroups/voicegroup154.inc index 14cfd2dd9d..e38e7a4483 100644 --- a/sound/voicegroups/voicegroup154.inc +++ b/sound/voicegroups/voicegroup154.inc @@ -1,96 +1,96 @@ .align 2 voicegroup154:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 97, 236 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 127, 154, 235 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 0, 10, 0 - voice_square_2_alt 60, 0, 1, 0, 0, 10, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 0, 12, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 97, 236 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 127, 154, 235 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 0, 10, 0 + voice_square_2_alt 60, 0, 1, 0, 0, 10, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 0, 12, 0 diff --git a/sound/voicegroups/voicegroup155.inc b/sound/voicegroups/voicegroup155.inc index 7fcfdcfe66..87cd504986 100644 --- a/sound/voicegroups/voicegroup155.inc +++ b/sound/voicegroups/voicegroup155.inc @@ -1,131 +1,131 @@ .align 2 voicegroup155:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 188, 103, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 165, 154, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 165, 180, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 - voice_square_2_alt 60, 0, 3, 0, 3, 6, 2 - voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 3, 6, 5 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 1, 9, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 2 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 188, 103, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 165, 154, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 165, 180, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 + voice_square_2_alt 60, 0, 3, 0, 3, 6, 2 + voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 3, 6, 5 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 1, 9, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 2 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup156.inc b/sound/voicegroups/voicegroup156.inc index 0d8ec69d9f..76291c1e6a 100644 --- a/sound/voicegroups/voicegroup156.inc +++ b/sound/voicegroups/voicegroup156.inc @@ -1,131 +1,131 @@ .align 2 voicegroup156:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 4, 4, 4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88pro_unison_slap, 255, 165, 180, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 1, 7, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 7, 5 - voice_square_1_alt 60, 0, 0, 3, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 4, 4, 4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88pro_unison_slap, 255, 165, 180, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 1, 7, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 7, 5 + voice_square_1_alt 60, 0, 0, 3, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup157.inc b/sound/voicegroups/voicegroup157.inc index 102702545e..66cd6ff1cd 100644 --- a/sound/voicegroups/voicegroup157.inc +++ b/sound/voicegroups/voicegroup157.inc @@ -1,131 +1,131 @@ .align 2 voicegroup157:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 190, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_unused_sc88pro_unison_slap, 255, 165, 180, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 - voice_square_2_alt 60, 0, 3, 0, 3, 3, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 3, 6, 5 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 7, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 190, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 128, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_unused_sc88pro_unison_slap, 255, 165, 180, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 + voice_square_2_alt 60, 0, 3, 0, 3, 3, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 3, 6, 5 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 7, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup158.inc b/sound/voicegroups/voicegroup158.inc index 798a6f4d10..6a8ca184b4 100644 --- a/sound/voicegroups/voicegroup158.inc +++ b/sound/voicegroups/voicegroup158.inc @@ -1,131 +1,131 @@ .align 2 voicegroup158:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 108, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 204, 103, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 153 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 236, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 9, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 10, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 1, 0, 9, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 8, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 108, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 204, 103, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 153 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 236, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 9, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 10, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 1, 0, 9, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 8, 1 diff --git a/sound/voicegroups/voicegroup159.inc b/sound/voicegroups/voicegroup159.inc index ce05bc70e2..7ee1e3a56e 100644 --- a/sound/voicegroups/voicegroup159.inc +++ b/sound/voicegroups/voicegroup159.inc @@ -1,131 +1,131 @@ .align 2 voicegroup159:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 64, 249, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 51, 249, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 7, 0, 6 - voice_square_2_alt 60, 0, 1, 1, 5, 1, 6 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 1, 7, 0, 6 - voice_square_1_alt 60, 0, 0, 0, 1, 4, 3, 6 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 64, 249, 0, 188 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 51, 249, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 7, 0, 6 + voice_square_2_alt 60, 0, 1, 1, 5, 1, 6 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 1, 7, 0, 6 + voice_square_1_alt 60, 0, 0, 0, 1, 4, 3, 6 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup160.inc b/sound/voicegroups/voicegroup160.inc index 9198c7f127..faff810958 100644 --- a/sound/voicegroups/voicegroup160.inc +++ b/sound/voicegroups/voicegroup160.inc @@ -1,91 +1,91 @@ .align 2 voicegroup160:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 1 - voice_square_2_alt 60, 0, 1, 0, 2, 4, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 1 + voice_square_2_alt 60, 0, 1, 0, 2, 4, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup161.inc b/sound/voicegroups/voicegroup161.inc index 8165b38e8d..71374e1a06 100644 --- a/sound/voicegroups/voicegroup161.inc +++ b/sound/voicegroups/voicegroup161.inc @@ -1,131 +1,131 @@ .align 2 voicegroup161:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 4 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 2, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 4 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 2, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup162.inc b/sound/voicegroups/voicegroup162.inc index cf6d4294c6..53edb3b0e8 100644 --- a/sound/voicegroups/voicegroup162.inc +++ b/sound/voicegroups/voicegroup162.inc @@ -1,96 +1,96 @@ .align 2 voicegroup162:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 64, 188, 108, 244 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 64, 195, 92, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 64, 204, 113, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 0, 6, 0 - voice_square_2_alt 60, 0, 1, 0, 0, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 64, 188, 108, 244 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 64, 195, 92, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 64, 204, 113, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 0, 6, 0 + voice_square_2_alt 60, 0, 1, 0, 0, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup163.inc b/sound/voicegroups/voicegroup163.inc index 6c6fc38033..86ff86ef94 100644 --- a/sound/voicegroups/voicegroup163.inc +++ b/sound/voicegroups/voicegroup163.inc @@ -1,131 +1,131 @@ .align 2 voicegroup163:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_88D6978, 255, 0, 206, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 5, 2 - voice_square_2_alt 60, 0, 3, 0, 3, 4, 2 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_88D6978, 255, 0, 206, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 5, 2 + voice_square_2_alt 60, 0, 3, 0, 3, 4, 2 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup164.inc b/sound/voicegroups/voicegroup164.inc index b7f742114b..fe48fbfb99 100644 --- a/sound/voicegroups/voicegroup164.inc +++ b/sound/voicegroups/voicegroup164.inc @@ -1,131 +1,131 @@ .align 2 voicegroup164:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 128, 180, 108, 209 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 85, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 10, 6 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 2 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 4 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 128, 180, 108, 209 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 85, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 10, 6 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 2 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 4 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup165.inc b/sound/voicegroups/voicegroup165.inc index 4e48069568..e633e5671a 100644 --- a/sound/voicegroups/voicegroup165.inc +++ b/sound/voicegroups/voicegroup165.inc @@ -1,131 +1,131 @@ .align 2 voicegroup165:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 37, 165, 103, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 204, 92, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 10, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 6 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_enhanced_delay_shaku, 255, 191, 97, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 1, 9, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 37, 165, 103, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 204, 92, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 10, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 6 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_enhanced_delay_shaku, 255, 191, 97, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 1, 9, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup166.inc b/sound/voicegroups/voicegroup166.inc index 7c23ebb014..e4ac4a28e7 100644 --- a/sound/voicegroups/voicegroup166.inc +++ b/sound/voicegroups/voicegroup166.inc @@ -1,131 +1,131 @@ .align 2 voicegroup166:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 108, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 204, 103, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 153 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 236, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 9, 0 - voice_square_2_alt 60, 0, 3, 0, 2, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 1, 0, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 8, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 128, 146, 108, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 204, 103, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 153 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 236, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 9, 0 + voice_square_2_alt 60, 0, 3, 0, 2, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 1, 0, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 8, 1 diff --git a/sound/voicegroups/voicegroup167.inc b/sound/voicegroups/voicegroup167.inc index d4cf5a9f4d..307379eb91 100644 --- a/sound/voicegroups/voicegroup167.inc +++ b/sound/voicegroups/voicegroup167.inc @@ -1,131 +1,131 @@ .align 2 voicegroup167:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 10, 4 - voice_square_2_alt 60, 0, 3, 0, 2, 8, 3 - voice_square_2_alt 60, 0, 2, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 0, 6, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 10, 4 + voice_square_2_alt 60, 0, 3, 0, 2, 8, 3 + voice_square_2_alt 60, 0, 2, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 0, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup168.inc b/sound/voicegroups/voicegroup168.inc index 2bb2c3b214..05dbf3954a 100644 --- a/sound/voicegroups/voicegroup168.inc +++ b/sound/voicegroups/voicegroup168.inc @@ -1,131 +1,131 @@ .align 2 voicegroup168:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 2 - voice_square_2_alt 60, 0, 3, 0, 2, 6, 4 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 2 + voice_square_2_alt 60, 0, 3, 0, 2, 6, 4 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup169.inc b/sound/voicegroups/voicegroup169.inc index bac059cff4..220425ff01 100644 --- a/sound/voicegroups/voicegroup169.inc +++ b/sound/voicegroups/voicegroup169.inc @@ -1,131 +1,131 @@ .align 2 voicegroup169:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 4, 0 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 210 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 + voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 + voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 4, 0 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup170.inc b/sound/voicegroups/voicegroup170.inc index 01a3388743..68c29a6c9d 100644 --- a/sound/voicegroups/voicegroup170.inc +++ b/sound/voicegroups/voicegroup170.inc @@ -1,87 +1,87 @@ .align 2 voicegroup170:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 - voice_square_2_alt 60, 0, 2, 0, 1, 0, 0 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 + voice_square_2_alt 60, 0, 2, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup171.inc b/sound/voicegroups/voicegroup171.inc index 2fc106983d..76eee5f8a3 100644 --- a/sound/voicegroups/voicegroup171.inc +++ b/sound/voicegroups/voicegroup171.inc @@ -1,94 +1,94 @@ .align 2 voicegroup171:: - voice_keysplit_all voicegroup001 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 - voice_square_2_alt 60, 0, 2, 0, 2, 0, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_keysplit_all voicegroup001 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 + voice_square_2_alt 60, 0, 2, 0, 2, 0, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 diff --git a/sound/voicegroups/voicegroup172.inc b/sound/voicegroups/voicegroup172.inc index af9c09334f..3e04a358c4 100644 --- a/sound/voicegroups/voicegroup172.inc +++ b/sound/voicegroups/voicegroup172.inc @@ -1,131 +1,131 @@ .align 2 voicegroup172:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 5, 2 - voice_square_2_alt 60, 0, 3, 0, 2, 6, 3 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 255, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 5, 2 + voice_square_2_alt 60, 0, 3, 0, 2, 6, 3 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 0 diff --git a/sound/voicegroups/voicegroup173.inc b/sound/voicegroups/voicegroup173.inc index 98a024ad29..ee4a2c8662 100644 --- a/sound/voicegroups/voicegroup173.inc +++ b/sound/voicegroups/voicegroup173.inc @@ -1,131 +1,131 @@ .align 2 voicegroup173:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 51, 0, 203, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 216, 51, 224 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 4 - voice_square_2_alt 60, 0, 3, 0, 3, 3, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 3, 2 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 51, 0, 203, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 216, 51, 224 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 4 + voice_square_2_alt 60, 0, 3, 0, 3, 3, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 3, 2 diff --git a/sound/voicegroups/voicegroup174.inc b/sound/voicegroups/voicegroup174.inc index 0a65666114..82be8ccf9b 100644 --- a/sound/voicegroups/voicegroup174.inc +++ b/sound/voicegroups/voicegroup174.inc @@ -1,160 +1,160 @@ .align 2 voicegroup174:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 0, 255, 214 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 128, 0, 255, 206 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 209 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 2, 3, 4 - voice_square_2_alt 60, 0, 3, 0, 2, 3, 4 - voice_square_1_alt 60, 0, 0, 3, 0, 2, 3, 4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 3, 1 - voice_keysplit_all voicegroup177 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 9, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 9, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 154, 127 - voice_keysplit_all voicegroup002 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 0, 255, 214 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 128, 0, 255, 206 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 209 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 2, 3, 4 + voice_square_2_alt 60, 0, 3, 0, 2, 3, 4 + voice_square_1_alt 60, 0, 0, 3, 0, 2, 3, 4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 3, 1 + voice_keysplit_all voicegroup177 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 9, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 9, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 154, 127 + voice_keysplit_all voicegroup002 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup175.inc b/sound/voicegroups/voicegroup175.inc index 6ba9fec3b4..a074f216dd 100644 --- a/sound/voicegroups/voicegroup175.inc +++ b/sound/voicegroups/voicegroup175.inc @@ -1,55 +1,55 @@ .align 2 voicegroup175:: - voice_keysplit_all voicegroup177 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 165, 154, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit_all voicegroup177 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 165, 154, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup176.inc b/sound/voicegroups/voicegroup176.inc index 8b4c687b5b..9743d50e20 100644 --- a/sound/voicegroups/voicegroup176.inc +++ b/sound/voicegroups/voicegroup176.inc @@ -1,51 +1,51 @@ .align 2 voicegroup176:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 7, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 9, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 7, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 9, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup177.inc b/sound/voicegroups/voicegroup177.inc index 12d57b389b..bd0e738fd4 100644 --- a/sound/voicegroups/voicegroup177.inc +++ b/sound/voicegroups/voicegroup177.inc @@ -1,93 +1,93 @@ .align 2 voicegroup177:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 - voice_directsound_no_resample 67, 71, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 - voice_directsound_no_resample 65, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 68, 29, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_directsound 72, 64, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 76, 39, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound 80, 89, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 - voice_directsound_no_resample 33, 10, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound 84, 104, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 - voice_directsound_no_resample 64, 118, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 - voice_directsound 50, 64, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 - voice_directsound 64, 64, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 + voice_directsound_no_resample 67, 71, DirectSoundWaveData_sd90_solo_snare, 255, 180, 175, 228 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_solo_snare, 255, 0, 255, 242 + voice_directsound_no_resample 65, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_directsound 64, 24, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 68, 29, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_directsound 72, 64, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 76, 39, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound 80, 89, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 226 + voice_directsound_no_resample 33, 10, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound 84, 104, DirectSoundWaveData_sd90_ambient_tom, 255, 0, 255, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 + voice_directsound_no_resample 64, 118, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 + voice_directsound 50, 64, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 + voice_directsound 64, 64, DirectSoundWaveData_ethnic_flavours_kotsuzumi, 255, 0, 255, 0 diff --git a/sound/voicegroups/voicegroup178.inc b/sound/voicegroups/voicegroup178.inc index 0062455af8..1dc6971d75 100644 --- a/sound/voicegroups/voicegroup178.inc +++ b/sound/voicegroups/voicegroup178.inc @@ -1,91 +1,91 @@ .align 2 voicegroup178:: - voice_keysplit_all voicegroup177 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 204, 103, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 154, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 7, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 7, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 0, 15, 1 + voice_keysplit_all voicegroup177 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 204, 103, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 165, 154, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 7, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 7, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 0, 15, 1 diff --git a/sound/voicegroups/voicegroup179.inc b/sound/voicegroups/voicegroup179.inc index f777dcb3a4..b7df91e68c 100644 --- a/sound/voicegroups/voicegroup179.inc +++ b/sound/voicegroups/voicegroup179.inc @@ -1,91 +1,91 @@ .align 2 voicegroup179:: - voice_keysplit_all voicegroup177 - voice_keysplit_all voicegroup176 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 165, 154, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 3, 0, 0, 10, 0 - voice_square_2_alt 60, 0, 0, 0, 1, 9, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 1, 9, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_keysplit_all voicegroup177 + voice_keysplit_all voicegroup176 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 85, 165, 154, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 3, 0, 0, 10, 0 + voice_square_2_alt 60, 0, 0, 0, 1, 9, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 1, 9, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup180.inc b/sound/voicegroups/voicegroup180.inc index 1754c35de4..82e98196d3 100644 --- a/sound/voicegroups/voicegroup180.inc +++ b/sound/voicegroups/voicegroup180.inc @@ -1,131 +1,131 @@ .align 2 voicegroup180:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 64, 249, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_noise_alt 60, 0, 0, 0, 1, 0, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 64, 249, 0, 188 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 + voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup181.inc b/sound/voicegroups/voicegroup181.inc index 0b7e24583c..92df8710a8 100644 --- a/sound/voicegroups/voicegroup181.inc +++ b/sound/voicegroups/voicegroup181.inc @@ -1,50 +1,50 @@ .align 2 voicegroup181:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 242, 51, 242 diff --git a/sound/voicegroups/voicegroup182.inc b/sound/voicegroups/voicegroup182.inc index a773b680a5..1fb444fec6 100644 --- a/sound/voicegroups/voicegroup182.inc +++ b/sound/voicegroups/voicegroup182.inc @@ -1,91 +1,91 @@ .align 2 voicegroup182:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 76 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup008, KeySplitTable4 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 1, 2, 3, 1 - voice_square_2_alt 60, 0, 1, 0, 2, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 193, 76 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup008, KeySplitTable4 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 1, 2, 3, 1 + voice_square_2_alt 60, 0, 1, 0, 2, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup183.inc b/sound/voicegroups/voicegroup183.inc index f930e480a1..92b953fc4c 100644 --- a/sound/voicegroups/voicegroup183.inc +++ b/sound/voicegroups/voicegroup183.inc @@ -1,131 +1,131 @@ .align 2 voicegroup183:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 - voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 3, 1 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 + voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 3, 1 diff --git a/sound/voicegroups/voicegroup184.inc b/sound/voicegroups/voicegroup184.inc index d12cb031d1..e0d1c958d7 100644 --- a/sound/voicegroups/voicegroup184.inc +++ b/sound/voicegroups/voicegroup184.inc @@ -1,89 +1,89 @@ .align 2 voicegroup184:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 255, 0, 255, 0 diff --git a/sound/voicegroups/voicegroup185.inc b/sound/voicegroups/voicegroup185.inc index 7b76f7ac7b..8417a2407b 100644 --- a/sound/voicegroups/voicegroup185.inc +++ b/sound/voicegroups/voicegroup185.inc @@ -1,131 +1,131 @@ .align 2 voicegroup185:: - voice_keysplit_all voicegroup002 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 0, 255, 214 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 128, 0, 255, 206 - voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 85, 0, 154, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 209 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_keysplit_all voicegroup002 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_overdrive_guitar, 128, 0, 255, 214 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_high, 128, 0, 255, 206 + voice_directsound 60, 0, DirectSoundWaveData_sd90_special_scream_drive, 255, 0, 255, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fingered_bass, 255, 253, 0, 149 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 216, 0, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 246, 0, 226 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_classical_choir_voice_ahhs, 85, 0, 154, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_distortion_guitar_low, 255, 0, 255, 209 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_whistle, 255, 0, 255, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup186.inc b/sound/voicegroups/voicegroup186.inc index 64f1460c75..18dc71d70d 100644 --- a/sound/voicegroups/voicegroup186.inc +++ b/sound/voicegroups/voicegroup186.inc @@ -1,131 +1,131 @@ .align 2 voicegroup186:: - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_2_alt 60, 0, 3, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_2_alt 60, 0, 3, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 diff --git a/sound/voicegroups/voicegroup187.inc b/sound/voicegroups/voicegroup187.inc index c4b1af710a..46c5c1f9da 100644 --- a/sound/voicegroups/voicegroup187.inc +++ b/sound/voicegroups/voicegroup187.inc @@ -1,131 +1,131 @@ .align 2 voicegroup187:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup007, KeySplitTable3 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup009, KeySplitTable5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 - voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 - voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 6, 0 - voice_noise_alt 60, 0, 0, 0, 1, 6, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 255, 76, 133, 137 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 64, 188, 108, 165 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 255, 249, 25, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_harp, 255, 246, 0, 235 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup007, KeySplitTable3 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup009, KeySplitTable5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 + voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 + voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 6, 0 + voice_noise_alt 60, 0, 0, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup188.inc b/sound/voicegroups/voicegroup188.inc index 0f071fca51..c6afe243b3 100644 --- a/sound/voicegroups/voicegroup188.inc +++ b/sound/voicegroups/voicegroup188.inc @@ -1,131 +1,131 @@ .align 2 voicegroup188:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 51, 0, 203, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 216, 51, 224 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 6, 1 - voice_square_2_alt 60, 0, 3, 0, 3, 3, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 7, 0 - voice_noise_alt 60, 0, 0, 0, 1, 9, 1 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 51, 0, 203, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 216, 51, 224 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 6, 1 + voice_square_2_alt 60, 0, 3, 0, 3, 3, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 7, 0 + voice_noise_alt 60, 0, 0, 0, 1, 9, 1 diff --git a/sound/voicegroups/voicegroup189.inc b/sound/voicegroups/voicegroup189.inc index 462948118d..6c04cd8320 100644 --- a/sound/voicegroups/voicegroup189.inc +++ b/sound/voicegroups/voicegroup189.inc @@ -1,95 +1,95 @@ .align 2 voicegroup189:: - voice_keysplit_all voicegroup002 - voice_keysplit voicegroup005, KeySplitTable1 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 - voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 51, 0, 203, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 216, 51, 224 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_keysplit voicegroup006, KeySplitTable2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 3 - voice_square_2_alt 60, 0, 3, 0, 2, 7, 2 - voice_square_1_alt 60, 0, 0, 1, 0, 2, 6, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit_all voicegroup002 + voice_keysplit voicegroup005, KeySplitTable1 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 188, 128, 226 + voice_directsound 60, 65, DirectSoundWaveData_sd90_classical_detuned_ep1_high, 128, 204, 77, 246 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_organ2, 51, 0, 203, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 128, 249, 25, 127 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_nylon_str_guitar, 64, 216, 51, 224 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 188 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_keysplit voicegroup006, KeySplitTable2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 3 + voice_square_2_alt 60, 0, 3, 0, 2, 7, 2 + voice_square_1_alt 60, 0, 0, 1, 0, 2, 6, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup190.inc b/sound/voicegroups/voicegroup190.inc index f8dacda624..6faa27c620 100644 --- a/sound/voicegroups/voicegroup190.inc +++ b/sound/voicegroups/voicegroup190.inc @@ -1,90 +1,90 @@ .align 2 voicegroup190:: - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 2 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_noise_alt 60, 0, 0, 0, 2, 7, 0 - voice_noise_alt 60, 0, 0, 0, 1, 9, 1 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 52, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 33, 104, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 - voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 - voice_directsound_no_resample 64, 89, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 - voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 - voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 - voice_directsound_no_resample 64, 94, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound_no_resample 64, 79, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 - voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 - voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound_no_resample 64, 104, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 - voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 2 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_noise_alt 60, 0, 0, 0, 2, 7, 0 + voice_noise_alt 60, 0, 0, 0, 1, 9, 1 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_drum_and_percussion_kick, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 52, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 242 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 33, 104, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_tambourine, 255, 127, 77, 204 + voice_directsound_no_resample 64, 14, DirectSoundWaveData_trinity_cymbal_crash, 255, 231, 0, 188 + voice_directsound_no_resample 64, 89, DirectSoundWaveData_sd90_cowbell, 255, 0, 255, 242 + voice_directsound_no_resample 64, 24, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 255, 235, 0, 231 + voice_directsound_no_resample 64, 54, DirectSoundWaveData_sc88pro_orchestra_cymbal_crash, 8, 0, 255, 216 + voice_directsound_no_resample 64, 94, DirectSoundWaveData_unused_heart_of_asia_indian_drum, 255, 0, 255, 0 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_mute_high_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 34, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_directsound_no_resample 64, 90, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound_no_resample 64, 79, DirectSoundWaveData_sd90_open_triangle, 255, 242, 103, 188 + voice_directsound_no_resample 64, 39, DirectSoundWaveData_sd90_open_triangle, 255, 165, 103, 188 + voice_directsound_no_resample 64, 64, DirectSoundWaveData_sc88pro_jingle_bell, 255, 0, 255, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 + voice_directsound_no_resample 64, 104, DirectSoundWaveData_ethnic_flavours_atarigane, 255, 0, 255, 0 + voice_directsound 63, 64, DirectSoundWaveData_sc88pro_taiko, 255, 0, 255, 0 diff --git a/src/apprentice.c b/src/apprentice.c index 00157dc1ac..f881c3bef6 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -48,7 +48,7 @@ * - Asking which move a mon should use, which they will ask at most 5 times * - Asking what held item to give to a mon, which they will ask at most 3 times (once for each mon) * - Asking what they should say when they win a battle, which will always be their final question before departing - * + * * ## After departing * After telling them what they should say when they win a battle they will leave the lobby for a final time * They will then be replaced by a new random Apprentice (they can repeat) @@ -274,7 +274,7 @@ static void SetRandomQuestionData(void) for (i = 0; i < ARRAY_COUNT(questionOrder); i++) questionOrder[i] = sQuestionPossibilities[i]; - + // Shuffle the questions an arbitrary 50 times for (i = 0; i < 50; i++) { @@ -788,7 +788,7 @@ static void GetNumApprenticePartyMonsAssigned(void) static void IsFinalQuestion(void) { s32 questionNum = CURRENT_QUESTION_NUM; - + if (questionNum < 0) { // Not finished asking initial questions @@ -941,7 +941,7 @@ static void ApprenticeGetQuestion(void) gSpecialVar_Result = APPRENTICE_QUESTION_WHICH_FIRST; break; default: - //case QUESTION_ID_WIN_SPEECH: + //case QUESTION_ID_WIN_SPEECH: gSpecialVar_Result = APPRENTICE_QUESTION_WIN_SPEECH; break; } @@ -1107,7 +1107,7 @@ static void TrySetApprenticeHeldItem(void) if (PLAYER_APPRENTICE.questionsAnswered < NUM_WHICH_MON_QUESTIONS) return; - + count = 0; for (j = 0; j < APPRENTICE_MAX_QUESTIONS; j++) { diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 04122b17d1..426dc5d157 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -866,7 +866,7 @@ static bool8 ShouldUseItem(void) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_SLEEP); shouldUse = TRUE; } - if (itemEffects[3] & ITEM3_POISON && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON + if (itemEffects[3] & ITEM3_POISON && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON || gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON)) { *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_POISON); diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 315d610897..2f4343e73c 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -3464,7 +3464,7 @@ static void AnimOrbitScatter_Step(struct Sprite *sprite) { sprite->x2 += sprite->data[0]; sprite->y2 += sprite->data[1]; - if (sprite->x + sprite->x2 + 16 > ((u32)DISPLAY_WIDTH + 32) + if (sprite->x + sprite->x2 + 16 > ((u32)DISPLAY_WIDTH + 32) || sprite->y + sprite->y2 > DISPLAY_HEIGHT || sprite->y + sprite->y2 < -16) DestroyAnimSprite(sprite); } diff --git a/src/battle_anim_electric.c b/src/battle_anim_electric.c index 8a2469d09b..a9a876920f 100644 --- a/src/battle_anim_electric.c +++ b/src/battle_anim_electric.c @@ -1305,7 +1305,7 @@ void AnimTask_ShockWaveLightning(u8 taskId) static bool8 CreateShockWaveLightningSprite(struct Task *task, u8 taskId) { u8 spriteId = CreateSprite(&gLightningSpriteTemplate, task->data[13], task->data[14], task->data[12]); - + if (spriteId != MAX_SPRITES) { gSprites[spriteId].callback = AnimShockWaveLightning; diff --git a/src/battle_anim_fire.c b/src/battle_anim_fire.c index e70f314497..9123912801 100644 --- a/src/battle_anim_fire.c +++ b/src/battle_anim_fire.c @@ -658,7 +658,7 @@ void AnimFireRing(struct Sprite *sprite) } static void AnimFireRing_Step1(struct Sprite *sprite) -{ +{ UpdateFireRingCircleOffset(sprite); if (++sprite->data[0] == 0x12) @@ -718,7 +718,7 @@ static void UpdateFireRingCircleOffset(struct Sprite *sprite) // arg 1: initial y pixel offset // arg 2: duration // arg 3: x delta -// arg 4: y delta +// arg 4: y delta // AnimFireCross(struct Sprite *sprite) static void AnimFireCross(struct Sprite *sprite) { @@ -1091,7 +1091,7 @@ static void AnimWillOWispOrb(struct Sprite *sprite) case 2: sprite->x2 = Sin(sprite->data[2], sprite->data[4]); sprite->data[2] = (sprite->data[2] + 4) & 0xFF; - + if (++sprite->data[3] == 31) { sprite->x += sprite->x2; diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index 1e9b3b56f2..b1098ad807 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -661,7 +661,7 @@ static void AnimFallingFeather_Step(struct Sprite *sprite) { switch (data->unk2 / 64) { - case 0: + case 0: if ((u8)data->unk0_1 == 1) //casts to u8 here are necessary for matching { data->unk0_0d = 1; diff --git a/src/battle_anim_ground.c b/src/battle_anim_ground.c index 2cd1351471..81b3d160f0 100644 --- a/src/battle_anim_ground.c +++ b/src/battle_anim_ground.c @@ -186,7 +186,7 @@ static void AnimBoneHitProjectile(struct Sprite *sprite) InitSpritePosToAnimTarget(sprite, TRUE); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; - + sprite->data[0] = gBattleAnimArgs[4]; sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2]; sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; diff --git a/src/battle_anim_normal.c b/src/battle_anim_normal.c index abd5d54782..15a1452e4d 100644 --- a/src/battle_anim_normal.c +++ b/src/battle_anim_normal.c @@ -425,7 +425,7 @@ static void AnimCirclingSparkle(struct Sprite *sprite) #define tPalSelectorHi data[9] #define tPalSelectorLo data[10] -// Blends mon/screen to designated color or back alternately tNumBlends times +// Blends mon/screen to designated color or back alternately tNumBlends times // Many uses of this task only set a tNumBlends of 2, which has the effect of blending to a color and back once void AnimTask_BlendColorCycle(u8 taskId) { @@ -763,7 +763,7 @@ void UnusedAnimTask_8115F94(u8 taskId) paletteIndex = IndexOfSpritePaletteTag(gSprites[gHealthboxSpriteIds[attackerBattler]].template->paletteTag); selectedPalettes |= (1 << paletteIndex) << 16; } - + if (gTasks[taskId].data[3] & 0x100) selectedPalettes |= (1 << attackerBattler) << 16; @@ -956,7 +956,7 @@ static void AnimHitSplatHandleInvert(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER && !IsContest()) gBattleAnimArgs[1] = -gBattleAnimArgs[1]; - + AnimHitSplatBasic(sprite); } diff --git a/src/battle_anim_psychic.c b/src/battle_anim_psychic.c index 6c81467dcb..b3c7b4ce8e 100644 --- a/src/battle_anim_psychic.c +++ b/src/battle_anim_psychic.c @@ -493,7 +493,7 @@ static void AnimDefensiveWall_Step1(struct Sprite *sprite) if (IsBattlerSpriteVisible(battler)) gSprites[gBattlerSpriteIds[battler]].invisible = TRUE; - + battler = BATTLE_PARTNER(battler); if (IsBattlerSpriteVisible(battler)) gSprites[gBattlerSpriteIds[battler]].invisible = TRUE; @@ -957,7 +957,7 @@ void AnimTask_ExtrasensoryDistortion(u8 taskId) u8 yOffset; struct ScanlineEffectParams scanlineParams; struct Task *task = &gTasks[taskId]; - + yOffset = GetBattlerYCoordWithElevation(gBattleAnimTarget); task->data[14] = yOffset - 32; @@ -1056,7 +1056,7 @@ void AnimTask_TransparentCloneGrowAndShrink(u8 taskId) s16 spriteId; s16 matrixNum; struct Task *task = &gTasks[taskId]; - + matrixNum = AllocOamMatrix(); if (matrixNum == 0xFF) { diff --git a/src/battle_anim_smokescreen.c b/src/battle_anim_smokescreen.c index ea7f948434..9844f50077 100644 --- a/src/battle_anim_smokescreen.c +++ b/src/battle_anim_smokescreen.c @@ -13,7 +13,7 @@ static void SpriteCB_DestroySprite(struct Sprite *sprite); // The below data for smokescreen starts and ends with some data that belongs to battle_gfx_sfx_util.c -const u8 gBattlePalaceNatureToMoveTarget[NUM_NATURES] = +const u8 gBattlePalaceNatureToMoveTarget[NUM_NATURES] = { [NATURE_HARDY] = PALACE_TARGET_STRONGER, [NATURE_LONELY] = PALACE_TARGET_STRONGER, @@ -21,7 +21,7 @@ const u8 gBattlePalaceNatureToMoveTarget[NUM_NATURES] = [NATURE_ADAMANT] = PALACE_TARGET_STRONGER, [NATURE_NAUGHTY] = PALACE_TARGET_WEAKER, [NATURE_BOLD] = PALACE_TARGET_WEAKER, - [NATURE_DOCILE] = PALACE_TARGET_RANDOM, + [NATURE_DOCILE] = PALACE_TARGET_RANDOM, [NATURE_RELAXED] = PALACE_TARGET_STRONGER, [NATURE_IMPISH] = PALACE_TARGET_STRONGER, [NATURE_LAX] = PALACE_TARGET_STRONGER, @@ -29,7 +29,7 @@ const u8 gBattlePalaceNatureToMoveTarget[NUM_NATURES] = [NATURE_HASTY] = PALACE_TARGET_WEAKER, [NATURE_SERIOUS] = PALACE_TARGET_WEAKER, [NATURE_JOLLY] = PALACE_TARGET_STRONGER, - [NATURE_NAIVE] = PALACE_TARGET_RANDOM, + [NATURE_NAIVE] = PALACE_TARGET_RANDOM, [NATURE_MODEST] = PALACE_TARGET_WEAKER, [NATURE_MILD] = PALACE_TARGET_STRONGER, [NATURE_QUIET] = PALACE_TARGET_WEAKER, @@ -54,7 +54,7 @@ static const struct CompressedSpritePalette sSmokescreenImpactSpritePalette = static const struct OamData sOamData_SmokescreenImpact = { - .y = 0, + .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, @@ -71,33 +71,33 @@ static const struct OamData sOamData_SmokescreenImpact = static const union AnimCmd sAnim_SmokescreenImpact_0[] = { - ANIMCMD_FRAME(0, 4), - ANIMCMD_FRAME(4, 4), - ANIMCMD_FRAME(8, 4), + ANIMCMD_FRAME(0, 4), + ANIMCMD_FRAME(4, 4), + ANIMCMD_FRAME(8, 4), ANIMCMD_END }; static const union AnimCmd sAnim_SmokescreenImpact_1[] = { - ANIMCMD_FRAME(0, 4, .hFlip = TRUE), - ANIMCMD_FRAME(4, 4, .hFlip = TRUE), - ANIMCMD_FRAME(8, 4, .hFlip = TRUE), + ANIMCMD_FRAME(0, 4, .hFlip = TRUE), + ANIMCMD_FRAME(4, 4, .hFlip = TRUE), + ANIMCMD_FRAME(8, 4, .hFlip = TRUE), ANIMCMD_END }; static const union AnimCmd sAnim_SmokescreenImpact_2[] = { - ANIMCMD_FRAME(0, 4, .vFlip = TRUE), - ANIMCMD_FRAME(4, 4, .vFlip = TRUE), - ANIMCMD_FRAME(8, 4, .vFlip = TRUE), + ANIMCMD_FRAME(0, 4, .vFlip = TRUE), + ANIMCMD_FRAME(4, 4, .vFlip = TRUE), + ANIMCMD_FRAME(8, 4, .vFlip = TRUE), ANIMCMD_END }; static const union AnimCmd sAnim_SmokescreenImpact_3[] = { - ANIMCMD_FRAME(0, 4, .hFlip = TRUE, .vFlip = TRUE), - ANIMCMD_FRAME(4, 4, .hFlip = TRUE, .vFlip = TRUE), - ANIMCMD_FRAME(8, 4, .hFlip = TRUE, .vFlip = TRUE), + ANIMCMD_FRAME(0, 4, .hFlip = TRUE, .vFlip = TRUE), + ANIMCMD_FRAME(4, 4, .hFlip = TRUE, .vFlip = TRUE), + ANIMCMD_FRAME(8, 4, .hFlip = TRUE, .vFlip = TRUE), ANIMCMD_END }; @@ -111,12 +111,12 @@ static const union AnimCmd *const sAnims_SmokescreenImpact[] = static const struct SpriteTemplate sSmokescreenImpactSpriteTemplate = { - .tileTag = 55019, - .paletteTag = 55019, - .oam = &sOamData_SmokescreenImpact, - .anims = sAnims_SmokescreenImpact, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 55019, + .paletteTag = 55019, + .oam = &sOamData_SmokescreenImpact, + .anims = sAnims_SmokescreenImpact, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_DestroySprite }; @@ -127,7 +127,7 @@ const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow = static const struct OamData sOamData_EnemyShadow = { - .y = 0, + .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, .mosaic = 0, @@ -144,12 +144,12 @@ static const struct OamData sOamData_EnemyShadow = const struct SpriteTemplate gSpriteTemplate_EnemyShadow = { - .tileTag = 55129, - .paletteTag = 55039, - .oam = &sOamData_EnemyShadow, - .anims = gDummySpriteAnimTable, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 55129, + .paletteTag = 55039, + .oam = &sOamData_EnemyShadow, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_SetInvisible }; diff --git a/src/battle_anim_sound_tasks.c b/src/battle_anim_sound_tasks.c index 39d6729e8d..6068b0f33a 100644 --- a/src/battle_anim_sound_tasks.c +++ b/src/battle_anim_sound_tasks.c @@ -349,7 +349,7 @@ void SoundTask_PlaySE2WithPanning(u8 taskId) DestroyAnimVisualTask(taskId); } -// Adjusts panning and assigns it to gAnimCustomPanning. Doesnt play sound. +// Adjusts panning and assigns it to gAnimCustomPanning. Doesnt play sound. // Used by Confuse Ray and Will-O-Wisp (see uses of gAnimCustomPanning) void SoundTask_AdjustPanningVar(u8 taskId) { @@ -381,7 +381,7 @@ static void SoundTask_AdjustPanningVar_Step(u8 taskId) u16 oldPan; gTasks[taskId].data[10] = 0; oldPan = gTasks[taskId].data[11]; - gTasks[taskId].data[11] = panIncrement + oldPan; + gTasks[taskId].data[11] = panIncrement + oldPan; gTasks[taskId].data[11] = KeepPanInRange(gTasks[taskId].data[11], oldPan); } diff --git a/src/battle_anim_status_effects.c b/src/battle_anim_status_effects.c index 4893abd585..9be3d65dc4 100644 --- a/src/battle_anim_status_effects.c +++ b/src/battle_anim_status_effects.c @@ -210,35 +210,35 @@ static const struct SpriteTemplate sFlickeringShrinkOrbSpriteTemplate = static const struct Subsprite sFrozenIceCubeSubsprites[] = { { - .x = -16, - .y = -16, - .shape = SPRITE_SHAPE(64x64), - .size = SPRITE_SIZE(64x64), - .tileOffset = 0, + .x = -16, + .y = -16, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), + .tileOffset = 0, .priority = 2 }, { - .x = -16, - .y = 48, - .shape = SPRITE_SHAPE(64x32), - .size = SPRITE_SIZE(64x32), - .tileOffset = 64, + .x = -16, + .y = 48, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), + .tileOffset = 64, .priority = 2 }, { - .x = 48, - .y = -16, - .shape = SPRITE_SHAPE(32x64), + .x = 48, + .y = -16, + .shape = SPRITE_SHAPE(32x64), .size = SPRITE_SIZE(32x64), - .tileOffset = 96, + .tileOffset = 96, .priority = 2 }, { - .x = 48, - .y = 48, - .shape = SPRITE_SHAPE(32x32), - .size = SPRITE_SIZE(32x32), - .tileOffset = 128, + .x = 48, + .y = 48, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), + .tileOffset = 128, .priority = 2 }, }; diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index 23e031b646..0a81a6ecab 100755 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -1139,8 +1139,8 @@ static void SpriteCB_Ball_Wobble_Step(struct Sprite *sprite) switch (STATE(sprite->sState)) { - case BALL_ROLL_1: - // Rolling effect: every frame in the rotation, the sprite shifts 176/256 of a pixel. + case BALL_ROLL_1: + // Rolling effect: every frame in the rotation, the sprite shifts 176/256 of a pixel. if (gBattleSpritesDataPtr->animationData->ballSubpx > 255) { sprite->x2 += sprite->sDirection; @@ -2268,7 +2268,7 @@ static void Task_ShinyStars(u8 taskId) } // Wait until the ball particles have despawned - if (gBattleSpritesDataPtr->animationData->numBallParticles) + if (gBattleSpritesDataPtr->animationData->numBallParticles) return; timer = gTasks[taskId].tStarTimer++; @@ -2440,7 +2440,7 @@ static void SpriteCB_PokeBlock_Arc(struct Sprite *sprite) } // Destroy after end of player animation -static void SpriteCB_ThrowPokeBlock_Free(struct Sprite *sprite) +static void SpriteCB_ThrowPokeBlock_Free(struct Sprite *sprite) { if (gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].animEnded) { diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index e0a78acf5d..4ee09f3864 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -1549,7 +1549,7 @@ static void CreateWaterPulseRingBubbles(struct Sprite *sprite, int xDiff, int yD s16 randomSomethingY; s16 randomSomethingX; u8 spriteId; - + something = sprite->data[0] / 2; combinedX = sprite->x + sprite->x2; combinedY = sprite->y + sprite->y2; diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 68f4907f0b..87bef43025 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -249,7 +249,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void) { if (twoMons == TRUE) { - if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim + if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim && gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].finishedShinyMonAnim) { gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE; @@ -266,7 +266,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void) { if (GetBattlerPosition(gActiveBattler) == 3) { - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].finishedShinyMonAnim) { FreeSpriteTilesByTag(ANIM_TAG_GOLD_STARS); @@ -291,16 +291,16 @@ static void Intro_TryShinyAnimShowHealthbox(void) bool32 bgmRestored = FALSE; bool32 battlerAnimsDone = FALSE; - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim - && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim + && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim) TryShinyAnimation(gActiveBattler, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]); - if (!(gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) - && !(gBattleTypeFlags & BATTLE_TYPE_MULTI) - && IsDoubleBattle() - && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim - && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive + if (!(gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + && !(gBattleTypeFlags & BATTLE_TYPE_MULTI) + && IsDoubleBattle() + && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim + && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].finishedShinyMonAnim) TryShinyAnimation(gActiveBattler ^ BIT_FLANK, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]]); @@ -379,12 +379,12 @@ static void Intro_TryShinyAnimShowHealthbox(void) static void TryShinyAnimAfterMonAnim(void) { - if (gSprites[gBattlerSpriteIds[gActiveBattler]].x2 == 0 - && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim + if (gSprites[gBattlerSpriteIds[gActiveBattler]].x2 == 0 + && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim) TryShinyAnimation(gActiveBattler, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]); - if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy + if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy && gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim) { gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE; @@ -467,7 +467,7 @@ static void SwitchIn_HandleSoundAndEnd(void) { if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs()) { - if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy + if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy || gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy_2) { m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); @@ -478,7 +478,7 @@ static void SwitchIn_HandleSoundAndEnd(void) static void SwitchIn_ShowHealthbox(void) { - if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim + if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim && gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) { gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE; @@ -496,7 +496,7 @@ static void SwitchIn_ShowHealthbox(void) static void SwitchIn_TryShinyAnim(void) { - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive) TryShinyAnimation(gActiveBattler, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index a852837454..8e7bc9a9f4 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -985,17 +985,17 @@ static void Intro_TryShinyAnimShowHealthbox(void) bool32 battlerAnimsDone = FALSE; // Start shiny animation if applicable for 1st pokemon - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive) TryShinyAnimation(gActiveBattler, &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]); // Start shiny animation if applicable for 2nd pokemon - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive) TryShinyAnimation(gActiveBattler ^ BIT_FLANK, &gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]]); // Show healthbox after ball anim - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive) { if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].healthboxSlideInStarted) @@ -1072,7 +1072,7 @@ static void SwitchIn_CleanShinyAnimShowSubstitute(void) && gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) { CopyBattleSpriteInvisibility(gActiveBattler); - + // Reset shiny anim (even if it didn't occur) gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim = FALSE; diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index c84f9a0de0..adac43961f 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -262,11 +262,11 @@ static void Intro_TryShinyAnimShowHealthbox(void) bool32 bgmRestored = FALSE; bool32 battlerAnimsDone = FALSE; - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive) TryShinyAnimation(gActiveBattler, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]); - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive) TryShinyAnimation(gActiveBattler ^ BIT_FLANK, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]]); diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index cbf739ae39..048600d9a5 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -285,11 +285,11 @@ static void CompleteOnChosenItem(void) static void Intro_TryShinyAnimShowHealthbox(void) { - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive) TryShinyAnimation(gActiveBattler, &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]); - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive) TryShinyAnimation(gActiveBattler ^ BIT_FLANK, &gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]]); diff --git a/src/battle_dome.c b/src/battle_dome.c index edd7bf9502..29874651d3 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -5800,7 +5800,7 @@ static void InitRandomTourneyTreeResults(void) gSaveBlock2Ptr->frontier.lvlMode = FRONTIER_LVL_50; zero1 = 0; zero2 = 0; - + gSaveBlock2Ptr->frontier.domeLvlMode = zero1 + 1; gSaveBlock2Ptr->frontier.domeBattleMode = zero2 + 1; diff --git a/src/battle_factory.c b/src/battle_factory.c index e0bfdfdd0b..8f1001e9ca 100644 --- a/src/battle_factory.c +++ b/src/battle_factory.c @@ -43,12 +43,12 @@ static u8 GetMoveBattleStyle(u16 move); // Number of moves needed on the team to be considered using a certain battle style static const u8 sRequiredMoveCounts[FACTORY_NUM_STYLES - 1] = { - [FACTORY_STYLE_PREPARATION - 1] = 3, - [FACTORY_STYLE_SLOW_STEADY - 1] = 3, - [FACTORY_STYLE_ENDURANCE - 1] = 3, - [FACTORY_STYLE_HIGH_RISK - 1] = 2, - [FACTORY_STYLE_WEAKENING - 1] = 2, - [FACTORY_STYLE_UNPREDICTABLE - 1] = 2, + [FACTORY_STYLE_PREPARATION - 1] = 3, + [FACTORY_STYLE_SLOW_STEADY - 1] = 3, + [FACTORY_STYLE_ENDURANCE - 1] = 3, + [FACTORY_STYLE_HIGH_RISK - 1] = 2, + [FACTORY_STYLE_WEAKENING - 1] = 2, + [FACTORY_STYLE_UNPREDICTABLE - 1] = 2, [FACTORY_STYLE_WEATHER - 1] = 2 }; diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 3fb65d498d..e6365aace2 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -1404,7 +1404,7 @@ static void Select_HandleMonSelectionChange(void) if (sFactorySelectScreen->mons[cursorPos].selectedId) // Deselect a mon. { paletteNum = IndexOfSpritePaletteTag(PALTAG_BALL_GRAY); - if (sFactorySelectScreen->selectingMonsState == FRONTIER_PARTY_SIZE + if (sFactorySelectScreen->selectingMonsState == FRONTIER_PARTY_SIZE && sFactorySelectScreen->mons[cursorPos].selectedId == 1) { for (i = 0; i < SELECTABLE_MONS_COUNT; i++) @@ -3057,7 +3057,7 @@ static void Swap_Task_ScreenInfoTransitionOut(u8 taskId) } break; case 5: - if (gTasks[taskId].tSlideFinishedPkmn == TRUE + if (gTasks[taskId].tSlideFinishedPkmn == TRUE && gTasks[taskId].tSlideFinishedCancel == TRUE) { gTasks[taskId].tState = gTasks[taskId].tFollowUpTaskState; @@ -3123,7 +3123,7 @@ static void Swap_Task_ScreenInfoTransitionIn(u8 taskId) } break; case 2: - if (gTasks[taskId].tSlideFinishedPkmn == TRUE + if (gTasks[taskId].tSlideFinishedPkmn == TRUE && gTasks[taskId].tSlideFinishedCancel == TRUE) { gPlttBufferFaded[226] = sPokeballGray_Pal[37]; @@ -3205,7 +3205,7 @@ static void Swap_Task_SwitchPartyScreen(u8 taskId) gTasks[taskId].tState++; break; case 3: - if (!FuncIsActiveTask(Swap_Task_SlideCycleBalls) + if (!FuncIsActiveTask(Swap_Task_SlideCycleBalls) && gTasks[sFactorySwapScreen->fadeSpeciesNameTaskId].tFadeOutFinished == TRUE) { Swap_EraseSpeciesWindow(); @@ -3679,7 +3679,7 @@ static void Swap_HideActionButtonHighlights(void) { // Hide button highlight on "Pkmn for Swap" gSprites[sFactorySwapScreen->pkmnForSwapButtonSpriteIds[1][i]].invisible = TRUE; - + // Hide button highlight on Cancel if (i < ARRAY_COUNT(sFactorySwapScreen->cancelButtonSpriteIds[0])) gSprites[sFactorySwapScreen->cancelButtonSpriteIds[1][i]].invisible = TRUE; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 41e34bf335..184d630b5a 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -139,7 +139,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) // Each nature has a different percent chance to select a move from one of 3 move groups // If percent is less than 1st check, use move from "Attack" group // If percent is less than 2nd check, use move from "Defense" group - // Otherwise use move from "Support" group + // Otherwise use move from "Support" group for (; i < maxGroupNum; i++) { if (gBattlePalaceNatureToMoveGroupLikelihood[GetNatureFromPersonality(gBattleMons[gActiveBattler].personality)][i] > percent) @@ -196,7 +196,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) if ((validMoveFlags & 0xF0) > 0x1FF) numValidMoveGroups++; - + // If more than 1 possible move group, or no possible move groups // then choose move randomly if (numValidMoveGroups > 1 || numValidMoveGroups == 0) diff --git a/src/battle_interface.c b/src/battle_interface.c index 83bdf0cb71..c1b7787fda 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -330,43 +330,43 @@ static const struct SpriteTemplate sHealthbarSpriteTemplates[MAX_BATTLERS_COUNT] static const struct Subsprite sUnknown_0832C220[] = { { - .x = DISPLAY_WIDTH, - .y = 0, - .shape = SPRITE_SHAPE(64x32), - .size = SPRITE_SIZE(64x32), - .tileOffset = 0, + .x = DISPLAY_WIDTH, + .y = 0, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), + .tileOffset = 0, .priority = 1 }, { - .x = 48, - .y = 0, - .shape = SPRITE_SHAPE(32x32), - .size = SPRITE_SIZE(32x32), - .tileOffset = 32, + .x = 48, + .y = 0, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), + .tileOffset = 32, .priority = 1 }, { - .x = DISPLAY_WIDTH, - .y = 32, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 48, + .x = DISPLAY_WIDTH, + .y = 32, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 48, .priority = 1 }, { - .x = 16, - .y = 32, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 52, + .x = 16, + .y = 32, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 52, .priority = 1 }, { - .x = 48, - .y = 32, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 56, + .x = 48, + .y = 32, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 56, .priority = 1 } }; @@ -374,43 +374,43 @@ static const struct Subsprite sUnknown_0832C220[] = static const struct Subsprite sUnknown_0832C234[] = { { - .x = DISPLAY_WIDTH, - .y = 0, - .shape = SPRITE_SHAPE(64x32), - .size = SPRITE_SIZE(64x32), - .tileOffset = 64, + .x = DISPLAY_WIDTH, + .y = 0, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), + .tileOffset = 64, .priority = 1 }, { - .x = 48, - .y = 0, - .shape = SPRITE_SHAPE(32x32), - .size = SPRITE_SIZE(32x32), - .tileOffset = 96, + .x = 48, + .y = 0, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), + .tileOffset = 96, .priority = 1 }, { - .x = DISPLAY_WIDTH, - .y = 32, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 112, + .x = DISPLAY_WIDTH, + .y = 32, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 112, .priority = 1 }, { - .x = 16, - .y = 32, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 116, + .x = 16, + .y = 32, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 116, .priority = 1 }, { - .x = 48, - .y = 32, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 120, + .x = 48, + .y = 32, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 120, .priority = 1 } }; @@ -418,19 +418,19 @@ static const struct Subsprite sUnknown_0832C234[] = static const struct Subsprite sUnknown_0832C248[] = { { - .x = DISPLAY_WIDTH, - .y = 0, - .shape = SPRITE_SHAPE(64x32), + .x = DISPLAY_WIDTH, + .y = 0, + .shape = SPRITE_SHAPE(64x32), .size = SPRITE_SIZE(64x32), - .tileOffset = 0, + .tileOffset = 0, .priority = 1 }, { - .x = 48, - .y = 0, - .shape = SPRITE_SHAPE(32x32), - .size = SPRITE_SIZE(32x32), - .tileOffset = 32, + .x = 48, + .y = 0, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), + .tileOffset = 32, .priority = 1 } }; @@ -438,19 +438,19 @@ static const struct Subsprite sUnknown_0832C248[] = static const struct Subsprite sUnknown_0832C250[] = { { - .x = DISPLAY_WIDTH, - .y = 0, - .shape = SPRITE_SHAPE(64x32), + .x = DISPLAY_WIDTH, + .y = 0, + .shape = SPRITE_SHAPE(64x32), .size = SPRITE_SIZE(64x32), - .tileOffset = 0, + .tileOffset = 0, .priority = 1 }, { - .x = 48, - .y = 0, - .shape = SPRITE_SHAPE(32x32), - .size = SPRITE_SIZE(32x32), - .tileOffset = 32, + .x = 48, + .y = 0, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), + .tileOffset = 32, .priority = 1 } }; @@ -458,19 +458,19 @@ static const struct Subsprite sUnknown_0832C250[] = static const struct Subsprite sUnknown_0832C258[] = { { - .x = DISPLAY_WIDTH, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = DISPLAY_WIDTH, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 1 }, { - .x = 16, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = 16, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 1 } }; @@ -478,27 +478,27 @@ static const struct Subsprite sUnknown_0832C258[] = static const struct Subsprite sUnknown_0832C260[] = { { - .x = DISPLAY_WIDTH, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = DISPLAY_WIDTH, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 1 }, { - .x = 16, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = 16, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 1 }, { - .x = DISPLAY_WIDTH - 16, - .y = 0, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 8, + .x = DISPLAY_WIDTH - 16, + .y = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 8, .priority = 1 } }; @@ -521,35 +521,35 @@ static const struct SubspriteTable sUnknown_0832C28C[] = static const struct Subsprite sStatusSummaryBar_Subsprites_0[] = { { - .x = 160, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = 160, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 1 }, { - .x = 192, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = 192, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 1 }, { - .x = 224, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = 224, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 1 }, { - .x = 0, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .x = 0, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 12, .priority = 1 } }; @@ -557,51 +557,51 @@ static const struct Subsprite sStatusSummaryBar_Subsprites_0[] = static const struct Subsprite sUnknown_0832C2AC[] = { { - .x = 160, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = 160, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 1 }, { - .x = 192, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = 192, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 1 }, { - .x = 224, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = 224, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 1 }, { - .x = 0, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = 0, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 1 }, { - .x = 32, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = 32, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 1 }, { - .x = 64, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .x = 64, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 12, .priority = 1 } }; @@ -1101,7 +1101,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl) u8 text[16]; u32 xPos; u8 *objVram; - + text[0] = CHAR_EXTRA_SYMBOL; text[1] = CHAR_LV_2; diff --git a/src/battle_main.c b/src/battle_main.c index 37ab6109c6..19505b385f 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4374,10 +4374,10 @@ static void HandleTurnActionSelectionState(void) } break; case STATE_WAIT_ACTION_CONFIRMED_STANDBY: - if (!(gBattleControllerExecFlags & ((gBitTable[gActiveBattler]) + if (!(gBattleControllerExecFlags & ((gBitTable[gActiveBattler]) | (0xF << 28) - | (gBitTable[gActiveBattler] << 4) - | (gBitTable[gActiveBattler] << 8) + | (gBitTable[gActiveBattler] << 4) + | (gBitTable[gActiveBattler] << 8) | (gBitTable[gActiveBattler] << 12)))) { if (AllAtActionConfirmed()) diff --git a/src/battle_message.c b/src/battle_message.c index ae30a2a629..1f4bd893fa 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1390,9 +1390,9 @@ static const u8 sText_PkmnEagerForMore[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is const u16 gBattlePalaceFlavorTextTable[] = { - [B_MSG_GLINT_IN_EYE] = STRINGID_GLINTAPPEARSINEYE, + [B_MSG_GLINT_IN_EYE] = STRINGID_GLINTAPPEARSINEYE, [B_MSG_GETTING_IN_POS] = STRINGID_PKMNGETTINGINTOPOSITION, - [B_MSG_GROWL_DEEPLY] = STRINGID_PKMNBEGANGROWLINGDEEPLY, + [B_MSG_GROWL_DEEPLY] = STRINGID_PKMNBEGANGROWLINGDEEPLY, [B_MSG_EAGER_FOR_MORE] = STRINGID_PKMNEAGERFORMORE, }; diff --git a/src/battle_palace.c b/src/battle_palace.c index 6336662546..c4e48a4b2b 100644 --- a/src/battle_palace.c +++ b/src/battle_palace.c @@ -40,26 +40,26 @@ static void (* const sBattlePalaceFunctions[])(void) = [BATTLE_PALACE_FUNC_GIVE_PRIZE] = GivePalacePrize, }; -static const u16 sBattlePalaceEarlyPrizes[] = +static const u16 sBattlePalaceEarlyPrizes[] = { - ITEM_HP_UP, - ITEM_PROTEIN, - ITEM_IRON, - ITEM_CALCIUM, - ITEM_CARBOS, + ITEM_HP_UP, + ITEM_PROTEIN, + ITEM_IRON, + ITEM_CALCIUM, + ITEM_CARBOS, ITEM_ZINC }; -static const u16 sBattlePalaceLatePrizes[] = +static const u16 sBattlePalaceLatePrizes[] = { - ITEM_BRIGHT_POWDER, - ITEM_WHITE_HERB, - ITEM_QUICK_CLAW, - ITEM_LEFTOVERS, - ITEM_MENTAL_HERB, - ITEM_KINGS_ROCK, - ITEM_FOCUS_BAND, - ITEM_SCOPE_LENS, + ITEM_BRIGHT_POWDER, + ITEM_WHITE_HERB, + ITEM_QUICK_CLAW, + ITEM_LEFTOVERS, + ITEM_MENTAL_HERB, + ITEM_KINGS_ROCK, + ITEM_FOCUS_BAND, + ITEM_SCOPE_LENS, ITEM_CHOICE_BAND }; diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 9cc65e14d6..179f4dc654 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -452,8 +452,8 @@ static void VBlankCB_PyramidBag(void) static void CB2_LoadPyramidBagMenu(void) { - while (MenuHelpers_CallLinkSomething() != TRUE - && LoadPyramidBagMenu() != TRUE + while (MenuHelpers_CallLinkSomething() != TRUE + && LoadPyramidBagMenu() != TRUE && MenuHelpers_LinkSomething() != TRUE); } @@ -696,9 +696,9 @@ static void PrintItemDescription(s32 listMenuId) static void AddScrollArrows(void) { if (gPyramidBagMenu->scrollIndicatorsTaskId == TASK_NONE) - gPyramidBagMenu->scrollIndicatorsTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 172, 12, 148, - gPyramidBagMenu->listMenuCount - gPyramidBagMenu->listMenuMaxShown, - TAG_SCROLL_ARROW, TAG_SCROLL_ARROW, + gPyramidBagMenu->scrollIndicatorsTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 172, 12, 148, + gPyramidBagMenu->listMenuCount - gPyramidBagMenu->listMenuMaxShown, + TAG_SCROLL_ARROW, TAG_SCROLL_ARROW, &gPyramidBagMenuState.scrollPosition); } @@ -866,7 +866,7 @@ static void Task_ClosePyramidBag(u8 taskId) if (!gPaletteFade.active) { DestroyListMenuTask(tListTaskId, &gPyramidBagMenuState.scrollPosition, &gPyramidBagMenuState.cursorPosition); - + // If ready for a new screen (e.g. party menu for giving an item) go to that screen // Otherwise exit the bag and use callback set up when the bag was first opened if (gPyramidBagMenu->newScreenCallback != NULL) @@ -937,7 +937,7 @@ static void OpenContextMenu(u8 taskId) { default: // case PYRAMIDBAG_LOC_FIELD: -// case PYRAMIDBAG_LOC_PARTY: +// case PYRAMIDBAG_LOC_PARTY: gPyramidBagMenu->menuActionIds = sMenuActionIds_Field; gPyramidBagMenu->menuActionsCount = ARRAY_COUNT(sMenuActionIds_Field); break; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index cea30bb217..2a5b4c112b 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -833,9 +833,9 @@ static const u8 sTerrainToType[] = // - ITEM_ULTRA_BALL skips Master Ball and ITEM_NONE static const u8 sBallCatchBonuses[] = { - [ITEM_ULTRA_BALL - ITEM_ULTRA_BALL] = 20, - [ITEM_GREAT_BALL - ITEM_ULTRA_BALL] = 15, - [ITEM_POKE_BALL - ITEM_ULTRA_BALL] = 10, + [ITEM_ULTRA_BALL - ITEM_ULTRA_BALL] = 20, + [ITEM_GREAT_BALL - ITEM_ULTRA_BALL] = 15, + [ITEM_POKE_BALL - ITEM_ULTRA_BALL] = 10, [ITEM_SAFARI_BALL - ITEM_ULTRA_BALL] = 15 }; @@ -3519,7 +3519,7 @@ static void Cmd_unknown_24(void) if (HP_count == 0) gBattleOutcome |= B_OUTCOME_LOST; - + HP_count = 0; for (i = 0; i < PARTY_SIZE; i++) @@ -3544,7 +3544,7 @@ static void Cmd_unknown_24(void) if ((gHitMarker & HITMARKER_FAINTED2(i)) && (!gSpecialStatuses[i].flag40)) foundPlayer++; } - + foundOpponent = 0; for (i = 1; i < gBattlersCount; i += 2) @@ -4610,9 +4610,9 @@ static void Cmd_switchindataupdate(void) SwitchInClearSetData(); - if (gBattleTypeFlags & BATTLE_TYPE_PALACE + if (gBattleTypeFlags & BATTLE_TYPE_PALACE && gBattleMons[gActiveBattler].maxHP / 2 >= gBattleMons[gActiveBattler].hp - && gBattleMons[gActiveBattler].hp != 0 + && gBattleMons[gActiveBattler].hp != 0 && !(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)) { gBattleStruct->palaceFlags |= gBitTable[gActiveBattler]; diff --git a/src/battle_setup.c b/src/battle_setup.c index cb65d25d6c..4337ec29cf 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -126,32 +126,32 @@ static const u8 sBattleTransitionTable_Trainer[][2] = // Battle Frontier (excluding Pyramid and Dome, which have their own tables below) static const u8 sBattleTransitionTable_BattleFrontier[] = { - B_TRANSITION_FRONTIER_LOGO_WIGGLE, - B_TRANSITION_FRONTIER_LOGO_WAVE, - B_TRANSITION_FRONTIER_SQUARES, + B_TRANSITION_FRONTIER_LOGO_WIGGLE, + B_TRANSITION_FRONTIER_LOGO_WAVE, + B_TRANSITION_FRONTIER_SQUARES, B_TRANSITION_FRONTIER_SQUARES_SCROLL, - B_TRANSITION_FRONTIER_CIRCLES_MEET, - B_TRANSITION_FRONTIER_CIRCLES_CROSS, - B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL, + B_TRANSITION_FRONTIER_CIRCLES_MEET, + B_TRANSITION_FRONTIER_CIRCLES_CROSS, + B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL, B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL, - B_TRANSITION_FRONTIER_CIRCLES_MEET_IN_SEQ, - B_TRANSITION_FRONTIER_CIRCLES_CROSS_IN_SEQ, - B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL_IN_SEQ, + B_TRANSITION_FRONTIER_CIRCLES_MEET_IN_SEQ, + B_TRANSITION_FRONTIER_CIRCLES_CROSS_IN_SEQ, + B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL_IN_SEQ, B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL_IN_SEQ }; static const u8 sBattleTransitionTable_BattlePyramid[] = { - B_TRANSITION_FRONTIER_SQUARES, - B_TRANSITION_FRONTIER_SQUARES_SCROLL, + B_TRANSITION_FRONTIER_SQUARES, + B_TRANSITION_FRONTIER_SQUARES_SCROLL, B_TRANSITION_FRONTIER_SQUARES_SPIRAL }; static const u8 sBattleTransitionTable_BattleDome[] = { - B_TRANSITION_FRONTIER_LOGO_WIGGLE, - B_TRANSITION_FRONTIER_SQUARES, - B_TRANSITION_FRONTIER_SQUARES_SCROLL, + B_TRANSITION_FRONTIER_LOGO_WIGGLE, + B_TRANSITION_FRONTIER_SQUARES, + B_TRANSITION_FRONTIER_SQUARES_SCROLL, B_TRANSITION_FRONTIER_SQUARES_SPIRAL }; diff --git a/src/battle_tower.c b/src/battle_tower.c index 082ea6822f..27defc1fa3 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1339,7 +1339,7 @@ void PutNewBattleTowerRecord(struct EmeraldBattleTowerRecord *newRecordEm) if (gSaveBlock2Ptr->frontier.towerRecords[i].name[j] != newRecord->name[j]) break; if (newRecord->name[j] == EOS) - #endif + #endif { k = PLAYER_NAME_LENGTH; break; @@ -2655,7 +2655,7 @@ static void TowerTryCloseLink(void) static void SetMultiPartnerGfx(void) { // 0xF below means use VAR_OBJ_GFX_ID_E - SetBattleFacilityTrainerGfxId(gSaveBlock2Ptr->frontier.trainerIds[17], 0xF); + SetBattleFacilityTrainerGfxId(gSaveBlock2Ptr->frontier.trainerIds[17], 0xF); } static void SetTowerInterviewData(void) @@ -2968,7 +2968,7 @@ static void FillPartnerParty(u16 trainerId) sStevenMons[i].species, sStevenMons[i].level, sStevenMons[i].fixedIV, - TRUE, + TRUE, #ifdef BUGFIX j, #else diff --git a/src/battle_tv.c b/src/battle_tv.c index 8c1f8044a5..2c6c1b0a34 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -86,219 +86,219 @@ static const u16 sVariableDmgMoves[] = static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = { - [EFFECT_HIT] = 1, - [EFFECT_SLEEP] = 1, - [EFFECT_POISON_HIT] = 1, - [EFFECT_ABSORB] = 4, - [EFFECT_BURN_HIT] = 1, - [EFFECT_FREEZE_HIT] = 1, - [EFFECT_PARALYZE_HIT] = 1, - [EFFECT_EXPLOSION] = 0, - [EFFECT_DREAM_EATER] = 5, - [EFFECT_MIRROR_MOVE] = 1, - [EFFECT_ATTACK_UP] = 1, - [EFFECT_DEFENSE_UP] = 1, - [EFFECT_SPEED_UP] = 1, - [EFFECT_SPECIAL_ATTACK_UP] = 1, - [EFFECT_SPECIAL_DEFENSE_UP] = 1, + [EFFECT_HIT] = 1, + [EFFECT_SLEEP] = 1, + [EFFECT_POISON_HIT] = 1, + [EFFECT_ABSORB] = 4, + [EFFECT_BURN_HIT] = 1, + [EFFECT_FREEZE_HIT] = 1, + [EFFECT_PARALYZE_HIT] = 1, + [EFFECT_EXPLOSION] = 0, + [EFFECT_DREAM_EATER] = 5, + [EFFECT_MIRROR_MOVE] = 1, + [EFFECT_ATTACK_UP] = 1, + [EFFECT_DEFENSE_UP] = 1, + [EFFECT_SPEED_UP] = 1, + [EFFECT_SPECIAL_ATTACK_UP] = 1, + [EFFECT_SPECIAL_DEFENSE_UP] = 1, [EFFECT_ACCURACY_UP] = 1, - [EFFECT_EVASION_UP] = 1, - [EFFECT_ALWAYS_HIT] = 2, - [EFFECT_ATTACK_DOWN] = 1, - [EFFECT_DEFENSE_DOWN] = 1, - [EFFECT_SPEED_DOWN] = 1, - [EFFECT_SPECIAL_ATTACK_DOWN] = 1, - [EFFECT_SPECIAL_DEFENSE_DOWN] = 1, - [EFFECT_ACCURACY_DOWN] = 1, - [EFFECT_EVASION_DOWN] = 1, - [EFFECT_HAZE] = 5, - [EFFECT_BIDE] = 5, - [EFFECT_RAMPAGE] = 4, - [EFFECT_ROAR] = 5, - [EFFECT_MULTI_HIT] = 1, - [EFFECT_CONVERSION] = 3, + [EFFECT_EVASION_UP] = 1, + [EFFECT_ALWAYS_HIT] = 2, + [EFFECT_ATTACK_DOWN] = 1, + [EFFECT_DEFENSE_DOWN] = 1, + [EFFECT_SPEED_DOWN] = 1, + [EFFECT_SPECIAL_ATTACK_DOWN] = 1, + [EFFECT_SPECIAL_DEFENSE_DOWN] = 1, + [EFFECT_ACCURACY_DOWN] = 1, + [EFFECT_EVASION_DOWN] = 1, + [EFFECT_HAZE] = 5, + [EFFECT_BIDE] = 5, + [EFFECT_RAMPAGE] = 4, + [EFFECT_ROAR] = 5, + [EFFECT_MULTI_HIT] = 1, + [EFFECT_CONVERSION] = 3, [EFFECT_FLINCH_HIT] = 1, - [EFFECT_RESTORE_HP] = 3, - [EFFECT_TOXIC] = 5, - [EFFECT_PAY_DAY] = 1, - [EFFECT_LIGHT_SCREEN] = 7, - [EFFECT_TRI_ATTACK] = 1, - [EFFECT_REST] = 7, - [EFFECT_OHKO] = 7, - [EFFECT_RAZOR_WIND] = 1, - [EFFECT_SUPER_FANG] = 5, - [EFFECT_DRAGON_RAGE] = 2, - [EFFECT_TRAP] = 4, - [EFFECT_HIGH_CRITICAL] = 1, - [EFFECT_DOUBLE_HIT] = 1, - [EFFECT_RECOIL_IF_MISS] = 1, - [EFFECT_MIST] = 5, + [EFFECT_RESTORE_HP] = 3, + [EFFECT_TOXIC] = 5, + [EFFECT_PAY_DAY] = 1, + [EFFECT_LIGHT_SCREEN] = 7, + [EFFECT_TRI_ATTACK] = 1, + [EFFECT_REST] = 7, + [EFFECT_OHKO] = 7, + [EFFECT_RAZOR_WIND] = 1, + [EFFECT_SUPER_FANG] = 5, + [EFFECT_DRAGON_RAGE] = 2, + [EFFECT_TRAP] = 4, + [EFFECT_HIGH_CRITICAL] = 1, + [EFFECT_DOUBLE_HIT] = 1, + [EFFECT_RECOIL_IF_MISS] = 1, + [EFFECT_MIST] = 5, [EFFECT_FOCUS_ENERGY] = 1, - [EFFECT_RECOIL] = 2, - [EFFECT_CONFUSE] = 4, - [EFFECT_ATTACK_UP_2] = 1, - [EFFECT_DEFENSE_UP_2] = 1, - [EFFECT_SPEED_UP_2] = 1, - [EFFECT_SPECIAL_ATTACK_UP_2] = 1, - [EFFECT_SPECIAL_DEFENSE_UP_2] = 1, - [EFFECT_ACCURACY_UP_2] = 1, - [EFFECT_EVASION_UP_2] = 1, - [EFFECT_TRANSFORM] = 0, - [EFFECT_ATTACK_DOWN_2] = 1, - [EFFECT_DEFENSE_DOWN_2] = 1, - [EFFECT_SPEED_DOWN_2] = 1, - [EFFECT_SPECIAL_ATTACK_DOWN_2] = 1, - [EFFECT_SPECIAL_DEFENSE_DOWN_2] = 1, + [EFFECT_RECOIL] = 2, + [EFFECT_CONFUSE] = 4, + [EFFECT_ATTACK_UP_2] = 1, + [EFFECT_DEFENSE_UP_2] = 1, + [EFFECT_SPEED_UP_2] = 1, + [EFFECT_SPECIAL_ATTACK_UP_2] = 1, + [EFFECT_SPECIAL_DEFENSE_UP_2] = 1, + [EFFECT_ACCURACY_UP_2] = 1, + [EFFECT_EVASION_UP_2] = 1, + [EFFECT_TRANSFORM] = 0, + [EFFECT_ATTACK_DOWN_2] = 1, + [EFFECT_DEFENSE_DOWN_2] = 1, + [EFFECT_SPEED_DOWN_2] = 1, + [EFFECT_SPECIAL_ATTACK_DOWN_2] = 1, + [EFFECT_SPECIAL_DEFENSE_DOWN_2] = 1, [EFFECT_ACCURACY_DOWN_2] = 1, - [EFFECT_EVASION_DOWN_2] = 1, - [EFFECT_REFLECT] = 7, - [EFFECT_POISON] = 4, - [EFFECT_PARALYZE] = 4, - [EFFECT_ATTACK_DOWN_HIT] = 1, - [EFFECT_DEFENSE_DOWN_HIT] = 1, - [EFFECT_SPEED_DOWN_HIT] = 1, - [EFFECT_SPECIAL_ATTACK_DOWN_HIT] = 1, - [EFFECT_SPECIAL_DEFENSE_DOWN_HIT] = 1, - [EFFECT_ACCURACY_DOWN_HIT] = 1, - [EFFECT_EVASION_DOWN_HIT] = 1, - [EFFECT_SKY_ATTACK] = 4, - [EFFECT_CONFUSE_HIT] = 1, - [EFFECT_TWINEEDLE] = 1, - [EFFECT_VITAL_THROW] = 1, + [EFFECT_EVASION_DOWN_2] = 1, + [EFFECT_REFLECT] = 7, + [EFFECT_POISON] = 4, + [EFFECT_PARALYZE] = 4, + [EFFECT_ATTACK_DOWN_HIT] = 1, + [EFFECT_DEFENSE_DOWN_HIT] = 1, + [EFFECT_SPEED_DOWN_HIT] = 1, + [EFFECT_SPECIAL_ATTACK_DOWN_HIT] = 1, + [EFFECT_SPECIAL_DEFENSE_DOWN_HIT] = 1, + [EFFECT_ACCURACY_DOWN_HIT] = 1, + [EFFECT_EVASION_DOWN_HIT] = 1, + [EFFECT_SKY_ATTACK] = 4, + [EFFECT_CONFUSE_HIT] = 1, + [EFFECT_TWINEEDLE] = 1, + [EFFECT_VITAL_THROW] = 1, [EFFECT_SUBSTITUTE] = 4, - [EFFECT_RECHARGE] = 5, - [EFFECT_RAGE] = 2, - [EFFECT_MIMIC] = 4, - [EFFECT_METRONOME] = 1, - [EFFECT_LEECH_SEED] = 4, - [EFFECT_SPLASH] = 1, - [EFFECT_DISABLE] = 7, - [EFFECT_LEVEL_DAMAGE] = 2, - [EFFECT_PSYWAVE] = 1, - [EFFECT_COUNTER] = 5, - [EFFECT_ENCORE] = 7, - [EFFECT_PAIN_SPLIT] = 3, - [EFFECT_SNORE] = 3, - [EFFECT_CONVERSION_2] = 4, - [EFFECT_LOCK_ON] = 3, + [EFFECT_RECHARGE] = 5, + [EFFECT_RAGE] = 2, + [EFFECT_MIMIC] = 4, + [EFFECT_METRONOME] = 1, + [EFFECT_LEECH_SEED] = 4, + [EFFECT_SPLASH] = 1, + [EFFECT_DISABLE] = 7, + [EFFECT_LEVEL_DAMAGE] = 2, + [EFFECT_PSYWAVE] = 1, + [EFFECT_COUNTER] = 5, + [EFFECT_ENCORE] = 7, + [EFFECT_PAIN_SPLIT] = 3, + [EFFECT_SNORE] = 3, + [EFFECT_CONVERSION_2] = 4, + [EFFECT_LOCK_ON] = 3, [EFFECT_SKETCH] = 3, - [EFFECT_UNUSED_60] = 3, - [EFFECT_SLEEP_TALK] = 3, - [EFFECT_DESTINY_BOND] = 3, - [EFFECT_FLAIL] = 2, - [EFFECT_SPITE] = 4, - [EFFECT_FALSE_SWIPE] = 1, - [EFFECT_HEAL_BELL] = 5, - [EFFECT_QUICK_ATTACK] = 1, - [EFFECT_TRIPLE_KICK] = 1, - [EFFECT_THIEF] = 4, - [EFFECT_MEAN_LOOK] = 5, - [EFFECT_NIGHTMARE] = 3, - [EFFECT_MINIMIZE] = 1, - [EFFECT_CURSE] = 2, - [EFFECT_UNUSED_6E] = 1, + [EFFECT_UNUSED_60] = 3, + [EFFECT_SLEEP_TALK] = 3, + [EFFECT_DESTINY_BOND] = 3, + [EFFECT_FLAIL] = 2, + [EFFECT_SPITE] = 4, + [EFFECT_FALSE_SWIPE] = 1, + [EFFECT_HEAL_BELL] = 5, + [EFFECT_QUICK_ATTACK] = 1, + [EFFECT_TRIPLE_KICK] = 1, + [EFFECT_THIEF] = 4, + [EFFECT_MEAN_LOOK] = 5, + [EFFECT_NIGHTMARE] = 3, + [EFFECT_MINIMIZE] = 1, + [EFFECT_CURSE] = 2, + [EFFECT_UNUSED_6E] = 1, [EFFECT_PROTECT] = 5, - [EFFECT_SPIKES] = 4, - [EFFECT_FORESIGHT] = 3, - [EFFECT_PERISH_SONG] = 6, - [EFFECT_SANDSTORM] = 4, - [EFFECT_ENDURE] = 3, - [EFFECT_ROLLOUT] = 3, - [EFFECT_SWAGGER] = 3, - [EFFECT_FURY_CUTTER] = 2, - [EFFECT_ATTRACT] = 4, - [EFFECT_RETURN] = 1, - [EFFECT_PRESENT] = 1, - [EFFECT_FRUSTRATION] = 1, - [EFFECT_SAFEGUARD] = 5, - [EFFECT_THAW_HIT] = 1, - [EFFECT_MAGNITUDE] = 1, + [EFFECT_SPIKES] = 4, + [EFFECT_FORESIGHT] = 3, + [EFFECT_PERISH_SONG] = 6, + [EFFECT_SANDSTORM] = 4, + [EFFECT_ENDURE] = 3, + [EFFECT_ROLLOUT] = 3, + [EFFECT_SWAGGER] = 3, + [EFFECT_FURY_CUTTER] = 2, + [EFFECT_ATTRACT] = 4, + [EFFECT_RETURN] = 1, + [EFFECT_PRESENT] = 1, + [EFFECT_FRUSTRATION] = 1, + [EFFECT_SAFEGUARD] = 5, + [EFFECT_THAW_HIT] = 1, + [EFFECT_MAGNITUDE] = 1, [EFFECT_BATON_PASS] = 7, - [EFFECT_PURSUIT] = 2, - [EFFECT_RAPID_SPIN] = 2, - [EFFECT_SONICBOOM] = 1, - [EFFECT_UNUSED_83] = 1, - [EFFECT_MORNING_SUN] = 4, - [EFFECT_SYNTHESIS] = 4, - [EFFECT_MOONLIGHT] = 4, - [EFFECT_HIDDEN_POWER] = 1, - [EFFECT_RAIN_DANCE] = 4, - [EFFECT_SUNNY_DAY] = 4, - [EFFECT_DEFENSE_UP_HIT] = 1, - [EFFECT_ATTACK_UP_HIT] = 1, - [EFFECT_ALL_STATS_UP_HIT] = 1, - [EFFECT_UNUSED_8D] = 1, - [EFFECT_BELLY_DRUM] = 7, + [EFFECT_PURSUIT] = 2, + [EFFECT_RAPID_SPIN] = 2, + [EFFECT_SONICBOOM] = 1, + [EFFECT_UNUSED_83] = 1, + [EFFECT_MORNING_SUN] = 4, + [EFFECT_SYNTHESIS] = 4, + [EFFECT_MOONLIGHT] = 4, + [EFFECT_HIDDEN_POWER] = 1, + [EFFECT_RAIN_DANCE] = 4, + [EFFECT_SUNNY_DAY] = 4, + [EFFECT_DEFENSE_UP_HIT] = 1, + [EFFECT_ATTACK_UP_HIT] = 1, + [EFFECT_ALL_STATS_UP_HIT] = 1, + [EFFECT_UNUSED_8D] = 1, + [EFFECT_BELLY_DRUM] = 7, [EFFECT_PSYCH_UP] = 7, - [EFFECT_MIRROR_COAT] = 6, - [EFFECT_SKULL_BASH] = 3, - [EFFECT_TWISTER] = 1, + [EFFECT_MIRROR_COAT] = 6, + [EFFECT_SKULL_BASH] = 3, + [EFFECT_TWISTER] = 1, [EFFECT_EARTHQUAKE] = 1, - [EFFECT_FUTURE_SIGHT] = 1, - [EFFECT_GUST] = 1, - [EFFECT_FLINCH_MINIMIZE_HIT] = 1, - [EFFECT_SOLARBEAM] = 1, - [EFFECT_THUNDER] = 1, - [EFFECT_TELEPORT] = 1, - [EFFECT_BEAT_UP] = 2, - [EFFECT_SEMI_INVULNERABLE] = 3, - [EFFECT_DEFENSE_CURL] = 1, - [EFFECT_SOFTBOILED] = 1, - [EFFECT_FAKE_OUT] = 4, + [EFFECT_FUTURE_SIGHT] = 1, + [EFFECT_GUST] = 1, + [EFFECT_FLINCH_MINIMIZE_HIT] = 1, + [EFFECT_SOLARBEAM] = 1, + [EFFECT_THUNDER] = 1, + [EFFECT_TELEPORT] = 1, + [EFFECT_BEAT_UP] = 2, + [EFFECT_SEMI_INVULNERABLE] = 3, + [EFFECT_DEFENSE_CURL] = 1, + [EFFECT_SOFTBOILED] = 1, + [EFFECT_FAKE_OUT] = 4, [EFFECT_UPROAR] = 4, - [EFFECT_STOCKPILE] = 3, - [EFFECT_SPIT_UP] = 3, - [EFFECT_SWALLOW] = 3, - [EFFECT_UNUSED_A3] = 1, - [EFFECT_HAIL] = 4, - [EFFECT_TORMENT] = 7, - [EFFECT_FLATTER] = 7, - [EFFECT_WILL_O_WISP] = 5, - [EFFECT_MEMENTO] = 7, - [EFFECT_FACADE] = 1, - [EFFECT_FOCUS_PUNCH] = 7, - [EFFECT_SMELLINGSALT] = 1, - [EFFECT_FOLLOW_ME] = 5, - [EFFECT_NATURE_POWER] = 0, - [EFFECT_CHARGE] = 4, + [EFFECT_STOCKPILE] = 3, + [EFFECT_SPIT_UP] = 3, + [EFFECT_SWALLOW] = 3, + [EFFECT_UNUSED_A3] = 1, + [EFFECT_HAIL] = 4, + [EFFECT_TORMENT] = 7, + [EFFECT_FLATTER] = 7, + [EFFECT_WILL_O_WISP] = 5, + [EFFECT_MEMENTO] = 7, + [EFFECT_FACADE] = 1, + [EFFECT_FOCUS_PUNCH] = 7, + [EFFECT_SMELLINGSALT] = 1, + [EFFECT_FOLLOW_ME] = 5, + [EFFECT_NATURE_POWER] = 0, + [EFFECT_CHARGE] = 4, [EFFECT_TAUNT] = 4, - [EFFECT_HELPING_HAND] = 4, - [EFFECT_TRICK] = 4, - [EFFECT_ROLE_PLAY] = 4, - [EFFECT_WISH] = 2, - [EFFECT_ASSIST] = 2, - [EFFECT_INGRAIN] = 6, - [EFFECT_SUPERPOWER] = 3, - [EFFECT_MAGIC_COAT] = 6, - [EFFECT_RECYCLE] = 4, - [EFFECT_REVENGE] = 4, - [EFFECT_BRICK_BREAK] = 2, - [EFFECT_YAWN] = 5, - [EFFECT_KNOCK_OFF] = 2, - [EFFECT_ENDEAVOR] = 1, - [EFFECT_ERUPTION] = 1, + [EFFECT_HELPING_HAND] = 4, + [EFFECT_TRICK] = 4, + [EFFECT_ROLE_PLAY] = 4, + [EFFECT_WISH] = 2, + [EFFECT_ASSIST] = 2, + [EFFECT_INGRAIN] = 6, + [EFFECT_SUPERPOWER] = 3, + [EFFECT_MAGIC_COAT] = 6, + [EFFECT_RECYCLE] = 4, + [EFFECT_REVENGE] = 4, + [EFFECT_BRICK_BREAK] = 2, + [EFFECT_YAWN] = 5, + [EFFECT_KNOCK_OFF] = 2, + [EFFECT_ENDEAVOR] = 1, + [EFFECT_ERUPTION] = 1, [EFFECT_SKILL_SWAP] = 6, - [EFFECT_IMPRISON] = 6, - [EFFECT_REFRESH] = 6, - [EFFECT_GRUDGE] = 1, - [EFFECT_SNATCH] = 1, - [EFFECT_LOW_KICK] = 1, - [EFFECT_SECRET_POWER] = 1, - [EFFECT_DOUBLE_EDGE] = 2, - [EFFECT_TEETER_DANCE] = 6, - [EFFECT_BLAZE_KICK] = 1, - [EFFECT_MUD_SPORT] = 4, - [EFFECT_POISON_FANG] = 1, - [EFFECT_WEATHER_BALL] = 1, - [EFFECT_OVERHEAT] = 3, - [EFFECT_TICKLE] = 1, - [EFFECT_COSMIC_POWER] = 1, + [EFFECT_IMPRISON] = 6, + [EFFECT_REFRESH] = 6, + [EFFECT_GRUDGE] = 1, + [EFFECT_SNATCH] = 1, + [EFFECT_LOW_KICK] = 1, + [EFFECT_SECRET_POWER] = 1, + [EFFECT_DOUBLE_EDGE] = 2, + [EFFECT_TEETER_DANCE] = 6, + [EFFECT_BLAZE_KICK] = 1, + [EFFECT_MUD_SPORT] = 4, + [EFFECT_POISON_FANG] = 1, + [EFFECT_WEATHER_BALL] = 1, + [EFFECT_OVERHEAT] = 3, + [EFFECT_TICKLE] = 1, + [EFFECT_COSMIC_POWER] = 1, [EFFECT_SKY_UPPERCUT] = 1, - [EFFECT_BULK_UP] = 1, - [EFFECT_POISON_TAIL] = 1, - [EFFECT_WATER_SPORT] = 4, - [EFFECT_CALM_MIND] = 1, - [EFFECT_DRAGON_DANCE] = 1, + [EFFECT_BULK_UP] = 1, + [EFFECT_POISON_TAIL] = 1, + [EFFECT_WATER_SPORT] = 4, + [EFFECT_CALM_MIND] = 1, + [EFFECT_DRAGON_DANCE] = 1, [EFFECT_CAMOUFLAGE] = 3 }; @@ -312,93 +312,93 @@ static const u16 sPoints_SetUp[] = { 4, // Future Sight 4, // Doom Desire - 6, + 6, 6, // Wish 7, // Grudge - 6, + 6, 2 // Ingrain }; static const u16 sPoints_RainMoves[] = { - MOVE_BUBBLE, 3, - MOVE_WHIRLPOOL, 3, - MOVE_OCTAZOOKA, 3, - MOVE_CLAMP, 3, - MOVE_WITHDRAW, 3, - MOVE_CRABHAMMER, 3, - MOVE_WATER_SPOUT, 3, + MOVE_BUBBLE, 3, + MOVE_WHIRLPOOL, 3, + MOVE_OCTAZOOKA, 3, + MOVE_CLAMP, 3, + MOVE_WITHDRAW, 3, + MOVE_CRABHAMMER, 3, + MOVE_WATER_SPOUT, 3, MOVE_DIVE, 3, - MOVE_WATERFALL, 3, - MOVE_MUDDY_WATER, 3, - MOVE_SURF, 3, - MOVE_HYDRO_CANNON, 3, - MOVE_HYDRO_PUMP, 3, - MOVE_BUBBLE_BEAM, 3, + MOVE_WATERFALL, 3, + MOVE_MUDDY_WATER, 3, + MOVE_SURF, 3, + MOVE_HYDRO_CANNON, 3, + MOVE_HYDRO_PUMP, 3, + MOVE_BUBBLE_BEAM, 3, MOVE_WATER_SPORT, 0, // Unnecessary, unlisted moves are already given 0 points MOVE_WATER_GUN, 3, - MOVE_WATER_PULSE, 3, - MOVE_WEATHER_BALL, 3, - MOVE_THUNDER, 3, - MOVE_SOLAR_BEAM, -4, - MOVE_OVERHEAT, -4, - MOVE_FLAME_WHEEL, -4, - MOVE_FLAMETHROWER, -4, + MOVE_WATER_PULSE, 3, + MOVE_WEATHER_BALL, 3, + MOVE_THUNDER, 3, + MOVE_SOLAR_BEAM, -4, + MOVE_OVERHEAT, -4, + MOVE_FLAME_WHEEL, -4, + MOVE_FLAMETHROWER, -4, MOVE_SACRED_FIRE, -4, - MOVE_FIRE_BLAST, -4, - MOVE_HEAT_WAVE, -4, - MOVE_EMBER, -4, - MOVE_BLAST_BURN, -4, - MOVE_BLAZE_KICK, -4, - MOVE_ERUPTION, -4, - MOVE_FIRE_SPIN, -4, + MOVE_FIRE_BLAST, -4, + MOVE_HEAT_WAVE, -4, + MOVE_EMBER, -4, + MOVE_BLAST_BURN, -4, + MOVE_BLAZE_KICK, -4, + MOVE_ERUPTION, -4, + MOVE_FIRE_SPIN, -4, MOVE_FIRE_PUNCH, -4, MOVE_SOLAR_BEAM, -4, // Repeated TABLE_END, 0 }; static const u16 sPoints_SunMoves[] = { - MOVE_OVERHEAT, 3, - MOVE_FLAME_WHEEL, 3, - MOVE_FLAMETHROWER, 3, - MOVE_SACRED_FIRE, 3, - MOVE_FIRE_BLAST, 3, - MOVE_HEAT_WAVE, 3, - MOVE_EMBER, 3, + MOVE_OVERHEAT, 3, + MOVE_FLAME_WHEEL, 3, + MOVE_FLAMETHROWER, 3, + MOVE_SACRED_FIRE, 3, + MOVE_FIRE_BLAST, 3, + MOVE_HEAT_WAVE, 3, + MOVE_EMBER, 3, MOVE_BLAST_BURN, 3, - MOVE_BLAZE_KICK, 3, - MOVE_ERUPTION, 3, - MOVE_FIRE_SPIN, 3, - MOVE_FIRE_PUNCH, 3, - MOVE_SOLAR_BEAM, 5, - MOVE_SYNTHESIS, 3, - MOVE_MORNING_SUN, 3, + MOVE_BLAZE_KICK, 3, + MOVE_ERUPTION, 3, + MOVE_FIRE_SPIN, 3, + MOVE_FIRE_PUNCH, 3, + MOVE_SOLAR_BEAM, 5, + MOVE_SYNTHESIS, 3, + MOVE_MORNING_SUN, 3, MOVE_MOONLIGHT, 3, - MOVE_WEATHER_BALL, 3, + MOVE_WEATHER_BALL, 3, TABLE_END, 0 }; static const u16 sPoints_SandstormMoves[] = { - MOVE_WEATHER_BALL, 3, - MOVE_SOLAR_BEAM, -3, + MOVE_WEATHER_BALL, 3, + MOVE_SOLAR_BEAM, -3, TABLE_END, 0 }; static const u16 sPoints_HailMoves[] = { - MOVE_WEATHER_BALL, 3, - MOVE_SOLAR_BEAM, -3, + MOVE_WEATHER_BALL, 3, + MOVE_SOLAR_BEAM, -3, TABLE_END, 0 }; static const u16 sPoints_ElectricMoves[] = { - MOVE_THUNDERBOLT, 3, - MOVE_THUNDER_PUNCH, 3, - MOVE_SPARK, 3, - MOVE_THUNDER_SHOCK, 3, - MOVE_ZAP_CANNON, 3, - MOVE_SHOCK_WAVE, 3, + MOVE_THUNDERBOLT, 3, + MOVE_THUNDER_PUNCH, 3, + MOVE_SPARK, 3, + MOVE_THUNDER_SHOCK, 3, + MOVE_ZAP_CANNON, 3, + MOVE_SHOCK_WAVE, 3, MOVE_THUNDER_WAVE, 0, // Unnecessary, unlisted moves are already given 0 points MOVE_THUNDER, 3, - MOVE_VOLT_TACKLE, 3, + MOVE_VOLT_TACKLE, 3, TABLE_END, 0 }; static const u16 sPoints_StatusDmg[] = @@ -407,7 +407,7 @@ static const u16 sPoints_StatusDmg[] = 3, // Leech Seed 3, // Poison 3, // Toxic - 3, // Burn + 3, // Burn 3, // Nightmare 3 // Wrap (Trapping move) }; @@ -434,62 +434,62 @@ static const u16 sPoints_Flinched[] = { 4 }; static const u16 sPoints_StatIncrease1[NUM_BATTLE_STATS - 1] = { - [STAT_ATK - 1] = 2, - [STAT_DEF - 1] = 2, - [STAT_SPEED - 1] = 2, - [STAT_SPATK - 1] = 2, - [STAT_SPDEF - 1] = 2, - [STAT_ACC - 1] = 2, + [STAT_ATK - 1] = 2, + [STAT_DEF - 1] = 2, + [STAT_SPEED - 1] = 2, + [STAT_SPATK - 1] = 2, + [STAT_SPDEF - 1] = 2, + [STAT_ACC - 1] = 2, [STAT_EVASION - 1] = 2 }; static const u16 sPoints_StatIncrease2[NUM_BATTLE_STATS - 1] = { - [STAT_ATK - 1] = 4, - [STAT_DEF - 1] = 4, - [STAT_SPEED - 1] = 4, - [STAT_SPATK - 1] = 4, - [STAT_SPDEF - 1] = 4, - [STAT_ACC - 1] = 4, + [STAT_ATK - 1] = 4, + [STAT_DEF - 1] = 4, + [STAT_SPEED - 1] = 4, + [STAT_SPATK - 1] = 4, + [STAT_SPDEF - 1] = 4, + [STAT_ACC - 1] = 4, [STAT_EVASION - 1] = 4 }; static const u16 sPoints_StatDecreaseSelf[NUM_BATTLE_STATS - 1] = { - [STAT_ATK - 1] = -1, - [STAT_DEF - 1] = -1, - [STAT_SPEED - 1] = -1, - [STAT_SPATK - 1] = -1, - [STAT_SPDEF - 1] = -1, - [STAT_ACC - 1] = -1, + [STAT_ATK - 1] = -1, + [STAT_DEF - 1] = -1, + [STAT_SPEED - 1] = -1, + [STAT_SPATK - 1] = -1, + [STAT_SPDEF - 1] = -1, + [STAT_ACC - 1] = -1, [STAT_EVASION - 1] = -1 }; static const u16 sPoints_StatDecrease1[NUM_BATTLE_STATS - 1] = { - [STAT_ATK - 1] = 2, - [STAT_DEF - 1] = 2, - [STAT_SPEED - 1] = 2, - [STAT_SPATK - 1] = 2, - [STAT_SPDEF - 1] = 2, - [STAT_ACC - 1] = 2, + [STAT_ATK - 1] = 2, + [STAT_DEF - 1] = 2, + [STAT_SPEED - 1] = 2, + [STAT_SPATK - 1] = 2, + [STAT_SPDEF - 1] = 2, + [STAT_ACC - 1] = 2, [STAT_EVASION - 1] = 2 }; static const u16 sPoints_StatDecrease2[NUM_BATTLE_STATS - 1] = { - [STAT_ATK - 1] = 4, - [STAT_DEF - 1] = 4, - [STAT_SPEED - 1] = 4, - [STAT_SPATK - 1] = 4, - [STAT_SPDEF - 1] = 4, - [STAT_ACC - 1] = 4, + [STAT_ATK - 1] = 4, + [STAT_DEF - 1] = 4, + [STAT_SPEED - 1] = 4, + [STAT_SPATK - 1] = 4, + [STAT_SPDEF - 1] = 4, + [STAT_ACC - 1] = 4, [STAT_EVASION - 1] = 4 }; static const u16 sPoints_StatIncreaseNotSelf[NUM_BATTLE_STATS - 1] = { - [STAT_ATK - 1] = -2, - [STAT_DEF - 1] = -2, - [STAT_SPEED - 1] = -2, + [STAT_ATK - 1] = -2, + [STAT_DEF - 1] = -2, + [STAT_SPEED - 1] = -2, [STAT_SPATK - 1] = -2, - [STAT_SPDEF - 1] = -2, - [STAT_ACC - 1] = -2, + [STAT_SPDEF - 1] = -2, + [STAT_ACC - 1] = -2, [STAT_EVASION - 1] = -2 }; diff --git a/src/battle_util.c b/src/battle_util.c index cbcd445b7e..9af4564491 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3458,7 +3458,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) break; // copy/paste again, smh case HOLD_EFFECT_ATTACK_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam + if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_ATK] < MAX_STAT_STAGE) { PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK); @@ -3473,7 +3473,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } break; case HOLD_EFFECT_DEFENSE_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn + if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_DEF] < MAX_STAT_STAGE) { PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_DEF); @@ -3487,7 +3487,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } break; case HOLD_EFFECT_SPEED_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn + if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_SPEED] < MAX_STAT_STAGE) { PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPEED); @@ -3501,7 +3501,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } break; case HOLD_EFFECT_SP_ATTACK_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn + if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_SPATK] < MAX_STAT_STAGE) { PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK); @@ -3515,7 +3515,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } break; case HOLD_EFFECT_SP_DEFENSE_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn + if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_SPDEF] < MAX_STAT_STAGE) { PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPDEF); @@ -3529,7 +3529,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } break; case HOLD_EFFECT_CRITICAL_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn + if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && !(gBattleMons[battlerId].status2 & STATUS2_FOCUS_ENERGY)) { gBattleMons[battlerId].status2 |= STATUS2_FOCUS_ENERGY; diff --git a/src/berry_blender.c b/src/berry_blender.c index 8e8d392db5..aa9bf2f87b 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -402,17 +402,17 @@ static const struct WindowTemplate sYesNoWindowTemplate_ContinuePlaying = static const s8 sPlayerArrowQuadrant[BLENDER_MAX_PLAYERS][2] = { - {-1, -1}, - { 1, -1}, - {-1, 1}, + {-1, -1}, + { 1, -1}, + {-1, 1}, { 1, 1} }; static const u8 sPlayerArrowPos[BLENDER_MAX_PLAYERS][2] = { - { 72, 32}, - {168, 32}, - { 72, 128}, + { 72, 32}, + {168, 32}, + { 72, 128}, {168, 128} }; @@ -427,16 +427,16 @@ static const u8 sPlayerIdMap[BLENDER_MAX_PLAYERS - 1][BLENDER_MAX_PLAYERS] = // Blender arrow positions: // // 0x0000 (limit 0x10000) -// . . +// . . // . . // 0x4000 . . 0xC000 // . . // . . -// . . +// . . // 0x8000 -// +// static const u16 sArrowStartPos[] = { - 0, + 0, MAX_ARROW_POS / 4 * 3, // 0xC000 MAX_ARROW_POS / 4, // 0x4000 MAX_ARROW_POS / 4 * 2 // 0x8000 @@ -446,8 +446,8 @@ static const u8 sArrowHitRangeStart[BLENDER_MAX_PLAYERS] = {32, 224, 96, 160}; static const TaskFunc sLocalOpponentTasks[] = { - Task_HandleOpponent1, - Task_HandleOpponent2, + Task_HandleOpponent1, + Task_HandleOpponent2, Task_HandleOpponent3 }; @@ -873,7 +873,7 @@ static const u8 sOpponentBerrySets[NUM_NPC_BERRIES * 2][3] = {ITEM_TO_BERRY(ITEM_CHESTO_BERRY) - 1, ITEM_TO_BERRY(ITEM_CHERI_BERRY) - 1, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY) - 1}, // player chose Pecha Berry {ITEM_TO_BERRY(ITEM_PECHA_BERRY) - 1, ITEM_TO_BERRY(ITEM_CHESTO_BERRY) - 1, ITEM_TO_BERRY(ITEM_CHERI_BERRY) - 1}, // player chose Rawst Berry {ITEM_TO_BERRY(ITEM_RAWST_BERRY) - 1, ITEM_TO_BERRY(ITEM_PECHA_BERRY) - 1, ITEM_TO_BERRY(ITEM_CHESTO_BERRY) - 1}, // player chose Aspear Berry - + // These sets are used if the player chose a different berry (set is selected by player's berry % 5) {ITEM_TO_BERRY(ITEM_CHERI_BERRY) - 1, ITEM_TO_BERRY(ITEM_PECHA_BERRY) - 1, ITEM_TO_BERRY(ITEM_RAWST_BERRY) - 1}, // player chose Leppa, Figy, ... {ITEM_TO_BERRY(ITEM_CHESTO_BERRY) - 1, ITEM_TO_BERRY(ITEM_RAWST_BERRY) - 1, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY) - 1}, // player chose Oran, Wiki, ... @@ -885,14 +885,14 @@ static const u8 sOpponentBerrySets[NUM_NPC_BERRIES * 2][3] = // Berry master's berries follow the same rules as above, but instead of explicitly listing // the alternate sets if the player chooses one of these berries, it implicitly uses these berries - 5, i.e. Tamato - Nomel static const u8 sBerryMasterBerries[] = { - ITEM_TO_BERRY(ITEM_SPELON_BERRY) - 1, - ITEM_TO_BERRY(ITEM_PAMTRE_BERRY) - 1, - ITEM_TO_BERRY(ITEM_WATMEL_BERRY) - 1, - ITEM_TO_BERRY(ITEM_DURIN_BERRY) - 1, + ITEM_TO_BERRY(ITEM_SPELON_BERRY) - 1, + ITEM_TO_BERRY(ITEM_PAMTRE_BERRY) - 1, + ITEM_TO_BERRY(ITEM_WATMEL_BERRY) - 1, + ITEM_TO_BERRY(ITEM_DURIN_BERRY) - 1, ITEM_TO_BERRY(ITEM_BELUE_BERRY) - 1 }; -// "0 players" is link +// "0 players" is link static const u8 sNumPlayersToSpeedDivisor[] = {1, 1, 2, 3, 4}; // Black pokeblocks will use one of these random combinations of flavors @@ -1191,11 +1191,11 @@ static void SetBerrySpriteData(struct Sprite* sprite, s16 x, s16 y, s16 bounceSp static void CreateBerrySprite(u16 a0, u8 playerId) { u8 spriteId = CreateSpinningBerrySprite(a0 + FIRST_BERRY_INDEX - 10, 0, 80, playerId & 1); - SetBerrySpriteData(&gSprites[spriteId], - sBerrySpriteData[playerId][0], - sBerrySpriteData[playerId][1], - sBerrySpriteData[playerId][2], - sBerrySpriteData[playerId][3], + SetBerrySpriteData(&gSprites[spriteId], + sBerrySpriteData[playerId][0], + sBerrySpriteData[playerId][1], + sBerrySpriteData[playerId][2], + sBerrySpriteData[playerId][3], sBerrySpriteData[playerId][4]); } @@ -2135,12 +2135,12 @@ static void UpdateOpponentScores(void) // BUG: Should be [i][BLENDER_COMM_SCORE] below, not [BLENDER_COMM_SCORE][i] // As a result the music tempo updates if any player misses, but only if 1 specific player hits #ifdef BUGFIX - if (gRecvCmds[i][BLENDER_COMM_SCORE] == LINKCMD_BLENDER_SCORE_MISS - || gRecvCmds[i][BLENDER_COMM_SCORE] == LINKCMD_BLENDER_SCORE_BEST + if (gRecvCmds[i][BLENDER_COMM_SCORE] == LINKCMD_BLENDER_SCORE_MISS + || gRecvCmds[i][BLENDER_COMM_SCORE] == LINKCMD_BLENDER_SCORE_BEST || gRecvCmds[i][BLENDER_COMM_SCORE] == LINKCMD_BLENDER_SCORE_GOOD) #else - if (gRecvCmds[i][BLENDER_COMM_SCORE] == LINKCMD_BLENDER_SCORE_MISS - || gRecvCmds[BLENDER_COMM_SCORE][i] == LINKCMD_BLENDER_SCORE_BEST + if (gRecvCmds[i][BLENDER_COMM_SCORE] == LINKCMD_BLENDER_SCORE_MISS + || gRecvCmds[BLENDER_COMM_SCORE][i] == LINKCMD_BLENDER_SCORE_BEST || gRecvCmds[BLENDER_COMM_SCORE][i] == LINKCMD_BLENDER_SCORE_GOOD) #endif { @@ -2204,7 +2204,7 @@ static void HandlePlayerInput(void) sBerryBlender->speed--; sBerryBlender->slowdownTimer = 0; } - + if (gEnableContestDebugging && JOY_NEW(L_BUTTON)) sBerryBlender->perfectOpponents ^= 1; } @@ -3030,10 +3030,10 @@ static void ProcessLinkPlayerCmds(void) sBerryBlender->playerContinueResponses[0] = LINKCMD_SEND_LINK_TYPE; } } - + // If player is link leader, check for responses to the "Continue playing" prompt (even if it's not up yet) - if (GetMultiplayerId() == 0 - && sBerryBlender->playerContinueResponses[0] != LINKCMD_BLENDER_STOP + if (GetMultiplayerId() == 0 + && sBerryBlender->playerContinueResponses[0] != LINKCMD_BLENDER_STOP && sBerryBlender->playerContinueResponses[0] != LINKCMD_SEND_LINK_TYPE) { u8 i; diff --git a/src/berry_crush.c b/src/berry_crush.c index 5504d05d6e..5c571778f0 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -171,7 +171,7 @@ enum { #define INPUT_FLAG_MASK ((1 << INPUT_FLAGS_PER_PLAYER) - 1) // Values for the inputState field -enum { +enum { INPUT_STATE_NONE, INPUT_STATE_HIT, // Hit the crusher INPUT_STATE_HIT_SYNC, // Hit the crusher at same time as another player @@ -241,7 +241,7 @@ struct BerryCrushGame_Results }; // playerIdsRanked above has 3 additional elements after the players. -// Only 1 of these 2*3 is ever used, and it stores the id for which +// Only 1 of these 2*3 is ever used, and it stores the id for which // random results page to show. Its define below is for readability. #define randomPageId playerIdsRanked[0][7] @@ -369,33 +369,33 @@ static u32 Cmd_Quit(struct BerryCrushGame *, u8 *); static EWRAM_DATA struct BerryCrushGame *sGame = NULL; -static const u8 sBitTable[] = { - 1 << 0, - 1 << 1, - 1 << 2, - 1 << 3, - 1 << 4, - 1 << 5, - 1 << 6, - 1 << 7 +static const u8 sBitTable[] = { + 1 << 0, + 1 << 1, + 1 << 2, + 1 << 3, + 1 << 4, + 1 << 5, + 1 << 6, + 1 << 7 }; // Additional A presses are counted depending on the number of players // The bonus of 5 is unobtainable static const u8 sSyncPressBonus[MAX_RFU_PLAYERS] = { 0, 1, 2, 3, 5 }; ALIGNED(4) -static const s8 sIntroOutroVibrationData[][7] = +static const s8 sIntroOutroVibrationData[][7] = { - { 4, 1, 0, -1, 0, 0, 0}, - { 4, 2, 0, -1, 0, 0, 0}, - { 4, 2, 0, -2, 0, 0, 0}, - { 6, 3, 1, -1, -3, -1, 0}, + { 4, 1, 0, -1, 0, 0, 0}, + { 4, 2, 0, -1, 0, 0, 0}, + { 4, 2, 0, -2, 0, 0, 0}, + { 6, 3, 1, -1, -3, -1, 0}, { 6, 4, 1, -2, -4, -2, 0}, }; ALIGNED(4) -static const u8 sVibrationData[MAX_RFU_PLAYERS][4] = +static const u8 sVibrationData[MAX_RFU_PLAYERS][4] = { - {3, 2, 1, 0}, + {3, 2, 1, 0}, {3, 3, 1, 0}, {3, 3, 2, 0}, {3, 4, 2, 0}, @@ -433,7 +433,7 @@ static const struct BgTemplate sBgTemplates[4] = .screenSize = 2, .paletteMode = 0, .priority = 1, - .baseTile = 0, + .baseTile = 0, }, { .bg = 2, @@ -442,7 +442,7 @@ static const struct BgTemplate sBgTemplates[4] = .screenSize = 0, .paletteMode = 0, .priority = 2, - .baseTile = 0, + .baseTile = 0, }, { .bg = 3, @@ -451,7 +451,7 @@ static const struct BgTemplate sBgTemplates[4] = .screenSize = 0, .paletteMode = 0, .priority = 3, - .baseTile = 0, + .baseTile = 0, }, }; @@ -468,11 +468,11 @@ static const u8 sTextColorTable[][3] = static const struct WindowTemplate sWindowTemplate_Rankings = { - .bg = 0, - .tilemapLeft = 3, - .tilemapTop = 4, - .width = 24, - .height = 13, + .bg = 0, + .tilemapLeft = 3, + .tilemapTop = 4, + .width = 24, + .height = 13, .paletteNum = 15, .baseBlock = 1 }; @@ -480,48 +480,48 @@ static const struct WindowTemplate sWindowTemplate_Rankings = static const struct WindowTemplate sWindowTemplates_PlayerNames[MAX_RFU_PLAYERS + 1] = { { - .bg = 0, - .tilemapLeft = 0, - .tilemapTop = 0, - .width = 9, - .height = 2, - .paletteNum = 8, + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 9, + .height = 2, + .paletteNum = 8, .baseBlock = 1005 }, { - .bg = 0, - .tilemapLeft = 0, - .tilemapTop = 3, - .width = 9, - .height = 2, - .paletteNum = 8, + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 3, + .width = 9, + .height = 2, + .paletteNum = 8, .baseBlock = 987 }, { - .bg = 0, - .tilemapLeft = 0, - .tilemapTop = 6, - .width = 9, - .height = 2, - .paletteNum = 8, + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 6, + .width = 9, + .height = 2, + .paletteNum = 8, .baseBlock = 969 }, { - .bg = 0, - .tilemapLeft = 21, - .tilemapTop = 3, - .width = 9, - .height = 2, - .paletteNum = 8, + .bg = 0, + .tilemapLeft = 21, + .tilemapTop = 3, + .width = 9, + .height = 2, + .paletteNum = 8, .baseBlock = 951 }, { - .bg = 0, - .tilemapLeft = 21, - .tilemapTop = 6, - .width = 9, - .height = 2, - .paletteNum = 8, + .bg = 0, + .tilemapLeft = 21, + .tilemapTop = 6, + .width = 9, + .height = 2, + .paletteNum = 8, .baseBlock = 933 }, DUMMY_WIN_TEMPLATE, @@ -530,30 +530,30 @@ static const struct WindowTemplate sWindowTemplates_PlayerNames[MAX_RFU_PLAYERS static const struct WindowTemplate sWindowTemplates_Results[] = { [STATE_RESULTS_PRESSES - RESULTS_STATE_START] = { - .bg = 0, - .tilemapLeft = 5, - .tilemapTop = 2, - .width = 20, - .height = 16, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 5, + .tilemapTop = 2, + .width = 20, + .height = 16, + .paletteNum = 15, .baseBlock = 1 }, [STATE_RESULTS_RANDOM - RESULTS_STATE_START] = { - .bg = 0, - .tilemapLeft = 5, - .tilemapTop = 2, - .width = 20, - .height = 16, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 5, + .tilemapTop = 2, + .width = 20, + .height = 16, + .paletteNum = 15, .baseBlock = 1 }, [STATE_RESULTS_CRUSHING - RESULTS_STATE_START] = { - .bg = 0, - .tilemapLeft = 4, - .tilemapTop = 2, - .width = 22, - .height = 16, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 4, + .tilemapTop = 2, + .width = 22, + .height = 16, + .paletteNum = 15, .baseBlock = 1 }, DUMMY_WIN_TEMPLATE, @@ -567,7 +567,7 @@ static const u8 sResultsWindowHeights[][MAX_RFU_PLAYERS - 1] = {12, 14, 15, 16}, // "Crushing" page }; -static const u32 sPressingSpeedConversionTable[] = +static const u32 sPressingSpeedConversionTable[] = { 50000000, // 50 25000000, // 25 @@ -590,9 +590,9 @@ static const u8 sCrusherTop_Tilemap[] = INCBIN_U8("graphics/berry_crush/crushe static const u8 sContainerCap_Tilemap[] = INCBIN_U8("graphics/berry_crush/container_cap.bin.lz"); static const u8 sBg_Tilemap[] = INCBIN_U8("graphics/berry_crush/bg.bin.lz"); -// Takes the number of players - 2 and a player id and returns the +// Takes the number of players - 2 and a player id and returns the // index into sPlayerCoords where that player should be seated -static const u8 sPlayerIdToPosId[MAX_RFU_PLAYERS - 1][MAX_RFU_PLAYERS] = +static const u8 sPlayerIdToPosId[MAX_RFU_PLAYERS - 1][MAX_RFU_PLAYERS] = { {1, 3}, {0, 1, 3}, @@ -672,18 +672,18 @@ static const s8 sSparkleCoords[][2] = { 40, -16}, }; -static const u16 sPlayerBerrySpriteTags[MAX_RFU_PLAYERS] = +static const u16 sPlayerBerrySpriteTags[MAX_RFU_PLAYERS] = { - TAG_PLAYER1_BERRY, - TAG_PLAYER2_BERRY, - TAG_PLAYER3_BERRY, - TAG_PLAYER4_BERRY, + TAG_PLAYER1_BERRY, + TAG_PLAYER2_BERRY, + TAG_PLAYER3_BERRY, + TAG_PLAYER4_BERRY, TAG_PLAYER5_BERRY }; // sTimerDigits_Gfx is part of this array but is (apparently) uncompressed // It gets cast to raw uncompressed data when used in sDigitObjTemplates -static const struct CompressedSpriteSheet sSpriteSheets[] = +static const struct CompressedSpriteSheet sSpriteSheets[] = { { .data = sCrusherBase_Gfx, .size = 0x800, .tag = TAG_CRUSHER_BASE }, { .data = sImpact_Gfx, .size = 0xE00, .tag = GFXTAG_IMPACT }, @@ -727,23 +727,23 @@ static const union AnimCmd sAnim_Impact_Big[] = static const union AnimCmd sAnim_Sparkle_Small[] = { ANIMCMD_FRAME(0, 2), - ANIMCMD_FRAME(4, 2), + ANIMCMD_FRAME(4, 2), ANIMCMD_FRAME(8, 2), ANIMCMD_FRAME(12, 2), - ANIMCMD_FRAME(16, 2), - ANIMCMD_FRAME(20, 2), + ANIMCMD_FRAME(16, 2), + ANIMCMD_FRAME(20, 2), ANIMCMD_JUMP(0) }; static const union AnimCmd sAnim_Sparkle_Big[] = { - ANIMCMD_FRAME(24, 4), - ANIMCMD_FRAME(28, 4), - ANIMCMD_FRAME(32, 4), + ANIMCMD_FRAME(24, 4), + ANIMCMD_FRAME(28, 4), + ANIMCMD_FRAME(32, 4), ANIMCMD_FRAME(36, 4), - ANIMCMD_FRAME(40, 4), - ANIMCMD_FRAME(44, 4), - ANIMCMD_FRAME(48, 4), + ANIMCMD_FRAME(40, 4), + ANIMCMD_FRAME(44, 4), + ANIMCMD_FRAME(48, 4), ANIMCMD_FRAME(52, 4), ANIMCMD_JUMP(0) }; @@ -756,7 +756,7 @@ static const union AnimCmd sAnim_Timer[] = static const union AnimCmd sAnim_PlayerBerry[] = { - ANIMCMD_FRAME(0, 0), + ANIMCMD_FRAME(0, 0), ANIMCMD_END }; @@ -810,68 +810,68 @@ static const union AffineAnimCmd *const sAffineAnims_PlayerBerry[] = static const struct SpriteTemplate sSpriteTemplate_CrusherBase = { - .tileTag = TAG_CRUSHER_BASE, - .paletteTag = TAG_CRUSHER_BASE, - .oam = &gOamData_AffineOff_ObjNormal_64x64, - .anims = sAnims_CrusherBase, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = TAG_CRUSHER_BASE, + .paletteTag = TAG_CRUSHER_BASE, + .oam = &gOamData_AffineOff_ObjNormal_64x64, + .anims = sAnims_CrusherBase, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_Impact = { .tileTag = GFXTAG_IMPACT, - .paletteTag = PALTAG_EFFECT, - .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = sAnims_Impact, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .paletteTag = PALTAG_EFFECT, + .oam = &gOamData_AffineOff_ObjNormal_32x32, + .anims = sAnims_Impact, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_Impact }; static const struct SpriteTemplate sSpriteTemplate_Sparkle = { - .tileTag = GFXTAG_SPARKLE, - .paletteTag = PALTAG_EFFECT, - .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = sAnims_Sparkle, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = GFXTAG_SPARKLE, + .paletteTag = PALTAG_EFFECT, + .oam = &gOamData_AffineOff_ObjNormal_16x16, + .anims = sAnims_Sparkle, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_Timer = { - .tileTag = TAG_TIMER_DIGITS, - .paletteTag = TAG_TIMER_DIGITS, - .oam = &gOamData_AffineOff_ObjNormal_8x16, - .anims = sAnims_Timer, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = TAG_TIMER_DIGITS, + .paletteTag = TAG_TIMER_DIGITS, + .oam = &gOamData_AffineOff_ObjNormal_8x16, + .anims = sAnims_Timer, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_PlayerBerry = { - .tileTag = TAG_PLAYER1_BERRY, - .paletteTag = TAG_PLAYER1_BERRY, - .oam = &gOamData_AffineDouble_ObjNormal_32x32, - .anims = sAnims_PlayerBerry, - .images = NULL, - .affineAnims = sAffineAnims_PlayerBerry, + .tileTag = TAG_PLAYER1_BERRY, + .paletteTag = TAG_PLAYER1_BERRY, + .oam = &gOamData_AffineDouble_ObjNormal_32x32, + .anims = sAnims_PlayerBerry, + .images = NULL, + .affineAnims = sAffineAnims_PlayerBerry, .callback = SpriteCallbackDummy }; -static const struct DigitObjUtilTemplate sDigitObjTemplates[] = +static const struct DigitObjUtilTemplate sDigitObjTemplates[] = { { // Minutes .strConvMode = 1, .shape = 2, .size = 0, .priority = 0, - .oamCount = 2, - .xDelta = 8, + .oamCount = 2, + .xDelta = 8, .x = 156, .y = 0, .spriteSheet = (void*) &sSpriteSheets[3], @@ -882,8 +882,8 @@ static const struct DigitObjUtilTemplate sDigitObjTemplates[] = .shape = 2, .size = 0, .priority = 0, - .oamCount = 2, - .xDelta = 8, + .oamCount = 2, + .xDelta = 8, .x = 180, .y = 0, .spriteSheet = (void*) &sSpriteSheets[3], @@ -894,8 +894,8 @@ static const struct DigitObjUtilTemplate sDigitObjTemplates[] = .shape = 2, .size = 0, .priority = 0, - .oamCount = 2, - .xDelta = 8, + .oamCount = 2, + .xDelta = 8, .x = 204, .y = 0, .spriteSheet = (void*) &sSpriteSheets[3], @@ -944,7 +944,7 @@ static u32 (*const sBerryCrushCommands[])(struct BerryCrushGame * game, u8 * dat [CMD_QUIT] = Cmd_Quit, }; -// Per group size, the number of A presses required to increase the number of sparkles. +// Per group size, the number of A presses required to increase the number of sparkles. static const u8 sSparkleThresholds[MAX_RFU_PLAYERS - 1][4] = { {2, 4, 6, 7}, // 2 players @@ -1472,7 +1472,7 @@ static void UpdateInputEffects(struct BerryCrushGame *game, struct BerryCrushGam numPlayersPressed = 0; linkState = (struct BerryCrushGame_LinkState *)game->recvCmd; - + // Read inputs and update impact effects for (i = 0; i < game->playerCount; i++) { @@ -1698,13 +1698,13 @@ static void PrintCrushingResults(struct BerryCrushGame *game) StringExpandPlaceholders(gStringVar4, gText_StrVar1); x -= GetStringWidth(2, gStringVar4, -1); AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); - + // Print pressing speed text y += 14; AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_PressingSpeed); x = 176 - (u8)GetStringWidth(2, gText_TimesPerSec, -1); AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec); - + // Print pressing speed value for (i = 0; i < 8; i++) if (((u8)game->pressingSpeed >> (7 - i)) & 1) @@ -1802,7 +1802,7 @@ static void Task_ShowRankings(u8 taskId) u8 i = 0, j, xPos, yPos; u32 score = 0; s16 *data = gTasks[taskId].data; - + switch (tState) { case 0: @@ -1818,7 +1818,7 @@ static void Task_ShowRankings(u8 taskId) AddTextPrinterParameterized3(tWindowId, 1, xPos, 1, sTextColorTable[COLORID_BLUE], 0, gText_BerryCrush2); xPos = 96 - GetStringWidth(1, gText_PressingSpeedRankings, -1) / 2u; AddTextPrinterParameterized3(tWindowId, 1, xPos, 17, sTextColorTable[COLORID_BLUE], 0, gText_PressingSpeedRankings); - + // Print pressing speed record for each group size, ranked yPos = 41; for (i = 0; i < MAX_RFU_PLAYERS - 1; i++) @@ -1977,7 +1977,7 @@ static void CreateGameSprites(struct BerryCrushGame *game) for (i = 0; i < ARRAY_COUNT(sSpriteSheets) - 1; i++) LoadCompressedSpriteSheet(&sSpriteSheets[i]); LoadSpritePalettes(sSpritePals); - + // Create sprite for crusher base spriteId = CreateSprite(&sSpriteTemplate_CrusherBase, 120, 88, 5); game->gfx.coreSprite = &gSprites[spriteId]; @@ -2372,7 +2372,7 @@ static u32 Cmd_WaitForOthersToPickBerries(struct BerryCrushGame *game, u8 *args) case 2: if (!IsLinkTaskFinished()) return 0; - + // Send player's chosen berry to partners memset(game->sendCmd, 0, sizeof(game->sendCmd)); game->sendCmd[0] = game->players[game->localId].berryId; @@ -2563,13 +2563,13 @@ static void HandlePartnerInput(struct BerryCrushGame *game) for (i = 0; i < game->playerCount; i++) { linkState = (struct BerryCrushGame_LinkState *)gRecvCmds[i]; - + // Skip player if we have not received a packet from them if ((linkState->rfuCmd & 0xFF00) != RFUCMD_SEND_PACKET) continue; if (linkState->sendFlag != SEND_GAME_STATE) continue; - + if (linkState->pushedAButton) { game->localState.playerPressedAFlags |= sBitTable[i]; @@ -2577,10 +2577,10 @@ static void HandlePartnerInput(struct BerryCrushGame *game) game->players[i].numAPresses++; numPlayersPressed++; timeDiff = game->timer - game->players[i].inputTime; - + // If the interval between inputs is regular, the input is considered "neat" // This counts toward the player's neatness score - if (timeDiff >= game->players[i].timeSincePrevInput - 1 + if (timeDiff >= game->players[i].timeSincePrevInput - 1 && timeDiff <= game->players[i].timeSincePrevInput + 1) { // On neat input streak @@ -2595,7 +2595,7 @@ static void HandlePartnerInput(struct BerryCrushGame *game) game->players[i].neatInputStreak = 0; game->players[i].timeSincePrevInput = timeDiff; } - + game->players[i].inputTime = game->timer; game->players[i].inputFlags++; if (game->players[i].inputFlags > F_INPUT_HIT_B) @@ -2637,7 +2637,7 @@ static void HandlePartnerInput(struct BerryCrushGame *game) // Target number of A presses has been reached, game is complete game->newDepth = 32; - game->localState.endGame = TRUE; + game->localState.endGame = TRUE; } // Updates the crusher, input flags, and timer to send to group members @@ -2648,7 +2648,7 @@ static void UpdateLeaderGameState(struct BerryCrushGame *game) u16 flags = 0; u16 temp = 0; u8 i = 0; - + for (i = 0; i < game->playerCount; i++) { if (game->players[i].inputState != INPUT_STATE_NONE) @@ -2727,7 +2727,7 @@ static void HandlePlayerInput(struct BerryCrushGame *game) if (game->localId != 0 && !game->localState.pushedAButton) return; game->localState.sendFlag = SEND_GAME_STATE; - + // Every 30 frames, check whether the sparkles produced should be big, // depending on how many A presses there were in that time if (game->timer % 30 == 0) @@ -2744,7 +2744,7 @@ static void HandlePlayerInput(struct BerryCrushGame *game) game->bigSparkleCounter = 0; game->numBigSparkleChecks++; } - + // Every 15 frames, update the amount of sparkles that should be produced, // depending on how many A presses there were in that time (including the bonus) if (game->timer % 15 == 0) @@ -2787,7 +2787,7 @@ static void HandlePlayerInput(struct BerryCrushGame *game) game->cmdTimer = 0; } } - + } if (game->timer >= MAX_TIME) game->localState.endGame = TRUE; @@ -3056,14 +3056,14 @@ static u32 Cmd_TabulateResults(struct BerryCrushGame *game, u8 *args) game->results.playerIdsRanked[RESULTS_PAGE_RANDOM][i] = i; game->results.stats[RESULTS_PAGE_PRESSES][i] = game->players[i].numAPresses; game->results.totalAPresses += game->results.stats[RESULTS_PAGE_PRESSES][i]; - + // Calculate value for random second results page switch (game->results.randomPageId) { case RESULTS_PAGE_NEATNESS: if (game->players[i].numAPresses != 0) { - // Calculate percentage of inputs that were in largest "neat" streak + // Calculate percentage of inputs that were in largest "neat" streak // "Neat" inputs are those done at a regular interval temp1 = game->players[i].maxNeatInputStreak; temp1 = Q_24_8(temp1); @@ -3129,7 +3129,7 @@ static u32 Cmd_TabulateResults(struct BerryCrushGame *game, u8 *args) // Calculate player rankings for "Number of Presses" by sorting arrays if (game->results.stats[RESULTS_PAGE_PRESSES][j - 1] < game->results.stats[RESULTS_PAGE_PRESSES][j]) { - SWAP(game->results.stats[RESULTS_PAGE_PRESSES][j], + SWAP(game->results.stats[RESULTS_PAGE_PRESSES][j], game->results.stats[RESULTS_PAGE_PRESSES][j - 1], tempStat); SWAP(game->results.playerIdsRanked[RESULTS_PAGE_PRESSES][j], @@ -3139,7 +3139,7 @@ static u32 Cmd_TabulateResults(struct BerryCrushGame *game, u8 *args) // Calculate player rankings for random second results page by sorting arrays if (game->results.stats[RESULTS_PAGE_RANDOM][j - 1] < game->results.stats[RESULTS_PAGE_RANDOM][j]) { - SWAP(game->results.stats[RESULTS_PAGE_RANDOM][j], + SWAP(game->results.stats[RESULTS_PAGE_RANDOM][j], game->results.stats[RESULTS_PAGE_RANDOM][j - 1], tempStat); SWAP(game->results.playerIdsRanked[RESULTS_PAGE_RANDOM][j], @@ -3319,7 +3319,7 @@ static u32 Cmd_CommunicatePlayAgainResponses(struct BerryCrushGame *game, u8 *ar case 1: if (!IsLinkTaskFinished()) return 0; - + // Send player's Yes/No response to partners game->sendCmd[0] = game->playAgainState; game->recvCmd[0] = 0; diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 31caf79cc0..dc025c0a49 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -51,20 +51,20 @@ static const u8 sText_TransmissionFailureTryAgain[] = _("Transmission failure.\n static const struct BgTemplate sBerryFixBgTemplates[] = { { - .bg = 0, - .charBaseIndex = 0, - .mapBaseIndex = 30, - .screenSize = 0, - .paletteMode = 0, + .bg = 0, + .charBaseIndex = 0, + .mapBaseIndex = 30, + .screenSize = 0, + .paletteMode = 0, .priority = 0, .baseTile = 0 - }, + }, { - .bg = 1, - .charBaseIndex = 1, - .mapBaseIndex = 31, - .screenSize = 0, - .paletteMode = 0, + .bg = 1, + .charBaseIndex = 1, + .mapBaseIndex = 31, + .screenSize = 0, + .paletteMode = 0, .priority = 1, .baseTile = 0 } @@ -72,39 +72,39 @@ static const struct BgTemplate sBerryFixBgTemplates[] = { static const struct WindowTemplate sBerryFixWindowTemplates[] = { { - .bg = 0, - .tilemapLeft = 2, - .tilemapTop = 4, - .width = 26, - .height = 2, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 2, + .tilemapTop = 4, + .width = 26, + .height = 2, + .paletteNum = 15, .baseBlock = 1 }, { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 11, - .width = 28, - .height = 8, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 11, + .width = 28, + .height = 8, + .paletteNum = 15, .baseBlock = 53 }, { - .bg = 0, - .tilemapLeft = 0, - .tilemapTop = 8, - .width = 30, - .height = 2, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 8, + .width = 30, + .height = 2, + .paletteNum = 15, .baseBlock = 277 }, { - .bg = 0, - .tilemapLeft = 8, - .tilemapTop = 0, - .width = 14, - .height = 2, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 8, + .tilemapTop = 0, + .width = 14, + .height = 2, + .paletteNum = 15, .baseBlock = 337 }, DUMMY_WIN_TEMPLATE @@ -148,27 +148,27 @@ static const struct { gBerryFixGameboy_Gfx, gBerryFixGameboy_Tilemap, gBerryFixGameboy_Pal - }, + }, [SCENE_TURN_OFF_POWER] = { gBerryFixGameboyLogo_Gfx, gBerryFixGameboyLogo_Tilemap, gBerryFixGameboyLogo_Pal - }, + }, [SCENE_TRANSMITTING] = { gBerryFixGbaTransfer_Gfx, gBerryFixGbaTransfer_Tilemap, gBerryFixGbaTransfer_Pal - }, + }, [SCENE_FOLLOW_INSTRUCT] = { gBerryFixGbaTransferHighlight_Gfx, gBerryFixGbaTransferHighlight_Tilemap, gBerryFixGbaTransferHighlight_Pal - }, + }, [SCENE_TRANSMIT_FAILED] = { gBerryFixGbaTransferError_Gfx, gBerryFixGbaTransferError_Tilemap, gBerryFixGbaTransferError_Pal - }, + }, [SCENE_BEGIN] = { gBerryFixWindow_Gfx, gBerryFixWindow_Tilemap, @@ -242,22 +242,22 @@ static void BerryFix_Main(void) } else if (++sBerryFix->timer > 180) { - MultiBootStartMaster(&sBerryFix->mb, - gMultiBootProgram_BerryGlitchFix_Start + ROM_HEADER_SIZE, - (u32)(gMultiBootProgram_BerryGlitchFix_End - (gMultiBootProgram_BerryGlitchFix_Start + ROM_HEADER_SIZE)), - 4, + MultiBootStartMaster(&sBerryFix->mb, + gMultiBootProgram_BerryGlitchFix_Start + ROM_HEADER_SIZE, + (u32)(gMultiBootProgram_BerryGlitchFix_End - (gMultiBootProgram_BerryGlitchFix_Start + ROM_HEADER_SIZE)), + 4, 1); sBerryFix->state = MAINSTATE_TRANSMIT; } break; case MAINSTATE_TRANSMIT: - if (TryScene(SCENE_TRANSMITTING)) + if (TryScene(SCENE_TRANSMITTING)) { MultiBootMain(&sBerryFix->mb); - if (MultiBootCheckComplete(&sBerryFix->mb)) + if (MultiBootCheckComplete(&sBerryFix->mb)) sBerryFix->state = MAINSTATE_EXIT; - else if (!(sBerryFix->mb.client_bit & 2)) + else if (!(sBerryFix->mb.client_bit & 2)) sBerryFix->state = MAINSTATE_FAILED; } break; diff --git a/src/berry_powder.c b/src/berry_powder.c index 50d280f0a6..f77265412f 100755 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -62,66 +62,66 @@ static const u32 sUnknown[] = {0xFF, 0x00}; static const struct WindowTemplate sBerryPowderWindowTemplates[] = { { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 1, - .width = 28, - .height = 2, - .paletteNum = 13, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 28, + .height = 2, + .paletteNum = 13, .baseBlock = 19 }, { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 5, - .width = 28, - .height = 14, - .paletteNum = 13, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 5, + .width = 28, + .height = 14, + .paletteNum = 13, .baseBlock = 75 }, { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 5, - .width = 28, - .height = 7, - .paletteNum = 13, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 5, + .width = 28, + .height = 7, + .paletteNum = 13, .baseBlock = 75 }, { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 8, - .width = 19, - .height = 3, - .paletteNum = 13, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 8, + .width = 19, + .height = 3, + .paletteNum = 13, .baseBlock = 19 }, { - .bg = 0, - .tilemapLeft = 22, - .tilemapTop = 7, - .width = 6, - .height = 4, - .paletteNum = 13, + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 7, + .width = 6, + .height = 4, + .paletteNum = 13, .baseBlock = 76 }, { - .bg = 0, - .tilemapLeft = 4, - .tilemapTop = 6, - .width = 22, - .height = 5, - .paletteNum = 13, + .bg = 0, + .tilemapLeft = 4, + .tilemapTop = 6, + .width = 22, + .height = 5, + .paletteNum = 13, .baseBlock = 19 }, { - .bg = 0, - .tilemapLeft = 5, - .tilemapTop = 8, - .width = 19, - .height = 3, - .paletteNum = 13, + .bg = 0, + .tilemapLeft = 5, + .tilemapTop = 8, + .width = 19, + .height = 3, + .paletteNum = 13, .baseBlock = 19 }, }; diff --git a/src/bike.c b/src/bike.c index e97a5e04e4..39433522ec 100644 --- a/src/bike.c +++ b/src/bike.c @@ -962,7 +962,7 @@ bool8 IsBikingDisallowedByPlayer(void) bool8 IsPlayerNotUsingAcroBikeOnBumpySlope(void) { - if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_ACRO_BIKE) + if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_ACRO_BIKE) && MetatileBehavior_IsBumpySlope(gObjectEvents[gPlayerAvatar.objectEventId].currentMetatileBehavior)) return FALSE; else diff --git a/src/cable_car.c b/src/cable_car.c index 32d4325352..39154cd1d8 100644 --- a/src/cable_car.c +++ b/src/cable_car.c @@ -896,7 +896,7 @@ static void CreateCableCarSprites(void) gSprites[spriteId].oam.priority = 2; gSprites[spriteId].x2 = -gSprites[spriteId].centerToCornerVecX; gSprites[spriteId].y2 = -gSprites[spriteId].centerToCornerVecY; - + // Randomly choose which direction the NPC is going if (!GOING_DOWN) { @@ -1024,7 +1024,7 @@ static void DrawNextGroundSegmentGoingDown(void) sCableCar->groundSegmentXStart = (sCableCar->groundSegmentXStart + 2) % 32; sCableCar->groundTileIdx += 2; sGroundSegmentY_Down = sCableCar->groundSegmentYStart; - + // Draw next segment for (i = 0; i < ARRAY_COUNT(sCableCar->groundTileBuffer); i++) { diff --git a/src/cable_club.c b/src/cable_club.c index abe1d5d4dd..1b61023ec3 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -352,14 +352,14 @@ static void Task_LinkupExchangeDataWithLeader(u8 taskId) gSpecialVar_Result = ExchangeDataAndGetLinkupStatus(minPlayers, maxPlayers); if (gSpecialVar_Result == LINKUP_ONGOING) return; - if (gSpecialVar_Result == LINKUP_DIFF_SELECTIONS + if (gSpecialVar_Result == LINKUP_DIFF_SELECTIONS || gSpecialVar_Result == LINKUP_WRONG_NUM_PLAYERS) { SetCloseLinkCallback(); HideFieldMessageBox(); gTasks[taskId].func = Task_StopLinkup; } - else if (gSpecialVar_Result == LINKUP_PLAYER_NOT_READY + else if (gSpecialVar_Result == LINKUP_PLAYER_NOT_READY || gSpecialVar_Result == LINKUP_PARTNER_NOT_READY) { CloseLink(); @@ -407,7 +407,7 @@ static void Task_LinkupCheckStatusAfterConfirm(u8 taskId) HideFieldMessageBox(); gTasks[taskId].func = Task_StopLinkup; } - else if (gSpecialVar_Result == LINKUP_PLAYER_NOT_READY + else if (gSpecialVar_Result == LINKUP_PLAYER_NOT_READY || gSpecialVar_Result == LINKUP_PARTNER_NOT_READY) { CloseLink(); @@ -1023,9 +1023,9 @@ void CB2_ReturnFromCableClubBattle(void) void CleanupLinkRoomState(void) { - if (gSpecialVar_0x8004 == USING_SINGLE_BATTLE - || gSpecialVar_0x8004 == USING_DOUBLE_BATTLE - || gSpecialVar_0x8004 == USING_MULTI_BATTLE + if (gSpecialVar_0x8004 == USING_SINGLE_BATTLE + || gSpecialVar_0x8004 == USING_DOUBLE_BATTLE + || gSpecialVar_0x8004 == USING_MULTI_BATTLE || gSpecialVar_0x8004 == USING_BATTLE_TOWER) { LoadPlayerParty(); diff --git a/src/contest.c b/src/contest.c index 46fa0efedb..886f2b95dc 100644 --- a/src/contest.c +++ b/src/contest.c @@ -1103,10 +1103,10 @@ static void InitContestResources(void) eContestAI = (struct ContestAIInfo){}; *gContestResources->excitement = (struct ContestExcitement){}; memset(eContestGfxState, 0, CONTESTANT_COUNT * sizeof(struct ContestGraphicsState)); - + if (!(gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)) SortContestants(FALSE); - + for (i = 0; i < CONTESTANT_COUNT; i++) { eContestantStatus[i].nextTurnOrder = 0xFF; @@ -3342,9 +3342,9 @@ static bool8 DrawStatusSymbol(u8 contestant) u16 symbolOffset = 0; u8 contestantOffset = gContestantTurnOrder[contestant] * 5 + 2; - if (eContestantStatus[contestant].resistant - || eContestantStatus[contestant].immune - || eContestantStatus[contestant].jamSafetyCount != 0 + if (eContestantStatus[contestant].resistant + || eContestantStatus[contestant].immune + || eContestantStatus[contestant].jamSafetyCount != 0 || eContestantStatus[contestant].jamReduction != 0) symbolOffset = GetStatusSymbolTileOffset(STAT_SYMBOL_CIRCLE); else if (eContestantStatus[contestant].nervous) @@ -4336,7 +4336,7 @@ void SortContestants(bool8 useRanking) s32 j; for (j = i; j > v3; j--) gContestantTurnOrder[j] = gContestantTurnOrder[j - 1]; - + // Insert into the new spot. gContestantTurnOrder[v3] = i; break; @@ -4351,7 +4351,7 @@ void SortContestants(bool8 useRanking) } // Invert gContestantTurnOrder; above, it was a list of contestant IDs. Now it's a list of turn orderings. - // + // // For example, if contestant 3 had the first turn, then `gContestantTurnOrder[1] = 3`. The turn is the index, // the contestant is the data. After inverting the list, `gContestantTurnOrder[3] = 1`. The contestant is the index, // and the turn is the data. @@ -4386,7 +4386,7 @@ void SortContestants(bool8 useRanking) } // Randomize the order of contestants with tied rankings using Selection Sort. - // + // // Look through the array for tied ranks, and use randomOrdering to break the tie. // This ensures that contestants with the same rank will be randomly ordered. This // uses an in-place slection sort, which involves a lot of extra swapping. @@ -4762,13 +4762,13 @@ static void Task_ApplauseOverflowAnimation(u8 taskId) if (++gTasks[taskId].data[0] == 1) { gTasks[taskId].data[0] = 0; - + // Alternate between normal colors and white. if (gTasks[taskId].data[3] == 0) gTasks[taskId].data[4]++; else gTasks[taskId].data[4]--; - + BlendPalette(264 + gTasks[taskId].data[2] * 16, 1, gTasks[taskId].data[4], RGB_WHITE); // At the maximum or minimum blending, switch directions. @@ -5956,7 +5956,7 @@ static void ContestDebugPrintBitStrings(void) if (!gEnableContestDebugging) return; - + if (eContestDebugMode != CONTEST_DEBUG_MODE_PRINT_WINNER_FLAGS && eContestDebugMode != CONTEST_DEBUG_MODE_PRINT_LOSER_FLAGS) return; diff --git a/src/contest_ai.c b/src/contest_ai.c index 8fe339790a..7aeba828a6 100644 --- a/src/contest_ai.c +++ b/src/contest_ai.c @@ -1732,7 +1732,7 @@ static void ContestAICmd_if_user_doesnt_have_exciting_move(void) // BUG: This is checking if the user has a specific move, but when it's used in the AI script // they're checking for an effect. Checking for a specific effect would make more sense, -// but given that effects are normally read as a single byte and this reads 2 bytes, it +// but given that effects are normally read as a single byte and this reads 2 bytes, it // seems reading a move was intended and the AI script is using it incorrectly. // The fix below aligns the function with how it's used by the script, rather than the apparent // intention of its usage @@ -1750,7 +1750,7 @@ static void ContestAICmd_check_user_has_move(void) #else u16 move = gContestMons[eContestAI.contestantId].moves[i]; #endif - + if (move == targetMove) { hasMove = TRUE; diff --git a/src/contest_effect.c b/src/contest_effect.c index 1fe21daaba..864805a54f 100644 --- a/src/contest_effect.c +++ b/src/contest_effect.c @@ -68,9 +68,9 @@ bool8 AreMovesContestCombo(u16 lastMove, u16 nextMove) if (lastMoveComboStarterId == 0) return FALSE; - else if (lastMoveComboStarterId == nextMoveComboMoves[0] - || lastMoveComboStarterId == nextMoveComboMoves[1] - || lastMoveComboStarterId == nextMoveComboMoves[2] + else if (lastMoveComboStarterId == nextMoveComboMoves[0] + || lastMoveComboStarterId == nextMoveComboMoves[1] + || lastMoveComboStarterId == nextMoveComboMoves[2] || lastMoveComboStarterId == nextMoveComboMoves[3]) return gComboStarterLookupTable[lastMoveComboStarterId]; else diff --git a/src/contest_link.c b/src/contest_link.c index ae6975268f..42a3207216 100644 --- a/src/contest_link.c +++ b/src/contest_link.c @@ -61,7 +61,7 @@ void Task_LinkContest_Init(u8 taskId) for (i = 0; i < CONTESTANT_COUNT; i++) gBlockRecvBuffer[i][0] = 0xFF; - + gTasks[taskId].tState = 0; gTasks[taskId].func = Task_LinkContest_StartInitFlags; } @@ -99,7 +99,7 @@ bool32 LinkContest_TryLinkStandby(s16 *state) // Skip standby for RS cabled links if (gLinkContestFlags & LINK_CONTEST_FLAG_HAS_RS_PLAYER) return TRUE; - + switch (*state) { case 0: diff --git a/src/contest_link_util.c b/src/contest_link_util.c index 31ffb5fdb3..28dec19892 100644 --- a/src/contest_link_util.c +++ b/src/contest_link_util.c @@ -88,7 +88,7 @@ static void Task_LinkContest_SetUpContestEm(u8 taskId) for (i = 0; i < gNumLinkContestPlayers; i++) categories[i] = gTasks[taskId].data[i + 1]; - + // Ensure all players are doing the same category for (i = 0; i < gNumLinkContestPlayers && categories[0] == categories[i]; i++) ; @@ -100,7 +100,7 @@ static void Task_LinkContest_SetUpContestEm(u8 taskId) for (i = 0; i < gNumLinkContestPlayers; i++) leaderIds[i] = gTasks[taskId].data[i + 5]; - + // If < 4 players and player is leader, set AI contestants based on rank and game clear if (gNumLinkContestPlayers != CONTESTANT_COUNT && GetMultiplayerId() == 0) { @@ -113,7 +113,7 @@ static void Task_LinkContest_SetUpContestEm(u8 taskId) if (rank) rank--; - + gameCleared = TRUE; for (i = 0; i < gNumLinkContestPlayers; i++) { @@ -202,7 +202,7 @@ static void Task_LinkContest_CommunicateRngEm(u8 taskId) // Only the leader sends the RNG seed if (!IsLinkTaskFinished()) return; - + if (LinkContest_SendBlock(&gRngValue, sizeof(gRngValue)) == 1) gTasks[taskId].data[0]++; } @@ -321,7 +321,7 @@ static void Task_LinkContest_CommunicateAIMonsEm(u8 taskId) { if (!IsLinkTaskFinished()) return; - + if (LinkContest_SendBlock(&gContestMons[gNumLinkContestPlayers], (CONTESTANT_COUNT - gNumLinkContestPlayers) * sizeof(struct ContestPokemon)) == 1) gTasks[taskId].data[0]++; } diff --git a/src/contest_util.c b/src/contest_util.c index aae05d531d..66a666264c 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -1194,16 +1194,16 @@ static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId) for (i = 1; i < (int)ARRAY_COUNT(spriteTilePtrs); i++) spriteTilePtrs[i] = (void*)(gSprites[sprite->data[i - 1]].oam.tileNum * 32 + OBJ_VRAM0); - + for (i = 0; i < (int)ARRAY_COUNT(spriteTilePtrs); i++) CpuFill32(0, spriteTilePtrs[i], 0x400); - + dst = spriteTilePtrs[0]; CpuCopy32(src, dst, 0x20); CpuCopy32(src + 128, dst + 0x100, 0x20); CpuCopy32(src + 128, dst + 0x200, 0x20); CpuCopy32(src + 64, dst + 0x300, 0x20); - + for (i = 0; i < strWidth; i++) { dst = &spriteTilePtrs[(i + 1) / 8][((i + 1) % 8) * 32]; @@ -1236,7 +1236,7 @@ static void CreateResultsTextWindowSprites(void) LoadSpriteSheet(&sSpriteSheets_ResultsTextWindow[i]); LoadSpritePalette(&sSpritePalette_ResultsTextWindow); - + // Create sprites for the two window types, each made up of 4 sprites for (i = 0; i < (int)ARRAY_COUNT(sSpriteSheets_ResultsTextWindow); i++) { diff --git a/src/credits.c b/src/credits.c index 3ea51f743e..519cfe39e3 100644 --- a/src/credits.c +++ b/src/credits.c @@ -759,7 +759,7 @@ static void Task_UpdatePage(u8 taskId) for (i = 0; i < ENTRIES_PER_PAGE; i++) PrintCreditsText( sCreditsEntryPointerTable[gTasks[taskId].tCurrentPage][i]->text, - 5 + i * 16, + 5 + i * 16, sCreditsEntryPointerTable[gTasks[taskId].tCurrentPage][i]->isTitle); CopyWindowToVram(0, 2); @@ -911,9 +911,9 @@ static void Task_ShowMons(u8 taskId) case 2: if (sCreditsData->imgCounter == NUM_MON_SLIDES || gTasks[gTasks[taskId].tMainTaskId].func != Task_CreditsMain) break; - spriteId = CreateCreditsMonSprite(sCreditsData->monToShow[sCreditsData->currShownMon], - sMonSpritePos[sCreditsData->nextImgPos][0], - sMonSpritePos[sCreditsData->nextImgPos][1], + spriteId = CreateCreditsMonSprite(sCreditsData->monToShow[sCreditsData->currShownMon], + sMonSpritePos[sCreditsData->nextImgPos][0], + sMonSpritePos[sCreditsData->nextImgPos][1], sCreditsData->nextImgPos); if (sCreditsData->currShownMon < sCreditsData->numMonToShow - 1) { @@ -1532,7 +1532,7 @@ static u8 CreateCreditsMonSprite(u16 nationalDexNum, s16 x, s16 y, u16 position) static void SpriteCB_CreditsMonBg(struct Sprite *sprite) { - if (gSprites[sprite->sMonSpriteId].data[0] == 10 + if (gSprites[sprite->sMonSpriteId].data[0] == 10 || gIntroCredits_MovingSceneryState != INTROCRED_SCENERY_NORMAL) { DestroySprite(sprite); @@ -1554,7 +1554,7 @@ static void DeterminePokemonToShow(void) u16 page; u16 dexNum; u16 j; - + // Go through the Pokedex, and anything that has gotten caught we put into our massive array. // This basically packs all of the caught pokemon into the front of the array for (dexNum = 1, j = 0; dexNum < NATIONAL_DEX_COUNT; dexNum++) @@ -1584,7 +1584,7 @@ static void DeterminePokemonToShow(void) // Select a random mon, insert into array page = Random() % sCreditsData->numCaughtMon; sCreditsData->monToShow[j] = sCreditsData->caughtMonIds[page]; - + // Remove the select mon from the array, and condense array entries j++; sCreditsData->caughtMonIds[page] = 0; diff --git a/src/crt0.s b/src/crt0.s index 385e340a57..835522589c 100644 --- a/src/crt0.s +++ b/src/crt0.s @@ -52,7 +52,7 @@ GPIOPortReadEnable: @ 80000C8 .4byte gMoveNames .4byte gDecorations - .4byte 0x00001270 @ offsetof(struct SaveBlock1, flags) + .4byte 0x00001270 @ offsetof(struct SaveBlock1, flags) .4byte 0x0000139c @ offsetof(struct SaveBlock1, vars) .4byte 0x00000018 @ offsetof(struct SaveBlock2, pokedex) .4byte 0x00000988 @ offsetof(struct SaveBlock1, seen1) diff --git a/src/data/battle_frontier/apprentice.h b/src/data/battle_frontier/apprentice.h index 144129743e..c190ea09b5 100644 --- a/src/data/battle_frontier/apprentice.h +++ b/src/data/battle_frontier/apprentice.h @@ -934,18 +934,18 @@ static const bool8 sValidApprenticeMoves[MOVES_COUNT] = // WHICH_MOVE has max 5 occurrences, defined as NUM_WHICH_MOVE_QUESTIONS // WHICH_FIRST has max 1 occurrence, lead mon should only be chosen once // WHICH_SPEECH has max 1 occurrence, as the apprentice leaves after its asked -static const u8 sQuestionPossibilities[MAX_APPRENTICE_QUESTIONS] = +static const u8 sQuestionPossibilities[MAX_APPRENTICE_QUESTIONS] = { QUESTION_ID_WHAT_ITEM, - QUESTION_ID_WHAT_ITEM, - QUESTION_ID_WHAT_ITEM, + QUESTION_ID_WHAT_ITEM, + QUESTION_ID_WHAT_ITEM, QUESTION_ID_WHICH_MOVE, - QUESTION_ID_WHICH_MOVE, - QUESTION_ID_WHICH_MOVE, - QUESTION_ID_WHICH_MOVE, - QUESTION_ID_WHICH_MOVE, - QUESTION_ID_WHICH_FIRST, - QUESTION_ID_WIN_SPEECH + QUESTION_ID_WHICH_MOVE, + QUESTION_ID_WHICH_MOVE, + QUESTION_ID_WHICH_MOVE, + QUESTION_ID_WHICH_MOVE, + QUESTION_ID_WHICH_FIRST, + QUESTION_ID_WIN_SPEECH }; static void (* const sApprenticeFunctions[])(void) = diff --git a/src/data/battle_frontier/battle_frontier_exchange_corner.h b/src/data/battle_frontier/battle_frontier_exchange_corner.h index d29dbdc445..426285e92e 100644 --- a/src/data/battle_frontier/battle_frontier_exchange_corner.h +++ b/src/data/battle_frontier/battle_frontier_exchange_corner.h @@ -1,51 +1,51 @@ static const u16 sFrontierExchangeCorner_Decor1[] = -{ - DECOR_KISS_POSTER, - DECOR_KISS_CUSHION, - DECOR_SMOOCHUM_DOLL, - DECOR_TOGEPI_DOLL, - DECOR_MEOWTH_DOLL, - DECOR_CLEFAIRY_DOLL, - DECOR_DITTO_DOLL, - DECOR_CYNDAQUIL_DOLL, - DECOR_CHIKORITA_DOLL, - DECOR_TOTODILE_DOLL, - 0xFFFF +{ + DECOR_KISS_POSTER, + DECOR_KISS_CUSHION, + DECOR_SMOOCHUM_DOLL, + DECOR_TOGEPI_DOLL, + DECOR_MEOWTH_DOLL, + DECOR_CLEFAIRY_DOLL, + DECOR_DITTO_DOLL, + DECOR_CYNDAQUIL_DOLL, + DECOR_CHIKORITA_DOLL, + DECOR_TOTODILE_DOLL, + 0xFFFF }; static const u16 sFrontierExchangeCorner_Decor2[] = -{ - DECOR_LAPRAS_DOLL, - DECOR_SNORLAX_DOLL, - DECOR_VENUSAUR_DOLL, - DECOR_CHARIZARD_DOLL, - DECOR_BLASTOISE_DOLL, - 0xFFFF +{ + DECOR_LAPRAS_DOLL, + DECOR_SNORLAX_DOLL, + DECOR_VENUSAUR_DOLL, + DECOR_CHARIZARD_DOLL, + DECOR_BLASTOISE_DOLL, + 0xFFFF }; static const u16 sFrontierExchangeCorner_Vitamins[] = -{ - ITEM_PROTEIN, - ITEM_CALCIUM, - ITEM_IRON, - ITEM_ZINC, - ITEM_CARBOS, - ITEM_HP_UP, - 0xFFFF +{ + ITEM_PROTEIN, + ITEM_CALCIUM, + ITEM_IRON, + ITEM_ZINC, + ITEM_CARBOS, + ITEM_HP_UP, + 0xFFFF }; static const u16 sFrontierExchangeCorner_HoldItems[] = -{ - ITEM_LEFTOVERS, - ITEM_WHITE_HERB, - ITEM_QUICK_CLAW, - ITEM_MENTAL_HERB, - ITEM_BRIGHT_POWDER, - ITEM_CHOICE_BAND, - ITEM_KINGS_ROCK, - ITEM_FOCUS_BAND, - ITEM_SCOPE_LENS, - 0xFFFF +{ + ITEM_LEFTOVERS, + ITEM_WHITE_HERB, + ITEM_QUICK_CLAW, + ITEM_MENTAL_HERB, + ITEM_BRIGHT_POWDER, + ITEM_CHOICE_BAND, + ITEM_KINGS_ROCK, + ITEM_FOCUS_BAND, + ITEM_SCOPE_LENS, + 0xFFFF }; static const u8 *const sFrontierExchangeCorner_Decor1Descriptions[] = @@ -63,7 +63,7 @@ static const u8 *const sFrontierExchangeCorner_Decor1Descriptions[] = gText_Exit, }; -static const u8 *const sFrontierExchangeCorner_Decor2Descriptions[] = +static const u8 *const sFrontierExchangeCorner_Decor2Descriptions[] = { BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc, BattleFrontier_ExchangeServiceCorner_Text_LargeDollDesc, @@ -73,7 +73,7 @@ static const u8 *const sFrontierExchangeCorner_Decor2Descriptions[] = gText_Exit }; -static const u8 *const sFrontierExchangeCorner_VitaminsDescriptions[] = +static const u8 *const sFrontierExchangeCorner_VitaminsDescriptions[] = { BattleFrontier_ExchangeServiceCorner_Text_ProteinDesc, BattleFrontier_ExchangeServiceCorner_Text_CalciumDesc, @@ -84,7 +84,7 @@ static const u8 *const sFrontierExchangeCorner_VitaminsDescriptions[] = gText_Exit }; -static const u8 *const sFrontierExchangeCorner_HoldItemsDescriptions[] = +static const u8 *const sFrontierExchangeCorner_HoldItemsDescriptions[] = { BattleFrontier_ExchangeServiceCorner_Text_LeftoversDesc, BattleFrontier_ExchangeServiceCorner_Text_WhiteHerbDesc, diff --git a/src/data/battle_frontier/battle_frontier_trainer_mons.h b/src/data/battle_frontier/battle_frontier_trainer_mons.h index 183964f2d9..efd9ef84dd 100644 --- a/src/data/battle_frontier/battle_frontier_trainer_mons.h +++ b/src/data/battle_frontier/battle_frontier_trainer_mons.h @@ -343,7 +343,7 @@ FRONTIER_MON_SPINDA, \ FRONTIER_MON_CORSOLA, \ FRONTIER_MON_POLIWHIRL, \ - -1 + -1 #define FRONTIER_MONS_POKEFAN_M_1 \ FRONTIER_MON_SMOOCHUM, \ @@ -532,7 +532,7 @@ FRONTIER_MON_LEDIAN, \ FRONTIER_MON_ARIADOS, \ FRONTIER_MON_YANMA, \ - -1 + -1 #define FRONTIER_MONS_BUG_MANIAC_1 \ FRONTIER_MON_SHEDINJA, \ @@ -565,7 +565,7 @@ FRONTIER_MON_LEDIAN, \ FRONTIER_MON_ARIADOS, \ FRONTIER_MON_YANMA, \ - -1 + -1 #define FRONTIER_MONS_FISHERMAN_1 \ FRONTIER_MON_MAGIKARP, \ @@ -612,7 +612,7 @@ FRONTIER_MON_CORSOLA, \ FRONTIER_MON_MAWILE, \ FRONTIER_MON_ONIX, \ - -1 + -1 #define FRONTIER_MONS_PARASOL_LADY_1 \ FRONTIER_MON_SUNKERN, \ @@ -697,7 +697,7 @@ FRONTIER_MON_ELEKID, \ FRONTIER_MON_FLAAFFY, \ FRONTIER_MON_MAWILE, \ - -1 + -1 #define FRONTIER_MONS_BIRD_KEEPER_1 \ FRONTIER_MON_AZURILL, \ @@ -769,7 +769,7 @@ FRONTIER_MON_CORSOLA, \ FRONTIER_MON_POLIWHIRL, \ FRONTIER_MON_ONIX, \ - -1 + -1 #define FRONTIER_MONS_HIKER_1 \ FRONTIER_MON_TYROGUE, \ @@ -799,7 +799,7 @@ FRONTIER_MON_LOUDRED, \ FRONTIER_MON_NOSEPASS, \ FRONTIER_MON_ONIX, \ - -1 + -1 #define FRONTIER_MONS_KINDLER_1 \ FRONTIER_MON_SLUGMA, \ @@ -823,7 +823,7 @@ FRONTIER_MON_NOSEPASS, \ FRONTIER_MON_MAWILE, \ FRONTIER_MON_ONIX, \ - -1 + -1 #define FRONTIER_MONS_RUNNING_TRIATHLETE_1 \ FRONTIER_MON_AZURILL, \ @@ -870,7 +870,7 @@ FRONTIER_MON_LOUDRED, \ FRONTIER_MON_SPINDA, \ FRONTIER_MON_ONIX, \ - -1 + -1 #define FRONTIER_MONS_SWIMMING_TRIATHLETE_1 \ FRONTIER_MON_TYROGUE, \ @@ -905,7 +905,7 @@ FRONTIER_MON_SPINDA, \ FRONTIER_MON_CORSOLA, \ FRONTIER_MON_POLIWHIRL, \ - -1 + -1 #define FRONTIER_MONS_CYCLING_TRIATHLETE_1 \ FRONTIER_MON_PICHU, \ @@ -937,7 +937,7 @@ FRONTIER_MON_SPINDA, \ FRONTIER_MON_FLAAFFY, \ FRONTIER_MON_MAWILE, \ - -1 + -1 #define FRONTIER_MONS_RUNNING_TRIATHLETE_2 \ FRONTIER_MON_DELCATTY_1, \ @@ -974,7 +974,7 @@ FRONTIER_MON_STANTLER_1, \ FRONTIER_MON_PIDGEOT_1, \ FRONTIER_MON_SCYTHER_1, \ - -1 + -1 #define FRONTIER_MONS_SWIMMING_TRIATHLETE_2 \ FRONTIER_MON_WAILMER_1, \ @@ -1008,7 +1008,7 @@ FRONTIER_MON_POLIWRATH_1, \ FRONTIER_MON_POLITOED_1, \ FRONTIER_MON_CLOYSTER_1, \ - -1 + -1 #define FRONTIER_MONS_CYCLING_TRIATHLETE_2 \ FRONTIER_MON_DELCATTY_1, \ @@ -1042,7 +1042,7 @@ FRONTIER_MON_MAGNETON_1, \ FRONTIER_MON_STANTLER_1, \ FRONTIER_MON_PIDGEOT_1, \ - -1 + -1 #define FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_1 \ FRONTIER_MON_LICKITUNG_1, \ @@ -1085,7 +1085,7 @@ FRONTIER_MON_TORKOAL_1, \ FRONTIER_MON_CACTURNE_1, \ FRONTIER_MON_POLIWRATH_1, \ - -1 + -1 #define FRONTIER_MONS_EXPERT_1A \ FRONTIER_MON_DELCATTY_1, \ @@ -1126,7 +1126,7 @@ FRONTIER_MON_RATICATE_1, \ FRONTIER_MON_MASQUERAIN_1, \ FRONTIER_MON_FURRET_1, \ - -1 + -1 #define FRONTIER_MONS_EXPERT_1B \ FRONTIER_MON_DUNSPARCE_1, \ @@ -1166,7 +1166,7 @@ FRONTIER_MON_HITMONCHAN_1, \ FRONTIER_MON_GIRAFARIG_1, \ FRONTIER_MON_HITMONTOP_1, \ - -1 + -1 #define FRONTIER_MONS_EXPERT_1C \ FRONTIER_MON_BANETTE_1, \ @@ -1199,7 +1199,7 @@ FRONTIER_MON_PINSIR_1, \ FRONTIER_MON_POLITOED_1, \ FRONTIER_MON_CLOYSTER_1, \ - -1 + -1 #define FRONTIER_MONS_PSYCHIC_1 \ FRONTIER_MON_DELCATTY_2, \ @@ -1235,7 +1235,7 @@ FRONTIER_MON_CACTURNE_2, \ FRONTIER_MON_GOREBYSS_2, \ FRONTIER_MON_POLITOED_2, \ - -1 + -1 #define FRONTIER_MONS_HEX_MANIAC_1 \ FRONTIER_MON_SABLEYE_2, \ @@ -1265,7 +1265,7 @@ FRONTIER_MON_CRAWDAUNT_2, \ FRONTIER_MON_GRUMPIG_2, \ FRONTIER_MON_CACTURNE_2, \ - -1 + -1 #define FRONTIER_MONS_POKEMANIAC_1 \ FRONTIER_MON_LICKITUNG_2, \ @@ -1299,7 +1299,7 @@ FRONTIER_MON_MANTINE_2, \ FRONTIER_MON_SWALOT_2, \ FRONTIER_MON_TORKOAL_2, \ - -1 + -1 #define FRONTIER_MONS_GENTLEMAN_1A \ FRONTIER_MON_DELCATTY_2, \ @@ -1340,7 +1340,7 @@ FRONTIER_MON_RATICATE_2, \ FRONTIER_MON_MASQUERAIN_2, \ FRONTIER_MON_FURRET_2, \ - -1 + -1 #define FRONTIER_MONS_GENTLEMAN_1B \ FRONTIER_MON_DUNSPARCE_2, \ @@ -1380,7 +1380,7 @@ FRONTIER_MON_HITMONCHAN_2, \ FRONTIER_MON_GIRAFARIG_2, \ FRONTIER_MON_HITMONTOP_2, \ - -1 + -1 #define FRONTIER_MONS_BUG_MANIAC_2 \ FRONTIER_MON_LEDIAN, \ @@ -1402,7 +1402,7 @@ FRONTIER_MON_NINJASK_2, \ FRONTIER_MON_SCYTHER_2, \ FRONTIER_MON_PINSIR_2, \ - -1 + -1 #define FRONTIER_MONS_RUIN_MANIAC_2 \ FRONTIER_MON_GRAVELER_2, \ @@ -1427,7 +1427,7 @@ FRONTIER_MON_RELICANTH_2, \ FRONTIER_MON_OMASTAR_2, \ FRONTIER_MON_KABUTOPS_2, \ - -1 + -1 #define FRONTIER_MONS_COLLECTOR_1 \ FRONTIER_MON_BANETTE_2, \ @@ -1460,7 +1460,7 @@ FRONTIER_MON_PINSIR_2, \ FRONTIER_MON_POLITOED_2, \ FRONTIER_MON_CLOYSTER_2, \ - -1 + -1 #define FRONTIER_MONS_PARASOL_LADY_2 \ FRONTIER_MON_GLOOM_2, \ @@ -1475,7 +1475,7 @@ FRONTIER_MON_HUNTAIL_2, \ FRONTIER_MON_GOREBYSS_2, \ FRONTIER_MON_OMASTAR_2, \ - -1 + -1 #define FRONTIER_MONS_BEAUTY_1 \ FRONTIER_MON_DELCATTY_2, \ @@ -1509,7 +1509,7 @@ FRONTIER_MON_STANTLER_2, \ FRONTIER_MON_SWALOT_2, \ FRONTIER_MON_PIDGEOT_2, \ - -1 + -1 #define FRONTIER_MONS_AROMA_LADY_2 \ FRONTIER_MON_WEEPINBELL_2, \ @@ -1530,7 +1530,7 @@ FRONTIER_MON_GRUMPIG_2, \ FRONTIER_MON_CACTURNE_2, \ FRONTIER_MON_BELLOSSOM_2, \ - -1 + -1 #define FRONTIER_MONS_COOLTRAINER_1A \ FRONTIER_MON_DUGTRIO_1, \ @@ -1566,7 +1566,7 @@ FRONTIER_MON_GOLEM_1, \ FRONTIER_MON_RHYDON_1, \ FRONTIER_MON_ALAKAZAM_1, \ - -1 + -1 #define FRONTIER_MONS_COOLTRAINER_1B \ FRONTIER_MON_WEEZING_1, \ @@ -1602,7 +1602,7 @@ FRONTIER_MON_AERODACTYL_1, \ FRONTIER_MON_PORYGON2_1, \ FRONTIER_MON_GARDEVOIR_1, \ - -1 + -1 #define FRONTIER_MONS_COOLTRAINER_1C \ FRONTIER_MON_EXEGGUTOR_1, \ @@ -1635,7 +1635,7 @@ FRONTIER_MON_SALAMENCE_1, \ FRONTIER_MON_METAGROSS_1, \ FRONTIER_MON_SLAKING_1, \ - -1 + -1 #define FRONTIER_MONS_PKMN_RANGER_1 \ FRONTIER_MON_NINJASK_1, \ @@ -1767,7 +1767,7 @@ FRONTIER_MON_SALAMENCE_1, \ FRONTIER_MON_METAGROSS_1, \ FRONTIER_MON_SLAKING_1, \ - -1 + -1 #define FRONTIER_MONS_PKMN_BREEDER_F_1 \ FRONTIER_MON_DUGTRIO_1, \ @@ -1818,7 +1818,7 @@ FRONTIER_MON_ARMALDO_1, \ FRONTIER_MON_GOLDUCK_1, \ FRONTIER_MON_RAPIDASH_1, \ - -1 + -1 // Odd, all the other Youngster/Lass trainers of this group have Dugtrio, but one does not #define FRONTIER_MONS_YOUNGSTER_LASS_2_NO_DUGTRIO \ @@ -1854,7 +1854,7 @@ FRONTIER_MON_GOLEM_2, \ FRONTIER_MON_RHYDON_2, \ FRONTIER_MON_ALAKAZAM_2, \ - -1 + -1 #define FRONTIER_MONS_YOUNGSTER_LASS_2 \ FRONTIER_MON_DUGTRIO_2, \ @@ -1927,7 +1927,7 @@ FRONTIER_MON_SALAMENCE_2, \ FRONTIER_MON_METAGROSS_2, \ FRONTIER_MON_SLAKING_2, \ - -1 + -1 #define FRONTIER_MONS_BUG_CATCHER_2 \ FRONTIER_MON_NINJASK_2, \ @@ -1953,7 +1953,7 @@ FRONTIER_MON_VENUSAUR_2, \ FRONTIER_MON_MEGANIUM_2, \ FRONTIER_MON_SCEPTILE_2, \ - -1 + -1 #define FRONTIER_MONS_NINJA_BOY_2 \ FRONTIER_MON_PARASECT_2, \ @@ -1988,7 +1988,7 @@ FRONTIER_MON_VENUSAUR_2, \ FRONTIER_MON_ESPEON_2, \ FRONTIER_MON_CROBAT_2, \ - -1 + -1 #define FRONTIER_MONS_TUBER_2 \ FRONTIER_MON_QUAGSIRE_2, \ @@ -2068,7 +2068,7 @@ FRONTIER_MON_WAILORD_3, \ FRONTIER_MON_TENTACRUEL_3, \ FRONTIER_MON_STARMIE_3, \ - -1 + -1 #define FRONTIER_MONS_RUIN_MANIAC_3 \ FRONTIER_MON_DUGTRIO_3, \ @@ -2093,7 +2093,7 @@ FRONTIER_MON_AGGRON_3, \ FRONTIER_MON_SWAMPERT_3, \ FRONTIER_MON_METAGROSS_3, \ - -1 + -1 #define FRONTIER_MONS_COLLECTOR_2 \ FRONTIER_MON_DUGTRIO_3, \ @@ -2144,7 +2144,7 @@ FRONTIER_MON_ARMALDO_3, \ FRONTIER_MON_GOLDUCK_3, \ FRONTIER_MON_RAPIDASH_3, \ - -1 + -1 #define FRONTIER_MONS_GUITARIST_2 \ FRONTIER_MON_SABLEYE_2, \ @@ -2162,7 +2162,7 @@ FRONTIER_MON_HOUNDOOM_3, \ FRONTIER_MON_JOLTEON_3, \ FRONTIER_MON_UMBREON_3, \ - -1 + -1 #define FRONTIER_MONS_BIRD_KEEPER_2 \ FRONTIER_MON_MURKROW_2, \ @@ -2234,7 +2234,7 @@ FRONTIER_MON_AERODACTYL_3, \ FRONTIER_MON_AGGRON_3, \ FRONTIER_MON_BLAZIKEN_3, \ - -1 + -1 #define FRONTIER_MONS_KINDLER_2 \ FRONTIER_MON_GRANBULL_3, \ @@ -2256,7 +2256,7 @@ FRONTIER_MON_BLISSEY_3, \ FRONTIER_MON_ARCANINE_3, \ FRONTIER_MON_SLAKING_3, \ - -1 + -1 #define FRONTIER_MONS_GENTLEMAN_2 \ FRONTIER_MON_MUK_3, \ @@ -2307,7 +2307,7 @@ FRONTIER_MON_SALAMENCE_3, \ FRONTIER_MON_METAGROSS_3, \ FRONTIER_MON_SLAKING_3, \ - -1 + -1 #define FRONTIER_MONS_YOUNGSTER_LASS_3 \ FRONTIER_MON_DUGTRIO_4, \ @@ -2343,7 +2343,7 @@ FRONTIER_MON_GOLEM_4, \ FRONTIER_MON_RHYDON_4, \ FRONTIER_MON_ALAKAZAM_4, \ - -1 + -1 #define FRONTIER_MONS_CAMPER_PICNICKER_2 \ FRONTIER_MON_WEEZING_4, \ @@ -2417,7 +2417,7 @@ FRONTIER_MON_BLISSEY_4, \ FRONTIER_MON_MILOTIC_4, \ FRONTIER_MON_SLAKING_4, \ - -1 + -1 #define FRONTIER_MONS_SWIMMER_F_2 \ FRONTIER_MON_GRANBULL_4, \ @@ -3017,7 +3017,7 @@ FRONTIER_MON_MANECTRIC_4, \ FRONTIER_MON_VILEPLUME_4, \ FRONTIER_MON_VICTREEBEL_4, \ - -1 + -1 #define FRONTIER_MONS_COOLTRAINER_F_2B \ FRONTIER_MON_ELECTRODE_1, \ @@ -3418,7 +3418,7 @@ FRONTIER_MON_SALAMENCE_2, \ FRONTIER_MON_METAGROSS_2, \ FRONTIER_MON_SLAKING_2, \ - -1 + -1 // Similar to FRONTIER_MONS_GENERAL_C but _1 (would be identical if not for re-ordering) // Used by Pkmn Ranger, Running Triathlete, Cycling Triathlete @@ -4066,7 +4066,7 @@ FRONTIER_MON_TYRANITAR_8, \ FRONTIER_MON_TYRANITAR_9, \ FRONTIER_MON_TYRANITAR_10, \ - -1 + -1 // For this group, Expert M uses Tyranitar, Expert F uses Dragonite #define FRONTIER_MONS_EXPERT_2C(lastmon) \ @@ -4170,7 +4170,7 @@ FRONTIER_MON_##lastmon##_8, \ FRONTIER_MON_##lastmon##_9, \ FRONTIER_MON_##lastmon##_10,\ - -1 + -1 // The strong Psychic M/F trainers all use the below pokemon // Additionally they use 1 of 3 legendary trios, and Latios or Latias depending on gender @@ -4270,7 +4270,7 @@ FRONTIER_MON_ZAPDOS_6, \ FRONTIER_MON_MOLTRES_5, \ FRONTIER_MON_MOLTRES_6, \ - -1 + -1 #define FRONTIER_MONS_PSYCHIC_2B(lati) \ FRONTIER_MONS_PSYCHIC_2(lati, RAIKOU, ENTEI, SUICUNE) \ @@ -4284,7 +4284,7 @@ FRONTIER_MON_ENTEI_6, \ FRONTIER_MON_SUICUNE_5, \ FRONTIER_MON_SUICUNE_6, \ - -1 + -1 // Because the regis/latis are swapped here they cant all be merged into the same macro and match #define FRONTIER_MONS_PSYCHIC_2C(lati) \ @@ -4299,7 +4299,7 @@ FRONTIER_MON_##lati##_6, \ FRONTIER_MON_##lati##_7, \ FRONTIER_MON_##lati##_8, \ - -1 + -1 #define FRONTIER_MONS_HEX_MANIAC_2A \ FRONTIER_MON_SHARPEDO_2, \ @@ -4332,7 +4332,7 @@ FRONTIER_MON_GENGAR_6, \ FRONTIER_MON_GENGAR_7, \ FRONTIER_MON_GENGAR_8, \ - -1 + -1 #define FRONTIER_MONS_HEX_MANIAC_2B \ FRONTIER_MON_SEVIPER_2, \ @@ -4388,7 +4388,7 @@ FRONTIER_MON_GENGAR_6, \ FRONTIER_MON_GENGAR_7, \ FRONTIER_MON_GENGAR_8, \ - -1 + -1 #define FRONTIER_MONS_HEX_MANIAC_2C \ FRONTIER_MON_SEVIPER_2, \ @@ -4450,7 +4450,7 @@ FRONTIER_MON_GENGAR_6, \ FRONTIER_MON_GENGAR_7, \ FRONTIER_MON_GENGAR_8, \ - -1 + -1 // For whatever reason FRONTIER_MON_MAROWAK_2 is in a different order than _1 _3 and _4 // This order change is the only difference btween FRONITER_MONS_POKEMANIAC_2A and FRONTIER_MONS_POKEMANIAC_2B other than the numbered suffixes @@ -4542,7 +4542,7 @@ FRONTIER_MON_TYRANITAR_8, \ FRONTIER_MON_TYRANITAR_9, \ FRONTIER_MON_TYRANITAR_10, \ - -1 + -1 #define FRONTIER_MONS_POKEMANIAC_2B \ FRONTIER_MON_ZANGOOSE_2, \ @@ -4828,7 +4828,7 @@ FRONTIER_MON_TYRANITAR_8, \ FRONTIER_MON_TYRANITAR_9, \ FRONTIER_MON_TYRANITAR_10, \ - -1 + -1 // Identical to FRONTIER_MONS_COOLTRAINER_2D but with both latias and latios #define FRONTIER_MONS_GENTLEMAN_3B \ @@ -4922,7 +4922,7 @@ FRONTIER_MON_ENTEI_6, \ FRONTIER_MON_SUICUNE_5, \ FRONTIER_MON_SUICUNE_6, \ - -1 + -1 #define FRONTIER_MONS_SWIMMING_TRIATHLETE_M_3 \ FRONTIER_MON_SNEASEL_2, \ @@ -5005,7 +5005,7 @@ FRONTIER_MON_LAPRAS_6, \ FRONTIER_MON_LAPRAS_7, \ FRONTIER_MON_LAPRAS_8, \ - -1 + -1 #define FRONTIER_MONS_SWIMMING_TRIATHLETE_F_3 \ FRONTIER_MON_SNEASEL_2, \ @@ -5119,7 +5119,7 @@ FRONTIER_MON_SCIZOR_4, \ FRONTIER_MON_HERACROSS_4, \ FRONTIER_MON_SHUCKLE_4, \ - -1 + -1 #define FRONTIER_MONS_FISHERMAN_3 \ FRONTIER_MON_SEAKING_2, \ @@ -5229,7 +5229,7 @@ FRONTIER_MON_REGICE_6, \ FRONTIER_MON_REGISTEEL_5, \ FRONTIER_MON_REGISTEEL_6, \ - -1 + -1 #define FRONTIER_MONS_COLLECTOR_3 \ FRONTIER_MON_VENUSAUR_1, \ @@ -5268,7 +5268,7 @@ FRONTIER_MON_CHARIZARD_4, \ FRONTIER_MON_TYPHLOSION_4, \ FRONTIER_MON_SWAMPERT_4, \ - -1 + -1 #define FRONTIER_MONS_GUITARIST_3A \ FRONTIER_MON_ABSOL_2, \ @@ -5330,7 +5330,7 @@ FRONTIER_MON_ZAPDOS_6, \ FRONTIER_MON_MOLTRES_5, \ FRONTIER_MON_MOLTRES_6, \ - -1 + -1 #define FRONTIER_MONS_GUITARIST_3B \ FRONTIER_MON_MISDREAVUS_1, \ @@ -5368,7 +5368,7 @@ FRONTIER_MON_LATIAS_6, \ FRONTIER_MON_LATIOS_5, \ FRONTIER_MON_LATIOS_6, \ - -1 + -1 #define FRONTIER_MONS_BIRD_KEEPER_3 \ FRONTIER_MON_PIDGEOT_2, \ @@ -5432,7 +5432,7 @@ FRONTIER_MON_SALAMENCE_6, \ FRONTIER_MON_SALAMENCE_7, \ FRONTIER_MON_SALAMENCE_8, \ - -1 + -1 #define FRONTIER_MONS_SAILOR_3 \ FRONTIER_MON_MEDICHAM_1, \ @@ -5515,7 +5515,7 @@ FRONTIER_MON_LAPRAS_6, \ FRONTIER_MON_LAPRAS_7, \ FRONTIER_MON_LAPRAS_8, \ - -1 + -1 #define FRONTIER_MONS_HIKER_3 \ FRONTIER_MON_DUGTRIO_1, \ @@ -5596,7 +5596,7 @@ FRONTIER_MON_TYRANITAR_8, \ FRONTIER_MON_TYRANITAR_9, \ FRONTIER_MON_TYRANITAR_10, \ - -1 + -1 #define FRONTIER_MONS_KINDLER_3 \ FRONTIER_MON_MISDREAVUS_1, \ @@ -5661,7 +5661,7 @@ FRONTIER_MON_DRAGONITE_8, \ FRONTIER_MON_DRAGONITE_9, \ FRONTIER_MON_DRAGONITE_10, \ - -1 + -1 #define FRONTIER_MONS_PARASOL_LADY_3 \ FRONTIER_MON_GLALIE_1, \ @@ -5699,7 +5699,7 @@ FRONTIER_MON_HOUNDOOM_4, \ FRONTIER_MON_VENUSAUR_4, \ FRONTIER_MON_FLAREON_4, \ - -1 + -1 // Only used by one Beauty #define FRONTIER_MONS_EEVEELUTIONS \ @@ -5723,7 +5723,7 @@ FRONTIER_MON_FLAREON_4, \ FRONTIER_MON_ESPEON_4, \ FRONTIER_MON_UMBREON_4, \ - -1 + -1 #define FRONTIER_MONS_BEAUTY_2 \ FRONTIER_MON_JYNX_1, \ @@ -5765,7 +5765,7 @@ FRONTIER_MON_LAPRAS_8, \ FRONTIER_MON_SALAMENCE_8, \ FRONTIER_MON_LATIAS_6, \ - -1 + -1 #define FRONTIER_MONS_AROMA_LADY_3 \ FRONTIER_MON_WOBBUFFET_1, \ @@ -5863,1507 +5863,1507 @@ FRONTIER_MON_STARMIE_6, \ FRONTIER_MON_STARMIE_7, \ FRONTIER_MON_STARMIE_8, \ - -1 + -1 -const u16 gBattleFrontierTrainerMons_Brady[] = +const u16 gBattleFrontierTrainerMons_Brady[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Conner[] = +const u16 gBattleFrontierTrainerMons_Conner[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Bradley[] = +const u16 gBattleFrontierTrainerMons_Bradley[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Cybil[] = +const u16 gBattleFrontierTrainerMons_Cybil[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Rodette[] = +const u16 gBattleFrontierTrainerMons_Rodette[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Peggy[] = +const u16 gBattleFrontierTrainerMons_Peggy[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Keith[] = +const u16 gBattleFrontierTrainerMons_Keith[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Grayson[] = +const u16 gBattleFrontierTrainerMons_Grayson[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Glenn[] = +const u16 gBattleFrontierTrainerMons_Glenn[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Liliana[] = +const u16 gBattleFrontierTrainerMons_Liliana[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Elise[] = +const u16 gBattleFrontierTrainerMons_Elise[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Zoey[] = +const u16 gBattleFrontierTrainerMons_Zoey[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Manuel[] = +const u16 gBattleFrontierTrainerMons_Manuel[] = { FRONTIER_MONS_RICH_BOY_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Russ[] = +const u16 gBattleFrontierTrainerMons_Russ[] = { FRONTIER_MONS_RICH_BOY_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Dustin[] = +const u16 gBattleFrontierTrainerMons_Dustin[] = { FRONTIER_MONS_RICH_BOY_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Tina[] = +const u16 gBattleFrontierTrainerMons_Tina[] = { FRONTIER_MONS_RICH_BOY_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Gillian[] = +const u16 gBattleFrontierTrainerMons_Gillian[] = { FRONTIER_MONS_RICH_BOY_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Zoe[] = +const u16 gBattleFrontierTrainerMons_Zoe[] = { FRONTIER_MONS_RICH_BOY_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Chen[] = +const u16 gBattleFrontierTrainerMons_Chen[] = { FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Al[] = +const u16 gBattleFrontierTrainerMons_Al[] = { FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Mitch[] = -{ - FRONTIER_MONS_CAMPER_PICNICKER_1 -}; - -const u16 gBattleFrontierTrainerMons_Anne[] = +const u16 gBattleFrontierTrainerMons_Mitch[] = { FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Alize[] = +const u16 gBattleFrontierTrainerMons_Anne[] = { FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Lauren[] = +const u16 gBattleFrontierTrainerMons_Alize[] = { - FRONTIER_MONS_CAMPER_PICNICKER_1 + FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Kipp[] = +const u16 gBattleFrontierTrainerMons_Lauren[] = +{ + FRONTIER_MONS_CAMPER_PICNICKER_1 +}; + +const u16 gBattleFrontierTrainerMons_Kipp[] = { FRONTIER_MONS_TUBER_1 }; -const u16 gBattleFrontierTrainerMons_Jason[] = +const u16 gBattleFrontierTrainerMons_Jason[] = { FRONTIER_MONS_TUBER_1 }; -const u16 gBattleFrontierTrainerMons_John[] = +const u16 gBattleFrontierTrainerMons_John[] = { FRONTIER_MONS_TUBER_1 }; -const u16 gBattleFrontierTrainerMons_Ann[] = +const u16 gBattleFrontierTrainerMons_Ann[] = { FRONTIER_MONS_TUBER_1 }; -const u16 gBattleFrontierTrainerMons_Eileen[] = +const u16 gBattleFrontierTrainerMons_Eileen[] = { FRONTIER_MONS_TUBER_1 }; -const u16 gBattleFrontierTrainerMons_Carlie[] = +const u16 gBattleFrontierTrainerMons_Carlie[] = { FRONTIER_MONS_TUBER_1 }; -const u16 gBattleFrontierTrainerMons_Gordon[] = +const u16 gBattleFrontierTrainerMons_Gordon[] = { FRONTIER_MONS_SWIMMER_M_1 }; -const u16 gBattleFrontierTrainerMons_Ayden[] = +const u16 gBattleFrontierTrainerMons_Ayden[] = { FRONTIER_MONS_SWIMMER_M_1 }; -const u16 gBattleFrontierTrainerMons_Marco[] = +const u16 gBattleFrontierTrainerMons_Marco[] = { FRONTIER_MONS_SWIMMER_M_1 }; -const u16 gBattleFrontierTrainerMons_Cierra[] = +const u16 gBattleFrontierTrainerMons_Cierra[] = { FRONTIER_MONS_SWIMMER_F_1 }; -const u16 gBattleFrontierTrainerMons_Marcy[] = +const u16 gBattleFrontierTrainerMons_Marcy[] = { FRONTIER_MONS_SWIMMER_F_1 }; -const u16 gBattleFrontierTrainerMons_Kathy[] = +const u16 gBattleFrontierTrainerMons_Kathy[] = { FRONTIER_MONS_SWIMMER_F_1 }; -const u16 gBattleFrontierTrainerMons_Peyton[] = +const u16 gBattleFrontierTrainerMons_Peyton[] = { FRONTIER_MONS_POKEFAN_M_1 }; -const u16 gBattleFrontierTrainerMons_Julian[] = +const u16 gBattleFrontierTrainerMons_Julian[] = { FRONTIER_MONS_POKEFAN_M_1 }; -const u16 gBattleFrontierTrainerMons_Quinn[] = +const u16 gBattleFrontierTrainerMons_Quinn[] = { FRONTIER_MONS_POKEFAN_M_1 }; -const u16 gBattleFrontierTrainerMons_Haylee[] = +const u16 gBattleFrontierTrainerMons_Haylee[] = { - FRONTIER_MONS_POKEFAN_F_1 + FRONTIER_MONS_POKEFAN_F_1 }; -const u16 gBattleFrontierTrainerMons_Amanda[] = +const u16 gBattleFrontierTrainerMons_Amanda[] = { - FRONTIER_MONS_POKEFAN_F_1 + FRONTIER_MONS_POKEFAN_F_1 }; -const u16 gBattleFrontierTrainerMons_Stacy[] = +const u16 gBattleFrontierTrainerMons_Stacy[] = { FRONTIER_MONS_POKEFAN_F_1 }; // The below 6 are the early Pkmn Breeder class trainers, which use groups from other general classes -const u16 gBattleFrontierTrainerMons_Rafael[] = +const u16 gBattleFrontierTrainerMons_Rafael[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Oliver[] = +const u16 gBattleFrontierTrainerMons_Oliver[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Payton[] = +const u16 gBattleFrontierTrainerMons_Payton[] = { FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Pamela[] = +const u16 gBattleFrontierTrainerMons_Pamela[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Eliza[] = +const u16 gBattleFrontierTrainerMons_Eliza[] = { - FRONTIER_MONS_SCHOOL_KID_1 + FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Marisa[] = +const u16 gBattleFrontierTrainerMons_Marisa[] = { - FRONTIER_MONS_CAMPER_PICNICKER_1 + FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Lewis[] = +const u16 gBattleFrontierTrainerMons_Lewis[] = { FRONTIER_MONS_BUG_CATCHER_1_EXTRA(METAPOD, KAKUNA) }; -const u16 gBattleFrontierTrainerMons_Yoshi[] = +const u16 gBattleFrontierTrainerMons_Yoshi[] = { - FRONTIER_MONS_BUG_CATCHER_1_EXTRA(SILCOON, CASCOON) + FRONTIER_MONS_BUG_CATCHER_1_EXTRA(SILCOON, CASCOON) }; -const u16 gBattleFrontierTrainerMons_Destin[] = +const u16 gBattleFrontierTrainerMons_Destin[] = { FRONTIER_MONS_BUG_CATCHER_1 }; -const u16 gBattleFrontierTrainerMons_Keon[] = +const u16 gBattleFrontierTrainerMons_Keon[] = { FRONTIER_MONS_NINJA_BOY_1 }; -const u16 gBattleFrontierTrainerMons_Stuart[] = +const u16 gBattleFrontierTrainerMons_Stuart[] = { FRONTIER_MONS_NINJA_BOY_1 }; -const u16 gBattleFrontierTrainerMons_Nestor[] = +const u16 gBattleFrontierTrainerMons_Nestor[] = { - FRONTIER_MONS_NINJA_BOY_1 + FRONTIER_MONS_NINJA_BOY_1 }; -const u16 gBattleFrontierTrainerMons_Derrick[] = +const u16 gBattleFrontierTrainerMons_Derrick[] = { FRONTIER_MONS_BUG_MANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Bryson[] = +const u16 gBattleFrontierTrainerMons_Bryson[] = { FRONTIER_MONS_BUG_MANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Clayton[] = +const u16 gBattleFrontierTrainerMons_Clayton[] = { FRONTIER_MONS_BUG_MANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Trenton[] = -{ - FRONTIER_MONS_FISHERMAN_1 -}; - -const u16 gBattleFrontierTrainerMons_Jenson[] = +const u16 gBattleFrontierTrainerMons_Trenton[] = { FRONTIER_MONS_FISHERMAN_1 }; -const u16 gBattleFrontierTrainerMons_Wesley[] = +const u16 gBattleFrontierTrainerMons_Jenson[] = { FRONTIER_MONS_FISHERMAN_1 }; -const u16 gBattleFrontierTrainerMons_Anton[] = +const u16 gBattleFrontierTrainerMons_Wesley[] = +{ + FRONTIER_MONS_FISHERMAN_1 +}; + +const u16 gBattleFrontierTrainerMons_Anton[] = { FRONTIER_MONS_RUIN_MANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Lawson[] = +const u16 gBattleFrontierTrainerMons_Lawson[] = { FRONTIER_MONS_RUIN_MANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Sammy[] = +const u16 gBattleFrontierTrainerMons_Sammy[] = { FRONTIER_MONS_RUIN_MANIAC_1 }; // The below 3 are the early Collector class trainers, which use groups from other general classes -const u16 gBattleFrontierTrainerMons_Arnie[] = +const u16 gBattleFrontierTrainerMons_Arnie[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Adrian[] = +const u16 gBattleFrontierTrainerMons_Adrian[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Tristan[] = +const u16 gBattleFrontierTrainerMons_Tristan[] = { FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Juliana[] = +const u16 gBattleFrontierTrainerMons_Juliana[] = { FRONTIER_MONS_PARASOL_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Rylee[] = +const u16 gBattleFrontierTrainerMons_Rylee[] = { FRONTIER_MONS_PARASOL_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Chelsea[] = +const u16 gBattleFrontierTrainerMons_Chelsea[] = { FRONTIER_MONS_PARASOL_LADY_1 }; // The below 3 are the early Beauty class trainers, which use groups from other general classes -const u16 gBattleFrontierTrainerMons_Danela[] = +const u16 gBattleFrontierTrainerMons_Danela[] = { FRONTIER_MONS_YOUNGSTER_LASS_1 }; -const u16 gBattleFrontierTrainerMons_Lizbeth[] = +const u16 gBattleFrontierTrainerMons_Lizbeth[] = { FRONTIER_MONS_SCHOOL_KID_1 }; -const u16 gBattleFrontierTrainerMons_Amelia[] = +const u16 gBattleFrontierTrainerMons_Amelia[] = { FRONTIER_MONS_CAMPER_PICNICKER_1 }; -const u16 gBattleFrontierTrainerMons_Jillian[] = -{ - FRONTIER_MONS_AROMA_LADY_1 -}; - -const u16 gBattleFrontierTrainerMons_Abbie[] = -{ - FRONTIER_MONS_AROMA_LADY_1 -}; - -const u16 gBattleFrontierTrainerMons_Briana[] = +const u16 gBattleFrontierTrainerMons_Jillian[] = { FRONTIER_MONS_AROMA_LADY_1 }; -const u16 gBattleFrontierTrainerMons_Antonio[] = +const u16 gBattleFrontierTrainerMons_Abbie[] = +{ + FRONTIER_MONS_AROMA_LADY_1 +}; + +const u16 gBattleFrontierTrainerMons_Briana[] = +{ + FRONTIER_MONS_AROMA_LADY_1 +}; + +const u16 gBattleFrontierTrainerMons_Antonio[] = { FRONTIER_MONS_GUITARIST_1 }; -const u16 gBattleFrontierTrainerMons_Jaden[] = +const u16 gBattleFrontierTrainerMons_Jaden[] = { FRONTIER_MONS_GUITARIST_1 }; -const u16 gBattleFrontierTrainerMons_Dakota[] = +const u16 gBattleFrontierTrainerMons_Dakota[] = { - FRONTIER_MONS_GUITARIST_1 + FRONTIER_MONS_GUITARIST_1 }; -const u16 gBattleFrontierTrainerMons_Brayden[] = +const u16 gBattleFrontierTrainerMons_Brayden[] = { FRONTIER_MONS_BIRD_KEEPER_1 }; -const u16 gBattleFrontierTrainerMons_Corson[] = +const u16 gBattleFrontierTrainerMons_Corson[] = { FRONTIER_MONS_BIRD_KEEPER_1 }; -const u16 gBattleFrontierTrainerMons_Trevin[] = +const u16 gBattleFrontierTrainerMons_Trevin[] = { FRONTIER_MONS_BIRD_KEEPER_1 }; -const u16 gBattleFrontierTrainerMons_Patrick[] = +const u16 gBattleFrontierTrainerMons_Patrick[] = { FRONTIER_MONS_SAILOR_1 }; -const u16 gBattleFrontierTrainerMons_Kaden[] = +const u16 gBattleFrontierTrainerMons_Kaden[] = { FRONTIER_MONS_SAILOR_1 }; -const u16 gBattleFrontierTrainerMons_Maxwell[] = +const u16 gBattleFrontierTrainerMons_Maxwell[] = { FRONTIER_MONS_SAILOR_1 }; -const u16 gBattleFrontierTrainerMons_Daryl[] = +const u16 gBattleFrontierTrainerMons_Daryl[] = { FRONTIER_MONS_HIKER_1 }; -const u16 gBattleFrontierTrainerMons_Kenneth[] = +const u16 gBattleFrontierTrainerMons_Kenneth[] = { FRONTIER_MONS_HIKER_1 }; -const u16 gBattleFrontierTrainerMons_Rich[] = +const u16 gBattleFrontierTrainerMons_Rich[] = { FRONTIER_MONS_HIKER_1 }; -const u16 gBattleFrontierTrainerMons_Caden[] = +const u16 gBattleFrontierTrainerMons_Caden[] = { FRONTIER_MONS_KINDLER_1 }; -const u16 gBattleFrontierTrainerMons_Marlon[] = +const u16 gBattleFrontierTrainerMons_Marlon[] = { FRONTIER_MONS_KINDLER_1 }; -const u16 gBattleFrontierTrainerMons_Nash[] = +const u16 gBattleFrontierTrainerMons_Nash[] = { FRONTIER_MONS_KINDLER_1 }; -const u16 gBattleFrontierTrainerMons_Robby[] = +const u16 gBattleFrontierTrainerMons_Robby[] = { FRONTIER_MONS_RUNNING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Reece[] = +const u16 gBattleFrontierTrainerMons_Reece[] = { FRONTIER_MONS_RUNNING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Kathryn[] = +const u16 gBattleFrontierTrainerMons_Kathryn[] = { FRONTIER_MONS_RUNNING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Ellen[] = +const u16 gBattleFrontierTrainerMons_Ellen[] = { FRONTIER_MONS_RUNNING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Ramon[] = +const u16 gBattleFrontierTrainerMons_Ramon[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Arthur[] = +const u16 gBattleFrontierTrainerMons_Arthur[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Alondra[] = +const u16 gBattleFrontierTrainerMons_Alondra[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Adriana[] = +const u16 gBattleFrontierTrainerMons_Adriana[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Malik[] = +const u16 gBattleFrontierTrainerMons_Malik[] = { FRONTIER_MONS_CYCLING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Jill[] = +const u16 gBattleFrontierTrainerMons_Jill[] = { FRONTIER_MONS_CYCLING_TRIATHLETE_1 }; -const u16 gBattleFrontierTrainerMons_Erik[] = +const u16 gBattleFrontierTrainerMons_Erik[] = { FRONTIER_MONS_RUNNING_TRIATHLETE_2 }; -const u16 gBattleFrontierTrainerMons_Yazmin[] = +const u16 gBattleFrontierTrainerMons_Yazmin[] = { FRONTIER_MONS_RUNNING_TRIATHLETE_2 }; -const u16 gBattleFrontierTrainerMons_Jamal[] = +const u16 gBattleFrontierTrainerMons_Jamal[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_2 }; -const u16 gBattleFrontierTrainerMons_Leslie[] = +const u16 gBattleFrontierTrainerMons_Leslie[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_2 }; -const u16 gBattleFrontierTrainerMons_Dave[] = +const u16 gBattleFrontierTrainerMons_Dave[] = { FRONTIER_MONS_CYCLING_TRIATHLETE_2 }; -const u16 gBattleFrontierTrainerMons_Carlo[] = +const u16 gBattleFrontierTrainerMons_Carlo[] = { FRONTIER_MONS_CYCLING_TRIATHLETE_2 }; -const u16 gBattleFrontierTrainerMons_Emilia[] = +const u16 gBattleFrontierTrainerMons_Emilia[] = { FRONTIER_MONS_CYCLING_TRIATHLETE_2 }; -const u16 gBattleFrontierTrainerMons_Dalia[] = +const u16 gBattleFrontierTrainerMons_Dalia[] = { FRONTIER_MONS_CYCLING_TRIATHLETE_2 }; -const u16 gBattleFrontierTrainerMons_Hitomi[] = +const u16 gBattleFrontierTrainerMons_Hitomi[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_1 }; -const u16 gBattleFrontierTrainerMons_Ricardo[] = +const u16 gBattleFrontierTrainerMons_Ricardo[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_1 }; -const u16 gBattleFrontierTrainerMons_Shizuka[] = +const u16 gBattleFrontierTrainerMons_Shizuka[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_1 }; -const u16 gBattleFrontierTrainerMons_Joana[] = +const u16 gBattleFrontierTrainerMons_Joana[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_1 }; -const u16 gBattleFrontierTrainerMons_Kelly[] = +const u16 gBattleFrontierTrainerMons_Kelly[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_1 }; -const u16 gBattleFrontierTrainerMons_Rayna[] = +const u16 gBattleFrontierTrainerMons_Rayna[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_1 }; -const u16 gBattleFrontierTrainerMons_Evan[] = +const u16 gBattleFrontierTrainerMons_Evan[] = { FRONTIER_MONS_EXPERT_1A }; -const u16 gBattleFrontierTrainerMons_Jordan[] = +const u16 gBattleFrontierTrainerMons_Jordan[] = { FRONTIER_MONS_EXPERT_1B }; -const u16 gBattleFrontierTrainerMons_Joel[] = +const u16 gBattleFrontierTrainerMons_Joel[] = { FRONTIER_MONS_EXPERT_1C }; -const u16 gBattleFrontierTrainerMons_Kristen[] = +const u16 gBattleFrontierTrainerMons_Kristen[] = { FRONTIER_MONS_EXPERT_1A }; -const u16 gBattleFrontierTrainerMons_Selphy[] = +const u16 gBattleFrontierTrainerMons_Selphy[] = { FRONTIER_MONS_EXPERT_1B }; -const u16 gBattleFrontierTrainerMons_Chloe[] = +const u16 gBattleFrontierTrainerMons_Chloe[] = { FRONTIER_MONS_EXPERT_1C }; -const u16 gBattleFrontierTrainerMons_Norton[] = +const u16 gBattleFrontierTrainerMons_Norton[] = { FRONTIER_MONS_PSYCHIC_1 }; -const u16 gBattleFrontierTrainerMons_Lukas[] = +const u16 gBattleFrontierTrainerMons_Lukas[] = { FRONTIER_MONS_PSYCHIC_1 }; -const u16 gBattleFrontierTrainerMons_Zach[] = +const u16 gBattleFrontierTrainerMons_Zach[] = { FRONTIER_MONS_PSYCHIC_1 }; -const u16 gBattleFrontierTrainerMons_Kaitlyn[] = +const u16 gBattleFrontierTrainerMons_Kaitlyn[] = { FRONTIER_MONS_PSYCHIC_1 }; -const u16 gBattleFrontierTrainerMons_Breanna[] = +const u16 gBattleFrontierTrainerMons_Breanna[] = { FRONTIER_MONS_PSYCHIC_1 }; -const u16 gBattleFrontierTrainerMons_Kendra[] = +const u16 gBattleFrontierTrainerMons_Kendra[] = { FRONTIER_MONS_PSYCHIC_1 }; -const u16 gBattleFrontierTrainerMons_Molly[] = +const u16 gBattleFrontierTrainerMons_Molly[] = { FRONTIER_MONS_HEX_MANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Jazmin[] = +const u16 gBattleFrontierTrainerMons_Jazmin[] = { FRONTIER_MONS_HEX_MANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Kelsey[] = +const u16 gBattleFrontierTrainerMons_Kelsey[] = { FRONTIER_MONS_HEX_MANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Jalen[] = +const u16 gBattleFrontierTrainerMons_Jalen[] = { FRONTIER_MONS_POKEMANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Griffen[] = +const u16 gBattleFrontierTrainerMons_Griffen[] = { FRONTIER_MONS_POKEMANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Xander[] = +const u16 gBattleFrontierTrainerMons_Xander[] = { FRONTIER_MONS_POKEMANIAC_1 }; -const u16 gBattleFrontierTrainerMons_Marvin[] = +const u16 gBattleFrontierTrainerMons_Marvin[] = { FRONTIER_MONS_GENTLEMAN_1A }; -const u16 gBattleFrontierTrainerMons_Brennan[] = +const u16 gBattleFrontierTrainerMons_Brennan[] = { FRONTIER_MONS_GENTLEMAN_1B }; -const u16 gBattleFrontierTrainerMons_Baley[] = +const u16 gBattleFrontierTrainerMons_Baley[] = { FRONTIER_MONS_BUG_MANIAC_2 }; -const u16 gBattleFrontierTrainerMons_Zackary[] = +const u16 gBattleFrontierTrainerMons_Zackary[] = { FRONTIER_MONS_RUIN_MANIAC_2 }; -const u16 gBattleFrontierTrainerMons_Gabriel[] = +const u16 gBattleFrontierTrainerMons_Gabriel[] = { FRONTIER_MONS_COLLECTOR_1 }; -const u16 gBattleFrontierTrainerMons_Emily[] = +const u16 gBattleFrontierTrainerMons_Emily[] = { FRONTIER_MONS_PARASOL_LADY_2 }; -const u16 gBattleFrontierTrainerMons_Jordyn[] = +const u16 gBattleFrontierTrainerMons_Jordyn[] = { FRONTIER_MONS_BEAUTY_1 }; -const u16 gBattleFrontierTrainerMons_Sofia[] = +const u16 gBattleFrontierTrainerMons_Sofia[] = { FRONTIER_MONS_AROMA_LADY_2 }; -const u16 gBattleFrontierTrainerMons_Braden[] = +const u16 gBattleFrontierTrainerMons_Braden[] = { FRONTIER_MONS_COOLTRAINER_1A }; -const u16 gBattleFrontierTrainerMons_Kayden[] = +const u16 gBattleFrontierTrainerMons_Kayden[] = { FRONTIER_MONS_COOLTRAINER_1B }; -const u16 gBattleFrontierTrainerMons_Cooper[] = +const u16 gBattleFrontierTrainerMons_Cooper[] = { FRONTIER_MONS_COOLTRAINER_1C }; -const u16 gBattleFrontierTrainerMons_Julia[] = +const u16 gBattleFrontierTrainerMons_Julia[] = { FRONTIER_MONS_COOLTRAINER_1A }; -const u16 gBattleFrontierTrainerMons_Amara[] = +const u16 gBattleFrontierTrainerMons_Amara[] = { FRONTIER_MONS_COOLTRAINER_1B }; -const u16 gBattleFrontierTrainerMons_Lynn[] = +const u16 gBattleFrontierTrainerMons_Lynn[] = { FRONTIER_MONS_COOLTRAINER_1C }; -const u16 gBattleFrontierTrainerMons_Jovan[] = +const u16 gBattleFrontierTrainerMons_Jovan[] = { FRONTIER_MONS_PKMN_RANGER_1 }; -const u16 gBattleFrontierTrainerMons_Dominic[] = +const u16 gBattleFrontierTrainerMons_Dominic[] = { FRONTIER_MONS_PKMN_RANGER_1 }; -const u16 gBattleFrontierTrainerMons_Nikolas[] = +const u16 gBattleFrontierTrainerMons_Nikolas[] = { FRONTIER_MONS_PKMN_RANGER_1 }; -const u16 gBattleFrontierTrainerMons_Valeria[] = +const u16 gBattleFrontierTrainerMons_Valeria[] = { FRONTIER_MONS_PKMN_RANGER_1 }; -const u16 gBattleFrontierTrainerMons_Delaney[] = +const u16 gBattleFrontierTrainerMons_Delaney[] = { FRONTIER_MONS_PKMN_RANGER_1 }; -const u16 gBattleFrontierTrainerMons_Meghan[] = +const u16 gBattleFrontierTrainerMons_Meghan[] = { FRONTIER_MONS_PKMN_RANGER_1 }; -const u16 gBattleFrontierTrainerMons_Roberto[] = +const u16 gBattleFrontierTrainerMons_Roberto[] = { FRONTIER_MONS_DRAGON_TAMER_1 }; -const u16 gBattleFrontierTrainerMons_Damian[] = +const u16 gBattleFrontierTrainerMons_Damian[] = { FRONTIER_MONS_DRAGON_TAMER_1 }; -const u16 gBattleFrontierTrainerMons_Brody[] = +const u16 gBattleFrontierTrainerMons_Brody[] = { FRONTIER_MONS_DRAGON_TAMER_1 }; -const u16 gBattleFrontierTrainerMons_Graham[] = +const u16 gBattleFrontierTrainerMons_Graham[] = { FRONTIER_MONS_DRAGON_TAMER_1 }; -const u16 gBattleFrontierTrainerMons_Tylor[] = +const u16 gBattleFrontierTrainerMons_Tylor[] = { FRONTIER_MONS_POKEFAN_2 }; -const u16 gBattleFrontierTrainerMons_Jaren[] = +const u16 gBattleFrontierTrainerMons_Jaren[] = { FRONTIER_MONS_POKEFAN_2 }; -const u16 gBattleFrontierTrainerMons_Cordell[] = +const u16 gBattleFrontierTrainerMons_Cordell[] = { FRONTIER_MONS_PKMN_BREEDER_M_1 }; -const u16 gBattleFrontierTrainerMons_Jazlyn[] = +const u16 gBattleFrontierTrainerMons_Jazlyn[] = { FRONTIER_MONS_PKMN_BREEDER_F_1 }; -const u16 gBattleFrontierTrainerMons_Zachery[] = +const u16 gBattleFrontierTrainerMons_Zachery[] = { FRONTIER_MONS_YOUNGSTER_LASS_2 }; -const u16 gBattleFrontierTrainerMons_Johan[] = +const u16 gBattleFrontierTrainerMons_Johan[] = { FRONTIER_MONS_YOUNGSTER_LASS_2_NO_DUGTRIO }; -const u16 gBattleFrontierTrainerMons_Shea[] = +const u16 gBattleFrontierTrainerMons_Shea[] = { FRONTIER_MONS_YOUNGSTER_LASS_2 }; -const u16 gBattleFrontierTrainerMons_Kaila[] = +const u16 gBattleFrontierTrainerMons_Kaila[] = { FRONTIER_MONS_YOUNGSTER_LASS_2 }; -const u16 gBattleFrontierTrainerMons_Isiah[] = +const u16 gBattleFrontierTrainerMons_Isiah[] = { FRONTIER_MONS_SCHOOL_KID_2 }; -const u16 gBattleFrontierTrainerMons_Garrett[] = +const u16 gBattleFrontierTrainerMons_Garrett[] = { FRONTIER_MONS_SCHOOL_KID_2 }; -const u16 gBattleFrontierTrainerMons_Haylie[] = +const u16 gBattleFrontierTrainerMons_Haylie[] = { FRONTIER_MONS_SCHOOL_KID_2 }; -const u16 gBattleFrontierTrainerMons_Megan[] = +const u16 gBattleFrontierTrainerMons_Megan[] = { FRONTIER_MONS_SCHOOL_KID_2 }; -const u16 gBattleFrontierTrainerMons_Issac[] = +const u16 gBattleFrontierTrainerMons_Issac[] = { FRONTIER_MONS_RICH_BOY_LADY_2 }; -const u16 gBattleFrontierTrainerMons_Quinton[] = +const u16 gBattleFrontierTrainerMons_Quinton[] = { FRONTIER_MONS_RICH_BOY_LADY_2 }; -const u16 gBattleFrontierTrainerMons_Salma[] = +const u16 gBattleFrontierTrainerMons_Salma[] = { FRONTIER_MONS_RICH_BOY_LADY_2 }; -const u16 gBattleFrontierTrainerMons_Ansley[] = +const u16 gBattleFrontierTrainerMons_Ansley[] = { FRONTIER_MONS_RICH_BOY_LADY_2 }; -const u16 gBattleFrontierTrainerMons_Holden[] = +const u16 gBattleFrontierTrainerMons_Holden[] = { FRONTIER_MONS_BUG_CATCHER_2 }; -const u16 gBattleFrontierTrainerMons_Luca[] = +const u16 gBattleFrontierTrainerMons_Luca[] = { FRONTIER_MONS_BUG_CATCHER_2 }; -const u16 gBattleFrontierTrainerMons_Jamison[] = +const u16 gBattleFrontierTrainerMons_Jamison[] = { FRONTIER_MONS_NINJA_BOY_2 }; -const u16 gBattleFrontierTrainerMons_Gunnar[] = +const u16 gBattleFrontierTrainerMons_Gunnar[] = { FRONTIER_MONS_NINJA_BOY_2 }; -const u16 gBattleFrontierTrainerMons_Craig[] = +const u16 gBattleFrontierTrainerMons_Craig[] = { FRONTIER_MONS_TUBER_2 }; -const u16 gBattleFrontierTrainerMons_Pierce[] = +const u16 gBattleFrontierTrainerMons_Pierce[] = { FRONTIER_MONS_TUBER_2 }; -const u16 gBattleFrontierTrainerMons_Regina[] = +const u16 gBattleFrontierTrainerMons_Regina[] = { FRONTIER_MONS_TUBER_2 }; -const u16 gBattleFrontierTrainerMons_Alison[] = +const u16 gBattleFrontierTrainerMons_Alison[] = { FRONTIER_MONS_TUBER_2 }; -const u16 gBattleFrontierTrainerMons_Hank[] = +const u16 gBattleFrontierTrainerMons_Hank[] = { FRONTIER_MONS_BUG_MANIAC_3 }; -const u16 gBattleFrontierTrainerMons_Earl[] = +const u16 gBattleFrontierTrainerMons_Earl[] = { FRONTIER_MONS_BUG_MANIAC_3 }; -const u16 gBattleFrontierTrainerMons_Ramiro[] = +const u16 gBattleFrontierTrainerMons_Ramiro[] = { FRONTIER_MONS_FISHERMAN_2 }; -const u16 gBattleFrontierTrainerMons_Hunter[] = +const u16 gBattleFrontierTrainerMons_Hunter[] = { FRONTIER_MONS_FISHERMAN_2 }; -const u16 gBattleFrontierTrainerMons_Aiden[] = +const u16 gBattleFrontierTrainerMons_Aiden[] = { FRONTIER_MONS_RUIN_MANIAC_3 }; -const u16 gBattleFrontierTrainerMons_Xavier[] = +const u16 gBattleFrontierTrainerMons_Xavier[] = { FRONTIER_MONS_RUIN_MANIAC_3 }; -const u16 gBattleFrontierTrainerMons_Clinton[] = +const u16 gBattleFrontierTrainerMons_Clinton[] = { FRONTIER_MONS_COLLECTOR_2 }; -const u16 gBattleFrontierTrainerMons_Jesse[] = +const u16 gBattleFrontierTrainerMons_Jesse[] = { FRONTIER_MONS_COLLECTOR_2 }; -const u16 gBattleFrontierTrainerMons_Eduardo[] = +const u16 gBattleFrontierTrainerMons_Eduardo[] = { FRONTIER_MONS_GUITARIST_2 }; -const u16 gBattleFrontierTrainerMons_Hal[] = +const u16 gBattleFrontierTrainerMons_Hal[] = { FRONTIER_MONS_GUITARIST_2 }; -const u16 gBattleFrontierTrainerMons_Gage[] = +const u16 gBattleFrontierTrainerMons_Gage[] = { FRONTIER_MONS_BIRD_KEEPER_2 }; -const u16 gBattleFrontierTrainerMons_Arnold[] = +const u16 gBattleFrontierTrainerMons_Arnold[] = { FRONTIER_MONS_BIRD_KEEPER_2 }; -const u16 gBattleFrontierTrainerMons_Jarrett[] = +const u16 gBattleFrontierTrainerMons_Jarrett[] = { FRONTIER_MONS_SAILOR_2 }; -const u16 gBattleFrontierTrainerMons_Garett[] = +const u16 gBattleFrontierTrainerMons_Garett[] = { FRONTIER_MONS_SAILOR_2 }; -const u16 gBattleFrontierTrainerMons_Emanuel[] = +const u16 gBattleFrontierTrainerMons_Emanuel[] = { FRONTIER_MONS_HIKER_2 }; -const u16 gBattleFrontierTrainerMons_Gustavo[] = +const u16 gBattleFrontierTrainerMons_Gustavo[] = { FRONTIER_MONS_HIKER_2 }; -const u16 gBattleFrontierTrainerMons_Kameron[] = +const u16 gBattleFrontierTrainerMons_Kameron[] = { FRONTIER_MONS_KINDLER_2 }; -const u16 gBattleFrontierTrainerMons_Alfredo[] = +const u16 gBattleFrontierTrainerMons_Alfredo[] = { FRONTIER_MONS_KINDLER_2 }; -const u16 gBattleFrontierTrainerMons_Ruben[] = +const u16 gBattleFrontierTrainerMons_Ruben[] = { FRONTIER_MONS_GENTLEMAN_2 }; -const u16 gBattleFrontierTrainerMons_Lamar[] = +const u16 gBattleFrontierTrainerMons_Lamar[] = { FRONTIER_MONS_GENTLEMAN_2 }; -const u16 gBattleFrontierTrainerMons_Jaxon[] = +const u16 gBattleFrontierTrainerMons_Jaxon[] = { FRONTIER_MONS_YOUNGSTER_LASS_3 }; -const u16 gBattleFrontierTrainerMons_Logan[] = +const u16 gBattleFrontierTrainerMons_Logan[] = { FRONTIER_MONS_YOUNGSTER_LASS_3 }; -const u16 gBattleFrontierTrainerMons_Emilee[] = +const u16 gBattleFrontierTrainerMons_Emilee[] = { FRONTIER_MONS_YOUNGSTER_LASS_3 }; -const u16 gBattleFrontierTrainerMons_Josie[] = +const u16 gBattleFrontierTrainerMons_Josie[] = { FRONTIER_MONS_YOUNGSTER_LASS_3 }; -const u16 gBattleFrontierTrainerMons_Armando[] = +const u16 gBattleFrontierTrainerMons_Armando[] = { FRONTIER_MONS_CAMPER_PICNICKER_2 }; -const u16 gBattleFrontierTrainerMons_Skyler[] = +const u16 gBattleFrontierTrainerMons_Skyler[] = { FRONTIER_MONS_CAMPER_PICNICKER_2 }; -const u16 gBattleFrontierTrainerMons_Ruth[] = +const u16 gBattleFrontierTrainerMons_Ruth[] = { FRONTIER_MONS_CAMPER_PICNICKER_2 }; -const u16 gBattleFrontierTrainerMons_Melody[] = +const u16 gBattleFrontierTrainerMons_Melody[] = { FRONTIER_MONS_CAMPER_PICNICKER_2 }; -const u16 gBattleFrontierTrainerMons_Pedro[] = +const u16 gBattleFrontierTrainerMons_Pedro[] = { FRONTIER_MONS_SWIMMER_M_2 }; -const u16 gBattleFrontierTrainerMons_Erick[] = +const u16 gBattleFrontierTrainerMons_Erick[] = { FRONTIER_MONS_SWIMMER_M_2 }; -const u16 gBattleFrontierTrainerMons_Elaine[] = +const u16 gBattleFrontierTrainerMons_Elaine[] = { FRONTIER_MONS_SWIMMER_F_2 }; -const u16 gBattleFrontierTrainerMons_Joyce[] = +const u16 gBattleFrontierTrainerMons_Joyce[] = { FRONTIER_MONS_SWIMMER_F_2 }; -const u16 gBattleFrontierTrainerMons_Todd[] = +const u16 gBattleFrontierTrainerMons_Todd[] = { FRONTIER_MONS_POKEFAN_3 }; -const u16 gBattleFrontierTrainerMons_Gavin[] = +const u16 gBattleFrontierTrainerMons_Gavin[] = { FRONTIER_MONS_POKEFAN_3 }; -const u16 gBattleFrontierTrainerMons_Malory[] = +const u16 gBattleFrontierTrainerMons_Malory[] = { FRONTIER_MONS_POKEFAN_3 }; -const u16 gBattleFrontierTrainerMons_Esther[] = +const u16 gBattleFrontierTrainerMons_Esther[] = { FRONTIER_MONS_POKEFAN_3 }; -const u16 gBattleFrontierTrainerMons_Oscar[] = +const u16 gBattleFrontierTrainerMons_Oscar[] = { FRONTIER_MONS_PKMN_BREEDER_2 }; -const u16 gBattleFrontierTrainerMons_Wilson[] = +const u16 gBattleFrontierTrainerMons_Wilson[] = { FRONTIER_MONS_PKMN_BREEDER_2 }; -const u16 gBattleFrontierTrainerMons_Clare[] = +const u16 gBattleFrontierTrainerMons_Clare[] = { FRONTIER_MONS_PKMN_BREEDER_2 }; -const u16 gBattleFrontierTrainerMons_Tess[] = +const u16 gBattleFrontierTrainerMons_Tess[] = { FRONTIER_MONS_PKMN_BREEDER_2 }; -const u16 gBattleFrontierTrainerMons_Leon[] = +const u16 gBattleFrontierTrainerMons_Leon[] = { FRONTIER_MONS_COOLTRAINER_M_2A }; -const u16 gBattleFrontierTrainerMons_Alonzo[] = +const u16 gBattleFrontierTrainerMons_Alonzo[] = { FRONTIER_MONS_COOLTRAINER_M_2B }; -const u16 gBattleFrontierTrainerMons_Vince[] = +const u16 gBattleFrontierTrainerMons_Vince[] = { FRONTIER_MONS_COOLTRAINER_2C(LATIOS) }; -const u16 gBattleFrontierTrainerMons_Bryon[] = +const u16 gBattleFrontierTrainerMons_Bryon[] = { FRONTIER_MONS_COOLTRAINER_2D(LATIOS) }; -const u16 gBattleFrontierTrainerMons_Ava[] = +const u16 gBattleFrontierTrainerMons_Ava[] = { FRONTIER_MONS_COOLTRAINER_F_2A }; -const u16 gBattleFrontierTrainerMons_Miriam[] = +const u16 gBattleFrontierTrainerMons_Miriam[] = { FRONTIER_MONS_COOLTRAINER_F_2B }; -const u16 gBattleFrontierTrainerMons_Carrie[] = +const u16 gBattleFrontierTrainerMons_Carrie[] = { FRONTIER_MONS_COOLTRAINER_2C(LATIAS) }; -const u16 gBattleFrontierTrainerMons_Gillian2[] = +const u16 gBattleFrontierTrainerMons_Gillian2[] = { FRONTIER_MONS_COOLTRAINER_2D(LATIAS) }; -const u16 gBattleFrontierTrainerMons_Tyler[] = +const u16 gBattleFrontierTrainerMons_Tyler[] = { FRONTIER_MONS_GENERAL_A }; -const u16 gBattleFrontierTrainerMons_Chaz[] = +const u16 gBattleFrontierTrainerMons_Chaz[] = { FRONTIER_MONS_GENERAL_B }; -const u16 gBattleFrontierTrainerMons_Nelson[] = +const u16 gBattleFrontierTrainerMons_Nelson[] = { FRONTIER_MONS_COOLTRAINER_2D(LATIOS) }; -const u16 gBattleFrontierTrainerMons_Shania[] = +const u16 gBattleFrontierTrainerMons_Shania[] = { FRONTIER_MONS_GENERAL_C }; -const u16 gBattleFrontierTrainerMons_Stella[] = +const u16 gBattleFrontierTrainerMons_Stella[] = { FRONTIER_MONS_GENERAL_D }; -const u16 gBattleFrontierTrainerMons_Dorine[] = +const u16 gBattleFrontierTrainerMons_Dorine[] = { FRONTIER_MONS_COOLTRAINER_2D(LATIAS) }; -const u16 gBattleFrontierTrainerMons_Maddox[] = +const u16 gBattleFrontierTrainerMons_Maddox[] = { FRONTIER_MONS_DRAGON_TAMER_2 }; -const u16 gBattleFrontierTrainerMons_Davin[] = +const u16 gBattleFrontierTrainerMons_Davin[] = { FRONTIER_MONS_DRAGON_TAMER_2 }; -const u16 gBattleFrontierTrainerMons_Trevon[] = +const u16 gBattleFrontierTrainerMons_Trevon[] = { FRONTIER_MONS_DRAGON_TAMER_2 }; -const u16 gBattleFrontierTrainerMons_Mateo[] = +const u16 gBattleFrontierTrainerMons_Mateo[] = { FRONTIER_MONS_BLACK_BELT_2A }; -const u16 gBattleFrontierTrainerMons_Bret[] = +const u16 gBattleFrontierTrainerMons_Bret[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_2B }; -const u16 gBattleFrontierTrainerMons_Raul[] = +const u16 gBattleFrontierTrainerMons_Raul[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_2C }; -const u16 gBattleFrontierTrainerMons_Kay[] = +const u16 gBattleFrontierTrainerMons_Kay[] = { FRONTIER_MONS_BATTLE_GIRL_2A }; -const u16 gBattleFrontierTrainerMons_Elena[] = +const u16 gBattleFrontierTrainerMons_Elena[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_2B }; -const u16 gBattleFrontierTrainerMons_Alana[] = +const u16 gBattleFrontierTrainerMons_Alana[] = { FRONTIER_MONS_BLACK_BELT_BATTLE_GIRL_2C }; -const u16 gBattleFrontierTrainerMons_Alexas[] = +const u16 gBattleFrontierTrainerMons_Alexas[] = { FRONTIER_MONS_EXPERT_2A(TYRANITAR) }; -const u16 gBattleFrontierTrainerMons_Weston[] = +const u16 gBattleFrontierTrainerMons_Weston[] = { FRONTIER_MONS_EXPERT_2B(LATIOS) }; -const u16 gBattleFrontierTrainerMons_Jasper[] = +const u16 gBattleFrontierTrainerMons_Jasper[] = { FRONTIER_MONS_EXPERT_2C(TYRANITAR) }; -const u16 gBattleFrontierTrainerMons_Nadia[] = +const u16 gBattleFrontierTrainerMons_Nadia[] = { FRONTIER_MONS_EXPERT_2A(DRAGONITE) }; -const u16 gBattleFrontierTrainerMons_Miranda[] = +const u16 gBattleFrontierTrainerMons_Miranda[] = { FRONTIER_MONS_EXPERT_2B(LATIAS) }; -const u16 gBattleFrontierTrainerMons_Emma[] = +const u16 gBattleFrontierTrainerMons_Emma[] = { FRONTIER_MONS_EXPERT_2C(DRAGONITE) }; -const u16 gBattleFrontierTrainerMons_Rolando[] = +const u16 gBattleFrontierTrainerMons_Rolando[] = { FRONTIER_MONS_PSYCHIC_2A(LATIOS) }; -const u16 gBattleFrontierTrainerMons_Stanly[] = +const u16 gBattleFrontierTrainerMons_Stanly[] = { FRONTIER_MONS_PSYCHIC_2B(LATIOS) }; -const u16 gBattleFrontierTrainerMons_Dario[] = +const u16 gBattleFrontierTrainerMons_Dario[] = { FRONTIER_MONS_PSYCHIC_2C(LATIOS) }; -const u16 gBattleFrontierTrainerMons_Karlee[] = +const u16 gBattleFrontierTrainerMons_Karlee[] = { FRONTIER_MONS_PSYCHIC_2A(LATIAS) }; -const u16 gBattleFrontierTrainerMons_Jaylin[] = +const u16 gBattleFrontierTrainerMons_Jaylin[] = { FRONTIER_MONS_PSYCHIC_2B(LATIAS) }; -const u16 gBattleFrontierTrainerMons_Ingrid[] = +const u16 gBattleFrontierTrainerMons_Ingrid[] = { FRONTIER_MONS_PSYCHIC_2C(LATIAS) }; -const u16 gBattleFrontierTrainerMons_Delilah[] = +const u16 gBattleFrontierTrainerMons_Delilah[] = { FRONTIER_MONS_HEX_MANIAC_2A }; -const u16 gBattleFrontierTrainerMons_Carly[] = +const u16 gBattleFrontierTrainerMons_Carly[] = { FRONTIER_MONS_HEX_MANIAC_2B }; -const u16 gBattleFrontierTrainerMons_Lexie[] = +const u16 gBattleFrontierTrainerMons_Lexie[] = { FRONTIER_MONS_HEX_MANIAC_2C }; -const u16 gBattleFrontierTrainerMons_Miller[] = +const u16 gBattleFrontierTrainerMons_Miller[] = { FRONTIER_MONS_POKEMANIAC_2A }; -const u16 gBattleFrontierTrainerMons_Marv[] = +const u16 gBattleFrontierTrainerMons_Marv[] = { FRONTIER_MONS_POKEMANIAC_2B }; -const u16 gBattleFrontierTrainerMons_Layton[] = +const u16 gBattleFrontierTrainerMons_Layton[] = { FRONTIER_MONS_POKEMANIAC_2C }; -const u16 gBattleFrontierTrainerMons_Brooks[] = +const u16 gBattleFrontierTrainerMons_Brooks[] = { FRONTIER_MONS_GENERAL_A }; -const u16 gBattleFrontierTrainerMons_Gregory[] = +const u16 gBattleFrontierTrainerMons_Gregory[] = { FRONTIER_MONS_GENTLEMAN_3A }; -const u16 gBattleFrontierTrainerMons_Reese[] = +const u16 gBattleFrontierTrainerMons_Reese[] = { FRONTIER_MONS_GENTLEMAN_3B }; -const u16 gBattleFrontierTrainerMons_Mason[] = +const u16 gBattleFrontierTrainerMons_Mason[] = { FRONTIER_MONS_GENERAL_A }; -const u16 gBattleFrontierTrainerMons_Toby[] = +const u16 gBattleFrontierTrainerMons_Toby[] = { FRONTIER_MONS_GENERAL_B }; -const u16 gBattleFrontierTrainerMons_Dorothy[] = +const u16 gBattleFrontierTrainerMons_Dorothy[] = { FRONTIER_MONS_GENERAL_C }; -const u16 gBattleFrontierTrainerMons_Piper[] = +const u16 gBattleFrontierTrainerMons_Piper[] = { FRONTIER_MONS_GENERAL_D }; -const u16 gBattleFrontierTrainerMons_Finn[] = +const u16 gBattleFrontierTrainerMons_Finn[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_M_3 }; -const u16 gBattleFrontierTrainerMons_Samir[] = +const u16 gBattleFrontierTrainerMons_Samir[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_M_3 }; -const u16 gBattleFrontierTrainerMons_Fiona[] = +const u16 gBattleFrontierTrainerMons_Fiona[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_F_3 }; -const u16 gBattleFrontierTrainerMons_Gloria[] = +const u16 gBattleFrontierTrainerMons_Gloria[] = { FRONTIER_MONS_SWIMMING_TRIATHLETE_F_3 }; -const u16 gBattleFrontierTrainerMons_Nico[] = +const u16 gBattleFrontierTrainerMons_Nico[] = { FRONTIER_MONS_GENERAL_A }; -const u16 gBattleFrontierTrainerMons_Jeremy[] = +const u16 gBattleFrontierTrainerMons_Jeremy[] = { FRONTIER_MONS_GENERAL_B }; -const u16 gBattleFrontierTrainerMons_Caitlin[] = +const u16 gBattleFrontierTrainerMons_Caitlin[] = { FRONTIER_MONS_GENERAL_C }; -const u16 gBattleFrontierTrainerMons_Reena[] = +const u16 gBattleFrontierTrainerMons_Reena[] = { FRONTIER_MONS_GENERAL_D }; -const u16 gBattleFrontierTrainerMons_Avery[] = +const u16 gBattleFrontierTrainerMons_Avery[] = { FRONTIER_MONS_BUG_MANIAC_4 }; -const u16 gBattleFrontierTrainerMons_Liam[] = +const u16 gBattleFrontierTrainerMons_Liam[] = { FRONTIER_MONS_BUG_MANIAC_4 }; -const u16 gBattleFrontierTrainerMons_Theo[] = +const u16 gBattleFrontierTrainerMons_Theo[] = { FRONTIER_MONS_FISHERMAN_3 }; -const u16 gBattleFrontierTrainerMons_Bailey[] = +const u16 gBattleFrontierTrainerMons_Bailey[] = { FRONTIER_MONS_FISHERMAN_3 }; -const u16 gBattleFrontierTrainerMons_Hugo[] = +const u16 gBattleFrontierTrainerMons_Hugo[] = { FRONTIER_MONS_RUIN_MANIAC_4 }; -const u16 gBattleFrontierTrainerMons_Bryce[] = +const u16 gBattleFrontierTrainerMons_Bryce[] = { FRONTIER_MONS_RUIN_MANIAC_4 }; -const u16 gBattleFrontierTrainerMons_Gideon[] = +const u16 gBattleFrontierTrainerMons_Gideon[] = { FRONTIER_MONS_COLLECTOR_3 }; -const u16 gBattleFrontierTrainerMons_Triston[] = +const u16 gBattleFrontierTrainerMons_Triston[] = { FRONTIER_MONS_COLLECTOR_3 }; -const u16 gBattleFrontierTrainerMons_Charles[] = +const u16 gBattleFrontierTrainerMons_Charles[] = { FRONTIER_MONS_GUITARIST_3A }; -const u16 gBattleFrontierTrainerMons_Raymond[] = +const u16 gBattleFrontierTrainerMons_Raymond[] = { FRONTIER_MONS_GUITARIST_3B }; -const u16 gBattleFrontierTrainerMons_Dirk[] = +const u16 gBattleFrontierTrainerMons_Dirk[] = { FRONTIER_MONS_BIRD_KEEPER_3 }; -const u16 gBattleFrontierTrainerMons_Harold[] = +const u16 gBattleFrontierTrainerMons_Harold[] = { FRONTIER_MONS_BIRD_KEEPER_3 }; -const u16 gBattleFrontierTrainerMons_Omar[] = +const u16 gBattleFrontierTrainerMons_Omar[] = { FRONTIER_MONS_SAILOR_3 }; -const u16 gBattleFrontierTrainerMons_Peter[] = +const u16 gBattleFrontierTrainerMons_Peter[] = { FRONTIER_MONS_SAILOR_3 }; -const u16 gBattleFrontierTrainerMons_Dev[] = +const u16 gBattleFrontierTrainerMons_Dev[] = { FRONTIER_MONS_HIKER_3 }; -const u16 gBattleFrontierTrainerMons_Corey[] = +const u16 gBattleFrontierTrainerMons_Corey[] = { FRONTIER_MONS_HIKER_3 }; -const u16 gBattleFrontierTrainerMons_Andre[] = +const u16 gBattleFrontierTrainerMons_Andre[] = { FRONTIER_MONS_KINDLER_3 }; -const u16 gBattleFrontierTrainerMons_Ferris[] = +const u16 gBattleFrontierTrainerMons_Ferris[] = { FRONTIER_MONS_KINDLER_3 }; -const u16 gBattleFrontierTrainerMons_Alivia[] = +const u16 gBattleFrontierTrainerMons_Alivia[] = { FRONTIER_MONS_PARASOL_LADY_3 }; -const u16 gBattleFrontierTrainerMons_Paige[] = +const u16 gBattleFrontierTrainerMons_Paige[] = { FRONTIER_MONS_PARASOL_LADY_3 }; -const u16 gBattleFrontierTrainerMons_Anya[] = +const u16 gBattleFrontierTrainerMons_Anya[] = { FRONTIER_MONS_EEVEELUTIONS }; -const u16 gBattleFrontierTrainerMons_Dawn[] = +const u16 gBattleFrontierTrainerMons_Dawn[] = { FRONTIER_MONS_BEAUTY_2 }; -const u16 gBattleFrontierTrainerMons_Abby[] = +const u16 gBattleFrontierTrainerMons_Abby[] = { FRONTIER_MONS_AROMA_LADY_3 }; -const u16 gBattleFrontierTrainerMons_Gretel[] = +const u16 gBattleFrontierTrainerMons_Gretel[] = { FRONTIER_MONS_AROMA_LADY_3 }; diff --git a/src/data/battle_frontier/battle_tent.h b/src/data/battle_frontier/battle_tent.h index e1c3750bf8..de08dcfd63 100644 --- a/src/data/battle_frontier/battle_tent.h +++ b/src/data/battle_frontier/battle_tent.h @@ -1,5 +1,5 @@ // Slateport Battle Tent. -const u16 gSlateportBattleTentTrainerMons_Jolie[] = +const u16 gSlateportBattleTentTrainerMons_Jolie[] = { SLATEPORT_TENT_MON_CACNEA_1, SLATEPORT_TENT_MON_LOMBRE_1, @@ -15,7 +15,7 @@ const u16 gSlateportBattleTentTrainerMons_Jolie[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Malachi[] = +const u16 gSlateportBattleTentTrainerMons_Malachi[] = { SLATEPORT_TENT_MON_CACNEA_1, SLATEPORT_TENT_MON_GRAVELER, @@ -31,7 +31,7 @@ const u16 gSlateportBattleTentTrainerMons_Malachi[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Kelsie[] = +const u16 gSlateportBattleTentTrainerMons_Kelsie[] = { SLATEPORT_TENT_MON_WAILMER_1, SLATEPORT_TENT_MON_WAILMER_2, @@ -47,7 +47,7 @@ const u16 gSlateportBattleTentTrainerMons_Kelsie[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Davon[] = +const u16 gSlateportBattleTentTrainerMons_Davon[] = { SLATEPORT_TENT_MON_WAILMER_1, SLATEPORT_TENT_MON_WAILMER_2, @@ -64,7 +64,7 @@ const u16 gSlateportBattleTentTrainerMons_Davon[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Glenda[] = +const u16 gSlateportBattleTentTrainerMons_Glenda[] = { SLATEPORT_TENT_MON_ZIGZAGOON_1, SLATEPORT_TENT_MON_ZIGZAGOON_2, @@ -82,7 +82,7 @@ const u16 gSlateportBattleTentTrainerMons_Glenda[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Helena[] = +const u16 gSlateportBattleTentTrainerMons_Helena[] = { SLATEPORT_TENT_MON_MIGHTYENA_1, SLATEPORT_TENT_MON_MIGHTYENA_2, @@ -98,7 +98,7 @@ const u16 gSlateportBattleTentTrainerMons_Helena[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Rodolfo[] = +const u16 gSlateportBattleTentTrainerMons_Rodolfo[] = { SLATEPORT_TENT_MON_ZIGZAGOON_1, SLATEPORT_TENT_MON_ZIGZAGOON_2, @@ -116,7 +116,7 @@ const u16 gSlateportBattleTentTrainerMons_Rodolfo[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Davion[] = +const u16 gSlateportBattleTentTrainerMons_Davion[] = { SLATEPORT_TENT_MON_BALTOY, SLATEPORT_TENT_MON_VOLTORB, @@ -135,7 +135,7 @@ const u16 gSlateportBattleTentTrainerMons_Davion[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Kendall[] = +const u16 gSlateportBattleTentTrainerMons_Kendall[] = { SLATEPORT_TENT_MON_WAILMER_1, SLATEPORT_TENT_MON_WINGULL_1, @@ -154,7 +154,7 @@ const u16 gSlateportBattleTentTrainerMons_Kendall[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Colten[] = +const u16 gSlateportBattleTentTrainerMons_Colten[] = { SLATEPORT_TENT_MON_ZIGZAGOON_1, SLATEPORT_TENT_MON_BEAUTIFLY, @@ -171,7 +171,7 @@ const u16 gSlateportBattleTentTrainerMons_Colten[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Irvin[] = +const u16 gSlateportBattleTentTrainerMons_Irvin[] = { SLATEPORT_TENT_MON_ZIGZAGOON_1, SLATEPORT_TENT_MON_ZIGZAGOON_2, @@ -189,7 +189,7 @@ const u16 gSlateportBattleTentTrainerMons_Irvin[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Shaun[] = +const u16 gSlateportBattleTentTrainerMons_Shaun[] = { SLATEPORT_TENT_MON_BALTOY, SLATEPORT_TENT_MON_MIGHTYENA_1, @@ -207,7 +207,7 @@ const u16 gSlateportBattleTentTrainerMons_Shaun[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Kyler[] = +const u16 gSlateportBattleTentTrainerMons_Kyler[] = { SLATEPORT_TENT_MON_ELECTRIKE_1, SLATEPORT_TENT_MON_VOLTORB, @@ -224,7 +224,7 @@ const u16 gSlateportBattleTentTrainerMons_Kyler[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Maggie[] = +const u16 gSlateportBattleTentTrainerMons_Maggie[] = { SLATEPORT_TENT_MON_LOMBRE_1, SLATEPORT_TENT_MON_NUZLEAF, @@ -240,7 +240,7 @@ const u16 gSlateportBattleTentTrainerMons_Maggie[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Stephon[] = +const u16 gSlateportBattleTentTrainerMons_Stephon[] = { SLATEPORT_TENT_MON_PELIPPER_1, SLATEPORT_TENT_MON_LOMBRE_1, @@ -256,7 +256,7 @@ const u16 gSlateportBattleTentTrainerMons_Stephon[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Rebecca[] = +const u16 gSlateportBattleTentTrainerMons_Rebecca[] = { SLATEPORT_TENT_MON_PELIPPER_1, SLATEPORT_TENT_MON_NUZLEAF, @@ -272,7 +272,7 @@ const u16 gSlateportBattleTentTrainerMons_Rebecca[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Reggie[] = +const u16 gSlateportBattleTentTrainerMons_Reggie[] = { SLATEPORT_TENT_MON_MARILL_1, SLATEPORT_TENT_MON_WINGULL_1, @@ -289,7 +289,7 @@ const u16 gSlateportBattleTentTrainerMons_Reggie[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Janae[] = +const u16 gSlateportBattleTentTrainerMons_Janae[] = { SLATEPORT_TENT_MON_ZIGZAGOON_1, SLATEPORT_TENT_MON_ZIGZAGOON_2, @@ -306,7 +306,7 @@ const u16 gSlateportBattleTentTrainerMons_Janae[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Caiden[] = +const u16 gSlateportBattleTentTrainerMons_Caiden[] = { SLATEPORT_TENT_MON_LOMBRE_1, SLATEPORT_TENT_MON_NINJASK_1, @@ -324,7 +324,7 @@ const u16 gSlateportBattleTentTrainerMons_Caiden[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Kirsten[] = +const u16 gSlateportBattleTentTrainerMons_Kirsten[] = { SLATEPORT_TENT_MON_LOMBRE_1, SLATEPORT_TENT_MON_GRAVELER, @@ -342,7 +342,7 @@ const u16 gSlateportBattleTentTrainerMons_Kirsten[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Kurtis[] = +const u16 gSlateportBattleTentTrainerMons_Kurtis[] = { SLATEPORT_TENT_MON_ZIGZAGOON_1, SLATEPORT_TENT_MON_ZIGZAGOON_2, @@ -358,7 +358,7 @@ const u16 gSlateportBattleTentTrainerMons_Kurtis[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Stefan[] = +const u16 gSlateportBattleTentTrainerMons_Stefan[] = { SLATEPORT_TENT_MON_WAILMER_1, SLATEPORT_TENT_MON_WAILMER_2, @@ -374,7 +374,7 @@ const u16 gSlateportBattleTentTrainerMons_Stefan[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Avery[] = +const u16 gSlateportBattleTentTrainerMons_Avery[] = { SLATEPORT_TENT_MON_BEAUTIFLY, SLATEPORT_TENT_MON_DUSTOX, @@ -390,7 +390,7 @@ const u16 gSlateportBattleTentTrainerMons_Avery[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Dwane[] = +const u16 gSlateportBattleTentTrainerMons_Dwane[] = { SLATEPORT_TENT_MON_NINJASK_1, SLATEPORT_TENT_MON_NINJASK_2, @@ -406,7 +406,7 @@ const u16 gSlateportBattleTentTrainerMons_Dwane[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Mckenna[] = +const u16 gSlateportBattleTentTrainerMons_Mckenna[] = { SLATEPORT_TENT_MON_CACNEA_2, SLATEPORT_TENT_MON_SWELLOW, @@ -422,7 +422,7 @@ const u16 gSlateportBattleTentTrainerMons_Mckenna[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Camryn[] = +const u16 gSlateportBattleTentTrainerMons_Camryn[] = { SLATEPORT_TENT_MON_WAILMER_2, SLATEPORT_TENT_MON_MARILL_1, @@ -439,7 +439,7 @@ const u16 gSlateportBattleTentTrainerMons_Camryn[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Natasha[] = +const u16 gSlateportBattleTentTrainerMons_Natasha[] = { SLATEPORT_TENT_MON_ZIGZAGOON_2, SLATEPORT_TENT_MON_DUSTOX, @@ -455,7 +455,7 @@ const u16 gSlateportBattleTentTrainerMons_Natasha[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Austyn[] = +const u16 gSlateportBattleTentTrainerMons_Austyn[] = { SLATEPORT_TENT_MON_ARON_2, SLATEPORT_TENT_MON_LOUDRED, @@ -472,7 +472,7 @@ const u16 gSlateportBattleTentTrainerMons_Austyn[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Donovan[] = +const u16 gSlateportBattleTentTrainerMons_Donovan[] = { SLATEPORT_TENT_MON_LOMBRE_1, SLATEPORT_TENT_MON_GRAVELER, @@ -491,7 +491,7 @@ const u16 gSlateportBattleTentTrainerMons_Donovan[] = -1 }; -const u16 gSlateportBattleTentTrainerMons_Tamia[] = +const u16 gSlateportBattleTentTrainerMons_Tamia[] = { SLATEPORT_TENT_MON_BEAUTIFLY, SLATEPORT_TENT_MON_MARILL_1, @@ -507,7 +507,7 @@ const u16 gSlateportBattleTentTrainerMons_Tamia[] = -1 }; -const struct BattleFrontierTrainer gSlateportBattleTentTrainers[NUM_BATTLE_TENT_TRAINERS] = +const struct BattleFrontierTrainer gSlateportBattleTentTrainers[NUM_BATTLE_TENT_TRAINERS] = { [SLATEPORT_TENT_TRAINER_JOLIE] = { .facilityClass = FACILITY_CLASS_AROMA_LADY, @@ -751,7 +751,7 @@ const struct BattleFrontierTrainer gSlateportBattleTentTrainers[NUM_BATTLE_TENT_ } }; -const struct FacilityMon gSlateportBattleTentMons[NUM_SLATEPORT_TENT_MONS] = +const struct FacilityMon gSlateportBattleTentMons[NUM_SLATEPORT_TENT_MONS] = { [SLATEPORT_TENT_MON_ZIGZAGOON_1] = { .species = SPECIES_ZIGZAGOON, @@ -1246,7 +1246,7 @@ const struct FacilityMon gSlateportBattleTentMons[NUM_SLATEPORT_TENT_MONS] = }; // Verdanturf Battle Tent. -const u16 gVerdanturfBattleTentTrainerMons_Brenna[] = +const u16 gVerdanturfBattleTentTrainerMons_Brenna[] = { VERDANTURF_TENT_MON_SHROOMISH, VERDANTURF_TENT_MON_SWALOT, @@ -1256,7 +1256,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Brenna[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Dilan[] = +const u16 gVerdanturfBattleTentTrainerMons_Dilan[] = { VERDANTURF_TENT_MON_GRAVELER, VERDANTURF_TENT_MON_TRAPINCH, @@ -1266,7 +1266,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Dilan[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Eliana[] = +const u16 gVerdanturfBattleTentTrainerMons_Eliana[] = { VERDANTURF_TENT_MON_MAGIKARP, VERDANTURF_TENT_MON_BARBOACH, @@ -1276,7 +1276,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Eliana[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Markus[] = +const u16 gVerdanturfBattleTentTrainerMons_Markus[] = { VERDANTURF_TENT_MON_MAGIKARP, VERDANTURF_TENT_MON_BARBOACH, @@ -1286,7 +1286,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Markus[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Caitlyn[] = +const u16 gVerdanturfBattleTentTrainerMons_Caitlyn[] = { VERDANTURF_TENT_MON_POOCHYENA, VERDANTURF_TENT_MON_KECLEON, @@ -1297,7 +1297,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Caitlyn[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Desiree[] = +const u16 gVerdanturfBattleTentTrainerMons_Desiree[] = { VERDANTURF_TENT_MON_WINGULL, VERDANTURF_TENT_MON_KECLEON, @@ -1307,7 +1307,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Desiree[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Ronald[] = +const u16 gVerdanturfBattleTentTrainerMons_Ronald[] = { VERDANTURF_TENT_MON_ZIGZAGOON, VERDANTURF_TENT_MON_LINOONE, @@ -1317,7 +1317,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Ronald[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Ashten[] = +const u16 gVerdanturfBattleTentTrainerMons_Ashten[] = { VERDANTURF_TENT_MON_ARON_1, VERDANTURF_TENT_MON_KECLEON, @@ -1327,7 +1327,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Ashten[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Gerard[] = +const u16 gVerdanturfBattleTentTrainerMons_Gerard[] = { VERDANTURF_TENT_MON_MARILL, VERDANTURF_TENT_MON_BARBOACH, @@ -1337,7 +1337,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Gerard[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Bradly[] = +const u16 gVerdanturfBattleTentTrainerMons_Bradly[] = { VERDANTURF_TENT_MON_NUZLEAF, VERDANTURF_TENT_MON_TAILLOW, @@ -1347,7 +1347,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Bradly[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Dennis[] = +const u16 gVerdanturfBattleTentTrainerMons_Dennis[] = { VERDANTURF_TENT_MON_NINJASK, VERDANTURF_TENT_MON_TRAPINCH, @@ -1357,7 +1357,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Dennis[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Prestin[] = +const u16 gVerdanturfBattleTentTrainerMons_Prestin[] = { VERDANTURF_TENT_MON_KADABRA, VERDANTURF_TENT_MON_MIGHTYENA, @@ -1369,7 +1369,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Prestin[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Ernesto[] = +const u16 gVerdanturfBattleTentTrainerMons_Ernesto[] = { VERDANTURF_TENT_MON_MAGNEMITE, VERDANTURF_TENT_MON_VOLTORB, @@ -1379,7 +1379,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Ernesto[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Nala[] = +const u16 gVerdanturfBattleTentTrainerMons_Nala[] = { VERDANTURF_TENT_MON_ZIGZAGOON, VERDANTURF_TENT_MON_SHROOMISH, @@ -1391,7 +1391,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Nala[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Darnell[] = +const u16 gVerdanturfBattleTentTrainerMons_Darnell[] = { VERDANTURF_TENT_MON_POOCHYENA, VERDANTURF_TENT_MON_SOLROCK, @@ -1402,7 +1402,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Darnell[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Ashlyn[] = +const u16 gVerdanturfBattleTentTrainerMons_Ashlyn[] = { VERDANTURF_TENT_MON_SOLROCK, VERDANTURF_TENT_MON_MARILL, @@ -1414,7 +1414,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Ashlyn[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Addison[] = +const u16 gVerdanturfBattleTentTrainerMons_Addison[] = { VERDANTURF_TENT_MON_POOCHYENA, VERDANTURF_TENT_MON_ZIGZAGOON, @@ -1424,7 +1424,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Addison[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Justine[] = +const u16 gVerdanturfBattleTentTrainerMons_Justine[] = { VERDANTURF_TENT_MON_POOCHYENA, VERDANTURF_TENT_MON_ZIGZAGOON, @@ -1434,7 +1434,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Justine[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Tyson[] = +const u16 gVerdanturfBattleTentTrainerMons_Tyson[] = { VERDANTURF_TENT_MON_MACHOP, VERDANTURF_TENT_MON_MAKUHITA, @@ -1446,7 +1446,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Tyson[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Laila[] = +const u16 gVerdanturfBattleTentTrainerMons_Laila[] = { VERDANTURF_TENT_MON_MACHOP, VERDANTURF_TENT_MON_MAKUHITA, @@ -1457,7 +1457,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Laila[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Waren[] = +const u16 gVerdanturfBattleTentTrainerMons_Waren[] = { VERDANTURF_TENT_MON_POOCHYENA, VERDANTURF_TENT_MON_ARON_1, @@ -1467,7 +1467,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Waren[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Tobias[] = +const u16 gVerdanturfBattleTentTrainerMons_Tobias[] = { VERDANTURF_TENT_MON_MAGIKARP, VERDANTURF_TENT_MON_BARBOACH, @@ -1477,7 +1477,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Tobias[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Josiah[] = +const u16 gVerdanturfBattleTentTrainerMons_Josiah[] = { VERDANTURF_TENT_MON_WINGULL, VERDANTURF_TENT_MON_SWABLU, @@ -1487,7 +1487,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Josiah[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Dion[] = +const u16 gVerdanturfBattleTentTrainerMons_Dion[] = { VERDANTURF_TENT_MON_NINJASK, VERDANTURF_TENT_MON_DUSTOX, @@ -1498,7 +1498,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Dion[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Kenzie[] = +const u16 gVerdanturfBattleTentTrainerMons_Kenzie[] = { VERDANTURF_TENT_MON_LOTAD, VERDANTURF_TENT_MON_NUMEL_1, @@ -1509,7 +1509,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Kenzie[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Lillian[] = +const u16 gVerdanturfBattleTentTrainerMons_Lillian[] = { VERDANTURF_TENT_MON_GOLDEEN_2, VERDANTURF_TENT_MON_PELIPPER, @@ -1519,7 +1519,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Lillian[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Lesley[] = +const u16 gVerdanturfBattleTentTrainerMons_Lesley[] = { VERDANTURF_TENT_MON_NUZLEAF, VERDANTURF_TENT_MON_POOCHYENA, @@ -1529,7 +1529,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Lesley[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Marquis[] = +const u16 gVerdanturfBattleTentTrainerMons_Marquis[] = { VERDANTURF_TENT_MON_GOLDEEN_2, VERDANTURF_TENT_MON_PELIPPER, @@ -1540,7 +1540,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Marquis[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Freddy[] = +const u16 gVerdanturfBattleTentTrainerMons_Freddy[] = { VERDANTURF_TENT_MON_LOTAD, VERDANTURF_TENT_MON_SEVIPER, @@ -1550,7 +1550,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Freddy[] = -1 }; -const u16 gVerdanturfBattleTentTrainerMons_Cecilia[] = +const u16 gVerdanturfBattleTentTrainerMons_Cecilia[] = { VERDANTURF_TENT_MON_SWELLOW, VERDANTURF_TENT_MON_NUZLEAF, @@ -1560,7 +1560,7 @@ const u16 gVerdanturfBattleTentTrainerMons_Cecilia[] = -1 }; -const struct BattleFrontierTrainer gVerdanturfBattleTentTrainers[NUM_BATTLE_TENT_TRAINERS] = +const struct BattleFrontierTrainer gVerdanturfBattleTentTrainers[NUM_BATTLE_TENT_TRAINERS] = { [VERDANTURF_TENT_TRAINER_BRENNA] = { .facilityClass = FACILITY_CLASS_AROMA_LADY, @@ -1804,7 +1804,7 @@ const struct BattleFrontierTrainer gVerdanturfBattleTentTrainers[NUM_BATTLE_TENT } }; -const struct FacilityMon gVerdanturfBattleTentMons[NUM_VERDANTURF_TENT_MONS] = +const struct FacilityMon gVerdanturfBattleTentMons[NUM_VERDANTURF_TENT_MONS] = { [VERDANTURF_TENT_MON_POOCHYENA] = { .species = SPECIES_POOCHYENA, @@ -2124,7 +2124,7 @@ const struct FacilityMon gVerdanturfBattleTentMons[NUM_VERDANTURF_TENT_MONS] = }; // Fallarbor Battle Tent. -const u16 gFallarborBattleTentTrainerMons_Amber[] = +const u16 gFallarborBattleTentTrainerMons_Amber[] = { FALLARBOR_TENT_MON_SWALOT, FALLARBOR_TENT_MON_SHROOMISH, @@ -2135,7 +2135,7 @@ const u16 gFallarborBattleTentTrainerMons_Amber[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Javier[] = +const u16 gFallarborBattleTentTrainerMons_Javier[] = { FALLARBOR_TENT_MON_SOLROCK, FALLARBOR_TENT_MON_TRAPINCH, @@ -2146,7 +2146,7 @@ const u16 gFallarborBattleTentTrainerMons_Javier[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Natalie[] = +const u16 gFallarborBattleTentTrainerMons_Natalie[] = { FALLARBOR_TENT_MON_MAGIKARP, FALLARBOR_TENT_MON_PELIPPER, @@ -2156,7 +2156,7 @@ const u16 gFallarborBattleTentTrainerMons_Natalie[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Treve[] = +const u16 gFallarborBattleTentTrainerMons_Treve[] = { FALLARBOR_TENT_MON_WINGULL, FALLARBOR_TENT_MON_PELIPPER, @@ -2166,7 +2166,7 @@ const u16 gFallarborBattleTentTrainerMons_Treve[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Arianna[] = +const u16 gFallarborBattleTentTrainerMons_Arianna[] = { FALLARBOR_TENT_MON_ELECTRIKE, FALLARBOR_TENT_MON_LINOONE_2, @@ -2176,7 +2176,7 @@ const u16 gFallarborBattleTentTrainerMons_Arianna[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Jadyn[] = +const u16 gFallarborBattleTentTrainerMons_Jadyn[] = { FALLARBOR_TENT_MON_NUMEL, FALLARBOR_TENT_MON_LOUDRED, @@ -2187,7 +2187,7 @@ const u16 gFallarborBattleTentTrainerMons_Jadyn[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Gerardo[] = +const u16 gFallarborBattleTentTrainerMons_Gerardo[] = { FALLARBOR_TENT_MON_SOLROCK, FALLARBOR_TENT_MON_ELECTRIKE, @@ -2197,7 +2197,7 @@ const u16 gFallarborBattleTentTrainerMons_Gerardo[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Jonn[] = +const u16 gFallarborBattleTentTrainerMons_Jonn[] = { FALLARBOR_TENT_MON_ARON_1, FALLARBOR_TENT_MON_ARON_2, @@ -2207,7 +2207,7 @@ const u16 gFallarborBattleTentTrainerMons_Jonn[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Esteban[] = +const u16 gFallarborBattleTentTrainerMons_Esteban[] = { FALLARBOR_TENT_MON_MAGIKARP, FALLARBOR_TENT_MON_WINGULL, @@ -2217,7 +2217,7 @@ const u16 gFallarborBattleTentTrainerMons_Esteban[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Jameson[] = +const u16 gFallarborBattleTentTrainerMons_Jameson[] = { FALLARBOR_TENT_MON_LINOONE_1, FALLARBOR_TENT_MON_PLUSLE, @@ -2227,7 +2227,7 @@ const u16 gFallarborBattleTentTrainerMons_Jameson[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Alanzo[] = +const u16 gFallarborBattleTentTrainerMons_Alanzo[] = { FALLARBOR_TENT_MON_NINCADA, FALLARBOR_TENT_MON_BEAUTIFLY, @@ -2239,7 +2239,7 @@ const u16 gFallarborBattleTentTrainerMons_Alanzo[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Howard[] = +const u16 gFallarborBattleTentTrainerMons_Howard[] = { FALLARBOR_TENT_MON_ELECTRIKE, FALLARBOR_TENT_MON_LINOONE_2, @@ -2249,7 +2249,7 @@ const u16 gFallarborBattleTentTrainerMons_Howard[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Conrad[] = +const u16 gFallarborBattleTentTrainerMons_Conrad[] = { FALLARBOR_TENT_MON_ELECTRIKE, FALLARBOR_TENT_MON_MAGNEMITE, @@ -2259,7 +2259,7 @@ const u16 gFallarborBattleTentTrainerMons_Conrad[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Makenna[] = +const u16 gFallarborBattleTentTrainerMons_Makenna[] = { FALLARBOR_TENT_MON_KECLEON, FALLARBOR_TENT_MON_WHISMUR, @@ -2269,7 +2269,7 @@ const u16 gFallarborBattleTentTrainerMons_Makenna[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Brayan[] = +const u16 gFallarborBattleTentTrainerMons_Brayan[] = { FALLARBOR_TENT_MON_NUMEL, FALLARBOR_TENT_MON_KECLEON, @@ -2281,7 +2281,7 @@ const u16 gFallarborBattleTentTrainerMons_Brayan[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Mariana[] = +const u16 gFallarborBattleTentTrainerMons_Mariana[] = { FALLARBOR_TENT_MON_NUMEL, FALLARBOR_TENT_MON_KECLEON, @@ -2293,7 +2293,7 @@ const u16 gFallarborBattleTentTrainerMons_Mariana[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Sheldon[] = +const u16 gFallarborBattleTentTrainerMons_Sheldon[] = { FALLARBOR_TENT_MON_PLUSLE, FALLARBOR_TENT_MON_POOCHYENA, @@ -2303,7 +2303,7 @@ const u16 gFallarborBattleTentTrainerMons_Sheldon[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Gianna[] = +const u16 gFallarborBattleTentTrainerMons_Gianna[] = { FALLARBOR_TENT_MON_LINOONE_1, FALLARBOR_TENT_MON_PLUSLE, @@ -2313,7 +2313,7 @@ const u16 gFallarborBattleTentTrainerMons_Gianna[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Yahir[] = +const u16 gFallarborBattleTentTrainerMons_Yahir[] = { FALLARBOR_TENT_MON_KECLEON, FALLARBOR_TENT_MON_MACHOKE, @@ -2324,7 +2324,7 @@ const u16 gFallarborBattleTentTrainerMons_Yahir[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Britney[] = +const u16 gFallarborBattleTentTrainerMons_Britney[] = { FALLARBOR_TENT_MON_KECLEON, FALLARBOR_TENT_MON_MAKUHITA, @@ -2335,7 +2335,7 @@ const u16 gFallarborBattleTentTrainerMons_Britney[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Hecter[] = +const u16 gFallarborBattleTentTrainerMons_Hecter[] = { FALLARBOR_TENT_MON_NUMEL, FALLARBOR_TENT_MON_LINOONE_1, @@ -2346,7 +2346,7 @@ const u16 gFallarborBattleTentTrainerMons_Hecter[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Tannor[] = +const u16 gFallarborBattleTentTrainerMons_Tannor[] = { FALLARBOR_TENT_MON_MAGIKARP, FALLARBOR_TENT_MON_BARBOACH, @@ -2356,7 +2356,7 @@ const u16 gFallarborBattleTentTrainerMons_Tannor[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Benji[] = +const u16 gFallarborBattleTentTrainerMons_Benji[] = { FALLARBOR_TENT_MON_SWABLU, FALLARBOR_TENT_MON_SKARMORY, @@ -2366,7 +2366,7 @@ const u16 gFallarborBattleTentTrainerMons_Benji[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Rory[] = +const u16 gFallarborBattleTentTrainerMons_Rory[] = { FALLARBOR_TENT_MON_NINCADA, FALLARBOR_TENT_MON_DUSTOX, @@ -2377,7 +2377,7 @@ const u16 gFallarborBattleTentTrainerMons_Rory[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Eleanor[] = +const u16 gFallarborBattleTentTrainerMons_Eleanor[] = { FALLARBOR_TENT_MON_LINOONE_2, FALLARBOR_TENT_MON_WINGULL, @@ -2389,7 +2389,7 @@ const u16 gFallarborBattleTentTrainerMons_Eleanor[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Evelyn[] = +const u16 gFallarborBattleTentTrainerMons_Evelyn[] = { FALLARBOR_TENT_MON_PELIPPER, FALLARBOR_TENT_MON_WAILMER, @@ -2399,7 +2399,7 @@ const u16 gFallarborBattleTentTrainerMons_Evelyn[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Arielle[] = +const u16 gFallarborBattleTentTrainerMons_Arielle[] = { FALLARBOR_TENT_MON_LINOONE_1, FALLARBOR_TENT_MON_POOCHYENA, @@ -2409,7 +2409,7 @@ const u16 gFallarborBattleTentTrainerMons_Arielle[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Connar[] = +const u16 gFallarborBattleTentTrainerMons_Connar[] = { FALLARBOR_TENT_MON_MAKUHITA, FALLARBOR_TENT_MON_MACHOKE, @@ -2420,7 +2420,7 @@ const u16 gFallarborBattleTentTrainerMons_Connar[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Maurice[] = +const u16 gFallarborBattleTentTrainerMons_Maurice[] = { FALLARBOR_TENT_MON_KECLEON, FALLARBOR_TENT_MON_MAGIKARP, @@ -2430,7 +2430,7 @@ const u16 gFallarborBattleTentTrainerMons_Maurice[] = -1 }; -const u16 gFallarborBattleTentTrainerMons_Kianna[] = +const u16 gFallarborBattleTentTrainerMons_Kianna[] = { FALLARBOR_TENT_MON_LOUDRED, FALLARBOR_TENT_MON_MIGHTYENA, @@ -2441,7 +2441,7 @@ const u16 gFallarborBattleTentTrainerMons_Kianna[] = -1 }; -const struct BattleFrontierTrainer gFallarborBattleTentTrainers[NUM_BATTLE_TENT_TRAINERS] = +const struct BattleFrontierTrainer gFallarborBattleTentTrainers[NUM_BATTLE_TENT_TRAINERS] = { [FALLARBOR_TENT_TRAINER_AMBER] = { .facilityClass = FACILITY_CLASS_AROMA_LADY, @@ -2685,7 +2685,7 @@ const struct BattleFrontierTrainer gFallarborBattleTentTrainers[NUM_BATTLE_TENT_ } }; -const struct FacilityMon gFallarborBattleTentMons[NUM_FALLARBOR_TENT_MONS] = +const struct FacilityMon gFallarborBattleTentMons[NUM_FALLARBOR_TENT_MONS] = { [FALLARBOR_TENT_MON_NUMEL] = { .species = SPECIES_NUMEL, diff --git a/src/data/battle_frontier/trainer_hill.h b/src/data/battle_frontier/trainer_hill.h index 127eb8ed4d..75785b2589 100644 --- a/src/data/battle_frontier/trainer_hill.h +++ b/src/data/battle_frontier/trainer_hill.h @@ -194,22 +194,22 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x35, 0x35, 0x3b, 0x26, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x3b, 0x3b, 0x08, - 0x31, 0x2b, 0x2b, 0x3b, 0x34, 0x34, 0x2b, 0x2b, 0x34, 0x33, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, - 0x31, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x08, - 0x31, 0x2b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, 0x08, - 0x31, 0x2b, 0x34, 0x34, 0x34, 0x2b, 0x34, 0x34, 0x3b, 0x2c, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x08, - 0x31, 0x2b, 0x3b, 0x35, 0x3b, 0x2b, 0x3b, 0x35, 0x3b, 0x35, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, - 0x31, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, - 0x31, 0x34, 0x3b, 0x2b, 0x3b, 0x34, 0x3b, 0x2b, 0x35, 0x2b, 0x3b, 0x3b, 0x3f, 0x3b, 0x3b, 0x08, - 0x31, 0x3b, 0x3b, 0x34, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x34, 0x3f, 0x3b, 0x3b, 0x3b, 0x3f, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x31, 0x35, 0x35, 0x3b, 0x26, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x3b, 0x3b, 0x08, + 0x31, 0x2b, 0x2b, 0x3b, 0x34, 0x34, 0x2b, 0x2b, 0x34, 0x33, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, + 0x31, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x08, + 0x31, 0x2b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x33, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, 0x08, + 0x31, 0x2b, 0x34, 0x34, 0x34, 0x2b, 0x34, 0x34, 0x3b, 0x2c, 0x3f, 0x3f, 0x3f, 0x3b, 0x3b, 0x08, + 0x31, 0x2b, 0x3b, 0x35, 0x3b, 0x2b, 0x3b, 0x35, 0x3b, 0x35, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, + 0x31, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x2b, 0x3b, 0x3f, 0x3f, 0x3f, 0x3b, 0x08, + 0x31, 0x34, 0x3b, 0x2b, 0x3b, 0x34, 0x3b, 0x2b, 0x35, 0x2b, 0x3b, 0x3b, 0x3f, 0x3b, 0x3b, 0x08, + 0x31, 0x3b, 0x3b, 0x34, 0x3b, 0x3b, 0x3b, 0x34, 0x34, 0x34, 0x3f, 0x3b, 0x3b, 0x3b, 0x3f, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = { 0x0381, 0x6fc1, 0x6341, 0x6041, 0x7f41, 0x4401, 0x5541, 0x5541, 0x11c1, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }, .coords = { COORDS_XY(8,2), COORDS_XY(8,7) }, @@ -396,22 +396,22 @@ static const struct TrHillFloor sDataTagJPDefault_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3b, 0x35, 0x3b, 0x39, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x35, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, - 0x3f, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3e, 0x3e, 0x2b, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2c, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, - 0x31, 0x3f, 0x2b, 0x3b, 0x3b, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x08, - 0x31, 0x3b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x2b, 0x3b, 0x08, - 0x3f, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x08, - 0x31, 0x3b, 0x3f, 0x3f, 0x3b, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x08, - 0x31, 0x3f, 0x3f, 0x3f, 0x3b, 0x2b, 0x2b, 0x35, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x08, - 0x31, 0x3f, 0x3f, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x08, - 0x31, 0x3b, 0x3b, 0x3b, 0x3f, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x31, 0x3b, 0x35, 0x3b, 0x39, 0x26, 0x1b, 0x1c, 0x1d, 0x25, 0x39, 0x3a, 0x3b, 0x35, 0x3b, 0x08, + 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, + 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x08, + 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, + 0x3f, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3b, 0x3e, 0x3e, 0x2b, 0x3b, 0x08, + 0x31, 0x3b, 0x2b, 0x3b, 0x3b, 0x2b, 0x2b, 0x2c, 0x2b, 0x2b, 0x3b, 0x3b, 0x3b, 0x2b, 0x3b, 0x08, + 0x31, 0x3f, 0x2b, 0x3b, 0x3b, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x3e, 0x3e, 0x3b, 0x2b, 0x3b, 0x08, + 0x31, 0x3b, 0x2b, 0x35, 0x35, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x2b, 0x3b, 0x08, + 0x3f, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x3b, 0x08, + 0x31, 0x3b, 0x3f, 0x3f, 0x3b, 0x35, 0x35, 0x3b, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x08, + 0x31, 0x3f, 0x3f, 0x3f, 0x3b, 0x2b, 0x2b, 0x35, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x08, + 0x31, 0x3f, 0x3f, 0x3b, 0x3b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x08, + 0x31, 0x3b, 0x3b, 0x3b, 0x3f, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = { 0x0381, 0x27c5, 0x27c5, 0x27c5, 0x27c5, 0x27c5, 0x26c5, 0x2005, 0x3efd, 0x1, 0x6ff, 0x7ff, 0x7ff, 0xffff, 0xffff, 0xffff }, .coords = { COORDS_XY(7,6), COORDS_XY(7,10) }, @@ -727,21 +727,21 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = }, .display = { .metatileData = { - 0x31, 0x3B, 0x35, 0x35, 0x26, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x26, 0x3A, 0x3B, 0x35, 0x3B, 0x08, - 0x31, 0x3B, 0x2C, 0x2C, 0x2C, 0x2B, 0x24, 0x24, 0x24, 0x24, 0x2C, 0x3B, 0x3B, 0x2C, 0x3B, 0x08, - 0x2D, 0x3B, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x35, 0x3B, 0x35, 0x35, 0x3B, 0x08, - 0x33, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x2C, 0x2B, 0x3B, 0x08, - 0x33, 0x35, 0x3B, 0x3B, 0x3B, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x08, - 0x34, 0x2C, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x2B, 0x32, 0x30, 0x2C, 0x3B, 0x08, - 0x31, 0x35, 0x3B, 0x3B, 0x35, 0x3B, 0x2C, 0x3B, 0x3B, 0x35, 0x2C, 0x3B, 0x3B, 0x35, 0x35, 0x08, - 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x35, 0x3B, 0x2B, 0x32, 0x21, 0x30, 0x2C, 0x2C, 0x08, - 0x31, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x2C, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x08, - 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2B, 0x3B, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x08, - 0x31, 0x35, 0x35, 0x35, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x2B, 0x3B, 0x35, 0x35, 0x08, - 0x31, 0x2B, 0x2C, 0x2C, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x08, - 0x31, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, - 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x3B, 0x3B, 0x2C, 0x32, 0x30, 0x2C, 0x32, 0x30, 0x3B, 0x35, 0x08, - 0x31, 0x3B, 0x3B, 0x3B, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x08, + 0x31, 0x3B, 0x35, 0x35, 0x26, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x26, 0x3A, 0x3B, 0x35, 0x3B, 0x08, + 0x31, 0x3B, 0x2C, 0x2C, 0x2C, 0x2B, 0x24, 0x24, 0x24, 0x24, 0x2C, 0x3B, 0x3B, 0x2C, 0x3B, 0x08, + 0x2D, 0x3B, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x35, 0x3B, 0x35, 0x35, 0x3B, 0x08, + 0x33, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x3B, 0x2C, 0x2B, 0x3B, 0x08, + 0x33, 0x35, 0x3B, 0x3B, 0x3B, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x08, + 0x34, 0x2C, 0x3B, 0x32, 0x21, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x2B, 0x32, 0x30, 0x2C, 0x3B, 0x08, + 0x31, 0x35, 0x3B, 0x3B, 0x35, 0x3B, 0x2C, 0x3B, 0x3B, 0x35, 0x2C, 0x3B, 0x3B, 0x35, 0x35, 0x08, + 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x35, 0x3B, 0x2B, 0x32, 0x21, 0x30, 0x2C, 0x2C, 0x08, + 0x31, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x2C, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x08, + 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2B, 0x3B, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x3B, 0x08, + 0x31, 0x35, 0x35, 0x35, 0x2B, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x2B, 0x3B, 0x35, 0x35, 0x08, + 0x31, 0x2B, 0x2C, 0x2C, 0x2C, 0x32, 0x30, 0x2B, 0x32, 0x30, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x08, + 0x31, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x2B, 0x3B, 0x3B, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, + 0x31, 0x2C, 0x32, 0x30, 0x2B, 0x3B, 0x3B, 0x2C, 0x32, 0x30, 0x2C, 0x32, 0x30, 0x3B, 0x35, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x3FE5, 0x0401, 0xBDED, 0x8425, 0xDFBD, 0x0221, 0x7E7F, 0x0941, 0x7F7D, 0x0911, 0x7FF7, 0x4101, 0x79F9, 0x0803, 0xFFFF}, @@ -1049,21 +1049,21 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = }, .display = { .metatileData = { - 0xD1, 0xD5, 0xD5, 0xD5, 0xD9, 0xD9, 0x1B, 0x1C, 0x1D, 0xC5, 0xC6, 0xCE, 0xD5, 0xDB, 0xD5, 0x08, - 0xD1, 0xCB, 0xC4, 0xC4, 0xDB, 0xDB, 0xC4, 0xC4, 0xC4, 0xCC, 0xCC, 0xCC, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xDB, 0x17, 0x17, 0x17, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xD5, 0x17, 0x17, 0x17, 0xD5, 0xD5, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0x17, 0x17, 0x1F, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xC4, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDB, 0xC4, 0xC4, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xC4, 0xC4, 0xDB, 0xC4, 0xC4, 0xC4, 0xDB, 0xCB, 0x08, - 0xD1, 0xCB, 0xDB, 0xCB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0xDB, 0xD5, 0xD5, 0xD5, 0xCB, 0x08, - 0xD1, 0xC4, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x08, - 0xD1, 0xDB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x08, - 0xD1, 0xDB, 0xDB, 0xC4, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xC4, 0xC4, 0xC4, 0xC4, 0x08, + 0xD1, 0xD5, 0xD5, 0xD5, 0xD9, 0xD9, 0x1B, 0x1C, 0x1D, 0xC5, 0xC6, 0xCE, 0xD5, 0xDB, 0xD5, 0x08, + 0xD1, 0xCB, 0xC4, 0xC4, 0xDB, 0xDB, 0xC4, 0xC4, 0xC4, 0xCC, 0xCC, 0xCC, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xDB, 0x17, 0x17, 0x17, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xD5, 0x17, 0x17, 0x17, 0xD5, 0xD5, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xCB, 0x17, 0x17, 0x1F, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xC4, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDB, 0xC4, 0xC4, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xD5, 0xD5, 0xDF, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xC4, 0xC4, 0xDB, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xCB, 0xCB, 0xDF, 0xD5, 0xD5, 0xCB, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xC4, 0xC4, 0xDB, 0xC4, 0xC4, 0xC4, 0xDB, 0xCB, 0x08, + 0xD1, 0xCB, 0xDB, 0xCB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0xDB, 0xD5, 0xD5, 0xD5, 0xCB, 0x08, + 0xD1, 0xC4, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x08, + 0xD1, 0xDB, 0xDB, 0xCB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0x08, + 0xD1, 0xDB, 0xDB, 0xC4, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xC4, 0xC4, 0xC4, 0xC4, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x73FB, 0x400B, 0x400B, 0x51EB, 0x538B, 0x51BB, 0x518B, 0x51EB, 0x518B, 0x51BB, 0x5003, 0x501F, 0x101F, 0x101F, 0xFFFF}, @@ -1370,21 +1370,21 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = }, .display = { .metatileData = { - 0x31, 0x35, 0x35, 0x35, 0x26, 0x26, 0x13, 0x14, 0x15, 0x38, 0x26, 0x2E, 0x35, 0x35, 0x3B, 0x08, - 0x69, 0x63, 0x64, 0x64, 0x64, 0x64, 0x71, 0x71, 0x71, 0x72, 0x64, 0x64, 0x64, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x43, 0x41, 0x40, 0x41, 0x42, 0x41, 0x41, 0x4A, 0x42, 0x41, 0x41, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x41, 0x43, 0x4B, 0x43, 0x43, 0x41, 0x42, 0x42, 0x40, 0x41, 0x40, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x41, 0x40, 0x42, 0x42, 0x41, 0x41, 0x42, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x41, 0x42, 0x41, 0x43, 0x4B, 0x41, 0x41, 0x41, 0x40, 0x43, 0x41, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, - 0x69, 0x63, 0x41, 0x40, 0x43, 0x41, 0x42, 0x42, 0x41, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x08, - 0x69, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x64, 0x73, 0x08, - 0x69, 0x43, 0x43, 0x41, 0x42, 0x42, 0x41, 0x43, 0x41, 0x41, 0x40, 0x42, 0x41, 0x42, 0x73, 0x08, + 0x31, 0x35, 0x35, 0x35, 0x26, 0x26, 0x13, 0x14, 0x15, 0x38, 0x26, 0x2E, 0x35, 0x35, 0x3B, 0x08, + 0x69, 0x63, 0x64, 0x64, 0x64, 0x64, 0x71, 0x71, 0x71, 0x72, 0x64, 0x64, 0x64, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x43, 0x41, 0x40, 0x41, 0x42, 0x41, 0x41, 0x4A, 0x42, 0x41, 0x41, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x41, 0x43, 0x4B, 0x43, 0x43, 0x41, 0x42, 0x42, 0x40, 0x41, 0x40, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x41, 0x40, 0x42, 0x42, 0x41, 0x41, 0x42, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x41, 0x42, 0x41, 0x43, 0x4B, 0x41, 0x41, 0x41, 0x40, 0x43, 0x41, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x63, 0x73, 0x08, + 0x69, 0x63, 0x41, 0x40, 0x43, 0x41, 0x42, 0x42, 0x41, 0x4A, 0x42, 0x41, 0x42, 0x63, 0x73, 0x08, + 0x69, 0x64, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x64, 0x73, 0x73, 0x73, 0x64, 0x73, 0x08, + 0x69, 0x43, 0x43, 0x41, 0x42, 0x42, 0x41, 0x43, 0x41, 0x41, 0x40, 0x42, 0x41, 0x42, 0x73, 0x08, 0x69, 0x42, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x42, 0x73, 0x08, }, .collisionData = {0x0381, 0x7C3D, 0x4005, 0x4005, 0x4005, 0x4045, 0x4005, 0x4805, 0x4005, 0x4045, 0x4005, 0x4205, 0x4005, 0x4045, 0x1, 0x1}, @@ -1684,21 +1684,21 @@ static const struct TrHillFloor sDataTagNormal_Floors[] = }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x1F, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x24, 0x24, 0x24, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x35, 0x35, 0x3B, 0x35, 0x35, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x08, - 0x33, 0x17, 0x1F, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x34, 0x17, 0x2C, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x1F, 0x17, 0x17, 0x17, 0x17, 0x1F, 0x17, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x35, 0x1F, 0x17, 0x17, 0x1F, 0x17, 0x08, - 0x34, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x3B, 0x3B, 0x2B, 0x17, 0x08, - 0x17, 0x17, 0x17, 0x1F, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x2C, 0x17, 0x08, - 0x1F, 0x17, 0x17, 0x2C, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x1F, 0x3B, 0x17, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x2B, 0x3B, 0x17, 0x08, - 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x35, 0x35, 0x35, 0x2B, 0x17, 0x3B, 0x2C, 0x3B, 0x17, 0x08, - 0x34, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x1F, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x24, 0x24, 0x24, 0x2B, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, + 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x35, 0x35, 0x3B, 0x35, 0x35, 0x08, + 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x2C, 0x3B, 0x2C, 0x2C, 0x08, + 0x33, 0x17, 0x1F, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x34, 0x17, 0x2C, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x17, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x3B, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x1F, 0x17, 0x17, 0x17, 0x17, 0x1F, 0x17, 0x3B, 0x3B, 0x3B, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x35, 0x1F, 0x17, 0x17, 0x1F, 0x17, 0x08, + 0x34, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x2C, 0x3B, 0x3B, 0x2B, 0x17, 0x08, + 0x17, 0x17, 0x17, 0x1F, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x17, 0x17, 0x2C, 0x17, 0x08, + 0x1F, 0x17, 0x17, 0x2C, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x1F, 0x3B, 0x17, 0x08, + 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x3B, 0x3B, 0x3B, 0x2B, 0x17, 0x3B, 0x2B, 0x3B, 0x17, 0x08, + 0x33, 0x17, 0x17, 0x17, 0x17, 0x2B, 0x35, 0x35, 0x35, 0x2B, 0x17, 0x3B, 0x2C, 0x3B, 0x17, 0x08, + 0x34, 0x17, 0x17, 0x17, 0x17, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x7C1, 0x8441, 0x8477, 0x8441, 0xA441, 0x0401, 0x1, 0x8401, 0x8465, 0x0445, 0x1441, 0x8449, 0x8449, 0x87C1, 0xFFFF}, @@ -2005,21 +2005,21 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x40, 0x41, 0x41, 0x41, 0x41, 0x41, 0x42, 0x43, 0x43, 0x43, 0x43, 0x43, 0x40, 0x41, 0x41, 0x08, - 0x40, 0xFB, 0x43, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x42, 0x42, 0x42, 0xFB, 0x41, 0x08, - 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x43, 0x43, 0xFB, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0xFB, 0x43, 0x41, 0x42, 0x40, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x40, 0x43, 0x43, 0x43, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x42, 0x41, 0xFE, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x42, 0x41, 0x43, 0x43, 0x43, 0x41, 0x40, 0x42, 0x42, 0x42, 0x42, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xFB, 0x41, 0x40, 0x41, 0x08, - 0x40, 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x42, 0xFB, 0x40, 0x41, 0x08, - 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x40, 0x41, 0x41, 0x41, 0x41, 0x41, 0x42, 0x43, 0x43, 0x43, 0x43, 0x43, 0x40, 0x41, 0x41, 0x08, + 0x40, 0xFB, 0x43, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x42, 0x42, 0x42, 0xFB, 0x41, 0x08, + 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x42, 0x40, 0x43, 0x41, 0x43, 0x43, 0xFB, 0x40, 0x41, 0x08, + 0x40, 0x41, 0x41, 0xFB, 0x43, 0x41, 0x42, 0x40, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x40, 0x43, 0x43, 0x43, 0x41, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x41, 0x42, 0x41, 0xFE, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x41, 0x41, 0x41, 0xFE, 0xFE, 0xFE, 0xFB, 0xFE, 0xFE, 0xFE, 0x41, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x42, 0x41, 0x43, 0x43, 0x43, 0x41, 0x40, 0x42, 0x42, 0x42, 0x42, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x40, 0x41, 0xFB, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xFB, 0x41, 0x40, 0x41, 0x08, + 0x40, 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x41, 0x42, 0x42, 0x42, 0x42, 0xFB, 0x40, 0x41, 0x08, + 0x40, 0xFB, 0x43, 0x43, 0x41, 0x41, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0xFB, 0x41, 0x08, 0x40, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x08, }, .collisionData = {0x0381, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1}, @@ -2345,21 +2345,21 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x91, 0x9B, 0x9C, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x08, - 0x9C, 0x9B, 0x96, 0x40, 0xDB, 0xDB, 0x40, 0x96, 0x40, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x08, - 0x91, 0x96, 0x40, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9C, 0x08, - 0x91, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x9B, 0x08, - 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, - 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, - 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, - 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x08, - 0x91, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x08, - 0x91, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9C, 0x08, - 0x9C, 0x9B, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x08, - 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9C, 0x96, 0x08, - 0xD6, 0x96, 0x9C, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0xD6, 0x08, - 0x9C, 0xD6, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0xD6, 0x9C, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x91, 0x9B, 0x9C, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x96, 0x40, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x08, + 0x9C, 0x9B, 0x96, 0x40, 0xDB, 0xDB, 0x40, 0x96, 0x40, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x08, + 0x91, 0x96, 0x40, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9C, 0x08, + 0x91, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x9B, 0x08, + 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, + 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, + 0x96, 0x42, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0x42, 0x96, 0x08, + 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x08, + 0x91, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x08, + 0x91, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9C, 0x08, + 0x9C, 0x9B, 0x9B, 0x96, 0x42, 0xDB, 0xDB, 0xD6, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x08, + 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0xDB, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9C, 0x96, 0x08, + 0xD6, 0x96, 0x9C, 0x9B, 0x9B, 0x96, 0x41, 0xDB, 0x42, 0x96, 0x9B, 0x9B, 0x9B, 0x96, 0xD6, 0x08, + 0x9C, 0xD6, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0x40, 0x96, 0x9B, 0x9C, 0x9B, 0x96, 0xD6, 0x9C, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xFFFF}, @@ -2666,21 +2666,21 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x1C, 0x1D, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x84, 0x84, 0x84, 0x9A, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, - 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, - 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x1C, 0x1D, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x84, 0x84, 0x84, 0x9A, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, + 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, + 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x08, + 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, + 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, + 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, + 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, + 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x08, + 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, + 0x17, 0x17, 0x17, 0x17, 0xBB, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x08, + 0x17, 0xB2, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xA1, 0xB0, 0x17, 0xB2, 0xA1, 0x08, 0x17, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0x17, 0xBB, 0xBB, 0x08, }, .collisionData = {0x0381, 0x0381, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1, 0x7FF7, 0x1}, @@ -2978,21 +2978,21 @@ static const struct TrHillFloor sDataTagVariety_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x5E, 0x41, 0x71, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, - 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, - 0x65, 0x40, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, - 0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x42, 0x73, 0x41, 0x08, - 0x69, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x43, 0x73, 0x43, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x08, - 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x08, - 0x65, 0x42, 0x73, 0x42, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x08, - 0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x08, - 0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x43, 0x6D, 0x41, 0x73, 0x43, 0x6D, 0x08, - 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x08, - 0x65, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x40, 0x73, 0x08, - 0x6C, 0x73, 0x40, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x08, - 0x69, 0x40, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x08, - 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x5E, 0x41, 0x71, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, + 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, + 0x65, 0x40, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x42, 0x45, 0x45, 0x45, 0x45, 0x45, 0x08, + 0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x42, 0x73, 0x41, 0x08, + 0x69, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x43, 0x73, 0x43, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x08, + 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x08, + 0x65, 0x42, 0x73, 0x42, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x08, + 0x6C, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x08, + 0x69, 0x40, 0x6D, 0x41, 0x73, 0x41, 0x6D, 0x42, 0x73, 0x43, 0x6D, 0x41, 0x73, 0x43, 0x6D, 0x08, + 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x08, + 0x65, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x42, 0x6D, 0x42, 0x73, 0x41, 0x6D, 0x40, 0x73, 0x08, + 0x6C, 0x73, 0x40, 0x73, 0x64, 0x73, 0x41, 0x73, 0x64, 0x73, 0x42, 0x73, 0x64, 0x73, 0x42, 0x08, + 0x69, 0x40, 0x6D, 0x42, 0x73, 0x42, 0x6D, 0x43, 0x73, 0x40, 0x6D, 0x41, 0x73, 0x40, 0x6D, 0x08, + 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x40, 0x73, 0x64, 0x73, 0x43, 0x73, 0x64, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x1, 0x2201, 0x1, 0x8881, 0x1, 0x2223, 0x1, 0x8889, 0x1, 0x2223, 0x1, 0x8889, 0x1, 0x2223, 0xFFFF}, @@ -3304,21 +3304,21 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { }, .display = { .metatileData = { - 0xF1, 0xF5, 0xFB, 0xF5, 0xE6, 0xE6, 0x1B, 0x14, 0x15, 0xF8, 0xF9, 0xFA, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xF9, 0xE6, 0xEE, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0x9B, 0x9B, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0x9B, 0xDB, 0xDB, 0x9B, 0xEC, 0xFB, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xF5, 0x95, 0x95, 0xF5, 0xF5, 0xF5, 0xEB, 0xEC, 0xEB, 0xFB, 0xEB, 0x08, - 0xED, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x08, - 0xF4, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xF5, 0xFB, 0x08, - 0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0x08, - 0xF1, 0xF5, 0xF5, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0x08, - 0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0x08, - 0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0x08, - 0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0x08, - 0xF1, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, + 0xF1, 0xF5, 0xFB, 0xF5, 0xE6, 0xE6, 0x1B, 0x14, 0x15, 0xF8, 0xF9, 0xFA, 0xFB, 0xFB, 0xFB, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xF9, 0xE6, 0xEE, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0x9B, 0x9B, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0x9B, 0xDB, 0xDB, 0x9B, 0xEC, 0xFB, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xF5, 0x95, 0x95, 0xF5, 0xF5, 0xF5, 0xEB, 0xEC, 0xEB, 0xFB, 0xEB, 0x08, + 0xED, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x08, + 0xF4, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xF5, 0xFB, 0x08, + 0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0x08, + 0xF1, 0xF5, 0xF5, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0x08, + 0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB, 0xFB, 0xEB, 0xFB, 0x08, + 0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xEB, 0xFB, 0xEB, 0xFB, 0x08, + 0xF1, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0x08, + 0xF1, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x5E01, 0x50FF, 0x5083, 0x503B, 0x5FEB, 0xC02B, 0x5FEB, 0x5009, 0x57FD, 0x1005, 0x7FF5, 0x15, 0x7FF5, 0x1, 0xFFFF}, @@ -3625,21 +3625,21 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x2D, 0x3B, 0x3B, 0x3B, 0x35, 0x2C, 0x23, 0x24, 0x23, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, - 0x94, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x9B, 0x08, - 0x91, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x08, - 0x8D, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8C, 0x08, - 0x94, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x9B, 0x9B, 0x87, 0x9B, 0x08, - 0x91, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x9B, 0x95, 0x8F, 0x9B, 0x08, - 0x91, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x95, 0x97, 0x95, 0x97, 0x8C, 0x9B, 0x8C, 0x97, 0x95, 0x08, - 0x91, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x87, 0x95, 0x87, 0x8C, 0x08, - 0x8D, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x08, - 0x94, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x08, - 0x91, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x95, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x9B, 0x08, - 0x91, 0x8F, 0x95, 0x8F, 0x8B, 0x8F, 0x8C, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x08, - 0x91, 0x97, 0x8C, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8B, 0x97, 0x9B, 0x08, - 0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x8C, 0x9B, 0x9B, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x26, 0x1B, 0x1C, 0x1D, 0x25, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x2D, 0x3B, 0x3B, 0x3B, 0x35, 0x2C, 0x23, 0x24, 0x23, 0x2C, 0x35, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, + 0x94, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x9B, 0x08, + 0x91, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x08, + 0x8D, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8C, 0x08, + 0x94, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x9B, 0x9B, 0x87, 0x9B, 0x08, + 0x91, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x95, 0x9B, 0x95, 0x8F, 0x9B, 0x08, + 0x91, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x95, 0x97, 0x95, 0x97, 0x8C, 0x9B, 0x8C, 0x97, 0x95, 0x08, + 0x91, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x8C, 0x87, 0x8B, 0x87, 0x9B, 0x87, 0x95, 0x87, 0x8C, 0x08, + 0x8D, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x8C, 0x8F, 0x9B, 0x08, + 0x94, 0x97, 0x95, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x95, 0x97, 0x95, 0x97, 0x9B, 0x97, 0x9B, 0x08, + 0x91, 0x87, 0x8C, 0x87, 0x95, 0x87, 0x95, 0x87, 0x8B, 0x87, 0x8C, 0x87, 0x9B, 0x87, 0x9B, 0x08, + 0x91, 0x8F, 0x95, 0x8F, 0x8B, 0x8F, 0x8C, 0x8F, 0x8C, 0x8F, 0x9B, 0x8F, 0x95, 0x8F, 0x9B, 0x08, + 0x91, 0x97, 0x8C, 0x97, 0x8C, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x9B, 0x97, 0x8B, 0x97, 0x9B, 0x08, + 0x91, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x8C, 0x9B, 0x9B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x7C1, 0x8AA1, 0x0209, 0x5557, 0xA281, 0x81, 0x5D6D, 0x2283, 0x89, 0xDD55, 0x20A1, 0xA81, 0x7D5D, 0x9, 0xFFFF}, @@ -3946,21 +3946,21 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x08, - 0x69, 0x46, 0x7A, 0x73, 0x73, 0x73, 0x79, 0x73, 0x73, 0x73, 0x7D, 0x73, 0x73, 0x73, 0x46, 0x08, - 0x69, 0x46, 0x73, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0x69, 0x46, 0x73, 0x73, 0x7B, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x7A, 0x73, 0x73, 0x73, 0x46, 0x08, - 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7A, 0x46, 0x08, - 0x69, 0x46, 0x73, 0x73, 0x73, 0x73, 0x73, 0x7D, 0x7C, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x46, 0x08, - 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, - 0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0xF1, 0x46, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7A, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7C, 0x08, - 0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xFB, 0x08, - 0x7C, 0xFB, 0x7B, 0xFB, 0x7A, 0xFB, 0x79, 0xFB, 0xB3, 0xFB, 0x7D, 0xFB, 0x7E, 0xFB, 0x7D, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x08, + 0x69, 0x46, 0x7A, 0x73, 0x73, 0x73, 0x79, 0x73, 0x73, 0x73, 0x7D, 0x73, 0x73, 0x73, 0x46, 0x08, + 0x69, 0x46, 0x73, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, + 0x69, 0x46, 0x73, 0x73, 0x7B, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x7A, 0x73, 0x73, 0x73, 0x46, 0x08, + 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7A, 0x46, 0x08, + 0x69, 0x46, 0x73, 0x73, 0x73, 0x73, 0x73, 0x7D, 0x7C, 0x73, 0x7C, 0x73, 0x7B, 0x73, 0x46, 0x08, + 0x69, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x7C, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, + 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, + 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, + 0x91, 0x46, 0x9B, 0x9B, 0x9B, 0x46, 0x3B, 0x3B, 0x3B, 0x46, 0x9B, 0x9B, 0x9B, 0x9B, 0x46, 0x08, + 0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, + 0xF1, 0x46, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7A, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x7C, 0x08, + 0xF1, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xFB, 0x08, + 0x7C, 0xFB, 0x7B, 0xFB, 0x7A, 0xFB, 0x79, 0xFB, 0xB3, 0xFB, 0x7D, 0xFB, 0x7E, 0xFB, 0x7D, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x7FFB, 0x4003, 0x5FFF, 0x4003, 0x7FFB, 0x4003, 0x7EFF, 0x4443, 0x4443, 0x4443, 0x7EFF, 0x4001, 0x7FFD, 0x1, 0xFFFF}, @@ -4257,21 +4257,21 @@ static const struct TrHillFloor sDataTagUnique_Floors[] = { }, .display = { .metatileData = { - 0xF1, 0xFB, 0xFB, 0xFB, 0xF9, 0xF9, 0x1B, 0x1C, 0x1D, 0xE5, 0xE6, 0xEE, 0xF5, 0xFB, 0xFB, 0x08, - 0xED, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x08, - 0xF4, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, - 0xF1, 0xEB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x08, - 0xF1, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xF5, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0x08, - 0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0x08, - 0xF1, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, - 0xF1, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, + 0xF1, 0xFB, 0xFB, 0xFB, 0xF9, 0xF9, 0x1B, 0x1C, 0x1D, 0xE5, 0xE6, 0xEE, 0xF5, 0xFB, 0xFB, 0x08, + 0xED, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x08, + 0xF4, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, + 0xF1, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, + 0xF1, 0xEB, 0xEC, 0xEC, 0xEC, 0xEB, 0xEC, 0xEC, 0xFB, 0xEC, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x08, + 0xF1, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, + 0xF1, 0xEB, 0xFB, 0xF5, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xFB, 0xFB, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xEC, 0xEC, 0xEC, 0xFB, 0xFB, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xF5, 0xF5, 0xF5, 0xF5, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, + 0xF1, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xFB, 0xEB, 0xF5, 0xF5, 0xF5, 0xF5, 0xFB, 0x08, + 0xF1, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xFB, 0xEB, 0xFB, 0xEC, 0xEC, 0xEC, 0xEC, 0xEC, 0xFB, 0x08, + 0xF1, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xEB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, + 0xF1, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xEC, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0xFB, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x3F9, 0xF041, 0x41, 0x7F5F, 0x4401, 0x4541, 0x5579, 0x5541, 0x555F, 0x5541, 0x5541, 0x557D, 0x1101, 0x1101, 0xFFFF}, @@ -4590,21 +4590,21 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x31, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, - 0x31, 0x3B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3B, 0x3B, 0x08, - 0x69, 0x73, 0x08, 0x4D, 0x4D, 0x4D, 0x4D, 0xD1, 0x4D, 0x4D, 0x4D, 0x4D, 0x08, 0x69, 0x73, 0x08, - 0x40, 0x3B, 0x08, 0x55, 0x55, 0x55, 0x55, 0xD1, 0x55, 0x55, 0x55, 0x55, 0x08, 0x31, 0x41, 0x08, - 0x69, 0x41, 0x08, 0xC5, 0xD9, 0xD9, 0xD9, 0x9A, 0xD9, 0xD9, 0xD9, 0xC6, 0x08, 0x41, 0x73, 0x08, - 0x69, 0x3B, 0x08, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x08, 0x31, 0x73, 0x08, - 0x69, 0x3B, 0x08, 0xCD, 0x9B, 0x73, 0x73, 0x44, 0x73, 0x73, 0x9B, 0xD5, 0x08, 0x31, 0x73, 0x08, - 0x69, 0x3B, 0x08, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x08, 0x31, 0x73, 0x08, - 0x69, 0x41, 0x08, 0xD1, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xDB, 0xDB, 0xDB, 0x08, 0x41, 0x73, 0x08, - 0x40, 0x3B, 0x08, 0x08, 0xC7, 0xC7, 0xDB, 0xDB, 0xDB, 0xC7, 0xC7, 0x08, 0x08, 0x31, 0x41, 0x08, - 0x69, 0x3B, 0x4D, 0x4D, 0x67, 0x67, 0xDB, 0xDB, 0xDB, 0x67, 0x67, 0x4D, 0x4D, 0x31, 0x73, 0x08, - 0x69, 0x3B, 0x55, 0x55, 0xD7, 0xD7, 0xD1, 0xDB, 0xDB, 0xD7, 0xD7, 0x55, 0x55, 0x31, 0x73, 0x08, - 0x69, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x73, 0x08, - 0x69, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x1B, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x2C, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x3B, 0x3B, 0x08, + 0x31, 0x3B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3B, 0x3B, 0x08, + 0x69, 0x73, 0x08, 0x4D, 0x4D, 0x4D, 0x4D, 0xD1, 0x4D, 0x4D, 0x4D, 0x4D, 0x08, 0x69, 0x73, 0x08, + 0x40, 0x3B, 0x08, 0x55, 0x55, 0x55, 0x55, 0xD1, 0x55, 0x55, 0x55, 0x55, 0x08, 0x31, 0x41, 0x08, + 0x69, 0x41, 0x08, 0xC5, 0xD9, 0xD9, 0xD9, 0x9A, 0xD9, 0xD9, 0xD9, 0xC6, 0x08, 0x41, 0x73, 0x08, + 0x69, 0x3B, 0x08, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x08, 0x31, 0x73, 0x08, + 0x69, 0x3B, 0x08, 0xCD, 0x9B, 0x73, 0x73, 0x44, 0x73, 0x73, 0x9B, 0xD5, 0x08, 0x31, 0x73, 0x08, + 0x69, 0x3B, 0x08, 0xD4, 0xDB, 0x9B, 0x73, 0x73, 0x73, 0x9B, 0xDB, 0xCC, 0x08, 0x31, 0x73, 0x08, + 0x69, 0x41, 0x08, 0xD1, 0xDB, 0xDB, 0xDB, 0x9B, 0xDB, 0xDB, 0xDB, 0xDB, 0x08, 0x41, 0x73, 0x08, + 0x40, 0x3B, 0x08, 0x08, 0xC7, 0xC7, 0xDB, 0xDB, 0xDB, 0xC7, 0xC7, 0x08, 0x08, 0x31, 0x41, 0x08, + 0x69, 0x3B, 0x4D, 0x4D, 0x67, 0x67, 0xDB, 0xDB, 0xDB, 0x67, 0x67, 0x4D, 0x4D, 0x31, 0x73, 0x08, + 0x69, 0x3B, 0x55, 0x55, 0xD7, 0xD7, 0xD1, 0xDB, 0xDB, 0xD7, 0xD7, 0x55, 0x55, 0x31, 0x73, 0x08, + 0x69, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x39, 0x39, 0x39, 0x39, 0x3A, 0x73, 0x08, + 0x69, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x0201, 0x3EF9, 0x3EF9, 0x3EF9, 0x2009, 0x3019, 0x2009, 0x3019, 0x2009, 0x3019, 0x3019, 0x3C79, 0x1, 0x1, 0xFFFF}, @@ -4912,21 +4912,21 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x08, - 0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x08, - 0x91, 0x46, 0x7D, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0xB3, 0x9B, 0x9B, 0x9B, 0x08, - 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x9B, 0x08, - 0x91, 0x46, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x08, - 0x91, 0x46, 0x9B, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, - 0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x08, - 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xB3, 0x08, - 0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x08, - 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x08, - 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0x08, - 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x08, - 0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x38, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x78, 0x08, + 0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x08, + 0x91, 0x46, 0x7D, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, + 0x91, 0x46, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0xB3, 0x9B, 0x9B, 0x9B, 0x08, + 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x9B, 0x08, + 0x91, 0x46, 0x9B, 0x7D, 0x9B, 0x7C, 0x9B, 0x7B, 0x9B, 0x7A, 0x9B, 0x7C, 0x9B, 0x9B, 0x9B, 0x08, + 0x91, 0x46, 0x9B, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x08, + 0x91, 0x46, 0x9B, 0x7C, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x9B, 0x9B, 0x7D, 0x9B, 0x7E, 0x9B, 0x08, + 0x91, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0xB3, 0x08, + 0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x08, + 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x08, + 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0x08, + 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xDB, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x08, + 0x91, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0xDB, 0xD6, 0x96, 0x9B, 0x9B, 0x96, 0xD6, 0x9B, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, }, .collisionData = {0x0381, 0x7FFD, 0x4001, 0x5FFF, 0x4001, 0x7FFD, 0x4001, 0x5FFF, 0x4001, 0x7FFD, 0x1, 0x1, 0x1, 0x1, 0x1, 0xFFFF}, @@ -5234,21 +5234,21 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { }, .display = { .metatileData = { - 0xD1, 0xDB, 0xDB, 0xDB, 0xD9, 0xD9, 0x1B, 0x14, 0x15, 0x98, 0x99, 0x9A, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xDB, 0xD5, 0xD5, 0xC3, 0xF9, 0x86, 0x8E, 0x95, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x08, - 0xD1, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x08, - 0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCC, 0xFB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, - 0xD1, 0xCC, 0xCC, 0xCC, 0xCC, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, - 0xD1, 0xD5, 0xD5, 0xD5, 0xD5, 0xFB, 0xEC, 0xFB, 0xEC, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, - 0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xF5, 0xF5, 0xFB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, - 0xD1, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x08, - 0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x9B, 0x08, - 0xD1, 0xDB, 0xDB, 0xDB, 0xCC, 0xCC, 0xCB, 0xFB, 0x8C, 0x8C, 0x8C, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, + 0xD1, 0xDB, 0xDB, 0xDB, 0xD9, 0xD9, 0x1B, 0x14, 0x15, 0x98, 0x99, 0x9A, 0x9B, 0x9B, 0x9B, 0x08, + 0xD1, 0xDB, 0xDB, 0xDB, 0xD5, 0xD5, 0xC3, 0xF9, 0x86, 0x8E, 0x95, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, + 0xD1, 0xDB, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x9B, 0x08, + 0xD1, 0xDB, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x9B, 0x08, + 0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x08, + 0xD1, 0xD5, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x95, 0x9B, 0x08, + 0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCC, 0xFB, 0xFB, 0x8C, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, + 0xD1, 0xCC, 0xCC, 0xCC, 0xCC, 0xFB, 0xF5, 0xFB, 0xF5, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, + 0xD1, 0xD5, 0xD5, 0xD5, 0xD5, 0xFB, 0xEC, 0xFB, 0xEC, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, + 0xD1, 0xCB, 0xCB, 0xCB, 0xCB, 0xF5, 0xF5, 0xFB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x08, + 0xD1, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x08, + 0xD1, 0xDB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0xF5, 0x8B, 0x8B, 0x8B, 0x8B, 0x9B, 0x9B, 0x08, + 0xD1, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x08, + 0xD1, 0xDB, 0xDB, 0xCC, 0xCB, 0xCB, 0xCB, 0xFB, 0x8B, 0x8B, 0x8B, 0x8C, 0x9B, 0x9B, 0x9B, 0x08, + 0xD1, 0xDB, 0xDB, 0xDB, 0xCC, 0xCC, 0xCB, 0xFB, 0x8C, 0x8C, 0x8C, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, 0xD1, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xCC, 0xFB, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x08, }, .collisionData = {0x0381, 0x0201, 0xEE1, 0x1EF1, 0x3EF9, 0x3EF9, 0x7E7D, 0x783D, 0x2BD, 0x783D, 0x7E7D, 0x3E79, 0x3EF9, 0x1EF1, 0xEE1, 0x201}, @@ -5548,21 +5548,21 @@ static const struct TrHillFloor sDataTagExpert_Floors[] = { }, .display = { .metatileData = { - 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, - 0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x08, - 0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x08, - 0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x08, - 0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x08, - 0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x08, - 0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x08, - 0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x08, - 0x96, 0x9B, 0x9B, 0x9B, 0x9B, 0xD6, 0xD6, 0x96, 0xD6, 0xD6, 0xDB, 0x9B, 0x9B, 0x9B, 0x96, 0x08, - 0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x08, - 0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x08, - 0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x08, - 0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x08, - 0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x08, - 0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x08, + 0x31, 0x3B, 0x3B, 0x3B, 0x39, 0x39, 0x13, 0x14, 0x15, 0x39, 0x39, 0x3A, 0x3B, 0x3B, 0x3B, 0x08, + 0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x08, + 0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x08, + 0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x08, + 0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x08, + 0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x08, + 0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x08, + 0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x08, + 0x96, 0x9B, 0x9B, 0x9B, 0x9B, 0xD6, 0xD6, 0x96, 0xD6, 0xD6, 0xDB, 0x9B, 0x9B, 0x9B, 0x96, 0x08, + 0xFB, 0xFB, 0x46, 0x36, 0x9B, 0xDB, 0xD6, 0xD6, 0xD6, 0xDB, 0x9B, 0x36, 0x46, 0xFB, 0xFB, 0x08, + 0xF6, 0xFB, 0x46, 0x36, 0x46, 0x9B, 0xDB, 0xD6, 0xDB, 0x9B, 0x46, 0x36, 0x46, 0xFB, 0xF6, 0x08, + 0xF6, 0xFB, 0xFB, 0x46, 0x9B, 0x46, 0x46, 0xDB, 0x46, 0x46, 0x9B, 0x46, 0xFB, 0xFB, 0xF6, 0x08, + 0xFD, 0xF6, 0xFB, 0x9B, 0x46, 0x36, 0x36, 0x9B, 0x36, 0x36, 0x46, 0x9B, 0xFB, 0xF6, 0xFD, 0x08, + 0xF6, 0xFB, 0x9B, 0xFB, 0xFB, 0x46, 0x46, 0x9B, 0x46, 0x46, 0xFB, 0xFB, 0x9B, 0xFB, 0xF6, 0x08, + 0xFB, 0x9B, 0xFB, 0xF6, 0xFB, 0xFB, 0xFB, 0x46, 0xFB, 0xFB, 0xFB, 0xF6, 0xFB, 0x9B, 0xFB, 0x08, 0x96, 0xFB, 0xF6, 0xFD, 0xF6, 0xF6, 0xFB, 0x46, 0xFB, 0xF6, 0xF6, 0xFD, 0xF6, 0xFB, 0x9B, 0x08, }, .collisionData = {0x0381, 0x0101, 0x0101, 0x6C1, 0x0821, 0x16D1, 0x2829, 0x2009, 0x1, 0x2009, 0x2829, 0x16D1, 0x0821, 0x6C1, 0x0101, 0x101}, diff --git a/src/data/contest_opponents.h b/src/data/contest_opponents.h index b5466904b1..19019be918 100644 --- a/src/data/contest_opponents.h +++ b/src/data/contest_opponents.h @@ -99,8 +99,8 @@ #define CONTEST_OPPONENT_TREY 94 #define CONTEST_OPPONENT_LANE 95 -// All contest opponents have a common set of AI flags (which contains all of the actually -// useful AI scripts, as well as some dummys) and a random combination of 2-3 dummy flags. +// All contest opponents have a common set of AI flags (which contains all of the actually +// useful AI scripts, as well as some dummys) and a random combination of 2-3 dummy flags. // Seems that like the battle AI they had more plans for this than what ended up in the final game #define CONTEST_AI_SET_1 (CONTEST_AI_COMMON | CONTEST_AI_DUMMY_20 | CONTEST_AI_DUMMY_21) #define CONTEST_AI_SET_2 (CONTEST_AI_COMMON | CONTEST_AI_DUMMY_19 | CONTEST_AI_DUMMY_25) @@ -1166,7 +1166,7 @@ const struct ContestPokemon gContestOpponents[] = .personality = 0, .otId = 0xFFFF }, - [CONTEST_OPPONENT_ARIANA] = { + [CONTEST_OPPONENT_ARIANA] = { .species = SPECIES_KECLEON, .nickname = _("KECON"), .trainerName = _("ARIANA"), @@ -2010,7 +2010,7 @@ const struct ContestPokemon gContestOpponents[] = .species = SPECIES_CUBONE, .nickname = _("CUBIN"), .trainerName = _("COLTIN"), - .trainerGfxId = OBJ_EVENT_GFX_MAN_4, + .trainerGfxId = OBJ_EVENT_GFX_MAN_4, .aiFlags = CONTEST_AI_SET_2, .whichRank = CONTEST_RANK_HYPER, .aiPool_Cool = FALSE, diff --git a/src/data/contest_text_tables.h b/src/data/contest_text_tables.h index f893bc66a6..64ad704a59 100644 --- a/src/data/contest_text_tables.h +++ b/src/data/contest_text_tables.h @@ -181,7 +181,7 @@ extern const u8 gText_CouldntImproveItsCondition[]; extern const u8 gText_BadConditionResultedInWeakAppeal[]; extern const u8 gText_MonWasUnaffected[]; extern const u8 gText_AttractedCrowdsAttention[]; - + // sContestConditions extern const u8 gText_Contest_Coolness[]; extern const u8 gText_Contest_Beauty[]; diff --git a/src/data/decoration/header.h b/src/data/decoration/header.h index c574988281..7a151808d3 100644 --- a/src/data/decoration/header.h +++ b/src/data/decoration/header.h @@ -11,7 +11,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SMALL_DESK, .tiles = DecorGfx_SMALL_DESK, }, - + [DECOR_SMALL_DESK] = { .id = DECOR_SMALL_DESK, @@ -23,7 +23,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SMALL_DESK, .tiles = DecorGfx_SMALL_DESK, }, - + [DECOR_POKEMON_DESK] = { .id = DECOR_POKEMON_DESK, @@ -35,7 +35,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_POKEMON_DESK, .tiles = DecorGfx_POKEMON_DESK, }, - + [DECOR_HEAVY_DESK] = { .id = DECOR_HEAVY_DESK, @@ -47,7 +47,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_HEAVY_DESK, .tiles = DecorGfx_HEAVY_DESK, }, - + [DECOR_RAGGED_DESK] = { .id = DECOR_RAGGED_DESK, @@ -59,7 +59,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_RAGGED_DESK, .tiles = DecorGfx_RAGGED_DESK, }, - + [DECOR_COMFORT_DESK] = { .id = DECOR_COMFORT_DESK, @@ -71,7 +71,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_COMFORT_DESK, .tiles = DecorGfx_COMFORT_DESK, }, - + [DECOR_PRETTY_DESK] = { .id = DECOR_PRETTY_DESK, @@ -83,7 +83,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_PRETTY_DESK, .tiles = DecorGfx_PRETTY_DESK, }, - + [DECOR_BRICK_DESK] = { .id = DECOR_BRICK_DESK, @@ -95,7 +95,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BRICK_DESK, .tiles = DecorGfx_BRICK_DESK, }, - + [DECOR_CAMP_DESK] = { .id = DECOR_CAMP_DESK, @@ -107,7 +107,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_CAMP_DESK, .tiles = DecorGfx_CAMP_DESK, }, - + [DECOR_HARD_DESK] = { .id = DECOR_HARD_DESK, @@ -119,7 +119,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_HARD_DESK, .tiles = DecorGfx_HARD_DESK, }, - + [DECOR_SMALL_CHAIR] = { .id = DECOR_SMALL_CHAIR, @@ -131,7 +131,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SMALL_CHAIR, .tiles = DecorGfx_SMALL_CHAIR, }, - + [DECOR_POKEMON_CHAIR] = { .id = DECOR_POKEMON_CHAIR, @@ -143,7 +143,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_POKEMON_CHAIR, .tiles = DecorGfx_POKEMON_CHAIR, }, - + [DECOR_HEAVY_CHAIR] = { .id = DECOR_HEAVY_CHAIR, @@ -155,7 +155,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_HEAVY_CHAIR, .tiles = DecorGfx_HEAVY_CHAIR, }, - + [DECOR_PRETTY_CHAIR] = { .id = DECOR_PRETTY_CHAIR, @@ -167,7 +167,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_PRETTY_CHAIR, .tiles = DecorGfx_PRETTY_CHAIR, }, - + [DECOR_COMFORT_CHAIR] = { .id = DECOR_COMFORT_CHAIR, @@ -179,7 +179,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_COMFORT_CHAIR, .tiles = DecorGfx_COMFORT_CHAIR, }, - + [DECOR_RAGGED_CHAIR] = { .id = DECOR_RAGGED_CHAIR, @@ -191,7 +191,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_RAGGED_CHAIR, .tiles = DecorGfx_RAGGED_CHAIR, }, - + [DECOR_BRICK_CHAIR] = { .id = DECOR_BRICK_CHAIR, @@ -203,7 +203,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BRICK_CHAIR, .tiles = DecorGfx_BRICK_CHAIR, }, - + [DECOR_CAMP_CHAIR] = { .id = DECOR_CAMP_CHAIR, @@ -215,7 +215,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_CAMP_CHAIR, .tiles = DecorGfx_CAMP_CHAIR, }, - + [DECOR_HARD_CHAIR] = { .id = DECOR_HARD_CHAIR, @@ -227,7 +227,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_HARD_CHAIR, .tiles = DecorGfx_HARD_CHAIR, }, - + [DECOR_RED_PLANT] = { .id = DECOR_RED_PLANT, @@ -239,7 +239,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_RED_PLANT, .tiles = DecorGfx_RED_PLANT, }, - + [DECOR_TROPICAL_PLANT] = { .id = DECOR_TROPICAL_PLANT, @@ -251,7 +251,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_TROPICAL_PLANT, .tiles = DecorGfx_TROPICAL_PLANT, }, - + [DECOR_PRETTY_FLOWERS] = { .id = DECOR_PRETTY_FLOWERS, @@ -263,7 +263,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_PRETTY_FLOWERS, .tiles = DecorGfx_PRETTY_FLOWERS, }, - + [DECOR_COLORFUL_PLANT] = { .id = DECOR_COLORFUL_PLANT, @@ -275,7 +275,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_COLORFUL_PLANT, .tiles = DecorGfx_COLORFUL_PLANT, }, - + [DECOR_BIG_PLANT] = { .id = DECOR_BIG_PLANT, @@ -287,7 +287,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BIG_PLANT, .tiles = DecorGfx_BIG_PLANT, }, - + [DECOR_GORGEOUS_PLANT] = { .id = DECOR_GORGEOUS_PLANT, @@ -299,7 +299,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_GORGEOUS_PLANT, .tiles = DecorGfx_GORGEOUS_PLANT, }, - + [DECOR_RED_BRICK] = { .id = DECOR_RED_BRICK, @@ -311,7 +311,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_RED_BRICK, .tiles = DecorGfx_RED_BRICK, }, - + [DECOR_YELLOW_BRICK] = { .id = DECOR_YELLOW_BRICK, @@ -323,7 +323,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_YELLOW_BRICK, .tiles = DecorGfx_YELLOW_BRICK, }, - + [DECOR_BLUE_BRICK] = { .id = DECOR_BLUE_BRICK, @@ -335,7 +335,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BLUE_BRICK, .tiles = DecorGfx_BLUE_BRICK, }, - + [DECOR_RED_BALLOON] = { .id = DECOR_RED_BALLOON, @@ -347,7 +347,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_RED_BALLOON, .tiles = DecorGfx_RED_BALLOON, }, - + [DECOR_BLUE_BALLOON] = { .id = DECOR_BLUE_BALLOON, @@ -359,7 +359,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BLUE_BALLOON, .tiles = DecorGfx_BLUE_BALLOON, }, - + [DECOR_YELLOW_BALLOON] = { .id = DECOR_YELLOW_BALLOON, @@ -371,7 +371,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_YELLOW_BALLOON, .tiles = DecorGfx_YELLOW_BALLOON, }, - + [DECOR_RED_TENT] = { .id = DECOR_RED_TENT, @@ -383,7 +383,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_RED_TENT, .tiles = DecorGfx_RED_TENT, }, - + [DECOR_BLUE_TENT] = { .id = DECOR_BLUE_TENT, @@ -395,7 +395,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BLUE_TENT, .tiles = DecorGfx_BLUE_TENT, }, - + [DECOR_SOLID_BOARD] = { .id = DECOR_SOLID_BOARD, @@ -407,7 +407,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SOLID_BOARD, .tiles = DecorGfx_SOLID_BOARD, }, - + [DECOR_SLIDE] = { .id = DECOR_SLIDE, @@ -419,7 +419,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SLIDE, .tiles = DecorGfx_SLIDE, }, - + [DECOR_FENCE_LENGTH] = { .id = DECOR_FENCE_LENGTH, @@ -431,7 +431,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_FENCE_LENGTH, .tiles = DecorGfx_FENCE_LENGTH, }, - + [DECOR_FENCE_WIDTH] = { .id = DECOR_FENCE_WIDTH, @@ -443,7 +443,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_FENCE_WIDTH, .tiles = DecorGfx_FENCE_WIDTH, }, - + [DECOR_TIRE] = { .id = DECOR_TIRE, @@ -455,7 +455,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_TIRE, .tiles = DecorGfx_TIRE, }, - + [DECOR_STAND] = { .id = DECOR_STAND, @@ -467,7 +467,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_STAND, .tiles = DecorGfx_STAND, }, - + [DECOR_MUD_BALL] = { .id = DECOR_MUD_BALL, @@ -479,7 +479,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_MUD_BALL, .tiles = DecorGfx_MUD_BALL, }, - + [DECOR_BREAKABLE_DOOR] = { .id = DECOR_BREAKABLE_DOOR, @@ -491,7 +491,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BREAKABLE_DOOR, .tiles = DecorGfx_BREAKABLE_DOOR, }, - + [DECOR_SAND_ORNAMENT] = { .id = DECOR_SAND_ORNAMENT, @@ -503,7 +503,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SAND_ORNAMENT, .tiles = DecorGfx_SAND_ORNAMENT, }, - + [DECOR_SILVER_SHIELD] = { .id = DECOR_SILVER_SHIELD, @@ -515,7 +515,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SILVER_SHIELD, .tiles = DecorGfx_SILVER_SHIELD, }, - + [DECOR_GOLD_SHIELD] = { .id = DECOR_GOLD_SHIELD, @@ -527,7 +527,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_GOLD_SHIELD, .tiles = DecorGfx_GOLD_SHIELD, }, - + [DECOR_GLASS_ORNAMENT] = { .id = DECOR_GLASS_ORNAMENT, @@ -539,7 +539,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_GLASS_ORNAMENT, .tiles = DecorGfx_GLASS_ORNAMENT, }, - + [DECOR_TV] = { .id = DECOR_TV, @@ -551,7 +551,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_TV, .tiles = DecorGfx_TV, }, - + [DECOR_ROUND_TV] = { .id = DECOR_ROUND_TV, @@ -563,7 +563,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_ROUND_TV, .tiles = DecorGfx_ROUND_TV, }, - + [DECOR_CUTE_TV] = { .id = DECOR_CUTE_TV, @@ -575,7 +575,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_CUTE_TV, .tiles = DecorGfx_CUTE_TV, }, - + [DECOR_GLITTER_MAT] = { .id = DECOR_GLITTER_MAT, @@ -587,7 +587,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_GLITTER_MAT, .tiles = DecorGfx_GLITTER_MAT, }, - + [DECOR_JUMP_MAT] = { .id = DECOR_JUMP_MAT, @@ -599,7 +599,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_JUMP_MAT, .tiles = DecorGfx_JUMP_MAT, }, - + [DECOR_SPIN_MAT] = { .id = DECOR_SPIN_MAT, @@ -611,7 +611,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SPIN_MAT, .tiles = DecorGfx_SPIN_MAT, }, - + [DECOR_C_LOW_NOTE_MAT] = { .id = DECOR_C_LOW_NOTE_MAT, @@ -623,7 +623,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_C_LOW_NOTE_MAT, .tiles = DecorGfx_C_LOW_NOTE_MAT, }, - + [DECOR_D_NOTE_MAT] = { .id = DECOR_D_NOTE_MAT, @@ -635,7 +635,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_D_NOTE_MAT, .tiles = DecorGfx_D_NOTE_MAT, }, - + [DECOR_E_NOTE_MAT] = { .id = DECOR_E_NOTE_MAT, @@ -647,7 +647,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_E_NOTE_MAT, .tiles = DecorGfx_E_NOTE_MAT, }, - + [DECOR_F_NOTE_MAT] = { .id = DECOR_F_NOTE_MAT, @@ -659,7 +659,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_F_NOTE_MAT, .tiles = DecorGfx_F_NOTE_MAT, }, - + [DECOR_G_NOTE_MAT] = { .id = DECOR_G_NOTE_MAT, @@ -671,7 +671,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_G_NOTE_MAT, .tiles = DecorGfx_G_NOTE_MAT, }, - + [DECOR_A_NOTE_MAT] = { .id = DECOR_A_NOTE_MAT, @@ -683,7 +683,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_A_NOTE_MAT, .tiles = DecorGfx_A_NOTE_MAT, }, - + [DECOR_B_NOTE_MAT] = { .id = DECOR_B_NOTE_MAT, @@ -695,7 +695,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_B_NOTE_MAT, .tiles = DecorGfx_B_NOTE_MAT, }, - + [DECOR_C_HIGH_NOTE_MAT] = { .id = DECOR_C_HIGH_NOTE_MAT, @@ -707,7 +707,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_C_HIGH_NOTE_MAT, .tiles = DecorGfx_C_HIGH_NOTE_MAT, }, - + [DECOR_SURF_MAT] = { .id = DECOR_SURF_MAT, @@ -719,7 +719,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SURF_MAT, .tiles = DecorGfx_SURF_MAT, }, - + [DECOR_THUNDER_MAT] = { .id = DECOR_THUNDER_MAT, @@ -731,7 +731,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_THUNDER_MAT, .tiles = DecorGfx_THUNDER_MAT, }, - + [DECOR_FIRE_BLAST_MAT] = { .id = DECOR_FIRE_BLAST_MAT, @@ -743,7 +743,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_FIRE_BLAST_MAT, .tiles = DecorGfx_FIRE_BLAST_MAT, }, - + [DECOR_POWDER_SNOW_MAT] = { .id = DECOR_POWDER_SNOW_MAT, @@ -755,7 +755,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_POWDER_SNOW_MAT, .tiles = DecorGfx_POWDER_SNOW_MAT, }, - + [DECOR_ATTRACT_MAT] = { .id = DECOR_ATTRACT_MAT, @@ -767,7 +767,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_ATTRACT_MAT, .tiles = DecorGfx_ATTRACT_MAT, }, - + [DECOR_FISSURE_MAT] = { .id = DECOR_FISSURE_MAT, @@ -779,7 +779,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_FISSURE_MAT, .tiles = DecorGfx_FISSURE_MAT, }, - + [DECOR_SPIKES_MAT] = { .id = DECOR_SPIKES_MAT, @@ -791,7 +791,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SPIKES_MAT, .tiles = DecorGfx_SPIKES_MAT, }, - + [DECOR_BALL_POSTER] = { .id = DECOR_BALL_POSTER, @@ -803,7 +803,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BALL_POSTER, .tiles = DecorGfx_BALL_POSTER, }, - + [DECOR_GREEN_POSTER] = { .id = DECOR_GREEN_POSTER, @@ -815,7 +815,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_GREEN_POSTER, .tiles = DecorGfx_GREEN_POSTER, }, - + [DECOR_RED_POSTER] = { .id = DECOR_RED_POSTER, @@ -827,7 +827,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_RED_POSTER, .tiles = DecorGfx_RED_POSTER, }, - + [DECOR_BLUE_POSTER] = { .id = DECOR_BLUE_POSTER, @@ -839,7 +839,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BLUE_POSTER, .tiles = DecorGfx_BLUE_POSTER, }, - + [DECOR_CUTE_POSTER] = { .id = DECOR_CUTE_POSTER, @@ -851,7 +851,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_CUTE_POSTER, .tiles = DecorGfx_CUTE_POSTER, }, - + [DECOR_PIKA_POSTER] = { .id = DECOR_PIKA_POSTER, @@ -863,7 +863,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_PIKA_POSTER, .tiles = DecorGfx_PIKA_POSTER, }, - + [DECOR_LONG_POSTER] = { .id = DECOR_LONG_POSTER, @@ -875,7 +875,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_LONG_POSTER, .tiles = DecorGfx_LONG_POSTER, }, - + [DECOR_SEA_POSTER] = { .id = DECOR_SEA_POSTER, @@ -887,7 +887,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SEA_POSTER, .tiles = DecorGfx_SEA_POSTER, }, - + [DECOR_SKY_POSTER] = { .id = DECOR_SKY_POSTER, @@ -899,7 +899,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SKY_POSTER, .tiles = DecorGfx_SKY_POSTER, }, - + [DECOR_KISS_POSTER] = { .id = DECOR_KISS_POSTER, @@ -911,7 +911,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_KISS_POSTER, .tiles = DecorGfx_KISS_POSTER, }, - + [DECOR_PICHU_DOLL] = { .id = DECOR_PICHU_DOLL, @@ -923,7 +923,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_PICHU_DOLL, .tiles = DecorGfx_PICHU_DOLL, }, - + [DECOR_PIKACHU_DOLL] = { .id = DECOR_PIKACHU_DOLL, @@ -935,7 +935,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_PIKACHU_DOLL, .tiles = DecorGfx_PIKACHU_DOLL, }, - + [DECOR_MARILL_DOLL] = { .id = DECOR_MARILL_DOLL, @@ -947,7 +947,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_MARILL_DOLL, .tiles = DecorGfx_MARILL_DOLL, }, - + [DECOR_TOGEPI_DOLL] = { .id = DECOR_TOGEPI_DOLL, @@ -959,7 +959,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_TOGEPI_DOLL, .tiles = DecorGfx_TOGEPI_DOLL, }, - + [DECOR_CYNDAQUIL_DOLL] = { .id = DECOR_CYNDAQUIL_DOLL, @@ -971,7 +971,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_CYNDAQUIL_DOLL, .tiles = DecorGfx_CYNDAQUIL_DOLL, }, - + [DECOR_CHIKORITA_DOLL] = { .id = DECOR_CHIKORITA_DOLL, @@ -983,7 +983,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_CHIKORITA_DOLL, .tiles = DecorGfx_CHIKORITA_DOLL, }, - + [DECOR_TOTODILE_DOLL] = { .id = DECOR_TOTODILE_DOLL, @@ -995,7 +995,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_TOTODILE_DOLL, .tiles = DecorGfx_TOTODILE_DOLL, }, - + [DECOR_JIGGLYPUFF_DOLL] = { .id = DECOR_JIGGLYPUFF_DOLL, @@ -1007,7 +1007,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_JIGGLYPUFF_DOLL, .tiles = DecorGfx_JIGGLYPUFF_DOLL, }, - + [DECOR_MEOWTH_DOLL] = { .id = DECOR_MEOWTH_DOLL, @@ -1019,7 +1019,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_MEOWTH_DOLL, .tiles = DecorGfx_MEOWTH_DOLL, }, - + [DECOR_CLEFAIRY_DOLL] = { .id = DECOR_CLEFAIRY_DOLL, @@ -1031,7 +1031,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_CLEFAIRY_DOLL, .tiles = DecorGfx_CLEFAIRY_DOLL, }, - + [DECOR_DITTO_DOLL] = { .id = DECOR_DITTO_DOLL, @@ -1043,7 +1043,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_DITTO_DOLL, .tiles = DecorGfx_DITTO_DOLL, }, - + [DECOR_SMOOCHUM_DOLL] = { .id = DECOR_SMOOCHUM_DOLL, @@ -1055,7 +1055,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SMOOCHUM_DOLL, .tiles = DecorGfx_SMOOCHUM_DOLL, }, - + [DECOR_TREECKO_DOLL] = { .id = DECOR_TREECKO_DOLL, @@ -1067,7 +1067,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_TREECKO_DOLL, .tiles = DecorGfx_TREECKO_DOLL, }, - + [DECOR_TORCHIC_DOLL] = { .id = DECOR_TORCHIC_DOLL, @@ -1079,7 +1079,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_TORCHIC_DOLL, .tiles = DecorGfx_TORCHIC_DOLL, }, - + [DECOR_MUDKIP_DOLL] = { .id = DECOR_MUDKIP_DOLL, @@ -1091,7 +1091,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_MUDKIP_DOLL, .tiles = DecorGfx_MUDKIP_DOLL, }, - + [DECOR_DUSKULL_DOLL] = { .id = DECOR_DUSKULL_DOLL, @@ -1103,7 +1103,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_DUSKULL_DOLL, .tiles = DecorGfx_DUSKULL_DOLL, }, - + [DECOR_WYNAUT_DOLL] = { .id = DECOR_WYNAUT_DOLL, @@ -1115,7 +1115,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_WYNAUT_DOLL, .tiles = DecorGfx_WYNAUT_DOLL, }, - + [DECOR_BALTOY_DOLL] = { .id = DECOR_BALTOY_DOLL, @@ -1127,7 +1127,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BALTOY_DOLL, .tiles = DecorGfx_BALTOY_DOLL, }, - + [DECOR_KECLEON_DOLL] = { .id = DECOR_KECLEON_DOLL, @@ -1139,7 +1139,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_KECLEON_DOLL, .tiles = DecorGfx_KECLEON_DOLL, }, - + [DECOR_AZURILL_DOLL] = { .id = DECOR_AZURILL_DOLL, @@ -1151,7 +1151,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_AZURILL_DOLL, .tiles = DecorGfx_AZURILL_DOLL, }, - + [DECOR_SKITTY_DOLL] = { .id = DECOR_SKITTY_DOLL, @@ -1163,7 +1163,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SKITTY_DOLL, .tiles = DecorGfx_SKITTY_DOLL, }, - + [DECOR_SWABLU_DOLL] = { .id = DECOR_SWABLU_DOLL, @@ -1175,7 +1175,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SWABLU_DOLL, .tiles = DecorGfx_SWABLU_DOLL, }, - + [DECOR_GULPIN_DOLL] = { .id = DECOR_GULPIN_DOLL, @@ -1187,7 +1187,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_GULPIN_DOLL, .tiles = DecorGfx_GULPIN_DOLL, }, - + [DECOR_LOTAD_DOLL] = { .id = DECOR_LOTAD_DOLL, @@ -1199,7 +1199,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_LOTAD_DOLL, .tiles = DecorGfx_LOTAD_DOLL, }, - + [DECOR_SEEDOT_DOLL] = { .id = DECOR_SEEDOT_DOLL, @@ -1211,7 +1211,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SEEDOT_DOLL, .tiles = DecorGfx_SEEDOT_DOLL, }, - + [DECOR_PIKA_CUSHION] = { .id = DECOR_PIKA_CUSHION, @@ -1223,7 +1223,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_PIKA_CUSHION, .tiles = DecorGfx_PIKA_CUSHION, }, - + [DECOR_ROUND_CUSHION] = { .id = DECOR_ROUND_CUSHION, @@ -1235,7 +1235,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_ROUND_CUSHION, .tiles = DecorGfx_ROUND_CUSHION, }, - + [DECOR_KISS_CUSHION] = { .id = DECOR_KISS_CUSHION, @@ -1247,7 +1247,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_KISS_CUSHION, .tiles = DecorGfx_KISS_CUSHION, }, - + [DECOR_ZIGZAG_CUSHION] = { .id = DECOR_ZIGZAG_CUSHION, @@ -1259,7 +1259,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_ZIGZAG_CUSHION, .tiles = DecorGfx_ZIGZAG_CUSHION, }, - + [DECOR_SPIN_CUSHION] = { .id = DECOR_SPIN_CUSHION, @@ -1271,7 +1271,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SPIN_CUSHION, .tiles = DecorGfx_SPIN_CUSHION, }, - + [DECOR_DIAMOND_CUSHION] = { .id = DECOR_DIAMOND_CUSHION, @@ -1283,7 +1283,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_DIAMOND_CUSHION, .tiles = DecorGfx_DIAMOND_CUSHION, }, - + [DECOR_BALL_CUSHION] = { .id = DECOR_BALL_CUSHION, @@ -1295,7 +1295,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BALL_CUSHION, .tiles = DecorGfx_BALL_CUSHION, }, - + [DECOR_GRASS_CUSHION] = { .id = DECOR_GRASS_CUSHION, @@ -1307,7 +1307,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_GRASS_CUSHION, .tiles = DecorGfx_GRASS_CUSHION, }, - + [DECOR_FIRE_CUSHION] = { .id = DECOR_FIRE_CUSHION, @@ -1319,7 +1319,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_FIRE_CUSHION, .tiles = DecorGfx_FIRE_CUSHION, }, - + [DECOR_WATER_CUSHION] = { .id = DECOR_WATER_CUSHION, @@ -1331,7 +1331,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_WATER_CUSHION, .tiles = DecorGfx_WATER_CUSHION, }, - + [DECOR_SNORLAX_DOLL] = { .id = DECOR_SNORLAX_DOLL, @@ -1343,7 +1343,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_SNORLAX_DOLL, .tiles = DecorGfx_SNORLAX_DOLL, }, - + [DECOR_RHYDON_DOLL] = { .id = DECOR_RHYDON_DOLL, @@ -1355,7 +1355,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_RHYDON_DOLL, .tiles = DecorGfx_RHYDON_DOLL, }, - + [DECOR_LAPRAS_DOLL] = { .id = DECOR_LAPRAS_DOLL, @@ -1367,7 +1367,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_LAPRAS_DOLL, .tiles = DecorGfx_LAPRAS_DOLL, }, - + [DECOR_VENUSAUR_DOLL] = { .id = DECOR_VENUSAUR_DOLL, @@ -1379,7 +1379,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_VENUSAUR_DOLL, .tiles = DecorGfx_VENUSAUR_DOLL, }, - + [DECOR_CHARIZARD_DOLL] = { .id = DECOR_CHARIZARD_DOLL, @@ -1391,7 +1391,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_CHARIZARD_DOLL, .tiles = DecorGfx_CHARIZARD_DOLL, }, - + [DECOR_BLASTOISE_DOLL] = { .id = DECOR_BLASTOISE_DOLL, @@ -1403,7 +1403,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_BLASTOISE_DOLL, .tiles = DecorGfx_BLASTOISE_DOLL, }, - + [DECOR_WAILMER_DOLL] = { .id = DECOR_WAILMER_DOLL, @@ -1415,7 +1415,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_WAILMER_DOLL, .tiles = DecorGfx_WAILMER_DOLL, }, - + [DECOR_REGIROCK_DOLL] = { .id = DECOR_REGIROCK_DOLL, @@ -1427,7 +1427,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_REGIROCK_DOLL, .tiles = DecorGfx_REGIROCK_DOLL, }, - + [DECOR_REGICE_DOLL] = { .id = DECOR_REGICE_DOLL, @@ -1439,7 +1439,7 @@ const struct Decoration gDecorations[] = .description = DecorDesc_REGICE_DOLL, .tiles = DecorGfx_REGICE_DOLL, }, - + [DECOR_REGISTEEL_DOLL] = { .id = DECOR_REGISTEEL_DOLL, diff --git a/src/data/decoration/icon.h b/src/data/decoration/icon.h index b29dab20f3..03a0e06695 100644 --- a/src/data/decoration/icon.h +++ b/src/data/decoration/icon.h @@ -1,4 +1,4 @@ -const u32 *const gDecorIconTable[][2] = +const u32 *const gDecorIconTable[][2] = { [DECOR_NONE] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, [DECOR_SMALL_DESK] = {NULL, NULL}, diff --git a/src/data/field_effects/field_effect_objects.h b/src/data/field_effects/field_effect_objects.h index 54145efbcc..ae8743869a 100755 --- a/src/data/field_effects/field_effect_objects.h +++ b/src/data/field_effects/field_effect_objects.h @@ -1147,14 +1147,14 @@ static const union AnimCmd *const sAnimTable_AshPuff[] = sAnim_AshPuff, }; -const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff = +const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff = { - .tileTag = 0xFFFF, - .paletteTag = FLDEFF_PAL_TAG_ASH, - .oam = &gObjectEventBaseOam_16x16, - .anims = sAnimTable_AshPuff, - .images = sPicTable_AshPuff, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = FLDEFF_PAL_TAG_ASH, + .oam = &gObjectEventBaseOam_16x16, + .anims = sAnimTable_AshPuff, + .images = sPicTable_AshPuff, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_AshPuff }; @@ -1183,14 +1183,14 @@ static const union AnimCmd *const sAnimTable_AshLaunch[] = sAnim_AshLaunch, }; -const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch = +const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch = { - .tileTag = 0xFFFF, - .paletteTag = FLDEFF_PAL_TAG_ASH, - .oam = &gObjectEventBaseOam_16x16, - .anims = sAnimTable_AshLaunch, - .images = sPicTable_AshLaunch, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = FLDEFF_PAL_TAG_ASH, + .oam = &gObjectEventBaseOam_16x16, + .anims = sAnimTable_AshLaunch, + .images = sPicTable_AshLaunch, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_AshLaunch }; diff --git a/src/data/graphics/rayquaza_scene.h b/src/data/graphics/rayquaza_scene.h index 633213db87..660f07416c 100644 --- a/src/data/graphics/rayquaza_scene.h +++ b/src/data/graphics/rayquaza_scene.h @@ -24,7 +24,7 @@ const u32 gRaySceneTakesFlight_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaz // Scene 3 (RAY_ANIM_DESCENDS) const u32 gRaySceneDescends_Rayquaza_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/rayquaza.4bpp.lz"); -// for some reason there are an extra 0xC bytes at the end of the original rayquaza_tail.4bpp, so in order to produce the correct lz, +// for some reason there are an extra 0xC bytes at the end of the original rayquaza_tail.4bpp, so in order to produce the correct lz, // we have to cat the bytes at the end with a make rule. not sure why those bytes are there, it may have been a bug in Game Freak's software. const u32 gRaySceneDescends_RayquazaTail_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/rayquaza_tail_fix.4bpp.lz"); const u32 gRaySceneDescends_Bg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/bg.4bpp.lz"); diff --git a/src/data/lilycove_lady.h b/src/data/lilycove_lady.h index 818a5fd5f3..b1a6ddfe5e 100644 --- a/src/data/lilycove_lady.h +++ b/src/data/lilycove_lady.h @@ -35,7 +35,7 @@ static const u16 sQuizLadyQuestion1[] = static const u16 sQuizLadyQuestion2[] = { - EC_WORD_WHICH, + EC_WORD_WHICH, EC_WORD_ISN_T, EC_WORD_A, EC_WORD_GAME, @@ -118,7 +118,7 @@ static const u16 sQuizLadyQuestion8[] = EC_MOVE2(BLOCK), EC_WORD_ESCAPE, EC_WORD_QUES, - EC_EMPTY_WORD, + EC_EMPTY_WORD, EC_WORD_RUN_AWAY, EC_WORD_SHADOW_TAG, EC_WORD_WONDER_GUARD diff --git a/src/data/object_events/object_event_anims.h b/src/data/object_events/object_event_anims.h index 93f4022583..a66d634b07 100755 --- a/src/data/object_events/object_event_anims.h +++ b/src/data/object_events/object_event_anims.h @@ -950,7 +950,7 @@ static const union AnimCmd sAnim_RayquazaFaceEast[] = }; // Though they correspond to facing/walking movements, Rayquaza doesn't have -// equivalent images aside from flying up. Its other frames aside from the 'normal' +// equivalent images aside from flying up. Its other frames aside from the 'normal' // frame are for the sequence where it awakens on Sky Pillar. // The corresponding facing/walking movements are commented alongside static const union AnimCmd *const sAnimTable_Rayquaza[] = { diff --git a/src/data/object_events/object_event_subsprites.h b/src/data/object_events/object_event_subsprites.h index 0d55c2df28..b508509cad 100755 --- a/src/data/object_events/object_event_subsprites.h +++ b/src/data/object_events/object_event_subsprites.h @@ -1,78 +1,78 @@ static const struct Subsprite sOamTable_16x16_0[] = { - { - .x = -8, - .y = -8, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + { + .x = -8, + .y = -8, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 0, .priority = 2 } }; static const struct Subsprite sOamTable_16x16_1[] = { - { - .x = -8, - .y = -8, - .shape = SPRITE_SHAPE(16x16), + { + .x = -8, + .y = -8, + .shape = SPRITE_SHAPE(16x16), .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + .tileOffset = 0, .priority = 1 } }; static const struct Subsprite sOamTable_16x16_2[] = { - { - .x = -8, - .y = -8, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 0, + { + .x = -8, + .y = -8, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 0, .priority = 2 }, - { - .x = -8, - .y = 0, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 2, + { + .x = -8, + .y = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 2, .priority = 3 } }; static const struct Subsprite sOamTable_16x16_3[] = { - { - .x = -8, - .y = -8, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + { + .x = -8, + .y = -8, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 0, .priority = 2 }, - { - .x = -8, - .y = -8, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + { + .x = -8, + .y = -8, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 0, .priority = 3 } }; static const struct Subsprite sOamTable_16x16_4[] = { - { - .x = -8, - .y = -8, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + { + .x = -8, + .y = -8, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 0, .priority = 1 }, - { - .x = -8, - .y = -8, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + { + .x = -8, + .y = -8, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 0, .priority = 3 } }; @@ -87,88 +87,88 @@ static const struct SubspriteTable sOamTables_16x16[] = { }; static const struct Subsprite sOamTable_16x32_0[] = { - { - .x = -8, - .y = -16, - .shape = SPRITE_SHAPE(16x32), - .size = SPRITE_SIZE(16x32), - .tileOffset = 0, + { + .x = -8, + .y = -16, + .shape = SPRITE_SHAPE(16x32), + .size = SPRITE_SIZE(16x32), + .tileOffset = 0, .priority = 2 } }; static const struct Subsprite sOamTable_16x32_1[] = { - { - .x = -8, - .y = -16, - .shape = SPRITE_SHAPE(16x32), + { + .x = -8, + .y = -16, + .shape = SPRITE_SHAPE(16x32), .size = SPRITE_SIZE(16x32), - .tileOffset = 0, + .tileOffset = 0, .priority = 1 } }; static const struct Subsprite sOamTable_16x32_2[] = { - { - .x = -8, - .y = -16, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + { + .x = -8, + .y = -16, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 0, .priority = 2 }, - { - .x = -8, - .y = 0, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 4, + { + .x = -8, + .y = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 4, .priority = 2 }, - { - .x = -8, - .y = 8, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 6, + { + .x = -8, + .y = 8, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 6, .priority = 3 } }; static const struct Subsprite sOamTable_16x32_3[] = { - { - .x = -8, - .y = -16, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + { + .x = -8, + .y = -16, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 0, .priority = 2 }, - { - .x = -8, - .y = 0, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 4, + { + .x = -8, + .y = 0, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 4, .priority = 3 } }; static const struct Subsprite sOamTable_16x32_4[] = { - { - .x = -8, - .y = -16, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 0, + { + .x = -8, + .y = -16, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 0, .priority = 1 }, - { - .x = -8, - .y = 0, - .shape = SPRITE_SHAPE(16x16), - .size = SPRITE_SIZE(16x16), - .tileOffset = 4, + { + .x = -8, + .y = 0, + .shape = SPRITE_SHAPE(16x16), + .size = SPRITE_SIZE(16x16), + .tileOffset = 4, .priority = 3 } }; @@ -184,87 +184,87 @@ static const struct SubspriteTable sOamTables_16x32[] = { static const struct Subsprite sOamTable_32x32_0[] = { { - .x = -16, - .y = -16, - .shape = SPRITE_SHAPE(32x32), - .size = SPRITE_SIZE(32x32), - .tileOffset = 0, + .x = -16, + .y = -16, + .shape = SPRITE_SHAPE(32x32), + .size = SPRITE_SIZE(32x32), + .tileOffset = 0, .priority = 2 } }; static const struct Subsprite sOamTable_32x32_1[] = { { - .x = -16, - .y = -16, - .shape = SPRITE_SHAPE(32x32), + .x = -16, + .y = -16, + .shape = SPRITE_SHAPE(32x32), .size = SPRITE_SIZE(32x32), - .tileOffset = 0, + .tileOffset = 0, .priority = 1 } }; static const struct Subsprite sOamTable_32x32_2[] = { { - .x = -16, - .y = -16, - .shape = SPRITE_SHAPE(32x16), - .size = SPRITE_SIZE(32x16), - .tileOffset = 0, + .x = -16, + .y = -16, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), + .tileOffset = 0, .priority = 2 }, { - .x = -16, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = -16, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 2 }, { - .x = -16, - .y = 8, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .x = -16, + .y = 8, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 12, .priority = 3 } }; static const struct Subsprite sOamTable_32x32_3[] = { { - .x = -16, - .y = -16, - .shape = SPRITE_SHAPE(32x16), - .size = SPRITE_SIZE(32x16), - .tileOffset = 0, + .x = -16, + .y = -16, + .shape = SPRITE_SHAPE(32x16), + .size = SPRITE_SIZE(32x16), + .tileOffset = 0, .priority = 2 }, { - .x = -16, - .y = 0, - .shape = SPRITE_SHAPE(32x16), + .x = -16, + .y = 0, + .shape = SPRITE_SHAPE(32x16), .size = SPRITE_SIZE(32x16), - .tileOffset = 8, + .tileOffset = 8, .priority = 3 } }; static const struct Subsprite sOamTable_32x32_4[] = { { - .x = -16, - .y = -16, - .shape = SPRITE_SHAPE(32x16), + .x = -16, + .y = -16, + .shape = SPRITE_SHAPE(32x16), .size = SPRITE_SIZE(32x16), - .tileOffset = 0, + .tileOffset = 0, .priority = 1 }, { - .x = -16, - .y = 0, - .shape = SPRITE_SHAPE(32x16), + .x = -16, + .y = 0, + .shape = SPRITE_SHAPE(32x16), .size = SPRITE_SIZE(32x16), - .tileOffset = 8, + .tileOffset = 8, .priority = 3 } }; @@ -280,99 +280,99 @@ static const struct SubspriteTable sOamTables_32x32[] = { static const struct Subsprite sOamTable_48x48[] = { { - .x = -24, - .y = -24, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -24, + .y = -24, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 2 }, { - .x = 8, - .y = -24, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 4, + .x = 8, + .y = -24, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 4, .priority = 2 }, { - .x = -24, - .y = -16, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 6, + .x = -24, + .y = -16, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 6, .priority = 2 }, { - .x = 8, - .y = -16, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 10, + .x = 8, + .y = -16, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 10, .priority = 2 }, { - .x = -24, - .y = -8, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .x = -24, + .y = -8, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 12, .priority = 2 }, { - .x = 8, - .y = -8, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 16, + .x = 8, + .y = -8, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 16, .priority = 2 }, { - .x = -24, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 18, + .x = -24, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 18, .priority = 2 }, { - .x = 8, - .y = 0, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 22, + .x = 8, + .y = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 22, .priority = 2 }, { - .x = -24, - .y = 8, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 24, + .x = -24, + .y = 8, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 24, .priority = 2 }, { - .x = 8, - .y = 8, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 28, + .x = 8, + .y = 8, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 28, .priority = 2 }, { - .x = -24, - .y = 16, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 30, + .x = -24, + .y = 16, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 30, .priority = 2 }, { - .x = 8, - .y = 16, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 34, + .x = 8, + .y = 16, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 34, .priority = 2 } }; @@ -388,44 +388,44 @@ static const struct SubspriteTable sOamTables_48x48[] = { static const struct Subsprite sOamTable_64x32_0[] = { { - .x = -32, - .y = -16, - .shape = SPRITE_SHAPE(64x32), - .size = SPRITE_SIZE(64x32), - .tileOffset = 0, + .x = -32, + .y = -16, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), + .tileOffset = 0, .priority = 2 } }; static const struct Subsprite sOamTable_64x32_1[] = { { - .x = -32, - .y = -16, - .shape = SPRITE_SHAPE(64x32), - .size = SPRITE_SIZE(64x32), - .tileOffset = 0, + .x = -32, + .y = -16, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), + .tileOffset = 0, .priority = 1 } }; static const struct Subsprite sOamTable_64x32_2[] = { { - .x = -32, - .y = -16, - .shape = SPRITE_SHAPE(64x32), - .size = SPRITE_SIZE(64x32), - .tileOffset = 0, + .x = -32, + .y = -16, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), + .tileOffset = 0, .priority = 2 } }; static const struct Subsprite sOamTable_64x32_3[] = { { - .x = -32, - .y = -16, - .shape = SPRITE_SHAPE(64x32), - .size = SPRITE_SIZE(64x32), - .tileOffset = 0, + .x = -32, + .y = -16, + .shape = SPRITE_SHAPE(64x32), + .size = SPRITE_SIZE(64x32), + .tileOffset = 0, .priority = 2 } }; @@ -442,44 +442,44 @@ static const struct SubspriteTable sOamTables_64x32[] = { static const struct Subsprite sOamTable_64x64_0[] = { { - .x = -32, - .y = -32, - .shape = SPRITE_SHAPE(64x64), - .size = SPRITE_SIZE(64x64), - .tileOffset = 0, + .x = -32, + .y = -32, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), + .tileOffset = 0, .priority = 2 } }; static const struct Subsprite sOamTable_64x64_1[] = { { - .x = -32, - .y = -32, - .shape = SPRITE_SHAPE(64x64), - .size = SPRITE_SIZE(64x64), - .tileOffset = 0, + .x = -32, + .y = -32, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), + .tileOffset = 0, .priority = 1 } }; static const struct Subsprite sOamTable_64x64_2[] = { { - .x = -32, - .y = -32, - .shape = SPRITE_SHAPE(64x64), - .size = SPRITE_SIZE(64x64), - .tileOffset = 0, + .x = -32, + .y = -32, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), + .tileOffset = 0, .priority = 2 } }; static const struct Subsprite sOamTable_64x64_3[] = { { - .x = -32, - .y = -32, - .shape = SPRITE_SHAPE(64x64), - .size = SPRITE_SIZE(64x64), - .tileOffset = 0, + .x = -32, + .y = -32, + .shape = SPRITE_SHAPE(64x64), + .size = SPRITE_SIZE(64x64), + .tileOffset = 0, .priority = 2 } }; @@ -495,492 +495,492 @@ static const struct SubspriteTable sOamTables_64x64[] = { static const struct Subsprite sOamTable_96x40_0[] = { { - .x = -48, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -48, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 2 }, { - .x = -16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = -16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 2 }, { - .x = 16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = 16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 2 }, { - .x = -48, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .x = -48, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 12, .priority = 2 }, { - .x = -16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 16, + .x = -16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 16, .priority = 2 }, { - .x = 16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 20, + .x = 16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 20, .priority = 2 }, { - .x = -48, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 24, + .x = -48, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 24, .priority = 2 }, { - .x = -16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 28, + .x = -16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 28, .priority = 2 }, { - .x = 16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 32, + .x = 16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 32, .priority = 2 }, { - .x = -48, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 36, + .x = -48, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 36, .priority = 2 }, { - .x = -16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 40, + .x = -16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 40, .priority = 2 }, { - .x = 16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 44, + .x = 16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 44, .priority = 2 }, { - .x = -48, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 48, + .x = -48, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 48, .priority = 2 }, { - .x = -16, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 52, + .x = -16, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 52, .priority = 2 }, { - .x = 16, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 56, + .x = 16, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 56, .priority = 2 } }; static const struct Subsprite sOamTable_96x40_1[] = { { - .x = -48, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -48, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 1 }, { - .x = -16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = -16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 1 }, { - .x = 16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = 16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 1 }, { - .x = -48, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .x = -48, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 12, .priority = 1 }, { - .x = -16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 16, + .x = -16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 16, .priority = 1 }, { - .x = 16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 20, + .x = 16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 20, .priority = 1 }, { - .x = -48, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 24, + .x = -48, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 24, .priority = 1 }, { - .x = -16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 28, + .x = -16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 28, .priority = 1 }, { - .x = 16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 32, + .x = 16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 32, .priority = 1 }, { - .x = -48, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 36, + .x = -48, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 36, .priority = 1 }, { - .x = -16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 40, + .x = -16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 40, .priority = 1 }, { - .x = 16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 44, + .x = 16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 44, .priority = 1 }, { - .x = -48, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 48, + .x = -48, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 48, .priority = 1 }, { - .x = -16, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 52, + .x = -16, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 52, .priority = 1 }, { - .x = 16, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 56, + .x = 16, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 56, .priority = 1 } }; static const struct Subsprite sOamTable_96x40_2[] = { { - .x = -48, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -48, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 2 }, { - .x = -16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = -16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 2 }, { - .x = 16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = 16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 2 }, { - .x = -48, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .x = -48, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 12, .priority = 2 }, { - .x = -16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 16, + .x = -16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 16, .priority = 2 }, { - .x = 16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 20, + .x = 16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 20, .priority = 2 }, { - .x = -48, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 24, + .x = -48, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 24, .priority = 2 }, { - .x = -16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 28, + .x = -16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 28, .priority = 2 }, { - .x = 16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 32, + .x = 16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 32, .priority = 2 }, { - .x = -48, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 36, + .x = -48, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 36, .priority = 2 }, { - .x = -16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 40, + .x = -16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 40, .priority = 2 }, { - .x = 16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 44, + .x = 16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 44, .priority = 2 }, { - .x = -48, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 48, + .x = -48, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 48, .priority = 2 }, { - .x = -16, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 52, + .x = -16, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 52, .priority = 2 }, { - .x = 16, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 56, + .x = 16, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 56, .priority = 2 } }; static const struct Subsprite sOamTable_96x40_3[] = { { - .x = -48, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -48, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 1 }, { - .x = -16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = -16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 1 }, { - .x = 16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .x = 16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 8, .priority = 1 }, { - .x = -48, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .x = -48, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 12, .priority = 1 }, { - .x = -16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 16, + .x = -16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 16, .priority = 1 }, { - .x = 16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 20, + .x = 16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 20, .priority = 1 }, { - .x = -48, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 24, + .x = -48, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 24, .priority = 2 }, { - .x = -16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 28, + .x = -16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 28, .priority = 2 }, { - .x = 16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 32, + .x = 16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 32, .priority = 2 }, { - .x = -48, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 36, + .x = -48, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 36, .priority = 2 }, { - .x = -16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 40, + .x = -16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 40, .priority = 2 }, { - .x = 16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 44, + .x = 16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 44, .priority = 2 }, { - .x = -48, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 48, + .x = -48, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 48, .priority = 2 }, { - .x = -16, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 52, + .x = -16, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 52, .priority = 2 }, { - .x = 16, - .y = 12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 56, + .x = 16, + .y = 12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 56, .priority = 2 } }; @@ -997,524 +997,524 @@ static const struct SubspriteTable sOamTables_96x40[] = { static const struct Subsprite sOamTable_88x32_0[] = { { - .x = -48, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -48, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 2 }, { - .x = -16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = -16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 2 }, { - .x = 16, - .y = -20, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 8, + .x = 16, + .y = -20, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 8, .priority = 2 }, { - .x = 32, - .y = -20, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 10, + .x = 32, + .y = -20, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 10, .priority = 2 }, { - .x = -48, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 11, + .x = -48, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 11, .priority = 2 }, { - .x = -16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 15, + .x = -16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 15, .priority = 2 }, { - .x = 16, - .y = -12, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 19, + .x = 16, + .y = -12, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 19, .priority = 2 }, { - .x = 32, - .y = -12, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 21, + .x = 32, + .y = -12, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 21, .priority = 2 }, { - .x = -48, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 22, + .x = -48, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 22, .priority = 2 }, { - .x = -16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 26, + .x = -16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 26, .priority = 2 }, { - .x = 16, - .y = -4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 30, + .x = 16, + .y = -4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 30, .priority = 2 }, { - .x = 32, - .y = -4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 32, + .x = 32, + .y = -4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 32, .priority = 2 }, { - .x = -48, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 33, + .x = -48, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 33, .priority = 2 }, { - .x = -16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 37, + .x = -16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 37, .priority = 2 }, { - .x = 16, - .y = 4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 41, + .x = 16, + .y = 4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 41, .priority = 2 }, { - .x = 32, - .y = 4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 43, + .x = 32, + .y = 4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 43, .priority = 2 } }; static const struct Subsprite sOamTable_88x32_1[] = { { - .x = -48, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -48, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 1 }, { - .x = -16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = -16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 1 }, { - .x = 16, - .y = -20, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 8, + .x = 16, + .y = -20, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 8, .priority = 1 }, { - .x = 32, - .y = -20, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 10, + .x = 32, + .y = -20, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 10, .priority = 1 }, { - .x = -48, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 11, + .x = -48, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 11, .priority = 1 }, { - .x = -16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 15, + .x = -16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 15, .priority = 1 }, { - .x = 16, - .y = -12, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 19, + .x = 16, + .y = -12, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 19, .priority = 1 }, { - .x = 32, - .y = -12, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 21, + .x = 32, + .y = -12, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 21, .priority = 1 }, { - .x = -48, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 22, + .x = -48, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 22, .priority = 1 }, { - .x = -16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 26, + .x = -16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 26, .priority = 1 }, { - .x = 16, - .y = -4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 30, + .x = 16, + .y = -4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 30, .priority = 1 }, { - .x = 32, - .y = -4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 32, + .x = 32, + .y = -4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 32, .priority = 1 }, { - .x = -48, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 33, + .x = -48, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 33, .priority = 1 }, { - .x = -16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 37, + .x = -16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 37, .priority = 1 }, { - .x = 16, - .y = 4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 41, + .x = 16, + .y = 4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 41, .priority = 1 }, { - .x = 32, - .y = 4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 43, + .x = 32, + .y = 4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 43, .priority = 1 } }; static const struct Subsprite sOamTable_88x32_2[] = { { - .x = -48, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -48, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 2 }, { - .x = -16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = -16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 2 }, { - .x = 16, - .y = -20, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 8, + .x = 16, + .y = -20, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 8, .priority = 2 }, { - .x = 32, - .y = -20, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 10, + .x = 32, + .y = -20, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 10, .priority = 2 }, { - .x = -48, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 11, + .x = -48, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 11, .priority = 2 }, { - .x = -16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 15, + .x = -16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 15, .priority = 2 }, { - .x = 16, - .y = -12, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 19, + .x = 16, + .y = -12, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 19, .priority = 2 }, { - .x = 32, - .y = -12, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 21, + .x = 32, + .y = -12, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 21, .priority = 2 }, { - .x = -48, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 22, + .x = -48, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 22, .priority = 2 }, { - .x = -16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 26, + .x = -16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 26, .priority = 2 }, { - .x = 16, - .y = -4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 30, + .x = 16, + .y = -4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 30, .priority = 2 }, { - .x = 32, - .y = -4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 32, + .x = 32, + .y = -4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 32, .priority = 2 }, { - .x = -48, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 33, + .x = -48, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 33, .priority = 2 }, { - .x = -16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 37, + .x = -16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 37, .priority = 2 }, { - .x = 16, - .y = 4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 41, + .x = 16, + .y = 4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 41, .priority = 2 }, { - .x = 32, - .y = 4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 43, + .x = 32, + .y = 4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 43, .priority = 2 } }; static const struct Subsprite sOamTable_88x32_3[] = { { - .x = -48, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .x = -48, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 0, .priority = 1 }, { - .x = -16, - .y = -20, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .x = -16, + .y = -20, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 4, .priority = 1 }, { - .x = 16, - .y = -20, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 8, + .x = 16, + .y = -20, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 8, .priority = 1 }, { - .x = 32, - .y = -20, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 10, + .x = 32, + .y = -20, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 10, .priority = 1 }, { - .x = -48, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 11, + .x = -48, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 11, .priority = 1 }, { - .x = -16, - .y = -12, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 15, + .x = -16, + .y = -12, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 15, .priority = 1 }, { - .x = 16, - .y = -12, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 19, + .x = 16, + .y = -12, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 19, .priority = 1 }, { - .x = 32, - .y = -12, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 21, + .x = 32, + .y = -12, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 21, .priority = 1 }, { - .x = -48, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 22, + .x = -48, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 22, .priority = 2 }, { - .x = -16, - .y = -4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 26, + .x = -16, + .y = -4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 26, .priority = 2 }, { - .x = 16, - .y = -4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 30, + .x = 16, + .y = -4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 30, .priority = 2 }, { - .x = 32, - .y = -4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 32, + .x = 32, + .y = -4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 32, .priority = 2 }, { - .x = -48, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 33, + .x = -48, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 33, .priority = 2 }, { - .x = -16, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 37, + .x = -16, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 37, .priority = 2 }, { - .x = 16, - .y = 4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 41, + .x = 16, + .y = 4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 41, .priority = 2 }, { - .x = 32, - .y = 4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 43, + .x = 32, + .y = 4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 43, .priority = 2 } }; diff --git a/src/data/party_menu.h b/src/data/party_menu.h index 570ef738eb..f3a8a50ec0 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -37,9 +37,9 @@ enum static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = { - [PARTY_BOX_LEFT_COLUMN] = + [PARTY_BOX_LEFT_COLUMN] = { - BlitBitmapToPartyWindow_LeftColumn, + BlitBitmapToPartyWindow_LeftColumn, { //The below are the x, y, width, and height for each of the following info 24, 11, 40, 13, // Nickname @@ -48,12 +48,12 @@ static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = 38, 37, 24, 8, // HP 53, 37, 24, 8, // Max HP 24, 35, 48, 3 // HP bar - }, + }, 12, 34, 64, 16 // Description text (e.g. NO USE) }, - [PARTY_BOX_RIGHT_COLUMN] = + [PARTY_BOX_RIGHT_COLUMN] = { - BlitBitmapToPartyWindow_RightColumn, + BlitBitmapToPartyWindow_RightColumn, { // See above comment 22, 3, 40, 13, // Nickname @@ -62,7 +62,7 @@ static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = 102, 12, 24, 8, // HP 117, 12, 24, 8, // Max HP 88, 10, 48, 3 // HP bar - }, + }, 77, 4, 64, 16 // Description text }, }; @@ -73,7 +73,7 @@ static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] = // Pokemon icon (x, y), held item (x, y), status condition (x, y), menu pokeball (x, y) static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = { - [PARTY_LAYOUT_SINGLE] = + [PARTY_LAYOUT_SINGLE] = { { 16, 40, 20, 50, 50, 52, 16, 34}, {104, 18, 108, 28, 136, 27, 102, 25}, @@ -82,7 +82,7 @@ static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = {104, 90, 108, 100, 136, 99, 102, 97}, {104, 114, 108, 124, 136, 123, 102, 121}, }, - [PARTY_LAYOUT_DOUBLE] = + [PARTY_LAYOUT_DOUBLE] = { {16, 24, 20, 34, 50, 36, 16, 18}, {16, 80, 20, 90, 50, 92, 16, 74}, @@ -91,7 +91,7 @@ static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = {104, 82, 108, 92, 136, 91, 102, 89}, {104, 114, 108, 124, 136, 123, 102, 121}, }, - [PARTY_LAYOUT_MULTI] = + [PARTY_LAYOUT_MULTI] = { {16, 24, 20, 34, 50, 36, 16, 18}, {16, 80, 20, 90, 50, 92, 16, 74}, @@ -100,7 +100,7 @@ static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = {104, 82, 106, 92, 136, 91, 102, 89}, {104, 106, 106, 116, 136, 115, 102, 113}, }, - [PARTY_LAYOUT_MULTI_SHOWCASE] = + [PARTY_LAYOUT_MULTI_SHOWCASE] = { {16, 32, 20, 42, 50, 44, 16, 26}, {104, 34, 106, 44, 136, 43, 102, 41}, @@ -1171,14 +1171,14 @@ static const struct SpriteTemplate sSpriteTemplate_StatusIcons = // Mask for the partners party in a multi battle. TRUE if in the partners party, FALSE otherwise // The 7th slot is Cancel, and the 8th slot is unreachable // Used only to determine whether or not to show the Deoxys form icon sprite -static const bool8 sMultiBattlePartnersPartyMask[PARTY_SIZE + 2] = +static const bool8 sMultiBattlePartnersPartyMask[PARTY_SIZE + 2] = { - FALSE, - TRUE, - FALSE, - FALSE, - TRUE, - TRUE, + FALSE, + TRUE, + FALSE, + FALSE, + TRUE, + TRUE, FALSE }; diff --git a/src/data/region_map/city_map_entries.h b/src/data/region_map/city_map_entries.h index d5478c7b49..8ff4530593 100644 --- a/src/data/region_map/city_map_entries.h +++ b/src/data/region_map/city_map_entries.h @@ -1,4 +1,4 @@ -static const struct CityMapEntry sPokenavCityMaps[NUM_CITY_MAPS] = +static const struct CityMapEntry sPokenavCityMaps[NUM_CITY_MAPS] = { { .mapSecId = MAPSEC_LITTLEROOT_TOWN, diff --git a/src/data/script_menu.h b/src/data/script_menu.h index 3880c3c0c8..79355748c7 100644 --- a/src/data/script_menu.h +++ b/src/data/script_menu.h @@ -110,35 +110,35 @@ static const struct MenuAction MultichoiceList_Mechadoll1_Q1[] = {gTrickHouse_Mechadoll_Taillow}, }; -static const struct MenuAction MultichoiceList_Mechadoll1_Q2[] = +static const struct MenuAction MultichoiceList_Mechadoll1_Q2[] = { {gTrickHouse_Mechadoll_Azurill}, {gTrickHouse_Mechadoll_Lotad}, {gTrickHouse_Mechadoll_Wingull}, }; -static const struct MenuAction MultichoiceList_Mechadoll1_Q3[] = +static const struct MenuAction MultichoiceList_Mechadoll1_Q3[] = { {gTrickHouse_Mechadoll_Dustox}, {gTrickHouse_Mechadoll_Zubat}, {gTrickHouse_Mechadoll_Nincada}, }; -static const struct MenuAction MultichoiceList_Mechadoll2_Q1[] = +static const struct MenuAction MultichoiceList_Mechadoll2_Q1[] = { {gTrickHouse_Mechadoll_Ralts}, {gTrickHouse_Mechadoll_Zigzagoon}, {gTrickHouse_Mechadoll_Slakoth}, }; -static const struct MenuAction MultichoiceList_Mechadoll2_Q2[] = +static const struct MenuAction MultichoiceList_Mechadoll2_Q2[] = { {gTrickHouse_Mechadoll_Poochyena2}, {gTrickHouse_Mechadoll_Shroomish}, {gTrickHouse_Mechadoll_Zigzagoon2}, }; -static const struct MenuAction MultichoiceList_Mechadoll2_Q3[] = +static const struct MenuAction MultichoiceList_Mechadoll2_Q3[] = { {gTrickHouse_Mechadoll_Poochyena3}, {gTrickHouse_Mechadoll_Zubat2}, @@ -152,56 +152,56 @@ static const struct MenuAction MultichoiceList_Mechadoll3_Q1[] = {gTrickHouse_Mechadoll_SamePrice}, }; -static const struct MenuAction MultichoiceList_Mechadoll3_Q2[] = +static const struct MenuAction MultichoiceList_Mechadoll3_Q2[] = { {gTrickHouse_Mechadoll_60Yen}, {gTrickHouse_Mechadoll_55Yen}, {gTrickHouse_Mechadoll_Nothing}, }; -static const struct MenuAction MultichoiceList_Mechadoll3_Q3[] = +static const struct MenuAction MultichoiceList_Mechadoll3_Q3[] = { {gTrickHouse_Mechadoll_CostMore}, {gTrickHouse_Mechadoll_CostLess}, {gTrickHouse_Mechadoll_SamePrice2}, }; -static const struct MenuAction MultichoiceList_Mechadoll4_Q1[] = +static const struct MenuAction MultichoiceList_Mechadoll4_Q1[] = { {gTrickHouse_Mechadoll_Male}, {gTrickHouse_Mechadoll_Female}, {gTrickHouse_Mechadoll_Neither}, }; -static const struct MenuAction MultichoiceList_Mechadoll4_Q2[] = +static const struct MenuAction MultichoiceList_Mechadoll4_Q2[] = { {gTrickHouse_Mechadoll_ElderlyMen}, {gTrickHouse_Mechadoll_ElderlyLadies}, {gTrickHouse_Mechadoll_SameNumber}, }; -static const struct MenuAction MultichoiceList_Mechadoll4_Q3[] = +static const struct MenuAction MultichoiceList_Mechadoll4_Q3[] = { {gTrickHouse_Mechadoll_None}, {gTrickHouse_Mechadoll_One}, {gTrickHouse_Mechadoll_Two}, }; -static const struct MenuAction MultichoiceList_Mechadoll5_Q1[] = +static const struct MenuAction MultichoiceList_Mechadoll5_Q1[] = { {gTrickHouse_Mechadoll_Two2}, {gTrickHouse_Mechadoll_Three}, {gTrickHouse_Mechadoll_Four}, }; -static const struct MenuAction MultichoiceList_Mechadoll5_Q2[] = +static const struct MenuAction MultichoiceList_Mechadoll5_Q2[] = { {gTrickHouse_Mechadoll_Six}, {gTrickHouse_Mechadoll_Seven}, {gTrickHouse_Mechadoll_Eight}, }; -static const struct MenuAction MultichoiceList_Mechadoll5_Q3[] = +static const struct MenuAction MultichoiceList_Mechadoll5_Q3[] = { {gTrickHouse_Mechadoll_Six2}, {gTrickHouse_Mechadoll_Seven2}, @@ -934,14 +934,14 @@ const u8 *const gStdStrings[] = [STDSTRING_BATTLE_PYRAMID] = gText_BattlePyramid, }; -static const u8 sLinkServicesMultichoiceIds[] = -{ - MULTI_CABLE_CLUB_NO_RECORD_MIX, - MULTI_WIRELESS_NO_RECORD_BERRY, - MULTI_CABLE_CLUB_WITH_RECORD_MIX, - MULTI_WIRELESS_NO_BERRY, - MULTI_WIRELESS_NO_RECORD, - MULTI_WIRELESS_ALL_SERVICES +static const u8 sLinkServicesMultichoiceIds[] = +{ + MULTI_CABLE_CLUB_NO_RECORD_MIX, + MULTI_WIRELESS_NO_RECORD_BERRY, + MULTI_CABLE_CLUB_WITH_RECORD_MIX, + MULTI_WIRELESS_NO_BERRY, + MULTI_WIRELESS_NO_RECORD, + MULTI_WIRELESS_ALL_SERVICES }; static const u8 *const sPCNameStrings[] = diff --git a/src/data/text/gift_ribbon_descriptions.h b/src/data/text/gift_ribbon_descriptions.h index a95f9729d9..0ba7a33d50 100644 --- a/src/data/text/gift_ribbon_descriptions.h +++ b/src/data/text/gift_ribbon_descriptions.h @@ -46,7 +46,7 @@ const u8 gGiftRibbonDescriptionPart2_LovedPokemon[] = _("for a loved POKéMON.") const u8 gGiftRibbonDescriptionPart1_LoveForPokemon[] = _("RIBBON that shows"); const u8 gGiftRibbonDescriptionPart2_LoveForPokemon[] = _("love for POKéMON."); -const u8 *const gGiftRibbonDescriptionPointers[MAX_GIFT_RIBBON][2] = +const u8 *const gGiftRibbonDescriptionPointers[MAX_GIFT_RIBBON][2] = { {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion}, diff --git a/src/data/text/match_call_messages.h b/src/data/text/match_call_messages.h index 6ea3b549f0..c86329ee2f 100644 --- a/src/data/text/match_call_messages.h +++ b/src/data/text/match_call_messages.h @@ -388,7 +388,7 @@ const u8 gText_MatchCallChampion_Wallace_Pokemon[] = _("I prefer POKéMON of gra const u8 gText_MatchCallChampion_Wallace_Intro1[] = _("I represent beauty as"); const u8 gText_MatchCallChampion_Wallace_Intro2[] = _("well as intelligence."); -const u8 *const gMatchCallFlavorTexts[REMATCH_TABLE_ENTRIES][CHECK_PAGE_ENTRY_COUNT] = +const u8 *const gMatchCallFlavorTexts[REMATCH_TABLE_ENTRIES][CHECK_PAGE_ENTRY_COUNT] = { [REMATCH_ROSE] = MCFLAVOR(AromaLady_Rose), [REMATCH_ANDRES] = MCFLAVOR(RuinManiac_Andres), diff --git a/src/data/text/nature_names.h b/src/data/text/nature_names.h index 6018984459..d15243b091 100644 --- a/src/data/text/nature_names.h +++ b/src/data/text/nature_names.h @@ -24,7 +24,7 @@ static const u8 sSassyNatureName[] = _("SASSY"); static const u8 sCarefulNatureName[] = _("CAREFUL"); static const u8 sQuirkyNatureName[] = _("QUIRKY"); -const u8 *const gNatureNamePointers[NUM_NATURES] = +const u8 *const gNatureNamePointers[NUM_NATURES] = { [NATURE_HARDY] = sHardyNatureName, [NATURE_LONELY] = sLonelyNatureName, diff --git a/src/data/text/ribbon_descriptions.h b/src/data/text/ribbon_descriptions.h index 5db52dcedf..4de90d2e46 100644 --- a/src/data/text/ribbon_descriptions.h +++ b/src/data/text/ribbon_descriptions.h @@ -18,7 +18,7 @@ const u8 gRibbonDescriptionPart2_Artist[] = _("as a super sketch model."); const u8 gRibbonDescriptionPart1_Effort[] = _("RIBBON awarded for"); const u8 gRibbonDescriptionPart2_Effort[] = _("being a hard worker."); -const u8 *const gRibbonDescriptionPointers[][2] = +const u8 *const gRibbonDescriptionPointers[][2] = { [CHAMPION_RIBBON] = {gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion}, [COOL_RIBBON_NORMAL] = {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank}, diff --git a/src/data/trade.h b/src/data/trade.h index 752971c112..7088633a80 100644 --- a/src/data/trade.h +++ b/src/data/trade.h @@ -1,4 +1,4 @@ -#define GFXTAG_MENU_TEXT 200 // Used as a base tag in CB2_CreateTradeMenu and CB2_ReturnToTradeMenu +#define GFXTAG_MENU_TEXT 200 // Used as a base tag in CB2_CreateTradeMenu and CB2_ReturnToTradeMenu #define GFXTAG_CURSOR 300 #define GFXTAG_LINK_MON_GLOW 5550 #define GFXTAG_LINK_MON_SHADOW 5552 @@ -395,7 +395,7 @@ static const struct MenuAction sSelectTradeMonActions[] = {sText_Trade2, Task_DrawSelectionTrade} }; -static const u8 *const sTradeMessages[] = +static const u8 *const sTradeMessages[] = { [TRADE_MSG_STANDBY] = sText_CommunicationStandby, [TRADE_MSG_CANCELED] = sText_TheTradeHasBeenCanceled, @@ -408,8 +408,8 @@ static const u8 *const sTradeMessages[] = [TRADE_MSG_FRIENDS_MON_CANT_BE_TRADED] = gText_OtherTrainersPkmnCantBeTraded }; -static const u8 sTradeTextColors[] = -{ +static const u8 sTradeTextColors[] = +{ TEXT_COLOR_TRANSPARENT, //bg color TEXT_COLOR_WHITE, //fg color TEXT_COLOR_DARK_GRAY //shadow color @@ -1003,67 +1003,67 @@ static const union AffineAnimCmd *const sAffineAnims_CrossingMonPics[] = static const struct InGameTrade sIngameTrades[] = { - [INGAME_TRADE_SEEDOT] = + [INGAME_TRADE_SEEDOT] = { - .nickname = _("DOTS"), + .nickname = _("DOTS"), .species = SPECIES_SEEDOT, .ivs = {5, 4, 5, 4, 4, 4}, - .abilityNum = 1, + .abilityNum = 1, .otId = 38726, .conditions = {30, 5, 5, 5, 5}, .personality = 0x84, - .heldItem = ITEM_CHESTO_BERRY, + .heldItem = ITEM_CHESTO_BERRY, .mailNum = -1, - .otName = _("KOBE"), - .otGender = MALE, + .otName = _("KOBE"), + .otGender = MALE, .sheen = 10, .requestedSpecies = SPECIES_RALTS - }, - [INGAME_TRADE_PLUSLE] = + }, + [INGAME_TRADE_PLUSLE] = { - .nickname = _("PLUSES"), + .nickname = _("PLUSES"), .species = SPECIES_PLUSLE, .ivs = {4, 4, 4, 5, 5, 4}, - .abilityNum = 0, + .abilityNum = 0, .otId = 73996, .conditions = {5, 5, 30, 5, 5}, .personality = 0x6F, - .heldItem = ITEM_WOOD_MAIL, + .heldItem = ITEM_WOOD_MAIL, .mailNum = 0, - .otName = _("ROMAN"), - .otGender = MALE, + .otName = _("ROMAN"), + .otGender = MALE, .sheen = 10, .requestedSpecies = SPECIES_VOLBEAT - }, - [INGAME_TRADE_HORSEA] = + }, + [INGAME_TRADE_HORSEA] = { .nickname = _("SEASOR"), .species = SPECIES_HORSEA, .ivs = {5, 4, 4, 4, 5, 4}, - .abilityNum = 0, + .abilityNum = 0, .otId = 46285, .conditions = {5, 5, 5, 5, 30}, .personality = 0x7F, - .heldItem = ITEM_WAVE_MAIL, + .heldItem = ITEM_WAVE_MAIL, .mailNum = 1, - .otName = _("SKYLAR"), - .otGender = MALE, + .otName = _("SKYLAR"), + .otGender = MALE, .sheen = 10, .requestedSpecies = SPECIES_BAGON - }, - [INGAME_TRADE_MEOWTH] = + }, + [INGAME_TRADE_MEOWTH] = { .nickname = _("MEOWOW"), .species = SPECIES_MEOWTH, .ivs = {4, 5, 4, 5, 4, 4}, - .abilityNum = 0, + .abilityNum = 0, .otId = 91481, .conditions = {5, 5, 5, 30, 5}, .personality = 0x8B, - .heldItem = ITEM_RETRO_MAIL, + .heldItem = ITEM_RETRO_MAIL, .mailNum = 2, - .otName = _("ISIS"), - .otGender = FEMALE, + .otName = _("ISIS"), + .otGender = FEMALE, .sheen = 10, .requestedSpecies = SPECIES_SKITTY } diff --git a/src/data/union_room.h b/src/data/union_room.h index be7bfae71e..902853ddbc 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -54,14 +54,14 @@ static const u8 *const sPlayersNeededOrModeTexts[][5] = { { sText_1PlayerNeeded, sText_2PlayerMode - }, + }, // 4 players required { sText_3PlayersNeeded, sText_2PlayersNeeded, sText_1PlayerNeeded, sText_4PlayerMode - }, + }, // 2-5 players required { sText_1PlayerNeeded, @@ -69,7 +69,7 @@ static const u8 *const sPlayersNeededOrModeTexts[][5] = { sText_3PlayerMode, sText_4PlayerMode, sText_5PlayerMode - }, + }, // 3-5 players required { sText_2PlayersNeeded, @@ -77,7 +77,7 @@ static const u8 *const sPlayersNeededOrModeTexts[][5] = { sText_3PlayerMode, sText_4PlayerMode, sText_5PlayerMode - }, + }, // 2-4 players required { sText_1PlayerNeeded, @@ -368,7 +368,7 @@ const u8 *const sBattleReactionTexts[GENDER_COUNT][4] = { sText_UsedGoodMoveMale, sText_BattleSurpriseMale, sText_SwitchedMonsMale - }, + }, { sText_YoureToughFemale, sText_UsedGoodMoveFemale, @@ -392,7 +392,7 @@ const u8 *const sChatReactionTexts[GENDER_COUNT][4] = { sText_ThatsFunnyMale, sText_RandomChatMale1, sText_RandomChatMale2 - }, + }, { sText_LearnedSomethingFemale, sText_ThatsFunnyFemale, @@ -410,7 +410,7 @@ const u8 *const sTrainerCardReactionTexts[GENDER_COUNT][2] = { { sText_ShowedTrainerCardMale1, sText_ShowedTrainerCardMale2 - }, + }, { sText_ShowedTrainerCardFemale1, sText_ShowedTrainerCardFemale2 @@ -426,7 +426,7 @@ const u8 *const sTradeReactionTexts[GENDER_COUNT][4] = { { sText_MaleTraded1, sText_MaleTraded2 - }, + }, { sText_FemaleTraded1, sText_FemaleTraded2 @@ -485,7 +485,7 @@ ALIGNED(4) const u8 sText_ChooseLeaderToughContest[] = _("TOUGHNESS CONTEST!\nPl ALIGNED(4) const u8 sText_ChooseLeaderBattleTowerLv50[] = _("BATTLE TOWER LEVEL 50!\nPlease choose the LEADER."); ALIGNED(4) const u8 sText_ChooseLeaderBattleTowerOpenLv[] = _("BATTLE TOWER OPEN LEVEL!\nPlease choose the LEADER."); -static const u8 *const sChooseTrainerTexts[NUM_LINK_GROUP_TYPES] = +static const u8 *const sChooseTrainerTexts[NUM_LINK_GROUP_TYPES] = { [LINK_GROUP_SINGLE_BATTLE] = sText_ChooseTrainerSingleBattle, [LINK_GROUP_DOUBLE_BATTLE] = sText_ChooseTrainerDoubleBattle, @@ -1016,29 +1016,29 @@ ALIGNED(4) const u8 sAcceptedActivityIds_BerryPicking[] = {ACTIVITY_BERRY_PIC ALIGNED(4) const u8 sAcceptedActivityIds_WonderCard[] = {ACTIVITY_WONDER_CARD2, 0xff}; ALIGNED(4) const u8 sAcceptedActivityIds_WonderNews[] = {ACTIVITY_WONDER_NEWS2, 0xff}; ALIGNED(4) const u8 sAcceptedActivityIds_Resume[] = { - IN_UNION_ROOM | ACTIVITY_NONE, - IN_UNION_ROOM | ACTIVITY_BATTLE_SINGLE, - IN_UNION_ROOM | ACTIVITY_TRADE, - IN_UNION_ROOM | ACTIVITY_CHAT, - IN_UNION_ROOM | ACTIVITY_CARD, - IN_UNION_ROOM | ACTIVITY_ACCEPT, - IN_UNION_ROOM | ACTIVITY_DECLINE, - IN_UNION_ROOM | ACTIVITY_NPCTALK, - IN_UNION_ROOM | ACTIVITY_PLYRTALK, + IN_UNION_ROOM | ACTIVITY_NONE, + IN_UNION_ROOM | ACTIVITY_BATTLE_SINGLE, + IN_UNION_ROOM | ACTIVITY_TRADE, + IN_UNION_ROOM | ACTIVITY_CHAT, + IN_UNION_ROOM | ACTIVITY_CARD, + IN_UNION_ROOM | ACTIVITY_ACCEPT, + IN_UNION_ROOM | ACTIVITY_DECLINE, + IN_UNION_ROOM | ACTIVITY_NPCTALK, + IN_UNION_ROOM | ACTIVITY_PLYRTALK, 0xff }; ALIGNED(4) const u8 sAcceptedActivityIds_Init[] = {ACTIVITY_SEARCH, 0xff}; ALIGNED(4) const u8 sAcceptedActivityIds_Unk11[] = { - ACTIVITY_BATTLE_SINGLE, - ACTIVITY_BATTLE_DOUBLE, - ACTIVITY_BATTLE_MULTI, - ACTIVITY_TRADE, - ACTIVITY_POKEMON_JUMP, - ACTIVITY_BERRY_CRUSH, - ACTIVITY_BERRY_PICK, - ACTIVITY_WONDER_CARD2, - ACTIVITY_WONDER_NEWS2, - ACTIVITY_SPIN_TRADE, + ACTIVITY_BATTLE_SINGLE, + ACTIVITY_BATTLE_DOUBLE, + ACTIVITY_BATTLE_MULTI, + ACTIVITY_TRADE, + ACTIVITY_POKEMON_JUMP, + ACTIVITY_BERRY_CRUSH, + ACTIVITY_BERRY_PICK, + ACTIVITY_WONDER_CARD2, + ACTIVITY_WONDER_NEWS2, + ACTIVITY_SPIN_TRADE, 0xff }; ALIGNED(4) const u8 sAcceptedActivityIds_RecordCorner[] = {ACTIVITY_RECORD_CORNER, 0xff}; @@ -1076,28 +1076,28 @@ const u8 *const sAcceptedActivityIds[NUM_LINK_GROUP_TYPES] = { [LINK_GROUP_BATTLE_TOWER_OPEN] = sAcceptedActivityIds_BattleTowerOpen }; -static const u8 sLinkGroupToURoomActivity[NUM_LINK_GROUP_TYPES + 2] = +static const u8 sLinkGroupToURoomActivity[NUM_LINK_GROUP_TYPES + 2] = { - [LINK_GROUP_SINGLE_BATTLE] = ACTIVITY_BATTLE_SINGLE, - [LINK_GROUP_DOUBLE_BATTLE] = ACTIVITY_BATTLE_DOUBLE, - [LINK_GROUP_MULTI_BATTLE] = ACTIVITY_BATTLE_MULTI, - [LINK_GROUP_TRADE] = ACTIVITY_TRADE, - [LINK_GROUP_POKEMON_JUMP] = ACTIVITY_POKEMON_JUMP, - [LINK_GROUP_BERRY_CRUSH] = ACTIVITY_BERRY_CRUSH, - [LINK_GROUP_BERRY_PICKING] = ACTIVITY_BERRY_PICK, + [LINK_GROUP_SINGLE_BATTLE] = ACTIVITY_BATTLE_SINGLE, + [LINK_GROUP_DOUBLE_BATTLE] = ACTIVITY_BATTLE_DOUBLE, + [LINK_GROUP_MULTI_BATTLE] = ACTIVITY_BATTLE_MULTI, + [LINK_GROUP_TRADE] = ACTIVITY_TRADE, + [LINK_GROUP_POKEMON_JUMP] = ACTIVITY_POKEMON_JUMP, + [LINK_GROUP_BERRY_CRUSH] = ACTIVITY_BERRY_CRUSH, + [LINK_GROUP_BERRY_PICKING] = ACTIVITY_BERRY_PICK, [LINK_GROUP_WONDER_CARD] = ACTIVITY_WONDER_CARD2, - [LINK_GROUP_WONDER_NEWS] = ACTIVITY_WONDER_NEWS2, - [LINK_GROUP_UNION_ROOM_RESUME] = ACTIVITY_NONE, - [LINK_GROUP_UNION_ROOM_INIT] = ACTIVITY_NONE, - [LINK_GROUP_UNK_11] = ACTIVITY_NONE, - [LINK_GROUP_RECORD_CORNER] = ACTIVITY_RECORD_CORNER, - [LINK_GROUP_BERRY_BLENDER] = ACTIVITY_BERRY_BLENDER, - [LINK_GROUP_UNK_14] = ACTIVITY_NONE, + [LINK_GROUP_WONDER_NEWS] = ACTIVITY_WONDER_NEWS2, + [LINK_GROUP_UNION_ROOM_RESUME] = ACTIVITY_NONE, + [LINK_GROUP_UNION_ROOM_INIT] = ACTIVITY_NONE, + [LINK_GROUP_UNK_11] = ACTIVITY_NONE, + [LINK_GROUP_RECORD_CORNER] = ACTIVITY_RECORD_CORNER, + [LINK_GROUP_BERRY_BLENDER] = ACTIVITY_BERRY_BLENDER, + [LINK_GROUP_UNK_14] = ACTIVITY_NONE, [LINK_GROUP_COOL_CONTEST] = ACTIVITY_CONTEST_COOL, - [LINK_GROUP_BEAUTY_CONTEST] = ACTIVITY_CONTEST_BEAUTY, - [LINK_GROUP_CUTE_CONTEST] = ACTIVITY_CONTEST_CUTE, - [LINK_GROUP_SMART_CONTEST] = ACTIVITY_CONTEST_SMART, - [LINK_GROUP_TOUGH_CONTEST] = ACTIVITY_CONTEST_TOUGH, - [LINK_GROUP_BATTLE_TOWER] = ACTIVITY_BATTLE_TOWER, + [LINK_GROUP_BEAUTY_CONTEST] = ACTIVITY_CONTEST_BEAUTY, + [LINK_GROUP_CUTE_CONTEST] = ACTIVITY_CONTEST_CUTE, + [LINK_GROUP_SMART_CONTEST] = ACTIVITY_CONTEST_SMART, + [LINK_GROUP_TOUGH_CONTEST] = ACTIVITY_CONTEST_TOUGH, + [LINK_GROUP_BATTLE_TOWER] = ACTIVITY_BATTLE_TOWER, [LINK_GROUP_BATTLE_TOWER_OPEN] = ACTIVITY_BATTLE_TOWER_OPEN }; diff --git a/src/daycare.c b/src/daycare.c index 6a17150490..8dd7515319 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -920,7 +920,7 @@ static bool8 TryProduceOrHatchEgg(struct DayCare *daycare) SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &eggCycles); } - else + else { gSpecialVar_0x8004 = i; return TRUE; diff --git a/src/dewford_trend.c b/src/dewford_trend.c index 09a8d2afe9..d193ef1f5b 100644 --- a/src/dewford_trend.c +++ b/src/dewford_trend.c @@ -24,29 +24,29 @@ Information about a Dewford trend is stored in a struct DewfordTrend. In addition to the two easy chat words that make up the trend's phrase, each trend has a few randomly generated values associated with it. - - rand: + - rand: This is a 16 bit value generated once when the phrase is created. It's used in calculations for Feebas tiles, Slot Machines, and Match Call. - - trendiness / maxTrendiness: + - trendiness / maxTrendiness: Initialized as a random value between 30-127 inclusive. This is used to compare how trendy one phrase is vs another. If a submitted phrase is less trendy than the current one it won't be accepted. If the trend is - "boring" (see below) it will lose trendiness over time until it reaches 0, + "boring" (see below) it will lose trendiness over time until it reaches 0, at which point it will stop being boring and gain trendiness until it reaches maxTrendiness (then it becomes boring again and the cycle repeats). - - gainingTrendiness: + - gainingTrendiness: This is a flag that determines whether a phrase should be gaining or losing trendiness. An NPC in Dewford Hall will comment on whether the current phrase is "boring" or not, and if it is gaining trendiness (or if it is still trendier - than the last phrase) it is not boring. This field will always be TRUE for any + than the last phrase) it is not boring. This field will always be TRUE for any new phrase submitted after the 1st submission. ## Saving trends ## - Each time a potential trendy phrase is submitted, it is saved in gSaveBlock1Ptr->dewfordTrends[]. - Up to SAVED_TRENDS_COUNT (5) trends may be saved at one time. The trends in this array are kept - in sorted order from most trendy to least trendy. The current trendy phrase is always at - gSaveBlock1Ptr->dewfordTrends[0]. If the player mixes records with another player, their own - trends are replaced with their mixing partner's, unless the phrase is the same, in which case + Each time a potential trendy phrase is submitted, it is saved in gSaveBlock1Ptr->dewfordTrends[]. + Up to SAVED_TRENDS_COUNT (5) trends may be saved at one time. The trends in this array are kept + in sorted order from most trendy to least trendy. The current trendy phrase is always at + gSaveBlock1Ptr->dewfordTrends[0]. If the player mixes records with another player, their own + trends are replaced with their mixing partner's, unless the phrase is the same, in which case the version with a higher trendiness value is used (see ReceiveDewfordTrendData). ## TV Show ## @@ -247,7 +247,7 @@ void ReceiveDewfordTrendData(struct DewfordTrend *linkedTrends, size_t size, u8 players = GetLinkPlayerCount(); for (i = 0; i < players; i++) memcpy(&linkedTrendsBuffer[i * SAVED_TRENDS_COUNT], (u8 *)linkedTrends + i * size, SAVED_TRENDS_SIZE); - + // Determine which of the received trends should be saved. // savedTrendsBuffer starts empty, and when finished will contain // which of the linked trends to save in the saveblock. @@ -279,7 +279,7 @@ void ReceiveDewfordTrendData(struct DewfordTrend *linkedTrends, size_t size, u8 } } SortTrends(savedTrendsBuffer, numTrends, SORT_MODE_FULL); - + // Overwrite current saved trends with new saved trends src = savedTrendsBuffer; dst = gSaveBlock1Ptr->dewfordTrends; @@ -301,7 +301,7 @@ void BufferTrendyPhraseString(void) void IsTrendyPhraseBoring(void) { bool16 result = FALSE; - + do { if (gSaveBlock1Ptr->dewfordTrends[0].trendiness - gSaveBlock1Ptr->dewfordTrends[1].trendiness > 1) @@ -312,7 +312,7 @@ void IsTrendyPhraseBoring(void) break; result = TRUE; } while (0); - + gSpecialVar_Result = result; } diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 7a642968bb..c69ef92676 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -139,7 +139,7 @@ enum { #define NUM_STATUS_SQUARES 10 -// Berries fall in predefined columns. +// Berries fall in predefined columns. // A total of 10 are available, though fewer will be used with < 5 players // The 11th column is a repeat of the 1st column wrapped around, so only // the values 0-9 are unique 'valid' columns @@ -342,20 +342,20 @@ static void HandleWaitPlayAgainInput(void); static void ResetPickState(void); static u32 GetHighestScore(void); static void SendPacket_ReadyToStart(bool32); -static void SendPacket_GameState(struct DodrioGame_Player *, - struct DodrioGame_PlayerCommData *, - struct DodrioGame_PlayerCommData *, - struct DodrioGame_PlayerCommData *, - struct DodrioGame_PlayerCommData *, - struct DodrioGame_PlayerCommData *, +static void SendPacket_GameState(struct DodrioGame_Player *, + struct DodrioGame_PlayerCommData *, + struct DodrioGame_PlayerCommData *, + struct DodrioGame_PlayerCommData *, + struct DodrioGame_PlayerCommData *, + struct DodrioGame_PlayerCommData *, u8 , bool32 , bool32 ); -static bool32 RecvPacket_GameState(u32, - struct DodrioGame_Player *, - struct DodrioGame_PlayerCommData *, - struct DodrioGame_PlayerCommData *, - struct DodrioGame_PlayerCommData *, - struct DodrioGame_PlayerCommData *, - struct DodrioGame_PlayerCommData *, +static bool32 RecvPacket_GameState(u32, + struct DodrioGame_Player *, + struct DodrioGame_PlayerCommData *, + struct DodrioGame_PlayerCommData *, + struct DodrioGame_PlayerCommData *, + struct DodrioGame_PlayerCommData *, + struct DodrioGame_PlayerCommData *, u8 *, bool32 *, bool32 *); static void SendPacket_PickState(u8); static bool32 RecvPacket_PickState(u32, u8 *); @@ -422,11 +422,11 @@ static void StopGfxFuncs(void); static void GfxIdle(void); // For each player, the array is a list of all the columns starting with the column to their left -// Only the range of active columns is read from the array (dependent on the number of players), +// Only the range of active columns is read from the array (dependent on the number of players), // so the arrays are spaced such that the numbers in the center are where the data that's read starts and end. static const u8 sActiveColumnMap[MAX_RFU_PLAYERS][MAX_RFU_PLAYERS][NUM_BERRY_COLUMNS] = { - { // 1 player (never used), columns 4-6. + { // 1 player (never used), columns 4-6. // Sometimes read to get default order regardless of the current number of players {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, }, @@ -526,7 +526,7 @@ static const u8 sPlayerIdAtColumn[MAX_RFU_PLAYERS][NUM_BERRY_COLUMNS] = { {__, __, __, __, 1, 1, 1, __, __, __, __}, // 1 player {__, __, __, 0, 0, 1, 1, 0, __, __, __}, // 2 players - {__, __, 2, 2, 0, 0, 1, 1, 1, __, __}, // 3 players + {__, __, 2, 2, 0, 0, 1, 1, 1, __, __}, // 3 players {__, 3, 3, 0, 0, 1, 1, 2, 2, 3, __}, // 4 players { 3, 3, 4, 4, 0, 0, 1, 1, 2, 2, 3}, // 5 players }; @@ -592,15 +592,15 @@ ALIGNED(4) static const u8 sPrizeBerryIds[][10] = { { // Possible prizes with 3 players - ITEM_TO_BERRY(ITEM_RAZZ_BERRY) - 1, - ITEM_TO_BERRY(ITEM_BLUK_BERRY) - 1, - ITEM_TO_BERRY(ITEM_NANAB_BERRY) - 1, - ITEM_TO_BERRY(ITEM_WEPEAR_BERRY) - 1, - ITEM_TO_BERRY(ITEM_PINAP_BERRY) - 1, - ITEM_TO_BERRY(ITEM_PINAP_BERRY) - 1, - ITEM_TO_BERRY(ITEM_WEPEAR_BERRY) - 1, - ITEM_TO_BERRY(ITEM_NANAB_BERRY) - 1, - ITEM_TO_BERRY(ITEM_BLUK_BERRY) - 1, + ITEM_TO_BERRY(ITEM_RAZZ_BERRY) - 1, + ITEM_TO_BERRY(ITEM_BLUK_BERRY) - 1, + ITEM_TO_BERRY(ITEM_NANAB_BERRY) - 1, + ITEM_TO_BERRY(ITEM_WEPEAR_BERRY) - 1, + ITEM_TO_BERRY(ITEM_PINAP_BERRY) - 1, + ITEM_TO_BERRY(ITEM_PINAP_BERRY) - 1, + ITEM_TO_BERRY(ITEM_WEPEAR_BERRY) - 1, + ITEM_TO_BERRY(ITEM_NANAB_BERRY) - 1, + ITEM_TO_BERRY(ITEM_BLUK_BERRY) - 1, ITEM_TO_BERRY(ITEM_RAZZ_BERRY) - 1 }, { // Possible prizes with 4 players @@ -864,7 +864,7 @@ static void InitCountdown(void) default: sGame->startCountdown = TRUE; SetGameFunc(FUNC_COUNTDOWN); - break; + break; } } @@ -912,7 +912,7 @@ static void WaitGameStart(void) case 0: if (sGame->startGame) SetGameFunc(FUNC_PLAY_GAME); - break; + break; } } @@ -1468,15 +1468,15 @@ static void RecvLinkData_Gameplay(void) u8 i; u8 numPlayers = sGame->numPlayers; - sGame->players[0].receivedGameStatePacket = RecvPacket_GameState(0, - &sGame->players[0], - &sGame->players[0].comm, - &sGame->players[1].comm, - &sGame->players[2].comm, - &sGame->players[3].comm, - &sGame->players[4].comm, - &sGame->numGraySquares, - &sGame->berriesFalling, + sGame->players[0].receivedGameStatePacket = RecvPacket_GameState(0, + &sGame->players[0], + &sGame->players[0].comm, + &sGame->players[1].comm, + &sGame->players[2].comm, + &sGame->players[3].comm, + &sGame->players[4].comm, + &sGame->numGraySquares, + &sGame->berriesFalling, &sGame->allReadyToEnd); sGame->clearRecvCmds = TRUE; @@ -1545,15 +1545,15 @@ static void RecvLinkData_ReadyToEnd(void) u8 i; u8 numPlayers = sGame->numPlayers; - sGame->players[0].receivedGameStatePacket = RecvPacket_GameState(0, - &sGame->players[0], - &sGame->players[0].comm, - &sGame->players[1].comm, - &sGame->players[2].comm, - &sGame->players[3].comm, - &sGame->players[4].comm, - &sGame->numGraySquares, - &sGame->berriesFalling, + sGame->players[0].receivedGameStatePacket = RecvPacket_GameState(0, + &sGame->players[0], + &sGame->players[0].comm, + &sGame->players[1].comm, + &sGame->players[2].comm, + &sGame->players[3].comm, + &sGame->players[4].comm, + &sGame->numGraySquares, + &sGame->berriesFalling, &sGame->allReadyToEnd); sGame->clearRecvCmds = TRUE; @@ -1605,25 +1605,25 @@ static void SendLinkData_Leader(void) switch (sGame->funcId) { case FUNC_PLAY_GAME: - SendPacket_GameState(&sGame->player, - &sGame->players[0].comm, - &sGame->players[1].comm, - &sGame->players[2].comm, - &sGame->players[3].comm, - &sGame->players[4].comm, - sGame->numGraySquares, - sGame->berriesFalling, + SendPacket_GameState(&sGame->player, + &sGame->players[0].comm, + &sGame->players[1].comm, + &sGame->players[2].comm, + &sGame->players[3].comm, + &sGame->players[4].comm, + sGame->numGraySquares, + sGame->berriesFalling, sGame->allReadyToEnd); break; case FUNC_WAIT_END_GAME: - SendPacket_GameState(&sGame->player, - &sGame->players[0].comm, - &sGame->players[1].comm, - &sGame->players[2].comm, - &sGame->players[3].comm, - &sGame->players[4].comm, - sGame->numGraySquares, - sGame->berriesFalling, + SendPacket_GameState(&sGame->player, + &sGame->players[0].comm, + &sGame->players[1].comm, + &sGame->players[2].comm, + &sGame->players[3].comm, + &sGame->players[4].comm, + sGame->numGraySquares, + sGame->berriesFalling, sGame->allReadyToEnd); break; } @@ -1634,27 +1634,27 @@ static void RecvLinkData_Member(void) switch (sGame->funcId) { case FUNC_PLAY_GAME: - RecvPacket_GameState(sGame->multiplayerId, - &sGame->players[sGame->multiplayerId], - &sGame->players[0].comm, - &sGame->players[1].comm, - &sGame->players[2].comm, - &sGame->players[3].comm, - &sGame->players[4].comm, - &sGame->numGraySquares, - &sGame->berriesFalling, + RecvPacket_GameState(sGame->multiplayerId, + &sGame->players[sGame->multiplayerId], + &sGame->players[0].comm, + &sGame->players[1].comm, + &sGame->players[2].comm, + &sGame->players[3].comm, + &sGame->players[4].comm, + &sGame->numGraySquares, + &sGame->berriesFalling, &sGame->allReadyToEnd); break; case FUNC_WAIT_END_GAME: - RecvPacket_GameState(sGame->multiplayerId, - &sGame->players[sGame->multiplayerId], - &sGame->players[0].comm, - &sGame->players[1].comm, - &sGame->players[2].comm, - &sGame->players[3].comm, - &sGame->players[4].comm, - &sGame->numGraySquares, - &sGame->berriesFalling, + RecvPacket_GameState(sGame->multiplayerId, + &sGame->players[sGame->multiplayerId], + &sGame->players[0].comm, + &sGame->players[1].comm, + &sGame->players[2].comm, + &sGame->players[3].comm, + &sGame->players[4].comm, + &sGame->numGraySquares, + &sGame->berriesFalling, &sGame->allReadyToEnd); break; } @@ -1728,7 +1728,7 @@ static void HandleSound_Member(void) u8 i; if (sGame->players[sGame->multiplayerId].comm.pickState == PICK_NONE) { - if (sGame->players[sGame->multiplayerId].comm.ateBerry != TRUE + if (sGame->players[sGame->multiplayerId].comm.ateBerry != TRUE && sGame->players[sGame->multiplayerId].comm.missedBerry != TRUE) sGame->playingPickSound = 0; } @@ -1885,7 +1885,7 @@ static void HandlePickBerries(void) column = sActiveColumnMap[0][0][j]; // Attempt has already been checked - if (sGame->playersAttemptingPick[column][0] == i + if (sGame->playersAttemptingPick[column][0] == i || sGame->playersAttemptingPick[column][1] == i) break; @@ -1929,14 +1929,14 @@ static void HandlePickBerries(void) if (++sGame->eatTimer[column] >= 6) { sGame->eatTimer[column] = 0; - - if (sGame->playersAttemptingPick[column][0] == PLAYER_NONE + + if (sGame->playersAttemptingPick[column][0] == PLAYER_NONE && sGame->playersAttemptingPick[column][1] == PLAYER_NONE) { // No players attempting to pick this berry continue; } - else if (sGame->playersAttemptingPick[column][0] != PLAYER_NONE + else if (sGame->playersAttemptingPick[column][0] != PLAYER_NONE && sGame->playersAttemptingPick[column][1] == PLAYER_NONE) { // One player attempting to pick this berry @@ -2003,7 +2003,7 @@ static bool32 TryPickBerry(u8 playerId, u8 pickState, u8 column) pick = 2; break; } - + // Check if berry is within range to be picked if (berries->fallDist[column] == EAT_FALL_DIST - 1 || berries->fallDist[column] == EAT_FALL_DIST) { @@ -2054,7 +2054,7 @@ static void UpdateFallingBerries(void) if (sGame->berryState[i] == BERRYSTATE_NONE || sGame->berryState[i] == BERRYSTATE_PICKED) { sGame->berriesFalling = TRUE; - + if (game->player.berries.fallDist[i] >= MAX_FALL_DIST) { // Berry hit the ground @@ -2591,9 +2591,9 @@ static void ResetForPlayAgainPrompt(void) } static const s16 sBerryScoreMultipliers[] = { - [BERRY_BLUE] = 10, - [BERRY_GREEN] = 30, - [BERRY_GOLD] = 50, + [BERRY_BLUE] = 10, + [BERRY_GREEN] = 30, + [BERRY_GOLD] = 50, [BERRY_MISSED] = 50 // Subtracted }; @@ -2788,7 +2788,7 @@ static u32 SetScoreResults(void) u8 numPlayers = sGame->numPlayers; GetHighestScore(); // Useless call - + if (GetHighestScore() == 0) { // No one scored any points, put everyone in last place with a score of 0. @@ -2810,7 +2810,7 @@ static u32 SetScoreResults(void) { u32 score = GetScoreByRanking(ranking); u8 curRanking = nextRanking; - + // Find all players with the score for this ranking. // Increment nextRanking but not curRanking to allow // for ties @@ -3028,19 +3028,19 @@ static const u16 sDebug_BerryResults[MAX_RFU_PLAYERS][4] = [BERRY_GREEN] = 0, [BERRY_GOLD] = 90, [BERRY_MISSED] = MAX_BERRIES - }, + }, { [BERRY_BLUE] = MAX_BERRIES, [BERRY_GREEN] = MAX_BERRIES, [BERRY_GOLD] = 70, [BERRY_MISSED] = MAX_BERRIES - }, + }, { [BERRY_BLUE] = MAX_BERRIES, [BERRY_GREEN] = 0, [BERRY_GOLD] = MAX_BERRIES, [BERRY_MISSED] = 0 - }, + }, { [BERRY_BLUE] = MAX_BERRIES, [BERRY_GREEN] = MAX_BERRIES, @@ -3048,7 +3048,7 @@ static const u16 sDebug_BerryResults[MAX_RFU_PLAYERS][4] = [BERRY_MISSED] = 0 }, { - [BERRY_BLUE] = MAX_BERRIES, + [BERRY_BLUE] = MAX_BERRIES, [BERRY_GREEN] = MAX_BERRIES, [BERRY_GOLD] = MAX_BERRIES, [BERRY_MISSED] = 0 @@ -3159,14 +3159,14 @@ struct GameStatePacket bool8 missedBerry_Player5:1; }; -static void SendPacket_GameState(struct DodrioGame_Player *player, - struct DodrioGame_PlayerCommData *player1, - struct DodrioGame_PlayerCommData *player2, - struct DodrioGame_PlayerCommData *player3, - struct DodrioGame_PlayerCommData *player4, - struct DodrioGame_PlayerCommData *player5, - u8 numGraySquares, - bool32 berriesFalling, +static void SendPacket_GameState(struct DodrioGame_Player *player, + struct DodrioGame_PlayerCommData *player1, + struct DodrioGame_PlayerCommData *player2, + struct DodrioGame_PlayerCommData *player3, + struct DodrioGame_PlayerCommData *player4, + struct DodrioGame_PlayerCommData *player5, + u8 numGraySquares, + bool32 berriesFalling, bool32 allReadyToEnd) { struct GameStatePacket packet; @@ -3219,15 +3219,15 @@ static void SendPacket_GameState(struct DodrioGame_Player *player, Rfu_SendPacket(&packet); } -static bool32 RecvPacket_GameState(u32 playerId, - struct DodrioGame_Player *player, - struct DodrioGame_PlayerCommData *player1, - struct DodrioGame_PlayerCommData *player2, - struct DodrioGame_PlayerCommData *player3, - struct DodrioGame_PlayerCommData *player4, - struct DodrioGame_PlayerCommData *player5, - u8 *numGraySquares, - bool32 *berriesFalling, +static bool32 RecvPacket_GameState(u32 playerId, + struct DodrioGame_Player *player, + struct DodrioGame_PlayerCommData *player1, + struct DodrioGame_PlayerCommData *player2, + struct DodrioGame_PlayerCommData *player3, + struct DodrioGame_PlayerCommData *player4, + struct DodrioGame_PlayerCommData *player5, + u8 *numGraySquares, + bool32 *berriesFalling, bool32 *allReadyToEnd) { struct GameStatePacket *packet; @@ -3503,7 +3503,7 @@ static const u8 sActiveColumnMap_Duplicate[MAX_RFU_PLAYERS][MAX_RFU_PLAYERS][NUM {6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}, {8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8}, }, -}; +}; // Unused duplicate of sDodrioHeadToColumnMap static const u8 sDodrioHeadToColumnMap_Duplicate[MAX_RFU_PLAYERS][MAX_RFU_PLAYERS][3] = @@ -4117,7 +4117,7 @@ static void UpdateStatusBarAnim(u8 numEmpty) StartSpriteAnim(&gSprites[sStatusBar->spriteIds[i]], STATUS_YELLOW); } } - + // Set remaining squares gray for (; i < NUM_STATUS_SQUARES; i++) StartSpriteAnim(&gSprites[sStatusBar->spriteIds[i]], STATUS_GRAY); @@ -4132,15 +4132,15 @@ static void SetStatusBarInvisibility(bool8 invisible) } static const u8 sUnusedSounds[] = { - SE_M_CHARM, - SE_NOTE_C, - SE_NOTE_D, - SE_NOTE_E, - SE_NOTE_F, - SE_NOTE_G, - SE_NOTE_A, - SE_NOTE_B, - SE_NOTE_C_HIGH, + SE_M_CHARM, + SE_NOTE_C, + SE_NOTE_D, + SE_NOTE_E, + SE_NOTE_F, + SE_NOTE_G, + SE_NOTE_A, + SE_NOTE_B, + SE_NOTE_C_HIGH, SE_RG_CARD_OPEN }; @@ -4286,9 +4286,9 @@ static void SpriteCB_Cloud(struct Sprite *sprite) } } -static const s16 sCloudStartCoords[NUM_CLOUDS][2] = +static const s16 sCloudStartCoords[NUM_CLOUDS][2] = { - {230, 55}, + {230, 55}, { 30, 74} }; @@ -4790,8 +4790,8 @@ static void ShowResults(void) ConvertIntToDecimalStringN(gStringVar4, berriesPicked, STR_CONV_MODE_LEFT_ALIGN, 4); width = GetStringWidth(1, gStringVar4, -1); - - // If player got the most of a berry type, highlight their number in red + + // If player got the most of a berry type, highlight their number in red if (maxBerriesPicked == berriesPicked && maxBerriesPicked != 0) AddTextPrinterParameterized3(sGfx->windowIds[1], 1, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], -1, gStringVar4); else @@ -4974,7 +4974,7 @@ static void Msg_WantToPlayAgain(void) AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_No, 8, 17, -1, NULL); AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL); CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], 3); - + // Increment state only if A or B button have been pressed. if (JOY_NEW(A_BUTTON)) { diff --git a/src/easy_chat.c b/src/easy_chat.c index ad583839d7..79300bd520 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -857,7 +857,7 @@ static const struct WindowTemplate sEasyChatYesNoWindowTemplate = { static const u8 sText_Clear17[] = _("{CLEAR 17}"); -static const u8 *const sEasyChatKeyboardAlphabet[NUM_ALPHABET_ROWS] = +static const u8 *const sEasyChatKeyboardAlphabet[NUM_ALPHABET_ROWS] = { gText_EasyChatKeyboard_ABCDEFothers, gText_EasyChatKeyboard_GHIJKL, @@ -2908,7 +2908,7 @@ static void GetQuizTitle(u8 *dst) u8 name[32]; struct SaveBlock1 *saveBlock1 = gSaveBlock1Ptr; DynamicPlaceholderTextUtil_Reset(); - + // Buffer author's name if (StringLength(saveBlock1->lilycoveLady.quiz.playerName) != 0) { @@ -4118,7 +4118,7 @@ static void BufferFrameTilemap(u16 *tilemap) // These frames fill the screen, no need to draw top/bottom edges right = sPhraseFrameDimensions[frameId].left + sPhraseFrameDimensions[frameId].width; bottom = sPhraseFrameDimensions[frameId].top + sPhraseFrameDimensions[frameId].height; - + // Draw middle section for (y = sPhraseFrameDimensions[frameId].top; y < bottom; y++) { @@ -4516,7 +4516,7 @@ static void BufferLowerWindowFrame(int left, int top, int width, int height) bottom = top + height - 1; x = left; y = top; - + // Draw top edge tilemap[y * 32 + x] = FRAME_OFFSET_GREEN + FRAME_TILE_TOP_L_CORNER; x++; @@ -4688,7 +4688,7 @@ static void UpdateRectangleCursorPos(void) s8 column; s8 row; - if (sScreenControl->rectangleCursorSpriteRight + if (sScreenControl->rectangleCursorSpriteRight && sScreenControl->rectangleCursorSpriteLeft) { GetKeyboardCursorColAndRow(&column, &row); @@ -5532,16 +5532,16 @@ void InitEasyChatPhrases(void) for (i = 0; i < ARRAY_COUNT(sDefaultProfileWords); i++) gSaveBlock1Ptr->easyChatProfile[i] = sDefaultProfileWords[i]; - + for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) gSaveBlock1Ptr->easyChatBattleStart[i] = sDefaultBattleStartWords[i]; - + for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) gSaveBlock1Ptr->easyChatBattleWon[i] = sDefaultBattleWonWords[i]; - + for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) gSaveBlock1Ptr->easyChatBattleLost[i] = sDefaultBattleLostWords[i]; - + for (i = 0; i < MAIL_COUNT; i++) { for (j = 0; j < MAIL_WORDS_COUNT; j++) @@ -5585,11 +5585,11 @@ static void SetUnlockedEasyChatGroups(void) sWordData->numUnlockedGroups = 0; if (GetNationalPokedexCount(FLAG_GET_SEEN)) sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = EC_GROUP_POKEMON; - + // These groups are unlocked automatically for (i = EC_GROUP_TRAINER; i <= EC_GROUP_ADJECTIVES; i++) sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = i; - + if (FlagGet(FLAG_SYS_GAME_CLEAR)) { sWordData->unlockedGroupIds[sWordData->numUnlockedGroups++] = EC_GROUP_EVENTS; @@ -5627,7 +5627,7 @@ static u8 *BufferEasyChatWordGroupName(u8 *dest, u8 groupId, u16 totalChars) *str = CHAR_SPACE; str++; } - + *str = EOS; return str; } @@ -5646,7 +5646,7 @@ static u8 *CopyEasyChatWordPadded(u8 *dest, u16 easyChatWord, u16 totalChars) *str = CHAR_SPACE; str++; } - + *str = EOS; return str; } diff --git a/src/ereader_helpers.c b/src/ereader_helpers.c index eef2a15d8e..9f265143cc 100755 --- a/src/ereader_helpers.c +++ b/src/ereader_helpers.c @@ -745,7 +745,7 @@ int EReaderHandleTransfer(u8 mode, size_t size, const void * data, void * recvBu } return (sSendRecvMgr.xferState << EREADER_XFER_SHIFT) - | (sSendRecvMgr.cancellationReason << EREADER_CANCEL_SHIFT) + | (sSendRecvMgr.cancellationReason << EREADER_CANCEL_SHIFT) | (sSendRecvMgr.checksumResult << EREADER_CHECKSUM_SHIFT); } diff --git a/src/ereader_screen.c b/src/ereader_screen.c index 438c4bec9d..f5edbc628a 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -240,7 +240,7 @@ static bool32 sub_81D5064(u16 *arg0, u16 arg1) *arg0 = 0; return TRUE; } - + return FALSE; } diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 36f7f0a3ef..e1b706e866 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1891,7 +1891,7 @@ const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId) { graphicsId = OBJ_EVENT_GFX_NINJA_BOY; } - + return gObjectEventGraphicsInfoPointers[graphicsId]; } @@ -7497,7 +7497,7 @@ static void ObjectEventUpdateMetatileBehaviors(struct ObjectEvent *objEvent) static void GetGroundEffectFlags_Reflection(struct ObjectEvent *objEvent, u32 *flags) { - u32 reflectionFlags[NUM_REFLECTION_TYPES - 1] = { + u32 reflectionFlags[NUM_REFLECTION_TYPES - 1] = { [REFL_TYPE_ICE - 1] = GROUND_EFFECT_FLAG_ICE_REFLECTION, [REFL_TYPE_WATER - 1] = GROUND_EFFECT_FLAG_WATER_REFLECTION }; @@ -7715,7 +7715,7 @@ static u8 ObjectEventGetNearbyReflectionType(struct ObjectEvent *objEvent) RETURN_REFLECTION_TYPE_AT(objEvent->previousCoords.x - j, objEvent->previousCoords.y + one + i) } } - + return REFL_TYPE_NONE; } diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 08f816f4fe..bd76993dc4 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -82,7 +82,7 @@ static const u8 sText_ShedinjaJapaneseName[] = _("ヌケニン"); // The below table is used by Task_UpdateBgPalette to control the speed at which the bg color updates. // The first two values are indexes into sBgAnim_PalIndexes (indirectly, via sBgAnimPal), and are // the start and end of the range of colors in sBgAnim_PalIndexes it will move through incrementally -// before starting over. It will repeat this cycle x number of times, where x = the 3rd value, +// before starting over. It will repeat this cycle x number of times, where x = the 3rd value, // delaying each increment by y, where y = the 4th value. // Once it has cycled x number of times, it will move to the next array in this table. static const u8 sBgAnim_PaletteControl[][4] = diff --git a/src/field_door.c b/src/field_door.c index 8aeb1d4914..3f2034ea6c 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -307,7 +307,7 @@ static void door_build_blockdef(u16 *a, u16 b, const u8 *c) static void DrawCurrentDoorAnimFrame(const struct DoorGraphics *gfx, u32 x, u32 y, const u8 *pal) { u16 arr[24]; - + if (gfx->size == 2) { door_build_blockdef(&arr[8], 0x3F0, pal); @@ -524,7 +524,7 @@ bool8 FieldIsDoorAnimationRunning(void) u32 GetDoorSoundEffect(u32 x, u32 y) { int sound = GetDoorSoundType(sDoorAnimGraphicsTable, x, y); - + if (sound == DOOR_SOUND_NORMAL) return SE_DOOR; else if (sound == DOOR_SOUND_SLIDING) @@ -540,7 +540,7 @@ static bool8 ShouldUseMultiCorridorDoor(void) { if (FlagGet(FLAG_ENABLE_MULTI_CORRIDOR_DOOR)) { - if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR) + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR)) { return TRUE; diff --git a/src/field_effect.c b/src/field_effect.c index 0d61b35f1d..47a3f63a04 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -407,35 +407,35 @@ static const struct SpriteFrameImage sPicTable_HofMonitorSmall[] = static const struct Subsprite sSubsprites_PokecenterMonitor[] = { { - .x = -12, - .y = -8, - .shape = SPRITE_SHAPE(16x8), + .x = -12, + .y = -8, + .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), - .tileOffset = 0, + .tileOffset = 0, .priority = 2 }, { - .x = 4, + .x = 4, .y = -8, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 2, - .priority = 2 - }, - { - .x = -12, - .y = 0, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 3, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 2, .priority = 2 }, { - .x = 4, - .y = 0, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 5, + .x = -12, + .y = 0, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 3, + .priority = 2 + }, + { + .x = 4, + .y = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 5, .priority = 2 } }; @@ -445,35 +445,35 @@ static const struct SubspriteTable sSubspriteTable_PokecenterMonitor = subsprite static const struct Subsprite sSubsprites_HofMonitorBig[] = { { - .x = -32, - .y = -8, - .shape = SPRITE_SHAPE(32x8), + .x = -32, + .y = -8, + .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .tileOffset = 0, .priority = 2 }, { - .x = 0, - .y = -8, - .shape = SPRITE_SHAPE(32x8), + .x = 0, + .y = -8, + .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 4, + .tileOffset = 4, .priority = 2 }, { - .x = -32, - .y = 0, - .shape = SPRITE_SHAPE(32x8), + .x = -32, + .y = 0, + .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .tileOffset = 8, .priority = 2 }, { - .x = 0, - .y = 0, - .shape = SPRITE_SHAPE(32x8), + .x = 0, + .y = 0, + .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 12, + .tileOffset = 12, .priority = 2 } }; @@ -937,19 +937,19 @@ void MultiplyInvertedPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b) { int curRed, curGreen, curBlue; u16 color = gPlttBufferUnfaded[i]; - + curRed = (color & RGB_RED); curGreen = (color & RGB_GREEN) >> 5; curBlue = (color & RGB_BLUE) >> 10; - + curRed += (((0x1F - curRed) * r) >> 4); curGreen += (((0x1F - curGreen) * g) >> 4); curBlue += (((0x1F - curBlue) * b) >> 4); - + color = curRed; color |= (curGreen << 5); color |= (curBlue << 10); - + gPlttBufferFaded[i] = color; } @@ -958,19 +958,19 @@ void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b) { int curRed, curGreen, curBlue; u16 color = gPlttBufferUnfaded[i]; - + curRed = (color & RGB_RED); curGreen = (color & RGB_GREEN) >> 5; curBlue = (color & RGB_BLUE) >> 10; - + curRed -= ((curRed * r) >> 4); curGreen -= ((curGreen * g) >> 4); curBlue -= ((curBlue * b) >> 4); - + color = curRed; color |= (curGreen << 5); color |= (curBlue << 10); - + gPlttBufferFaded[i] = color; } @@ -1715,7 +1715,7 @@ static bool8 EscalatorWarpIn_Init(struct Task *task) // If dest is down escalator tile, player is riding up behavior = TRUE; task->tState = 3; // jump to EscalatorWarpIn_Up_Init - } + } else // MB_UP_ESCALATOR { // If dest is up escalator tile, player is riding down @@ -2265,7 +2265,7 @@ static void EscapeRopeWarpOutEffect_Spin(struct Task *task) gFieldCallback = FieldCallback_EscapeRopeWarpIn; SetMainCallback2(CB2_LoadMap); DestroyTask(FindTaskIdByFunc(Task_EscapeRopeWarpOut)); - } + } else if (task->tSpinDelay == 0 || (--task->tSpinDelay) == 0) { ObjectEventSetHeldMovement(objectEvent, GetFaceDirectionMovementAction(spinDirections[objectEvent->facingDirection])); diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index eab7d85ef0..bcc02efe96 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -37,7 +37,7 @@ static u32 ShowDisguiseFieldEffect(u8, u8, u8); #define sReflectionObjEventId data[0] #define sReflectionObjEventLocalId data[1] -#define sReflectionVerticalOffset data[2] +#define sReflectionVerticalOffset data[2] #define sIsStillReflection data[7] void SetUpReflection(struct ObjectEvent *objectEvent, struct Sprite *sprite, bool8 stillReflection) @@ -337,8 +337,8 @@ void UpdateTallGrassFieldEffect(struct Sprite *sprite) mapGroup = sprite->sMapGroup; metatileBehavior = MapGridGetMetatileBehaviorAt(sprite->sX, sprite->sY); - if (TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId) - || !MetatileBehavior_IsTallGrass(metatileBehavior) + if (TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId) + || !MetatileBehavior_IsTallGrass(metatileBehavior) || (sprite->sObjectMoved && sprite->animEnded)) { FieldEffectStop(sprite, FLDEFF_TALL_GRASS); @@ -347,8 +347,8 @@ void UpdateTallGrassFieldEffect(struct Sprite *sprite) { // Check if the object that triggered the effect has moved away objectEvent = &gObjectEvents[objectEventId]; - if ((objectEvent->currentCoords.x != sprite->sX - || objectEvent->currentCoords.y != sprite->sY) + if ((objectEvent->currentCoords.x != sprite->sX + || objectEvent->currentCoords.y != sprite->sY) && (objectEvent->previousCoords.x != sprite->sX || objectEvent->previousCoords.y != sprite->sY)) sprite->sObjectMoved = TRUE; @@ -391,10 +391,10 @@ u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s if (gSprites[i].inUse) { sprite = &gSprites[i]; - if (sprite->callback == UpdateTallGrassFieldEffect - && (x == sprite->sX && y == sprite->sY) - && localId == (u8)(sprite->sLocalId) - && mapNum == (sprite->sMapNum & 0xFF) + if (sprite->callback == UpdateTallGrassFieldEffect + && (x == sprite->sX && y == sprite->sY) + && localId == (u8)(sprite->sLocalId) + && mapNum == (sprite->sMapNum & 0xFF) && mapGroup == sprite->sMapGroup) return i; } @@ -452,8 +452,8 @@ void UpdateLongGrassFieldEffect(struct Sprite *sprite) mapNum = sprite->sMapNum; mapGroup = sprite->sMapGroup; metatileBehavior = MapGridGetMetatileBehaviorAt(sprite->data[1], sprite->data[2]); - if (TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId) - || !MetatileBehavior_IsLongGrass(metatileBehavior) + if (TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId) + || !MetatileBehavior_IsLongGrass(metatileBehavior) || (sprite->sObjectMoved && sprite->animEnded)) { FieldEffectStop(sprite, FLDEFF_LONG_GRASS); @@ -462,9 +462,9 @@ void UpdateLongGrassFieldEffect(struct Sprite *sprite) { // Check if the object that triggered the effect has moved away objectEvent = &gObjectEvents[objectEventId]; - if ((objectEvent->currentCoords.x != sprite->data[1] - || objectEvent->currentCoords.y != sprite->data[2]) - && (objectEvent->previousCoords.x != sprite->data[1] + if ((objectEvent->currentCoords.x != sprite->data[1] + || objectEvent->currentCoords.y != sprite->data[2]) + && (objectEvent->previousCoords.x != sprite->data[1] || objectEvent->previousCoords.y != sprite->data[2])) sprite->sObjectMoved = TRUE; diff --git a/src/field_message_box.c b/src/field_message_box.c index 69d470b84e..74afb56776 100755 --- a/src/field_message_box.c +++ b/src/field_message_box.c @@ -105,7 +105,7 @@ static bool8 ForceShowFieldAutoScrollMessage(const u8 *str) return TRUE; } -// Same as ShowFieldMessage, but instead of accepting a +// Same as ShowFieldMessage, but instead of accepting a // string arg it just prints whats already in gStringVar4 bool8 ShowFieldMessageFromBuffer(void) { diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index e5f6007b5c..617dd8ea3e 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1687,7 +1687,7 @@ static bool8 (*const sFishingStateFuncs[])(struct Task *) = { Fishing_Init, Fishing_GetRodOut, - Fishing_WaitBeforeDots, + Fishing_WaitBeforeDots, Fishing_InitDots, // FISHING_START_ROUND Fishing_ShowDots, Fishing_CheckForBite, @@ -1729,13 +1729,13 @@ static bool8 Fishing_GetRodOut(struct Task *task) { struct ObjectEvent *playerObjEvent; const s16 minRounds1[] = { - [OLD_ROD] = 1, - [GOOD_ROD] = 1, + [OLD_ROD] = 1, + [GOOD_ROD] = 1, [SUPER_ROD] = 1 }; const s16 minRounds2[] = { - [OLD_ROD] = 1, - [GOOD_ROD] = 3, + [OLD_ROD] = 1, + [GOOD_ROD] = 3, [SUPER_ROD] = 6 }; @@ -1865,8 +1865,8 @@ static bool8 Fishing_GotBite(struct Task *task) static bool8 Fishing_WaitForA(struct Task *task) { const s16 reelTimeouts[3] = { - [OLD_ROD] = 36, - [GOOD_ROD] = 33, + [OLD_ROD] = 36, + [GOOD_ROD] = 33, [SUPER_ROD] = 30 }; @@ -2100,7 +2100,7 @@ static void Task_DoPlayerSpinExit(u8 taskId) tState++; case 1: // Spin while rising TrySpinPlayerForWarp(object, &tSpinDelayTimer); - + // Rise and accelerate tCurY -= tSpeed; tSpeed += 3; diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 3c7016bd1b..cb2d0e9016 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -33,15 +33,15 @@ enum //. rodata static const s8 gTruckCamera_HorizontalTable[] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, -1, -1, -1, 0}; -static const u8 sSSTidalSailEastMovementScript[] = +static const u8 sSSTidalSailEastMovementScript[] = { - MOVEMENT_ACTION_WALK_FAST_RIGHT, + MOVEMENT_ACTION_WALK_FAST_RIGHT, MOVEMENT_ACTION_STEP_END }; -static const u8 sSSTidalSailWestMovementScript[] = +static const u8 sSSTidalSailWestMovementScript[] = { - MOVEMENT_ACTION_WALK_FAST_LEFT, + MOVEMENT_ACTION_WALK_FAST_LEFT, MOVEMENT_ACTION_STEP_END }; diff --git a/src/field_specials.c b/src/field_specials.c index 46f8e7fe89..e19f02c09e 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -521,9 +521,9 @@ void SpawnLinkPartnerObjectEvent(void) s16 x = 0; s16 y = 0; u8 movementTypes[] = { - MOVEMENT_TYPE_FACE_UP, - MOVEMENT_TYPE_FACE_LEFT, - MOVEMENT_TYPE_FACE_DOWN, + MOVEMENT_TYPE_FACE_UP, + MOVEMENT_TYPE_FACE_LEFT, + MOVEMENT_TYPE_FACE_DOWN, MOVEMENT_TYPE_FACE_RIGHT }; s8 coordOffsets[][2] = { @@ -1422,8 +1422,8 @@ bool8 Special_AreLeadMonEVsMaxedOut(void) u8 TryUpdateRusturfTunnelState(void) { - if (!FlagGet(FLAG_RUSTURF_TUNNEL_OPENED) - && gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(RUSTURF_TUNNEL) + if (!FlagGet(FLAG_RUSTURF_TUNNEL_OPENED) + && gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(RUSTURF_TUNNEL) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(RUSTURF_TUNNEL)) { if (FlagGet(FLAG_HIDE_RUSTURF_TUNNEL_ROCK_1)) @@ -1710,7 +1710,7 @@ void OffsetCameraForBattle(void) SetCameraPanning(8, 0); } -const struct WindowTemplate gElevatorFloor_WindowTemplate = +const struct WindowTemplate gElevatorFloor_WindowTemplate = { .bg = 0, .tilemapLeft = 21, @@ -2020,27 +2020,27 @@ void BufferVarsForIVRater(void) bool8 UsedPokemonCenterWarp(void) { - static const u16 sPokemonCenters[] = - { - MAP_OLDALE_TOWN_POKEMON_CENTER_1F, - MAP_DEWFORD_TOWN_POKEMON_CENTER_1F, - MAP_LAVARIDGE_TOWN_POKEMON_CENTER_1F, - MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F, - MAP_VERDANTURF_TOWN_POKEMON_CENTER_1F, - MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_1F, - MAP_PETALBURG_CITY_POKEMON_CENTER_1F, - MAP_SLATEPORT_CITY_POKEMON_CENTER_1F, - MAP_MAUVILLE_CITY_POKEMON_CENTER_1F, - MAP_RUSTBORO_CITY_POKEMON_CENTER_1F, - MAP_FORTREE_CITY_POKEMON_CENTER_1F, - MAP_LILYCOVE_CITY_POKEMON_CENTER_1F, - MAP_MOSSDEEP_CITY_POKEMON_CENTER_1F, - MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_1F, - MAP_EVER_GRANDE_CITY_POKEMON_CENTER_1F, - MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F, - MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F, - MAP_UNION_ROOM, - 0xFFFF + static const u16 sPokemonCenters[] = + { + MAP_OLDALE_TOWN_POKEMON_CENTER_1F, + MAP_DEWFORD_TOWN_POKEMON_CENTER_1F, + MAP_LAVARIDGE_TOWN_POKEMON_CENTER_1F, + MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F, + MAP_VERDANTURF_TOWN_POKEMON_CENTER_1F, + MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_1F, + MAP_PETALBURG_CITY_POKEMON_CENTER_1F, + MAP_SLATEPORT_CITY_POKEMON_CENTER_1F, + MAP_MAUVILLE_CITY_POKEMON_CENTER_1F, + MAP_RUSTBORO_CITY_POKEMON_CENTER_1F, + MAP_FORTREE_CITY_POKEMON_CENTER_1F, + MAP_LILYCOVE_CITY_POKEMON_CENTER_1F, + MAP_MOSSDEEP_CITY_POKEMON_CENTER_1F, + MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_1F, + MAP_EVER_GRANDE_CITY_POKEMON_CENTER_1F, + MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F, + MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F, + MAP_UNION_ROOM, + 0xFFFF }; int i; @@ -2073,71 +2073,71 @@ void UpdateFrontierManiac(u16 daysSince) void ShowFrontierManiacMessage(void) { - static const u8 *const sFrontierManiacMessages[][FRONTIER_MANIAC_MESSAGE_COUNT] = + static const u8 *const sFrontierManiacMessages[][FRONTIER_MANIAC_MESSAGE_COUNT] = { [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] = - { - BattleFrontier_Lounge2_Text_SalonMaidenIsThere, - BattleFrontier_Lounge2_Text_SalonMaidenSilverMons, - BattleFrontier_Lounge2_Text_SalonMaidenGoldMons + { + BattleFrontier_Lounge2_Text_SalonMaidenIsThere, + BattleFrontier_Lounge2_Text_SalonMaidenSilverMons, + BattleFrontier_Lounge2_Text_SalonMaidenGoldMons }, [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] = - { - BattleFrontier_Lounge2_Text_DoubleBattleAdvice1, - BattleFrontier_Lounge2_Text_DoubleBattleAdvice2, - BattleFrontier_Lounge2_Text_DoubleBattleAdvice3 + { + BattleFrontier_Lounge2_Text_DoubleBattleAdvice1, + BattleFrontier_Lounge2_Text_DoubleBattleAdvice2, + BattleFrontier_Lounge2_Text_DoubleBattleAdvice3 }, - [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] = - { - BattleFrontier_Lounge2_Text_MultiBattleAdvice, - BattleFrontier_Lounge2_Text_MultiBattleAdvice, - BattleFrontier_Lounge2_Text_MultiBattleAdvice + [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] = + { + BattleFrontier_Lounge2_Text_MultiBattleAdvice, + BattleFrontier_Lounge2_Text_MultiBattleAdvice, + BattleFrontier_Lounge2_Text_MultiBattleAdvice }, [FRONTIER_MANIAC_BATTLE_TOWER_LINK] = - { - BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, - BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, - BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice + { + BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, + BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, + BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice }, [FRONTIER_MANIAC_BATTLE_DOME] = - { - BattleFrontier_Lounge2_Text_DomeAceIsThere, - BattleFrontier_Lounge2_Text_DomeAceSilverMons, - BattleFrontier_Lounge2_Text_DomeAceGoldMons + { + BattleFrontier_Lounge2_Text_DomeAceIsThere, + BattleFrontier_Lounge2_Text_DomeAceSilverMons, + BattleFrontier_Lounge2_Text_DomeAceGoldMons }, [FRONTIER_MANIAC_BATTLE_FACTORY] = - { - BattleFrontier_Lounge2_Text_FactoryHeadIsThere, - BattleFrontier_Lounge2_Text_FactoryHeadSilverMons, - BattleFrontier_Lounge2_Text_FactoryHeadGoldMons + { + BattleFrontier_Lounge2_Text_FactoryHeadIsThere, + BattleFrontier_Lounge2_Text_FactoryHeadSilverMons, + BattleFrontier_Lounge2_Text_FactoryHeadGoldMons }, [FRONTIER_MANIAC_BATTLE_PALACE] = - { - BattleFrontier_Lounge2_Text_PalaceMavenIsThere, - BattleFrontier_Lounge2_Text_PalaceMavenSilverMons, - BattleFrontier_Lounge2_Text_PalaceMavenGoldMons + { + BattleFrontier_Lounge2_Text_PalaceMavenIsThere, + BattleFrontier_Lounge2_Text_PalaceMavenSilverMons, + BattleFrontier_Lounge2_Text_PalaceMavenGoldMons }, [FRONTIER_MANIAC_BATTLE_ARENA] = - { - BattleFrontier_Lounge2_Text_ArenaTycoonIsThere, - BattleFrontier_Lounge2_Text_ArenaTycoonSilverMons, - BattleFrontier_Lounge2_Text_ArenaTycoonGoldMons + { + BattleFrontier_Lounge2_Text_ArenaTycoonIsThere, + BattleFrontier_Lounge2_Text_ArenaTycoonSilverMons, + BattleFrontier_Lounge2_Text_ArenaTycoonGoldMons }, - [FRONTIER_MANIAC_BATTLE_PIKE] = - { - BattleFrontier_Lounge2_Text_PikeQueenIsThere, - BattleFrontier_Lounge2_Text_PikeQueenSilverMons, - BattleFrontier_Lounge2_Text_PikeQueenGoldMons + [FRONTIER_MANIAC_BATTLE_PIKE] = + { + BattleFrontier_Lounge2_Text_PikeQueenIsThere, + BattleFrontier_Lounge2_Text_PikeQueenSilverMons, + BattleFrontier_Lounge2_Text_PikeQueenGoldMons }, [FRONTIER_MANIAC_BATTLE_PYRAMID] = - { - BattleFrontier_Lounge2_Text_PyramidKingIsThere, - BattleFrontier_Lounge2_Text_PyramidKingSilverMons, - BattleFrontier_Lounge2_Text_PyramidKingGoldMons + { + BattleFrontier_Lounge2_Text_PyramidKingIsThere, + BattleFrontier_Lounge2_Text_PyramidKingSilverMons, + BattleFrontier_Lounge2_Text_PyramidKingGoldMons }, }; - static const u8 sFrontierManiacStreakThresholds[][FRONTIER_MANIAC_MESSAGE_COUNT - 1] = + static const u8 sFrontierManiacStreakThresholds[][FRONTIER_MANIAC_MESSAGE_COUNT - 1] = { [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] = { 21, 56 }, [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] = { 21, 35 }, @@ -2161,7 +2161,7 @@ void ShowFrontierManiacMessage(void) case FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES: case FRONTIER_MANIAC_BATTLE_TOWER_MULTIS: case FRONTIER_MANIAC_BATTLE_TOWER_LINK: - if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50]; @@ -2172,7 +2172,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_DOME: - if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; @@ -2183,7 +2183,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_FACTORY: - if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; @@ -2194,7 +2194,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_PALACE: - if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; @@ -2205,7 +2205,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_ARENA: - if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50]; @@ -2216,7 +2216,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_PIKE: - if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50]; @@ -2227,7 +2227,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_PYRAMID: - if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50]; @@ -2429,13 +2429,13 @@ void ShowScrollableMultichoice(void) } } -static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] = +static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] = { - [SCROLL_MULTI_NONE] = + [SCROLL_MULTI_NONE] = { gText_Exit }, - [SCROLL_MULTI_GLASS_WORKSHOP_VENDOR] = + [SCROLL_MULTI_GLASS_WORKSHOP_VENDOR] = { gText_BlueFlute, gText_YellowFlute, @@ -2446,7 +2446,7 @@ static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] gText_PrettyDesk, gText_Exit }, - [SCROLL_MULTI_POKEMON_FAN_CLUB_RATER] = + [SCROLL_MULTI_POKEMON_FAN_CLUB_RATER] = { gText_0Pts, gText_10Pts, @@ -2461,7 +2461,7 @@ static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] gText_100Pts, gText_QuestionMark }, - [SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1] = + [SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1] = { gText_KissPoster16BP, gText_KissCushion32BP, @@ -2535,7 +2535,7 @@ static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] gText_ExchangeService, gText_Exit }, - [SCROLL_MULTI_BF_MOVE_TUTOR_1] = + [SCROLL_MULTI_BF_MOVE_TUTOR_1] = { gText_Softboiled16BP, gText_SeismicToss24BP, @@ -2549,7 +2549,7 @@ static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] gText_SwordsDance48BP, gText_Exit }, - [SCROLL_MULTI_BF_MOVE_TUTOR_2] = + [SCROLL_MULTI_BF_MOVE_TUTOR_2] = { gText_DefenseCurl16BP, gText_Snore24BP, @@ -2896,7 +2896,7 @@ void UpdateFrontierGambler(u16 daysSince) void ShowFrontierGamblerLookingMessage(void) { - static const u8 *const sFrontierGamblerLookingMessages[] = + static const u8 *const sFrontierGamblerLookingMessages[] = { BattleFrontier_Lounge3_Text_ChallengeBattleTowerSingle, BattleFrontier_Lounge3_Text_ChallengeBattleTowerDouble, @@ -2919,7 +2919,7 @@ void ShowFrontierGamblerLookingMessage(void) void ShowFrontierGamblerGoMessage(void) { - static const u8 *const sFrontierGamblerGoMessages[] = + static const u8 *const sFrontierGamblerGoMessages[] = { BattleFrontier_Lounge3_Text_GetToBattleTowerSingle, BattleFrontier_Lounge3_Text_GetToBattleTowerDouble, @@ -2940,19 +2940,19 @@ void ShowFrontierGamblerGoMessage(void) void FrontierGamblerSetWonOrLost(bool8 won) { - static const u16 sFrontierChallenges[] = + static const u16 sFrontierChallenges[] = { FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_SINGLES), FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_DOUBLES), FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_MULTIS), FRONTIER_CHALLENGE(FRONTIER_FACILITY_DOME, FRONTIER_MODE_SINGLES), FRONTIER_CHALLENGE(FRONTIER_FACILITY_DOME, FRONTIER_MODE_DOUBLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_SINGLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_DOUBLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_SINGLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_DOUBLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_ARENA, FRONTIER_MODE_SINGLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_PIKE, FRONTIER_MODE_SINGLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_SINGLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_DOUBLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_SINGLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_DOUBLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_ARENA, FRONTIER_MODE_SINGLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_PIKE, FRONTIER_MODE_SINGLES), FRONTIER_CHALLENGE(FRONTIER_FACILITY_PYRAMID, FRONTIER_MODE_SINGLES) }; @@ -3140,31 +3140,31 @@ static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused) } static const u16 sBattleFrontier_TutorMoves1[] = -{ - MOVE_SOFT_BOILED, - MOVE_SEISMIC_TOSS, - MOVE_DREAM_EATER, - MOVE_MEGA_PUNCH, - MOVE_MEGA_KICK, - MOVE_BODY_SLAM, - MOVE_ROCK_SLIDE, - MOVE_COUNTER, - MOVE_THUNDER_WAVE, - MOVE_SWORDS_DANCE +{ + MOVE_SOFT_BOILED, + MOVE_SEISMIC_TOSS, + MOVE_DREAM_EATER, + MOVE_MEGA_PUNCH, + MOVE_MEGA_KICK, + MOVE_BODY_SLAM, + MOVE_ROCK_SLIDE, + MOVE_COUNTER, + MOVE_THUNDER_WAVE, + MOVE_SWORDS_DANCE }; static const u16 sBattleFrontier_TutorMoves2[] = -{ - MOVE_DEFENSE_CURL, - MOVE_SNORE, - MOVE_MUD_SLAP, - MOVE_SWIFT, - MOVE_ICY_WIND, - MOVE_ENDURE, - MOVE_PSYCH_UP, - MOVE_ICE_PUNCH, - MOVE_THUNDER_PUNCH, - MOVE_FIRE_PUNCH +{ + MOVE_DEFENSE_CURL, + MOVE_SNORE, + MOVE_MUD_SLAP, + MOVE_SWIFT, + MOVE_ICY_WIND, + MOVE_ENDURE, + MOVE_PSYCH_UP, + MOVE_ICE_PUNCH, + MOVE_THUNDER_PUNCH, + MOVE_FIRE_PUNCH }; void BufferBattleFrontierTutorMoveName(void) @@ -3181,7 +3181,7 @@ void BufferBattleFrontierTutorMoveName(void) static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection) { - static const struct WindowTemplate sBattleFrontierTutor_WindowTemplate = + static const struct WindowTemplate sBattleFrontierTutor_WindowTemplate = { .bg = 0, .tilemapLeft = 1, @@ -3205,7 +3205,7 @@ static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection) static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection) { - static const u8 *const sBattleFrontier_TutorMoveDescriptions1[] = + static const u8 *const sBattleFrontier_TutorMoveDescriptions1[] = { BattleFrontier_Lounge7_Text_SoftboiledDesc, BattleFrontier_Lounge7_Text_SeismicTossDesc, @@ -3220,7 +3220,7 @@ static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection) gText_Exit, }; - static const u8 *const sBattleFrontier_TutorMoveDescriptions2[] = + static const u8 *const sBattleFrontier_TutorMoveDescriptions2[] = { BattleFrontier_Lounge7_Text_DefenseCurlDesc, BattleFrontier_Lounge7_Text_SnoreDesc, @@ -3335,20 +3335,20 @@ void sub_813AF48(void) } // Undefine Scrollable Multichoice task data macros -#undef tMaxItemsOnScreen -#undef tNumItems -#undef tLeft -#undef tTop -#undef tWidth -#undef tHeight -#undef tKeepOpenAfterSelect -#undef tScrollOffset -#undef tSelectedRow -#undef tScrollMultiId -#undef tScrollArrowId -#undef tWindowId -#undef tListTaskId -#undef tTaskId +#undef tMaxItemsOnScreen +#undef tNumItems +#undef tLeft +#undef tTop +#undef tWidth +#undef tHeight +#undef tKeepOpenAfterSelect +#undef tScrollOffset +#undef tSelectedRow +#undef tScrollMultiId +#undef tScrollArrowId +#undef tWindowId +#undef tListTaskId +#undef tTaskId void DoDeoxysRockInteraction(void) { @@ -3730,7 +3730,7 @@ bool32 ShouldDistributeEonTicket(void) { if (!VarGet(VAR_DISTRIBUTE_EON_TICKET)) return FALSE; - + return TRUE; } @@ -3794,17 +3794,17 @@ static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId) gSpecialVar_0x8005 = gBlockRecvBuffer[1][0]; ResetBlockReceivedFlag(1); - if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE + if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_RETIRE) { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_BOTH_RETIRE; } - else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_CONTINUE + else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_CONTINUE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_RETIRE) { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_MEMBER_RETIRE; } - else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE + else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_CONTINUE) { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_LEADER_RETIRE; @@ -4026,13 +4026,13 @@ bool8 InPokemonCenter(void) } /* Summary of the Lilycove Trainer Fan Club, because it's a little messy - + ## The Fan Club room itself There are initially 4 members of the Fan Club (+ an interviewer), none of whom are fans of the player After becoming the champion there will be 8 members of the Fan Club, 3 of whom are automatically fans of the player After this point, if a club member is a fan of the player they will sit at the front table and comment on the player If they are not fans of the player, they will sit at the far table and can make comments about a different trainer (see BufferFanClubTrainerName) - + ## Gaining/losing fans After every link battle the player will gain a fan if they won, or lose a fan if they lost If the player has at least 3 fans, this is the only way to gain fans @@ -4101,16 +4101,16 @@ void UpdateTrainerFanClubGameClear(void) } // If the player has < 3 fans, gain a new fan whenever the counter reaches 20+ -// Defeating Drake or participating in a Contest increments the counter by 2 +// Defeating Drake or participating in a Contest increments the counter by 2 // Participating at Battle Tower or in a Secret Base battle increments the counter by 1 u8 TryGainNewFanFromCounter(u8 incrementId) { - static const u8 sCounterIncrements[] = - { - [FANCOUNTER_DEFEATED_DRAKE] = 2, - [FANCOUNTER_BATTLED_AT_BASE] = 1, - [FANCOUNTER_FINISHED_CONTEST] = 2, - [FANCOUNTER_USED_BATTLE_TOWER] = 1 + static const u8 sCounterIncrements[] = + { + [FANCOUNTER_DEFEATED_DRAKE] = 2, + [FANCOUNTER_BATTLED_AT_BASE] = 1, + [FANCOUNTER_FINISHED_CONTEST] = 2, + [FANCOUNTER_USED_BATTLE_TOWER] = 1 }; if (VarGet(VAR_LILYCOVE_FAN_CLUB_STATE) == 2) @@ -4143,16 +4143,16 @@ u8 TryGainNewFanFromCounter(u8 incrementId) // If all the members are already fans of the player then this redundantly sets the first fan in the list to be a fan static u16 PlayerGainRandomTrainerFan(void) { - static const u8 sFanClubMemberIds[NUM_TRAINER_FAN_CLUB_MEMBERS] = - { - FANCLUB_MEMBER1, - FANCLUB_MEMBER2, - FANCLUB_MEMBER3, - FANCLUB_MEMBER4, - FANCLUB_MEMBER5, + static const u8 sFanClubMemberIds[NUM_TRAINER_FAN_CLUB_MEMBERS] = + { + FANCLUB_MEMBER1, + FANCLUB_MEMBER2, + FANCLUB_MEMBER3, + FANCLUB_MEMBER4, + FANCLUB_MEMBER5, FANCLUB_MEMBER6, - FANCLUB_MEMBER7, - FANCLUB_MEMBER8 + FANCLUB_MEMBER7, + FANCLUB_MEMBER8 }; u8 i; @@ -4179,16 +4179,16 @@ static u16 PlayerGainRandomTrainerFan(void) // If no fan was lost while looping, the last current fan in the list will stop being a fan static u16 PlayerLoseRandomTrainerFan(void) { - static const u8 sFanClubMemberIds[NUM_TRAINER_FAN_CLUB_MEMBERS] = - { - FANCLUB_MEMBER1, - FANCLUB_MEMBER6, - FANCLUB_MEMBER7, - FANCLUB_MEMBER4, - FANCLUB_MEMBER3, - FANCLUB_MEMBER5, - FANCLUB_MEMBER8, - FANCLUB_MEMBER2 + static const u8 sFanClubMemberIds[NUM_TRAINER_FAN_CLUB_MEMBERS] = + { + FANCLUB_MEMBER1, + FANCLUB_MEMBER6, + FANCLUB_MEMBER7, + FANCLUB_MEMBER4, + FANCLUB_MEMBER3, + FANCLUB_MEMBER5, + FANCLUB_MEMBER8, + FANCLUB_MEMBER2 }; u8 i; diff --git a/src/field_weather.c b/src/field_weather.c index 4b9c6a8630..c067e8ebd7 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -110,8 +110,8 @@ void (*const gWeatherPalStateFuncs[])(void) = { [WEATHER_PAL_STATE_CHANGING_WEATHER] = UpdateWeatherGammaShift, [WEATHER_PAL_STATE_SCREEN_FADING_IN] = FadeInScreenWithWeather, - [WEATHER_PAL_STATE_SCREEN_FADING_OUT] = DoNothing, - [WEATHER_PAL_STATE_IDLE] = DoNothing, + [WEATHER_PAL_STATE_SCREEN_FADING_OUT] = DoNothing, + [WEATHER_PAL_STATE_IDLE] = DoNothing, }; // This table specifies which of the gamma shift tables should be diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c index 733dca722e..769e735623 100644 --- a/src/fldeff_escalator.c +++ b/src/fldeff_escalator.c @@ -71,7 +71,7 @@ static void SetEscalatorMetatile(u8 taskId, const s16 *metatileIds, u16 metatile s16 i; s16 j; - // Check all the escalator sections and only progress the selected one to the next stage + // Check all the escalator sections and only progress the selected one to the next stage if (!gTasks[taskId].tGoingUp) { for (i = 0; i < 3; i++) @@ -178,7 +178,7 @@ void StopEscalator(void) bool8 IsEscalatorMoving(void) { - if (gTasks[sEscalatorAnim_TaskId].tDrawingEscalator == FALSE + if (gTasks[sEscalatorAnim_TaskId].tDrawingEscalator == FALSE && gTasks[sEscalatorAnim_TaskId].tTransitionStage == LAST_ESCALATOR_STAGE) return FALSE; else diff --git a/src/frontier_pass.c b/src/frontier_pass.c index e3e5ee1f24..53bd68eac2 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -178,9 +178,9 @@ static const u32 sUnusedData[] = INCBIN_U32("graphics/frontier static const u32 sBattleRecord_Tilemap[] = INCBIN_U32("graphics/frontier_pass/record_frame.bin.lz"); static const u32 sMapAndCard_Zooming_Tilemap[] = INCBIN_U32("graphics/frontier_pass/small_map_and_card_affine.bin.lz"); -static const s16 sBgAffineCoords[][2] = +static const s16 sBgAffineCoords[][2] = { - [CURSOR_AREA_MAP - 1] = {216, 32}, + [CURSOR_AREA_MAP - 1] = {216, 32}, [CURSOR_AREA_CARD - 1] = {216, 128} }; @@ -1099,7 +1099,7 @@ static void Task_PassAreaZoom(u8 taskId) tScaleY += tScaleSpeedY; sPassGfx->scaleX = MathUtil_Inv16(tScaleX); sPassGfx->scaleY = MathUtil_Inv16(tScaleY); - + // Check if zoom hasn't reached target if (!tZoomOut) { @@ -1117,7 +1117,7 @@ static void Task_PassAreaZoom(u8 taskId) sPassGfx->zooming = FALSE; if (UpdatePaletteFade()) return; - + if (!tZoomOut) { // Zoomed in and faded out, switch to map or trainer card @@ -1174,7 +1174,7 @@ static void ShowAndPrintWindows(void) static void PrintAreaDescription(u8 cursorArea) { FillWindowPixelBuffer(WINDOW_DESCRIPTION, PIXEL_FILL(0)); - + if (cursorArea == CURSOR_AREA_RECORD && !sPassData->hasBattleRecord) AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[CURSOR_AREA_NOTHING]); else if (cursorArea != CURSOR_AREA_NOTHING) @@ -1256,7 +1256,7 @@ static void UpdateAreaHighlight(u8 cursorArea, u8 previousCursorArea) return; break; } - + // If moving on to highlightable area, highlight it switch (cursorArea) { diff --git a/src/frontier_util.c b/src/frontier_util.c index 4aec27944d..352c14b01a 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -2397,7 +2397,7 @@ void ClearRankingHallRecords(void) { for (k = 0; k < 3; k++) { - CopyTrainerId(gSaveBlock2Ptr->hallRecords1P[i][j][k].id, ZERO); + CopyTrainerId(gSaveBlock2Ptr->hallRecords1P[i][j][k].id, ZERO); gSaveBlock2Ptr->hallRecords1P[i][j][k].name[0] = EOS; gSaveBlock2Ptr->hallRecords1P[i][j][k].winStreak = 0; } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 590c0d01da..e9d6b6070e 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -298,21 +298,21 @@ static const union AnimCmd sAnim_WhiteConfettiC[] = static const union AnimCmd * const sAnims_Confetti[] = { - sAnim_PinkConfettiA, - sAnim_RedConfettiA, - sAnim_BlueConfettiA, + sAnim_PinkConfettiA, + sAnim_RedConfettiA, + sAnim_BlueConfettiA, sAnim_RedConfettiB, - sAnim_BlueConfettiB, - sAnim_YellowConfettiA, - sAnim_WhiteConfettiA, + sAnim_BlueConfettiB, + sAnim_YellowConfettiA, + sAnim_WhiteConfettiA, sAnim_GreenConfettiA, - sAnim_PinkConfettiB, - sAnim_BlueConfettiC, - sAnim_YellowConfettiB, + sAnim_PinkConfettiB, + sAnim_BlueConfettiC, + sAnim_YellowConfettiB, sAnim_WhiteConfettiB, - sAnim_GreenConfettiB, - sAnim_PinkConfettiC, - sAnim_RedConfettiC, + sAnim_GreenConfettiB, + sAnim_PinkConfettiC, + sAnim_RedConfettiC, sAnim_YellowConfettiC, sAnim_WhiteConfettiC }; @@ -334,17 +334,17 @@ static const u32 sHallOfFame_Gfx[] = INCBIN_U32("graphics/misc/japanese_hof.4bpp static const struct HallofFameMon sDummyFameMon = { - .tid = 0x3EA03EA, - .personality = 0, - .species = SPECIES_NONE, - .lvl = 0, + .tid = 0x3EA03EA, + .personality = 0, + .species = SPECIES_NONE, + .lvl = 0, .nick = {0} }; // Unused, order of party slots on Hall of Fame screen static const u8 sHallOfFame_SlotOrder[] = { - 2, 1, 3, - 6, 4, 5, + 2, 1, 3, + 6, 4, 5, 0, 0 }; @@ -662,7 +662,7 @@ static void Task_Hof_DoConfetti(u8 taskId) if (gTasks[taskId].tFrameCount != 0) { gTasks[taskId].tFrameCount--; - + // Create new confetti every 4th frame for the first 290 frames // For the last 110 frames wait for the existing confetti to fall offscreen if ((gTasks[taskId].tFrameCount & 3) == 0 && gTasks[taskId].tFrameCount > 110) @@ -1507,12 +1507,12 @@ static void Task_DoDomeConfetti(u8 taskId) if (tTimer != 0 && tTimer % 3 == 0) { // Create new confetti every 3 frames - id = ConfettiUtil_AddNew(&sOamData_Confetti, - TAG_CONFETTI, - TAG_CONFETTI, - Random() % DISPLAY_WIDTH, - -(Random() % 8), - Random() % ARRAY_COUNT(sAnims_Confetti), + id = ConfettiUtil_AddNew(&sOamData_Confetti, + TAG_CONFETTI, + TAG_CONFETTI, + Random() % DISPLAY_WIDTH, + -(Random() % 8), + Random() % ARRAY_COUNT(sAnims_Confetti), id); if (id != 0xFF) { diff --git a/src/image_processing_effects.c b/src/image_processing_effects.c index fa6867f2c5..60b105163e 100644 --- a/src/image_processing_effects.c +++ b/src/image_processing_effects.c @@ -733,11 +733,11 @@ static u16 QuantizePixel_BlurHard(u16 *prevPixel, u16 *curPixel, u16 *nextPixel) red = GET_R(*curPixel); green = GET_G(*curPixel); blue = GET_B(*curPixel); - + prevAvg = (GET_R(*prevPixel) + GET_G(*prevPixel) + GET_B(*prevPixel)) / 3; curAvg = (GET_R(*curPixel) + GET_G(*curPixel) + GET_B(*curPixel)) / 3; nextAvg = (GET_R(*nextPixel) + GET_G(*nextPixel) + GET_B(*nextPixel)) / 3; - + if (prevAvg == curAvg && nextAvg == curAvg) return *curPixel; @@ -1096,7 +1096,7 @@ static u16 QuantizePixel_PrimaryColors(u16* color) u16 red = GET_R(*color); u16 green = GET_G(*color); u16 blue = GET_B(*color); - + if (red < 12 && green < 11 && blue < 11) return 1; diff --git a/src/intro.c b/src/intro.c index 9fe9169da8..d027c72305 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1421,7 +1421,7 @@ static void Task_Scene2_BikeRide(u8 taskId) gIntroCredits_MovingSceneryState = INTROCRED_SCENERY_FROZEN; DestroyTask(gTasks[taskId].tBgAnimTaskId); } - + if (gIntroFrameCounter > TIMER_END_SCENE_2) { // Fade out to next scene @@ -1671,7 +1671,7 @@ static void SpriteCB_Manectric(struct Sprite *sprite) sprite->x -= 2; if (gIntroFrameCounter != TIMER_MANECTRIC_RUN_CIRCULAR) break; - + // Initialize circular pattern running sprite->y -= 12; sprite->sSinIdx = 0x80; @@ -2205,7 +2205,7 @@ static void Task_Scene3_Kyogre(u8 taskId) } } -#undef tScreenX +#undef tScreenX #undef tScreenY #undef tZoom #undef tDelay @@ -2219,7 +2219,7 @@ static void Task_Scene3_Kyogre(u8 taskId) #define sUnk data[7] // Never read // taskId is used inconsistently for these two functions. -// The sprite callback for the bubbles will always read it, unless delay is 0 to +// The sprite callback for the bubbles will always read it, unless delay is 0 to // start (it never is), but the first function is often passed 0 instead of a // taskId, and the second function doesn't take/assign a taskId at all. // The only time an actual taskId is given is when it actually needs the @@ -2233,9 +2233,9 @@ static void CreateKyogreBubbleSprites_Body(u8 taskId) for (i = 0; i < NUM_BUBBLES_IN_SET; i++) { - spriteId = CreateSprite(&sSpriteTemplate_Bubbles, - sKyogreBubbleData[i][0], - sKyogreBubbleData[i][1], + spriteId = CreateSprite(&sSpriteTemplate_Bubbles, + sKyogreBubbleData[i][0], + sKyogreBubbleData[i][1], i); gSprites[spriteId].invisible = TRUE; gSprites[spriteId].sTaskId = taskId; @@ -2252,14 +2252,14 @@ static void CreateKyogreBubbleSprites_Fins(void) for (i = 0; i < NUM_BUBBLES_IN_SET; i++) { - spriteId = CreateSprite(&sSpriteTemplate_Bubbles, - sKyogreBubbleData[i + NUM_BUBBLES_IN_SET][0], - sKyogreBubbleData[i + NUM_BUBBLES_IN_SET][1], + spriteId = CreateSprite(&sSpriteTemplate_Bubbles, + sKyogreBubbleData[i + NUM_BUBBLES_IN_SET][0], + sKyogreBubbleData[i + NUM_BUBBLES_IN_SET][1], i); gSprites[spriteId].invisible = TRUE; #ifdef BUGFIX gSprites[spriteId].sDelay = sKyogreBubbleData[i + NUM_BUBBLES_IN_SET][2]; -#else +#else gSprites[spriteId].sDelay = sKyogreBubbleData[i][2]; // Using the wrong set of delays here #endif gSprites[spriteId].sUnk = 64; diff --git a/src/intro_credits_graphics.c b/src/intro_credits_graphics.c index bceddd9b70..ebc3d38eb1 100644 --- a/src/intro_credits_graphics.c +++ b/src/intro_credits_graphics.c @@ -13,7 +13,7 @@ and the credit sequence, where the player bikes along a grassy path. These graphics are placed in graphics/intro/scene_2 to keep - all of the intro graphics files together, though it includes + all of the intro graphics files together, though it includes the related graphics that are used only by the credits. */ @@ -1039,7 +1039,7 @@ static void SpriteCB_MovingScenery(struct Sprite *sprite) { s32 x; s16 state = gIntroCredits_MovingSceneryState; - + if (state != INTROCRED_SCENERY_FROZEN) { switch (state) diff --git a/src/item_menu.c b/src/item_menu.c index 9cc02e8cc4..8ada7ff62d 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -76,20 +76,20 @@ enum { enum { ACTION_USE, - ACTION_TOSS, - ACTION_REGISTER, - ACTION_GIVE, - ACTION_CANCEL, + ACTION_TOSS, + ACTION_REGISTER, + ACTION_GIVE, + ACTION_CANCEL, ACTION_BATTLE_USE, - ACTION_CHECK, - ACTION_WALK, - ACTION_DESELECT, - ACTION_CHECK_TAG, - ACTION_CONFIRM, - ACTION_SHOW, - ACTION_GIVE_FAVOR_LADY, - ACTION_CONFIRM_QUIZ_LADY, - ACTION_DUMMY, + ACTION_CHECK, + ACTION_WALK, + ACTION_DESELECT, + ACTION_CHECK_TAG, + ACTION_CONFIRM, + ACTION_SHOW, + ACTION_GIVE_FAVOR_LADY, + ACTION_CONFIRM_QUIZ_LADY, + ACTION_DUMMY, }; enum { @@ -669,7 +669,7 @@ void VBlankCB_BagMenuRun(void) static void CB2_Bag(void) { - while(MenuHelpers_CallLinkSomething() != TRUE && SetupBagMenu() != TRUE && MenuHelpers_LinkSomething() != TRUE) + while(MenuHelpers_CallLinkSomething() != TRUE && SetupBagMenu() != TRUE && MenuHelpers_LinkSomething() != TRUE) {}; } @@ -1084,7 +1084,7 @@ static void Task_CloseBagMenu(u8 taskId) if (!gPaletteFade.active) { DestroyListMenuTask(tListTaskId, &gBagPosition.scrollPosition[gBagPosition.pocket], &gBagPosition.cursorPosition[gBagPosition.pocket]); - + // If ready for a new screen (e.g. party menu for giving an item) go to that screen // Otherwise exit the bag and use callback set up when the bag was first opened if (gBagMenu->newScreenCallback != NULL) @@ -1417,11 +1417,11 @@ static void DrawPocketIndicatorSquare(u8 x, bool8 isCurrentPocket) static bool8 CanSwapItems(void) { // Swaps can only be done from the field or in battle (as opposed to while selling items, for example) - if (gBagPosition.location == ITEMMENULOCATION_FIELD + if (gBagPosition.location == ITEMMENULOCATION_FIELD || gBagPosition.location == ITEMMENULOCATION_BATTLE) { // TMHMs and berries are numbered, and so may not be swapped - if (gBagPosition.pocket != TMHM_POCKET + if (gBagPosition.pocket != TMHM_POCKET && gBagPosition.pocket != BERRIES_POCKET) return TRUE; } @@ -2564,7 +2564,7 @@ static void PrintTMHMMoveData(u16 itemId) { moveId = ItemIdToBattleMoveId(itemId); BlitMenuInfoIcon(WIN_TMHM_INFO, gBattleMoves[moveId].type + 1, 0, 0); - + // Print TMHM power if (gBattleMoves[moveId].power <= 1) { diff --git a/src/item_use.c b/src/item_use.c index 4b4c6e1b9d..c350d9d0b8 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -509,7 +509,7 @@ static void SetDistanceOfClosestHiddenItem(u8 taskId, s16 itemDistanceX, s16 ite } else { - if (oldItemAbsX + oldItemAbsY == newItemAbsX + newItemAbsY + if (oldItemAbsX + oldItemAbsY == newItemAbsX + newItemAbsY && (oldItemAbsY > newItemAbsY || (oldItemAbsY == newItemAbsY && tItemDistanceY < itemDistanceY))) { // If items are equal distance, use whichever is closer on the Y axis or further south diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c index 309fc4eadb..de00564641 100644 --- a/src/librfu_rfu.c +++ b/src/librfu_rfu.c @@ -161,7 +161,7 @@ u16 rfu_initializeAPI(u32 *APIBuffer, u16 buffByteSize, IntrFunc *sioIntrTable_p gRfuSlotStatusNI[i] = &gRfuSlotStatusNI[i - 1][1]; gRfuSlotStatusUNI[i] = &gRfuSlotStatusUNI[i - 1][1]; } - // remaining space in API buffer is used for `struct RfuIntrStruct`. + // remaining space in API buffer is used for `struct RfuIntrStruct`. gRfuFixed->STWIBuffer = (struct RfuIntrStruct *)&gRfuSlotStatusUNI[3][1]; STWI_init_all((struct RfuIntrStruct *)&gRfuSlotStatusUNI[3][1], sioIntrTable_p, copyInterruptToRam); rfu_STC_clearAPIVariables(); diff --git a/src/librfu_stwi.c b/src/librfu_stwi.c index 0287b358a7..8d8d10c406 100644 --- a/src/librfu_stwi.c +++ b/src/librfu_stwi.c @@ -40,7 +40,7 @@ void STWI_init_all(struct RfuIntrStruct *interruptStruct, IntrFunc *interrupt, b gSTWIStatus->error = 0; gSTWIStatus->recoveryCount = 0; gSTWIStatus->sending = 0; - REG_RCNT = 0x100; // TODO: mystery bit? + REG_RCNT = 0x100; // TODO: mystery bit? REG_SIOCNT = SIO_INTR_ENABLE | SIO_32BIT_MODE | SIO_115200_BPS; STWI_init_Callback_M(); STWI_init_Callback_S(); @@ -118,7 +118,7 @@ void STWI_init_Callback_S(void) STWI_set_Callback_S(NULL); } -// The callback can take 2 or 3 arguments. +// The callback can take 2 or 3 arguments. void STWI_set_Callback_M(void *callbackM) { gSTWIStatus->callbackM = callbackM; @@ -594,7 +594,7 @@ static s32 STWI_start_Command(void) { u16 imeTemp; - // equivalent to gSTWIStatus->txPacket->rfuPacket32.command, + // equivalent to gSTWIStatus->txPacket->rfuPacket32.command, // but the cast here is required to avoid register issue *(u32 *)gSTWIStatus->txPacket->rfuPacket8.data = 0x99660000 | (gSTWIStatus->reqLength << 8) | gSTWIStatus->reqActiveCommand; REG_SIODATA32 = gSTWIStatus->txPacket->rfuPacket32.command; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 6fa8ba4eb4..f6a4b60987 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -517,7 +517,7 @@ void BufferQuizPrizeItem(void) gSpecialVar_0x8005 = sQuizLadyPtr->prize; } -void SetQuizLadyState_Complete(void) +void SetQuizLadyState_Complete(void) { sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr->state = LILYCOVE_LADY_STATE_COMPLETED; @@ -614,7 +614,7 @@ void QuizLadyClearQuestionForRecordMix(const LilycoveLady *lilycoveLady) u8 i; sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; - if (lilycoveLady->quiz.prevQuestionId < ARRAY_COUNT(sQuizLadyQuizQuestions) + if (lilycoveLady->quiz.prevQuestionId < ARRAY_COUNT(sQuizLadyQuizQuestions) && sQuizLadyPtr->id == LILYCOVE_LADY_QUIZ) { for (i = 0; i < 4; i ++) @@ -656,7 +656,7 @@ static void ResetContestLadyForRecordMix(void) sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; sContestLadyPtr->id = LILYCOVE_LADY_CONTEST; sContestLadyPtr->givenPokeblock = FALSE; - if (sContestLadyPtr->numGoodPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD + if (sContestLadyPtr->numGoodPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD || sContestLadyPtr->numOtherPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD) { ResetContestLadyContestData(); @@ -790,7 +790,7 @@ bool8 ShouldContestLadyShowGoOnAir(void) bool8 putOnAir = FALSE; sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; - if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD + if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD || sContestLadyPtr->numOtherPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD) { putOnAir = TRUE; diff --git a/src/link.c b/src/link.c index 8a04b53e58..97b3dfe910 100644 --- a/src/link.c +++ b/src/link.c @@ -764,7 +764,7 @@ static int AreAnyLinkPlayersUsingVersions(u32 version1, u32 version2) nPlayers = GetLinkPlayerCount(); for (i = 0; i < nPlayers; i++) { - if ((gLinkPlayers[i].version & 0xFF) == version1 + if ((gLinkPlayers[i].version & 0xFF) == version1 || (gLinkPlayers[i].version & 0xFF) == version2) return 1; } @@ -873,7 +873,7 @@ u8 GetLinkPlayerDataExchangeStatusTimed(int minPlayers, int maxPlayers) sPlayerDataExchangeStatus = EXCHANGE_DIFF_SELECTIONS; linkType1 = gLinkPlayers[GetMultiplayerId()].linkType; linkType2 = gLinkPlayers[GetMultiplayerId() ^ 1].linkType; - if ((linkType1 == LINKTYPE_BATTLE_TOWER_50 && linkType2 == LINKTYPE_BATTLE_TOWER_OPEN) + if ((linkType1 == LINKTYPE_BATTLE_TOWER_50 && linkType2 == LINKTYPE_BATTLE_TOWER_OPEN) || (linkType1 == LINKTYPE_BATTLE_TOWER_OPEN && linkType2 == LINKTYPE_BATTLE_TOWER_50)) { // 3 below indicates partner made different level mode selection @@ -1350,7 +1350,7 @@ void CheckLinkPlayersMatchSaved(void) for (i = 0; i < gSavedLinkPlayerCount; i++) { - if (sSavedLinkPlayers[i].trainerId != gLinkPlayers[i].trainerId + if (sSavedLinkPlayers[i].trainerId != gLinkPlayers[i].trainerId || StringCompare(sSavedLinkPlayers[i].name, gLinkPlayers[i].name) != 0) { gLinkErrorOccurred = TRUE; @@ -1777,7 +1777,7 @@ void LinkPlayerFromBlock(u32 who) *player = block->linkPlayer; ConvertLinkPlayerName(player); - if (strcmp(block->magic1, sASCIIGameFreakInc) != 0 + if (strcmp(block->magic1, sASCIIGameFreakInc) != 0 || strcmp(block->magic2, sASCIIGameFreakInc) != 0) SetMainCallback2(CB2_LinkError); } diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index 6366b97047..2d85bb81a0 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -82,7 +82,7 @@ static void Debug_PrintEmpty(void); static void Task_Idle(u8); static const INIT_PARAM sRfuReqConfigTemplate = { - .maxMFrame = 4, + .maxMFrame = 4, .MC_TimerCount = 32, .availSlot_flag = 0, .mboot_flag = 0, @@ -91,7 +91,7 @@ static const INIT_PARAM sRfuReqConfigTemplate = { .userName = gHostRFUtgtUnameBuffer, .fastSearchParent_flag = TRUE, .linkRecovery_enable = FALSE, - .linkRecovery_period = 600, + .linkRecovery_period = 600, .NI_failCounter_limit = 0x12c }; @@ -157,8 +157,8 @@ static const struct BlockRequest sBlockRequests[] = { static const u16 sAcceptedSerialNos[] = { 0x0002, - RFU_SERIAL_7F7D, - 0x0000, + RFU_SERIAL_7F7D, + 0x0000, 0xFFFF }; @@ -1554,10 +1554,10 @@ static bool8 CheckForLeavingGroupMembers(void) bool8 memberLeft = FALSE; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.partnerSendStatuses[i] < RFU_STATUS_JOIN_GROUP_OK + if (Rfu.partnerSendStatuses[i] < RFU_STATUS_JOIN_GROUP_OK || Rfu.partnerSendStatuses[i] > RFU_STATUS_JOIN_GROUP_NO) { - if (gRfuSlotStatusNI[i]->recv.state == SLOT_STATE_RECV_SUCCESS + if (gRfuSlotStatusNI[i]->recv.state == SLOT_STATE_RECV_SUCCESS || gRfuSlotStatusNI[i]->recv.state == SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN) { if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_LEAVE_GROUP_NOTICE) @@ -1599,7 +1599,7 @@ bool32 sub_80105EC(void) } for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_10 + if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_10 || Rfu.partnerRecvStatuses[i] == RFU_STATUS_11) return TRUE; } @@ -1648,7 +1648,7 @@ static void UpdateChildStatuses(void) CheckForLeavingGroupMembers(); for (i = 0; i < RFU_CHILD_MAX; i++) { - if (gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_SUCCESS + if (gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_SUCCESS || gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_FAILED) { if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_10) @@ -1663,7 +1663,7 @@ static s32 sub_80107A0(void) s32 status = RFU_STATUS_OK; if (Rfu.unk_c85 == 8) { - if (gRfuSlotStatusNI[Rfu.childSlot]->send.state == SLOT_STATE_SEND_SUCCESS + if (gRfuSlotStatusNI[Rfu.childSlot]->send.state == SLOT_STATE_SEND_SUCCESS || gRfuSlotStatusNI[Rfu.childSlot]->send.state == SLOT_STATE_SEND_FAILED) rfu_clearSlot(TYPE_NI_SEND, Rfu.childSlot); } @@ -2671,7 +2671,7 @@ static void Task_RfuReconnectWithParent(u8 taskId) if (IsParentSuccessfullyReconnected()) DestroyTask(taskId); } - else if (GetHostRFUtgtGname()->activity == ACTIVITY_WONDER_CARD2 + else if (GetHostRFUtgtGname()->activity == ACTIVITY_WONDER_CARD2 || GetHostRFUtgtGname()->activity == ACTIVITY_WONDER_NEWS2) { data[15]++; diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index 251b4792dd..50828f6560 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -36,82 +36,82 @@ static const u32 sWirelessLinkIconPic[] = INCBIN_U32("graphics/interface/wireles // Most of the below two tables won't make sense with ASCII encoding. static const u8 sWireless_ASCIItoRSETable[256] = { - EOS, + EOS, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, - [' '] = CHAR_SPACE, - ['!'] = CHAR_EXCL_MARK, + [' '] = CHAR_SPACE, + ['!'] = CHAR_EXCL_MARK, 0xb5, 0xb6, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0xf1, 0x00, - ['-'] = CHAR_HYPHEN, - ['.'] = CHAR_PERIOD, + ['-'] = CHAR_HYPHEN, + ['.'] = CHAR_PERIOD, ['/'] = CHAR_SLASH, ['0'] = CHAR_0, - ['1'] = CHAR_1, - ['2'] = CHAR_2, - ['3'] = CHAR_3, - ['4'] = CHAR_4, - ['5'] = CHAR_5, - ['6'] = CHAR_6, + ['1'] = CHAR_1, + ['2'] = CHAR_2, + ['3'] = CHAR_3, + ['4'] = CHAR_4, + ['5'] = CHAR_5, + ['6'] = CHAR_6, ['7'] = CHAR_7, - ['8'] = CHAR_8, - ['9'] = CHAR_9, - 0x00, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0x00, - ['A'] = CHAR_A, - ['B'] = CHAR_B, - ['C'] = CHAR_C, - ['D'] = CHAR_D, - ['E'] = CHAR_E, - ['F'] = CHAR_F, + ['8'] = CHAR_8, + ['9'] = CHAR_9, + 0x00, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0x00, + ['A'] = CHAR_A, + ['B'] = CHAR_B, + ['C'] = CHAR_C, + ['D'] = CHAR_D, + ['E'] = CHAR_E, + ['F'] = CHAR_F, ['G'] = CHAR_G, - ['H'] = CHAR_H, - ['I'] = CHAR_I, - ['J'] = CHAR_J, - ['K'] = CHAR_K, - ['L'] = CHAR_L, - ['M'] = CHAR_M, - ['N'] = CHAR_N, + ['H'] = CHAR_H, + ['I'] = CHAR_I, + ['J'] = CHAR_J, + ['K'] = CHAR_K, + ['L'] = CHAR_L, + ['M'] = CHAR_M, + ['N'] = CHAR_N, ['O'] = CHAR_O, - ['P'] = CHAR_P, - ['Q'] = CHAR_Q, - ['R'] = CHAR_R, - ['S'] = CHAR_S, - ['T'] = CHAR_T, - ['U'] = CHAR_U, + ['P'] = CHAR_P, + ['Q'] = CHAR_Q, + ['R'] = CHAR_R, + ['S'] = CHAR_S, + ['T'] = CHAR_T, + ['U'] = CHAR_U, ['V'] = CHAR_V, ['W'] = CHAR_W, - ['X'] = CHAR_X, - ['Y'] = CHAR_Y, - ['Z'] = CHAR_Z, - 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0x00, - ['a'] = CHAR_a, - ['b'] = CHAR_b, - ['c'] = CHAR_c, - ['d'] = CHAR_d, - ['e'] = CHAR_e, - ['f'] = CHAR_f, + ['X'] = CHAR_X, + ['Y'] = CHAR_Y, + ['Z'] = CHAR_Z, + 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0x00, + ['a'] = CHAR_a, + ['b'] = CHAR_b, + ['c'] = CHAR_c, + ['d'] = CHAR_d, + ['e'] = CHAR_e, + ['f'] = CHAR_f, ['g'] = CHAR_g, - ['h'] = CHAR_h, - ['i'] = CHAR_i, - ['j'] = CHAR_j, - ['k'] = CHAR_k, - ['l'] = CHAR_l, - ['m'] = CHAR_m, - ['n'] = CHAR_n, + ['h'] = CHAR_h, + ['i'] = CHAR_i, + ['j'] = CHAR_j, + ['k'] = CHAR_k, + ['l'] = CHAR_l, + ['m'] = CHAR_m, + ['n'] = CHAR_n, ['o'] = CHAR_o, - ['p'] = CHAR_p, - ['q'] = CHAR_q, - ['r'] = CHAR_r, - ['s'] = CHAR_s, - ['t'] = CHAR_t, - ['u'] = CHAR_u, - ['v'] = CHAR_v, + ['p'] = CHAR_p, + ['q'] = CHAR_q, + ['r'] = CHAR_r, + ['s'] = CHAR_s, + ['t'] = CHAR_t, + ['u'] = CHAR_u, + ['v'] = CHAR_v, ['w'] = CHAR_w, - ['x'] = CHAR_x, - ['y'] = CHAR_y, - ['z'] = CHAR_z, + ['x'] = CHAR_x, + ['y'] = CHAR_y, + ['z'] = CHAR_z, 0x2d, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x50, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, @@ -132,102 +132,102 @@ static const u8 sWireless_ASCIItoRSETable[256] = { }; static const u8 sWireless_RSEtoASCIITable[256] = { - [CHAR_SPACE] = ' ', - 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, - 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, - 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, - 0x9e, 0x9f, 0xa0, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, - 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, - 0xed, 0xee, 0xef, 0xf0, 0x7b, 0xf1, 0x7c, 0x7d, - 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x07, 0x08, - 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x84, - 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, - 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, - 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, - 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, - 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, - 0xd9, 0xda, 0xdb, 0xdc, 0xa6, 0xdd, 0xa7, 0xa8, - 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xf2, 0xf3, - 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, - 0xfc, 0xfd, 0xfe, 0xff, 0x01, 0x02, 0x03, 0x04, - 0x05, 0x06, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0xaf, - [CHAR_0] = '0', - [CHAR_1] = '1', - [CHAR_2] = '2', - [CHAR_3] = '3', - [CHAR_4] = '4', - [CHAR_5] = '5', + [CHAR_SPACE] = ' ', + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, + 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, + 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, + 0x9e, 0x9f, 0xa0, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, + 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, + 0xed, 0xee, 0xef, 0xf0, 0x7b, 0xf1, 0x7c, 0x7d, + 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, + 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x84, + 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, + 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, + 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, + 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, + 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, + 0xd9, 0xda, 0xdb, 0xdc, 0xa6, 0xdd, 0xa7, 0xa8, + 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xf2, 0xf3, + 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, + 0xfc, 0xfd, 0xfe, 0xff, 0x01, 0x02, 0x03, 0x04, + 0x05, 0x06, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0xaf, + [CHAR_0] = '0', + [CHAR_1] = '1', + [CHAR_2] = '2', + [CHAR_3] = '3', + [CHAR_4] = '4', + [CHAR_5] = '5', [CHAR_6] = '6', - [CHAR_7] = '7', - [CHAR_8] = '8', - [CHAR_9] = '9', - [CHAR_EXCL_MARK] = '!', - 0xdf, 0xa1, 0xb0, 0xa5, 0xde, 0x24, 0x2a, - 0xa2, 0xa3, 0x22, 0x23, 0x20, 0xa4, 0x20, - [CHAR_SLASH] = '/', - [CHAR_A] = 'A', - [CHAR_B] = 'B', - [CHAR_C] = 'C', - [CHAR_D] = 'D', + [CHAR_7] = '7', + [CHAR_8] = '8', + [CHAR_9] = '9', + [CHAR_EXCL_MARK] = '!', + 0xdf, 0xa1, 0xb0, 0xa5, 0xde, 0x24, 0x2a, + 0xa2, 0xa3, 0x22, 0x23, 0x20, 0xa4, 0x20, + [CHAR_SLASH] = '/', + [CHAR_A] = 'A', + [CHAR_B] = 'B', + [CHAR_C] = 'C', + [CHAR_D] = 'D', [CHAR_E] = 'E', - [CHAR_F] = 'F', - [CHAR_G] = 'G', - [CHAR_H] = 'H', - [CHAR_I] = 'I', - [CHAR_J] = 'J', - [CHAR_K] = 'K', - [CHAR_L] = 'L', + [CHAR_F] = 'F', + [CHAR_G] = 'G', + [CHAR_H] = 'H', + [CHAR_I] = 'I', + [CHAR_J] = 'J', + [CHAR_K] = 'K', + [CHAR_L] = 'L', [CHAR_M] = 'M', - [CHAR_N] = 'N', - [CHAR_O] = 'O', - [CHAR_P] = 'P', - [CHAR_Q] = 'Q', - [CHAR_R] = 'R', - [CHAR_S] = 'S', - [CHAR_T] = 'T', + [CHAR_N] = 'N', + [CHAR_O] = 'O', + [CHAR_P] = 'P', + [CHAR_Q] = 'Q', + [CHAR_R] = 'R', + [CHAR_S] = 'S', + [CHAR_T] = 'T', [CHAR_U] = 'U', - [CHAR_V] = 'V', - [CHAR_W] = 'W', - [CHAR_X] = 'X', - [CHAR_Y] = 'Y', - [CHAR_Z] = 'Z', - [CHAR_a] = 'a', - [CHAR_b] = 'b', + [CHAR_V] = 'V', + [CHAR_W] = 'W', + [CHAR_X] = 'X', + [CHAR_Y] = 'Y', + [CHAR_Z] = 'Z', + [CHAR_a] = 'a', + [CHAR_b] = 'b', [CHAR_c] = 'c', - [CHAR_d] = 'd', - [CHAR_e] = 'e', - [CHAR_f] = 'f', - [CHAR_g] = 'g', - [CHAR_h] = 'h', - [CHAR_i] = 'i', - [CHAR_j] = 'j', + [CHAR_d] = 'd', + [CHAR_e] = 'e', + [CHAR_f] = 'f', + [CHAR_g] = 'g', + [CHAR_h] = 'h', + [CHAR_i] = 'i', + [CHAR_j] = 'j', [CHAR_k] = 'k', - [CHAR_l] = 'l', - [CHAR_m] = 'm', - [CHAR_n] = 'n', - [CHAR_o] = 'o', - [CHAR_p] = 'p', - [CHAR_q] = 'q', - [CHAR_r] = 'r', + [CHAR_l] = 'l', + [CHAR_m] = 'm', + [CHAR_n] = 'n', + [CHAR_o] = 'o', + [CHAR_p] = 'p', + [CHAR_q] = 'q', + [CHAR_r] = 'r', [CHAR_s] = 's', - [CHAR_t] = 't', - [CHAR_u] = 'u', - [CHAR_v] = 'v', - [CHAR_w] = 'w', - [CHAR_x] = 'x', - [CHAR_y] = 'y', - [CHAR_z] = 'z', - 0x20, 0x20, 0x2b, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + [CHAR_t] = 't', + [CHAR_u] = 'u', + [CHAR_v] = 'v', + [CHAR_w] = 'w', + [CHAR_x] = 'x', + [CHAR_y] = 'y', + [CHAR_z] = 'z', + 0x20, 0x20, 0x2b, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, [CHAR_DYNAMIC] = ' ', - [CHAR_KEYPAD_ICON] = ' ', - [CHAR_EXTRA_SYMBOL] = ' ', - [CHAR_PROMPT_SCROLL] = ' ', - [CHAR_PROMPT_CLEAR] = ' ', - [EXT_CTRL_CODE_BEGIN] = ' ', - [PLACEHOLDER_BEGIN] = ' ', - [CHAR_NEWLINE] = ' ', + [CHAR_KEYPAD_ICON] = ' ', + [CHAR_EXTRA_SYMBOL] = ' ', + [CHAR_PROMPT_SCROLL] = ' ', + [CHAR_PROMPT_CLEAR] = ' ', + [EXT_CTRL_CODE_BEGIN] = ' ', + [PLACEHOLDER_BEGIN] = ' ', + [CHAR_NEWLINE] = ' ', [EOS] = 0 }; diff --git a/src/mail.c b/src/mail.c index 0ee294787c..50ff553aa3 100644 --- a/src/mail.c +++ b/src/mail.c @@ -134,98 +134,98 @@ static const u16 sBgColors[GENDER_COUNT][2] = { static const struct MailGraphics sMailGraphics[] = { [ITEM_TO_MAIL(ITEM_ORANGE_MAIL)] = { - .palette = gMailPalette_Orange, - .tiles = gMailTiles_Orange, - .tileMap = gMailTilemap_Orange, - .unused = 0x2C0, + .palette = gMailPalette_Orange, + .tiles = gMailTiles_Orange, + .tileMap = gMailTilemap_Orange, + .unused = 0x2C0, .textColor = RGB(10, 10, 10), .textShadow = RGB(25, 25, 25), - }, + }, [ITEM_TO_MAIL(ITEM_HARBOR_MAIL)] = { - .palette = gMailPalette_Harbor, - .tiles = gMailTiles_Harbor, - .tileMap = gMailTilemap_Harbor, - .unused = 0x2E0, + .palette = gMailPalette_Harbor, + .tiles = gMailTiles_Harbor, + .tileMap = gMailTilemap_Harbor, + .unused = 0x2E0, .textColor = RGB_WHITE, .textShadow = RGB(17, 17, 17), }, [ITEM_TO_MAIL(ITEM_GLITTER_MAIL)] = { - .palette = gMailPalette_Glitter, - .tiles = gMailTiles_Glitter, - .tileMap = gMailTilemap_Glitter, - .unused = 0x400, + .palette = gMailPalette_Glitter, + .tiles = gMailTiles_Glitter, + .tileMap = gMailTilemap_Glitter, + .unused = 0x400, .textColor = RGB(10, 10, 10), .textShadow = RGB(25, 25, 25), - }, + }, [ITEM_TO_MAIL(ITEM_MECH_MAIL)] = { - .palette = gMailPalette_Mech, - .tiles = gMailTiles_Mech, - .tileMap = gMailTilemap_Mech, - .unused = 0x1E0, + .palette = gMailPalette_Mech, + .tiles = gMailTiles_Mech, + .tileMap = gMailTilemap_Mech, + .unused = 0x1E0, .textColor = RGB_WHITE, .textShadow = RGB(17, 17, 17), - }, + }, [ITEM_TO_MAIL(ITEM_WOOD_MAIL)] = { - .palette = gMailPalette_Wood, - .tiles = gMailTiles_Wood, - .tileMap = gMailTilemap_Wood, - .unused = 0x2E0, + .palette = gMailPalette_Wood, + .tiles = gMailTiles_Wood, + .tileMap = gMailTilemap_Wood, + .unused = 0x2E0, .textColor = RGB_WHITE, .textShadow = RGB(17, 17, 17), - }, + }, [ITEM_TO_MAIL(ITEM_WAVE_MAIL)] = { - .palette = gMailPalette_Wave, - .tiles = gMailTiles_Wave, - .tileMap = gMailTilemap_Wave, - .unused = 0x300, + .palette = gMailPalette_Wave, + .tiles = gMailTiles_Wave, + .tileMap = gMailTilemap_Wave, + .unused = 0x300, .textColor = RGB(10, 10, 10), .textShadow = RGB(25, 25, 25), - }, + }, [ITEM_TO_MAIL(ITEM_BEAD_MAIL)] = { - .palette = gMailPalette_Bead, - .tiles = gMailTiles_Bead, - .tileMap = gMailTilemap_Bead, - .unused = 0x140, + .palette = gMailPalette_Bead, + .tiles = gMailTiles_Bead, + .tileMap = gMailTilemap_Bead, + .unused = 0x140, .textColor = RGB_WHITE, .textShadow = RGB(17, 17, 17), - }, + }, [ITEM_TO_MAIL(ITEM_SHADOW_MAIL)] = { - .palette = gMailPalette_Shadow, - .tiles = gMailTiles_Shadow, - .tileMap = gMailTilemap_Shadow, - .unused = 0x300, + .palette = gMailPalette_Shadow, + .tiles = gMailTiles_Shadow, + .tileMap = gMailTilemap_Shadow, + .unused = 0x300, .textColor = RGB_WHITE, .textShadow = RGB(17, 17, 17), - }, + }, [ITEM_TO_MAIL(ITEM_TROPIC_MAIL)] = { - .palette = gMailPalette_Tropic, - .tiles = gMailTiles_Tropic, - .tileMap = gMailTilemap_Tropic, - .unused = 0x220, + .palette = gMailPalette_Tropic, + .tiles = gMailTiles_Tropic, + .tileMap = gMailTilemap_Tropic, + .unused = 0x220, .textColor = RGB(10, 10, 10), .textShadow = RGB(25, 25, 25), - }, + }, [ITEM_TO_MAIL(ITEM_DREAM_MAIL)] = { - .palette = gMailPalette_Dream, - .tiles = gMailTiles_Dream, - .tileMap = gMailTilemap_Dream, - .unused = 0x340, + .palette = gMailPalette_Dream, + .tiles = gMailTiles_Dream, + .tileMap = gMailTilemap_Dream, + .unused = 0x340, .textColor = RGB(10, 10, 10), .textShadow = RGB(25, 25, 25), - }, + }, [ITEM_TO_MAIL(ITEM_FAB_MAIL)] = { - .palette = gMailPalette_Fab, - .tiles = gMailTiles_Fab, - .tileMap = gMailTilemap_Fab, - .unused = 0x2a0, + .palette = gMailPalette_Fab, + .tiles = gMailTiles_Fab, + .tileMap = gMailTilemap_Fab, + .unused = 0x2a0, .textColor = RGB(10, 10, 10), .textShadow = RGB(25, 25, 25), - }, + }, [ITEM_TO_MAIL(ITEM_RETRO_MAIL)] = { - .palette = gMailPalette_Retro, - .tiles = gMailTiles_Retro, - .tileMap = gMailTilemap_Retro, - .unused = 0x520, + .palette = gMailPalette_Retro, + .tiles = gMailTiles_Retro, + .tileMap = gMailTilemap_Retro, + .unused = 0x520, .textColor = RGB(10, 10, 10), .textShadow = RGB(25, 25, 25), } @@ -238,7 +238,7 @@ static const struct MailLineLayout sLineLayouts_Wide[] = { }; static const struct MailLayout sMailLayouts_Wide[] = { - [ITEM_TO_MAIL(ITEM_ORANGE_MAIL)] = { + [ITEM_TO_MAIL(ITEM_ORANGE_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -246,7 +246,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_HARBOR_MAIL)] = { + [ITEM_TO_MAIL(ITEM_HARBOR_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -254,7 +254,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_GLITTER_MAIL)] = { + [ITEM_TO_MAIL(ITEM_GLITTER_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -262,7 +262,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_MECH_MAIL)] = { + [ITEM_TO_MAIL(ITEM_MECH_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -270,7 +270,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_WOOD_MAIL)] = { + [ITEM_TO_MAIL(ITEM_WOOD_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -278,7 +278,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_WAVE_MAIL)] = { + [ITEM_TO_MAIL(ITEM_WAVE_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -286,7 +286,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_BEAD_MAIL)] = { + [ITEM_TO_MAIL(ITEM_BEAD_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -294,7 +294,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_SHADOW_MAIL)] = { + [ITEM_TO_MAIL(ITEM_SHADOW_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -302,7 +302,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_TROPIC_MAIL)] = { + [ITEM_TO_MAIL(ITEM_TROPIC_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -310,7 +310,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_DREAM_MAIL)] = { + [ITEM_TO_MAIL(ITEM_DREAM_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -318,7 +318,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_FAB_MAIL)] = { + [ITEM_TO_MAIL(ITEM_FAB_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 8, .signatureWidth = 0, @@ -326,7 +326,7 @@ static const struct MailLayout sMailLayouts_Wide[] = { .wordsXPos = 4, .lines = sLineLayouts_Wide, }, - [ITEM_TO_MAIL(ITEM_RETRO_MAIL)] = { + [ITEM_TO_MAIL(ITEM_RETRO_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Wide), .signatureYPos = 0, .signatureWidth = 0, @@ -345,7 +345,7 @@ static const struct MailLineLayout sLineLayouts_Tall[] = { }; static const struct MailLayout sMailLayouts_Tall[] = { - [ITEM_TO_MAIL(ITEM_ORANGE_MAIL)] = { + [ITEM_TO_MAIL(ITEM_ORANGE_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 7, .signatureWidth = 88, @@ -353,7 +353,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_HARBOR_MAIL)] = { + [ITEM_TO_MAIL(ITEM_HARBOR_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 10, .signatureWidth = 96, @@ -361,7 +361,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_GLITTER_MAIL)] = { + [ITEM_TO_MAIL(ITEM_GLITTER_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 12, .signatureWidth = 104, @@ -369,7 +369,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_MECH_MAIL)] = { + [ITEM_TO_MAIL(ITEM_MECH_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 5, .signatureWidth = 96, @@ -377,7 +377,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_WOOD_MAIL)] = { + [ITEM_TO_MAIL(ITEM_WOOD_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 10, .signatureWidth = 96, @@ -385,7 +385,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_WAVE_MAIL)] = { + [ITEM_TO_MAIL(ITEM_WAVE_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 9, .signatureWidth = 112, @@ -393,7 +393,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_BEAD_MAIL)] = { + [ITEM_TO_MAIL(ITEM_BEAD_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 12, .signatureWidth = 104, @@ -401,7 +401,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_SHADOW_MAIL)] = { + [ITEM_TO_MAIL(ITEM_SHADOW_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 13, .signatureWidth = 104, @@ -409,7 +409,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_TROPIC_MAIL)] = { + [ITEM_TO_MAIL(ITEM_TROPIC_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 9, .signatureWidth = 96, @@ -417,7 +417,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_DREAM_MAIL)] = { + [ITEM_TO_MAIL(ITEM_DREAM_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 9, .signatureWidth = 96, @@ -425,7 +425,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_FAB_MAIL)] = { + [ITEM_TO_MAIL(ITEM_FAB_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 17, .signatureWidth = 104, @@ -433,7 +433,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { .wordsXPos = 30, .lines = sLineLayouts_Tall, }, - [ITEM_TO_MAIL(ITEM_RETRO_MAIL)] = { + [ITEM_TO_MAIL(ITEM_RETRO_MAIL)] = { .numLines = ARRAY_COUNT(sLineLayouts_Tall), .signatureYPos = 9, .signatureWidth = 96, diff --git a/src/main_menu.c b/src/main_menu.c index ec5a3785fd..3248c189fe 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -40,17 +40,17 @@ /* * Main menu state machine * ----------------------- - * + * * Entry point: CB2_InitMainMenu - * + * * Note: States advance sequentially unless otherwise stated. - * + * * CB2_InitMainMenu / CB2_ReinitMainMenu * - Both of these states call InitMainMenu, which does all the work. * - In the Reinit case, the init code will check if the user came from * the options screen. If they did, then the options menu item is * pre-selected. - * + * * Task_MainMenuCheckSaveFile * - Determines how many menu options to show based on whether * the save file is Ok, empty, corrupted, etc. @@ -59,33 +59,33 @@ * - If there were no errors, advance to Task_MainMenuCheckBattery. * - Note that the check to enable Mystery Events would normally happen * here, but this version of Emerald has them disabled. - * + * * Task_WaitForSaveFileErrorWindow * - Wait for the text to finish printing and then for the A button * to be pressed. - * + * * Task_MainMenuCheckBattery * - If the battery is OK, advance to Task_DisplayMainMenu. * - If the battery is dry, advance to Task_WaitForBatteryDryErrorWindow. - * + * * Task_WaitForBatteryDryErrorWindow * - Wait for the text to finish printing and then for the A button * to be pressed. - * + * * Task_DisplayMainWindow * - Display the buttons to the user. If the menu is in HAS_MYSTERY_EVENTS * mode, there are too many buttons for one screen and a scrollbar is added, * and the scrollbar task is spawned (Task_ScrollIndicatorArrowPairOnMainMenu). - * + * * Task_HighlightSelectedMainMenuItem * - Update the UI to match the currently selected item. - * + * * Task_HandleMainMenuInput * - If A is pressed, advance to Task_HandleMainMenuAPressed. * - If B is pressed, return to the title screen via CB2_InitTitleScreen. * - If Up or Down is pressed, handle scrolling if there is a scroll bar, change * the selection, then go back to Task_HighlightSelectedMainMenuItem. - * + * * Task_HandleMainMenuAPressed * - If the user selected New Game, advance to Task_NewGameBirchSpeech_Init. * - If the user selected Continue, advance to CB2_ContinueSavedGame. @@ -95,15 +95,15 @@ * Task_DisplayMainMenuInvalidActionError. * - Code to start a Mystery Event is present here, but is unreachable in this * version. - * + * * Task_HandleMainMenuBPressed * - Clean up the main menu and go back to CB2_InitTitleScreen. - * + * * Task_DisplayMainMenuInvalidActionError * - Print one of three different error messages, wait for the text to stop * printing, and then wait for A or B to be pressed. * - Then advance to Task_HandleMainMenuBPressed. - * + * * Task_NewGameBirchSpeechInit * - Load the sprites for the intro speech, start playing music * Task_NewGameBirchSpeech_WaitToShowBirch @@ -126,11 +126,11 @@ * - Animates by advancing to Task_NewGameBirchSpeech_SlideOutOldGenderSprite * whenever the player's selection changes. * - Advances to Task_NewGameBirchSpeech_WhatsYourName when done. - * + * * Task_NewGameBirchSpeech_SlideOutOldGenderSprite * Task_NewGameBirchSpeech_SlideInNewGenderSprite * - Returns back to Task_NewGameBirchSpeech_ChooseGender. - * + * * Task_NewGameBirchSpeech_WhatsYourName * Task_NewGameBirchSpeech_WaitForWhatsYourNameToPrint * Task_NewGameBirchSpeech_WaitPressBeforeNameChoice @@ -144,7 +144,7 @@ * Task_NewGameBirchSpeech_ProcessNameYesNoMenu * - If confirmed, advance to Task_NewGameBirchSpeech_SlidePlatformAway2. * - Otherwise, return to Task_NewGameBirchSpeech_BoyOrGirl. - * + * * Task_NewGameBirchSpeech_SlidePlatformAway2 * Task_NewGameBirchSpeech_ReshowBirchLotad * Task_NewGameBirchSpeech_WaitForSpriteFadeInAndTextPrinter @@ -154,7 +154,7 @@ * Task_NewGameBirchSpeech_FadePlayerToWhite * Task_NewGameBirchSpeech_Cleanup * - Advances to CB2_NewGame. - * + * * Task_NewGameBirchSpeechSub_InitPokeball * - Advances to Task_NewGameBirchSpeechSub_WaitForLotad * Task_NewGameBirchSpeechSub_WaitForLotad diff --git a/src/match_call.c b/src/match_call.c index fd0db630c4..b71fc83220 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1051,8 +1051,8 @@ static bool32 CheckMatchCallChance(void) int callChance = 1; if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG) && GetMonAbility(&gPlayerParty[0]) == ABILITY_LIGHTNING_ROD) callChance = 2; - - if (Random() % 10 < callChance * 3) + + if (Random() % 10 < callChance * 3) return TRUE; else return FALSE; @@ -1062,7 +1062,7 @@ static bool32 MapAllowsMatchCall(void) { if (!Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType) || gMapHeader.regionMapSectionId == MAPSEC_SAFARI_ZONE) return FALSE; - + if (gMapHeader.regionMapSectionId == MAPSEC_SOOTOPOLIS_CITY && FlagGet(FLAG_HIDE_SOOTOPOLIS_CITY_RAYQUAZA) == TRUE && FlagGet(FLAG_NEVER_SET_0x0DC) == FALSE) @@ -1312,7 +1312,7 @@ static bool32 MatchCall_PrintIntro(u8 taskId) if (!RunMatchCallTextPrinter(tWindowId)) { FillWindowPixelBuffer(tWindowId, PIXEL_FILL(8)); - + // Ready the message if (!sMatchCallState.triggeredFromScript) SelectMatchCallMessage(sMatchCallState.trainerId, gStringVar4); @@ -1569,7 +1569,7 @@ static const struct MatchCallText *GetBattleMatchCallText(int matchCallId, u8 *s { int mask; u32 textId, topic, id; - + topic = Random() % 3; textId = sMatchCallTrainers[matchCallId].battleTopicTextIds[topic]; if (!textId) @@ -1833,7 +1833,7 @@ static void PopulateBattleFrontierStreak(int matchCallId, u8 *destStr) streak /= 10; i++; } - + ConvertIntToDecimalStringN(destStr, sBattleFrontierStreakInfo.streak, STR_CONV_MODE_LEFT_ALIGN, i); } @@ -2022,7 +2022,7 @@ static u8 GetPokedexRatingLevel(u16 numSeen) return 18; if (numSeen < 200) return 19; - + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT)) numSeen--; if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT)) diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 239639e0b6..8de9fc3c9a 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -914,219 +914,219 @@ struct Story static const struct Story sStorytellerStories[] = { // The 50 below is replaced with GAME_STAT_SAVED_GAME { - 50, 1, - MauvilleCity_PokemonCenter_1F_Text_SavedGameTitle, - MauvilleCity_PokemonCenter_1F_Text_SavedGameAction, + 50, 1, + MauvilleCity_PokemonCenter_1F_Text_SavedGameTitle, + MauvilleCity_PokemonCenter_1F_Text_SavedGameAction, MauvilleCity_PokemonCenter_1F_Text_SavedGameStory }, { - GAME_STAT_STARTED_TRENDS, 1, - MauvilleCity_PokemonCenter_1F_Text_TrendsStartedTitle, - MauvilleCity_PokemonCenter_1F_Text_TrendsStartedAction, + GAME_STAT_STARTED_TRENDS, 1, + MauvilleCity_PokemonCenter_1F_Text_TrendsStartedTitle, + MauvilleCity_PokemonCenter_1F_Text_TrendsStartedAction, MauvilleCity_PokemonCenter_1F_Text_TrendsStartedStory }, { - GAME_STAT_PLANTED_BERRIES, 1, - MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedTitle, - MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedAction, + GAME_STAT_PLANTED_BERRIES, 1, + MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedTitle, + MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedAction, MauvilleCity_PokemonCenter_1F_Text_BerriesPlantedStory }, { - GAME_STAT_TRADED_BIKES, 1, - MauvilleCity_PokemonCenter_1F_Text_BikeTradesTitle, - MauvilleCity_PokemonCenter_1F_Text_BikeTradesAction, + GAME_STAT_TRADED_BIKES, 1, + MauvilleCity_PokemonCenter_1F_Text_BikeTradesTitle, + MauvilleCity_PokemonCenter_1F_Text_BikeTradesAction, MauvilleCity_PokemonCenter_1F_Text_BikeTradesStory }, { - GAME_STAT_GOT_INTERVIEWED, 1, - MauvilleCity_PokemonCenter_1F_Text_InterviewsTitle, - MauvilleCity_PokemonCenter_1F_Text_InterviewsAction, + GAME_STAT_GOT_INTERVIEWED, 1, + MauvilleCity_PokemonCenter_1F_Text_InterviewsTitle, + MauvilleCity_PokemonCenter_1F_Text_InterviewsAction, MauvilleCity_PokemonCenter_1F_Text_InterviewsStory }, { - GAME_STAT_TRAINER_BATTLES, 1, - MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesTitle, - MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesAction, + GAME_STAT_TRAINER_BATTLES, 1, + MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesTitle, + MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesAction, MauvilleCity_PokemonCenter_1F_Text_TrainerBattlesStory }, { - GAME_STAT_POKEMON_CAPTURES, 1, - MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtTitle, - MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtAction, + GAME_STAT_POKEMON_CAPTURES, 1, + MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtTitle, + MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtAction, MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtStory }, { - GAME_STAT_FISHING_CAPTURES, 1, - MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtTitle, - MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtAction, + GAME_STAT_FISHING_CAPTURES, 1, + MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtTitle, + MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtAction, MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtStory }, { - GAME_STAT_HATCHED_EGGS, 1, - MauvilleCity_PokemonCenter_1F_Text_EggsHatchedTitle, - MauvilleCity_PokemonCenter_1F_Text_EggsHatchedAction, + GAME_STAT_HATCHED_EGGS, 1, + MauvilleCity_PokemonCenter_1F_Text_EggsHatchedTitle, + MauvilleCity_PokemonCenter_1F_Text_EggsHatchedAction, MauvilleCity_PokemonCenter_1F_Text_EggsHatchedStory }, { - GAME_STAT_EVOLVED_POKEMON, 1, - MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedTitle, - MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedAction, + GAME_STAT_EVOLVED_POKEMON, 1, + MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedTitle, + MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedAction, MauvilleCity_PokemonCenter_1F_Text_PokemonEvolvedStory }, { - GAME_STAT_USED_POKECENTER, 1, - MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterTitle, - MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterAction, + GAME_STAT_USED_POKECENTER, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterAction, MauvilleCity_PokemonCenter_1F_Text_UsedPokemonCenterStory }, { - GAME_STAT_RESTED_AT_HOME, 1, - MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeTitle, - MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeAction, + GAME_STAT_RESTED_AT_HOME, 1, + MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeTitle, + MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeAction, MauvilleCity_PokemonCenter_1F_Text_RestedAtHomeStory }, { - GAME_STAT_ENTERED_SAFARI_ZONE, 1, - MauvilleCity_PokemonCenter_1F_Text_SafariGamesTitle, - MauvilleCity_PokemonCenter_1F_Text_SafariGamesAction, + GAME_STAT_ENTERED_SAFARI_ZONE, 1, + MauvilleCity_PokemonCenter_1F_Text_SafariGamesTitle, + MauvilleCity_PokemonCenter_1F_Text_SafariGamesAction, MauvilleCity_PokemonCenter_1F_Text_SafariGamesStory }, { - GAME_STAT_USED_CUT, 1, - MauvilleCity_PokemonCenter_1F_Text_UsedCutTitle, - MauvilleCity_PokemonCenter_1F_Text_UsedCutAction, + GAME_STAT_USED_CUT, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedCutTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedCutAction, MauvilleCity_PokemonCenter_1F_Text_UsedCutStory }, { - GAME_STAT_USED_ROCK_SMASH, 1, - MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashTitle, - MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashAction, + GAME_STAT_USED_ROCK_SMASH, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashAction, MauvilleCity_PokemonCenter_1F_Text_UsedRockSmashStory }, { - GAME_STAT_MOVED_SECRET_BASE, 1, - MauvilleCity_PokemonCenter_1F_Text_MovedBasesTitle, - MauvilleCity_PokemonCenter_1F_Text_MovedBasesAction, + GAME_STAT_MOVED_SECRET_BASE, 1, + MauvilleCity_PokemonCenter_1F_Text_MovedBasesTitle, + MauvilleCity_PokemonCenter_1F_Text_MovedBasesAction, MauvilleCity_PokemonCenter_1F_Text_MovedBasesStory }, { - GAME_STAT_USED_SPLASH, 1, - MauvilleCity_PokemonCenter_1F_Text_UsedSplashTitle, - MauvilleCity_PokemonCenter_1F_Text_UsedSplashAction, + GAME_STAT_USED_SPLASH, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedSplashTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedSplashAction, MauvilleCity_PokemonCenter_1F_Text_UsedSplashStory }, { - GAME_STAT_USED_STRUGGLE, 1, - MauvilleCity_PokemonCenter_1F_Text_UsedStruggleTitle, - MauvilleCity_PokemonCenter_1F_Text_UsedStruggleAction, + GAME_STAT_USED_STRUGGLE, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedStruggleTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedStruggleAction, MauvilleCity_PokemonCenter_1F_Text_UsedStruggleStory }, { - GAME_STAT_SLOT_JACKPOTS, 1, - MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsTitle, - MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsAction, + GAME_STAT_SLOT_JACKPOTS, 1, + MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsTitle, + MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsAction, MauvilleCity_PokemonCenter_1F_Text_SlotJackpotsStory }, { - GAME_STAT_CONSECUTIVE_ROULETTE_WINS, 2, - MauvilleCity_PokemonCenter_1F_Text_RouletteWinsTitle, - MauvilleCity_PokemonCenter_1F_Text_RouletteWinsAction, + GAME_STAT_CONSECUTIVE_ROULETTE_WINS, 2, + MauvilleCity_PokemonCenter_1F_Text_RouletteWinsTitle, + MauvilleCity_PokemonCenter_1F_Text_RouletteWinsAction, MauvilleCity_PokemonCenter_1F_Text_RouletteWinsStory }, { - GAME_STAT_ENTERED_BATTLE_TOWER, 1, - MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesTitle, - MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesAction, + GAME_STAT_ENTERED_BATTLE_TOWER, 1, + MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesTitle, + MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesAction, MauvilleCity_PokemonCenter_1F_Text_BattleTowerChallengesStory }, { - GAME_STAT_POKEBLOCKS, 1, - MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksTitle, - MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksAction, + GAME_STAT_POKEBLOCKS, 1, + MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksTitle, + MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksAction, MauvilleCity_PokemonCenter_1F_Text_MadePokeblocksStory }, { - GAME_STAT_ENTERED_CONTEST, 1, - MauvilleCity_PokemonCenter_1F_Text_EnteredContestsTitle, - MauvilleCity_PokemonCenter_1F_Text_EnteredContestsAction, + GAME_STAT_ENTERED_CONTEST, 1, + MauvilleCity_PokemonCenter_1F_Text_EnteredContestsTitle, + MauvilleCity_PokemonCenter_1F_Text_EnteredContestsAction, MauvilleCity_PokemonCenter_1F_Text_EnteredContestsStory }, { - GAME_STAT_WON_CONTEST, 1, - MauvilleCity_PokemonCenter_1F_Text_WonContestsTitle, - MauvilleCity_PokemonCenter_1F_Text_WonContestsAction, + GAME_STAT_WON_CONTEST, 1, + MauvilleCity_PokemonCenter_1F_Text_WonContestsTitle, + MauvilleCity_PokemonCenter_1F_Text_WonContestsAction, MauvilleCity_PokemonCenter_1F_Text_WonContestsStory }, { - GAME_STAT_SHOPPED, 1, - MauvilleCity_PokemonCenter_1F_Text_TimesShoppedTitle, - MauvilleCity_PokemonCenter_1F_Text_TimesShoppedAction, + GAME_STAT_SHOPPED, 1, + MauvilleCity_PokemonCenter_1F_Text_TimesShoppedTitle, + MauvilleCity_PokemonCenter_1F_Text_TimesShoppedAction, MauvilleCity_PokemonCenter_1F_Text_TimesShoppedStory }, { - GAME_STAT_USED_ITEMFINDER, 1, - MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderTitle, - MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderAction, + GAME_STAT_USED_ITEMFINDER, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderAction, MauvilleCity_PokemonCenter_1F_Text_UsedItemFinderStory }, { - GAME_STAT_GOT_RAINED_ON, 1, - MauvilleCity_PokemonCenter_1F_Text_TimesRainedTitle, - MauvilleCity_PokemonCenter_1F_Text_TimesRainedAction, + GAME_STAT_GOT_RAINED_ON, 1, + MauvilleCity_PokemonCenter_1F_Text_TimesRainedTitle, + MauvilleCity_PokemonCenter_1F_Text_TimesRainedAction, MauvilleCity_PokemonCenter_1F_Text_TimesRainedStory }, { - GAME_STAT_CHECKED_POKEDEX, 1, - MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexTitle, - MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexAction, + GAME_STAT_CHECKED_POKEDEX, 1, + MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexTitle, + MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexAction, MauvilleCity_PokemonCenter_1F_Text_CheckedPokedexStory }, { - GAME_STAT_RECEIVED_RIBBONS, 1, - MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsTitle, - MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsAction, + GAME_STAT_RECEIVED_RIBBONS, 1, + MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsTitle, + MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsAction, MauvilleCity_PokemonCenter_1F_Text_ReceivedRibbonsStory }, { - GAME_STAT_JUMPED_DOWN_LEDGES, 1, - MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedTitle, - MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedAction, + GAME_STAT_JUMPED_DOWN_LEDGES, 1, + MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedTitle, + MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedAction, MauvilleCity_PokemonCenter_1F_Text_LedgesJumpedStory }, { - GAME_STAT_WATCHED_TV, 1, - MauvilleCity_PokemonCenter_1F_Text_TVWatchedTitle, - MauvilleCity_PokemonCenter_1F_Text_TVWatchedAction, + GAME_STAT_WATCHED_TV, 1, + MauvilleCity_PokemonCenter_1F_Text_TVWatchedTitle, + MauvilleCity_PokemonCenter_1F_Text_TVWatchedAction, MauvilleCity_PokemonCenter_1F_Text_TVWatchedStory }, { - GAME_STAT_CHECKED_CLOCK, 1, - MauvilleCity_PokemonCenter_1F_Text_CheckedClockTitle, - MauvilleCity_PokemonCenter_1F_Text_CheckedClockAction, + GAME_STAT_CHECKED_CLOCK, 1, + MauvilleCity_PokemonCenter_1F_Text_CheckedClockTitle, + MauvilleCity_PokemonCenter_1F_Text_CheckedClockAction, MauvilleCity_PokemonCenter_1F_Text_CheckedClockStory }, { - GAME_STAT_WON_POKEMON_LOTTERY, 1, - MauvilleCity_PokemonCenter_1F_Text_WonLotteryTitle, - MauvilleCity_PokemonCenter_1F_Text_WonLotteryAction, + GAME_STAT_WON_POKEMON_LOTTERY, 1, + MauvilleCity_PokemonCenter_1F_Text_WonLotteryTitle, + MauvilleCity_PokemonCenter_1F_Text_WonLotteryAction, MauvilleCity_PokemonCenter_1F_Text_WonLotteryStory }, { - GAME_STAT_USED_DAYCARE, 1, - MauvilleCity_PokemonCenter_1F_Text_UsedDaycareTitle, - MauvilleCity_PokemonCenter_1F_Text_UsedDaycareAction, + GAME_STAT_USED_DAYCARE, 1, + MauvilleCity_PokemonCenter_1F_Text_UsedDaycareTitle, + MauvilleCity_PokemonCenter_1F_Text_UsedDaycareAction, MauvilleCity_PokemonCenter_1F_Text_UsedDaycareStory }, { - GAME_STAT_RODE_CABLE_CAR, 1, - MauvilleCity_PokemonCenter_1F_Text_RodeCableCarTitle, - MauvilleCity_PokemonCenter_1F_Text_RodeCableCarAction, + GAME_STAT_RODE_CABLE_CAR, 1, + MauvilleCity_PokemonCenter_1F_Text_RodeCableCarTitle, + MauvilleCity_PokemonCenter_1F_Text_RodeCableCarAction, MauvilleCity_PokemonCenter_1F_Text_RodeCableCarStory }, { - GAME_STAT_ENTERED_HOT_SPRINGS, 1, - MauvilleCity_PokemonCenter_1F_Text_HotSpringsTitle, - MauvilleCity_PokemonCenter_1F_Text_HotSpringsAction, + GAME_STAT_ENTERED_HOT_SPRINGS, 1, + MauvilleCity_PokemonCenter_1F_Text_HotSpringsTitle, + MauvilleCity_PokemonCenter_1F_Text_HotSpringsAction, MauvilleCity_PokemonCenter_1F_Text_HotSpringsStory } }; diff --git a/src/menu.c b/src/menu.c index d289bb9326..de1468e3b6 100644 --- a/src/menu.c +++ b/src/menu.c @@ -62,11 +62,11 @@ static EWRAM_DATA void *sTempTileDataBuffer[0x20] = {NULL}; const u16 gUnknown_0860F074[] = INCBIN_U16("graphics/interface/860F074.gbapal"); -static const u8 sTextSpeedFrameDelays[] = -{ - [OPTIONS_TEXT_SPEED_SLOW] = 8, - [OPTIONS_TEXT_SPEED_MID] = 4, - [OPTIONS_TEXT_SPEED_FAST] = 1 +static const u8 sTextSpeedFrameDelays[] = +{ + [OPTIONS_TEXT_SPEED_SLOW] = 8, + [OPTIONS_TEXT_SPEED_MID] = 4, + [OPTIONS_TEXT_SPEED_FAST] = 1 }; static const struct WindowTemplate sStandardTextBox_WindowTemplates[] = diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 95b67f78c3..3317555908 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -280,7 +280,7 @@ bool8 IsHoldingItemAllowed(u16 itemId) // Enigma Berry can't be held in link areas if (itemId != ITEM_ENIGMA_BERRY) return TRUE; - else if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRADE_CENTER) + else if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRADE_CENTER) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRADE_CENTER)) return FALSE; else if (InUnionRoom() != TRUE) diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 2a9304a4d8..5c8b8ec512 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -631,11 +631,11 @@ bool8 MetatileBehavior_IsCableBoxResults1(u8 metatileBehavior) bool8 MetatileBehavior_IsOpenSecretBaseDoor(u8 metatileBehavior) { - if (metatileBehavior == MB_SECRET_BASE_SPOT_RED_CAVE_OPEN + if (metatileBehavior == MB_SECRET_BASE_SPOT_RED_CAVE_OPEN || metatileBehavior == MB_SECRET_BASE_SPOT_BROWN_CAVE_OPEN - || metatileBehavior == MB_SECRET_BASE_SPOT_YELLOW_CAVE_OPEN + || metatileBehavior == MB_SECRET_BASE_SPOT_YELLOW_CAVE_OPEN || metatileBehavior == MB_SECRET_BASE_SPOT_TREE_LEFT_OPEN - || metatileBehavior == MB_SECRET_BASE_SPOT_SHRUB_OPEN + || metatileBehavior == MB_SECRET_BASE_SPOT_SHRUB_OPEN || metatileBehavior == MB_SECRET_BASE_SPOT_BLUE_CAVE_OPEN || metatileBehavior == MB_SECRET_BASE_SPOT_TREE_RIGHT_OPEN) return TRUE; diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c index 8e546afc9a..cd29717321 100644 --- a/src/minigame_countdown.c +++ b/src/minigame_countdown.c @@ -453,7 +453,7 @@ static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId) case 1: if (sprite->sTimer == 0) PlaySE(SE_BALL_BOUNCE_2); - + if (++sprite->sTimer >= 20) { // Ready for jump diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 9b6d0d887b..5fbe328ac9 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -20,7 +20,7 @@ #include "constants/songs.h" #include "constants/metatile_labels.h" -struct MirageTowerPulseBlend +struct MirageTowerPulseBlend { u8 taskId; struct PulseBlend pulseBlend; @@ -764,7 +764,7 @@ static void UpdateDisintegrationEffect(u8* tiles, u16 randId, u8 c, u8 size, u8 col = width & 7; sDebug_DisintegrationData[2] = height & 7; sDebug_DisintegrationData[3] = width & 7; - + widthTiles = width / 8; heightTiles = height / 8; sDebug_DisintegrationData[4] = width / 8; @@ -772,11 +772,11 @@ static void UpdateDisintegrationEffect(u8* tiles, u16 randId, u8 c, u8 size, u8 var = (size / 8) * (heightTiles * 64) + (widthTiles * 64); sDebug_DisintegrationData[6] = var; - + baseOffset = var + ((row * 8) + col); baseOffset /= 2; sDebug_DisintegrationData[7] = var + ((row * 8) + col); - + flag = ((randId % 2) ^ 1); tileMask = (c << (flag << 2)) | 15 << (((flag ^ 1) << 2)); tiles[baseOffset + (offset * 32)] &= tileMask; diff --git a/src/move_relearner.c b/src/move_relearner.c index 9fa7bf11c0..1fa947eba5 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -28,9 +28,9 @@ /* * Move relearner state machine * ------------------------ - * + * * Entry point: TeachMoveRelearnerMove - * + * * TeachMoveRelearnerMove * Task_WaitForFadeOut * CB2_InitLearnMove @@ -45,21 +45,21 @@ * DoMoveRelearnerMain: MENU_STATE_FADE_TO_BLACK * DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_FADE * - Go to MENU_STATE_IDLE_BATTLE_MODE - * + * * DoMoveRelearnerMain: MENU_STATE_SETUP_BATTLE_MODE * DoMoveRelearnerMain: MENU_STATE_IDLE_BATTLE_MODE * - If the player selected a move (pressed A), go to MENU_STATE_PRINT_TEACH_MOVE_PROMPT. * - If the player cancelled (pressed B), go to MENU_STATE_PRINT_GIVE_UP_PROMPT. * - If the player pressed left or right, swap the move display window to contest mode, * and go to MENU_STATE_SETUP_CONTEST_MODE. - * + * * DoMoveRelearnerMain: MENU_STATE_SETUP_CONTEST_MODE * DoMoveRelearnerMain: MENU_STATE_IDLE_CONTEST_MODE * - If the player selected a move, go to MENU_STATE_PRINT_TEACH_MOVE_PROMPT. * - If the player cancelled, go to MENU_STATE_PRINT_GIVE_UP_PROMPT * - If the player pressed left or right, swap the move display window to battle mode, * and go to MENU_STATE_SETUP_BATTLE_MODE. - * + * * DoMoveRelearnerMain: MENU_STATE_PRINT_TEACH_MOVE_PROMPT * DoMoveRelearnerMain: MENU_STATE_TEACH_MOVE_CONFIRM * - Wait for the player to confirm. @@ -68,24 +68,24 @@ * MENU_STATE_PRINT_TEXT_THEN_FANFARE. * - If confirmed and the pokemon doesn't have an empty move slot, go to * MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT. - * + * * DoMoveRelearnerMain: MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT * DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_TRYING_TO_LEARN * DoMoveRelearnerMain: MENU_STATE_CONFIRM_DELETE_OLD_MOVE * - If the player confirms, go to MENU_STATE_PRINT_WHICH_MOVE_PROMPT. * - If the player cancels, go to MENU_STATE_PRINT_STOP_TEACHING - * + * * DoMoveRelearnerMain: MENU_STATE_PRINT_STOP_TEACHING * DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_STOP_TEACHING * DoMoveRelearnerMain: MENU_STATE_CONFIRM_STOP_TEACHING * - If the player confirms, go to MENU_STATE_CHOOSE_SETUP_STATE. * - If the player cancels, go back to MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT. - * + * * DoMoveRelearnerMain: MENU_STATE_PRINT_WHICH_MOVE_PROMPT * DoMoveRelearnerMain: MENU_STATE_SHOW_MOVE_SUMMARY_SCREEN * - Go to ShowSelectMovePokemonSummaryScreen. When done, control returns to * CB2_InitLearnMoveReturnFromSelectMove. - * + * * DoMoveRelearnerMain: MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE * DoMoveRelearnerMain: MENU_STATE_PRINT_TEXT_THEN_FANFARE * DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_FANFARE @@ -93,13 +93,13 @@ * DoMoveRelearnerMain: MENU_STATE_FADE_AND_RETURN * DoMoveRelearnerMain: MENU_STATE_RETURN_TO_FIELD * - Clean up and go to CB2_ReturnToField. - * + * * DoMoveRelearnerMain: MENU_STATE_PRINT_GIVE_UP_PROMPT * DoMoveRelearnerMain: MENU_STATE_GIVE_UP_CONFIRM * - If the player confirms, go to MENU_STATE_FADE_AND_RETURN, and set VAR_0x8004 to FALSE. * - If the player cancels, go to either MENU_STATE_SETUP_BATTLE_MODE or * MENU_STATE_SETUP_CONTEST_MODE. - * + * * CB2_InitLearnMoveReturnFromSelectMove: * - Do most of the same stuff as CB2_InitLearnMove. * DoMoveRelearnerMain: MENU_STATE_FADE_FROM_SUMMARY_SCREEN @@ -108,7 +108,7 @@ * go to MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE and set VAR_0x8004 to TRUE. * - If the chosen move is the one the player selected before the summary screen, * go to MENU_STATE_PRINT_STOP_TEACHING. - * + * */ #define MENU_STATE_FADE_TO_BLACK 0 diff --git a/src/naming_screen.c b/src/naming_screen.c index fc7fb82fe7..5a297789a0 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -149,7 +149,7 @@ struct NamingScreenTemplate const u8 *title; }; -struct NamingScreenData +struct NamingScreenData { u8 tilemapBuffer1[0x800]; u8 tilemapBuffer2[0x800]; @@ -299,12 +299,12 @@ static const u8 sKeyboardChars[KBPAGE_COUNT * KBROW_COUNT * KBCOL_COUNT] = __( "!?♂♀/- " "…“”‘' "); -static const u8 sPageColumnCounts[KBPAGE_COUNT] = { - [KEYBOARD_LETTERS_LOWER] = KBCOL_COUNT, - [KEYBOARD_LETTERS_UPPER] = KBCOL_COUNT, - [KEYBOARD_SYMBOLS] = 6 +static const u8 sPageColumnCounts[KBPAGE_COUNT] = { + [KEYBOARD_LETTERS_LOWER] = KBCOL_COUNT, + [KEYBOARD_LETTERS_UPPER] = KBCOL_COUNT, + [KEYBOARD_SYMBOLS] = 6 }; -static const u8 sPageColumnXPos[KBPAGE_COUNT * KBCOL_COUNT] = { +static const u8 sPageColumnXPos[KBPAGE_COUNT * KBCOL_COUNT] = { 0, 12, 24, 56, 68, 80, 92, 123, // KEYBOARD_LETTERS_LOWER 0, 12, 24, 56, 68, 80, 92, 123, // KEYBOARD_LETTERS_UPPER 0, 22, 44, 66, 88, 110 // KEYBOARD_SYMBOLS @@ -583,25 +583,25 @@ static void Task_NamingScreen(u8 taskId) } // Which gfx/pal to load for the swap page button -static const u8 sPageToNextGfxId[KBPAGE_COUNT] = -{ - [KBPAGE_SYMBOLS] = PAGE_SWAP_UPPER, - [KBPAGE_LETTERS_UPPER] = PAGE_SWAP_LOWER, - [KBPAGE_LETTERS_LOWER] = PAGE_SWAP_OTHERS +static const u8 sPageToNextGfxId[KBPAGE_COUNT] = +{ + [KBPAGE_SYMBOLS] = PAGE_SWAP_UPPER, + [KBPAGE_LETTERS_UPPER] = PAGE_SWAP_LOWER, + [KBPAGE_LETTERS_LOWER] = PAGE_SWAP_OTHERS }; -static const u8 sPageToNextKeyboardId[KBPAGE_COUNT] = -{ - [KBPAGE_SYMBOLS] = KEYBOARD_LETTERS_UPPER, - [KBPAGE_LETTERS_UPPER] = KEYBOARD_LETTERS_LOWER, - [KBPAGE_LETTERS_LOWER] = KEYBOARD_SYMBOLS +static const u8 sPageToNextKeyboardId[KBPAGE_COUNT] = +{ + [KBPAGE_SYMBOLS] = KEYBOARD_LETTERS_UPPER, + [KBPAGE_LETTERS_UPPER] = KEYBOARD_LETTERS_LOWER, + [KBPAGE_LETTERS_LOWER] = KEYBOARD_SYMBOLS }; -static const u8 sPageToKeyboardId[KBPAGE_COUNT] = -{ - [KBPAGE_SYMBOLS] = KEYBOARD_SYMBOLS, - [KBPAGE_LETTERS_UPPER] = KEYBOARD_LETTERS_UPPER, - [KBPAGE_LETTERS_LOWER] = KEYBOARD_LETTERS_LOWER +static const u8 sPageToKeyboardId[KBPAGE_COUNT] = +{ + [KBPAGE_SYMBOLS] = KEYBOARD_SYMBOLS, + [KBPAGE_LETTERS_UPPER] = KEYBOARD_LETTERS_UPPER, + [KBPAGE_LETTERS_LOWER] = KEYBOARD_LETTERS_LOWER }; static u8 PageToNextGfxId(u8 page) @@ -674,7 +674,7 @@ static bool8 MainState_PressedOKButton(void) SetInputState(INPUT_STATE_DISABLED); SetCursorFlashing(FALSE); TryStartButtonFlash(BUTTON_COUNT, FALSE, TRUE); - if (sNamingScreen->templateNum == NAMING_SCREEN_CAUGHT_MON + if (sNamingScreen->templateNum == NAMING_SCREEN_CAUGHT_MON && CalculatePlayerPartyCount() >= PARTY_SIZE) { DisplaySentToPCMessage(); @@ -1030,9 +1030,9 @@ static void SpriteCB_Cursor(struct Sprite *sprite) if (sprite->sX == GetCurrentPageColumnCount()) sprite->invisible = TRUE; - if (sprite->invisible + if (sprite->invisible || !(sprite->sFlashing) - || sprite->sX != sprite->sPrevX + || sprite->sX != sprite->sPrevX || sprite->sY != sprite->sPrevY) { sprite->sColor = 0; @@ -1310,14 +1310,14 @@ static bool8 PageSwapSprite_SlideOn(struct Sprite *sprite) } static const u16 sPageSwapPalTags[] = { - [PAGE_SWAP_UPPER] = PALTAG_PAGE_SWAP_UPPER, - [PAGE_SWAP_OTHERS] = PALTAG_PAGE_SWAP_OTHERS, + [PAGE_SWAP_UPPER] = PALTAG_PAGE_SWAP_UPPER, + [PAGE_SWAP_OTHERS] = PALTAG_PAGE_SWAP_OTHERS, [PAGE_SWAP_LOWER] = PALTAG_PAGE_SWAP_LOWER }; static const u16 sPageSwapGfxTags[] = { - [PAGE_SWAP_UPPER] = GFXTAG_PAGE_SWAP_UPPER, - [PAGE_SWAP_OTHERS] = GFXTAG_PAGE_SWAP_OTHERS, + [PAGE_SWAP_UPPER] = GFXTAG_PAGE_SWAP_UPPER, + [PAGE_SWAP_OTHERS] = GFXTAG_PAGE_SWAP_OTHERS, [PAGE_SWAP_LOWER] = GFXTAG_PAGE_SWAP_LOWER }; @@ -1651,7 +1651,7 @@ static void HandleDpadMovement(struct Task *task) if (cursorX > GetCurrentPageColumnCount()) cursorX = 0; - + // Handle moving on/off the button column if (sDpadDeltaX[input] != 0) { @@ -2184,67 +2184,67 @@ static const struct OamData sOam_32x16 = static const struct Subsprite sSubsprites_PageSwapFrame[] = { { - .x = -20, - .y = -16, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 0, - .priority = 1 - }, - { - .x = 12, - .y = -16, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 4, - .priority = 1 - }, - { - .x = -20, - .y = -8, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 5, - .priority = 1 - }, - { - .x = 12, - .y = -8, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 9, - .priority = 1 - }, - { - .x = -20, - .y = 0, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 10, - .priority = 1 - }, - { - .x = 12, - .y = 0, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 14, - .priority = 1 - }, - { - .x = -20, - .y = 8, - .shape = SPRITE_SHAPE(32x8), + .x = -20, + .y = -16, + .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 15, + .tileOffset = 0, .priority = 1 }, { - .x = 12, - .y = 8, - .shape = SPRITE_SHAPE(8x8), + .x = 12, + .y = -16, + .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), - .tileOffset = 19, + .tileOffset = 4, + .priority = 1 + }, + { + .x = -20, + .y = -8, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 5, + .priority = 1 + }, + { + .x = 12, + .y = -8, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 9, + .priority = 1 + }, + { + .x = -20, + .y = 0, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 10, + .priority = 1 + }, + { + .x = 12, + .y = 0, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 14, + .priority = 1 + }, + { + .x = -20, + .y = 8, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 15, + .priority = 1 + }, + { + .x = 12, + .y = 8, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 19, .priority = 1 } }; @@ -2252,19 +2252,19 @@ static const struct Subsprite sSubsprites_PageSwapFrame[] = static const struct Subsprite sSubsprites_PageSwapText[] = { { - .x = -12, - .y = -4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 0, + .x = -12, + .y = -4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 0, .priority = 1 }, { - .x = 4, - .y = -4, - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8), - .tileOffset = 2, + .x = 4, + .y = -4, + .shape = SPRITE_SHAPE(8x8), + .size = SPRITE_SIZE(8x8), + .tileOffset = 2, .priority = 1 } }; @@ -2272,51 +2272,51 @@ static const struct Subsprite sSubsprites_PageSwapText[] = static const struct Subsprite sSubsprites_Button[] = { { - .x = -20, - .y = -12, - .shape = SPRITE_SHAPE(32x8), + .x = -20, + .y = -12, + .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .tileOffset = 0, .priority = 1 }, { - .x = 12, - .y = -12, - .shape = SPRITE_SHAPE(8x8), + .x = 12, + .y = -12, + .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), - .tileOffset = 4, + .tileOffset = 4, .priority = 1 }, { - .x = -20, - .y = -4, - .shape = SPRITE_SHAPE(32x8), + .x = -20, + .y = -4, + .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 5, + .tileOffset = 5, .priority = 1 }, { - .x = 12, - .y = -4, - .shape = SPRITE_SHAPE(8x8), + .x = 12, + .y = -4, + .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), - .tileOffset = 9, + .tileOffset = 9, .priority = 1 }, { - .x = -20, - .y = 4, - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8), - .tileOffset = 10, + .x = -20, + .y = 4, + .shape = SPRITE_SHAPE(32x8), + .size = SPRITE_SIZE(32x8), + .tileOffset = 10, .priority = 1 }, { - .x = 12, - .y = 4, - .shape = SPRITE_SHAPE(8x8), + .x = 12, + .y = 4, + .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), - .tileOffset = 14, + .tileOffset = 14, .priority = 1 } }; @@ -2324,27 +2324,27 @@ static const struct Subsprite sSubsprites_Button[] = static const struct Subsprite sSubsprites_PCIcon[] = { { - .x = -8, - .y = -12, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 0, - .priority = 3 - }, - { - .x = -8, - .y = -4, - .shape = SPRITE_SHAPE(16x8), + .x = -8, + .y = -12, + .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), - .tileOffset = 2, + .tileOffset = 0, .priority = 3 }, { - .x = -8, - .y = 4, - .shape = SPRITE_SHAPE(16x8), - .size = SPRITE_SIZE(16x8), - .tileOffset = 4, + .x = -8, + .y = -4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 2, + .priority = 3 + }, + { + .x = -8, + .y = 4, + .shape = SPRITE_SHAPE(16x8), + .size = SPRITE_SIZE(16x8), + .tileOffset = 4, .priority = 3 } }; @@ -2514,21 +2514,21 @@ static const struct SpriteTemplate sSpriteTemplate_PCIcon = static const u8* const sNamingScreenKeyboardText[KBPAGE_COUNT][KBROW_COUNT] = { - [KEYBOARD_LETTERS_LOWER] = + [KEYBOARD_LETTERS_LOWER] = { gText_NamingScreenKeyboard_abcdef, gText_NamingScreenKeyboard_ghijkl, gText_NamingScreenKeyboard_mnopqrs, gText_NamingScreenKeyboard_tuvwxyz }, - [KEYBOARD_LETTERS_UPPER] = + [KEYBOARD_LETTERS_UPPER] = { gText_NamingScreenKeyboard_ABCDEF, gText_NamingScreenKeyboard_GHIJKL, gText_NamingScreenKeyboard_MNOPQRS, gText_NamingScreenKeyboard_TUVWXYZ }, - [KEYBOARD_SYMBOLS] = + [KEYBOARD_SYMBOLS] = { gText_NamingScreenKeyboard_01234, gText_NamingScreenKeyboard_56789, diff --git a/src/overworld.c b/src/overworld.c index a2f38c864d..844716985e 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -823,7 +823,7 @@ void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum) ResetFieldTasksArgs(); RunOnResumeMapScript(); - if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER + if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER || gMapHeader.regionMapSectionId != sLastMapSectionId) ShowMapNamePopup(); } @@ -2235,10 +2235,10 @@ static void CB1_UpdateLinkState(void) // Note: Because guestId is between 0 and 4, while the smallest key code is // LINK_KEY_CODE_EMPTY, this is functionally equivalent to `sPlayerKeyInterceptCallback(0)`. - // It is expecting the callback to be KeyInterCB_SelfIdle, and that will + // It is expecting the callback to be KeyInterCB_SelfIdle, and that will // completely ignore any input parameters. // - // UpdateHeldKeyCode performs a sanity check on its input; if + // UpdateHeldKeyCode performs a sanity check on its input; if // sPlayerKeyInterceptCallback echoes back the argument, which is selfId, then // it'll use LINK_KEY_CODE_EMPTY instead. // @@ -3051,7 +3051,7 @@ static void SetPlayerFacingDirection(u8 linkPlayerId, u8 facing) #define TEMP gLinkPlayerMovementModes[linkPlayerObjEvent->movementMode](linkPlayerObjEvent, objEvent, facing) gMovementStatusHandler[TEMP](linkPlayerObjEvent, objEvent); - + // Clean up the hack. #undef TEMP } diff --git a/src/palette.c b/src/palette.c index cbaae8da28..e106ce6858 100644 --- a/src/palette.c +++ b/src/palette.c @@ -586,7 +586,7 @@ static u8 UpdateFastPaletteFade(void) if (IsSoftwarePaletteFadeFinishing()) return gPaletteFade.active ? PALETTE_FADE_STATUS_ACTIVE : PALETTE_FADE_STATUS_DONE; - + if (gPaletteFade.objPaletteToggle) { @@ -721,7 +721,7 @@ static u8 UpdateFastPaletteFade(void) gPaletteFade.mode = NORMAL_FADE; gPaletteFade.softwareFadeFinishing = 1; } - + // gPaletteFade.active cannot change since the last time it was checked. So this // is equivalent to `return PALETTE_FADE_STATUS_ACTIVE;` return gPaletteFade.active ? PALETTE_FADE_STATUS_ACTIVE : PALETTE_FADE_STATUS_DONE; @@ -986,8 +986,8 @@ static bool32 IsBlendPalettesGraduallyTaskActive(u8 id) int i; for (i = 0; i < NUM_TASKS; i++) - if ((gTasks[i].isActive == TRUE) - && (gTasks[i].func == Task_BlendPalettesGradually) + if ((gTasks[i].isActive == TRUE) + && (gTasks[i].func == Task_BlendPalettesGradually) && (gTasks[i].tId == id)) return TRUE; diff --git a/src/palette_util.c b/src/palette_util.c index 5364ff6d98..3fbde9284e 100755 --- a/src/palette_util.c +++ b/src/palette_util.c @@ -247,7 +247,7 @@ int InitPulseBlendPaletteSettings(struct PulseBlend *pulseBlend, const struct Pu if (pulseBlendPalette == NULL) return 0xFF; - + pulseBlendPalette->blendCoeff = 0; pulseBlendPalette->fadeDirection = 0; pulseBlendPalette->available = 1; @@ -322,7 +322,7 @@ void MarkUsedPulseBlendPalettes(struct PulseBlend *pulseBlend, u16 pulseBlendPal pulseBlend->usedPulseBlendPalettes |= 1 << i; } } - } + } } void UnmarkUsedPulseBlendPalettes(struct PulseBlend *pulseBlend, u16 pulseBlendPaletteSelector, u8 multiSelection) @@ -423,7 +423,7 @@ void UpdatePulseBlend(struct PulseBlend *pulseBlend) pulseBlendPalette->blendCoeff = 0; else pulseBlendPalette->blendCoeff = pulseBlendPalette->pulseBlendSettings.maxBlendCoeff & 0xF; - + pulseBlendPalette->fadeDirection ^= 1; pulseBlendPalette->fadeCycleCounter++; break; diff --git a/src/player_pc.c b/src/player_pc.c index 301b8c3620..507fc65582 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -471,7 +471,7 @@ static void PlayerPC_Mailbox(u8 taskId) Mailbox_DrawMailboxMenu(taskId); gTasks[taskId].func = Mailbox_ProcessInput; } - else + else { // Alloc failed, exit Mailbox DisplayItemMessageOnField(taskId, gText_NoMailHere, ReshowPlayerPC); @@ -588,7 +588,7 @@ static void ItemStorage_Withdraw(u8 taskId) s16 *data = gTasks[taskId].data; tUsedSlots = CountUsedPCItemSlots(); - if (tUsedSlots != 0) + if (tUsedSlots != 0) { ItemStorage_Enter(taskId, FALSE); } @@ -986,7 +986,7 @@ void ItemStorage_RefreshListMenu(void) sItemStorageMenu->listItems[i].name = &sItemStorageMenu->itemNames[i][0]; sItemStorageMenu->listItems[i].id = i; } - + // Set up Cancel entry StringCopy(&sItemStorageMenu->itemNames[i][0], gText_Cancel2); sItemStorageMenu->listItems[i].name = &sItemStorageMenu->itemNames[i][0]; @@ -1055,10 +1055,10 @@ static void ItemStorage_PrintDescription(s32 id) static void ItemStorage_AddScrollIndicator(void) { if (gPlayerPCItemPageInfo.scrollIndicatorTaskId == TASK_NONE) - gPlayerPCItemPageInfo.scrollIndicatorTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 176, 12, 148, - gPlayerPCItemPageInfo.count - gPlayerPCItemPageInfo.pageItems, - TAG_SCROLL_ARROW, - TAG_SCROLL_ARROW, + gPlayerPCItemPageInfo.scrollIndicatorTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 176, 12, 148, + gPlayerPCItemPageInfo.count - gPlayerPCItemPageInfo.pageItems, + TAG_SCROLL_ARROW, + TAG_SCROLL_ARROW, &gPlayerPCItemPageInfo.itemsAbove); } @@ -1242,7 +1242,7 @@ static void ItemStorage_ReturnToMenuSelect(u8 taskId) if (!IsDma3ManagerBusyWithBgCopy()) { DrawDialogueFrame(0, 0); - + // Select Withdraw/Toss by default depending on which was just exited if (!tInTossMenu) InitItemStorageMenu(taskId, MENU_WITHDRAW); @@ -1370,7 +1370,7 @@ static void ItemStorage_DoItemAction(u8 taskId) ItemStorage_DoItemToss(taskId); return; } - + // Tossing multiple items, show "how many" message CopyItemName(gSaveBlock1Ptr->pcItems[pos].itemId, gStringVar1); ItemStorage_PrintMessage(ItemStorage_GetMessage(MSG_HOW_MANY_TO_TOSS)); diff --git a/src/pokeblock.c b/src/pokeblock.c index fad6858ecc..89c2bc9622 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -36,8 +36,8 @@ #define MAX_MENU_ITEMS 9 #define MENU_MIDPOINT (MAX_MENU_ITEMS / 2) -#define TILE_HIGHLIGHT_NONE 0x0005 // Tile number for the bg of an unselected menu item -#define TILE_HIGHLIGHT_BLUE 0x1005 // Tile number for the bg of a selected menu item +#define TILE_HIGHLIGHT_NONE 0x0005 // Tile number for the bg of an unselected menu item +#define TILE_HIGHLIGHT_BLUE 0x1005 // Tile number for the bg of a selected menu item #define TILE_HIGHLIGHT_RED 0x2005 // Tile number for the bg of a menu item to swap #define TAG_POKEBLOCK_CASE 14800 @@ -792,7 +792,7 @@ static void DrawPokeblockInfo(s32 pkblId) } CopyToBgTilemapBufferRect(2, rectTilemapSrc, (i / 3 * 6) + 1, (i % 3 * 2) + 13, 1, 2); } - + // Print the Pokéblock's feel ConvertIntToDecimalStringN(gStringVar1, GetPokeblocksFeel(pokeblock), STR_CONV_MODE_RIGHT_ALIGN, 2); PrintOnPokeblockWindow(WIN_FEEL, gStringVar1, 4); diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 748d988a4e..b123e60318 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -1003,7 +1003,7 @@ static void CalculateMonAnimLength(void) pokeblockFeed = sPokeblockFeed; pokeblockFeed->monAnimLength = 1; animId = sNatureToMonPokeblockAnim[pokeblockFeed->nature][0]; - + // Add up the time each stage of the animation will take for (i = 0; i < 8; i++, animId++) { @@ -1177,16 +1177,16 @@ static void CalculateMonAnimMovement(void) if (!negative) { - pokeblockFeed->monAnimX[time] = Sin(pokeblockFeed->animData[ANIMDATA_ROT_IDX], + pokeblockFeed->monAnimX[time] = Sin(pokeblockFeed->animData[ANIMDATA_ROT_IDX], pokeblockFeed->animData[ANIMDATA_SIN_AMPLITUDE] + amplitude / 0x100) + x; - pokeblockFeed->monAnimY[time] = Cos(pokeblockFeed->animData[ANIMDATA_ROT_IDX], + pokeblockFeed->monAnimY[time] = Cos(pokeblockFeed->animData[ANIMDATA_ROT_IDX], pokeblockFeed->animData[ANIMDATA_COS_AMPLITUDE] + amplitude / 0x100) + y; } else { - pokeblockFeed->monAnimX[time] = Sin(pokeblockFeed->animData[ANIMDATA_ROT_IDX], + pokeblockFeed->monAnimX[time] = Sin(pokeblockFeed->animData[ANIMDATA_ROT_IDX], pokeblockFeed->animData[ANIMDATA_SIN_AMPLITUDE] - amplitude / 0x100) + x; - pokeblockFeed->monAnimY[time] = Cos(pokeblockFeed->animData[ANIMDATA_ROT_IDX], + pokeblockFeed->monAnimY[time] = Cos(pokeblockFeed->animData[ANIMDATA_ROT_IDX], pokeblockFeed->animData[ANIMDATA_COS_AMPLITUDE] - amplitude / 0x100) + y; } diff --git a/src/pokedex.c b/src/pokedex.c index cc469b32f8..2161c214fc 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -5235,7 +5235,7 @@ void SetSearchRectHighlight(u8 flags, u8 x, u8 y, u8 width) temp &= 0x0fff; temp |= (flags << 12); *(u16 *)(ptr + (y + 0) * 64 + (x + i) * 2) = temp; - + temp = *(u16 *)(ptr + (y + 1) * 64 + (x + i) * 2); temp &= 0x0fff; temp |= (flags << 12); diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index f9cf423092..12f0e0d9ed 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -527,7 +527,7 @@ static void BuildAreaGlowTilemap(void) sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH] |= GLOW_TILE_BOTTOM; if (y != AREA_SCREEN_HEIGHT - 1 && sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH] != GLOW_TILE_FULL) sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH] |= GLOW_TILE_TOP; - + // Diagonals if (x != 0 && y != 0 && sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH - 1] != GLOW_TILE_FULL) sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH - 1] |= GLOW_TILE_BOTTOM_RIGHT; diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c index e1d1776b13..350946f3b2 100644 --- a/src/pokedex_cry_screen.c +++ b/src/pokedex_cry_screen.c @@ -19,7 +19,7 @@ // . . // 96 . . -96 // 127 -// +// #define MIN_NEEDLE_POS 32 #define MAX_NEEDLE_POS -32 @@ -253,7 +253,7 @@ bool8 LoadCryWaveformWindow(struct CryScreenWindow *window, u8 windowId) case 1: for (i = 0; i < sDexCryScreen->playStartPos * 8; i++) DrawWaveformSegment(i, 0); - + gDexCryScreenState++; break; case 2: @@ -295,7 +295,7 @@ void UpdateCryWaveformWindow(u8 windowId) DrawWaveformFlatline(); return; } - + // Cry playing, buffer waveform if (sDexCryScreen->cryState == 1) { diff --git a/src/pokemon.c b/src/pokemon.c index 28b4022165..ef1bae00b8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4879,7 +4879,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov temp2 = itemEffect[itemEffectParam]; dataSigned = GetMonData(mon, sGetMonDataEVConstants[temp1], NULL); evChange = temp2; - + if (evChange > 0) // Increasing EV (HP or Atk) { // Has EV increase limit already been reached? @@ -4977,7 +4977,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov { if (!usedByAI) { - // Restore HP + // Restore HP dataUnsigned = GetMonData(mon, MON_DATA_HP, NULL) + dataUnsigned; if (dataUnsigned > GetMonData(mon, MON_DATA_MAX_HP, NULL)) dataUnsigned = GetMonData(mon, MON_DATA_MAX_HP, NULL); @@ -5056,7 +5056,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov dataUnsigned = CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); } SetMonData(mon, MON_DATA_PP1 + moveIndex, &dataUnsigned); - + // Heal battler PP too (if applicable) if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) @@ -5093,7 +5093,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov case 5: effectFlags = itemEffect[i]; temp1 = 0; - + // Loop through and try each of the ITEM5 effects while (effectFlags != 0) { diff --git a/src/pokemon_animation.c b/src/pokemon_animation.c index 8e90caeb85..9a95edf4b3 100644 --- a/src/pokemon_animation.c +++ b/src/pokemon_animation.c @@ -10,7 +10,7 @@ #include "constants/battle_anim.h" #include "constants/rgb.h" -/* +/* This file handles the movements of the Pokémon intro animations. Each animation type is identified by an ANIM_* constant that @@ -26,7 +26,7 @@ The table linking species to a BACK_ANIM is in this file (sSpeciesToBackAnimSet) while the table linking species to an ANIM for their front animation is in - pokemon.c (sMonFrontAnimIdsTable). + pokemon.c (sMonFrontAnimIdsTable). These are the functions that will start an animation: - LaunchAnimationTaskForFrontSprite diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 42330b6a5c..39ce1d6ba8 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1005,21 +1005,21 @@ const union AffineAnimCmd *const sMonIconAffineAnims[] = const u16 sSpriteImageSizes[3][4] = { - [ST_OAM_SQUARE] = + [ST_OAM_SQUARE] = { [SPRITE_SIZE(8x8)] = 0x20, [SPRITE_SIZE(16x16)] = 0x80, [SPRITE_SIZE(32x32)] = 0x200, [SPRITE_SIZE(64x64)] = 0x800, }, - [ST_OAM_H_RECTANGLE] = + [ST_OAM_H_RECTANGLE] = { [SPRITE_SIZE(16x8)] = 0x40, [SPRITE_SIZE(32x8)] = 0x80, [SPRITE_SIZE(32x16)] = 0x100, [SPRITE_SIZE(64x32)] = 0x400, }, - [ST_OAM_V_RECTANGLE] = + [ST_OAM_V_RECTANGLE] = { [SPRITE_SIZE(8x16)] = 0x40, [SPRITE_SIZE(8x32)] = 0x80, diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index 8fe590a0cd..57f1d6e930 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -126,7 +126,7 @@ enum { #define PLAY_AGAIN_YES 2 #define TAG_MON1 0 -#define TAG_MON2 1 // MON2-5 used implicitly by adding multiplayer id to tag +#define TAG_MON2 1 // MON2-5 used implicitly by adding multiplayer id to tag #define TAG_MON3 2 #define TAG_MON4 3 #define TAG_MON5 4 @@ -1723,7 +1723,7 @@ static void UpdateVineState(void) sPokemonJump->prevVineState = sPokemonJump->vineState; sPokemonJump->vineState = sPokemonJump->vineStateTimer >> 8; - + // If beginning upswing if (sPokemonJump->vineState > VINE_UPSWING_LOWER && sPokemonJump->prevVineState < VINE_UPSWING_LOW) { @@ -1960,23 +1960,23 @@ static void HandleMonState(void) static const s8 sJumpOffsets[][48] = { - [JUMP_TYPE_NORMAL] = { -3, -6, -8, -10, -13, -15, -17, -19, - -21, -23, -25, -27, -28, -29, - JUMP_PEAK, JUMP_PEAK, JUMP_PEAK, - -28, -27, -26, -25, -23, -22, -20, -18, + [JUMP_TYPE_NORMAL] = { -3, -6, -8, -10, -13, -15, -17, -19, + -21, -23, -25, -27, -28, -29, + JUMP_PEAK, JUMP_PEAK, JUMP_PEAK, + -28, -27, -26, -25, -23, -22, -20, -18, -17, -15, -13, -11, -8, -6, -4, -1}, - [JUMP_TYPE_FAST] = { -3, -6, -9, -11, -14, -16, -18, -20, - -22, -24, -26, -28, -29, - JUMP_PEAK, JUMP_PEAK, - -28, -26, -24, -22, -20, -18, -16, -14, + [JUMP_TYPE_FAST] = { -3, -6, -9, -11, -14, -16, -18, -20, + -22, -24, -26, -28, -29, + JUMP_PEAK, JUMP_PEAK, + -28, -26, -24, -22, -20, -18, -16, -14, -11, -9, -6, -4, -1}, - [JUMP_TYPE_SLOW] = { -3, -6, -9, -11, -13, -15, -17, -19, - -21, -23, -25, -27, -28, -29, - JUMP_PEAK, JUMP_PEAK, JUMP_PEAK, JUMP_PEAK, - -29, -29, -28, -28, -27, -27, -26, -25, - -24, -22, -20, -18, -16, -14, -12, -11, + [JUMP_TYPE_SLOW] = { -3, -6, -9, -11, -13, -15, -17, -19, + -21, -23, -25, -27, -28, -29, + JUMP_PEAK, JUMP_PEAK, JUMP_PEAK, JUMP_PEAK, + -29, -29, -28, -28, -27, -27, -26, -25, + -24, -22, -20, -18, -16, -14, -12, -11, -9, -6, -4, -1}, }; @@ -2248,13 +2248,13 @@ static void TryUpdateExcellentsRecord(u16 excellentsInRow) } static const u16 sPrizeItems[] = { - ITEM_LEPPA_BERRY, - ITEM_LUM_BERRY, - ITEM_SITRUS_BERRY, - ITEM_FIGY_BERRY, - ITEM_WIKI_BERRY, - ITEM_MAGO_BERRY, - ITEM_AGUAV_BERRY, + ITEM_LEPPA_BERRY, + ITEM_LUM_BERRY, + ITEM_SITRUS_BERRY, + ITEM_FIGY_BERRY, + ITEM_WIKI_BERRY, + ITEM_MAGO_BERRY, + ITEM_AGUAV_BERRY, ITEM_IAPAPA_BERRY }; @@ -3649,15 +3649,15 @@ enum { }; static const u8 sVenusaurStates[] = { - [VINE_HIGHEST] = VENUSAUR_UP, - [VINE_DOWNSWING_HIGHER] = VENUSAUR_UP, - [VINE_DOWNSWING_HIGH] = VENUSAUR_NEUTRAL, - [VINE_DOWNSWING_LOW] = VENUSAUR_NEUTRAL, - [VINE_DOWNSWING_LOWER] = VENUSAUR_DOWN, - [VINE_LOWEST] = VENUSAUR_DOWN, - [VINE_UPSWING_LOWER] = VENUSAUR_DOWN, - [VINE_UPSWING_LOW] = VENUSAUR_NEUTRAL, - [VINE_UPSWING_HIGH] = VENUSAUR_NEUTRAL, + [VINE_HIGHEST] = VENUSAUR_UP, + [VINE_DOWNSWING_HIGHER] = VENUSAUR_UP, + [VINE_DOWNSWING_HIGH] = VENUSAUR_NEUTRAL, + [VINE_DOWNSWING_LOW] = VENUSAUR_NEUTRAL, + [VINE_DOWNSWING_LOWER] = VENUSAUR_DOWN, + [VINE_LOWEST] = VENUSAUR_DOWN, + [VINE_UPSWING_LOWER] = VENUSAUR_DOWN, + [VINE_UPSWING_LOW] = VENUSAUR_NEUTRAL, + [VINE_UPSWING_HIGH] = VENUSAUR_NEUTRAL, [VINE_UPSWING_HIGHER] = VENUSAUR_UP, }; @@ -3665,25 +3665,25 @@ static const struct CompressedSpriteSheet sSpriteSheet_Digits = {gMinigameDigits static const struct SpritePalette sSpritePalette_Digits = {gMinigameDigits_Pal, TAG_DIGITS}; static const u16 sPlayerNameWindowCoords_2Players[] = { - 6, 8, + 6, 8, 16, 8 }; static const u16 sPlayerNameWindowCoords_3Players[] = { - 6, 8, - 11, 6, + 6, 8, + 11, 6, 16, 8 }; static const u16 sPlayerNameWindowCoords_4Players[] = { - 2, 6, - 6, 8, - 16, 8, + 2, 6, + 6, 8, + 16, 8, 20, 6 }; static const u16 sPlayerNameWindowCoords_5Players[] = { - 2, 6, - 6, 8, - 11, 6, - 16, 8, + 2, 6, + 6, 8, + 11, 6, + 16, 8, 20, 6 }; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 87180ad1e9..a58187d8b3 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -4687,7 +4687,7 @@ static bool8 UpdateBoxMonIconScroll(void) // Create the new incoming column of icons sStorage->iconScrollPos += sStorage->iconScrollSpeed; sStorage->iconScrollNumIncoming += CreateBoxMonIconsInColumn(sStorage->iconScrollCurColumn, sStorage->iconScrollDistance, sStorage->iconScrollSpeed); - + if ((sStorage->iconScrollDirection > 0 && sStorage->iconScrollCurColumn == IN_BOX_COLUMNS - 1) || (sStorage->iconScrollDirection < 0 && sStorage->iconScrollCurColumn == 0)) { @@ -5050,7 +5050,7 @@ static void SetReleaseMon(u8 mode, u8 position) static bool8 TryHideReleaseMonSprite(void) { - if (*sStorage->releaseMonSpritePtr == NULL + if (*sStorage->releaseMonSpritePtr == NULL || (*sStorage->releaseMonSpritePtr)->invisible) return FALSE; @@ -5903,7 +5903,7 @@ static bool8 UpdateCursorPos(void) sStorage->cursorNewY += sStorage->cursorSpeedY; sStorage->cursorSprite->x = sStorage->cursorNewX >> 8; sStorage->cursorSprite->y = sStorage->cursorNewY >> 8; - + // Limit cursor on right if (sStorage->cursorSprite->x > DISPLAY_WIDTH + 16) { @@ -6525,7 +6525,7 @@ static void GetRestrictedReleaseMoves(u16 *moves) for (i = 0; i < ARRAY_COUNT(sRestrictedReleaseMoves); i++) { if (sRestrictedReleaseMoves[i].mapGroup == MAP_GROUPS_COUNT - || (sRestrictedReleaseMoves[i].mapGroup == gSaveBlock1Ptr->location.mapGroup + || (sRestrictedReleaseMoves[i].mapGroup == gSaveBlock1Ptr->location.mapGroup && sRestrictedReleaseMoves[i].mapNum == gSaveBlock1Ptr->location.mapNum)) { *moves = sRestrictedReleaseMoves[i].move; @@ -6589,7 +6589,7 @@ static bool32 AtLeastThreeUsableMons(void) { s32 i, j; s32 count = (sIsMonBeingMoved != FALSE); - + // Check party for usable Pokémon for (j = 0; j < PARTY_SIZE; j++) { @@ -6660,7 +6660,7 @@ static s8 RunCanReleaseMon(void) for (i = 0; i < IN_BOX_COUNT; i++) { knownMoves = GetAndCopyBoxMonDataAt(sStorage->releaseCheckBoxId, sStorage->releaseCheckBoxPos, MON_DATA_KNOWN_MOVES, (u8*)sStorage->restrictedMoveList); - if (knownMoves != 0 && !(sStorage->releaseBoxId == sStorage->releaseCheckBoxId + if (knownMoves != 0 && !(sStorage->releaseBoxId == sStorage->releaseCheckBoxId && sStorage->releaseBoxPos == sStorage->releaseCheckBoxPos)) { // Found PC Pokémon with restricted move, clear move from list @@ -7537,7 +7537,7 @@ static u8 HandleInput_OnButtons(void) sStorage->cursorVerticalWrap = -1; if (sCursorPosition == 0) cursorPosition = IN_BOX_COUNT - 1 - 5; - else + else cursorPosition = IN_BOX_COUNT - 1; sStorage->cursorFlipTimer = 1; break; @@ -7570,7 +7570,7 @@ static u8 HandleInput_OnButtons(void) // Button was pressed, determine which if (JOY_NEW(A_BUTTON)) return (cursorPosition == 0) ? INPUT_SHOW_PARTY : INPUT_CLOSE_BOX; - + if (JOY_NEW(B_BUTTON)) return INPUT_PRESSED_B; @@ -8084,9 +8084,9 @@ static void RemoveMenu(void) //------------------------------------------------------------------------------ // SECTION: MultiMove -// +// // The functions below handle moving and selecting multiple Pokémon at once. -// The icon sprites are moved to bg 0, and this bg is manipulated to move +// The icon sprites are moved to bg 0, and this bg is manipulated to move // them as a group. //------------------------------------------------------------------------------ @@ -8644,7 +8644,7 @@ static bool8 MultiMove_CanPlaceSelection(void) //------------------------------------------------------------------------------ // SECTION: Item mode -// +// // The functions below handle the Move Items mode //------------------------------------------------------------------------------ @@ -8950,7 +8950,7 @@ static void MoveItemFromCursorToBag(void) // The party menu is being closed, if the cursor is on // a Pokémon that has a held item make sure it slides -// up along with the closing menu. +// up along with the closing menu. static void MoveHeldItemWithPartyMenu(void) { s32 i; @@ -8960,7 +8960,7 @@ static void MoveHeldItemWithPartyMenu(void) for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (sStorage->itemIcons[i].active + if (sStorage->itemIcons[i].active && sStorage->itemIcons[i].area == CURSOR_AREA_IN_PARTY) SetItemIconCallback(i, ITEM_CB_HIDE_PARTY, CURSOR_AREA_IN_HAND, 0); } @@ -8974,10 +8974,10 @@ static bool8 IsItemIconAnimActive(void) { if (sStorage->itemIcons[i].active) { - if (!sStorage->itemIcons[i].sprite->affineAnimEnded + if (!sStorage->itemIcons[i].sprite->affineAnimEnded && sStorage->itemIcons[i].sprite->affineAnimBeginning) return TRUE; - if (sStorage->itemIcons[i].sprite->callback != SpriteCallbackDummy + if (sStorage->itemIcons[i].sprite->callback != SpriteCallbackDummy && sStorage->itemIcons[i].sprite->callback != SpriteCB_ItemIcon_SetPosToCursor) return TRUE; } @@ -8993,7 +8993,7 @@ static bool8 IsMovingItem(void) { for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (sStorage->itemIcons[i].active + if (sStorage->itemIcons[i].active && sStorage->itemIcons[i].area == CURSOR_AREA_IN_HAND) return TRUE; } @@ -9988,7 +9988,7 @@ static void TilemapUtil_Draw(u8 id) //------------------------------------------------------------------------------ // SECTION: UnkUtil -// +// // Some data transfer utility that goes functionally unused. // It gets initialized with UnkUtil_Init, and run every vblank in Pokémon // Storage with UnkUtil_Run, but neither of the Add functions are ever used, diff --git a/src/pokenav.c b/src/pokenav.c index 881411b9ec..925560543b 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -52,7 +52,7 @@ static void CB2_InitPokenavForTutorial(void); // TODO: Use MENU ids const struct PokenavCallbacks PokenavMenuCallbacks[15] = { - [POKENAV_MAIN_MENU - POKENAV_MENU_IDS_START] = + [POKENAV_MAIN_MENU - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_MainMenuCursorOnMap, .callback = GetMenuHandlerCallback, @@ -62,7 +62,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeMenuHandlerSubstruct1, .free2 = FreeMenuHandlerSubstruct2, }, - [POKENAV_MAIN_MENU_CURSOR_ON_MAP - POKENAV_MENU_IDS_START] = + [POKENAV_MAIN_MENU_CURSOR_ON_MAP - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_MainMenuCursorOnMap, .callback = GetMenuHandlerCallback, @@ -72,7 +72,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeMenuHandlerSubstruct1, .free2 = FreeMenuHandlerSubstruct2, }, - [POKENAV_CONDITION_MENU - POKENAV_MENU_IDS_START] = + [POKENAV_CONDITION_MENU - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_ConditionMenu, .callback = GetMenuHandlerCallback, @@ -82,7 +82,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeMenuHandlerSubstruct1, .free2 = FreeMenuHandlerSubstruct2, }, - [POKENAV_CONDITION_SEARCH_MENU - POKENAV_MENU_IDS_START] = + [POKENAV_CONDITION_SEARCH_MENU - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_ConditionSearchMenu, .callback = GetMenuHandlerCallback, @@ -92,7 +92,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeMenuHandlerSubstruct1, .free2 = FreeMenuHandlerSubstruct2, }, - [POKENAV_MAIN_MENU_CURSOR_ON_MATCH_CALL - POKENAV_MENU_IDS_START] = + [POKENAV_MAIN_MENU_CURSOR_ON_MATCH_CALL - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_MainMenuCursorOnMatchCall, .callback = GetMenuHandlerCallback, @@ -102,7 +102,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeMenuHandlerSubstruct1, .free2 = FreeMenuHandlerSubstruct2, }, - [POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS - POKENAV_MENU_IDS_START] = + [POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_MainMenuCursorOnRibbons, .callback = GetMenuHandlerCallback, @@ -112,7 +112,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeMenuHandlerSubstruct1, .free2 = FreeMenuHandlerSubstruct2, }, - [POKENAV_REGION_MAP - POKENAV_MENU_IDS_START] = + [POKENAV_REGION_MAP - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_RegionMap, .callback = GetRegionMapCallback, @@ -122,7 +122,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeRegionMapSubstruct1, .free2 = FreeRegionMapSubstruct2, }, - [POKENAV_CONDITION_PARTY - POKENAV_MENU_IDS_START] = + [POKENAV_CONDITION_PARTY - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_PartyCondition, .callback = GetPartyConditionCallback, @@ -132,7 +132,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreePartyConditionSubstruct1, .free2 = FreePartyConditionSubstruct2, }, - [POKENAV_CONDITION_SEARCH_RESULTS - POKENAV_MENU_IDS_START] = + [POKENAV_CONDITION_SEARCH_RESULTS - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_ConditionSearch, .callback = GetConditionSearchResultsCallback, @@ -142,7 +142,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeSearchResultSubstruct1, .free2 = FreeSearchResultSubstruct2, }, - [POKENAV_CONDITION_GRAPH_FROM_SEARCH - POKENAV_MENU_IDS_START] = + [POKENAV_CONDITION_GRAPH_FROM_SEARCH - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_ConditionGraphFromSearch, .callback = GetPartyConditionCallback, @@ -152,7 +152,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreePartyConditionSubstruct1, .free2 = FreePartyConditionSubstruct2, }, - [POKENAV_RETURN_CONDITION_SEARCH - POKENAV_MENU_IDS_START] = + [POKENAV_RETURN_CONDITION_SEARCH - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_ReturnToMonSearchList, .callback = GetConditionSearchResultsCallback, @@ -162,7 +162,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeSearchResultSubstruct1, .free2 = FreeSearchResultSubstruct2, }, - [POKENAV_MATCH_CALL - POKENAV_MENU_IDS_START] = + [POKENAV_MATCH_CALL - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_MatchCall, .callback = GetMatchCallCallback, @@ -172,7 +172,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeMatchCallSubstruct1, .free2 = FreeMatchCallSubstruct2, }, - [POKENAV_RIBBONS_MON_LIST - POKENAV_MENU_IDS_START] = + [POKENAV_RIBBONS_MON_LIST - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_MonRibbonList, .callback = GetRibbonsMonListCallback, @@ -182,7 +182,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeRibbonsMonList1, .free2 = FreeRibbonsMonList2, }, - [POKENAV_RIBBONS_SUMMARY_SCREEN - POKENAV_MENU_IDS_START] = + [POKENAV_RIBBONS_SUMMARY_SCREEN - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_RibbonsSummaryMenu, .callback = GetRibbonsSummaryMenuCallback, @@ -192,7 +192,7 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeRibbonsSummaryScreen1, .free2 = FreeRibbonsSummaryScreen2, }, - [POKENAV_RIBBONS_RETURN_TO_MON_LIST - POKENAV_MENU_IDS_START] = + [POKENAV_RIBBONS_RETURN_TO_MON_LIST - POKENAV_MENU_IDS_START] = { .init = PokenavCallback_Init_RibbonsMonListFromSummary, .callback = GetRibbonsMonListCallback, diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index 61b289ae1f..c415de1ace 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -217,7 +217,7 @@ u8 SwitchConditionSummaryIndex(u8 moveUp) } isNotLastMon = (monListPtr->currIndex != ((IsConditionMenuSearchMode() != 0) ? monListPtr->listCount : monListPtr->listCount - 1)); - + if (!wasNotLastMon) return PARTY_CONDITION_FUNC_NO_TRANSITION; else if (!isNotLastMon) diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index c882befc4f..ef3792063f 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -30,7 +30,7 @@ const u32 gUnknown_08623228[] = INCBIN_U32("graphics/pokenav/8623228.4bpp.lz"); const u32 sConditionGraph_Tilemap[] = INCBIN_U32("graphics/pokenav/862323C.bin.lz"); const u16 sConditionGraphMonMarkingsPal[] = INCBIN_U16("graphics/pokenav/8623338.gbapal"); -const struct BgTemplate sPartyConditionBgTemplates[3] = +const struct BgTemplate sPartyConditionBgTemplates[3] = { { .bg = 1, @@ -61,7 +61,7 @@ const struct BgTemplate sPartyConditionBgTemplates[3] = } }; -const struct WindowTemplate sMonNameGenderWindowTemplate = +const struct WindowTemplate sMonNameGenderWindowTemplate = { .bg = 1, .tilemapLeft = 13, @@ -72,7 +72,7 @@ const struct WindowTemplate sMonNameGenderWindowTemplate = .baseBlock = 2 }; -const struct WindowTemplate sConditionGraphListIdWindowTemplate = +const struct WindowTemplate sConditionGraphListIdWindowTemplate = { .bg = 1, .tilemapLeft = 1, @@ -83,7 +83,7 @@ const struct WindowTemplate sConditionGraphListIdWindowTemplate = .baseBlock = 0x36 }; -const struct WindowTemplate sUnusedWindowTemplate1 = +const struct WindowTemplate sUnusedWindowTemplate1 = { .bg = 1, .tilemapLeft = 1, @@ -94,7 +94,7 @@ const struct WindowTemplate sUnusedWindowTemplate1 = .baseBlock = 0x44 }; -const struct WindowTemplate sUnusedWindowTemplate2 = +const struct WindowTemplate sUnusedWindowTemplate2 = { .bg = 1, .tilemapLeft = 13, diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 712be6f695..219bb5a073 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -102,7 +102,7 @@ static const struct BgTemplate sConditionSearchResultBgTemplates[] = } }; -static const LoopedTask sSearchResultLoopTaskFuncs[] = +static const LoopedTask sSearchResultLoopTaskFuncs[] = { [CONDITION_SEARCH_FUNC_NONE] = NULL, [CONDITION_SEARCH_FUNC_MOVE_UP] = LoopedTask_MoveSearchListCursorUp, @@ -113,7 +113,7 @@ static const LoopedTask sSearchResultLoopTaskFuncs[] = [CONDITION_SEARCH_FUNC_SELECT_MON] = LoopedTask_SelectSearchResult }; -static const struct WindowTemplate sSearchResultListMenuWindowTemplate = +static const struct WindowTemplate sSearchResultListMenuWindowTemplate = { .bg = 1, .tilemapLeft = 1, @@ -664,7 +664,7 @@ static void PrintSearchResultListMenuItems(struct PokenavSub8 *searchList) static void InitConditionSearchListMenuTemplate(void) { struct PokenavListTemplate template; - + template.list.monList = GetSearchResultsMonDataList(); template.count = GetSearchResultsMonListCount(); template.unk8 = 4; diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index fb44aaa876..e9d4c0b673 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -38,16 +38,16 @@ static bool32 sub_81CB1D0(void); #include "data/text/match_call_messages.h" -static const u8 sMatchCallOptionsNoCheckPage[] = +static const u8 sMatchCallOptionsNoCheckPage[] = { - MATCH_CALL_OPTION_CALL, + MATCH_CALL_OPTION_CALL, MATCH_CALL_OPTION_CANCEL }; -static const u8 sMatchCallOptionsHasCheckPage[] = +static const u8 sMatchCallOptionsHasCheckPage[] = { - MATCH_CALL_OPTION_CALL, - MATCH_CALL_OPTION_CHECK, + MATCH_CALL_OPTION_CALL, + MATCH_CALL_OPTION_CHECK, MATCH_CALL_OPTION_CANCEL }; diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 846171efd8..e3f0bb6efc 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -119,7 +119,7 @@ static const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/8622700.gbap static const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/pokeball_matchcall.gbapal"); static const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/pokeball_matchcall.4bpp.lz"); -const struct BgTemplate sMatchCallBgTemplates[3] = +const struct BgTemplate sMatchCallBgTemplates[3] = { { .bg = 1, @@ -150,7 +150,7 @@ const struct BgTemplate sMatchCallBgTemplates[3] = } }; -static const LoopedTask sMatchCallLoopTaskFuncs[] = +static const LoopedTask sMatchCallLoopTaskFuncs[] = { [POKENAV_MC_FUNC_NONE] = NULL, [POKENAV_MC_FUNC_DOWN] = MatchCallListCursorDown, @@ -170,7 +170,7 @@ static const LoopedTask sMatchCallLoopTaskFuncs[] = [POKENAV_MC_FUNC_EXIT] = ExitMatchCall }; -static const struct WindowTemplate sMatchCallLocationWindowTemplate = +static const struct WindowTemplate sMatchCallLocationWindowTemplate = { .bg = 2, .tilemapLeft = 0, @@ -181,7 +181,7 @@ static const struct WindowTemplate sMatchCallLocationWindowTemplate = .baseBlock = 16 }; -static const struct WindowTemplate sMatchCallInfoBoxWindowTemplate = +static const struct WindowTemplate sMatchCallInfoBoxWindowTemplate = { .bg = 2, .tilemapLeft = 0, @@ -192,7 +192,7 @@ static const struct WindowTemplate sMatchCallInfoBoxWindowTemplate = .baseBlock = 38 }; -static const u8 *const sMatchCallOptionTexts[MATCH_CALL_OPTION_COUNT] = +static const u8 *const sMatchCallOptionTexts[MATCH_CALL_OPTION_COUNT] = { [MATCH_CALL_OPTION_CALL] = gText_Call, [MATCH_CALL_OPTION_CHECK] = gText_Check, @@ -202,7 +202,7 @@ static const u8 *const sMatchCallOptionTexts[MATCH_CALL_OPTION_COUNT] = // The series of 5 dots that appear when someone is called with Match Call static const u8 sText_CallingDots[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); -static const struct WindowTemplate sCallMsgBoxWindowTemplate = +static const struct WindowTemplate sCallMsgBoxWindowTemplate = { .bg = 1, .tilemapLeft = 1, @@ -213,17 +213,17 @@ static const struct WindowTemplate sCallMsgBoxWindowTemplate = .baseBlock = 10 }; -const struct CompressedSpriteSheet gUnknown_08622810[1] = +const struct CompressedSpriteSheet gUnknown_08622810[1] = { {gUnknown_086226B8, 0x40, 7} }; -const struct SpritePalette gUnknown_08622818[2] = +const struct SpritePalette gUnknown_08622818[2] = { {gUnknown_08622698, 12} }; -static const struct OamData sOptionsCursorOamData = +static const struct OamData sOptionsCursorOamData = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -235,7 +235,7 @@ static const struct OamData sOptionsCursorOamData = .tileNum = 0, .priority = 1, .paletteNum = 0, -}; +}; static const struct SpriteTemplate sOptionsCursorSpriteTemplate = { @@ -248,7 +248,7 @@ static const struct SpriteTemplate sOptionsCursorSpriteTemplate = .callback = SpriteCB_OptionsCursor, }; -static const struct OamData sTrainerPicOamData = +static const struct OamData sTrainerPicOamData = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -1006,7 +1006,7 @@ static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1) GetMapName(mapName, mapSec, 0); else StringCopy(mapName, gText_Unknown); - + x = GetStringCenterAlignXOffset(7, mapName, 88); FillWindowPixelBuffer(state->locWindowId, PIXEL_FILL(1)); AddTextPrinterParameterized(state->locWindowId, 7, mapName, x, 1, 0, NULL); diff --git a/src/pokenav_match_call_data.c b/src/pokenav_match_call_data.c index 6610dcb803..46ce43d4c1 100644 --- a/src/pokenav_match_call_data.c +++ b/src/pokenav_match_call_data.c @@ -658,38 +658,38 @@ static void (*const sMatchCall_GetNameAndDescFunctions[])(match_call_t, const u8 }; static const struct MatchCallCheckPageOverride sCheckPageOverrides[] = { - { - .idx = MC_HEADER_STEVEN, - .facilityClass = FACILITY_CLASS_STEVEN, - .flag = 0xFFFF, - .flavorTexts = { - [CHECK_PAGE_STRATEGY] = gText_MatchCallSteven_Strategy, - [CHECK_PAGE_POKEMON] = gText_MatchCallSteven_Pokemon, - [CHECK_PAGE_INTRO_1] = gText_MatchCallSteven_Intro1_BeforeMeteorFallsBattle, - [CHECK_PAGE_INTRO_2] = gText_MatchCallSteven_Intro2_BeforeMeteorFallsBattle - } + { + .idx = MC_HEADER_STEVEN, + .facilityClass = FACILITY_CLASS_STEVEN, + .flag = 0xFFFF, + .flavorTexts = { + [CHECK_PAGE_STRATEGY] = gText_MatchCallSteven_Strategy, + [CHECK_PAGE_POKEMON] = gText_MatchCallSteven_Pokemon, + [CHECK_PAGE_INTRO_1] = gText_MatchCallSteven_Intro1_BeforeMeteorFallsBattle, + [CHECK_PAGE_INTRO_2] = gText_MatchCallSteven_Intro2_BeforeMeteorFallsBattle + } }, - { - .idx = MC_HEADER_STEVEN, - .facilityClass = FACILITY_CLASS_STEVEN, - .flag = FLAG_DEFEATED_MOSSDEEP_GYM, - .flavorTexts = { - [CHECK_PAGE_STRATEGY] = gText_MatchCallSteven_Strategy, - [CHECK_PAGE_POKEMON] = gText_MatchCallSteven_Pokemon, - [CHECK_PAGE_INTRO_1] = gText_MatchCallSteven_Intro1_AfterMeteorFallsBattle, - [CHECK_PAGE_INTRO_2] = gText_MatchCallSteven_Intro2_AfterMeteorFallsBattle - } + { + .idx = MC_HEADER_STEVEN, + .facilityClass = FACILITY_CLASS_STEVEN, + .flag = FLAG_DEFEATED_MOSSDEEP_GYM, + .flavorTexts = { + [CHECK_PAGE_STRATEGY] = gText_MatchCallSteven_Strategy, + [CHECK_PAGE_POKEMON] = gText_MatchCallSteven_Pokemon, + [CHECK_PAGE_INTRO_1] = gText_MatchCallSteven_Intro1_AfterMeteorFallsBattle, + [CHECK_PAGE_INTRO_2] = gText_MatchCallSteven_Intro2_AfterMeteorFallsBattle + } }, - { - .idx = MC_HEADER_BRENDAN, - .facilityClass = FACILITY_CLASS_BRENDAN, - .flag = 0xFFFF, + { + .idx = MC_HEADER_BRENDAN, + .facilityClass = FACILITY_CLASS_BRENDAN, + .flag = 0xFFFF, .flavorTexts = MCFLAVOR(Brendan) }, - { - .idx = MC_HEADER_MAY, - .facilityClass = FACILITY_CLASS_MAY, - .flag = 0xFFFF, + { + .idx = MC_HEADER_MAY, + .facilityClass = FACILITY_CLASS_MAY, + .flag = 0xFFFF, .flavorTexts = MCFLAVOR(May) } }; @@ -896,12 +896,12 @@ static bool32 MatchCall_HasCheckPage_Wally(match_call_t matchCall) return TRUE; } -static bool32 MatchCall_HasCheckPage_Rival(match_call_t matchCall) +static bool32 MatchCall_HasCheckPage_Rival(match_call_t matchCall) { return FALSE; } -static bool32 MatchCall_HasCheckPage_Birch(match_call_t matchCall) +static bool32 MatchCall_HasCheckPage_Birch(match_call_t matchCall) { return FALSE; } diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 7e70a50c88..ba495245b6 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -741,11 +741,11 @@ void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId) static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *list, u32 checkPageEntry) { // lines 1, 3, and 5 are the field names printed by PrintMatchCallFieldNames - static const u8 lineOffsets[CHECK_PAGE_ENTRY_COUNT] = + static const u8 lineOffsets[CHECK_PAGE_ENTRY_COUNT] = { - [CHECK_PAGE_STRATEGY] = 2, - [CHECK_PAGE_POKEMON] = 4, - [CHECK_PAGE_INTRO_1] = 6, + [CHECK_PAGE_STRATEGY] = 2, + [CHECK_PAGE_POKEMON] = 4, + [CHECK_PAGE_INTRO_1] = 6, [CHECK_PAGE_INTRO_2] = 7 }; diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index ff219b71e3..5f6c4460a4 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -118,7 +118,7 @@ static const struct BgTemplate sPokenavMainMenuBgTemplates[] = { } }; -static const LoopedTask sMenuHandlerLoopTaskFuncs[] = +static const LoopedTask sMenuHandlerLoopTaskFuncs[] = { [POKENAV_MENU_FUNC_NONE] = NULL, [POKENAV_MENU_FUNC_MOVE_CURSOR] = LoopedTask_MoveMenuCursor, @@ -179,31 +179,31 @@ struct OptionsLabelGfx static const struct OptionsLabelGfx sPokenavMenuOptionLabelGfx[POKENAV_MENU_TYPE_COUNT] = { - [POKENAV_MENU_TYPE_DEFAULT] = + [POKENAV_MENU_TYPE_DEFAULT] = { .yStart = 42, .deltaY = 20, {sOptionsLabelGfx_RegionMap, sOptionsLabelGfx_Condition, sOptionsLabelGfx_SwitchOff} }, - [POKENAV_MENU_TYPE_UNLOCK_MC] = + [POKENAV_MENU_TYPE_UNLOCK_MC] = { .yStart = 42, .deltaY = 20, {sOptionsLabelGfx_RegionMap, sOptionsLabelGfx_Condition, sOptionsLabelGfx_MatchCall, sOptionsLabelGfx_SwitchOff} }, - [POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] = + [POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] = { .yStart = 42, .deltaY = 20, {sOptionsLabelGfx_RegionMap, sOptionsLabelGfx_Condition, sOptionsLabelGfx_MatchCall, sOptionsLabelGfx_Ribbons, sOptionsLabelGfx_SwitchOff} }, - [POKENAV_MENU_TYPE_CONDITION] = + [POKENAV_MENU_TYPE_CONDITION] = { .yStart = 56, .deltaY = 20, {sOptionsLabelGfx_Party, sOptionsLabelGfx_Search, sOptionsLabelGfx_Cancel} }, - [POKENAV_MENU_TYPE_CONDITION_SEARCH] = + [POKENAV_MENU_TYPE_CONDITION_SEARCH] = { .yStart = 40, .deltaY = 16, @@ -341,7 +341,7 @@ bool32 OpenPokenavMenuInitial(void) if (state == NULL) return FALSE; - + state->pokenavAlreadyOpen = FALSE; return TRUE; } diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 3c210ed97a..13a7030da2 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -79,7 +79,7 @@ static const u32 sRegionMapCityZoomTiles_Gfx[] = INCBIN_U32("graphics/pokenav/zo #include "data/region_map/city_map_tilemaps.h" -static const struct BgTemplate sRegionMapBgTemplates[3] = +static const struct BgTemplate sRegionMapBgTemplates[3] = { { .bg = 1, @@ -110,7 +110,7 @@ static const struct BgTemplate sRegionMapBgTemplates[3] = }, }; -static const LoopedTask sRegionMapLoopTaskFuncs[] = +static const LoopedTask sRegionMapLoopTaskFuncs[] = { [POKENAV_MAP_FUNC_NONE] = NULL, [POKENAV_MAP_FUNC_CURSOR_MOVED] = LoopedTask_UpdateInfoAfterCursorMove, @@ -119,18 +119,18 @@ static const LoopedTask sRegionMapLoopTaskFuncs[] = [POKENAV_MAP_FUNC_EXIT] = LoopedTask_ExitRegionMap }; -static const struct CompressedSpriteSheet sCityZoomTextSpriteSheet[1] = +static const struct CompressedSpriteSheet sCityZoomTextSpriteSheet[1] = { {gRegionMapCityZoomText_Gfx, 0x800, 6} }; -static const struct SpritePalette sCityZoomTilesSpritePalette[] = +static const struct SpritePalette sCityZoomTilesSpritePalette[] = { {gRegionMapCityZoomTiles_Pal, 11}, {} }; -static const struct WindowTemplate sMapSecInfoWindowTemplate = +static const struct WindowTemplate sMapSecInfoWindowTemplate = { .bg = 1, .tilemapLeft = 17, @@ -143,7 +143,7 @@ static const struct WindowTemplate sMapSecInfoWindowTemplate = #include "data/region_map/city_map_entries.h" -const struct OamData sCityZoomTextSprite_OamData = +const struct OamData sCityZoomTextSprite_OamData = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -592,7 +592,7 @@ static void Task_ChangeBgYForZoom(u8 taskId) ChangeBgY(1, 0, 0); DestroyTask(taskId); } - + UpdateCityZoomTextPosition(); } else diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index a7644fdaaf..92b1a48954 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -32,7 +32,7 @@ enum #define PALTAG_RIBBON_ICONS_5 19 #define RIBBONS_PER_ROW 9 -#define GIFT_RIBBON_ROW (1 + (FIRST_GIFT_RIBBON / RIBBONS_PER_ROW)) // Gift ribbons start on a new row after the normal ribbons. +#define GIFT_RIBBON_ROW (1 + (FIRST_GIFT_RIBBON / RIBBONS_PER_ROW)) // Gift ribbons start on a new row after the normal ribbons. #define GIFT_RIBBON_START_POS (RIBBONS_PER_ROW * GIFT_RIBBON_ROW) #define MON_SPRITE_X_ON 40 @@ -828,11 +828,11 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) } else { - // ribbonId here is one of the 'gift' ribbon slots, used to read + // ribbonId here is one of the 'gift' ribbon slots, used to read // its actual value from giftRibbons to determine which specific // gift ribbon it is ribbonId = gSaveBlock1Ptr->giftRibbons[ribbonId - FIRST_GIFT_RIBBON]; - + // If 0, this gift ribbon slot is unoccupied if (ribbonId == 0) return; diff --git a/src/post_battle_event_funcs.c b/src/post_battle_event_funcs.c index 081a402188..8c209f9082 100644 --- a/src/post_battle_event_funcs.c +++ b/src/post_battle_event_funcs.c @@ -64,7 +64,7 @@ int GameClear(void) { IncrementGameStat(GAME_STAT_RECEIVED_RIBBONS); FlagSet(FLAG_SYS_RIBBON_GET); - + for (i = 1; i < 6; i++) { if (ribbonCounts[i].count > ribbonCounts[0].count) diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c index f2c5a319c4..642fe6233b 100644 --- a/src/rayquaza_scene.c +++ b/src/rayquaza_scene.c @@ -2392,7 +2392,7 @@ static void SpriteCB_Descends_Rayquaza(struct Sprite *sprite) { s16 *data = sprite->data; s16 frame = sTimer; - + // Updates to Rayquaza's coords occur more frequently // as time goes on (it accelerates as it emerges) if (frame == 0) diff --git a/src/record_mixing.c b/src/record_mixing.c index aa6e4eef2a..6b538eaf4f 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -952,7 +952,7 @@ static void Task_DoRecordMixing(u8 taskId) else task->data[0] = 6; break; - + // Mixing Ruby/Sapphire records. case 2: SetContinueGameWarpStatusToDynamicWarp(); diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index 528a0e52d2..f451bfce34 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -80,33 +80,33 @@ static const struct BgTemplate sBgTemplates[] = static const struct WindowTemplate sWindowTemplates[] = { { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 1, - .width = 19, - .height = 9, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 19, + .height = 9, + .paletteNum = 15, .baseBlock = 0x155 }, { - .bg = 0, - .tilemapLeft = 2, - .tilemapTop = 15, - .width = 27, - .height = 4, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 27, + .height = 4, + .paletteNum = 15, .baseBlock = 0xE9 }, DUMMY_WIN_TEMPLATE }; static const struct WindowTemplate sInputTimeWindow = { - .bg = 0, - .tilemapLeft = 4, - .tilemapTop = 9, - .width = 21, - .height = 2, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 4, + .tilemapTop = 9, + .width = 21, + .height = 2, + .paletteNum = 15, .baseBlock = 0xBF }; @@ -362,7 +362,7 @@ static void PrintTime(u8 windowId, u8 x, u8 y, u16 days, u8 hours, u8 minutes, u { u8 *dest = gStringVar4; - // Print days + // Print days ConvertIntToDecimalStringN(gStringVar1, days, STR_CONV_MODE_RIGHT_ALIGN, 4); dest = StringCopy(dest, gStringVar1); dest = StringCopy(dest, gText_Day); @@ -648,7 +648,7 @@ static void Task_ResetRtcScreen(u8 taskId) case MAINSTATE_CHECK_SAVE: if (!gPaletteFade.active) { - if (gSaveFileStatus == SAVE_STATUS_EMPTY + if (gSaveFileStatus == SAVE_STATUS_EMPTY || gSaveFileStatus == SAVE_STATUS_CORRUPT) { ShowMessage(gText_NoSaveFileCantSetTime); diff --git a/src/rotating_tile_puzzle.c b/src/rotating_tile_puzzle.c index fd26361dd7..a3bee41808 100644 --- a/src/rotating_tile_puzzle.c +++ b/src/rotating_tile_puzzle.c @@ -10,7 +10,7 @@ #define ROTATE_COUNTERCLOCKWISE 0 #define ROTATE_CLOCKWISE 1 -#define ROTATE_NONE 2 +#define ROTATE_NONE 2 struct RotatingTileObject { @@ -129,7 +129,7 @@ u16 MoveRotatingTileObjects(u8 puzzleNumber) puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right; // Object is on a metatile before the puzzle tile section - // UB: Because this is not if (metatile < puzzleTileStart), for the trick house (metatile - puzzleTileStart) below can result in casting a negative value to u8 + // UB: Because this is not if (metatile < puzzleTileStart), for the trick house (metatile - puzzleTileStart) below can result in casting a negative value to u8 if (metatile < METATILE_MossdeepGym_YellowArrow_Right) continue; @@ -223,7 +223,7 @@ void TurnRotatingTileObjects(void) // Which means tileDifference will always either be -1 or 3 after the below subtraction, and rotation will always be ROTATE_COUNTERCLOCKWISE after the following conditionals tileDifference = (u8)((metatile - puzzleTileStart) % 8); tileDifference -= (sRotatingTilePuzzle->objects[i].prevPuzzleTileNum); - + // Always true, see above if (tileDifference < 0 || tileDifference == 3) { diff --git a/src/roulette.c b/src/roulette.c index 14ae165567..9b494d7527 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -148,7 +148,7 @@ #define GFXTAG_SHADOW 14 // 2 different Roulette tables with 2 different rates (normal vs service day special) -// & 1 gets which table, >> 7 gets if ROULETTE_SPECIAL_RATE is set +// & 1 gets which table, >> 7 gets if ROULETTE_SPECIAL_RATE is set #define GET_MIN_BET_ID(var)(((var) & 1) + (((var) >> 7) * 2)) // Having Shroomish or Taillow in the party can make rolls more consistent in length @@ -1448,7 +1448,7 @@ static void ProcessBetGridInput(u8 taskId) RouletteFlash_Stop(&sRoulette->flashUtil, 0xFFFF); sRoulette->flashUtil.palettes[FLASH_ICON].available = sRoulette->flashUtil.palettes[FLASH_ICON_2].available = sRoulette->flashUtil.palettes[FLASH_ICON_3].available = FALSE; FlashSelectionOnWheel(gTasks[taskId].tSelectionId); - + // Switch all the poke (column) headers to gray outlines for (i = 0; i < NUM_BOARD_POKES; i++) { @@ -1568,11 +1568,11 @@ static u8 GetRandomForBallTravelDistance(u16 ballNum, u16 rand) else return 1; } - else if (!(rand & 3)) + else if (!(rand & 3)) { return sRouletteTables[sRoulette->tableId].randDistanceLow / 2; } - else + else { return sRouletteTables[sRoulette->tableId].randDistanceLow; } @@ -1586,11 +1586,11 @@ static u8 GetRandomForBallTravelDistance(u16 ballNum, u16 rand) else return 1; } - else if ((rand & 1) && ballNum > BALLS_PER_ROUND) + else if ((rand & 1) && ballNum > BALLS_PER_ROUND) { return sRouletteTables[sRoulette->tableId].randDistanceLow / 4; } - else + else { return sRouletteTables[sRoulette->tableId].randDistanceLow / 2; } @@ -2060,14 +2060,14 @@ static u8 RecordHit(u8 taskId, u8 slotId) { u8 i, j; u32 columnFlags[NUM_BOARD_POKES] = { - F_WYNAUT_COL | F_ORANGE_WYNAUT | F_GREEN_WYNAUT | F_PURPLE_WYNAUT, - F_AZURILL_COL | F_ORANGE_AZURILL | F_GREEN_AZURILL | F_PURPLE_AZURILL, - F_SKITTY_COL | F_ORANGE_SKITTY | F_GREEN_SKITTY | F_PURPLE_SKITTY, + F_WYNAUT_COL | F_ORANGE_WYNAUT | F_GREEN_WYNAUT | F_PURPLE_WYNAUT, + F_AZURILL_COL | F_ORANGE_AZURILL | F_GREEN_AZURILL | F_PURPLE_AZURILL, + F_SKITTY_COL | F_ORANGE_SKITTY | F_GREEN_SKITTY | F_PURPLE_SKITTY, F_MAKUHITA_COL | F_ORANGE_MAKUHITA | F_GREEN_MAKUHITA | F_PURPLE_MAKUHITA }; u32 rowFlags[NUM_BOARD_COLORS] = { - F_ORANGE_ROW | F_ORANGE_WYNAUT | F_ORANGE_AZURILL | F_ORANGE_SKITTY | F_ORANGE_MAKUHITA, - F_GREEN_ROW | F_GREEN_WYNAUT | F_GREEN_AZURILL | F_GREEN_SKITTY | F_GREEN_MAKUHITA, + F_ORANGE_ROW | F_ORANGE_WYNAUT | F_ORANGE_AZURILL | F_ORANGE_SKITTY | F_ORANGE_MAKUHITA, + F_GREEN_ROW | F_GREEN_WYNAUT | F_GREEN_AZURILL | F_GREEN_SKITTY | F_GREEN_MAKUHITA, F_PURPLE_ROW | F_PURPLE_WYNAUT | F_PURPLE_AZURILL | F_PURPLE_SKITTY | F_PURPLE_MAKUHITA }; @@ -2109,15 +2109,15 @@ static bool8 IsHitInBetSelection(u8 gridSquare, u8 betSelection) case COL_AZURILL: case COL_SKITTY: case COL_MAKUHITA: - if (hit == betSelection + ROW_ORANGE - || hit == betSelection + ROW_GREEN + if (hit == betSelection + ROW_ORANGE + || hit == betSelection + ROW_GREEN || hit == betSelection + ROW_PURPLE) return TRUE; break; case ROW_ORANGE: case ROW_GREEN: case ROW_PURPLE: - if (hit >= (betSelection + COL_WYNAUT) + if (hit >= (betSelection + COL_WYNAUT) && hit <= (betSelection + COL_MAKUHITA)) return TRUE; break; @@ -3438,7 +3438,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) PrintCoinsString(gTasks[taskId].tCoins); minBet = sTableMinBets[GET_MIN_BET_ID(gSpecialVar_0x8004)]; ConvertIntToDecimalStringN(gStringVar1, minBet, STR_CONV_MODE_LEADING_ZEROS, 1); - + if (gTasks[taskId].tCoins >= minBet) { if ((gSpecialVar_0x8004 & ROULETTE_SPECIAL_RATE) && (gSpecialVar_0x8004 & 1)) diff --git a/src/scrcmd.c b/src/scrcmd.c index f53483978b..dfda7b3a2d 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -459,7 +459,7 @@ bool8 ScrCmd_compare_var_to_var(struct ScriptContext *ctx) return FALSE; } -// Note: addvar doesn't support adding from a variable in vanilla. If you were to +// Note: addvar doesn't support adding from a variable in vanilla. If you were to // add a VarGet() to the above, make sure you change the `addvar VAR_*, -1` // in the contest scripts to `subvar VAR_*, 1`, else contests will break. bool8 ScrCmd_addvar(struct ScriptContext *ctx) @@ -649,7 +649,7 @@ bool8 ScrCmd_fadescreenswapbuffers(struct ScriptContext *ctx) switch (mode) { case FADE_TO_BLACK: - case FADE_TO_WHITE: + case FADE_TO_WHITE: default: CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_DECOMP_BUFFER_SIZE); FadeScreen(mode, 0); diff --git a/src/script_movement.c b/src/script_movement.c index 013270697f..92f36e92d9 100644 --- a/src/script_movement.c +++ b/src/script_movement.c @@ -66,7 +66,7 @@ static void ScriptMovement_StartMoveObjects(u8 priority) taskId = CreateTask(ScriptMovement_MoveObjects, priority); - for (i = 1; i < NUM_TASK_DATA; i++) + for (i = 1; i < NUM_TASK_DATA; i++) gTasks[taskId].data[i] = 0xFFFF; } diff --git a/src/secret_base.c b/src/secret_base.c index ce455642b1..0a1472e311 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -325,7 +325,7 @@ void ToggleSecretBaseEntranceMetatile(void) GetXYCoordsOneStepInFrontOfPlayer(&x, &y); metatileId = MapGridGetMetatileIdAt(x, y); - + // Look for entrance metatiles to open for (i = 0; i < ARRAY_COUNT(sSecretBaseEntranceMetatiles); i++) { @@ -1226,28 +1226,28 @@ void SecretBasePerStepCallback(u8 taskId) VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SOLID_BOARD); } } - else if (tileId == METATILE_SecretBase_SmallChair - || tileId == METATILE_SecretBase_PokemonChair - || tileId == METATILE_SecretBase_HeavyChair - || tileId == METATILE_SecretBase_PrettyChair - || tileId == METATILE_SecretBase_ComfortChair - || tileId == METATILE_SecretBase_RaggedChair - || tileId == METATILE_SecretBase_BrickChair - || tileId == METATILE_SecretBase_CampChair + else if (tileId == METATILE_SecretBase_SmallChair + || tileId == METATILE_SecretBase_PokemonChair + || tileId == METATILE_SecretBase_HeavyChair + || tileId == METATILE_SecretBase_PrettyChair + || tileId == METATILE_SecretBase_ComfortChair + || tileId == METATILE_SecretBase_RaggedChair + || tileId == METATILE_SecretBase_BrickChair + || tileId == METATILE_SecretBase_CampChair || tileId == METATILE_SecretBase_HardChair) { if (sInFriendSecretBase == TRUE) VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_CHAIR); } - else if (tileId == METATILE_SecretBase_RedTent_DoorTop - || tileId == METATILE_SecretBase_RedTent_Door - || tileId == METATILE_SecretBase_BlueTent_DoorTop + else if (tileId == METATILE_SecretBase_RedTent_DoorTop + || tileId == METATILE_SecretBase_RedTent_Door + || tileId == METATILE_SecretBase_BlueTent_DoorTop || tileId == METATILE_SecretBase_BlueTent_Door) { if (sInFriendSecretBase == TRUE) VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_TENT); } - else if ((behavior == MB_IMPASSABLE_NORTHEAST && tileId == METATILE_SecretBase_Stand_CornerRight) + else if ((behavior == MB_IMPASSABLE_NORTHEAST && tileId == METATILE_SecretBase_Stand_CornerRight) || (behavior == MB_IMPASSABLE_NORTHWEST && MapGridGetMetatileIdAt(x, y) == METATILE_SecretBase_Stand_CornerLeft)) { if (sInFriendSecretBase == TRUE) @@ -1490,7 +1490,7 @@ static void SortSecretBasesByRegistryStatus(void) { for (j = i + 1; j < SECRET_BASES_COUNT; j++) { - if ((secretBases[i].registryStatus == UNREGISTERED && secretBases[j].registryStatus == REGISTERED) + if ((secretBases[i].registryStatus == UNREGISTERED && secretBases[j].registryStatus == REGISTERED) || (secretBases[i].registryStatus == NEW && secretBases[j].registryStatus != NEW)) { struct SecretBase temp; diff --git a/src/slot_machine.c b/src/slot_machine.c index 157f3625e4..301384be32 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -660,12 +660,12 @@ static const struct BgTemplate sBgTemplates[] = static const struct WindowTemplate sWindowTemplates[] = { { - .bg = 0, - .tilemapLeft = 2, - .tilemapTop = 15, - .width = 27, - .height = 4, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 27, + .height = 4, + .paletteNum = 15, .baseBlock = 0x194 }, DUMMY_WIN_TEMPLATE @@ -673,12 +673,12 @@ static const struct WindowTemplate sWindowTemplates[] = static const struct WindowTemplate sWindowTemplate_InfoBox = { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 3, - .width = 20, - .height = 13, - .paletteNum = 13, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 3, + .width = 20, + .height = 13, + .paletteNum = 13, .baseBlock = 1 }; @@ -2184,8 +2184,8 @@ static bool8 AreTagsAtPosition_Reel1(s16 pos, u8 tag1, u8 tag2) static bool8 AreCherriesOnScreen_Reel1(s16 offsetFromCenter) { - if (GetTag(LEFT_REEL, 1 - offsetFromCenter) == GFXTAG_CHERRY - || GetTag(LEFT_REEL, 2 - offsetFromCenter) == GFXTAG_CHERRY + if (GetTag(LEFT_REEL, 1 - offsetFromCenter) == GFXTAG_CHERRY + || GetTag(LEFT_REEL, 2 - offsetFromCenter) == GFXTAG_CHERRY || GetTag(LEFT_REEL, 3 - offsetFromCenter) == GFXTAG_CHERRY) return TRUE; else @@ -4900,14 +4900,14 @@ static const u16 sSlotMatchFlags[] = { }; static const u16 sSlotPayouts[] = { - [MATCHED_1CHERRY] = 2, - [MATCHED_2CHERRY] = 4, - [MATCHED_REPLAY] = 0, - [MATCHED_LOTAD] = 6, - [MATCHED_AZURILL] = 12, - [MATCHED_POWER] = 3, - [MATCHED_777_MIXED] = 90, - [MATCHED_777_RED] = 300, + [MATCHED_1CHERRY] = 2, + [MATCHED_2CHERRY] = 4, + [MATCHED_REPLAY] = 0, + [MATCHED_LOTAD] = 6, + [MATCHED_AZURILL] = 12, + [MATCHED_POWER] = 3, + [MATCHED_777_MIXED] = 90, + [MATCHED_777_RED] = 300, [MATCHED_777_BLUE] = 300 }; @@ -5072,7 +5072,7 @@ static void (*const sDigitalDisplaySceneExitCallbacks[])(void) = { [DIG_DISPLAY_BONUS_BIG] = EndDigitalDisplayScene_Win }; -static const struct OamData sOam_8x8 = +static const struct OamData sOam_8x8 = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -5221,7 +5221,7 @@ static const struct SpriteFrameImage sImageTable_ReelTimeNumbers[] = static const struct SpriteFrameImage sImageTable_ReelTimeShadow[] = { gSlotMachineReelTimeShadow, 0x200 }; static const struct SpriteFrameImage sImageTable_ReelTimeNumberGap[] = { gSlotMachineReelTimeNumberGap_Gfx, 0x40 }; -static const struct SpriteFrameImage sImageTable_ReelTimeBolt[] = +static const struct SpriteFrameImage sImageTable_ReelTimeBolt[] = { { gSlotMachineReelTimeBolt0, 0x100 }, { gSlotMachineReelTimeBolt1, 0x100 }, @@ -5229,8 +5229,8 @@ static const struct SpriteFrameImage sImageTable_ReelTimeBolt[] = static const struct SpriteFrameImage sImageTable_ReelTimePikachuAura[] = { gSlotMachineReelTimePikaAura, 0x400 }; -static const struct SpriteFrameImage sImageTable_ReelTimeExplosion[] = -{ +static const struct SpriteFrameImage sImageTable_ReelTimeExplosion[] = +{ { gSlotMachineReelTimeExplosion0, 0x200 }, { gSlotMachineReelTimeExplosion1, 0x200 }, }; @@ -5239,13 +5239,13 @@ static const struct SpriteFrameImage sImageTable_ReelTimeDuck[] = { gSlotMachine static const struct SpriteFrameImage sImageTable_ReelTimeSmoke[] = { gSlotMachineReelTimeSmoke, 0x80}; static const struct SpriteFrameImage sImageTable_PikaPowerBolt[] = { gSlotMachinePikaPowerBolt, 0x20}; -static const union AnimCmd sAnim_SingleFrame[] = +static const union AnimCmd sAnim_SingleFrame[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END }; -static const union AnimCmd sAnim_ReelTimeDuck[] = +static const union AnimCmd sAnim_ReelTimeDuck[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_JUMP(0) @@ -5510,367 +5510,367 @@ static const union AffineAnimCmd *const sAffineAnims_PikaPowerBolt[] = static const struct SpriteTemplate sSpriteTemplate_ReelSymbol = { - .tileTag = GFXTAG_SYMBOLS_START, - .paletteTag = PALTAG_REEL, - .oam = &sOam_32x32, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = GFXTAG_SYMBOLS_START, + .paletteTag = PALTAG_REEL, + .oam = &sOam_32x32, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_ReelSymbol }; static const struct SpriteTemplate sSpriteTemplate_CoinNumber = { - .tileTag = GFXTAG_NUMBERS_START, - .paletteTag = PALTAG_MISC, - .oam = &sOam_8x16, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = GFXTAG_NUMBERS_START, + .paletteTag = PALTAG_MISC, + .oam = &sOam_8x16, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_CoinNumber }; static const struct SpriteTemplate sSpriteTemplate_ReelBackground = { - .tileTag = GFXTAG_REEL_BG, - .paletteTag = PALTAG_REEL, - .oam = &sOam_64x64, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = GFXTAG_REEL_BG, + .paletteTag = PALTAG_REEL, + .oam = &sOam_64x64, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_ReelTimePikachu = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_REEL_TIME_PIKACHU, - .oam = &sOam_64x64, - .anims = sAnims_ReelTimePikachu, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_REEL_TIME_PIKACHU, + .oam = &sOam_64x64, + .anims = sAnims_ReelTimePikachu, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_ReelTimePikachu }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeMachineAntennae = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_REEL_TIME_MISC, - .oam = &sOam_8x16, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_REEL_TIME_MISC, + .oam = &sOam_8x16, .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeMachine = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_REEL_TIME_MACHINE, - .oam = &sOam_8x16, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_REEL_TIME_MACHINE, + .oam = &sOam_8x16, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_BrokenReelTimeMachine = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_REEL_TIME_MACHINE, - .oam = &sOam_8x16, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_REEL_TIME_MACHINE, + .oam = &sOam_8x16, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeNumbers = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_MISC, - .oam = &sOam_16x16, - .anims = sAnims_ReelTimeNumbers, - .images = sImageTable_ReelTimeNumbers, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_MISC, + .oam = &sOam_16x16, + .anims = sAnims_ReelTimeNumbers, + .images = sImageTable_ReelTimeNumbers, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_ReelTimeNumbers }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeShadow = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_MISC, - .oam = &sOam_16x16, - .anims = sAnims_SingleFrame, - .images = sImageTable_ReelTimeShadow, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_MISC, + .oam = &sOam_16x16, + .anims = sAnims_SingleFrame, + .images = sImageTable_ReelTimeShadow, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeNumberGap = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_MISC, - .oam = &sOam_16x16, - .anims = sAnims_SingleFrame, - .images = sImageTable_ReelTimeNumberGap, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_MISC, + .oam = &sOam_16x16, + .anims = sAnims_SingleFrame, + .images = sImageTable_ReelTimeNumberGap, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeBolt = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_MISC, - .oam = &sOam_16x32, - .anims = sAnims_ReelTimeBolt, - .images = sImageTable_ReelTimeBolt, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_MISC, + .oam = &sOam_16x32, + .anims = sAnims_ReelTimeBolt, + .images = sImageTable_ReelTimeBolt, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_ReelTimeBolt }; static const struct SpriteTemplate sSpriteTemplate_ReelTimePikachuAura = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_PIKA_AURA, - .oam = &sOam_32x64, - .anims = sAnims_SingleFrame, - .images = sImageTable_ReelTimePikachuAura, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_PIKA_AURA, + .oam = &sOam_32x64, + .anims = sAnims_SingleFrame, + .images = sImageTable_ReelTimePikachuAura, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_ReelTimePikachuAura }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeExplosion = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_EXPLOSION, - .oam = &sOam_32x32, - .anims = sAnims_ReelTimeExplosion, - .images = sImageTable_ReelTimeExplosion, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_EXPLOSION, + .oam = &sOam_32x32, + .anims = sAnims_ReelTimeExplosion, + .images = sImageTable_ReelTimeExplosion, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_ReelTimeExplosion }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeDuck = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_MISC, - .oam = &sOam_8x8, - .anims = sAnims_ReelTimeDuck, - .images = sImageTable_ReelTimeDuck, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_MISC, + .oam = &sOam_8x8, + .anims = sAnims_ReelTimeDuck, + .images = sImageTable_ReelTimeDuck, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_ReelTimeDuck }; static const struct SpriteTemplate sSpriteTemplate_ReelTimeSmoke = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_MISC, - .oam = &sOam_16x16, - .anims = sAnims_SingleFrame, - .images = sImageTable_ReelTimeSmoke, - .affineAnims = sAffineAnims_ReelTimeSmoke, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_MISC, + .oam = &sOam_16x16, + .anims = sAnims_SingleFrame, + .images = sImageTable_ReelTimeSmoke, + .affineAnims = sAffineAnims_ReelTimeSmoke, .callback = SpriteCB_ReelTimeSmoke }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Reel = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Time = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Insert = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Stop = { - .tileTag = 18, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 18, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Win = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_64x32, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_64x32, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Lose = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_64x32, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_64x32, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Bonus = { - .tileTag = 19, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 19, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Big = { - .tileTag = 20, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 20, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Reg = { - .tileTag = 21, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 21, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_AButton = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_32x32, - .anims = sAnims_DigitalDisplay_AButton, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_32x32, + .anims = sAnims_DigitalDisplay_AButton, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Smoke = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Number = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_16x16, - .anims = sAnims_DigitalDisplay_Number, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_16x16, + .anims = sAnims_DigitalDisplay_Number, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Pokeball = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_DigitalDisplay_Pokeball, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_DigitalDisplay_Pokeball, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_DPad = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_DIG_DISPLAY, - .oam = &sOam_8x8, - .anims = sAnims_DigitalDisplay_DPad, - .images = NULL, - .affineAnims = gDummySpriteAffineAnimTable, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_DIG_DISPLAY, + .oam = &sOam_8x8, + .anims = sAnims_DigitalDisplay_DPad, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; static const struct SpriteTemplate sSpriteTemplate_PikaPowerBolt = { - .tileTag = 0xFFFF, - .paletteTag = PALTAG_MISC, - .oam = &sOam_8x8, - .anims = sAnims_SingleFrame, - .images = sImageTable_PikaPowerBolt, - .affineAnims = sAffineAnims_PikaPowerBolt, + .tileTag = 0xFFFF, + .paletteTag = PALTAG_MISC, + .oam = &sOam_8x8, + .anims = sAnims_SingleFrame, + .images = sImageTable_PikaPowerBolt, + .affineAnims = sAffineAnims_PikaPowerBolt, .callback = SpriteCB_PikaPowerBolt }; static const struct Subsprite sSubsprites_ReelBackground[] = { { - .x = -64, - .y = -64, + .x = -64, + .y = -64, .shape = SPRITE_SHAPE(64x64), .size = SPRITE_SIZE(64x64), - .tileOffset = 0, - .priority = 3, + .tileOffset = 0, + .priority = 3, }, { - .x = 0, - .y = -64, + .x = 0, + .y = -64, .shape = SPRITE_SHAPE(64x64), .size = SPRITE_SIZE(64x64), - .tileOffset = 0, - .priority = 3, + .tileOffset = 0, + .priority = 3, }, { .x = -64, - .y = 0, + .y = 0, .shape = SPRITE_SHAPE(64x64), .size = SPRITE_SIZE(64x64), - .tileOffset = 0, - .priority = 3, + .tileOffset = 0, + .priority = 3, }, { - .x = 0, - .y = 0, + .x = 0, + .y = 0, .shape = SPRITE_SHAPE(64x64), .size = SPRITE_SIZE(64x64), - .tileOffset = 0, - .priority = 3, + .tileOffset = 0, + .priority = 3, } }; @@ -5881,52 +5881,52 @@ static const struct SubspriteTable sSubspriteTable_ReelBackground[] = static const struct Subsprite sSubsprites_ReelTimeMachineAntennae[] = { - { - .x = -32, - .y = -12, + { + .x = -32, + .y = -12, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 0, + .tileOffset = 0, .priority = 1, }, - { - .x = 0, - .y = -12, + { + .x = 0, + .y = -12, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 4, .priority = 1, }, - { - .x = -32, - .y = -4, + { + .x = -32, + .y = -4, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 8, + .tileOffset = 8, .priority = 1, }, - { - .x = 0, - .y = -4, + { + .x = 0, + .y = -4, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 12, .priority = 1, }, - { - .x = -32, - .y = 4, + { + .x = -32, + .y = 4, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 16, .priority = 1, }, - { - .x = 0, - .y = 4, + { + .x = 0, + .y = 4, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), - .tileOffset = 20, + .tileOffset = 20, .priority = 1 } }; @@ -5938,25 +5938,25 @@ static const struct SubspriteTable sSubspriteTable_ReelTimeMachineAntennae[] = static const struct Subsprite sSubsprites_ReelTimeMachine[] = { - { - .x = -32, - .y = -20, + { + .x = -32, + .y = -20, .shape = SPRITE_SHAPE(64x32), .size = SPRITE_SIZE(64x32), .tileOffset = 0, .priority = 1, }, - { - .x = -32, - .y = 12, + { + .x = -32, + .y = 12, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 32, .priority = 1, }, - { - .x = 0, - .y = 12, + { + .x = 0, + .y = 12, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 36, @@ -5971,41 +5971,41 @@ static const struct SubspriteTable sSubspriteTable_ReelTimeMachine[] = static const struct Subsprite sSubsprites_BrokenReelTimeMachine[] = { - { - .x = -32, - .y = -24, + { + .x = -32, + .y = -24, .shape = SPRITE_SHAPE(64x32), .size = SPRITE_SIZE(64x32), .tileOffset = 0, .priority = 1, }, - { - .x = -32, - .y = 8, + { + .x = -32, + .y = 8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 32, .priority = 1, }, - { - .x = 0, - .y = 8, + { + .x = 0, + .y = 8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 36, .priority = 1, }, - { - .x = -32, - .y = 16, + { + .x = -32, + .y = 16, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 40, .priority = 1, }, - { - .x = 0, - .y = 16, + { + .x = 0, + .y = 16, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 44, @@ -6020,33 +6020,33 @@ static const struct SubspriteTable sSubspriteTable_BrokenReelTimeMachine[] = static const struct Subsprite sSubsprites_ReelTimeShadow[] = { - { - .x = -32, - .y = -8, + { + .x = -32, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 0, .priority = 1, }, - { - .x = 0, - .y = -8, + { + .x = 0, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 4, .priority = 1, }, - { - .x = -32, - .y = 0, + { + .x = -32, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 8, .priority = 1, }, - { - .x = 0, - .y = 0, + { + .x = 0, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 12, @@ -6061,25 +6061,25 @@ static const struct SubspriteTable sSubspriteTable_ReelTimeShadow[] = static const struct Subsprite sSubsprites_ReelTimeNumberGap[] = { - { - .x = -8, - .y = -12, + { + .x = -8, + .y = -12, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 0, .priority = 1, }, - { - .x = -8, - .y = -4, + { + .x = -8, + .y = -4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 0, .priority = 1, }, - { - .x = -8, - .y = 4, + { + .x = -8, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 0, @@ -6094,41 +6094,41 @@ static const struct SubspriteTable sSubspriteTable_ReelTimeNumberGap[] = static const struct Subsprite sSubsprites_DigitalDisplay_Reel[] = { - { - .x = -32, - .y = -24, + { + .x = -32, + .y = -24, .shape = SPRITE_SHAPE(64x32), .size = SPRITE_SIZE(64x32), .tileOffset = 0, .priority = 3, }, - { - .x = -32, - .y = 8, + { + .x = -32, + .y = 8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 32, .priority = 3, }, - { - .x = 0, - .y = 8, + { + .x = 0, + .y = 8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 36, .priority = 3, }, - { - .x = -32, - .y = 16, + { + .x = -32, + .y = 16, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 40, .priority = 3, }, - { - .x = 0, - .y = 16, + { + .x = 0, + .y = 16, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 44, @@ -6143,33 +6143,33 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Reel[] = static const struct Subsprite sSubsprites_DigitalDisplay_Time[] = { - { - .x = -32, - .y = -8, + { + .x = -32, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 0, .priority = 3, }, - { - .x = 0, - .y = -8, + { + .x = 0, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 4, .priority = 3, }, - { - .x = -32, - .y = 0, + { + .x = -32, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 8, .priority = 3, }, - { - .x = 0, - .y = 0, + { + .x = 0, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 12, @@ -6184,33 +6184,33 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Time[] = static const struct Subsprite sSubsprites_DigitalDisplay_Insert[] = { - { - .x = -32, - .y = -8, + { + .x = -32, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 0, .priority = 3, }, - { - .x = 0, - .y = -8, + { + .x = 0, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 4, .priority = 3, }, - { - .x = -32, - .y = 0, + { + .x = -32, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 8, .priority = 3, }, - { - .x = 0, - .y = 0, + { + .x = 0, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 12, @@ -6225,33 +6225,33 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Insert[] = static const struct Subsprite sSubsprites_DigitalDisplay_Unused1[] = { - { - .x = -32, - .y = -8, + { + .x = -32, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 0, .priority = 3, }, - { - .x = 0, - .y = -8, + { + .x = 0, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 4, .priority = 3, }, - { - .x = -32, - .y = 0, + { + .x = -32, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 8, .priority = 3, }, - { - .x = 0, - .y = 0, + { + .x = 0, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 12, @@ -6266,49 +6266,49 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Unused1[] = static const struct Subsprite sSubsprites_DigitalDisplay_Win[] = { - { - .x = -32, - .y = -12, + { + .x = -32, + .y = -12, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 0, .priority = 3, }, - { - .x = 0, - .y = -12, + { + .x = 0, + .y = -12, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 4, .priority = 3, }, - { - .x = -32, - .y = -4, + { + .x = -32, + .y = -4, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 8, .priority = 3, }, - { - .x = 0, - .y = -4, + { + .x = 0, + .y = -4, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 12, .priority = 3, }, - { - .x = -32, - .y = 4, + { + .x = -32, + .y = 4, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 16, .priority = 3, }, - { - .x = 0, - .y = 4, + { + .x = 0, + .y = 4, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 20, @@ -6324,8 +6324,8 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Win[] = static const struct Subsprite sSubsprites_DigitalDisplay_Smoke[] = { { - .x = -16, - .y = -16, + .x = -16, + .y = -16, .shape = SPRITE_SHAPE(32x32), .size = SPRITE_SIZE(32x32), .tileOffset = 0, @@ -6336,8 +6336,8 @@ static const struct Subsprite sSubsprites_DigitalDisplay_Smoke[] = static const struct Subsprite sSubsprites_DigitalDisplay_Unused2[] = { { - .x = -8, - .y = -8, + .x = -8, + .y = -8, .shape = SPRITE_SHAPE(16x16), .size = SPRITE_SIZE(16x16), .tileOffset = 16, @@ -6357,97 +6357,97 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Unused2[] = static const struct Subsprite sSubsprites_DigitalDisplay_Pokeball[] = { - { - .x = -24, - .y = -24, + { + .x = -24, + .y = -24, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 0, .priority = 3, }, - { - .x = 8, - -24, + { + .x = 8, + -24, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 4, .priority = 3, }, - { - .x = -24, - .y = -16, + { + .x = -24, + .y = -16, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 6, .priority = 3, }, - { - .x = 8, - .y = -16, + { + .x = 8, + .y = -16, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 10, .priority = 3, }, - { - .x = -24, - .y = -8, + { + .x = -24, + .y = -8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 12, .priority = 3, }, - { - .x = 8, - .y = -8, + { + .x = 8, + .y = -8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 16, .priority = 3, }, - { - .x = -24, - .y = 0, + { + .x = -24, + .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 18, .priority = 3, }, - { - .x = 8, - .y = 0, + { + .x = 8, + .y = 0, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 22, .priority = 3, }, - { - .x = -24, - .y = 8, + { + .x = -24, + .y = 8, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 24, .priority = 3, }, - { - .x = 8, - .y = 8, + { + .x = 8, + .y = 8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 28, .priority = 3, }, - { - .x = -24, - .y = 16, + { + .x = -24, + .y = 16, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), .tileOffset = 30, .priority = 3, }, - { - .x = 8, - .y = 16, + { + .x = 8, + .y = 16, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 34, @@ -6462,25 +6462,25 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_Pokeball[] = static const struct Subsprite sSubsprites_DigitalDisplay_DPad[] = { - { - .x = -16, - .y = -12, + { + .x = -16, + .y = -12, .shape = SPRITE_SHAPE(32x16), .size = SPRITE_SIZE(32x16), .tileOffset = 0, .priority = 3, }, - { - .x = -16, - .y = 4, + { + .x = -16, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 8, .priority = 3, }, - { - .x = 0, - .y = 4, + { + .x = 0, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 10, @@ -6495,17 +6495,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_DPad[] = static const struct Subsprite sSubsprites_DigitalDisplay_StopS[] = { - { - .x = -8, - .y = -8, + { + .x = -8, + .y = -8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 0, .priority = 3, }, - { - .x = -8, - .y = 0, + { + .x = -8, + .y = 0, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 8, @@ -6520,17 +6520,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_StopS[] = static const struct Subsprite sSubsprites_DigitalDisplay_StopT[] = { - { - .x = -8, - .y = -8, + { + .x = -8, + .y = -8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 2, .priority = 3, }, - { - .x = -8, - .y = 0, + { + .x = -8, + .y = 0, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 10, @@ -6545,17 +6545,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_StopT[] = static const struct Subsprite sSubsprites_DigitalDisplay_StopO[] = { - { - .x = -8, - .y = -8, + { + .x = -8, + .y = -8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 4, .priority = 3, }, - { - .x = -8, - .y = 0, + { + .x = -8, + .y = 0, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 12, @@ -6570,17 +6570,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_StopO[] = static const struct Subsprite sSubsprites_DigitalDisplay_StopP[] = { - { - .x = -8, - .y = -8, + { + .x = -8, + .y = -8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 6, .priority = 3, }, - { - .x = -8, - .y = 0, + { + .x = -8, + .y = 0, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 14, @@ -6595,17 +6595,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_StopP[] = static const struct Subsprite sSubsprites_DigitalDisplay_BonusB[] = { - { - .x = -8, - .y = -8, + { + .x = -8, + .y = -8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 0, .priority = 3, }, - { - .x = -8, - .y = 0, + { + .x = -8, + .y = 0, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 8, @@ -6620,17 +6620,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusB[] = static const struct Subsprite sSubsprites_DigitalDisplay_BonusO[] = { - { - .x = -4, - .y = -8, + { + .x = -4, + .y = -8, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 2, .priority = 3, }, - { - .x = -4, - .y = 0, + { + .x = -4, + .y = 0, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 10, @@ -6645,17 +6645,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusO[] = static const struct Subsprite sSubsprites_DigitalDisplay_BonusN[] = { - { - .x = -8, - .y = -8, + { + .x = -8, + .y = -8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), - .tileOffset = 3, - .priority = 3, + .tileOffset = 3, + .priority = 3, }, - { - .x = -8, - .y = 0, + { + .x = -8, + .y = 0, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 11, @@ -6670,17 +6670,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusN[] = static const struct Subsprite sSubsprites_DigitalDisplay_BonusU[] = { - { - .x = -4, - .y = -8, + { + .x = -4, + .y = -8, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 5, .priority = 3, }, - { - .x = -4, - .y = 0, + { + .x = -4, + .y = 0, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 13, @@ -6695,17 +6695,17 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusU[] = static const struct Subsprite sSubsprites_DigitalDisplay_BonusS[] = { - { - .x = -8, - .y = -8, + { + .x = -8, + .y = -8, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 6, .priority = 3, }, - { - .x = -8, - .y = 0, + { + .x = -8, + .y = 0, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 14, @@ -6720,49 +6720,49 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BonusS[] = static const struct Subsprite sSubsprites_DigitalDisplay_BigB[] = { - { - .x = -12, - .y = -12, + { + .x = -12, + .y = -12, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 0, .priority = 3, }, - { - .x = 4, - .y = -12, + { + .x = 4, + .y = -12, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 2, .priority = 3, }, - { - .x = -12, - .y = -4, + { + .x = -12, + .y = -4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 8, .priority = 3, }, - { - .x = 4, - .y = -4, + { + .x = 4, + .y = -4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 10, .priority = 3, }, - { - .x = -12, - .y = 4, + { + .x = -12, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 16, .priority = 3, }, - { - .x = 4, - .y = 4, + { + .x = 4, + .y = 4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 18, @@ -6777,25 +6777,25 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BigB[] = static const struct Subsprite sSubsprites_DigitalDisplay_BigI[] = { - { - .x = -8, - .y = -12, + { + .x = -8, + .y = -12, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 3, .priority = 3, }, - { - .x = -8, - .y = -4, + { + .x = -8, + .y = -4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 11, .priority = 3, }, - { - .x = -8, - .y = 4, + { + .x = -8, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 19, @@ -6810,49 +6810,49 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BigI[] = static const struct Subsprite sSubsprites_DigitalDisplay_BigG[] = { - { - .x = -12, - .y = -12, + { + .x = -12, + .y = -12, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 5, .priority = 3, }, - { - .x = 4, - .y = -12, + { + .x = 4, + .y = -12, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 7, .priority = 3, }, - { - .x = -12, - .y = -4, + { + .x = -12, + .y = -4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 13, .priority = 3, }, - { - .x = 4, - .y = -4, + { + .x = 4, + .y = -4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 15, .priority = 3, }, - { - .x = -12, - .y = 4, + { + .x = -12, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 21, .priority = 3, }, - { - .x = 4, - .y = 4, + { + .x = 4, + .y = 4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 23, @@ -6867,49 +6867,49 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_BigG[] = static const struct Subsprite sSubsprites_DigitalDisplay_RegR[] = { - { - .x = -12, - .y = -12, + { + .x = -12, + .y = -12, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 0, .priority = 3, }, - { - .x = 4, - .y = -12, + { + .x = 4, + .y = -12, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 2, .priority = 3, }, - { - .x = -12, - .y = -4, + { + .x = -12, + .y = -4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 8, .priority = 3, }, - { - .x = 4, - .y = -4, + { + .x = 4, + .y = -4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 10, .priority = 3, }, - { - .x = -12, - .y = 4, + { + .x = -12, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 16, .priority = 3, }, - { - .x = 4, - .y = 4, + { + .x = 4, + .y = 4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 18, @@ -6924,25 +6924,25 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_RegR[] = static const struct Subsprite sSubsprites_DigitalDisplay_RegE[] = { - { - .x = -8, - .y = -12, + { + .x = -8, + .y = -12, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 3, .priority = 3, }, - { - .x = -8, - .y = -4, + { + .x = -8, + .y = -4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 11, .priority = 3, }, - { - .x = -8, - .y = 4, + { + .x = -8, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 19, @@ -6957,49 +6957,49 @@ static const struct SubspriteTable sSubspriteTable_DigitalDisplay_RegE[] = static const struct Subsprite sSubsprites_DigitalDisplay_RegG[] = { - { - .x = -12, - .y = -12, + { + .x = -12, + .y = -12, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 5, .priority = 3, }, - { - .x = 4, - .y = -12, + { + .x = 4, + .y = -12, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 7, .priority = 3, }, - { - .x = -12, - .y = -4, + { + .x = -12, + .y = -4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 13, .priority = 3, }, - { - .x = 4, - .y = -4, + { + .x = 4, + .y = -4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 15, .priority = 3, }, - { - .x = -12, - .y = 4, + { + .x = -12, + .y = 4, .shape = SPRITE_SHAPE(16x8), .size = SPRITE_SIZE(16x8), .tileOffset = 21, .priority = 3, }, - { - .x = 4, - .y = 4, + { + .x = 4, + .y = 4, .shape = SPRITE_SHAPE(8x8), .size = SPRITE_SIZE(8x8), .tileOffset = 23, @@ -7102,7 +7102,7 @@ static const struct SpriteSheet sSlotMachineSpriteSheets[22] = static const u8 *const sReelBackground_Tilemap = gSlotMachineReelBackground_Tilemap; -static const u16 sUnused[] = +static const u16 sUnused[] = { 0x6F7B, 0x6968, @@ -7141,9 +7141,9 @@ static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_LINES] = }; static const u8 sMatchLinePalOffsets[NUM_MATCH_LINES] = { - [MATCH_MIDDLE_ROW] = 74, - [MATCH_TOP_ROW] = 75, - [MATCH_BOTTOM_ROW] = 76, + [MATCH_MIDDLE_ROW] = 74, + [MATCH_TOP_ROW] = 75, + [MATCH_BOTTOM_ROW] = 76, [MATCH_NWSE_DIAG] = 78, // Diag colors flipped for some reason [MATCH_NESW_DIAG] = 77 // Doesn't matter as both are identical }; diff --git a/src/start_menu.c b/src/start_menu.c index 3fcb5aa7bf..9f271b890a 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -198,12 +198,12 @@ static const struct WindowTemplate sWindowTemplates_LinkBattleSave[] = }; static const struct WindowTemplate sSaveInfoWindowTemplate = { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 1, - .width = 14, - .height = 10, - .paletteNum = 15, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 14, + .height = 10, + .paletteNum = 15, .baseBlock = 8 }; diff --git a/src/strings.c b/src/strings.c index e1a6d2efbc..bebe890110 100644 --- a/src/strings.c +++ b/src/strings.c @@ -658,7 +658,7 @@ const u8 gText_Satisfied[] = _("Satisfied"); const u8 gText_Dissatisfied[] = _("Dissatisfied"); const u8 gText_DeepSeaTooth[] = _("DEEPSEATOOTH"); const u8 gText_DeepSeaScale[] = _("DEEPSEASCALE"); -const u8 gText_BlueFlute2[] = _("BLUE FLUTE"); +const u8 gText_BlueFlute2[] = _("BLUE FLUTE"); const u8 gText_YellowFlute2[] = _("YELLOW FLUTE"); const u8 gText_RedFlute2[] = _("RED FLUTE"); const u8 gText_WhiteFlute2[] = _("WHITE FLUTE"); diff --git a/src/title_screen.c b/src/title_screen.c index ef0f3a0da3..3b60146b97 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -751,7 +751,7 @@ static void Task_TitleScreenPhase3(u8 taskId) FadeOutBGM(4); BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); SetMainCallback2(CB2_GoToBerryFixScreen); - } + } else { SetGpuReg(REG_OFFSET_BG2Y_L, 0); diff --git a/src/trade.c b/src/trade.c index 1305b4336a..1ed0b93e91 100644 --- a/src/trade.c +++ b/src/trade.c @@ -773,8 +773,8 @@ static void CB2_ReturnToTradeMenu(void) else sTradeMenuData->cursorPosition = gLastViewedMonIndex + PARTY_SIZE; - sTradeMenuData->cursorSpriteId = CreateSprite(&sSpriteTemplate_Cursor, - sTradeMonSpriteCoords[sTradeMenuData->cursorPosition][0] * 8 + 32, + sTradeMenuData->cursorSpriteId = CreateSprite(&sSpriteTemplate_Cursor, + sTradeMonSpriteCoords[sTradeMenuData->cursorPosition][0] * 8 + 32, sTradeMonSpriteCoords[sTradeMenuData->cursorPosition][1] * 8, 2); gMain.state = 16; break; @@ -1545,8 +1545,8 @@ static bool32 CheckMonsBeforeTrade(void) aliveMons[i] = sTradeMenuData->isLiveMon[TRADE_PLAYER][i]; } - switch (CheckValidityOfTradeMons(aliveMons, sTradeMenuData->partyCounts[TRADE_PLAYER], - sTradeMenuData->cursorPosition, + switch (CheckValidityOfTradeMons(aliveMons, sTradeMenuData->partyCounts[TRADE_PLAYER], + sTradeMenuData->cursorPosition, sTradeMenuData->partnerCursorPosition)) { case PLAYER_MON_INVALID: @@ -1588,7 +1588,7 @@ static void ConfirmOrCancelTrade(void) } } -// Only when choosing Yes to cancel, when No is chosen all are redrawn anyway +// Only when choosing Yes to cancel, when No is chosen all are redrawn anyway static void RestoreNicknamesCoveredByYesNo(void) { int i; @@ -3612,7 +3612,7 @@ static bool8 AnimateTradeSequenceCable(void) case TS_STATE_CROSSING_MON_PICS_MOVE: gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 -= 3; gSprites[sTradeData->monSpriteIds[TRADE_PARTNER]].y2 += 3; - if (gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 < -DISPLAY_HEIGHT + if (gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 < -DISPLAY_HEIGHT && gSprites[sTradeData->monSpriteIds[TRADE_PLAYER]].y2 >= -DISPLAY_HEIGHT - 3) { PlaySE(SE_WARP_IN); @@ -3979,7 +3979,7 @@ static bool8 AnimateTradeSequenceWireless(void) BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG2); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 4)); - + // Start wireless signal effect CreateTask(Task_AnimateWirelessSignal, 5); sTradeData->state++; @@ -4264,9 +4264,9 @@ static bool8 AnimateTradeSequenceWireless(void) case TS_STATE_POKEBALL_ARRIVE_WAIT: if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { - HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], - gMonSpritesGfxPtr->sprites.ptr[3], - sTradeData->monSpecies[TRADE_PARTNER], + HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], + gMonSpritesGfxPtr->sprites.ptr[3], + sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); sTradeData->state++; } diff --git a/src/trainer_card.c b/src/trainer_card.c index 1ec519c90e..c11ee83c03 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -281,31 +281,31 @@ static const u8 sTrainerPicOffset[2][GENDER_COUNT][2] = { // Kanto { - [MALE] = {13, 4}, + [MALE] = {13, 4}, [FEMALE] = {13, 4} }, // Hoenn { - [MALE] = {1, 0}, + [MALE] = {1, 0}, [FEMALE] = {1, 0} }, }; -static const u8 sTrainerPicFacilityClass[][GENDER_COUNT] = +static const u8 sTrainerPicFacilityClass[][GENDER_COUNT] = { - [CARD_TYPE_FRLG] = + [CARD_TYPE_FRLG] = { - [MALE] = FACILITY_CLASS_RED, + [MALE] = FACILITY_CLASS_RED, [FEMALE] = FACILITY_CLASS_LEAF - }, - [CARD_TYPE_RS] = + }, + [CARD_TYPE_RS] = { - [MALE] = FACILITY_CLASS_RS_BRENDAN, + [MALE] = FACILITY_CLASS_RS_BRENDAN, [FEMALE] = FACILITY_CLASS_RS_MAY - }, - [CARD_TYPE_EMERALD] = + }, + [CARD_TYPE_EMERALD] = { - [MALE] = FACILITY_CLASS_BRENDAN, + [MALE] = FACILITY_CLASS_BRENDAN, [FEMALE] = FACILITY_CLASS_MAY } }; @@ -1201,10 +1201,10 @@ static void PrintHofDebutTimeOnCard(void) PrintStatOnBackOfCard(0, gText_HallOfFameDebut, sData->textHofTime, sTrainerCardStatColors); } -static const u8 *const sLinkBattleTexts[] = +static const u8 *const sLinkBattleTexts[] = { - [CARD_TYPE_FRLG] = gText_LinkBattles, - [CARD_TYPE_RS] = gText_LinkCableBattles, + [CARD_TYPE_FRLG] = gText_LinkBattles, + [CARD_TYPE_RS] = gText_LinkCableBattles, [CARD_TYPE_EMERALD] = gText_LinkBattles }; diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 3ce90c4309..70c2dd9d5d 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -261,16 +261,16 @@ static const struct ObjectEventTemplate sTrainerObjectEventTemplate = .trainerType = TRAINER_TYPE_NORMAL, }; -static const u32 sNextFloorMapNum[NUM_TRAINER_HILL_FLOORS] = +static const u32 sNextFloorMapNum[NUM_TRAINER_HILL_FLOORS] = { - MAP_NUM(TRAINER_HILL_2F), - MAP_NUM(TRAINER_HILL_3F), - MAP_NUM(TRAINER_HILL_4F), + MAP_NUM(TRAINER_HILL_2F), + MAP_NUM(TRAINER_HILL_3F), + MAP_NUM(TRAINER_HILL_4F), MAP_NUM(TRAINER_HILL_ROOF) }; -static const u8 sTrainerPartySlots[][PARTY_SIZE / 2] = +static const u8 sTrainerPartySlots[][PARTY_SIZE / 2] = { - {0, 1, 2}, + {0, 1, 2}, {3, 4, 5} }; diff --git a/src/tv.c b/src/tv.c index 14a0dc53ff..4529239338 100644 --- a/src/tv.c +++ b/src/tv.c @@ -199,31 +199,31 @@ static const struct { { .species = SPECIES_SEEDOT, .moves = {MOVE_BIDE, MOVE_HARDEN, MOVE_LEECH_SEED}, - .level = 3, + .level = 3, .location = MAP_NUM(ROUTE102) }, { .species = SPECIES_NUZLEAF, .moves = {MOVE_HARDEN, MOVE_GROWTH, MOVE_NATURE_POWER, MOVE_LEECH_SEED}, - .level = 15, + .level = 15, .location = MAP_NUM(ROUTE114), }, { .species = SPECIES_SEEDOT, .moves = {MOVE_HARDEN, MOVE_GROWTH, MOVE_NATURE_POWER, MOVE_LEECH_SEED}, - .level = 13, + .level = 13, .location = MAP_NUM(ROUTE117), }, { .species = SPECIES_SEEDOT, .moves = {MOVE_GIGA_DRAIN, MOVE_FRUSTRATION, MOVE_SOLAR_BEAM, MOVE_LEECH_SEED}, - .level = 25, + .level = 25, .location = MAP_NUM(ROUTE120), }, { .species = SPECIES_SKITTY, .moves = {MOVE_GROWL, MOVE_TACKLE, MOVE_TAIL_WHIP, MOVE_ATTRACT}, - .level = 8, + .level = 8, .location = MAP_NUM(ROUTE116), } }; @@ -648,50 +648,50 @@ static const u8 *const sTVWhatsNo1InHoennTodayTextGroup[] = { gTVWhatsNo1InHoennTodayText08 }; -static const u8 *const sTVSecretBaseSecretsTextGroup[SBSECRETS_NUM_STATES] = +static const u8 *const sTVSecretBaseSecretsTextGroup[SBSECRETS_NUM_STATES] = { - [SBSECRETS_STATE_INTRO] = TVSecretBaseSecrets_Text_Intro, + [SBSECRETS_STATE_INTRO] = TVSecretBaseSecrets_Text_Intro, [SBSECRETS_STATE_DO_NEXT1] = TVSecretBaseSecrets_Text_WhatWillPlayerDoNext1, [SBSECRETS_STATE_DO_NEXT2] = TVSecretBaseSecrets_Text_WhatWillPlayerDoNext2, [SBSECRETS_STATE_TOOK_X_STEPS] = TVSecretBaseSecrets_Text_TookXStepsBeforeLeaving, - [SBSECRETS_STATE_BASE_INTEREST_LOW] = TVSecretBaseSecrets_Text_BaseFailedToInterestPlayer, - [SBSECRETS_STATE_BASE_INTEREST_MED] = TVSecretBaseSecrets_Text_PlayerEnjoyedBase, + [SBSECRETS_STATE_BASE_INTEREST_LOW] = TVSecretBaseSecrets_Text_BaseFailedToInterestPlayer, + [SBSECRETS_STATE_BASE_INTEREST_MED] = TVSecretBaseSecrets_Text_PlayerEnjoyedBase, [SBSECRETS_STATE_BASE_INTEREST_HIGH] = TVSecretBaseSecrets_Text_PlayerHugeFanOfBase, - [SBSECRETS_STATE_OUTRO] = TVSecretBaseSecrets_Text_Outro, - [SBSECRETS_STATE_NOTHING_USED1] = TVSecretBaseSecrets_Text_StoppedMoving1, - [SBSECRETS_STATE_NOTHING_USED2] = TVSecretBaseSecrets_Text_StoppedMoving2, - [SBSECRETS_STATE_USED_CHAIR] = TVSecretBaseSecrets_Text_UsedChair, - [SBSECRETS_STATE_USED_BALLOON] = TVSecretBaseSecrets_Text_UsedBalloon, - [SBSECRETS_STATE_USED_TENT] = TVSecretBaseSecrets_Text_UsedTent, - [SBSECRETS_STATE_USED_PLANT] = TVSecretBaseSecrets_Text_UsedPlant, - [SBSECRETS_STATE_USED_GOLD_SHIELD] = TVSecretBaseSecrets_Text_UsedGoldShield, - [SBSECRETS_STATE_USED_SILVER_SHIELD] = TVSecretBaseSecrets_Text_UsedSilverShield, - [SBSECRETS_STATE_USED_GLASS_ORNAMENT] = TVSecretBaseSecrets_Text_UsedGlassOrnament, - [SBSECRETS_STATE_USED_TV] = TVSecretBaseSecrets_Text_UsedTV, - [SBSECRETS_STATE_USED_MUD_BALL] = TVSecretBaseSecrets_Text_UsedMudBall, - [SBSECRETS_STATE_USED_BAG] = TVSecretBaseSecrets_Text_UsedBag, - [SBSECRETS_STATE_USED_CUSHION] = TVSecretBaseSecrets_Text_UsedCushion, - [SBSECRETS_STATE_HIT_CUSHION] = TVSecretBaseSecrets_Text_HitCushion, - [SBSECRETS_STATE_HUGGED_CUSHION] = TVSecretBaseSecrets_Text_HuggedCushion, - [SBSECRETS_STATE_BATTLED_WON] = TVSecretBaseSecrets_Text_BattledWon, - [SBSECRETS_STATE_BATTLED_LOST] = TVSecretBaseSecrets_Text_BattledLost, - [SBSECRETS_STATE_DECLINED_BATTLE] = TVSecretBaseSecrets_Text_DeclinedBattle, - [SBSECRETS_STATE_USED_POSTER] = TVSecretBaseSecrets_Text_UsedPoster, - [SBSECRETS_STATE_USED_NOTE_MAT] = TVSecretBaseSecrets_Text_UsedNoteMat, - [SBSECRETS_STATE_BATTLED_DRAW] = TVSecretBaseSecrets_Text_BattledDraw, - [SBSECRETS_STATE_USED_SPIN_MAT] = TVSecretBaseSecrets_Text_UsedSpinMat, - [SBSECRETS_STATE_USED_SAND_ORNAMENT] = TVSecretBaseSecrets_Text_UsedSandOrnament, - [SBSECRETS_STATE_USED_DESK] = TVSecretBaseSecrets_Text_UsedDesk, - [SBSECRETS_STATE_USED_BRICK] = TVSecretBaseSecrets_Text_UsedBrick, - [SBSECRETS_STATE_USED_SOLID_BOARD] = TVSecretBaseSecrets_Text_UsedSolidBoard, - [SBSECRETS_STATE_USED_FENCE] = TVSecretBaseSecrets_Text_UsedFence, - [SBSECRETS_STATE_USED_GLITTER_MAT] = TVSecretBaseSecrets_Text_UsedGlitterMat, - [SBSECRETS_STATE_USED_TIRE] = TVSecretBaseSecrets_Text_UsedTire, - [SBSECRETS_STATE_USED_STAND] = TVSecretBaseSecrets_Text_UsedStand, + [SBSECRETS_STATE_OUTRO] = TVSecretBaseSecrets_Text_Outro, + [SBSECRETS_STATE_NOTHING_USED1] = TVSecretBaseSecrets_Text_StoppedMoving1, + [SBSECRETS_STATE_NOTHING_USED2] = TVSecretBaseSecrets_Text_StoppedMoving2, + [SBSECRETS_STATE_USED_CHAIR] = TVSecretBaseSecrets_Text_UsedChair, + [SBSECRETS_STATE_USED_BALLOON] = TVSecretBaseSecrets_Text_UsedBalloon, + [SBSECRETS_STATE_USED_TENT] = TVSecretBaseSecrets_Text_UsedTent, + [SBSECRETS_STATE_USED_PLANT] = TVSecretBaseSecrets_Text_UsedPlant, + [SBSECRETS_STATE_USED_GOLD_SHIELD] = TVSecretBaseSecrets_Text_UsedGoldShield, + [SBSECRETS_STATE_USED_SILVER_SHIELD] = TVSecretBaseSecrets_Text_UsedSilverShield, + [SBSECRETS_STATE_USED_GLASS_ORNAMENT] = TVSecretBaseSecrets_Text_UsedGlassOrnament, + [SBSECRETS_STATE_USED_TV] = TVSecretBaseSecrets_Text_UsedTV, + [SBSECRETS_STATE_USED_MUD_BALL] = TVSecretBaseSecrets_Text_UsedMudBall, + [SBSECRETS_STATE_USED_BAG] = TVSecretBaseSecrets_Text_UsedBag, + [SBSECRETS_STATE_USED_CUSHION] = TVSecretBaseSecrets_Text_UsedCushion, + [SBSECRETS_STATE_HIT_CUSHION] = TVSecretBaseSecrets_Text_HitCushion, + [SBSECRETS_STATE_HUGGED_CUSHION] = TVSecretBaseSecrets_Text_HuggedCushion, + [SBSECRETS_STATE_BATTLED_WON] = TVSecretBaseSecrets_Text_BattledWon, + [SBSECRETS_STATE_BATTLED_LOST] = TVSecretBaseSecrets_Text_BattledLost, + [SBSECRETS_STATE_DECLINED_BATTLE] = TVSecretBaseSecrets_Text_DeclinedBattle, + [SBSECRETS_STATE_USED_POSTER] = TVSecretBaseSecrets_Text_UsedPoster, + [SBSECRETS_STATE_USED_NOTE_MAT] = TVSecretBaseSecrets_Text_UsedNoteMat, + [SBSECRETS_STATE_BATTLED_DRAW] = TVSecretBaseSecrets_Text_BattledDraw, + [SBSECRETS_STATE_USED_SPIN_MAT] = TVSecretBaseSecrets_Text_UsedSpinMat, + [SBSECRETS_STATE_USED_SAND_ORNAMENT] = TVSecretBaseSecrets_Text_UsedSandOrnament, + [SBSECRETS_STATE_USED_DESK] = TVSecretBaseSecrets_Text_UsedDesk, + [SBSECRETS_STATE_USED_BRICK] = TVSecretBaseSecrets_Text_UsedBrick, + [SBSECRETS_STATE_USED_SOLID_BOARD] = TVSecretBaseSecrets_Text_UsedSolidBoard, + [SBSECRETS_STATE_USED_FENCE] = TVSecretBaseSecrets_Text_UsedFence, + [SBSECRETS_STATE_USED_GLITTER_MAT] = TVSecretBaseSecrets_Text_UsedGlitterMat, + [SBSECRETS_STATE_USED_TIRE] = TVSecretBaseSecrets_Text_UsedTire, + [SBSECRETS_STATE_USED_STAND] = TVSecretBaseSecrets_Text_UsedStand, [SBSECRETS_STATE_USED_BREAKABLE_DOOR] = TVSecretBaseSecrets_Text_BrokeDoor, - [SBSECRETS_STATE_USED_DOLL] = TVSecretBaseSecrets_Text_UsedDoll, - [SBSECRETS_STATE_USED_SLIDE] = TVSecretBaseSecrets_Text_UsedSlide, - [SBSECRETS_STATE_DECLINED_SLIDE] = TVSecretBaseSecrets_Text_UsedSlideButDidntGoDown, + [SBSECRETS_STATE_USED_DOLL] = TVSecretBaseSecrets_Text_UsedDoll, + [SBSECRETS_STATE_USED_SLIDE] = TVSecretBaseSecrets_Text_UsedSlide, + [SBSECRETS_STATE_DECLINED_SLIDE] = TVSecretBaseSecrets_Text_UsedSlideButDidntGoDown, [SBSECRETS_STATE_USED_JUMP_MAT] = TVSecretBaseSecrets_Text_UsedJumpMat }; @@ -722,8 +722,8 @@ static const u8 *const sTVInSearchOfTrainersTextGroup[] = { }; // Secret Base Secrets TV Show states for actions that can be taken in a secret base -// The flags that determine whether or not the action was taken are commented -const u8 sTVSecretBaseSecretsActions[NUM_SECRET_BASE_FLAGS] = +// The flags that determine whether or not the action was taken are commented +const u8 sTVSecretBaseSecretsActions[NUM_SECRET_BASE_FLAGS] = { SBSECRETS_STATE_USED_CHAIR, // SECRET_BASE_USED_CHAIR SBSECRETS_STATE_USED_BALLOON, // SECRET_BASE_USED_BALLOON @@ -817,7 +817,7 @@ u8 FindAnyTVShowOnTheAir(void) if (slot == 0xFF) return 0xFF; - if (gSaveBlock1Ptr->outbreakPokemonSpecies != SPECIES_NONE + if (gSaveBlock1Ptr->outbreakPokemonSpecies != SPECIES_NONE && gSaveBlock1Ptr->tvShows[slot].common.kind == TVSHOW_MASS_OUTBREAK) return FindFirstActiveTVShowThatIsNotAMassOutbreak(); @@ -837,7 +837,7 @@ void UpdateTVScreensOnMap(int width, int height) break; // case PLAYERS_HOUSE_TV_NONE: default: - if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(LILYCOVE_CITY_COVE_LILY_MOTEL_1F) + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(LILYCOVE_CITY_COVE_LILY_MOTEL_1F) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(LILYCOVE_CITY_COVE_LILY_MOTEL_1F)) { // NPC in Lilycove Hotel is always watching TV @@ -891,8 +891,8 @@ static u8 FindFirstActiveTVShowThatIsNotAMassOutbreak(void) for (i = 0; i < ARRAY_COUNT(gSaveBlock1Ptr->tvShows) - 1; i++) { - if (gSaveBlock1Ptr->tvShows[i].common.kind != TVSHOW_OFF_AIR - && gSaveBlock1Ptr->tvShows[i].common.kind != TVSHOW_MASS_OUTBREAK + if (gSaveBlock1Ptr->tvShows[i].common.kind != TVSHOW_OFF_AIR + && gSaveBlock1Ptr->tvShows[i].common.kind != TVSHOW_MASS_OUTBREAK && gSaveBlock1Ptr->tvShows[i].common.active == TRUE) return i; } @@ -945,7 +945,7 @@ void GabbyAndTyBeforeInterview(void) gSaveBlock1Ptr->gabbyAndTyData.battleNum++; } gSaveBlock1Ptr->gabbyAndTyData.battleTookMoreThanOneTurn = gBattleResults.playerMonWasDamaged; - + if (gBattleResults.playerFaintCounter != 0) gSaveBlock1Ptr->gabbyAndTyData.playerLostAMon = TRUE; else @@ -2344,7 +2344,7 @@ bool8 ShouldHideFanClubInterviewer(void) if (gSaveBlock1Ptr->linkBattleRecords.entries[0].name[0] == EOS) return TRUE; - + return FALSE; } @@ -2603,8 +2603,8 @@ static u8 FindAnyPokeNewsOnTheAir(void) for (i = 0; i < POKE_NEWS_COUNT; i++) { - if (gSaveBlock1Ptr->pokeNews[i].kind != POKENEWS_NONE - && gSaveBlock1Ptr->pokeNews[i].state == 1 + if (gSaveBlock1Ptr->pokeNews[i].kind != POKENEWS_NONE + && gSaveBlock1Ptr->pokeNews[i].state == 1 && gSaveBlock1Ptr->pokeNews[i].days < 3) return i; } @@ -2814,8 +2814,8 @@ static bool8 IsRecordMixShowAlreadySpawned(u8 kind, bool8 delete) playerId = GetPlayerIDAsU32(); for (i = NUM_NORMAL_TVSHOW_SLOTS; i < LAST_TVSHOW_IDX; i++) { - if (shows[i].common.kind == kind - && (playerId & 0xFF) == shows[i].common.trainerIdLo + if (shows[i].common.kind == kind + && (playerId & 0xFF) == shows[i].common.trainerIdLo && ((playerId >> 8) & 0xFF) == shows[i].common.trainerIdHi) { if (delete == TRUE) @@ -3139,7 +3139,7 @@ static void GetRandomWordFromShow(TVShow *show) u8 i; i = Random() % ARRAY_COUNT(show->fanclubLetter.words); - + // From random point, get first non-empty word while (TRUE) { @@ -3448,7 +3448,7 @@ void ReceiveTvShowsData(void *src, u32 size, u8 playersLinkId) else if (version == VERSION_EMERALD && gLinkPlayers[i].language == LANGUAGE_JAPANESE) TranslateJapaneseEmeraldShows((*rmBuffer)[i]); } - + // Position player's TV shows in argument list depending on link id switch (playersLinkId) { @@ -3537,7 +3537,7 @@ static bool8 TryMixTVShow(TVShow *dest[TV_SHOWS_COUNT], TVShow *src[TV_SHOWS_COU success = TryMixOutbreakTVShow(&tv1[sCurTVShowSlot], &tv2[sTVShowMixingCurSlot], idx); break; } - + // Show was mixed, delete from array if (success == TRUE) { @@ -3551,7 +3551,7 @@ static bool8 TryMixNormalTVShow(TVShow *dest, TVShow *src, u8 idx) { u32 linkTrainerId = GetLinkPlayerTrainerId(idx); - if ((linkTrainerId & 0xFF) == src->common.trainerIdLo + if ((linkTrainerId & 0xFF) == src->common.trainerIdLo && ((linkTrainerId >> 8) & 0xFF) == src->common.trainerIdHi) return FALSE; @@ -3568,11 +3568,11 @@ static bool8 TryMixRecordMixTVShow(TVShow *dest, TVShow *src, u8 idx) { u32 linkTrainerId = GetLinkPlayerTrainerId(idx); - if ((linkTrainerId & 0xFF) == src->common.srcTrainerIdLo + if ((linkTrainerId & 0xFF) == src->common.srcTrainerIdLo && ((linkTrainerId >> 8) & 0xFF) == src->common.srcTrainerIdHi) return FALSE; - if ((linkTrainerId & 0xFF) == src->common.trainerIdLo + if ((linkTrainerId & 0xFF) == src->common.trainerIdLo && ((linkTrainerId >> 8) & 0xFF) == src->common.trainerIdHi) return FALSE; @@ -3589,7 +3589,7 @@ static bool8 TryMixOutbreakTVShow(TVShow *dest, TVShow *src, u8 idx) { u32 linkTrainerId = GetLinkPlayerTrainerId(idx); - if ((linkTrainerId & 0xFF) == src->common.trainerIdLo + if ((linkTrainerId & 0xFF) == src->common.trainerIdLo && ((linkTrainerId >> 8) & 0xFF) == src->common.trainerIdHi) return FALSE; @@ -3825,7 +3825,7 @@ void ReceivePokeNewsData(void *src, u32 size, u8 playersLinkId) memcpy((*rmBuffer2)[i], src + i * size, sizeof((*rmBuffer2)[i])); rmBuffer = rmBuffer2; - + // Position player's PokeNews in argument list depending on link id switch (playersLinkId) { @@ -4018,7 +4018,7 @@ void SanitizeTVShowsForRuby(TVShow *shows) { if (curShow->bravoTrainerTower.kind == TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE) { - if ((curShow->bravoTrainerTower.language == LANGUAGE_JAPANESE && curShow->bravoTrainerTower.pokemonNameLanguage != LANGUAGE_JAPANESE) + if ((curShow->bravoTrainerTower.language == LANGUAGE_JAPANESE && curShow->bravoTrainerTower.pokemonNameLanguage != LANGUAGE_JAPANESE) || (curShow->bravoTrainerTower.language != LANGUAGE_JAPANESE && curShow->bravoTrainerTower.pokemonNameLanguage == LANGUAGE_JAPANESE)) memset(curShow, 0, sizeof(TVShow)); } @@ -4887,7 +4887,7 @@ static void DoTVShowPokemonNewsMassOutbreak(void) ShowFieldMessage(sTVMassOutbreakTextGroup[sTVShowState]); } -// TV Show that plays after a Link Contest. +// TV Show that plays after a Link Contest. // First talks about the winner and something they did, then about a losing player and something they did // The show is only generated when the player wins, but can be record mixed to other games // Each state buffers any needed data for a message to print from sTVContestLiveUpdatesTextGroup diff --git a/src/union_room.c b/src/union_room.c index 8d02a260d9..03f7fc02b5 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -61,13 +61,13 @@ enum { UR_STATE_CHECK_SELECTING_MON, UR_STATE_MAIN, UR_STATE_DO_SOMETHING_PROMPT, - UR_STATE_HANDLE_DO_SOMETHING_PROMPT_INPUT, + UR_STATE_HANDLE_DO_SOMETHING_PROMPT_INPUT, UR_STATE_DO_SOMETHING_PROMPT_2, UR_STATE_PRINT_MSG, UR_STATE_HANDLE_ACTIVITY_REQUEST, - UR_STATE_DECLINE_ACTIVITY_REQUEST, + UR_STATE_DECLINE_ACTIVITY_REQUEST, UR_STATE_PLAYER_CONTACTED_YOU, - UR_STATE_RECV_CONTACT_DATA, + UR_STATE_RECV_CONTACT_DATA, UR_STATE_PRINT_START_ACTIVITY_MSG, UR_STATE_START_ACTIVITY_LINK, UR_STATE_START_ACTIVITY_WAIT_FOR_LINK, @@ -80,7 +80,7 @@ enum { UR_STATE_ACCEPT_CHAT_REQUEST, UR_STATE_WAIT_FOR_START_MENU, UR_STATE_INTERACT_WITH_PLAYER, - UR_STATE_TRY_COMMUNICATING, + UR_STATE_TRY_COMMUNICATING, UR_STATE_PRINT_AND_EXIT, UR_STATE_SEND_ACTIVITY_REQUEST, UR_STATE_TRAINER_APPEARS_BUSY, @@ -94,15 +94,15 @@ enum { UR_STATE_CANCEL_REQUEST_PRINT_MSG, UR_STATE_CANCEL_REQUEST_RESTART_LINK, UR_STATE_COMMUNICATING_WAIT_FOR_DATA, - UR_STATE_WAIT_FOR_CONTACT_DATA, + UR_STATE_WAIT_FOR_CONTACT_DATA, UR_STATE_PRINT_CARD_INFO, UR_STATE_WAIT_FINISH_READING_CARD, UR_STATE_INTERACT_WITH_ATTENDANT, - UR_STATE_REGISTER_PROMPT, + UR_STATE_REGISTER_PROMPT, UR_STATE_CANCEL_REGISTRATION_PROMPT, UR_STATE_CHECK_TRADING_BOARD, UR_STATE_TRADING_BOARD_LOAD, - UR_STATE_REGISTER_PROMPT_HANDLE_INPUT, + UR_STATE_REGISTER_PROMPT_HANDLE_INPUT, UR_STATE_TRADING_BOARD_HANDLE_INPUT, UR_STATE_TRADE_PROMPT, UR_STATE_TRADE_SELECT_MON, @@ -110,7 +110,7 @@ enum { UR_STATE_REGISTER_REQUEST_TYPE, UR_STATE_REGISTER_SELECT_MON_FADE, UR_STATE_REGISTER_SELECT_MON, - UR_STATE_REGISTER_COMPLETE, + UR_STATE_REGISTER_COMPLETE, UR_STATE_CANCEL_REGISTRATION, }; @@ -2485,8 +2485,8 @@ static void Task_RunUnionRoom(u8 taskId) uroom->state = UR_STATE_CHECK_SELECTING_MON; break; case UR_STATE_CHECK_SELECTING_MON: - if ((GetPartyMenuType() == PARTY_MENU_TYPE_UNION_ROOM_REGISTER - || GetPartyMenuType() == PARTY_MENU_TYPE_UNION_ROOM_TRADE) + if ((GetPartyMenuType() == PARTY_MENU_TYPE_UNION_ROOM_REGISTER + || GetPartyMenuType() == PARTY_MENU_TYPE_UNION_ROOM_TRADE) && sUnionRoomTrade.state != URTRADE_STATE_NONE) { id = GetCursorSelectionMonId(); @@ -2671,10 +2671,10 @@ static void Task_RunUnionRoom(u8 taskId) ScheduleFieldMessageWithFollowupState(UR_STATE_HANDLE_DO_SOMETHING_PROMPT_INPUT, sHiDoSomethingTexts[id][playerGender]); break; case UR_STATE_HANDLE_DO_SOMETHING_PROMPT_INPUT: - input = ListMenuHandler_AllItemsAvailable(&uroom->textState, - &uroom->topListMenuWindowId, - &uroom->topListMenuId, - &sWindowTemplate_InviteToActivity, + input = ListMenuHandler_AllItemsAvailable(&uroom->textState, + &uroom->topListMenuWindowId, + &uroom->topListMenuId, + &sWindowTemplate_InviteToActivity, &sListMenuTemplate_InviteToActivity); if (input != -1) { @@ -3028,10 +3028,10 @@ static void Task_RunUnionRoom(u8 taskId) uroom->state = UR_STATE_REGISTER_PROMPT_HANDLE_INPUT; break; case UR_STATE_REGISTER_PROMPT_HANDLE_INPUT: - input = ListMenuHandler_AllItemsAvailable(&uroom->textState, - &uroom->tradeBoardSelectWindowId, - &uroom->tradeBoardDetailsWindowId, - &sWindowTemplate_RegisterForTrade, + input = ListMenuHandler_AllItemsAvailable(&uroom->textState, + &uroom->tradeBoardSelectWindowId, + &uroom->tradeBoardDetailsWindowId, + &sWindowTemplate_RegisterForTrade, &sListMenuTemplate_RegisterForTrade); if (input != -1) { @@ -3067,10 +3067,10 @@ static void Task_RunUnionRoom(u8 taskId) } break; case UR_STATE_REGISTER_REQUEST_TYPE: - input = ListMenuHandler_AllItemsAvailable(&uroom->textState, - &uroom->tradeBoardSelectWindowId, - &uroom->tradeBoardDetailsWindowId, - &gUnknown_082F0294, + input = ListMenuHandler_AllItemsAvailable(&uroom->textState, + &uroom->tradeBoardSelectWindowId, + &uroom->tradeBoardDetailsWindowId, + &gUnknown_082F0294, &sMenuTemplate_TradingBoardRequestType); if (input != -1) { diff --git a/src/union_room_battle.c b/src/union_room_battle.c index 2d1274f6ee..1ca414d797 100644 --- a/src/union_room_battle.c +++ b/src/union_room_battle.c @@ -166,7 +166,7 @@ void CB2_UnionRoomBattle(void) case 4: if (GetBlockReceivedStatus() == 3) { - if (gBlockRecvBuffer[0][0] == (ACTIVITY_ACCEPT | IN_UNION_ROOM) + if (gBlockRecvBuffer[0][0] == (ACTIVITY_ACCEPT | IN_UNION_ROOM) && gBlockRecvBuffer[1][0] == (ACTIVITY_ACCEPT | IN_UNION_ROOM)) { BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); diff --git a/src/union_room_chat.c b/src/union_room_chat.c index 3167563ade..5777843002 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -310,11 +310,11 @@ static void (*const sChatMainFunctions[])(void) = { [CHAT_FUNC_SAVE_AND_EXIT] = Chat_SaveAndExit }; -static const u8 sKeyboardPageMaxRow[UNION_ROOM_KB_PAGE_COUNT] = +static const u8 sKeyboardPageMaxRow[UNION_ROOM_KB_PAGE_COUNT] = { - [UNION_ROOM_KB_PAGE_UPPER] = 9, - [UNION_ROOM_KB_PAGE_LOWER] = 9, - [UNION_ROOM_KB_PAGE_EMOJI] = 9, + [UNION_ROOM_KB_PAGE_UPPER] = 9, + [UNION_ROOM_KB_PAGE_LOWER] = 9, + [UNION_ROOM_KB_PAGE_EMOJI] = 9, [UNION_ROOM_KB_PAGE_REGISTER] = 9 }; @@ -466,45 +466,45 @@ static const u8 sCaseToggleTable[256] = { }; // Excludes UNION_ROOM_KB_PAGE_REGISTER, the text for which is chosen by the player -static const u8 *const sUnionRoomKeyboardText[UNION_ROOM_KB_PAGE_COUNT - 1][UNION_ROOM_KB_ROW_COUNT] = +static const u8 *const sUnionRoomKeyboardText[UNION_ROOM_KB_PAGE_COUNT - 1][UNION_ROOM_KB_ROW_COUNT] = { - [UNION_ROOM_KB_PAGE_UPPER] = + [UNION_ROOM_KB_PAGE_UPPER] = { - gText_UnionRoomChatKeyboard_ABCDE, - gText_UnionRoomChatKeyboard_FGHIJ, - gText_UnionRoomChatKeyboard_KLMNO, - gText_UnionRoomChatKeyboard_PQRST, - gText_UnionRoomChatKeyboard_UVWXY, - gText_UnionRoomChatKeyboard_Z, - gText_UnionRoomChatKeyboard_01234Upper, - gText_UnionRoomChatKeyboard_56789Upper, - gText_UnionRoomChatKeyboard_PunctuationUpper, + gText_UnionRoomChatKeyboard_ABCDE, + gText_UnionRoomChatKeyboard_FGHIJ, + gText_UnionRoomChatKeyboard_KLMNO, + gText_UnionRoomChatKeyboard_PQRST, + gText_UnionRoomChatKeyboard_UVWXY, + gText_UnionRoomChatKeyboard_Z, + gText_UnionRoomChatKeyboard_01234Upper, + gText_UnionRoomChatKeyboard_56789Upper, + gText_UnionRoomChatKeyboard_PunctuationUpper, gText_UnionRoomChatKeyboard_SymbolsUpper }, - [UNION_ROOM_KB_PAGE_LOWER] = + [UNION_ROOM_KB_PAGE_LOWER] = { - gText_UnionRoomChatKeyboard_abcde, - gText_UnionRoomChatKeyboard_fghij, - gText_UnionRoomChatKeyboard_klmno, - gText_UnionRoomChatKeyboard_pqrst, - gText_UnionRoomChatKeyboard_uvwxy, - gText_UnionRoomChatKeyboard_z, - gText_UnionRoomChatKeyboard_01234Lower, - gText_UnionRoomChatKeyboard_56789Lower, - gText_UnionRoomChatKeyboard_PunctuationLower, + gText_UnionRoomChatKeyboard_abcde, + gText_UnionRoomChatKeyboard_fghij, + gText_UnionRoomChatKeyboard_klmno, + gText_UnionRoomChatKeyboard_pqrst, + gText_UnionRoomChatKeyboard_uvwxy, + gText_UnionRoomChatKeyboard_z, + gText_UnionRoomChatKeyboard_01234Lower, + gText_UnionRoomChatKeyboard_56789Lower, + gText_UnionRoomChatKeyboard_PunctuationLower, gText_UnionRoomChatKeyboard_SymbolsLower }, - [UNION_ROOM_KB_PAGE_EMOJI] = + [UNION_ROOM_KB_PAGE_EMOJI] = { - gText_UnionRoomChatKeyboard_Emoji1, - gText_UnionRoomChatKeyboard_Emoji2, - gText_UnionRoomChatKeyboard_Emoji3, - gText_UnionRoomChatKeyboard_Emoji4, - gText_UnionRoomChatKeyboard_Emoji5, - gText_UnionRoomChatKeyboard_Emoji6, - gText_UnionRoomChatKeyboard_Emoji7, - gText_UnionRoomChatKeyboard_Emoji8, - gText_UnionRoomChatKeyboard_Emoji9, + gText_UnionRoomChatKeyboard_Emoji1, + gText_UnionRoomChatKeyboard_Emoji2, + gText_UnionRoomChatKeyboard_Emoji3, + gText_UnionRoomChatKeyboard_Emoji4, + gText_UnionRoomChatKeyboard_Emoji5, + gText_UnionRoomChatKeyboard_Emoji6, + gText_UnionRoomChatKeyboard_Emoji7, + gText_UnionRoomChatKeyboard_Emoji8, + gText_UnionRoomChatKeyboard_Emoji9, gText_UnionRoomChatKeyboard_Emoji10 } }; @@ -610,113 +610,113 @@ static const struct SubtaskInfo sDisplaySubtasks[] = { static const struct MessageWindowInfo sDisplayStdMessages[] = { [STDMESSAGE_QUIT_CHATTING] = { - .text = gText_QuitChatting, - .boxType = 1, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_QuitChatting, + .boxType = 1, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = FALSE }, [STDMESSAGE_REGISTER_WHERE] = { - .text = gText_RegisterTextWhere, - .boxType = 1, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_RegisterTextWhere, + .boxType = 1, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = FALSE }, [STDMESSAGE_REGISTER_HERE] = { - .text = gText_RegisterTextHere, - .boxType = 1, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_RegisterTextHere, + .boxType = 1, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = FALSE }, [STDMESSAGE_INPUT_TEXT] = { - .text = gText_InputText, - .boxType = 1, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_InputText, + .boxType = 1, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = FALSE }, [STDMESSAGE_EXITING_CHAT] = { - .text = gText_ExitingChat, - .boxType = 2, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_ExitingChat, + .boxType = 2, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = FALSE }, [STDMESSAGE_LEADER_LEFT] = { - .text = gText_LeaderLeftEndingChat, - .boxType = 2, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = TRUE, + .text = gText_LeaderLeftEndingChat, + .boxType = 2, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = TRUE, .useWiderBox = FALSE }, [STDMESSAGE_ASK_SAVE] = { - .text = gText_RegisteredTextChangedOKToSave, - .boxType = 2, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_RegisteredTextChangedOKToSave, + .boxType = 2, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = TRUE }, [STDMESSAGE_ASK_OVERWRITE] = { - .text = gText_AlreadySavedFile_Chat, - .boxType = 2, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_AlreadySavedFile_Chat, + .boxType = 2, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = TRUE }, [STDMESSAGE_SAVING_NO_OFF] = { - .text = gText_SavingDontTurnOff_Chat, - .boxType = 2, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_SavingDontTurnOff_Chat, + .boxType = 2, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = TRUE }, [STDMESSAGE_SAVED_THE_GAME] = { - .text = gText_PlayerSavedGame_Chat, - .boxType = 2, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = TRUE, + .text = gText_PlayerSavedGame_Chat, + .boxType = 2, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = TRUE, .useWiderBox = TRUE }, [STDMESSAGE_WARN_LEADER_LEAVE] = { - .text = gText_IfLeaderLeavesChatEnds, - .boxType = 2, - .x = 0, - .y = 1, - .letterSpacing = 0, - .lineSpacing = 0, - .hasPlaceholders = FALSE, + .text = gText_IfLeaderLeavesChatEnds, + .boxType = 2, + .x = 0, + .y = 1, + .letterSpacing = 0, + .lineSpacing = 0, + .hasPlaceholders = FALSE, .useWiderBox = TRUE } }; @@ -1629,7 +1629,7 @@ static bool32 HandleDPadInput(void) return FALSE; } while (0); - return TRUE; + return TRUE; } static void AppendTextToMessage(void) @@ -1642,7 +1642,7 @@ static void AppendTextToMessage(void) if (sChat->currentPage != UNION_ROOM_KB_PAGE_REGISTER) { - // Going to append a single character + // Going to append a single character charsStr = sUnionRoomKeyboardText[sChat->currentPage][sChat->currentRow]; for (i = 0; i < sChat->currentCol; i++) { diff --git a/src/union_room_player_avatar.c b/src/union_room_player_avatar.c index 671290e21e..ff6c90b255 100644 --- a/src/union_room_player_avatar.c +++ b/src/union_room_player_avatar.c @@ -21,23 +21,23 @@ static void SetUnionRoomObjectFacingDirection(s32, s32, u8); static const u8 sUnionRoomObjGfxIds[GENDER_COUNT][MAX_UNION_ROOM_PLAYERS + 2] = { [MALE] = { - OBJ_EVENT_GFX_MAN_3, - OBJ_EVENT_GFX_BLACK_BELT, - OBJ_EVENT_GFX_CAMPER, - OBJ_EVENT_GFX_YOUNGSTER, - OBJ_EVENT_GFX_PSYCHIC_M, - OBJ_EVENT_GFX_BUG_CATCHER, - OBJ_EVENT_GFX_MAN_4, + OBJ_EVENT_GFX_MAN_3, + OBJ_EVENT_GFX_BLACK_BELT, + OBJ_EVENT_GFX_CAMPER, + OBJ_EVENT_GFX_YOUNGSTER, + OBJ_EVENT_GFX_PSYCHIC_M, + OBJ_EVENT_GFX_BUG_CATCHER, + OBJ_EVENT_GFX_MAN_4, OBJ_EVENT_GFX_MAN_5 }, [FEMALE] = { - OBJ_EVENT_GFX_WOMAN_5, - OBJ_EVENT_GFX_HEX_MANIAC, - OBJ_EVENT_GFX_PICNICKER, - OBJ_EVENT_GFX_LASS, - OBJ_EVENT_GFX_LASS, - OBJ_EVENT_GFX_GIRL_3, - OBJ_EVENT_GFX_WOMAN_2, + OBJ_EVENT_GFX_WOMAN_5, + OBJ_EVENT_GFX_HEX_MANIAC, + OBJ_EVENT_GFX_PICNICKER, + OBJ_EVENT_GFX_LASS, + OBJ_EVENT_GFX_LASS, + OBJ_EVENT_GFX_GIRL_3, + OBJ_EVENT_GFX_WOMAN_2, OBJ_EVENT_GFX_BEAUTY } }; @@ -90,13 +90,13 @@ static const u8 sUnionRoomLocalIds[] = { // Unused static const u16 sHidePlayerFlags[] = { - FLAG_HIDE_UNION_ROOM_PLAYER_1, - FLAG_HIDE_UNION_ROOM_PLAYER_2, - FLAG_HIDE_UNION_ROOM_PLAYER_3, - FLAG_HIDE_UNION_ROOM_PLAYER_4, - FLAG_HIDE_UNION_ROOM_PLAYER_5, - FLAG_HIDE_UNION_ROOM_PLAYER_6, - FLAG_HIDE_UNION_ROOM_PLAYER_7, + FLAG_HIDE_UNION_ROOM_PLAYER_1, + FLAG_HIDE_UNION_ROOM_PLAYER_2, + FLAG_HIDE_UNION_ROOM_PLAYER_3, + FLAG_HIDE_UNION_ROOM_PLAYER_4, + FLAG_HIDE_UNION_ROOM_PLAYER_5, + FLAG_HIDE_UNION_ROOM_PLAYER_6, + FLAG_HIDE_UNION_ROOM_PLAYER_7, FLAG_HIDE_UNION_ROOM_PLAYER_8 }; @@ -413,10 +413,10 @@ void CreateGroupMemberSpritesInvisible(u8 * spriteIds, s32 playerIdx) for (direction = DIR_NONE; direction <= DIR_EAST; direction++) { s32 id = UR_PLAYER_SPRITE_ID(playerIdx, direction); - spriteIds[id] = CreateObjectSprite(OBJ_EVENT_GFX_MAN_4, - id - UR_SPRITE_START_ID, - sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0], - sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1], + spriteIds[id] = CreateObjectSprite(OBJ_EVENT_GFX_MAN_4, + id - UR_SPRITE_START_ID, + sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0], + sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1], 3, 1); SetObjectEventSpriteInvisibility(id - UR_SPRITE_START_ID, TRUE); } diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index cdcdfc5da6..6ebc707e54 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -29,7 +29,7 @@ This file handles the screen where the player chooses which pokemon to give a pokeblock to. The subsequent scene of feeding the pokeblock to the pokemon is handled by - pokeblock_feed.c, and the rest of the pokeblock menu (and + pokeblock_feed.c, and the rest of the pokeblock menu (and other pokeblock-related functions) are in pokeblock.c */ @@ -243,7 +243,7 @@ static const struct BgTemplate sBgTemplates[4] = } }; -static const struct WindowTemplate sWindowTemplates[WIN_COUNT + 1] = +static const struct WindowTemplate sWindowTemplates[WIN_COUNT + 1] = { [WIN_NAME] = { .bg = 0, @@ -275,7 +275,7 @@ static const struct WindowTemplate sWindowTemplates[WIN_COUNT + 1] = DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate sUsePokeblockYesNoWinTemplate = +static const struct WindowTemplate sUsePokeblockYesNoWinTemplate = { .bg = 0, .tilemapLeft = 24, @@ -295,7 +295,7 @@ static const u8 *const sContestStatNames[] = gText_Beauty3 }; -static const struct SpriteSheet sSpriteSheet_UpDown = +static const struct SpriteSheet sSpriteSheet_UpDown = { gUsePokeblockUpDown_Gfx, 0x200, TAG_UP_DOWN }; @@ -314,7 +314,7 @@ static const s16 sUpDownCoordsOnGraph[FLAVOR_COUNT][2] = {197, 59} }; -static const struct OamData sOam_UpDown = +static const struct OamData sOam_UpDown = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -357,7 +357,7 @@ static const struct SpriteTemplate sSpriteTemplate_UpDown = .callback = SpriteCallbackDummy, }; -static const struct OamData sOam_Condition = +static const struct OamData sOam_Condition = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -1594,7 +1594,7 @@ static void SpriteCB_SelectionIconCancel(struct Sprite *sprite) } // Calculate the max id for sparkles/stars that appear around the pokemon on the condition screen -// All pokemon start with 1 sparkle (added by CreateConditionSparkleSprites), so the number here +1 +// All pokemon start with 1 sparkle (added by CreateConditionSparkleSprites), so the number here +1 // is the total number of sparkles that appear static void CalculateNumAdditionalSparkles(u8 monIndex) { diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index dbc71d6345..a58444f362 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -423,9 +423,9 @@ static bool32 UpdateCommunicationCounts(u32 * groupCounts, u32 * prevGroupCounts memcpy(groupCounts, groupCountBuffer, sizeof(groupCountBuffer)); memcpy(prevGroupCounts, groupCountBuffer, sizeof(groupCountBuffer)); - groupCounts[GROUPTYPE_TOTAL] = groupCounts[GROUPTYPE_TRADE] - + groupCounts[GROUPTYPE_BATTLE] - + groupCounts[GROUPTYPE_UNION] + groupCounts[GROUPTYPE_TOTAL] = groupCounts[GROUPTYPE_TRADE] + + groupCounts[GROUPTYPE_BATTLE] + + groupCounts[GROUPTYPE_UNION] + groupCounts[GROUPTYPE_TOTAL]; return TRUE; } diff --git a/tools/gbagfx/rl.c b/tools/gbagfx/rl.c index 968c9347eb..993ac64497 100644 --- a/tools/gbagfx/rl.c +++ b/tools/gbagfx/rl.c @@ -101,7 +101,7 @@ unsigned char *RLCompress(unsigned char *src, int srcSize, int *compressedSize) srcPos++; uncompressedLength++; } - + if (uncompressedLength > 0) { dest[destPos++] = uncompressedLength - 1; From f8a24cdd6f26ee6b549fd44ec08316edf7c1bd34 Mon Sep 17 00:00:00 2001 From: froggestspirit Date: Mon, 6 Sep 2021 10:42:05 -0400 Subject: [PATCH 007/417] Identify unknown healthbox GFX --- .../healthbox_doubles_frameend.png | Bin 0 -> 5681 bytes .../healthbox_doubles_frameend_bar.png | Bin 0 -> 5762 bytes graphics/unknown/unknown_D12FEC.png | Bin 84 -> 0 bytes graphics/unknown/unknown_D1300C.png | Bin 92 -> 0 bytes src/battle_interface.c | 4 ++-- src/graphics.c | 4 ++-- 6 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 graphics/battle_interface/healthbox_doubles_frameend.png create mode 100644 graphics/battle_interface/healthbox_doubles_frameend_bar.png delete mode 100644 graphics/unknown/unknown_D12FEC.png delete mode 100644 graphics/unknown/unknown_D1300C.png diff --git a/graphics/battle_interface/healthbox_doubles_frameend.png b/graphics/battle_interface/healthbox_doubles_frameend.png new file mode 100644 index 0000000000000000000000000000000000000000..812a6c2c454741232c8aabd4babbf964d245a2e7 GIT binary patch literal 5681 zcmeHKX;_n277mN3pnzJJvSD7+6tqfZtAkaGm?ExFw=!tN4Xq;J2o*)i+ysO$b?o>&(|^K~<=*?A_niCQbI#4T zCNwx;q^*-J3WXZU3*>}>&tb-wwH0`$P2P75g|hZfiilK)K^n9|DHn;Q2wI(}K+uR* zEJC5Q|2#ZDKI@jph}Xs8Eu$PQt!wU-#>s!ExosnjX+E(eE_Y2W*=e#J@77uSPD77t zhXd}se&cf|KijG%Wv%0jx*eakeH8y6uIqoj6W9{nRPC!5Z{L`|GH7oHd(!2$hK1`3a;+`T1TE!E59l_`Jnr zePQkA#A@o-MMIHUPadRxo!wP^DXe&x_wR?vuXbE|>Aa8Yw6CqD#Lh!Z&tis0jUHh) z2lwRYs=Zx_XDj_rXITF+&qp6b9kNd;$Xx5N^d|jz)5+#@V<$5k4+|weyc<(2FW72_ELf&HExBD*ameN95;$@}I(c_QUShZNz3cT8Hvj9w)adfr zUoOpZgo5rjyUs(U*3`P4vR%IZhUD&apSogFz?2+*18(iZl!coEN>+`VkaVH@`=b@r z7IRWhu#+JR%c(zT?WI>2ApWjy?X`+e4$~K+ESAZg^ULg~SvPTJzW9ZF?)>$nA@A+v@K$8|X-r#HMVSf&Dc z2+nYF(|w{U;nlgUu;qmZc|KUjC$nN$yP%D#qujNholMPl&yG+IS#j{t$@GKNFh13* zasS?svbr)|_JY=%z6V+>+xAK}usc~k<&&#NdY`Tv72x!8_P65dSG1EGoc0tpq+O+4 zwWG2QCRH{y1iwBrA|tBC=gVo9=(1fo+s|H#+EK^95L7}RtH;dot`f6GStTDS?M%V9 ztepH}xRL#*Vr-Bk#w~)}-8=DO;3xy}7Z#X>VE`E4{SPU-3FUTMAdW=OZ(Q z^V^Z^PquCGS^n^u!|HjXE@sUwOe`pn9@|QDzpWyzE~@`++i2|NU6qo8`MQ^(&XpYM zje<7+k^>C{aazW5RQ+g4%O7*{9tD>qcHFp<)fk<|L@u#u;#RV-eR*;KcSQ0 z&bjZieIKbh+x^v<&gm)XM>k(+_=?)nRJCBKcQU+U0`W?6Ikf&au3rmU+o zCt6)yT+@;7ypmlo{#K;%t^En{#G|P0%J0UrC5v8k zF0TBVQRTHD-(c}D$555{YQ%69$|6nd=NHQJ^LyJ-Kp)9nv56g6?c<_bw6J{o7eg~M z=$yjfaU8Boxh=QQF)nSMYY^^@;||IcPu%)sNmbPb-NBU1(j)dqlF?ljcbl8{Kf<{8 z;62MSo;4kt)Yi&w)m!w$Z7LF-pO6=qy=h%ds#?Syb~4{8{?RXvucn9|m*(fJde~LD zdPA{h?(PRGS})fh5b|xhtnYqW;5_ab^V!vc11kMA`_kn7j(f&za8mo;4LEWhcWTL{ znJo{uLvCAh-R#HMy_}l8GiU6Gt=cSlexcKY?kl*@a(|>B(vc3`-h7I%6Umd`nguKOeHt$E_(68 zYSu<&R>F%;(DNNK#h}GU@`ISLJRS!LS|B zVbEeB8#ABEC-4=1NUS(8Nr{9f1xLV15||;xc+awBX_C{cmfGeB4Ggnt4frqAuU#>ax+r&a&Qn8tQ0HMVz~@$wP3Q(fpKi2SE+?~9vD!-egFVZA`s|U0triE;LYv9DxcqPEmQTW2=v5j zAqAd@BjDrX2U)1p+@%Bl-f5wV05>f@3{lAwlrX|wipbP%=1vvT1eLkZ1QlYOGQ}+w zitr#PlV@|A03JWI-^M6oj5uClvM{2}kwUm1r$|srO&B4JN2EwR2t);#iG%QJv1s6c z2JOeV@~1$6yMF#b=(l>AVlnB;iFA^PVnz|76oX2Dq~=i>sf2*ai$tL^$TSKTMqnCRL8dck zUNpKFl|dZ<%|nzbkmN>AA^}GtnO1}_(;qNGAlbz6Pz-`s$YM+j#$#cE%>ZE`V{HIt z(>&M<(@%*&YPm8(E|;<~##qrtN>fRpS$)OA43fhpLlYPg8tbjE;$}lJc+-%De;@cy zOyRL|jqHEp8G!b)_$t*Jxl$6M3=za3u=@Qx?*jKTg@InDQY#aAf3d0mz_EJMH4xa! zm5FBl!;vMuquz!j6`Q0&qfJeK3BkSctDvQb&~yYq$KEA47LvsvpxgG9+S_^YJJOg; z5|J5R6c{U{ktkS-NJPg%WEvGq5z^>X3Irh_l?St{y<3+RZ#)kTKdn{wi;q#g10dS=v+qmFzcM$6^;-MM6^Wo|W7Q!V*?Zl;1K7(DB!&^0O8&mk%^|(AnB6-d=H5AQ zpMmQU-+w>$rG>F_{>Hz)bo(1U0P2rUK1kn>a($HRgB186@W<@>DAxxm@Il~@+4X;u z%XZ)i8P$;`G#+LRIx?M%X=>n$VOfu0mTJeP;nQu zfYe$+T%c7^Q9waQ8MJD_1;!;>QBbrhMT#iM+yulhb?o^2P5%>qS?;;t`OdlDJ?GxM zRpFsQW+t{KI2_K58|)teK8-amLj&;6nEFE{4rjO_Jt|re0V(k^xl|w&p?F1_48@}= zp#XNg~)qJizvFdW^GRuf%mg4J+2U5E% zrns1$?Jb?UJg&3y-uQUq#OBTITlW{-?zYDi`@Gr>{hV#kqZU>D-|xO$XG?WjoV*MD zu0=9!(~bT|+Z|)GayI%Qilm5L)p?{3eO^ds~;lc9P>n4nuE!|N$ z%CoRFlGE#5WB=SDo9sQCr99DSa8&i(#m+}Hdmq-6Jw7;g3GFd=@}7_}E9_z#VyvG9 z_Ek?VuP=DE*SFg`JXU_6eTYEr=vj> zr?^_9@nK6v$U6VpFY3ZpIHJkbOZ9&*n!Xd6#w2dctyf1|39lb)FAltTRp$P%|+=m<~bfp$WYCUUu%9%MWvgzHrVE!RaNe2 z4DGvPnsdOBGG(-ZYr>SmdCu)ErX5D{jLrw~Ij;Tq-A!?(rpE&xdvCv);h{WTko;tB zb!T1Sq$~YqZ9ngLG74K?&4J3+-6)Cn*!+F6>FClqvcB}2)TB0EBei6ii^}WsCO78^ zC%Rs&^s^gxVT;}sW~ASdsH1GB+wy}|d)8hr8Be@4`8Y=FSq*>jTk`70qJkN=4VwZ_ z(>(p}8LTdeuIT)>)_U%yt3RBak{8unVR|vo+yOHVt3T1}oa)vcV{~)(gqy4U-2|)B zPq|-M`H9h*MP+44;-1Pp^YfW^^Dh%`Olq{6GbK9lDzT@yRl=!AD=uo9*fRI#BEy2T z%o__@V!kRe9Q|vQfH7Se19$Uc9cl$dcm9|v%5Bb%$e&r4S5kk>^;XTrM|4r!A^EG4 z>tETeTe6`>?mYeOk@+~i{IJ^U%=p*49;lZJ%I`g|f4y{Fg*?Ejs`hu|J-ySXrP^PY zQu=IWb(yVj@JpCMuI;hRA2f7Pt2s4o;<|rT_XH`qF6ZPwv7TSB^6lE^UX4$XTzdBP zev_xXgR$qo-ya;ZFXE-enrG~MhgiGqr;qz4MK^a;20Zr2$ftMrC?TQnR=sV1O@C4l z2RSKuyzR)3Nio;f&VSypk+C&>p{T^Wzu9`;*662`=!+M+o?En~s)amZ0o8lKNta6t z)wvGr)sH*#GS4?JjO=xo_K+bUmte=a`c*PrhjRuwSR#9VUvJT%f#h#CWnyvE%RwkZlraYNp*GW z&+N@wbEw?BJQM#y?`~V$t_K9?*JQVf?9Mxt4o{zOo~ZR+CvMy$IB&BfF>hl|{W66h z!1%;Y1M!2imM@(I9fx*qThjjG_{#M^D!(YYpYh~UV==-rdSQ5XQi+{)C%f}XNin9L zW_~Dhm*sa>>unXjcZ15$lTIdI^nTp_E##P6=xA;=w$~-EVB06AxvEXfou#(-UtK0m zFFeZJcZRy}_U4n6Em!llR)%7h$)CoJBN+bE6*dTn&TiVfkx$^h@~{|K(mJuhd2^CM zj(wM_@A7*u>IUv8j|wFGn>>>0heNz4mPD-rDEW z9_FsFX6dINS-R%Y3YVvPTfILU*i4$V$#GP|ON@1=Kj(y-!E?3#_I(m*cShk1oLh%` zvVpz5zGK?C*e;cF0VW+N+SAixFk^#!Q%X-axIHY^2*G6$%?n|}QZWfaqG;lVBD?m^s75 zN5uvNVpIX)Rbr6@W2-m>EiW5<*O>J3X){aA%VvP)wR4htYsk zRHAUy4Js3*V7f6=FjQmG<}E@5WRR3LvaU}MmlrAVkOu=6gX1olf@@=umMbm;#c(sD=uVlZ1c= zLRctZfrxwx6(Z93DDZ{_Od`{Z3emuuC!I;vp$L-;K_@^W-K;cJ2%w_VJp^7X4;m4n zdwKyXghga|F#r{V&S$|0jZbHKX{j{(!1fL2atKrs<*g-L1StekxtK!;5lT{2ZzrOJ zVl+|#X+-m2cv4uNOcs^K1j*5K_~xK;3>3MB(}O~y4knGj>_ET>fnpPip?H)mlf-Lz zHQT}livhwyn%)4+T02+^+fR-{3aLCwDiv`Enq2W3N^MKweTJHa9U_Ibj#@B^X!>oa z<7PqeWbM$0{66rXm?9ITO3DAm^AQ6>>$u;`!@U=Jdb%7BS{CQK2~J!vq^fJU-oQh`DV$x+{U zPy=9}L2GIE8SkpCKDUu*WdaIngh-*WDHOus_TqiWngjLC@_aN$4v)vy6~ISxB(b@g z%8N{q$wWd_K2n%Bh4No;I{rgN`B(0`ut9G>sVogNZGs|9DS2=BcK`<&LWD3X!KCj? zT^BMai_X0RavrpS`wU!<wbH!waQTHcz&KjL zsB<YFa4JZ-r>mdKI;Vst02iGY5dZ)H diff --git a/graphics/unknown/unknown_D1300C.png b/graphics/unknown/unknown_D1300C.png deleted file mode 100644 index 0c077dd0b67ae1412ef5b10b165038dfcd681944..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 92 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=WltB!5RRG2JF1iZ)wgX{Sj6TM o(=Kdk?I85@^?&0#@BaLkXZU0(@iR?>y&j~^)78&qol`;+0M$$yi~s-t diff --git a/src/battle_interface.c b/src/battle_interface.c index 83bdf0cb71..51dd82c37f 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -153,8 +153,8 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER3, //status4 "BRN" HEALTHBOX_GFX_114, HEALTHBOX_GFX_115, - HEALTHBOX_GFX_116, //unknown_D12FEC - HEALTHBOX_GFX_117, //unknown_D1300C + HEALTHBOX_GFX_116, //gBattleInterfaceGfx_frameend + HEALTHBOX_GFX_117, //gBattleInterfaceGfx_frameend_bar }; // strings diff --git a/src/graphics.c b/src/graphics.c index 37d9533135..5dfdbad687 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -374,8 +374,8 @@ const u8 gUnknown_08C1249C[] = INCBIN_U8("graphics/battle_interface/ball_display const u8 gBattleInterfaceGfx_Status2[] = INCBIN_U8("graphics/battle_interface/status2.4bpp"); // these three duplicate sets of graphics are for the opponent pokemon const u8 gBattleInterfaceGfx_Status3[] = INCBIN_U8("graphics/battle_interface/status3.4bpp"); // and are also for use in double battles. they use dynamic palettes so const u8 gBattleInterfaceGfx_Status4[] = INCBIN_U8("graphics/battle_interface/status4.4bpp"); // coloring them is an extreme headache and wont be done for now -const u8 gUnknown_D12FEC[] = INCBIN_U8("graphics/unknown/unknown_D12FEC.4bpp"); -const u8 gUnknown_D1300C[] = INCBIN_U8("graphics/unknown/unknown_D1300C.4bpp"); +const u8 gBattleInterfaceGfx_frameend[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_frameend.4bpp"); +const u8 gBattleInterfaceGfx_frameend_bar[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_frameend_bar.4bpp"); const u32 gBattleInterfaceGfx_UnusedWindow3[] = INCBIN_U32("graphics/battle_interface/unused_window3.4bpp.lz"); const u32 gBattleInterfaceGfx_UnusedWindow4[] = INCBIN_U32("graphics/battle_interface/unused_window4.4bpp.lz"); From 5f755757f9e04e972ebc6d129fd5495d00d6fc2e Mon Sep 17 00:00:00 2001 From: froggestspirit Date: Mon, 6 Sep 2021 11:40:40 -0400 Subject: [PATCH 008/417] Const rename --- src/battle_interface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/battle_interface.c b/src/battle_interface.c index 51dd82c37f..78364e264a 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -153,8 +153,8 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER3, //status4 "BRN" HEALTHBOX_GFX_114, HEALTHBOX_GFX_115, - HEALTHBOX_GFX_116, //gBattleInterfaceGfx_frameend - HEALTHBOX_GFX_117, //gBattleInterfaceGfx_frameend_bar + HEALTHBOX_GFX_FRAME_END, + HEALTHBOX_GFX_FRAME_END_BAR, }; // strings @@ -1225,7 +1225,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 0, &windowId); HpTextIntoHealthboxObject((void*)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2); RemoveWindowOnHealthbox(windowId); - CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_116), + CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END), (void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x20); } @@ -1291,7 +1291,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 { if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side. { - CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_116), + CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END), (void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP), 0x20); } @@ -1399,7 +1399,7 @@ void SwapHpBarsWithHpText(void) { UpdateStatusIconInHealthbox(gHealthboxSpriteIds[i]); UpdateHealthboxAttribute(gHealthboxSpriteIds[i], &gPlayerParty[gBattlerPartyIndexes[i]], HEALTHBOX_HEALTH_BAR); - CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_117), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32); + CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END_BAR), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32); } } else From 71da126dbbfb553bf15eb6323289b2bb06a8f1df Mon Sep 17 00:00:00 2001 From: froggestspirit Date: Mon, 6 Sep 2021 16:41:59 -0400 Subject: [PATCH 009/417] case --- src/graphics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics.c b/src/graphics.c index 5dfdbad687..f0a118bc73 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -374,8 +374,8 @@ const u8 gUnknown_08C1249C[] = INCBIN_U8("graphics/battle_interface/ball_display const u8 gBattleInterfaceGfx_Status2[] = INCBIN_U8("graphics/battle_interface/status2.4bpp"); // these three duplicate sets of graphics are for the opponent pokemon const u8 gBattleInterfaceGfx_Status3[] = INCBIN_U8("graphics/battle_interface/status3.4bpp"); // and are also for use in double battles. they use dynamic palettes so const u8 gBattleInterfaceGfx_Status4[] = INCBIN_U8("graphics/battle_interface/status4.4bpp"); // coloring them is an extreme headache and wont be done for now -const u8 gBattleInterfaceGfx_frameend[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_frameend.4bpp"); -const u8 gBattleInterfaceGfx_frameend_bar[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_frameend_bar.4bpp"); +const u8 gBattleInterfaceGfx_FrameEnd[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_frameend.4bpp"); +const u8 gBattleInterfaceGfx_FrameEnd_Bar[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_frameend_bar.4bpp"); const u32 gBattleInterfaceGfx_UnusedWindow3[] = INCBIN_U32("graphics/battle_interface/unused_window3.4bpp.lz"); const u32 gBattleInterfaceGfx_UnusedWindow4[] = INCBIN_U32("graphics/battle_interface/unused_window4.4bpp.lz"); From b183a793a19ac6e50ea682de23a2637319c87336 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 6 Sep 2021 17:39:21 -0400 Subject: [PATCH 010/417] Move more gfx symbols into gHealthboxElementsGfxTable --- src/battle_interface.c | 14 +++++++------- src/graphics.c | 20 ++++++++------------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/battle_interface.c b/src/battle_interface.c index 78364e264a..bcb97947cf 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -103,11 +103,11 @@ enum HEALTHBOX_GFX_63, //hp bar red [7 pixels] HEALTHBOX_GFX_64, //hp bar red [8 pixels] HEALTHBOX_GFX_65, //hp bar frame end - HEALTHBOX_GFX_66, //status ball [full] - HEALTHBOX_GFX_67, //status ball [empty] - HEALTHBOX_GFX_68, //status ball [fainted] - HEALTHBOX_GFX_69, //status ball [statused] - HEALTHBOX_GFX_70, //status ball [unused extra] + HEALTHBOX_GFX_STATUS_BALL, // Full + HEALTHBOX_GFX_STATUS_BALL_EMPTY, + HEALTHBOX_GFX_STATUS_BALL_FAINTED, + HEALTHBOX_GFX_STATUS_BALL_STATUSED, + HEALTHBOX_GFX_STATUS_BALL_CAUGHT, HEALTHBOX_GFX_STATUS_PSN_BATTLER1, //status2 "PSN" HEALTHBOX_GFX_72, HEALTHBOX_GFX_73, @@ -636,7 +636,7 @@ static const struct SpritePalette sStatusSummaryBallsSpritePal = static const struct SpriteSheet sStatusSummaryBallsSpriteSheet = { - gBattleInterface_BallDisplayGfx, 0x80, TAG_STATUS_SUMMARY_BALLS_TILE + &gHealthboxElementsGfxTable[HEALTHBOX_GFX_STATUS_BALL], 0x80, TAG_STATUS_SUMMARY_BALLS_TILE }; // unused oam data @@ -1962,7 +1962,7 @@ static void TryAddPokeballIconToHealthbox(u8 healthboxSpriteId, bool8 noStatus) healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId; if (noStatus) - CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_70), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32); + CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_STATUS_BALL_CAUGHT), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32); else CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32); } diff --git a/src/graphics.c b/src/graphics.c index f0a118bc73..4e820caec7 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -355,7 +355,6 @@ const u16 gBattleInterface_BallStatusBarPal[] = INCBIN_U16("graphics/battle_inte const u16 gBattleInterface_BallDisplayPal[] = INCBIN_U16("graphics/battle_interface/ball_display.gbapal"); -//Originally an array? const u8 gHealthboxElementsGfxTable[] = INCBIN_U8("graphics/battle_interface/hpbar.4bpp", "graphics/battle_interface/expbar.4bpp", "graphics/battle_interface/status_psn.4bpp", @@ -365,17 +364,14 @@ const u8 gHealthboxElementsGfxTable[] = INCBIN_U8("graphics/battle_interface/hpb "graphics/battle_interface/status_brn.4bpp", "graphics/battle_interface/misc.4bpp", "graphics/battle_interface/hpbar_anim.4bpp", - "graphics/battle_interface/misc_frameend.4bpp"); - -const u8 gBattleInterface_BallDisplayGfx[] = INCBIN_U8("graphics/battle_interface/ball_display.4bpp"); - -//Originally an array? -const u8 gUnknown_08C1249C[] = INCBIN_U8("graphics/battle_interface/ball_display_unused_extra.4bpp"); -const u8 gBattleInterfaceGfx_Status2[] = INCBIN_U8("graphics/battle_interface/status2.4bpp"); // these three duplicate sets of graphics are for the opponent pokemon -const u8 gBattleInterfaceGfx_Status3[] = INCBIN_U8("graphics/battle_interface/status3.4bpp"); // and are also for use in double battles. they use dynamic palettes so -const u8 gBattleInterfaceGfx_Status4[] = INCBIN_U8("graphics/battle_interface/status4.4bpp"); // coloring them is an extreme headache and wont be done for now -const u8 gBattleInterfaceGfx_FrameEnd[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_frameend.4bpp"); -const u8 gBattleInterfaceGfx_FrameEnd_Bar[] = INCBIN_U8("graphics/battle_interface/healthbox_doubles_frameend_bar.4bpp"); + "graphics/battle_interface/misc_frameend.4bpp", + "graphics/battle_interface/ball_display.4bpp", + "graphics/battle_interface/ball_display_unused_extra.4bpp", + "graphics/battle_interface/status2.4bpp", // these three duplicate sets of graphics are for the opponent pokemon + "graphics/battle_interface/status3.4bpp", // and are also for use in double battles. they use dynamic palettes so + "graphics/battle_interface/status4.4bpp", // coloring them is an extreme headache and wont be done for now + "graphics/battle_interface/healthbox_doubles_frameend.4bpp", + "graphics/battle_interface/healthbox_doubles_frameend_bar.4bpp"); const u32 gBattleInterfaceGfx_UnusedWindow3[] = INCBIN_U32("graphics/battle_interface/unused_window3.4bpp.lz"); const u32 gBattleInterfaceGfx_UnusedWindow4[] = INCBIN_U32("graphics/battle_interface/unused_window4.4bpp.lz"); From cbf8863e5bdae68d851e940660ac9d4c948498df Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 9 Sep 2021 15:24:34 -0400 Subject: [PATCH 011/417] Clean up Lilycove Lady --- include/constants/global.h | 1 + include/constants/lilycove_lady.h | 2 - include/global.h | 2 +- src/data/lilycove_lady.h | 32 ++-- src/lilycove_lady.c | 238 ++++++++++++------------------ 5 files changed, 116 insertions(+), 159 deletions(-) diff --git a/include/constants/global.h b/include/constants/global.h index 9b0c46ce40..1cece79753 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -86,6 +86,7 @@ #define EASY_CHAT_BATTLE_WORDS_COUNT 6 #define MOVE_NAME_LENGTH 12 #define NUM_QUESTIONNAIRE_WORDS 4 +#define QUIZ_QUESTION_LEN 9 #define MALE 0 #define FEMALE 1 diff --git a/include/constants/lilycove_lady.h b/include/constants/lilycove_lady.h index 11b9b31e93..e6327904d3 100644 --- a/include/constants/lilycove_lady.h +++ b/include/constants/lilycove_lady.h @@ -20,8 +20,6 @@ #define QUIZ_AUTHOR_NAME_LADY 0 #define QUIZ_AUTHOR_NAME_PLAYER 1 #define QUIZ_AUTHOR_NAME_OTHER_PLAYER 2 - -#define QUIZ_QUESTION_LEN 9 // Constants for how many good Pokéblocks the Contest Lady was given // This determines how her performance is described when her TV show comes on diff --git a/include/global.h b/include/global.h index e4c11f9ef2..db4a17f1be 100644 --- a/include/global.h +++ b/include/global.h @@ -761,7 +761,7 @@ struct LilycoveLadyQuiz { /*0x000*/ u8 id; /*0x001*/ u8 state; - /*0x002*/ u16 question[9]; + /*0x002*/ u16 question[QUIZ_QUESTION_LEN]; /*0x014*/ u16 correctAnswer; /*0x016*/ u16 playerAnswer; /*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; diff --git a/src/data/lilycove_lady.h b/src/data/lilycove_lady.h index 818a5fd5f3..74c049059f 100644 --- a/src/data/lilycove_lady.h +++ b/src/data/lilycove_lady.h @@ -20,7 +20,7 @@ static const u16 sLilycoveLadyGfxId[] = }; // Quiz Lady data -static const u16 sQuizLadyQuestion1[] = +static const u16 sQuizLadyQuestion1[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_STORES, @@ -33,7 +33,7 @@ static const u16 sQuizLadyQuestion1[] = EC_WORD_POKENAV }; -static const u16 sQuizLadyQuestion2[] = +static const u16 sQuizLadyQuestion2[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_ISN_T, @@ -46,7 +46,7 @@ static const u16 sQuizLadyQuestion2[] = EC_WORD_DARK }; -static const u16 sQuizLadyQuestion3[] = +static const u16 sQuizLadyQuestion3[QUIZ_QUESTION_LEN] = { EC_WORD_HOW, EC_WORD_DO, @@ -59,7 +59,7 @@ static const u16 sQuizLadyQuestion3[] = EC_WORD_CUTE_CHARM }; -static const u16 sQuizLadyQuestion4[] = +static const u16 sQuizLadyQuestion4[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_IS, @@ -72,7 +72,7 @@ static const u16 sQuizLadyQuestion4[] = EC_WORD_MACHINE }; -static const u16 sQuizLadyQuestion5[] = +static const u16 sQuizLadyQuestion5[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_ITEM, @@ -85,7 +85,7 @@ static const u16 sQuizLadyQuestion5[] = EC_WORD_PHONE }; -static const u16 sQuizLadyQuestion6[] = +static const u16 sQuizLadyQuestion6[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_WILL, @@ -98,7 +98,7 @@ static const u16 sQuizLadyQuestion6[] = EC_WORD_SWIFT_SWIM }; -static const u16 sQuizLadyQuestion7[] = +static const u16 sQuizLadyQuestion7[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_OF, @@ -111,7 +111,7 @@ static const u16 sQuizLadyQuestion7[] = EC_WORD_ROCK }; -static const u16 sQuizLadyQuestion8[] = +static const u16 sQuizLadyQuestion8[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_WILL, @@ -124,7 +124,7 @@ static const u16 sQuizLadyQuestion8[] = EC_WORD_WONDER_GUARD }; -static const u16 sQuizLadyQuestion9[] = +static const u16 sQuizLadyQuestion9[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_WILL, @@ -137,7 +137,7 @@ static const u16 sQuizLadyQuestion9[] = EC_WORD_SHED_SKIN }; -static const u16 sQuizLadyQuestion10[] = +static const u16 sQuizLadyQuestion10[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_GOES, @@ -150,7 +150,7 @@ static const u16 sQuizLadyQuestion10[] = EC_WORD_POKENAV }; -static const u16 sQuizLadyQuestion11[] = +static const u16 sQuizLadyQuestion11[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_STORES, @@ -163,7 +163,7 @@ static const u16 sQuizLadyQuestion11[] = EC_WORD_TELEVISION }; -static const u16 sQuizLadyQuestion12[] = +static const u16 sQuizLadyQuestion12[QUIZ_QUESTION_LEN] = { EC_WORD_WHICH, EC_WORD_MACHINE, @@ -176,7 +176,7 @@ static const u16 sQuizLadyQuestion12[] = EC_WORD_TELEVISION }; -static const u16 sQuizLadyQuestion13[] = +static const u16 sQuizLadyQuestion13[QUIZ_QUESTION_LEN] = { EC_WORD_A, EC_WORD_POKEMON, @@ -189,7 +189,7 @@ static const u16 sQuizLadyQuestion13[] = EC_WORD_LETTER }; -static const u16 sQuizLadyQuestion14[] = +static const u16 sQuizLadyQuestion14[QUIZ_QUESTION_LEN] = { EC_WORD_STEEL, EC_WORD_IS, @@ -202,7 +202,7 @@ static const u16 sQuizLadyQuestion14[] = EC_EMPTY_WORD }; -static const u16 sQuizLadyQuestion15[] = +static const u16 sQuizLadyQuestion15[QUIZ_QUESTION_LEN] = { EC_WORD_DARK, EC_WORD_IS, @@ -215,7 +215,7 @@ static const u16 sQuizLadyQuestion15[] = EC_EMPTY_WORD }; -static const u16 sQuizLadyQuestion16[] = +static const u16 sQuizLadyQuestion16[QUIZ_QUESTION_LEN] = { EC_WORD_GHOST, EC_WORD_IS, diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 6fa8ba4eb4..d65502eb43 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -65,15 +65,15 @@ void InitLilycoveLady(void) id >>= 1; switch (id) { - case LILYCOVE_LADY_QUIZ: - InitLilycoveQuizLady(); - break; - case LILYCOVE_LADY_FAVOR: - InitLilycoveFavorLady(); - break; - case LILYCOVE_LADY_CONTEST: - InitLilycoveContestLady(); - break; + case LILYCOVE_LADY_QUIZ: + InitLilycoveQuizLady(); + break; + case LILYCOVE_LADY_FAVOR: + InitLilycoveFavorLady(); + break; + case LILYCOVE_LADY_CONTEST: + InitLilycoveContestLady(); + break; } } @@ -81,15 +81,15 @@ void ResetLilycoveLadyForRecordMix(void) { switch (GetLilycoveLadyId()) { - case LILYCOVE_LADY_QUIZ: - ResetQuizLadyForRecordMix(); - break; - case LILYCOVE_LADY_FAVOR: - ResetFavorLadyForRecordMix(); - break; - case LILYCOVE_LADY_CONTEST: - ResetContestLadyForRecordMix(); - break; + case LILYCOVE_LADY_QUIZ: + ResetQuizLadyForRecordMix(); + break; + case LILYCOVE_LADY_FAVOR: + ResetFavorLadyForRecordMix(); + break; + case LILYCOVE_LADY_CONTEST: + ResetContestLadyForRecordMix(); + break; } } @@ -100,15 +100,15 @@ void InitLilycoveLadyRandomly(void) switch (lady) { - case LILYCOVE_LADY_QUIZ: - InitLilycoveQuizLady(); - break; - case LILYCOVE_LADY_FAVOR: - InitLilycoveFavorLady(); - break; - case LILYCOVE_LADY_CONTEST: - InitLilycoveContestLady(); - break; + case LILYCOVE_LADY_QUIZ: + InitLilycoveQuizLady(); + break; + case LILYCOVE_LADY_FAVOR: + InitLilycoveFavorLady(); + break; + case LILYCOVE_LADY_CONTEST: + InitLilycoveContestLady(); + break; } } @@ -119,10 +119,10 @@ void Script_GetLilycoveLadyId(void) static u8 GetNumAcceptedItems(const u16 *itemsArray) { - u8 items; + u8 numItems; - for (items = 0; *itemsArray != ITEM_NONE; items ++, itemsArray ++); - return items; + for (numItems = 0; *itemsArray != ITEM_NONE; numItems++, itemsArray++); + return numItems; } static void FavorLadyPickFavorAndBestItem(void) @@ -160,17 +160,11 @@ u8 GetFavorLadyState(void) { sFavorLadyPtr = &gSaveBlock1Ptr->lilycoveLady.favor; if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE) - { return LILYCOVE_LADY_STATE_PRIZE; - } else if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED) - { return LILYCOVE_LADY_STATE_COMPLETED; - } else - { return LILYCOVE_LADY_STATE_READY; - } } static const u8 *GetFavorLadyRequest(u8 idx) @@ -209,7 +203,7 @@ void BufferFavorLadyItemName(void) static void SetFavorLadyPlayerName(const u8 *src, u8 *dest) { - memset(dest, 0xFF, 8); + memset(dest, EOS, PLAYER_NAME_LENGTH + 1); StringCopy7(dest, src); } @@ -254,9 +248,7 @@ static bool8 DoesFavorLadyLikeItem(u16 itemId) sFavorLadyPtr->numItemsGiven++; sFavorLadyPtr->likedItem = TRUE; if (sFavorLadyPtr->bestItem == itemId) - { sFavorLadyPtr->numItemsGiven = LILYCOVE_LADY_GIFT_THRESHOLD; - } break; } sFavorLadyPtr->likedItem = FALSE; @@ -312,9 +304,7 @@ static void QuizLadyPickQuestion(void) questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions); for (i = 0; i < QUIZ_QUESTION_LEN; i ++) - { sQuizLadyPtr->question[i] = sQuizLadyQuizQuestions[questionId][i]; - } sQuizLadyPtr->correctAnswer = sQuizLadyQuizAnswers[questionId]; sQuizLadyPtr->prize = sQuizLadyPrizes[questionId]; sQuizLadyPtr->questionId = questionId; @@ -328,16 +318,16 @@ static void InitLilycoveQuizLady(void) sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ; sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY; + for (i = 0; i < QUIZ_QUESTION_LEN; i ++) - { - sQuizLadyPtr->question[i] = -1; - } - sQuizLadyPtr->correctAnswer = -1; - sQuizLadyPtr->playerAnswer = -1; + sQuizLadyPtr->question[i] = EC_EMPTY_WORD; + + sQuizLadyPtr->correctAnswer = EC_EMPTY_WORD; + sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD; + for (i = 0; i < TRAINER_ID_LENGTH; i ++) - { sQuizLadyPtr->playerTrainerId[i] = 0; - } + sQuizLadyPtr->prize = ITEM_NONE; sQuizLadyPtr->waitingForChallenger = FALSE; sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions); @@ -351,48 +341,37 @@ static void ResetQuizLadyForRecordMix(void) sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ; sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY; sQuizLadyPtr->waitingForChallenger = FALSE; - sQuizLadyPtr->playerAnswer = -1; + sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD; } u8 GetQuizLadyState(void) { sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE) - { return LILYCOVE_LADY_STATE_PRIZE; - } else if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED) - { return LILYCOVE_LADY_STATE_COMPLETED; - } else - { return LILYCOVE_LADY_STATE_READY; - } } u8 GetQuizAuthor(void) { - int i; - int j; + s32 i, j; u8 authorNameId; - struct LilycoveLadyQuiz *quiz; + struct LilycoveLadyQuiz *quiz = &gSaveBlock1Ptr->lilycoveLady.quiz; - quiz = &gSaveBlock1Ptr->lilycoveLady.quiz; if (IsEasyChatAnswerUnlocked(quiz->correctAnswer) == FALSE) { i = quiz->questionId; do { - if (++ i >= (int)(ARRAY_COUNT(sQuizLadyQuizQuestions))) - { + if (++i >= (int)ARRAY_COUNT(sQuizLadyQuizQuestions)) i = 0; - } } while (IsEasyChatAnswerUnlocked(sQuizLadyQuizAnswers[i]) == FALSE); - for (j = 0; j < QUIZ_QUESTION_LEN; j ++) - { + + for (j = 0; j < QUIZ_QUESTION_LEN; j++) quiz->question[j] = sQuizLadyQuizQuestions[i][j]; - } quiz->correctAnswer = sQuizLadyQuizAnswers[i]; quiz->prize = sQuizLadyPrizes[i]; quiz->questionId = i; @@ -400,17 +379,11 @@ u8 GetQuizAuthor(void) } authorNameId = BufferQuizAuthorName(); if (authorNameId == QUIZ_AUTHOR_NAME_LADY) - { return QUIZ_AUTHOR_LADY; - } else if (authorNameId == QUIZ_AUTHOR_NAME_OTHER_PLAYER || IsQuizTrainerIdNotPlayer()) - { return QUIZ_AUTHOR_OTHER_PLAYER; - } else - { return QUIZ_AUTHOR_PLAYER; - } } static u8 BufferQuizAuthorName(void) @@ -434,7 +407,7 @@ static u8 BufferQuizAuthorName(void) if (nameLen == GetPlayerNameLength(gSaveBlock2Ptr->playerName)) { u8 *name = sQuizLadyPtr->playerName; - for (i = 0; i < nameLen; i ++) + for (i = 0; i < nameLen; i++) { name = sQuizLadyPtr->playerName; if (name[i] != gSaveBlock2Ptr->playerName[i]) @@ -456,7 +429,7 @@ static bool8 IsQuizTrainerIdNotPlayer(void) sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; notPlayer = FALSE; - for (i = 0; i < TRAINER_ID_LENGTH; i ++) + for (i = 0; i < TRAINER_ID_LENGTH; i++) { if (sQuizLadyPtr->playerTrainerId[i] != gSaveBlock2Ptr->playerTrainerId[i]) { @@ -472,7 +445,7 @@ static u8 GetPlayerNameLength(const u8 *playerName) u8 len; const u8 *ptr; - for (len = 0, ptr = playerName; *ptr != EOS; len ++, ptr ++); + for (len = 0, ptr = playerName; *ptr != EOS; len++, ptr++); return len; } @@ -532,7 +505,7 @@ void SetQuizLadyState_GivePrize(void) void ClearQuizLadyPlayerAnswer(void) { sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; - sQuizLadyPtr->playerAnswer = -1; + sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD; } void Script_QuizLadyOpenBagMenu(void) @@ -544,13 +517,9 @@ void QuizLadyPickNewQuestion(void) { sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; if (BufferQuizAuthorNameAndCheckIfLady()) - { sQuizLadyPtr->prevQuestionId = sQuizLadyPtr->questionId; - } else - { sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions); - } QuizLadyPickQuestion(); } @@ -559,11 +528,9 @@ void ClearQuizLadyQuestionAndAnswer(void) u8 i; sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; - for (i = 0; i < QUIZ_QUESTION_LEN; i ++) - { - sQuizLadyPtr->question[i] = -1; - } - sQuizLadyPtr->correctAnswer = -1; + for (i = 0; i < QUIZ_QUESTION_LEN; i++) + sQuizLadyPtr->question[i] = EC_EMPTY_WORD; + sQuizLadyPtr->correctAnswer = EC_EMPTY_WORD; } void QuizLadySetCustomQuestion(void) @@ -583,10 +550,8 @@ void QuizLadyRecordCustomQuizData(void) sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr->prize = gSpecialVar_ItemId; - for (i = 0; i < TRAINER_ID_LENGTH; i ++) - { + for (i = 0; i < TRAINER_ID_LENGTH; i++) sQuizLadyPtr->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; - } StringCopy7(sQuizLadyPtr->playerName, gSaveBlock2Ptr->playerName); sQuizLadyPtr->language = gGameLanguage; } @@ -617,18 +582,15 @@ void QuizLadyClearQuestionForRecordMix(const LilycoveLady *lilycoveLady) if (lilycoveLady->quiz.prevQuestionId < ARRAY_COUNT(sQuizLadyQuizQuestions) && sQuizLadyPtr->id == LILYCOVE_LADY_QUIZ) { - for (i = 0; i < 4; i ++) + for (i = 0; i < 4; i++) { if (lilycoveLady->quiz.prevQuestionId != sQuizLadyPtr->questionId) - { break; - } sQuizLadyPtr->questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions); } if (lilycoveLady->quiz.prevQuestionId == sQuizLadyPtr->questionId) - { - sQuizLadyPtr->questionId = (sQuizLadyPtr->questionId + 1) % (int)(ARRAY_COUNT(sQuizLadyQuizQuestions)); - } + sQuizLadyPtr->questionId = (sQuizLadyPtr->questionId + 1) % (int)ARRAY_COUNT(sQuizLadyQuizQuestions); + sQuizLadyPtr->prevQuestionId = lilycoveLady->quiz.prevQuestionId; } } @@ -656,11 +618,10 @@ static void ResetContestLadyForRecordMix(void) sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; sContestLadyPtr->id = LILYCOVE_LADY_CONTEST; sContestLadyPtr->givenPokeblock = FALSE; + if (sContestLadyPtr->numGoodPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD || sContestLadyPtr->numOtherPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD) - { ResetContestLadyContestData(); - } } static void ContestLadySavePlayerNameIfHighSheen(u8 sheen) @@ -683,41 +644,41 @@ bool8 GivePokeblockToContestLady(struct Pokeblock *pokeblock) sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; switch (sContestLadyPtr->category) { - case CONTEST_CATEGORY_COOL: - if (pokeblock->spicy != 0) - { - sheen = pokeblock->spicy; - correctFlavor = TRUE; - } - break; - case CONTEST_CATEGORY_BEAUTY: - if (pokeblock->dry != 0) - { - sheen = pokeblock->dry; - correctFlavor = TRUE; - } - break; - case CONTEST_CATEGORY_CUTE: - if (pokeblock->sweet != 0) - { - sheen = pokeblock->sweet; - correctFlavor = TRUE; - } - break; - case CONTEST_CATEGORY_SMART: - if (pokeblock->bitter != 0) - { - sheen = pokeblock->bitter; - correctFlavor = TRUE; - } - break; - case CONTEST_CATEGORY_TOUGH: - if (pokeblock->sour != 0) - { - sheen = pokeblock->sour; - correctFlavor = TRUE; - } - break; + case CONTEST_CATEGORY_COOL: + if (pokeblock->spicy != 0) + { + sheen = pokeblock->spicy; + correctFlavor = TRUE; + } + break; + case CONTEST_CATEGORY_BEAUTY: + if (pokeblock->dry != 0) + { + sheen = pokeblock->dry; + correctFlavor = TRUE; + } + break; + case CONTEST_CATEGORY_CUTE: + if (pokeblock->sweet != 0) + { + sheen = pokeblock->sweet; + correctFlavor = TRUE; + } + break; + case CONTEST_CATEGORY_SMART: + if (pokeblock->bitter != 0) + { + sheen = pokeblock->bitter; + correctFlavor = TRUE; + } + break; + case CONTEST_CATEGORY_TOUGH: + if (pokeblock->sour != 0) + { + sheen = pokeblock->sour; + correctFlavor = TRUE; + } + break; } if (correctFlavor == TRUE) { @@ -731,18 +692,18 @@ bool8 GivePokeblockToContestLady(struct Pokeblock *pokeblock) return correctFlavor; } -static void BufferContestLadyCategoryAndMonName(u8 *dest1, u8 *dest2) +static void BufferContestLadyCategoryAndMonName(u8 *category, u8 *nickname) { sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; - StringCopy(dest1, sContestLadyCategoryNames[sContestLadyPtr->category]); - StringCopy10(dest2, sContestLadyMonNames[sContestLadyPtr->category]); + StringCopy(category, sContestLadyCategoryNames[sContestLadyPtr->category]); + StringCopy10(nickname, sContestLadyMonNames[sContestLadyPtr->category]); } -void BufferContestLadyMonName(u8 *dest1, u8 *dest2) +void BufferContestLadyMonName(u8 *category, u8 *nickname) { sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; - *dest1 = sContestLadyPtr->category; - StringCopy(dest2, sContestLadyMonNames[sContestLadyPtr->category]); + *category = sContestLadyPtr->category; + StringCopy(nickname, sContestLadyMonNames[sContestLadyPtr->category]); } void BufferContestLadyPlayerName(u8 *dest) @@ -779,9 +740,7 @@ bool8 HasPlayerGivenContestLadyPokeblock(void) { sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; if (sContestLadyPtr->givenPokeblock == TRUE) - { return TRUE; - } return FALSE; } @@ -792,9 +751,8 @@ bool8 ShouldContestLadyShowGoOnAir(void) sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD || sContestLadyPtr->numOtherPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD) - { putOnAir = TRUE; - } + return putOnAir; } From f8f7617946e150514313267ba52a35ebd9052936 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 14 Sep 2021 13:14:14 -0400 Subject: [PATCH 012/417] Add TAG_NONE --- gflib/sprite.c | 26 +- gflib/sprite.h | 2 +- src/battle_arena.c | 2 +- src/battle_dome.c | 28 +- src/battle_factory_screen.c | 12 +- src/battle_transition.c | 6 +- src/data/field_effects/field_effect_objects.h | 98 ++-- .../object_event_graphics_info.h | 490 +++++++++--------- src/decoration.c | 4 +- src/event_object_movement.c | 12 +- src/field_effect.c | 16 +- src/field_weather_effect.c | 2 +- src/fldeff_cut.c | 2 +- src/fldeff_misc.c | 10 +- src/hall_of_fame.c | 6 +- src/intro_credits_graphics.c | 2 +- src/item_menu_icons.c | 4 +- src/list_menu.c | 26 +- src/mirage_tower.c | 8 +- src/naming_screen.c | 2 +- src/overworld.c | 2 +- src/pokedex.c | 4 +- src/pokemon.c | 28 +- src/pokemon_icon.c | 2 +- src/pokenav_ribbons_2.c | 2 +- src/reset_rtc_screen.c | 2 +- src/rotating_gate.c | 4 +- src/slot_machine.c | 46 +- src/starter_choose.c | 2 +- src/trainer_pokemon_sprites.c | 18 +- src/trainer_see.c | 6 +- 31 files changed, 437 insertions(+), 437 deletions(-) diff --git a/gflib/sprite.c b/gflib/sprite.c index 408daf6f91..62e15f74ca 100644 --- a/gflib/sprite.c +++ b/gflib/sprite.c @@ -210,7 +210,7 @@ const union AffineAnimCmd * const gDummySpriteAffineAnimTable[] = { &sDummyAffin const struct SpriteTemplate gDummySpriteTemplate = { .tileTag = 0, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &gDummyOamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -588,7 +588,7 @@ u8 CreateSpriteAt(u8 index, const struct SpriteTemplate *template, s16 x, s16 y, CalcCenterToCornerVec(sprite, sprite->oam.shape, sprite->oam.size, sprite->oam.affineMode); - if (template->tileTag == 0xFFFF) + if (template->tileTag == TAG_NONE) { s16 tileNum; sprite->images = template->images; @@ -611,7 +611,7 @@ u8 CreateSpriteAt(u8 index, const struct SpriteTemplate *template, s16 x, s16 y, if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK) InitSpriteAffineAnim(sprite); - if (template->paletteTag != 0xFFFF) + if (template->paletteTag != TAG_NONE) sprite->oam.paletteNum = IndexOfSpritePaletteTag(template->paletteTag); return index; @@ -893,7 +893,7 @@ void ResetAllSprites(void) // UB: template pointer may point to freed temporary storage void FreeSpriteTiles(struct Sprite *sprite) { - if (sprite->template->tileTag != 0xFFFF) + if (sprite->template->tileTag != TAG_NONE) FreeSpriteTilesByTag(sprite->template->tileTag); } @@ -1540,7 +1540,7 @@ void FreeSpriteTilesByTag(u16 tag) for (i = start; i < start + count; i++) FREE_SPRITE_TILE(i); - sSpriteTileRangeTags[index] = 0xFFFF; + sSpriteTileRangeTags[index] = TAG_NONE; } } @@ -1550,7 +1550,7 @@ void FreeSpriteTileRanges(void) for (i = 0; i < MAX_SPRITES; i++) { - sSpriteTileRangeTags[i] = 0xFFFF; + sSpriteTileRangeTags[i] = TAG_NONE; SET_SPRITE_TILE_RANGE(i, 0, 0); } } @@ -1580,16 +1580,16 @@ u16 GetSpriteTileTagByTileStart(u16 start) for (i = 0; i < MAX_SPRITES; i++) { - if (sSpriteTileRangeTags[i] != 0xFFFF && sSpriteTileRanges[i * 2] == start) + if (sSpriteTileRangeTags[i] != TAG_NONE && sSpriteTileRanges[i * 2] == start) return sSpriteTileRangeTags[i]; } - return 0xFFFF; + return TAG_NONE; } void AllocSpriteTileRange(u16 tag, u16 start, u16 count) { - u8 freeIndex = IndexOfSpriteTileTag(0xFFFF); + u8 freeIndex = IndexOfSpriteTileTag(TAG_NONE); sSpriteTileRangeTags[freeIndex] = tag; SET_SPRITE_TILE_RANGE(freeIndex, start, count); } @@ -1599,7 +1599,7 @@ void FreeAllSpritePalettes(void) u8 i; gReservedSpritePaletteCount = 0; for (i = 0; i < 16; i++) - sSpritePaletteTags[i] = 0xFFFF; + sSpritePaletteTags[i] = TAG_NONE; } u8 LoadSpritePalette(const struct SpritePalette *palette) @@ -1609,7 +1609,7 @@ u8 LoadSpritePalette(const struct SpritePalette *palette) if (index != 0xFF) return index; - index = IndexOfSpritePaletteTag(0xFFFF); + index = IndexOfSpritePaletteTag(TAG_NONE); if (index == 0xFF) { @@ -1638,7 +1638,7 @@ void DoLoadSpritePalette(const u16 *src, u16 paletteOffset) u8 AllocSpritePalette(u16 tag) { - u8 index = IndexOfSpritePaletteTag(0xFFFF); + u8 index = IndexOfSpritePaletteTag(TAG_NONE); if (index == 0xFF) { return 0xFF; @@ -1669,7 +1669,7 @@ void FreeSpritePaletteByTag(u16 tag) { u8 index = IndexOfSpritePaletteTag(tag); if (index != 0xFF) - sSpritePaletteTags[index] = 0xFFFF; + sSpritePaletteTags[index] = TAG_NONE; } void SetSubspriteTables(struct Sprite *sprite, const struct SubspriteTable *subspriteTables) diff --git a/gflib/sprite.h b/gflib/sprite.h index 02bc0748b4..89299d43ed 100644 --- a/gflib/sprite.h +++ b/gflib/sprite.h @@ -3,7 +3,7 @@ #define MAX_SPRITES 64 #define SPRITE_NONE 0xFF -#define SPRITE_INVALID_TAG 0xFFFF +#define TAG_NONE 0xFFFF struct SpriteSheet { diff --git a/src/battle_arena.c b/src/battle_arena.c index 11c918225a..13e610b9ee 100644 --- a/src/battle_arena.c +++ b/src/battle_arena.c @@ -453,7 +453,7 @@ static const union AnimCmd *const sJudgementIconAnimCmds[] = static const struct SpriteTemplate sSpriteTemplate_JudgmentIcon = { .tileTag = TAG_JUDGEMENT_ICON, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &sJudgementIconOamData, .anims = sJudgementIconAnimCmds, .images = NULL, diff --git a/src/battle_dome.c b/src/battle_dome.c index edd7bf9502..665819bb96 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -978,7 +978,7 @@ static const union AnimCmd * const sSpriteAnimTable_TourneyTreePokeball[] = static const struct SpriteTemplate sTourneyTreePokeballSpriteTemplate = { .tileTag = 0x0000, - .paletteTag = 0xffff, + .paletteTag = TAG_NONE, .oam = &sOamData_TourneyTreePokeball, .anims = sSpriteAnimTable_TourneyTreePokeball, .images = NULL, @@ -1007,7 +1007,7 @@ static const union AnimCmd * const sSpriteAnimTable_TourneyTreeCancelButton[] = static const struct SpriteTemplate sCancelButtonSpriteTemplate = { .tileTag = 0x0000, - .paletteTag = 0xffff, + .paletteTag = TAG_NONE, .oam = &sOamData_TourneyTreeCloseButton, .anims = sSpriteAnimTable_TourneyTreeCancelButton, .images = NULL, @@ -1036,7 +1036,7 @@ static const union AnimCmd * const sSpriteAnimTable_TourneyTreeExitButton[] = static const struct SpriteTemplate sExitButtonSpriteTemplate = { .tileTag = 0x0000, - .paletteTag = 0xffff, + .paletteTag = TAG_NONE, .oam = &sOamData_TourneyTreeCloseButton, .anims = sSpriteAnimTable_TourneyTreeExitButton, .images = NULL, @@ -1083,7 +1083,7 @@ static const union AnimCmd * const sSpriteAnimTable_HorizontalScrollArrow[] = static const struct SpriteTemplate sHorizontalScrollArrowSpriteTemplate = { .tileTag = 0x0000, - .paletteTag = 0xffff, + .paletteTag = TAG_NONE, .oam = &sOamData_HorizontalScrollArrow, .anims = sSpriteAnimTable_HorizontalScrollArrow, .images = NULL, @@ -1094,7 +1094,7 @@ static const struct SpriteTemplate sHorizontalScrollArrowSpriteTemplate = static const struct SpriteTemplate sVerticalScrollArrowSpriteTemplate = { .tileTag = 0x0000, - .paletteTag = 0xffff, + .paletteTag = TAG_NONE, .oam = &sOamData_VerticalScrollArrow, .anims = sSpriteAnimTable_VerticalScrollArrow, .images = NULL, @@ -4267,11 +4267,11 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) // Create trainer pic sprite if (trainerId == TRAINER_PLAYER) - sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), TRUE, x + 48, y + 64, palSlot + 12, 0xFFFF); + sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), TRUE, x + 48, y + 64, palSlot + 12, TAG_NONE); else if (trainerId == TRAINER_FRONTIER_BRAIN) - sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(GetDomeBrainTrainerPicId(), TRUE, x + 48, y + 64, palSlot + 12, 0xFFFF); + sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(GetDomeBrainTrainerPicId(), TRUE, x + 48, y + 64, palSlot + 12, TAG_NONE); else - sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(GetFrontierTrainerFrontSpriteId(trainerId), TRUE, x + 48, y + 64, palSlot + 12, 0xFFFF); + sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(GetFrontierTrainerFrontSpriteId(trainerId), TRUE, x + 48, y + 64, palSlot + 12, TAG_NONE); if (flags & MOVE_CARD) gSprites[sInfoCard->spriteIds[arrId]].invisible = TRUE; @@ -4741,11 +4741,11 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) // Draw left trainer sprite. if (trainerIds[0] == TRAINER_PLAYER) - sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), TRUE, x + 48, y + 88, palSlot + 12, 0xFFFF); + sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), TRUE, x + 48, y + 88, palSlot + 12, TAG_NONE); else if (trainerIds[0] == TRAINER_FRONTIER_BRAIN) - sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(GetDomeBrainTrainerPicId(), TRUE, x + 48, y + 88, palSlot + 12, 0xFFFF); + sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(GetDomeBrainTrainerPicId(), TRUE, x + 48, y + 88, palSlot + 12, TAG_NONE); else - sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(GetFrontierTrainerFrontSpriteId(trainerIds[0]), TRUE, x + 48, y + 88, palSlot + 12, 0xFFFF); + sInfoCard->spriteIds[arrId] = CreateTrainerPicSprite(GetFrontierTrainerFrontSpriteId(trainerIds[0]), TRUE, x + 48, y + 88, palSlot + 12, TAG_NONE); if (flags & MOVE_CARD) gSprites[sInfoCard->spriteIds[arrId]].invisible = TRUE; @@ -4754,11 +4754,11 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) // Draw right trainer sprite. if (trainerIds[1] == TRAINER_PLAYER) - sInfoCard->spriteIds[1 + arrId] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), TRUE, x + 192, y + 88, palSlot + 13, 0xFFFF); + sInfoCard->spriteIds[1 + arrId] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), TRUE, x + 192, y + 88, palSlot + 13, TAG_NONE); else if (trainerIds[1] == TRAINER_FRONTIER_BRAIN) - sInfoCard->spriteIds[1 + arrId] = CreateTrainerPicSprite(GetDomeBrainTrainerPicId(), TRUE, x + 192, y + 88, palSlot + 13, 0xFFFF); + sInfoCard->spriteIds[1 + arrId] = CreateTrainerPicSprite(GetDomeBrainTrainerPicId(), TRUE, x + 192, y + 88, palSlot + 13, TAG_NONE); else - sInfoCard->spriteIds[1 + arrId] = CreateTrainerPicSprite(GetFrontierTrainerFrontSpriteId(trainerIds[1]), TRUE, x + 192, y + 88, palSlot + 13, 0xFFFF); + sInfoCard->spriteIds[1 + arrId] = CreateTrainerPicSprite(GetFrontierTrainerFrontSpriteId(trainerIds[1]), TRUE, x + 192, y + 88, palSlot + 13, TAG_NONE); if (flags & MOVE_CARD) gSprites[sInfoCard->spriteIds[1 + arrId]].invisible = TRUE; diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 3fb65d498d..4a48eeb306 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -2008,7 +2008,7 @@ static void Select_CreateMonSprite(void) u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); u32 otId = GetMonData(mon, MON_DATA_OT_ID, NULL); - sFactorySelectScreen->monPics[1].monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 88, 32, 15, 0xFFFF); + sFactorySelectScreen->monPics[1].monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 88, 32, 15, TAG_NONE); gSprites[sFactorySelectScreen->monPics[1].monSpriteId].centerToCornerVecX = 0; gSprites[sFactorySelectScreen->monPics[1].monSpriteId].centerToCornerVecY = 0; @@ -2034,7 +2034,7 @@ static void Select_ReshowMonSprite(void) personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); otId = GetMonData(mon, MON_DATA_OT_ID, NULL); - sFactorySelectScreen->monPics[1].monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 88, 32, 15, 0xFFFF); + sFactorySelectScreen->monPics[1].monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 88, 32, 15, TAG_NONE); gSprites[sFactorySelectScreen->monPics[1].monSpriteId].centerToCornerVecX = 0; gSprites[sFactorySelectScreen->monPics[1].monSpriteId].centerToCornerVecY = 0; @@ -2056,7 +2056,7 @@ static void Select_CreateChosenMonsSprites(void) u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); u32 otId = GetMonData(mon, MON_DATA_OT_ID, NULL); - sFactorySelectScreen->monPics[i].monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, (i * 72) + 16, 32, i + 13, 0xFFFF); + sFactorySelectScreen->monPics[i].monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, (i * 72) + 16, 32, i + 13, TAG_NONE); gSprites[sFactorySelectScreen->monPics[i].monSpriteId].centerToCornerVecX = 0; gSprites[sFactorySelectScreen->monPics[i].monSpriteId].centerToCornerVecY = 0; break; @@ -4072,9 +4072,9 @@ static void Swap_ShowSummaryMonSprite(void) otId = GetMonData(mon, MON_DATA_OT_ID, NULL); #ifdef BUGFIX - sFactorySwapScreen->monPic.monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 88, 32, 15, 0xFFFF); + sFactorySwapScreen->monPic.monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 88, 32, 15, TAG_NONE); #else - sFactorySwapScreen->monPic.monSpriteId = CreateMonPicSprite_HandleDeoxys(species, personality, otId, TRUE, 88, 32, 15, 0xFFFF); + sFactorySwapScreen->monPic.monSpriteId = CreateMonPicSprite_HandleDeoxys(species, personality, otId, TRUE, 88, 32, 15, TAG_NONE); #endif gSprites[sFactorySwapScreen->monPic.monSpriteId].centerToCornerVecX = 0; gSprites[sFactorySwapScreen->monPic.monSpriteId].centerToCornerVecY = 0; @@ -4296,7 +4296,7 @@ static void Swap_CreateMonSprite(void) personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); otId = GetMonData(mon, MON_DATA_OT_ID, NULL); - sFactorySwapScreen->monPic.monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 88, 32, 15, 0xFFFF); + sFactorySwapScreen->monPic.monSpriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, 88, 32, 15, TAG_NONE); gSprites[sFactorySwapScreen->monPic.monSpriteId].centerToCornerVecX = 0; gSprites[sFactorySwapScreen->monPic.monSpriteId].centerToCornerVecY = 0; diff --git a/src/battle_transition.c b/src/battle_transition.c index 4d446b3df1..2fc4c68544 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -748,7 +748,7 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_Pokeball[] = static const struct SpriteTemplate sSpriteTemplate_Pokeball = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_POKEBALL, .oam = &gObjectEventBaseOam_32x32, .anims = sSpriteAnimTable_Pokeball, @@ -797,7 +797,7 @@ static const union AnimCmd *const sSpriteAnimTable_UnusedBrendanLass[] = static const struct SpriteTemplate sSpriteTemplate_UnusedBrendan = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0x100A, .oam = &sOam_UnusedBrendanLass, .anims = sSpriteAnimTable_UnusedBrendanLass, @@ -808,7 +808,7 @@ static const struct SpriteTemplate sSpriteTemplate_UnusedBrendan = static const struct SpriteTemplate sSpriteTemplate_UnusedLass = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0x100A, .oam = &sOam_UnusedBrendanLass, .anims = sSpriteAnimTable_UnusedBrendanLass, diff --git a/src/data/field_effects/field_effect_objects.h b/src/data/field_effects/field_effect_objects.h index 54145efbcc..a8573eb527 100755 --- a/src/data/field_effects/field_effect_objects.h +++ b/src/data/field_effects/field_effect_objects.h @@ -29,8 +29,8 @@ static const struct SpriteFrameImage sPicTable_ShadowExtraLarge[] = { }; const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_8x8, .anims = sAnimTable_Shadow, .images = sPicTable_ShadowSmall, @@ -39,8 +39,8 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall = { }; const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowMedium = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_Shadow, .images = sPicTable_ShadowMedium, @@ -49,8 +49,8 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowMedium = { }; const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowLarge = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_32x8, .anims = sAnimTable_Shadow, .images = sPicTable_ShadowLarge, @@ -59,8 +59,8 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowLarge = { }; const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowExtraLarge = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_64x32, .anims = sAnimTable_Shadow, .images = sPicTable_ShadowExtraLarge, @@ -92,7 +92,7 @@ static const union AnimCmd *const sAnimTable_TallGrass[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_TallGrass = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_TallGrass, @@ -128,7 +128,7 @@ static const union AnimCmd *const sAnimTable_Ripple[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_Ripple = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_Ripple, @@ -161,7 +161,7 @@ static const union AnimCmd *const sAnimTable_Ash[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_Ash = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_Ash, @@ -209,8 +209,8 @@ static const union AnimCmd *const sAnimTable_SurfBlob[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_SurfBlob = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_32x32, .anims = sAnimTable_SurfBlob, .images = sPicTable_SurfBlob, @@ -266,8 +266,8 @@ static const union AnimCmd *const sAnimTable_Arrow[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_Arrow = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_Arrow, .images = sPicTable_Arrow, @@ -295,7 +295,7 @@ static const union AnimCmd *const sAnimTable_GroundImpactDust[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_GroundImpactDust = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_GroundImpactDust, @@ -326,7 +326,7 @@ static const union AnimCmd *const sAnimTable_JumpTallGrass[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_JumpTallGrass = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_JumpTallGrass, @@ -374,7 +374,7 @@ static const union AnimCmd *const sAnimTable_SandFootprints[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_SandFootprints = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_SandFootprints, @@ -422,7 +422,7 @@ static const union AnimCmd *const sAnimTable_DeepSandFootprints[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_DeepSandFootprints = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_DeepSandFootprints, @@ -500,7 +500,7 @@ static const union AnimCmd *const sAnimTable_BikeTireTracks[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_BikeTireTracks = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_BikeTireTracks, @@ -531,7 +531,7 @@ static const union AnimCmd *const sAnimTable_JumpBigSplash[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_JumpBigSplash = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_JumpBigSplash, @@ -572,7 +572,7 @@ static const union AnimCmd *const sAnimTable_Splash[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_Splash = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_Splash, @@ -601,7 +601,7 @@ static const union AnimCmd *const sAnimTable_JumpSmallSplash[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_JumpSmallSplash = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_JumpSmallSplash, @@ -635,7 +635,7 @@ static const union AnimCmd *const sAnimTable_LongGrass[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_LongGrass = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_LongGrass, @@ -670,7 +670,7 @@ static const union AnimCmd *const sAnimTable_JumpLongGrass[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_JumpLongGrass, @@ -711,7 +711,7 @@ static const union AnimCmd *const sAnimTable_UnusedGrass[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_UnusedGrass, @@ -744,7 +744,7 @@ static const union AnimCmd *const sAnimTable_UnusedGrass2[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass2 = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_UnusedGrass2, @@ -775,7 +775,7 @@ static const union AnimCmd *const sAnimTable_UnusedSand[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedSand = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_UnusedSand, @@ -804,7 +804,7 @@ static const union AnimCmd *const sAnimTable_SandPile[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_SandPile = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_SandPile, @@ -837,7 +837,7 @@ static const union AnimCmd *const sAnimTable_WaterSurfacing[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_WaterSurfacing = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_WaterSurfacing, @@ -882,7 +882,7 @@ static const union AffineAnimCmd *const sAffineAnims_ReflectionDistortion[] = const struct SpriteTemplate gFieldEffectObjectTemplate_ReflectionDistortion = { .tileTag = 0x0, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &gDummyOamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -930,8 +930,8 @@ static const union AnimCmd *const sAnimTable_Sparkle[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_Sparkle = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_Sparkle, .images = sPicTable_Sparkle, @@ -974,8 +974,8 @@ static const union AnimCmd *const sAnimTable_TreeDisguise[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_TreeDisguise = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x32, .anims = sAnimTable_TreeDisguise, .images = sPicTable_TreeDisguise, @@ -1018,8 +1018,8 @@ static const union AnimCmd *const sAnimTable_MountainDisguise[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_MountainDisguise = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x32, .anims = sAnimTable_MountainDisguise, .images = sPicTable_MountainDisguise, @@ -1038,8 +1038,8 @@ static const struct SpriteFrameImage sPicTable_SandDisguisePlaceholder[] = { }; const struct SpriteTemplate gFieldEffectObjectTemplate_SandDisguisePlaceholder = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x32, .anims = sAnimTable_TreeDisguise, .images = sPicTable_SandDisguisePlaceholder, @@ -1063,8 +1063,8 @@ static const union AnimCmd *const sAnimTable_Bird[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_Bird = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_32x32, .anims = sAnimTable_Bird, .images = sPicTable_Bird, @@ -1090,7 +1090,7 @@ static const union AnimCmd *const sAnimTable_ShortGrass[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_ShortGrass = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_ShortGrass, @@ -1115,7 +1115,7 @@ static const union AnimCmd *const sAnimTable_HotSpringsWater[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_HotSpringsWater = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_HotSpringsWater, @@ -1149,7 +1149,7 @@ static const union AnimCmd *const sAnimTable_AshPuff[] = const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_ASH, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_AshPuff, @@ -1185,7 +1185,7 @@ static const union AnimCmd *const sAnimTable_AshLaunch[] = const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_ASH, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_AshLaunch, @@ -1224,7 +1224,7 @@ static const union AnimCmd *const sAnimTable_Bubbles[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x32, .anims = sAnimTable_Bubbles, @@ -1252,7 +1252,7 @@ static const union AnimCmd *const sAnimTable_SmallSparkle[] = }; const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_SMALL_SPARKLE, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_SmallSparkle, @@ -1277,8 +1277,8 @@ const struct SpriteFrameImage sPicTable_RayquazaSpotlightEffect[] = { }; const struct SpriteTemplate gFieldEffectObjectTemplate_Rayquaza = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_32x32, .anims = sAnimTable_RayquazaSpotlightEffect, .images = sPicTable_RayquazaSpotlightEffect, diff --git a/src/data/object_events/object_event_graphics_info.h b/src/data/object_events/object_event_graphics_info.h index ddc6a1cad3..ea424090a5 100755 --- a/src/data/object_events/object_event_graphics_info.h +++ b/src/data/object_events/object_event_graphics_info.h @@ -1,245 +1,245 @@ -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanNormal = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_BrendanNormal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanMachBike = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_BrendanMachBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanAcroBike = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_BrendanAcroBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanSurfing = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Surfing, sPicTable_BrendanSurfing, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanFieldMove = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_FieldMove, sPicTable_BrendanFieldMove, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_QuintyPlump = {0xFFFF, OBJ_EVENT_PAL_TAG_QUINTY_PLUMP, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_L, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_QuintyPlump, sPicTable_QuintyPlump, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_NinjaBoy = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_NinjaBoy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Twin = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Twin, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Boy1 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Boy1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Girl1 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Girl1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Boy2 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Boy2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Girl2 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Girl2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LittleBoy = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_LittleBoy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LittleGirl = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_LittleGirl, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Boy3 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Boy3, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Girl3 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Girl3, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RichBoy = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RichBoy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman1 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_FatMan = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_FatMan, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PokefanF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_PokefanF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man1 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman2 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ExpertM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ExpertM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ExpertF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ExpertF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man2 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman3 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman3, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PokefanM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_PokefanM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman4 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman4, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Cook = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Cook, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LinkReceptionist = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_LinkReceptionist, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldMan = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_OldMan, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldWoman = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_OldWoman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Camper = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Camper, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Picnicker = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Picnicker, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man3 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man3, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman5 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman5, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Youngster = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Youngster, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BugCatcher = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_BugCatcher, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PsychicM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_PsychicM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SchoolKidM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_SchoolKidM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Maniac = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Maniac, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_HexManiac = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_HexManiac, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RayquazaStill = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 2048, 64, 64, 4, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_64x64, sOamTables_64x64, sAnimTable_Standard, sPicTable_RayquazaStill, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BlackBelt = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_BlackBelt, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Beauty = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Beauty, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Scientist1 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Scientist1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lass = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Lass, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Gentleman = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Gentleman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sailor = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Sailor, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fisherman = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Fisherman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RunningTriathleteM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RunningTriathleteM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RunningTriathleteF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RunningTriathleteF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_TuberF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_TuberM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Hiker = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Hiker, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CyclingTriathleteM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_CyclingTriathleteM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CyclingTriathleteF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_CyclingTriathleteF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Nurse = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Nurse, sPicTable_Nurse, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ItemBall = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_ItemBall, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BerryTree = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, NULL, sAnimTable_BerryTree, sPicTable_PechaBerryTree, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BerryTreeEarlyStages = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_BerryTree, sPicTable_PechaBerryTree, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BerryTreeLateStages = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BerryTree, sPicTable_PechaBerryTree, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ProfBirch = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ProfBirch, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man4 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man4, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man5 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man5, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ReporterM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ReporterM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ReporterF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ReporterF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Bard = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Hipster = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Trader = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Storyteller = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Giddy = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedMauvilleOldMan1 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedMauvilleOldMan2 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedNatuDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedNatuDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedMagnemiteDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedMagnemiteDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedSquirtleDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedSquirtleDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedWooperDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedWooperDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedPikachuDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedPikachuDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedPorygon2Doll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedPorygon2Doll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CuttableTree = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_CuttableTree, sPicTable_CuttableTree, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MartEmployee = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MartEmployee, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RooftopSaleWoman = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RooftopSaleWoman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Teala = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Teala, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BreakableRock = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_BreakableRock, sPicTable_BreakableRock, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PushableBoulder = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_PushableBoulder, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MrBrineysBoat = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MrBrineysBoat, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayNormal = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_MayNormal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayMachBike = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MayMachBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayAcroBike = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_MayAcroBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MaySurfing = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Surfing, sPicTable_MaySurfing, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayFieldMove = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_FieldMove, sPicTable_MayFieldMove, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Truck = {0xFFFF, OBJ_EVENT_PAL_TAG_TRUCK, OBJ_EVENT_PAL_TAG_NONE, 1152, 48, 48, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_48x48, sAnimTable_Inanimate, sPicTable_Truck, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_VigorothCarryingBox = {0xFFFF, OBJ_EVENT_PAL_TAG_VIGOROTH, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_VigorothCarryingBox, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_VigorothFacingAway = {0xFFFF, OBJ_EVENT_PAL_TAG_VIGOROTH, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_VigorothFacingAway, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BirchsBag = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_BirchsBag, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_EnemyZigzagoon = {0xFFFF, OBJ_EVENT_PAL_TAG_ZIGZAGOON, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_EnemyZigzagoon, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Poochyena = {0xFFFF, OBJ_EVENT_PAL_TAG_POOCHYENA, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Poochyena, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Artist = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Artist, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanNormal = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_BrendanNormal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanMachBike = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_BrendanMachBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanAcroBike = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_BrendanAcroBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanSurfing = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Surfing, sPicTable_BrendanSurfing, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanFieldMove = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_FieldMove, sPicTable_BrendanFieldMove, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMayNormal = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_MayNormal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMayMachBike = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MayMachBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMayAcroBike = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_MayAcroBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMaySurfing = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Surfing, sPicTable_MaySurfing, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMayFieldMove = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_FieldMove, sPicTable_MayFieldMove, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Cameraman = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Cameraman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanUnderwater = {0xFFFF, OBJ_EVENT_PAL_TAG_PLAYER_UNDERWATER, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_BrendanUnderwater, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayUnderwater = {0xFFFF, OBJ_EVENT_PAL_TAG_PLAYER_UNDERWATER, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MayUnderwater, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MovingBox = {0xFFFF, OBJ_EVENT_PAL_TAG_MOVING_BOX, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 10, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_MovingBox, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CableCar = {0xFFFF, OBJ_EVENT_PAL_TAG_CABLE_CAR, OBJ_EVENT_PAL_TAG_NONE, 2048, 64, 64, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_64x64, sOamTables_64x64, sAnimTable_Inanimate, sPicTable_CableCar, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Scientist2 = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Scientist2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DevonEmployee = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_DevonEmployee, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_AquaMemberM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_AquaMemberM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_AquaMemberF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_AquaMemberF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MagmaMemberM = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MagmaMemberM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MagmaMemberF = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MagmaMemberF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sidney = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Sidney, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Phoebe = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Phoebe, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Glacia = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Glacia, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Drake = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Drake, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Roxanne = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Roxanne, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Brawly = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Brawly, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wattson = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Wattson, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Flannery = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Flannery, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Norman = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Norman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Winona = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Winona, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Liza = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Liza, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Tate = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Tate, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wallace = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Wallace, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Steven = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Steven, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wally = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Wally, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RubySapphireLittleBoy = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_RubySapphireLittleBoy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanFishing = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Fishing, sPicTable_BrendanFishing, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayFishing = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Fishing, sPicTable_MayFishing, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_HotSpringsOldWoman = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_HotSpringsOldWoman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SSTidal = {0xFFFF, OBJ_EVENT_PAL_TAG_SSTIDAL, OBJ_EVENT_PAL_TAG_NONE, 1920, 96, 40, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_8x8, sOamTables_96x40, sAnimTable_Standard, sPicTable_SSTidal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SubmarineShadow = {0xFFFF, OBJ_EVENT_PAL_TAG_SUBMARINE_SHADOW, OBJ_EVENT_PAL_TAG_NONE, 1408, 88, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_8x8, sOamTables_88x32, sAnimTable_Standard, sPicTable_SubmarineShadow, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PichuDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_PichuDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PikachuDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_PikachuDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MarillDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_MarillDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TogepiDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_TogepiDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CyndaquilDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_CyndaquilDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ChikoritaDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_ChikoritaDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TotodileDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_TotodileDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_JigglypuffDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_JigglypuffDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MeowthDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_MeowthDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ClefairyDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_ClefairyDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DittoDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_DittoDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SmoochumDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SmoochumDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TreeckoDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_TreeckoDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TorchicDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_TorchicDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MudkipDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_MudkipDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DuskullDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_DuskullDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_WynautDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_WynautDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BaltoyDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_BaltoyDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KecleonDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_KecleonDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_AzurillDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_AzurillDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SkittyDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SkittyDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwabluDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SwabluDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GulpinDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_GulpinDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LotadDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_LotadDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SeedotDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SeedotDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PikaCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_PikaCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RoundCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_RoundCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KissCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_KissCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ZigzagCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_ZigzagCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SpinCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SpinCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DiamondCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_DiamondCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BallCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_BallCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GrassCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_GrassCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_FireCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_FireCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_WaterCushion = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_WaterCushion, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigSnorlaxDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigSnorlaxDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigRhydonDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigRhydonDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigLaprasDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigLaprasDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigVenusaurDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigVenusaurDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigCharizardDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigCharizardDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigBlastoiseDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigBlastoiseDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigWailmerDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigWailmerDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigRegirockDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigRegirockDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigRegiceDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigRegiceDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigRegisteelDoll = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigRegisteelDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Latias = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_LatiasLatios, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Latios = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_LatiasLatios, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GameboyKid = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_GameboyKid, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ContestJudge = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ContestJudge, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanWatering = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_BrendanWatering, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayWatering = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MayWatering, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanDecorating = {0xFFFF, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Inanimate, sPicTable_BrendanDecorating, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayDecorating = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Inanimate, sPicTable_MayDecorating, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Archie = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Archie, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Maxie = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Maxie, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KyogreFront = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_KyogreFront, sAffineAnimTable_KyogreGroudon}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GroudonFront = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_GroudonFront, sAffineAnimTable_KyogreGroudon}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KyogreSide = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_KyogreSide, sAffineAnimTable_KyogreGroudon}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GroudonSide = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_GroudonSide, sPicTable_GroudonSide, sAffineAnimTable_KyogreGroudon}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fossil = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_Fossil, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Regirock = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Regi, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Regice = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Regi, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Registeel = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Regi, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Skitty = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Skitty, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Kecleon = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Kecleon, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KyogreAsleep = {0xFFFF, OBJ_EVENT_PAL_TAG_KYOGRE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_KyogreFront, sAffineAnimTable_KyogreGroudon}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GroudonAsleep = {0xFFFF, OBJ_EVENT_PAL_TAG_GROUDON, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_GroudonFront, sAffineAnimTable_KyogreGroudon}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Rayquaza = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 2048, 64, 64, 4, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_64x64, sOamTables_64x64, sAnimTable_Rayquaza, sPicTable_Rayquaza, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Zigzagoon = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Zigzagoon, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pikachu = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Pikachu, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Azumarill = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Azumarill, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wingull = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Wingull, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KecleonBridgeShadow = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 128, 16, 16, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Kecleon, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberMSwimming = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_TuberMSwimming, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Azurill = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Azurill, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mom = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Mom, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LinkBrendan = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_BrendanNormal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LinkMay = {0xFFFF, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_MayNormal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Juan = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Juan, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Scott = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Scott, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MysteryEventDeliveryman = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MysteryEventDeliveryman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Statue = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Inanimate, sPicTable_Statue, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Kirlia = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_S, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Kirlia, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Dusclops = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Dusclops, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnionRoomAttendant = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_UnionRoomAttendant, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Red = {0xFFFF, OBJ_EVENT_PAL_TAG_RED_LEAF, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Red, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Leaf = {0xFFFF, OBJ_EVENT_PAL_TAG_RED_LEAF, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Leaf, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sudowoodo = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Sudowoodo, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mew = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Mew, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Deoxys = {0xFFFF, OBJ_EVENT_PAL_TAG_DEOXYS, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Deoxys, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BirthIslandStone = {0xFFFF, OBJ_EVENT_PAL_TAG_BIRTH_ISLAND_STONE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BirthIslandStone, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Anabel = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Anabel, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Tucker = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Tucker, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Greta = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Greta, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Spenser = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Spenser, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Noland = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Noland, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lucy = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Lucy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Brandon = {0xFFFF, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Brandon, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RubySapphireBrendan = {0xFFFF, OBJ_EVENT_PAL_TAG_RS_BRENDAN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RubySapphireBrendan, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RubySapphireMay = {0xFFFF, OBJ_EVENT_PAL_TAG_RS_MAY, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RubySapphireMay, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lugia = {0xFFFF, OBJ_EVENT_PAL_TAG_LUGIA, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Lugia, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_HoOh = {0xFFFF, OBJ_EVENT_PAL_TAG_HO_OH, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_HoOh, sPicTable_HoOh, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanNormal = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_BrendanNormal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanMachBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_BrendanMachBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanAcroBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_BrendanAcroBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanSurfing = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Surfing, sPicTable_BrendanSurfing, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanFieldMove = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_FieldMove, sPicTable_BrendanFieldMove, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_QuintyPlump = {TAG_NONE, OBJ_EVENT_PAL_TAG_QUINTY_PLUMP, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_L, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_QuintyPlump, sPicTable_QuintyPlump, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_NinjaBoy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_NinjaBoy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Twin = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Twin, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Boy1 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Boy1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Girl1 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Girl1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Boy2 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Boy2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Girl2 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Girl2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LittleBoy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_LittleBoy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LittleGirl = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_LittleGirl, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Boy3 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Boy3, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Girl3 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Girl3, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RichBoy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RichBoy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman1 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_FatMan = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_FatMan, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PokefanF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_PokefanF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man1 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman2 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ExpertM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ExpertM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ExpertF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ExpertF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man2 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman3 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman3, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PokefanM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_PokefanM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman4 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman4, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Cook = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Cook, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LinkReceptionist = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_LinkReceptionist, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldMan = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_OldMan, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldWoman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_OldWoman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Camper = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Camper, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Picnicker = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Picnicker, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man3 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man3, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman5 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Woman5, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Youngster = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Youngster, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BugCatcher = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_BugCatcher, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PsychicM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_PsychicM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SchoolKidM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_SchoolKidM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Maniac = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Maniac, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_HexManiac = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_HexManiac, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RayquazaStill = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 2048, 64, 64, 4, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_64x64, sOamTables_64x64, sAnimTable_Standard, sPicTable_RayquazaStill, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BlackBelt = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_BlackBelt, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Beauty = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Beauty, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Scientist1 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Scientist1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lass = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Lass, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Gentleman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Gentleman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sailor = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Sailor, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fisherman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Fisherman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RunningTriathleteM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RunningTriathleteM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RunningTriathleteF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RunningTriathleteF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_TuberF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_TuberM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Hiker = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Hiker, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CyclingTriathleteM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_CyclingTriathleteM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CyclingTriathleteF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_CyclingTriathleteF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Nurse = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Nurse, sPicTable_Nurse, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ItemBall = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_ItemBall, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BerryTree = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, NULL, sAnimTable_BerryTree, sPicTable_PechaBerryTree, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BerryTreeEarlyStages = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_BerryTree, sPicTable_PechaBerryTree, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BerryTreeLateStages = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BerryTree, sPicTable_PechaBerryTree, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ProfBirch = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ProfBirch, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man4 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man4, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man5 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Man5, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ReporterM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ReporterM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ReporterF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ReporterF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Bard = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Hipster = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Trader = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Storyteller = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Giddy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedMauvilleOldMan1 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedMauvilleOldMan2 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MauvilleOldMan2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedNatuDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedNatuDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedMagnemiteDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedMagnemiteDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedSquirtleDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedSquirtleDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedWooperDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedWooperDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedPikachuDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedPikachuDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedPorygon2Doll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_UnusedPorygon2Doll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CuttableTree = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_CuttableTree, sPicTable_CuttableTree, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MartEmployee = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MartEmployee, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RooftopSaleWoman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RooftopSaleWoman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Teala = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Teala, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BreakableRock = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_BreakableRock, sPicTable_BreakableRock, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PushableBoulder = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_PushableBoulder, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MrBrineysBoat = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MrBrineysBoat, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayNormal = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_MayNormal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayMachBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MayMachBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayAcroBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_MayAcroBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MaySurfing = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Surfing, sPicTable_MaySurfing, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayFieldMove = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_FieldMove, sPicTable_MayFieldMove, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Truck = {TAG_NONE, OBJ_EVENT_PAL_TAG_TRUCK, OBJ_EVENT_PAL_TAG_NONE, 1152, 48, 48, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_48x48, sAnimTable_Inanimate, sPicTable_Truck, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_VigorothCarryingBox = {TAG_NONE, OBJ_EVENT_PAL_TAG_VIGOROTH, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_VigorothCarryingBox, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_VigorothFacingAway = {TAG_NONE, OBJ_EVENT_PAL_TAG_VIGOROTH, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_VigorothFacingAway, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BirchsBag = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_BirchsBag, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_EnemyZigzagoon = {TAG_NONE, OBJ_EVENT_PAL_TAG_ZIGZAGOON, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_EnemyZigzagoon, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Poochyena = {TAG_NONE, OBJ_EVENT_PAL_TAG_POOCHYENA, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Poochyena, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Artist = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Artist, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanNormal = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_BrendanNormal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanMachBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_BrendanMachBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanAcroBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_BrendanAcroBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanSurfing = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Surfing, sPicTable_BrendanSurfing, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalBrendanFieldMove = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_FieldMove, sPicTable_BrendanFieldMove, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMayNormal = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_MayNormal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMayMachBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MayMachBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMayAcroBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_AcroBike, sPicTable_MayAcroBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMaySurfing = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Surfing, sPicTable_MaySurfing, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RivalMayFieldMove = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_FieldMove, sPicTable_MayFieldMove, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Cameraman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Cameraman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanUnderwater = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_UNDERWATER, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_BrendanUnderwater, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayUnderwater = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_UNDERWATER, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MayUnderwater, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MovingBox = {TAG_NONE, OBJ_EVENT_PAL_TAG_MOVING_BOX, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 10, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_MovingBox, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CableCar = {TAG_NONE, OBJ_EVENT_PAL_TAG_CABLE_CAR, OBJ_EVENT_PAL_TAG_NONE, 2048, 64, 64, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_64x64, sOamTables_64x64, sAnimTable_Inanimate, sPicTable_CableCar, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Scientist2 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Scientist2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DevonEmployee = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_DevonEmployee, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_AquaMemberM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_AquaMemberM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_AquaMemberF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_AquaMemberF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MagmaMemberM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MagmaMemberM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MagmaMemberF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MagmaMemberF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sidney = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Sidney, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Phoebe = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Phoebe, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Glacia = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Glacia, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Drake = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Drake, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Roxanne = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Roxanne, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Brawly = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Brawly, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wattson = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Wattson, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Flannery = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Flannery, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Norman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Norman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Winona = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Winona, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Liza = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Liza, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Tate = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Tate, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wallace = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Wallace, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Steven = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Steven, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wally = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Wally, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RubySapphireLittleBoy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_RubySapphireLittleBoy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanFishing = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Fishing, sPicTable_BrendanFishing, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayFishing = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Fishing, sPicTable_MayFishing, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_HotSpringsOldWoman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_HotSpringsOldWoman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SSTidal = {TAG_NONE, OBJ_EVENT_PAL_TAG_SSTIDAL, OBJ_EVENT_PAL_TAG_NONE, 1920, 96, 40, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_8x8, sOamTables_96x40, sAnimTable_Standard, sPicTable_SSTidal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SubmarineShadow = {TAG_NONE, OBJ_EVENT_PAL_TAG_SUBMARINE_SHADOW, OBJ_EVENT_PAL_TAG_NONE, 1408, 88, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_8x8, sOamTables_88x32, sAnimTable_Standard, sPicTable_SubmarineShadow, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PichuDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_PichuDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PikachuDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_PikachuDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MarillDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_MarillDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TogepiDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_TogepiDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CyndaquilDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_CyndaquilDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ChikoritaDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_ChikoritaDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TotodileDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_TotodileDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_JigglypuffDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_JigglypuffDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MeowthDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_MeowthDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ClefairyDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_ClefairyDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DittoDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_DittoDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SmoochumDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SmoochumDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TreeckoDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_TreeckoDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TorchicDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_TorchicDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MudkipDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_MudkipDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DuskullDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_DuskullDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_WynautDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_WynautDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BaltoyDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_BaltoyDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KecleonDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_KecleonDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_AzurillDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_AzurillDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SkittyDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SkittyDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwabluDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SwabluDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GulpinDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_GulpinDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LotadDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_LotadDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SeedotDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SeedotDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_PikaCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_PikaCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RoundCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_RoundCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KissCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_KissCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ZigzagCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_ZigzagCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SpinCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_SpinCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DiamondCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_DiamondCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BallCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_BallCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GrassCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_GrassCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_FireCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_FireCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_WaterCushion = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_WaterCushion, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigSnorlaxDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigSnorlaxDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigRhydonDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigRhydonDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigLaprasDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigLaprasDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigVenusaurDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigVenusaurDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigCharizardDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigCharizardDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigBlastoiseDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigBlastoiseDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigWailmerDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigWailmerDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigRegirockDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigRegirockDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigRegiceDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigRegiceDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BigRegisteelDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BigRegisteelDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Latias = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_LatiasLatios, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Latios = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_LatiasLatios, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GameboyKid = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_GameboyKid, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ContestJudge = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_ContestJudge, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanWatering = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_BrendanWatering, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayWatering = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_MayWatering, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BrendanDecorating = {TAG_NONE, OBJ_EVENT_PAL_TAG_BRENDAN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Inanimate, sPicTable_BrendanDecorating, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MayDecorating = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Inanimate, sPicTable_MayDecorating, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Archie = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Archie, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Maxie = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Maxie, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KyogreFront = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_KyogreFront, sAffineAnimTable_KyogreGroudon}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GroudonFront = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_GroudonFront, sAffineAnimTable_KyogreGroudon}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KyogreSide = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_KyogreSide, sAffineAnimTable_KyogreGroudon}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GroudonSide = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_GroudonSide, sPicTable_GroudonSide, sAffineAnimTable_KyogreGroudon}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fossil = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Inanimate, sPicTable_Fossil, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Regirock = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Regi, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Regice = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 4, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Regi, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Registeel = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Regi, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Skitty = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Skitty, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Kecleon = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Kecleon, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KyogreAsleep = {TAG_NONE, OBJ_EVENT_PAL_TAG_KYOGRE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_KyogreFront, sAffineAnimTable_KyogreGroudon}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GroudonAsleep = {TAG_NONE, OBJ_EVENT_PAL_TAG_GROUDON, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_GroudonFront, sAffineAnimTable_KyogreGroudon}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Rayquaza = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 2048, 64, 64, 4, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_64x64, sOamTables_64x64, sAnimTable_Rayquaza, sPicTable_Rayquaza, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Zigzagoon = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Zigzagoon, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pikachu = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Pikachu, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Azumarill = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Azumarill, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wingull = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Wingull, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_KecleonBridgeShadow = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 128, 16, 16, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Kecleon, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberMSwimming = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_2, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_TuberMSwimming, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Azurill = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, sOamTables_16x16, sAnimTable_Standard, sPicTable_Azurill, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mom = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Mom, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LinkBrendan = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_BrendanNormal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LinkMay = {TAG_NONE, OBJ_EVENT_PAL_TAG_MAY, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_BrendanMayNormal, sPicTable_MayNormal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Juan = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Juan, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Scott = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Scott, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MysteryEventDeliveryman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_MysteryEventDeliveryman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Statue = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Inanimate, sPicTable_Statue, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Kirlia = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_S, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Kirlia, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Dusclops = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Dusclops, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnionRoomAttendant = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_UnionRoomAttendant, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Red = {TAG_NONE, OBJ_EVENT_PAL_TAG_RED_LEAF, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Red, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Leaf = {TAG_NONE, OBJ_EVENT_PAL_TAG_RED_LEAF, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Leaf, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sudowoodo = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Sudowoodo, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mew = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Mew, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Deoxys = {TAG_NONE, OBJ_EVENT_PAL_TAG_DEOXYS, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Deoxys, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BirthIslandStone = {TAG_NONE, OBJ_EVENT_PAL_TAG_BIRTH_ISLAND_STONE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, TRUE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Inanimate, sPicTable_BirthIslandStone, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Anabel = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Anabel, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Tucker = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Tucker, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Greta = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Greta, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Spenser = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_1, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Spenser, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Noland = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Noland, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lucy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_4, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Lucy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Brandon = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_3, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_Brandon, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RubySapphireBrendan = {TAG_NONE, OBJ_EVENT_PAL_TAG_RS_BRENDAN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RubySapphireBrendan, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RubySapphireMay = {TAG_NONE, OBJ_EVENT_PAL_TAG_RS_MAY, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, sOamTables_16x32, sAnimTable_Standard, sPicTable_RubySapphireMay, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lugia = {TAG_NONE, OBJ_EVENT_PAL_TAG_LUGIA, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_Standard, sPicTable_Lugia, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_HoOh = {TAG_NONE, OBJ_EVENT_PAL_TAG_HO_OH, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, sOamTables_32x32, sAnimTable_HoOh, sPicTable_HoOh, gDummySpriteAffineAnimTable}; diff --git a/src/decoration.c b/src/decoration.c index 39858e9578..131f6e502d 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -356,7 +356,7 @@ static const struct SpriteFrameImage sDecorSelectorSpriteFrameImages = static const struct SpriteTemplate sDecorationSelectorSpriteTemplate = { - 0xFFFF, + TAG_NONE, PLACE_DECORATION_SELECTOR_TAG, &sDecorSelectorOam, sDecorSelectorAnimCmds, @@ -487,7 +487,7 @@ static const struct SpriteFrameImage sPuttingAwayCursorPicTable = static const struct SpriteTemplate sPuttingAwayCursorSpriteTemplate = { - 0xFFFF, + TAG_NONE, PLACE_DECORATION_PLAYER_TAG, &sPuttingAwayCursorOamData, sPuttingAwayCursorAnimCmds, diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 36f7f0a3ef..df6c4633c7 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -157,7 +157,7 @@ const u8 gReflectionEffectPaletteMap[] = {1, 1, 6, 7, 8, 9, 6, 7, 8, 9, 11, 11, static const struct SpriteTemplate sCameraSpriteTemplate = { .tileTag = 0, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &gDummyOamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -1406,7 +1406,7 @@ static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTempl if (objectEvent->movementType == MOVEMENT_TYPE_INVISIBLE) objectEvent->invisible = TRUE; - *(u16 *)&spriteTemplate->paletteTag = 0xFFFF; + *(u16 *)&spriteTemplate->paletteTag = TAG_NONE; spriteId = CreateSprite(spriteTemplate, 0, 0, 0); if (spriteId == MAX_SPRITES) { @@ -1531,7 +1531,7 @@ u8 AddPseudoObjectEvent(u16 graphicsId, void (*callback)(struct Sprite *), s16 x spriteTemplate = malloc(sizeof(struct SpriteTemplate)); MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, callback, spriteTemplate, &subspriteTables); - if (spriteTemplate->paletteTag != 0xFFFF) + if (spriteTemplate->paletteTag != TAG_NONE) { LoadObjectEventPalette(spriteTemplate->paletteTag); } @@ -1559,7 +1559,7 @@ u8 CreateObjectSprite(u8 graphicsId, u8 objectEventId, s16 x, s16 y, u8 z, u8 di graphicsInfo = GetObjectEventGraphicsInfo(graphicsId); MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, UpdateObjectEventSprite, &spriteTemplate, &subspriteTables); - *(u16 *)&spriteTemplate.paletteTag = 0xFFFF; + *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; x += 7; y += 7; SetSpritePosToOffsetMapCoords(&x, &y, 8, 16); @@ -1705,7 +1705,7 @@ static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y) MakeObjectTemplateFromObjectEventGraphicsInfoWithCallbackIndex(objectEvent->graphicsId, objectEvent->movementType, &spriteTemplate, &subspriteTables); spriteTemplate.images = &spriteFrameImage; - *(u16 *)&spriteTemplate.paletteTag = 0xFFFF; + *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; paletteSlot = graphicsInfo->paletteSlot; if (paletteSlot == 0) { @@ -1720,7 +1720,7 @@ static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y) paletteSlot -= 16; _PatchObjectPalette(graphicsInfo->paletteTag, paletteSlot); } - *(u16 *)&spriteTemplate.paletteTag = 0xFFFF; + *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; i = CreateSprite(&spriteTemplate, 0, 0, 0); if (i != MAX_SPRITES) diff --git a/src/field_effect.c b/src/field_effect.c index 0d61b35f1d..f01be2f2c3 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -348,7 +348,7 @@ static const union AnimCmd *const sAnimTable_NewGameBirch[] = static const struct SpriteTemplate sSpriteTemplate_NewGameBirch = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0x1006, .oam = &sOam_64x64, .anims = sAnimTable_NewGameBirch, @@ -513,7 +513,7 @@ static const union AnimCmd *const sAnims_HofMonitor[] = static const struct SpriteTemplate sSpriteTemplate_PokeballGlow = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_POKEBALL_GLOW, .oam = &sOam_8x8, .anims = sAnims_Flicker, @@ -524,7 +524,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokeballGlow = static const struct SpriteTemplate sSpriteTemplate_PokecenterMonitor = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &sOam_16x16, .anims = sAnims_Flicker, @@ -535,7 +535,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokecenterMonitor = static const struct SpriteTemplate sSpriteTemplate_HofMonitorBig = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_HOF_MONITOR, .oam = &sOam_16x16, .anims = sAnims_HofMonitor, @@ -546,7 +546,7 @@ static const struct SpriteTemplate sSpriteTemplate_HofMonitorBig = static const struct SpriteTemplate sSpriteTemplate_HofMonitorSmall = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_HOF_MONITOR, .oam = &sOam_32x16, .anims = sAnims_HofMonitor, @@ -809,7 +809,7 @@ void FieldEffectFreeTilesIfUnused(u16 tileStart) u8 i; u16 tag = GetSpriteTileTagByTileStart(tileStart); - if (tag != 0xFFFF) + if (tag != TAG_NONE) { for (i = 0; i < MAX_SPRITES; i++) if (gSprites[i].inUse && gSprites[i].usingSheet && tileStart == gSprites[i].sheetTileStart) @@ -823,7 +823,7 @@ void FieldEffectFreePaletteIfUnused(u8 paletteNum) u8 i; u16 tag = GetSpritePaletteTagByPaletteNum(paletteNum); - if (tag != 0xFFFF) + if (tag != TAG_NONE) { for (i = 0; i < MAX_SPRITES; i++) if (gSprites[i].inUse && gSprites[i].oam.paletteNum == paletteNum) @@ -3768,7 +3768,7 @@ static const union AnimCmd *const sAnims_DeoxysRockFragment[] = { }; static const struct SpriteTemplate sSpriteTemplate_DeoxysRockFragment = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 4378, .oam = &sOam_8x8, .anims = sAnims_DeoxysRockFragment, diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c index 0c3256ab75..7321587339 100644 --- a/src/field_weather_effect.c +++ b/src/field_weather_effect.c @@ -878,7 +878,7 @@ static const union AnimCmd *const sSnowflakeAnimCmds[] = static const struct SpriteTemplate sSnowflakeSpriteTemplate = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_WEATHER, .oam = &sSnowflakeSpriteOamData, .anims = sSnowflakeAnimCmds, diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index 164f9507b5..daa46ad765 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -125,7 +125,7 @@ const struct SpritePalette gSpritePalette_CutGrass = {gFieldEffectPal_CutGrass, static const struct SpriteTemplate sSpriteTemplate_CutGrass = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_CUT_GRASS, .oam = &sOamData_CutGrass, .anims = sSpriteAnimTable_CutGrass, diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index 9a76ed7440..c01babb68a 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -193,7 +193,7 @@ static const struct SpriteFrameImage sPicTable_SecretPowerShrub[] = static const struct SpriteTemplate sSpriteTemplate_SecretPowerCave = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_SECRET_POWER_TREE, .oam = &sOam_SecretPower, .anims = sAnimTable_SecretPowerCave, @@ -204,7 +204,7 @@ static const struct SpriteTemplate sSpriteTemplate_SecretPowerCave = static const struct SpriteTemplate sSpriteTemplate_SecretPowerTree = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_SECRET_POWER_PLANT, .oam = &sOam_SecretPower, .anims = sAnimTable_SecretPowerTree, @@ -215,7 +215,7 @@ static const struct SpriteTemplate sSpriteTemplate_SecretPowerTree = static const struct SpriteTemplate sSpriteTemplate_SecretPowerShrub = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_SECRET_POWER_PLANT, .oam = &sOam_SecretPower, .anims = sAnimTable_SecretPowerShrub, @@ -261,7 +261,7 @@ static const struct SpriteFrameImage sPicTable_SandPillar[] = static const struct SpriteTemplate sSpriteTemplate_SandPillar = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_SAND_PILLAR, .oam = &sOam_SandPillar, .anims = sAnimTable_SandPillar, @@ -299,7 +299,7 @@ static const union AnimCmd *const sAnimTable_RecordMixLights[] = static const struct SpriteTemplate sSpriteTemplate_RecordMixLights = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0x1000, .oam = &gObjectEventBaseOam_32x8, .anims = sAnimTable_RecordMixLights, diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 590c0d01da..929e019f1c 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -588,7 +588,7 @@ static void Task_Hof_DisplayMon(u8 taskId) if (currMon->species == SPECIES_EGG) destY += 10; - spriteId = CreatePicSprite2(currMon->species, currMon->tid, currMon->personality, 1, startX, startY, currMonId, 0xFFFF); + spriteId = CreatePicSprite2(currMon->species, currMon->tid, currMon->personality, 1, startX, startY, currMonId, TAG_NONE); gSprites[spriteId].tDestinationX = destX; gSprites[spriteId].tDestinationY = destY; gSprites[spriteId].data[0] = 0; @@ -703,7 +703,7 @@ static void Task_Hof_DisplayPlayer(u8 taskId) ShowBg(0); ShowBg(1); ShowBg(3); - gTasks[taskId].tPlayerSpriteID = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId_Debug(gSaveBlock2Ptr->playerGender, TRUE), 1, 120, 72, 6, 0xFFFF); + gTasks[taskId].tPlayerSpriteID = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId_Debug(gSaveBlock2Ptr->playerGender, TRUE), 1, 120, 72, 6, TAG_NONE); AddWindow(&sHof_WindowTemplate); LoadWindowGfx(1, gSaveBlock2Ptr->optionsWindowFrameType, 0x21D, 0xD0); LoadPalette(GetTextWindowPalette(1), 0xE0, 0x20); @@ -936,7 +936,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId) if (currMon->species == SPECIES_EGG) posY += 10; - spriteId = CreateMonPicSprite_HandleDeoxys(currMon->species, currMon->tid, currMon->personality, 1, posX, posY, i, 0xFFFF); + spriteId = CreateMonPicSprite_HandleDeoxys(currMon->species, currMon->tid, currMon->personality, 1, posX, posY, i, TAG_NONE); gSprites[spriteId].oam.priority = 1; gTasks[taskId].tMonSpriteId(i) = spriteId; } diff --git a/src/intro_credits_graphics.c b/src/intro_credits_graphics.c index bceddd9b70..38a74bdb90 100644 --- a/src/intro_credits_graphics.c +++ b/src/intro_credits_graphics.c @@ -79,7 +79,7 @@ static void SpriteCB_FlygonLeftHalf(struct Sprite *sprite); static const struct SpriteTemplate sSpriteTemplate_MovingScenery = { .tileTag = TAG_MOVING_SCENERY, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &gDummyOamData, .anims = gDummySpriteAnimTable, .images = NULL, diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index 8bcf506fbf..335cdee963 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -271,7 +271,7 @@ static const struct SpriteFrameImage sBerryPicSpriteImageTable[] = static const struct SpriteTemplate gBerryPicSpriteTemplate = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = TAG_BERRY_PIC_PAL, .oam = &sBerryPicOamData, .anims = sBerryPicSpriteAnimTable, @@ -310,7 +310,7 @@ static const union AffineAnimCmd *const sBerryPicRotatingAnimCmds[] = static const struct SpriteTemplate gBerryPicRotatingSpriteTemplate = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = TAG_BERRY_PIC_PAL, .oam = &sBerryPicRotatingOamData, .anims = sBerryPicSpriteAnimTable, diff --git a/src/list_menu.c b/src/list_menu.c index 83c9acd669..84b917eecc 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -683,7 +683,7 @@ static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind) cursor.rowWidth = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8 + 2; cursor.rowHeight = GetFontAttribute(list->template.fontId, FONTATTR_MAX_LETTER_HEIGHT) + 2; cursor.tileTag = 0x4000; - cursor.palTag = SPRITE_INVALID_TAG; + cursor.palTag = TAG_NONE; cursor.palNum = 15; return ListMenuAddCursorObjectInternal(&cursor, cursorKind); @@ -1076,7 +1076,7 @@ u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16 spriteSheet.tag = arrowInfo->tileTag; LoadCompressedSpriteSheet(&spriteSheet); - if (arrowInfo->palTag == SPRITE_INVALID_TAG) + if (arrowInfo->palTag == TAG_NONE) { LoadPalette(sRedArrowPal, (16 * arrowInfo->palNum) + 0x100, 0x20); } @@ -1099,7 +1099,7 @@ u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16 data->topSpriteId = AddScrollIndicatorArrowObject(arrowInfo->firstArrowType, arrowInfo->firstX, arrowInfo->firstY, arrowInfo->tileTag, arrowInfo->palTag); data->bottomSpriteId = AddScrollIndicatorArrowObject(arrowInfo->secondArrowType, arrowInfo->secondX, arrowInfo->secondY, arrowInfo->tileTag, arrowInfo->palTag); - if (arrowInfo->palTag == SPRITE_INVALID_TAG) + if (arrowInfo->palTag == TAG_NONE) { gSprites[data->topSpriteId].oam.paletteNum = arrowInfo->palNum; gSprites[data->bottomSpriteId].oam.paletteNum = arrowInfo->palNum; @@ -1179,9 +1179,9 @@ void RemoveScrollIndicatorArrowPair(u8 taskId) { struct ScrollIndicatorPair *data = (void*) gTasks[taskId].data; - if (data->tileTag != SPRITE_INVALID_TAG) + if (data->tileTag != TAG_NONE) FreeSpriteTilesByTag(data->tileTag); - if (data->palTag != SPRITE_INVALID_TAG) + if (data->palTag != TAG_NONE) FreeSpritePaletteByTag(data->palTag); DestroySprite(&gSprites[data->topSpriteId]); @@ -1322,7 +1322,7 @@ static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor) spriteSheet.tag = cursor->tileTag; LoadCompressedSpriteSheet(&spriteSheet); - if (cursor->palTag == SPRITE_INVALID_TAG) + if (cursor->palTag == TAG_NONE) { LoadPalette(sRedArrowPal, (16 * cursor->palNum) + 0x100, 0x20); } @@ -1352,7 +1352,7 @@ static u8 ListMenuAddRedOutlineCursorObject(struct CursorStruct *cursor) gSprites[data->spriteId].subpriority = 0; gSprites[data->spriteId].subspriteTableNum = 0; - if (cursor->palTag == SPRITE_INVALID_TAG) + if (cursor->palTag == TAG_NONE) { gSprites[data->spriteId].oam.paletteNum = cursor->palNum; } @@ -1374,9 +1374,9 @@ static void ListMenuRemoveRedOutlineCursorObject(u8 taskId) Free(data->subspritesPtr); - if (data->tileTag != SPRITE_INVALID_TAG) + if (data->tileTag != TAG_NONE) FreeSpriteTilesByTag(data->tileTag); - if (data->palTag != SPRITE_INVALID_TAG) + if (data->palTag != TAG_NONE) FreeSpritePaletteByTag(data->palTag); DestroySprite(&gSprites[data->spriteId]); @@ -1407,7 +1407,7 @@ static u8 ListMenuAddRedArrowCursorObject(struct CursorStruct *cursor) spriteSheet.tag = cursor->tileTag; LoadCompressedSpriteSheet(&spriteSheet); - if (cursor->palTag == SPRITE_INVALID_TAG) + if (cursor->palTag == TAG_NONE) { LoadPalette(sRedArrowPal, (16 * cursor->palNum) + 0x100, 0x20); } @@ -1432,7 +1432,7 @@ static u8 ListMenuAddRedArrowCursorObject(struct CursorStruct *cursor) gSprites[data->spriteId].x2 = 8; gSprites[data->spriteId].y2 = 8; - if (cursor->palTag == SPRITE_INVALID_TAG) + if (cursor->palTag == TAG_NONE) { gSprites[data->spriteId].oam.paletteNum = cursor->palNum; } @@ -1452,9 +1452,9 @@ static void ListMenuRemoveRedArrowCursorObject(u8 taskId) { struct RedArrowCursor *data = (void*) gTasks[taskId].data; - if (data->tileTag != SPRITE_INVALID_TAG) + if (data->tileTag != TAG_NONE) FreeSpriteTilesByTag(data->tileTag); - if (data->palTag != SPRITE_INVALID_TAG) + if (data->palTag != TAG_NONE) FreeSpritePaletteByTag(data->palTag); DestroySprite(&gSprites[data->spriteId]); diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 9b6d0d887b..cd2c7f4d22 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -153,8 +153,8 @@ static const union AnimCmd *const sAnims_FallingFossil[] = static const struct SpriteTemplate sSpriteTemplate_FallingFossil = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &sOamData_FallingFossil, .anims = sAnims_FallingFossil, .images = NULL, @@ -204,7 +204,7 @@ static const struct OamData sOamData_CeilingCrumbleSmall = static const struct SpriteTemplate sSpriteTemplate_CeilingCrumbleSmall = { .tileTag = TAG_CEILING_CRUMBLE, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &sOamData_CeilingCrumbleSmall, .anims = sAnims_CeilingCrumbleSmall, .images = NULL, @@ -242,7 +242,7 @@ static const struct OamData sOamData_CeilingCrumbleLarge = static const struct SpriteTemplate sSpriteTemplate_CeilingCrumbleLarge = { .tileTag = TAG_CEILING_CRUMBLE, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &sOamData_CeilingCrumbleLarge, .anims = sAnims_CeilingCrumbleLarge, .images = NULL, diff --git a/src/naming_screen.c b/src/naming_screen.c index fc7fb82fe7..f702f52a0d 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -2503,7 +2503,7 @@ static const struct SpriteTemplate sSpriteTemplate_Underscore = static const struct SpriteTemplate sSpriteTemplate_PCIcon = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_PC_ICON, .oam = &sOam_8x8, .anims = sAnims_PCIcon, diff --git a/src/overworld.c b/src/overworld.c index a2f38c864d..41990a81e9 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -1082,7 +1082,7 @@ static bool16 IsInflitratedSpaceCenter(struct WarpData *warp) u16 GetLocationMusic(struct WarpData *warp) { if (NoMusicInSotopolisWithLegendaries(warp) == TRUE) - return 0xFFFF; + return MUS_NONE; else if (ShouldLegendaryMusicPlayAtLocation(warp) == TRUE) return MUS_ABNORMAL_WEATHER; else if (IsInflitratedSpaceCenter(warp) == TRUE) diff --git a/src/pokedex.c b/src/pokedex.c index cc469b32f8..7096499bec 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4633,12 +4633,12 @@ static u32 GetPokedexMonPersonality(u16 species) u16 CreateMonSpriteFromNationalDexNumber(u16 nationalNum, s16 x, s16 y, u16 paletteSlot) { nationalNum = NationalPokedexNumToSpecies(nationalNum); - return CreateMonPicSprite_HandleDeoxys(nationalNum, SHINY_ODDS, GetPokedexMonPersonality(nationalNum), TRUE, x, y, paletteSlot, 0xFFFF); + return CreateMonPicSprite_HandleDeoxys(nationalNum, SHINY_ODDS, GetPokedexMonPersonality(nationalNum), TRUE, x, y, paletteSlot, TAG_NONE); } static u16 CreateSizeScreenTrainerPic(u16 species, s16 x, s16 y, s8 paletteSlot) { - return CreateTrainerPicSprite(species, TRUE, x, y, paletteSlot, 0xFFFF); + return CreateTrainerPicSprite(species, TRUE, x, y, paletteSlot, TAG_NONE); } static int DoPokedexSearch(u8 dexMode, u8 order, u8 abcGroup, u8 bodyColor, u8 type1, u8 type2) diff --git a/src/pokemon.c b/src/pokemon.c index 28b4022165..840d3770a7 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1915,7 +1915,7 @@ static const u8 sHoldEffectToType[][2] = const struct SpriteTemplate gBattlerSpriteTemplates[MAX_BATTLERS_COUNT] = { [B_POSITION_PLAYER_LEFT] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -1924,7 +1924,7 @@ const struct SpriteTemplate gBattlerSpriteTemplates[MAX_BATTLERS_COUNT] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [B_POSITION_OPPONENT_LEFT] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpriteOpponentSide, .anims = NULL, @@ -1933,7 +1933,7 @@ const struct SpriteTemplate gBattlerSpriteTemplates[MAX_BATTLERS_COUNT] = .callback = SpriteCb_WildMon, }, [B_POSITION_PLAYER_RIGHT] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -1942,7 +1942,7 @@ const struct SpriteTemplate gBattlerSpriteTemplates[MAX_BATTLERS_COUNT] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [B_POSITION_OPPONENT_RIGHT] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpriteOpponentSide, .anims = NULL, @@ -1955,7 +1955,7 @@ const struct SpriteTemplate gBattlerSpriteTemplates[MAX_BATTLERS_COUNT] = static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = { [TRAINER_BACK_PIC_BRENDAN] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -1964,7 +1964,7 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [TRAINER_BACK_PIC_MAY] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -1973,7 +1973,7 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [TRAINER_BACK_PIC_RED] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -1982,7 +1982,7 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [TRAINER_BACK_PIC_LEAF] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -1991,7 +1991,7 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [TRAINER_BACK_PIC_RUBY_SAPPHIRE_BRENDAN] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -2000,7 +2000,7 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [TRAINER_BACK_PIC_RUBY_SAPPHIRE_MAY] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -2009,7 +2009,7 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [TRAINER_BACK_PIC_WALLY] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -2018,7 +2018,7 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = .callback = SpriteCB_BattleSpriteStartSlideLeft, }, [TRAINER_BACK_PIC_STEVEN] = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattleSpritePlayerSide, .anims = NULL, @@ -2103,8 +2103,8 @@ static const struct OamData sOamData_8329F20 = static const struct SpriteTemplate gUnknown_08329F28 = { - .tileTag = 0xFFFF, - .paletteTag = 0xFFFF, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &sOamData_8329F20, .anims = gDummySpriteAnimTable, .images = NULL, diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 42330b6a5c..8d59a27c83 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1278,7 +1278,7 @@ static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *iconTemplate, s16 x, struct SpriteTemplate spriteTemplate = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = iconTemplate->paletteTag, .oam = iconTemplate->oam, .anims = iconTemplate->anims, diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index a7644fdaaf..3860230261 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -962,7 +962,7 @@ static u16 DrawRibbonsMonFrontPic(s32 x, s32 y) u32 personality, otId; GetMonSpeciesPersonalityOtId(&species, &personality, &otId); - spriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, MON_SPRITE_X_ON, MON_SPRITE_Y, 15, 0xFFFF); + spriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, MON_SPRITE_X_ON, MON_SPRITE_Y, 15, TAG_NONE); gSprites[spriteId].oam.priority = 0; return spriteId; } diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index 528a0e52d2..2ec0acde47 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -219,7 +219,7 @@ static const union AnimCmd *const sAnims_Arrow[] = static const struct SpriteTemplate sSpriteTemplate_Arrow = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_ARROW, .oam = &sOamData_Arrow, .anims = sAnims_Arrow, diff --git a/src/rotating_gate.c b/src/rotating_gate.c index a185d9a145..997404c271 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -461,7 +461,7 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_RotatingGate[] = static const struct SpriteTemplate sSpriteTemplate_RotatingGateLarge = { .tileTag = ROTATING_GATE_TILE_TAG, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &sOamData_RotatingGateLarge, .anims = sSpriteAnimTable_RotatingGateLarge, .images = NULL, @@ -472,7 +472,7 @@ static const struct SpriteTemplate sSpriteTemplate_RotatingGateLarge = static const struct SpriteTemplate sSpriteTemplate_RotatingGateRegular = { .tileTag = ROTATING_GATE_TILE_TAG, - .paletteTag = 0xFFFF, + .paletteTag = TAG_NONE, .oam = &sOamData_RotatingGateRegular, .anims = sSpriteAnimTable_RotatingGateRegular, .images = NULL, diff --git a/src/slot_machine.c b/src/slot_machine.c index 157f3625e4..ab05124d01 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -5543,7 +5543,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelBackground = static const struct SpriteTemplate sSpriteTemplate_ReelTimePikachu = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_REEL_TIME_PIKACHU, .oam = &sOam_64x64, .anims = sAnims_ReelTimePikachu, @@ -5554,7 +5554,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimePikachu = static const struct SpriteTemplate sSpriteTemplate_ReelTimeMachineAntennae = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_REEL_TIME_MISC, .oam = &sOam_8x16, .anims = sAnims_SingleFrame, @@ -5565,7 +5565,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeMachineAntennae = static const struct SpriteTemplate sSpriteTemplate_ReelTimeMachine = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_REEL_TIME_MACHINE, .oam = &sOam_8x16, .anims = sAnims_SingleFrame, @@ -5576,7 +5576,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeMachine = static const struct SpriteTemplate sSpriteTemplate_BrokenReelTimeMachine = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_REEL_TIME_MACHINE, .oam = &sOam_8x16, .anims = sAnims_SingleFrame, @@ -5587,7 +5587,7 @@ static const struct SpriteTemplate sSpriteTemplate_BrokenReelTimeMachine = static const struct SpriteTemplate sSpriteTemplate_ReelTimeNumbers = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_MISC, .oam = &sOam_16x16, .anims = sAnims_ReelTimeNumbers, @@ -5598,7 +5598,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeNumbers = static const struct SpriteTemplate sSpriteTemplate_ReelTimeShadow = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_MISC, .oam = &sOam_16x16, .anims = sAnims_SingleFrame, @@ -5609,7 +5609,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeShadow = static const struct SpriteTemplate sSpriteTemplate_ReelTimeNumberGap = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_MISC, .oam = &sOam_16x16, .anims = sAnims_SingleFrame, @@ -5620,7 +5620,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeNumberGap = static const struct SpriteTemplate sSpriteTemplate_ReelTimeBolt = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_MISC, .oam = &sOam_16x32, .anims = sAnims_ReelTimeBolt, @@ -5631,7 +5631,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeBolt = static const struct SpriteTemplate sSpriteTemplate_ReelTimePikachuAura = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_PIKA_AURA, .oam = &sOam_32x64, .anims = sAnims_SingleFrame, @@ -5642,7 +5642,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimePikachuAura = static const struct SpriteTemplate sSpriteTemplate_ReelTimeExplosion = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_EXPLOSION, .oam = &sOam_32x32, .anims = sAnims_ReelTimeExplosion, @@ -5653,7 +5653,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeExplosion = static const struct SpriteTemplate sSpriteTemplate_ReelTimeDuck = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_MISC, .oam = &sOam_8x8, .anims = sAnims_ReelTimeDuck, @@ -5664,7 +5664,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeDuck = static const struct SpriteTemplate sSpriteTemplate_ReelTimeSmoke = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_MISC, .oam = &sOam_16x16, .anims = sAnims_SingleFrame, @@ -5675,7 +5675,7 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeSmoke = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Reel = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, @@ -5686,7 +5686,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Reel = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Time = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, @@ -5697,7 +5697,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Time = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Insert = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, @@ -5719,7 +5719,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Stop = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Win = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_64x32, .anims = sAnims_SingleFrame, @@ -5730,7 +5730,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Win = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Lose = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_64x32, .anims = sAnims_SingleFrame, @@ -5774,7 +5774,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Reg = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_AButton = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_32x32, .anims = sAnims_DigitalDisplay_AButton, @@ -5785,7 +5785,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_AButton = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Smoke = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, @@ -5796,7 +5796,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Smoke = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Number = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_16x16, .anims = sAnims_DigitalDisplay_Number, @@ -5807,7 +5807,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Number = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Pokeball = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_DigitalDisplay_Pokeball, @@ -5818,7 +5818,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Pokeball = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_DPad = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_DigitalDisplay_DPad, @@ -5829,7 +5829,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_DPad = static const struct SpriteTemplate sSpriteTemplate_PikaPowerBolt = { - .tileTag = 0xFFFF, + .tileTag = TAG_NONE, .paletteTag = PALTAG_MISC, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, diff --git a/src/starter_choose.c b/src/starter_choose.c index b327816e6a..37c3346809 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -635,7 +635,7 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y) { u8 spriteId; - spriteId = CreatePicSprite2(species, SHINY_ODDS, 0, 1, x, y, 0xE, 0xFFFF); + spriteId = CreatePicSprite2(species, SHINY_ODDS, 0, 1, x, y, 0xE, TAG_NONE); gSprites[spriteId].oam.priority = 0; return spriteId; } diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 477c11faf8..9e30f636eb 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -100,9 +100,9 @@ static void LoadPicPaletteByTagOrSlot(u16 species, u32 otId, u32 personality, u8 { if (!isTrainer) { - if (paletteTag == 0xFFFF) + if (paletteTag == TAG_NONE) { - sCreatingSpriteTemplate.paletteTag = 0xFFFF; + sCreatingSpriteTemplate.paletteTag = TAG_NONE; LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x100 + paletteSlot * 0x10, 0x20); } else @@ -113,9 +113,9 @@ static void LoadPicPaletteByTagOrSlot(u16 species, u32 otId, u32 personality, u8 } else { - if (paletteTag == 0xFFFF) + if (paletteTag == TAG_NONE) { - sCreatingSpriteTemplate.paletteTag = 0xFFFF; + sCreatingSpriteTemplate.paletteTag = TAG_NONE; LoadCompressedPalette(gTrainerFrontPicPaletteTable[species].data, 0x100 + paletteSlot * 0x10, 0x20); } else @@ -182,7 +182,7 @@ static u16 CreatePicSprite(u16 species, u32 otId, u32 personality, bool8 isFront images[j].data = framePics + 0x800 * j; images[j].size = 0x800; } - sCreatingSpriteTemplate.tileTag = 0xFFFF; + sCreatingSpriteTemplate.tileTag = TAG_NONE; sCreatingSpriteTemplate.oam = &gUnknown_0860B064; AssignSpriteAnimsTable(isTrainer); sCreatingSpriteTemplate.images = images; @@ -190,7 +190,7 @@ static u16 CreatePicSprite(u16 species, u32 otId, u32 personality, bool8 isFront sCreatingSpriteTemplate.callback = DummyPicSpriteCallback; LoadPicPaletteByTagOrSlot(species, otId, personality, paletteSlot, paletteTag, isTrainer); spriteId = CreateSprite(&sCreatingSpriteTemplate, x, y, 0); - if (paletteTag == 0xFFFF) + if (paletteTag == TAG_NONE) { gSprites[spriteId].oam.paletteNum = paletteSlot; } @@ -257,7 +257,7 @@ u16 CreatePicSprite2(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s1 images[j].data = framePics + 0x800 * j; images[j].size = 0x800; } - sCreatingSpriteTemplate.tileTag = 0xFFFF; + sCreatingSpriteTemplate.tileTag = TAG_NONE; sCreatingSpriteTemplate.anims = gMonFrontAnimsPtrTable[species]; sCreatingSpriteTemplate.images = images; if (flags2 == 0x01) @@ -278,7 +278,7 @@ u16 CreatePicSprite2(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s1 sCreatingSpriteTemplate.callback = DummyPicSpriteCallback; LoadPicPaletteByTagOrSlot(species, otId, personality, paletteSlot, paletteTag, FALSE); spriteId = CreateSprite(&sCreatingSpriteTemplate, x, y, 0); - if (paletteTag == 0xFFFF) + if (paletteTag == TAG_NONE) { gSprites[spriteId].oam.paletteNum = paletteSlot; } @@ -309,7 +309,7 @@ static u16 FreeAndDestroyPicSpriteInternal(u16 spriteId) } framePics = sSpritePics[i].frames; images = sSpritePics[i].images; - if (sSpritePics[i].paletteTag != 0xFFFF) + if (sSpritePics[i].paletteTag != TAG_NONE) { FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[spriteId].oam.paletteNum)); } diff --git a/src/trainer_see.c b/src/trainer_see.c index ea052fb0ce..ec3dc8123e 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -167,8 +167,8 @@ static const union AnimCmd *const sSpriteAnimTable_Icons[] = static const struct SpriteTemplate sSpriteTemplate_ExclamationQuestionMark = { - .tileTag = 0xffff, - .paletteTag = 0xffff, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &sOamData_Icons, .anims = sSpriteAnimTable_Icons, .images = sSpriteImageTable_ExclamationQuestionMark, @@ -178,7 +178,7 @@ static const struct SpriteTemplate sSpriteTemplate_ExclamationQuestionMark = static const struct SpriteTemplate sSpriteTemplate_HeartIcon = { - .tileTag = 0xffff, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &sOamData_Icons, .anims = sSpriteAnimTable_Icons, From ac599589ec8e04b788885cbcfae5c8abe7036f7f Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 23 Sep 2021 23:36:37 -0300 Subject: [PATCH 013/417] gRegionMapSectionId_To_PopUpThemeIdMapping -> sRegionMapSectionId_To_PopUpThemeIdMapping --- src/map_name_popup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map_name_popup.c b/src/map_name_popup.c index cd92bbac18..97b02acf63 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -68,7 +68,7 @@ static const u16 sMapPopUp_PaletteTable[][16] = static const u16 sMapPopUp_Palette_Underwater[16] = INCBIN_U16("graphics/interface/map_popup/underwater.gbapal"); -static const u8 gRegionMapSectionId_To_PopUpThemeIdMapping[] = +static const u8 sRegionMapSectionId_To_PopUpThemeIdMapping[] = { [MAPSEC_LITTLEROOT_TOWN] = MAPPOPUP_THEME_WOOD, [MAPSEC_OLDALE_TOWN] = MAPPOPUP_THEME_WOOD, @@ -378,7 +378,7 @@ static void LoadMapNamePopUpWindowBg(void) else regionMapSectionId = 0; // Discard kanto region sections; } - popUpThemeId = gRegionMapSectionId_To_PopUpThemeIdMapping[regionMapSectionId]; + popUpThemeId = sRegionMapSectionId_To_PopUpThemeIdMapping[regionMapSectionId]; LoadBgTiles(GetWindowAttribute(popupWindowId, WINDOW_BG), sMapPopUp_OutlineTable[popUpThemeId], 0x400, 0x21D); CallWindowFunction(popupWindowId, DrawMapNamePopUpFrame); From a66d7e1b438f84bc04eb3f7d3da286882ba55019 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 24 Sep 2021 14:30:15 -0400 Subject: [PATCH 014/417] Document some single-remaining symbols --- asm/macros/battle_script.inc | 18 +-- common_syms/bg.txt | 2 +- data/battle_anim_scripts.s | 2 +- data/battle_scripts_1.s | 57 +++---- gflib/bg.c | 53 +++---- gflib/bg.h | 9 +- gflib/string_util.c | 6 +- gflib/string_util.h | 2 +- gflib/text.h | 4 + gflib/window.c | 32 ++-- include/battle_arena.h | 2 +- include/battle_gfx_sfx_util.h | 2 +- include/battle_util2.h | 2 +- include/constants/battle.h | 14 +- include/constants/battle_script_commands.h | 4 + include/pokedex_area_region_map.h | 2 +- src/battle_anim_dark.c | 2 +- src/battle_anim_normal.c | 51 ++++--- src/battle_arena.c | 2 +- src/battle_gfx_sfx_util.c | 3 +- src/battle_main.c | 48 +++--- src/battle_script_commands.c | 168 ++++++++++----------- src/battle_util.c | 22 +-- src/battle_util2.c | 12 +- src/contest.c | 6 +- src/hall_of_fame.c | 2 +- src/item_menu_icons.c | 26 ++-- src/main.c | 4 +- src/main_menu.c | 24 +-- src/menu.c | 4 - src/pokedex_area_region_map.c | 10 +- src/pokedex_area_screen.c | 10 +- src/pokemon_storage_system.c | 6 +- src/reshow_battle_screen.c | 2 +- sym_common.txt | 2 +- 35 files changed, 329 insertions(+), 286 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 0f51061e85..c5bede3f5d 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1275,8 +1275,8 @@ various \battler, VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP .endm - .macro various7 battler:req - various \battler, 7 + .macro resetplayerfainted + various BS_ATTACKER, VARIOUS_RESET_PLAYER_FAINTED .endm .macro palaceflavortext battler:req @@ -1303,12 +1303,12 @@ various \battler, VARIOUS_EMIT_YESNOBOX .endm - .macro various14 battler:req - various \battler, 14 + .macro arenadrawreftextbox + various BS_ATTACKER, VARIOUS_DRAW_ARENA_REF_TEXT_BOX .endm - .macro various15 battler:req - various \battler, 15 + .macro arenaerasereftextbox + various BS_ATTACKER, VARIOUS_ERASE_ARENA_REF_TEXT_BOX .endm .macro arenajudgmentstring id:req @@ -1340,11 +1340,11 @@ .endm .macro setalreadystatusedmoveattempt battler:req - various \battler, 23 + various \battler, VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT .endm - .macro various24 battler:req - various \battler, 24 + .macro palacetryescapestatus battler:req + various \battler, VARIOUS_PALACE_TRY_ESCAPE_STATUS .endm .macro setoutcomeonteleport battler:req diff --git a/common_syms/bg.txt b/common_syms/bg.txt index 2495d1646b..0a3c3aecca 100644 --- a/common_syms/bg.txt +++ b/common_syms/bg.txt @@ -1 +1 @@ -gUnneededFireRedVariable +gWindowTileAutoAllocEnabled diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index e7aad6a931..83b1f3cea0 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -3514,7 +3514,7 @@ Move_MEMENTO: delay 48 playsewithpan SE_M_PSYBEAM2, SOUND_PAN_ATTACKER waitforvisualfinish - createvisualtask sub_8114470, 2 + createvisualtask AnimTask_MementoHandleBg, 2 delay 12 setalpha 0, 16 delay 1 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 74efef7acb..30ca1b2201 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2828,7 +2828,7 @@ BattleScript_HandleFaintedMon:: atk24 BattleScript_HandleFaintedMonMultiple jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonTryChooseAnother - jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_x400000, BattleScript_FaintedMonTryChooseAnother + jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonTryChooseAnother printstring STRINGID_USENEXTPKMN setbyte gBattleCommunication, 0 yesnobox @@ -2843,7 +2843,7 @@ BattleScript_FaintedMonTryChooseAnother:: jumpifbattletype BATTLE_TYPE_RECORDED_LINK, BattleScript_FaintedMonChooseAnother jumpifbattletype BATTLE_TYPE_FRONTIER, BattleScript_FaintedMonChooseAnother jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonChooseAnother - jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_x400000, BattleScript_FaintedMonChooseAnother + jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonChooseAnother jumpifbyte CMP_EQUAL, sBATTLE_STYLE, OPTIONS_BATTLE_STYLE_SET, BattleScript_FaintedMonChooseAnother jumpifcantswitch BS_PLAYER1, BattleScript_FaintedMonChooseAnother printstring STRINGID_ENEMYABOUTTOSWITCHPKMN @@ -2881,7 +2881,7 @@ BattleScript_FaintedMonChooseAnother:: hidepartystatussummary BS_FAINTED switchinanim BS_FAINTED, FALSE waitstate - various7 BS_ATTACKER + resetplayerfainted switchineffects BS_FAINTED jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonEnd cancelallactions @@ -3200,7 +3200,7 @@ BattleScript_DamagingWeatherLoop:: jumpifword CMP_EQUAL, gBattleMoveDamage, 0, BattleScript_DamagingWeatherLoopIncrement printfromtable gSandStormHailDmgStringIds waitmessage B_WAIT_TIME_LONG - orword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE + orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE effectivenesssound hitanimation BS_ATTACKER healthbarupdate BS_ATTACKER @@ -3212,7 +3212,7 @@ BattleScript_DamagingWeatherLoopIncrement:: addbyte gBattleCommunication, 1 jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_DamagingWeatherLoop BattleScript_DamagingWeatherContinuesEnd:: - bicword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE + bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE end2 BattleScript_SandStormHailEnds:: @@ -3256,7 +3256,7 @@ BattleScript_SafeguardEnds:: BattleScript_LeechSeedTurnDrain:: playanimation BS_ATTACKER, B_ANIM_LEECH_SEED_DRAIN, sB_ANIM_ARG1 - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER copyword gBattleMoveDamage, gHpDealt @@ -3267,7 +3267,7 @@ BattleScript_LeechSeedTurnDrain:: BattleScript_LeechSeedTurnPrintLiquidOoze:: setbyte cMULTISTRING_CHOOSER, B_MSG_LEECH_SEED_OOZE BattleScript_LeechSeedTurnPrintAndUpdateHp:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_TARGET datahpupdate BS_TARGET printfromtable gLeechSeedStringIds @@ -3371,14 +3371,14 @@ BattleScript_EncoredNoMore:: BattleScript_DestinyBondTakesLife:: printstring STRINGID_PKMNTOOKFOE waitmessage B_WAIT_TIME_LONG - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER tryfaintmon BS_ATTACKER, FALSE, NULL return BattleScript_SpikesOnAttacker:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER call BattleScript_PrintHurtBySpikes @@ -3393,7 +3393,7 @@ BattleScript_SpikesOnAttackerFainted:: goto BattleScript_HandleFaintedMon BattleScript_SpikesOnTarget:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_TARGET datahpupdate BS_TARGET call BattleScript_PrintHurtBySpikes @@ -3408,7 +3408,7 @@ BattleScript_SpikesOnTargetFainted:: goto BattleScript_HandleFaintedMon BattleScript_SpikesOnFaintedBattler:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_FAINTED datahpupdate BS_FAINTED call BattleScript_PrintHurtBySpikes @@ -3430,7 +3430,7 @@ BattleScript_PrintHurtBySpikes:: BattleScript_PerishSongTakesLife:: printstring STRINGID_PKMNPERISHCOUNTFELL waitmessage B_WAIT_TIME_LONG - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER tryfaintmon BS_ATTACKER, FALSE, NULL @@ -3662,7 +3662,7 @@ BattleScript_MagicCoatBounce:: pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNMOVEBOUNCED waitmessage B_WAIT_TIME_LONG - orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_x800000 + orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP setmagiccoattarget BS_ATTACKER return @@ -3673,7 +3673,7 @@ BattleScript_SnatchedMove:: playanimation BS_TARGET, B_ANIM_SNATCH_MOVE, NULL printstring STRINGID_PKMNSNATCHEDMOVE waitmessage B_WAIT_TIME_LONG - orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_x800000 + orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP swapattackerwithtarget return @@ -3713,7 +3713,7 @@ BattleScript_MoveUsedIsAsleep:: goto BattleScript_MoveEnd BattleScript_MoveUsedWokeUp:: - bicword gHitMarker, HITMARKER_x10 + bicword gHitMarker, HITMARKER_WAKE_UP_CLEAR printfromtable gWokeUpStringIds waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER @@ -3731,7 +3731,7 @@ BattleScript_PoisonTurnDmg:: BattleScript_DoStatusTurnDmg:: statusanimation BS_ATTACKER BattleScript_DoTurnDmg:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER tryfaintmon BS_ATTACKER, FALSE, NULL @@ -3798,7 +3798,7 @@ BattleScript_DoSelfConfusionDmg:: effectivenesssound hitanimation BS_ATTACKER waitstate - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER resultmessage @@ -3931,7 +3931,7 @@ BattleScript_MoveEffectRecoil:: jumpifmove MOVE_STRUGGLE, BattleScript_DoRecoil jumpifability BS_ATTACKER, ABILITY_ROCK_HEAD, BattleScript_RecoilEnd BattleScript_DoRecoil:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNHITWITHRECOIL @@ -4174,7 +4174,7 @@ BattleScript_ColorChangeActivates:: return BattleScript_RoughSkinActivates:: - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNHURTSWITH @@ -4222,9 +4222,10 @@ BattleScript_IgnoresAndUsesRandomMove:: jumptocalledmove FALSE BattleScript_MoveUsedLoafingAround:: + @ Skip ahead if not the Battle Palace message jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_INCAPABLE_OF_POWER, BattleScript_MoveUsedLoafingAroundMsg setbyte gBattleCommunication, 0 - various24 BS_ATTACKER + palacetryescapestatus BS_ATTACKER setbyte cMULTISTRING_CHOOSER, B_MSG_INCAPABLE_OF_POWER BattleScript_MoveUsedLoafingAroundMsg:: printfromtable gInobedientStringIds @@ -4442,22 +4443,22 @@ BattleScript_ArenaTurnBeginning:: playse SE_ARENA_TIMEUP1 pause 8 playse SE_ARENA_TIMEUP1 - various14 BS_ATTACKER + arenadrawreftextbox arenajudgmentstring B_MSG_REF_COMMENCE_BATTLE arenawaitmessage B_MSG_REF_COMMENCE_BATTLE pause B_WAIT_TIME_LONG - various15 BS_ATTACKER + arenaerasereftextbox volumeup end2 @ Unused BattleScript_ArenaNothingDecided:: playse SE_DING_DONG - various14 BS_ATTACKER + arenadrawreftextbox arenajudgmentstring B_MSG_REF_NOTHING_IS_DECIDED arenawaitmessage B_MSG_REF_NOTHING_IS_DECIDED pause B_WAIT_TIME_LONG - various15 BS_ATTACKER + arenaerasereftextbox end2 BattleScript_ArenaDoJudgment:: @@ -4470,7 +4471,7 @@ BattleScript_ArenaDoJudgment:: pause 8 playse SE_ARENA_TIMEUP1 pause B_WAIT_TIME_LONG - various14 BS_ATTACKER + arenadrawreftextbox arenajudgmentstring B_MSG_REF_THATS_IT arenawaitmessage B_MSG_REF_THATS_IT pause B_WAIT_TIME_LONG @@ -4492,7 +4493,7 @@ BattleScript_ArenaDoJudgment:: arenajudgmentstring B_MSG_REF_PLAYER_WON arenawaitmessage B_MSG_REF_PLAYER_WON arenajudgmentwindow - various15 BS_ATTACKER + arenaerasereftextbox printstring STRINGID_DEFEATEDOPPONENTBYREFEREE waitmessage B_WAIT_TIME_LONG playfaintcry BS_OPPONENT1 @@ -4506,7 +4507,7 @@ BattleScript_ArenaJudgmentPlayerLoses: arenajudgmentstring B_MSG_REF_OPPONENT_WON arenawaitmessage B_MSG_REF_OPPONENT_WON arenajudgmentwindow - various15 BS_ATTACKER + arenaerasereftextbox printstring STRINGID_LOSTTOOPPONENTBYREFEREE waitmessage B_WAIT_TIME_LONG playfaintcry BS_PLAYER1 @@ -4520,7 +4521,7 @@ BattleScript_ArenaJudgmentDraw: arenajudgmentstring B_MSG_REF_DRAW arenawaitmessage B_MSG_REF_DRAW arenajudgmentwindow - various15 BS_ATTACKER + arenaerasereftextbox printstring STRINGID_TIEDOPPONENTBYREFEREE waitmessage B_WAIT_TIME_LONG playfaintcry BS_PLAYER1 diff --git a/gflib/bg.c b/gflib/bg.c index ec7c2113b1..283a87ce05 100644 --- a/gflib/bg.c +++ b/gflib/bg.c @@ -42,10 +42,12 @@ static struct BgControl sGpuBgConfigs; static struct BgConfig2 sGpuBgConfigs2[NUM_BACKGROUNDS]; static u32 sDmaBusyBitfield[NUM_BACKGROUNDS]; -u32 gUnneededFireRedVariable; +u32 gWindowTileAutoAllocEnabled; static const struct BgConfig sZeroedBgControlStruct = { 0 }; +static u32 GetBgType(u8 bg); + void ResetBgs(void) { ResetBgControlStructs(); @@ -288,7 +290,8 @@ bool8 IsInvalidBg(u8 bg) return FALSE; } -int DummiedOutFireRedLeafGreenTileAllocFunc(int a1, int a2, int a3, int a4) +// From FRLG. Dummied out. +int BgTileAllocOp(int bg, int offset, int count, int mode) { return 0; } @@ -303,7 +306,7 @@ void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable) sDmaBusyBitfield[i] = 0; } - gUnneededFireRedVariable = leftoverFireRedLeafGreenVariable; + gWindowTileAutoAllocEnabled = leftoverFireRedLeafGreenVariable; } void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates) @@ -392,10 +395,8 @@ u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset) sDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); - if (gUnneededFireRedVariable == 1) - { - DummiedOutFireRedLeafGreenTileAllocFunc(bg, tileOffset / 0x20, size / 0x20, 1); - } + if (gWindowTileAutoAllocEnabled == TRUE) + BgTileAllocOp(bg, tileOffset / 0x20, size / 0x20, 1); return cursor; } @@ -523,9 +524,9 @@ u16 GetBgAttribute(u8 bg, u8 attributeId) case BG_ATTR_METRIC: switch (GetBgType(bg)) { - case 0: + case BG_TYPE_NORMAL: return GetBgMetricTextMode(bg, 0) * 0x800; - case 1: + case BG_TYPE_AFFINE: return GetBgMetricAffineMode(bg, 0) * 0x100; default: return 0; @@ -891,10 +892,10 @@ void CopyBgTilemapBufferToVram(u8 bg) { switch (GetBgType(bg)) { - case 0: + case BG_TYPE_NORMAL: sizeToLoad = GetBgMetricTextMode(bg, 0) * 0x800; break; - case 1: + case BG_TYPE_AFFINE: sizeToLoad = GetBgMetricAffineMode(bg, 0) * 0x100; break; default: @@ -915,7 +916,7 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi { switch (GetBgType(bg)) { - case 0: + case BG_TYPE_NORMAL: { const u16 * srcCopy = src; for (destY16 = destY; destY16 < (destY + height); destY16++) @@ -927,7 +928,7 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi } break; } - case 1: + case BG_TYPE_AFFINE: { const u8 * srcCopy = src; mode = GetBgMetricAffineMode(bg, 0x1); @@ -963,7 +964,7 @@ void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 screenHeight = GetBgMetricTextMode(bg, 0x2) * 0x20; switch (GetBgType(bg)) { - case 0: + case BG_TYPE_NORMAL: srcPtr = src + ((srcY * srcWidth) + srcX) * 2; for (i = destX; i < (destX + rectWidth); i++) { @@ -976,7 +977,7 @@ void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcPtr += (srcWidth - destY) * 2; } break; - case 1: + case BG_TYPE_AFFINE: srcPtr = src + ((srcY * srcWidth) + srcX); var = GetBgMetricAffineMode(bg, 0x1); for (i = destX; i < (destX + rectWidth); i++) @@ -1003,7 +1004,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, { switch (GetBgType(bg)) { - case 0: + case BG_TYPE_NORMAL: for (y16 = y; y16 < (y + height); y16++) { for (x16 = x; x16 < (x + width); x16++) @@ -1012,7 +1013,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, } } break; - case 1: + case BG_TYPE_AFFINE: mode = GetBgMetricAffineMode(bg, 0x1); for (y16 = y; y16 < (y + height); y16++) { @@ -1046,7 +1047,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt mode2 = GetBgMetricTextMode(bg, 0x2) * 0x20; switch (GetBgType(bg)) { - case 0: + case BG_TYPE_NORMAL: for (y16 = y; y16 < (y + height); y16++) { for (x16 = x; x16 < (x + width); x16++) @@ -1056,7 +1057,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt } } break; - case 1: + case BG_TYPE_AFFINE: mode3 = GetBgMetricAffineMode(bg, 0x1); for (y16 = y; y16 < (y + height); y16++) { @@ -1190,7 +1191,7 @@ void CopyTileMapEntry(const u16 *src, u16 *dest, s32 palette1, s32 tileOffset, s *dest = var; } -u32 GetBgType(u8 bg) +static u32 GetBgType(u8 bg) { u8 mode = GetBgMode(); @@ -1202,31 +1203,31 @@ u32 GetBgType(u8 bg) { case 0: case 1: - return 0; + return BG_TYPE_NORMAL; } break; case 2: switch (mode) { case 0: - return 0; + return BG_TYPE_NORMAL; case 1: case 2: - return 1; + return BG_TYPE_AFFINE; } break; case 3: switch (mode) { case 0: - return 0; + return BG_TYPE_NORMAL; case 2: - return 1; + return BG_TYPE_AFFINE; } break; } - return 0xFFFF; + return BG_TYPE_NONE; } bool32 IsInvalidBg32(u8 bg) diff --git a/gflib/bg.h b/gflib/bg.h index 58fd1282c0..60327eab3a 100644 --- a/gflib/bg.h +++ b/gflib/bg.h @@ -25,6 +25,12 @@ enum BG_ATTR_BASETILE, }; +enum { + BG_TYPE_NORMAL, + BG_TYPE_AFFINE, + BG_TYPE_NONE = 0xFFFF +}; + struct BgTemplate { u16 bg:2; // 0x1, 0x2 -> 0x3 @@ -43,7 +49,7 @@ void Unused_ResetBgControlStruct(u8 bg); u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode); void SetTextModeAndHideBgs(void); bool8 IsInvalidBg(u8 bg); -int DummiedOutFireRedLeafGreenTileAllocFunc(int a1, int a2, int a3, int a4); +int BgTileAllocOp(int bg, int offset, int count, int mode); void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable); void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates); void InitBgFromTemplate(const struct BgTemplate *template); @@ -78,7 +84,6 @@ u16 GetBgMetricTextMode(u8 bg, u8 whichMetric); u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric); u32 GetTileMapIndexFromCoords(s32 x, s32 y, s32 screenSize, u32 screenWidth, u32 screenHeight); void CopyTileMapEntry(const u16 *src, u16 *dest, s32 palette1, s32 tileOffset, s32 palette2); -u32 GetBgType(u8 bg); bool32 IsInvalidBg32(u8 bg); bool32 IsTileMapOutsideWram(u8 bg); diff --git a/gflib/string_util.c b/gflib/string_util.c index addc7e4f28..b7485184ad 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -630,7 +630,7 @@ bool32 IsStringJapanese(u8 *str) { while (*str != EOS) { - if (*str < CHAR_0) + if (*str <= JAPANESE_CHAR_END) if (*str != CHAR_SPACE) return TRUE; str++; @@ -639,13 +639,13 @@ bool32 IsStringJapanese(u8 *str) return FALSE; } -bool32 sub_800924C(u8 *str, s32 n) +bool32 IsStringNJapanese(u8 *str, s32 n) { s32 i; for (i = 0; *str != EOS && i < n; i++) { - if (*str < CHAR_0) + if (*str <= JAPANESE_CHAR_END) if (*str != CHAR_SPACE) return TRUE; str++; diff --git a/gflib/string_util.h b/gflib/string_util.h index 229193d52d..7f3b64add8 100644 --- a/gflib/string_util.h +++ b/gflib/string_util.h @@ -37,7 +37,7 @@ u8 *StringCopyN_Multibyte(u8 *dest, u8 *src, u32 n); u32 StringLength_Multibyte(const u8 *str); u8 *WriteColorChangeControlCode(u8 *dest, u32 colorType, u8 color); bool32 IsStringJapanese(u8 *str); -bool32 sub_800924C(u8 *str, s32 n); +bool32 IsStringNJapanese(u8 *str, s32 n); u8 GetExtCtrlCodeLength(u8 code); s32 StringCompareWithoutExtCtrlCodes(const u8 *str1, const u8 *str2); void ConvertInternationalString(u8 *s, u8 language); diff --git a/gflib/text.h b/gflib/text.h index f660eb8d1d..a08d0a0fff 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -263,6 +263,10 @@ #define PLACEHOLDER_ID_KYOGRE 0xC #define PLACEHOLDER_ID_GROUDON 0xD +// Hiragana from 0x1-0x50, Katakana from 0x51-0xA0. +// This excludes Japanese punctuation, which end at 0xB0 +#define JAPANESE_CHAR_END 0xA0 + // battle placeholders are located in battle_message.h #define NUM_TEXT_PRINTERS 32 diff --git a/gflib/window.c b/gflib/window.c index b03b513dac..c7b8c8917b 100644 --- a/gflib/window.c +++ b/gflib/window.c @@ -10,7 +10,7 @@ u32 gUnusedWindowVar2; u8 gTransparentTileNumber; u32 gUnusedWindowVar3; void *gWindowBgTilemapBuffers[NUM_BACKGROUNDS]; -extern u32 gUnneededFireRedVariable; +extern u32 gWindowTileAutoAllocEnabled; #define WINDOWS_MAX 32 @@ -55,9 +55,9 @@ bool16 InitWindows(const struct WindowTemplate *templates) for (i = 0, allocatedBaseBlock = 0, bgLayer = templates[i].bg; bgLayer != 0xFF && i < WINDOWS_MAX; ++i, bgLayer = templates[i].bg) { - if (gUnneededFireRedVariable == 1) + if (gWindowTileAutoAllocEnabled == TRUE) { - allocatedBaseBlock = DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, 0, templates[i].width * templates[i].height, 0); + allocatedBaseBlock = BgTileAllocOp(bgLayer, 0, templates[i].width * templates[i].height, 0); if (allocatedBaseBlock == -1) return FALSE; } @@ -100,10 +100,10 @@ bool16 InitWindows(const struct WindowTemplate *templates) gWindows[i].tileData = allocatedTilemapBuffer; gWindows[i].window = templates[i]; - if (gUnneededFireRedVariable == 1) + if (gWindowTileAutoAllocEnabled == TRUE) { gWindows[i].window.baseBlock = allocatedBaseBlock; - DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, allocatedBaseBlock, templates[i].width * templates[i].height, 1); + BgTileAllocOp(bgLayer, allocatedBaseBlock, templates[i].width * templates[i].height, 1); } } @@ -132,9 +132,9 @@ u16 AddWindow(const struct WindowTemplate *template) bgLayer = template->bg; allocatedBaseBlock = 0; - if (gUnneededFireRedVariable == 1) + if (gWindowTileAutoAllocEnabled == TRUE) { - allocatedBaseBlock = DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, 0, template->width * template->height, 0); + allocatedBaseBlock = BgTileAllocOp(bgLayer, 0, template->width * template->height, 0); if (allocatedBaseBlock == -1) return WINDOW_NONE; @@ -174,10 +174,10 @@ u16 AddWindow(const struct WindowTemplate *template) gWindows[win].tileData = allocatedTilemapBuffer; gWindows[win].window = *template; - if (gUnneededFireRedVariable == 1) + if (gWindowTileAutoAllocEnabled == TRUE) { gWindows[win].window.baseBlock = allocatedBaseBlock; - DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, allocatedBaseBlock, gWindows[win].window.width * gWindows[win].window.height, 1); + BgTileAllocOp(bgLayer, allocatedBaseBlock, gWindows[win].window.width * gWindows[win].window.height, 1); } return win; @@ -201,9 +201,9 @@ int AddWindowWithoutTileMap(const struct WindowTemplate *template) bgLayer = template->bg; allocatedBaseBlock = 0; - if (gUnneededFireRedVariable == 1) + if (gWindowTileAutoAllocEnabled == TRUE) { - allocatedBaseBlock = DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, 0, template->width * template->height, 0); + allocatedBaseBlock = BgTileAllocOp(bgLayer, 0, template->width * template->height, 0); if (allocatedBaseBlock == -1) return WINDOW_NONE; @@ -211,10 +211,10 @@ int AddWindowWithoutTileMap(const struct WindowTemplate *template) gWindows[win].window = *template; - if (gUnneededFireRedVariable == 1) + if (gWindowTileAutoAllocEnabled == TRUE) { gWindows[win].window.baseBlock = allocatedBaseBlock; - DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, allocatedBaseBlock, gWindows[win].window.width * gWindows[win].window.height, 1); + BgTileAllocOp(bgLayer, allocatedBaseBlock, gWindows[win].window.width * gWindows[win].window.height, 1); } return win; @@ -224,10 +224,8 @@ void RemoveWindow(u8 windowId) { u8 bgLayer = gWindows[windowId].window.bg; - if (gUnneededFireRedVariable == 1) - { - DummiedOutFireRedLeafGreenTileAllocFunc(bgLayer, gWindows[windowId].window.baseBlock, gWindows[windowId].window.width * gWindows[windowId].window.height, 2); - } + if (gWindowTileAutoAllocEnabled == TRUE) + BgTileAllocOp(bgLayer, gWindows[windowId].window.baseBlock, gWindows[windowId].window.width * gWindows[windowId].window.height, 2); gWindows[windowId].window = sDummyWindowTemplate; diff --git a/include/battle_arena.h b/include/battle_arena.h index c3bdd4ea79..b55fc39b00 100644 --- a/include/battle_arena.h +++ b/include/battle_arena.h @@ -9,6 +9,6 @@ void BattleArena_AddSkillPoints(u8 battler); void BattleArena_DeductMindPoints(u8 battler, u16 stringId); void sub_81A586C(u8 battler); void DrawArenaRefereeTextBox(void); -void RemoveArenaRefereeTextBox(void); +void EraseArenaRefereeTextBox(void); #endif //GUARD_BATTLE_ARENA_H diff --git a/include/battle_gfx_sfx_util.h b/include/battle_gfx_sfx_util.h index 3288204d12..a367bc043a 100644 --- a/include/battle_gfx_sfx_util.h +++ b/include/battle_gfx_sfx_util.h @@ -39,7 +39,7 @@ void LoadAndCreateEnemyShadowSprites(void); void SpriteCB_SetInvisible(struct Sprite *sprite); void SetBattlerShadowSpriteCallback(u8 battlerId, u16 species); void HideBattlerShadowSprite(u8 battlerId); -void sub_805EF14(void); +void FillAroundBattleWindows(void); void ClearTemporarySpeciesSpriteData(u8 battlerId, bool8 dontClearSubstitute); void AllocateMonSpritesGfx(void); void FreeMonSpritesGfx(void); diff --git a/include/battle_util2.h b/include/battle_util2.h index fe767ea4bf..51c9c03630 100644 --- a/include/battle_util2.h +++ b/include/battle_util2.h @@ -5,6 +5,6 @@ void AllocateBattleResources(void); void FreeBattleResources(void); void AdjustFriendshipOnBattleFaint(u8 battler); void SwitchPartyOrderInGameMulti(u8 battler, u8 arg1); -u32 sub_805725C(u8 battler); +u32 BattlePalace_TryEscapeStatus(u8 battler); #endif // GUARD_BATTLE_UTIL_H diff --git a/include/constants/battle.h b/include/constants/battle.h index 3dbd832559..a848146eb0 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -161,8 +161,8 @@ #define STATUS3_SEMI_INVULNERABLE (STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER) // Not really sure what a "hitmarker" is. -#define HITMARKER_x10 (1 << 4) -#define HITMARKER_x20 (1 << 5) +#define HITMARKER_WAKE_UP_CLEAR (1 << 4) // Cleared when waking up. Never set or checked. +#define HITMARKER_SKIP_DMG_TRACK (1 << 5) #define HITMARKER_DESTINYBOND (1 << 6) #define HITMARKER_NO_ANIMATIONS (1 << 7) #define HITMARKER_IGNORE_SUBSTITUTE (1 << 8) @@ -177,13 +177,13 @@ #define HITMARKER_IGNORE_UNDERGROUND (1 << 17) #define HITMARKER_IGNORE_UNDERWATER (1 << 18) #define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19) -#define HITMARKER_x100000 (1 << 20) -#define HITMARKER_x200000 (1 << 21) -#define HITMARKER_x400000 (1 << 22) -#define HITMARKER_x800000 (1 << 23) +#define HITMARKER_PASSIVE_DAMAGE (1 << 20) +#define HITMARKER_DISOBEDIENT_MOVE (1 << 21) +#define HITMARKER_PLAYER_FAINTED (1 << 22) +#define HITMARKER_ALLOW_NO_PP (1 << 23) #define HITMARKER_GRUDGE (1 << 24) #define HITMARKER_OBEYS (1 << 25) -#define HITMARKER_x4000000 (1 << 26) +#define HITMARKER_NEVER_SET (1 << 26) // Cleared as part of a large group. Never set or checked #define HITMARKER_CHARGING (1 << 27) #define HITMARKER_FAINTED(battler) (gBitTable[battler] << 28) #define HITMARKER_FAINTED2(battler) ((1 << 28) << battler) diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 9794589af2..d5e3eb7bbf 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -72,12 +72,15 @@ #define VARIOUS_GET_BATTLER_FAINTED 4 #define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5 #define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6 +#define VARIOUS_RESET_PLAYER_FAINTED 7 #define VARIOUS_PALACE_FLAVOR_TEXT 8 #define VARIOUS_ARENA_JUDGMENT_WINDOW 9 #define VARIOUS_ARENA_OPPONENT_MON_LOST 10 #define VARIOUS_ARENA_PLAYER_MON_LOST 11 #define VARIOUS_ARENA_BOTH_MONS_LOST 12 #define VARIOUS_EMIT_YESNOBOX 13 +#define VARIOUS_DRAW_ARENA_REF_TEXT_BOX 14 +#define VARIOUS_ERASE_ARENA_REF_TEXT_BOX 15 #define VARIOUS_ARENA_JUDGMENT_STRING 16 #define VARIOUS_ARENA_WAIT_STRING 17 #define VARIOUS_WAIT_CRY 18 @@ -86,6 +89,7 @@ #define VARIOUS_VOLUME_DOWN 21 #define VARIOUS_VOLUME_UP 22 #define VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT 23 +#define VARIOUS_PALACE_TRY_ESCAPE_STATUS 24 #define VARIOUS_SET_TELEPORT_OUTCOME 25 #define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26 diff --git a/include/pokedex_area_region_map.h b/include/pokedex_area_region_map.h index 175f60c743..6526d7b458 100755 --- a/include/pokedex_area_region_map.h +++ b/include/pokedex_area_region_map.h @@ -10,7 +10,7 @@ struct PokedexAreaMapTemplate }; void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *); -bool32 sub_81C4E90(void); +bool32 TryShowPokedexAreaMap(void); void PokedexAreaMapChangeBgY(u32); void FreePokedexAreaMapBgNum(void); diff --git a/src/battle_anim_dark.c b/src/battle_anim_dark.c index fdde347699..fe8b181052 100644 --- a/src/battle_anim_dark.c +++ b/src/battle_anim_dark.c @@ -784,7 +784,7 @@ void AnimTask_InitMementoShadow(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8114470(u8 taskId) +void AnimTask_MementoHandleBg(u8 taskId) { u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0; ResetBattleAnimBg(toBG2); diff --git a/src/battle_anim_normal.c b/src/battle_anim_normal.c index 15a1452e4d..d79f344edf 100644 --- a/src/battle_anim_normal.c +++ b/src/battle_anim_normal.c @@ -733,50 +733,67 @@ void AnimTask_InvertScreenColor(u8 taskId) DestroyAnimVisualTask(taskId); } -void UnusedAnimTask_8115F94(u8 taskId) +// Unused +#define tTimer data[0] +#define tLength data[1] +#define tFlagsScenery data[2] +#define tFlagsAttacker data[3] +#define tFlagsTarget data[4] +#define tColorR data[5] +#define tColorG data[6] +#define tColorB data[7] +void AnimTask_TintPalettes(u8 taskId) { u8 attackerBattler; u8 targetBattler; u8 paletteIndex; u32 selectedPalettes = 0; - if (gTasks[taskId].data[0] == 0) + if (gTasks[taskId].tTimer == 0) { - gTasks[taskId].data[2] = gBattleAnimArgs[0]; - gTasks[taskId].data[3] = gBattleAnimArgs[1]; - gTasks[taskId].data[4] = gBattleAnimArgs[2]; - gTasks[taskId].data[1] = gBattleAnimArgs[3]; - gTasks[taskId].data[5] = gBattleAnimArgs[4]; - gTasks[taskId].data[6] = gBattleAnimArgs[5]; - gTasks[taskId].data[7] = gBattleAnimArgs[6]; + gTasks[taskId].tFlagsScenery = gBattleAnimArgs[0]; + gTasks[taskId].tFlagsAttacker = gBattleAnimArgs[1]; + gTasks[taskId].tFlagsTarget = gBattleAnimArgs[2]; + gTasks[taskId].tLength = gBattleAnimArgs[3]; + gTasks[taskId].tColorR = gBattleAnimArgs[4]; + gTasks[taskId].tColorG = gBattleAnimArgs[5]; + gTasks[taskId].tColorB = gBattleAnimArgs[6]; } - gTasks[taskId].data[0]++; + gTasks[taskId].tTimer++; attackerBattler = gBattleAnimAttacker; targetBattler = gBattleAnimTarget; - if (gTasks[taskId].data[2] & 0x100) - selectedPalettes = 0x0000FFFF; + if (gTasks[taskId].tFlagsScenery & (1 << 8)) + selectedPalettes = PALETTES_BG; - if (gTasks[taskId].data[2] & 0x1) + if (gTasks[taskId].tFlagsScenery & 1) { paletteIndex = IndexOfSpritePaletteTag(gSprites[gHealthboxSpriteIds[attackerBattler]].template->paletteTag); selectedPalettes |= (1 << paletteIndex) << 16; } - if (gTasks[taskId].data[3] & 0x100) + if (gTasks[taskId].tFlagsAttacker & (1 << 8)) selectedPalettes |= (1 << attackerBattler) << 16; - if (gTasks[taskId].data[4] & 0x100) + if (gTasks[taskId].tFlagsTarget & (1 << 8)) selectedPalettes |= (1 << targetBattler) << 16; - TintPlttBuffer(selectedPalettes, gTasks[taskId].data[5], gTasks[taskId].data[6], gTasks[taskId].data[7]); - if (gTasks[taskId].data[0] == gTasks[taskId].data[1]) + TintPlttBuffer(selectedPalettes, gTasks[taskId].tColorR, gTasks[taskId].tColorG, gTasks[taskId].tColorB); + if (gTasks[taskId].tTimer == gTasks[taskId].tLength) { UnfadePlttBuffer(selectedPalettes); DestroyAnimVisualTask(taskId); } } +#undef tTimer +#undef tLength +#undef tFlagsScenery +#undef tFlagsAttacker +#undef tFlagsTarget +#undef tColorR +#undef tColorG +#undef tColorB static void AnimShakeMonOrBattleTerrain(struct Sprite *sprite) { diff --git a/src/battle_arena.c b/src/battle_arena.c index 11c918225a..e216e72d31 100644 --- a/src/battle_arena.c +++ b/src/battle_arena.c @@ -917,7 +917,7 @@ void DrawArenaRefereeTextBox(void) FillBgTilemapBufferRect(0, 0x836, 29, 19, 1, 1, palNum); } -void RemoveArenaRefereeTextBox(void) +void EraseArenaRefereeTextBox(void) { u8 width; u8 height; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 184d630b5a..77755775e3 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -1213,7 +1213,8 @@ void HideBattlerShadowSprite(u8 battlerId) gSprites[gBattleSpritesDataPtr->healthBoxesData[battlerId].shadowSpriteId].callback = SpriteCB_SetInvisible; } -void sub_805EF14(void) +// Color the background tiles surrounding the action selection and move windows +void FillAroundBattleWindows(void) { u16 *vramPtr = (u16*)(VRAM + 0x240); s32 i; diff --git a/src/battle_main.c b/src/battle_main.c index 19505b385f..f4e1c4d3de 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -961,7 +961,7 @@ static void CB2_HandleStartBattle(void) ShowBg(1); ShowBg(2); ShowBg(3); - sub_805EF14(); + FillAroundBattleWindows(); gBattleCommunication[MULTIUSE_STATE] = 1; } if (gWirelessCommType) @@ -1157,7 +1157,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) ShowBg(1); ShowBg(2); ShowBg(3); - sub_805EF14(); + FillAroundBattleWindows(); gBattleCommunication[MULTIUSE_STATE] = 1; } if (gWirelessCommType) @@ -1558,7 +1558,7 @@ static void CB2_HandleStartMultiBattle(void) ShowBg(1); ShowBg(2); ShowBg(3); - sub_805EF14(); + FillAroundBattleWindows(); gBattleCommunication[MULTIUSE_STATE] = 1; } if (gWirelessCommType) @@ -2150,7 +2150,7 @@ void CB2_InitEndLinkBattle(void) SetHBlankCallback(NULL); SetVBlankCallback(NULL); - gBattleTypeFlags &= ~(BATTLE_TYPE_LINK_IN_BATTLE); + gBattleTypeFlags &= ~BATTLE_TYPE_LINK_IN_BATTLE; if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) { @@ -3116,7 +3116,7 @@ void SwitchInClearSetData(void) && (gStatuses3[i] & STATUS3_ALWAYS_HITS) != 0 && (gDisableStructs[i].battlerWithSureHit == gActiveBattler)) { - gStatuses3[i] &= ~(STATUS3_ALWAYS_HITS); + gStatuses3[i] &= ~STATUS3_ALWAYS_HITS; gStatuses3[i] |= STATUS3_ALWAYS_HITS_TURN(2); } } @@ -3130,9 +3130,9 @@ void SwitchInClearSetData(void) for (i = 0; i < gBattlersCount; i++) { if (gBattleMons[i].status2 & STATUS2_INFATUATED_WITH(gActiveBattler)) - gBattleMons[i].status2 &= ~(STATUS2_INFATUATED_WITH(gActiveBattler)); + gBattleMons[i].status2 &= ~STATUS2_INFATUATED_WITH(gActiveBattler); if ((gBattleMons[i].status2 & STATUS2_WRAPPED) && *(gBattleStruct->wrappedBy + i) == gActiveBattler) - gBattleMons[i].status2 &= ~(STATUS2_WRAPPED); + gBattleMons[i].status2 &= ~STATUS2_WRAPPED; } gActionSelectionCursor[gActiveBattler] = 0; @@ -3212,9 +3212,9 @@ void FaintClearSetData(void) if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].battlerPreventingEscape == gActiveBattler) gBattleMons[i].status2 &= ~STATUS2_ESCAPE_PREVENTION; if (gBattleMons[i].status2 & STATUS2_INFATUATED_WITH(gActiveBattler)) - gBattleMons[i].status2 &= ~(STATUS2_INFATUATED_WITH(gActiveBattler)); + gBattleMons[i].status2 &= ~STATUS2_INFATUATED_WITH(gActiveBattler); if ((gBattleMons[i].status2 & STATUS2_WRAPPED) && *(gBattleStruct->wrappedBy + i) == gActiveBattler) - gBattleMons[i].status2 &= ~(STATUS2_WRAPPED); + gBattleMons[i].status2 &= ~STATUS2_WRAPPED; } gActionSelectionCursor[gActiveBattler] = 0; @@ -3821,7 +3821,7 @@ static void TryDoEventsBeforeFirstTurn(void) gBattleCommunication[i] = 0; for (i = 0; i < gBattlersCount; i++) - gBattleMons[i].status2 &= ~(STATUS2_FLINCHED); + gBattleMons[i].status2 &= ~STATUS2_FLINCHED; *(&gBattleStruct->turnEffectsTracker) = 0; *(&gBattleStruct->turnEffectsBattlerId) = 0; @@ -3852,7 +3852,7 @@ static void HandleEndTurn_ContinueBattle(void) gBattleCommunication[i] = 0; for (i = 0; i < gBattlersCount; i++) { - gBattleMons[i].status2 &= ~(STATUS2_FLINCHED); + gBattleMons[i].status2 &= ~STATUS2_FLINCHED; if ((gBattleMons[i].status1 & STATUS1_SLEEP) && (gBattleMons[i].status2 & STATUS2_MULTIPLETURNS)) CancelMultiTurnMoves(i); } @@ -3884,10 +3884,10 @@ void BattleTurnPassed(void) return; TurnValuesCleanUp(FALSE); - gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING); - gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE); - gHitMarker &= ~(HITMARKER_x400000); - gHitMarker &= ~(HITMARKER_x100000); + gHitMarker &= ~HITMARKER_NO_ATTACKSTRING; + gHitMarker &= ~HITMARKER_UNABLE_TO_USE_MOVE; + gHitMarker &= ~HITMARKER_PLAYER_FAINTED; + gHitMarker &= ~HITMARKER_PASSIVE_DAMAGE; gBattleScripting.animTurn = 0; gBattleScripting.animTargetsHit = 0; gBattleScripting.moveendState = 0; @@ -4795,12 +4795,12 @@ static void TurnValuesCleanUp(bool8 var0) { gDisableStructs[gActiveBattler].rechargeTimer--; if (gDisableStructs[gActiveBattler].rechargeTimer == 0) - gBattleMons[gActiveBattler].status2 &= ~(STATUS2_RECHARGE); + gBattleMons[gActiveBattler].status2 &= ~STATUS2_RECHARGE; } } if (gDisableStructs[gActiveBattler].substituteHP == 0) - gBattleMons[gActiveBattler].status2 &= ~(STATUS2_SUBSTITUTE); + gBattleMons[gActiveBattler].status2 &= ~STATUS2_SUBSTITUTE; } gSideTimers[0].followmeTimer = 0; @@ -4860,15 +4860,15 @@ static void RunTurnActionsFunctions(void) if (gCurrentTurnActionNumber >= gBattlersCount) // everyone did their actions, turn finished { - gHitMarker &= ~(HITMARKER_x100000); + gHitMarker &= ~HITMARKER_PASSIVE_DAMAGE; gBattleMainFunc = sEndTurnFuncsTable[gBattleOutcome & 0x7F]; } else { if (gBattleStruct->savedTurnActionNumber != gCurrentTurnActionNumber) // action turn has been done, clear hitmarker bits for another battlerId { - gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING); - gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE); + gHitMarker &= ~HITMARKER_NO_ATTACKSTRING; + gHitMarker &= ~HITMARKER_UNABLE_TO_USE_MOVE; } } } @@ -4883,7 +4883,7 @@ static void HandleEndTurn_BattleWon(void) gBattleTextBuff1[0] = gBattleOutcome; gBattlerAttacker = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost; - gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN); + gBattleOutcome &= ~B_OUTCOME_LINK_BATTLE_RAN; } else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_EREADER_TRAINER)) @@ -4942,13 +4942,13 @@ static void HandleEndTurn_BattleLost(void) if (gBattleOutcome & B_OUTCOME_LINK_BATTLE_RAN) { gBattlescriptCurrInstr = BattleScript_PrintPlayerForfeitedLinkBattle; - gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN); + gBattleOutcome &= ~B_OUTCOME_LINK_BATTLE_RAN; gSaveBlock2Ptr->frontier.disableRecordBattle = TRUE; } else { gBattlescriptCurrInstr = BattleScript_FrontierLinkBattleLost; - gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN); + gBattleOutcome &= ~B_OUTCOME_LINK_BATTLE_RAN; } } else @@ -4956,7 +4956,7 @@ static void HandleEndTurn_BattleLost(void) gBattleTextBuff1[0] = gBattleOutcome; gBattlerAttacker = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost; - gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN); + gBattleOutcome &= ~B_OUTCOME_LINK_BATTLE_RAN; } } else diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 2a5b4c112b..e33e317963 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -924,7 +924,7 @@ static void Cmd_attackcanceler(void) return; if (AbilityBattleEffects(ABILITYEFFECT_MOVES_BLOCK, gBattlerTarget, 0, 0, 0)) return; - if (!gBattleMons[gBattlerAttacker].pp[gCurrMovePos] && gCurrentMove != MOVE_STRUGGLE && !(gHitMarker & (HITMARKER_x800000 | HITMARKER_NO_ATTACKSTRING)) + if (!gBattleMons[gBattlerAttacker].pp[gCurrMovePos] && gCurrentMove != MOVE_STRUGGLE && !(gHitMarker & (HITMARKER_ALLOW_NO_PP | HITMARKER_NO_ATTACKSTRING)) && !(gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)) { gBattlescriptCurrInstr = BattleScript_NoPPForMove; @@ -932,7 +932,7 @@ static void Cmd_attackcanceler(void) return; } - gHitMarker &= ~(HITMARKER_x800000); + gHitMarker &= ~HITMARKER_ALLOW_NO_PP; if (!(gHitMarker & HITMARKER_OBEYS) && !(gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)) { @@ -1237,7 +1237,7 @@ static void Cmd_ppreduce(void) } } - gHitMarker &= ~(HITMARKER_NO_PPDEDUCT); + gHitMarker &= ~HITMARKER_NO_PPDEDUCT; gBattlescriptCurrInstr++; } @@ -1869,7 +1869,7 @@ static void Cmd_datahpupdate(void) } else { - gHitMarker &= ~(HITMARKER_IGNORE_SUBSTITUTE); + gHitMarker &= ~HITMARKER_IGNORE_SUBSTITUTE; if (gBattleMoveDamage < 0) // hp goes up { gBattleMons[gActiveBattler].hp -= gBattleMoveDamage; @@ -1879,9 +1879,9 @@ static void Cmd_datahpupdate(void) } else // hp goes down { - if (gHitMarker & HITMARKER_x20) + if (gHitMarker & HITMARKER_SKIP_DMG_TRACK) { - gHitMarker &= ~(HITMARKER_x20); + gHitMarker &= ~HITMARKER_SKIP_DMG_TRACK; } else { @@ -1903,10 +1903,10 @@ static void Cmd_datahpupdate(void) gBattleMons[gActiveBattler].hp = 0; } - if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_x100000)) + if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE)) gSpecialStatuses[gActiveBattler].dmg = gHpDealt; - if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT) + if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE) && gCurrentMove != MOVE_PAIN_SPLIT) { gProtectStructs[gActiveBattler].physicalDmg = gHpDealt; gSpecialStatuses[gActiveBattler].physicalDmg = gHpDealt; @@ -1921,7 +1921,7 @@ static void Cmd_datahpupdate(void) gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerTarget; } } - else if (!IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000)) + else if (!IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE)) { gProtectStructs[gActiveBattler].specialDmg = gHpDealt; gSpecialStatuses[gActiveBattler].specialDmg = gHpDealt; @@ -1937,7 +1937,7 @@ static void Cmd_datahpupdate(void) } } } - gHitMarker &= ~(HITMARKER_x100000); + gHitMarker &= ~HITMARKER_PASSIVE_DAMAGE; BtlController_EmitSetMonData(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBattler].hp); MarkBattlerForControllerExec(gActiveBattler); } @@ -1972,7 +1972,7 @@ static void Cmd_effectivenesssound(void) gActiveBattler = gBattlerTarget; if (!(gMoveResultFlags & MOVE_RESULT_MISSED)) { - switch (gMoveResultFlags & (u8)(~(MOVE_RESULT_MISSED))) + switch (gMoveResultFlags & (u8)(~MOVE_RESULT_MISSED)) { case MOVE_RESULT_SUPER_EFFECTIVE: BtlController_EmitPlaySE(0, SE_SUPER_EFFECTIVE); @@ -2026,7 +2026,7 @@ static void Cmd_resultmessage(void) else { gBattleCommunication[MSG_DISPLAY] = 1; - switch (gMoveResultFlags & (u8)(~(MOVE_RESULT_MISSED))) + switch (gMoveResultFlags & (u8)(~MOVE_RESULT_MISSED)) { case MOVE_RESULT_SUPER_EFFECTIVE: stringId = STRINGID_SUPEREFFECTIVE; @@ -2060,9 +2060,9 @@ static void Cmd_resultmessage(void) } else if (gMoveResultFlags & MOVE_RESULT_ONE_HIT_KO) { - gMoveResultFlags &= ~(MOVE_RESULT_ONE_HIT_KO); - gMoveResultFlags &= ~(MOVE_RESULT_SUPER_EFFECTIVE); - gMoveResultFlags &= ~(MOVE_RESULT_NOT_VERY_EFFECTIVE); + gMoveResultFlags &= ~MOVE_RESULT_ONE_HIT_KO; + gMoveResultFlags &= ~MOVE_RESULT_SUPER_EFFECTIVE; + gMoveResultFlags &= ~MOVE_RESULT_NOT_VERY_EFFECTIVE; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_OneHitKOMsg; return; @@ -2206,7 +2206,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gBattleCommunication[MOVE_EFFECT_BYTE] & MOVE_EFFECT_AFFECTS_USER) { gEffectBattler = gBattlerAttacker; // battlerId that effects get applied on - gBattleCommunication[MOVE_EFFECT_BYTE] &= ~(MOVE_EFFECT_AFFECTS_USER); + gBattleCommunication[MOVE_EFFECT_BYTE] &= ~MOVE_EFFECT_AFFECTS_USER; affectsUser = MOVE_EFFECT_AFFECTS_USER; gBattleScripting.battler = gBattlerTarget; // theoretically the attacker } @@ -2273,7 +2273,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS; - gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + gHitMarker &= ~HITMARKER_IGNORE_SAFEGUARD; } else { @@ -2314,7 +2314,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS; - gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + gHitMarker &= ~HITMARKER_IGNORE_SAFEGUARD; } else { @@ -2370,7 +2370,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS; - gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + gHitMarker &= ~HITMARKER_IGNORE_SAFEGUARD; } else { @@ -2398,7 +2398,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS; - gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + gHitMarker &= ~HITMARKER_IGNORE_SAFEGUARD; } else { @@ -2424,8 +2424,8 @@ void SetMoveEffect(bool8 primary, u8 certain) break; // It's redundant, because at this point we know the status1 value is 0. - gBattleMons[gEffectBattler].status1 &= ~(STATUS1_TOXIC_POISON); - gBattleMons[gEffectBattler].status1 &= ~(STATUS1_POISON); + gBattleMons[gEffectBattler].status1 &= ~STATUS1_TOXIC_POISON; + gBattleMons[gEffectBattler].status1 &= ~STATUS1_POISON; statusChanged = TRUE; break; } @@ -2453,7 +2453,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUSED_BY_ABILITY; - gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + gHitMarker &= ~HITMARKER_IGNORE_SAFEGUARD; } else { @@ -2790,7 +2790,7 @@ void SetMoveEffect(bool8 primary, u8 certain) } else { - gBattleMons[gBattlerTarget].status1 &= ~(STATUS1_PARALYSIS); + gBattleMons[gBattlerTarget].status1 &= ~STATUS1_PARALYSIS; gActiveBattler = gBattlerTarget; BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); @@ -2881,7 +2881,7 @@ static void Cmd_seteffectwithchance(void) if (gBattleCommunication[MOVE_EFFECT_BYTE] & MOVE_EFFECT_CERTAIN && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) { - gBattleCommunication[MOVE_EFFECT_BYTE] &= ~(MOVE_EFFECT_CERTAIN); + gBattleCommunication[MOVE_EFFECT_BYTE] &= ~MOVE_EFFECT_CERTAIN; SetMoveEffect(FALSE, MOVE_EFFECT_CERTAIN); } else if (Random() % 100 < percentChance @@ -2939,7 +2939,7 @@ static void Cmd_tryfaintmon(void) BattleScriptPop(); gBattlescriptCurrInstr = BS_ptr; - gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~(SIDE_STATUS_SPIKES_DAMAGED); + gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~SIDE_STATUS_SPIKES_DAMAGED; } else { @@ -2970,7 +2970,7 @@ static void Cmd_tryfaintmon(void) gBattlescriptCurrInstr = BS_ptr; if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) { - gHitMarker |= HITMARKER_x400000; + gHitMarker |= HITMARKER_PLAYER_FAINTED; if (gBattleResults.playerFaintCounter < 0xFF) gBattleResults.playerFaintCounter++; AdjustFriendshipOnBattleFaint(gActiveBattler); @@ -2983,7 +2983,7 @@ static void Cmd_tryfaintmon(void) } if ((gHitMarker & HITMARKER_DESTINYBOND) && gBattleMons[gBattlerAttacker].hp != 0) { - gHitMarker &= ~(HITMARKER_DESTINYBOND); + gHitMarker &= ~HITMARKER_DESTINYBOND; BattleScriptPush(gBattlescriptCurrInstr); gBattleMoveDamage = gBattleMons[battlerId].hp; gBattlescriptCurrInstr = BattleScript_DestinyBondTakesLife; @@ -3581,8 +3581,8 @@ static void MoveValuesCleanUp(void) gCritMultiplier = 1; gBattleCommunication[MOVE_EFFECT_BYTE] = 0; gBattleCommunication[MISS_TYPE] = 0; - gHitMarker &= ~(HITMARKER_DESTINYBOND); - gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT); + gHitMarker &= ~HITMARKER_DESTINYBOND; + gHitMarker &= ~HITMARKER_SYNCHRONISE_EFFECT; } static void Cmd_movevaluescleanup(void) @@ -4217,7 +4217,7 @@ static void Cmd_moveend(void) && gSpecialStatuses[gBattlerTarget].specialDmg && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && moveType == TYPE_FIRE) { - gBattleMons[gBattlerTarget].status1 &= ~(STATUS1_FREEZE); + gBattleMons[gBattlerTarget].status1 &= ~STATUS1_FREEZE; gActiveBattler = gBattlerTarget; BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBattlerTarget].status1); MarkBattlerForControllerExec(gActiveBattler); @@ -4313,7 +4313,7 @@ static void Cmd_moveend(void) gActiveBattler = gBattlerAttacker; BtlController_EmitSpriteInvisibility(0, FALSE); MarkBattlerForControllerExec(gActiveBattler); - gStatuses3[gBattlerAttacker] &= ~(STATUS3_SEMI_INVULNERABLE); + gStatuses3[gBattlerAttacker] &= ~STATUS3_SEMI_INVULNERABLE; gSpecialStatuses[gBattlerAttacker].restoredBattlerSprite = 1; gBattleScripting.moveendState++; return; @@ -4327,7 +4327,7 @@ static void Cmd_moveend(void) gActiveBattler = gBattlerTarget; BtlController_EmitSpriteInvisibility(0, FALSE); MarkBattlerForControllerExec(gActiveBattler); - gStatuses3[gBattlerTarget] &= ~(STATUS3_SEMI_INVULNERABLE); + gStatuses3[gBattlerTarget] &= ~STATUS3_SEMI_INVULNERABLE; gBattleScripting.moveendState++; return; } @@ -4337,7 +4337,7 @@ static void Cmd_moveend(void) for (i = 0; i < gBattlersCount; i++) { if (gDisableStructs[i].substituteHP == 0) - gBattleMons[i].status2 &= ~(STATUS2_SUBSTITUTE); + gBattleMons[i].status2 &= ~STATUS2_SUBSTITUTE; } gBattleScripting.moveendState++; break; @@ -4347,7 +4347,7 @@ static void Cmd_moveend(void) gActiveBattler = gBattlerAttacker; gBattlerAttacker = gBattlerTarget; gBattlerTarget = gActiveBattler; - gHitMarker &= ~(HITMARKER_SWAP_ATTACKER_TARGET); + gHitMarker &= ~HITMARKER_SWAP_ATTACKER_TARGET; } if (gHitMarker & HITMARKER_ATTACKSTRING_PRINTED) { @@ -4657,7 +4657,7 @@ static void Cmd_jumpifcantswitch(void) s32 lastMonId; struct Pokemon *party; - gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~(SWITCH_IGNORE_ESCAPE_PREVENTION)); + gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~SWITCH_IGNORE_ESCAPE_PREVENTION); if (!(gBattlescriptCurrInstr[1] & SWITCH_IGNORE_ESCAPE_PREVENTION) && ((gBattleMons[gActiveBattler].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION)) @@ -4837,7 +4837,7 @@ static void Cmd_openpartyscreen(void) if (HasNoMonsToSwitch(gActiveBattler, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); BtlController_EmitLinkStandbyMsg(0, 2, FALSE); MarkBattlerForControllerExec(gActiveBattler); } @@ -4866,7 +4866,7 @@ static void Cmd_openpartyscreen(void) if (HasNoMonsToSwitch(0, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); BtlController_EmitCantSwitch(0); MarkBattlerForControllerExec(gActiveBattler); } @@ -4888,7 +4888,7 @@ static void Cmd_openpartyscreen(void) if (HasNoMonsToSwitch(2, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); BtlController_EmitCantSwitch(0); MarkBattlerForControllerExec(gActiveBattler); } @@ -4909,7 +4909,7 @@ static void Cmd_openpartyscreen(void) if (HasNoMonsToSwitch(1, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); BtlController_EmitCantSwitch(0); MarkBattlerForControllerExec(gActiveBattler); } @@ -4931,7 +4931,7 @@ static void Cmd_openpartyscreen(void) if (HasNoMonsToSwitch(3, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); BtlController_EmitCantSwitch(0); MarkBattlerForControllerExec(gActiveBattler); } @@ -4994,7 +4994,7 @@ static void Cmd_openpartyscreen(void) if (HasNoMonsToSwitch(2, gBattleBufferB[0][1], PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); BtlController_EmitCantSwitch(0); MarkBattlerForControllerExec(gActiveBattler); } @@ -5010,7 +5010,7 @@ static void Cmd_openpartyscreen(void) if (HasNoMonsToSwitch(3, gBattleBufferB[1][1], PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); BtlController_EmitCantSwitch(0); MarkBattlerForControllerExec(gActiveBattler); } @@ -5049,7 +5049,7 @@ static void Cmd_openpartyscreen(void) else hitmarkerFaintBits = PARTY_ACTION_SEND_OUT; - battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~(PARTY_SCREEN_OPTIONAL)); + battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~PARTY_SCREEN_OPTIONAL); if (gSpecialStatuses[battlerId].flag40) { gBattlescriptCurrInstr += 6; @@ -5058,7 +5058,7 @@ static void Cmd_openpartyscreen(void) { gActiveBattler = battlerId; gAbsentBattlerFlags |= gBitTable[gActiveBattler]; - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); gBattlescriptCurrInstr = jumpPtr; } else @@ -5174,7 +5174,7 @@ static void Cmd_switchineffects(void) gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); UpdateSentPokesToOpponentValue(gActiveBattler); - gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); + gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); gSpecialStatuses[gActiveBattler].flag40 = 0; if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES_DAMAGED) @@ -5186,8 +5186,8 @@ static void Cmd_switchineffects(void) gSideStatuses[GetBattlerSide(gActiveBattler)] |= SIDE_STATUS_SPIKES_DAMAGED; - gBattleMons[gActiveBattler].status2 &= ~(STATUS2_DESTINY_BOND); - gHitMarker &= ~(HITMARKER_DESTINYBOND); + gBattleMons[gActiveBattler].status2 &= ~STATUS2_DESTINY_BOND; + gHitMarker &= ~HITMARKER_DESTINYBOND; spikesDmg = (5 - gSideTimers[GetBattlerSide(gActiveBattler)].spikesAmount) * 2; gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / (spikesDmg); @@ -5216,7 +5216,7 @@ static void Cmd_switchineffects(void) if (!AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gActiveBattler, 0, 0, 0) && !ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gActiveBattler, FALSE)) { - gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~(SIDE_STATUS_SPIKES_DAMAGED); + gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~SIDE_STATUS_SPIKES_DAMAGED; for (i = 0; i < gBattlersCount; i++) { @@ -5632,7 +5632,7 @@ static void Cmd_swapattackerwithtarget(void) gBattlerTarget = gActiveBattler; if (gHitMarker & HITMARKER_SWAP_ATTACKER_TARGET) - gHitMarker &= ~(HITMARKER_SWAP_ATTACKER_TARGET); + gHitMarker &= ~HITMARKER_SWAP_ATTACKER_TARGET; else gHitMarker |= HITMARKER_SWAP_ATTACKER_TARGET; @@ -6315,13 +6315,13 @@ static void Cmd_various(void) *choicedMove = 0; } break; - case 7: + case VARIOUS_RESET_PLAYER_FAINTED: if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_DOUBLE)) && gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattleMons[0].hp != 0 && gBattleMons[1].hp != 0) { - gHitMarker &= ~(HITMARKER_x400000); + gHitMarker &= ~HITMARKER_PLAYER_FAINTED; } break; case VARIOUS_PALACE_FLAVOR_TEXT: @@ -6355,7 +6355,7 @@ static void Cmd_various(void) case VARIOUS_ARENA_PLAYER_MON_LOST: gBattleMons[0].hp = 0; gHitMarker |= HITMARKER_FAINTED(0); - gHitMarker |= HITMARKER_x400000; + gHitMarker |= HITMARKER_PLAYER_FAINTED; gBattleStruct->arenaLostPlayerMons |= gBitTable[gBattlerPartyIndexes[0]]; gDisableStructs[0].truantSwitchInHack = 1; break; @@ -6364,7 +6364,7 @@ static void Cmd_various(void) gBattleMons[1].hp = 0; gHitMarker |= HITMARKER_FAINTED(0); gHitMarker |= HITMARKER_FAINTED(1); - gHitMarker |= HITMARKER_x400000; + gHitMarker |= HITMARKER_PLAYER_FAINTED; gBattleStruct->arenaLostPlayerMons |= gBitTable[gBattlerPartyIndexes[0]]; gBattleStruct->arenaLostOpponentMons |= gBitTable[gBattlerPartyIndexes[1]]; gDisableStructs[0].truantSwitchInHack = 1; @@ -6374,11 +6374,11 @@ static void Cmd_various(void) BtlController_EmitYesNoBox(0); MarkBattlerForControllerExec(gActiveBattler); break; - case 14: + case VARIOUS_DRAW_ARENA_REF_TEXT_BOX: DrawArenaRefereeTextBox(); break; - case 15: - RemoveArenaRefereeTextBox(); + case VARIOUS_ERASE_ARENA_REF_TEXT_BOX: + EraseArenaRefereeTextBox(); break; case VARIOUS_ARENA_JUDGMENT_STRING: BattleStringExpandPlaceholdersToDisplayedString(gRefereeStringsTable[gBattlescriptCurrInstr[1]]); @@ -6420,8 +6420,8 @@ static void Cmd_various(void) case VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT: gBattleStruct->alreadyStatusedMoveAttempt |= gBitTable[gActiveBattler]; break; - case 24: - if (sub_805725C(gActiveBattler)) + case VARIOUS_PALACE_TRY_ESCAPE_STATUS: + if (BattlePalace_TryEscapeStatus(gActiveBattler)) return; break; case VARIOUS_SET_TELEPORT_OUTCOME: @@ -6595,14 +6595,14 @@ static void Cmd_trymirrormove(void) if (move != 0 && move != 0xFFFF) { - gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gCurrentMove = move; gBattlerTarget = GetMoveTarget(gCurrentMove, 0); gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; } else if (validMovesCount) { - gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; i = Random() % validMovesCount; gCurrentMove = movesArray[i]; gBattlerTarget = GetMoveTarget(gCurrentMove, 0); @@ -6882,15 +6882,15 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr) else gActiveBattler = gBattlerTarget; - flags &= ~(MOVE_EFFECT_AFFECTS_USER); + flags &= ~MOVE_EFFECT_AFFECTS_USER; if (flags & MOVE_EFFECT_CERTAIN) certain++; - flags &= ~(MOVE_EFFECT_CERTAIN); + flags &= ~MOVE_EFFECT_CERTAIN; if (flags & STAT_BUFF_NOT_PROTECT_AFFECTED) notProtectAffected++; - flags &= ~(STAT_BUFF_NOT_PROTECT_AFFECTED); + flags &= ~STAT_BUFF_NOT_PROTECT_AFFECTED; PREPARE_STAT_BUFFER(gBattleTextBuff1, statId) @@ -7719,7 +7719,7 @@ static void Cmd_setsubstitute(void) gBattleMoveDamage = 1; gBattleMons[gBattlerAttacker].status2 |= STATUS2_SUBSTITUTE; - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_WRAPPED); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_WRAPPED; gDisableStructs[gBattlerAttacker].substituteHP = gBattleMoveDamage; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_SUBSTITUTE; gHitMarker |= HITMARKER_IGNORE_SUBSTITUTE; @@ -7803,7 +7803,7 @@ static void Cmd_metronome(void) if (sMovesForbiddenToCopy[i] == METRONOME_FORBIDDEN_END) { - gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; gBattlerTarget = GetMoveTarget(gCurrentMove, 0); return; @@ -8019,7 +8019,7 @@ static void Cmd_settypetorandomresistance(void) // conversion 2 static void Cmd_setalwayshitflag(void) { - gStatuses3[gBattlerTarget] &= ~(STATUS3_ALWAYS_HITS); + gStatuses3[gBattlerTarget] &= ~STATUS3_ALWAYS_HITS; gStatuses3[gBattlerTarget] |= STATUS3_ALWAYS_HITS_TURN(2); gDisableStructs[gBattlerTarget].battlerWithSureHit = gBattlerAttacker; gBattlescriptCurrInstr++; @@ -8137,7 +8137,7 @@ static void Cmd_trychoosesleeptalkmove(void) } - unusableMovesBits = CheckMoveLimitations(gBattlerAttacker, unusableMovesBits, ~(MOVE_LIMITATION_PP)); + unusableMovesBits = CheckMoveLimitations(gBattlerAttacker, unusableMovesBits, ~MOVE_LIMITATION_PP); if (unusableMovesBits == 0xF) // all 4 moves cannot be chosen { gBattlescriptCurrInstr += 5; @@ -8153,7 +8153,7 @@ static void Cmd_trychoosesleeptalkmove(void) gCalledMove = gBattleMons[gBattlerAttacker].moves[movePosition]; gCurrMovePos = movePosition; - gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gBattlerTarget = GetMoveTarget(gCalledMove, 0); gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); } @@ -8269,7 +8269,7 @@ static void Cmd_healpartystatus(void) if (gBattleMons[gBattlerAttacker].ability != ABILITY_SOUNDPROOF) { gBattleMons[gBattlerAttacker].status1 = 0; - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; } else { @@ -8285,7 +8285,7 @@ static void Cmd_healpartystatus(void) if (gBattleMons[gActiveBattler].ability != ABILITY_SOUNDPROOF) { gBattleMons[gActiveBattler].status1 = 0; - gBattleMons[gActiveBattler].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[gActiveBattler].status2 &= ~STATUS2_NIGHTMARE; } else { @@ -8325,14 +8325,14 @@ static void Cmd_healpartystatus(void) toHeal = 0x3F; gBattleMons[gBattlerAttacker].status1 = 0; - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK); if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && !(gAbsentBattlerFlags & gBitTable[gActiveBattler])) { gBattleMons[gActiveBattler].status1 = 0; - gBattleMons[gActiveBattler].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[gActiveBattler].status2 &= ~STATUS2_NIGHTMARE; } } @@ -8435,7 +8435,7 @@ static void Cmd_rolloutdamagecalculation(void) } if (--gDisableStructs[gBattlerAttacker].rolloutTimer == 0) // last hit { - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_MULTIPLETURNS); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_MULTIPLETURNS; } gDynamicBasePower = gBattleMoves[gCurrentMove].power; @@ -8515,7 +8515,7 @@ static void Cmd_presentdamagecalculation(void) gBattlescriptCurrInstr = BattleScript_AlreadyAtFullHp; else { - gMoveResultFlags &= ~(MOVE_RESULT_DOESNT_AFFECT_FOE); + gMoveResultFlags &= ~MOVE_RESULT_DOESNT_AFFECT_FOE; gBattlescriptCurrInstr = BattleScript_PresentHealTarget; } } @@ -8628,7 +8628,7 @@ static void Cmd_jumpifnopursuitswitchdmg(void) gCurrMovePos = gChosenMovePos = *(gBattleStruct->chosenMovePositions + gBattlerTarget); gBattlescriptCurrInstr += 5; gBattleScripting.animTurn = 1; - gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; } else { @@ -8693,7 +8693,7 @@ static void Cmd_rapidspinfree(void) if (gBattleMons[gBattlerAttacker].status2 & STATUS2_WRAPPED) { gBattleScripting.battler = gBattlerTarget; - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_WRAPPED); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_WRAPPED; gBattlerTarget = *(gBattleStruct->wrappedBy + gBattlerAttacker); gBattleTextBuff1[0] = B_BUFF_PLACEHOLDER_BEGIN; @@ -8707,14 +8707,14 @@ static void Cmd_rapidspinfree(void) } else if (gStatuses3[gBattlerAttacker] & STATUS3_LEECHSEED) { - gStatuses3[gBattlerAttacker] &= ~(STATUS3_LEECHSEED); - gStatuses3[gBattlerAttacker] &= ~(STATUS3_LEECHSEED_BATTLER); + gStatuses3[gBattlerAttacker] &= ~STATUS3_LEECHSEED; + gStatuses3[gBattlerAttacker] &= ~STATUS3_LEECHSEED_BATTLER; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_LeechSeedFree; } else if (gSideStatuses[GetBattlerSide(gBattlerAttacker)] & SIDE_STATUS_SPIKES) { - gSideStatuses[GetBattlerSide(gBattlerAttacker)] &= ~(SIDE_STATUS_SPIKES); + gSideStatuses[GetBattlerSide(gBattlerAttacker)] &= ~SIDE_STATUS_SPIKES; gSideTimers[GetBattlerSide(gBattlerAttacker)].spikesAmount = 0; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SpikesFree; @@ -8970,7 +8970,7 @@ static void Cmd_setcharge(void) static void Cmd_callterrainattack(void) // nature power { - gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gCurrentMove = sNaturePowerMoves[gBattleTerrain]; gBattlerTarget = GetMoveTarget(gCurrentMove, 0); BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); @@ -9380,7 +9380,7 @@ static void Cmd_assistattackselect(void) } if (chooseableMovesNo) { - gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gCalledMove = movesArray[((Random() & 0xFF) * chooseableMovesNo) >> 8]; gBattlerTarget = GetMoveTarget(gCalledMove, 0); gBattlescriptCurrInstr += 5; @@ -9736,8 +9736,8 @@ static void Cmd_removelightscreenreflect(void) // brick break if (gSideTimers[opposingSide].reflectTimer || gSideTimers[opposingSide].lightscreenTimer) { - gSideStatuses[opposingSide] &= ~(SIDE_STATUS_REFLECT); - gSideStatuses[opposingSide] &= ~(SIDE_STATUS_LIGHTSCREEN); + gSideStatuses[opposingSide] &= ~SIDE_STATUS_REFLECT; + gSideStatuses[opposingSide] &= ~SIDE_STATUS_LIGHTSCREEN; gSideTimers[opposingSide].reflectTimer = 0; gSideTimers[opposingSide].lightscreenTimer = 0; gBattleScripting.animTurn = 1; diff --git a/src/battle_util.c b/src/battle_util.c index 9af4564491..62f7897c67 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -646,9 +646,9 @@ void HandleAction_NothingIsFainted(void) gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber]; gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_IGNORE_ON_AIR - | HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_x100000 - | HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT - | HITMARKER_CHARGING | HITMARKER_x4000000); + | HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_PASSIVE_DAMAGE + | HITMARKER_OBEYS | HITMARKER_WAKE_UP_CLEAR | HITMARKER_SYNCHRONISE_EFFECT + | HITMARKER_CHARGING | HITMARKER_NEVER_SET); } void HandleAction_ActionFinished(void) @@ -659,9 +659,9 @@ void HandleAction_ActionFinished(void) SpecialStatusesClear(); gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_IGNORE_ON_AIR - | HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_x100000 - | HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT - | HITMARKER_CHARGING | HITMARKER_x4000000); + | HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_PASSIVE_DAMAGE + | HITMARKER_OBEYS | HITMARKER_WAKE_UP_CLEAR | HITMARKER_SYNCHRONISE_EFFECT + | HITMARKER_CHARGING | HITMARKER_NEVER_SET); gCurrentMove = 0; gBattleMoveDamage = 0; @@ -1443,7 +1443,7 @@ u8 DoBattlerEndTurnEffects(void) { u8 effect = 0; - gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20); + gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_SKIP_DMG_TRACK); while (gBattleStruct->turnEffectsBattlerId < gBattlersCount && gBattleStruct->turnEffectsTracker <= ENDTURN_BATTLER_COUNT) { gActiveBattler = gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->turnEffectsBattlerId]; @@ -1756,13 +1756,13 @@ u8 DoBattlerEndTurnEffects(void) return effect; } } - gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_x20); + gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_SKIP_DMG_TRACK); return 0; } bool8 HandleWishPerishSongOnTurnEnd(void) { - gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20); + gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_SKIP_DMG_TRACK); switch (gBattleStruct->wishPerishSongState) { @@ -1862,7 +1862,7 @@ bool8 HandleWishPerishSongOnTurnEnd(void) break; } - gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_x20); + gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_SKIP_DMG_TRACK); return FALSE; } @@ -4067,7 +4067,7 @@ u8 IsMonDisobedient(void) gCalledMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; gBattlescriptCurrInstr = BattleScript_IgnoresAndUsesRandomMove; gBattlerTarget = GetMoveTarget(gCalledMove, 0); - gHitMarker |= HITMARKER_x200000; + gHitMarker |= HITMARKER_DISOBEDIENT_MOVE; return 2; } } diff --git a/src/battle_util2.c b/src/battle_util2.c index def7302d38..3838f22bba 100644 --- a/src/battle_util2.c +++ b/src/battle_util2.c @@ -121,7 +121,9 @@ void SwitchPartyOrderInGameMulti(u8 battlerId, u8 arg1) } } -u32 sub_805725C(u8 battlerId) +// Called when a Pokémon is unable to attack during a Battle Palace battle. +// Check if it was because they are frozen/asleep, and if so try to cure the status. +u32 BattlePalace_TryEscapeStatus(u8 battlerId) { u32 effect = 0; @@ -134,6 +136,7 @@ u32 sub_805725C(u8 battlerId) { if (UproarWakeUpCheck(battlerId)) { + // Wake up from Uproar gBattleMons[battlerId].status1 &= ~(STATUS1_SLEEP); gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE); BattleScriptPushCursor(); @@ -150,6 +153,7 @@ u32 sub_805725C(u8 battlerId) else toSub = 1; + // Reduce number of sleep turns if ((gBattleMons[battlerId].status1 & STATUS1_SLEEP) < toSub) gBattleMons[battlerId].status1 &= ~(STATUS1_SLEEP); else @@ -157,11 +161,13 @@ u32 sub_805725C(u8 battlerId) if (gBattleMons[battlerId].status1 & STATUS1_SLEEP) { + // Still asleep gBattlescriptCurrInstr = BattleScript_MoveUsedIsAsleep; effect = 2; } else { + // Wake up gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE); BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP; @@ -177,10 +183,12 @@ u32 sub_805725C(u8 battlerId) { if (Random() % 5 != 0) { + // Still frozen gBattlescriptCurrInstr = BattleScript_MoveUsedIsFrozen; } else { + // Unfreeze gBattleMons[battlerId].status1 &= ~(STATUS1_FREEZE); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; @@ -193,7 +201,7 @@ u32 sub_805725C(u8 battlerId) case 2: break; } - + // Loop until reaching the final state, or stop early if Pokémon was Asleep/Frozen } while (gBattleCommunication[MULTIUSE_STATE] != 2 && effect == 0); if (effect == 2) diff --git a/src/contest.c b/src/contest.c index 886f2b95dc..68cad859d9 100644 --- a/src/contest.c +++ b/src/contest.c @@ -75,7 +75,7 @@ static void Task_FinishRoundOfAppeals(u8); static void Task_ReadyUpdateHeartSliders(u8); static void Task_UpdateHeartSliders(u8); static void Task_WaitForHeartSliders(u8); -static void sub_80DA348(u8); +static void Task_RestorePlttBufferUnfaded(u8); static void Task_WaitPrintRoundResult(u8); static void Task_PrintRoundResultText(u8); static void Task_ReUpdateHeartSliders(u8); @@ -2553,10 +2553,10 @@ static void Task_UpdateHeartSliders(u8 taskId) static void Task_WaitForHeartSliders(u8 taskId) { if (SlidersDoneUpdating()) - gTasks[taskId].func = sub_80DA348; + gTasks[taskId].func = Task_RestorePlttBufferUnfaded; } -static void sub_80DA348(u8 taskId) +static void Task_RestorePlttBufferUnfaded(u8 taskId) { DmaCopy32Defvars(3, eContestTempSave.cachedPlttBufferUnfaded, gPlttBufferUnfaded, PLTT_BUFFER_SIZE * 2); gTasks[taskId].data[0] = 0; diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index e9d6b6070e..0e85e37f23 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -978,7 +978,7 @@ static void Task_HofPC_PrintMonInfo(u8 taskId) currMonID = gTasks[taskId].tMonSpriteId(gTasks[taskId].tCurrMonId); gSprites[currMonID].oam.priority = 0; - sHofFadePalettes = (0x10000 << gSprites[currMonID].oam.paletteNum) ^ 0xFFFF0000; + sHofFadePalettes = (0x10000 << gSprites[currMonID].oam.paletteNum) ^ PALETTES_OBJECTS; BlendPalettesUnfaded(sHofFadePalettes, 0xC, RGB(16, 29, 24)); currMon = &savedTeams->mon[gTasks[taskId].tCurrMonId]; diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index 8bcf506fbf..1751fd59d9 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -562,23 +562,31 @@ void UpdateItemMenuSwapLinePos(u8 y) UpdateSwapLineSpritesPos(&gBagMenu->spriteIds[ITEMMENUSPRITE_SWAP_LINE], ITEMMENU_SWAP_LINE_LENGTH | SWAP_LINE_HAS_MARGIN, 120, (y + 1) * 16); } -static void sub_80D5018(void *mem0, void *mem1) +static void ArrangeBerryGfx(void *src, void *dest) { u8 i, j; - memset(mem1, 0, 0x800); - mem1 += 0x100; + memset(dest, 0, 0x800); + + // Create top margin + dest += 0x100; + for (i = 0; i < 6; i++) { - mem1 += 0x20; + // Create left margin + dest += 0x20; + + // Copy one row of berry's icon for (j = 0; j < 6; j++) { - memcpy(mem1, mem0, 0x20); - mem1 += 0x20; - mem0 += 0x20; + memcpy(dest, src, 0x20); + dest += 0x20; + src += 0x20; } + + // Create right margin if (i != 5) - mem1 += 0x20; + dest += 0x20; } } @@ -595,7 +603,7 @@ static void LoadBerryGfx(u8 berryId) pal.tag = TAG_BERRY_PIC_PAL; LoadCompressedSpritePalette(&pal); LZDecompressWram(sBerryPicTable[berryId].tiles, &gDecompressionBuffer[0x1000]); - sub_80D5018(&gDecompressionBuffer[0x1000], &gDecompressionBuffer[0]); + ArrangeBerryGfx(&gDecompressionBuffer[0x1000], &gDecompressionBuffer[0]); } u8 CreateBerryTagSprite(u8 id, s16 x, s16 y) diff --git a/src/main.c b/src/main.c index 3125716e25..215f85c468 100644 --- a/src/main.c +++ b/src/main.c @@ -57,7 +57,7 @@ const IntrFunc gIntrTableTemplate[] = #define INTR_COUNT ((int)(sizeof(gIntrTableTemplate)/sizeof(IntrFunc))) -static u16 gUnknown_03000000; +static u16 sUnusedVar; // Never read u16 gKeyRepeatStartDelay; bool8 gLinkTransferringData; @@ -117,7 +117,7 @@ void AgbMain() SetMainCallback2(NULL); gLinkTransferringData = FALSE; - gUnknown_03000000 = 0xFC0; + sUnusedVar = 0xFC0; for (;;) { diff --git a/src/main_menu.c b/src/main_menu.c index 3248c189fe..a60cf1a283 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -170,7 +170,7 @@ // Static RAM declarations -static EWRAM_DATA u8 gUnknown_02022D04 = 0; +static EWRAM_DATA bool8 sStartedPokeBallTask = 0; static EWRAM_DATA u16 sCurrItemAndOptionMenuCheck = 0; static u8 sBirchSpeechMainTaskId; @@ -201,7 +201,7 @@ static void NewGameBirchSpeech_ShowDialogueWindow(u8, u8); static void NewGameBirchSpeech_ClearWindow(u8); static void Task_NewGameBirchSpeech_ThisIsAPokemon(u8); static void Task_NewGameBirchSpeech_MainSpeech(u8); -static void NewGameBirchSpeech_ShowPokeBallPrinterCallback(struct TextPrinterTemplate *printer, u16 a); +static void NewGameBirchSpeech_WaitForThisIsPokemonText(struct TextPrinterTemplate *printer, u16 a); static void Task_NewGameBirchSpeech_AndYouAre(u8); static void Task_NewGameBirchSpeechSub_WaitForLotad(u8); static void Task_NewGameBirchSpeech_StartBirchLotadPlatformFade(u8); @@ -1348,7 +1348,7 @@ static void Task_NewGameBirchSpeech_ThisIsAPokemon(u8 taskId) { gTasks[taskId].func = Task_NewGameBirchSpeech_MainSpeech; StringExpandPlaceholders(gStringVar4, gText_ThisIsAPokemon); - AddTextPrinterWithCallbackForMessage(1, NewGameBirchSpeech_ShowPokeBallPrinterCallback); + AddTextPrinterWithCallbackForMessage(1, NewGameBirchSpeech_WaitForThisIsPokemonText); sBirchSpeechMainTaskId = taskId; } } @@ -1411,7 +1411,7 @@ static void Task_NewGameBirchSpeech_AndYouAre(u8 taskId) { if (!RunTextPrintersAndIsPrinter0Active()) { - gUnknown_02022D04 = 0; + sStartedPokeBallTask = FALSE; StringExpandPlaceholders(gStringVar4, gText_Birch_AndYouAre); AddTextPrinterForMessage(1); gTasks[taskId].func = Task_NewGameBirchSpeech_StartBirchLotadPlatformFade; @@ -2250,21 +2250,21 @@ static void NewGameBirchSpeech_ClearWindow(u8 windowId) CopyWindowToVram(windowId, 2); } -static void NewGameBirchSpeech_ShowPokeBallPrinterCallback(struct TextPrinterTemplate *printer, u16 a) +static void NewGameBirchSpeech_WaitForThisIsPokemonText(struct TextPrinterTemplate *printer, u16 a) { - if (*(printer->currentChar - 2) == 8 && gUnknown_02022D04 == 0) + // Wait for Birch's "This is a Pokémon" text to reach the pause + // Then start the PokéBall release (if it hasn't been started already) + if (*(printer->currentChar - 2) == EXT_CTRL_CODE_PAUSE && !sStartedPokeBallTask) { - gUnknown_02022D04 = 1; + sStartedPokeBallTask = TRUE; CreateTask(Task_NewGameBirchSpeechSub_InitPokeBall, 0); } } -void CreateYesNoMenuParameterized(u8 a, u8 b, u16 c, u16 d, u8 e, u8 f) +void CreateYesNoMenuParameterized(u8 x, u8 y, u16 baseTileNum, u16 baseBlock, u8 yesNoPalNum, u8 winPalNum) { - struct WindowTemplate sp; - - sp = CreateWindowTemplate(0, a + 1, b + 1, 5, 4, f, d); - CreateYesNoMenu(&sp, c, e, 0); + struct WindowTemplate template = CreateWindowTemplate(0, x + 1, y + 1, 5, 4, winPalNum, baseBlock); + CreateYesNoMenu(&template, baseTileNum, yesNoPalNum, 0); } static void NewGameBirchSpeech_ShowDialogueWindow(u8 windowId, u8 copyToVram) diff --git a/src/menu.c b/src/menu.c index de1468e3b6..dcc32319e9 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1769,9 +1769,7 @@ void ResetTempTileDataBuffers(void) { int i; for (i = 0; i < (int)ARRAY_COUNT(sTempTileDataBuffer); i++) - { sTempTileDataBuffer[i] = NULL; - } sTempTileDataBufferIdx = 0; } @@ -1784,9 +1782,7 @@ bool8 FreeTempTileDataBuffersIfPossible(void) if (sTempTileDataBufferIdx) { for (i = 0; i < sTempTileDataBufferIdx; i++) - { FREE_AND_SET_NULL(sTempTileDataBuffer[i]); - } sTempTileDataBufferIdx = 0; } return FALSE; diff --git a/src/pokedex_area_region_map.c b/src/pokedex_area_region_map.c index 82d5e50e51..1ee5ca988d 100644 --- a/src/pokedex_area_region_map.c +++ b/src/pokedex_area_region_map.c @@ -17,7 +17,7 @@ static const u32 sPokedexAreaMapAffine_Tilemap[] = INCBIN_U32("graphics/interfac void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) { u8 mode; - sPokedexAreaMapBgNum = Alloc(4); + sPokedexAreaMapBgNum = Alloc(sizeof(sPokedexAreaMapBgNum)); mode = template->mode; if (mode == 0) @@ -28,8 +28,9 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) } else { + // This is never reached, only a mode of 0 is given SetBgAttribute(template->bg, BG_ATTR_METRIC, 2); - SetBgAttribute(template->bg, BG_ATTR_TYPE, 1); + SetBgAttribute(template->bg, BG_ATTR_TYPE, BG_TYPE_AFFINE); // This does nothing. BG_ATTR_TYPE can't be set with this function DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMapAffine_Gfx, 0, template->offset, 0); sub_8199D3C(DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMapAffine_Tilemap, 0, 0, 1), template->offset, 64, 64, TRUE); } @@ -41,7 +42,7 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) *sPokedexAreaMapBgNum = template->bg; } -bool32 sub_81C4E90(void) +bool32 TryShowPokedexAreaMap(void) { if (!FreeTempTileDataBuffersIfPossible()) { @@ -56,8 +57,7 @@ bool32 sub_81C4E90(void) void FreePokedexAreaMapBgNum(void) { - if (sPokedexAreaMapBgNum != NULL) - FREE_AND_SET_NULL(sPokedexAreaMapBgNum); + TRY_FREE_AND_SET_NULL(sPokedexAreaMapBgNum); } void PokedexAreaMapChangeBgY(u32 a0) diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 12f0e0d9ed..2f0d676cbe 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -86,7 +86,7 @@ static void CreateAreaMarkerSprites(void); static void LoadAreaUnknownGraphics(void); static void CreateAreaUnknownSprites(void); static void Task_HandlePokedexAreaScreenInput(u8); -static void sub_813D6B4(void); +static void ResetPokedexAreaMapBg(void); static void DestroyAreaMarkerSprites(void); static const u32 sAreaGlow_Pal[] = INCBIN_U32("graphics/pokedex/area_glow.gbapal"); @@ -665,7 +665,7 @@ static void Task_ShowPokedexAreaScreen(u8 taskId) StringFill(sPokedexAreaScreen->charBuffer, CHAR_SPACE, 16); break; case 2: - if (sub_81C4E90() == TRUE) + if (TryShowPokedexAreaMap() == TRUE) return; PokedexAreaMapChangeBgY(-8); break; @@ -697,7 +697,7 @@ static void Task_ShowPokedexAreaScreen(u8 taskId) SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_ALL); StartAreaGlow(); ShowBg(2); - ShowBg(3); + ShowBg(3); // TryShowPokedexAreaMap will have done this already SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON); break; case 11: @@ -743,7 +743,7 @@ static void Task_HandlePokedexAreaScreenInput(u8 taskId) return; DestroyAreaMarkerSprites(); sPokedexAreaScreen->screenSwitchState[0] = gTasks[taskId].data[1]; - sub_813D6B4(); + ResetPokedexAreaMapBg(); DestroyTask(taskId); FreePokedexAreaMapBgNum(); FREE_AND_SET_NULL(sPokedexAreaScreen); @@ -753,7 +753,7 @@ static void Task_HandlePokedexAreaScreenInput(u8 taskId) gTasks[taskId].tState++; } -static void sub_813D6B4(void) +static void ResetPokedexAreaMapBg(void) { SetBgAttribute(3, BG_ATTR_CHARBASEINDEX, 0); SetBgAttribute(3, BG_ATTR_PALETTEMODE, 0); diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index a58187d8b3..801041c530 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -9822,13 +9822,13 @@ struct u16 height; } static const sTilemapDimensions[][4] = { - { + [BG_TYPE_NORMAL] = { { 256, 256}, { 512, 256}, { 256, 512}, { 512, 512}, }, - { + [BG_TYPE_AFFINE] = { { 128, 128}, { 256, 256}, { 512, 512}, @@ -9853,7 +9853,7 @@ static void TilemapUtil_SetMap(u8 id, u8 bg, const void *tilemap, u16 width, u16 bgType = GetBgAttribute(bg, BG_ATTR_TYPE); sTilemapUtil[id].altWidth = sTilemapDimensions[bgType][bgScreenSize].width; sTilemapUtil[id].altHeight = sTilemapDimensions[bgType][bgScreenSize].height; - if (bgType != 0) + if (bgType != BG_TYPE_NORMAL) sTilemapUtil[id].tileSize = 1; else sTilemapUtil[id].tileSize = 2; diff --git a/src/reshow_battle_screen.c b/src/reshow_battle_screen.c index 58de22f056..6bc0e175bb 100644 --- a/src/reshow_battle_screen.c +++ b/src/reshow_battle_screen.c @@ -162,7 +162,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void) BeginHardwarePaletteFade(0xFF, 0, 0x10, 0, 1); gPaletteFade.bufferTransferDisabled = 0; SetMainCallback2(BattleMainCB2); - sub_805EF14(); + FillAroundBattleWindows(); break; } diff --git a/sym_common.txt b/sym_common.txt index 1525d8aec8..938b78fbe4 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -2,7 +2,7 @@ .include "main.o" @ ../gflib/bg.o .align 2 -gUnneededFireRedVariable: +gWindowTileAutoAllocEnabled: .space 4 @ ../gflib/window.o .align 4 From db057eb86b46f5ed152798af50f7858d786d2733 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 24 Sep 2021 17:33:18 -0400 Subject: [PATCH 015/417] Relocate battle_message comment --- gflib/text.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gflib/text.h b/gflib/text.h index a08d0a0fff..f71cd557fa 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -263,12 +263,12 @@ #define PLACEHOLDER_ID_KYOGRE 0xC #define PLACEHOLDER_ID_GROUDON 0xD +// battle placeholders are located in battle_message.h + // Hiragana from 0x1-0x50, Katakana from 0x51-0xA0. // This excludes Japanese punctuation, which end at 0xB0 #define JAPANESE_CHAR_END 0xA0 -// battle placeholders are located in battle_message.h - #define NUM_TEXT_PRINTERS 32 #define TEXT_SPEED_FF 0xFF From 8a79ca3818d23c27d94a2919b2fc99caa38034cc Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 26 Sep 2021 16:20:39 -0400 Subject: [PATCH 016/417] Document walda_phrase --- include/pokemon_storage_system.h | 3 +- include/walda_phrase.h | 2 + src/menu_specialized.c | 2 +- src/naming_screen.c | 9 +- src/pokemon_storage_system.c | 4 +- src/pokenav_conditions_1.c | 2 +- src/walda_phrase.c | 182 ++++++++++++++++++------------- 7 files changed, 120 insertions(+), 84 deletions(-) diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index a0e4f89478..b7fca23311 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -5,6 +5,7 @@ #define IN_BOX_ROWS 5 // Number of rows, 6 Pokémon per row #define IN_BOX_COLUMNS 6 // Number of columns, 5 Pokémon per column #define IN_BOX_COUNT (IN_BOX_ROWS * IN_BOX_COLUMNS) +#define BOX_NAME_LENGTH 8 /* COLUMNS @@ -19,7 +20,7 @@ struct PokemonStorage { /*0x0000*/ u8 currentBox; /*0x0001*/ struct BoxPokemon boxes[TOTAL_BOXES_COUNT][IN_BOX_COUNT]; - /*0x8344*/ u8 boxNames[TOTAL_BOXES_COUNT][9]; + /*0x8344*/ u8 boxNames[TOTAL_BOXES_COUNT][BOX_NAME_LENGTH + 1]; /*0x83C2*/ u8 boxWallpapers[TOTAL_BOXES_COUNT]; }; diff --git a/include/walda_phrase.h b/include/walda_phrase.h index 3d77011235..1cfd8af48a 100644 --- a/include/walda_phrase.h +++ b/include/walda_phrase.h @@ -1,6 +1,8 @@ #ifndef GUARD_WALDA_PHRASE_H #define GUARD_WALDA_PHRASE_H +#define WALDA_PHRASE_LENGTH 15 + u16 TryBufferWaldaPhrase(void); void DoWaldaNamingScreen(void); u16 TryGetWallpaperWithWaldaPhrase(void); diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 2fd12f2fd3..c9d895e193 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -997,7 +997,7 @@ void GetConditionMenuMonNameAndLocString(u8 *locationDst, u8 *nameDst, u16 boxId if (box == TOTAL_BOXES_COUNT) // Party mon. BufferConditionMenuSpacedStringN(&locationDst[5], gText_InParty, 8); else - BufferConditionMenuSpacedStringN(&locationDst[5], GetBoxNamePtr(box), 8); + BufferConditionMenuSpacedStringN(&locationDst[5], GetBoxNamePtr(box), BOX_NAME_LENGTH); } else { diff --git a/src/naming_screen.c b/src/naming_screen.c index 5a297789a0..0d0ec7fcab 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -25,6 +25,7 @@ #include "menu.h" #include "text_window.h" #include "overworld.h" +#include "walda_phrase.h" #include "constants/event_objects.h" #include "constants/rgb.h" @@ -2089,7 +2090,7 @@ static void Debug_NamingScreenNickname(void) static const struct NamingScreenTemplate sPlayerNamingScreenTemplate = { .copyExistingString = FALSE, - .maxChars = 7, + .maxChars = PLAYER_NAME_LENGTH, .iconFunction = 1, .addGenderIcon = FALSE, .initialPage = KBPAGE_LETTERS_UPPER, @@ -2100,7 +2101,7 @@ static const struct NamingScreenTemplate sPlayerNamingScreenTemplate = static const struct NamingScreenTemplate sPCBoxNamingTemplate = { .copyExistingString = FALSE, - .maxChars = 8, + .maxChars = BOX_NAME_LENGTH, .iconFunction = 2, .addGenderIcon = FALSE, .initialPage = KBPAGE_LETTERS_UPPER, @@ -2111,7 +2112,7 @@ static const struct NamingScreenTemplate sPCBoxNamingTemplate = static const struct NamingScreenTemplate sMonNamingScreenTemplate = { .copyExistingString = FALSE, - .maxChars = 10, + .maxChars = POKEMON_NAME_LENGTH, .iconFunction = 3, .addGenderIcon = TRUE, .initialPage = KBPAGE_LETTERS_UPPER, @@ -2122,7 +2123,7 @@ static const struct NamingScreenTemplate sMonNamingScreenTemplate = static const struct NamingScreenTemplate sWaldaWordsScreenTemplate = { .copyExistingString = TRUE, - .maxChars = 15, + .maxChars = WALDA_PHRASE_LENGTH, .iconFunction = 4, .addGenderIcon = FALSE, .initialPage = KBPAGE_LETTERS_UPPER, diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index a58187d8b3..cf5beb4fee 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -5512,7 +5512,7 @@ static void InitBoxTitle(u8 boxId) sStorage->boxTitleAltPalOffset = 0x10e + 16 * tagIndex; sStorage->wallpaperPalBits |= 0x10000 << tagIndex; - StringCopyPadded(sStorage->boxTitleText, GetBoxNamePtr(boxId), 0, 8); + StringCopyPadded(sStorage->boxTitleText, GetBoxNamePtr(boxId), 0, BOX_NAME_LENGTH); DrawTextWindowAndBufferTiles(sStorage->boxTitleText, sStorage->boxTitleTiles, 0, 0, 2); LoadSpriteSheet(&spriteSheet); x = GetBoxTitleBaseX(GetBoxNamePtr(boxId)); @@ -5557,7 +5557,7 @@ static void CreateIncomingBoxTitle(u8 boxId, s8 direction) template.paletteTag = PALTAG_BOX_TITLE; } - StringCopyPadded(sStorage->boxTitleText, GetBoxNamePtr(boxId), 0, 8); + StringCopyPadded(sStorage->boxTitleText, GetBoxNamePtr(boxId), 0, BOX_NAME_LENGTH); DrawTextWindowAndBufferTiles(sStorage->boxTitleText, sStorage->boxTitleTiles, 0, 0, 2); LoadSpriteSheet(&spriteSheet); LoadPalette(sBoxTitleColors[GetBoxWallpaper(boxId)], palOffset, sizeof(sBoxTitleColors[0])); diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index c415de1ace..d2424629a2 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -435,7 +435,7 @@ void CopyMonNameGenderLocation(s16 id, u8 arg1) if (boxId == TOTAL_BOXES_COUNT) CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], gText_InParty, 8); else - CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], GetBoxNamePtr(boxId), 8); + CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], GetBoxNamePtr(boxId), BOX_NAME_LENGTH); } else { diff --git a/src/walda_phrase.c b/src/walda_phrase.c index 18fb2791b2..aa85c0d60b 100644 --- a/src/walda_phrase.c +++ b/src/walda_phrase.c @@ -12,17 +12,20 @@ extern const u8 gText_Peekaboo[]; -// this file's functions static void CB2_HandleGivenWaldaPhrase(void); -static u32 GetWaldaPhraseInputCase(u8 *inputPtr); -static bool32 TryCalculateWallpaper(u16* backgroundClr, u16 *foregroundClr, u8 *iconId, u8 *patternId, u16 trainerId, u8 *phrase); -static void sub_81D9D5C(u8 *array, u8 *letterTableIds, u32 arg2, u32 arg3, u32 loopCount); -static u32 sub_81D9DAC(u8 *array, u32 arg1, u32 loopCount); -static void sub_81D9C90(u8 *array, s32 arg1, s32 arg2); -static void sub_81D9CDC(u8 *array, u32 loopCount, u8 arg2); +static u32 GetWaldaPhraseInputCase(u8 *); +static bool32 TryCalculateWallpaper(u16 *, u16 *, u8 *, u8 *, u16, u8 *); +static void SetWallpaperDataFromLetter(u8 *, u8 *, u32, u32, u32); +static u32 GetWallpaperDataBits(u8 *, u32, u32); +static void RotateWallpaperDataLeft(u8 *, s32, s32); +static void MaskWallpaperData(u8 *, u32, u8); -// only consonants are allowed, no vowels, some lowercase letters are missing -static const u8 sWaldaLettersTable[] = +// There are 32 (2^5) unique letters allowed in a successful phrase for Walda. +#define BITS_PER_LETTER 5 + +// The letters allowed in a successful phrase for Walda +// All vowels are excluded, as well as X/x, Y/y, l, r, t, v, w, and z. +static const u8 sWaldaLettersTable[1 << BITS_PER_LETTER] = { CHAR_B, CHAR_C, CHAR_D, CHAR_F, CHAR_G, CHAR_H, CHAR_J, CHAR_K, CHAR_L, CHAR_M, CHAR_N, CHAR_P, CHAR_Q, CHAR_R, CHAR_S, CHAR_T, CHAR_V, CHAR_W, CHAR_Z, CHAR_b, CHAR_c, CHAR_d, CHAR_f, CHAR_g, CHAR_h, CHAR_j, CHAR_k, CHAR_m, CHAR_n, CHAR_p, CHAR_q, CHAR_s @@ -30,9 +33,9 @@ static const u8 sWaldaLettersTable[] = enum { - PHRASE_GIVEN_NEW, + PHRASE_CHANGED, PHRASE_NO_CHANGE, - PHRASE_FIRST_ATTEMPT + PHRASE_EMPTY }; u16 TryBufferWaldaPhrase(void) @@ -56,13 +59,15 @@ static void CB2_HandleGivenWaldaPhrase(void) switch (gSpecialVar_0x8004) { - case PHRASE_FIRST_ATTEMPT: + case PHRASE_EMPTY: + // If saved phrase is also empty, set default phrase + // Otherwise keep saved phrase if (IsWaldaPhraseEmpty()) SetWaldaPhrase(gText_Peekaboo); else gSpecialVar_0x8004 = PHRASE_NO_CHANGE; break; - case PHRASE_GIVEN_NEW: + case PHRASE_CHANGED: SetWaldaPhrase(gStringVar2); break; case PHRASE_NO_CHANGE: @@ -76,12 +81,16 @@ static void CB2_HandleGivenWaldaPhrase(void) static u32 GetWaldaPhraseInputCase(u8 *inputPtr) { + // No input given if (inputPtr[0] == EOS) - return PHRASE_FIRST_ATTEMPT; + return PHRASE_EMPTY; + + // Input given is the same as saved phrase if (StringCompare(inputPtr, GetWaldaPhrasePtr()) == 0) return PHRASE_NO_CHANGE; - return PHRASE_GIVEN_NEW; + // Input is new phrase + return PHRASE_CHANGED; } u16 TryGetWallpaperWithWaldaPhrase(void) @@ -99,7 +108,7 @@ u16 TryGetWallpaperWithWaldaPhrase(void) } SetWaldaWallpaperLockedOrUnlocked(gSpecialVar_Result); - return (bool8)(gSpecialVar_Result); + return (bool8)gSpecialVar_Result; } static u8 GetLetterTableId(u8 letter) @@ -115,132 +124,155 @@ static u8 GetLetterTableId(u8 letter) return ARRAY_COUNT(sWaldaLettersTable); } +// Attempts to generate a wallpaper based on the given trainer id and phrase. +// Returns TRUE if successful and sets the wallpaper results to the given pointers. +// Returns FALSE if no wallpaper was generated (Walda "didn't like" the phrase). +// A 9-byte array is used to calculate the wallpaper's data. +// The elements of this array are defined below. +#define BG_COLOR_LO data[0] +#define BG_COLOR_HI data[1] +#define FG_COLOR_LO data[2] +#define FG_COLOR_HI data[3] +#define ICON_ID data[4] +#define PATTERN_ID data[5] +#define TID_CHECK_HI data[6] +#define TID_CHECK_LO data[7] +#define KEY data[8] +#define NUM_WALLPAPER_DATA_BYTES 9 +#define TO_BIT_OFFSET(i) (3 + (8 * (i))) // Convert a position in the phrase to a bit number into the wallpaper data array static bool32 TryCalculateWallpaper(u16* backgroundClr, u16 *foregroundClr, u8 *iconId, u8 *patternId, u16 trainerId, u8 *phrase) { s32 i; - ALIGNED(2) u8 array[12]; - u8 charsByTableId[16]; + ALIGNED(2) u8 data[NUM_WALLPAPER_DATA_BYTES]; + u8 charsByTableId[WALDA_PHRASE_LENGTH]; u16 *ptr; - if (StringLength(phrase) != 15) + // Reject any phrase that does not use the full length + if (StringLength(phrase) != WALDA_PHRASE_LENGTH) return FALSE; - for (i = 0; i < 15; i++) + // Reject any phrase that uses characters not in sWaldaLettersTable + for (i = 0; i < WALDA_PHRASE_LENGTH; i++) { charsByTableId[i] = GetLetterTableId(phrase[i]); if (charsByTableId[i] == ARRAY_COUNT(sWaldaLettersTable)) return FALSE; } - for (i = 0; i < 14; i++) - { - sub_81D9D5C(array, charsByTableId, (5 * i), 3 + (8 * i), 5); - } + // Use the given phrase to populate the wallpaper data array + // The data array is 9 bytes (72 bits) long, and each letter contributes to 5 bits of the array + // Because the phrase is 15 letters long there are 75 bits from the phrase to distribute + // Therefore the last letter contributes to the last 2 bits of the array, and the remaining 3 bits wrap around + for (i = 0; i < WALDA_PHRASE_LENGTH - 1; i++) + SetWallpaperDataFromLetter(data, charsByTableId, BITS_PER_LETTER * i, TO_BIT_OFFSET(i), BITS_PER_LETTER); - sub_81D9D5C(array, charsByTableId, 70, 115, 2); + // Do first 2 bits of the last letter + SetWallpaperDataFromLetter(data, charsByTableId, BITS_PER_LETTER * (WALDA_PHRASE_LENGTH - 1), TO_BIT_OFFSET(WALDA_PHRASE_LENGTH - 1), 2); - if (sub_81D9DAC(array, 0, 3) != sub_81D9DAC(charsByTableId, 117, 3)) + // Check the first 3 bits of the data array against the remaining 3 bits of the last letter + // Reject the phrase if they are not already the same + if (GetWallpaperDataBits(data, 0, 3) != GetWallpaperDataBits(charsByTableId, TO_BIT_OFFSET(WALDA_PHRASE_LENGTH - 1) + 2, 3)) return FALSE; - sub_81D9C90(array, 9, 21); - sub_81D9C90(array, 8, array[8] & 0xF); - sub_81D9CDC(array, 8, array[8] >> 4); + // Perform some relatively arbitrary changes to the wallpaper data using the last byte (KEY) + RotateWallpaperDataLeft(data, NUM_WALLPAPER_DATA_BYTES, 21); + RotateWallpaperDataLeft(data, NUM_WALLPAPER_DATA_BYTES - 1, KEY & 0xF); + MaskWallpaperData(data, NUM_WALLPAPER_DATA_BYTES - 1, KEY >> 4); - if (array[6] != (array[0] ^ array[2] ^ array[4] ^ (trainerId >> 8))) + // Reject the results of any phrase that are 'incompatible' with the player's trainer id + if (TID_CHECK_HI != (BG_COLOR_LO ^ FG_COLOR_LO ^ ICON_ID ^ (trainerId >> 8))) + return FALSE; + if (TID_CHECK_LO != (BG_COLOR_HI ^ FG_COLOR_HI ^ PATTERN_ID ^ (trainerId & 0xFF))) return FALSE; - if (array[7] != (array[1] ^ array[3] ^ array[5] ^ (trainerId & 0xFF))) - return FALSE; - - ptr = (u16*)(&array[0]); + // Successful phrase, save resulting wallpaper + ptr = (u16*) &BG_COLOR_LO; *backgroundClr = *ptr; - ptr = (u16*)(&array[2]); + ptr = (u16*) &FG_COLOR_LO; *foregroundClr = *ptr; - *iconId = array[4]; - *patternId = array[5]; + *iconId = ICON_ID; + *patternId = PATTERN_ID; return TRUE; } -static void sub_81D9C90(u8 *array, s32 arg1, s32 arg2) +static void RotateWallpaperDataLeft(u8 *data, s32 size, s32 numShifts) { s32 i, j; - u8 var1, var2; + u8 temp1, temp2; - for (i = arg2 - 1; i != -1; i--) + for (i = numShifts - 1; i != -1; i--) { - var1 = (array[0] & 0x80) >> 7; + temp1 = (data[0] & (1 << 7)) >> 7; - for (j = arg1 - 1; j >= 0; j--) + for (j = size - 1; j >= 0; j--) { - var2 = (array[j] & 0x80) >> 7; - array[j] <<= 1; - array[j] |= var1; - var1 = var2; + temp2 = (data[j] & (1 << 7)) >> 7; + data[j] <<= 1; + data[j] |= temp1; + temp1 = temp2; } } } -static void sub_81D9CDC(u8 *array, u32 loopCount, u8 arg2) +static void MaskWallpaperData(u8 *data, u32 size, u8 mask) { u32 i; - arg2 |= (arg2 << 4); + mask |= (mask << 4); - for (i = 0; i < loopCount; i++) - { - array[i] ^= arg2; - } + for (i = 0; i < size; i++) + data[i] ^= mask; } -static bool8 sub_81D9D0C(u8 *array, u32 arg1) +static bool8 GetWallpaperDataBit(u8 *data, u32 bitNum) { - u32 arrayId = arg1 >> 3; - u32 bits = 0x80 >> (7 & arg1); + u32 i = bitNum / 8; + u32 flag = (1 << 7) >> (bitNum % 8); - return ((array[arrayId] & bits) != 0); + return (data[i] & flag) != 0; } -static void sub_81D9D28(u8 *array, u32 arg1) +static void SetWallpaperDataBit(u8 *data, u32 bitNum) { - u32 arrayId = arg1 >> 3; - u8 bits = 0x80 >> (7 & arg1); + u32 i = bitNum / 8; + u8 flag = (1 << 7) >> (bitNum % 8); - array[arrayId] |= bits; + data[i] |= flag; } -static void sub_81D9D40(u8 *array, u32 arg1) +static void ClearWallpaperDataBit(u8 *data, u32 bitNum) { - u32 arrayId = arg1 >> 3; - u8 bits = ~(0x80 >> (7 & arg1)); + u32 i = bitNum / 8; + u8 mask = ~((1 << 7) >> (bitNum % 8)); - array[arrayId] &= bits; + data[i] &= mask; } -static void sub_81D9D5C(u8 *array, u8 *letterTableIds, u32 arg2, u32 arg3, u32 loopCount) +static void SetWallpaperDataFromLetter(u8 *data, u8 *letterTableIds, u32 setOffset, u32 getOffset, u32 numBits) { u32 i; - for (i = 0; i < loopCount; i++) + for (i = 0; i < numBits; i++) { - if (sub_81D9D0C(letterTableIds, arg3 + i)) - sub_81D9D28(array, arg2 + i); + if (GetWallpaperDataBit(letterTableIds, getOffset + i)) + SetWallpaperDataBit(data, setOffset + i); else - sub_81D9D40(array, arg2 + i); + ClearWallpaperDataBit(data, setOffset + i); } } -static u32 sub_81D9DAC(u8 *array, u32 arg1, u32 loopCount) +static u32 GetWallpaperDataBits(u8 *data, u32 offset, u32 numBits) { - u32 ret, i; + u32 bits, i; - for (ret = 0, i = 0; i < loopCount; i++) + for (bits = 0, i = 0; i < numBits; i++) { - ret <<= 1; - ret |= sub_81D9D0C(array, arg1 + i); + bits <<= 1; + bits |= GetWallpaperDataBit(data, offset + i); } - return ret; + return bits; } From fdd284b50bfd40c27803aa7c76eae2a65cc7d56c Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Tue, 28 Sep 2021 23:44:22 -0300 Subject: [PATCH 017/417] Hold Item party menu --- src/data/pokemon/form_change_table_pointers.h | 1 + src/data/pokemon/form_change_tables.h | 1 + src/party_menu.c | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 777b174a4e..39fcc7aee2 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -1,6 +1,7 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = { [SPECIES_GIRATINA] = sGiratinaFormChangeTable, + [SPECIES_GIRATINA_ORIGIN] = sGiratinaFormChangeTable, [SPECIES_SHAYMIN] = sShayminFormChangeTable, [SPECIES_SHAYMIN_SKY] = sShayminSkyFormChangeTable, [SPECIES_ARCEUS] = sArceusFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index f58b69b547..abd1ff72f6 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -27,6 +27,7 @@ FORM_ITEM_USE_DAY: #define WHEN_FORGOTTEN TRUE static const struct FormChange sGiratinaFormChangeTable[] = { + {FORM_ITEM_HOLD, SPECIES_GIRATINA, ITEM_NONE}, {FORM_ITEM_HOLD, SPECIES_GIRATINA_ORIGIN, ITEM_GRISEOUS_ORB}, {FORM_CHANGE_END}, }; diff --git a/src/party_menu.c b/src/party_menu.c index 46c5283024..d471a92a8d 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -404,6 +404,7 @@ static bool8 SetUpFieldMove_Surf(void); static bool8 SetUpFieldMove_Fly(void); static bool8 SetUpFieldMove_Waterfall(void); static bool8 SetUpFieldMove_Dive(void); +void TryItemHoldFormChange(struct Pokemon *mon); // static const data #include "data/pokemon/tutor_learnsets.h" @@ -1734,6 +1735,7 @@ static void GiveItemToMon(struct Pokemon *mon, u16 item) itemBytes[0] = item; itemBytes[1] = item >> 8; SetMonData(mon, MON_DATA_HELD_ITEM, itemBytes); + TryItemHoldFormChange(&gPlayerParty[gPartyMenu.slotId]); } static u8 TryTakeMonItem(struct Pokemon* mon) @@ -1747,6 +1749,7 @@ static u8 TryTakeMonItem(struct Pokemon* mon) item = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &item); + TryItemHoldFormChange(&gPlayerParty[gPartyMenu.slotId]); return 2; } @@ -5213,6 +5216,20 @@ void ItemUseCB_FormChange_ConsumedOnUse(u8 taskId, TaskFunc task) RemoveBagItem(gSpecialVar_ItemId, 1); } } +void TryItemHoldFormChange(struct Pokemon *mon) +{ + u16 species = GetMonData(mon, MON_DATA_SPECIES); + u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_HOLD, 0); + if (targetSpecies != SPECIES_NONE) + { + PlayCry2(targetSpecies, 0, 0x7D, 0xA); + SetMonData(mon, MON_DATA_SPECIES, &targetSpecies); + FreeAndDestroyMonIconSprite(&gSprites[sPartyMenuBoxes[gPartyMenu.slotId].monSpriteId]); + CreatePartyMonIconSpriteParameterized(targetSpecies, GetMonData(mon, MON_DATA_PERSONALITY, NULL), &sPartyMenuBoxes[gPartyMenu.slotId], 1); + CalculateMonStats(mon); + UpdatePartyMonHeldItemSprite(mon, &sPartyMenuBoxes[gPartyMenu.slotId]); + } +} u8 GetItemEffectType(u16 item) { From 55b61313a4cd1c394bb27e83c28c3100a1d9dabb Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 29 Sep 2021 00:48:03 -0300 Subject: [PATCH 018/417] PSS uses form change table for holding items. # Conflicts: # src/pokemon.c --- include/party_menu.h | 1 + include/pokemon.h | 1 + src/party_menu.c | 12 ++++++++++ src/pokemon.c | 15 ++++++++---- src/pokemon_storage_system.c | 46 ++++++++++++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 5 deletions(-) diff --git a/include/party_menu.h b/include/party_menu.h index 75fe7b9583..23a17d7534 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -55,6 +55,7 @@ void ItemUseCB_PPUp(u8 taskId, TaskFunc task); u16 ItemIdToBattleMoveId(u16 item); bool8 IsMoveHm(u16 move); bool8 MonKnowsMove(struct Pokemon *mon, u16 move); +bool8 BoxMonKnowsMove(struct BoxPokemon *mon, u16 move); void ItemUseCB_TMHM(u8 taskId, TaskFunc task); void ItemUseCB_RareCandy(u8 taskId, TaskFunc task); void ItemUseCB_SacredAsh(u8 taskId, TaskFunc task); diff --git a/include/pokemon.h b/include/pokemon.h index 6a13f7432d..e55e2e7ecb 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -439,4 +439,5 @@ u8 *sub_806F4F8(u8 id, u8 arg1); u16 GetFormSpeciesId(u16 speciesId, u8 formId); u8 GetFormIdFromFormSpeciesId(u16 formSpeciesId); u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg); +u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg); #endif // GUARD_POKEMON_H diff --git a/src/party_menu.c b/src/party_menu.c index d471a92a8d..86e443f766 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4640,6 +4640,18 @@ bool8 MonKnowsMove(struct Pokemon *mon, u16 move) return FALSE; } +bool8 BoxMonKnowsMove(struct BoxPokemon *mon, u16 move) +{ + u8 i; + + for (i = 0; i < MAX_MON_MOVES; i++) + { + if (GetMonData(mon, MON_DATA_MOVE1 + i) == move) + return TRUE; + } + return FALSE; +} + static void DisplayLearnMoveMessage(const u8 *str) { StringExpandPlaceholders(gStringVar4, str); diff --git a/src/pokemon.c b/src/pokemon.c index bc04c42f9c..021eca1d19 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8049,12 +8049,17 @@ u8 GetFormIdFromFormSpeciesId(u16 formSpeciesId) return targetFormId; } -// returns SPECIES_NONE if no form change is possible u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg) +{ + return GetFormChangeTargetSpeciesBoxMon(&mon->box, method, arg); +} + +// returns SPECIES_NONE if no form change is possible +u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg) { u32 i; u16 targetSpecies = SPECIES_NONE; - u16 originalSpecies = GetMonData(mon, MON_DATA_SPECIES, NULL); + u16 originalSpecies = GetBoxMonData(mon, MON_DATA_SPECIES, NULL); const struct FormChange *formChanges = gFormChangeTablePointers[originalSpecies]; if (formChanges == NULL) @@ -8064,11 +8069,11 @@ u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg) { if (method == formChanges[i].method) { - u32 ability = GetAbilityBySpecies(originalSpecies, GetMonData(mon, MON_DATA_ABILITY_NUM, NULL)); + u32 ability = GetAbilityBySpecies(originalSpecies, GetBoxMonData(mon, MON_DATA_ABILITY_NUM, NULL)); switch (method) { case FORM_ITEM_HOLD: - if (GetMonData(mon, MON_DATA_HELD_ITEM, NULL) == formChanges[i].param1 && (ability == formChanges[i].param2 || formChanges[i].param2 == ABILITY_NONE)) + if (GetBoxMonData(mon, MON_DATA_HELD_ITEM, NULL) == formChanges[i].param1 && (ability == formChanges[i].param2 || formChanges[i].param2 == ABILITY_NONE)) targetSpecies = formChanges[i].targetSpecies; break; case FORM_ITEM_USE: @@ -8076,7 +8081,7 @@ u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg) targetSpecies = formChanges[i].targetSpecies; break; case FORM_MOVE: - if (MonKnowsMove(mon, formChanges[i].param1) != formChanges[i].param2) + if (BoxMonKnowsMove(mon, formChanges[i].param1) != formChanges[i].param2) targetSpecies = formChanges[i].targetSpecies; break; case FORM_ITEM_USE_DAY: diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 92f45cb28a..9029fa4257 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -870,6 +870,10 @@ static void UnkUtil_Run(void); static void UnkUtil_CpuRun(struct UnkUtilData *); static void UnkUtil_DmaRun(struct UnkUtilData *); +// Form changing +void SetArceusFormPSS(struct BoxPokemon *boxMon); +void UpdateSpeciesSpritePSS(struct BoxPokemon *boxmon); + struct { const u8 *text; const u8 *desc; @@ -6866,6 +6870,34 @@ static void ReshowDisplayMon(void) TryRefreshDisplayMon(); } +void SetArceusFormPSS(struct BoxPokemon *boxMon) +{ + u16 species = GetMonData(boxMon, MON_DATA_SPECIES); + u16 targetSpecies = GetFormChangeTargetSpeciesBoxMon(boxMon, FORM_ITEM_HOLD, 0); + if (targetSpecies != SPECIES_NONE) + { + //PlayCry2(targetSpecies, 0, 0x7D, 0xA); + SetBoxMonData(boxMon, MON_DATA_SPECIES, &targetSpecies); + UpdateSpeciesSpritePSS(boxMon); + } + /* +#ifdef POKEMON_EXPANSION + u16 species = GetMonData(boxMon, MON_DATA_SPECIES); + u16 forme; + u8 abilityNum = GetMonData(boxMon, MON_DATA_ABILITY_NUM); + u16 ability = GetAbilityBySpecies(species, abilityNum); + + if (GET_BASE_SPECIES_ID(species) == SPECIES_ARCEUS + && ability == ABILITY_MULTITYPE) + { + forme = GetArceusFormPSS(boxMon); + SetBoxMonData(boxMon, MON_DATA_SPECIES, &forme); + UpdateSpeciesSpritePSS(boxMon); + } +#endif +*/ +} + static void SetDisplayMonData(void *pokemon, u8 mode) { u8 *txtPtr; @@ -6952,6 +6984,8 @@ static void SetDisplayMonData(void *pokemon, u8 mode) { if (sStorage->displayMonSpecies == SPECIES_NIDORAN_F || sStorage->displayMonSpecies == SPECIES_NIDORAN_M) gender = MON_GENDERLESS; + + SetArceusFormPSS(pokemon); StringCopyPadded(sStorage->displayMonNameText, sStorage->displayMonName, CHAR_SPACE, 5); @@ -10078,3 +10112,15 @@ static void UnkUtil_DmaRun(struct UnkUtilData *data) data->dest += 64; } } + +void UpdateSpeciesSpritePSS(struct BoxPokemon *boxMon) +{ + u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES); + u32 otId = GetBoxMonData(boxMon, MON_DATA_OT_ID); + u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY); + + // Update front sprite + sStorage->displayMonSpecies = species; + sStorage->displayMonPalette = GetMonSpritePalFromSpeciesAndPersonality(species, otId, pid); + LoadDisplayMonGfx(species, pid); +} From 9ad505d7e809a3d472d1348a9c2f7ff981f7be6e Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 29 Sep 2021 00:58:41 -0300 Subject: [PATCH 019/417] Mosaic effect when changing forms --- src/pokemon_storage_system.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 9029fa4257..91f19b8d0e 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -10120,6 +10120,7 @@ void UpdateSpeciesSpritePSS(struct BoxPokemon *boxMon) u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY); // Update front sprite + StartDisplayMonMosaicEffect(); sStorage->displayMonSpecies = species; sStorage->displayMonPalette = GetMonSpritePalFromSpeciesAndPersonality(species, otId, pid); LoadDisplayMonGfx(species, pid); From 7c9a3f338a5cf402491c4cac961efd2fa0cf23e4 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 29 Sep 2021 01:49:18 -0300 Subject: [PATCH 020/417] Updates icon in box menu --- src/pokemon_storage_system.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 91f19b8d0e..2fce20a6c0 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -10124,4 +10124,35 @@ void UpdateSpeciesSpritePSS(struct BoxPokemon *boxMon) sStorage->displayMonSpecies = species; sStorage->displayMonPalette = GetMonSpritePalFromSpeciesAndPersonality(species, otId, pid); LoadDisplayMonGfx(species, pid); + + // Recreate icon sprite + //DestroyPartyMonIcon(sCursorPosition); + if (sInPartyMenu) + { + /* + CreatePartyMonsSprites(TRUE); + if (GetMonData(&boxMon, MON_DATA_HELD_ITEM) == ITEM_NONE) + SetPartyMonIconObjMode(sCursorPosition, 1); + else + SetBoxMonIconObjMode(sCursorPosition, 0); + */ + } + else + { + DestroyBoxMonIcon(sStorage->boxMonsSprites[sCursorPosition]); + CreateBoxMonIconAtPos(sCursorPosition); + SetBoxMonIconObjMode(sCursorPosition, GetMonData(boxMon, MON_DATA_HELD_ITEM) == ITEM_NONE); + + } + // + /* + sStorage->boxMonsSprites[sCursorPosition] = CreateMonIconSprite(sStorage->boxSpecies[sCursorPosition], + sStorage->boxPersonalities[sCursorPosition], + x, y, 2, subpriority + sStorage->boxMonsSprites[sCursorPosition] = CreateMonIconSprite(species, personality, x, y, 2, 19 - (sCursorPosition % IN_BOX_COLUMNS)); + */ + //DestroyBoxMonIcon(sStorage->partySprites[i]) + //sStorage->partySprites[0] = CreateMonIconSprite(species, personality, 104, 64, 1, 12); + //DestroyBoxMonIconAtPosition(boxPosition); + } From 52781969ab773bd40bad5c9e6eb5d8623eb37708 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 29 Sep 2021 01:59:31 -0300 Subject: [PATCH 021/417] Update icon in party menu --- src/pokemon_storage_system.c | 38 ++---------------------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 2fce20a6c0..827ee7b3eb 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -6880,22 +6880,6 @@ void SetArceusFormPSS(struct BoxPokemon *boxMon) SetBoxMonData(boxMon, MON_DATA_SPECIES, &targetSpecies); UpdateSpeciesSpritePSS(boxMon); } - /* -#ifdef POKEMON_EXPANSION - u16 species = GetMonData(boxMon, MON_DATA_SPECIES); - u16 forme; - u8 abilityNum = GetMonData(boxMon, MON_DATA_ABILITY_NUM); - u16 ability = GetAbilityBySpecies(species, abilityNum); - - if (GET_BASE_SPECIES_ID(species) == SPECIES_ARCEUS - && ability == ABILITY_MULTITYPE) - { - forme = GetArceusFormPSS(boxMon); - SetBoxMonData(boxMon, MON_DATA_SPECIES, &forme); - UpdateSpeciesSpritePSS(boxMon); - } -#endif -*/ } static void SetDisplayMonData(void *pokemon, u8 mode) @@ -8589,7 +8573,7 @@ static void MultiMove_RemoveMonsFromBox(void) u8 boxPosition = (IN_BOX_COLUMNS * i) + sMultiMove->minColumn; for (j = sMultiMove->minColumn; j < columnCount; j++) { - DestroyBoxMonIconAtPosition(boxPosition); + DestroyBoxMonIconAtPosition(boxPosition);//bookmark ZeroBoxMonAt(boxId, boxPosition); boxPosition++; } @@ -10126,33 +10110,15 @@ void UpdateSpeciesSpritePSS(struct BoxPokemon *boxMon) LoadDisplayMonGfx(species, pid); // Recreate icon sprite - //DestroyPartyMonIcon(sCursorPosition); if (sInPartyMenu) { - /* + DestroyAllPartyMonIcons(); CreatePartyMonsSprites(TRUE); - if (GetMonData(&boxMon, MON_DATA_HELD_ITEM) == ITEM_NONE) - SetPartyMonIconObjMode(sCursorPosition, 1); - else - SetBoxMonIconObjMode(sCursorPosition, 0); - */ } else { DestroyBoxMonIcon(sStorage->boxMonsSprites[sCursorPosition]); CreateBoxMonIconAtPos(sCursorPosition); SetBoxMonIconObjMode(sCursorPosition, GetMonData(boxMon, MON_DATA_HELD_ITEM) == ITEM_NONE); - } - // - /* - sStorage->boxMonsSprites[sCursorPosition] = CreateMonIconSprite(sStorage->boxSpecies[sCursorPosition], - sStorage->boxPersonalities[sCursorPosition], - x, y, 2, subpriority - sStorage->boxMonsSprites[sCursorPosition] = CreateMonIconSprite(species, personality, x, y, 2, 19 - (sCursorPosition % IN_BOX_COLUMNS)); - */ - //DestroyBoxMonIcon(sStorage->partySprites[i]) - //sStorage->partySprites[0] = CreateMonIconSprite(species, personality, 104, 64, 1, 12); - //DestroyBoxMonIconAtPosition(boxPosition); - } From 1f559df27d3f313747017fd8dd89e8020a058c49 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 29 Sep 2021 02:01:08 -0300 Subject: [PATCH 022/417] Final function name --- src/pokemon_storage_system.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 827ee7b3eb..e4b529b7ac 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -871,7 +871,7 @@ static void UnkUtil_CpuRun(struct UnkUtilData *); static void UnkUtil_DmaRun(struct UnkUtilData *); // Form changing -void SetArceusFormPSS(struct BoxPokemon *boxMon); +void SetMonFormPSS(struct BoxPokemon *boxMon); void UpdateSpeciesSpritePSS(struct BoxPokemon *boxmon); struct { @@ -6870,7 +6870,7 @@ static void ReshowDisplayMon(void) TryRefreshDisplayMon(); } -void SetArceusFormPSS(struct BoxPokemon *boxMon) +void SetMonFormPSS(struct BoxPokemon *boxMon) { u16 species = GetMonData(boxMon, MON_DATA_SPECIES); u16 targetSpecies = GetFormChangeTargetSpeciesBoxMon(boxMon, FORM_ITEM_HOLD, 0); @@ -6969,7 +6969,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) if (sStorage->displayMonSpecies == SPECIES_NIDORAN_F || sStorage->displayMonSpecies == SPECIES_NIDORAN_M) gender = MON_GENDERLESS; - SetArceusFormPSS(pokemon); + SetMonFormPSS(pokemon); StringCopyPadded(sStorage->displayMonNameText, sStorage->displayMonName, CHAR_SPACE, 5); From e6999653323a4a7a424e9d7d39fd3168dd84b355 Mon Sep 17 00:00:00 2001 From: Pokestia Date: Wed, 29 Sep 2021 17:45:39 +0200 Subject: [PATCH 023/417] Use compact weather macros --- data/battle_scripts_1.s | 2 +- src/battle_util.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 30ca1b2201..7a65573e6b 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1901,7 +1901,7 @@ BattleScript_EffectStomp:: BattleScript_EffectSolarbeam:: jumpifabilitypresent ABILITY_CLOUD_NINE, BattleScript_SolarbeamDecideTurn jumpifabilitypresent ABILITY_AIR_LOCK, BattleScript_SolarbeamDecideTurn - jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT, BattleScript_SolarbeamOnFirstTurn + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_ANY, BattleScript_SolarbeamOnFirstTurn BattleScript_SolarbeamDecideTurn:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn diff --git a/src/battle_util.c b/src/battle_util.c index 62f7897c67..fa85151b3a 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2491,7 +2491,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case WEATHER_SANDSTORM: if (!(gBattleWeather & WEATHER_SANDSTORM_ANY)) { - gBattleWeather = (WEATHER_SANDSTORM_PERMANENT | WEATHER_SANDSTORM_TEMPORARY); + gBattleWeather = WEATHER_SANDSTORM_ANY; gBattleScripting.animArg1 = B_ANIM_SANDSTORM_CONTINUES; gBattleScripting.battler = battler; effect++; @@ -2500,7 +2500,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case WEATHER_DROUGHT: if (!(gBattleWeather & WEATHER_SUN_ANY)) { - gBattleWeather = (WEATHER_SUN_PERMANENT | WEATHER_SUN_TEMPORARY); + gBattleWeather = WEATHER_SUN_ANY; gBattleScripting.animArg1 = B_ANIM_SUN_CONTINUES; gBattleScripting.battler = battler; effect++; @@ -2526,7 +2526,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case ABILITY_SAND_STREAM: if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT)) { - gBattleWeather = (WEATHER_SANDSTORM_PERMANENT | WEATHER_SANDSTORM_TEMPORARY); + gBattleWeather = WEATHER_SANDSTORM_ANY; BattleScriptPushCursorAndCallback(BattleScript_SandstreamActivates); gBattleScripting.battler = battler; effect++; @@ -2535,7 +2535,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case ABILITY_DROUGHT: if (!(gBattleWeather & WEATHER_SUN_PERMANENT)) { - gBattleWeather = (WEATHER_SUN_PERMANENT | WEATHER_SUN_TEMPORARY); + gBattleWeather = WEATHER_SUN_ANY; BattleScriptPushCursorAndCallback(BattleScript_DroughtActivates); gBattleScripting.battler = battler; effect++; From 9114f3d1dc26c75eecc90184834ab7edd402a00a Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 29 Sep 2021 19:40:26 -0300 Subject: [PATCH 024/417] Fixed lag and icons getting stuck when giving an item from the bag --- src/pokemon_storage_system.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index e4b529b7ac..da24f9b9a6 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -569,6 +569,7 @@ EWRAM_DATA static bool8 sIsMonBeingMoved = 0; EWRAM_DATA static u8 sMovingMonOrigBoxId = 0; EWRAM_DATA static u8 sMovingMonOrigBoxPos = 0; EWRAM_DATA static bool8 sAutoActionOn = 0; +EWRAM_DATA static bool8 sJustOpenedBag = 0; // Main tasks static void EnterPokeStorage(u8); @@ -3100,6 +3101,7 @@ static void Task_TakeItemForMoving(u8 taskId) StartCursorAnim(CURSOR_ANIM_OPEN); TakeItemFromMon(sInPartyMenu ? CURSOR_AREA_IN_PARTY : CURSOR_AREA_IN_BOX, GetCursorPosition()); sStorage->state++; + sJustOpenedBag = FALSE; break; case 2: if (!IsItemIconAnimActive()) @@ -3619,6 +3621,7 @@ static void Task_GiveItemFromBag(u8 taskId) sWhichToReshow = SCREEN_CHANGE_ITEM_FROM_BAG - 1; sStorage->screenChangeType = SCREEN_CHANGE_ITEM_FROM_BAG; SetPokeStorageTask(Task_ChangeScreen); + sJustOpenedBag = TRUE; } break; } @@ -6968,8 +6971,6 @@ static void SetDisplayMonData(void *pokemon, u8 mode) { if (sStorage->displayMonSpecies == SPECIES_NIDORAN_F || sStorage->displayMonSpecies == SPECIES_NIDORAN_M) gender = MON_GENDERLESS; - - SetMonFormPSS(pokemon); StringCopyPadded(sStorage->displayMonNameText, sStorage->displayMonName, CHAR_SPACE, 5); @@ -7019,6 +7020,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) StringCopyPadded(sStorage->displayMonItemName, ItemId_GetName(sStorage->displayMonItemId), CHAR_SPACE, 8); else StringFill(sStorage->displayMonItemName, CHAR_SPACE, 8); + SetMonFormPSS(pokemon); } } @@ -10110,15 +10112,19 @@ void UpdateSpeciesSpritePSS(struct BoxPokemon *boxMon) LoadDisplayMonGfx(species, pid); // Recreate icon sprite - if (sInPartyMenu) + if (!sJustOpenedBag) { - DestroyAllPartyMonIcons(); - CreatePartyMonsSprites(TRUE); - } - else - { - DestroyBoxMonIcon(sStorage->boxMonsSprites[sCursorPosition]); - CreateBoxMonIconAtPos(sCursorPosition); - SetBoxMonIconObjMode(sCursorPosition, GetMonData(boxMon, MON_DATA_HELD_ITEM) == ITEM_NONE); + if (sInPartyMenu) + { + DestroyAllPartyMonIcons(); + CreatePartyMonsSprites(TRUE); + } + else + { + DestroyBoxMonIcon(sStorage->boxMonsSprites[sCursorPosition]); + CreateBoxMonIconAtPos(sCursorPosition); + SetBoxMonIconObjMode(sCursorPosition, GetMonData(boxMon, MON_DATA_HELD_ITEM) == ITEM_NONE); + } } + sJustOpenedBag = FALSE; } From e6c81d2862536d396bb69f5910f2d089384fc319 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 29 Sep 2021 21:30:54 -0300 Subject: [PATCH 025/417] Fixed form change when swapping items --- src/pokemon.c | 3 ++- src/pokemon_storage_system.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index 021eca1d19..0ac67f0cf2 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8073,7 +8073,8 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg switch (method) { case FORM_ITEM_HOLD: - if (GetBoxMonData(mon, MON_DATA_HELD_ITEM, NULL) == formChanges[i].param1 && (ability == formChanges[i].param2 || formChanges[i].param2 == ABILITY_NONE)) + if ((GetBoxMonData(mon, MON_DATA_HELD_ITEM, NULL) == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) + && (ability == formChanges[i].param2 || formChanges[i].param2 == ABILITY_NONE)) targetSpecies = formChanges[i].targetSpecies; break; case FORM_ITEM_USE: diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index da24f9b9a6..0626fcd0b0 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -8575,7 +8575,7 @@ static void MultiMove_RemoveMonsFromBox(void) u8 boxPosition = (IN_BOX_COLUMNS * i) + sMultiMove->minColumn; for (j = sMultiMove->minColumn; j < columnCount; j++) { - DestroyBoxMonIconAtPosition(boxPosition);//bookmark + DestroyBoxMonIconAtPosition(boxPosition); ZeroBoxMonAt(boxId, boxPosition); boxPosition++; } From 38a4dea402aee2d038d81fa5bde60687caf9cfb6 Mon Sep 17 00:00:00 2001 From: Pokestia Date: Thu, 30 Sep 2021 12:08:20 +0200 Subject: [PATCH 026/417] Rename Battle Weather flags --- data/battle_scripts_1.s | 2 +- include/constants/battle.h | 26 +++++++------- src/battle_ai_script_commands.c | 8 ++--- src/battle_anim_effects_3.c | 8 ++--- src/battle_main.c | 8 ++--- src/battle_script_commands.c | 42 +++++++++++----------- src/battle_tv.c | 8 ++--- src/battle_util.c | 62 ++++++++++++++++----------------- src/pokemon.c | 6 ++-- 9 files changed, 85 insertions(+), 85 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 7a65573e6b..951558234b 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1901,7 +1901,7 @@ BattleScript_EffectStomp:: BattleScript_EffectSolarbeam:: jumpifabilitypresent ABILITY_CLOUD_NINE, BattleScript_SolarbeamDecideTurn jumpifabilitypresent ABILITY_AIR_LOCK, BattleScript_SolarbeamDecideTurn - jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_ANY, BattleScript_SolarbeamOnFirstTurn + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN, BattleScript_SolarbeamOnFirstTurn BattleScript_SolarbeamDecideTurn:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn diff --git a/include/constants/battle.h b/include/constants/battle.h index a848146eb0..f1ce757e74 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -210,19 +210,19 @@ #define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED) // Battle Weather flags -#define WEATHER_RAIN_TEMPORARY (1 << 0) -#define WEATHER_RAIN_DOWNPOUR (1 << 1) // unused -#define WEATHER_RAIN_PERMANENT (1 << 2) -#define WEATHER_RAIN_ANY (WEATHER_RAIN_TEMPORARY | WEATHER_RAIN_DOWNPOUR | WEATHER_RAIN_PERMANENT) -#define WEATHER_SANDSTORM_TEMPORARY (1 << 3) -#define WEATHER_SANDSTORM_PERMANENT (1 << 4) -#define WEATHER_SANDSTORM_ANY (WEATHER_SANDSTORM_TEMPORARY | WEATHER_SANDSTORM_PERMANENT) -#define WEATHER_SUN_TEMPORARY (1 << 5) -#define WEATHER_SUN_PERMANENT (1 << 6) -#define WEATHER_SUN_ANY (WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT) -#define WEATHER_HAIL (1 << 7) -#define WEATHER_HAIL_ANY (WEATHER_HAIL) -#define WEATHER_ANY (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY) +#define B_WEATHER_RAIN_TEMPORARY (1 << 0) +#define B_WEATHER_RAIN_DOWNPOUR (1 << 1) // unused +#define B_WEATHER_RAIN_PERMANENT (1 << 2) +#define B_WEATHER_RAIN (B_WEATHER_RAIN_TEMPORARY | B_WEATHER_RAIN_DOWNPOUR | B_WEATHER_RAIN_PERMANENT) +#define B_WEATHER_SANDSTORM_TEMPORARY (1 << 3) +#define B_WEATHER_SANDSTORM_PERMANENT (1 << 4) +#define B_WEATHER_SANDSTORM (B_WEATHER_SANDSTORM_TEMPORARY | B_WEATHER_SANDSTORM_PERMANENT) +#define B_WEATHER_SUN_TEMPORARY (1 << 5) +#define B_WEATHER_SUN_PERMANENT (1 << 6) +#define B_WEATHER_SUN (B_WEATHER_SUN_TEMPORARY | B_WEATHER_SUN_PERMANENT) +#define B_WEATHER_HAIL_TEMPORARY (1 << 7) +#define B_WEATHER_HAIL (B_WEATHER_HAIL_TEMPORARY) +#define B_WEATHER_ANY (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_SUN | B_WEATHER_HAIL) // Move Effects #define MOVE_EFFECT_SLEEP 1 diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index bb615e4972..b1b62fd5b4 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -1632,13 +1632,13 @@ static void Cmd_if_status_not_in_party(void) static void Cmd_get_weather(void) { - if (gBattleWeather & WEATHER_RAIN_ANY) + if (gBattleWeather & B_WEATHER_RAIN) AI_THINKING_STRUCT->funcResult = AI_WEATHER_RAIN; - if (gBattleWeather & WEATHER_SANDSTORM_ANY) + if (gBattleWeather & B_WEATHER_SANDSTORM) AI_THINKING_STRUCT->funcResult = AI_WEATHER_SANDSTORM; - if (gBattleWeather & WEATHER_SUN_ANY) + if (gBattleWeather & B_WEATHER_SUN) AI_THINKING_STRUCT->funcResult = AI_WEATHER_SUN; - if (gBattleWeather & WEATHER_HAIL_ANY) + if (gBattleWeather & B_WEATHER_HAIL) AI_THINKING_STRUCT->funcResult = AI_WEATHER_HAIL; gAIScriptPtr += 1; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index f5c2c7ee65..c827aaaa63 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -5421,13 +5421,13 @@ static void AnimRecycle_Step(struct Sprite *sprite) void AnimTask_GetWeather(u8 taskId) { gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_NONE; - if (gWeatherMoveAnim & WEATHER_SUN_ANY) + if (gWeatherMoveAnim & B_WEATHER_SUN) gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SUN; - else if (gWeatherMoveAnim & WEATHER_RAIN_ANY) + else if (gWeatherMoveAnim & B_WEATHER_RAIN) gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_RAIN; - else if (gWeatherMoveAnim & WEATHER_SANDSTORM_ANY) + else if (gWeatherMoveAnim & B_WEATHER_SANDSTORM) gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SANDSTORM; - else if (gWeatherMoveAnim & WEATHER_HAIL_ANY) + else if (gWeatherMoveAnim & B_WEATHER_HAIL) gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_HAIL; DestroyAnimVisualTask(taskId); diff --git a/src/battle_main.c b/src/battle_main.c index f4e1c4d3de..9fda5acbc4 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4525,14 +4525,14 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves) if (WEATHER_HAS_EFFECT) { - if ((gBattleMons[battler1].ability == ABILITY_SWIFT_SWIM && gBattleWeather & WEATHER_RAIN_ANY) - || (gBattleMons[battler1].ability == ABILITY_CHLOROPHYLL && gBattleWeather & WEATHER_SUN_ANY)) + if ((gBattleMons[battler1].ability == ABILITY_SWIFT_SWIM && gBattleWeather & B_WEATHER_RAIN) + || (gBattleMons[battler1].ability == ABILITY_CHLOROPHYLL && gBattleWeather & B_WEATHER_SUN)) speedMultiplierBattler1 = 2; else speedMultiplierBattler1 = 1; - if ((gBattleMons[battler2].ability == ABILITY_SWIFT_SWIM && gBattleWeather & WEATHER_RAIN_ANY) - || (gBattleMons[battler2].ability == ABILITY_CHLOROPHYLL && gBattleWeather & WEATHER_SUN_ANY)) + if ((gBattleMons[battler2].ability == ABILITY_SWIFT_SWIM && gBattleWeather & B_WEATHER_RAIN) + || (gBattleMons[battler2].ability == ABILITY_CHLOROPHYLL && gBattleWeather & B_WEATHER_SUN)) speedMultiplierBattler2 = 2; else speedMultiplierBattler2 = 1; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e33e317963..e7520b1ee7 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1079,7 +1079,7 @@ static bool8 AccuracyCalcHelper(u16 move) gHitMarker &= ~HITMARKER_IGNORE_UNDERWATER; - if ((WEATHER_HAS_EFFECT && (gBattleWeather & WEATHER_RAIN_ANY) && gBattleMoves[move].effect == EFFECT_THUNDER) + if ((WEATHER_HAS_EFFECT && (gBattleWeather & B_WEATHER_RAIN) && gBattleMoves[move].effect == EFFECT_THUNDER) || (gBattleMoves[move].effect == EFFECT_ALWAYS_HIT || gBattleMoves[move].effect == EFFECT_VITAL_THROW)) { JumpIfMoveFailed(7, move); @@ -1136,7 +1136,7 @@ static void Cmd_accuracycheck(void) moveAcc = gBattleMoves[move].accuracy; // check Thunder on sunny weather - if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY && gBattleMoves[move].effect == EFFECT_THUNDER) + if (WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_SUN && gBattleMoves[move].effect == EFFECT_THUNDER) moveAcc = 50; calc = sAccuracyStageRatios[buff].dividend * moveAcc; @@ -1144,7 +1144,7 @@ static void Cmd_accuracycheck(void) if (gBattleMons[gBattlerAttacker].ability == ABILITY_COMPOUND_EYES) calc = (calc * 130) / 100; // 1.3 compound eyes boost - if (WEATHER_HAS_EFFECT && gBattleMons[gBattlerTarget].ability == ABILITY_SAND_VEIL && gBattleWeather & WEATHER_SANDSTORM_ANY) + if (WEATHER_HAS_EFFECT && gBattleMons[gBattlerTarget].ability == ABILITY_SAND_VEIL && gBattleWeather & B_WEATHER_SANDSTORM) calc = (calc * 80) / 100; // 1.2 sand veil loss if (gBattleMons[gBattlerAttacker].ability == ABILITY_HUSTLE && IS_TYPE_PHYSICAL(type)) calc = (calc * 80) / 100; // 1.2 hustle loss @@ -2342,7 +2342,7 @@ void SetMoveEffect(bool8 primary, u8 certain) statusChanged = TRUE; break; case STATUS1_FREEZE: - if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY) + if (WEATHER_HAS_EFFECT && gBattleWeather & B_WEATHER_SUN) noSunCanFreeze = FALSE; if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_ICE)) break; @@ -6617,14 +6617,14 @@ static void Cmd_trymirrormove(void) static void Cmd_setrain(void) { - if (gBattleWeather & WEATHER_RAIN_ANY) + if (gBattleWeather & B_WEATHER_RAIN) { gMoveResultFlags |= MOVE_RESULT_MISSED; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; } else { - gBattleWeather = WEATHER_RAIN_TEMPORARY; + gBattleWeather = B_WEATHER_RAIN_TEMPORARY; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_RAIN; gWishFutureKnock.weatherDuration = 5; } @@ -7481,14 +7481,14 @@ static void Cmd_damagetohalftargethp(void) // super fang static void Cmd_setsandstorm(void) { - if (gBattleWeather & WEATHER_SANDSTORM_ANY) + if (gBattleWeather & B_WEATHER_SANDSTORM) { gMoveResultFlags |= MOVE_RESULT_MISSED; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; } else { - gBattleWeather = WEATHER_SANDSTORM_TEMPORARY; + gBattleWeather = B_WEATHER_SANDSTORM_TEMPORARY; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SANDSTORM; gWishFutureKnock.weatherDuration = 5; } @@ -7499,7 +7499,7 @@ static void Cmd_weatherdamage(void) { if (WEATHER_HAS_EFFECT) { - if (gBattleWeather & WEATHER_SANDSTORM_ANY) + if (gBattleWeather & B_WEATHER_SANDSTORM) { if (gBattleMons[gBattlerAttacker].type1 != TYPE_ROCK && gBattleMons[gBattlerAttacker].type1 != TYPE_STEEL @@ -7520,7 +7520,7 @@ static void Cmd_weatherdamage(void) gBattleMoveDamage = 0; } } - if (gBattleWeather & WEATHER_HAIL_ANY) + if (gBattleWeather & B_WEATHER_HAIL) { if (!IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ICE) && !(gStatuses3[gBattlerAttacker] & STATUS3_UNDERGROUND) @@ -8104,7 +8104,7 @@ static u8 AttacksThisTurn(u8 battlerId, u16 move) // Note: returns 1 if it's a c { // first argument is unused if (gBattleMoves[move].effect == EFFECT_SOLARBEAM - && (gBattleWeather & WEATHER_SUN_ANY)) + && (gBattleWeather & B_WEATHER_SUN)) return 2; if (gBattleMoves[move].effect == EFFECT_SKULL_BASH @@ -8638,14 +8638,14 @@ static void Cmd_jumpifnopursuitswitchdmg(void) static void Cmd_setsunny(void) { - if (gBattleWeather & WEATHER_SUN_ANY) + if (gBattleWeather & B_WEATHER_SUN) { gMoveResultFlags |= MOVE_RESULT_MISSED; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; } else { - gBattleWeather = WEATHER_SUN_TEMPORARY; + gBattleWeather = B_WEATHER_SUN_TEMPORARY; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SUNLIGHT; gWishFutureKnock.weatherDuration = 5; } @@ -8739,7 +8739,7 @@ static void Cmd_recoverbasedonsunlight(void) { if (gBattleWeather == 0 || !WEATHER_HAS_EFFECT) gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 2; - else if (gBattleWeather & WEATHER_SUN_ANY) + else if (gBattleWeather & B_WEATHER_SUN) gBattleMoveDamage = 20 * gBattleMons[gBattlerAttacker].maxHP / 30; else // not sunny weather gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 4; @@ -8920,14 +8920,14 @@ static void Cmd_setminimize(void) static void Cmd_sethail(void) { - if (gBattleWeather & WEATHER_HAIL_ANY) + if (gBattleWeather & B_WEATHER_HAIL) { gMoveResultFlags |= MOVE_RESULT_MISSED; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; } else { - gBattleWeather = WEATHER_HAIL; + gBattleWeather = B_WEATHER_HAIL_TEMPORARY; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_HAIL; gWishFutureKnock.weatherDuration = 5; } @@ -9640,15 +9640,15 @@ static void Cmd_setweatherballtype(void) { if (WEATHER_HAS_EFFECT) { - if (gBattleWeather & WEATHER_ANY) + if (gBattleWeather & B_WEATHER_ANY) gBattleScripting.dmgMultiplier = 2; - if (gBattleWeather & WEATHER_RAIN_ANY) + if (gBattleWeather & B_WEATHER_RAIN) *(&gBattleStruct->dynamicMoveType) = TYPE_WATER | 0x80; - else if (gBattleWeather & WEATHER_SANDSTORM_ANY) + else if (gBattleWeather & B_WEATHER_SANDSTORM) *(&gBattleStruct->dynamicMoveType) = TYPE_ROCK | 0x80; - else if (gBattleWeather & WEATHER_SUN_ANY) + else if (gBattleWeather & B_WEATHER_SUN) *(&gBattleStruct->dynamicMoveType) = TYPE_FIRE | 0x80; - else if (gBattleWeather & WEATHER_HAIL_ANY) + else if (gBattleWeather & B_WEATHER_HAIL) *(&gBattleStruct->dynamicMoveType) = TYPE_ICE | 0x80; else *(&gBattleStruct->dynamicMoveType) = TYPE_NORMAL | 0x80; diff --git a/src/battle_tv.c b/src/battle_tv.c index 2c6c1b0a34..ffdadb697f 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -1593,12 +1593,12 @@ u8 GetBattlerMoveSlotId(u8 battlerId, u16 moveId) static void AddPointsBasedOnWeather(u16 weatherFlags, u16 moveId, u8 moveSlot) { - if (weatherFlags & WEATHER_RAIN_ANY) + if (weatherFlags & B_WEATHER_RAIN) AddMovePoints(PTS_RAIN, moveId, moveSlot, 0); - else if (weatherFlags & WEATHER_SUN_ANY) + else if (weatherFlags & B_WEATHER_SUN) AddMovePoints(PTS_SUN, moveId, moveSlot, 0); - else if (weatherFlags & WEATHER_SANDSTORM_ANY) + else if (weatherFlags & B_WEATHER_SANDSTORM) AddMovePoints(PTS_SANDSTORM, moveId, moveSlot, 0); - else if (weatherFlags & WEATHER_HAIL_ANY) + else if (weatherFlags & B_WEATHER_HAIL) AddMovePoints(PTS_HAIL, moveId, moveSlot, 0); } diff --git a/src/battle_util.c b/src/battle_util.c index fa85151b3a..8617134dc9 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1320,22 +1320,22 @@ u8 DoFieldEndTurnEffects(void) } break; case ENDTURN_RAIN: - if (gBattleWeather & WEATHER_RAIN_ANY) + if (gBattleWeather & B_WEATHER_RAIN) { - if (!(gBattleWeather & WEATHER_RAIN_PERMANENT)) + if (!(gBattleWeather & B_WEATHER_RAIN_PERMANENT)) { if (--gWishFutureKnock.weatherDuration == 0) { - gBattleWeather &= ~WEATHER_RAIN_TEMPORARY; - gBattleWeather &= ~WEATHER_RAIN_DOWNPOUR; + gBattleWeather &= ~B_WEATHER_RAIN_TEMPORARY; + gBattleWeather &= ~B_WEATHER_RAIN_DOWNPOUR; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_RAIN_STOPPED; } - else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR) + else if (gBattleWeather & B_WEATHER_RAIN_DOWNPOUR) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOWNPOUR_CONTINUES; else gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_RAIN_CONTINUES; } - else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR) + else if (gBattleWeather & B_WEATHER_RAIN_DOWNPOUR) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOWNPOUR_CONTINUES; } @@ -1350,11 +1350,11 @@ u8 DoFieldEndTurnEffects(void) gBattleStruct->turnCountersTracker++; break; case ENDTURN_SANDSTORM: - if (gBattleWeather & WEATHER_SANDSTORM_ANY) + if (gBattleWeather & B_WEATHER_SANDSTORM) { - if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) + if (!(gBattleWeather & B_WEATHER_SANDSTORM_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) { - gBattleWeather &= ~WEATHER_SANDSTORM_TEMPORARY; + gBattleWeather &= ~B_WEATHER_SANDSTORM_TEMPORARY; gBattlescriptCurrInstr = BattleScript_SandStormHailEnds; } else @@ -1370,11 +1370,11 @@ u8 DoFieldEndTurnEffects(void) gBattleStruct->turnCountersTracker++; break; case ENDTURN_SUN: - if (gBattleWeather & WEATHER_SUN_ANY) + if (gBattleWeather & B_WEATHER_SUN) { - if (!(gBattleWeather & WEATHER_SUN_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) + if (!(gBattleWeather & B_WEATHER_SUN_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) { - gBattleWeather &= ~WEATHER_SUN_TEMPORARY; + gBattleWeather &= ~B_WEATHER_SUN_TEMPORARY; gBattlescriptCurrInstr = BattleScript_SunlightFaded; } else @@ -1388,11 +1388,11 @@ u8 DoFieldEndTurnEffects(void) gBattleStruct->turnCountersTracker++; break; case ENDTURN_HAIL: - if (gBattleWeather & WEATHER_HAIL_ANY) + if (gBattleWeather & B_WEATHER_HAIL) { if (--gWishFutureKnock.weatherDuration == 0) { - gBattleWeather &= ~WEATHER_HAIL; + gBattleWeather &= ~B_WEATHER_HAIL_TEMPORARY; gBattlescriptCurrInstr = BattleScript_SandStormHailEnds; } else @@ -2389,22 +2389,22 @@ u8 CastformDataTypeChange(u8 battler) } if (!WEATHER_HAS_EFFECT) return CASTFORM_NO_CHANGE; - if (!(gBattleWeather & (WEATHER_RAIN_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL)) + if (!(gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SUN | B_WEATHER_HAIL)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL)) { SET_BATTLER_TYPE(battler, TYPE_NORMAL); formChange = CASTFORM_TO_NORMAL; } - if (gBattleWeather & WEATHER_SUN_ANY && !IS_BATTLER_OF_TYPE(battler, TYPE_FIRE)) + if (gBattleWeather & B_WEATHER_SUN && !IS_BATTLER_OF_TYPE(battler, TYPE_FIRE)) { SET_BATTLER_TYPE(battler, TYPE_FIRE); formChange = CASTFORM_TO_FIRE; } - if (gBattleWeather & WEATHER_RAIN_ANY && !IS_BATTLER_OF_TYPE(battler, TYPE_WATER)) + if (gBattleWeather & B_WEATHER_RAIN && !IS_BATTLER_OF_TYPE(battler, TYPE_WATER)) { SET_BATTLER_TYPE(battler, TYPE_WATER); formChange = CASTFORM_TO_WATER; } - if (gBattleWeather & WEATHER_HAIL_ANY && !IS_BATTLER_OF_TYPE(battler, TYPE_ICE)) + if (gBattleWeather & B_WEATHER_HAIL && !IS_BATTLER_OF_TYPE(battler, TYPE_ICE)) { SET_BATTLER_TYPE(battler, TYPE_ICE); formChange = CASTFORM_TO_ICE; @@ -2480,27 +2480,27 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case WEATHER_RAIN: case WEATHER_RAIN_THUNDERSTORM: case WEATHER_DOWNPOUR: - if (!(gBattleWeather & WEATHER_RAIN_ANY)) + if (!(gBattleWeather & B_WEATHER_RAIN)) { - gBattleWeather = (WEATHER_RAIN_TEMPORARY | WEATHER_RAIN_PERMANENT); + gBattleWeather = (B_WEATHER_RAIN_TEMPORARY | B_WEATHER_RAIN_PERMANENT); gBattleScripting.animArg1 = B_ANIM_RAIN_CONTINUES; gBattleScripting.battler = battler; effect++; } break; case WEATHER_SANDSTORM: - if (!(gBattleWeather & WEATHER_SANDSTORM_ANY)) + if (!(gBattleWeather & B_WEATHER_SANDSTORM)) { - gBattleWeather = WEATHER_SANDSTORM_ANY; + gBattleWeather = B_WEATHER_SANDSTORM; gBattleScripting.animArg1 = B_ANIM_SANDSTORM_CONTINUES; gBattleScripting.battler = battler; effect++; } break; case WEATHER_DROUGHT: - if (!(gBattleWeather & WEATHER_SUN_ANY)) + if (!(gBattleWeather & B_WEATHER_SUN)) { - gBattleWeather = WEATHER_SUN_ANY; + gBattleWeather = B_WEATHER_SUN; gBattleScripting.animArg1 = B_ANIM_SUN_CONTINUES; gBattleScripting.battler = battler; effect++; @@ -2515,27 +2515,27 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA } break; case ABILITY_DRIZZLE: - if (!(gBattleWeather & WEATHER_RAIN_PERMANENT)) + if (!(gBattleWeather & B_WEATHER_RAIN_PERMANENT)) { - gBattleWeather = (WEATHER_RAIN_PERMANENT | WEATHER_RAIN_TEMPORARY); + gBattleWeather = (B_WEATHER_RAIN_PERMANENT | B_WEATHER_RAIN_TEMPORARY); BattleScriptPushCursorAndCallback(BattleScript_DrizzleActivates); gBattleScripting.battler = battler; effect++; } break; case ABILITY_SAND_STREAM: - if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT)) + if (!(gBattleWeather & B_WEATHER_SANDSTORM_PERMANENT)) { - gBattleWeather = WEATHER_SANDSTORM_ANY; + gBattleWeather = B_WEATHER_SANDSTORM; BattleScriptPushCursorAndCallback(BattleScript_SandstreamActivates); gBattleScripting.battler = battler; effect++; } break; case ABILITY_DROUGHT: - if (!(gBattleWeather & WEATHER_SUN_PERMANENT)) + if (!(gBattleWeather & B_WEATHER_SUN_PERMANENT)) { - gBattleWeather = WEATHER_SUN_ANY; + gBattleWeather = B_WEATHER_SUN; BattleScriptPushCursorAndCallback(BattleScript_DroughtActivates); gBattleScripting.battler = battler; effect++; @@ -2590,7 +2590,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA switch (gLastUsedAbility) { case ABILITY_RAIN_DISH: - if (WEATHER_HAS_EFFECT && (gBattleWeather & WEATHER_RAIN_ANY) + if (WEATHER_HAS_EFFECT && (gBattleWeather & B_WEATHER_RAIN) && gBattleMons[battler].maxHP > gBattleMons[battler].hp) { gLastUsedAbility = ABILITY_RAIN_DISH; // why diff --git a/src/pokemon.c b/src/pokemon.c index 9e1e84aee7..aca68d53c3 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -3268,7 +3268,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de // are effects of weather negated with cloud nine or air lock if (WEATHER_HAS_EFFECT2) { - if (gBattleWeather & WEATHER_RAIN_TEMPORARY) + if (gBattleWeather & B_WEATHER_RAIN_TEMPORARY) { switch (type) { @@ -3282,11 +3282,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } // any weather except sun weakens solar beam - if ((gBattleWeather & (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_HAIL_ANY)) && gCurrentMove == MOVE_SOLAR_BEAM) + if ((gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_HAIL)) && gCurrentMove == MOVE_SOLAR_BEAM) damage /= 2; // sunny - if (gBattleWeather & WEATHER_SUN_ANY) + if (gBattleWeather & B_WEATHER_SUN) { switch (type) { From b60aab1f6a232ca00fcd925fd27e94e1fa1303c2 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 30 Sep 2021 20:34:42 -0300 Subject: [PATCH 027/417] Fixed crash --- src/pokemon_storage_system.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 0626fcd0b0..7768f4e32d 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -10106,14 +10106,14 @@ void UpdateSpeciesSpritePSS(struct BoxPokemon *boxMon) u32 pid = GetBoxMonData(boxMon, MON_DATA_PERSONALITY); // Update front sprite - StartDisplayMonMosaicEffect(); sStorage->displayMonSpecies = species; sStorage->displayMonPalette = GetMonSpritePalFromSpeciesAndPersonality(species, otId, pid); LoadDisplayMonGfx(species, pid); - - // Recreate icon sprite if (!sJustOpenedBag) { + StartDisplayMonMosaicEffect(); + + // Recreate icon sprite if (sInPartyMenu) { DestroyAllPartyMonIcons(); From 0fd9d2c0d5bb5b4bf9ac624eddb965aefa7cbc24 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 30 Sep 2021 21:55:21 -0300 Subject: [PATCH 028/417] Optimized so it only changes forms when moving items. --- src/pokemon_storage_system.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 7768f4e32d..3c7051e169 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -3799,9 +3799,16 @@ static void GiveChosenBagItem(void) { u8 pos = GetCursorPosition(); if (sInPartyMenu) + { + struct Pokemon *mon = &gPlayerParty[pos]; SetMonData(&gPlayerParty[pos], MON_DATA_HELD_ITEM, &itemId); + SetMonFormPSS(&mon->box); + } else + { SetCurrentBoxMonData(pos, MON_DATA_HELD_ITEM, &itemId); + SetMonFormPSS(&gPokemonStoragePtr->boxes[StorageGetCurrentBox()][pos]); + } RemoveBagItem(itemId, 1); } @@ -7020,7 +7027,6 @@ static void SetDisplayMonData(void *pokemon, u8 mode) StringCopyPadded(sStorage->displayMonItemName, ItemId_GetName(sStorage->displayMonItemId), CHAR_SPACE, 8); else StringFill(sStorage->displayMonItemName, CHAR_SPACE, 8); - SetMonFormPSS(pokemon); } } @@ -8860,11 +8866,14 @@ static void TakeItemFromMon(u8 cursorArea, u8 cursorPos) { SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &itemId); SetBoxMonIconObjMode(cursorPos, 1); + SetMonFormPSS(&gPokemonStoragePtr->boxes[StorageGetCurrentBox()][cursorPos]); } else { + struct Pokemon *mon = &gPlayerParty[cursorPos]; SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &itemId); SetPartyMonIconObjMode(cursorPos, 1); + SetMonFormPSS(&mon->box); } sStorage->movingItemId = sStorage->displayMonItemId; @@ -8899,12 +8908,15 @@ static void SwapItemsWithMon(u8 cursorArea, u8 cursorPos) itemId = GetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM); SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &sStorage->movingItemId); sStorage->movingItemId = itemId; + SetMonFormPSS(&gPokemonStoragePtr->boxes[StorageGetCurrentBox()][cursorPos]); } else { + struct Pokemon *mon = &gPlayerParty[cursorPos]; itemId = GetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM); SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &sStorage->movingItemId); sStorage->movingItemId = itemId; + SetMonFormPSS(&mon->box); } id = GetItemIconIdxByPosition(CURSOR_AREA_IN_HAND, 0); @@ -8926,11 +8938,14 @@ static void GiveItemToMon(u8 cursorArea, u8 cursorPos) { SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &sStorage->movingItemId); SetBoxMonIconObjMode(cursorPos, 0); + SetMonFormPSS(&gPokemonStoragePtr->boxes[StorageGetCurrentBox()][cursorPos]); } else { + struct Pokemon *mon = &gPlayerParty[cursorPos]; SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &sStorage->movingItemId); SetPartyMonIconObjMode(cursorPos, 0); + SetMonFormPSS(&mon->box); } } @@ -8950,11 +8965,14 @@ static void MoveItemFromMonToBag(u8 cursorArea, u8 cursorPos) { SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &itemId); SetBoxMonIconObjMode(cursorPos, 1); + SetMonFormPSS(&gPokemonStoragePtr->boxes[StorageGetCurrentBox()][cursorPos]); } else { + struct Pokemon *mon = &gPlayerParty[cursorPos]; SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &itemId); SetPartyMonIconObjMode(cursorPos, 1); + SetMonFormPSS(&mon->box); } } From 5bf300f97c2f4f1aeefb7f9424fe502c08313404 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 30 Sep 2021 22:12:02 -0300 Subject: [PATCH 029/417] Fixed issue where by default mon would change into the last form due to the IE items being defined as ITEM_NONE --- include/constants/pokemon_config.h | 278 ++++++++++++++--------------- 1 file changed, 139 insertions(+), 139 deletions(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index c6e6a269f7..4bbb9e7de5 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -20,153 +20,153 @@ #ifndef ITEM_EXPANSION //Item Definitions for gEvolutionTable -//EVO_MEGA_EVOLUTION -#define ITEM_VENUSAURITE ITEM_NONE -#define ITEM_CHARIZARDITE_X ITEM_NONE -#define ITEM_CHARIZARDITE_Y ITEM_NONE -#define ITEM_BLASTOISINITE ITEM_NONE -#define ITEM_BEEDRILLITE ITEM_NONE -#define ITEM_PIDGEOTITE ITEM_NONE -#define ITEM_ALAKAZITE ITEM_NONE -#define ITEM_SLOWBRONITE ITEM_NONE -#define ITEM_GENGARITE ITEM_NONE -#define ITEM_KANGASKHANITE ITEM_NONE -#define ITEM_PINSIRITE ITEM_NONE -#define ITEM_GYARADOSITE ITEM_NONE -#define ITEM_AERODACTYLITE ITEM_NONE -#define ITEM_MEWTWONITE_X ITEM_NONE -#define ITEM_MEWTWONITE_Y ITEM_NONE -#define ITEM_AMPHAROSITE ITEM_NONE -#define ITEM_STEELIXITE ITEM_NONE -#define ITEM_SCIZORITE ITEM_NONE -#define ITEM_HERACRONITE ITEM_NONE -#define ITEM_HOUNDOOMINITE ITEM_NONE -#define ITEM_TYRANITARITE ITEM_NONE -#define ITEM_SCEPTILITE ITEM_NONE -#define ITEM_BLAZIKENITE ITEM_NONE -#define ITEM_SWAMPERTITE ITEM_NONE -#define ITEM_SABLENITE ITEM_NONE -#define ITEM_SHARPEDONITE ITEM_NONE -#define ITEM_MANECTITE ITEM_NONE -#define ITEM_CAMERUPTITE ITEM_NONE -#define ITEM_GLALITITE ITEM_NONE -#define ITEM_MAWILITE ITEM_NONE -#define ITEM_MEDICHAMITE ITEM_NONE -#define ITEM_ALTARIANITE ITEM_NONE -#define ITEM_ABSOLITE ITEM_NONE -#define ITEM_BANETTITE ITEM_NONE -#define ITEM_AGGRONITE ITEM_NONE -#define ITEM_GARDEVOIRITE ITEM_NONE -#define ITEM_SALAMENCITE ITEM_NONE -#define ITEM_METAGROSSITE ITEM_NONE -#define ITEM_LATIASITE ITEM_NONE -#define ITEM_LATIOSITE ITEM_NONE -#define ITEM_LOPUNNITE ITEM_NONE -#define ITEM_GARCHOMPITE ITEM_NONE -#define ITEM_LUCARIONITE ITEM_NONE -#define ITEM_ABOMASITE ITEM_NONE -#define ITEM_GALLADITE ITEM_NONE -#define ITEM_AUDINITE ITEM_NONE -#define ITEM_DIANCITE ITEM_NONE + //EVO_MEGA_EVOLUTION + #define ITEM_VENUSAURITE 10001 + #define ITEM_CHARIZARDITE_X 10002 + #define ITEM_CHARIZARDITE_Y 10003 + #define ITEM_BLASTOISINITE 10004 + #define ITEM_BEEDRILLITE 10005 + #define ITEM_PIDGEOTITE 10006 + #define ITEM_ALAKAZITE 10007 + #define ITEM_SLOWBRONITE 10008 + #define ITEM_GENGARITE 10009 + #define ITEM_KANGASKHANITE 10010 + #define ITEM_PINSIRITE 10011 + #define ITEM_GYARADOSITE 10012 + #define ITEM_AERODACTYLITE 10013 + #define ITEM_MEWTWONITE_X 10014 + #define ITEM_MEWTWONITE_Y 10015 + #define ITEM_AMPHAROSITE 10016 + #define ITEM_STEELIXITE 10017 + #define ITEM_SCIZORITE 10018 + #define ITEM_HERACRONITE 10019 + #define ITEM_HOUNDOOMINITE 10020 + #define ITEM_HOUNDOOMINITE 10021 + #define ITEM_SCEPTILITE 10022 + #define ITEM_BLAZIKENITE 10023 + #define ITEM_SWAMPERTITE 10024 + #define ITEM_SABLENITE 10025 + #define ITEM_SHARPEDONITE 10026 + #define ITEM_MANECTITE 10027 + #define ITEM_CAMERUPTITE 10028 + #define ITEM_GLALITITE 10029 + #define ITEM_MAWILITE 10030 + #define ITEM_MEDICHAMITE 10031 + #define ITEM_ALTARIANITE 10032 + #define ITEM_ABSOLITE 10033 + #define ITEM_BANETTITE 10034 + #define ITEM_AGGRONITE 10035 + #define ITEM_GARDEVOIRITE 10036 + #define ITEM_SALAMENCITE 10037 + #define ITEM_METAGROSSITE 10038 + #define ITEM_LATIASITE 10039 + #define ITEM_LATIOSITE 10040 + #define ITEM_LOPUNNITE 10041 + #define ITEM_GARCHOMPITE 10042 + #define ITEM_LUCARIONITE 10043 + #define ITEM_ABOMASITE 10044 + #define ITEM_GALLADITE 10045 + #define ITEM_AUDINITE 10046 + #define ITEM_DIANCITE 10047 -//EVO_TRADE_ITEM -#define ITEM_PROTECTOR ITEM_NONE -#define ITEM_ELECTIRIZER ITEM_NONE -#define ITEM_MAGMARIZER ITEM_NONE -#define ITEM_DUBIOUS_DISC ITEM_NONE -#define ITEM_PRISM_SCALE ITEM_NONE -#define ITEM_REAPER_CLOTH ITEM_NONE -#define ITEM_SACHET ITEM_NONE -#define ITEM_WHIPPED_DREAM ITEM_NONE + //EVO_TRADE_ITEM + #define ITEM_PROTECTOR 10048 + #define ITEM_ELECTIRIZER 10049 + #define ITEM_MAGMARIZER 10050 + #define ITEM_DUBIOUS_DISC 10051 + #define ITEM_PRISM_SCALE 10052 + #define ITEM_REAPER_CLOTH 10053 + #define ITEM_SACHET 10054 + #define ITEM_WHIPPED_DREAM 10055 -//EVO_ITEM -#define ITEM_ICE_STONE ITEM_NONE -#define ITEM_SHINY_STONE ITEM_NONE -#define ITEM_DUSK_STONE ITEM_NONE -#define ITEM_DAWN_STONE ITEM_NONE -#define ITEM_TART_APPLE ITEM_NONE -#define ITEM_SWEET_APPLE ITEM_NONE -#define ITEM_CRACKED_POT ITEM_NONE -#define ITEM_GALARICA_CUFF ITEM_NONE -#define ITEM_GALARICA_WREATH ITEM_NONE -#define ITEM_CHIPPED_POT ITEM_NONE + //EVO_ITEM + #define ITEM_ICE_STONE 10056 + #define ITEM_SHINY_STONE 10057 + #define ITEM_DUSK_STONE 10058 + #define ITEM_DAWN_STONE 10059 + #define ITEM_TART_APPLE 10060 + #define ITEM_SWEET_APPLE 10061 + #define ITEM_CRACKED_POT 10062 + #define ITEM_GALARICA_CUFF 10063 + #define ITEM_GALARICA_WREATH 10064 + #define ITEM_CHIPPED_POT 10065 -//EVO_ITEM_HOLD -#define ITEM_RAZOR_FANG ITEM_NONE -#define ITEM_RAZOR_CLAW ITEM_NONE -#define ITEM_OVAL_STONE ITEM_NONE + //EVO_ITEM_HOLD + #define ITEM_RAZOR_FANG 10066 + #define ITEM_RAZOR_CLAW 10067 + #define ITEM_OVAL_STONE 10068 -//FORM_ITEM_HOLD -#define ITEM_GRISEOUS_ORB ITEM_NONE -#define ITEM_DRACO_PLATE ITEM_NONE -#define ITEM_DREAD_PLATE ITEM_NONE -#define ITEM_EARTH_PLATE ITEM_NONE -#define ITEM_FIST_PLATE ITEM_NONE -#define ITEM_FLAME_PLATE ITEM_NONE -#define ITEM_ICICLE_PLATE ITEM_NONE -#define ITEM_INSECT_PLATE ITEM_NONE -#define ITEM_IRON_PLATE ITEM_NONE -#define ITEM_MEADOW_PLATE ITEM_NONE -#define ITEM_MIND_PLATE ITEM_NONE -#define ITEM_PIXIE_PLATE ITEM_NONE -#define ITEM_SKY_PLATE ITEM_NONE -#define ITEM_SPLASH_PLATE ITEM_NONE -#define ITEM_SPOOKY_PLATE ITEM_NONE -#define ITEM_STONE_PLATE ITEM_NONE -#define ITEM_TOXIC_PLATE ITEM_NONE -#define ITEM_ZAP_PLATE ITEM_NONE -#define ITEM_FIGHTINIUM_Z ITEM_NONE -#define ITEM_FLYINIUM_Z ITEM_NONE -#define ITEM_POISONIUM_Z ITEM_NONE -#define ITEM_GROUNDIUM_Z ITEM_NONE -#define ITEM_ROCKIUM_Z ITEM_NONE -#define ITEM_BUGINIUM_Z ITEM_NONE -#define ITEM_GHOSTIUM_Z ITEM_NONE -#define ITEM_STEELIUM_Z ITEM_NONE -#define ITEM_FIRIUM_Z ITEM_NONE -#define ITEM_WATERIUM_Z ITEM_NONE -#define ITEM_GRASSIUM_Z ITEM_NONE -#define ITEM_ELECTRIUM_Z ITEM_NONE -#define ITEM_PSYCHIUM_Z ITEM_NONE -#define ITEM_ICIUM_Z ITEM_NONE -#define ITEM_DRAGONIUM_Z ITEM_NONE -#define ITEM_DARKINIUM_Z ITEM_NONE -#define ITEM_FAIRIUM_Z ITEM_NONE -#define ITEM_DOUSE_DRIVE ITEM_NONE -#define ITEM_SHOCK_DRIVE ITEM_NONE -#define ITEM_BURN_DRIVE ITEM_NONE -#define ITEM_CHILL_DRIVE ITEM_NONE -#define ITEM_BUG_MEMORY ITEM_NONE -#define ITEM_DARK_MEMORY ITEM_NONE -#define ITEM_DRAGON_MEMORY ITEM_NONE -#define ITEM_ELECTRIC_MEMORY ITEM_NONE -#define ITEM_FAIRY_MEMORY ITEM_NONE -#define ITEM_FIGHTING_MEMORY ITEM_NONE -#define ITEM_FIRE_MEMORY ITEM_NONE -#define ITEM_FLYING_MEMORY ITEM_NONE -#define ITEM_GHOST_MEMORY ITEM_NONE -#define ITEM_GRASS_MEMORY ITEM_NONE -#define ITEM_GROUND_MEMORY ITEM_NONE -#define ITEM_ICE_MEMORY ITEM_NONE -#define ITEM_POISON_MEMORY ITEM_NONE -#define ITEM_PSYCHIC_MEMORY ITEM_NONE -#define ITEM_ROCK_MEMORY ITEM_NONE -#define ITEM_STEEL_MEMORY ITEM_NONE -#define ITEM_WATER_MEMORY ITEM_NONE + //FORM_ITEM_HOLD + #define ITEM_GRISEOUS_ORB 10069 + #define ITEM_DRACO_PLATE 10070 + #define ITEM_DREAD_PLATE 10071 + #define ITEM_EARTH_PLATE 10072 + #define ITEM_FIST_PLATE 10073 + #define ITEM_FLAME_PLATE 10074 + #define ITEM_ICICLE_PLATE 10075 + #define ITEM_INSECT_PLATE 10076 + #define ITEM_IRON_PLATE 10077 + #define ITEM_MEADOW_PLATE 10078 + #define ITEM_MIND_PLATE 10079 + #define ITEM_PIXIE_PLATE 10080 + #define ITEM_SKY_PLATE 10081 + #define ITEM_SPLASH_PLATE 10082 + #define ITEM_SPOOKY_PLATE 10083 + #define ITEM_STONE_PLATE 10084 + #define ITEM_TOXIC_PLATE 10085 + #define ITEM_ZAP_PLATE 10086 + #define ITEM_FIGHTINIUM_Z 10087 + #define ITEM_FLYINIUM_Z 10088 + #define ITEM_POISONIUM_Z 10089 + #define ITEM_GROUNDIUM_Z 10090 + #define ITEM_ROCKIUM_Z 10091 + #define ITEM_BUGINIUM_Z 10092 + #define ITEM_GHOSTIUM_Z 10093 + #define ITEM_STEELIUM_Z 10094 + #define ITEM_FIRIUM_Z 10095 + #define ITEM_WATERIUM_Z 10096 + #define ITEM_GRASSIUM_Z 10097 + #define ITEM_ELECTRIUM_Z 10098 + #define ITEM_PSYCHIUM_Z 10099 + #define ITEM_ICIUM_Z 10100 + #define ITEM_DRAGONIUM_Z 10101 + #define ITEM_DARKINIUM_Z 10102 + #define ITEM_FAIRIUM_Z 10103 + #define ITEM_DOUSE_DRIVE 10104 + #define ITEM_SHOCK_DRIVE 10105 + #define ITEM_BURN_DRIVE 10106 + #define ITEM_CHILL_DRIVE 10107 + #define ITEM_BUG_MEMORY 10108 + #define ITEM_DARK_MEMORY 10109 + #define ITEM_DRAGON_MEMORY 10110 + #define ITEM_ELECTRIC_MEMORY 10111 + #define ITEM_FAIRY_MEMORY 10112 + #define ITEM_FIGHTING_MEMORY 10113 + #define ITEM_FIRE_MEMORY 10114 + #define ITEM_FLYING_MEMORY 10115 + #define ITEM_GHOST_MEMORY 10116 + #define ITEM_GRASS_MEMORY 10117 + #define ITEM_GROUND_MEMORY 10118 + #define ITEM_ICE_MEMORY 10119 + #define ITEM_POISON_MEMORY 10120 + #define ITEM_PSYCHIC_MEMORY 10121 + #define ITEM_ROCK_MEMORY 10122 + #define ITEM_STEEL_MEMORY 10123 + #define ITEM_WATER_MEMORY 10124 -//FORM_ITEM_USE -#define ITEM_GRACIDEA ITEM_NONE -// #define ITEM_REVEAL_GLASS ITEM_NONE -// #define ITEM_PRISON_BOTTLE ITEM_NONE -#define ITEM_RED_NECTAR ITEM_NONE -#define ITEM_YELLOW_NECTAR ITEM_NONE -#define ITEM_PINK_NECTAR ITEM_NONE -#define ITEM_PURPLE_NECTAR ITEM_NONE + //FORM_ITEM_USE + #define ITEM_GRACIDEA 10125 + // #define ITEM_REVEAL_GLASS 10126 + // #define ITEM_PRISON_BOTTLE 10127 + #define ITEM_RED_NECTAR 10128 + #define ITEM_YELLOW_NECTAR 10129 + #define ITEM_PINK_NECTAR 10130 + #define ITEM_PURPLE_NECTAR 10131 #endif // ITEM_EXPANSION #ifndef BATTLE_ENGINE -#define ABILITY_MULTITYPE ABILITY_NONE -#define ABILITY_RKS_SYSTEM ABILITY_NONE + #define ABILITY_MULTITYPE ABILITY_NONE + #define ABILITY_RKS_SYSTEM ABILITY_NONE #endif // BATTLE_ENGINE #endif // GUARD_CONSTANTS_POKEMON_CONFIG_H From 5593a8378349b11409e9c68c13ca9e6a202ef9a2 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 30 Sep 2021 22:35:28 -0300 Subject: [PATCH 030/417] Fixed compile --- include/constants/pokemon_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 4bbb9e7de5..53bc6c526f 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -41,7 +41,7 @@ #define ITEM_SCIZORITE 10018 #define ITEM_HERACRONITE 10019 #define ITEM_HOUNDOOMINITE 10020 - #define ITEM_HOUNDOOMINITE 10021 + #define ITEM_TYRANITARITE 10021 #define ITEM_SCEPTILITE 10022 #define ITEM_BLAZIKENITE 10023 #define ITEM_SWAMPERTITE 10024 From 4ba03a6d54381378b7bf741b965029b6d3365724 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 30 Sep 2021 22:47:25 -0300 Subject: [PATCH 031/417] Fixed corruption bug when giving too many items from bag into boxes. --- src/pokemon_storage_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 3c7051e169..bf07fb5844 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -10126,9 +10126,9 @@ void UpdateSpeciesSpritePSS(struct BoxPokemon *boxMon) // Update front sprite sStorage->displayMonSpecies = species; sStorage->displayMonPalette = GetMonSpritePalFromSpeciesAndPersonality(species, otId, pid); - LoadDisplayMonGfx(species, pid); if (!sJustOpenedBag) { + LoadDisplayMonGfx(species, pid); StartDisplayMonMosaicEffect(); // Recreate icon sprite From 739e7d3c31f02ef4ea91b402c176f17a9bc27911 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 2 Oct 2021 23:47:59 -0400 Subject: [PATCH 032/417] Document summary screen sprite manager --- include/battle.h | 17 ++- include/data.h | 4 +- include/pokemon.h | 36 ++++-- src/battle_ai_switch_items.c | 1 + src/battle_anim_effects_3.c | 2 +- src/battle_gfx_sfx_util.c | 27 ++-- src/contest.c | 6 +- src/contest_painting.c | 14 +-- src/contest_util.c | 10 +- src/egg_hatch.c | 21 ++-- src/evolution_scene.c | 20 +-- src/main_menu.c | 7 +- src/pokeblock_feed.c | 4 +- src/pokemon.c | 234 +++++++++++++++++++---------------- src/pokemon_summary_screen.c | 36 ++++-- src/trade.c | 8 +- 16 files changed, 243 insertions(+), 204 deletions(-) diff --git a/include/battle.h b/include/battle.h index 14ecfbdd34..e32e621cc4 100644 --- a/include/battle.h +++ b/include/battle.h @@ -37,8 +37,6 @@ #define B_ACTION_NOTHING_FAINTED 13 // when choosing an action #define B_ACTION_NONE 0xFF -#define MAX_TRAINER_ITEMS 4 - // array entries for battle communication #define MULTIUSE_STATE 0 #define CURSOR_POSITION 1 @@ -594,16 +592,15 @@ struct BattleSpriteData struct MonSpritesGfx { void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon - union - { - void* ptr[4]; - u8* byte[4]; + union { + void* ptr[MAX_BATTLERS_COUNT]; + u8* byte[MAX_BATTLERS_COUNT]; } sprites; - struct SpriteTemplate templates[4]; - struct SpriteFrameImage field_74[4][4]; - u8 field_F4[0x80]; + struct SpriteTemplate templates[MAX_BATTLERS_COUNT]; + struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][4]; + u8 unusedArr[0x80]; u8 *barFontGfx; - void *field_178; + void *unusedPtr; u16 *buffer; }; diff --git a/include/data.h b/include/data.h index f94f55a8f3..374435cbab 100644 --- a/include/data.h +++ b/include/data.h @@ -5,6 +5,8 @@ #define SPECIES_SHINY_TAG 500 +#define MAX_TRAINER_ITEMS 4 + enum { BATTLER_AFFINE_NORMAL, BATTLER_AFFINE_EMERGE, @@ -66,7 +68,7 @@ struct Trainer /*0x02*/ u8 encounterMusic_gender; // last bit is gender /*0x03*/ u8 trainerPic; /*0x04*/ u8 trainerName[12]; - /*0x10*/ u16 items[4]; + /*0x10*/ u16 items[MAX_TRAINER_ITEMS]; /*0x18*/ bool8 doubleBattle; /*0x1C*/ u32 aiFlags; /*0x20*/ u8 partySize; diff --git a/include/pokemon.h b/include/pokemon.h index 3565bd9669..e656b2f040 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -122,20 +122,32 @@ struct Pokemon u16 spDefense; }; -struct Unknown_806F160_Struct +struct MonSpritesGfxManager { - u32 field_0_0:4; - u32 field_0_1:4; - u32 field_1:8; - u16 magic:8; - u32 field_3_0:4; - u32 field_3_1:4; - void *bytes; - u8 **byteArrays; + u32 numSprites:4; + u32 numSprites2:4; // Never read + u32 numFrames:8; + u32 active:8; + u32 dataSize:4; + u32 mode:4; // MON_SPR_GFX_MODE_* + void *spriteBuffer; + u8 **spritePointers; struct SpriteTemplate *templates; struct SpriteFrameImage *frameImages; }; +enum { + MON_SPR_GFX_MODE_NORMAL, + MON_SPR_GFX_MODE_BATTLE, + MON_SPR_GFX_MODE_FULL_PARTY, +}; + +enum { + MON_SPR_GFX_MANAGER_A, + MON_SPR_GFX_MANAGER_B, // Nothing ever sets up this manager. + MON_SPR_GFX_MANAGERS_COUNT +}; + struct BattlePokemon { /*0x00*/ u16 species; @@ -422,8 +434,8 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality); const u8 *GetTrainerClassNameFromId(u16 trainerId); const u8 *GetTrainerNameFromId(u16 trainerId); bool8 HasTwoFramesAnimation(u16 species); -struct Unknown_806F160_Struct *sub_806F2AC(u8 id, u8 arg1); -void sub_806F47C(u8 id); -u8 *sub_806F4F8(u8 id, u8 arg1); +struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 managerId, u8 mode); +void DestroyMonSpritesGfxManager(u8 managerId); +u8 *MonSpritesGfxManager_GetSpritePtr(u8 managerId, u8 spriteNum); #endif // GUARD_POKEMON_H diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 426dc5d157..537005d309 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -2,6 +2,7 @@ #include "battle.h" #include "battle_anim.h" #include "battle_controllers.h" +#include "data.h" #include "pokemon.h" #include "random.h" #include "util.h" diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index c827aaaa63..2a649dd8b2 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -2286,7 +2286,7 @@ void AnimTask_TransformMon(u8 taskId) sub_80A6BFC(&animBg, gBattleAnimAttacker); if (IsContest()) - position = 0; + position = B_POSITION_PLAYER_LEFT; else position = GetBattlerPosition(gBattleAnimAttacker); diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 77755775e3..da15c07a07 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -924,13 +924,13 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform if (IsContest()) { - position = 0; + position = B_POSITION_PLAYER_LEFT; targetSpecies = gContestResources->moveAnim->targetSpecies; personalityValue = gContestResources->moveAnim->personality; otId = gContestResources->moveAnim->otId; HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[targetSpecies], - gMonSpritesGfxPtr->sprites.ptr[0], + gMonSpritesGfxPtr->sprites.ptr[position], targetSpecies, gContestResources->moveAnim->targetPersonality); } @@ -1001,7 +1001,7 @@ void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite) if (!loadMonSprite) { if (IsContest()) - position = 0; + position = B_POSITION_PLAYER_LEFT; else position = GetBattlerPosition(battlerId); @@ -1260,11 +1260,11 @@ void AllocateMonSpritesGfx(void) for (j = 0; j < 4; j++) { - gMonSpritesGfxPtr->field_74[i][j].data = gMonSpritesGfxPtr->sprites.ptr[i] + (j * MON_PIC_SIZE); - gMonSpritesGfxPtr->field_74[i][j].size = MON_PIC_SIZE; + gMonSpritesGfxPtr->frameImages[i][j].data = gMonSpritesGfxPtr->sprites.ptr[i] + (j * MON_PIC_SIZE); + gMonSpritesGfxPtr->frameImages[i][j].size = MON_PIC_SIZE; } - gMonSpritesGfxPtr->templates[i].images = gMonSpritesGfxPtr->field_74[i]; + gMonSpritesGfxPtr->templates[i].images = gMonSpritesGfxPtr->frameImages[i]; } gMonSpritesGfxPtr->barFontGfx = AllocZeroed(0x1000); @@ -1275,17 +1275,14 @@ void FreeMonSpritesGfx(void) if (gMonSpritesGfxPtr == NULL) return; - if (gMonSpritesGfxPtr->buffer != NULL) - FREE_AND_SET_NULL(gMonSpritesGfxPtr->buffer); - if (gMonSpritesGfxPtr->field_178 != NULL) - FREE_AND_SET_NULL(gMonSpritesGfxPtr->field_178); - + TRY_FREE_AND_SET_NULL(gMonSpritesGfxPtr->buffer); + TRY_FREE_AND_SET_NULL(gMonSpritesGfxPtr->unusedPtr); FREE_AND_SET_NULL(gMonSpritesGfxPtr->barFontGfx); FREE_AND_SET_NULL(gMonSpritesGfxPtr->firstDecompressed); - gMonSpritesGfxPtr->sprites.ptr[0] = NULL; - gMonSpritesGfxPtr->sprites.ptr[1] = NULL; - gMonSpritesGfxPtr->sprites.ptr[2] = NULL; - gMonSpritesGfxPtr->sprites.ptr[3] = NULL; + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT] = NULL; + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT] = NULL; + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_RIGHT] = NULL; + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT] = NULL; FREE_AND_SET_NULL(gMonSpritesGfxPtr); } diff --git a/src/contest.c b/src/contest.c index 68cad859d9..a87e8f28b9 100644 --- a/src/contest.c +++ b/src/contest.c @@ -3122,12 +3122,12 @@ static u8 CreateContestantSprite(u16 species, u32 otId, u32 personality, u32 ind species = SanitizeSpecies(species); if (index == gContestPlayerMonIndex) - HandleLoadSpecialPokePic_2(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[0], species, personality); + HandleLoadSpecialPokePic_2(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], species, personality); else - HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[0], species, personality); + HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], species, personality); LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20); - SetMultiuseSpriteTemplateToPokemon(species, 0); + SetMultiuseSpriteTemplateToPokemon(species, B_POSITION_PLAYER_LEFT); spriteId = CreateSprite(&gMultiuseSpriteTemplate, 0x70, GetBattlerSpriteFinal_Y(2, species, FALSE), 30); gSprites[spriteId].oam.paletteNum = 2; diff --git a/src/contest_painting.c b/src/contest_painting.c index d4bc8ca04e..c591fc9efe 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -361,27 +361,27 @@ static void VBlankCB_ContestPainting(void) TransferPlttBuffer(); } -static void InitContestMonPixels(u16 species, u8 whichSprite) +static void InitContestMonPixels(u16 species, bool8 backPic) { const void *pal = GetMonSpritePalFromSpeciesAndPersonality(species, gContestPaintingWinner->trainerId, gContestPaintingWinner->personality); LZDecompressVram(pal, gContestPaintingMonPalette); - if (whichSprite == 0) + if (!backPic) { HandleLoadSpecialPokePic_DontHandleDeoxys( &gMonFrontPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[1], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, gContestPaintingWinner->personality); - _InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[1], gContestPaintingMonPalette, (void *)gContestMonPixels); + _InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels); } else { HandleLoadSpecialPokePic_DontHandleDeoxys( &gMonBackPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[0], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], species, gContestPaintingWinner->personality); - _InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[0], gContestPaintingMonPalette, (void *)gContestMonPixels); + _InitContestMonPixels(gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT], gContestPaintingMonPalette, (void *)gContestMonPixels); } } @@ -592,7 +592,7 @@ static void DoContestPaintingImageProcessing(u8 imageEffect) static void CreateContestPaintingPicture(u8 contestWinnerId, bool8 isForArtist) { AllocPaintingResources(); - InitContestMonPixels(gContestPaintingWinner->species, 0); + InitContestMonPixels(gContestPaintingWinner->species, FALSE); DoContestPaintingImageProcessing(GetImageEffectForContestWinner(contestWinnerId)); InitPaintingMonOamData(contestWinnerId); LoadContestPaintingFrame(contestWinnerId, isForArtist); diff --git a/src/contest_util.c b/src/contest_util.c index 66a666264c..d3e1a600e8 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -893,7 +893,7 @@ static void Task_ShowWinnerMonBanner(u8 taskId) { HandleLoadSpecialPokePic_2( &gMonFrontPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[1], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); } @@ -901,7 +901,7 @@ static void Task_ShowWinnerMonBanner(u8 taskId) { HandleLoadSpecialPokePic_DontHandleDeoxys( &gMonFrontPicTable[species], - gMonSpritesGfxPtr->sprites.ptr[1], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); } @@ -2581,13 +2581,13 @@ void ShowContestEntryMonPic(void) gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = species; if (gSpecialVar_0x8006 == gContestPlayerMonIndex) - HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, personality); + HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); else - HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, personality); + HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); palette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); LoadCompressedSpritePalette(palette); - SetMultiuseSpriteTemplateToPokemon(species, 1); + SetMultiuseSpriteTemplateToPokemon(species, B_POSITION_OPPONENT_LEFT); gMultiuseSpriteTemplate.paletteTag = palette->tag; spriteId = CreateSprite(&gMultiuseSpriteTemplate, (left + 1) * 8 + 32, (top * 8) + 40, 0); diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 4b668881a9..b8ab1b91e0 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -411,21 +411,22 @@ bool8 CheckDaycareMonReceivedMail(void) return _CheckDaycareMonReceivedMail(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004); } -static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc) +static u8 EggHatchCreateMonSprite(u8 useAlt, u8 switchID, u8 pokeID, u16* speciesLoc) { - u8 r5 = 0; + u8 position = 0; u8 spriteID = 0; struct Pokemon* mon = NULL; - if (a0 == 0) + if (useAlt == FALSE) { mon = &gPlayerParty[pokeID]; - r5 = 1; + position = B_POSITION_OPPONENT_LEFT; } - if (a0 == 1) + if (useAlt == TRUE) { + // Alternate sprite allocation position. Never reached. mon = &gPlayerParty[pokeID]; - r5 = 3; + position = B_POSITION_OPPONENT_RIGHT; } switch (switchID) { @@ -434,14 +435,14 @@ static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 pid = GetMonData(mon, MON_DATA_PERSONALITY); HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], - gMonSpritesGfxPtr->sprites.ptr [(a0 * 2) + 1], + gMonSpritesGfxPtr->sprites.ptr[(useAlt * 2) + B_POSITION_OPPONENT_LEFT], species, pid); LoadCompressedSpritePalette(GetMonSpritePalStruct(mon)); *speciesLoc = species; } break; case 1: - SetMultiuseSpriteTemplateToPokemon(GetMonSpritePalStruct(mon)->tag, r5); + SetMultiuseSpriteTemplateToPokemon(GetMonSpritePalStruct(mon)->tag, position); spriteID = CreateSprite(&gMultiuseSpriteTemplate, 120, 75, 6); gSprites[spriteID].invisible = TRUE; gSprites[spriteID].callback = SpriteCallbackDummy; @@ -535,11 +536,11 @@ static void CB2_EggHatch_0(void) gMain.state++; break; case 5: - EggHatchCreateMonSprite(0, 0, sEggHatchData->eggPartyID, &sEggHatchData->species); + EggHatchCreateMonSprite(FALSE, 0, sEggHatchData->eggPartyID, &sEggHatchData->species); gMain.state++; break; case 6: - sEggHatchData->pokeSpriteID = EggHatchCreateMonSprite(0, 1, sEggHatchData->eggPartyID, &sEggHatchData->species); + sEggHatchData->pokeSpriteID = EggHatchCreateMonSprite(FALSE, 1, sEggHatchData->eggPartyID, &sEggHatchData->species); gMain.state++; break; case 7: diff --git a/src/evolution_scene.c b/src/evolution_scene.c index bd76993dc4..91834876ff 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -260,12 +260,12 @@ void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u trainerId = GetMonData(mon, MON_DATA_OT_ID); personality = GetMonData(mon, MON_DATA_PERSONALITY); DecompressPicFromTable_2(&gMonFrontPicTable[currSpecies], - gMonSpritesGfxPtr->sprites.ptr[1], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], currSpecies); pokePal = GetMonSpritePalStructFromOtIdPersonality(currSpecies, trainerId, personality); LoadCompressedPalette(pokePal->data, 0x110, 0x20); - SetMultiuseSpriteTemplateToPokemon(currSpecies, 1); + SetMultiuseSpriteTemplateToPokemon(currSpecies, B_POSITION_OPPONENT_LEFT); gMultiuseSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable; sEvoStructPtr->preEvoSpriteId = ID = CreateSprite(&gMultiuseSpriteTemplate, 120, 64, 30); @@ -275,12 +275,12 @@ void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u // postEvo sprite DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies], - gMonSpritesGfxPtr->sprites.ptr[3], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], postEvoSpecies); pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality); LoadCompressedPalette(pokePal->data, 0x120, 0x20); - SetMultiuseSpriteTemplateToPokemon(postEvoSpecies, 3); + SetMultiuseSpriteTemplateToPokemon(postEvoSpecies, B_POSITION_OPPONENT_RIGHT); gMultiuseSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable; sEvoStructPtr->postEvoSpriteId = ID = CreateSprite(&gMultiuseSpriteTemplate, 120, 64, 30); gSprites[ID].callback = SpriteCallbackDummy_2; @@ -352,13 +352,13 @@ static void CB2_EvolutionSceneLoadGraphics(void) gReservedSpritePaletteCount = 4; DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies], - gMonSpritesGfxPtr->sprites.ptr[3], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], postEvoSpecies); pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality); LoadCompressedPalette(pokePal->data, 0x120, 0x20); - SetMultiuseSpriteTemplateToPokemon(postEvoSpecies, 3); + SetMultiuseSpriteTemplateToPokemon(postEvoSpecies, B_POSITION_OPPONENT_RIGHT); gMultiuseSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable; sEvoStructPtr->postEvoSpriteId = ID = CreateSprite(&gMultiuseSpriteTemplate, 120, 64, 30); @@ -424,7 +424,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void) u32 trainerId = GetMonData(mon, MON_DATA_OT_ID); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY); DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies], - gMonSpritesGfxPtr->sprites.ptr[3], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], postEvoSpecies); pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality); LoadCompressedPalette(pokePal->data, 0x120, 0x20); @@ -435,7 +435,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void) { u8 ID; - SetMultiuseSpriteTemplateToPokemon(postEvoSpecies, 1); + SetMultiuseSpriteTemplateToPokemon(postEvoSpecies, B_POSITION_OPPONENT_LEFT); gMultiuseSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable; sEvoStructPtr->postEvoSpriteId = ID = CreateSprite(&gMultiuseSpriteTemplate, 120, 64, 30); @@ -488,13 +488,13 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, u8 preEvoSprit sEvoStructPtr->preEvoSpriteId = preEvoSpriteId; DecompressPicFromTable_2(&gMonFrontPicTable[postEvoSpecies], - gMonSpritesGfxPtr->sprites.ptr[1], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], postEvoSpecies); pokePal = GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, trainerId, personality); LoadCompressedPalette(pokePal->data, 0x120, 0x20); - SetMultiuseSpriteTemplateToPokemon(postEvoSpecies, 1); + SetMultiuseSpriteTemplateToPokemon(postEvoSpecies, B_POSITION_OPPONENT_LEFT); gMultiuseSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable; sEvoStructPtr->postEvoSpriteId = ID = CreateSprite(&gMultiuseSpriteTemplate, 120, 64, 30); diff --git a/src/main_menu.c b/src/main_menu.c index a60cf1a283..f6dff3d445 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -161,10 +161,7 @@ * - Destroys itself when done. */ -// These two defines are used with the sCurrItemAndOptionsMenuCheck, -// to distinguish between its two parts. -#define OPTION_MENU_FLAG 0x8000 -#define CURRENT_ITEM_MASK 0x7FFF +#define OPTION_MENU_FLAG (1 << 15) // Static type declarations @@ -685,7 +682,7 @@ static void Task_MainMenuCheckSaveFile(u8 taskId) break; } } - sCurrItemAndOptionMenuCheck &= CURRENT_ITEM_MASK; // turn off the "returning from options menu" flag + sCurrItemAndOptionMenuCheck &= ~OPTION_MENU_FLAG; // turn off the "returning from options menu" flag tCurrItem = sCurrItemAndOptionMenuCheck; tItemCount = tMenuType + 2; } diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index b123e60318..4eb60f3d04 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -731,7 +731,7 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon) // Load mon gfx species = GetMonData(mon, MON_DATA_SPECIES2); personality = GetMonData(mon, MON_DATA_PERSONALITY); - HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, personality); + HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); sPokeblockFeed->loadGfxState++; break; case 1: @@ -742,7 +742,7 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon) palette = GetMonSpritePalStructFromOtIdPersonality(species, trainerId, personality); LoadCompressedSpritePalette(palette); - SetMultiuseSpriteTemplateToPokemon(palette->tag, 1); + SetMultiuseSpriteTemplateToPokemon(palette->tag, B_POSITION_OPPONENT_LEFT); sPokeblockFeed->loadGfxState++; break; case 2: diff --git a/src/pokemon.c b/src/pokemon.c index aca68d53c3..dc53da88c8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -69,7 +69,7 @@ EWRAM_DATA u8 gEnemyPartyCount = 0; EWRAM_DATA struct Pokemon gPlayerParty[PARTY_SIZE] = {0}; EWRAM_DATA struct Pokemon gEnemyParty[PARTY_SIZE] = {0}; EWRAM_DATA struct SpriteTemplate gMultiuseSpriteTemplate = {0}; -EWRAM_DATA struct Unknown_806F160_Struct *gUnknown_020249B4[2] = {NULL}; +EWRAM_DATA static struct MonSpritesGfxManager *sMonSpritesGfxManagers[MON_SPR_GFX_MANAGERS_COUNT] = {NULL}; // const rom data #include "data/battle_moves.h" @@ -2084,7 +2084,7 @@ static const struct SpeciesItem sAlteringCaveWildMonHeldItems[] = {SPECIES_SMEARGLE, ITEM_SALAC_BERRY}, }; -static const struct OamData sOamData_8329F20 = +static const struct OamData sOamData_64x64 = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -2101,11 +2101,11 @@ static const struct OamData sOamData_8329F20 = .affineParam = 0 }; -static const struct SpriteTemplate gUnknown_08329F28 = +static const struct SpriteTemplate sSpriteTemplate_64x64 = { .tileTag = TAG_NONE, .paletteTag = TAG_NONE, - .oam = &sOamData_8329F20, + .oam = &sOamData_64x64, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, @@ -3425,10 +3425,10 @@ void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition) { if (gMonSpritesGfxPtr != NULL) gMultiuseSpriteTemplate = gMonSpritesGfxPtr->templates[battlerPosition]; - else if (gUnknown_020249B4[0]) - gMultiuseSpriteTemplate = gUnknown_020249B4[0]->templates[battlerPosition]; - else if (gUnknown_020249B4[1]) - gMultiuseSpriteTemplate = gUnknown_020249B4[1]->templates[battlerPosition]; + else if (sMonSpritesGfxManagers[MON_SPR_GFX_MANAGER_A]) + gMultiuseSpriteTemplate = sMonSpritesGfxManagers[MON_SPR_GFX_MANAGER_A]->templates[battlerPosition]; + else if (sMonSpritesGfxManagers[MON_SPR_GFX_MANAGER_B]) + gMultiuseSpriteTemplate = sMonSpritesGfxManagers[MON_SPR_GFX_MANAGER_B]->templates[battlerPosition]; else gMultiuseSpriteTemplate = gBattlerSpriteTemplates[battlerPosition]; @@ -5655,11 +5655,13 @@ u16 SpeciesToCryId(u16 species) } \ } +// Same as DrawSpindaSpots but attempts to discern for itself whether or +// not it's the front pic. static void DrawSpindaSpotsUnused(u16 species, u32 personality, u8 *dest) { if (species == SPECIES_SPINDA - && dest != gMonSpritesGfxPtr->sprites.ptr[0] - && dest != gMonSpritesGfxPtr->sprites.ptr[2]) + && dest != gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT] + && dest != gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_RIGHT]) DRAW_SPINDA_SPOTS; } @@ -6788,9 +6790,9 @@ const u8 *GetTrainerNameFromId(u16 trainerId) bool8 HasTwoFramesAnimation(u16 species) { return (species != SPECIES_CASTFORM - && species != SPECIES_DEOXYS - && species != SPECIES_SPINDA - && species != SPECIES_UNOWN); + && species != SPECIES_DEOXYS + && species != SPECIES_SPINDA + && species != SPECIES_UNOWN); } static bool8 ShouldSkipFriendshipChange(void) @@ -6802,174 +6804,186 @@ static bool8 ShouldSkipFriendshipChange(void) return FALSE; } -static void sub_806F160(struct Unknown_806F160_Struct* structPtr) +// The below functions are for the 'MonSpritesGfxManager', a method of allocating +// space for Pokémon sprites. These are only used for the summary screen Pokémon +// sprites (unless gMonSpritesGfxPtr is in use), but were set up for more general use. +// Only the 'default' mode (MON_SPR_GFX_MODE_NORMAL) is used, which is set +// up to allocate 4 sprites using the battler sprite templates (gBattlerSpriteTemplates). +// MON_SPR_GFX_MODE_BATTLE is identical but never used. +// MON_SPR_GFX_MODE_FULL_PARTY is set up to allocate 7 sprites (party + trainer?) +// using a generic 64x64 template, and is also never used. + +// Between the unnecessarily large sizes below, a mistake allocating the spritePointers +// field, and the fact that ultimately only 1 of the 4 sprite positions is used, this +// system wastes a good deal of memory. + +#define ALLOC_FAIL_BUFFER (1 << 0) +#define ALLOC_FAIL_STRUCT (1 << 1) +#define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value +#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // * 4 is unnecessary, MON_PIC_SIZE is sufficient +#define GFX_MANAGER_NUM_FRAMES 4 // Only 2 frames are needed + +static void InitMonSpritesGfx_Battle(struct MonSpritesGfxManager* gfx) { u16 i, j; - for (i = 0; i < structPtr->field_0_0; i++) + for (i = 0; i < gfx->numSprites; i++) { - structPtr->templates[i] = gBattlerSpriteTemplates[i]; - for (j = 0; j < structPtr->field_1; j++) - { - structPtr->frameImages[i * structPtr->field_1 + j].data = &structPtr->byteArrays[i][j * 0x800]; - } - structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->field_1]; + gfx->templates[i] = gBattlerSpriteTemplates[i]; + for (j = 0; j < gfx->numFrames; j++) + gfx->frameImages[i * gfx->numFrames + j].data = &gfx->spritePointers[i][j * MON_PIC_SIZE]; + + gfx->templates[i].images = &gfx->frameImages[i * gfx->numFrames]; } } -static void sub_806F1FC(struct Unknown_806F160_Struct* structPtr) +static void InitMonSpritesGfx_FullParty(struct MonSpritesGfxManager* gfx) { u16 i, j; - for (i = 0; i < structPtr->field_0_0; i++) + for (i = 0; i < gfx->numSprites; i++) { - structPtr->templates[i] = gUnknown_08329F28; - for (j = 0; j < structPtr->field_1; j++) - { - structPtr->frameImages[i * structPtr->field_0_0 + j].data = &structPtr->byteArrays[i][j * 0x800]; - } - structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->field_0_0]; - structPtr->templates[i].anims = gAnims_MonPic; - structPtr->templates[i].paletteTag = i; + gfx->templates[i] = sSpriteTemplate_64x64; + for (j = 0; j < gfx->numFrames; j++) + gfx->frameImages[i * gfx->numSprites + j].data = &gfx->spritePointers[i][j * MON_PIC_SIZE]; + + gfx->templates[i].images = &gfx->frameImages[i * gfx->numSprites]; + gfx->templates[i].anims = gAnims_MonPic; + gfx->templates[i].paletteTag = i; } } -struct Unknown_806F160_Struct *sub_806F2AC(u8 id, u8 arg1) +struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 managerId, u8 mode) { u8 i; - u8 flags; - struct Unknown_806F160_Struct *structPtr; + u8 failureFlags; + struct MonSpritesGfxManager *gfx; - flags = 0; - id %= 2; - structPtr = AllocZeroed(sizeof(*structPtr)); - if (structPtr == NULL) + failureFlags = 0; + managerId %= MON_SPR_GFX_MANAGERS_COUNT; + gfx = AllocZeroed(sizeof(*gfx)); + if (gfx == NULL) return NULL; - switch (arg1) + switch (mode) { - case 2: - structPtr->field_0_0 = 7; - structPtr->field_0_1 = 7; - structPtr->field_1 = 4; - structPtr->field_3_0 = 1; - structPtr->field_3_1 = 2; + case MON_SPR_GFX_MODE_FULL_PARTY: + gfx->numSprites = PARTY_SIZE + 1; + gfx->numSprites2 = PARTY_SIZE + 1; + gfx->numFrames = GFX_MANAGER_NUM_FRAMES; + gfx->dataSize = 1; + gfx->mode = MON_SPR_GFX_MODE_FULL_PARTY; break; - case 0: + // case MON_SPR_GFX_MODE_BATTLE: + case MON_SPR_GFX_MODE_NORMAL: default: - structPtr->field_0_0 = 4; - structPtr->field_0_1 = 4; - structPtr->field_1 = 4; - structPtr->field_3_0 = 1; - structPtr->field_3_1 = 0; + gfx->numSprites = MAX_BATTLERS_COUNT; + gfx->numSprites2 = MAX_BATTLERS_COUNT; + gfx->numFrames = GFX_MANAGER_NUM_FRAMES; + gfx->dataSize = 1; + gfx->mode = MON_SPR_GFX_MODE_NORMAL; break; } - structPtr->bytes = AllocZeroed(structPtr->field_3_0 * 0x800 * 4 * structPtr->field_0_0); - structPtr->byteArrays = AllocZeroed(structPtr->field_0_0 * 32); - if (structPtr->bytes == NULL || structPtr->byteArrays == NULL) + // Set up sprite / sprite pointer buffers + gfx->spriteBuffer = AllocZeroed(gfx->dataSize * GFX_MANAGER_SPR_SIZE * gfx->numSprites); + gfx->spritePointers = AllocZeroed(gfx->numSprites * 32); // ? Only * 4 is necessary, perhaps they were thinking bits. + if (gfx->spriteBuffer == NULL || gfx->spritePointers == NULL) { - flags |= 1; + failureFlags |= ALLOC_FAIL_BUFFER; } else { - for (i = 0; i < structPtr->field_0_0; i++) - structPtr->byteArrays[i] = structPtr->bytes + (structPtr->field_3_0 * (i << 13)); + for (i = 0; i < gfx->numSprites; i++) + gfx->spritePointers[i] = gfx->spriteBuffer + (gfx->dataSize * GFX_MANAGER_SPR_SIZE * i); } - structPtr->templates = AllocZeroed(sizeof(struct SpriteTemplate) * structPtr->field_0_0); - structPtr->frameImages = AllocZeroed(sizeof(struct SpriteFrameImage) * structPtr->field_0_0 * structPtr->field_1); - if (structPtr->templates == NULL || structPtr->frameImages == NULL) + // Set up sprite structs + gfx->templates = AllocZeroed(sizeof(struct SpriteTemplate) * gfx->numSprites); + gfx->frameImages = AllocZeroed(sizeof(struct SpriteFrameImage) * gfx->numSprites * gfx->numFrames); + if (gfx->templates == NULL || gfx->frameImages == NULL) { - flags |= 2; + failureFlags |= ALLOC_FAIL_STRUCT; } else { - for (i = 0; i < structPtr->field_1 * structPtr->field_0_0; i++) - structPtr->frameImages[i].size = 0x800; + for (i = 0; i < gfx->numFrames * gfx->numSprites; i++) + gfx->frameImages[i].size = MON_PIC_SIZE; - switch (structPtr->field_3_1) + switch (gfx->mode) { - case 2: - sub_806F1FC(structPtr); + case MON_SPR_GFX_MODE_FULL_PARTY: + InitMonSpritesGfx_FullParty(gfx); break; - case 0: - case 1: + case MON_SPR_GFX_MODE_NORMAL: + case MON_SPR_GFX_MODE_BATTLE: default: - sub_806F160(structPtr); + InitMonSpritesGfx_Battle(gfx); break; } } - if (flags & 2) + // If either of the allocations failed free their respective members + if (failureFlags & ALLOC_FAIL_STRUCT) { - if (structPtr->frameImages != NULL) - FREE_AND_SET_NULL(structPtr->frameImages); - if (structPtr->templates != NULL) - FREE_AND_SET_NULL(structPtr->templates); + TRY_FREE_AND_SET_NULL(gfx->frameImages); + TRY_FREE_AND_SET_NULL(gfx->templates); } - if (flags & 1) + if (failureFlags & ALLOC_FAIL_BUFFER) { - if (structPtr->byteArrays != NULL) - FREE_AND_SET_NULL(structPtr->byteArrays); - if (structPtr->bytes != NULL) - FREE_AND_SET_NULL(structPtr->bytes); + TRY_FREE_AND_SET_NULL(gfx->spritePointers); + TRY_FREE_AND_SET_NULL(gfx->spriteBuffer); } - if (flags) + if (failureFlags) { - memset(structPtr, 0, sizeof(*structPtr)); - Free(structPtr); + // Clear, something failed to allocate + memset(gfx, 0, sizeof(*gfx)); + Free(gfx); } else { - structPtr->magic = 0xA3; - gUnknown_020249B4[id] = structPtr; + gfx->active = GFX_MANAGER_ACTIVE; + sMonSpritesGfxManagers[managerId] = gfx; } - return gUnknown_020249B4[id]; + return sMonSpritesGfxManagers[managerId]; } -void sub_806F47C(u8 id) +void DestroyMonSpritesGfxManager(u8 managerId) { - struct Unknown_806F160_Struct *structPtr; + struct MonSpritesGfxManager *gfx; - id %= 2; - structPtr = gUnknown_020249B4[id]; - if (structPtr == NULL) + managerId %= MON_SPR_GFX_MANAGERS_COUNT; + gfx = sMonSpritesGfxManagers[managerId]; + if (gfx == NULL) return; - if (structPtr->magic != 0xA3) + if (gfx->active != GFX_MANAGER_ACTIVE) { - memset(structPtr, 0, sizeof(struct Unknown_806F160_Struct)); + memset(gfx, 0, sizeof(*gfx)); } else { - - if (structPtr->frameImages != NULL) - FREE_AND_SET_NULL(structPtr->frameImages); - if (structPtr->templates != NULL) - FREE_AND_SET_NULL(structPtr->templates); - if (structPtr->byteArrays != NULL) - FREE_AND_SET_NULL(structPtr->byteArrays); - if (structPtr->bytes != NULL) - FREE_AND_SET_NULL(structPtr->bytes); - - memset(structPtr, 0, sizeof(struct Unknown_806F160_Struct)); - Free(structPtr); + TRY_FREE_AND_SET_NULL(gfx->frameImages); + TRY_FREE_AND_SET_NULL(gfx->templates); + TRY_FREE_AND_SET_NULL(gfx->spritePointers); + TRY_FREE_AND_SET_NULL(gfx->spriteBuffer); + memset(gfx, 0, sizeof(*gfx)); + Free(gfx); } } -u8 *sub_806F4F8(u8 id, u8 arg1) +u8 *MonSpritesGfxManager_GetSpritePtr(u8 managerId, u8 spriteNum) { - struct Unknown_806F160_Struct *structPtr = gUnknown_020249B4[id % 2]; - if (structPtr->magic != 0xA3) + struct MonSpritesGfxManager *gfx = sMonSpritesGfxManagers[managerId % MON_SPR_GFX_MANAGERS_COUNT]; + if (gfx->active != GFX_MANAGER_ACTIVE) { return NULL; } else { - if (arg1 >= structPtr->field_0_0) - arg1 = 0; + if (spriteNum >= gfx->numSprites) + spriteNum = 0; - return structPtr->byteArrays[arg1]; + return gfx->spritePointers[spriteNum]; } } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index dc009bbff7..5c4b19bc44 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1111,7 +1111,7 @@ void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, SummaryScreen_SetAnimDelayTaskId(TASK_NONE); if (gMonSpritesGfxPtr == NULL) - sub_806F2AC(0, 0); + CreateMonSpritesGfxManager(MON_SPR_GFX_MANAGER_A, MON_SPR_GFX_MODE_NORMAL); SetMainCallback2(CB2_InitSummaryScreen); } @@ -1500,7 +1500,7 @@ static void CloseSummaryScreen(u8 taskId) StopCryAndClearCrySongs(); m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); if (gMonSpritesGfxPtr == NULL) - sub_806F47C(0); + DestroyMonSpritesGfxManager(MON_SPR_GFX_MANAGER_A); FreeSummaryScreen(); DestroyTask(taskId); } @@ -3873,25 +3873,43 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state) if (gMain.inBattle) { if (ShouldIgnoreDeoxysForm(3, sMonSummaryScreen->curMonIndex)) - HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites.ptr[1], summary->species2, summary->pid); + HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], + summary->species2, + summary->pid); else - HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites.ptr[1], summary->species2, summary->pid); + HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], + summary->species2, + summary->pid); } else { if (gMonSpritesGfxPtr != NULL) { if (sMonSummaryScreen->monList.mons == gPlayerParty || sMonSummaryScreen->mode == SUMMARY_MODE_BOX || sMonSummaryScreen->unk40EF == TRUE) - HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites.ptr[1], summary->species2, summary->pid); + HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], + summary->species2, + summary->pid); else - HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], gMonSpritesGfxPtr->sprites.ptr[1], summary->species2, summary->pid); + HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], + summary->species2, + summary->pid); } else { if (sMonSummaryScreen->monList.mons == gPlayerParty || sMonSummaryScreen->mode == SUMMARY_MODE_BOX || sMonSummaryScreen->unk40EF == TRUE) - HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], sub_806F4F8(0, 1), summary->species2, summary->pid); + HandleLoadSpecialPokePic_2(&gMonFrontPicTable[summary->species2], + MonSpritesGfxManager_GetSpritePtr(MON_SPR_GFX_MANAGER_A, B_POSITION_OPPONENT_LEFT), + summary->species2, + summary->pid); else - HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], sub_806F4F8(0, 1), summary->species2, summary->pid); + HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[summary->species2], + MonSpritesGfxManager_GetSpritePtr(MON_SPR_GFX_MANAGER_A, B_POSITION_OPPONENT_LEFT), + summary->species2, + summary->pid); } } (*state)++; @@ -3899,7 +3917,7 @@ static u8 LoadMonGfxAndSprite(struct Pokemon *mon, s16 *state) case 1: pal = GetMonSpritePalStructFromOtIdPersonality(summary->species2, summary->OTID, summary->pid); LoadCompressedSpritePalette(pal); - SetMultiuseSpriteTemplateToPokemon(pal->tag, 1); + SetMultiuseSpriteTemplateToPokemon(pal->tag, B_POSITION_OPPONENT_LEFT); (*state)++; return 0xFF; } diff --git a/src/trade.c b/src/trade.c index 1ed0b93e91..526a9ac391 100644 --- a/src/trade.c +++ b/src/trade.c @@ -2770,9 +2770,9 @@ static void LoadTradeMonPic(u8 whichParty, u8 state) personality = GetMonData(mon, MON_DATA_PERSONALITY); if (whichParty == TRADE_PLAYER) - HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, personality); + HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality); else - HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[whichParty * 2 + 1], species, personality); + HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[whichParty * 2 + B_POSITION_OPPONENT_LEFT], species, personality); LoadCompressedSpritePalette(GetMonSpritePalStruct(mon)); sTradeData->monSpecies[whichParty] = species; @@ -3767,7 +3767,7 @@ static bool8 AnimateTradeSequenceCable(void) case TS_STATE_POKEBALL_ARRIVE_WAIT: if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { - HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], gMonSpritesGfxPtr->sprites.ptr[3], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); + HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); sTradeData->state++; } break; @@ -4265,7 +4265,7 @@ static bool8 AnimateTradeSequenceWireless(void) if (gSprites[sTradeData->bouncingPokeballSpriteId].callback == SpriteCallbackDummy) { HandleLoadSpecialPokePic_2(&gMonFrontPicTable[sTradeData->monSpecies[TRADE_PARTNER]], - gMonSpritesGfxPtr->sprites.ptr[3], + gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_RIGHT], sTradeData->monSpecies[TRADE_PARTNER], sTradeData->monPersonalities[TRADE_PARTNER]); sTradeData->state++; From 6e62c057f5123b458ebc7d74e60c7ce8fb32e980 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 2 Oct 2021 23:48:12 -0400 Subject: [PATCH 033/417] Document remaining symbols in pokemon.c --- include/battle_util.h | 2 + include/constants/pokemon.h | 6 + include/constants/trainers.h | 3 +- include/pokemon.h | 19 +- src/battle_anim_throw.c | 2 +- src/battle_main.c | 2 +- src/battle_pyramid.c | 2 +- src/battle_tower.c | 4 +- src/battle_tv.c | 8 +- src/battle_util.c | 4 +- src/data/pokemon/trainer_class_lookups.h | 20 +- src/data/text/trainer_class_names.h | 2 +- src/data/trainers.h | 78 ++--- src/pokemon.c | 355 +++++++++++++---------- src/script_pokemon_util.c | 7 +- src/trainer_hill.c | 2 +- 16 files changed, 287 insertions(+), 229 deletions(-) diff --git a/include/battle_util.h b/include/battle_util.h index e4ef99e0bd..d4e2a23f87 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -28,6 +28,8 @@ #define ABILITYEFFECT_COUNT_BATTLER_SIDE 0x11 #define ABILITYEFFECT_COUNT_ON_FIELD 0x12 #define ABILITYEFFECT_CHECK_ON_FIELD 0x13 +#define ABILITYEFFECT_MUD_SPORT 0xFD +#define ABILITYEFFECT_WATER_SPORT 0xFE #define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF #define ABILITY_ON_OPPOSING_FIELD(battlerId, abilityId)(AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, battlerId, abilityId, 0, 0)) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 9bafa0a0bd..827725fc29 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -339,4 +339,10 @@ #define MON_PIC_SIZE (64 * 64 / 2) +#define BATTLE_ALIVE_EXCEPT_ACTIVE 0 +#define BATTLE_ALIVE_ATK_SIDE 1 +#define BATTLE_ALIVE_DEF_SIDE 2 + +#define SKIP_FRONT_ANIM (1 << 7) + #endif // GUARD_CONSTANTS_POKEMON_H diff --git a/include/constants/trainers.h b/include/constants/trainers.h index 3f22c7cef5..31bad25df8 100644 --- a/include/constants/trainers.h +++ b/include/constants/trainers.h @@ -110,6 +110,7 @@ #define TRAINER_PIC_RS_BRENDAN 91 #define TRAINER_PIC_RS_MAY 92 +// The player back pics are assumed to alternate according to the gender values (MALE/FEMALE) #define TRAINER_BACK_PIC_BRENDAN 0 #define TRAINER_BACK_PIC_MAY 1 #define TRAINER_BACK_PIC_RED 2 @@ -334,7 +335,7 @@ #define TRAINER_CLASS_SAILOR 0x2f #define TRAINER_CLASS_COOLTRAINER_2 0x30 // Used for only one trainer. #define TRAINER_CLASS_MAGMA_ADMIN 0x31 -#define TRAINER_CLASS_PKMN_TRAINER_3 0x32 +#define TRAINER_CLASS_RIVAL 0x32 #define TRAINER_CLASS_BUG_CATCHER 0x33 #define TRAINER_CLASS_PKMN_RANGER 0x34 #define TRAINER_CLASS_MAGMA_LEADER 0x35 diff --git a/include/pokemon.h b/include/pokemon.h index e656b2f040..229898d711 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -259,6 +259,8 @@ struct Evolution | (((personality) & 0x00000003) >> 0) \ ) % NUM_UNOWN_FORMS) +#define GET_SHINY_VALUE(otId, personality)HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality) + extern u8 gPlayerPartyCount; extern struct Pokemon gPlayerParty[PARTY_SIZE]; extern u8 gEnemyPartyCount; @@ -273,8 +275,8 @@ extern const u8 *const gItemEffectTable[]; extern const u32 gExperienceTables[][MAX_LEVEL + 1]; extern const u16 *const gLevelUpLearnsets[]; extern const u8 gPPUpGetMask[]; -extern const u8 gPPUpSetMask[]; -extern const u8 gPPUpAddMask[]; +extern const u8 gPPUpClearMask[]; +extern const u8 gPPUpAddValues[]; extern const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2]; extern const u16 gLinkPlayerFacilityClasses[]; extern const struct SpriteTemplate gBattlerSpriteTemplates[]; @@ -293,7 +295,7 @@ void CreateMonWithIVsPersonality(struct Pokemon *mon, u16 species, u8 level, u32 void CreateMonWithIVsOTID(struct Pokemon *mon, u16 species, u8 level, u8 *ivs, u32 otId); void CreateMonWithEVSpread(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 evSpread); void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src); -void CreateBattleTowerMon2(struct Pokemon *mon, struct BattleTowerPokemon *src, bool8 lvl50); +void CreateBattleTowerMon_HandleLevel(struct Pokemon *mon, struct BattleTowerPokemon *src, bool8 lvl50); void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId); void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId); void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerPokemon *dest); @@ -317,12 +319,7 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove); void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move); void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideStatus, u16 powerOverride, u8 typeOverride, u8 bankAtk, u8 bankDef); - u8 CountAliveMonsInBattle(u8 caseId); -#define BATTLE_ALIVE_EXCEPT_ACTIVE 0 -#define BATTLE_ALIVE_ATK_SIDE 1 -#define BATTLE_ALIVE_DEF_SIDE 2 - u8 GetDefaultMoveTarget(u8 battlerId); u8 GetMonGender(struct Pokemon *mon); u8 GetBoxMonGender(struct BoxPokemon *boxMon); @@ -342,7 +339,6 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg); void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg); void CopyMon(void *dest, void *src, size_t size); u8 GiveMonToPlayer(struct Pokemon *mon); -u8 SendMonToPC(struct Pokemon* mon); u8 CalculatePlayerPartyCount(void); u8 CalculateEnemyPartyCount(void); u8 GetMonsStateToDoubles(void); @@ -374,7 +370,6 @@ u16 SpeciesToNationalPokedexNum(u16 species); u16 SpeciesToHoennPokedexNum(u16 species); u16 HoennToNationalOrder(u16 hoennNum); u16 SpeciesToCryId(u16 species); -void sub_806D544(u16 species, u32 personality, u8 *dest); void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, u8 a4); void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies); u8 GetPlayerFlankId(void); @@ -425,9 +420,7 @@ void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, void PokemonSummaryDoMonAnimation(struct Sprite* sprite, u16 species, bool8 oneFrame); void StopPokemonAnimationDelayTask(void); void BattleAnimateBackSprite(struct Sprite* sprite, u16 species); -u8 sub_806EF08(u8 arg0); -u8 sub_806EF84(u8 arg0, u8 arg1); -u16 sub_806EFF0(u16 arg0); +u8 GetOpposingLinkMultiBattlerId(bool8 rightSide, u8 multiplayerId); u16 FacilityClassToPicIndex(u16 facilityClass); u16 PlayerGenderToFrontTrainerPicId(u8 playerGender); void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality); diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index 0a81a6ecab..bf95a319c3 100755 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -2227,7 +2227,7 @@ void TryShinyAnimation(u8 battler, struct Pokemon *mon) if (IsBattlerSpriteVisible(battler)) { - shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) isShiny = TRUE; diff --git a/src/battle_main.c b/src/battle_main.c index 9fda5acbc4..8481a108a3 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -501,7 +501,7 @@ const struct TrainerMoney gTrainerMoneyTable[] = {TRAINER_CLASS_TWINS, 3}, {TRAINER_CLASS_SAILOR, 8}, {TRAINER_CLASS_COLLECTOR, 15}, - {TRAINER_CLASS_PKMN_TRAINER_3, 15}, + {TRAINER_CLASS_RIVAL, 15}, {TRAINER_CLASS_PKMN_BREEDER, 10}, {TRAINER_CLASS_PKMN_RANGER, 12}, {TRAINER_CLASS_TEAM_MAGMA, 5}, diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 50efeecb4d..169dc69c5d 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -449,7 +449,7 @@ static const struct PyramidTrainerEncounterMusic sTrainerClassEncounterMusic[54] {TRAINER_CLASS_PKMN_BREEDER, TRAINER_ENCOUNTER_MUSIC_FEMALE}, {TRAINER_CLASS_COLLECTOR, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, {TRAINER_CLASS_PKMN_RANGER, TRAINER_ENCOUNTER_MUSIC_COOL}, - {TRAINER_CLASS_PKMN_TRAINER_3, TRAINER_ENCOUNTER_MUSIC_MALE}, + {TRAINER_CLASS_RIVAL, TRAINER_ENCOUNTER_MUSIC_MALE}, {TRAINER_CLASS_YOUNG_COUPLE, TRAINER_ENCOUNTER_MUSIC_GIRL}, {TRAINER_CLASS_PSYCHIC, TRAINER_ENCOUNTER_MUSIC_INTENSE}, {TRAINER_CLASS_SR_AND_JR, TRAINER_ENCOUNTER_MUSIC_TWINS}, diff --git a/src/battle_tower.c b/src/battle_tower.c index 27defc1fa3..daf63d016c 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1668,7 +1668,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) if (gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].species != 0 && gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].level <= level) { - CreateBattleTowerMon2(&gEnemyParty[i], &gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j], FALSE); + CreateBattleTowerMon_HandleLevel(&gEnemyParty[i], &gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j], FALSE); } } return; @@ -3042,7 +3042,7 @@ static void FillPartnerParty(u16 trainerId) if (monData.nickname[0] == EXT_CTRL_CODE_BEGIN && monData.nickname[1] == EXT_CTRL_CODE_JPN) trainerName[5] = EOS; } - CreateBattleTowerMon2(&gPlayerParty[MULTI_PARTY_SIZE + i], &monData, TRUE); + CreateBattleTowerMon_HandleLevel(&gPlayerParty[MULTI_PARTY_SIZE + i], &monData, TRUE); SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_NAME, trainerName); j = IsFrontierTrainerFemale(trainerId + TRAINER_RECORD_MIXING_FRIEND); SetMonData(&gPlayerParty[MULTI_PARTY_SIZE + i], MON_DATA_OT_GENDER, &j); diff --git a/src/battle_tv.c b/src/battle_tv.c index ffdadb697f..c78f1bff44 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -1130,11 +1130,11 @@ void TryPutLinkBattleTvShowOnAir(void) if (gBattleTypeFlags & BATTLE_TYPE_MULTI) { - if ((playerBestMonId < 3 && !GetLinkTrainerFlankId(gBattleScripting.multiplayerId)) - || (playerBestMonId >= 3 && GetLinkTrainerFlankId(gBattleScripting.multiplayerId))) + if ((playerBestMonId < MULTI_PARTY_SIZE && !GetLinkTrainerFlankId(gBattleScripting.multiplayerId)) + || (playerBestMonId >= MULTI_PARTY_SIZE && GetLinkTrainerFlankId(gBattleScripting.multiplayerId))) { - j = (opponentBestMonId < 3) ? 0 : 1; - PutBattleUpdateOnTheAir(sub_806EF84(j, gBattleScripting.multiplayerId), moveId, playerBestSpecies, opponentBestSpecies); + j = (opponentBestMonId < MULTI_PARTY_SIZE) ? FALSE : TRUE; + PutBattleUpdateOnTheAir(GetOpposingLinkMultiBattlerId(j, gBattleScripting.multiplayerId), moveId, playerBestSpecies, opponentBestSpecies); } } else diff --git a/src/battle_util.c b/src/battle_util.c index 8617134dc9..7b47bc994a 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3095,14 +3095,14 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case ABILITYEFFECT_FIELD_SPORT: // 14 switch (gLastUsedAbility) { - case 0xFD: + case ABILITYEFFECT_MUD_SPORT: for (i = 0; i < gBattlersCount; i++) { if (gStatuses3[i] & STATUS3_MUDSPORT) effect = i + 1; } break; - case 0xFE: + case ABILITYEFFECT_WATER_SPORT: for (i = 0; i < gBattlersCount; i++) { if (gStatuses3[i] & STATUS3_WATERSPORT) diff --git a/src/data/pokemon/trainer_class_lookups.h b/src/data/pokemon/trainer_class_lookups.h index 2edefb274c..909d3d7dcb 100644 --- a/src/data/pokemon/trainer_class_lookups.h +++ b/src/data/pokemon/trainer_class_lookups.h @@ -145,13 +145,13 @@ const u8 gFacilityClassToTrainerClass[] = [FACILITY_CLASS_SWIMMER_F] = TRAINER_CLASS_SWIMMER_F, [FACILITY_CLASS_TWINS] = TRAINER_CLASS_TWINS, [FACILITY_CLASS_SAILOR] = TRAINER_CLASS_SAILOR, - [FACILITY_CLASS_WALLY] = TRAINER_CLASS_PKMN_TRAINER_3, - [FACILITY_CLASS_BRENDAN] = TRAINER_CLASS_PKMN_TRAINER_3, - [FACILITY_CLASS_BRENDAN_2] = TRAINER_CLASS_PKMN_TRAINER_3, - [FACILITY_CLASS_BRENDAN_3] = TRAINER_CLASS_PKMN_TRAINER_3, - [FACILITY_CLASS_MAY] = TRAINER_CLASS_PKMN_TRAINER_3, - [FACILITY_CLASS_MAY_2] = TRAINER_CLASS_PKMN_TRAINER_3, - [FACILITY_CLASS_MAY_3] = TRAINER_CLASS_PKMN_TRAINER_3, + [FACILITY_CLASS_WALLY] = TRAINER_CLASS_RIVAL, + [FACILITY_CLASS_BRENDAN] = TRAINER_CLASS_RIVAL, + [FACILITY_CLASS_BRENDAN_2] = TRAINER_CLASS_RIVAL, + [FACILITY_CLASS_BRENDAN_3] = TRAINER_CLASS_RIVAL, + [FACILITY_CLASS_MAY] = TRAINER_CLASS_RIVAL, + [FACILITY_CLASS_MAY_2] = TRAINER_CLASS_RIVAL, + [FACILITY_CLASS_MAY_3] = TRAINER_CLASS_RIVAL, [FACILITY_CLASS_PKMN_BREEDER_M] = TRAINER_CLASS_PKMN_BREEDER, [FACILITY_CLASS_BUG_CATCHER] = TRAINER_CLASS_BUG_CATCHER, [FACILITY_CLASS_PKMN_RANGER_M] = TRAINER_CLASS_PKMN_RANGER, @@ -161,11 +161,11 @@ const u8 gFacilityClassToTrainerClass[] = [FACILITY_CLASS_YOUNG_COUPLE] = TRAINER_CLASS_YOUNG_COUPLE, [FACILITY_CLASS_OLD_COUPLE] = TRAINER_CLASS_OLD_COUPLE, [FACILITY_CLASS_SIS_AND_BRO] = TRAINER_CLASS_SIS_AND_BRO, - [FACILITY_CLASS_STEVEN] = TRAINER_CLASS_PKMN_TRAINER_3, + [FACILITY_CLASS_STEVEN] = TRAINER_CLASS_RIVAL, [FACILITY_CLASS_SALON_MAIDEN_ANABEL] = TRAINER_CLASS_SALON_MAIDEN, [FACILITY_CLASS_DOME_ACE_TUCKER] = TRAINER_CLASS_DOME_ACE, - [FACILITY_CLASS_RED] = TRAINER_CLASS_PKMN_TRAINER_3, - [FACILITY_CLASS_LEAF] = TRAINER_CLASS_PKMN_TRAINER_3, + [FACILITY_CLASS_RED] = TRAINER_CLASS_RIVAL, + [FACILITY_CLASS_LEAF] = TRAINER_CLASS_RIVAL, [FACILITY_CLASS_RS_BRENDAN] = TRAINER_CLASS_RS_PROTAG, [FACILITY_CLASS_RS_MAY] = TRAINER_CLASS_RS_PROTAG, }; diff --git a/src/data/text/trainer_class_names.h b/src/data/text/trainer_class_names.h index f012e877b6..63cc356b23 100644 --- a/src/data/text/trainer_class_names.h +++ b/src/data/text/trainer_class_names.h @@ -49,7 +49,7 @@ const u8 gTrainerClassNames[][13] = { [TRAINER_CLASS_SAILOR] = _("SAILOR"), [TRAINER_CLASS_COOLTRAINER_2] = _("COOLTRAINER"), [TRAINER_CLASS_MAGMA_ADMIN] = _("MAGMA ADMIN"), - [TRAINER_CLASS_PKMN_TRAINER_3] = _("{PKMN} TRAINER"), + [TRAINER_CLASS_RIVAL] = _("{PKMN} TRAINER"), [TRAINER_CLASS_BUG_CATCHER] = _("BUG CATCHER"), [TRAINER_CLASS_PKMN_RANGER] = _("{PKMN} RANGER"), [TRAINER_CLASS_MAGMA_LEADER] = _("MAGMA LEADER"), diff --git a/src/data/trainers.h b/src/data/trainers.h index 163a8296db..01cf0259af 100644 --- a/src/data/trainers.h +++ b/src/data/trainers.h @@ -7268,7 +7268,7 @@ const struct Trainer gTrainers[] = { [TRAINER_WALLY_VR_1] = { .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_WALLY, .trainerName = _("WALLY"), @@ -7282,7 +7282,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_103_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7296,7 +7296,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_110_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7310,7 +7310,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_119_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7324,7 +7324,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_103_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7338,7 +7338,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_110_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7352,7 +7352,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_119_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7366,7 +7366,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_103_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7380,7 +7380,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_110_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7394,7 +7394,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_ROUTE_119_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -7408,7 +7408,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_103_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -7422,7 +7422,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_110_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -7436,7 +7436,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_119_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -7450,7 +7450,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_103_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -7464,7 +7464,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_110_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -7478,7 +7478,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_119_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -7492,7 +7492,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_103_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -7506,7 +7506,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_110_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -7520,7 +7520,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_ROUTE_119_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -8290,7 +8290,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_RUSTBORO_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -8304,7 +8304,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_RUSTBORO_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -8388,7 +8388,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_RUSTBORO_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -8402,7 +8402,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_RUSTBORO_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -9186,7 +9186,7 @@ const struct Trainer gTrainers[] = { [TRAINER_WALLY_MAUVILLE] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_WALLY, .trainerName = _("WALLY"), @@ -9200,7 +9200,7 @@ const struct Trainer gTrainers[] = { [TRAINER_WALLY_VR_2] = { .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_WALLY, .trainerName = _("WALLY"), @@ -9214,7 +9214,7 @@ const struct Trainer gTrainers[] = { [TRAINER_WALLY_VR_3] = { .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_WALLY, .trainerName = _("WALLY"), @@ -9228,7 +9228,7 @@ const struct Trainer gTrainers[] = { [TRAINER_WALLY_VR_4] = { .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_WALLY, .trainerName = _("WALLY"), @@ -9242,7 +9242,7 @@ const struct Trainer gTrainers[] = { [TRAINER_WALLY_VR_5] = { .partyFlags = F_TRAINER_PARTY_CUSTOM_MOVESET, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_WALLY, .trainerName = _("WALLY"), @@ -9256,7 +9256,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_LILYCOVE_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -9270,7 +9270,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_LILYCOVE_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -9284,7 +9284,7 @@ const struct Trainer gTrainers[] = { [TRAINER_BRENDAN_LILYCOVE_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_BRENDAN, .trainerName = _("BRENDAN"), @@ -9298,7 +9298,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_LILYCOVE_MUDKIP] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -9312,7 +9312,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_LILYCOVE_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -9326,7 +9326,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_LILYCOVE_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -10754,7 +10754,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_RUSTBORO_TREECKO] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -10768,7 +10768,7 @@ const struct Trainer gTrainers[] = { [TRAINER_MAY_RUSTBORO_TORCHIC] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_FEMALE, .trainerPic = TRAINER_PIC_MAY, .trainerName = _("MAY"), @@ -11258,7 +11258,7 @@ const struct Trainer gTrainers[] = { [TRAINER_STEVEN] = { .partyFlags = F_TRAINER_PARTY_HELD_ITEM | F_TRAINER_PARTY_CUSTOM_MOVESET, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_STEVEN, .trainerName = _("STEVEN"), @@ -11916,7 +11916,7 @@ const struct Trainer gTrainers[] = { [TRAINER_RED] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_RED, .trainerName = _("RED"), @@ -11930,7 +11930,7 @@ const struct Trainer gTrainers[] = { [TRAINER_LEAF] = { .partyFlags = 0, - .trainerClass = TRAINER_CLASS_PKMN_TRAINER_3, + .trainerClass = TRAINER_CLASS_RIVAL, .encounterMusic_gender = F_TRAINER_FEMALE | TRAINER_ENCOUNTER_MUSIC_MALE, .trainerPic = TRAINER_PIC_LEAF, .trainerName = _("LEAF"), diff --git a/src/pokemon.c b/src/pokemon.c index dc53da88c8..62c4441217 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -52,7 +52,6 @@ struct SpeciesItem u16 item; }; -// this file's functions static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon); static union PokemonSubstruct *GetSubstruct(struct BoxPokemon *boxMon, u32 personality, u8 substructType); static void EncryptBoxMon(struct BoxPokemon *boxMon); @@ -61,8 +60,8 @@ static void Task_PlayMapChosenOrBattleBGM(u8 taskId); static bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 battlerId); static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); static bool8 ShouldSkipFriendshipChange(void); +static u8 SendMonToPC(struct Pokemon* mon); -// EWRAM vars EWRAM_DATA static u8 sLearningMoveTableID = 0; EWRAM_DATA u8 gPlayerPartyCount = 0; EWRAM_DATA u8 gEnemyPartyCount = 0; @@ -71,7 +70,6 @@ EWRAM_DATA struct Pokemon gEnemyParty[PARTY_SIZE] = {0}; EWRAM_DATA struct SpriteTemplate gMultiuseSpriteTemplate = {0}; EWRAM_DATA static struct MonSpritesGfxManager *sMonSpritesGfxManagers[MON_SPR_GFX_MANAGERS_COUNT] = {NULL}; -// const rom data #include "data/battle_moves.h" // Used in an unreferenced function in RS. @@ -93,7 +91,8 @@ static const struct CombinedMove sCombinedMoves[2] = #define SPECIES_TO_NATIONAL(name) [SPECIES_##name - 1] = NATIONAL_DEX_##name #define HOENN_TO_NATIONAL(name) [HOENN_DEX_##name - 1] = NATIONAL_DEX_##name -const u16 gSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) + // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) +static const u16 sSpeciesToHoennPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_HOENN(BULBASAUR), SPECIES_TO_HOENN(IVYSAUR), @@ -508,7 +507,8 @@ const u16 gSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoenn Dex SPECIES_TO_HOENN(CHIMECHO), }; -const u16 gSpeciesToNationalPokedexNum[] = // Assigns all species to the National Dex Index (Summary No. for National Dex) + // Assigns all species to the National Dex Index (Summary No. for National Dex) +static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_NATIONAL(BULBASAUR), SPECIES_TO_NATIONAL(IVYSAUR), @@ -923,7 +923,8 @@ const u16 gSpeciesToNationalPokedexNum[] = // Assigns all species to the Nationa SPECIES_TO_NATIONAL(CHIMECHO), }; -const u16 gHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using National Dex Index) + // Assigns all Hoenn Dex Indexes to a National Dex Index +static const u16 sHoennToNationalOrder[NUM_SPECIES - 1] = { HOENN_TO_NATIONAL(TREECKO), HOENN_TO_NATIONAL(GROVYLE), @@ -1389,7 +1390,7 @@ const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = // SPECIES_NONE are ignored in the following two tables, so decrement before accessing these arrays to get the right result -static const u8 sMonFrontAnimIdsTable[] = +static const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = { [SPECIES_BULBASAUR - 1] = ANIM_V_JUMPS_H_JUMPS, [SPECIES_IVYSAUR - 1] = ANIM_V_STRETCH, @@ -1838,9 +1839,19 @@ static const u8 sMonAnimationDelayTable[NUM_SPECIES - 1] = [SPECIES_RAYQUAZA - 1] = 60, }; -const u8 gPPUpGetMask[] = {0x03, 0x0c, 0x30, 0xc0}; // Masks for getting PP Up count, also PP Max values -const u8 gPPUpSetMask[] = {0xfc, 0xf3, 0xcf, 0x3f}; // Masks for setting PP Up count -const u8 gPPUpAddMask[] = {0x01, 0x04, 0x10, 0x40}; // Values added to PP Up count +#define PP_UP_SHIFTS(val) val, (val) << 2, (val) << 4, (val) << 6 +#define PP_UP_SHIFTS_INV(val) (u8)~(val), (u8)~((val) << 2), (u8)~((val) << 4), (u8)~((val) << 6) + +// PP Up bonuses are stored for a Pokémon as a single byte. +// There are 2 bits (a value 0-3) for each move slot that +// represent how many PP Ups have been applied. +// The following arrays take a move slot id and return: +// gPPUpGetMask - A mask to get the number of PP Ups applied to that move slot +// gPPUpClearMask - A mask to clear the number of PP Ups applied to that move slot +// gPPUpAddValues - A value to add to the PP Bonuses byte to apply 1 PP Up to that move slot +const u8 gPPUpGetMask[MAX_MON_MOVES] = {PP_UP_SHIFTS(3)}; +const u8 gPPUpClearMask[MAX_MON_MOVES] = {PP_UP_SHIFTS_INV(3)}; +const u8 gPPUpAddValues[MAX_MON_MOVES] = {PP_UP_SHIFTS(1)}; const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2] = { @@ -2028,10 +2039,23 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = }, }; -static const u8 sSecretBaseFacilityClasses[2][5] = +#define NUM_SECRET_BASE_CLASSES 5 +static const u8 sSecretBaseFacilityClasses[GENDER_COUNT][NUM_SECRET_BASE_CLASSES] = { - {FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_BUG_CATCHER, FACILITY_CLASS_RICH_BOY, FACILITY_CLASS_CAMPER, FACILITY_CLASS_COOLTRAINER_M}, - {FACILITY_CLASS_LASS, FACILITY_CLASS_SCHOOL_KID_F, FACILITY_CLASS_LADY, FACILITY_CLASS_PICNICKER, FACILITY_CLASS_COOLTRAINER_F} + [MALE] = { + FACILITY_CLASS_YOUNGSTER, + FACILITY_CLASS_BUG_CATCHER, + FACILITY_CLASS_RICH_BOY, + FACILITY_CLASS_CAMPER, + FACILITY_CLASS_COOLTRAINER_M + }, + [FEMALE] = { + FACILITY_CLASS_LASS, + FACILITY_CLASS_SCHOOL_KID_F, + FACILITY_CLASS_LADY, + FACILITY_CLASS_PICNICKER, + FACILITY_CLASS_COOLTRAINER_F + } }; static const u8 sGetMonDataEVConstants[] = @@ -2112,7 +2136,6 @@ static const struct SpriteTemplate sSpriteTemplate_64x64 = .callback = SpriteCallbackDummy, }; -// code void ZeroBoxMonData(struct BoxPokemon *boxMon) { u8 *raw = (u8 *)boxMon; @@ -2135,7 +2158,7 @@ void ZeroMonData(struct Pokemon *mon) SetMonData(mon, MON_DATA_SPEED, &arg); SetMonData(mon, MON_DATA_SPATK, &arg); SetMonData(mon, MON_DATA_SPDEF, &arg); - arg = 255; + arg = MAIL_NONE; SetMonData(mon, MON_DATA_MAIL, &arg); } @@ -2155,12 +2178,12 @@ void ZeroEnemyPartyMons(void) void CreateMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId) { - u32 arg; + u32 mail; ZeroMonData(mon); CreateBoxMon(&mon->box, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId); SetMonData(mon, MON_DATA_LEVEL, &level); - arg = 255; - SetMonData(mon, MON_DATA_MAIL, &arg); + mail = MAIL_NONE; + SetMonData(mon, MON_DATA_MAIL, &mail); CalculateMonStats(mon); } @@ -2180,21 +2203,22 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, SetBoxMonData(boxMon, MON_DATA_PERSONALITY, &personality); - //Determine original trainer ID - if (otIdType == OT_ID_RANDOM_NO_SHINY) //Pokemon cannot be shiny + // Determine original trainer ID + if (otIdType == OT_ID_RANDOM_NO_SHINY) { u32 shinyValue; do { + // Choose random OT IDs until one that results in a non-shiny Pokémon value = Random32(); - shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(value, personality); } while (shinyValue < SHINY_ODDS); } - else if (otIdType == OT_ID_PRESET) //Pokemon has a preset OT ID + else if (otIdType == OT_ID_PRESET) { value = fixedOtId; } - else //Player is the OT + else // Player is the OT { value = gSaveBlock2Ptr->playerTrainerId[0] | (gSaveBlock2Ptr->playerTrainerId[1] << 8) @@ -2272,7 +2296,7 @@ void CreateMonWithNature(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, } while (nature != GetNatureFromPersonality(personality)); - CreateMon(mon, species, level, fixedIV, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, fixedIV, TRUE, personality, OT_ID_PLAYER_ID, 0); } void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 gender, u8 nature, u8 unownLetter) @@ -2302,7 +2326,7 @@ void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, || gender != GetGenderFromSpeciesAndPersonality(species, personality)); } - CreateMon(mon, species, level, fixedIV, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, fixedIV, TRUE, personality, OT_ID_PLAYER_ID, 0); } // This is only used to create Wally's Ralts. @@ -2317,25 +2341,25 @@ void CreateMaleMon(struct Pokemon *mon, u16 species, u8 level) personality = Random32(); } while (GetGenderFromSpeciesAndPersonality(species, personality) != MON_MALE); - CreateMon(mon, species, level, USE_RANDOM_IVS, 1, personality, OT_ID_PRESET, otId); + CreateMon(mon, species, level, USE_RANDOM_IVS, TRUE, personality, OT_ID_PRESET, otId); } void CreateMonWithIVsPersonality(struct Pokemon *mon, u16 species, u8 level, u32 ivs, u32 personality) { - CreateMon(mon, species, level, 0, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, 0, TRUE, personality, OT_ID_PLAYER_ID, 0); SetMonData(mon, MON_DATA_IVS, &ivs); CalculateMonStats(mon); } void CreateMonWithIVsOTID(struct Pokemon *mon, u16 species, u8 level, u8 *ivs, u32 otId) { - CreateMon(mon, species, level, 0, 0, 0, OT_ID_PRESET, otId); - SetMonData(mon, MON_DATA_HP_IV, &ivs[0]); - SetMonData(mon, MON_DATA_ATK_IV, &ivs[1]); - SetMonData(mon, MON_DATA_DEF_IV, &ivs[2]); - SetMonData(mon, MON_DATA_SPEED_IV, &ivs[3]); - SetMonData(mon, MON_DATA_SPATK_IV, &ivs[4]); - SetMonData(mon, MON_DATA_SPDEF_IV, &ivs[5]); + CreateMon(mon, species, level, 0, FALSE, 0, OT_ID_PRESET, otId); + SetMonData(mon, MON_DATA_HP_IV, &ivs[STAT_HP]); + SetMonData(mon, MON_DATA_ATK_IV, &ivs[STAT_ATK]); + SetMonData(mon, MON_DATA_DEF_IV, &ivs[STAT_DEF]); + SetMonData(mon, MON_DATA_SPEED_IV, &ivs[STAT_SPEED]); + SetMonData(mon, MON_DATA_SPATK_IV, &ivs[STAT_SPATK]); + SetMonData(mon, MON_DATA_SPDEF_IV, &ivs[STAT_SPDEF]); CalculateMonStats(mon); } @@ -2346,7 +2370,7 @@ void CreateMonWithEVSpread(struct Pokemon *mon, u16 species, u8 level, u8 fixedI u16 evAmount; u8 evsBits; - CreateMon(mon, species, level, fixedIV, 0, 0, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, fixedIV, FALSE, 0, OT_ID_PLAYER_ID, 0); evsBits = evSpread; @@ -2378,7 +2402,7 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) u8 language; u8 value; - CreateMon(mon, src->species, src->level, 0, 1, src->personality, OT_ID_PRESET, src->otId); + CreateMon(mon, src->species, src->level, 0, TRUE, src->personality, OT_ID_PRESET, src->otId); for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(mon, src->moves[i], i); @@ -2425,7 +2449,7 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) CalculateMonStats(mon); } -void CreateBattleTowerMon2(struct Pokemon *mon, struct BattleTowerPokemon *src, bool8 lvl50) +void CreateBattleTowerMon_HandleLevel(struct Pokemon *mon, struct BattleTowerPokemon *src, bool8 lvl50) { s32 i; u8 nickname[30]; @@ -2440,7 +2464,7 @@ void CreateBattleTowerMon2(struct Pokemon *mon, struct BattleTowerPokemon *src, else level = src->level; - CreateMon(mon, src->species, level, 0, 1, src->personality, OT_ID_PRESET, src->otId); + CreateMon(mon, src->species, level, 0, TRUE, src->personality, OT_ID_PRESET, src->otId); for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(mon, src->moves[i], i); @@ -2737,7 +2761,7 @@ void CreateEventLegalEnemyMon(void) s32 itemId = gSpecialVar_0x8006; ZeroEnemyPartyMons(); - CreateEventLegalMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, 0, 0, 0, 0); + CreateEventLegalMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); if (itemId) { u8 heldItem[2]; @@ -2756,16 +2780,16 @@ static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon) union PokemonSubstruct *substruct3 = GetSubstruct(boxMon, boxMon->personality, 3); s32 i; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct0->raw); i++) checksum += substruct0->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct1->raw); i++) checksum += substruct1->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct2->raw); i++) checksum += substruct2->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct3->raw); i++) checksum += substruct3->raw[i]; return checksum; @@ -2857,7 +2881,7 @@ void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest) SetMonData(dest, MON_DATA_STATUS, &value); SetMonData(dest, MON_DATA_HP, &value); SetMonData(dest, MON_DATA_MAX_HP, &value); - value = 255; + value = MAIL_NONE; SetMonData(dest, MON_DATA_MAIL, &value); CalculateMonStats(dest); } @@ -2915,7 +2939,7 @@ u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move) for (i = 0; i < MAX_MON_MOVES; i++) { - if (!mon->moves[i]) + if (mon->moves[i] == MOVE_NONE) { mon->moves[i] = move; mon->pp[i] = gBattleMoves[move].pp; @@ -2923,7 +2947,7 @@ u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move) } } - return 0xFFFF; + return MON_HAS_MAX_MOVES; } void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot) @@ -3013,8 +3037,8 @@ void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move) ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); ppBonuses >>= 2; - moves[3] = move; - pp[3] = gBattleMoves[move].pp; + moves[MAX_MON_MOVES - 1] = move; + pp[MAX_MON_MOVES - 1] = gBattleMoves[move].pp; for (i = 0; i < MAX_MON_MOVES; i++) { @@ -3040,8 +3064,8 @@ void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) ppBonuses = GetBoxMonData(boxMon, MON_DATA_PP_BONUSES, NULL); ppBonuses >>= 2; - moves[3] = move; - pp[3] = gBattleMoves[move].pp; + moves[MAX_MON_MOVES - 1] = move; + pp[MAX_MON_MOVES - 1] = gBattleMoves[move].pp; for (i = 0; i < MAX_MON_MOVES; i++) { @@ -3086,6 +3110,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de spAttack = attacker->spAttack; spDefense = defender->spDefense; + // Get attacker hold item info if (attacker->item == ITEM_ENIGMA_BERRY) { attackerHoldEffect = gEnigmaBerries[battlerIdAtk].holdEffect; @@ -3097,6 +3122,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de attackerHoldEffectParam = ItemId_GetHoldEffectParam(attacker->item); } + // Get defender hold item info if (defender->item == ITEM_ENIGMA_BERRY) { defenderHoldEffect = gEnigmaBerries[battlerIdDef].holdEffect; @@ -3120,6 +3146,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerIdDef)) spDefense = (110 * spDefense) / 100; + // Apply type-bonus hold item for (i = 0; i < ARRAY_COUNT(sHoldEffectToType); i++) { if (attackerHoldEffect == sHoldEffectToType[i][0] @@ -3133,6 +3160,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } + // Apply boosts from hold items if (attackerHoldEffect == HOLD_EFFECT_CHOICE_BAND) attack = (150 * attack) / 100; if (attackerHoldEffect == HOLD_EFFECT_SOUL_DEW && !(gBattleTypeFlags & (BATTLE_TYPE_FRONTIER)) && (attacker->species == SPECIES_LATIAS || attacker->species == SPECIES_LATIOS)) @@ -3149,6 +3177,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de defense *= 2; if (attackerHoldEffect == HOLD_EFFECT_THICK_CLUB && (attacker->species == SPECIES_CUBONE || attacker->species == SPECIES_MAROWAK)) attack *= 2; + + // Apply abilities / field sports if (defender->ability == ABILITY_THICK_FAT && (type == TYPE_FIRE || type == TYPE_ICE)) spAttack /= 2; if (attacker->ability == ABILITY_HUSTLE) @@ -3161,9 +3191,9 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de attack = (150 * attack) / 100; if (defender->ability == ABILITY_MARVEL_SCALE && defender->status1) defense = (150 * defense) / 100; - if (type == TYPE_ELECTRIC && AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, 0, 0xFD, 0)) + if (type == TYPE_ELECTRIC && AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, 0, ABILITYEFFECT_MUD_SPORT, 0)) gBattleMovePower /= 2; - if (type == TYPE_FIRE && AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, 0, 0xFE, 0)) + if (type == TYPE_FIRE && AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, 0, ABILITYEFFECT_WATER_SPORT, 0)) gBattleMovePower /= 2; if (type == TYPE_GRASS && attacker->ability == ABILITY_OVERGROW && attacker->hp <= (attacker->maxHP / 3)) gBattleMovePower = (150 * gBattleMovePower) / 100; @@ -3173,6 +3203,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de gBattleMovePower = (150 * gBattleMovePower) / 100; if (type == TYPE_BUG && attacker->ability == ABILITY_SWARM && attacker->hp <= (attacker->maxHP / 3)) gBattleMovePower = (150 * gBattleMovePower) / 100; + + // Self-destruct / Explosion cut defense in half if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION) defense /= 2; @@ -3180,6 +3212,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de { if (gCritMultiplier == 2) { + // Critical hit, if attacker has lost attack stat stages then ignore stat drop if (attacker->statStages[STAT_ATK] > DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damage, attacker, attack, STAT_ATK) else @@ -3193,6 +3226,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (gCritMultiplier == 2) { + // Critical hit, if defender has gained defense stat stages then ignore stat increase if (defender->statStages[STAT_DEF] < DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damageHelper, defender, defense, STAT_DEF) else @@ -3204,9 +3238,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage = damage / damageHelper; damage /= 50; + // Burn cuts attack in half if ((attacker->status1 & STATUS1_BURN) && attacker->ability != ABILITY_GUTS) damage /= 2; + // Apply Reflect if ((sideStatus & SIDE_STATUS_REFLECT) && gCritMultiplier == 1) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) @@ -3215,10 +3251,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage /= 2; } + // Moves hitting both targets do half damage in double battles if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == MOVE_TARGET_BOTH && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) damage /= 2; - // moves always do at least 1 damage. + // Moves always do at least 1 damage. if (damage == 0) damage = 1; } @@ -3230,6 +3267,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de { if (gCritMultiplier == 2) { + // Critical hit, if attacker has lost sp. attack stat stages then ignore stat drop if (attacker->statStages[STAT_SPATK] > DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damage, attacker, spAttack, STAT_SPATK) else @@ -3243,6 +3281,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (gCritMultiplier == 2) { + // Critical hit, if defender has gained sp. defense stat stages then ignore stat increase if (defender->statStages[STAT_SPDEF] < DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damageHelper, defender, spDefense, STAT_SPDEF) else @@ -3254,6 +3293,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage = (damage / damageHelper); damage /= 50; + // Apply Lightscreen if ((sideStatus & SIDE_STATUS_LIGHTSCREEN) && gCritMultiplier == 1) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) @@ -3262,12 +3302,14 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage /= 2; } + // Moves hitting both targets do half damage in double battles if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == MOVE_TARGET_BOTH && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) damage /= 2; - // are effects of weather negated with cloud nine or air lock + // Are effects of weather negated with cloud nine or air lock if (WEATHER_HAS_EFFECT2) { + // Rain weakens Fire, boosts Water if (gBattleWeather & B_WEATHER_RAIN_TEMPORARY) { switch (type) @@ -3281,11 +3323,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } - // any weather except sun weakens solar beam + // Any weather except sun weakens solar beam if ((gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_HAIL)) && gCurrentMove == MOVE_SOLAR_BEAM) damage /= 2; - // sunny + // Sun boosts Fire, weakens Water if (gBattleWeather & B_WEATHER_SUN) { switch (type) @@ -3300,7 +3342,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } - // flash fire triggered + // Flash fire triggered if ((gBattleResources->flags->flags[battlerIdAtk] & RESOURCE_FLAG_FLASH_FIRE) && type == TYPE_FIRE) damage = (15 * damage) / 10; } @@ -3441,13 +3483,13 @@ void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition) gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag]; } -void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosition) +void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerPicId, u8 battlerPosition) { - gMultiuseSpriteTemplate.paletteTag = trainerSpriteId; + gMultiuseSpriteTemplate.paletteTag = trainerPicId; if (battlerPosition == B_POSITION_PLAYER_LEFT || battlerPosition == B_POSITION_PLAYER_RIGHT) { - gMultiuseSpriteTemplate = sTrainerBackSpriteTemplates[trainerSpriteId]; - gMultiuseSpriteTemplate.anims = gTrainerBackAnimsPtrTable[trainerSpriteId]; + gMultiuseSpriteTemplate = sTrainerBackSpriteTemplates[trainerPicId]; + gMultiuseSpriteTemplate.anims = gTrainerBackAnimsPtrTable[trainerPicId]; } else { @@ -3455,25 +3497,25 @@ void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosit gMultiuseSpriteTemplate = gMonSpritesGfxPtr->templates[battlerPosition]; else gMultiuseSpriteTemplate = gBattlerSpriteTemplates[battlerPosition]; - gMultiuseSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[trainerSpriteId]; + gMultiuseSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[trainerPicId]; } } -void SetMultiuseSpriteTemplateToTrainerFront(u16 arg0, u8 battlerPosition) +void SetMultiuseSpriteTemplateToTrainerFront(u16 trainerPicId, u8 battlerPosition) { if (gMonSpritesGfxPtr != NULL) gMultiuseSpriteTemplate = gMonSpritesGfxPtr->templates[battlerPosition]; else gMultiuseSpriteTemplate = gBattlerSpriteTemplates[battlerPosition]; - gMultiuseSpriteTemplate.paletteTag = arg0; - gMultiuseSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[arg0]; + gMultiuseSpriteTemplate.paletteTag = trainerPicId; + gMultiuseSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[trainerPicId]; } static void EncryptBoxMon(struct BoxPokemon *boxMon) { u32 i; - for (i = 0; i < 12; i++) + for (i = 0; i < ARRAY_COUNT(boxMon->secure.raw); i++) { boxMon->secure.raw[i] ^= boxMon->personality; boxMon->secure.raw[i] ^= boxMon->otId; @@ -3483,7 +3525,7 @@ static void EncryptBoxMon(struct BoxPokemon *boxMon) static void DecryptBoxMon(struct BoxPokemon *boxMon) { u32 i; - for (i = 0; i < 12; i++) + for (i = 0; i < ARRAY_COUNT(boxMon->secure.raw); i++) { boxMon->secure.raw[i] ^= boxMon->otId; boxMon->secure.raw[i] ^= boxMon->personality; @@ -3661,9 +3703,9 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) if (CalculateBoxMonChecksum(boxMon) != boxMon->checksum) { - boxMon->isBadEgg = 1; - boxMon->isEgg = 1; - substruct3->isEgg = 1; + boxMon->isBadEgg = TRUE; + boxMon->isEgg = TRUE; + substruct3->isEgg = TRUE; } } @@ -3915,7 +3957,12 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) retVal = SPECIES_EGG; break; case MON_DATA_IVS: - retVal = substruct3->hpIV | (substruct3->attackIV << 5) | (substruct3->defenseIV << 10) | (substruct3->speedIV << 15) | (substruct3->spAttackIV << 20) | (substruct3->spDefenseIV << 25); + retVal = substruct3->hpIV + | (substruct3->attackIV << 5) + | (substruct3->defenseIV << 10) + | (substruct3->speedIV << 15) + | (substruct3->spAttackIV << 20) + | (substruct3->spDefenseIV << 25); break; case MON_DATA_KNOWN_MOVES: if (substruct0->species && !substruct3->isEgg) @@ -4059,9 +4106,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) if (CalculateBoxMonChecksum(boxMon) != boxMon->checksum) { - boxMon->isBadEgg = 1; - boxMon->isEgg = 1; - substruct3->isEgg = 1; + boxMon->isBadEgg = TRUE; + boxMon->isEgg = TRUE; + substruct3->isEgg = TRUE; EncryptBoxMon(boxMon); return; } @@ -4114,9 +4161,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) { SET16(substruct0->species); if (substruct0->species) - boxMon->hasSpecies = 1; + boxMon->hasSpecies = TRUE; else - boxMon->hasSpecies = 0; + boxMon->hasSpecies = FALSE; break; } case MON_DATA_HELD_ITEM: @@ -4224,9 +4271,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_IS_EGG: SET8(substruct3->isEgg); if (substruct3->isEgg) - boxMon->isEgg = 1; + boxMon->isEgg = TRUE; else - boxMon->isEgg = 0; + boxMon->isEgg = FALSE; break; case MON_DATA_ABILITY_NUM: SET8(substruct3->abilityNum); @@ -4337,7 +4384,7 @@ u8 GiveMonToPlayer(struct Pokemon *mon) return MON_GIVEN_TO_PARTY; } -u8 SendMonToPC(struct Pokemon* mon) +static u8 SendMonToPC(struct Pokemon* mon) { s32 boxNo, boxPos; @@ -4468,7 +4515,7 @@ void CreateSecretBaseEnemyParty(struct SecretBase *secretBaseRecord) gBattleResources->secretBase->party.species[i], gBattleResources->secretBase->party.levels[i], 15, - 1, + TRUE, gBattleResources->secretBase->party.personality[i], OT_ID_RANDOM_NO_SHINY, 0); @@ -4489,13 +4536,13 @@ void CreateSecretBaseEnemyParty(struct SecretBase *secretBaseRecord) u8 GetSecretBaseTrainerPicIndex(void) { - u8 facilityClass = sSecretBaseFacilityClasses[gBattleResources->secretBase->gender][gBattleResources->secretBase->trainerId[0] % 5]; + u8 facilityClass = sSecretBaseFacilityClasses[gBattleResources->secretBase->gender][gBattleResources->secretBase->trainerId[0] % NUM_SECRET_BASE_CLASSES]; return gFacilityClassToPicIndex[facilityClass]; } u8 GetSecretBaseTrainerClass(void) { - u8 facilityClass = sSecretBaseFacilityClasses[gBattleResources->secretBase->gender][gBattleResources->secretBase->trainerId[0] % 5]; + u8 facilityClass = sSecretBaseFacilityClasses[gBattleResources->secretBase->gender][gBattleResources->secretBase->trainerId[0] % NUM_SECRET_BASE_CLASSES]; return gFacilityClassToTrainerClass[facilityClass]; } @@ -4529,7 +4576,7 @@ void GetSpeciesName(u8 *name, u16 species) for (i = 0; i <= POKEMON_NAME_LENGTH; i++) { if (species > NUM_SPECIES) - name[i] = gSpeciesNames[0][i]; + name[i] = gSpeciesNames[SPECIES_NONE][i]; else name[i] = gSpeciesNames[species][i]; @@ -4549,13 +4596,13 @@ u8 CalculatePPWithBonus(u16 move, u8 ppBonuses, u8 moveIndex) void RemoveMonPPBonus(struct Pokemon *mon, u8 moveIndex) { u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); - ppBonuses &= gPPUpSetMask[moveIndex]; + ppBonuses &= gPPUpClearMask[moveIndex]; SetMonData(mon, MON_DATA_PP_BONUSES, &ppBonuses); } void RemoveBattleMonPPBonus(struct BattlePokemon *mon, u8 moveIndex) { - mon->ppBonuses &= gPPUpSetMask[moveIndex]; + mon->ppBonuses &= gPPUpClearMask[moveIndex]; } void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) @@ -4618,7 +4665,7 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, return PokemonUseItemEffects(mon, item, partyIndex, moveIndex, FALSE); } -#define UPDATE_FRIENDSHIP_FROM_ITEM \ +#define UPDATE_FRIENDSHIP_FROM_ITEM() \ { \ if ((retVal == 0 || friendshipOnly) && !ShouldSkipFriendshipChange() && friendshipChange == 0) \ { \ @@ -4855,7 +4902,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov temp1 = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); if (dataUnsigned <= 2 && temp1 > 4) { - dataUnsigned = GetMonData(mon, MON_DATA_PP_BONUSES, NULL) + gPPUpAddMask[moveIndex]; + dataUnsigned = GetMonData(mon, MON_DATA_PP_BONUSES, NULL) + gPPUpAddValues[moveIndex]; SetMonData(mon, MON_DATA_PP_BONUSES, &dataUnsigned); dataUnsigned = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), dataUnsigned, moveIndex) - temp1; @@ -5152,11 +5199,13 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov case 4: // ITEM5_PP_MAX dataUnsigned = (GetMonData(mon, MON_DATA_PP_BONUSES, NULL) & gPPUpGetMask[moveIndex]) >> (moveIndex * 2); temp2 = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); - if (dataUnsigned < 3 && temp2 > 4) + + // Check if 3 PP Ups have been applied already, and that the move has a total PP of at least 5 (excludes Sketch) + if (dataUnsigned < 3 && temp2 >= 5) { dataUnsigned = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); - dataUnsigned &= gPPUpSetMask[moveIndex]; - dataUnsigned += gPPUpAddMask[moveIndex] * 3; + dataUnsigned &= gPPUpClearMask[moveIndex]; + dataUnsigned += gPPUpAddValues[moveIndex] * 3; // Apply 3 PP Ups (max) SetMonData(mon, MON_DATA_PP_BONUSES, &dataUnsigned); dataUnsigned = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), dataUnsigned, moveIndex) - temp2; @@ -5172,25 +5221,19 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov // In general, Pokémon with lower friendship receive more, // and Pokémon with higher friendship receive less. if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100) - { - UPDATE_FRIENDSHIP_FROM_ITEM; - } + UPDATE_FRIENDSHIP_FROM_ITEM(); itemEffectParam++; break; case 6: // ITEM5_FRIENDSHIP_MID if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 100 && GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 200) - { - UPDATE_FRIENDSHIP_FROM_ITEM; - } + UPDATE_FRIENDSHIP_FROM_ITEM(); itemEffectParam++; break; case 7: // ITEM5_FRIENDSHIP_HIGH if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200) - { - UPDATE_FRIENDSHIP_FROM_ITEM; - } + UPDATE_FRIENDSHIP_FROM_ITEM(); itemEffectParam++; break; } @@ -5496,7 +5539,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem) case EVO_TRADE_ITEM: if (gEvolutionTable[species][i].param == heldItem) { - heldItem = 0; + heldItem = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem); targetSpecies = gEvolutionTable[species][i].targetSpecies; } @@ -5530,7 +5573,7 @@ u16 HoennPokedexNumToSpecies(u16 hoennNum) species = 0; - while (species < (NUM_SPECIES - 1) && gSpeciesToHoennPokedexNum[species] != hoennNum) + while (species < (NUM_SPECIES - 1) && sSpeciesToHoennPokedexNum[species] != hoennNum) species++; if (species == NUM_SPECIES - 1) @@ -5548,7 +5591,7 @@ u16 NationalPokedexNumToSpecies(u16 nationalNum) species = 0; - while (species < (NUM_SPECIES - 1) && gSpeciesToNationalPokedexNum[species] != nationalNum) + while (species < (NUM_SPECIES - 1) && sSpeciesToNationalPokedexNum[species] != nationalNum) species++; if (species == NUM_SPECIES - 1) @@ -5566,7 +5609,7 @@ u16 NationalToHoennOrder(u16 nationalNum) hoennNum = 0; - while (hoennNum < (NUM_SPECIES - 1) && gHoennToNationalOrder[hoennNum] != nationalNum) + while (hoennNum < (NUM_SPECIES - 1) && sHoennToNationalOrder[hoennNum] != nationalNum) hoennNum++; if (hoennNum == NUM_SPECIES - 1) @@ -5580,7 +5623,7 @@ u16 SpeciesToNationalPokedexNum(u16 species) if (!species) return 0; - return gSpeciesToNationalPokedexNum[species - 1]; + return sSpeciesToNationalPokedexNum[species - 1]; } u16 SpeciesToHoennPokedexNum(u16 species) @@ -5588,7 +5631,7 @@ u16 SpeciesToHoennPokedexNum(u16 species) if (!species) return 0; - return gSpeciesToHoennPokedexNum[species - 1]; + return sSpeciesToHoennPokedexNum[species - 1]; } u16 HoennToNationalOrder(u16 hoennNum) @@ -5596,7 +5639,7 @@ u16 HoennToNationalOrder(u16 hoennNum) if (!hoennNum) return 0; - return gHoennToNationalOrder[hoennNum - 1]; + return sHoennToNationalOrder[hoennNum - 1]; } u16 SpeciesToCryId(u16 species) @@ -6278,7 +6321,7 @@ u16 GetBattleBGM(void) return MUS_VS_GYM_LEADER; case TRAINER_CLASS_CHAMPION: return MUS_VS_CHAMPION; - case TRAINER_CLASS_PKMN_TRAINER_3: + case TRAINER_CLASS_RIVAL: if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) return MUS_VS_RIVAL; if (!StringCompare(gTrainers[gTrainerBattleOpponent_A].trainerName, gText_BattleWallyName)) @@ -6357,9 +6400,9 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p u32 shinyValue; if (species > NUM_SPECIES) - return gMonPaletteTable[0].data; + return gMonPaletteTable[SPECIES_NONE].data; - shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) return gMonShinyPaletteTable[species].data; else @@ -6378,7 +6421,7 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u { u32 shinyValue; - shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) return &gMonShinyPaletteTable[species]; else @@ -6426,12 +6469,11 @@ bool8 IsOtherTrainer(u32 otId, u8 *otName) { if (otId == (gSaveBlock2Ptr->playerTrainerId[0] - | (gSaveBlock2Ptr->playerTrainerId[1] << 8) - | (gSaveBlock2Ptr->playerTrainerId[2] << 16) - | (gSaveBlock2Ptr->playerTrainerId[3] << 24))) + | (gSaveBlock2Ptr->playerTrainerId[1] << 8) + | (gSaveBlock2Ptr->playerTrainerId[2] << 16) + | (gSaveBlock2Ptr->playerTrainerId[3] << 24))) { int i; - for (i = 0; otName[i] != EOS; i++) if (otName[i] != gSaveBlock2Ptr->playerName[i]) return TRUE; @@ -6496,28 +6538,30 @@ void SetWildMonHeldItem(void) { u16 rnd = Random() % 100; u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, 0); - u16 var1 = 45; - u16 var2 = 95; + u16 chanceNoItem = 45; + u16 chanceCommon = 95; if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG, 0) && GetMonAbility(&gPlayerParty[0]) == ABILITY_COMPOUND_EYES) { - var1 = 20; - var2 = 80; + chanceNoItem = 20; + chanceCommon = 80; } if (gMapHeader.mapLayoutId == LAYOUT_ALTERING_CAVE) { s32 alteringCaveId = GetWildMonTableIdInAlteringCave(species); if (alteringCaveId != 0) { - if (rnd < var2) + // In active Altering Cave, use special item list + if (rnd < chanceCommon) return; SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &sAlteringCaveWildMonHeldItems[alteringCaveId].item); } else { - if (rnd < var1) + // In inactive Altering Cave, use normal items + if (rnd < chanceNoItem) return; - if (rnd < var2) + if (rnd < chanceCommon) SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); else SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item2); @@ -6525,15 +6569,16 @@ void SetWildMonHeldItem(void) } else { - if (gBaseStats[species].item1 == gBaseStats[species].item2 && gBaseStats[species].item1 != 0) + if (gBaseStats[species].item1 == gBaseStats[species].item2 && gBaseStats[species].item1 != ITEM_NONE) { + // Both held items are the same, 100% chance to hold item SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); } else { - if (rnd < var1) + if (rnd < chanceNoItem) return; - if (rnd < var2) + if (rnd < chanceCommon) SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); else SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item2); @@ -6552,7 +6597,7 @@ bool8 IsMonShiny(struct Pokemon *mon) bool8 IsShinyOtIdPersonality(u32 otId, u32 personality) { bool8 retVal = FALSE; - u32 shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + u32 shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) retVal = TRUE; return retVal; @@ -6590,37 +6635,40 @@ const u8 *GetTrainerPartnerName(void) gTasks[taskId].data[dataId + 1] = (u32)(ptr) >> 16; \ } +#define sAnimId data[2] +#define sAnimDelay data[3] + static void Task_AnimateAfterDelay(u8 taskId) { - if (--gTasks[taskId].data[3] == 0) + if (--gTasks[taskId].sAnimDelay == 0) { - LaunchAnimationTaskForFrontSprite(READ_PTR_FROM_TASK(taskId, 0), gTasks[taskId].data[2]); + LaunchAnimationTaskForFrontSprite(READ_PTR_FROM_TASK(taskId, 0), gTasks[taskId].sAnimId); DestroyTask(taskId); } } static void Task_PokemonSummaryAnimateAfterDelay(u8 taskId) { - if (--gTasks[taskId].data[3] == 0) + if (--gTasks[taskId].sAnimDelay == 0) { - StartMonSummaryAnimation(READ_PTR_FROM_TASK(taskId, 0), gTasks[taskId].data[2]); + StartMonSummaryAnimation(READ_PTR_FROM_TASK(taskId, 0), gTasks[taskId].sAnimId); SummaryScreen_SetAnimDelayTaskId(TASK_NONE); DestroyTask(taskId); } } -void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3) +void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 panMode) { if (gHitMarker & HITMARKER_NO_ANIMATIONS && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))) - DoMonFrontSpriteAnimation(sprite, species, noCry, arg3 | 0x80); + DoMonFrontSpriteAnimation(sprite, species, noCry, panMode | SKIP_FRONT_ANIM); else - DoMonFrontSpriteAnimation(sprite, species, noCry, arg3); + DoMonFrontSpriteAnimation(sprite, species, noCry, panMode); } -void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3) +void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 panModeAnimFlag) { s8 pan; - switch (arg3 & 0x7F) + switch (panModeAnimFlag & (u8)~SKIP_FRONT_ANIM) // Exclude anim flag to get pan mode { case 0: pan = -25; @@ -6632,8 +6680,9 @@ void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, pan = 0; break; } - if (arg3 & 0x80) + if (panModeAnimFlag & SKIP_FRONT_ANIM) { + // No animation, only check if cry needs to be played if (!noCry) PlayCry1(species, pan); sprite->callback = SpriteCallbackDummy; @@ -6648,13 +6697,15 @@ void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, } if (sMonAnimationDelayTable[species - 1] != 0) { + // Animation has delay, start delay task u8 taskId = CreateTask(Task_AnimateAfterDelay, 0); STORE_PTR_IN_TASK(sprite, taskId, 0); - gTasks[taskId].data[2] = sMonFrontAnimIdsTable[species - 1]; - gTasks[taskId].data[3] = sMonAnimationDelayTable[species - 1]; + gTasks[taskId].sAnimId = sMonFrontAnimIdsTable[species - 1]; + gTasks[taskId].sAnimDelay = sMonAnimationDelayTable[species - 1]; } else { + // No delay, start animation LaunchAnimationTaskForFrontSprite(sprite, sMonFrontAnimIdsTable[species - 1]); } sprite->callback = SpriteCallbackDummy_2; @@ -6667,15 +6718,17 @@ void PokemonSummaryDoMonAnimation(struct Sprite* sprite, u16 species, bool8 oneF StartSpriteAnim(sprite, 1); if (sMonAnimationDelayTable[species - 1] != 0) { + // Animation has delay, start delay task u8 taskId = CreateTask(Task_PokemonSummaryAnimateAfterDelay, 0); STORE_PTR_IN_TASK(sprite, taskId, 0); - gTasks[taskId].data[2] = sMonFrontAnimIdsTable[species - 1]; - gTasks[taskId].data[3] = sMonAnimationDelayTable[species - 1]; + gTasks[taskId].sAnimId = sMonFrontAnimIdsTable[species - 1]; + gTasks[taskId].sAnimDelay = sMonAnimationDelayTable[species - 1]; SummaryScreen_SetAnimDelayTaskId(taskId); SetSpriteCB_MonAnimDummy(sprite); } else { + // No delay, start animation StartMonSummaryAnimation(sprite, sMonFrontAnimIdsTable[species - 1]); } } @@ -6700,48 +6753,50 @@ void BattleAnimateBackSprite(struct Sprite* sprite, u16 species) } } -u8 sub_806EF08(u8 arg0) +// Unused, identical to GetOpposingLinkMultiBattlerId but for the player +// "rightSide" from that team's perspective, i.e. B_POSITION_*_RIGHT +static u8 GetOwnOpposingLinkMultiBattlerId(bool8 rightSide) { s32 i; - s32 var = 0; + s32 battlerId = 0; u8 multiplayerId = GetMultiplayerId(); switch (gLinkPlayers[multiplayerId].id) { case 0: case 2: - var = (arg0 != 0) ? 1 : 3; + battlerId = rightSide ? 1 : 3; break; case 1: case 3: - var = (arg0 != 0) ? 2 : 0; + battlerId = rightSide ? 2 : 0; break; } for (i = 0; i < MAX_LINK_PLAYERS; i++) { - if (gLinkPlayers[i].id == (s16)(var)) + if (gLinkPlayers[i].id == (s16)battlerId) break; } return i; } -u8 sub_806EF84(u8 arg0, u8 arg1) +u8 GetOpposingLinkMultiBattlerId(bool8 rightSide, u8 multiplayerId) { s32 i; - s32 var = 0; - switch (gLinkPlayers[arg1].id) + s32 battlerId = 0; + switch (gLinkPlayers[multiplayerId].id) { case 0: case 2: - var = (arg0 != 0) ? 1 : 3; + battlerId = rightSide ? 1 : 3; break; case 1: case 3: - var = (arg0 != 0) ? 2 : 0; + battlerId = rightSide ? 2 : 0; break; } for (i = 0; i < MAX_LINK_PLAYERS; i++) { - if (gLinkPlayers[i].id == (s16)(var)) + if (gLinkPlayers[i].id == (s16)battlerId) break; } return i; diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 93a7477720..07e86656e0 100755 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -65,17 +65,18 @@ u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 u u8 heldItem[2]; struct Pokemon mon; - CreateMon(&mon, species, level, USE_RANDOM_IVS, 0, 0, OT_ID_PLAYER_ID, 0); + CreateMon(&mon, species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); heldItem[0] = item; heldItem[1] = item >> 8; SetMonData(&mon, MON_DATA_HELD_ITEM, heldItem); sentToPc = GiveMonToPlayer(&mon); nationalDexNum = SpeciesToNationalPokedexNum(species); + // Don't set Pokédex flag for MON_CANT_GIVE switch(sentToPc) { - case 0: - case 1: + case MON_GIVEN_TO_PARTY: + case MON_GIVEN_TO_PC: GetSetPokedexFlag(nationalDexNum, FLAG_SET_SEEN); GetSetPokedexFlag(nationalDexNum, FLAG_SET_CAUGHT); break; diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 70c2dd9d5d..34fa24f747 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -126,7 +126,7 @@ struct {TRAINER_CLASS_PKMN_BREEDER, TRAINER_ENCOUNTER_MUSIC_FEMALE}, {TRAINER_CLASS_COLLECTOR, TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS}, {TRAINER_CLASS_PKMN_RANGER, TRAINER_ENCOUNTER_MUSIC_COOL}, - {TRAINER_CLASS_PKMN_TRAINER_3, TRAINER_ENCOUNTER_MUSIC_MALE}, + {TRAINER_CLASS_RIVAL, TRAINER_ENCOUNTER_MUSIC_MALE}, {TRAINER_CLASS_YOUNG_COUPLE, TRAINER_ENCOUNTER_MUSIC_GIRL}, {TRAINER_CLASS_PSYCHIC, TRAINER_ENCOUNTER_MUSIC_INTENSE}, {TRAINER_CLASS_SR_AND_JR, TRAINER_ENCOUNTER_MUSIC_TWINS}, From 394c52a7be02aaeb708974ab5217bac3d8e5f644 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 4 Oct 2021 17:33:51 -0400 Subject: [PATCH 034/417] Clean up roamer.c --- src/roamer.c | 165 +++++++++++++++++++++++++++++---------------------- 1 file changed, 93 insertions(+), 72 deletions(-) diff --git a/src/roamer.c b/src/roamer.c index d053e5b255..3a41452fa9 100644 --- a/src/roamer.c +++ b/src/roamer.c @@ -5,51 +5,74 @@ #include "roamer.h" #include "constants/maps.h" +// Despite having a variable to track it, the roamer is +// hard-coded to only ever be in map group 0 +#define ROAMER_MAP_GROUP 0 + enum { - MAP_GRP = 0, // map group - MAP_NUM = 1, // map number + MAP_GRP, // map group + MAP_NUM, // map number }; +#define ROAMER (&gSaveBlock1Ptr->roamer) EWRAM_DATA static u8 sLocationHistory[3][2] = {0}; EWRAM_DATA static u8 sRoamerLocation[2] = {0}; +#define __ MAP_NUM(UNDEFINED) // For empty spots in the location table + +// Note: There are two potential softlocks that can occur with this table if its maps are +// changed in particular ways. They can be avoided by ensuring the following: +// - There must be at least 2 location sets that start with a different map, +// i.e. every location set cannot start with the same map. This is because of +// the while loop in RoamerMoveToOtherLocationSet. +// - Each location set must have at least 3 unique maps. This is because of +// the while loop in RoamerMove. In this loop the first map in the set is +// ignored, and an additional map is ignored if the roamer was there recently. +// - Additionally, while not a softlock, it's worth noting that if for any +// map in the location table there is not a location set that starts with +// that map then the roamer will be significantly less likely to move away +// from that map when it lands there. static const u8 sRoamerLocations[][6] = { - { MAP_NUM(ROUTE110), MAP_NUM(ROUTE111), MAP_NUM(ROUTE117), MAP_NUM(ROUTE118), MAP_NUM(ROUTE134), 0xFF }, - { MAP_NUM(ROUTE111), MAP_NUM(ROUTE110), MAP_NUM(ROUTE117), MAP_NUM(ROUTE118), 0xFF, 0xFF }, - { MAP_NUM(ROUTE117), MAP_NUM(ROUTE111), MAP_NUM(ROUTE110), MAP_NUM(ROUTE118), 0xFF, 0xFF }, + { MAP_NUM(ROUTE110), MAP_NUM(ROUTE111), MAP_NUM(ROUTE117), MAP_NUM(ROUTE118), MAP_NUM(ROUTE134), __ }, + { MAP_NUM(ROUTE111), MAP_NUM(ROUTE110), MAP_NUM(ROUTE117), MAP_NUM(ROUTE118), __, __ }, + { MAP_NUM(ROUTE117), MAP_NUM(ROUTE111), MAP_NUM(ROUTE110), MAP_NUM(ROUTE118), __, __ }, { MAP_NUM(ROUTE118), MAP_NUM(ROUTE117), MAP_NUM(ROUTE110), MAP_NUM(ROUTE111), MAP_NUM(ROUTE119), MAP_NUM(ROUTE123) }, - { MAP_NUM(ROUTE119), MAP_NUM(ROUTE118), MAP_NUM(ROUTE120), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE120), MAP_NUM(ROUTE119), MAP_NUM(ROUTE121), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE121), MAP_NUM(ROUTE120), MAP_NUM(ROUTE122), MAP_NUM(ROUTE123), 0xFF, 0xFF }, - { MAP_NUM(ROUTE122), MAP_NUM(ROUTE121), MAP_NUM(ROUTE123), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE123), MAP_NUM(ROUTE122), MAP_NUM(ROUTE118), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE124), MAP_NUM(ROUTE121), MAP_NUM(ROUTE125), MAP_NUM(ROUTE126), 0xFF, 0xFF }, - { MAP_NUM(ROUTE125), MAP_NUM(ROUTE124), MAP_NUM(ROUTE127), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE126), MAP_NUM(ROUTE124), MAP_NUM(ROUTE127), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE127), MAP_NUM(ROUTE125), MAP_NUM(ROUTE126), MAP_NUM(ROUTE128), 0xFF, 0xFF }, - { MAP_NUM(ROUTE128), MAP_NUM(ROUTE127), MAP_NUM(ROUTE129), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE129), MAP_NUM(ROUTE128), MAP_NUM(ROUTE130), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE130), MAP_NUM(ROUTE129), MAP_NUM(ROUTE131), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE131), MAP_NUM(ROUTE130), MAP_NUM(ROUTE132), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE132), MAP_NUM(ROUTE131), MAP_NUM(ROUTE133), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE133), MAP_NUM(ROUTE132), MAP_NUM(ROUTE134), 0xFF, 0xFF, 0xFF }, - { MAP_NUM(ROUTE134), MAP_NUM(ROUTE133), MAP_NUM(ROUTE110), 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { MAP_NUM(ROUTE119), MAP_NUM(ROUTE118), MAP_NUM(ROUTE120), __, __, __ }, + { MAP_NUM(ROUTE120), MAP_NUM(ROUTE119), MAP_NUM(ROUTE121), __, __, __ }, + { MAP_NUM(ROUTE121), MAP_NUM(ROUTE120), MAP_NUM(ROUTE122), MAP_NUM(ROUTE123), __, __ }, + { MAP_NUM(ROUTE122), MAP_NUM(ROUTE121), MAP_NUM(ROUTE123), __, __, __ }, + { MAP_NUM(ROUTE123), MAP_NUM(ROUTE122), MAP_NUM(ROUTE118), __, __, __ }, + { MAP_NUM(ROUTE124), MAP_NUM(ROUTE121), MAP_NUM(ROUTE125), MAP_NUM(ROUTE126), __, __ }, + { MAP_NUM(ROUTE125), MAP_NUM(ROUTE124), MAP_NUM(ROUTE127), __, __, __ }, + { MAP_NUM(ROUTE126), MAP_NUM(ROUTE124), MAP_NUM(ROUTE127), __, __, __ }, + { MAP_NUM(ROUTE127), MAP_NUM(ROUTE125), MAP_NUM(ROUTE126), MAP_NUM(ROUTE128), __, __ }, + { MAP_NUM(ROUTE128), MAP_NUM(ROUTE127), MAP_NUM(ROUTE129), __, __, __ }, + { MAP_NUM(ROUTE129), MAP_NUM(ROUTE128), MAP_NUM(ROUTE130), __, __, __ }, + { MAP_NUM(ROUTE130), MAP_NUM(ROUTE129), MAP_NUM(ROUTE131), __, __, __ }, + { MAP_NUM(ROUTE131), MAP_NUM(ROUTE130), MAP_NUM(ROUTE132), __, __, __ }, + { MAP_NUM(ROUTE132), MAP_NUM(ROUTE131), MAP_NUM(ROUTE133), __, __, __ }, + { MAP_NUM(ROUTE133), MAP_NUM(ROUTE132), MAP_NUM(ROUTE134), __, __, __ }, + { MAP_NUM(ROUTE134), MAP_NUM(ROUTE133), MAP_NUM(ROUTE110), __, __, __ }, + { __, __, __, __, __, __ }, }; +#undef __ +#define NUM_LOCATION_SETS (ARRAY_COUNT(sRoamerLocations) - 1) +#define NUM_LOCATIONS_PER_SET (ARRAY_COUNT(sRoamerLocations[0])) + void ClearRoamerData(void) { - memset(&gSaveBlock1Ptr->roamer, 0, sizeof(struct Roamer)); - (&gSaveBlock1Ptr->roamer)->species = SPECIES_LATIAS; + memset(ROAMER, 0, sizeof(*ROAMER)); + ROAMER->species = SPECIES_LATIAS; } void ClearRoamerLocationData(void) { u8 i; - for (i = 0; i < 3; i++) + for (i = 0; i < ARRAY_COUNT(sLocationHistory); i++) { sLocationHistory[i][MAP_GRP] = 0; sLocationHistory[i][MAP_NUM] = 0; @@ -62,26 +85,27 @@ void ClearRoamerLocationData(void) static void CreateInitialRoamerMon(bool16 createLatios) { if (!createLatios) - (&gSaveBlock1Ptr->roamer)->species = SPECIES_LATIAS; + ROAMER->species = SPECIES_LATIAS; else - (&gSaveBlock1Ptr->roamer)->species = SPECIES_LATIOS; + ROAMER->species = SPECIES_LATIOS; - CreateMon(&gEnemyParty[0], (&gSaveBlock1Ptr->roamer)->species, 40, 0x20, 0, 0, OT_ID_PLAYER_ID, 0); - (&gSaveBlock1Ptr->roamer)->level = 40; - (&gSaveBlock1Ptr->roamer)->status = 0; - (&gSaveBlock1Ptr->roamer)->active = TRUE; - (&gSaveBlock1Ptr->roamer)->ivs = GetMonData(&gEnemyParty[0], MON_DATA_IVS); - (&gSaveBlock1Ptr->roamer)->personality = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY); - (&gSaveBlock1Ptr->roamer)->hp = GetMonData(&gEnemyParty[0], MON_DATA_MAX_HP); - (&gSaveBlock1Ptr->roamer)->cool = GetMonData(&gEnemyParty[0], MON_DATA_COOL); - (&gSaveBlock1Ptr->roamer)->beauty = GetMonData(&gEnemyParty[0], MON_DATA_BEAUTY); - (&gSaveBlock1Ptr->roamer)->cute = GetMonData(&gEnemyParty[0], MON_DATA_CUTE); - (&gSaveBlock1Ptr->roamer)->smart = GetMonData(&gEnemyParty[0], MON_DATA_SMART); - (&gSaveBlock1Ptr->roamer)->tough = GetMonData(&gEnemyParty[0], MON_DATA_TOUGH); - sRoamerLocation[MAP_GRP] = 0; - sRoamerLocation[MAP_NUM] = sRoamerLocations[Random() % (ARRAY_COUNT(sRoamerLocations) - 1)][0]; + CreateMon(&gEnemyParty[0], ROAMER->species, 40, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); + ROAMER->level = 40; + ROAMER->status = 0; + ROAMER->active = TRUE; + ROAMER->ivs = GetMonData(&gEnemyParty[0], MON_DATA_IVS); + ROAMER->personality = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY); + ROAMER->hp = GetMonData(&gEnemyParty[0], MON_DATA_MAX_HP); + ROAMER->cool = GetMonData(&gEnemyParty[0], MON_DATA_COOL); + ROAMER->beauty = GetMonData(&gEnemyParty[0], MON_DATA_BEAUTY); + ROAMER->cute = GetMonData(&gEnemyParty[0], MON_DATA_CUTE); + ROAMER->smart = GetMonData(&gEnemyParty[0], MON_DATA_SMART); + ROAMER->tough = GetMonData(&gEnemyParty[0], MON_DATA_TOUGH); + sRoamerLocation[MAP_GRP] = ROAMER_MAP_GROUP; + sRoamerLocation[MAP_NUM] = sRoamerLocations[Random() % NUM_LOCATION_SETS][0]; } +// gSpecialVar_0x8004 here corresponds to the options in the multichoice MULTI_TV_LATI (0 for 'Red', 1 for 'Blue') void InitRoamer(void) { ClearRoamerData(); @@ -104,16 +128,17 @@ void UpdateLocationHistoryForRoamer(void) void RoamerMoveToOtherLocationSet(void) { u8 mapNum = 0; - struct Roamer *roamer = &gSaveBlock1Ptr->roamer; - - if (!roamer->active) + + if (!ROAMER->active) return; - sRoamerLocation[MAP_GRP] = 0; + sRoamerLocation[MAP_GRP] = ROAMER_MAP_GROUP; + // Choose a location set that starts with a map + // different from the roamer's current map while (1) { - mapNum = sRoamerLocations[Random() % (ARRAY_COUNT(sRoamerLocations) - 1)][0]; + mapNum = sRoamerLocations[Random() % NUM_LOCATION_SETS][0]; if (sRoamerLocation[MAP_NUM] != mapNum) { sRoamerLocation[MAP_NUM] = mapNum; @@ -132,20 +157,23 @@ void RoamerMove(void) } else { - struct Roamer *roamer = &gSaveBlock1Ptr->roamer; - - if (!roamer->active) + if (!ROAMER->active) return; - while (locSet < (ARRAY_COUNT(sRoamerLocations) - 1)) + while (locSet < NUM_LOCATION_SETS) { + // Find the location set that starts with the roamer's current map if (sRoamerLocation[MAP_NUM] == sRoamerLocations[locSet][0]) { u8 mapNum; while (1) { - mapNum = sRoamerLocations[locSet][(Random() % 5) + 1]; - if (!(sLocationHistory[2][MAP_GRP] == 0 && sLocationHistory[2][MAP_NUM] == mapNum) && mapNum != 0xFF) + // Choose a new map (excluding the first) within this set + // Also exclude a map if the roamer was there 2 moves ago + mapNum = sRoamerLocations[locSet][(Random() % (NUM_LOCATIONS_PER_SET - 1)) + 1]; + if (!(sLocationHistory[2][MAP_GRP] == ROAMER_MAP_GROUP + && sLocationHistory[2][MAP_NUM] == mapNum) + && mapNum != MAP_NUM(UNDEFINED)) break; } sRoamerLocation[MAP_NUM] = mapNum; @@ -158,9 +186,7 @@ void RoamerMove(void) bool8 IsRoamerAt(u8 mapGroup, u8 mapNum) { - struct Roamer *roamer = &gSaveBlock1Ptr->roamer; - - if (roamer->active && mapGroup == sRoamerLocation[MAP_GRP] && mapNum == sRoamerLocation[MAP_NUM]) + if (ROAMER->active && mapGroup == sRoamerLocation[MAP_GRP] && mapNum == sRoamerLocation[MAP_NUM]) return TRUE; else return FALSE; @@ -168,20 +194,16 @@ bool8 IsRoamerAt(u8 mapGroup, u8 mapNum) void CreateRoamerMonInstance(void) { - struct Pokemon *mon; - struct Roamer *roamer; - - mon = &gEnemyParty[0]; + struct Pokemon *mon = &gEnemyParty[0]; ZeroEnemyPartyMons(); - roamer = &gSaveBlock1Ptr->roamer; - CreateMonWithIVsPersonality(mon, roamer->species, roamer->level, roamer->ivs, roamer->personality); - SetMonData(mon, MON_DATA_STATUS, &gSaveBlock1Ptr->roamer.status); - SetMonData(mon, MON_DATA_HP, &gSaveBlock1Ptr->roamer.hp); - SetMonData(mon, MON_DATA_COOL, &gSaveBlock1Ptr->roamer.cool); - SetMonData(mon, MON_DATA_BEAUTY, &gSaveBlock1Ptr->roamer.beauty); - SetMonData(mon, MON_DATA_CUTE, &gSaveBlock1Ptr->roamer.cute); - SetMonData(mon, MON_DATA_SMART, &gSaveBlock1Ptr->roamer.smart); - SetMonData(mon, MON_DATA_TOUGH, &gSaveBlock1Ptr->roamer.tough); + CreateMonWithIVsPersonality(mon, ROAMER->species, ROAMER->level, ROAMER->ivs, ROAMER->personality); + SetMonData(mon, MON_DATA_STATUS, &ROAMER->status); + SetMonData(mon, MON_DATA_HP, &ROAMER->hp); + SetMonData(mon, MON_DATA_COOL, &ROAMER->cool); + SetMonData(mon, MON_DATA_BEAUTY, &ROAMER->beauty); + SetMonData(mon, MON_DATA_CUTE, &ROAMER->cute); + SetMonData(mon, MON_DATA_SMART, &ROAMER->smart); + SetMonData(mon, MON_DATA_TOUGH, &ROAMER->tough); } bool8 TryStartRoamerEncounter(void) @@ -199,16 +221,15 @@ bool8 TryStartRoamerEncounter(void) void UpdateRoamerHPStatus(struct Pokemon *mon) { - (&gSaveBlock1Ptr->roamer)->hp = GetMonData(mon, MON_DATA_HP); - (&gSaveBlock1Ptr->roamer)->status = GetMonData(mon, MON_DATA_STATUS); + ROAMER->hp = GetMonData(mon, MON_DATA_HP); + ROAMER->status = GetMonData(mon, MON_DATA_STATUS); RoamerMoveToOtherLocationSet(); } void SetRoamerInactive(void) { - struct Roamer *roamer = &gSaveBlock1Ptr->roamer; - roamer->active = FALSE; + ROAMER->active = FALSE; } void GetRoamerLocation(u8 *mapGroup, u8 *mapNum) From cacd6410bf25072e779c3c43a813816fee4e08bd Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 5 Oct 2021 08:54:15 -0400 Subject: [PATCH 035/417] Drop double underscore 'empty' macros --- src/dodrio_berry_picking.c | 14 ++++++------ src/roamer.c | 44 +++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index c69ef92676..e5ff1d184c 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -517,21 +517,21 @@ static const u8 sDodrioNeighborMap[MAX_RFU_PLAYERS][MAX_RFU_PLAYERS][3] = }, }; -#define __ 9 // No player at this column. This may go out of bounds if this is returned +#define x 9 // No player at this column. This may go out of bounds if this is returned // Takes the number of players and a column and returns the player id at that column. // Note that the assignment is somewhat arbitrary as players share neighboring columns. ALIGNED(4) static const u8 sPlayerIdAtColumn[MAX_RFU_PLAYERS][NUM_BERRY_COLUMNS] = { - {__, __, __, __, 1, 1, 1, __, __, __, __}, // 1 player - {__, __, __, 0, 0, 1, 1, 0, __, __, __}, // 2 players - {__, __, 2, 2, 0, 0, 1, 1, 1, __, __}, // 3 players - {__, 3, 3, 0, 0, 1, 1, 2, 2, 3, __}, // 4 players - { 3, 3, 4, 4, 0, 0, 1, 1, 2, 2, 3}, // 5 players + {x, x, x, x, 1, 1, 1, x, x, x, x}, // 1 player + {x, x, x, 0, 0, 1, 1, 0, x, x, x}, // 2 players + {x, x, 2, 2, 0, 0, 1, 1, 1, x, x}, // 3 players + {x, 3, 3, 0, 0, 1, 1, 2, 2, 3, x}, // 4 players + {3, 3, 4, 4, 0, 0, 1, 1, 2, 2, 3}, // 5 players }; -#undef __ +#undef x // Each array contains the columns that belong solely to one player, dependent on the number of players // When determing how difficult the berries in a column should be, the highest diff --git a/src/roamer.c b/src/roamer.c index 3a41452fa9..b8d1009674 100644 --- a/src/roamer.c +++ b/src/roamer.c @@ -19,7 +19,7 @@ enum EWRAM_DATA static u8 sLocationHistory[3][2] = {0}; EWRAM_DATA static u8 sRoamerLocation[2] = {0}; -#define __ MAP_NUM(UNDEFINED) // For empty spots in the location table +#define ___ MAP_NUM(UNDEFINED) // For empty spots in the location table // Note: There are two potential softlocks that can occur with this table if its maps are // changed in particular ways. They can be avoided by ensuring the following: @@ -35,30 +35,30 @@ EWRAM_DATA static u8 sRoamerLocation[2] = {0}; // from that map when it lands there. static const u8 sRoamerLocations[][6] = { - { MAP_NUM(ROUTE110), MAP_NUM(ROUTE111), MAP_NUM(ROUTE117), MAP_NUM(ROUTE118), MAP_NUM(ROUTE134), __ }, - { MAP_NUM(ROUTE111), MAP_NUM(ROUTE110), MAP_NUM(ROUTE117), MAP_NUM(ROUTE118), __, __ }, - { MAP_NUM(ROUTE117), MAP_NUM(ROUTE111), MAP_NUM(ROUTE110), MAP_NUM(ROUTE118), __, __ }, + { MAP_NUM(ROUTE110), MAP_NUM(ROUTE111), MAP_NUM(ROUTE117), MAP_NUM(ROUTE118), MAP_NUM(ROUTE134), ___ }, + { MAP_NUM(ROUTE111), MAP_NUM(ROUTE110), MAP_NUM(ROUTE117), MAP_NUM(ROUTE118), ___, ___ }, + { MAP_NUM(ROUTE117), MAP_NUM(ROUTE111), MAP_NUM(ROUTE110), MAP_NUM(ROUTE118), ___, ___ }, { MAP_NUM(ROUTE118), MAP_NUM(ROUTE117), MAP_NUM(ROUTE110), MAP_NUM(ROUTE111), MAP_NUM(ROUTE119), MAP_NUM(ROUTE123) }, - { MAP_NUM(ROUTE119), MAP_NUM(ROUTE118), MAP_NUM(ROUTE120), __, __, __ }, - { MAP_NUM(ROUTE120), MAP_NUM(ROUTE119), MAP_NUM(ROUTE121), __, __, __ }, - { MAP_NUM(ROUTE121), MAP_NUM(ROUTE120), MAP_NUM(ROUTE122), MAP_NUM(ROUTE123), __, __ }, - { MAP_NUM(ROUTE122), MAP_NUM(ROUTE121), MAP_NUM(ROUTE123), __, __, __ }, - { MAP_NUM(ROUTE123), MAP_NUM(ROUTE122), MAP_NUM(ROUTE118), __, __, __ }, - { MAP_NUM(ROUTE124), MAP_NUM(ROUTE121), MAP_NUM(ROUTE125), MAP_NUM(ROUTE126), __, __ }, - { MAP_NUM(ROUTE125), MAP_NUM(ROUTE124), MAP_NUM(ROUTE127), __, __, __ }, - { MAP_NUM(ROUTE126), MAP_NUM(ROUTE124), MAP_NUM(ROUTE127), __, __, __ }, - { MAP_NUM(ROUTE127), MAP_NUM(ROUTE125), MAP_NUM(ROUTE126), MAP_NUM(ROUTE128), __, __ }, - { MAP_NUM(ROUTE128), MAP_NUM(ROUTE127), MAP_NUM(ROUTE129), __, __, __ }, - { MAP_NUM(ROUTE129), MAP_NUM(ROUTE128), MAP_NUM(ROUTE130), __, __, __ }, - { MAP_NUM(ROUTE130), MAP_NUM(ROUTE129), MAP_NUM(ROUTE131), __, __, __ }, - { MAP_NUM(ROUTE131), MAP_NUM(ROUTE130), MAP_NUM(ROUTE132), __, __, __ }, - { MAP_NUM(ROUTE132), MAP_NUM(ROUTE131), MAP_NUM(ROUTE133), __, __, __ }, - { MAP_NUM(ROUTE133), MAP_NUM(ROUTE132), MAP_NUM(ROUTE134), __, __, __ }, - { MAP_NUM(ROUTE134), MAP_NUM(ROUTE133), MAP_NUM(ROUTE110), __, __, __ }, - { __, __, __, __, __, __ }, + { MAP_NUM(ROUTE119), MAP_NUM(ROUTE118), MAP_NUM(ROUTE120), ___, ___, ___ }, + { MAP_NUM(ROUTE120), MAP_NUM(ROUTE119), MAP_NUM(ROUTE121), ___, ___, ___ }, + { MAP_NUM(ROUTE121), MAP_NUM(ROUTE120), MAP_NUM(ROUTE122), MAP_NUM(ROUTE123), ___, ___ }, + { MAP_NUM(ROUTE122), MAP_NUM(ROUTE121), MAP_NUM(ROUTE123), ___, ___, ___ }, + { MAP_NUM(ROUTE123), MAP_NUM(ROUTE122), MAP_NUM(ROUTE118), ___, ___, ___ }, + { MAP_NUM(ROUTE124), MAP_NUM(ROUTE121), MAP_NUM(ROUTE125), MAP_NUM(ROUTE126), ___, ___ }, + { MAP_NUM(ROUTE125), MAP_NUM(ROUTE124), MAP_NUM(ROUTE127), ___, ___, ___ }, + { MAP_NUM(ROUTE126), MAP_NUM(ROUTE124), MAP_NUM(ROUTE127), ___, ___, ___ }, + { MAP_NUM(ROUTE127), MAP_NUM(ROUTE125), MAP_NUM(ROUTE126), MAP_NUM(ROUTE128), ___, ___ }, + { MAP_NUM(ROUTE128), MAP_NUM(ROUTE127), MAP_NUM(ROUTE129), ___, ___, ___ }, + { MAP_NUM(ROUTE129), MAP_NUM(ROUTE128), MAP_NUM(ROUTE130), ___, ___, ___ }, + { MAP_NUM(ROUTE130), MAP_NUM(ROUTE129), MAP_NUM(ROUTE131), ___, ___, ___ }, + { MAP_NUM(ROUTE131), MAP_NUM(ROUTE130), MAP_NUM(ROUTE132), ___, ___, ___ }, + { MAP_NUM(ROUTE132), MAP_NUM(ROUTE131), MAP_NUM(ROUTE133), ___, ___, ___ }, + { MAP_NUM(ROUTE133), MAP_NUM(ROUTE132), MAP_NUM(ROUTE134), ___, ___, ___ }, + { MAP_NUM(ROUTE134), MAP_NUM(ROUTE133), MAP_NUM(ROUTE110), ___, ___, ___ }, + { ___, ___, ___, ___, ___, ___ }, }; -#undef __ +#undef ___ #define NUM_LOCATION_SETS (ARRAY_COUNT(sRoamerLocations) - 1) #define NUM_LOCATIONS_PER_SET (ARRAY_COUNT(sRoamerLocations[0])) From af5ff0533862d95dd147c69bcaa0eacf727e06ef Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Tue, 5 Oct 2021 21:25:56 -0300 Subject: [PATCH 036/417] Fixed FORM_ITEM_HOLD_ABILITY check --- src/party_menu.c | 4 +++- src/pokemon.c | 5 +++-- src/pokemon_storage_system.c | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index 4d472a92e6..6c3d813faa 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5314,7 +5314,9 @@ void ItemUseCB_FormChange_ConsumedOnUse(u8 taskId, TaskFunc task) void TryItemHoldFormChange(struct Pokemon *mon) { u16 species = GetMonData(mon, MON_DATA_SPECIES); - u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_HOLD, 0); + u16 targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_HOLD_ABILITY, 0); + if (targetSpecies == SPECIES_NONE) + targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_HOLD, 0); if (targetSpecies != SPECIES_NONE) { PlayCry2(targetSpecies, 0, 0x7D, 0xA); diff --git a/src/pokemon.c b/src/pokemon.c index c88443ccb6..a6b07dbf57 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8076,7 +8076,7 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg switch (method) { case FORM_ITEM_HOLD: - if (heldItem == formChanges[i].param1) + if (heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) targetSpecies = formChanges[i].targetSpecies; break; case FORM_ITEM_USE: @@ -8088,7 +8088,8 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg targetSpecies = formChanges[i].targetSpecies; break; case FORM_ITEM_HOLD_ABILITY: - if (heldItem == formChanges[i].param1 && ability == formChanges[i].param2) + if ((heldItem == formChanges[i].param1 || formChanges[i].param1 == ITEM_NONE) + && ability == formChanges[i].param2) targetSpecies = formChanges[i].targetSpecies; break; case FORM_ITEM_USE_TIME: diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index bf07fb5844..3f358becbd 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -6883,7 +6883,9 @@ static void ReshowDisplayMon(void) void SetMonFormPSS(struct BoxPokemon *boxMon) { u16 species = GetMonData(boxMon, MON_DATA_SPECIES); - u16 targetSpecies = GetFormChangeTargetSpeciesBoxMon(boxMon, FORM_ITEM_HOLD, 0); + u16 targetSpecies = GetFormChangeTargetSpeciesBoxMon(boxMon, FORM_ITEM_HOLD_ABILITY, 0); + if (targetSpecies == SPECIES_NONE) + targetSpecies = GetFormChangeTargetSpeciesBoxMon(boxMon, FORM_ITEM_HOLD, 0); if (targetSpecies != SPECIES_NONE) { //PlayCry2(targetSpecies, 0, 0x7D, 0xA); From 4efa6c882a68d69e32f59580faa438a6b1fd0b68 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 15 Aug 2021 18:26:09 -0400 Subject: [PATCH 037/417] Continue misc link documentation, rename reset_save_heap --- include/link_rfu.h | 88 +-- include/reload_save.h | 6 + include/reset_save_heap.h | 12 - include/save.h | 3 +- ld_script.txt | 2 +- src/berry_blender.c | 4 +- src/berry_crush.c | 16 +- src/dodrio_berry_picking.c | 8 +- src/intro.c | 2 +- src/link.c | 4 +- src/link_rfu_2.c | 673 ++++++++++++----------- src/link_rfu_3.c | 2 +- src/load_save.c | 1 + src/pokemon_jump.c | 8 +- src/record_mixing.c | 4 +- src/{reset_save_heap.c => reload_save.c} | 10 +- src/save.c | 44 +- src/trade.c | 4 +- src/union_room.c | 26 +- src/union_room_chat.c | 11 +- 20 files changed, 487 insertions(+), 441 deletions(-) create mode 100644 include/reload_save.h delete mode 100644 include/reset_save_heap.h rename src/{reset_save_heap.c => reload_save.c} (75%) diff --git a/include/link_rfu.h b/include/link_rfu.h index da13fe539f..04f1b7f9ae 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -5,20 +5,25 @@ #include "link.h" #include "AgbRfu_LinkManager.h" +#define RFUCMD_MASK 0xFF00 + #define RFUCMD_SEND_PACKET 0x2F00 #define RFUCMD_BLENDER_SEND_KEYS 0x4400 #define RFUCMD_READY_CLOSE_LINK 0x5F00 #define RFUCMD_READY_EXIT_STANDBY 0x6600 -#define RFUCMD_0x7700 0x7700 -#define RFUCMD_0x7800 0x7800 -#define RFUCMD_0x8800 0x8800 -#define RFUCMD_0x8900 0x8900 +#define RFUCMD_SEND_PLAYER_IDS 0x7700 +#define RFUCMD_SEND_PLAYER_IDS_NEW 0x7800 +#define RFUCMD_SEND_BLOCK_INIT 0x8800 +#define RFUCMD_SEND_BLOCK 0x8900 #define RFUCMD_SEND_BLOCK_REQ 0xA100 #define RFUCMD_SEND_HELD_KEYS 0xBE00 -#define RFUCMD_0xED00 0xED00 -#define RFUCMD_0xEE00 0xEE00 +#define RFUCMD_DISCONNECT 0xED00 +#define RFUCMD_DISCONNECT_PARENT 0xEE00 -#define RFU_SERIAL_7F7D 0x7F7D +#define RFU_SERIAL_A 0x0002 +#define RFU_SERIAL_B 0x7F7D +#define RFU_SERIAL_C 0x0000 +#define RFU_SERIAL_END 0xFFFF #define RECV_QUEUE_NUM_SLOTS 32 #define RECV_QUEUE_SLOT_LENGTH (14 * MAX_RFU_PLAYERS) @@ -45,6 +50,24 @@ #define RFU_STATUS_CHILD_LEAVE 11 #define RFU_STATUS_ACK_JOIN_GROUP 12 +#define CHILD_DATA_LENGTH 14 + +// Values for disconnectMode +enum { + RFU_DISCONNECT_NONE, + RFU_DISCONNECT_ERROR, + RFU_DISCONNECT_NORMAL, +}; + +// Values for errorState +enum { + RFU_ERROR_STATE_NONE, + RFU_ERROR_STATE_1, + RFU_ERROR_STATE_2, + RFU_ERROR_STATE_3, + RFU_ERROR_STATE_IGNORE, +}; + // RfuTgtData.gname is read as these structs. struct GFtgtGnameSub { @@ -125,8 +148,8 @@ struct GFRfuManager /* 0x00f */ u8 unk_0f; /* 0x010 */ u16 unk_10; /* 0x012 */ u16 unk_12; - /* 0x014 */ u8 unk_14[RFU_CHILD_MAX][14]; - /* 0x04c */ u8 unk_4c[14]; + /* 0x014 */ u8 childRecvBuffer[RFU_CHILD_MAX][CHILD_DATA_LENGTH]; + /* 0x04c */ u8 childSendBuffer[CHILD_DATA_LENGTH]; /* 0x05a */ u8 blockRequestType; /* 0x05b */ u8 unk_5b; /* 0x05c */ bool8 blockReceived[MAX_RFU_PLAYERS]; @@ -144,9 +167,9 @@ struct GFRfuManager /* 0x0f1 */ u8 status; /* 0x0f2 */ u16 packet[RFU_PACKET_SIZE]; /* 0x0fe */ u16 resendExitStandbyTimer; - /* 0x100 */ u16 unk_100; + /* 0x100 */ u16 allReadyNum; /* 0x102 */ u8 unk_102; - /* 0x103 */ u8 filler_103[0x10A - 0x103]; + /* 0x103 */ u8 filler_103[7]; /* 0x10A */ struct GFtgtGname unk_10A; u8 filler_; u8 playerName[PLAYER_NAME_LENGTH + 1]; @@ -162,36 +185,33 @@ struct GFRfuManager /* 0xc87 */ u8 recvCmds[5][7][2]; /* 0xccd */ u8 parentId; /* 0xcce */ u8 multiplayerId; - /* 0xccf */ u8 unk_ccf; - /* 0xcd0 */ vu8 unk_cd0; + /* 0xccf */ u8 connectParentFailures; + /* 0xcd0 */ vu8 childSendCount; /* 0xcd1 */ u8 partnerSendStatuses[RFU_CHILD_MAX]; /* 0xcd5 */ u8 partnerRecvStatuses[RFU_CHILD_MAX]; - /* 0xcd9 */ u8 unk_cd9; + /* 0xcd9 */ bool8 stopNewConnections; /* 0xcda */ u8 unk_cda; /* 0xcdb */ vbool8 unk_cdb; /* 0xcdc */ vbool8 unk_cdc; /* 0xcdd */ u8 unk_cdd; /* 0xcde */ u8 linkPlayerIdx[RFU_CHILD_MAX]; /* 0xce2 */ u8 unk_ce2; - /* 0xce2 */ u8 unk_ce3; - /* 0xce4 */ u8 unk_ce4; + /* 0xce2 */ u8 disconnectSlots; + /* 0xce4 */ u8 disconnectMode; /* 0xce5 */ u8 unk_ce5; /* 0xce5 */ u8 unk_ce6; /* 0xce7 */ u8 acceptSlot_flag; - /* 0xce8 */ u8 unk_ce8; + /* 0xce8 */ bool8 unk_ce8; /* 0xce9 */ u8 unk_ce9; /* 0xcea */ u8 unk_cea[4]; /* 0xcee */ u8 unk_cee[4]; }; // size = 0xcf4 -// Exported RAM declarations - extern struct GFtgtGname gHostRFUtgtGnameBuffer; extern u8 gHostRFUtgtUnameBuffer[]; extern struct GFRfuManager Rfu; extern u8 gWirelessStatusIndicatorSpriteId; -// Exported ROM declarations void WipeTrainerNameRecords(void); void InitRFUAPI(void); void LinkRfu_Shutdown(void); @@ -219,13 +239,13 @@ bool32 RfuHasErrored(void); bool32 IsRfuRecvQueueEmpty(void); u32 GetRfuRecvQueueLength(void); void RfuVSync(void); -void sub_80111B0(bool32 a0); +void RfuSetIgnoreError(bool32 enable); u8 RfuGetStatus(void); struct GFtgtGname *GetHostRFUtgtGname(void); -void UpdateGameData_GroupLockedIn(u8 a0); -void GetLinkmanErrorParams(u32 a0); -void RfuSetStatus(u8 a0, u16 a1); -u8 sub_801048C(bool32 a0); +void UpdateGameData_GroupLockedIn(u8 started); +void GetLinkmanErrorParams(u32 msg); +void RfuSetStatus(u8 status, u16 msg); +u8 Rfu_SetLinkRecovery(bool32 enable); void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *buff1, u8 *buff2); void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, bool32 started); void InitializeRfuLinkManager_LinkLeader(u32 a0); @@ -235,10 +255,10 @@ bool32 RfuTryDisconnectLeavingChildren(void); bool32 HasTrainerLeftPartnersList(u16 trainerId, const u8 *name); void SendRfuStatusToPartner(u8 status, u16 trainerId, const u8 *name); u32 WaitSendRfuStatusToPartner(u16 trainerId, const u8 *name); -void RequestDisconnectSlotByTrainerNameAndId(const u8 *a0, u16 a1); +void RequestDisconnectSlotByTrainerNameAndId(const u8 *name, u16 id); bool8 LmanAcceptSlotFlagIsNotZero(void); -bool32 WaitRfuState(bool32 a0); -void sub_801103C(void); +bool32 WaitRfuState(bool32 force); +void GetOtherPlayersInfoFlags(void); void InitializeRfuLinkManager_JoinGroup(void); void SendLeaveGroupNotice(void); void RecordMixTrainerNames(void); @@ -246,7 +266,7 @@ void LinkRfu_CreateConnectionAsParent(void); void LinkRfu_StopManagerBeforeEnteringChat(void); void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 started); void CreateTask_RfuReconnectWithParent(const u8 *src, u16 trainerId); -void SetGnameBufferWonderFlags(bool32 a0, bool32 a1); +void SetGnameBufferWonderFlags(bool32 hasNews, bool32 hasCard); void ClearAndInitHostRFUtgtGname(void); void SetTradeBoardRegisteredMonInfo(u32 type, u32 species, u32 level); void InitializeRfuLinkManager_EnterUnionRoom(void); @@ -254,8 +274,8 @@ void sub_8012188(const u8 *name, struct GFtgtGname *structPtr, u8 a2); bool32 IsUnionRoomListenTaskActive(void); void Rfu_SendPacket(void *data); bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name); -void sub_8011DE0(u32 arg0); -u8 sub_801100C(s32 a0); +void Rfu_DisconnectPlayerById(u32 playerIdx); +u8 GetLinkPlayerInfoFlags(s32 playerId); void sub_800EF7C(void); bool8 LinkRfu_GetNameIfCompatible(struct GFtgtGname *buff1, u8 *buff2, u8 idx); bool8 LinkRfu_GetNameIfSerial7F7D(struct GFtgtGname *buff1, u8 *buff2, u8 idx); @@ -265,9 +285,9 @@ void DestroyTask_RfuIdle(void); void ClearRecvCommands(void); void LinkRfu_FatalError(void); bool32 sub_8011A9C(void); -void sub_80104B0(void); -void sub_8011A50(void); -void sub_80110B8(u32 a0); +void Rfu_StopPartnerSearch(void); +void RfuSetNormalDisconnectMode(void); +void SetUnionRoomChatPlayerData(u32 numPlayers); bool32 IsRfuSerialNumberValid(u32 serialNo); bool8 IsRfuRecoveringFromLinkLoss(void); void RfuRecvQueue_Reset(struct RfuRecvQueue *queue); diff --git a/include/reload_save.h b/include/reload_save.h new file mode 100644 index 0000000000..2ce05e53b8 --- /dev/null +++ b/include/reload_save.h @@ -0,0 +1,6 @@ +#ifndef GUARD_RELOAD_SAVE_H +#define GUARD_RELOAD_SAVE_H + +void ReloadSave(void); + +#endif // GUARD_RELOAD_SAVE_H diff --git a/include/reset_save_heap.h b/include/reset_save_heap.h deleted file mode 100644 index 12fd186ec9..0000000000 --- a/include/reset_save_heap.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef GUARD_RESET_SAVE_HEAP_H -#define GUARD_RESET_SAVE_HEAP_H - -// Exported type declarations - -// Exported RAM declarations - -// Exported ROM declarations - -void sub_81700F8(void); - -#endif //GUARD_RESET_SAVE_HEAP_H diff --git a/include/save.h b/include/save.h index 948530406e..4eaa724584 100644 --- a/include/save.h +++ b/include/save.h @@ -36,6 +36,7 @@ struct SaveSectionOffsets // Emerald changes this definition to be the sectors per slot. #define NUM_SECTORS_PER_SLOT 16 +#define NUM_SAVE_SLOTS 2 #define UNKNOWN_CHECK_VALUE 0x8012025 #define SPECIAL_SECTION_SENTINEL 0xB39D @@ -104,7 +105,7 @@ bool8 sub_8153408(void); bool8 FullSaveGame(void); bool8 CheckSaveFile(void); u8 Save_LoadGameData(u8 saveType); -u16 sub_815355C(void); +u16 GetSaveBlocksPointersBaseOffset(void); u32 TryReadSpecialSaveSection(u8 sector, u8* dst); u32 TryWriteSpecialSaveSection(u8 sector, u8* src); void Task_LinkSave(u8 taskId); diff --git a/ld_script.txt b/ld_script.txt index 8c8f19015e..218c6d3a50 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -256,7 +256,7 @@ SECTIONS { src/battle_controller_wally.o(.text); src/player_pc.o(.text); src/intro.o(.text); - src/reset_save_heap.o(.text); + src/reload_save.o(.text); src/field_region_map.o(.text); src/battle_anim_throw.o(.text); src/hall_of_fame.o(.text); diff --git a/src/berry_blender.c b/src/berry_blender.c index e84c2d5b30..46ed5dee65 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -2069,7 +2069,7 @@ static bool32 CheckRecvCmdMatches(u16 recvCmd, u16 linkCmd, u16 rfuCmd) { if (gReceivedRemoteLinkPlayers && gWirelessCommType) { - if ((recvCmd & 0xFF00) == rfuCmd) + if ((recvCmd & RFUCMD_MASK) == rfuCmd) return TRUE; } else @@ -3135,7 +3135,7 @@ static void UpdateBlenderCenter(void) } else { - if ((gRecvCmds[0][BLENDER_COMM_INPUT_STATE] & 0xFF00) == RFUCMD_BLENDER_SEND_KEYS) + if ((gRecvCmds[0][BLENDER_COMM_INPUT_STATE] & RFUCMD_MASK) == RFUCMD_BLENDER_SEND_KEYS) { sBerryBlender->progressBarValue = gRecvCmds[0][BLENDER_COMM_PROGRESS_BAR]; sBerryBlender->arrowPos = gRecvCmds[0][BLENDER_COMM_ARROW_POS]; diff --git a/src/berry_crush.c b/src/berry_crush.c index abaad232e8..fd0d86c7e4 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -984,12 +984,12 @@ static u32 QuitBerryCrush(MainCallback exitCallback) return 0; } -#define ERROR_EXIT(exitCallback) \ - { \ - SetMainCallback2(exitCallback); \ - Rfu.unk_10 = 0; \ - Rfu.unk_12 = 0; \ - Rfu.errorState = 1; \ +#define ERROR_EXIT(exitCallback) \ + { \ + SetMainCallback2(exitCallback); \ + Rfu.unk_10 = 0; \ + Rfu.unk_12 = 0; \ + Rfu.errorState = RFU_ERROR_STATE_1; \ } void StartBerryCrush(MainCallback exitCallback) @@ -2565,7 +2565,7 @@ static void HandlePartnerInput(struct BerryCrushGame *game) linkState = (struct BerryCrushGame_LinkState *)gRecvCmds[i]; // Skip player if we have not received a packet from them - if ((linkState->rfuCmd & 0xFF00) != RFUCMD_SEND_PACKET) + if ((linkState->rfuCmd & RFUCMD_MASK) != RFUCMD_SEND_PACKET) continue; if (linkState->sendFlag != SEND_GAME_STATE) continue; @@ -2805,7 +2805,7 @@ static void RecvLinkData(struct BerryCrushGame *game) for (i = 0; i < game->playerCount; i++) game->players[i].inputState = INPUT_STATE_NONE; - if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[0][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) { game->playedSound = FALSE; return; diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index d766da607d..8dead44b39 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -3106,7 +3106,7 @@ static u32 RecvPacket_ReadyToStart(u32 playerId) { struct ReadyToStartPacket *packet; - if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[0][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) return FALSE; packet = (void *)&gRecvCmds[playerId][1]; @@ -3233,7 +3233,7 @@ static bool32 RecvPacket_GameState(u32 playerId, struct GameStatePacket *packet; struct DodrioGame_Berries *berries = &player->berries; - if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[0][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) return FALSE; packet = (void *)&gRecvCmds[0][1]; @@ -3310,7 +3310,7 @@ static bool32 RecvPacket_PickState(u32 playerId, u8 *pickState) { struct PickStatePacket *packet; - if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[0][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) return FALSE; packet = (void *)&gRecvCmds[playerId][1]; @@ -3341,7 +3341,7 @@ static bool32 RecvPacket_ReadyToEnd(u32 playerId) { struct ReadyToEndPacket *packet; - if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[0][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) return FALSE; packet = (void *)&gRecvCmds[playerId][1]; diff --git a/src/intro.c b/src/intro.c index 1477b67a13..e032d78f59 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1142,7 +1142,7 @@ void CB2_InitCopyrightScreenAfterBootup(void) { if (!SetUpCopyrightScreen()) { - SetSaveBlocksPointers(sub_815355C()); + SetSaveBlocksPointers(GetSaveBlocksPointersBaseOffset()); ResetMenuAndMonGlobals(); Save_ResetSaveCounters(); Save_LoadGameData(SAVE_NORMAL); diff --git a/src/link.c b/src/link.c index 39f6568de3..6e9d015597 100644 --- a/src/link.c +++ b/src/link.c @@ -1,7 +1,7 @@ #include "global.h" #include "m4a.h" #include "malloc.h" -#include "reset_save_heap.h" +#include "reload_save.h" #include "save.h" #include "bg.h" #include "window.h" @@ -1705,7 +1705,7 @@ static void CB2_PrintErrorMessage(void) PlaySE(SE_PIN); gWirelessCommType = 0; sLinkErrorBuffer.disconnected = FALSE; - sub_81700F8(); + ReloadSave(); } } else if (gWirelessCommType == 2) diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index ffa78b21d5..b1e2c698f0 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -45,7 +45,7 @@ enum { #define RFUSTATE_PARENT_FINALIZE 18 #define RFUSTATE_UR_CONNECT 17 #define RFUSTATE_UR_CONNECT_END 18 -#define RFUSTATE_20 20 +#define RFUSTATE_FINALIZED 20 struct SioInfo { @@ -62,11 +62,11 @@ struct RfuDebug u16 unk_06; u8 filler1[6]; vu8 unk_0e; - u8 unk_0f; + u8 childJoinCount; u8 filler2[84]; u16 unk_64; u8 filler3[29]; - u8 unk_83; + u8 blockSendTime; u8 filler4[88]; }; @@ -83,7 +83,7 @@ static EWRAM_DATA INIT_PARAM sRfuReqConfig = {}; static EWRAM_DATA struct RfuDebug sRfuDebug = {}; static void ResetSendDataManager(struct RfuBlockSend *); -static void sub_800EAB4(void); +static void InitChildRecvBuffers(void); static void sub_800EAFC(void); static void sub_800ED34(u16); static void sub_800EDBC(u16); @@ -105,7 +105,7 @@ static void sub_8010D0C(u8); static void sub_80115EC(s32); static void sub_8011BF8(void); static void RfuReqDisconnectSlot(u32); -static void sub_8011E94(u32, u32); +static void SendDisconnectCommand(u32, u32); static void sub_801209C(u8); static void Debug_PrintEmpty(void); static void Task_Idle(u8); @@ -165,15 +165,44 @@ static const u8 sUnknown_082ED68C[] = { 2, 2, 3 }; -static const u8 sUnknown_082ED695[] = { - 0, 1, 1, 2, - 1, 2, 2, 3, - 1, 2, 2, 3, - 2, 3, 3, 4 +// Effectively just returns the number of bits set in the index value +// Used for masks of the other players, MAX_RFU_PLAYERS - 1 excludes self +static const u8 sPlayerBitsToCount[1 << (MAX_RFU_PLAYERS - 1)] = { + 0, // 0000 + 1, // 0001 + 1, // 0010 + 2, // 0011 + 1, // 0100 + 2, // 0101 + 2, // 0110 + 3, // 0111 + 1, // 1000 + 2, // 1001 + 2, // 1010 + 3, // 1011 + 2, // 1100 + 3, // 1101 + 3, // 1110 + 4 // 1111 }; -static const u8 sUnknown_082ED6A5[] = { - 0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 +static const u8 sUnknown_082ED6A5[1 << (MAX_RFU_PLAYERS - 1)] = { + 0, + 0, + 1, + 0, + 2, + 0, + 1, + 0, + 3, + 0, + 1, + 0, + 2, + 0, + 1, + 0 }; static const struct BlockRequest sBlockRequests[] = { @@ -185,10 +214,10 @@ static const struct BlockRequest sBlockRequests[] = { }; static const u16 sAcceptedSerialNos[] = { - 0x0002, - RFU_SERIAL_7F7D, - 0x0000, - 0xFFFF + RFU_SERIAL_A, + RFU_SERIAL_B, + RFU_SERIAL_C, + RFU_SERIAL_END }; static const char sASCII_RfuCmds[][15] = { @@ -213,7 +242,8 @@ static const char sASCII_RecoverCmds[][16] = { "RECOVER FAILED" }; -static const TaskFunc sUnknown_082ED7E0[] = { +// List of additional tasks to destroy (if active) when the RFU shuts down +static const TaskFunc sShutdownTasks[] = { sub_801084C, Task_ExchangeLinkPlayers, sub_8010D0C @@ -222,12 +252,12 @@ static const TaskFunc sUnknown_082ED7E0[] = { static const char sASCII_PokemonSioInfo[] = "PokemonSioInfo"; static const char sASCII_LinkLossDisconnect[] = "LINK LOSS DISCONNECT!"; static const char sASCII_LinkLossRecoveryNow[] = "LINK LOSS RECOVERY NOW"; -ALIGNED(4) static const char sASCII_30Spaces[31] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','\0'}; -static const char sASCII_15Spaces[16] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','\0'}; -static const char sASCII_8Spaces[9] = {' ',' ',' ',' ',' ',' ',' ',' ','\0'}; -ALIGNED(4) static const char sASCII_Space[2] = {' ','\0'}; -static const char sASCII_Asterisk[2] = {'*','\0'}; -static const char sASCII_NowSlot[8] = "NOWSLOT"; +ALIGNED(4) static const char sASCII_30Spaces[] = {" "}; +static const char sASCII_15Spaces[] = {" "}; +static const char sASCII_8Spaces[] = {" "}; +ALIGNED(4) static const char sASCII_Space[] = {" "}; +static const char sASCII_Asterisk[] = {"*"}; +static const char sASCII_NowSlot[] = "NOWSLOT"; static const char sASCII_ClockCmds[][12] = { " ", @@ -237,7 +267,7 @@ static const char sASCII_ClockCmds[][12] = { "CLOCK SLAVE" }; -static const char sASCII_ChildParentSearch[3][8] = { +static const char sASCII_ChildParentSearch[][8] = { "CHILD ", "PARENT", "SEARCH" @@ -260,14 +290,10 @@ void ResetLinkRfuGFLayer(void) CpuFill16(0, &Rfu, sizeof Rfu); Rfu.errorState = errorState; Rfu.parentChild = 0xFF; - if (Rfu.errorState != 4) - { - Rfu.errorState = 0; - } + if (Rfu.errorState != RFU_ERROR_STATE_IGNORE) + Rfu.errorState = RFU_ERROR_STATE_NONE; for (i = 0; i < MAX_RFU_PLAYERS; i++) - { ResetSendDataManager(&Rfu.recvBlock[i]); - } ResetSendDataManager(&Rfu.sendBlock); RfuRecvQueue_Reset(&Rfu.recvQueue); RfuSendQueue_Reset(&Rfu.sendQueue); @@ -291,13 +317,13 @@ void InitRFU(void) void InitRFUAPI(void) { - if (!rfu_initializeAPI((void *)gf_rfu_REQ_api, sizeof gf_rfu_REQ_api, gIntrTable + 1, TRUE)) + if (!rfu_initializeAPI((void *)gf_rfu_REQ_api, sizeof gf_rfu_REQ_api, &gIntrTable[1], TRUE)) { gLinkType = 0; ClearSavedLinkPlayers(); - sub_80111B0(FALSE); + RfuSetIgnoreError(FALSE); ResetLinkRfuGFLayer(); - rfu_setTimerInterrupt(3, gIntrTable + 2); + rfu_setTimerInterrupt(3, &gIntrTable[2]); } } @@ -329,9 +355,9 @@ static void Task_LinkLeaderSearchForChildren(u8 taskId) case RFUSTATE_PARENT_FINALIZE: Rfu.unk_cdb = FALSE; rfu_LMAN_setMSCCallback(sub_800EDBC); - sub_800EAB4(); + InitChildRecvBuffers(); sub_800EAFC(); - Rfu.state = RFUSTATE_20; + Rfu.state = RFUSTATE_FINALIZED; gTasks[taskId].data[1] = 8; CreateTask(sub_801084C, 5); DestroyTask(taskId); @@ -339,9 +365,9 @@ static void Task_LinkLeaderSearchForChildren(u8 taskId) } } -s32 sub_800E87C(u8 idx) +s32 sub_800E87C(u8 slot) { - return sUnknown_082ED6A5[idx]; + return sUnknown_082ED6A5[slot]; } void sub_800E88C(s32 r2, s32 r5) @@ -366,24 +392,18 @@ void sub_800E88C(s32 r2, s32 r5) for (i = 0; i < RFU_CHILD_MAX; r1 >>= 1, i++) { if (!(r1 & 1)) - { Rfu.linkPlayerIdx[i] = 0; - } } for (r4 = RFU_CHILD_MAX; r4 != 0; r4--) { for (i = 0; i < RFU_CHILD_MAX && Rfu.linkPlayerIdx[i] != r4; i++); if (i == RFU_CHILD_MAX) - { r6 = r4; - } } for (r5 &= ~r2, i = 0; i < RFU_CHILD_MAX; r5 >>= 1, i++) { if (r5 & 1) - { Rfu.linkPlayerIdx[i] = r6++; - } } } } @@ -418,7 +438,7 @@ static void Task_JoinGroupSearchForParent(u8 taskId) case RFU_STATUS_JOIN_GROUP_NO: case RFU_STATUS_LEAVE_GROUP: rfu_LMAN_requestChangeAgbClockMaster(); - Rfu.unk_ce4 = 2; + Rfu.disconnectMode = RFU_DISCONNECT_NORMAL; DestroyTask(taskId); break; } @@ -427,14 +447,14 @@ static void Task_JoinGroupSearchForParent(u8 taskId) { u8 bmChildSlot = 1 << Rfu.childSlot; rfu_clearSlot(TYPE_NI_SEND | TYPE_NI_RECV, Rfu.childSlot); - rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, 70); - rfu_UNI_setSendData(bmChildSlot, Rfu.unk_4c, sizeof(Rfu.unk_4c)); + rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, sizeof(Rfu.unk_c3f)); + rfu_UNI_setSendData(bmChildSlot, Rfu.childSendBuffer, sizeof(Rfu.childSendBuffer)); gTasks[taskId].data[1] = 8; DestroyTask(taskId); - if (sRfuDebug.unk_0f == 0) + if (sRfuDebug.childJoinCount == 0) { Debug_PrintEmpty(); - sRfuDebug.unk_0f++; + sRfuDebug.childJoinCount++; } CreateTask(sub_801084C, 5); break; @@ -442,7 +462,7 @@ static void Task_JoinGroupSearchForParent(u8 taskId) } } -static void sub_800EAB4(void) +static void InitChildRecvBuffers(void) { u8 i; u8 acceptSlot = lman.acceptSlot_flag; @@ -450,7 +470,7 @@ static void sub_800EAB4(void) { if (acceptSlot & 1) { - rfu_setRecvBuffer(TYPE_UNI, i, Rfu.unk_14[i], 14); + rfu_setRecvBuffer(TYPE_UNI, i, Rfu.childRecvBuffer[i], sizeof(Rfu.childRecvBuffer[0])); rfu_clearSlot(TYPE_UNI_SEND | TYPE_UNI_RECV, i); } acceptSlot >>= 1; @@ -467,6 +487,8 @@ static void sub_800EAFC(void) Rfu.parentChild = MODE_PARENT; } +#define tData7 data[7] // sub_ + static void Task_LinkRfu_UnionRoomListen(u8 taskId) { if (GetHostRFUtgtGname()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM) && RfuGetStatus() == RFU_STATUS_NEW_CHILD_DETECTED) @@ -485,18 +507,18 @@ static void Task_LinkRfu_UnionRoomListen(u8 taskId) case RFUSTATE_INIT_END: break; case RFUSTATE_UR_CONNECT: - rfu_LMAN_establishConnection(2, 0, 240, (u16 *)sAcceptedSerialNos); + rfu_LMAN_establishConnection(MODE_P_C_SWITCH, 0, 240, (u16 *)sAcceptedSerialNos); rfu_LMAN_setMSCCallback(sub_800ED34); Rfu.state = RFUSTATE_UR_CONNECT_END; break; case RFUSTATE_UR_CONNECT_END: break; case RFUSTATE_13: - if (rfu_UNI_setSendData(1 << Rfu.childSlot, Rfu.unk_4c, sizeof(Rfu.unk_4c)) == 0) + if (rfu_UNI_setSendData(1 << Rfu.childSlot, Rfu.childSendBuffer, sizeof(Rfu.childSendBuffer)) == 0) { Rfu.parentChild = MODE_CHILD; DestroyTask(taskId); - if (gTasks[taskId].data[7]) + if (gTasks[taskId].tData7) CreateTask(sub_8010D0C, 1); else CreateTask(sub_801084C, 5); @@ -512,9 +534,9 @@ static void Task_LinkRfu_UnionRoomListen(u8 taskId) Rfu.unk_cdb = FALSE; rfu_LMAN_setMSCCallback(sub_800EDBC); UpdateGameData_GroupLockedIn(TRUE); - sub_800EAB4(); + InitChildRecvBuffers(); sub_800EAFC(); - Rfu.state = RFUSTATE_20; + Rfu.state = RFUSTATE_FINALIZED; gTasks[taskId].data[1] = 8; Rfu.parentChild = MODE_PARENT; CreateTask(sub_801084C, 5); @@ -538,15 +560,14 @@ static void sub_800ED34(u16 unused) { s32 i; - for (i = 0; i < (int)ARRAY_COUNT(Rfu.unk_4c); i++) - { - Rfu.unk_4c[i] = 0; - } + for (i = 0; i < CHILD_DATA_LENGTH; i++) + Rfu.childSendBuffer[i] = 0; + rfu_REQ_recvData(); rfu_waitREQComplete(); if (gRfuSlotStatusUNI[Rfu.childSlot]->recv.newDataFlag) { - Rfu.unk_cd0++; + Rfu.childSendCount++; RfuRecvQueue_Enqueue(&Rfu.recvQueue, Rfu.unk_c3f); sRfuDebug.unk_06++; UpdateBackupQueue(); @@ -568,6 +589,7 @@ void LinkRfu_Shutdown(void) rfu_LMAN_powerDownRFU(); if (Rfu.parentChild == MODE_PARENT) { + // Stop parent searching for children if (FuncIsActiveTask(Task_LinkLeaderSearchForChildren) == TRUE) { DestroyTask(Rfu.searchTaskId); @@ -576,6 +598,7 @@ void LinkRfu_Shutdown(void) } else if (Rfu.parentChild == MODE_CHILD) { + // Stop child searching for parent if (FuncIsActiveTask(Task_JoinGroupSearchForParent) == TRUE) { DestroyTask(Rfu.searchTaskId); @@ -584,18 +607,19 @@ void LinkRfu_Shutdown(void) } else if (Rfu.parentChild == MODE_P_C_SWITCH) { + // Stop parent-child switching mode (union room) if (FuncIsActiveTask(Task_LinkRfu_UnionRoomListen) == TRUE) { DestroyTask(Rfu.searchTaskId); ResetLinkRfuGFLayer(); } } - for (i = 0; i < ARRAY_COUNT(sUnknown_082ED7E0); i++) + + // Destroy additional tasks + for (i = 0; i < ARRAY_COUNT(sShutdownTasks); i++) { - if (FuncIsActiveTask(sUnknown_082ED7E0[i]) == TRUE) - { - DestroyTask(FindTaskIdByFunc(sUnknown_082ED7E0[i])); - } + if (FuncIsActiveTask(sShutdownTasks[i]) == TRUE) + DestroyTask(FindTaskIdByFunc(sShutdownTasks[i])); } } @@ -604,16 +628,15 @@ static void CreateTask_LinkLeaderSearchForChildren(void) Rfu.searchTaskId = CreateTask(Task_LinkLeaderSearchForChildren, 1); } -static bool8 sub_800EE94(void) +// If no parent ID (or if child connection not ready) can't reconnect with parent yet +static bool8 CanTryReconnectParent(void) { if (Rfu.state == RFUSTATE_CHILD_CONNECT_END && Rfu.parentId) - { return TRUE; - } return FALSE; } -static bool32 IsParentSuccessfullyReconnected(void) +static bool32 TryReconnectParent(void) { if (Rfu.state == RFUSTATE_CHILD_CONNECT_END && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[Rfu.unk_c3d].id, 240)) { @@ -631,9 +654,7 @@ static void CreateTask_JoinGroupSearchForParent(void) bool8 LmanAcceptSlotFlagIsNotZero(void) { if (lman.acceptSlot_flag) - { return TRUE; - } return FALSE; } @@ -658,18 +679,19 @@ void sub_800EF7C(void) Rfu.state = RFUSTATE_14; } -static void sub_800EF88(u8 a0) +// Unused +static void ReadySendDataForSlots(u8 slots) { u8 i; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (a0 & 1) + if (slots & 1) { rfu_UNI_readySendData(i); break; } - a0 >>= 1; + slots >>= 1; } } @@ -689,24 +711,21 @@ static void sub_800EFB0(void) CpuFill16(0, gRecvCmds, sizeof gRecvCmds); } -static void sub_800F014(void) +static void MoveSendCmdToRecv(void) { s32 i; for (i = 0; i < CMD_LENGTH - 1; i++) - { gRecvCmds[0][i] = gSendCmd[i]; - } + for (i = 0; i < CMD_LENGTH - 1; i++) - { gSendCmd[i] = 0; - } } static void UpdateBackupQueue(void) { if (Rfu.linkRecovered) { - bool8 backupEmpty = RfuBackupQueue_Dequeue(&Rfu.backupQueue, Rfu.unk_4c); + bool8 backupEmpty = RfuBackupQueue_Dequeue(&Rfu.backupQueue, Rfu.childSendBuffer); if (Rfu.backupQueue.count == 0) Rfu.linkRecovered = FALSE; @@ -716,8 +735,8 @@ static void UpdateBackupQueue(void) } if (!Rfu.linkRecovered) { - RfuSendQueue_Dequeue(&Rfu.sendQueue, Rfu.unk_4c); - RfuBackupQueue_Enqueue(&Rfu.backupQueue, Rfu.unk_4c); + RfuSendQueue_Dequeue(&Rfu.sendQueue, Rfu.childSendBuffer); + RfuBackupQueue_Enqueue(&Rfu.backupQueue, Rfu.childSendBuffer); } } @@ -743,9 +762,9 @@ bool32 IsRfuRecvQueueEmpty(void) return TRUE; } -static bool32 sub_800F0F8(void) +static bool32 RfuMain1_Parent(void) { - if (Rfu.state < RFUSTATE_20) + if (Rfu.state < RFUSTATE_FINALIZED) { rfu_REQ_recvData(); rfu_waitREQComplete(); @@ -758,11 +777,11 @@ static bool32 sub_800F0F8(void) { if (!Rfu.unk_cdc) { - if (Rfu.unk_ce3) + if (Rfu.disconnectSlots) { - RfuReqDisconnectSlot(Rfu.unk_ce3); - Rfu.unk_ce3 = 0; - if (Rfu.unk_ce4 == 1) + RfuReqDisconnectSlot(Rfu.disconnectSlots); + Rfu.disconnectSlots = 0; + if (Rfu.disconnectMode == RFU_DISCONNECT_ERROR) { RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x8000); GetLinkmanErrorParams(0x8000); @@ -789,7 +808,7 @@ static bool32 sub_800F0F8(void) return FALSE; } -static bool32 sub_800F1E0(void) +static bool32 RfuMain2_Parent(void) { u16 i; u16 flags; @@ -797,12 +816,12 @@ static bool32 sub_800F1E0(void) u16 j; u8 retval; - if (Rfu.state >= RFUSTATE_20 && Rfu.unk_0e == TRUE) + if (Rfu.state >= RFUSTATE_FINALIZED && Rfu.unk_0e == TRUE) { rfu_waitREQComplete(); while (Rfu.unk_cdb == FALSE) { - if (Rfu.errorState != 0) + if (Rfu.errorState != RFU_ERROR_STATE_NONE) return FALSE; } rfu_REQ_recvData(); @@ -816,24 +835,24 @@ static bool32 sub_800F1E0(void) { if (flags & 1) { - if (Rfu.unk_14[i][1]) + if (Rfu.childRecvBuffer[i][1]) { - if (Rfu.unk_cee[i] != 0xFF && (Rfu.unk_14[i][0] >> 5) != ((Rfu.unk_cee[i] + 1) & 7)) + if (Rfu.unk_cee[i] != 0xFF && (Rfu.childRecvBuffer[i][0] >> 5) != ((Rfu.unk_cee[i] + 1) & 7)) { if (++Rfu.unk_cea[i] > 4) - GetLinkmanErrorParams(0x8100); + GetLinkmanErrorParams(0x8000 | 0x100); } else { - Rfu.unk_cee[i] = Rfu.unk_14[i][0] / 32; + Rfu.unk_cee[i] = Rfu.childRecvBuffer[i][0] / 32; Rfu.unk_cea[i] = 0; - Rfu.unk_14[i][0] &= 0x1f; + Rfu.childRecvBuffer[i][0] &= 0x1f; r0 = Rfu.linkPlayerIdx[i]; for (j = 0; j < 7; j++) { - gRecvCmds[r0][j] = (Rfu.unk_14[i][(j << 1) + 1] << 8) | Rfu.unk_14[i][(j << 1) + 0]; - Rfu.unk_14[i][(j << 1) + 1] = 0; - Rfu.unk_14[i][(j << 1) + 0] = 0; + gRecvCmds[r0][j] = (Rfu.childRecvBuffer[i][(j << 1) + 1] << 8) | Rfu.childRecvBuffer[i][(j << 1) + 0]; + Rfu.childRecvBuffer[i][(j << 1) + 1] = 0; + Rfu.childRecvBuffer[i][(j << 1) + 0] = 0; } } } @@ -841,19 +860,17 @@ static bool32 sub_800F1E0(void) } flags >>= 1; } - sub_800F014(); + MoveSendCmdToRecv(); RfuHandleReceiveCommand(0); CallRfuFunc(); - if (Rfu.unk_ce5 && !Rfu.unk_cd9) + if (Rfu.unk_ce5 && !Rfu.stopNewConnections) { sRfuDebug.unk_0e = FALSE; rfu_clearSlot(TYPE_UNI_SEND | TYPE_UNI_RECV, Rfu.unk_cda); for (i = 0; i < RFU_CHILD_MAX; i++) { if ((Rfu.unk_ce5 >> i) & 1) - { - rfu_setRecvBuffer(TYPE_UNI, i, Rfu.unk_14[i], 14); - } + rfu_setRecvBuffer(TYPE_UNI, i, Rfu.childRecvBuffer[i], sizeof(Rfu.childRecvBuffer[0])); } sub_800E88C(Rfu.unk_ce2, Rfu.unk_ce2 | Rfu.unk_ce5); Rfu.unk_ce9 = Rfu.unk_ce5; @@ -896,22 +913,22 @@ static void sub_800F498(u16 *a0, u8 *a1) } } -static bool32 RfuProcessEnqueuedRecvBlock(void) +static bool32 RfuMain1_Child(void) { u8 i; u8 j; - u8 sp00[MAX_RFU_PLAYERS * (2 * (CMD_LENGTH - 1))]; - u8 sp48[2 * (CMD_LENGTH - 1)]; + u8 recv[MAX_RFU_PLAYERS * (2 * (CMD_LENGTH - 1))]; + u8 send[2 * (CMD_LENGTH - 1)]; u8 status; - RfuRecvQueue_Dequeue(&Rfu.recvQueue, sp00); + RfuRecvQueue_Dequeue(&Rfu.recvQueue, recv); for (i = 0; i < MAX_RFU_PLAYERS; i++) { for (j = 0; j < CMD_LENGTH - 1; j++) - gRecvCmds[i][j] = (sp00[i * 14 + (j << 1) + 1] << 8) | sp00[i * 14 + (j << 1) + 0]; + gRecvCmds[i][j] = (recv[i * 14 + (j << 1) + 1] << 8) | recv[i * 14 + (j << 1) + 0]; } RfuHandleReceiveCommand(0); - if (lman.childClockSlave_flag == 0 && Rfu.unk_ce4) + if (lman.childClockSlave_flag == 0 && Rfu.disconnectMode != RFU_DISCONNECT_NONE) { rfu_REQ_disconnect(gRfuLinkStatus->connSlotFlag | gRfuLinkStatus->linkLossSlotFlag); rfu_waitREQComplete(); @@ -921,20 +938,20 @@ static bool32 RfuProcessEnqueuedRecvBlock(void) rfu_clearAllSlot(); gReceivedRemoteLinkPlayers = FALSE; Rfu.callback = NULL; - if (Rfu.unk_ce4 == 1) + if (Rfu.disconnectMode == RFU_DISCONNECT_ERROR) { RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x9000); GetLinkmanErrorParams(0x9000); } lman.state = lman.next_state = 0; - Rfu.unk_ce4 = 0; + Rfu.disconnectMode = RFU_DISCONNECT_NONE; } - if (Rfu.unk_cd0) + if (Rfu.childSendCount) { - Rfu.unk_cd0--; + Rfu.childSendCount--; CallRfuFunc(); - sub_800F498(gSendCmd, sp48); - RfuSendQueue_Enqueue(&Rfu.sendQueue, sp48); + sub_800F498(gSendCmd, send); + RfuSendQueue_Enqueue(&Rfu.sendQueue, send); for (i = 0; i < CMD_LENGTH - 1; i++) gSendCmd[i] = 0; } @@ -950,7 +967,7 @@ static void HandleSendFailure(u8 unused, u32 flags) { if (!(flags & 1)) { - sResendBlock16[0] = RFUCMD_0x8900 | i; + sResendBlock16[0] = RFUCMD_SEND_BLOCK | i; for (j = 0; j < 7; j++) { temp = j << 1; @@ -983,17 +1000,15 @@ void Rfu_ResetBlockReceivedFlag(u8 linkPlayerId) Rfu.recvBlock[linkPlayerId].receiving = 0; } -static u8 sub_800F74C(const u8 *a0) +static u8 LoadLinkPlayerIds(const u8 *ids) { u8 i; - if (Rfu.parentChild == MODE_PARENT) return FALSE; for (i = 0; i < RFU_CHILD_MAX; i++) - { - Rfu.linkPlayerIdx[i] = a0[i]; - } - return a0[Rfu.childSlot]; + Rfu.linkPlayerIdx[i] = ids[i]; + + return ids[Rfu.childSlot]; } static void RfuFunc_SendKeysToRfu(void) @@ -1049,20 +1064,20 @@ static void RfuHandleReceiveCommand(u8 unused) for (i = 0; i < MAX_RFU_PLAYERS; i++) { - switch (gRecvCmds[i][0] & 0xff00) + switch (gRecvCmds[i][0] & RFUCMD_MASK) { - case RFUCMD_0x7800: + case RFUCMD_SEND_PLAYER_IDS_NEW: if (Rfu.parentChild == MODE_CHILD && gReceivedRemoteLinkPlayers) return; // fallthrough - case RFUCMD_0x7700: + case RFUCMD_SEND_PLAYER_IDS: if (gRfuLinkStatus->parentChild == MODE_CHILD) { Rfu.playerCount = gRecvCmds[i][1]; - Rfu.multiplayerId = sub_800F74C((u8 *)(gRecvCmds[i] + 2)); + Rfu.multiplayerId = LoadLinkPlayerIds((u8 *)(gRecvCmds[i] + 2)); } break; - case RFUCMD_0x8800: + case RFUCMD_SEND_BLOCK_INIT: if (Rfu.recvBlock[i].receiving == 0) { Rfu.recvBlock[i].next = 0; @@ -1073,7 +1088,7 @@ static void RfuHandleReceiveCommand(u8 unused) Rfu.blockReceived[i] = FALSE; } break; - case RFUCMD_0x8900: + case RFUCMD_SEND_BLOCK: if (Rfu.recvBlock[i].receiving == 1) { Rfu.recvBlock[i].next = gRecvCmds[i][0] & 0xff; @@ -1096,19 +1111,20 @@ static void RfuHandleReceiveCommand(u8 unused) Rfu.readyCloseLink[i] = TRUE; break; case RFUCMD_READY_EXIT_STANDBY: - if (Rfu.unk_100 == gRecvCmds[i][1]) + if (Rfu.allReadyNum == gRecvCmds[i][1]) Rfu.readyExitStandby[i] = TRUE; break; - case RFUCMD_0xED00: + case RFUCMD_DISCONNECT: if (Rfu.parentChild == MODE_CHILD) { + // Disconnect child if (gReceivedRemoteLinkPlayers) { if (gRecvCmds[i][1] & gRfuLinkStatus->connSlotFlag) { gReceivedRemoteLinkPlayers = 0; rfu_LMAN_requestChangeAgbClockMaster(); - Rfu.unk_ce4 = gRecvCmds[i][2]; + Rfu.disconnectMode = gRecvCmds[i][2]; } Rfu.playerCount = gRecvCmds[i][3]; ClearSelectedLinkPlayerIds(gRecvCmds[i][1]); @@ -1116,17 +1132,18 @@ static void RfuHandleReceiveCommand(u8 unused) } else { - RfuPrepareSendBuffer(RFUCMD_0xEE00); + // Disconnect parent + RfuPrepareSendBuffer(RFUCMD_DISCONNECT_PARENT); gSendCmd[1] = gRecvCmds[i][1]; gSendCmd[2] = gRecvCmds[i][2]; gSendCmd[3] = gRecvCmds[i][3]; } break; - case RFUCMD_0xEE00: + case RFUCMD_DISCONNECT_PARENT: if (Rfu.parentChild == MODE_PARENT) { - Rfu.unk_ce3 |= gRecvCmds[i][1]; - Rfu.unk_ce4 = gRecvCmds[i][2]; + Rfu.disconnectSlots |= gRecvCmds[i][1]; + Rfu.disconnectMode = gRecvCmds[i][2]; ClearSelectedLinkPlayerIds(gRecvCmds[i][1]); } break; @@ -1191,9 +1208,7 @@ u8 Rfu_GetBlockReceivedStatus(void) for (i = 0; i < MAX_RFU_PLAYERS; i++) { if (Rfu.recvBlock[i].receiving == 2 && Rfu.blockReceived[i] == TRUE) - { flags |= (1 << i); - } } return flags; } @@ -1207,7 +1222,7 @@ static void RfuPrepareSendBuffer(u16 command) gSendCmd[0] = command; switch (command) { - case RFUCMD_0x8800: + case RFUCMD_SEND_BLOCK_INIT: gSendCmd[1] = Rfu.sendBlock.count; gSendCmd[2] = Rfu.sendBlock.owner + 0x80; break; @@ -1215,18 +1230,18 @@ static void RfuPrepareSendBuffer(u16 command) if (AreNoPlayersReceiving()) gSendCmd[1] = Rfu.blockRequestType; break; - case RFUCMD_0x7700: - case RFUCMD_0x7800: - tmp = Rfu.unk_ce2 ^ Rfu.unk_ce3; - Rfu.playerCount = sUnknown_082ED695[tmp] + 1; + case RFUCMD_SEND_PLAYER_IDS: + case RFUCMD_SEND_PLAYER_IDS_NEW: + tmp = Rfu.unk_ce2 ^ Rfu.disconnectSlots; + Rfu.playerCount = sPlayerBitsToCount[tmp] + 1; gSendCmd[1] = Rfu.playerCount; - buff = (u8 *)(gSendCmd + 2); + buff = (u8 *)&gSendCmd[2]; for (i = 0; i < RFU_CHILD_MAX; i++) buff[i] = Rfu.linkPlayerIdx[i]; break; case RFUCMD_READY_EXIT_STANDBY: case RFUCMD_READY_CLOSE_LINK: - gSendCmd[1] = Rfu.unk_100; + gSendCmd[1] = Rfu.allReadyNum; break; case RFUCMD_BLENDER_SEND_KEYS: gSendCmd[0] = command; @@ -1239,9 +1254,8 @@ static void RfuPrepareSendBuffer(u16 command) case RFUCMD_SEND_HELD_KEYS: gSendCmd[1] = gHeldKeyCodeToSend; break; - case RFUCMD_0xEE00: - break; - case RFUCMD_0xED00: + case RFUCMD_DISCONNECT_PARENT: + case RFUCMD_DISCONNECT: break; } } @@ -1264,7 +1278,7 @@ bool32 Rfu_InitBlockSend(const u8 *src, size_t size) return FALSE; if (Rfu.sendBlock.sending) { - sRfuDebug.unk_83++; + sRfuDebug.blockSendTime++; return FALSE; } r4 = (size % 12) != 0; @@ -1272,7 +1286,7 @@ bool32 Rfu_InitBlockSend(const u8 *src, size_t size) Rfu.sendBlock.sending = TRUE; Rfu.sendBlock.count = (size / 12) + r4; Rfu.sendBlock.next = 0; - if (size > 0x100) + if (size > BLOCK_BUFFER_SIZE) Rfu.sendBlock.payload = src; else { @@ -1280,7 +1294,7 @@ bool32 Rfu_InitBlockSend(const u8 *src, size_t size) memcpy(gBlockSendBuffer, src, size); Rfu.sendBlock.payload = gBlockSendBuffer; } - RfuPrepareSendBuffer(RFUCMD_0x8800); + RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_INIT); Rfu.callback = HandleBlockSend; Rfu.unk_5b = 0; return TRUE; @@ -1290,7 +1304,7 @@ static void HandleBlockSend(void) { if (gSendCmd[0] == 0) { - RfuPrepareSendBuffer(RFUCMD_0x8800); + RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_INIT); if (Rfu.parentChild == MODE_PARENT) { if (++Rfu.unk_5b > 2) @@ -1298,7 +1312,7 @@ static void HandleBlockSend(void) } else { - if ((gRecvCmds[GetMultiplayerId()][0] & 0xff00) == RFUCMD_0x8800) + if ((gRecvCmds[GetMultiplayerId()][0] & RFUCMD_MASK) == RFUCMD_SEND_BLOCK_INIT) Rfu.callback = SendNextBlock; } } @@ -1308,7 +1322,7 @@ static void SendNextBlock(void) { s32 i; const u8 *src = Rfu.sendBlock.payload; - gSendCmd[0] = RFUCMD_0x8900 | Rfu.sendBlock.next; + gSendCmd[0] = RFUCMD_SEND_BLOCK | Rfu.sendBlock.next; for (i = 0; i < CMD_LENGTH - 1; i++) gSendCmd[i + 1] = (src[(i << 1) + Rfu.sendBlock.next * 12 + 1] << 8) | src[(i << 1) + Rfu.sendBlock.next * 12 + 0]; Rfu.sendBlock.next++; @@ -1326,7 +1340,7 @@ static void SendLastBlock(void) s32 i; if (Rfu.parentChild == MODE_CHILD) { - gSendCmd[0] = RFUCMD_0x8900 | (Rfu.sendBlock.count - 1); + gSendCmd[0] = RFUCMD_SEND_BLOCK | (Rfu.sendBlock.count - 1); for (i = 0; i < CMD_LENGTH - 1; i++) gSendCmd[i + 1] = (src[(i << 1) + (Rfu.sendBlock.count - 1) * 12 + 1] << 8) | src[(i << 1) + (Rfu.sendBlock.count - 1) * 12 + 0]; if ((u8)gRecvCmds[mpId][0] == Rfu.sendBlock.count - 1) @@ -1337,11 +1351,15 @@ static void SendLastBlock(void) sRfuDebug.unk_64++; } else + { Rfu.callback = NULL; + } } } else + { Rfu.callback = NULL; + } } bool8 Rfu_SendBlockRequest(u8 type) @@ -1351,7 +1369,7 @@ bool8 Rfu_SendBlockRequest(u8 type) return TRUE; } -static void sub_801011C(void) +static void RfuShutdownAfterDisconnect(void) { rfu_clearAllSlot(); rfu_LMAN_powerDownRFU(); @@ -1364,7 +1382,7 @@ static void DisconnectRfu(void) { rfu_REQ_disconnect(gRfuLinkStatus->connSlotFlag | gRfuLinkStatus->linkLossSlotFlag); rfu_waitREQComplete(); - sub_801011C(); + RfuShutdownAfterDisconnect(); } static void TryDisconnectRfu(void) @@ -1372,17 +1390,19 @@ static void TryDisconnectRfu(void) if (Rfu.parentChild == MODE_CHILD) { rfu_LMAN_requestChangeAgbClockMaster(); - Rfu.unk_ce4 = 2; + Rfu.disconnectMode = RFU_DISCONNECT_NORMAL; } else + { Rfu.callback = DisconnectRfu; + } } void LinkRfu_FatalError(void) { rfu_LMAN_requestChangeAgbClockMaster(); - Rfu.unk_ce4 = 1; - Rfu.unk_ce3 = gRfuLinkStatus->connSlotFlag | gRfuLinkStatus->linkLossSlotFlag; + Rfu.disconnectMode = RFU_DISCONNECT_ERROR; + Rfu.disconnectSlots = gRfuLinkStatus->connSlotFlag | gRfuLinkStatus->linkLossSlotFlag; } // RFU equivalent of LinkCB_WaitCloseLink @@ -1404,17 +1424,19 @@ static void WaitAllReadyToCloseLink(void) gBattleTypeFlags &= ~BATTLE_TYPE_LINK_IN_BATTLE; if (Rfu.parentChild == MODE_CHILD) { - Rfu.errorState = 3; + Rfu.errorState = RFU_ERROR_STATE_3; TryDisconnectRfu(); } else + { Rfu.callback = TryDisconnectRfu; + } } } static void SendReadyCloseLink(void) { - if (gSendCmd[0] == 0 && Rfu.unk_ce8 == 0) + if (gSendCmd[0] == 0 && !Rfu.unk_ce8) { RfuPrepareSendBuffer(RFUCMD_READY_CLOSE_LINK); Rfu.callback = WaitAllReadyToCloseLink; @@ -1425,7 +1447,7 @@ static void Task_TryReadyCloseLink(u8 taskId) { if (Rfu.callback == NULL) { - Rfu.unk_cd9 = 1; + Rfu.stopNewConnections = TRUE; Rfu.callback = SendReadyCloseLink; DestroyTask(taskId); } @@ -1460,7 +1482,7 @@ static void SendReadyExitStandbyUntilAllReady(void) { for (i = 0; i < MAX_RFU_PLAYERS; i++) Rfu.readyExitStandby[i] = FALSE; - Rfu.unk_100++; + Rfu.allReadyNum++; Rfu.callback = NULL; } Rfu.resendExitStandbyTimer++; @@ -1524,23 +1546,23 @@ bool32 IsRfuSerialNumberValid(u32 serialNo) s32 i; for (i = 0; sAcceptedSerialNos[i] != serialNo; i++) { - if (sAcceptedSerialNos[i] == 0xFFFF) + if (sAcceptedSerialNos[i] == RFU_SERIAL_END) return FALSE; } return TRUE; } -u8 sub_801048C(bool32 a0) +u8 Rfu_SetLinkRecovery(bool32 enable) { - if (a0 == FALSE) + if (enable == FALSE) return rfu_LMAN_setLinkRecovery(0, 0); rfu_LMAN_setLinkRecovery(1, 600); return 0; } -void sub_80104B0(void) +void Rfu_StopPartnerSearch(void) { - Rfu.unk_cd9 = 1; + Rfu.stopNewConnections = TRUE; rfu_LMAN_stopManager(FALSE); } @@ -1688,7 +1710,7 @@ static void UpdateChildStatuses(void) static s32 sub_80107A0(void) { s32 status = RFU_STATUS_OK; - if (Rfu.unk_c85 == 8) + if (Rfu.unk_c85 == RFU_STATUS_LEAVE_GROUP_NOTICE) { if (gRfuSlotStatusNI[Rfu.childSlot]->send.state == SLOT_STATE_SEND_SUCCESS || gRfuSlotStatusNI[Rfu.childSlot]->send.state == SLOT_STATE_SEND_FAILED) @@ -1709,44 +1731,46 @@ static s32 sub_80107A0(void) return status; } +#define tState data[0] + static void sub_801084C(u8 taskId) { s32 i; if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR) { - Rfu.unk_ce8 = 0; + Rfu.unk_ce8 = FALSE; DestroyTask(taskId); } - switch (gTasks[taskId].data[0]) + switch (gTasks[taskId].tState) { case 0: if (AreNoPlayersReceiving()) { ResetBlockReceivedFlags(); LocalLinkPlayerToBlock(); - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; } break; case 1: if (Rfu.parentChild == MODE_PARENT) { if (gReceivedRemoteLinkPlayers) - RfuPrepareSendBuffer(RFUCMD_0x7800); + RfuPrepareSendBuffer(RFUCMD_SEND_PLAYER_IDS_NEW); else - RfuPrepareSendBuffer(RFUCMD_0x7700); - gTasks[taskId].data[0] = 101; + RfuPrepareSendBuffer(RFUCMD_SEND_PLAYER_IDS); + gTasks[taskId].tState = 101; } else - gTasks[taskId].data[0] = 2; + gTasks[taskId].tState = 2; break; case 101: if (gSendCmd[0] == 0) - gTasks[taskId].data[0] = 2; + gTasks[taskId].tState = 2; break; case 2: if (Rfu.playerCount) - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; break; case 3: if (Rfu.parentChild == MODE_PARENT) @@ -1755,15 +1779,15 @@ static void sub_801084C(u8 taskId) { Rfu.blockRequestType = BLOCK_REQ_SIZE_NONE; RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_REQ); - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; } } else - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; break; case 4: if (sub_800FC88()) - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; break; case 5: for (i = 0; i < Rfu.playerCount; i++) @@ -1771,7 +1795,7 @@ static void sub_801084C(u8 taskId) LinkPlayerFromBlock(i); Rfu_ResetBlockReceivedFlag(i); } - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; break; case 6: DestroyTask(taskId); @@ -1830,62 +1854,62 @@ static void ValidateAndReceivePokemonSioInfo(void *recvBuffer) static void Task_ExchangeLinkPlayers(u8 taskId) { s32 i; - struct LinkPlayerBlock *r2; - struct SioInfo *r5; - u8 r4 = Rfu.linkPlayerIdx[sUnknown_082ED68C[Rfu.unk_ce9]]; + struct LinkPlayerBlock *playerBlock; + struct SioInfo *sio; + u8 playerId = Rfu.linkPlayerIdx[sUnknown_082ED68C[Rfu.unk_ce9]]; if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR) { - Rfu.unk_ce8 = 0; + Rfu.unk_ce8 = FALSE; DestroyTask(taskId); } - switch (gTasks[taskId].data[0]) + switch (gTasks[taskId].tState) { case 0: if (gSendCmd[0] == 0) { - ResetBlockReceivedFlag(r4); - RfuPrepareSendBuffer(RFUCMD_0x7800); - gTasks[taskId].data[0]++; + ResetBlockReceivedFlag(playerId); + RfuPrepareSendBuffer(RFUCMD_SEND_PLAYER_IDS_NEW); + gTasks[taskId].tState++; } break; case 1: if (gSendCmd[0] == 0) - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; break; case 2: - if ((GetBlockReceivedStatus() >> r4) & 1) + if ((GetBlockReceivedStatus() >> playerId) & 1) { - ResetBlockReceivedFlag(r4); - r2 = (struct LinkPlayerBlock *)gBlockRecvBuffer[r4]; - gLinkPlayers[r4] = r2->linkPlayer; - ConvertLinkPlayerName(gLinkPlayers + r4); - gTasks[taskId].data[0]++; + ResetBlockReceivedFlag(playerId); + playerBlock = (struct LinkPlayerBlock *)gBlockRecvBuffer[playerId]; + gLinkPlayers[playerId] = playerBlock->linkPlayer; + ConvertLinkPlayerName(&gLinkPlayers[playerId]); + gTasks[taskId].tState++; } break; case 3: - r5 = (struct SioInfo *)gBlockSendBuffer; - memcpy(r5->magic, sASCII_PokemonSioInfo, sizeof sASCII_PokemonSioInfo); - r5->playerCount = Rfu.playerCount; + sio = (struct SioInfo *)gBlockSendBuffer; + memcpy(sio->magic, sASCII_PokemonSioInfo, sizeof sASCII_PokemonSioInfo); + sio->playerCount = Rfu.playerCount; for (i = 0; i < RFU_CHILD_MAX; i++) - r5->linkPlayerIdx[i] = Rfu.linkPlayerIdx[i]; - memcpy(r5->linkPlayers, gLinkPlayers, sizeof gLinkPlayers); - gTasks[taskId].data[0]++; + sio->linkPlayerIdx[i] = Rfu.linkPlayerIdx[i]; + memcpy(sio->linkPlayers, gLinkPlayers, sizeof gLinkPlayers); + gTasks[taskId].tState++; // fallthrough case 4: - r5 = (struct SioInfo *)gBlockSendBuffer; - r5->playerCount = Rfu.playerCount; + sio = (struct SioInfo *)gBlockSendBuffer; + sio->playerCount = Rfu.playerCount; for (i = 0; i < RFU_CHILD_MAX; i++) - r5->linkPlayerIdx[i] = Rfu.linkPlayerIdx[i]; - memcpy(r5->linkPlayers, gLinkPlayers, sizeof gLinkPlayers); + sio->linkPlayerIdx[i] = Rfu.linkPlayerIdx[i]; + memcpy(sio->linkPlayers, gLinkPlayers, sizeof(gLinkPlayers)); if (SendBlock(0, gBlockSendBuffer, 0xa0)) - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; break; case 5: if (IsLinkTaskFinished() && GetBlockReceivedStatus() & 1) { CpuFill16(0, gBlockRecvBuffer, sizeof(struct SioInfo)); ResetBlockReceivedFlag(0); - Rfu.unk_ce8 = 0; + Rfu.unk_ce8 = FALSE; if (Rfu.unk_ce6) { for (i = 0; i < 4; i++) @@ -1894,7 +1918,7 @@ static void Task_ExchangeLinkPlayers(u8 taskId) { Rfu.unk_ce5 = 1 << i; Rfu.unk_ce6 ^= (1 << i); - Rfu.unk_ce8 = 1; + Rfu.unk_ce8 = TRUE; break; } } @@ -1909,19 +1933,19 @@ static void sub_8010D0C(u8 taskId) { if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR) DestroyTask(taskId); - switch (gTasks[taskId].data[0]) + switch (gTasks[taskId].tState) { case 0: if (Rfu.playerCount) { LocalLinkPlayerToBlock(); SendBlock(0, gBlockSendBuffer, sizeof(struct LinkPlayerBlock)); - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; } break; case 1: if (IsLinkTaskFinished()) - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; break; case 2: if (GetBlockReceivedStatus() & 1) @@ -1937,14 +1961,14 @@ static void sub_8010D0C(u8 taskId) static void RfuCheckErrorStatus(void) { - if (Rfu.errorState == 1 && lman.childClockSlave_flag == 0) + if (Rfu.errorState == RFU_ERROR_STATE_1 && lman.childClockSlave_flag == 0) { if (gMain.callback2 == c2_mystery_gift_e_reader_run || lman.init_param->mboot_flag) gWirelessCommType = 2; SetMainCallback2(CB2_LinkError); gMain.savedCallback = CB2_LinkError; BufferLinkErrorInfo((Rfu.linkmanMsg << 16) | (Rfu.unk_10 << 8) | Rfu.unk_12, Rfu.recvQueue.count, Rfu.sendQueue.count, RfuGetStatus() == RFU_STATUS_CONNECTION_ERROR); - Rfu.errorState = 2; + Rfu.errorState = RFU_ERROR_STATE_2; CloseLink(); } else if (Rfu.sendQueue.full == TRUE || Rfu.recvQueue.full == TRUE) @@ -1956,9 +1980,9 @@ static void RfuCheckErrorStatus(void) } } -static void rfu_REQ_recvData_then_sendData(void) +static void RfuMain1_UnionRoom(void) { - if (lman.parent_child == 1) + if (lman.parent_child == MODE_PARENT) { rfu_REQ_recvData(); rfu_waitREQComplete(); @@ -1977,13 +2001,13 @@ bool32 RfuMain1(void) switch (Rfu.parentChild) { case MODE_PARENT: - sub_800F0F8(); + RfuMain1_Parent(); break; case MODE_CHILD: - retval = RfuProcessEnqueuedRecvBlock(); + retval = RfuMain1_Child(); break; case MODE_P_C_SWITCH: - rfu_REQ_recvData_then_sendData(); + RfuMain1_UnionRoom(); break; } } @@ -1997,7 +2021,7 @@ bool32 RfuMain2(void) if (!Rfu.isShuttingDown) { if (Rfu.parentChild == MODE_PARENT) - retval = sub_800F1E0(); + retval = RfuMain2_Parent(); RfuCheckErrorStatus(); } return retval; @@ -2032,95 +2056,95 @@ void SetTradeBoardRegisteredMonInfo(u32 type, u32 species, u32 level) gHostRFUtgtGnameBuffer.level = level; } -u8 sub_801100C(s32 a0) +u8 GetLinkPlayerInfoFlags(s32 playerId) { u8 retval = 0x80; - retval |= (gLinkPlayers[a0].gender << 3); - retval |= (gLinkPlayers[a0].trainerId & 7); + retval |= (gLinkPlayers[playerId].gender << 3); + retval |= (gLinkPlayers[playerId].trainerId & 7); return retval; } -void sub_801103C(void) +void GetOtherPlayersInfoFlags(void) { - struct GFtgtGname *r5 = &gHostRFUtgtGnameBuffer; + struct GFtgtGname *gname = &gHostRFUtgtGnameBuffer; s32 i; for (i = 1; i < GetLinkPlayerCount(); i++) - r5->child_sprite_gender[i - 1] = sub_801100C(i); + gname->child_sprite_gender[i - 1] = GetLinkPlayerInfoFlags(i); } void UpdateGameData_GroupLockedIn(bool8 started) { gHostRFUtgtGnameBuffer.started = started; - rfu_REQ_configGameData(0, 2, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer); + rfu_REQ_configGameData(0, RFU_SERIAL_A, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer); } void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 started) { if (activity != ACTIVITY_NONE) SetHostRFUtgtGname(activity, flags, started); - rfu_REQ_configGameData(0, 2, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer); + rfu_REQ_configGameData(0, RFU_SERIAL_A, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer); } -void sub_80110B8(u32 a0) +void SetUnionRoomChatPlayerData(u32 numPlayers) { s32 i; u32 numConnectedChildren; u32 child_sprite_genders; - s32 r8; + s32 slots; if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) { numConnectedChildren = 0; child_sprite_genders = 0; - r8 = Rfu.unk_ce2 ^ Rfu.unk_ce3; + slots = Rfu.unk_ce2 ^ Rfu.disconnectSlots; for (i = 0; i < 4; i++) { - if ((r8 >> i) & 1) + if ((slots >> i) & 1) { child_sprite_genders |= ((0x80 | ((gLinkPlayers[Rfu.linkPlayerIdx[i]].gender & 1) << 3) | (gLinkPlayers[Rfu.linkPlayerIdx[i]].trainerId & 7)) << (numConnectedChildren << 3)); numConnectedChildren++; - if (numConnectedChildren == a0 - 1) + if (numConnectedChildren == numPlayers - 1) break; } } - UpdateGameData_SetActivity((ACTIVITY_CHAT | IN_UNION_ROOM), child_sprite_genders, FALSE); + UpdateGameData_SetActivity(ACTIVITY_CHAT | IN_UNION_ROOM, child_sprite_genders, FALSE); } } void GetLinkmanErrorParams(u32 msg) { - if (Rfu.errorState == 0) + if (Rfu.errorState == RFU_ERROR_STATE_NONE) { Rfu.unk_10 = lman.param[0]; Rfu.unk_12 = lman.param[1]; Rfu.linkmanMsg = msg; - Rfu.errorState = 1; + Rfu.errorState = RFU_ERROR_STATE_1; } } static void ResetErrorState(void) { - Rfu.errorState = 0; + Rfu.errorState = RFU_ERROR_STATE_NONE; } -void sub_80111B0(bool32 a0) +void RfuSetIgnoreError(bool32 enable) { - if (!a0) - Rfu.errorState = 0; + if (!enable) + Rfu.errorState = RFU_ERROR_STATE_NONE; else - Rfu.errorState = 4; + Rfu.errorState = RFU_ERROR_STATE_IGNORE; } -static void sub_80111DC(void) +static void DisconnectNewChild(void) { - sub_8011E94(lman.acceptSlot_flag, 1); + SendDisconnectCommand(lman.acceptSlot_flag, RFU_DISCONNECT_ERROR); Rfu.callback = NULL; } -static void sub_80111FC(void) +static void StartDisconnectNewChild(void) { - Rfu.callback = sub_80111DC; + Rfu.callback = DisconnectNewChild; } static void sub_801120C(u8 msg, u8 paramCount) @@ -2145,7 +2169,7 @@ static void sub_801120C(u8 msg, u8 paramCount) { Rfu.partnerSendStatuses[i] = RFU_STATUS_OK; Rfu.partnerRecvStatuses[i] = RFU_STATUS_OK; - rfu_setRecvBuffer(TYPE_NI, i, &Rfu.partnerRecvStatuses[i], 1); + rfu_setRecvBuffer(TYPE_NI, i, &Rfu.partnerRecvStatuses[i], sizeof(Rfu.partnerRecvStatuses[0])); } else { @@ -2186,7 +2210,7 @@ static void sub_801120C(u8 msg, u8 paramCount) if (Rfu.unk_ce2 == 0) GetLinkmanErrorParams(msg); else - sub_80111FC(); + StartDisconnectNewChild(); } RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; @@ -2231,10 +2255,10 @@ void sub_8011404(u8 msg, u8 unused1) break; case LMAN_MSG_CHILD_NAME_SEND_COMPLETED: Rfu.state = RFUSTATE_CHILD_TRY_JOIN; - Rfu.unk_c85 = 0; + Rfu.unk_c85 = RFU_STATUS_OK; Rfu.recvStatus = RFU_STATUS_OK; - rfu_setRecvBuffer(TYPE_NI, Rfu.childSlot, &Rfu.recvStatus, 1); - rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, 70); + rfu_setRecvBuffer(TYPE_NI, Rfu.childSlot, &Rfu.recvStatus, sizeof(Rfu.recvStatus)); + rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, sizeof(Rfu.unk_c3f)); break; case LMAN_MSG_CHILD_NAME_SEND_FAILED_AND_DISCONNECTED: RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); @@ -2260,7 +2284,7 @@ void sub_8011404(u8 msg, u8 unused1) Rfu.linkLossRecoveryState = 3; Rfu.linkRecovered = TRUE; break; - case 0x34: + case 0x34: // ? Not a valid LMAN_MSG value break; case LMAN_MSG_RFU_POWER_DOWN: case LMAN_MSG_MANAGER_STOPPED: @@ -2327,13 +2351,13 @@ static void sub_8011674(u8 msg, u8 paramCount) RfuSetStatus(RFU_STATUS_NEW_CHILD_DETECTED, 0); break; case LMAN_MSG_NEW_CHILD_CONNECT_ACCEPTED: - if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM) && Rfu.unk_cd9 == 0) + if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM) && !Rfu.stopNewConnections) { u8 idx = GetNewChildrenInUnionRoomChat(lman.param[0]); if (idx != 0) { r1 = 1 << sub_800E87C(idx); - if (Rfu.unk_ce6 == 0 && Rfu.unk_ce8 == 0) + if (Rfu.unk_ce6 == 0 && !Rfu.unk_ce8) { Rfu.unk_ce5 = r1; Rfu.unk_ce6 |= (r1 ^ idx); @@ -2346,8 +2370,8 @@ static void sub_8011674(u8 msg, u8 paramCount) } if (idx != lman.param[0]) { - Rfu.unk_ce3 |= (idx ^ lman.param[0]); - Rfu.unk_ce4 = 2; + Rfu.disconnectSlots |= (idx ^ lman.param[0]); + Rfu.disconnectMode = RFU_DISCONNECT_NORMAL; } } else if (GetHostRFUtgtGname()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM)) @@ -2382,9 +2406,9 @@ static void sub_8011674(u8 msg, u8 paramCount) break; case LMAN_MSG_CONNECT_PARENT_FAILED: Rfu.state = RFUSTATE_18; - if (Rfu.unk_ccf < 2) + if (Rfu.connectParentFailures < 2) { - Rfu.unk_ccf++; + Rfu.connectParentFailures++; CreateTask(sub_801209C, 2); } else @@ -2395,7 +2419,7 @@ static void sub_8011674(u8 msg, u8 paramCount) case LMAN_MSG_CHILD_NAME_SEND_COMPLETED: Rfu.state = RFUSTATE_13; RfuSetStatus(RFU_STATUS_CHILD_SEND_COMPLETE, 0); - rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, 70); + rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, sizeof(Rfu.unk_c3f)); break; case LMAN_MSG_CHILD_NAME_SEND_FAILED_AND_DISCONNECTED: RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); @@ -2422,10 +2446,10 @@ static void sub_8011674(u8 msg, u8 paramCount) if (Rfu.unk_ce2 == 0) GetLinkmanErrorParams(msg); else - sub_80111FC(); + StartDisconnectNewChild(); } } - else if (Rfu.unk_ce4 != 2 && gReceivedRemoteLinkPlayers == 1) + else if (Rfu.disconnectMode != RFU_DISCONNECT_NORMAL && gReceivedRemoteLinkPlayers == 1) { GetLinkmanErrorParams(msg); rfu_LMAN_stopManager(0); @@ -2439,7 +2463,7 @@ static void sub_8011674(u8 msg, u8 paramCount) RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; case LMAN_MSG_LINK_DISCONNECTED_BY_USER: - Rfu.unk_ce3 = 0; + Rfu.disconnectSlots = 0; break; case LMAN_MSG_RFU_POWER_DOWN: case LMAN_MSG_MANAGER_STOPPED: @@ -2461,9 +2485,9 @@ static void sub_8011674(u8 msg, u8 paramCount) } } -void sub_8011A50(void) +void RfuSetNormalDisconnectMode(void) { - Rfu.unk_ce4 = 2; + Rfu.disconnectMode = RFU_DISCONNECT_NORMAL; } void RfuSetStatus(u8 status, u16 msg) @@ -2640,57 +2664,65 @@ void RequestDisconnectSlotByTrainerNameAndId(const u8 *name, u16 id) RfuReqDisconnectSlot(1 << var); } -void sub_8011DE0(u32 a0) +void Rfu_DisconnectPlayerById(u32 playerIdx) { - if (a0 != 0) + if (playerIdx != 0) { s32 i; - u8 var = 0; + u8 toDisconnect = 0; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.linkPlayerIdx[i] == a0 && (Rfu.unk_ce2 >> i) & 1) - var |= 1 << i; + if (Rfu.linkPlayerIdx[i] == playerIdx && (Rfu.unk_ce2 >> i) & 1) + toDisconnect |= 1 << i; } - if (var) - sub_8011E94(var, 2); + if (toDisconnect) + SendDisconnectCommand(toDisconnect, RFU_DISCONNECT_NORMAL); } } -static void sub_8011E2C(u8 taskId) +#define tDisconnectPlayers data[0] +#define tDisconnectMode data[1] + +static void Task_SendDisconnectCommand(u8 taskId) { - if (gSendCmd[0] == 0 && Rfu.unk_ce8 == 0) + if (gSendCmd[0] == 0 && !Rfu.unk_ce8) { - RfuPrepareSendBuffer(RFUCMD_0xED00); - gSendCmd[1] = gTasks[taskId].data[0]; - gSendCmd[2] = gTasks[taskId].data[1]; - Rfu.playerCount -= sUnknown_082ED695[gTasks[taskId].data[0]]; + RfuPrepareSendBuffer(RFUCMD_DISCONNECT); + gSendCmd[1] = gTasks[taskId].tDisconnectPlayers; + gSendCmd[2] = gTasks[taskId].tDisconnectMode; + Rfu.playerCount -= sPlayerBitsToCount[gTasks[taskId].tDisconnectPlayers]; gSendCmd[3] = Rfu.playerCount; DestroyTask(taskId); } } -static void sub_8011E94(u32 a0, u32 a1) +static void SendDisconnectCommand(u32 playersToDisconnect, u32 disconnectMode) { - u8 taskId = FindTaskIdByFunc(sub_8011E2C); + u8 taskId = FindTaskIdByFunc(Task_SendDisconnectCommand); if (taskId == TASK_NONE) { - taskId = CreateTask(sub_8011E2C, 5); - gTasks[taskId].data[0] = a0; + taskId = CreateTask(Task_SendDisconnectCommand, 5); + gTasks[taskId].tDisconnectPlayers = playersToDisconnect; } else { - gTasks[taskId].data[0] |= a0; + // Task is already active, just add the new players to disconnect + gTasks[taskId].tDisconnectPlayers |= playersToDisconnect; } - gTasks[taskId].data[1] = a1; + gTasks[taskId].tDisconnectMode = disconnectMode; } +#undef tDisconnectMode + +#define tTime data[15] + static void Task_RfuReconnectWithParent(u8 taskId) { s16 *data = gTasks[taskId].data; - if (sub_800EE94()) + if (CanTryReconnectParent()) { u8 id = GetPartnerIndexByNameAndTrainerID((u8*)data, ReadU16(&data[8])); if (id != 0xFF) @@ -2698,38 +2730,42 @@ static void Task_RfuReconnectWithParent(u8 taskId) if (gRfuLinkStatus->partner[id].slot != 0xFF) { Rfu.unk_c3d = id; - if (IsParentSuccessfullyReconnected()) + if (TryReconnectParent()) DestroyTask(taskId); } else if (GetHostRFUtgtGname()->activity == ACTIVITY_WONDER_CARD2 || GetHostRFUtgtGname()->activity == ACTIVITY_WONDER_NEWS2) { - data[15]++; + tTime++; } else { + // Error, unable to reconnect to parent RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000); DestroyTask(taskId); } } else { - data[15]++; + tTime++; Rfu.unk_c3d = id; } } else { - data[15]++; + tTime++; } - if (data[15] > 240) + if (tTime > 240) { + // Timeout error RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000); DestroyTask(taskId); } } +#undef tTime + void CreateTask_RfuReconnectWithParent(const u8 *name, u16 trainerId) { u8 taskId; @@ -2742,19 +2778,22 @@ void CreateTask_RfuReconnectWithParent(const u8 *name, u16 trainerId) data[8] = trainerId; } -static bool32 ShouldRejectPartnerConnectionBasedOnActivity(s16 activity, struct GFtgtGname *partnerGname) +static bool32 IsPartnerActivityIncompatible(s16 activity, struct GFtgtGname *partnerGname) { if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) { + // Host trying to chat, but partner isn't if (partnerGname->activity != (ACTIVITY_CHAT | IN_UNION_ROOM)) return TRUE; } else if (partnerGname->activity != IN_UNION_ROOM) { + // Partner not in union room return TRUE; } else if (activity == (ACTIVITY_TRADE | IN_UNION_ROOM)) { + // Trying to trade, make sure trade matches request struct GFtgtGname *tradeGname = &Rfu.unk_10A; if (tradeGname->species == SPECIES_EGG) { @@ -2774,26 +2813,30 @@ static bool32 ShouldRejectPartnerConnectionBasedOnActivity(s16 activity, struct return FALSE; } +#define tTime data[0] +#define tActivity data[1] + static void sub_801209C(u8 taskId) { if (Rfu.status == RFU_STATUS_NEW_CHILD_DETECTED) DestroyTask(taskId); - if (++gTasks[taskId].data[0] > 300) + if (++gTasks[taskId].tTime > 300) { + // Timeout error RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000); DestroyTask(taskId); } - if (Rfu.parentId != 0 && lman.parent_child == 0) + if (Rfu.parentId != 0 && lman.parent_child == MODE_CHILD) { u16 trainerId = ReadU16(Rfu.unk_10A.unk_00.playerTrainerId); u8 id = GetPartnerIndexByNameAndTrainerID(Rfu.playerName, trainerId); if (id != 0xFF) { - if (!ShouldRejectPartnerConnectionBasedOnActivity(gTasks[taskId].data[1], (void *)gRfuLinkStatus->partner[id].gname)) + if (!IsPartnerActivityIncompatible(gTasks[taskId].tActivity, (void *)gRfuLinkStatus->partner[id].gname)) { - if (gRfuLinkStatus->partner[id].slot != 0xFF && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[id].id, 0x5A)) + if (gRfuLinkStatus->partner[id].slot != 0xFF && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[id].id, 90)) { Rfu.state = RFUSTATE_10; DestroyTask(taskId); @@ -2801,6 +2844,7 @@ static void sub_801209C(u8 taskId) } else { + // Incompatible partner activity RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000); DestroyTask(taskId); } @@ -2808,27 +2852,27 @@ static void sub_801209C(u8 taskId) } } -void sub_8012188(const u8 *name, struct GFtgtGname *structPtr, u8 activity) +void sub_8012188(const u8 *name, struct GFtgtGname *gname, u8 activity) { u8 taskId, taskId2; - Rfu.unk_ccf = 0; + Rfu.connectParentFailures = 0; Rfu.status = RFU_STATUS_OK; StringCopy(Rfu.playerName, name); - memcpy(&Rfu.unk_10A, structPtr, RFU_GAME_NAME_LENGTH); + memcpy(&Rfu.unk_10A, gname, RFU_GAME_NAME_LENGTH); rfu_LMAN_forceChangeSP(); taskId = CreateTask(sub_801209C, 2); - gTasks[taskId].data[1] = activity; + gTasks[taskId].tActivity = activity; taskId2 = FindTaskIdByFunc(Task_LinkRfu_UnionRoomListen); if (activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) { if (taskId2 != TASK_NONE) - gTasks[taskId2].data[7] = 1; + gTasks[taskId2].tData7 = TRUE; } else { if (taskId2 != TASK_NONE) - gTasks[taskId2].data[7] = 0; + gTasks[taskId2].tData7 = FALSE; } } @@ -2843,7 +2887,6 @@ bool8 IsRfuRecoveringFromLinkLoss(void) bool32 IsRfuCommunicatingWithAllChildren(void) { s32 i; - for (i = 0; i < RFU_CHILD_MAX; i++) { // RFU_STATUS_OK is the default status. @@ -2859,7 +2902,6 @@ bool32 IsRfuCommunicatingWithAllChildren(void) static void Debug_PrintEmpty(void) { s32 i; - for (i = 0; i < 20; i++) Debug_PrintString(sASCII_30Spaces, 0, i); } @@ -2867,10 +2909,9 @@ static void Debug_PrintEmpty(void) static void Debug_PrintStatus(void) { s32 i, j; - - Debug_PrintNum(GetBlockReceivedStatus(), 0x1C, 0x13, 2); - Debug_PrintNum(gRfuLinkStatus->connSlotFlag, 0x14, 1, 1); - Debug_PrintNum(gRfuLinkStatus->linkLossSlotFlag, 0x17, 1, 1); + Debug_PrintNum(GetBlockReceivedStatus(), 28, 19, 2); + Debug_PrintNum(gRfuLinkStatus->connSlotFlag, 20, 1, 1); + Debug_PrintNum(gRfuLinkStatus->linkLossSlotFlag, 23, 1, 1); if (Rfu.parentChild == MODE_PARENT) { for (i = 0; i < RFU_CHILD_MAX; i++) @@ -2879,17 +2920,15 @@ static void Debug_PrintStatus(void) { Debug_PrintNum(gRfuLinkStatus->partner[i].serialNo, 1, i + 3, 4); Debug_PrintString((void*)gRfuLinkStatus->partner[i].gname, 6, i + 3); - Debug_PrintString(gRfuLinkStatus->partner[i].uname, 0x16, i + 3); + Debug_PrintString(gRfuLinkStatus->partner[i].uname, 22, i + 3); } } for (i = 0; i < RFU_CHILD_MAX; i++) { - for (j = 0; j < (int)ARRAY_COUNT(Rfu.unk_14[0]); j++) - { - Debug_PrintNum(Rfu.unk_14[i][j], j * 2, i + 11, 2); - } + for (j = 0; j < CHILD_DATA_LENGTH; j++) + Debug_PrintNum(Rfu.childRecvBuffer[i][j], j * 2, i + 11, 2); } - Debug_PrintString(sASCII_NowSlot, 1, 0xF); + Debug_PrintString(sASCII_NowSlot, 1, 15); } else if (gRfuLinkStatus->connSlotFlag != 0 && gRfuLinkStatus->getNameFlag != 0) { @@ -2897,11 +2936,11 @@ static void Debug_PrintStatus(void) { Debug_PrintNum(0, 1, i + 3, 4); Debug_PrintString(sASCII_15Spaces, 6, i + 3); - Debug_PrintString(sASCII_8Spaces, 0x16, i + 3); + Debug_PrintString(sASCII_8Spaces, 22, i + 3); } Debug_PrintNum(gRfuLinkStatus->partner[Rfu.childSlot].serialNo, 1, 3, 4); Debug_PrintString((void*)gRfuLinkStatus->partner[Rfu.childSlot].gname, 6, 3); - Debug_PrintString(gRfuLinkStatus->partner[Rfu.childSlot].uname, 0x16, 3); + Debug_PrintString(gRfuLinkStatus->partner[Rfu.childSlot].uname, 22, 3); } else { @@ -2911,14 +2950,14 @@ static void Debug_PrintStatus(void) { Debug_PrintNum(gRfuLinkStatus->partner[i].serialNo, 1, i + 3, 4); Debug_PrintNum(gRfuLinkStatus->partner[i].id, 6, i + 3, 4); - Debug_PrintString(gRfuLinkStatus->partner[i].uname, 0x16, i + 3); + Debug_PrintString(gRfuLinkStatus->partner[i].uname, 22, i + 3); } } for (; i < RFU_CHILD_MAX; i++) { Debug_PrintNum(0, 1, i + 3, 4); Debug_PrintString(sASCII_15Spaces, 6, i + 3); - Debug_PrintString(sASCII_8Spaces, 0x16, i + 3); + Debug_PrintString(sASCII_8Spaces, 22, i + 3); } } } diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index f471678737..08678c40f4 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -719,7 +719,7 @@ bool8 LinkRfu_GetNameIfCompatible(struct GFtgtGname *buff1, u8 *buff2, u8 idx) bool8 LinkRfu_GetNameIfSerial7F7D(struct GFtgtGname *buff1, u8 *buff2, u8 idx) { bool8 retVal = FALSE; - if (gRfuLinkStatus->partner[idx].serialNo == RFU_SERIAL_7F7D) + if (gRfuLinkStatus->partner[idx].serialNo == RFU_SERIAL_B) { memcpy(buff1, gRfuLinkStatus->partner[idx].gname, RFU_GAME_NAME_LENGTH); memcpy(buff2, gRfuLinkStatus->partner[idx].uname, PLAYER_NAME_LENGTH + 1); diff --git a/src/load_save.c b/src/load_save.c index eec8f91aea..0112f2a8f1 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -71,6 +71,7 @@ void ClearSav1(void) CpuFill16(0, &gSaveblock1, sizeof(struct SaveBlock1) + sizeof(gSaveblock1_DMA)); } +// Offset is the sum of the trainer id bytes void SetSaveBlocksPointers(u16 offset) { struct SaveBlock1** sav1_LocalVar = &gSaveBlock1Ptr; diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index 5c678ed8c4..777939f08c 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3945,7 +3945,7 @@ static bool32 RecvPacket_MonInfo(int multiplayerId, struct PokemonJump_MonInfo * { struct MonInfoPacket packet; - if ((gRecvCmds[multiplayerId][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[multiplayerId][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) return FALSE; memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet)); @@ -4010,7 +4010,7 @@ static bool32 RecvPacket_LeaderState(struct PokemonJump_Player *player, struct P { struct LeaderStatePacket packet; - if ((gRecvCmds[0][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[0][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) return FALSE; memcpy(&packet, &gRecvCmds[0][1], sizeof(packet)); @@ -4057,7 +4057,7 @@ static bool32 RecvPacket_MemberStateToLeader(struct PokemonJump_Player *player, { struct MemberStatePacket packet; - if ((gRecvCmds[multiplayerId][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[multiplayerId][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) return FALSE; memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet)); @@ -4078,7 +4078,7 @@ static bool32 RecvPacket_MemberStateToMember(struct PokemonJump_Player *player, { struct MemberStatePacket packet; - if ((gRecvCmds[multiplayerId][0] & 0xFF00) != RFUCMD_SEND_PACKET) + if ((gRecvCmds[multiplayerId][0] & RFUCMD_MASK) != RFUCMD_SEND_PACKET) return FALSE; memcpy(&packet, &gRecvCmds[multiplayerId][1], sizeof(packet)); diff --git a/src/record_mixing.c b/src/record_mixing.c index 2f551436e0..c01f3421c9 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -981,7 +981,7 @@ static void Task_DoRecordMixing(u8 taskId) // Mixing Emerald records. case 6: - if (!sub_801048C(FALSE)) + if (!Rfu_SetLinkRecovery(FALSE)) { CreateTask(Task_LinkSave, 5); task->data[0]++; @@ -992,7 +992,7 @@ static void Task_DoRecordMixing(u8 taskId) { if (gWirelessCommType) { - sub_801048C(TRUE); + Rfu_SetLinkRecovery(TRUE); task->data[0] = 8; } else diff --git a/src/reset_save_heap.c b/src/reload_save.c similarity index 75% rename from src/reset_save_heap.c rename to src/reload_save.c index 577a48b0d8..cdbb2f227d 100644 --- a/src/reset_save_heap.c +++ b/src/reload_save.c @@ -8,17 +8,17 @@ #include "overworld.h" #include "malloc.h" -void sub_81700F8(void) +// Reloads the game, continuing from the point of the last save +// Used to gracefully exit after a link connection error +void ReloadSave(void) { - u16 imeBackup; - - imeBackup = REG_IME; + u16 imeBackup = REG_IME; REG_IME = 0; RegisterRamReset(RESET_EWRAM); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_FORCED_BLANK); REG_IME = imeBackup; gMain.inBattle = FALSE; - SetSaveBlocksPointers(sub_815355C()); + SetSaveBlocksPointers(GetSaveBlocksPointersBaseOffset()); ResetMenuAndMonGlobals(); Save_ResetSaveCounters(); Save_LoadGameData(SAVE_NORMAL); diff --git a/src/save.c b/src/save.c index 52301df036..a803afedfc 100644 --- a/src/save.c +++ b/src/save.c @@ -126,16 +126,16 @@ static bool32 SetDamagedSectorBits(u8 op, u8 bit) return retVal; } -static u8 SaveWriteToFlash(u16 a1, const struct SaveSectionLocation *location) +static u8 SaveWriteToFlash(u16 sectorId, const struct SaveSectionLocation *location) { u32 status; u16 i; gFastSaveSection = &gSaveDataBuffer; - if (a1 != 0xFFFF) // for link + if (sectorId != 0xFFFF) // for link { - status = HandleWriteSector(a1, location); + status = HandleWriteSector(sectorId, location); } else { @@ -169,7 +169,7 @@ static u8 HandleWriteSector(u16 sectorId, const struct SaveSectionLocation *loca sector = sectorId + gLastWrittenSector; sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2); + sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); data = location[sectorId].data; size = location[sectorId].size; @@ -292,7 +292,7 @@ static u8 ClearSaveData_2(u16 sectorId, const struct SaveSectionLocation *locati sector = sectorId + gLastWrittenSector; sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2); + sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); data = location[sectorId].data; size = location[sectorId].size; @@ -362,7 +362,7 @@ static u8 sav12_xor_get(u16 sectorId, const struct SaveSectionLocation *location sector = sectorId + gLastWrittenSector; // no sub 1? sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2); + sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25)) { @@ -385,7 +385,7 @@ static u8 sub_8152CAC(u16 sectorId, const struct SaveSectionLocation *location) sector = sectorId + gLastWrittenSector - 1; sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2); + sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), ((u8 *)gFastSaveSection)[sizeof(struct UnkSaveSection)])) { @@ -408,7 +408,7 @@ static u8 sub_8152D44(u16 sectorId, const struct SaveSectionLocation *location) sector = sectorId + gLastWrittenSector - 1; // no sub 1? sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2); + sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25)) { @@ -446,12 +446,12 @@ static u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location) { u16 i; u16 checksum; - u16 v3 = SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2); + u16 slotOffset = SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); u16 id; for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++) { - DoReadFlashWholeSection(i + v3, gFastSaveSection); + DoReadFlashWholeSection(i + slotOffset, gFastSaveSection); id = gFastSaveSection->id; if (id == 0) gLastWrittenSector = i; @@ -824,27 +824,29 @@ u8 Save_LoadGameData(u8 saveType) return status; } -u16 sub_815355C(void) +u16 GetSaveBlocksPointersBaseOffset(void) { - u16 i, v3; + u16 i, slotOffset; struct SaveSection* savSection; savSection = gFastSaveSection = &gSaveDataBuffer; if (gFlashMemoryPresent != TRUE) - return SAVE_STATUS_EMPTY; + return 0; UpdateSaveAddresses(); GetSaveValidStatus(gRamSaveSectionLocations); - v3 = SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % 2); + slotOffset = SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++) { - DoReadFlashWholeSection(i + v3, gFastSaveSection); - if (gFastSaveSection->id == 0) - return savSection->data[10] + - savSection->data[11] + - savSection->data[12] + - savSection->data[13]; + DoReadFlashWholeSection(i + slotOffset, gFastSaveSection); + + // Base offset for SaveBlock2 is calculated using the trainer id + if (gFastSaveSection->id == SECTOR_ID_SAVEBLOCK2) + return savSection->data[offsetof(struct SaveBlock2, playerTrainerId[0])] + + savSection->data[offsetof(struct SaveBlock2, playerTrainerId[1])] + + savSection->data[offsetof(struct SaveBlock2, playerTrainerId[2])] + + savSection->data[offsetof(struct SaveBlock2, playerTrainerId[3])]; } - return SAVE_STATUS_EMPTY; + return 0; } u32 TryReadSpecialSaveSection(u8 sector, u8* dst) diff --git a/src/trade.c b/src/trade.c index da994011b7..f0a31b5cba 100644 --- a/src/trade.c +++ b/src/trade.c @@ -459,7 +459,7 @@ static void CB2_CreateTradeMenu(void) sTradeMenuData->timer = 0; if (gWirelessCommType) { - sub_801048C(TRUE); + Rfu_SetLinkRecovery(TRUE); SetLinkStandbyCallback(); } } @@ -1709,7 +1709,7 @@ static void CancelTrade_2(void) static void LinkTradeWaitForQueue(void) { - if (!sub_801048C(FALSE) && GetNumQueuedActions() == 0) + if (!Rfu_SetLinkRecovery(FALSE) && GetNumQueuedActions() == 0) { SetLinkStandbyCallback(); sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_START_LINK_TRADE; diff --git a/src/union_room.c b/src/union_room.c index c2bc47aa4c..46957db5e4 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -680,7 +680,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) if (gReceivedRemoteLinkPlayers != 0) { if (IsActivityWithVariableGroupSize(gPlayerCurrActivity)) - sub_801103C(); + GetOtherPlayersInfoFlags(); UpdateGameData_GroupLockedIn(TRUE); CreateTask_RunScriptAndFadeToActivity(); Leader_DestroyResources(data); @@ -1291,7 +1291,7 @@ static void Task_ListenToWireless(u8 taskId) SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_JoinGroup(); - sub_80111B0(TRUE); + RfuSetIgnoreError(TRUE); data->field_4 = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); data->field_0 = AllocZeroed(16 * sizeof(struct UnkStruct_x20)); data->state = 2; @@ -2894,7 +2894,7 @@ static void Task_RunUnionRoom(u8 taskId) ReceiveUnionRoomActivityPacket(uroom); if (UnionRoom_HandleContactFromOtherPlayer(uroom) && JOY_NEW(B_BUTTON)) { - sub_8011DE0(1); + Rfu_DisconnectPlayerById(1); StringCopy(gStringVar4, sText_ChatEnded); uroom->state = UR_STATE_CANCEL_REQUEST_PRINT_MSG; } @@ -2908,9 +2908,9 @@ static void Task_RunUnionRoom(u8 taskId) case 0: // ACCEPT uroom->playerSendBuffer[0] = ACTIVITY_ACCEPT | IN_UNION_ROOM; if (gPlayerCurrActivity == (ACTIVITY_CHAT | IN_UNION_ROOM)) - UpdateGameData_SetActivity(gPlayerCurrActivity | IN_UNION_ROOM, sub_801100C(1), FALSE); + UpdateGameData_SetActivity(gPlayerCurrActivity | IN_UNION_ROOM, GetLinkPlayerInfoFlags(1), FALSE); else - UpdateGameData_SetActivity(gPlayerCurrActivity | IN_UNION_ROOM, sub_801100C(1), TRUE); + UpdateGameData_SetActivity(gPlayerCurrActivity | IN_UNION_ROOM, GetLinkPlayerInfoFlags(1), TRUE); uroom->field_8->arr[0].field_1B = 0; taskData[3] = 0; @@ -3213,7 +3213,7 @@ void SetUsingUnionRoomStartMenu(void) static void ReceiveUnionRoomActivityPacket(struct WirelessLink_URoom *data) { - if (gRecvCmds[1][1] != 0 && (gRecvCmds[1][0] & 0xFF00) == 0x2F00) + if (gRecvCmds[1][1] != 0 && (gRecvCmds[1][0] & RFUCMD_MASK) == RFUCMD_SEND_PACKET) { data->recvActivityRequest[0] = gRecvCmds[1][1]; if (gRecvCmds[1][1] == (ACTIVITY_TRADE | IN_UNION_ROOM)) @@ -3282,7 +3282,7 @@ static void Task_InitUnionRoom(u8 taskId) SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_EnterUnionRoom(); - sub_80111B0(TRUE); + RfuSetIgnoreError(TRUE); data->state = 2; break; case 2: @@ -3877,32 +3877,22 @@ static bool32 AreUnionRoomPlayerGnamesDifferent(struct WirelessGnameUnamePair *p s32 i; if (pair1->gname.activity != pair2->gname.activity) - { return TRUE; - } if (pair1->gname.started != pair2->gname.started) - { return TRUE; - } for (i = 0; i < RFU_CHILD_MAX; i++) { if (pair1->gname.child_sprite_gender[i] != pair2->gname.child_sprite_gender[i]) - { return TRUE; - } } if (pair1->gname.species != pair2->gname.species) - { return TRUE; - } if (pair1->gname.type != pair2->gname.type) - { return TRUE; - } return FALSE; } @@ -4246,7 +4236,7 @@ static s32 GetChatLeaderActionRequestMessage(u8 *dst, u32 gender, u16 *activityD StringCopy(uroom->activityRequestStrbufs[1], gSpeciesNames[sUnionRoomTrade.playerSpecies]); for (i = 0; i < RFU_CHILD_MAX; i++) { - if (gRfuLinkStatus->partner[i].serialNo == 2) + if (gRfuLinkStatus->partner[i].serialNo == RFU_SERIAL_A) { ConvertIntToDecimalStringN(uroom->activityRequestStrbufs[2], activityData[2], STR_CONV_MODE_LEFT_ALIGN, 3); StringCopy(uroom->activityRequestStrbufs[3], gSpeciesNames[activityData[1]]); diff --git a/src/union_room_chat.c b/src/union_room_chat.c index 8e9f78280c..903d00bcbf 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -1198,7 +1198,7 @@ static void Chat_AskQuitChatting(void) sChat->funcState = 3; break; case 0: - sub_80104B0(); + Rfu_StopPartnerSearch(); PrepareSendBuffer_Disband(sChat->sendMessageBuffer); sChat->funcState = 4; sChat->tryQuitAgainTimer = 0; @@ -1819,7 +1819,7 @@ static void PrepareSendBuffer_Leave(u8 *buffer) buffer[0] = CHAT_MESSAGE_LEAVE; StringCopy(&buffer[1], gSaveBlock2Ptr->playerName); buffer[1 + (PLAYER_NAME_LENGTH + 1)] = sChat->multiplayerId; - sub_8011A50(); + RfuSetNormalDisconnectMode(); } static void PrepareSendBuffer_Drop(u8 *buffer) @@ -2079,13 +2079,12 @@ static void Task_ReceiveChatMessage(u8 taskId) { if (GetLinkPlayerCount() == 2) { - sub_80104B0(); + Rfu_StopPartnerSearch(); sChat->exitType = 1; DestroyTask(taskId); return; } - - sub_8011DE0(tCurrLinkPlayer); + Rfu_DisconnectPlayerById(tCurrLinkPlayer); } tState = 3; @@ -2104,7 +2103,7 @@ static void Task_ReceiveChatMessage(u8 taskId) if (!sub_8011A9C()) { if (!sChat->multiplayerId) - sub_80110B8(sChat->linkPlayerCount); + SetUnionRoomChatPlayerData(sChat->linkPlayerCount); tState = 1; } From 6aaf50ee27c175c8e54c7299fdc86d90b0b29187 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 5 Oct 2021 23:38:36 -0400 Subject: [PATCH 038/417] Rename GF Gname, Rfu, finish bulk of Union Room, more link doc --- common_syms/link_rfu_2.txt | 4 +- include/constants/union_room.h | 24 +- include/link_rfu.h | 97 +- include/trade.h | 4 +- include/union_room.h | 98 +- include/union_room_player_avatar.h | 8 +- src/berry_crush.c | 12 +- src/data/union_room.h | 695 +++++----- src/field_player_avatar.c | 32 +- src/librfu_rfu.c | 8 + src/link_rfu_2.c | 1365 ++++++++++---------- src/link_rfu_3.c | 178 ++- src/mystery_gift.c | 52 +- src/overworld.c | 2 +- src/party_menu.c | 4 +- src/pokemon_jump.c | 2 +- src/trade.c | 60 +- src/union_room.c | 1190 +++++++++-------- src/union_room_player_avatar.c | 369 +++--- src/wireless_communication_status_screen.c | 22 +- 20 files changed, 2092 insertions(+), 2134 deletions(-) diff --git a/common_syms/link_rfu_2.txt b/common_syms/link_rfu_2.txt index ac292845ef..4b8f02bad8 100644 --- a/common_syms/link_rfu_2.txt +++ b/common_syms/link_rfu_2.txt @@ -1,2 +1,2 @@ -gf_rfu_REQ_api -Rfu +gRfuAPIBuffer +gRfu diff --git a/include/constants/union_room.h b/include/constants/union_room.h index d867fb3400..6e08c9ebbd 100644 --- a/include/constants/union_room.h +++ b/include/constants/union_room.h @@ -1,7 +1,11 @@ #ifndef GUARD_CONSTANTS_UNION_ROOM_H #define GUARD_CONSTANTS_UNION_ROOM_H -#define MAX_UNION_ROOM_PLAYERS 8 +// The number of possible group leaders visible in the Union Room. +// Note that this is different than the number of people actively +// connected as children via the Wireless Adapter, which cannot +// exceed RFU_CHILD_MAX (4), for a total of 5 including the player. +#define MAX_UNION_ROOM_LEADERS 8 #define UNION_ROOM_SPAWN_NONE 0 #define UNION_ROOM_SPAWN_IN 1 @@ -13,8 +17,8 @@ #define ACTIVITY_BATTLE_MULTI 3 #define ACTIVITY_TRADE 4 #define ACTIVITY_CHAT 5 -#define ACTIVITY_WONDER_CARD 6 -#define ACTIVITY_WONDER_NEWS 7 +#define ACTIVITY_WONDER_CARD_DUP 6 // Duplicates of later WONDER constants +#define ACTIVITY_WONDER_NEWS_DUP 7 // #define ACTIVITY_CARD 8 #define ACTIVITY_POKEMON_JUMP 9 #define ACTIVITY_BERRY_CRUSH 10 @@ -32,9 +36,8 @@ #define ACTIVITY_NPCTALK 19 #define ACTIVITY_PLYRTALK 20 -// Duplicate IDs? -#define ACTIVITY_WONDER_CARD2 21 -#define ACTIVITY_WONDER_NEWS2 22 +#define ACTIVITY_WONDER_CARD 21 +#define ACTIVITY_WONDER_NEWS 22 #define ACTIVITY_CONTEST_COOL 23 #define ACTIVITY_CONTEST_BEAUTY 24 @@ -46,15 +49,6 @@ #define IN_UNION_ROOM (1 << 6) -// Used in UR_AddTextPrinterParameterized -#define UR_COLOR_DKE_WHT_LTE 0 -#define UR_COLOR_RED_WHT_LTR 1 -#define UR_COLOR_GRN_WHT_LTG 2 -#define UR_COLOR_WHT_WHT_LTE 3 -#define UR_COLOR_WHT_DKE_LTE 4 -#define UR_COLOR_GRN_DN6_LTB 5 -#define UR_COLOR_DN5_DN6_LTB 6 - #define LINK_GROUP_SINGLE_BATTLE 0 #define LINK_GROUP_DOUBLE_BATTLE 1 #define LINK_GROUP_MULTI_BATTLE 2 diff --git a/include/link_rfu.h b/include/link_rfu.h index 04f1b7f9ae..eb071618ea 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -20,10 +20,10 @@ #define RFUCMD_DISCONNECT 0xED00 #define RFUCMD_DISCONNECT_PARENT 0xEE00 -#define RFU_SERIAL_A 0x0002 -#define RFU_SERIAL_B 0x7F7D -#define RFU_SERIAL_C 0x0000 -#define RFU_SERIAL_END 0xFFFF +#define RFU_SERIAL_GAME 0x0002 // Serial number for Pokémon game (FRLG or Emerald) +#define RFU_SERIAL_WONDER_DISTRIBUTOR 0x7F7D // Serial number for distributing Wonder Cards / News +#define RFU_SERIAL_UNKNOWN 0x0000 // Unreferenced acceptable serial number. Gamecube? +#define RFU_SERIAL_END 0xFFFF #define RECV_QUEUE_NUM_SLOTS 32 #define RECV_QUEUE_SLOT_LENGTH (14 * MAX_RFU_PLAYERS) @@ -68,8 +68,7 @@ enum { RFU_ERROR_STATE_IGNORE, }; -// RfuTgtData.gname is read as these structs. -struct GFtgtGnameSub +struct RfuGameCompatibilityData { u16 language:4; u16 hasNews:1; @@ -79,24 +78,41 @@ struct GFtgtGnameSub u16 hasNationalDex:1; u16 gameClear:1; u16 version:4; + u16 unused:2; u8 playerTrainerId[2]; }; -struct __attribute__((packed, aligned(2))) GFtgtGname +// This struct is sent via the Wireless Adapter as the game name or "gname" data. +// Gname is only applicable during Wireless Single Game Pak Multiplay, when the +// adapter needs this data for connection. Per the RFU manual, during "normal" +// wireless play (the kind the Pokémon games use) the gname data can be used for +// anything the developers want. This struct is what GF decided to use it for. +// It can be up to 13 bytes in size (RFU_GAME_NAME_LENGTH). +// The player's name is sent separately as the username ("uname"), and does not +// use a struct (gHostRfuUsername). +struct __attribute__((packed, aligned(2))) RfuGameData { - struct GFtgtGnameSub unk_00; - u8 child_sprite_gender[RFU_CHILD_MAX]; // u8 sprite_idx:3; - // u8 gender:1; - // u8 unk_4:3 - // u8 active:1 - u16 species:10; - u16 type:6; + struct RfuGameCompatibilityData compatibility; + u8 partnerInfo[RFU_CHILD_MAX]; + u16 tradeSpecies:10; + u16 tradeType:6; u8 activity:7; - u8 started:1; + u8 startedActivity:1; u8 playerGender:1; - u8 level:7; + u8 tradeLevel:7; u8 padding; -}; // size: RFU_GNAME_SIZE +}; + +// Constants for getting/setting information in 'partnerInfo' of RfuGameData. +// This data is used to determine what the link partners look like from +// the host's perspective. +// Bits 0-2 are a shortened trainerId +// Bit 3 is the player's gender +// Bits 4-6 are unknown/unused +// Bit 7 is an 'active' flag +#define PINFO_TID_MASK 0x7 +#define PINFO_GENDER_SHIFT 3 +#define PINFO_ACTIVE_FLAG (1 << 7) struct RfuBlockSend { @@ -136,7 +152,8 @@ struct RfuBackupQueue /* 0x1e */ vu8 count; }; -struct GFRfuManager +// Stores data needed for the RFU on GF's end +struct RfuManager { /* 0x000 */ void (*callback)(void); /* 0x004 */ u16 state; @@ -151,7 +168,7 @@ struct GFRfuManager /* 0x014 */ u8 childRecvBuffer[RFU_CHILD_MAX][CHILD_DATA_LENGTH]; /* 0x04c */ u8 childSendBuffer[CHILD_DATA_LENGTH]; /* 0x05a */ u8 blockRequestType; - /* 0x05b */ u8 unk_5b; + /* 0x05b */ u8 blockSendAttempts; /* 0x05c */ bool8 blockReceived[MAX_RFU_PLAYERS]; /* 0x061 */ bool8 numBlocksReceived[MAX_RFU_PLAYERS]; /* 0x066 */ u8 idleTaskId; @@ -170,9 +187,9 @@ struct GFRfuManager /* 0x100 */ u16 allReadyNum; /* 0x102 */ u8 unk_102; /* 0x103 */ u8 filler_103[7]; - /* 0x10A */ struct GFtgtGname unk_10A; + /* 0x10A */ struct RfuGameData parent; u8 filler_; - u8 playerName[PLAYER_NAME_LENGTH + 1]; + u8 parentName[RFU_USER_NAME_LENGTH]; /* 0x124 */ struct RfuRecvQueue recvQueue; /* 0x9e8 */ struct RfuSendQueue sendQueue; /* 0xc1c */ struct RfuBackupQueue backupQueue; @@ -180,7 +197,7 @@ struct GFRfuManager /* 0xc3d */ u8 unk_c3d; /* 0xc3e */ vu8 childSlot; /* 0xc3f */ u8 unk_c3f[70]; - /* 0xc85 */ u8 unk_c85; + /* 0xc85 */ u8 leaveGroupStatus; /* 0xc86 */ u8 recvStatus; /* 0xc87 */ u8 recvCmds[5][7][2]; /* 0xccd */ u8 parentId; @@ -198,18 +215,18 @@ struct GFRfuManager /* 0xce2 */ u8 unk_ce2; /* 0xce2 */ u8 disconnectSlots; /* 0xce4 */ u8 disconnectMode; - /* 0xce5 */ u8 unk_ce5; - /* 0xce5 */ u8 unk_ce6; + /* 0xce5 */ u8 nextChildBits; + /* 0xce5 */ u8 newChildQueue; /* 0xce7 */ u8 acceptSlot_flag; /* 0xce8 */ bool8 unk_ce8; - /* 0xce9 */ u8 unk_ce9; + /* 0xce9 */ u8 incomingChild; /* 0xcea */ u8 unk_cea[4]; /* 0xcee */ u8 unk_cee[4]; }; // size = 0xcf4 -extern struct GFtgtGname gHostRFUtgtGnameBuffer; -extern u8 gHostRFUtgtUnameBuffer[]; -extern struct GFRfuManager Rfu; +extern struct RfuGameData gHostRfuGameData; +extern u8 gHostRfuUsername[]; +extern struct RfuManager gRfu; extern u8 gWirelessStatusIndicatorSpriteId; void WipeTrainerNameRecords(void); @@ -241,13 +258,13 @@ u32 GetRfuRecvQueueLength(void); void RfuVSync(void); void RfuSetIgnoreError(bool32 enable); u8 RfuGetStatus(void); -struct GFtgtGname *GetHostRFUtgtGname(void); -void UpdateGameData_GroupLockedIn(u8 started); +struct RfuGameData *GetHostRfuGameData(void); +void UpdateGameData_GroupLockedIn(u8 startedActivity); void GetLinkmanErrorParams(u32 msg); void RfuSetStatus(u8 status, u16 msg); u8 Rfu_SetLinkRecovery(bool32 enable); -void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *buff1, u8 *buff2); -void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, bool32 started); +void CopyHostRfuGameDataAndUsername(struct RfuGameData *buff1, u8 *buff2); +void SetHostRfuGameData(u8 activity, u32 partnerInfo, bool32 startedActivity); void InitializeRfuLinkManager_LinkLeader(u32 a0); bool32 IsRfuCommunicatingWithAllChildren(void); void LinkRfu_StopManagerAndFinalizeSlots(void); @@ -264,22 +281,22 @@ void SendLeaveGroupNotice(void); void RecordMixTrainerNames(void); void LinkRfu_CreateConnectionAsParent(void); void LinkRfu_StopManagerBeforeEnteringChat(void); -void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 started); +void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 startedActivity); void CreateTask_RfuReconnectWithParent(const u8 *src, u16 trainerId); -void SetGnameBufferWonderFlags(bool32 hasNews, bool32 hasCard); -void ClearAndInitHostRFUtgtGname(void); +void SetHostRfuWonderFlags(bool32 hasNews, bool32 hasCard); +void ResetHostRfuGameData(void); void SetTradeBoardRegisteredMonInfo(u32 type, u32 species, u32 level); void InitializeRfuLinkManager_EnterUnionRoom(void); -void sub_8012188(const u8 *name, struct GFtgtGname *structPtr, u8 a2); +void TryConnectToUnionRoomParent(const u8 *name, struct RfuGameData *structPtr, u8 a2); bool32 IsUnionRoomListenTaskActive(void); void Rfu_SendPacket(void *data); bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name); void Rfu_DisconnectPlayerById(u32 playerIdx); u8 GetLinkPlayerInfoFlags(s32 playerId); void sub_800EF7C(void); -bool8 LinkRfu_GetNameIfCompatible(struct GFtgtGname *buff1, u8 *buff2, u8 idx); -bool8 LinkRfu_GetNameIfSerial7F7D(struct GFtgtGname *buff1, u8 *buff2, u8 idx); -s32 sub_800E87C(u8 idx); +bool8 Rfu_GetCompatiblePlayerData(struct RfuGameData *player, u8 *username, u8 idx); +bool8 Rfu_GetWonderDistributorPlayerData(struct RfuGameData *player, u8 *username, u8 idx); +s32 Rfu_GetIndexOfNewestChild(u8 bits); void CreateTask_RfuIdle(void); void DestroyTask_RfuIdle(void); void ClearRecvCommands(void); @@ -298,7 +315,7 @@ bool8 RfuRecvQueue_Dequeue(struct RfuRecvQueue *queue, u8 *dest); bool8 RfuSendQueue_Dequeue(struct RfuSendQueue *queue, u8 *dest); void RfuBackupQueue_Enqueue(struct RfuBackupQueue *queue, const u8 *q2); bool8 RfuBackupQueue_Dequeue(struct RfuBackupQueue *queue, u8 *q2); -void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders); +void InitHostRfuGameData(struct RfuGameData *data, u8 activity, bool32 startedActivity, s32 partnerInfo); void CreateWirelessStatusIndicatorSprite(u8 x, u8 y); void DestroyWirelessStatusIndicatorSprite(void); void LoadWirelessStatusIndicatorSpriteGfx(void); diff --git a/include/trade.h b/include/trade.h index bd8ef8f63e..05a905ab31 100644 --- a/include/trade.h +++ b/include/trade.h @@ -16,8 +16,8 @@ extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate; s32 GetGameProgressForLinkTrade(void); void CB2_StartCreateTradeMenu(void); void CB2_LinkTrade(void); -int CanRegisterMonForTradingBoard(struct GFtgtGnameSub a0, u16, u16, u8); -int GetUnionRoomTradeMessageId(struct GFtgtGnameSub a0, struct GFtgtGnameSub a1, u16 a2, u16 a3, u8 a4, u16 a5, u8 a6); +int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData a0, u16, u16, u8); +int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData a0, struct RfuGameCompatibilityData a1, u16 a2, u16 a3, u8 a4, u16 a5, u8 a6); int CanSpinTradeMon(struct Pokemon*, u16); void InitTradeSequenceBgGpuRegs(void); void LinkTradeDrawWindow(void); diff --git a/include/union_room.h b/include/union_room.h index 563a048d32..11dbccf705 100644 --- a/include/union_room.h +++ b/include/union_room.h @@ -5,23 +5,30 @@ #include "link.h" #include "constants/union_room.h" -// Exported type declarations +// In the Union Room the player is only ever connected to ≤ 4 other players. +// However, there can be up to MAX_UNION_ROOM_LEADERS (8) object events to +// represent leaders of recently discovered link groups, and each of those groups +// may have up to MAX_RFU_PLAYERS (5) players in it including the leader. +// These players are represented on-screen by NPC sprites drawn around the leader. +// Thus there can be 40 sprites of other players on-screen, in 8 groups of 5. +#define NUM_UNION_ROOM_SPRITES (MAX_UNION_ROOM_LEADERS * MAX_RFU_PLAYERS) -struct WirelessGnameUnamePair +// The maximum number of recently connected players that can be tracked. +// Note that this is significantly less than NUM_UNION_ROOM_SPRITES, i.e. not +// every player that can be shown in the Union Room can be tracked at once. +// Information such as a group member's gender can instead be read from partnerInfo +// of the leader's RfuGameData by tracking at least all of the group leaders. +#define MAX_RFU_PLAYER_LIST_SIZE 16 + +struct RfuPlayerData { - struct GFtgtGname gname; - u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH + 1]; + struct RfuGameData data; + u8 ALIGNED(4) name[RFU_USER_NAME_LENGTH]; }; -struct UnkStruct_x1C +struct RfuPlayer { - struct WirelessGnameUnamePair gname_uname; - u8 active:1; -}; - -struct UnkStruct_x20 -{ - struct WirelessGnameUnamePair gname_uname; + struct RfuPlayerData rfu; u16 timeoutCounter; u8 groupScheduledAnim:2; bool8 useRedText:1; // Never set @@ -29,26 +36,27 @@ struct UnkStruct_x20 u8 filler[3]; }; -struct UnkStruct_Main0 +struct RfuPlayerList { - struct UnkStruct_x20 arr[MAX_UNION_ROOM_PLAYERS]; + struct RfuPlayer players[MAX_RFU_PLAYER_LIST_SIZE]; }; -struct UnkStruct_Main4 +struct RfuIncomingPlayer { - struct UnkStruct_x1C arr[MAX_RFU_PLAYERS]; + struct RfuPlayerData rfu; + bool8 active:1; }; -struct UnkStruct_Main8 +struct RfuIncomingPlayerList { - struct UnkStruct_x20 arr[MAX_RFU_PLAYERS]; + struct RfuIncomingPlayer players[MAX_RFU_PLAYERS]; }; struct WirelessLink_Leader { - struct UnkStruct_Main0 *field_0; - struct UnkStruct_Main4 *field_4; - struct UnkStruct_Main8 *field_8; + struct RfuPlayerList *playerList; + struct RfuIncomingPlayerList *incomingPlayerList; + struct RfuPlayerList *playerListBackup; u8 state; u8 textState; u8 delayTimerAfterOk; @@ -57,8 +65,8 @@ struct WirelessLink_Leader u8 nPlayerModeWindowId; u8 listTaskId; u8 playerCount; - u16 field_14; - u8 field_16; + u16 yesNoWindowId; + u8 unused; u8 listenTaskId; u8 activity; u8 joinRequestAnswer; @@ -67,20 +75,20 @@ struct WirelessLink_Leader struct WirelessLink_Group { - struct UnkStruct_Main0 *field_0; - struct UnkStruct_Main4 *field_4; + struct RfuPlayerList *playerList; + struct RfuIncomingPlayerList *incomingPlayerList; u8 state; u8 textState; - u8 field_A; + u8 delayTimerAfterOk; // Unused u8 listWindowId; u8 bButtonCancelWindowId; u8 playerNameAndIdWindowId; u8 listTaskId; u8 leaderId; - u8 field_10; + u8 unused; u8 listenTaskId; - u8 isWonderNews; - u8 field_13; + bool8 isWonderNews; + bool8 showListMenu; // Never set u8 refreshTimer; u8 delayBeforePrint; }; @@ -95,10 +103,10 @@ struct UnionRoomObject struct WirelessLink_URoom { - struct UnkStruct_Main0 *field_0; - struct UnkStruct_Main4 *field_4; - struct UnkStruct_Main0 *field_8; - struct UnkStruct_Main4 *field_C; + struct RfuPlayerList *playerList; + struct RfuIncomingPlayerList *incomingChildList; + struct RfuPlayerList *spawnPlayer; + struct RfuIncomingPlayerList *incomingParentList; u16 unknown; // Never read u16 field_12; u8 state; @@ -107,56 +115,42 @@ struct WirelessLink_URoom u8 filler[4]; u8 topListMenuWindowId; u8 topListMenuId; - u8 tradeBoardSelectWindowId; - u8 tradeBoardDetailsWindowId; + u8 tradeBoardMainWindowId; + u8 tradeBoardHeaderWindowId; u8 unused1; u8 searchTaskId; - u8 spriteIds[40]; + u8 spriteIds[NUM_UNION_ROOM_SPRITES]; u8 unused2; u8 tradeBoardListMenuId; u16 playerSendBuffer[6]; u8 activityRequestStrbufs[4][16]; u16 partnerYesNoResponse; u16 recvActivityRequest[3]; - struct UnionRoomObject objects[MAX_UNION_ROOM_PLAYERS]; + struct UnionRoomObject objects[MAX_UNION_ROOM_LEADERS]; u8 trainerCardStrBuffer[12][15]; u8 trainerCardColorStrBuffer[48]; u8 trainerCardMsgStrBuffer[200]; }; -union WirelessLink_Main -{ - struct WirelessLink_Leader *leader; - struct WirelessLink_Group *group; - struct WirelessLink_URoom *uRoom; -}; - struct UnionRoomTrade { u16 state; u16 type; u32 playerPersonality; u8 offerPlayerId; - u8 filler1; u16 playerSpecies; u16 playerLevel; u16 species; u16 level; - u16 filler2; u32 personality; }; -// Exported RAM declarations - extern u8 gPlayerCurrActivity; -extern union WirelessLink_Main gUnknown_02022C30; -extern struct GFtgtGnameSub gPartnerTgtGnameSub; +extern struct RfuGameCompatibilityData gRfuPartnerCompatibilityData; extern u16 gUnionRoomOfferedSpecies; extern u8 gUnionRoomRequestedMonType; -// Exported ROM declarations - u8 CreateTask_CreateTradeMenu(void); void SetUsingUnionRoomStartMenu(void); void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0); diff --git a/include/union_room_player_avatar.h b/include/union_room_player_avatar.h index c7add758a0..e6526739f2 100644 --- a/include/union_room_player_avatar.h +++ b/include/union_room_player_avatar.h @@ -3,12 +3,12 @@ u8 InitUnionRoomPlayerObjects(struct UnionRoomObject *players); void DestroyUnionRoomPlayerObjects(void); -void CreateGroupMemberSpritesInvisible(u8 *spriteIds, s32 playerIdx); -void DestroyGroupMemberSprites(u8 *spriteIds); +void CreateUnionRoomPlayerSprites(u8 *spriteIds, s32 playerIdx); +void DestroyUnionRoomPlayerSprites(u8 *spriteIds); void SetTilesAroundUnionRoomPlayersPassable(void); void ScheduleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom); void HandleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom); -bool32 TryInteractWithUnionRoomMember(struct UnkStruct_Main0 *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds); -void UpdateUnionRoomMemberFacing(u32 currDirection, u32 playerIdx, struct UnkStruct_Main0 *main0); +bool32 TryInteractWithUnionRoomMember(struct RfuPlayerList *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds); +void UpdateUnionRoomMemberFacing(u32 currDirection, u32 playerIdx, struct RfuPlayerList *main0); #endif //GUARD_UNION_ROOM_PLAYER_AVATAR_H diff --git a/src/berry_crush.c b/src/berry_crush.c index fd0d86c7e4..a9818016e9 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -984,12 +984,12 @@ static u32 QuitBerryCrush(MainCallback exitCallback) return 0; } -#define ERROR_EXIT(exitCallback) \ - { \ - SetMainCallback2(exitCallback); \ - Rfu.unk_10 = 0; \ - Rfu.unk_12 = 0; \ - Rfu.errorState = RFU_ERROR_STATE_1; \ +#define ERROR_EXIT(exitCallback) \ + { \ + SetMainCallback2(exitCallback); \ + gRfu.unk_10 = 0; \ + gRfu.unk_12 = 0; \ + gRfu.errorState = RFU_ERROR_STATE_1; \ } void StartBerryCrush(MainCallback exitCallback) diff --git a/src/data/union_room.h b/src/data/union_room.h index a130681467..80d1e517cd 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -1,29 +1,27 @@ -// const rom data - ALIGNED(4) static const u8 sText_EmptyString[] = _(""); -ALIGNED(4) const u8 sText_Colon[] = _(":"); -ALIGNED(4) const u8 sText_ID[] = _("{ID}"); -ALIGNED(4) const u8 sText_PleaseStartOver[] = _("Please start over from the beginning."); -ALIGNED(4) const u8 sText_WirelessSearchCanceled[] = _("The WIRELESS COMMUNICATION\nSYSTEM search has been canceled."); -ALIGNED(4) const u8 sText_AwaitingCommunucation2[] = _("Awaiting communication\nfrom another player."); // Unused -ALIGNED(4) const u8 sText_AwaitingCommunication[] = _("{STR_VAR_1}! Awaiting\ncommunication from another player."); -ALIGNED(4) const u8 sText_AwaitingLinkPressStart[] = _("{STR_VAR_1}! Awaiting link!\nPress START when everyone's ready."); -ALIGNED(4) const u8 sJPText_SingleBattle[] = _("シングルバトルを かいさいする"); -ALIGNED(4) const u8 sJPText_DoubleBattle[] = _("ダブルバトルを かいさいする"); -ALIGNED(4) const u8 sJPText_MultiBattle[] = _("マルチバトルを かいさいする"); -ALIGNED(4) const u8 sJPText_TradePokemon[] = _("ポケモンこうかんを かいさいする"); -ALIGNED(4) const u8 sJPText_Chat[] = _("チャットを かいさいする"); -ALIGNED(4) const u8 sJPText_DistWonderCard[] = _("ふしぎなカードをくばる"); -ALIGNED(4) const u8 sJPText_DistWonderNews[] = _("ふしぎなニュースをくばる"); -ALIGNED(4) const u8 sJPText_DistMysteryEvent[] = _("ふしぎなできごとを かいさいする"); // Unused -ALIGNED(4) const u8 sJPText_HoldPokemonJump[] = _("なわとびを かいさいする"); -ALIGNED(4) const u8 sJPText_HoldBerryCrush[] = _("きのみマッシャーを かいさいする"); -ALIGNED(4) const u8 sJPText_HoldBerryPicking[] = _("きのみどりを かいさいする"); -ALIGNED(4) const u8 sJPText_HoldSpinTrade[] = _("ぐるぐるこうかんを かいさいする"); -ALIGNED(4) const u8 sJPText_HoldSpinShop[] = _("ぐるぐるショップを かいさいする"); +ALIGNED(4) static const u8 sText_Colon[] = _(":"); +ALIGNED(4) static const u8 sText_ID[] = _("{ID}"); +ALIGNED(4) static const u8 sText_PleaseStartOver[] = _("Please start over from the beginning."); +ALIGNED(4) static const u8 sText_WirelessSearchCanceled[] = _("The WIRELESS COMMUNICATION\nSYSTEM search has been canceled."); +ALIGNED(4) static const u8 sText_AwaitingCommunucation2[] = _("Awaiting communication\nfrom another player."); // Unused +ALIGNED(4) static const u8 sText_AwaitingCommunication[] = _("{STR_VAR_1}! Awaiting\ncommunication from another player."); +ALIGNED(4) static const u8 sText_AwaitingLinkPressStart[] = _("{STR_VAR_1}! Awaiting link!\nPress START when everyone's ready."); +ALIGNED(4) static const u8 sJPText_SingleBattle[] = _("シングルバトルを かいさいする"); +ALIGNED(4) static const u8 sJPText_DoubleBattle[] = _("ダブルバトルを かいさいする"); +ALIGNED(4) static const u8 sJPText_MultiBattle[] = _("マルチバトルを かいさいする"); +ALIGNED(4) static const u8 sJPText_TradePokemon[] = _("ポケモンこうかんを かいさいする"); +ALIGNED(4) static const u8 sJPText_Chat[] = _("チャットを かいさいする"); +ALIGNED(4) static const u8 sJPText_DistWonderCard[] = _("ふしぎなカードをくばる"); +ALIGNED(4) static const u8 sJPText_DistWonderNews[] = _("ふしぎなニュースをくばる"); +ALIGNED(4) static const u8 sJPText_DistMysteryEvent[] = _("ふしぎなできごとを かいさいする"); // Unused +ALIGNED(4) static const u8 sJPText_HoldPokemonJump[] = _("なわとびを かいさいする"); +ALIGNED(4) static const u8 sJPText_HoldBerryCrush[] = _("きのみマッシャーを かいさいする"); +ALIGNED(4) static const u8 sJPText_HoldBerryPicking[] = _("きのみどりを かいさいする"); +ALIGNED(4) static const u8 sJPText_HoldSpinTrade[] = _("ぐるぐるこうかんを かいさいする"); +ALIGNED(4) static const u8 sJPText_HoldSpinShop[] = _("ぐるぐるショップを かいさいする"); // Unused -const u8 *const sJPLinkGroupActionTexts[] = { +static const u8 *const sJPLinkGroupActionTexts[] = { sJPText_SingleBattle, sJPText_DoubleBattle, sJPText_MultiBattle, @@ -40,14 +38,14 @@ const u8 *const sJPLinkGroupActionTexts[] = { sJPText_HoldSpinShop }; -const u8 sText_1PlayerNeeded[] = _("1 player\nneeded."); -const u8 sText_2PlayersNeeded[] = _("2 players\nneeded."); -const u8 sText_3PlayersNeeded[] = _("3 players\nneeded."); -const u8 sText_4PlayersNeeded[] = _("4 players\nneeded."); -const u8 sText_2PlayerMode[] = _("2-PLAYER\nMODE"); -const u8 sText_3PlayerMode[] = _("3-PLAYER\nMODE"); -const u8 sText_4PlayerMode[] = _("4-PLAYER\nMODE"); -const u8 sText_5PlayerMode[] = _("5-PLAYER\nMODE"); +static const u8 sText_1PlayerNeeded[] = _("1 player\nneeded."); +static const u8 sText_2PlayersNeeded[] = _("2 players\nneeded."); +static const u8 sText_3PlayersNeeded[] = _("3 players\nneeded."); +static const u8 sText_4PlayersNeeded[] = _("4 players\nneeded."); +static const u8 sText_2PlayerMode[] = _("2-PLAYER\nMODE"); +static const u8 sText_3PlayerMode[] = _("3-PLAYER\nMODE"); +static const u8 sText_4PlayerMode[] = _("4-PLAYER\nMODE"); +static const u8 sText_5PlayerMode[] = _("5-PLAYER\nMODE"); static const u8 *const sPlayersNeededOrModeTexts[][5] = { // 2 players required @@ -87,38 +85,38 @@ static const u8 *const sPlayersNeededOrModeTexts[][5] = { } }; -ALIGNED(4) const u8 sText_BButtonCancel[] = _("{B_BUTTON}CANCEL"); -ALIGNED(4) const u8 sJPText_SearchingForParticipants[] = _("ため\nさんかしゃ ぼしゅうちゅう です!"); // Unused, may have been cut off -ALIGNED(4) const u8 sText_PlayerContactedYouForXAccept[] = _("{STR_VAR_2} contacted you for\n{STR_VAR_1}. Accept?"); -ALIGNED(4) const u8 sText_PlayerContactedYouShareX[] = _("{STR_VAR_2} contacted you.\nWill you share {STR_VAR_1}?"); -ALIGNED(4) const u8 sText_PlayerContactedYouAddToMembers[] = _("{STR_VAR_2} contacted you.\nAdd to the members?"); -ALIGNED(4) const u8 sText_AreTheseMembersOK[] = _("{STR_VAR_1}!\nAre these members OK?"); -ALIGNED(4) const u8 sText_CancelModeWithTheseMembers[] = _("Cancel {STR_VAR_1} MODE\nwith these members?"); -ALIGNED(4) const u8 sText_AnOKWasSentToPlayer[] = _("An “OK” was sent\nto {STR_VAR_1}."); -ALIGNED(4) const u8 sText_OtherTrainerUnavailableNow[] = _("The other TRAINER doesn't appear\nto be available now…\p"); -ALIGNED(4) const u8 sText_CantTransmitTrainerTooFar[] = _("You can't transmit with a TRAINER\nwho is too far away.\p"); -ALIGNED(4) const u8 sText_TrainersNotReadyYet[] = _("The other TRAINER(S) is/are not\nready yet.\p"); +ALIGNED(4) static const u8 sText_BButtonCancel[] = _("{B_BUTTON}CANCEL"); +ALIGNED(4) static const u8 sJPText_SearchingForParticipants[] = _("ため\nさんかしゃ ぼしゅうちゅう です!"); // Unused, may have been cut off +ALIGNED(4) static const u8 sText_PlayerContactedYouForXAccept[] = _("{STR_VAR_2} contacted you for\n{STR_VAR_1}. Accept?"); +ALIGNED(4) static const u8 sText_PlayerContactedYouShareX[] = _("{STR_VAR_2} contacted you.\nWill you share {STR_VAR_1}?"); +ALIGNED(4) static const u8 sText_PlayerContactedYouAddToMembers[] = _("{STR_VAR_2} contacted you.\nAdd to the members?"); +ALIGNED(4) static const u8 sText_AreTheseMembersOK[] = _("{STR_VAR_1}!\nAre these members OK?"); +ALIGNED(4) static const u8 sText_CancelModeWithTheseMembers[] = _("Cancel {STR_VAR_1} MODE\nwith these members?"); +ALIGNED(4) static const u8 sText_AnOKWasSentToPlayer[] = _("An “OK” was sent\nto {STR_VAR_1}."); +ALIGNED(4) static const u8 sText_OtherTrainerUnavailableNow[] = _("The other TRAINER doesn't appear\nto be available now…\p"); +ALIGNED(4) static const u8 sText_CantTransmitTrainerTooFar[] = _("You can't transmit with a TRAINER\nwho is too far away.\p"); +ALIGNED(4) static const u8 sText_TrainersNotReadyYet[] = _("The other TRAINER(S) is/are not\nready yet.\p"); static const u8 *const sCantTransmitToTrainerTexts[] = { [UR_TRADE_PLAYER_NOT_READY - 1] = sText_CantTransmitTrainerTooFar, [UR_TRADE_PARTNER_NOT_READY - 1] = sText_TrainersNotReadyYet }; -ALIGNED(4) const u8 sText_ModeWithTheseMembersWillBeCanceled[] = _("The {STR_VAR_1} MODE with\nthese members will be canceled.{PAUSE 60}"); -ALIGNED(4) const u8 sText_MemberNoLongerAvailable[] = _("There is a member who can no\nlonger remain available.\p"); +ALIGNED(4) static const u8 sText_ModeWithTheseMembersWillBeCanceled[] = _("The {STR_VAR_1} MODE with\nthese members will be canceled.{PAUSE 60}"); +ALIGNED(4) static const u8 sText_MemberNoLongerAvailable[] = _("There is a member who can no\nlonger remain available.\p"); static const u8 *const sPlayerUnavailableTexts[] = { sText_OtherTrainerUnavailableNow, sText_MemberNoLongerAvailable }; -ALIGNED(4) const u8 sText_TrainerAppearsUnavailable[] = _("The other TRAINER appears\nunavailable…\p"); -ALIGNED(4) const u8 sText_PlayerSentBackOK[] = _("{STR_VAR_1} sent back an “OK”!"); -ALIGNED(4) const u8 sText_PlayerOKdRegistration[] = _("{STR_VAR_1} OK'd your registration as\na member."); -ALIGNED(4) const u8 sText_PlayerRepliedNo[] = _("{STR_VAR_1} replied, “No…”\p"); -ALIGNED(4) const u8 sText_AwaitingOtherMembers[] = _("{STR_VAR_1}!\nAwaiting other members!"); -ALIGNED(4) const u8 sText_QuitBeingMember[] = _("Quit being a member?"); -ALIGNED(4) const u8 sText_StoppedBeingMember[] = _("You stopped being a member.\p"); +ALIGNED(4) static const u8 sText_TrainerAppearsUnavailable[] = _("The other TRAINER appears\nunavailable…\p"); +ALIGNED(4) static const u8 sText_PlayerSentBackOK[] = _("{STR_VAR_1} sent back an “OK”!"); +ALIGNED(4) static const u8 sText_PlayerOKdRegistration[] = _("{STR_VAR_1} OK'd your registration as\na member."); +ALIGNED(4) static const u8 sText_PlayerRepliedNo[] = _("{STR_VAR_1} replied, “No…”\p"); +ALIGNED(4) static const u8 sText_AwaitingOtherMembers[] = _("{STR_VAR_1}!\nAwaiting other members!"); +ALIGNED(4) static const u8 sText_QuitBeingMember[] = _("Quit being a member?"); +ALIGNED(4) static const u8 sText_StoppedBeingMember[] = _("You stopped being a member.\p"); static const u8 *const sPlayerDisconnectedTexts[] = { [RFU_STATUS_OK] = NULL, @@ -133,12 +131,12 @@ static const u8 *const sPlayerDisconnectedTexts[] = { [RFU_STATUS_LEAVE_GROUP] = sText_StoppedBeingMember }; -ALIGNED(4) const u8 sText_WirelessLinkEstablished[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been established."); -ALIGNED(4) const u8 sText_WirelessLinkDropped[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been dropped…"); -ALIGNED(4) const u8 sText_LinkWithFriendDropped[] = _("The link with your friend has been\ndropped…"); -ALIGNED(4) const u8 sText_PlayerRepliedNo2[] = _("{STR_VAR_1} replied, “No…”"); +ALIGNED(4) static const u8 sText_WirelessLinkEstablished[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been established."); +ALIGNED(4) static const u8 sText_WirelessLinkDropped[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been dropped…"); +ALIGNED(4) static const u8 sText_LinkWithFriendDropped[] = _("The link with your friend has been\ndropped…"); +ALIGNED(4) static const u8 sText_PlayerRepliedNo2[] = _("{STR_VAR_1} replied, “No…”"); -const u8 *const sLinkDroppedTexts[] = { +static const u8 *const sLinkDroppedTexts[] = { [RFU_STATUS_OK] = NULL, [RFU_STATUS_FATAL_ERROR] = sText_LinkWithFriendDropped, [RFU_STATUS_CONNECTION_ERROR] = sText_LinkWithFriendDropped, @@ -151,8 +149,8 @@ const u8 *const sLinkDroppedTexts[] = { [RFU_STATUS_LEAVE_GROUP] = NULL }; -ALIGNED(4) const u8 sText_DoYouWantXMode[] = _("Do you want the {STR_VAR_2}\nMODE?"); -ALIGNED(4) const u8 sText_DoYouWantXMode2[] = _("Do you want the {STR_VAR_2}\nMODE?"); +ALIGNED(4) static const u8 sText_DoYouWantXMode[] = _("Do you want the {STR_VAR_2}\nMODE?"); +ALIGNED(4) static const u8 sText_DoYouWantXMode2[] = _("Do you want the {STR_VAR_2}\nMODE?"); // Unused static const u8 *const sDoYouWantModeTexts[] = { @@ -160,11 +158,14 @@ static const u8 *const sDoYouWantModeTexts[] = { sText_DoYouWantXMode2 }; -ALIGNED(4) const u8 sText_CommunicatingPleaseWait[] = _("Communicating…\nPlease wait."); // Unused -ALIGNED(4) const u8 sText_AwaitingPlayersResponseAboutTrade[] = _("Awaiting {STR_VAR_1}'s response about\nthe trade…"); -ALIGNED(4) const u8 sText_Communicating[] = _("Communicating{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); -ALIGNED(4) const u8 sText_CommunicatingWithPlayer[] = _("Communicating with {STR_VAR_1}{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); -ALIGNED(4) const u8 sText_PleaseWaitAWhile[] = _("Please wait a while{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); +ALIGNED(4) static const u8 sText_CommunicatingPleaseWait[] = _("Communicating…\nPlease wait."); // Unused +ALIGNED(4) static const u8 sText_AwaitingPlayersResponseAboutTrade[] = _("Awaiting {STR_VAR_1}'s response about\nthe trade…"); +ALIGNED(4) static const u8 sText_Communicating[] = _("Communicating{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n" + "{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); +ALIGNED(4) static const u8 sText_CommunicatingWithPlayer[] = _("Communicating with {STR_VAR_1}{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n" + "{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); +ALIGNED(4) static const u8 sText_PleaseWaitAWhile[] = _("Please wait a while{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n" + "{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}."); static const u8 *const sCommunicatingWaitTexts[] = { sText_Communicating, @@ -172,10 +173,10 @@ static const u8 *const sCommunicatingWaitTexts[] = { sText_PleaseWaitAWhile }; -ALIGNED(4) const u8 sText_HiDoSomethingMale[] = _("Hiya! Is there something that you\nwanted to do?"); -ALIGNED(4) const u8 sText_HiDoSomethingFemale[] = _("Hello!\nWould you like to do something?"); -ALIGNED(4) const u8 sText_HiDoSomethingAgainMale[] = _("{STR_VAR_1}: Hiya, we meet again!\nWhat are you up for this time?"); -ALIGNED(4) const u8 sText_HiDoSomethingAgainFemale[] = _("{STR_VAR_1}: Oh! {PLAYER}, hello!\nWould you like to do something?"); +ALIGNED(4) static const u8 sText_HiDoSomethingMale[] = _("Hiya! Is there something that you\nwanted to do?"); +ALIGNED(4) static const u8 sText_HiDoSomethingFemale[] = _("Hello!\nWould you like to do something?"); +ALIGNED(4) static const u8 sText_HiDoSomethingAgainMale[] = _("{STR_VAR_1}: Hiya, we meet again!\nWhat are you up for this time?"); +ALIGNED(4) static const u8 sText_HiDoSomethingAgainFemale[] = _("{STR_VAR_1}: Oh! {PLAYER}, hello!\nWould you like to do something?"); static const u8 *const sHiDoSomethingTexts[][GENDER_COUNT] = { { @@ -187,10 +188,10 @@ static const u8 *const sHiDoSomethingTexts[][GENDER_COUNT] = { } }; -ALIGNED(4) const u8 sText_DoSomethingMale[] = _("Want to do something?"); -ALIGNED(4) const u8 sText_DoSomethingFemale[] = _("Would you like to do something?"); -ALIGNED(4) const u8 sText_DoSomethingAgainMale[] = _("{STR_VAR_1}: What would you like to\ndo now?"); -ALIGNED(4) const u8 sText_DoSomethingAgainFemale[] = _("{STR_VAR_1}: Want to do anything else?"); // Unused +ALIGNED(4) static const u8 sText_DoSomethingMale[] = _("Want to do something?"); +ALIGNED(4) static const u8 sText_DoSomethingFemale[] = _("Would you like to do something?"); +ALIGNED(4) static const u8 sText_DoSomethingAgainMale[] = _("{STR_VAR_1}: What would you like to\ndo now?"); +ALIGNED(4) static const u8 sText_DoSomethingAgainFemale[] = _("{STR_VAR_1}: Want to do anything else?"); // Unused // Unused static const u8 *const sDoSomethingTexts[][GENDER_COUNT] = { @@ -203,31 +204,31 @@ static const u8 *const sDoSomethingTexts[][GENDER_COUNT] = { } }; -ALIGNED(4) const u8 sText_SomebodyHasContactedYou[] = _("Somebody has contacted you.{PAUSE 60}"); -ALIGNED(4) const u8 sText_PlayerHasContactedYou[] = _("{STR_VAR_1} has contacted you.{PAUSE 60}"); +ALIGNED(4) static const u8 sText_SomebodyHasContactedYou[] = _("Somebody has contacted you.{PAUSE 60}"); +ALIGNED(4) static const u8 sText_PlayerHasContactedYou[] = _("{STR_VAR_1} has contacted you.{PAUSE 60}"); static const u8 *const sPlayerContactedYouTexts[] = { sText_SomebodyHasContactedYou, sText_PlayerHasContactedYou }; -ALIGNED(4) const u8 sText_AwaitingResponseFromTrainer[] = _("Awaiting a response from\nthe other TRAINER…"); -ALIGNED(4) const u8 sText_AwaitingResponseFromPlayer[] = _("Awaiting a response from\n{STR_VAR_1}…"); +ALIGNED(4) static const u8 sText_AwaitingResponseFromTrainer[] = _("Awaiting a response from\nthe other TRAINER…"); +ALIGNED(4) static const u8 sText_AwaitingResponseFromPlayer[] = _("Awaiting a response from\n{STR_VAR_1}…"); static const u8 *const sAwaitingResponseTexts[] = { sText_AwaitingResponseFromTrainer, sText_AwaitingResponseFromPlayer }; -ALIGNED(4) const u8 sText_ShowTrainerCard[] = _("The other TRAINER showed\nyou their TRAINER CARD.\pWould you like to show your\nTRAINER CARD?"); -ALIGNED(4) const u8 sText_BattleChallenge[] = _("The other TRAINER challenges you\nto battle.\pWill you accept the battle\nchallenge?"); -ALIGNED(4) const u8 sText_ChatInvitation[] = _("The other TRAINER invites you\nto chat.\pWill you accept the chat\ninvitation?"); -ALIGNED(4) const u8 sText_OfferToTradeMon[] = _("There is an offer to trade your\nregistered Lv. {DYNAMIC 0} {DYNAMIC 1}\pin exchange for a\nLv. {DYNAMIC 2} {DYNAMIC 3}.\pWill you accept this trade\noffer?"); -ALIGNED(4) const u8 sText_OfferToTradeEgg[] = _("There is an offer to trade your\nregistered EGG.\lWill you accept this trade offer?"); -ALIGNED(4) const u8 sText_ChatDropped[] = _("The chat has been dropped.\p"); -ALIGNED(4) const u8 sText_OfferDeclined1[] = _("You declined the offer.\p"); -ALIGNED(4) const u8 sText_OfferDeclined2[] = _("You declined the offer.\p"); -ALIGNED(4) const u8 sText_ChatEnded[] = _("The chat was ended.\p"); +ALIGNED(4) static const u8 sText_ShowTrainerCard[] = _("The other TRAINER showed\nyou their TRAINER CARD.\pWould you like to show your\nTRAINER CARD?"); +ALIGNED(4) static const u8 sText_BattleChallenge[] = _("The other TRAINER challenges you\nto battle.\pWill you accept the battle\nchallenge?"); +ALIGNED(4) static const u8 sText_ChatInvitation[] = _("The other TRAINER invites you\nto chat.\pWill you accept the chat\ninvitation?"); +ALIGNED(4) static const u8 sText_OfferToTradeMon[] = _("There is an offer to trade your\nregistered Lv. {DYNAMIC 0} {DYNAMIC 1}\pin exchange for a\nLv. {DYNAMIC 2} {DYNAMIC 3}.\pWill you accept this trade\noffer?"); +ALIGNED(4) static const u8 sText_OfferToTradeEgg[] = _("There is an offer to trade your\nregistered EGG.\lWill you accept this trade offer?"); +ALIGNED(4) static const u8 sText_ChatDropped[] = _("The chat has been dropped.\p"); +ALIGNED(4) static const u8 sText_OfferDeclined1[] = _("You declined the offer.\p"); +ALIGNED(4) static const u8 sText_OfferDeclined2[] = _("You declined the offer.\p"); +ALIGNED(4) static const u8 sText_ChatEnded[] = _("The chat was ended.\p"); // Unused static const u8 *const sInvitationTexts[] = { @@ -237,10 +238,10 @@ static const u8 *const sInvitationTexts[] = { sText_OfferToTradeMon }; -ALIGNED(4) const u8 sText_JoinChatMale[] = _("Oh, hey! We're in a chat right now.\nWant to join us?"); -ALIGNED(4) const u8 sText_PlayerJoinChatMale[] = _("{STR_VAR_1}: Hey, {PLAYER}!\nWe're having a chat right now.\lWant to join us?"); -ALIGNED(4) const u8 sText_JoinChatFemale[] = _("Oh, hi! We're having a chat now.\nWould you like to join us?"); -ALIGNED(4) const u8 sText_PlayerJoinChatFemale[] = _("{STR_VAR_1}: Oh, hi, {PLAYER}!\nWe're having a chat now.\lWould you like to join us?"); +ALIGNED(4) static const u8 sText_JoinChatMale[] = _("Oh, hey! We're in a chat right now.\nWant to join us?"); +ALIGNED(4) static const u8 sText_PlayerJoinChatMale[] = _("{STR_VAR_1}: Hey, {PLAYER}!\nWe're having a chat right now.\lWant to join us?"); +ALIGNED(4) static const u8 sText_JoinChatFemale[] = _("Oh, hi! We're having a chat now.\nWould you like to join us?"); +ALIGNED(4) static const u8 sText_PlayerJoinChatFemale[] = _("{STR_VAR_1}: Oh, hi, {PLAYER}!\nWe're having a chat now.\lWould you like to join us?"); static const u8 *const sJoinChatTexts[][GENDER_COUNT] = { { @@ -252,13 +253,13 @@ static const u8 *const sJoinChatTexts[][GENDER_COUNT] = { } }; -ALIGNED(4) const u8 sText_TrainerAppearsBusy[] = _("……\nThe TRAINER appears to be busy…\p"); -ALIGNED(4) const u8 sText_WaitForBattleMale[] = _("A battle, huh?\nAll right, just give me some time."); -ALIGNED(4) const u8 sText_WaitForChatMale[] = _("You want to chat, huh?\nSure, just wait a little."); -ALIGNED(4) const u8 sText_ShowTrainerCardMale[] = _("Sure thing! As my “Greetings,”\nhere's my TRAINER CARD."); -ALIGNED(4) const u8 sText_WaitForBattleFemale[] = _("A battle? Of course, but I need\ntime to get ready."); -ALIGNED(4) const u8 sText_WaitForChatFemale[] = _("Did you want to chat?\nOkay, but please wait a moment."); -ALIGNED(4) const u8 sText_ShowTrainerCardFemale[] = _("As my introduction, I'll show you\nmy TRAINER CARD."); +ALIGNED(4) static const u8 sText_TrainerAppearsBusy[] = _("……\nThe TRAINER appears to be busy…\p"); +ALIGNED(4) static const u8 sText_WaitForBattleMale[] = _("A battle, huh?\nAll right, just give me some time."); +ALIGNED(4) static const u8 sText_WaitForChatMale[] = _("You want to chat, huh?\nSure, just wait a little."); +ALIGNED(4) static const u8 sText_ShowTrainerCardMale[] = _("Sure thing! As my “Greetings,”\nhere's my TRAINER CARD."); +ALIGNED(4) static const u8 sText_WaitForBattleFemale[] = _("A battle? Of course, but I need\ntime to get ready."); +ALIGNED(4) static const u8 sText_WaitForChatFemale[] = _("Did you want to chat?\nOkay, but please wait a moment."); +ALIGNED(4) static const u8 sText_ShowTrainerCardFemale[] = _("As my introduction, I'll show you\nmy TRAINER CARD."); static const u8 *const sText_WaitOrShowCardTexts[GENDER_COUNT][4] = { { @@ -274,14 +275,14 @@ static const u8 *const sText_WaitOrShowCardTexts[GENDER_COUNT][4] = { } }; -ALIGNED(4) const u8 sText_WaitForChatMale2[] = _("You want to chat, huh?\nSure, just wait a little."); // Unused -ALIGNED(4) const u8 sText_DoneWaitingBattleMale[] = _("Thanks for waiting!\nLet's get our battle started!{PAUSE 60}"); -ALIGNED(4) const u8 sText_DoneWaitingChatMale[] = _("All right!\nLet's chat!{PAUSE 60}"); -ALIGNED(4) const u8 sText_DoneWaitingBattleFemale[] = _("Sorry I made you wait!\nLet's get started!{PAUSE 60}"); -ALIGNED(4) const u8 sText_DoneWaitingChatFemale[] = _("Sorry I made you wait!\nLet's chat.{PAUSE 60}"); -ALIGNED(4) const u8 sText_TradeWillBeStarted[] = _("The trade will be started.{PAUSE 60}"); -ALIGNED(4) const u8 sText_BattleWillBeStarted[] = _("The battle will be started.{PAUSE 60}"); -ALIGNED(4) const u8 sText_EnteringChat[] = _("Entering the chat…{PAUSE 60}"); +ALIGNED(4) static const u8 sText_WaitForChatMale2[] = _("You want to chat, huh?\nSure, just wait a little."); // Unused +ALIGNED(4) static const u8 sText_DoneWaitingBattleMale[] = _("Thanks for waiting!\nLet's get our battle started!{PAUSE 60}"); +ALIGNED(4) static const u8 sText_DoneWaitingChatMale[] = _("All right!\nLet's chat!{PAUSE 60}"); +ALIGNED(4) static const u8 sText_DoneWaitingBattleFemale[] = _("Sorry I made you wait!\nLet's get started!{PAUSE 60}"); +ALIGNED(4) static const u8 sText_DoneWaitingChatFemale[] = _("Sorry I made you wait!\nLet's chat.{PAUSE 60}"); +ALIGNED(4) static const u8 sText_TradeWillBeStarted[] = _("The trade will be started.{PAUSE 60}"); +ALIGNED(4) static const u8 sText_BattleWillBeStarted[] = _("The battle will be started.{PAUSE 60}"); +ALIGNED(4) static const u8 sText_EnteringChat[] = _("Entering the chat…{PAUSE 60}"); static const u8 *const sStartActivityTexts[][GENDER_COUNT][3] = { { @@ -307,36 +308,36 @@ static const u8 *const sStartActivityTexts[][GENDER_COUNT][3] = { } }; -ALIGNED(4) const u8 sText_BattleDeclinedMale[] = _("Sorry! My POKéMON don't seem to\nbe feeling too well right now.\lLet me battle you another time.\p"); -ALIGNED(4) const u8 sText_BattleDeclinedFemale[] = _("I'm terribly sorry, but my POKéMON\naren't feeling well…\pLet's battle another time.\p"); +ALIGNED(4) static const u8 sText_BattleDeclinedMale[] = _("Sorry! My POKéMON don't seem to\nbe feeling too well right now.\lLet me battle you another time.\p"); +ALIGNED(4) static const u8 sText_BattleDeclinedFemale[] = _("I'm terribly sorry, but my POKéMON\naren't feeling well…\pLet's battle another time.\p"); -const u8 *const sBattleDeclinedTexts[GENDER_COUNT] = { +static const u8 *const sBattleDeclinedTexts[GENDER_COUNT] = { sText_BattleDeclinedMale, sText_BattleDeclinedFemale }; -ALIGNED(4) const u8 sText_ShowTrainerCardDeclinedMale[] = _("Huh? My TRAINER CARD…\nWhere'd it go now?\lSorry! I'll show you another time!\p"); -ALIGNED(4) const u8 sText_ShowTrainerCardDeclinedFemale[] = _("Oh? Now where did I put my\nTRAINER CARD?…\lSorry! I'll show you later!\p"); +ALIGNED(4) static const u8 sText_ShowTrainerCardDeclinedMale[] = _("Huh? My TRAINER CARD…\nWhere'd it go now?\lSorry! I'll show you another time!\p"); +ALIGNED(4) static const u8 sText_ShowTrainerCardDeclinedFemale[] = _("Oh? Now where did I put my\nTRAINER CARD?…\lSorry! I'll show you later!\p"); -const u8 *const sShowTrainerCardDeclinedTexts[GENDER_COUNT] = { +static const u8 *const sShowTrainerCardDeclinedTexts[GENDER_COUNT] = { sText_ShowTrainerCardDeclinedMale, sText_ShowTrainerCardDeclinedFemale }; -ALIGNED(4) const u8 sText_IfYouWantToDoSomethingMale[] = _("If you want to do something with\nme, just give me a shout!\p"); -ALIGNED(4) const u8 sText_IfYouWantToDoSomethingFemale[] = _("If you want to do something with\nme, don't be shy.\p"); +ALIGNED(4) static const u8 sText_IfYouWantToDoSomethingMale[] = _("If you want to do something with\nme, just give me a shout!\p"); +ALIGNED(4) static const u8 sText_IfYouWantToDoSomethingFemale[] = _("If you want to do something with\nme, don't be shy.\p"); -const u8 *const sIfYouWantToDoSomethingTexts[GENDER_COUNT] = { +static const u8 *const sIfYouWantToDoSomethingTexts[GENDER_COUNT] = { sText_IfYouWantToDoSomethingMale, sText_IfYouWantToDoSomethingFemale }; -ALIGNED(4) const u8 sText_TrainerBattleBusy[] = _("Whoops! Sorry, but I have to do\nsomething else.\lAnother time, okay?\p"); -ALIGNED(4) const u8 sText_NeedTwoMonsOfLevel30OrLower1[] = _("If you want to battle, you need\ntwo POKéMON that are below\lLv. 30.\p"); -ALIGNED(4) const u8 sText_NeedTwoMonsOfLevel30OrLower2[] = _("For a battle, you need two\nPOKéMON that are below Lv. 30.\p"); +ALIGNED(4) static const u8 sText_TrainerBattleBusy[] = _("Whoops! Sorry, but I have to do\nsomething else.\lAnother time, okay?\p"); +ALIGNED(4) static const u8 sText_NeedTwoMonsOfLevel30OrLower1[] = _("If you want to battle, you need\ntwo POKéMON that are below\lLv. 30.\p"); +ALIGNED(4) static const u8 sText_NeedTwoMonsOfLevel30OrLower2[] = _("For a battle, you need two\nPOKéMON that are below Lv. 30.\p"); -ALIGNED(4) const u8 sText_DeclineChatMale[] = _("Oh, all right.\nCome see me anytime, okay?\p"); -ALIGNED(4) const u8 stext_DeclineChatFemale[] = _("Oh…\nPlease come by anytime.\p"); +ALIGNED(4) static const u8 sText_DeclineChatMale[] = _("Oh, all right.\nCome see me anytime, okay?\p"); +ALIGNED(4) static const u8 stext_DeclineChatFemale[] = _("Oh…\nPlease come by anytime.\p"); // Response from partner when player declines chat static const u8 *const sDeclineChatTexts[GENDER_COUNT] = { @@ -344,8 +345,8 @@ static const u8 *const sDeclineChatTexts[GENDER_COUNT] = { stext_DeclineChatFemale }; -ALIGNED(4) const u8 sText_ChatDeclinedMale[] = _("Oh, sorry!\nI just can't right this instant.\lLet's chat another time.\p"); -ALIGNED(4) const u8 sText_ChatDeclinedFemale[] = _("Oh, I'm sorry.\nI have too much to do right now.\lLet's chat some other time.\p"); +ALIGNED(4) static const u8 sText_ChatDeclinedMale[] = _("Oh, sorry!\nI just can't right this instant.\lLet's chat another time.\p"); +ALIGNED(4) static const u8 sText_ChatDeclinedFemale[] = _("Oh, I'm sorry.\nI have too much to do right now.\lLet's chat some other time.\p"); // Response from partner when they decline chat static const u8 *const sChatDeclinedTexts[GENDER_COUNT] = { @@ -353,16 +354,16 @@ static const u8 *const sChatDeclinedTexts[GENDER_COUNT] = { sText_ChatDeclinedFemale }; -ALIGNED(4) const u8 sText_YoureToughMale[] = _("Whoa!\nI can tell you're pretty tough!\p"); -ALIGNED(4) const u8 sText_UsedGoodMoveMale[] = _("You used that move?\nThat's good strategy!\p"); -ALIGNED(4) const u8 sText_BattleSurpriseMale[] = _("Way to go!\nThat was an eye-opener!\p"); -ALIGNED(4) const u8 sText_SwitchedMonsMale[] = _("Oh! How could you use that\nPOKéMON in that situation?\p"); -ALIGNED(4) const u8 sText_YoureToughFemale[] = _("That POKéMON…\nIt's been raised really well!\p"); -ALIGNED(4) const u8 sText_UsedGoodMoveFemale[] = _("That's it!\nThis is the right move now!\p"); -ALIGNED(4) const u8 sText_BattleSurpriseFemale[] = _("That's awesome!\nYou can battle that way?\p"); -ALIGNED(4) const u8 sText_SwitchedMonsFemale[] = _("You have exquisite timing for\nswitching POKéMON!\p"); +ALIGNED(4) static const u8 sText_YoureToughMale[] = _("Whoa!\nI can tell you're pretty tough!\p"); +ALIGNED(4) static const u8 sText_UsedGoodMoveMale[] = _("You used that move?\nThat's good strategy!\p"); +ALIGNED(4) static const u8 sText_BattleSurpriseMale[] = _("Way to go!\nThat was an eye-opener!\p"); +ALIGNED(4) static const u8 sText_SwitchedMonsMale[] = _("Oh! How could you use that\nPOKéMON in that situation?\p"); +ALIGNED(4) static const u8 sText_YoureToughFemale[] = _("That POKéMON…\nIt's been raised really well!\p"); +ALIGNED(4) static const u8 sText_UsedGoodMoveFemale[] = _("That's it!\nThis is the right move now!\p"); +ALIGNED(4) static const u8 sText_BattleSurpriseFemale[] = _("That's awesome!\nYou can battle that way?\p"); +ALIGNED(4) static const u8 sText_SwitchedMonsFemale[] = _("You have exquisite timing for\nswitching POKéMON!\p"); -const u8 *const sBattleReactionTexts[GENDER_COUNT][4] = { +static const u8 *const sBattleReactionTexts[GENDER_COUNT][4] = { { sText_YoureToughMale, sText_UsedGoodMoveMale, @@ -377,16 +378,16 @@ const u8 *const sBattleReactionTexts[GENDER_COUNT][4] = { } }; -ALIGNED(4) const u8 sText_LearnedSomethingMale[] = _("Oh, I see!\nThis is educational!\p"); -ALIGNED(4) const u8 sText_ThatsFunnyMale[] = _("Don't say anything funny anymore!\nI'm sore from laughing!\p"); -ALIGNED(4) const u8 sText_RandomChatMale1[] = _("Oh?\nSomething like that happened.\p"); -ALIGNED(4) const u8 sText_RandomChatMale2[] = _("Hmhm… What?\nSo is this what you're saying?\p"); -ALIGNED(4) const u8 sText_LearnedSomethingFemale[] = _("Is that right?\nI didn't know that.\p"); -ALIGNED(4) const u8 sText_ThatsFunnyFemale[] = _("Ahaha!\nWhat is that about?\p"); -ALIGNED(4) const u8 sText_RandomChatFemale1[] = _("Yes, that's exactly it!\nThat's what I meant.\p"); -ALIGNED(4) const u8 sText_RandomChatFemale2[] = _("In other words…\nYes! That's right!\p"); +ALIGNED(4) static const u8 sText_LearnedSomethingMale[] = _("Oh, I see!\nThis is educational!\p"); +ALIGNED(4) static const u8 sText_ThatsFunnyMale[] = _("Don't say anything funny anymore!\nI'm sore from laughing!\p"); +ALIGNED(4) static const u8 sText_RandomChatMale1[] = _("Oh?\nSomething like that happened.\p"); +ALIGNED(4) static const u8 sText_RandomChatMale2[] = _("Hmhm… What?\nSo is this what you're saying?\p"); +ALIGNED(4) static const u8 sText_LearnedSomethingFemale[] = _("Is that right?\nI didn't know that.\p"); +ALIGNED(4) static const u8 sText_ThatsFunnyFemale[] = _("Ahaha!\nWhat is that about?\p"); +ALIGNED(4) static const u8 sText_RandomChatFemale1[] = _("Yes, that's exactly it!\nThat's what I meant.\p"); +ALIGNED(4) static const u8 sText_RandomChatFemale2[] = _("In other words…\nYes! That's right!\p"); -const u8 *const sChatReactionTexts[GENDER_COUNT][4] = { +static const u8 *const sChatReactionTexts[GENDER_COUNT][4] = { { sText_LearnedSomethingMale, sText_ThatsFunnyMale, @@ -401,12 +402,12 @@ const u8 *const sChatReactionTexts[GENDER_COUNT][4] = { } }; -ALIGNED(4) const u8 sText_ShowedTrainerCardMale1[] = _("I'm just showing my TRAINER CARD\nas my way of greeting.\p"); -ALIGNED(4) const u8 sText_ShowedTrainerCardMale2[] = _("I hope I get to know you better!\p"); -ALIGNED(4) const u8 sText_ShowedTrainerCardFemale1[] = _("We're showing each other our\nTRAINER CARDS to get acquainted.\p"); -ALIGNED(4) const u8 sText_ShowedTrainerCardFemale2[] = _("Glad to meet you.\nPlease don't be a stranger!\p"); +ALIGNED(4) static const u8 sText_ShowedTrainerCardMale1[] = _("I'm just showing my TRAINER CARD\nas my way of greeting.\p"); +ALIGNED(4) static const u8 sText_ShowedTrainerCardMale2[] = _("I hope I get to know you better!\p"); +ALIGNED(4) static const u8 sText_ShowedTrainerCardFemale1[] = _("We're showing each other our\nTRAINER CARDS to get acquainted.\p"); +ALIGNED(4) static const u8 sText_ShowedTrainerCardFemale2[] = _("Glad to meet you.\nPlease don't be a stranger!\p"); -const u8 *const sTrainerCardReactionTexts[GENDER_COUNT][2] = { +static const u8 *const sTrainerCardReactionTexts[GENDER_COUNT][2] = { { sText_ShowedTrainerCardMale1, sText_ShowedTrainerCardMale2 @@ -417,12 +418,12 @@ const u8 *const sTrainerCardReactionTexts[GENDER_COUNT][2] = { } }; -ALIGNED(4) const u8 sText_MaleTraded1[] = _("Yeahah!\nI really wanted this POKéMON!\p"); -ALIGNED(4) const u8 sText_MaleTraded2[] = _("Finally, a trade got me that\nPOKéMON I'd wanted a long time.\p"); -ALIGNED(4) const u8 sText_FemaleTraded1[] = _("I'm trading POKéMON right now.\p"); -ALIGNED(4) const u8 sText_FemaleTraded2[] = _("I finally got that POKéMON I\nwanted in a trade!\p"); +ALIGNED(4) static const u8 sText_MaleTraded1[] = _("Yeahah!\nI really wanted this POKéMON!\p"); +ALIGNED(4) static const u8 sText_MaleTraded2[] = _("Finally, a trade got me that\nPOKéMON I'd wanted a long time.\p"); +ALIGNED(4) static const u8 sText_FemaleTraded1[] = _("I'm trading POKéMON right now.\p"); +ALIGNED(4) static const u8 sText_FemaleTraded2[] = _("I finally got that POKéMON I\nwanted in a trade!\p"); -const u8 *const sTradeReactionTexts[GENDER_COUNT][4] = { +static const u8 *const sTradeReactionTexts[GENDER_COUNT][4] = { { sText_MaleTraded1, sText_MaleTraded2 @@ -433,57 +434,66 @@ const u8 *const sTradeReactionTexts[GENDER_COUNT][4] = { } }; -ALIGNED(4) const u8 sText_XCheckedTradingBoard[] = _("{STR_VAR_1} checked the\nTRADING BOARD.\p"); -ALIGNED(4) const u8 sText_RegisterMonAtTradingBoard[] = _("Welcome to the TRADING BOARD.\pYou may register your POKéMON\nand offer it up for a trade.\pWould you like to register one of\nyour POKéMON?"); -ALIGNED(4) const u8 sText_TradingBoardInfo[] = _("This TRADING BOARD is used for\noffering a POKéMON for a trade.\pAll you need to do is register a\nPOKéMON for a trade.\pAnother TRAINER may offer a party\nPOKéMON in return for the trade.\pWe hope you will register POKéMON\nand trade them with many, many\lother TRAINERS.\pWould you like to register one of\nyour POKéMON?"); -ALIGNED(4) const u8 sText_ThankYouForRegistering[] = _("We have registered your POKéMON for\ntrade on the TRADING BOARD.\pThank you for using this service!\p"); // unused -ALIGNED(4) const u8 sText_NobodyHasRegistered[] = _("Nobody has registered any POKéMON\nfor trade on the TRADING BOARD.\p\n"); // unused -ALIGNED(4) const u8 sText_ChooseRequestedMonType[] = _("Please choose the type of POKéMON\nthat you would like in the trade.\n"); -ALIGNED(4) const u8 sText_WhichMonWillYouOffer[] = _("Which of your party POKéMON will\nyou offer in trade?\p"); -ALIGNED(4) const u8 sText_RegistrationCanceled[] = _("Registration has been canceled.\p"); -ALIGNED(4) const u8 sText_RegistraionCompleted[] = _("Registration has been completed.\p"); -ALIGNED(4) const u8 sText_TradeCanceled[] = _("The trade has been canceled.\p"); -ALIGNED(4) const u8 sText_CancelRegistrationOfMon[] = _("Cancel the registration of your\nLv. {STR_VAR_2} {STR_VAR_1}?"); -ALIGNED(4) const u8 sText_CancelRegistrationOfEgg[] = _("Cancel the registration of your\nEGG?"); -ALIGNED(4) const u8 sText_RegistrationCanceled2[] = _("The registration has been canceled.\p"); -ALIGNED(4) const u8 sText_TradeTrainersWillBeListed[] = _("TRAINERS wishing to make a trade\nwill be listed."); // unused -ALIGNED(4) const u8 sText_ChooseTrainerToTradeWith2[] = _("Please choose the TRAINER with whom\nyou would like to trade POKéMON."); // unused -ALIGNED(4) const u8 sText_AskTrainerToMakeTrade[] = _("Would you like to ask {STR_VAR_1} to\nmake a trade?"); -ALIGNED(4) const u8 sText_AwaitingResponseFromTrainer2[] = _("Awaiting a response from\nthe other TRAINER…"); // unused -ALIGNED(4) const u8 sText_NotRegisteredAMonForTrade[] = _("You have not registered a POKéMON\nfor trading.\p"); // unused -ALIGNED(4) const u8 sText_DontHaveTypeTrainerWants[] = _("You don't have a {STR_VAR_2}-type\nPOKéMON that {STR_VAR_1} wants.\p"); -ALIGNED(4) const u8 sText_DontHaveEggTrainerWants[] = _("You don't have an EGG that\n{STR_VAR_1} wants.\p"); -ALIGNED(4) const u8 sText_PlayerCantTradeForYourMon[] = _("{STR_VAR_1} can't make a trade for\nyour POKéMON right now.\p"); -ALIGNED(4) const u8 sText_CantTradeForPartnersMon[] = _("You can't make a trade for\n{STR_VAR_1}'s POKéMON right now.\p"); +ALIGNED(4) static const u8 sText_XCheckedTradingBoard[] = _("{STR_VAR_1} checked the\nTRADING BOARD.\p"); +ALIGNED(4) static const u8 sText_RegisterMonAtTradingBoard[] = _("Welcome to the TRADING BOARD.\pYou may register your POKéMON\nand offer it up for a trade.\pWould you like to register one of\nyour POKéMON?"); +ALIGNED(4) static const u8 sText_TradingBoardInfo[] = _("This TRADING BOARD is used for\n" + "offering a POKéMON for a trade.\p" + "All you need to do is register a\n" + "POKéMON for a trade.\p" + "Another TRAINER may offer a party\n" + "POKéMON in return for the trade.\p" + "We hope you will register POKéMON\n" + "and trade them with many, many\l" + "other TRAINERS.\p" + "Would you like to register one of\nyour POKéMON?"); +ALIGNED(4) static const u8 sText_ThankYouForRegistering[] = _("We have registered your POKéMON for\ntrade on the TRADING BOARD.\pThank you for using this service!\p"); // unused +ALIGNED(4) static const u8 sText_NobodyHasRegistered[] = _("Nobody has registered any POKéMON\nfor trade on the TRADING BOARD.\p\n"); // unused +ALIGNED(4) static const u8 sText_ChooseRequestedMonType[] = _("Please choose the type of POKéMON\nthat you would like in the trade.\n"); +ALIGNED(4) static const u8 sText_WhichMonWillYouOffer[] = _("Which of your party POKéMON will\nyou offer in trade?\p"); +ALIGNED(4) static const u8 sText_RegistrationCanceled[] = _("Registration has been canceled.\p"); +ALIGNED(4) static const u8 sText_RegistraionCompleted[] = _("Registration has been completed.\p"); +ALIGNED(4) static const u8 sText_TradeCanceled[] = _("The trade has been canceled.\p"); +ALIGNED(4) static const u8 sText_CancelRegistrationOfMon[] = _("Cancel the registration of your\nLv. {STR_VAR_2} {STR_VAR_1}?"); +ALIGNED(4) static const u8 sText_CancelRegistrationOfEgg[] = _("Cancel the registration of your\nEGG?"); +ALIGNED(4) static const u8 sText_RegistrationCanceled2[] = _("The registration has been canceled.\p"); +ALIGNED(4) static const u8 sText_TradeTrainersWillBeListed[] = _("TRAINERS wishing to make a trade\nwill be listed."); // unused +ALIGNED(4) static const u8 sText_ChooseTrainerToTradeWith2[] = _("Please choose the TRAINER with whom\nyou would like to trade POKéMON."); // unused +ALIGNED(4) static const u8 sText_AskTrainerToMakeTrade[] = _("Would you like to ask {STR_VAR_1} to\nmake a trade?"); +ALIGNED(4) static const u8 sText_AwaitingResponseFromTrainer2[] = _("Awaiting a response from\nthe other TRAINER…"); // unused +ALIGNED(4) static const u8 sText_NotRegisteredAMonForTrade[] = _("You have not registered a POKéMON\nfor trading.\p"); // unused +ALIGNED(4) static const u8 sText_DontHaveTypeTrainerWants[] = _("You don't have a {STR_VAR_2}-type\nPOKéMON that {STR_VAR_1} wants.\p"); +ALIGNED(4) static const u8 sText_DontHaveEggTrainerWants[] = _("You don't have an EGG that\n{STR_VAR_1} wants.\p"); +ALIGNED(4) static const u8 sText_PlayerCantTradeForYourMon[] = _("{STR_VAR_1} can't make a trade for\nyour POKéMON right now.\p"); +ALIGNED(4) static const u8 sText_CantTradeForPartnersMon[] = _("You can't make a trade for\n{STR_VAR_1}'s POKéMON right now.\p"); // Unused -const u8 *const sCantTradeMonTexts[] = { +static const u8 *const sCantTradeMonTexts[] = { sText_PlayerCantTradeForYourMon, sText_CantTradeForPartnersMon }; -ALIGNED(4) const u8 sText_TradeOfferRejected[] = _("Your trade offer was rejected.\p"); -ALIGNED(4) const u8 sText_EggTrade[] = _("EGG TRADE"); -ALIGNED(4) const u8 sText_ChooseJoinCancel[] = _("{DPAD_UPDOWN}CHOOSE {A_BUTTON}JOIN {B_BUTTON}CANCEL"); -ALIGNED(4) const u8 sText_ChooseTrainer[] = _("Please choose a TRAINER."); -ALIGNED(4) const u8 sText_ChooseTrainerSingleBattle[] = _("Please choose a TRAINER for\na SINGLE BATTLE."); -ALIGNED(4) const u8 sText_ChooseTrainerDoubleBattle[] = _("Please choose a TRAINER for\na DOUBLE BATTLE."); -ALIGNED(4) const u8 sText_ChooseLeaderMultiBattle[] = _("Please choose the LEADER\nfor a MULTI BATTLE."); -ALIGNED(4) const u8 sText_ChooseTrainerToTradeWith[] = _("Please choose the TRAINER to\ntrade with."); -ALIGNED(4) const u8 sText_ChooseTrainerToShareWonderCards[] = _("Please choose the TRAINER who is\nsharing WONDER CARDS."); -ALIGNED(4) const u8 sText_ChooseTrainerToShareWonderNews[] = _("Please choose the TRAINER who is\nsharing WONDER NEWS."); -ALIGNED(4) const u8 sText_ChooseLeaderPokemonJump[] = _("Jump with mini POKéMON!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderBerryCrush[] = _("BERRY CRUSH!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderBerryPicking[] = _("DODRIO BERRY-PICKING!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderBerryBlender[] = _("BERRY BLENDER!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderRecordCorner[] = _("RECORD CORNER!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderCoolContest[] = _("COOLNESS CONTEST!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderBeautyContest[] = _("BEAUTY CONTEST!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderCuteContest[] = _("CUTENESS CONTEST!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderSmartContest[] = _("SMARTNESS CONTEST!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderToughContest[] = _("TOUGHNESS CONTEST!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderBattleTowerLv50[] = _("BATTLE TOWER LEVEL 50!\nPlease choose the LEADER."); -ALIGNED(4) const u8 sText_ChooseLeaderBattleTowerOpenLv[] = _("BATTLE TOWER OPEN LEVEL!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_TradeOfferRejected[] = _("Your trade offer was rejected.\p"); +ALIGNED(4) static const u8 sText_EggTrade[] = _("EGG TRADE"); +ALIGNED(4) static const u8 sText_ChooseJoinCancel[] = _("{DPAD_UPDOWN}CHOOSE {A_BUTTON}JOIN {B_BUTTON}CANCEL"); +ALIGNED(4) static const u8 sText_ChooseTrainer[] = _("Please choose a TRAINER."); +ALIGNED(4) static const u8 sText_ChooseTrainerSingleBattle[] = _("Please choose a TRAINER for\na SINGLE BATTLE."); +ALIGNED(4) static const u8 sText_ChooseTrainerDoubleBattle[] = _("Please choose a TRAINER for\na DOUBLE BATTLE."); +ALIGNED(4) static const u8 sText_ChooseLeaderMultiBattle[] = _("Please choose the LEADER\nfor a MULTI BATTLE."); +ALIGNED(4) static const u8 sText_ChooseTrainerToTradeWith[] = _("Please choose the TRAINER to\ntrade with."); +ALIGNED(4) static const u8 sText_ChooseTrainerToShareWonderCards[] = _("Please choose the TRAINER who is\nsharing WONDER CARDS."); +ALIGNED(4) static const u8 sText_ChooseTrainerToShareWonderNews[] = _("Please choose the TRAINER who is\nsharing WONDER NEWS."); +ALIGNED(4) static const u8 sText_ChooseLeaderPokemonJump[] = _("Jump with mini POKéMON!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderBerryCrush[] = _("BERRY CRUSH!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderBerryPicking[] = _("DODRIO BERRY-PICKING!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderBerryBlender[] = _("BERRY BLENDER!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderRecordCorner[] = _("RECORD CORNER!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderCoolContest[] = _("COOLNESS CONTEST!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderBeautyContest[] = _("BEAUTY CONTEST!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderCuteContest[] = _("CUTENESS CONTEST!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderSmartContest[] = _("SMARTNESS CONTEST!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderToughContest[] = _("TOUGHNESS CONTEST!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderBattleTowerLv50[] = _("BATTLE TOWER LEVEL 50!\nPlease choose the LEADER."); +ALIGNED(4) static const u8 sText_ChooseLeaderBattleTowerOpenLv[] = _("BATTLE TOWER OPEN LEVEL!\nPlease choose the LEADER."); static const u8 *const sChooseTrainerTexts[NUM_LINK_GROUP_TYPES] = { @@ -511,53 +521,53 @@ static const u8 *const sChooseTrainerTexts[NUM_LINK_GROUP_TYPES] = [LINK_GROUP_BATTLE_TOWER_OPEN] = sText_ChooseLeaderBattleTowerOpenLv }; -ALIGNED(4) const u8 sText_SearchingForWirelessSystemWait[] = _("Searching for a WIRELESS\nCOMMUNICATION SYSTEM. Wait..."); -ALIGNED(4) const u8 sText_MustHaveTwoMonsForDoubleBattle[] = _("For a DOUBLE BATTLE, you must have\nat least two POKéMON.\p"); // Unused -ALIGNED(4) const u8 sText_AwaitingPlayersResponse[] = _("Awaiting {STR_VAR_1}'s response…"); -ALIGNED(4) const u8 sText_PlayerHasBeenAskedToRegisterYouPleaseWait[] = _("{STR_VAR_1} has been asked to register\nyou as a member. Please wait."); -ALIGNED(4) const u8 sText_AwaitingResponseFromWirelessSystem[] = _("Awaiting a response from the\nWIRELESS COMMUNICATION SYSTEM."); -ALIGNED(4) const u8 sText_PleaseWaitForOtherTrainersToGather[] = _("Please wait for other TRAINERS to\ngather and get ready."); // Unused -ALIGNED(4) const u8 sText_NoCardsSharedRightNow[] = _("No CARDS appear to be shared \nright now."); -ALIGNED(4) const u8 sText_NoNewsSharedRightNow[] = _("No NEWS appears to be shared\nright now."); +ALIGNED(4) static const u8 sText_SearchingForWirelessSystemWait[] = _("Searching for a WIRELESS\nCOMMUNICATION SYSTEM. Wait..."); +ALIGNED(4) static const u8 sText_MustHaveTwoMonsForDoubleBattle[] = _("For a DOUBLE BATTLE, you must have\nat least two POKéMON.\p"); // Unused +ALIGNED(4) static const u8 sText_AwaitingPlayersResponse[] = _("Awaiting {STR_VAR_1}'s response…"); +ALIGNED(4) static const u8 sText_PlayerHasBeenAskedToRegisterYouPleaseWait[] = _("{STR_VAR_1} has been asked to register\nyou as a member. Please wait."); +ALIGNED(4) static const u8 sText_AwaitingResponseFromWirelessSystem[] = _("Awaiting a response from the\nWIRELESS COMMUNICATION SYSTEM."); +ALIGNED(4) static const u8 sText_PleaseWaitForOtherTrainersToGather[] = _("Please wait for other TRAINERS to\ngather and get ready."); // Unused +ALIGNED(4) static const u8 sText_NoCardsSharedRightNow[] = _("No CARDS appear to be shared \nright now."); +ALIGNED(4) static const u8 sText_NoNewsSharedRightNow[] = _("No NEWS appears to be shared\nright now."); -const u8 *const sNoWonderSharedTexts[] = { +static const u8 *const sNoWonderSharedTexts[] = { sText_NoCardsSharedRightNow, sText_NoNewsSharedRightNow }; -ALIGNED(4) const u8 sText_Battle[] = _("BATTLE"); -ALIGNED(4) const u8 sText_Chat2[] = _("CHAT"); -ALIGNED(4) const u8 sText_Greetings[] = _("GREETINGS"); -ALIGNED(4) const u8 sText_Exit[] = _("EXIT"); -ALIGNED(4) const u8 sText_Exit2[] = _("EXIT"); -ALIGNED(4) const u8 sText_Info[] = _("INFO"); -ALIGNED(4) const u8 sText_NameWantedOfferLv[] = _("NAME{CLEAR_TO 0x3C}WANTED{CLEAR_TO 0x6E}OFFER{CLEAR_TO 0xC6}LV."); -ALIGNED(4) const u8 sText_SingleBattle[] = _("SINGLE BATTLE"); -ALIGNED(4) const u8 sText_DoubleBattle[] = _("DOUBLE BATTLE"); -ALIGNED(4) const u8 sText_MultiBattle[] = _("MULTI BATTLE"); -ALIGNED(4) const u8 sText_PokemonTrades[] = _("POKéMON TRADES"); -ALIGNED(4) const u8 sText_Chat[] = _("CHAT"); -ALIGNED(4) const u8 sText_Cards[] = _("CARDS"); -ALIGNED(4) const u8 sText_WonderCards[] = _("WONDER CARDS"); -ALIGNED(4) const u8 sText_WonderNews[] = _("WONDER NEWS"); -ALIGNED(4) const u8 sText_PokemonJump[] = _("POKéMON JUMP"); -ALIGNED(4) const u8 sText_BerryCrush[] = _("BERRY CRUSH"); -ALIGNED(4) const u8 sText_BerryPicking[] = _("BERRY-PICKING"); -ALIGNED(4) const u8 sText_Search[] = _("SEARCH"); -ALIGNED(4) const u8 sText_BerryBlender[] = _("BERRY BLENDER"); -ALIGNED(4) const u8 sText_RecordCorner[] = _("RECORD CORNER"); -ALIGNED(4) const u8 sText_CoolContest[] = _("COOL CONTEST"); -ALIGNED(4) const u8 sText_BeautyContest[] = _("BEAUTY CONTEST"); -ALIGNED(4) const u8 sText_CuteContest[] = _("CUTE CONTEST"); -ALIGNED(4) const u8 sText_SmartContest[] = _("SMART CONTEST"); -ALIGNED(4) const u8 sText_ToughContest[] = _("TOUGH CONTEST"); -ALIGNED(4) const u8 sText_BattleTowerLv50[] = _("BATTLE TOWER LV. 50"); -ALIGNED(4) const u8 sText_BattleTowerOpenLv[] = _("BATTLE TOWER OPEN LEVEL"); -ALIGNED(4) const u8 sText_ItsNormalCard[] = _("It's a NORMAL CARD."); -ALIGNED(4) const u8 sText_ItsBronzeCard[] = _("It's a BRONZE CARD!"); -ALIGNED(4) const u8 sText_ItsCopperCard[] = _("It's a COPPER CARD!"); -ALIGNED(4) const u8 sText_ItsSilverCard[] = _("It's a SILVER CARD!"); -ALIGNED(4) const u8 sText_ItsGoldCard[] = _("It's a GOLD CARD!"); +ALIGNED(4) static const u8 sText_Battle[] = _("BATTLE"); +ALIGNED(4) static const u8 sText_Chat2[] = _("CHAT"); +ALIGNED(4) static const u8 sText_Greetings[] = _("GREETINGS"); +ALIGNED(4) static const u8 sText_Exit[] = _("EXIT"); +ALIGNED(4) static const u8 sText_Exit2[] = _("EXIT"); +ALIGNED(4) static const u8 sText_Info[] = _("INFO"); +ALIGNED(4) static const u8 sText_NameWantedOfferLv[] = _("NAME{CLEAR_TO 60}WANTED{CLEAR_TO 110}OFFER{CLEAR_TO 198}LV."); +ALIGNED(4) static const u8 sText_SingleBattle[] = _("SINGLE BATTLE"); +ALIGNED(4) static const u8 sText_DoubleBattle[] = _("DOUBLE BATTLE"); +ALIGNED(4) static const u8 sText_MultiBattle[] = _("MULTI BATTLE"); +ALIGNED(4) static const u8 sText_PokemonTrades[] = _("POKéMON TRADES"); +ALIGNED(4) static const u8 sText_Chat[] = _("CHAT"); +ALIGNED(4) static const u8 sText_Cards[] = _("CARDS"); +ALIGNED(4) static const u8 sText_WonderCards[] = _("WONDER CARDS"); +ALIGNED(4) static const u8 sText_WonderNews[] = _("WONDER NEWS"); +ALIGNED(4) static const u8 sText_PokemonJump[] = _("POKéMON JUMP"); +ALIGNED(4) static const u8 sText_BerryCrush[] = _("BERRY CRUSH"); +ALIGNED(4) static const u8 sText_BerryPicking[] = _("BERRY-PICKING"); +ALIGNED(4) static const u8 sText_Search[] = _("SEARCH"); +ALIGNED(4) static const u8 sText_BerryBlender[] = _("BERRY BLENDER"); +ALIGNED(4) static const u8 sText_RecordCorner[] = _("RECORD CORNER"); +ALIGNED(4) static const u8 sText_CoolContest[] = _("COOL CONTEST"); +ALIGNED(4) static const u8 sText_BeautyContest[] = _("BEAUTY CONTEST"); +ALIGNED(4) static const u8 sText_CuteContest[] = _("CUTE CONTEST"); +ALIGNED(4) static const u8 sText_SmartContest[] = _("SMART CONTEST"); +ALIGNED(4) static const u8 sText_ToughContest[] = _("TOUGH CONTEST"); +ALIGNED(4) static const u8 sText_BattleTowerLv50[] = _("BATTLE TOWER LV. 50"); +ALIGNED(4) static const u8 sText_BattleTowerOpenLv[] = _("BATTLE TOWER OPEN LEVEL"); +ALIGNED(4) static const u8 sText_ItsNormalCard[] = _("It's a NORMAL CARD."); +ALIGNED(4) static const u8 sText_ItsBronzeCard[] = _("It's a BRONZE CARD!"); +ALIGNED(4) static const u8 sText_ItsCopperCard[] = _("It's a COPPER CARD!"); +ALIGNED(4) static const u8 sText_ItsSilverCard[] = _("It's a SILVER CARD!"); +ALIGNED(4) static const u8 sText_ItsGoldCard[] = _("It's a GOLD CARD!"); static const u8 *const sCardColorTexts[] = { sText_ItsNormalCard, @@ -567,17 +577,17 @@ static const u8 *const sCardColorTexts[] = { sText_ItsGoldCard }; -ALIGNED(4) const u8 sText_TrainerCardInfoPage1[] = _("This is {DYNAMIC 0} {DYNAMIC 1}'s\nTRAINER CARD…\l{DYNAMIC 2}\pPOKéDEX: {DYNAMIC 3}\nTIME: {DYNAMIC 4}:{DYNAMIC 5}\p"); -ALIGNED(4) const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {DYNAMIC 0} LOSSES: {DYNAMIC 2}\nTRADES: {DYNAMIC 3}\p“{DYNAMIC 4} {DYNAMIC 5}\n{DYNAMIC 6} {DYNAMIC 7}”\p"); -ALIGNED(4) const u8 sText_GladToMeetYouMale[] = _("{DYNAMIC 1}: Glad to have met you!{PAUSE 60}"); -ALIGNED(4) const u8 sText_GladToMeetYouFemale[] = _("{DYNAMIC 1}: Glad to meet you!{PAUSE 60}"); +ALIGNED(4) static const u8 sText_TrainerCardInfoPage1[] = _("This is {DYNAMIC 0} {DYNAMIC 1}'s\nTRAINER CARD…\l{DYNAMIC 2}\pPOKéDEX: {DYNAMIC 3}\nTIME: {DYNAMIC 4}:{DYNAMIC 5}\p"); +ALIGNED(4) static const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {DYNAMIC 0} LOSSES: {DYNAMIC 2}\nTRADES: {DYNAMIC 3}\p“{DYNAMIC 4} {DYNAMIC 5}\n{DYNAMIC 6} {DYNAMIC 7}”\p"); +ALIGNED(4) static const u8 sText_GladToMeetYouMale[] = _("{DYNAMIC 1}: Glad to have met you!{PAUSE 60}"); +ALIGNED(4) static const u8 sText_GladToMeetYouFemale[] = _("{DYNAMIC 1}: Glad to meet you!{PAUSE 60}"); -const u8 *const sGladToMeetYouTexts[GENDER_COUNT] = { +static const u8 *const sGladToMeetYouTexts[GENDER_COUNT] = { sText_GladToMeetYouMale, sText_GladToMeetYouFemale }; -ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {DYNAMIC 1}'s\nTRAINER CARD.{PAUSE 60}"); +ALIGNED(4) static const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {DYNAMIC 1}'s\nTRAINER CARD.{PAUSE 60}"); static const u8 *const sLinkGroupActivityNameTexts[] = { [ACTIVITY_NONE] = sText_EmptyString, @@ -586,8 +596,8 @@ static const u8 *const sLinkGroupActivityNameTexts[] = { [ACTIVITY_BATTLE_MULTI] = sText_MultiBattle, [ACTIVITY_TRADE] = sText_PokemonTrades, [ACTIVITY_CHAT] = sText_Chat, - [ACTIVITY_WONDER_CARD] = sText_WonderCards, - [ACTIVITY_WONDER_NEWS] = sText_WonderNews, + [ACTIVITY_WONDER_CARD_DUP] = sText_WonderCards, + [ACTIVITY_WONDER_NEWS_DUP] = sText_WonderNews, [ACTIVITY_CARD] = sText_Cards, [ACTIVITY_POKEMON_JUMP] = sText_PokemonJump, [ACTIVITY_BERRY_CRUSH] = sText_BerryCrush, @@ -601,8 +611,8 @@ static const u8 *const sLinkGroupActivityNameTexts[] = { [ACTIVITY_DECLINE] = sText_EmptyString, [ACTIVITY_NPCTALK] = sText_EmptyString, [ACTIVITY_PLYRTALK] = sText_EmptyString, - [ACTIVITY_WONDER_CARD2] = sText_WonderCards, - [ACTIVITY_WONDER_NEWS2] = sText_WonderNews, + [ACTIVITY_WONDER_CARD] = sText_WonderCards, + [ACTIVITY_WONDER_NEWS] = sText_WonderNews, [ACTIVITY_CONTEST_COOL] = sText_CoolContest, [ACTIVITY_CONTEST_BEAUTY] = sText_BeautyContest, [ACTIVITY_CONTEST_CUTE] = sText_CuteContest, @@ -612,12 +622,12 @@ static const u8 *const sLinkGroupActivityNameTexts[] = { }; static const struct WindowTemplate sWindowTemplate_BButtonCancel = { - .bg = 0x00, - .tilemapLeft = 0x00, - .tilemapTop = 0x00, - .width = 0x1E, - .height = 0x02, - .paletteNum = 0x0F, + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 30, + .height = 2, + .paletteNum = 15, .baseBlock = 0x0008 }; @@ -712,27 +722,27 @@ static const struct ListMenuTemplate sListMenuTemplate_PossibleGroupMembers = { .cursorKind = 1 }; -const struct WindowTemplate gUnknown_082F0174 = { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x03, - .width = 0x11, - .height = 0x0a, - .paletteNum = 0x0f, +static const struct WindowTemplate sWindowTemplate_GroupList = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 3, + .width = 17, + .height = 10, + .paletteNum = 15, .baseBlock = 0x0044 }; -const struct WindowTemplate gUnknown_082F017C = { - .bg = 0x00, - .tilemapLeft = 0x14, - .tilemapTop = 0x03, - .width = 0x07, - .height = 0x04, - .paletteNum = 0x0f, +static const struct WindowTemplate sWindowTemplate_PlayerNameAndId = { + .bg = 0, + .tilemapLeft = 20, + .tilemapTop = 3, + .width = 7, + .height = 4, + .paletteNum = 15, .baseBlock = 0x00ee }; -const struct ListMenuItem gUnknown_082F0184[] = { +static const struct ListMenuItem sUnionRoomGroupsMenuItems[] = { { sText_EmptyString, 0 }, { sText_EmptyString, 1 }, { sText_EmptyString, 2 }, @@ -752,10 +762,10 @@ const struct ListMenuItem gUnknown_082F0184[] = { }; static const struct ListMenuTemplate sListMenuTemplate_UnionRoomGroups = { - .items = gUnknown_082F0184, + .items = sUnionRoomGroupsMenuItems, .moveCursorFunc = ListMenuDefaultCursorMoveFunc, .itemPrintFunc = ListMenuItemPrintFunc_UnionRoomGroups, - .totalItems = ARRAY_COUNT(gUnknown_082F0184), + .totalItems = ARRAY_COUNT(sUnionRoomGroupsMenuItems), .maxShowed = 5, .windowId = 0, .header_X = 0, @@ -773,27 +783,27 @@ static const struct ListMenuTemplate sListMenuTemplate_UnionRoomGroups = { }; static const struct WindowTemplate sWindowTemplate_InviteToActivity = { - .bg = 0x00, - .tilemapLeft = 0x14, - .tilemapTop = 0x05, - .width = 0x10, - .height = 0x08, - .paletteNum = 0x0f, + .bg = 0, + .tilemapLeft = 20, + .tilemapTop = 5, + .width = 16, + .height = 8, + .paletteNum = 15, .baseBlock = 0x0001 }; -const struct ListMenuItem gUnknown_082F0224[] = { - { sText_Greetings, 0x208 }, - { sText_Battle, 0x241 }, - { sText_Chat2, 0x245 }, - { sText_Exit, 0x040 } +static const struct ListMenuItem sInviteToActivityMenuItems[] = { + { sText_Greetings, ACTIVITY_CARD | LINK_GROUP_CAPACITY(0, 2)}, + { sText_Battle, ACTIVITY_BATTLE_SINGLE | IN_UNION_ROOM | LINK_GROUP_CAPACITY(0, 2)}, + { sText_Chat2, ACTIVITY_CHAT | IN_UNION_ROOM | LINK_GROUP_CAPACITY(0, 2)}, + { sText_Exit, ACTIVITY_NONE | IN_UNION_ROOM } }; static const struct ListMenuTemplate sListMenuTemplate_InviteToActivity = { - .items = gUnknown_082F0224, + .items = sInviteToActivityMenuItems, .moveCursorFunc = ListMenuDefaultCursorMoveFunc, .itemPrintFunc = NULL, - .totalItems = ARRAY_COUNT(gUnknown_082F0224), + .totalItems = ARRAY_COUNT(sInviteToActivityMenuItems), .maxShowed = 4, .windowId = 0, .header_X = 0, @@ -811,12 +821,12 @@ static const struct ListMenuTemplate sListMenuTemplate_InviteToActivity = { }; static const struct WindowTemplate sWindowTemplate_RegisterForTrade = { - .bg = 0x00, - .tilemapLeft = 0x12, - .tilemapTop = 0x07, - .width = 0x10, - .height = 0x06, - .paletteNum = 0x0f, + .bg = 0, + .tilemapLeft = 18, + .tilemapTop = 7, + .width = 16, + .height = 6, + .paletteNum = 15, .baseBlock = 0x0001 }; @@ -847,13 +857,13 @@ static const struct ListMenuTemplate sListMenuTemplate_RegisterForTrade = { .cursorKind = 0 }; -const struct WindowTemplate gUnknown_082F0294 = { - .bg = 0x00, - .tilemapLeft = 0x14, - .tilemapTop = 0x01, - .width = 0x10, - .height = 0x0c, - .paletteNum = 0x0f, +static const struct WindowTemplate sWindowTemplate_TradingBoardRequestType = { + .bg = 0, + .tilemapLeft = 20, + .tilemapTop = 1, + .width = 16, + .height = 12, + .paletteNum = 15, .baseBlock = 0x0001 }; @@ -899,23 +909,23 @@ static const struct ListMenuTemplate sMenuTemplate_TradingBoardRequestType = { .cursorKind = 0 }; -static const struct WindowTemplate sWindowTemplate_TradingBoard = { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x01, - .width = 0x1c, - .height = 0x02, - .paletteNum = 0x0d, +static const struct WindowTemplate sWindowTemplate_TradingBoardHeader = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 28, + .height = 2, + .paletteNum = 13, .baseBlock = 0x0001 }; -const struct WindowTemplate gUnknown_082F034C = { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x05, - .width = 0x1c, - .height = 0x0c, - .paletteNum = 0x0d, +static const struct WindowTemplate sWindowTemplate_TradingBoardMain = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 5, + .width = 28, + .height = 12, + .paletteNum = 13, .baseBlock = 0x0039 }; @@ -953,13 +963,14 @@ static const struct ListMenuTemplate sTradeBoardListMenuTemplate = { .cursorKind = 0 }; -const struct WindowTemplate UnrefWindowTemplate_082F03B4 = { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x05, - .width = 0x1c, - .height = 0x0c, - .paletteNum = 0x0d, +// Unused +static const struct WindowTemplate sWindowTemplate_Unused = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 5, + .width = 28, + .height = 12, + .paletteNum = 13, .baseBlock = 0x0039 }; @@ -983,7 +994,7 @@ static const struct ListMenuItem sEmptyListMenuItems[] = { }; // Unused -static const struct ListMenuTemplate sUnknownListMenuTemplate = { +static const struct ListMenuTemplate sEmptyListMenuTemplate = { .items = sEmptyListMenuItems, .moveCursorFunc = ListMenuDefaultCursorMoveFunc, .itemPrintFunc = ItemPrintFunc_EmptyList, @@ -1004,18 +1015,18 @@ static const struct ListMenuTemplate sUnknownListMenuTemplate = { .cursorKind = 0 }; -const struct WirelessGnameUnamePair sWirelessGnameUnamePair_Dummy = {0}; +static const struct RfuPlayerData sUnionRoomPlayer_DummyRfu = {0}; -ALIGNED(4) const u8 sAcceptedActivityIds_SingleBattle[] = {ACTIVITY_BATTLE_SINGLE, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_DoubleBattle[] = {ACTIVITY_BATTLE_DOUBLE, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_MultiBattle[] = {ACTIVITY_BATTLE_MULTI, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_Trade[] = {ACTIVITY_TRADE, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_PokemonJump[] = {ACTIVITY_POKEMON_JUMP, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_BerryCrush[] = {ACTIVITY_BERRY_CRUSH, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_BerryPicking[] = {ACTIVITY_BERRY_PICK, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_WonderCard[] = {ACTIVITY_WONDER_CARD2, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_WonderNews[] = {ACTIVITY_WONDER_NEWS2, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_Resume[] = { +ALIGNED(4) static const u8 sAcceptedActivityIds_SingleBattle[] = {ACTIVITY_BATTLE_SINGLE, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_DoubleBattle[] = {ACTIVITY_BATTLE_DOUBLE, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_MultiBattle[] = {ACTIVITY_BATTLE_MULTI, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_Trade[] = {ACTIVITY_TRADE, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_PokemonJump[] = {ACTIVITY_POKEMON_JUMP, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_BerryCrush[] = {ACTIVITY_BERRY_CRUSH, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_BerryPicking[] = {ACTIVITY_BERRY_PICK, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_WonderCard[] = {ACTIVITY_WONDER_CARD, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_WonderNews[] = {ACTIVITY_WONDER_NEWS, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_Resume[] = { IN_UNION_ROOM | ACTIVITY_NONE, IN_UNION_ROOM | ACTIVITY_BATTLE_SINGLE, IN_UNION_ROOM | ACTIVITY_TRADE, @@ -1027,8 +1038,8 @@ ALIGNED(4) const u8 sAcceptedActivityIds_Resume[] = { IN_UNION_ROOM | ACTIVITY_PLYRTALK, 0xff }; -ALIGNED(4) const u8 sAcceptedActivityIds_Init[] = {ACTIVITY_SEARCH, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_Unk11[] = { +ALIGNED(4) static const u8 sAcceptedActivityIds_Init[] = {ACTIVITY_SEARCH, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_Unk11[] = { ACTIVITY_BATTLE_SINGLE, ACTIVITY_BATTLE_DOUBLE, ACTIVITY_BATTLE_MULTI, @@ -1036,22 +1047,22 @@ ALIGNED(4) const u8 sAcceptedActivityIds_Unk11[] = { ACTIVITY_POKEMON_JUMP, ACTIVITY_BERRY_CRUSH, ACTIVITY_BERRY_PICK, - ACTIVITY_WONDER_CARD2, - ACTIVITY_WONDER_NEWS2, + ACTIVITY_WONDER_CARD, + ACTIVITY_WONDER_NEWS, ACTIVITY_SPIN_TRADE, 0xff }; -ALIGNED(4) const u8 sAcceptedActivityIds_RecordCorner[] = {ACTIVITY_RECORD_CORNER, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_BerryBlender[] = {ACTIVITY_BERRY_BLENDER, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_CoolContest[] = {ACTIVITY_CONTEST_COOL, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_BeautyContest[] = {ACTIVITY_CONTEST_BEAUTY, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_CuteContest[] = {ACTIVITY_CONTEST_CUTE, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_SmartContest[] = {ACTIVITY_CONTEST_SMART, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_ToughContest[] = {ACTIVITY_CONTEST_TOUGH, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_BattleTower[] = {ACTIVITY_BATTLE_TOWER, 0xff}; -ALIGNED(4) const u8 sAcceptedActivityIds_BattleTowerOpen[] = {ACTIVITY_BATTLE_TOWER_OPEN, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_RecordCorner[] = {ACTIVITY_RECORD_CORNER, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_BerryBlender[] = {ACTIVITY_BERRY_BLENDER, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_CoolContest[] = {ACTIVITY_CONTEST_COOL, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_BeautyContest[] = {ACTIVITY_CONTEST_BEAUTY, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_CuteContest[] = {ACTIVITY_CONTEST_CUTE, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_SmartContest[] = {ACTIVITY_CONTEST_SMART, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_ToughContest[] = {ACTIVITY_CONTEST_TOUGH, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_BattleTower[] = {ACTIVITY_BATTLE_TOWER, 0xff}; +ALIGNED(4) static const u8 sAcceptedActivityIds_BattleTowerOpen[] = {ACTIVITY_BATTLE_TOWER_OPEN, 0xff}; -const u8 *const sAcceptedActivityIds[NUM_LINK_GROUP_TYPES] = { +static const u8 *const sAcceptedActivityIds[NUM_LINK_GROUP_TYPES] = { [LINK_GROUP_SINGLE_BATTLE] = sAcceptedActivityIds_SingleBattle, [LINK_GROUP_DOUBLE_BATTLE] = sAcceptedActivityIds_DoubleBattle, [LINK_GROUP_MULTI_BATTLE] = sAcceptedActivityIds_MultiBattle, @@ -1085,8 +1096,8 @@ static const u8 sLinkGroupToURoomActivity[NUM_LINK_GROUP_TYPES + 2] = [LINK_GROUP_POKEMON_JUMP] = ACTIVITY_POKEMON_JUMP, [LINK_GROUP_BERRY_CRUSH] = ACTIVITY_BERRY_CRUSH, [LINK_GROUP_BERRY_PICKING] = ACTIVITY_BERRY_PICK, - [LINK_GROUP_WONDER_CARD] = ACTIVITY_WONDER_CARD2, - [LINK_GROUP_WONDER_NEWS] = ACTIVITY_WONDER_NEWS2, + [LINK_GROUP_WONDER_CARD] = ACTIVITY_WONDER_CARD, + [LINK_GROUP_WONDER_NEWS] = ACTIVITY_WONDER_NEWS, [LINK_GROUP_UNION_ROOM_RESUME] = ACTIVITY_NONE, [LINK_GROUP_UNION_ROOM_INIT] = ACTIVITY_NONE, [LINK_GROUP_UNK_11] = ACTIVITY_NONE, diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 9b1f4ceb6c..9708993690 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1138,22 +1138,22 @@ u8 player_get_pos_including_state_based_drift(s16 *x, s16 *y) switch (object->movementActionId) { - case MOVEMENT_ACTION_WALK_NORMAL_DOWN: - case MOVEMENT_ACTION_PLAYER_RUN_DOWN: - (*y)++; - return TRUE; - case MOVEMENT_ACTION_WALK_NORMAL_UP: - case MOVEMENT_ACTION_PLAYER_RUN_UP: - (*y)--; - return TRUE; - case MOVEMENT_ACTION_WALK_NORMAL_LEFT: - case MOVEMENT_ACTION_PLAYER_RUN_LEFT: - (*x)--; - return TRUE; - case MOVEMENT_ACTION_WALK_NORMAL_RIGHT: - case MOVEMENT_ACTION_PLAYER_RUN_RIGHT: - (*x)++; - return TRUE; + case MOVEMENT_ACTION_WALK_NORMAL_DOWN: + case MOVEMENT_ACTION_PLAYER_RUN_DOWN: + (*y)++; + return TRUE; + case MOVEMENT_ACTION_WALK_NORMAL_UP: + case MOVEMENT_ACTION_PLAYER_RUN_UP: + (*y)--; + return TRUE; + case MOVEMENT_ACTION_WALK_NORMAL_LEFT: + case MOVEMENT_ACTION_PLAYER_RUN_LEFT: + (*x)--; + return TRUE; + case MOVEMENT_ACTION_WALK_NORMAL_RIGHT: + case MOVEMENT_ACTION_PLAYER_RUN_RIGHT: + (*x)++; + return TRUE; } } diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c index 309fc4eadb..55c80580eb 100644 --- a/src/librfu_rfu.c +++ b/src/librfu_rfu.c @@ -1,6 +1,14 @@ #include #include "librfu.h" +// If expanding the length of the player name and wireless link functionality is +// desired, ensure that the name string is limited in size when it's copied from the +// saveblock to any Rfu-related fields (e.g. in SetHostRfuUsername). +// If wireless link functionality is not desired ignore or delete this warning. +#if RFU_USER_NAME_LENGTH < (PLAYER_NAME_LENGTH + 1) +#warning "The Wireless Adapter hardware expects a username of no more than 8 bytes." +#endif + struct LLSFStruct { u8 frameSize; diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index b1e2c698f0..a080630c10 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -29,17 +29,17 @@ enum { RFUSTATE_CHILD_CONNECT_END, RFUSTATE_8, // Unused RFUSTATE_RECONNECTED, - RFUSTATE_10, + RFUSTATE_CONNECTED, RFUSTATE_CHILD_TRY_JOIN, RFUSTATE_CHILD_JOINED, - RFUSTATE_13, + RFUSTATE_UR_PLAYER_EXCHANGE, RFUSTATE_14, RFUSTATE_15, RFUSTATE_UR_FINALIZE, }; // These states are re-used for different purposes #define RFUSTATE_17 17 -#define RFUSTATE_18 18 +#define RFUSTATE_PARENT_RECONNECT 18 #define RFUSTATE_PARENT_FINALIZE_START 17 #define RFUSTATE_PARENT_FINALIZE 18 @@ -47,15 +47,24 @@ enum { #define RFUSTATE_UR_CONNECT_END 18 #define RFUSTATE_FINALIZED 20 +// States for the 'receiving' field of RfuBlockSend +enum { + RECV_STATE_READY, + RECV_STATE_RECEIVING, + RECV_STATE_FINISHED, +}; + struct SioInfo { - char magic[15]; // PokemonSioInfo + char magic[sizeof("PokemonSioInfo")]; u8 playerCount; u8 linkPlayerIdx[RFU_CHILD_MAX]; struct LinkPlayer linkPlayers[MAX_RFU_PLAYERS]; u8 filler[92]; }; +// Struct is mostly empty, presumably because usage of +// its fields was largely removed before release struct RfuDebug { u8 filler0[6]; @@ -64,31 +73,33 @@ struct RfuDebug vu8 unk_0e; u8 childJoinCount; u8 filler2[84]; - u16 unk_64; + u16 blockSendFailures; u8 filler3[29]; u8 blockSendTime; u8 filler4[88]; }; -u32 gf_rfu_REQ_api[RFU_API_BUFF_SIZE_RAM / 4]; -struct GFRfuManager Rfu; +u32 gRfuAPIBuffer[RFU_API_BUFF_SIZE_RAM / 4]; +struct RfuManager gRfu; static u8 sHeldKeyCount; -static u8 sResendBlock8[16]; -static u16 sResendBlock16[8]; +static u8 sResendBlock8[CMD_LENGTH * 2]; +static u16 sResendBlock16[CMD_LENGTH]; -EWRAM_DATA struct GFtgtGname gHostRFUtgtGnameBuffer = {}; -EWRAM_DATA u8 gHostRFUtgtUnameBuffer[PLAYER_NAME_LENGTH + 1] = {}; +EWRAM_DATA struct RfuGameData gHostRfuGameData = {}; +EWRAM_DATA u8 gHostRfuUsername[RFU_USER_NAME_LENGTH] = {}; static EWRAM_DATA INIT_PARAM sRfuReqConfig = {}; static EWRAM_DATA struct RfuDebug sRfuDebug = {}; static void ResetSendDataManager(struct RfuBlockSend *); static void InitChildRecvBuffers(void); static void sub_800EAFC(void); -static void sub_800ED34(u16); +static void LinkManagerCB_MSC(u16); static void sub_800EDBC(u16); static void UpdateBackupQueue(void); -static void Task_ExchangeLinkPlayers(u8); +static void Task_PlayerExchange(u8); +static void Task_PlayerExchangeUpdate(u8); +static void Task_PlayerExchangeChat(u8); static void RfuHandleReceiveCommand(u8); static void CallRfuFunc(void); static void RfuPrepareSendBuffer(u16); @@ -97,16 +108,14 @@ static void SendNextBlock(void); static void SendLastBlock(void); static u8 GetPartnerIndexByNameAndTrainerID(const u8 *, u16); static void UpdateChildStatuses(void); -static s32 sub_80107A0(void); -static void sub_801084C(u8); +static s32 GetJoinGroupStatus(void); static void ClearSelectedLinkPlayerIds(u16); static void ValidateAndReceivePokemonSioInfo(void *); -static void sub_8010D0C(u8); static void sub_80115EC(s32); -static void sub_8011BF8(void); +static void CB2_RfuIdle(void); static void RfuReqDisconnectSlot(u32); static void SendDisconnectCommand(u32, u32); -static void sub_801209C(u8); +static void Task_TryConnectToUnionRoomParent(u8); static void Debug_PrintEmpty(void); static void Task_Idle(u8); @@ -115,13 +124,13 @@ static const INIT_PARAM sRfuReqConfigTemplate = { .MC_TimerCount = 32, .availSlot_flag = 0, .mboot_flag = 0, - .serialNo = 2, - .gameName = (void *)&gHostRFUtgtGnameBuffer, - .userName = gHostRFUtgtUnameBuffer, + .serialNo = RFU_SERIAL_GAME, + .gameName = (void *)&gHostRfuGameData, + .userName = gHostRfuUsername, .fastSearchParent_flag = TRUE, .linkRecovery_enable = FALSE, .linkRecovery_period = 600, - .NI_failCounter_limit = 0x12c + .NI_failCounter_limit = 300 }; static const u8 sAvailSlots[] = { @@ -131,33 +140,35 @@ static const u8 sAvailSlots[] = { [4] = AVAIL_SLOT4 }; +#define BLOCK_MASK(bitNum)((1 << (bitNum)) - 1) static const u32 sAllBlocksReceived[] = { - 0x000000, - 0x000001, - 0x000003, - 0x000007, - 0x00000f, - 0x00001f, - 0x00003f, - 0x00007f, - 0x0000ff, - 0x0001ff, - 0x0003ff, - 0x0007ff, - 0x000fff, - 0x001fff, - 0x003fff, - 0x007fff, - 0x00ffff, - 0x01ffff, - 0x03ffff, - 0x07ffff, - 0x0fffff, - 0x1fffff, - 0x3fffff, - 0x7fffff, - 0xffffff + BLOCK_MASK(0), + BLOCK_MASK(1), + BLOCK_MASK(2), + BLOCK_MASK(3), + BLOCK_MASK(4), + BLOCK_MASK(5), + BLOCK_MASK(6), + BLOCK_MASK(7), + BLOCK_MASK(8), + BLOCK_MASK(9), + BLOCK_MASK(10), + BLOCK_MASK(11), + BLOCK_MASK(12), + BLOCK_MASK(13), + BLOCK_MASK(14), + BLOCK_MASK(15), + BLOCK_MASK(16), + BLOCK_MASK(17), + BLOCK_MASK(18), + BLOCK_MASK(19), + BLOCK_MASK(20), + BLOCK_MASK(21), + BLOCK_MASK(22), + BLOCK_MASK(23), + BLOCK_MASK(24), }; +#undef BLOCK_MASK static const u8 sUnknown_082ED68C[] = { 0, 0, 1, @@ -186,23 +197,25 @@ static const u8 sPlayerBitsToCount[1 << (MAX_RFU_PLAYERS - 1)] = { 4 // 1111 }; -static const u8 sUnknown_082ED6A5[1 << (MAX_RFU_PLAYERS - 1)] = { - 0, - 0, - 1, - 0, - 2, - 0, - 1, - 0, - 3, - 0, - 1, - 0, - 2, - 0, - 1, - 0 +// If the 4 bits representing child slots were an array, this table +// would return the index of the most recently set bit +static const u8 sPlayerBitsToNewChildIdx[1 << (MAX_RFU_PLAYERS - 1)] = { + 0, // 0000 + 0, // 0001 + 1, // 0010 + 0, // 0011 + 2, // 0100 + 0, // 0101 + 1, // 0110 + 0, // 0111 + 3, // 1000 + 0, // 1001 + 1, // 1010 + 0, // 1011 + 2, // 1100 + 0, // 1101 + 1, // 1110 + 0 // 1111 }; static const struct BlockRequest sBlockRequests[] = { @@ -214,9 +227,9 @@ static const struct BlockRequest sBlockRequests[] = { }; static const u16 sAcceptedSerialNos[] = { - RFU_SERIAL_A, - RFU_SERIAL_B, - RFU_SERIAL_C, + RFU_SERIAL_GAME, + RFU_SERIAL_WONDER_DISTRIBUTOR, + RFU_SERIAL_UNKNOWN, RFU_SERIAL_END }; @@ -244,9 +257,9 @@ static const char sASCII_RecoverCmds[][16] = { // List of additional tasks to destroy (if active) when the RFU shuts down static const TaskFunc sShutdownTasks[] = { - sub_801084C, - Task_ExchangeLinkPlayers, - sub_8010D0C + Task_PlayerExchange, + Task_PlayerExchangeUpdate, + Task_PlayerExchangeChat }; static const char sASCII_PokemonSioInfo[] = "PokemonSioInfo"; @@ -286,17 +299,17 @@ static void Debug_PrintNum(u16 num, u8 x, u8 y, u8 numDigits) void ResetLinkRfuGFLayer(void) { s32 i; - u8 errorState = Rfu.errorState; - CpuFill16(0, &Rfu, sizeof Rfu); - Rfu.errorState = errorState; - Rfu.parentChild = 0xFF; - if (Rfu.errorState != RFU_ERROR_STATE_IGNORE) - Rfu.errorState = RFU_ERROR_STATE_NONE; + u8 errorState = gRfu.errorState; + CpuFill16(0, &gRfu, sizeof(gRfu)); + gRfu.errorState = errorState; + gRfu.parentChild = 0xFF; + if (gRfu.errorState != RFU_ERROR_STATE_IGNORE) + gRfu.errorState = RFU_ERROR_STATE_NONE; for (i = 0; i < MAX_RFU_PLAYERS; i++) - ResetSendDataManager(&Rfu.recvBlock[i]); - ResetSendDataManager(&Rfu.sendBlock); - RfuRecvQueue_Reset(&Rfu.recvQueue); - RfuSendQueue_Reset(&Rfu.sendQueue); + ResetSendDataManager(&gRfu.recvBlock[i]); + ResetSendDataManager(&gRfu.sendBlock); + RfuRecvQueue_Reset(&gRfu.recvQueue); + RfuSendQueue_Reset(&gRfu.sendQueue); CpuFill16(0, gSendCmd, sizeof gSendCmd); CpuFill16(0, gRecvCmds, sizeof gRecvCmds); CpuFill16(0, gLinkPlayers, sizeof gLinkPlayers); @@ -317,7 +330,7 @@ void InitRFU(void) void InitRFUAPI(void) { - if (!rfu_initializeAPI((void *)gf_rfu_REQ_api, sizeof gf_rfu_REQ_api, &gIntrTable[1], TRUE)) + if (!rfu_initializeAPI((void *)gRfuAPIBuffer, sizeof(gRfuAPIBuffer), &gIntrTable[1], TRUE)) { gLinkType = 0; ClearSavedLinkPlayers(); @@ -327,47 +340,47 @@ void InitRFUAPI(void) } } -static void Task_LinkLeaderSearchForChildren(u8 taskId) +static void Task_ParentSearchForChildren(u8 taskId) { UpdateChildStatuses(); - switch (Rfu.state) + switch (gRfu.state) { case RFUSTATE_INIT: rfu_LMAN_initializeRFU(&sRfuReqConfig); - Rfu.state = RFUSTATE_INIT_END; + gRfu.state = RFUSTATE_INIT_END; gTasks[taskId].data[1] = 1; break; case RFUSTATE_INIT_END: break; case RFUSTATE_PARENT_CONNECT: - rfu_LMAN_establishConnection(Rfu.parentChild, 0, 240, (u16 *)sAcceptedSerialNos); - Rfu.state = RFUSTATE_PARENT_CONNECT_END; + rfu_LMAN_establishConnection(gRfu.parentChild, 0, 240, (u16 *)sAcceptedSerialNos); + gRfu.state = RFUSTATE_PARENT_CONNECT_END; gTasks[taskId].data[1] = 6; break; case RFUSTATE_PARENT_CONNECT_END: break; case RFUSTATE_STOP_MANAGER: rfu_LMAN_stopManager(FALSE); - Rfu.state = RFUSTATE_STOP_MANAGER_END; + gRfu.state = RFUSTATE_STOP_MANAGER_END; break; case RFUSTATE_STOP_MANAGER_END: break; case RFUSTATE_PARENT_FINALIZE: - Rfu.unk_cdb = FALSE; + gRfu.unk_cdb = FALSE; rfu_LMAN_setMSCCallback(sub_800EDBC); InitChildRecvBuffers(); sub_800EAFC(); - Rfu.state = RFUSTATE_FINALIZED; + gRfu.state = RFUSTATE_FINALIZED; gTasks[taskId].data[1] = 8; - CreateTask(sub_801084C, 5); + CreateTask(Task_PlayerExchange, 5); DestroyTask(taskId); break; } } -s32 sub_800E87C(u8 slot) +s32 Rfu_GetIndexOfNewestChild(u8 bits) { - return sUnknown_082ED6A5[slot]; + return sPlayerBitsToNewChildIdx[bits]; } void sub_800E88C(s32 r2, s32 r5) @@ -382,7 +395,7 @@ void sub_800E88C(s32 r2, s32 r5) { if (r2 & 1) { - Rfu.linkPlayerIdx[i] = r4; + gRfu.linkPlayerIdx[i] = r4; r4++; } } @@ -392,36 +405,36 @@ void sub_800E88C(s32 r2, s32 r5) for (i = 0; i < RFU_CHILD_MAX; r1 >>= 1, i++) { if (!(r1 & 1)) - Rfu.linkPlayerIdx[i] = 0; + gRfu.linkPlayerIdx[i] = 0; } for (r4 = RFU_CHILD_MAX; r4 != 0; r4--) { - for (i = 0; i < RFU_CHILD_MAX && Rfu.linkPlayerIdx[i] != r4; i++); + for (i = 0; i < RFU_CHILD_MAX && gRfu.linkPlayerIdx[i] != r4; i++); if (i == RFU_CHILD_MAX) r6 = r4; } for (r5 &= ~r2, i = 0; i < RFU_CHILD_MAX; r5 >>= 1, i++) { if (r5 & 1) - Rfu.linkPlayerIdx[i] = r6++; + gRfu.linkPlayerIdx[i] = r6++; } } } -static void Task_JoinGroupSearchForParent(u8 taskId) +static void Task_ChildSearchForParent(u8 taskId) { - switch (Rfu.state) + switch (gRfu.state) { case RFUSTATE_INIT: rfu_LMAN_initializeRFU((INIT_PARAM *)&sRfuReqConfigTemplate); - Rfu.state = RFUSTATE_INIT_END; + gRfu.state = RFUSTATE_INIT_END; gTasks[taskId].data[1] = 1; break; case RFUSTATE_INIT_END: break; case RFUSTATE_CHILD_CONNECT: - rfu_LMAN_establishConnection(Rfu.parentChild, 0, 240, (u16 *)sAcceptedSerialNos); - Rfu.state = RFUSTATE_CHILD_CONNECT_END; + rfu_LMAN_establishConnection(gRfu.parentChild, 0, 240, (u16 *)sAcceptedSerialNos); + gRfu.state = RFUSTATE_CHILD_CONNECT_END; gTasks[taskId].data[1] = 7; break; case RFUSTATE_CHILD_CONNECT_END: @@ -430,25 +443,25 @@ static void Task_JoinGroupSearchForParent(u8 taskId) gTasks[taskId].data[1] = 10; break; case RFUSTATE_CHILD_TRY_JOIN: - switch (sub_80107A0()) + switch (GetJoinGroupStatus()) { case RFU_STATUS_JOIN_GROUP_OK: - Rfu.state = RFUSTATE_CHILD_JOINED; + gRfu.state = RFUSTATE_CHILD_JOINED; break; case RFU_STATUS_JOIN_GROUP_NO: case RFU_STATUS_LEAVE_GROUP: rfu_LMAN_requestChangeAgbClockMaster(); - Rfu.disconnectMode = RFU_DISCONNECT_NORMAL; + gRfu.disconnectMode = RFU_DISCONNECT_NORMAL; DestroyTask(taskId); break; } break; case RFUSTATE_CHILD_JOINED: { - u8 bmChildSlot = 1 << Rfu.childSlot; - rfu_clearSlot(TYPE_NI_SEND | TYPE_NI_RECV, Rfu.childSlot); - rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, sizeof(Rfu.unk_c3f)); - rfu_UNI_setSendData(bmChildSlot, Rfu.childSendBuffer, sizeof(Rfu.childSendBuffer)); + u8 bmChildSlot = 1 << gRfu.childSlot; + rfu_clearSlot(TYPE_NI_SEND | TYPE_NI_RECV, gRfu.childSlot); + rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.unk_c3f, sizeof(gRfu.unk_c3f)); + rfu_UNI_setSendData(bmChildSlot, gRfu.childSendBuffer, sizeof(gRfu.childSendBuffer)); gTasks[taskId].data[1] = 8; DestroyTask(taskId); if (sRfuDebug.childJoinCount == 0) @@ -456,7 +469,7 @@ static void Task_JoinGroupSearchForParent(u8 taskId) Debug_PrintEmpty(); sRfuDebug.childJoinCount++; } - CreateTask(sub_801084C, 5); + CreateTask(Task_PlayerExchange, 5); break; } } @@ -470,7 +483,7 @@ static void InitChildRecvBuffers(void) { if (acceptSlot & 1) { - rfu_setRecvBuffer(TYPE_UNI, i, Rfu.childRecvBuffer[i], sizeof(Rfu.childRecvBuffer[0])); + rfu_setRecvBuffer(TYPE_UNI, i, gRfu.childRecvBuffer[i], sizeof(gRfu.childRecvBuffer[0])); rfu_clearSlot(TYPE_UNI_SEND | TYPE_UNI_RECV, i); } acceptSlot >>= 1; @@ -480,67 +493,67 @@ static void InitChildRecvBuffers(void) static void sub_800EAFC(void) { u8 acceptSlot = lman.acceptSlot_flag; - rfu_UNI_setSendData(acceptSlot, Rfu.recvCmds, 70); - Rfu.unk_cda = sub_800E87C(acceptSlot); - Rfu.unk_ce2 = acceptSlot; + rfu_UNI_setSendData(acceptSlot, gRfu.recvCmds, 70); + gRfu.unk_cda = Rfu_GetIndexOfNewestChild(acceptSlot); + gRfu.unk_ce2 = acceptSlot; sub_800E88C(acceptSlot, -1); - Rfu.parentChild = MODE_PARENT; + gRfu.parentChild = MODE_PARENT; } -#define tData7 data[7] // sub_ +#define tConnectingForChat data[7] -static void Task_LinkRfu_UnionRoomListen(u8 taskId) +static void Task_UnionRoomListen(u8 taskId) { - if (GetHostRFUtgtGname()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM) && RfuGetStatus() == RFU_STATUS_NEW_CHILD_DETECTED) + if (GetHostRfuGameData()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM) && RfuGetStatus() == RFU_STATUS_NEW_CHILD_DETECTED) { rfu_REQ_disconnect(lman.acceptSlot_flag); rfu_waitREQComplete(); RfuSetStatus(RFU_STATUS_OK, 0); } - switch (Rfu.state) + switch (gRfu.state) { case RFUSTATE_INIT: rfu_LMAN_initializeRFU(&sRfuReqConfig); - Rfu.state = RFUSTATE_INIT_END; + gRfu.state = RFUSTATE_INIT_END; gTasks[taskId].data[1] = 1; break; case RFUSTATE_INIT_END: break; case RFUSTATE_UR_CONNECT: rfu_LMAN_establishConnection(MODE_P_C_SWITCH, 0, 240, (u16 *)sAcceptedSerialNos); - rfu_LMAN_setMSCCallback(sub_800ED34); - Rfu.state = RFUSTATE_UR_CONNECT_END; + rfu_LMAN_setMSCCallback(LinkManagerCB_MSC); + gRfu.state = RFUSTATE_UR_CONNECT_END; break; case RFUSTATE_UR_CONNECT_END: break; - case RFUSTATE_13: - if (rfu_UNI_setSendData(1 << Rfu.childSlot, Rfu.childSendBuffer, sizeof(Rfu.childSendBuffer)) == 0) + case RFUSTATE_UR_PLAYER_EXCHANGE: + if (rfu_UNI_setSendData(1 << gRfu.childSlot, gRfu.childSendBuffer, sizeof(gRfu.childSendBuffer)) == 0) { - Rfu.parentChild = MODE_CHILD; + gRfu.parentChild = MODE_CHILD; DestroyTask(taskId); - if (gTasks[taskId].tData7) - CreateTask(sub_8010D0C, 1); + if (gTasks[taskId].tConnectingForChat) + CreateTask(Task_PlayerExchangeChat, 1); else - CreateTask(sub_801084C, 5); + CreateTask(Task_PlayerExchange, 5); } break; case RFUSTATE_14: rfu_LMAN_stopManager(0); - Rfu.state = RFUSTATE_15; + gRfu.state = RFUSTATE_15; break; case RFUSTATE_15: break; case RFUSTATE_UR_FINALIZE: - Rfu.unk_cdb = FALSE; + gRfu.unk_cdb = FALSE; rfu_LMAN_setMSCCallback(sub_800EDBC); UpdateGameData_GroupLockedIn(TRUE); InitChildRecvBuffers(); sub_800EAFC(); - Rfu.state = RFUSTATE_FINALIZED; + gRfu.state = RFUSTATE_FINALIZED; gTasks[taskId].data[1] = 8; - Rfu.parentChild = MODE_PARENT; - CreateTask(sub_801084C, 5); - Rfu.unk_ce8 = TRUE; + gRfu.parentChild = MODE_PARENT; + CreateTask(Task_PlayerExchange, 5); + gRfu.unk_ce8 = TRUE; DestroyTask(taskId); break; } @@ -556,30 +569,30 @@ void LinkRfu_StopManagerBeforeEnteringChat(void) rfu_LMAN_stopManager(FALSE); } -static void sub_800ED34(u16 unused) +static void LinkManagerCB_MSC(u16 unused) { s32 i; for (i = 0; i < CHILD_DATA_LENGTH; i++) - Rfu.childSendBuffer[i] = 0; + gRfu.childSendBuffer[i] = 0; rfu_REQ_recvData(); rfu_waitREQComplete(); - if (gRfuSlotStatusUNI[Rfu.childSlot]->recv.newDataFlag) + if (gRfuSlotStatusUNI[gRfu.childSlot]->recv.newDataFlag) { - Rfu.childSendCount++; - RfuRecvQueue_Enqueue(&Rfu.recvQueue, Rfu.unk_c3f); + gRfu.childSendCount++; + RfuRecvQueue_Enqueue(&gRfu.recvQueue, gRfu.unk_c3f); sRfuDebug.unk_06++; UpdateBackupQueue(); - rfu_UNI_readySendData(Rfu.childSlot); - rfu_UNI_clearRecvNewDataFlag(Rfu.childSlot); + rfu_UNI_readySendData(gRfu.childSlot); + rfu_UNI_clearRecvNewDataFlag(gRfu.childSlot); } rfu_LMAN_REQ_sendData(TRUE); } static void sub_800EDBC(u16 unused) { - Rfu.unk_cdb = TRUE; + gRfu.unk_cdb = TRUE; } void LinkRfu_Shutdown(void) @@ -587,30 +600,30 @@ void LinkRfu_Shutdown(void) u8 i; rfu_LMAN_powerDownRFU(); - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) { // Stop parent searching for children - if (FuncIsActiveTask(Task_LinkLeaderSearchForChildren) == TRUE) + if (FuncIsActiveTask(Task_ParentSearchForChildren) == TRUE) { - DestroyTask(Rfu.searchTaskId); + DestroyTask(gRfu.searchTaskId); ResetLinkRfuGFLayer(); } } - else if (Rfu.parentChild == MODE_CHILD) + else if (gRfu.parentChild == MODE_CHILD) { // Stop child searching for parent - if (FuncIsActiveTask(Task_JoinGroupSearchForParent) == TRUE) + if (FuncIsActiveTask(Task_ChildSearchForParent) == TRUE) { - DestroyTask(Rfu.searchTaskId); + DestroyTask(gRfu.searchTaskId); ResetLinkRfuGFLayer(); } } - else if (Rfu.parentChild == MODE_P_C_SWITCH) + else if (gRfu.parentChild == MODE_P_C_SWITCH) { // Stop parent-child switching mode (union room) - if (FuncIsActiveTask(Task_LinkRfu_UnionRoomListen) == TRUE) + if (FuncIsActiveTask(Task_UnionRoomListen) == TRUE) { - DestroyTask(Rfu.searchTaskId); + DestroyTask(gRfu.searchTaskId); ResetLinkRfuGFLayer(); } } @@ -623,32 +636,32 @@ void LinkRfu_Shutdown(void) } } -static void CreateTask_LinkLeaderSearchForChildren(void) +static void CreateTask_ParentSearchForChildren(void) { - Rfu.searchTaskId = CreateTask(Task_LinkLeaderSearchForChildren, 1); + gRfu.searchTaskId = CreateTask(Task_ParentSearchForChildren, 1); } // If no parent ID (or if child connection not ready) can't reconnect with parent yet static bool8 CanTryReconnectParent(void) { - if (Rfu.state == RFUSTATE_CHILD_CONNECT_END && Rfu.parentId) + if (gRfu.state == RFUSTATE_CHILD_CONNECT_END && gRfu.parentId) return TRUE; return FALSE; } static bool32 TryReconnectParent(void) { - if (Rfu.state == RFUSTATE_CHILD_CONNECT_END && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[Rfu.unk_c3d].id, 240)) + if (gRfu.state == RFUSTATE_CHILD_CONNECT_END && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[gRfu.unk_c3d].id, 240)) { - Rfu.state = RFUSTATE_RECONNECTED; + gRfu.state = RFUSTATE_RECONNECTED; return TRUE; } return FALSE; } -static void CreateTask_JoinGroupSearchForParent(void) +static void CreateTask_ChildSearchForParent(void) { - Rfu.searchTaskId = CreateTask(Task_JoinGroupSearchForParent, 1); + gRfu.searchTaskId = CreateTask(Task_ChildSearchForParent, 1); } bool8 LmanAcceptSlotFlagIsNotZero(void) @@ -660,15 +673,15 @@ bool8 LmanAcceptSlotFlagIsNotZero(void) void LinkRfu_StopManagerAndFinalizeSlots(void) { - Rfu.state = RFUSTATE_STOP_MANAGER; - Rfu.acceptSlot_flag = lman.acceptSlot_flag; + gRfu.state = RFUSTATE_STOP_MANAGER; + gRfu.acceptSlot_flag = lman.acceptSlot_flag; } bool32 WaitRfuState(bool32 force) { - if (Rfu.state == RFUSTATE_PARENT_FINALIZE_START || force) + if (gRfu.state == RFUSTATE_PARENT_FINALIZE_START || force) { - Rfu.state = RFUSTATE_PARENT_FINALIZE; + gRfu.state = RFUSTATE_PARENT_FINALIZE; return TRUE; } return FALSE; @@ -676,7 +689,7 @@ bool32 WaitRfuState(bool32 force) void sub_800EF7C(void) { - Rfu.state = RFUSTATE_14; + gRfu.state = RFUSTATE_14; } // Unused @@ -699,13 +712,13 @@ static void sub_800EFB0(void) { s32 i, j; - for (i = 0; i < 5; i++) + for (i = 0; i < MAX_RFU_PLAYERS; i++) { - struct GFRfuManager *ptr = &Rfu; - for (j = 0; j < 7; j++) + struct RfuManager *rfu = &gRfu; + for (j = 0; j < CMD_LENGTH - 1; j++) { - ptr->recvCmds[i][j][1] = gRecvCmds[i][j] >> 8; - ptr->recvCmds[i][j][0] = gRecvCmds[i][j]; + rfu->recvCmds[i][j][1] = gRecvCmds[i][j] >> 8; + rfu->recvCmds[i][j][0] = gRecvCmds[i][j]; } } CpuFill16(0, gRecvCmds, sizeof gRecvCmds); @@ -723,20 +736,20 @@ static void MoveSendCmdToRecv(void) static void UpdateBackupQueue(void) { - if (Rfu.linkRecovered) + if (gRfu.linkRecovered) { - bool8 backupEmpty = RfuBackupQueue_Dequeue(&Rfu.backupQueue, Rfu.childSendBuffer); + bool8 backupEmpty = RfuBackupQueue_Dequeue(&gRfu.backupQueue, gRfu.childSendBuffer); - if (Rfu.backupQueue.count == 0) - Rfu.linkRecovered = FALSE; + if (gRfu.backupQueue.count == 0) + gRfu.linkRecovered = FALSE; if (backupEmpty) return; } - if (!Rfu.linkRecovered) + if (!gRfu.linkRecovered) { - RfuSendQueue_Dequeue(&Rfu.sendQueue, Rfu.childSendBuffer); - RfuBackupQueue_Enqueue(&Rfu.backupQueue, Rfu.childSendBuffer); + RfuSendQueue_Dequeue(&gRfu.sendQueue, gRfu.childSendBuffer); + RfuBackupQueue_Enqueue(&gRfu.backupQueue, gRfu.childSendBuffer); } } @@ -745,26 +758,20 @@ bool32 IsRfuRecvQueueEmpty(void) s32 i; s32 j; - if (gRfuLinkStatus->sendSlotUNIFlag == 0) - { + if (!gRfuLinkStatus->sendSlotUNIFlag) return FALSE; - } + for (i = 0; i < MAX_RFU_PLAYERS; i++) - { for (j = 0; j < CMD_LENGTH - 1; j++) - { if (gRecvCmds[i][j] != 0) - { return FALSE; - } - } - } + return TRUE; } static bool32 RfuMain1_Parent(void) { - if (Rfu.state < RFUSTATE_FINALIZED) + if (gRfu.state < RFUSTATE_FINALIZED) { rfu_REQ_recvData(); rfu_waitREQComplete(); @@ -772,16 +779,16 @@ static bool32 RfuMain1_Parent(void) } else { - Rfu.unk_cdb = FALSE; - if ((Rfu.unk_ce2 & gRfuLinkStatus->connSlotFlag) == Rfu.unk_ce2 && (Rfu.unk_ce2 & gRfuLinkStatus->connSlotFlag)) + gRfu.unk_cdb = FALSE; + if ((gRfu.unk_ce2 & gRfuLinkStatus->connSlotFlag) == gRfu.unk_ce2 && (gRfu.unk_ce2 & gRfuLinkStatus->connSlotFlag)) { - if (!Rfu.unk_cdc) + if (!gRfu.unk_cdc) { - if (Rfu.disconnectSlots) + if (gRfu.disconnectSlots) { - RfuReqDisconnectSlot(Rfu.disconnectSlots); - Rfu.disconnectSlots = 0; - if (Rfu.disconnectMode == RFU_DISCONNECT_ERROR) + RfuReqDisconnectSlot(gRfu.disconnectSlots); + gRfu.disconnectSlots = 0; + if (gRfu.disconnectMode == RFU_DISCONNECT_ERROR) { RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x8000); GetLinkmanErrorParams(0x8000); @@ -795,14 +802,14 @@ static bool32 RfuMain1_Parent(void) } } sub_800EFB0(); - rfu_UNI_readySendData(Rfu.unk_cda); + rfu_UNI_readySendData(gRfu.unk_cda); rfu_LMAN_REQ_sendData(TRUE); } else { rfu_REQ_PARENT_resumeRetransmitAndChange(); } - Rfu.unk_0e = TRUE; + gRfu.unk_0e = TRUE; } } return FALSE; @@ -816,43 +823,43 @@ static bool32 RfuMain2_Parent(void) u16 j; u8 retval; - if (Rfu.state >= RFUSTATE_FINALIZED && Rfu.unk_0e == TRUE) + if (gRfu.state >= RFUSTATE_FINALIZED && gRfu.unk_0e == TRUE) { rfu_waitREQComplete(); - while (Rfu.unk_cdb == FALSE) + while (gRfu.unk_cdb == FALSE) { - if (Rfu.errorState != RFU_ERROR_STATE_NONE) + if (gRfu.errorState != RFU_ERROR_STATE_NONE) return FALSE; } rfu_REQ_recvData(); rfu_waitREQComplete(); - if ((lman.parentAck_flag & Rfu.unk_ce2) == Rfu.unk_ce2) + if ((lman.parentAck_flag & gRfu.unk_ce2) == gRfu.unk_ce2) { - Rfu.unk_cdc = FALSE; + gRfu.unk_cdc = FALSE; sRfuDebug.unk_06++; flags = lman.acceptSlot_flag; for (i = 0; i < RFU_CHILD_MAX; i++) { if (flags & 1) { - if (Rfu.childRecvBuffer[i][1]) + if (gRfu.childRecvBuffer[i][1]) { - if (Rfu.unk_cee[i] != 0xFF && (Rfu.childRecvBuffer[i][0] >> 5) != ((Rfu.unk_cee[i] + 1) & 7)) + if (gRfu.unk_cee[i] != 0xFF && (gRfu.childRecvBuffer[i][0] >> 5) != ((gRfu.unk_cee[i] + 1) & 7)) { - if (++Rfu.unk_cea[i] > 4) + if (++gRfu.unk_cea[i] > 4) GetLinkmanErrorParams(0x8000 | 0x100); } else { - Rfu.unk_cee[i] = Rfu.childRecvBuffer[i][0] / 32; - Rfu.unk_cea[i] = 0; - Rfu.childRecvBuffer[i][0] &= 0x1f; - r0 = Rfu.linkPlayerIdx[i]; - for (j = 0; j < 7; j++) + gRfu.unk_cee[i] = gRfu.childRecvBuffer[i][0] / 32; + gRfu.unk_cea[i] = 0; + gRfu.childRecvBuffer[i][0] &= 0x1f; + r0 = gRfu.linkPlayerIdx[i]; + for (j = 0; j < CMD_LENGTH - 1; j++) { - gRecvCmds[r0][j] = (Rfu.childRecvBuffer[i][(j << 1) + 1] << 8) | Rfu.childRecvBuffer[i][(j << 1) + 0]; - Rfu.childRecvBuffer[i][(j << 1) + 1] = 0; - Rfu.childRecvBuffer[i][(j << 1) + 0] = 0; + gRecvCmds[r0][j] = (gRfu.childRecvBuffer[i][(j << 1) + 1] << 8) | gRfu.childRecvBuffer[i][(j << 1) + 0]; + gRfu.childRecvBuffer[i][(j << 1) + 1] = 0; + gRfu.childRecvBuffer[i][(j << 1) + 0] = 0; } } } @@ -863,53 +870,53 @@ static bool32 RfuMain2_Parent(void) MoveSendCmdToRecv(); RfuHandleReceiveCommand(0); CallRfuFunc(); - if (Rfu.unk_ce5 && !Rfu.stopNewConnections) + if (gRfu.nextChildBits && !gRfu.stopNewConnections) { sRfuDebug.unk_0e = FALSE; - rfu_clearSlot(TYPE_UNI_SEND | TYPE_UNI_RECV, Rfu.unk_cda); + rfu_clearSlot(TYPE_UNI_SEND | TYPE_UNI_RECV, gRfu.unk_cda); for (i = 0; i < RFU_CHILD_MAX; i++) { - if ((Rfu.unk_ce5 >> i) & 1) - rfu_setRecvBuffer(TYPE_UNI, i, Rfu.childRecvBuffer[i], sizeof(Rfu.childRecvBuffer[0])); + if ((gRfu.nextChildBits >> i) & 1) + rfu_setRecvBuffer(TYPE_UNI, i, gRfu.childRecvBuffer[i], sizeof(gRfu.childRecvBuffer[0])); } - sub_800E88C(Rfu.unk_ce2, Rfu.unk_ce2 | Rfu.unk_ce5); - Rfu.unk_ce9 = Rfu.unk_ce5; - Rfu.unk_ce2 |= Rfu.unk_ce5; - Rfu.unk_ce5 = 0; - rfu_UNI_setSendData(Rfu.unk_ce2, Rfu.recvCmds, 70); - Rfu.unk_cda = sub_800E87C(Rfu.unk_ce2); - CreateTask(Task_ExchangeLinkPlayers, 0); + sub_800E88C(gRfu.unk_ce2, gRfu.unk_ce2 | gRfu.nextChildBits); + gRfu.incomingChild = gRfu.nextChildBits; + gRfu.unk_ce2 |= gRfu.nextChildBits; + gRfu.nextChildBits = 0; + rfu_UNI_setSendData(gRfu.unk_ce2, gRfu.recvCmds, 70); + gRfu.unk_cda = Rfu_GetIndexOfNewestChild(gRfu.unk_ce2); + CreateTask(Task_PlayerExchangeUpdate, 0); } } else { - Rfu.unk_cdc = TRUE; - Rfu.unk_0e = FALSE; + gRfu.unk_cdc = TRUE; + gRfu.unk_0e = FALSE; } - Rfu.unk_0e = FALSE; + gRfu.unk_0e = FALSE; } - retval = Rfu.unk_cdc; + retval = gRfu.unk_cdc; return gRfuLinkStatus->sendSlotUNIFlag ? retval & 1 : FALSE; } -static void sub_800F498(u16 *a0, u8 *a1) +static void sub_800F498(u16 *sendCmd, u8 *buffer) { s32 i; - if (a0[0]) + if (sendCmd[0]) { - a0[0] |= (Rfu.unk_102 << 5); - Rfu.unk_102 = (Rfu.unk_102 + 1) & 7; - for (i = 0; i < 7; i++) + sendCmd[0] |= (gRfu.unk_102 << 5); + gRfu.unk_102 = (gRfu.unk_102 + 1) & 7; + for (i = 0; i < CMD_LENGTH - 1; i++) { - a1[2 * i + 1] = a0[i] >> 8; - a1[2 * i + 0] = a0[i]; + buffer[2 * i + 1] = sendCmd[i] >> 8; + buffer[2 * i + 0] = sendCmd[i]; } } else { - for (i = 0; i < 14; i++) - a1[i] = 0; + for (i = 0; i < SEND_QUEUE_SLOT_LENGTH; i++) + buffer[i] = 0; } } @@ -921,14 +928,15 @@ static bool32 RfuMain1_Child(void) u8 send[2 * (CMD_LENGTH - 1)]; u8 status; - RfuRecvQueue_Dequeue(&Rfu.recvQueue, recv); + RfuRecvQueue_Dequeue(&gRfu.recvQueue, recv); for (i = 0; i < MAX_RFU_PLAYERS; i++) { for (j = 0; j < CMD_LENGTH - 1; j++) - gRecvCmds[i][j] = (recv[i * 14 + (j << 1) + 1] << 8) | recv[i * 14 + (j << 1) + 0]; + gRecvCmds[i][j] = (recv[i * SEND_QUEUE_SLOT_LENGTH + (j * 2) + 1] << 8) + | recv[i * SEND_QUEUE_SLOT_LENGTH + (j * 2) + 0]; } RfuHandleReceiveCommand(0); - if (lman.childClockSlave_flag == 0 && Rfu.disconnectMode != RFU_DISCONNECT_NONE) + if (lman.childClockSlave_flag == 0 && gRfu.disconnectMode != RFU_DISCONNECT_NONE) { rfu_REQ_disconnect(gRfuLinkStatus->connSlotFlag | gRfuLinkStatus->linkLossSlotFlag); rfu_waitREQComplete(); @@ -937,21 +945,21 @@ static bool32 RfuMain1_Child(void) RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x9000); rfu_clearAllSlot(); gReceivedRemoteLinkPlayers = FALSE; - Rfu.callback = NULL; - if (Rfu.disconnectMode == RFU_DISCONNECT_ERROR) + gRfu.callback = NULL; + if (gRfu.disconnectMode == RFU_DISCONNECT_ERROR) { RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x9000); GetLinkmanErrorParams(0x9000); } lman.state = lman.next_state = 0; - Rfu.disconnectMode = RFU_DISCONNECT_NONE; + gRfu.disconnectMode = RFU_DISCONNECT_NONE; } - if (Rfu.childSendCount) + if (gRfu.childSendCount) { - Rfu.childSendCount--; + gRfu.childSendCount--; CallRfuFunc(); sub_800F498(gSendCmd, send); - RfuSendQueue_Enqueue(&Rfu.sendQueue, send); + RfuSendQueue_Enqueue(&gRfu.sendQueue, send); for (i = 0; i < CMD_LENGTH - 1; i++) gSendCmd[i] = 0; } @@ -962,25 +970,26 @@ static void HandleSendFailure(u8 unused, u32 flags) { s32 i, j, temp; - const u8 *r10 = Rfu.sendBlock.payload; - for (i = 0; i < Rfu.sendBlock.count; i++) + const u8 *payload = gRfu.sendBlock.payload; + for (i = 0; i < gRfu.sendBlock.count; i++) { if (!(flags & 1)) { sResendBlock16[0] = RFUCMD_SEND_BLOCK | i; - for (j = 0; j < 7; j++) + for (j = 0; j < CMD_LENGTH - 1; j++) { - temp = j << 1; - sResendBlock16[j + 1] = (r10[12 * i + temp + 1] << 8) | r10[12 * i + temp + 0]; + temp = j * 2; + sResendBlock16[j + 1] = (payload[(SEND_QUEUE_SLOT_LENGTH - 2) * i + temp + 1] << 8) + | payload[(SEND_QUEUE_SLOT_LENGTH - 2) * i + temp + 0]; } - for (j = 0; j < 7; j++) + for (j = 0; j < CMD_LENGTH - 1; j++) { - temp = j << 1; + temp = j * 2; sResendBlock8[temp + 1] = sResendBlock16[j] >> 8; sResendBlock8[temp + 0] = sResendBlock16[j]; } - RfuSendQueue_Enqueue(&Rfu.sendQueue, sResendBlock8); - Rfu.sendBlock.failedFlags |= (1 << i); + RfuSendQueue_Enqueue(&gRfu.sendQueue, sResendBlock8); + gRfu.sendBlock.failedFlags |= (1 << i); } flags >>= 1; } @@ -988,30 +997,30 @@ static void HandleSendFailure(u8 unused, u32 flags) void Rfu_SetBlockReceivedFlag(u8 linkPlayerId) { - if (Rfu.parentChild == MODE_PARENT && linkPlayerId) - Rfu.numBlocksReceived[linkPlayerId] = 1; + if (gRfu.parentChild == MODE_PARENT && linkPlayerId) + gRfu.numBlocksReceived[linkPlayerId] = 1; else - Rfu.blockReceived[linkPlayerId] = TRUE; + gRfu.blockReceived[linkPlayerId] = TRUE; } void Rfu_ResetBlockReceivedFlag(u8 linkPlayerId) { - Rfu.blockReceived[linkPlayerId] = FALSE; - Rfu.recvBlock[linkPlayerId].receiving = 0; + gRfu.blockReceived[linkPlayerId] = FALSE; + gRfu.recvBlock[linkPlayerId].receiving = RECV_STATE_READY; } static u8 LoadLinkPlayerIds(const u8 *ids) { u8 i; - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) return FALSE; for (i = 0; i < RFU_CHILD_MAX; i++) - Rfu.linkPlayerIdx[i] = ids[i]; + gRfu.linkPlayerIdx[i] = ids[i]; - return ids[Rfu.childSlot]; + return ids[gRfu.childSlot]; } -static void RfuFunc_SendKeysToRfu(void) +static void SendKeysToRfu(void) { if (gReceivedRemoteLinkPlayers && gHeldKeyCodeToSend != LINK_KEY_CODE_NULL @@ -1023,24 +1032,24 @@ static void RfuFunc_SendKeysToRfu(void) } } -struct GFtgtGname *GetHostRFUtgtGname(void) +struct RfuGameData *GetHostRfuGameData(void) { - return &gHostRFUtgtGnameBuffer; + return &gHostRfuGameData; } bool32 IsSendingKeysToRfu(void) { - return Rfu.callback == RfuFunc_SendKeysToRfu; + return gRfu.callback == SendKeysToRfu; } void StartSendingKeysToRfu(void) { - Rfu.callback = RfuFunc_SendKeysToRfu; + gRfu.callback = SendKeysToRfu; } void ClearLinkRfuCallback(void) { - Rfu.callback = NULL; + gRfu.callback = NULL; } static void Rfu_BerryBlenderSendHeldKeys(void) @@ -1053,8 +1062,8 @@ static void Rfu_BerryBlenderSendHeldKeys(void) void Rfu_SetBerryBlenderLinkCallback(void) { - if (Rfu.callback == NULL) - Rfu.callback = Rfu_BerryBlenderSendHeldKeys; + if (gRfu.callback == NULL) + gRfu.callback = Rfu_BerryBlenderSendHeldKeys; } static void RfuHandleReceiveCommand(u8 unused) @@ -1067,39 +1076,39 @@ static void RfuHandleReceiveCommand(u8 unused) switch (gRecvCmds[i][0] & RFUCMD_MASK) { case RFUCMD_SEND_PLAYER_IDS_NEW: - if (Rfu.parentChild == MODE_CHILD && gReceivedRemoteLinkPlayers) + if (gRfu.parentChild == MODE_CHILD && gReceivedRemoteLinkPlayers) return; // fallthrough case RFUCMD_SEND_PLAYER_IDS: if (gRfuLinkStatus->parentChild == MODE_CHILD) { - Rfu.playerCount = gRecvCmds[i][1]; - Rfu.multiplayerId = LoadLinkPlayerIds((u8 *)(gRecvCmds[i] + 2)); + gRfu.playerCount = gRecvCmds[i][1]; + gRfu.multiplayerId = LoadLinkPlayerIds((u8 *)(gRecvCmds[i] + 2)); } break; case RFUCMD_SEND_BLOCK_INIT: - if (Rfu.recvBlock[i].receiving == 0) + if (gRfu.recvBlock[i].receiving == RECV_STATE_READY) { - Rfu.recvBlock[i].next = 0; - Rfu.recvBlock[i].count = gRecvCmds[i][1]; - Rfu.recvBlock[i].owner = gRecvCmds[i][2]; - Rfu.recvBlock[i].receivedFlags = 0; - Rfu.recvBlock[i].receiving = 1; - Rfu.blockReceived[i] = FALSE; + gRfu.recvBlock[i].next = 0; + gRfu.recvBlock[i].count = gRecvCmds[i][1]; + gRfu.recvBlock[i].owner = gRecvCmds[i][2]; + gRfu.recvBlock[i].receivedFlags = 0; + gRfu.recvBlock[i].receiving = RECV_STATE_RECEIVING; + gRfu.blockReceived[i] = FALSE; } break; case RFUCMD_SEND_BLOCK: - if (Rfu.recvBlock[i].receiving == 1) + if (gRfu.recvBlock[i].receiving == RECV_STATE_RECEIVING) { - Rfu.recvBlock[i].next = gRecvCmds[i][0] & 0xff; - Rfu.recvBlock[i].receivedFlags |= (1 << Rfu.recvBlock[i].next); + gRfu.recvBlock[i].next = gRecvCmds[i][0] & 0xff; + gRfu.recvBlock[i].receivedFlags |= (1 << gRfu.recvBlock[i].next); for (j = 0; j < 6; j++) - gBlockRecvBuffer[i][Rfu.recvBlock[i].next * 6 + j] = gRecvCmds[i][j + 1]; - if (Rfu.recvBlock[i].receivedFlags == sAllBlocksReceived[Rfu.recvBlock[i].count]) + gBlockRecvBuffer[i][gRfu.recvBlock[i].next * 6 + j] = gRecvCmds[i][j + 1]; + if (gRfu.recvBlock[i].receivedFlags == sAllBlocksReceived[gRfu.recvBlock[i].count]) { - Rfu.recvBlock[i].receiving = 2; + gRfu.recvBlock[i].receiving = RECV_STATE_FINISHED; Rfu_SetBlockReceivedFlag(i); - if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM) && gReceivedRemoteLinkPlayers != 0 && Rfu.parentChild == MODE_CHILD) + if (GetHostRfuGameData()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM) && gReceivedRemoteLinkPlayers != 0 && gRfu.parentChild == MODE_CHILD) ValidateAndReceivePokemonSioInfo(gBlockRecvBuffer); } } @@ -1108,14 +1117,14 @@ static void RfuHandleReceiveCommand(u8 unused) Rfu_InitBlockSend(sBlockRequests[gRecvCmds[i][1]].address, (u16)sBlockRequests[gRecvCmds[i][1]].size); break; case RFUCMD_READY_CLOSE_LINK: - Rfu.readyCloseLink[i] = TRUE; + gRfu.readyCloseLink[i] = TRUE; break; case RFUCMD_READY_EXIT_STANDBY: - if (Rfu.allReadyNum == gRecvCmds[i][1]) - Rfu.readyExitStandby[i] = TRUE; + if (gRfu.allReadyNum == gRecvCmds[i][1]) + gRfu.readyExitStandby[i] = TRUE; break; case RFUCMD_DISCONNECT: - if (Rfu.parentChild == MODE_CHILD) + if (gRfu.parentChild == MODE_CHILD) { // Disconnect child if (gReceivedRemoteLinkPlayers) @@ -1124,9 +1133,9 @@ static void RfuHandleReceiveCommand(u8 unused) { gReceivedRemoteLinkPlayers = 0; rfu_LMAN_requestChangeAgbClockMaster(); - Rfu.disconnectMode = gRecvCmds[i][2]; + gRfu.disconnectMode = gRecvCmds[i][2]; } - Rfu.playerCount = gRecvCmds[i][3]; + gRfu.playerCount = gRecvCmds[i][3]; ClearSelectedLinkPlayerIds(gRecvCmds[i][1]); } } @@ -1140,10 +1149,10 @@ static void RfuHandleReceiveCommand(u8 unused) } break; case RFUCMD_DISCONNECT_PARENT: - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) { - Rfu.disconnectSlots |= gRecvCmds[i][1]; - Rfu.disconnectMode = gRecvCmds[i][2]; + gRfu.disconnectSlots |= gRecvCmds[i][1]; + gRfu.disconnectMode = gRecvCmds[i][2]; ClearSelectedLinkPlayerIds(gRecvCmds[i][1]); } break; @@ -1152,38 +1161,38 @@ static void RfuHandleReceiveCommand(u8 unused) gLinkPartnersHeldKeys[i] = gRecvCmds[i][1]; break; } - if (Rfu.parentChild == MODE_PARENT && Rfu.numBlocksReceived[i]) + if (gRfu.parentChild == MODE_PARENT && gRfu.numBlocksReceived[i]) { - if (Rfu.numBlocksReceived[i] == 4) + if (gRfu.numBlocksReceived[i] == 4) { - Rfu.blockReceived[i] = TRUE; - Rfu.numBlocksReceived[i] = 0; + gRfu.blockReceived[i] = TRUE; + gRfu.numBlocksReceived[i] = 0; } else - Rfu.numBlocksReceived[i]++; + gRfu.numBlocksReceived[i]++; } } } -static bool8 AreNoPlayersReceiving(void) +static bool8 AreAllPlayersReadyToReceive(void) { s32 i; for (i = 0; i < MAX_RFU_PLAYERS; i++) { - if (Rfu.recvBlock[i].receiving) + if (gRfu.recvBlock[i].receiving != RECV_STATE_READY) return FALSE; } return TRUE; } -static bool8 sub_800FC88(void) +static bool8 AreAllPlayersFinishedReceiving(void) { s32 i; - for (i = 0; i < Rfu.playerCount; i++) + for (i = 0; i < gRfu.playerCount; i++) { - if (Rfu.recvBlock[i].receiving != 2 || Rfu.blockReceived[i] != TRUE) + if (gRfu.recvBlock[i].receiving != RECV_STATE_FINISHED || gRfu.blockReceived[i] != TRUE) return FALSE; } return TRUE; @@ -1197,7 +1206,7 @@ static void ResetSendDataManager(struct RfuBlockSend *data) data->receivedFlags = 0; data->sending = FALSE; data->owner = 0; - data->receiving = 0; + data->receiving = RECV_STATE_READY; } u8 Rfu_GetBlockReceivedStatus(void) @@ -1207,7 +1216,7 @@ u8 Rfu_GetBlockReceivedStatus(void) for (i = 0; i < MAX_RFU_PLAYERS; i++) { - if (Rfu.recvBlock[i].receiving == 2 && Rfu.blockReceived[i] == TRUE) + if (gRfu.recvBlock[i].receiving == RECV_STATE_FINISHED && gRfu.blockReceived[i] == TRUE) flags |= (1 << i); } return flags; @@ -1223,25 +1232,25 @@ static void RfuPrepareSendBuffer(u16 command) switch (command) { case RFUCMD_SEND_BLOCK_INIT: - gSendCmd[1] = Rfu.sendBlock.count; - gSendCmd[2] = Rfu.sendBlock.owner + 0x80; + gSendCmd[1] = gRfu.sendBlock.count; + gSendCmd[2] = gRfu.sendBlock.owner + 0x80; break; case RFUCMD_SEND_BLOCK_REQ: - if (AreNoPlayersReceiving()) - gSendCmd[1] = Rfu.blockRequestType; + if (AreAllPlayersReadyToReceive()) + gSendCmd[1] = gRfu.blockRequestType; break; case RFUCMD_SEND_PLAYER_IDS: case RFUCMD_SEND_PLAYER_IDS_NEW: - tmp = Rfu.unk_ce2 ^ Rfu.disconnectSlots; - Rfu.playerCount = sPlayerBitsToCount[tmp] + 1; - gSendCmd[1] = Rfu.playerCount; + tmp = gRfu.unk_ce2 ^ gRfu.disconnectSlots; + gRfu.playerCount = sPlayerBitsToCount[tmp] + 1; + gSendCmd[1] = gRfu.playerCount; buff = (u8 *)&gSendCmd[2]; for (i = 0; i < RFU_CHILD_MAX; i++) - buff[i] = Rfu.linkPlayerIdx[i]; + buff[i] = gRfu.linkPlayerIdx[i]; break; case RFUCMD_READY_EXIT_STANDBY: case RFUCMD_READY_CLOSE_LINK: - gSendCmd[1] = Rfu.allReadyNum; + gSendCmd[1] = gRfu.allReadyNum; break; case RFUCMD_BLENDER_SEND_KEYS: gSendCmd[0] = command; @@ -1249,7 +1258,7 @@ static void RfuPrepareSendBuffer(u16 command) break; case RFUCMD_SEND_PACKET: for (i = 0; i < RFU_PACKET_SIZE; i++) - gSendCmd[1 + i] = Rfu.packet[i]; + gSendCmd[1 + i] = gRfu.packet[i]; break; case RFUCMD_SEND_HELD_KEYS: gSendCmd[1] = gHeldKeyCodeToSend; @@ -1264,7 +1273,7 @@ void Rfu_SendPacket(void *data) { if (gSendCmd[0] == 0 && !RfuHasErrored()) { - memcpy(Rfu.packet, data, sizeof(Rfu.packet)); + memcpy(gRfu.packet, data, sizeof(gRfu.packet)); RfuPrepareSendBuffer(RFUCMD_SEND_PACKET); } } @@ -1272,31 +1281,31 @@ void Rfu_SendPacket(void *data) bool32 Rfu_InitBlockSend(const u8 *src, size_t size) { bool8 r4; - if (Rfu.callback != NULL) + if (gRfu.callback != NULL) return FALSE; if (gSendCmd[0] != 0) return FALSE; - if (Rfu.sendBlock.sending) + if (gRfu.sendBlock.sending) { sRfuDebug.blockSendTime++; return FALSE; } r4 = (size % 12) != 0; - Rfu.sendBlock.owner = GetMultiplayerId(); - Rfu.sendBlock.sending = TRUE; - Rfu.sendBlock.count = (size / 12) + r4; - Rfu.sendBlock.next = 0; + gRfu.sendBlock.owner = GetMultiplayerId(); + gRfu.sendBlock.sending = TRUE; + gRfu.sendBlock.count = (size / 12) + r4; + gRfu.sendBlock.next = 0; if (size > BLOCK_BUFFER_SIZE) - Rfu.sendBlock.payload = src; + gRfu.sendBlock.payload = src; else { if (src != gBlockSendBuffer) memcpy(gBlockSendBuffer, src, size); - Rfu.sendBlock.payload = gBlockSendBuffer; + gRfu.sendBlock.payload = gBlockSendBuffer; } RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_INIT); - Rfu.callback = HandleBlockSend; - Rfu.unk_5b = 0; + gRfu.callback = HandleBlockSend; + gRfu.blockSendAttempts = 0; return TRUE; } @@ -1305,15 +1314,15 @@ static void HandleBlockSend(void) if (gSendCmd[0] == 0) { RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_INIT); - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) { - if (++Rfu.unk_5b > 2) - Rfu.callback = SendNextBlock; + if (++gRfu.blockSendAttempts > 2) + gRfu.callback = SendNextBlock; } else { if ((gRecvCmds[GetMultiplayerId()][0] & RFUCMD_MASK) == RFUCMD_SEND_BLOCK_INIT) - Rfu.callback = SendNextBlock; + gRfu.callback = SendNextBlock; } } } @@ -1321,50 +1330,50 @@ static void HandleBlockSend(void) static void SendNextBlock(void) { s32 i; - const u8 *src = Rfu.sendBlock.payload; - gSendCmd[0] = RFUCMD_SEND_BLOCK | Rfu.sendBlock.next; + const u8 *src = gRfu.sendBlock.payload; + gSendCmd[0] = RFUCMD_SEND_BLOCK | gRfu.sendBlock.next; for (i = 0; i < CMD_LENGTH - 1; i++) - gSendCmd[i + 1] = (src[(i << 1) + Rfu.sendBlock.next * 12 + 1] << 8) | src[(i << 1) + Rfu.sendBlock.next * 12 + 0]; - Rfu.sendBlock.next++; - if (Rfu.sendBlock.count <= Rfu.sendBlock.next) + gSendCmd[i + 1] = (src[(i << 1) + gRfu.sendBlock.next * 12 + 1] << 8) | src[(i << 1) + gRfu.sendBlock.next * 12 + 0]; + gRfu.sendBlock.next++; + if (gRfu.sendBlock.count <= gRfu.sendBlock.next) { - Rfu.sendBlock.sending = FALSE; - Rfu.callback = SendLastBlock; + gRfu.sendBlock.sending = FALSE; + gRfu.callback = SendLastBlock; } } static void SendLastBlock(void) { - const u8 *src = Rfu.sendBlock.payload; + const u8 *src = gRfu.sendBlock.payload; u8 mpId = GetMultiplayerId(); s32 i; - if (Rfu.parentChild == MODE_CHILD) + if (gRfu.parentChild == MODE_CHILD) { - gSendCmd[0] = RFUCMD_SEND_BLOCK | (Rfu.sendBlock.count - 1); + gSendCmd[0] = RFUCMD_SEND_BLOCK | (gRfu.sendBlock.count - 1); for (i = 0; i < CMD_LENGTH - 1; i++) - gSendCmd[i + 1] = (src[(i << 1) + (Rfu.sendBlock.count - 1) * 12 + 1] << 8) | src[(i << 1) + (Rfu.sendBlock.count - 1) * 12 + 0]; - if ((u8)gRecvCmds[mpId][0] == Rfu.sendBlock.count - 1) + gSendCmd[i + 1] = (src[(i << 1) + (gRfu.sendBlock.count - 1) * 12 + 1] << 8) | src[(i << 1) + (gRfu.sendBlock.count - 1) * 12 + 0]; + if ((u8)gRecvCmds[mpId][0] == gRfu.sendBlock.count - 1) { - if (Rfu.recvBlock[mpId].receivedFlags != sAllBlocksReceived[Rfu.recvBlock[mpId].count]) + if (gRfu.recvBlock[mpId].receivedFlags != sAllBlocksReceived[gRfu.recvBlock[mpId].count]) { - HandleSendFailure(mpId, Rfu.recvBlock[mpId].receivedFlags); - sRfuDebug.unk_64++; + HandleSendFailure(mpId, gRfu.recvBlock[mpId].receivedFlags); + sRfuDebug.blockSendFailures++; } else { - Rfu.callback = NULL; + gRfu.callback = NULL; } } } else { - Rfu.callback = NULL; + gRfu.callback = NULL; } } bool8 Rfu_SendBlockRequest(u8 type) { - Rfu.blockRequestType = type; + gRfu.blockRequestType = type; RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_REQ); return TRUE; } @@ -1374,8 +1383,8 @@ static void RfuShutdownAfterDisconnect(void) rfu_clearAllSlot(); rfu_LMAN_powerDownRFU(); gReceivedRemoteLinkPlayers = 0; - Rfu.isShuttingDown = TRUE; - Rfu.callback = NULL; + gRfu.isShuttingDown = TRUE; + gRfu.callback = NULL; } static void DisconnectRfu(void) @@ -1387,68 +1396,68 @@ static void DisconnectRfu(void) static void TryDisconnectRfu(void) { - if (Rfu.parentChild == MODE_CHILD) + if (gRfu.parentChild == MODE_CHILD) { rfu_LMAN_requestChangeAgbClockMaster(); - Rfu.disconnectMode = RFU_DISCONNECT_NORMAL; + gRfu.disconnectMode = RFU_DISCONNECT_NORMAL; } else { - Rfu.callback = DisconnectRfu; + gRfu.callback = DisconnectRfu; } } void LinkRfu_FatalError(void) { rfu_LMAN_requestChangeAgbClockMaster(); - Rfu.disconnectMode = RFU_DISCONNECT_ERROR; - Rfu.disconnectSlots = gRfuLinkStatus->connSlotFlag | gRfuLinkStatus->linkLossSlotFlag; + gRfu.disconnectMode = RFU_DISCONNECT_ERROR; + gRfu.disconnectSlots = gRfuLinkStatus->connSlotFlag | gRfuLinkStatus->linkLossSlotFlag; } // RFU equivalent of LinkCB_WaitCloseLink static void WaitAllReadyToCloseLink(void) { s32 i; - u8 playerCount = Rfu.playerCount; + u8 playerCount = gRfu.playerCount; s32 count = 0; // Wait for all players to be ready for (i = 0; i < MAX_RFU_PLAYERS; i++) { - if (Rfu.readyCloseLink[i]) + if (gRfu.readyCloseLink[i]) count++; } if (count == playerCount) { // All ready, close link gBattleTypeFlags &= ~BATTLE_TYPE_LINK_IN_BATTLE; - if (Rfu.parentChild == MODE_CHILD) + if (gRfu.parentChild == MODE_CHILD) { - Rfu.errorState = RFU_ERROR_STATE_3; + gRfu.errorState = RFU_ERROR_STATE_3; TryDisconnectRfu(); } else { - Rfu.callback = TryDisconnectRfu; + gRfu.callback = TryDisconnectRfu; } } } static void SendReadyCloseLink(void) { - if (gSendCmd[0] == 0 && !Rfu.unk_ce8) + if (gSendCmd[0] == 0 && !gRfu.unk_ce8) { RfuPrepareSendBuffer(RFUCMD_READY_CLOSE_LINK); - Rfu.callback = WaitAllReadyToCloseLink; + gRfu.callback = WaitAllReadyToCloseLink; } } static void Task_TryReadyCloseLink(u8 taskId) { - if (Rfu.callback == NULL) + if (gRfu.callback == NULL) { - Rfu.stopNewConnections = TRUE; - Rfu.callback = SendReadyCloseLink; + gRfu.stopNewConnections = TRUE; + gRfu.callback = SendReadyCloseLink; DestroyTask(taskId); } } @@ -1466,34 +1475,34 @@ static void SendReadyExitStandbyUntilAllReady(void) if (GetMultiplayerId() != 0) { - if (Rfu.recvQueue.count == 0 && Rfu.resendExitStandbyTimer > 60) + if (gRfu.recvQueue.count == 0 && gRfu.resendExitStandbyTimer > 60) { RfuPrepareSendBuffer(RFUCMD_READY_EXIT_STANDBY); - Rfu.resendExitStandbyTimer = 0; + gRfu.resendExitStandbyTimer = 0; } } playerCount = GetLinkPlayerCount(); for (i = 0; i < playerCount; i++) { - if (!Rfu.readyExitStandby[i]) + if (!gRfu.readyExitStandby[i]) break; } if (i == playerCount) { for (i = 0; i < MAX_RFU_PLAYERS; i++) - Rfu.readyExitStandby[i] = FALSE; - Rfu.allReadyNum++; - Rfu.callback = NULL; + gRfu.readyExitStandby[i] = FALSE; + gRfu.allReadyNum++; + gRfu.callback = NULL; } - Rfu.resendExitStandbyTimer++; + gRfu.resendExitStandbyTimer++; } static void LinkLeaderReadyToExitStandby(void) { - if (Rfu.recvQueue.count == 0 && gSendCmd[0] == 0) + if (gRfu.recvQueue.count == 0 && gSendCmd[0] == 0) { RfuPrepareSendBuffer(RFUCMD_READY_EXIT_STANDBY); - Rfu.callback = SendReadyExitStandbyUntilAllReady; + gRfu.callback = SendReadyExitStandbyUntilAllReady; } } @@ -1506,10 +1515,10 @@ static void Rfu_LinkStandby(void) if (GetMultiplayerId() != 0) { // Not link leader, send exit standby when ready - if (Rfu.recvQueue.count == 0 && gSendCmd[0] == 0) + if (gRfu.recvQueue.count == 0 && gSendCmd[0] == 0) { RfuPrepareSendBuffer(RFUCMD_READY_EXIT_STANDBY); - Rfu.callback = SendReadyExitStandbyUntilAllReady; + gRfu.callback = SendReadyExitStandbyUntilAllReady; } } else @@ -1518,15 +1527,15 @@ static void Rfu_LinkStandby(void) playerCount = GetLinkPlayerCount(); for (i = 1; i < playerCount; i++) { - if (!Rfu.readyExitStandby[i]) + if (!gRfu.readyExitStandby[i]) break; } if (i == playerCount) { - if (Rfu.recvQueue.count == 0 && gSendCmd[0] == 0) + if (gRfu.recvQueue.count == 0 && gSendCmd[0] == 0) { RfuPrepareSendBuffer(RFUCMD_READY_EXIT_STANDBY); - Rfu.callback = LinkLeaderReadyToExitStandby; + gRfu.callback = LinkLeaderReadyToExitStandby; } } } @@ -1534,10 +1543,10 @@ static void Rfu_LinkStandby(void) void Rfu_SetLinkStandbyCallback(void) { - if (Rfu.callback == NULL) + if (gRfu.callback == NULL) { - Rfu.callback = Rfu_LinkStandby; - Rfu.resendExitStandbyTimer = 0; + gRfu.callback = Rfu_LinkStandby; + gRfu.resendExitStandbyTimer = 0; } } @@ -1562,33 +1571,33 @@ u8 Rfu_SetLinkRecovery(bool32 enable) void Rfu_StopPartnerSearch(void) { - Rfu.stopNewConnections = TRUE; + gRfu.stopNewConnections = TRUE; rfu_LMAN_stopManager(FALSE); } u8 Rfu_GetMultiplayerId(void) { - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) return 0; - return Rfu.multiplayerId; + return gRfu.multiplayerId; } u8 Rfu_GetLinkPlayerCount(void) { - return Rfu.playerCount; + return gRfu.playerCount; } bool8 IsLinkRfuTaskFinished(void) { - if (Rfu.status == RFU_STATUS_CONNECTION_ERROR) + if (gRfu.status == RFU_STATUS_CONNECTION_ERROR) return FALSE; - return Rfu.callback ? FALSE : TRUE; + return gRfu.callback ? FALSE : TRUE; } static void CallRfuFunc(void) { - if (Rfu.callback) - Rfu.callback(); + if (gRfu.callback) + gRfu.callback(); } static bool8 CheckForLeavingGroupMembers(void) @@ -1597,23 +1606,23 @@ static bool8 CheckForLeavingGroupMembers(void) bool8 memberLeft = FALSE; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.partnerSendStatuses[i] < RFU_STATUS_JOIN_GROUP_OK - || Rfu.partnerSendStatuses[i] > RFU_STATUS_JOIN_GROUP_NO) + if (gRfu.partnerSendStatuses[i] < RFU_STATUS_JOIN_GROUP_OK + || gRfu.partnerSendStatuses[i] > RFU_STATUS_JOIN_GROUP_NO) { if (gRfuSlotStatusNI[i]->recv.state == SLOT_STATE_RECV_SUCCESS || gRfuSlotStatusNI[i]->recv.state == SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN) { - if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_LEAVE_GROUP_NOTICE) + if (gRfu.partnerRecvStatuses[i] == RFU_STATUS_LEAVE_GROUP_NOTICE) { - Rfu.partnerSendStatuses[i] = RFU_STATUS_LEAVE_GROUP; - Rfu.partnerRecvStatuses[i] = RFU_STATUS_CHILD_LEAVE_READY; + gRfu.partnerSendStatuses[i] = RFU_STATUS_LEAVE_GROUP; + gRfu.partnerRecvStatuses[i] = RFU_STATUS_CHILD_LEAVE_READY; rfu_clearSlot(TYPE_NI_RECV, i); - rfu_NI_setSendData(1 << i, 8, &Rfu.partnerSendStatuses[i], 1); + rfu_NI_setSendData(1 << i, 8, &gRfu.partnerSendStatuses[i], 1); memberLeft = TRUE; } } - else if (gRfuSlotStatusNI[Rfu.childSlot]->recv.state == SLOT_STATE_RECV_FAILED) + else if (gRfuSlotStatusNI[gRfu.childSlot]->recv.state == SLOT_STATE_RECV_FAILED) rfu_clearSlot(TYPE_NI_RECV, i); { @@ -1631,10 +1640,10 @@ bool32 RfuTryDisconnectLeavingChildren(void) // Check all children, get those waiting to be disconnected for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE) + if (gRfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE) { childrenLeaving |= (1 << i); - Rfu.partnerRecvStatuses[i] = RFU_STATUS_OK; + gRfu.partnerRecvStatuses[i] = RFU_STATUS_OK; } } @@ -1648,8 +1657,8 @@ bool32 RfuTryDisconnectLeavingChildren(void) // Return true if any children have left or are still waiting to leave for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE_READY - || Rfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE) + if (gRfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE_READY + || gRfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE) return TRUE; } return FALSE; @@ -1660,7 +1669,7 @@ bool32 HasTrainerLeftPartnersList(u16 trainerId, const u8 *name) u8 idx = GetPartnerIndexByNameAndTrainerID(name, trainerId); if (idx == 0xFF) return TRUE; - if (Rfu.partnerSendStatuses[idx] == RFU_STATUS_LEAVE_GROUP) + if (gRfu.partnerSendStatuses[idx] == RFU_STATUS_LEAVE_GROUP) return TRUE; return FALSE; } @@ -1668,16 +1677,16 @@ bool32 HasTrainerLeftPartnersList(u16 trainerId, const u8 *name) void SendRfuStatusToPartner(u8 status, u16 trainerId, const u8 *name) { u8 idx = GetPartnerIndexByNameAndTrainerID(name, trainerId); - Rfu.partnerSendStatuses[idx] = status; + gRfu.partnerSendStatuses[idx] = status; rfu_clearSlot(TYPE_NI_SEND, idx); - rfu_NI_setSendData(1 << idx, 8, &Rfu.partnerSendStatuses[idx], 1); + rfu_NI_setSendData(1 << idx, 8, &gRfu.partnerSendStatuses[idx], 1); } void SendLeaveGroupNotice(void) { - Rfu.unk_c85 = RFU_STATUS_LEAVE_GROUP_NOTICE; - rfu_clearSlot(TYPE_NI_SEND, Rfu.childSlot); - rfu_NI_setSendData(1 << Rfu.childSlot, 8, &Rfu.unk_c85, 1); + gRfu.leaveGroupStatus = RFU_STATUS_LEAVE_GROUP_NOTICE; + rfu_clearSlot(TYPE_NI_SEND, gRfu.childSlot); + rfu_NI_setSendData(1 << gRfu.childSlot, 8, &gRfu.leaveGroupStatus, 1); } u32 WaitSendRfuStatusToPartner(u16 trainerId, const u8 *name) @@ -1700,32 +1709,32 @@ static void UpdateChildStatuses(void) if (gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_SUCCESS || gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_FAILED) { - if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE_READY) - Rfu.partnerRecvStatuses[i] = RFU_STATUS_CHILD_LEAVE; + if (gRfu.partnerRecvStatuses[i] == RFU_STATUS_CHILD_LEAVE_READY) + gRfu.partnerRecvStatuses[i] = RFU_STATUS_CHILD_LEAVE; rfu_clearSlot(TYPE_NI_SEND, i); } } } -static s32 sub_80107A0(void) +static s32 GetJoinGroupStatus(void) { s32 status = RFU_STATUS_OK; - if (Rfu.unk_c85 == RFU_STATUS_LEAVE_GROUP_NOTICE) + if (gRfu.leaveGroupStatus == RFU_STATUS_LEAVE_GROUP_NOTICE) { - if (gRfuSlotStatusNI[Rfu.childSlot]->send.state == SLOT_STATE_SEND_SUCCESS - || gRfuSlotStatusNI[Rfu.childSlot]->send.state == SLOT_STATE_SEND_FAILED) - rfu_clearSlot(TYPE_NI_SEND, Rfu.childSlot); + if (gRfuSlotStatusNI[gRfu.childSlot]->send.state == SLOT_STATE_SEND_SUCCESS + || gRfuSlotStatusNI[gRfu.childSlot]->send.state == SLOT_STATE_SEND_FAILED) + rfu_clearSlot(TYPE_NI_SEND, gRfu.childSlot); } - if (gRfuSlotStatusNI[Rfu.childSlot]->recv.state == SLOT_STATE_RECV_SUCCESS - || gRfuSlotStatusNI[Rfu.childSlot]->recv.state == SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN) + if (gRfuSlotStatusNI[gRfu.childSlot]->recv.state == SLOT_STATE_RECV_SUCCESS + || gRfuSlotStatusNI[gRfu.childSlot]->recv.state == SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN) { - rfu_clearSlot(TYPE_NI_RECV, Rfu.childSlot); - RfuSetStatus(Rfu.recvStatus, 0); - status = Rfu.recvStatus; + rfu_clearSlot(TYPE_NI_RECV, gRfu.childSlot); + RfuSetStatus(gRfu.recvStatus, 0); + status = gRfu.recvStatus; } - else if (gRfuSlotStatusNI[Rfu.childSlot]->recv.state == SLOT_STATE_RECV_FAILED) + else if (gRfuSlotStatusNI[gRfu.childSlot]->recv.state == SLOT_STATE_RECV_FAILED) { - rfu_clearSlot(TYPE_NI_RECV, Rfu.childSlot); + rfu_clearSlot(TYPE_NI_RECV, gRfu.childSlot); status = RFU_STATUS_JOIN_GROUP_NO; } return status; @@ -1733,19 +1742,19 @@ static s32 sub_80107A0(void) #define tState data[0] -static void sub_801084C(u8 taskId) +static void Task_PlayerExchange(u8 taskId) { s32 i; - if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR) + if (gRfu.status == RFU_STATUS_FATAL_ERROR || gRfu.status == RFU_STATUS_CONNECTION_ERROR) { - Rfu.unk_ce8 = FALSE; + gRfu.unk_ce8 = FALSE; DestroyTask(taskId); } switch (gTasks[taskId].tState) { case 0: - if (AreNoPlayersReceiving()) + if (AreAllPlayersReadyToReceive()) { ResetBlockReceivedFlags(); LocalLinkPlayerToBlock(); @@ -1753,7 +1762,7 @@ static void sub_801084C(u8 taskId) } break; case 1: - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) { if (gReceivedRemoteLinkPlayers) RfuPrepareSendBuffer(RFUCMD_SEND_PLAYER_IDS_NEW); @@ -1769,15 +1778,15 @@ static void sub_801084C(u8 taskId) gTasks[taskId].tState = 2; break; case 2: - if (Rfu.playerCount) + if (gRfu.playerCount) gTasks[taskId].tState++; break; case 3: - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) { - if (AreNoPlayersReceiving()) + if (AreAllPlayersReadyToReceive()) { - Rfu.blockRequestType = BLOCK_REQ_SIZE_NONE; + gRfu.blockRequestType = BLOCK_REQ_SIZE_NONE; RfuPrepareSendBuffer(RFUCMD_SEND_BLOCK_REQ); gTasks[taskId].tState++; } @@ -1786,11 +1795,11 @@ static void sub_801084C(u8 taskId) gTasks[taskId].tState++; break; case 4: - if (sub_800FC88()) + if (AreAllPlayersFinishedReceiving()) gTasks[taskId].tState++; break; case 5: - for (i = 0; i < Rfu.playerCount; i++) + for (i = 0; i < gRfu.playerCount; i++) { LinkPlayerFromBlock(i); Rfu_ResetBlockReceivedFlag(i); @@ -1800,16 +1809,16 @@ static void sub_801084C(u8 taskId) case 6: DestroyTask(taskId); gReceivedRemoteLinkPlayers = TRUE; - Rfu.unk_ce8 = FALSE; + gRfu.unk_ce8 = FALSE; rfu_LMAN_setLinkRecovery(1, 600); - if (Rfu.unk_ce6) + if (gRfu.newChildQueue) { for (i = 0; i < RFU_CHILD_MAX; i++) { - if ((Rfu.unk_ce6 >> i) & 1) + if ((gRfu.newChildQueue >> i) & 1) { - Rfu.unk_ce5 = 1 << i; - Rfu.unk_ce6 ^= (1 << i); + gRfu.nextChildBits = 1 << i; + gRfu.newChildQueue ^= (1 << i); } } } @@ -1824,16 +1833,16 @@ static void ClearSelectedLinkPlayerIds(u16 selected) for (i = 0; i < RFU_CHILD_MAX; i++) { if ((selected >> i) & 1) - Rfu.linkPlayerIdx[i] = 0; + gRfu.linkPlayerIdx[i] = 0; } } static void ReceiveRfuLinkPlayers(const struct SioInfo *sioInfo) { s32 i; - Rfu.playerCount = sioInfo->playerCount; + gRfu.playerCount = sioInfo->playerCount; for (i = 0; i < RFU_CHILD_MAX; i++) - Rfu.linkPlayerIdx[i] = sioInfo->linkPlayerIdx[i]; + gRfu.linkPlayerIdx[i] = sioInfo->linkPlayerIdx[i]; for (i = 0; i < MAX_RFU_PLAYERS; i++) { gLinkPlayers[i] = sioInfo->linkPlayers[i]; @@ -1851,15 +1860,16 @@ static void ValidateAndReceivePokemonSioInfo(void *recvBuffer) } } -static void Task_ExchangeLinkPlayers(u8 taskId) +// Equivalent to Task_PlayerExchange, but for when new children arrive after the first exchange +static void Task_PlayerExchangeUpdate(u8 taskId) { s32 i; struct LinkPlayerBlock *playerBlock; struct SioInfo *sio; - u8 playerId = Rfu.linkPlayerIdx[sUnknown_082ED68C[Rfu.unk_ce9]]; - if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR) + u8 playerId = gRfu.linkPlayerIdx[sUnknown_082ED68C[gRfu.incomingChild]]; + if (gRfu.status == RFU_STATUS_FATAL_ERROR || gRfu.status == RFU_STATUS_CONNECTION_ERROR) { - Rfu.unk_ce8 = FALSE; + gRfu.unk_ce8 = FALSE; DestroyTask(taskId); } switch (gTasks[taskId].tState) @@ -1889,17 +1899,17 @@ static void Task_ExchangeLinkPlayers(u8 taskId) case 3: sio = (struct SioInfo *)gBlockSendBuffer; memcpy(sio->magic, sASCII_PokemonSioInfo, sizeof sASCII_PokemonSioInfo); - sio->playerCount = Rfu.playerCount; + sio->playerCount = gRfu.playerCount; for (i = 0; i < RFU_CHILD_MAX; i++) - sio->linkPlayerIdx[i] = Rfu.linkPlayerIdx[i]; + sio->linkPlayerIdx[i] = gRfu.linkPlayerIdx[i]; memcpy(sio->linkPlayers, gLinkPlayers, sizeof gLinkPlayers); gTasks[taskId].tState++; // fallthrough case 4: sio = (struct SioInfo *)gBlockSendBuffer; - sio->playerCount = Rfu.playerCount; + sio->playerCount = gRfu.playerCount; for (i = 0; i < RFU_CHILD_MAX; i++) - sio->linkPlayerIdx[i] = Rfu.linkPlayerIdx[i]; + sio->linkPlayerIdx[i] = gRfu.linkPlayerIdx[i]; memcpy(sio->linkPlayers, gLinkPlayers, sizeof(gLinkPlayers)); if (SendBlock(0, gBlockSendBuffer, 0xa0)) gTasks[taskId].tState++; @@ -1909,16 +1919,16 @@ static void Task_ExchangeLinkPlayers(u8 taskId) { CpuFill16(0, gBlockRecvBuffer, sizeof(struct SioInfo)); ResetBlockReceivedFlag(0); - Rfu.unk_ce8 = FALSE; - if (Rfu.unk_ce6) + gRfu.unk_ce8 = FALSE; + if (gRfu.newChildQueue) { - for (i = 0; i < 4; i++) + for (i = 0; i < RFU_CHILD_MAX; i++) { - if ((Rfu.unk_ce6 >> i) & 1) + if ((gRfu.newChildQueue >> i) & 1) { - Rfu.unk_ce5 = 1 << i; - Rfu.unk_ce6 ^= (1 << i); - Rfu.unk_ce8 = TRUE; + gRfu.nextChildBits = 1 << i; + gRfu.newChildQueue ^= (1 << i); + gRfu.unk_ce8 = TRUE; break; } } @@ -1929,14 +1939,15 @@ static void Task_ExchangeLinkPlayers(u8 taskId) } } -static void sub_8010D0C(u8 taskId) +// Equivalent to Task_PlayerExchange but for chatting with a Union Room partner +static void Task_PlayerExchangeChat(u8 taskId) { - if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR) + if (gRfu.status == RFU_STATUS_FATAL_ERROR || gRfu.status == RFU_STATUS_CONNECTION_ERROR) DestroyTask(taskId); switch (gTasks[taskId].tState) { case 0: - if (Rfu.playerCount) + if (gRfu.playerCount) { LocalLinkPlayerToBlock(); SendBlock(0, gBlockSendBuffer, sizeof(struct LinkPlayerBlock)); @@ -1961,17 +1972,17 @@ static void sub_8010D0C(u8 taskId) static void RfuCheckErrorStatus(void) { - if (Rfu.errorState == RFU_ERROR_STATE_1 && lman.childClockSlave_flag == 0) + if (gRfu.errorState == RFU_ERROR_STATE_1 && lman.childClockSlave_flag == 0) { if (gMain.callback2 == c2_mystery_gift_e_reader_run || lman.init_param->mboot_flag) gWirelessCommType = 2; SetMainCallback2(CB2_LinkError); gMain.savedCallback = CB2_LinkError; - BufferLinkErrorInfo((Rfu.linkmanMsg << 16) | (Rfu.unk_10 << 8) | Rfu.unk_12, Rfu.recvQueue.count, Rfu.sendQueue.count, RfuGetStatus() == RFU_STATUS_CONNECTION_ERROR); - Rfu.errorState = RFU_ERROR_STATE_2; + BufferLinkErrorInfo((gRfu.linkmanMsg << 16) | (gRfu.unk_10 << 8) | gRfu.unk_12, gRfu.recvQueue.count, gRfu.sendQueue.count, RfuGetStatus() == RFU_STATUS_CONNECTION_ERROR); + gRfu.errorState = RFU_ERROR_STATE_2; CloseLink(); } - else if (Rfu.sendQueue.full == TRUE || Rfu.recvQueue.full == TRUE) + else if (gRfu.sendQueue.full == TRUE || gRfu.recvQueue.full == TRUE) { if (lman.childClockSlave_flag) rfu_LMAN_requestChangeAgbClockMaster(); @@ -1994,11 +2005,11 @@ static void RfuMain1_UnionRoom(void) bool32 RfuMain1(void) { bool32 retval = FALSE; - Rfu.parentId = 0; + gRfu.parentId = 0; rfu_LMAN_manager_entity(Random2()); - if (!Rfu.isShuttingDown) + if (!gRfu.isShuttingDown) { - switch (Rfu.parentChild) + switch (gRfu.parentChild) { case MODE_PARENT: RfuMain1_Parent(); @@ -2018,143 +2029,147 @@ bool32 RfuMain1(void) bool32 RfuMain2(void) { bool32 retval = FALSE; - if (!Rfu.isShuttingDown) + if (!gRfu.isShuttingDown) { - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) retval = RfuMain2_Parent(); RfuCheckErrorStatus(); } return retval; } -static void CopyPlayerNameToUnameBuffer(void) +static void SetHostRfuUsername(void) { - StringCopy(gHostRFUtgtUnameBuffer, gSaveBlock2Ptr->playerName); + StringCopy(gHostRfuUsername, gSaveBlock2Ptr->playerName); } -void ClearAndInitHostRFUtgtGname(void) +void ResetHostRfuGameData(void) { - memset(&gHostRFUtgtGnameBuffer, 0, RFU_GAME_NAME_LENGTH); - InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, ACTIVITY_NONE, FALSE, 0); + memset(&gHostRfuGameData, 0, RFU_GAME_NAME_LENGTH); + InitHostRfuGameData(&gHostRfuGameData, ACTIVITY_NONE, FALSE, 0); } -void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, bool32 started) +void SetHostRfuGameData(u8 activity, u32 partnerInfo, bool32 startedActivity) { - InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, activity, started, child_sprite_genders); + InitHostRfuGameData(&gHostRfuGameData, activity, startedActivity, partnerInfo); } -void SetGnameBufferWonderFlags(bool32 hasNews, bool32 hasCard) +void SetHostRfuWonderFlags(bool32 hasNews, bool32 hasCard) { - gHostRFUtgtGnameBuffer.unk_00.hasNews = hasNews; - gHostRFUtgtGnameBuffer.unk_00.hasCard = hasCard; + gHostRfuGameData.compatibility.hasNews = hasNews; + gHostRfuGameData.compatibility.hasCard = hasCard; } void SetTradeBoardRegisteredMonInfo(u32 type, u32 species, u32 level) { - gHostRFUtgtGnameBuffer.type = type; - gHostRFUtgtGnameBuffer.species = species; - gHostRFUtgtGnameBuffer.level = level; + gHostRfuGameData.tradeType = type; + gHostRfuGameData.tradeSpecies = species; + gHostRfuGameData.tradeLevel = level; } u8 GetLinkPlayerInfoFlags(s32 playerId) { - u8 retval = 0x80; - retval |= (gLinkPlayers[playerId].gender << 3); - retval |= (gLinkPlayers[playerId].trainerId & 7); + u8 retval = PINFO_ACTIVE_FLAG; + retval |= (gLinkPlayers[playerId].gender << PINFO_GENDER_SHIFT); + retval |= (gLinkPlayers[playerId].trainerId & PINFO_TID_MASK); return retval; } void GetOtherPlayersInfoFlags(void) { - struct GFtgtGname *gname = &gHostRFUtgtGnameBuffer; + struct RfuGameData *data = &gHostRfuGameData; s32 i; for (i = 1; i < GetLinkPlayerCount(); i++) - gname->child_sprite_gender[i - 1] = GetLinkPlayerInfoFlags(i); + data->partnerInfo[i - 1] = GetLinkPlayerInfoFlags(i); } -void UpdateGameData_GroupLockedIn(bool8 started) +void UpdateGameData_GroupLockedIn(bool8 startedActivity) { - gHostRFUtgtGnameBuffer.started = started; - rfu_REQ_configGameData(0, RFU_SERIAL_A, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer); + gHostRfuGameData.startedActivity = startedActivity; + rfu_REQ_configGameData(0, RFU_SERIAL_GAME, (void *)&gHostRfuGameData, gHostRfuUsername); } -void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 started) +void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 startedActivity) { if (activity != ACTIVITY_NONE) - SetHostRFUtgtGname(activity, flags, started); - rfu_REQ_configGameData(0, RFU_SERIAL_A, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer); + SetHostRfuGameData(activity, flags, startedActivity); + rfu_REQ_configGameData(0, RFU_SERIAL_GAME, (void *)&gHostRfuGameData, gHostRfuUsername); } void SetUnionRoomChatPlayerData(u32 numPlayers) { s32 i; u32 numConnectedChildren; - u32 child_sprite_genders; + u32 partnerInfo; s32 slots; - if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) + if (GetHostRfuGameData()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) { numConnectedChildren = 0; - child_sprite_genders = 0; - slots = Rfu.unk_ce2 ^ Rfu.disconnectSlots; - for (i = 0; i < 4; i++) + partnerInfo = 0; + slots = gRfu.unk_ce2 ^ gRfu.disconnectSlots; + for (i = 0; i < RFU_CHILD_MAX; i++) { if ((slots >> i) & 1) { - child_sprite_genders |= ((0x80 | ((gLinkPlayers[Rfu.linkPlayerIdx[i]].gender & 1) << 3) | (gLinkPlayers[Rfu.linkPlayerIdx[i]].trainerId & 7)) << (numConnectedChildren << 3)); + // Only trainerId is shifted by the number of children, so the active flag and gender + // are only ever set for the first child + partnerInfo |= ((PINFO_ACTIVE_FLAG + | ((gLinkPlayers[gRfu.linkPlayerIdx[i]].gender & 1) << PINFO_GENDER_SHIFT) + | (gLinkPlayers[gRfu.linkPlayerIdx[i]].trainerId & PINFO_TID_MASK)) << (numConnectedChildren * 8)); numConnectedChildren++; if (numConnectedChildren == numPlayers - 1) break; } } - UpdateGameData_SetActivity(ACTIVITY_CHAT | IN_UNION_ROOM, child_sprite_genders, FALSE); + UpdateGameData_SetActivity(ACTIVITY_CHAT | IN_UNION_ROOM, partnerInfo, FALSE); } } void GetLinkmanErrorParams(u32 msg) { - if (Rfu.errorState == RFU_ERROR_STATE_NONE) + if (gRfu.errorState == RFU_ERROR_STATE_NONE) { - Rfu.unk_10 = lman.param[0]; - Rfu.unk_12 = lman.param[1]; - Rfu.linkmanMsg = msg; - Rfu.errorState = RFU_ERROR_STATE_1; + gRfu.unk_10 = lman.param[0]; + gRfu.unk_12 = lman.param[1]; + gRfu.linkmanMsg = msg; + gRfu.errorState = RFU_ERROR_STATE_1; } } static void ResetErrorState(void) { - Rfu.errorState = RFU_ERROR_STATE_NONE; + gRfu.errorState = RFU_ERROR_STATE_NONE; } void RfuSetIgnoreError(bool32 enable) { if (!enable) - Rfu.errorState = RFU_ERROR_STATE_NONE; + gRfu.errorState = RFU_ERROR_STATE_NONE; else - Rfu.errorState = RFU_ERROR_STATE_IGNORE; + gRfu.errorState = RFU_ERROR_STATE_IGNORE; } static void DisconnectNewChild(void) { SendDisconnectCommand(lman.acceptSlot_flag, RFU_DISCONNECT_ERROR); - Rfu.callback = NULL; + gRfu.callback = NULL; } static void StartDisconnectNewChild(void) { - Rfu.callback = DisconnectNewChild; + gRfu.callback = DisconnectNewChild; } -static void sub_801120C(u8 msg, u8 paramCount) +static void LinkManagerCB_Parent(u8 msg, u8 paramCount) { u8 i; u8 disconnectFlag = 0; switch (msg) { case LMAN_MSG_INITIALIZE_COMPLETED: - Rfu.state = RFUSTATE_PARENT_CONNECT; + gRfu.state = RFUSTATE_PARENT_CONNECT; break; case LMAN_MSG_NEW_CHILD_CONNECT_DETECTED: break; @@ -2164,12 +2179,12 @@ static void sub_801120C(u8 msg, u8 paramCount) { if ((lman.param[0] >> i) & 1) { - struct GFtgtGname *structPtr = (void *)gRfuLinkStatus->partner[i].gname; - if (structPtr->activity == GetHostRFUtgtGname()->activity) + struct RfuGameData *data = (void *)gRfuLinkStatus->partner[i].gname; + if (data->activity == GetHostRfuGameData()->activity) { - Rfu.partnerSendStatuses[i] = RFU_STATUS_OK; - Rfu.partnerRecvStatuses[i] = RFU_STATUS_OK; - rfu_setRecvBuffer(TYPE_NI, i, &Rfu.partnerRecvStatuses[i], sizeof(Rfu.partnerRecvStatuses[0])); + gRfu.partnerSendStatuses[i] = RFU_STATUS_OK; + gRfu.partnerRecvStatuses[i] = RFU_STATUS_OK; + rfu_setRecvBuffer(TYPE_NI, i, &gRfu.partnerRecvStatuses[i], sizeof(gRfu.partnerRecvStatuses[0])); } else { @@ -2188,26 +2203,26 @@ static void sub_801120C(u8 msg, u8 paramCount) case LMAN_MSG_SEARCH_CHILD_PERIOD_EXPIRED: break; case LMAN_MSG_END_WAIT_CHILD_NAME: - if (Rfu.acceptSlot_flag != lman.acceptSlot_flag) + if (gRfu.acceptSlot_flag != lman.acceptSlot_flag) { - rfu_REQ_disconnect(Rfu.acceptSlot_flag ^ lman.acceptSlot_flag); + rfu_REQ_disconnect(gRfu.acceptSlot_flag ^ lman.acceptSlot_flag); rfu_waitREQComplete(); } - Rfu.state = RFUSTATE_PARENT_FINALIZE_START; + gRfu.state = RFUSTATE_PARENT_FINALIZE_START; break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_START_RECOVERY: - Rfu.linkLossRecoveryState = 1; + gRfu.linkLossRecoveryState = 1; break; case LMAN_MSG_LINK_RECOVERY_SUCCESSED: - Rfu.linkLossRecoveryState = 3; + gRfu.linkLossRecoveryState = 3; break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_DISCONNECTED: case LMAN_MSG_LINK_RECOVERY_FAILED_AND_DISCONNECTED: - Rfu.linkLossRecoveryState = 4; - Rfu.unk_ce2 &= ~lman.param[0]; + gRfu.linkLossRecoveryState = 4; + gRfu.unk_ce2 &= ~lman.param[0]; if (gReceivedRemoteLinkPlayers == 1) { - if (Rfu.unk_ce2 == 0) + if (gRfu.unk_ce2 == 0) GetLinkmanErrorParams(msg); else StartDisconnectNewChild(); @@ -2222,7 +2237,7 @@ static void sub_801120C(u8 msg, u8 paramCount) case LMAN_MSG_LMAN_API_ERROR_RETURN: RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); GetLinkmanErrorParams(msg); - Rfu.isShuttingDown = TRUE; + gRfu.isShuttingDown = TRUE; break; case LMAN_MSG_REQ_API_ERROR: case LMAN_MSG_WATCH_DOG_TIMER_ERROR: @@ -2230,59 +2245,59 @@ static void sub_801120C(u8 msg, u8 paramCount) case LMAN_MSG_RFU_FATAL_ERROR: GetLinkmanErrorParams(msg); RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); - Rfu.unk_cdb = TRUE; + gRfu.unk_cdb = TRUE; break; } } -void sub_8011404(u8 msg, u8 unused1) +static void LinkManagerCB_Child(u8 msg, u8 unused1) { switch (msg) { case LMAN_MSG_INITIALIZE_COMPLETED: - Rfu.state = RFUSTATE_CHILD_CONNECT; + gRfu.state = RFUSTATE_CHILD_CONNECT; break; case LMAN_MSG_PARENT_FOUND: - Rfu.parentId = lman.param[0]; + gRfu.parentId = lman.param[0]; break; case LMAN_MSG_SEARCH_PARENT_PERIOD_EXPIRED: break; case LMAN_MSG_CONNECT_PARENT_SUCCESSED: - Rfu.childSlot = lman.param[0]; + gRfu.childSlot = lman.param[0]; break; case LMAN_MSG_CONNECT_PARENT_FAILED: RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; case LMAN_MSG_CHILD_NAME_SEND_COMPLETED: - Rfu.state = RFUSTATE_CHILD_TRY_JOIN; - Rfu.unk_c85 = RFU_STATUS_OK; - Rfu.recvStatus = RFU_STATUS_OK; - rfu_setRecvBuffer(TYPE_NI, Rfu.childSlot, &Rfu.recvStatus, sizeof(Rfu.recvStatus)); - rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, sizeof(Rfu.unk_c3f)); + gRfu.state = RFUSTATE_CHILD_TRY_JOIN; + gRfu.leaveGroupStatus = RFU_STATUS_OK; + gRfu.recvStatus = RFU_STATUS_OK; + rfu_setRecvBuffer(TYPE_NI, gRfu.childSlot, &gRfu.recvStatus, sizeof(gRfu.recvStatus)); + rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.unk_c3f, sizeof(gRfu.unk_c3f)); break; case LMAN_MSG_CHILD_NAME_SEND_FAILED_AND_DISCONNECTED: RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_DISCONNECTED: - Rfu.linkLossRecoveryState = 2; - if (Rfu.recvStatus == RFU_STATUS_JOIN_GROUP_NO) + gRfu.linkLossRecoveryState = 2; + if (gRfu.recvStatus == RFU_STATUS_JOIN_GROUP_NO) break; case LMAN_MSG_LINK_RECOVERY_FAILED_AND_DISCONNECTED: - if (Rfu.linkLossRecoveryState != 2) - Rfu.linkLossRecoveryState = 4; - if (Rfu.recvStatus != RFU_STATUS_LEAVE_GROUP) + if (gRfu.linkLossRecoveryState != 2) + gRfu.linkLossRecoveryState = 4; + if (gRfu.recvStatus != RFU_STATUS_LEAVE_GROUP) RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); Debug_PrintString(sASCII_LinkLossDisconnect, 5, 5); if (gReceivedRemoteLinkPlayers == 1) GetLinkmanErrorParams(msg); break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_START_RECOVERY: - Rfu.linkLossRecoveryState = 1; + gRfu.linkLossRecoveryState = 1; Debug_PrintString(sASCII_LinkLossRecoveryNow, 5, 5); break; case LMAN_MSG_LINK_RECOVERY_SUCCESSED: - Rfu.linkLossRecoveryState = 3; - Rfu.linkRecovered = TRUE; + gRfu.linkLossRecoveryState = 3; + gRfu.linkRecovered = TRUE; break; case 0x34: // ? Not a valid LMAN_MSG value break; @@ -2293,7 +2308,7 @@ void sub_8011404(u8 msg, u8 unused1) case LMAN_MSG_LMAN_API_ERROR_RETURN: RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); GetLinkmanErrorParams(msg); - Rfu.isShuttingDown = TRUE; + gRfu.isShuttingDown = TRUE; break; case LMAN_MSG_REQ_API_ERROR: case LMAN_MSG_WATCH_DOG_TIMER_ERROR: @@ -2301,7 +2316,7 @@ void sub_8011404(u8 msg, u8 unused1) case LMAN_MSG_RFU_FATAL_ERROR: RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); GetLinkmanErrorParams(msg); - Rfu.unk_cdb = TRUE; + gRfu.unk_cdb = TRUE; break; } } @@ -2314,23 +2329,23 @@ static void sub_80115EC(s32 a0) { if ((a0 >> i) & 1) { - Rfu.unk_cea[i] = 0; - Rfu.unk_cee[i] = 0xFF; + gRfu.unk_cea[i] = 0; + gRfu.unk_cee[i] = 0xFF; } } } -static u8 GetNewChildrenInUnionRoomChat(s32 a0) +static u8 GetNewChildrenInUnionRoomChat(s32 emptySlotMask) { u8 ret = 0; u8 i; for (i = 0; i < RFU_CHILD_MAX; i++) { - if ((a0 >> i) & 1) + if ((emptySlotMask >> i) & 1) { - struct GFtgtGname *structPtr = (void *)gRfuLinkStatus->partner[i].gname; - if (structPtr->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) + struct RfuGameData *data = (void *)gRfuLinkStatus->partner[i].gname; + if (data->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) ret |= (1 << i); } } @@ -2338,43 +2353,43 @@ static u8 GetNewChildrenInUnionRoomChat(s32 a0) return ret; } -static void sub_8011674(u8 msg, u8 paramCount) +static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) { - u8 r1; + u8 acceptSlot; switch (msg) { case LMAN_MSG_INITIALIZE_COMPLETED: - Rfu.state = RFUSTATE_17; + gRfu.state = RFUSTATE_17; break; case LMAN_MSG_NEW_CHILD_CONNECT_DETECTED: RfuSetStatus(RFU_STATUS_NEW_CHILD_DETECTED, 0); break; case LMAN_MSG_NEW_CHILD_CONNECT_ACCEPTED: - if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM) && !Rfu.stopNewConnections) + if (GetHostRfuGameData()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM) && !gRfu.stopNewConnections) { - u8 idx = GetNewChildrenInUnionRoomChat(lman.param[0]); - if (idx != 0) + u8 newChildren = GetNewChildrenInUnionRoomChat(lman.param[0]); + if (newChildren != 0) { - r1 = 1 << sub_800E87C(idx); - if (Rfu.unk_ce6 == 0 && !Rfu.unk_ce8) + acceptSlot = 1 << Rfu_GetIndexOfNewestChild(newChildren); + if (gRfu.newChildQueue == 0 && !gRfu.unk_ce8) { - Rfu.unk_ce5 = r1; - Rfu.unk_ce6 |= (r1 ^ idx); - Rfu.unk_ce8 = TRUE; + gRfu.nextChildBits = acceptSlot; + gRfu.newChildQueue |= (acceptSlot ^ newChildren); + gRfu.unk_ce8 = TRUE; } else { - Rfu.unk_ce6 |= idx; + gRfu.newChildQueue |= newChildren; } } - if (idx != lman.param[0]) + if (newChildren != lman.param[0]) { - Rfu.disconnectSlots |= (idx ^ lman.param[0]); - Rfu.disconnectMode = RFU_DISCONNECT_NORMAL; + gRfu.disconnectSlots |= (newChildren ^ lman.param[0]); + gRfu.disconnectMode = RFU_DISCONNECT_NORMAL; } } - else if (GetHostRFUtgtGname()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM)) + else if (GetHostRfuGameData()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM)) { rfu_REQ_disconnect(lman.acceptSlot_flag); rfu_waitREQComplete(); @@ -2386,30 +2401,30 @@ static void sub_8011674(u8 msg, u8 paramCount) case LMAN_MSG_SEARCH_CHILD_PERIOD_EXPIRED: break; case LMAN_MSG_END_WAIT_CHILD_NAME: - if (GetHostRFUtgtGname()->activity != (ACTIVITY_CHAT | IN_UNION_ROOM) && lman.acceptCount > 1) + if (GetHostRfuGameData()->activity != (ACTIVITY_CHAT | IN_UNION_ROOM) && lman.acceptCount > 1) { - r1 = 1 << sub_800E87C(lman.param[0]); - rfu_REQ_disconnect(lman.acceptSlot_flag ^ r1); + acceptSlot = 1 << Rfu_GetIndexOfNewestChild(lman.param[0]); + rfu_REQ_disconnect(lman.acceptSlot_flag ^ acceptSlot); rfu_waitREQComplete(); } - if (Rfu.state == RFUSTATE_15) - Rfu.state = RFUSTATE_UR_FINALIZE; + if (gRfu.state == RFUSTATE_15) + gRfu.state = RFUSTATE_UR_FINALIZE; break; break; case LMAN_MSG_PARENT_FOUND: - Rfu.parentId = lman.param[0]; + gRfu.parentId = lman.param[0]; break; case LMAN_MSG_SEARCH_PARENT_PERIOD_EXPIRED: break; case LMAN_MSG_CONNECT_PARENT_SUCCESSED: - Rfu.childSlot = lman.param[0]; + gRfu.childSlot = lman.param[0]; break; case LMAN_MSG_CONNECT_PARENT_FAILED: - Rfu.state = RFUSTATE_18; - if (Rfu.connectParentFailures < 2) + gRfu.state = RFUSTATE_PARENT_RECONNECT; + if (gRfu.connectParentFailures < 2) { - Rfu.connectParentFailures++; - CreateTask(sub_801209C, 2); + gRfu.connectParentFailures++; + CreateTask(Task_TryConnectToUnionRoomParent, 2); } else { @@ -2417,39 +2432,39 @@ static void sub_8011674(u8 msg, u8 paramCount) } break; case LMAN_MSG_CHILD_NAME_SEND_COMPLETED: - Rfu.state = RFUSTATE_13; + gRfu.state = RFUSTATE_UR_PLAYER_EXCHANGE; RfuSetStatus(RFU_STATUS_CHILD_SEND_COMPLETE, 0); - rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, sizeof(Rfu.unk_c3f)); + rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.unk_c3f, sizeof(gRfu.unk_c3f)); break; case LMAN_MSG_CHILD_NAME_SEND_FAILED_AND_DISCONNECTED: RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_START_RECOVERY: if (lman.acceptSlot_flag & lman.param[0]) - Rfu.linkLossRecoveryState = 1; + gRfu.linkLossRecoveryState = 1; break; case LMAN_MSG_LINK_RECOVERY_SUCCESSED: - Rfu.linkLossRecoveryState = 3; + gRfu.linkLossRecoveryState = 3; if (gRfuLinkStatus->parentChild == MODE_CHILD) - Rfu.linkRecovered = TRUE; + gRfu.linkRecovered = TRUE; break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_DISCONNECTED: - Rfu.linkLossRecoveryState = 2; + gRfu.linkLossRecoveryState = 2; case LMAN_MSG_LINK_RECOVERY_FAILED_AND_DISCONNECTED: - if (Rfu.linkLossRecoveryState != 2) - Rfu.linkLossRecoveryState = 4; - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.linkLossRecoveryState != 2) + gRfu.linkLossRecoveryState = 4; + if (gRfu.parentChild == MODE_PARENT) { if (gReceivedRemoteLinkPlayers == 1) { - Rfu.unk_ce2 &= ~(lman.param[0]); - if (Rfu.unk_ce2 == 0) + gRfu.unk_ce2 &= ~(lman.param[0]); + if (gRfu.unk_ce2 == 0) GetLinkmanErrorParams(msg); else StartDisconnectNewChild(); } } - else if (Rfu.disconnectMode != RFU_DISCONNECT_NORMAL && gReceivedRemoteLinkPlayers == 1) + else if (gRfu.disconnectMode != RFU_DISCONNECT_NORMAL && gReceivedRemoteLinkPlayers == 1) { GetLinkmanErrorParams(msg); rfu_LMAN_stopManager(0); @@ -2457,13 +2472,13 @@ static void sub_8011674(u8 msg, u8 paramCount) if (gRfuLinkStatus->parentChild == MODE_NEUTRAL && lman.pcswitch_flag == 0 - && FuncIsActiveTask(Task_LinkRfu_UnionRoomListen) == TRUE) - Rfu.state = RFUSTATE_17; + && FuncIsActiveTask(Task_UnionRoomListen) == TRUE) + gRfu.state = RFUSTATE_17; RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; case LMAN_MSG_LINK_DISCONNECTED_BY_USER: - Rfu.disconnectSlots = 0; + gRfu.disconnectSlots = 0; break; case LMAN_MSG_RFU_POWER_DOWN: case LMAN_MSG_MANAGER_STOPPED: @@ -2472,7 +2487,7 @@ static void sub_8011674(u8 msg, u8 paramCount) case LMAN_MSG_LMAN_API_ERROR_RETURN: RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); GetLinkmanErrorParams(msg); - Rfu.isShuttingDown = TRUE; + gRfu.isShuttingDown = TRUE; break; case LMAN_MSG_REQ_API_ERROR: case LMAN_MSG_WATCH_DOG_TIMER_ERROR: @@ -2480,25 +2495,25 @@ static void sub_8011674(u8 msg, u8 paramCount) case LMAN_MSG_RFU_FATAL_ERROR: GetLinkmanErrorParams(msg); RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); - Rfu.unk_cdb = FALSE; + gRfu.unk_cdb = FALSE; break; } } void RfuSetNormalDisconnectMode(void) { - Rfu.disconnectMode = RFU_DISCONNECT_NORMAL; + gRfu.disconnectMode = RFU_DISCONNECT_NORMAL; } void RfuSetStatus(u8 status, u16 msg) { - Rfu.status = status; - Rfu.linkmanMsg = msg; + gRfu.status = status; + gRfu.linkmanMsg = msg; } u8 RfuGetStatus(void) { - return Rfu.status; + return gRfu.status; } bool32 RfuHasErrored(void) @@ -2513,12 +2528,12 @@ bool32 RfuHasErrored(void) bool32 sub_8011A9C(void) { - return Rfu.unk_ce8; + return gRfu.unk_ce8; } bool8 Rfu_IsMaster(void) { - return Rfu.parentChild; + return gRfu.parentChild; } void RfuVSync(void) @@ -2531,14 +2546,15 @@ void ClearRecvCommands(void) CpuFill32(0, gRecvCmds, sizeof(gRecvCmds)); } -static void sub_8011AE8(void) +static void VBlank_RfuIdle(void) { LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); } -static void sub_8011AFC(void) +// Unused +static void Debug_RfuIdle(void) { s32 i; @@ -2546,14 +2562,14 @@ static void sub_8011AFC(void) FreeAllSpritePalettes(); ResetTasks(); ResetPaletteFade(); - SetVBlankCallback(sub_8011AE8); + SetVBlankCallback(VBlank_RfuIdle); if (IsWirelessAdapterConnected()) { gLinkType = LINKTYPE_TRADE; SetWirelessCommType1(); OpenLink(); SeedRng(gMain.vblankCounter2); - for (i = 0; i < 4; i++) + for (i = 0; i < TRAINER_ID_LENGTH; i++) gSaveBlock2Ptr->playerTrainerId[i] = Random() % 256; SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG0_ON | DISPCNT_BG2_ON | DISPCNT_OBJ_1D_MAP); @@ -2562,28 +2578,28 @@ static void sub_8011AFC(void) BuildOamBuffer(); UpdatePaletteFade(); CreateTask_RfuIdle(); - SetMainCallback2(sub_8011BF8); + SetMainCallback2(CB2_RfuIdle); } } bool32 IsUnionRoomListenTaskActive(void) { - return FuncIsActiveTask(Task_LinkRfu_UnionRoomListen); + return FuncIsActiveTask(Task_UnionRoomListen); } void CreateTask_RfuIdle(void) { if (!FuncIsActiveTask(Task_Idle)) - Rfu.idleTaskId = CreateTask(Task_Idle, 0); + gRfu.idleTaskId = CreateTask(Task_Idle, 0); } void DestroyTask_RfuIdle(void) { if (FuncIsActiveTask(Task_Idle) == TRUE) - DestroyTask(Rfu.idleTaskId); + DestroyTask(gRfu.idleTaskId); } -static void sub_8011BF8(void) +static void CB2_RfuIdle(void) { RunTasks(); AnimateSprites(); @@ -2593,31 +2609,31 @@ static void sub_8011BF8(void) void InitializeRfuLinkManager_LinkLeader(u32 a0) { - Rfu.parentChild = MODE_PARENT; - CopyPlayerNameToUnameBuffer(); - rfu_LMAN_initializeManager(sub_801120C, NULL); + gRfu.parentChild = MODE_PARENT; + SetHostRfuUsername(); + rfu_LMAN_initializeManager(LinkManagerCB_Parent, NULL); sRfuReqConfig = sRfuReqConfigTemplate; sRfuReqConfig.availSlot_flag = sAvailSlots[a0 - 1]; - CreateTask_LinkLeaderSearchForChildren(); + CreateTask_ParentSearchForChildren(); } void InitializeRfuLinkManager_JoinGroup(void) { - Rfu.parentChild = MODE_CHILD; - CopyPlayerNameToUnameBuffer(); - rfu_LMAN_initializeManager(sub_8011404, sub_800ED34); - CreateTask_JoinGroupSearchForParent(); + gRfu.parentChild = MODE_CHILD; + SetHostRfuUsername(); + rfu_LMAN_initializeManager(LinkManagerCB_Child, LinkManagerCB_MSC); + CreateTask_ChildSearchForParent(); } void InitializeRfuLinkManager_EnterUnionRoom(void) { - Rfu.parentChild = MODE_P_C_SWITCH; - CopyPlayerNameToUnameBuffer(); - rfu_LMAN_initializeManager(sub_8011674, NULL); + gRfu.parentChild = MODE_P_C_SWITCH; + SetHostRfuUsername(); + rfu_LMAN_initializeManager(LinkManagerCB_UnionRoom, NULL); sRfuReqConfig = sRfuReqConfigTemplate; sRfuReqConfig.linkRecovery_enable = 0; sRfuReqConfig.linkRecovery_period = 600; - Rfu.searchTaskId = CreateTask(Task_LinkRfu_UnionRoomListen, 1); + gRfu.searchTaskId = CreateTask(Task_UnionRoomListen, 1); } static u16 ReadU16(const void *ptr) @@ -2651,10 +2667,10 @@ static void RfuReqDisconnectSlot(u32 slot) { rfu_REQ_disconnect(slot); rfu_waitREQComplete(); - Rfu.unk_ce2 &= ~(slot); - rfu_clearSlot(1, Rfu.unk_cda); - rfu_UNI_setSendData(Rfu.unk_ce2, Rfu.recvCmds, 70); - Rfu.unk_cda = sub_800E87C(Rfu.unk_ce2); + gRfu.unk_ce2 &= ~slot; + rfu_clearSlot(1, gRfu.unk_cda); + rfu_UNI_setSendData(gRfu.unk_ce2, gRfu.recvCmds, 70); + gRfu.unk_cda = Rfu_GetIndexOfNewestChild(gRfu.unk_ce2); } void RequestDisconnectSlotByTrainerNameAndId(const u8 *name, u16 id) @@ -2673,7 +2689,7 @@ void Rfu_DisconnectPlayerById(u32 playerIdx) for (i = 0; i < RFU_CHILD_MAX; i++) { - if (Rfu.linkPlayerIdx[i] == playerIdx && (Rfu.unk_ce2 >> i) & 1) + if (gRfu.linkPlayerIdx[i] == playerIdx && (gRfu.unk_ce2 >> i) & 1) toDisconnect |= 1 << i; } if (toDisconnect) @@ -2686,13 +2702,13 @@ void Rfu_DisconnectPlayerById(u32 playerIdx) static void Task_SendDisconnectCommand(u8 taskId) { - if (gSendCmd[0] == 0 && !Rfu.unk_ce8) + if (gSendCmd[0] == 0 && !gRfu.unk_ce8) { RfuPrepareSendBuffer(RFUCMD_DISCONNECT); gSendCmd[1] = gTasks[taskId].tDisconnectPlayers; gSendCmd[2] = gTasks[taskId].tDisconnectMode; - Rfu.playerCount -= sPlayerBitsToCount[gTasks[taskId].tDisconnectPlayers]; - gSendCmd[3] = Rfu.playerCount; + gRfu.playerCount -= sPlayerBitsToCount[gTasks[taskId].tDisconnectPlayers]; + gSendCmd[3] = gRfu.playerCount; DestroyTask(taskId); } } @@ -2729,12 +2745,12 @@ static void Task_RfuReconnectWithParent(u8 taskId) { if (gRfuLinkStatus->partner[id].slot != 0xFF) { - Rfu.unk_c3d = id; + gRfu.unk_c3d = id; if (TryReconnectParent()) DestroyTask(taskId); } - else if (GetHostRFUtgtGname()->activity == ACTIVITY_WONDER_CARD2 - || GetHostRFUtgtGname()->activity == ACTIVITY_WONDER_NEWS2) + else if (GetHostRfuGameData()->activity == ACTIVITY_WONDER_CARD + || GetHostRfuGameData()->activity == ACTIVITY_WONDER_NEWS) { tTime++; } @@ -2748,7 +2764,7 @@ static void Task_RfuReconnectWithParent(u8 taskId) else { tTime++; - Rfu.unk_c3d = id; + gRfu.unk_c3d = id; } } else @@ -2771,40 +2787,40 @@ void CreateTask_RfuReconnectWithParent(const u8 *name, u16 trainerId) u8 taskId; s16 *data; - Rfu.status = RFU_STATUS_OK; + gRfu.status = RFU_STATUS_OK; taskId = CreateTask(Task_RfuReconnectWithParent, 3); data = gTasks[taskId].data; StringCopy((u8*)(data), name); data[8] = trainerId; } -static bool32 IsPartnerActivityIncompatible(s16 activity, struct GFtgtGname *partnerGname) +static bool32 IsPartnerActivityIncompatible(s16 activity, struct RfuGameData *partner) { - if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) + if (GetHostRfuGameData()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) { // Host trying to chat, but partner isn't - if (partnerGname->activity != (ACTIVITY_CHAT | IN_UNION_ROOM)) + if (partner->activity != (ACTIVITY_CHAT | IN_UNION_ROOM)) return TRUE; } - else if (partnerGname->activity != IN_UNION_ROOM) + else if (partner->activity != IN_UNION_ROOM) { // Partner not in union room return TRUE; } else if (activity == (ACTIVITY_TRADE | IN_UNION_ROOM)) { - // Trying to trade, make sure trade matches request - struct GFtgtGname *tradeGname = &Rfu.unk_10A; - if (tradeGname->species == SPECIES_EGG) + // Verify that the trade offered hasn't changed + struct RfuGameData *original = &gRfu.parent; + if (original->tradeSpecies == SPECIES_EGG) { - if (partnerGname->species == tradeGname->species) + if (partner->tradeSpecies == original->tradeSpecies) return FALSE; else return TRUE; } - else if (partnerGname->species != tradeGname->species - || partnerGname->level != tradeGname->level - || partnerGname->type != tradeGname->type) + else if (partner->tradeSpecies != original->tradeSpecies + || partner->tradeLevel != original->tradeLevel + || partner->tradeType != original->tradeType) { return TRUE; } @@ -2816,9 +2832,10 @@ static bool32 IsPartnerActivityIncompatible(s16 activity, struct GFtgtGname *par #define tTime data[0] #define tActivity data[1] -static void sub_801209C(u8 taskId) +static void Task_TryConnectToUnionRoomParent(u8 taskId) { - if (Rfu.status == RFU_STATUS_NEW_CHILD_DETECTED) + // Stop task if player is the new parent + if (gRfu.status == RFU_STATUS_NEW_CHILD_DETECTED) DestroyTask(taskId); if (++gTasks[taskId].tTime > 300) @@ -2828,17 +2845,21 @@ static void sub_801209C(u8 taskId) DestroyTask(taskId); } - if (Rfu.parentId != 0 && lman.parent_child == MODE_CHILD) + // Check if parent should be searched for + if (gRfu.parentId != 0 && lman.parent_child == MODE_CHILD) { - u16 trainerId = ReadU16(Rfu.unk_10A.unk_00.playerTrainerId); - u8 id = GetPartnerIndexByNameAndTrainerID(Rfu.playerName, trainerId); + // Search for parent + u16 trainerId = ReadU16(gRfu.parent.compatibility.playerTrainerId); + u8 id = GetPartnerIndexByNameAndTrainerID(gRfu.parentName, trainerId); if (id != 0xFF) { + // Parent found, try to connect if (!IsPartnerActivityIncompatible(gTasks[taskId].tActivity, (void *)gRfuLinkStatus->partner[id].gname)) { if (gRfuLinkStatus->partner[id].slot != 0xFF && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[id].id, 90)) { - Rfu.state = RFUSTATE_10; + // Succesfully connected to parent + gRfu.state = RFUSTATE_CONNECTED; DestroyTask(taskId); } } @@ -2852,33 +2873,33 @@ static void sub_801209C(u8 taskId) } } -void sub_8012188(const u8 *name, struct GFtgtGname *gname, u8 activity) +void TryConnectToUnionRoomParent(const u8 *name, struct RfuGameData *parent, u8 activity) { - u8 taskId, taskId2; + u8 taskId, listenTaskId; - Rfu.connectParentFailures = 0; - Rfu.status = RFU_STATUS_OK; - StringCopy(Rfu.playerName, name); - memcpy(&Rfu.unk_10A, gname, RFU_GAME_NAME_LENGTH); + gRfu.connectParentFailures = 0; + gRfu.status = RFU_STATUS_OK; + StringCopy(gRfu.parentName, name); + memcpy(&gRfu.parent, parent, RFU_GAME_NAME_LENGTH); rfu_LMAN_forceChangeSP(); - taskId = CreateTask(sub_801209C, 2); + taskId = CreateTask(Task_TryConnectToUnionRoomParent, 2); gTasks[taskId].tActivity = activity; - taskId2 = FindTaskIdByFunc(Task_LinkRfu_UnionRoomListen); + listenTaskId = FindTaskIdByFunc(Task_UnionRoomListen); if (activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) { - if (taskId2 != TASK_NONE) - gTasks[taskId2].tData7 = TRUE; + if (listenTaskId != TASK_NONE) + gTasks[listenTaskId].tConnectingForChat = TRUE; } else { - if (taskId2 != TASK_NONE) - gTasks[taskId2].tData7 = FALSE; + if (listenTaskId != TASK_NONE) + gTasks[listenTaskId].tConnectingForChat = FALSE; } } bool8 IsRfuRecoveringFromLinkLoss(void) { - if (Rfu.linkLossRecoveryState == 1) + if (gRfu.linkLossRecoveryState == 1) return TRUE; else return FALSE; @@ -2892,7 +2913,7 @@ bool32 IsRfuCommunicatingWithAllChildren(void) // RFU_STATUS_OK is the default status. // If any connected child is receiving a status other // than OK, then the parent is communicating with them - if ((lman.acceptSlot_flag >> i) & 1 && Rfu.partnerSendStatuses[i] == RFU_STATUS_OK) + if ((lman.acceptSlot_flag >> i) & 1 && gRfu.partnerSendStatuses[i] == RFU_STATUS_OK) return FALSE; } @@ -2912,7 +2933,7 @@ static void Debug_PrintStatus(void) Debug_PrintNum(GetBlockReceivedStatus(), 28, 19, 2); Debug_PrintNum(gRfuLinkStatus->connSlotFlag, 20, 1, 1); Debug_PrintNum(gRfuLinkStatus->linkLossSlotFlag, 23, 1, 1); - if (Rfu.parentChild == MODE_PARENT) + if (gRfu.parentChild == MODE_PARENT) { for (i = 0; i < RFU_CHILD_MAX; i++) { @@ -2926,7 +2947,7 @@ static void Debug_PrintStatus(void) for (i = 0; i < RFU_CHILD_MAX; i++) { for (j = 0; j < CHILD_DATA_LENGTH; j++) - Debug_PrintNum(Rfu.childRecvBuffer[i][j], j * 2, i + 11, 2); + Debug_PrintNum(gRfu.childRecvBuffer[i][j], j * 2, i + 11, 2); } Debug_PrintString(sASCII_NowSlot, 1, 15); } @@ -2938,9 +2959,9 @@ static void Debug_PrintStatus(void) Debug_PrintString(sASCII_15Spaces, 6, i + 3); Debug_PrintString(sASCII_8Spaces, 22, i + 3); } - Debug_PrintNum(gRfuLinkStatus->partner[Rfu.childSlot].serialNo, 1, 3, 4); - Debug_PrintString((void*)gRfuLinkStatus->partner[Rfu.childSlot].gname, 6, 3); - Debug_PrintString(gRfuLinkStatus->partner[Rfu.childSlot].uname, 22, 3); + Debug_PrintNum(gRfuLinkStatus->partner[gRfu.childSlot].serialNo, 1, 3, 4); + Debug_PrintString((void*)gRfuLinkStatus->partner[gRfu.childSlot].gname, 6, 3); + Debug_PrintString(gRfuLinkStatus->partner[gRfu.childSlot].uname, 22, 3); } else { @@ -2964,12 +2985,12 @@ static void Debug_PrintStatus(void) static u32 GetRfuSendQueueLength(void) { - return Rfu.sendQueue.count; + return gRfu.sendQueue.count; } u32 GetRfuRecvQueueLength(void) { - return Rfu.recvQueue.count; + return gRfu.recvQueue.count; } static void Task_Idle(u8 taskId) diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index 08678c40f4..acac57d35c 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -15,6 +15,9 @@ enum { WIRELESS_STATUS_ANIM_ERROR, }; +#define TAG_GFX_STATUS_INDICATOR 0xD431 +#define TAG_PAL_STATUS_INDICATOR 0xD432 + #define UNUSED_QUEUE_NUM_SLOTS 2 #define UNUSED_QUEUE_SLOT_LENGTH 256 @@ -29,7 +32,7 @@ struct RfuUnusedQueue EWRAM_DATA u8 gWirelessStatusIndicatorSpriteId = 0; -static u8 sUnknown_03000D74; +static u8 sSequenceArrayValOffset; static const u16 sWirelessLinkIconPalette[] = INCBIN_U16("graphics/interface/wireless_link_icon.gbapal"); static const u32 sWirelessLinkIconPic[] = INCBIN_U32("graphics/interface/wireless_link_icon.4bpp.lz"); @@ -290,16 +293,16 @@ static const union AnimCmd *const sWirelessStatusIndicatorAnims[] = { }; static const struct CompressedSpriteSheet sWirelessStatusIndicatorSpriteSheet = { - sWirelessLinkIconPic, 0x0380, 0xD431 + sWirelessLinkIconPic, 0x0380, TAG_GFX_STATUS_INDICATOR }; static const struct SpritePalette sWirelessStatusIndicatorSpritePalette = { - sWirelessLinkIconPalette, 0xD432 + sWirelessLinkIconPalette, TAG_PAL_STATUS_INDICATOR }; static const struct SpriteTemplate sWirelessStatusIndicatorSpriteTemplate = { - .tileTag = 0xD431, - .paletteTag = 0xD432, + .tileTag = TAG_GFX_STATUS_INDICATOR, + .paletteTag = TAG_PAL_STATUS_INDICATOR, .oam = &sWirelessStatusIndicatorOamData, .anims = sWirelessStatusIndicatorAnims, .images = NULL, @@ -333,9 +336,7 @@ void RfuSendQueue_Reset(struct RfuSendQueue *queue) for (i = 0; i < SEND_QUEUE_NUM_SLOTS; i++) { for (j = 0; j < SEND_QUEUE_SLOT_LENGTH; j++) - { queue->slots[i][j] = 0; - } } queue->sendSlot = 0; queue->recvSlot = 0; @@ -351,9 +352,7 @@ static void RfuUnusedQueue_Reset(struct RfuUnusedQueue *queue) for (i = 0; i < UNUSED_QUEUE_NUM_SLOTS; i++) { for (j = 0; j < UNUSED_QUEUE_SLOT_LENGTH; j++) - { queue->slots[i][j] = 0; - } } queue->sendSlot = 0; queue->recvSlot = 0; @@ -555,46 +554,57 @@ static bool8 RfuUnusedQueue_Dequeue(struct RfuUnusedQueue *queue, u8 *dest) } // Unused -static void sub_800DBF8(u8 *q1, u8 mode) +// Populates an array with a sequence of numbers (which numbers depends on the mode) +// and sets the final element to the total of the other elements +#define SEQ_ARRAY_MAX_SIZE 200 +static void PopulateArrayWithSequence(u8 *arr, u8 mode) { s32 i; u8 rval; - u16 r5 = 0; + u16 total = 0; switch (mode) { case 0: - for (i = 0; i < 200; i++) + // Populate with numbers 1-200 + // Total will be 20100 + for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++) { - q1[i] = i + 1; - r5 += i + 1; + arr[i] = i + 1; + total += i + 1; } - *((u16 *)(q1 + i)) = r5; + *((u16 *)(arr + i)) = total; break; case 1: + // Populate with numbers 1-100 + // Total will be 5050 for (i = 0; i < 100; i++) { - q1[i] = i + 1; - r5 += i + 1; + arr[i] = i + 1; + total += i + 1; } - *((u16 *)(q1 + 200)) = r5; + *((u16 *)(arr + SEQ_ARRAY_MAX_SIZE)) = total; break; case 2: - for (i = 0; i < 200; i++) + // Populate with random numbers 0-255 + // Total will be a number 0-51000 + for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++) { rval = Random(); - q1[i] = rval; - r5 += rval; + arr[i] = rval; + total += rval; } - *((u16 *)(q1 + i)) = r5; + *((u16 *)(arr + i)) = total; break; case 3: - for (i = 0; i < 200; i++) + // Populate with numbers 1-200 + sSequenceArrayValOffset + // Total will be a number 20100-51000 + for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++) { - q1[i] = i + 1 + sUnknown_03000D74; - r5 += (i + 1 + sUnknown_03000D74) & 0xFF; + arr[i] = i + 1 + sSequenceArrayValOffset; + total += (i + 1 + sSequenceArrayValOffset) & 0xFF; } - *((u16 *)(q1 + i)) = r5; - sUnknown_03000D74++; + *((u16 *)(arr + i)) = total; + sSequenceArrayValOffset++; break; } } @@ -606,9 +616,7 @@ static void PkmnStrToASCII(u8 *asciiStr, const u8 *pkmnStr) s32 i; for (i = 0; pkmnStr[i] != EOS; i++) - { asciiStr[i] = sWireless_RSEtoASCIITable[pkmnStr[i]]; - } asciiStr[i] = 0; } @@ -617,9 +625,7 @@ static void ASCIIToPkmnStr(u8 *pkmnStr, const u8 *asciiStr) s32 i; for (i = 0; asciiStr[i] != 0; i++) - { pkmnStr[i] = sWireless_ASCIItoRSETable[asciiStr[i]]; - } pkmnStr[i] = EOS; } @@ -655,33 +661,32 @@ static u8 GetConnectedChildStrength(u8 maxFlags) return 0; } -void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders) +void InitHostRfuGameData(struct RfuGameData *data, u8 activity, bool32 startedActivity, s32 partnerInfo) { s32 i; - for (i = 0; i < 2; i++) - { - data->unk_00.playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; - } + for (i = 0; i < (s32)ARRAY_COUNT(data->compatibility.playerTrainerId); i++) + data->compatibility.playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; + for (i = 0; i < RFU_CHILD_MAX; i++) { - data->child_sprite_gender[i] = child_sprite_genders; - child_sprite_genders >>= 8; + data->partnerInfo[i] = partnerInfo; + partnerInfo >>= 8; // Each element is 1 byte } data->playerGender = gSaveBlock2Ptr->playerGender; data->activity = activity; - data->started = started; - data->unk_00.language = GAME_LANGUAGE; - data->unk_00.version = GAME_VERSION; - data->unk_00.hasNews = FALSE; - data->unk_00.hasCard = FALSE; - data->unk_00.unknown = FALSE; - data->unk_00.isChampion = FlagGet(FLAG_IS_CHAMPION); - data->unk_00.hasNationalDex = IsNationalPokedexEnabled(); - data->unk_00.gameClear = FlagGet(FLAG_SYS_GAME_CLEAR); + data->startedActivity = startedActivity; + data->compatibility.language = GAME_LANGUAGE; + data->compatibility.version = GAME_VERSION; + data->compatibility.hasNews = FALSE; + data->compatibility.hasCard = FALSE; + data->compatibility.unknown = FALSE; + data->compatibility.isChampion = FlagGet(FLAG_IS_CHAMPION); + data->compatibility.hasNationalDex = IsNationalPokedexEnabled(); + data->compatibility.gameClear = FlagGet(FLAG_SYS_GAME_CLEAR); } -bool8 LinkRfu_GetNameIfCompatible(struct GFtgtGname *buff1, u8 *buff2, u8 idx) +bool8 Rfu_GetCompatiblePlayerData(struct RfuGameData *gameData, u8 *username, u8 idx) { bool8 retVal; @@ -690,13 +695,13 @@ bool8 LinkRfu_GetNameIfCompatible(struct GFtgtGname *buff1, u8 *buff2, u8 idx) retVal = TRUE; if (IsRfuSerialNumberValid(gRfuLinkStatus->partner[idx].serialNo) && ((gRfuLinkStatus->getNameFlag >> idx) & 1)) { - memcpy(buff1, gRfuLinkStatus->partner[idx].gname, RFU_GAME_NAME_LENGTH); - memcpy(buff2, gRfuLinkStatus->partner[idx].uname, PLAYER_NAME_LENGTH + 1); + memcpy(gameData, gRfuLinkStatus->partner[idx].gname, RFU_GAME_NAME_LENGTH); + memcpy(username, gRfuLinkStatus->partner[idx].uname, RFU_USER_NAME_LENGTH); } else { - memset(buff1, 0, RFU_GAME_NAME_LENGTH); - memset(buff2, 0, PLAYER_NAME_LENGTH + 1); + memset(gameData, 0, RFU_GAME_NAME_LENGTH); + memset(username, 0, RFU_USER_NAME_LENGTH); } } else @@ -704,39 +709,39 @@ bool8 LinkRfu_GetNameIfCompatible(struct GFtgtGname *buff1, u8 *buff2, u8 idx) retVal = FALSE; if (IsRfuSerialNumberValid(gRfuLinkStatus->partner[idx].serialNo)) { - memcpy(buff1, gRfuLinkStatus->partner[idx].gname, RFU_GAME_NAME_LENGTH); - memcpy(buff2, gRfuLinkStatus->partner[idx].uname, PLAYER_NAME_LENGTH + 1); + memcpy(gameData, gRfuLinkStatus->partner[idx].gname, RFU_GAME_NAME_LENGTH); + memcpy(username, gRfuLinkStatus->partner[idx].uname, RFU_USER_NAME_LENGTH); } else { - memset(buff1, 0, RFU_GAME_NAME_LENGTH); - memset(buff2, 0, PLAYER_NAME_LENGTH + 1); + memset(gameData, 0, RFU_GAME_NAME_LENGTH); + memset(username, 0, RFU_USER_NAME_LENGTH); } } return retVal; } -bool8 LinkRfu_GetNameIfSerial7F7D(struct GFtgtGname *buff1, u8 *buff2, u8 idx) +bool8 Rfu_GetWonderDistributorPlayerData(struct RfuGameData *gameData, u8 *username, u8 idx) { bool8 retVal = FALSE; - if (gRfuLinkStatus->partner[idx].serialNo == RFU_SERIAL_B) + if (gRfuLinkStatus->partner[idx].serialNo == RFU_SERIAL_WONDER_DISTRIBUTOR) { - memcpy(buff1, gRfuLinkStatus->partner[idx].gname, RFU_GAME_NAME_LENGTH); - memcpy(buff2, gRfuLinkStatus->partner[idx].uname, PLAYER_NAME_LENGTH + 1); + memcpy(gameData, gRfuLinkStatus->partner[idx].gname, RFU_GAME_NAME_LENGTH); + memcpy(username, gRfuLinkStatus->partner[idx].uname, RFU_USER_NAME_LENGTH); retVal = TRUE; } else { - memset(buff1, 0, RFU_GAME_NAME_LENGTH); - memset(buff2, 0, PLAYER_NAME_LENGTH + 1); + memset(gameData, 0, RFU_GAME_NAME_LENGTH); + memset(username, 0, RFU_USER_NAME_LENGTH); } return retVal; } -void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *buff1, u8 *buff2) +void CopyHostRfuGameDataAndUsername(struct RfuGameData *gameData, u8 *username) { - memcpy(buff1, &gHostRFUtgtGnameBuffer, RFU_GAME_NAME_LENGTH); - memcpy(buff2, gHostRFUtgtUnameBuffer, PLAYER_NAME_LENGTH + 1); + memcpy(gameData, &gHostRfuGameData, RFU_GAME_NAME_LENGTH); + memcpy(username, gHostRfuUsername, RFU_USER_NAME_LENGTH); } #define sNextAnimNum data[0] @@ -754,8 +759,8 @@ void CreateWirelessStatusIndicatorSprite(u8 x, u8 y) if (x == 0 && y == 0) { - x = 0xE7; - y = 0x08; + x = 231; + y = 8; } if (gRfuLinkStatus->parentChild == MODE_PARENT) { @@ -788,9 +793,7 @@ void DestroyWirelessStatusIndicatorSprite(void) void LoadWirelessStatusIndicatorSpriteGfx(void) { if (GetSpriteTileStartByTag(sWirelessStatusIndicatorSpriteSheet.tag) == 0xFFFF) - { LoadCompressedSpriteSheet(&sWirelessStatusIndicatorSpriteSheet); - } LoadSpritePalette(&sWirelessStatusIndicatorSpritePalette); gWirelessStatusIndicatorSpriteId = SPRITE_NONE; } @@ -802,9 +805,7 @@ static u8 GetParentSignalStrength(void) for (i = 0; i < RFU_CHILD_MAX; i++) { if (flags & 1) - { return gRfuLinkStatus->strength[i]; - } flags >>= 1; } return 0; @@ -827,40 +828,33 @@ void UpdateWirelessStatusIndicatorSprite(void) struct Sprite *sprite = &gSprites[gWirelessStatusIndicatorSpriteId]; u8 signalStrength = RFU_LINK_ICON_LEVEL4_MAX; u8 i = 0; + + // Get weakest signal strength if (gRfuLinkStatus->parentChild == MODE_PARENT) { for (i = 0; i < GetLinkPlayerCount() - 1; i++) { if (signalStrength >= GetConnectedChildStrength(i + 1)) - { signalStrength = GetConnectedChildStrength(i + 1); - } } } else { signalStrength = GetParentSignalStrength(); } + + // Set signal strength sprite anim number if (IsRfuRecoveringFromLinkLoss() == TRUE) - { sprite->sNextAnimNum = WIRELESS_STATUS_ANIM_ERROR; - } else if (signalStrength <= RFU_LINK_ICON_LEVEL1_MAX) - { sprite->sNextAnimNum = WIRELESS_STATUS_ANIM_SEARCHING; - } else if (signalStrength >= RFU_LINK_ICON_LEVEL2_MIN && signalStrength <= RFU_LINK_ICON_LEVEL2_MAX) - { sprite->sNextAnimNum = WIRELESS_STATUS_ANIM_1_BAR; - } else if (signalStrength >= RFU_LINK_ICON_LEVEL3_MIN && signalStrength <= RFU_LINK_ICON_LEVEL3_MAX) - { sprite->sNextAnimNum = WIRELESS_STATUS_ANIM_2_BARS; - } else if (signalStrength >= RFU_LINK_ICON_LEVEL4_MIN) - { sprite->sNextAnimNum = WIRELESS_STATUS_ANIM_3_BARS; - } + if (sprite->sNextAnimNum != sprite->sSavedAnimNum) { SetWirelessStatusIndicatorAnim(sprite, sprite->sNextAnimNum); @@ -871,9 +865,7 @@ void UpdateWirelessStatusIndicatorSprite(void) sprite->sFrameIdx++; sprite->sFrameDelay = 0; if (sprite->anims[sprite->sCurrAnimNum][sprite->sFrameIdx].type == -2) - { sprite->sFrameIdx = 0; - } } else { @@ -884,11 +876,9 @@ void UpdateWirelessStatusIndicatorSprite(void) gMain.oamBuffer[125].y = sprite->pos1.y + sprite->centerToCornerVecY; gMain.oamBuffer[125].paletteNum = sprite->oam.paletteNum; gMain.oamBuffer[125].tileNum = sprite->sTileStart + sprite->anims[sprite->sCurrAnimNum][sprite->sFrameIdx].frame.imageValue; - CpuCopy16(gMain.oamBuffer + 125, (struct OamData *)OAM + 125, sizeof(struct OamData)); + CpuCopy16(&gMain.oamBuffer[125], (struct OamData *)OAM + 125, sizeof(struct OamData)); if (RfuGetStatus() == RFU_STATUS_FATAL_ERROR) - { DestroyWirelessStatusIndicatorSprite(); - } } } @@ -926,7 +916,7 @@ void RecordMixTrainerNames(void) s32 i; s32 j; s32 nextSpace; - s32 connectedTrainerRecordIndices[5]; + s32 connectedTrainerRecordIndices[MAX_RFU_PLAYERS]; struct TrainerNameRecord *newRecords = calloc(ARRAY_COUNT(gSaveBlock1Ptr->trainerNameRecords), sizeof(struct TrainerNameRecord)); // Check if we already have a record saved for connected trainers. @@ -936,9 +926,7 @@ void RecordMixTrainerNames(void) for (j = 0; j < (int)ARRAY_COUNT(gSaveBlock1Ptr->trainerNameRecords); j++) { if ((u16)gLinkPlayers[i].trainerId == gSaveBlock1Ptr->trainerNameRecords[j].trainerId && StringCompare(gLinkPlayers[i].name, gSaveBlock1Ptr->trainerNameRecords[j].trainerName) == 0) - { connectedTrainerRecordIndices[i] = j; - } } } @@ -952,9 +940,7 @@ void RecordMixTrainerNames(void) // If we already had a record for this trainer, wipe it so that the next step doesn't duplicate it. if (connectedTrainerRecordIndices[i] >= 0) - { - memset(gSaveBlock1Ptr->trainerNameRecords[connectedTrainerRecordIndices[i]].trainerName, 0, 8); - } + memset(gSaveBlock1Ptr->trainerNameRecords[connectedTrainerRecordIndices[i]].trainerName, 0, PLAYER_NAME_LENGTH + 1); nextSpace++; } } @@ -967,9 +953,7 @@ void RecordMixTrainerNames(void) { CopyTrainerRecord(&newRecords[nextSpace], gSaveBlock1Ptr->trainerNameRecords[i].trainerId, gSaveBlock1Ptr->trainerNameRecords[i].trainerName); if (++nextSpace >= (int)ARRAY_COUNT(gSaveBlock1Ptr->trainerNameRecords)) - { break; - } } } @@ -1001,6 +985,6 @@ void WipeTrainerNameRecords(void) for (i = 0; i < (int)ARRAY_COUNT(gSaveBlock1Ptr->trainerNameRecords); i++) { gSaveBlock1Ptr->trainerNameRecords[i].trainerId = 0; - CpuFill16(0, gSaveBlock1Ptr->trainerNameRecords[i].trainerName, 8); + CpuFill16(0, gSaveBlock1Ptr->trainerNameRecords[i].trainerName, PLAYER_NAME_LENGTH + 1); } } diff --git a/src/mystery_gift.c b/src/mystery_gift.c index afbe50e4d2..6ae6a95348 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -510,13 +510,9 @@ void MG_DrawCheckerboardPattern(u32 bg) for (j = 0; j < 32; j++) { if ((i & 1) != (j & 1)) - { FillBgTilemapBufferRect(bg, 1, j, i + 2, 1, 1, 0x11); - } else - { FillBgTilemapBufferRect(bg, 2, j, i + 2, 1, 1, 0x11); - } } } } @@ -593,10 +589,8 @@ bool32 unref_HideDownArrowAndWaitButton(u8 * textState) { case 0: HideDownArrow(); - if (({JOY_NEW(A_BUTTON | B_BUTTON);})) - { + if (JOY_NEW(A_BUTTON | B_BUTTON)) (*textState)++; - } break; case 1: ShowDownArrow(); @@ -609,9 +603,8 @@ bool32 unref_HideDownArrowAndWaitButton(u8 * textState) static bool32 PrintStringAndWait2Seconds(u8 * counter, const u8 * str) { if (*counter == 0) - { AddTextPrinterToWindow1(str); - } + if (++(*counter) > 120) { *counter = 0; @@ -632,27 +625,20 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whi s32 response; if (whichMenu == 0) - { listMenuTemplate.items = sListMenuItems_CardsOrNews; - } else - { listMenuTemplate.items = sListMenuItems_WirelessOrFriend; - } + width = Intl_GetListMenuWidth(&listMenuTemplate); if (width & 1) - { width++; - } + windowTemplate.width = width; if (width < 30) - { windowTemplate.tilemapLeft = (30 - width) / 2; - } else - { windowTemplate.tilemapLeft = 0; - } + response = DoMysteryGiftListMenu(&windowTemplate, &listMenuTemplate, 1, 0x00A, 0xE0); if (response != -1) { @@ -672,13 +658,9 @@ s8 mevent_message_print_and_prompt_yes_no(u8 * textState, u16 * windowId, bool8 case 0: StringExpandPlaceholders(gStringVar4, str); if (yesNoBoxPlacement == 0) - { *windowId = AddWindow(&sWindowTemplate_PromptYesOrNo_Width28); - } else - { *windowId = AddWindow(&sWindowTemplate_PromptYesOrNo_Width20); - } FillWindowPixelBuffer(*windowId, 0x11); AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); @@ -689,19 +671,15 @@ s8 mevent_message_print_and_prompt_yes_no(u8 * textState, u16 * windowId, bool8 case 1: windowTemplate = sWindowTemplate_YesNoBox; if (yesNoBoxPlacement == 0) - { windowTemplate.tilemapTop = 9; - } else - { windowTemplate.tilemapTop = 15; - } CreateYesNoMenu(&windowTemplate, 10, 14, 0); (*textState)++; break; case 2: input = Menu_ProcessInputNoWrapClearOnChoose(); - if (input == -1 || input == 0 || input == 1) + if (input == MENU_B_PRESSED || input == 0 || input == 1) { *textState = 0; rbox_fill_rectangle(*windowId); @@ -711,16 +689,16 @@ s8 mevent_message_print_and_prompt_yes_no(u8 * textState, u16 * windowId, bool8 return input; } break; - case 0xFF: + case (u8)MENU_B_PRESSED: *textState = 0; rbox_fill_rectangle(*windowId); ClearWindowTilemap(*windowId); CopyWindowToVram(*windowId, 1); RemoveWindow(*windowId); - return -1; + return MENU_B_PRESSED; } - return -2; + return MENU_NOTHING_CHOSEN; } static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cannotToss, bool32 cannotSend) @@ -1237,21 +1215,21 @@ void task00_mystery_gift(u8 taskId) case 0: if (data->source == 1) { - MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_CARD2); + MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_CARD); } else if (data->source == 0) { - MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_CARD2); + MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_CARD); } break; case 1: if (data->source == 1) { - MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_NEWS2); + MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_NEWS); } else if (data->source == 0) { - MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_NEWS2); + MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_NEWS); } break; } @@ -1594,10 +1572,10 @@ void task00_mystery_gift(u8 taskId) switch (data->IsCardOrNews) { case 0: - MEvent_CreateTask_Leader(ACTIVITY_WONDER_CARD2); + MEvent_CreateTask_Leader(ACTIVITY_WONDER_CARD); break; case 1: - MEvent_CreateTask_Leader(ACTIVITY_WONDER_NEWS2); + MEvent_CreateTask_Leader(ACTIVITY_WONDER_NEWS); break; } data->source = 1; diff --git a/src/overworld.c b/src/overworld.c index 979ebb74c4..154ece0427 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -2898,7 +2898,7 @@ bool32 IsSendingKeysOverCable(void) static u32 GetLinkSendQueueLength(void) { if (gWirelessCommType != 0) - return Rfu.sendQueue.count; + return gRfu.sendQueue.count; else return gLink.sendQueue.count; } diff --git a/src/party_menu.c b/src/party_menu.c index 681dc5f935..e657dcf7de 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -3522,7 +3522,7 @@ static void CursorCb_Register(u8 taskId) u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL); - switch (CanRegisterMonForTradingBoard(*(struct GFtgtGnameSub *)GetHostRFUtgtGname(), species2, species, isEventLegal)) + switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isEventLegal)) { case CANT_REGISTER_MON: StringExpandPlaceholders(gStringVar4, gText_PkmnCantBeTradedNow); @@ -3548,7 +3548,7 @@ static void CursorCb_Trade1(u8 taskId) u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL); - u32 stringId = GetUnionRoomTradeMessageId(*(struct GFtgtGnameSub *)GetHostRFUtgtGname(), gPartnerTgtGnameSub, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isEventLegal); + u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isEventLegal); if (stringId != UR_TRADE_MSG_NONE) { diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index 777939f08c..361dc278b0 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -2202,7 +2202,7 @@ static int GetPlayersAtJumpPeak(void) static bool32 AreLinkQueuesEmpty(void) { - return !Rfu.recvQueue.count && !Rfu.sendQueue.count; + return !gRfu.recvQueue.count && !gRfu.sendQueue.count; } static int GetNumPlayersForBonus(u8 *arg0) diff --git a/src/trade.c b/src/trade.c index f0a31b5cba..0899a6e21d 100644 --- a/src/trade.c +++ b/src/trade.c @@ -274,7 +274,7 @@ static bool32 IsLinkTradeTaskFinished(void) { if (gPlayerCurrActivity == ACTIVITY_29) { - if (gRfuSlotStatusNI[sub_800E87C(lman.acceptSlot_flag)]->send.state == 0) + if (gRfuSlotStatusNI[Rfu_GetIndexOfNewestChild(lman.acceptSlot_flag)]->send.state == 0) return TRUE; else return FALSE; @@ -2438,80 +2438,70 @@ static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isEventLegal) return FALSE; } -int GetUnionRoomTradeMessageId(struct GFtgtGnameSub rfuPlayer, struct GFtgtGnameSub rfuPartner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, u8 isEventLegal) +int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, u8 isEventLegal) { - bool8 playerHasNationalDex = rfuPlayer.hasNationalDex; - bool8 playerIsChampion = rfuPlayer.isChampion; - bool8 partnerHasNationalDex = rfuPartner.hasNationalDex; - bool8 partnerIsChampion = rfuPartner.isChampion; - u8 r1 = rfuPartner.version; + bool8 playerHasNationalDex = player.hasNationalDex; + bool8 playerIsChampion = player.isChampion; + bool8 partnerHasNationalDex = partner.hasNationalDex; + bool8 partnerIsChampion = partner.isChampion; + u8 partnerVersion = partner.version; - if (r1 != VERSION_EMERALD) + // If partner is not using Emerald, both players must be champion + if (partnerVersion != VERSION_EMERALD) { if (!playerIsChampion) - { return UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_1; - } else if (!partnerIsChampion) - { return UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2; - } } + // Cannot trade illegitimate Deoxys/Mew if (IsDeoxysOrMewUntradable(playerSpecies, isEventLegal)) - { return UR_TRADE_MSG_MON_CANT_BE_TRADED_2; - } if (partnerSpecies == SPECIES_EGG) { + // If partner is trading an Egg then the player must also be trading an Egg if (playerSpecies2 != partnerSpecies) - { return UR_TRADE_MSG_NOT_EGG; - } } else { - if (gBaseStats[playerSpecies2].type1 != requestedType && gBaseStats[playerSpecies2].type2 != requestedType) - { + // Player's Pokémon must be of the type the partner requested + if (gBaseStats[playerSpecies2].type1 != requestedType + && gBaseStats[playerSpecies2].type2 != requestedType) return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS; - } } + // If the player is trading an Egg then the partner must also be trading an Egg + // Odd that this wasn't checked earlier, as by this point we know either the partner doesn't have an Egg or that both do. if (playerSpecies2 == SPECIES_EGG && playerSpecies2 != partnerSpecies) - { return UR_TRADE_MSG_MON_CANT_BE_TRADED_1; - } + // If the player doesn't have the National Dex then Eggs and non-Hoenn Pokémon can't be traded if (!playerHasNationalDex) { if (playerSpecies2 == SPECIES_EGG) - { return UR_TRADE_MSG_EGG_CANT_BE_TRADED; - } if (!IsSpeciesInHoennDex(playerSpecies2)) - { return UR_TRADE_MSG_MON_CANT_BE_TRADED_2; - } if (!IsSpeciesInHoennDex(partnerSpecies)) - { return UR_TRADE_MSG_PARTNERS_MON_CANT_BE_TRADED; - } } + // If the partner doesn't have the National Dex then the player's offer has to be a Hoenn Pokémon if (!partnerHasNationalDex && !IsSpeciesInHoennDex(playerSpecies2)) - { return UR_TRADE_MSG_PARTNER_CANT_ACCEPT_MON; - } + // Trade is allowed return UR_TRADE_MSG_NONE; } -int CanRegisterMonForTradingBoard(struct GFtgtGnameSub rfuPlayer, u16 species2, u16 species, u8 isEventLegal) +int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, u8 isEventLegal) { - bool8 hasNationalDex = rfuPlayer.hasNationalDex; + bool8 hasNationalDex = player.hasNationalDex; if (IsDeoxysOrMewUntradable(species, isEventLegal)) return CANT_REGISTER_MON; @@ -2541,9 +2531,7 @@ int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) { speciesArray[i] = GetMonData(&mon[i], MON_DATA_SPECIES2); if (speciesArray[i] == SPECIES_EGG) - { speciesArray[i] = SPECIES_NONE; - } } versions = 0; @@ -2553,13 +2541,9 @@ int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) version = gLinkPlayers[i].version & 0xFF; if (version == VERSION_FIRE_RED || version == VERSION_LEAF_GREEN) - { versions = 0; - } else - { versions |= 1; - } } for (i = 0; i < GetLinkPlayerCount(); i++) @@ -2590,9 +2574,7 @@ int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx) for (i = 0; i < gPlayerPartyCount; i++) { if (monIdx != i) - { numMonsLeft += speciesArray[i]; - } } if (!numMonsLeft) diff --git a/src/union_room.c b/src/union_room.c index 46957db5e4..eae7545139 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -174,12 +174,37 @@ enum { LG_STATE_SHUTDOWN = 23, }; +// Color types for PrintUnionRoomText +enum { + UR_COLOR_DEFAULT, + UR_COLOR_RED, + UR_COLOR_GREEN, + UR_COLOR_WHITE, + UR_COLOR_CANCEL, + UR_COLOR_TRADE_BOARD_SELF, + UR_COLOR_TRADE_BOARD_OTHER, +}; + +// Return values for HandlePlayerListUpdate +enum { + PLIST_0, + PLIST_1, + PLIST_2, + PLIST_3, + PLIST_4, +}; + static EWRAM_DATA u8 sUnionRoomPlayerName[12] = {}; EWRAM_DATA u8 gPlayerCurrActivity = 0; static EWRAM_DATA u8 sPlayerActivityGroupSize = 0; -static EWRAM_DATA union WirelessLink_Main sWirelessLinkMain = {}; +static EWRAM_DATA union +{ + struct WirelessLink_Leader *leader; + struct WirelessLink_Group *group; + struct WirelessLink_URoom *uRoom; +} sWirelessLinkMain = {}; static EWRAM_DATA u32 sUnused = 0; -EWRAM_DATA struct GFtgtGnameSub gPartnerTgtGnameSub = {}; +EWRAM_DATA struct RfuGameCompatibilityData gRfuPartnerCompatibilityData = {}; EWRAM_DATA u16 gUnionRoomOfferedSpecies = 0; EWRAM_DATA u8 gUnionRoomRequestedMonType = 0; static EWRAM_DATA struct UnionRoomTrade sUnionRoomTrade = {}; @@ -188,7 +213,7 @@ static struct WirelessLink_Leader *sLeader; static struct WirelessLink_Group *sGroup; static struct WirelessLink_URoom *sURoom; -static void UR_AddTextPrinterParameterized(u8, u8, const u8 *, u8, u8, u8); +static void PrintUnionRoomText(u8, u8, const u8 *, u8, u8, u8); static u16 ReadAsU16(const u8 *); static void Task_TryBecomeLinkLeader(u8); static void Task_TryJoinLinkGroup(u8); @@ -197,64 +222,64 @@ static void Task_MEvent_Leader(u8); static void Task_CardOrNewsWithFriend(u8); static void Task_CardOrNewsOverWireless(u8); static void Task_RunUnionRoom(u8); -static void ClearUnkStruct_x1CArray(struct UnkStruct_Main4 *, u8); -static void ClearUnkStruct_x20Array(struct UnkStruct_x20 *, u8); -static u8 CreateTask_ListenForPartnersWithCompatibleSerialNos(struct UnkStruct_Main4 *, u32); -static u8 CreateTask_ListenForPartnersWithSerial7F7D(struct UnkStruct_Main4 *, u32 ); +static void ClearIncomingPlayerList(struct RfuIncomingPlayerList *, u8); +static void ClearRfuPlayerList(struct RfuPlayer *, u8); +static u8 CreateTask_ListenForCompatiblePartners(struct RfuIncomingPlayerList *, u32); +static u8 CreateTask_ListenForWonderDistributor(struct RfuIncomingPlayerList *, u32 ); static bool8 PrintOnTextbox(u8 *, const u8 *); static bool8 Leader_SetStateIfMemberListChanged(struct WirelessLink_Leader *, u32, u32); -static u8 sub_8013398(struct UnkStruct_Main0 *); +static u8 LeaderPrunePlayerList(struct RfuPlayerList *); static s8 UnionRoomHandleYesNo(u8 *, bool32); -static void IntlConvPartnerUname7(u8 *, struct UnkStruct_x20 *); +static void CopyAndTranslatePlayerName(u8 *, struct RfuPlayer *); static void Leader_DestroyResources(struct WirelessLink_Leader *); static void CreateTask_RunScriptAndFadeToActivity(void); -static u8 LeaderUpdateGroupMembership(struct UnkStruct_Main0 *); -static void PrintGroupMemberCandidateOnWindowWithColor(u8, u8, u8, struct UnkStruct_x20 *, u8, u8 ); -static u32 Findx20Inx1CArray(struct UnkStruct_x20 *, struct UnkStruct_x1C *); -static u8 Appendx1Ctox20(struct UnkStruct_x20 *, struct UnkStruct_x1C *, u8); +static u8 LeaderUpdateGroupMembership(struct RfuPlayerList *); +static void PrintGroupCandidateOnWindow(u8, u8, u8, struct RfuPlayer *, u8, u8 ); +static u32 GetNewIncomingPlayerId(struct RfuPlayer *, struct RfuIncomingPlayer *); +static u8 TryAddIncomingPlayerToList(struct RfuPlayer *, struct RfuIncomingPlayer *, u8); static u8 GetNewLeaderCandidate(void); static u32 IsTryingToTradeAcrossVersionTooSoon(struct WirelessLink_Group *, s32); static void AskToJoinRfuGroup(struct WirelessLink_Group *, s32); static void JoinGroup_EnableScriptContexts(void); -static void PrintUnionRoomGroupOnWindow(u8, u8, u8, struct UnkStruct_x20 *, u8, u8); -static bool32 AreUnionRoomPlayerGnamesDifferent(struct WirelessGnameUnamePair *, struct WirelessGnameUnamePair *); +static void PrintGroupMemberOnWindow(u8, u8, u8, struct RfuPlayer *, u8, u8); +static bool32 ArePlayerDataDifferent(struct RfuPlayerData *, struct RfuPlayerData *); static u32 GetPartyPositionOfRegisteredMon(struct UnionRoomTrade *, u8); static void ResetUnionRoomTrade(struct UnionRoomTrade *); static void CreateTask_StartActivity(void); -static bool32 HasWonderCardOrNewsByLinkGroup(struct GFtgtGname *, s16); -static u8 CreateTask_SearchForChildOrParent(struct UnkStruct_Main4 *, struct UnkStruct_Main4 *, u32); +static bool32 HasWonderCardOrNewsByLinkGroup(struct RfuGameData *, s16); +static u8 CreateTask_SearchForChildOrParent(struct RfuIncomingPlayerList *, struct RfuIncomingPlayerList *, u32); static bool32 RegisterTradeMonAndGetIsEgg(u32, struct UnionRoomTrade *); static void RegisterTradeMon(u32, struct UnionRoomTrade *); -static void UR_EnableScriptContext2AndFreezeObjectEvents(void); +static void StartScriptInteraction(void); static bool32 IsPlayerFacingTradingBoard(void); static u8 HandlePlayerListUpdate(void); static bool32 PollPartnerYesNoResponse(struct WirelessLink_URoom *); static void ReceiveUnionRoomActivityPacket(struct WirelessLink_URoom *); -static u8 GetActivePartnerSpriteGenderParam(struct WirelessLink_URoom *); -static bool32 UnionRoom_HandleContactFromOtherPlayer(struct WirelessLink_URoom *); -static bool32 UR_RunTextPrinters_CheckPrinter0Active(void); -static s32 GetUnionRoomPlayerGender(s32, struct UnkStruct_Main0 *); -static s32 UnionRoomGetPlayerInteractionResponse(struct UnkStruct_Main0 *, u8, u8, u32); +static u8 GetActivePartnersInfo(struct WirelessLink_URoom *); +static bool32 HandleContactFromOtherPlayer(struct WirelessLink_URoom *); +static bool32 UR_RunTextPrinters(void); +static s32 GetUnionRoomPlayerGender(s32, struct RfuPlayerList *); +static s32 UnionRoomGetPlayerInteractionResponse(struct RfuPlayerList *, u8, u8, u32); static void HandleCancelActivity(bool32); static s32 ListMenuHandler_AllItemsAvailable(u8 *, u8 *, u8 *, const struct WindowTemplate *, const struct ListMenuTemplate *); -static s32 TradeBoardMenuHandler(u8 *, u8 *, u8 *, u8 *, const struct WindowTemplate *, const struct ListMenuTemplate *, struct UnkStruct_Main0 *); -static s32 GetIndexOfNthTradeBoardOffer(struct UnkStruct_x20 *, s32); +static s32 TradeBoardMenuHandler(u8 *, u8 *, u8 *, u8 *, const struct WindowTemplate *, const struct ListMenuTemplate *, struct RfuPlayerList *); +static s32 GetIndexOfNthTradeBoardOffer(struct RfuPlayer *, s32); static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void); static u32 GetResponseIdx_InviteToURoomActivity(s32); static void ViewURoomPartnerTrainerCard(u8 *, struct WirelessLink_URoom *, bool8); static void GetURoomActivityRejectMsg(u8 *, s32, u32); -static u32 ConvPartnerUnameAndGetWhetherMetAlready(struct UnkStruct_x20 *); +static u32 ConvPartnerUnameAndGetWhetherMetAlready(struct RfuPlayer *); static void GetURoomActivityStartMsg(u8 *, u8); static void UR_ClearBg0(void); static s32 IsRequestedTypeOrEggInPlayerParty(u32, u32); static bool32 UR_PrintFieldMessage(const u8 *); static s32 GetChatLeaderActionRequestMessage(u8 *, u32, u16 *, struct WirelessLink_URoom *); static void Task_InitUnionRoom(u8 taskId); -static bool8 AreGnameUnameDifferent(struct WirelessGnameUnamePair*, const struct WirelessGnameUnamePair*); -static void ItemPrintFunc_PossibleGroupMembers(u8 windowId, u32 id, u8 y); -static void ListMenuItemPrintFunc_UnionRoomGroups(u8 windowId, u32 id, u8 y); -static void TradeBoardListMenuItemPrintFunc(u8 windowId, u32 id, u8 y); -static void ItemPrintFunc_EmptyList(u8 windowId, u32 id, u8 y); +static bool8 ArePlayersDifferent(struct RfuPlayerData*, const struct RfuPlayerData*); +static void ItemPrintFunc_PossibleGroupMembers(u8, u32, u8); +static void ListMenuItemPrintFunc_UnionRoomGroups(u8, u32, u8); +static void TradeBoardListMenuItemPrintFunc(u8, u32, u8); +static void ItemPrintFunc_EmptyList(u8, u32, u8); #include "data/union_room.h" @@ -264,19 +289,19 @@ static void PrintNumPlayersWaitingForMsg(u8 windowId, u8 capacityCode, u8 string switch (capacityCode << 8) { case LINK_GROUP_CAPACITY(0, 2): - UR_AddTextPrinterParameterized(windowId, 1, sPlayersNeededOrModeTexts[0][stringId - 1], 0, 1, UR_COLOR_DKE_WHT_LTE); + PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[0][stringId - 1], 0, 1, UR_COLOR_DEFAULT); break; case LINK_GROUP_CAPACITY(0, 4): - UR_AddTextPrinterParameterized(windowId, 1, sPlayersNeededOrModeTexts[1][stringId - 1], 0, 1, UR_COLOR_DKE_WHT_LTE); + PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[1][stringId - 1], 0, 1, UR_COLOR_DEFAULT); break; case LINK_GROUP_CAPACITY(2, 5): - UR_AddTextPrinterParameterized(windowId, 1, sPlayersNeededOrModeTexts[2][stringId - 1], 0, 1, UR_COLOR_DKE_WHT_LTE); + PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[2][stringId - 1], 0, 1, UR_COLOR_DEFAULT); break; case LINK_GROUP_CAPACITY(3, 5): - UR_AddTextPrinterParameterized(windowId, 1, sPlayersNeededOrModeTexts[3][stringId - 1], 0, 1, UR_COLOR_DKE_WHT_LTE); + PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[3][stringId - 1], 0, 1, UR_COLOR_DEFAULT); break; case LINK_GROUP_CAPACITY(2, 4): - UR_AddTextPrinterParameterized(windowId, 1, sPlayersNeededOrModeTexts[4][stringId - 1], 0, 1, UR_COLOR_DKE_WHT_LTE); + PrintUnionRoomText(windowId, 1, sPlayersNeededOrModeTexts[4][stringId - 1], 0, 1, UR_COLOR_DEFAULT); break; } @@ -288,13 +313,13 @@ static void PrintPlayerNameAndIdOnWindow(u8 windowId) u8 text[30]; u8 *txtPtr; - UR_AddTextPrinterParameterized(windowId, 1, gSaveBlock2Ptr->playerName, 0, 1, UR_COLOR_DKE_WHT_LTE); + PrintUnionRoomText(windowId, 1, gSaveBlock2Ptr->playerName, 0, 1, UR_COLOR_DEFAULT); txtPtr = StringCopy(text, sText_ID); ConvertIntToDecimalStringN(txtPtr, ReadAsU16(gSaveBlock2Ptr->playerTrainerId), STR_CONV_MODE_LEADING_ZEROS, 5); - UR_AddTextPrinterParameterized(windowId, 1, text, 0, 0x11, UR_COLOR_DKE_WHT_LTE); + PrintUnionRoomText(windowId, 1, text, 0, 17, UR_COLOR_DEFAULT); } -static void StringExpandPlaceholders_AwaitingCommFromAnother(u8 *dst, u8 caseId) +static void GetAwaitingCommunicationText(u8 *dst, u8 caseId) { switch (caseId) { @@ -309,8 +334,8 @@ static void StringExpandPlaceholders_AwaitingCommFromAnother(u8 *dst, u8 caseId) case ACTIVITY_BATTLE_TOWER_OPEN: case ACTIVITY_RECORD_CORNER: case ACTIVITY_BERRY_BLENDER: - case ACTIVITY_WONDER_CARD2: - case ACTIVITY_WONDER_NEWS2: + case ACTIVITY_WONDER_CARD: + case ACTIVITY_WONDER_NEWS: case ACTIVITY_CONTEST_COOL: case ACTIVITY_CONTEST_BEAUTY: case ACTIVITY_CONTEST_CUTE: @@ -373,24 +398,24 @@ static void Task_TryBecomeLinkLeader(u8 taskId) gSpecialVar_0x8004++; gPlayerCurrActivity = sLinkGroupToActivityAndCapacity[gSpecialVar_0x8004]; sPlayerActivityGroupSize = sLinkGroupToActivityAndCapacity[gSpecialVar_0x8004] >> 8; - SetHostRFUtgtGname(gPlayerCurrActivity, 0, 0); + SetHostRfuGameData(gPlayerCurrActivity, 0, FALSE); SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_LinkLeader(GROUP_MAX(sPlayerActivityGroupSize)); data->state = LL_STATE_INIT2; break; case LL_STATE_INIT2: - data->field_4 = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); - data->field_0 = AllocZeroed(5 * sizeof(struct UnkStruct_x20)); - data->field_8 = AllocZeroed(5 * sizeof(struct UnkStruct_x20)); - ClearUnkStruct_x1CArray(data->field_4, 4); - ClearUnkStruct_x20Array(data->field_0->arr, 5); - LinkRfu3_SetGnameUnameFromStaticBuffers(&data->field_0->arr[0].gname_uname.gname, data->field_0->arr[0].gname_uname.playerName); - data->field_0->arr[0].timeoutCounter = 0; - data->field_0->arr[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - data->field_0->arr[0].useRedText = FALSE; - data->field_0->arr[0].field_1B = 0; - data->listenTaskId = CreateTask_ListenForPartnersWithCompatibleSerialNos(data->field_4, 0xFF); + data->incomingPlayerList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + data->playerList = AllocZeroed(MAX_RFU_PLAYERS * sizeof(struct RfuPlayer)); + data->playerListBackup = AllocZeroed(MAX_RFU_PLAYERS * sizeof(struct RfuPlayer)); + ClearIncomingPlayerList(data->incomingPlayerList, RFU_CHILD_MAX); + ClearRfuPlayerList(data->playerList->players, MAX_RFU_PLAYERS); + CopyHostRfuGameDataAndUsername(&data->playerList->players[0].rfu.data, data->playerList->players[0].rfu.name); + data->playerList->players[0].timeoutCounter = 0; + data->playerList->players[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; + data->playerList->players[0].useRedText = FALSE; + data->playerList->players[0].field_1B = 0; + data->listenTaskId = CreateTask_ListenForCompatiblePartners(data->incomingPlayerList, 0xFF); data->bButtonCancelWindowId = AddWindow(&sWindowTemplate_BButtonCancel); switch (GROUP_MAX(sPlayerActivityGroupSize)) { @@ -406,7 +431,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) data->nPlayerModeWindowId = AddWindow(&sWindowTemplate_NumPlayerMode); FillWindowPixelBuffer(data->bButtonCancelWindowId, PIXEL_FILL(2)); - UR_AddTextPrinterParameterized(data->bButtonCancelWindowId, 0, sText_BButtonCancel, 8, 1, 4); + PrintUnionRoomText(data->bButtonCancelWindowId, 0, sText_BButtonCancel, 8, 1, UR_COLOR_CANCEL); PutWindowTilemap(data->bButtonCancelWindowId); CopyWindowToVram(data->bButtonCancelWindowId, 2); @@ -434,7 +459,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) } else { - StringExpandPlaceholders_AwaitingCommFromAnother(gStringVar4, gPlayerCurrActivity); + GetAwaitingCommunicationText(gStringVar4, gPlayerCurrActivity); } PrintNumPlayersWaitingForMsg(data->nPlayerModeWindowId, sPlayerActivityGroupSize, data->playerCount); @@ -475,7 +500,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) if (!RfuTryDisconnectLeavingChildren()) { data->state = LL_STATE_AWAIT_PLAYERS; - data->playerCount = sub_8013398(data->field_0); + data->playerCount = LeaderPrunePlayerList(data->playerList); } break; case LL_STATE_MEMBER_LEFT: @@ -489,7 +514,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) #endif if (PrintOnTextbox(&data->textState, sPlayerUnavailableTexts[id])) { - data->playerCount = sub_8013398(data->field_0); + data->playerCount = LeaderPrunePlayerList(data->playerList); RedrawListMenu(data->listTaskId); data->state = LL_STATE_GET_AWAITING_PLAYERS_TEXT; } @@ -508,19 +533,19 @@ static void Task_TryBecomeLinkLeader(u8 taskId) } break; case LL_STATE_ACCEPT_NEW_MEMBER_PROMPT_HANDLE_INPUT: - switch (UnionRoomHandleYesNo(&data->textState, HasTrainerLeftPartnersList(ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId), data->field_0->arr[data->playerCount].gname_uname.playerName))) + switch (UnionRoomHandleYesNo(&data->textState, HasTrainerLeftPartnersList(ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId), data->playerList->players[data->playerCount].rfu.name))) { case 0: // YES LoadWirelessStatusIndicatorSpriteGfx(); CreateWirelessStatusIndicatorSprite(0, 0); data->joinRequestAnswer = RFU_STATUS_JOIN_GROUP_OK; - SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId), data->field_0->arr[data->playerCount].gname_uname.playerName); + SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId), data->playerList->players[data->playerCount].rfu.name); data->state = LL_STATE_UPDATE_AFTER_JOIN_REQUEST; break; case 1: // NO - case -1: + case MENU_B_PRESSED: data->joinRequestAnswer = RFU_STATUS_JOIN_GROUP_NO; - SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId), data->field_0->arr[data->playerCount].gname_uname.playerName); + SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId), data->playerList->players[data->playerCount].rfu.name); data->state = LL_STATE_UPDATE_AFTER_JOIN_REQUEST; break; case -3: @@ -529,23 +554,23 @@ static void Task_TryBecomeLinkLeader(u8 taskId) } break; case LL_STATE_UPDATE_AFTER_JOIN_REQUEST: - val = WaitSendRfuStatusToPartner(ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId), data->field_0->arr[data->playerCount].gname_uname.playerName); + val = WaitSendRfuStatusToPartner(ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId), data->playerList->players[data->playerCount].rfu.name); if (val == 1) // Send complete { if (data->joinRequestAnswer == RFU_STATUS_JOIN_GROUP_OK) { - data->field_0->arr[data->playerCount].field_1B = 0; + data->playerList->players[data->playerCount].field_1B = 0; RedrawListMenu(data->listTaskId); data->playerCount++; if (data->playerCount == GROUP_MAX(sPlayerActivityGroupSize)) { - if (GROUP_MIN2(sPlayerActivityGroupSize) != 0 || data->playerCount == 4) + if (GROUP_MIN2(sPlayerActivityGroupSize) != 0 || data->playerCount == RFU_CHILD_MAX) { data->state = LL_STATE_MEMBERS_OK_PROMPT; } else { - IntlConvPartnerUname7(gStringVar1, &data->field_0->arr[data->playerCount - 1]); + CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->playerCount - 1]); StringExpandPlaceholders(gStringVar4, sText_AnOKWasSentToPlayer); data->state = LL_STATE_ACCEPTED_FINAL_MEMBER; } @@ -560,9 +585,9 @@ static void Task_TryBecomeLinkLeader(u8 taskId) } else // Member disconnected { - RequestDisconnectSlotByTrainerNameAndId(data->field_0->arr[data->playerCount].gname_uname.playerName, ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId)); - data->field_0->arr[data->playerCount].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; - sub_8013398(data->field_0); + RequestDisconnectSlotByTrainerNameAndId(data->playerList->players[data->playerCount].rfu.name, ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId)); + data->playerList->players[data->playerCount].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; + LeaderPrunePlayerList(data->playerList); RedrawListMenu(data->listTaskId); data->state = LL_STATE_GET_AWAITING_PLAYERS_TEXT; } @@ -594,7 +619,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) data->state = LL_STATE_CONFIRMED_MEMBERS; break; case 1: // NO - case -1: + case MENU_B_PRESSED: if (GROUP_MIN2(sPlayerActivityGroupSize) != 0) data->state = LL_STATE_CANCEL_WITH_MSG; else @@ -613,7 +638,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) data->state = LL_STATE_SHUTDOWN_AND_FAIL; break; case 1: // NO - case -1: + case MENU_B_PRESSED: if (GROUP_MIN2(sPlayerActivityGroupSize) != 0) data->state = LL_STATE_MEMBERS_OK_PROMPT; else if (data->playerCount == GROUP_MAX(sPlayerActivityGroupSize)) @@ -704,9 +729,9 @@ static void Leader_DestroyResources(struct WirelessLink_Leader *data) RemoveWindow(data->bButtonCancelWindowId); DestroyTask(data->listenTaskId); - Free(data->field_8); - Free(data->field_0); - Free(data->field_4); + Free(data->playerListBackup); + Free(data->playerList); + Free(data->incomingPlayerList); } static void Leader_GetAcceptNewMemberPrompt(u8 *dst, u8 caseId) @@ -720,8 +745,8 @@ static void Leader_GetAcceptNewMemberPrompt(u8 *dst, u8 caseId) case ACTIVITY_BATTLE_TOWER: StringExpandPlaceholders(dst, sText_PlayerContactedYouForXAccept); break; - case ACTIVITY_WONDER_CARD2: - case ACTIVITY_WONDER_NEWS2: + case ACTIVITY_WONDER_CARD: + case ACTIVITY_WONDER_NEWS: StringExpandPlaceholders(dst, sText_PlayerContactedYouShareX); break; case ACTIVITY_BATTLE_MULTI: @@ -764,8 +789,8 @@ static void GetYouAskedToJoinGroupPleaseWaitMessage(u8 *dst, u8 caseId) case ACTIVITY_TRADE: case ACTIVITY_BATTLE_TOWER: case ACTIVITY_BATTLE_TOWER_OPEN: - case ACTIVITY_WONDER_CARD2: - case ACTIVITY_WONDER_NEWS2: + case ACTIVITY_WONDER_CARD: + case ACTIVITY_WONDER_NEWS: StringExpandPlaceholders(dst, sText_AwaitingPlayersResponse); break; case ACTIVITY_BATTLE_MULTI: @@ -793,8 +818,8 @@ static void GetGroupLeaderSentAnOKMessage(u8 *dst, u8 caseId) case ACTIVITY_TRADE: case ACTIVITY_BATTLE_TOWER: case ACTIVITY_BATTLE_TOWER_OPEN: - case ACTIVITY_WONDER_CARD2: - case ACTIVITY_WONDER_NEWS2: + case ACTIVITY_WONDER_CARD: + case ACTIVITY_WONDER_NEWS: StringExpandPlaceholders(dst, sText_PlayerSentBackOK); break; case ACTIVITY_BATTLE_MULTI: @@ -815,12 +840,12 @@ static void GetGroupLeaderSentAnOKMessage(u8 *dst, u8 caseId) static bool8 Leader_SetStateIfMemberListChanged(struct WirelessLink_Leader *data, u32 joinedState, u32 droppedState) { - switch (LeaderUpdateGroupMembership(data->field_0)) + switch (LeaderUpdateGroupMembership(data->playerList)) { case UNION_ROOM_SPAWN_IN: PlaySE(SE_PC_LOGIN); RedrawListMenu(data->listTaskId); - IntlConvPartnerUname7(gStringVar2, &data->field_0->arr[data->playerCount]); + CopyAndTranslatePlayerName(gStringVar2, &data->playerList->players[data->playerCount]); Leader_GetAcceptNewMemberPrompt(gStringVar4, gPlayerCurrActivity); data->state = joinedState; break; @@ -837,23 +862,23 @@ static bool8 Leader_SetStateIfMemberListChanged(struct WirelessLink_Leader *data static void ItemPrintFunc_PossibleGroupMembers(u8 windowId, u32 id, u8 y) { struct WirelessLink_Leader *data = sWirelessLinkMain.leader; - u8 colorIdx = UR_COLOR_DKE_WHT_LTE; + u8 colorIdx = UR_COLOR_DEFAULT; - switch (data->field_0->arr[id].groupScheduledAnim) + switch (data->playerList->players[id].groupScheduledAnim) { case UNION_ROOM_SPAWN_IN: - if (data->field_0->arr[id].field_1B != 0) - colorIdx = UR_COLOR_GRN_WHT_LTG; + if (data->playerList->players[id].field_1B != 0) + colorIdx = UR_COLOR_GREEN; break; case UNION_ROOM_SPAWN_OUT: - colorIdx = UR_COLOR_RED_WHT_LTR; + colorIdx = UR_COLOR_RED; break; } - PrintGroupMemberCandidateOnWindowWithColor(windowId, 0, y, &data->field_0->arr[id], colorIdx, id); + PrintGroupCandidateOnWindow(windowId, 0, y, &data->playerList->players[id], colorIdx, id); } -static u8 LeaderUpdateGroupMembership(struct UnkStruct_Main0 *arg0) +static u8 LeaderUpdateGroupMembership(struct RfuPlayerList *list) { struct WirelessLink_Leader *data = sWirelessLinkMain.leader; u8 ret = UNION_ROOM_SPAWN_NONE; @@ -862,31 +887,33 @@ static u8 LeaderUpdateGroupMembership(struct UnkStruct_Main0 *arg0) for (i = 1; i < MAX_RFU_PLAYERS; i++) { - u16 var = data->field_0->arr[i].groupScheduledAnim; + u16 var = data->playerList->players[i].groupScheduledAnim; if (var == UNION_ROOM_SPAWN_IN) { - id = Findx20Inx1CArray(&data->field_0->arr[i], data->field_4->arr); + id = GetNewIncomingPlayerId(&data->playerList->players[i], data->incomingPlayerList->players); if (id != 0xFF) { - data->field_0->arr[i].gname_uname = data->field_4->arr[id].gname_uname; - data->field_0->arr[i].timeoutCounter = 1; + // New incoming player + data->playerList->players[i].rfu = data->incomingPlayerList->players[id].rfu; + data->playerList->players[i].timeoutCounter = 1; } else { - data->field_0->arr[i].groupScheduledAnim = UNION_ROOM_SPAWN_OUT; + // No new incoming player + data->playerList->players[i].groupScheduledAnim = UNION_ROOM_SPAWN_OUT; ret = UNION_ROOM_SPAWN_OUT; } } } for (id = 0; id < RFU_CHILD_MAX; id++) - Appendx1Ctox20(data->field_0->arr, &data->field_4->arr[id], MAX_RFU_PLAYERS); + TryAddIncomingPlayerToList(data->playerList->players, &data->incomingPlayerList->players[id], MAX_RFU_PLAYERS); if (ret != UNION_ROOM_SPAWN_OUT) { for (id = 0; id < MAX_RFU_PLAYERS; id++) { - if (data->field_0->arr[id].field_1B != 0) + if (data->playerList->players[id].field_1B != 0) ret = UNION_ROOM_SPAWN_IN; } } @@ -894,7 +921,7 @@ static u8 LeaderUpdateGroupMembership(struct UnkStruct_Main0 *arg0) return ret; } -static u8 sub_8013398(struct UnkStruct_Main0 *arg0) +static u8 LeaderPrunePlayerList(struct RfuPlayerList *list) { struct WirelessLink_Leader *data = sWirelessLinkMain.leader; u8 copiedCount; @@ -902,14 +929,14 @@ static u8 sub_8013398(struct UnkStruct_Main0 *arg0) u8 playerCount; for (i = 0; i < MAX_RFU_PLAYERS; i++) - data->field_8->arr[i] = data->field_0->arr[i]; + data->playerListBackup->players[i] = data->playerList->players[i]; copiedCount = 0; for (i = 0; i < MAX_RFU_PLAYERS; i++) { - if (data->field_8->arr[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN) + if (data->playerListBackup->players[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN) { - data->field_0->arr[copiedCount] = data->field_8->arr[i]; + data->playerList->players[copiedCount] = data->playerListBackup->players[i]; copiedCount++; } } @@ -917,18 +944,18 @@ static u8 sub_8013398(struct UnkStruct_Main0 *arg0) playerCount = copiedCount; for (; copiedCount < MAX_RFU_PLAYERS; copiedCount++) { - data->field_0->arr[copiedCount].gname_uname = sWirelessGnameUnamePair_Dummy; - data->field_0->arr[copiedCount].timeoutCounter = 0; - data->field_0->arr[copiedCount].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; - data->field_0->arr[copiedCount].useRedText = FALSE; - data->field_0->arr[copiedCount].field_1B = 0; + data->playerList->players[copiedCount].rfu = sUnionRoomPlayer_DummyRfu; + data->playerList->players[copiedCount].timeoutCounter = 0; + data->playerList->players[copiedCount].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; + data->playerList->players[copiedCount].useRedText = FALSE; + data->playerList->players[copiedCount].field_1B = 0; } for (i = 0; i < MAX_RFU_PLAYERS; i++) { - if (data->field_0->arr[i].groupScheduledAnim != UNION_ROOM_SPAWN_IN) + if (data->playerList->players[i].groupScheduledAnim != UNION_ROOM_SPAWN_IN) continue; - if (data->field_0->arr[i].field_1B != 64) + if (data->playerList->players[i].field_1B != 64) continue; playerCount = i; @@ -963,12 +990,12 @@ static void Task_TryJoinLinkGroup(u8 taskId) if (gSpecialVar_0x8004 == LINK_GROUP_BATTLE_TOWER && gSaveBlock2Ptr->frontier.lvlMode == FRONTIER_LVL_OPEN) gSpecialVar_0x8004++; gPlayerCurrActivity = sLinkGroupToURoomActivity[gSpecialVar_0x8004]; - SetHostRFUtgtGname(gPlayerCurrActivity, 0, 0); + SetHostRfuGameData(gPlayerCurrActivity, 0, FALSE); SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_JoinGroup(); - data->field_4 = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); - data->field_0 = AllocZeroed(16 * sizeof(struct UnkStruct_x20)); + data->incomingPlayerList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + data->playerList = AllocZeroed(MAX_RFU_PLAYER_LIST_SIZE * sizeof(struct RfuPlayer)); data->state = LG_STATE_CHOOSE_LEADER_MSG; break; case LG_STATE_CHOOSE_LEADER_MSG: @@ -976,15 +1003,15 @@ static void Task_TryJoinLinkGroup(u8 taskId) data->state = LG_STATE_INIT_WINDOWS; break; case LG_STATE_INIT_WINDOWS: - ClearUnkStruct_x1CArray(data->field_4, 4); - ClearUnkStruct_x20Array(data->field_0->arr, 16); - data->listenTaskId = CreateTask_ListenForPartnersWithCompatibleSerialNos(data->field_4, gSpecialVar_0x8004); + ClearIncomingPlayerList(data->incomingPlayerList, RFU_CHILD_MAX); + ClearRfuPlayerList(data->playerList->players, MAX_RFU_PLAYER_LIST_SIZE); + data->listenTaskId = CreateTask_ListenForCompatiblePartners(data->incomingPlayerList, gSpecialVar_0x8004); data->bButtonCancelWindowId = AddWindow(&sWindowTemplate_BButtonCancel); - data->listWindowId = AddWindow(&gUnknown_082F0174); - data->playerNameAndIdWindowId = AddWindow(&gUnknown_082F017C); + data->listWindowId = AddWindow(&sWindowTemplate_GroupList); + data->playerNameAndIdWindowId = AddWindow(&sWindowTemplate_PlayerNameAndId); FillWindowPixelBuffer(data->bButtonCancelWindowId, PIXEL_FILL(2)); - UR_AddTextPrinterParameterized(data->bButtonCancelWindowId, 0, sText_ChooseJoinCancel, 8, 1, 4); + PrintUnionRoomText(data->bButtonCancelWindowId, 0, sText_ChooseJoinCancel, 8, 1, UR_COLOR_CANCEL); PutWindowTilemap(data->bButtonCancelWindowId); CopyWindowToVram(data->bButtonCancelWindowId, 2); @@ -1012,12 +1039,12 @@ static void Task_TryJoinLinkGroup(u8 taskId) break; case 0: id = ListMenu_ProcessInput(data->listTaskId); - if (JOY_NEW(A_BUTTON) && id != -1) + if (JOY_NEW(A_BUTTON) && id != MENU_B_PRESSED) { // this unused variable along with the assignment is needed to match - u32 activity = data->field_0->arr[id].gname_uname.gname.activity; + u32 activity = data->playerList->players[id].rfu.data.activity; - if (data->field_0->arr[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->field_0->arr[id].gname_uname.gname.started) + if (data->playerList->players[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->playerList->players[id].rfu.data.startedActivity) { u32 readyStatus = IsTryingToTradeAcrossVersionTooSoon(data, id); if (readyStatus == UR_TRADE_READY) @@ -1053,14 +1080,14 @@ static void Task_TryJoinLinkGroup(u8 taskId) GetYouAskedToJoinGroupPleaseWaitMessage(gStringVar4, gPlayerCurrActivity); if (PrintOnTextbox(&data->textState, gStringVar4)) { - IntlConvPartnerUname7(gStringVar1, &data->field_0->arr[data->leaderId]); + CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); data->state = LG_STATE_MAIN; } break; case LG_STATE_MAIN: if (gReceivedRemoteLinkPlayers) { - gPlayerCurrActivity = data->field_0->arr[data->leaderId].gname_uname.gname.activity; + gPlayerCurrActivity = data->playerList->players[data->leaderId].rfu.data.activity; RfuSetStatus(RFU_STATUS_OK, 0); switch (gPlayerCurrActivity) { @@ -1077,8 +1104,8 @@ static void Task_TryJoinLinkGroup(u8 taskId) case ACTIVITY_BATTLE_TOWER_OPEN: case ACTIVITY_RECORD_CORNER: case ACTIVITY_BERRY_BLENDER: - case ACTIVITY_WONDER_CARD2: - case ACTIVITY_WONDER_NEWS2: + case ACTIVITY_WONDER_CARD: + case ACTIVITY_WONDER_NEWS: case ACTIVITY_CONTEST_COOL: case ACTIVITY_CONTEST_BEAUTY: case ACTIVITY_CONTEST_CUTE: @@ -1158,7 +1185,7 @@ static void Task_TryJoinLinkGroup(u8 taskId) RedrawListMenu(data->listTaskId); break; case 1: // NO - case -1: + case MENU_B_PRESSED: data->state = LG_STATE_ASK_JOIN_GROUP; RedrawListMenu(data->listTaskId); break; @@ -1187,8 +1214,8 @@ static void Task_TryJoinLinkGroup(u8 taskId) RemoveWindow(data->listWindowId); RemoveWindow(data->bButtonCancelWindowId); DestroyTask(data->listenTaskId); - Free(data->field_0); - Free(data->field_4); + Free(data->playerList); + Free(data->incomingPlayerList); data->state++; break; case LG_STATE_RFU_ERROR_SHUTDOWN: @@ -1236,13 +1263,13 @@ static void Task_TryJoinLinkGroup(u8 taskId) static u32 IsTryingToTradeAcrossVersionTooSoon(struct WirelessLink_Group *data, s32 id) { - struct UnkStruct_x20 *structPtr = &data->field_0->arr[id]; + struct RfuPlayer *partner = &data->playerList->players[id]; - if (gPlayerCurrActivity == ACTIVITY_TRADE && structPtr->gname_uname.gname.unk_00.version != VERSION_EMERALD) + if (gPlayerCurrActivity == ACTIVITY_TRADE && partner->rfu.data.compatibility.version != VERSION_EMERALD) { if (!(gSaveBlock2Ptr->specialSaveWarpFlags & CHAMPION_SAVEWARP)) return UR_TRADE_PLAYER_NOT_READY; - else if (structPtr->gname_uname.gname.unk_00.isChampion) + else if (partner->rfu.data.compatibility.isChampion) return UR_TRADE_READY; } else @@ -1259,9 +1286,9 @@ static void AskToJoinRfuGroup(struct WirelessLink_Group *data, s32 id) LoadWirelessStatusIndicatorSpriteGfx(); CreateWirelessStatusIndicatorSprite(0, 0); RedrawListMenu(data->listTaskId); - IntlConvPartnerUname7(gStringVar1, &data->field_0->arr[data->leaderId]); + CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); UpdateGameData_SetActivity(sLinkGroupToURoomActivity[gSpecialVar_0x8004], 0, TRUE); - CreateTask_RfuReconnectWithParent(data->field_0->arr[data->leaderId].gname_uname.playerName, ReadAsU16(data->field_0->arr[data->leaderId].gname_uname.gname.unk_00.playerTrainerId)); + CreateTask_RfuReconnectWithParent(data->playerList->players[data->leaderId].rfu.name, ReadAsU16(data->playerList->players[data->leaderId].rfu.data.compatibility.playerTrainerId)); } u8 CreateTask_ListenToWireless(void) @@ -1287,19 +1314,19 @@ static void Task_ListenToWireless(u8 taskId) switch (data->state) { case 0: - SetHostRFUtgtGname(0, 0, 0); + SetHostRfuGameData(ACTIVITY_NONE, 0, FALSE); SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_JoinGroup(); RfuSetIgnoreError(TRUE); - data->field_4 = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); - data->field_0 = AllocZeroed(16 * sizeof(struct UnkStruct_x20)); + data->incomingPlayerList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + data->playerList = AllocZeroed(MAX_RFU_PLAYER_LIST_SIZE * sizeof(struct RfuPlayer)); data->state = 2; break; case 2: - ClearUnkStruct_x1CArray(data->field_4, 4); - ClearUnkStruct_x20Array(data->field_0->arr, 16); - data->listenTaskId = CreateTask_ListenForPartnersWithCompatibleSerialNos(data->field_4, 0xFF); + ClearIncomingPlayerList(data->incomingPlayerList, RFU_CHILD_MAX); + ClearRfuPlayerList(data->playerList->players, MAX_RFU_PLAYER_LIST_SIZE); + data->listenTaskId = CreateTask_ListenForCompatiblePartners(data->incomingPlayerList, 0xFF); data->leaderId = 0; data->state = 3; break; @@ -1311,8 +1338,8 @@ static void Task_ListenToWireless(u8 taskId) break; case 10: DestroyTask(data->listenTaskId); - Free(data->field_0); - Free(data->field_4); + Free(data->playerList); + Free(data->incomingPlayerList); LinkRfu_Shutdown(); data->state++; break; @@ -1347,27 +1374,26 @@ static bool32 IsPartnerActivityAcceptable(u32 activity, u32 linkGroup) return FALSE; } -static u8 URoomGroupListGetTextColor(struct WirelessLink_Group *data, u32 id) +static u8 GetGroupListTextColor(struct WirelessLink_Group *data, u32 id) { - if (data->field_0->arr[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN) + if (data->playerList->players[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN) { - if (data->field_0->arr[id].gname_uname.gname.started) - return UR_COLOR_WHT_WHT_LTE; - else if (data->field_0->arr[id].useRedText) - return UR_COLOR_RED_WHT_LTR; - else if (data->field_0->arr[id].field_1B != 0) - return UR_COLOR_GRN_WHT_LTG; + if (data->playerList->players[id].rfu.data.startedActivity) + return UR_COLOR_WHITE; + else if (data->playerList->players[id].useRedText) + return UR_COLOR_RED; + else if (data->playerList->players[id].field_1B != 0) + return UR_COLOR_GREEN; } - - return UR_COLOR_DKE_WHT_LTE; + return UR_COLOR_DEFAULT; } static void ListMenuItemPrintFunc_UnionRoomGroups(u8 windowId, u32 id, u8 y) { struct WirelessLink_Group *data = sWirelessLinkMain.group; - u8 colorId = URoomGroupListGetTextColor(data, id); + u8 colorId = GetGroupListTextColor(data, id); - PrintUnionRoomGroupOnWindow(windowId, 8, y, &data->field_0->arr[id], colorId, id); + PrintGroupMemberOnWindow(windowId, 8, y, &data->playerList->players[id], colorId, id); } static u8 GetNewLeaderCandidate(void) @@ -1377,48 +1403,48 @@ static u8 GetNewLeaderCandidate(void) u8 i; s32 id; - for (i = 0; i < 16; i++) + for (i = 0; i < MAX_RFU_PLAYER_LIST_SIZE; i++) { - if (data->field_0->arr[i].groupScheduledAnim != UNION_ROOM_SPAWN_NONE) + if (data->playerList->players[i].groupScheduledAnim != UNION_ROOM_SPAWN_NONE) { - id = Findx20Inx1CArray(&data->field_0->arr[i], data->field_4->arr); + id = GetNewIncomingPlayerId(&data->playerList->players[i], data->incomingPlayerList->players); if (id != 0xFF) { - if (data->field_0->arr[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN) + if (data->playerList->players[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN) { - if (AreUnionRoomPlayerGnamesDifferent(&data->field_0->arr[i].gname_uname, &data->field_4->arr[id].gname_uname)) + if (ArePlayerDataDifferent(&data->playerList->players[i].rfu, &data->incomingPlayerList->players[id].rfu)) { - data->field_0->arr[i].gname_uname = data->field_4->arr[id].gname_uname; - data->field_0->arr[i].field_1B = 64; + data->playerList->players[i].rfu = data->incomingPlayerList->players[id].rfu; + data->playerList->players[i].field_1B = 64; ret = 1; } else { - if (data->field_0->arr[i].field_1B != 0) + if (data->playerList->players[i].field_1B != 0) { - data->field_0->arr[i].field_1B--; - if (data->field_0->arr[i].field_1B == 0) + data->playerList->players[i].field_1B--; + if (data->playerList->players[i].field_1B == 0) ret = 2; } } } else { - data->field_0->arr[i].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - data->field_0->arr[i].field_1B = 64; + data->playerList->players[i].groupScheduledAnim = UNION_ROOM_SPAWN_IN; + data->playerList->players[i].field_1B = 64; ret = 1; } - data->field_0->arr[i].timeoutCounter = 0; + data->playerList->players[i].timeoutCounter = 0; } else { - if (data->field_0->arr[i].groupScheduledAnim != UNION_ROOM_SPAWN_OUT) + if (data->playerList->players[i].groupScheduledAnim != UNION_ROOM_SPAWN_OUT) { - data->field_0->arr[i].timeoutCounter++; - if (data->field_0->arr[i].timeoutCounter >= 300) + data->playerList->players[i].timeoutCounter++; + if (data->playerList->players[i].timeoutCounter >= 300) { - data->field_0->arr[i].groupScheduledAnim = UNION_ROOM_SPAWN_OUT; + data->playerList->players[i].groupScheduledAnim = UNION_ROOM_SPAWN_OUT; ret = 2; } } @@ -1428,7 +1454,7 @@ static u8 GetNewLeaderCandidate(void) for (id = 0; id < RFU_CHILD_MAX; id++) { - if (Appendx1Ctox20(data->field_0->arr, &data->field_4->arr[id], 16) != 0xFF) + if (TryAddIncomingPlayerToList(data->playerList->players, &data->incomingPlayerList->players[id], MAX_RFU_PLAYER_LIST_SIZE) != 0xFF) ret = 1; } @@ -1687,7 +1713,7 @@ static void Task_StartActivity(u8 taskId) else { LinkRfu_StopManagerBeforeEnteringChat(); - SetHostRFUtgtGname(69, 0, 1); + SetHostRfuGameData(ACTIVITY_CHAT | IN_UNION_ROOM, 0, TRUE); } EnterUnionRoomChat(); break; @@ -1856,29 +1882,29 @@ static void Task_MEvent_Leader(u8 taskId) case 0: gPlayerCurrActivity = data->activity; sPlayerActivityGroupSize = 2; - SetHostRFUtgtGname(data->activity, 0, 0); - SetGnameBufferWonderFlags(FALSE, FALSE); + SetHostRfuGameData(data->activity, 0, FALSE); + SetHostRfuWonderFlags(FALSE, FALSE); SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_LinkLeader(2); data->state = 1; break; case 1: - data->field_4 = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); - data->field_0 = AllocZeroed(5 * sizeof(struct UnkStruct_x20)); - data->field_8 = AllocZeroed(5 * sizeof(struct UnkStruct_x20)); - ClearUnkStruct_x1CArray(data->field_4, 4); - ClearUnkStruct_x20Array(data->field_0->arr, 5); - LinkRfu3_SetGnameUnameFromStaticBuffers(&data->field_0->arr[0].gname_uname.gname, data->field_0->arr[0].gname_uname.playerName); - data->field_0->arr[0].timeoutCounter = 0; - data->field_0->arr[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - data->field_0->arr[0].useRedText = FALSE; - data->field_0->arr[0].field_1B = 0; - data->listenTaskId = CreateTask_ListenForPartnersWithCompatibleSerialNos(data->field_4, 0xFF); + data->incomingPlayerList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + data->playerList = AllocZeroed(MAX_RFU_PLAYERS * sizeof(struct RfuPlayer)); + data->playerListBackup = AllocZeroed(MAX_RFU_PLAYERS * sizeof(struct RfuPlayer)); + ClearIncomingPlayerList(data->incomingPlayerList, RFU_CHILD_MAX); + ClearRfuPlayerList(data->playerList->players, MAX_RFU_PLAYERS); + CopyHostRfuGameDataAndUsername(&data->playerList->players[0].rfu.data, data->playerList->players[0].rfu.name); + data->playerList->players[0].timeoutCounter = 0; + data->playerList->players[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; + data->playerList->players[0].useRedText = FALSE; + data->playerList->players[0].field_1B = 0; + data->listenTaskId = CreateTask_ListenForCompatiblePartners(data->incomingPlayerList, 0xFF); winTemplate = sWindowTemplate_PlayerList; winTemplate.baseBlock = GetMysteryGiftBaseBlock(); - winTemplate.paletteNum = 0xC; + winTemplate.paletteNum = 12; data->listWindowId = AddWindow(&winTemplate); MG_DrawTextBorder(data->listWindowId); gMultiuseListMenuTemplate = sListMenuTemplate_PossibleGroupMembers; @@ -1891,7 +1917,7 @@ static void Task_MEvent_Leader(u8 taskId) break; case 2: StringCopy(gStringVar1, sLinkGroupActivityNameTexts[gPlayerCurrActivity]); - StringExpandPlaceholders_AwaitingCommFromAnother(gStringVar4, gPlayerCurrActivity); + GetAwaitingCommunicationText(gStringVar4, gPlayerCurrActivity); data->state = 3; break; case 3: @@ -1909,7 +1935,7 @@ static void Task_MEvent_Leader(u8 taskId) case 6: if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_LinkWithFriendDropped)) { - data->playerCount = sub_8013398(data->field_0); + data->playerCount = LeaderPrunePlayerList(data->playerList); RedrawListMenu(data->listTaskId); data->state = 2; } @@ -1918,44 +1944,44 @@ static void Task_MEvent_Leader(u8 taskId) data->state = 7; break; case 7: - switch (mevent_message_print_and_prompt_yes_no(&data->textState, &data->field_14, 0, gStringVar4)) + switch (mevent_message_print_and_prompt_yes_no(&data->textState, &data->yesNoWindowId, 0, gStringVar4)) { case 0: LoadWirelessStatusIndicatorSpriteGfx(); CreateWirelessStatusIndicatorSprite(0, 0); - data->field_0->arr[data->playerCount].field_1B = 0; + data->playerList->players[data->playerCount].field_1B = 0; RedrawListMenu(data->listTaskId); data->joinRequestAnswer = RFU_STATUS_JOIN_GROUP_OK; - SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId), data->field_0->arr[data->playerCount].gname_uname.playerName); + SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId), data->playerList->players[data->playerCount].rfu.name); data->state = 8; break; case 1: - case -1: + case MENU_B_PRESSED: data->joinRequestAnswer = RFU_STATUS_JOIN_GROUP_NO; - SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId), data->field_0->arr[data->playerCount].gname_uname.playerName); + SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId), data->playerList->players[data->playerCount].rfu.name); data->state = 8; break; } break; case 8: - val = WaitSendRfuStatusToPartner(ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId), data->field_0->arr[data->playerCount].gname_uname.playerName); + val = WaitSendRfuStatusToPartner(ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId), data->playerList->players[data->playerCount].rfu.name); if (val == 1) // Send complete { if (data->joinRequestAnswer == RFU_STATUS_JOIN_GROUP_OK) { - data->field_0->arr[data->playerCount].field_1B = 0; + data->playerList->players[data->playerCount].field_1B = 0; RedrawListMenu(data->listTaskId); data->playerCount++; - IntlConvPartnerUname7(gStringVar1, &data->field_0->arr[data->playerCount - 1]); + CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->playerCount - 1]); StringExpandPlaceholders(gStringVar4, sText_AnOKWasSentToPlayer); data->state = 9; LinkRfu_StopManagerAndFinalizeSlots(); } else { - RequestDisconnectSlotByTrainerNameAndId(data->field_0->arr[data->playerCount].gname_uname.playerName, ReadAsU16(data->field_0->arr[data->playerCount].gname_uname.gname.unk_00.playerTrainerId)); - data->field_0->arr[data->playerCount].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; - sub_8013398(data->field_0); + RequestDisconnectSlotByTrainerNameAndId(data->playerList->players[data->playerCount].rfu.name, ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId)); + data->playerList->players[data->playerCount].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; + LeaderPrunePlayerList(data->playerList); RedrawListMenu(data->listTaskId); data->state = 2; } @@ -1998,9 +2024,9 @@ static void Task_MEvent_Leader(u8 taskId) CopyBgTilemapBufferToVram(0); RemoveWindow(data->listWindowId); DestroyTask(data->listenTaskId); - Free(data->field_8); - Free(data->field_0); - Free(data->field_4); + Free(data->playerListBackup); + Free(data->playerList); + Free(data->incomingPlayerList); data->state++; break; case 14: @@ -2026,9 +2052,9 @@ static void Task_MEvent_Leader(u8 taskId) CopyBgTilemapBufferToVram(0); RemoveWindow(data->listWindowId); DestroyTask(data->listenTaskId); - Free(data->field_8); - Free(data->field_0); - Free(data->field_4); + Free(data->playerListBackup); + Free(data->playerList); + Free(data->incomingPlayerList); SetLinkStandbyCallback(); data->state++; break; @@ -2050,25 +2076,25 @@ void MEvent_CreateTask_CardOrNewsWithFriend(u32 activity) data->state = 0; data->textState = 0; - data->isWonderNews = activity - ACTIVITY_WONDER_CARD2; + data->isWonderNews = activity - ACTIVITY_WONDER_CARD; gSpecialVar_Result = LINKUP_ONGOING; } static void Task_CardOrNewsWithFriend(u8 taskId) { s32 id; - struct WindowTemplate winTemplate1, winTemplate2; + struct WindowTemplate listWinTemplate, playerNameWinTemplate; struct WirelessLink_Group *data = sWirelessLinkMain.group; switch (data->state) { case 0: - SetHostRFUtgtGname(data->isWonderNews + ACTIVITY_WONDER_CARD2, 0, 0); + SetHostRfuGameData(data->isWonderNews + ACTIVITY_WONDER_CARD, 0, FALSE); SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_JoinGroup(); - data->field_4 = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); - data->field_0 = AllocZeroed(16 * sizeof(struct UnkStruct_x20)); + data->incomingPlayerList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + data->playerList = AllocZeroed(MAX_RFU_PLAYER_LIST_SIZE * sizeof(struct RfuPlayer)); data->state = 1; break; case 1: @@ -2076,18 +2102,18 @@ static void Task_CardOrNewsWithFriend(u8 taskId) data->state = 2; break; case 2: - ClearUnkStruct_x1CArray(data->field_4, 4); - ClearUnkStruct_x20Array(data->field_0->arr, 16); - data->listenTaskId = CreateTask_ListenForPartnersWithCompatibleSerialNos(data->field_4, data->isWonderNews + LINK_GROUP_WONDER_CARD); + ClearIncomingPlayerList(data->incomingPlayerList, RFU_CHILD_MAX); + ClearRfuPlayerList(data->playerList->players, MAX_RFU_PLAYER_LIST_SIZE); + data->listenTaskId = CreateTask_ListenForCompatiblePartners(data->incomingPlayerList, data->isWonderNews + LINK_GROUP_WONDER_CARD); - winTemplate1 = gUnknown_082F0174; - winTemplate1.baseBlock = GetMysteryGiftBaseBlock(); - winTemplate1.paletteNum = 0xC; - data->listWindowId = AddWindow(&winTemplate1); + listWinTemplate = sWindowTemplate_GroupList; + listWinTemplate.baseBlock = GetMysteryGiftBaseBlock(); + listWinTemplate.paletteNum = 12; + data->listWindowId = AddWindow(&listWinTemplate); - winTemplate2 = gUnknown_082F017C; - winTemplate2.paletteNum = 0xC; - data->playerNameAndIdWindowId = AddWindow(&winTemplate2); + playerNameWinTemplate = sWindowTemplate_PlayerNameAndId; + playerNameWinTemplate.paletteNum = 12; + data->playerNameAndIdWindowId = AddWindow(&playerNameWinTemplate); MG_DrawTextBorder(data->listWindowId); gMultiuseListMenuTemplate = sListMenuTemplate_UnionRoomGroups; @@ -2119,16 +2145,16 @@ static void Task_CardOrNewsWithFriend(u8 taskId) { // this unused variable along with the assignment is needed to match u32 unusedVar; - unusedVar = data->field_0->arr[id].gname_uname.gname.activity; + unusedVar = data->playerList->players[id].rfu.data.activity; - if (data->field_0->arr[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->field_0->arr[id].gname_uname.gname.started) + if (data->playerList->players[id].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->playerList->players[id].rfu.data.startedActivity) { data->leaderId = id; LoadWirelessStatusIndicatorSpriteGfx(); CreateWirelessStatusIndicatorSprite(0, 0); RedrawListMenu(data->listTaskId); - IntlConvPartnerUname7(gStringVar1, &data->field_0->arr[data->leaderId]); - CreateTask_RfuReconnectWithParent(data->field_0->arr[data->leaderId].gname_uname.playerName, ReadAsU16(data->field_0->arr[data->leaderId].gname_uname.gname.unk_00.playerTrainerId)); + CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); + CreateTask_RfuReconnectWithParent(data->playerList->players[data->leaderId].rfu.name, ReadAsU16(data->playerList->players[data->leaderId].rfu.data.compatibility.playerTrainerId)); PlaySE(SE_POKENAV_ON); data->state = 4; } @@ -2146,13 +2172,13 @@ static void Task_CardOrNewsWithFriend(u8 taskId) break; case 4: AddTextPrinterToWindow1(sText_AwaitingPlayersResponse); - IntlConvPartnerUname7(gStringVar1, &data->field_0->arr[data->leaderId]); + CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); data->state = 5; break; case 5: if (gReceivedRemoteLinkPlayers) { - gPlayerCurrActivity = data->field_0->arr[data->leaderId].gname_uname.gname.activity; + gPlayerCurrActivity = data->playerList->players[data->leaderId].rfu.data.activity; data->state = 10; } @@ -2177,8 +2203,8 @@ static void Task_CardOrNewsWithFriend(u8 taskId) RemoveWindow(data->playerNameAndIdWindowId); RemoveWindow(data->listWindowId); DestroyTask(data->listenTaskId); - Free(data->field_0); - Free(data->field_4); + Free(data->playerList); + Free(data->incomingPlayerList); data->state++; break; case 9: @@ -2219,7 +2245,7 @@ void MEvent_CreateTask_CardOrNewsOverWireless(u32 activity) data->state = 0; data->textState = 0; - data->isWonderNews = activity - ACTIVITY_WONDER_CARD2; + data->isWonderNews = activity - ACTIVITY_WONDER_CARD; gSpecialVar_Result = LINKUP_ONGOING; } @@ -2232,12 +2258,12 @@ static void Task_CardOrNewsOverWireless(u8 taskId) switch (data->state) { case 0: - SetHostRFUtgtGname(0, 0, 0); + SetHostRfuGameData(ACTIVITY_NONE, 0, FALSE); SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_JoinGroup(); - data->field_4 = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); - data->field_0 = AllocZeroed(16 * sizeof(struct UnkStruct_x20)); + data->incomingPlayerList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + data->playerList = AllocZeroed(MAX_RFU_PLAYER_LIST_SIZE * sizeof(struct RfuPlayer)); data->state = 1; break; case 1: @@ -2245,13 +2271,13 @@ static void Task_CardOrNewsOverWireless(u8 taskId) data->state = 2; break; case 2: - ClearUnkStruct_x1CArray(data->field_4, 4); - ClearUnkStruct_x20Array(data->field_0->arr, 16); - data->listenTaskId = CreateTask_ListenForPartnersWithSerial7F7D(data->field_4, data->isWonderNews + LINK_GROUP_WONDER_CARD); + ClearIncomingPlayerList(data->incomingPlayerList, RFU_CHILD_MAX); + ClearRfuPlayerList(data->playerList->players, MAX_RFU_PLAYER_LIST_SIZE); + data->listenTaskId = CreateTask_ListenForWonderDistributor(data->incomingPlayerList, data->isWonderNews + LINK_GROUP_WONDER_CARD); - if (data->field_13 != 0) + if (data->showListMenu) { - winTemplate = gUnknown_082F0174; + winTemplate = sWindowTemplate_GroupList; winTemplate.baseBlock = GetMysteryGiftBaseBlock(); data->listWindowId = AddWindow(&winTemplate); @@ -2273,23 +2299,23 @@ static void Task_CardOrNewsOverWireless(u8 taskId) case 1: PlaySE(SE_PC_LOGIN); default: - if (data->field_13 != 0) + if (data->showListMenu) RedrawListMenu(data->listTaskId); break; case 0: - if (data->field_13 != 0) + if (data->showListMenu) id = ListMenu_ProcessInput(data->listTaskId); if (data->refreshTimer > 120) { - if (data->field_0->arr[0].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->field_0->arr[0].gname_uname.gname.started) + if (data->playerList->players[0].groupScheduledAnim == UNION_ROOM_SPAWN_IN && !data->playerList->players[0].rfu.data.startedActivity) { - if (HasWonderCardOrNewsByLinkGroup(&data->field_0->arr[0].gname_uname.gname, data->isWonderNews + LINK_GROUP_WONDER_CARD)) + if (HasWonderCardOrNewsByLinkGroup(&data->playerList->players[0].rfu.data, data->isWonderNews + LINK_GROUP_WONDER_CARD)) { data->leaderId = 0; data->refreshTimer = 0; LoadWirelessStatusIndicatorSpriteGfx(); CreateWirelessStatusIndicatorSprite(0, 0); - CreateTask_RfuReconnectWithParent(data->field_0->arr[0].gname_uname.playerName, ReadAsU16(data->field_0->arr[0].gname_uname.gname.unk_00.playerTrainerId)); + CreateTask_RfuReconnectWithParent(data->playerList->players[0].rfu.name, ReadAsU16(data->playerList->players[0].rfu.data.compatibility.playerTrainerId)); PlaySE(SE_POKENAV_ON); data->state = 4; } @@ -2311,13 +2337,13 @@ static void Task_CardOrNewsOverWireless(u8 taskId) break; case 4: AddTextPrinterToWindow1(sText_AwaitingResponseFromWirelessSystem); - IntlConvPartnerUname7(gStringVar1, &data->field_0->arr[data->leaderId]); + CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->leaderId]); data->state = 5; break; case 5: if (gReceivedRemoteLinkPlayers) { - gPlayerCurrActivity = data->field_0->arr[data->leaderId].gname_uname.gname.activity; + gPlayerCurrActivity = data->playerList->players[data->leaderId].rfu.data.activity; data->state = 12; } @@ -2338,15 +2364,15 @@ static void Task_CardOrNewsOverWireless(u8 taskId) case 8: case 10: case 12: - if (data->field_13 != 0) + if (data->showListMenu) { DestroyListMenuTask(data->listTaskId, 0, 0); CopyBgTilemapBufferToVram(0); RemoveWindow(data->listWindowId); } DestroyTask(data->listenTaskId); - Free(data->field_0); - Free(data->field_4); + Free(data->playerList); + Free(data->incomingPlayerList); data->state++; break; case 9: @@ -2391,7 +2417,7 @@ void RunUnionRoom(void) { struct WirelessLink_URoom *uroom; - ClearAndInitHostRFUtgtGname(); + ResetHostRfuGameData(); CreateTask(Task_RunUnionRoom, 10); // dumb line needed to match @@ -2434,14 +2460,18 @@ static void ScheduleFieldMessageAndExit(const u8 *src) StringExpandPlaceholders(gStringVar4, src); } -static void sub_80156B0(struct WirelessLink_URoom *uroom) +static void CopyPlayerListToBuffer(struct WirelessLink_URoom *uroom) { - memcpy(&gDecompressionBuffer[0x3F00], uroom->field_0, 0x100); + memcpy(&gDecompressionBuffer[sizeof(gDecompressionBuffer) - (MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer))], + uroom->playerList, + MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer)); } -static void sub_80156C8(struct WirelessLink_URoom *uroom) +static void CopyPlayerListFromBuffer(struct WirelessLink_URoom *uroom) { - memcpy(uroom->field_0, &gDecompressionBuffer[0x3F00], 0x100); + memcpy(uroom->playerList, + &gDecompressionBuffer[sizeof(gDecompressionBuffer) - (MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer))], + MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer)); } static void Task_RunUnionRoom(u8 taskId) @@ -2455,31 +2485,31 @@ static void Task_RunUnionRoom(u8 taskId) switch (uroom->state) { case UR_STATE_INIT: - uroom->field_4 = AllocZeroed(RFU_CHILD_MAX * sizeof(struct UnkStruct_x1C)); - uroom->field_C = AllocZeroed(RFU_CHILD_MAX * sizeof(struct UnkStruct_x1C)); - uroom->field_0 = AllocZeroed(8 * sizeof(struct UnkStruct_x20)); - uroom->field_8 = AllocZeroed(sizeof(struct UnkStruct_x20)); - ClearUnkStruct_x20Array(uroom->field_0->arr, ARRAY_COUNT(uroom->field_0->arr)); + uroom->incomingChildList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + uroom->incomingParentList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + uroom->playerList = AllocZeroed(MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer)); + uroom->spawnPlayer = AllocZeroed(sizeof(struct RfuPlayer)); + ClearRfuPlayerList(uroom->playerList->players, MAX_UNION_ROOM_LEADERS); gPlayerCurrActivity = IN_UNION_ROOM; - uroom->searchTaskId = CreateTask_SearchForChildOrParent(uroom->field_C, uroom->field_4, LINK_GROUP_UNION_ROOM_RESUME); + uroom->searchTaskId = CreateTask_SearchForChildOrParent(uroom->incomingParentList, uroom->incomingChildList, LINK_GROUP_UNION_ROOM_RESUME); InitUnionRoomPlayerObjects(uroom->objects); SetTilesAroundUnionRoomPlayersPassable(); uroom->state = UR_STATE_INIT_OBJECTS; break; case UR_STATE_INIT_OBJECTS: - CreateGroupMemberSpritesInvisible(uroom->spriteIds, taskData[0]); + CreateUnionRoomPlayerSprites(uroom->spriteIds, taskData[0]); if (++taskData[0] == 8) uroom->state = UR_STATE_INIT_LINK; break; case UR_STATE_INIT_LINK: - SetHostRFUtgtGname(IN_UNION_ROOM, 0, 0); + SetHostRfuGameData(IN_UNION_ROOM, 0, FALSE); SetTradeBoardRegisteredMonInfo(sUnionRoomTrade.type, sUnionRoomTrade.playerSpecies, sUnionRoomTrade.playerLevel); SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_EnterUnionRoom(); - ClearUnkStruct_x20Array(&uroom->field_8->arr[0], 1); - ClearUnkStruct_x1CArray(uroom->field_4, 4); - ClearUnkStruct_x1CArray(uroom->field_C, 4); + ClearRfuPlayerList(&uroom->spawnPlayer->players[0], 1); + ClearIncomingPlayerList(uroom->incomingChildList, RFU_CHILD_MAX); + ClearIncomingPlayerList(uroom->incomingParentList, RFU_CHILD_MAX); gSpecialVar_Result = 0; uroom->state = UR_STATE_CHECK_SELECTING_MON; break; @@ -2509,7 +2539,7 @@ static void Task_RunUnionRoom(u8 taskId) } break; case URTRADE_STATE_OFFERING: - sub_80156C8(uroom); + CopyPlayerListFromBuffer(uroom); taskData[1] = sUnionRoomTrade.offerPlayerId; if (id >= PARTY_SIZE) { @@ -2560,10 +2590,10 @@ static void Task_RunUnionRoom(u8 taskId) { if (JOY_NEW(A_BUTTON)) { - if (TryInteractWithUnionRoomMember(uroom->field_0, &taskData[0], &taskData[1], uroom->spriteIds)) + if (TryInteractWithUnionRoomMember(uroom->playerList, &taskData[0], &taskData[1], uroom->spriteIds)) { PlaySE(SE_SELECT); - UR_EnableScriptContext2AndFreezeObjectEvents(); + StartScriptInteraction(); uroom->state = UR_STATE_INTERACT_WITH_PLAYER; break; } @@ -2571,7 +2601,7 @@ static void Task_RunUnionRoom(u8 taskId) { UpdateGameData_SetActivity(ACTIVITY_PLYRTALK | IN_UNION_ROOM, 0, TRUE); PlaySE(SE_PC_LOGIN); - UR_EnableScriptContext2AndFreezeObjectEvents(); + StartScriptInteraction(); StringCopy(gStringVar1, gSaveBlock2Ptr->playerName); uroom->state = UR_STATE_CHECK_TRADING_BOARD; break; @@ -2580,16 +2610,16 @@ static void Task_RunUnionRoom(u8 taskId) switch (HandlePlayerListUpdate()) { - case 1: + case PLIST_1: PlaySE(SE_PC_LOGIN); - case 2: + case PLIST_2: ScheduleUnionRoomPlayerRefresh(uroom); break; - case 4: + case PLIST_4: uroom->state = UR_STATE_PLAYER_CONTACTED_YOU; - UR_EnableScriptContext2AndFreezeObjectEvents(); + StartScriptInteraction(); SetTradeBoardRegisteredMonInfo(TYPE_NORMAL, SPECIES_NONE, 0); - UpdateGameData_SetActivity(ACTIVITY_NPCTALK | IN_UNION_ROOM, GetActivePartnerSpriteGenderParam(uroom), FALSE); + UpdateGameData_SetActivity(ACTIVITY_NPCTALK | IN_UNION_ROOM, GetActivePartnersInfo(uroom), FALSE); break; } HandleUnionRoomPlayerRefresh(uroom); @@ -2603,16 +2633,16 @@ static void Task_RunUnionRoom(u8 taskId) } break; case UR_STATE_INTERACT_WITH_PLAYER: - UR_RunTextPrinters_CheckPrinter0Active(); - playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->field_0); + UR_RunTextPrinters(); + playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList); UpdateGameData_SetActivity(ACTIVITY_PLYRTALK | IN_UNION_ROOM, 0, TRUE); - switch (UnionRoomGetPlayerInteractionResponse(uroom->field_0, taskData[0], taskData[1], playerGender)) + switch (UnionRoomGetPlayerInteractionResponse(uroom->playerList, taskData[0], taskData[1], playerGender)) { case 0: // Player is or was just doing an activity uroom->state = UR_STATE_PRINT_AND_EXIT; break; case 1: // Link communicating - sub_8012188(uroom->field_0->arr[taskData[1]].gname_uname.playerName, &uroom->field_0->arr[taskData[1]].gname_uname.gname, gPlayerCurrActivity); + TryConnectToUnionRoomParent(uroom->playerList->players[taskData[1]].rfu.name, &uroom->playerList->players[taskData[1]].rfu.data, gPlayerCurrActivity); uroom->field_12 = id; // Should be just 0, but won't match any other way. uroom->state = UR_STATE_TRY_COMMUNICATING; break; @@ -2622,7 +2652,7 @@ static void Task_RunUnionRoom(u8 taskId) } break; case UR_STATE_TRY_COMMUNICATING: - UR_RunTextPrinters_CheckPrinter0Active(); + UR_RunTextPrinters(); switch (RfuGetStatus()) { case RFU_STATUS_NEW_CHILD_DETECTED: @@ -2660,13 +2690,13 @@ static void Task_RunUnionRoom(u8 taskId) if (!gReceivedRemoteLinkPlayers) { HandleCancelActivity(FALSE); - UpdateUnionRoomMemberFacing(taskData[0], taskData[1], uroom->field_0); + UpdateUnionRoomMemberFacing(taskData[0], taskData[1], uroom->playerList); uroom->state = UR_STATE_INIT_LINK; } break; case UR_STATE_DO_SOMETHING_PROMPT: - id = ConvPartnerUnameAndGetWhetherMetAlready(&uroom->field_0->arr[taskData[1]]); - playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->field_0); + id = ConvPartnerUnameAndGetWhetherMetAlready(&uroom->playerList->players[taskData[1]]); + playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList); ScheduleFieldMessageWithFollowupState(UR_STATE_HANDLE_DO_SOMETHING_PROMPT_INPUT, sHiDoSomethingTexts[id][playerGender]); break; case UR_STATE_HANDLE_DO_SOMETHING_PROMPT_INPUT: @@ -2684,7 +2714,7 @@ static void Task_RunUnionRoom(u8 taskId) else { uroom->partnerYesNoResponse = 0; - playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->field_0); + playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList); if (input == -2 || input == IN_UNION_ROOM) { uroom->playerSendBuffer[0] = IN_UNION_ROOM; @@ -2695,7 +2725,7 @@ static void Task_RunUnionRoom(u8 taskId) else { gPlayerCurrActivity = input; - sPlayerActivityGroupSize = (u32)(input) >> 8; + sPlayerActivityGroupSize = (u32)input >> 8; // Extract capacity from sInviteToActivityMenuItems if (gPlayerCurrActivity == (ACTIVITY_BATTLE_SINGLE | IN_UNION_ROOM) && !HasAtLeastTwoMonsOfLevel30OrLower()) { ScheduleFieldMessageWithFollowupState(UR_STATE_DO_SOMETHING_PROMPT, sText_NeedTwoMonsOfLevel30OrLower1); @@ -2716,7 +2746,7 @@ static void Task_RunUnionRoom(u8 taskId) break; case UR_STATE_SEND_ACTIVITY_REQUEST: PollPartnerYesNoResponse(uroom); - playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->field_0); + playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList); id = GetResponseIdx_InviteToURoomActivity(uroom->playerSendBuffer[0] & 0x3F); if (PrintOnTextbox(&uroom->textState, sText_WaitOrShowCardTexts[playerGender][id])) { @@ -2766,8 +2796,8 @@ static void Task_RunUnionRoom(u8 taskId) break; case UR_STATE_DO_SOMETHING_PROMPT_2: // Identical to UR_STATE_DO_SOMETHING_PROMPT - id = ConvPartnerUnameAndGetWhetherMetAlready(&uroom->field_0->arr[taskData[1]]); - playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->field_0); + id = ConvPartnerUnameAndGetWhetherMetAlready(&uroom->playerList->players[taskData[1]]); + playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList); ScheduleFieldMessageWithFollowupState(UR_STATE_HANDLE_DO_SOMETHING_PROMPT_INPUT, sHiDoSomethingTexts[id][playerGender]); break; case UR_STATE_PRINT_CARD_INFO: @@ -2802,14 +2832,14 @@ static void Task_RunUnionRoom(u8 taskId) CopyBgTilemapBufferToVram(0); gPlayerCurrActivity = ACTIVITY_CHAT | IN_UNION_ROOM; UpdateGameData_SetActivity(ACTIVITY_CHAT | IN_UNION_ROOM, 0, TRUE); - sub_8012188(uroom->field_0->arr[taskData[1]].gname_uname.playerName, &uroom->field_0->arr[taskData[1]].gname_uname.gname, gPlayerCurrActivity); + TryConnectToUnionRoomParent(uroom->playerList->players[taskData[1]].rfu.name, &uroom->playerList->players[taskData[1]].rfu.data, gPlayerCurrActivity); uroom->field_12 = taskData[1]; uroom->state = UR_STATE_TRY_ACCEPT_CHAT_REQUEST_DELAY; taskData[3] = 0; break; case 1: // NO - case -1: - playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->field_0); + case MENU_B_PRESSED: + playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList); ScheduleFieldMessageAndExit(sDeclineChatTexts[playerGender]); break; } @@ -2830,7 +2860,7 @@ static void Task_RunUnionRoom(u8 taskId) break; case RFU_STATUS_FATAL_ERROR: case RFU_STATUS_CONNECTION_ERROR: - playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->field_0); + playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList); UpdateGameData_SetActivity(ACTIVITY_PLYRTALK | IN_UNION_ROOM, 0, TRUE); if (IsUnionRoomListenTaskActive() == TRUE) ScheduleFieldMessageAndExit(sChatDeclinedTexts[playerGender]); @@ -2846,7 +2876,7 @@ static void Task_RunUnionRoom(u8 taskId) case UR_STATE_ACCEPT_CHAT_REQUEST: if (RfuHasErrored()) { - playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->field_0); + playerGender = GetUnionRoomPlayerGender(taskData[1], uroom->playerList); UpdateGameData_SetActivity(ACTIVITY_PLYRTALK | IN_UNION_ROOM, 0, TRUE); if (IsUnionRoomListenTaskActive() == TRUE) ScheduleFieldMessageAndExit(sChatDeclinedTexts[playerGender]); @@ -2892,7 +2922,7 @@ static void Task_RunUnionRoom(u8 taskId) break; case UR_STATE_HANDLE_CONTACT_DATA: ReceiveUnionRoomActivityPacket(uroom); - if (UnionRoom_HandleContactFromOtherPlayer(uroom) && JOY_NEW(B_BUTTON)) + if (HandleContactFromOtherPlayer(uroom) && JOY_NEW(B_BUTTON)) { Rfu_DisconnectPlayerById(1); StringCopy(gStringVar4, sText_ChatEnded); @@ -2912,7 +2942,7 @@ static void Task_RunUnionRoom(u8 taskId) else UpdateGameData_SetActivity(gPlayerCurrActivity | IN_UNION_ROOM, GetLinkPlayerInfoFlags(1), TRUE); - uroom->field_8->arr[0].field_1B = 0; + uroom->spawnPlayer->players[0].field_1B = 0; taskData[3] = 0; if (gPlayerCurrActivity == (ACTIVITY_BATTLE_SINGLE | IN_UNION_ROOM)) { @@ -2942,7 +2972,7 @@ static void Task_RunUnionRoom(u8 taskId) } break; case 1: // DECLINE - case -1: + case MENU_B_PRESSED: uroom->playerSendBuffer[0] = ACTIVITY_DECLINE | IN_UNION_ROOM; Rfu_SendPacket(uroom->playerSendBuffer); uroom->state = UR_STATE_DECLINE_ACTIVITY_REQUEST; @@ -2981,16 +3011,16 @@ static void Task_RunUnionRoom(u8 taskId) uroom->state = UR_STATE_START_ACTIVITY_FREE_UROOM; break; case UR_STATE_START_ACTIVITY_FREE_UROOM: - Free(uroom->field_8); - Free(uroom->field_0); - Free(uroom->field_C); - Free(uroom->field_4); + Free(uroom->spawnPlayer); + Free(uroom->playerList); + Free(uroom->incomingParentList); + Free(uroom->incomingChildList); DestroyTask(uroom->searchTaskId); - DestroyGroupMemberSprites(uroom->spriteIds); + DestroyUnionRoomPlayerSprites(uroom->spriteIds); uroom->state = UR_STATE_START_ACTIVITY_FADE; break; case UR_STATE_START_ACTIVITY_FADE: - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); uroom->state = UR_STATE_START_ACTIVITY; break; case UR_STATE_START_ACTIVITY: @@ -3003,20 +3033,20 @@ static void Task_RunUnionRoom(u8 taskId) } break; case UR_STATE_INTERACT_WITH_ATTENDANT: - if (GetHostRFUtgtGname()->species == SPECIES_NONE) + if (GetHostRfuGameData()->tradeSpecies == SPECIES_NONE) { uroom->state = UR_STATE_REGISTER_PROMPT; } else { - if (GetHostRFUtgtGname()->species == SPECIES_EGG) + if (GetHostRfuGameData()->tradeSpecies == SPECIES_EGG) { StringCopy(gStringVar4, sText_CancelRegistrationOfEgg); } else { - StringCopy(gStringVar1, gSpeciesNames[GetHostRFUtgtGname()->species]); - ConvertIntToDecimalStringN(gStringVar2, GetHostRFUtgtGname()->level, STR_CONV_MODE_LEFT_ALIGN, 3); + StringCopy(gStringVar1, gSpeciesNames[GetHostRfuGameData()->tradeSpecies]); + ConvertIntToDecimalStringN(gStringVar2, GetHostRfuGameData()->tradeLevel, STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, sText_CancelRegistrationOfMon); } ScheduleFieldMessageWithFollowupState(UR_STATE_CANCEL_REGISTRATION_PROMPT, gStringVar4); @@ -3028,8 +3058,8 @@ static void Task_RunUnionRoom(u8 taskId) break; case UR_STATE_REGISTER_PROMPT_HANDLE_INPUT: input = ListMenuHandler_AllItemsAvailable(&uroom->textState, - &uroom->tradeBoardSelectWindowId, - &uroom->tradeBoardDetailsWindowId, + &uroom->tradeBoardMainWindowId, + &uroom->tradeBoardHeaderWindowId, &sWindowTemplate_RegisterForTrade, &sListMenuTemplate_RegisterForTrade); if (input != -1) @@ -3067,9 +3097,9 @@ static void Task_RunUnionRoom(u8 taskId) break; case UR_STATE_REGISTER_REQUEST_TYPE: input = ListMenuHandler_AllItemsAvailable(&uroom->textState, - &uroom->tradeBoardSelectWindowId, - &uroom->tradeBoardDetailsWindowId, - &gUnknown_082F0294, + &uroom->tradeBoardMainWindowId, + &uroom->tradeBoardHeaderWindowId, + &sWindowTemplate_TradingBoardRequestType, &sMenuTemplate_TradingBoardRequestType); if (input != -1) { @@ -3099,7 +3129,7 @@ static void Task_RunUnionRoom(u8 taskId) uroom->state = UR_STATE_CANCEL_REGISTRATION; break; case 1: // NO - case -1: + case MENU_B_PRESSED: HandleCancelActivity(TRUE); uroom->state = UR_STATE_MAIN; break; @@ -3123,7 +3153,13 @@ static void Task_RunUnionRoom(u8 taskId) uroom->state = UR_STATE_TRADING_BOARD_HANDLE_INPUT; break; case UR_STATE_TRADING_BOARD_HANDLE_INPUT: - input = TradeBoardMenuHandler(&uroom->textState, &uroom->tradeBoardSelectWindowId, &uroom->tradeBoardListMenuId, &uroom->tradeBoardDetailsWindowId, &gUnknown_082F034C, &sTradeBoardListMenuTemplate, uroom->field_0); + input = TradeBoardMenuHandler(&uroom->textState, + &uroom->tradeBoardMainWindowId, + &uroom->tradeBoardListMenuId, + &uroom->tradeBoardHeaderWindowId, + &sWindowTemplate_TradingBoardMain, + &sTradeBoardListMenuTemplate, + uroom->playerList); if (input != -1) { switch (input) @@ -3135,21 +3171,21 @@ static void Task_RunUnionRoom(u8 taskId) break; default: UR_ClearBg0(); - switch (IsRequestedTypeOrEggInPlayerParty(uroom->field_0->arr[input].gname_uname.gname.type, uroom->field_0->arr[input].gname_uname.gname.species)) + switch (IsRequestedTypeOrEggInPlayerParty(uroom->playerList->players[input].rfu.data.tradeType, uroom->playerList->players[input].rfu.data.tradeSpecies)) { case UR_TRADE_MATCH: - IntlConvPartnerUname7(gStringVar1, &uroom->field_0->arr[input]); + CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]); ScheduleFieldMessageWithFollowupState(UR_STATE_TRADE_PROMPT, sText_AskTrainerToMakeTrade); taskData[1] = input; break; case UR_TRADE_NOTYPE: - IntlConvPartnerUname7(gStringVar1, &uroom->field_0->arr[input]); - StringCopy(gStringVar2, gTypeNames[uroom->field_0->arr[input].gname_uname.gname.type]); + CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]); + StringCopy(gStringVar2, gTypeNames[uroom->playerList->players[input].rfu.data.tradeType]); ScheduleFieldMessageWithFollowupState(UR_STATE_TRADING_BOARD_LOAD, sText_DontHaveTypeTrainerWants); break; case UR_TRADE_NOEGG: - IntlConvPartnerUname7(gStringVar1, &uroom->field_0->arr[input]); - StringCopy(gStringVar2, gTypeNames[uroom->field_0->arr[input].gname_uname.gname.type]); + CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[input]); + StringCopy(gStringVar2, gTypeNames[uroom->playerList->players[input].rfu.data.tradeType]); ScheduleFieldMessageWithFollowupState(UR_STATE_TRADING_BOARD_LOAD, sText_DontHaveEggTrainerWants); break; } @@ -3163,8 +3199,8 @@ static void Task_RunUnionRoom(u8 taskId) case 0: // YES uroom->state = UR_STATE_TRADE_SELECT_MON; break; - case -1: // NO - case 1: + case MENU_B_PRESSED: + case 1: // NO HandleCancelActivity(TRUE); uroom->state = UR_STATE_MAIN; break; @@ -3174,19 +3210,19 @@ static void Task_RunUnionRoom(u8 taskId) if (PrintOnTextbox(&uroom->textState, sText_WhichMonWillYouOffer)) { sUnionRoomTrade.state = URTRADE_STATE_OFFERING; - memcpy(&gPartnerTgtGnameSub, &uroom->field_0->arr[taskData[1]].gname_uname.gname.unk_00, sizeof(gPartnerTgtGnameSub)); - gUnionRoomRequestedMonType = uroom->field_0->arr[taskData[1]].gname_uname.gname.type; - gUnionRoomOfferedSpecies = uroom->field_0->arr[taskData[1]].gname_uname.gname.species; + memcpy(&gRfuPartnerCompatibilityData, &uroom->playerList->players[taskData[1]].rfu.data.compatibility, sizeof(gRfuPartnerCompatibilityData)); + gUnionRoomRequestedMonType = uroom->playerList->players[taskData[1]].rfu.data.tradeType; + gUnionRoomOfferedSpecies = uroom->playerList->players[taskData[1]].rfu.data.tradeSpecies; gFieldCallback = FieldCB_ContinueScriptUnionRoom; ChooseMonForTradingBoard(PARTY_MENU_TYPE_UNION_ROOM_TRADE, CB2_ReturnToField); - sub_80156B0(uroom); + CopyPlayerListToBuffer(uroom); sUnionRoomTrade.offerPlayerId = taskData[1]; } break; case UR_STATE_TRADE_OFFER_MON: gPlayerCurrActivity = ACTIVITY_TRADE | IN_UNION_ROOM; - sub_8012188(uroom->field_0->arr[taskData[1]].gname_uname.playerName, &uroom->field_0->arr[taskData[1]].gname_uname.gname, gPlayerCurrActivity); - IntlConvPartnerUname7(gStringVar1, &uroom->field_0->arr[taskData[1]]); + TryConnectToUnionRoomParent(uroom->playerList->players[taskData[1]].rfu.name, &uroom->playerList->players[taskData[1]].rfu.data, gPlayerCurrActivity); + CopyAndTranslatePlayerName(gStringVar1, &uroom->playerList->players[taskData[1]]); UR_PrintFieldMessage(sCommunicatingWaitTexts[2]); uroom->state = UR_STATE_TRY_COMMUNICATING; break; @@ -3194,7 +3230,7 @@ static void Task_RunUnionRoom(u8 taskId) if (PrintOnTextbox(&uroom->textState, gStringVar4)) { HandleCancelActivity(TRUE); - UpdateUnionRoomMemberFacing(taskData[0], taskData[1], uroom->field_0); + UpdateUnionRoomMemberFacing(taskData[0], taskData[1], uroom->playerList); uroom->state = UR_STATE_MAIN; } break; @@ -3224,7 +3260,7 @@ static void ReceiveUnionRoomActivityPacket(struct WirelessLink_URoom *data) } } -static bool32 UnionRoom_HandleContactFromOtherPlayer(struct WirelessLink_URoom *uroom) +static bool32 HandleContactFromOtherPlayer(struct WirelessLink_URoom *uroom) { if (uroom->recvActivityRequest[0] != 0) { @@ -3278,7 +3314,7 @@ static void Task_InitUnionRoom(u8 taskId) data->state = 1; break; case 1: - SetHostRFUtgtGname(ACTIVITY_SEARCH, 0, 0); + SetHostRfuGameData(ACTIVITY_SEARCH, 0, FALSE); SetWirelessCommType1(); OpenLink(); InitializeRfuLinkManager_EnterUnionRoom(); @@ -3286,30 +3322,30 @@ static void Task_InitUnionRoom(u8 taskId) data->state = 2; break; case 2: - data->field_4 = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); - ClearUnkStruct_x1CArray(data->field_4, 4); - data->field_C = AllocZeroed(4 * sizeof(struct UnkStruct_x1C)); - ClearUnkStruct_x1CArray(data->field_C, 4); - data->field_0 = AllocZeroed(8 * sizeof(struct UnkStruct_x20)); - ClearUnkStruct_x20Array(data->field_0->arr, 8); - data->field_8 = AllocZeroed(sizeof(struct UnkStruct_x20)); - ClearUnkStruct_x20Array(&data->field_8->arr[0], 1); - data->searchTaskId = CreateTask_SearchForChildOrParent(data->field_C, data->field_4, 10); + data->incomingChildList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + ClearIncomingPlayerList(data->incomingChildList, RFU_CHILD_MAX); + data->incomingParentList = AllocZeroed(RFU_CHILD_MAX * sizeof(struct RfuIncomingPlayer)); + ClearIncomingPlayerList(data->incomingParentList, RFU_CHILD_MAX); + data->playerList = AllocZeroed(MAX_UNION_ROOM_LEADERS * sizeof(struct RfuPlayer)); + ClearRfuPlayerList(data->playerList->players, MAX_UNION_ROOM_LEADERS); + data->spawnPlayer = AllocZeroed(sizeof(struct RfuPlayer)); + ClearRfuPlayerList(&data->spawnPlayer->players[0], 1); + data->searchTaskId = CreateTask_SearchForChildOrParent(data->incomingParentList, data->incomingChildList, LINK_GROUP_UNION_ROOM_INIT); data->state = 3; break; case 3: switch (HandlePlayerListUpdate()) { - case 1: - case 2: + case PLIST_1: + case PLIST_2: if (sUnionRoomPlayerName[0] == EOS) { - for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++) + for (i = 0; i < MAX_UNION_ROOM_LEADERS; i++) { - if (data->field_0->arr[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN) + if (data->playerList->players[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN) { - IntlConvPartnerUname7(text, &data->field_0->arr[i]); - if (PlayerHasMetTrainerBefore(ReadAsU16(data->field_0->arr[i].gname_uname.gname.unk_00.playerTrainerId), text)) + CopyAndTranslatePlayerName(text, &data->playerList->players[i]); + if (PlayerHasMetTrainerBefore(ReadAsU16(data->playerList->players[i].rfu.data.compatibility.playerTrainerId), text)) { StringCopy(sUnionRoomPlayerName, text); break; @@ -3318,15 +3354,15 @@ static void Task_InitUnionRoom(u8 taskId) } } break; - case 3: + case PLIST_3: break; } break; case 4: - free(data->field_8); - free(data->field_0); - free(data->field_C); - free(data->field_4); + free(data->spawnPlayer); + free(data->playerList); + free(data->incomingParentList); + free(data->incomingChildList); DestroyTask(data->searchTaskId); free(sWirelessLinkMain.uRoom); LinkRfu_Shutdown(); @@ -3354,160 +3390,150 @@ static u8 HandlePlayerListUpdate(void) s32 i; u8 j; struct WirelessLink_URoom *data = sWirelessLinkMain.uRoom; - s32 r7 = 0; + s32 retVal = PLIST_0; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (AreGnameUnameDifferent(&data->field_C->arr[i].gname_uname, &sWirelessGnameUnamePair_Dummy) == TRUE) + if (ArePlayersDifferent(&data->incomingParentList->players[i].rfu, &sUnionRoomPlayer_DummyRfu) == TRUE) { - data->field_8->arr[0].gname_uname = data->field_C->arr[i].gname_uname; - data->field_8->arr[0].timeoutCounter = 0; - data->field_8->arr[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - data->field_8->arr[0].field_1B = 1; - return 4; + data->spawnPlayer->players[0].rfu = data->incomingParentList->players[i].rfu; + data->spawnPlayer->players[0].timeoutCounter = 0; + data->spawnPlayer->players[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; + data->spawnPlayer->players[0].field_1B = 1; + return PLIST_4; } } - for (j = 0; j < ARRAY_COUNT(data->field_0->arr); j++) + for (j = 0; j < MAX_UNION_ROOM_LEADERS; j++) { - if (data->field_0->arr[j].groupScheduledAnim != UNION_ROOM_SPAWN_NONE) + if (data->playerList->players[j].groupScheduledAnim != UNION_ROOM_SPAWN_NONE) { - i = Findx20Inx1CArray(&data->field_0->arr[j], &data->field_4->arr[0]); + i = GetNewIncomingPlayerId(&data->playerList->players[j], &data->incomingChildList->players[0]); if (i != 0xFF) { - if (data->field_0->arr[j].groupScheduledAnim == UNION_ROOM_SPAWN_IN) + if (data->playerList->players[j].groupScheduledAnim == UNION_ROOM_SPAWN_IN) { - if (AreUnionRoomPlayerGnamesDifferent(&data->field_0->arr[j].gname_uname, &data->field_4->arr[i].gname_uname)) + if (ArePlayerDataDifferent(&data->playerList->players[j].rfu, &data->incomingChildList->players[i].rfu)) { - data->field_0->arr[j].gname_uname = data->field_4->arr[i].gname_uname; - data->field_0->arr[j].field_1B = 64; - r7 = 1; + data->playerList->players[j].rfu = data->incomingChildList->players[i].rfu; + data->playerList->players[j].field_1B = 64; + retVal = PLIST_1; } - else if (data->field_0->arr[j].field_1B != 0) + else if (data->playerList->players[j].field_1B != 0) { - data->field_0->arr[j].field_1B--; - if (data->field_0->arr[j].field_1B == 0) - r7 = 2; + data->playerList->players[j].field_1B--; + if (data->playerList->players[j].field_1B == 0) + retVal = PLIST_2; } } else { - data->field_0->arr[j].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - data->field_0->arr[j].field_1B = 0; - r7 = 2; + data->playerList->players[j].groupScheduledAnim = UNION_ROOM_SPAWN_IN; + data->playerList->players[j].field_1B = 0; + retVal = PLIST_2; } - data->field_0->arr[j].timeoutCounter = 0; + data->playerList->players[j].timeoutCounter = 0; } - else if (data->field_0->arr[j].groupScheduledAnim != UNION_ROOM_SPAWN_OUT) + else if (data->playerList->players[j].groupScheduledAnim != UNION_ROOM_SPAWN_OUT) { - data->field_0->arr[j].timeoutCounter++; - if (data->field_0->arr[j].timeoutCounter >= 600) + data->playerList->players[j].timeoutCounter++; + if (data->playerList->players[j].timeoutCounter >= 600) { - data->field_0->arr[j].groupScheduledAnim = UNION_ROOM_SPAWN_OUT; - r7 = 2; + data->playerList->players[j].groupScheduledAnim = UNION_ROOM_SPAWN_OUT; + retVal = PLIST_2; } } - else if (data->field_0->arr[j].groupScheduledAnim == UNION_ROOM_SPAWN_OUT) + else if (data->playerList->players[j].groupScheduledAnim == UNION_ROOM_SPAWN_OUT) { - data->field_0->arr[j].timeoutCounter++; - if (data->field_0->arr[j].timeoutCounter >= 900) - { - ClearUnkStruct_x20Array(&data->field_0->arr[j], 1); - } + data->playerList->players[j].timeoutCounter++; + if (data->playerList->players[j].timeoutCounter >= 900) + ClearRfuPlayerList(&data->playerList->players[j], 1); } } } for (i = 0; i < RFU_CHILD_MAX; i++) - { - if (Appendx1Ctox20(&data->field_0->arr[0], &data->field_4->arr[i], MAX_UNION_ROOM_PLAYERS) != 0xFF) - r7 = 1; - } + if (TryAddIncomingPlayerToList(&data->playerList->players[0], &data->incomingChildList->players[i], MAX_UNION_ROOM_LEADERS) != 0xFF) + retVal = PLIST_1; - return r7; + return retVal; } static void Task_SearchForChildOrParent(u8 taskId) { s32 i, j; - struct WirelessGnameUnamePair gname_uname; - struct UnkStruct_Main4 **ptr = (void*) gTasks[taskId].data; + struct RfuPlayerData rfu; + struct RfuIncomingPlayerList **list = (void*) gTasks[taskId].data; bool8 isParent; for (i = 0; i < RFU_CHILD_MAX; i++) { - isParent = LinkRfu_GetNameIfCompatible(&gname_uname.gname, gname_uname.playerName, i); - if (!IsPartnerActivityAcceptable(gname_uname.gname.activity, gTasks[taskId].data[4])) - { - gname_uname = sWirelessGnameUnamePair_Dummy; - } - if (gname_uname.gname.unk_00.language == LANGUAGE_JAPANESE) - { - gname_uname = sWirelessGnameUnamePair_Dummy; - } + isParent = Rfu_GetCompatiblePlayerData(&rfu.data, rfu.name, i); + + if (!IsPartnerActivityAcceptable(rfu.data.activity, gTasks[taskId].data[4])) + rfu = sUnionRoomPlayer_DummyRfu; + if (rfu.data.compatibility.language == LANGUAGE_JAPANESE) + rfu = sUnionRoomPlayer_DummyRfu; + if (!isParent) { for (j = 0; j < i; j++) { - if (!AreGnameUnameDifferent(&ptr[1]->arr[j].gname_uname, &gname_uname)) - { - gname_uname = sWirelessGnameUnamePair_Dummy; - } + if (!ArePlayersDifferent(&list[1]->players[j].rfu, &rfu)) + rfu = sUnionRoomPlayer_DummyRfu; } - ptr[1]->arr[i].gname_uname = gname_uname; - ptr[1]->arr[i].active = AreGnameUnameDifferent(&ptr[1]->arr[i].gname_uname, &sWirelessGnameUnamePair_Dummy); + list[1]->players[i].rfu = rfu; + list[1]->players[i].active = ArePlayersDifferent(&list[1]->players[i].rfu, &sUnionRoomPlayer_DummyRfu); } else { - ptr[0]->arr[i].gname_uname = gname_uname; - ptr[0]->arr[i].active = AreGnameUnameDifferent(&ptr[0]->arr[i].gname_uname, &sWirelessGnameUnamePair_Dummy); + list[0]->players[i].rfu = rfu; + list[0]->players[i].active = ArePlayersDifferent(&list[0]->players[i].rfu, &sUnionRoomPlayer_DummyRfu); } } } -static u8 CreateTask_SearchForChildOrParent(struct UnkStruct_Main4 * main4_parent, struct UnkStruct_Main4 * main4_child, u32 linkGroup) +static u8 CreateTask_SearchForChildOrParent(struct RfuIncomingPlayerList * parentList, struct RfuIncomingPlayerList * childList, u32 linkGroup) { u8 taskId = CreateTask(Task_SearchForChildOrParent, 0); - struct UnkStruct_Main4 ** data = (void *)gTasks[taskId].data; - data[0] = main4_parent; - data[1] = main4_child; + struct RfuIncomingPlayerList ** data = (void *)gTasks[taskId].data; + data[0] = parentList; + data[1] = childList; gTasks[taskId].data[4] = linkGroup; return taskId; } -static void Task_ListenForPartnersWithCompatibleSerialNos(u8 taskId) +static void Task_ListenForCompatiblePartners(u8 taskId) { s32 i, j; - struct UnkStruct_Main4 **ptr = (void*) gTasks[taskId].data; + struct RfuIncomingPlayerList **list = (void*) gTasks[taskId].data; for (i = 0; i < RFU_CHILD_MAX; i++) { - LinkRfu_GetNameIfCompatible(&ptr[0]->arr[i].gname_uname.gname, ptr[0]->arr[i].gname_uname.playerName, i); - if (!IsPartnerActivityAcceptable(ptr[0]->arr[i].gname_uname.gname.activity, gTasks[taskId].data[2])) + Rfu_GetCompatiblePlayerData(&list[0]->players[i].rfu.data, list[0]->players[i].rfu.name, i); + if (!IsPartnerActivityAcceptable(list[0]->players[i].rfu.data.activity, gTasks[taskId].data[2])) { - ptr[0]->arr[i].gname_uname = sWirelessGnameUnamePair_Dummy; + list[0]->players[i].rfu = sUnionRoomPlayer_DummyRfu; } for (j = 0; j < i; j++) { - if (!AreGnameUnameDifferent(&ptr[0]->arr[j].gname_uname, &ptr[0]->arr[i].gname_uname)) - { - ptr[0]->arr[i].gname_uname = sWirelessGnameUnamePair_Dummy; - } + if (!ArePlayersDifferent(&list[0]->players[j].rfu, &list[0]->players[i].rfu)) + list[0]->players[i].rfu = sUnionRoomPlayer_DummyRfu; } - ptr[0]->arr[i].active = AreGnameUnameDifferent(&ptr[0]->arr[i].gname_uname, &sWirelessGnameUnamePair_Dummy); + list[0]->players[i].active = ArePlayersDifferent(&list[0]->players[i].rfu, &sUnionRoomPlayer_DummyRfu); } } -static bool32 HasWonderCardOrNewsByLinkGroup(struct GFtgtGname *gname, s16 linkGroup) +static bool32 HasWonderCardOrNewsByLinkGroup(struct RfuGameData *data, s16 linkGroup) { if (linkGroup == LINK_GROUP_WONDER_CARD) { - if (!gname->unk_00.hasCard) + if (!data->compatibility.hasCard) return FALSE; else return TRUE; } else if (linkGroup == LINK_GROUP_WONDER_NEWS) { - if (!gname->unk_00.hasNews) + if (!data->compatibility.hasNews) return FALSE; else return TRUE; @@ -3518,35 +3544,34 @@ static bool32 HasWonderCardOrNewsByLinkGroup(struct GFtgtGname *gname, s16 linkG } } -static void Task_ListenForPartnersWithSerial7F7D(u8 taskId) +static void Task_ListenForWonderDistributor(u8 taskId) { s32 i; - struct UnkStruct_Main4 **ptr = (void*) gTasks[taskId].data; + struct RfuIncomingPlayerList **list = (void*) gTasks[taskId].data; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (LinkRfu_GetNameIfSerial7F7D(&ptr[0]->arr[i].gname_uname.gname, ptr[0]->arr[i].gname_uname.playerName, i)) - { - HasWonderCardOrNewsByLinkGroup(&ptr[0]->arr[i].gname_uname.gname, gTasks[taskId].data[2]); - } - ptr[0]->arr[i].active = AreGnameUnameDifferent(&ptr[0]->arr[i].gname_uname, &sWirelessGnameUnamePair_Dummy); + if (Rfu_GetWonderDistributorPlayerData(&list[0]->players[i].rfu.data, list[0]->players[i].rfu.name, i)) + HasWonderCardOrNewsByLinkGroup(&list[0]->players[i].rfu.data, gTasks[taskId].data[2]); + + list[0]->players[i].active = ArePlayersDifferent(&list[0]->players[i].rfu, &sUnionRoomPlayer_DummyRfu); } } -static u8 CreateTask_ListenForPartnersWithCompatibleSerialNos(struct UnkStruct_Main4 * main4, u32 linkGroup) +static u8 CreateTask_ListenForCompatiblePartners(struct RfuIncomingPlayerList * list, u32 linkGroup) { - u8 taskId = CreateTask(Task_ListenForPartnersWithCompatibleSerialNos, 0); - struct UnkStruct_Main4 **ptr = (void*) gTasks[taskId].data; - ptr[0] = main4; + u8 taskId = CreateTask(Task_ListenForCompatiblePartners, 0); + struct RfuIncomingPlayerList **oldList = (void*) gTasks[taskId].data; + oldList[0] = list; gTasks[taskId].data[2] = linkGroup; return taskId; } -static u8 CreateTask_ListenForPartnersWithSerial7F7D(struct UnkStruct_Main4 * main4, u32 linkGroup) +static u8 CreateTask_ListenForWonderDistributor(struct RfuIncomingPlayerList * list, u32 linkGroup) { - u8 taskId = CreateTask(Task_ListenForPartnersWithSerial7F7D, 0); - struct UnkStruct_Main4 **ptr = (void*) gTasks[taskId].data; - ptr[0] = main4; + u8 taskId = CreateTask(Task_ListenForWonderDistributor, 0); + struct RfuIncomingPlayerList **oldList = (void*) gTasks[taskId].data; + oldList[0] = list; gTasks[taskId].data[2] = linkGroup; return taskId; } @@ -3560,7 +3585,7 @@ static bool32 UR_PrintFieldMessage(const u8 *src) return FALSE; } -static bool32 UR_RunTextPrinters_CheckPrinter0Active(void) +static bool32 UR_RunTextPrinters(void) { if (!RunTextPrintersAndIsPrinter0Active()) return TRUE; @@ -3598,9 +3623,7 @@ static s8 UnionRoomHandleYesNo(u8 *state, bool32 noDraw) { case 0: if (noDraw) - { return -3; - } DisplayYesNoMenuDefaultYes(); (*state)++; break; @@ -3612,14 +3635,14 @@ static s8 UnionRoomHandleYesNo(u8 *state, bool32 noDraw) return -3; } input = Menu_ProcessInputNoWrapClearOnChoose(); - if (input == -1 || input == 0 || input == 1) + if (input == MENU_B_PRESSED || input == 0 || input == 1) { *state = 0; return input; } break; } - return -2; + return MENU_NOTHING_CHOSEN; } static u8 CreateTradeBoardWindow(const struct WindowTemplate * template) @@ -3627,7 +3650,7 @@ static u8 CreateTradeBoardWindow(const struct WindowTemplate * template) u8 windowId = AddWindow(template); DrawStdWindowFrame(windowId, FALSE); FillWindowPixelBuffer(windowId, PIXEL_FILL(15)); - UR_AddTextPrinterParameterized(windowId, 1, sText_NameWantedOfferLv, 8, 1, 6); + PrintUnionRoomText(windowId, 1, sText_NameWantedOfferLv, 8, 1, UR_COLOR_TRADE_BOARD_OTHER); CopyWindowToVram(windowId, 2); PutWindowTilemap(windowId); return windowId; @@ -3649,13 +3672,11 @@ static s32 ListMenuHandler_AllItemsAvailable(u8 *state, u8 *windowId, u8 *listMe winTemplateCopy = *winTemplate; maxWidth = Intl_GetListMenuWidth(menuTemplate); if (winTemplateCopy.width > maxWidth) - { winTemplateCopy.width = maxWidth; - } + if (winTemplateCopy.tilemapLeft + winTemplateCopy.width > 29) - { winTemplateCopy.tilemapLeft = max(29 - winTemplateCopy.width, 0); - } + *windowId = AddWindow(&winTemplateCopy); DrawStdWindowFrame(*windowId, FALSE); gMultiuseListMenuTemplate = *menuTemplate; @@ -3688,7 +3709,10 @@ static s32 ListMenuHandler_AllItemsAvailable(u8 *state, u8 *windowId, u8 *listMe return -1; } -static s32 TradeBoardMenuHandler(u8 *state, u8 *windowId, u8 *listMenuId, u8 *tradeBoardWindowId, const struct WindowTemplate *winTemplate, const struct ListMenuTemplate *menuTemplate, struct UnkStruct_Main0 *traders) +static s32 TradeBoardMenuHandler(u8 *state, u8 *mainWindowId, u8 *listMenuId, u8 *headerWindowId, + const struct WindowTemplate *winTemplate, + const struct ListMenuTemplate *menuTemplate, + struct RfuPlayerList *list) { s32 input; s32 idx; @@ -3696,16 +3720,16 @@ static s32 TradeBoardMenuHandler(u8 *state, u8 *windowId, u8 *listMenuId, u8 *tr switch (*state) { case 0: - *tradeBoardWindowId = CreateTradeBoardWindow(&sWindowTemplate_TradingBoard); - *windowId = AddWindow(winTemplate); - DrawStdWindowFrame(*windowId, FALSE); + *headerWindowId = CreateTradeBoardWindow(&sWindowTemplate_TradingBoardHeader); + *mainWindowId = AddWindow(winTemplate); + DrawStdWindowFrame(*mainWindowId, FALSE); gMultiuseListMenuTemplate = *menuTemplate; - gMultiuseListMenuTemplate.windowId = *windowId; + gMultiuseListMenuTemplate.windowId = *mainWindowId; *listMenuId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 1); (*state)++; break; case 1: - CopyWindowToVram(*windowId, TRUE); + CopyWindowToVram(*mainWindowId, TRUE); (*state)++; break; case 2: @@ -3715,19 +3739,19 @@ static s32 TradeBoardMenuHandler(u8 *state, u8 *windowId, u8 *listMenuId, u8 *tr if (input == 8 || JOY_NEW(B_BUTTON)) { DestroyListMenuTask(*listMenuId, NULL, NULL); - RemoveWindow(*windowId); - DeleteTradeBoardWindow(*tradeBoardWindowId); + RemoveWindow(*mainWindowId); + DeleteTradeBoardWindow(*headerWindowId); *state = 0; return -2; } else { - idx = GetIndexOfNthTradeBoardOffer(traders->arr, input); + idx = GetIndexOfNthTradeBoardOffer(list->players, input); if (idx >= 0) { DestroyListMenuTask(*listMenuId, NULL, NULL); - RemoveWindow(*windowId); - DeleteTradeBoardWindow(*tradeBoardWindowId); + RemoveWindow(*mainWindowId); + DeleteTradeBoardWindow(*headerWindowId); *state = 0; return idx; } @@ -3754,7 +3778,7 @@ static void JoinGroup_EnableScriptContexts(void) EnableBothScriptContexts(); } -static void UR_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx) +static void PrintUnionRoomText(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 colorIdx) { struct TextPrinterTemplate printerTemplate; @@ -3770,49 +3794,49 @@ static void UR_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str gTextFlags.useAlternateDownArrow = FALSE; switch (colorIdx) { - case UR_COLOR_DKE_WHT_LTE: + case UR_COLOR_DEFAULT: printerTemplate.letterSpacing = 0; printerTemplate.lineSpacing = 0; printerTemplate.fgColor = TEXT_COLOR_DARK_GRAY; printerTemplate.bgColor = TEXT_COLOR_WHITE; printerTemplate.shadowColor = TEXT_COLOR_LIGHT_GRAY; break; - case UR_COLOR_RED_WHT_LTR: + case UR_COLOR_RED: printerTemplate.letterSpacing = 0; printerTemplate.lineSpacing = 0; printerTemplate.fgColor = TEXT_COLOR_RED; printerTemplate.bgColor = TEXT_COLOR_WHITE; printerTemplate.shadowColor = TEXT_COLOR_LIGHT_RED; break; - case UR_COLOR_GRN_WHT_LTG: + case UR_COLOR_GREEN: printerTemplate.letterSpacing = 0; printerTemplate.lineSpacing = 0; printerTemplate.fgColor = TEXT_COLOR_GREEN; printerTemplate.bgColor = TEXT_COLOR_WHITE; printerTemplate.shadowColor = TEXT_COLOR_LIGHT_GREEN; break; - case UR_COLOR_WHT_WHT_LTE: + case UR_COLOR_WHITE: printerTemplate.letterSpacing = 0; printerTemplate.lineSpacing = 0; printerTemplate.fgColor = TEXT_COLOR_WHITE; printerTemplate.bgColor = TEXT_COLOR_WHITE; printerTemplate.shadowColor = TEXT_COLOR_LIGHT_GRAY; break; - case UR_COLOR_WHT_DKE_LTE: + case UR_COLOR_CANCEL: printerTemplate.letterSpacing = 0; printerTemplate.lineSpacing = 0; printerTemplate.fgColor = TEXT_COLOR_WHITE; printerTemplate.bgColor = TEXT_COLOR_DARK_GRAY; printerTemplate.shadowColor = TEXT_COLOR_LIGHT_GRAY; break; - case UR_COLOR_GRN_DN6_LTB: + case UR_COLOR_TRADE_BOARD_SELF: printerTemplate.letterSpacing = 0; printerTemplate.lineSpacing = 0; printerTemplate.fgColor = TEXT_COLOR_LIGHT_GREEN; printerTemplate.bgColor = TEXT_DYNAMIC_COLOR_6; printerTemplate.shadowColor = TEXT_COLOR_LIGHT_BLUE; break; - case UR_COLOR_DN5_DN6_LTB: + case UR_COLOR_TRADE_BOARD_OTHER: printerTemplate.letterSpacing = 0; printerTemplate.lineSpacing = 0; printerTemplate.fgColor = TEXT_DYNAMIC_COLOR_5; @@ -3821,114 +3845,111 @@ static void UR_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str break; } - AddTextPrinter(&printerTemplate, 0xFF, NULL); + AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL); } -static void ClearUnkStruct_x20Array(struct UnkStruct_x20 *arr, u8 count) +static void ClearRfuPlayerList(struct RfuPlayer *players, u8 count) { s32 i; for (i = 0; i < count; i++) { - arr[i].gname_uname = sWirelessGnameUnamePair_Dummy; - arr[i].timeoutCounter = 255; - arr[i].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; - arr[i].useRedText = FALSE; - arr[i].field_1B = 0; + players[i].rfu = sUnionRoomPlayer_DummyRfu; + players[i].timeoutCounter = 255; + players[i].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; + players[i].useRedText = FALSE; + players[i].field_1B = 0; } } -static void ClearUnkStruct_x1CArray(struct UnkStruct_Main4 *main4, u8 count) +static void ClearIncomingPlayerList(struct RfuIncomingPlayerList *list, u8 count) { s32 i; for (i = 0; i < RFU_CHILD_MAX; i++) { - main4->arr[i].gname_uname = sWirelessGnameUnamePair_Dummy; - main4->arr[i].active = FALSE; + list->players[i].rfu = sUnionRoomPlayer_DummyRfu; + list->players[i].active = FALSE; } } -static bool8 AreGnameUnameDifferent(struct WirelessGnameUnamePair* pair1, const struct WirelessGnameUnamePair* pair2) +// Checks player name and trainer id, returns TRUE if they are not the same +static bool8 ArePlayersDifferent(struct RfuPlayerData* player1, const struct RfuPlayerData* player2) { s32 i; for (i = 0; i < 2; i++) { - if (pair1->gname.unk_00.playerTrainerId[i] != pair2->gname.unk_00.playerTrainerId[i]) - { + if (player1->data.compatibility.playerTrainerId[i] != player2->data.compatibility.playerTrainerId[i]) return TRUE; - } } for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++) { - if (pair1->playerName[i] != pair2->playerName[i]) - { + if (player1->name[i] != player2->name[i]) return TRUE; - } } return FALSE; } -static bool32 AreUnionRoomPlayerGnamesDifferent(struct WirelessGnameUnamePair *pair1, struct WirelessGnameUnamePair *pair2) +static bool32 ArePlayerDataDifferent(struct RfuPlayerData *player1, struct RfuPlayerData *player2) { s32 i; - if (pair1->gname.activity != pair2->gname.activity) + if (player1->data.activity != player2->data.activity) return TRUE; - if (pair1->gname.started != pair2->gname.started) + if (player1->data.startedActivity != player2->data.startedActivity) return TRUE; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (pair1->gname.child_sprite_gender[i] != pair2->gname.child_sprite_gender[i]) + if (player1->data.partnerInfo[i] != player2->data.partnerInfo[i]) return TRUE; } - if (pair1->gname.species != pair2->gname.species) + if (player1->data.tradeSpecies != player2->data.tradeSpecies) return TRUE; - if (pair1->gname.type != pair2->gname.type) + if (player1->data.tradeType != player2->data.tradeType) return TRUE; return FALSE; } -static u32 Findx20Inx1CArray(struct UnkStruct_x20 *arg0, struct UnkStruct_x1C *arg1) +static u32 GetNewIncomingPlayerId(struct RfuPlayer *player, struct RfuIncomingPlayer *incomingPlayer) { - u8 result = 0xFF; + u8 result = 0xFF; // None s32 i; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (arg1[i].active && !AreGnameUnameDifferent(&arg0->gname_uname, &arg1[i].gname_uname)) + if (incomingPlayer[i].active && !ArePlayersDifferent(&player->rfu, &incomingPlayer[i].rfu)) { result = i; - arg1[i].active = FALSE; + incomingPlayer[i].active = FALSE; } } return result; } -static u8 Appendx1Ctox20(struct UnkStruct_x20 *arg0, struct UnkStruct_x1C *arg1, u8 max) +static u8 TryAddIncomingPlayerToList(struct RfuPlayer *players, struct RfuIncomingPlayer *incomingPlayer, u8 max) { s32 i; - if (arg1->active) + if (incomingPlayer->active) { for (i = 0; i < max; i++) { - if (arg0[i].groupScheduledAnim == UNION_ROOM_SPAWN_NONE) + if (players[i].groupScheduledAnim == UNION_ROOM_SPAWN_NONE) { - arg0[i].gname_uname = arg1->gname_uname; - arg0[i].timeoutCounter = 0; - arg0[i].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - arg0[i].field_1B = 64; - arg1->active = FALSE; + players[i].rfu = incomingPlayer->rfu; + players[i].timeoutCounter = 0; + players[i].groupScheduledAnim = UNION_ROOM_SPAWN_IN; + players[i].field_1B = 64; + incomingPlayer->active = FALSE; return i; } } @@ -3937,39 +3958,39 @@ static u8 Appendx1Ctox20(struct UnkStruct_x20 *arg0, struct UnkStruct_x1C *arg1, return 0xFF; } -static void PrintUnionRoomGroupOnWindow(u8 windowId, u8 x, u8 y, struct UnkStruct_x20 *group, u8 colorIdx, u8 id) +static void PrintGroupMemberOnWindow(u8 windowId, u8 x, u8 y, struct RfuPlayer *player, u8 colorIdx, u8 id) { u8 activity; u8 trainerId[6]; ConvertIntToDecimalStringN(gStringVar4, id + 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringAppend(gStringVar4, sText_Colon); - UR_AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, 0); + PrintUnionRoomText(windowId, 1, gStringVar4, x, y, UR_COLOR_DEFAULT); x += 18; - activity = group->gname_uname.gname.activity; - if (group->groupScheduledAnim == UNION_ROOM_SPAWN_IN && !(activity & IN_UNION_ROOM)) + activity = player->rfu.data.activity; + if (player->groupScheduledAnim == UNION_ROOM_SPAWN_IN && !(activity & IN_UNION_ROOM)) { - IntlConvPartnerUname7(gStringVar4, group); - UR_AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, colorIdx); - ConvertIntToDecimalStringN(trainerId, group->gname_uname.gname.unk_00.playerTrainerId[0] | (group->gname_uname.gname.unk_00.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5); + CopyAndTranslatePlayerName(gStringVar4, player); + PrintUnionRoomText(windowId, 1, gStringVar4, x, y, colorIdx); + ConvertIntToDecimalStringN(trainerId, player->rfu.data.compatibility.playerTrainerId[0] | (player->rfu.data.compatibility.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5); StringCopy(gStringVar4, sText_ID); StringAppend(gStringVar4, trainerId); - UR_AddTextPrinterParameterized(windowId, 1, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 0x88), y, colorIdx); + PrintUnionRoomText(windowId, 1, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 0x88), y, colorIdx); } } -static void PrintGroupMemberCandidateOnWindowWithColor(u8 windowId, u8 x, u8 y, struct UnkStruct_x20 *group, u8 colorIdx, u8 id) +static void PrintGroupCandidateOnWindow(u8 windowId, u8 x, u8 y, struct RfuPlayer *player, u8 colorIdx, u8 id) { u8 trainerId[6]; - if (group->groupScheduledAnim == UNION_ROOM_SPAWN_IN) + if (player->groupScheduledAnim == UNION_ROOM_SPAWN_IN) { - IntlConvPartnerUname7(gStringVar4, group); - UR_AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, colorIdx); - ConvertIntToDecimalStringN(trainerId, group->gname_uname.gname.unk_00.playerTrainerId[0] | (group->gname_uname.gname.unk_00.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5); + CopyAndTranslatePlayerName(gStringVar4, player); + PrintUnionRoomText(windowId, 1, gStringVar4, x, y, colorIdx); + ConvertIntToDecimalStringN(trainerId, player->rfu.data.compatibility.playerTrainerId[0] | (player->rfu.data.compatibility.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5); StringCopy(gStringVar4, sText_ID); StringAppend(gStringVar4, trainerId); - UR_AddTextPrinterParameterized(windowId, 1, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 0x68), y, colorIdx); + PrintUnionRoomText(windowId, 1, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 0x68), y, colorIdx); } } @@ -4006,24 +4027,24 @@ static u32 GetResponseIdx_InviteToURoomActivity(s32 activity) } } -static u32 ConvPartnerUnameAndGetWhetherMetAlready(struct UnkStruct_x20 *arg0) +static u32 ConvPartnerUnameAndGetWhetherMetAlready(struct RfuPlayer *player) { u8 name[30]; - IntlConvPartnerUname7(name, arg0); - return PlayerHasMetTrainerBefore(ReadAsU16(arg0->gname_uname.gname.unk_00.playerTrainerId), name); + CopyAndTranslatePlayerName(name, player); + return PlayerHasMetTrainerBefore(ReadAsU16(player->rfu.data.compatibility.playerTrainerId), name); } -static s32 UnionRoomGetPlayerInteractionResponse(struct UnkStruct_Main0 *main0, bool8 overrideGender, u8 playerIdx, u32 playerGender) +static s32 UnionRoomGetPlayerInteractionResponse(struct RfuPlayerList *list, bool8 overrideGender, u8 playerIdx, u32 playerGender) { bool32 metBefore; - struct UnkStruct_x20 * r5 = &main0->arr[playerIdx]; + struct RfuPlayer * player = &list->players[playerIdx]; - if (!r5->gname_uname.gname.started && !overrideGender) + if (!player->rfu.data.startedActivity && !overrideGender) { - IntlConvPartnerUname7(gStringVar1, r5); - metBefore = PlayerHasMetTrainerBefore(ReadAsU16(r5->gname_uname.gname.unk_00.playerTrainerId), gStringVar1); - if (r5->gname_uname.gname.activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) + CopyAndTranslatePlayerName(gStringVar1, player); + metBefore = PlayerHasMetTrainerBefore(ReadAsU16(player->rfu.data.compatibility.playerTrainerId), gStringVar1); + if (player->rfu.data.activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) { StringExpandPlaceholders(gStringVar4, sJoinChatTexts[metBefore][playerGender]); return 2; @@ -4036,12 +4057,12 @@ static s32 UnionRoomGetPlayerInteractionResponse(struct UnkStruct_Main0 *main0, } else { - IntlConvPartnerUname7(gStringVar1, r5); + CopyAndTranslatePlayerName(gStringVar1, player); if (overrideGender) { - playerGender = (r5->gname_uname.gname.unk_00.playerTrainerId[overrideGender + 1] >> 3) & 1; + playerGender = (player->rfu.data.compatibility.playerTrainerId[overrideGender + 1] >> 3) & 1; } - switch (r5->gname_uname.gname.activity & 0x3F) + switch (player->rfu.data.activity & 0x3F) { case ACTIVITY_BATTLE_SINGLE: StringExpandPlaceholders(gStringVar4, sBattleReactionTexts[playerGender][Random() % ARRAY_COUNT(sBattleReactionTexts[0])]); @@ -4067,84 +4088,78 @@ void ItemPrintFunc_EmptyList(u8 windowId, u32 itemId, u8 y) { } -static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct GFtgtGname * gname, const u8 * uname, u8 colorIdx) +static void TradeBoardPrintItemInfo(u8 windowId, u8 y, struct RfuGameData * data, const u8 * playerName, u8 colorIdx) { u8 levelStr[4]; - u16 species = gname->species; - u8 type = gname->type; - u8 level = gname->level; + u16 species = data->tradeSpecies; + u8 type = data->tradeType; + u8 level = data->tradeLevel; - UR_AddTextPrinterParameterized(windowId, 1, uname, 8, y, colorIdx); + PrintUnionRoomText(windowId, 1, playerName, 8, y, colorIdx); if (species == SPECIES_EGG) { - UR_AddTextPrinterParameterized(windowId, 1, sText_EggTrade, 68, y, colorIdx); + PrintUnionRoomText(windowId, 1, sText_EggTrade, 68, y, colorIdx); } else { BlitMenuInfoIcon(windowId, type + 1, 68, y); - UR_AddTextPrinterParameterized(windowId, 1, gSpeciesNames[species], 118, y, colorIdx); + PrintUnionRoomText(windowId, 1, gSpeciesNames[species], 118, y, colorIdx); ConvertIntToDecimalStringN(levelStr, level, STR_CONV_MODE_RIGHT_ALIGN, 3); - UR_AddTextPrinterParameterized(windowId, 1, levelStr, 198, y, colorIdx); + PrintUnionRoomText(windowId, 1, levelStr, 198, y, colorIdx); } } static void TradeBoardListMenuItemPrintFunc(u8 windowId, u32 itemId, u8 y) { - struct WirelessLink_Leader *data = sWirelessLinkMain.leader; - struct GFtgtGname *rfu; + struct WirelessLink_Leader *leader = sWirelessLinkMain.leader; + struct RfuGameData *gameData; s32 i, j; u8 playerName[11]; - if (itemId == -3 && y == sTradeBoardListMenuTemplate.upText_Y) + if (itemId == LIST_HEADER && y == sTradeBoardListMenuTemplate.upText_Y) { - rfu = GetHostRFUtgtGname(); - if (rfu->species != SPECIES_NONE) - { - TradeBoardPrintItemInfo(windowId, y, rfu, gSaveBlock2Ptr->playerName, 5); - } + gameData = GetHostRfuGameData(); + if (gameData->tradeSpecies != SPECIES_NONE) + TradeBoardPrintItemInfo(windowId, y, gameData, gSaveBlock2Ptr->playerName, UR_COLOR_TRADE_BOARD_SELF); } else { j = 0; - for (i = 0; i < (int)ARRAY_COUNT(data->field_0->arr); i++) + for (i = 0; i < MAX_UNION_ROOM_LEADERS; i++) { - if (data->field_0->arr[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN && data->field_0->arr[i].gname_uname.gname.species != SPECIES_NONE) - { + if (leader->playerList->players[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN && leader->playerList->players[i].rfu.data.tradeSpecies != SPECIES_NONE) j++; - } + if (j == itemId + 1) { - IntlConvPartnerUname7(playerName, &data->field_0->arr[i]); - TradeBoardPrintItemInfo(windowId, y, &data->field_0->arr[i].gname_uname.gname, playerName, 6); + CopyAndTranslatePlayerName(playerName, &leader->playerList->players[i]); + TradeBoardPrintItemInfo(windowId, y, &leader->playerList->players[i].rfu.data, playerName, UR_COLOR_TRADE_BOARD_OTHER); break; } } } } -static s32 GetIndexOfNthTradeBoardOffer(struct UnkStruct_x20 * arg, s32 n) +static s32 GetIndexOfNthTradeBoardOffer(struct RfuPlayer * players, s32 n) { s32 i; s32 j = 0; - for (i = 0; i < 8; i++) + for (i = 0; i < MAX_UNION_ROOM_LEADERS; i++) { - if (arg[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN && arg[i].gname_uname.gname.species != SPECIES_NONE) - { + if (players[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN && players[i].rfu.data.tradeSpecies != SPECIES_NONE) j++; - } + if (j == n + 1) - { return i; - } } return -1; } -static s32 GetUnionRoomPlayerGender(s32 playerIdx, struct UnkStruct_Main0 *main0) +static s32 GetUnionRoomPlayerGender(s32 playerIdx, struct RfuPlayerList *list) { - return main0->arr[playerIdx].gname_uname.gname.playerGender; + return list->players[playerIdx].rfu.data.playerGender; } static s32 IsRequestedTypeOrEggInPlayerParty(u32 type, u32 species) @@ -4157,9 +4172,7 @@ static s32 IsRequestedTypeOrEggInPlayerParty(u32 type, u32 species) { species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); if (species == SPECIES_EGG) - { return UR_TRADE_MATCH; - } } return UR_TRADE_NOEGG; } @@ -4169,9 +4182,7 @@ static s32 IsRequestedTypeOrEggInPlayerParty(u32 type, u32 species) { species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); if (gBaseStats[species].type1 == type || gBaseStats[species].type2 == type) - { return UR_TRADE_MATCH; - } } return UR_TRADE_NOTYPE; } @@ -4236,7 +4247,7 @@ static s32 GetChatLeaderActionRequestMessage(u8 *dst, u32 gender, u16 *activityD StringCopy(uroom->activityRequestStrbufs[1], gSpeciesNames[sUnionRoomTrade.playerSpecies]); for (i = 0; i < RFU_CHILD_MAX; i++) { - if (gRfuLinkStatus->partner[i].serialNo == RFU_SERIAL_A) + if (gRfuLinkStatus->partner[i].serialNo == RFU_SERIAL_GAME) { ConvertIntToDecimalStringN(uroom->activityRequestStrbufs[2], activityData[2], STR_CONV_MODE_LEFT_ALIGN, 3); StringCopy(uroom->activityRequestStrbufs[3], gSpeciesNames[activityData[1]]); @@ -4251,9 +4262,7 @@ static s32 GetChatLeaderActionRequestMessage(u8 *dst, u32 gender, u16 *activityD else { for (i = 0; i < RFU_CHILD_MAX; i++) - { DynamicPlaceholderTextUtil_SetPlaceholderPtr(i, uroom->activityRequestStrbufs[i]); - } DynamicPlaceholderTextUtil_ExpandPlaceholders(dst, sText_OfferToTradeMon); } result = 1; @@ -4291,9 +4300,9 @@ static bool32 PollPartnerYesNoResponse(struct WirelessLink_URoom *data) bool32 InUnionRoom(void) { - return gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(UNION_ROOM) - && gSaveBlock1Ptr->location.mapNum == MAP_NUM(UNION_ROOM) - ? TRUE : FALSE; + return gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(UNION_ROOM) + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(UNION_ROOM) + ? TRUE : FALSE; } static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void) @@ -4304,10 +4313,8 @@ static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void) for (i = 0; i < gPlayerPartyCount; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) <= 30 - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) - { + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) count++; - } } if (count > 1) @@ -4316,16 +4323,16 @@ static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void) return FALSE; } -static void ResetUnionRoomTrade(struct UnionRoomTrade *uroomTrade) +static void ResetUnionRoomTrade(struct UnionRoomTrade *trade) { - uroomTrade->state = URTRADE_STATE_NONE; - uroomTrade->type = 0; - uroomTrade->playerPersonality = 0; - uroomTrade->playerSpecies = 0; - uroomTrade->playerLevel = 0; - uroomTrade->species = 0; - uroomTrade->level = 0; - uroomTrade->personality = 0; + trade->state = URTRADE_STATE_NONE; + trade->type = 0; + trade->playerPersonality = 0; + trade->playerSpecies = SPECIES_NONE; + trade->playerLevel = 0; + trade->species = SPECIES_NONE; + trade->level = 0; + trade->personality = 0; } void Script_ResetUnionRoomTrade(void) @@ -4360,31 +4367,26 @@ static u32 GetPartyPositionOfRegisteredMon(struct UnionRoomTrade *trade, u8 mult u16 cur_species; s32 i; - // player if (multiplayerId == 0) { species = trade->playerSpecies; personality = trade->playerPersonality; } - // partner else { species = trade->species; personality = trade->personality; } + // Find party position by comparing to personality and species for (i = 0; i < gPlayerPartyCount; i++) { cur_personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); if (cur_personality != personality) - { continue; - } cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); if (cur_species != species) - { continue; - } response = i; break; } @@ -4405,23 +4407,23 @@ static void HandleCancelActivity(bool32 setData) } } -static void UR_EnableScriptContext2AndFreezeObjectEvents(void) +static void StartScriptInteraction(void) { ScriptContext2_Enable(); FreezeObjects_WaitForPlayer(); } -static u8 GetActivePartnerSpriteGenderParam(struct WirelessLink_URoom *data) +static u8 GetActivePartnersInfo(struct WirelessLink_URoom *data) { - u8 retVal = 0x80; + u8 retVal = PINFO_ACTIVE_FLAG; u8 i; for (i = 0; i < RFU_CHILD_MAX; i++) { - if (data->field_C->arr[i].active) + if (data->incomingParentList->players[i].active) { - retVal |= data->field_C->arr[i].gname_uname.gname.playerGender << 3; - retVal |= data->field_C->arr[i].gname_uname.gname.unk_00.playerTrainerId[0] & 7; + retVal |= data->incomingParentList->players[i].rfu.data.playerGender << PINFO_GENDER_SHIFT; + retVal |= data->incomingParentList->players[i].rfu.data.compatibility.playerTrainerId[0] & PINFO_TID_MASK; break; } } @@ -4458,17 +4460,13 @@ static void ViewURoomPartnerTrainerCard(u8 *unused, struct WirelessLink_URoom *d n = trainerCard->linkBattleWins; if (n > 9999) - { n = 9999; - } ConvertIntToDecimalStringN(data->trainerCardStrBuffer[0], n, STR_CONV_MODE_LEFT_ALIGN, 4); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, data->trainerCardStrBuffer[0]); n = trainerCard->linkBattleLosses; if (n > 9999) - { n = 9999; - } ConvertIntToDecimalStringN(data->trainerCardStrBuffer[1], n, STR_CONV_MODE_LEFT_ALIGN, 4); DynamicPlaceholderTextUtil_SetPlaceholderPtr(2, data->trainerCardStrBuffer[1]); @@ -4496,8 +4494,8 @@ static void ViewURoomPartnerTrainerCard(u8 *unused, struct WirelessLink_URoom *d } } -static void IntlConvPartnerUname7(u8 *dest, struct UnkStruct_x20 *arg1) +static void CopyAndTranslatePlayerName(u8 *dest, struct RfuPlayer *player) { - StringCopy7(dest, arg1->gname_uname.playerName); - ConvertInternationalString(dest, arg1->gname_uname.gname.unk_00.language); + StringCopy7(dest, player->rfu.name); + ConvertInternationalString(dest, player->rfu.data.compatibility.language); } diff --git a/src/union_room_player_avatar.c b/src/union_room_player_avatar.c index 671290e21e..9a0f1a8839 100644 --- a/src/union_room_player_avatar.c +++ b/src/union_room_player_avatar.c @@ -9,8 +9,12 @@ #include "constants/event_objects.h" #include "constants/event_object_movement.h" -#define UR_SPRITE_START_ID (MAX_SPRITES - MAX_UNION_ROOM_PLAYERS) -#define UR_PLAYER_SPRITE_ID(playerIdx, facingDir)(5 * playerIdx + facingDir) +#define UR_SPRITE_START_ID (MAX_SPRITES - MAX_UNION_ROOM_LEADERS) + +// Each parent player can lead a group of up to MAX_RFU_PLAYERS (including themselves). +// Multiply the leader's id by MAX_RFU_PLAYERS and add the member's id (0 if the leader) to +// get the sprite index of that player. +#define UR_PLAYER_SPRITE_ID(leaderId, memberId)(MAX_RFU_PLAYERS * leaderId + memberId) static EWRAM_DATA struct UnionRoomObject * sUnionObjWork = NULL; static EWRAM_DATA u32 sUnionObjRefreshTimer = 0; @@ -19,7 +23,8 @@ static u8 CreateTask_AnimateUnionRoomPlayers(void); static u32 IsUnionRoomPlayerInvisible(u32, u32); static void SetUnionRoomObjectFacingDirection(s32, s32, u8); -static const u8 sUnionRoomObjGfxIds[GENDER_COUNT][MAX_UNION_ROOM_PLAYERS + 2] = { +// + 2 is just to match, those elements are empty and never read +static const u8 sUnionRoomObjGfxIds[GENDER_COUNT][MAX_UNION_ROOM_LEADERS + 2] = { [MALE] = { OBJ_EVENT_GFX_MAN_3, OBJ_EVENT_GFX_BLACK_BELT, @@ -42,7 +47,7 @@ static const u8 sUnionRoomObjGfxIds[GENDER_COUNT][MAX_UNION_ROOM_PLAYERS + 2] = } }; -static const s16 sUnionRoomPlayerCoords[MAX_UNION_ROOM_PLAYERS][2] = { +static const s16 sUnionRoomPlayerCoords[MAX_UNION_ROOM_LEADERS][2] = { { 4, 6}, {13, 8}, {10, 6}, @@ -53,12 +58,16 @@ static const s16 sUnionRoomPlayerCoords[MAX_UNION_ROOM_PLAYERS][2] = { { 7, 8} }; -static const s8 sFacingDirectionOffsets[][2] = { - [DIR_NONE] = { 0, 0}, - [DIR_SOUTH] = { 1, 0}, - [DIR_NORTH] = { 0, -1}, - [DIR_WEST] = {-1, 0}, - [DIR_EAST] = { 0, 1} +// If there's a group of players interacting in the Union Room, the group +// leader will be at one of the positions above and each member in the group +// will be at one of the offsets from that position below. The leader will +// be at the first offset (0,0), as they're at the center. +static const s8 sUnionRoomGroupOffsets[MAX_RFU_PLAYERS][2] = { + { 0, 0}, // Center + { 1, 0}, // Left + { 0, -1}, // Top + {-1, 0}, // Right + { 0, 1} // Bottom }; static const u8 sOppositeFacingDirection[] = { @@ -69,12 +78,14 @@ static const u8 sOppositeFacingDirection[] = { [DIR_EAST] = DIR_WEST }; -static const u8 sNextFacingDirection[] = { - [DIR_NONE] = DIR_SOUTH, - [DIR_SOUTH] = DIR_WEST, - [DIR_NORTH] = DIR_SOUTH, - [DIR_WEST] = DIR_EAST, - [DIR_EAST] = DIR_NORTH +// Compare to sUnionRoomGroupOffsets, the direction each group member +// needs to be facing in order to face the group leader in the center. +static const u8 sMemberFacingDirections[MAX_RFU_PLAYERS] = { + DIR_SOUTH, // Leader, but never read + DIR_WEST, + DIR_SOUTH, + DIR_EAST, + DIR_NORTH }; static const u8 sUnionRoomLocalIds[] = { @@ -118,21 +129,22 @@ static bool32 IsPlayerStandingStill(void) return FALSE; } +// Gender and trainer id are used to determine which sprite a player appears as static u8 GetUnionRoomPlayerGraphicsId(u32 gender, u32 id) { - return sUnionRoomObjGfxIds[gender][id % MAX_UNION_ROOM_PLAYERS]; + return sUnionRoomObjGfxIds[gender][id % MAX_UNION_ROOM_LEADERS]; } -static void GetUnionRoomPlayerFacingCoords(u32 playerIdx, u32 direction, s32 * x, s32 * y) +static void GetUnionRoomPlayerCoords(u32 leaderId, u32 memberId, s32 * x, s32 * y) { - *x = sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0] + 7; - *y = sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1] + 7; + *x = sUnionRoomPlayerCoords[leaderId][0] + sUnionRoomGroupOffsets[memberId][0] + 7; + *y = sUnionRoomPlayerCoords[leaderId][1] + sUnionRoomGroupOffsets[memberId][1] + 7; } -static bool32 IsUnionRoomPlayerFacingTileAt(u32 playerIdx, u32 direction, s32 x, s32 y) +static bool32 IsUnionRoomPlayerAt(u32 leaderId, u32 memberId, s32 x, s32 y) { - if ((sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0] + 7 == x) - && (sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1] + 7 == y)) + if ((sUnionRoomPlayerCoords[leaderId][0] + sUnionRoomGroupOffsets[memberId][0] + 7 == x) + && (sUnionRoomPlayerCoords[leaderId][1] + sUnionRoomGroupOffsets[memberId][1] + 7 == y)) return TRUE; else return FALSE; @@ -153,62 +165,50 @@ static void ShowUnionRoomPlayer(u32 player_idx) FlagClear(FLAG_HIDE_UNION_ROOM_PLAYER_1 + player_idx); } -static void SetUnionRoomPlayerGfx(u32 playerIdx, u32 gfxId) +static void SetUnionRoomPlayerGfx(u32 leaderId, u32 gfxId) { - VarSet(VAR_OBJ_GFX_ID_0 + playerIdx, gfxId); + VarSet(VAR_OBJ_GFX_ID_0 + leaderId, gfxId); } -static void CreateUnionRoomPlayerObjectEvent(u32 playerIdx) +static void CreateUnionRoomPlayerObjectEvent(u32 leaderId) { - TrySpawnObjectEvent(sUnionRoomLocalIds[playerIdx], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); + TrySpawnObjectEvent(sUnionRoomLocalIds[leaderId], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); } -static void RemoveUnionRoomPlayerObjectEvent(u32 playerIdx) +static void RemoveUnionRoomPlayerObjectEvent(u32 leaderId) { - RemoveObjectEventByLocalIdAndMap(sUnionRoomLocalIds[playerIdx], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); + RemoveObjectEventByLocalIdAndMap(sUnionRoomLocalIds[leaderId], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); } -static bool32 SetUnionRoomPlayerEnterExitMovement(u32 playerIdx, const u8 * movement) +static bool32 SetUnionRoomPlayerEnterExitMovement(u32 leaderId, const u8 * movement) { u8 objectId; struct ObjectEvent * object; - if (TryGetObjectEventIdByLocalIdAndMap(sUnionRoomLocalIds[playerIdx], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectId)) - { + if (TryGetObjectEventIdByLocalIdAndMap(sUnionRoomLocalIds[leaderId], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectId)) return FALSE; - } object = &gObjectEvents[objectId]; if (ObjectEventIsMovementOverridden(object)) - { return FALSE; - } if (ObjectEventSetHeldMovement(object, *movement)) - { return FALSE; - } return TRUE; } -static bool32 TryReleaseUnionRoomPlayerObjectEvent(u32 playerIdx) +static bool32 TryReleaseUnionRoomPlayerObjectEvent(u32 leaderId) { u8 objectId; struct ObjectEvent * object; - if (TryGetObjectEventIdByLocalIdAndMap(sUnionRoomLocalIds[playerIdx], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectId)) - { + if (TryGetObjectEventIdByLocalIdAndMap(sUnionRoomLocalIds[leaderId], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectId)) return TRUE; - } + object = &gObjectEvents[objectId]; if (!ObjectEventClearHeldMovementIfFinished(object)) - { return FALSE; - } + if (!ScriptContext2_IsEnabled()) - { UnfreezeObjectEvent(object); - } else - { FreezeObjectEvent(object); - } return TRUE; } @@ -218,7 +218,7 @@ u8 InitUnionRoomPlayerObjects(struct UnionRoomObject * players) sUnionObjRefreshTimer = 0; sUnionObjWork = players; - for (i = 0; i < MAX_UNION_ROOM_PLAYERS; i++) + for (i = 0; i < MAX_UNION_ROOM_LEADERS; i++) { players[i].state = 0; players[i].gfxId = 0; @@ -228,22 +228,22 @@ u8 InitUnionRoomPlayerObjects(struct UnionRoomObject * players) return CreateTask_AnimateUnionRoomPlayers(); } -static bool32 AnimateUnionRoomPlayerDespawn(s8 * state, u32 playerIdx, struct UnionRoomObject * ptr) +static bool32 AnimateUnionRoomPlayerDespawn(s8 * state, u32 leaderId, struct UnionRoomObject * object) { switch (*state) { case 0: - if (SetUnionRoomPlayerEnterExitMovement(playerIdx, sMovement_UnionPlayerExit) == TRUE) + if (SetUnionRoomPlayerEnterExitMovement(leaderId, sMovement_UnionPlayerExit) == TRUE) { - HideUnionRoomPlayer(playerIdx); + HideUnionRoomPlayer(leaderId); (*state)++; } break; case 1: - if (TryReleaseUnionRoomPlayerObjectEvent(playerIdx)) + if (TryReleaseUnionRoomPlayerObjectEvent(leaderId)) { - RemoveUnionRoomPlayerObjectEvent(playerIdx); - HideUnionRoomPlayer(playerIdx); + RemoveUnionRoomPlayerObjectEvent(leaderId); + HideUnionRoomPlayer(leaderId); *state = 0; return TRUE; } @@ -252,7 +252,7 @@ static bool32 AnimateUnionRoomPlayerDespawn(s8 * state, u32 playerIdx, struct Un return FALSE; } -static bool32 AnimateUnionRoomPlayerSpawn(s8 * state, u32 playerIdx, struct UnionRoomObject * ptr) +static bool32 AnimateUnionRoomPlayerSpawn(s8 * state, u32 leaderId, struct UnionRoomObject * object) { s16 x, y; @@ -260,32 +260,24 @@ static bool32 AnimateUnionRoomPlayerSpawn(s8 * state, u32 playerIdx, struct Unio { case 0: if (!IsPlayerStandingStill()) - { break; - } PlayerGetDestCoords(&x, &y); - if (IsUnionRoomPlayerFacingTileAt(playerIdx, 0, x, y) == TRUE) - { + if (IsUnionRoomPlayerAt(leaderId, 0, x, y) == TRUE) break; - } player_get_pos_including_state_based_drift(&x, &y); - if (IsUnionRoomPlayerFacingTileAt(playerIdx, 0, x, y) == TRUE) - { + if (IsUnionRoomPlayerAt(leaderId, 0, x, y) == TRUE) break; - } - SetUnionRoomPlayerGfx(playerIdx, ptr->gfxId); - CreateUnionRoomPlayerObjectEvent(playerIdx); - ShowUnionRoomPlayer(playerIdx); + SetUnionRoomPlayerGfx(leaderId, object->gfxId); + CreateUnionRoomPlayerObjectEvent(leaderId); + ShowUnionRoomPlayer(leaderId); (*state)++; // fallthrough case 3: // incorrect? - if (SetUnionRoomPlayerEnterExitMovement(playerIdx, sMovement_UnionPlayerEnter) == TRUE) - { + if (SetUnionRoomPlayerEnterExitMovement(leaderId, sMovement_UnionPlayerEnter) == TRUE) (*state)++; - } break; case 2: - if (TryReleaseUnionRoomPlayerObjectEvent(playerIdx)) + if (TryReleaseUnionRoomPlayerObjectEvent(leaderId)) { *state = 0; return TRUE; @@ -295,38 +287,38 @@ static bool32 AnimateUnionRoomPlayerSpawn(s8 * state, u32 playerIdx, struct Unio return FALSE; } -static bool32 SpawnGroupLeader(u32 playerIdx, u32 gender, u32 id) +static bool32 SpawnGroupLeader(u32 leaderId, u32 gender, u32 id) { - struct UnionRoomObject * ptr = &sUnionObjWork[playerIdx]; - ptr->schedAnim = UNION_ROOM_SPAWN_IN; - ptr->gfxId = GetUnionRoomPlayerGraphicsId(gender, id); + struct UnionRoomObject * object = &sUnionObjWork[leaderId]; + object->schedAnim = UNION_ROOM_SPAWN_IN; + object->gfxId = GetUnionRoomPlayerGraphicsId(gender, id); - if (ptr->state == 0) + if (object->state == 0) return TRUE; else return FALSE; } -static bool32 DespawnGroupLeader(u32 playerIdx) +static bool32 DespawnGroupLeader(u32 leaderId) { - struct UnionRoomObject * ptr = &sUnionObjWork[playerIdx]; - ptr->schedAnim = UNION_ROOM_SPAWN_OUT; + struct UnionRoomObject * object = &sUnionObjWork[leaderId]; + object->schedAnim = UNION_ROOM_SPAWN_OUT; - if (ptr->state == 1) + if (object->state == 1) return TRUE; else return FALSE; } -static void AnimateUnionRoomPlayer(u32 playerIdx, struct UnionRoomObject * ptr) +static void AnimateUnionRoomPlayer(u32 leaderId, struct UnionRoomObject * object) { - switch (ptr->state) + switch (object->state) { case 0: - if (ptr->schedAnim == UNION_ROOM_SPAWN_IN) + if (object->schedAnim == UNION_ROOM_SPAWN_IN) { - ptr->state = 2; - ptr->animState = 0; + object->state = 2; + object->animState = 0; } else { @@ -334,23 +326,23 @@ static void AnimateUnionRoomPlayer(u32 playerIdx, struct UnionRoomObject * ptr) } // fallthrough case 2: - if (!IsUnionRoomPlayerInvisible(playerIdx, 0) && ptr->schedAnim == UNION_ROOM_SPAWN_OUT) + if (!IsUnionRoomPlayerInvisible(leaderId, 0) && object->schedAnim == UNION_ROOM_SPAWN_OUT) { - ptr->state = 0; - ptr->animState = 0; - RemoveUnionRoomPlayerObjectEvent(playerIdx); - HideUnionRoomPlayer(playerIdx); + object->state = 0; + object->animState = 0; + RemoveUnionRoomPlayerObjectEvent(leaderId); + HideUnionRoomPlayer(leaderId); } - else if (AnimateUnionRoomPlayerSpawn(&ptr->animState, playerIdx, ptr) == TRUE) + else if (AnimateUnionRoomPlayerSpawn(&object->animState, leaderId, object) == TRUE) { - ptr->state = 1; + object->state = 1; } break; case 1: - if (ptr->schedAnim == UNION_ROOM_SPAWN_OUT) + if (object->schedAnim == UNION_ROOM_SPAWN_OUT) { - ptr->state = 3; - ptr->animState = 0; + object->state = 3; + object->animState = 0; } else { @@ -358,19 +350,17 @@ static void AnimateUnionRoomPlayer(u32 playerIdx, struct UnionRoomObject * ptr) } // fallthrough case 3: - if (AnimateUnionRoomPlayerDespawn(&ptr->animState, playerIdx, ptr) == 1) - { - ptr->state = 0; - } + if (AnimateUnionRoomPlayerDespawn(&object->animState, leaderId, object) == 1) + object->state = 0; break; } - ptr->schedAnim = UNION_ROOM_SPAWN_NONE; + object->schedAnim = UNION_ROOM_SPAWN_NONE; } static void Task_AnimateUnionRoomPlayers(u8 taskId) { s32 i; - for (i = 0; i < MAX_UNION_ROOM_PLAYERS; i++) + for (i = 0; i < MAX_UNION_ROOM_LEADERS; i++) AnimateUnionRoomPlayer(i, &sUnionObjWork[i]); } @@ -386,15 +376,13 @@ static void DestroyTask_AnimateUnionRoomPlayers(void) { u8 taskId = FindTaskIdByFunc(Task_AnimateUnionRoomPlayers); if (taskId < NUM_TASKS) - { DestroyTask(taskId); - } } void DestroyUnionRoomPlayerObjects(void) { s32 i; - for (i = 0; i < MAX_UNION_ROOM_PLAYERS; i++) + for (i = 0; i < MAX_UNION_ROOM_LEADERS; i++) { if (!IsUnionRoomPlayerHidden(i)) { @@ -406,120 +394,119 @@ void DestroyUnionRoomPlayerObjects(void) DestroyTask_AnimateUnionRoomPlayers(); } -void CreateGroupMemberSpritesInvisible(u8 * spriteIds, s32 playerIdx) +void CreateUnionRoomPlayerSprites(u8 * spriteIds, s32 leaderId) { - s32 direction; - - for (direction = DIR_NONE; direction <= DIR_EAST; direction++) + s32 memberId; + for (memberId = 0; memberId < MAX_RFU_PLAYERS; memberId++) { - s32 id = UR_PLAYER_SPRITE_ID(playerIdx, direction); + s32 id = UR_PLAYER_SPRITE_ID(leaderId, memberId); spriteIds[id] = CreateObjectSprite(OBJ_EVENT_GFX_MAN_4, id - UR_SPRITE_START_ID, - sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0], - sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1], + sUnionRoomPlayerCoords[leaderId][0] + sUnionRoomGroupOffsets[memberId][0], + sUnionRoomPlayerCoords[leaderId][1] + sUnionRoomGroupOffsets[memberId][1], 3, 1); SetObjectEventSpriteInvisibility(id - UR_SPRITE_START_ID, TRUE); } } -void DestroyGroupMemberSprites(u8 * spriteIds) +void DestroyUnionRoomPlayerSprites(u8 * spriteIds) { s32 i; - for (i = 0; i < UR_PLAYER_SPRITE_ID(MAX_UNION_ROOM_PLAYERS, 0); i++) + for (i = 0; i < NUM_UNION_ROOM_SPRITES; i++) DestroySprite(&gSprites[spriteIds[i]]); } +// Clear the impassable metatiles around the group leaders that get set +// to prevent the player from walking through the group member sprites. void SetTilesAroundUnionRoomPlayersPassable(void) { - s32 i, direction, x, y; - for (i = 0; i < MAX_UNION_ROOM_PLAYERS; i++) + s32 i, memberId, x, y; + for (i = 0; i < MAX_UNION_ROOM_LEADERS; i++) { - for (direction = DIR_NONE; direction <= DIR_EAST; direction++) + for (memberId = 0; memberId < MAX_RFU_PLAYERS; memberId++) { - GetUnionRoomPlayerFacingCoords(i, direction, &x, &y); + GetUnionRoomPlayerCoords(i, memberId, &x, &y); MapGridSetMetatileImpassabilityAt(x, y, FALSE); } } } -static u8 GetNewFacingDirectionForUnionRoomPlayer(u32 direction, u32 playerIdx, struct GFtgtGname * gname) +static u8 GetNewFacingDirectionForUnionRoomPlayer(u32 memberId, u32 leaderId, struct RfuGameData * gameData) { - if (direction != DIR_NONE) - return sNextFacingDirection[direction]; - else if (gname->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) + if (memberId) // If not leader + return sMemberFacingDirections[memberId]; + else if (gameData->activity == (ACTIVITY_CHAT | IN_UNION_ROOM)) return DIR_SOUTH; else return DIR_EAST; } -static bool32 IsUnionRoomPlayerInvisible(u32 playerIdx, u32 direction) +static bool32 IsUnionRoomPlayerInvisible(u32 leaderId, u32 memberId) { - return IsObjectEventSpriteInvisible(UR_PLAYER_SPRITE_ID(playerIdx, direction) - UR_SPRITE_START_ID); + return IsObjectEventSpriteInvisible(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID); } -static void SpawnGroupMember(u32 playerIdx, u32 direction, u8 graphicsId, struct GFtgtGname * gname) +static void SpawnGroupMember(u32 leaderId, u32 memberId, u8 graphicsId, struct RfuGameData * gameData) { s32 x, y; - s32 id = UR_PLAYER_SPRITE_ID(playerIdx, direction); - if (IsUnionRoomPlayerInvisible(playerIdx, direction) == TRUE) + s32 id = UR_PLAYER_SPRITE_ID(leaderId, memberId); + if (IsUnionRoomPlayerInvisible(leaderId, memberId) == TRUE) { SetObjectEventSpriteInvisibility(id - UR_SPRITE_START_ID, FALSE); SetObjectEventSpriteAnim(id - UR_SPRITE_START_ID, UNION_ROOM_SPAWN_IN); } SetObjectEventSpriteGraphics(id - UR_SPRITE_START_ID, graphicsId); - SetUnionRoomObjectFacingDirection(direction, playerIdx, GetNewFacingDirectionForUnionRoomPlayer(direction, playerIdx, gname)); - GetUnionRoomPlayerFacingCoords(playerIdx, direction, &x, &y); + SetUnionRoomObjectFacingDirection(memberId, leaderId, GetNewFacingDirectionForUnionRoomPlayer(memberId, leaderId, gameData)); + GetUnionRoomPlayerCoords(leaderId, memberId, &x, &y); MapGridSetMetatileImpassabilityAt(x, y, TRUE); } -static void DespawnGroupMember(u32 playerIdx, u32 direction) +static void DespawnGroupMember(u32 leaderId, u32 memberId) { s32 x, y; - SetObjectEventSpriteAnim(UR_PLAYER_SPRITE_ID(playerIdx, direction) - UR_SPRITE_START_ID, UNION_ROOM_SPAWN_OUT); - GetUnionRoomPlayerFacingCoords(playerIdx, direction, &x, &y); + SetObjectEventSpriteAnim(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID, UNION_ROOM_SPAWN_OUT); + GetUnionRoomPlayerCoords(leaderId, memberId, &x, &y); MapGridSetMetatileImpassabilityAt(x, y, FALSE); } -static void AssembleGroup(u32 playerIdx, struct GFtgtGname * gname) +static void AssembleGroup(u32 leaderId, struct RfuGameData * gameData) { s16 x, y, x2, y2; s32 i; PlayerGetDestCoords(&x, &y); player_get_pos_including_state_based_drift(&x2, &y2); - if (IsObjectEventSpriteInvisible(UR_PLAYER_SPRITE_ID(playerIdx, 0) - UR_SPRITE_START_ID) == TRUE) + if (IsObjectEventSpriteInvisible(UR_PLAYER_SPRITE_ID(leaderId, 0) - UR_SPRITE_START_ID) == TRUE) { - if (IsUnionRoomPlayerFacingTileAt(playerIdx, 0, x, y) == TRUE || IsUnionRoomPlayerFacingTileAt(playerIdx, 0, x2, y2) == TRUE) - { + if (IsUnionRoomPlayerAt(leaderId, 0, x, y) == TRUE || IsUnionRoomPlayerAt(leaderId, 0, x2, y2) == TRUE) return; - } - SpawnGroupMember(playerIdx, 0, GetUnionRoomPlayerGraphicsId(gname->playerGender, gname->unk_00.playerTrainerId[0]), gname); + SpawnGroupMember(leaderId, 0, GetUnionRoomPlayerGraphicsId(gameData->playerGender, gameData->compatibility.playerTrainerId[0]), gameData); } - for (i = 1; i < 5; i++) + for (i = 1; i < MAX_RFU_PLAYERS; i++) { - if (gname->child_sprite_gender[i - 1] == 0) + if (gameData->partnerInfo[i - 1] == 0) { - DespawnGroupMember(playerIdx, i); + DespawnGroupMember(leaderId, i); } - else if (IsUnionRoomPlayerFacingTileAt(playerIdx, i, x, y) == FALSE && IsUnionRoomPlayerFacingTileAt(playerIdx, i, x2, y2) == FALSE) + else if (IsUnionRoomPlayerAt(leaderId, i, x, y) == FALSE && IsUnionRoomPlayerAt(leaderId, i, x2, y2) == FALSE) { - SpawnGroupMember(playerIdx, i, GetUnionRoomPlayerGraphicsId((gname->child_sprite_gender[i - 1] >> 3) & 1, gname->child_sprite_gender[i - 1] & 7), gname); + SpawnGroupMember(leaderId, i, GetUnionRoomPlayerGraphicsId((gameData->partnerInfo[i - 1] >> PINFO_GENDER_SHIFT) & 1, + gameData->partnerInfo[i - 1] & PINFO_TID_MASK), + gameData); } } } -static void SpawnGroupLeaderAndMembers(u32 playerIdx, struct GFtgtGname * gname) +static void SpawnGroupLeaderAndMembers(u32 leaderId, struct RfuGameData * gameData) { u32 i; - switch (gname->activity) + switch (gameData->activity) { case ACTIVITY_NONE | IN_UNION_ROOM: case ACTIVITY_PLYRTALK | IN_UNION_ROOM: - SpawnGroupLeader(playerIdx, gname->playerGender, gname->unk_00.playerTrainerId[0]); - for (i = 0; i < 5; i++) - { - DespawnGroupMember(playerIdx, i); - } + SpawnGroupLeader(leaderId, gameData->playerGender, gameData->compatibility.playerTrainerId[0]); + for (i = 0; i < MAX_RFU_PLAYERS; i++) + DespawnGroupMember(leaderId, i); break; case ACTIVITY_BATTLE_SINGLE | IN_UNION_ROOM: case ACTIVITY_TRADE | IN_UNION_ROOM: @@ -528,37 +515,31 @@ static void SpawnGroupLeaderAndMembers(u32 playerIdx, struct GFtgtGname * gname) case ACTIVITY_ACCEPT | IN_UNION_ROOM: case ACTIVITY_DECLINE | IN_UNION_ROOM: case ACTIVITY_NPCTALK | IN_UNION_ROOM: - DespawnGroupLeader(playerIdx); - AssembleGroup(playerIdx, gname); + DespawnGroupLeader(leaderId); + AssembleGroup(leaderId, gameData); break; } } -static void DespawnGroupLeaderAndMembers(u32 r5, struct GFtgtGname *gname) +static void DespawnGroupLeaderAndMembers(u32 leaderId, struct RfuGameData *gameData) { s32 i; - DespawnGroupLeader(r5); - for (i = 0; i < 5; i++) - { - DespawnGroupMember(r5, i); - } + DespawnGroupLeader(leaderId); + for (i = 0; i < MAX_RFU_PLAYERS; i++) + DespawnGroupMember(leaderId, i); } static void UpdateUnionRoomPlayerSprites(struct WirelessLink_URoom *uroom) { s32 i; - struct UnkStruct_x20 * r4; + struct RfuPlayer * leaders; sUnionObjRefreshTimer = 0; - for (i = 0, r4 = uroom->field_0->arr; i < MAX_UNION_ROOM_PLAYERS; i++) + for (i = 0, leaders = uroom->playerList->players; i < MAX_UNION_ROOM_LEADERS; i++) { - if (r4[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN) - { - SpawnGroupLeaderAndMembers(i, &r4[i].gname_uname.gname); - } - else if (r4[i].groupScheduledAnim == UNION_ROOM_SPAWN_OUT) - { - DespawnGroupLeaderAndMembers(i, &r4[i].gname_uname.gname); - } + if (leaders[i].groupScheduledAnim == UNION_ROOM_SPAWN_IN) + SpawnGroupLeaderAndMembers(i, &leaders[i].rfu.data); + else if (leaders[i].groupScheduledAnim == UNION_ROOM_SPAWN_OUT) + DespawnGroupLeaderAndMembers(i, &leaders[i].rfu.data); } } @@ -570,64 +551,56 @@ void ScheduleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom) void HandleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom) { if (++sUnionObjRefreshTimer > 300) - { UpdateUnionRoomPlayerSprites(uroom); - } } -bool32 TryInteractWithUnionRoomMember(struct UnkStruct_Main0 *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds) +bool32 TryInteractWithUnionRoomMember(struct RfuPlayerList *list, s16 *memberIdPtr, s16 *leaderIdPtr, u8 *spriteIds) { s16 x, y; - s32 i, direction; - struct UnkStruct_x20 * r4; + s32 i, memberId; + struct RfuPlayer * leaders; if (!IsPlayerStandingStill()) - { return FALSE; - } + GetXYCoordsOneStepInFrontOfPlayer(&x, &y); - for (i = 0, r4 = main0->arr; i < MAX_UNION_ROOM_PLAYERS; i++) + for (i = 0, leaders = list->players; i < MAX_UNION_ROOM_LEADERS; i++) { - for (direction = DIR_NONE; direction <= DIR_EAST; direction++) + for (memberId = 0; memberId < MAX_RFU_PLAYERS; memberId++) { - s32 id = UR_PLAYER_SPRITE_ID(i, direction); - if (x != sUnionRoomPlayerCoords[i][0] + sFacingDirectionOffsets[direction][0] + 7) - { + s32 id = UR_PLAYER_SPRITE_ID(i, memberId); + + // Is the player in front of a group member position? + if (x != sUnionRoomPlayerCoords[i][0] + sUnionRoomGroupOffsets[memberId][0] + 7) continue; - } - if (y != sUnionRoomPlayerCoords[i][1] + sFacingDirectionOffsets[direction][1] + 7) - { + if (y != sUnionRoomPlayerCoords[i][1] + sUnionRoomGroupOffsets[memberId][1] + 7) continue; - } + + // Has a group member spawned at this position? if (IsObjectEventSpriteInvisible(id - UR_SPRITE_START_ID)) - { continue; - } if (IsObjectEventSpriteAnimating(id - UR_SPRITE_START_ID)) - { continue; - } - if (r4[i].groupScheduledAnim != UNION_ROOM_SPAWN_IN) - { + if (leaders[i].groupScheduledAnim != UNION_ROOM_SPAWN_IN) continue; - } - // Face player - SetUnionRoomObjectFacingDirection(direction, i, sOppositeFacingDirection[GetPlayerFacingDirection()]); - *directionPtr = direction; - *playerIdxPtr = i; + + // Interaction attempt successful, face player + SetUnionRoomObjectFacingDirection(memberId, i, sOppositeFacingDirection[GetPlayerFacingDirection()]); + *memberIdPtr = memberId; + *leaderIdPtr = i; return TRUE; } } return FALSE; } -static void SetUnionRoomObjectFacingDirection(s32 currDirection, s32 playerIdx, u8 newDirection) +static void SetUnionRoomObjectFacingDirection(s32 memberId, s32 leaderId, u8 newDirection) { - TurnObjectEventSprite(5 * playerIdx - UR_SPRITE_START_ID + currDirection, newDirection); + TurnObjectEventSprite(MAX_RFU_PLAYERS * leaderId - UR_SPRITE_START_ID + memberId, newDirection); // should be line below, but order is swapped here - // TurnObjectEventSprite(UR_PLAYER_SPRITE_ID(playerIdx, currDirection) - UR_SPRITE_START_ID, newDirection); + // TurnObjectEventSprite(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID, newDirection); } -void UpdateUnionRoomMemberFacing(u32 currDirection, u32 playerIdx, struct UnkStruct_Main0 *main0) +void UpdateUnionRoomMemberFacing(u32 memberId, u32 leaderId, struct RfuPlayerList *list) { - return SetUnionRoomObjectFacingDirection(currDirection, playerIdx, GetNewFacingDirectionForUnionRoomPlayer(currDirection, playerIdx, &main0->arr[playerIdx].gname_uname.gname)); + return SetUnionRoomObjectFacingDirection(memberId, leaderId, GetNewFacingDirectionForUnionRoomPlayer(memberId, leaderId, &list->players[leaderId].rfu.data)); } diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index dbc71d6345..1d15df32f9 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -114,8 +114,8 @@ static const u8 sActivityGroupInfo[][3] = { {ACTIVITY_BATTLE_DOUBLE, GROUPTYPE_BATTLE, 2}, {ACTIVITY_BATTLE_MULTI, GROUPTYPE_BATTLE, 4}, {ACTIVITY_TRADE, GROUPTYPE_TRADE, 2}, - {ACTIVITY_WONDER_CARD, GROUPTYPE_TOTAL, 2}, - {ACTIVITY_WONDER_NEWS, GROUPTYPE_TOTAL, 2}, + {ACTIVITY_WONDER_CARD_DUP, GROUPTYPE_TOTAL, 2}, + {ACTIVITY_WONDER_NEWS_DUP, GROUPTYPE_TOTAL, 2}, {ACTIVITY_POKEMON_JUMP, GROUPTYPE_TOTAL, 0}, {ACTIVITY_BERRY_CRUSH, GROUPTYPE_TOTAL, 0}, {ACTIVITY_BERRY_PICK, GROUPTYPE_TOTAL, 0}, @@ -132,8 +132,8 @@ static const u8 sActivityGroupInfo[][3] = { {ACTIVITY_NPCTALK | IN_UNION_ROOM, GROUPTYPE_UNION, 2}, {ACTIVITY_ACCEPT | IN_UNION_ROOM, GROUPTYPE_UNION, 1}, {ACTIVITY_DECLINE | IN_UNION_ROOM, GROUPTYPE_UNION, 1}, - {ACTIVITY_WONDER_CARD2, GROUPTYPE_TOTAL, 2}, - {ACTIVITY_WONDER_NEWS2, GROUPTYPE_TOTAL, 2}, + {ACTIVITY_WONDER_CARD, GROUPTYPE_TOTAL, 2}, + {ACTIVITY_WONDER_NEWS, GROUPTYPE_TOTAL, 2}, {ACTIVITY_CONTEST_COOL, GROUPTYPE_TOTAL, 0}, {ACTIVITY_CONTEST_BEAUTY, GROUPTYPE_TOTAL, 0}, {ACTIVITY_CONTEST_CUTE, GROUPTYPE_TOTAL, 0}, @@ -347,10 +347,10 @@ static void WCSS_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 * AddTextPrinterParameterized4(windowId, fontId, x, y, 0, 0, color, -1, str); } -static u32 CountPlayersInGroupAndGetActivity(struct UnkStruct_x20 * unk20, u32 * groupCounts) +static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer * player, u32 * groupCounts) { int i, j, k; - u32 activity = unk20->gname_uname.gname.activity; + u32 activity = player->rfu.data.activity; #define group_activity(i) (sActivityGroupInfo[(i)][0]) #define group_type(i) (sActivityGroupInfo[(i)][1]) @@ -358,15 +358,13 @@ static u32 CountPlayersInGroupAndGetActivity(struct UnkStruct_x20 * unk20, u32 * for (i = 0; i < ARRAY_COUNT(sActivityGroupInfo); i++) { - if (activity == group_activity(i) && unk20->groupScheduledAnim == UNION_ROOM_SPAWN_IN) + if (activity == group_activity(i) && player->groupScheduledAnim == UNION_ROOM_SPAWN_IN) { if (group_players(i) == 0) { k = 0; for (j = 0; j < RFU_CHILD_MAX; j++) - { - if (unk20->gname_uname.gname.child_sprite_gender[j] != 0) k++; - } + if (player->rfu.data.partnerInfo[j] != 0) k++; k++; groupCounts[group_type(i)] += k; } @@ -398,12 +396,12 @@ static bool32 UpdateCommunicationCounts(u32 * groupCounts, u32 * prevGroupCounts { bool32 activitiesChanged = FALSE; u32 groupCountBuffer[NUM_GROUPTYPES] = {0, 0, 0, 0}; - struct UnkStruct_x20 ** data = (void *)gTasks[taskId].data; + struct RfuPlayer ** players = (void *)gTasks[taskId].data; s32 i; for (i = 0; i < NUM_TASK_DATA; i++) { - u32 activity = CountPlayersInGroupAndGetActivity(&(*data)[i], groupCountBuffer); + u32 activity = CountPlayersInGroupAndGetActivity(&(*players)[i], groupCountBuffer); if (activity != activities[i]) { activities[i] = activity; From 846942ce48d650efd3d837493157ce462e568d78 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 7 Oct 2021 14:55:15 -0400 Subject: [PATCH 039/417] Finish remaining symbols in link_rfu_2 --- include/link.h | 2 +- include/link_rfu.h | 65 ++++--- src/berry_crush.c | 4 +- src/field_screen_effect.c | 2 +- src/link.c | 27 +-- src/link_rfu_2.c | 346 ++++++++++++++++++++------------------ src/union_room.c | 2 +- src/union_room_chat.c | 20 +-- 8 files changed, 248 insertions(+), 220 deletions(-) diff --git a/include/link.h b/include/link.h index 8dd2328d08..5b7ace5e1b 100644 --- a/include/link.h +++ b/include/link.h @@ -293,7 +293,7 @@ void SetBerryBlenderLinkCallback(void); void SetSuppressLinkErrorMessage(bool8 flag); void ConvertLinkPlayerName(struct LinkPlayer *linkPlayer); void ClearSavedLinkPlayers(void); -void BufferLinkErrorInfo(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, bool8 disconnected); +void SetLinkErrorBuffer(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, bool8 disconnected); void LocalLinkPlayerToBlock(void); void LinkPlayerFromBlock(u32 who); bool32 Link_AnyPartnersPlayingFRLG_JP(void); diff --git a/include/link_rfu.h b/include/link_rfu.h index eb071618ea..6ca06349a4 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -68,6 +68,21 @@ enum { RFU_ERROR_STATE_IGNORE, }; +// These error flags are set in errorInfo, and given as +// the uppermost 16 bits of 'status' for sLinkErrorBuffer. +// The first 8 bits are reserved for the link manager msg +// when the error occurred, and the last 8 bits are this +// sequence of presumably meaningful error flags, but +// ultimately sLinkErrorBuffer's status is never read. +#define F_RFU_ERROR_1 (1 << 8) +#define F_RFU_ERROR_2 (1 << 9) // Never set +#define F_RFU_ERROR_3 (1 << 10) // Never set +#define F_RFU_ERROR_4 (1 << 11) // Never set +#define F_RFU_ERROR_5 (1 << 12) +#define F_RFU_ERROR_6 (1 << 13) +#define F_RFU_ERROR_7 (1 << 14) +#define F_RFU_ERROR_8 (1 << 15) + struct RfuGameCompatibilityData { u16 language:4; @@ -157,14 +172,14 @@ struct RfuManager { /* 0x000 */ void (*callback)(void); /* 0x004 */ u16 state; - /* 0x006 */ u8 filler_06[4]; - /* 0x00a */ u16 linkmanMsg; + /* 0x006 */ u8 unused1[4]; + /* 0x00a */ u16 errorInfo; /* 0x00c */ u8 parentChild; /* 0x00d */ u8 playerCount; - /* 0x00e */ bool8 unk_0e; - /* 0x00f */ u8 unk_0f; - /* 0x010 */ u16 unk_10; - /* 0x012 */ u16 unk_12; + /* 0x00e */ bool8 runParentMain2; + /* 0x00f */ u8 unused2; + /* 0x010 */ u16 errorParam0; + /* 0x012 */ u16 errorParam1; /* 0x014 */ u8 childRecvBuffer[RFU_CHILD_MAX][CHILD_DATA_LENGTH]; /* 0x04c */ u8 childSendBuffer[CHILD_DATA_LENGTH]; /* 0x05a */ u8 blockRequestType; @@ -173,7 +188,7 @@ struct RfuManager /* 0x061 */ bool8 numBlocksReceived[MAX_RFU_PLAYERS]; /* 0x066 */ u8 idleTaskId; /* 0x067 */ u8 searchTaskId; - /* 0x068 */ u8 filler_68[4]; + /* 0x068 */ u8 unused3[4]; /* 0x06c */ struct RfuBlockSend sendBlock; /* 0x080 */ struct RfuBlockSend recvBlock[MAX_RFU_PLAYERS]; /* 0x0e4 */ bool8 readyCloseLink[MAX_RFU_PLAYERS]; @@ -185,8 +200,8 @@ struct RfuManager /* 0x0f2 */ u16 packet[RFU_PACKET_SIZE]; /* 0x0fe */ u16 resendExitStandbyTimer; /* 0x100 */ u16 allReadyNum; - /* 0x102 */ u8 unk_102; - /* 0x103 */ u8 filler_103[7]; + /* 0x102 */ u8 childSendCmdId; + /* 0x103 */ u8 unused4[7]; /* 0x10A */ struct RfuGameData parent; u8 filler_; u8 parentName[RFU_USER_NAME_LENGTH]; @@ -194,12 +209,12 @@ struct RfuManager /* 0x9e8 */ struct RfuSendQueue sendQueue; /* 0xc1c */ struct RfuBackupQueue backupQueue; /* 0xc3c */ vu8 linkRecovered; - /* 0xc3d */ u8 unk_c3d; + /* 0xc3d */ u8 reconnectParentId; /* 0xc3e */ vu8 childSlot; - /* 0xc3f */ u8 unk_c3f[70]; + /* 0xc3f */ u8 childRecvQueue[RECV_QUEUE_SLOT_LENGTH]; /* 0xc85 */ u8 leaveGroupStatus; - /* 0xc86 */ u8 recvStatus; - /* 0xc87 */ u8 recvCmds[5][7][2]; + /* 0xc86 */ u8 childRecvStatus; + /* 0xc87 */ u8 recvCmds[MAX_RFU_PLAYERS][CMD_LENGTH - 1][2]; /* 0xccd */ u8 parentId; /* 0xcce */ u8 multiplayerId; /* 0xccf */ u8 connectParentFailures; @@ -207,21 +222,21 @@ struct RfuManager /* 0xcd1 */ u8 partnerSendStatuses[RFU_CHILD_MAX]; /* 0xcd5 */ u8 partnerRecvStatuses[RFU_CHILD_MAX]; /* 0xcd9 */ bool8 stopNewConnections; - /* 0xcda */ u8 unk_cda; - /* 0xcdb */ vbool8 unk_cdb; - /* 0xcdc */ vbool8 unk_cdc; - /* 0xcdd */ u8 unk_cdd; + /* 0xcda */ u8 parentSendSlot; + /* 0xcdb */ vbool8 parentFinished; + /* 0xcdc */ vbool8 parentMain2Failed; + /* 0xcdd */ u8 unused5; /* 0xcde */ u8 linkPlayerIdx[RFU_CHILD_MAX]; - /* 0xce2 */ u8 unk_ce2; + /* 0xce2 */ u8 parentSlots; /* 0xce2 */ u8 disconnectSlots; /* 0xce4 */ u8 disconnectMode; /* 0xce5 */ u8 nextChildBits; /* 0xce5 */ u8 newChildQueue; /* 0xce7 */ u8 acceptSlot_flag; - /* 0xce8 */ bool8 unk_ce8; + /* 0xce8 */ bool8 playerExchangeActive; /* 0xce9 */ u8 incomingChild; - /* 0xcea */ u8 unk_cea[4]; - /* 0xcee */ u8 unk_cee[4]; + /* 0xcea */ u8 numChildRecvErrors[RFU_CHILD_MAX]; + /* 0xcee */ u8 childRecvIds[RFU_CHILD_MAX]; }; // size = 0xcf4 extern struct RfuGameData gHostRfuGameData; @@ -260,8 +275,8 @@ void RfuSetIgnoreError(bool32 enable); u8 RfuGetStatus(void); struct RfuGameData *GetHostRfuGameData(void); void UpdateGameData_GroupLockedIn(u8 startedActivity); -void GetLinkmanErrorParams(u32 msg); -void RfuSetStatus(u8 status, u16 msg); +void RfuSetErrorParams(u32 errorInfo); +void RfuSetStatus(u8 status, u16 errorInfo); u8 Rfu_SetLinkRecovery(bool32 enable); void CopyHostRfuGameDataAndUsername(struct RfuGameData *buff1, u8 *buff2); void SetHostRfuGameData(u8 activity, u32 partnerInfo, bool32 startedActivity); @@ -293,7 +308,7 @@ void Rfu_SendPacket(void *data); bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name); void Rfu_DisconnectPlayerById(u32 playerIdx); u8 GetLinkPlayerInfoFlags(s32 playerId); -void sub_800EF7C(void); +void StopUnionRoomLinkManager(void); bool8 Rfu_GetCompatiblePlayerData(struct RfuGameData *player, u8 *username, u8 idx); bool8 Rfu_GetWonderDistributorPlayerData(struct RfuGameData *player, u8 *username, u8 idx); s32 Rfu_GetIndexOfNewestChild(u8 bits); @@ -301,7 +316,7 @@ void CreateTask_RfuIdle(void); void DestroyTask_RfuIdle(void); void ClearRecvCommands(void); void LinkRfu_FatalError(void); -bool32 sub_8011A9C(void); +bool32 Rfu_IsPlayerExchangeActive(void); void Rfu_StopPartnerSearch(void); void RfuSetNormalDisconnectMode(void); void SetUnionRoomChatPlayerData(u32 numPlayers); diff --git a/src/berry_crush.c b/src/berry_crush.c index a9818016e9..3a9adfcd08 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -987,8 +987,8 @@ static u32 QuitBerryCrush(MainCallback exitCallback) #define ERROR_EXIT(exitCallback) \ { \ SetMainCallback2(exitCallback); \ - gRfu.unk_10 = 0; \ - gRfu.unk_12 = 0; \ + gRfu.errorParam0 = 0; \ + gRfu.errorParam1 = 0; \ gRfu.errorState = RFU_ERROR_STATE_1; \ } diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index fbe725c0b1..65611c0f16 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -204,7 +204,7 @@ static void Task_ReturnToFieldWirelessLink(u8 taskId) if (!IsLinkTaskFinished()) { if (++task->data[1] > 1800) - GetLinkmanErrorParams(0x6000); + RfuSetErrorParams(F_RFU_ERROR_6 | F_RFU_ERROR_7); } else { diff --git a/src/link.c b/src/link.c index 6e9d015597..1f06eef665 100644 --- a/src/link.c +++ b/src/link.c @@ -108,7 +108,7 @@ static EWRAM_DATA u16 sTimeOutCounter = 0; EWRAM_DATA struct LinkPlayer gLocalLinkPlayer = {}; EWRAM_DATA struct LinkPlayer gLinkPlayers[MAX_RFU_PLAYERS] = {}; static EWRAM_DATA struct LinkPlayer sSavedLinkPlayers[MAX_RFU_PLAYERS] = {}; -EWRAM_DATA struct { +static EWRAM_DATA struct { u32 status; u8 lastRecvQueueCount; u8 lastSendQueueCount; @@ -140,7 +140,7 @@ static void LinkCB_WaitCloseLinkWithJP(void); static void LinkCB_Standby(void); static void LinkCB_StandbyForAll(void); -static void CheckErrorStatus(void); +static void TrySetLinkErrorBuffer(void); static void CB2_PrintErrorMessage(void); static bool8 IsSioMultiMaster(void); static void SetWirelessCommType0_Internal(void); @@ -394,9 +394,7 @@ void CloseLink(void) { gReceivedRemoteLinkPlayers = FALSE; if (gWirelessCommType) - { LinkRfu_Shutdown(); - } sLinkOpen = FALSE; DisableSerial(); } @@ -496,7 +494,7 @@ u16 LinkMain2(const u16 *heldKeys) ProcessRecvCmds(SIO_MULTI_CNT->id); if (gLinkCallback != NULL) gLinkCallback(); - CheckErrorStatus(); + TrySetLinkErrorBuffer(); } return gLinkStatus; } @@ -1559,10 +1557,13 @@ static void LinkCB_StandbyForAll(void) } } -static void CheckErrorStatus(void) +static void TrySetLinkErrorBuffer(void) { + // Check if a link error has occurred if (sLinkOpen && EXTRACT_LINK_ERRORS(gLinkStatus)) { + // Link error has occurred, handle message details if + // necessary, then stop the link. if (!gSuppressLinkErrorMessage) { sLinkErrorBuffer.status = gLinkStatus; @@ -1575,7 +1576,7 @@ static void CheckErrorStatus(void) } } -void BufferLinkErrorInfo(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, bool8 disconnected) +void SetLinkErrorBuffer(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, bool8 disconnected) { sLinkErrorBuffer.status = status; sLinkErrorBuffer.lastSendQueueCount = lastSendQueueCount; @@ -1778,10 +1779,10 @@ void LinkPlayerFromBlock(u32 who) SetMainCallback2(CB2_LinkError); } +// When this function returns TRUE the callbacks are skipped bool8 HandleLinkConnection(void) { - bool32 r4; - bool32 r5; + bool32 main1Failed, main2Failed; if (gWirelessCommType == 0) { @@ -1792,11 +1793,13 @@ bool8 HandleLinkConnection(void) } else { - r4 = RfuMain1(); - r5 = RfuMain2(); + main1Failed = RfuMain1(); // Always returns FALSE + main2Failed = RfuMain2(); if (IsSendingKeysOverCable() == TRUE) { - if (r4 == TRUE || IsRfuRecvQueueEmpty() || r5) + // This will never be reached. + // IsSendingKeysOverCable is always FALSE for wireless communication + if (main1Failed == TRUE || IsRfuRecvQueueEmpty() || main2Failed) return TRUE; } } diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index a080630c10..ceab901aa4 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -33,11 +33,12 @@ enum { RFUSTATE_CHILD_TRY_JOIN, RFUSTATE_CHILD_JOINED, RFUSTATE_UR_PLAYER_EXCHANGE, - RFUSTATE_14, - RFUSTATE_15, + RFUSTATE_UR_STOP_MANAGER, + RFUSTATE_UR_STOP_MANAGER_END, RFUSTATE_UR_FINALIZE, }; -// These states are re-used for different purposes +// These states are used for different purposes +// depending on the link mode (parent, child, union room) #define RFUSTATE_17 17 #define RFUSTATE_PARENT_RECONNECT 18 @@ -67,16 +68,16 @@ struct SioInfo // its fields was largely removed before release struct RfuDebug { - u8 filler0[6]; - u16 unk_06; - u8 filler1[6]; - vu8 unk_0e; + u8 unused0[6]; + u16 recvCount; + u8 unused1[6]; + vu8 unkFlag; u8 childJoinCount; - u8 filler2[84]; + u8 unused2[84]; u16 blockSendFailures; - u8 filler3[29]; + u8 unused3[29]; u8 blockSendTime; - u8 filler4[88]; + u8 unused4[88]; }; u32 gRfuAPIBuffer[RFU_API_BUFF_SIZE_RAM / 4]; @@ -93,9 +94,9 @@ static EWRAM_DATA struct RfuDebug sRfuDebug = {}; static void ResetSendDataManager(struct RfuBlockSend *); static void InitChildRecvBuffers(void); -static void sub_800EAFC(void); -static void LinkManagerCB_MSC(u16); -static void sub_800EDBC(u16); +static void InitParentSendData(void); +static void MSCCallback_Child(u16); +static void MSCCallback_Parent(u16); static void UpdateBackupQueue(void); static void Task_PlayerExchange(u8); static void Task_PlayerExchangeUpdate(u8); @@ -111,7 +112,7 @@ static void UpdateChildStatuses(void); static s32 GetJoinGroupStatus(void); static void ClearSelectedLinkPlayerIds(u16); static void ValidateAndReceivePokemonSioInfo(void *); -static void sub_80115EC(s32); +static void ParentResetChildRecvMetadata(s32); static void CB2_RfuIdle(void); static void RfuReqDisconnectSlot(u32); static void SendDisconnectCommand(u32, u32); @@ -170,7 +171,7 @@ static const u32 sAllBlocksReceived[] = { }; #undef BLOCK_MASK -static const u8 sUnknown_082ED68C[] = { +static const u8 sSlotToLinkPlayerTableId[] = { 0, 0, 1, 1, 2, 2, 2, 2, 3 @@ -366,10 +367,10 @@ static void Task_ParentSearchForChildren(u8 taskId) case RFUSTATE_STOP_MANAGER_END: break; case RFUSTATE_PARENT_FINALIZE: - gRfu.unk_cdb = FALSE; - rfu_LMAN_setMSCCallback(sub_800EDBC); + gRfu.parentFinished = FALSE; + rfu_LMAN_setMSCCallback(MSCCallback_Parent); InitChildRecvBuffers(); - sub_800EAFC(); + InitParentSendData(); gRfu.state = RFUSTATE_FINALIZED; gTasks[taskId].data[1] = 8; CreateTask(Task_PlayerExchange, 5); @@ -383,40 +384,47 @@ s32 Rfu_GetIndexOfNewestChild(u8 bits) return sPlayerBitsToNewChildIdx[bits]; } -void sub_800E88C(s32 r2, s32 r5) +static void SetLinkPlayerIdsFromSlots(s32 baseSlots, s32 addSlots) { u8 i; - u8 r4 = 1; - s32 r1 = r2; - s32 r6 = 0; - if (r5 == -1) + u8 baseId = 1; + s32 baseSlotsCopy = baseSlots; + s32 newId = 0; + if (addSlots == -1) { - for (i = 0; i < RFU_CHILD_MAX; r2 >>= 1, i++) + // Initialize + for (i = 0; i < RFU_CHILD_MAX; baseSlots >>= 1, i++) { - if (r2 & 1) + if (baseSlots & 1) { - gRfu.linkPlayerIdx[i] = r4; - r4++; + gRfu.linkPlayerIdx[i] = baseId; + baseId++; } } } else { - for (i = 0; i < RFU_CHILD_MAX; r1 >>= 1, i++) + // Clear id for any empty slot + for (i = 0; i < RFU_CHILD_MAX; baseSlotsCopy >>= 1, i++) { - if (!(r1 & 1)) + if (!(baseSlotsCopy & 1)) gRfu.linkPlayerIdx[i] = 0; } - for (r4 = RFU_CHILD_MAX; r4 != 0; r4--) + + // Get starting id by checking existing slots + for (baseId = RFU_CHILD_MAX; baseId != 0; baseId--) { - for (i = 0; i < RFU_CHILD_MAX && gRfu.linkPlayerIdx[i] != r4; i++); + for (i = 0; i < RFU_CHILD_MAX && gRfu.linkPlayerIdx[i] != baseId; i++) + ; if (i == RFU_CHILD_MAX) - r6 = r4; + newId = baseId; } - for (r5 &= ~r2, i = 0; i < RFU_CHILD_MAX; r5 >>= 1, i++) + + // Set id for new slots + for (addSlots &= ~baseSlots, i = 0; i < RFU_CHILD_MAX; addSlots >>= 1, i++) { - if (r5 & 1) - gRfu.linkPlayerIdx[i] = r6++; + if (addSlots & 1) + gRfu.linkPlayerIdx[i] = newId++; } } } @@ -460,7 +468,7 @@ static void Task_ChildSearchForParent(u8 taskId) { u8 bmChildSlot = 1 << gRfu.childSlot; rfu_clearSlot(TYPE_NI_SEND | TYPE_NI_RECV, gRfu.childSlot); - rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.unk_c3f, sizeof(gRfu.unk_c3f)); + rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.childRecvQueue, sizeof(gRfu.childRecvQueue)); rfu_UNI_setSendData(bmChildSlot, gRfu.childSendBuffer, sizeof(gRfu.childSendBuffer)); gTasks[taskId].data[1] = 8; DestroyTask(taskId); @@ -490,13 +498,13 @@ static void InitChildRecvBuffers(void) } } -static void sub_800EAFC(void) +static void InitParentSendData(void) { u8 acceptSlot = lman.acceptSlot_flag; - rfu_UNI_setSendData(acceptSlot, gRfu.recvCmds, 70); - gRfu.unk_cda = Rfu_GetIndexOfNewestChild(acceptSlot); - gRfu.unk_ce2 = acceptSlot; - sub_800E88C(acceptSlot, -1); + rfu_UNI_setSendData(acceptSlot, gRfu.recvCmds, sizeof(gRfu.recvCmds)); + gRfu.parentSendSlot = Rfu_GetIndexOfNewestChild(acceptSlot); + gRfu.parentSlots = acceptSlot; + SetLinkPlayerIdsFromSlots(acceptSlot, -1); gRfu.parentChild = MODE_PARENT; } @@ -521,7 +529,7 @@ static void Task_UnionRoomListen(u8 taskId) break; case RFUSTATE_UR_CONNECT: rfu_LMAN_establishConnection(MODE_P_C_SWITCH, 0, 240, (u16 *)sAcceptedSerialNos); - rfu_LMAN_setMSCCallback(LinkManagerCB_MSC); + rfu_LMAN_setMSCCallback(MSCCallback_Child); gRfu.state = RFUSTATE_UR_CONNECT_END; break; case RFUSTATE_UR_CONNECT_END: @@ -537,23 +545,23 @@ static void Task_UnionRoomListen(u8 taskId) CreateTask(Task_PlayerExchange, 5); } break; - case RFUSTATE_14: - rfu_LMAN_stopManager(0); - gRfu.state = RFUSTATE_15; + case RFUSTATE_UR_STOP_MANAGER: + rfu_LMAN_stopManager(FALSE); + gRfu.state = RFUSTATE_UR_STOP_MANAGER_END; break; - case RFUSTATE_15: + case RFUSTATE_UR_STOP_MANAGER_END: break; case RFUSTATE_UR_FINALIZE: - gRfu.unk_cdb = FALSE; - rfu_LMAN_setMSCCallback(sub_800EDBC); + gRfu.parentFinished = FALSE; + rfu_LMAN_setMSCCallback(MSCCallback_Parent); UpdateGameData_GroupLockedIn(TRUE); InitChildRecvBuffers(); - sub_800EAFC(); + InitParentSendData(); gRfu.state = RFUSTATE_FINALIZED; gTasks[taskId].data[1] = 8; gRfu.parentChild = MODE_PARENT; CreateTask(Task_PlayerExchange, 5); - gRfu.unk_ce8 = TRUE; + gRfu.playerExchangeActive = TRUE; DestroyTask(taskId); break; } @@ -569,7 +577,8 @@ void LinkRfu_StopManagerBeforeEnteringChat(void) rfu_LMAN_stopManager(FALSE); } -static void LinkManagerCB_MSC(u16 unused) +// Argument is provided by the RFU and is unused. +static void MSCCallback_Child(u16 REQ_commandID) { s32 i; @@ -581,8 +590,8 @@ static void LinkManagerCB_MSC(u16 unused) if (gRfuSlotStatusUNI[gRfu.childSlot]->recv.newDataFlag) { gRfu.childSendCount++; - RfuRecvQueue_Enqueue(&gRfu.recvQueue, gRfu.unk_c3f); - sRfuDebug.unk_06++; + RfuRecvQueue_Enqueue(&gRfu.recvQueue, gRfu.childRecvQueue); + sRfuDebug.recvCount++; UpdateBackupQueue(); rfu_UNI_readySendData(gRfu.childSlot); rfu_UNI_clearRecvNewDataFlag(gRfu.childSlot); @@ -590,9 +599,10 @@ static void LinkManagerCB_MSC(u16 unused) rfu_LMAN_REQ_sendData(TRUE); } -static void sub_800EDBC(u16 unused) +// Argument is provided by the RFU and is unused. +static void MSCCallback_Parent(u16 REQ_commandID) { - gRfu.unk_cdb = TRUE; + gRfu.parentFinished = TRUE; } void LinkRfu_Shutdown(void) @@ -651,7 +661,7 @@ static bool8 CanTryReconnectParent(void) static bool32 TryReconnectParent(void) { - if (gRfu.state == RFUSTATE_CHILD_CONNECT_END && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[gRfu.unk_c3d].id, 240)) + if (gRfu.state == RFUSTATE_CHILD_CONNECT_END && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[gRfu.reconnectParentId].id, 240)) { gRfu.state = RFUSTATE_RECONNECTED; return TRUE; @@ -687,9 +697,9 @@ bool32 WaitRfuState(bool32 force) return FALSE; } -void sub_800EF7C(void) +void StopUnionRoomLinkManager(void) { - gRfu.state = RFUSTATE_14; + gRfu.state = RFUSTATE_UR_STOP_MANAGER; } // Unused @@ -708,7 +718,7 @@ static void ReadySendDataForSlots(u8 slots) } } -static void sub_800EFB0(void) +static void ReadAllPlayerRecvCmds(void) { s32 i, j; @@ -779,10 +789,10 @@ static bool32 RfuMain1_Parent(void) } else { - gRfu.unk_cdb = FALSE; - if ((gRfu.unk_ce2 & gRfuLinkStatus->connSlotFlag) == gRfu.unk_ce2 && (gRfu.unk_ce2 & gRfuLinkStatus->connSlotFlag)) + gRfu.parentFinished = FALSE; + if ((gRfu.parentSlots & gRfuLinkStatus->connSlotFlag) == gRfu.parentSlots && (gRfu.parentSlots & gRfuLinkStatus->connSlotFlag)) { - if (!gRfu.unk_cdc) + if (!gRfu.parentMain2Failed) { if (gRfu.disconnectSlots) { @@ -790,8 +800,8 @@ static bool32 RfuMain1_Parent(void) gRfu.disconnectSlots = 0; if (gRfu.disconnectMode == RFU_DISCONNECT_ERROR) { - RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x8000); - GetLinkmanErrorParams(0x8000); + RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, F_RFU_ERROR_8); + RfuSetErrorParams(F_RFU_ERROR_8); return FALSE; } if (!lman.acceptSlot_flag) @@ -801,15 +811,15 @@ static bool32 RfuMain1_Parent(void) return FALSE; } } - sub_800EFB0(); - rfu_UNI_readySendData(gRfu.unk_cda); + ReadAllPlayerRecvCmds(); + rfu_UNI_readySendData(gRfu.parentSendSlot); rfu_LMAN_REQ_sendData(TRUE); } else { rfu_REQ_PARENT_resumeRetransmitAndChange(); } - gRfu.unk_0e = TRUE; + gRfu.runParentMain2 = TRUE; } } return FALSE; @@ -821,22 +831,22 @@ static bool32 RfuMain2_Parent(void) u16 flags; u8 r0; u16 j; - u8 retval; + bool8 failed; - if (gRfu.state >= RFUSTATE_FINALIZED && gRfu.unk_0e == TRUE) + if (gRfu.state >= RFUSTATE_FINALIZED && gRfu.runParentMain2 == TRUE) { rfu_waitREQComplete(); - while (gRfu.unk_cdb == FALSE) + while (gRfu.parentFinished == FALSE) { if (gRfu.errorState != RFU_ERROR_STATE_NONE) return FALSE; } rfu_REQ_recvData(); rfu_waitREQComplete(); - if ((lman.parentAck_flag & gRfu.unk_ce2) == gRfu.unk_ce2) + if ((lman.parentAck_flag & gRfu.parentSlots) == gRfu.parentSlots) { - gRfu.unk_cdc = FALSE; - sRfuDebug.unk_06++; + gRfu.parentMain2Failed = FALSE; + sRfuDebug.recvCount++; flags = lman.acceptSlot_flag; for (i = 0; i < RFU_CHILD_MAX; i++) { @@ -844,15 +854,15 @@ static bool32 RfuMain2_Parent(void) { if (gRfu.childRecvBuffer[i][1]) { - if (gRfu.unk_cee[i] != 0xFF && (gRfu.childRecvBuffer[i][0] >> 5) != ((gRfu.unk_cee[i] + 1) & 7)) + if (gRfu.childRecvIds[i] != 0xFF && (gRfu.childRecvBuffer[i][0] >> 5) != ((gRfu.childRecvIds[i] + 1) & 7)) { - if (++gRfu.unk_cea[i] > 4) - GetLinkmanErrorParams(0x8000 | 0x100); + if (++gRfu.numChildRecvErrors[i] > 4) + RfuSetErrorParams(F_RFU_ERROR_8 | F_RFU_ERROR_1); } else { - gRfu.unk_cee[i] = gRfu.childRecvBuffer[i][0] / 32; - gRfu.unk_cea[i] = 0; + gRfu.childRecvIds[i] = gRfu.childRecvBuffer[i][0] / 32; + gRfu.numChildRecvErrors[i] = 0; gRfu.childRecvBuffer[i][0] &= 0x1f; r0 = gRfu.linkPlayerIdx[i]; for (j = 0; j < CMD_LENGTH - 1; j++) @@ -872,51 +882,51 @@ static bool32 RfuMain2_Parent(void) CallRfuFunc(); if (gRfu.nextChildBits && !gRfu.stopNewConnections) { - sRfuDebug.unk_0e = FALSE; - rfu_clearSlot(TYPE_UNI_SEND | TYPE_UNI_RECV, gRfu.unk_cda); + sRfuDebug.unkFlag = FALSE; + rfu_clearSlot(TYPE_UNI_SEND | TYPE_UNI_RECV, gRfu.parentSendSlot); for (i = 0; i < RFU_CHILD_MAX; i++) { if ((gRfu.nextChildBits >> i) & 1) rfu_setRecvBuffer(TYPE_UNI, i, gRfu.childRecvBuffer[i], sizeof(gRfu.childRecvBuffer[0])); } - sub_800E88C(gRfu.unk_ce2, gRfu.unk_ce2 | gRfu.nextChildBits); + SetLinkPlayerIdsFromSlots(gRfu.parentSlots, gRfu.parentSlots | gRfu.nextChildBits); gRfu.incomingChild = gRfu.nextChildBits; - gRfu.unk_ce2 |= gRfu.nextChildBits; + gRfu.parentSlots |= gRfu.nextChildBits; gRfu.nextChildBits = 0; - rfu_UNI_setSendData(gRfu.unk_ce2, gRfu.recvCmds, 70); - gRfu.unk_cda = Rfu_GetIndexOfNewestChild(gRfu.unk_ce2); + rfu_UNI_setSendData(gRfu.parentSlots, gRfu.recvCmds, sizeof(gRfu.recvCmds)); + gRfu.parentSendSlot = Rfu_GetIndexOfNewestChild(gRfu.parentSlots); CreateTask(Task_PlayerExchangeUpdate, 0); } } else { - gRfu.unk_cdc = TRUE; - gRfu.unk_0e = FALSE; + gRfu.parentMain2Failed = TRUE; + gRfu.runParentMain2 = FALSE; } - gRfu.unk_0e = FALSE; + gRfu.runParentMain2 = FALSE; } - retval = gRfu.unk_cdc; - return gRfuLinkStatus->sendSlotUNIFlag ? retval & 1 : FALSE; + failed = gRfu.parentMain2Failed; + return gRfuLinkStatus->sendSlotUNIFlag ? failed & 1 : FALSE; } -static void sub_800F498(u16 *sendCmd, u8 *buffer) +static void ChildBuildSendCmd(u16 *sendCmd, u8 *dst) { s32 i; if (sendCmd[0]) { - sendCmd[0] |= (gRfu.unk_102 << 5); - gRfu.unk_102 = (gRfu.unk_102 + 1) & 7; + sendCmd[0] |= (gRfu.childSendCmdId << 5); + gRfu.childSendCmdId = (gRfu.childSendCmdId + 1) & 7; for (i = 0; i < CMD_LENGTH - 1; i++) { - buffer[2 * i + 1] = sendCmd[i] >> 8; - buffer[2 * i + 0] = sendCmd[i]; + dst[2 * i + 1] = sendCmd[i] >> 8; + dst[2 * i + 0] = sendCmd[i]; } } else { for (i = 0; i < SEND_QUEUE_SLOT_LENGTH; i++) - buffer[i] = 0; + dst[i] = 0; } } @@ -942,14 +952,14 @@ static bool32 RfuMain1_Child(void) rfu_waitREQComplete(); status = RfuGetStatus(); if (status != RFU_STATUS_FATAL_ERROR && status != RFU_STATUS_JOIN_GROUP_NO && status != RFU_STATUS_LEAVE_GROUP) - RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x9000); + RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, F_RFU_ERROR_5 | F_RFU_ERROR_8); rfu_clearAllSlot(); gReceivedRemoteLinkPlayers = FALSE; gRfu.callback = NULL; if (gRfu.disconnectMode == RFU_DISCONNECT_ERROR) { - RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x9000); - GetLinkmanErrorParams(0x9000); + RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, F_RFU_ERROR_5 | F_RFU_ERROR_8); + RfuSetErrorParams(F_RFU_ERROR_5 | F_RFU_ERROR_8); } lman.state = lman.next_state = 0; gRfu.disconnectMode = RFU_DISCONNECT_NONE; @@ -958,7 +968,7 @@ static bool32 RfuMain1_Child(void) { gRfu.childSendCount--; CallRfuFunc(); - sub_800F498(gSendCmd, send); + ChildBuildSendCmd(gSendCmd, send); RfuSendQueue_Enqueue(&gRfu.sendQueue, send); for (i = 0; i < CMD_LENGTH - 1; i++) gSendCmd[i] = 0; @@ -1241,7 +1251,7 @@ static void RfuPrepareSendBuffer(u16 command) break; case RFUCMD_SEND_PLAYER_IDS: case RFUCMD_SEND_PLAYER_IDS_NEW: - tmp = gRfu.unk_ce2 ^ gRfu.disconnectSlots; + tmp = gRfu.parentSlots ^ gRfu.disconnectSlots; gRfu.playerCount = sPlayerBitsToCount[tmp] + 1; gSendCmd[1] = gRfu.playerCount; buff = (u8 *)&gSendCmd[2]; @@ -1445,7 +1455,7 @@ static void WaitAllReadyToCloseLink(void) static void SendReadyCloseLink(void) { - if (gSendCmd[0] == 0 && !gRfu.unk_ce8) + if (gSendCmd[0] == 0 && !gRfu.playerExchangeActive) { RfuPrepareSendBuffer(RFUCMD_READY_CLOSE_LINK); gRfu.callback = WaitAllReadyToCloseLink; @@ -1729,8 +1739,8 @@ static s32 GetJoinGroupStatus(void) || gRfuSlotStatusNI[gRfu.childSlot]->recv.state == SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN) { rfu_clearSlot(TYPE_NI_RECV, gRfu.childSlot); - RfuSetStatus(gRfu.recvStatus, 0); - status = gRfu.recvStatus; + RfuSetStatus(gRfu.childRecvStatus, 0); + status = gRfu.childRecvStatus; } else if (gRfuSlotStatusNI[gRfu.childSlot]->recv.state == SLOT_STATE_RECV_FAILED) { @@ -1748,7 +1758,7 @@ static void Task_PlayerExchange(u8 taskId) if (gRfu.status == RFU_STATUS_FATAL_ERROR || gRfu.status == RFU_STATUS_CONNECTION_ERROR) { - gRfu.unk_ce8 = FALSE; + gRfu.playerExchangeActive = FALSE; DestroyTask(taskId); } switch (gTasks[taskId].tState) @@ -1809,7 +1819,7 @@ static void Task_PlayerExchange(u8 taskId) case 6: DestroyTask(taskId); gReceivedRemoteLinkPlayers = TRUE; - gRfu.unk_ce8 = FALSE; + gRfu.playerExchangeActive = FALSE; rfu_LMAN_setLinkRecovery(1, 600); if (gRfu.newChildQueue) { @@ -1866,10 +1876,10 @@ static void Task_PlayerExchangeUpdate(u8 taskId) s32 i; struct LinkPlayerBlock *playerBlock; struct SioInfo *sio; - u8 playerId = gRfu.linkPlayerIdx[sUnknown_082ED68C[gRfu.incomingChild]]; + u8 playerId = gRfu.linkPlayerIdx[sSlotToLinkPlayerTableId[gRfu.incomingChild]]; if (gRfu.status == RFU_STATUS_FATAL_ERROR || gRfu.status == RFU_STATUS_CONNECTION_ERROR) { - gRfu.unk_ce8 = FALSE; + gRfu.playerExchangeActive = FALSE; DestroyTask(taskId); } switch (gTasks[taskId].tState) @@ -1919,7 +1929,7 @@ static void Task_PlayerExchangeUpdate(u8 taskId) { CpuFill16(0, gBlockRecvBuffer, sizeof(struct SioInfo)); ResetBlockReceivedFlag(0); - gRfu.unk_ce8 = FALSE; + gRfu.playerExchangeActive = FALSE; if (gRfu.newChildQueue) { for (i = 0; i < RFU_CHILD_MAX; i++) @@ -1928,7 +1938,7 @@ static void Task_PlayerExchangeUpdate(u8 taskId) { gRfu.nextChildBits = 1 << i; gRfu.newChildQueue ^= (1 << i); - gRfu.unk_ce8 = TRUE; + gRfu.playerExchangeActive = TRUE; break; } } @@ -1978,7 +1988,7 @@ static void RfuCheckErrorStatus(void) gWirelessCommType = 2; SetMainCallback2(CB2_LinkError); gMain.savedCallback = CB2_LinkError; - BufferLinkErrorInfo((gRfu.linkmanMsg << 16) | (gRfu.unk_10 << 8) | gRfu.unk_12, gRfu.recvQueue.count, gRfu.sendQueue.count, RfuGetStatus() == RFU_STATUS_CONNECTION_ERROR); + SetLinkErrorBuffer((gRfu.errorInfo << 16) | (gRfu.errorParam0 << 8) | gRfu.errorParam1, gRfu.recvQueue.count, gRfu.sendQueue.count, RfuGetStatus() == RFU_STATUS_CONNECTION_ERROR); gRfu.errorState = RFU_ERROR_STATE_2; CloseLink(); } @@ -1986,8 +1996,8 @@ static void RfuCheckErrorStatus(void) { if (lman.childClockSlave_flag) rfu_LMAN_requestChangeAgbClockMaster(); - RfuSetStatus(RFU_STATUS_FATAL_ERROR, 0x7000); - GetLinkmanErrorParams(0x7000); + RfuSetStatus(RFU_STATUS_FATAL_ERROR, F_RFU_ERROR_5 | F_RFU_ERROR_6 | F_RFU_ERROR_7); + RfuSetErrorParams(F_RFU_ERROR_5 | F_RFU_ERROR_6 | F_RFU_ERROR_7); } } @@ -2108,7 +2118,7 @@ void SetUnionRoomChatPlayerData(u32 numPlayers) { numConnectedChildren = 0; partnerInfo = 0; - slots = gRfu.unk_ce2 ^ gRfu.disconnectSlots; + slots = gRfu.parentSlots ^ gRfu.disconnectSlots; for (i = 0; i < RFU_CHILD_MAX; i++) { if ((slots >> i) & 1) @@ -2127,13 +2137,13 @@ void SetUnionRoomChatPlayerData(u32 numPlayers) } } -void GetLinkmanErrorParams(u32 msg) +void RfuSetErrorParams(u32 errorInfo) { if (gRfu.errorState == RFU_ERROR_STATE_NONE) { - gRfu.unk_10 = lman.param[0]; - gRfu.unk_12 = lman.param[1]; - gRfu.linkmanMsg = msg; + gRfu.errorParam0 = lman.param[0]; + gRfu.errorParam1 = lman.param[1]; + gRfu.errorInfo = errorInfo; gRfu.errorState = RFU_ERROR_STATE_1; } } @@ -2174,7 +2184,7 @@ static void LinkManagerCB_Parent(u8 msg, u8 paramCount) case LMAN_MSG_NEW_CHILD_CONNECT_DETECTED: break; case LMAN_MSG_NEW_CHILD_CONNECT_ACCEPTED: - sub_80115EC(lman.param[0]); + ParentResetChildRecvMetadata(lman.param[0]); for (i = 0; i < RFU_CHILD_MAX; i++) { if ((lman.param[0] >> i) & 1) @@ -2219,11 +2229,11 @@ static void LinkManagerCB_Parent(u8 msg, u8 paramCount) case LMAN_MSG_LINK_LOSS_DETECTED_AND_DISCONNECTED: case LMAN_MSG_LINK_RECOVERY_FAILED_AND_DISCONNECTED: gRfu.linkLossRecoveryState = 4; - gRfu.unk_ce2 &= ~lman.param[0]; + gRfu.parentSlots &= ~lman.param[0]; if (gReceivedRemoteLinkPlayers == 1) { - if (gRfu.unk_ce2 == 0) - GetLinkmanErrorParams(msg); + if (gRfu.parentSlots == 0) + RfuSetErrorParams(msg); else StartDisconnectNewChild(); } @@ -2236,16 +2246,16 @@ static void LinkManagerCB_Parent(u8 msg, u8 paramCount) break; case LMAN_MSG_LMAN_API_ERROR_RETURN: RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); - GetLinkmanErrorParams(msg); + RfuSetErrorParams(msg); gRfu.isShuttingDown = TRUE; break; case LMAN_MSG_REQ_API_ERROR: case LMAN_MSG_WATCH_DOG_TIMER_ERROR: case LMAN_MSG_CLOCK_SLAVE_MS_CHANGE_ERROR_BY_DMA: case LMAN_MSG_RFU_FATAL_ERROR: - GetLinkmanErrorParams(msg); + RfuSetErrorParams(msg); RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); - gRfu.unk_cdb = TRUE; + gRfu.parentFinished = TRUE; break; } } @@ -2271,25 +2281,25 @@ static void LinkManagerCB_Child(u8 msg, u8 unused1) case LMAN_MSG_CHILD_NAME_SEND_COMPLETED: gRfu.state = RFUSTATE_CHILD_TRY_JOIN; gRfu.leaveGroupStatus = RFU_STATUS_OK; - gRfu.recvStatus = RFU_STATUS_OK; - rfu_setRecvBuffer(TYPE_NI, gRfu.childSlot, &gRfu.recvStatus, sizeof(gRfu.recvStatus)); - rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.unk_c3f, sizeof(gRfu.unk_c3f)); + gRfu.childRecvStatus = RFU_STATUS_OK; + rfu_setRecvBuffer(TYPE_NI, gRfu.childSlot, &gRfu.childRecvStatus, sizeof(gRfu.childRecvStatus)); + rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.childRecvQueue, sizeof(gRfu.childRecvQueue)); break; case LMAN_MSG_CHILD_NAME_SEND_FAILED_AND_DISCONNECTED: RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_DISCONNECTED: gRfu.linkLossRecoveryState = 2; - if (gRfu.recvStatus == RFU_STATUS_JOIN_GROUP_NO) + if (gRfu.childRecvStatus == RFU_STATUS_JOIN_GROUP_NO) break; case LMAN_MSG_LINK_RECOVERY_FAILED_AND_DISCONNECTED: if (gRfu.linkLossRecoveryState != 2) gRfu.linkLossRecoveryState = 4; - if (gRfu.recvStatus != RFU_STATUS_LEAVE_GROUP) + if (gRfu.childRecvStatus != RFU_STATUS_LEAVE_GROUP) RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); Debug_PrintString(sASCII_LinkLossDisconnect, 5, 5); if (gReceivedRemoteLinkPlayers == 1) - GetLinkmanErrorParams(msg); + RfuSetErrorParams(msg); break; case LMAN_MSG_LINK_LOSS_DETECTED_AND_START_RECOVERY: gRfu.linkLossRecoveryState = 1; @@ -2307,7 +2317,7 @@ static void LinkManagerCB_Child(u8 msg, u8 unused1) break; case LMAN_MSG_LMAN_API_ERROR_RETURN: RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); - GetLinkmanErrorParams(msg); + RfuSetErrorParams(msg); gRfu.isShuttingDown = TRUE; break; case LMAN_MSG_REQ_API_ERROR: @@ -2315,22 +2325,22 @@ static void LinkManagerCB_Child(u8 msg, u8 unused1) case LMAN_MSG_CLOCK_SLAVE_MS_CHANGE_ERROR_BY_DMA: case LMAN_MSG_RFU_FATAL_ERROR: RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); - GetLinkmanErrorParams(msg); - gRfu.unk_cdb = TRUE; + RfuSetErrorParams(msg); + gRfu.parentFinished = TRUE; break; } } -static void sub_80115EC(s32 a0) +static void ParentResetChildRecvMetadata(s32 slot) { s32 i; for (i = 0; i < RFU_CHILD_MAX; i++) { - if ((a0 >> i) & 1) + if ((slot >> i) & 1) { - gRfu.unk_cea[i] = 0; - gRfu.unk_cee[i] = 0xFF; + gRfu.numChildRecvErrors[i] = 0; + gRfu.childRecvIds[i] = 0xFF; } } } @@ -2372,11 +2382,11 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) if (newChildren != 0) { acceptSlot = 1 << Rfu_GetIndexOfNewestChild(newChildren); - if (gRfu.newChildQueue == 0 && !gRfu.unk_ce8) + if (gRfu.newChildQueue == 0 && !gRfu.playerExchangeActive) { gRfu.nextChildBits = acceptSlot; gRfu.newChildQueue |= (acceptSlot ^ newChildren); - gRfu.unk_ce8 = TRUE; + gRfu.playerExchangeActive = TRUE; } else { @@ -2394,7 +2404,7 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) rfu_REQ_disconnect(lman.acceptSlot_flag); rfu_waitREQComplete(); } - sub_80115EC(lman.param[0]); + ParentResetChildRecvMetadata(lman.param[0]); break; case LMAN_MSG_NEW_CHILD_CONNECT_REJECTED: break; @@ -2407,7 +2417,7 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) rfu_REQ_disconnect(lman.acceptSlot_flag ^ acceptSlot); rfu_waitREQComplete(); } - if (gRfu.state == RFUSTATE_15) + if (gRfu.state == RFUSTATE_UR_STOP_MANAGER_END) gRfu.state = RFUSTATE_UR_FINALIZE; break; break; @@ -2434,7 +2444,7 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) case LMAN_MSG_CHILD_NAME_SEND_COMPLETED: gRfu.state = RFUSTATE_UR_PLAYER_EXCHANGE; RfuSetStatus(RFU_STATUS_CHILD_SEND_COMPLETE, 0); - rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.unk_c3f, sizeof(gRfu.unk_c3f)); + rfu_setRecvBuffer(TYPE_UNI, gRfu.childSlot, gRfu.childRecvQueue, sizeof(gRfu.childRecvQueue)); break; case LMAN_MSG_CHILD_NAME_SEND_FAILED_AND_DISCONNECTED: RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); @@ -2457,21 +2467,21 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) { if (gReceivedRemoteLinkPlayers == 1) { - gRfu.unk_ce2 &= ~(lman.param[0]); - if (gRfu.unk_ce2 == 0) - GetLinkmanErrorParams(msg); + gRfu.parentSlots &= ~(lman.param[0]); + if (gRfu.parentSlots == 0) + RfuSetErrorParams(msg); else StartDisconnectNewChild(); } } else if (gRfu.disconnectMode != RFU_DISCONNECT_NORMAL && gReceivedRemoteLinkPlayers == 1) { - GetLinkmanErrorParams(msg); - rfu_LMAN_stopManager(0); + RfuSetErrorParams(msg); + rfu_LMAN_stopManager(FALSE); } if (gRfuLinkStatus->parentChild == MODE_NEUTRAL - && lman.pcswitch_flag == 0 + && !lman.pcswitch_flag && FuncIsActiveTask(Task_UnionRoomListen) == TRUE) gRfu.state = RFUSTATE_17; @@ -2486,16 +2496,16 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) break; case LMAN_MSG_LMAN_API_ERROR_RETURN: RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); - GetLinkmanErrorParams(msg); + RfuSetErrorParams(msg); gRfu.isShuttingDown = TRUE; break; case LMAN_MSG_REQ_API_ERROR: case LMAN_MSG_WATCH_DOG_TIMER_ERROR: case LMAN_MSG_CLOCK_SLAVE_MS_CHANGE_ERROR_BY_DMA: case LMAN_MSG_RFU_FATAL_ERROR: - GetLinkmanErrorParams(msg); + RfuSetErrorParams(msg); RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg); - gRfu.unk_cdb = FALSE; + gRfu.parentFinished = FALSE; break; } } @@ -2505,10 +2515,10 @@ void RfuSetNormalDisconnectMode(void) gRfu.disconnectMode = RFU_DISCONNECT_NORMAL; } -void RfuSetStatus(u8 status, u16 msg) +void RfuSetStatus(u8 status, u16 errorInfo) { gRfu.status = status; - gRfu.linkmanMsg = msg; + gRfu.errorInfo = errorInfo; } u8 RfuGetStatus(void) @@ -2526,9 +2536,9 @@ bool32 RfuHasErrored(void) return FALSE; } -bool32 sub_8011A9C(void) +bool32 Rfu_IsPlayerExchangeActive(void) { - return gRfu.unk_ce8; + return gRfu.playerExchangeActive; } bool8 Rfu_IsMaster(void) @@ -2621,7 +2631,7 @@ void InitializeRfuLinkManager_JoinGroup(void) { gRfu.parentChild = MODE_CHILD; SetHostRfuUsername(); - rfu_LMAN_initializeManager(LinkManagerCB_Child, LinkManagerCB_MSC); + rfu_LMAN_initializeManager(LinkManagerCB_Child, MSCCallback_Child); CreateTask_ChildSearchForParent(); } @@ -2667,10 +2677,10 @@ static void RfuReqDisconnectSlot(u32 slot) { rfu_REQ_disconnect(slot); rfu_waitREQComplete(); - gRfu.unk_ce2 &= ~slot; - rfu_clearSlot(1, gRfu.unk_cda); - rfu_UNI_setSendData(gRfu.unk_ce2, gRfu.recvCmds, 70); - gRfu.unk_cda = Rfu_GetIndexOfNewestChild(gRfu.unk_ce2); + gRfu.parentSlots &= ~slot; + rfu_clearSlot(1, gRfu.parentSendSlot); + rfu_UNI_setSendData(gRfu.parentSlots, gRfu.recvCmds, sizeof(gRfu.recvCmds)); + gRfu.parentSendSlot = Rfu_GetIndexOfNewestChild(gRfu.parentSlots); } void RequestDisconnectSlotByTrainerNameAndId(const u8 *name, u16 id) @@ -2689,7 +2699,7 @@ void Rfu_DisconnectPlayerById(u32 playerIdx) for (i = 0; i < RFU_CHILD_MAX; i++) { - if (gRfu.linkPlayerIdx[i] == playerIdx && (gRfu.unk_ce2 >> i) & 1) + if (gRfu.linkPlayerIdx[i] == playerIdx && (gRfu.parentSlots >> i) & 1) toDisconnect |= 1 << i; } if (toDisconnect) @@ -2702,7 +2712,7 @@ void Rfu_DisconnectPlayerById(u32 playerIdx) static void Task_SendDisconnectCommand(u8 taskId) { - if (gSendCmd[0] == 0 && !gRfu.unk_ce8) + if (gSendCmd[0] == 0 && !gRfu.playerExchangeActive) { RfuPrepareSendBuffer(RFUCMD_DISCONNECT); gSendCmd[1] = gTasks[taskId].tDisconnectPlayers; @@ -2745,7 +2755,7 @@ static void Task_RfuReconnectWithParent(u8 taskId) { if (gRfuLinkStatus->partner[id].slot != 0xFF) { - gRfu.unk_c3d = id; + gRfu.reconnectParentId = id; if (TryReconnectParent()) DestroyTask(taskId); } @@ -2757,14 +2767,14 @@ static void Task_RfuReconnectWithParent(u8 taskId) else { // Error, unable to reconnect to parent - RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000); + RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, F_RFU_ERROR_5 | F_RFU_ERROR_6 | F_RFU_ERROR_7); DestroyTask(taskId); } } else { tTime++; - gRfu.unk_c3d = id; + gRfu.reconnectParentId = id; } } else @@ -2775,7 +2785,7 @@ static void Task_RfuReconnectWithParent(u8 taskId) if (tTime > 240) { // Timeout error - RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000); + RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, F_RFU_ERROR_5 | F_RFU_ERROR_6 | F_RFU_ERROR_7); DestroyTask(taskId); } } @@ -2841,7 +2851,7 @@ static void Task_TryConnectToUnionRoomParent(u8 taskId) if (++gTasks[taskId].tTime > 300) { // Timeout error - RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000); + RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, F_RFU_ERROR_5 | F_RFU_ERROR_6 | F_RFU_ERROR_7); DestroyTask(taskId); } @@ -2866,7 +2876,7 @@ static void Task_TryConnectToUnionRoomParent(u8 taskId) else { // Incompatible partner activity - RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000); + RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, F_RFU_ERROR_5 | F_RFU_ERROR_6 | F_RFU_ERROR_7); DestroyTask(taskId); } } diff --git a/src/union_room.c b/src/union_room.c index eae7545139..ba099cb973 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -2888,7 +2888,7 @@ static void Task_RunUnionRoom(u8 taskId) break; case UR_STATE_PLAYER_CONTACTED_YOU: PlaySE(SE_DING_DONG); - sub_800EF7C(); + StopUnionRoomLinkManager(); uroom->state = UR_STATE_RECV_CONTACT_DATA; uroom->recvActivityRequest[0] = 0; break; diff --git a/src/union_room_chat.c b/src/union_room_chat.c index 903d00bcbf..27558814d9 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -997,7 +997,7 @@ static void Chat_Join(void) sChat->funcState++; // fall through case 1: - if (IsLinkTaskFinished() && !sub_8011A9C()) + if (IsLinkTaskFinished() && !Rfu_IsPlayerExchangeActive()) { if (SendBlock(0, sChat->sendMessageBuffer, sizeof(sChat->sendMessageBuffer))) sChat->funcState++; @@ -1206,7 +1206,7 @@ static void Chat_AskQuitChatting(void) } break; case 4: - if (IsLinkTaskFinished() && !sub_8011A9C() && SendBlock(0, sChat->sendMessageBuffer, sizeof(sChat->sendMessageBuffer))) + if (IsLinkTaskFinished() && !Rfu_IsPlayerExchangeActive() && SendBlock(0, sChat->sendMessageBuffer, sizeof(sChat->sendMessageBuffer))) { if (!sChat->multiplayerId) sChat->funcState = 6; @@ -1257,15 +1257,15 @@ static void Chat_Exit(void) } break; case 3: - if (IsLinkTaskFinished() && !sub_8011A9C() && SendBlock(0, sChat->sendMessageBuffer, sizeof(sChat->sendMessageBuffer))) + if (IsLinkTaskFinished() && !Rfu_IsPlayerExchangeActive() && SendBlock(0, sChat->sendMessageBuffer, sizeof(sChat->sendMessageBuffer))) sChat->funcState++; break; case 4: - if ((GetBlockReceivedStatus() & 1) && !sub_8011A9C()) + if ((GetBlockReceivedStatus() & 1) && !Rfu_IsPlayerExchangeActive()) sChat->funcState++; break; case 5: - if (IsLinkTaskFinished() && !sub_8011A9C()) + if (IsLinkTaskFinished() && !Rfu_IsPlayerExchangeActive()) { SetCloseLinkCallback(); sChat->exitDelayTimer = 0; @@ -1300,7 +1300,7 @@ static void Chat_Drop(void) } break; case 1: - if (!IsDisplaySubtaskActive(0) && IsLinkTaskFinished() && !sub_8011A9C()) + if (!IsDisplaySubtaskActive(0) && IsLinkTaskFinished() && !Rfu_IsPlayerExchangeActive()) { SetCloseLinkCallback(); sChat->exitDelayTimer = 0; @@ -1346,7 +1346,7 @@ static void Chat_Disbanded(void) } break; case 2: - if (IsDisplaySubtaskActive(0) != TRUE && IsLinkTaskFinished() && !sub_8011A9C()) + if (IsDisplaySubtaskActive(0) != TRUE && IsLinkTaskFinished() && !Rfu_IsPlayerExchangeActive()) { SetCloseLinkCallback(); sChat->exitDelayTimer = 0; @@ -1384,7 +1384,7 @@ static void Chat_SendMessage(void) sChat->funcState++; // fall through case 1: - if (IsLinkTaskFinished() == TRUE && !sub_8011A9C() && SendBlock(0, sChat->sendMessageBuffer, sizeof(sChat->sendMessageBuffer))) + if (IsLinkTaskFinished() == TRUE && !Rfu_IsPlayerExchangeActive() && SendBlock(0, sChat->sendMessageBuffer, sizeof(sChat->sendMessageBuffer))) sChat->funcState++; break; case 2: @@ -2028,7 +2028,7 @@ static void Task_ReceiveChatMessage(u8 taskId) } tBlockReceivedStatus = GetBlockReceivedStatus(); - if (!tBlockReceivedStatus && sub_8011A9C()) + if (!tBlockReceivedStatus && Rfu_IsPlayerExchangeActive()) return; tI = 0; @@ -2100,7 +2100,7 @@ static void Task_ReceiveChatMessage(u8 taskId) DestroyTask(taskId); break; case 2: - if (!sub_8011A9C()) + if (!Rfu_IsPlayerExchangeActive()) { if (!sChat->multiplayerId) SetUnionRoomChatPlayerData(sChat->linkPlayerCount); From e86d3410a1719fcbf62754bfda93a295aa7e0d57 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 7 Oct 2021 15:32:51 -0400 Subject: [PATCH 040/417] Update argument names in link headers, link_rfu doc cleanup --- include/link_rfu.h | 28 ++++----- include/union_room.h | 12 ++-- include/union_room_player_avatar.h | 6 +- src/berry_crush.c | 12 ++-- src/link_rfu_2.c | 27 ++++----- src/union_room.c | 92 +++++++++++++++--------------- 6 files changed, 87 insertions(+), 90 deletions(-) diff --git a/include/link_rfu.h b/include/link_rfu.h index 6ca06349a4..df2b80c4fa 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -62,9 +62,9 @@ enum { // Values for errorState enum { RFU_ERROR_STATE_NONE, - RFU_ERROR_STATE_1, - RFU_ERROR_STATE_2, - RFU_ERROR_STATE_3, + RFU_ERROR_STATE_OCCURRED, + RFU_ERROR_STATE_PROCESSED, + RFU_ERROR_STATE_DISCONNECTING, RFU_ERROR_STATE_IGNORE, }; @@ -247,8 +247,8 @@ extern u8 gWirelessStatusIndicatorSpriteId; void WipeTrainerNameRecords(void); void InitRFUAPI(void); void LinkRfu_Shutdown(void); -void Rfu_SetBlockReceivedFlag(u8 who); -void Rfu_ResetBlockReceivedFlag(u8 who); +void Rfu_SetBlockReceivedFlag(u8 linkPlayerId); +void Rfu_ResetBlockReceivedFlag(u8 linkPlayerId); bool32 IsSendingKeysToRfu(void); void StartSendingKeysToRfu(void); void Rfu_SetBerryBlenderLinkCallback(void); @@ -278,9 +278,9 @@ void UpdateGameData_GroupLockedIn(u8 startedActivity); void RfuSetErrorParams(u32 errorInfo); void RfuSetStatus(u8 status, u16 errorInfo); u8 Rfu_SetLinkRecovery(bool32 enable); -void CopyHostRfuGameDataAndUsername(struct RfuGameData *buff1, u8 *buff2); +void CopyHostRfuGameDataAndUsername(struct RfuGameData *gameData, u8 *username); void SetHostRfuGameData(u8 activity, u32 partnerInfo, bool32 startedActivity); -void InitializeRfuLinkManager_LinkLeader(u32 a0); +void InitializeRfuLinkManager_LinkLeader(u32 groupMax); bool32 IsRfuCommunicatingWithAllChildren(void); void LinkRfu_StopManagerAndFinalizeSlots(void); bool32 RfuTryDisconnectLeavingChildren(void); @@ -296,21 +296,21 @@ void SendLeaveGroupNotice(void); void RecordMixTrainerNames(void); void LinkRfu_CreateConnectionAsParent(void); void LinkRfu_StopManagerBeforeEnteringChat(void); -void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 startedActivity); -void CreateTask_RfuReconnectWithParent(const u8 *src, u16 trainerId); +void UpdateGameData_SetActivity(u8 activity, u32 partnerInfo, bool32 startedActivity); +void CreateTask_RfuReconnectWithParent(const u8 *name, u16 trainerId); void SetHostRfuWonderFlags(bool32 hasNews, bool32 hasCard); void ResetHostRfuGameData(void); void SetTradeBoardRegisteredMonInfo(u32 type, u32 species, u32 level); void InitializeRfuLinkManager_EnterUnionRoom(void); -void TryConnectToUnionRoomParent(const u8 *name, struct RfuGameData *structPtr, u8 a2); +void TryConnectToUnionRoomParent(const u8 *name, struct RfuGameData *parent, u8 activity); bool32 IsUnionRoomListenTaskActive(void); void Rfu_SendPacket(void *data); bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name); void Rfu_DisconnectPlayerById(u32 playerIdx); u8 GetLinkPlayerInfoFlags(s32 playerId); void StopUnionRoomLinkManager(void); -bool8 Rfu_GetCompatiblePlayerData(struct RfuGameData *player, u8 *username, u8 idx); -bool8 Rfu_GetWonderDistributorPlayerData(struct RfuGameData *player, u8 *username, u8 idx); +bool8 Rfu_GetCompatiblePlayerData(struct RfuGameData *gameData, u8 *username, u8 idx); +bool8 Rfu_GetWonderDistributorPlayerData(struct RfuGameData *gameData, u8 *username, u8 idx); s32 Rfu_GetIndexOfNewestChild(u8 bits); void CreateTask_RfuIdle(void); void DestroyTask_RfuIdle(void); @@ -328,8 +328,8 @@ void RfuRecvQueue_Enqueue(struct RfuRecvQueue *queue, u8 *data); void RfuSendQueue_Enqueue(struct RfuSendQueue *queue, u8 *data); bool8 RfuRecvQueue_Dequeue(struct RfuRecvQueue *queue, u8 *dest); bool8 RfuSendQueue_Dequeue(struct RfuSendQueue *queue, u8 *dest); -void RfuBackupQueue_Enqueue(struct RfuBackupQueue *queue, const u8 *q2); -bool8 RfuBackupQueue_Dequeue(struct RfuBackupQueue *queue, u8 *q2); +void RfuBackupQueue_Enqueue(struct RfuBackupQueue *queue, const u8 *data); +bool8 RfuBackupQueue_Dequeue(struct RfuBackupQueue *queue, u8 *src); void InitHostRfuGameData(struct RfuGameData *data, u8 activity, bool32 startedActivity, s32 partnerInfo); void CreateWirelessStatusIndicatorSprite(u8 x, u8 y); void DestroyWirelessStatusIndicatorSprite(void); diff --git a/include/union_room.h b/include/union_room.h index 11dbccf705..b364e75590 100644 --- a/include/union_room.h +++ b/include/union_room.h @@ -32,8 +32,8 @@ struct RfuPlayer u16 timeoutCounter; u8 groupScheduledAnim:2; bool8 useRedText:1; // Never set - u8 field_1B; - u8 filler[3]; + u8 newPlayerCountdown; + u8 unused; }; struct RfuPlayerList @@ -108,7 +108,7 @@ struct WirelessLink_URoom struct RfuPlayerList *spawnPlayer; struct RfuIncomingPlayerList *incomingParentList; u16 unknown; // Never read - u16 field_12; + u16 unreadPlayerId; u8 state; u8 stateAfterPrint; u8 textState; @@ -153,9 +153,9 @@ extern u8 gUnionRoomRequestedMonType; u8 CreateTask_CreateTradeMenu(void); void SetUsingUnionRoomStartMenu(void); -void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0); -void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0); -void MEvent_CreateTask_Leader(u32 arg0); +void MEvent_CreateTask_CardOrNewsWithFriend(u32 activity); +void MEvent_CreateTask_CardOrNewsOverWireless(u32 activity); +void MEvent_CreateTask_Leader(u32 activity); u8 CreateTask_ListenToWireless(void); void StartUnionRoomBattle(u16 battleFlags); diff --git a/include/union_room_player_avatar.h b/include/union_room_player_avatar.h index e6526739f2..508545a0eb 100644 --- a/include/union_room_player_avatar.h +++ b/include/union_room_player_avatar.h @@ -3,12 +3,12 @@ u8 InitUnionRoomPlayerObjects(struct UnionRoomObject *players); void DestroyUnionRoomPlayerObjects(void); -void CreateUnionRoomPlayerSprites(u8 *spriteIds, s32 playerIdx); +void CreateUnionRoomPlayerSprites(u8 *spriteIds, s32 leaderId); void DestroyUnionRoomPlayerSprites(u8 *spriteIds); void SetTilesAroundUnionRoomPlayersPassable(void); void ScheduleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom); void HandleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom); -bool32 TryInteractWithUnionRoomMember(struct RfuPlayerList *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds); -void UpdateUnionRoomMemberFacing(u32 currDirection, u32 playerIdx, struct RfuPlayerList *main0); +bool32 TryInteractWithUnionRoomMember(struct RfuPlayerList *list, s16 *memberIdPtr, s16 *leaderIdPtr, u8 *spriteIds); +void UpdateUnionRoomMemberFacing(u32 memberId, u32 leaderId, struct RfuPlayerList *list); #endif //GUARD_UNION_ROOM_PLAYER_AVATAR_H diff --git a/src/berry_crush.c b/src/berry_crush.c index 3a9adfcd08..aff8d28d2a 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -984,12 +984,12 @@ static u32 QuitBerryCrush(MainCallback exitCallback) return 0; } -#define ERROR_EXIT(exitCallback) \ - { \ - SetMainCallback2(exitCallback); \ - gRfu.errorParam0 = 0; \ - gRfu.errorParam1 = 0; \ - gRfu.errorState = RFU_ERROR_STATE_1; \ +#define ERROR_EXIT(exitCallback) \ + { \ + SetMainCallback2(exitCallback); \ + gRfu.errorParam0 = 0; \ + gRfu.errorParam1 = 0; \ + gRfu.errorState = RFU_ERROR_STATE_OCCURRED; \ } void StartBerryCrush(MainCallback exitCallback) diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index ceab901aa4..657d900745 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -27,7 +27,7 @@ enum { RFUSTATE_STOP_MANAGER_END, RFUSTATE_CHILD_CONNECT, RFUSTATE_CHILD_CONNECT_END, - RFUSTATE_8, // Unused + RFUSTATE_UNUSED, RFUSTATE_RECONNECTED, RFUSTATE_CONNECTED, RFUSTATE_CHILD_TRY_JOIN, @@ -39,9 +39,6 @@ enum { }; // These states are used for different purposes // depending on the link mode (parent, child, union room) -#define RFUSTATE_17 17 -#define RFUSTATE_PARENT_RECONNECT 18 - #define RFUSTATE_PARENT_FINALIZE_START 17 #define RFUSTATE_PARENT_FINALIZE 18 #define RFUSTATE_UR_CONNECT 17 @@ -1443,7 +1440,7 @@ static void WaitAllReadyToCloseLink(void) gBattleTypeFlags &= ~BATTLE_TYPE_LINK_IN_BATTLE; if (gRfu.parentChild == MODE_CHILD) { - gRfu.errorState = RFU_ERROR_STATE_3; + gRfu.errorState = RFU_ERROR_STATE_DISCONNECTING; TryDisconnectRfu(); } else @@ -1982,14 +1979,14 @@ static void Task_PlayerExchangeChat(u8 taskId) static void RfuCheckErrorStatus(void) { - if (gRfu.errorState == RFU_ERROR_STATE_1 && lman.childClockSlave_flag == 0) + if (gRfu.errorState == RFU_ERROR_STATE_OCCURRED && lman.childClockSlave_flag == 0) { if (gMain.callback2 == c2_mystery_gift_e_reader_run || lman.init_param->mboot_flag) gWirelessCommType = 2; SetMainCallback2(CB2_LinkError); gMain.savedCallback = CB2_LinkError; SetLinkErrorBuffer((gRfu.errorInfo << 16) | (gRfu.errorParam0 << 8) | gRfu.errorParam1, gRfu.recvQueue.count, gRfu.sendQueue.count, RfuGetStatus() == RFU_STATUS_CONNECTION_ERROR); - gRfu.errorState = RFU_ERROR_STATE_2; + gRfu.errorState = RFU_ERROR_STATE_PROCESSED; CloseLink(); } else if (gRfu.sendQueue.full == TRUE || gRfu.recvQueue.full == TRUE) @@ -2100,10 +2097,10 @@ void UpdateGameData_GroupLockedIn(bool8 startedActivity) rfu_REQ_configGameData(0, RFU_SERIAL_GAME, (void *)&gHostRfuGameData, gHostRfuUsername); } -void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 startedActivity) +void UpdateGameData_SetActivity(u8 activity, u32 partnerInfo, bool32 startedActivity) { if (activity != ACTIVITY_NONE) - SetHostRfuGameData(activity, flags, startedActivity); + SetHostRfuGameData(activity, partnerInfo, startedActivity); rfu_REQ_configGameData(0, RFU_SERIAL_GAME, (void *)&gHostRfuGameData, gHostRfuUsername); } @@ -2144,7 +2141,7 @@ void RfuSetErrorParams(u32 errorInfo) gRfu.errorParam0 = lman.param[0]; gRfu.errorParam1 = lman.param[1]; gRfu.errorInfo = errorInfo; - gRfu.errorState = RFU_ERROR_STATE_1; + gRfu.errorState = RFU_ERROR_STATE_OCCURRED; } } @@ -2370,7 +2367,7 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) switch (msg) { case LMAN_MSG_INITIALIZE_COMPLETED: - gRfu.state = RFUSTATE_17; + gRfu.state = RFUSTATE_UR_CONNECT; break; case LMAN_MSG_NEW_CHILD_CONNECT_DETECTED: RfuSetStatus(RFU_STATUS_NEW_CHILD_DETECTED, 0); @@ -2430,7 +2427,7 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) gRfu.childSlot = lman.param[0]; break; case LMAN_MSG_CONNECT_PARENT_FAILED: - gRfu.state = RFUSTATE_PARENT_RECONNECT; + gRfu.state = RFUSTATE_UR_CONNECT_END; if (gRfu.connectParentFailures < 2) { gRfu.connectParentFailures++; @@ -2483,7 +2480,7 @@ static void LinkManagerCB_UnionRoom(u8 msg, u8 paramCount) if (gRfuLinkStatus->parentChild == MODE_NEUTRAL && !lman.pcswitch_flag && FuncIsActiveTask(Task_UnionRoomListen) == TRUE) - gRfu.state = RFUSTATE_17; + gRfu.state = RFUSTATE_UR_CONNECT; RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg); break; @@ -2617,13 +2614,13 @@ static void CB2_RfuIdle(void) UpdatePaletteFade(); } -void InitializeRfuLinkManager_LinkLeader(u32 a0) +void InitializeRfuLinkManager_LinkLeader(u32 groupMax) { gRfu.parentChild = MODE_PARENT; SetHostRfuUsername(); rfu_LMAN_initializeManager(LinkManagerCB_Parent, NULL); sRfuReqConfig = sRfuReqConfigTemplate; - sRfuReqConfig.availSlot_flag = sAvailSlots[a0 - 1]; + sRfuReqConfig.availSlot_flag = sAvailSlots[groupMax - 1]; CreateTask_ParentSearchForChildren(); } diff --git a/src/union_room.c b/src/union_room.c index ba099cb973..54f95f53c9 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -187,11 +187,11 @@ enum { // Return values for HandlePlayerListUpdate enum { - PLIST_0, - PLIST_1, - PLIST_2, - PLIST_3, - PLIST_4, + PLIST_NONE, + PLIST_NEW_PLAYER, + PLIST_RECENT_UPDATE, + PLIST_UNUSED, + PLIST_CONTACTED, }; static EWRAM_DATA u8 sUnionRoomPlayerName[12] = {}; @@ -414,7 +414,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) data->playerList->players[0].timeoutCounter = 0; data->playerList->players[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; data->playerList->players[0].useRedText = FALSE; - data->playerList->players[0].field_1B = 0; + data->playerList->players[0].newPlayerCountdown = 0; data->listenTaskId = CreateTask_ListenForCompatiblePartners(data->incomingPlayerList, 0xFF); data->bButtonCancelWindowId = AddWindow(&sWindowTemplate_BButtonCancel); switch (GROUP_MAX(sPlayerActivityGroupSize)) @@ -559,7 +559,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) { if (data->joinRequestAnswer == RFU_STATUS_JOIN_GROUP_OK) { - data->playerList->players[data->playerCount].field_1B = 0; + data->playerList->players[data->playerCount].newPlayerCountdown = 0; RedrawListMenu(data->listTaskId); data->playerCount++; if (data->playerCount == GROUP_MAX(sPlayerActivityGroupSize)) @@ -867,7 +867,7 @@ static void ItemPrintFunc_PossibleGroupMembers(u8 windowId, u32 id, u8 y) switch (data->playerList->players[id].groupScheduledAnim) { case UNION_ROOM_SPAWN_IN: - if (data->playerList->players[id].field_1B != 0) + if (data->playerList->players[id].newPlayerCountdown != 0) colorIdx = UR_COLOR_GREEN; break; case UNION_ROOM_SPAWN_OUT: @@ -913,7 +913,7 @@ static u8 LeaderUpdateGroupMembership(struct RfuPlayerList *list) { for (id = 0; id < MAX_RFU_PLAYERS; id++) { - if (data->playerList->players[id].field_1B != 0) + if (data->playerList->players[id].newPlayerCountdown != 0) ret = UNION_ROOM_SPAWN_IN; } } @@ -948,14 +948,14 @@ static u8 LeaderPrunePlayerList(struct RfuPlayerList *list) data->playerList->players[copiedCount].timeoutCounter = 0; data->playerList->players[copiedCount].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; data->playerList->players[copiedCount].useRedText = FALSE; - data->playerList->players[copiedCount].field_1B = 0; + data->playerList->players[copiedCount].newPlayerCountdown = 0; } for (i = 0; i < MAX_RFU_PLAYERS; i++) { if (data->playerList->players[i].groupScheduledAnim != UNION_ROOM_SPAWN_IN) continue; - if (data->playerList->players[i].field_1B != 64) + if (data->playerList->players[i].newPlayerCountdown != 64) continue; playerCount = i; @@ -1382,7 +1382,7 @@ static u8 GetGroupListTextColor(struct WirelessLink_Group *data, u32 id) return UR_COLOR_WHITE; else if (data->playerList->players[id].useRedText) return UR_COLOR_RED; - else if (data->playerList->players[id].field_1B != 0) + else if (data->playerList->players[id].newPlayerCountdown != 0) return UR_COLOR_GREEN; } return UR_COLOR_DEFAULT; @@ -1415,15 +1415,15 @@ static u8 GetNewLeaderCandidate(void) if (ArePlayerDataDifferent(&data->playerList->players[i].rfu, &data->incomingPlayerList->players[id].rfu)) { data->playerList->players[i].rfu = data->incomingPlayerList->players[id].rfu; - data->playerList->players[i].field_1B = 64; + data->playerList->players[i].newPlayerCountdown = 64; ret = 1; } else { - if (data->playerList->players[i].field_1B != 0) + if (data->playerList->players[i].newPlayerCountdown != 0) { - data->playerList->players[i].field_1B--; - if (data->playerList->players[i].field_1B == 0) + data->playerList->players[i].newPlayerCountdown--; + if (data->playerList->players[i].newPlayerCountdown == 0) ret = 2; } } @@ -1431,7 +1431,7 @@ static u8 GetNewLeaderCandidate(void) else { data->playerList->players[i].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - data->playerList->players[i].field_1B = 64; + data->playerList->players[i].newPlayerCountdown = 64; ret = 1; } @@ -1899,7 +1899,7 @@ static void Task_MEvent_Leader(u8 taskId) data->playerList->players[0].timeoutCounter = 0; data->playerList->players[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; data->playerList->players[0].useRedText = FALSE; - data->playerList->players[0].field_1B = 0; + data->playerList->players[0].newPlayerCountdown = 0; data->listenTaskId = CreateTask_ListenForCompatiblePartners(data->incomingPlayerList, 0xFF); winTemplate = sWindowTemplate_PlayerList; @@ -1949,7 +1949,7 @@ static void Task_MEvent_Leader(u8 taskId) case 0: LoadWirelessStatusIndicatorSpriteGfx(); CreateWirelessStatusIndicatorSprite(0, 0); - data->playerList->players[data->playerCount].field_1B = 0; + data->playerList->players[data->playerCount].newPlayerCountdown = 0; RedrawListMenu(data->listTaskId); data->joinRequestAnswer = RFU_STATUS_JOIN_GROUP_OK; SendRfuStatusToPartner(data->joinRequestAnswer, ReadAsU16(data->playerList->players[data->playerCount].rfu.data.compatibility.playerTrainerId), data->playerList->players[data->playerCount].rfu.name); @@ -1969,7 +1969,7 @@ static void Task_MEvent_Leader(u8 taskId) { if (data->joinRequestAnswer == RFU_STATUS_JOIN_GROUP_OK) { - data->playerList->players[data->playerCount].field_1B = 0; + data->playerList->players[data->playerCount].newPlayerCountdown = 0; RedrawListMenu(data->listTaskId); data->playerCount++; CopyAndTranslatePlayerName(gStringVar1, &data->playerList->players[data->playerCount - 1]); @@ -2430,7 +2430,7 @@ void RunUnionRoom(void) uroom->state = UR_STATE_INIT; uroom->textState = 0; uroom->unknown = 0; - uroom->field_12 = 0; + uroom->unreadPlayerId = 0; gSpecialVar_Result = 0; ListMenuLoadStdPalAt(0xD0, 1); @@ -2610,12 +2610,12 @@ static void Task_RunUnionRoom(u8 taskId) switch (HandlePlayerListUpdate()) { - case PLIST_1: + case PLIST_NEW_PLAYER: PlaySE(SE_PC_LOGIN); - case PLIST_2: + case PLIST_RECENT_UPDATE: ScheduleUnionRoomPlayerRefresh(uroom); break; - case PLIST_4: + case PLIST_CONTACTED: uroom->state = UR_STATE_PLAYER_CONTACTED_YOU; StartScriptInteraction(); SetTradeBoardRegisteredMonInfo(TYPE_NORMAL, SPECIES_NONE, 0); @@ -2643,7 +2643,7 @@ static void Task_RunUnionRoom(u8 taskId) break; case 1: // Link communicating TryConnectToUnionRoomParent(uroom->playerList->players[taskData[1]].rfu.name, &uroom->playerList->players[taskData[1]].rfu.data, gPlayerCurrActivity); - uroom->field_12 = id; // Should be just 0, but won't match any other way. + uroom->unreadPlayerId = id; // Should be just 0, but won't match any other way. uroom->state = UR_STATE_TRY_COMMUNICATING; break; case 2: // Ask to join chat @@ -2833,7 +2833,7 @@ static void Task_RunUnionRoom(u8 taskId) gPlayerCurrActivity = ACTIVITY_CHAT | IN_UNION_ROOM; UpdateGameData_SetActivity(ACTIVITY_CHAT | IN_UNION_ROOM, 0, TRUE); TryConnectToUnionRoomParent(uroom->playerList->players[taskData[1]].rfu.name, &uroom->playerList->players[taskData[1]].rfu.data, gPlayerCurrActivity); - uroom->field_12 = taskData[1]; + uroom->unreadPlayerId = taskData[1]; uroom->state = UR_STATE_TRY_ACCEPT_CHAT_REQUEST_DELAY; taskData[3] = 0; break; @@ -2942,7 +2942,7 @@ static void Task_RunUnionRoom(u8 taskId) else UpdateGameData_SetActivity(gPlayerCurrActivity | IN_UNION_ROOM, GetLinkPlayerInfoFlags(1), TRUE); - uroom->spawnPlayer->players[0].field_1B = 0; + uroom->spawnPlayer->players[0].newPlayerCountdown = 0; taskData[3] = 0; if (gPlayerCurrActivity == (ACTIVITY_BATTLE_SINGLE | IN_UNION_ROOM)) { @@ -3298,7 +3298,7 @@ void InitUnionRoom(void) data->state = 0; data->textState = 0; data->unknown = 0; - data->field_12 = 0; + data->unreadPlayerId = 0; sUnionRoomPlayerName[0] = EOS; } @@ -3336,8 +3336,8 @@ static void Task_InitUnionRoom(u8 taskId) case 3: switch (HandlePlayerListUpdate()) { - case PLIST_1: - case PLIST_2: + case PLIST_NEW_PLAYER: + case PLIST_RECENT_UPDATE: if (sUnionRoomPlayerName[0] == EOS) { for (i = 0; i < MAX_UNION_ROOM_LEADERS; i++) @@ -3354,7 +3354,7 @@ static void Task_InitUnionRoom(u8 taskId) } } break; - case PLIST_3: + case PLIST_UNUSED: break; } break; @@ -3390,7 +3390,7 @@ static u8 HandlePlayerListUpdate(void) s32 i; u8 j; struct WirelessLink_URoom *data = sWirelessLinkMain.uRoom; - s32 retVal = PLIST_0; + s32 retVal = PLIST_NONE; for (i = 0; i < RFU_CHILD_MAX; i++) { @@ -3399,8 +3399,8 @@ static u8 HandlePlayerListUpdate(void) data->spawnPlayer->players[0].rfu = data->incomingParentList->players[i].rfu; data->spawnPlayer->players[0].timeoutCounter = 0; data->spawnPlayer->players[0].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - data->spawnPlayer->players[0].field_1B = 1; - return PLIST_4; + data->spawnPlayer->players[0].newPlayerCountdown = 1; + return PLIST_CONTACTED; } } for (j = 0; j < MAX_UNION_ROOM_LEADERS; j++) @@ -3415,21 +3415,21 @@ static u8 HandlePlayerListUpdate(void) if (ArePlayerDataDifferent(&data->playerList->players[j].rfu, &data->incomingChildList->players[i].rfu)) { data->playerList->players[j].rfu = data->incomingChildList->players[i].rfu; - data->playerList->players[j].field_1B = 64; - retVal = PLIST_1; + data->playerList->players[j].newPlayerCountdown = 64; + retVal = PLIST_NEW_PLAYER; } - else if (data->playerList->players[j].field_1B != 0) + else if (data->playerList->players[j].newPlayerCountdown != 0) { - data->playerList->players[j].field_1B--; - if (data->playerList->players[j].field_1B == 0) - retVal = PLIST_2; + data->playerList->players[j].newPlayerCountdown--; + if (data->playerList->players[j].newPlayerCountdown == 0) + retVal = PLIST_RECENT_UPDATE; } } else { data->playerList->players[j].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - data->playerList->players[j].field_1B = 0; - retVal = PLIST_2; + data->playerList->players[j].newPlayerCountdown = 0; + retVal = PLIST_RECENT_UPDATE; } data->playerList->players[j].timeoutCounter = 0; } @@ -3439,7 +3439,7 @@ static u8 HandlePlayerListUpdate(void) if (data->playerList->players[j].timeoutCounter >= 600) { data->playerList->players[j].groupScheduledAnim = UNION_ROOM_SPAWN_OUT; - retVal = PLIST_2; + retVal = PLIST_RECENT_UPDATE; } } else if (data->playerList->players[j].groupScheduledAnim == UNION_ROOM_SPAWN_OUT) @@ -3452,7 +3452,7 @@ static u8 HandlePlayerListUpdate(void) } for (i = 0; i < RFU_CHILD_MAX; i++) if (TryAddIncomingPlayerToList(&data->playerList->players[0], &data->incomingChildList->players[i], MAX_UNION_ROOM_LEADERS) != 0xFF) - retVal = PLIST_1; + retVal = PLIST_NEW_PLAYER; return retVal; } @@ -3858,7 +3858,7 @@ static void ClearRfuPlayerList(struct RfuPlayer *players, u8 count) players[i].timeoutCounter = 255; players[i].groupScheduledAnim = UNION_ROOM_SPAWN_NONE; players[i].useRedText = FALSE; - players[i].field_1B = 0; + players[i].newPlayerCountdown = 0; } } @@ -3948,7 +3948,7 @@ static u8 TryAddIncomingPlayerToList(struct RfuPlayer *players, struct RfuIncomi players[i].rfu = incomingPlayer->rfu; players[i].timeoutCounter = 0; players[i].groupScheduledAnim = UNION_ROOM_SPAWN_IN; - players[i].field_1B = 64; + players[i].newPlayerCountdown = 64; incomingPlayer->active = FALSE; return i; } From 7c5c41f23c0159667675d98dc1360f92097b34f9 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 7 Oct 2021 16:19:02 -0400 Subject: [PATCH 041/417] Combine link slot length constants --- include/link_rfu.h | 20 +++++++------------- src/link_rfu_2.c | 14 +++++++------- src/link_rfu_3.c | 32 ++++++++++++++------------------ 3 files changed, 28 insertions(+), 38 deletions(-) diff --git a/include/link_rfu.h b/include/link_rfu.h index df2b80c4fa..ae123c223c 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -25,14 +25,10 @@ #define RFU_SERIAL_UNKNOWN 0x0000 // Unreferenced acceptable serial number. Gamecube? #define RFU_SERIAL_END 0xFFFF +#define COMM_SLOT_LENGTH 14 #define RECV_QUEUE_NUM_SLOTS 32 -#define RECV_QUEUE_SLOT_LENGTH (14 * MAX_RFU_PLAYERS) - #define SEND_QUEUE_NUM_SLOTS 40 -#define SEND_QUEUE_SLOT_LENGTH 14 - #define BACKUP_QUEUE_NUM_SLOTS 2 -#define BACKUP_QUEUE_SLOT_LENGTH 14 #define RFU_PACKET_SIZE 6 @@ -50,8 +46,6 @@ #define RFU_STATUS_CHILD_LEAVE 11 #define RFU_STATUS_ACK_JOIN_GROUP 12 -#define CHILD_DATA_LENGTH 14 - // Values for disconnectMode enum { RFU_DISCONNECT_NONE, @@ -143,7 +137,7 @@ struct RfuBlockSend struct RfuRecvQueue { - /* 0x000 */ u8 slots[RECV_QUEUE_NUM_SLOTS][RECV_QUEUE_SLOT_LENGTH]; + /* 0x000 */ u8 slots[RECV_QUEUE_NUM_SLOTS][COMM_SLOT_LENGTH * MAX_RFU_PLAYERS]; /* 0x8c0 */ vu8 recvSlot; /* 0x8c1 */ vu8 sendSlot; /* 0x8c2 */ vu8 count; @@ -152,7 +146,7 @@ struct RfuRecvQueue struct RfuSendQueue { - /* 0x000 */ u8 slots[SEND_QUEUE_NUM_SLOTS][SEND_QUEUE_SLOT_LENGTH]; + /* 0x000 */ u8 slots[SEND_QUEUE_NUM_SLOTS][COMM_SLOT_LENGTH]; /* 0x230 */ vu8 recvSlot; /* 0x231 */ vu8 sendSlot; /* 0x232 */ vu8 count; @@ -161,7 +155,7 @@ struct RfuSendQueue struct RfuBackupQueue { - /* 0x00 */ u8 slots[BACKUP_QUEUE_NUM_SLOTS][BACKUP_QUEUE_SLOT_LENGTH]; + /* 0x00 */ u8 slots[BACKUP_QUEUE_NUM_SLOTS][COMM_SLOT_LENGTH]; /* 0x1c */ vu8 recvSlot; /* 0x1d */ vu8 sendSlot; /* 0x1e */ vu8 count; @@ -180,8 +174,8 @@ struct RfuManager /* 0x00f */ u8 unused2; /* 0x010 */ u16 errorParam0; /* 0x012 */ u16 errorParam1; - /* 0x014 */ u8 childRecvBuffer[RFU_CHILD_MAX][CHILD_DATA_LENGTH]; - /* 0x04c */ u8 childSendBuffer[CHILD_DATA_LENGTH]; + /* 0x014 */ u8 childRecvBuffer[RFU_CHILD_MAX][COMM_SLOT_LENGTH]; + /* 0x04c */ u8 childSendBuffer[COMM_SLOT_LENGTH]; /* 0x05a */ u8 blockRequestType; /* 0x05b */ u8 blockSendAttempts; /* 0x05c */ bool8 blockReceived[MAX_RFU_PLAYERS]; @@ -211,7 +205,7 @@ struct RfuManager /* 0xc3c */ vu8 linkRecovered; /* 0xc3d */ u8 reconnectParentId; /* 0xc3e */ vu8 childSlot; - /* 0xc3f */ u8 childRecvQueue[RECV_QUEUE_SLOT_LENGTH]; + /* 0xc3f */ u8 childRecvQueue[COMM_SLOT_LENGTH * MAX_RFU_PLAYERS]; /* 0xc85 */ u8 leaveGroupStatus; /* 0xc86 */ u8 childRecvStatus; /* 0xc87 */ u8 recvCmds[MAX_RFU_PLAYERS][CMD_LENGTH - 1][2]; diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index 63c54587a9..f2caef9499 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -579,7 +579,7 @@ static void MSCCallback_Child(u16 REQ_commandID) { s32 i; - for (i = 0; i < CHILD_DATA_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH; i++) gRfu.childSendBuffer[i] = 0; rfu_REQ_recvData(); @@ -922,7 +922,7 @@ static void ChildBuildSendCmd(u16 *sendCmd, u8 *dst) } else { - for (i = 0; i < SEND_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH; i++) dst[i] = 0; } } @@ -939,8 +939,8 @@ static bool32 RfuMain1_Child(void) for (i = 0; i < MAX_RFU_PLAYERS; i++) { for (j = 0; j < CMD_LENGTH - 1; j++) - gRecvCmds[i][j] = (recv[i * SEND_QUEUE_SLOT_LENGTH + (j * 2) + 1] << 8) - | recv[i * SEND_QUEUE_SLOT_LENGTH + (j * 2) + 0]; + gRecvCmds[i][j] = (recv[i * COMM_SLOT_LENGTH + (j * 2) + 1] << 8) + | recv[i * COMM_SLOT_LENGTH + (j * 2) + 0]; } RfuHandleReceiveCommand(0); if (lman.childClockSlave_flag == 0 && gRfu.disconnectMode != RFU_DISCONNECT_NONE) @@ -986,8 +986,8 @@ static void HandleSendFailure(u8 unused, u32 flags) for (j = 0; j < CMD_LENGTH - 1; j++) { temp = j * 2; - sResendBlock16[j + 1] = (payload[(SEND_QUEUE_SLOT_LENGTH - 2) * i + temp + 1] << 8) - | payload[(SEND_QUEUE_SLOT_LENGTH - 2) * i + temp + 0]; + sResendBlock16[j + 1] = (payload[(COMM_SLOT_LENGTH - 2) * i + temp + 1] << 8) + | payload[(COMM_SLOT_LENGTH - 2) * i + temp + 0]; } for (j = 0; j < CMD_LENGTH - 1; j++) { @@ -2953,7 +2953,7 @@ static void Debug_PrintStatus(void) } for (i = 0; i < RFU_CHILD_MAX; i++) { - for (j = 0; j < CHILD_DATA_LENGTH; j++) + for (j = 0; j < COMM_SLOT_LENGTH; j++) Debug_PrintNum(gRfu.childRecvBuffer[i][j], j * 2, i + 11, 2); } Debug_PrintString(sASCII_NowSlot, 1, 15); diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index 162c23a575..b513ae4cb1 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -317,10 +317,8 @@ void RfuRecvQueue_Reset(struct RfuRecvQueue *queue) for (i = 0; i < RECV_QUEUE_NUM_SLOTS; i++) { - for (j = 0; j < RECV_QUEUE_SLOT_LENGTH; j++) - { + for (j = 0; j < COMM_SLOT_LENGTH * MAX_RFU_PLAYERS; j++) queue->slots[i][j] = 0; - } } queue->sendSlot = 0; queue->recvSlot = 0; @@ -335,7 +333,7 @@ void RfuSendQueue_Reset(struct RfuSendQueue *queue) for (i = 0; i < SEND_QUEUE_NUM_SLOTS; i++) { - for (j = 0; j < SEND_QUEUE_SLOT_LENGTH; j++) + for (j = 0; j < COMM_SLOT_LENGTH; j++) queue->slots[i][j] = 0; } queue->sendSlot = 0; @@ -371,21 +369,21 @@ void RfuRecvQueue_Enqueue(struct RfuRecvQueue *queue, u8 *data) imeBak = REG_IME; REG_IME = 0; count = 0; - for (i = 0; i < RECV_QUEUE_SLOT_LENGTH; i += RECV_QUEUE_SLOT_LENGTH / MAX_RFU_PLAYERS) + for (i = 0; i < COMM_SLOT_LENGTH * MAX_RFU_PLAYERS; i += COMM_SLOT_LENGTH) { if (data[i] == 0 && data[i + 1] == 0) count++; } if (count != MAX_RFU_PLAYERS) { - for (i = 0; i < RECV_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH * MAX_RFU_PLAYERS; i++) queue->slots[queue->recvSlot][i] = data[i]; queue->recvSlot++; queue->recvSlot %= RECV_QUEUE_NUM_SLOTS; queue->count++; - for (i = 0; i < RECV_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH * MAX_RFU_PLAYERS; i++) data[i] = 0; } REG_IME = imeBak; @@ -405,22 +403,20 @@ void RfuSendQueue_Enqueue(struct RfuSendQueue *queue, u8 *data) { imeBak = REG_IME; REG_IME = 0; - for (i = 0; i < SEND_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH; i++) { if (data[i] != 0) break; } - if (i != SEND_QUEUE_SLOT_LENGTH) + if (i != COMM_SLOT_LENGTH) { - for (i = 0; i < SEND_QUEUE_SLOT_LENGTH; i++) - { + for (i = 0; i < COMM_SLOT_LENGTH; i++) queue->slots[queue->recvSlot][i] = data[i]; - } queue->recvSlot++; queue->recvSlot %= SEND_QUEUE_NUM_SLOTS; queue->count++; - for (i = 0; i < SEND_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH; i++) data[i] = 0; } REG_IME = imeBak; @@ -440,13 +436,13 @@ bool8 RfuRecvQueue_Dequeue(struct RfuRecvQueue *queue, u8 *src) REG_IME = 0; if (queue->recvSlot == queue->sendSlot || queue->full) { - for (i = 0; i < RECV_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH * MAX_RFU_PLAYERS; i++) src[i] = 0; REG_IME = imeBak; return FALSE; } - for (i = 0; i < RECV_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH * MAX_RFU_PLAYERS; i++) { src[i] = queue->slots[queue->sendSlot][i]; } @@ -467,7 +463,7 @@ bool8 RfuSendQueue_Dequeue(struct RfuSendQueue *queue, u8 *src) imeBak = REG_IME; REG_IME = 0; - for (i = 0; i < SEND_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH; i++) src[i] = queue->slots[queue->sendSlot][i]; queue->sendSlot++; @@ -487,7 +483,7 @@ void RfuBackupQueue_Enqueue(struct RfuBackupQueue *queue, const u8 *data) } else { - for (i = 0; i < BACKUP_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH; i++) queue->slots[queue->recvSlot][i] = data[i]; queue->recvSlot++; @@ -509,7 +505,7 @@ bool8 RfuBackupQueue_Dequeue(struct RfuBackupQueue *queue, u8 *src) if (src != NULL) { - for (i = 0; i < BACKUP_QUEUE_SLOT_LENGTH; i++) + for (i = 0; i < COMM_SLOT_LENGTH; i++) src[i] = queue->slots[queue->sendSlot][i]; } queue->sendSlot++; From 6012cf43cbfc27e37fedae41136e13a62ccdd61c Mon Sep 17 00:00:00 2001 From: IIMarckus Date: Fri, 8 Oct 2021 04:57:05 -0600 Subject: [PATCH 042/417] Kill Freenode. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7adbb3e2da..c23965485f 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,4 @@ Other disassembly and/or decompilation projects: ## Contacts -You can find us on [Discord](https://discord.gg/d5dubZ3) and [IRC](https://kiwiirc.com/client/irc.freenode.net/?#pret). +You can find us on [Discord](https://discord.gg/d5dubZ3) and [IRC](https://web.libera.chat/?#pret). From 31b501e7eb6ba15602dd13f6a2d728fca9f04ca5 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 4 Oct 2021 10:21:03 -0400 Subject: [PATCH 043/417] Start misc battle documentation --- .gitignore | 1 + asm/macros/battle_anim_script.inc | 76 +-- data/battle_anim_scripts.s | 46 +- data/battle_scripts_1.s | 4 +- .../unused_water.bin} | Bin .../unused_water_gfx.png} | Bin include/battle.h | 46 +- include/battle_anim.h | 8 +- include/battle_arena.h | 1 - include/battle_gfx_sfx_util.h | 1 - include/battle_main.h | 14 +- include/battle_pyramid_bag.h | 1 - include/battle_transition.h | 107 ++-- include/battle_util.h | 58 +-- include/constants/battle.h | 13 + include/constants/battle_anim.h | 2 +- include/contest.h | 2 +- include/gym_leader_rematch.h | 6 +- include/recorded_battle.h | 6 +- src/battle_ai_script_commands.c | 2 +- src/battle_anim.c | 227 ++++----- src/battle_anim_effects_2.c | 8 +- src/battle_anim_effects_3.c | 4 +- src/battle_anim_ice.c | 4 +- src/battle_anim_mons.c | 75 +-- src/battle_anim_rock.c | 2 +- src/battle_anim_utility_funcs.c | 8 +- src/battle_anim_water.c | 7 +- src/battle_bg.c | 23 +- src/battle_controller_player.c | 14 +- src/battle_gfx_sfx_util.c | 19 +- src/battle_intro.c | 23 +- src/battle_main.c | 451 +++++++++-------- src/battle_message.c | 3 +- src/battle_script_commands.c | 116 ++--- src/battle_setup.c | 63 ++- src/battle_tower.c | 20 +- src/battle_util.c | 455 +++++++----------- src/battle_util2.c | 8 +- src/contest.c | 12 +- src/data/text/match_call_messages.h | 2 +- src/party_menu.c | 4 +- src/pokeball.c | 4 +- src/pokemon.c | 3 +- src/pokenav_match_call_data.c | 2 +- src/recorded_battle.c | 82 ++-- 46 files changed, 1002 insertions(+), 1031 deletions(-) rename graphics/{unknown/unknown_593FFC.bin => battle_anims/unused_water.bin} (100%) rename graphics/{unknown/unknown_593C80.png => battle_anims/unused_water_gfx.png} (100%) diff --git a/.gitignore b/.gitignore index 38c3e02d67..9286b03c46 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ porymap.project.cfg *.a .fuse_hidden* *.sna +*.diff diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc index 5426cdfba3..df8953a85a 100644 --- a/asm/macros/battle_anim_script.inc +++ b/asm/macros/battle_anim_script.inc @@ -34,20 +34,20 @@ .Lcreatetask_\@_2: .endm - .macro delay param0:req + .macro delay frames:req .byte 0x4 - .byte \param0 + .byte \frames .endm .macro waitforvisualfinish .byte 0x5 .endm - .macro hang1 + .macro nop .byte 0x6 .endm - .macro hang2 + .macro nop2 .byte 0x7 .endm @@ -79,30 +79,30 @@ .byte 0xd .endm - .macro call param0:req + .macro call ptr:req .byte 0xe - .4byte \param0 + .4byte \ptr .endm .macro return .byte 0xf .endm - .macro setarg param0:req, param1:req + .macro setarg argId:req, value:req .byte 0x10 - .byte \param0 - .2byte \param1 + .byte \argId + .2byte \value .endm - .macro choosetwoturnanim param0:req, param1:req + .macro choosetwoturnanim ptr1:req, ptr2:req .byte 0x11 - .4byte \param0 - .4byte \param1 + .4byte \ptr1 + .4byte \ptr2 .endm - .macro jumpifmoveturn param0:req, ptr:req + .macro jumpifmoveturn value:req, ptr:req .byte 0x12 - .byte \param0 + .byte \value .4byte \ptr .endm @@ -144,13 +144,13 @@ .byte \pan .endm - .macro panse_1B se:req, param1:req, param2:req, param3:req, param4:req + .macro panse se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req .byte 0x1b .2byte \se - .byte \param1 - .byte \param2 - .byte \param3 - .byte \param4 + .byte \currentPan + .byte \targetPan + .byte \incrementPan + .byte \delay .endm .macro loopsewithpan se:req, pan:req, wait:req, times:req @@ -168,9 +168,9 @@ .byte \wait .endm - .macro setbldcnt param0:req + .macro setbldcnt bldcnt:req .byte 0x1e - .2byte \param0 + .2byte \bldcnt .endm .macro createsoundtask addr:req, argv:vararg @@ -186,10 +186,10 @@ .byte 0x20 .endm - .macro jumpargeq param0:req, param1:req, ptr:req + .macro jumpargeq argId:req, value:req, ptr:req .byte 0x21 - .byte \param0 - .2byte \param1 + .byte \argId + .2byte \value .4byte \ptr .endm @@ -208,29 +208,29 @@ .4byte \ptr .endm - .macro fadetobgfromset param0:req, param1:req, param2:req + .macro fadetobgfromset bgOpponent:req, bgPlayer:req, bgContest:req .byte 0x25 - .byte \param0 - .byte \param1 - .byte \param2 + .byte \bgOpponent + .byte \bgPlayer + .byte \bgContest .endm - .macro panse_26 se:req, param1:req, param2:req, param3:req, param4:req + .macro panse_adjustnone se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req .byte 0x26 .2byte \se - .byte \param1 - .byte \param2 - .byte \param3 - .byte \param4 + .byte \currentPan + .byte \targetPan + .byte \incrementPan + .byte \delay .endm - .macro panse_27 se:req, param1:req, param2:req, param3:req, param4:req + .macro panse_adjustall se:req, currentPan:req, targetPan:req, incrementPan:req, delay:req .byte 0x27 .2byte \se - .byte \param1 - .byte \param2 - .byte \param3 - .byte \param4 + .byte \currentPan + .byte \targetPan + .byte \incrementPan + .byte \delay .endm .macro monbgprio_28 battler:req diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 83b1f3cea0..208bab8a62 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -2234,7 +2234,7 @@ Move_ICY_WIND: playsewithpan SE_M_ICY_WIND, 0 waitbgfadein waitforvisualfinish - panse_1B SE_M_GUST, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_GUST, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 call IcyWindSwirlingSnowballs delay 5 call IcyWindSwirlingSnowballs @@ -2551,7 +2551,7 @@ Move_SING: monbg ANIM_DEF_PARTNER createvisualtask AnimTask_MusicNotesRainbowBlend, 2 waitforvisualfinish - panse_1B SE_M_SING, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_SING, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 7, 0, 12 delay 5 createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 6, 1, 12 @@ -3460,7 +3460,7 @@ Move_HEAT_WAVE: createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_FLYING_DIRT, 0, 6, 6, RGB_RED createvisualtask AnimTask_LoadSandstormBackground, 5, TRUE createvisualtask AnimTask_BlendBackground, 6, 6, RGB_RED - panse_1B SE_M_HEAT_WAVE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_HEAT_WAVE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 delay 4 createvisualtask AnimTask_MoveHeatWaveTargets, 5 delay 12 @@ -4232,7 +4232,7 @@ Move_GRASS_WHISTLE: waitforvisualfinish createvisualtask AnimTask_MusicNotesRainbowBlend, 2 waitforvisualfinish - panse_1B SE_M_GRASSWHISTLE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_GRASSWHISTLE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 7, 1, 0 delay 5 createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 6, 1, 0 @@ -4464,7 +4464,7 @@ Move_WATER_SPORT: delay 44 playsewithpan SE_M_SURF, SOUND_PAN_ATTACKER delay 44 - panse_1B SE_M_SURF, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_SURF, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 end Move_CALM_MIND: @@ -5475,7 +5475,7 @@ SolarBeamAbsorbEffect: return SolarBeamUnleash: call SetSolarbeamBg - panse_1B SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 createvisualtask AnimTask_CreateSmallSolarbeamOrbs, 5 createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0 delay 4 @@ -5527,7 +5527,7 @@ BlizzardContinue: createvisualtask AnimTask_StartSlidingBg, 5, -2304, 0, 1, -1 waitbgfadein waitforvisualfinish - panse_1B SE_M_BLIZZARD, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_BLIZZARD, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 call BlizzardIceCrystals call BlizzardIceCrystals playsewithpan SE_M_BLIZZARD2, SOUND_PAN_TARGET @@ -5573,7 +5573,7 @@ Move_POWDER_SNOW: monbg ANIM_DEF_PARTNER createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 1, 0, 3, RGB_BLACK waitforvisualfinish - panse_1B SE_M_GUST, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_GUST, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 call PowderSnowSnowballs call PowderSnowSnowballs playsewithpan SE_M_GUST2, SOUND_PAN_TARGET @@ -5610,7 +5610,7 @@ Move_HYDRO_PUMP: setalpha 12, 8 createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 40, 1 delay 6 - panse_1B SE_M_HYDRO_PUMP, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_HYDRO_PUMP, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 createvisualtask AnimTask_StartSinAnimTimer, 5, 100 call HydroPumpBeams call HydroPumpBeams @@ -5655,7 +5655,7 @@ Move_SIGNAL_BEAM: loadspritegfx ANIM_TAG_DUCK createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 25, 1 delay 6 - panse_1B SE_M_BUBBLE_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 + panse SE_M_BUBBLE_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 createvisualtask AnimTask_StartSinAnimTimer, 5, 100 call SignalBeamOrbs call SignalBeamOrbs @@ -6297,7 +6297,7 @@ Move_CRABHAMMER: Move_SURF: createvisualtask AnimTask_CreateSurfWave, 2, FALSE delay 24 - panse_1B SE_M_SURF, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_SURF, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 waitforvisualfinish end @@ -6309,7 +6309,7 @@ Move_FLAMETHROWER: createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 46, 1 delay 6 createvisualtask AnimTask_StartSinAnimTimer, 5, 100 - panse_1B SE_M_FLAMETHROWER, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_FLAMETHROWER, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 call FlamethrowerCreateFlames call FlamethrowerCreateFlames call FlamethrowerCreateFlames @@ -6722,7 +6722,7 @@ Move_SUNNY_DAY: setalpha 13, 3 createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 1, 0, 6, RGB_WHITE waitforvisualfinish - panse_26 SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 + panse_adjustnone SE_M_PETAL_DANCE, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 call SunnyDayLightRay call SunnyDayLightRay call SunnyDayLightRay @@ -7599,7 +7599,7 @@ Move_MIMIC: setalpha 11, 5 monbg_22 ANIM_DEF_PARTNER monbgprio_29 - panse_1B SE_M_MINIMIZE, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, -3, 0 + panse SE_M_MINIMIZE, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, -3, 0 createvisualtask AnimTask_ShrinkTargetCopy, 5, 128, 24 delay 15 createsprite gMimicOrbSpriteTemplate, ANIM_TARGET, 2, -12, 24 @@ -7943,7 +7943,7 @@ Move_PERISH_SONG: createsprite gPerishSongMusicNoteSpriteTemplate, ANIM_ATTACKER, 4, 15, 0, 240 createsprite gPerishSongMusicNote2SpriteTemplate, ANIM_ATTACKER, 4, 15, 0, 0 delay 20 - panse_1B SE_M_PERISH_SONG, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_PERISH_SONG, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 delay 80 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 0, 16, RGB_BLACK createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 4, 0 @@ -8150,7 +8150,7 @@ Move_WISH: loadspritegfx ANIM_TAG_SPARKLE_2 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 0, 10, RGB_BLACK waitforvisualfinish - panse_27 SE_M_REFLECT, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, -3, 0 + panse_adjustall SE_M_REFLECT, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, -3, 0 createsprite gWishStarSpriteTemplate, ANIM_ATTACKER, 40 waitforvisualfinish delay 60 @@ -8591,7 +8591,7 @@ ArmThrustLeft: goto ArmThrustContinue Move_MUDDY_WATER: - panse_1B SE_M_WHIRLPOOL, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_WHIRLPOOL, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 createvisualtask AnimTask_CreateSurfWave, 2, TRUE waitforvisualfinish end @@ -8689,7 +8689,7 @@ Move_MUD_SHOT: createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 46, 1 delay 6 createvisualtask AnimTask_StartSinAnimTimer, 5, 100 - panse_1B SE_M_WHIRLPOOL, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 + panse SE_M_WHIRLPOOL, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 call MudShotOrbs call MudShotOrbs call MudShotOrbs @@ -8717,7 +8717,7 @@ Move_METEOR_MASH: loadspritegfx ANIM_TAG_GOLD_STARS loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_HANDS_AND_FEET - panse_1B SE_M_BARRIER, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +3, 0 + panse SE_M_BARRIER, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +3, 0 fadetobg BG_COSMIC waitbgfadein waitforvisualfinish @@ -8860,7 +8860,7 @@ Move_METAL_SOUND: waitforvisualfinish end MetalSoundRings: - panse_1B SE_M_SCREECH, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_SCREECH, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 createsprite gMetalSoundSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 30, 0 delay 2 return @@ -9154,7 +9154,7 @@ Move_ROCK_TOMB: Move_SILVER_WIND: loadspritegfx ANIM_TAG_SPARKLE_6 - panse_1B SE_M_GUST, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_GUST, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 playsewithpan SE_M_MORNING_SUN, 0 delay 0 monbg ANIM_DEF_PARTNER @@ -9368,7 +9368,7 @@ Move_HYDRO_CANNON: delay 10 createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 30 - panse_1B SE_M_HYDRO_PUMP, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 + panse SE_M_HYDRO_PUMP, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 call HydroCannonBeam createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 10, 0, 40, 1 createsprite gWaterHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 @@ -10296,7 +10296,7 @@ Status_Nightmare: General_CastformChange: createvisualtask AnimTask_IsMonInvisible, 2 - jumpreteq 1, CastformChangeSkipAnim + jumpreteq TRUE, CastformChangeSkipAnim goto CastformChangeContinue CastformChangeContinue: monbg ANIM_ATTACKER diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 951558234b..203ea31256 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2829,10 +2829,12 @@ BattleScript_HandleFaintedMon:: jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonTryChooseAnother jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonTryChooseAnother +@ Yes/No for sending out a new Pokémon, when sending out is optional printstring STRINGID_USENEXTPKMN setbyte gBattleCommunication, 0 yesnobox jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0, BattleScript_FaintedMonTryChooseAnother +@ Player said no, try to run jumpifplayerran BattleScript_FaintedMonEnd printstring STRINGID_CANTESCAPE2 BattleScript_FaintedMonTryChooseAnother:: @@ -2904,7 +2906,7 @@ BattleScript_HandleFaintedMonLoop:: hidepartystatussummary BS_FAINTED switchinanim BS_FAINTED, FALSE waitstate - switchineffects 5 + switchineffects BS_UNK_5 jumpifbytenotequal gBattlerFainted, gBattlersCount, BattleScript_HandleFaintedMonLoop BattleScript_HandleFaintedMonMultipleEnd:: end2 diff --git a/graphics/unknown/unknown_593FFC.bin b/graphics/battle_anims/unused_water.bin similarity index 100% rename from graphics/unknown/unknown_593FFC.bin rename to graphics/battle_anims/unused_water.bin diff --git a/graphics/unknown/unknown_593C80.png b/graphics/battle_anims/unused_water_gfx.png similarity index 100% rename from graphics/unknown/unknown_593C80.png rename to graphics/battle_anims/unused_water_gfx.png diff --git a/include/battle.h b/include/battle.h index e32e621cc4..5ccff8ce33 100644 --- a/include/battle.h +++ b/include/battle.h @@ -32,7 +32,6 @@ #define B_ACTION_EXEC_SCRIPT 10 #define B_ACTION_TRY_FINISH 11 #define B_ACTION_FINISHED 12 - #define B_ACTION_CANCEL_PARTNER 12 // when choosing an action #define B_ACTION_NOTHING_FAINTED 13 // when choosing an action #define B_ACTION_NONE 0xFF @@ -50,14 +49,17 @@ #define MSG_DISPLAY 7 #define BATTLE_COMMUNICATION_ENTRIES_COUNT 8 -#define MOVE_TARGET_SELECTED 0x0 -#define MOVE_TARGET_DEPENDS 0x1 -#define MOVE_TARGET_USER_OR_SELECTED 0x2 -#define MOVE_TARGET_RANDOM 0x4 -#define MOVE_TARGET_BOTH 0x8 -#define MOVE_TARGET_USER 0x10 -#define MOVE_TARGET_FOES_AND_ALLY 0x20 -#define MOVE_TARGET_OPPONENTS_FIELD 0x40 +#define MOVE_TARGET_SELECTED 0 +#define MOVE_TARGET_DEPENDS (1 << 0) +#define MOVE_TARGET_USER_OR_SELECTED (1 << 1) +#define MOVE_TARGET_RANDOM (1 << 2) +#define MOVE_TARGET_BOTH (1 << 3) +#define MOVE_TARGET_USER (1 << 4) +#define MOVE_TARGET_FOES_AND_ALLY (1 << 5) +#define MOVE_TARGET_OPPONENTS_FIELD (1 << 6) + +// For the second argument of GetMoveTarget, when no target override is needed +#define NO_TARGET_OVERRIDE 0 #define BATTLE_BUFFER_LINK_SIZE 0x1000 @@ -115,7 +117,7 @@ struct ProtectStruct u32 confusionSelfDmg:1; u32 targetNotAffected:1; u32 chargingTurn:1; - u32 fleeFlag:2; // For RunAway and Smoke Ball. + u32 fleeType:2; // 0: Normal, 1: FLEE_ITEM, 2: FLEE_ABILITY u32 usedImprisonedMove:1; u32 loveImmobility:1; u32 usedDisabledMove:1; @@ -426,7 +428,7 @@ struct BattleStruct u8 unused_6[3]; u8 givenExpMons; // Bits for enemy party's pokemon that gave exp to player's party. u8 lastTakenMoveFrom[MAX_BATTLERS_COUNT * MAX_BATTLERS_COUNT * 2]; // a 3-D array [target][attacker][byte] - u16 castformPalette[MAX_BATTLERS_COUNT][16]; + u16 castformPalette[NUM_CASTFORM_FORMS][16]; union { struct LinkBattlerHeader linkBattlerHeader; u32 battleVideo[2]; @@ -447,12 +449,16 @@ struct BattleStruct u8 alreadyStatusedMoveAttempt; // As bits for battlers; For example when using Thunder Wave on an already paralyzed pokemon. }; -#define GET_MOVE_TYPE(move, typeArg) \ -{ \ - if (gBattleStruct->dynamicMoveType) \ - typeArg = gBattleStruct->dynamicMoveType & 0x3F; \ - else \ - typeArg = gBattleMoves[move].type; \ +#define F_DYNAMIC_TYPE_1 (1 << 6) +#define F_DYNAMIC_TYPE_2 (1 << 7) +#define DYNAMIC_TYPE_MASK (F_DYNAMIC_TYPE_1 - 1) + +#define GET_MOVE_TYPE(move, typeArg) \ +{ \ + if (gBattleStruct->dynamicMoveType) \ + typeArg = gBattleStruct->dynamicMoveType & DYNAMIC_TYPE_MASK; \ + else \ + typeArg = gBattleMoves[move].type; \ } #define IS_TYPE_PHYSICAL(moveType)(moveType < TYPE_MYSTERY) @@ -502,7 +508,7 @@ struct BattleScripting u8 reshowMainState; u8 reshowHelperState; u8 levelUpHP; - u8 windowsType; // 0 - normal, 1 - battle arena + u8 windowsType; // B_WIN_TYPE_* u8 multiplayerId; u8 specialTrainerBattleType; }; @@ -624,8 +630,8 @@ extern u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT]; extern u32 gBattleTypeFlags; extern u8 gBattleTerrain; extern u32 gUnusedFirstBattleVar1; -extern u8 *gUnknown_0202305C; -extern u8 *gUnknown_02023060; +extern u8 *gBattleAnimBgTileBuffer; +extern u8 *gBattleAnimBgTilemapBuffer; extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; extern u8 gActiveBattler; diff --git a/include/battle_anim.h b/include/battle_anim.h index ad160e74d8..3f73f1daf6 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -64,12 +64,12 @@ s8 BattleAnimAdjustPanning(s8 pan); s8 BattleAnimAdjustPanning2(s8 pan); s16 KeepPanInRange(s16 a, int oldPan); s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan); -void sub_80A4720(u16 a, u16 *b, u32 c, u8 d); +void RelocateBattleBgPal(u16 paletteNum, u16 *dest, u32 offset, bool8 largeScreen); void ResetBattleAnimBg(bool8); // battle_intro.c void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value); -void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *arg5, u16 *arg6, u16 arg7); +void DrawBattlerOnBg(int bgId, u8 x, u8 y, u8 battlerPosition, u8 paletteId, u8 *tiles, u16 *tilemap, u16 tilesOffset); void HandleIntroSlide(u8 terrainId); int GetAnimBgAttribute(u8 bgId, u8 attributeId); @@ -107,7 +107,7 @@ void AnimTranslateLinear_WaitEnd(struct Sprite *sprite); u8 GetBattlerSpriteBGPriority(u8 battlerId); void *LoadPointerFromVars(s16 bottom, s16 top); void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr); -void sub_80A8278(void); +void InitPrioritiesForVisibleBattlers(void); void GetBattleAnimBg1Data(struct BattleAnimBgData*); void GetBattleAnimBgData(struct BattleAnimBgData*, u32 arg1); u8 GetBattlerSpriteSubpriority(u8 battlerId); @@ -125,7 +125,7 @@ u8 AnimDummyReturnArg(u8 battler); s16 CloneBattlerSpriteWithBlend(u8); void obj_delete_but_dont_free_vram(struct Sprite*); u8 CreateInvisibleSpriteCopy(int, u8, int); -void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void*, u32); +void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void*, bool32); void AnimLoadCompressedBgGfx(u32, const u32*, u32); void UpdateAnimBg3ScreenSize(bool8); void TranslateSpriteInGrowingCircleOverDuration(struct Sprite *); diff --git a/include/battle_arena.h b/include/battle_arena.h index b55fc39b00..c9a18ef618 100644 --- a/include/battle_arena.h +++ b/include/battle_arena.h @@ -7,7 +7,6 @@ void BattleArena_InitPoints(void); void BattleArena_AddMindPoints(u8 battler); void BattleArena_AddSkillPoints(u8 battler); void BattleArena_DeductMindPoints(u8 battler, u16 stringId); -void sub_81A586C(u8 battler); void DrawArenaRefereeTextBox(void); void EraseArenaRefereeTextBox(void); diff --git a/include/battle_gfx_sfx_util.h b/include/battle_gfx_sfx_util.h index a367bc043a..383facd694 100644 --- a/include/battle_gfx_sfx_util.h +++ b/include/battle_gfx_sfx_util.h @@ -18,7 +18,6 @@ void DecompressTrainerFrontPic(u16 frontPicId, u8 battlerId); void DecompressTrainerBackPic(u16 backPicId, u8 battlerId); void BattleGfxSfxDummy3(u8 gender); void FreeTrainerFrontPicPalette(u16 frontPicId); -void sub_805DFFC(void); bool8 BattleLoadAllHealthBoxesGfx(u8 state); void LoadBattleBarGfx(u8 arg0); bool8 BattleInitAllSprites(u8 *state1, u8 *battlerId); diff --git a/include/battle_main.h b/include/battle_main.h index 78cf353dfc..f3e961b7bf 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -7,7 +7,8 @@ struct TrainerMoney u8 value; }; -struct UnknownPokemonStruct4 +// For displaying a multi battle partner's Pokémon in the party menu +struct MultiPartnerMenuPokemon { /*0x00*/ u16 species; /*0x02*/ u16 heldItem; @@ -46,8 +47,6 @@ struct UnknownPokemonStruct4 void CB2_InitBattle(void); void BattleMainCB2(void); void CB2_QuitRecordedBattle(void); -void sub_8038528(struct Sprite* sprite); -void sub_8038A04(void); // unused void VBlankCB_Battle(void); void SpriteCB_VsLetterDummy(struct Sprite *sprite); void SpriteCB_VsLetterInit(struct Sprite *sprite); @@ -59,13 +58,12 @@ void SpriteCallbackDummy_2(struct Sprite *sprite); void SpriteCB_FaintOpponentMon(struct Sprite *sprite); void SpriteCb_ShowAsMoveTarget(struct Sprite *sprite); void SpriteCb_HideAsMoveTarget(struct Sprite *sprite); -void SpriteCb_OpponentMonFromBall(struct Sprite *sprite); +void SpriteCB_OpponentMonFromBall(struct Sprite *sprite); void SpriteCB_BattleSpriteStartSlideLeft(struct Sprite *sprite); void SpriteCB_FaintSlideAnim(struct Sprite *sprite); void DoBounceEffect(u8 battlerId, u8 b, s8 c, s8 d); void EndBounceEffect(u8 battlerId, bool8 b); -void SpriteCb_PlayerMonFromBall(struct Sprite *sprite); -void sub_8039E60(struct Sprite *sprite); +void SpriteCB_PlayerMonFromBall(struct Sprite *sprite); void SpriteCB_TrainerThrowObject(struct Sprite *sprite); void sub_8039E9C(struct Sprite *sprite); void BeginBattleIntroDummy(void); @@ -82,9 +80,9 @@ void RunBattleScriptCommands(void); bool8 TryRunFromBattle(u8 battlerId); void SpecialStatusesClear(void); -extern struct UnknownPokemonStruct4 gMultiPartnerParty[MULTI_PARTY_SIZE]; +extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE]; -extern const struct SpriteTemplate gUnknown_0831AC88; +extern const struct SpriteTemplate gUnusedBattleInitSprite; extern const struct OamData gOamData_BattleSpriteOpponentSide; extern const struct OamData gOamData_BattleSpritePlayerSide; extern const u8 gTypeEffectiveness[336]; diff --git a/include/battle_pyramid_bag.h b/include/battle_pyramid_bag.h index b8b3eb20fb..258ca56b21 100644 --- a/include/battle_pyramid_bag.h +++ b/include/battle_pyramid_bag.h @@ -63,7 +63,6 @@ void CB2_PyramidBagMenuFromStartMenu(void); void CB2_ReturnToPyramidBagMenu(void); void UpdatePyramidBagList(void); void UpdatePyramidBagCursorPos(void); -void sub_81C4EFC(void); void GoToBattlePyramidBagMenu(u8 location, void (*exitCallback)(void)); void Task_CloseBattlePyramidBagMessage(u8 taskId); void TryStoreHeldItemsInPyramidBag(void); diff --git a/include/battle_transition.h b/include/battle_transition.h index a33032fb43..784c5f968f 100644 --- a/include/battle_transition.h +++ b/include/battle_transition.h @@ -11,8 +11,7 @@ void GetBg0TilesDst(u16 **tilemap, u16 **tileset); extern const struct SpritePalette gSpritePalette_Pokeball; -enum // TRANSITION_MUGSHOT -{ +enum { MUGSHOT_SIDNEY, MUGSHOT_PHOEBE, MUGSHOT_GLACIA, @@ -21,52 +20,64 @@ enum // TRANSITION_MUGSHOT MUGSHOTS_COUNT }; -// credits for the names go to Dyskinesia, Tetrable and Farore -// names are naturally subject to change +enum { + B_TRANSITION_BLUR, + B_TRANSITION_SWIRL, + B_TRANSITION_SHUFFLE, + B_TRANSITION_BIG_POKEBALL, + B_TRANSITION_POKEBALLS_TRAIL, + B_TRANSITION_CLOCKWISE_BLACKFADE, + B_TRANSITION_RIPPLE, + B_TRANSITION_WAVE, + B_TRANSITION_SLICE, + B_TRANSITION_WHITEFADE, + B_TRANSITION_GRID_SQUARES, + B_TRANSITION_SHARDS, + B_TRANSITION_SIDNEY, + B_TRANSITION_PHOEBE, + B_TRANSITION_GLACIA, + B_TRANSITION_DRAKE, + B_TRANSITION_CHAMPION, + B_TRANSITION_AQUA, // Here below added in Emerald + B_TRANSITION_MAGMA, + B_TRANSITION_REGICE, + B_TRANSITION_REGISTEEL, + B_TRANSITION_REGIROCK, + B_TRANSITION_KYOGRE, + B_TRANSITION_GROUDON, + B_TRANSITION_RAYQUAZA, + B_TRANSITION_SHRED_SPLIT, + B_TRANSITION_BLACKHOLE1, + B_TRANSITION_BLACKHOLE2, + B_TRANSITION_RECTANGULAR_SPIRAL, + B_TRANSITION_FRONTIER_LOGO_WIGGLE, + B_TRANSITION_FRONTIER_LOGO_WAVE, + B_TRANSITION_FRONTIER_SQUARES, + B_TRANSITION_FRONTIER_SQUARES_SCROLL, + B_TRANSITION_FRONTIER_SQUARES_SPIRAL, + B_TRANSITION_FRONTIER_CIRCLES_MEET, + B_TRANSITION_FRONTIER_CIRCLES_CROSS, + B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL, + B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL, + B_TRANSITION_FRONTIER_CIRCLES_MEET_IN_SEQ, + B_TRANSITION_FRONTIER_CIRCLES_CROSS_IN_SEQ, + B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL_IN_SEQ, + B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL_IN_SEQ, + B_TRANSITION_COUNT +}; -#define B_TRANSITION_BLUR 0 -#define B_TRANSITION_SWIRL 1 -#define B_TRANSITION_SHUFFLE 2 -#define B_TRANSITION_BIG_POKEBALL 3 -#define B_TRANSITION_POKEBALLS_TRAIL 4 -#define B_TRANSITION_CLOCKWISE_BLACKFADE 5 -#define B_TRANSITION_RIPPLE 6 -#define B_TRANSITION_WAVE 7 -#define B_TRANSITION_SLICE 8 -#define B_TRANSITION_WHITEFADE 9 -#define B_TRANSITION_GRID_SQUARES 10 -#define B_TRANSITION_SHARDS 11 -#define B_TRANSITION_SIDNEY 12 -#define B_TRANSITION_PHOEBE 13 -#define B_TRANSITION_GLACIA 14 -#define B_TRANSITION_DRAKE 15 -#define B_TRANSITION_CHAMPION 16 -// added in Emerald -#define B_TRANSITION_AQUA 17 -#define B_TRANSITION_MAGMA 18 -#define B_TRANSITION_REGICE 19 -#define B_TRANSITION_REGISTEEL 20 -#define B_TRANSITION_REGIROCK 21 -#define B_TRANSITION_KYOGRE 22 -#define B_TRANSITION_GROUDON 23 -#define B_TRANSITION_RAYQUAZA 24 -#define B_TRANSITION_SHRED_SPLIT 25 -#define B_TRANSITION_BLACKHOLE1 26 -#define B_TRANSITION_BLACKHOLE2 27 -#define B_TRANSITION_RECTANGULAR_SPIRAL 28 -#define B_TRANSITION_FRONTIER_LOGO_WIGGLE 29 -#define B_TRANSITION_FRONTIER_LOGO_WAVE 30 -#define B_TRANSITION_FRONTIER_SQUARES 31 -#define B_TRANSITION_FRONTIER_SQUARES_SCROLL 32 -#define B_TRANSITION_FRONTIER_SQUARES_SPIRAL 33 -#define B_TRANSITION_FRONTIER_CIRCLES_MEET 34 -#define B_TRANSITION_FRONTIER_CIRCLES_CROSS 35 -#define B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL 36 -#define B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL 37 -#define B_TRANSITION_FRONTIER_CIRCLES_MEET_IN_SEQ 38 -#define B_TRANSITION_FRONTIER_CIRCLES_CROSS_IN_SEQ 39 -#define B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL_IN_SEQ 40 -#define B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL_IN_SEQ 41 -#define B_TRANSITION_COUNT 42 +// IDs for GetSpecialBattleTransition +enum { + B_TRANSITION_GROUP_B_TOWER, + B_TRANSITION_GROUP_B_DOME = 3, + B_TRANSITION_GROUP_B_PALACE, + B_TRANSITION_GROUP_B_ARENA, + B_TRANSITION_GROUP_B_FACTORY, + B_TRANSITION_GROUP_B_PIKE, + B_TRANSITION_GROUP_B_PYRAMID = 10, + B_TRANSITION_GROUP_TRAINER_HILL, + B_TRANSITION_GROUP_SECRET_BASE, + B_TRANSITION_GROUP_E_READER, +}; #endif // GUARD_BATTLE_TRANSITION_H diff --git a/include/battle_util.h b/include/battle_util.h index d4e2a23f87..914e44c049 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -6,39 +6,43 @@ #define MOVE_LIMITATION_DISABLED (1 << 2) #define MOVE_LIMITATION_TORMENTED (1 << 3) #define MOVE_LIMITATION_TAUNT (1 << 4) -#define MOVE_LIMITATION_IMPRISON (1 << 5) +#define MOVE_LIMITATION_IMPRISON (1 << 5) +#define MOVE_LIMITATIONS_ALL 0xFF -#define ABILITYEFFECT_ON_SWITCHIN 0x0 -#define ABILITYEFFECT_ENDTURN 0x1 -#define ABILITYEFFECT_MOVES_BLOCK 0x2 -#define ABILITYEFFECT_ABSORBING 0x3 -#define ABILITYEFFECT_ON_DAMAGE 0x4 -#define ABILITYEFFECT_IMMUNITY 0x5 -#define ABILITYEFFECT_FORECAST 0x6 -#define ABILITYEFFECT_SYNCHRONIZE 0x7 -#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8 -#define ABILITYEFFECT_INTIMIDATE1 0x9 -#define ABILITYEFFECT_INTIMIDATE2 0xA -#define ABILITYEFFECT_TRACE 0xB -#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC -#define ABILITYEFFECT_CHECK_BATTLER_SIDE 0xD -#define ABILITYEFFECT_FIELD_SPORT 0xE -#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BATTLER 0xF -#define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10 -#define ABILITYEFFECT_COUNT_BATTLER_SIDE 0x11 -#define ABILITYEFFECT_COUNT_ON_FIELD 0x12 -#define ABILITYEFFECT_CHECK_ON_FIELD 0x13 -#define ABILITYEFFECT_MUD_SPORT 0xFD -#define ABILITYEFFECT_WATER_SPORT 0xFE -#define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF +#define ABILITYEFFECT_ON_SWITCHIN 0 +#define ABILITYEFFECT_ENDTURN 1 +#define ABILITYEFFECT_MOVES_BLOCK 2 +#define ABILITYEFFECT_ABSORBING 3 +#define ABILITYEFFECT_ON_DAMAGE 4 +#define ABILITYEFFECT_IMMUNITY 5 +#define ABILITYEFFECT_FORECAST 6 +#define ABILITYEFFECT_SYNCHRONIZE 7 +#define ABILITYEFFECT_ATK_SYNCHRONIZE 8 +#define ABILITYEFFECT_INTIMIDATE1 9 +#define ABILITYEFFECT_INTIMIDATE2 10 +#define ABILITYEFFECT_TRACE 11 +#define ABILITYEFFECT_CHECK_OTHER_SIDE 12 +#define ABILITYEFFECT_CHECK_BATTLER_SIDE 13 +#define ABILITYEFFECT_FIELD_SPORT 14 +#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BATTLER 15 +#define ABILITYEFFECT_COUNT_OTHER_SIDE 16 +#define ABILITYEFFECT_COUNT_BATTLER_SIDE 17 +#define ABILITYEFFECT_COUNT_ON_FIELD 18 +#define ABILITYEFFECT_CHECK_ON_FIELD 19 +#define ABILITYEFFECT_MUD_SPORT 253 +#define ABILITYEFFECT_WATER_SPORT 254 +#define ABILITYEFFECT_SWITCH_IN_WEATHER 255 #define ABILITY_ON_OPPOSING_FIELD(battlerId, abilityId)(AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, battlerId, abilityId, 0, 0)) #define ABILITY_ON_FIELD(abilityId)(AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, abilityId, 0, 0)) #define ABILITY_ON_FIELD2(abilityId)(AbilityBattleEffects(ABILITYEFFECT_FIELD_SPORT, 0, abilityId, 0, 0)) -#define ITEMEFFECT_ON_SWITCH_IN 0x0 -#define ITEMEFFECT_MOVE_END 0x3 -#define ITEMEFFECT_KINGSROCK_SHELLBELL 0x4 +// For the first argument of ItemBattleEffects, to deteremine which block of item effects to try +#define ITEMEFFECT_ON_SWITCH_IN 0 +#define ITEMEFFECT_NORMAL 1 +#define ITEMEFFECT_DUMMY 2 // Unused, empty +#define ITEMEFFECT_MOVE_END 3 +#define ITEMEFFECT_KINGSROCK_SHELLBELL 4 #define WEATHER_HAS_EFFECT ((!ABILITY_ON_FIELD(ABILITY_CLOUD_NINE) && !ABILITY_ON_FIELD(ABILITY_AIR_LOCK))) #define WEATHER_HAS_EFFECT2 ((!ABILITY_ON_FIELD2(ABILITY_CLOUD_NINE) && !ABILITY_ON_FIELD2(ABILITY_AIR_LOCK))) diff --git a/include/constants/battle.h b/include/constants/battle.h index f1ce757e74..62e7cbbfa3 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -306,4 +306,17 @@ #define B_WAIT_TIME_MED 48 #define B_WAIT_TIME_SHORT 32 +#define CASTFORM_NORMAL 0 +#define CASTFORM_FIRE 1 +#define CASTFORM_WATER 2 +#define CASTFORM_ICE 3 +#define NUM_CASTFORM_FORMS 4 +#define CASTFORM_SUBSTITUTE (1 << 7) + +#define FLEE_ITEM 1 +#define FLEE_ABILITY 2 + +#define B_WIN_TYPE_NORMAL 0 +#define B_WIN_TYPE_ARENA 1 + #endif // GUARD_CONSTANTS_BATTLE_H diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 4622876cc0..177ea04bb1 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -318,7 +318,7 @@ #define SOUND_PAN_TARGET 63 // move background ids -#define BG_DARK_ 0 // the same as BG_DARK but is unused +#define BG_NONE 0 // the same as BG_DARK but is unused #define BG_DARK 1 #define BG_GHOST 2 #define BG_PSYCHIC 3 diff --git a/include/contest.h b/include/contest.h index 9bac63eda5..e7acb5a113 100644 --- a/include/contest.h +++ b/include/contest.h @@ -294,7 +294,7 @@ struct ContestResources u8 * contestBgTilemaps[CONTESTANT_COUNT]; void * boxBlinkTiles1; void * boxBlinkTiles2; - void * field_3c; + void * animBgTileBuffer; }; #define eContest (*gContestResources->contest) diff --git a/include/gym_leader_rematch.h b/include/gym_leader_rematch.h index dd9ead8b7a..b31fb5e228 100644 --- a/include/gym_leader_rematch.h +++ b/include/gym_leader_rematch.h @@ -66,7 +66,7 @@ enum { REMATCH_TRENT, REMATCH_SAWYER, REMATCH_KIRA_AND_DAN, - REMATCH_WALLY_3, // Entries above WALLY are considered normal trainers, from Wally below are special trainers + REMATCH_WALLY_VR, // Entries above WALLY are considered normal trainers, from Wally below are special trainers REMATCH_ROXANNE, REMATCH_BRAWLY, REMATCH_WATTSON, @@ -75,7 +75,7 @@ enum { REMATCH_WINONA, REMATCH_TATE_AND_LIZA, REMATCH_JUAN, - REMATCH_SIDNEY, // Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES. + REMATCH_SIDNEY, // Entries from SIDNEY below are considered part of REMATCH_ELITE_FOUR_ENTRIES. REMATCH_PHOEBE, REMATCH_GLACIA, REMATCH_DRAKE, @@ -83,7 +83,7 @@ enum { REMATCH_TABLE_ENTRIES // The total number of rematch entries. Must be last in enum }; -#define REMATCH_SPECIAL_TRAINER_START REMATCH_WALLY_3 +#define REMATCH_SPECIAL_TRAINER_START REMATCH_WALLY_VR #define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY void UpdateGymLeaderRematch(void); diff --git a/include/recorded_battle.h b/include/recorded_battle.h index 5ae4ac12d5..8ea3927743 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -9,7 +9,7 @@ extern u8 gRecordedBattleMultiplayerId; #define B_RECORD_MODE_PLAYBACK 2 void RecordedBattle_Init(u8 arg0); -void sub_8184E58(void); +void RecordedBattle_SetTrainerInfo(void); void RecordedBattle_SetBattlerAction(u8 battlerId, u8 action); void RecordedBattle_ClearBattlerAction(u8 battlerId, u8 bytesToClear); u8 RecordedBattle_GetBattlerAction(u8 battlerId); @@ -30,8 +30,8 @@ u8 GetTextSpeedInRecordedBattle(void); void RecordedBattle_CopyBattlerMoves(void); void sub_818603C(u8 arg0); u32 GetAiScriptsInRecordedBattle(void); -void sub_8186444(void); -bool8 sub_8186450(void); +void RecordedBattle_SetPlaybackFinished(void); +bool8 RecordedBattle_CanStopPlayback(void); void GetRecordedBattleRecordMixFriendName(u8 *dst); u8 GetRecordedBattleRecordMixFriendClass(void); u8 GetRecordedBattleApprenticeId(void); diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index b1b62fd5b4..6fdfb0d7ae 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -334,7 +334,7 @@ void BattleAI_SetupAIData(u8 defaultScoreMoves) defaultScoreMoves >>= 1; } - moveLimitations = CheckMoveLimitations(gActiveBattler, 0, 0xFF); + moveLimitations = CheckMoveLimitations(gActiveBattler, 0, MOVE_LIMITATIONS_ALL); // Ignore moves that aren't possible to use. for (i = 0; i < MAX_MON_MOVES; i++) diff --git a/src/battle_anim.c b/src/battle_anim.c index 80d511f4c7..6cdbed2b74 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -27,15 +27,14 @@ extern struct MusicPlayerInfo gMPlayInfo_SE2; extern const u16 gMovesWithQuietBGM[]; extern const u8 *const gBattleAnims_Moves[]; -// this file's functions static void ScriptCmd_loadspritegfx(void); static void ScriptCmd_unloadspritegfx(void); static void ScriptCmd_createsprite(void); static void ScriptCmd_createvisualtask(void); static void ScriptCmd_delay(void); static void ScriptCmd_waitforvisualfinish(void); -static void ScriptCmd_hang1(void); -static void ScriptCmd_hang2(void); +static void ScriptCmd_nop(void); +static void ScriptCmd_nop2(void); static void ScriptCmd_end(void); static void ScriptCmd_playse(void); static void ScriptCmd_monbg(void); @@ -55,7 +54,7 @@ static void ScriptCmd_waitbgfadein(void); static void ScriptCmd_changebg(void); static void ScriptCmd_playsewithpan(void); static void ScriptCmd_setpan(void); -static void ScriptCmd_panse_1B(void); +static void ScriptCmd_panse(void); static void ScriptCmd_loopsewithpan(void); static void ScriptCmd_waitplaysewithpan(void); static void ScriptCmd_setbldcnt(void); @@ -66,8 +65,8 @@ static void ScriptCmd_monbg_22(void); static void ScriptCmd_clearmonbg_23(void); static void ScriptCmd_jumpifcontest(void); static void ScriptCmd_fadetobgfromset(void); -static void ScriptCmd_panse_26(void); -static void ScriptCmd_panse_27(void); +static void ScriptCmd_panse_adjustnone(void); +static void ScriptCmd_panse_adjustall(void); static void ScriptCmd_monbgprio_28(void); static void ScriptCmd_monbgprio_29(void); static void ScriptCmd_monbgprio_2A(void); @@ -79,8 +78,8 @@ static void ScriptCmd_stopsound(void); static void RunAnimScriptCommand(void); static void task_pA_ma0A_obj_to_bg_pal(u8 taskId); -static void sub_80A46A0(void); -static void sub_80A4980(u8 taskId); +static void FlipBattlerBgTiles(void); +static void Task_ClearMonBg(u8 taskId); static void sub_80A4BB0(u8 taskId); static void Task_FadeToBg(u8 taskId); static void Task_PanFromInitialToTarget(u8 taskId); @@ -89,11 +88,10 @@ static void Task_WaitAndPlaySE(u8 taskId); static void LoadDefaultBg(void); static void LoadMoveBg(u16 bgId); -// ewram EWRAM_DATA static const u8 *sBattleAnimScriptPtr = NULL; EWRAM_DATA static const u8 *sBattleAnimScriptRetAddr = NULL; EWRAM_DATA void (*gAnimScriptCallback)(void) = NULL; -EWRAM_DATA static s8 gAnimFramesToWait = 0; +EWRAM_DATA static s8 sAnimFramesToWait = 0; EWRAM_DATA bool8 gAnimScriptActive = FALSE; EWRAM_DATA u8 gAnimVisualTaskCount = 0; EWRAM_DATA u8 gAnimSoundTaskCount = 0; @@ -1711,33 +1709,33 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] = const struct BattleAnimBackground gBattleAnimBackgroundTable[] = { - [BG_DARK_] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, - [BG_DARK] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, - [BG_GHOST] = {gBattleAnimBgImage_Ghost, gBattleAnimBgPalette_Ghost, gBattleAnimBgTilemap_Ghost}, - [BG_PSYCHIC] = {gBattleAnimBgImage_Psychic, gBattleAnimBgPalette_Psychic, gBattleAnimBgTilemap_Psychic}, - [BG_IMPACT_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactOpponent}, - [BG_IMPACT_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactPlayer}, - [BG_IMPACT_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactContests}, - [BG_DRILL] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_Drill}, - [BG_DRILL_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_DrillContests}, - [BG_HIGHSPEED_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedOpponent}, - [BG_HIGHSPEED_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedPlayer}, - [BG_THUNDER] = {gBattleAnimBgImage_Thunder, gBattleAnimBgPalette_Thunder, gBattleAnimBgTilemap_Thunder}, + [BG_NONE] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, + [BG_DARK] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, + [BG_GHOST] = {gBattleAnimBgImage_Ghost, gBattleAnimBgPalette_Ghost, gBattleAnimBgTilemap_Ghost}, + [BG_PSYCHIC] = {gBattleAnimBgImage_Psychic, gBattleAnimBgPalette_Psychic, gBattleAnimBgTilemap_Psychic}, + [BG_IMPACT_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactOpponent}, + [BG_IMPACT_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactPlayer}, + [BG_IMPACT_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactContests}, + [BG_DRILL] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_Drill}, + [BG_DRILL_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_DrillContests}, + [BG_HIGHSPEED_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedOpponent}, + [BG_HIGHSPEED_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedPlayer}, + [BG_THUNDER] = {gBattleAnimBgImage_Thunder, gBattleAnimBgPalette_Thunder, gBattleAnimBgTilemap_Thunder}, [BG_GUILLOTINE_OPPONENT] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineOpponent}, - [BG_GUILLOTINE_PLAYER] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotinePlayer}, + [BG_GUILLOTINE_PLAYER] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotinePlayer}, [BG_GUILLOTINE_CONTESTS] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineContests}, - [BG_ICE] = {gBattleAnimBgImage_Ice, gBattleAnimBgPalette_Ice, gBattleAnimBgTilemap_Ice}, - [BG_COSMIC] = {gBattleAnimBgImage_Cosmic, gBattleAnimBgPalette_Cosmic, gBattleAnimBgTilemap_Cosmic}, - [BG_IN_AIR] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_InAir, gBattleAnimBgTilemap_InAir}, - [BG_SKY] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_Drill}, - [BG_SKY_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_DrillContests}, - [BG_AURORA] = {gBattleAnimBgImage_Aurora, gBattleAnimBgPalette_Aurora, gBattleAnimBgTilemap_Aurora}, - [BG_FISSURE] = {gBattleAnimBgImage_Fissure, gBattleAnimBgPalette_Fissure, gBattleAnimBgTilemap_Fissure}, - [BG_BUG_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedOpponent}, - [BG_BUG_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedPlayer}, - [BG_SOLARBEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactOpponent}, - [BG_SOLARBEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactPlayer}, - [BG_SOLARBEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactContests}, + [BG_ICE] = {gBattleAnimBgImage_Ice, gBattleAnimBgPalette_Ice, gBattleAnimBgTilemap_Ice}, + [BG_COSMIC] = {gBattleAnimBgImage_Cosmic, gBattleAnimBgPalette_Cosmic, gBattleAnimBgTilemap_Cosmic}, + [BG_IN_AIR] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_InAir, gBattleAnimBgTilemap_InAir}, + [BG_SKY] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_Drill}, + [BG_SKY_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_DrillContests}, + [BG_AURORA] = {gBattleAnimBgImage_Aurora, gBattleAnimBgPalette_Aurora, gBattleAnimBgTilemap_Aurora}, + [BG_FISSURE] = {gBattleAnimBgImage_Fissure, gBattleAnimBgPalette_Fissure, gBattleAnimBgTilemap_Fissure}, + [BG_BUG_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedOpponent}, + [BG_BUG_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedPlayer}, + [BG_SOLARBEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactOpponent}, + [BG_SOLARBEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactPlayer}, + [BG_SOLARBEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactContests}, }; static void (* const sScriptCmdTable[])(void) = @@ -1748,8 +1746,8 @@ static void (* const sScriptCmdTable[])(void) = ScriptCmd_createvisualtask, ScriptCmd_delay, ScriptCmd_waitforvisualfinish, - ScriptCmd_hang1, - ScriptCmd_hang2, + ScriptCmd_nop, + ScriptCmd_nop2, ScriptCmd_end, ScriptCmd_playse, ScriptCmd_monbg, @@ -1769,7 +1767,7 @@ static void (* const sScriptCmdTable[])(void) = ScriptCmd_changebg, ScriptCmd_playsewithpan, ScriptCmd_setpan, - ScriptCmd_panse_1B, + ScriptCmd_panse, ScriptCmd_loopsewithpan, ScriptCmd_waitplaysewithpan, ScriptCmd_setbldcnt, @@ -1780,8 +1778,8 @@ static void (* const sScriptCmdTable[])(void) = ScriptCmd_clearmonbg_23, ScriptCmd_jumpifcontest, ScriptCmd_fadetobgfromset, - ScriptCmd_panse_26, - ScriptCmd_panse_27, + ScriptCmd_panse_adjustnone, + ScriptCmd_panse_adjustall, ScriptCmd_monbgprio_28, ScriptCmd_monbgprio_29, ScriptCmd_monbgprio_2A, @@ -1792,12 +1790,11 @@ static void (* const sScriptCmdTable[])(void) = ScriptCmd_stopsound }; -// code void ClearBattleAnimationVars(void) { s32 i; - gAnimFramesToWait = 0; + sAnimFramesToWait = 0; gAnimScriptActive = FALSE; gAnimVisualTaskCount = 0; gAnimSoundTaskCount = 0; @@ -1837,7 +1834,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo if (!IsContest()) { - sub_80A8278(); + InitPrioritiesForVisibleBattlers(); UpdateOamPriorityInAllHealthboxes(0); for (i = 0; i < MAX_BATTLERS_COUNT; i++) { @@ -1865,7 +1862,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo sMonAnimTaskIdArray[1] = TASK_NONE; sBattleAnimScriptPtr = animsTable[tableId]; gAnimScriptActive = TRUE; - gAnimFramesToWait = 0; + sAnimFramesToWait = 0; gAnimScriptCallback = RunAnimScriptCommand; for (i = 0; i < ANIM_SPRITE_INDEX_COUNT; i++) @@ -1938,14 +1935,14 @@ static void ClearSpriteIndex(u16 index) static void WaitAnimFrameCount(void) { - if (gAnimFramesToWait <= 0) + if (sAnimFramesToWait <= 0) { gAnimScriptCallback = RunAnimScriptCommand; - gAnimFramesToWait = 0; + sAnimFramesToWait = 0; } else { - gAnimFramesToWait--; + sAnimFramesToWait--; } } @@ -1954,7 +1951,7 @@ static void RunAnimScriptCommand(void) do { sScriptCmdTable[sBattleAnimScriptPtr[0]](); - } while (gAnimFramesToWait == 0 && gAnimScriptActive); + } while (sAnimFramesToWait == 0 && gAnimScriptActive); } static void ScriptCmd_loadspritegfx(void) @@ -1967,7 +1964,7 @@ static void ScriptCmd_loadspritegfx(void) LoadCompressedSpritePaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(index)]); sBattleAnimScriptPtr += 2; AddSpriteIndex(GET_TRUE_SPRITE_INDEX(index)); - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; gAnimScriptCallback = WaitAnimFrameCount; } @@ -2070,9 +2067,9 @@ static void ScriptCmd_createvisualtask(void) static void ScriptCmd_delay(void) { sBattleAnimScriptPtr++; - gAnimFramesToWait = sBattleAnimScriptPtr[0]; - if (gAnimFramesToWait == 0) - gAnimFramesToWait = -1; + sAnimFramesToWait = sBattleAnimScriptPtr[0]; + if (sAnimFramesToWait == 0) + sAnimFramesToWait = -1; sBattleAnimScriptPtr++; gAnimScriptCallback = WaitAnimFrameCount; } @@ -2083,19 +2080,19 @@ static void ScriptCmd_waitforvisualfinish(void) if (gAnimVisualTaskCount == 0) { sBattleAnimScriptPtr++; - gAnimFramesToWait = 0; + sAnimFramesToWait = 0; } else { - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; } } -static void ScriptCmd_hang1(void) +static void ScriptCmd_nop(void) { } -static void ScriptCmd_hang2(void) +static void ScriptCmd_nop2(void) { } @@ -2109,7 +2106,7 @@ static void ScriptCmd_end(void) || sMonAnimTaskIdArray[0] != TASK_NONE || sMonAnimTaskIdArray[1] != TASK_NONE) { sSoundAnimFramesToWait = 0; - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; return; } @@ -2118,7 +2115,7 @@ static void ScriptCmd_end(void) { if (++sSoundAnimFramesToWait <= 90) // Wait 90 frames, then halt the sound effect. { - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; return; } else @@ -2146,7 +2143,7 @@ static void ScriptCmd_end(void) m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); if (!IsContest()) { - sub_80A8278(); + InitPrioritiesForVisibleBattlers(); UpdateOamPriorityInAllHealthboxes(1); } gAnimScriptActive = FALSE; @@ -2160,11 +2157,16 @@ static void ScriptCmd_playse(void) sBattleAnimScriptPtr += 2; } -#define t1_MONBG_BATTLER 0 -#define t1_MON_IN_BG2 1 +// These two tasks share context and similar task data +// To differentiate them their task data is prefixed t1/t2 + +// Task data for sub_80A40F4 +#define t1_BattlerSpriteId data[0] +#define t1_InBg2 data[1] #define t1_CREATE_ANOTHER_TASK 2 #define t1_IS_SECONDMON_BG 3 +// Task data for task_pA_ma0A_obj_to_bg_pal #define t2_BATTLER_SPRITE_ID 0 #define t2_MON_IN_BG2 5 #define t2_MONBG_BATTLER 6 @@ -2173,11 +2175,11 @@ static void sub_80A40F4(u8 taskId) { u8 newTaskId; - s16 *selfData = gTasks[taskId].data; - u8 battlerSpriteId = gBattlerSpriteIds[selfData[t1_MONBG_BATTLER]]; + s16 *data = gTasks[taskId].data; + u8 battlerSpriteId = gBattlerSpriteIds[t1_BattlerSpriteId]; gSprites[battlerSpriteId].invisible = TRUE; - if (!selfData[t1_CREATE_ANOTHER_TASK]) + if (!data[t1_CREATE_ANOTHER_TASK]) { DestroyAnimVisualTask(taskId); return; @@ -2188,7 +2190,7 @@ static void sub_80A40F4(u8 taskId) gTasks[newTaskId].data[1] = gSprites[battlerSpriteId].x + gSprites[battlerSpriteId].x2; gTasks[newTaskId].data[2] = gSprites[battlerSpriteId].y + gSprites[battlerSpriteId].y2; - if (!selfData[t1_MON_IN_BG2]) + if (!t1_InBg2) { gTasks[newTaskId].data[3] = gBattle_BG1_X; gTasks[newTaskId].data[4] = gBattle_BG1_Y; @@ -2199,9 +2201,9 @@ static void sub_80A40F4(u8 taskId) gTasks[newTaskId].data[4] = gBattle_BG2_Y; } - gTasks[newTaskId].data[t2_MON_IN_BG2] = selfData[t1_MON_IN_BG2]; - gTasks[newTaskId].data[t2_MONBG_BATTLER] = selfData[t1_MONBG_BATTLER]; - sMonAnimTaskIdArray[selfData[t1_IS_SECONDMON_BG]] = newTaskId; + gTasks[newTaskId].data[t2_MON_IN_BG2] = t1_InBg2; + gTasks[newTaskId].data[t2_MONBG_BATTLER] = t1_BattlerSpriteId; + sMonAnimTaskIdArray[data[t1_IS_SECONDMON_BG]] = newTaskId; DestroyAnimVisualTask(taskId); } @@ -2231,8 +2233,8 @@ static void ScriptCmd_monbg(void) MoveBattlerSpriteToBG(battlerId, toBG_2, FALSE); taskId = CreateTask(sub_80A40F4, 10); gAnimVisualTaskCount++; - gTasks[taskId].data[t1_MONBG_BATTLER] = battlerId; - gTasks[taskId].data[t1_MON_IN_BG2] = toBG_2; + gTasks[taskId].t1_BattlerSpriteId = battlerId; + gTasks[taskId].t1_InBg2 = toBG_2; gTasks[taskId].data[t1_CREATE_ANOTHER_TASK] = TRUE; gTasks[taskId].data[t1_IS_SECONDMON_BG] = 0; @@ -2257,7 +2259,7 @@ static void ScriptCmd_monbg(void) } sBattleAnimScriptPtr++; - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; gAnimScriptCallback = WaitAnimFrameCount; } @@ -2329,10 +2331,10 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible) else battlerPosition = GetBattlerPosition(battlerId); - sub_8118FBC(1, 0, 0, battlerPosition, animBg.paletteId, animBg.bgTiles, animBg.bgTilemap, animBg.tilesOffset); + DrawBattlerOnBg(1, 0, 0, battlerPosition, animBg.paletteId, animBg.bgTiles, animBg.bgTilemap, animBg.tilesOffset); if (IsContest()) - sub_80A46A0(); + FlipBattlerBgTiles(); } else { @@ -2359,11 +2361,11 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible) LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], 0x90, 0x20); CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + 0x120), 0x20); - sub_8118FBC(2, 0, 0, GetBattlerPosition(battlerId), animBg.paletteId, animBg.bgTiles + 0x1000, animBg.bgTilemap + 0x400, animBg.tilesOffset); + DrawBattlerOnBg(2, 0, 0, GetBattlerPosition(battlerId), animBg.paletteId, animBg.bgTiles + 0x1000, animBg.bgTilemap + 0x400, animBg.tilesOffset); } } -static void sub_80A46A0(void) +static void FlipBattlerBgTiles(void) { s32 i, j; struct BattleAnimBgData animBg; @@ -2377,10 +2379,8 @@ static void sub_80A46A0(void) { for (j = 0; j < 4; j++) { - u16 temp = ptr[j + i * 32]; - - ptr[j + i * 32] = ptr[7 - j + i * 32]; - ptr[7 - j + i * 32] = temp; + u16 temp; + SWAP(ptr[j + i * 32], ptr[7 - j + i * 32], temp); } } for (i = 0; i < 8; i++) @@ -2391,20 +2391,20 @@ static void sub_80A46A0(void) } } -void sub_80A4720(u16 a, u16 *b, u32 c, u8 d) +void RelocateBattleBgPal(u16 paletteNum, u16 *dest, u32 offset, bool8 largeScreen) { s32 i, j; - s32 var; + s32 size; - if (d == 0) - var = 32; + if (!largeScreen) + size = 32; else - var = 64; - a <<= 12; - for (i = 0; i < var; i++) + size = 64; + paletteNum <<= 12; + for (i = 0; i < size; i++) { for (j = 0; j < 32; j++) - b[j + i * 32] = ((b[j + i * 32] & 0xFFF) | a) + c; + dest[j + i * 32] = ((dest[j + i * 32] & 0xFFF) | paletteNum) + offset; } } @@ -2446,8 +2446,8 @@ static void task_pA_ma0A_obj_to_bg_pal(u8 taskId) gBattle_BG1_X = x + gTasks[taskId].data[3]; gBattle_BG1_Y = y + gTasks[taskId].data[4]; - src = gPlttBufferFaded + 0x100 + palIndex * 16; - dst = gPlttBufferFaded + 0x100 + animBg.paletteId * 16 - 256; + src = &gPlttBufferFaded[0x100 + palIndex * 16]; + dst = &gPlttBufferFaded[0x100 + animBg.paletteId * 16 - 256]; CpuCopy32(src, dst, 0x20); } else @@ -2457,8 +2457,8 @@ static void task_pA_ma0A_obj_to_bg_pal(u8 taskId) gBattle_BG2_X = x + gTasks[taskId].data[3]; gBattle_BG2_Y = y + gTasks[taskId].data[4]; - src = gPlttBufferFaded + 0x100 + palIndex * 16; - dst = gPlttBufferFaded + 0x100 - 112; + src = &gPlttBufferFaded[0x100 + palIndex * 16]; + dst = &gPlttBufferFaded[0x100 - 112]; CpuCopy32(src, dst, 0x20); } } @@ -2489,14 +2489,14 @@ static void ScriptCmd_clearmonbg(void) else animBattlerId = 0; - taskId = CreateTask(sub_80A4980, 5); + taskId = CreateTask(Task_ClearMonBg, 5); gTasks[taskId].data[0] = animBattlerId; gTasks[taskId].data[2] = battlerId; sBattleAnimScriptPtr++; } -static void sub_80A4980(u8 taskId) +static void Task_ClearMonBg(u8 taskId) { gTasks[taskId].data[1]++; if (gTasks[taskId].data[1] != 1) @@ -2625,8 +2625,8 @@ static void sub_80A4BB0(u8 taskId) } } -#undef t1_MONBG_BATTLER -#undef t1_MON_IN_BG2 +#undef t1_BattlerSpriteId +#undef t1_InBg2 #undef t1_CREATE_ANOTHER_TASK #undef t1_IS_SECONDMON_BG @@ -2676,6 +2676,10 @@ static void ScriptCmd_return(void) static void ScriptCmd_setarg(void) { + // Save original address to return to + // after the T1_READ_16, + 4. + // They could have equivalently just advanced + // sBattleAnimScriptPtr by 2 afterwards. const u8 *addr = sBattleAnimScriptPtr; u16 value; u8 argId; @@ -2809,17 +2813,17 @@ static void LoadMoveBg(u16 bgId) void *dmaDest; LZDecompressWram(tilemap, gDecompressionBuffer); - sub_80A4720(GetBattleBgPaletteNum(), (void*)(gDecompressionBuffer), 0x100, 0); + RelocateBattleBgPal(GetBattleBgPaletteNum(), (void*)gDecompressionBuffer, 0x100, FALSE); dmaSrc = gDecompressionBuffer; - dmaDest = (void *)(BG_SCREEN_ADDR(26)); + dmaDest = (void *)BG_SCREEN_ADDR(26); DmaCopy32(3, dmaSrc, dmaDest, 0x800); - LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)(BG_SCREEN_ADDR(4))); + LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)BG_SCREEN_ADDR(4)); LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, GetBattleBgPaletteNum() * 16, 32); } else { - LZDecompressVram(gBattleAnimBackgroundTable[bgId].tilemap, (void *)(BG_SCREEN_ADDR(26))); - LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleAnimBackgroundTable[bgId].tilemap, (void *)BG_SCREEN_ADDR(26)); + LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)BG_CHAR_ADDR(2)); LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, 32, 32); } } @@ -2850,11 +2854,11 @@ static void ScriptCmd_waitbgfadeout(void) if (sAnimBackgroundFadeState == 2) { sBattleAnimScriptPtr++; - gAnimFramesToWait = 0; + sAnimFramesToWait = 0; } else { - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; } } @@ -2863,11 +2867,11 @@ static void ScriptCmd_waitbgfadein(void) if (sAnimBackgroundFadeState == 0) { sBattleAnimScriptPtr++; - gAnimFramesToWait = 0; + sAnimFramesToWait = 0; } else { - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; } } @@ -2992,7 +2996,7 @@ static void ScriptCmd_setpan(void) #define tCurrentPan data[4] #define tFrameCounter data[8] -static void ScriptCmd_panse_1B(void) +static void ScriptCmd_panse(void) { u16 songNum; s8 currentPanArg, incrementPan, incrementPanArg, currentPan, targetPan; @@ -3002,13 +3006,14 @@ static void ScriptCmd_panse_1B(void) sBattleAnimScriptPtr++; songNum = T1_READ_16(sBattleAnimScriptPtr); currentPanArg = sBattleAnimScriptPtr[2]; - incrementPan = sBattleAnimScriptPtr[3]; + incrementPan = sBattleAnimScriptPtr[3]; // targetPan, var is re-used incrementPanArg = sBattleAnimScriptPtr[4]; framesToWait = sBattleAnimScriptPtr[5]; currentPan = BattleAnimAdjustPanning(currentPanArg); targetPan = BattleAnimAdjustPanning(incrementPan); incrementPan = CalculatePanIncrement(currentPan, targetPan, incrementPanArg); + taskId = CreateTask(Task_PanFromInitialToTarget, 1); gTasks[taskId].tInitialPan = currentPan; gTasks[taskId].tTargetPan = targetPan; @@ -3064,7 +3069,7 @@ void Task_PanFromInitialToTarget(u8 taskId) } } -static void ScriptCmd_panse_26(void) +static void ScriptCmd_panse_adjustnone(void) { u16 songId; s8 currentPan, targetPan, incrementPan; @@ -3091,7 +3096,7 @@ static void ScriptCmd_panse_26(void) sBattleAnimScriptPtr += 6; } -static void ScriptCmd_panse_27(void) +static void ScriptCmd_panse_adjustall(void) { u16 songId; s8 targetPanArg, incrementPanArg, currentPanArg, currentPan, targetPan, incrementPan; @@ -3254,7 +3259,7 @@ static void ScriptCmd_waitsound(void) if (gAnimSoundTaskCount != 0) { sSoundAnimFramesToWait = 0; - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; } else if (IsSEPlaying()) { @@ -3266,14 +3271,14 @@ static void ScriptCmd_waitsound(void) } else { - gAnimFramesToWait = 1; + sAnimFramesToWait = 1; } } else { sSoundAnimFramesToWait = 0; sBattleAnimScriptPtr++; - gAnimFramesToWait = 0; + sAnimFramesToWait = 0; } } diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 2f4343e73c..27149873d6 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -3250,7 +3250,7 @@ void AnimTask_HeartsBackground(u8 taskId) SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); GetBattleAnimBg1Data(&animBg); AnimLoadCompressedBgGfx(animBg.bgId, &gBattleAnimBgImage_Attract, animBg.tilesOffset); - AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_Attract, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_Attract, FALSE); LoadCompressedPalette(&gBattleAnimBgPalette_Attract, animBg.paletteId * 16, 32); gTasks[taskId].func = AnimTask_HeartsBackground_Step; } @@ -3328,11 +3328,11 @@ void AnimTask_ScaryFace(u8 taskId) SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); GetBattleAnimBg1Data(&animBg); if (IsContest()) - AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceContest, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceContest, FALSE); else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT) - AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFacePlayer, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFacePlayer, FALSE); else - AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceOpponent, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceOpponent, FALSE); AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_ScaryFace, animBg.tilesOffset); LoadCompressedPalette(gBattleAnimBgPalette_ScaryFace, animBg.paletteId * 16, 32); diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 2a649dd8b2..267b6db9cb 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -2388,7 +2388,7 @@ void AnimTask_MorningSunLightBeam(u8 taskId) SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1); GetBattleAnimBg1Data(&animBg); - AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, FALSE); if (IsContest()) { gBattle_BG1_X = -56; @@ -2569,7 +2569,7 @@ void AnimTask_DoomDesireLightBeam(u8 taskId) SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1); GetBattleAnimBg1Data(&animBg); - AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, FALSE); if (IsContest()) { gBattle_BG1_X = -56; diff --git a/src/battle_anim_ice.c b/src/battle_anim_ice.c index a0608cfd1c..95c64f7cad 100644 --- a/src/battle_anim_ice.c +++ b/src/battle_anim_ice.c @@ -1000,7 +1000,7 @@ void AnimTask_HazeScrollingFog(u8 taskId) GetBattleAnimBg1Data(&animBg); LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset); - AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, FALSE); LoadPalette(&gFogPalette, animBg.paletteId * 16, 32); gTasks[taskId].func = AnimTask_HazeScrollingFog_Step; @@ -1105,7 +1105,7 @@ void AnimTask_LoadMistTiles(u8 taskId) GetBattleAnimBg1Data(&animBg); LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset); - AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, FALSE); LoadPalette(&gFogPalette, animBg.paletteId * 16, 32); gTasks[taskId].data[15] = -1; diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index be409f3666..d0ddfdd771 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -37,15 +37,15 @@ static void sub_80A8D78(struct Task *task, u8 taskId); EWRAM_DATA static union AffineAnimCmd *gAnimTaskAffineAnim = NULL; // Const rom data -static const struct UCoords8 sBattlerCoords[][4] = +static const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = { - { + { // Single battle { 72, 80 }, { 176, 40 }, { 48, 40 }, { 112, 80 }, }, - { + { // Double battle { 32, 80 }, { 200, 40 }, { 90, 88 }, @@ -54,29 +54,29 @@ static const struct UCoords8 sBattlerCoords[][4] = }; // One entry for each of the four Castform forms. -const struct MonCoords gCastformFrontSpriteCoords[] = +const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS] = { - { .size = 0x44, .y_offset = 17 }, // NORMAL - { .size = 0x66, .y_offset = 9 }, // SUN - { .size = 0x46, .y_offset = 9 }, // RAIN - { .size = 0x86, .y_offset = 8 }, // HAIL + [CASTFORM_NORMAL] = { .size = 0x44, .y_offset = 17 }, + [CASTFORM_FIRE] = { .size = 0x66, .y_offset = 9 }, + [CASTFORM_WATER] = { .size = 0x46, .y_offset = 9 }, + [CASTFORM_ICE] = { .size = 0x86, .y_offset = 8 }, }; -static const u8 sCastformElevations[] = +static const u8 sCastformElevations[NUM_CASTFORM_FORMS] = { - 13, // NORMAL - 14, // SUN - 13, // RAIN - 13, // HAIL + [CASTFORM_NORMAL] = 13, + [CASTFORM_FIRE] = 14, + [CASTFORM_WATER] = 13, + [CASTFORM_ICE] = 13, }; // Y position of the backsprite for each of the four Castform forms. -static const u8 sCastformBackSpriteYCoords[] = +static const u8 sCastformBackSpriteYCoords[NUM_CASTFORM_FORMS] = { - 0, // NORMAL - 0, // SUN - 0, // RAIN - 0, // HAIL + [CASTFORM_NORMAL] = 0, + [CASTFORM_FIRE] = 0, + [CASTFORM_WATER] = 0, + [CASTFORM_ICE] = 0, }; // Placeholders for pokemon sprites to be created for a move animation effect (e.g. Role Play / Snatch) @@ -853,8 +853,8 @@ void GetBattleAnimBg1Data(struct BattleAnimBgData *out) { if (IsContest()) { - out->bgTiles = gUnknown_0202305C; - out->bgTilemap = (u16 *)gUnknown_02023060; + out->bgTiles = gBattleAnimBgTileBuffer; + out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer; out->paletteId = 14; out->bgId = 1; out->tilesOffset = 0; @@ -862,8 +862,8 @@ void GetBattleAnimBg1Data(struct BattleAnimBgData *out) } else { - out->bgTiles = gUnknown_0202305C; - out->bgTilemap = (u16 *)gUnknown_02023060; + out->bgTiles = gBattleAnimBgTileBuffer; + out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer; out->paletteId = 8; out->bgId = 1; out->tilesOffset = 0x200; @@ -875,8 +875,8 @@ void GetBattleAnimBgData(struct BattleAnimBgData *out, u32 bgId) { if (IsContest()) { - out->bgTiles = gUnknown_0202305C; - out->bgTilemap = (u16 *)gUnknown_02023060; + out->bgTiles = gBattleAnimBgTileBuffer; + out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer; out->paletteId = 14; out->bgId = 1; out->tilesOffset = 0; @@ -888,8 +888,8 @@ void GetBattleAnimBgData(struct BattleAnimBgData *out, u32 bgId) } else { - out->bgTiles = gUnknown_0202305C; - out->bgTilemap = (u16 *)gUnknown_02023060; + out->bgTiles = gBattleAnimBgTileBuffer; + out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer; out->paletteId = 9; out->bgId = 2; out->tilesOffset = 0x300; @@ -899,8 +899,8 @@ void GetBattleAnimBgData(struct BattleAnimBgData *out, u32 bgId) void sub_80A6BFC(struct BattleAnimBgData *out, u8 unused) { - out->bgTiles = gUnknown_0202305C; - out->bgTilemap = (u16 *)gUnknown_02023060; + out->bgTiles = gBattleAnimBgTileBuffer; + out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer; if (IsContest()) { out->paletteId = 14; @@ -937,9 +937,9 @@ void ClearBattleAnimBg(u32 bgId) void AnimLoadCompressedBgGfx(u32 bgId, const u32 *src, u32 tilesOffset) { - CpuFill32(0, gUnknown_0202305C, 0x2000); - LZDecompressWram(src, gUnknown_0202305C); - LoadBgTiles(bgId, gUnknown_0202305C, 0x2000, tilesOffset); + CpuFill32(0, gBattleAnimBgTileBuffer, 0x2000); + LZDecompressWram(src, gBattleAnimBgTileBuffer); + LoadBgTiles(bgId, gBattleAnimBgTileBuffer, 0x2000, tilesOffset); } static void InitAnimBgTilemapBuffer(u32 bgId, const void *src) @@ -954,12 +954,12 @@ void AnimLoadCompressedBgTilemap(u32 bgId, const void *src) CopyBgTilemapBufferToVram(bgId); } -void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData *unk, const void *src, u32 arg2) +void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData *data, const void *src, bool32 largeScreen) { - InitAnimBgTilemapBuffer(unk->bgId, src); + InitAnimBgTilemapBuffer(data->bgId, src); if (IsContest() == TRUE) - sub_80A4720(unk->paletteId, unk->bgTilemap, 0, arg2); - CopyBgTilemapBufferToVram(unk->bgId); + RelocateBattleBgPal(data->paletteId, data->bgTilemap, 0, largeScreen); + CopyBgTilemapBufferToVram(data->bgId); } u8 GetBattleBgPaletteNum(void) @@ -1947,7 +1947,8 @@ void AnimTask_GetFrustrationPowerLevel(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_80A8174(u8 priority) +// Unused +static void SetPriorityForVisibleBattlers(u8 priority) { if (IsBattlerSpriteVisible(gBattleAnimTarget)) gSprites[gBattlerSpriteIds[gBattleAnimTarget]].oam.priority = priority; @@ -1959,7 +1960,7 @@ void sub_80A8174(u8 priority) gSprites[gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]].oam.priority = priority; } -void sub_80A8278(void) +void InitPrioritiesForVisibleBattlers(void) { int i; diff --git a/src/battle_anim_rock.c b/src/battle_anim_rock.c index 7f292d5961..905f51a79e 100644 --- a/src/battle_anim_rock.c +++ b/src/battle_anim_rock.c @@ -409,7 +409,7 @@ void AnimTask_LoadSandstormBackground(u8 taskId) GetBattleAnimBg1Data(&animBg); AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Sandstorm, animBg.tilesOffset); - AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Sandstorm, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Sandstorm, FALSE); LoadCompressedPalette(gBattleAnimSpritePal_FlyingDirt, animBg.paletteId * 16, 32); if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index c20fbc9e27..b0eab5b743 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -331,7 +331,7 @@ void AnimTask_DrawFallingWhiteLinesOnAttacker(u8 taskId) spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); newSpriteId = CreateInvisibleSpriteCopy(gBattleAnimAttacker, spriteId, species); GetBattleAnimBg1Data(&animBgData); - AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleAnimMaskTilemap_Curse, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleAnimMaskTilemap_Curse, FALSE); AnimLoadCompressedBgGfx(animBgData.bgId, gBattleAnimMaskImage_Curse, animBgData.tilesOffset); LoadPalette(sCurseLinesPalette, animBgData.paletteId * 16 + 1, 2); @@ -470,9 +470,9 @@ static void StatsChangeAnimation_Step2(u8 taskId) GetBattleAnimBg1Data(&animBgData); if (sAnimStatsChangeData->data[0] == 0) - AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleStatMask1_Tilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleStatMask1_Tilemap, FALSE); else - AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleStatMask2_Tilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBgData, gBattleStatMask2_Tilemap, FALSE); AnimLoadCompressedBgGfx(animBgData.bgId, gBattleStatMask_Gfx, animBgData.tilesOffset); switch (sAnimStatsChangeData->data[1]) @@ -821,7 +821,7 @@ void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler, spriteId2 = CreateInvisibleSpriteCopy(battler2, gBattlerSpriteIds[battler2], species); GetBattleAnimBg1Data(&animBgData); - AnimLoadCompressedBgTilemapHandleContest(&animBgData, tilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBgData, tilemap, FALSE); AnimLoadCompressedBgGfx(animBgData.bgId, gfx, animBgData.tilesOffset); LoadCompressedPalette(palette, animBgData.paletteId * 16, 32); diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index 4ee09f3864..1c2d08d6a8 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -54,9 +54,8 @@ static void AnimTask_WaterSport_Step(u8); static void CreateWaterSportDroplet(struct Task*); static void CreateWaterPulseRingBubbles(struct Sprite*, int, int); -// Both unused -const u8 gUnknown_8593C80[] = INCBIN_U8("graphics/unknown/unknown_593C80.4bpp"); -const u8 gUnknown_8593FFC[] = INCBIN_U8("graphics/unknown/unknown_593FFC.bin"); +static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused_water_gfx.4bpp"); +static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused_water.bin"); static const union AnimCmd sAnim_RainDrop[] = { @@ -822,7 +821,7 @@ void AnimTask_CreateSurfWave(u8 taskId) } else { - AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_SurfContest, 1); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_SurfContest, TRUE); } AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Surf, animBg.tilesOffset); if (gBattleAnimArgs[0] == 0) diff --git a/src/battle_bg.c b/src/battle_bg.c index 0ad1265090..886a3d107f 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -594,8 +594,8 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = const struct WindowTemplate * const gBattleWindowTemplates[] = { - gStandardBattleWindowTemplates, - gBattleArenaWindowTemplates, + [B_WIN_TYPE_NORMAL] = gStandardBattleWindowTemplates, + [B_WIN_TYPE_ARENA] = gBattleArenaWindowTemplates, }; static const struct BattleBackground gBattleTerrainTable[] = @@ -691,20 +691,19 @@ static const struct BattleBackground gBattleTerrainTable[] = }, }; -static void sub_8035648(void); +static void CB2_UnusedBattleInit(void); -// Unused -static void sub_8035608(void) +static void UnusedBattleInit(void) { u8 spriteId; ResetSpriteData(); - spriteId = CreateSprite(&gUnknown_0831AC88, 0, 0, 0); + spriteId = CreateSprite(&gUnusedBattleInitSprite, 0, 0, 0); gSprites[spriteId].invisible = TRUE; - SetMainCallback2(sub_8035648); + SetMainCallback2(CB2_UnusedBattleInit); } -static void sub_8035648(void) +static void CB2_UnusedBattleInit(void) { AnimateSprites(); BuildOamBuffer(); @@ -717,13 +716,13 @@ void BattleInitBgsAndWindows(void) if (gBattleTypeFlags & BATTLE_TYPE_ARENA) { - gBattleScripting.windowsType = 1; - SetBgTilemapBuffer(1, gUnknown_02023060); - SetBgTilemapBuffer(2, gUnknown_02023060); + gBattleScripting.windowsType = B_WIN_TYPE_ARENA; + SetBgTilemapBuffer(1, gBattleAnimBgTilemapBuffer); + SetBgTilemapBuffer(2, gBattleAnimBgTilemapBuffer); } else { - gBattleScripting.windowsType = 0; + gBattleScripting.windowsType = B_WIN_TYPE_NORMAL; } InitWindows(gBattleWindowTemplates[gBattleScripting.windowsType]); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 8e7bc9a9f4..456fd8cee6 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -251,16 +251,16 @@ static void HandleInputChooseAction(void) switch (gActionSelectionCursor[gActiveBattler]) { - case 0: + case B_ACTION_USE_MOVE: BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, 0); break; - case 1: + case B_ACTION_USE_ITEM: BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0); break; - case 2: + case B_ACTION_SWITCH: BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); break; - case 3: + case B_ACTION_RUN: BtlController_EmitTwoReturnValues(1, B_ACTION_RUN, 0); break; } @@ -858,7 +858,7 @@ static void SetLinkBattleEndCallbacks(void) if (gReceivedRemoteLinkPlayers == 0) { m4aSongNumStop(SE_LOW_HEALTH); - gMain.inBattle = 0; + gMain.inBattle = FALSE; gMain.callback1 = gPreBattleCallback1; SetMainCallback2(CB2_InitEndLinkBattle); if (gBattleOutcome == B_OUTCOME_WON) @@ -871,7 +871,7 @@ static void SetLinkBattleEndCallbacks(void) if (IsLinkTaskFinished()) { m4aSongNumStop(SE_LOW_HEALTH); - gMain.inBattle = 0; + gMain.inBattle = FALSE; gMain.callback1 = gPreBattleCallback1; SetMainCallback2(CB2_InitEndLinkBattle); if (gBattleOutcome == B_OUTCOME_WON) @@ -901,7 +901,7 @@ void SetBattleEndCallbacks(void) else { m4aSongNumStop(SE_LOW_HEALTH); - gMain.inBattle = 0; + gMain.inBattle = FALSE; gMain.callback1 = gPreBattleCallback1; SetMainCallback2(gMain.savedCallback); } diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index da15c07a07..6c4f1473c2 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -115,7 +115,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) s32 i, var1, var2; s32 chosenMoveId = -1; struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]); - u8 unusableMovesBits = CheckMoveLimitations(gActiveBattler, 0, 0xFF); + u8 unusableMovesBits = CheckMoveLimitations(gActiveBattler, 0, MOVE_LIMITATIONS_ALL); s32 percent = Random() % 100; // Heavy variable re-use here makes this hard to read without defines @@ -438,9 +438,10 @@ bool8 TryHandleLaunchBattleTableAnimation(u8 activeBattler, u8 atkBattler, u8 de { u8 taskId; - if (tableId == B_ANIM_CASTFORM_CHANGE && (argument & 0x80)) + if (tableId == B_ANIM_CASTFORM_CHANGE && (argument & CASTFORM_SUBSTITUTE)) { - gBattleMonForms[activeBattler] = (argument & ~(0x80)); + // If Castform is behind substitute, set the new form but skip the animation + gBattleMonForms[activeBattler] = (argument & ~CASTFORM_SUBSTITUTE); return TRUE; } if (gBattleSpritesDataPtr->battlerData[activeBattler].behindSubstitute @@ -593,7 +594,7 @@ void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId) if (species == SPECIES_CASTFORM) { paletteOffset = 0x100 + battlerId * 16; - LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[0]); + LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]); LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerId]], paletteOffset, 0x20); } @@ -656,7 +657,7 @@ void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId) if (species == SPECIES_CASTFORM) { paletteOffset = 0x100 + battlerId * 16; - LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[0]); + LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]); LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerId]], paletteOffset, 0x20); } @@ -895,7 +896,7 @@ void CopyBattleSpriteInvisibility(u8 battlerId) gBattleSpritesDataPtr->battlerData[battlerId].invisible = gSprites[gBattlerSpriteIds[battlerId]].invisible; } -void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform) +void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform) { u16 paletteOffset; u32 personalityValue; @@ -903,7 +904,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform u8 position; const u32 *lzPaletteData; - if (notTransform) + if (castform) { StartSpriteAnim(&gSprites[gBattlerSpriteIds[battlerAtk]], gBattleSpritesDataPtr->animationData->animArg); paletteOffset = 0x100 + battlerAtk * 16; @@ -976,8 +977,8 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform if (targetSpecies == SPECIES_CASTFORM) { gSprites[gBattlerSpriteIds[battlerAtk]].anims = gMonFrontAnimsPtrTable[targetSpecies]; - LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[0]); - LoadPalette(gBattleStruct->castformPalette[0] + gBattleMonForms[battlerDef] * 16, paletteOffset, 32); + LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]); + LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerDef]], paletteOffset, 32); } BlendPalette(paletteOffset, 16, 6, RGB_WHITE); diff --git a/src/battle_intro.c b/src/battle_intro.c index 0ea65dab17..42fe659746 100644 --- a/src/battle_intro.c +++ b/src/battle_intro.c @@ -584,36 +584,35 @@ static void BattleIntroSlidePartner(u8 taskId) } } -void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *arg5, u16 *arg6, u16 tilesOffset) +void DrawBattlerOnBg(int bgId, u8 x, u8 y, u8 battlerPosition, u8 paletteId, u8 *tiles, u16 *tilemap, u16 tilesOffset) { int i, j; u8 battler = GetBattlerAtPosition(battlerPosition); int offset = tilesOffset; - CpuCopy16(gMonSpritesGfxPtr->sprites.ptr[battlerPosition] + BG_SCREEN_SIZE * gBattleMonForms[battler], arg5, BG_SCREEN_SIZE); - LoadBgTiles(bgId, arg5, 0x1000, tilesOffset); - for (i = arg2; i < arg2 + 8; i++) + CpuCopy16(gMonSpritesGfxPtr->sprites.ptr[battlerPosition] + BG_SCREEN_SIZE * gBattleMonForms[battler], tiles, BG_SCREEN_SIZE); + LoadBgTiles(bgId, tiles, 0x1000, tilesOffset); + for (i = y; i < y + 8; i++) { - for (j = arg1; j < arg1 + 8; j++) + for (j = x; j < x + 8; j++) { - arg6[i * 32 + j] = offset | (arg4 << 12); + tilemap[i * 32 + j] = offset | (paletteId << 12); offset++; } } - - LoadBgTilemap(bgId, arg6, BG_SCREEN_SIZE, 0); + LoadBgTilemap(bgId, tilemap, BG_SCREEN_SIZE, 0); } -void unref_sub_8119094(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7) +static void DrawBattlerOnBgDMA(u8 x, u8 y, u8 battlerPosition, u8 arg3, u8 paletteId, u16 arg5, u8 arg6, u8 arg7) { int i, j, offset; DmaCopy16(3, gMonSpritesGfxPtr->sprites.ptr[battlerPosition] + BG_SCREEN_SIZE * arg3, (void *)BG_SCREEN_ADDR(0) + arg5, BG_SCREEN_SIZE); offset = (arg5 >> 5) - (arg7 << 9); - for (i = arg1; i < arg1 + 8; i++) + for (i = y; i < y + 8; i++) { - for (j = arg0; j < arg0 + 8; j++) + for (j = x; j < x + 8; j++) { - *((u16 *)(BG_VRAM) + (i * 32) + (j + (arg6 << 10))) = offset | (arg4 << 12); + *((u16 *)(BG_VRAM) + (i * 32) + (j + (arg6 << 10))) = offset | (paletteId << 12); offset++; } } diff --git a/src/battle_main.c b/src/battle_main.c index 8481a108a3..6ed9f1232b 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -61,13 +61,9 @@ #include "constants/trainers.h" #include "cable_club.h" -extern struct MusicPlayerInfo gMPlayInfo_SE1; -extern struct MusicPlayerInfo gMPlayInfo_SE2; - extern const struct BgTemplate gBattleBgTemplates[]; extern const struct WindowTemplate *const gBattleWindowTemplates[]; -// this file's functions static void CB2_InitBattleInternal(void); static void CB2_PreInitMultiBattle(void); static void CB2_PreInitIngamePlayerPartnerBattle(void); @@ -77,19 +73,18 @@ static void CB2_HandleStartBattle(void); static void TryCorrectShedinjaLanguage(struct Pokemon *mon); static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 firstTrainer); static void BattleMainCB1(void); -static void sub_8038538(struct Sprite *sprite); static void CB2_EndLinkBattle(void); static void EndLinkBattleInSteps(void); -static void sub_80392A8(void); -static void sub_803937C(void); -static void sub_803939C(void); +static void CB2_InitAskRecordBattle(void); +static void CB2_AskRecordBattle(void); +static void AskRecordBattle(void); static void SpriteCb_MoveWildMonToRight(struct Sprite *sprite); static void SpriteCb_WildMonShowHealthbox(struct Sprite *sprite); static void SpriteCb_WildMonAnimate(struct Sprite *sprite); -static void sub_80398D0(struct Sprite *sprite); +static void SpriteCB_Flicker(struct Sprite *sprite); static void SpriteCB_AnimFaintOpponent(struct Sprite *sprite); static void SpriteCb_BlinkVisible(struct Sprite *sprite); -static void SpriteCallbackDummy_3(struct Sprite *sprite); +static void SpriteCB_Idle(struct Sprite *sprite); static void SpriteCB_BattleSpriteSlideLeft(struct Sprite *sprite); static void TurnValuesCleanUp(bool8 var0); static void SpriteCB_BounceEffect(struct Sprite *sprite); @@ -123,8 +118,9 @@ static void HandleEndTurn_BattleLost(void); static void HandleEndTurn_RanFromBattle(void); static void HandleEndTurn_MonFled(void); static void HandleEndTurn_FinishBattle(void); +static void SpriteCB_UnusedBattleInit(struct Sprite* sprite); +static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite); -// EWRAM vars EWRAM_DATA u16 gBattle_BG0_X = 0; EWRAM_DATA u16 gBattle_BG0_Y = 0; EWRAM_DATA u16 gBattle_BG1_X = 0; @@ -141,14 +137,19 @@ EWRAM_DATA u8 gDisplayedStringBattle[300] = {0}; EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0}; EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0}; EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT] = {0}; -EWRAM_DATA static u32 sUnusedUnknownArray[25] = {0}; +// The below array is never intentionally used. However, Juan's +// defeat text (SootopolisCity_Gym_1F_Text_JuanDefeat) is too long +// for gDisplayedStringBattle and overflows into this array. If it +// is removed (and none of the buffers above are increased in size) +// it will instead overflow into useful data. +EWRAM_DATA static u32 sFlickerArray[25] = {0}; EWRAM_DATA u32 gBattleTypeFlags = 0; EWRAM_DATA u8 gBattleTerrain = 0; EWRAM_DATA u32 gUnusedFirstBattleVar1 = 0; // Never read -EWRAM_DATA struct UnknownPokemonStruct4 gMultiPartnerParty[MULTI_PARTY_SIZE] = {0}; -EWRAM_DATA static struct UnknownPokemonStruct4* sMultiPartnerPartyBuffer = NULL; -EWRAM_DATA u8 *gUnknown_0202305C = NULL; -EWRAM_DATA u8 *gUnknown_02023060 = NULL; +EWRAM_DATA struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE] = {0}; +EWRAM_DATA static struct MultiPartnerMenuPokemon* sMultiPartnerPartyBuffer = NULL; +EWRAM_DATA u8 *gBattleAnimBgTileBuffer = NULL; +EWRAM_DATA u8 *gBattleAnimBgTilemapBuffer = NULL; EWRAM_DATA u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200] = {0}; EWRAM_DATA u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200] = {0}; EWRAM_DATA u8 gActiveBattler = 0; @@ -236,7 +237,6 @@ EWRAM_DATA u16 gBattleMovePower = 0; EWRAM_DATA u16 gMoveToLearn = 0; EWRAM_DATA u8 gBattleMonForms[MAX_BATTLERS_COUNT] = {0}; -// IWRAM common vars void (*gPreBattleCallback1)(void); void (*gBattleMainFunc)(void); struct BattleResults gBattleResults; @@ -247,7 +247,6 @@ u8 gMultiUsePlayerCursor; u8 gNumberOfMovesToChoose; u8 gBattleControllerData[MAX_BATTLERS_COUNT]; // Used by the battle controllers to store misc sprite/task IDs for each battler -// rom const data static const struct ScanlineEffectParams sIntroScanlineParams16Bit = { (void *)REG_ADDR_BG3HOFS, SCANLINE_EFFECT_DMACNT_16BIT, 1 @@ -259,7 +258,7 @@ static const struct ScanlineEffectParams sIntroScanlineParams32Bit = (void *)REG_ADDR_BG3HOFS, SCANLINE_EFFECT_DMACNT_32BIT, 1 }; -const struct SpriteTemplate gUnknown_0831AC88 = +const struct SpriteTemplate gUnusedBattleInitSprite = { .tileTag = 0, .paletteTag = 0, @@ -267,7 +266,7 @@ const struct SpriteTemplate gUnknown_0831AC88 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8038528, + .callback = SpriteCB_UnusedBattleInit, }; static const u8 sText_ShedinjaJpnName[] = _("ヌケニン"); // Nukenin @@ -512,53 +511,53 @@ const struct TrainerMoney gTrainerMoneyTable[] = {TRAINER_CLASS_HIKER, 10}, {TRAINER_CLASS_YOUNG_COUPLE, 8}, {TRAINER_CLASS_WINSTRATE, 10}, - {0xFF, 5}, + {0xFF, 5}, // Any trainer class not listed above uses this }; #include "data/text/abilities.h" static void (* const sTurnActionsFuncsTable[])(void) = { - [B_ACTION_USE_MOVE] = HandleAction_UseMove, - [B_ACTION_USE_ITEM] = HandleAction_UseItem, - [B_ACTION_SWITCH] = HandleAction_Switch, - [B_ACTION_RUN] = HandleAction_Run, + [B_ACTION_USE_MOVE] = HandleAction_UseMove, + [B_ACTION_USE_ITEM] = HandleAction_UseItem, + [B_ACTION_SWITCH] = HandleAction_Switch, + [B_ACTION_RUN] = HandleAction_Run, [B_ACTION_SAFARI_WATCH_CAREFULLY] = HandleAction_WatchesCarefully, - [B_ACTION_SAFARI_BALL] = HandleAction_SafariZoneBallThrow, - [B_ACTION_SAFARI_POKEBLOCK] = HandleAction_ThrowPokeblock, - [B_ACTION_SAFARI_GO_NEAR] = HandleAction_GoNear, - [B_ACTION_SAFARI_RUN] = HandleAction_SafariZoneRun, - [B_ACTION_WALLY_THROW] = HandleAction_WallyBallThrow, - [B_ACTION_EXEC_SCRIPT] = HandleAction_RunBattleScript, - [B_ACTION_TRY_FINISH] = HandleAction_TryFinish, - [B_ACTION_FINISHED] = HandleAction_ActionFinished, - [B_ACTION_NOTHING_FAINTED] = HandleAction_NothingIsFainted, + [B_ACTION_SAFARI_BALL] = HandleAction_SafariZoneBallThrow, + [B_ACTION_SAFARI_POKEBLOCK] = HandleAction_ThrowPokeblock, + [B_ACTION_SAFARI_GO_NEAR] = HandleAction_GoNear, + [B_ACTION_SAFARI_RUN] = HandleAction_SafariZoneRun, + [B_ACTION_WALLY_THROW] = HandleAction_WallyBallThrow, + [B_ACTION_EXEC_SCRIPT] = HandleAction_RunBattleScript, + [B_ACTION_TRY_FINISH] = HandleAction_TryFinish, + [B_ACTION_FINISHED] = HandleAction_ActionFinished, + [B_ACTION_NOTHING_FAINTED] = HandleAction_NothingIsFainted, }; static void (* const sEndTurnFuncsTable[])(void) = { - [0] = HandleEndTurn_ContinueBattle, //B_OUTCOME_NONE? - [B_OUTCOME_WON] = HandleEndTurn_BattleWon, - [B_OUTCOME_LOST] = HandleEndTurn_BattleLost, - [B_OUTCOME_DREW] = HandleEndTurn_BattleLost, - [B_OUTCOME_RAN] = HandleEndTurn_RanFromBattle, + [0] = HandleEndTurn_ContinueBattle, + [B_OUTCOME_WON] = HandleEndTurn_BattleWon, + [B_OUTCOME_LOST] = HandleEndTurn_BattleLost, + [B_OUTCOME_DREW] = HandleEndTurn_BattleLost, + [B_OUTCOME_RAN] = HandleEndTurn_RanFromBattle, [B_OUTCOME_PLAYER_TELEPORTED] = HandleEndTurn_FinishBattle, - [B_OUTCOME_MON_FLED] = HandleEndTurn_MonFled, - [B_OUTCOME_CAUGHT] = HandleEndTurn_FinishBattle, - [B_OUTCOME_NO_SAFARI_BALLS] = HandleEndTurn_FinishBattle, - [B_OUTCOME_FORFEITED] = HandleEndTurn_FinishBattle, - [B_OUTCOME_MON_TELEPORTED] = HandleEndTurn_FinishBattle, + [B_OUTCOME_MON_FLED] = HandleEndTurn_MonFled, + [B_OUTCOME_CAUGHT] = HandleEndTurn_FinishBattle, + [B_OUTCOME_NO_SAFARI_BALLS] = HandleEndTurn_FinishBattle, + [B_OUTCOME_FORFEITED] = HandleEndTurn_FinishBattle, + [B_OUTCOME_MON_TELEPORTED] = HandleEndTurn_FinishBattle, }; -const u8 gStatusConditionString_PoisonJpn[8] = _("どく$$$$$"); -const u8 gStatusConditionString_SleepJpn[8] = _("ねむり$$$$"); -const u8 gStatusConditionString_ParalysisJpn[8] = _("まひ$$$$$"); -const u8 gStatusConditionString_BurnJpn[8] = _("やけど$$$$"); -const u8 gStatusConditionString_IceJpn[8] = _("こおり$$$$"); -const u8 gStatusConditionString_ConfusionJpn[8] = _("こんらん$$$"); -const u8 gStatusConditionString_LoveJpn[8] = _("メロメロ$$$"); +const u8 gStatusConditionString_PoisonJpn[] = _("どく$$$$$"); +const u8 gStatusConditionString_SleepJpn[] = _("ねむり$$$$"); +const u8 gStatusConditionString_ParalysisJpn[] = _("まひ$$$$$"); +const u8 gStatusConditionString_BurnJpn[] = _("やけど$$$$"); +const u8 gStatusConditionString_IceJpn[] = _("こおり$$$$"); +const u8 gStatusConditionString_ConfusionJpn[] = _("こんらん$$$"); +const u8 gStatusConditionString_LoveJpn[] = _("メロメロ$$$"); -const u8 * const gStatusConditionStringsTable[7][2] = +const u8 * const gStatusConditionStringsTable[][2] = { {gStatusConditionString_PoisonJpn, gText_Poison}, {gStatusConditionString_SleepJpn, gText_Sleep}, @@ -569,7 +568,6 @@ const u8 * const gStatusConditionStringsTable[7][2] = {gStatusConditionString_LoveJpn, gText_Love} }; -// code void CB2_InitBattle(void) { MoveSaveBlocks_ResetHeap(); @@ -1022,8 +1020,10 @@ static void CB2_HandleStartBattle(void) } break; case 3: + // Link battle, send/receive party Pokémon 2 at a time if (IsLinkTaskFinished()) { + // Send Pokémon 1-2 SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } @@ -1031,6 +1031,7 @@ static void CB2_HandleStartBattle(void) case 4: if ((GetBlockReceivedStatus() & 3) == 3) { + // Recv Pokémon 1-2 ResetBlockReceivedFlags(); memcpy(gEnemyParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; @@ -1039,30 +1040,35 @@ static void CB2_HandleStartBattle(void) case 7: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon) * 2); + // Send Pokémon 3-4 + SendBlock(bitmask_all_link_players_but_self(), &gPlayerParty[2], sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; case 8: if ((GetBlockReceivedStatus() & 3) == 3) { + // Recv Pokémon 3-4 ResetBlockReceivedFlags(); - memcpy(gEnemyParty + 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(&gEnemyParty[2], gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; case 11: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 4, sizeof(struct Pokemon) * 2); + // Send Pokémon 5-6 + SendBlock(bitmask_all_link_players_but_self(), &gPlayerParty[4], sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; case 12: if ((GetBlockReceivedStatus() & 3) == 3) { + // Recv Pokémon 5-6 ResetBlockReceivedFlags(); - memcpy(gEnemyParty + 4, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(&gEnemyParty[4], gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + TryCorrectShedinjaLanguage(&gEnemyParty[0]); TryCorrectShedinjaLanguage(&gEnemyParty[1]); TryCorrectShedinjaLanguage(&gEnemyParty[2]); @@ -1074,13 +1080,15 @@ static void CB2_HandleStartBattle(void) break; case 15: InitBattleControllers(); - sub_8184E58(); + RecordedBattle_SetTrainerInfo(); gBattleCommunication[SPRITES_INIT_STATE1] = 0; gBattleCommunication[SPRITES_INIT_STATE2] = 0; if (gBattleTypeFlags & BATTLE_TYPE_LINK) { + // Check if both players are using Emerald + // to determine if the recorded battle rng + // seed needs to be sent s32 i; - for (i = 0; i < 2 && (gLinkPlayers[i].version & 0xFF) == VERSION_EMERALD; i++); if (i == 2) @@ -1094,6 +1102,7 @@ static void CB2_HandleStartBattle(void) } break; case 16: + // Both players are using Emerald, send rng seed for recorded battle if (IsLinkTaskFinished()) { SendBlock(bitmask_all_link_players_but_self(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed)); @@ -1101,6 +1110,7 @@ static void CB2_HandleStartBattle(void) } break; case 17: + // Receive rng seed for recorded battle (only read it if partner is the link master) if ((GetBlockReceivedStatus() & 3) == 3) { ResetBlockReceivedFlags(); @@ -1110,17 +1120,17 @@ static void CB2_HandleStartBattle(void) } break; case 18: + // Finish, start battle if (BattleInitAllSprites(&gBattleCommunication[SPRITES_INIT_STATE1], &gBattleCommunication[SPRITES_INIT_STATE2])) { gPreBattleCallback1 = gMain.callback1; gMain.callback1 = BattleMainCB1; SetMainCallback2(BattleMainCB2); if (gBattleTypeFlags & BATTLE_TYPE_LINK) - { gBattleTypeFlags |= BATTLE_TYPE_LINK_IN_BATTLE; - } } break; + // Introduce short delays between sending party Pokémon for link case 5: case 9: case 13: @@ -1138,7 +1148,7 @@ static void CB2_HandleStartBattle(void) static void CB2_HandleStartMultiPartnerBattle(void) { u8 playerMultiplayerId; - u8 enemyMultiplayerId; + u8 partnerMultiplayerId; RunTasks(); AnimateSprites(); @@ -1146,7 +1156,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) playerMultiplayerId = GetMultiplayerId(); gBattleScripting.multiplayerId = playerMultiplayerId; - enemyMultiplayerId = playerMultiplayerId ^ BIT_SIDE; + partnerMultiplayerId = playerMultiplayerId ^ BIT_SIDE; switch (gBattleCommunication[MULTIUSE_STATE]) { @@ -1222,8 +1232,10 @@ static void CB2_HandleStartMultiPartnerBattle(void) } break; case 3: + // Link battle, send/receive party Pokémon in groups if (IsLinkTaskFinished()) { + // Send Pokémon 1-2 SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } @@ -1231,16 +1243,17 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 4: if ((GetBlockReceivedStatus() & 3) == 3) { + // Recv partner's Pokémon 1-2, and copy partner's and own Pokémon into party positions ResetBlockReceivedFlags(); if (gLinkPlayers[playerMultiplayerId].id != 0) { - memcpy(gPlayerParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); - memcpy(gPlayerParty + MULTI_PARTY_SIZE, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty, gBlockRecvBuffer[partnerMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(&gPlayerParty[MULTI_PARTY_SIZE], gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); } else { memcpy(gPlayerParty, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); - memcpy(gPlayerParty + MULTI_PARTY_SIZE, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(&gPlayerParty[MULTI_PARTY_SIZE], gBlockRecvBuffer[partnerMultiplayerId], sizeof(struct Pokemon) * 2); } gBattleCommunication[MULTIUSE_STATE]++; } @@ -1248,23 +1261,25 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 5: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon)); + // Send Pokémon 3 + SendBlock(bitmask_all_link_players_but_self(), &gPlayerParty[2], sizeof(struct Pokemon)); gBattleCommunication[MULTIUSE_STATE]++; } break; case 6: if ((GetBlockReceivedStatus() & 3) == 3) { + // Recv partner's Pokémon 3, and copy partner's and own Pokémon into party positions ResetBlockReceivedFlags(); if (gLinkPlayers[playerMultiplayerId].id != 0) { - memcpy(gPlayerParty + 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon)); - memcpy(gPlayerParty + 5, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon)); + memcpy(&gPlayerParty[2], gBlockRecvBuffer[partnerMultiplayerId], sizeof(struct Pokemon)); + memcpy(&gPlayerParty[2 + MULTI_PARTY_SIZE], gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon)); } else { - memcpy(gPlayerParty + 2, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon)); - memcpy(gPlayerParty + 5, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon)); + memcpy(&gPlayerParty[2], gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon)); + memcpy(&gPlayerParty[2 + MULTI_PARTY_SIZE], gBlockRecvBuffer[partnerMultiplayerId], sizeof(struct Pokemon)); } gBattleCommunication[MULTIUSE_STATE]++; } @@ -1272,6 +1287,7 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 7: if (IsLinkTaskFinished()) { + // Send enemy Pokémon 1-2 to partner SendBlock(bitmask_all_link_players_but_self(), gEnemyParty, sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } @@ -1279,45 +1295,47 @@ static void CB2_HandleStartMultiPartnerBattle(void) case 8: if ((GetBlockReceivedStatus() & 3) == 3) { + // Recv enemy Pokémon 1-2 (if not master) ResetBlockReceivedFlags(); if (GetMultiplayerId() != 0) - { memcpy(gEnemyParty, gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); - } gBattleCommunication[MULTIUSE_STATE]++; } break; case 9: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gEnemyParty + 2, sizeof(struct Pokemon) * 2); + // Send enemy Pokémon 3-4 to partner + SendBlock(bitmask_all_link_players_but_self(), &gEnemyParty[2], sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; case 10: if ((GetBlockReceivedStatus() & 3) == 3) { + // Recv enemy Pokémon 3-4 (if not master) ResetBlockReceivedFlags(); if (GetMultiplayerId() != 0) - { - memcpy(gEnemyParty + 2, gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); - } + memcpy(&gEnemyParty[2], gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; case 11: if (IsLinkTaskFinished()) { - SendBlock(bitmask_all_link_players_but_self(), gEnemyParty + 4, sizeof(struct Pokemon) * 2); + // Send enemy Pokémon 5-6 to partner + SendBlock(bitmask_all_link_players_but_self(), &gEnemyParty[4], sizeof(struct Pokemon) * 2); gBattleCommunication[MULTIUSE_STATE]++; } break; case 12: if ((GetBlockReceivedStatus() & 3) == 3) { + // Recv enemy Pokémon 5-6 (if not master) ResetBlockReceivedFlags(); if (GetMultiplayerId() != 0) - memcpy(gEnemyParty + 4, gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); + memcpy(&gEnemyParty[4], gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); + TryCorrectShedinjaLanguage(&gPlayerParty[0]); TryCorrectShedinjaLanguage(&gPlayerParty[1]); TryCorrectShedinjaLanguage(&gPlayerParty[2]); @@ -1335,19 +1353,16 @@ static void CB2_HandleStartMultiPartnerBattle(void) break; case 13: InitBattleControllers(); - sub_8184E58(); + RecordedBattle_SetTrainerInfo(); gBattleCommunication[SPRITES_INIT_STATE1] = 0; gBattleCommunication[SPRITES_INIT_STATE2] = 0; if (gBattleTypeFlags & BATTLE_TYPE_LINK) - { gBattleCommunication[MULTIUSE_STATE] = 14; - } else - { gBattleCommunication[MULTIUSE_STATE] = 16; - } break; case 14: + // Send rng seed for recorded battle if (IsLinkTaskFinished()) { SendBlock(bitmask_all_link_players_but_self(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed)); @@ -1355,15 +1370,17 @@ static void CB2_HandleStartMultiPartnerBattle(void) } break; case 15: + // Receive rng seed for recorded battle (only read it if partner is the link master) if ((GetBlockReceivedStatus() & 3) == 3) { ResetBlockReceivedFlags(); if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER)) - memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed)); + memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[partnerMultiplayerId], sizeof(gRecordedBattleRngSeed)); gBattleCommunication[MULTIUSE_STATE]++; } break; case 16: + // Finish, start battle if (BattleInitAllSprites(&gBattleCommunication[SPRITES_INIT_STATE1], &gBattleCommunication[SPRITES_INIT_STATE2])) { TrySetLinkBattleTowerEnemyPartyLevel(); @@ -1371,31 +1388,29 @@ static void CB2_HandleStartMultiPartnerBattle(void) gMain.callback1 = BattleMainCB1; SetMainCallback2(BattleMainCB2); if (gBattleTypeFlags & BATTLE_TYPE_LINK) - { gBattleTypeFlags |= BATTLE_TYPE_LINK_IN_BATTLE; - } } break; } } -static void sub_80379F8(u8 arrayIdPlus) +static void SetMultiPartnerMenuParty(u8 offset) { s32 i; - for (i = 0; i < (int)ARRAY_COUNT(gMultiPartnerParty); i++) + for (i = 0; i < MULTI_PARTY_SIZE; i++) { - gMultiPartnerParty[i].species = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_SPECIES); - gMultiPartnerParty[i].heldItem = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_HELD_ITEM); - GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_NICKNAME, gMultiPartnerParty[i].nickname); - gMultiPartnerParty[i].level = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_LEVEL); - gMultiPartnerParty[i].hp = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_HP); - gMultiPartnerParty[i].maxhp = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_MAX_HP); - gMultiPartnerParty[i].status = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_STATUS); - gMultiPartnerParty[i].personality = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_PERSONALITY); - gMultiPartnerParty[i].gender = GetMonGender(&gPlayerParty[arrayIdPlus + i]); + gMultiPartnerParty[i].species = GetMonData(&gPlayerParty[offset + i], MON_DATA_SPECIES); + gMultiPartnerParty[i].heldItem = GetMonData(&gPlayerParty[offset + i], MON_DATA_HELD_ITEM); + GetMonData(&gPlayerParty[offset + i], MON_DATA_NICKNAME, gMultiPartnerParty[i].nickname); + gMultiPartnerParty[i].level = GetMonData(&gPlayerParty[offset + i], MON_DATA_LEVEL); + gMultiPartnerParty[i].hp = GetMonData(&gPlayerParty[offset + i], MON_DATA_HP); + gMultiPartnerParty[i].maxhp = GetMonData(&gPlayerParty[offset + i], MON_DATA_MAX_HP); + gMultiPartnerParty[i].status = GetMonData(&gPlayerParty[offset + i], MON_DATA_STATUS); + gMultiPartnerParty[i].personality = GetMonData(&gPlayerParty[offset + i], MON_DATA_PERSONALITY); + gMultiPartnerParty[i].gender = GetMonGender(&gPlayerParty[offset + i]); StripExtCtrlCodes(gMultiPartnerParty[i].nickname); - if (GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_LANGUAGE) != LANGUAGE_JAPANESE) + if (GetMonData(&gPlayerParty[offset + i], MON_DATA_LANGUAGE) != LANGUAGE_JAPANESE) PadNameString(gMultiPartnerParty[i].nickname, CHAR_SPACE); } memcpy(sMultiPartnerPartyBuffer, gMultiPartnerParty, sizeof(gMultiPartnerParty)); @@ -1405,15 +1420,15 @@ static void CB2_PreInitMultiBattle(void) { s32 i; u8 playerMultiplierId; - s32 numPlayers = 4; - u8 r4 = 0xF; + s32 numPlayers = MAX_BATTLERS_COUNT; + u8 blockMask = 0xF; u32 *savedBattleTypeFlags; void (**savedCallback)(void); if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) { numPlayers = 2; - r4 = 3; + blockMask = 3; } playerMultiplierId = GetMultiplayerId(); @@ -1430,14 +1445,14 @@ static void CB2_PreInitMultiBattle(void) case 0: if (gReceivedRemoteLinkPlayers != 0 && IsLinkTaskFinished()) { - sMultiPartnerPartyBuffer = Alloc(sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); - sub_80379F8(0); - SendBlock(bitmask_all_link_players_but_self(), sMultiPartnerPartyBuffer, sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); + sMultiPartnerPartyBuffer = Alloc(sizeof(gMultiPartnerParty)); + SetMultiPartnerMenuParty(0); + SendBlock(bitmask_all_link_players_but_self(), sMultiPartnerPartyBuffer, sizeof(gMultiPartnerParty)); gBattleCommunication[MULTIUSE_STATE]++; } break; case 1: - if ((GetBlockReceivedStatus() & r4) == r4) + if ((GetBlockReceivedStatus() & blockMask) == blockMask) { ResetBlockReceivedFlags(); for (i = 0; i < numPlayers; i++) @@ -1450,12 +1465,12 @@ static void CB2_PreInitMultiBattle(void) if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[playerMultiplierId].id & 1)) || (gLinkPlayers[i].id & 1 && gLinkPlayers[playerMultiplierId].id & 1)) { - memcpy(gMultiPartnerParty, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); + memcpy(gMultiPartnerParty, gBlockRecvBuffer[i], sizeof(gMultiPartnerParty)); } } else { - memcpy(gMultiPartnerParty, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); + memcpy(gMultiPartnerParty, gBlockRecvBuffer[i], sizeof(gMultiPartnerParty)); } } gBattleCommunication[MULTIUSE_STATE]++; @@ -1514,8 +1529,8 @@ static void CB2_PreInitIngamePlayerPartnerBattle(void) switch (gBattleCommunication[MULTIUSE_STATE]) { case 0: - sMultiPartnerPartyBuffer = Alloc(sizeof(struct UnknownPokemonStruct4) * ARRAY_COUNT(gMultiPartnerParty)); - sub_80379F8(3); + sMultiPartnerPartyBuffer = Alloc(sizeof(gMultiPartnerParty)); + SetMultiPartnerMenuParty(MULTI_PARTY_SIZE); gBattleCommunication[MULTIUSE_STATE]++; *savedCallback = gMain.savedCallback; *savedBattleTypeFlags = gBattleTypeFlags; @@ -1773,7 +1788,7 @@ static void CB2_HandleStartMultiBattle(void) break; case 7: InitBattleControllers(); - sub_8184E58(); + RecordedBattle_SetTrainerInfo(); gBattleCommunication[SPRITES_INIT_STATE1] = 0; gBattleCommunication[SPRITES_INIT_STATE2] = 0; if (gBattleTypeFlags & BATTLE_TYPE_LINK) @@ -1841,11 +1856,12 @@ void BattleMainCB2(void) UpdatePaletteFade(); RunTasks(); - if (JOY_HELD(B_BUTTON) && gBattleTypeFlags & BATTLE_TYPE_RECORDED && sub_8186450()) + if (JOY_HELD(B_BUTTON) && gBattleTypeFlags & BATTLE_TYPE_RECORDED && RecordedBattle_CanStopPlayback()) { + // Player pressed B during recorded battle playback, end battle gSpecialVar_Result = gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED; ResetPaletteFadeControl(); - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); SetMainCallback2(CB2_QuitRecordedBattle); } } @@ -1854,7 +1870,7 @@ static void FreeRestoreBattleData(void) { gMain.callback1 = gPreBattleCallback1; gScanlineEffect.state = 3; - gMain.inBattle = 0; + gMain.inBattle = FALSE; ZeroEnemyPartyMons(); m4aSongNumStop(SE_LOW_HEALTH); FreeMonSpritesGfx(); @@ -1875,34 +1891,37 @@ void CB2_QuitRecordedBattle(void) } } -void sub_8038528(struct Sprite* sprite) +#define sState data[0] +#define sDelay data[4] + +static void SpriteCB_UnusedBattleInit(struct Sprite* sprite) { - sprite->data[0] = 0; - sprite->callback = sub_8038538; + sprite->sState = 0; + sprite->callback = SpriteCB_UnusedBattleInit_Main; } -static void sub_8038538(struct Sprite *sprite) +static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite) { - u16 *arr = (u16*)(gDecompressionBuffer); + u16 *arr = (u16*)gDecompressionBuffer; - switch (sprite->data[0]) + switch (sprite->sState) { case 0: - sprite->data[0]++; + sprite->sState++; sprite->data[1] = 0; sprite->data[2] = 0x281; sprite->data[3] = 0; - sprite->data[4] = 1; + sprite->sDelay = 1; // fall through case 1: - sprite->data[4]--; - if (sprite->data[4] == 0) + sprite->sDelay--; + if (sprite->sDelay == 0) { s32 i; s32 r2; s32 r0; - sprite->data[4] = 2; + sprite->sDelay = 2; r2 = sprite->data[1] + sprite->data[3] * 32; r0 = sprite->data[2] - sprite->data[3] * 32; for (i = 0; i < 29; i += 2) @@ -1913,7 +1932,7 @@ static void sub_8038538(struct Sprite *sprite) sprite->data[3]++; if (sprite->data[3] == 21) { - sprite->data[0]++; + sprite->sState++; sprite->data[1] = 32; } } @@ -1946,8 +1965,8 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) { - if (gTrainers[trainerNum].partySize > 3) - monsCount = 3; + if (gTrainers[trainerNum].partySize > PARTY_SIZE / 2) + monsCount = PARTY_SIZE / 2; else monsCount = gTrainers[trainerNum].partySize; } @@ -2044,9 +2063,9 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir return gTrainers[trainerNum].partySize; } -void sub_8038A04(void) // unused +static void sub_8038A04(void) // unused { - if (REG_VCOUNT < 0xA0 && REG_VCOUNT >= 0x6F) + if (REG_VCOUNT < DISPLAY_HEIGHT && REG_VCOUNT >= 111) SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_SCREENBASE(24) | BGCNT_TXT256x512); } @@ -2246,33 +2265,35 @@ static void EndLinkBattleInSteps(void) case 1: if (--gBattleCommunication[1] == 0) { - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); gBattleCommunication[MULTIUSE_STATE]++; } break; case 2: if (!gPaletteFade.active) { - u8 monsCount; + u8 battlerCount; gMain.anyLinkBattlerHasFrontierPass = RecordedBattle_GetFrontierPassFlag(); if (gBattleTypeFlags & BATTLE_TYPE_MULTI) - monsCount = 4; + battlerCount = 4; else - monsCount = 2; + battlerCount = 2; - for (i = 0; i < monsCount && (gLinkPlayers[i].version & 0xFF) == VERSION_EMERALD; i++); + for (i = 0; i < battlerCount && (gLinkPlayers[i].version & 0xFF) == VERSION_EMERALD; i++); - if (!gSaveBlock2Ptr->frontier.disableRecordBattle && i == monsCount) + if (!gSaveBlock2Ptr->frontier.disableRecordBattle && i == battlerCount) { if (FlagGet(FLAG_SYS_FRONTIER_PASS)) { + // Ask player if they want to record the battle FreeAllWindowBuffers(); - SetMainCallback2(sub_80392A8); + SetMainCallback2(CB2_InitAskRecordBattle); } else if (!gMain.anyLinkBattlerHasFrontierPass) { + // No players can record this battle, end SetMainCallback2(gMain.savedCallback); FreeBattleResources(); FreeBattleSpritesData(); @@ -2280,6 +2301,8 @@ static void EndLinkBattleInSteps(void) } else if (gReceivedRemoteLinkPlayers == 0) { + // Player can't record battle but + // another player can, reconnect with them CreateTask(Task_ReconnectWithLinkPlayers, 5); gBattleCommunication[MULTIUSE_STATE]++; } @@ -2298,12 +2321,12 @@ static void EndLinkBattleInSteps(void) } break; case 3: - CpuFill32(0, (void*)(VRAM), VRAM_SIZE); + CpuFill32(0, (void*)VRAM, VRAM_SIZE); for (i = 0; i < 2; i++) LoadChosenBattleElement(i); - BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); gBattleCommunication[MULTIUSE_STATE]++; break; case 4: @@ -2337,7 +2360,7 @@ static void EndLinkBattleInSteps(void) case 9: if (!gMain.anyLinkBattlerHasFrontierPass || gWirelessCommType || gReceivedRemoteLinkPlayers != 1) { - gMain.anyLinkBattlerHasFrontierPass = 0; + gMain.anyLinkBattlerHasFrontierPass = FALSE; SetMainCallback2(gMain.savedCallback); FreeBattleResources(); FreeBattleSpritesData(); @@ -2379,7 +2402,7 @@ u32 GetBattleBgTemplateData(u8 arrayId, u8 caseId) return ret; } -static void sub_80392A8(void) +static void CB2_InitAskRecordBattle(void) { s32 i; @@ -2407,14 +2430,14 @@ static void sub_80392A8(void) FreeAllSpritePalettes(); gReservedSpritePaletteCount = 4; SetVBlankCallback(VBlankCB_Battle); - SetMainCallback2(sub_803937C); + SetMainCallback2(CB2_AskRecordBattle); BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); gBattleCommunication[MULTIUSE_STATE] = 0; } -static void sub_803937C(void) +static void CB2_AskRecordBattle(void) { - sub_803939C(); + AskRecordBattle(); AnimateSprites(); BuildOamBuffer(); RunTextPrinters(); @@ -2422,33 +2445,50 @@ static void sub_803937C(void) RunTasks(); } -static void sub_803939C(void) + +// States for AskRecordBattle +#define STATE_INIT 0 +#define STATE_LINK 1 +#define STATE_WAIT_LINK 2 +#define STATE_ASK_RECORD 3 +#define STATE_PRINT_YES_NO 4 +#define STATE_HANDLE_YES_NO 5 +#define STATE_RECORD_NO 6 +#define STATE_END_RECORD_NO 7 +#define STATE_WAIT_END 8 +#define STATE_END 9 +#define STATE_RECORD_YES 10 +#define STATE_RECORD_WAIT 11 +#define STATE_END_RECORD_YES 12 + +static void AskRecordBattle(void) { switch (gBattleCommunication[MULTIUSE_STATE]) { - case 0: + case STATE_INIT: ShowBg(0); ShowBg(1); ShowBg(2); gBattleCommunication[MULTIUSE_STATE]++; break; - case 1: + case STATE_LINK: if (gMain.anyLinkBattlerHasFrontierPass && gReceivedRemoteLinkPlayers == 0) CreateTask(Task_ReconnectWithLinkPlayers, 5); gBattleCommunication[MULTIUSE_STATE]++; break; - case 2: + case STATE_WAIT_LINK: if (!FuncIsActiveTask(Task_ReconnectWithLinkPlayers)) gBattleCommunication[MULTIUSE_STATE]++; break; - case 3: + case STATE_ASK_RECORD: if (!gPaletteFade.active) { + // "Would you like to record your battle on your FRONTIER PASS?" BattlePutTextOnWindow(gText_RecordBattleToPass, 0); gBattleCommunication[MULTIUSE_STATE]++; } break; - case 4: + case STATE_PRINT_YES_NO: if (!IsTextPrinterActive(0)) { HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0); @@ -2458,11 +2498,12 @@ static void sub_803939C(void) gBattleCommunication[MULTIUSE_STATE]++; } break; - case 5: + case STATE_HANDLE_YES_NO: if (JOY_NEW(DPAD_UP)) { if (gBattleCommunication[CURSOR_POSITION] != 0) { + // Moved cursor onto Yes PlaySE(SE_SELECT); BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]); gBattleCommunication[CURSOR_POSITION] = 0; @@ -2473,6 +2514,7 @@ static void sub_803939C(void) { if (gBattleCommunication[CURSOR_POSITION] == 0) { + // Moved cursor onto No PlaySE(SE_SELECT); BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]); gBattleCommunication[CURSOR_POSITION] = 1; @@ -2484,12 +2526,14 @@ static void sub_803939C(void) PlaySE(SE_SELECT); if (gBattleCommunication[CURSOR_POSITION] == 0) { + // Selected Yes HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR); gBattleCommunication[1] = MoveRecordedBattleToSaveData(); - gBattleCommunication[MULTIUSE_STATE] = 10; + gBattleCommunication[MULTIUSE_STATE] = STATE_RECORD_YES; } else { + // Selected No gBattleCommunication[MULTIUSE_STATE]++; } } @@ -2499,19 +2543,20 @@ static void sub_803939C(void) gBattleCommunication[MULTIUSE_STATE]++; } break; - case 6: + case STATE_RECORD_NO: if (IsLinkTaskFinished() == TRUE) { HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR); if (gMain.anyLinkBattlerHasFrontierPass) { + // Other battlers may be recording, wait for them SetLinkStandbyCallback(); BattlePutTextOnWindow(gText_LinkStandby3, 0); } - gBattleCommunication[MULTIUSE_STATE]++; + gBattleCommunication[MULTIUSE_STATE]++; // STATE_END_RECORD_NO } break; - case 8: + case STATE_WAIT_END: if (--gBattleCommunication[1] == 0) { if (gMain.anyLinkBattlerHasFrontierPass && !gWirelessCommType) @@ -2519,10 +2564,10 @@ static void sub_803939C(void) gBattleCommunication[MULTIUSE_STATE]++; } break; - case 9: + case STATE_END: if (!gMain.anyLinkBattlerHasFrontierPass || gWirelessCommType || gReceivedRemoteLinkPlayers != 1) { - gMain.anyLinkBattlerHasFrontierPass = 0; + gMain.anyLinkBattlerHasFrontierPass = FALSE; if (!gPaletteFade.active) { SetMainCallback2(gMain.savedCallback); @@ -2532,24 +2577,24 @@ static void sub_803939C(void) } } break; - case 10: + case STATE_RECORD_YES: if (gBattleCommunication[1] == 1) { PlaySE(SE_SAVE); BattleStringExpandPlaceholdersToDisplayedString(gText_BattleRecordedOnPass); BattlePutTextOnWindow(gDisplayedStringBattle, 0); - gBattleCommunication[1] = 0x80; + gBattleCommunication[1] = 128; // Delay gBattleCommunication[MULTIUSE_STATE]++; } else { BattleStringExpandPlaceholdersToDisplayedString(BattleFrontier_BattleTowerBattleRoom_Text_RecordCouldntBeSaved); BattlePutTextOnWindow(gDisplayedStringBattle, 0); - gBattleCommunication[1] = 0x80; + gBattleCommunication[1] = 128; // Delay gBattleCommunication[MULTIUSE_STATE]++; } break; - case 11: + case STATE_RECORD_WAIT: if (IsLinkTaskFinished() == TRUE && !IsTextPrinterActive(0) && --gBattleCommunication[1] == 0) { if (gMain.anyLinkBattlerHasFrontierPass) @@ -2560,25 +2605,25 @@ static void sub_803939C(void) gBattleCommunication[MULTIUSE_STATE]++; } break; - case 12: - case 7: + case STATE_END_RECORD_YES: + case STATE_END_RECORD_NO: if (!IsTextPrinterActive(0)) { if (gMain.anyLinkBattlerHasFrontierPass) { if (IsLinkTaskFinished() == TRUE) { - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); - gBattleCommunication[1] = 0x20; - gBattleCommunication[MULTIUSE_STATE] = 8; + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); + gBattleCommunication[1] = 32; // Delay + gBattleCommunication[MULTIUSE_STATE] = STATE_WAIT_END; } } else { - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); - gBattleCommunication[1] = 0x20; - gBattleCommunication[MULTIUSE_STATE] = 8; + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); + gBattleCommunication[1] = 32; // Delay + gBattleCommunication[MULTIUSE_STATE] = STATE_WAIT_END; } } break; @@ -2599,9 +2644,9 @@ static void TryCorrectShedinjaLanguage(struct Pokemon *mon) } } -u32 GetBattleWindowTemplatePixelWidth(u32 setId, u32 tableId) +u32 GetBattleWindowTemplatePixelWidth(u32 windowsType, u32 tableId) { - return gBattleWindowTemplates[setId][tableId].width * 8; + return gBattleWindowTemplates[windowsType][tableId].width * 8; } #define sBattler data[0] @@ -2651,31 +2696,37 @@ void SpriteCallbackDummy_2(struct Sprite *sprite) } +#define sNumFlickers data[3] +#define sDelay data[4] + // Unused -static void sub_80398BC(struct Sprite *sprite) +static void SpriteCB_InitFlicker(struct Sprite *sprite) { - sprite->data[3] = 6; - sprite->data[4] = 1; - sprite->callback = sub_80398D0; + sprite->sNumFlickers = 6; + sprite->sDelay = 1; + sprite->callback = SpriteCB_Flicker; } -static void sub_80398D0(struct Sprite *sprite) +static void SpriteCB_Flicker(struct Sprite *sprite) { - sprite->data[4]--; - if (sprite->data[4] == 0) + sprite->sDelay--; + if (sprite->sDelay == 0) { - sprite->data[4] = 8; + sprite->sDelay = 8; sprite->invisible ^= 1; - sprite->data[3]--; - if (sprite->data[3] == 0) + sprite->sNumFlickers--; + if (sprite->sNumFlickers == 0) { sprite->invisible = FALSE; sprite->callback = SpriteCallbackDummy_2; - sUnusedUnknownArray[0] = 0; + sFlickerArray[0] = 0; } } } +#undef sNumFlickers +#undef sDelay + extern const struct MonCoords gMonFrontPicCoords[]; extern const struct MonCoords gCastformFrontSpriteCoords[]; @@ -2772,7 +2823,7 @@ void SpriteCb_HideAsMoveTarget(struct Sprite *sprite) sprite->callback = SpriteCallbackDummy_2; } -void SpriteCb_OpponentMonFromBall(struct Sprite *sprite) +void SpriteCB_OpponentMonFromBall(struct Sprite *sprite) { if (sprite->affineAnimEnded) { @@ -2798,19 +2849,19 @@ static void SpriteCB_BattleSpriteSlideLeft(struct Sprite *sprite) sprite->x2 -= 2; if (sprite->x2 == 0) { - sprite->callback = SpriteCallbackDummy_3; + sprite->callback = SpriteCB_Idle; sprite->data[1] = 0; } } } // Unused -static void sub_80105DC(struct Sprite *sprite) +static void SetIdleSpriteCallback(struct Sprite *sprite) { - sprite->callback = SpriteCallbackDummy_3; + sprite->callback = SpriteCB_Idle; } -static void SpriteCallbackDummy_3(struct Sprite *sprite) +static void SpriteCB_Idle(struct Sprite *sprite) { } @@ -2923,23 +2974,25 @@ static void SpriteCB_BounceEffect(struct Sprite *sprite) #undef sBouncerSpriteId #undef sWhich -void SpriteCb_PlayerMonFromBall(struct Sprite *sprite) +void SpriteCB_PlayerMonFromBall(struct Sprite *sprite) { if (sprite->affineAnimEnded) BattleAnimateBackSprite(sprite, sprite->sSpeciesId); } -void sub_8039E60(struct Sprite *sprite) +static void SpriteCB_TrainerThrowObject_Main(struct Sprite *sprite) { sub_8039E9C(sprite); if (sprite->animEnded) - sprite->callback = SpriteCallbackDummy_3; + sprite->callback = SpriteCB_Idle; } +// Sprite callback for a trainer back pic to throw an object +// (Wally throwing a ball, throwing Pokéblocks/balls in the Safari Zone) void SpriteCB_TrainerThrowObject(struct Sprite *sprite) { StartSpriteAnim(sprite, 1); - sprite->callback = sub_8039E60; + sprite->callback = SpriteCB_TrainerThrowObject_Main; } void sub_8039E9C(struct Sprite *sprite) @@ -3235,7 +3288,7 @@ void FaintClearSetData(void) gProtectStructs[gActiveBattler].confusionSelfDmg = 0; gProtectStructs[gActiveBattler].targetNotAffected = 0; gProtectStructs[gActiveBattler].chargingTurn = 0; - gProtectStructs[gActiveBattler].fleeFlag = 0; + gProtectStructs[gActiveBattler].fleeType = 0; gProtectStructs[gActiveBattler].usedImprisonedMove = 0; gProtectStructs[gActiveBattler].loveImmobility = 0; gProtectStructs[gActiveBattler].usedDisabledMove = 0; @@ -4352,13 +4405,9 @@ static void HandleTurnActionSelectionState(void) break; case B_ACTION_SAFARI_POKEBLOCK: if ((gBattleBufferB[gActiveBattler][1] | (gBattleBufferB[gActiveBattler][2] << 8)) != 0) - { gBattleCommunication[gActiveBattler]++; - } else - { gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; - } break; case B_ACTION_SAFARI_GO_NEAR: gBattleCommunication[gActiveBattler]++; @@ -4984,15 +5033,15 @@ static void HandleEndTurn_RanFromBattle(void) } else { - switch (gProtectStructs[gBattlerAttacker].fleeFlag) + switch (gProtectStructs[gBattlerAttacker].fleeType) { default: gBattlescriptCurrInstr = BattleScript_GotAwaySafely; break; - case 1: + case FLEE_ITEM: gBattlescriptCurrInstr = BattleScript_SmokeBallEscape; break; - case 2: + case FLEE_ABILITY: gBattlescriptCurrInstr = BattleScript_RanAwayUsingMonAbility; break; } @@ -5055,7 +5104,7 @@ static void HandleEndTurn_FinishBattle(void) TryPutBreakingNewsOnAir(); } - sub_8186444(); + RecordedBattle_SetPlaybackFinished(); BeginFastPaletteFade(3); FadeOutMapMusic(5); gBattleMainFunc = FreeResetData_ReturnToOvOrDoEvolutions; @@ -5142,7 +5191,7 @@ static void ReturnFromBattleToOverworld(void) return; gSpecialVar_Result = gBattleOutcome; - gMain.inBattle = 0; + gMain.inBattle = FALSE; gMain.callback1 = gPreBattleCallback1; if (gBattleTypeFlags & BATTLE_TYPE_ROAMER) diff --git a/src/battle_message.c b/src/battle_message.c index 1f4bd893fa..1dbe0a2dd3 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2053,7 +2053,8 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = static const struct BattleWindowText *const sBattleTextOnWindowsInfo[] = { - sTextOnWindowsInfo_Normal, sTextOnWindowsInfo_Arena + [B_WIN_TYPE_NORMAL] = sTextOnWindowsInfo_Normal, + [B_WIN_TYPE_ARENA] = sTextOnWindowsInfo_Arena }; static const u8 sRecordedBattleTextSpeeds[] = {8, 4, 1, 0}; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e7520b1ee7..92f9764728 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1834,8 +1834,8 @@ static void Cmd_datahpupdate(void) if (gBattleStruct->dynamicMoveType == 0) moveType = gBattleMoves[gCurrentMove].type; - else if (!(gBattleStruct->dynamicMoveType & 0x40)) - moveType = gBattleStruct->dynamicMoveType & 0x3F; + else if (!(gBattleStruct->dynamicMoveType & F_DYNAMIC_TYPE_1)) + moveType = gBattleStruct->dynamicMoveType & DYNAMIC_TYPE_MASK; else moveType = gBattleMoves[gCurrentMove].type; @@ -3489,6 +3489,8 @@ static void Cmd_getexp(void) } } +// For battles that aren't BATTLE_TYPE_LINK or BATTLE_TYPE_RECORDED_LINK, the only thing this +// command does is check whether the player has won/lost by totaling each team's HP static void Cmd_unknown_24(void) { u16 HP_count = 0; @@ -3497,11 +3499,14 @@ static void Cmd_unknown_24(void) if (gBattleControllerExecFlags) return; + // Get total HP for the player's party to determine if the player has lost if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && gPartnerTrainerId == TRAINER_STEVEN_PARTNER) { + // In multi battle with Steven, skip his Pokémon for (i = 0; i < MULTI_PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) + && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP); } } @@ -3509,28 +3514,30 @@ static void Cmd_unknown_24(void) { for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) - && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostPlayerMons & gBitTable[i]))) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) + && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) + && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) + || !(gBattleStruct->arenaLostPlayerMons & gBitTable[i]))) { HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP); } } } - if (HP_count == 0) gBattleOutcome |= B_OUTCOME_LOST; - HP_count = 0; + // Get total HP for the enemy's party to determine if the player has won for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG) - && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostOpponentMons & gBitTable[i]))) + if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) + && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG) + && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) + || !(gBattleStruct->arenaLostOpponentMons & gBitTable[i]))) { HP_count += GetMonData(&gEnemyParty[i], MON_DATA_HP); } } - if (HP_count == 0) gBattleOutcome |= B_OUTCOME_WON; @@ -4844,7 +4851,7 @@ static void Cmd_openpartyscreen(void) else if (!gSpecialStatuses[gActiveBattler].flag40) { ChooseMonToSendOut(PARTY_SIZE); - gSpecialStatuses[gActiveBattler].flag40 = 1; + gSpecialStatuses[gActiveBattler].flag40 = TRUE; } } else @@ -4873,7 +4880,7 @@ static void Cmd_openpartyscreen(void) else if (!gSpecialStatuses[gActiveBattler].flag40) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[2]); - gSpecialStatuses[gActiveBattler].flag40 = 1; + gSpecialStatuses[gActiveBattler].flag40 = TRUE; } else { @@ -4895,7 +4902,7 @@ static void Cmd_openpartyscreen(void) else if (!gSpecialStatuses[gActiveBattler].flag40) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[0]); - gSpecialStatuses[gActiveBattler].flag40 = 1; + gSpecialStatuses[gActiveBattler].flag40 = TRUE; } else if (!(flags & 1)) { @@ -4916,7 +4923,7 @@ static void Cmd_openpartyscreen(void) else if (!gSpecialStatuses[gActiveBattler].flag40) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[3]); - gSpecialStatuses[gActiveBattler].flag40 = 1; + gSpecialStatuses[gActiveBattler].flag40 = TRUE; } else { @@ -4938,7 +4945,7 @@ static void Cmd_openpartyscreen(void) else if (!gSpecialStatuses[gActiveBattler].flag40) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[1]); - gSpecialStatuses[gActiveBattler].flag40 = 1; + gSpecialStatuses[gActiveBattler].flag40 = TRUE; } else if (!(flags & 2)) { @@ -5001,7 +5008,7 @@ static void Cmd_openpartyscreen(void) else if (!gSpecialStatuses[gActiveBattler].flag40) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[0]); - gSpecialStatuses[gActiveBattler].flag40 = 1; + gSpecialStatuses[gActiveBattler].flag40 = TRUE; } } if (gBitTable[3] & hitmarkerFaintBits && hitmarkerFaintBits & gBitTable[1]) @@ -5017,7 +5024,7 @@ static void Cmd_openpartyscreen(void) else if (!gSpecialStatuses[gActiveBattler].flag40) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[1]); - gSpecialStatuses[gActiveBattler].flag40 = 1; + gSpecialStatuses[gActiveBattler].flag40 = TRUE; } } gBattlescriptCurrInstr += 6; @@ -5175,7 +5182,7 @@ static void Cmd_switchineffects(void) UpdateSentPokesToOpponentValue(gActiveBattler); gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - gSpecialStatuses[gActiveBattler].flag40 = 0; + gSpecialStatuses[gActiveBattler].flag40 = FALSE; if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES_DAMAGED) && (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES) @@ -5230,7 +5237,7 @@ static void Cmd_switchineffects(void) *hpOnSwitchout = gBattleMons[i].hp; } - if (gBattlescriptCurrInstr[1] == 5) + if (gBattlescriptCurrInstr[1] == BS_UNK_5) { u32 hitmarkerFaintBits = gHitMarker >> 28; @@ -6282,7 +6289,7 @@ static void Cmd_various(void) gBattleCommunication[0] = IsRunningFromBattleImpossible(); break; case VARIOUS_GET_MOVE_TARGET: - gBattlerTarget = GetMoveTarget(gCurrentMove, 0); + gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); break; case VARIOUS_GET_BATTLER_FAINTED: if (gHitMarker & HITMARKER_FAINTED(gActiveBattler)) @@ -6597,7 +6604,7 @@ static void Cmd_trymirrormove(void) { gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gCurrentMove = move; - gBattlerTarget = GetMoveTarget(gCurrentMove, 0); + gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; } else if (validMovesCount) @@ -6605,7 +6612,7 @@ static void Cmd_trymirrormove(void) gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; i = Random() % validMovesCount; gCurrentMove = movesArray[i]; - gBattlerTarget = GetMoveTarget(gCurrentMove, 0); + gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; } else @@ -7805,7 +7812,7 @@ static void Cmd_metronome(void) { gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; - gBattlerTarget = GetMoveTarget(gCurrentMove, 0); + gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); return; } } @@ -8154,7 +8161,7 @@ static void Cmd_trychoosesleeptalkmove(void) gCalledMove = gBattleMons[gBattlerAttacker].moves[movePosition]; gCurrMovePos = movePosition; gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; - gBattlerTarget = GetMoveTarget(gCalledMove, 0); + gBattlerTarget = GetMoveTarget(gCalledMove, NO_TARGET_OVERRIDE); gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); } } @@ -8758,29 +8765,28 @@ static void Cmd_recoverbasedonsunlight(void) static void Cmd_hiddenpowercalc(void) { - u8 powerBits; - u8 typeBits; + u8 powerBits = ((gBattleMons[gBattlerAttacker].hpIV & 2) >> 1) + | ((gBattleMons[gBattlerAttacker].attackIV & 2) << 0) + | ((gBattleMons[gBattlerAttacker].defenseIV & 2) << 1) + | ((gBattleMons[gBattlerAttacker].speedIV & 2) << 2) + | ((gBattleMons[gBattlerAttacker].spAttackIV & 2) << 3) + | ((gBattleMons[gBattlerAttacker].spDefenseIV & 2) << 4); - powerBits = ((gBattleMons[gBattlerAttacker].hpIV & 2) >> 1) - | ((gBattleMons[gBattlerAttacker].attackIV & 2) << 0) - | ((gBattleMons[gBattlerAttacker].defenseIV & 2) << 1) - | ((gBattleMons[gBattlerAttacker].speedIV & 2) << 2) - | ((gBattleMons[gBattlerAttacker].spAttackIV & 2) << 3) - | ((gBattleMons[gBattlerAttacker].spDefenseIV & 2) << 4); - - typeBits = ((gBattleMons[gBattlerAttacker].hpIV & 1) << 0) - | ((gBattleMons[gBattlerAttacker].attackIV & 1) << 1) - | ((gBattleMons[gBattlerAttacker].defenseIV & 1) << 2) - | ((gBattleMons[gBattlerAttacker].speedIV & 1) << 3) - | ((gBattleMons[gBattlerAttacker].spAttackIV & 1) << 4) - | ((gBattleMons[gBattlerAttacker].spDefenseIV & 1) << 5); + u8 typeBits = ((gBattleMons[gBattlerAttacker].hpIV & 1) << 0) + | ((gBattleMons[gBattlerAttacker].attackIV & 1) << 1) + | ((gBattleMons[gBattlerAttacker].defenseIV & 1) << 2) + | ((gBattleMons[gBattlerAttacker].speedIV & 1) << 3) + | ((gBattleMons[gBattlerAttacker].spAttackIV & 1) << 4) + | ((gBattleMons[gBattlerAttacker].spDefenseIV & 1) << 5); gDynamicBasePower = (40 * powerBits) / 63 + 30; - gBattleStruct->dynamicMoveType = (15 * typeBits) / 63 + 1; + // Subtract 3 instead of 1 below because 2 types are excluded (TYPE_NORMAL and TYPE_MYSTERY) + // The final + 1 skips past Normal, and the following conditional skips TYPE_MYSTERY + gBattleStruct->dynamicMoveType = ((NUMBER_OF_MON_TYPES - 3) * typeBits) / 63 + 1; if (gBattleStruct->dynamicMoveType >= TYPE_MYSTERY) gBattleStruct->dynamicMoveType++; - gBattleStruct->dynamicMoveType |= 0xC0; + gBattleStruct->dynamicMoveType |= F_DYNAMIC_TYPE_1 | F_DYNAMIC_TYPE_2; gBattlescriptCurrInstr++; } @@ -8972,7 +8978,7 @@ static void Cmd_callterrainattack(void) // nature power { gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gCurrentMove = sNaturePowerMoves[gBattleTerrain]; - gBattlerTarget = GetMoveTarget(gCurrentMove, 0); + gBattlerTarget = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); gBattlescriptCurrInstr++; } @@ -9382,7 +9388,7 @@ static void Cmd_assistattackselect(void) { gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED; gCalledMove = movesArray[((Random() & 0xFF) * chooseableMovesNo) >> 8]; - gBattlerTarget = GetMoveTarget(gCalledMove, 0); + gBattlerTarget = GetMoveTarget(gCalledMove, NO_TARGET_OVERRIDE); gBattlescriptCurrInstr += 5; } else @@ -9527,7 +9533,7 @@ static void Cmd_pickup(void) ability = gBaseStats[species].abilities[0]; if (ability == ABILITY_PICKUP - && species != 0 + && species != SPECIES_NONE && species != SPECIES_EGG && heldItem == ITEM_NONE && (Random() % 10) == 0) @@ -9550,7 +9556,7 @@ static void Cmd_pickup(void) ability = gBaseStats[species].abilities[0]; if (ability == ABILITY_PICKUP - && species != 0 + && species != SPECIES_NONE && species != SPECIES_EGG && heldItem == ITEM_NONE && (Random() % 10) == 0) @@ -9586,7 +9592,7 @@ static void Cmd_docastformchangeanimation(void) gActiveBattler = gBattleScripting.battler; if (gBattleMons[gActiveBattler].status2 & STATUS2_SUBSTITUTE) - *(&gBattleStruct->formToChangeInto) |= 0x80; + *(&gBattleStruct->formToChangeInto) |= CASTFORM_SUBSTITUTE; BtlController_EmitBattleAnimation(0, B_ANIM_CASTFORM_CHANGE, gBattleStruct->formToChangeInto); MarkBattlerForControllerExec(gActiveBattler); @@ -9643,15 +9649,15 @@ static void Cmd_setweatherballtype(void) if (gBattleWeather & B_WEATHER_ANY) gBattleScripting.dmgMultiplier = 2; if (gBattleWeather & B_WEATHER_RAIN) - *(&gBattleStruct->dynamicMoveType) = TYPE_WATER | 0x80; + *(&gBattleStruct->dynamicMoveType) = TYPE_WATER | F_DYNAMIC_TYPE_2; else if (gBattleWeather & B_WEATHER_SANDSTORM) - *(&gBattleStruct->dynamicMoveType) = TYPE_ROCK | 0x80; + *(&gBattleStruct->dynamicMoveType) = TYPE_ROCK | F_DYNAMIC_TYPE_2; else if (gBattleWeather & B_WEATHER_SUN) - *(&gBattleStruct->dynamicMoveType) = TYPE_FIRE | 0x80; + *(&gBattleStruct->dynamicMoveType) = TYPE_FIRE | F_DYNAMIC_TYPE_2; else if (gBattleWeather & B_WEATHER_HAIL) - *(&gBattleStruct->dynamicMoveType) = TYPE_ICE | 0x80; + *(&gBattleStruct->dynamicMoveType) = TYPE_ICE | F_DYNAMIC_TYPE_2; else - *(&gBattleStruct->dynamicMoveType) = TYPE_NORMAL | 0x80; + *(&gBattleStruct->dynamicMoveType) = TYPE_NORMAL | F_DYNAMIC_TYPE_2; } gBattlescriptCurrInstr++; @@ -9663,10 +9669,10 @@ static void Cmd_tryrecycleitem(void) gActiveBattler = gBattlerAttacker; usedHeldItem = &gBattleStruct->usedHeldItems[gActiveBattler]; - if (*usedHeldItem != 0 && gBattleMons[gActiveBattler].item == 0) + if (*usedHeldItem != ITEM_NONE && gBattleMons[gActiveBattler].item == ITEM_NONE) { gLastUsedItem = *usedHeldItem; - *usedHeldItem = 0; + *usedHeldItem = ITEM_NONE; gBattleMons[gActiveBattler].item = gLastUsedItem; BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gActiveBattler].item); @@ -9704,7 +9710,7 @@ static void Cmd_pursuitrelated(void) && gChosenActionByBattler[gActiveBattler] == B_ACTION_USE_MOVE && gChosenMoveByBattler[gActiveBattler] == MOVE_PURSUIT) { - gActionsByTurnOrder[gActiveBattler] = 11; + gActionsByTurnOrder[gActiveBattler] = B_ACTION_TRY_FINISH; gCurrentMove = MOVE_PURSUIT; gBattlescriptCurrInstr += 5; gBattleScripting.animTurn = 1; @@ -9849,7 +9855,7 @@ static void Cmd_handleballthrow(void) } else { - if (gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL] < 0xFF) + if (gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL] < 255) gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL]++; } } diff --git a/src/battle_setup.c b/src/battle_setup.c index 4337ec29cf..172bfc5beb 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -319,7 +319,7 @@ const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES] = [REMATCH_TRENT] = REMATCH(TRAINER_TRENT_1, TRAINER_TRENT_2, TRAINER_TRENT_3, TRAINER_TRENT_4, TRAINER_TRENT_5, ROUTE112), [REMATCH_SAWYER] = REMATCH(TRAINER_SAWYER_1, TRAINER_SAWYER_2, TRAINER_SAWYER_3, TRAINER_SAWYER_4, TRAINER_SAWYER_5, MT_CHIMNEY), [REMATCH_KIRA_AND_DAN] = REMATCH(TRAINER_KIRA_AND_DAN_1, TRAINER_KIRA_AND_DAN_2, TRAINER_KIRA_AND_DAN_3, TRAINER_KIRA_AND_DAN_4, TRAINER_KIRA_AND_DAN_5, ABANDONED_SHIP_ROOMS2_1F), - [REMATCH_WALLY_3] = REMATCH(TRAINER_WALLY_VR_2, TRAINER_WALLY_VR_3, TRAINER_WALLY_VR_4, TRAINER_WALLY_VR_5, TRAINER_WALLY_VR_5, VICTORY_ROAD_1F), + [REMATCH_WALLY_VR] = REMATCH(TRAINER_WALLY_VR_2, TRAINER_WALLY_VR_3, TRAINER_WALLY_VR_4, TRAINER_WALLY_VR_5, TRAINER_WALLY_VR_5, VICTORY_ROAD_1F), [REMATCH_ROXANNE] = REMATCH(TRAINER_ROXANNE_1, TRAINER_ROXANNE_2, TRAINER_ROXANNE_3, TRAINER_ROXANNE_4, TRAINER_ROXANNE_5, RUSTBORO_CITY), [REMATCH_BRAWLY] = REMATCH(TRAINER_BRAWLY_1, TRAINER_BRAWLY_2, TRAINER_BRAWLY_3, TRAINER_BRAWLY_4, TRAINER_BRAWLY_5, DEWFORD_TOWN), [REMATCH_WATTSON] = REMATCH(TRAINER_WATTSON_1, TRAINER_WATTSON_2, TRAINER_WATTSON_3, TRAINER_WATTSON_4, TRAINER_WATTSON_5, MAUVILLE_CITY), @@ -460,12 +460,12 @@ static void DoTrainerBattle(void) TryUpdateGymLeaderRematchFromTrainer(); } -static void sub_80B0828(void) +static void DoBattlePyramidTrainerHillBattle(void) { if (InBattlePyramid()) - CreateBattleStartTask(GetSpecialBattleTransition(10), 0); + CreateBattleStartTask(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PYRAMID), 0); else - CreateBattleStartTask(GetSpecialBattleTransition(11), 0); + CreateBattleStartTask(GetSpecialBattleTransition(B_TRANSITION_GROUP_TRAINER_HILL), 0); IncrementGameStat(GAME_STAT_TOTAL_BATTLES); IncrementGameStat(GAME_STAT_TRAINER_BATTLES); @@ -853,16 +853,7 @@ static u8 GetTrainerBattleTransition(void) return sBattleTransitionTable_Trainer[transitionType][1]; } -// 0: Battle Tower -// 3: Battle Dome -// 4: Battle Palace -// 5: Battle Arena -// 6: Battle Factory -// 7: Battle Pike -// 10: Battle Pyramid -// 11: Trainer Hill -// 12: Secret Base -// 13: E-Reader +#define RANDOM_TRANSITION(table)(table[Random() % ARRAY_COUNT(table)]) u8 GetSpecialBattleTransition(s32 id) { u16 var; @@ -873,35 +864,35 @@ u8 GetSpecialBattleTransition(s32 id) { switch (id) { - case 11: - case 12: - case 13: + case B_TRANSITION_GROUP_TRAINER_HILL: + case B_TRANSITION_GROUP_SECRET_BASE: + case B_TRANSITION_GROUP_E_READER: return B_TRANSITION_POKEBALLS_TRAIL; - case 10: - return sBattleTransitionTable_BattlePyramid[Random() % ARRAY_COUNT(sBattleTransitionTable_BattlePyramid)]; - case 3: - return sBattleTransitionTable_BattleDome[Random() % ARRAY_COUNT(sBattleTransitionTable_BattleDome)]; + case B_TRANSITION_GROUP_B_PYRAMID: + return RANDOM_TRANSITION(sBattleTransitionTable_BattlePyramid); + case B_TRANSITION_GROUP_B_DOME: + return RANDOM_TRANSITION(sBattleTransitionTable_BattleDome); } if (VarGet(VAR_FRONTIER_BATTLE_MODE) != FRONTIER_MODE_LINK_MULTIS) - return sBattleTransitionTable_BattleFrontier[Random() % ARRAY_COUNT(sBattleTransitionTable_BattleFrontier)]; + return RANDOM_TRANSITION(sBattleTransitionTable_BattleFrontier); } else { switch (id) { - case 11: - case 12: - case 13: + case B_TRANSITION_GROUP_TRAINER_HILL: + case B_TRANSITION_GROUP_SECRET_BASE: + case B_TRANSITION_GROUP_E_READER: return B_TRANSITION_BIG_POKEBALL; - case 10: - return sBattleTransitionTable_BattlePyramid[Random() % ARRAY_COUNT(sBattleTransitionTable_BattlePyramid)]; - case 3: - return sBattleTransitionTable_BattleDome[Random() % ARRAY_COUNT(sBattleTransitionTable_BattleDome)]; + case B_TRANSITION_GROUP_B_PYRAMID: + return RANDOM_TRANSITION(sBattleTransitionTable_BattlePyramid); + case B_TRANSITION_GROUP_B_DOME: + return RANDOM_TRANSITION(sBattleTransitionTable_BattleDome); } if (VarGet(VAR_FRONTIER_BATTLE_MODE) != FRONTIER_MODE_LINK_MULTIS) - return sBattleTransitionTable_BattleFrontier[Random() % ARRAY_COUNT(sBattleTransitionTable_BattleFrontier)]; + return RANDOM_TRANSITION(sBattleTransitionTable_BattleFrontier); } var = gSaveBlock2Ptr->frontier.trainerIds[gSaveBlock2Ptr->frontier.curChallengeBattleNum * 2 + 0] @@ -1319,7 +1310,7 @@ void BattleSetup_StartTrainerBattle(void) gMain.savedCallback = CB2_EndTrainerBattle; if (InBattlePyramid() || InTrainerHillChallenge()) - sub_80B0828(); + DoBattlePyramidTrainerHillBattle(); else DoTrainerBattle(); @@ -1575,12 +1566,14 @@ static s32 TrainerIdToRematchTableId(const struct RematchTrainer *table, u16 tra return -1; } -static bool32 sub_80B1D94(s32 rematchTableId) +// Returns TRUE if the given trainer (by their entry in the rematch table) is not allowed to have rematches. +// This applies to the Elite Four and Victory Road Wally (if he's not been defeated yet) +static bool32 IsRematchForbidden(s32 rematchTableId) { if (rematchTableId >= REMATCH_ELITE_FOUR_ENTRIES) return TRUE; - else if (rematchTableId == REMATCH_WALLY_3) - return (FlagGet(FLAG_DEFEATED_WALLY_VICTORY_ROAD) == FALSE); + else if (rematchTableId == REMATCH_WALLY_VR) + return !FlagGet(FLAG_DEFEATED_WALLY_VICTORY_ROAD); else return FALSE; } @@ -1609,7 +1602,7 @@ static bool32 UpdateRandomTrainerRematches(const struct RematchTrainer *table, u for (i = 0; i <= REMATCH_SPECIAL_TRAINER_START; i++) { - if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !sub_80B1D94(i)) + if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !IsRematchForbidden(i)) { if (gSaveBlock1Ptr->trainerRematches[i] != 0) { diff --git a/src/battle_tower.c b/src/battle_tower.c index daf63d016c..332f008582 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -2025,7 +2025,7 @@ void DoSpecialTrainerBattle(void) } CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(0)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_TOWER)); break; case SPECIAL_BATTLE_SECRET_BASE: for (i = 0; i < PARTY_SIZE; i++) @@ -2035,7 +2035,7 @@ void DoSpecialTrainerBattle(void) } CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(12)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_SECRET_BASE)); break; case SPECIAL_BATTLE_EREADER: ZeroEnemyPartyMons(); @@ -2045,7 +2045,7 @@ void DoSpecialTrainerBattle(void) gTrainerBattleOpponent_A = 0; CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(13)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_E_READER)); break; case SPECIAL_BATTLE_DOME: gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOME; @@ -2055,7 +2055,7 @@ void DoSpecialTrainerBattle(void) FillFrontierTrainerParty(DOME_BATTLE_PARTY_SIZE); CreateTask(Task_StartBattleAfterTransition, 1); CreateTask_PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(3)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_DOME)); break; case SPECIAL_BATTLE_PALACE: gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_PALACE; @@ -2067,7 +2067,7 @@ void DoSpecialTrainerBattle(void) FillTentTrainerParty(FRONTIER_PARTY_SIZE); CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(4)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PALACE)); break; case SPECIAL_BATTLE_ARENA: gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_ARENA; @@ -2077,7 +2077,7 @@ void DoSpecialTrainerBattle(void) FillTentTrainerParty(FRONTIER_PARTY_SIZE); CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(5)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_ARENA)); break; case SPECIAL_BATTLE_FACTORY: gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_FACTORY; @@ -2086,28 +2086,28 @@ void DoSpecialTrainerBattle(void) FillFactoryTrainerParty(); CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(6)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_FACTORY)); break; case SPECIAL_BATTLE_PIKE_SINGLE: gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_BATTLE_TOWER; FillFrontierTrainerParty(FRONTIER_PARTY_SIZE); CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(7)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PIKE)); break; case SPECIAL_BATTLE_PYRAMID: gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_PYRAMID; FillFrontierTrainerParty(FRONTIER_PARTY_SIZE); CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(10)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PYRAMID)); break; case SPECIAL_BATTLE_PIKE_DOUBLE: gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOUBLE | BATTLE_TYPE_TWO_OPPONENTS; FillFrontierTrainersParties(1); CreateTask(Task_StartBattleAfterTransition, 1); PlayMapChosenOrBattleBGM(0); - BattleTransition_StartOnField(GetSpecialBattleTransition(7)); + BattleTransition_StartOnField(GetSpecialBattleTransition(B_TRANSITION_GROUP_B_PIKE)); break; case SPECIAL_BATTLE_STEVEN: gBattleTypeFlags = BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOUBLE | BATTLE_TYPE_TWO_OPPONENTS | BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER; diff --git a/src/battle_util.c b/src/battle_util.c index 7b47bc994a..11fd31524f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -99,10 +99,10 @@ void HandleAction_UseMove(void) // choose move if (gProtectStructs[gBattlerAttacker].noValidMoves) { - gProtectStructs[gBattlerAttacker].noValidMoves = 0; + gProtectStructs[gBattlerAttacker].noValidMoves = FALSE; gCurrentMove = gChosenMove = MOVE_STRUGGLE; gHitMarker |= HITMARKER_NO_PPDEDUCT; - *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(MOVE_STRUGGLE, 0); + *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(MOVE_STRUGGLE, NO_TARGET_OVERRIDE); } else if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS || gBattleMons[gBattlerAttacker].status2 & STATUS2_RECHARGE) { @@ -114,7 +114,7 @@ void HandleAction_UseMove(void) { gCurrentMove = gChosenMove = gDisableStructs[gBattlerAttacker].encoredMove; gCurrMovePos = gChosenMovePos = gDisableStructs[gBattlerAttacker].encoredMovePos; - *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, 0); + *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); } // check if the encored move wasn't overwritten else if (gDisableStructs[gBattlerAttacker].encoredMove != MOVE_NONE @@ -125,12 +125,12 @@ void HandleAction_UseMove(void) gDisableStructs[gBattlerAttacker].encoredMove = MOVE_NONE; gDisableStructs[gBattlerAttacker].encoredMovePos = 0; gDisableStructs[gBattlerAttacker].encoreTimer = 0; - *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, 0); + *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); } else if (gBattleMons[gBattlerAttacker].moves[gCurrMovePos] != gChosenMoveByBattler[gBattlerAttacker]) { gCurrentMove = gChosenMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; - *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, 0); + *(gBattleStruct->moveTarget + gBattlerAttacker) = GetMoveTarget(gCurrentMove, NO_TARGET_OVERRIDE); } else { @@ -323,11 +323,11 @@ void HandleAction_UseItem(void) } else if (gLastUsedItem == ITEM_POKE_DOLL || gLastUsedItem == ITEM_FLUFFY_TAIL) { - gBattlescriptCurrInstr = gBattlescriptsForRunningByItem[0]; + gBattlescriptCurrInstr = gBattlescriptsForRunningByItem[0]; // BattleScript_RunByUsingItem } else if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) { - gBattlescriptCurrInstr = gBattlescriptsForUsingItem[0]; + gBattlescriptCurrInstr = gBattlescriptsForUsingItem[0]; // BattleScript_PlayerUsesItem } else { @@ -417,7 +417,7 @@ bool8 TryRunFromBattle(u8 battler) if (holdEffect == HOLD_EFFECT_CAN_ALWAYS_RUN) { gLastUsedItem = gBattleMons[battler].item; - gProtectStructs[battler].fleeFlag = 1; + gProtectStructs[battler].fleeType = FLEE_ITEM; effect++; } else if (gBattleMons[battler].ability == ABILITY_RUN_AWAY) @@ -430,14 +430,14 @@ bool8 TryRunFromBattle(u8 battler) if (speedVar > (Random() & 0xFF)) { gLastUsedAbility = ABILITY_RUN_AWAY; - gProtectStructs[battler].fleeFlag = 2; + gProtectStructs[battler].fleeType = FLEE_ABILITY; effect++; } } else { gLastUsedAbility = ABILITY_RUN_AWAY; - gProtectStructs[battler].fleeFlag = 2; + gProtectStructs[battler].fleeType = FLEE_ABILITY; effect++; } } @@ -562,7 +562,7 @@ void HandleAction_ThrowPokeblock(void) gBattleCommunication[MULTISTRING_CHOOSER] = gBattleBufferB[gBattlerAttacker][1] - 1; gLastUsedItem = gBattleBufferB[gBattlerAttacker][2]; - if (gBattleResults.pokeblockThrows < 0xFF) + if (gBattleResults.pokeblockThrows < 255) gBattleResults.pokeblockThrows++; if (gBattleStruct->safariPkblThrowCounter < 3) gBattleStruct->safariPkblThrowCounter++; @@ -653,7 +653,7 @@ void HandleAction_NothingIsFainted(void) void HandleAction_ActionFinished(void) { - *(gBattleStruct->monToSwitchIntoId + gBattlerByTurnOrder[gCurrentTurnActionNumber]) = 6; + *(gBattleStruct->monToSwitchIntoId + gBattlerByTurnOrder[gCurrentTurnActionNumber]) = PARTY_SIZE; gCurrentTurnActionNumber++; gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber]; SpecialStatusesClear(); @@ -679,7 +679,6 @@ void HandleAction_ActionFinished(void) gBattleResources->battleScriptsStack->size = 0; } -// rom const data static const u16 sSoundMovesTable[] = { MOVE_GROWL, MOVE_ROAR, MOVE_SING, MOVE_SUPERSONIC, MOVE_SCREECH, MOVE_SNORE, @@ -709,13 +708,13 @@ u8 GetBattlerForBattleScript(u8 caseId) case BS_FAINTED: ret = gBattlerFainted; break; - case 5: + case BS_UNK_5: ret = gBattlerFainted; break; - case 4: - case 6: - case 8: - case 9: + case BS_ATTACKER_WITH_PARTNER: + case BS_UNK_6: + case BS_ATTACKER_SIDE: + case BS_NOT_ATTACKER_SIDE: case BS_PLAYER1: ret = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); break; @@ -763,7 +762,7 @@ void PressurePPLose(u8 target, u8 attacker, u16 move) void PressurePPLoseOnUsingImprison(u8 attacker) { int i, j; - int imprisonPos = 4; + int imprisonPos = MAX_MON_MOVES; u8 atkSide = GetBattlerSide(attacker); for (i = 0; i < gBattlersCount; i++) @@ -797,7 +796,7 @@ void PressurePPLoseOnUsingImprison(u8 attacker) void PressurePPLoseOnUsingPerishSong(u8 attacker) { int i, j; - int perishSongPos = 4; + int perishSongPos = MAX_MON_MOVES; for (i = 0; i < gBattlersCount; i++) { @@ -858,17 +857,17 @@ void MarkBattlerReceivedLinkData(u8 battlerId) for (i = 0; i < GetLinkPlayerCount(); i++) gBattleControllerExecFlags |= gBitTable[battlerId] << (i << 2); - gBattleControllerExecFlags &= ~(0x10000000 << battlerId); + gBattleControllerExecFlags &= ~((1 << 28) << battlerId); } void CancelMultiTurnMoves(u8 battler) { - gBattleMons[battler].status2 &= ~(STATUS2_MULTIPLETURNS); - gBattleMons[battler].status2 &= ~(STATUS2_LOCK_CONFUSE); - gBattleMons[battler].status2 &= ~(STATUS2_UPROAR); - gBattleMons[battler].status2 &= ~(STATUS2_BIDE); + gBattleMons[battler].status2 &= ~STATUS2_MULTIPLETURNS; + gBattleMons[battler].status2 &= ~STATUS2_LOCK_CONFUSE; + gBattleMons[battler].status2 &= ~STATUS2_UPROAR; + gBattleMons[battler].status2 &= ~STATUS2_BIDE; - gStatuses3[battler] &= ~(STATUS3_SEMI_INVULNERABLE); + gStatuses3[battler] &= ~STATUS3_SEMI_INVULNERABLE; gDisableStructs[battler].rolloutTimer = 0; gDisableStructs[battler].furyCutterCounter = 0; @@ -927,7 +926,6 @@ void OpponentSwitchInResetSentPokesToOpponentValue(u8 battler) if (!(gAbsentBattlerFlags & gBitTable[i])) bits |= gBitTable[gBattlerPartyIndexes[i]]; } - gSentPokesToOpponent[flank] = bits; } } @@ -975,7 +973,7 @@ u8 TrySetCantSelectMoveBattleScript(void) if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingDisabledMoveInPalace; - gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else { @@ -990,7 +988,7 @@ u8 TrySetCantSelectMoveBattleScript(void) if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingTormentedMoveInPalace; - gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else { @@ -1005,7 +1003,7 @@ u8 TrySetCantSelectMoveBattleScript(void) if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedMoveTauntInPalace; - gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else { @@ -1020,7 +1018,7 @@ u8 TrySetCantSelectMoveBattleScript(void) if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisonedMoveInPalace; - gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else { @@ -1036,13 +1034,13 @@ u8 TrySetCantSelectMoveBattleScript(void) gPotentialItemEffectBattler = gActiveBattler; - if (holdEffect == HOLD_EFFECT_CHOICE_BAND && *choicedMove != 0 && *choicedMove != 0xFFFF && *choicedMove != move) + if (holdEffect == HOLD_EFFECT_CHOICE_BAND && *choicedMove != MOVE_NONE && *choicedMove != 0xFFFF && *choicedMove != move) { gCurrentMove = *choicedMove; gLastUsedItem = gBattleMons[gActiveBattler].item; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else { @@ -1055,7 +1053,7 @@ u8 TrySetCantSelectMoveBattleScript(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = TRUE; } else { @@ -1082,43 +1080,53 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check) for (i = 0; i < MAX_MON_MOVES; i++) { - if (gBattleMons[battlerId].moves[i] == 0 && check & MOVE_LIMITATION_ZEROMOVE) + // No move + if (gBattleMons[battlerId].moves[i] == MOVE_NONE && check & MOVE_LIMITATION_ZEROMOVE) unusableMoves |= gBitTable[i]; + // No PP if (gBattleMons[battlerId].pp[i] == 0 && check & MOVE_LIMITATION_PP) unusableMoves |= gBitTable[i]; + // Disable if (gBattleMons[battlerId].moves[i] == gDisableStructs[battlerId].disabledMove && check & MOVE_LIMITATION_DISABLED) unusableMoves |= gBitTable[i]; + // Torment if (gBattleMons[battlerId].moves[i] == gLastMoves[battlerId] && check & MOVE_LIMITATION_TORMENTED && gBattleMons[battlerId].status2 & STATUS2_TORMENT) unusableMoves |= gBitTable[i]; + // Taunt if (gDisableStructs[battlerId].tauntTimer && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0) unusableMoves |= gBitTable[i]; + // Imprison if (GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i]) && check & MOVE_LIMITATION_IMPRISON) unusableMoves |= gBitTable[i]; + // Encore if (gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; - if (holdEffect == HOLD_EFFECT_CHOICE_BAND && *choicedMove != 0 && *choicedMove != 0xFFFF && *choicedMove != gBattleMons[battlerId].moves[i]) + // Choice Band + if (holdEffect == HOLD_EFFECT_CHOICE_BAND && *choicedMove != MOVE_NONE && *choicedMove != 0xFFFF && *choicedMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; } return unusableMoves; } +#define ALL_MOVES_MASK ((1 << MAX_MON_MOVES) - 1) bool8 AreAllMovesUnusable(void) { u8 unusable; - unusable = CheckMoveLimitations(gActiveBattler, 0, 0xFF); + unusable = CheckMoveLimitations(gActiveBattler, 0, MOVE_LIMITATIONS_ALL); - if (unusable == 0xF) // All moves are unusable. + if (unusable == ALL_MOVES_MASK) // All moves are unusable. { - gProtectStructs[gActiveBattler].noValidMoves = 1; + gProtectStructs[gActiveBattler].noValidMoves = TRUE; gSelectionBattleScripts[gActiveBattler] = BattleScript_NoMovesLeft; } else { - gProtectStructs[gActiveBattler].noValidMoves = 0; + gProtectStructs[gActiveBattler].noValidMoves = FALSE; } - return (unusable == 0xF); + return (unusable == ALL_MOVES_MASK); } +#undef ALL_MOVES_MASK u8 GetImprisonedMovesCount(u8 battlerId, u16 move) { @@ -1475,12 +1483,12 @@ u8 DoBattlerEndTurnEffects(void) gBattleStruct->turnEffectsTracker++; break; case ENDTURN_ITEMS1: // item effects - if (ItemBattleEffects(1, gActiveBattler, FALSE)) + if (ItemBattleEffects(ITEMEFFECT_NORMAL, gActiveBattler, FALSE)) effect++; gBattleStruct->turnEffectsTracker++; break; case ENDTURN_ITEMS2: // item effects again - if (ItemBattleEffects(1, gActiveBattler, TRUE)) + if (ItemBattleEffects(ITEMEFFECT_NORMAL, gActiveBattler, TRUE)) effect++; gBattleStruct->turnEffectsTracker++; break; @@ -1608,8 +1616,8 @@ u8 DoBattlerEndTurnEffects(void) if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP) && gBattleMons[gBattlerAttacker].ability != ABILITY_SOUNDPROOF) { - gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_SLEEP); - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[gBattlerAttacker].status1 &= ~STATUS1_SLEEP; + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; gBattleCommunication[MULTISTRING_CHOOSER] = 1; BattleScriptExecute(BattleScript_MonWokeUpInUproar); gActiveBattler = gBattlerAttacker; @@ -1658,7 +1666,7 @@ u8 DoBattlerEndTurnEffects(void) else if (!(gBattleMons[gActiveBattler].status2 & STATUS2_LOCK_CONFUSE) && (gBattleMons[gActiveBattler].status2 & STATUS2_MULTIPLETURNS)) { - gBattleMons[gActiveBattler].status2 &= ~(STATUS2_MULTIPLETURNS); + gBattleMons[gActiveBattler].status2 &= ~STATUS2_MULTIPLETURNS; if (!(gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION)) { gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER; @@ -1797,7 +1805,7 @@ bool8 HandleWishPerishSongOnTurnEnd(void) if (gWishFutureKnock.futureSightCounter[gActiveBattler] == 0 && gWishFutureKnock.futureSightCounter[gActiveBattler ^ BIT_FLANK] == 0) { - gSideStatuses[GET_BATTLER_SIDE(gBattlerTarget)] &= ~(SIDE_STATUS_FUTUREATTACK); + gSideStatuses[GET_BATTLER_SIDE(gBattlerTarget)] &= ~SIDE_STATUS_FUTUREATTACK; } return TRUE; } @@ -1934,7 +1942,10 @@ bool8 HandleFaintedMonActions(void) gBattleStruct->faintedActionsState = 4; break; case 6: - if (AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE1, 0, 0, 0, 0) || AbilityBattleEffects(ABILITYEFFECT_TRACE, 0, 0, 0, 0) || ItemBattleEffects(1, 0, TRUE) || AbilityBattleEffects(ABILITYEFFECT_FORECAST, 0, 0, 0, 0)) + if (AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE1, 0, 0, 0, 0) + || AbilityBattleEffects(ABILITYEFFECT_TRACE, 0, 0, 0, 0) + || ItemBattleEffects(ITEMEFFECT_NORMAL, 0, TRUE) + || AbilityBattleEffects(ABILITYEFFECT_FORECAST, 0, 0, 0, 0)) return TRUE; gBattleStruct->faintedActionsState++; break; @@ -1951,7 +1962,7 @@ void TryClearRageStatuses(void) for (i = 0; i < gBattlersCount; i++) { if ((gBattleMons[i].status2 & STATUS2_RAGE) && gChosenMoveByBattler[i] != MOVE_RAGE) - gBattleMons[i].status2 &= ~(STATUS2_RAGE); + gBattleMons[i].status2 &= ~STATUS2_RAGE; } } @@ -1983,8 +1994,8 @@ u8 AtkCanceller_UnableToUseMove(void) switch (gBattleStruct->atkCancellerTracker) { case CANCELLER_FLAGS: // flags clear - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_DESTINY_BOND); - gStatuses3[gBattlerAttacker] &= ~(STATUS3_GRUDGE); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_DESTINY_BOND; + gStatuses3[gBattlerAttacker] &= ~STATUS3_GRUDGE; gBattleStruct->atkCancellerTracker++; break; case CANCELLER_ASLEEP: // check being asleep @@ -1992,8 +2003,8 @@ u8 AtkCanceller_UnableToUseMove(void) { if (UproarWakeUpCheck(gBattlerAttacker)) { - gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_SLEEP); - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[gBattlerAttacker].status1 &= ~STATUS1_SLEEP; + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP_UPROAR; gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; @@ -2007,7 +2018,7 @@ u8 AtkCanceller_UnableToUseMove(void) else toSub = 1; if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP) < toSub) - gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_SLEEP); + gBattleMons[gBattlerAttacker].status1 &= ~STATUS1_SLEEP; else gBattleMons[gBattlerAttacker].status1 -= toSub; if (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP) @@ -2021,7 +2032,7 @@ u8 AtkCanceller_UnableToUseMove(void) } else { - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP; gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; @@ -2049,7 +2060,7 @@ u8 AtkCanceller_UnableToUseMove(void) } else // unfreeze { - gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE); + gBattleMons[gBattlerAttacker].status1 &= ~STATUS1_FREEZE; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED; @@ -2073,7 +2084,7 @@ u8 AtkCanceller_UnableToUseMove(void) case CANCELLER_RECHARGE: // recharge if (gBattleMons[gBattlerAttacker].status2 & STATUS2_RECHARGE) { - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_RECHARGE); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_RECHARGE; gDisableStructs[gBattlerAttacker].rechargeTimer = 0; CancelMultiTurnMoves(gBattlerAttacker); gBattlescriptCurrInstr = BattleScript_MoveUsedMustRecharge; @@ -2085,7 +2096,7 @@ u8 AtkCanceller_UnableToUseMove(void) case CANCELLER_FLINCH: // flinch if (gBattleMons[gBattlerAttacker].status2 & STATUS2_FLINCHED) { - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_FLINCHED); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_FLINCHED; gProtectStructs[gBattlerAttacker].flinchImmobility = 1; CancelMultiTurnMoves(gBattlerAttacker); gBattlescriptCurrInstr = BattleScript_MoveUsedFlinched; @@ -2203,14 +2214,14 @@ u8 AtkCanceller_UnableToUseMove(void) else { // This is removed in Emerald for some reason - //gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_MULTIPLETURNS); + //gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_MULTIPLETURNS; if (gTakenDmg[gBattlerAttacker]) { gCurrentMove = MOVE_BIDE; *bideDmg = gTakenDmg[gBattlerAttacker] * 2; gBattlerTarget = gTakenDmgByBattler[gBattlerAttacker]; if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) - gBattlerTarget = GetMoveTarget(MOVE_BIDE, 1); + gBattlerTarget = GetMoveTarget(MOVE_BIDE, MOVE_TARGET_SELECTED + 1); gBattlescriptCurrInstr = BattleScript_BideAttack; } else @@ -2227,7 +2238,7 @@ u8 AtkCanceller_UnableToUseMove(void) { if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT) { - gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE); + gBattleMons[gBattlerAttacker].status1 &= ~STATUS1_FREEZE; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED_BY_MOVE; @@ -2268,14 +2279,14 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) party = gEnemyParty; id1 = ((battler & BIT_FLANK) / 2); - for (i = id1 * 3; i < id1 * 3 + 3; i++) + for (i = id1 * MULTI_PARTY_SIZE; i < id1 * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) break; } - return (i == id1 * 3 + 3); + return (i == id1 * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE); } else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) { @@ -2308,14 +2319,14 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) id1 = GetLinkTrainerFlankId(id2); } - for (i = id1 * 3; i < id1 * 3 + 3; i++) + for (i = id1 * MULTI_PARTY_SIZE; i < id1 * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) break; } - return (i == id1 * 3 + 3); + return (i == id1 * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE); } else if ((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) && GetBattlerSide(battler) == B_SIDE_OPPONENT) { @@ -2324,9 +2335,9 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) if (battler == 1) id1 = 0; else - id1 = 3; + id1 = MULTI_PARTY_SIZE; - for (i = id1; i < id1 + 3; i++) + for (i = id1; i < id1 + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE @@ -2368,51 +2379,41 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) } } -enum -{ - CASTFORM_NO_CHANGE, //0 - CASTFORM_TO_NORMAL, //1 - CASTFORM_TO_FIRE, //2 - CASTFORM_TO_WATER, //3 - CASTFORM_TO_ICE, //4 -}; - u8 CastformDataTypeChange(u8 battler) { u8 formChange = 0; if (gBattleMons[battler].species != SPECIES_CASTFORM || gBattleMons[battler].ability != ABILITY_FORECAST || gBattleMons[battler].hp == 0) - return CASTFORM_NO_CHANGE; + return 0; // No change if (!WEATHER_HAS_EFFECT && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL)) { SET_BATTLER_TYPE(battler, TYPE_NORMAL); - return CASTFORM_TO_NORMAL; + return CASTFORM_NORMAL + 1; } if (!WEATHER_HAS_EFFECT) - return CASTFORM_NO_CHANGE; + return 0; // No change if (!(gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SUN | B_WEATHER_HAIL)) && !IS_BATTLER_OF_TYPE(battler, TYPE_NORMAL)) { SET_BATTLER_TYPE(battler, TYPE_NORMAL); - formChange = CASTFORM_TO_NORMAL; + formChange = CASTFORM_NORMAL + 1; } if (gBattleWeather & B_WEATHER_SUN && !IS_BATTLER_OF_TYPE(battler, TYPE_FIRE)) { SET_BATTLER_TYPE(battler, TYPE_FIRE); - formChange = CASTFORM_TO_FIRE; + formChange = CASTFORM_FIRE + 1; } if (gBattleWeather & B_WEATHER_RAIN && !IS_BATTLER_OF_TYPE(battler, TYPE_WATER)) { SET_BATTLER_TYPE(battler, TYPE_WATER); - formChange = CASTFORM_TO_WATER; + formChange = CASTFORM_WATER + 1; } if (gBattleWeather & B_WEATHER_HAIL && !IS_BATTLER_OF_TYPE(battler, TYPE_ICE)) { SET_BATTLER_TYPE(battler, TYPE_ICE); - formChange = CASTFORM_TO_ICE; + formChange = CASTFORM_ICE + 1; } return formChange; } -// The largest function in the game, but even it could not save itself from decompiling. u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveArg) { u8 effect = 0; @@ -2550,7 +2551,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA break; case ABILITY_FORECAST: effect = CastformDataTypeChange(battler); - if (effect != 0) + if (effect) { BattleScriptPushCursorAndCallback(BattleScript_CastformChange); gBattleScripting.battler = battler; @@ -2571,7 +2572,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA for (target1 = 0; target1 < gBattlersCount; target1++) { effect = CastformDataTypeChange(target1); - if (effect != 0) + if (effect) { BattleScriptPushCursorAndCallback(BattleScript_CastformChange); gBattleScripting.battler = target1; @@ -2616,7 +2617,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA if (gBattleMons[battler].status1 & STATUS1_FREEZE) StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); gBattleMons[battler].status1 = 0; - gBattleMons[battler].status2 &= ~(STATUS2_NIGHTMARE); // fix nightmare glitch + gBattleMons[battler].status2 &= ~STATUS2_NIGHTMARE; // fix nightmare glitch gBattleScripting.battler = gActiveBattler = battler; BattleScriptPushCursorAndCallback(BattleScript_ShedSkinActivates); BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[battler].status1); @@ -2884,7 +2885,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case ABILITY_VITAL_SPIRIT: if (gBattleMons[battler].status1 & STATUS1_SLEEP) { - gBattleMons[battler].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[battler].status2 &= ~STATUS2_NIGHTMARE; StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn); effect = 1; } @@ -2919,10 +2920,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA gBattleMons[battler].status1 = 0; break; case 2: // get rid of confusion - gBattleMons[battler].status2 &= ~(STATUS2_CONFUSION); + gBattleMons[battler].status2 &= ~STATUS2_CONFUSION; break; case 3: // get rid of infatuation - gBattleMons[battler].status2 &= ~(STATUS2_INFATUATION); + gBattleMons[battler].status2 &= ~STATUS2_INFATUATION; break; } @@ -2955,7 +2956,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case ABILITYEFFECT_SYNCHRONIZE: // 7 if (gLastUsedAbility == ABILITY_SYNCHRONIZE && (gHitMarker & HITMARKER_SYNCHRONISE_EFFECT)) { - gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT); + gHitMarker &= ~HITMARKER_SYNCHRONISE_EFFECT; gBattleStruct->synchronizeMoveEffect &= ~(MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN); if (gBattleStruct->synchronizeMoveEffect == MOVE_EFFECT_TOXIC) gBattleStruct->synchronizeMoveEffect = MOVE_EFFECT_POISON; @@ -2971,7 +2972,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA case ABILITYEFFECT_ATK_SYNCHRONIZE: // 8 if (gLastUsedAbility == ABILITY_SYNCHRONIZE && (gHitMarker & HITMARKER_SYNCHRONISE_EFFECT)) { - gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT); + gHitMarker &= ~HITMARKER_SYNCHRONISE_EFFECT; gBattleStruct->synchronizeMoveEffect &= ~(MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN); if (gBattleStruct->synchronizeMoveEffect == MOVE_EFFECT_TOXIC) gBattleStruct->synchronizeMoveEffect = MOVE_EFFECT_POISON; @@ -2990,7 +2991,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA if (gBattleMons[i].ability == ABILITY_INTIMIDATE && gStatuses3[i] & STATUS3_INTIMIDATE_POKES) { gLastUsedAbility = ABILITY_INTIMIDATE; - gStatuses3[i] &= ~(STATUS3_INTIMIDATE_POKES); + gStatuses3[i] &= ~STATUS3_INTIMIDATE_POKES; BattleScriptPushCursorAndCallback(BattleScript_IntimidateActivatesEnd3); gBattleStruct->intimidateBattler = i; effect++; @@ -3045,7 +3046,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA if (effect) { BattleScriptPushCursorAndCallback(BattleScript_TraceActivates); - gStatuses3[i] &= ~(STATUS3_TRACE); + gStatuses3[i] &= ~STATUS3_TRACE; gBattleScripting.battler = i; PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gActiveBattler, gBattlerPartyIndexes[gActiveBattler]) @@ -3061,7 +3062,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA if (gBattleMons[i].ability == ABILITY_INTIMIDATE && (gStatuses3[i] & STATUS3_INTIMIDATE_POKES)) { gLastUsedAbility = ABILITY_INTIMIDATE; - gStatuses3[i] &= ~(STATUS3_INTIMIDATE_POKES); + gStatuses3[i] &= ~STATUS3_INTIMIDATE_POKES; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_IntimidateActivates; gBattleStruct->intimidateBattler = i; @@ -3200,14 +3201,44 @@ void BattleScriptPushCursorAndCallback(const u8 *BS_ptr) enum { - ITEM_NO_EFFECT, // 0 - ITEM_STATUS_CHANGE, // 1 - ITEM_EFFECT_OTHER, // 2 - ITEM_PP_CHANGE, // 3 - ITEM_HP_CHANGE, // 4 - ITEM_STATS_CHANGE, // 5 + ITEM_NO_EFFECT, + ITEM_STATUS_CHANGE, + ITEM_EFFECT_OTHER, + ITEM_PP_CHANGE, + ITEM_HP_CHANGE, + ITEM_STATS_CHANGE, }; +#define TRY_EAT_CONFUSE_BERRY(flavor) \ + if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / 2 && !moveTurn) \ + { \ + PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, flavor); \ + gBattleMoveDamage = gBattleMons[battlerId].maxHP / battlerHoldEffectParam; \ + if (gBattleMoveDamage == 0) \ + gBattleMoveDamage = 1; \ + if (gBattleMons[battlerId].hp + gBattleMoveDamage > gBattleMons[battlerId].maxHP) \ + gBattleMoveDamage = gBattleMons[battlerId].maxHP - gBattleMons[battlerId].hp; \ + gBattleMoveDamage *= -1; \ + if (GetFlavorRelationByPersonality(gBattleMons[battlerId].personality, flavor) < 0) \ + BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); \ + else \ + BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); \ + effect = ITEM_HP_CHANGE; \ + } + +#define TRY_EAT_STAT_UP_BERRY(stat) \ + if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam \ + && !moveTurn && gBattleMons[battlerId].statStages[stat] < MAX_STAT_STAGE) \ + { \ + PREPARE_STAT_BUFFER(gBattleTextBuff1, stat); \ + gEffectBattler = battlerId; \ + SET_STATCHANGER(stat, 1, FALSE); \ + gBattleScripting.animArg1 = 14 + (stat); \ + gBattleScripting.animArg2 = 0; \ + BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); \ + effect = ITEM_STATS_CHANGE; \ + } + u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) { int i = 0; @@ -3282,7 +3313,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) break; } break; - case 1: + case ITEMEFFECT_NORMAL: if (gBattleMons[battlerId].hp) { switch (battlerHoldEffect) @@ -3295,7 +3326,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gBattleMoveDamage = gBattleMons[battlerId].maxHP - gBattleMons[battlerId].hp; gBattleMoveDamage *= -1; BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); - effect = 4; + effect = ITEM_HP_CHANGE; } break; case HOLD_EFFECT_RESTORE_PP: @@ -3365,105 +3396,27 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) RecordItemEffectBattle(battlerId, battlerHoldEffect); } break; - // nice copy/paste there gamefreak, making a function for confuse berries was too much eh? case HOLD_EFFECT_CONFUSE_SPICY: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / 2 && !moveTurn) - { - PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_SPICY); - - gBattleMoveDamage = gBattleMons[battlerId].maxHP / battlerHoldEffectParam; - if (gBattleMoveDamage == 0) - gBattleMoveDamage = 1; - if (gBattleMons[battlerId].hp + gBattleMoveDamage > gBattleMons[battlerId].maxHP) - gBattleMoveDamage = gBattleMons[battlerId].maxHP - gBattleMons[battlerId].hp; - gBattleMoveDamage *= -1; - if (GetFlavorRelationByPersonality(gBattleMons[battlerId].personality, FLAVOR_SPICY) < 0) - BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); - else - BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); - effect = ITEM_HP_CHANGE; - } + TRY_EAT_CONFUSE_BERRY(FLAVOR_SPICY); break; case HOLD_EFFECT_CONFUSE_DRY: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / 2 && !moveTurn) - { - PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_DRY); - - gBattleMoveDamage = gBattleMons[battlerId].maxHP / battlerHoldEffectParam; - if (gBattleMoveDamage == 0) - gBattleMoveDamage = 1; - if (gBattleMons[battlerId].hp + gBattleMoveDamage > gBattleMons[battlerId].maxHP) - gBattleMoveDamage = gBattleMons[battlerId].maxHP - gBattleMons[battlerId].hp; - gBattleMoveDamage *= -1; - if (GetFlavorRelationByPersonality(gBattleMons[battlerId].personality, FLAVOR_DRY) < 0) - BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); - else - BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); - effect = ITEM_HP_CHANGE; - } + TRY_EAT_CONFUSE_BERRY(FLAVOR_DRY); break; case HOLD_EFFECT_CONFUSE_SWEET: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / 2 && !moveTurn) - { - PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_SWEET); - - gBattleMoveDamage = gBattleMons[battlerId].maxHP / battlerHoldEffectParam; - if (gBattleMoveDamage == 0) - gBattleMoveDamage = 1; - if (gBattleMons[battlerId].hp + gBattleMoveDamage > gBattleMons[battlerId].maxHP) - gBattleMoveDamage = gBattleMons[battlerId].maxHP - gBattleMons[battlerId].hp; - gBattleMoveDamage *= -1; - if (GetFlavorRelationByPersonality(gBattleMons[battlerId].personality, FLAVOR_SWEET) < 0) - BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); - else - BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); - effect = ITEM_HP_CHANGE; - } + TRY_EAT_CONFUSE_BERRY(FLAVOR_SWEET); break; case HOLD_EFFECT_CONFUSE_BITTER: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / 2 && !moveTurn) - { - PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_BITTER); - - gBattleMoveDamage = gBattleMons[battlerId].maxHP / battlerHoldEffectParam; - if (gBattleMoveDamage == 0) - gBattleMoveDamage = 1; - if (gBattleMons[battlerId].hp + gBattleMoveDamage > gBattleMons[battlerId].maxHP) - gBattleMoveDamage = gBattleMons[battlerId].maxHP - gBattleMons[battlerId].hp; - gBattleMoveDamage *= -1; - if (GetFlavorRelationByPersonality(gBattleMons[battlerId].personality, FLAVOR_BITTER) < 0) - BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); - else - BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); - effect = ITEM_HP_CHANGE; - } + TRY_EAT_CONFUSE_BERRY(FLAVOR_BITTER); break; case HOLD_EFFECT_CONFUSE_SOUR: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / 2 && !moveTurn) - { - PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_SOUR); - - gBattleMoveDamage = gBattleMons[battlerId].maxHP / battlerHoldEffectParam; - if (gBattleMoveDamage == 0) - gBattleMoveDamage = 1; - if (gBattleMons[battlerId].hp + gBattleMoveDamage > gBattleMons[battlerId].maxHP) - gBattleMoveDamage = gBattleMons[battlerId].maxHP - gBattleMons[battlerId].hp; - gBattleMoveDamage *= -1; - if (GetFlavorRelationByPersonality(gBattleMons[battlerId].personality, FLAVOR_SOUR) < 0) - BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); - else - BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); - effect = ITEM_HP_CHANGE; - } + TRY_EAT_CONFUSE_BERRY(FLAVOR_SOUR); break; - // copy/paste again, smh case HOLD_EFFECT_ATTACK_UP: if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam - && !moveTurn && gBattleMons[battlerId].statStages[STAT_ATK] < MAX_STAT_STAGE) + && !moveTurn && gBattleMons[battlerId].statStages[STAT_ATK] < MAX_STAT_STAGE) { PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK); - PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATROSE); - + PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATROSE); // Only the Attack stat-up berry has this gEffectBattler = battlerId; SET_STATCHANGER(STAT_ATK, 1, FALSE); gBattleScripting.animArg1 = 14 + STAT_ATK; @@ -3473,60 +3426,16 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } break; case HOLD_EFFECT_DEFENSE_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn - && gBattleMons[battlerId].statStages[STAT_DEF] < MAX_STAT_STAGE) - { - PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_DEF); - - gEffectBattler = battlerId; - SET_STATCHANGER(STAT_DEF, 1, FALSE); - gBattleScripting.animArg1 = 14 + STAT_DEF; - gBattleScripting.animArg2 = 0; - BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); - effect = ITEM_STATS_CHANGE; - } + TRY_EAT_STAT_UP_BERRY(STAT_DEF); break; case HOLD_EFFECT_SPEED_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn - && gBattleMons[battlerId].statStages[STAT_SPEED] < MAX_STAT_STAGE) - { - PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPEED); - - gEffectBattler = battlerId; - SET_STATCHANGER(STAT_SPEED, 1, FALSE); - gBattleScripting.animArg1 = 14 + STAT_SPEED; - gBattleScripting.animArg2 = 0; - BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); - effect = ITEM_STATS_CHANGE; - } + TRY_EAT_STAT_UP_BERRY(STAT_SPEED); break; case HOLD_EFFECT_SP_ATTACK_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn - && gBattleMons[battlerId].statStages[STAT_SPATK] < MAX_STAT_STAGE) - { - PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK); - - gEffectBattler = battlerId; - SET_STATCHANGER(STAT_SPATK, 1, FALSE); - gBattleScripting.animArg1 = 14 + STAT_SPATK; - gBattleScripting.animArg2 = 0; - BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); - effect = ITEM_STATS_CHANGE; - } + TRY_EAT_STAT_UP_BERRY(STAT_SPATK); break; case HOLD_EFFECT_SP_DEFENSE_UP: - if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn - && gBattleMons[battlerId].statStages[STAT_SPDEF] < MAX_STAT_STAGE) - { - PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPDEF); - - gEffectBattler = battlerId; - SET_STATCHANGER(STAT_SPDEF, 1, FALSE); - gBattleScripting.animArg1 = 14 + STAT_SPDEF; - gBattleScripting.animArg2 = 0; - BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); - effect = ITEM_STATS_CHANGE; - } + TRY_EAT_STAT_UP_BERRY(STAT_SPDEF); break; case HOLD_EFFECT_CRITICAL_UP: if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn @@ -3540,16 +3449,16 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_RANDOM_STAT_UP: if (!moveTurn && gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam) { - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_STATS - 1; i++) { if (gBattleMons[battlerId].statStages[STAT_ATK + i] < MAX_STAT_STAGE) break; } - if (i != 5) + if (i != NUM_STATS - 1) { do { - i = Random() % 5; + i = Random() % (NUM_STATS - 1); } while (gBattleMons[battlerId].statStages[STAT_ATK + i] == MAX_STAT_STAGE); PREPARE_STAT_BUFFER(gBattleTextBuff1, i + 1); @@ -3575,7 +3484,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_PAR: if (gBattleMons[battlerId].status1 & STATUS1_PARALYSIS) { - gBattleMons[battlerId].status1 &= ~(STATUS1_PARALYSIS); + gBattleMons[battlerId].status1 &= ~STATUS1_PARALYSIS; BattleScriptExecute(BattleScript_BerryCurePrlzEnd2); effect = ITEM_STATUS_CHANGE; } @@ -3591,7 +3500,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_BRN: if (gBattleMons[battlerId].status1 & STATUS1_BURN) { - gBattleMons[battlerId].status1 &= ~(STATUS1_BURN); + gBattleMons[battlerId].status1 &= ~STATUS1_BURN; BattleScriptExecute(BattleScript_BerryCureBrnEnd2); effect = ITEM_STATUS_CHANGE; } @@ -3599,7 +3508,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_FRZ: if (gBattleMons[battlerId].status1 & STATUS1_FREEZE) { - gBattleMons[battlerId].status1 &= ~(STATUS1_FREEZE); + gBattleMons[battlerId].status1 &= ~STATUS1_FREEZE; BattleScriptExecute(BattleScript_BerryCureFrzEnd2); effect = ITEM_STATUS_CHANGE; } @@ -3607,8 +3516,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_SLP: if (gBattleMons[battlerId].status1 & STATUS1_SLEEP) { - gBattleMons[battlerId].status1 &= ~(STATUS1_SLEEP); - gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[battlerId].status1 &= ~STATUS1_SLEEP; + gBattleMons[battlerId].status2 &= ~STATUS2_NIGHTMARE; BattleScriptExecute(BattleScript_BerryCureSlpEnd2); effect = ITEM_STATUS_CHANGE; } @@ -3616,7 +3525,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_CONFUSION: if (gBattleMons[battlerId].status2 & STATUS2_CONFUSION) { - gBattleMons[battlerId].status2 &= ~(STATUS2_CONFUSION); + gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; BattleScriptExecute(BattleScript_BerryCureConfusionEnd2); effect = ITEM_EFFECT_OTHER; } @@ -3632,7 +3541,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } if (gBattleMons[battlerId].status1 & STATUS1_SLEEP) { - gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[battlerId].status2 &= ~STATUS2_NIGHTMARE; StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn); i++; } @@ -3656,12 +3565,12 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) StringCopy(gBattleTextBuff1, gStatusConditionString_ConfusionJpn); i++; } - if (!(i > 1)) + if (i <= 1) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; else gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_NORMALIZED_STATUS; gBattleMons[battlerId].status1 = 0; - gBattleMons[battlerId].status2 &= ~(STATUS2_CONFUSION); + gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2); effect = ITEM_STATUS_CHANGE; } @@ -3669,7 +3578,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_ATTRACT: if (gBattleMons[battlerId].status2 & STATUS2_INFATUATION) { - gBattleMons[battlerId].status2 &= ~(STATUS2_INFATUATION); + gBattleMons[battlerId].status2 &= ~STATUS2_INFATUATION; StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2); gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; @@ -3696,7 +3605,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } } break; - case 2: + case ITEMEFFECT_DUMMY: break; case ITEMEFFECT_MOVE_END: for (battlerId = 0; battlerId < gBattlersCount; battlerId++) @@ -3717,7 +3626,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_PAR: if (gBattleMons[battlerId].status1 & STATUS1_PARALYSIS) { - gBattleMons[battlerId].status1 &= ~(STATUS1_PARALYSIS); + gBattleMons[battlerId].status1 &= ~STATUS1_PARALYSIS; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureParRet; effect = ITEM_STATUS_CHANGE; @@ -3735,7 +3644,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_BRN: if (gBattleMons[battlerId].status1 & STATUS1_BURN) { - gBattleMons[battlerId].status1 &= ~(STATUS1_BURN); + gBattleMons[battlerId].status1 &= ~STATUS1_BURN; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureBrnRet; effect = ITEM_STATUS_CHANGE; @@ -3744,7 +3653,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_FRZ: if (gBattleMons[battlerId].status1 & STATUS1_FREEZE) { - gBattleMons[battlerId].status1 &= ~(STATUS1_FREEZE); + gBattleMons[battlerId].status1 &= ~STATUS1_FREEZE; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureFrzRet; effect = ITEM_STATUS_CHANGE; @@ -3753,8 +3662,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_SLP: if (gBattleMons[battlerId].status1 & STATUS1_SLEEP) { - gBattleMons[battlerId].status1 &= ~(STATUS1_SLEEP); - gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[battlerId].status1 &= ~STATUS1_SLEEP; + gBattleMons[battlerId].status2 &= ~STATUS2_NIGHTMARE; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureSlpRet; effect = ITEM_STATUS_CHANGE; @@ -3763,7 +3672,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_CONFUSION: if (gBattleMons[battlerId].status2 & STATUS2_CONFUSION) { - gBattleMons[battlerId].status2 &= ~(STATUS2_CONFUSION); + gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureConfusionRet; effect = ITEM_EFFECT_OTHER; @@ -3772,7 +3681,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) case HOLD_EFFECT_CURE_ATTRACT: if (gBattleMons[battlerId].status2 & STATUS2_INFATUATION) { - gBattleMons[battlerId].status2 &= ~(STATUS2_INFATUATION); + gBattleMons[battlerId].status2 &= ~STATUS2_INFATUATION; StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; @@ -3784,32 +3693,28 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) if (gBattleMons[battlerId].status1 & STATUS1_ANY || gBattleMons[battlerId].status2 & STATUS2_CONFUSION) { if (gBattleMons[battlerId].status1 & STATUS1_PSN_ANY) - { StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn); - } + if (gBattleMons[battlerId].status1 & STATUS1_SLEEP) { - gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE); + gBattleMons[battlerId].status2 &= ~STATUS2_NIGHTMARE; StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn); } + if (gBattleMons[battlerId].status1 & STATUS1_PARALYSIS) - { StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn); - } + if (gBattleMons[battlerId].status1 & STATUS1_BURN) - { StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); - } + if (gBattleMons[battlerId].status1 & STATUS1_FREEZE) - { StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); - } + if (gBattleMons[battlerId].status2 & STATUS2_CONFUSION) - { StringCopy(gBattleTextBuff1, gStatusConditionString_ConfusionJpn); - } + gBattleMons[battlerId].status1 = 0; - gBattleMons[battlerId].status2 &= ~(STATUS2_CONFUSION); + gBattleMons[battlerId].status2 &= ~STATUS2_CONFUSION; BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet; @@ -3895,8 +3800,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) void ClearFuryCutterDestinyBondGrudge(u8 battlerId) { gDisableStructs[battlerId].furyCutterCounter = 0; - gBattleMons[battlerId].status2 &= ~(STATUS2_DESTINY_BOND); - gStatuses3[battlerId] &= ~(STATUS3_GRUDGE); + gBattleMons[battlerId].status2 &= ~STATUS2_DESTINY_BOND; + gStatuses3[battlerId] &= ~STATUS3_GRUDGE; } void HandleAction_RunBattleScript(void) // identical to RunBattleScriptCommands @@ -3911,7 +3816,7 @@ u8 GetMoveTarget(u16 move, u8 setTarget) u8 moveTarget; u8 side; - if (setTarget) + if (setTarget != NO_TARGET_OVERRIDE) moveTarget = setTarget - 1; else moveTarget = gBattleMoves[move].target; @@ -4037,7 +3942,7 @@ u8 IsMonDisobedient(void) // is not obedient if (gCurrentMove == MOVE_RAGE) - gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_RAGE); + gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_RAGE; if (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP && (gCurrentMove == MOVE_SNORE || gCurrentMove == MOVE_SLEEP_TALK)) { gBattlescriptCurrInstr = BattleScript_IgnoresWhileAsleep; @@ -4048,7 +3953,7 @@ u8 IsMonDisobedient(void) calc = (gBattleMons[gBattlerAttacker].level + obedienceLevel) * rnd >> 8; if (calc < obedienceLevel) { - calc = CheckMoveLimitations(gBattlerAttacker, gBitTable[gCurrMovePos], 0xFF); + calc = CheckMoveLimitations(gBattlerAttacker, gBitTable[gCurrMovePos], MOVE_LIMITATIONS_ALL); if (calc == 0xF) // all moves cannot be used { // Randomly select, then print a disobedient string @@ -4066,7 +3971,7 @@ u8 IsMonDisobedient(void) gCalledMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; gBattlescriptCurrInstr = BattleScript_IgnoresAndUsesRandomMove; - gBattlerTarget = GetMoveTarget(gCalledMove, 0); + gBattlerTarget = GetMoveTarget(gCalledMove, NO_TARGET_OVERRIDE); gHitMarker |= HITMARKER_DISOBEDIENT_MOVE; return 2; } diff --git a/src/battle_util2.c b/src/battle_util2.c index 3838f22bba..794b4f36af 100644 --- a/src/battle_util2.c +++ b/src/battle_util2.c @@ -34,8 +34,8 @@ void AllocateBattleResources(void) gLinkBattleSendBuffer = AllocZeroed(BATTLE_BUFFER_LINK_SIZE); gLinkBattleRecvBuffer = AllocZeroed(BATTLE_BUFFER_LINK_SIZE); - gUnknown_0202305C = AllocZeroed(0x2000); - gUnknown_02023060 = AllocZeroed(0x1000); + gBattleAnimBgTileBuffer = AllocZeroed(0x2000); + gBattleAnimBgTilemapBuffer = AllocZeroed(0x1000); if (gBattleTypeFlags & BATTLE_TYPE_SECRET_BASE) { @@ -66,8 +66,8 @@ void FreeBattleResources(void) FREE_AND_SET_NULL(gLinkBattleSendBuffer); FREE_AND_SET_NULL(gLinkBattleRecvBuffer); - FREE_AND_SET_NULL(gUnknown_0202305C); - FREE_AND_SET_NULL(gUnknown_02023060); + FREE_AND_SET_NULL(gBattleAnimBgTileBuffer); + FREE_AND_SET_NULL(gBattleAnimBgTilemapBuffer); } } diff --git a/src/contest.c b/src/contest.c index a87e8f28b9..3b700c6b9b 100644 --- a/src/contest.c +++ b/src/contest.c @@ -1136,9 +1136,9 @@ static void AllocContestResources(void) gContestResources->contestBgTilemaps[3] = AllocZeroed(0x1000); gContestResources->boxBlinkTiles1 = AllocZeroed(0x800); gContestResources->boxBlinkTiles2 = AllocZeroed(0x800); - gContestResources->field_3c = AllocZeroed(0x2000); - gUnknown_0202305C = gContestResources->field_3c; - gUnknown_02023060 = gContestResources->contestBgTilemaps[1]; + gContestResources->animBgTileBuffer = AllocZeroed(0x2000); + gBattleAnimBgTileBuffer = gContestResources->animBgTileBuffer; + gBattleAnimBgTilemapBuffer = gContestResources->contestBgTilemaps[1]; } static void FreeContestResources(void) @@ -1158,10 +1158,10 @@ static void FreeContestResources(void) FREE_AND_SET_NULL(gContestResources->contestBgTilemaps[3]); FREE_AND_SET_NULL(gContestResources->boxBlinkTiles1); FREE_AND_SET_NULL(gContestResources->boxBlinkTiles2); - FREE_AND_SET_NULL(gContestResources->field_3c); + FREE_AND_SET_NULL(gContestResources->animBgTileBuffer); FREE_AND_SET_NULL(gContestResources); - gUnknown_0202305C = NULL; - gUnknown_02023060 = NULL; + gBattleAnimBgTileBuffer = NULL; + gBattleAnimBgTilemapBuffer = NULL; } void CB2_StartContest(void) diff --git a/src/data/text/match_call_messages.h b/src/data/text/match_call_messages.h index c86329ee2f..22790c5fb5 100644 --- a/src/data/text/match_call_messages.h +++ b/src/data/text/match_call_messages.h @@ -454,7 +454,7 @@ const u8 *const gMatchCallFlavorTexts[REMATCH_TABLE_ENTRIES][CHECK_PAGE_ENTRY_CO [REMATCH_TRENT] = MCFLAVOR(Hiker_Trent), [REMATCH_SAWYER] = MCFLAVOR(Hiker_Sawyer), [REMATCH_KIRA_AND_DAN] = MCFLAVOR(YoungCouple_LoisAndHal), - [REMATCH_WALLY_3] = MCFLAVOR(PkmnTrainer_Wally), + [REMATCH_WALLY_VR] = MCFLAVOR(PkmnTrainer_Wally), [REMATCH_ROXANNE] = MCFLAVOR(RockinWhiz_Roxanne), [REMATCH_BRAWLY] = MCFLAVOR(TheBigHit_Brawly), [REMATCH_WATTSON] = MCFLAVOR(SwellShock_Wattson), diff --git a/src/party_menu.c b/src/party_menu.c index 5711c30556..a55d397d2e 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -944,7 +944,7 @@ static void DisplayPartyPokemonDataToTeachMove(u8 slot, u16 item, u8 tutor) static void DisplayPartyPokemonDataForMultiBattle(u8 slot) { struct PartyMenuBox *menuBox = &sPartyMenuBoxes[slot]; - u8 actualSlot = slot - (3); + u8 actualSlot = slot - MULTI_PARTY_SIZE; if (gMultiPartnerParty[actualSlot].species == SPECIES_NONE) { @@ -6103,7 +6103,7 @@ static void SlideMultiPartyMenuBoxSpritesOneStep(u8 taskId) s16 *data = gTasks[taskId].data; u8 i; - for (i = 3; i < PARTY_SIZE; i++) + for (i = MULTI_PARTY_SIZE; i < PARTY_SIZE; i++) { if (gMultiPartnerParty[i - MULTI_PARTY_SIZE].species != SPECIES_NONE) { diff --git a/src/pokeball.c b/src/pokeball.c index 52d47b5347..3d5d664e13 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -801,9 +801,9 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], BATTLER_AFFINE_EMERGE); if (GetBattlerSide(sprite->sBattler) == B_SIDE_OPPONENT) - gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCb_OpponentMonFromBall; + gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCB_OpponentMonFromBall; else - gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCb_PlayerMonFromBall; + gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCB_PlayerMonFromBall; AnimateSprite(&gSprites[gBattlerSpriteIds[sprite->sBattler]]); gSprites[gBattlerSpriteIds[sprite->sBattler]].data[1] = 0x1000; diff --git a/src/pokemon.c b/src/pokemon.c index 62c4441217..06a7a01f1e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -38,6 +38,7 @@ #include "constants/abilities.h" #include "constants/battle_frontier.h" #include "constants/battle_move_effects.h" +#include "constants/battle_script_commands.h" #include "constants/hold_effects.h" #include "constants/item_effects.h" #include "constants/items.h" @@ -3103,7 +3104,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (!typeOverride) type = gBattleMoves[move].type; else - type = typeOverride & 0x3F; + type = typeOverride & DYNAMIC_TYPE_MASK; attack = attacker->attack; defense = defender->defense; diff --git a/src/pokenav_match_call_data.c b/src/pokenav_match_call_data.c index 46ce43d4c1..29dd62621b 100644 --- a/src/pokenav_match_call_data.c +++ b/src/pokenav_match_call_data.c @@ -336,7 +336,7 @@ static const struct MatchCallWally sWallyMatchCallHeader = .type = MC_TYPE_WALLY, .mapSec = 0, .flag = FLAG_ENABLE_WALLY_MATCH_CALL, - .rematchTableIdx = REMATCH_WALLY_3, + .rematchTableIdx = REMATCH_WALLY_VR, .desc = gText_WallyMatchCallDesc, .textData = sWallyTextScripts, .locationData = sWallyLocationData diff --git a/src/recorded_battle.c b/src/recorded_battle.c index e29792766e..69ee902105 100644 --- a/src/recorded_battle.c +++ b/src/recorded_battle.c @@ -65,7 +65,7 @@ struct RecordedBattleSave u8 recordMixFriendName[PLAYER_NAME_LENGTH + 1]; u8 recordMixFriendClass; u8 apprenticeId; - u16 easyChatSpeech[6]; + u16 easyChatSpeech[EASY_CHAT_BATTLE_WORDS_COUNT]; u8 recordMixFriendLanguage; u8 apprenticeLanguage; u8 battleRecord[MAX_BATTLERS_COUNT][BATTLER_RECORD_SIZE]; @@ -93,11 +93,11 @@ EWRAM_DATA static struct Pokemon sSavedPlayerParty[PARTY_SIZE] = {0}; EWRAM_DATA static struct Pokemon sSavedOpponentParty[PARTY_SIZE] = {0}; EWRAM_DATA static u16 sPlayerMonMoves[2][MAX_MON_MOVES] = {0}; EWRAM_DATA static struct PlayerInfo sPlayers[MAX_BATTLERS_COUNT] = {0}; -EWRAM_DATA static bool8 sUnknown_0203CCD0 = 0; +EWRAM_DATA static bool8 sIsPlaybackFinished = 0; EWRAM_DATA static u8 sRecordMixFriendName[PLAYER_NAME_LENGTH + 1] = {0}; EWRAM_DATA static u8 sRecordMixFriendClass = 0; EWRAM_DATA static u8 sApprenticeId = 0; -EWRAM_DATA static u16 sEasyChatSpeech[6] = {0}; +EWRAM_DATA static u16 sEasyChatSpeech[EASY_CHAT_BATTLE_WORDS_COUNT] = {0}; EWRAM_DATA static u8 sBattleOutcome = 0; static u8 sRecordMixFriendLanguage; @@ -113,7 +113,7 @@ void RecordedBattle_Init(u8 mode) s32 i, j; sRecordMode = mode; - sUnknown_0203CCD0 = FALSE; + sIsPlaybackFinished = FALSE; for (i = 0; i < MAX_BATTLERS_COUNT; i++) { @@ -124,16 +124,14 @@ void RecordedBattle_Init(u8 mode) if (mode == B_RECORD_MODE_RECORDING) { for (j = 0; j < BATTLER_RECORD_SIZE; j++) - { sBattleRecords[i][j] = 0xFF; - } sBattleFlags = gBattleTypeFlags; sAI_Scripts = gBattleResources->ai->aiFlags; } } } -void sub_8184E58(void) +void RecordedBattle_SetTrainerInfo(void) { s32 i, j; @@ -150,6 +148,7 @@ void sub_8184E58(void) if (gBattleTypeFlags & BATTLE_TYPE_LINK) { + // Link recorded battle, record info for all trainers u8 linkPlayersCount; u8 text[30]; @@ -163,6 +162,7 @@ void sub_8184E58(void) sPlayers[i].battlerId = gLinkPlayers[i].id; sPlayers[i].language = gLinkPlayers[i].language; + // Record names if (i < linkPlayersCount) { StringCopy(text, gLinkPlayers[i].name); @@ -178,10 +178,11 @@ void sub_8184E58(void) } else { + // Local battle, just record own info sPlayers[0].trainerId = (gSaveBlock2Ptr->playerTrainerId[0]) - | (gSaveBlock2Ptr->playerTrainerId[1] << 8) - | (gSaveBlock2Ptr->playerTrainerId[2] << 16) - | (gSaveBlock2Ptr->playerTrainerId[3] << 24); + | (gSaveBlock2Ptr->playerTrainerId[1] << 8) + | (gSaveBlock2Ptr->playerTrainerId[2] << 16) + | (gSaveBlock2Ptr->playerTrainerId[3] << 24); sPlayers[0].gender = gSaveBlock2Ptr->playerGender; sPlayers[0].battlerId = 0; @@ -195,9 +196,7 @@ void sub_8184E58(void) void RecordedBattle_SetBattlerAction(u8 battlerId, u8 action) { if (sBattlerRecordSizes[battlerId] < BATTLER_RECORD_SIZE && sRecordMode != B_RECORD_MODE_PLAYBACK) - { sBattleRecords[battlerId][sBattlerRecordSizes[battlerId]++] = action; - } } void RecordedBattle_ClearBattlerAction(u8 battlerId, u8 bytesToClear) @@ -220,7 +219,7 @@ u8 RecordedBattle_GetBattlerAction(u8 battlerId) { gSpecialVar_Result = gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED; // hah ResetPaletteFadeControl(); - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); SetMainCallback2(CB2_QuitRecordedBattle); return 0xFF; } @@ -249,9 +248,7 @@ u8 RecordedBattle_BufferNewBattlerData(u8 *dst) dst[idx++] = sBattlerRecordSizes[i] - sBattlerPrevRecordSizes[i]; for (j = 0; j < sBattlerRecordSizes[i] - sBattlerPrevRecordSizes[i]; j++) - { dst[idx++] = sBattleRecords[i][sBattlerPrevRecordSizes[i] + j]; - } sBattlerPrevRecordSizes[i] = sBattlerRecordSizes[i]; } @@ -283,9 +280,7 @@ void RecordedBattle_RecordAllBattlerData(u8 *src) u8 numActions = GetNextRecordedDataByte(src, &idx, &size); for (i = 0; i < numActions; i++) - { sBattleRecords[battlerId][sBattlerSavedRecordSizes[battlerId]++] = GetNextRecordedDataByte(src, &idx, &size); - } } } } @@ -318,7 +313,7 @@ static bool32 IsRecordedBattleSaveValid(struct RecordedBattleSave *save) static bool32 RecordedBattleToSave(struct RecordedBattleSave *battleSave, struct RecordedBattleSave *saveSection) { - memset(saveSection, 0, 0x1000); + memset(saveSection, 0, SECTOR_SIZE); memcpy(saveSection, battleSave, sizeof(*battleSave)); saveSection->checksum = CalcByteArraySum((void*)(saveSection), sizeof(*saveSection) - 4); @@ -338,7 +333,7 @@ bool32 MoveRecordedBattleToSaveData(void) saveAttempts = 0; battleSave = AllocZeroed(sizeof(struct RecordedBattleSave)); - savSection = AllocZeroed(0x1000); + savSection = AllocZeroed(SECTOR_SIZE); for (i = 0; i < PARTY_SIZE; i++) { @@ -349,9 +344,7 @@ bool32 MoveRecordedBattleToSaveData(void) for (i = 0; i < MAX_BATTLERS_COUNT; i++) { for (j = 0; j < PLAYER_NAME_LENGTH + 1; j++) - { battleSave->playersName[i][j] = sPlayers[i].name[j]; - } battleSave->playersGender[i] = sPlayers[i].gender; battleSave->playersLanguage[i] = sPlayers[i].language; battleSave->playersBattlers[i] = sPlayers[i].battlerId; @@ -471,12 +464,8 @@ bool32 MoveRecordedBattleToSaveData(void) } for (i = 0; i < MAX_BATTLERS_COUNT; i++) - { for (j = 0; j < BATTLER_RECORD_SIZE; j++) - { battleSave->battleRecord[i][j] = sBattleRecords[i][j]; - } - } while (1) { @@ -585,29 +574,21 @@ static void SetVariablesForRecordedBattle(struct RecordedBattleSave *src) sAI_Scripts = src->AI_scripts; for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++) - { sRecordMixFriendName[i] = src->recordMixFriendName[i]; - } sRecordMixFriendClass = src->recordMixFriendClass; sApprenticeId = src->apprenticeId; sRecordMixFriendLanguage = src->recordMixFriendLanguage; sApprenticeLanguage = src->apprenticeLanguage; - for (i = 0; i < 6; i++) - { + for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) sEasyChatSpeech[i] = src->easyChatSpeech[i]; - } gSaveBlock2Ptr->frontier.lvlMode = src->lvlMode; for (i = 0; i < MAX_BATTLERS_COUNT; i++) - { for (j = 0; j < BATTLER_RECORD_SIZE; j++) - { sBattleRecords[i][j] = src->battleRecord[i][j]; - } - } } void PlayRecordedBattle(void (*CB2_After)(void)) @@ -741,17 +722,20 @@ void sub_818603C(u8 arg0) for (battlerId = 0; battlerId < gBattlersCount; battlerId++) { - if (GetBattlerSide(battlerId) != B_SIDE_OPPONENT) // player's side only + // Player's side only + if (GetBattlerSide(battlerId) != B_SIDE_OPPONENT) { if (arg0 == 1) { + // Check if any of the battler's moves have changed for (j = 0; j < MAX_MON_MOVES; j++) { if (gBattleMons[battlerId].moves[j] != sPlayerMonMoves[battlerId / 2][j]) break; } - if (j != MAX_MON_MOVES) // player's mon's move has been changed + if (j != MAX_MON_MOVES) { + // At least one of the moves has been changed RecordedBattle_SetBattlerAction(battlerId, ACTION_MOVE_CHANGE); for (j = 0; j < MAX_MON_MOVES; j++) { @@ -779,9 +763,8 @@ void sub_818603C(u8 arg0) RecordedBattle_GetBattlerAction(battlerId); for (j = 0; j < MAX_MON_MOVES; j++) - { - ppBonuses[j] = ((gBattleMons[battlerId].ppBonuses & ((3 << (j << 1)))) >> (j << 1)); - } + ppBonuses[j] = ((gBattleMons[battlerId].ppBonuses & (3 << (j << 1))) >> (j << 1)); + for (j = 0; j < MAX_MON_MOVES; j++) { array1[j] = RecordedBattle_GetBattlerAction(battlerId); @@ -806,9 +789,8 @@ void sub_818603C(u8 arg0) if (!(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED)) { for (j = 0; j < MAX_MON_MOVES; j++) - { ppBonuses[j] = ((GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, NULL) & ((3 << (j << 1)))) >> (j << 1)); - } + for (j = 0; j < MAX_MON_MOVES; j++) { movePp.moves[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + array1[j], NULL); @@ -822,12 +804,10 @@ void sub_818603C(u8 arg0) } var = 0; for (j = 0; j < MAX_MON_MOVES; j++) - { var |= (array3[j]) << (j << 1); - } + SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, &var); } - gChosenMoveByBattler[battlerId] = gBattleMons[battlerId].moves[*(gBattleStruct->chosenMovePositions + battlerId)]; } } @@ -840,24 +820,24 @@ u32 GetAiScriptsInRecordedBattle(void) return sAI_Scripts; } -void sub_8186444(void) +// Used to determine when the player is allowed to press B to end a recorded battle's playback +void RecordedBattle_SetPlaybackFinished(void) { - sUnknown_0203CCD0 = TRUE; + sIsPlaybackFinished = TRUE; } -bool8 sub_8186450(void) +bool8 RecordedBattle_CanStopPlayback(void) { - return (sUnknown_0203CCD0 == FALSE); + return (sIsPlaybackFinished == FALSE); } void GetRecordedBattleRecordMixFriendName(u8 *dst) { s32 i; - for (i = 0; i < 8; i++) + for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++) dst[i] = sRecordMixFriendName[i]; - - dst[7] = EOS; + dst[PLAYER_NAME_LENGTH] = EOS; ConvertInternationalString(dst, sRecordMixFriendLanguage); } From d8e65fc4b669fb0115615299b1255723e9f8397d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 8 Oct 2021 16:50:52 -0400 Subject: [PATCH 044/417] More battle doc, add battle window ids --- ...{unk_battlebox.png => level_up_banner.png} | Bin include/battle_script_commands.h | 5 +- include/constants/battle.h | 39 ++ src/battle_anim.c | 4 - src/battle_arena.c | 23 +- src/battle_bg.c | 156 +++---- src/battle_controller_link_opponent.c | 7 +- src/battle_controller_link_partner.c | 5 +- src/battle_controller_opponent.c | 7 +- src/battle_controller_player.c | 28 +- src/battle_controller_player_partner.c | 7 +- src/battle_controller_recorded_opponent.c | 7 +- src/battle_controller_recorded_player.c | 7 +- src/battle_controller_safari.c | 9 +- src/battle_controller_wally.c | 8 +- src/battle_gfx_sfx_util.c | 4 - src/battle_main.c | 26 +- src/battle_message.c | 393 +++++++++--------- src/battle_script_commands.c | 264 ++++++------ src/evolution_scene.c | 28 +- src/hall_of_fame.c | 2 - src/pokeball.c | 3 - src/pokeblock_feed.c | 2 - src/pokedex.c | 2 - src/sound.c | 7 - src/title_screen.c | 3 - 26 files changed, 523 insertions(+), 523 deletions(-) rename graphics/battle_interface/{unk_battlebox.png => level_up_banner.png} (100%) diff --git a/graphics/battle_interface/unk_battlebox.png b/graphics/battle_interface/level_up_banner.png similarity index 100% rename from graphics/battle_interface/unk_battlebox.png rename to graphics/battle_interface/level_up_banner.png diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h index ee36764630..90b6d80e86 100644 --- a/include/battle_script_commands.h +++ b/include/battle_script_commands.h @@ -3,8 +3,9 @@ #include "constants/pokemon.h" -#define WINDOW_CLEAR 0x1 -#define WINDOW_x80 0x80 +// Arguments for 'flags' in HandleBattleWindow +#define WINDOW_CLEAR (1 << 0) +#define WINDOW_BG1 (1 << 7) void AI_CalcDmg(u8 battlerIdAtk, u8 battlerIdDef); u8 TypeCalc(u16 move, u8 battlerIdAtk, u8 battlerIdDef); diff --git a/include/constants/battle.h b/include/constants/battle.h index 62e7cbbfa3..2534ade4b3 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -319,4 +319,43 @@ #define B_WIN_TYPE_NORMAL 0 #define B_WIN_TYPE_ARENA 1 +// Window Ids for gStandardBattleWindowTemplates / gBattleArenaWindowTemplates +#define B_WIN_MSG 0 +#define B_WIN_ACTION_PROMPT 1 // "What will {x} do?" +#define B_WIN_ACTION_MENU 2 // "Fight/Pokémon/Bag/Run" menu +#define B_WIN_MOVE_NAME_1 3 // Top left +#define B_WIN_MOVE_NAME_2 4 // Top right +#define B_WIN_MOVE_NAME_3 5 // Bottom left +#define B_WIN_MOVE_NAME_4 6 // Bottom right +#define B_WIN_PP 7 +#define B_WIN_DUMMY 8 +#define B_WIN_PP_REMAINING 9 +#define B_WIN_MOVE_TYPE 10 +#define B_WIN_SWITCH_PROMPT 11 // "Switch which?" +#define B_WIN_YESNO 12 +#define B_WIN_LEVEL_UP_BOX 13 +#define B_WIN_LEVEL_UP_BANNER 14 +#define B_WIN_VS_PLAYER 15 +#define B_WIN_VS_OPPONENT 16 +#define B_WIN_VS_MULTI_PLAYER_1 17 +#define B_WIN_VS_MULTI_PLAYER_2 18 +#define B_WIN_VS_MULTI_PLAYER_3 19 +#define B_WIN_VS_MULTI_PLAYER_4 20 +#define B_WIN_VS_OUTCOME_DRAW 21 +#define B_WIN_VS_OUTCOME_LEFT 22 +#define B_WIN_VS_OUTCOME_RIGHT 23 + +// The following are duplicate id values for windows that Battle Arena uses differently. +#define ARENA_WIN_PLAYER_NAME 15 +#define ARENA_WIN_VS 16 +#define ARENA_WIN_OPPONENT_NAME 17 +#define ARENA_WIN_MIND 18 +#define ARENA_WIN_SKILL 19 +#define ARENA_WIN_BODY 20 +#define ARENA_WIN_JUDGEMENT_TITLE 21 +#define ARENA_WIN_JUDGEMENT_TEXT 22 + +// Flag for BattlePutTextOnWindow. Never set +#define B_WIN_COPYTOVRAM (1 << 7) + #endif // GUARD_CONSTANTS_BATTLE_H diff --git a/src/battle_anim.c b/src/battle_anim.c index 6cdbed2b74..4599e3e096 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -20,10 +20,6 @@ #define ANIM_SPRITE_INDEX_COUNT 8 -extern struct MusicPlayerInfo gMPlayInfo_BGM; -extern struct MusicPlayerInfo gMPlayInfo_SE1; -extern struct MusicPlayerInfo gMPlayInfo_SE2; - extern const u16 gMovesWithQuietBGM[]; extern const u8 *const gBattleAnims_Moves[]; diff --git a/src/battle_arena.c b/src/battle_arena.c index f61526edcd..ec48da3128 100644 --- a/src/battle_arena.c +++ b/src/battle_arena.c @@ -28,7 +28,6 @@ #include "constants/moves.h" #include "constants/rgb.h" -// This file's functions. static void InitArenaChallenge(void); static void GetArenaData(void); static void SetArenaData(void); @@ -39,7 +38,6 @@ static void BufferArenaOpponentName(void); static void SpriteCb_JudgmentIcon(struct Sprite *sprite); static void ShowJudgmentSprite(u8 x, u8 y, u8 category, u8 battler); -// Const rom data. static const s8 sMindRatings[] = { [MOVE_NONE] = 0, @@ -501,7 +499,6 @@ static const u16 sLongStreakPrizeItems[] = ITEM_CHOICE_BAND, }; -// code void CallBattleArenaFunction(void) { sArenaFunctions[gSpecialVar_0x8004](); @@ -537,15 +534,15 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state) gBattleTextBuff2[0] = CHAR_0; gBattleTextBuff2[1] = EOS; BattleStringExpandPlaceholdersToDisplayedString(gText_PlayerMon1Name); - BattlePutTextOnWindow(gDisplayedStringBattle, 15); - BattlePutTextOnWindow(gText_Vs, 16); + BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_PLAYER_NAME); + BattlePutTextOnWindow(gText_Vs, ARENA_WIN_VS); BattleStringExpandPlaceholdersToDisplayedString(gText_OpponentMon1Name); - BattlePutTextOnWindow(gDisplayedStringBattle, 17); - BattlePutTextOnWindow(gText_Mind, 18); - BattlePutTextOnWindow(gText_Skill, 19); - BattlePutTextOnWindow(gText_Body, 20); + BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_OPPONENT_NAME); + BattlePutTextOnWindow(gText_Mind, ARENA_WIN_MIND); + BattlePutTextOnWindow(gText_Skill, ARENA_WIN_SKILL); + BattlePutTextOnWindow(gText_Body, ARENA_WIN_BODY); BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement); - BattlePutTextOnWindow(gDisplayedStringBattle, 21); + BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE); (*state)++; } break; @@ -567,7 +564,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state) ShowJudgmentSprite(80, 40, ARENA_CATEGORY_MIND, B_POSITION_PLAYER_LEFT); ShowJudgmentSprite(160, 40, ARENA_CATEGORY_MIND, B_POSITION_OPPONENT_LEFT); BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement); - BattlePutTextOnWindow(gDisplayedStringBattle, 21); + BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE); (*state)++; ret = 1; break; @@ -576,7 +573,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state) ShowJudgmentSprite(80, 56, ARENA_CATEGORY_SKILL, B_POSITION_PLAYER_LEFT); ShowJudgmentSprite(160, 56, ARENA_CATEGORY_SKILL, B_POSITION_OPPONENT_LEFT); BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement); - BattlePutTextOnWindow(gDisplayedStringBattle, 21); + BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE); (*state)++; ret = 1; break; @@ -585,7 +582,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state) ShowJudgmentSprite(80, 72, ARENA_CATEGORY_BODY, B_POSITION_PLAYER_LEFT); ShowJudgmentSprite(160, 72, ARENA_CATEGORY_BODY, B_POSITION_OPPONENT_LEFT); BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement); - BattlePutTextOnWindow(gDisplayedStringBattle, 21); + BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE); (*state)++; ret = 1; break; diff --git a/src/battle_bg.c b/src/battle_bg.c index 886a3d107f..cbd293294c 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -161,7 +161,7 @@ const struct BgTemplate gBattleBgTemplates[] = static const struct WindowTemplate gStandardBattleWindowTemplates[] = { - { // 0 Standard battle message + [B_WIN_MSG] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 15, @@ -170,7 +170,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 0, .baseBlock = 0x0090, }, - { // 1 "What will (pokemon) do?" + [B_WIN_ACTION_PROMPT] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 35, @@ -179,7 +179,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 0, .baseBlock = 0x01c0, }, - { // 2 "Fight/Pokemon/Bag/Run" + [B_WIN_ACTION_MENU] = { .bg = 0, .tilemapLeft = 17, .tilemapTop = 35, @@ -188,7 +188,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0190, }, - { // 3 Top left move + [B_WIN_MOVE_NAME_1] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 55, @@ -197,7 +197,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0300, }, - { // 4 Top right move + [B_WIN_MOVE_NAME_2] = { .bg = 0, .tilemapLeft = 11, .tilemapTop = 55, @@ -206,7 +206,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0310, }, - { // 5 Bottom left move + [B_WIN_MOVE_NAME_3] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 57, @@ -215,7 +215,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0320, }, - { // 6 Bottom right move + [B_WIN_MOVE_NAME_4] = { .bg = 0, .tilemapLeft = 11, .tilemapTop = 57, @@ -224,7 +224,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0330, }, - { + [B_WIN_PP] = { .bg = 0, .tilemapLeft = 21, .tilemapTop = 55, @@ -233,7 +233,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0290, }, - { + [B_WIN_DUMMY] = { .bg = 0, .tilemapLeft = 21, .tilemapTop = 57, @@ -242,7 +242,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0298, }, - { + [B_WIN_PP_REMAINING] = { .bg = 0, .tilemapLeft = 25, .tilemapTop = 55, @@ -251,7 +251,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0298, }, - { + [B_WIN_MOVE_TYPE] = { .bg = 0, .tilemapLeft = 21, .tilemapTop = 57, @@ -260,7 +260,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x02a0, }, - { + [B_WIN_SWITCH_PROMPT] = { .bg = 0, .tilemapLeft = 21, .tilemapTop = 55, @@ -269,7 +269,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x02b0, }, - { + [B_WIN_YESNO] = { .bg = 0, .tilemapLeft = 26, .tilemapTop = 9, @@ -278,7 +278,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0100, }, - { + [B_WIN_LEVEL_UP_BOX] = { .bg = 1, .tilemapLeft = 19, .tilemapTop = 8, @@ -287,7 +287,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0100, }, - { + [B_WIN_LEVEL_UP_BANNER] = { .bg = 2, .tilemapLeft = 18, .tilemapTop = 0, @@ -296,7 +296,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 6, .baseBlock = 0x016e, }, - { + [B_WIN_VS_PLAYER] = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 3, @@ -305,7 +305,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0020, }, - { + [B_WIN_VS_OPPONENT] = { .bg = 2, .tilemapLeft = 2, .tilemapTop = 3, @@ -314,7 +314,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0040, }, - { + [B_WIN_VS_MULTI_PLAYER_1] = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 2, @@ -323,7 +323,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0020, }, - { + [B_WIN_VS_MULTI_PLAYER_2] = { .bg = 2, .tilemapLeft = 2, .tilemapTop = 2, @@ -332,7 +332,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0040, }, - { + [B_WIN_VS_MULTI_PLAYER_3] = { .bg = 1, .tilemapLeft = 2, .tilemapTop = 6, @@ -341,7 +341,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0060, }, - { + [B_WIN_VS_MULTI_PLAYER_4] = { .bg = 2, .tilemapLeft = 2, .tilemapTop = 6, @@ -350,7 +350,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0080, }, - { + [B_WIN_VS_OUTCOME_DRAW] = { .bg = 0, .tilemapLeft = 12, .tilemapTop = 2, @@ -359,7 +359,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 0, .baseBlock = 0x00a0, }, - { + [B_WIN_VS_OUTCOME_LEFT] = { .bg = 0, .tilemapLeft = 4, .tilemapTop = 2, @@ -368,7 +368,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = .paletteNum = 0, .baseBlock = 0x00a0, }, - { + [B_WIN_VS_OUTCOME_RIGHT] = { .bg = 0, .tilemapLeft = 19, .tilemapTop = 2, @@ -382,7 +382,7 @@ static const struct WindowTemplate gStandardBattleWindowTemplates[] = static const struct WindowTemplate gBattleArenaWindowTemplates[] = { - { + [B_WIN_MSG] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 15, @@ -391,7 +391,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 0, .baseBlock = 0x0090, }, - { + [B_WIN_ACTION_PROMPT] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 35, @@ -400,7 +400,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 0, .baseBlock = 0x01c0, }, - { + [B_WIN_ACTION_MENU] = { .bg = 0, .tilemapLeft = 17, .tilemapTop = 35, @@ -409,7 +409,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0190, }, - { + [B_WIN_MOVE_NAME_1] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 55, @@ -418,7 +418,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0300, }, - { + [B_WIN_MOVE_NAME_2] = { .bg = 0, .tilemapLeft = 11, .tilemapTop = 55, @@ -427,7 +427,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0310, }, - { + [B_WIN_MOVE_NAME_3] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 57, @@ -436,7 +436,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0320, }, - { + [B_WIN_MOVE_NAME_4] = { .bg = 0, .tilemapLeft = 11, .tilemapTop = 57, @@ -445,7 +445,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0330, }, - { + [B_WIN_PP] = { .bg = 0, .tilemapLeft = 21, .tilemapTop = 55, @@ -454,7 +454,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0290, }, - { + [B_WIN_DUMMY] = { .bg = 0, .tilemapLeft = 21, .tilemapTop = 57, @@ -463,7 +463,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0298, }, - { + [B_WIN_PP_REMAINING] = { .bg = 0, .tilemapLeft = 25, .tilemapTop = 55, @@ -472,7 +472,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0298, }, - { + [B_WIN_MOVE_TYPE] = { .bg = 0, .tilemapLeft = 21, .tilemapTop = 57, @@ -481,7 +481,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x02a0, }, - { + [B_WIN_SWITCH_PROMPT] = { .bg = 0, .tilemapLeft = 21, .tilemapTop = 55, @@ -490,7 +490,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x02b0, }, - { + [B_WIN_YESNO] = { .bg = 0, .tilemapLeft = 26, .tilemapTop = 9, @@ -499,7 +499,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0100, }, - { + [B_WIN_LEVEL_UP_BOX] = { .bg = 1, .tilemapLeft = 19, .tilemapTop = 8, @@ -508,7 +508,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0100, }, - { + [B_WIN_LEVEL_UP_BANNER] = { .bg = 2, .tilemapLeft = 18, .tilemapTop = 0, @@ -517,7 +517,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 6, .baseBlock = 0x016e, }, - { + [ARENA_WIN_PLAYER_NAME] = { .bg = 0, .tilemapLeft = 6, .tilemapTop = 1, @@ -526,7 +526,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0100, }, - { + [ARENA_WIN_VS] = { .bg = 0, .tilemapLeft = 14, .tilemapTop = 1, @@ -535,7 +535,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0110, }, - { + [ARENA_WIN_OPPONENT_NAME] = { .bg = 0, .tilemapLeft = 16, .tilemapTop = 1, @@ -544,7 +544,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0114, }, - { + [ARENA_WIN_MIND] = { .bg = 0, .tilemapLeft = 12, .tilemapTop = 4, @@ -553,7 +553,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0124, }, - { + [ARENA_WIN_SKILL] = { .bg = 0, .tilemapLeft = 12, .tilemapTop = 6, @@ -562,7 +562,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0130, }, - { + [ARENA_WIN_BODY] = { .bg = 0, .tilemapLeft = 12, .tilemapTop = 8, @@ -571,7 +571,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x013c, }, - { + [ARENA_WIN_JUDGEMENT_TITLE] = { .bg = 0, .tilemapLeft = 8, .tilemapTop = 11, @@ -580,7 +580,7 @@ static const struct WindowTemplate gBattleArenaWindowTemplates[] = .paletteNum = 5, .baseBlock = 0x0148, }, - { + [ARENA_WIN_JUDGEMENT_TEXT] = { .bg = 0, .tilemapLeft = 2, .tilemapTop = 15, @@ -935,7 +935,7 @@ static void DrawLinkBattleVsScreenOutcomeText(void) { if (gBattleOutcome == B_OUTCOME_DREW) { - BattlePutTextOnWindow(gText_Draw, 0x15); + BattlePutTextOnWindow(gText_Draw, B_WIN_VS_OUTCOME_DRAW); } else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) { @@ -944,20 +944,20 @@ static void DrawLinkBattleVsScreenOutcomeText(void) switch (gLinkPlayers[gBattleScripting.multiplayerId].id) { case 0: - BattlePutTextOnWindow(gText_Win, 0x16); - BattlePutTextOnWindow(gText_Loss, 0x17); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT); break; case 1: - BattlePutTextOnWindow(gText_Win, 0x17); - BattlePutTextOnWindow(gText_Loss, 0x16); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT); break; case 2: - BattlePutTextOnWindow(gText_Win, 0x16); - BattlePutTextOnWindow(gText_Loss, 0x17); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT); break; case 3: - BattlePutTextOnWindow(gText_Win, 0x17); - BattlePutTextOnWindow(gText_Loss, 0x16); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT); break; } } @@ -966,20 +966,20 @@ static void DrawLinkBattleVsScreenOutcomeText(void) switch (gLinkPlayers[gBattleScripting.multiplayerId].id) { case 0: - BattlePutTextOnWindow(gText_Win, 0x17); - BattlePutTextOnWindow(gText_Loss, 0x16); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT); break; case 1: - BattlePutTextOnWindow(gText_Win, 0x16); - BattlePutTextOnWindow(gText_Loss, 0x17); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT); break; case 2: - BattlePutTextOnWindow(gText_Win, 0x17); - BattlePutTextOnWindow(gText_Loss, 0x16); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT); break; case 3: - BattlePutTextOnWindow(gText_Win, 0x16); - BattlePutTextOnWindow(gText_Loss, 0x17); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT); break; } } @@ -988,26 +988,26 @@ static void DrawLinkBattleVsScreenOutcomeText(void) { if (gLinkPlayers[gBattleScripting.multiplayerId].id != 0) { - BattlePutTextOnWindow(gText_Win, 0x17); - BattlePutTextOnWindow(gText_Loss, 0x16); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT); } else { - BattlePutTextOnWindow(gText_Win, 0x16); - BattlePutTextOnWindow(gText_Loss, 0x17); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT); } } else { if (gLinkPlayers[gBattleScripting.multiplayerId].id != 0) { - BattlePutTextOnWindow(gText_Win, 0x16); - BattlePutTextOnWindow(gText_Loss, 0x17); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_LEFT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_RIGHT); } else { - BattlePutTextOnWindow(gText_Win, 0x17); - BattlePutTextOnWindow(gText_Loss, 0x16); + BattlePutTextOnWindow(gText_Win, B_WIN_VS_OUTCOME_RIGHT); + BattlePutTextOnWindow(gText_Loss, B_WIN_VS_OUTCOME_LEFT); } } } @@ -1031,19 +1031,19 @@ void InitLinkBattleVsScreen(u8 taskId) switch (linkPlayer->id) { case 0: - BattlePutTextOnWindow(name, 0x11); + BattlePutTextOnWindow(name, B_WIN_VS_MULTI_PLAYER_1); DrawLinkBattleParticipantPokeballs(taskId, linkPlayer->id, 1, 2, 4); break; case 1: - BattlePutTextOnWindow(name, 0x12); + BattlePutTextOnWindow(name, B_WIN_VS_MULTI_PLAYER_2); DrawLinkBattleParticipantPokeballs(taskId, linkPlayer->id, 2, 2, 4); break; case 2: - BattlePutTextOnWindow(name, 0x13); + BattlePutTextOnWindow(name, B_WIN_VS_MULTI_PLAYER_3); DrawLinkBattleParticipantPokeballs(taskId, linkPlayer->id, 1, 2, 8); break; case 3: - BattlePutTextOnWindow(name, 0x14); + BattlePutTextOnWindow(name, B_WIN_VS_MULTI_PLAYER_4); DrawLinkBattleParticipantPokeballs(taskId, linkPlayer->id, 2, 2, 8); break; } @@ -1059,10 +1059,10 @@ void InitLinkBattleVsScreen(u8 taskId) opponentId = playerId, playerId = opponentId_copy; name = gLinkPlayers[playerId].name; - BattlePutTextOnWindow(name, 0xF); + BattlePutTextOnWindow(name, B_WIN_VS_PLAYER); name = gLinkPlayers[opponentId].name; - BattlePutTextOnWindow(name, 0x10); + BattlePutTextOnWindow(name, B_WIN_VS_OPPONENT); DrawLinkBattleParticipantPokeballs(taskId, playerId, 1, 2, 7); DrawLinkBattleParticipantPokeballs(taskId, opponentId, 2, 2, 7); diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index dc8b2bfd17..11b8f3af78 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -29,9 +29,6 @@ #include "constants/trainers.h" #include "recorded_battle.h" -extern struct MusicPlayerInfo gMPlayInfo_BGM; - -// this file's functions static void LinkOpponentHandleGetMonData(void); static void LinkOpponentHandleGetRawMonData(void); static void LinkOpponentHandleSetMonData(void); @@ -424,7 +421,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) LinkOpponentBufferExecCompleted(); } @@ -1471,7 +1468,7 @@ static void LinkOpponentHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; BattleTv_SetDataBasedOnString(*stringId); } diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 07101c6823..9c184b9c26 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -29,7 +29,6 @@ #include "constants/trainers.h" #include "recorded_battle.h" -// this file's functions static void LinkPartnerHandleGetMonData(void); static void LinkPartnerHandleGetRawMonData(void); static void LinkPartnerHandleSetMonData(void); @@ -313,7 +312,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) LinkPartnerBufferExecCompleted(); } @@ -1301,7 +1300,7 @@ static void LinkPartnerHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; BattleTv_SetDataBasedOnString(*stringId); } diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 87bef43025..3f62ba08d4 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -34,9 +34,6 @@ #include "constants/trainers.h" #include "trainer_hill.h" -extern struct MusicPlayerInfo gMPlayInfo_BGM; - -// this file's functions static void OpponentHandleGetMonData(void); static void OpponentHandleGetRawMonData(void); static void OpponentHandleSetMonData(void); @@ -430,7 +427,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) OpponentBufferExecCompleted(); } @@ -1524,7 +1521,7 @@ static void OpponentHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; BattleArena_DeductMindPoints(gActiveBattler, *stringId); } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 456fd8cee6..bc8db16991 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -36,9 +36,6 @@ #include "constants/trainers.h" #include "constants/rgb.h" -extern struct MusicPlayerInfo gMPlayInfo_BGM; - -// this file's functions static void PlayerHandleGetMonData(void); static void PlayerHandleSetMonData(void); static void PlayerHandleSetRawMonData(void); @@ -611,7 +608,7 @@ static void HandleInputChooseMove(void) gMultiUsePlayerCursor = gMoveSelectionCursor[gActiveBattler] + 1; MoveSelectionCreateCursorAt(gMultiUsePlayerCursor, 27); - BattlePutTextOnWindow(gText_BattleSwitchWhich, 0xB); + BattlePutTextOnWindow(gText_BattleSwitchWhich, B_WIN_SWITCH_PROMPT); gBattlerControllerFuncs[gActiveBattler] = HandleMoveSwitching; } } @@ -1145,7 +1142,7 @@ static void CompleteOnHealthbarDone(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) PlayerBufferExecCompleted(); } @@ -1341,7 +1338,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter2(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) PlayerBufferExecCompleted(); } @@ -1466,7 +1463,8 @@ static void MoveSelectionDisplayMoveNames(void) { MoveSelectionDestroyCursorAt(i); StringCopy(gDisplayedStringBattle, gMoveNames[moveInfo->moves[i]]); - BattlePutTextOnWindow(gDisplayedStringBattle, i + 3); + // Prints on windows B_WIN_MOVE_NAME_1, B_WIN_MOVE_NAME_2, B_WIN_MOVE_NAME_3, B_WIN_MOVE_NAME_4 + BattlePutTextOnWindow(gDisplayedStringBattle, i + B_WIN_MOVE_NAME_1); if (moveInfo->moves[i] != MOVE_NONE) gNumberOfMovesToChoose++; } @@ -1475,7 +1473,7 @@ static void MoveSelectionDisplayMoveNames(void) static void MoveSelectionDisplayPpString(void) { StringCopy(gDisplayedStringBattle, gText_MoveInterfacePP); - BattlePutTextOnWindow(gDisplayedStringBattle, 7); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_PP); } static void MoveSelectionDisplayPpNumber(void) @@ -1492,7 +1490,7 @@ static void MoveSelectionDisplayPpNumber(void) *(txtPtr)++ = CHAR_SLASH; ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2); - BattlePutTextOnWindow(gDisplayedStringBattle, 9); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_PP_REMAINING); } static void MoveSelectionDisplayMoveType(void) @@ -1506,7 +1504,7 @@ static void MoveSelectionDisplayMoveType(void) *(txtPtr)++ = 1; StringCopy(txtPtr, gTypeNames[gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].type]); - BattlePutTextOnWindow(gDisplayedStringBattle, 10); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE); } static void MoveSelectionCreateCursorAt(u8 cursorPosition, u8 arg1) @@ -1577,7 +1575,7 @@ static void PrintLinkStandbyMsg(void) { gBattle_BG0_X = 0; gBattle_BG0_Y = 0; - BattlePutTextOnWindow(gText_LinkStandby, 0); + BattlePutTextOnWindow(gText_LinkStandby, B_WIN_MSG); } } @@ -2549,7 +2547,7 @@ static void PlayerHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2; BattleTv_SetDataBasedOnString(*stringId); BattleArena_DeductMindPoints(gActiveBattler, *stringId); @@ -2579,14 +2577,14 @@ static void PlayerHandleChooseAction(void) gBattlerControllerFuncs[gActiveBattler] = HandleChooseActionAfterDma3; BattleTv_ClearExplosionFaintCause(); - BattlePutTextOnWindow(gText_BattleMenu, 2); + BattlePutTextOnWindow(gText_BattleMenu, B_WIN_ACTION_MENU); for (i = 0; i < 4; i++) ActionSelectionDestroyCursorAt(i); ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); BattleStringExpandPlaceholdersToDisplayedString(gText_WhatWillPkmnDo); - BattlePutTextOnWindow(gDisplayedStringBattle, 1); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT); } static void PlayerHandleYesNoBox(void) @@ -2594,7 +2592,7 @@ static void PlayerHandleYesNoBox(void) if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) { HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0); - BattlePutTextOnWindow(gText_BattleYesNoChoice, 12); + BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO); gMultiUsePlayerCursor = 1; BattleCreateYesNoCursorAt(1); gBattlerControllerFuncs[gActiveBattler] = PlayerHandleYesNoInput; diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index d1d23099a0..d07f2763ad 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -27,7 +27,6 @@ #include "constants/songs.h" #include "constants/trainers.h" -// this file's functions static void PlayerPartnerHandleGetMonData(void); static void PlayerPartnerHandleGetRawMonData(void); static void PlayerPartnerHandleSetMonData(void); @@ -300,7 +299,7 @@ static void CompleteOnHealthbarDone(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) PlayerPartnerBufferExecCompleted(); } @@ -497,7 +496,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter2(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) PlayerPartnerBufferExecCompleted(); } @@ -1491,7 +1490,7 @@ static void PlayerPartnerHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2; } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index adac43961f..bb99c7bf94 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -29,9 +29,6 @@ #include "constants/songs.h" #include "constants/trainers.h" -extern struct MusicPlayerInfo gMPlayInfo_BGM; - -// this file's functions static void RecordedOpponentHandleGetMonData(void); static void RecordedOpponentHandleGetRawMonData(void); static void RecordedOpponentHandleSetMonData(void); @@ -408,7 +405,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) RecordedOpponentBufferExecCompleted(); } @@ -1398,7 +1395,7 @@ static void RecordedOpponentHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index bff81948ba..26231060a4 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -25,9 +25,6 @@ #include "constants/battle_anim.h" #include "constants/songs.h" -extern struct MusicPlayerInfo gMPlayInfo_BGM; - -// this file's functions static void RecordedPlayerHandleGetMonData(void); static void RecordedPlayerHandleGetRawMonData(void); static void RecordedPlayerHandleSetMonData(void); @@ -390,7 +387,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) RecordedPlayerBufferExecCompleted(); } @@ -1404,7 +1401,7 @@ static void RecordedPlayerHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; } diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c index a825387419..6dc7aa2e52 100644 --- a/src/battle_controller_safari.c +++ b/src/battle_controller_safari.c @@ -24,7 +24,6 @@ #include "constants/songs.h" #include "constants/rgb.h" -// this file's functions static void SafariHandleGetMonData(void); static void SafariHandleGetRawMonData(void); static void SafariHandleSetMonData(void); @@ -241,7 +240,7 @@ static void CompleteOnBattlerSpriteCallbackDummy(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) SafariBufferExecCompleted(); } @@ -425,7 +424,7 @@ static void SafariHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; } @@ -452,14 +451,14 @@ static void SafariHandleChooseAction(void) s32 i; gBattlerControllerFuncs[gActiveBattler] = HandleChooseActionAfterDma3; - BattlePutTextOnWindow(gText_SafariZoneMenu, 2); + BattlePutTextOnWindow(gText_SafariZoneMenu, B_WIN_ACTION_MENU); for (i = 0; i < 4; i++) ActionSelectionDestroyCursorAt(i); ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); BattleStringExpandPlaceholdersToDisplayedString(gText_WhatWillPkmnDo2); - BattlePutTextOnWindow(gDisplayedStringBattle, 1); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT); } static void SafariHandleYesNoBox(void) diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index 048600d9a5..466b3f3151 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -253,7 +253,7 @@ static void CompleteOnBattlerSpriteCallbackDummy(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) WallyBufferExecCompleted(); } @@ -1178,7 +1178,7 @@ static void WallyHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; } @@ -1205,14 +1205,14 @@ static void WallyHandleChooseAction(void) s32 i; gBattlerControllerFuncs[gActiveBattler] = HandleChooseActionAfterDma3; - BattlePutTextOnWindow(gText_BattleMenu, 2); + BattlePutTextOnWindow(gText_BattleMenu, B_WIN_ACTION_MENU); for (i = 0; i < 4; i++) ActionSelectionDestroyCursorAt(i); ActionSelectionCreateCursorAt(gActionSelectionCursor[gActiveBattler], 0); BattleStringExpandPlaceholdersToDisplayedString(gText_WhatWillWallyDo); - BattlePutTextOnWindow(gDisplayedStringBattle, 1); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT); } static void WallyHandleYesNoBox(void) diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 6c4f1473c2..77c50dc181 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -26,10 +26,6 @@ #include "constants/rgb.h" #include "constants/battle_palace.h" -extern struct MusicPlayerInfo gMPlayInfo_SE1; -extern struct MusicPlayerInfo gMPlayInfo_SE2; -extern struct MusicPlayerInfo gMPlayInfo_BGM; - extern const u8 gBattlePalaceNatureToMoveTarget[]; extern const u8 * const gBattleAnims_General[]; extern const u8 * const gBattleAnims_Special[]; diff --git a/src/battle_main.c b/src/battle_main.c index 6ed9f1232b..9b3afb7f32 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -2341,12 +2341,12 @@ static void EndLinkBattleInSteps(void) if (IsLinkTaskFinished() == TRUE) { SetLinkStandbyCallback(); - BattlePutTextOnWindow(gText_LinkStandby3, 0); + BattlePutTextOnWindow(gText_LinkStandby3, B_WIN_MSG); gBattleCommunication[MULTIUSE_STATE]++; } break; case 7: - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) { if (IsLinkTaskFinished() == TRUE) gBattleCommunication[MULTIUSE_STATE]++; @@ -2484,15 +2484,15 @@ static void AskRecordBattle(void) if (!gPaletteFade.active) { // "Would you like to record your battle on your FRONTIER PASS?" - BattlePutTextOnWindow(gText_RecordBattleToPass, 0); + BattlePutTextOnWindow(gText_RecordBattleToPass, B_WIN_MSG); gBattleCommunication[MULTIUSE_STATE]++; } break; case STATE_PRINT_YES_NO: - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) { HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0); - BattlePutTextOnWindow(gText_BattleYesNoChoice, 0xC); + BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO); gBattleCommunication[CURSOR_POSITION] = 1; BattleCreateYesNoCursorAt(1); gBattleCommunication[MULTIUSE_STATE]++; @@ -2551,7 +2551,7 @@ static void AskRecordBattle(void) { // Other battlers may be recording, wait for them SetLinkStandbyCallback(); - BattlePutTextOnWindow(gText_LinkStandby3, 0); + BattlePutTextOnWindow(gText_LinkStandby3, B_WIN_MSG); } gBattleCommunication[MULTIUSE_STATE]++; // STATE_END_RECORD_NO } @@ -2582,32 +2582,32 @@ static void AskRecordBattle(void) { PlaySE(SE_SAVE); BattleStringExpandPlaceholdersToDisplayedString(gText_BattleRecordedOnPass); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattleCommunication[1] = 128; // Delay gBattleCommunication[MULTIUSE_STATE]++; } else { BattleStringExpandPlaceholdersToDisplayedString(BattleFrontier_BattleTowerBattleRoom_Text_RecordCouldntBeSaved); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattleCommunication[1] = 128; // Delay gBattleCommunication[MULTIUSE_STATE]++; } break; case STATE_RECORD_WAIT: - if (IsLinkTaskFinished() == TRUE && !IsTextPrinterActive(0) && --gBattleCommunication[1] == 0) + if (IsLinkTaskFinished() == TRUE && !IsTextPrinterActive(B_WIN_MSG) && --gBattleCommunication[1] == 0) { if (gMain.anyLinkBattlerHasFrontierPass) { SetLinkStandbyCallback(); - BattlePutTextOnWindow(gText_LinkStandby3, 0); + BattlePutTextOnWindow(gText_LinkStandby3, B_WIN_MSG); } gBattleCommunication[MULTIUSE_STATE]++; } break; case STATE_END_RECORD_YES: case STATE_END_RECORD_NO: - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) { if (gMain.anyLinkBattlerHasFrontierPass) { @@ -3866,7 +3866,7 @@ static void TryDoEventsBeforeFirstTurn(void) TurnValuesCleanUp(FALSE); SpecialStatusesClear(); *(&gBattleStruct->field_91) = gAbsentBattlerFlags; - BattlePutTextOnWindow(gText_EmptyString3, 0); + BattlePutTextOnWindow(gText_EmptyString3, B_WIN_MSG); gBattleMainFunc = HandleTurnActionSelectionState; ResetSentPokesToOpponentValue(); @@ -3973,7 +3973,7 @@ void BattleTurnPassed(void) *(gBattleStruct->monToSwitchIntoId + i) = PARTY_SIZE; *(&gBattleStruct->field_91) = gAbsentBattlerFlags; - BattlePutTextOnWindow(gText_EmptyString3, 0); + BattlePutTextOnWindow(gText_EmptyString3, B_WIN_MSG); gBattleMainFunc = HandleTurnActionSelectionState; gRandomTurnNumber = Random(); diff --git a/src/battle_message.c b/src/battle_message.c index 1dbe0a2dd3..b69a171a13 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1480,8 +1480,7 @@ static const u8 sDummyWeirdStatusString[] = {EOS, EOS, EOS, EOS, EOS, EOS, EOS, static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = { -// The corresponding WindowTemplate is gStandardBattleWindowTemplates[] within src/battle_bg.c - { // 0 Standard battle message + [B_WIN_MSG] = { .fillValue = PIXEL_FILL(0xF), .fontId = 1, .x = 0, @@ -1489,11 +1488,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 1, - .fgColor = 1, - .bgColor = 15, - .shadowColor = 6, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_DYNAMIC_COLOR_6, + .shadowColor = TEXT_COLOR_GREEN, }, - { // 1 "What will (pokemon) do?" + [B_WIN_ACTION_PROMPT] = { .fillValue = PIXEL_FILL(0xF), .fontId = 1, .x = 1, @@ -1501,11 +1500,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 1, - .bgColor = 15, - .shadowColor = 6, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_DYNAMIC_COLOR_6, + .shadowColor = TEXT_COLOR_GREEN, }, - { // 2 "Fight/Pokemon/Bag/Run" + [B_WIN_ACTION_MENU] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, @@ -1513,11 +1512,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 3 Top left move + [B_WIN_MOVE_NAME_1] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1525,11 +1524,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 4 Top right move + [B_WIN_MOVE_NAME_2] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1537,11 +1536,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 5 Bottom left move + [B_WIN_MOVE_NAME_3] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1549,11 +1548,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 6 Bottom right move + [B_WIN_MOVE_NAME_4] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1561,11 +1560,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 7 "PP" + [B_WIN_PP] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1573,11 +1572,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 12, - .bgColor = 14, - .shadowColor = 11, + .fgColor = TEXT_DYNAMIC_COLOR_3, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_2, }, - { // 8 + [B_WIN_DUMMY] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, @@ -1585,11 +1584,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 9 PP remaining + [B_WIN_PP_REMAINING] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 2, @@ -1597,11 +1596,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 12, - .bgColor = 14, - .shadowColor = 11, + .fgColor = TEXT_DYNAMIC_COLOR_3, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_2, }, - { // 10 "type" + [B_WIN_MOVE_TYPE] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1609,11 +1608,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 11 "switch which?" + [B_WIN_SWITCH_PROMPT] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1621,11 +1620,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 12 "gText_BattleYesNoChoice" + [B_WIN_YESNO] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, @@ -1633,11 +1632,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 13 + [B_WIN_LEVEL_UP_BOX] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, @@ -1645,11 +1644,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 14 + [B_WIN_LEVEL_UP_BANNER] = { .fillValue = PIXEL_FILL(0), .fontId = 1, .x = 32, @@ -1657,11 +1656,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 1, - .bgColor = 0, - .shadowColor = 2, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_COLOR_TRANSPARENT, + .shadowColor = TEXT_COLOR_DARK_GRAY, }, - { // 15 + [B_WIN_VS_PLAYER] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1669,11 +1668,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 16 + [B_WIN_VS_OPPONENT] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1681,11 +1680,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 17 + [B_WIN_VS_MULTI_PLAYER_1] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1693,11 +1692,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 18 + [B_WIN_VS_MULTI_PLAYER_2] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1705,11 +1704,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 19 + [B_WIN_VS_MULTI_PLAYER_3] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1717,11 +1716,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 20 + [B_WIN_VS_MULTI_PLAYER_4] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1729,11 +1728,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 21 + [B_WIN_VS_OUTCOME_DRAW] = { .fillValue = PIXEL_FILL(0), .fontId = 1, .x = -1, @@ -1741,11 +1740,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 1, - .bgColor = 0, - .shadowColor = 6, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_COLOR_TRANSPARENT, + .shadowColor = TEXT_COLOR_GREEN, }, - { // 22 + [B_WIN_VS_OUTCOME_LEFT] = { .fillValue = PIXEL_FILL(0), .fontId = 1, .x = -1, @@ -1753,11 +1752,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 1, - .bgColor = 0, - .shadowColor = 6, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_COLOR_TRANSPARENT, + .shadowColor = TEXT_COLOR_GREEN, }, - { // 23 + [B_WIN_VS_OUTCOME_RIGHT] = { .fillValue = PIXEL_FILL(0x0), .fontId = 1, .x = -1, @@ -1765,15 +1764,15 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 1, - .bgColor = 0, - .shadowColor = 6, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_COLOR_TRANSPARENT, + .shadowColor = TEXT_COLOR_GREEN, }, }; static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = { - { // 0 + [B_WIN_MSG] = { .fillValue = PIXEL_FILL(0xF), .fontId = 1, .x = 0, @@ -1781,11 +1780,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 1, - .fgColor = 1, - .bgColor = 15, - .shadowColor = 6, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_DYNAMIC_COLOR_6, + .shadowColor = TEXT_COLOR_GREEN, }, - { // 1 + [B_WIN_ACTION_PROMPT] = { .fillValue = PIXEL_FILL(0xF), .fontId = 1, .x = 1, @@ -1793,11 +1792,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 1, - .bgColor = 15, - .shadowColor = 6, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_DYNAMIC_COLOR_6, + .shadowColor = TEXT_COLOR_GREEN, }, - { // 2 + [B_WIN_ACTION_MENU] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, @@ -1805,11 +1804,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 3 + [B_WIN_MOVE_NAME_1] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1817,11 +1816,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 4 + [B_WIN_MOVE_NAME_2] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1829,11 +1828,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 5 + [B_WIN_MOVE_NAME_3] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1841,11 +1840,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 6 + [B_WIN_MOVE_NAME_4] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1853,11 +1852,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 7 + [B_WIN_PP] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1865,11 +1864,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 12, - .bgColor = 14, - .shadowColor = 11, + .fgColor = TEXT_DYNAMIC_COLOR_3, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_2, }, - { // 8 + [B_WIN_DUMMY] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, @@ -1877,11 +1876,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 9 + [B_WIN_PP_REMAINING] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 2, @@ -1889,11 +1888,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 12, - .bgColor = 14, - .shadowColor = 11, + .fgColor = TEXT_DYNAMIC_COLOR_3, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_2, }, - { // 10 + [B_WIN_MOVE_TYPE] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1901,11 +1900,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 11 + [B_WIN_SWITCH_PROMPT] = { .fillValue = PIXEL_FILL(0xE), .fontId = 7, .x = 0, @@ -1913,11 +1912,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 12 + [B_WIN_YESNO] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, @@ -1925,11 +1924,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 13 + [B_WIN_LEVEL_UP_BOX] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = 0, @@ -1937,11 +1936,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 14 + [B_WIN_LEVEL_UP_BANNER] = { .fillValue = PIXEL_FILL(0), .fontId = 1, .x = 32, @@ -1949,11 +1948,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 1, - .bgColor = 0, - .shadowColor = 2, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_COLOR_TRANSPARENT, + .shadowColor = TEXT_COLOR_DARK_GRAY, }, - { // 15 + [ARENA_WIN_PLAYER_NAME] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1961,11 +1960,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 1, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_COLOR_WHITE, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 16 + [ARENA_WIN_VS] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1973,11 +1972,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 17 + [ARENA_WIN_OPPONENT_NAME] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1985,11 +1984,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 18 + [ARENA_WIN_MIND] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -1997,11 +1996,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 19 + [ARENA_WIN_SKILL] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -2009,11 +2008,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 20 + [ARENA_WIN_BODY] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -2021,11 +2020,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 21 + [ARENA_WIN_JUDGEMENT_TITLE] = { .fillValue = PIXEL_FILL(0xE), .fontId = 1, .x = -1, @@ -2033,11 +2032,11 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 0, - .fgColor = 13, - .bgColor = 14, - .shadowColor = 15, + .fgColor = TEXT_DYNAMIC_COLOR_4, + .bgColor = TEXT_DYNAMIC_COLOR_5, + .shadowColor = TEXT_DYNAMIC_COLOR_6, }, - { // 22 + [ARENA_WIN_JUDGEMENT_TEXT] = { .fillValue = PIXEL_FILL(0x1), .fontId = 1, .x = 0, @@ -2045,9 +2044,9 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = .letterSpacing = 0, .lineSpacing = 0, .speed = 1, - .fgColor = 2, - .bgColor = 1, - .shadowColor = 3, + .fgColor = TEXT_COLOR_DARK_GRAY, + .bgColor = TEXT_COLOR_WHITE, + .shadowColor = TEXT_COLOR_LIGHT_GRAY, }, }; @@ -3055,9 +3054,9 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId) struct TextPrinterTemplate printerTemplate; u8 speed; - if (windowId & 0x80) + if (windowId & B_WIN_COPYTOVRAM) { - windowId &= ~(0x80); + windowId &= ~B_WIN_COPYTOVRAM; copyToVram = FALSE; } else @@ -3087,17 +3086,17 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId) printerTemplate.x = printerTemplate.currentX = alignX; } - if (windowId == 0x16) - gTextFlags.useAlternateDownArrow = 0; + if (windowId == ARENA_WIN_JUDGEMENT_TEXT) + gTextFlags.useAlternateDownArrow = FALSE; else - gTextFlags.useAlternateDownArrow = 1; + gTextFlags.useAlternateDownArrow = TRUE; if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED)) - gTextFlags.autoScroll = 1; + gTextFlags.autoScroll = TRUE; else - gTextFlags.autoScroll = 0; + gTextFlags.autoScroll = FALSE; - if (windowId == 0 || windowId == 0x16) + if (windowId == B_WIN_MSG || windowId == ARENA_WIN_JUDGEMENT_TEXT) { if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)) speed = 1; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 92f9764728..b564fe6801 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -53,28 +53,29 @@ #include "data.h" #include "constants/party_menu.h" -extern struct MusicPlayerInfo gMPlayInfo_BGM; - extern const u8* const gBattleScriptsForMoveEffects[]; #define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected) && (gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED)) -// this file's functions +#define LEVEL_UP_BANNER_START 416 +#define LEVEL_UP_BANNER_END 512 + +#define TAG_LVLUP_BANNER_MON_ICON 55130 + static bool8 IsTwoTurnsMove(u16 move); static void TrySetDestinyBondToHappen(void); static u8 AttacksThisTurn(u8 battlerId, u16 move); // Note: returns 1 if it's a charging turn, otherwise 2. static void CheckWonderGuardAndLevitate(void); static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8, const u8* BS_ptr); static bool32 IsMonGettingExpSentOut(void); -static void sub_804F17C(void); -static bool8 sub_804F1CC(void); +static void InitLevelUpBanner(void); +static bool8 SlideInLevelUpBanner(void); +static bool8 SlideOutLevelUpBanner(void); static void DrawLevelUpWindow1(void); static void DrawLevelUpWindow2(void); -static bool8 sub_804F344(void); -static void PutMonIconOnLvlUpBox(void); -static void PutLevelAndGenderOnLvlUpBox(void); - -static void SpriteCB_MonIconOnLvlUpBox(struct Sprite* sprite); +static void PutMonIconOnLvlUpBanner(void); +static void DrawLevelUpBannerText(void); +static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite* sprite); static void Cmd_attackcanceler(void); static void Cmd_accuracycheck(void); @@ -667,10 +668,18 @@ static const u8* const sMoveEffectBS_Ptrs[] = [MOVE_EFFECT_RECOIL_33] = BattleScript_MoveEffectRecoil, }; -static const struct WindowTemplate sUnusedWinTemplate = {0, 1, 3, 7, 0xF, 0x1F, 0x3F}; +static const struct WindowTemplate sUnusedWinTemplate = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 3, + .width = 7, + .height = 15, + .paletteNum = 31, + .baseBlock = 0x3F +}; -static const u16 sUnknown_0831C2C8[] = INCBIN_U16("graphics/battle_interface/unk_battlebox.gbapal"); -static const u32 sUnknown_0831C2E8[] = INCBIN_U32("graphics/battle_interface/unk_battlebox.4bpp.lz"); +static const u16 sLevelUpBanner_Pal[] = INCBIN_U16("graphics/battle_interface/level_up_banner.gbapal"); +static const u32 sLevelUpBanner_Gfx[] = INCBIN_U32("graphics/battle_interface/level_up_banner.4bpp.lz"); // unused static const u8 sRubyLevelUpStatBoxStats[] = @@ -679,9 +688,7 @@ static const u8 sRubyLevelUpStatBoxStats[] = MON_DATA_SPDEF, MON_DATA_DEF, MON_DATA_SPEED }; -#define MON_ICON_LVLUP_BOX_TAG 0xD75A - -static const struct OamData sOamData_MonIconOnLvlUpBox = +static const struct OamData sOamData_MonIconOnLvlUpBanner = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -698,15 +705,15 @@ static const struct OamData sOamData_MonIconOnLvlUpBox = .affineParam = 0, }; -static const struct SpriteTemplate sSpriteTemplate_MonIconOnLvlUpBox = +static const struct SpriteTemplate sSpriteTemplate_MonIconOnLvlUpBanner = { - .tileTag = MON_ICON_LVLUP_BOX_TAG, - .paletteTag = MON_ICON_LVLUP_BOX_TAG, - .oam = &sOamData_MonIconOnLvlUpBox, + .tileTag = TAG_LVLUP_BANNER_MON_ICON, + .paletteTag = TAG_LVLUP_BANNER_MON_ICON, + .oam = &sOamData_MonIconOnLvlUpBanner, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCB_MonIconOnLvlUpBox + .callback = SpriteCB_MonIconOnLvlUpBanner }; static const u16 sProtectSuccessRates[] = {USHRT_MAX, USHRT_MAX / 2, USHRT_MAX / 4, USHRT_MAX / 8}; @@ -2971,13 +2978,13 @@ static void Cmd_tryfaintmon(void) if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) { gHitMarker |= HITMARKER_PLAYER_FAINTED; - if (gBattleResults.playerFaintCounter < 0xFF) + if (gBattleResults.playerFaintCounter < 255) gBattleResults.playerFaintCounter++; AdjustFriendshipOnBattleFaint(gActiveBattler); } else { - if (gBattleResults.opponentFaintCounter < 0xFF) + if (gBattleResults.opponentFaintCounter < 255) gBattleResults.opponentFaintCounter++; gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES, NULL); } @@ -3033,7 +3040,7 @@ static void Cmd_cleareffectsonfaint(void) if (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || gBattleMons[gActiveBattler].hp == 0) { gBattleMons[gActiveBattler].status1 = 0; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 0x4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); } @@ -3765,9 +3772,7 @@ static void Cmd_jumpifarraynotequal(void) for (i = 0; i < size; i++) { if (*mem1 == *mem2) - { equalBytes++; - } mem1++, mem2++; } @@ -3807,9 +3812,7 @@ static void Cmd_copyarray(void) s32 i; for (i = 0; i < size; i++) - { dest[i] = src[i]; - } gBattlescriptCurrInstr += 10; } @@ -3823,9 +3826,7 @@ static void Cmd_copyarraywithindex(void) s32 i; for (i = 0; i < size; i++) - { dest[i] = src[i + *index]; - } gBattlescriptCurrInstr += 14; } @@ -4591,9 +4592,7 @@ static void Cmd_switchindataupdate(void) monData = (u8*)(&gBattleMons[gActiveBattler]); for (i = 0; i < sizeof(struct BattlePokemon); i++) - { monData[i] = gBattleBufferB[gActiveBattler][4 + i]; - } gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; @@ -4681,9 +4680,9 @@ static void Cmd_jumpifcantswitch(void) lastMonId = 0; if (gActiveBattler & 2) - lastMonId = 3; + lastMonId = MULTI_PARTY_SIZE; - for (i = lastMonId; i < lastMonId + 3; i++) + for (i = lastMonId; i < lastMonId + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE && !GetMonData(&party[i], MON_DATA_IS_EGG) @@ -4692,7 +4691,7 @@ static void Cmd_jumpifcantswitch(void) break; } - if (i == lastMonId + 3) + if (i == lastMonId + MULTI_PARTY_SIZE) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); else gBattlescriptCurrInstr += 6; @@ -4707,7 +4706,7 @@ static void Cmd_jumpifcantswitch(void) lastMonId = 0; if (GetLinkTrainerFlankId(GetBattlerMultiplayerId(gActiveBattler)) == TRUE) - lastMonId = 3; + lastMonId = MULTI_PARTY_SIZE; } else { @@ -4716,7 +4715,7 @@ static void Cmd_jumpifcantswitch(void) if (gActiveBattler == 1) lastMonId = 0; else - lastMonId = 3; + lastMonId = MULTI_PARTY_SIZE; } } else @@ -4728,10 +4727,10 @@ static void Cmd_jumpifcantswitch(void) lastMonId = 0; if (GetLinkTrainerFlankId(GetBattlerMultiplayerId(gActiveBattler)) == TRUE) - lastMonId = 3; + lastMonId = MULTI_PARTY_SIZE; } - for (i = lastMonId; i < lastMonId + 3; i++) + for (i = lastMonId; i < lastMonId + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE && !GetMonData(&party[i], MON_DATA_IS_EGG) @@ -4740,7 +4739,7 @@ static void Cmd_jumpifcantswitch(void) break; } - if (i == lastMonId + 3) + if (i == lastMonId + MULTI_PARTY_SIZE) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); else gBattlescriptCurrInstr += 6; @@ -4751,9 +4750,9 @@ static void Cmd_jumpifcantswitch(void) lastMonId = 0; if (gActiveBattler == B_POSITION_OPPONENT_RIGHT) - lastMonId = 3; + lastMonId = PARTY_SIZE / 2; - for (i = lastMonId; i < lastMonId + 3; i++) + for (i = lastMonId; i < lastMonId + (PARTY_SIZE / 2); i++) { if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE && !GetMonData(&party[i], MON_DATA_IS_EGG) @@ -4762,7 +4761,7 @@ static void Cmd_jumpifcantswitch(void) break; } - if (i == lastMonId + 3) + if (i == lastMonId + (PARTY_SIZE / 2)) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2); else gBattlescriptCurrInstr += 6; @@ -5080,7 +5079,7 @@ static void Cmd_openpartyscreen(void) gBattlescriptCurrInstr += 6; - if (GetBattlerPosition(gActiveBattler) == 0 && gBattleResults.playerSwitchesCounter < 0xFF) + if (GetBattlerPosition(gActiveBattler) == 0 && gBattleResults.playerSwitchesCounter < 255) gBattleResults.playerSwitchesCounter++; if (gBattleTypeFlags & BATTLE_TYPE_MULTI) @@ -5120,7 +5119,7 @@ static void Cmd_switchhandleorder(void) case 0: for (i = 0; i < gBattlersCount; i++) { - if (gBattleBufferB[i][0] == 0x22) + if (gBattleBufferB[i][0] == CONTROLLER_CHOSENMONRETURNVALUE) { *(gBattleStruct->monToSwitchIntoId + i) = gBattleBufferB[i][1]; if (!(gBattleStruct->field_93 & gBitTable[i])) @@ -5357,8 +5356,8 @@ static void Cmd_yesnoboxlearnmove(void) switch (gBattleScripting.learnMoveState) { case 0: - HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0); - BattlePutTextOnWindow(gText_BattleYesNoChoice, 0xC); + HandleBattleWindow(24, 8, 29, 13, 0); + BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO); gBattleScripting.learnMoveState++; gBattleCommunication[CURSOR_POSITION] = 0; BattleCreateYesNoCursorAt(0); @@ -5383,8 +5382,8 @@ static void Cmd_yesnoboxlearnmove(void) PlaySE(SE_SELECT); if (gBattleCommunication[1] == 0) { - HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, WINDOW_CLEAR); - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); + HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR); + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); gBattleScripting.learnMoveState++; } else @@ -5457,7 +5456,7 @@ static void Cmd_yesnoboxlearnmove(void) } break; case 5: - HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR); + HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR); gBattlescriptCurrInstr += 5; break; case 6: @@ -5474,8 +5473,8 @@ static void Cmd_yesnoboxstoplearningmove(void) switch (gBattleScripting.learnMoveState) { case 0: - HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0); - BattlePutTextOnWindow(gText_BattleYesNoChoice, 0xC); + HandleBattleWindow(24, 8, 29, 13, 0); + BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO); gBattleScripting.learnMoveState++; gBattleCommunication[CURSOR_POSITION] = 0; BattleCreateYesNoCursorAt(0); @@ -5504,13 +5503,13 @@ static void Cmd_yesnoboxstoplearningmove(void) else gBattlescriptCurrInstr += 5; - HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, WINDOW_CLEAR); + HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR); } else if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); - HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, WINDOW_CLEAR); + HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR); } break; } @@ -5769,8 +5768,8 @@ static void Cmd_yesnobox(void) switch (gBattleCommunication[0]) { case 0: - HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0); - BattlePutTextOnWindow(gText_BattleYesNoChoice, 0xC); + HandleBattleWindow(24, 8, 29, 13, 0); + BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO); gBattleCommunication[0]++; gBattleCommunication[CURSOR_POSITION] = 0; BattleCreateYesNoCursorAt(0); @@ -5794,13 +5793,13 @@ static void Cmd_yesnobox(void) { gBattleCommunication[CURSOR_POSITION] = 1; PlaySE(SE_SELECT); - HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR); + HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR); gBattlescriptCurrInstr++; } else if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); - HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR); + HandleBattleWindow(24, 8, 29, 13, WINDOW_CLEAR); gBattlescriptCurrInstr++; } break; @@ -5884,6 +5883,9 @@ static void Cmd_drawlvlupbox(void) { if (gBattleScripting.drawlvlupboxState == 0) { + // If the Pokémon getting exp is not in-battle then + // slide out a banner with their name and icon on it. + // Otherwise skip ahead. if (IsMonGettingExpSentOut()) gBattleScripting.drawlvlupboxState = 3; else @@ -5893,34 +5895,38 @@ static void Cmd_drawlvlupbox(void) switch (gBattleScripting.drawlvlupboxState) { case 1: - gBattle_BG2_Y = 0x60; + // Start level up banner + gBattle_BG2_Y = 96; SetBgAttribute(2, BG_ATTR_PRIORITY, 0); ShowBg(2); - sub_804F17C(); + InitLevelUpBanner(); gBattleScripting.drawlvlupboxState = 2; break; case 2: - if (!sub_804F1CC()) + if (!SlideInLevelUpBanner()) gBattleScripting.drawlvlupboxState = 3; break; case 3: + // Init level up box gBattle_BG1_X = 0; - gBattle_BG1_Y = 0x100; + gBattle_BG1_Y = 256; SetBgAttribute(0, BG_ATTR_PRIORITY, 1); SetBgAttribute(1, BG_ATTR_PRIORITY, 0); ShowBg(0); ShowBg(1); - HandleBattleWindow(0x12, 7, 0x1D, 0x13, WINDOW_x80); + HandleBattleWindow(18, 7, 29, 19, WINDOW_BG1); gBattleScripting.drawlvlupboxState = 4; break; case 4: + // Draw page 1 of level up box DrawLevelUpWindow1(); - PutWindowTilemap(13); - CopyWindowToVram(13, 3); + PutWindowTilemap(B_WIN_LEVEL_UP_BOX); + CopyWindowToVram(B_WIN_LEVEL_UP_BOX, 3); gBattleScripting.drawlvlupboxState++; break; case 5: case 7: + // Wait for draw after each page if (!IsDma3ManagerBusyWithBgCopy()) { gBattle_BG1_Y = 0; @@ -5930,28 +5936,30 @@ static void Cmd_drawlvlupbox(void) case 6: if (gMain.newKeys != 0) { + // Draw page 2 of level up box PlaySE(SE_SELECT); DrawLevelUpWindow2(); - CopyWindowToVram(13, 2); + CopyWindowToVram(B_WIN_LEVEL_UP_BOX, 2); gBattleScripting.drawlvlupboxState++; } break; case 8: if (gMain.newKeys != 0) { + // Close level up box PlaySE(SE_SELECT); - HandleBattleWindow(0x12, 7, 0x1D, 0x13, WINDOW_x80 | WINDOW_CLEAR); + HandleBattleWindow(18, 7, 29, 19, WINDOW_BG1 | WINDOW_CLEAR); gBattleScripting.drawlvlupboxState++; } break; case 9: - if (!sub_804F344()) + if (!SlideOutLevelUpBanner()) { - ClearWindowTilemap(14); - CopyWindowToVram(14, 1); + ClearWindowTilemap(B_WIN_LEVEL_UP_BANNER); + CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, 1); - ClearWindowTilemap(13); - CopyWindowToVram(13, 1); + ClearWindowTilemap(B_WIN_LEVEL_UP_BOX); + CopyWindowToVram(B_WIN_LEVEL_UP_BOX, 1); SetBgAttribute(2, BG_ATTR_PRIORITY, 2); ShowBg(2); @@ -5977,7 +5985,7 @@ static void DrawLevelUpWindow1(void) u16 currStats[NUM_STATS]; GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], currStats); - DrawLevelUpWindowPg1(0xD, gBattleResources->beforeLvlUp->stats, currStats, TEXT_DYNAMIC_COLOR_5, TEXT_DYNAMIC_COLOR_4, TEXT_DYNAMIC_COLOR_6); + DrawLevelUpWindowPg1(B_WIN_LEVEL_UP_BOX, gBattleResources->beforeLvlUp->stats, currStats, TEXT_DYNAMIC_COLOR_5, TEXT_DYNAMIC_COLOR_4, TEXT_DYNAMIC_COLOR_6); } static void DrawLevelUpWindow2(void) @@ -5985,41 +5993,41 @@ static void DrawLevelUpWindow2(void) u16 currStats[NUM_STATS]; GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], currStats); - DrawLevelUpWindowPg2(0xD, currStats, TEXT_DYNAMIC_COLOR_5, TEXT_DYNAMIC_COLOR_4, TEXT_DYNAMIC_COLOR_6); + DrawLevelUpWindowPg2(B_WIN_LEVEL_UP_BOX, currStats, TEXT_DYNAMIC_COLOR_5, TEXT_DYNAMIC_COLOR_4, TEXT_DYNAMIC_COLOR_6); } -static void sub_804F17C(void) +static void InitLevelUpBanner(void) { gBattle_BG2_Y = 0; - gBattle_BG2_X = 0x1A0; + gBattle_BG2_X = LEVEL_UP_BANNER_START; - LoadPalette(sUnknown_0831C2C8, 0x60, 0x20); - CopyToWindowPixelBuffer(14, sUnknown_0831C2E8, 0, 0); - PutWindowTilemap(14); - CopyWindowToVram(14, 3); + LoadPalette(sLevelUpBanner_Pal, 0x60, 0x20); + CopyToWindowPixelBuffer(B_WIN_LEVEL_UP_BANNER, sLevelUpBanner_Gfx, 0, 0); + PutWindowTilemap(B_WIN_LEVEL_UP_BANNER); + CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, 3); - PutMonIconOnLvlUpBox(); + PutMonIconOnLvlUpBanner(); } -static bool8 sub_804F1CC(void) +static bool8 SlideInLevelUpBanner(void) { if (IsDma3ManagerBusyWithBgCopy()) return TRUE; - if (gBattle_BG2_X == 0x200) + if (gBattle_BG2_X == LEVEL_UP_BANNER_END) return FALSE; - if (gBattle_BG2_X == 0x1A0) - PutLevelAndGenderOnLvlUpBox(); + if (gBattle_BG2_X == LEVEL_UP_BANNER_START) + DrawLevelUpBannerText(); gBattle_BG2_X += 8; - if (gBattle_BG2_X >= 0x200) - gBattle_BG2_X = 0x200; + if (gBattle_BG2_X >= LEVEL_UP_BANNER_END) + gBattle_BG2_X = LEVEL_UP_BANNER_END; - return (gBattle_BG2_X != 0x200); + return (gBattle_BG2_X != LEVEL_UP_BANNER_END); } -static void PutLevelAndGenderOnLvlUpBox(void) +static void DrawLevelUpBannerText(void) { u16 monLevel; u8 monGender; @@ -6032,7 +6040,7 @@ static void PutLevelAndGenderOnLvlUpBox(void) GetMonNickname(&gPlayerParty[gBattleStruct->expGetterMonId], gStringVar4); printerTemplate.currentChar = gStringVar4; - printerTemplate.windowId = 14; + printerTemplate.windowId = B_WIN_LEVEL_UP_BANNER; printerTemplate.fontId = 0; printerTemplate.x = 32; printerTemplate.y = 0; @@ -6045,7 +6053,7 @@ static void PutLevelAndGenderOnLvlUpBox(void) printerTemplate.bgColor = TEXT_COLOR_TRANSPARENT; printerTemplate.shadowColor = TEXT_COLOR_DARK_GRAY; - AddTextPrinter(&printerTemplate, 0xFF, NULL); + AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL); txtPtr = gStringVar4; *(txtPtr)++ = CHAR_EXTRA_SYMBOL; @@ -6060,14 +6068,14 @@ static void PutLevelAndGenderOnLvlUpBox(void) { if (monGender == MON_MALE) { - txtPtr = WriteColorChangeControlCode(txtPtr, 0, 0xC); - txtPtr = WriteColorChangeControlCode(txtPtr, 1, 0xD); + txtPtr = WriteColorChangeControlCode(txtPtr, 0, TEXT_DYNAMIC_COLOR_3); + txtPtr = WriteColorChangeControlCode(txtPtr, 1, TEXT_DYNAMIC_COLOR_4); *(txtPtr++) = CHAR_MALE; } else { - txtPtr = WriteColorChangeControlCode(txtPtr, 0, 0xE); - txtPtr = WriteColorChangeControlCode(txtPtr, 1, 0xF); + txtPtr = WriteColorChangeControlCode(txtPtr, 0, TEXT_DYNAMIC_COLOR_5); + txtPtr = WriteColorChangeControlCode(txtPtr, 1, TEXT_DYNAMIC_COLOR_6); *(txtPtr++) = CHAR_FEMALE; } *(txtPtr++) = EOS; @@ -6075,28 +6083,28 @@ static void PutLevelAndGenderOnLvlUpBox(void) printerTemplate.y = 10; printerTemplate.currentY = 10; - AddTextPrinter(&printerTemplate, 0xFF, NULL); + AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL); - CopyWindowToVram(14, 2); + CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, 2); } -static bool8 sub_804F344(void) +static bool8 SlideOutLevelUpBanner(void) { - if (gBattle_BG2_X == 0x1A0) + if (gBattle_BG2_X == LEVEL_UP_BANNER_START) return FALSE; - if (gBattle_BG2_X - 16 < 0x1A0) - gBattle_BG2_X = 0x1A0; + if (gBattle_BG2_X - 16 < LEVEL_UP_BANNER_START) + gBattle_BG2_X = LEVEL_UP_BANNER_START; else gBattle_BG2_X -= 16; - return (gBattle_BG2_X != 0x1A0); + return (gBattle_BG2_X != LEVEL_UP_BANNER_START); } -#define sDestroy data[0] -#define sSavedLvlUpBoxXPosition data[1] +#define sDestroy data[0] +#define sXOffset data[1] -static void PutMonIconOnLvlUpBox(void) +static void PutMonIconOnLvlUpBanner(void) { u8 spriteId; const u16* iconPal; @@ -6109,23 +6117,23 @@ static void PutMonIconOnLvlUpBox(void) const u8* iconPtr = GetMonIconPtr(species, personality, 1); iconSheet.data = iconPtr; iconSheet.size = 0x200; - iconSheet.tag = MON_ICON_LVLUP_BOX_TAG; + iconSheet.tag = TAG_LVLUP_BANNER_MON_ICON; iconPal = GetValidMonIconPalettePtr(species); iconPalSheet.data = iconPal; - iconPalSheet.tag = MON_ICON_LVLUP_BOX_TAG; + iconPalSheet.tag = TAG_LVLUP_BANNER_MON_ICON; LoadSpriteSheet(&iconSheet); LoadSpritePalette(&iconPalSheet); - spriteId = CreateSprite(&sSpriteTemplate_MonIconOnLvlUpBox, 256, 10, 0); + spriteId = CreateSprite(&sSpriteTemplate_MonIconOnLvlUpBanner, 256, 10, 0); gSprites[spriteId].sDestroy = FALSE; - gSprites[spriteId].sSavedLvlUpBoxXPosition = gBattle_BG2_X; + gSprites[spriteId].sXOffset = gBattle_BG2_X; } -static void SpriteCB_MonIconOnLvlUpBox(struct Sprite* sprite) +static void SpriteCB_MonIconOnLvlUpBanner(struct Sprite* sprite) { - sprite->x2 = sprite->sSavedLvlUpBoxXPosition - gBattle_BG2_X; + sprite->x2 = sprite->sXOffset - gBattle_BG2_X; if (sprite->x2 != 0) { @@ -6134,13 +6142,13 @@ static void SpriteCB_MonIconOnLvlUpBox(struct Sprite* sprite) else if (sprite->sDestroy) { DestroySprite(sprite); - FreeSpriteTilesByTag(MON_ICON_LVLUP_BOX_TAG); - FreeSpritePaletteByTag(MON_ICON_LVLUP_BOX_TAG); + FreeSpriteTilesByTag(TAG_LVLUP_BANNER_MON_ICON); + FreeSpritePaletteByTag(TAG_LVLUP_BANNER_MON_ICON); } } #undef sDestroy -#undef sSavedLvlUpBoxXPosition +#undef sXOffset static bool32 IsMonGettingExpSentOut(void) { @@ -6389,10 +6397,10 @@ static void Cmd_various(void) break; case VARIOUS_ARENA_JUDGMENT_STRING: BattleStringExpandPlaceholdersToDisplayedString(gRefereeStringsTable[gBattlescriptCurrInstr[1]]); - BattlePutTextOnWindow(gDisplayedStringBattle, 22); + BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TEXT); break; case VARIOUS_ARENA_WAIT_STRING: - if (IsTextPrinterActive(22)) + if (IsTextPrinterActive(ARENA_WIN_JUDGEMENT_TEXT)) return; break; case VARIOUS_WAIT_CRY: @@ -7828,7 +7836,7 @@ static void Cmd_psywavedamageeffect(void) { s32 randDamage; - while ((randDamage = (Random() & 0xF)) > 10); + while ((randDamage = Random() % 16) > 10); randDamage *= 10; gBattleMoveDamage = gBattleMons[gBattlerAttacker].level * (randDamage + 50) / 100; @@ -7966,8 +7974,8 @@ static void Cmd_painsplitdmgcalc(void) static void Cmd_settypetorandomresistance(void) // conversion 2 { - if (gLastLandedMoves[gBattlerAttacker] == 0 - || gLastLandedMoves[gBattlerAttacker] == 0xFFFF) + if (gLastLandedMoves[gBattlerAttacker] == MOVE_NONE + || gLastLandedMoves[gBattlerAttacker] == 0xFFFF) { gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); } @@ -7982,7 +7990,7 @@ static void Cmd_settypetorandomresistance(void) // conversion 2 for (rands = 0; rands < 1000; rands++) { - while (((i = (Random() & 0x7F)) > sizeof(gTypeEffectiveness) / 3)); + while (((i = Random() % 128) > sizeof(gTypeEffectiveness) / 3)); i *= 3; @@ -8145,7 +8153,7 @@ static void Cmd_trychoosesleeptalkmove(void) } unusableMovesBits = CheckMoveLimitations(gBattlerAttacker, unusableMovesBits, ~MOVE_LIMITATION_PP); - if (unusableMovesBits == 0xF) // all 4 moves cannot be chosen + if (unusableMovesBits == (1 << MAX_MON_MOVES) - 1) // all 4 moves cannot be chosen { gBattlescriptCurrInstr += 5; } @@ -8329,7 +8337,7 @@ static void Cmd_healpartystatus(void) else // Aromatherapy { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SOOTHING_AROMA; - toHeal = 0x3F; + toHeal = (1 << PARTY_SIZE) - 1; gBattleMons[gBattlerAttacker].status1 = 0; gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE; @@ -9959,7 +9967,7 @@ static void Cmd_displaydexinfo(void) switch (gBattleCommunication[0]) { case 0: - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); gBattleCommunication[0]++; break; case 1: @@ -9984,13 +9992,13 @@ static void Cmd_displaydexinfo(void) case 3: InitBattleBgsVideo(); LoadBattleTextboxAndBackground(); - gBattle_BG3_X = 0x100; + gBattle_BG3_X = 256; gBattleCommunication[0]++; break; case 4: if (!IsDma3ManagerBusyWithBgCopy()) { - BeginNormalPaletteFade(PALETTES_BG, 0, 0x10, 0, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_BG, 0, 16, 0, RGB_BLACK); ShowBg(0); ShowBg(3); gBattleCommunication[0]++; @@ -10043,7 +10051,7 @@ void HandleBattleWindow(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags) if (flags & WINDOW_CLEAR) var = 0; - if (flags & WINDOW_x80) + if (flags & WINDOW_BG1) CopyToBgTilemapBufferRect_ChangePalette(1, &var, destX, destY, 1, 1, 0x11); else CopyToBgTilemapBufferRect_ChangePalette(0, &var, destX, destY, 1, 1, 0x11); @@ -10076,8 +10084,8 @@ static void Cmd_trygivecaughtmonnick(void) switch (gBattleCommunication[MULTIUSE_STATE]) { case 0: - HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0); - BattlePutTextOnWindow(gText_BattleYesNoChoice, 0xC); + HandleBattleWindow(24, 8, 29, 13, 0); + BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO); gBattleCommunication[MULTIUSE_STATE]++; gBattleCommunication[CURSOR_POSITION] = 0; BattleCreateYesNoCursorAt(0); diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 91834876ff..1d583343f8 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -661,7 +661,7 @@ static void Task_EvolutionScene(u8 taskId) if (!gPaletteFade.active) { StringExpandPlaceholders(gStringVar4, gText_PkmnIsEvolving); - BattlePutTextOnWindow(gStringVar4, 0); + BattlePutTextOnWindow(gStringVar4, B_WIN_MSG); gTasks[taskId].tState++; } break; @@ -758,7 +758,7 @@ static void Task_EvolutionScene(u8 taskId) if (IsCryFinished()) { StringExpandPlaceholders(gStringVar4, gText_CongratsPkmnEvolved); - BattlePutTextOnWindow(gStringVar4, 0); + BattlePutTextOnWindow(gStringVar4, B_WIN_MSG); PlayBGM(MUS_EVOLVED); gTasks[taskId].tState++; SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskId].tPostEvoSpecies)); @@ -845,7 +845,7 @@ static void Task_EvolutionScene(u8 taskId) else // Fire Red leftover probably StringExpandPlaceholders(gStringVar4, gText_PkmnStoppedEvolving); - BattlePutTextOnWindow(gStringVar4, 0); + BattlePutTextOnWindow(gStringVar4, B_WIN_MSG); gTasks[taskId].tEvoWasStopped = TRUE; gTasks[taskId].tState = EVOSTATE_TRY_LEARN_MOVE; } @@ -856,7 +856,7 @@ static void Task_EvolutionScene(u8 taskId) BufferMoveToLearnIntoBattleTextBuff2(); PlayFanfare(MUS_LEVEL_UP); BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnsFirstMove = 0x40; // re-used as a counter gTasks[taskId].tState++; } @@ -874,7 +874,7 @@ static void Task_EvolutionScene(u8 taskId) // "{mon} is trying to learn {move}" BufferMoveToLearnIntoBattleTextBuff2(); BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState++; } break; @@ -883,7 +883,7 @@ static void Task_EvolutionScene(u8 taskId) { // "But, {mon} can't learn more than four moves" BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState++; } break; @@ -892,7 +892,7 @@ static void Task_EvolutionScene(u8 taskId) { // "Delete a move to make room for {move}?" BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveYesState = MVSTATE_SHOW_MOVE_SELECT; gTasks[taskId].tLearnMoveNoState = MVSTATE_ASK_CANCEL; gTasks[taskId].tLearnMoveState++; @@ -901,7 +901,7 @@ static void Task_EvolutionScene(u8 taskId) if (!IsTextPrinterActive(0) && !IsSEPlaying()) { HandleBattleWindow(0x18, 8, 0x1D, 0xD, 0); - BattlePutTextOnWindow(gText_BattleYesNoChoice, 0xC); + BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO); gTasks[taskId].tLearnMoveState++; sEvoCursorPos = 0; BattleCreateYesNoCursorAt(0); @@ -980,7 +980,7 @@ static void Task_EvolutionScene(u8 taskId) { // Can't forget HMs BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState = MVSTATE_RETRY_AFTER_HM; } else @@ -997,14 +997,14 @@ static void Task_EvolutionScene(u8 taskId) break; case MVSTATE_FORGET_MSG_1: BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState++; break; case MVSTATE_FORGET_MSG_2: if (!IsTextPrinterActive(0) && !IsSEPlaying()) { BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState++; } break; @@ -1012,20 +1012,20 @@ static void Task_EvolutionScene(u8 taskId) if (!IsTextPrinterActive(0) && !IsSEPlaying()) { BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tState = EVOSTATE_LEARNED_MOVE; } break; case MVSTATE_ASK_CANCEL: BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveYesState = MVSTATE_CANCEL; gTasks[taskId].tLearnMoveNoState = MVSTATE_INTRO_MSG_1; gTasks[taskId].tLearnMoveState = MVSTATE_PRINT_YES_NO; break; case MVSTATE_CANCEL: BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_ID_ADDER]); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tState = EVOSTATE_TRY_LEARN_MOVE; break; case MVSTATE_RETRY_AFTER_HM: diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 69e16ee847..e3a000486e 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -64,8 +64,6 @@ static EWRAM_DATA u32 sHofFadePalettes = 0; static EWRAM_DATA struct HallofFameTeam *sHofMonPtr = NULL; static EWRAM_DATA struct HofGfx *sHofGfxPtr = NULL; -extern struct MusicPlayerInfo gMPlayInfo_BGM; - static void ClearVramOamPltt_LoadHofPal(void); static void LoadHofGfx(void); static void InitHofBgs(void); diff --git a/src/pokeball.c b/src/pokeball.c index 3d5d664e13..87b58aedaf 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -15,9 +15,6 @@ #include "data.h" #include "constants/songs.h" -extern struct MusicPlayerInfo gMPlayInfo_BGM; - -// this file's functions static void Task_DoPokeballSendOutAnim(u8 taskId); static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite); static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite); diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 4eb60f3d04..bcd60dc7e1 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -116,8 +116,6 @@ struct PokeblockFeed u8 unused4; }; -extern struct MusicPlayerInfo gMPlayInfo_BGM; - extern const u16 gUnknown_0860F074[]; static void HandleInitBackgrounds(void); diff --git a/src/pokedex.c b/src/pokedex.c index 98fa40dbfa..b7ee07dfab 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -148,8 +148,6 @@ struct SearchMenuItem u8 selectionBgWidth; }; -extern struct MusicPlayerInfo gMPlayInfo_BGM; - struct PokedexListItem { u16 dexNum; diff --git a/src/sound.c b/src/sound.c index 42f507b7ca..55a1383578 100644 --- a/src/sound.c +++ b/src/sound.c @@ -14,24 +14,17 @@ struct Fanfare u16 duration; }; -// ewram EWRAM_DATA struct MusicPlayerInfo* gMPlay_PokemonCry = NULL; EWRAM_DATA u8 gPokemonCryBGMDuckingCounter = 0; -// iwram bss static u16 sCurrentMapMusic; static u16 sNextMapMusic; static u8 sMapMusicState; static u8 sMapMusicFadeInSpeed; static u16 sFanfareCounter; -// iwram common bool8 gDisableMusic; -extern struct MusicPlayerInfo gMPlayInfo_BGM; -extern struct MusicPlayerInfo gMPlayInfo_SE1; -extern struct MusicPlayerInfo gMPlayInfo_SE2; -extern struct MusicPlayerInfo gMPlayInfo_SE3; extern struct ToneData gCryTable[]; extern struct ToneData gCryTable2[]; diff --git a/src/title_screen.c b/src/title_screen.c index 3b60146b97..ee71b68959 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -35,9 +35,6 @@ #define BERRY_UPDATE_BUTTON_COMBO (B_BUTTON | SELECT_BUTTON) #define A_B_START_SELECT (A_BUTTON | B_BUTTON | START_BUTTON | SELECT_BUTTON) -extern struct MusicPlayerInfo gMPlayInfo_BGM; - -// this file's functions static void MainCB2(void); static void Task_TitleScreenPhase1(u8); static void Task_TitleScreenPhase2(u8); From 28de627913f04e059f995169299e41ce4c2544f0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 9 Oct 2021 11:33:37 -0400 Subject: [PATCH 045/417] Add TRACKS_ALL, remove BGCntrlBitfield --- gflib/bg.h | 10 --------- include/gba/m4a_internal.h | 2 ++ include/gba/types.h | 2 +- src/battle_anim.c | 4 ++-- src/battle_arena.c | 2 +- src/battle_controller_link_opponent.c | 4 ++-- src/battle_controller_opponent.c | 4 ++-- src/battle_controller_player.c | 6 +++--- src/battle_controller_recorded_opponent.c | 4 ++-- src/battle_controller_recorded_player.c | 2 +- src/battle_script_commands.c | 4 ++-- src/berry_blender.c | 2 +- src/contest.c | 2 +- src/hall_of_fame.c | 4 ++-- src/mauville_old_man.c | 8 +++---- src/pokeball.c | 2 +- src/pokeblock_feed.c | 2 +- src/pokedex.c | 4 ++-- src/pokemon_summary_screen.c | 2 +- src/reshow_battle_screen.c | 12 +++++------ src/roulette.c | 8 +++---- src/sound.c | 26 +++++++++++------------ 22 files changed, 54 insertions(+), 62 deletions(-) diff --git a/gflib/bg.h b/gflib/bg.h index 60327eab3a..76346224f6 100644 --- a/gflib/bg.h +++ b/gflib/bg.h @@ -1,16 +1,6 @@ #ifndef GUARD_BG_H #define GUARD_BG_H -struct BGCntrlBitfield // for the I/O registers -{ - volatile u16 priority:2; - volatile u16 charBaseBlock:2; - volatile u16 field_0_2:4; - volatile u16 field_1_0:5; - volatile u16 areaOverflowMode:1; - volatile u16 screenSize:2; -}; - enum { BG_ATTR_CHARBASEINDEX = 1, diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h index 2ccbb18f5b..eeb79391b5 100644 --- a/include/gba/m4a_internal.h +++ b/include/gba/m4a_internal.h @@ -313,6 +313,8 @@ struct MusicPlayerTrack #define MAX_MUSICPLAYER_TRACKS 16 +#define TRACKS_ALL 0xFFFF + #define TEMPORARY_FADE 0x0001 #define FADE_IN 0x0002 #define FADE_VOL_MAX 64 diff --git a/include/gba/types.h b/include/gba/types.h index 35d02e2639..2e92bbe86e 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -35,7 +35,7 @@ struct BgCnt { u16 priority:2; u16 charBaseBlock:2; - u16 dummy:2; + u16 dsCharBaseBlock:2; u16 mosaic:1; u16 palettes:1; u16 screenBaseBlock:5; diff --git a/src/battle_anim.c b/src/battle_anim.c index 80d511f4c7..9fdf6bd53a 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -1877,7 +1877,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo { if (tableId == gMovesWithQuietBGM[i]) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 128); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 128); break; } } @@ -2143,7 +2143,7 @@ static void ScriptCmd_end(void) if (!continuousAnim) // May have been used for debug? { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); if (!IsContest()) { sub_80A8278(); diff --git a/src/battle_arena.c b/src/battle_arena.c index f61526edcd..8b5f3c16d0 100644 --- a/src/battle_arena.c +++ b/src/battle_arena.c @@ -614,7 +614,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state) SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3 | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); HandleBattleWindow(5, 0, 24, 13, WINDOW_CLEAR); CopyBgTilemapBufferToVram(0); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); BeginNormalPaletteFade(0x7FFFFF1C, 4, 8, 0, RGB_BLACK); (*state)++; break; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index dc8b2bfd17..6369c02022 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -323,7 +323,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } } @@ -465,7 +465,7 @@ static void SwitchIn_HandleSoundAndEnd(void) if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy || gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy_2) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); LinkOpponentBufferExecCompleted(); } } diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 87bef43025..4da3b834a9 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -334,7 +334,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) m4aMPlayContinue(&gMPlayInfo_BGM); } else - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].bgmRestored = TRUE; bgmRestored = TRUE; @@ -470,7 +470,7 @@ static void SwitchIn_HandleSoundAndEnd(void) if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy || gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy_2) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); OpponentBufferExecCompleted(); } } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 8e7bc9a9f4..94e25fadcc 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1024,7 +1024,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) if (gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_LINK) m4aMPlayContinue(&gMPlayInfo_BGM); else - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].bgmRestored = TRUE; bgmRestored = TRUE; @@ -1092,7 +1092,7 @@ static void SwitchIn_HandleSoundAndEnd(void) if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs()) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); PlayerBufferExecCompleted(); } @@ -1121,7 +1121,7 @@ void Task_PlayerController_RestoreBgmAfterCry(u8 taskId) { if (!IsCryPlayingOrClearCrySongs()) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); DestroyTask(taskId); } } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index adac43961f..acf5959188 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -301,7 +301,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } } gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].bgmRestored = TRUE; @@ -450,7 +450,7 @@ static void SwitchIn_HandleSoundAndEnd(void) if (gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy || gSprites[gBattlerSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy_2) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); RecordedOpponentBufferExecCompleted(); } } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index bff81948ba..ac2133592e 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -318,7 +318,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e7520b1ee7..91f89137a3 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6412,10 +6412,10 @@ static void Cmd_various(void) } break; case VARIOUS_VOLUME_DOWN: - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x55); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x55); break; case VARIOUS_VOLUME_UP: - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); break; case VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT: gBattleStruct->alreadyStatusedMoveAttempt |= gBitTable[gActiveBattler]; diff --git a/src/berry_blender.c b/src/berry_blender.c index aa9bf2f87b..6a3e9f291e 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -932,7 +932,7 @@ static const struct WindowTemplate sBlenderRecordWindowTemplate = static void UpdateHitPitch(void) { - m4aMPlayPitchControl(&gMPlayInfo_SE2, 0xFFFF, 2 * (sBerryBlender->speed - MIN_ARROW_SPEED)); + m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, 2 * (sBerryBlender->speed - MIN_ARROW_SPEED)); } static void VBlankCB_BerryBlender(void) diff --git a/src/contest.c b/src/contest.c index a87e8f28b9..175b9da301 100644 --- a/src/contest.c +++ b/src/contest.c @@ -3820,7 +3820,7 @@ static void Task_UpdateAppealHearts(u8 taskId) { PlaySE(SE_CONTEST_HEART); m4aMPlayImmInit(&gMPlayInfo_SE1); - m4aMPlayPitchControl(&gMPlayInfo_SE1, 0xFFFF, pitchMod * 256); + m4aMPlayPitchControl(&gMPlayInfo_SE1, TRACKS_ALL, pitchMod * 256); } else { diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 69e16ee847..3485f3ba34 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -1019,7 +1019,7 @@ static void Task_HofPC_HandleInput(u8 taskId) if (IsCryPlayingOrClearCrySongs()) { StopCryAndClearCrySongs(); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } gTasks[taskId].func = Task_HofPC_HandlePaletteOnExit; } @@ -1029,7 +1029,7 @@ static void Task_HofPC_HandleInput(u8 taskId) if (IsCryPlayingOrClearCrySongs()) { StopCryAndClearCrySongs(); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } gTasks[taskId].func = Task_HofPC_HandlePaletteOnExit; } diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 8de9fc3c9a..d3c41236ce 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -502,9 +502,9 @@ static void BardSing(struct Task *task, struct BardSong *song) if (sound->var00 <= 50) { song->volume = 0x100 + sound->volume * 16; - m4aMPlayVolumeControl(&gMPlayInfo_SE2, 0xFFFF, song->volume); + m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); song->pitch = 0x200 + song->phonemes[song->currPhoneme].pitch; - m4aMPlayPitchControl(&gMPlayInfo_SE2, 0xFFFF, song->pitch); + m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); } break; case 1: @@ -514,8 +514,8 @@ static void BardSing(struct Task *task, struct BardSong *song) song->pitch += 64; else song->pitch -= 64; - m4aMPlayVolumeControl(&gMPlayInfo_SE2, 0xFFFF, song->volume); - m4aMPlayPitchControl(&gMPlayInfo_SE2, 0xFFFF, song->pitch); + m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); + m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); song->voiceInflection++; song->phonemeTimer--; if (song->phonemeTimer == 0) diff --git a/src/pokeball.c b/src/pokeball.c index 52d47b5347..3aa969fbd6 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -774,7 +774,7 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 128); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 128); } } diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 4eb60f3d04..99585407a6 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -886,7 +886,7 @@ static void Task_ExitPokeblockFeed(u8 taskId) { ResetSpriteData(); FreeAllSpritePalettes(); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, -1, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); SetMainCallback2(gMain.savedCallback); DestroyTask(taskId); FreeAllWindowBuffers(); diff --git a/src/pokedex.c b/src/pokedex.c index 98fa40dbfa..fa64b155c7 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -1637,7 +1637,7 @@ void CB2_OpenPokedex(void) SetVBlankCallback(VBlankCB_Pokedex); SetMainCallback2(CB2_Pokedex); CreatePokedexList(sPokedexView->dexMode, sPokedexView->dexOrder); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x80); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x80); break; } } @@ -1847,7 +1847,7 @@ static void Task_ClosePokedex(u8 taskId) FreeWindowAndBgBuffers(); DestroyTask(taskId); SetMainCallback2(CB2_ReturnToFieldWithOpenMenu); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); Free(sPokedexView); } } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 5c4b19bc44..f6371b088f 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1498,7 +1498,7 @@ static void CloseSummaryScreen(u8 taskId) ResetSpriteData(); FreeAllSpritePalettes(); StopCryAndClearCrySongs(); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); if (gMonSpritesGfxPtr == NULL) DestroyMonSpritesGfxManager(MON_SPR_GFX_MANAGER_A); FreeSummaryScreen(); diff --git a/src/reshow_battle_screen.c b/src/reshow_battle_screen.c index 6bc0e175bb..c8c03ede29 100644 --- a/src/reshow_battle_screen.c +++ b/src/reshow_battle_screen.c @@ -21,7 +21,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void); static bool8 LoadBattlerSpriteGfx(u8 battlerId); static void CreateBattlerSprite(u8 battlerId); static void CreateHealthboxSprite(u8 battlerId); -static void sub_80A95F4(void); +static void ClearBattleBgCntBaseBlocks(void); void ReshowBattleScreenDummy(void) { @@ -158,7 +158,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void) break; default: SetVBlankCallback(VBlankCB_Battle); - sub_80A95F4(); + ClearBattleBgCntBaseBlocks(); BeginHardwarePaletteFade(0xFF, 0, 0x10, 0, 1); gPaletteFade.bufferTransferDisabled = 0; SetMainCallback2(BattleMainCB2); @@ -169,14 +169,14 @@ static void CB2_ReshowBattleScreenAfterMenu(void) gBattleScripting.reshowMainState++; } -static void sub_80A95F4(void) +static void ClearBattleBgCntBaseBlocks(void) { - struct BGCntrlBitfield *regBgcnt1, *regBgcnt2; + vBgCnt *regBgcnt1, *regBgcnt2; - regBgcnt1 = (struct BGCntrlBitfield *)(®_BG1CNT); + regBgcnt1 = (vBgCnt *)(®_BG1CNT); regBgcnt1->charBaseBlock = 0; - regBgcnt2 = (struct BGCntrlBitfield *)(®_BG2CNT); + regBgcnt2 = (vBgCnt *)(®_BG2CNT); regBgcnt2->charBaseBlock = 0; } diff --git a/src/roulette.c b/src/roulette.c index 9b494d7527..b6ef1168b2 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -3999,8 +3999,8 @@ static void UpdateBallPos(struct Sprite *sprite) sprite->y2 = -cos * sprite->sBallDistToCenter >> 12; if (IsSEPlaying()) { - m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, sprite->x2); - m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, sprite->x2); + m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, sprite->x2); + m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, sprite->x2); } } @@ -4704,8 +4704,8 @@ static void SpriteCB_Taillow_FlyIn(struct Sprite *sprite) if (IsSEPlaying()) { s8 pan = -((116 - sprite->x) / 2); - m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); - m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan); } } else diff --git a/src/sound.c b/src/sound.c index 42f507b7ca..a12475f1ef 100644 --- a/src/sound.c +++ b/src/sound.c @@ -271,7 +271,7 @@ void FadeInNewBGM(u16 songNum, u8 speed) songNum = 0; m4aSongNumStart(songNum); m4aMPlayImmInit(&gMPlayInfo_BGM); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0); m4aSongNumStop(songNum); m4aMPlayFadeIn(&gMPlayInfo_BGM, speed); } @@ -309,7 +309,7 @@ bool8 IsBGMStopped(void) void PlayCry1(u16 species, s8 pan) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); PlayCryInternal(species, pan, CRY_VOLUME, 10, 0); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); @@ -328,7 +328,7 @@ void PlayCry3(u16 species, s8 pan, u8 mode) } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); @@ -344,7 +344,7 @@ void PlayCry4(u16 species, s8 pan, u8 mode) else { if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); } } @@ -357,7 +357,7 @@ void PlayCry6(u16 species, s8 pan, u8 mode) // not present in R/S } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); gPokemonCryBGMDuckingCounter = 2; } @@ -365,7 +365,7 @@ void PlayCry6(u16 species, s8 pan, u8 mode) // not present in R/S void PlayCry5(u16 species, u8 mode) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); PlayCryInternal(species, 0, CRY_VOLUME, 10, mode); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); @@ -549,7 +549,7 @@ static void Task_DuckBGMForPokemonCry(u8 taskId) if (!IsPokemonCryPlaying(gMPlay_PokemonCry)) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); DestroyTask(taskId); } } @@ -579,28 +579,28 @@ void PlaySE12WithPanning(u16 songNum, s8 pan) m4aSongNumStart(songNum); m4aMPlayImmInit(&gMPlayInfo_SE1); m4aMPlayImmInit(&gMPlayInfo_SE2); - m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); - m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan); } void PlaySE1WithPanning(u16 songNum, s8 pan) { m4aSongNumStart(songNum); m4aMPlayImmInit(&gMPlayInfo_SE1); - m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan); } void PlaySE2WithPanning(u16 songNum, s8 pan) { m4aSongNumStart(songNum); m4aMPlayImmInit(&gMPlayInfo_SE2); - m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan); } void SE12PanpotControl(s8 pan) { - m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); - m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan); } bool8 IsSEPlaying(void) From 862febe03a354218d3c8bd14d9c7d1a49e8981b8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 9 Oct 2021 12:12:18 -0400 Subject: [PATCH 046/417] Add MAP_OFFSET --- include/constants/battle_pyramid.h | 3 - include/constants/metatile_labels.h | 4 + include/fieldmap.h | 8 ++ src/battle_pyramid.c | 23 ++-- src/braille_puzzles.c | 184 +++------------------------- src/decoration.c | 24 ++-- src/event_object_movement.c | 28 ++--- src/faraway_island.c | 8 +- src/field_control_avatar.c | 16 +-- src/field_door.c | 4 +- src/field_effect.c | 6 +- src/field_effect_helpers.c | 4 +- src/field_player_avatar.c | 4 +- src/field_special_scene.c | 12 +- src/field_specials.c | 60 +++++---- src/field_tasks.c | 6 +- src/field_weather_effect.c | 3 +- src/fieldmap.c | 92 +++++++------- src/item_use.c | 34 ++--- src/mirage_tower.c | 4 +- src/overworld.c | 4 +- src/rotating_gate.c | 40 +++--- src/rotating_tile_puzzle.c | 12 +- src/scrcmd.c | 24 ++-- src/secret_base.c | 26 ++-- src/union_room.c | 5 +- src/union_room_player_avatar.c | 8 +- src/wild_encounter.c | 6 +- 28 files changed, 261 insertions(+), 391 deletions(-) diff --git a/include/constants/battle_pyramid.h b/include/constants/battle_pyramid.h index 1be3c11157..ebb7538823 100644 --- a/include/constants/battle_pyramid.h +++ b/include/constants/battle_pyramid.h @@ -4,9 +4,6 @@ #define TOTAL_ROUNDS 20 #define PICKUP_ITEMS_PER_ROUND 10 -#define FLOOR_WALKABLE_METATILE 0x28D -#define FLOOR_EXIT_METATILE 0x28E - #define HINT_EXIT_DIRECTION 0 #define HINT_REMAINING_ITEMS 1 #define HINT_REMAINING_TRAINERS 2 diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index 6159bf6cb4..b4ee3eacf5 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -788,4 +788,8 @@ #define METATILE_SecretBase_SpikesMat_BottomMid 0x32A #define METATILE_SecretBase_SpikesMat_BottomRight 0x32B +// gTileset_BattlePyramid +#define METATILE_BattlePyramid_Floor 0x28D +#define METATILE_BattlePyramid_Exit 0x28E + #endif // GUARD_METATILE_LABELS_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 5bcbe20ea6..28da8da2a3 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -9,6 +9,14 @@ #define NUM_PALS_TOTAL 13 #define MAX_MAP_DATA_SIZE 0x2800 +// Map coordinates are offset by 7 when using the map +// buffer because it needs to load sufficient border +// metatiles to fill the player's view (the player has +// 7 metatiles of view horizontally in either direction). +#define MAP_OFFSET 7 +#define MAP_OFFSET_W (MAP_OFFSET * 2 + 1) +#define MAP_OFFSET_H (MAP_OFFSET * 2) + #include "main.h" extern struct BackupMapLayout gBackupMapLayout; diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 169dc69c5d..e334e75d56 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -34,6 +34,7 @@ #include "constants/items.h" #include "constants/layouts.h" #include "constants/maps.h" +#include "constants/metatile_labels.h" #include "constants/moves.h" #include "constants/trainers.h" @@ -1235,16 +1236,16 @@ static u8 GetPostBattleDirectionHintTextIndex(int *hintType, u8 minDistanceForEx int x, y; u8 textIndex = 0; u16 *map = gBackupMapLayout.map; - map += gBackupMapLayout.width * 7 + 7; + map += gBackupMapLayout.width * 7 + MAP_OFFSET; for (y = 0; y < 32; map += 47, y++) { for (x = 0; x < 32; x++) { - if ((map[x] & METATILE_ID_MASK) == FLOOR_EXIT_METATILE) + if ((map[x] & METATILE_ID_MASK) == METATILE_BattlePyramid_Exit) { - x += 7 - gObjectEvents[gSelectedObjectEvent].initialCoords.x; - y += 7 - gObjectEvents[gSelectedObjectEvent].initialCoords.y; + x += MAP_OFFSET - gObjectEvents[gSelectedObjectEvent].initialCoords.x; + y += MAP_OFFSET - gObjectEvents[gSelectedObjectEvent].initialCoords.y; if (x >= minDistanceForExitHint || x <= -minDistanceForExitHint || y >= minDistanceForExitHint @@ -1537,17 +1538,17 @@ void GenerateBattlePyramidFloorLayout(u16 *backupMapData, bool8 setPlayerPositio const u16 *layoutMap = mapLayout->map; gBackupMapLayout.map = backupMapData; - gBackupMapLayout.width = mapLayout->width * 4 + 15; - gBackupMapLayout.height = mapLayout->height * 4 + 14; + gBackupMapLayout.width = mapLayout->width * 4 + MAP_OFFSET_W; + gBackupMapLayout.height = mapLayout->height * 4 + MAP_OFFSET_H; map = backupMapData; - yOffset = ((i / 4 * mapLayout->height) + 7) * gBackupMapLayout.width; - xOffset = (i % 4 * mapLayout->width) + 7; + yOffset = ((i / 4 * mapLayout->height) + MAP_OFFSET) * gBackupMapLayout.width; + xOffset = (i % 4 * mapLayout->width) + MAP_OFFSET; map += yOffset + xOffset; for (y = 0; y < mapLayout->height; y++) { for (x = 0; x < mapLayout->width; x++) { - if ((layoutMap[x] & METATILE_ID_MASK) != FLOOR_EXIT_METATILE) + if ((layoutMap[x] & METATILE_ID_MASK) != METATILE_BattlePyramid_Exit) { map[x] = layoutMap[x]; } @@ -1558,14 +1559,14 @@ void GenerateBattlePyramidFloorLayout(u16 *backupMapData, bool8 setPlayerPositio gSaveBlock1Ptr->pos.x = (mapLayout->width * (i % 4)) + x; gSaveBlock1Ptr->pos.y = (mapLayout->height * (i / 4)) + y; } - map[x] = (layoutMap[x] & 0xFC00) | FLOOR_WALKABLE_METATILE; + map[x] = (layoutMap[x] & (METATILE_ELEVATION_MASK | METATILE_COLLISION_MASK)) | METATILE_BattlePyramid_Floor; } else { map[x] = layoutMap[x]; } } - map += 15 + (mapLayout->width * 4); + map += MAP_OFFSET_W + (mapLayout->width * 4); layoutMap += mapLayout->width; } } diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index aa6664f356..d8410988dd 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -85,12 +85,12 @@ bool8 ShouldDoBrailleDigEffect(void) void DoBrailleDigEffect(void) { - MapGridSetMetatileIdAt(16, 8, METATILE_Cave_SealedChamberEntrance_TopLeft); - MapGridSetMetatileIdAt(17, 8, METATILE_Cave_SealedChamberEntrance_TopMid); - MapGridSetMetatileIdAt(18, 8, METATILE_Cave_SealedChamberEntrance_TopRight); - MapGridSetMetatileIdAt(16, 9, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(17, 9, METATILE_Cave_SealedChamberEntrance_BottomMid); - MapGridSetMetatileIdAt(18, 9, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 9 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopLeft); + MapGridSetMetatileIdAt(10 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopMid); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopRight); + MapGridSetMetatileIdAt( 9 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(10 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomMid); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BANG); FlagSet(FLAG_SYS_BRAILLE_DIG); @@ -112,84 +112,8 @@ bool8 CheckRelicanthWailord(void) } // THEORY: this was caused by block commenting out all of the older R/S braille functions but leaving the call to it itself, which creates the nullsub. -// the code is shown below to show what this might look like. void ShouldDoBrailleRegirockEffectOld(void) { - /* - if (!FlagGet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED) && (gSaveBlock1.location.mapGroup == MAP_GROUP_DESERT_RUINS && gSaveBlock1.location.mapNum == MAP_ID_DESERT_RUINS)) - { - if (gSaveBlock1.pos.x == 10 && gSaveBlock1.pos.y == 23) - return TRUE; - else if (gSaveBlock1.pos.x == 9 && gSaveBlock1.pos.y == 23) - return TRUE; - else if (gSaveBlock1.pos.x == 11 && gSaveBlock1.pos.y == 23) - return TRUE; - } - - return FALSE; -} - -void DoBrailleRegirockEffect(void) -{ - FieldEffectActiveListRemove(FLDEFF_USE_STRENGTH); - MapGridSetMetatileIdAt(14, 26, 554); - MapGridSetMetatileIdAt(15, 26, 555); - MapGridSetMetatileIdAt(16, 26, 556); - MapGridSetMetatileIdAt(14, 27, 3634); - MapGridSetMetatileIdAt(15, 27, 563); - MapGridSetMetatileIdAt(16, 27, 3636); - DrawWholeMapView(); - PlaySE(SE_BANG); - FlagSet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED); - ScriptContext2_Disable(); -} - -bool8 ShouldDoBrailleRegisteelEffect(void) -{ - if (!FlagGet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED) && (gSaveBlock1.location.mapGroup == MAP_GROUP_ANCIENT_TOMB && gSaveBlock1.location.mapNum == MAP_ID_ANCIENT_TOMB)) - { - if (gSaveBlock1.pos.x == 8 && gSaveBlock1.pos.y == 25) - return TRUE; - } - - return FALSE; -} - -void DoBrailleRegisteelEffect(void) -{ - gFieldEffectArguments[0] = gLastFieldPokeMenuOpened; - FieldEffectStart(FLDEFF_USE_TOMB_PUZZLE_EFFECT); -} - -bool8 FldEff_UseFlyAncientTomb(void) -{ - u8 taskId = CreateFieldMoveTask(); - - gTasks[taskId].data[8] = (u32)UseRegisteelHm_Callback >> 16; - gTasks[taskId].data[9] = (u32)UseRegisteelHm_Callback; - return FALSE; -} - -void UseRegisteelHm_Callback(void) -{ - FieldEffectActiveListRemove(FLDEFF_USE_TOMB_PUZZLE_EFFECT); - UseFlyAncientTomb_Finish(); -} - -void UseFlyAncientTomb_Finish(void) -{ - MapGridSetMetatileIdAt(14, 26, 554); - MapGridSetMetatileIdAt(15, 26, 555); - MapGridSetMetatileIdAt(16, 26, 556); - MapGridSetMetatileIdAt(14, 27, 3634); - MapGridSetMetatileIdAt(15, 27, 563); - MapGridSetMetatileIdAt(16, 27, 3636); - DrawWholeMapView(); - PlaySE(SE_BANG); - FlagSet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED); - ScriptContext2_Disable(); -} - */ } void DoSealedChamberShakingEffect1(void) @@ -278,12 +202,12 @@ void UseRegirockHm_Callback(void) void DoBrailleRegirockEffect(void) { - MapGridSetMetatileIdAt(14, 26, METATILE_Cave_SealedChamberEntrance_TopLeft); - MapGridSetMetatileIdAt(15, 26, METATILE_Cave_SealedChamberEntrance_TopMid); - MapGridSetMetatileIdAt(16, 26, METATILE_Cave_SealedChamberEntrance_TopRight); - MapGridSetMetatileIdAt(14, 27, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(15, 27, METATILE_Cave_SealedChamberEntrance_BottomMid); - MapGridSetMetatileIdAt(16, 27, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(7 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopLeft); + MapGridSetMetatileIdAt(8 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopMid); + MapGridSetMetatileIdAt(9 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopRight); + MapGridSetMetatileIdAt(7 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(8 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomMid); + MapGridSetMetatileIdAt(9 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BANG); FlagSet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED); @@ -317,12 +241,12 @@ void UseRegisteelHm_Callback(void) void DoBrailleRegisteelEffect(void) { - MapGridSetMetatileIdAt(14, 26, METATILE_Cave_SealedChamberEntrance_TopLeft); - MapGridSetMetatileIdAt(15, 26, METATILE_Cave_SealedChamberEntrance_TopMid); - MapGridSetMetatileIdAt(16, 26, METATILE_Cave_SealedChamberEntrance_TopRight); - MapGridSetMetatileIdAt(14, 27, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(15, 27, METATILE_Cave_SealedChamberEntrance_BottomMid); - MapGridSetMetatileIdAt(16, 27, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(7 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopLeft); + MapGridSetMetatileIdAt(8 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopMid); + MapGridSetMetatileIdAt(9 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopRight); + MapGridSetMetatileIdAt(7 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(8 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomMid); + MapGridSetMetatileIdAt(9 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BANG); FlagSet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED); @@ -332,78 +256,6 @@ void DoBrailleRegisteelEffect(void) // theory: another commented out DoBrailleWait and Task_BrailleWait. void DoBrailleWait(void) { - /* - if (!FlagGet(FLAG_SYS_BRAILLE_REGICE_COMPLETED)) - CreateTask(Task_BrailleWait, 0x50); -} - -void Task_BrailleWait(u8 taskId) -{ - s16 *data = gTasks[taskId].data; - - switch (data[0]) - { - case 0: - data[1] = 7200; - data[0] = 1; - break; - case 1: - if (BrailleWait_CheckButtonPress() != FALSE) - { - MenuZeroFillScreen(); - PlaySE(SE_SELECT); - data[0] = 2; - } - else - { - data[1] = data[1] - 1; - if (data[1] == 0) - { - MenuZeroFillScreen(); - data[0] = 3; - data[1] = 30; - } - } - break; - case 2: - if (BrailleWait_CheckButtonPress() == FALSE) - { - data[1] = data[1] - 1; - if (data[1] == 0) - data[0] = 4; - break; - } - sub_8064E2C(); - DestroyTask(taskId); - ScriptContext2_Disable(); - break; - case 3: - data[1] = data[1] - 1; - if (data[1] == 0) - data[0] = 4; - break; - case 4: - sub_8064E2C(); - ScriptContext1_SetupScript(S_OpenRegiceChamber); - DestroyTask(taskId); - break; - } -} - -bool32 BrailleWait_CheckButtonPress(void) -{ - u16 keyMask = A_BUTTON | B_BUTTON | START_BUTTON | SELECT_BUTTON | DPAD_ANY; - - if (gSaveBlock2.optionsButtonMode == OPTIONS_BUTTON_MODE_LR) - keyMask |= L_BUTTON | R_BUTTON; - if (gSaveBlock2.optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A) - keyMask |= L_BUTTON; - - if (gMain.newKeys & keyMask) - return TRUE; - else - return FALSE; - */ } // this used to be FldEff_UseFlyAncientTomb . why did GF merge the 2 functions? diff --git a/src/decoration.c b/src/decoration.c index 131f6e502d..838b5cb66a 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -1481,7 +1481,7 @@ static bool8 IsNonBlockNonElevated(u8 behaviorAt, u16 behaviorBy) static bool8 IsntInitialPosition(u8 taskId, s16 x, s16 y, u16 behaviorBy) { - if (x == gTasks[taskId].tInitialX + 7 && y == gTasks[taskId].tInitialY + 7 && behaviorBy != 0) + if (x == gTasks[taskId].tInitialX + MAP_OFFSET && y == gTasks[taskId].tInitialY + MAP_OFFSET && behaviorBy != 0) return FALSE; return TRUE; } @@ -1532,7 +1532,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) return FALSE; behaviorAt = GetObjectEventIdByXYZ(curX, curY, 0); - if (behaviorAt != 0 && behaviorAt != 16) + if (behaviorAt != 0 && behaviorAt != OBJECT_EVENTS_COUNT) return FALSE; } } @@ -1552,7 +1552,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) if (!IsntInitialPosition(taskId, curX, curY, behaviorBy)) return FALSE; - if (GetObjectEventIdByXYZ(curX, curY, 0) != 16) + if (GetObjectEventIdByXYZ(curX, curY, 0) != OBJECT_EVENTS_COUNT) return FALSE; } } @@ -1570,7 +1570,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) return FALSE; behaviorAt = GetObjectEventIdByXYZ(curX, curY, 0); - if (behaviorAt != 0 && behaviorAt != 16) + if (behaviorAt != 0 && behaviorAt != OBJECT_EVENTS_COUNT) return FALSE; } break; @@ -1606,7 +1606,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) return FALSE; } - if (GetObjectEventIdByXYZ(curX, curY, 0) != 16) + if (GetObjectEventIdByXYZ(curX, curY, 0) != OBJECT_EVENTS_COUNT) return FALSE; } break; @@ -1645,8 +1645,8 @@ static void PlaceDecoration(u8 taskId) } else { - sCurDecorMapX = gTasks[taskId].tCursorX - 7; - sCurDecorMapY = gTasks[taskId].tCursorY - 7; + sCurDecorMapX = gTasks[taskId].tCursorX - MAP_OFFSET; + sCurDecorMapY = gTasks[taskId].tCursorY - MAP_OFFSET; ScriptContext1_SetupScript(SecretBase_EventScript_SetDecoration); } @@ -1666,7 +1666,7 @@ static void PlaceDecoration_(u8 taskId) if (sDecorationContext.items[i] == DECOR_NONE) { sDecorationContext.items[i] = gCurDecorationItems[gCurDecorationIndex]; - sDecorationContext.pos[i] = ((gTasks[taskId].tCursorX - 7) << 4) + (gTasks[taskId].tCursorY - 7); + sDecorationContext.pos[i] = ((gTasks[taskId].tCursorX - MAP_OFFSET) << 4) + (gTasks[taskId].tCursorY - MAP_OFFSET); break; } } @@ -2223,7 +2223,7 @@ static void ClearRearrangementNonSprites(void) { for (x = 0; x < sDecorRearrangementDataBuffer[i].width; x++) { - MapGridSetMetatileEntryAt(posX + 7 + x, posY + 7 - y, gMapHeader.mapLayout->map[posX + x + gMapHeader.mapLayout->width * (posY - y)] | 0x3000); + MapGridSetMetatileEntryAt(posX + MAP_OFFSET + x, posY + MAP_OFFSET - y, gMapHeader.mapLayout->map[posX + x + gMapHeader.mapLayout->width * (posY - y)] | 0x3000); } } @@ -2461,12 +2461,12 @@ static bool8 DecorationIsUnderCursor(u8 taskId, u8 idx, struct DecorRearrangemen u8 yOff; u8 ht; - x = gTasks[taskId].tCursorX - 7; - y = gTasks[taskId].tCursorY - 7; + x = gTasks[taskId].tCursorX - MAP_OFFSET; + y = gTasks[taskId].tCursorY - MAP_OFFSET; xOff = sDecorationContext.pos[idx] >> 4; yOff = sDecorationContext.pos[idx] & 0x0F; ht = data->height; - if (sDecorationContext.items[idx] == DECOR_SAND_ORNAMENT && MapGridGetMetatileIdAt(xOff + 7, yOff + 7) == METATILE_SecretBase_SandOrnament_BrokenBase) + if (sDecorationContext.items[idx] == DECOR_SAND_ORNAMENT && MapGridGetMetatileIdAt(xOff + MAP_OFFSET, yOff + MAP_OFFSET) == METATILE_SecretBase_SandOrnament_BrokenBase) ht--; if (x >= xOff && x < xOff + data->width && y > yOff - ht && y <= yOff) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index ba4f384199..2a606f72a7 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1242,8 +1242,8 @@ static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, return OBJECT_EVENTS_COUNT; objectEvent = &gObjectEvents[objectEventId]; ClearObjectEvent(objectEvent); - x = template->x + 7; - y = template->y + 7; + x = template->x + MAP_OFFSET; + y = template->y + MAP_OFFSET; objectEvent->active = TRUE; objectEvent->triggerGroundEffectsOnMove = TRUE; objectEvent->graphicsId = template->graphicsId; @@ -1469,8 +1469,8 @@ u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 l { struct ObjectEventTemplate objectEventTemplate; - x -= 7; - y -= 7; + x -= MAP_OFFSET; + y -= MAP_OFFSET; objectEventTemplate.localId = localId; objectEventTemplate.graphicsId = graphicsId; objectEventTemplate.inConnection = 0; @@ -1560,8 +1560,8 @@ u8 CreateObjectSprite(u8 graphicsId, u8 objectEventId, s16 x, s16 y, u8 z, u8 di graphicsInfo = GetObjectEventGraphicsInfo(graphicsId); MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, UpdateObjectEventSprite, &spriteTemplate, &subspriteTables); *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; SetSpritePosToOffsetMapCoords(&x, &y, 8, 16); spriteId = CreateSpriteAtEnd(&spriteTemplate, x, y, 0); if (spriteId != MAX_SPRITES) @@ -1606,9 +1606,9 @@ void TrySpawnObjectEvents(s16 cameraX, s16 cameraY) if (gMapHeader.events != NULL) { s16 left = gSaveBlock1Ptr->pos.x - 2; - s16 right = gSaveBlock1Ptr->pos.x + 17; + s16 right = gSaveBlock1Ptr->pos.x + MAP_OFFSET_W + 2; s16 top = gSaveBlock1Ptr->pos.y; - s16 bottom = gSaveBlock1Ptr->pos.y + 16; + s16 bottom = gSaveBlock1Ptr->pos.y + MAP_OFFSET_H + 2; if (InBattlePyramid()) objectCount = GetNumBattlePyramidObjectEvents(); @@ -1620,8 +1620,8 @@ void TrySpawnObjectEvents(s16 cameraX, s16 cameraY) for (i = 0; i < objectCount; i++) { struct ObjectEventTemplate *template = &gSaveBlock1Ptr->objectEventTemplates[i]; - s16 npcX = template->x + 7; - s16 npcY = template->y + 7; + s16 npcX = template->x + MAP_OFFSET; + s16 npcY = template->y + MAP_OFFSET; if (top <= npcY && bottom >= npcY && left <= npcX && right >= npcX && !FlagGet(template->flagId)) @@ -2120,8 +2120,8 @@ void TryMoveObjectEventToMapCoords(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s1 u8 objectEventId; if (!TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId)) { - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; MoveObjectEventToMapCoords(&gObjectEvents[objectEventId], x, y); } } @@ -2470,8 +2470,8 @@ void OverrideTemplateCoordsForObjectEvent(const struct ObjectEvent *objectEvent) objectEventTemplate = GetBaseTemplateForObjectEvent(objectEvent); if (objectEventTemplate != NULL) { - objectEventTemplate->x = objectEvent->currentCoords.x - 7; - objectEventTemplate->y = objectEvent->currentCoords.y - 7; + objectEventTemplate->x = objectEvent->currentCoords.x - MAP_OFFSET; + objectEventTemplate->y = objectEvent->currentCoords.y - MAP_OFFSET; } } diff --git a/src/faraway_island.c b/src/faraway_island.c index 51ab8def44..3927d9ad54 100755 --- a/src/faraway_island.c +++ b/src/faraway_island.c @@ -29,10 +29,10 @@ extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; static const s16 sFarawayIslandRockCoords[4][2] = { - {14 + 7, 9 + 7}, - {18 + 7, 9 + 7}, - { 9 + 7, 10 + 7}, - {13 + 7, 13 + 7}, + {14 + MAP_OFFSET, 9 + MAP_OFFSET}, + {18 + MAP_OFFSET, 9 + MAP_OFFSET}, + { 9 + MAP_OFFSET, 10 + MAP_OFFSET}, + {13 + MAP_OFFSET, 13 + MAP_OFFSET}, }; static u8 GetMewObjectEventId(void) diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 6ec280fd0d..10f8d49bb1 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -316,7 +316,7 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8 static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position, u8 metatileBehavior, u8 direction) { - struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - 7, position->y - 7, position->height); + struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->height); if (bgEvent == NULL) return NULL; @@ -498,7 +498,7 @@ static bool8 TryStartStepBasedScript(struct MapPosition *position, u16 metatileB static bool8 TryStartCoordEventScript(struct MapPosition *position) { - u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - 7, position->y - 7, position->height); + u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->height); if (script == NULL) return FALSE; @@ -785,7 +785,7 @@ static bool8 IsArrowWarpMetatileBehavior(u16 metatileBehavior, u8 direction) static s8 GetWarpEventAtMapPosition(struct MapHeader *mapHeader, struct MapPosition *position) { - return GetWarpEventAtPosition(mapHeader, position->x - 7, position->y - 7, position->height); + return GetWarpEventAtPosition(mapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->height); } static void SetupWarp(struct MapHeader *unused, s8 warpEventId, struct MapPosition *position) @@ -920,7 +920,7 @@ static u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position) { - return GetCoordEventScriptAtPosition(&gMapHeader, position->x - 7, position->y - 7, position->height); + return GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->height); } static struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) @@ -944,7 +944,7 @@ bool8 TryDoDiveWarp(struct MapPosition *position, u16 metatileBehavior) { if (gMapHeader.mapType == MAP_TYPE_UNDERWATER && !MetatileBehavior_IsUnableToEmerge(metatileBehavior)) { - if (SetDiveWarpEmerge(position->x - 7, position->y - 7)) + if (SetDiveWarpEmerge(position->x - MAP_OFFSET, position->y - MAP_OFFSET)) { StoreInitialPlayerAvatarState(); DoDiveWarp(); @@ -954,7 +954,7 @@ bool8 TryDoDiveWarp(struct MapPosition *position, u16 metatileBehavior) } else if (MetatileBehavior_IsDiveable(metatileBehavior) == TRUE) { - if (SetDiveWarpDive(position->x - 7, position->y - 7)) + if (SetDiveWarpDive(position->x - MAP_OFFSET, position->y - MAP_OFFSET)) { StoreInitialPlayerAvatarState(); DoDiveWarp(); @@ -974,12 +974,12 @@ u8 TrySetDiveWarp(void) metatileBehavior = MapGridGetMetatileBehaviorAt(x, y); if (gMapHeader.mapType == MAP_TYPE_UNDERWATER && !MetatileBehavior_IsUnableToEmerge(metatileBehavior)) { - if (SetDiveWarpEmerge(x - 7, y - 7) == TRUE) + if (SetDiveWarpEmerge(x - MAP_OFFSET, y - MAP_OFFSET) == TRUE) return 1; } else if (MetatileBehavior_IsDiveable(metatileBehavior) == TRUE) { - if (SetDiveWarpDive(x - 7, y - 7) == TRUE) + if (SetDiveWarpDive(x - MAP_OFFSET, y - MAP_OFFSET) == TRUE) return 2; } return 0; diff --git a/src/field_door.c b/src/field_door.c index 3f2034ea6c..f53e83d7a6 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -346,14 +346,14 @@ static void DrawDoor(const struct DoorGraphics *gfx, const struct DoorAnimFrame { DrawClosedDoorTiles(gfx, x, y); if (ShouldUseMultiCorridorDoor()) - DrawClosedDoorTiles(gfx, gSpecialVar_0x8004 + 7, gSpecialVar_0x8005 + 7); + DrawClosedDoorTiles(gfx, gSpecialVar_0x8004 + MAP_OFFSET, gSpecialVar_0x8005 + MAP_OFFSET); } else { CopyDoorTilesToVram(gfx, frame); DrawCurrentDoorAnimFrame(gfx, x, y, gfx->palette); if (ShouldUseMultiCorridorDoor()) - DrawCurrentDoorAnimFrame(gfx, gSpecialVar_0x8004 + 7, gSpecialVar_0x8005 + 7, gfx->palette); + DrawCurrentDoorAnimFrame(gfx, gSpecialVar_0x8004 + MAP_OFFSET, gSpecialVar_0x8005 + MAP_OFFSET, gfx->palette); } } diff --git a/src/field_effect.c b/src/field_effect.c index 90d43c8099..88f8065d3f 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -3830,11 +3830,11 @@ bool8 FldEff_MoveDeoxysRock(struct Sprite* sprite) int xPos, yPos; u8 taskId; object = &gObjectEvents[objectEventIdBuffer]; - xPos = object->currentCoords.x - 7; - yPos = object->currentCoords.y - 7; + xPos = object->currentCoords.x - MAP_OFFSET; + yPos = object->currentCoords.y - MAP_OFFSET; xPos = (gFieldEffectArguments[3] - xPos) * 16; yPos = (gFieldEffectArguments[4] - yPos) * 16; - ShiftObjectEventCoords(object, gFieldEffectArguments[3] + 7, gFieldEffectArguments[4] + 7); + ShiftObjectEventCoords(object, gFieldEffectArguments[3] + MAP_OFFSET, gFieldEffectArguments[4] + MAP_OFFSET); taskId = CreateTask(Task_MoveDeoxysRock, 80); gTasks[taskId].data[1] = object->spriteId; gTasks[taskId].data[2] = gSprites[object->spriteId].x + xPos; diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index bcc02efe96..0a0e465a87 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -1416,8 +1416,8 @@ u32 FldEff_Sparkle(void) { u8 spriteId; - gFieldEffectArguments[0] += 7; - gFieldEffectArguments[1] += 7; + gFieldEffectArguments[0] += MAP_OFFSET; + gFieldEffectArguments[1] += MAP_OFFSET; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_SMALL_SPARKLE], gFieldEffectArguments[0], gFieldEffectArguments[1], 0x52); if (spriteId != MAX_SPRITES) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 617dd8ea3e..51e49629c4 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1368,8 +1368,8 @@ void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender) playerObjEventTemplate.localId = OBJ_EVENT_ID_PLAYER; playerObjEventTemplate.graphicsId = GetPlayerAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, gender); - playerObjEventTemplate.x = x - 7; - playerObjEventTemplate.y = y - 7; + playerObjEventTemplate.x = x - MAP_OFFSET; + playerObjEventTemplate.y = y - MAP_OFFSET; playerObjEventTemplate.elevation = 0; playerObjEventTemplate.movementType = MOVEMENT_TYPE_PLAYER; playerObjEventTemplate.movementRangeX = 0; diff --git a/src/field_special_scene.c b/src/field_special_scene.c index cb2d0e9016..39e5d66980 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -215,9 +215,9 @@ void Task_HandleTruckSequence(u8 taskId) data[1]++; if (data[1] == 120) { - MapGridSetMetatileIdAt(11, 8, METATILE_InsideOfTruck_ExitLight_Top); - MapGridSetMetatileIdAt(11, 9, METATILE_InsideOfTruck_ExitLight_Mid); - MapGridSetMetatileIdAt(11, 10, METATILE_InsideOfTruck_ExitLight_Bottom); + MapGridSetMetatileIdAt(4 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_InsideOfTruck_ExitLight_Top); + MapGridSetMetatileIdAt(4 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_InsideOfTruck_ExitLight_Mid); + MapGridSetMetatileIdAt(4 + MAP_OFFSET, 3 + MAP_OFFSET, METATILE_InsideOfTruck_ExitLight_Bottom); DrawWholeMapView(); PlaySE(SE_TRUCK_DOOR); DestroyTask(taskId); @@ -229,9 +229,9 @@ void Task_HandleTruckSequence(u8 taskId) void ExecuteTruckSequence(void) { - MapGridSetMetatileIdAt(11, 8, METATILE_InsideOfTruck_DoorClosedFloor_Top); - MapGridSetMetatileIdAt(11, 9, METATILE_InsideOfTruck_DoorClosedFloor_Mid); - MapGridSetMetatileIdAt(11, 10, METATILE_InsideOfTruck_DoorClosedFloor_Bottom); + MapGridSetMetatileIdAt(4 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_InsideOfTruck_DoorClosedFloor_Top); + MapGridSetMetatileIdAt(4 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_InsideOfTruck_DoorClosedFloor_Mid); + MapGridSetMetatileIdAt(4 + MAP_OFFSET, 3 + MAP_OFFSET, METATILE_InsideOfTruck_DoorClosedFloor_Bottom); DrawWholeMapView(); ScriptContext2_Enable(); CpuFastFill(0, gPlttBufferFaded, 0x400); diff --git a/src/field_specials.c b/src/field_specials.c index e19f02c09e..c3bd629466 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -586,7 +586,7 @@ void SpawnLinkPartnerObjectEvent(void) linkSpriteId = OBJ_EVENT_GFX_RIVAL_MAY_NORMAL; break; } - SpawnSpecialObjectEventParameterized(linkSpriteId, movementTypes[j], 240 - i, coordOffsets[j][0] + x + 7, coordOffsets[j][1] + y + 7, 0); + SpawnSpecialObjectEventParameterized(linkSpriteId, movementTypes[j], 240 - i, coordOffsets[j][0] + x + MAP_OFFSET, coordOffsets[j][1] + y + MAP_OFFSET, 0); LoadLinkPartnerObjectEventSpritePalette(linkSpriteId, 240 - i, i); j++; if (j == MAX_LINK_PLAYERS) @@ -633,13 +633,12 @@ static void LoadLinkPartnerObjectEventSpritePalette(u8 graphicsId, u8 localEvent } } -// NOTE: Coordinates are +7, +7 from actual in-map coordinates static const struct UCoords8 sMauvilleGymSwitchCoords[] = { - { 7, 22}, - {11, 19}, - {10, 16}, - {15, 16} + { 0 + MAP_OFFSET, 15 + MAP_OFFSET}, + { 4 + MAP_OFFSET, 12 + MAP_OFFSET}, + { 3 + MAP_OFFSET, 9 + MAP_OFFSET}, + { 8 + MAP_OFFSET, 9 + MAP_OFFSET} }; // Presses the stepped-on switch and raises the rest @@ -659,10 +658,10 @@ void MauvilleGymPressSwitch(void) void MauvilleGymSetDefaultBarriers(void) { int x, y; - // All switches/barriers are within these coord ranges -7 - for (y = 12; y < 24; y++) + // All switches/barriers are within these coord ranges + for (y = 5 + MAP_OFFSET; y < 17 + MAP_OFFSET; y++) { - for (x = 7; x < 16; x++) + for (x = 0 + MAP_OFFSET; x < 9 + MAP_OFFSET; x++) { switch (MapGridGetMetatileIdAt(x, y)) { @@ -759,9 +758,9 @@ void MauvilleGymDeactivatePuzzle(void) MapGridSetMetatileIdAt(switchCoords->x, switchCoords->y, METATILE_MauvilleGym_PressedSwitch); switchCoords++; } - for (y = 12; y < 24; y++) + for (y = 5 + MAP_OFFSET; y < 17 + MAP_OFFSET; y++) { - for (x = 7; x < 16; x++) + for (x = 0 + MAP_OFFSET; x < 9 + MAP_OFFSET; x++) { switch (MapGridGetMetatileIdAt(x, y)) { @@ -902,8 +901,8 @@ static void PetalburgGymSetDoorMetatiles(u8 roomNumber, u16 metatileId) } for (i = 0; i < nDoors; i++) { - MapGridSetMetatileIdAt(doorCoordsX[i] + 7, doorCoordsY[i] + 7, metatileId | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(doorCoordsX[i] + 7, doorCoordsY[i] + 8, (metatileId + 8) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(doorCoordsX[i] + MAP_OFFSET, doorCoordsY[i] + MAP_OFFSET, metatileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(doorCoordsX[i] + MAP_OFFSET, doorCoordsY[i] + MAP_OFFSET + 1, (metatileId + 8) | METATILE_COLLISION_MASK); } DrawWholeMapView(); } @@ -1115,7 +1114,7 @@ static void PCTurnOnEffect_1(s16 isPcTurnedOn, s8 dx, s8 dy) tileId = METATILE_BrendansMaysHouse_MayPC_On; } } - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + 7, gSaveBlock1Ptr->pos.y + dy + 7, tileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | METATILE_COLLISION_MASK); } void DoPCTurnOffEffect(void) @@ -1156,7 +1155,7 @@ static void PCTurnOffEffect(void) { tileId = METATILE_BrendansMaysHouse_MayPC_Off; } - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + 7, gSaveBlock1Ptr->pos.y + dy + 7, tileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | METATILE_COLLISION_MASK); DrawWholeMapView(); } @@ -1189,13 +1188,13 @@ static void LotteryCornerComputerEffect(struct Task *task) task->data[3] = 0; if (task->data[4] != 0) { - MapGridSetMetatileIdAt(18, 8, METATILE_Shop_Laptop1_Normal | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(18, 9, METATILE_Shop_Laptop2_Normal | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Normal | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Normal | METATILE_COLLISION_MASK); } else { - MapGridSetMetatileIdAt(18, 8, METATILE_Shop_Laptop1_Flash | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(18, 9, METATILE_Shop_Laptop2_Flash | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Flash | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Flash | METATILE_COLLISION_MASK); } DrawWholeMapView(); task->data[4] ^= 1; @@ -1209,8 +1208,8 @@ static void LotteryCornerComputerEffect(struct Task *task) void EndLotteryCornerComputerEffect(void) { - MapGridSetMetatileIdAt(18, 8, METATILE_Shop_Laptop1_Normal | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(18, 9, METATILE_Shop_Laptop2_Normal | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Normal | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Normal | METATILE_COLLISION_MASK); DrawWholeMapView(); } @@ -1298,7 +1297,12 @@ void IsGrassTypeInParty(void) void SpawnCameraObject(void) { - u8 obj = SpawnSpecialObjectEventParameterized(OBJ_EVENT_GFX_BOY_1, MOVEMENT_TYPE_FACE_DOWN, OBJ_EVENT_ID_CAMERA, gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7, 3); + u8 obj = SpawnSpecialObjectEventParameterized(OBJ_EVENT_GFX_BOY_1, + MOVEMENT_TYPE_FACE_DOWN, + OBJ_EVENT_ID_CAMERA, + gSaveBlock1Ptr->pos.x + MAP_OFFSET, + gSaveBlock1Ptr->pos.y + MAP_OFFSET, + 3); gObjectEvents[obj].invisible = TRUE; CameraObjectSetFollowedSpriteId(gObjectEvents[obj].spriteId); } @@ -1949,23 +1953,15 @@ static void Task_MoveElevatorWindowLights(u8 taskId) if (data[2] == FALSE) { for (y = 0; y < 3; y++) - { for (x = 0; x < 3; x++) - { - MapGridSetMetatileIdAt(x + 8, y + 7, sElevatorWindowTiles_Ascending[y][data[0] % 3] | METATILE_COLLISION_MASK); - } - } + MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Ascending[y][data[0] % 3] | METATILE_COLLISION_MASK); } // descending else { for (y = 0; y < 3; y++) - { for (x = 0; x < 3; x++) - { - MapGridSetMetatileIdAt(x + 8, y + 7, sElevatorWindowTiles_Descending[y][data[0] % 3] | METATILE_COLLISION_MASK); - } - } + MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Descending[y][data[0] % 3] | METATILE_COLLISION_MASK); } DrawWholeMapView(); data[1] = 0; diff --git a/src/field_tasks.c b/src/field_tasks.c index 676a9cfc7b..187270f7a8 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -529,7 +529,7 @@ void SetSootopolisGymCrackedIceMetatiles(void) for (y = 0; y < height; y++) { if (IsIcePuzzleCoordVisited(x, y) == TRUE) - MapGridSetMetatileIdAt(x + 7, y + 7, METATILE_SootopolisGym_Ice_Cracked); + MapGridSetMetatileIdAt(x + MAP_OFFSET, y + MAP_OFFSET, METATILE_SootopolisGym_Ice_Cracked); } } } @@ -586,7 +586,7 @@ static void SootopolisGymIcePerStepCallback(u8 taskId) PlaySE(SE_ICE_CRACK); MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Cracked); CurrentMapDrawMetatileAt(x, y); - MarkIcePuzzleCoordVisited(x - 7, y - 7); + MarkIcePuzzleCoordVisited(x - MAP_OFFSET, y - MAP_OFFSET); data[1] = 1; } break; @@ -689,7 +689,7 @@ static void SetMuddySlopeMetatile(s16 *data, s16 x, s16 y) { u16 tile; if ((--data[0]) == 0) - tile = 0xe8; + tile = METATILE_General_MuddySlope_Frame0; else tile = sMuddySlopeMetatiles[data[0] / 8]; diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c index 7321587339..27ade478f0 100644 --- a/src/field_weather_effect.c +++ b/src/field_weather_effect.c @@ -1,6 +1,7 @@ #include "global.h" #include "battle_anim.h" #include "event_object_movement.h" +#include "fieldmap.h" #include "field_weather.h" #include "overworld.h" #include "random.h" @@ -189,7 +190,7 @@ static void CreateCloudSprites(void) { gWeatherPtr->sprites.s1.cloudSprites[i] = &gSprites[spriteId]; sprite = gWeatherPtr->sprites.s1.cloudSprites[i]; - SetSpritePosToMapCoords(sCloudSpriteMapCoords[i].x + 7, sCloudSpriteMapCoords[i].y + 7, &sprite->x, &sprite->y); + SetSpritePosToMapCoords(sCloudSpriteMapCoords[i].x + MAP_OFFSET, sCloudSpriteMapCoords[i].y + MAP_OFFSET, &sprite->x, &sprite->y); sprite->coordOffsetEnabled = TRUE; } else diff --git a/src/fieldmap.c b/src/fieldmap.c index e437ea7fc2..aff72c4c68 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -105,9 +105,9 @@ static void InitMapLayoutData(struct MapHeader *mapHeader) mapLayout = mapHeader->mapLayout; CpuFastFill16(METATILE_ID_UNDEFINED, gBackupMapData, sizeof(gBackupMapData)); gBackupMapLayout.map = gBackupMapData; - width = mapLayout->width + 15; + width = mapLayout->width + MAP_OFFSET_W; gBackupMapLayout.width = width; - height = mapLayout->height + 14; + height = mapLayout->height + MAP_OFFSET_H; gBackupMapLayout.height = height; if (width * height <= MAX_MAP_DATA_SIZE) { @@ -121,11 +121,11 @@ static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height) u16 *dest; int y; dest = gBackupMapLayout.map; - dest += gBackupMapLayout.width * 7 + 7; + dest += gBackupMapLayout.width * 7 + MAP_OFFSET; for (y = 0; y < height; y++) { CpuCopy16(map, dest, width * 2); - dest += width + 15; + dest += width + MAP_OFFSET_W; map += width; } } @@ -197,8 +197,8 @@ static void FillSouthConnection(struct MapHeader const *mapHeader, struct MapHea if (connectedMapHeader) { cWidth = connectedMapHeader->mapLayout->width; - x = offset + 7; - y = mapHeader->mapLayout->height + 7; + x = offset + MAP_OFFSET; + y = mapHeader->mapLayout->height + MAP_OFFSET; if (x < 0) { x2 = -x; @@ -222,7 +222,7 @@ static void FillSouthConnection(struct MapHeader const *mapHeader, struct MapHea x, y, connectedMapHeader, x2, /*y2*/ 0, - width, /*height*/ 7); + width, /*height*/ MAP_OFFSET); } } @@ -237,8 +237,8 @@ static void FillNorthConnection(struct MapHeader const *mapHeader, struct MapHea { cWidth = connectedMapHeader->mapLayout->width; cHeight = connectedMapHeader->mapLayout->height; - x = offset + 7; - y2 = cHeight - 7; + x = offset + MAP_OFFSET; + y2 = cHeight - MAP_OFFSET; if (x < 0) { x2 = -x; @@ -262,7 +262,7 @@ static void FillNorthConnection(struct MapHeader const *mapHeader, struct MapHea x, /*y*/ 0, connectedMapHeader, x2, y2, - width, /*height*/ 7); + width, /*height*/ MAP_OFFSET); } } @@ -277,8 +277,8 @@ static void FillWestConnection(struct MapHeader const *mapHeader, struct MapHead { cWidth = connectedMapHeader->mapLayout->width; cHeight = connectedMapHeader->mapLayout->height; - y = offset + 7; - x2 = cWidth - 7; + y = offset + MAP_OFFSET; + x2 = cWidth - MAP_OFFSET; if (y < 0) { y2 = -y; @@ -301,7 +301,7 @@ static void FillWestConnection(struct MapHeader const *mapHeader, struct MapHead /*x*/ 0, y, connectedMapHeader, x2, y2, - /*width*/ 7, height); + /*width*/ MAP_OFFSET, height); } } @@ -314,8 +314,8 @@ static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHead if (connectedMapHeader) { cHeight = connectedMapHeader->mapLayout->height; - x = mapHeader->mapLayout->width + 7; - y = offset + 7; + x = mapHeader->mapLayout->width + MAP_OFFSET; + y = offset + MAP_OFFSET; if (y < 0) { y2 = -y; @@ -338,7 +338,7 @@ static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHead x, y, connectedMapHeader, /*x2*/ 0, y2, - /*width*/ 8, height); + /*width*/ MAP_OFFSET + 1, height); } } @@ -433,9 +433,9 @@ void SaveMapView(void) width = gBackupMapLayout.width; x = gSaveBlock1Ptr->pos.x; y = gSaveBlock1Ptr->pos.y; - for (i = y; i < y + 14; i++) + for (i = y; i < y + MAP_OFFSET_H; i++) { - for (j = x; j < x + 15; j++) + for (j = x; j < x + MAP_OFFSET_W; j++) *mapView++ = gBackupMapData[width * i + j]; } } @@ -480,28 +480,28 @@ static void LoadSavedMapView(void) width = gBackupMapLayout.width; x = gSaveBlock1Ptr->pos.x; y = gSaveBlock1Ptr->pos.y; - for (i = y; i < y + 14; i++) + for (i = y; i < y + MAP_OFFSET_H; i++) { if (i == y && i != 0) yMode = 0; - else if (i == y + 13 && i != gMapHeader.mapLayout->height - 1) + else if (i == y + MAP_OFFSET_H - 1 && i != gMapHeader.mapLayout->height - 1) yMode = 1; else yMode = 0xFF; - for (j = x; j < x + 15; j++) + for (j = x; j < x + MAP_OFFSET_W; j++) { if (!SkipCopyingMetatileFromSavedMap(&gBackupMapData[j + width * i], width, yMode)) gBackupMapData[j + width * i] = *mapView; mapView++; } } - for (j = x; j < x + 15; j++) + for (j = x; j < x + MAP_OFFSET_W; j++) { if (y != 0) FixLongGrassMetatilesWindowTop(j, y - 1); if (i < gMapHeader.mapLayout->height - 1) - FixLongGrassMetatilesWindowBottom(j, y + 13); + FixLongGrassMetatilesWindowBottom(j, y + MAP_OFFSET_H - 1); } ClearSavedMapView(); } @@ -524,25 +524,25 @@ static void MoveMapViewToBackup(u8 direction) r8 = 0; x0 = gSaveBlock1Ptr->pos.x; y0 = gSaveBlock1Ptr->pos.y; - x2 = 15; - y2 = 14; + x2 = MAP_OFFSET_W; + y2 = MAP_OFFSET_H; switch (direction) { case CONNECTION_NORTH: y0 += 1; - y2 = 13; + y2 = MAP_OFFSET_H - 1; break; case CONNECTION_SOUTH: r8 = 1; - y2 = 13; + y2 = MAP_OFFSET_H - 1; break; case CONNECTION_WEST: x0 += 1; - x2 = 14; + x2 = MAP_OFFSET_W - 1; break; case CONNECTION_EAST: r9 = 1; - x2 = 14; + x2 = MAP_OFFSET_W - 1; break; } for (y = 0; y < y2; y++) @@ -552,7 +552,7 @@ static void MoveMapViewToBackup(u8 direction) for (x = 0; x < x2; x++) { desti = width * (y + y0); - srci = (y + r8) * 15 + r9; + srci = (y + r8) * MAP_OFFSET_W + r9; src = &mapView[srci + i]; dest = &gBackupMapData[x0 + desti + j]; *dest = *src; @@ -568,28 +568,28 @@ int GetMapBorderIdAt(int x, int y) if (MapGridGetTileAt(x, y) == METATILE_ID_UNDEFINED) return CONNECTION_INVALID; - if (x >= (gBackupMapLayout.width - 8)) + if (x >= (gBackupMapLayout.width - (MAP_OFFSET + 1))) { if (!gMapConnectionFlags.east) return CONNECTION_INVALID; return CONNECTION_EAST; } - else if (x < 7) + else if (x < MAP_OFFSET) { if (!gMapConnectionFlags.west) return CONNECTION_INVALID; return CONNECTION_WEST; } - else if (y >= (gBackupMapLayout.height - 7)) + else if (y >= (gBackupMapLayout.height - MAP_OFFSET)) { if (!gMapConnectionFlags.south) return CONNECTION_INVALID; return CONNECTION_SOUTH; } - else if (y < 7) + else if (y < MAP_OFFSET) { if (!gMapConnectionFlags.north) return CONNECTION_INVALID; @@ -604,14 +604,14 @@ int GetMapBorderIdAt(int x, int y) int GetPostCameraMoveMapBorderId(int x, int y) { - return GetMapBorderIdAt(gSaveBlock1Ptr->pos.x + 7 + x, gSaveBlock1Ptr->pos.y + 7 + y); + return GetMapBorderIdAt(gSaveBlock1Ptr->pos.x + MAP_OFFSET + x, gSaveBlock1Ptr->pos.y + MAP_OFFSET + y); } bool32 CanCameraMoveInDirection(int direction) { int x, y; - x = gSaveBlock1Ptr->pos.x + 7 + gDirectionToVectors[direction].x; - y = gSaveBlock1Ptr->pos.y + 7 + gDirectionToVectors[direction].y; + x = gSaveBlock1Ptr->pos.x + MAP_OFFSET + gDirectionToVectors[direction].x; + y = gSaveBlock1Ptr->pos.y + MAP_OFFSET + gDirectionToVectors[direction].y; if (GetMapBorderIdAt(x, y) == CONNECTION_INVALID) return FALSE; @@ -771,14 +771,14 @@ struct MapConnection *GetConnectionAtCoords(s16 x, s16 y) { direction = connection->direction; if ((direction == CONNECTION_DIVE || direction == CONNECTION_EMERGE) - || (direction == CONNECTION_NORTH && y > 6) - || (direction == CONNECTION_SOUTH && y < gMapHeader.mapLayout->height + 7) - || (direction == CONNECTION_WEST && x > 6) - || (direction == CONNECTION_EAST && x < gMapHeader.mapLayout->width + 7)) + || (direction == CONNECTION_NORTH && y > MAP_OFFSET - 1) + || (direction == CONNECTION_SOUTH && y < gMapHeader.mapLayout->height + MAP_OFFSET) + || (direction == CONNECTION_WEST && x > MAP_OFFSET - 1) + || (direction == CONNECTION_EAST && x < gMapHeader.mapLayout->width + MAP_OFFSET)) { continue; } - if (IsPosInConnectingMap(connection, x - 7, y - 7) == TRUE) + if (IsPosInConnectingMap(connection, x - MAP_OFFSET, y - MAP_OFFSET) == TRUE) { return connection; } @@ -789,14 +789,14 @@ struct MapConnection *GetConnectionAtCoords(s16 x, s16 y) void SetCameraFocusCoords(u16 x, u16 y) { - gSaveBlock1Ptr->pos.x = x - 7; - gSaveBlock1Ptr->pos.y = y - 7; + gSaveBlock1Ptr->pos.x = x - MAP_OFFSET; + gSaveBlock1Ptr->pos.y = y - MAP_OFFSET; } void GetCameraFocusCoords(u16 *x, u16 *y) { - *x = gSaveBlock1Ptr->pos.x + 7; - *y = gSaveBlock1Ptr->pos.y + 7; + *x = gSaveBlock1Ptr->pos.x + MAP_OFFSET; + *y = gSaveBlock1Ptr->pos.y + MAP_OFFSET; } // Unused diff --git a/src/item_use.c b/src/item_use.c index c350d9d0b8..0a31816083 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -353,12 +353,14 @@ static bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *events, u8 ta // Check if there are any hidden items on the current map that haven't been picked up if (events->bgEvents[i].kind == BG_EVENT_HIDDEN_ITEM && !FlagGet(events->bgEvents[i].bgUnion.hiddenItem.hiddenItemId + FLAG_HIDDEN_ITEMS_START)) { - itemX = (u16)events->bgEvents[i].x + 7; + itemX = (u16)events->bgEvents[i].x + MAP_OFFSET; distanceX = itemX - playerX; - itemY = (u16)events->bgEvents[i].y + 7; + itemY = (u16)events->bgEvents[i].y + MAP_OFFSET; distanceY = itemY - playerY; - if ((u16)(distanceX + 7) < 15 && (distanceY >= -5) && (distanceY < 6)) + // Player can see 7 metatiles on either side horizontally + // and 5 metatiles on either side vertically + if (distanceX >= -7 && distanceX <= 7 && distanceY >= -5 && distanceY <= 5) SetDistanceOfClosestHiddenItem(taskId, distanceX, distanceY); } } @@ -402,27 +404,27 @@ static bool8 IsHiddenItemPresentInConnection(struct MapConnection *connection, i { // same weird temp variable behavior seen in IsHiddenItemPresentAtCoords case 2: - localOffset = connection->offset + 7; + localOffset = connection->offset + MAP_OFFSET; localX = x - localOffset; - localLength = mapHeader->mapLayout->height - 7; + localLength = mapHeader->mapLayout->height - MAP_OFFSET; localY = localLength + y; // additions are reversed for some reason break; case 1: - localOffset = connection->offset + 7; + localOffset = connection->offset + MAP_OFFSET; localX = x - localOffset; - localLength = gMapHeader.mapLayout->height + 7; + localLength = gMapHeader.mapLayout->height + MAP_OFFSET; localY = y - localLength; break; case 3: - localLength = mapHeader->mapLayout->width - 7; + localLength = mapHeader->mapLayout->width - MAP_OFFSET; localX = localLength + x; // additions are reversed for some reason - localOffset = connection->offset + 7; + localOffset = connection->offset + MAP_OFFSET; localY = y - localOffset; break; case 4: - localLength = gMapHeader.mapLayout->width + 7; + localLength = gMapHeader.mapLayout->width + MAP_OFFSET; localX = x - localLength; - localOffset = connection->offset + 7; + localOffset = connection->offset + MAP_OFFSET; localY = y - localOffset; break; default: @@ -435,14 +437,16 @@ static void CheckForHiddenItemsInMapConnection(u8 taskId) { s16 playerX, playerY; s16 x, y; - s16 width = gMapHeader.mapLayout->width + 7; - s16 height = gMapHeader.mapLayout->height + 7; + s16 width = gMapHeader.mapLayout->width + MAP_OFFSET; + s16 height = gMapHeader.mapLayout->height + MAP_OFFSET; - s16 var1 = 7; - s16 var2 = 7; + s16 var1 = MAP_OFFSET; + s16 var2 = MAP_OFFSET; PlayerGetDestCoords(&playerX, &playerY); + // Player can see 7 metatiles on either side horizontally + // and 5 metatiles on either side vertically for (x = playerX - 7; x <= playerX + 7; x++) { for (y = playerY - 5; y <= playerY + 5; y++) diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 65aae72552..7fc883ca18 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -479,7 +479,9 @@ static void SetInvisibleMirageTowerMetatiles(void) { u8 i; for (i = 0; i < ARRAY_COUNT(sInvisibleMirageTowerMetatiles); i++) - MapGridSetMetatileIdAt(sInvisibleMirageTowerMetatiles[i].x + 7, sInvisibleMirageTowerMetatiles[i].y + 7, sInvisibleMirageTowerMetatiles[i].metatileId); + MapGridSetMetatileIdAt(sInvisibleMirageTowerMetatiles[i].x + MAP_OFFSET, + sInvisibleMirageTowerMetatiles[i].y + MAP_OFFSET, + sInvisibleMirageTowerMetatiles[i].metatileId); DrawWholeMapView(); } diff --git a/src/overworld.c b/src/overworld.c index cfe8489cef..71cfeaac9c 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -683,7 +683,7 @@ void UpdateEscapeWarp(s16 x, s16 y) u8 currMapType = GetCurrentMapType(); u8 destMapType = GetMapTypeByGroupAndId(sWarpDestination.mapGroup, sWarpDestination.mapNum); if (IsMapTypeOutdoors(currMapType) && IsMapTypeOutdoors(destMapType) != TRUE) - SetEscapeWarp(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x - 7, y - 6); + SetEscapeWarp(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET + 1); } void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) @@ -957,7 +957,7 @@ static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStr static u16 GetCenterScreenMetatileBehavior(void) { - return MapGridGetMetatileBehaviorAt(gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7); + return MapGridGetMetatileBehaviorAt(gSaveBlock1Ptr->pos.x + MAP_OFFSET, gSaveBlock1Ptr->pos.y + MAP_OFFSET); } bool32 Overworld_IsBikingAllowed(void) diff --git a/src/rotating_gate.c b/src/rotating_gate.c index 997404c271..ea2eec1261 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -711,14 +711,14 @@ static void RotatingGate_CreateGatesWithinViewport(s16 deltaX, s16 deltaY) // Calculate the bounding box of the camera // Same as RotatingGate_DestroyGatesOutsideViewport s16 x = gSaveBlock1Ptr->pos.x - 2; - s16 x2 = gSaveBlock1Ptr->pos.x + 0x11; + s16 x2 = gSaveBlock1Ptr->pos.x + MAP_OFFSET_W + 2; s16 y = gSaveBlock1Ptr->pos.y - 2; - s16 y2 = gSaveBlock1Ptr->pos.y + 0xe; + s16 y2 = gSaveBlock1Ptr->pos.y + MAP_OFFSET_H; for (i = 0; i < gRotatingGate_PuzzleCount; i++) { - s16 x3 = gRotatingGate_PuzzleConfig[i].x + 7; - s16 y3 = gRotatingGate_PuzzleConfig[i].y + 7; + s16 x3 = gRotatingGate_PuzzleConfig[i].x + MAP_OFFSET; + s16 y3 = gRotatingGate_PuzzleConfig[i].y + MAP_OFFSET; if (y <= y3 && y2 >= y3 && x <= x3 && x2 >= x3 && gRotatingGate_GateSpriteIds[i] == MAX_SPRITES) @@ -748,8 +748,8 @@ static u8 RotatingGate_CreateGate(u8 gateId, s16 deltaX, s16 deltaY) if (spriteId == MAX_SPRITES) return MAX_SPRITES; - x = gate->x + 7; - y = gate->y + 7; + x = gate->x + MAP_OFFSET; + y = gate->y + MAP_OFFSET; sprite = &gSprites[spriteId]; sprite->data[0] = gateId; @@ -803,15 +803,15 @@ static void RotatingGate_HideGatesOutsideViewport(struct Sprite *sprite) x = sprite->x + sprite->x2 + sprite->centerToCornerVecX + gSpriteCoordOffsetX; y = sprite->y + sprite->y2 + sprite->centerToCornerVecY + gSpriteCoordOffsetY; - x2 = x + 0x40; // Dimensions of the rotating gate - y2 = y + 0x40; + x2 = x + 64; // Dimensions of the rotating gate + y2 = y + 64; - if ((s16)x > DISPLAY_WIDTH + 0x10 - 1 || x2 < -0x10) + if ((s16)x > DISPLAY_WIDTH + 16 - 1 || x2 < -16) { sprite->invisible = TRUE; } - if ((s16)y > DISPLAY_HEIGHT + 0x10 - 1 || y2 < -0x10) + if ((s16)y > DISPLAY_HEIGHT + 16 - 1 || y2 < -16) { sprite->invisible = TRUE; } @@ -828,14 +828,14 @@ static void RotatingGate_DestroyGatesOutsideViewport(void) // Same as RotatingGate_CreateGatesWithinViewport s16 x = gSaveBlock1Ptr->pos.x - 2; - s16 x2 = gSaveBlock1Ptr->pos.x + 0x11; + s16 x2 = gSaveBlock1Ptr->pos.x + MAP_OFFSET_W + 2; s16 y = gSaveBlock1Ptr->pos.y - 2; - s16 y2 = gSaveBlock1Ptr->pos.y + 0xe; + s16 y2 = gSaveBlock1Ptr->pos.y + MAP_OFFSET_H; for (i = 0; i < gRotatingGate_PuzzleCount; i++) { - s16 xGate = gRotatingGate_PuzzleConfig[i].x + 7; - s16 yGate = gRotatingGate_PuzzleConfig[i].y + 7; + s16 xGate = gRotatingGate_PuzzleConfig[i].x + MAP_OFFSET; + s16 yGate = gRotatingGate_PuzzleConfig[i].y + MAP_OFFSET; if (gRotatingGate_GateSpriteIds[i] == MAX_SPRITES) continue; @@ -868,8 +868,8 @@ static s32 RotatingGate_CanRotate(u8 gateId, s32 rotationDirection) orientation = RotatingGate_GetGateOrientation(gateId); shape = gRotatingGate_PuzzleConfig[gateId].shape; - x = gRotatingGate_PuzzleConfig[gateId].x + 7; - y = gRotatingGate_PuzzleConfig[gateId].y + 7; + x = gRotatingGate_PuzzleConfig[gateId].x + MAP_OFFSET; + y = gRotatingGate_PuzzleConfig[gateId].y + MAP_OFFSET; // Loop through the gate's "arms" clockwise (north, south, east, west) for (i = GATE_ARM_NORTH; i <= GATE_ARM_WEST; i++) @@ -964,8 +964,8 @@ bool8 CheckForRotatingGatePuzzleCollision(u8 direction, s16 x, s16 y) return FALSE; for (i = 0; i < gRotatingGate_PuzzleCount; i++) { - s16 gateX = gRotatingGate_PuzzleConfig[i].x + 7; - s16 gateY = gRotatingGate_PuzzleConfig[i].y + 7; + s16 gateX = gRotatingGate_PuzzleConfig[i].x + MAP_OFFSET; + s16 gateY = gRotatingGate_PuzzleConfig[i].y + MAP_OFFSET; if (gateX - 2 <= x && x <= gateX + 1 && gateY - 2 <= y && y <= gateY + 1) { @@ -1002,8 +1002,8 @@ bool8 CheckForRotatingGatePuzzleCollisionWithoutAnimation(u8 direction, s16 x, s return FALSE; for (i = 0; i < gRotatingGate_PuzzleCount; i++) { - s16 gateX = gRotatingGate_PuzzleConfig[i].x + 7; - s16 gateY = gRotatingGate_PuzzleConfig[i].y + 7; + s16 gateX = gRotatingGate_PuzzleConfig[i].x + MAP_OFFSET; + s16 gateY = gRotatingGate_PuzzleConfig[i].y + MAP_OFFSET; if (gateX - 2 <= x && x <= gateX + 1 && gateY - 2 <= y && y <= gateY + 1) { diff --git a/src/rotating_tile_puzzle.c b/src/rotating_tile_puzzle.c index a3bee41808..56be9736f5 100644 --- a/src/rotating_tile_puzzle.c +++ b/src/rotating_tile_puzzle.c @@ -119,8 +119,8 @@ u16 MoveRotatingTileObjects(u8 puzzleNumber) { s32 puzzleTileStart; u8 puzzleTileNum; - s16 x = objectEvents[i].x + 7; - s16 y = objectEvents[i].y + 7; + s16 x = objectEvents[i].x + MAP_OFFSET; + s16 y = objectEvents[i].y + MAP_OFFSET; u16 metatile = MapGridGetMetatileIdAt(x, y); if (!sRotatingTilePuzzle->isTrickHouse) @@ -211,8 +211,8 @@ void TurnRotatingTileObjects(void) s32 rotation; s8 tileDifference; u8 objectEventId; - s16 x = objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].x + 7; - s16 y = objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].y + 7; + s16 x = objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].x + MAP_OFFSET; + s16 y = objectEvents[sRotatingTilePuzzle->objects[i].eventTemplateId].y + MAP_OFFSET; u16 metatile = MapGridGetMetatileIdAt(x, y); // NOTE: The following 2 assignments and if else could all be replaced with rotation = ROTATE_COUNTERCLOCKWISE @@ -322,8 +322,8 @@ static void TurnUnsavedRotatingTileObject(u8 eventTemplateId, u8 puzzleTileNum) s32 puzzleTileStart; u16 movementType; struct ObjectEventTemplate *objectEvents = gSaveBlock1Ptr->objectEventTemplates; - s16 x = objectEvents[eventTemplateId].x + 7; - s16 y = objectEvents[eventTemplateId].y + 7; + s16 x = objectEvents[eventTemplateId].x + MAP_OFFSET; + s16 y = objectEvents[eventTemplateId].y + MAP_OFFSET; u16 metatile = MapGridGetMetatileIdAt(x, y); if (!sRotatingTilePuzzle->isTrickHouse) diff --git a/src/scrcmd.c b/src/scrcmd.c index dfda7b3a2d..de0ec7c263 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -791,9 +791,9 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx) PlayerGetDestCoords(&x, &y); if (mapGroup == 0xFF && mapNum == 0xFF) - SetWarpDestinationToFixedHoleWarp(x - 7, y - 7); + SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET); else - SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7); + SetWarpDestination(mapGroup, mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET); DoFallWarp(); ResetInitialPlayerAvatarState(); return TRUE; @@ -2043,8 +2043,8 @@ bool8 ScrCmd_setmetatile(struct ScriptContext *ctx) u16 tileId = VarGet(ScriptReadHalfword(ctx)); u16 isImpassable = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; if (!isImpassable) MapGridSetMetatileIdAt(x, y, tileId); else @@ -2057,8 +2057,8 @@ bool8 ScrCmd_opendoor(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; PlaySE(GetDoorSoundEffect(x, y)); FieldAnimateDoorOpen(x, y); return FALSE; @@ -2069,8 +2069,8 @@ bool8 ScrCmd_closedoor(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; FieldAnimateDoorClose(x, y); return FALSE; } @@ -2094,8 +2094,8 @@ bool8 ScrCmd_setdooropen(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; FieldSetDoorOpened(x, y); return FALSE; } @@ -2105,8 +2105,8 @@ bool8 ScrCmd_setdoorclosed(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; FieldSetDoorClosed(x, y); return FALSE; } diff --git a/src/secret_base.c b/src/secret_base.c index 0a1472e311..e728f34884 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -390,8 +390,8 @@ void SetOccupiedSecretBaseEntranceMetatiles(struct MapEvents const *events) { if (gSaveBlock1Ptr->secretBases[j].secretBaseId == events->bgEvents[bgId].bgUnion.secretBaseId) { - s16 x = events->bgEvents[bgId].x + 7; - s16 y = events->bgEvents[bgId].y + 7; + s16 x = events->bgEvents[bgId].x + MAP_OFFSET; + s16 y = events->bgEvents[bgId].y + MAP_OFFSET; s16 tile_id = MapGridGetMetatileIdAt(x, y); for (i = 0; i < ARRAY_COUNT(sSecretBaseEntranceMetatiles); i++) { @@ -474,8 +474,8 @@ static void EnterNewlyCreatedSecretBase_StartFadeIn(void) ScriptContext2_Enable(); HideMapNamePopUpWindow(); FindMetatileIdMapCoords(&x, &y, METATILE_SecretBase_PC); - x += 7; - y += 7; + x += MAP_OFFSET; + y += MAP_OFFSET; MapGridSetMetatileIdAt(x, y, METATILE_SecretBase_PC | METATILE_COLLISION_MASK); CurrentMapDrawMetatileAt(x, y); FadeInFromBlack(); @@ -530,20 +530,20 @@ void InitSecretBaseAppearance(bool8 hidePC) for (x = 0; x < DECOR_MAX_SECRET_BASE; x++) { if (decorations[x] > 0 && decorations[x] <= NUM_DECORATIONS && gDecorations[decorations[x]].permission != DECORPERM_SPRITE) - ShowDecorationOnMap((decorPos[x] >> 4) + 7, (decorPos[x] & 0xF) + 7, decorations[x]); + ShowDecorationOnMap((decorPos[x] >> 4) + MAP_OFFSET, (decorPos[x] & 0xF) + MAP_OFFSET, decorations[x]); } if (secretBaseIdx != 0) { // Another player's secret base. Change PC type to the "Register" PC. FindMetatileIdMapCoords(&x, &y, METATILE_SecretBase_PC); - MapGridSetMetatileIdAt(x + 7, y + 7, METATILE_SecretBase_RegisterPC | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x + MAP_OFFSET, y + MAP_OFFSET, METATILE_SecretBase_RegisterPC | METATILE_COLLISION_MASK); } else if (hidePC == TRUE && VarGet(VAR_SECRET_BASE_INITIALIZED) == 1) { // Change PC to regular ground tile. FindMetatileIdMapCoords(&x, &y, METATILE_SecretBase_PC); - MapGridSetMetatileIdAt(x + 7, y + 7, METATILE_SecretBase_Ground | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x + MAP_OFFSET, y + MAP_OFFSET, METATILE_SecretBase_Ground | METATILE_COLLISION_MASK); } } } @@ -594,7 +594,7 @@ void InitSecretBaseDecorationSprites(void) gSpecialVar_0x8006 = decorationPositions[i] >> 4; gSpecialVar_0x8007 = decorationPositions[i] & 0xF; - metatileBehavior = MapGridGetMetatileBehaviorAt(gSpecialVar_0x8006 + 7, gSpecialVar_0x8007 + 7); + metatileBehavior = MapGridGetMetatileBehaviorAt(gSpecialVar_0x8006 + MAP_OFFSET, gSpecialVar_0x8007 + MAP_OFFSET); if (MetatileBehavior_HoldsSmallDecoration(metatileBehavior) == TRUE || MetatileBehavior_HoldsLargeDecoration(metatileBehavior) == TRUE) { @@ -660,7 +660,9 @@ void SetCurSecretBaseIdFromPosition(const struct MapPosition *position, const st s16 i; for (i = 0; i < events->bgEventCount; i++) { - if (events->bgEvents[i].kind == BG_EVENT_SECRET_BASE && position->x == events->bgEvents[i].x + 7 && position->y == events->bgEvents[i].y + 7) + if (events->bgEvents[i].kind == BG_EVENT_SECRET_BASE + && position->x == events->bgEvents[i].x + MAP_OFFSET + && position->y == events->bgEvents[i].y + MAP_OFFSET) { sCurSecretBaseId = events->bgEvents[i].bgUnion.secretBaseId; break; @@ -830,12 +832,14 @@ static void ClosePlayerSecretBaseEntrance(void) if (events->bgEvents[i].kind == BG_EVENT_SECRET_BASE && gSaveBlock1Ptr->secretBases[0].secretBaseId == events->bgEvents[i].bgUnion.secretBaseId) { - metatileId = MapGridGetMetatileIdAt(events->bgEvents[i].x + 7, events->bgEvents[i].y + 7); + metatileId = MapGridGetMetatileIdAt(events->bgEvents[i].x + MAP_OFFSET, events->bgEvents[i].y + MAP_OFFSET); for (j = 0; j < ARRAY_COUNT(sSecretBaseEntranceMetatiles); j++) { if (sSecretBaseEntranceMetatiles[j].openMetatileId == metatileId) { - MapGridSetMetatileIdAt(events->bgEvents[i].x + 7, events->bgEvents[i].y + 7, sSecretBaseEntranceMetatiles[j].closedMetatileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(events->bgEvents[i].x + MAP_OFFSET, + events->bgEvents[i].y + MAP_OFFSET, + sSecretBaseEntranceMetatiles[j].closedMetatileId | METATILE_COLLISION_MASK); break; } } diff --git a/src/union_room.c b/src/union_room.c index 03f7fc02b5..fb1604879b 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -11,6 +11,7 @@ #include "easy_chat.h" #include "event_data.h" #include "event_object_lock.h" +#include "fieldmap.h" #include "field_control_avatar.h" #include "field_player_avatar.h" #include "field_screen_effect.h" @@ -3989,10 +3990,10 @@ static bool32 IsPlayerFacingTradingBoard(void) s16 x, y; GetXYCoordsOneStepInFrontOfPlayer(&x, &y); - if (x != 2 + 7) + if (x != 2 + MAP_OFFSET) return FALSE; - if (y != 1 + 7) + if (y != 1 + MAP_OFFSET) return FALSE; if (gPlayerAvatar.tileTransitionState == T_TILE_CENTER || gPlayerAvatar.tileTransitionState == T_NOT_MOVING) diff --git a/src/union_room_player_avatar.c b/src/union_room_player_avatar.c index ff6c90b255..77eee6e4aa 100644 --- a/src/union_room_player_avatar.c +++ b/src/union_room_player_avatar.c @@ -125,14 +125,14 @@ static u8 GetUnionRoomPlayerGraphicsId(u32 gender, u32 id) static void GetUnionRoomPlayerFacingCoords(u32 playerIdx, u32 direction, s32 * x, s32 * y) { - *x = sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0] + 7; - *y = sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1] + 7; + *x = sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0] + MAP_OFFSET; + *y = sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1] + MAP_OFFSET; } static bool32 IsUnionRoomPlayerFacingTileAt(u32 playerIdx, u32 direction, s32 x, s32 y) { - if ((sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0] + 7 == x) - && (sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1] + 7 == y)) + if ((sUnionRoomPlayerCoords[playerIdx][0] + sFacingDirectionOffsets[direction][0] + MAP_OFFSET == x) + && (sUnionRoomPlayerCoords[playerIdx][1] + sFacingDirectionOffsets[direction][1] + MAP_OFFSET == y)) return TRUE; else return FALSE; diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 8bcb176055..32316c1195 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -70,7 +70,7 @@ static u16 GetRoute119WaterTileNum(s16 x, s16 y, u8 section) { for (xCur = 0; xCur < gMapHeader.mapLayout->width; xCur++) { - u8 tileBehaviorId = MapGridGetMetatileBehaviorAt(xCur + 7, yCur + 7); + u8 tileBehaviorId = MapGridGetMetatileBehaviorAt(xCur + MAP_OFFSET, yCur + MAP_OFFSET); if (MetatileBehavior_IsSurfableAndNotWaterfall(tileBehaviorId) == TRUE) { tileNum++; @@ -95,8 +95,8 @@ static bool8 CheckFeebas(void) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE119)) { GetXYCoordsOneStepInFrontOfPlayer(&x, &y); - x -= 7; - y -= 7; + x -= MAP_OFFSET; + y -= MAP_OFFSET; if (y >= gRoute119WaterTileData[3 * 0 + 0] && y <= gRoute119WaterTileData[3 * 0 + 1]) route119Section = 0; From ff01eb951b89afe141cbe81a9c2524df17bd63d3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 9 Oct 2021 13:21:14 -0400 Subject: [PATCH 047/417] Use TRACKS constants for sGroundEffectTracksFuncs --- src/event_object_movement.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 2a606f72a7..2f7cb9e7a2 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -7937,9 +7937,9 @@ void GroundEffect_FlowingWater(struct ObjectEvent *objEvent, struct Sprite *spri } static void (*const sGroundEffectTracksFuncs[])(struct ObjectEvent *objEvent, struct Sprite *sprite, u8 a) = { - DoTracksGroundEffect_None, - DoTracksGroundEffect_Footprints, - DoTracksGroundEffect_BikeTireTracks, + [TRACKS_NONE] = DoTracksGroundEffect_None, + [TRACKS_FOOT] = DoTracksGroundEffect_Footprints, + [TRACKS_BIKE_TIRE] = DoTracksGroundEffect_BikeTireTracks, }; void GroundEffect_SandTracks(struct ObjectEvent *objEvent, struct Sprite *sprite) From b01213b8bc0e4f82a0ab7505b4fe7db2e2d0ddf2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 9 Oct 2021 14:18:05 -0400 Subject: [PATCH 048/417] Some constants in wild_encounter.c, document Feebas spot generation --- src/wild_encounter.c | 137 +++++++++++++++++++++++++------------------ 1 file changed, 80 insertions(+), 57 deletions(-) diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 32316c1195..5d74257629 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -25,9 +25,27 @@ extern const u8 EventScript_RepelWoreOff[]; -#define NUM_FEEBAS_SPOTS 6 +#define MAX_ENCOUNTER_RATE 2880 + +#define NUM_FEEBAS_SPOTS 6 + +// Number of accessible fishing spots in each section of Route 119 +// Each section is an area of the route between the y coordinates in sRoute119WaterTileData +#define NUM_FISHING_SPOTS_1 131 +#define NUM_FISHING_SPOTS_2 167 +#define NUM_FISHING_SPOTS_3 149 +#define NUM_FISHING_SPOTS (NUM_FISHING_SPOTS_1 + NUM_FISHING_SPOTS_2 + NUM_FISHING_SPOTS_3) + +enum { + WILD_AREA_LAND, + WILD_AREA_WATER, + WILD_AREA_ROCKS, + WILD_AREA_FISHING, +}; + +#define WILD_CHECK_REPEL (1 << 0) +#define WILD_CHECK_KEEN_EYE (1 << 1) -// this file's functions static u16 FeebasRandom(void); static void FeebasSeedRng(u16 seed); static bool8 IsWildLevelAllowedByRepel(u8 level); @@ -36,60 +54,64 @@ static void ApplyCleanseTagEncounterRateMod(u32 *encRate); static bool8 TryGetAbilityInfluencedWildMonIndex(const struct WildPokemon *wildMon, u8 type, u8 ability, u8 *monIndex); static bool8 IsAbilityAllowingEncounter(u8 level); -// EWRAM vars EWRAM_DATA static u8 sWildEncountersDisabled = 0; EWRAM_DATA static u32 sFeebasRngValue = 0; #include "data/wild_encounters.h" -//Special Feebas-related data. -const struct WildPokemon gWildFeebasRoute119Data = {20, 25, SPECIES_FEEBAS}; +static const struct WildPokemon sWildFeebas = {20, 25, SPECIES_FEEBAS}; -const u16 gRoute119WaterTileData[] = +static const u16 sRoute119WaterTileData[] = { - 0, 0x2D, 0, - 0x2E, 0x5B, 0x83, - 0x5C, 0x8B, 0x12A, +//yMin, yMax, numSpots in previous sections + 0, 45, 0, + 46, 91, NUM_FISHING_SPOTS_1, + 92, 139, NUM_FISHING_SPOTS_1 + NUM_FISHING_SPOTS_2, }; -// code void DisableWildEncounters(bool8 disabled) { sWildEncountersDisabled = disabled; } -static u16 GetRoute119WaterTileNum(s16 x, s16 y, u8 section) +// Each fishing spot on Route 119 is given a number between 1 and NUM_FISHING_SPOTS inclusive. +// The number is determined by counting the valid fishing spots left to right top to bottom. +// The map is divided into three sections, with each section having a pre-counted number of +// fishing spots to start from to avoid counting a large number of spots at the bottom of the map. +// Note that a spot is considered valid if it is surfable and not a waterfall. To exclude all +// of the inaccessible water metatiles (so that they can't be selected as a Feebas spot) they +// use a different metatile that isn't actually surfable because it has MB_NORMAL instead. +// This function is given the coordinates and section of a fishing spot and returns which number it is. +static u16 GetFeebasFishingSpotId(s16 targetX, s16 targetY, u8 section) { - u16 xCur; - u16 yCur; - u16 yMin = gRoute119WaterTileData[section * 3 + 0]; - u16 yMax = gRoute119WaterTileData[section * 3 + 1]; - u16 tileNum = gRoute119WaterTileData[section * 3 + 2]; + u16 x, y; + u16 yMin = sRoute119WaterTileData[section * 3 + 0]; + u16 yMax = sRoute119WaterTileData[section * 3 + 1]; + u16 spotId = sRoute119WaterTileData[section * 3 + 2]; - for (yCur = yMin; yCur <= yMax; yCur++) + for (y = yMin; y <= yMax; y++) { - for (xCur = 0; xCur < gMapHeader.mapLayout->width; xCur++) + for (x = 0; x < gMapHeader.mapLayout->width; x++) { - u8 tileBehaviorId = MapGridGetMetatileBehaviorAt(xCur + MAP_OFFSET, yCur + MAP_OFFSET); - if (MetatileBehavior_IsSurfableAndNotWaterfall(tileBehaviorId) == TRUE) + u8 behavior = MapGridGetMetatileBehaviorAt(x + MAP_OFFSET, y + MAP_OFFSET); + if (MetatileBehavior_IsSurfableAndNotWaterfall(behavior) == TRUE) { - tileNum++; - if (x == xCur && y == yCur) - return tileNum; + spotId++; + if (targetX == x && targetY == y) + return spotId; } } } - return tileNum + 1; + return spotId + 1; } static bool8 CheckFeebas(void) { u8 i; u16 feebasSpots[NUM_FEEBAS_SPOTS]; - s16 x; - s16 y; + s16 x, y; u8 route119Section = 0; - u16 waterTileNum; + u16 spotId; if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE119) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE119)) @@ -98,29 +120,42 @@ static bool8 CheckFeebas(void) x -= MAP_OFFSET; y -= MAP_OFFSET; - if (y >= gRoute119WaterTileData[3 * 0 + 0] && y <= gRoute119WaterTileData[3 * 0 + 1]) + // Get which third of the map the player is in + if (y >= sRoute119WaterTileData[3 * 0 + 0] && y <= sRoute119WaterTileData[3 * 0 + 1]) route119Section = 0; - if (y >= gRoute119WaterTileData[3 * 1 + 0] && y <= gRoute119WaterTileData[3 * 1 + 1]) + if (y >= sRoute119WaterTileData[3 * 1 + 0] && y <= sRoute119WaterTileData[3 * 1 + 1]) route119Section = 1; - if (y >= gRoute119WaterTileData[3 * 2 + 0] && y <= gRoute119WaterTileData[3 * 2 + 1]) + if (y >= sRoute119WaterTileData[3 * 2 + 0] && y <= sRoute119WaterTileData[3 * 2 + 1]) route119Section = 2; - if (Random() % 100 > 49) // 50% chance of encountering Feebas + // 50% chance of encountering Feebas (assuming this is a Feebas spot) + if (Random() % 100 > 49) return FALSE; FeebasSeedRng(gSaveBlock1Ptr->dewfordTrends[0].rand); + + // Assign each Feebas spot to a random fishing spot. + // Randomness is fixed depending on the seed above. for (i = 0; i != NUM_FEEBAS_SPOTS;) { - feebasSpots[i] = FeebasRandom() % 447; + feebasSpots[i] = FeebasRandom() % NUM_FISHING_SPOTS; if (feebasSpots[i] == 0) - feebasSpots[i] = 447; + feebasSpots[i] = NUM_FISHING_SPOTS; + + // < 1 below is a pointless check, it will never be TRUE. + // >= 4 to skip fishing spots 1-3, because these are inaccessible + // spots at the top of the map, at (9,7), (7,13), and (15,16). + // The first accessible fishing spot is spot 4 at (18,18). if (feebasSpots[i] < 1 || feebasSpots[i] >= 4) i++; } - waterTileNum = GetRoute119WaterTileNum(x, y, route119Section); + + // Check which fishing spot the player is at, and see if + // it matches any of the Feebas spots. + spotId = GetFeebasFishingSpotId(x, y, route119Section); for (i = 0; i < NUM_FEEBAS_SPOTS; i++) { - if (waterTileNum == feebasSpots[i]) + if (spotId == feebasSpots[i]) return TRUE; } } @@ -256,7 +291,6 @@ static u8 ChooseWildMonLevel(const struct WildPokemon *wildPokemon) rand--; } } - return min + rand; } @@ -365,24 +399,13 @@ static void CreateWildMon(u16 species, u8 level) else gender = MON_FEMALE; - CreateMonWithGenderNatureLetter(&gEnemyParty[0], species, level, 32, gender, PickWildMonNature(), 0); + CreateMonWithGenderNatureLetter(&gEnemyParty[0], species, level, USE_RANDOM_IVS, gender, PickWildMonNature(), 0); return; } - CreateMonWithNature(&gEnemyParty[0], species, level, 32, PickWildMonNature()); + CreateMonWithNature(&gEnemyParty[0], species, level, USE_RANDOM_IVS, PickWildMonNature()); } -enum -{ - WILD_AREA_LAND, - WILD_AREA_WATER, - WILD_AREA_ROCKS, - WILD_AREA_FISHING, -}; - -#define WILD_CHECK_REPEL 0x1 -#define WILD_CHECK_KEEN_EYE 0x2 - static bool8 TryGenerateWildMon(const struct WildPokemonInfo *wildMonInfo, u8 area, u8 flags) { u8 wildMonIndex = 0; @@ -436,7 +459,7 @@ static bool8 SetUpMassOutbreakEncounter(u8 flags) return FALSE; CreateWildMon(gSaveBlock1Ptr->outbreakPokemonSpecies, gSaveBlock1Ptr->outbreakPokemonLevel); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(&gEnemyParty[0], gSaveBlock1Ptr->outbreakPokemonMoves[i], i); return TRUE; @@ -444,7 +467,7 @@ static bool8 SetUpMassOutbreakEncounter(u8 flags) static bool8 DoMassOutbreakEncounterTest(void) { - if (gSaveBlock1Ptr->outbreakPokemonSpecies != 0 + if (gSaveBlock1Ptr->outbreakPokemonSpecies != SPECIES_NONE && gSaveBlock1Ptr->location.mapNum == gSaveBlock1Ptr->outbreakLocationMapNum && gSaveBlock1Ptr->location.mapGroup == gSaveBlock1Ptr->outbreakLocationMapGroup) { @@ -456,7 +479,7 @@ static bool8 DoMassOutbreakEncounterTest(void) static bool8 DoWildEncounterRateDiceRoll(u16 encounterRate) { - if (Random() % 2880 < encounterRate) + if (Random() % MAX_ENCOUNTER_RATE < encounterRate) return TRUE; else return FALSE; @@ -486,8 +509,8 @@ static bool8 DoWildEncounterRateTest(u32 encounterRate, bool8 ignoreAbility) else if (ability == ABILITY_SAND_VEIL && gSaveBlock1Ptr->weather == WEATHER_SANDSTORM) encounterRate /= 2; } - if (encounterRate > 2880) - encounterRate = 2880; + if (encounterRate > MAX_ENCOUNTER_RATE) + encounterRate = MAX_ENCOUNTER_RATE; return DoWildEncounterRateDiceRoll(encounterRate); } @@ -639,7 +662,7 @@ void RockSmashWildEncounter(void) gSpecialVar_Result = FALSE; } else if (DoWildEncounterRateTest(wildPokemonInfo->encounterRate, 1) == TRUE - && TryGenerateWildMon(wildPokemonInfo, 2, WILD_CHECK_REPEL | WILD_CHECK_KEEN_EYE) == TRUE) + && TryGenerateWildMon(wildPokemonInfo, WILD_AREA_ROCKS, WILD_CHECK_REPEL | WILD_CHECK_KEEN_EYE) == TRUE) { BattleSetup_StartWildBattle(); gSpecialVar_Result = TRUE; @@ -744,9 +767,9 @@ void FishingWildEncounter(u8 rod) if (CheckFeebas() == TRUE) { - u8 level = ChooseWildMonLevel(&gWildFeebasRoute119Data); + u8 level = ChooseWildMonLevel(&sWildFeebas); - species = gWildFeebasRoute119Data.species; + species = sWildFeebas.species; CreateWildMon(species, level); } else From b8a44bf10a5bfbe35381b744d86f535a14c0969a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 11 Oct 2021 10:35:53 -0400 Subject: [PATCH 049/417] Calculate pokemon substruct size, missing MON_PIC_SIZE --- include/pokemon.h | 13 +++++++++++-- src/battle_gfx_sfx_util.c | 4 ++-- src/pokemon.c | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index 229898d711..315416c383 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -76,13 +76,22 @@ struct PokemonSubstruct3 /* 0x0B */ u32 eventLegal:1; // controls Mew & Deoxys obedience; if set, Pokémon is a fateful encounter in Gen 4+; set for in-game event island legendaries, some distributed events, and Pokémon from XD: Gale of Darkness. }; +// Number of bytes in the largest Pokémon substruct. +// They are assumed to be the same size, and will be padded to +// the largest size by the union. +// By default they are all 12 bytes. +#define NUM_SUBSTRUCT_BYTES (max(sizeof(struct PokemonSubstruct0), \ + max(sizeof(struct PokemonSubstruct1), \ + max(sizeof(struct PokemonSubstruct2), \ + sizeof(struct PokemonSubstruct3))))) + union PokemonSubstruct { struct PokemonSubstruct0 type0; struct PokemonSubstruct1 type1; struct PokemonSubstruct2 type2; struct PokemonSubstruct3 type3; - u16 raw[6]; + u16 raw[NUM_SUBSTRUCT_BYTES / 2]; // /2 because it's u16, not u8 }; struct BoxPokemon @@ -102,7 +111,7 @@ struct BoxPokemon union { - u32 raw[12]; + u32 raw[(NUM_SUBSTRUCT_BYTES * 4) / 4]; // *4 because there are 4 substructs, /4 because it's u32, not u8 union PokemonSubstruct substructs[4]; } secure; }; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 77c50dc181..c01c76b7cd 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -1248,11 +1248,11 @@ void AllocateMonSpritesGfx(void) gMonSpritesGfxPtr = NULL; gMonSpritesGfxPtr = AllocZeroed(sizeof(*gMonSpritesGfxPtr)); - gMonSpritesGfxPtr->firstDecompressed = AllocZeroed(0x8000); + gMonSpritesGfxPtr->firstDecompressed = AllocZeroed(MON_PIC_SIZE * 4 * MAX_BATTLERS_COUNT); for (i = 0; i < MAX_BATTLERS_COUNT; i++) { - gMonSpritesGfxPtr->sprites.ptr[i] = gMonSpritesGfxPtr->firstDecompressed + (i * 0x2000); + gMonSpritesGfxPtr->sprites.ptr[i] = gMonSpritesGfxPtr->firstDecompressed + (i * MON_PIC_SIZE * 4); *(gMonSpritesGfxPtr->templates + i) = gBattlerSpriteTemplates[i]; for (j = 0; j < 4; j++) diff --git a/src/pokemon.c b/src/pokemon.c index 06a7a01f1e..011e288db8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6876,7 +6876,7 @@ static bool8 ShouldSkipFriendshipChange(void) #define ALLOC_FAIL_BUFFER (1 << 0) #define ALLOC_FAIL_STRUCT (1 << 1) #define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value -#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // * 4 is unnecessary, MON_PIC_SIZE is sufficient +#define GFX_MANAGER_SPR_SIZE (MON_PIC_SIZE * 4) // Only Castform uses more than MON_PIC_SIZE, despite not displaying its forms. #define GFX_MANAGER_NUM_FRAMES 4 // Only 2 frames are needed static void InitMonSpritesGfx_Battle(struct MonSpritesGfxManager* gfx) From 3a7995bc7ce8fda6a763ab14f96a2011f735def6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 11 Oct 2021 10:39:37 -0400 Subject: [PATCH 050/417] Fix misleading RecordMixTrainerNames name --- include/link_rfu.h | 2 +- src/link_rfu_3.c | 2 +- src/union_room.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/link_rfu.h b/include/link_rfu.h index ae123c223c..dfbc716575 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -287,7 +287,7 @@ bool32 WaitRfuState(bool32 force); void GetOtherPlayersInfoFlags(void); void InitializeRfuLinkManager_JoinGroup(void); void SendLeaveGroupNotice(void); -void RecordMixTrainerNames(void); +void SaveLinkTrainerNames(void); void LinkRfu_CreateConnectionAsParent(void); void LinkRfu_StopManagerBeforeEnteringChat(void); void UpdateGameData_SetActivity(u8 activity, u32 partnerInfo, bool32 startedActivity); diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index b513ae4cb1..571f305d0e 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -905,7 +905,7 @@ static bool32 NameIsNotEmpty(const u8 *name) } // Save the currently connected players into the trainer records, shifting all previous records down. -void RecordMixTrainerNames(void) +void SaveLinkTrainerNames(void) { if (gWirelessCommType != 0) { diff --git a/src/union_room.c b/src/union_room.c index e3902a3b64..41d6ded299 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1649,7 +1649,7 @@ static void Task_StartActivity(u8 taskId) case ACTIVITY_BERRY_PICK: case ACTIVITY_SPIN_TRADE: case ACTIVITY_RECORD_CORNER: - RecordMixTrainerNames(); + SaveLinkTrainerNames(); break; } @@ -1762,7 +1762,7 @@ static void Task_RunScriptAndFadeToActivity(u8 taskId) sendBuff[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL); gMain.savedCallback = NULL; data[0] = 4; - RecordMixTrainerNames(); + SaveLinkTrainerNames(); ResetBlockReceivedFlags(); break; case ACTIVITY_BERRY_BLENDER: @@ -1771,7 +1771,7 @@ static void Task_RunScriptAndFadeToActivity(u8 taskId) case ACTIVITY_CONTEST_CUTE: case ACTIVITY_CONTEST_SMART: case ACTIVITY_CONTEST_TOUGH: - RecordMixTrainerNames(); + SaveLinkTrainerNames(); DestroyTask(taskId); default: EnableBothScriptContexts(); From a556856ce94f3b96879eb9972cd1a12a30f4a154 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 11 Oct 2021 11:09:15 -0400 Subject: [PATCH 051/417] Convert sKeyboardChars to 3D array --- src/naming_screen.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/naming_screen.c b/src/naming_screen.c index 19da9da022..f6558921b5 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -286,19 +286,26 @@ static const struct WindowTemplate sWindowTemplates[WIN_COUNT + 1] = // This handles what characters get inserted when a key is pressed // The keys shown on the keyboard are handled separately by sNamingScreenKeyboardText -static const u8 sKeyboardChars[KBPAGE_COUNT * KBROW_COUNT * KBCOL_COUNT] = __( - "abcdef ." - "ghijkl ," - "mnopqrs " - "tuvwxyz " - "ABCDEF ." - "GHIJKL ," - "MNOPQRS " - "TUVWXYZ " - "01234 " - "56789 " - "!?♂♀/- " - "…“”‘' "); +static const u8 sKeyboardChars[KBPAGE_COUNT][KBROW_COUNT][KBCOL_COUNT] = { + [KEYBOARD_LETTERS_LOWER] = { + __("abcdef ."), + __("ghijkl ,"), + __("mnopqrs "), + __("tuvwxyz "), + }, + [KEYBOARD_LETTERS_UPPER] = { + __("ABCDEF ."), + __("GHIJKL ,"), + __("MNOPQRS "), + __("TUVWXYZ "), + }, + [KEYBOARD_SYMBOLS] = { + __("01234 "), + __("56789 "), + __("!?♂♀/- "), + __("…“”‘' "), + } +}; static const u8 sPageColumnCounts[KBPAGE_COUNT] = { [KEYBOARD_LETTERS_LOWER] = KBCOL_COUNT, @@ -1780,7 +1787,7 @@ static void DrawGenderIcon(void) static u8 GetCharAtKeyboardPos(s16 x, s16 y) { - return sKeyboardChars[x + y * KBCOL_COUNT + CurrentPageToKeyboardId() * KBCOL_COUNT * KBROW_COUNT]; + return sKeyboardChars[CurrentPageToKeyboardId()][y][x]; } From f23e0beebac9aa983620c024d691690fedc4e784 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 11 Oct 2021 10:36:05 -0400 Subject: [PATCH 052/417] Rename battle anim cmds, move its data, name remaining symbols --- asm/macros/battle_anim_script.inc | 16 +- data/battle_anim_scripts.s | 136 +- include/constants/battle_anim.h | 3 + src/battle_anim.c | 2099 ++++------------------------- src/data/battle_anim.h | 1625 ++++++++++++++++++++++ 5 files changed, 1955 insertions(+), 1924 deletions(-) create mode 100644 src/data/battle_anim.h diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc index df8953a85a..15c48c39f5 100644 --- a/asm/macros/battle_anim_script.inc +++ b/asm/macros/battle_anim_script.inc @@ -14,7 +14,7 @@ .byte 0x02 .4byte \template .if \anim_battler == ANIM_TARGET - .byte 0x80 | (\subpriority_offset & 0x7F) + .byte ANIMSPRITE_IS_TARGET | (\subpriority_offset & 0x7F) .else .byte (\subpriority_offset & 0x7F) .endif @@ -193,12 +193,12 @@ .4byte \ptr .endm - .macro monbg_22 battler:req + .macro monbg_static battler:req .byte 0x22 .byte \battler .endm - .macro clearmonbg_23 battler:req + .macro clearmonbg_static battler:req .byte 0x23 .byte \battler .endm @@ -233,16 +233,16 @@ .byte \delay .endm - .macro monbgprio_28 battler:req + .macro splitbgprio battler:req .byte 0x28 .byte \battler .endm - .macro monbgprio_29 + .macro splitbgprio_all .byte 0x29 .endm - .macro monbgprio_2A battler:req + .macro splitbgprio_foes battler:req .byte 0x2a .byte \battler .endm @@ -257,12 +257,12 @@ .byte \battler .endm - .macro doublebattle_2D battler:req + .macro teamattack_moveback battler:req .byte 0x2d .byte \battler .endm - .macro doublebattle_2E battler:req + .macro teamattack_movefwd battler:req .byte 0x2e .byte \battler .endm diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 208bab8a62..45cf17c348 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -622,7 +622,7 @@ Move_BODY_SLAM: Move_SUPERSONIC: loadspritegfx ANIM_TAG_GOLD_RING monbg ANIM_ATK_PARTNER - monbgprio_2A ANIM_ATTACKER + splitbgprio_foes ANIM_ATTACKER setalpha 12, 8 createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 2, 0, 8, 1 call SupersonicRing @@ -659,7 +659,7 @@ ScreechRing: Move_FLAME_WHEEL: loadspritegfx ANIM_TAG_SMALL_EMBER monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 56, 0 playsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER delay 2 @@ -702,7 +702,7 @@ Move_PIN_MISSILE: loadspritegfx ANIM_TAG_NEEDLE loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER createsprite gPinMissileSpriteTemplate, ANIM_ATTACKER, 2, 20, -8, -8, -8, 20, -32 @@ -731,7 +731,7 @@ Move_ICICLE_SPEAR: loadspritegfx ANIM_TAG_ICICLE_SPEAR loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_ICY_WIND, SOUND_PAN_ATTACKER createsprite gIcicleSpearSpriteTemplate, ANIM_ATTACKER, 2, 20, -8, -8, -8, 20, -32 @@ -817,7 +817,7 @@ Move_POISON_STING: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_POISON_BUBBLE monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER createsprite gLinearStingerSpriteTemplate, ANIM_TARGET, 2, 20, 0, -8, 0, 20 @@ -836,7 +836,7 @@ Move_TWINEEDLE: loadspritegfx ANIM_TAG_NEEDLE loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 loopsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER, 6, 2 createsprite gLinearStingerSpriteTemplate, ANIM_TARGET, 2, 10, -4, 0, -4, 20 @@ -1029,7 +1029,7 @@ Move_SONIC_BOOM: loadspritegfx ANIM_TAG_AIR_WAVE loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 call SonicBoomProjectile call SonicBoomProjectile @@ -1300,7 +1300,7 @@ Move_SPIKE_CANNON: loadspritegfx ANIM_TAG_NEEDLE loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_WindUpLunge, 5, ANIM_ATTACKER, -4, 0, 4, 6, 8, 4 waitforvisualfinish @@ -1668,7 +1668,7 @@ Move_DEFENSE_CURL: Move_PROTECT: loadspritegfx ANIM_TAG_PROTECT monbg ANIM_ATK_PARTNER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER waitplaysewithpan SE_M_REFLECT, SOUND_PAN_ATTACKER, 16 createsprite gProtectSpriteTemplate, ANIM_ATTACKER, 2, 24, 0, 90 waitforvisualfinish @@ -1882,7 +1882,7 @@ Move_PAY_DAY: loadspritegfx ANIM_TAG_COIN loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER createsprite gCoinThrowSpriteTemplate, ANIM_ATTACKER, 2, 20, 0, 0, 0, 1152 @@ -2190,7 +2190,7 @@ Move_BUBBLE_BEAM: loadspritegfx ANIM_TAG_BUBBLE loadspritegfx ANIM_TAG_SMALL_BUBBLES monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 delay 1 call BulbblebeamCreateBubbles @@ -2287,7 +2287,7 @@ Move_SMOKESCREEN: Move_CONVERSION: loadspritegfx ANIM_TAG_CONVERSION monbg ANIM_ATK_PARTNER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER setalpha 16, 0 delay 0 playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER @@ -2339,7 +2339,7 @@ Move_CONVERSION: Move_CONVERSION_2: loadspritegfx ANIM_TAG_CONVERSION monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET setalpha 0, 16 delay 0 playsewithpan SE_M_BARRIER, SOUND_PAN_TARGET @@ -2657,7 +2657,7 @@ DigSetUp: loadspritegfx ANIM_TAG_DIRT_MOUND createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, 180 createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0, 1, 180 - monbg_22 ANIM_ATTACKER + monbg_static ANIM_ATTACKER delay 1 createvisualtask AnimTask_DigDownMovement, 2, FALSE delay 6 @@ -2667,7 +2667,7 @@ DigSetUp: call DigThrowDirt call DigThrowDirt waitforvisualfinish - clearmonbg_23 ANIM_ATTACKER + clearmonbg_static ANIM_ATTACKER delay 1 createvisualtask AnimTask_DigDownMovement, 2, TRUE goto DigEnd @@ -3156,7 +3156,7 @@ MachPunchAgainstPlayer: Move_FORESIGHT: loadspritegfx ANIM_TAG_MAGNIFYING_GLASS monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 16, 0 createsprite gForesightMagnifyingGlassSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET delay 17 @@ -3236,7 +3236,7 @@ Move_ROLLOUT: loadspritegfx ANIM_TAG_MUD_SAND loadspritegfx ANIM_TAG_ROCKS monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_Rollout, 2 waitforvisualfinish @@ -3518,11 +3518,11 @@ Move_MEMENTO: delay 12 setalpha 0, 16 delay 1 - monbg_22 ANIM_TARGET + monbg_static ANIM_TARGET createvisualtask AnimTask_MoveTargetMementoShadow, 5 playsewithpan SE_M_PSYBEAM, SOUND_PAN_TARGET waitforvisualfinish - clearmonbg_23 ANIM_TARGET + clearmonbg_static ANIM_TARGET delay 1 blendoff delay 1 @@ -3654,7 +3654,7 @@ Move_SUPERPOWER: loadspritegfx ANIM_TAG_METEOR loadspritegfx ANIM_TAG_FLAT_ROCK monbg ANIM_ATK_PARTNER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER setalpha 12, 8 createsprite gSuperpowerOrbSpriteTemplate, ANIM_TARGET, 2, ANIM_ATTACKER playsewithpan SE_M_MEGA_KICK, SOUND_PAN_ATTACKER @@ -3853,7 +3853,7 @@ Move_IMPRISON: Move_GRUDGE: loadspritegfx ANIM_TAG_PURPLE_FLAME monbg ANIM_ATTACKER - monbgprio_29 + splitbgprio_all fadetobg BG_GHOST playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER waitbgfadein @@ -3870,7 +3870,7 @@ Move_GRUDGE: Move_CAMOUFLAGE: monbg ANIM_ATK_PARTNER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER setalpha 16, 0 createvisualtask AnimTask_SetCamouflageBlend, 5, 2, 3, 0, 14 delay 16 @@ -3968,7 +3968,7 @@ Move_MIST_BALL: Move_FEATHER_DANCE: loadspritegfx ANIM_TAG_WHITE_FEATHER monbg ANIM_DEF_PARTNER - monbgprio_29 + splitbgprio_all playsewithpan SE_M_PETAL_DANCE, SOUND_PAN_TARGET delay 0 createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 64, 2, 104, 11304, 32, 1 @@ -4518,7 +4518,7 @@ Move_LEAF_BLADE: Move_DRAGON_DANCE: loadspritegfx ANIM_TAG_HOLLOW_ORB monbg ANIM_ATTACKER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER delay 1 createvisualtask AnimTask_DragonDanceWaver, 5 playsewithpan SE_M_TELEPORT, SOUND_PAN_ATTACKER @@ -4924,7 +4924,7 @@ Move_SCRATCH: Move_DRAGON_BREATH: loadspritegfx ANIM_TAG_SMALL_EMBER monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET loopsewithpan SE_M_FLAME_WHEEL, SOUND_PAN_ATTACKER, 7, 7 createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 @@ -4958,7 +4958,7 @@ Move_DRAGON_BREATH: Move_ROAR: loadspritegfx ANIM_TAG_NOISE_LINE monbg ANIM_ATTACKER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER setalpha 8, 8 createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, 2 createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 10, ANIM_ATTACKER, 1 @@ -5122,7 +5122,7 @@ Move_BUBBLE: Move_SMOG: loadspritegfx ANIM_TAG_PURPLE_GAS_CLOUD monbg ANIM_DEF_PARTNER - monbgprio_29 + splitbgprio_all setalpha 12, 8 loopsewithpan SE_M_MIST, SOUND_PAN_TARGET, 17, 10 call SmogCloud @@ -5185,7 +5185,7 @@ Move_FAINT_ATTACK: Move_SAND_ATTACK: loadspritegfx ANIM_TAG_MUD_SAND monbg ANIM_ATK_PARTNER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER setalpha 12, 8 playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_ATTACKER createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, -10, 0, 0, 3 @@ -5343,7 +5343,7 @@ Move_CLAMP: Move_ICE_BEAM: monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 loadspritegfx ANIM_TAG_ICE_CRYSTALS createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 7, RGB_BLACK @@ -5606,7 +5606,7 @@ Move_HYDRO_PUMP: loadspritegfx ANIM_TAG_WATER_ORB loadspritegfx ANIM_TAG_WATER_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 40, 1 delay 6 @@ -5695,7 +5695,7 @@ Move_ABSORB: loadspritegfx ANIM_TAG_BLUE_STAR loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET setalpha 12, 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 4, RGB(13, 31, 12) waitforvisualfinish @@ -5748,7 +5748,7 @@ Move_MEGA_DRAIN: loadspritegfx ANIM_TAG_BLUE_STAR loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET setalpha 12, 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 8, RGB(13, 31, 12) waitforvisualfinish @@ -5809,7 +5809,7 @@ Move_GIGA_DRAIN: loadspritegfx ANIM_TAG_BLUE_STAR loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET setalpha 12, 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 12, RGB(13, 31, 12) waitforvisualfinish @@ -5880,7 +5880,7 @@ Move_LEECH_LIFE: loadspritegfx ANIM_TAG_BLUE_STAR loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET setalpha 12, 8 delay 1 createsprite gLeechLifeNeedleSpriteTemplate, ANIM_ATTACKER, 2, -20, 15, 12 @@ -6032,7 +6032,7 @@ Move_BONEMERANG: loadspritegfx ANIM_TAG_BONE loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_BONEMERANG, SOUND_PAN_ATTACKER createsprite gBonemerangSpriteTemplate, ANIM_ATTACKER, 2 @@ -6052,7 +6052,7 @@ Move_BONE_CLUB: loadspritegfx ANIM_TAG_BONE loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_BONEMERANG, SOUND_PAN_TARGET createsprite gSpinningBoneSpriteTemplate, ANIM_ATTACKER, 2, -42, -25, 0, 0, 15 @@ -6146,7 +6146,7 @@ Move_GUST: loadspritegfx ANIM_TAG_GUST loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_GUST, SOUND_PAN_TARGET createsprite gEllipticalGustSpriteTemplate, ANIM_ATTACKER, 2, 0, -16 @@ -6164,7 +6164,7 @@ Move_WING_ATTACK: loadspritegfx ANIM_TAG_GUST loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 loopsewithpan SE_M_WING_ATTACK, SOUND_PAN_ATTACKER, 20, 2 createvisualtask AnimTask_TranslateMonElliptical, 2, 0, 12, 4, 1, 4 @@ -6197,7 +6197,7 @@ Move_AEROBLAST: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER call SetSkyBg - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 call AeroblastBeam createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 5, 0, 50, 1 @@ -6237,7 +6237,7 @@ Move_WATER_GUN: loadspritegfx ANIM_TAG_SMALL_BUBBLES loadspritegfx ANIM_TAG_WATER_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createsprite gWaterGunProjectileSpriteTemplate, ANIM_ATTACKER, 2, 20, 0, 0, 0, 40, -25 playsewithpan SE_M_BUBBLE, SOUND_PAN_ATTACKER @@ -6304,7 +6304,7 @@ Move_SURF: Move_FLAMETHROWER: loadspritegfx ANIM_TAG_SMALL_EMBER monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 46, 1 delay 6 @@ -6358,7 +6358,7 @@ Move_SANDSTORM: Move_WHIRLPOOL: loadspritegfx ANIM_TAG_WATER_ORB monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 delay 0 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 4, 2, 0, 7, RGB(0, 13, 23) @@ -6445,7 +6445,7 @@ Move_KARATE_CHOP: loadspritegfx ANIM_TAG_HANDS_AND_FEET loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 playsewithpan SE_M_DOUBLE_TEAM, SOUND_PAN_TARGET createsprite gKarateChopSpriteTemplate, ANIM_ATTACKER, 2, -16, 0, 0, 0, 10, 1, 3, 0 @@ -6742,7 +6742,7 @@ SunnyDayLightRay: Move_COTTON_SPORE: loadspritegfx ANIM_TAG_SPORE monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET loopsewithpan SE_M_POISON_POWDER, SOUND_PAN_TARGET, 18, 10 call CreateCottonSpores call CreateCottonSpores @@ -6988,7 +6988,7 @@ FireSpreadEffect: Move_LEER: loadspritegfx ANIM_TAG_LEER monbg ANIM_ATTACKER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER setalpha 8, 8 playsewithpan SE_M_LEER, SOUND_PAN_ATTACKER createsprite gLeerSpriteTemplate, ANIM_ATTACKER, 2, 24, -12 @@ -7008,7 +7008,7 @@ Move_DREAM_EATER: loadspritegfx ANIM_TAG_ORBS loadspritegfx ANIM_TAG_BLUE_STAR monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER call SetPsychicBackground setalpha 8, 8 @@ -7076,7 +7076,7 @@ Move_POISON_GAS: loadspritegfx ANIM_TAG_POISON_BUBBLE delay 0 monbg ANIM_DEF_PARTNER - monbgprio_29 + splitbgprio_all setalpha 12, 8 delay 0 playsewithpan SE_M_MIST, SOUND_PAN_ATTACKER @@ -7221,7 +7221,7 @@ Move_STEEL_WING: createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0 waitforvisualfinish monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 loopsewithpan SE_M_WING_ATTACK, SOUND_PAN_ATTACKER, 20, 2 createvisualtask AnimTask_TranslateMonElliptical, 2, 0, 12, 4, 1, 4 @@ -7304,7 +7304,7 @@ Move_METAL_CLAW: Move_NIGHT_SHADE: monbg ANIM_ATTACKER - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER playsewithpan SE_M_PSYBEAM, SOUND_PAN_ATTACKER fadetobg BG_GHOST waitbgfadein @@ -7475,7 +7475,7 @@ Move_SPIDER_WEB: delay 0 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 5, 1, 2, 0, 9, RGB_BLACK waitforvisualfinish - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET loopsewithpan SE_M_STRING_SHOT, SOUND_PAN_ATTACKER, 9, 6 call SpiderWebThread call SpiderWebThread @@ -7546,7 +7546,7 @@ RazorWindUnleash: Move_DISABLE: loadspritegfx ANIM_TAG_SPARKLE_4 monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 8, 8 playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 24, -16 @@ -7597,8 +7597,8 @@ RecoverAbsorbEffect: Move_MIMIC: loadspritegfx ANIM_TAG_ORBS setalpha 11, 5 - monbg_22 ANIM_DEF_PARTNER - monbgprio_29 + monbg_static ANIM_DEF_PARTNER + splitbgprio_all panse SE_M_MINIMIZE, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, -3, 0 createvisualtask AnimTask_ShrinkTargetCopy, 5, 128, 24 delay 15 @@ -7609,7 +7609,7 @@ Move_MIMIC: playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 2, 0, 11, RGB_WHITE waitforvisualfinish - clearmonbg_23 ANIM_DEF_PARTNER + clearmonbg_static ANIM_DEF_PARTNER blendoff end @@ -8070,7 +8070,7 @@ Move_WILL_O_WISP: loadspritegfx ANIM_TAG_WISP_FIRE loadspritegfx ANIM_TAG_WISP_ORB monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET playsewithpan SE_M_EMBER, SOUND_PAN_ATTACKER waitplaysewithpan SE_M_EMBER, SOUND_PAN_ATTACKER, 10 createvisualtask SoundTask_AdjustPanningVar, 2, SOUND_PAN_ATTACKER, SOUND_PAN_ATTACKER, 1, 0 @@ -8084,7 +8084,7 @@ Move_WILL_O_WISP: delay 40 createvisualtask SoundTask_AdjustPanningVar, 2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 0 waitforvisualfinish - monbgprio_29 + splitbgprio_all playsewithpan SE_M_FLAME_WHEEL2, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 13, 1 createsprite gWillOWispFireSpriteTemplate, ANIM_ATTACKER, 2, 0 @@ -8552,7 +8552,7 @@ Move_SHEER_COLD: waitbgfadein loadspritegfx ANIM_TAG_ICE_CUBE monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_FrozenIceCube, 2 waitplaysewithpan SE_M_HAIL, SOUND_PAN_TARGET, 17 @@ -8566,7 +8566,7 @@ Move_SHEER_COLD: Move_ARM_THRUST: loadspritegfx ANIM_TAG_HANDS_AND_FEET loadspritegfx ANIM_TAG_IMPACT - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, 0, 0 delay 6 @@ -8684,7 +8684,7 @@ DragonClawFireSpiral: Move_MUD_SHOT: loadspritegfx ANIM_TAG_BROWN_ORB monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 46, 1 delay 6 @@ -8789,7 +8789,7 @@ Move_FRENZY_PLANT: loadspritegfx ANIM_TAG_ROOTS loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 2, 0, 5, RGB_BLACK waitforvisualfinish @@ -8848,7 +8848,7 @@ Move_FRENZY_PLANT: Move_METAL_SOUND: loadspritegfx ANIM_TAG_METAL_SOUND_WAVES monbg ANIM_DEF_PARTNER - monbgprio_2A ANIM_TARGET + splitbgprio_foes ANIM_TARGET createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 2, 0, 8, 1 call MetalSoundRings call MetalSoundRings @@ -9158,7 +9158,7 @@ Move_SILVER_WIND: playsewithpan SE_M_MORNING_SUN, 0 delay 0 monbg ANIM_DEF_PARTNER - monbgprio_29 + splitbgprio_all delay 0 createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_TARGET, 0, 0, 4, RGB_BLACK createvisualtask AnimTask_GetTargetSide, 2 @@ -9494,7 +9494,7 @@ Move_WATER_PULSE: loadspritegfx ANIM_TAG_SMALL_BUBBLES loadspritegfx ANIM_TAG_BLUE_RING_2 monbg ANIM_TARGET - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET playsewithpan SE_M_BUBBLE3, SOUND_PAN_ATTACKER createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 0, 7, RGB(0, 25, 28) delay 10 @@ -9531,7 +9531,7 @@ Move_PSYCHO_BOOST: delay 6 createvisualtask AnimTask_BlendColorCycle, 2, 1, 2, 8, 0, 10, RGB_BLACK delay 0 - monbgprio_28 ANIM_ATTACKER + splitbgprio ANIM_ATTACKER setalpha 8, 8 delay 10 createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 3, 0, 240, 0 @@ -9591,7 +9591,7 @@ Move_DOOM_DESIRE: Move_SKY_UPPERCUT: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET fadetobg BG_IN_AIR waitbgfadeout playsewithpan SE_M_SKY_UPPERCUT, SOUND_PAN_ATTACKER @@ -9650,7 +9650,7 @@ Move_TWISTER: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_ROCKS monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET playsewithpan SE_M_TWISTER, SOUND_PAN_TARGET createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 120, 70, 5, 70, 30 delay 1 @@ -10267,7 +10267,7 @@ Status_Freeze: playsewithpan SE_M_ICY_WIND, 0 loadspritegfx ANIM_TAG_ICE_CUBE monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET waitplaysewithpan SE_M_HAIL, SOUND_PAN_TARGET, 17 createvisualtask AnimTask_FrozenIceCube, 2 waitforvisualfinish @@ -10384,7 +10384,7 @@ Status_FireSpin: Status_Whirlpool: loadspritegfx ANIM_TAG_WATER_ORB monbg ANIM_DEF_PARTNER - monbgprio_28 ANIM_TARGET + splitbgprio ANIM_TARGET setalpha 12, 8 delay 0 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 4, 2, 0, 7, RGB(0, 13, 23) diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 177ea04bb1..48de594e2a 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -395,6 +395,9 @@ // Tasks with return values often assign them to gBattleAnimArgs[7]. #define ARG_RET_ID 7 +// For createsprite macro to use internally +#define ANIMSPRITE_IS_TARGET (1 << 7) + // Trapping Wrap-like moves end turn animation. #define TRAP_ANIM_BIND 0 #define TRAP_ANIM_WRAP 0 diff --git a/src/battle_anim.c b/src/battle_anim.c index 4599e3e096..4b9fbb1dc5 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -18,65 +18,70 @@ #include "task.h" #include "constants/battle_anim.h" +/* + This file handles the commands for the macros defined in + battle_anim_script.inc and used in battle_anim_scripts.s +*/ + #define ANIM_SPRITE_INDEX_COUNT 8 extern const u16 gMovesWithQuietBGM[]; extern const u8 *const gBattleAnims_Moves[]; -static void ScriptCmd_loadspritegfx(void); -static void ScriptCmd_unloadspritegfx(void); -static void ScriptCmd_createsprite(void); -static void ScriptCmd_createvisualtask(void); -static void ScriptCmd_delay(void); -static void ScriptCmd_waitforvisualfinish(void); -static void ScriptCmd_nop(void); -static void ScriptCmd_nop2(void); -static void ScriptCmd_end(void); -static void ScriptCmd_playse(void); -static void ScriptCmd_monbg(void); -static void ScriptCmd_clearmonbg(void); -static void ScriptCmd_setalpha(void); -static void ScriptCmd_blendoff(void); -static void ScriptCmd_call(void); -static void ScriptCmd_return(void); -static void ScriptCmd_setarg(void); -static void ScriptCmd_choosetwoturnanim(void); -static void ScriptCmd_jumpifmoveturn(void); -static void ScriptCmd_goto(void); -static void ScriptCmd_fadetobg(void); -static void ScriptCmd_restorebg(void); -static void ScriptCmd_waitbgfadeout(void); -static void ScriptCmd_waitbgfadein(void); -static void ScriptCmd_changebg(void); -static void ScriptCmd_playsewithpan(void); -static void ScriptCmd_setpan(void); -static void ScriptCmd_panse(void); -static void ScriptCmd_loopsewithpan(void); -static void ScriptCmd_waitplaysewithpan(void); -static void ScriptCmd_setbldcnt(void); -static void ScriptCmd_createsoundtask(void); -static void ScriptCmd_waitsound(void); -static void ScriptCmd_jumpargeq(void); -static void ScriptCmd_monbg_22(void); -static void ScriptCmd_clearmonbg_23(void); -static void ScriptCmd_jumpifcontest(void); -static void ScriptCmd_fadetobgfromset(void); -static void ScriptCmd_panse_adjustnone(void); -static void ScriptCmd_panse_adjustall(void); -static void ScriptCmd_monbgprio_28(void); -static void ScriptCmd_monbgprio_29(void); -static void ScriptCmd_monbgprio_2A(void); -static void ScriptCmd_invisible(void); -static void ScriptCmd_visible(void); -static void ScriptCmd_doublebattle_2D(void); -static void ScriptCmd_doublebattle_2E(void); -static void ScriptCmd_stopsound(void); +static void Cmd_loadspritegfx(void); +static void Cmd_unloadspritegfx(void); +static void Cmd_createsprite(void); +static void Cmd_createvisualtask(void); +static void Cmd_delay(void); +static void Cmd_waitforvisualfinish(void); +static void Cmd_nop(void); +static void Cmd_nop2(void); +static void Cmd_end(void); +static void Cmd_playse(void); +static void Cmd_monbg(void); +static void Cmd_clearmonbg(void); +static void Cmd_setalpha(void); +static void Cmd_blendoff(void); +static void Cmd_call(void); +static void Cmd_return(void); +static void Cmd_setarg(void); +static void Cmd_choosetwoturnanim(void); +static void Cmd_jumpifmoveturn(void); +static void Cmd_goto(void); +static void Cmd_fadetobg(void); +static void Cmd_restorebg(void); +static void Cmd_waitbgfadeout(void); +static void Cmd_waitbgfadein(void); +static void Cmd_changebg(void); +static void Cmd_playsewithpan(void); +static void Cmd_setpan(void); +static void Cmd_panse(void); +static void Cmd_loopsewithpan(void); +static void Cmd_waitplaysewithpan(void); +static void Cmd_setbldcnt(void); +static void Cmd_createsoundtask(void); +static void Cmd_waitsound(void); +static void Cmd_jumpargeq(void); +static void Cmd_monbg_static(void); +static void Cmd_clearmonbg_static(void); +static void Cmd_jumpifcontest(void); +static void Cmd_fadetobgfromset(void); +static void Cmd_panse_adjustnone(void); +static void Cmd_panse_adjustall(void); +static void Cmd_splitbgprio(void); +static void Cmd_splitbgprio_all(void); +static void Cmd_splitbgprio_foes(void); +static void Cmd_invisible(void); +static void Cmd_visible(void); +static void Cmd_teamattack_moveback(void); +static void Cmd_teamattack_movefwd(void); +static void Cmd_stopsound(void); static void RunAnimScriptCommand(void); -static void task_pA_ma0A_obj_to_bg_pal(u8 taskId); +static void Task_UpdateMonBg(u8 taskId); static void FlipBattlerBgTiles(void); static void Task_ClearMonBg(u8 taskId); -static void sub_80A4BB0(u8 taskId); +static void Task_ClearMonBgStatic(u8 taskId); static void Task_FadeToBg(u8 taskId); static void Task_PanFromInitialToTarget(u8 taskId); static void Task_LoopAndPlaySE(u8 taskId); @@ -108,1682 +113,58 @@ EWRAM_DATA u8 gBattleAnimTarget = 0; EWRAM_DATA u16 gAnimBattlerSpecies[MAX_BATTLERS_COUNT] = {0}; EWRAM_DATA u8 gAnimCustomPanning = 0; -const struct OamData gOamData_AffineOff_ObjNormal_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - - -const struct OamData gOamData_AffineOff_ObjNormal_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjNormal_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjNormal_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjNormal_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_NORMAL, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineOff_ObjBlend_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_OFF, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineNormal_ObjBlend_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_NORMAL, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_8x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x8), - .x = 0, - .size = SPRITE_SIZE(8x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_16x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x16), - .x = 0, - .size = SPRITE_SIZE(16x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_32x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x32), - .x = 0, - .size = SPRITE_SIZE(32x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_64x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x64), - .x = 0, - .size = SPRITE_SIZE(64x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_16x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x8), - .x = 0, - .size = SPRITE_SIZE(16x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_32x8 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x8), - .x = 0, - .size = SPRITE_SIZE(32x8), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_32x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x16), - .x = 0, - .size = SPRITE_SIZE(32x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_64x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(64x32), - .x = 0, - .size = SPRITE_SIZE(64x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_8x16 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x16), - .x = 0, - .size = SPRITE_SIZE(8x16), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_8x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(8x32), - .x = 0, - .size = SPRITE_SIZE(8x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_16x32 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(16x32), - .x = 0, - .size = SPRITE_SIZE(16x32), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct OamData gOamData_AffineDouble_ObjBlend_32x64 = -{ - .y = 0, - .affineMode = ST_OAM_AFFINE_DOUBLE, - .objMode = ST_OAM_OBJ_BLEND, - .bpp = ST_OAM_4BPP, - .shape = SPRITE_SHAPE(32x64), - .x = 0, - .size = SPRITE_SIZE(32x64), - .tileNum = 0, - .priority = 2, - .paletteNum = 0, -}; - -const struct CompressedSpriteSheet gBattleAnimPicTable[] = -{ - {gBattleAnimSpriteGfx_Bone, 0x0200, ANIM_TAG_BONE}, - {gBattleAnimSpriteGfx_Spark, 0x0300, ANIM_TAG_SPARK}, - {gBattleAnimSpriteGfx_Pencil, 0x0200, ANIM_TAG_PENCIL}, - {gBattleAnimSpriteGfx_AirWave, 0x0100, ANIM_TAG_AIR_WAVE}, - {gBattleAnimSpriteGfx_Orb, 0x0200, ANIM_TAG_ORB}, - {gBattleAnimSpriteGfx_Sword, 0x0400, ANIM_TAG_SWORD}, - {gBattleAnimSpriteGfx_Seed, 0x0180, ANIM_TAG_SEED}, - {gBattleAnimSpriteGfx_Explosion6, 0x0800, ANIM_TAG_EXPLOSION_6}, - {gBattleAnimSpriteGfx_PinkOrb, 0x0020, ANIM_TAG_PINK_ORB}, - {gBattleAnimSpriteGfx_Gust, 0x0400, ANIM_TAG_GUST}, - {gBattleAnimSpriteGfx_IceCube, 0x1200, ANIM_TAG_ICE_CUBE}, - {gBattleAnimSpriteGfx_Spark2, 0x0180, ANIM_TAG_SPARK_2}, - {gBattleAnimSpriteGfx_Orange, 0x0080, ANIM_TAG_ORANGE}, - {gBattleAnimSpriteGfx_YellowBall, 0x0080, ANIM_TAG_YELLOW_BALL}, - {gBattleAnimSpriteGfx_LockOn, 0x0280, ANIM_TAG_LOCK_ON}, - {gBattleAnimSpriteGfx_TiedBag, 0x0080, ANIM_TAG_TIED_BAG}, - {gBattleAnimSpriteGfx_BlackSmoke, 0x0100, ANIM_TAG_BLACK_SMOKE}, - {gBattleAnimSpriteGfx_BlackBall, 0x0020, ANIM_TAG_BLACK_BALL}, - {gBattleAnimSpriteGfx_Conversion, 0x0080, ANIM_TAG_CONVERSION}, - {gBattleAnimSpriteGfx_Glass, 0x0400, ANIM_TAG_GLASS}, - {gBattleAnimSpriteGfx_HornHit, 0x0200, ANIM_TAG_HORN_HIT}, - {gBattleAnimSpriteGfx_Hit, 0x0A00, ANIM_TAG_HIT}, - {gBattleAnimSpriteGfx_Hit, 0x0A00, ANIM_TAG_HIT_2}, - {gBattleAnimSpriteGfx_BlueShards, 0x0380, ANIM_TAG_BLUE_SHARDS}, - {gBattleAnimSpriteGfx_ClosingEye, 0x0300, ANIM_TAG_CLOSING_EYE}, - {gBattleAnimSpriteGfx_WavingHand, 0x0A00, ANIM_TAG_WAVING_HAND}, - {gBattleAnimSpriteGfx_HitDuplicate, 0x0A00, ANIM_TAG_HIT_DUPLICATE}, - {gBattleAnimSpriteGfx_Leer, 0x0A00, ANIM_TAG_LEER}, - {gBattleAnimSpriteGfx_BlueBurst, 0x0A00, ANIM_TAG_BLUE_BURST}, - {gBattleAnimSpriteGfx_SmallEmber, 0x0A00, ANIM_TAG_SMALL_EMBER}, - {gBattleAnimSpriteGfx_GraySmoke, 0x0A00, ANIM_TAG_GRAY_SMOKE}, - {gBattleAnimSpriteGfx_BlueStar, 0x0E00, ANIM_TAG_BLUE_STAR}, - {gBattleAnimSpriteGfx_BubbleBurst, 0x0380, ANIM_TAG_BUBBLE_BURST}, - {gBattleAnimSpriteGfx_Fire, 0x1000, ANIM_TAG_FIRE}, - {gBattleAnimSpriteGfx_SpinningFire, 0x0800, ANIM_TAG_SPINNING_FIRE}, - {gBattleAnimSpriteGfx_FirePlume, 0x0A00, ANIM_TAG_FIRE_PLUME}, - {gBattleAnimSpriteGfx_Lightning2, 0x0800, ANIM_TAG_LIGHTNING_2}, - {gBattleAnimSpriteGfx_Lightning, 0x0A00, ANIM_TAG_LIGHTNING}, - {gBattleAnimSpriteGfx_ClawSlash2, 0x0A00, ANIM_TAG_CLAW_SLASH_2}, - {gBattleAnimSpriteGfx_ClawSlash, 0x0A00, ANIM_TAG_CLAW_SLASH}, - {gBattleAnimSpriteGfx_Scratch3, 0x0A00, ANIM_TAG_SCRATCH_3}, - {gBattleAnimSpriteGfx_Scratch2, 0x0A00, ANIM_TAG_SCRATCH_2}, - {gBattleAnimSpriteGfx_BubbleBurst2, 0x0A00, ANIM_TAG_BUBBLE_BURST_2}, - {gBattleAnimSpriteGfx_IceChunk, 0x0A00, ANIM_TAG_ICE_CHUNK}, - {gBattleAnimSpriteGfx_Glass2, 0x0A00, ANIM_TAG_GLASS_2}, - {gBattleAnimSpriteGfx_PinkHeart2, 0x0A00, ANIM_TAG_PINK_HEART_2}, - {gBattleAnimSpriteGfx_SapDrip, 0x1000, ANIM_TAG_SAP_DRIP}, - {gBattleAnimSpriteGfx_SapDrip, 0x1000, ANIM_TAG_SAP_DRIP_2}, - {gBattleAnimSpriteGfx_Sparkle1, 0x1000, ANIM_TAG_SPARKLE_1}, - {gBattleAnimSpriteGfx_Sparkle1, 0x1000, ANIM_TAG_SPARKLE_2}, - {gBattleAnimSpriteGfx_HumanoidFoot, 0x0200, ANIM_TAG_HUMANOID_FOOT}, - {gBattleAnimSpriteGfx_MonsterFoot, 0x0200, ANIM_TAG_MONSTER_FOOT}, - {gBattleAnimSpriteGfx_HumanoidHand, 0x0200, ANIM_TAG_HUMANOID_HAND}, - {gBattleAnimSpriteGfx_NoiseLine, 0x0800, ANIM_TAG_NOISE_LINE}, - {gBattleAnimSpriteGfx_YellowUnk, 0x0080, ANIM_TAG_YELLOW_UNK}, - {gBattleAnimSpriteGfx_RedFist, 0x0200, ANIM_TAG_RED_FIST}, - {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_SLAM_HIT}, - {gBattleAnimSpriteGfx_Ring, 0x0180, ANIM_TAG_RING}, - {gBattleAnimSpriteGfx_Rocks, 0x0C00, ANIM_TAG_ROCKS}, - {gBattleAnimSpriteGfx_Z, 0x0100, ANIM_TAG_Z}, - {gBattleAnimSpriteGfx_YellowUnk2, 0x0040, ANIM_TAG_YELLOW_UNK_2}, - {gBattleAnimSpriteGfx_AirSlash, 0x0180, ANIM_TAG_AIR_SLASH}, - {gBattleAnimSpriteGfx_SpinningGreenOrbs, 0x0800, ANIM_TAG_SPINNING_GREEN_ORBS}, - {gBattleAnimSpriteGfx_Leaf, 0x0480, ANIM_TAG_LEAF}, - {gBattleAnimSpriteGfx_Finger, 0x0200, ANIM_TAG_FINGER}, - {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_POISON_POWDER}, - {gBattleAnimSpriteGfx_BrownTriangle, 0x0100, ANIM_TAG_BROWN_TRIANGLE}, - {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_SLEEP_POWDER}, - {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_STUN_SPORE}, - {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_POWDER}, - {gBattleAnimSpriteGfx_Sparkle3, 0x0200, ANIM_TAG_SPARKLE_3}, - {gBattleAnimSpriteGfx_Sparkle4, 0x0A00, ANIM_TAG_SPARKLE_4}, - {gBattleAnimSpriteGfx_MusicNotes, 0x0300, ANIM_TAG_MUSIC_NOTES}, - {gBattleAnimSpriteGfx_Duck, 0x0180, ANIM_TAG_DUCK}, - {gBattleAnimSpriteGfx_MudSand, 0x00A0, ANIM_TAG_MUD_SAND}, - {gBattleAnimSpriteGfx_Alert, 0x0700, ANIM_TAG_ALERT}, - {gBattleAnimSpriteGfx_BlueFlames, 0x0400, ANIM_TAG_BLUE_FLAMES}, - {gBattleAnimSpriteGfx_BlueFlames2, 0x0200, ANIM_TAG_BLUE_FLAMES_2}, - {gBattleAnimSpriteGfx_Shock4, 0x0300, ANIM_TAG_SHOCK_4}, - {gBattleAnimSpriteGfx_Shock, 0x0C00, ANIM_TAG_SHOCK}, - {gBattleAnimSpriteGfx_Bell2, 0x0A00, ANIM_TAG_BELL_2}, - {gBattleAnimSpriteGfx_PinkGlove, 0x0080, ANIM_TAG_PINK_GLOVE}, - {gBattleAnimSpriteGfx_BlueLines, 0x0040, ANIM_TAG_BLUE_LINES}, - {gBattleAnimSpriteGfx_Impact3, 0x0E00, ANIM_TAG_IMPACT_3}, - {gBattleAnimSpriteGfx_Impact2, 0x0E00, ANIM_TAG_IMPACT_2}, - {gBattleAnimSpriteGfx_Reticle, 0x0280, ANIM_TAG_RETICLE}, - {gBattleAnimSpriteGfx_Breath, 0x0200, ANIM_TAG_BREATH}, - {gBattleAnimSpriteGfx_Anger, 0x0080, ANIM_TAG_ANGER}, - {gBattleAnimSpriteGfx_Snowball, 0x00C0, ANIM_TAG_SNOWBALL}, - {gBattleAnimSpriteGfx_Vine, 0x0A00, ANIM_TAG_VINE}, - {gBattleAnimSpriteGfx_Sword2, 0x0200, ANIM_TAG_SWORD_2}, - {gBattleAnimSpriteGfx_Clapping, 0x0180, ANIM_TAG_CLAPPING}, - {gBattleAnimSpriteGfx_RedTube, 0x0080, ANIM_TAG_RED_TUBE}, - {gBattleAnimSpriteGfx_Amnesia, 0x1000, ANIM_TAG_AMNESIA}, - {gBattleAnimSpriteGfx_String2, 0x0A00, ANIM_TAG_STRING_2}, - {gBattleAnimSpriteGfx_Pencil2, 0x0180, ANIM_TAG_PENCIL_2}, - {gBattleAnimSpriteGfx_Petal, 0x0380, ANIM_TAG_PETAL}, - {gBattleAnimSpriteGfx_BentSpoon, 0x0C00, ANIM_TAG_BENT_SPOON}, - {gBattleAnimSpriteGfx_Web, 0x0200, ANIM_TAG_WEB}, - {gBattleAnimSpriteGfx_MilkBottle, 0x0200, ANIM_TAG_MILK_BOTTLE}, - {gBattleAnimSpriteGfx_Coin, 0x0200, ANIM_TAG_COIN}, - {gBattleAnimSpriteGfx_CrackedEgg, 0x0200, ANIM_TAG_CRACKED_EGG}, - {gBattleAnimSpriteGfx_HatchedEgg, 0x0400, ANIM_TAG_HATCHED_EGG}, - {gBattleAnimSpriteGfx_FreshEgg, 0x0080, ANIM_TAG_FRESH_EGG}, - {gBattleAnimSpriteGfx_Fangs, 0x0400, ANIM_TAG_FANGS}, - {gBattleAnimSpriteGfx_Explosion2, 0x0c00, ANIM_TAG_EXPLOSION_2}, - {gBattleAnimSpriteGfx_Explosion3, 0x0200, ANIM_TAG_EXPLOSION_3}, - {gBattleAnimSpriteGfx_WaterDroplet, 0x1000, ANIM_TAG_WATER_DROPLET}, - {gBattleAnimSpriteGfx_WaterDroplet2, 0x0a00, ANIM_TAG_WATER_DROPLET_2}, - {gBattleAnimSpriteGfx_Seed2, 0x0020, ANIM_TAG_SEED_2}, - {gBattleAnimSpriteGfx_Sprout, 0x0e00, ANIM_TAG_SPROUT}, - {gBattleAnimSpriteGfx_RedWand, 0x0080, ANIM_TAG_RED_WAND}, - {gBattleAnimSpriteGfx_PurpleGreenUnk, 0x0a00, ANIM_TAG_PURPLE_GREEN_UNK}, - {gBattleAnimSpriteGfx_WaterColumn, 0x0400, ANIM_TAG_WATER_COLUMN}, - {gBattleAnimSpriteGfx_MudUnk, 0x0200, ANIM_TAG_MUD_UNK}, - {gBattleAnimSpriteGfx_RainDrops, 0x0700, ANIM_TAG_RAIN_DROPS}, - {gBattleAnimSpriteGfx_FurySwipes, 0x0800, ANIM_TAG_FURY_SWIPES}, - {gBattleAnimSpriteGfx_Vine2, 0x0a00, ANIM_TAG_VINE_2}, - {gBattleAnimSpriteGfx_Teeth, 0x0600, ANIM_TAG_TEETH}, - {gBattleAnimSpriteGfx_Bone2, 0x0800, ANIM_TAG_BONE_2}, - {gBattleAnimSpriteGfx_WhiteBag, 0x0200, ANIM_TAG_WHITE_BAG}, - {gBattleAnimSpriteGfx_Unknown, 0x0040, ANIM_TAG_UNKNOWN}, - {gBattleAnimSpriteGfx_PurpleCoral, 0x0180, ANIM_TAG_PURPLE_CORAL}, - {gBattleAnimSpriteGfx_PurpleDroplet, 0x0600, ANIM_TAG_PURPLE_DROPLET}, - {gBattleAnimSpriteGfx_Shock2, 0x0600, ANIM_TAG_SHOCK_2}, - {gBattleAnimSpriteGfx_ClosingEye2, 0x0200, ANIM_TAG_CLOSING_EYE_2}, - {gBattleAnimSpriteGfx_MetalBall, 0x0080, ANIM_TAG_METAL_BALL}, - {gBattleAnimSpriteGfx_MonsterDoll, 0x0200, ANIM_TAG_MONSTER_DOLL}, - {gBattleAnimSpriteGfx_Whirlwind, 0x0800, ANIM_TAG_WHIRLWIND}, - {gBattleAnimSpriteGfx_Whirlwind2, 0x0080, ANIM_TAG_WHIRLWIND_2}, - {gBattleAnimSpriteGfx_Explosion4, 0x0a00, ANIM_TAG_EXPLOSION_4}, - {gBattleAnimSpriteGfx_Explosion5, 0x0280, ANIM_TAG_EXPLOSION_5}, - {gBattleAnimSpriteGfx_Tongue, 0x0280, ANIM_TAG_TONGUE}, - {gBattleAnimSpriteGfx_Smoke, 0x0100, ANIM_TAG_SMOKE}, - {gBattleAnimSpriteGfx_Smoke2, 0x0200, ANIM_TAG_SMOKE_2}, - {gBattleAnimSpriteGfx_Impact, 0x0200, ANIM_TAG_IMPACT}, - {gBattleAnimSpriteGfx_CircleImpact, 0x0020, ANIM_TAG_CIRCLE_IMPACT}, - {gBattleAnimSpriteGfx_Scratch, 0x0a00, ANIM_TAG_SCRATCH}, - {gBattleAnimSpriteGfx_Cut, 0x0800, ANIM_TAG_CUT}, - {gBattleAnimSpriteGfx_SharpTeeth, 0x0800, ANIM_TAG_SHARP_TEETH}, - {gBattleAnimSpriteGfx_RainbowRings, 0x00c0, ANIM_TAG_RAINBOW_RINGS}, - {gBattleAnimSpriteGfx_IceCrystals, 0x01c0, ANIM_TAG_ICE_CRYSTALS}, - {gBattleAnimSpriteGfx_IceSpikes, 0x0100, ANIM_TAG_ICE_SPIKES}, - {gBattleAnimSpriteGfx_HandsAndFeet, 0x0800, ANIM_TAG_HANDS_AND_FEET}, - {gBattleAnimSpriteGfx_MistCloud, 0x0200, ANIM_TAG_MIST_CLOUD}, - {gBattleAnimSpriteGfx_Clamp, 0x0800, ANIM_TAG_CLAMP}, - {gBattleAnimSpriteGfx_Bubble, 0x0180, ANIM_TAG_BUBBLE}, - {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_ORBS}, - {gBattleAnimSpriteGfx_WaterImpact, 0x0200, ANIM_TAG_WATER_IMPACT}, - {gBattleAnimSpriteGfx_WaterOrb, 0x0200, ANIM_TAG_WATER_ORB}, - {gBattleAnimSpriteGfx_PoisonBubble, 0x0180, ANIM_TAG_POISON_BUBBLE}, - {gBattleAnimSpriteGfx_ToxicBubble, 0x0400, ANIM_TAG_TOXIC_BUBBLE}, - {gBattleAnimSpriteGfx_Spikes, 0x0080, ANIM_TAG_SPIKES}, - {gBattleAnimSpriteGfx_HornHit2, 0x0100, ANIM_TAG_HORN_HIT_2}, - {gBattleAnimSpriteGfx_AirWave2, 0x0100, ANIM_TAG_AIR_WAVE_2}, - {gBattleAnimSpriteGfx_SmallBubbles, 0x0140, ANIM_TAG_SMALL_BUBBLES}, - {gBattleAnimSpriteGfx_RoundShadow, 0x0800, ANIM_TAG_ROUND_SHADOW}, - {gBattleAnimSpriteGfx_Sunlight, 0x0200, ANIM_TAG_SUNLIGHT}, - {gBattleAnimSpriteGfx_Spore, 0x0100, ANIM_TAG_SPORE}, - {gBattleAnimSpriteGfx_Flower, 0x00a0, ANIM_TAG_FLOWER}, - {gBattleAnimSpriteGfx_RazorLeaf, 0x0100, ANIM_TAG_RAZOR_LEAF}, - {gBattleAnimSpriteGfx_Needle, 0x0080, ANIM_TAG_NEEDLE}, - {gBattleAnimSpriteGfx_WhirlwindLines, 0x0300, ANIM_TAG_WHIRLWIND_LINES}, - {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_GOLD_RING}, - {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_PURPLE_RING}, - {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_BLUE_RING}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_GREEN_LIGHT_WALL}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_BLUE_LIGHT_WALL}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_RED_LIGHT_WALL}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_GRAY_LIGHT_WALL}, - {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_ORANGE_LIGHT_WALL}, - {gBattleAnimSpriteGfx_BlackBall2, 0x0080, ANIM_TAG_BLACK_BALL_2}, - {gBattleAnimSpriteGfx_MistCloud, 0x0200, ANIM_TAG_PURPLE_GAS_CLOUD}, - {gBattleAnimSpriteGfx_SparkH, 0x0200, ANIM_TAG_SPARK_H}, - {gBattleAnimSpriteGfx_YellowStar, 0x0200, ANIM_TAG_YELLOW_STAR}, - {gBattleAnimSpriteGfx_LargeFreshEgg, 0x0080, ANIM_TAG_LARGE_FRESH_EGG}, - {gBattleAnimSpriteGfx_ShadowBall, 0x0200, ANIM_TAG_SHADOW_BALL}, - {gBattleAnimSpriteGfx_Lick, 0x0500, ANIM_TAG_LICK}, - {gBattleAnimSpriteGfx_VoidLines, 0x0800, ANIM_TAG_VOID_LINES}, - {gBattleAnimSpriteGfx_String, 0x0400, ANIM_TAG_STRING}, - {gBattleAnimSpriteGfx_WebThread, 0x0020, ANIM_TAG_WEB_THREAD}, - {gBattleAnimSpriteGfx_SpiderWeb, 0x0800, ANIM_TAG_SPIDER_WEB}, - {gBattleAnimSpriteGfx_Lightbulb, 0x0100, ANIM_TAG_LIGHTBULB}, - {gBattleAnimSpriteGfx_Slash, 0x0800, ANIM_TAG_SLASH}, - {gBattleAnimSpriteGfx_FocusEnergy, 0x0400, ANIM_TAG_FOCUS_ENERGY}, - {gBattleAnimSpriteGfx_SphereToCube, 0x0a00, ANIM_TAG_SPHERE_TO_CUBE}, - {gBattleAnimSpriteGfx_Tendrils, 0x1000, ANIM_TAG_TENDRILS}, - {gBattleAnimSpriteGfx_Eye, 0x0800, ANIM_TAG_EYE}, - {gBattleAnimSpriteGfx_WhiteShadow, 0x0400, ANIM_TAG_WHITE_SHADOW}, - {gBattleAnimSpriteGfx_TealAlert, 0x0200, ANIM_TAG_TEAL_ALERT}, - {gBattleAnimSpriteGfx_OpeningEye, 0x0800, ANIM_TAG_OPENING_EYE}, - {gBattleAnimSpriteGfx_RoundWhiteHalo, 0x0800, ANIM_TAG_ROUND_WHITE_HALO}, - {gBattleAnimSpriteGfx_FangAttack, 0x0800, ANIM_TAG_FANG_ATTACK}, - {gBattleAnimSpriteGfx_PurpleHandOutline, 0x0200, ANIM_TAG_PURPLE_HAND_OUTLINE}, - {gBattleAnimSpriteGfx_Moon, 0x0800, ANIM_TAG_MOON}, - {gBattleAnimSpriteGfx_GreenSparkle, 0x0200, ANIM_TAG_GREEN_SPARKLE}, - {gBattleAnimSpriteGfx_Spiral, 0x0800, ANIM_TAG_SPIRAL}, - {gBattleAnimSpriteGfx_SnoreZ, 0x0200, ANIM_TAG_SNORE_Z}, - {gBattleAnimSpriteGfx_Explosion, 0x0800, ANIM_TAG_EXPLOSION}, - {gBattleAnimSpriteGfx_Nail, 0x0400, ANIM_TAG_NAIL}, - {gBattleAnimSpriteGfx_GhostlySpirit, 0x0200, ANIM_TAG_GHOSTLY_SPIRIT}, - {gBattleAnimSpriteGfx_WarmRock, 0x0a80, ANIM_TAG_WARM_ROCK}, - {gBattleAnimSpriteGfx_BreakingEgg, 0x0600, ANIM_TAG_BREAKING_EGG}, - {gBattleAnimSpriteGfx_ThinRing, 0x0800, ANIM_TAG_THIN_RING}, - {gBattleAnimSpriteGfx_PunchImpact, 0x0200, ANIM_TAG_PUNCH_IMPACT}, - {gBattleAnimSpriteGfx_Bell, 0x0600, ANIM_TAG_BELL}, - {gBattleAnimSpriteGfx_MusicNotes2, 0x0800, ANIM_TAG_MUSIC_NOTES_2}, - {gBattleAnimSpriteGfx_SpeedDust, 0x0180, ANIM_TAG_SPEED_DUST}, - {gBattleAnimSpriteGfx_TornMetal, 0x0800, ANIM_TAG_TORN_METAL}, - {gBattleAnimSpriteGfx_ThoughtBubble, 0x0800, ANIM_TAG_THOUGHT_BUBBLE}, - {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_MAGENTA_HEART}, - {gBattleAnimSpriteGfx_ElectricOrbs, 0x0080, ANIM_TAG_ELECTRIC_ORBS}, - {gBattleAnimSpriteGfx_CircleOfLight, 0x0800, ANIM_TAG_CIRCLE_OF_LIGHT}, - {gBattleAnimSpriteGfx_Electricity, 0x0800, ANIM_TAG_ELECTRICITY}, - {gBattleAnimSpriteGfx_Finger2, 0x0600, ANIM_TAG_FINGER_2}, - {gBattleAnimSpriteGfx_MovementWaves, 0x0600, ANIM_TAG_MOVEMENT_WAVES}, - {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_RED_HEART}, - {gBattleAnimSpriteGfx_RedOrb, 0x0080, ANIM_TAG_RED_ORB}, - {gBattleAnimSpriteGfx_EyeSparkle, 0x0180, ANIM_TAG_EYE_SPARKLE}, - {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_PINK_HEART}, - {gBattleAnimSpriteGfx_Angel, 0x0200, ANIM_TAG_ANGEL}, - {gBattleAnimSpriteGfx_Devil, 0x0400, ANIM_TAG_DEVIL}, - {gBattleAnimSpriteGfx_Swipe, 0x0a00, ANIM_TAG_SWIPE}, - {gBattleAnimSpriteGfx_Roots, 0x0800, ANIM_TAG_ROOTS}, - {gBattleAnimSpriteGfx_ItemBag, 0x0200, ANIM_TAG_ITEM_BAG}, - {gBattleAnimSpriteGfx_JaggedMusicNote, 0x0400, ANIM_TAG_JAGGED_MUSIC_NOTE}, - {gBattleAnimSpriteGfx_Pokeball, 0x0080, ANIM_TAG_POKEBALL}, - {gBattleAnimSpriteGfx_Spotlight, 0x0800, ANIM_TAG_SPOTLIGHT}, - {gBattleAnimSpriteGfx_LetterZ, 0x0200, ANIM_TAG_LETTER_Z}, - {gBattleAnimSpriteGfx_RapidSpin, 0x0300, ANIM_TAG_RAPID_SPIN}, - {gBattleAnimSpriteGfx_TriAttackTriangle, 0x0800, ANIM_TAG_TRI_ATTACK_TRIANGLE}, - {gBattleAnimSpriteGfx_WispOrb, 0x0380, ANIM_TAG_WISP_ORB}, - {gBattleAnimSpriteGfx_WispFire, 0x0800, ANIM_TAG_WISP_FIRE}, - {gBattleAnimSpriteGfx_GoldStars, 0x00c0, ANIM_TAG_GOLD_STARS}, - {gBattleAnimSpriteGfx_EclipsingOrb, 0x0800, ANIM_TAG_ECLIPSING_ORB}, - {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_GRAY_ORB}, - {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_BLUE_ORB}, - {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_RED_ORB_2}, - {gBattleAnimSpriteGfx_PinkPetal, 0x0080, ANIM_TAG_PINK_PETAL}, - {gBattleAnimSpriteGfx_PainSplit, 0x0180, ANIM_TAG_PAIN_SPLIT}, - {gBattleAnimSpriteGfx_Confetti, 0x0180, ANIM_TAG_CONFETTI}, - {gBattleAnimSpriteGfx_GreenStar, 0x0200, ANIM_TAG_GREEN_STAR}, - {gBattleAnimSpriteGfx_PinkCloud, 0x0200, ANIM_TAG_PINK_CLOUD}, - {gBattleAnimSpriteGfx_SweatDrop, 0x0020, ANIM_TAG_SWEAT_DROP}, - {gBattleAnimSpriteGfx_GuardRing, 0x0400, ANIM_TAG_GUARD_RING}, - {gBattleAnimSpriteGfx_PurpleScratch, 0x0600, ANIM_TAG_PURPLE_SCRATCH}, - {gBattleAnimSpriteGfx_PurpleSwipe, 0x1000, ANIM_TAG_PURPLE_SWIPE}, - {gBattleAnimSpriteGfx_TagHand, 0x0400, ANIM_TAG_TAG_HAND}, - {gBattleAnimSpriteGfx_SmallRedEye, 0x0020, ANIM_TAG_SMALL_RED_EYE}, - {gBattleAnimSpriteGfx_HollowOrb, 0x0080, ANIM_TAG_HOLLOW_ORB}, - {gBattleAnimSpriteGfx_XSign, 0x0800, ANIM_TAG_X_SIGN}, - {gBattleAnimSpriteGfx_BluegreenOrb, 0x0080, ANIM_TAG_BLUEGREEN_ORB}, - {gBattleAnimSpriteGfx_PawPrint, 0x0200, ANIM_TAG_PAW_PRINT}, - {gBattleAnimSpriteGfx_PurpleFlame, 0x0400, ANIM_TAG_PURPLE_FLAME}, - {gBattleAnimSpriteGfx_RedBall, 0x0200, ANIM_TAG_RED_BALL}, - {gBattleAnimSpriteGfx_SmellingsaltEffect, 0x0200, ANIM_TAG_SMELLINGSALT_EFFECT}, - {gBattleAnimSpriteGfx_Meteor, 0x0800, ANIM_TAG_METEOR}, - {gBattleAnimSpriteGfx_FlatRock, 0x0280, ANIM_TAG_FLAT_ROCK}, - {gBattleAnimSpriteGfx_MagnifyingGlass, 0x0200, ANIM_TAG_MAGNIFYING_GLASS}, - {gBattleAnimSpriteGfx_WaterOrb, 0x0200, ANIM_TAG_BROWN_ORB}, - {gBattleAnimSpriteGfx_MetalSoundWaves, 0x0400, ANIM_TAG_METAL_SOUND_WAVES}, - {gBattleAnimSpriteGfx_FlyingDirt, 0x0200, ANIM_TAG_FLYING_DIRT}, - {gBattleAnimSpriteGfx_IcicleSpear, 0x0200, ANIM_TAG_ICICLE_SPEAR}, - {gBattleAnimSpriteGfx_Hail, 0x0080, ANIM_TAG_HAIL}, - {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_RED_ORB}, - {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_GREEN_ORB}, - {gBattleAnimSpriteGfx_GreenSpike, 0x0080, ANIM_TAG_GREEN_SPIKE}, - {gBattleAnimSpriteGfx_CircleOfLight, 0x0800, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT}, - {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_BLUE_ORB}, - {gBattleAnimSpriteGfx_Pokeblock, 0x0080, ANIM_TAG_POKEBLOCK}, - {gBattleAnimSpriteGfx_WhiteFeather, 0x0400, ANIM_TAG_WHITE_FEATHER}, - {gBattleAnimSpriteGfx_Sparkle6, 0x0080, ANIM_TAG_SPARKLE_6}, - {gBattleAnimSpriteGfx_Splash, 0x0800, ANIM_TAG_SPLASH}, - {gBattleAnimSpriteGfx_SweatBead, 0x0020, ANIM_TAG_SWEAT_BEAD}, - {gBattleAnimSpriteGfx_Gem1, 0x0800, ANIM_TAG_GEM_1}, - {gBattleAnimSpriteGfx_Gem2, 0x0800, ANIM_TAG_GEM_2}, - {gBattleAnimSpriteGfx_Gem3, 0x0800, ANIM_TAG_GEM_3}, - {gBattleAnimSpriteGfx_SlamHit2, 0x1000, ANIM_TAG_SLAM_HIT_2}, - {gBattleAnimSpriteGfx_Recycle, 0x0800, ANIM_TAG_RECYCLE}, - {gBattleAnimSpriteGfx_RedParticles, 0x00a0, ANIM_TAG_RED_PARTICLES}, - {gBattleAnimSpriteGfx_Protect, 0x0800, ANIM_TAG_PROTECT}, - {gBattleAnimSpriteGfx_DirtMound, 0x0200, ANIM_TAG_DIRT_MOUND}, - {gBattleAnimSpriteGfx_Shock3, 0x0600, ANIM_TAG_SHOCK_3}, - {gBattleAnimSpriteGfx_WeatherBall, 0x0200, ANIM_TAG_WEATHER_BALL}, - {gBattleAnimSpriteGfx_Bird, 0x0800, ANIM_TAG_BIRD}, - {gBattleAnimSpriteGfx_CrossImpact, 0x0200, ANIM_TAG_CROSS_IMPACT}, - {gBattleAnimSpriteGfx_Slash, 0x0800, ANIM_TAG_SLASH_2}, - {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_WHIP_HIT}, - {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_BLUE_RING_2}, -}; - -const struct CompressedSpritePalette gBattleAnimPaletteTable[] = -{ - {gBattleAnimSpritePal_Bone, ANIM_TAG_BONE}, - {gBattleAnimSpritePal_Spark, ANIM_TAG_SPARK}, - {gBattleAnimSpritePal_Pencil, ANIM_TAG_PENCIL}, - {gBattleAnimSpritePal_AirWave, ANIM_TAG_AIR_WAVE}, - {gBattleAnimSpritePal_Orb, ANIM_TAG_ORB}, - {gBattleAnimSpritePal_Sword, ANIM_TAG_SWORD}, - {gBattleAnimSpritePal_Seed, ANIM_TAG_SEED}, - {gBattleAnimSpritePal_Explosion6, ANIM_TAG_EXPLOSION_6}, - {gBattleAnimSpritePal_PinkOrb, ANIM_TAG_PINK_ORB}, - {gBattleAnimSpritePal_Gust, ANIM_TAG_GUST}, - {gBattleAnimSpritePal_IceCube, ANIM_TAG_ICE_CUBE}, - {gBattleAnimSpritePal_Spark2, ANIM_TAG_SPARK_2}, - {gBattleAnimSpritePal_Orange, ANIM_TAG_ORANGE}, - {gBattleAnimSpritePal_YellowBall, ANIM_TAG_YELLOW_BALL}, - {gBattleAnimSpritePal_LockOn, ANIM_TAG_LOCK_ON}, - {gBattleAnimSpritePal_TiedBag, ANIM_TAG_TIED_BAG}, - {gBattleAnimSpritePal_BlackSmoke, ANIM_TAG_BLACK_SMOKE}, - {gBattleAnimSpritePal_BlackSmoke, ANIM_TAG_BLACK_BALL}, - {gBattleAnimSpritePal_Conversion, ANIM_TAG_CONVERSION}, - {gBattleAnimSpritePal_Glass, ANIM_TAG_GLASS}, - {gBattleAnimSpritePal_HornHit, ANIM_TAG_HORN_HIT}, - {gBattleAnimSpritePal_Hit, ANIM_TAG_HIT}, - {gBattleAnimSpritePal_Hit2, ANIM_TAG_HIT_2}, - {gBattleAnimSpritePal_BlueShards, ANIM_TAG_BLUE_SHARDS}, - {gBattleAnimSpritePal_ClosingEye, ANIM_TAG_CLOSING_EYE}, - {gBattleAnimSpritePal_WavingHand, ANIM_TAG_WAVING_HAND}, - {gBattleAnimSpritePal_HitDuplicate, ANIM_TAG_HIT_DUPLICATE}, - {gBattleAnimSpritePal_Leer, ANIM_TAG_LEER}, - {gBattleAnimSpritePal_BlueBurst, ANIM_TAG_BLUE_BURST}, - {gBattleAnimSpritePal_SmallEmber, ANIM_TAG_SMALL_EMBER}, - {gBattleAnimSpritePal_GraySmoke, ANIM_TAG_GRAY_SMOKE}, - {gBattleAnimSpritePal_BlueStar, ANIM_TAG_BLUE_STAR}, - {gBattleAnimSpritePal_BubbleBurst, ANIM_TAG_BUBBLE_BURST}, - {gBattleAnimSpritePal_Fire, ANIM_TAG_FIRE}, - {gBattleAnimSpritePal_Fire, ANIM_TAG_SPINNING_FIRE}, - {gBattleAnimSpritePal_Fire, ANIM_TAG_FIRE_PLUME}, - {gBattleAnimSpritePal_Lightning2, ANIM_TAG_LIGHTNING_2}, - {gBattleAnimSpritePal_Lightning2, ANIM_TAG_LIGHTNING}, - {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_CLAW_SLASH_2}, - {gBattleAnimSpritePal_ClawSlash, ANIM_TAG_CLAW_SLASH}, - {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_SCRATCH_3}, - {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_SCRATCH_2}, - {gBattleAnimSpritePal_BubbleBurst2, ANIM_TAG_BUBBLE_BURST_2}, - {gBattleAnimSpritePal_IceChunk, ANIM_TAG_ICE_CHUNK}, - {gBattleAnimSpritePal_Glass2, ANIM_TAG_GLASS_2}, - {gBattleAnimSpritePal_PinkHeart2, ANIM_TAG_PINK_HEART_2}, - {gBattleAnimSpritePal_SapDrip, ANIM_TAG_SAP_DRIP}, - {gBattleAnimSpritePal_SapDrip2, ANIM_TAG_SAP_DRIP}, - {gBattleAnimSpritePal_Sparkle1, ANIM_TAG_SPARKLE_1}, - {gBattleAnimSpritePal_Sparkle2, ANIM_TAG_SPARKLE_2}, - {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_HUMANOID_FOOT}, - {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_MONSTER_FOOT}, - {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_HUMANOID_HAND}, - {gBattleAnimSpritePal_HitDuplicate, ANIM_TAG_NOISE_LINE}, - {gBattleAnimSpritePal_YellowUnk, ANIM_TAG_YELLOW_UNK}, - {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_RED_FIST}, - {gBattleAnimSpritePal_SlamHit, ANIM_TAG_SLAM_HIT}, - {gBattleAnimSpritePal_Ring, ANIM_TAG_RING}, - {gBattleAnimSpritePal_Rocks, ANIM_TAG_ROCKS}, - {gBattleAnimSpritePal_Z, ANIM_TAG_Z}, - {gBattleAnimSpritePal_YellowUnk2, ANIM_TAG_YELLOW_UNK_2}, - {gBattleAnimSpritePal_AirSlash, ANIM_TAG_AIR_SLASH}, - {gBattleAnimSpritePal_SpinningGreenOrbs, ANIM_TAG_SPINNING_GREEN_ORBS}, - {gBattleAnimSpritePal_Leaf, ANIM_TAG_LEAF}, - {gBattleAnimSpritePal_Finger, ANIM_TAG_FINGER}, - {gBattleAnimSpritePal_PoisonPowder, ANIM_TAG_POISON_POWDER}, - {gBattleAnimSpritePal_BrownTriangle, ANIM_TAG_BROWN_TRIANGLE}, - {gBattleAnimSpritePal_SleepPowder, ANIM_TAG_SLEEP_POWDER}, - {gBattleAnimSpritePal_StunSpore, ANIM_TAG_STUN_SPORE}, - {gBattleAnimSpritePal_PoisonPowder, ANIM_TAG_POWDER}, - {gBattleAnimSpritePal_Sparkle3, ANIM_TAG_SPARKLE_3}, - {gBattleAnimSpritePal_Sparkle3, ANIM_TAG_SPARKLE_4}, - {gBattleAnimSpritePal_MusicNotes, ANIM_TAG_MUSIC_NOTES}, - {gBattleAnimSpritePal_Duck, ANIM_TAG_DUCK}, - {gBattleAnimSpritePal_MudSand, ANIM_TAG_MUD_SAND}, - {gBattleAnimSpritePal_Alert, ANIM_TAG_ALERT}, - {gBattleAnimSpritePal_BlueFlames, ANIM_TAG_BLUE_FLAMES}, - {gBattleAnimSpritePal_BlueFlames, ANIM_TAG_BLUE_FLAMES_2}, - {gBattleAnimSpritePal_Shock4, ANIM_TAG_SHOCK_4}, - {gBattleAnimSpritePal_Shock4, ANIM_TAG_SHOCK}, - {gBattleAnimSpritePal_Bell2, ANIM_TAG_BELL_2}, - {gBattleAnimSpritePal_PinkGlove, ANIM_TAG_PINK_GLOVE}, - {gBattleAnimSpritePal_BlueLines, ANIM_TAG_BLUE_LINES}, - {gBattleAnimSpritePal_Impact3, ANIM_TAG_IMPACT_3}, - {gBattleAnimSpritePal_Impact2, ANIM_TAG_IMPACT_2}, - {gBattleAnimSpritePal_Reticle, ANIM_TAG_RETICLE}, - {gBattleAnimSpritePal_Breath, ANIM_TAG_BREATH}, - {gBattleAnimSpritePal_Anger, ANIM_TAG_ANGER}, - {gBattleAnimSpritePal_Snowball, ANIM_TAG_SNOWBALL}, - {gBattleAnimSpritePal_Vine, ANIM_TAG_VINE}, - {gBattleAnimSpritePal_Sword2, ANIM_TAG_SWORD_2}, - {gBattleAnimSpritePal_Clapping, ANIM_TAG_CLAPPING}, - {gBattleAnimSpritePal_RedTube, ANIM_TAG_RED_TUBE}, - {gBattleAnimSpritePal_Amnesia, ANIM_TAG_AMNESIA}, - {gBattleAnimSpritePal_String2, ANIM_TAG_STRING_2}, - {gBattleAnimSpritePal_Pencil2, ANIM_TAG_PENCIL_2}, - {gBattleAnimSpritePal_Petal, ANIM_TAG_PETAL}, - {gBattleAnimSpritePal_BentSpoon, ANIM_TAG_BENT_SPOON}, - {gBattleAnimSpritePal_String2, ANIM_TAG_WEB}, - {gBattleAnimSpritePal_MilkBottle, ANIM_TAG_MILK_BOTTLE}, - {gBattleAnimSpritePal_Coin, ANIM_TAG_COIN}, - {gBattleAnimSpritePal_CrackedEgg, ANIM_TAG_CRACKED_EGG}, - {gBattleAnimSpritePal_CrackedEgg, ANIM_TAG_HATCHED_EGG}, - {gBattleAnimSpritePal_FreshEgg, ANIM_TAG_FRESH_EGG}, - {gBattleAnimSpritePal_Fangs, ANIM_TAG_FANGS}, - {gBattleAnimSpritePal_Explosion2, ANIM_TAG_EXPLOSION_2}, - {gBattleAnimSpritePal_Explosion2, ANIM_TAG_EXPLOSION_3}, - {gBattleAnimSpritePal_WaterDroplet, ANIM_TAG_WATER_DROPLET}, - {gBattleAnimSpritePal_WaterDroplet, ANIM_TAG_WATER_DROPLET_2}, - {gBattleAnimSpritePal_Seed2, ANIM_TAG_SEED_2}, - {gBattleAnimSpritePal_Seed2, ANIM_TAG_SPROUT}, - {gBattleAnimSpritePal_RedWand, ANIM_TAG_RED_WAND}, - {gBattleAnimSpritePal_PurpleGreenUnk, ANIM_TAG_PURPLE_GREEN_UNK}, - {gBattleAnimSpritePal_WaterColumn, ANIM_TAG_WATER_COLUMN}, - {gBattleAnimSpritePal_MudUnk, ANIM_TAG_MUD_UNK}, - {gBattleAnimSpritePal_RainDrops, ANIM_TAG_RAIN_DROPS}, - {gBattleAnimSpritePal_FurySwipes, ANIM_TAG_FURY_SWIPES}, - {gBattleAnimSpritePal_Vine2, ANIM_TAG_VINE_2}, - {gBattleAnimSpritePal_Teeth, ANIM_TAG_TEETH}, - {gBattleAnimSpritePal_Bone2, ANIM_TAG_BONE_2}, - {gBattleAnimSpritePal_WhiteBag, ANIM_TAG_WHITE_BAG}, - {gBattleAnimSpritePal_Unknown, ANIM_TAG_UNKNOWN}, - {gBattleAnimSpritePal_PurpleCoral, ANIM_TAG_PURPLE_CORAL}, - {gBattleAnimSpritePal_PurpleCoral, ANIM_TAG_PURPLE_DROPLET}, - {gBattleAnimSpritePal_Shock2, ANIM_TAG_SHOCK_2}, - {gBattleAnimSpritePal_ClosingEye2, ANIM_TAG_CLOSING_EYE_2}, - {gBattleAnimSpritePal_MetalBall, ANIM_TAG_METAL_BALL}, - {gBattleAnimSpritePal_MonsterDoll, ANIM_TAG_MONSTER_DOLL}, - {gBattleAnimSpritePal_Whirlwind, ANIM_TAG_WHIRLWIND}, - {gBattleAnimSpritePal_Whirlwind, ANIM_TAG_WHIRLWIND_2}, - {gBattleAnimSpritePal_Explosion4, ANIM_TAG_EXPLOSION_4}, - {gBattleAnimSpritePal_Explosion4, ANIM_TAG_EXPLOSION_5}, - {gBattleAnimSpritePal_Tongue, ANIM_TAG_TONGUE}, - {gBattleAnimSpritePal_Smoke, ANIM_TAG_SMOKE}, - {gBattleAnimSpritePal_Smoke, ANIM_TAG_SMOKE_2}, - {gBattleAnimSpritePal_Impact, ANIM_TAG_IMPACT}, - {gBattleAnimSpritePal_CircleImpact, ANIM_TAG_CIRCLE_IMPACT}, - {gBattleAnimSpritePal_Impact, ANIM_TAG_SCRATCH}, - {gBattleAnimSpritePal_Impact, ANIM_TAG_CUT}, - {gBattleAnimSpritePal_SharpTeeth, ANIM_TAG_SHARP_TEETH}, - {gBattleAnimSpritePal_RainbowRings, ANIM_TAG_RAINBOW_RINGS}, - {gBattleAnimSpritePal_IceCrystals, ANIM_TAG_ICE_CRYSTALS}, - {gBattleAnimSpritePal_IceCrystals, ANIM_TAG_ICE_SPIKES}, - {gBattleAnimSpritePal_HandsAndFeet, ANIM_TAG_HANDS_AND_FEET}, - {gBattleAnimSpritePal_MistCloud, ANIM_TAG_MIST_CLOUD}, - {gBattleAnimSpritePal_SharpTeeth, ANIM_TAG_CLAMP}, - {gBattleAnimSpritePal_RainDrops, ANIM_TAG_BUBBLE}, - {gBattleAnimSpritePal_Orbs, ANIM_TAG_ORBS}, - {gBattleAnimSpritePal_WaterImpact, ANIM_TAG_WATER_IMPACT}, - {gBattleAnimSpritePal_WaterImpact, ANIM_TAG_WATER_ORB}, - {gBattleAnimSpritePal_PoisonBubble, ANIM_TAG_POISON_BUBBLE}, - {gBattleAnimSpritePal_PoisonBubble, ANIM_TAG_TOXIC_BUBBLE}, - {gBattleAnimSpritePal_Spikes, ANIM_TAG_SPIKES}, - {gBattleAnimSpritePal_HornHit2, ANIM_TAG_HORN_HIT_2}, - {gBattleAnimSpritePal_AirWave2, ANIM_TAG_AIR_WAVE_2}, - {gBattleAnimSpritePal_SmallBubbles, ANIM_TAG_SMALL_BUBBLES}, - {gBattleAnimSpritePal_RoundShadow, ANIM_TAG_ROUND_SHADOW}, - {gBattleAnimSpritePal_Sunlight, ANIM_TAG_SUNLIGHT}, - {gBattleAnimSpritePal_Spore, ANIM_TAG_SPORE}, - {gBattleAnimSpritePal_Flower, ANIM_TAG_FLOWER}, - {gBattleAnimSpritePal_RazorLeaf, ANIM_TAG_RAZOR_LEAF}, - {gBattleAnimSpritePal_Needle, ANIM_TAG_NEEDLE}, - {gBattleAnimSpritePal_WhirlwindLines, ANIM_TAG_WHIRLWIND_LINES}, - {gBattleAnimSpritePal_GoldRing, ANIM_TAG_GOLD_RING}, - {gBattleAnimSpritePal_PurpleRing, ANIM_TAG_PURPLE_RING}, - {gBattleAnimSpritePal_BlueRing, ANIM_TAG_BLUE_RING}, - {gBattleAnimSpritePal_GreenLightWall, ANIM_TAG_GREEN_LIGHT_WALL}, - {gBattleAnimSpritePal_BlueLightWall, ANIM_TAG_BLUE_LIGHT_WALL}, - {gBattleAnimSpritePal_RedLightWall, ANIM_TAG_RED_LIGHT_WALL}, - {gBattleAnimSpritePal_GrayLightWall, ANIM_TAG_GRAY_LIGHT_WALL}, - {gBattleAnimSpritePal_OrangeLightWall, ANIM_TAG_ORANGE_LIGHT_WALL}, - {gBattleAnimSpritePal_BlackBall2, ANIM_TAG_BLACK_BALL_2}, - {gBattleAnimSpritePal_PurpleGasCloud, ANIM_TAG_PURPLE_GAS_CLOUD}, - {gBattleAnimSpritePal_Spark, ANIM_TAG_SPARK_H}, - {gBattleAnimSpritePal_YellowStar, ANIM_TAG_YELLOW_STAR}, - {gBattleAnimSpritePal_LargeFreshEgg, ANIM_TAG_LARGE_FRESH_EGG}, - {gBattleAnimSpritePal_ShadowBall, ANIM_TAG_SHADOW_BALL}, - {gBattleAnimSpritePal_Lick, ANIM_TAG_LICK}, - {gBattleAnimSpritePal_VoidLines, ANIM_TAG_VOID_LINES}, - {gBattleAnimSpritePal_String, ANIM_TAG_STRING}, - {gBattleAnimSpritePal_String, ANIM_TAG_WEB_THREAD}, - {gBattleAnimSpritePal_String, ANIM_TAG_SPIDER_WEB}, - {gBattleAnimSpritePal_Lightbulb, ANIM_TAG_LIGHTBULB}, - {gBattleAnimSpritePal_Slash, ANIM_TAG_SLASH}, - {gBattleAnimSpritePal_FocusEnergy, ANIM_TAG_FOCUS_ENERGY}, - {gBattleAnimSpritePal_SphereToCube, ANIM_TAG_SPHERE_TO_CUBE}, - {gBattleAnimSpritePal_Tendrils, ANIM_TAG_TENDRILS}, - {gBattleAnimSpritePal_Eye, ANIM_TAG_EYE}, - {gBattleAnimSpritePal_WhiteShadow, ANIM_TAG_WHITE_SHADOW}, - {gBattleAnimSpritePal_TealAlert, ANIM_TAG_TEAL_ALERT}, - {gBattleAnimSpritePal_OpeningEye, ANIM_TAG_OPENING_EYE}, - {gBattleAnimSpritePal_RoundWhiteHalo, ANIM_TAG_ROUND_WHITE_HALO}, - {gBattleAnimSpritePal_FangAttack, ANIM_TAG_FANG_ATTACK}, - {gBattleAnimSpritePal_PurpleHandOutline, ANIM_TAG_PURPLE_HAND_OUTLINE}, - {gBattleAnimSpritePal_Moon, ANIM_TAG_MOON}, - {gBattleAnimSpritePal_GreenSparkle, ANIM_TAG_GREEN_SPARKLE}, - {gBattleAnimSpritePal_Spiral, ANIM_TAG_SPIRAL}, - {gBattleAnimSpritePal_SnoreZ, ANIM_TAG_SNORE_Z}, - {gBattleAnimSpritePal_Explosion, ANIM_TAG_EXPLOSION}, - {gBattleAnimSpritePal_Nail, ANIM_TAG_NAIL}, - {gBattleAnimSpritePal_GhostlySpirit, ANIM_TAG_GHOSTLY_SPIRIT}, - {gBattleAnimSpritePal_WarmRock, ANIM_TAG_WARM_ROCK}, - {gBattleAnimSpritePal_BreakingEgg, ANIM_TAG_BREAKING_EGG}, - {gBattleAnimSpritePal_ThinRing, ANIM_TAG_THIN_RING}, - {gBattleAnimSpritePal_PunchImpact, ANIM_TAG_PUNCH_IMPACT}, - {gBattleAnimSpritePal_Bell, ANIM_TAG_BELL}, - {gBattleAnimSpritePal_MusicNotes2, ANIM_TAG_MUSIC_NOTES_2}, - {gBattleAnimSpritePal_SpeedDust, ANIM_TAG_SPEED_DUST}, - {gBattleAnimSpritePal_BlueLightWall, ANIM_TAG_TORN_METAL}, - {gBattleAnimSpritePal_ThoughtBubble, ANIM_TAG_THOUGHT_BUBBLE}, - {gBattleAnimSpritePal_MagentaHeart, ANIM_TAG_MAGENTA_HEART}, - {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_ELECTRIC_ORBS}, - {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_CIRCLE_OF_LIGHT}, - {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_ELECTRICITY}, - {gBattleAnimSpritePal_Finger, ANIM_TAG_FINGER_2}, - {gBattleAnimSpritePal_MovementWaves, ANIM_TAG_MOVEMENT_WAVES}, - {gBattleAnimSpritePal_RedHeart, ANIM_TAG_RED_HEART}, - {gBattleAnimSpritePal_RedOrb, ANIM_TAG_RED_ORB}, - {gBattleAnimSpritePal_EyeSparkle, ANIM_TAG_EYE_SPARKLE}, - {gBattleAnimSpritePal_PinkHeart, ANIM_TAG_PINK_HEART}, - {gBattleAnimSpritePal_Angel, ANIM_TAG_ANGEL}, - {gBattleAnimSpritePal_Devil, ANIM_TAG_DEVIL}, - {gBattleAnimSpritePal_Swipe, ANIM_TAG_SWIPE}, - {gBattleAnimSpritePal_Roots, ANIM_TAG_ROOTS}, - {gBattleAnimSpritePal_ItemBag, ANIM_TAG_ITEM_BAG}, - {gBattleAnimSpritePal_JaggedMusicNote, ANIM_TAG_JAGGED_MUSIC_NOTE}, - {gBattleAnimSpritePal_Pokeball, ANIM_TAG_POKEBALL}, - {gBattleAnimSpritePal_Pokeball, ANIM_TAG_SPOTLIGHT}, - {gBattleAnimSpritePal_LetterZ, ANIM_TAG_LETTER_Z}, - {gBattleAnimSpritePal_RapidSpin, ANIM_TAG_RAPID_SPIN}, - {gBattleAnimSpritePal_TriAttackTriangle, ANIM_TAG_TRI_ATTACK_TRIANGLE}, - {gBattleAnimSpritePal_WispOrb, ANIM_TAG_WISP_ORB}, - {gBattleAnimSpritePal_WispOrb, ANIM_TAG_WISP_FIRE}, - {gBattleAnimSpritePal_GoldStars, ANIM_TAG_GOLD_STARS}, - {gBattleAnimSpritePal_EclipsingOrb, ANIM_TAG_ECLIPSING_ORB}, - {gBattleAnimSpritePal_GrayOrb, ANIM_TAG_GRAY_ORB}, - {gBattleAnimSpritePal_BlueOrb, ANIM_TAG_BLUE_ORB}, - {gBattleAnimSpritePal_RedOrb2, ANIM_TAG_RED_ORB_2}, - {gBattleAnimSpritePal_PinkPetal, ANIM_TAG_PINK_PETAL}, - {gBattleAnimSpritePal_PainSplit, ANIM_TAG_PAIN_SPLIT}, - {gBattleAnimSpritePal_Confetti, ANIM_TAG_CONFETTI}, - {gBattleAnimSpritePal_GreenStar, ANIM_TAG_GREEN_STAR}, - {gBattleAnimSpritePal_PinkCloud, ANIM_TAG_PINK_CLOUD}, - {gBattleAnimSpritePal_SweatDrop, ANIM_TAG_SWEAT_DROP}, - {gBattleAnimSpritePal_GuardRing, ANIM_TAG_GUARD_RING}, - {gBattleAnimSpritePal_PurpleScratch, ANIM_TAG_PURPLE_SCRATCH}, - {gBattleAnimSpritePal_PurpleScratch, ANIM_TAG_PURPLE_SWIPE}, - {gBattleAnimSpritePal_Finger, ANIM_TAG_TAG_HAND}, - {gBattleAnimSpritePal_SmallRedEye, ANIM_TAG_SMALL_RED_EYE}, - {gBattleAnimSpritePal_HollowOrb, ANIM_TAG_HOLLOW_ORB}, - {gBattleAnimSpritePal_HollowOrb, ANIM_TAG_X_SIGN}, - {gBattleAnimSpritePal_BluegreenOrb, ANIM_TAG_BLUEGREEN_ORB}, - {gBattleAnimSpritePal_PawPrint, ANIM_TAG_PAW_PRINT}, - {gBattleAnimSpritePal_PurpleFlame, ANIM_TAG_PURPLE_FLAME}, - {gBattleAnimSpritePal_RedBall, ANIM_TAG_RED_BALL}, - {gBattleAnimSpritePal_SmellingsaltEffect, ANIM_TAG_SMELLINGSALT_EFFECT}, - {gBattleAnimSpritePal_Meteor, ANIM_TAG_METEOR}, - {gBattleAnimSpritePal_FlatRock, ANIM_TAG_FLAT_ROCK}, - {gBattleAnimSpritePal_MagnifyingGlass, ANIM_TAG_MAGNIFYING_GLASS}, - {gBattleAnimSpritePal_BrownOrb, ANIM_TAG_BROWN_ORB}, - {gBattleAnimSpritePal_MetalSoundWaves, ANIM_TAG_METAL_SOUND_WAVES}, - {gBattleAnimSpritePal_FlyingDirt, ANIM_TAG_FLYING_DIRT}, - {gBattleAnimSpritePal_IcicleSpear, ANIM_TAG_ICICLE_SPEAR}, - {gBattleAnimSpritePal_Hail, ANIM_TAG_HAIL}, - {gBattleAnimSpritePal_GlowyRedOrb, ANIM_TAG_GLOWY_RED_ORB}, - {gBattleAnimSpritePal_GlowyGreenOrb, ANIM_TAG_GLOWY_GREEN_ORB}, - {gBattleAnimSpritePal_GreenSpike, ANIM_TAG_GREEN_SPIKE}, - {gBattleAnimSpritePal_WhiteCircleOfLight, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT}, - {gBattleAnimSpritePal_GlowyBlueOrb, ANIM_TAG_GLOWY_BLUE_ORB}, - {gBattleAnimSpritePal_Pokeblock, ANIM_TAG_POKEBLOCK}, - {gBattleAnimSpritePal_WhiteFeather, ANIM_TAG_WHITE_FEATHER}, - {gBattleAnimSpritePal_Sparkle6, ANIM_TAG_SPARKLE_6}, - {gBattleAnimSpritePal_Splash, ANIM_TAG_SPLASH}, - {gBattleAnimSpritePal_Splash, ANIM_TAG_SWEAT_BEAD}, - {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_1}, - {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_2}, - {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_3}, - {gBattleAnimSpritePal_SlamHit2, ANIM_TAG_SLAM_HIT_2}, - {gBattleAnimSpritePal_Recycle, ANIM_TAG_RECYCLE}, - {gBattleAnimSpritePal_RedParticles, ANIM_TAG_RED_PARTICLES}, - {gBattleAnimSpritePal_Protect, ANIM_TAG_PROTECT}, - {gBattleAnimSpritePal_DirtMound, ANIM_TAG_DIRT_MOUND}, - {gBattleAnimSpritePal_Shock3, ANIM_TAG_SHOCK_3}, - {gBattleAnimSpritePal_WeatherBall, ANIM_TAG_WEATHER_BALL}, - {gBattleAnimSpritePal_Bird, ANIM_TAG_BIRD}, - {gBattleAnimSpritePal_CrossImpact, ANIM_TAG_CROSS_IMPACT}, - {gBattleAnimSpritePal_Slash2, ANIM_TAG_SLASH_2}, - {gBattleAnimSpritePal_WhipHit, ANIM_TAG_WHIP_HIT}, - {gBattleAnimSpritePal_BlueRing2, ANIM_TAG_BLUE_RING_2}, -}; - -const struct BattleAnimBackground gBattleAnimBackgroundTable[] = -{ - [BG_NONE] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, - [BG_DARK] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, - [BG_GHOST] = {gBattleAnimBgImage_Ghost, gBattleAnimBgPalette_Ghost, gBattleAnimBgTilemap_Ghost}, - [BG_PSYCHIC] = {gBattleAnimBgImage_Psychic, gBattleAnimBgPalette_Psychic, gBattleAnimBgTilemap_Psychic}, - [BG_IMPACT_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactOpponent}, - [BG_IMPACT_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactPlayer}, - [BG_IMPACT_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactContests}, - [BG_DRILL] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_Drill}, - [BG_DRILL_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_DrillContests}, - [BG_HIGHSPEED_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedOpponent}, - [BG_HIGHSPEED_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedPlayer}, - [BG_THUNDER] = {gBattleAnimBgImage_Thunder, gBattleAnimBgPalette_Thunder, gBattleAnimBgTilemap_Thunder}, - [BG_GUILLOTINE_OPPONENT] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineOpponent}, - [BG_GUILLOTINE_PLAYER] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotinePlayer}, - [BG_GUILLOTINE_CONTESTS] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineContests}, - [BG_ICE] = {gBattleAnimBgImage_Ice, gBattleAnimBgPalette_Ice, gBattleAnimBgTilemap_Ice}, - [BG_COSMIC] = {gBattleAnimBgImage_Cosmic, gBattleAnimBgPalette_Cosmic, gBattleAnimBgTilemap_Cosmic}, - [BG_IN_AIR] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_InAir, gBattleAnimBgTilemap_InAir}, - [BG_SKY] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_Drill}, - [BG_SKY_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_DrillContests}, - [BG_AURORA] = {gBattleAnimBgImage_Aurora, gBattleAnimBgPalette_Aurora, gBattleAnimBgTilemap_Aurora}, - [BG_FISSURE] = {gBattleAnimBgImage_Fissure, gBattleAnimBgPalette_Fissure, gBattleAnimBgTilemap_Fissure}, - [BG_BUG_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedOpponent}, - [BG_BUG_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedPlayer}, - [BG_SOLARBEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactOpponent}, - [BG_SOLARBEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactPlayer}, - [BG_SOLARBEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactContests}, -}; +#include "data/battle_anim.h" static void (* const sScriptCmdTable[])(void) = { - ScriptCmd_loadspritegfx, - ScriptCmd_unloadspritegfx, - ScriptCmd_createsprite, - ScriptCmd_createvisualtask, - ScriptCmd_delay, - ScriptCmd_waitforvisualfinish, - ScriptCmd_nop, - ScriptCmd_nop2, - ScriptCmd_end, - ScriptCmd_playse, - ScriptCmd_monbg, - ScriptCmd_clearmonbg, - ScriptCmd_setalpha, - ScriptCmd_blendoff, - ScriptCmd_call, - ScriptCmd_return, - ScriptCmd_setarg, - ScriptCmd_choosetwoturnanim, - ScriptCmd_jumpifmoveturn, - ScriptCmd_goto, - ScriptCmd_fadetobg, - ScriptCmd_restorebg, - ScriptCmd_waitbgfadeout, - ScriptCmd_waitbgfadein, - ScriptCmd_changebg, - ScriptCmd_playsewithpan, - ScriptCmd_setpan, - ScriptCmd_panse, - ScriptCmd_loopsewithpan, - ScriptCmd_waitplaysewithpan, - ScriptCmd_setbldcnt, - ScriptCmd_createsoundtask, - ScriptCmd_waitsound, - ScriptCmd_jumpargeq, - ScriptCmd_monbg_22, - ScriptCmd_clearmonbg_23, - ScriptCmd_jumpifcontest, - ScriptCmd_fadetobgfromset, - ScriptCmd_panse_adjustnone, - ScriptCmd_panse_adjustall, - ScriptCmd_monbgprio_28, - ScriptCmd_monbgprio_29, - ScriptCmd_monbgprio_2A, - ScriptCmd_invisible, - ScriptCmd_visible, - ScriptCmd_doublebattle_2D, - ScriptCmd_doublebattle_2E, - ScriptCmd_stopsound + Cmd_loadspritegfx, // 0x00 + Cmd_unloadspritegfx, // 0x01 + Cmd_createsprite, // 0x02 + Cmd_createvisualtask, // 0x03 + Cmd_delay, // 0x04 + Cmd_waitforvisualfinish, // 0x05 + Cmd_nop, // 0x06 + Cmd_nop2, // 0x07 + Cmd_end, // 0x08 + Cmd_playse, // 0x09 + Cmd_monbg, // 0x0A + Cmd_clearmonbg, // 0x0B + Cmd_setalpha, // 0x0C + Cmd_blendoff, // 0x0D + Cmd_call, // 0x0E + Cmd_return, // 0x0F + Cmd_setarg, // 0x10 + Cmd_choosetwoturnanim, // 0x11 + Cmd_jumpifmoveturn, // 0x12 + Cmd_goto, // 0x13 + Cmd_fadetobg, // 0x14 + Cmd_restorebg, // 0x15 + Cmd_waitbgfadeout, // 0x16 + Cmd_waitbgfadein, // 0x17 + Cmd_changebg, // 0x18 + Cmd_playsewithpan, // 0x19 + Cmd_setpan, // 0x1A + Cmd_panse, // 0x1B + Cmd_loopsewithpan, // 0x1C + Cmd_waitplaysewithpan, // 0x1D + Cmd_setbldcnt, // 0x1E + Cmd_createsoundtask, // 0x1F + Cmd_waitsound, // 0x20 + Cmd_jumpargeq, // 0x21 + Cmd_monbg_static, // 0x22 + Cmd_clearmonbg_static, // 0x23 + Cmd_jumpifcontest, // 0x24 + Cmd_fadetobgfromset, // 0x25 + Cmd_panse_adjustnone, // 0x26 + Cmd_panse_adjustall, // 0x27 + Cmd_splitbgprio, // 0x28 + Cmd_splitbgprio_all, // 0x29 + Cmd_splitbgprio_foes, // 0x2A + Cmd_invisible, // 0x2B + Cmd_visible, // 0x2C + Cmd_teamattack_moveback, // 0x2D + Cmd_teamattack_movefwd, // 0x2E + Cmd_stopsound, // 0x2F }; void ClearBattleAnimationVars(void) @@ -1950,7 +331,7 @@ static void RunAnimScriptCommand(void) } while (sAnimFramesToWait == 0 && gAnimScriptActive); } -static void ScriptCmd_loadspritegfx(void) +static void Cmd_loadspritegfx(void) { u16 index; @@ -1964,7 +345,7 @@ static void ScriptCmd_loadspritegfx(void) gAnimScriptCallback = WaitAnimFrameCount; } -static void ScriptCmd_unloadspritegfx(void) +static void Cmd_unloadspritegfx(void) { u16 index; @@ -1976,7 +357,7 @@ static void ScriptCmd_unloadspritegfx(void) ClearSpriteIndex(GET_TRUE_SPRITE_INDEX(index)); } -static void ScriptCmd_createsprite(void) +static void Cmd_createsprite(void) { s32 i; const struct SpriteTemplate *template; @@ -1999,11 +380,11 @@ static void ScriptCmd_createsprite(void) sBattleAnimScriptPtr += 2; } - if (argVar & 0x80) + if (argVar & ANIMSPRITE_IS_TARGET) { - argVar ^= 0x80; - if (argVar >= 0x40) - argVar -= 0x40; + argVar ^= ANIMSPRITE_IS_TARGET; + if (argVar >= 64) + argVar -= 64; else argVar *= -1; @@ -2011,8 +392,8 @@ static void ScriptCmd_createsprite(void) } else { - if (argVar >= 0x40) - argVar -= 0x40; + if (argVar >= 64) + argVar -= 64; else argVar *= -1; @@ -2030,7 +411,7 @@ static void ScriptCmd_createsprite(void) gAnimVisualTaskCount++; } -static void ScriptCmd_createvisualtask(void) +static void Cmd_createvisualtask(void) { TaskFunc taskFunc; u8 taskPriority; @@ -2060,7 +441,7 @@ static void ScriptCmd_createvisualtask(void) gAnimVisualTaskCount++; } -static void ScriptCmd_delay(void) +static void Cmd_delay(void) { sBattleAnimScriptPtr++; sAnimFramesToWait = sBattleAnimScriptPtr[0]; @@ -2071,7 +452,7 @@ static void ScriptCmd_delay(void) } // Wait for visual tasks to finish. -static void ScriptCmd_waitforvisualfinish(void) +static void Cmd_waitforvisualfinish(void) { if (gAnimVisualTaskCount == 0) { @@ -2084,15 +465,15 @@ static void ScriptCmd_waitforvisualfinish(void) } } -static void ScriptCmd_nop(void) +static void Cmd_nop(void) { } -static void ScriptCmd_nop2(void) +static void Cmd_nop2(void) { } -static void ScriptCmd_end(void) +static void Cmd_end(void) { s32 i; bool32 continuousAnim = FALSE; @@ -2146,7 +527,7 @@ static void ScriptCmd_end(void) } } -static void ScriptCmd_playse(void) +static void Cmd_playse(void) { sBattleAnimScriptPtr++; PlaySE(T1_READ_16(sBattleAnimScriptPtr)); @@ -2154,56 +535,60 @@ static void ScriptCmd_playse(void) } // These two tasks share context and similar task data -// To differentiate them their task data is prefixed t1/t2 +// To differentiate them the task data for Task_UpdateMonBg is prefixed t2 -// Task data for sub_80A40F4 -#define t1_BattlerSpriteId data[0] -#define t1_InBg2 data[1] -#define t1_CREATE_ANOTHER_TASK 2 -#define t1_IS_SECONDMON_BG 3 +// Task data for Task_InitUpdateMonBg +#define tBattlerId data[0] +#define tInBg2 data[1] +#define tActive data[2] +#define tIsPartner data[3] -// Task data for task_pA_ma0A_obj_to_bg_pal -#define t2_BATTLER_SPRITE_ID 0 -#define t2_MON_IN_BG2 5 -#define t2_MONBG_BATTLER 6 +// Task data for Task_UpdateMonBg +#define t2_SpriteId data[0] +#define t2_SpriteX data[1] +#define t2_SpriteY data[2] +#define t2_BgX data[3] +#define t2_BgY data[4] +#define t2_InBg2 data[5] +#define t2_BattlerId data[6] -static void sub_80A40F4(u8 taskId) +static void Task_InitUpdateMonBg(u8 taskId) { - u8 newTaskId; + u8 updateTaskId; s16 *data = gTasks[taskId].data; - u8 battlerSpriteId = gBattlerSpriteIds[t1_BattlerSpriteId]; + u8 battlerSpriteId = gBattlerSpriteIds[tBattlerId]; gSprites[battlerSpriteId].invisible = TRUE; - if (!data[t1_CREATE_ANOTHER_TASK]) + if (!tActive) { DestroyAnimVisualTask(taskId); return; } - newTaskId = CreateTask(task_pA_ma0A_obj_to_bg_pal, 10); - gTasks[newTaskId].data[t2_BATTLER_SPRITE_ID] = battlerSpriteId; - gTasks[newTaskId].data[1] = gSprites[battlerSpriteId].x + gSprites[battlerSpriteId].x2; - gTasks[newTaskId].data[2] = gSprites[battlerSpriteId].y + gSprites[battlerSpriteId].y2; + updateTaskId = CreateTask(Task_UpdateMonBg, 10); + gTasks[updateTaskId].t2_SpriteId = battlerSpriteId; + gTasks[updateTaskId].t2_SpriteX = gSprites[battlerSpriteId].x + gSprites[battlerSpriteId].x2; + gTasks[updateTaskId].t2_SpriteY = gSprites[battlerSpriteId].y + gSprites[battlerSpriteId].y2; - if (!t1_InBg2) + if (!tInBg2) { - gTasks[newTaskId].data[3] = gBattle_BG1_X; - gTasks[newTaskId].data[4] = gBattle_BG1_Y; + gTasks[updateTaskId].t2_BgX = gBattle_BG1_X; + gTasks[updateTaskId].t2_BgY = gBattle_BG1_Y; } else { - gTasks[newTaskId].data[3] = gBattle_BG2_X; - gTasks[newTaskId].data[4] = gBattle_BG2_Y; + gTasks[updateTaskId].t2_BgX = gBattle_BG2_X; + gTasks[updateTaskId].t2_BgY = gBattle_BG2_Y; } - gTasks[newTaskId].data[t2_MON_IN_BG2] = t1_InBg2; - gTasks[newTaskId].data[t2_MONBG_BATTLER] = t1_BattlerSpriteId; - sMonAnimTaskIdArray[data[t1_IS_SECONDMON_BG]] = newTaskId; + gTasks[updateTaskId].t2_InBg2 = tInBg2; + gTasks[updateTaskId].t2_BattlerId = tBattlerId; + sMonAnimTaskIdArray[tIsPartner] = updateTaskId; DestroyAnimVisualTask(taskId); } -static void ScriptCmd_monbg(void) +static void Cmd_monbg(void) { bool8 toBG_2; u8 taskId; @@ -2218,6 +603,7 @@ static void ScriptCmd_monbg(void) else battlerId = gBattleAnimAttacker; + // Move designated battler to background if (IsBattlerSpriteVisible(battlerId)) { u8 position = GetBattlerPosition(battlerId); @@ -2227,15 +613,16 @@ static void ScriptCmd_monbg(void) toBG_2 = TRUE; MoveBattlerSpriteToBG(battlerId, toBG_2, FALSE); - taskId = CreateTask(sub_80A40F4, 10); + taskId = CreateTask(Task_InitUpdateMonBg, 10); gAnimVisualTaskCount++; - gTasks[taskId].t1_BattlerSpriteId = battlerId; - gTasks[taskId].t1_InBg2 = toBG_2; - gTasks[taskId].data[t1_CREATE_ANOTHER_TASK] = TRUE; - gTasks[taskId].data[t1_IS_SECONDMON_BG] = 0; + gTasks[taskId].tBattlerId = battlerId; + gTasks[taskId].tInBg2 = toBG_2; + gTasks[taskId].tActive = TRUE; + gTasks[taskId].tIsPartner = FALSE; } + // Move battler's partner to background battlerId ^= BIT_FLANK; if (IsBattlerSpriteVisible(battlerId)) { @@ -2246,12 +633,12 @@ static void ScriptCmd_monbg(void) toBG_2 = TRUE; MoveBattlerSpriteToBG(battlerId, toBG_2, FALSE); - taskId = CreateTask(sub_80A40F4, 10); + taskId = CreateTask(Task_InitUpdateMonBg, 10); gAnimVisualTaskCount++; - gTasks[taskId].data[0] = battlerId; - gTasks[taskId].data[1] = toBG_2; - gTasks[taskId].data[t1_CREATE_ANOTHER_TASK] = TRUE; - gTasks[taskId].data[t1_IS_SECONDMON_BG] = 1; + gTasks[taskId].tBattlerId = battlerId; + gTasks[taskId].tInBg2 = toBG_2; + gTasks[taskId].tActive = TRUE; + gTasks[taskId].tIsPartner = TRUE; } sBattleAnimScriptPtr++; @@ -2423,43 +810,58 @@ void ResetBattleAnimBg(bool8 toBG2) } } -static void task_pA_ma0A_obj_to_bg_pal(u8 taskId) +static void Task_UpdateMonBg(u8 taskId) { - u8 spriteId, palIndex; + u8 spriteId, battlerId; s16 x, y; struct BattleAnimBgData animBg; - spriteId = gTasks[taskId].data[0]; - palIndex = gTasks[taskId].data[6]; + spriteId = gTasks[taskId].t2_SpriteId; + battlerId = gTasks[taskId].t2_BattlerId; GetBattleAnimBg1Data(&animBg); - x = gTasks[taskId].data[1] - (gSprites[spriteId].x + gSprites[spriteId].x2); - y = gTasks[taskId].data[2] - (gSprites[spriteId].y + gSprites[spriteId].y2); + x = gTasks[taskId].t2_SpriteX - (gSprites[spriteId].x + gSprites[spriteId].x2); + y = gTasks[taskId].t2_SpriteY - (gSprites[spriteId].y + gSprites[spriteId].y2); - if (gTasks[taskId].data[5] == 0) + if (!gTasks[taskId].t2_InBg2) { u16 *src; u16 *dst; - gBattle_BG1_X = x + gTasks[taskId].data[3]; - gBattle_BG1_Y = y + gTasks[taskId].data[4]; - src = &gPlttBufferFaded[0x100 + palIndex * 16]; + gBattle_BG1_X = x + gTasks[taskId].t2_BgX; + gBattle_BG1_Y = y + gTasks[taskId].t2_BgY; + + src = &gPlttBufferFaded[0x100 + battlerId * 16]; dst = &gPlttBufferFaded[0x100 + animBg.paletteId * 16 - 256]; - CpuCopy32(src, dst, 0x20); + CpuCopy32(src, dst, 32); } else { u16 *src; u16 *dst; - gBattle_BG2_X = x + gTasks[taskId].data[3]; - gBattle_BG2_Y = y + gTasks[taskId].data[4]; - src = &gPlttBufferFaded[0x100 + palIndex * 16]; + gBattle_BG2_X = x + gTasks[taskId].t2_BgX; + gBattle_BG2_Y = y + gTasks[taskId].t2_BgY; + + src = &gPlttBufferFaded[0x100 + battlerId * 16]; dst = &gPlttBufferFaded[0x100 - 112]; - CpuCopy32(src, dst, 0x20); + CpuCopy32(src, dst, 32); } } -static void ScriptCmd_clearmonbg(void) +#undef tBattlerId +#undef tInBg2 +#undef tActive +#undef tIsPartner + +#undef t2_SpriteId +#undef t2_SpriteX +#undef t2_SpriteY +#undef t2_BgX +#undef t2_BgY +#undef t2_InBg2 +#undef t2_BattlerId + +static void Cmd_clearmonbg(void) { u8 animBattlerId; u8 battlerId; @@ -2520,7 +922,8 @@ static void Task_ClearMonBg(u8 taskId) } } -static void ScriptCmd_monbg_22(void) +// Equivalent to Cmd_monbg but never creates Task_InitUpdateMonBg / Task_UpdateMonBg +static void Cmd_monbg_static(void) { bool8 toBG_2; u8 battlerId; @@ -2566,7 +969,7 @@ static void ScriptCmd_monbg_22(void) sBattleAnimScriptPtr++; } -static void ScriptCmd_clearmonbg_23(void) +static void Cmd_clearmonbg_static(void) { u8 animBattlerId; u8 battlerId; @@ -2592,14 +995,14 @@ static void ScriptCmd_clearmonbg_23(void) else animBattlerId = 0; - taskId = CreateTask(sub_80A4BB0, 5); + taskId = CreateTask(Task_ClearMonBgStatic, 5); gTasks[taskId].data[0] = animBattlerId; gTasks[taskId].data[2] = battlerId; sBattleAnimScriptPtr++; } -static void sub_80A4BB0(u8 taskId) +static void Task_ClearMonBgStatic(u8 taskId) { gTasks[taskId].data[1]++; if (gTasks[taskId].data[1] != 1) @@ -2621,16 +1024,7 @@ static void sub_80A4BB0(u8 taskId) } } -#undef t1_BattlerSpriteId -#undef t1_InBg2 -#undef t1_CREATE_ANOTHER_TASK -#undef t1_IS_SECONDMON_BG - -#undef t2_BATTLER_SPRITE_ID -#undef t2_MON_IN_BG2 -#undef t2_MONBG_BATTLER - -static void ScriptCmd_setalpha(void) +static void Cmd_setalpha(void) { u16 half1, half2; @@ -2641,7 +1035,7 @@ static void ScriptCmd_setalpha(void) SetGpuReg(REG_OFFSET_BLDALPHA, half1 | half2); } -static void ScriptCmd_setbldcnt(void) +static void Cmd_setbldcnt(void) { u16 half1, half2; @@ -2651,26 +1045,26 @@ static void ScriptCmd_setbldcnt(void) SetGpuReg(REG_OFFSET_BLDCNT, half1 | half2); } -static void ScriptCmd_blendoff(void) +static void Cmd_blendoff(void) { sBattleAnimScriptPtr++; SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); } -static void ScriptCmd_call(void) +static void Cmd_call(void) { sBattleAnimScriptPtr++; sBattleAnimScriptRetAddr = sBattleAnimScriptPtr + 4; sBattleAnimScriptPtr = T2_READ_PTR(sBattleAnimScriptPtr); } -static void ScriptCmd_return(void) +static void Cmd_return(void) { sBattleAnimScriptPtr = sBattleAnimScriptRetAddr; } -static void ScriptCmd_setarg(void) +static void Cmd_setarg(void) { // Save original address to return to // after the T1_READ_16, + 4. @@ -2688,7 +1082,7 @@ static void ScriptCmd_setarg(void) gBattleAnimArgs[argId] = value; } -static void ScriptCmd_choosetwoturnanim(void) +static void Cmd_choosetwoturnanim(void) { sBattleAnimScriptPtr++; if (gAnimMoveTurn & 1) @@ -2696,7 +1090,7 @@ static void ScriptCmd_choosetwoturnanim(void) sBattleAnimScriptPtr = T2_READ_PTR(sBattleAnimScriptPtr); } -static void ScriptCmd_jumpifmoveturn(void) +static void Cmd_jumpifmoveturn(void) { u8 toCheck; sBattleAnimScriptPtr++; @@ -2709,7 +1103,7 @@ static void ScriptCmd_jumpifmoveturn(void) sBattleAnimScriptPtr += 4; } -static void ScriptCmd_goto(void) +static void Cmd_goto(void) { sBattleAnimScriptPtr++; sBattleAnimScriptPtr = T2_READ_PTR(sBattleAnimScriptPtr); @@ -2728,7 +1122,7 @@ bool8 IsContest(void) #define tBackgroundId data[0] #define tState data[10] -static void ScriptCmd_fadetobg(void) +static void Cmd_fadetobg(void) { u8 backgroundId; u8 taskId; @@ -2741,7 +1135,7 @@ static void ScriptCmd_fadetobg(void) sAnimBackgroundFadeState = 1; } -static void ScriptCmd_fadetobgfromset(void) +static void Cmd_fadetobgfromset(void) { u8 bg1, bg2, bg3; u8 taskId; @@ -2832,7 +1226,7 @@ static void LoadDefaultBg(void) DrawMainBattleBackground(); } -static void ScriptCmd_restorebg(void) +static void Cmd_restorebg(void) { u8 taskId; @@ -2845,7 +1239,7 @@ static void ScriptCmd_restorebg(void) #undef tBackgroundId #undef tState -static void ScriptCmd_waitbgfadeout(void) +static void Cmd_waitbgfadeout(void) { if (sAnimBackgroundFadeState == 2) { @@ -2858,7 +1252,7 @@ static void ScriptCmd_waitbgfadeout(void) } } -static void ScriptCmd_waitbgfadein(void) +static void Cmd_waitbgfadein(void) { if (sAnimBackgroundFadeState == 0) { @@ -2871,7 +1265,7 @@ static void ScriptCmd_waitbgfadein(void) } } -static void ScriptCmd_changebg(void) +static void Cmd_changebg(void) { sBattleAnimScriptPtr++; LoadMoveBg(sBattleAnimScriptPtr[0]); @@ -2963,7 +1357,7 @@ s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan) return ret; } -static void ScriptCmd_playsewithpan(void) +static void Cmd_playsewithpan(void) { u16 songId; s8 pan; @@ -2975,7 +1369,7 @@ static void ScriptCmd_playsewithpan(void) sBattleAnimScriptPtr += 3; } -static void ScriptCmd_setpan(void) +static void Cmd_setpan(void) { s8 pan; @@ -2992,7 +1386,7 @@ static void ScriptCmd_setpan(void) #define tCurrentPan data[4] #define tFrameCounter data[8] -static void ScriptCmd_panse(void) +static void Cmd_panse(void) { u16 songNum; s8 currentPanArg, incrementPan, incrementPanArg, currentPan, targetPan; @@ -3065,7 +1459,7 @@ void Task_PanFromInitialToTarget(u8 taskId) } } -static void ScriptCmd_panse_adjustnone(void) +static void Cmd_panse_adjustnone(void) { u16 songId; s8 currentPan, targetPan, incrementPan; @@ -3092,7 +1486,7 @@ static void ScriptCmd_panse_adjustnone(void) sBattleAnimScriptPtr += 6; } -static void ScriptCmd_panse_adjustall(void) +static void Cmd_panse_adjustall(void) { u16 songId; s8 targetPanArg, incrementPanArg, currentPanArg, currentPan, targetPan, incrementPan; @@ -3136,7 +1530,7 @@ static void ScriptCmd_panse_adjustall(void) #define tNumberOfPlays data[3] #define tFrameCounter data[8] -static void ScriptCmd_loopsewithpan(void) +static void Cmd_loopsewithpan(void) { u16 songId; s8 panningArg, panning; @@ -3193,7 +1587,7 @@ static void Task_LoopAndPlaySE(u8 taskId) #define tPanning data[1] #define tFramesToWait data[2] -static void ScriptCmd_waitplaysewithpan(void) +static void Cmd_waitplaysewithpan(void) { u16 songId; s8 panningArg, panning; @@ -3229,7 +1623,7 @@ static void Task_WaitAndPlaySE(u8 taskId) #undef tPanning #undef tFramesToWait -static void ScriptCmd_createsoundtask(void) +static void Cmd_createsoundtask(void) { TaskFunc func; u8 numArgs, taskId; @@ -3250,7 +1644,7 @@ static void ScriptCmd_createsoundtask(void) gAnimSoundTaskCount++; } -static void ScriptCmd_waitsound(void) +static void Cmd_waitsound(void) { if (gAnimSoundTaskCount != 0) { @@ -3278,7 +1672,7 @@ static void ScriptCmd_waitsound(void) } } -static void ScriptCmd_jumpargeq(void) +static void Cmd_jumpargeq(void) { u8 argId; s16 valueToCheck; @@ -3293,7 +1687,7 @@ static void ScriptCmd_jumpargeq(void) sBattleAnimScriptPtr += 7; } -static void ScriptCmd_jumpifcontest(void) +static void Cmd_jumpifcontest(void) { sBattleAnimScriptPtr++; if (IsContest()) @@ -3302,7 +1696,7 @@ static void ScriptCmd_jumpifcontest(void) sBattleAnimScriptPtr += 4; } -static void ScriptCmd_monbgprio_28(void) +static void Cmd_splitbgprio(void) { u8 wantedBattler; u8 battlerId; @@ -3316,6 +1710,7 @@ static void ScriptCmd_monbgprio_28(void) else battlerId = gBattleAnimAttacker; + // Apply only if the given battler is the lead (on left from team's perspective) battlerPosition = GetBattlerPosition(battlerId); if (!IsContest() && (battlerPosition == B_POSITION_PLAYER_LEFT || battlerPosition == B_POSITION_OPPONENT_RIGHT)) { @@ -3324,7 +1719,7 @@ static void ScriptCmd_monbgprio_28(void) } } -static void ScriptCmd_monbgprio_29(void) +static void Cmd_splitbgprio_all(void) { sBattleAnimScriptPtr++; if (!IsContest()) @@ -3334,7 +1729,7 @@ static void ScriptCmd_monbgprio_29(void) } } -static void ScriptCmd_monbgprio_2A(void) +static void Cmd_splitbgprio_foes(void) { u8 wantedBattler; u8 battlerPosition; @@ -3342,6 +1737,8 @@ static void ScriptCmd_monbgprio_2A(void) wantedBattler = sBattleAnimScriptPtr[1]; sBattleAnimScriptPtr += 2; + + // Apply only if the attacking the opposing side if (GetBattlerSide(gBattleAnimAttacker) != GetBattlerSide(gBattleAnimTarget)) { if (wantedBattler != ANIM_ATTACKER) @@ -3349,6 +1746,7 @@ static void ScriptCmd_monbgprio_2A(void) else battlerId = gBattleAnimAttacker; + // Apply only if the given battler is the lead (on left from team's perspective) battlerPosition = GetBattlerPosition(battlerId); if (!IsContest() && (battlerPosition == B_POSITION_PLAYER_LEFT || battlerPosition == B_POSITION_OPPONENT_RIGHT)) { @@ -3358,7 +1756,7 @@ static void ScriptCmd_monbgprio_2A(void) } } -static void ScriptCmd_invisible(void) +static void Cmd_invisible(void) { u8 spriteId; @@ -3369,7 +1767,7 @@ static void ScriptCmd_invisible(void) sBattleAnimScriptPtr += 2; } -static void ScriptCmd_visible(void) +static void Cmd_visible(void) { u8 spriteId; @@ -3380,34 +1778,37 @@ static void ScriptCmd_visible(void) sBattleAnimScriptPtr += 2; } -static void ScriptCmd_doublebattle_2D(void) +// Below two commands are never used +static void Cmd_teamattack_moveback(void) { u8 wantedBattler; - u8 r4; + u8 priorityRank; u8 spriteId; wantedBattler = sBattleAnimScriptPtr[1]; sBattleAnimScriptPtr += 2; + + // Apply to double battles when attacking own side if (!IsContest() && IsDoubleBattle() && GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget)) { if (wantedBattler == ANIM_ATTACKER) { - r4 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker); + priorityRank = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker); spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); } else { - r4 = GetBattlerSpriteBGPriorityRank(gBattleAnimTarget); + priorityRank = GetBattlerSpriteBGPriorityRank(gBattleAnimTarget); spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); } if (spriteId != SPRITE_NONE) { gSprites[spriteId].invisible = FALSE; - if (r4 == 2) + if (priorityRank == 2) gSprites[spriteId].oam.priority = 3; - if (r4 == 1) + if (priorityRank == 1) ResetBattleAnimBg(FALSE); else ResetBattleAnimBg(TRUE); @@ -3415,34 +1816,36 @@ static void ScriptCmd_doublebattle_2D(void) } } -static void ScriptCmd_doublebattle_2E(void) +static void Cmd_teamattack_movefwd(void) { u8 wantedBattler; - u8 r4; + u8 priorityRank; u8 spriteId; wantedBattler = sBattleAnimScriptPtr[1]; sBattleAnimScriptPtr += 2; + + // Apply to double battles when attacking own side if (!IsContest() && IsDoubleBattle() && GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget)) { if (wantedBattler == ANIM_ATTACKER) { - r4 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker); + priorityRank = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker); spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); } else { - r4 = GetBattlerSpriteBGPriorityRank(gBattleAnimTarget); + priorityRank = GetBattlerSpriteBGPriorityRank(gBattleAnimTarget); spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); } - if (spriteId != SPRITE_NONE && r4 == 2) + if (spriteId != SPRITE_NONE && priorityRank == 2) gSprites[spriteId].oam.priority = 2; } } -static void ScriptCmd_stopsound(void) +static void Cmd_stopsound(void) { m4aMPlayStop(&gMPlayInfo_SE1); m4aMPlayStop(&gMPlayInfo_SE2); diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h new file mode 100644 index 0000000000..5b24981d57 --- /dev/null +++ b/src/data/battle_anim.h @@ -0,0 +1,1625 @@ +const struct OamData gOamData_AffineOff_ObjNormal_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + + +const struct OamData gOamData_AffineOff_ObjNormal_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjNormal_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjNormal_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjNormal_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_NORMAL, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineOff_ObjBlend_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineNormal_ObjBlend_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_16x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x16), + .x = 0, + .size = SPRITE_SIZE(16x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_32x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x32), + .x = 0, + .size = SPRITE_SIZE(32x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_64x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_16x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x8), + .x = 0, + .size = SPRITE_SIZE(16x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_32x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_32x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x16), + .x = 0, + .size = SPRITE_SIZE(32x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_64x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x32), + .x = 0, + .size = SPRITE_SIZE(64x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_8x16 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x16), + .x = 0, + .size = SPRITE_SIZE(8x16), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_8x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .x = 0, + .size = SPRITE_SIZE(8x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_16x32 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(16x32), + .x = 0, + .size = SPRITE_SIZE(16x32), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct OamData gOamData_AffineDouble_ObjBlend_32x64 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_DOUBLE, + .objMode = ST_OAM_OBJ_BLEND, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x64), + .x = 0, + .size = SPRITE_SIZE(32x64), + .tileNum = 0, + .priority = 2, + .paletteNum = 0, +}; + +const struct CompressedSpriteSheet gBattleAnimPicTable[] = +{ + {gBattleAnimSpriteGfx_Bone, 0x0200, ANIM_TAG_BONE}, + {gBattleAnimSpriteGfx_Spark, 0x0300, ANIM_TAG_SPARK}, + {gBattleAnimSpriteGfx_Pencil, 0x0200, ANIM_TAG_PENCIL}, + {gBattleAnimSpriteGfx_AirWave, 0x0100, ANIM_TAG_AIR_WAVE}, + {gBattleAnimSpriteGfx_Orb, 0x0200, ANIM_TAG_ORB}, + {gBattleAnimSpriteGfx_Sword, 0x0400, ANIM_TAG_SWORD}, + {gBattleAnimSpriteGfx_Seed, 0x0180, ANIM_TAG_SEED}, + {gBattleAnimSpriteGfx_Explosion6, 0x0800, ANIM_TAG_EXPLOSION_6}, + {gBattleAnimSpriteGfx_PinkOrb, 0x0020, ANIM_TAG_PINK_ORB}, + {gBattleAnimSpriteGfx_Gust, 0x0400, ANIM_TAG_GUST}, + {gBattleAnimSpriteGfx_IceCube, 0x1200, ANIM_TAG_ICE_CUBE}, + {gBattleAnimSpriteGfx_Spark2, 0x0180, ANIM_TAG_SPARK_2}, + {gBattleAnimSpriteGfx_Orange, 0x0080, ANIM_TAG_ORANGE}, + {gBattleAnimSpriteGfx_YellowBall, 0x0080, ANIM_TAG_YELLOW_BALL}, + {gBattleAnimSpriteGfx_LockOn, 0x0280, ANIM_TAG_LOCK_ON}, + {gBattleAnimSpriteGfx_TiedBag, 0x0080, ANIM_TAG_TIED_BAG}, + {gBattleAnimSpriteGfx_BlackSmoke, 0x0100, ANIM_TAG_BLACK_SMOKE}, + {gBattleAnimSpriteGfx_BlackBall, 0x0020, ANIM_TAG_BLACK_BALL}, + {gBattleAnimSpriteGfx_Conversion, 0x0080, ANIM_TAG_CONVERSION}, + {gBattleAnimSpriteGfx_Glass, 0x0400, ANIM_TAG_GLASS}, + {gBattleAnimSpriteGfx_HornHit, 0x0200, ANIM_TAG_HORN_HIT}, + {gBattleAnimSpriteGfx_Hit, 0x0A00, ANIM_TAG_HIT}, + {gBattleAnimSpriteGfx_Hit, 0x0A00, ANIM_TAG_HIT_2}, + {gBattleAnimSpriteGfx_BlueShards, 0x0380, ANIM_TAG_BLUE_SHARDS}, + {gBattleAnimSpriteGfx_ClosingEye, 0x0300, ANIM_TAG_CLOSING_EYE}, + {gBattleAnimSpriteGfx_WavingHand, 0x0A00, ANIM_TAG_WAVING_HAND}, + {gBattleAnimSpriteGfx_HitDuplicate, 0x0A00, ANIM_TAG_HIT_DUPLICATE}, + {gBattleAnimSpriteGfx_Leer, 0x0A00, ANIM_TAG_LEER}, + {gBattleAnimSpriteGfx_BlueBurst, 0x0A00, ANIM_TAG_BLUE_BURST}, + {gBattleAnimSpriteGfx_SmallEmber, 0x0A00, ANIM_TAG_SMALL_EMBER}, + {gBattleAnimSpriteGfx_GraySmoke, 0x0A00, ANIM_TAG_GRAY_SMOKE}, + {gBattleAnimSpriteGfx_BlueStar, 0x0E00, ANIM_TAG_BLUE_STAR}, + {gBattleAnimSpriteGfx_BubbleBurst, 0x0380, ANIM_TAG_BUBBLE_BURST}, + {gBattleAnimSpriteGfx_Fire, 0x1000, ANIM_TAG_FIRE}, + {gBattleAnimSpriteGfx_SpinningFire, 0x0800, ANIM_TAG_SPINNING_FIRE}, + {gBattleAnimSpriteGfx_FirePlume, 0x0A00, ANIM_TAG_FIRE_PLUME}, + {gBattleAnimSpriteGfx_Lightning2, 0x0800, ANIM_TAG_LIGHTNING_2}, + {gBattleAnimSpriteGfx_Lightning, 0x0A00, ANIM_TAG_LIGHTNING}, + {gBattleAnimSpriteGfx_ClawSlash2, 0x0A00, ANIM_TAG_CLAW_SLASH_2}, + {gBattleAnimSpriteGfx_ClawSlash, 0x0A00, ANIM_TAG_CLAW_SLASH}, + {gBattleAnimSpriteGfx_Scratch3, 0x0A00, ANIM_TAG_SCRATCH_3}, + {gBattleAnimSpriteGfx_Scratch2, 0x0A00, ANIM_TAG_SCRATCH_2}, + {gBattleAnimSpriteGfx_BubbleBurst2, 0x0A00, ANIM_TAG_BUBBLE_BURST_2}, + {gBattleAnimSpriteGfx_IceChunk, 0x0A00, ANIM_TAG_ICE_CHUNK}, + {gBattleAnimSpriteGfx_Glass2, 0x0A00, ANIM_TAG_GLASS_2}, + {gBattleAnimSpriteGfx_PinkHeart2, 0x0A00, ANIM_TAG_PINK_HEART_2}, + {gBattleAnimSpriteGfx_SapDrip, 0x1000, ANIM_TAG_SAP_DRIP}, + {gBattleAnimSpriteGfx_SapDrip, 0x1000, ANIM_TAG_SAP_DRIP_2}, + {gBattleAnimSpriteGfx_Sparkle1, 0x1000, ANIM_TAG_SPARKLE_1}, + {gBattleAnimSpriteGfx_Sparkle1, 0x1000, ANIM_TAG_SPARKLE_2}, + {gBattleAnimSpriteGfx_HumanoidFoot, 0x0200, ANIM_TAG_HUMANOID_FOOT}, + {gBattleAnimSpriteGfx_MonsterFoot, 0x0200, ANIM_TAG_MONSTER_FOOT}, + {gBattleAnimSpriteGfx_HumanoidHand, 0x0200, ANIM_TAG_HUMANOID_HAND}, + {gBattleAnimSpriteGfx_NoiseLine, 0x0800, ANIM_TAG_NOISE_LINE}, + {gBattleAnimSpriteGfx_YellowUnk, 0x0080, ANIM_TAG_YELLOW_UNK}, + {gBattleAnimSpriteGfx_RedFist, 0x0200, ANIM_TAG_RED_FIST}, + {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_SLAM_HIT}, + {gBattleAnimSpriteGfx_Ring, 0x0180, ANIM_TAG_RING}, + {gBattleAnimSpriteGfx_Rocks, 0x0C00, ANIM_TAG_ROCKS}, + {gBattleAnimSpriteGfx_Z, 0x0100, ANIM_TAG_Z}, + {gBattleAnimSpriteGfx_YellowUnk2, 0x0040, ANIM_TAG_YELLOW_UNK_2}, + {gBattleAnimSpriteGfx_AirSlash, 0x0180, ANIM_TAG_AIR_SLASH}, + {gBattleAnimSpriteGfx_SpinningGreenOrbs, 0x0800, ANIM_TAG_SPINNING_GREEN_ORBS}, + {gBattleAnimSpriteGfx_Leaf, 0x0480, ANIM_TAG_LEAF}, + {gBattleAnimSpriteGfx_Finger, 0x0200, ANIM_TAG_FINGER}, + {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_POISON_POWDER}, + {gBattleAnimSpriteGfx_BrownTriangle, 0x0100, ANIM_TAG_BROWN_TRIANGLE}, + {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_SLEEP_POWDER}, + {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_STUN_SPORE}, + {gBattleAnimSpriteGfx_PoisonPowder, 0x0200, ANIM_TAG_POWDER}, + {gBattleAnimSpriteGfx_Sparkle3, 0x0200, ANIM_TAG_SPARKLE_3}, + {gBattleAnimSpriteGfx_Sparkle4, 0x0A00, ANIM_TAG_SPARKLE_4}, + {gBattleAnimSpriteGfx_MusicNotes, 0x0300, ANIM_TAG_MUSIC_NOTES}, + {gBattleAnimSpriteGfx_Duck, 0x0180, ANIM_TAG_DUCK}, + {gBattleAnimSpriteGfx_MudSand, 0x00A0, ANIM_TAG_MUD_SAND}, + {gBattleAnimSpriteGfx_Alert, 0x0700, ANIM_TAG_ALERT}, + {gBattleAnimSpriteGfx_BlueFlames, 0x0400, ANIM_TAG_BLUE_FLAMES}, + {gBattleAnimSpriteGfx_BlueFlames2, 0x0200, ANIM_TAG_BLUE_FLAMES_2}, + {gBattleAnimSpriteGfx_Shock4, 0x0300, ANIM_TAG_SHOCK_4}, + {gBattleAnimSpriteGfx_Shock, 0x0C00, ANIM_TAG_SHOCK}, + {gBattleAnimSpriteGfx_Bell2, 0x0A00, ANIM_TAG_BELL_2}, + {gBattleAnimSpriteGfx_PinkGlove, 0x0080, ANIM_TAG_PINK_GLOVE}, + {gBattleAnimSpriteGfx_BlueLines, 0x0040, ANIM_TAG_BLUE_LINES}, + {gBattleAnimSpriteGfx_Impact3, 0x0E00, ANIM_TAG_IMPACT_3}, + {gBattleAnimSpriteGfx_Impact2, 0x0E00, ANIM_TAG_IMPACT_2}, + {gBattleAnimSpriteGfx_Reticle, 0x0280, ANIM_TAG_RETICLE}, + {gBattleAnimSpriteGfx_Breath, 0x0200, ANIM_TAG_BREATH}, + {gBattleAnimSpriteGfx_Anger, 0x0080, ANIM_TAG_ANGER}, + {gBattleAnimSpriteGfx_Snowball, 0x00C0, ANIM_TAG_SNOWBALL}, + {gBattleAnimSpriteGfx_Vine, 0x0A00, ANIM_TAG_VINE}, + {gBattleAnimSpriteGfx_Sword2, 0x0200, ANIM_TAG_SWORD_2}, + {gBattleAnimSpriteGfx_Clapping, 0x0180, ANIM_TAG_CLAPPING}, + {gBattleAnimSpriteGfx_RedTube, 0x0080, ANIM_TAG_RED_TUBE}, + {gBattleAnimSpriteGfx_Amnesia, 0x1000, ANIM_TAG_AMNESIA}, + {gBattleAnimSpriteGfx_String2, 0x0A00, ANIM_TAG_STRING_2}, + {gBattleAnimSpriteGfx_Pencil2, 0x0180, ANIM_TAG_PENCIL_2}, + {gBattleAnimSpriteGfx_Petal, 0x0380, ANIM_TAG_PETAL}, + {gBattleAnimSpriteGfx_BentSpoon, 0x0C00, ANIM_TAG_BENT_SPOON}, + {gBattleAnimSpriteGfx_Web, 0x0200, ANIM_TAG_WEB}, + {gBattleAnimSpriteGfx_MilkBottle, 0x0200, ANIM_TAG_MILK_BOTTLE}, + {gBattleAnimSpriteGfx_Coin, 0x0200, ANIM_TAG_COIN}, + {gBattleAnimSpriteGfx_CrackedEgg, 0x0200, ANIM_TAG_CRACKED_EGG}, + {gBattleAnimSpriteGfx_HatchedEgg, 0x0400, ANIM_TAG_HATCHED_EGG}, + {gBattleAnimSpriteGfx_FreshEgg, 0x0080, ANIM_TAG_FRESH_EGG}, + {gBattleAnimSpriteGfx_Fangs, 0x0400, ANIM_TAG_FANGS}, + {gBattleAnimSpriteGfx_Explosion2, 0x0c00, ANIM_TAG_EXPLOSION_2}, + {gBattleAnimSpriteGfx_Explosion3, 0x0200, ANIM_TAG_EXPLOSION_3}, + {gBattleAnimSpriteGfx_WaterDroplet, 0x1000, ANIM_TAG_WATER_DROPLET}, + {gBattleAnimSpriteGfx_WaterDroplet2, 0x0a00, ANIM_TAG_WATER_DROPLET_2}, + {gBattleAnimSpriteGfx_Seed2, 0x0020, ANIM_TAG_SEED_2}, + {gBattleAnimSpriteGfx_Sprout, 0x0e00, ANIM_TAG_SPROUT}, + {gBattleAnimSpriteGfx_RedWand, 0x0080, ANIM_TAG_RED_WAND}, + {gBattleAnimSpriteGfx_PurpleGreenUnk, 0x0a00, ANIM_TAG_PURPLE_GREEN_UNK}, + {gBattleAnimSpriteGfx_WaterColumn, 0x0400, ANIM_TAG_WATER_COLUMN}, + {gBattleAnimSpriteGfx_MudUnk, 0x0200, ANIM_TAG_MUD_UNK}, + {gBattleAnimSpriteGfx_RainDrops, 0x0700, ANIM_TAG_RAIN_DROPS}, + {gBattleAnimSpriteGfx_FurySwipes, 0x0800, ANIM_TAG_FURY_SWIPES}, + {gBattleAnimSpriteGfx_Vine2, 0x0a00, ANIM_TAG_VINE_2}, + {gBattleAnimSpriteGfx_Teeth, 0x0600, ANIM_TAG_TEETH}, + {gBattleAnimSpriteGfx_Bone2, 0x0800, ANIM_TAG_BONE_2}, + {gBattleAnimSpriteGfx_WhiteBag, 0x0200, ANIM_TAG_WHITE_BAG}, + {gBattleAnimSpriteGfx_Unknown, 0x0040, ANIM_TAG_UNKNOWN}, + {gBattleAnimSpriteGfx_PurpleCoral, 0x0180, ANIM_TAG_PURPLE_CORAL}, + {gBattleAnimSpriteGfx_PurpleDroplet, 0x0600, ANIM_TAG_PURPLE_DROPLET}, + {gBattleAnimSpriteGfx_Shock2, 0x0600, ANIM_TAG_SHOCK_2}, + {gBattleAnimSpriteGfx_ClosingEye2, 0x0200, ANIM_TAG_CLOSING_EYE_2}, + {gBattleAnimSpriteGfx_MetalBall, 0x0080, ANIM_TAG_METAL_BALL}, + {gBattleAnimSpriteGfx_MonsterDoll, 0x0200, ANIM_TAG_MONSTER_DOLL}, + {gBattleAnimSpriteGfx_Whirlwind, 0x0800, ANIM_TAG_WHIRLWIND}, + {gBattleAnimSpriteGfx_Whirlwind2, 0x0080, ANIM_TAG_WHIRLWIND_2}, + {gBattleAnimSpriteGfx_Explosion4, 0x0a00, ANIM_TAG_EXPLOSION_4}, + {gBattleAnimSpriteGfx_Explosion5, 0x0280, ANIM_TAG_EXPLOSION_5}, + {gBattleAnimSpriteGfx_Tongue, 0x0280, ANIM_TAG_TONGUE}, + {gBattleAnimSpriteGfx_Smoke, 0x0100, ANIM_TAG_SMOKE}, + {gBattleAnimSpriteGfx_Smoke2, 0x0200, ANIM_TAG_SMOKE_2}, + {gBattleAnimSpriteGfx_Impact, 0x0200, ANIM_TAG_IMPACT}, + {gBattleAnimSpriteGfx_CircleImpact, 0x0020, ANIM_TAG_CIRCLE_IMPACT}, + {gBattleAnimSpriteGfx_Scratch, 0x0a00, ANIM_TAG_SCRATCH}, + {gBattleAnimSpriteGfx_Cut, 0x0800, ANIM_TAG_CUT}, + {gBattleAnimSpriteGfx_SharpTeeth, 0x0800, ANIM_TAG_SHARP_TEETH}, + {gBattleAnimSpriteGfx_RainbowRings, 0x00c0, ANIM_TAG_RAINBOW_RINGS}, + {gBattleAnimSpriteGfx_IceCrystals, 0x01c0, ANIM_TAG_ICE_CRYSTALS}, + {gBattleAnimSpriteGfx_IceSpikes, 0x0100, ANIM_TAG_ICE_SPIKES}, + {gBattleAnimSpriteGfx_HandsAndFeet, 0x0800, ANIM_TAG_HANDS_AND_FEET}, + {gBattleAnimSpriteGfx_MistCloud, 0x0200, ANIM_TAG_MIST_CLOUD}, + {gBattleAnimSpriteGfx_Clamp, 0x0800, ANIM_TAG_CLAMP}, + {gBattleAnimSpriteGfx_Bubble, 0x0180, ANIM_TAG_BUBBLE}, + {gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_ORBS}, + {gBattleAnimSpriteGfx_WaterImpact, 0x0200, ANIM_TAG_WATER_IMPACT}, + {gBattleAnimSpriteGfx_WaterOrb, 0x0200, ANIM_TAG_WATER_ORB}, + {gBattleAnimSpriteGfx_PoisonBubble, 0x0180, ANIM_TAG_POISON_BUBBLE}, + {gBattleAnimSpriteGfx_ToxicBubble, 0x0400, ANIM_TAG_TOXIC_BUBBLE}, + {gBattleAnimSpriteGfx_Spikes, 0x0080, ANIM_TAG_SPIKES}, + {gBattleAnimSpriteGfx_HornHit2, 0x0100, ANIM_TAG_HORN_HIT_2}, + {gBattleAnimSpriteGfx_AirWave2, 0x0100, ANIM_TAG_AIR_WAVE_2}, + {gBattleAnimSpriteGfx_SmallBubbles, 0x0140, ANIM_TAG_SMALL_BUBBLES}, + {gBattleAnimSpriteGfx_RoundShadow, 0x0800, ANIM_TAG_ROUND_SHADOW}, + {gBattleAnimSpriteGfx_Sunlight, 0x0200, ANIM_TAG_SUNLIGHT}, + {gBattleAnimSpriteGfx_Spore, 0x0100, ANIM_TAG_SPORE}, + {gBattleAnimSpriteGfx_Flower, 0x00a0, ANIM_TAG_FLOWER}, + {gBattleAnimSpriteGfx_RazorLeaf, 0x0100, ANIM_TAG_RAZOR_LEAF}, + {gBattleAnimSpriteGfx_Needle, 0x0080, ANIM_TAG_NEEDLE}, + {gBattleAnimSpriteGfx_WhirlwindLines, 0x0300, ANIM_TAG_WHIRLWIND_LINES}, + {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_GOLD_RING}, + {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_PURPLE_RING}, + {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_BLUE_RING}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_GREEN_LIGHT_WALL}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_BLUE_LIGHT_WALL}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_RED_LIGHT_WALL}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_GRAY_LIGHT_WALL}, + {gBattleAnimSpriteGfx_GreenLightWall, 0x0800, ANIM_TAG_ORANGE_LIGHT_WALL}, + {gBattleAnimSpriteGfx_BlackBall2, 0x0080, ANIM_TAG_BLACK_BALL_2}, + {gBattleAnimSpriteGfx_MistCloud, 0x0200, ANIM_TAG_PURPLE_GAS_CLOUD}, + {gBattleAnimSpriteGfx_SparkH, 0x0200, ANIM_TAG_SPARK_H}, + {gBattleAnimSpriteGfx_YellowStar, 0x0200, ANIM_TAG_YELLOW_STAR}, + {gBattleAnimSpriteGfx_LargeFreshEgg, 0x0080, ANIM_TAG_LARGE_FRESH_EGG}, + {gBattleAnimSpriteGfx_ShadowBall, 0x0200, ANIM_TAG_SHADOW_BALL}, + {gBattleAnimSpriteGfx_Lick, 0x0500, ANIM_TAG_LICK}, + {gBattleAnimSpriteGfx_VoidLines, 0x0800, ANIM_TAG_VOID_LINES}, + {gBattleAnimSpriteGfx_String, 0x0400, ANIM_TAG_STRING}, + {gBattleAnimSpriteGfx_WebThread, 0x0020, ANIM_TAG_WEB_THREAD}, + {gBattleAnimSpriteGfx_SpiderWeb, 0x0800, ANIM_TAG_SPIDER_WEB}, + {gBattleAnimSpriteGfx_Lightbulb, 0x0100, ANIM_TAG_LIGHTBULB}, + {gBattleAnimSpriteGfx_Slash, 0x0800, ANIM_TAG_SLASH}, + {gBattleAnimSpriteGfx_FocusEnergy, 0x0400, ANIM_TAG_FOCUS_ENERGY}, + {gBattleAnimSpriteGfx_SphereToCube, 0x0a00, ANIM_TAG_SPHERE_TO_CUBE}, + {gBattleAnimSpriteGfx_Tendrils, 0x1000, ANIM_TAG_TENDRILS}, + {gBattleAnimSpriteGfx_Eye, 0x0800, ANIM_TAG_EYE}, + {gBattleAnimSpriteGfx_WhiteShadow, 0x0400, ANIM_TAG_WHITE_SHADOW}, + {gBattleAnimSpriteGfx_TealAlert, 0x0200, ANIM_TAG_TEAL_ALERT}, + {gBattleAnimSpriteGfx_OpeningEye, 0x0800, ANIM_TAG_OPENING_EYE}, + {gBattleAnimSpriteGfx_RoundWhiteHalo, 0x0800, ANIM_TAG_ROUND_WHITE_HALO}, + {gBattleAnimSpriteGfx_FangAttack, 0x0800, ANIM_TAG_FANG_ATTACK}, + {gBattleAnimSpriteGfx_PurpleHandOutline, 0x0200, ANIM_TAG_PURPLE_HAND_OUTLINE}, + {gBattleAnimSpriteGfx_Moon, 0x0800, ANIM_TAG_MOON}, + {gBattleAnimSpriteGfx_GreenSparkle, 0x0200, ANIM_TAG_GREEN_SPARKLE}, + {gBattleAnimSpriteGfx_Spiral, 0x0800, ANIM_TAG_SPIRAL}, + {gBattleAnimSpriteGfx_SnoreZ, 0x0200, ANIM_TAG_SNORE_Z}, + {gBattleAnimSpriteGfx_Explosion, 0x0800, ANIM_TAG_EXPLOSION}, + {gBattleAnimSpriteGfx_Nail, 0x0400, ANIM_TAG_NAIL}, + {gBattleAnimSpriteGfx_GhostlySpirit, 0x0200, ANIM_TAG_GHOSTLY_SPIRIT}, + {gBattleAnimSpriteGfx_WarmRock, 0x0a80, ANIM_TAG_WARM_ROCK}, + {gBattleAnimSpriteGfx_BreakingEgg, 0x0600, ANIM_TAG_BREAKING_EGG}, + {gBattleAnimSpriteGfx_ThinRing, 0x0800, ANIM_TAG_THIN_RING}, + {gBattleAnimSpriteGfx_PunchImpact, 0x0200, ANIM_TAG_PUNCH_IMPACT}, + {gBattleAnimSpriteGfx_Bell, 0x0600, ANIM_TAG_BELL}, + {gBattleAnimSpriteGfx_MusicNotes2, 0x0800, ANIM_TAG_MUSIC_NOTES_2}, + {gBattleAnimSpriteGfx_SpeedDust, 0x0180, ANIM_TAG_SPEED_DUST}, + {gBattleAnimSpriteGfx_TornMetal, 0x0800, ANIM_TAG_TORN_METAL}, + {gBattleAnimSpriteGfx_ThoughtBubble, 0x0800, ANIM_TAG_THOUGHT_BUBBLE}, + {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_MAGENTA_HEART}, + {gBattleAnimSpriteGfx_ElectricOrbs, 0x0080, ANIM_TAG_ELECTRIC_ORBS}, + {gBattleAnimSpriteGfx_CircleOfLight, 0x0800, ANIM_TAG_CIRCLE_OF_LIGHT}, + {gBattleAnimSpriteGfx_Electricity, 0x0800, ANIM_TAG_ELECTRICITY}, + {gBattleAnimSpriteGfx_Finger2, 0x0600, ANIM_TAG_FINGER_2}, + {gBattleAnimSpriteGfx_MovementWaves, 0x0600, ANIM_TAG_MOVEMENT_WAVES}, + {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_RED_HEART}, + {gBattleAnimSpriteGfx_RedOrb, 0x0080, ANIM_TAG_RED_ORB}, + {gBattleAnimSpriteGfx_EyeSparkle, 0x0180, ANIM_TAG_EYE_SPARKLE}, + {gBattleAnimSpriteGfx_MagentaHeart, 0x0080, ANIM_TAG_PINK_HEART}, + {gBattleAnimSpriteGfx_Angel, 0x0200, ANIM_TAG_ANGEL}, + {gBattleAnimSpriteGfx_Devil, 0x0400, ANIM_TAG_DEVIL}, + {gBattleAnimSpriteGfx_Swipe, 0x0a00, ANIM_TAG_SWIPE}, + {gBattleAnimSpriteGfx_Roots, 0x0800, ANIM_TAG_ROOTS}, + {gBattleAnimSpriteGfx_ItemBag, 0x0200, ANIM_TAG_ITEM_BAG}, + {gBattleAnimSpriteGfx_JaggedMusicNote, 0x0400, ANIM_TAG_JAGGED_MUSIC_NOTE}, + {gBattleAnimSpriteGfx_Pokeball, 0x0080, ANIM_TAG_POKEBALL}, + {gBattleAnimSpriteGfx_Spotlight, 0x0800, ANIM_TAG_SPOTLIGHT}, + {gBattleAnimSpriteGfx_LetterZ, 0x0200, ANIM_TAG_LETTER_Z}, + {gBattleAnimSpriteGfx_RapidSpin, 0x0300, ANIM_TAG_RAPID_SPIN}, + {gBattleAnimSpriteGfx_TriAttackTriangle, 0x0800, ANIM_TAG_TRI_ATTACK_TRIANGLE}, + {gBattleAnimSpriteGfx_WispOrb, 0x0380, ANIM_TAG_WISP_ORB}, + {gBattleAnimSpriteGfx_WispFire, 0x0800, ANIM_TAG_WISP_FIRE}, + {gBattleAnimSpriteGfx_GoldStars, 0x00c0, ANIM_TAG_GOLD_STARS}, + {gBattleAnimSpriteGfx_EclipsingOrb, 0x0800, ANIM_TAG_ECLIPSING_ORB}, + {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_GRAY_ORB}, + {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_BLUE_ORB}, + {gBattleAnimSpriteGfx_GrayOrb, 0x0060, ANIM_TAG_RED_ORB_2}, + {gBattleAnimSpriteGfx_PinkPetal, 0x0080, ANIM_TAG_PINK_PETAL}, + {gBattleAnimSpriteGfx_PainSplit, 0x0180, ANIM_TAG_PAIN_SPLIT}, + {gBattleAnimSpriteGfx_Confetti, 0x0180, ANIM_TAG_CONFETTI}, + {gBattleAnimSpriteGfx_GreenStar, 0x0200, ANIM_TAG_GREEN_STAR}, + {gBattleAnimSpriteGfx_PinkCloud, 0x0200, ANIM_TAG_PINK_CLOUD}, + {gBattleAnimSpriteGfx_SweatDrop, 0x0020, ANIM_TAG_SWEAT_DROP}, + {gBattleAnimSpriteGfx_GuardRing, 0x0400, ANIM_TAG_GUARD_RING}, + {gBattleAnimSpriteGfx_PurpleScratch, 0x0600, ANIM_TAG_PURPLE_SCRATCH}, + {gBattleAnimSpriteGfx_PurpleSwipe, 0x1000, ANIM_TAG_PURPLE_SWIPE}, + {gBattleAnimSpriteGfx_TagHand, 0x0400, ANIM_TAG_TAG_HAND}, + {gBattleAnimSpriteGfx_SmallRedEye, 0x0020, ANIM_TAG_SMALL_RED_EYE}, + {gBattleAnimSpriteGfx_HollowOrb, 0x0080, ANIM_TAG_HOLLOW_ORB}, + {gBattleAnimSpriteGfx_XSign, 0x0800, ANIM_TAG_X_SIGN}, + {gBattleAnimSpriteGfx_BluegreenOrb, 0x0080, ANIM_TAG_BLUEGREEN_ORB}, + {gBattleAnimSpriteGfx_PawPrint, 0x0200, ANIM_TAG_PAW_PRINT}, + {gBattleAnimSpriteGfx_PurpleFlame, 0x0400, ANIM_TAG_PURPLE_FLAME}, + {gBattleAnimSpriteGfx_RedBall, 0x0200, ANIM_TAG_RED_BALL}, + {gBattleAnimSpriteGfx_SmellingsaltEffect, 0x0200, ANIM_TAG_SMELLINGSALT_EFFECT}, + {gBattleAnimSpriteGfx_Meteor, 0x0800, ANIM_TAG_METEOR}, + {gBattleAnimSpriteGfx_FlatRock, 0x0280, ANIM_TAG_FLAT_ROCK}, + {gBattleAnimSpriteGfx_MagnifyingGlass, 0x0200, ANIM_TAG_MAGNIFYING_GLASS}, + {gBattleAnimSpriteGfx_WaterOrb, 0x0200, ANIM_TAG_BROWN_ORB}, + {gBattleAnimSpriteGfx_MetalSoundWaves, 0x0400, ANIM_TAG_METAL_SOUND_WAVES}, + {gBattleAnimSpriteGfx_FlyingDirt, 0x0200, ANIM_TAG_FLYING_DIRT}, + {gBattleAnimSpriteGfx_IcicleSpear, 0x0200, ANIM_TAG_ICICLE_SPEAR}, + {gBattleAnimSpriteGfx_Hail, 0x0080, ANIM_TAG_HAIL}, + {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_RED_ORB}, + {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_GREEN_ORB}, + {gBattleAnimSpriteGfx_GreenSpike, 0x0080, ANIM_TAG_GREEN_SPIKE}, + {gBattleAnimSpriteGfx_CircleOfLight, 0x0800, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT}, + {gBattleAnimSpriteGfx_GlowyRedOrb, 0x0020, ANIM_TAG_GLOWY_BLUE_ORB}, + {gBattleAnimSpriteGfx_Pokeblock, 0x0080, ANIM_TAG_POKEBLOCK}, + {gBattleAnimSpriteGfx_WhiteFeather, 0x0400, ANIM_TAG_WHITE_FEATHER}, + {gBattleAnimSpriteGfx_Sparkle6, 0x0080, ANIM_TAG_SPARKLE_6}, + {gBattleAnimSpriteGfx_Splash, 0x0800, ANIM_TAG_SPLASH}, + {gBattleAnimSpriteGfx_SweatBead, 0x0020, ANIM_TAG_SWEAT_BEAD}, + {gBattleAnimSpriteGfx_Gem1, 0x0800, ANIM_TAG_GEM_1}, + {gBattleAnimSpriteGfx_Gem2, 0x0800, ANIM_TAG_GEM_2}, + {gBattleAnimSpriteGfx_Gem3, 0x0800, ANIM_TAG_GEM_3}, + {gBattleAnimSpriteGfx_SlamHit2, 0x1000, ANIM_TAG_SLAM_HIT_2}, + {gBattleAnimSpriteGfx_Recycle, 0x0800, ANIM_TAG_RECYCLE}, + {gBattleAnimSpriteGfx_RedParticles, 0x00a0, ANIM_TAG_RED_PARTICLES}, + {gBattleAnimSpriteGfx_Protect, 0x0800, ANIM_TAG_PROTECT}, + {gBattleAnimSpriteGfx_DirtMound, 0x0200, ANIM_TAG_DIRT_MOUND}, + {gBattleAnimSpriteGfx_Shock3, 0x0600, ANIM_TAG_SHOCK_3}, + {gBattleAnimSpriteGfx_WeatherBall, 0x0200, ANIM_TAG_WEATHER_BALL}, + {gBattleAnimSpriteGfx_Bird, 0x0800, ANIM_TAG_BIRD}, + {gBattleAnimSpriteGfx_CrossImpact, 0x0200, ANIM_TAG_CROSS_IMPACT}, + {gBattleAnimSpriteGfx_Slash, 0x0800, ANIM_TAG_SLASH_2}, + {gBattleAnimSpriteGfx_SlamHit, 0x1000, ANIM_TAG_WHIP_HIT}, + {gBattleAnimSpriteGfx_GoldRing, 0x0100, ANIM_TAG_BLUE_RING_2}, +}; + +const struct CompressedSpritePalette gBattleAnimPaletteTable[] = +{ + {gBattleAnimSpritePal_Bone, ANIM_TAG_BONE}, + {gBattleAnimSpritePal_Spark, ANIM_TAG_SPARK}, + {gBattleAnimSpritePal_Pencil, ANIM_TAG_PENCIL}, + {gBattleAnimSpritePal_AirWave, ANIM_TAG_AIR_WAVE}, + {gBattleAnimSpritePal_Orb, ANIM_TAG_ORB}, + {gBattleAnimSpritePal_Sword, ANIM_TAG_SWORD}, + {gBattleAnimSpritePal_Seed, ANIM_TAG_SEED}, + {gBattleAnimSpritePal_Explosion6, ANIM_TAG_EXPLOSION_6}, + {gBattleAnimSpritePal_PinkOrb, ANIM_TAG_PINK_ORB}, + {gBattleAnimSpritePal_Gust, ANIM_TAG_GUST}, + {gBattleAnimSpritePal_IceCube, ANIM_TAG_ICE_CUBE}, + {gBattleAnimSpritePal_Spark2, ANIM_TAG_SPARK_2}, + {gBattleAnimSpritePal_Orange, ANIM_TAG_ORANGE}, + {gBattleAnimSpritePal_YellowBall, ANIM_TAG_YELLOW_BALL}, + {gBattleAnimSpritePal_LockOn, ANIM_TAG_LOCK_ON}, + {gBattleAnimSpritePal_TiedBag, ANIM_TAG_TIED_BAG}, + {gBattleAnimSpritePal_BlackSmoke, ANIM_TAG_BLACK_SMOKE}, + {gBattleAnimSpritePal_BlackSmoke, ANIM_TAG_BLACK_BALL}, + {gBattleAnimSpritePal_Conversion, ANIM_TAG_CONVERSION}, + {gBattleAnimSpritePal_Glass, ANIM_TAG_GLASS}, + {gBattleAnimSpritePal_HornHit, ANIM_TAG_HORN_HIT}, + {gBattleAnimSpritePal_Hit, ANIM_TAG_HIT}, + {gBattleAnimSpritePal_Hit2, ANIM_TAG_HIT_2}, + {gBattleAnimSpritePal_BlueShards, ANIM_TAG_BLUE_SHARDS}, + {gBattleAnimSpritePal_ClosingEye, ANIM_TAG_CLOSING_EYE}, + {gBattleAnimSpritePal_WavingHand, ANIM_TAG_WAVING_HAND}, + {gBattleAnimSpritePal_HitDuplicate, ANIM_TAG_HIT_DUPLICATE}, + {gBattleAnimSpritePal_Leer, ANIM_TAG_LEER}, + {gBattleAnimSpritePal_BlueBurst, ANIM_TAG_BLUE_BURST}, + {gBattleAnimSpritePal_SmallEmber, ANIM_TAG_SMALL_EMBER}, + {gBattleAnimSpritePal_GraySmoke, ANIM_TAG_GRAY_SMOKE}, + {gBattleAnimSpritePal_BlueStar, ANIM_TAG_BLUE_STAR}, + {gBattleAnimSpritePal_BubbleBurst, ANIM_TAG_BUBBLE_BURST}, + {gBattleAnimSpritePal_Fire, ANIM_TAG_FIRE}, + {gBattleAnimSpritePal_Fire, ANIM_TAG_SPINNING_FIRE}, + {gBattleAnimSpritePal_Fire, ANIM_TAG_FIRE_PLUME}, + {gBattleAnimSpritePal_Lightning2, ANIM_TAG_LIGHTNING_2}, + {gBattleAnimSpritePal_Lightning2, ANIM_TAG_LIGHTNING}, + {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_CLAW_SLASH_2}, + {gBattleAnimSpritePal_ClawSlash, ANIM_TAG_CLAW_SLASH}, + {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_SCRATCH_3}, + {gBattleAnimSpritePal_ClawSlash2, ANIM_TAG_SCRATCH_2}, + {gBattleAnimSpritePal_BubbleBurst2, ANIM_TAG_BUBBLE_BURST_2}, + {gBattleAnimSpritePal_IceChunk, ANIM_TAG_ICE_CHUNK}, + {gBattleAnimSpritePal_Glass2, ANIM_TAG_GLASS_2}, + {gBattleAnimSpritePal_PinkHeart2, ANIM_TAG_PINK_HEART_2}, + {gBattleAnimSpritePal_SapDrip, ANIM_TAG_SAP_DRIP}, + {gBattleAnimSpritePal_SapDrip2, ANIM_TAG_SAP_DRIP}, + {gBattleAnimSpritePal_Sparkle1, ANIM_TAG_SPARKLE_1}, + {gBattleAnimSpritePal_Sparkle2, ANIM_TAG_SPARKLE_2}, + {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_HUMANOID_FOOT}, + {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_MONSTER_FOOT}, + {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_HUMANOID_HAND}, + {gBattleAnimSpritePal_HitDuplicate, ANIM_TAG_NOISE_LINE}, + {gBattleAnimSpritePal_YellowUnk, ANIM_TAG_YELLOW_UNK}, + {gBattleAnimSpritePal_HumanoidFoot, ANIM_TAG_RED_FIST}, + {gBattleAnimSpritePal_SlamHit, ANIM_TAG_SLAM_HIT}, + {gBattleAnimSpritePal_Ring, ANIM_TAG_RING}, + {gBattleAnimSpritePal_Rocks, ANIM_TAG_ROCKS}, + {gBattleAnimSpritePal_Z, ANIM_TAG_Z}, + {gBattleAnimSpritePal_YellowUnk2, ANIM_TAG_YELLOW_UNK_2}, + {gBattleAnimSpritePal_AirSlash, ANIM_TAG_AIR_SLASH}, + {gBattleAnimSpritePal_SpinningGreenOrbs, ANIM_TAG_SPINNING_GREEN_ORBS}, + {gBattleAnimSpritePal_Leaf, ANIM_TAG_LEAF}, + {gBattleAnimSpritePal_Finger, ANIM_TAG_FINGER}, + {gBattleAnimSpritePal_PoisonPowder, ANIM_TAG_POISON_POWDER}, + {gBattleAnimSpritePal_BrownTriangle, ANIM_TAG_BROWN_TRIANGLE}, + {gBattleAnimSpritePal_SleepPowder, ANIM_TAG_SLEEP_POWDER}, + {gBattleAnimSpritePal_StunSpore, ANIM_TAG_STUN_SPORE}, + {gBattleAnimSpritePal_PoisonPowder, ANIM_TAG_POWDER}, + {gBattleAnimSpritePal_Sparkle3, ANIM_TAG_SPARKLE_3}, + {gBattleAnimSpritePal_Sparkle3, ANIM_TAG_SPARKLE_4}, + {gBattleAnimSpritePal_MusicNotes, ANIM_TAG_MUSIC_NOTES}, + {gBattleAnimSpritePal_Duck, ANIM_TAG_DUCK}, + {gBattleAnimSpritePal_MudSand, ANIM_TAG_MUD_SAND}, + {gBattleAnimSpritePal_Alert, ANIM_TAG_ALERT}, + {gBattleAnimSpritePal_BlueFlames, ANIM_TAG_BLUE_FLAMES}, + {gBattleAnimSpritePal_BlueFlames, ANIM_TAG_BLUE_FLAMES_2}, + {gBattleAnimSpritePal_Shock4, ANIM_TAG_SHOCK_4}, + {gBattleAnimSpritePal_Shock4, ANIM_TAG_SHOCK}, + {gBattleAnimSpritePal_Bell2, ANIM_TAG_BELL_2}, + {gBattleAnimSpritePal_PinkGlove, ANIM_TAG_PINK_GLOVE}, + {gBattleAnimSpritePal_BlueLines, ANIM_TAG_BLUE_LINES}, + {gBattleAnimSpritePal_Impact3, ANIM_TAG_IMPACT_3}, + {gBattleAnimSpritePal_Impact2, ANIM_TAG_IMPACT_2}, + {gBattleAnimSpritePal_Reticle, ANIM_TAG_RETICLE}, + {gBattleAnimSpritePal_Breath, ANIM_TAG_BREATH}, + {gBattleAnimSpritePal_Anger, ANIM_TAG_ANGER}, + {gBattleAnimSpritePal_Snowball, ANIM_TAG_SNOWBALL}, + {gBattleAnimSpritePal_Vine, ANIM_TAG_VINE}, + {gBattleAnimSpritePal_Sword2, ANIM_TAG_SWORD_2}, + {gBattleAnimSpritePal_Clapping, ANIM_TAG_CLAPPING}, + {gBattleAnimSpritePal_RedTube, ANIM_TAG_RED_TUBE}, + {gBattleAnimSpritePal_Amnesia, ANIM_TAG_AMNESIA}, + {gBattleAnimSpritePal_String2, ANIM_TAG_STRING_2}, + {gBattleAnimSpritePal_Pencil2, ANIM_TAG_PENCIL_2}, + {gBattleAnimSpritePal_Petal, ANIM_TAG_PETAL}, + {gBattleAnimSpritePal_BentSpoon, ANIM_TAG_BENT_SPOON}, + {gBattleAnimSpritePal_String2, ANIM_TAG_WEB}, + {gBattleAnimSpritePal_MilkBottle, ANIM_TAG_MILK_BOTTLE}, + {gBattleAnimSpritePal_Coin, ANIM_TAG_COIN}, + {gBattleAnimSpritePal_CrackedEgg, ANIM_TAG_CRACKED_EGG}, + {gBattleAnimSpritePal_CrackedEgg, ANIM_TAG_HATCHED_EGG}, + {gBattleAnimSpritePal_FreshEgg, ANIM_TAG_FRESH_EGG}, + {gBattleAnimSpritePal_Fangs, ANIM_TAG_FANGS}, + {gBattleAnimSpritePal_Explosion2, ANIM_TAG_EXPLOSION_2}, + {gBattleAnimSpritePal_Explosion2, ANIM_TAG_EXPLOSION_3}, + {gBattleAnimSpritePal_WaterDroplet, ANIM_TAG_WATER_DROPLET}, + {gBattleAnimSpritePal_WaterDroplet, ANIM_TAG_WATER_DROPLET_2}, + {gBattleAnimSpritePal_Seed2, ANIM_TAG_SEED_2}, + {gBattleAnimSpritePal_Seed2, ANIM_TAG_SPROUT}, + {gBattleAnimSpritePal_RedWand, ANIM_TAG_RED_WAND}, + {gBattleAnimSpritePal_PurpleGreenUnk, ANIM_TAG_PURPLE_GREEN_UNK}, + {gBattleAnimSpritePal_WaterColumn, ANIM_TAG_WATER_COLUMN}, + {gBattleAnimSpritePal_MudUnk, ANIM_TAG_MUD_UNK}, + {gBattleAnimSpritePal_RainDrops, ANIM_TAG_RAIN_DROPS}, + {gBattleAnimSpritePal_FurySwipes, ANIM_TAG_FURY_SWIPES}, + {gBattleAnimSpritePal_Vine2, ANIM_TAG_VINE_2}, + {gBattleAnimSpritePal_Teeth, ANIM_TAG_TEETH}, + {gBattleAnimSpritePal_Bone2, ANIM_TAG_BONE_2}, + {gBattleAnimSpritePal_WhiteBag, ANIM_TAG_WHITE_BAG}, + {gBattleAnimSpritePal_Unknown, ANIM_TAG_UNKNOWN}, + {gBattleAnimSpritePal_PurpleCoral, ANIM_TAG_PURPLE_CORAL}, + {gBattleAnimSpritePal_PurpleCoral, ANIM_TAG_PURPLE_DROPLET}, + {gBattleAnimSpritePal_Shock2, ANIM_TAG_SHOCK_2}, + {gBattleAnimSpritePal_ClosingEye2, ANIM_TAG_CLOSING_EYE_2}, + {gBattleAnimSpritePal_MetalBall, ANIM_TAG_METAL_BALL}, + {gBattleAnimSpritePal_MonsterDoll, ANIM_TAG_MONSTER_DOLL}, + {gBattleAnimSpritePal_Whirlwind, ANIM_TAG_WHIRLWIND}, + {gBattleAnimSpritePal_Whirlwind, ANIM_TAG_WHIRLWIND_2}, + {gBattleAnimSpritePal_Explosion4, ANIM_TAG_EXPLOSION_4}, + {gBattleAnimSpritePal_Explosion4, ANIM_TAG_EXPLOSION_5}, + {gBattleAnimSpritePal_Tongue, ANIM_TAG_TONGUE}, + {gBattleAnimSpritePal_Smoke, ANIM_TAG_SMOKE}, + {gBattleAnimSpritePal_Smoke, ANIM_TAG_SMOKE_2}, + {gBattleAnimSpritePal_Impact, ANIM_TAG_IMPACT}, + {gBattleAnimSpritePal_CircleImpact, ANIM_TAG_CIRCLE_IMPACT}, + {gBattleAnimSpritePal_Impact, ANIM_TAG_SCRATCH}, + {gBattleAnimSpritePal_Impact, ANIM_TAG_CUT}, + {gBattleAnimSpritePal_SharpTeeth, ANIM_TAG_SHARP_TEETH}, + {gBattleAnimSpritePal_RainbowRings, ANIM_TAG_RAINBOW_RINGS}, + {gBattleAnimSpritePal_IceCrystals, ANIM_TAG_ICE_CRYSTALS}, + {gBattleAnimSpritePal_IceCrystals, ANIM_TAG_ICE_SPIKES}, + {gBattleAnimSpritePal_HandsAndFeet, ANIM_TAG_HANDS_AND_FEET}, + {gBattleAnimSpritePal_MistCloud, ANIM_TAG_MIST_CLOUD}, + {gBattleAnimSpritePal_SharpTeeth, ANIM_TAG_CLAMP}, + {gBattleAnimSpritePal_RainDrops, ANIM_TAG_BUBBLE}, + {gBattleAnimSpritePal_Orbs, ANIM_TAG_ORBS}, + {gBattleAnimSpritePal_WaterImpact, ANIM_TAG_WATER_IMPACT}, + {gBattleAnimSpritePal_WaterImpact, ANIM_TAG_WATER_ORB}, + {gBattleAnimSpritePal_PoisonBubble, ANIM_TAG_POISON_BUBBLE}, + {gBattleAnimSpritePal_PoisonBubble, ANIM_TAG_TOXIC_BUBBLE}, + {gBattleAnimSpritePal_Spikes, ANIM_TAG_SPIKES}, + {gBattleAnimSpritePal_HornHit2, ANIM_TAG_HORN_HIT_2}, + {gBattleAnimSpritePal_AirWave2, ANIM_TAG_AIR_WAVE_2}, + {gBattleAnimSpritePal_SmallBubbles, ANIM_TAG_SMALL_BUBBLES}, + {gBattleAnimSpritePal_RoundShadow, ANIM_TAG_ROUND_SHADOW}, + {gBattleAnimSpritePal_Sunlight, ANIM_TAG_SUNLIGHT}, + {gBattleAnimSpritePal_Spore, ANIM_TAG_SPORE}, + {gBattleAnimSpritePal_Flower, ANIM_TAG_FLOWER}, + {gBattleAnimSpritePal_RazorLeaf, ANIM_TAG_RAZOR_LEAF}, + {gBattleAnimSpritePal_Needle, ANIM_TAG_NEEDLE}, + {gBattleAnimSpritePal_WhirlwindLines, ANIM_TAG_WHIRLWIND_LINES}, + {gBattleAnimSpritePal_GoldRing, ANIM_TAG_GOLD_RING}, + {gBattleAnimSpritePal_PurpleRing, ANIM_TAG_PURPLE_RING}, + {gBattleAnimSpritePal_BlueRing, ANIM_TAG_BLUE_RING}, + {gBattleAnimSpritePal_GreenLightWall, ANIM_TAG_GREEN_LIGHT_WALL}, + {gBattleAnimSpritePal_BlueLightWall, ANIM_TAG_BLUE_LIGHT_WALL}, + {gBattleAnimSpritePal_RedLightWall, ANIM_TAG_RED_LIGHT_WALL}, + {gBattleAnimSpritePal_GrayLightWall, ANIM_TAG_GRAY_LIGHT_WALL}, + {gBattleAnimSpritePal_OrangeLightWall, ANIM_TAG_ORANGE_LIGHT_WALL}, + {gBattleAnimSpritePal_BlackBall2, ANIM_TAG_BLACK_BALL_2}, + {gBattleAnimSpritePal_PurpleGasCloud, ANIM_TAG_PURPLE_GAS_CLOUD}, + {gBattleAnimSpritePal_Spark, ANIM_TAG_SPARK_H}, + {gBattleAnimSpritePal_YellowStar, ANIM_TAG_YELLOW_STAR}, + {gBattleAnimSpritePal_LargeFreshEgg, ANIM_TAG_LARGE_FRESH_EGG}, + {gBattleAnimSpritePal_ShadowBall, ANIM_TAG_SHADOW_BALL}, + {gBattleAnimSpritePal_Lick, ANIM_TAG_LICK}, + {gBattleAnimSpritePal_VoidLines, ANIM_TAG_VOID_LINES}, + {gBattleAnimSpritePal_String, ANIM_TAG_STRING}, + {gBattleAnimSpritePal_String, ANIM_TAG_WEB_THREAD}, + {gBattleAnimSpritePal_String, ANIM_TAG_SPIDER_WEB}, + {gBattleAnimSpritePal_Lightbulb, ANIM_TAG_LIGHTBULB}, + {gBattleAnimSpritePal_Slash, ANIM_TAG_SLASH}, + {gBattleAnimSpritePal_FocusEnergy, ANIM_TAG_FOCUS_ENERGY}, + {gBattleAnimSpritePal_SphereToCube, ANIM_TAG_SPHERE_TO_CUBE}, + {gBattleAnimSpritePal_Tendrils, ANIM_TAG_TENDRILS}, + {gBattleAnimSpritePal_Eye, ANIM_TAG_EYE}, + {gBattleAnimSpritePal_WhiteShadow, ANIM_TAG_WHITE_SHADOW}, + {gBattleAnimSpritePal_TealAlert, ANIM_TAG_TEAL_ALERT}, + {gBattleAnimSpritePal_OpeningEye, ANIM_TAG_OPENING_EYE}, + {gBattleAnimSpritePal_RoundWhiteHalo, ANIM_TAG_ROUND_WHITE_HALO}, + {gBattleAnimSpritePal_FangAttack, ANIM_TAG_FANG_ATTACK}, + {gBattleAnimSpritePal_PurpleHandOutline, ANIM_TAG_PURPLE_HAND_OUTLINE}, + {gBattleAnimSpritePal_Moon, ANIM_TAG_MOON}, + {gBattleAnimSpritePal_GreenSparkle, ANIM_TAG_GREEN_SPARKLE}, + {gBattleAnimSpritePal_Spiral, ANIM_TAG_SPIRAL}, + {gBattleAnimSpritePal_SnoreZ, ANIM_TAG_SNORE_Z}, + {gBattleAnimSpritePal_Explosion, ANIM_TAG_EXPLOSION}, + {gBattleAnimSpritePal_Nail, ANIM_TAG_NAIL}, + {gBattleAnimSpritePal_GhostlySpirit, ANIM_TAG_GHOSTLY_SPIRIT}, + {gBattleAnimSpritePal_WarmRock, ANIM_TAG_WARM_ROCK}, + {gBattleAnimSpritePal_BreakingEgg, ANIM_TAG_BREAKING_EGG}, + {gBattleAnimSpritePal_ThinRing, ANIM_TAG_THIN_RING}, + {gBattleAnimSpritePal_PunchImpact, ANIM_TAG_PUNCH_IMPACT}, + {gBattleAnimSpritePal_Bell, ANIM_TAG_BELL}, + {gBattleAnimSpritePal_MusicNotes2, ANIM_TAG_MUSIC_NOTES_2}, + {gBattleAnimSpritePal_SpeedDust, ANIM_TAG_SPEED_DUST}, + {gBattleAnimSpritePal_BlueLightWall, ANIM_TAG_TORN_METAL}, + {gBattleAnimSpritePal_ThoughtBubble, ANIM_TAG_THOUGHT_BUBBLE}, + {gBattleAnimSpritePal_MagentaHeart, ANIM_TAG_MAGENTA_HEART}, + {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_ELECTRIC_ORBS}, + {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_CIRCLE_OF_LIGHT}, + {gBattleAnimSpritePal_ElectricOrbs, ANIM_TAG_ELECTRICITY}, + {gBattleAnimSpritePal_Finger, ANIM_TAG_FINGER_2}, + {gBattleAnimSpritePal_MovementWaves, ANIM_TAG_MOVEMENT_WAVES}, + {gBattleAnimSpritePal_RedHeart, ANIM_TAG_RED_HEART}, + {gBattleAnimSpritePal_RedOrb, ANIM_TAG_RED_ORB}, + {gBattleAnimSpritePal_EyeSparkle, ANIM_TAG_EYE_SPARKLE}, + {gBattleAnimSpritePal_PinkHeart, ANIM_TAG_PINK_HEART}, + {gBattleAnimSpritePal_Angel, ANIM_TAG_ANGEL}, + {gBattleAnimSpritePal_Devil, ANIM_TAG_DEVIL}, + {gBattleAnimSpritePal_Swipe, ANIM_TAG_SWIPE}, + {gBattleAnimSpritePal_Roots, ANIM_TAG_ROOTS}, + {gBattleAnimSpritePal_ItemBag, ANIM_TAG_ITEM_BAG}, + {gBattleAnimSpritePal_JaggedMusicNote, ANIM_TAG_JAGGED_MUSIC_NOTE}, + {gBattleAnimSpritePal_Pokeball, ANIM_TAG_POKEBALL}, + {gBattleAnimSpritePal_Pokeball, ANIM_TAG_SPOTLIGHT}, + {gBattleAnimSpritePal_LetterZ, ANIM_TAG_LETTER_Z}, + {gBattleAnimSpritePal_RapidSpin, ANIM_TAG_RAPID_SPIN}, + {gBattleAnimSpritePal_TriAttackTriangle, ANIM_TAG_TRI_ATTACK_TRIANGLE}, + {gBattleAnimSpritePal_WispOrb, ANIM_TAG_WISP_ORB}, + {gBattleAnimSpritePal_WispOrb, ANIM_TAG_WISP_FIRE}, + {gBattleAnimSpritePal_GoldStars, ANIM_TAG_GOLD_STARS}, + {gBattleAnimSpritePal_EclipsingOrb, ANIM_TAG_ECLIPSING_ORB}, + {gBattleAnimSpritePal_GrayOrb, ANIM_TAG_GRAY_ORB}, + {gBattleAnimSpritePal_BlueOrb, ANIM_TAG_BLUE_ORB}, + {gBattleAnimSpritePal_RedOrb2, ANIM_TAG_RED_ORB_2}, + {gBattleAnimSpritePal_PinkPetal, ANIM_TAG_PINK_PETAL}, + {gBattleAnimSpritePal_PainSplit, ANIM_TAG_PAIN_SPLIT}, + {gBattleAnimSpritePal_Confetti, ANIM_TAG_CONFETTI}, + {gBattleAnimSpritePal_GreenStar, ANIM_TAG_GREEN_STAR}, + {gBattleAnimSpritePal_PinkCloud, ANIM_TAG_PINK_CLOUD}, + {gBattleAnimSpritePal_SweatDrop, ANIM_TAG_SWEAT_DROP}, + {gBattleAnimSpritePal_GuardRing, ANIM_TAG_GUARD_RING}, + {gBattleAnimSpritePal_PurpleScratch, ANIM_TAG_PURPLE_SCRATCH}, + {gBattleAnimSpritePal_PurpleScratch, ANIM_TAG_PURPLE_SWIPE}, + {gBattleAnimSpritePal_Finger, ANIM_TAG_TAG_HAND}, + {gBattleAnimSpritePal_SmallRedEye, ANIM_TAG_SMALL_RED_EYE}, + {gBattleAnimSpritePal_HollowOrb, ANIM_TAG_HOLLOW_ORB}, + {gBattleAnimSpritePal_HollowOrb, ANIM_TAG_X_SIGN}, + {gBattleAnimSpritePal_BluegreenOrb, ANIM_TAG_BLUEGREEN_ORB}, + {gBattleAnimSpritePal_PawPrint, ANIM_TAG_PAW_PRINT}, + {gBattleAnimSpritePal_PurpleFlame, ANIM_TAG_PURPLE_FLAME}, + {gBattleAnimSpritePal_RedBall, ANIM_TAG_RED_BALL}, + {gBattleAnimSpritePal_SmellingsaltEffect, ANIM_TAG_SMELLINGSALT_EFFECT}, + {gBattleAnimSpritePal_Meteor, ANIM_TAG_METEOR}, + {gBattleAnimSpritePal_FlatRock, ANIM_TAG_FLAT_ROCK}, + {gBattleAnimSpritePal_MagnifyingGlass, ANIM_TAG_MAGNIFYING_GLASS}, + {gBattleAnimSpritePal_BrownOrb, ANIM_TAG_BROWN_ORB}, + {gBattleAnimSpritePal_MetalSoundWaves, ANIM_TAG_METAL_SOUND_WAVES}, + {gBattleAnimSpritePal_FlyingDirt, ANIM_TAG_FLYING_DIRT}, + {gBattleAnimSpritePal_IcicleSpear, ANIM_TAG_ICICLE_SPEAR}, + {gBattleAnimSpritePal_Hail, ANIM_TAG_HAIL}, + {gBattleAnimSpritePal_GlowyRedOrb, ANIM_TAG_GLOWY_RED_ORB}, + {gBattleAnimSpritePal_GlowyGreenOrb, ANIM_TAG_GLOWY_GREEN_ORB}, + {gBattleAnimSpritePal_GreenSpike, ANIM_TAG_GREEN_SPIKE}, + {gBattleAnimSpritePal_WhiteCircleOfLight, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT}, + {gBattleAnimSpritePal_GlowyBlueOrb, ANIM_TAG_GLOWY_BLUE_ORB}, + {gBattleAnimSpritePal_Pokeblock, ANIM_TAG_POKEBLOCK}, + {gBattleAnimSpritePal_WhiteFeather, ANIM_TAG_WHITE_FEATHER}, + {gBattleAnimSpritePal_Sparkle6, ANIM_TAG_SPARKLE_6}, + {gBattleAnimSpritePal_Splash, ANIM_TAG_SPLASH}, + {gBattleAnimSpritePal_Splash, ANIM_TAG_SWEAT_BEAD}, + {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_1}, + {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_2}, + {gBattleAnimSpritePal_Gem1, ANIM_TAG_GEM_3}, + {gBattleAnimSpritePal_SlamHit2, ANIM_TAG_SLAM_HIT_2}, + {gBattleAnimSpritePal_Recycle, ANIM_TAG_RECYCLE}, + {gBattleAnimSpritePal_RedParticles, ANIM_TAG_RED_PARTICLES}, + {gBattleAnimSpritePal_Protect, ANIM_TAG_PROTECT}, + {gBattleAnimSpritePal_DirtMound, ANIM_TAG_DIRT_MOUND}, + {gBattleAnimSpritePal_Shock3, ANIM_TAG_SHOCK_3}, + {gBattleAnimSpritePal_WeatherBall, ANIM_TAG_WEATHER_BALL}, + {gBattleAnimSpritePal_Bird, ANIM_TAG_BIRD}, + {gBattleAnimSpritePal_CrossImpact, ANIM_TAG_CROSS_IMPACT}, + {gBattleAnimSpritePal_Slash2, ANIM_TAG_SLASH_2}, + {gBattleAnimSpritePal_WhipHit, ANIM_TAG_WHIP_HIT}, + {gBattleAnimSpritePal_BlueRing2, ANIM_TAG_BLUE_RING_2}, +}; + +const struct BattleAnimBackground gBattleAnimBackgroundTable[] = +{ + [BG_NONE] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, + [BG_DARK] = {gBattleAnimBgImage_Dark, gBattleAnimBgPalette_Dark, gBattleAnimBgTilemap_Dark}, + [BG_GHOST] = {gBattleAnimBgImage_Ghost, gBattleAnimBgPalette_Ghost, gBattleAnimBgTilemap_Ghost}, + [BG_PSYCHIC] = {gBattleAnimBgImage_Psychic, gBattleAnimBgPalette_Psychic, gBattleAnimBgTilemap_Psychic}, + [BG_IMPACT_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactOpponent}, + [BG_IMPACT_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactPlayer}, + [BG_IMPACT_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Impact, gBattleAnimBgTilemap_ImpactContests}, + [BG_DRILL] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_Drill}, + [BG_DRILL_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Drill, gBattleAnimBgTilemap_DrillContests}, + [BG_HIGHSPEED_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedOpponent}, + [BG_HIGHSPEED_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Highspeed, gBattleAnimBgTilemap_HighspeedPlayer}, + [BG_THUNDER] = {gBattleAnimBgImage_Thunder, gBattleAnimBgPalette_Thunder, gBattleAnimBgTilemap_Thunder}, + [BG_GUILLOTINE_OPPONENT] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineOpponent}, + [BG_GUILLOTINE_PLAYER] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotinePlayer}, + [BG_GUILLOTINE_CONTESTS] = {gBattleAnimBgImage_Guillotine, gBattleAnimBgPalette_Guillotine, gBattleAnimBgTilemap_GuillotineContests}, + [BG_ICE] = {gBattleAnimBgImage_Ice, gBattleAnimBgPalette_Ice, gBattleAnimBgTilemap_Ice}, + [BG_COSMIC] = {gBattleAnimBgImage_Cosmic, gBattleAnimBgPalette_Cosmic, gBattleAnimBgTilemap_Cosmic}, + [BG_IN_AIR] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_InAir, gBattleAnimBgTilemap_InAir}, + [BG_SKY] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_Drill}, + [BG_SKY_CONTESTS] = {gBattleAnimBgImage_Drill, gBattleAnimBgPalette_Sky, gBattleAnimBgTilemap_DrillContests}, + [BG_AURORA] = {gBattleAnimBgImage_Aurora, gBattleAnimBgPalette_Aurora, gBattleAnimBgTilemap_Aurora}, + [BG_FISSURE] = {gBattleAnimBgImage_Fissure, gBattleAnimBgPalette_Fissure, gBattleAnimBgTilemap_Fissure}, + [BG_BUG_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedOpponent}, + [BG_BUG_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedPlayer}, + [BG_SOLARBEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactOpponent}, + [BG_SOLARBEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactPlayer}, + [BG_SOLARBEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactContests}, +}; From b0598b1aef16815272187adf84a999b6f190c8ba Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 11 Oct 2021 20:49:56 -0400 Subject: [PATCH 053/417] Clean up recorded_battle, add MOVE_IS_PERMANENT --- include/battle.h | 5 +++ include/recorded_battle.h | 6 ++-- src/battle_main.c | 4 +-- src/battle_script_commands.c | 11 +++--- src/battle_util.c | 13 +++---- src/pokemon.c | 8 ++--- src/recorded_battle.c | 69 +++++++++++++++++------------------- 7 files changed, 53 insertions(+), 63 deletions(-) diff --git a/include/battle.h b/include/battle.h index 5ccff8ce33..f793c779f7 100644 --- a/include/battle.h +++ b/include/battle.h @@ -17,6 +17,11 @@ #define GET_BATTLER_SIDE(battler) (GetBattlerPosition(battler) & BIT_SIDE) #define GET_BATTLER_SIDE2(battler) (GET_BATTLER_POSITION(battler) & BIT_SIDE) +// Used to exclude moves learned temporarily by Transform or Mimic +#define MOVE_IS_PERMANENT(battler, moveSlot) \ + (!(gBattleMons[battler].status2 & STATUS2_TRANSFORMED) \ + && !(gDisableStructs[battler].mimickedMoves & gBitTable[moveSlot])) + // Battle Actions // These determine what each battler will do in a turn #define B_ACTION_USE_MOVE 0 diff --git a/include/recorded_battle.h b/include/recorded_battle.h index 8ea3927743..9b89394038 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -8,7 +8,7 @@ extern u8 gRecordedBattleMultiplayerId; #define B_RECORD_MODE_RECORDING 1 #define B_RECORD_MODE_PLAYBACK 2 -void RecordedBattle_Init(u8 arg0); +void RecordedBattle_Init(u8 mode); void RecordedBattle_SetTrainerInfo(void); void RecordedBattle_SetBattlerAction(u8 battlerId, u8 action); void RecordedBattle_ClearBattlerAction(u8 battlerId, u8 bytesToClear); @@ -23,12 +23,12 @@ u8 GetRecordedBattleFronterBrainSymbol(void); void RecordedBattle_SaveParties(void); u8 GetActiveBattlerLinkPlayerGender(void); void RecordedBattle_ClearFrontierPassFlag(void); -void RecordedBattle_SetFrontierPassFlagFromHword(u16 arg0); +void RecordedBattle_SetFrontierPassFlagFromHword(u16 flags); u8 RecordedBattle_GetFrontierPassFlag(void); u8 GetBattleSceneInRecordedBattle(void); u8 GetTextSpeedInRecordedBattle(void); void RecordedBattle_CopyBattlerMoves(void); -void sub_818603C(u8 arg0); +void RecordedBattle_CheckMovesetChanges(u8 mode); u32 GetAiScriptsInRecordedBattle(void); void RecordedBattle_SetPlaybackFinished(void); bool8 RecordedBattle_CanStopPlayback(void); diff --git a/src/battle_main.c b/src/battle_main.c index 9b3afb7f32..1d0f3454b8 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4340,7 +4340,7 @@ static void HandleTurnActionSelectionState(void) sub_803CDF8(); return; default: - sub_818603C(2); + RecordedBattle_CheckMovesetChanges(B_RECORD_MODE_PLAYBACK); if ((gBattleBufferB[gActiveBattler][2] | (gBattleBufferB[gActiveBattler][3] << 8)) == 0xFFFF) { gBattleCommunication[gActiveBattler] = STATE_BEFORE_ACTION_CHOSEN; @@ -4508,7 +4508,7 @@ static void HandleTurnActionSelectionState(void) // Check if everyone chose actions. if (gBattleCommunication[ACTIONS_CONFIRMED_COUNT] == gBattlersCount) { - sub_818603C(1); + RecordedBattle_CheckMovesetChanges(B_RECORD_MODE_RECORDING); gBattleMainFunc = SetActionsAndBattlersTurnOrder; if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b564fe6801..3e91b64b12 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1235,8 +1235,7 @@ static void Cmd_ppreduce(void) else gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = 0; - if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED) - && !((gDisableStructs[gBattlerAttacker].mimickedMoves) & gBitTable[gCurrMovePos])) + if (MOVE_IS_PERMANENT(gBattlerAttacker, gCurrMovePos)) { gActiveBattler = gBattlerAttacker; BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + gCurrMovePos, 0, 1, &gBattleMons[gBattlerAttacker].pp[gCurrMovePos]); @@ -5436,17 +5435,14 @@ static void Cmd_yesnoboxlearnmove(void) RemoveMonPPBonus(&gPlayerParty[gBattleStruct->expGetterMonId], movePosition); SetMonMoveSlot(&gPlayerParty[gBattleStruct->expGetterMonId], gMoveToLearn, movePosition); - if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId - && !(gBattleMons[0].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[0].mimickedMoves & gBitTable[movePosition])) + if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId && MOVE_IS_PERMANENT(0, movePosition)) { RemoveBattleMonPPBonus(&gBattleMons[0], movePosition); SetBattleMonMoveSlot(&gBattleMons[0], gMoveToLearn, movePosition); } if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && gBattlerPartyIndexes[2] == gBattleStruct->expGetterMonId - && !(gBattleMons[2].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[2].mimickedMoves & gBitTable[movePosition])) + && MOVE_IS_PERMANENT(2, movePosition)) { RemoveBattleMonPPBonus(&gBattleMons[2], movePosition); SetBattleMonMoveSlot(&gBattleMons[2], gMoveToLearn, movePosition); @@ -8241,6 +8237,7 @@ static void Cmd_tryspiteppreduce(void) gBattleMons[gBattlerTarget].pp[i] -= ppToDeduct; gActiveBattler = gBattlerTarget; + // if (MOVE_IS_PERMANENT(gActiveBattler, i)), but backwards if (!(gDisableStructs[gActiveBattler].mimickedMoves & gBitTable[i]) && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED)) { diff --git a/src/battle_util.c b/src/battle_util.c index 11fd31524f..ac2fbd34fe 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -750,8 +750,7 @@ void PressurePPLose(u8 target, u8 attacker, u16 move) if (gBattleMons[attacker].pp[moveIndex] != 0) gBattleMons[attacker].pp[moveIndex]--; - if (!(gBattleMons[attacker].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[attacker].mimickedMoves & gBitTable[moveIndex])) + if (MOVE_IS_PERMANENT(attacker, moveIndex)) { gActiveBattler = attacker; BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + moveIndex, 0, 1, &gBattleMons[gActiveBattler].pp[moveIndex]); @@ -783,9 +782,7 @@ void PressurePPLoseOnUsingImprison(u8 attacker) } } - if (imprisonPos != 4 - && !(gBattleMons[attacker].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[attacker].mimickedMoves & gBitTable[imprisonPos])) + if (imprisonPos != MAX_MON_MOVES && MOVE_IS_PERMANENT(attacker, imprisonPos)) { gActiveBattler = attacker; BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisonPos, 0, 1, &gBattleMons[gActiveBattler].pp[imprisonPos]); @@ -816,9 +813,7 @@ void PressurePPLoseOnUsingPerishSong(u8 attacker) } } - if (perishSongPos != MAX_MON_MOVES - && !(gBattleMons[attacker].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[attacker].mimickedMoves & gBitTable[perishSongPos])) + if (perishSongPos != MAX_MON_MOVES && MOVE_IS_PERMANENT(attacker, perishSongPos)) { gActiveBattler = attacker; BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + perishSongPos, 0, 1, &gBattleMons[gActiveBattler].pp[perishSongPos]); @@ -3598,7 +3593,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) MarkBattlerForControllerExec(gActiveBattler); break; case ITEM_PP_CHANGE: - if (!(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) && !(gDisableStructs[battlerId].mimickedMoves & gBitTable[i])) + if (MOVE_IS_PERMANENT(battlerId, i)) gBattleMons[battlerId].pp[i] = changedPP; break; } diff --git a/src/pokemon.c b/src/pokemon.c index 011e288db8..f4ca3f4c10 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5078,9 +5078,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov SetMonData(mon, MON_DATA_PP1 + temp2, &dataUnsigned); // Heal battler PP too (if applicable) - if (gMain.inBattle - && battlerId != MAX_BATTLERS_COUNT && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[battlerId].mimickedMoves & gBitTable[temp2])) + if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battlerId, temp2)) gBattleMons[battlerId].pp[temp2] = dataUnsigned; retVal = FALSE; @@ -5106,9 +5104,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov SetMonData(mon, MON_DATA_PP1 + moveIndex, &dataUnsigned); // Heal battler PP too (if applicable) - if (gMain.inBattle - && battlerId != MAX_BATTLERS_COUNT && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[battlerId].mimickedMoves & gBitTable[moveIndex])) + if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battlerId, moveIndex)) gBattleMons[battlerId].pp[moveIndex] = dataUnsigned; retVal = FALSE; diff --git a/src/recorded_battle.c b/src/recorded_battle.c index 69ee902105..e6d5b165b8 100644 --- a/src/recorded_battle.c +++ b/src/recorded_battle.c @@ -1,6 +1,7 @@ #include "global.h" #include "battle.h" #include "battle_anim.h" +#include "battle_controllers.h" #include "recorded_battle.h" #include "main.h" #include "pokemon.h" @@ -35,12 +36,6 @@ struct PlayerInfo u16 language; }; -struct MovePp -{ - u16 moves[MAX_MON_MOVES]; - u8 pp[MAX_MON_MOVES]; -}; - struct RecordedBattleSave { struct Pokemon playerParty[PARTY_SIZE]; @@ -91,7 +86,7 @@ EWRAM_DATA static u32 sBattleFlags = 0; EWRAM_DATA static u32 sAI_Scripts = 0; EWRAM_DATA static struct Pokemon sSavedPlayerParty[PARTY_SIZE] = {0}; EWRAM_DATA static struct Pokemon sSavedOpponentParty[PARTY_SIZE] = {0}; -EWRAM_DATA static u16 sPlayerMonMoves[2][MAX_MON_MOVES] = {0}; +EWRAM_DATA static u16 sPlayerMonMoves[MAX_BATTLERS_COUNT / 2][MAX_MON_MOVES] = {0}; EWRAM_DATA static struct PlayerInfo sPlayers[MAX_BATTLERS_COUNT] = {0}; EWRAM_DATA static bool8 sIsPlaybackFinished = 0; EWRAM_DATA static u8 sRecordMixFriendName[PLAYER_NAME_LENGTH + 1] = {0}; @@ -674,9 +669,9 @@ void RecordedBattle_ClearFrontierPassFlag(void) } // Set sFrontierPassFlag to received state of FLAG_SYS_FRONTIER_PASS -void RecordedBattle_SetFrontierPassFlagFromHword(u16 arg0) +void RecordedBattle_SetFrontierPassFlagFromHword(u16 flags) { - sFrontierPassFlag |= (arg0 & 0x8000) >> 15; + sFrontierPassFlag |= (flags & (1 << 15)) >> 15; } u8 RecordedBattle_GetFrontierPassFlag(void) @@ -706,14 +701,14 @@ void RecordedBattle_CopyBattlerMoves(void) return; for (i = 0; i < MAX_MON_MOVES; i++) - { sPlayerMonMoves[gActiveBattler / 2][i] = gBattleMons[gActiveBattler].moves[i]; - } } +// This is a special battle action only used by this function +// It shares a value with B_ACTION_SAFARI_POKEBLOCK, which can never occur in a recorded battle. #define ACTION_MOVE_CHANGE 6 -void sub_818603C(u8 arg0) +void RecordedBattle_CheckMovesetChanges(u8 mode) { s32 battlerId, j, k; @@ -725,9 +720,9 @@ void sub_818603C(u8 arg0) // Player's side only if (GetBattlerSide(battlerId) != B_SIDE_OPPONENT) { - if (arg0 == 1) + if (mode == B_RECORD_MODE_RECORDING) { - // Check if any of the battler's moves have changed + // Check if any of the battler's moves have changed. for (j = 0; j < MAX_MON_MOVES; j++) { if (gBattleMons[battlerId].moves[j] != sPlayerMonMoves[battlerId / 2][j]) @@ -750,63 +745,65 @@ void sub_818603C(u8 arg0) } } } - else + else // B_RECORD_MODE_PLAYBACK { if (sBattleRecords[battlerId][sBattlerRecordSizes[battlerId]] == ACTION_MOVE_CHANGE) { u8 ppBonuses[MAX_MON_MOVES]; - u8 array1[MAX_MON_MOVES]; - u8 array2[MAX_MON_MOVES]; - struct MovePp movePp; - u8 array3[(MAX_MON_MOVES * 2)]; - u8 var; + u8 moveSlots[MAX_MON_MOVES]; + u8 mimickedMoveSlots[MAX_MON_MOVES]; + struct ChooseMoveStruct movePp; + u8 ppBonusSet; + // We know the current action is ACTION_MOVE_CHANGE, retrieve + // it without saving it to move on to the next action. RecordedBattle_GetBattlerAction(battlerId); + for (j = 0; j < MAX_MON_MOVES; j++) ppBonuses[j] = ((gBattleMons[battlerId].ppBonuses & (3 << (j << 1))) >> (j << 1)); for (j = 0; j < MAX_MON_MOVES; j++) { - array1[j] = RecordedBattle_GetBattlerAction(battlerId); - movePp.moves[j] = gBattleMons[battlerId].moves[array1[j]]; - movePp.pp[j] = gBattleMons[battlerId].pp[array1[j]]; - array3[j] = ppBonuses[array1[j]]; - array2[j] = (gDisableStructs[battlerId].mimickedMoves & gBitTable[j]) >> j; + moveSlots[j] = RecordedBattle_GetBattlerAction(battlerId); + movePp.moves[j] = gBattleMons[battlerId].moves[moveSlots[j]]; + movePp.currentPp[j] = gBattleMons[battlerId].pp[moveSlots[j]]; + movePp.maxPp[j] = ppBonuses[moveSlots[j]]; + mimickedMoveSlots[j] = (gDisableStructs[battlerId].mimickedMoves & gBitTable[j]) >> j; } for (j = 0; j < MAX_MON_MOVES; j++) { gBattleMons[battlerId].moves[j] = movePp.moves[j]; - gBattleMons[battlerId].pp[j] = movePp.pp[j]; + gBattleMons[battlerId].pp[j] = movePp.currentPp[j]; } gBattleMons[battlerId].ppBonuses = 0; gDisableStructs[battlerId].mimickedMoves = 0; for (j = 0; j < MAX_MON_MOVES; j++) { - gBattleMons[battlerId].ppBonuses |= (array3[j]) << (j << 1); - gDisableStructs[battlerId].mimickedMoves |= (array2[j]) << (j); + gBattleMons[battlerId].ppBonuses |= movePp.maxPp[j] << (j << 1); + gDisableStructs[battlerId].mimickedMoves |= mimickedMoveSlots[j] << j; } if (!(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED)) { for (j = 0; j < MAX_MON_MOVES; j++) - ppBonuses[j] = ((GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, NULL) & ((3 << (j << 1)))) >> (j << 1)); + ppBonuses[j] = (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, NULL) & ((3 << (j << 1)))) >> (j << 1); for (j = 0; j < MAX_MON_MOVES; j++) { - movePp.moves[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + array1[j], NULL); - movePp.pp[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + array1[j], NULL); - array3[j] = ppBonuses[array1[j]]; + movePp.moves[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + moveSlots[j], NULL); + movePp.currentPp[j] = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + moveSlots[j], NULL); + movePp.maxPp[j] = ppBonuses[moveSlots[j]]; } for (j = 0; j < MAX_MON_MOVES; j++) { SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MOVE1 + j, &movePp.moves[j]); - SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + j, &movePp.pp[j]); + SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP1 + j, &movePp.currentPp[j]); } - var = 0; + ppBonusSet = 0; for (j = 0; j < MAX_MON_MOVES; j++) - var |= (array3[j]) << (j << 1); + ppBonusSet |= movePp.maxPp[j] << (j << 1); - SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, &var); + SetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PP_BONUSES, &ppBonusSet); } gChosenMoveByBattler[battlerId] = gBattleMons[battlerId].moves[*(gBattleStruct->chosenMovePositions + battlerId)]; } From 5860e0e9372f89f4fc32b225c3bd7b7de91b78c1 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 13 Oct 2021 13:19:15 -0400 Subject: [PATCH 054/417] Disallow negative sizes in SAVEBLOCK_CHUNK --- src/save.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/save.c b/src/save.c index 52301df036..a05d2c184c 100644 --- a/src/save.c +++ b/src/save.c @@ -43,11 +43,12 @@ static u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location); // (u8 *)structure was removed from the first statement of the macro in Emerald. // This is because malloc is used to allocate addresses so storing the raw // addresses should not be done in the offsets information. -#define SAVEBLOCK_CHUNK(structure, chunkNum) \ -{ \ - chunkNum * SECTOR_DATA_SIZE, \ - min(sizeof(structure) - chunkNum * SECTOR_DATA_SIZE, SECTOR_DATA_SIZE) \ -} \ +#define SAVEBLOCK_CHUNK(structure, chunkNum) \ +{ \ + chunkNum * SECTOR_DATA_SIZE, \ + sizeof(structure) >= chunkNum * SECTOR_DATA_SIZE ? \ + min(sizeof(structure) - chunkNum * SECTOR_DATA_SIZE, SECTOR_DATA_SIZE) : 0 \ +} static const struct SaveSectionOffsets sSaveSectionOffsets[] = { From fc15b0d5f0b9c6d004ca4c30c79557606a4b0eeb Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 12 Oct 2021 19:50:32 -0400 Subject: [PATCH 055/417] Add controller buffer constants, finish misc battle doc --- asm/macros/battle_script.inc | 4 +- data/battle_scripts_1.s | 61 ++-- include/battle.h | 8 +- include/battle_controllers.h | 48 ++- include/constants/battle_script_commands.h | 4 +- src/battle_ai_switch_items.c | 18 +- src/battle_controller_link_opponent.c | 2 +- src/battle_controller_link_partner.c | 2 +- src/battle_controller_opponent.c | 24 +- src/battle_controller_player.c | 63 ++-- src/battle_controller_player_partner.c | 10 +- src/battle_controller_recorded_opponent.c | 10 +- src/battle_controller_recorded_player.c | 12 +- src/battle_controller_safari.c | 10 +- src/battle_controller_wally.c | 14 +- src/battle_controllers.c | 48 +-- src/battle_main.c | 107 +++---- src/battle_script_commands.c | 340 +++++++++++---------- src/battle_util.c | 32 +- src/battle_util2.c | 9 +- src/party_menu.c | 6 +- src/pokemon.c | 2 +- 22 files changed, 435 insertions(+), 399 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index c5bede3f5d..4b9e0bfdf1 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -183,7 +183,7 @@ .byte \battler .endm - .macro atk24 ptr:req + .macro checkteamslost ptr:req .byte 0x24 .4byte \ptr .endm @@ -538,7 +538,7 @@ .byte 0x5d .endm - .macro atk5E battler:req + .macro updatebattlermoves battler:req .byte 0x5e .byte \battler .endm diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 203ea31256..5a48e0b3c2 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2825,37 +2825,40 @@ BattleScript_GiveExp:: end2 BattleScript_HandleFaintedMon:: - atk24 BattleScript_HandleFaintedMonMultiple + checkteamslost BattleScript_LinkHandleFaintedMonMultiple jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd - jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonTryChooseAnother - jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonTryChooseAnother -@ Yes/No for sending out a new Pokémon, when sending out is optional + jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonTryChoose + jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonTryChoose +@ Yes/No for sending out a new Pokémon if one is defeated in a wild battle printstring STRINGID_USENEXTPKMN setbyte gBattleCommunication, 0 yesnobox - jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0, BattleScript_FaintedMonTryChooseAnother + jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0, BattleScript_FaintedMonTryChoose @ Player said no, try to run jumpifplayerran BattleScript_FaintedMonEnd printstring STRINGID_CANTESCAPE2 -BattleScript_FaintedMonTryChooseAnother:: +BattleScript_FaintedMonTryChoose:: openpartyscreen BS_FAINTED, BattleScript_FaintedMonEnd switchhandleorder BS_FAINTED, 2 - jumpifnotbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonChooseAnother - jumpifbattletype BATTLE_TYPE_LINK, BattleScript_FaintedMonChooseAnother - jumpifbattletype BATTLE_TYPE_RECORDED_LINK, BattleScript_FaintedMonChooseAnother - jumpifbattletype BATTLE_TYPE_FRONTIER, BattleScript_FaintedMonChooseAnother - jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonChooseAnother - jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonChooseAnother - jumpifbyte CMP_EQUAL, sBATTLE_STYLE, OPTIONS_BATTLE_STYLE_SET, BattleScript_FaintedMonChooseAnother - jumpifcantswitch BS_PLAYER1, BattleScript_FaintedMonChooseAnother + jumpifnotbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonSendOutNew + jumpifbattletype BATTLE_TYPE_LINK, BattleScript_FaintedMonSendOutNew + jumpifbattletype BATTLE_TYPE_RECORDED_LINK, BattleScript_FaintedMonSendOutNew + jumpifbattletype BATTLE_TYPE_FRONTIER, BattleScript_FaintedMonSendOutNew + jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonSendOutNew + jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonSendOutNew + jumpifbyte CMP_EQUAL, sBATTLE_STYLE, OPTIONS_BATTLE_STYLE_SET, BattleScript_FaintedMonSendOutNew + jumpifcantswitch BS_PLAYER1, BattleScript_FaintedMonSendOutNew +@ Yes/No for sending out a new Pokémon when the opponent is switching printstring STRINGID_ENEMYABOUTTOSWITCHPKMN setbyte gBattleCommunication, 0 yesnobox - jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 1, BattleScript_FaintedMonChooseAnother + jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 1, BattleScript_FaintedMonSendOutNew +@ Player said yes, go to party screen (note optional flag, player may exit the menu instead) setatktoplayer0 - openpartyscreen BS_ATTACKER | PARTY_SCREEN_OPTIONAL, BattleScript_FaintedMonChooseAnother + openpartyscreen BS_ATTACKER | PARTY_SCREEN_OPTIONAL, BattleScript_FaintedMonSendOutNew switchhandleorder BS_ATTACKER, 2 - jumpifbyte CMP_EQUAL, gBattleCommunication, PARTY_SIZE, BattleScript_FaintedMonChooseAnother + jumpifbyte CMP_EQUAL, gBattleCommunication, PARTY_SIZE, BattleScript_FaintedMonSendOutNew +@ Switch Pokémon before opponent atknameinbuff1 resetintimidatetracebits BS_ATTACKER hpthresholds2 BS_ATTACKER @@ -2874,7 +2877,7 @@ BattleScript_FaintedMonTryChooseAnother:: waitstate switchineffects BS_ATTACKER resetsentmonsvalue -BattleScript_FaintedMonChooseAnother:: +BattleScript_FaintedMonSendOutNew:: drawpartystatussummary BS_FAINTED getswitchedmondata BS_FAINTED switchindataupdate BS_FAINTED @@ -2890,13 +2893,13 @@ BattleScript_FaintedMonChooseAnother:: BattleScript_FaintedMonEnd:: end2 -BattleScript_HandleFaintedMonMultiple:: - openpartyscreen BS_UNK_5, BattleScript_HandleFaintedMonMultipleStart -BattleScript_HandleFaintedMonMultipleStart:: +BattleScript_LinkHandleFaintedMonMultiple:: + openpartyscreen BS_FAINTED_LINK_MULTIPLE_1, BattleScript_LinkHandleFaintedMonMultipleStart +BattleScript_LinkHandleFaintedMonMultipleStart:: switchhandleorder BS_FAINTED, 0 - openpartyscreen BS_UNK_6, BattleScript_HandleFaintedMonMultipleEnd + openpartyscreen BS_FAINTED_LINK_MULTIPLE_2, BattleScript_LinkHandleFaintedMonMultipleEnd switchhandleorder BS_FAINTED, 0 -BattleScript_HandleFaintedMonLoop:: +BattleScript_LinkHandleFaintedMonLoop:: switchhandleorder BS_FAINTED, 3 drawpartystatussummary BS_FAINTED getswitchedmondata BS_FAINTED @@ -2906,9 +2909,9 @@ BattleScript_HandleFaintedMonLoop:: hidepartystatussummary BS_FAINTED switchinanim BS_FAINTED, FALSE waitstate - switchineffects BS_UNK_5 - jumpifbytenotequal gBattlerFainted, gBattlersCount, BattleScript_HandleFaintedMonLoop -BattleScript_HandleFaintedMonMultipleEnd:: + switchineffects BS_FAINTED_LINK_MULTIPLE_1 + jumpifbytenotequal gBattlerFainted, gBattlersCount, BattleScript_LinkHandleFaintedMonLoop +BattleScript_LinkHandleFaintedMonMultipleEnd:: end2 BattleScript_LocalTrainerBattleWon:: @@ -3208,7 +3211,7 @@ BattleScript_DamagingWeatherLoop:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER tryfaintmon BS_ATTACKER, FALSE, NULL - atk24 BattleScript_DamagingWeatherLoopIncrement + checkteamslost BattleScript_DamagingWeatherLoopIncrement BattleScript_DamagingWeatherLoopIncrement:: jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_DamagingWeatherContinuesEnd addbyte gBattleCommunication, 1 @@ -3523,7 +3526,7 @@ BattleScript_DoFutureAttackHit:: resultmessage waitmessage B_WAIT_TIME_LONG tryfaintmon BS_TARGET, FALSE, NULL - atk24 BattleScript_FutureAttackEnd + checkteamslost BattleScript_FutureAttackEnd BattleScript_FutureAttackEnd:: moveendcase MOVEEND_RAGE moveendfromto MOVEEND_ITEM_EFFECTS_ALL, MOVEEND_UPDATE_LAST_MOVES @@ -3737,7 +3740,7 @@ BattleScript_DoTurnDmg:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER tryfaintmon BS_ATTACKER, FALSE, NULL - atk24 BattleScript_DoTurnDmgEnd + checkteamslost BattleScript_DoTurnDmgEnd BattleScript_DoTurnDmgEnd:: end2 diff --git a/include/battle.h b/include/battle.h index f793c779f7..5a30bc90c8 100644 --- a/include/battle.h +++ b/include/battle.h @@ -145,7 +145,7 @@ struct SpecialStatus u32 intimidatedMon:1; u32 traced:1; u32 ppNotAffectedByPressure:1; - u32 flag40:1; + u32 faintedHasReplacement:1; u32 focusBanded:1; s32 dmg; s32 physicalDmg; @@ -384,9 +384,9 @@ struct BattleStruct u8 field_52; u8 sentInPokes; bool8 selectionScriptFinished[MAX_BATTLERS_COUNT]; - u8 field_58[4]; + u8 battlerPartyIndexes[MAX_BATTLERS_COUNT]; u8 monToSwitchIntoId[MAX_BATTLERS_COUNT]; - u8 field_60[4][3]; + u8 battlerPartyOrders[MAX_BATTLERS_COUNT][PARTY_SIZE / 2]; u8 runTries; u8 caughtMonNick[POKEMON_NAME_LENGTH + 1]; u8 unused_2; @@ -405,7 +405,7 @@ struct BattleStruct u8 stringMoveType; u8 expGetterBattlerId; u8 unused_5; - u8 field_91; // related to gAbsentBattlerFlags, possibly absent flags turn ago? + u8 absentBattlerFlags; u8 palaceFlags; // First 4 bits are "is < 50% HP and not asleep" for each battler, last 4 bits are selected moves to pass to AI u8 field_93; // related to choosing pokemon? u8 wallyBattleState; diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 34e916b0f2..9d9fba1b40 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -1,8 +1,7 @@ #ifndef GUARD_BATTLE_CONTROLLERS_H #define GUARD_BATTLE_CONTROLLERS_H -enum -{ +enum { REQUEST_ALL_BATTLE, REQUEST_SPECIES_BATTLE, REQUEST_HELDITEM_BATTLE, @@ -67,19 +66,36 @@ enum // Special arguments for Battle Controller functions. -#define RESET_ACTION_MOVE_SELECTION 0 -#define RESET_ACTION_SELECTION 1 -#define RESET_MOVE_SELECTION 2 +enum { // Values given to the emit functions to choose gBattleBufferA or gBattleBufferB + BUFFER_A, + BUFFER_B +}; -#define BALL_NO_SHAKES 0 -#define BALL_1_SHAKE 1 -#define BALL_2_SHAKES 2 -#define BALL_3_SHAKES_FAIL 3 -#define BALL_3_SHAKES_SUCCESS 4 -#define BALL_TRAINER_BLOCK 5 +enum { + RESET_ACTION_MOVE_SELECTION, + RESET_ACTION_SELECTION, + RESET_MOVE_SELECTION, +}; + +enum { + BALL_NO_SHAKES, + BALL_1_SHAKE, + BALL_2_SHAKES, + BALL_3_SHAKES_FAIL, + BALL_3_SHAKES_SUCCESS, + BALL_TRAINER_BLOCK, +}; + +enum { + LINK_STANDBY_MSG_STOP_BOUNCE, + LINK_STANDBY_STOP_BOUNCE_ONLY, + LINK_STANDBY_MSG_ONLY, +}; #define INSTANT_HP_BAR_DROP 32767 +#define PARTY_SUMM_SKIP_DRAW_DELAY (1 << 7) + // Special return values in gBattleBufferB from Battle Controller functions. #define RET_VALUE_LEVELED_UP 11 @@ -191,7 +207,7 @@ void BtlController_EmitSetMonData(u8 bufferId, u8 requestId, u8 monToCheck, u8 b void BtlController_EmitSetRawMonData(u8 bufferId, u8 monId, u8 bytes, void *data); // unused void BtlController_EmitLoadMonSprite(u8 bufferId); void BtlController_EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit); -void BtlController_EmitReturnMonToBall(u8 bufferId, u8 arg1); +void BtlController_EmitReturnMonToBall(u8 bufferId, bool8 skipAnim); void BtlController_EmitDrawTrainerPic(u8 bufferId); void BtlController_EmitTrainerSlide(u8 bufferId); void BtlController_EmitTrainerSlideBack(u8 bufferId); @@ -203,11 +219,11 @@ void BtlController_EmitPause(u8 bufferId, u8 toWait, void *data); // unused void BtlController_EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct *disableStructPtr, u8 multihit); void BtlController_EmitPrintString(u8 bufferId, u16 stringId); void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringId); -void BtlController_EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2); +void BtlController_EmitChooseAction(u8 bufferId, u8 action, u16 itemId); void BtlController_EmitYesNoBox(u8 bufferId); void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData); void BtlController_EmitChooseItem(u8 bufferId, u8* arg1); -void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, u8* arg4); +void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8* data); void BtlController_EmitCmd23(u8 bufferId); // unused void BtlController_EmitHealthBarUpdate(u8 bufferId, u16 hpValue); void BtlController_EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints); @@ -216,7 +232,7 @@ void BtlController_EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status); void BtlController_EmitStatusXor(u8 bufferId, u8 b); // unused void BtlController_EmitDataTransfer(u8 bufferId, u16 size, void *data); void BtlController_EmitDMA3Transfer(u8 bufferId, void *dst, u16 size, void *data); // unused -void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *unusedDumbDataParameter); // unused +void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *data); // unused void BtlController_EmitCmd32(u8 bufferId, u16 size, void *c); // unused void BtlController_EmitTwoReturnValues(u8 bufferId, u8 arg1, u16 arg2); void BtlController_EmitChosenMonReturnValue(u8 bufferId, u8 b, u8 *c); @@ -233,7 +249,7 @@ void BtlController_EmitPlayFanfareOrBGM(u8 bufferId, u16 songId, bool8 playBGM); void BtlController_EmitFaintingCry(u8 bufferId); void BtlController_EmitIntroSlide(u8 bufferId, u8 terrainId); void BtlController_EmitIntroTrainerBallThrow(u8 bufferId); -void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2); +void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 flags); void BtlController_EmitHidePartyStatusSummary(u8 bufferId); void BtlController_EmitEndBounceEffect(u8 bufferId); void BtlController_EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible); diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index d5e3eb7bbf..f3e11b4be3 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -40,8 +40,8 @@ #define BS_EFFECT_BATTLER 2 #define BS_FAINTED 3 #define BS_ATTACKER_WITH_PARTNER 4 // for Cmd_updatestatusicon -#define BS_UNK_5 5 -#define BS_UNK_6 6 +#define BS_FAINTED_LINK_MULTIPLE_1 5 +#define BS_FAINTED_LINK_MULTIPLE_2 6 #define BS_BATTLER_0 7 #define BS_ATTACKER_SIDE 8 // for Cmd_jumpifability #define BS_NOT_ATTACKER_SIDE 9 // for Cmd_jumpifability diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 537005d309..6ded484679 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -22,7 +22,7 @@ static bool8 ShouldSwitchIfPerishSong(void) && gDisableStructs[gActiveBattler].perishSongTimer == 0) { *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; - BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } else @@ -106,7 +106,7 @@ static bool8 ShouldSwitchIfWonderGuard(void) { // We found a mon. *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = i; - BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } } @@ -206,7 +206,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) { // we found a mon. *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = i; - BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } } @@ -226,13 +226,13 @@ static bool8 ShouldSwitchIfNaturalCure(void) if ((gLastLandedMoves[gActiveBattler] == 0 || gLastLandedMoves[gActiveBattler] == 0xFFFF) && Random() & 1) { *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; - BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } else if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0 && Random() & 1) { *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; - BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } @@ -244,7 +244,7 @@ static bool8 ShouldSwitchIfNaturalCure(void) if (Random() & 1) { *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; - BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } @@ -412,7 +412,7 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent) if (moveFlags & MOVE_RESULT_SUPER_EFFECTIVE && Random() % moduloPercent == 0) { *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = i; - BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); return TRUE; } } @@ -597,7 +597,7 @@ void AI_TrySwitchOrUseItem(void) } } - BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, (gActiveBattler ^ BIT_SIDE) << 8); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, (gActiveBattler ^ BIT_SIDE) << 8); } static void ModulateByTypeEffectiveness(u8 atkType, u8 defType1, u8 defType2, u8 *var) @@ -923,7 +923,7 @@ static bool8 ShouldUseItem(void) if (shouldUse) { - BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_ITEM, 0); *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2) = item; gBattleResources->battleHistory->trainerItems[i] = 0; return shouldUse; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 11b8f3af78..55fffa705b 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -555,7 +555,7 @@ static void LinkOpponentHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); LinkOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 9c184b9c26..a9240b0ac7 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -442,7 +442,7 @@ static void LinkPartnerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); LinkPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 3f62ba08d4..fe339ddfc8 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -555,7 +555,7 @@ static void OpponentHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); OpponentBufferExecCompleted(); } @@ -875,7 +875,7 @@ static void OpponentHandleGetRawMonData(void) for (i = 0; i < gBattleBufferA[gActiveBattler][2]; i++) dst[i] = src[i]; - BtlController_EmitDataTransfer(1, gBattleBufferA[gActiveBattler][2], dst); + BtlController_EmitDataTransfer(BUFFER_B, gBattleBufferA[gActiveBattler][2], dst); OpponentBufferExecCompleted(); } @@ -1546,7 +1546,7 @@ static void OpponentHandleChooseMove(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace()); OpponentBufferExecCompleted(); } else @@ -1563,13 +1563,13 @@ static void OpponentHandleChooseMove(void) switch (chosenMoveId) { case AI_CHOICE_WATCH: - BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_WATCH_CAREFULLY, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_WATCH_CAREFULLY, 0); break; case AI_CHOICE_FLEE: - BtlController_EmitTwoReturnValues(1, B_ACTION_RUN, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_RUN, 0); break; case 6: - BtlController_EmitTwoReturnValues(1, 15, gBattlerTarget); + BtlController_EmitTwoReturnValues(BUFFER_B, 15, gBattlerTarget); break; default: if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER)) @@ -1580,7 +1580,7 @@ static void OpponentHandleChooseMove(void) if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); } - BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gBattlerTarget << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (gBattlerTarget << 8)); break; } OpponentBufferExecCompleted(); @@ -1595,11 +1595,11 @@ static void OpponentHandleChooseMove(void) } while (move == MOVE_NONE); if (gBattleMoves[move].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER)) - BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gActiveBattler << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (gActiveBattler << 8)); else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8)); else - BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) << 8)); OpponentBufferExecCompleted(); } @@ -1608,7 +1608,7 @@ static void OpponentHandleChooseMove(void) static void OpponentHandleChooseItem(void) { - BtlController_EmitOneReturnValue(1, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2)); + BtlController_EmitOneReturnValue(BUFFER_B, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2)); OpponentBufferExecCompleted(); } @@ -1665,7 +1665,7 @@ static void OpponentHandleChoosePokemon(void) *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; - BtlController_EmitChosenMonReturnValue(1, chosenMonId, NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL); OpponentBufferExecCompleted(); } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index bc8db16991..600e4a16a7 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -248,17 +248,17 @@ static void HandleInputChooseAction(void) switch (gActionSelectionCursor[gActiveBattler]) { - case B_ACTION_USE_MOVE: - BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, 0); + case 0: // Top left + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, 0); break; - case B_ACTION_USE_ITEM: - BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0); + case 1: // Top right + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_ITEM, 0); break; - case B_ACTION_SWITCH: - BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); + case 2: // Bottom left + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SWITCH, 0); break; - case B_ACTION_RUN: - BtlController_EmitTwoReturnValues(1, B_ACTION_RUN, 0); + case 3: // Bottom right + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_RUN, 0); break; } PlayerBufferExecCompleted(); @@ -319,7 +319,7 @@ static void HandleInputChooseAction(void) return; } PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(1, B_ACTION_CANCEL_PARTNER, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_CANCEL_PARTNER, 0); PlayerBufferExecCompleted(); } } @@ -365,7 +365,7 @@ static void HandleInputChooseTarget(void) { PlaySE(SE_SELECT); gSprites[gBattlerSpriteIds[gMultiUsePlayerCursor]].callback = SpriteCb_HideAsMoveTarget; - BtlController_EmitTwoReturnValues(1, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); EndBounceEffect(gMultiUsePlayerCursor, BOUNCE_HEALTHBOX); PlayerBufferExecCompleted(); } @@ -523,7 +523,7 @@ static void HandleInputChooseMove(void) if (!canSelectTarget) { - BtlController_EmitTwoReturnValues(1, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); PlayerBufferExecCompleted(); } else @@ -543,7 +543,7 @@ static void HandleInputChooseMove(void) else if (JOY_NEW(B_BUTTON) || gPlayerDpadHoldFrames > 59) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(1, 10, 0xFFFF); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, 0xFFFF); PlayerBufferExecCompleted(); } else if (JOY_NEW(DPAD_LEFT)) @@ -1174,7 +1174,7 @@ static void Task_GiveExpToMon(u8 taskId) gainedExp -= nextLvlExp - currExp; savedActiveBattler = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBattler; if (IsDoubleBattle() == TRUE @@ -1253,7 +1253,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) gainedExp -= expOnNextLvl - currExp; savedActiveBattler = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBattler; gTasks[taskId].func = Task_LaunchLvlUpAnim; } @@ -1361,9 +1361,9 @@ static void WaitForMonSelection(void) if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { if (gPartyMenuUseExitCallback == TRUE) - BtlController_EmitChosenMonReturnValue(1, gSelectedMonPartyId, gBattlePartyCurrentOrder); + BtlController_EmitChosenMonReturnValue(BUFFER_B, gSelectedMonPartyId, gBattlePartyCurrentOrder); else - BtlController_EmitChosenMonReturnValue(1, PARTY_SIZE, NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, PARTY_SIZE, NULL); if ((gBattleBufferA[gActiveBattler][1] & 0xF) == 1) PrintLinkStandbyMsg(); @@ -1387,7 +1387,7 @@ static void CompleteWhenChoseItem(void) { if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { - BtlController_EmitOneReturnValue(1, gSpecialVar_ItemId); + BtlController_EmitOneReturnValue(BUFFER_B, gSpecialVar_ItemId); PlayerBufferExecCompleted(); } } @@ -1439,9 +1439,9 @@ static void PlayerHandleYesNoInput(void) PlaySE(SE_SELECT); if (gMultiUsePlayerCursor != 0) - BtlController_EmitTwoReturnValues(1, 0xE, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, 0xE, 0); else - BtlController_EmitTwoReturnValues(1, 0xD, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, 0xD, 0); PlayerBufferExecCompleted(); } @@ -1600,7 +1600,7 @@ static void PlayerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); PlayerBufferExecCompleted(); } @@ -1920,7 +1920,7 @@ void PlayerHandleGetRawMonData(void) for (i = 0; i < gBattleBufferA[gActiveBattler][2]; i++) dst[i] = src[i]; - BtlController_EmitDataTransfer(1, gBattleBufferA[gActiveBattler][2], dst); + BtlController_EmitDataTransfer(BUFFER_B, gBattleBufferA[gActiveBattler][2], dst); PlayerBufferExecCompleted(); } @@ -2226,13 +2226,14 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) static void PlayerHandleReturnMonToBall(void) { - if (gBattleBufferA[gActiveBattler][1] == 0) + if (!gBattleBufferA[gActiveBattler][1]) { gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0; gBattlerControllerFuncs[gActiveBattler] = DoSwitchOutAnimation; } else { + // Skip animation, just remove battler FreeSpriteOamMatrix(&gSprites[gBattlerSpriteIds[gActiveBattler]]); DestroySprite(&gSprites[gBattlerSpriteIds[gActiveBattler]]); SetHealthboxSpriteInvisible(gHealthboxSpriteIds[gActiveBattler]); @@ -2620,7 +2621,7 @@ static void PlayerChooseMoveInBattlePalace(void) if (--*(gBattleStruct->arenaMindPoints + gActiveBattler) == 0) { gBattlePalaceMoveSelectionRngValue = gRngValue; - BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace()); PlayerBufferExecCompleted(); } } @@ -2670,7 +2671,7 @@ static void PlayerHandleChoosePokemon(void) if (gBattleTypeFlags & BATTLE_TYPE_ARENA && (gBattleBufferA[gActiveBattler][1] & 0xF) != PARTY_ACTION_CANT_SWITCH) { - BtlController_EmitChosenMonReturnValue(1, gBattlerPartyIndexes[gActiveBattler] + 1, gBattlePartyCurrentOrder); + BtlController_EmitChosenMonReturnValue(BUFFER_B, gBattlerPartyIndexes[gActiveBattler] + 1, gBattlePartyCurrentOrder); PlayerBufferExecCompleted(); } else @@ -2827,25 +2828,25 @@ static void PlayerHandleCmd32(void) static void PlayerHandleTwoReturnValues(void) { - BtlController_EmitTwoReturnValues(1, 0, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, 0, 0); PlayerBufferExecCompleted(); } static void PlayerHandleChosenMonReturnValue(void) { - BtlController_EmitChosenMonReturnValue(1, 0, NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, 0, NULL); PlayerBufferExecCompleted(); } static void PlayerHandleOneReturnValue(void) { - BtlController_EmitOneReturnValue(1, 0); + BtlController_EmitOneReturnValue(BUFFER_B, 0); PlayerBufferExecCompleted(); } static void PlayerHandleOneReturnValue_Duplicate(void) { - BtlController_EmitOneReturnValue_Duplicate(1, 0); + BtlController_EmitOneReturnValue_Duplicate(BUFFER_B, 0); PlayerBufferExecCompleted(); } @@ -3098,14 +3099,14 @@ static void PlayerHandleLinkStandbyMsg(void) RecordedBattle_RecordAllBattlerData(&gBattleBufferA[gActiveBattler][2]); switch (gBattleBufferA[gActiveBattler][1]) { - case 0: + case LINK_STANDBY_MSG_STOP_BOUNCE: PrintLinkStandbyMsg(); // fall through - case 1: + case LINK_STANDBY_STOP_BOUNCE_ONLY: EndBounceEffect(gActiveBattler, BOUNCE_HEALTHBOX); EndBounceEffect(gActiveBattler, BOUNCE_MON); break; - case 2: + case LINK_STANDBY_MSG_ONLY: PrintLinkStandbyMsg(); break; } diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index d07f2763ad..91fea6cde2 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -332,7 +332,7 @@ static void Task_GiveExpToMon(u8 taskId) gainedExp -= nextLvlExp - currExp; savedActiveBank = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBank; if (IsDoubleBattle() == TRUE @@ -411,7 +411,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) gainedExp -= expOnNextLvl - currExp; savedActiveBank = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBank; gTasks[taskId].func = Task_LaunchLvlUpAnim; } @@ -626,7 +626,7 @@ static void PlayerPartnerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); PlayerPartnerBufferExecCompleted(); } @@ -1527,7 +1527,7 @@ static void PlayerPartnerHandleChooseMove(void) gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); } - BtlController_EmitTwoReturnValues(1, 10, chosenMoveId | (gBattlerTarget << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, chosenMoveId | (gBattlerTarget << 8)); PlayerPartnerBufferExecCompleted(); } @@ -1557,7 +1557,7 @@ static void PlayerPartnerHandleChoosePokemon(void) } *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; - BtlController_EmitChosenMonReturnValue(1, chosenMonId, NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL); PlayerPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index bb99c7bf94..ac92fb22df 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -538,7 +538,7 @@ static void RecordedOpponentHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); RecordedOpponentBufferExecCompleted(); } @@ -1406,7 +1406,7 @@ static void RecordedOpponentHandlePrintSelectionString(void) static void RecordedOpponentHandleChooseAction(void) { - BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0); + BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0); RecordedOpponentBufferExecCompleted(); } @@ -1419,13 +1419,13 @@ static void RecordedOpponentHandleChooseMove(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace()); } else { u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler); u8 target = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitTwoReturnValues(1, 10, moveId | (target << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, moveId | (target << 8)); } RecordedOpponentBufferExecCompleted(); @@ -1439,7 +1439,7 @@ static void RecordedOpponentHandleChooseItem(void) static void RecordedOpponentHandleChoosePokemon(void) { *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitChosenMonReturnValue(1, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); RecordedOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 26231060a4..3e73c1dd19 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -517,7 +517,7 @@ static void RecordedPlayerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); RecordedPlayerBufferExecCompleted(); } @@ -1414,7 +1414,7 @@ static void ChooseActionInBattlePalace(void) { if (gBattleCommunication[4] >= gBattlersCount / 2) { - BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0); + BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0); RecordedPlayerBufferExecCompleted(); } } @@ -1427,7 +1427,7 @@ static void RecordedPlayerHandleChooseAction(void) } else { - BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0); + BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0); RecordedPlayerBufferExecCompleted(); } } @@ -1441,13 +1441,13 @@ static void RecordedPlayerHandleChooseMove(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace()); } else { u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler); u8 target = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitTwoReturnValues(1, 10, moveId | (target << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, moveId | (target << 8)); } RecordedPlayerBufferExecCompleted(); @@ -1461,7 +1461,7 @@ static void RecordedPlayerHandleChooseItem(void) static void RecordedPlayerHandleChoosePokemon(void) { *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitChosenMonReturnValue(1, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); RecordedPlayerBufferExecCompleted(); } diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c index 6dc7aa2e52..a26f31b929 100644 --- a/src/battle_controller_safari.c +++ b/src/battle_controller_safari.c @@ -176,16 +176,16 @@ static void HandleInputChooseAction(void) switch (gActionSelectionCursor[gActiveBattler]) { case 0: - BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_BALL, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_BALL, 0); break; case 1: - BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_POKEBLOCK, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_POKEBLOCK, 0); break; case 2: - BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_GO_NEAR, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_GO_NEAR, 0); break; case 3: - BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_RUN, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_RUN, 0); break; } SafariBufferExecCompleted(); @@ -280,7 +280,7 @@ static void CompleteWhenChosePokeblock(void) { if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { - BtlController_EmitOneReturnValue(1, gSpecialVar_ItemId); + BtlController_EmitOneReturnValue(BUFFER_B, gSpecialVar_ItemId); SafariBufferExecCompleted(); } } diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index 466b3f3151..d018fe1c01 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -196,7 +196,7 @@ static void WallyHandleActions(void) if (--gBattleStruct->wallyWaitFrames == 0) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, 0); WallyBufferExecCompleted(); gBattleStruct->wallyBattleState++; gBattleStruct->wallyMovesState = 0; @@ -207,7 +207,7 @@ static void WallyHandleActions(void) if (--gBattleStruct->wallyWaitFrames == 0) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(1, B_ACTION_USE_MOVE, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_MOVE, 0); WallyBufferExecCompleted(); gBattleStruct->wallyBattleState++; gBattleStruct->wallyMovesState = 0; @@ -217,7 +217,7 @@ static void WallyHandleActions(void) case 3: if (--gBattleStruct->wallyWaitFrames == 0) { - BtlController_EmitTwoReturnValues(1, B_ACTION_WALLY_THROW, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_WALLY_THROW, 0); WallyBufferExecCompleted(); gBattleStruct->wallyBattleState++; gBattleStruct->wallyMovesState = 0; @@ -238,7 +238,7 @@ static void WallyHandleActions(void) if (--gBattleStruct->wallyWaitFrames == 0) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(1, B_ACTION_USE_ITEM, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_USE_ITEM, 0); WallyBufferExecCompleted(); } break; @@ -278,7 +278,7 @@ static void CompleteOnChosenItem(void) { if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { - BtlController_EmitOneReturnValue(1, gSpecialVar_ItemId); + BtlController_EmitOneReturnValue(BUFFER_B, gSpecialVar_ItemId); WallyBufferExecCompleted(); } } @@ -444,7 +444,7 @@ static void WallyHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); WallyBufferExecCompleted(); } @@ -1241,7 +1241,7 @@ static void WallyHandleChooseMove(void) if (--gBattleStruct->wallyMoveFrames == 0) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(1, 10, 0x100); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, 0x100); WallyBufferExecCompleted(); } break; diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 0f32345791..ef5f1daa29 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -660,14 +660,14 @@ static void PrepareBufferDataTransfer(u8 bufferId, u8 *data, u16 size) { switch (bufferId) { - case 0: + case BUFFER_A: for (i = 0; i < size; i++) { gBattleBufferA[gActiveBattler][i] = *data; data++; } break; - case 1: + case BUFFER_B: for (i = 0; i < size; i++) { gBattleBufferB[gActiveBattler][i] = *data; @@ -737,7 +737,7 @@ void PrepareBufferDataTransferLink(u8 bufferId, u16 size, u8 *data) static void Task_HandleSendLinkBuffersData(u8 taskId) { - u16 var; + u16 numPlayers; u16 blockSize; switch (gTasks[taskId].data[11]) @@ -759,11 +759,11 @@ static void Task_HandleSendLinkBuffersData(u8 taskId) else { if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) - var = 2; + numPlayers = 2; else - var = (gBattleTypeFlags & BATTLE_TYPE_MULTI) ? 4 : 2; + numPlayers = (gBattleTypeFlags & BATTLE_TYPE_MULTI) ? 4 : 2; - if (GetLinkPlayerCount_2() >= var) + if (GetLinkPlayerCount_2() >= numPlayers) { if (IsLinkMaster()) { @@ -964,10 +964,10 @@ void BtlController_EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubs PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4); } -void BtlController_EmitReturnMonToBall(u8 bufferId, u8 arg1) +void BtlController_EmitReturnMonToBall(u8 bufferId, bool8 skipAnim) { sBattleBuffersTransferData[0] = CONTROLLER_RETURNMONTOBALL; - sBattleBuffersTransferData[1] = arg1; + sBattleBuffersTransferData[1] = skipAnim; PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 2); } @@ -1134,12 +1134,13 @@ void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringID) PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, sizeof(struct BattleMsgData) + 4); } -void BtlController_EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2) +// itemId only relevant for B_ACTION_USE_ITEM +void BtlController_EmitChooseAction(u8 bufferId, u8 action, u16 itemId) { sBattleBuffersTransferData[0] = CONTROLLER_CHOOSEACTION; - sBattleBuffersTransferData[1] = arg1; - sBattleBuffersTransferData[2] = arg2; - sBattleBuffersTransferData[3] = (arg2 & 0xFF00) >> 8; + sBattleBuffersTransferData[1] = action; + sBattleBuffersTransferData[2] = itemId; + sBattleBuffersTransferData[3] = (itemId & 0xFF00) >> 8; PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4); } @@ -1177,7 +1178,7 @@ void BtlController_EmitChooseItem(u8 bufferId, u8 *arg1) PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4); } -void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8 *arg4) +void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8 *data) { s32 i; @@ -1186,7 +1187,7 @@ void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abili sBattleBuffersTransferData[2] = slotId; sBattleBuffersTransferData[3] = abilityId; for (i = 0; i < 3; i++) - sBattleBuffersTransferData[4 + i] = arg4[i]; + sBattleBuffersTransferData[4 + i] = data[i]; PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 8); // Only 7 bytes were written. } @@ -1280,15 +1281,19 @@ void BtlController_EmitDMA3Transfer(u8 bufferId, void *dst, u16 size, void *data PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, size + 7); } -void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *unusedDumbDataParameter) +// Unused +void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *data) { s32 i; sBattleBuffersTransferData[0] = CONTROLLER_PLAYBGM; sBattleBuffersTransferData[1] = songId; sBattleBuffersTransferData[2] = (songId & 0xFF00) >> 8; - for (i = 0; i < songId; i++) // ???? - sBattleBuffersTransferData[3 + i] = *(u8*)(unusedDumbDataParameter++); + + // Nonsense loop using songId as a size + // Would go out of bounds for any song id after SE_RG_BAG_POCKET (253) + for (i = 0; i < songId; i++) + sBattleBuffersTransferData[3 + i] = *(u8*)(data++); PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, songId + 3); } @@ -1442,8 +1447,8 @@ void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* h s32 i; sBattleBuffersTransferData[0] = CONTROLLER_DRAWPARTYSTATUSSUMMARY; - sBattleBuffersTransferData[1] = flags & 0x7F; - sBattleBuffersTransferData[2] = (flags & 0x80) >> 7; // If true, skip delay after drawing. True during intro + sBattleBuffersTransferData[1] = flags & ~PARTY_SUMM_SKIP_DRAW_DELAY; // If true, skip player side + sBattleBuffersTransferData[2] = (flags & PARTY_SUMM_SKIP_DRAW_DELAY) >> 7; // If true, skip delay after drawing. True during intro sBattleBuffersTransferData[3] = CONTROLLER_DRAWPARTYSTATUSSUMMARY; for (i = 0; i < (s32)(sizeof(struct HpAndStatus) * PARTY_SIZE); i++) sBattleBuffersTransferData[4 + i] = *(i + (u8*)(hpAndStatus)); @@ -1486,11 +1491,12 @@ void BtlController_EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 4); } -void BtlController_EmitLinkStandbyMsg(u8 bufferId, u8 arg1, bool32 record) +// mode is a LINK_STANDBY_* constant +void BtlController_EmitLinkStandbyMsg(u8 bufferId, u8 mode, bool32 record) { bool8 record_ = record; sBattleBuffersTransferData[0] = CONTROLLER_LINKSTANDBYMSG; - sBattleBuffersTransferData[1] = arg1; + sBattleBuffersTransferData[1] = mode; if (record_) sBattleBuffersTransferData[3] = sBattleBuffersTransferData[2] = RecordedBattle_BufferNewBattlerData(&sBattleBuffersTransferData[4]); diff --git a/src/battle_main.c b/src/battle_main.c index 1d0f3454b8..da95402c8d 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -105,7 +105,7 @@ static void TryDoEventsBeforeFirstTurn(void); static void HandleTurnActionSelectionState(void); static void RunTurnActionsFunctions(void); static void SetActionsAndBattlersTurnOrder(void); -static void sub_803CDF8(void); +static void UpdateBattlerPartyOrdersOnSwitch(void); static bool8 AllAtActionConfirmed(void); static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void); static void FreeResetData_ReturnToOvOrDoEvolutions(void); @@ -2063,7 +2063,8 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir return gTrainers[trainerNum].partySize; } -static void sub_8038A04(void) // unused +// Unused +static void HBlankCB_Battle(void) { if (REG_VCOUNT < DISPLAY_HEIGHT && REG_VCOUNT >= 111) SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_SCREENBASE(24) | BGCNT_TXT256x512); @@ -3348,7 +3349,7 @@ static void BattleIntroGetMonsData(void) { case 0: gActiveBattler = gBattleCommunication[1]; - BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0); + BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, 0); MarkBattlerForControllerExec(gActiveBattler); gBattleCommunication[MULTIUSE_STATE]++; break; @@ -3370,7 +3371,7 @@ static void BattleIntroPrepareBackgroundSlide(void) if (gBattleControllerExecFlags == 0) { gActiveBattler = GetBattlerAtPosition(0); - BtlController_EmitIntroSlide(0, gBattleTerrain); + BtlController_EmitIntroSlide(BUFFER_A, gBattleTerrain); MarkBattlerForControllerExec(gActiveBattler); gBattleMainFunc = BattleIntroDrawTrainersOrMonsSprites; gBattleCommunication[0] = 0; @@ -3415,7 +3416,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void) if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT) { - BtlController_EmitDrawTrainerPic(0); + BtlController_EmitDrawTrainerPic(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } @@ -3423,7 +3424,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void) { if (GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_LEFT) { - BtlController_EmitDrawTrainerPic(0); + BtlController_EmitDrawTrainerPic(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT @@ -3448,7 +3449,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void) { HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality); } - BtlController_EmitLoadMonSprite(0); + BtlController_EmitLoadMonSprite(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES, NULL); } @@ -3459,14 +3460,14 @@ static void BattleIntroDrawTrainersOrMonsSprites(void) if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT || GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_RIGHT) { - BtlController_EmitDrawTrainerPic(0); + BtlController_EmitDrawTrainerPic(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } } if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS && GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_RIGHT) { - BtlController_EmitDrawTrainerPic(0); + BtlController_EmitDrawTrainerPic(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } @@ -3501,7 +3502,7 @@ static void BattleIntroDrawPartySummaryScreens(void) } } gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); - BtlController_EmitDrawPartyStatusSummary(0, hpStatus, 0x80); + BtlController_EmitDrawPartyStatusSummary(BUFFER_A, hpStatus, PARTY_SUMM_SKIP_DRAW_DELAY); MarkBattlerForControllerExec(gActiveBattler); for (i = 0; i < PARTY_SIZE; i++) @@ -3519,7 +3520,7 @@ static void BattleIntroDrawPartySummaryScreens(void) } } gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); - BtlController_EmitDrawPartyStatusSummary(0, hpStatus, 0x80); + BtlController_EmitDrawPartyStatusSummary(BUFFER_A, hpStatus, PARTY_SUMM_SKIP_DRAW_DELAY); MarkBattlerForControllerExec(gActiveBattler); gBattleMainFunc = BattleIntroPrintTrainerWantsToBattle; @@ -3612,7 +3613,7 @@ static void BattleIntroOpponent2SendsOutMonAnimation(void) { if (GetBattlerPosition(gActiveBattler) == position) { - BtlController_EmitIntroTrainerBallThrow(0); + BtlController_EmitIntroTrainerBallThrow(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } } @@ -3646,7 +3647,7 @@ static void BattleIntroOpponent1SendsOutMonAnimation(void) { if (GetBattlerPosition(gActiveBattler) == position) { - BtlController_EmitIntroTrainerBallThrow(0); + BtlController_EmitIntroTrainerBallThrow(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); if (gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_TWO_OPPONENTS)) { @@ -3679,7 +3680,8 @@ static void BattleIntroRecordMonsToDex(void) } } -void sub_803B3AC(void) // unused +// Unused +static void BattleIntroSkipRecordMonsToDex(void) { if (gBattleControllerExecFlags == 0) gBattleMainFunc = BattleIntroPrintPlayerSendsOut; @@ -3730,7 +3732,7 @@ static void BattleIntroPlayer2SendsOutMonAnimation(void) { if (GetBattlerPosition(gActiveBattler) == position) { - BtlController_EmitIntroTrainerBallThrow(0); + BtlController_EmitIntroTrainerBallThrow(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } } @@ -3765,7 +3767,7 @@ static void BattleIntroPlayer1SendsOutMonAnimation(void) { if (GetBattlerPosition(gActiveBattler) == position) { - BtlController_EmitIntroTrainerBallThrow(0); + BtlController_EmitIntroTrainerBallThrow(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); if (gBattleTypeFlags & (BATTLE_TYPE_MULTI)) { @@ -3782,7 +3784,8 @@ static void BattleIntroPlayer1SendsOutMonAnimation(void) gBattleMainFunc = TryDoEventsBeforeFirstTurn; } -void sub_803B598(void) // unused +// Unused +static void BattleIntroSwitchInPlayerMons(void) { if (gBattleControllerExecFlags == 0) { @@ -3790,7 +3793,7 @@ void sub_803B598(void) // unused { if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) { - BtlController_EmitSwitchInAnim(0, gBattlerPartyIndexes[gActiveBattler], FALSE); + BtlController_EmitSwitchInAnim(BUFFER_A, gBattlerPartyIndexes[gActiveBattler], FALSE); MarkBattlerForControllerExec(gActiveBattler); } } @@ -3865,7 +3868,7 @@ static void TryDoEventsBeforeFirstTurn(void) } TurnValuesCleanUp(FALSE); SpecialStatusesClear(); - *(&gBattleStruct->field_91) = gAbsentBattlerFlags; + *(&gBattleStruct->absentBattlerFlags) = gAbsentBattlerFlags; BattlePutTextOnWindow(gText_EmptyString3, B_WIN_MSG); gBattleMainFunc = HandleTurnActionSelectionState; ResetSentPokesToOpponentValue(); @@ -3972,7 +3975,7 @@ void BattleTurnPassed(void) for (i = 0; i < MAX_BATTLERS_COUNT; i++) *(gBattleStruct->monToSwitchIntoId + i) = PARTY_SIZE; - *(&gBattleStruct->field_91) = gAbsentBattlerFlags; + *(&gBattleStruct->absentBattlerFlags) = gAbsentBattlerFlags; BattlePutTextOnWindow(gText_EmptyString3, B_WIN_MSG); gBattleMainFunc = HandleTurnActionSelectionState; gRandomTurnNumber = Random(); @@ -4054,10 +4057,8 @@ void SwitchPartyOrder(u8 battler) u8 partyId1; u8 partyId2; - // gBattleStruct->field_60[battler][i] - for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) - gBattlePartyCurrentOrder[i] = *(battler * 3 + i + (u8*)(gBattleStruct->field_60)); + gBattlePartyCurrentOrder[i] = *(battler * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)); partyId1 = GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battler]); partyId2 = GetPartyIdFromBattlePartyId(*(gBattleStruct->monToSwitchIntoId + battler)); @@ -4067,15 +4068,15 @@ void SwitchPartyOrder(u8 battler) { for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) { - *(battler * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; - *(BATTLE_PARTNER(battler) * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; + *(battler * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i]; + *(BATTLE_PARTNER(battler) * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i]; } } else { for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) { - *(battler * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; + *(battler * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i]; } } } @@ -4111,10 +4112,10 @@ static void HandleTurnActionSelectionState(void) *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; if (gBattleTypeFlags & BATTLE_TYPE_MULTI || (position & BIT_FLANK) == B_FLANK_LEFT - || gBattleStruct->field_91 & gBitTable[GetBattlerAtPosition(BATTLE_PARTNER(position))] + || gBattleStruct->absentBattlerFlags & gBitTable[GetBattlerAtPosition(BATTLE_PARTNER(position))] || gBattleCommunication[GetBattlerAtPosition(BATTLE_PARTNER(position))] == STATE_WAIT_ACTION_CONFIRMED) { - if (gBattleStruct->field_91 & gBitTable[gActiveBattler]) + if (gBattleStruct->absentBattlerFlags & gBitTable[gActiveBattler]) { gChosenActionByBattler[gActiveBattler] = B_ACTION_NOTHING_FAINTED; if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) @@ -4132,7 +4133,7 @@ static void HandleTurnActionSelectionState(void) } else { - BtlController_EmitChooseAction(0, gChosenActionByBattler[0], gBattleBufferB[0][1] | (gBattleBufferB[0][2] << 8)); + BtlController_EmitChooseAction(BUFFER_A, gChosenActionByBattler[0], gBattleBufferB[0][1] | (gBattleBufferB[0][2] << 8)); MarkBattlerForControllerExec(gActiveBattler); gBattleCommunication[gActiveBattler]++; } @@ -4181,7 +4182,7 @@ static void HandleTurnActionSelectionState(void) i); } - BtlController_EmitChooseMove(0, (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) != 0, FALSE, &moveInfo); + BtlController_EmitChooseMove(BUFFER_A, (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) != 0, FALSE, &moveInfo); MarkBattlerForControllerExec(gActiveBattler); } break; @@ -4200,17 +4201,17 @@ static void HandleTurnActionSelectionState(void) } else { - BtlController_EmitChooseItem(0, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChooseItem(BUFFER_A, gBattleStruct->battlerPartyOrders[gActiveBattler]); MarkBattlerForControllerExec(gActiveBattler); } break; case B_ACTION_SWITCH: - *(gBattleStruct->field_58 + gActiveBattler) = gBattlerPartyIndexes[gActiveBattler]; + *(gBattleStruct->battlerPartyIndexes + gActiveBattler) = gBattlerPartyIndexes[gActiveBattler]; if (gBattleMons[gActiveBattler].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION) || gBattleTypeFlags & BATTLE_TYPE_ARENA || gStatuses3[gActiveBattler] & STATUS3_ROOTED) { - BtlController_EmitChoosePokemon(0, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); } else if ((i = ABILITY_ON_OPPOSING_FIELD(gActiveBattler, ABILITY_SHADOW_TAG)) || ((i = ABILITY_ON_OPPOSING_FIELD(gActiveBattler, ABILITY_ARENA_TRAP)) @@ -4219,16 +4220,16 @@ static void HandleTurnActionSelectionState(void) || ((i = AbilityBattleEffects(ABILITYEFFECT_CHECK_FIELD_EXCEPT_BATTLER, gActiveBattler, ABILITY_MAGNET_PULL, 0, 0)) && IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_STEEL))) { - BtlController_EmitChoosePokemon(0, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gLastUsedAbility, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(BUFFER_A, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gLastUsedAbility, gBattleStruct->battlerPartyOrders[gActiveBattler]); } else { if (gActiveBattler == 2 && gChosenActionByBattler[0] == B_ACTION_SWITCH) - BtlController_EmitChoosePokemon(0, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 0), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 0), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); else if (gActiveBattler == 3 && gChosenActionByBattler[1] == B_ACTION_SWITCH) - BtlController_EmitChoosePokemon(0, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 1), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 1), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); else - BtlController_EmitChoosePokemon(0, PARTY_ACTION_CHOOSE_MON, PARTY_SIZE, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CHOOSE_MON, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); } MarkBattlerForControllerExec(gActiveBattler); break; @@ -4243,7 +4244,7 @@ static void HandleTurnActionSelectionState(void) } break; case B_ACTION_SAFARI_POKEBLOCK: - BtlController_EmitChooseItem(0, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChooseItem(BUFFER_A, gBattleStruct->battlerPartyOrders[gActiveBattler]); MarkBattlerForControllerExec(gActiveBattler); break; case B_ACTION_CANCEL_PARTNER: @@ -4253,7 +4254,7 @@ static void HandleTurnActionSelectionState(void) if (gBattleMons[GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gActiveBattler)))].status2 & STATUS2_MULTIPLETURNS || gBattleMons[GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gActiveBattler)))].status2 & STATUS2_RECHARGE) { - BtlController_EmitEndBounceEffect(0); + BtlController_EmitEndBounceEffect(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); return; } @@ -4281,7 +4282,7 @@ static void HandleTurnActionSelectionState(void) { RecordedBattle_ClearBattlerAction(GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gActiveBattler))), 3); } - BtlController_EmitEndBounceEffect(0); + BtlController_EmitEndBounceEffect(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); return; } @@ -4337,7 +4338,7 @@ static void HandleTurnActionSelectionState(void) return; case 15: gChosenActionByBattler[gActiveBattler] = B_ACTION_SWITCH; - sub_803CDF8(); + UpdateBattlerPartyOrdersOnSwitch(); return; default: RecordedBattle_CheckMovesetChanges(B_RECORD_MODE_PLAYBACK); @@ -4389,7 +4390,7 @@ static void HandleTurnActionSelectionState(void) } else { - sub_803CDF8(); + UpdateBattlerPartyOrdersOnSwitch(); gBattleCommunication[gActiveBattler]++; } break; @@ -4434,15 +4435,15 @@ static void HandleTurnActionSelectionState(void) else i = FALSE; - if (((gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_DOUBLE)) != BATTLE_TYPE_DOUBLE) + if (((gBattleTypeFlags & BATTLE_TYPE_MULTI) || !(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) || (position & BIT_FLANK) != B_FLANK_LEFT - || (*(&gBattleStruct->field_91) & gBitTable[GetBattlerAtPosition(position ^ BIT_FLANK)])) + || (*(&gBattleStruct->absentBattlerFlags) & gBitTable[GetBattlerAtPosition(position ^ BIT_FLANK)])) { - BtlController_EmitLinkStandbyMsg(0, 0, i); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_STOP_BOUNCE, i); } else { - BtlController_EmitLinkStandbyMsg(0, 1, i); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_STOP_BOUNCE_ONLY, i); } MarkBattlerForControllerExec(gActiveBattler); gBattleCommunication[gActiveBattler]++; @@ -4538,20 +4539,20 @@ static bool8 AllAtActionConfirmed(void) return FALSE; } -static void sub_803CDF8(void) +static void UpdateBattlerPartyOrdersOnSwitch(void) { *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = gBattleBufferB[gActiveBattler][1]; RecordedBattle_SetBattlerAction(gActiveBattler, gBattleBufferB[gActiveBattler][1]); if (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI) { - *(gActiveBattler * 3 + (u8*)(gBattleStruct->field_60) + 0) &= 0xF; - *(gActiveBattler * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0); - *(gActiveBattler * 3 + (u8*)(gBattleStruct->field_60) + 1) = gBattleBufferB[gActiveBattler][3]; + *(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) &= 0xF; + *(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0); + *(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 1) = gBattleBufferB[gActiveBattler][3]; - *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->field_60) + 0) &= (0xF0); - *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4; - *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBattler][3]; + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) &= (0xF0); + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4; + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 2) = gBattleBufferB[gActiveBattler][3]; } } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3e91b64b12..9056aa58da 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -113,7 +113,7 @@ static void Cmd_jumpifstat(void); static void Cmd_jumpifstatus3condition(void); static void Cmd_jumpiftype(void); static void Cmd_getexp(void); -static void Cmd_unknown_24(void); +static void Cmd_checkteamslost(void); static void Cmd_movevaluescleanup(void); static void Cmd_setmultihit(void); static void Cmd_decrementmultihit(void); @@ -171,7 +171,7 @@ static void Cmd_yesnoboxlearnmove(void); static void Cmd_yesnoboxstoplearningmove(void); static void Cmd_hitanimation(void); static void Cmd_getmoneyreward(void); -static void Cmd_unknown_5E(void); +static void Cmd_updatebattlermoves(void); static void Cmd_swapattackerwithtarget(void); static void Cmd_incrementgamestat(void); static void Cmd_drawpartystatussummary(void); @@ -365,7 +365,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = Cmd_jumpifstatus3condition, //0x21 Cmd_jumpiftype, //0x22 Cmd_getexp, //0x23 - Cmd_unknown_24, //0x24 + Cmd_checkteamslost, //0x24 Cmd_movevaluescleanup, //0x25 Cmd_setmultihit, //0x26 Cmd_decrementmultihit, //0x27 @@ -423,7 +423,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = Cmd_yesnoboxstoplearningmove, //0x5B Cmd_hitanimation, //0x5C Cmd_getmoneyreward, //0x5D - Cmd_unknown_5E, //0x5E + Cmd_updatebattlermoves, //0x5E Cmd_swapattackerwithtarget, //0x5F Cmd_incrementgamestat, //0x60 Cmd_drawpartystatussummary, //0x61 @@ -1238,7 +1238,9 @@ static void Cmd_ppreduce(void) if (MOVE_IS_PERMANENT(gBattlerAttacker, gCurrMovePos)) { gActiveBattler = gBattlerAttacker; - BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + gCurrMovePos, 0, 1, &gBattleMons[gBattlerAttacker].pp[gCurrMovePos]); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_PPMOVE1_BATTLE + gCurrMovePos, 0, + sizeof(gBattleMons[gBattlerAttacker].pp[gCurrMovePos]), + &gBattleMons[gBattlerAttacker].pp[gCurrMovePos]); MarkBattlerForControllerExec(gBattlerAttacker); } } @@ -1775,7 +1777,7 @@ static void Cmd_attackanimation(void) else multihit = gMultiHitCounter; - BtlController_EmitMoveAnimation(0, gCurrentMove, gBattleScripting.animTurn, gBattleMovePower, gBattleMoveDamage, gBattleMons[gBattlerAttacker].friendship, &gDisableStructs[gBattlerAttacker], multihit); + BtlController_EmitMoveAnimation(BUFFER_A, gCurrentMove, gBattleScripting.animTurn, gBattleMovePower, gBattleMoveDamage, gBattleMons[gBattlerAttacker].friendship, &gDisableStructs[gBattlerAttacker], multihit); gBattleScripting.animTurn += 1; gBattleScripting.animTargetsHit += 1; MarkBattlerForControllerExec(gBattlerAttacker); @@ -1820,7 +1822,7 @@ static void Cmd_healthbarupdate(void) else healthValue = maxPossibleDmgValue; - BtlController_EmitHealthBarUpdate(0, healthValue); + BtlController_EmitHealthBarUpdate(BUFFER_A, healthValue); MarkBattlerForControllerExec(gActiveBattler); if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleMoveDamage > 0) @@ -1944,7 +1946,7 @@ static void Cmd_datahpupdate(void) } } gHitMarker &= ~HITMARKER_PASSIVE_DAMAGE; - BtlController_EmitSetMonData(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBattler].hp); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HP_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].hp), &gBattleMons[gActiveBattler].hp); MarkBattlerForControllerExec(gActiveBattler); } } @@ -1981,11 +1983,11 @@ static void Cmd_effectivenesssound(void) switch (gMoveResultFlags & (u8)(~MOVE_RESULT_MISSED)) { case MOVE_RESULT_SUPER_EFFECTIVE: - BtlController_EmitPlaySE(0, SE_SUPER_EFFECTIVE); + BtlController_EmitPlaySE(BUFFER_A, SE_SUPER_EFFECTIVE); MarkBattlerForControllerExec(gActiveBattler); break; case MOVE_RESULT_NOT_VERY_EFFECTIVE: - BtlController_EmitPlaySE(0, SE_NOT_EFFECTIVE); + BtlController_EmitPlaySE(BUFFER_A, SE_NOT_EFFECTIVE); MarkBattlerForControllerExec(gActiveBattler); break; case MOVE_RESULT_DOESNT_AFFECT_FOE: @@ -1998,17 +2000,17 @@ static void Cmd_effectivenesssound(void) default: if (gMoveResultFlags & MOVE_RESULT_SUPER_EFFECTIVE) { - BtlController_EmitPlaySE(0, SE_SUPER_EFFECTIVE); + BtlController_EmitPlaySE(BUFFER_A, SE_SUPER_EFFECTIVE); MarkBattlerForControllerExec(gActiveBattler); } else if (gMoveResultFlags & MOVE_RESULT_NOT_VERY_EFFECTIVE) { - BtlController_EmitPlaySE(0, SE_NOT_EFFECTIVE); + BtlController_EmitPlaySE(BUFFER_A, SE_NOT_EFFECTIVE); MarkBattlerForControllerExec(gActiveBattler); } else if (!(gMoveResultFlags & (MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED))) { - BtlController_EmitPlaySE(0, SE_EFFECTIVE); + BtlController_EmitPlaySE(BUFFER_A, SE_EFFECTIVE); MarkBattlerForControllerExec(gActiveBattler); } break; @@ -2121,7 +2123,7 @@ static void Cmd_printselectionstring(void) { gActiveBattler = gBattlerAttacker; - BtlController_EmitPrintSelectionString(0, T2_READ_16(gBattlescriptCurrInstr + 1)); + BtlController_EmitPrintSelectionString(BUFFER_A, T2_READ_16(gBattlescriptCurrInstr + 1)); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 3; @@ -2171,7 +2173,7 @@ static void Cmd_printselectionstringfromtable(void) ptr += gBattleCommunication[MULTISTRING_CHOOSER]; gActiveBattler = gBattlerAttacker; - BtlController_EmitPrintSelectionString(0, *ptr); + BtlController_EmitPrintSelectionString(BUFFER_A, *ptr); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 5; @@ -2453,7 +2455,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; gActiveBattler = gEffectBattler; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gEffectBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gEffectBattler].status1), &gBattleMons[gEffectBattler].status1); MarkBattlerForControllerExec(gActiveBattler); if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) @@ -2756,11 +2758,11 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMons[gBattlerTarget].item = 0; gActiveBattler = gBattlerAttacker; - BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedItem); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gLastUsedItem), &gLastUsedItem); MarkBattlerForControllerExec(gBattlerAttacker); gActiveBattler = gBattlerTarget; - BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBattlerTarget].item); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gBattlerTarget].item), &gBattleMons[gBattlerTarget].item); MarkBattlerForControllerExec(gBattlerTarget); BattleScriptPush(gBattlescriptCurrInstr + 1); @@ -2799,7 +2801,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMons[gBattlerTarget].status1 &= ~STATUS1_PARALYSIS; gActiveBattler = gBattlerTarget; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); BattleScriptPush(gBattlescriptCurrInstr + 1); @@ -3006,7 +3008,7 @@ static void Cmd_tryfaintmon(void) BattleScriptPush(gBattlescriptCurrInstr); gBattlescriptCurrInstr = BattleScript_GrudgeTakesPp; gActiveBattler = gBattlerAttacker; - BtlController_EmitSetMonData(0, moveIndex + REQUEST_PPMOVE1_BATTLE, 0, 1, &gBattleMons[gActiveBattler].pp[moveIndex]); + BtlController_EmitSetMonData(BUFFER_A, moveIndex + REQUEST_PPMOVE1_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].pp[moveIndex]), &gBattleMons[gActiveBattler].pp[moveIndex]); MarkBattlerForControllerExec(gActiveBattler); PREPARE_MOVE_BUFFER(gBattleTextBuff1, gBattleMons[gBattlerAttacker].moves[moveIndex]) @@ -3024,7 +3026,7 @@ static void Cmd_dofaintanimation(void) if (gBattleControllerExecFlags == 0) { gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - BtlController_EmitFaintAnimation(0); + BtlController_EmitFaintAnimation(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; } @@ -3039,7 +3041,7 @@ static void Cmd_cleareffectsonfaint(void) if (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || gBattleMons[gActiveBattler].hp == 0) { gBattleMons[gActiveBattler].status1 = 0; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); } @@ -3405,7 +3407,7 @@ static void Cmd_getexp(void) gBattleResources->beforeLvlUp->stats[STAT_SPDEF] = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPDEF); gActiveBattler = gBattleStruct->expGetterBattlerId; - BtlController_EmitExpUpdate(0, gBattleStruct->expGetterMonId, gBattleMoveDamage); + BtlController_EmitExpUpdate(BUFFER_A, gBattleStruct->expGetterMonId, gBattleMoveDamage); MarkBattlerForControllerExec(gActiveBattler); } gBattleScripting.getexpState++; @@ -3496,8 +3498,9 @@ static void Cmd_getexp(void) } // For battles that aren't BATTLE_TYPE_LINK or BATTLE_TYPE_RECORDED_LINK, the only thing this -// command does is check whether the player has won/lost by totaling each team's HP -static void Cmd_unknown_24(void) +// command does is check whether the player has won/lost by totaling each team's HP. It then +// sets gBattleOutcome accordingly, if necessary. +static void Cmd_checkteamslost(void) { u16 HP_count = 0; s32 i; @@ -3547,35 +3550,37 @@ static void Cmd_unknown_24(void) if (HP_count == 0) gBattleOutcome |= B_OUTCOME_WON; + // For link battles that haven't ended, count number of empty battler spots + // In link multi battles, jump to pointer if more than 1 spot empty + // In non-multi battles, jump to pointer if 1 spot is missing on both sides if (gBattleOutcome == 0 && (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))) { - s32 foundPlayer = 0; - s32 foundOpponent; + s32 emptyPlayerSpots = 0; + s32 emptyOpponentSpots; for (i = 0; i < gBattlersCount; i += 2) { - if ((gHitMarker & HITMARKER_FAINTED2(i)) && (!gSpecialStatuses[i].flag40)) - foundPlayer++; + if ((gHitMarker & HITMARKER_FAINTED2(i)) && (!gSpecialStatuses[i].faintedHasReplacement)) + emptyPlayerSpots++; } - foundOpponent = 0; - + emptyOpponentSpots = 0; for (i = 1; i < gBattlersCount; i += 2) { - if ((gHitMarker & HITMARKER_FAINTED2(i)) && (!gSpecialStatuses[i].flag40)) - foundOpponent++; + if ((gHitMarker & HITMARKER_FAINTED2(i)) && (!gSpecialStatuses[i].faintedHasReplacement)) + emptyOpponentSpots++; } if (gBattleTypeFlags & BATTLE_TYPE_MULTI) { - if (foundOpponent + foundPlayer > 1) + if (emptyOpponentSpots + emptyPlayerSpots > 1) gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 1); else gBattlescriptCurrInstr += 5; } else { - if (foundOpponent != 0 && foundPlayer != 0) + if (emptyOpponentSpots != 0 && emptyPlayerSpots != 0) gBattlescriptCurrInstr = T2_READ_PTR(gBattlescriptCurrInstr + 1); else gBattlescriptCurrInstr += 5; @@ -3906,7 +3911,7 @@ static void Cmd_healthbar_update(void) else gActiveBattler = gBattlerAttacker; - BtlController_EmitHealthBarUpdate(0, gBattleMoveDamage); + BtlController_EmitHealthBarUpdate(BUFFER_A, gBattleMoveDamage); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; } @@ -3980,7 +3985,7 @@ static void Cmd_playanimation(void) || gBattlescriptCurrInstr[2] == B_ANIM_SNATCH_MOVE || gBattlescriptCurrInstr[2] == B_ANIM_SUBSTITUTE_FADE) { - BtlController_EmitBattleAnimation(0, gBattlescriptCurrInstr[2], *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 7; } @@ -3994,7 +3999,7 @@ static void Cmd_playanimation(void) || gBattlescriptCurrInstr[2] == B_ANIM_SANDSTORM_CONTINUES || gBattlescriptCurrInstr[2] == B_ANIM_HAIL_CONTINUES) { - BtlController_EmitBattleAnimation(0, gBattlescriptCurrInstr[2], *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 7; } @@ -4004,7 +4009,7 @@ static void Cmd_playanimation(void) } else { - BtlController_EmitBattleAnimation(0, gBattlescriptCurrInstr[2], *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 7; } @@ -4023,7 +4028,7 @@ static void Cmd_playanimation2(void) // animation Id is stored in the first poin || *animationIdPtr == B_ANIM_SNATCH_MOVE || *animationIdPtr == B_ANIM_SUBSTITUTE_FADE) { - BtlController_EmitBattleAnimation(0, *animationIdPtr, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 10; } @@ -4036,7 +4041,7 @@ static void Cmd_playanimation2(void) // animation Id is stored in the first poin || *animationIdPtr == B_ANIM_SANDSTORM_CONTINUES || *animationIdPtr == B_ANIM_HAIL_CONTINUES) { - BtlController_EmitBattleAnimation(0, *animationIdPtr, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 10; } @@ -4046,7 +4051,7 @@ static void Cmd_playanimation2(void) // animation Id is stored in the first poin } else { - BtlController_EmitBattleAnimation(0, *animationIdPtr, *argumentPtr); + BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 10; } @@ -4162,7 +4167,7 @@ static void Cmd_playstatchangeanimation(void) } else if (changeableStatsCount != 0 && !gBattleScripting.statAnimPlayed) { - BtlController_EmitBattleAnimation(0, B_ANIM_STATS_CHANGE, statAnimId); + BtlController_EmitBattleAnimation(BUFFER_A, B_ANIM_STATS_CHANGE, statAnimId); MarkBattlerForControllerExec(gActiveBattler); if (gBattlescriptCurrInstr[3] & STAT_CHANGE_MULTIPLE_STATS && changeableStatsCount > 1) gBattleScripting.statAnimPlayed = TRUE; @@ -4226,7 +4231,7 @@ static void Cmd_moveend(void) { gBattleMons[gBattlerTarget].status1 &= ~STATUS1_FREEZE; gActiveBattler = gBattlerTarget; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBattlerTarget].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gBattlerTarget].status1), &gBattleMons[gBattlerTarget].status1); MarkBattlerForControllerExec(gActiveBattler); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_DefrostedViaFireMove; @@ -4305,7 +4310,7 @@ static void Cmd_moveend(void) && gHitMarker & HITMARKER_NO_ANIMATIONS) { gActiveBattler = gBattlerAttacker; - BtlController_EmitSpriteInvisibility(0, TRUE); + BtlController_EmitSpriteInvisibility(BUFFER_A, TRUE); MarkBattlerForControllerExec(gActiveBattler); gBattleScripting.moveendState++; return; @@ -4318,7 +4323,7 @@ static void Cmd_moveend(void) || WasUnableToUseMove(gBattlerAttacker)) { gActiveBattler = gBattlerAttacker; - BtlController_EmitSpriteInvisibility(0, FALSE); + BtlController_EmitSpriteInvisibility(BUFFER_A, FALSE); MarkBattlerForControllerExec(gActiveBattler); gStatuses3[gBattlerAttacker] &= ~STATUS3_SEMI_INVULNERABLE; gSpecialStatuses[gBattlerAttacker].restoredBattlerSprite = 1; @@ -4332,7 +4337,7 @@ static void Cmd_moveend(void) && !(gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE)) { gActiveBattler = gBattlerTarget; - BtlController_EmitSpriteInvisibility(0, FALSE); + BtlController_EmitSpriteInvisibility(BUFFER_A, FALSE); MarkBattlerForControllerExec(gActiveBattler); gStatuses3[gBattlerTarget] &= ~STATUS3_SEMI_INVULNERABLE; gBattleScripting.moveendState++; @@ -4361,7 +4366,7 @@ static void Cmd_moveend(void) gLastPrintedMoves[gBattlerAttacker] = gChosenMove; } if (!(gAbsentBattlerFlags & gBitTable[gBattlerAttacker]) - && !(gBattleStruct->field_91 & gBitTable[gBattlerAttacker]) + && !(gBattleStruct->absentBattlerFlags & gBitTable[gBattlerAttacker]) && gBattleMoves[originallyUsedMove].effect != EFFECT_BATON_PASS) { if (gHitMarker & HITMARKER_OBEYS) @@ -4398,7 +4403,7 @@ static void Cmd_moveend(void) gBattleScripting.moveendState++; break; case MOVEEND_MIRROR_MOVE: // mirror move - if (!(gAbsentBattlerFlags & gBitTable[gBattlerAttacker]) && !(gBattleStruct->field_91 & gBitTable[gBattlerAttacker]) + if (!(gAbsentBattlerFlags & gBitTable[gBattlerAttacker]) && !(gBattleStruct->absentBattlerFlags & gBitTable[gBattlerAttacker]) && gBattleMoves[originallyUsedMove].flags & FLAG_MIRROR_MOVE_AFFECTED && gHitMarker & HITMARKER_OBEYS && gBattlerAttacker != gBattlerTarget && !(gHitMarker & HITMARKER_FAINTED(gBattlerTarget)) && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) @@ -4556,7 +4561,7 @@ static void Cmd_returnatktoball(void) gActiveBattler = gBattlerAttacker; if (!(gHitMarker & HITMARKER_FAINTED(gActiveBattler))) { - BtlController_EmitReturnMonToBall(0, 0); + BtlController_EmitReturnMonToBall(BUFFER_A, FALSE); MarkBattlerForControllerExec(gActiveBattler); } gBattlescriptCurrInstr++; @@ -4571,7 +4576,7 @@ static void Cmd_getswitchedmondata(void) gBattlerPartyIndexes[gActiveBattler] = *(gBattleStruct->monToSwitchIntoId + gActiveBattler); - BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, gBitTable[gBattlerPartyIndexes[gActiveBattler]]); + BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, gBitTable[gBattlerPartyIndexes[gActiveBattler]]); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; @@ -4647,7 +4652,7 @@ static void Cmd_switchinanim(void) gAbsentBattlerFlags &= ~(gBitTable[gActiveBattler]); - BtlController_EmitSwitchInAnim(0, gBattlerPartyIndexes[gActiveBattler], gBattlescriptCurrInstr[2]); + BtlController_EmitSwitchInAnim(BUFFER_A, gBattlerPartyIndexes[gActiveBattler], gBattlescriptCurrInstr[2]); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 3; @@ -4808,15 +4813,16 @@ static void Cmd_jumpifcantswitch(void) } } -// Opens the party screen to choose a new Pokémon to send out -// slotId is the Pokémon to replace +// Opens the party screen to choose a new Pokémon to send out. +// slotId is the Pokémon to replace. +// Note that this is not used by the Switch action, only replacing fainted Pokémon or Baton Pass static void ChooseMonToSendOut(u8 slotId) { - *(gBattleStruct->field_58 + gActiveBattler) = gBattlerPartyIndexes[gActiveBattler]; + *(gBattleStruct->battlerPartyIndexes + gActiveBattler) = gBattlerPartyIndexes[gActiveBattler]; *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; gBattleStruct->field_93 &= ~(gBitTable[gActiveBattler]); - BtlController_EmitChoosePokemon(0, PARTY_ACTION_SEND_OUT, slotId, ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_SEND_OUT, slotId, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); MarkBattlerForControllerExec(gActiveBattler); } @@ -4831,9 +4837,9 @@ static void Cmd_openpartyscreen(void) flags = 0; jumpPtr = T1_READ_PTR(gBattlescriptCurrInstr + 2); - if (gBattlescriptCurrInstr[1] == BS_UNK_5) + if (gBattlescriptCurrInstr[1] == BS_FAINTED_LINK_MULTIPLE_1) { - if ((gBattleTypeFlags & (BATTLE_TYPE_DOUBLE | BATTLE_TYPE_MULTI)) != BATTLE_TYPE_DOUBLE) + if ((gBattleTypeFlags & BATTLE_TYPE_MULTI) || !(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) { for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++) { @@ -4843,46 +4849,46 @@ static void Cmd_openpartyscreen(void) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); } - else if (!gSpecialStatuses[gActiveBattler].flag40) + else if (!gSpecialStatuses[gActiveBattler].faintedHasReplacement) { ChooseMonToSendOut(PARTY_SIZE); - gSpecialStatuses[gActiveBattler].flag40 = TRUE; + gSpecialStatuses[gActiveBattler].faintedHasReplacement = TRUE; } } else { - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); } } } else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) { - u8 flag40_0, flag40_1, flag40_2, flag40_3; + bool8 hasReplacement_0, hasReplacement_1, hasReplacement_2, hasReplacement_3; hitmarkerFaintBits = gHitMarker >> 28; if (gBitTable[0] & hitmarkerFaintBits) { gActiveBattler = 0; - if (HasNoMonsToSwitch(0, PARTY_SIZE, PARTY_SIZE)) + if (HasNoMonsToSwitch(gActiveBattler, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - BtlController_EmitCantSwitch(0); + BtlController_EmitCantSwitch(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } - else if (!gSpecialStatuses[gActiveBattler].flag40) + else if (!gSpecialStatuses[gActiveBattler].faintedHasReplacement) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[2]); - gSpecialStatuses[gActiveBattler].flag40 = TRUE; + gSpecialStatuses[gActiveBattler].faintedHasReplacement = TRUE; } else { - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); flags |= 1; } @@ -4890,42 +4896,42 @@ static void Cmd_openpartyscreen(void) if (gBitTable[2] & hitmarkerFaintBits && !(gBitTable[0] & hitmarkerFaintBits)) { gActiveBattler = 2; - if (HasNoMonsToSwitch(2, PARTY_SIZE, PARTY_SIZE)) + if (HasNoMonsToSwitch(gActiveBattler, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - BtlController_EmitCantSwitch(0); + BtlController_EmitCantSwitch(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } - else if (!gSpecialStatuses[gActiveBattler].flag40) + else if (!gSpecialStatuses[gActiveBattler].faintedHasReplacement) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[0]); - gSpecialStatuses[gActiveBattler].flag40 = TRUE; + gSpecialStatuses[gActiveBattler].faintedHasReplacement = TRUE; } else if (!(flags & 1)) { - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); } } if (gBitTable[1] & hitmarkerFaintBits) { gActiveBattler = 1; - if (HasNoMonsToSwitch(1, PARTY_SIZE, PARTY_SIZE)) + if (HasNoMonsToSwitch(gActiveBattler, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - BtlController_EmitCantSwitch(0); + BtlController_EmitCantSwitch(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } - else if (!gSpecialStatuses[gActiveBattler].flag40) + else if (!gSpecialStatuses[gActiveBattler].faintedHasReplacement) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[3]); - gSpecialStatuses[gActiveBattler].flag40 = TRUE; + gSpecialStatuses[gActiveBattler].faintedHasReplacement = TRUE; } else { - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); flags |= 2; } @@ -4933,60 +4939,60 @@ static void Cmd_openpartyscreen(void) if (gBitTable[3] & hitmarkerFaintBits && !(gBitTable[1] & hitmarkerFaintBits)) { gActiveBattler = 3; - if (HasNoMonsToSwitch(3, PARTY_SIZE, PARTY_SIZE)) + if (HasNoMonsToSwitch(gActiveBattler, PARTY_SIZE, PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - BtlController_EmitCantSwitch(0); + BtlController_EmitCantSwitch(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } - else if (!gSpecialStatuses[gActiveBattler].flag40) + else if (!gSpecialStatuses[gActiveBattler].faintedHasReplacement) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[1]); - gSpecialStatuses[gActiveBattler].flag40 = TRUE; + gSpecialStatuses[gActiveBattler].faintedHasReplacement = TRUE; } else if (!(flags & 2)) { - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); } } - flag40_0 = gSpecialStatuses[0].flag40; - if (!flag40_0) + hasReplacement_0 = gSpecialStatuses[0].faintedHasReplacement; + if (!hasReplacement_0) { - flag40_2 = gSpecialStatuses[2].flag40; - if (!flag40_2 && hitmarkerFaintBits != 0) + hasReplacement_2 = gSpecialStatuses[2].faintedHasReplacement; + if (!hasReplacement_2 && hitmarkerFaintBits != 0) { if (gAbsentBattlerFlags & gBitTable[0]) gActiveBattler = 2; else gActiveBattler = 0; - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); } } - flag40_1 = gSpecialStatuses[1].flag40; - if (!flag40_1) + hasReplacement_1 = gSpecialStatuses[1].faintedHasReplacement; + if (!hasReplacement_1) { - flag40_3 = gSpecialStatuses[3].flag40; - if (!flag40_3 && hitmarkerFaintBits != 0) + hasReplacement_3 = gSpecialStatuses[3].faintedHasReplacement; + if (!hasReplacement_3 && hitmarkerFaintBits != 0) { if (gAbsentBattlerFlags & gBitTable[1]) gActiveBattler = 3; else gActiveBattler = 1; - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); } } } gBattlescriptCurrInstr += 6; } - else if (gBattlescriptCurrInstr[1] == BS_UNK_6) + else if (gBattlescriptCurrInstr[1] == BS_FAINTED_LINK_MULTIPLE_2) { if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) { @@ -4996,44 +5002,46 @@ static void Cmd_openpartyscreen(void) if (gBitTable[2] & hitmarkerFaintBits && gBitTable[0] & hitmarkerFaintBits) { gActiveBattler = 2; - if (HasNoMonsToSwitch(2, gBattleBufferB[0][1], PARTY_SIZE)) + if (HasNoMonsToSwitch(gActiveBattler, gBattleBufferB[0][1], PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - BtlController_EmitCantSwitch(0); + BtlController_EmitCantSwitch(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } - else if (!gSpecialStatuses[gActiveBattler].flag40) + else if (!gSpecialStatuses[gActiveBattler].faintedHasReplacement) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[0]); - gSpecialStatuses[gActiveBattler].flag40 = TRUE; + gSpecialStatuses[gActiveBattler].faintedHasReplacement = TRUE; } } if (gBitTable[3] & hitmarkerFaintBits && hitmarkerFaintBits & gBitTable[1]) { gActiveBattler = 3; - if (HasNoMonsToSwitch(3, gBattleBufferB[1][1], PARTY_SIZE)) + if (HasNoMonsToSwitch(gActiveBattler, gBattleBufferB[1][1], PARTY_SIZE)) { gAbsentBattlerFlags |= gBitTable[gActiveBattler]; gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - BtlController_EmitCantSwitch(0); + BtlController_EmitCantSwitch(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); } - else if (!gSpecialStatuses[gActiveBattler].flag40) + else if (!gSpecialStatuses[gActiveBattler].faintedHasReplacement) { ChooseMonToSendOut(gBattleStruct->monToSwitchIntoId[1]); - gSpecialStatuses[gActiveBattler].flag40 = TRUE; + gSpecialStatuses[gActiveBattler].faintedHasReplacement = TRUE; } } gBattlescriptCurrInstr += 6; } else { + // Not multi or double battle gBattlescriptCurrInstr += 6; } } else { + // Multi battle gBattlescriptCurrInstr += 6; } @@ -5055,7 +5063,7 @@ static void Cmd_openpartyscreen(void) hitmarkerFaintBits = PARTY_ACTION_SEND_OUT; battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1] & ~PARTY_SCREEN_OPTIONAL); - if (gSpecialStatuses[battlerId].flag40) + if (gSpecialStatuses[battlerId].faintedHasReplacement) { gBattlescriptCurrInstr += 6; } @@ -5069,16 +5077,16 @@ static void Cmd_openpartyscreen(void) else { gActiveBattler = battlerId; - *(gBattleStruct->field_58 + gActiveBattler) = gBattlerPartyIndexes[gActiveBattler]; - *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = 6; + *(gBattleStruct->battlerPartyIndexes + gActiveBattler) = gBattlerPartyIndexes[gActiveBattler]; + *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; gBattleStruct->field_93 &= ~(gBitTable[gActiveBattler]); - BtlController_EmitChoosePokemon(0, hitmarkerFaintBits, *(gBattleStruct->monToSwitchIntoId + (gActiveBattler ^ 2)), ABILITY_NONE, gBattleStruct->field_60[gActiveBattler]); + BtlController_EmitChoosePokemon(BUFFER_A, hitmarkerFaintBits, *(gBattleStruct->monToSwitchIntoId + (gActiveBattler ^ 2)), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 6; - if (GetBattlerPosition(gActiveBattler) == 0 && gBattleResults.playerSwitchesCounter < 255) + if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT && gBattleResults.playerSwitchesCounter < 255) gBattleResults.playerSwitchesCounter++; if (gBattleTypeFlags & BATTLE_TYPE_MULTI) @@ -5087,7 +5095,7 @@ static void Cmd_openpartyscreen(void) { if (gActiveBattler != battlerId) { - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); } } @@ -5098,7 +5106,7 @@ static void Cmd_openpartyscreen(void) if (gAbsentBattlerFlags & gBitTable[gActiveBattler]) gActiveBattler ^= BIT_FLANK; - BtlController_EmitLinkStandbyMsg(0, 2, FALSE); + BtlController_EmitLinkStandbyMsg(BUFFER_A, LINK_STANDBY_MSG_ONLY, FALSE); MarkBattlerForControllerExec(gActiveBattler); } } @@ -5146,13 +5154,13 @@ static void Cmd_switchhandleorder(void) if (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI) { - *(gActiveBattler * 3 + (u8*)(gBattleStruct->field_60) + 0) &= 0xF; - *(gActiveBattler * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0); - *(gActiveBattler * 3 + (u8*)(gBattleStruct->field_60) + 1) = gBattleBufferB[gActiveBattler][3]; + *(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) &= 0xF; + *(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0); + *(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 1) = gBattleBufferB[gActiveBattler][3]; - *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->field_60) + 0) &= (0xF0); - *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4; - *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBattler][3]; + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) &= (0xF0); + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4; + *((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 2) = gBattleBufferB[gActiveBattler][3]; } else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) { @@ -5180,7 +5188,7 @@ static void Cmd_switchineffects(void) UpdateSentPokesToOpponentValue(gActiveBattler); gHitMarker &= ~HITMARKER_FAINTED(gActiveBattler); - gSpecialStatuses[gActiveBattler].flag40 = FALSE; + gSpecialStatuses[gActiveBattler].faintedHasReplacement = FALSE; if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES_DAMAGED) && (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES) @@ -5235,7 +5243,7 @@ static void Cmd_switchineffects(void) *hpOnSwitchout = gBattleMons[i].hp; } - if (gBattlescriptCurrInstr[1] == BS_UNK_5) + if (gBattlescriptCurrInstr[1] == BS_FAINTED_LINK_MULTIPLE_1) { u32 hitmarkerFaintBits = gHitMarker >> 28; @@ -5257,7 +5265,7 @@ static void Cmd_switchineffects(void) static void Cmd_trainerslidein(void) { gActiveBattler = GetBattlerAtPosition(gBattlescriptCurrInstr[1]); - BtlController_EmitTrainerSlide(0); + BtlController_EmitTrainerSlide(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; @@ -5266,7 +5274,7 @@ static void Cmd_trainerslidein(void) static void Cmd_playse(void) { gActiveBattler = gBattlerAttacker; - BtlController_EmitPlaySE(0, T2_READ_16(gBattlescriptCurrInstr + 1)); + BtlController_EmitPlaySE(BUFFER_A, T2_READ_16(gBattlescriptCurrInstr + 1)); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 3; @@ -5275,7 +5283,7 @@ static void Cmd_playse(void) static void Cmd_fanfare(void) { gActiveBattler = gBattlerAttacker; - BtlController_EmitPlayFanfareOrBGM(0, T2_READ_16(gBattlescriptCurrInstr + 1), FALSE); + BtlController_EmitPlayFanfareOrBGM(BUFFER_A, T2_READ_16(gBattlescriptCurrInstr + 1), FALSE); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 3; @@ -5284,7 +5292,7 @@ static void Cmd_fanfare(void) static void Cmd_playfaintcry(void) { gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - BtlController_EmitFaintingCry(0); + BtlController_EmitFaintingCry(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; @@ -5293,7 +5301,7 @@ static void Cmd_playfaintcry(void) static void Cmd_endlinkbattle(void) { gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT); - BtlController_EmitEndLinkBattle(0, gBattleOutcome); + BtlController_EmitEndLinkBattle(BUFFER_A, gBattleOutcome); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 1; @@ -5302,7 +5310,7 @@ static void Cmd_endlinkbattle(void) static void Cmd_returntoball(void) { gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - BtlController_EmitReturnMonToBall(0, 1); + BtlController_EmitReturnMonToBall(BUFFER_A, TRUE); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; @@ -5521,7 +5529,7 @@ static void Cmd_hitanimation(void) } else if (!(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE) || !(gBattleMons[gActiveBattler].status2 & STATUS2_SUBSTITUTE) || gDisableStructs[gActiveBattler].substituteHP == 0) { - BtlController_EmitHitAnimation(0); + BtlController_EmitHitAnimation(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; } @@ -5600,14 +5608,15 @@ static void Cmd_getmoneyreward(void) gBattlescriptCurrInstr++; } -static void Cmd_unknown_5E(void) +// Command is never used +static void Cmd_updatebattlermoves(void) { gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); switch (gBattleCommunication[0]) { case 0: - BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0); + BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, 0); MarkBattlerForControllerExec(gActiveBattler); gBattleCommunication[0]++; break; @@ -5680,7 +5689,7 @@ static void Cmd_drawpartystatussummary(void) } } - BtlController_EmitDrawPartyStatusSummary(0, hpStatuses, 1); + BtlController_EmitDrawPartyStatusSummary(BUFFER_A, hpStatuses, 1); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; @@ -5689,7 +5698,7 @@ static void Cmd_drawpartystatussummary(void) static void Cmd_hidepartystatussummary(void) { gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - BtlController_EmitHidePartyStatusSummary(0); + BtlController_EmitHidePartyStatusSummary(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; @@ -5714,7 +5723,7 @@ static void Cmd_statusanimation(void) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) { - BtlController_EmitStatusAnimation(0, FALSE, gBattleMons[gActiveBattler].status1); + BtlController_EmitStatusAnimation(BUFFER_A, FALSE, gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); } gBattlescriptCurrInstr += 2; @@ -5733,7 +5742,7 @@ static void Cmd_status2animation(void) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) { - BtlController_EmitStatusAnimation(0, TRUE, gBattleMons[gActiveBattler].status2 & wantedToAnimate); + BtlController_EmitStatusAnimation(BUFFER_A, TRUE, gBattleMons[gActiveBattler].status2 & wantedToAnimate); MarkBattlerForControllerExec(gActiveBattler); } gBattlescriptCurrInstr += 6; @@ -5752,7 +5761,7 @@ static void Cmd_chosenstatusanimation(void) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) { - BtlController_EmitStatusAnimation(0, gBattlescriptCurrInstr[2], wantedStatus); + BtlController_EmitStatusAnimation(BUFFER_A, gBattlescriptCurrInstr[2], wantedStatus); MarkBattlerForControllerExec(gActiveBattler); } gBattlescriptCurrInstr += 7; @@ -5862,7 +5871,7 @@ static void Cmd_removeitem(void) *usedHeldItem = gBattleMons[gActiveBattler].item; gBattleMons[gActiveBattler].item = 0; - BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gActiveBattler].item); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].item), &gBattleMons[gActiveBattler].item); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; @@ -6171,7 +6180,7 @@ static void Cmd_setatktoplayer0(void) static void Cmd_makevisible(void) { gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - BtlController_EmitSpriteInvisibility(0, FALSE); + BtlController_EmitSpriteInvisibility(BUFFER_A, FALSE); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; @@ -6382,7 +6391,7 @@ static void Cmd_various(void) gDisableStructs[1].truantSwitchInHack = 1; break; case VARIOUS_EMIT_YESNOBOX: - BtlController_EmitYesNoBox(0); + BtlController_EmitYesNoBox(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); break; case VARIOUS_DRAW_ARENA_REF_TEXT_BOX: @@ -6407,7 +6416,7 @@ static void Cmd_various(void) gActiveBattler = 1; if (gBattleMons[gActiveBattler].hp != 0) { - BtlController_EmitReturnMonToBall(0, 0); + BtlController_EmitReturnMonToBall(BUFFER_A, FALSE); MarkBattlerForControllerExec(gActiveBattler); } break; @@ -6417,7 +6426,7 @@ static void Cmd_various(void) gActiveBattler = 3; if (gBattleMons[gActiveBattler].hp != 0) { - BtlController_EmitReturnMonToBall(0, 0); + BtlController_EmitReturnMonToBall(BUFFER_A, FALSE); MarkBattlerForControllerExec(gActiveBattler); } } @@ -6442,7 +6451,7 @@ static void Cmd_various(void) gBattleOutcome = B_OUTCOME_MON_TELEPORTED; break; case VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC: - BtlController_EmitPlayFanfareOrBGM(0, MUS_VICTORY_TRAINER, TRUE); + BtlController_EmitPlayFanfareOrBGM(BUFFER_A, MUS_VICTORY_TRAINER, TRUE); MarkBattlerForControllerExec(gActiveBattler); break; } @@ -6500,7 +6509,7 @@ static void Cmd_faintifabilitynotdamp(void) { gActiveBattler = gBattlerAttacker; gBattleMoveDamage = gBattleMons[gActiveBattler].hp; - BtlController_EmitHealthBarUpdate(0, INSTANT_HP_BAR_DROP); + BtlController_EmitHealthBarUpdate(BUFFER_A, INSTANT_HP_BAR_DROP); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr++; @@ -6527,7 +6536,7 @@ static void Cmd_setatkhptozero(void) gActiveBattler = gBattlerAttacker; gBattleMons[gActiveBattler].hp = 0; - BtlController_EmitSetMonData(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBattler].hp); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HP_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].hp), &gBattleMons[gActiveBattler].hp); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr++; @@ -6725,7 +6734,7 @@ static void Cmd_trysetrest(void) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_REST; gBattleMons[gBattlerTarget].status1 = STATUS1_SLEEP_TURN(3); - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 5; } @@ -7119,7 +7128,7 @@ static bool8 TryDoForceSwitchOut(void) { if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) { - *(gBattleStruct->field_58 + gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget]; + *(gBattleStruct->battlerPartyIndexes + gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget]; } else { @@ -7129,7 +7138,7 @@ static bool8 TryDoForceSwitchOut(void) gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); return FALSE; } - *(gBattleStruct->field_58 + gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget]; + *(gBattleStruct->battlerPartyIndexes + gBattlerTarget) = gBattlerPartyIndexes[gBattlerTarget]; } gBattlescriptCurrInstr = BattleScript_SuccessForceOut; @@ -7611,7 +7620,7 @@ static void Cmd_updatestatusicon(void) if (gBattlescriptCurrInstr[1] != BS_ATTACKER_WITH_PARTNER) { gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - BtlController_EmitStatusIconUpdate(0, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2); + BtlController_EmitStatusIconUpdate(BUFFER_A, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; } @@ -7620,7 +7629,7 @@ static void Cmd_updatestatusicon(void) gActiveBattler = gBattlerAttacker; if (!(gAbsentBattlerFlags & gBitTable[gActiveBattler])) { - BtlController_EmitStatusIconUpdate(0, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2); + BtlController_EmitStatusIconUpdate(BUFFER_A, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2); MarkBattlerForControllerExec(gActiveBattler); } if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) @@ -7628,7 +7637,7 @@ static void Cmd_updatestatusicon(void) gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK); if (!(gAbsentBattlerFlags & gBitTable[gActiveBattler])) { - BtlController_EmitStatusIconUpdate(0, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2); + BtlController_EmitStatusIconUpdate(BUFFER_A, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2); MarkBattlerForControllerExec(gActiveBattler); } } @@ -7706,7 +7715,7 @@ static void Cmd_transformdataexecution(void) } gActiveBattler = gBattlerAttacker; - BtlController_EmitResetActionMoveSelection(0, RESET_MOVE_SELECTION); + BtlController_EmitResetActionMoveSelection(BUFFER_A, RESET_MOVE_SELECTION); MarkBattlerForControllerExec(gActiveBattler); gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TRANSFORMED; } @@ -8075,7 +8084,7 @@ static void Cmd_copymovepermanently(void) // sketch } movePpData.ppBonuses = gBattleMons[gBattlerAttacker].ppBonuses; - BtlController_EmitSetMonData(0, REQUEST_MOVES_PP_BATTLE, 0, sizeof(struct MovePpInfo), &movePpData); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_MOVES_PP_BATTLE, 0, sizeof(movePpData), &movePpData); MarkBattlerForControllerExec(gActiveBattler); PREPARE_MOVE_BUFFER(gBattleTextBuff1, gLastPrintedMoves[gBattlerTarget]) @@ -8241,7 +8250,7 @@ static void Cmd_tryspiteppreduce(void) if (!(gDisableStructs[gActiveBattler].mimickedMoves & gBitTable[i]) && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED)) { - BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + i, 0, 1, &gBattleMons[gActiveBattler].pp[i]); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_PPMOVE1_BATTLE + i, 0, sizeof(gBattleMons[gActiveBattler].pp[i]), &gBattleMons[gActiveBattler].pp[i]); MarkBattlerForControllerExec(gActiveBattler); } @@ -8352,7 +8361,7 @@ static void Cmd_healpartystatus(void) if (toHeal) { gActiveBattler = gBattlerAttacker; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, toHeal, 4, &zero); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, toHeal, sizeof(zero), &zero); MarkBattlerForControllerExec(gActiveBattler); } @@ -8958,7 +8967,7 @@ static void Cmd_jumpifattackandspecialattackcannotfall(void) // memento { gActiveBattler = gBattlerAttacker; gBattleMoveDamage = gBattleMons[gActiveBattler].hp; - BtlController_EmitHealthBarUpdate(0, INSTANT_HP_BAR_DROP); + BtlController_EmitHealthBarUpdate(BUFFER_A, INSTANT_HP_BAR_DROP); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 5; } @@ -8995,7 +9004,7 @@ static void Cmd_cureifburnedparalysedorpoisoned(void) // refresh gBattleMons[gBattlerAttacker].status1 = 0; gBattlescriptCurrInstr += 5; gActiveBattler = gBattlerAttacker; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].status1), &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); } else @@ -9112,15 +9121,15 @@ static void Cmd_tryswapitems(void) // trick oldItemAtk = gBattleMons[gBattlerAttacker].item; *newItemAtk = gBattleMons[gBattlerTarget].item; - gBattleMons[gBattlerAttacker].item = 0; + gBattleMons[gBattlerAttacker].item = ITEM_NONE; gBattleMons[gBattlerTarget].item = oldItemAtk; gActiveBattler = gBattlerAttacker; - BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, newItemAtk); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(*newItemAtk), newItemAtk); MarkBattlerForControllerExec(gBattlerAttacker); gActiveBattler = gBattlerTarget; - BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBattlerTarget].item); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gBattlerTarget].item), &gBattleMons[gBattlerTarget].item); MarkBattlerForControllerExec(gBattlerTarget); *(u8*)((u8*)(&gBattleStruct->choicedMove[gBattlerTarget]) + 0) = 0; @@ -9134,9 +9143,9 @@ static void Cmd_tryswapitems(void) // trick PREPARE_ITEM_BUFFER(gBattleTextBuff1, *newItemAtk) PREPARE_ITEM_BUFFER(gBattleTextBuff2, oldItemAtk) - if (oldItemAtk != 0 && *newItemAtk != 0) + if (oldItemAtk != ITEM_NONE && *newItemAtk != ITEM_NONE) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_BOTH; // attacker's item -> <- target's item - else if (oldItemAtk == 0 && *newItemAtk != 0) + else if (oldItemAtk == ITEM_NONE && *newItemAtk != ITEM_NONE) gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_TAKEN; // nothing -> <- target's item else gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_GIVEN; // attacker's item -> <- nothing @@ -9462,7 +9471,10 @@ static void Cmd_switchoutabilities(void) { case ABILITY_NATURAL_CURE: gBattleMons[gActiveBattler].status1 = 0; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, gBitTable[*(gBattleStruct->field_58 + gActiveBattler)], 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, + gBitTable[*(gBattleStruct->battlerPartyIndexes + gActiveBattler)], + sizeof(gBattleMons[gActiveBattler].status1), + &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); break; } @@ -9599,7 +9611,7 @@ static void Cmd_docastformchangeanimation(void) if (gBattleMons[gActiveBattler].status2 & STATUS2_SUBSTITUTE) *(&gBattleStruct->formToChangeInto) |= CASTFORM_SUBSTITUTE; - BtlController_EmitBattleAnimation(0, B_ANIM_CASTFORM_CHANGE, gBattleStruct->formToChangeInto); + BtlController_EmitBattleAnimation(BUFFER_A, B_ANIM_CASTFORM_CHANGE, gBattleStruct->formToChangeInto); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr++; @@ -9680,7 +9692,7 @@ static void Cmd_tryrecycleitem(void) *usedHeldItem = ITEM_NONE; gBattleMons[gActiveBattler].item = gLastUsedItem; - BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gActiveBattler].item); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].item), &gBattleMons[gActiveBattler].item); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 5; @@ -9775,13 +9787,13 @@ static void Cmd_handleballthrow(void) if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) { - BtlController_EmitBallThrowAnim(0, BALL_TRAINER_BLOCK); + BtlController_EmitBallThrowAnim(BUFFER_A, BALL_TRAINER_BLOCK); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr = BattleScript_TrainerBallBlock; } else if (gBattleTypeFlags & BATTLE_TYPE_WALLY_TUTORIAL) { - BtlController_EmitBallThrowAnim(0, BALL_3_SHAKES_SUCCESS); + BtlController_EmitBallThrowAnim(BUFFER_A, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr = BattleScript_WallyBallThrow; } @@ -9867,7 +9879,7 @@ static void Cmd_handleballthrow(void) if (odds > 254) // mon caught { - BtlController_EmitBallThrowAnim(0, BALL_3_SHAKES_SUCCESS); + BtlController_EmitBallThrowAnim(BUFFER_A, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); @@ -9889,7 +9901,7 @@ static void Cmd_handleballthrow(void) if (gLastUsedItem == ITEM_MASTER_BALL) shakes = BALL_3_SHAKES_SUCCESS; // why calculate the shakes before that check? - BtlController_EmitBallThrowAnim(0, shakes); + BtlController_EmitBallThrowAnim(BUFFER_A, shakes); MarkBattlerForControllerExec(gActiveBattler); if (shakes == BALL_3_SHAKES_SUCCESS) // mon caught, copy of the code above @@ -10178,7 +10190,7 @@ static void Cmd_finishturn(void) static void Cmd_trainerslideout(void) { gActiveBattler = GetBattlerAtPosition(gBattlescriptCurrInstr[1]); - BtlController_EmitTrainerSlideBack(0); + BtlController_EmitTrainerSlideBack(BUFFER_A); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 2; diff --git a/src/battle_util.c b/src/battle_util.c index ac2fbd34fe..6bb6d9ae4a 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -82,7 +82,7 @@ void HandleAction_UseMove(void) gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber]; - if (*(&gBattleStruct->field_91) & gBitTable[gBattlerAttacker]) + if (*(&gBattleStruct->absentBattlerFlags) & gBitTable[gBattlerAttacker]) { gCurrentActionFuncId = B_ACTION_FINISHED; return; @@ -299,7 +299,7 @@ void HandleAction_Switch(void) gActionSelectionCursor[gBattlerAttacker] = 0; gMoveSelectionCursor[gBattlerAttacker] = 0; - PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBattlerAttacker, *(gBattleStruct->field_58 + gBattlerAttacker)) + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBattlerAttacker, *(gBattleStruct->battlerPartyIndexes + gBattlerAttacker)) gBattleScripting.battler = gBattlerAttacker; gBattlescriptCurrInstr = BattleScript_ActionSwitch; @@ -708,11 +708,11 @@ u8 GetBattlerForBattleScript(u8 caseId) case BS_FAINTED: ret = gBattlerFainted; break; - case BS_UNK_5: + case BS_FAINTED_LINK_MULTIPLE_1: ret = gBattlerFainted; break; case BS_ATTACKER_WITH_PARTNER: - case BS_UNK_6: + case BS_FAINTED_LINK_MULTIPLE_2: case BS_ATTACKER_SIDE: case BS_NOT_ATTACKER_SIDE: case BS_PLAYER1: @@ -753,7 +753,7 @@ void PressurePPLose(u8 target, u8 attacker, u16 move) if (MOVE_IS_PERMANENT(attacker, moveIndex)) { gActiveBattler = attacker; - BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + moveIndex, 0, 1, &gBattleMons[gActiveBattler].pp[moveIndex]); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_PPMOVE1_BATTLE + moveIndex, 0, 1, &gBattleMons[gActiveBattler].pp[moveIndex]); MarkBattlerForControllerExec(gActiveBattler); } } @@ -785,7 +785,7 @@ void PressurePPLoseOnUsingImprison(u8 attacker) if (imprisonPos != MAX_MON_MOVES && MOVE_IS_PERMANENT(attacker, imprisonPos)) { gActiveBattler = attacker; - BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisonPos, 0, 1, &gBattleMons[gActiveBattler].pp[imprisonPos]); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_PPMOVE1_BATTLE + imprisonPos, 0, 1, &gBattleMons[gActiveBattler].pp[imprisonPos]); MarkBattlerForControllerExec(gActiveBattler); } } @@ -816,7 +816,7 @@ void PressurePPLoseOnUsingPerishSong(u8 attacker) if (perishSongPos != MAX_MON_MOVES && MOVE_IS_PERMANENT(attacker, perishSongPos)) { gActiveBattler = attacker; - BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + perishSongPos, 0, 1, &gBattleMons[gActiveBattler].pp[perishSongPos]); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_PPMOVE1_BATTLE + perishSongPos, 0, 1, &gBattleMons[gActiveBattler].pp[perishSongPos]); MarkBattlerForControllerExec(gActiveBattler); } } @@ -887,7 +887,7 @@ bool8 WasUnableToUseMove(u8 battler) void PrepareStringBattle(u16 stringId, u8 battler) { gActiveBattler = battler; - BtlController_EmitPrintString(0, stringId); + BtlController_EmitPrintString(BUFFER_A, stringId); MarkBattlerForControllerExec(gActiveBattler); } @@ -1616,7 +1616,7 @@ u8 DoBattlerEndTurnEffects(void) gBattleCommunication[MULTISTRING_CHOOSER] = 1; BattleScriptExecute(BattleScript_MonWokeUpInUproar); gActiveBattler = gBattlerAttacker; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); break; } @@ -1741,7 +1741,7 @@ u8 DoBattlerEndTurnEffects(void) { CancelMultiTurnMoves(gActiveBattler); gBattleMons[gActiveBattler].status1 |= STATUS1_SLEEP_TURN((Random() & 3) + 2); // 2-5 turns of sleep - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); gEffectBattler = gActiveBattler; BattleScriptExecute(BattleScript_YawnMakesAsleep); @@ -2251,7 +2251,7 @@ u8 AtkCanceller_UnableToUseMove(void) if (effect == 2) { gActiveBattler = gBattlerAttacker; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); } return effect; @@ -2615,7 +2615,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA gBattleMons[battler].status2 &= ~STATUS2_NIGHTMARE; // fix nightmare glitch gBattleScripting.battler = gActiveBattler = battler; BattleScriptPushCursorAndCallback(BattleScript_ShedSkinActivates); - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[battler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[battler].status1); MarkBattlerForControllerExec(gActiveBattler); effect++; } @@ -2926,7 +2926,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA gBattlescriptCurrInstr = BattleScript_AbilityCuredStatus; gBattleScripting.battler = battler; gActiveBattler = battler; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); return effect; } @@ -3354,7 +3354,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) PREPARE_MOVE_BUFFER(gBattleTextBuff1, move); BattleScriptExecute(BattleScript_BerryPPHealEnd2); - BtlController_EmitSetMonData(0, i + REQUEST_PPMOVE1_BATTLE, 0, 1, &changedPP); + BtlController_EmitSetMonData(BUFFER_A, i + REQUEST_PPMOVE1_BATTLE, 0, 1, &changedPP); MarkBattlerForControllerExec(gActiveBattler); effect = ITEM_PP_CHANGE; } @@ -3589,7 +3589,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) switch (effect) { case ITEM_STATUS_CHANGE: - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[battlerId].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[battlerId].status1); MarkBattlerForControllerExec(gActiveBattler); break; case ITEM_PP_CHANGE: @@ -3740,7 +3740,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gBattleScripting.battler = battlerId; gPotentialItemEffectBattler = battlerId; gActiveBattler = battlerId; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); break; } diff --git a/src/battle_util2.c b/src/battle_util2.c index 794b4f36af..767e314927 100644 --- a/src/battle_util2.c +++ b/src/battle_util2.c @@ -108,16 +108,13 @@ void SwitchPartyOrderInGameMulti(u8 battlerId, u8 arg1) if (GetBattlerSide(battlerId) != B_SIDE_OPPONENT) { s32 i; - - // gBattleStruct->field_60[0][i] - for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) - gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8*)(gBattleStruct->field_60)); + gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)); SwitchPartyMonSlots(GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battlerId]), GetPartyIdFromBattlePartyId(arg1)); for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++) - *(0 * 3 + i + (u8*)(gBattleStruct->field_60)) = gBattlePartyCurrentOrder[i]; + *(0 * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i]; } } @@ -207,7 +204,7 @@ u32 BattlePalace_TryEscapeStatus(u8 battlerId) if (effect == 2) { gActiveBattler = battlerId; - BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); + BtlController_EmitSetMonData(BUFFER_A, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); } diff --git a/src/party_menu.c b/src/party_menu.c index a55d397d2e..b4ff08313f 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5840,7 +5840,7 @@ static void BufferBattlePartyOrder(u8 *partyBattleOrder, u8 flankId) void BufferBattlePartyCurrentOrderBySide(u8 battlerId, u8 flankId) { - BufferBattlePartyOrderBySide(gBattleStruct->field_60[battlerId], flankId, battlerId); + BufferBattlePartyOrderBySide(gBattleStruct->battlerPartyOrders[battlerId], flankId, battlerId); } // when GetBattlerSide(battlerId) == B_SIDE_PLAYER, this function is identical the one above @@ -5920,8 +5920,8 @@ void SwitchPartyOrderLinkMulti(u8 battlerId, u8 slot, u8 slot2) if (IsMultiBattle()) { - partyBattleOrder = gBattleStruct->field_60[battlerId]; - for (i = j = 0; i < 3; j++, i++) + partyBattleOrder = gBattleStruct->battlerPartyOrders[battlerId]; + for (i = j = 0; i < PARTY_SIZE / 2; j++, i++) { partyIds[j] = partyBattleOrder[i] >> 4; j++; diff --git a/src/pokemon.c b/src/pokemon.c index f4ca3f4c10..6e3d37ae39 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5042,7 +5042,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov temp2 = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitGetMonData(0, REQUEST_ALL_BATTLE, 0); + BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, 0); MarkBattlerForControllerExec(gActiveBattler); gActiveBattler = temp2; } From def6cc8158c09f3458866f1fa5983e58022c4101 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 13 Oct 2021 16:39:21 -0400 Subject: [PATCH 056/417] Label battle script macro arguments --- asm/macros/battle_script.inc | 437 +++++++++++---------- data/battle_scripts_1.s | 132 +++---- include/battle.h | 20 +- include/battle_script_commands.h | 1 + include/constants/battle_script_commands.h | 75 ++-- src/battle_script_commands.c | 104 +++-- 6 files changed, 386 insertions(+), 383 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 4b9e0bfdf1..73b3beca0b 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -3,10 +3,10 @@ .byte 0x0 .endm - .macro accuracycheck param0:req, param1:req + .macro accuracycheck failPtr:req, move:req .byte 0x1 - .4byte \param0 - .2byte \param1 + .4byte \failPtr + .2byte \move .endm .macro attackstring @@ -77,9 +77,9 @@ .2byte \id .endm - .macro waitmessage param0:req + .macro waitmessage time:req .byte 0x12 - .2byte \param0 + .2byte \time .endm .macro printfromtable ptr:req @@ -109,10 +109,17 @@ .byte \battler .endm - .macro tryfaintmon battler:req, param1:req, ptr:req + .macro tryfaintmon battler:req .byte 0x19 .byte \battler - .byte \param1 + .byte FALSE + .4byte NULL + .endm + + .macro tryfaintmon_spikes battler:req, ptr:req + .byte 0x19 + .byte \battler + .byte TRUE .4byte \ptr .endm @@ -140,9 +147,9 @@ .4byte \ptr .endm - .macro jumpifability param0:req, ability:req, ptr:req + .macro jumpifability battler:req, ability:req, ptr:req .byte 0x1e - .byte \param0 + .byte \battler .byte \ability .4byte \ptr .endm @@ -163,11 +170,11 @@ .4byte \ptr .endm - .macro jumpifstatus3condition battler:req, status3:req, param2:req, ptr:req + .macro jumpifstatus3condition battler:req, status3:req, condition:req, ptr:req .byte 0x21 .byte \battler .4byte \status3 - .byte \param2 + .byte \condition .4byte \ptr .endm @@ -207,118 +214,118 @@ .4byte \ptr .endm - .macro jumpifbyte ifflag:req, param1:req, param2:req, param3:req + .macro jumpifbyte ifflag:req, val:req, byte:req, ptr:req .byte 0x29 .byte \ifflag - .4byte \param1 - .byte \param2 - .4byte \param3 + .4byte \val + .byte \byte + .4byte \ptr .endm - .macro jumpifhalfword ifflag:req, param1:req, param2:req, param3:req + .macro jumpifhalfword ifflag:req, val:req, hword:req, ptr:req .byte 0x2a .byte \ifflag - .4byte \param1 - .2byte \param2 - .4byte \param3 + .4byte \val + .2byte \hword + .4byte \ptr .endm - .macro jumpifword ifflag:req, param1:req, param2:req, param3:req + .macro jumpifword ifflag:req, val:req, word:req, ptr:req .byte 0x2b .byte \ifflag - .4byte \param1 - .4byte \param2 - .4byte \param3 + .4byte \val + .4byte \word + .4byte \ptr .endm - .macro jumpifarrayequal param0:req, param1:req, param2:req, param3:req + .macro jumpifarrayequal val1:req, val2:req, size:req, ptr:req .byte 0x2c - .4byte \param0 - .4byte \param1 - .byte \param2 - .4byte \param3 + .4byte \val1 + .4byte \val2 + .byte \size + .4byte \ptr .endm - .macro jumpifarraynotequal param0:req, param1:req, param2:req, param3:req + .macro jumpifarraynotequal val1:req, val2:req, size:req, ptr:req .byte 0x2d - .4byte \param0 - .4byte \param1 - .byte \param2 - .4byte \param3 + .4byte \val1 + .4byte \val2 + .byte \size + .4byte \ptr .endm - .macro setbyte ptr:req, param1:req + .macro setbyte ptr:req, byte:req .byte 0x2e .4byte \ptr - .byte \param1 + .byte \byte .endm - .macro addbyte ptr:req, param1:req + .macro addbyte ptr:req, byte:req .byte 0x2f .4byte \ptr - .byte \param1 + .byte \byte .endm - .macro subbyte ptr:req, param1:req + .macro subbyte ptr:req, byte:req .byte 0x30 .4byte \ptr - .byte \param1 + .byte \byte .endm - .macro copyarray param0:req, param1:req, param2:req + .macro copyarray dest:req, src:req, size:req .byte 0x31 - .4byte \param0 - .4byte \param1 - .byte \param2 + .4byte \dest + .4byte \src + .byte \size .endm - .macro copyarraywithindex param0:req, param1:req, param2:req, param3:req + .macro copyarraywithindex dest:req, src:req, index:req, size:req .byte 0x32 - .4byte \param0 - .4byte \param1 - .4byte \param2 - .byte \param3 + .4byte \dest + .4byte \src + .4byte \index + .byte \size .endm - .macro orbyte ptr:req, param1:req + .macro orbyte ptr:req, byte:req .byte 0x33 .4byte \ptr - .byte \param1 + .byte \byte .endm - .macro orhalfword ptr:req, param1:req + .macro orhalfword ptr:req, hword:req .byte 0x34 .4byte \ptr - .2byte \param1 + .2byte \hword .endm - .macro orword ptr:req, param1:req + .macro orword ptr:req, word:req .byte 0x35 .4byte \ptr - .4byte \param1 + .4byte \word .endm - .macro bicbyte ptr:req, param1:req + .macro bicbyte ptr:req, byte:req .byte 0x36 .4byte \ptr - .byte \param1 + .byte \byte .endm - .macro bichalfword ptr:req, param1:req + .macro bichalfword ptr:req, hword:req .byte 0x37 .4byte \ptr - .2byte \param1 + .2byte \hword .endm - .macro bicword ptr:req, param1:req + .macro bicword ptr:req, word:req .byte 0x38 .4byte \ptr - .4byte \param1 + .4byte \word .endm - .macro pause param0:req + .macro pause time:req .byte 0x39 - .2byte \param0 + .2byte \time .endm .macro waitstate @@ -373,18 +380,18 @@ .byte 0x44 .endm - .macro playanimation battler:req, param1:req, param2:req + .macro playanimation battler:req, animType:req, arg=NULL .byte 0x45 .byte \battler - .byte \param1 - .4byte \param2 + .byte \animType + .4byte \arg .endm - .macro playanimation2 battler:req, param1:req, param2:req + .macro playanimation_var battler:req, animType:req, arg=NULL .byte 0x46 .byte \battler - .4byte \param1 - .4byte \param2 + .4byte \animType + .4byte \arg .endm .macro setgraphicalstatchangevalues @@ -398,10 +405,10 @@ .byte \statchange .endm - .macro moveend param0:req, param1:req + .macro moveend endMode:req, endState:req .byte 0x49 - .byte \param0 - .byte \param1 + .byte \endMode + .byte \endState .endm @ Help macros for 5 uses of moveend command @@ -466,16 +473,16 @@ .4byte \ptr .endm - .macro openpartyscreen param0:req, param1:req + .macro openpartyscreen battler:req, ptr:req .byte 0x50 - .byte \param0 - .4byte \param1 + .byte \battler + .4byte \ptr .endm - .macro switchhandleorder battler:req, param1:req + .macro switchhandleorder battler:req, state:req .byte 0x51 .byte \battler - .byte \param1 + .byte \state .endm .macro switchineffects battler:req @@ -488,14 +495,14 @@ .byte \battler .endm - .macro playse param0:req + .macro playse song:req .byte 0x54 - .2byte \param0 + .2byte \song .endm - .macro fanfare param0:req + .macro fanfare song:req .byte 0x55 - .2byte \param0 + .2byte \song .endm .macro playfaintcry battler:req @@ -512,21 +519,21 @@ .byte \battler .endm - .macro handlelearnnewmove param0:req, param1:req, param2:req + .macro handlelearnnewmove learnedMovePtr:req, nothingToLearnPtr:req, isFirstMove:req .byte 0x59 - .4byte \param0 - .4byte \param1 - .byte \param2 + .4byte \learnedMovePtr + .4byte \nothingToLearnPtr + .byte \isFirstMove .endm - .macro yesnoboxlearnmove param0:req + .macro yesnoboxlearnmove forgotMovePtr:req .byte 0x5a - .4byte \param0 + .4byte \forgotMovePtr .endm - .macro yesnoboxstoplearningmove param0:req + .macro yesnoboxstoplearningmove noPtr:req .byte 0x5b - .4byte \param0 + .4byte \noPtr .endm .macro hitanimation battler:req @@ -547,9 +554,9 @@ .byte 0x5f .endm - .macro incrementgamestat param0:req + .macro incrementgamestat stat:req .byte 0x60 - .byte \param0 + .byte \stat .endm .macro drawpartystatussummary battler:req @@ -562,9 +569,9 @@ .byte \battler .endm - .macro jumptocalledmove param0:req + .macro jumptocalledmove notChosenMove:req .byte 0x63 - .byte \param0 + .byte \notChosenMove .endm .macro statusanimation battler:req @@ -578,11 +585,11 @@ .4byte \status2 .endm - .macro chosenstatusanimation battler:req, param1:req, param2:req + .macro chosenstatusanimation battler:req, isStatus2:req, status:req .byte 0x66 .byte \battler - .byte \param1 - .4byte \param2 + .byte \isStatus2 + .4byte \status .endm .macro yesnobox @@ -651,10 +658,10 @@ .byte 0x75 .endm - .macro various battler:req, param1:req + .macro various battler:req, id:req .byte 0x76 .byte \battler - .byte \param1 + .byte \id .endm .macro setprotectlike @@ -674,9 +681,9 @@ .4byte \ptr .endm - .macro tryhealhalfhealth param0:req, battler:req + .macro tryhealhalfhealth ptr:req, battler:req .byte 0x7b - .4byte \param0 + .4byte \ptr .byte \battler .endm @@ -696,14 +703,14 @@ .byte 0x7f .endm - .macro manipulatedamage param0:req + .macro manipulatedamage mode:req .byte 0x80 - .byte \param0 + .byte \mode .endm - .macro trysetrest param0:req + .macro trysetrest ptr:req .byte 0x81 - .4byte \param0 + .4byte \ptr .endm .macro jumpifnotfirstturn ptr:req @@ -715,23 +722,23 @@ .byte 0x83 .endm - .macro jumpifcantmakeasleep param0:req + .macro jumpifcantmakeasleep ptr:req .byte 0x84 - .4byte \param0 + .4byte \ptr .endm .macro stockpile .byte 0x85 .endm - .macro stockpiletobasedamage param0:req + .macro stockpiletobasedamage ptr:req .byte 0x86 - .4byte \param0 + .4byte \ptr .endm - .macro stockpiletohpheal param0:req + .macro stockpiletohpheal ptr:req .byte 0x87 - .4byte \param0 + .4byte \ptr .endm .macro negativedamage @@ -756,23 +763,23 @@ .byte 0x8c .endm - .macro setmultihitcounter param0:req + .macro setmultihitcounter val:req .byte 0x8d - .byte \param0 + .byte \val .endm .macro initmultihitstring .byte 0x8e .endm - .macro forcerandomswitch param0:req + .macro forcerandomswitch ptr:req .byte 0x8f - .4byte \param0 + .4byte \ptr .endm - .macro tryconversiontypechange param0:req + .macro tryconversiontypechange ptr:req .byte 0x90 - .4byte \param0 + .4byte \ptr .endm .macro givepaydaymoney @@ -783,9 +790,9 @@ .byte 0x92 .endm - .macro tryKO param0:req + .macro tryKO ptr:req .byte 0x93 - .4byte \param0 + .4byte \ptr .endm .macro damagetohalftargethp @@ -800,9 +807,9 @@ .byte 0x96 .endm - .macro tryinfatuating param0:req + .macro tryinfatuating ptr:req .byte 0x97 - .4byte \param0 + .4byte \ptr .endm .macro updatestatusicon battler:req @@ -826,9 +833,9 @@ .byte 0x9c .endm - .macro mimicattackcopy param0:req + .macro mimicattackcopy ptr:req .byte 0x9d - .4byte \param0 + .4byte \ptr .endm .macro metronome @@ -843,48 +850,48 @@ .byte 0xa0 .endm - .macro counterdamagecalculator param0:req + .macro counterdamagecalculator ptr:req .byte 0xa1 - .4byte \param0 + .4byte \ptr .endm - .macro mirrorcoatdamagecalculator param0:req + .macro mirrorcoatdamagecalculator ptr:req .byte 0xa2 - .4byte \param0 + .4byte \ptr .endm - .macro disablelastusedattack param0:req + .macro disablelastusedattack ptr:req .byte 0xa3 - .4byte \param0 + .4byte \ptr .endm - .macro trysetencore param0:req + .macro trysetencore ptr:req .byte 0xa4 - .4byte \param0 + .4byte \ptr .endm - .macro painsplitdmgcalc param0:req + .macro painsplitdmgcalc ptr:req .byte 0xa5 - .4byte \param0 + .4byte \ptr .endm - .macro settypetorandomresistance param0:req + .macro settypetorandomresistance ptr:req .byte 0xa6 - .4byte \param0 + .4byte \ptr .endm .macro setalwayshitflag .byte 0xa7 .endm - .macro copymovepermanently param0:req + .macro copymovepermanently ptr:req .byte 0xa8 - .4byte \param0 + .4byte \ptr .endm - .macro trychoosesleeptalkmove param0:req + .macro trychoosesleeptalkmove ptr:req .byte 0xa9 - .4byte \param0 + .4byte \ptr .endm .macro setdestinybond @@ -899,32 +906,32 @@ .byte 0xac .endm - .macro tryspiteppreduce param0:req + .macro tryspiteppreduce ptr:req .byte 0xad - .4byte \param0 + .4byte \ptr .endm .macro healpartystatus .byte 0xae .endm - .macro cursetarget param0:req + .macro cursetarget ptr:req .byte 0xaf - .4byte \param0 + .4byte \ptr .endm - .macro trysetspikes param0:req + .macro trysetspikes ptr:req .byte 0xb0 - .4byte \param0 + .4byte \ptr .endm .macro setforesight .byte 0xb1 .endm - .macro trysetperishsong param0:req + .macro trysetperishsong ptr:req .byte 0xb2 - .4byte \param0 + .4byte \ptr .endm .macro rolloutdamagecalculation @@ -957,23 +964,23 @@ .byte 0xb9 .endm - .macro jumpifnopursuitswitchdmg param0:req + .macro jumpifnopursuitswitchdmg ptr:req .byte 0xba - .4byte \param0 + .4byte \ptr .endm .macro setsunny .byte 0xbb .endm - .macro maxattackhalvehp param0:req + .macro maxattackhalvehp ptr:req .byte 0xbc - .4byte \param0 + .4byte \ptr .endm - .macro copyfoestats param0:req + .macro copyfoestats ptr:req .byte 0xbd - .4byte \param0 + .4byte \ptr .endm .macro rapidspinfree @@ -984,9 +991,9 @@ .byte 0xbf .endm - .macro recoverbasedonsunlight param0:req + .macro recoverbasedonsunlight ptr:req .byte 0xc0 - .4byte \param0 + .4byte \ptr .endm .macro hiddenpowercalc @@ -997,15 +1004,15 @@ .byte 0xc2 .endm - .macro trysetfutureattack param0:req + .macro trysetfutureattack ptr:req .byte 0xc3 - .4byte \param0 + .4byte \ptr .endm - .macro trydobeatup param0:req, param1:req + .macro trydobeatup endPtr:req, failPtr:req .byte 0xc4 - .4byte \param0 - .4byte \param1 + .4byte \endPtr + .4byte \failPtr .endm .macro setsemiinvulnerablebit @@ -1041,107 +1048,107 @@ .byte 0xcc .endm - .macro cureifburnedparalysedorpoisoned param0:req + .macro cureifburnedparalysedorpoisoned ptr:req .byte 0xcd - .4byte \param0 + .4byte \ptr .endm - .macro settorment param0:req + .macro settorment ptr:req .byte 0xce - .4byte \param0 + .4byte \ptr .endm - .macro jumpifnodamage param0:req + .macro jumpifnodamage ptr:req .byte 0xcf - .4byte \param0 + .4byte \ptr .endm - .macro settaunt param0:req + .macro settaunt ptr:req .byte 0xd0 - .4byte \param0 + .4byte \ptr .endm - .macro trysethelpinghand param0:req + .macro trysethelpinghand ptr:req .byte 0xd1 - .4byte \param0 + .4byte \ptr .endm - .macro tryswapitems param0:req + .macro tryswapitems ptr:req .byte 0xd2 - .4byte \param0 + .4byte \ptr .endm - .macro trycopyability param0:req + .macro trycopyability ptr:req .byte 0xd3 - .4byte \param0 + .4byte \ptr .endm - .macro trywish param0:req, param1:req + .macro trywish turnNumber:req, ptr:req .byte 0xd4 - .byte \param0 - .4byte \param1 + .byte \turnNumber + .4byte \ptr .endm - .macro trysetroots param0:req + .macro trysetroots ptr:req .byte 0xd5 - .4byte \param0 + .4byte \ptr .endm .macro doubledamagedealtifdamaged .byte 0xd6 .endm - .macro setyawn param0:req + .macro setyawn ptr:req .byte 0xd7 - .4byte \param0 + .4byte \ptr .endm - .macro setdamagetohealthdifference param0:req + .macro setdamagetohealthdifference ptr:req .byte 0xd8 - .4byte \param0 + .4byte \ptr .endm .macro scaledamagebyhealthratio .byte 0xd9 .endm - .macro tryswapabilities param0:req + .macro tryswapabilities ptr:req .byte 0xda - .4byte \param0 + .4byte \ptr .endm - .macro tryimprison param0:req + .macro tryimprison ptr:req .byte 0xdb - .4byte \param0 + .4byte \ptr .endm - .macro trysetgrudge param0:req + .macro trysetgrudge ptr:req .byte 0xdc - .4byte \param0 + .4byte \ptr .endm .macro weightdamagecalculation .byte 0xdd .endm - .macro assistattackselect param0:req + .macro assistattackselect ptr:req .byte 0xde - .4byte \param0 + .4byte \ptr .endm - .macro trysetmagiccoat param0:req + .macro trysetmagiccoat ptr:req .byte 0xdf - .4byte \param0 + .4byte \ptr .endm - .macro trysetsnatch param0:req + .macro trysetsnatch ptr:req .byte 0xe0 - .4byte \param0 + .4byte \ptr .endm - .macro trygetintimidatetarget param0:req + .macro trygetintimidatetarget ptr:req .byte 0xe1 - .4byte \param0 + .4byte \ptr .endm .macro switchoutabilities battler:req @@ -1149,10 +1156,10 @@ .byte \battler .endm - .macro jumpifhasnohp battler:req, param1:req + .macro jumpifhasnohp battler:req, ptr:req .byte 0xe3 .byte \battler - .4byte \param1 + .4byte \ptr .endm .macro getsecretpowereffect @@ -1171,28 +1178,28 @@ .byte 0xe7 .endm - .macro settypebasedhalvers param0:req + .macro settypebasedhalvers ptr:req .byte 0xe8 - .4byte \param0 + .4byte \ptr .endm .macro setweatherballtype .byte 0xe9 .endm - .macro tryrecycleitem param0:req + .macro tryrecycleitem ptr:req .byte 0xea - .4byte \param0 + .4byte \ptr .endm - .macro settypetoterrain param0:req + .macro settypetoterrain ptr:req .byte 0xeb - .4byte \param0 + .4byte \ptr .endm - .macro pursuitrelated param0:req + .macro pursuitdoubles ptr:req .byte 0xec - .4byte \param0 + .4byte \ptr .endm .macro snatchsetbattlers @@ -1211,18 +1218,18 @@ .byte 0xf0 .endm - .macro trysetcaughtmondexflags param0:req + .macro trysetcaughtmondexflags ptr:req .byte 0xf1 - .4byte \param0 + .4byte \ptr .endm .macro displaydexinfo .byte 0xf2 .endm - .macro trygivecaughtmonnick param0:req + .macro trygivecaughtmonnick ptr:req .byte 0xf3 - .4byte \param0 + .4byte \ptr .endm .macro subattackerhpbydmg @@ -1241,9 +1248,9 @@ .byte 0xf7 .endm - .macro trainerslideout param0:req + .macro trainerslideout position:req .byte 0xf8 - .byte \param0 + .byte \position .endm @ various command changed to more readable macros @@ -1357,11 +1364,11 @@ @ helpful macros .macro setstatchanger stat:req, stages:req, down:req - setbyte sSTATCHANGER \stat | \stages << 4 | \down << 7 + setbyte sSTATCHANGER, \stat | \stages << 4 | \down << 7 .endm .macro setmoveeffect effect:req - setbyte cEFFECT_CHOOSER \effect + setbyte cEFFECT_CHOOSER, \effect .endm .macro chosenstatus1animation battler:req, status:req @@ -1413,11 +1420,11 @@ .endm .macro jumpifstatus3 battler:req, status:req, jumpptr:req - jumpifstatus3condition \battler, \status, 0x0, \jumpptr + jumpifstatus3condition \battler, \status, FALSE, \jumpptr .endm .macro jumpifnostatus3 battler:req, status:req, jumpptr:req - jumpifstatus3condition \battler, \status, 0x1, \jumpptr + jumpifstatus3condition \battler, \status, TRUE, \jumpptr .endm .macro jumpifmovehadnoeffect jumpptr:req diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 5a48e0b3c2..eecb3d08df 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -262,7 +262,7 @@ BattleScript_HitFromAtkAnimation:: resultmessage waitmessage B_WAIT_TIME_LONG seteffectwithchance - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET BattleScript_MoveEnd:: moveendall end @@ -354,8 +354,8 @@ BattleScript_AbsorbUpdateHp:: printfromtable gAbsorbDrainStringIds waitmessage B_WAIT_TIME_LONG BattleScript_AbsorbTryFainting:: - tryfaintmon BS_ATTACKER, FALSE, NULL - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_ATTACKER + tryfaintmon BS_TARGET goto BattleScript_MoveEnd BattleScript_EffectBurnHit:: @@ -399,10 +399,10 @@ BattleScript_ExplosionLoop: waitmessage B_WAIT_TIME_LONG resultmessage waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_ExplosionLoop - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER end BattleScript_ExplosionMissed: effectivenesssound @@ -410,7 +410,7 @@ BattleScript_ExplosionMissed: waitmessage B_WAIT_TIME_LONG moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_ExplosionLoop - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER end BattleScript_PreserveMissedBitDoMoveAnim: @@ -456,7 +456,7 @@ BattleScript_DreamEaterWorked: printstring STRINGID_PKMNDREAMEATEN waitmessage B_WAIT_TIME_LONG BattleScript_DreamEaterTryFaintEnd: - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET goto BattleScript_MoveEnd BattleScript_EffectMirrorMove:: @@ -647,7 +647,7 @@ BattleScript_MultiHitPrintStrings:: waitmessage B_WAIT_TIME_LONG BattleScript_MultiHitEnd:: seteffectwithchance - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET moveendcase MOVEEND_SYNCHRONIZE_TARGET moveendfrom MOVEEND_IMMUNITY_ABILITIES end @@ -865,7 +865,7 @@ BattleScript_MoveMissedDoDamage:: orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER orbyte gMoveResultFlags, MOVE_RESULT_MISSED goto BattleScript_MoveEnd @@ -1431,7 +1431,7 @@ BattleScript_TripleKickPrintStrings:: waitmessage B_WAIT_TIME_LONG BattleScript_TripleKickEnd:: seteffectwithchance - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET moveendfrom MOVEEND_UPDATE_LAST_MOVES end @@ -1524,7 +1524,7 @@ BattleScript_DoGhostCurse:: datahpupdate BS_ATTACKER printstring STRINGID_PKMNLAIDCURSE waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd BattleScript_EffectProtect:: @@ -1862,7 +1862,7 @@ BattleScript_DoHitAllWithUndergroundBonus:: waitmessage B_WAIT_TIME_LONG printstring STRINGID_EMPTYSTRING3 waitmessage 1 - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop end @@ -1962,7 +1962,7 @@ BattleScript_BeatUpAttack:: waitmessage B_WAIT_TIME_LONG resultmessage waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET moveendto MOVEEND_NEXT_TARGET goto BattleScript_BeatUpLoop BattleScript_BeatUpEnd:: @@ -2227,7 +2227,7 @@ BattleScript_EffectMementoTrySpAtk: printfromtable gStatDownStringIds waitmessage B_WAIT_TIME_LONG BattleScript_EffectMementoTryFaint: - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd BattleScript_EffectMementoPrintNoEffect: printstring STRINGID_BUTNOEFFECT @@ -2243,7 +2243,7 @@ BattleScript_MementoFailEnd: effectivenesssound resultmessage waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd BattleScript_EffectFacade:: @@ -2442,7 +2442,7 @@ BattleScript_BrickBreakDoHit:: resultmessage waitmessage B_WAIT_TIME_LONG seteffectwithchance - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET goto BattleScript_MoveEnd BattleScript_EffectYawn:: @@ -3045,7 +3045,7 @@ BattleScript_FrontierTrainerBattleWon_End: end2 BattleScript_SmokeBallEscape:: - playanimation BS_ATTACKER, B_ANIM_SMOKEBALL_ESCAPE, NULL + playanimation BS_ATTACKER, B_ANIM_SMOKEBALL_ESCAPE printstring STRINGID_PKMNFLEDUSINGITS waitmessage B_WAIT_TIME_LONG end2 @@ -3136,7 +3136,7 @@ BattleScript_PursuitDmgOnSwitchOut:: waitmessage B_WAIT_TIME_LONG resultmessage waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET moveendfromto MOVEEND_ON_DAMAGE_ABILITIES, MOVEEND_CHOICE_MOVE getbattlerfainted BS_TARGET jumpifbyte CMP_EQUAL, gBattleCommunication, FALSE, BattleScript_PursuitDmgOnSwitchOutRet @@ -3190,14 +3190,14 @@ BattleScript_RainContinuesOrEnds:: printfromtable gRainContinuesStringIds waitmessage B_WAIT_TIME_LONG jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_RAIN_STOPPED, BattleScript_RainContinuesOrEndsEnd - playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES, NULL + playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES BattleScript_RainContinuesOrEndsEnd:: end2 BattleScript_DamagingWeatherContinues:: printfromtable gSandStormHailContinuesStringIds waitmessage B_WAIT_TIME_LONG - playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL + playanimation_var BS_ATTACKER, sB_ANIM_ARG1 setbyte gBattleCommunication, 0 BattleScript_DamagingWeatherLoop:: copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1 @@ -3210,7 +3210,7 @@ BattleScript_DamagingWeatherLoop:: hitanimation BS_ATTACKER healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER checkteamslost BattleScript_DamagingWeatherLoopIncrement BattleScript_DamagingWeatherLoopIncrement:: jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_DamagingWeatherContinuesEnd @@ -3228,7 +3228,7 @@ BattleScript_SandStormHailEnds:: BattleScript_SunlightContinues:: printstring STRINGID_SUNLIGHTSTRONG waitmessage B_WAIT_TIME_LONG - playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES, NULL + playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES end2 BattleScript_SunlightFaded:: @@ -3239,7 +3239,7 @@ BattleScript_SunlightFaded:: BattleScript_OverworldWeatherStarts:: printfromtable gWeatherStartsStringIds waitmessage B_WAIT_TIME_LONG - playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL + playanimation_var BS_ATTACKER, sB_ANIM_ARG1 end3 BattleScript_SideStatusWoreOff:: @@ -3277,8 +3277,8 @@ BattleScript_LeechSeedTurnPrintAndUpdateHp:: datahpupdate BS_TARGET printfromtable gLeechSeedStringIds waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_ATTACKER, FALSE, NULL - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_ATTACKER + tryfaintmon BS_TARGET end2 BattleScript_BideStoringEnergy:: @@ -3307,7 +3307,7 @@ BattleScript_BideAttack:: datahpupdate BS_TARGET resultmessage waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET goto BattleScript_MoveEnd BattleScript_BideNoEnergyToAttack:: @@ -3379,7 +3379,7 @@ BattleScript_DestinyBondTakesLife:: orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER return BattleScript_SpikesOnAttacker:: @@ -3387,8 +3387,8 @@ BattleScript_SpikesOnAttacker:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER call BattleScript_PrintHurtBySpikes - tryfaintmon BS_ATTACKER, FALSE, NULL - tryfaintmon BS_ATTACKER, TRUE, BattleScript_SpikesOnAttackerFainted + tryfaintmon BS_ATTACKER + tryfaintmon_spikes BS_ATTACKER, BattleScript_SpikesOnAttackerFainted return BattleScript_SpikesOnAttackerFainted:: @@ -3402,8 +3402,8 @@ BattleScript_SpikesOnTarget:: healthbarupdate BS_TARGET datahpupdate BS_TARGET call BattleScript_PrintHurtBySpikes - tryfaintmon BS_TARGET, FALSE, NULL - tryfaintmon BS_TARGET, TRUE, BattleScript_SpikesOnTargetFainted + tryfaintmon BS_TARGET + tryfaintmon_spikes BS_TARGET, BattleScript_SpikesOnTargetFainted return BattleScript_SpikesOnTargetFainted:: @@ -3417,8 +3417,8 @@ BattleScript_SpikesOnFaintedBattler:: healthbarupdate BS_FAINTED datahpupdate BS_FAINTED call BattleScript_PrintHurtBySpikes - tryfaintmon BS_FAINTED, FALSE, NULL - tryfaintmon BS_FAINTED, TRUE, BattleScript_SpikesOnFaintedBattlerFainted + tryfaintmon BS_FAINTED + tryfaintmon_spikes BS_FAINTED, BattleScript_SpikesOnFaintedBattlerFainted return BattleScript_SpikesOnFaintedBattlerFainted:: @@ -3438,7 +3438,7 @@ BattleScript_PerishSongTakesLife:: orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER end2 BattleScript_PerishSongCountGoesDown:: @@ -3513,10 +3513,10 @@ BattleScript_CheckDoomDesireMiss:: BattleScript_FutureAttackAnimate:: adjustnormaldamage2 jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_FUTURE_SIGHT, BattleScript_FutureHitAnimDoomDesire - playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT, NULL + playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT goto BattleScript_DoFutureAttackHit BattleScript_FutureHitAnimDoomDesire:: - playanimation BS_ATTACKER, B_ANIM_DOOM_DESIRE_HIT, NULL + playanimation BS_ATTACKER, B_ANIM_DOOM_DESIRE_HIT BattleScript_DoFutureAttackHit:: effectivenesssound hitanimation BS_TARGET @@ -3525,7 +3525,7 @@ BattleScript_DoFutureAttackHit:: datahpupdate BS_TARGET resultmessage waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_TARGET, FALSE, NULL + tryfaintmon BS_TARGET checkteamslost BattleScript_FutureAttackEnd BattleScript_FutureAttackEnd:: moveendcase MOVEEND_RAGE @@ -3585,7 +3585,7 @@ BattleScript_SelectingNotAllowedMoveTauntInPalace:: BattleScript_WishComesTrue:: trywish 1, BattleScript_WishButFullHp - playanimation BS_TARGET, B_ANIM_WISH_HEAL, NULL + playanimation BS_TARGET, B_ANIM_WISH_HEAL printstring STRINGID_PKMNWISHCAMETRUE waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE @@ -3604,7 +3604,7 @@ BattleScript_WishButFullHp:: end2 BattleScript_IngrainTurnHeal:: - playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL, NULL + playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL printstring STRINGID_PKMNABSORBEDNUTRIENTS waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE @@ -3638,7 +3638,7 @@ BattleScript_AtkDefDown_End:: return BattleScript_KnockedOff:: - playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF, NULL + playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF printstring STRINGID_PKMNKNOCKEDOFF waitmessage B_WAIT_TIME_LONG return @@ -3675,7 +3675,7 @@ BattleScript_SnatchedMove:: attackstring ppreduce snatchsetbattlers - playanimation BS_TARGET, B_ANIM_SNATCH_MOVE, NULL + playanimation BS_TARGET, B_ANIM_SNATCH_MOVE printstring STRINGID_PKMNSNATCHEDMOVE waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP @@ -3706,7 +3706,7 @@ BattleScript_SAtkDown2End:: BattleScript_FocusPunchSetUp:: printstring STRINGID_EMPTYSTRING3 waitmessage 1 - playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP, NULL + playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP printstring STRINGID_PKMNTIGHTENINGFOCUS waitmessage B_WAIT_TIME_LONG end2 @@ -3739,7 +3739,7 @@ BattleScript_DoTurnDmg:: orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER checkteamslost BattleScript_DoTurnDmgEnd BattleScript_DoTurnDmgEnd:: end2 @@ -3808,7 +3808,7 @@ BattleScript_DoSelfConfusionDmg:: datahpupdate BS_ATTACKER resultmessage waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd BattleScript_MoveUsedIsConfusedRet:: return @@ -3941,12 +3941,12 @@ BattleScript_DoRecoil:: datahpupdate BS_ATTACKER printstring STRINGID_PKMNHITWITHRECOIL waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER BattleScript_RecoilEnd:: return BattleScript_ItemSteal:: - playanimation BS_TARGET, B_ANIM_ITEM_STEAL, NULL + playanimation BS_TARGET, B_ANIM_ITEM_STEAL printstring STRINGID_PKMNSTOLEITEM waitmessage B_WAIT_TIME_LONG return @@ -3955,7 +3955,7 @@ BattleScript_DrizzleActivates:: pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNMADEITRAIN waitstate - playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES, NULL + playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES call BattleScript_WeatherFormChanges end3 @@ -3983,7 +3983,7 @@ BattleScript_SandstreamActivates:: pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXWHIPPEDUPSANDSTORM waitstate - playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES, NULL + playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES call BattleScript_WeatherFormChanges end3 @@ -4048,7 +4048,7 @@ BattleScript_DroughtActivates:: pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXINTENSIFIEDSUN waitstate - playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES, NULL + playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES call BattleScript_WeatherFormChanges end3 @@ -4184,7 +4184,7 @@ BattleScript_RoughSkinActivates:: datahpupdate BS_ATTACKER printstring STRINGID_PKMNHURTSWITH waitmessage B_WAIT_TIME_LONG - tryfaintmon BS_ATTACKER, FALSE, NULL + tryfaintmon BS_ATTACKER return BattleScript_CuteCharmActivates:: @@ -4252,7 +4252,7 @@ BattleScript_IgnoresAndHitsItself:: goto BattleScript_DoSelfConfusionDmg BattleScript_SubstituteFade:: - playanimation BS_TARGET, B_ANIM_SUBSTITUTE_FADE, NULL + playanimation BS_TARGET, B_ANIM_SUBSTITUTE_FADE printstring STRINGID_PKMNSUBSTITUTEFADED return @@ -4261,7 +4261,7 @@ BattleScript_BerryCurePrlzEnd2:: end2 BattleScript_BerryCureParRet:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMCUREDPARALYSIS waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING @@ -4273,7 +4273,7 @@ BattleScript_BerryCurePsnEnd2:: end2 BattleScript_BerryCurePsnRet:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMCUREDPOISON waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING @@ -4285,7 +4285,7 @@ BattleScript_BerryCureBrnEnd2:: end2 BattleScript_BerryCureBrnRet:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMHEALEDBURN waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING @@ -4297,7 +4297,7 @@ BattleScript_BerryCureFrzEnd2:: end2 BattleScript_BerryCureFrzRet:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMDEFROSTEDIT waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING @@ -4309,7 +4309,7 @@ BattleScript_BerryCureSlpEnd2:: end2 BattleScript_BerryCureSlpRet:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMWOKEIT waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING @@ -4321,7 +4321,7 @@ BattleScript_BerryCureConfusionEnd2:: end2 BattleScript_BerryCureConfusionRet:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMSNAPPEDOUT waitmessage B_WAIT_TIME_LONG removeitem BS_SCRIPTING @@ -4332,7 +4332,7 @@ BattleScript_BerryCureChosenStatusEnd2:: end2 BattleScript_BerryCureChosenStatusRet:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printfromtable gBerryEffectStringIds waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING @@ -4344,14 +4344,14 @@ BattleScript_WhiteHerbEnd2:: end2 BattleScript_WhiteHerbRet:: - playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDSTATUS waitmessage B_WAIT_TIME_LONG removeitem BS_SCRIPTING return BattleScript_ItemHealHP_RemoveItem:: - playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDHEALTH waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE @@ -4361,7 +4361,7 @@ BattleScript_ItemHealHP_RemoveItem:: end2 BattleScript_BerryPPHealEnd2:: - playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDPP waitmessage B_WAIT_TIME_LONG removeitem BS_ATTACKER @@ -4372,7 +4372,7 @@ BattleScript_ItemHealHP_End2:: end2 BattleScript_ItemHealHP_Ret:: - playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE @@ -4385,13 +4385,13 @@ BattleScript_SelectingNotAllowedMoveChoiceItem:: endselectionscript BattleScript_FocusBandActivates:: - playanimation BS_TARGET, B_ANIM_FOCUS_BAND, NULL + playanimation BS_TARGET, B_ANIM_FOCUS_BAND printstring STRINGID_PKMNHUNGONWITHX waitmessage B_WAIT_TIME_LONG return BattleScript_BerryConfuseHealEnd2:: - playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDHEALTH waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE @@ -4405,7 +4405,7 @@ BattleScript_BerryConfuseHealEnd2:: end2 BattleScript_BerryStatRaiseEnd2:: - playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp BattleScript_BerryStatRaiseDoStatUp:: setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM @@ -4414,7 +4414,7 @@ BattleScript_BerryStatRaiseDoStatUp:: end2 BattleScript_BerryFocusEnergyEnd2:: - playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNUSEDXTOGETPUMPED waitmessage B_WAIT_TIME_LONG removeitem BS_ATTACKER diff --git a/include/battle.h b/include/battle.h index 5a30bc90c8..9434b9aa88 100644 --- a/include/battle.h +++ b/include/battle.h @@ -41,19 +41,6 @@ #define B_ACTION_NOTHING_FAINTED 13 // when choosing an action #define B_ACTION_NONE 0xFF -// array entries for battle communication -#define MULTIUSE_STATE 0 -#define CURSOR_POSITION 1 -#define TASK_ID 1 // task Id and cursor position share the same field -#define SPRITES_INIT_STATE1 1 // shares the Id as well -#define SPRITES_INIT_STATE2 2 -#define MOVE_EFFECT_BYTE 3 -#define ACTIONS_CONFIRMED_COUNT 4 -#define MULTISTRING_CHOOSER 5 -#define MISS_TYPE 6 -#define MSG_DISPLAY 7 -#define BATTLE_COMMUNICATION_ENTRIES_COUNT 8 - #define MOVE_TARGET_SELECTED 0 #define MOVE_TARGET_DEPENDS (1 << 0) #define MOVE_TARGET_USER_OR_SELECTED (1 << 1) @@ -487,6 +474,8 @@ struct BattleStruct #define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7)) +// NOTE: The members of this struct have hard-coded offsets +// in include/constants/battle_script_commands.h struct BattleScripting { s32 painSplitHp; @@ -509,7 +498,7 @@ struct BattleScripting u8 battleStyle; u8 drawlvlupboxState; u8 learnMoveState; - u8 field_20; + u8 pursuitDoublesAttacker; u8 reshowMainState; u8 reshowHelperState; u8 levelUpHP; @@ -518,9 +507,6 @@ struct BattleScripting u8 specialTrainerBattleType; }; -// rom_80A5C6C - - struct BattleSpriteInfo { u16 invisible:1; // 0x1 diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h index 90b6d80e86..cb81ad8124 100644 --- a/include/battle_script_commands.h +++ b/include/battle_script_commands.h @@ -2,6 +2,7 @@ #define GUARD_BATTLE_SCRIPT_COMMANDS_H #include "constants/pokemon.h" +#include "constants/battle_script_commands.h" // Arguments for 'flags' in HandleBattleWindow #define WINDOW_CLEAR (1 << 0) diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index f3e11b4be3..83aacf3160 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -1,38 +1,51 @@ #ifndef GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H #define GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H -// Battle Scripting and BattleCommunication addresses -#define sPAINSPLIT_HP gBattleScripting -#define sBIDE_DMG gBattleScripting + 4 -#define sMULTIHIT_STRING gBattleScripting + 8 -#define sDMG_MULTIPLIER gBattleScripting + 0xE -#define sTWOTURN_STRINGID gBattleScripting + 0xF -#define sB_ANIM_ARG1 gBattleScripting + 0x10 -#define sB_ANIM_ARG2 gBattleScripting + 0x11 -#define sTRIPLE_KICK_POWER gBattleScripting + 0x12 -#define sMOVEEND_STATE gBattleScripting + 0x14 -#define sBATTLER_WITH_ABILITY gBattleScripting + 0x15 -#define sMULTIHIT_EFFECT gBattleScripting + 0x16 -#define sBATTLER gBattleScripting + 0x17 -#define sB_ANIM_TURN gBattleScripting + 0x18 -#define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19 -#define sSTATCHANGER gBattleScripting + 0x1A -#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B -#define sGIVEEXP_STATE gBattleScripting + 0x1C -#define sBATTLE_STYLE gBattleScripting + 0x1D -#define sLVLBOX_STATE gBattleScripting + 0x1E -#define sLEARNMOVE_STATE gBattleScripting + 0x1F -#define sFIELD_20 gBattleScripting + 0x20 -#define sRESHOW_MAIN_STATE gBattleScripting + 0x21 -#define sRESHOW_HELPER_STATE gBattleScripting + 0x22 -#define sFIELD_23 gBattleScripting + 0x23 -#define sWINDOWS_TYPE gBattleScripting + 0x24 -#define sMULTIPLAYER_ID gBattleScripting + 0x25 -#define sSPECIAL_TRAINER_BATTLE_TYPE gBattleScripting + 0x26 +// The following correspond to the struct members of BattleScripting by adding their offset +#define sPAINSPLIT_HP (gBattleScripting + 0x00) // painSplitHp +#define sBIDE_DMG (gBattleScripting + 0x04) // bideDmg +#define sMULTIHIT_STRING (gBattleScripting + 0x08) // multihitString +#define sDMG_MULTIPLIER (gBattleScripting + 0x0E) // dmgMultiplier +#define sTWOTURN_STRINGID (gBattleScripting + 0x0F) // twoTurnsMoveStringId +#define sB_ANIM_ARG1 (gBattleScripting + 0x10) // animArg1 +#define sB_ANIM_ARG2 (gBattleScripting + 0x11) // animArg2 +#define sTRIPLE_KICK_POWER (gBattleScripting + 0x12) // tripleKickPower +#define sMOVEEND_STATE (gBattleScripting + 0x14) // moveendState +#define sBATTLER_WITH_ABILITY (gBattleScripting + 0x15) // battlerWithAbility +#define sMULTIHIT_EFFECT (gBattleScripting + 0x16) // multihitMoveEffect +#define sBATTLER (gBattleScripting + 0x17) // battler +#define sB_ANIM_TURN (gBattleScripting + 0x18) // animTurn +#define sB_ANIM_TARGETS_HIT (gBattleScripting + 0x19) // animTargetsHit +#define sSTATCHANGER (gBattleScripting + 0x1A) // statChanger +#define sSTAT_ANIM_PLAYED (gBattleScripting + 0x1B) // statAnimPlayed +#define sGIVEEXP_STATE (gBattleScripting + 0x1C) // getexpState +#define sBATTLE_STYLE (gBattleScripting + 0x1D) // battleStyle +#define sLVLBOX_STATE (gBattleScripting + 0x1E) // drawlvlupboxState +#define sLEARNMOVE_STATE (gBattleScripting + 0x1F) // learnMoveState +#define sPURSUIT_DOUBLES_ATTACKER (gBattleScripting + 0x20) // pursuitDoublesAttacker +#define sRESHOW_MAIN_STATE (gBattleScripting + 0x21) // reshowMainState +#define sRESHOW_HELPER_STATE (gBattleScripting + 0x22) // reshowHelperState +#define sLVLUP_HP (gBattleScripting + 0x23) // levelUpHP +#define sWINDOWS_TYPE (gBattleScripting + 0x24) // windowsType +#define sMULTIPLAYER_ID (gBattleScripting + 0x25) // multiplayerId +#define sSPECIAL_TRAINER_BATTLE_TYPE (gBattleScripting + 0x26) // specialTrainerBattleType -#define cEFFECT_CHOOSER gBattleCommunication + 3 -#define cMULTISTRING_CHOOSER gBattleCommunication + 5 -#define cMISS_TYPE gBattleCommunication + 6 +// Array entries for battle communication +#define MULTIUSE_STATE 0 +#define CURSOR_POSITION 1 +#define TASK_ID 1 // task Id and cursor position share the same field +#define SPRITES_INIT_STATE1 1 // shares the Id as well +#define SPRITES_INIT_STATE2 2 +#define MOVE_EFFECT_BYTE 3 +#define ACTIONS_CONFIRMED_COUNT 4 +#define MULTISTRING_CHOOSER 5 +#define MISS_TYPE 6 +#define MSG_DISPLAY 7 +#define BATTLE_COMMUNICATION_ENTRIES_COUNT 8 + +#define cEFFECT_CHOOSER (gBattleCommunication + MOVE_EFFECT_BYTE) +#define cMULTISTRING_CHOOSER (gBattleCommunication + MULTISTRING_CHOOSER) +#define cMISS_TYPE (gBattleCommunication + MISS_TYPE) // Battle Script defines for getting the wanted battler #define BS_TARGET 0 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 9056aa58da..0ecb173686 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1,25 +1,15 @@ #include "global.h" #include "battle.h" -#include "constants/battle_move_effects.h" -#include "constants/battle_script_commands.h" #include "battle_message.h" #include "battle_anim.h" #include "battle_ai_script_commands.h" #include "battle_scripts.h" -#include "constants/moves.h" -#include "constants/abilities.h" #include "item.h" -#include "constants/items.h" -#include "constants/hold_effects.h" #include "util.h" #include "pokemon.h" #include "random.h" #include "battle_controllers.h" #include "battle_interface.h" -#include "constants/songs.h" -#include "constants/trainers.h" -#include "constants/battle_anim.h" -#include "constants/map_types.h" #include "text.h" #include "sound.h" #include "pokedex.h" @@ -38,7 +28,6 @@ #include "pokemon_storage_system.h" #include "task.h" #include "naming_screen.h" -#include "constants/battle_string_ids.h" #include "battle_setup.h" #include "overworld.h" #include "party_menu.h" @@ -49,9 +38,19 @@ #include "pokemon_summary_screen.h" #include "pokenav.h" #include "menu_specialized.h" -#include "constants/rgb.h" #include "data.h" +#include "constants/abilities.h" +#include "constants/battle_anim.h" +#include "constants/battle_move_effects.h" +#include "constants/battle_string_ids.h" +#include "constants/hold_effects.h" +#include "constants/items.h" +#include "constants/map_types.h" +#include "constants/moves.h" #include "constants/party_menu.h" +#include "constants/rgb.h" +#include "constants/songs.h" +#include "constants/trainers.h" extern const u8* const gBattleScriptsForMoveEffects[]; @@ -147,7 +146,7 @@ static void Cmd_jumpiftype2(void); static void Cmd_jumpifabilitypresent(void); static void Cmd_endselectionscript(void); static void Cmd_playanimation(void); -static void Cmd_playanimation2(void); +static void Cmd_playanimation_var(void); static void Cmd_setgraphicalstatchangevalues(void); static void Cmd_playstatchangeanimation(void); static void Cmd_moveend(void); @@ -313,7 +312,7 @@ static void Cmd_settypebasedhalvers(void); static void Cmd_setweatherballtype(void); static void Cmd_tryrecycleitem(void); static void Cmd_settypetoterrain(void); -static void Cmd_pursuitrelated(void); +static void Cmd_pursuitdoubles(void); static void Cmd_snatchsetbattlers(void); static void Cmd_removelightscreenreflect(void); static void Cmd_handleballthrow(void); @@ -399,7 +398,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = Cmd_jumpifabilitypresent, //0x43 Cmd_endselectionscript, //0x44 Cmd_playanimation, //0x45 - Cmd_playanimation2, //0x46 + Cmd_playanimation_var, //0x46 Cmd_setgraphicalstatchangevalues, //0x47 Cmd_playstatchangeanimation, //0x48 Cmd_moveend, //0x49 @@ -565,7 +564,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = Cmd_setweatherballtype, //0xE9 Cmd_tryrecycleitem, //0xEA Cmd_settypetoterrain, //0xEB - Cmd_pursuitrelated, //0xEC + Cmd_pursuitdoubles, //0xEC Cmd_snatchsetbattlers, //0xED Cmd_removelightscreenreflect, //0xEE Cmd_handleballthrow, //0xEF @@ -1115,7 +1114,7 @@ static void Cmd_accuracycheck(void) s8 buff; u16 calc; - if (move == 0) + if (move == ACC_CURR_MOVE) move = gCurrentMove; GET_MOVE_TYPE(move, type); @@ -3183,23 +3182,23 @@ static void Cmd_jumpifstat(void) static void Cmd_jumpifstatus3condition(void) { - u32 flags; + u32 status; const u8 *jumpPtr; gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - flags = T2_READ_32(gBattlescriptCurrInstr + 2); + status = T2_READ_32(gBattlescriptCurrInstr + 2); jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 7); if (gBattlescriptCurrInstr[6]) { - if ((gStatuses3[gActiveBattler] & flags) != 0) + if ((gStatuses3[gActiveBattler] & status) != 0) gBattlescriptCurrInstr += 11; else gBattlescriptCurrInstr = jumpPtr; } else { - if ((gStatuses3[gActiveBattler] & flags) != 0) + if ((gStatuses3[gActiveBattler] & status) != 0) gBattlescriptCurrInstr = jumpPtr; else gBattlescriptCurrInstr += 11; @@ -3514,8 +3513,7 @@ static void Cmd_checkteamslost(void) // In multi battle with Steven, skip his Pokémon for (i = 0; i < MULTI_PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) - && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP); } } @@ -3523,10 +3521,8 @@ static void Cmd_checkteamslost(void) { for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) - && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) - && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) - || !(gBattleStruct->arenaLostPlayerMons & gBitTable[i]))) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) + && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostPlayerMons & gBitTable[i]))) { HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP); } @@ -3539,10 +3535,8 @@ static void Cmd_checkteamslost(void) // Get total HP for the enemy's party to determine if the player has won for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) - && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG) - && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) - || !(gBattleStruct->arenaLostOpponentMons & gBitTable[i]))) + if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG) + && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostOpponentMons & gBitTable[i]))) { HP_count += GetMonData(&gEnemyParty[i], MON_DATA_HP); } @@ -3982,8 +3976,8 @@ static void Cmd_playanimation(void) argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 3); if (gBattlescriptCurrInstr[2] == B_ANIM_STATS_CHANGE - || gBattlescriptCurrInstr[2] == B_ANIM_SNATCH_MOVE - || gBattlescriptCurrInstr[2] == B_ANIM_SUBSTITUTE_FADE) + || gBattlescriptCurrInstr[2] == B_ANIM_SNATCH_MOVE + || gBattlescriptCurrInstr[2] == B_ANIM_SUBSTITUTE_FADE) { BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); @@ -3995,9 +3989,9 @@ static void Cmd_playanimation(void) gBattlescriptCurrInstr = BattleScript_Pausex20; } else if (gBattlescriptCurrInstr[2] == B_ANIM_RAIN_CONTINUES - || gBattlescriptCurrInstr[2] == B_ANIM_SUN_CONTINUES - || gBattlescriptCurrInstr[2] == B_ANIM_SANDSTORM_CONTINUES - || gBattlescriptCurrInstr[2] == B_ANIM_HAIL_CONTINUES) + || gBattlescriptCurrInstr[2] == B_ANIM_SUN_CONTINUES + || gBattlescriptCurrInstr[2] == B_ANIM_SANDSTORM_CONTINUES + || gBattlescriptCurrInstr[2] == B_ANIM_HAIL_CONTINUES) { BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); @@ -4015,7 +4009,8 @@ static void Cmd_playanimation(void) } } -static void Cmd_playanimation2(void) // animation Id is stored in the first pointer +// Same as playanimation, expect it takes a pointer to some animation id, instead of taking the value directly +static void Cmd_playanimation_var(void) { const u16* argumentPtr; const u8* animationIdPtr; @@ -4025,8 +4020,8 @@ static void Cmd_playanimation2(void) // animation Id is stored in the first poin argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6); if (*animationIdPtr == B_ANIM_STATS_CHANGE - || *animationIdPtr == B_ANIM_SNATCH_MOVE - || *animationIdPtr == B_ANIM_SUBSTITUTE_FADE) + || *animationIdPtr == B_ANIM_SNATCH_MOVE + || *animationIdPtr == B_ANIM_SUBSTITUTE_FADE) { BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); @@ -4037,9 +4032,9 @@ static void Cmd_playanimation2(void) // animation Id is stored in the first poin gBattlescriptCurrInstr += 10; } else if (*animationIdPtr == B_ANIM_RAIN_CONTINUES - || *animationIdPtr == B_ANIM_SUN_CONTINUES - || *animationIdPtr == B_ANIM_SANDSTORM_CONTINUES - || *animationIdPtr == B_ANIM_HAIL_CONTINUES) + || *animationIdPtr == B_ANIM_SUN_CONTINUES + || *animationIdPtr == B_ANIM_SANDSTORM_CONTINUES + || *animationIdPtr == B_ANIM_HAIL_CONTINUES) { BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr); MarkBattlerForControllerExec(gActiveBattler); @@ -4186,7 +4181,7 @@ static void Cmd_moveend(void) u8 moveType = 0; u8 holdEffectAtk = 0; u16 *choicedMoveAtk = NULL; - u8 arg1, arg2; + u8 endMode, endState; u16 originallyUsedMove; if (gChosenMove == 0xFFFF) @@ -4194,8 +4189,8 @@ static void Cmd_moveend(void) else originallyUsedMove = gChosenMove; - arg1 = gBattlescriptCurrInstr[1]; - arg2 = gBattlescriptCurrInstr[2]; + endMode = gBattlescriptCurrInstr[1]; + endState = gBattlescriptCurrInstr[2]; if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY) holdEffectAtk = gEnigmaBerries[gBattlerAttacker].holdEffect; @@ -4450,9 +4445,9 @@ static void Cmd_moveend(void) break; } - if (arg1 == 1 && effect == FALSE) + if (endMode == 1 && effect == FALSE) gBattleScripting.moveendState = MOVEEND_COUNT; - if (arg1 == 2 && arg2 == gBattleScripting.moveendState) + if (endMode == 2 && endState == gBattleScripting.moveendState) gBattleScripting.moveendState = MOVEEND_COUNT; } while (gBattleScripting.moveendState != MOVEEND_COUNT && effect == FALSE); @@ -5318,16 +5313,16 @@ static void Cmd_returntoball(void) static void Cmd_handlelearnnewmove(void) { - const u8 *jumpPtr1 = T1_READ_PTR(gBattlescriptCurrInstr + 1); - const u8 *jumpPtr2 = T1_READ_PTR(gBattlescriptCurrInstr + 5); + const u8 *learnedMovePtr = T1_READ_PTR(gBattlescriptCurrInstr + 1); + const u8 *nothingToLearnPtr = T1_READ_PTR(gBattlescriptCurrInstr + 5); u16 learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], gBattlescriptCurrInstr[9]); while (learnMove == MON_ALREADY_KNOWS_MOVE) learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], FALSE); - if (learnMove == 0) + if (learnMove == MOVE_NONE) { - gBattlescriptCurrInstr = jumpPtr2; + gBattlescriptCurrInstr = nothingToLearnPtr; } else if (learnMove == MON_HAS_MAX_MOVES) { @@ -5352,7 +5347,7 @@ static void Cmd_handlelearnnewmove(void) } } - gBattlescriptCurrInstr = jumpPtr1; + gBattlescriptCurrInstr = learnedMovePtr; } } @@ -9718,7 +9713,8 @@ static void Cmd_settypetoterrain(void) } } -static void Cmd_pursuitrelated(void) +// Unused +static void Cmd_pursuitdoubles(void) { gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK); @@ -9731,7 +9727,7 @@ static void Cmd_pursuitrelated(void) gCurrentMove = MOVE_PURSUIT; gBattlescriptCurrInstr += 5; gBattleScripting.animTurn = 1; - gBattleScripting.field_20 = gBattlerAttacker; + gBattleScripting.pursuitDoublesAttacker = gBattlerAttacker; gBattlerAttacker = gActiveBattler; } else From 9ab03f454ddf6f9627e6252fe974897749aa2f3f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 13 Oct 2021 23:24:10 -0400 Subject: [PATCH 057/417] Small correction to map script comments --- include/constants/map_scripts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/constants/map_scripts.h b/include/constants/map_scripts.h index 7a56cc9085..c89df39482 100644 --- a/include/constants/map_scripts.h +++ b/include/constants/map_scripts.h @@ -13,14 +13,14 @@ Almost exclusively used to set metatiles on the map before it's first drawn 6. ON_FRAME_TABLE: Run every frame after the map has faded in, before player input is processed. - This is a table of scripts that each run if their condition is satisfied. + This is a table of scripts; only the first script whose condition is satisfied is run. Used to trigger an event, such as the player exiting the cable car or the SS Tidal sailor announcing progress 2. ON_TRANSITION: Run during the transition to the map Used to set map-specific flags/vars, update object positions/movement types, set weather, etc 5. ON_WARP_INTO_MAP_TABLE: Run after the map's objects are loaded. - This is a table of scripts that each run if their condition is satisfied. + This is a table of scripts; only the first script whose condition is satisfied is run. Used to add objects to the scene or update something about the player as they warp in (e.g. their facing dir or visibility) Note that ON_TRANSITION may also handle object visibility, but would do so by modifying a flag or var From 2f6928f01688728ef1a390de5caa6990dc60bf31 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 14 Oct 2021 09:52:33 -0400 Subject: [PATCH 058/417] Make calcrom data info optional --- .github/calcrom/calcrom.pl | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/calcrom/calcrom.pl b/.github/calcrom/calcrom.pl index 4858babb95..2aaf25c436 100755 --- a/.github/calcrom/calcrom.pl +++ b/.github/calcrom/calcrom.pl @@ -1,12 +1,18 @@ #!/usr/bin/perl use IPC::Cmd qw[ run ]; +use Getopt::Long; -(@ARGV == 1) - or die "ERROR: no map file specified.\n"; +my $usage = "Usage: calcrom.pl file.map [--data]\n"; + +(@ARGV >= 1) + or die $usage; open(my $file, $ARGV[0]) or die "ERROR: could not open file '$ARGV[0]'.\n"; +my $showData; +GetOptions("data" => \$showData) or die $usage; + my $src = 0; my $asm = 0; my $srcdata = 0; @@ -149,17 +155,13 @@ else print "$undocumented symbols undocumented ($undocPct%)\n"; } -print "\n"; -my $dataTotal = $srcdata + $data; -my $srcDataPct = sprintf("%.4f", 100 * $srcdata / $dataTotal); -my $dataPct = sprintf("%.4f", 100 * $data / $dataTotal); +if ($showData) +{ + print "\n"; + my $dataTotal = $srcdata + $data; + my $srcDataPct = sprintf("%.4f", 100 * $srcdata / $dataTotal); + my $dataPct = sprintf("%.4f", 100 * $data / $dataTotal); -if ($data == 0) -{ - print "Data porting to C is 100% complete\n" -} -else -{ print "$dataTotal total bytes of data\n"; print "$srcdata bytes of data in src ($srcDataPct%)\n"; print "$data bytes of data in data ($dataPct%)\n"; From ceb871e3fafb8bc174e4dd355f64ec50a67c9c95 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 14 Oct 2021 10:15:08 -0400 Subject: [PATCH 059/417] Process calcrom options first --- .github/calcrom/calcrom.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/calcrom/calcrom.pl b/.github/calcrom/calcrom.pl index 2aaf25c436..c351c76122 100755 --- a/.github/calcrom/calcrom.pl +++ b/.github/calcrom/calcrom.pl @@ -5,14 +5,14 @@ use Getopt::Long; my $usage = "Usage: calcrom.pl file.map [--data]\n"; -(@ARGV >= 1) +my $showData; +GetOptions("data" => \$showData) or die $usage; + +(@ARGV == 1) or die $usage; open(my $file, $ARGV[0]) or die "ERROR: could not open file '$ARGV[0]'.\n"; -my $showData; -GetOptions("data" => \$showData) or die $usage; - my $src = 0; my $asm = 0; my $srcdata = 0; From 95406384f4b8291238a4822ad0bf20a9b491df72 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 14 Oct 2021 12:12:16 -0400 Subject: [PATCH 060/417] Start wonder card/news documenting --- gflib/bg.c | 18 +- gflib/bg.h | 6 + .../wonder_card_1.bin => wonder_card/bg1.bin} | Bin .../wonder_card_1.png => wonder_card/bg1.png} | Bin .../wonder_card_2.bin => wonder_card/bg2.bin} | Bin .../wonder_card_2.png => wonder_card/bg2.png} | Bin .../wonder_card_3.bin => wonder_card/bg3.bin} | Bin .../wonder_card_3.png => wonder_card/bg3.png} | Bin .../wonder_card_4.png => wonder_card/bg4.png} | Bin .../wonder_card_5.png => wonder_card/bg5.png} | Bin .../wonder_card_6.png => wonder_card/bg6.png} | Bin .../wonder_card_7.bin => wonder_card/bg7.bin} | Bin .../wonder_card_7.png => wonder_card/bg7.png} | Bin .../wonder_card_8.bin => wonder_card/bg8.bin} | Bin .../wonder_card_8.png => wonder_card/bg8.png} | Bin .../icon_shadow.png} | Bin .../icon_shadow_1.pal} | 0 .../icon_shadow_2.pal} | 0 .../icon_shadow_3.pal} | 0 .../icon_shadow_4.pal} | 0 .../icon_shadow_5.pal} | 0 .../icon_shadow_6.pal} | 0 .../icon_shadow_7.pal} | 0 .../icon_shadow_8.pal} | 0 .../wonder_news_1.bin => wonder_news/bg1.bin} | Bin .../wonder_news_1.png => wonder_news/bg1.png} | Bin .../wonder_news_2.bin => wonder_news/bg2.bin} | Bin .../wonder_news_2.png => wonder_news/bg2.png} | Bin .../wonder_news_3.bin => wonder_news/bg3.bin} | Bin .../wonder_news_3.png => wonder_news/bg3.png} | Bin .../wonder_news_7.bin => wonder_news/bg7.bin} | Bin .../wonder_news_7.png => wonder_news/bg7.png} | Bin .../wonder_news_8.bin => wonder_news/bg8.bin} | Bin .../wonder_news_8.png => wonder_news/bg8.png} | Bin include/constants/global.h | 2 + include/constants/mevent.h | 3 + include/global.h | 18 +- include/mevent_801BAAC.h | 16 - include/wonder_transfer.h | 24 + ld_script.txt | 4 +- src/mevent2.c | 10 +- src/mevent_801BAAC.c | 826 ----------------- src/mystery_gift.c | 139 +-- src/wonder_transfer.c | 870 ++++++++++++++++++ sym_ewram.txt | 2 +- 45 files changed, 950 insertions(+), 988 deletions(-) rename graphics/{wonder_transfers/wonder_card_1.bin => wonder_card/bg1.bin} (100%) rename graphics/{wonder_transfers/wonder_card_1.png => wonder_card/bg1.png} (100%) rename graphics/{wonder_transfers/wonder_card_2.bin => wonder_card/bg2.bin} (100%) rename graphics/{wonder_transfers/wonder_card_2.png => wonder_card/bg2.png} (100%) rename graphics/{wonder_transfers/wonder_card_3.bin => wonder_card/bg3.bin} (100%) rename graphics/{wonder_transfers/wonder_card_3.png => wonder_card/bg3.png} (100%) rename graphics/{wonder_transfers/wonder_card_4.png => wonder_card/bg4.png} (100%) rename graphics/{wonder_transfers/wonder_card_5.png => wonder_card/bg5.png} (100%) rename graphics/{wonder_transfers/wonder_card_6.png => wonder_card/bg6.png} (100%) rename graphics/{wonder_transfers/wonder_card_7.bin => wonder_card/bg7.bin} (100%) rename graphics/{wonder_transfers/wonder_card_7.png => wonder_card/bg7.png} (100%) rename graphics/{wonder_transfers/wonder_card_8.bin => wonder_card/bg8.bin} (100%) rename graphics/{wonder_transfers/wonder_card_8.png => wonder_card/bg8.png} (100%) rename graphics/{wonder_transfers/wonder_card_shadow.png => wonder_card/icon_shadow.png} (100%) rename graphics/{wonder_transfers/wonder_card_shadow_1.pal => wonder_card/icon_shadow_1.pal} (100%) rename graphics/{wonder_transfers/wonder_card_shadow_2.pal => wonder_card/icon_shadow_2.pal} (100%) rename graphics/{wonder_transfers/wonder_card_shadow_3.pal => wonder_card/icon_shadow_3.pal} (100%) rename graphics/{wonder_transfers/wonder_card_shadow_4.pal => wonder_card/icon_shadow_4.pal} (100%) rename graphics/{wonder_transfers/wonder_card_shadow_5.pal => wonder_card/icon_shadow_5.pal} (100%) rename graphics/{wonder_transfers/wonder_card_shadow_6.pal => wonder_card/icon_shadow_6.pal} (100%) rename graphics/{wonder_transfers/wonder_card_shadow_7.pal => wonder_card/icon_shadow_7.pal} (100%) rename graphics/{wonder_transfers/wonder_card_shadow_8.pal => wonder_card/icon_shadow_8.pal} (100%) rename graphics/{wonder_transfers/wonder_news_1.bin => wonder_news/bg1.bin} (100%) rename graphics/{wonder_transfers/wonder_news_1.png => wonder_news/bg1.png} (100%) rename graphics/{wonder_transfers/wonder_news_2.bin => wonder_news/bg2.bin} (100%) rename graphics/{wonder_transfers/wonder_news_2.png => wonder_news/bg2.png} (100%) rename graphics/{wonder_transfers/wonder_news_3.bin => wonder_news/bg3.bin} (100%) rename graphics/{wonder_transfers/wonder_news_3.png => wonder_news/bg3.png} (100%) rename graphics/{wonder_transfers/wonder_news_7.bin => wonder_news/bg7.bin} (100%) rename graphics/{wonder_transfers/wonder_news_7.png => wonder_news/bg7.png} (100%) rename graphics/{wonder_transfers/wonder_news_8.bin => wonder_news/bg8.bin} (100%) rename graphics/{wonder_transfers/wonder_news_8.png => wonder_news/bg8.png} (100%) delete mode 100644 include/mevent_801BAAC.h create mode 100644 include/wonder_transfer.h delete mode 100644 src/mevent_801BAAC.c create mode 100644 src/wonder_transfer.c diff --git a/gflib/bg.c b/gflib/bg.c index 283a87ce05..fd72f2d240 100644 --- a/gflib/bg.c +++ b/gflib/bg.c @@ -553,14 +553,14 @@ s32 ChangeBgX(u8 bg, s32 value, u8 op) switch (op) { - case 0: + case BG_COORD_SET: default: sGpuBgConfigs2[bg].bg_x = value; break; - case 1: + case BG_COORD_ADD: sGpuBgConfigs2[bg].bg_x += value; break; - case 2: + case BG_COORD_SUB: sGpuBgConfigs2[bg].bg_x -= value; break; } @@ -633,14 +633,14 @@ s32 ChangeBgY(u8 bg, s32 value, u8 op) switch (op) { - case 0: + case BG_COORD_SET: default: sGpuBgConfigs2[bg].bg_y = value; break; - case 1: + case BG_COORD_ADD: sGpuBgConfigs2[bg].bg_y += value; break; - case 2: + case BG_COORD_SUB: sGpuBgConfigs2[bg].bg_y -= value; break; } @@ -703,14 +703,14 @@ s32 ChangeBgY_ScreenOff(u8 bg, s32 value, u8 op) switch (op) { - case 0: + case BG_COORD_SET: default: sGpuBgConfigs2[bg].bg_y = value; break; - case 1: + case BG_COORD_ADD: sGpuBgConfigs2[bg].bg_y += value; break; - case 2: + case BG_COORD_SUB: sGpuBgConfigs2[bg].bg_y -= value; break; } diff --git a/gflib/bg.h b/gflib/bg.h index 60327eab3a..310790368d 100644 --- a/gflib/bg.h +++ b/gflib/bg.h @@ -31,6 +31,12 @@ enum { BG_TYPE_NONE = 0xFFFF }; +enum { + BG_COORD_SET, + BG_COORD_ADD, + BG_COORD_SUB, +}; + struct BgTemplate { u16 bg:2; // 0x1, 0x2 -> 0x3 diff --git a/graphics/wonder_transfers/wonder_card_1.bin b/graphics/wonder_card/bg1.bin similarity index 100% rename from graphics/wonder_transfers/wonder_card_1.bin rename to graphics/wonder_card/bg1.bin diff --git a/graphics/wonder_transfers/wonder_card_1.png b/graphics/wonder_card/bg1.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_1.png rename to graphics/wonder_card/bg1.png diff --git a/graphics/wonder_transfers/wonder_card_2.bin b/graphics/wonder_card/bg2.bin similarity index 100% rename from graphics/wonder_transfers/wonder_card_2.bin rename to graphics/wonder_card/bg2.bin diff --git a/graphics/wonder_transfers/wonder_card_2.png b/graphics/wonder_card/bg2.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_2.png rename to graphics/wonder_card/bg2.png diff --git a/graphics/wonder_transfers/wonder_card_3.bin b/graphics/wonder_card/bg3.bin similarity index 100% rename from graphics/wonder_transfers/wonder_card_3.bin rename to graphics/wonder_card/bg3.bin diff --git a/graphics/wonder_transfers/wonder_card_3.png b/graphics/wonder_card/bg3.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_3.png rename to graphics/wonder_card/bg3.png diff --git a/graphics/wonder_transfers/wonder_card_4.png b/graphics/wonder_card/bg4.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_4.png rename to graphics/wonder_card/bg4.png diff --git a/graphics/wonder_transfers/wonder_card_5.png b/graphics/wonder_card/bg5.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_5.png rename to graphics/wonder_card/bg5.png diff --git a/graphics/wonder_transfers/wonder_card_6.png b/graphics/wonder_card/bg6.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_6.png rename to graphics/wonder_card/bg6.png diff --git a/graphics/wonder_transfers/wonder_card_7.bin b/graphics/wonder_card/bg7.bin similarity index 100% rename from graphics/wonder_transfers/wonder_card_7.bin rename to graphics/wonder_card/bg7.bin diff --git a/graphics/wonder_transfers/wonder_card_7.png b/graphics/wonder_card/bg7.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_7.png rename to graphics/wonder_card/bg7.png diff --git a/graphics/wonder_transfers/wonder_card_8.bin b/graphics/wonder_card/bg8.bin similarity index 100% rename from graphics/wonder_transfers/wonder_card_8.bin rename to graphics/wonder_card/bg8.bin diff --git a/graphics/wonder_transfers/wonder_card_8.png b/graphics/wonder_card/bg8.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_8.png rename to graphics/wonder_card/bg8.png diff --git a/graphics/wonder_transfers/wonder_card_shadow.png b/graphics/wonder_card/icon_shadow.png similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow.png rename to graphics/wonder_card/icon_shadow.png diff --git a/graphics/wonder_transfers/wonder_card_shadow_1.pal b/graphics/wonder_card/icon_shadow_1.pal similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow_1.pal rename to graphics/wonder_card/icon_shadow_1.pal diff --git a/graphics/wonder_transfers/wonder_card_shadow_2.pal b/graphics/wonder_card/icon_shadow_2.pal similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow_2.pal rename to graphics/wonder_card/icon_shadow_2.pal diff --git a/graphics/wonder_transfers/wonder_card_shadow_3.pal b/graphics/wonder_card/icon_shadow_3.pal similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow_3.pal rename to graphics/wonder_card/icon_shadow_3.pal diff --git a/graphics/wonder_transfers/wonder_card_shadow_4.pal b/graphics/wonder_card/icon_shadow_4.pal similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow_4.pal rename to graphics/wonder_card/icon_shadow_4.pal diff --git a/graphics/wonder_transfers/wonder_card_shadow_5.pal b/graphics/wonder_card/icon_shadow_5.pal similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow_5.pal rename to graphics/wonder_card/icon_shadow_5.pal diff --git a/graphics/wonder_transfers/wonder_card_shadow_6.pal b/graphics/wonder_card/icon_shadow_6.pal similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow_6.pal rename to graphics/wonder_card/icon_shadow_6.pal diff --git a/graphics/wonder_transfers/wonder_card_shadow_7.pal b/graphics/wonder_card/icon_shadow_7.pal similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow_7.pal rename to graphics/wonder_card/icon_shadow_7.pal diff --git a/graphics/wonder_transfers/wonder_card_shadow_8.pal b/graphics/wonder_card/icon_shadow_8.pal similarity index 100% rename from graphics/wonder_transfers/wonder_card_shadow_8.pal rename to graphics/wonder_card/icon_shadow_8.pal diff --git a/graphics/wonder_transfers/wonder_news_1.bin b/graphics/wonder_news/bg1.bin similarity index 100% rename from graphics/wonder_transfers/wonder_news_1.bin rename to graphics/wonder_news/bg1.bin diff --git a/graphics/wonder_transfers/wonder_news_1.png b/graphics/wonder_news/bg1.png similarity index 100% rename from graphics/wonder_transfers/wonder_news_1.png rename to graphics/wonder_news/bg1.png diff --git a/graphics/wonder_transfers/wonder_news_2.bin b/graphics/wonder_news/bg2.bin similarity index 100% rename from graphics/wonder_transfers/wonder_news_2.bin rename to graphics/wonder_news/bg2.bin diff --git a/graphics/wonder_transfers/wonder_news_2.png b/graphics/wonder_news/bg2.png similarity index 100% rename from graphics/wonder_transfers/wonder_news_2.png rename to graphics/wonder_news/bg2.png diff --git a/graphics/wonder_transfers/wonder_news_3.bin b/graphics/wonder_news/bg3.bin similarity index 100% rename from graphics/wonder_transfers/wonder_news_3.bin rename to graphics/wonder_news/bg3.bin diff --git a/graphics/wonder_transfers/wonder_news_3.png b/graphics/wonder_news/bg3.png similarity index 100% rename from graphics/wonder_transfers/wonder_news_3.png rename to graphics/wonder_news/bg3.png diff --git a/graphics/wonder_transfers/wonder_news_7.bin b/graphics/wonder_news/bg7.bin similarity index 100% rename from graphics/wonder_transfers/wonder_news_7.bin rename to graphics/wonder_news/bg7.bin diff --git a/graphics/wonder_transfers/wonder_news_7.png b/graphics/wonder_news/bg7.png similarity index 100% rename from graphics/wonder_transfers/wonder_news_7.png rename to graphics/wonder_news/bg7.png diff --git a/graphics/wonder_transfers/wonder_news_8.bin b/graphics/wonder_news/bg8.bin similarity index 100% rename from graphics/wonder_transfers/wonder_news_8.bin rename to graphics/wonder_news/bg8.bin diff --git a/graphics/wonder_transfers/wonder_news_8.png b/graphics/wonder_news/bg8.png similarity index 100% rename from graphics/wonder_transfers/wonder_news_8.png rename to graphics/wonder_news/bg8.png diff --git a/include/constants/global.h b/include/constants/global.h index 1cece79753..518fe6bad7 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -87,6 +87,8 @@ #define MOVE_NAME_LENGTH 12 #define NUM_QUESTIONNAIRE_WORDS 4 #define QUIZ_QUESTION_LEN 9 +#define WONDER_CARD_TEXT_LENGTH 40 +#define WONDER_NEWS_TEXT_LENGTH 40 #define MALE 0 #define FEMALE 1 diff --git a/include/constants/mevent.h b/include/constants/mevent.h index 25bbcdf368..3478816fd5 100644 --- a/include/constants/mevent.h +++ b/include/constants/mevent.h @@ -12,4 +12,7 @@ #define REQUIRED_CARD_BATTLES 3 +// Number of different types/colors of Wonder Card and News backgrounds +#define NUM_WONDER_BGS 8 + #endif //GUARD_MEVENT_H diff --git a/include/global.h b/include/global.h index d14aa60f43..f8bb24da71 100644 --- a/include/global.h +++ b/include/global.h @@ -849,9 +849,9 @@ struct MysteryEventStruct { u16 unk_00; u8 unk_02; - u8 unk_03; - u8 unk_04[40]; - u8 unk_2C[10][40]; + u8 bgType; + u8 unk_04[WONDER_NEWS_TEXT_LENGTH]; + u8 unk_2C[10][WONDER_NEWS_TEXT_LENGTH]; }; struct WonderNewsSaveStruct @@ -866,14 +866,14 @@ struct MysteryEventStruct u16 unk_02; u32 unk_04; u8 unk_08_0:2; - u8 unk_08_2:4; + u8 bgType:4; u8 unk_08_6:2; u8 unk_09; - u8 unk_0A[40]; - u8 unk_32[40]; - u8 unk_5A[4][40]; - u8 unk_FA[40]; - u8 unk_122[40]; + u8 unk_0A[WONDER_CARD_TEXT_LENGTH]; + u8 unk_32[WONDER_CARD_TEXT_LENGTH]; + u8 unk_5A[4][WONDER_CARD_TEXT_LENGTH]; + u8 unk_FA[WONDER_CARD_TEXT_LENGTH]; + u8 unk_122[WONDER_CARD_TEXT_LENGTH]; }; struct WonderCardSaveStruct diff --git a/include/mevent_801BAAC.h b/include/mevent_801BAAC.h deleted file mode 100644 index d76bc92c21..0000000000 --- a/include/mevent_801BAAC.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef GUARD_MEVENT_801BAAC_H -#define GUARD_MEVENT_801BAAC_H - -bool32 InitWonderCardResources(struct WonderCard * r5, struct MEventBuffer_3430_Sub * r6); -bool32 InitWonderNewsResources(const struct WonderNews * a0); -s32 FadeToWonderCardMenu(void); -s32 FadeToWonderNewsMenu(void); -s32 FadeOutFromWonderCard(bool32 flag); -void DestroyWonderCardResources(void); -s32 FadeOutFromWonderNews(bool32 flag); -void DestroyWonderNewsResources(void); -u32 MENews_GetInput(u16 input); -void MENews_AddScrollIndicatorArrowPair(void); -void MENews_RemoveScrollIndicatorArrowPair(void); - -#endif //GUARD_MEVENT_801BAAC_H diff --git a/include/wonder_transfer.h b/include/wonder_transfer.h new file mode 100644 index 0000000000..65b4757253 --- /dev/null +++ b/include/wonder_transfer.h @@ -0,0 +1,24 @@ +#ifndef GUARD_WONDER_TRANSFER_H +#define GUARD_WONDER_TRANSFER_H + +enum { + NEWS_INPUT_A, + NEWS_INPUT_B, + NEWS_INPUT_SCROLL_UP, + NEWS_INPUT_SCROLL_DOWN, + NEWS_INPUT_NONE = 0xFF +}; + +bool32 WonderCard_Init(struct WonderCard * card, struct MEventBuffer_3430_Sub * r6); +bool32 WonderNews_Init(const struct WonderNews * news); +s32 WonderCard_Enter(void); +s32 WonderNews_Enter(void); +s32 WonderCard_Exit(bool32 flag); +s32 WonderNews_Exit(bool32 flag); +void WonderCard_Destroy(void); +void WonderNews_Destroy(void); +u32 WonderNews_GetInput(u16 input); +void WonderNews_AddScrollIndicatorArrowPair(void); +void WonderNews_RemoveScrollIndicatorArrowPair(void); + +#endif //GUARD_WONDER_TRANSFER_H diff --git a/ld_script.txt b/ld_script.txt index 218c6d3a50..14feda1c01 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -68,7 +68,7 @@ SECTIONS { src/wireless_communication_status_screen.o(.text); src/union_room_battle.o(.text); src/mevent2.o(.text); - src/mevent_801BAAC.o(.text); + src/wonder_transfer.o(.text); src/mevent_server.o(.text); src/mevent_client.o(.text); src/mevent_server_helpers.o(.text); @@ -454,7 +454,7 @@ SECTIONS { src/wireless_communication_status_screen.o(.rodata); src/union_room_battle.o(.rodata); src/mevent2.o(.rodata); - src/mevent_801BAAC.o(.rodata); + src/wonder_transfer.o(.rodata); src/mevent_server.o(.rodata); src/mevent_client.o(.rodata); src/mevent_scripts.o(.rodata); diff --git a/src/mevent2.c b/src/mevent2.c index d2c0208583..c7035ae8f0 100755 --- a/src/mevent2.c +++ b/src/mevent2.c @@ -16,7 +16,7 @@ static EWRAM_DATA bool32 gUnknown_02022C70 = FALSE; static void sub_801B180(void); static void s_DestroyWonderNews(void); static bool32 sub_801B114(const struct WonderNews *data); -static bool32 sub_801B2CC(const struct WonderCard *data); +static bool32 ValidateWonderCardData(const struct WonderCard *data); static void sub_801B330(void); static void sub_801B368(void); static void sub_801B9F8(void); @@ -140,7 +140,7 @@ bool32 sub_801B21C(const struct WonderCard *data) { struct MEventBuffer_3430_Sub *r2; struct WonderCard *r1; - if (!sub_801B2CC(data)) + if (!ValidateWonderCardData(data)) return FALSE; DestroyWonderCard(); @@ -156,7 +156,7 @@ bool32 ValidateReceivedWonderCard(void) { if (gSaveBlock1Ptr->unk_322C.wonderCard.crc != CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.wonderCard.data, sizeof(struct WonderCard))) return FALSE; - if (!sub_801B2CC(&gSaveBlock1Ptr->unk_322C.wonderCard.data)) + if (!ValidateWonderCardData(&gSaveBlock1Ptr->unk_322C.wonderCard.data)) return FALSE; if (!ValidateSavedRamScript()) return FALSE; @@ -164,7 +164,7 @@ bool32 ValidateReceivedWonderCard(void) return TRUE; } -static bool32 sub_801B2CC(const struct WonderCard *data) +static bool32 ValidateWonderCardData(const struct WonderCard *data) { if (data->unk_00 == 0) return FALSE; @@ -172,7 +172,7 @@ static bool32 sub_801B2CC(const struct WonderCard *data) return FALSE; if (!(data->unk_08_6 == 0 || data->unk_08_6 == 1 || data->unk_08_6 == 2)) return FALSE; - if (data->unk_08_2 > 7) + if (data->bgType >= NUM_WONDER_BGS) return FALSE; if (data->unk_09 > 7) return FALSE; diff --git a/src/mevent_801BAAC.c b/src/mevent_801BAAC.c deleted file mode 100644 index a3e6ee0b64..0000000000 --- a/src/mevent_801BAAC.c +++ /dev/null @@ -1,826 +0,0 @@ -#include "global.h" -#include "bg.h" -#include "gpu_regs.h" -#include "palette.h" -#include "decompress.h" -#include "malloc.h" -#include "menu.h" -#include "pokemon_icon.h" -#include "union_room.h" -#include "list_menu.h" -#include "text_window.h" -#include "string_util.h" -#include "link_rfu.h" -#include "mevent.h" -#include "mystery_gift.h" -#include "constants/rgb.h" - -struct UnkStruct_8467FB8 -{ - u8 textPal1:4; - u8 textPal2:4; - u8 textPal3:4; - u8 textPal4:4; - const u32 * tiles; - const u32 * map; - const u16 * pal; -}; - -struct UnkStruct_203F3C8_02DC -{ - u8 unk_00; - u8 unk_01[41]; - u8 unk_42[4]; -}; - -struct UnkStruct_203F3C8 -{ - /*0000*/ struct WonderCard unk_0000; - /*014c*/ struct MEventBuffer_3430_Sub unk_014C; - /*0170*/ const struct UnkStruct_8467FB8 * unk_0170; - /*0174*/ u8 unk_0174; - /*0175*/ u8 unk_0175; - /*0176*/ u16 unk_0176[3]; - /*017C*/ u8 unk_017C; - /*017D*/ u8 unk_017D[7][2]; - /*018B*/ u8 unk_018B[41]; - /*01B4*/ u8 unk_01B4[41]; - /*01DD*/ u8 unk_01DD[7]; - /*01E4*/ u8 unk_01E4[4][41]; - /*0288*/ u8 unk_0288[41]; - /*02B1*/ u8 unk_02B1[41]; - /*02DC*/ struct UnkStruct_203F3C8_02DC unk_02DC[8]; - /*045C*/ u8 buffer_045C[0x1000]; -}; - -EWRAM_DATA struct UnkStruct_203F3C8 * sWonderCardData = NULL; - -void sub_801BEF8(void); -void sub_801C178(u8 whichWindow); -void sub_801C4C0(void); -void sub_801C61C(void); - -extern const struct OamData gOamData_AffineOff_ObjNormal_32x16; - -const u8 sTextColorTable[][3] = { - {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}, - {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY} -}; -const u8 ALIGNED(4) gUnknown_082F0E18[3] = {7, 4, 7}; -const struct WindowTemplate gUnknown_082F0E1C[] = { - { - .bg = 1, - .tilemapLeft = 1, - .tilemapTop = 1, - .width = 25, - .height = 4, - .paletteNum = 2, - .baseBlock = 0x029c - }, { - .bg = 1, - .tilemapLeft = 1, - .tilemapTop = 6, - .width = 28, - .height = 8, - .paletteNum = 2, - .baseBlock = 0x01bc - }, { - .bg = 1, - .tilemapLeft = 1, - .tilemapTop = 14, - .width = 28, - .height = 5, - .paletteNum = 2, - .baseBlock = 0x0130 - } -}; - -const u16 gWonderCardBgPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_1.gbapal"); -const u16 gWonderCardBgPal2[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_2.gbapal"); -const u16 gWonderCardBgPal3[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_3.gbapal"); -const u16 gWonderCardBgPal4[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_4.gbapal"); -const u16 gWonderCardBgPal5[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_5.gbapal"); -const u16 gWonderCardBgPal6[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_6.gbapal"); -const u16 gWonderCardBgPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_7.gbapal"); -const u16 gWonderCardBgPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_8.gbapal"); -const u32 gWonderCardBgGfx1[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_1.4bpp.lz"); -const u32 gWonderCardBgTilemap1[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_1.bin.lz"); -const u32 gWonderCardBgGfx2[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_2.4bpp.lz"); -const u32 gWonderCardBgTilemap2[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_2.bin.lz"); -const u32 gWonderCardBgGfx3[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_3.4bpp.lz"); -const u32 gWonderCardBgTilemap3[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_3.bin.lz"); -const u32 gWonderCardBgGfx7[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_7.4bpp.lz"); -const u32 gWonderCardBgTilemap7[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_7.bin.lz"); -const u32 gWonderCardBgGfx8[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_8.4bpp.lz"); -const u32 gWonderCardBgTilemap8[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_8.bin.lz"); -const u16 gWonderCardShadowPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_1.gbapal"); -const u16 gWonderCardShadowPal2[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_2.gbapal"); -const u16 gWonderCardShadowPal3[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_3.gbapal"); -const u16 gWonderCardShadowPal4[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_4.gbapal"); -const u16 gWonderCardShadowPal5[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_5.gbapal"); -const u16 gWonderCardShadowPal6[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_6.gbapal"); -const u16 gWonderCardShadowPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_7.gbapal"); -const u16 gWonderCardShadowPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_8.gbapal"); -const u32 gWonderCardShadowGfx[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_shadow.4bpp.lz"); - -const struct CompressedSpriteSheet gUnknown_082F1D00 = { - gWonderCardShadowGfx, 0x100, 0x8000 -}; -const struct SpritePalette gUnknown_082F1D08[] = { - {gWonderCardShadowPal1, 0x8000}, - {gWonderCardShadowPal2, 0x8000}, - {gWonderCardShadowPal3, 0x8000}, - {gWonderCardShadowPal4, 0x8000}, - {gWonderCardShadowPal5, 0x8000}, - {gWonderCardShadowPal6, 0x8000}, - {gWonderCardShadowPal7, 0x8000}, - {gWonderCardShadowPal8, 0x8000} -}; -const struct SpriteTemplate gUnknown_082F1D48 = { - 0x8000, 0x8000, &gOamData_AffineOff_ObjNormal_32x16, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy -}; -const struct UnkStruct_8467FB8 gUnknown_082F1D60[8] = { - {1, 0, 0, 0, gWonderCardBgGfx1, gWonderCardBgTilemap1, gWonderCardBgPal1}, - {1, 0, 0, 1, gWonderCardBgGfx2, gWonderCardBgTilemap2, gWonderCardBgPal2}, - {1, 0, 0, 2, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal3}, - {1, 0, 0, 3, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal4}, - {1, 0, 0, 4, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal5}, - {1, 0, 0, 5, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal6}, - {1, 0, 0, 6, gWonderCardBgGfx7, gWonderCardBgTilemap7, gWonderCardBgPal7}, - {1, 0, 0, 7, gWonderCardBgGfx8, gWonderCardBgTilemap8, gWonderCardBgPal8} -}; - -bool32 InitWonderCardResources(struct WonderCard * r5, struct MEventBuffer_3430_Sub * r6) -{ - if (r5 == NULL || r6 == NULL) - return FALSE; - sWonderCardData = AllocZeroed(sizeof(struct UnkStruct_203F3C8)); - if (sWonderCardData == NULL) - return FALSE; - sWonderCardData->unk_0000 = *r5; - sWonderCardData->unk_014C = *r6; - if (sWonderCardData->unk_0000.unk_08_2 >= ARRAY_COUNT(gUnknown_082F1D60)) - sWonderCardData->unk_0000.unk_08_2 = 0; - if (sWonderCardData->unk_0000.unk_08_0 >= ARRAY_COUNT(gUnknown_082F0E18)) - sWonderCardData->unk_0000.unk_08_0 = 0; - if (sWonderCardData->unk_0000.unk_09 > ARRAY_COUNT(sWonderCardData->unk_017D)) - sWonderCardData->unk_0000.unk_09 = 0; - sWonderCardData->unk_0170 = &gUnknown_082F1D60[sWonderCardData->unk_0000.unk_08_2]; - return TRUE; -} - -void DestroyWonderCardResources(void) -{ - if (sWonderCardData != NULL) - { - *sWonderCardData = (struct UnkStruct_203F3C8){}; - Free(sWonderCardData); - sWonderCardData = NULL; - } -} - -s32 FadeToWonderCardMenu(void) -{ - if (sWonderCardData == NULL) - return -1; - switch(sWonderCardData->unk_0174) - { - case 0: - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - break; - case 1: - if (UpdatePaletteFade()) - return 0; - break; - case 2: - FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20); - CopyBgTilemapBufferToVram(0); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - DecompressAndCopyTileDataToVram(2, sWonderCardData->unk_0170->tiles, 0, 0x008, 0); - sWonderCardData->unk_0176[0] = AddWindow(&gUnknown_082F0E1C[0]); - sWonderCardData->unk_0176[1] = AddWindow(&gUnknown_082F0E1C[1]); - sWonderCardData->unk_0176[2] = AddWindow(&gUnknown_082F0E1C[2]); - break; - case 3: - if (FreeTempTileDataBuffersIfPossible()) - return 0; - LoadPalette(GetTextWindowPalette(1), 0x20, 0x20); - gPaletteFade.bufferTransferDisabled = TRUE; - LoadPalette(sWonderCardData->unk_0170->pal, 0x10, 0x20); - LZ77UnCompWram(sWonderCardData->unk_0170->map, sWonderCardData->buffer_045C); - CopyRectToBgTilemapBufferRect(2, sWonderCardData->buffer_045C, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0); - CopyBgTilemapBufferToVram(2); - break; - case 4: - sub_801BEF8(); - break; - case 5: - sub_801C178(0); - sub_801C178(1); - sub_801C178(2); - CopyBgTilemapBufferToVram(1); - break; - case 6: - LoadMonIconPalettes(); - break; - case 7: - ShowBg(1); - ShowBg(2); - gPaletteFade.bufferTransferDisabled = FALSE; - sub_801C4C0(); - BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); - UpdatePaletteFade(); - break; - default: - if (UpdatePaletteFade()) - return 0; - sWonderCardData->unk_0174 = 0; - return 1; - } - ++sWonderCardData->unk_0174; - return 0; -} - -s32 FadeOutFromWonderCard(bool32 flag) -{ - if (sWonderCardData == NULL) - return -1; - switch (sWonderCardData->unk_0174) - { - case 0: - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - break; - case 1: - if (UpdatePaletteFade()) - return 0; - break; - case 2: - FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20); - CopyBgTilemapBufferToVram(0); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - break; - case 3: - HideBg(1); - HideBg(2); - RemoveWindow(sWonderCardData->unk_0176[2]); - RemoveWindow(sWonderCardData->unk_0176[1]); - RemoveWindow(sWonderCardData->unk_0176[0]); - break; - case 4: - sub_801C61C(); - FreeMonIconPalettes(); - break; - case 5: - PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag); - CopyBgTilemapBufferToVram(0); - BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); - break; - default: - if (UpdatePaletteFade()) - return 0; - sWonderCardData->unk_0174 = 0; - return 1; - } - ++sWonderCardData->unk_0174; - return 0; -} - -void sub_801BEF8(void) -{ - u16 i = 0; - u16 r6; - u16 sp0[3] = {0, 0, 0}; - - memcpy(sWonderCardData->unk_018B, sWonderCardData->unk_0000.unk_0A, 40); - sWonderCardData->unk_018B[40] = EOS; - memcpy(sWonderCardData->unk_01B4, sWonderCardData->unk_0000.unk_32, 40); - sWonderCardData->unk_01B4[40] = EOS; - if (sWonderCardData->unk_0000.unk_04 > 999999) - sWonderCardData->unk_0000.unk_04 = 999999; - ConvertIntToDecimalStringN(sWonderCardData->unk_01DD, sWonderCardData->unk_0000.unk_04, STR_CONV_MODE_LEFT_ALIGN, 6); - for (i = 0; i < 4; i++) - { - memcpy(sWonderCardData->unk_01E4[i], sWonderCardData->unk_0000.unk_5A[i], 40); - sWonderCardData->unk_01E4[i][40] = EOS; - } - memcpy(sWonderCardData->unk_0288, sWonderCardData->unk_0000.unk_FA, 40); - sWonderCardData->unk_0288[40] = EOS; - switch (sWonderCardData->unk_0000.unk_08_0) - { - case 0: - memcpy(sWonderCardData->unk_02B1, sWonderCardData->unk_0000.unk_122, 40); - sWonderCardData->unk_02B1[40] = EOS; - break; - case 1: - sWonderCardData->unk_02B1[00] = EOS; - break; - case 2: - sWonderCardData->unk_02B1[00] = EOS; - sp0[0] = sWonderCardData->unk_014C.unk_00 < 999 ? sWonderCardData->unk_014C.unk_00 : 999; - sp0[1] = sWonderCardData->unk_014C.unk_02 < 999 ? sWonderCardData->unk_014C.unk_02 : 999; - sp0[2] = sWonderCardData->unk_014C.unk_04 < 999 ? sWonderCardData->unk_014C.unk_04 : 999; - for (i = 0; i < 8; i++) - { - memset(sWonderCardData->unk_02DC[i].unk_42, EOS, 4); - memset(sWonderCardData->unk_02DC[i].unk_01, EOS, 41); - } - for (i = 0, r6 = 0; i < 40; i++) - { - if (sWonderCardData->unk_0000.unk_122[i] != 0xF7) - { - sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_01[r6] = sWonderCardData->unk_0000.unk_122[i]; - r6++; - } - else - { - u8 r3 = sWonderCardData->unk_0000.unk_122[i + 1]; - if (r3 > 2) - { - i += 2; - } - else - { - ConvertIntToDecimalStringN(sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_42, sp0[r3], STR_CONV_MODE_LEADING_ZEROS, 3); - sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_00 = sWonderCardData->unk_0000.unk_122[i + 2]; - sWonderCardData->unk_0175++; - if (sWonderCardData->unk_0175 > 7) - break; - r6 = 0; - i += 2; - } - } - } - } -} - -void sub_801C178(u8 whichWindow) -{ - s8 sp0C = 0; - s32 windowId = sWonderCardData->unk_0176[whichWindow]; - PutWindowTilemap(windowId); - FillWindowPixelBuffer(windowId, 0); - switch (whichWindow) - { - case 0: - { - s32 x; - AddTextPrinterParameterized3(windowId, 3, 0, 1, sTextColorTable[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_018B); - x = 160 - GetStringWidth(3, sWonderCardData->unk_01B4, GetFontAttribute(3, 2)); - if (x < 0) - x = 0; - AddTextPrinterParameterized3(windowId, 3, x, 17, sTextColorTable[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_01B4); - if (sWonderCardData->unk_0000.unk_04 != 0) - { - AddTextPrinterParameterized3(windowId, 1, 166, 17, sTextColorTable[sWonderCardData->unk_0170->textPal1], 0, sWonderCardData->unk_01DD); - } - break; - } - case 1: - for (; sp0C < 4; sp0C++) - { - AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, sTextColorTable[sWonderCardData->unk_0170->textPal2], 0, sWonderCardData->unk_01E4[sp0C]); - } - break; - case 2: - AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0], sTextColorTable[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_0288); - if (sWonderCardData->unk_0000.unk_08_0 != 2) - { - AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0], sTextColorTable[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02B1); - } - else - { - s32 x = 0; - s32 y = gUnknown_082F0E18[sWonderCardData->unk_0000.unk_08_0] + 16; - s32 spacing = GetFontAttribute(3, 2); - for (; sp0C < sWonderCardData->unk_0175; sp0C++) - { - AddTextPrinterParameterized3(windowId, 3, x, y, sTextColorTable[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_01); - if (sWonderCardData->unk_02DC[sp0C].unk_42[0] != EOS) - { - x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_01, spacing); - AddTextPrinterParameterized3(windowId, 3, x, y, sTextColorTable[sWonderCardData->unk_0170->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_42); - x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_42, spacing) + sWonderCardData->unk_02DC[sp0C].unk_00; - } - } - } - break; - } - CopyWindowToVram(windowId, 3); -} - -void sub_801C4C0(void) -{ - u8 r7 = 0; - sWonderCardData->unk_017C = 0xFF; - if (sWonderCardData->unk_014C.unk_06 != SPECIES_NONE) - { - sWonderCardData->unk_017C = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->unk_014C.unk_06), SpriteCallbackDummy, 0xDC, 0x14, 0, FALSE); - gSprites[sWonderCardData->unk_017C].oam.priority = 2; - } - if (sWonderCardData->unk_0000.unk_09 != 0 && sWonderCardData->unk_0000.unk_08_0 == 1) - { - LoadCompressedSpriteSheetUsingHeap(&gUnknown_082F1D00); - LoadSpritePalette(&gUnknown_082F1D08[sWonderCardData->unk_0170->textPal4]); - for (; r7 < sWonderCardData->unk_0000.unk_09; r7++) - { - sWonderCardData->unk_017D[r7][0] = 0xFF; - sWonderCardData->unk_017D[r7][1] = 0xFF; - sWonderCardData->unk_017D[r7][0] = CreateSprite(&gUnknown_082F1D48, 0xd8 - 32 * r7, 0x90, 8); - if (sWonderCardData->unk_014C.unk_08[0][r7] != 0) - { - sWonderCardData->unk_017D[r7][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->unk_014C.unk_08[0][r7]), SpriteCallbackDummy, 0xd8 - 32 * r7, 0x88, 0, 0); - } - } - } -} - -void sub_801C61C(void) -{ - u8 r6 = 0; - if (sWonderCardData->unk_017C != 0xFF) - FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->unk_017C]); - if (sWonderCardData->unk_0000.unk_09 != 0 && sWonderCardData->unk_0000.unk_08_0 == 1) - { - for (; r6 < sWonderCardData->unk_0000.unk_09; r6++) - { - if (sWonderCardData->unk_017D[r6][0] != 0xFF) - { - DestroySprite(&gSprites[sWonderCardData->unk_017D[r6][0]]); - } - if (sWonderCardData->unk_017D[r6][1] != 0xFF) - { - FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->unk_017D[r6][1]]); - } - } - FreeSpriteTilesByTag(0x8000); - FreeSpritePaletteByTag(0x8000); - } -} - -struct UnkStruct_203F3CC -{ - /*0000*/ struct WonderNews unk_0000; - /*01bc*/ const struct UnkStruct_8467FB8 * unk_01BC; - /*01c0*/ u8 unk_01C0_0:1; - u8 unk_01C0_1:7; - /*01c1*/ u8 unk_01C1; - /*01c2*/ u8 unk_01C2_0:1; - u8 unk_01C2_1:7; - /*01c3*/ u8 unk_01C3_0:1; - u8 unk_01C3_1:7; - /*01c4*/ u16 unk_01C4; - /*01c6*/ u16 unk_01C6; - /*01c8*/ u16 unk_01C8[2]; - /*01cc*/ u8 filler_01CC[2]; - /*01ce*/ u8 unk_01CE[41]; - /*01f7*/ u8 unk_01F7[10][41]; - /*0394*/ struct ScrollArrowsTemplate unk_0394; - /*03a4*/ u8 buffer_03A4[0x1000]; -}; - -EWRAM_DATA struct UnkStruct_203F3CC * sWonderNewsData = NULL; - -void sub_801CDCC(void); -void sub_801CE7C(void); -void sub_801CFA4(void); - -const u8 gUnknown_082F1DE0[][3] = { - {0, 2, 3}, - {0, 1, 2} -}; -const struct WindowTemplate gUnknown_082F1DE8[] = { - { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 0, - .width = 28, - .height = 3, - .paletteNum = 2, - .baseBlock = 0x2AC - }, { - .bg = 2, - .tilemapLeft = 1, - .tilemapTop = 3, - .width = 28, - .height = 20, - .paletteNum = 2, - .baseBlock = 0x07C - } -}; -const struct ScrollArrowsTemplate gUnknown_082F1DF8 = { - 0x02, 0xe8, 0x18, 0x03, 0xe8, 0x98, - 0x0000, 0x0002, 0x1000, 0x1000, 0x0 -}; -const u16 gWonderNewsPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_1.gbapal"); -const u16 gWonderNewsPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_7.gbapal"); -const u16 gWonderNewsPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_8.gbapal"); -const u32 gWonderNewsGfx1[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_1.4bpp.lz"); -const u32 gWonderNewsTilemap1[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_1.bin.lz"); -const u32 gWonderNewsGfx2[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_2.4bpp.lz"); -const u32 gWonderNewsTilemap2[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_2.bin.lz"); -const u32 gWonderNewsGfx3[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_3.4bpp.lz"); -const u32 gWonderNewsTilemap3[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_3.bin.lz"); -const u32 gWonderNewsGfx7[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_7.4bpp.lz"); -const u32 gWonderNewsTilemap7[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_7.bin.lz"); -const u32 gWonderNewsGfx8[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_8.4bpp.lz"); -const u32 gWonderNewsTilemap8[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_8.bin.lz"); - -const struct UnkStruct_8467FB8 gUnknown_082F24C8[] = { - {1, 0, 0, 0, gWonderNewsGfx1, gWonderNewsTilemap1, gWonderNewsPal1}, - {1, 0, 0, 0, gWonderNewsGfx2, gWonderNewsTilemap2, gWonderCardBgPal2}, - {1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal3}, - {1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal4}, - {1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal5}, - {1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal6}, - {1, 0, 0, 0, gWonderNewsGfx7, gWonderNewsTilemap7, gWonderNewsPal7}, - {1, 0, 0, 0, gWonderNewsGfx8, gWonderNewsTilemap8, gWonderNewsPal8} -}; - -bool32 InitWonderNewsResources(const struct WonderNews * a0) -{ - if (a0 == NULL) - return FALSE; - sWonderNewsData = AllocZeroed(sizeof(struct UnkStruct_203F3CC)); - if (sWonderNewsData == NULL) - return FALSE; - sWonderNewsData->unk_0000 = *a0; - if (sWonderNewsData->unk_0000.unk_03 >= ARRAY_COUNT(gUnknown_082F24C8)) - sWonderNewsData->unk_0000.unk_03 = 0; - sWonderNewsData->unk_01BC = &gUnknown_082F24C8[sWonderNewsData->unk_0000.unk_03]; - sWonderNewsData->unk_01C1 = 0xFF; - return TRUE; -} - -void DestroyWonderNewsResources(void) -{ - if (sWonderNewsData != NULL) - { - *sWonderNewsData = (struct UnkStruct_203F3CC){}; - Free(sWonderNewsData); - sWonderNewsData = NULL; - } -} - -s32 FadeToWonderNewsMenu(void) -{ - if (sWonderNewsData == NULL) - return -1; - - switch (sWonderNewsData->unk_01C0_1) - { - case 0: - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - break; - case 1: - if (UpdatePaletteFade()) - return 0; - ChangeBgY(0, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgY(3, 0, 0); - SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH)); - SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(26, 152)); - SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ); - SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ); - SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON); - break; - case 2: - FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 20); - CopyBgTilemapBufferToVram(0); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(3); - DecompressAndCopyTileDataToVram(3, sWonderNewsData->unk_01BC->tiles, 0, 8, 0); - sWonderNewsData->unk_01C8[0] = AddWindow(&gUnknown_082F1DE8[0]); - sWonderNewsData->unk_01C8[1] = AddWindow(&gUnknown_082F1DE8[1]); - break; - case 3: - if (FreeTempTileDataBuffersIfPossible()) - return 0; - LoadPalette(GetTextWindowPalette(1), 0x20, 0x20); - gPaletteFade.bufferTransferDisabled = TRUE; - LoadPalette(sWonderNewsData->unk_01BC->pal, 0x10, 0x20); - LZ77UnCompWram(sWonderNewsData->unk_01BC->map, sWonderNewsData->buffer_03A4); - CopyRectToBgTilemapBufferRect(1, sWonderNewsData->buffer_03A4, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0); - CopyRectToBgTilemapBufferRect(3, sWonderNewsData->buffer_03A4, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(3); - break; - case 4: - sub_801CDCC(); - break; - case 5: - sub_801CE7C(); - CopyBgTilemapBufferToVram(0); - CopyBgTilemapBufferToVram(2); - break; - case 6: - ShowBg(1); - ShowBg(2); - ShowBg(3); - gPaletteFade.bufferTransferDisabled = FALSE; - sWonderNewsData->unk_01C1 = AddScrollIndicatorArrowPair(&sWonderNewsData->unk_0394, &sWonderNewsData->unk_01C6); - BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); - UpdatePaletteFade(); - break; - default: - if (UpdatePaletteFade()) - return 0; - sWonderNewsData->unk_01C0_1 = 0; - return 1; - } - - ++sWonderNewsData->unk_01C0_1; - return 0; -} - -s32 FadeOutFromWonderNews(bool32 flag) -{ - if (sWonderNewsData == NULL) - return -1; - switch (sWonderNewsData->unk_01C0_1) - { - case 0: - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); - break; - case 1: - if (UpdatePaletteFade()) - return 0; - ChangeBgY(2, 0, 0); - SetGpuReg(REG_OFFSET_WIN0H, 0); - SetGpuReg(REG_OFFSET_WIN0V, 0); - SetGpuReg(REG_OFFSET_WININ, 0); - SetGpuReg(REG_OFFSET_WINOUT, 0); - ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON); - break; - case 2: - FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20); - FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 24); - FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 24); - CopyBgTilemapBufferToVram(0); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(3); - break; - case 3: - HideBg(1); - HideBg(2); - RemoveWindow(sWonderNewsData->unk_01C8[1]); - RemoveWindow(sWonderNewsData->unk_01C8[0]); - break; - case 4: - ChangeBgY(2, 0, 0); - ChangeBgY(3, 0, 0); - if (sWonderNewsData->unk_01C1 != 0xFF) - { - RemoveScrollIndicatorArrowPair(sWonderNewsData->unk_01C1); - sWonderNewsData->unk_01C1 = 0xFF; - } - break; - case 5: - PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag); - MG_DrawCheckerboardPattern(3); - CopyBgTilemapBufferToVram(0); - CopyBgTilemapBufferToVram(3); - BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); - break; - default: - if (UpdatePaletteFade()) - return 0; - sWonderNewsData->unk_01C0_1 = 0; - return 1; - } - ++sWonderNewsData->unk_01C0_1; - return 0; -} - -void MENews_RemoveScrollIndicatorArrowPair(void) -{ - if (!sWonderNewsData->unk_01C0_0 && sWonderNewsData->unk_01C1 != 0xFF) - { - RemoveScrollIndicatorArrowPair(sWonderNewsData->unk_01C1); - sWonderNewsData->unk_01C1 = 0xFF; - sWonderNewsData->unk_01C0_0 = TRUE; - } -} - - -void MENews_AddScrollIndicatorArrowPair(void) -{ - if (sWonderNewsData->unk_01C0_0) - { - sWonderNewsData->unk_01C1 = AddScrollIndicatorArrowPair(&sWonderNewsData->unk_0394, &sWonderNewsData->unk_01C6); - sWonderNewsData->unk_01C0_0 = FALSE; - } -} - -u32 MENews_GetInput(u16 input) -{ - if (sWonderNewsData->unk_01C2_0) - { - sub_801CFA4(); - return 0xFF; - } - switch (input) - { - case A_BUTTON: - return 0; - case B_BUTTON: - return 1; - case DPAD_UP: - if (sWonderNewsData->unk_01C6 == 0) - return 0xFF; - if (sWonderNewsData->unk_01C0_0) - return 0xFF; - sWonderNewsData->unk_01C3_0 = FALSE; - break; - case DPAD_DOWN: - if (sWonderNewsData->unk_01C6 == sWonderNewsData->unk_01C4) - return 0xFF; - if (sWonderNewsData->unk_01C0_0) - return 0xFF; - sWonderNewsData->unk_01C3_0 = TRUE; - break; - default: - return 0xFF; - } - sWonderNewsData->unk_01C2_0 = TRUE; - sWonderNewsData->unk_01C2_1 = 2; - sWonderNewsData->unk_01C3_1 = 0; - if (sWonderNewsData->unk_01C3_0 == FALSE) - return 2; - else - return 3; -} - -void sub_801CDCC(void) -{ - u8 i = 0; - memcpy(sWonderNewsData->unk_01CE, sWonderNewsData->unk_0000.unk_04, 40); - sWonderNewsData->unk_01CE[40] = EOS; - for (; i < 10; ++i) - { - memcpy(sWonderNewsData->unk_01F7[i], sWonderNewsData->unk_0000.unk_2C[i], 40); - sWonderNewsData->unk_01F7[i][40] = EOS; - if (i > 7 && sWonderNewsData->unk_01F7[i][0] != EOS) - ++sWonderNewsData->unk_01C4; - } - sWonderNewsData->unk_0394 = gUnknown_082F1DF8; - sWonderNewsData->unk_0394.fullyDownThreshold = sWonderNewsData->unk_01C4; -} - -void sub_801CE7C(void) -{ - u8 i = 0; - s32 x; - PutWindowTilemap(sWonderNewsData->unk_01C8[0]); - PutWindowTilemap(sWonderNewsData->unk_01C8[1]); - FillWindowPixelBuffer(sWonderNewsData->unk_01C8[0], 0); - FillWindowPixelBuffer(sWonderNewsData->unk_01C8[1], 0); - x = (0xe0 - GetStringWidth(3, sWonderNewsData->unk_01CE, GetFontAttribute(3, 2))) / 2; - if (x < 0) - x = 0; - AddTextPrinterParameterized3(sWonderNewsData->unk_01C8[0], 3, x, 6, gUnknown_082F1DE0[sWonderNewsData->unk_01BC->textPal1], 0, sWonderNewsData->unk_01CE); - for (; i < 10; ++i) - { - AddTextPrinterParameterized3(sWonderNewsData->unk_01C8[1], 3, 0, 16 * i + 2, gUnknown_082F1DE0[sWonderNewsData->unk_01BC->textPal2], 0, sWonderNewsData->unk_01F7[i]); - } - CopyWindowToVram(sWonderNewsData->unk_01C8[0], 3); - CopyWindowToVram(sWonderNewsData->unk_01C8[1], 3); -} - -void sub_801CFA4(void) -{ - u16 r4 = sWonderNewsData->unk_01C2_1; - r4 <<= 8; - if (sWonderNewsData->unk_01C3_0) - { - ChangeBgY(2, r4, 1); - ChangeBgY(3, r4, 1); - } - else - { - ChangeBgY(2, r4, 2); - ChangeBgY(3, r4, 2); - } - sWonderNewsData->unk_01C3_1 += sWonderNewsData->unk_01C2_1; - if (sWonderNewsData->unk_01C3_1 > 15) - { - if (sWonderNewsData->unk_01C3_0) - ++sWonderNewsData->unk_01C6; - else - --sWonderNewsData->unk_01C6; - sWonderNewsData->unk_01C2_0 = FALSE; - sWonderNewsData->unk_01C3_1 = 0; - } -} diff --git a/src/mystery_gift.c b/src/mystery_gift.c index 6ae6a95348..4ff4aebf08 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -22,7 +22,7 @@ #include "list_menu.h" #include "string_util.h" #include "mevent.h" -#include "mevent_801BAAC.h" +#include "wonder_transfer.h" #include "save.h" #include "link.h" #include "mevent_client.h" @@ -119,9 +119,8 @@ static const struct WindowTemplate sMainWindows[] = { .height = 0x05, .paletteNum = 0x0d, .baseBlock = 0x004f - }, { - 0xFF - } + }, + DUMMY_WIN_TEMPLATE }; static const struct WindowTemplate sWindowTemplate_PromptYesOrNo_Width28 = { @@ -730,24 +729,16 @@ static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cann if (cannotSend) { if (cannotToss == 0) - { input = DoMysteryGiftListMenu(&sWindowTemplate_7by6, &sListMenu_ReceiveToss, 1, 0x00A, 0xE0); - } else - { input = DoMysteryGiftListMenu(&sWindowTemplate_7by4, &sListMenu_Receive, 1, 0x00A, 0xE0); - } } else { if (cannotToss == 0) - { input = DoMysteryGiftListMenu(&sWindowTemplate_7by8, &sListMenu_ReceiveSendToss, 1, 0x00A, 0xE0); - } else - { input = DoMysteryGiftListMenu(&sWindowTemplate_7by6, &sListMenu_ReceiveSend, 1, 0x00A, 0xE0); - } } if (input != -1) { @@ -774,13 +765,9 @@ static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cann static bool32 ValidateCardOrNews(bool32 cardOrNews) { if (cardOrNews == 0) - { return ValidateReceivedWonderCard(); - } else - { return ValidateReceivedWonderNews(); - } } static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews) @@ -789,29 +776,21 @@ static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews) { case 0: if (cardOrNews == 0) - { - InitWonderCardResources(GetSavedWonderCard(), sav1_get_mevent_buffer_2()); - } + WonderCard_Init(GetSavedWonderCard(), sav1_get_mevent_buffer_2()); else - { - InitWonderNewsResources(GetSavedWonderNews()); - } + WonderNews_Init(GetSavedWonderNews()); (*state)++; break; case 1: if (cardOrNews == 0) { - if (!FadeToWonderCardMenu()) - { + if (!WonderCard_Enter()) return FALSE; - } } else { - if (!FadeToWonderNewsMenu()) - { + if (!WonderNews_Enter()) return FALSE; - } } *state = 0; return TRUE; @@ -823,13 +802,9 @@ static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews) static bool32 DestroyNewsOrCard(bool32 cardOrNews) { if (cardOrNews == 0) - { DestroyWonderCard(); - } else - { DestroyWonderNews(); - } return TRUE; } @@ -837,9 +812,9 @@ static bool32 TearDownCardOrNews_ReturnToTopMenu(bool32 cardOrNews, bool32 arg1) { if (cardOrNews == 0) { - if (FadeOutFromWonderCard(arg1) != 0) + if (WonderCard_Exit(arg1) != 0) { - DestroyWonderCardResources(); + WonderCard_Destroy(); return TRUE; } else @@ -849,9 +824,9 @@ static bool32 TearDownCardOrNews_ReturnToTopMenu(bool32 cardOrNews, bool32 arg1) } else { - if (FadeOutFromWonderNews(arg1) != 0) + if (WonderNews_Exit(arg1) != 0) { - DestroyWonderNewsResources(); + WonderNews_Destroy(); return TRUE; } else @@ -864,25 +839,17 @@ static bool32 TearDownCardOrNews_ReturnToTopMenu(bool32 cardOrNews, bool32 arg1) static s32 mevent_message_prompt_discard(u8 * textState, u16 * windowId, bool32 cardOrNews) { if (cardOrNews == 0) - { return mevent_message_print_and_prompt_yes_no(textState, windowId, TRUE, gText_IfThrowAwayCardEventWontHappen); - } else - { return mevent_message_print_and_prompt_yes_no(textState, windowId, TRUE, gText_OkayToDiscardNews); - } } static bool32 mevent_message_was_thrown_away(u8 * textState, bool32 cardOrNews) { if (cardOrNews == 0) - { return MG_PrintTextOnWindow1AndWaitButton(textState, gText_WonderCardThrownAway); - } else - { return MG_PrintTextOnWindow1AndWaitButton(textState, gText_WonderNewsThrownAway); - } } static bool32 mevent_save_game(u8 * state) @@ -992,18 +959,14 @@ static bool32 PrintMGSuccessMessage(u8 * state, const u8 * arg1, u16 * arg2) { case 0: if (arg1 != NULL) - { AddTextPrinterToWindow1(arg1); - } PlayFanfare(MUS_OBTAIN_ITEM); *arg2 = 0; (*state)++; break; case 1: - if (++(*arg2) > 0xF0) - { + if (++(*arg2) > 240) (*state)++; - } break; case 2: if (IsFanfareTaskInactive()) @@ -1079,13 +1042,9 @@ static bool32 PrintMGSendStatus(u8 * state, u16 * arg1, u8 arg2, u32 msgId) u32 flag; const u8 * str = mevent_message_stamp_card_etc_send_status(&flag, arg2, msgId); if (flag) - { return PrintMGSuccessMessage(state, str, arg1); - } else - { return MG_PrintTextOnWindow1AndWaitButton(state, str); - } } void task_add_00_mystery_gift(void) @@ -1123,24 +1082,16 @@ void task00_mystery_gift(u8 taskId) case 0: data->IsCardOrNews = 0; if (ValidateReceivedWonderCard() == TRUE) - { data->state = 18; - } else - { data->state = 2; - } break; case 1: data->IsCardOrNews = 1; if (ValidateReceivedWonderNews() == TRUE) - { data->state = 18; - } else - { data->state = 2; - } break; case -2u: data->state = 37; @@ -1169,13 +1120,9 @@ void task00_mystery_gift(u8 taskId) } case 3: if (data->IsCardOrNews == 0) - { AddTextPrinterToWindow1(gText_WhereShouldCardBeAccessed); - } else - { AddTextPrinterToWindow1(gText_WhereShouldNewsBeAccessed); - } data->state = 4; break; case 4: @@ -1214,23 +1161,15 @@ void task00_mystery_gift(u8 taskId) { case 0: if (data->source == 1) - { MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_CARD); - } else if (data->source == 0) - { MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_CARD); - } break; case 1: if (data->source == 1) - { MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_NEWS); - } else if (data->source == 0) - { MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_NEWS); - } break; } data->state = 6; @@ -1364,38 +1303,26 @@ void task00_mystery_gift(u8 taskId) if (PrintStringAndWait2Seconds(&data->textState, gText_CommunicationCompleted)) { if (data->source == 1) - { StringCopy(gStringVar1, gLinkPlayers[0].name); - } data->state = 15; } break; case 15: r1 = mevent_message(&sp0, data->IsCardOrNews, data->source, data->prevPromptWindowId); if (r1 == NULL) - { r1 = data->buffer; - } if (sp0) - { flag = PrintMGSuccessMessage(&data->textState, r1, &data->curPromptWindowId); - } else - { flag = MG_PrintTextOnWindow1AndWaitButton(&data->textState, r1); - } if (flag) { if (data->prevPromptWindowId == 3) { if (data->source == 1) - { GenerateRandomNews(1); - } else - { GenerateRandomNews(2); - } } if (!sp0) { @@ -1417,37 +1344,29 @@ void task00_mystery_gift(u8 taskId) break; case 17: if (mevent_save_game(&data->textState)) - { data->state = 18; - } break; case 18: if (HandleLoadWonderCardOrNews(&data->textState, data->IsCardOrNews)) - { data->state = 20; - } break; case 20: if (data->IsCardOrNews == 0) { - if (({JOY_NEW(A_BUTTON);})) - { + if (JOY_NEW(A_BUTTON)) data->state = 21; - } - if (({JOY_NEW(B_BUTTON);})) - { + if (JOY_NEW(B_BUTTON)) data->state = 27; - } } else { - switch (MENews_GetInput(gMain.newKeys)) + switch (WonderNews_GetInput(gMain.newKeys)) { - case 0: - MENews_RemoveScrollIndicatorArrowPair(); + case NEWS_INPUT_A: + WonderNews_RemoveScrollIndicatorArrowPair(); data->state = 21; break; - case 1: + case NEWS_INPUT_B: data->state = 27; break; } @@ -1459,24 +1378,16 @@ void task00_mystery_gift(u8 taskId) if (data->IsCardOrNews == 0) { if (WonderCard_Test_Unk_08_6()) - { result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->IsCardOrNews, FALSE); - } else - { result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->IsCardOrNews, TRUE); - } } else { if (WonderNews_Test_Unk_02()) - { result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->IsCardOrNews, FALSE); - } else - { result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->IsCardOrNews, TRUE); - } } switch (result) { @@ -1491,9 +1402,7 @@ void task00_mystery_gift(u8 taskId) break; case -2u: if (data->IsCardOrNews == 1) - { - MENews_AddScrollIndicatorArrowPair(); - } + WonderNews_AddScrollIndicatorArrowPair(); data->state = 20; break; } @@ -1504,13 +1413,9 @@ void task00_mystery_gift(u8 taskId) { case 0: if (data->IsCardOrNews == 0 && CheckReceivedGiftFromWonderCard() == TRUE) - { data->state = 23; - } else - { data->state = 24; - } break; case 1: data->state = 21; @@ -1543,9 +1448,7 @@ void task00_mystery_gift(u8 taskId) break; case 25: if (mevent_save_game(&data->textState)) - { data->state = 26; - } break; case 26: if (mevent_message_was_thrown_away(&data->textState, data->IsCardOrNews)) @@ -1556,15 +1459,11 @@ void task00_mystery_gift(u8 taskId) break; case 27: if (TearDownCardOrNews_ReturnToTopMenu(data->IsCardOrNews, 0)) - { data->state = 0; - } break; case 28: if (TearDownCardOrNews_ReturnToTopMenu(data->IsCardOrNews, 1)) - { data->state = 3; - } break; case 29: if (TearDownCardOrNews_ReturnToTopMenu(data->IsCardOrNews, 1)) diff --git a/src/wonder_transfer.c b/src/wonder_transfer.c new file mode 100644 index 0000000000..1928ba12e5 --- /dev/null +++ b/src/wonder_transfer.c @@ -0,0 +1,870 @@ +#include "global.h" +#include "bg.h" +#include "gpu_regs.h" +#include "palette.h" +#include "decompress.h" +#include "malloc.h" +#include "menu.h" +#include "pokemon_icon.h" +#include "union_room.h" +#include "list_menu.h" +#include "text_window.h" +#include "string_util.h" +#include "link_rfu.h" +#include "mevent.h" +#include "mystery_gift.h" +#include "wonder_transfer.h" +#include "constants/rgb.h" +#include "constants/mevent.h" + +struct WonderGraphics +{ + u8 textPal1:4; + u8 textPal2:4; + u8 textPal3:4; + u8 textPal4:4; + const u32 * tiles; + const u32 * map; + const u16 * pal; +}; + +//====================== +// Wonder Cards +//====================== + +enum { + CARD_WIN_0, + CARD_WIN_1, + CARD_WIN_2, + CARD_WIN_COUNT +}; + +#define TAG_ICON_SHADOW 0x8000 + +struct UnkStruct_203F3C8_02DC +{ + u8 unk_00; + u8 unk_01[WONDER_CARD_TEXT_LENGTH + 1]; + u8 unk_42[4]; +}; + +struct WonderCardData +{ + /*0000*/ struct WonderCard card; + /*014c*/ struct MEventBuffer_3430_Sub unk_014C; + /*0170*/ const struct WonderGraphics * gfx; + /*0174*/ u8 enterExitState; + /*0175*/ u8 unk_0175; + /*0176*/ u16 windowIds[CARD_WIN_COUNT]; + /*017C*/ u8 monIconSpriteId; + /*017D*/ u8 unk_017D[7][2]; + /*018B*/ u8 unk_018B[WONDER_CARD_TEXT_LENGTH + 1]; + /*01B4*/ u8 unk_01B4[WONDER_CARD_TEXT_LENGTH + 1]; + /*01DD*/ u8 unk_01DD[7]; + /*01E4*/ u8 unk_01E4[4][WONDER_CARD_TEXT_LENGTH + 1]; + /*0288*/ u8 unk_0288[WONDER_CARD_TEXT_LENGTH + 1]; + /*02B1*/ u8 unk_02B1[WONDER_CARD_TEXT_LENGTH + 1]; + /*02DC*/ struct UnkStruct_203F3C8_02DC unk_02DC[8]; + /*045C*/ u8 buffer_045C[0x1000]; +}; + +EWRAM_DATA static struct WonderCardData * sWonderCardData = NULL; + +static void BufferCardText(void); +static void DrawCardWindow(u8 whichWindow); +static void CreateCardSprites(void); +static void DestroyCardSprites(void); + +extern const struct OamData gOamData_AffineOff_ObjNormal_32x16; + +static const u8 sCard_TextColorTable[][3] = { + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY} +}; +const u8 ALIGNED(4) sCard_TextYOffsets[3] = {7, 4, 7}; +static const struct WindowTemplate sCard_WindowTemplates[] = { + [CARD_WIN_0] = { + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 25, + .height = 4, + .paletteNum = 2, + .baseBlock = 0x029c + }, + [CARD_WIN_1] = { + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 6, + .width = 28, + .height = 8, + .paletteNum = 2, + .baseBlock = 0x01bc + }, + [CARD_WIN_2] = { + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 14, + .width = 28, + .height = 5, + .paletteNum = 2, + .baseBlock = 0x0130 + } +}; + +static const u16 sWonderCardBgPal1[] = INCBIN_U16("graphics/wonder_card/bg1.gbapal"); +static const u16 sWonderCardBgPal2[] = INCBIN_U16("graphics/wonder_card/bg2.gbapal"); +static const u16 sWonderCardBgPal3[] = INCBIN_U16("graphics/wonder_card/bg3.gbapal"); +static const u16 sWonderCardBgPal4[] = INCBIN_U16("graphics/wonder_card/bg4.gbapal"); +static const u16 sWonderCardBgPal5[] = INCBIN_U16("graphics/wonder_card/bg5.gbapal"); +static const u16 sWonderCardBgPal6[] = INCBIN_U16("graphics/wonder_card/bg6.gbapal"); +static const u16 sWonderCardBgPal7[] = INCBIN_U16("graphics/wonder_card/bg7.gbapal"); +static const u16 sWonderCardBgPal8[] = INCBIN_U16("graphics/wonder_card/bg8.gbapal"); +static const u32 sWonderCardBgGfx1[] = INCBIN_U32("graphics/wonder_card/bg1.4bpp.lz"); +static const u32 sWonderCardBgTilemap1[] = INCBIN_U32("graphics/wonder_card/bg1.bin.lz"); +static const u32 sWonderCardBgGfx2[] = INCBIN_U32("graphics/wonder_card/bg2.4bpp.lz"); +static const u32 sWonderCardBgTilemap2[] = INCBIN_U32("graphics/wonder_card/bg2.bin.lz"); +static const u32 sWonderCardBgGfx3[] = INCBIN_U32("graphics/wonder_card/bg3.4bpp.lz"); +static const u32 sWonderCardBgTilemap3[] = INCBIN_U32("graphics/wonder_card/bg3.bin.lz"); +static const u32 sWonderCardBgGfx7[] = INCBIN_U32("graphics/wonder_card/bg7.4bpp.lz"); +static const u32 sWonderCardBgTilemap7[] = INCBIN_U32("graphics/wonder_card/bg7.bin.lz"); +static const u32 sWonderCardBgGfx8[] = INCBIN_U32("graphics/wonder_card/bg8.4bpp.lz"); +static const u32 sWonderCardBgTilemap8[] = INCBIN_U32("graphics/wonder_card/bg8.bin.lz"); +static const u16 sIconShadowPal1[] = INCBIN_U16("graphics/wonder_card/icon_shadow_1.gbapal"); +static const u16 sIconShadowPal2[] = INCBIN_U16("graphics/wonder_card/icon_shadow_2.gbapal"); +static const u16 sIconShadowPal3[] = INCBIN_U16("graphics/wonder_card/icon_shadow_3.gbapal"); +static const u16 sIconShadowPal4[] = INCBIN_U16("graphics/wonder_card/icon_shadow_4.gbapal"); +static const u16 sIconShadowPal5[] = INCBIN_U16("graphics/wonder_card/icon_shadow_5.gbapal"); +static const u16 sIconShadowPal6[] = INCBIN_U16("graphics/wonder_card/icon_shadow_6.gbapal"); +static const u16 sIconShadowPal7[] = INCBIN_U16("graphics/wonder_card/icon_shadow_7.gbapal"); +static const u16 sIconShadowPal8[] = INCBIN_U16("graphics/wonder_card/icon_shadow_8.gbapal"); +static const u32 sIconShadowGfx[] = INCBIN_U32("graphics/wonder_card/icon_shadow.4bpp.lz"); + +static const struct CompressedSpriteSheet sSpriteSheet_IconShadow = { + sIconShadowGfx, 0x100, TAG_ICON_SHADOW +}; + +static const struct SpritePalette sSpritePalettes_IconShadow[] = { + {sIconShadowPal1, TAG_ICON_SHADOW}, + {sIconShadowPal2, TAG_ICON_SHADOW}, + {sIconShadowPal3, TAG_ICON_SHADOW}, + {sIconShadowPal4, TAG_ICON_SHADOW}, + {sIconShadowPal5, TAG_ICON_SHADOW}, + {sIconShadowPal6, TAG_ICON_SHADOW}, + {sIconShadowPal7, TAG_ICON_SHADOW}, + {sIconShadowPal8, TAG_ICON_SHADOW} +}; + +static const struct SpriteTemplate sSpriteTemplate_IconShadow = { + .tileTag = TAG_ICON_SHADOW, + .paletteTag = TAG_ICON_SHADOW, + .oam = &gOamData_AffineOff_ObjNormal_32x16, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy +}; + +static const struct WonderGraphics sCardGraphics[NUM_WONDER_BGS] = { + {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 0, .tiles = sWonderCardBgGfx1, .map = sWonderCardBgTilemap1, .pal = sWonderCardBgPal1}, + {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 1, .tiles = sWonderCardBgGfx2, .map = sWonderCardBgTilemap2, .pal = sWonderCardBgPal2}, + {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 2, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal3}, + {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 3, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal4}, + {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 4, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal5}, + {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 5, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal6}, + {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 6, .tiles = sWonderCardBgGfx7, .map = sWonderCardBgTilemap7, .pal = sWonderCardBgPal7}, + {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 7, .tiles = sWonderCardBgGfx8, .map = sWonderCardBgTilemap8, .pal = sWonderCardBgPal8} +}; + +bool32 WonderCard_Init(struct WonderCard * card, struct MEventBuffer_3430_Sub * r6) +{ + if (card == NULL || r6 == NULL) + return FALSE; + sWonderCardData = AllocZeroed(sizeof(*sWonderCardData)); + if (sWonderCardData == NULL) + return FALSE; + sWonderCardData->card = *card; + sWonderCardData->unk_014C = *r6; + if (sWonderCardData->card.bgType >= ARRAY_COUNT(sCardGraphics)) + sWonderCardData->card.bgType = 0; + if (sWonderCardData->card.unk_08_0 >= ARRAY_COUNT(sCard_TextYOffsets)) + sWonderCardData->card.unk_08_0 = 0; + if (sWonderCardData->card.unk_09 > ARRAY_COUNT(sWonderCardData->unk_017D)) + sWonderCardData->card.unk_09 = 0; + sWonderCardData->gfx = &sCardGraphics[sWonderCardData->card.bgType]; + return TRUE; +} + +void WonderCard_Destroy(void) +{ + if (sWonderCardData != NULL) + { + *sWonderCardData = (struct WonderCardData){}; + Free(sWonderCardData); + sWonderCardData = NULL; + } +} + +s32 WonderCard_Enter(void) +{ + if (sWonderCardData == NULL) + return -1; + switch(sWonderCardData->enterExitState) + { + case 0: + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); + break; + case 1: + if (UpdatePaletteFade()) + return 0; + break; + case 2: + FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + DecompressAndCopyTileDataToVram(2, sWonderCardData->gfx->tiles, 0, 0x008, 0); + sWonderCardData->windowIds[CARD_WIN_0] = AddWindow(&sCard_WindowTemplates[CARD_WIN_0]); + sWonderCardData->windowIds[CARD_WIN_1] = AddWindow(&sCard_WindowTemplates[CARD_WIN_1]); + sWonderCardData->windowIds[CARD_WIN_2] = AddWindow(&sCard_WindowTemplates[CARD_WIN_2]); + break; + case 3: + if (FreeTempTileDataBuffersIfPossible()) + return 0; + LoadPalette(GetTextWindowPalette(1), 0x20, 0x20); + gPaletteFade.bufferTransferDisabled = TRUE; + LoadPalette(sWonderCardData->gfx->pal, 0x10, 0x20); + LZ77UnCompWram(sWonderCardData->gfx->map, sWonderCardData->buffer_045C); + CopyRectToBgTilemapBufferRect(2, sWonderCardData->buffer_045C, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0); + CopyBgTilemapBufferToVram(2); + break; + case 4: + BufferCardText(); + break; + case 5: + DrawCardWindow(CARD_WIN_0); + DrawCardWindow(CARD_WIN_1); + DrawCardWindow(CARD_WIN_2); + CopyBgTilemapBufferToVram(1); + break; + case 6: + LoadMonIconPalettes(); + break; + case 7: + ShowBg(1); + ShowBg(2); + gPaletteFade.bufferTransferDisabled = FALSE; + CreateCardSprites(); + BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); + UpdatePaletteFade(); + break; + default: + if (UpdatePaletteFade()) + return 0; + sWonderCardData->enterExitState = 0; + return 1; + } + ++sWonderCardData->enterExitState; + return 0; +} + +s32 WonderCard_Exit(bool32 flag) +{ + if (sWonderCardData == NULL) + return -1; + switch (sWonderCardData->enterExitState) + { + case 0: + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); + break; + case 1: + if (UpdatePaletteFade()) + return 0; + break; + case 2: + FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + break; + case 3: + HideBg(1); + HideBg(2); + RemoveWindow(sWonderCardData->windowIds[CARD_WIN_2]); + RemoveWindow(sWonderCardData->windowIds[CARD_WIN_1]); + RemoveWindow(sWonderCardData->windowIds[CARD_WIN_0]); + break; + case 4: + DestroyCardSprites(); + FreeMonIconPalettes(); + break; + case 5: + PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag); + CopyBgTilemapBufferToVram(0); + BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); + break; + default: + if (UpdatePaletteFade()) + return 0; + sWonderCardData->enterExitState = 0; + return 1; + } + ++sWonderCardData->enterExitState; + return 0; +} + +static void BufferCardText(void) +{ + u16 i = 0; + u16 r6; + u16 sp0[3] = {0, 0, 0}; + + memcpy(sWonderCardData->unk_018B, sWonderCardData->card.unk_0A, WONDER_CARD_TEXT_LENGTH); + sWonderCardData->unk_018B[WONDER_CARD_TEXT_LENGTH] = EOS; + memcpy(sWonderCardData->unk_01B4, sWonderCardData->card.unk_32, WONDER_CARD_TEXT_LENGTH); + sWonderCardData->unk_01B4[WONDER_CARD_TEXT_LENGTH] = EOS; + if (sWonderCardData->card.unk_04 > 999999) + sWonderCardData->card.unk_04 = 999999; + ConvertIntToDecimalStringN(sWonderCardData->unk_01DD, sWonderCardData->card.unk_04, STR_CONV_MODE_LEFT_ALIGN, 6); + for (i = 0; i < 4; i++) + { + memcpy(sWonderCardData->unk_01E4[i], sWonderCardData->card.unk_5A[i], WONDER_CARD_TEXT_LENGTH); + sWonderCardData->unk_01E4[i][WONDER_CARD_TEXT_LENGTH] = EOS; + } + memcpy(sWonderCardData->unk_0288, sWonderCardData->card.unk_FA, WONDER_CARD_TEXT_LENGTH); + sWonderCardData->unk_0288[WONDER_CARD_TEXT_LENGTH] = EOS; + switch (sWonderCardData->card.unk_08_0) + { + case 0: + memcpy(sWonderCardData->unk_02B1, sWonderCardData->card.unk_122, WONDER_CARD_TEXT_LENGTH); + sWonderCardData->unk_02B1[WONDER_CARD_TEXT_LENGTH] = EOS; + break; + case 1: + sWonderCardData->unk_02B1[0] = EOS; + break; + case 2: + sWonderCardData->unk_02B1[0] = EOS; + sp0[0] = sWonderCardData->unk_014C.unk_00 < 999 ? sWonderCardData->unk_014C.unk_00 : 999; + sp0[1] = sWonderCardData->unk_014C.unk_02 < 999 ? sWonderCardData->unk_014C.unk_02 : 999; + sp0[2] = sWonderCardData->unk_014C.unk_04 < 999 ? sWonderCardData->unk_014C.unk_04 : 999; + for (i = 0; i < 8; i++) + { + memset(sWonderCardData->unk_02DC[i].unk_42, EOS, sizeof(sWonderCardData->unk_02DC[i].unk_42)); + memset(sWonderCardData->unk_02DC[i].unk_01, EOS, sizeof(sWonderCardData->unk_02DC[i].unk_01)); + } + for (i = 0, r6 = 0; i < WONDER_CARD_TEXT_LENGTH; i++) + { + if (sWonderCardData->card.unk_122[i] != CHAR_DYNAMIC) + { + sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_01[r6] = sWonderCardData->card.unk_122[i]; + r6++; + } + else + { + u8 r3 = sWonderCardData->card.unk_122[i + 1]; + if (r3 > 2) + { + i += 2; + } + else + { + ConvertIntToDecimalStringN(sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_42, sp0[r3], STR_CONV_MODE_LEADING_ZEROS, 3); + sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_00 = sWonderCardData->card.unk_122[i + 2]; + sWonderCardData->unk_0175++; + if (sWonderCardData->unk_0175 > 7) + break; + r6 = 0; + i += 2; + } + } + } + } +} + +static void DrawCardWindow(u8 whichWindow) +{ + s8 sp0C = 0; + s32 windowId = sWonderCardData->windowIds[whichWindow]; + PutWindowTilemap(windowId); + FillWindowPixelBuffer(windowId, 0); + switch (whichWindow) + { + case CARD_WIN_0: + { + s32 x; + AddTextPrinterParameterized3(windowId, 3, 0, 1, sCard_TextColorTable[sWonderCardData->gfx->textPal1], 0, sWonderCardData->unk_018B); + x = 160 - GetStringWidth(3, sWonderCardData->unk_01B4, GetFontAttribute(3, FONTATTR_LETTER_SPACING)); + if (x < 0) + x = 0; + AddTextPrinterParameterized3(windowId, 3, x, 17, sCard_TextColorTable[sWonderCardData->gfx->textPal1], 0, sWonderCardData->unk_01B4); + if (sWonderCardData->card.unk_04 != 0) + AddTextPrinterParameterized3(windowId, 1, 166, 17, sCard_TextColorTable[sWonderCardData->gfx->textPal1], 0, sWonderCardData->unk_01DD); + break; + } + case CARD_WIN_1: + for (; sp0C < 4; sp0C++) + AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, sCard_TextColorTable[sWonderCardData->gfx->textPal2], 0, sWonderCardData->unk_01E4[sp0C]); + break; + case CARD_WIN_2: + AddTextPrinterParameterized3(windowId, 3, 0, sCard_TextYOffsets[sWonderCardData->card.unk_08_0], sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_0288); + if (sWonderCardData->card.unk_08_0 != 2) + { + AddTextPrinterParameterized3(windowId, 3, 0, 16 + sCard_TextYOffsets[sWonderCardData->card.unk_08_0], sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_02B1); + } + else + { + s32 x = 0; + s32 y = sCard_TextYOffsets[sWonderCardData->card.unk_08_0] + 16; + s32 spacing = GetFontAttribute(3, FONTATTR_LETTER_SPACING); + for (; sp0C < sWonderCardData->unk_0175; sp0C++) + { + AddTextPrinterParameterized3(windowId, 3, x, y, sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_01); + if (sWonderCardData->unk_02DC[sp0C].unk_42[0] != EOS) + { + x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_01, spacing); + AddTextPrinterParameterized3(windowId, 3, x, y, sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_42); + x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_42, spacing) + sWonderCardData->unk_02DC[sp0C].unk_00; + } + } + } + break; + } + CopyWindowToVram(windowId, 3); +} + +static void CreateCardSprites(void) +{ + u8 r7 = 0; + sWonderCardData->monIconSpriteId = SPRITE_NONE; + if (sWonderCardData->unk_014C.unk_06 != SPECIES_NONE) + { + sWonderCardData->monIconSpriteId = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->unk_014C.unk_06), SpriteCallbackDummy, 220, 20, 0, FALSE); + gSprites[sWonderCardData->monIconSpriteId].oam.priority = 2; + } + if (sWonderCardData->card.unk_09 != 0 && sWonderCardData->card.unk_08_0 == 1) + { + LoadCompressedSpriteSheetUsingHeap(&sSpriteSheet_IconShadow); + LoadSpritePalette(&sSpritePalettes_IconShadow[sWonderCardData->gfx->textPal4]); + for (; r7 < sWonderCardData->card.unk_09; r7++) + { + sWonderCardData->unk_017D[r7][0] = SPRITE_NONE; + sWonderCardData->unk_017D[r7][1] = SPRITE_NONE; + sWonderCardData->unk_017D[r7][0] = CreateSprite(&sSpriteTemplate_IconShadow, 216 - 32 * r7, 144, 8); + if (sWonderCardData->unk_014C.unk_08[0][r7] != SPECIES_NONE) + sWonderCardData->unk_017D[r7][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->unk_014C.unk_08[0][r7]), + SpriteCallbackDummy, + 216 - 32 * r7, + 136, 0, 0); + } + } +} + +static void DestroyCardSprites(void) +{ + u8 r6 = 0; + if (sWonderCardData->monIconSpriteId != SPRITE_NONE) + FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->monIconSpriteId]); + if (sWonderCardData->card.unk_09 != 0 && sWonderCardData->card.unk_08_0 == 1) + { + for (; r6 < sWonderCardData->card.unk_09; r6++) + { + if (sWonderCardData->unk_017D[r6][0] != SPRITE_NONE) + DestroySprite(&gSprites[sWonderCardData->unk_017D[r6][0]]); + if (sWonderCardData->unk_017D[r6][1] != SPRITE_NONE) + FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->unk_017D[r6][1]]); + } + FreeSpriteTilesByTag(TAG_ICON_SHADOW); + FreeSpritePaletteByTag(TAG_ICON_SHADOW); + } +} + +//====================== +// Wonder News +//====================== + +enum { + NEWS_WIN_0, + NEWS_WIN_1, + NEWS_WIN_COUNT +}; + +#define TAG_ARROWS 0x1000 + +struct WonderNewsData +{ + /*0000*/ struct WonderNews news; + /*01bc*/ const struct WonderGraphics * gfx; + /*01c0*/ u8 arrowsRemoved:1; + u8 enterExitState:7; + /*01c1*/ u8 arrowTaskId; + /*01c2*/ bool8 scrolling:1; + u8 scrollIncrement:7; + /*01c3*/ bool8 scrollingDown:1; + u8 scrollTotal:7; + /*01c4*/ u16 scrollEnd; + /*01c6*/ u16 scrollOffset; + /*01c8*/ u16 windowIds[NEWS_WIN_COUNT]; + /*01cc*/ u8 filler_01CC[2]; + /*01ce*/ u8 unk_01CE[WONDER_NEWS_TEXT_LENGTH + 1]; + /*01f7*/ u8 unk_01F7[10][WONDER_NEWS_TEXT_LENGTH + 1]; + /*0394*/ struct ScrollArrowsTemplate arrowsTemplate; + /*03a4*/ u8 buffer_03A4[0x1000]; +}; + +EWRAM_DATA static struct WonderNewsData * sWonderNewsData = NULL; + +static void BufferNewsText(void); +static void DrawNewsWindows(void); +static void UpdateNewsScroll(void); + +static const u8 sNews_TextColorTable[][3] = { + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}, + {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY} +}; + +static const struct WindowTemplate sNews_WindowTemplates[] = { + [NEWS_WIN_0] = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 0, + .width = 28, + .height = 3, + .paletteNum = 2, + .baseBlock = 0x2AC + }, + [NEWS_WIN_1] = { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 3, + .width = 28, + .height = 20, + .paletteNum = 2, + .baseBlock = 0x07C + } +}; + +static const struct ScrollArrowsTemplate sNews_ArrowsTemplate = { + .firstArrowType = SCROLL_ARROW_UP, + .firstX = 232, + .firstY = 24, + .secondArrowType = SCROLL_ARROW_DOWN, + .secondX = 232, + .secondY = 152, + .fullyUpThreshold = 0, + .fullyDownThreshold = 2, + .tileTag = TAG_ARROWS, + .palTag = TAG_ARROWS, + .palNum = 0 +}; + +static const u16 sWonderNewsPal1[] = INCBIN_U16("graphics/wonder_news/bg1.gbapal"); +static const u16 sWonderNewsPal7[] = INCBIN_U16("graphics/wonder_news/bg7.gbapal"); +static const u16 sWonderNewsPal8[] = INCBIN_U16("graphics/wonder_news/bg8.gbapal"); +static const u32 sWonderNewsGfx1[] = INCBIN_U32("graphics/wonder_news/bg1.4bpp.lz"); +static const u32 sWonderNewsTilemap1[] = INCBIN_U32("graphics/wonder_news/bg1.bin.lz"); +static const u32 sWonderNewsGfx2[] = INCBIN_U32("graphics/wonder_news/bg2.4bpp.lz"); +static const u32 sWonderNewsTilemap2[] = INCBIN_U32("graphics/wonder_news/bg2.bin.lz"); +static const u32 sWonderNewsGfx3[] = INCBIN_U32("graphics/wonder_news/bg3.4bpp.lz"); +static const u32 sWonderNewsTilemap3[] = INCBIN_U32("graphics/wonder_news/bg3.bin.lz"); +static const u32 sWonderNewsGfx7[] = INCBIN_U32("graphics/wonder_news/bg7.4bpp.lz"); +static const u32 sWonderNewsTilemap7[] = INCBIN_U32("graphics/wonder_news/bg7.bin.lz"); +static const u32 sWonderNewsGfx8[] = INCBIN_U32("graphics/wonder_news/bg8.4bpp.lz"); +static const u32 sWonderNewsTilemap8[] = INCBIN_U32("graphics/wonder_news/bg8.bin.lz"); + +static const struct WonderGraphics sNewsGraphics[NUM_WONDER_BGS] = { + {1, 0, 0, 0, sWonderNewsGfx1, sWonderNewsTilemap1, sWonderNewsPal1}, + {1, 0, 0, 0, sWonderNewsGfx2, sWonderNewsTilemap2, sWonderCardBgPal2}, + {1, 0, 0, 0, sWonderNewsGfx3, sWonderNewsTilemap3, sWonderCardBgPal3}, + {1, 0, 0, 0, sWonderNewsGfx3, sWonderNewsTilemap3, sWonderCardBgPal4}, + {1, 0, 0, 0, sWonderNewsGfx3, sWonderNewsTilemap3, sWonderCardBgPal5}, + {1, 0, 0, 0, sWonderNewsGfx3, sWonderNewsTilemap3, sWonderCardBgPal6}, + {1, 0, 0, 0, sWonderNewsGfx7, sWonderNewsTilemap7, sWonderNewsPal7}, + {1, 0, 0, 0, sWonderNewsGfx8, sWonderNewsTilemap8, sWonderNewsPal8} +}; + +bool32 WonderNews_Init(const struct WonderNews * news) +{ + if (news == NULL) + return FALSE; + sWonderNewsData = AllocZeroed(sizeof(*sWonderNewsData)); + if (sWonderNewsData == NULL) + return FALSE; + sWonderNewsData->news = *news; + if (sWonderNewsData->news.bgType >= ARRAY_COUNT(sNewsGraphics)) + sWonderNewsData->news.bgType = 0; + sWonderNewsData->gfx = &sNewsGraphics[sWonderNewsData->news.bgType]; + sWonderNewsData->arrowTaskId = TASK_NONE; + return TRUE; +} + +void WonderNews_Destroy(void) +{ + if (sWonderNewsData != NULL) + { + *sWonderNewsData = (struct WonderNewsData){}; + Free(sWonderNewsData); + sWonderNewsData = NULL; + } +} + +s32 WonderNews_Enter(void) +{ + if (sWonderNewsData == NULL) + return -1; + + switch (sWonderNewsData->enterExitState) + { + case 0: + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); + break; + case 1: + if (UpdatePaletteFade()) + return 0; + ChangeBgY(0, 0, 0); + ChangeBgY(1, 0, 0); + ChangeBgY(2, 0, 0); + ChangeBgY(3, 0, 0); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(26, 152)); + SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ); + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ); + SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON); + break; + case 2: + FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 20); + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(3); + DecompressAndCopyTileDataToVram(3, sWonderNewsData->gfx->tiles, 0, 8, 0); + sWonderNewsData->windowIds[NEWS_WIN_0] = AddWindow(&sNews_WindowTemplates[NEWS_WIN_0]); + sWonderNewsData->windowIds[NEWS_WIN_1] = AddWindow(&sNews_WindowTemplates[NEWS_WIN_1]); + break; + case 3: + if (FreeTempTileDataBuffersIfPossible()) + return 0; + LoadPalette(GetTextWindowPalette(1), 0x20, 0x20); + gPaletteFade.bufferTransferDisabled = TRUE; + LoadPalette(sWonderNewsData->gfx->pal, 0x10, 0x20); + LZ77UnCompWram(sWonderNewsData->gfx->map, sWonderNewsData->buffer_03A4); + CopyRectToBgTilemapBufferRect(1, sWonderNewsData->buffer_03A4, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0); + CopyRectToBgTilemapBufferRect(3, sWonderNewsData->buffer_03A4, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(3); + break; + case 4: + BufferNewsText(); + break; + case 5: + DrawNewsWindows(); + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(2); + break; + case 6: + ShowBg(1); + ShowBg(2); + ShowBg(3); + gPaletteFade.bufferTransferDisabled = FALSE; + sWonderNewsData->arrowTaskId = AddScrollIndicatorArrowPair(&sWonderNewsData->arrowsTemplate, &sWonderNewsData->scrollOffset); + BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); + UpdatePaletteFade(); + break; + default: + if (UpdatePaletteFade()) + return 0; + sWonderNewsData->enterExitState = 0; + return 1; + } + + ++sWonderNewsData->enterExitState; + return 0; +} + +s32 WonderNews_Exit(bool32 flag) +{ + if (sWonderNewsData == NULL) + return -1; + switch (sWonderNewsData->enterExitState) + { + case 0: + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); + break; + case 1: + if (UpdatePaletteFade()) + return 0; + ChangeBgY(2, 0, 0); + SetGpuReg(REG_OFFSET_WIN0H, 0); + SetGpuReg(REG_OFFSET_WIN0V, 0); + SetGpuReg(REG_OFFSET_WININ, 0); + SetGpuReg(REG_OFFSET_WINOUT, 0); + ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON); + break; + case 2: + FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20); + FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 24); + FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 24); + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(3); + break; + case 3: + HideBg(1); + HideBg(2); + RemoveWindow(sWonderNewsData->windowIds[NEWS_WIN_1]); + RemoveWindow(sWonderNewsData->windowIds[NEWS_WIN_0]); + break; + case 4: + ChangeBgY(2, 0, 0); + ChangeBgY(3, 0, 0); + if (sWonderNewsData->arrowTaskId != TASK_NONE) + { + RemoveScrollIndicatorArrowPair(sWonderNewsData->arrowTaskId); + sWonderNewsData->arrowTaskId = TASK_NONE; + } + break; + case 5: + PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag); + MG_DrawCheckerboardPattern(3); + CopyBgTilemapBufferToVram(0); + CopyBgTilemapBufferToVram(3); + BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); + break; + default: + if (UpdatePaletteFade()) + return 0; + sWonderNewsData->enterExitState = 0; + return 1; + } + ++sWonderNewsData->enterExitState; + return 0; +} + +void WonderNews_RemoveScrollIndicatorArrowPair(void) +{ + if (!sWonderNewsData->arrowsRemoved && sWonderNewsData->arrowTaskId != TASK_NONE) + { + RemoveScrollIndicatorArrowPair(sWonderNewsData->arrowTaskId); + sWonderNewsData->arrowTaskId = TASK_NONE; + sWonderNewsData->arrowsRemoved = TRUE; + } +} + + +void WonderNews_AddScrollIndicatorArrowPair(void) +{ + if (sWonderNewsData->arrowsRemoved) + { + sWonderNewsData->arrowTaskId = AddScrollIndicatorArrowPair(&sWonderNewsData->arrowsTemplate, &sWonderNewsData->scrollOffset); + sWonderNewsData->arrowsRemoved = FALSE; + } +} + +u32 WonderNews_GetInput(u16 input) +{ + if (sWonderNewsData->scrolling) + { + UpdateNewsScroll(); + return NEWS_INPUT_NONE; + } + switch (input) + { + case A_BUTTON: + return NEWS_INPUT_A; + case B_BUTTON: + return NEWS_INPUT_B; + case DPAD_UP: + if (sWonderNewsData->scrollOffset == 0) + return NEWS_INPUT_NONE; + if (sWonderNewsData->arrowsRemoved) + return NEWS_INPUT_NONE; + sWonderNewsData->scrollingDown = FALSE; + break; + case DPAD_DOWN: + if (sWonderNewsData->scrollOffset == sWonderNewsData->scrollEnd) + return NEWS_INPUT_NONE; + if (sWonderNewsData->arrowsRemoved) + return NEWS_INPUT_NONE; + sWonderNewsData->scrollingDown = TRUE; + break; + default: + return NEWS_INPUT_NONE; + } + + // Init scroll + sWonderNewsData->scrolling = TRUE; + sWonderNewsData->scrollIncrement = 2; + sWonderNewsData->scrollTotal = 0; + if (!sWonderNewsData->scrollingDown) + return NEWS_INPUT_SCROLL_UP; + else + return NEWS_INPUT_SCROLL_DOWN; +} + +static void BufferNewsText(void) +{ + u8 i = 0; + memcpy(sWonderNewsData->unk_01CE, sWonderNewsData->news.unk_04, WONDER_NEWS_TEXT_LENGTH); + sWonderNewsData->unk_01CE[WONDER_NEWS_TEXT_LENGTH] = EOS; + for (; i < 10; ++i) + { + memcpy(sWonderNewsData->unk_01F7[i], sWonderNewsData->news.unk_2C[i], WONDER_NEWS_TEXT_LENGTH); + sWonderNewsData->unk_01F7[i][WONDER_NEWS_TEXT_LENGTH] = EOS; + if (i > 7 && sWonderNewsData->unk_01F7[i][0] != EOS) + ++sWonderNewsData->scrollEnd; + } + sWonderNewsData->arrowsTemplate = sNews_ArrowsTemplate; + sWonderNewsData->arrowsTemplate.fullyDownThreshold = sWonderNewsData->scrollEnd; +} + +static void DrawNewsWindows(void) +{ + u8 i = 0; + s32 x; + PutWindowTilemap(sWonderNewsData->windowIds[NEWS_WIN_0]); + PutWindowTilemap(sWonderNewsData->windowIds[NEWS_WIN_1]); + FillWindowPixelBuffer(sWonderNewsData->windowIds[NEWS_WIN_0], 0); + FillWindowPixelBuffer(sWonderNewsData->windowIds[NEWS_WIN_1], 0); + x = (224 - GetStringWidth(3, sWonderNewsData->unk_01CE, GetFontAttribute(3, FONTATTR_LETTER_SPACING))) / 2; + if (x < 0) + x = 0; + AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_0], 3, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->textPal1], 0, sWonderNewsData->unk_01CE); + for (; i < 10; ++i) + AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_1], 3, 0, 16 * i + 2, sNews_TextColorTable[sWonderNewsData->gfx->textPal2], 0, sWonderNewsData->unk_01F7[i]); + CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_0], 3); + CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_1], 3); +} + +static void UpdateNewsScroll(void) +{ + u16 bgMove = sWonderNewsData->scrollIncrement; + bgMove *= 256; + if (sWonderNewsData->scrollingDown) + { + ChangeBgY(2, bgMove, BG_COORD_ADD); + ChangeBgY(3, bgMove, BG_COORD_ADD); + } + else + { + ChangeBgY(2, bgMove, BG_COORD_SUB); + ChangeBgY(3, bgMove, BG_COORD_SUB); + } + sWonderNewsData->scrollTotal += sWonderNewsData->scrollIncrement; + if (sWonderNewsData->scrollTotal > 15) + { + if (sWonderNewsData->scrollingDown) + ++sWonderNewsData->scrollOffset; + else + --sWonderNewsData->scrollOffset; + sWonderNewsData->scrolling = FALSE; + sWonderNewsData->scrollTotal = 0; + } +} diff --git a/sym_ewram.txt b/sym_ewram.txt index 88c4461cb0..360a91d328 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -14,7 +14,7 @@ .include "src/wireless_communication_status_screen.o" .include "src/union_room_battle.o" .include "src/mevent2.o" - .include "src/mevent_801BAAC.o" + .include "src/wonder_transfer.o" .include "src/mevent_server.o" .include "src/mevent_client.o" .include "src/union_room_chat.o" From 37e52c4f34fa3d6bb25f670bfc77ed220962f834 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 14 Oct 2021 14:10:42 -0400 Subject: [PATCH 061/417] Document some mystery gift --- include/ereader_screen.h | 2 +- include/mystery_gift.h | 8 +- include/union_room.h | 6 +- src/ereader_screen.c | 16 +- src/link_rfu_2.c | 2 +- src/main_menu.c | 6 +- src/mystery_gift.c | 620 ++++++++++++++++++++------------------- src/union_room.c | 15 +- 8 files changed, 351 insertions(+), 324 deletions(-) diff --git a/include/ereader_screen.h b/include/ereader_screen.h index 1daea4be0d..a6ac65b17f 100755 --- a/include/ereader_screen.h +++ b/include/ereader_screen.h @@ -1,6 +1,6 @@ #ifndef GUARD_EREADER_SCREEN_H #define GUARD_EREADER_SCREEN_H -void task_add_00_ereader(void); +void CreateEReaderTask(void); #endif // GUARD_EREADER_SCREEN_H diff --git a/include/mystery_gift.h b/include/mystery_gift.h index fb0414ee06..42c7f47ba3 100644 --- a/include/mystery_gift.h +++ b/include/mystery_gift.h @@ -4,15 +4,15 @@ extern bool8 gGiftIsFromEReader; u16 GetMysteryGiftBaseBlock(void); -void c2_mystery_gift_e_reader_run(void); +void CB2_MysteryGiftEReader(void); void PrintMysteryGiftOrEReaderTopMenu(bool8 isJapanese, bool32 usePickOkCancel); void MG_DrawCheckerboardPattern(u32 bg); void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void); bool32 MG_PrintTextOnWindow1AndWaitButton(u8 *textState, const u8 *str); void AddTextPrinterToWindow1(const u8 *src); -void c2_ereader(void); -void c2_mystery_gift(void); +void CB2_InitEReader(void); +void CB2_InitMysteryGift(void); void MG_DrawTextBorder(u8 windowId); -s8 mevent_message_print_and_prompt_yes_no(u8 *textState, u16 *windowId, bool8 yesNoBoxPlacement, const u8 *str); +s8 DoMysteryGiftYesNo(u8 *textState, u16 *windowId, bool8 yesNoBoxPlacement, const u8 *str); #endif //GUARD_MYSTERY_GIFT_H diff --git a/include/union_room.h b/include/union_room.h index b364e75590..acff4b5929 100644 --- a/include/union_room.h +++ b/include/union_room.h @@ -153,9 +153,9 @@ extern u8 gUnionRoomRequestedMonType; u8 CreateTask_CreateTradeMenu(void); void SetUsingUnionRoomStartMenu(void); -void MEvent_CreateTask_CardOrNewsWithFriend(u32 activity); -void MEvent_CreateTask_CardOrNewsOverWireless(u32 activity); -void MEvent_CreateTask_Leader(u32 activity); +void CreateTask_LinkMysteryGiftWithFriend(u32 activity); +void CreateTask_LinkMysteryGiftOverWireless(u32 activity); +void CreateTask_SendMysteryGift(u32 activity); u8 CreateTask_ListenToWireless(void); void StartUnionRoomBattle(u16 battleFlags); diff --git a/src/ereader_screen.c b/src/ereader_screen.c index f5edbc628a..31794628b9 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -13,7 +13,7 @@ #include "util.h" #include "constants/songs.h" -struct Unk81D5014 +struct EReaderTaskData { u16 unk0; u16 unk2; @@ -36,7 +36,7 @@ struct Unk03006370 u32 *unk8; }; -static void sub_81D5084(u8); +static void Task_EReader(u8); struct Unk03006370 gUnknown_03006370; @@ -209,11 +209,11 @@ static u32 sub_81D4EE4(u8 *arg0, u16 *arg1) return 0; } -void task_add_00_ereader(void) +void CreateEReaderTask(void) { - struct Unk81D5014 *data; - u8 taskId = CreateTask(sub_81D5084, 0); - data = (struct Unk81D5014 *)gTasks[taskId].data; + struct EReaderTaskData *data; + u8 taskId = CreateTask(Task_EReader, 0); + data = (struct EReaderTaskData *)gTasks[taskId].data; data->unk8 = 0; data->unk9 = 0; data->unkA = 0; @@ -244,9 +244,9 @@ static bool32 sub_81D5064(u16 *arg0, u16 arg1) return FALSE; } -static void sub_81D5084(u8 taskId) +static void Task_EReader(u8 taskId) { - struct Unk81D5014 *data = (struct Unk81D5014 *)gTasks[taskId].data; + struct EReaderTaskData *data = (struct EReaderTaskData *)gTasks[taskId].data; switch (data->unk8) { case 0: diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index f2caef9499..0ab452a8d8 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -1981,7 +1981,7 @@ static void RfuCheckErrorStatus(void) { if (gRfu.errorState == RFU_ERROR_STATE_OCCURRED && lman.childClockSlave_flag == 0) { - if (gMain.callback2 == c2_mystery_gift_e_reader_run || lman.init_param->mboot_flag) + if (gMain.callback2 == CB2_MysteryGiftEReader || lman.init_param->mboot_flag) gWirelessCommType = 2; SetMainCallback2(CB2_LinkError); gMain.savedCallback = CB2_LinkError; diff --git a/src/main_menu.c b/src/main_menu.c index a60cf1a283..8fd25abe1a 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -90,7 +90,7 @@ * - If the user selected New Game, advance to Task_NewGameBirchSpeech_Init. * - If the user selected Continue, advance to CB2_ContinueSavedGame. * - If the user selected the Options menu, advance to CB2_InitOptionMenu. - * - If the user selected Mystery Gift, advance to CB2_MysteryGift. However, + * - If the user selected Mystery Gift, advance to CB2_InitMysteryGift. However, * if the wireless adapter was removed, instead advance to * Task_DisplayMainMenuInvalidActionError. * - Code to start a Mystery Event is present here, but is unreachable in this @@ -1073,7 +1073,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId) DestroyTask(taskId); break; case ACTION_MYSTERY_GIFT: - SetMainCallback2(c2_mystery_gift); + SetMainCallback2(CB2_InitMysteryGift); DestroyTask(taskId); break; case ACTION_MYSTERY_EVENTS: @@ -1081,7 +1081,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId) DestroyTask(taskId); break; case ACTION_EREADER: - SetMainCallback2(c2_ereader); + SetMainCallback2(CB2_InitEReader); DestroyTask(taskId); break; case ACTION_INVALID: diff --git a/src/mystery_gift.c b/src/mystery_gift.c index 4ff4aebf08..eb14d0e7a9 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -33,8 +33,8 @@ #include "constants/cable_club.h" void bgid_upload_textbox_1(u8 bgId); -void task_add_00_mystery_gift(void); -void task00_mystery_gift(u8 taskId); +static void CreateMysteryGiftTask(void); +static void Task_MysteryGift(u8 taskId); EWRAM_DATA u8 sDownArrowCounterAndYCoordIdx[8] = {}; EWRAM_DATA bool8 gGiftIsFromEReader = FALSE; @@ -52,8 +52,8 @@ struct MysteryGiftTaskData u8 textState; u8 unkA; u8 unkB; - u8 IsCardOrNews; - u8 source; + bool8 isWonderNews; + bool8 sourceIsFriend; u8 prevPromptWindowId; u8 * buffer; }; @@ -355,14 +355,14 @@ ALIGNED(2) const u8 sMG_Ereader_TextColor_1[] = { 0, 1, 2 }; ALIGNED(2) const u8 sMG_Ereader_TextColor_1_Copy[] = { 0, 1, 2 }; ALIGNED(2) const u8 sMG_Ereader_TextColor_2[] = { 1, 2, 3 }; -void vblankcb_mystery_gift_e_reader_run(void) +static void VBlankCB_MysteryGiftEReader(void) { ProcessSpriteCopyRequests(); LoadOam(); TransferPlttBuffer(); } -void c2_mystery_gift_e_reader_run(void) +void CB2_MysteryGiftEReader(void) { RunTasks(); RunTextPrinters(); @@ -370,7 +370,7 @@ void c2_mystery_gift_e_reader_run(void) BuildOamBuffer(); } -bool32 HandleMysteryGiftOrEReaderSetup(s32 mg_or_ereader) +static bool32 HandleMysteryGiftOrEReaderSetup(s32 isEReader) { switch (gMain.state) { @@ -417,7 +417,7 @@ bool32 HandleMysteryGiftOrEReaderSetup(s32 mg_or_ereader) FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11); MG_DrawCheckerboardPattern(3); - PrintMysteryGiftOrEReaderTopMenu(mg_or_ereader, 0); + PrintMysteryGiftOrEReaderTopMenu(isEReader, FALSE); gMain.state++; break; case 2: @@ -431,7 +431,7 @@ bool32 HandleMysteryGiftOrEReaderSetup(s32 mg_or_ereader) ShowBg(0); ShowBg(3); PlayBGM(MUS_RG_MYSTERY_GIFT); - SetVBlankCallback(vblankcb_mystery_gift_e_reader_run); + SetVBlankCallback(VBlankCB_MysteryGiftEReader); EnableInterrupts(INTR_FLAG_VBLANK | INTR_FLAG_VCOUNT | INTR_FLAG_TIMER3 | INTR_FLAG_SERIAL); return TRUE; } @@ -439,24 +439,24 @@ bool32 HandleMysteryGiftOrEReaderSetup(s32 mg_or_ereader) return FALSE; } -void c2_mystery_gift(void) +void CB2_InitMysteryGift(void) { - if (HandleMysteryGiftOrEReaderSetup(0)) + if (HandleMysteryGiftOrEReaderSetup(FALSE)) { - SetMainCallback2(c2_mystery_gift_e_reader_run); + SetMainCallback2(CB2_MysteryGiftEReader); gGiftIsFromEReader = FALSE; - task_add_00_mystery_gift(); + CreateMysteryGiftTask(); } RunTasks(); } -void c2_ereader(void) +void CB2_InitEReader(void) { - if (HandleMysteryGiftOrEReaderSetup(1)) + if (HandleMysteryGiftOrEReaderSetup(TRUE)) { - SetMainCallback2(c2_mystery_gift_e_reader_run); + SetMainCallback2(CB2_MysteryGiftEReader); gGiftIsFromEReader = TRUE; - task_add_00_ereader(); + CreateEReaderTask(); } } @@ -471,12 +471,12 @@ void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void) SetMainCallback2(CB2_InitTitleScreen); } -void PrintMysteryGiftOrEReaderTopMenu(bool8 mg_or_ereader, bool32 usePickOkCancel) +void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 usePickOkCancel) { const u8 * header; const u8 * options; FillWindowPixelBuffer(0, 0); - if (mg_or_ereader == 0) + if (!isEReader) { header = gText_MysteryGift; options = !usePickOkCancel ? gText_PickOKExit : gText_PickOKCancel; @@ -639,7 +639,7 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whi windowTemplate.tilemapLeft = 0; response = DoMysteryGiftListMenu(&windowTemplate, &listMenuTemplate, 1, 0x00A, 0xE0); - if (response != -1) + if (response != LIST_NOTHING_CHOSEN) { ClearWindowTilemap(2); CopyWindowToVram(2, 1); @@ -647,7 +647,7 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whi return response; } -s8 mevent_message_print_and_prompt_yes_no(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, const u8 * str) +s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, const u8 * str) { struct WindowTemplate windowTemplate; s8 input; @@ -708,14 +708,10 @@ static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cann switch (*textState) { case 0: - if (cannotToss == 0) - { + if (!cannotToss) StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithCards); - } else - { StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithNews); - } *windowId = AddWindow(&sMysteryGiftMenuWindowTemplate); FillWindowPixelBuffer(*windowId, 0x11); AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); @@ -728,19 +724,19 @@ static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cann windowTemplate = sWindowTemplate_YesNoBox; if (cannotSend) { - if (cannotToss == 0) + if (!cannotToss) input = DoMysteryGiftListMenu(&sWindowTemplate_7by6, &sListMenu_ReceiveToss, 1, 0x00A, 0xE0); else input = DoMysteryGiftListMenu(&sWindowTemplate_7by4, &sListMenu_Receive, 1, 0x00A, 0xE0); } else { - if (cannotToss == 0) + if (!cannotToss) input = DoMysteryGiftListMenu(&sWindowTemplate_7by8, &sListMenu_ReceiveSendToss, 1, 0x00A, 0xE0); else input = DoMysteryGiftListMenu(&sWindowTemplate_7by6, &sListMenu_ReceiveSend, 1, 0x00A, 0xE0); } - if (input != -1) + if (input != LIST_NOTHING_CHOSEN) { *textState = 0; rbox_fill_rectangle(*windowId); @@ -756,33 +752,33 @@ static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cann ClearWindowTilemap(*windowId); CopyWindowToVram(*windowId, 1); RemoveWindow(*windowId); - return -2; + return LIST_CANCEL; } - return -1; + return LIST_NOTHING_CHOSEN; } -static bool32 ValidateCardOrNews(bool32 cardOrNews) +static bool32 ValidateCardOrNews(bool32 isWonderNews) { - if (cardOrNews == 0) + if (!isWonderNews) return ValidateReceivedWonderCard(); else return ValidateReceivedWonderNews(); } -static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews) +static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews) { switch (*state) { case 0: - if (cardOrNews == 0) + if (!isWonderNews) WonderCard_Init(GetSavedWonderCard(), sav1_get_mevent_buffer_2()); else WonderNews_Init(GetSavedWonderNews()); (*state)++; break; case 1: - if (cardOrNews == 0) + if (!isWonderNews) { if (!WonderCard_Enter()) return FALSE; @@ -799,20 +795,20 @@ static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews) return FALSE; } -static bool32 DestroyNewsOrCard(bool32 cardOrNews) +static bool32 DestroyNewsOrCard(bool32 isWonderNews) { - if (cardOrNews == 0) + if (!isWonderNews) DestroyWonderCard(); else DestroyWonderNews(); return TRUE; } -static bool32 TearDownCardOrNews_ReturnToTopMenu(bool32 cardOrNews, bool32 arg1) +static bool32 ExitWonderCardOrNews(bool32 isWonderNews, bool32 arg1) { - if (cardOrNews == 0) + if (!isWonderNews) { - if (WonderCard_Exit(arg1) != 0) + if (WonderCard_Exit(arg1)) { WonderCard_Destroy(); return TRUE; @@ -824,7 +820,7 @@ static bool32 TearDownCardOrNews_ReturnToTopMenu(bool32 cardOrNews, bool32 arg1) } else { - if (WonderNews_Exit(arg1) != 0) + if (WonderNews_Exit(arg1)) { WonderNews_Destroy(); return TRUE; @@ -836,17 +832,17 @@ static bool32 TearDownCardOrNews_ReturnToTopMenu(bool32 cardOrNews, bool32 arg1) } } -static s32 mevent_message_prompt_discard(u8 * textState, u16 * windowId, bool32 cardOrNews) +static s32 AskDiscardGift(u8 * textState, u16 * windowId, bool32 isWonderNews) { - if (cardOrNews == 0) - return mevent_message_print_and_prompt_yes_no(textState, windowId, TRUE, gText_IfThrowAwayCardEventWontHappen); + if (!isWonderNews) + return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_IfThrowAwayCardEventWontHappen); else - return mevent_message_print_and_prompt_yes_no(textState, windowId, TRUE, gText_OkayToDiscardNews); + return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_OkayToDiscardNews); } -static bool32 mevent_message_was_thrown_away(u8 * textState, bool32 cardOrNews) +static bool32 PrintThrownAway(u8 * textState, bool32 isWonderNews) { - if (cardOrNews == 0) + if (!isWonderNews) return MG_PrintTextOnWindow1AndWaitButton(textState, gText_WonderCardThrownAway); else return MG_PrintTextOnWindow1AndWaitButton(textState, gText_WonderNewsThrownAway); @@ -883,89 +879,89 @@ static bool32 mevent_save_game(u8 * state) return FALSE; } -static const u8 * mevent_message(u32 * a0, u8 a1, u8 cardOrNews, u32 msgId) +static const u8 * GetStdMessage(bool32 * receivedMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId) { const u8 * msg = NULL; - *a0 = 0; + *receivedMsg = FALSE; switch (msgId) { case 0: - *a0 = 0; + *receivedMsg = FALSE; msg = gText_NothingSentOver; break; case 1: - *a0 = 0; + *receivedMsg = FALSE; msg = gText_RecordUploadedViaWireless; break; case 2: - *a0 = 1; - msg = cardOrNews == 0 ? gText_WonderCardReceived : gText_WonderCardReceivedFrom; + *receivedMsg = TRUE; + msg = !sourceIsFriend ? gText_WonderCardReceived : gText_WonderCardReceivedFrom; break; case 3: - *a0 = 1; - msg = cardOrNews == 0 ? gText_WonderNewsReceived : gText_WonderNewsReceivedFrom; + *receivedMsg = TRUE; + msg = !sourceIsFriend ? gText_WonderNewsReceived : gText_WonderNewsReceivedFrom; break; case 4: - *a0 = 1; + *receivedMsg = TRUE; msg = gText_NewStampReceived; break; case 5: - *a0 = 0; + *receivedMsg = FALSE; msg = gText_AlreadyHadCard; break; case 6: - *a0 = 0; + *receivedMsg = FALSE; msg = gText_AlreadyHadStamp; break; case 7: - *a0 = 0; + *receivedMsg = FALSE; msg = gText_AlreadyHadNews; break; case 8: - *a0 = 0; + *receivedMsg = FALSE; msg = gText_NoMoreRoomForStamps; break; case 9: - *a0 = 0; + *receivedMsg = FALSE; msg = gText_CommunicationCanceled; break; case 10: - *a0 = 0; - msg = a1 == 0 ? gText_CantAcceptCardFromTrainer : gText_CantAcceptNewsFromTrainer; + *receivedMsg = FALSE; + msg = !isWonderNews ? gText_CantAcceptCardFromTrainer : gText_CantAcceptNewsFromTrainer; break; case 11: - *a0 = 0; + *receivedMsg = FALSE; msg = gText_CommunicationError; break; case 12: - *a0 = 1; + *receivedMsg = TRUE; msg = gText_NewTrainerReceived; break; case 13: - *a0 = 1; + *receivedMsg = TRUE; break; case 14: - *a0 = 0; + *receivedMsg = FALSE; break; } return msg; } -static bool32 PrintMGSuccessMessage(u8 * state, const u8 * arg1, u16 * arg2) +static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer) { switch (*state) { case 0: - if (arg1 != NULL) - AddTextPrinterToWindow1(arg1); + if (msg != NULL) + AddTextPrinterToWindow1(msg); PlayFanfare(MUS_OBTAIN_ITEM); - *arg2 = 0; + *timer = 0; (*state)++; break; case 1: - if (++(*arg2) > 240) + if (++(*timer) > 240) (*state)++; break; case 2: @@ -1042,21 +1038,62 @@ static bool32 PrintMGSendStatus(u8 * state, u16 * arg1, u8 arg2, u32 msgId) u32 flag; const u8 * str = mevent_message_stamp_card_etc_send_status(&flag, arg2, msgId); if (flag) - return PrintMGSuccessMessage(state, str, arg1); + return PrintSuccessMessage(state, str, arg1); else return MG_PrintTextOnWindow1AndWaitButton(state, str); } -void task_add_00_mystery_gift(void) +enum { + MG_STATE_TO_MAIN_MENU, + MG_STATE_MAIN_MENU, + MG_STATE_DONT_HAVE_ANY, + MG_STATE_LINK_PROMPT, + MG_STATE_LINK_PROMPT_INPUT, + MG_STATE_LINK_START, + MG_STATE_LINK_WAIT, + MG_STATE_COMMUNICATING, + MG_STATE_COMMUNICATE, + MG_STATE_9, + MG_STATE_10, + MG_STATE_11, + MG_STATE_12, + MG_STATE_LINK_COMPLETE_WAIT, + MG_STATE_LINK_COMPLETED, + MG_STATE_LINK_RESULT_MSG, + MG_STATE_LINK_ERROR_1, + MG_STATE_SAVE_LOAD_GIFT, + MG_STATE_LOAD_GIFT, + MG_STATE_UNUSED, + MG_STATE_HANDLE_GIFT_INPUT, + MG_STATE_HANDLE_GIFT_SELECT, + MG_STATE_ASK_TOSS, + MG_STATE_ASK_TOSS_UNRECEIVED, + MG_STATE_TOSS, + MG_STATE_TOSS_SAVE, + MG_STATE_TOSSED, + MG_STATE_GIFT_INPUT_EXIT, + MG_STATE_RECEIVE, + MG_STATE_SEND, + MG_STATE_SEND_WAIT, + MG_STATE_SEND_START, + MG_STATE_SENDING, + MG_STATE_SEND_FINISH, + MG_STATE_SEND_WAIT_END, + MG_STATE_SEND_END, + MG_STATE_LINK_ERROR_2, + MG_STATE_EXIT, +}; + +static void CreateMysteryGiftTask(void) { - u8 taskId = CreateTask(task00_mystery_gift, 0); + u8 taskId = CreateTask(Task_MysteryGift, 0); struct MysteryGiftTaskData * data = (void *)gTasks[taskId].data; - data->state = 0; + data->state = MG_STATE_TO_MAIN_MENU; data->textState = 0; data->unkA = 0; data->unkB = 0; - data->IsCardOrNews = 0; - data->source = 0; + data->isWonderNews = 0; + data->sourceIsFriend = 0; data->curPromptWindowId = 0; data->unk2 = 0; data->unk4 = 0; @@ -1065,298 +1102,287 @@ void task_add_00_mystery_gift(void) data->buffer = AllocZeroed(0x40); } -void task00_mystery_gift(u8 taskId) +static void Task_MysteryGift(u8 taskId) { struct MysteryGiftTaskData *data = (void *)gTasks[taskId].data; - u32 sp0, flag; - const u8 *r1; + u32 receivedMsg, input; + const u8 *msg; switch (data->state) { - case 0: - data->state = 1; + case MG_STATE_TO_MAIN_MENU: + data->state = MG_STATE_MAIN_MENU; break; - case 1: + case MG_STATE_MAIN_MENU: + // Main Mystery Gift menu, player can select Wonder Cards or News (or exit) switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->curPromptWindowId, FALSE)) { - case 0: - data->IsCardOrNews = 0; + case 0: // "Wonder Cards" + data->isWonderNews = FALSE; if (ValidateReceivedWonderCard() == TRUE) - data->state = 18; + data->state = MG_STATE_LOAD_GIFT; else - data->state = 2; + data->state = MG_STATE_DONT_HAVE_ANY; break; - case 1: - data->IsCardOrNews = 1; + case 1: // "Wonder News" + data->isWonderNews = TRUE; if (ValidateReceivedWonderNews() == TRUE) - data->state = 18; + data->state = MG_STATE_LOAD_GIFT; else - data->state = 2; + data->state = MG_STATE_DONT_HAVE_ANY; break; - case -2u: - data->state = 37; + case LIST_CANCEL: + data->state = MG_STATE_EXIT; break; } break; - case 2: + case MG_STATE_DONT_HAVE_ANY: { - if (data->IsCardOrNews == 0) + // Player doesn't have any Wonder Card/News + // Start prompt to ask where to read one from + if (!data->isWonderNews) { if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_DontHaveCardNewOneInput)) { - data->state = 3; - PrintMysteryGiftOrEReaderTopMenu(0, 1); + data->state = MG_STATE_LINK_PROMPT; + PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); } } else { if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_DontHaveNewsNewOneInput)) { - data->state = 3; - PrintMysteryGiftOrEReaderTopMenu(0, 1); + data->state = MG_STATE_LINK_PROMPT; + PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); } } break; } - case 3: - if (data->IsCardOrNews == 0) + case MG_STATE_LINK_PROMPT: + if (!data->isWonderNews) AddTextPrinterToWindow1(gText_WhereShouldCardBeAccessed); else AddTextPrinterToWindow1(gText_WhereShouldNewsBeAccessed); - data->state = 4; + data->state = MG_STATE_LINK_PROMPT_INPUT; break; - case 4: + case MG_STATE_LINK_PROMPT_INPUT: + // Choose where to access the Wonder Card/News from switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->curPromptWindowId, TRUE)) { - case 0: + case 0: // "Wireless Communication" ClearTextWindow(); - data->state = 5; - data->source = 0; + data->state = MG_STATE_LINK_START; + data->sourceIsFriend = FALSE; break; - case 1: + case 1: // "Friend" ClearTextWindow(); - data->state = 5; - data->source = 1; + data->state = MG_STATE_LINK_START; + data->sourceIsFriend = TRUE; break; - case -2u: + case LIST_CANCEL: ClearTextWindow(); - if (ValidateCardOrNews(data->IsCardOrNews)) + if (ValidateCardOrNews(data->isWonderNews)) { - data->state = 18; + data->state = MG_STATE_LOAD_GIFT; } else { - data->state = 0; - PrintMysteryGiftOrEReaderTopMenu(0, 0); + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); } break; } break; - case 5: + case MG_STATE_LINK_START: *gStringVar1 = EOS; *gStringVar2 = EOS; *gStringVar3 = EOS; - switch (data->IsCardOrNews) + switch (data->isWonderNews) { - case 0: - if (data->source == 1) - MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_CARD); - else if (data->source == 0) - MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_CARD); + case FALSE: + if (data->sourceIsFriend == TRUE) + CreateTask_LinkMysteryGiftWithFriend(ACTIVITY_WONDER_CARD); + else if (data->sourceIsFriend == FALSE) + CreateTask_LinkMysteryGiftOverWireless(ACTIVITY_WONDER_CARD); break; - case 1: - if (data->source == 1) - MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_NEWS); - else if (data->source == 0) - MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_NEWS); + case TRUE: + if (data->sourceIsFriend == TRUE) + CreateTask_LinkMysteryGiftWithFriend(ACTIVITY_WONDER_NEWS); + else if (data->sourceIsFriend == FALSE) + CreateTask_LinkMysteryGiftOverWireless(ACTIVITY_WONDER_NEWS); break; } - data->state = 6; + data->state = MG_STATE_LINK_WAIT; break; - case 6: + case MG_STATE_LINK_WAIT: if (gReceivedRemoteLinkPlayers != 0) { ClearScreenInBg0(TRUE); - data->state = 7; - mevent_client_do_init(data->IsCardOrNews); + data->state = MG_STATE_COMMUNICATING; + mevent_client_do_init(data->isWonderNews); } else if (gSpecialVar_Result == LINKUP_FAILED) { + // Link failed, return to link start menu ClearScreenInBg0(TRUE); - data->state = 3; + data->state = MG_STATE_LINK_PROMPT; } break; - case 7: + case MG_STATE_COMMUNICATING: AddTextPrinterToWindow1(gText_Communicating); - data->state = 8; + data->state = MG_STATE_COMMUNICATE; break; - case 8: + case MG_STATE_COMMUNICATE: switch (mevent_client_do_exec(&data->curPromptWindowId)) { case 6: Rfu_SetCloseLinkCallback(); data->prevPromptWindowId = data->curPromptWindowId; - data->state = 13; + data->state = MG_STATE_LINK_COMPLETE_WAIT; break; case 5: memcpy(data->buffer, mevent_client_get_buffer(), 0x40); mevent_client_inc_flag(); break; case 3: - data->state = 10; + data->state = MG_STATE_10; break; case 2: - data->state = 9; + data->state = MG_STATE_9; break; case 4: - data->state = 11; + data->state = MG_STATE_11; StringCopy(gStringVar1, gLinkPlayers[0].name); break; } break; - case 9: - flag = mevent_message_print_and_prompt_yes_no(&data->textState, &data->curPromptWindowId, FALSE, mevent_client_get_buffer()); - switch (flag) + case MG_STATE_9: + input = DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, FALSE, mevent_client_get_buffer()); + switch (input) { - case 0: + case 0: // Yes mevent_client_set_param(0); mevent_client_inc_flag(); - data->state = 7; + data->state = MG_STATE_COMMUNICATING; break; - case 1: + case 1: // No + case MENU_B_PRESSED: mevent_client_set_param(1); mevent_client_inc_flag(); - data->state = 7; - break; - case -1u: - mevent_client_set_param(1); - mevent_client_inc_flag(); - data->state = 7; + data->state = MG_STATE_COMMUNICATING; break; } break; - case 10: + case MG_STATE_10: if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, mevent_client_get_buffer())) { mevent_client_inc_flag(); - data->state = 7; + data->state = MG_STATE_COMMUNICATING; } break; - case 11: - flag = mevent_message_print_and_prompt_yes_no(&data->textState, &data->curPromptWindowId, FALSE, gText_ThrowAwayWonderCard); - switch (flag) + case MG_STATE_11: + input = DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, FALSE, gText_ThrowAwayWonderCard); + switch (input) { - case 0: + case 0: // Yes if (CheckReceivedGiftFromWonderCard() == TRUE) { - data->state = 12; + data->state = MG_STATE_12; } else { mevent_client_set_param(0); mevent_client_inc_flag(); - data->state = 7; + data->state = MG_STATE_COMMUNICATING; } break; - case 1: + case 1: // No + case MENU_B_PRESSED: mevent_client_set_param(1); mevent_client_inc_flag(); - data->state = 7; - break; - case -1u: - mevent_client_set_param(1); - mevent_client_inc_flag(); - data->state = 7; + data->state = MG_STATE_COMMUNICATING; break; } break; - case 12: - flag = mevent_message_print_and_prompt_yes_no(&data->textState, &data->curPromptWindowId, FALSE, gText_HaventReceivedCardsGift); - switch (flag) + case MG_STATE_12: + input = DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, FALSE, gText_HaventReceivedCardsGift); + switch (input) { - case 0: + case 0: // Yes mevent_client_set_param(0); mevent_client_inc_flag(); - data->state = 7; + data->state = MG_STATE_COMMUNICATING; break; - case 1: + case 1: // No + case MENU_B_PRESSED: mevent_client_set_param(1); mevent_client_inc_flag(); - data->state = 7; - break; - case -1u: - mevent_client_set_param(1); - mevent_client_inc_flag(); - data->state = 7; + data->state = MG_STATE_COMMUNICATING; break; } break; - case 13: + case MG_STATE_LINK_COMPLETE_WAIT: if (gReceivedRemoteLinkPlayers == 0) { DestroyWirelessStatusIndicatorSprite(); - data->state = 14; + data->state = MG_STATE_LINK_COMPLETED; } break; - case 14: + case MG_STATE_LINK_COMPLETED: if (PrintStringAndWait2Seconds(&data->textState, gText_CommunicationCompleted)) { - if (data->source == 1) + if (data->sourceIsFriend == TRUE) StringCopy(gStringVar1, gLinkPlayers[0].name); - data->state = 15; + data->state = MG_STATE_LINK_RESULT_MSG; } break; - case 15: - r1 = mevent_message(&sp0, data->IsCardOrNews, data->source, data->prevPromptWindowId); - if (r1 == NULL) - r1 = data->buffer; - if (sp0) - flag = PrintMGSuccessMessage(&data->textState, r1, &data->curPromptWindowId); + case MG_STATE_LINK_RESULT_MSG: + msg = GetStdMessage(&receivedMsg, data->isWonderNews, data->sourceIsFriend, data->prevPromptWindowId); + if (msg == NULL) + msg = data->buffer; + if (receivedMsg) + input = PrintSuccessMessage(&data->textState, msg, &data->curPromptWindowId); else - flag = MG_PrintTextOnWindow1AndWaitButton(&data->textState, r1); - if (flag) + input = MG_PrintTextOnWindow1AndWaitButton(&data->textState, msg); + // input var re-used, here it is TRUE if the message is finished + if (input) { if (data->prevPromptWindowId == 3) { - if (data->source == 1) + if (data->sourceIsFriend == TRUE) GenerateRandomNews(1); else GenerateRandomNews(2); } - if (!sp0) + if (!receivedMsg) { - data->state = 0; - PrintMysteryGiftOrEReaderTopMenu(0, 0); + // Did not receive card/news, return to main menu + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); } else { - data->state = 17; + data->state = MG_STATE_SAVE_LOAD_GIFT; } } break; - case 16: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_CommunicationError)) - { - data->state = 0; - PrintMysteryGiftOrEReaderTopMenu(0, 0); - } - break; - case 17: + case MG_STATE_SAVE_LOAD_GIFT: if (mevent_save_game(&data->textState)) - data->state = 18; + data->state = MG_STATE_LOAD_GIFT; break; - case 18: - if (HandleLoadWonderCardOrNews(&data->textState, data->IsCardOrNews)) - data->state = 20; + case MG_STATE_LOAD_GIFT: + if (HandleLoadWonderCardOrNews(&data->textState, data->isWonderNews)) + data->state = MG_STATE_HANDLE_GIFT_INPUT; break; - case 20: - if (data->IsCardOrNews == 0) + case MG_STATE_HANDLE_GIFT_INPUT: + if (!data->isWonderNews) { + // Handle Wonder Card input if (JOY_NEW(A_BUTTON)) - data->state = 21; + data->state = MG_STATE_HANDLE_GIFT_SELECT; if (JOY_NEW(B_BUTTON)) - data->state = 27; + data->state = MG_STATE_GIFT_INPUT_EXIT; } else { @@ -1364,141 +1390,140 @@ void task00_mystery_gift(u8 taskId) { case NEWS_INPUT_A: WonderNews_RemoveScrollIndicatorArrowPair(); - data->state = 21; + data->state = MG_STATE_HANDLE_GIFT_SELECT; break; case NEWS_INPUT_B: - data->state = 27; + data->state = MG_STATE_GIFT_INPUT_EXIT; break; } } break; - case 21: + case MG_STATE_HANDLE_GIFT_SELECT: { + // A Wonder Card/News has been selected, handle its menu u32 result; - if (data->IsCardOrNews == 0) + if (!data->isWonderNews) { if (WonderCard_Test_Unk_08_6()) - result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->IsCardOrNews, FALSE); + result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->isWonderNews, FALSE); else - result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->IsCardOrNews, TRUE); + result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->isWonderNews, TRUE); } else { if (WonderNews_Test_Unk_02()) - result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->IsCardOrNews, FALSE); + result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->isWonderNews, FALSE); else - result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->IsCardOrNews, TRUE); + result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->isWonderNews, TRUE); } switch (result) { - case 0: - data->state = 28; + case 0: // Receive + data->state = MG_STATE_RECEIVE; break; - case 1: - data->state = 29; + case 1: // Send + data->state = MG_STATE_SEND; break; - case 2: - data->state = 22; + case 2: // Toss + data->state = MG_STATE_ASK_TOSS; break; - case -2u: - if (data->IsCardOrNews == 1) + case LIST_CANCEL: + if (data->isWonderNews == TRUE) WonderNews_AddScrollIndicatorArrowPair(); - data->state = 20; + data->state = MG_STATE_HANDLE_GIFT_INPUT; break; } break; } - case 22: - switch (mevent_message_prompt_discard(&data->textState, &data->curPromptWindowId, data->IsCardOrNews)) + case MG_STATE_ASK_TOSS: + // Player is atempting to discard a Wonder Card/News + switch (AskDiscardGift(&data->textState, &data->curPromptWindowId, data->isWonderNews)) { - case 0: - if (data->IsCardOrNews == 0 && CheckReceivedGiftFromWonderCard() == TRUE) - data->state = 23; + case 0: // Yes + if (!data->isWonderNews && CheckReceivedGiftFromWonderCard() == TRUE) + data->state = MG_STATE_ASK_TOSS_UNRECEIVED; else - data->state = 24; + data->state = MG_STATE_TOSS; break; - case 1: - data->state = 21; - break; - case -1: - data->state = 21; + case 1: // No + case MENU_B_PRESSED: + data->state = MG_STATE_HANDLE_GIFT_SELECT; break; } break; - case 23: - switch ((u32)mevent_message_print_and_prompt_yes_no(&data->textState, &data->curPromptWindowId, TRUE, gText_HaventReceivedGiftOkayToDiscard)) + case MG_STATE_ASK_TOSS_UNRECEIVED: + // Player is attempting to discard a Wonder Card that they haven't received the gift for + switch ((u32)DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, TRUE, gText_HaventReceivedGiftOkayToDiscard)) { - case 0: - data->state = 24; + case 0: // Yes + data->state = MG_STATE_TOSS; break; - case 1: - data->state = 21; - break; - case -1u: - data->state = 21; + case 1: // No + case MENU_B_PRESSED: + data->state = MG_STATE_HANDLE_GIFT_SELECT; break; } break; - case 24: - if (TearDownCardOrNews_ReturnToTopMenu(data->IsCardOrNews, 1)) + case MG_STATE_TOSS: + if (ExitWonderCardOrNews(data->isWonderNews, 1)) { - DestroyNewsOrCard(data->IsCardOrNews); - data->state = 25; + DestroyNewsOrCard(data->isWonderNews); + data->state = MG_STATE_TOSS_SAVE; } break; - case 25: + case MG_STATE_TOSS_SAVE: if (mevent_save_game(&data->textState)) - data->state = 26; + data->state = MG_STATE_TOSSED; break; - case 26: - if (mevent_message_was_thrown_away(&data->textState, data->IsCardOrNews)) + case MG_STATE_TOSSED: + if (PrintThrownAway(&data->textState, data->isWonderNews)) { - data->state = 0; - PrintMysteryGiftOrEReaderTopMenu(0, 0); + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); } break; - case 27: - if (TearDownCardOrNews_ReturnToTopMenu(data->IsCardOrNews, 0)) - data->state = 0; + case MG_STATE_GIFT_INPUT_EXIT: + if (ExitWonderCardOrNews(data->isWonderNews, 0)) + data->state = MG_STATE_TO_MAIN_MENU; break; - case 28: - if (TearDownCardOrNews_ReturnToTopMenu(data->IsCardOrNews, 1)) - data->state = 3; + case MG_STATE_RECEIVE: + if (ExitWonderCardOrNews(data->isWonderNews, 1)) + data->state = MG_STATE_LINK_PROMPT; break; - case 29: - if (TearDownCardOrNews_ReturnToTopMenu(data->IsCardOrNews, 1)) + case MG_STATE_SEND: + if (ExitWonderCardOrNews(data->isWonderNews, 1)) { - switch (data->IsCardOrNews) + switch (data->isWonderNews) { - case 0: - MEvent_CreateTask_Leader(ACTIVITY_WONDER_CARD); + case FALSE: + CreateTask_SendMysteryGift(ACTIVITY_WONDER_CARD); break; - case 1: - MEvent_CreateTask_Leader(ACTIVITY_WONDER_NEWS); + case TRUE: + CreateTask_SendMysteryGift(ACTIVITY_WONDER_NEWS); break; } - data->source = 1; - data->state = 30; + data->sourceIsFriend = TRUE; + data->state = MG_STATE_SEND_WAIT; } break; - case 30: + case MG_STATE_SEND_WAIT: if (gReceivedRemoteLinkPlayers != 0) { ClearScreenInBg0(1); - data->state = 31; + data->state = MG_STATE_SEND_START; } else if (gSpecialVar_Result == LINKUP_FAILED) { ClearScreenInBg0(1); - data->state = 18; + data->state = MG_STATE_LOAD_GIFT; } break; - case 31: + case MG_STATE_SEND_START: *gStringVar1 = EOS; *gStringVar2 = EOS; *gStringVar3 = EOS; - if (data->IsCardOrNews == 0) + if (!data->isWonderNews) { AddTextPrinterToWindow1(gText_SendingWonderCard); mevent_srv_new_wcard(); @@ -1508,50 +1533,51 @@ void task00_mystery_gift(u8 taskId) AddTextPrinterToWindow1(gText_SendingWonderNews); mevent_srv_init_wnews(); } - data->state = 32; + data->state = MG_STATE_SENDING; break; - case 32: + case MG_STATE_SENDING: if (mevent_srv_common_do_exec(&data->curPromptWindowId) == 3) { data->prevPromptWindowId = data->curPromptWindowId; - data->state = 33; + data->state = MG_STATE_SEND_FINISH; } break; - case 33: + case MG_STATE_SEND_FINISH: Rfu_SetCloseLinkCallback(); StringCopy(gStringVar1, gLinkPlayers[1].name); - data->state = 34; + data->state = MG_STATE_SEND_WAIT_END; break; - case 34: + case MG_STATE_SEND_WAIT_END: if (gReceivedRemoteLinkPlayers == 0) { DestroyWirelessStatusIndicatorSprite(); - data->state = 35; + data->state = MG_STATE_SEND_END; } break; - case 35: - if (PrintMGSendStatus(&data->textState, &data->curPromptWindowId, data->source, data->prevPromptWindowId)) + case MG_STATE_SEND_END: + if (PrintMGSendStatus(&data->textState, &data->curPromptWindowId, data->sourceIsFriend, data->prevPromptWindowId)) { - if (data->source == 1 && data->prevPromptWindowId == 3) + if (data->sourceIsFriend == TRUE && data->prevPromptWindowId == 3) { GenerateRandomNews(3); - data->state = 17; + data->state = MG_STATE_SAVE_LOAD_GIFT; } else { - data->state = 0; - PrintMysteryGiftOrEReaderTopMenu(0, 0); + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); } } break; - case 36: + case MG_STATE_LINK_ERROR_1: + case MG_STATE_LINK_ERROR_2: if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_CommunicationError)) { - data->state = 0; - PrintMysteryGiftOrEReaderTopMenu(0, 0); + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); } break; - case 37: + case MG_STATE_EXIT: CloseLink(); Free(data->buffer); DestroyTask(taskId); diff --git a/src/union_room.c b/src/union_room.c index 41d6ded299..0512a1f5c4 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -218,7 +218,7 @@ static u16 ReadAsU16(const u8 *); static void Task_TryBecomeLinkLeader(u8); static void Task_TryJoinLinkGroup(u8); static void Task_ListenToWireless(u8); -static void Task_MEvent_Leader(u8); +static void Task_SendMysteryGift(u8); static void Task_CardOrNewsWithFriend(u8); static void Task_CardOrNewsOverWireless(u8); static void Task_RunUnionRoom(u8); @@ -1857,12 +1857,13 @@ static void CreateTask_StartActivity(void) gTasks[taskId].data[0] = 0; } -void MEvent_CreateTask_Leader(u32 activity) +// Sending Wonder Card/News +void CreateTask_SendMysteryGift(u32 activity) { u8 taskId; struct WirelessLink_Leader *data; - taskId = CreateTask(Task_MEvent_Leader, 0); + taskId = CreateTask(Task_SendMysteryGift, 0); sWirelessLinkMain.leader = data = (void*)(gTasks[taskId].data); data->state = 0; @@ -1871,7 +1872,7 @@ void MEvent_CreateTask_Leader(u32 activity) gSpecialVar_Result = LINKUP_ONGOING; } -static void Task_MEvent_Leader(u8 taskId) +static void Task_SendMysteryGift(u8 taskId) { struct WirelessLink_Leader *data = sWirelessLinkMain.leader; struct WindowTemplate winTemplate; @@ -1944,7 +1945,7 @@ static void Task_MEvent_Leader(u8 taskId) data->state = 7; break; case 7: - switch (mevent_message_print_and_prompt_yes_no(&data->textState, &data->yesNoWindowId, 0, gStringVar4)) + switch (DoMysteryGiftYesNo(&data->textState, &data->yesNoWindowId, 0, gStringVar4)) { case 0: LoadWirelessStatusIndicatorSpriteGfx(); @@ -2065,7 +2066,7 @@ static void Task_MEvent_Leader(u8 taskId) } } -void MEvent_CreateTask_CardOrNewsWithFriend(u32 activity) +void CreateTask_LinkMysteryGiftWithFriend(u32 activity) { u8 taskId; struct WirelessLink_Group *data; @@ -2234,7 +2235,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) } } -void MEvent_CreateTask_CardOrNewsOverWireless(u32 activity) +void CreateTask_LinkMysteryGiftOverWireless(u32 activity) { u8 taskId; struct WirelessLink_Group *data; From c02001c46d4ea55db8b59f91413627800d5674e8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 14 Oct 2021 15:36:51 -0400 Subject: [PATCH 062/417] Document mystery gift link scripts, general mystery gift --- data/scripts/cable_club.inc | 2 +- data/specials.inc | 2 +- include/constants/flags.h | 35 ++-- include/global.h | 41 ++-- include/mevent.h | 30 +-- include/mevent_client.h | 59 +++++- include/mevent_server.h | 2 +- include/mevent_server_helpers.h | 16 +- include/mystery_event_script.h | 4 +- include/wonder_transfer.h | 2 +- src/crt0.s | 2 +- src/mevent2.c | 252 +++++++++++------------ src/mevent_client.c | 354 ++++++++++++++++---------------- src/mevent_news.c | 2 +- src/mevent_scripts.c | 262 +++++++++++------------ src/mevent_server.c | 12 +- src/mevent_server_helpers.c | 18 +- src/mystery_event_script.c | 6 +- src/mystery_gift.c | 75 +++---- src/scrcmd.c | 2 +- src/script.c | 2 +- src/wonder_transfer.c | 4 +- 22 files changed, 610 insertions(+), 574 deletions(-) diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 5cecb60d81..c1bcc8d14d 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -6,7 +6,7 @@ CableClub_EventScript_HideOrShowMysteryGiftMan:: specialvar VAR_RESULT, ShouldDistributeEonTicket compare VAR_RESULT, TRUE goto_if_eq CableClub_EventScript_ShowMysteryGiftMan - specialvar VAR_RESULT, ValidateReceivedWonderCard + specialvar VAR_RESULT, ValidateSavedWonderCard compare VAR_RESULT, FALSE goto_if_eq CableClub_EventScript_HideMysteryGiftMan goto CableClub_EventScript_ShowMysteryGiftMan diff --git a/data/specials.inc b/data/specials.inc index 81b25c14d4..297cf7d8af 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -434,7 +434,7 @@ gSpecials:: def_special ChooseMonForWirelessMinigame def_special Script_ResetUnionRoomTrade def_special IsBadEggInParty - def_special ValidateReceivedWonderCard + def_special ValidateSavedWonderCard def_special HasAtLeastOneBerry def_special IsPokemonJumpSpeciesInParty def_special ShowPokemonJumpRecords diff --git a/include/constants/flags.h b/include/constants/flags.h index ef5a9a75e6..880d227aa7 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -338,23 +338,24 @@ #define FLAG_RECEIVED_AURORA_TICKET 0x13A #define FLAG_RECEIVED_MYSTIC_TICKET 0x13B #define FLAG_RECEIVED_OLD_SEA_MAP 0x13C -#define FLAG_UNUSED_MYSTERY_GIFT_0x13D 0x13D -#define FLAG_UNUSED_MYSTERY_GIFT_0x13E 0x13E -#define FLAG_UNUSED_MYSTERY_GIFT_0x13F 0x13F -#define FLAG_UNUSED_MYSTERY_GIFT_0x140 0x140 -#define FLAG_UNUSED_MYSTERY_GIFT_0x141 0x141 -#define FLAG_UNUSED_MYSTERY_GIFT_0x142 0x142 -#define FLAG_UNUSED_MYSTERY_GIFT_0x143 0x143 -#define FLAG_UNUSED_MYSTERY_GIFT_0x144 0x144 -#define FLAG_UNUSED_MYSTERY_GIFT_0x145 0x145 -#define FLAG_UNUSED_MYSTERY_GIFT_0x146 0x146 -#define FLAG_UNUSED_MYSTERY_GIFT_0x147 0x147 -#define FLAG_UNUSED_MYSTERY_GIFT_0x148 0x148 -#define FLAG_UNUSED_MYSTERY_GIFT_0x149 0x149 -#define FLAG_UNUSED_MYSTERY_GIFT_0x14A 0x14A -#define FLAG_UNUSED_MYSTERY_GIFT_0x14B 0x14B -#define FLAG_UNUSED_MYSTERY_GIFT_0x14C 0x14C -#define FLAG_UNUSED_MYSTERY_GIFT_0x14D 0x14D +#define FLAG_MYSTERY_GIFT_UNUSED_1 0x13D // These mystery gift flags are referenced but never set +#define FLAG_MYSTERY_GIFT_UNUSED_2 0x13E +#define FLAG_MYSTERY_GIFT_UNUSED_3 0x13F +#define FLAG_MYSTERY_GIFT_UNUSED_4 0x140 +#define FLAG_MYSTERY_GIFT_UNUSED_5 0x141 +#define FLAG_MYSTERY_GIFT_UNUSED_6 0x142 +#define FLAG_MYSTERY_GIFT_UNUSED_7 0x143 +#define FLAG_MYSTERY_GIFT_UNUSED_8 0x144 +#define FLAG_MYSTERY_GIFT_UNUSED_9 0x145 +#define FLAG_MYSTERY_GIFT_UNUSED_10 0x146 +#define FLAG_MYSTERY_GIFT_UNUSED_11 0x147 +#define FLAG_MYSTERY_GIFT_UNUSED_12 0x148 +#define FLAG_MYSTERY_GIFT_UNUSED_13 0x149 +#define FLAG_MYSTERY_GIFT_UNUSED_14 0x14A +#define FLAG_MYSTERY_GIFT_UNUSED_15 0x14B +#define FLAG_MYSTERY_GIFT_UNUSED_16 0x14C +#define FLAG_MYSTERY_GIFT_UNUSED_17 0x14D +#define NUM_MYSTERY_GIFT_FLAGS (1 + FLAG_MYSTERY_GIFT_UNUSED_17 - FLAG_RECEIVED_AURORA_TICKET) #define FLAG_MIRAGE_TOWER_VISIBLE 0x14E #define FLAG_CHOSE_ROOT_FOSSIL 0x14F diff --git a/include/global.h b/include/global.h index f8bb24da71..c737be7b8f 100644 --- a/include/global.h +++ b/include/global.h @@ -854,15 +854,9 @@ struct MysteryEventStruct u8 unk_2C[10][WONDER_NEWS_TEXT_LENGTH]; }; - struct WonderNewsSaveStruct -{ - u32 crc; - struct WonderNews data; -}; - struct WonderCard { - u16 unk_00; + u16 flagId; u16 unk_02; u32 unk_04; u8 unk_08_0:2; @@ -876,13 +870,7 @@ struct MysteryEventStruct u8 unk_122[WONDER_CARD_TEXT_LENGTH]; }; - struct WonderCardSaveStruct -{ - u32 crc; - struct WonderCard data; -}; - - struct MEventBuffer_3430_Sub + struct MEventBuffer_3430 { u16 unk_00; u16 unk_02; @@ -891,20 +879,17 @@ struct MysteryEventStruct u16 unk_08[2][7]; }; - struct MEventBuffer_3430 + struct MysteryGiftSave { - u32 crc; - struct MEventBuffer_3430_Sub data; -}; - - struct MEventBuffers -{ - /*0x000 0x322C*/ struct WonderNewsSaveStruct wonderNews; - /*0x1c0 0x33EC*/ struct WonderCardSaveStruct wonderCard; - /*0x310 0x353C*/ struct MEventBuffer_3430 buffer_310; - /*0x338 0x3564*/ u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; - /*0x340 0x356C*/ struct MysteryEventStruct unk_340; - /*0x344 0x3570*/ u32 unk_344[2][5]; + u32 newsCrc; + struct WonderNews news; + u32 cardCrc; + struct WonderCard card; + u32 unkCrc; + struct MEventBuffer_3430 unk_3430; + u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; + struct MysteryEventStruct unk_340; + u32 unk_344[2][5]; }; // 0x36C 0x3598 // For external event data storage. The majority of these may have never been used. @@ -1031,7 +1016,7 @@ struct SaveBlock1 /*0x31C7*/ struct ExternalEventFlags externalEventFlags; /*0x31DC*/ struct Roamer roamer; /*0x31F8*/ struct EnigmaBerry enigmaBerry; - /*0x322C*/ struct MEventBuffers unk_322C; + /*0x322C*/ struct MysteryGiftSave mysteryGift; /*0x3598*/ u8 field_3598[0x180]; /*0x3718*/ u32 trainerHillTimes[4]; /*0x3728*/ struct RamScript ramScript; diff --git a/include/mevent.h b/include/mevent.h index 4b7d39b0c3..4fda47fbd2 100755 --- a/include/mevent.h +++ b/include/mevent.h @@ -21,30 +21,30 @@ struct MEventStruct_Unk1442CC u16 unk_0C; u32 unk_10; u16 unk_14; - u16 unk_16[NUM_QUESTIONNAIRE_WORDS]; - struct MEventBuffer_3430_Sub unk_20; + u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; + struct MEventBuffer_3430 unk_20; u8 unk_44; - u8 unk_45[7]; - u8 unk_4C[4]; - u16 unk_50[6]; - u8 unk_5C[4]; - u8 unk_60; + u8 playerName[PLAYER_NAME_LENGTH]; + u8 playerTrainerId[TRAINER_ID_LENGTH]; + u16 easyChatProfile[EASY_CHAT_BATTLE_WORDS_COUNT]; + u8 romHeaderGameCode[4]; + u8 romHeaderSoftwareVersion; }; void sub_801AFD8(void); struct WonderNews *GetSavedWonderNews(void); struct WonderCard *GetSavedWonderCard(void); -struct MEventBuffer_3430_Sub *sav1_get_mevent_buffer_2(void); +struct MEventBuffer_3430 *sav1_get_mevent_buffer_2(void); struct MysteryEventStruct *sub_801B044(void); u16 *GetQuestionnaireWordsPtr(void); -void DestroyWonderNews(void); -bool32 sub_801B078(const struct WonderNews *src); -bool32 ValidateReceivedWonderNews(void); +void ClearSavedWonderNews(void); +bool32 SaveWonderNews(const struct WonderNews *news); +bool32 ValidateSavedWonderNews(void); bool32 WonderNews_Test_Unk_02(void); bool32 sub_801B1A4(const u8 *src); -void DestroyWonderCard(void); -bool32 sub_801B21C(const struct WonderCard *data); -bool32 ValidateReceivedWonderCard(void); +void ClearSavedWonderCard(void); +bool32 SaveWonderCard(const struct WonderCard *card); +bool32 ValidateSavedWonderCard(void); bool32 WonderCard_Test_Unk_08_6(void); u16 GetWonderCardFlagID(void); void WonderCard_ResetInternalReceivedFlag(struct WonderCard *buffer); @@ -54,7 +54,7 @@ void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1); bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1); u32 sub_801B6EC(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const void *unused); u32 sub_801B708(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const void *unused); -bool32 MEventStruct_Unk1442CC_CompareField_unk_16(const struct MEventStruct_Unk1442CC *a0, const u16 *a1); +bool32 MysteryGift_DoesQuestionnaireMatch(const struct MEventStruct_Unk1442CC *data, const u16 *words); u16 MEventStruct_Unk1442CC_GetValueNFrom_unk_20(const struct MEventStruct_Unk1442CC *a0, u32 command); u16 mevent_081445C0(u32 command); void ResetReceivedWonderCardFlag(void); diff --git a/include/mevent_client.h b/include/mevent_client.h index c32d14d7aa..f68bb7592b 100644 --- a/include/mevent_client.h +++ b/include/mevent_client.h @@ -3,31 +3,68 @@ #include "mevent_server_helpers.h" -struct mevent_client_cmd +// Return values for client functions called by MysteryGiftClient_Run +enum { + CLI_RET_INIT, + CLI_RET_1, + CLI_RET_2, + CLI_RET_3, + CLI_RET_ASK_TOSS, + CLI_RET_5, + CLI_RET_END, +}; + +// IDs for client script instructions +enum { + CLI_NONE, + CLI_RETURN, + CLI_RECV, + CLI_SEND_LOADED, + CLI_COPY_RECV, + CLI_5, + CLI_COPY_RECV_IF_N, + CLI_COPY_RECV_IF, + CLI_8, + CLI_9, + CLI_10, + CLI_11, + CLI_12, + CLI_ASK_TOSS, + CLI_LOAD_TOSS_RESPONSE, + CLI_15, + CLI_16, + CLI_17, + CLI_RECV_EREADER_TRAINER, + CLI_SEND_STAT, + CLI_20, + CLI_21, +}; + +struct MysteryGiftClientCmd { u32 instr; u32 parameter; }; -struct mevent_client +struct MysteryGiftClient { u32 unk_00; u32 param; - u32 mainseqno; - u32 flag; + u32 funcId; + u32 funcState; u32 cmdidx; void * sendBuffer; void * recvBuffer; - struct mevent_client_cmd * cmdBuffer; + struct MysteryGiftClientCmd * cmdBuffer; void * buffer; - struct mevent_srv_sub manager; - u32 unk_4C; + struct MysteryGiftLink link; + bool32 isWonderNews; }; -void mevent_client_do_init(u32 arg); -u32 mevent_client_do_exec(u16 * a0); -void mevent_client_inc_flag(void); +void MysteryGiftClient_Create(bool32 isWonderNews); +u32 MysteryGiftClient_Run(u16 * param); +void MysteryGiftClient_AdvanceState(void); void * mevent_client_get_buffer(void); -void mevent_client_set_param(u32 a0); +void MysteryGiftClient_SetParam(u32 value); #endif //GUARD_MEVENT_CLIENT_H diff --git a/include/mevent_server.h b/include/mevent_server.h index e74337cf6f..3152280d34 100644 --- a/include/mevent_server.h +++ b/include/mevent_server.h @@ -26,7 +26,7 @@ struct mevent_srv_common const void * sendBuffer2; u32 sendBuffer2Size; u32 sendWord; - struct mevent_srv_sub manager; + struct MysteryGiftLink manager; }; void mevent_srv_new_wcard(); diff --git a/include/mevent_server_helpers.h b/include/mevent_server_helpers.h index e4e409862a..d2f292a0ba 100644 --- a/include/mevent_server_helpers.h +++ b/include/mevent_server_helpers.h @@ -3,7 +3,7 @@ #define ME_SEND_BUF_SIZE 0x400 -struct mevent_srv_sub +struct MysteryGiftLink { s32 seqno; u8 sendPlayerNo; @@ -18,8 +18,8 @@ struct mevent_srv_sub u16 sendSize; void * recvBfr; const void * sendBfr; - u32 (*recvFunc)(struct mevent_srv_sub *); - u32 (*sendFunc)(struct mevent_srv_sub *); + u32 (*recvFunc)(struct MysteryGiftLink *); + u32 (*sendFunc)(struct MysteryGiftLink *); }; struct send_recv_header @@ -29,10 +29,10 @@ struct send_recv_header u16 size; }; -void mevent_srv_sub_init(struct mevent_srv_sub *, u32, u32); -void mevent_srv_sub_init_send(struct mevent_srv_sub * manager, u32 ident, const void * src, u32 size); -bool32 mevent_srv_sub_recv(struct mevent_srv_sub * manager); -bool32 mevent_srv_sub_send(struct mevent_srv_sub * manager); -void mevent_srv_sub_init_recv(struct mevent_srv_sub *, u32, void *); +void MysteryGiftLink_Init(struct MysteryGiftLink *, u32, u32); +void MysteryGiftLink_InitSend(struct MysteryGiftLink * manager, u32 ident, const void * src, u32 size); +bool32 MysteryGiftLink_Recv(struct MysteryGiftLink * manager); +bool32 MysteryGiftLink_Send(struct MysteryGiftLink * manager); +void MysteryGiftLink_InitRecv(struct MysteryGiftLink *, u32, void *); #endif //GUARD_MEVENT_SERVER_HELPERS_H diff --git a/include/mystery_event_script.h b/include/mystery_event_script.h index 991cab53a4..807c78b132 100644 --- a/include/mystery_event_script.h +++ b/include/mystery_event_script.h @@ -1,8 +1,8 @@ #ifndef GUARD_MYSTERY_EVENT_SCRIPT_H #define GUARD_MYSTERY_EVENT_SCRIPT_H -void sub_8153870(u8 *script); -bool32 sub_8153884(u32 *a0); +void InitMysteryGiftScriptContext(u8 *script); +bool32 RunMysteryGiftScriptContextCommand(u32 *script); u32 RunMysteryEventScript(u8 *script); void SetMysteryEventScriptStatus(u32 val); u16 GetRecordMixingGift(void); diff --git a/include/wonder_transfer.h b/include/wonder_transfer.h index 65b4757253..7532d6b3c9 100644 --- a/include/wonder_transfer.h +++ b/include/wonder_transfer.h @@ -9,7 +9,7 @@ enum { NEWS_INPUT_NONE = 0xFF }; -bool32 WonderCard_Init(struct WonderCard * card, struct MEventBuffer_3430_Sub * r6); +bool32 WonderCard_Init(struct WonderCard * card, struct MEventBuffer_3430 * r6); bool32 WonderNews_Init(const struct WonderNews * news); s32 WonderCard_Enter(void); s32 WonderNews_Enter(void); diff --git a/src/crt0.s b/src/crt0.s index 835522589c..672fc94f2a 100644 --- a/src/crt0.s +++ b/src/crt0.s @@ -94,7 +94,7 @@ GPIOPortReadEnable: @ 80000C8 .byte 0x1e, 0x1e, 0x10, 0x40 - .4byte 0x0000322e @ offsetof(struct SaveBlock1, ? part-way into unk_322C) + .4byte 0x0000322e @ offsetof(struct SaveBlock1, ? part-way into mysteryGift) .4byte 0x00000498 @ offsetof(struct SaveBlock1, pcItems) .4byte 0x000031a8 @ offsetof(struct SaveBlock1, giftRibbons) .4byte 0x000031f8 @ offsetof(struct SaveBlock1, enigmaBerry) diff --git a/src/mevent2.c b/src/mevent2.c index c7035ae8f0..fd3ec7a672 100755 --- a/src/mevent2.c +++ b/src/mevent2.c @@ -14,73 +14,75 @@ static EWRAM_DATA bool32 gUnknown_02022C70 = FALSE; static void sub_801B180(void); -static void s_DestroyWonderNews(void); -static bool32 sub_801B114(const struct WonderNews *data); -static bool32 ValidateWonderCardData(const struct WonderCard *data); -static void sub_801B330(void); +static void ClearSavedWonderNewsInternal(void); +static bool32 ValidateWonderNews(const struct WonderNews *news); +static bool32 ValidateWonderCard(const struct WonderCard *card); +static void InitSavedWonderCard(void); static void sub_801B368(void); static void sub_801B9F8(void); static void sub_801BA8C(u32 a0, u32 a1, u32 *a2, int a3); +#define CALC_CRC(data) CalcCRC16WithTable((void *)&(data), sizeof(data)) + void sub_801AFD8(void) { - CpuFill32(0, &gSaveBlock1Ptr->unk_322C, sizeof(gSaveBlock1Ptr->unk_322C)); + CpuFill32(0, &gSaveBlock1Ptr->mysteryGift, sizeof(gSaveBlock1Ptr->mysteryGift)); sub_801B180(); InitQuestionnaireWords(); } struct WonderNews *GetSavedWonderNews(void) { - return &gSaveBlock1Ptr->unk_322C.wonderNews.data; + return &gSaveBlock1Ptr->mysteryGift.news; } struct WonderCard *GetSavedWonderCard(void) { - return &gSaveBlock1Ptr->unk_322C.wonderCard.data; + return &gSaveBlock1Ptr->mysteryGift.card; } -struct MEventBuffer_3430_Sub *sav1_get_mevent_buffer_2(void) +struct MEventBuffer_3430 *sav1_get_mevent_buffer_2(void) { - return &gSaveBlock1Ptr->unk_322C.buffer_310.data; + return &gSaveBlock1Ptr->mysteryGift.unk_3430; } struct MysteryEventStruct *sub_801B044(void) { - return &gSaveBlock1Ptr->unk_322C.unk_340; + return &gSaveBlock1Ptr->mysteryGift.unk_340; } u16 *GetQuestionnaireWordsPtr(void) { - return gSaveBlock1Ptr->unk_322C.questionnaireWords; + return gSaveBlock1Ptr->mysteryGift.questionnaireWords; } -void DestroyWonderNews(void) +void ClearSavedWonderNews(void) { - s_DestroyWonderNews(); + ClearSavedWonderNewsInternal(); } -bool32 sub_801B078(const struct WonderNews *src) +bool32 SaveWonderNews(const struct WonderNews *news) { - if (!sub_801B114(src)) + if (!ValidateWonderNews(news)) return FALSE; - s_DestroyWonderNews(); - gSaveBlock1Ptr->unk_322C.wonderNews.data = *src; - gSaveBlock1Ptr->unk_322C.wonderNews.crc = CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.wonderNews.data, sizeof(struct WonderNews)); + ClearSavedWonderNewsInternal(); + gSaveBlock1Ptr->mysteryGift.news = *news; + gSaveBlock1Ptr->mysteryGift.newsCrc = CALC_CRC(gSaveBlock1Ptr->mysteryGift.news); return TRUE; } -bool32 ValidateReceivedWonderNews(void) +bool32 ValidateSavedWonderNews(void) { - if (CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.wonderNews.data, sizeof(struct WonderNews)) != gSaveBlock1Ptr->unk_322C.wonderNews.crc) + if (CALC_CRC(gSaveBlock1Ptr->mysteryGift.news) != gSaveBlock1Ptr->mysteryGift.newsCrc) return FALSE; - if (!sub_801B114(&gSaveBlock1Ptr->unk_322C.wonderNews.data)) + if (!ValidateWonderNews(&gSaveBlock1Ptr->mysteryGift.news)) return FALSE; return TRUE; } -static bool32 sub_801B114(const struct WonderNews *data) +static bool32 ValidateWonderNews(const struct WonderNews *data) { if (data->unk_00 == 0) return FALSE; @@ -90,17 +92,17 @@ static bool32 sub_801B114(const struct WonderNews *data) bool32 WonderNews_Test_Unk_02(void) { - const struct WonderNews *data = &gSaveBlock1Ptr->unk_322C.wonderNews.data; + const struct WonderNews *data = &gSaveBlock1Ptr->mysteryGift.news; if (data->unk_02 == 0) return FALSE; return TRUE; } -static void s_DestroyWonderNews(void) +static void ClearSavedWonderNewsInternal(void) { - CpuFill32(0, GetSavedWonderNews(), sizeof(gSaveBlock1Ptr->unk_322C.wonderNews.data)); - gSaveBlock1Ptr->unk_322C.wonderNews.crc = 0; + CpuFill32(0, GetSavedWonderNews(), sizeof(gSaveBlock1Ptr->mysteryGift.news)); + gSaveBlock1Ptr->mysteryGift.newsCrc = 0; } static void sub_801B180(void) @@ -111,9 +113,9 @@ static void sub_801B180(void) bool32 sub_801B1A4(const u8 *src) { - const u8 *r5 = (const u8 *)&gSaveBlock1Ptr->unk_322C.wonderNews.data; + const u8 *r5 = (const u8 *)&gSaveBlock1Ptr->mysteryGift.news; u32 i; - if (!ValidateReceivedWonderNews()) + if (!ValidateSavedWonderNews()) return FALSE; for (i = 0; i < sizeof(struct WonderNews); i++) @@ -125,9 +127,9 @@ bool32 sub_801B1A4(const u8 *src) return TRUE; } -void DestroyWonderCard(void) +void ClearSavedWonderCard(void) { - sub_801B330(); + InitSavedWonderCard(); sub_801B368(); sub_801B9F8(); ClearRamScript(); @@ -136,27 +138,25 @@ void DestroyWonderCard(void) ClearEReaderTrainer(&gSaveBlock2Ptr->frontier.ereaderTrainer); } -bool32 sub_801B21C(const struct WonderCard *data) +bool32 SaveWonderCard(const struct WonderCard *card) { - struct MEventBuffer_3430_Sub *r2; - struct WonderCard *r1; - if (!ValidateWonderCardData(data)) + struct MEventBuffer_3430 *r2; + if (!ValidateWonderCard(card)) return FALSE; - DestroyWonderCard(); - memcpy(&gSaveBlock1Ptr->unk_322C.wonderCard.data, data, sizeof(struct WonderCard)); - gSaveBlock1Ptr->unk_322C.wonderCard.crc = CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.wonderCard.data, sizeof(struct WonderCard)); - r2 = &gSaveBlock1Ptr->unk_322C.buffer_310.data; - r1 = &gSaveBlock1Ptr->unk_322C.wonderCard.data; - r2->unk_06 = r1->unk_02; + ClearSavedWonderCard(); + memcpy(&gSaveBlock1Ptr->mysteryGift.card, card, sizeof(struct WonderCard)); + gSaveBlock1Ptr->mysteryGift.cardCrc = CALC_CRC(gSaveBlock1Ptr->mysteryGift.card); + r2 = &gSaveBlock1Ptr->mysteryGift.unk_3430; + r2->unk_06 = (&gSaveBlock1Ptr->mysteryGift.card)->unk_02; return TRUE; } -bool32 ValidateReceivedWonderCard(void) +bool32 ValidateSavedWonderCard(void) { - if (gSaveBlock1Ptr->unk_322C.wonderCard.crc != CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.wonderCard.data, sizeof(struct WonderCard))) + if (gSaveBlock1Ptr->mysteryGift.cardCrc != CALC_CRC(gSaveBlock1Ptr->mysteryGift.card)) return FALSE; - if (!ValidateWonderCardData(&gSaveBlock1Ptr->unk_322C.wonderCard.data)) + if (!ValidateWonderCard(&gSaveBlock1Ptr->mysteryGift.card)) return FALSE; if (!ValidateSavedRamScript()) return FALSE; @@ -164,17 +164,17 @@ bool32 ValidateReceivedWonderCard(void) return TRUE; } -static bool32 ValidateWonderCardData(const struct WonderCard *data) +static bool32 ValidateWonderCard(const struct WonderCard *card) { - if (data->unk_00 == 0) + if (card->flagId == 0) return FALSE; - if (data->unk_08_0 > 2) + if (card->unk_08_0 > 2) return FALSE; - if (!(data->unk_08_6 == 0 || data->unk_08_6 == 1 || data->unk_08_6 == 2)) + if (!(card->unk_08_6 == 0 || card->unk_08_6 == 1 || card->unk_08_6 == 2)) return FALSE; - if (data->bgType >= NUM_WONDER_BGS) + if (card->bgType >= NUM_WONDER_BGS) return FALSE; - if (data->unk_09 > 7) + if (card->unk_09 > 7) return FALSE; return TRUE; @@ -182,29 +182,29 @@ static bool32 ValidateWonderCardData(const struct WonderCard *data) bool32 WonderCard_Test_Unk_08_6(void) { - const struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; - if (data->unk_08_6 == 0) + const struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->unk_08_6 == 0) return FALSE; return TRUE; } -static void sub_801B330(void) +static void InitSavedWonderCard(void) { - CpuFill32(0, &gSaveBlock1Ptr->unk_322C.wonderCard.data, sizeof(struct WonderCard)); - gSaveBlock1Ptr->unk_322C.wonderCard.crc = 0; + CpuFill32(0, &gSaveBlock1Ptr->mysteryGift.card, sizeof(gSaveBlock1Ptr->mysteryGift.card)); + gSaveBlock1Ptr->mysteryGift.cardCrc = 0; } static void sub_801B368(void) { CpuFill32(0, sav1_get_mevent_buffer_2(), 18 *sizeof(u16)); - gSaveBlock1Ptr->unk_322C.buffer_310.crc = 0; + gSaveBlock1Ptr->mysteryGift.unkCrc = 0; } u16 GetWonderCardFlagID(void) { - if (ValidateReceivedWonderCard()) - return gSaveBlock1Ptr->unk_322C.wonderCard.data.unk_00; + if (ValidateSavedWonderCard()) + return gSaveBlock1Ptr->mysteryGift.card.flagId; return 0; } @@ -215,9 +215,9 @@ void WonderCard_ResetInternalReceivedFlag(struct WonderCard *buffer) buffer->unk_08_6 = 0; } -static bool32 IsWonderCardFlagIDInValidRange(u16 a0) +static bool32 IsWonderCardFlagIDInValidRange(u16 flagId) { - if (a0 >= 1000 && a0 < 1020) + if (flagId >= 1000 && flagId < 1000 + NUM_MYSTERY_GIFT_FLAGS) return TRUE; return FALSE; @@ -228,23 +228,23 @@ static const u16 sMysteryGiftFlags[] = FLAG_RECEIVED_AURORA_TICKET, FLAG_RECEIVED_MYSTIC_TICKET, FLAG_RECEIVED_OLD_SEA_MAP, - FLAG_UNUSED_MYSTERY_GIFT_0x13D, - FLAG_UNUSED_MYSTERY_GIFT_0x13E, - FLAG_UNUSED_MYSTERY_GIFT_0x13F, - FLAG_UNUSED_MYSTERY_GIFT_0x140, - FLAG_UNUSED_MYSTERY_GIFT_0x141, - FLAG_UNUSED_MYSTERY_GIFT_0x142, - FLAG_UNUSED_MYSTERY_GIFT_0x143, - FLAG_UNUSED_MYSTERY_GIFT_0x144, - FLAG_UNUSED_MYSTERY_GIFT_0x145, - FLAG_UNUSED_MYSTERY_GIFT_0x146, - FLAG_UNUSED_MYSTERY_GIFT_0x147, - FLAG_UNUSED_MYSTERY_GIFT_0x148, - FLAG_UNUSED_MYSTERY_GIFT_0x149, - FLAG_UNUSED_MYSTERY_GIFT_0x14A, - FLAG_UNUSED_MYSTERY_GIFT_0x14B, - FLAG_UNUSED_MYSTERY_GIFT_0x14C, - FLAG_UNUSED_MYSTERY_GIFT_0x14D, + FLAG_MYSTERY_GIFT_UNUSED_1, + FLAG_MYSTERY_GIFT_UNUSED_2, + FLAG_MYSTERY_GIFT_UNUSED_3, + FLAG_MYSTERY_GIFT_UNUSED_4, + FLAG_MYSTERY_GIFT_UNUSED_5, + FLAG_MYSTERY_GIFT_UNUSED_6, + FLAG_MYSTERY_GIFT_UNUSED_7, + FLAG_MYSTERY_GIFT_UNUSED_8, + FLAG_MYSTERY_GIFT_UNUSED_9, + FLAG_MYSTERY_GIFT_UNUSED_10, + FLAG_MYSTERY_GIFT_UNUSED_11, + FLAG_MYSTERY_GIFT_UNUSED_12, + FLAG_MYSTERY_GIFT_UNUSED_13, + FLAG_MYSTERY_GIFT_UNUSED_14, + FLAG_MYSTERY_GIFT_UNUSED_15, + FLAG_MYSTERY_GIFT_UNUSED_16, + FLAG_MYSTERY_GIFT_UNUSED_17, }; bool32 CheckReceivedGiftFromWonderCard(void) @@ -259,7 +259,7 @@ bool32 CheckReceivedGiftFromWonderCard(void) return TRUE; } -static int sub_801B438(const struct MEventBuffer_3430_Sub *data, int size) +static int sub_801B438(const struct MEventBuffer_3430 *data, int size) { int r3 = 0; int i; @@ -272,7 +272,7 @@ static int sub_801B438(const struct MEventBuffer_3430_Sub *data, int size) return r3; } -static bool32 sub_801B460(const struct MEventBuffer_3430_Sub *data1, const u16 *data2, int size) +static bool32 sub_801B460(const struct MEventBuffer_3430 *data1, const u16 *data2, int size) { int i; for (i = 0; i < size; i++) @@ -300,33 +300,33 @@ static bool32 sub_801B4A4(const u16 *data) static int sub_801B4CC(void) { struct WonderCard *data; - if (!ValidateReceivedWonderCard()) + if (!ValidateSavedWonderCard()) return 0; - data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; + data = &gSaveBlock1Ptr->mysteryGift.card; if (data->unk_08_0 != 1) return 0; - return sub_801B438(&gSaveBlock1Ptr->unk_322C.buffer_310.data, data->unk_09); + return sub_801B438(&gSaveBlock1Ptr->mysteryGift.unk_3430, data->unk_09); } bool32 sub_801B508(const u16 *data) { - struct WonderCard *buffer = &gSaveBlock1Ptr->unk_322C.wonderCard.data; + struct WonderCard *buffer = &gSaveBlock1Ptr->mysteryGift.card; int size = buffer->unk_09; int i; if (!sub_801B4A4(data)) return FALSE; - if (sub_801B460(&gSaveBlock1Ptr->unk_322C.buffer_310.data, data, size)) + if (sub_801B460(&gSaveBlock1Ptr->mysteryGift.unk_3430, data, size)) return FALSE; for (i = 0; i < size; i++) { - if (gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_08[1][i] == 0 && gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_08[0][i] == 0) + if (gSaveBlock1Ptr->mysteryGift.unk_3430.unk_08[1][i] == 0 && gSaveBlock1Ptr->mysteryGift.unk_3430.unk_08[0][i] == 0) { - gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_08[1][i] = data[1]; - gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_08[0][i] = data[0]; + gSaveBlock1Ptr->mysteryGift.unk_3430.unk_08[1][i] = data[1]; + gSaveBlock1Ptr->mysteryGift.unk_3430.unk_08[0][i] = data[0]; return TRUE; } } @@ -334,7 +334,7 @@ bool32 sub_801B508(const u16 *data) return FALSE; } -void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1) +void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 isWonderNews) { int i; CpuFill32(0, data, sizeof(struct MEventStruct_Unk1442CC)); @@ -342,20 +342,20 @@ void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1) data->unk_04 = 1; data->unk_08 = 1; - if (a1) + if (isWonderNews) { data->unk_0C = 5; data->unk_10 = 0x0201; } - else + else // Wonder Card { data->unk_0C = 4; data->unk_10 = 0x0200; } - if (ValidateReceivedWonderCard()) + if (ValidateSavedWonderCard()) { - data->unk_14 = GetSavedWonderCard()->unk_00; + data->unk_14 = GetSavedWonderCard()->flagId; data->unk_20 = *sav1_get_mevent_buffer_2(); data->unk_44 = GetSavedWonderCard()->unk_09; } @@ -365,15 +365,15 @@ void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1) } for (i = 0; i < NUM_QUESTIONNAIRE_WORDS; i++) - data->unk_16[i] = gSaveBlock1Ptr->unk_322C.questionnaireWords[i]; + data->questionnaireWords[i] = gSaveBlock1Ptr->mysteryGift.questionnaireWords[i]; - CopyTrainerId(data->unk_4C, gSaveBlock2Ptr->playerTrainerId); - StringCopy(data->unk_45, gSaveBlock2Ptr->playerName); - for (i = 0; i < 6; i++) - data->unk_50[i] = gSaveBlock1Ptr->easyChatProfile[i]; + CopyTrainerId(data->playerTrainerId, gSaveBlock2Ptr->playerTrainerId); + StringCopy(data->playerName, gSaveBlock2Ptr->playerName); + for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) + data->easyChatProfile[i] = gSaveBlock1Ptr->easyChatProfile[i]; - memcpy(data->unk_5C, RomHeaderGameCode, 4); - data->unk_60 = RomHeaderSoftwareVersion; + memcpy(data->romHeaderGameCode, RomHeaderGameCode, 4); + data->romHeaderSoftwareVersion = RomHeaderSoftwareVersion; } bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1) @@ -422,12 +422,12 @@ u32 sub_801B708(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const vo return 2; } -bool32 MEventStruct_Unk1442CC_CompareField_unk_16(const struct MEventStruct_Unk1442CC *a0, const u16 *a1) +bool32 MysteryGift_DoesQuestionnaireMatch(const struct MEventStruct_Unk1442CC *data, const u16 *words) { int i; for (i = 0; i < NUM_QUESTIONNAIRE_WORDS; i++) { - if (a0->unk_16[i] != a1[i]) + if (data->questionnaireWords[i] != words[i]) return FALSE; } @@ -461,20 +461,20 @@ u16 MEventStruct_Unk1442CC_GetValueNFrom_unk_20(const struct MEventStruct_Unk144 static void sub_801B7D8(u32 command) { - struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; + struct WonderCard *data = &gSaveBlock1Ptr->mysteryGift.card; if (data->unk_08_0 == 2) { u16 *dest = NULL; switch (command) { case 0: - dest = &gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_00; + dest = &gSaveBlock1Ptr->mysteryGift.unk_3430.unk_00; break; case 1: - dest = &gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_02; + dest = &gSaveBlock1Ptr->mysteryGift.unk_3430.unk_02; break; case 2: - dest = &gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_04; + dest = &gSaveBlock1Ptr->mysteryGift.unk_3430.unk_04; break; case 3: break; @@ -499,46 +499,46 @@ u16 mevent_081445C0(u32 command) { case GET_CARD_BATTLES_WON_INTERNAL: { - struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; - if (data->unk_08_0 == 2) + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->unk_08_0 == 2) { - struct MEventBuffer_3430_Sub *buffer = &gSaveBlock1Ptr->unk_322C.buffer_310.data; + struct MEventBuffer_3430 *buffer = &gSaveBlock1Ptr->mysteryGift.unk_3430; return buffer->unk_00; } break; } case 1: // Never occurs { - struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; - if (data->unk_08_0 == 2) + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->unk_08_0 == 2) { - struct MEventBuffer_3430_Sub *buffer = &gSaveBlock1Ptr->unk_322C.buffer_310.data; + struct MEventBuffer_3430 *buffer = &gSaveBlock1Ptr->mysteryGift.unk_3430; return buffer->unk_02; } break; } case 2: // Never occurs { - struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; - if (data->unk_08_0 == 2) + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->unk_08_0 == 2) { - struct MEventBuffer_3430_Sub *buffer = &gSaveBlock1Ptr->unk_322C.buffer_310.data; + struct MEventBuffer_3430 *buffer = &gSaveBlock1Ptr->mysteryGift.unk_3430; return buffer->unk_04; } break; } case GET_NUM_STAMPS_INTERNAL: { - struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; - if (data->unk_08_0 == 1) + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->unk_08_0 == 1) return sub_801B4CC(); break; } case GET_MAX_STAMPS_INTERNAL: { - struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; - if (data->unk_08_0 == 1) - return data->unk_09; + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->unk_08_0 == 1) + return card->unk_09; break; } } @@ -552,16 +552,16 @@ void ResetReceivedWonderCardFlag(void) gUnknown_02022C70 = FALSE; } -bool32 MEventHandleReceivedWonderCard(u16 a0) +bool32 MEventHandleReceivedWonderCard(u16 flagId) { gUnknown_02022C70 = FALSE; - if (a0 == 0) + if (flagId == 0) return FALSE; - if (!ValidateReceivedWonderCard()) + if (!ValidateSavedWonderCard()) return FALSE; - if (gSaveBlock1Ptr->unk_322C.wonderCard.data.unk_00 != a0) + if (gSaveBlock1Ptr->mysteryGift.card.flagId != flagId) return FALSE; gUnknown_02022C70 = TRUE; @@ -575,13 +575,13 @@ void RecordIdOfWonderCardSenderByEventType(u32 a0, u32 a1) switch (a0) { case 2: - sub_801BA8C(2, a1, gSaveBlock1Ptr->unk_322C.unk_344[1], 5); + sub_801BA8C(2, a1, gSaveBlock1Ptr->mysteryGift.unk_344[1], 5); break; case 0: - sub_801BA8C(0, a1, gSaveBlock1Ptr->unk_322C.unk_344[0], 5); + sub_801BA8C(0, a1, gSaveBlock1Ptr->mysteryGift.unk_344[0], 5); break; case 1: - sub_801BA8C(1, a1, gSaveBlock1Ptr->unk_322C.unk_344[0], 5); + sub_801BA8C(1, a1, gSaveBlock1Ptr->mysteryGift.unk_344[0], 5); break; default: AGB_ASSERT(0); @@ -591,7 +591,7 @@ void RecordIdOfWonderCardSenderByEventType(u32 a0, u32 a1) static void sub_801B9F8(void) { - CpuFill32(0, gSaveBlock1Ptr->unk_322C.unk_344, sizeof(gSaveBlock1Ptr->unk_322C.unk_344)); + CpuFill32(0, gSaveBlock1Ptr->mysteryGift.unk_344, sizeof(gSaveBlock1Ptr->mysteryGift.unk_344)); } static bool32 sub_801BA24(u32 a0, u32 *a1, int size) diff --git a/src/mevent_client.c b/src/mevent_client.c index 9a62bf18ed..2bcab1e5ac 100644 --- a/src/mevent_client.c +++ b/src/mevent_client.c @@ -8,284 +8,292 @@ #include "mystery_event_script.h" #include "mevent_client.h" -EWRAM_DATA struct mevent_client * s_mevent_client_ptr = NULL; +enum { + FUNC_INIT, + FUNC_DONE, + FUNC_RECV, + FUNC_SEND, + FUNC_RUN, + FUNC_WAIT, + FUNC_6, + FUNC_7, +}; -static void mevent_client_init(struct mevent_client *, u32, u32); -static u32 mevent_client_exec(struct mevent_client *); -static void mevent_client_free_resources(struct mevent_client *); +EWRAM_DATA static struct MysteryGiftClient * sClient = NULL; -extern const struct mevent_client_cmd gUnknown_082F2598[]; +static void MysteryGiftClient_Init(struct MysteryGiftClient *, u32, u32); +static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient *); +static void MysteryGiftClient_Free(struct MysteryGiftClient *); -void mevent_client_do_init(u32 arg) +extern const struct MysteryGiftClientCmd gUnknown_082F2598[]; + +void MysteryGiftClient_Create(bool32 isWonderNews) { - s_mevent_client_ptr = AllocZeroed(sizeof(struct mevent_client)); - mevent_client_init(s_mevent_client_ptr, 1, 0); - s_mevent_client_ptr->unk_4C = arg; + sClient = AllocZeroed(sizeof(*sClient)); + MysteryGiftClient_Init(sClient, 1, 0); + sClient->isWonderNews = isWonderNews; } -u32 mevent_client_do_exec(u16 * a0) +u32 MysteryGiftClient_Run(u16 * endVal) { u32 result; - if (s_mevent_client_ptr == NULL) - return 6; - result = mevent_client_exec(s_mevent_client_ptr); - if (result == 6) + if (sClient == NULL) + return CLI_RET_END; + result = MysteryGiftClient_CallFunc(sClient); + if (result == CLI_RET_END) { - *a0 = s_mevent_client_ptr->param; - mevent_client_free_resources(s_mevent_client_ptr); - Free(s_mevent_client_ptr); - s_mevent_client_ptr = NULL; + *endVal = sClient->param; + MysteryGiftClient_Free(sClient); + Free(sClient); + sClient = NULL; } return result; } -void mevent_client_inc_flag(void) +void MysteryGiftClient_AdvanceState(void) { - s_mevent_client_ptr->flag++; + sClient->funcState++; } void * mevent_client_get_buffer(void) { - return s_mevent_client_ptr->buffer; + return sClient->buffer; } -void mevent_client_set_param(u32 a0) +void MysteryGiftClient_SetParam(u32 val) { - s_mevent_client_ptr->param = a0; + sClient->param = val; } -static void mevent_client_init(struct mevent_client * svr, u32 sendPlayerNo, u32 recvPlayerNo) +static void MysteryGiftClient_Init(struct MysteryGiftClient * client, u32 sendPlayerNo, u32 recvPlayerNo) { - svr->unk_00 = 0; - svr->mainseqno = 0; - svr->flag = 0; - svr->sendBuffer = AllocZeroed(ME_SEND_BUF_SIZE); - svr->recvBuffer = AllocZeroed(ME_SEND_BUF_SIZE); - svr->cmdBuffer = AllocZeroed(ME_SEND_BUF_SIZE); - svr->buffer = AllocZeroed(0x40); - mevent_srv_sub_init(&svr->manager, sendPlayerNo, recvPlayerNo); + client->unk_00 = 0; + client->funcId = FUNC_INIT; + client->funcState = 0; + client->sendBuffer = AllocZeroed(ME_SEND_BUF_SIZE); + client->recvBuffer = AllocZeroed(ME_SEND_BUF_SIZE); + client->cmdBuffer = AllocZeroed(ME_SEND_BUF_SIZE); + client->buffer = AllocZeroed(0x40); + MysteryGiftLink_Init(&client->link, sendPlayerNo, recvPlayerNo); } -static void mevent_client_free_resources(struct mevent_client * svr) +static void MysteryGiftClient_Free(struct MysteryGiftClient * client) { - Free(svr->sendBuffer); - Free(svr->recvBuffer); - Free(svr->cmdBuffer); - Free(svr->buffer); + Free(client->sendBuffer); + Free(client->recvBuffer); + Free(client->cmdBuffer); + Free(client->buffer); } -static void mevent_client_jmp_buffer(struct mevent_client * svr) +static void MysteryGiftClient_CopyRecvScript(struct MysteryGiftClient * client) { - memcpy(svr->cmdBuffer, svr->recvBuffer, ME_SEND_BUF_SIZE); - svr->cmdidx = 0; + memcpy(client->cmdBuffer, client->recvBuffer, ME_SEND_BUF_SIZE); + client->cmdidx = 0; } -static void mevent_client_send_word(struct mevent_client * svr, u32 ident, u32 word) +static void MysteryGiftClient_InitSend(struct MysteryGiftClient * client, u32 ident, u32 word) { - CpuFill32(0, svr->sendBuffer, ME_SEND_BUF_SIZE); - *(u32 *)svr->sendBuffer = word; - mevent_srv_sub_init_send(&svr->manager, ident, svr->sendBuffer, sizeof(u32)); + CpuFill32(0, client->sendBuffer, ME_SEND_BUF_SIZE); + *(u32 *)client->sendBuffer = word; + MysteryGiftLink_InitSend(&client->link, ident, client->sendBuffer, sizeof(u32)); } -static u32 mainseq_0(struct mevent_client * svr) +static u32 Client_Init(struct MysteryGiftClient * client) { - // init - memcpy(svr->cmdBuffer, gUnknown_082F2598, ME_SEND_BUF_SIZE); - svr->cmdidx = 0; - svr->mainseqno = 4; - svr->flag = 0; - return 0; + memcpy(client->cmdBuffer, gUnknown_082F2598, ME_SEND_BUF_SIZE); + client->cmdidx = 0; + client->funcId = FUNC_RUN; + client->funcState = 0; + return CLI_RET_INIT; } -static u32 mainseq_1(struct mevent_client * svr) +static u32 Client_Done(struct MysteryGiftClient * client) { - // done - return 6; + return CLI_RET_END; } -static u32 mainseq_2(struct mevent_client * svr) +static u32 Client_Recv(struct MysteryGiftClient * client) { - // do recv - if (mevent_srv_sub_recv(&svr->manager)) + if (MysteryGiftLink_Recv(&client->link)) { - svr->mainseqno = 4; - svr->flag = 0; + client->funcId = FUNC_RUN; + client->funcState = 0; } - return 1; + return CLI_RET_1; } -static u32 mainseq_3(struct mevent_client * svr) +static u32 Client_Send(struct MysteryGiftClient * client) { - // do send - if (mevent_srv_sub_send(&svr->manager)) + if (MysteryGiftLink_Send(&client->link)) { - svr->mainseqno = 4; - svr->flag = 0; + client->funcId = FUNC_RUN; + client->funcState = 0; } - return 1; + return CLI_RET_1; } -static u32 mainseq_4(struct mevent_client * svr) +static u32 Client_Run(struct MysteryGiftClient * client) { // process command - struct mevent_client_cmd * cmd = &svr->cmdBuffer[svr->cmdidx]; - ++svr->cmdidx; + struct MysteryGiftClientCmd * cmd = &client->cmdBuffer[client->cmdidx]; + client->cmdidx++; switch (cmd->instr) { - case 0: + case CLI_NONE: break; - case 1: - svr->param = cmd->parameter; - svr->mainseqno = 1; - svr->flag = 0; + case CLI_RETURN: + client->param = cmd->parameter; // Set for endVal in MysteryGiftClient_Run + client->funcId = FUNC_DONE; + client->funcState = 0; break; - case 2: - mevent_srv_sub_init_recv(&svr->manager, cmd->parameter, svr->recvBuffer); - svr->mainseqno = 2; - svr->flag = 0; + case CLI_RECV: + MysteryGiftLink_InitRecv(&client->link, cmd->parameter, client->recvBuffer); + client->funcId = FUNC_RECV; + client->funcState = 0; break; - case 3: - svr->mainseqno = 3; - svr->flag = 0; + case CLI_SEND_LOADED: + // Send without a MysteryGiftLink_InitSend + // Sends whatever has been loaded already + client->funcId = FUNC_SEND; + client->funcState = 0; break; - case 20: - mevent_srv_sub_init_send(&svr->manager, 0x14, svr->sendBuffer, 0); - svr->mainseqno = 3; - svr->flag = 0; + case CLI_20: + MysteryGiftLink_InitSend(&client->link, 0x14, client->sendBuffer, 0); + client->funcId = FUNC_SEND; + client->funcState = 0; break; - case 19: - mevent_client_send_word(svr, 0x12, GetGameStat(cmd->parameter)); - svr->mainseqno = 3; - svr->flag = 0; + case CLI_SEND_STAT: + MysteryGiftClient_InitSend(client, 0x12, GetGameStat(cmd->parameter)); + client->funcId = FUNC_SEND; + client->funcState = 0; break; - case 6: - if (svr->param == 0) - mevent_client_jmp_buffer(svr); + case CLI_COPY_RECV_IF_N: + if (client->param == FALSE) + MysteryGiftClient_CopyRecvScript(client); break; - case 7: - if (svr->param == 1) - mevent_client_jmp_buffer(svr); + case CLI_COPY_RECV_IF: + if (client->param == TRUE) + MysteryGiftClient_CopyRecvScript(client); break; - case 4: - mevent_client_jmp_buffer(svr); + case CLI_COPY_RECV: + MysteryGiftClient_CopyRecvScript(client); break; - case 5: - memcpy(svr->buffer, svr->recvBuffer, 0x40); - svr->mainseqno = 5; - svr->flag = 0; - return 2; - case 11: - memcpy(svr->buffer, svr->recvBuffer, 0x40); - svr->mainseqno = 5; - svr->flag = 0; - return 3; - case 12: - memcpy(svr->buffer, svr->recvBuffer, 0x40); - svr->mainseqno = 5; - svr->flag = 0; - return 5; - case 13: - svr->mainseqno = 5; - svr->flag = 0; - return 4; - case 8: - sub_801B580(svr->sendBuffer, svr->unk_4C); - mevent_srv_sub_init_send(&svr->manager, 0x11, svr->sendBuffer, sizeof(struct MEventStruct_Unk1442CC)); + case CLI_5: + memcpy(client->buffer, client->recvBuffer, 0x40); + client->funcId = FUNC_WAIT; + client->funcState = 0; + return CLI_RET_2; + case CLI_11: + memcpy(client->buffer, client->recvBuffer, 0x40); + client->funcId = FUNC_WAIT; + client->funcState = 0; + return CLI_RET_3; + case CLI_12: + memcpy(client->buffer, client->recvBuffer, 0x40); + client->funcId = FUNC_WAIT; + client->funcState = 0; + return CLI_RET_5; + case CLI_ASK_TOSS: + client->funcId = FUNC_WAIT; + client->funcState = 0; + return CLI_RET_ASK_TOSS; + case CLI_8: + sub_801B580(client->sendBuffer, client->isWonderNews); + MysteryGiftLink_InitSend(&client->link, 0x11, client->sendBuffer, sizeof(struct MEventStruct_Unk1442CC)); break; - case 14: - mevent_client_send_word(svr, 0x13, svr->param); + case CLI_LOAD_TOSS_RESPONSE: + // param here is set by MG_STATE_LINK_ASK_TOSS or MG_STATE_LINK_ASK_TOSS_UNRECEIVED + MysteryGiftClient_InitSend(client, 0x13, client->param); break; - case 10: - sub_801B21C(svr->recvBuffer); + case CLI_10: + SaveWonderCard(client->recvBuffer); break; - case 9: - if (!sub_801B1A4(svr->recvBuffer)) + case CLI_9: + if (!sub_801B1A4(client->recvBuffer)) { - sub_801B078(svr->recvBuffer); - mevent_client_send_word(svr, 0x13, 0); + SaveWonderNews(client->recvBuffer); + MysteryGiftClient_InitSend(client, 0x13, 0); } else - mevent_client_send_word(svr, 0x13, 1); + MysteryGiftClient_InitSend(client, 0x13, 1); break; - case 15: - svr->mainseqno = 6; - svr->flag = 0; + case CLI_15: + client->funcId = FUNC_6; + client->funcState = 0; break; - case 16: - sub_801B508(svr->recvBuffer); + case CLI_16: + sub_801B508(client->recvBuffer); break; - case 17: - InitRamScript_NoObjectEvent(svr->recvBuffer, 1000); + case CLI_17: + InitRamScript_NoObjectEvent(client->recvBuffer, 1000); break; - case 18: - memcpy(&gSaveBlock2Ptr->frontier.ereaderTrainer, svr->recvBuffer, 0xbc); + case CLI_RECV_EREADER_TRAINER: + memcpy(&gSaveBlock2Ptr->frontier.ereaderTrainer, client->recvBuffer, sizeof(gSaveBlock2Ptr->frontier.ereaderTrainer)); ValidateEReaderTrainer(); break; - case 21: - memcpy(gDecompressionBuffer, svr->recvBuffer, ME_SEND_BUF_SIZE); - svr->mainseqno = 7; - svr->flag = 0; + case CLI_21: + memcpy(gDecompressionBuffer, client->recvBuffer, ME_SEND_BUF_SIZE); + client->funcId = FUNC_7; + client->funcState = 0; break; } - return 1; + return CLI_RET_1; } -static u32 mainseq_5(struct mevent_client * svr) +static u32 Client_Wait(struct MysteryGiftClient * client) { - // wait flag - if (svr->flag) + if (client->funcState) { - svr->mainseqno = 4; - svr->flag = 0; + client->funcId = FUNC_RUN; + client->funcState = 0; } - return 1; + return CLI_RET_1; } -static u32 mainseq_6(struct mevent_client * svr) +static u32 Client_6(struct MysteryGiftClient * client) { - // ??? - switch (svr->flag) + switch (client->funcState) { case 0: - sub_8153870(svr->recvBuffer); - ++svr->flag; + InitMysteryGiftScriptContext(client->recvBuffer); + client->funcState++; break; case 1: - if (!sub_8153884(&svr->param)) + if (!RunMysteryGiftScriptContextCommand(&client->param)) { - svr->mainseqno = 4; - svr->flag = 0; + client->funcId = FUNC_RUN; + client->funcState = 0; } break; } - return 1; + return CLI_RET_1; } -static u32 mainseq_7(struct mevent_client * svr) +static u32 Client_7(struct MysteryGiftClient * client) { // exec arbitrary code u32 (*func)(u32 *, struct SaveBlock2 *, struct SaveBlock1 *) = (void *)gDecompressionBuffer; - if (func(&svr->param, gSaveBlock2Ptr, gSaveBlock1Ptr) == 1) + if (func(&client->param, gSaveBlock2Ptr, gSaveBlock1Ptr) == 1) { - svr->mainseqno = 4; - svr->flag = 0; + client->funcId = FUNC_RUN; + client->funcState = 0; } - return 1; + return CLI_RET_1; } -static u32 mevent_client_exec(struct mevent_client * svr) +static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient * client) { - u32 (*funcs[])(struct mevent_client *) = { - mainseq_0, - mainseq_1, - mainseq_2, - mainseq_3, - mainseq_4, - mainseq_5, - mainseq_6, - mainseq_7 + u32 (*funcs[])(struct MysteryGiftClient *) = { + [FUNC_INIT] = Client_Init, + [FUNC_DONE] = Client_Done, + [FUNC_RECV] = Client_Recv, + [FUNC_SEND] = Client_Send, + [FUNC_RUN] = Client_Run, + [FUNC_WAIT] = Client_Wait, + [FUNC_6] = Client_6, + [FUNC_7] = Client_7 }; - return funcs[svr->mainseqno](svr); + return funcs[client->funcId](client); } diff --git a/src/mevent_news.c b/src/mevent_news.c index 9e78cf406b..13d50bb0df 100644 --- a/src/mevent_news.c +++ b/src/mevent_news.c @@ -60,7 +60,7 @@ u16 sub_801DC20(void) struct MysteryEventStruct *r4 = sub_801B044(); u16 r5; - if (!IsMysteryEventEnabled() || !ValidateReceivedWonderNews()) + if (!IsMysteryEventEnabled() || !ValidateSavedWonderNews()) return 0; r5 = sub_801DD44(r4); diff --git a/src/mevent_scripts.c b/src/mevent_scripts.c index 41a5ddd51a..ddeca8f413 100644 --- a/src/mevent_scripts.c +++ b/src/mevent_scripts.c @@ -5,187 +5,191 @@ const u8 gText_CanceledReadingCard[] = _("Canceled reading\nthe Card."); -const struct mevent_client_cmd gUnknown_082F2598[] = { - {.instr = 2, .parameter = 16}, - {.instr = 4, .parameter = 0} +const struct MysteryGiftClientCmd gUnknown_082F2598[] = { + {.instr = CLI_RECV, .parameter = 16}, + {.instr = CLI_COPY_RECV} }; -const struct mevent_client_cmd gUnknown_082F25A8[] = { - {.instr = 8, .parameter = 0}, - {.instr = 3, .parameter = 0}, - {.instr = 2, .parameter = 16}, - {.instr = 4, .parameter = 0} +const struct MysteryGiftClientCmd gUnknown_082F25A8[] = { + {.instr = CLI_8}, + {.instr = CLI_SEND_LOADED}, + {.instr = CLI_RECV, .parameter = 16}, + {.instr = CLI_COPY_RECV} }; -const struct mevent_client_cmd gUnknown_082F25C8[] = { - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 10} +const struct MysteryGiftClientCmd gUnknown_082F25C8[] = { + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 10} }; -const struct mevent_client_cmd gUnknown_082F25D8[] = { - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 11} +const struct MysteryGiftClientCmd gUnknown_082F25D8[] = { + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 11} }; -const struct mevent_client_cmd gUnknown_082F25E8[] = { - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 0} +const struct MysteryGiftClientCmd gUnknown_082F25E8[] = { + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 0} }; -const struct mevent_client_cmd gUnknown_082F25F8[] = { - {.instr = 2, .parameter = 22}, - {.instr = 10, .parameter = 0}, - {.instr = 2, .parameter = 25}, - {.instr = 17, .parameter = 0}, - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 2} +const struct MysteryGiftClientCmd gUnknown_082F25F8[] = { + {.instr = CLI_RECV, .parameter = 22}, + {.instr = CLI_10}, + {.instr = CLI_RECV, .parameter = 25}, + {.instr = CLI_17}, + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 2} }; -const struct mevent_client_cmd gUnknown_082F2628[] = { - {.instr = 2, .parameter = 23}, - {.instr = 9, .parameter = 0}, - {.instr = 3, .parameter = 0}, - {.instr = 2, .parameter = 16}, - {.instr = 4, .parameter = 0} +const struct MysteryGiftClientCmd gUnknown_082F2628[] = { + {.instr = CLI_RECV, .parameter = 23}, + {.instr = CLI_9}, + {.instr = CLI_SEND_LOADED}, + {.instr = CLI_RECV, .parameter = 16}, + {.instr = CLI_COPY_RECV} }; -const struct mevent_client_cmd gUnknown_082F2650[] = { - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 7} +const struct MysteryGiftClientCmd gUnknown_082F2650[] = { + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 7} }; -const struct mevent_client_cmd gUnknown_082F2660[] = { - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 3} +const struct MysteryGiftClientCmd gUnknown_082F2660[] = { + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 3} }; -const struct mevent_client_cmd gUnknown_082F2670[] = { - {.instr = 13, .parameter = 0}, - {.instr = 14, .parameter = 0}, - {.instr = 3, .parameter = 0}, - {.instr = 2, .parameter = 16}, - {.instr = 4, .parameter = 0} +const struct MysteryGiftClientCmd gUnknown_082F2670[] = { + {.instr = CLI_ASK_TOSS}, + {.instr = CLI_LOAD_TOSS_RESPONSE}, + {.instr = CLI_SEND_LOADED}, + {.instr = CLI_RECV, .parameter = 16}, + {.instr = CLI_COPY_RECV} }; -const struct mevent_client_cmd gUnknown_082F2698[] = { - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 9} +const struct MysteryGiftClientCmd gUnknown_082F2698[] = { + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 9} }; -const struct mevent_client_cmd gUnknown_082F26A8[] = { - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 5} +const struct MysteryGiftClientCmd gUnknown_082F26A8[] = { + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 5} }; -const struct mevent_client_cmd gUnknown_082F26B8[] = { - {.instr = 2, .parameter = 21}, - {.instr = 12, .parameter = 0}, - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 14}, - {.instr = 2, .parameter = 21}, - {.instr = 12, .parameter = 0}, - {.instr = 20, .parameter = 0}, - {.instr = 1, .parameter = 13} +const struct MysteryGiftClientCmd gUnknown_082F26B8[] = { + {.instr = CLI_RECV, .parameter = 21}, + {.instr = CLI_12}, + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 14} +}; + +// Unused +const struct MysteryGiftClientCmd gUnknown_082F26B8_1[] = { + {.instr = CLI_RECV, .parameter = 21}, + {.instr = CLI_12}, + {.instr = CLI_20}, + {.instr = CLI_RETURN, .parameter = 13} }; const struct mevent_cmd gUnknown_082F26F8[] = { - {.instr = 18, .flag = 0x10, .parameter = gUnknown_082F25C8}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x0a, .parameter = NULL}, - {.instr = 18, .flag = 0x10, .parameter = gUnknown_082F25D8}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x0b, .parameter = NULL}, - {.instr = 18, .flag = 0x10, .parameter = gUnknown_082F2698}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x09, .parameter = NULL} + {.instr = 18, .flag = sizeof(gUnknown_082F25C8), .parameter = gUnknown_082F25C8}, + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0, .flag = 0x0a}, + {.instr = 18, .flag = sizeof(gUnknown_082F25D8), .parameter = gUnknown_082F25D8}, + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0, .flag = 0x0b}, + {.instr = 18, .flag = sizeof(gUnknown_082F2698), .parameter = gUnknown_082F2698}, + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0, .flag = 0x09} }; const struct mevent_cmd gUnknown_082F2788[] = { - {.instr = 18, .flag = 0x20, .parameter = gUnknown_082F26B8}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, + {.instr = 18, .flag = sizeof(gUnknown_082F26B8), .parameter = gUnknown_082F26B8}, + {.instr = 1}, {.instr = 20, .flag = 0x1b, .parameter = gText_CanceledReadingCard}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x09, .parameter = NULL} + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0, .flag = 0x09} }; const struct mevent_cmd gUnknown_082F27D0[] = { - {.instr = 18, .flag = 0x10, .parameter = gUnknown_082F2650}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x07, .parameter = NULL} + {.instr = 18, .flag = sizeof(gUnknown_082F2650), .parameter = gUnknown_082F2650}, + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0, .flag = 0x07} }; const struct mevent_cmd gUnknown_082F2800[] = { - {.instr = 18, .flag = 0x28, .parameter = gUnknown_082F2628}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 14, .flag = 0x00, .parameter = NULL}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x13, .parameter = NULL}, - {.instr = 8, .flag = 0x00, .parameter = NULL}, + {.instr = 18, .flag = sizeof(gUnknown_082F2628), .parameter = gUnknown_082F2628}, + {.instr = 1}, + {.instr = 14}, + {.instr = 1}, + {.instr = 2, .flag = 0x13}, + {.instr = 8}, {.instr = 4, .flag = 0x01, .parameter = gUnknown_082F27D0}, - {.instr = 18, .flag = 0x10, .parameter = gUnknown_082F2660}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x03, .parameter = NULL} + {.instr = 18, .flag = sizeof(gUnknown_082F2660), .parameter = gUnknown_082F2660}, + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0, .flag = 0x03} }; const struct mevent_cmd gUnknown_082F2884[] = { - {.instr = 18, .flag = 0x30, .parameter = gUnknown_082F25F8}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 13, .flag = 0x00, .parameter = NULL}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 15, .flag = 0x00, .parameter = NULL}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x02, .parameter = NULL} + {.instr = 18, .flag = sizeof(gUnknown_082F25F8), .parameter = gUnknown_082F25F8}, + {.instr = 1}, + {.instr = 13}, + {.instr = 1}, + {.instr = 15}, + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0, .flag = 0x02} }; const struct mevent_cmd gUnknown_082F28E4[] = { - {.instr = 18, .flag = 0x28, .parameter = gUnknown_082F2670}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x13, .parameter = NULL}, - {.instr = 8, .flag = 0x00, .parameter = NULL}, - {.instr = 4, .flag = 0x00, .parameter = gUnknown_082F2884}, - {.instr = 3, .flag = 0x00, .parameter = gUnknown_082F2788} + {.instr = 18, .flag = sizeof(gUnknown_082F2670), .parameter = gUnknown_082F2670}, + {.instr = 1}, + {.instr = 2, .flag = 0x13}, + {.instr = 8}, + {.instr = 4, .parameter = gUnknown_082F2884}, + {.instr = 3, .parameter = gUnknown_082F2788} }; const struct mevent_cmd gUnknown_082F292C[] = { - {.instr = 18, .flag = 0x10, .parameter = gUnknown_082F26A8}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x05, .parameter = NULL}, - {.instr = 18, .flag = 0x10, .parameter = gUnknown_082F25E8}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x14, .parameter = NULL}, - {.instr = 0, .flag = 0x00, .parameter = NULL} + {.instr = 18, .flag = sizeof(gUnknown_082F26A8), .parameter = gUnknown_082F26A8}, + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0, .flag = 0x05}, + {.instr = 18, .flag = sizeof(gUnknown_082F25E8), .parameter = gUnknown_082F25E8}, + {.instr = 1}, + {.instr = 2, .flag = 0x14}, + {.instr = 0} }; const struct mevent_cmd s_mevent_wonder_news[] = { - {.instr = 27, .flag = 0x00, .parameter = NULL}, - {.instr = 18, .flag = 0x20, .parameter = gUnknown_082F25A8}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x11, .parameter = NULL}, - {.instr = 5, .flag = 0x00, .parameter = NULL}, - {.instr = 30, .flag = 0x00, .parameter = NULL}, - {.instr = 4, .flag = 0x00, .parameter = gUnknown_082F26F8}, - {.instr = 3, .flag = 0x00, .parameter = gUnknown_082F2800} + {.instr = 27}, + {.instr = 18, .flag = sizeof(gUnknown_082F25A8), .parameter = gUnknown_082F25A8}, + {.instr = 1}, + {.instr = 2, .flag = 0x11}, + {.instr = 5}, + {.instr = 30}, + {.instr = 4, .parameter = gUnknown_082F26F8}, + {.instr = 3, .parameter = gUnknown_082F2800} }; const struct mevent_cmd s_mevent_wonder_card[] = { - {.instr = 26, .flag = 0x00, .parameter = NULL}, - {.instr = 28, .flag = 0x00, .parameter = NULL}, - {.instr = 18, .flag = 0x20, .parameter = gUnknown_082F25A8}, - {.instr = 1, .flag = 0x00, .parameter = NULL}, - {.instr = 2, .flag = 0x11, .parameter = NULL}, - {.instr = 5, .flag = 0x00, .parameter = NULL}, - {.instr = 6, .flag = 0x00, .parameter = NULL}, - {.instr = 4, .flag = 0x00, .parameter = gUnknown_082F26F8}, - {.instr = 7, .flag = 0x00, .parameter = NULL}, + {.instr = 26}, + {.instr = 28}, + {.instr = 18, .flag = sizeof(gUnknown_082F25A8), .parameter = gUnknown_082F25A8}, + {.instr = 1}, + {.instr = 2, .flag = 0x11}, + {.instr = 5}, + {.instr = 6}, + {.instr = 4, .parameter = gUnknown_082F26F8}, + {.instr = 7}, {.instr = 4, .flag = 0x02, .parameter = gUnknown_082F28E4}, - {.instr = 4, .flag = 0x00, .parameter = gUnknown_082F2884}, - {.instr = 3, .flag = 0x00, .parameter = gUnknown_082F292C} + {.instr = 4, .parameter = gUnknown_082F2884}, + {.instr = 3, .parameter = gUnknown_082F292C} }; diff --git a/src/mevent_server.c b/src/mevent_server.c index 2e7b3d89ad..1bae6a3e16 100644 --- a/src/mevent_server.c +++ b/src/mevent_server.c @@ -52,7 +52,7 @@ static void mevent_srv_init_common(struct mevent_srv_common * svr, const void * svr->mevent_unk1442cc = AllocZeroed(sizeof(struct MEventStruct_Unk1442CC)); svr->cmdBuffer = cmdBuffer; svr->cmdidx = 0; - mevent_srv_sub_init(&svr->manager, sendPlayerNo, recvPlayerNo); + MysteryGiftLink_Init(&svr->manager, sendPlayerNo, recvPlayerNo); } static void mevent_srv_free_resources(struct mevent_srv_common * svr) @@ -66,7 +66,7 @@ static void mevent_srv_free_resources(struct mevent_srv_common * svr) void mevent_srv_common_init_send(struct mevent_srv_common * svr, u32 ident, const void * src, u32 size) { AGB_ASSERT(size <= ME_SEND_BUF_SIZE); - mevent_srv_sub_init_send(&svr->manager, ident, src, size); + MysteryGiftLink_InitSend(&svr->manager, ident, src, size); } static const void * mevent_first_if_not_null_else_second(const void * a0, const void * a1) @@ -103,7 +103,7 @@ static u32 common_mainseq_1(struct mevent_srv_common * svr) static u32 common_mainseq_2(struct mevent_srv_common * svr) { // do recv - if (mevent_srv_sub_recv(&svr->manager)) + if (MysteryGiftLink_Recv(&svr->manager)) svr->mainseqno = 4; return 1; } @@ -111,7 +111,7 @@ static u32 common_mainseq_2(struct mevent_srv_common * svr) static u32 common_mainseq_3(struct mevent_srv_common * svr) { // do send - if (mevent_srv_sub_send(&svr->manager)) + if (MysteryGiftLink_Send(&svr->manager)) svr->mainseqno = 4; return 1; } @@ -138,7 +138,7 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr) case 2: // receive AGB_ASSERT(cmd->parameter == NULL); - mevent_srv_sub_init_recv(&svr->manager, cmd->flag, svr->recvBuffer); + MysteryGiftLink_InitRecv(&svr->manager, cmd->flag, svr->recvBuffer); svr->mainseqno = 2; break; case 3: @@ -196,7 +196,7 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr) break; case 11: AGB_ASSERT(cmd->flag == FALSE); - svr->param = MEventStruct_Unk1442CC_CompareField_unk_16(svr->mevent_unk1442cc, cmd->parameter); + svr->param = MysteryGift_DoesQuestionnaireMatch(svr->mevent_unk1442cc, cmd->parameter); break; case 12: AGB_ASSERT(cmd->flag == FALSE); diff --git a/src/mevent_server_helpers.c b/src/mevent_server_helpers.c index 616f394f71..17686e2875 100644 --- a/src/mevent_server_helpers.c +++ b/src/mevent_server_helpers.c @@ -11,20 +11,20 @@ #include "mevent.h" #include "mevent_server_helpers.h" -static u32 mevent_receive_func(struct mevent_srv_sub *); -static u32 mevent_send_func(struct mevent_srv_sub *); +static u32 mevent_receive_func(struct MysteryGiftLink *); +static u32 mevent_send_func(struct MysteryGiftLink *); -u32 mevent_srv_sub_recv(struct mevent_srv_sub * svr) +u32 MysteryGiftLink_Recv(struct MysteryGiftLink * svr) { return svr->recvFunc(svr); } -u32 mevent_srv_sub_send(struct mevent_srv_sub * svr) +u32 MysteryGiftLink_Send(struct MysteryGiftLink * svr) { return svr->sendFunc(svr); } -void mevent_srv_sub_init(struct mevent_srv_sub * svr, u32 sendPlayerNo, u32 recvPlayerNo) +void MysteryGiftLink_Init(struct MysteryGiftLink * svr, u32 sendPlayerNo, u32 recvPlayerNo) { svr->sendPlayerNo = sendPlayerNo; svr->recvPlayerNo = recvPlayerNo; @@ -41,7 +41,7 @@ void mevent_srv_sub_init(struct mevent_srv_sub * svr, u32 sendPlayerNo, u32 recv svr->recvFunc = mevent_receive_func; } -void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void * src, u32 size) +void MysteryGiftLink_InitSend(struct MysteryGiftLink * svr, u32 ident, const void * src, u32 size) { svr->seqno = 0; svr->sendIdent = ident; @@ -54,7 +54,7 @@ void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void svr->sendBfr = src; } -void mevent_srv_sub_init_recv(struct mevent_srv_sub * svr, u32 ident, void * dest) +void MysteryGiftLink_InitRecv(struct MysteryGiftLink * svr, u32 ident, void * dest) { svr->seqno = 0; svr->recvIdent = ident; @@ -82,7 +82,7 @@ static void mevent_reset_recv(u32 recv_idx) ResetBlockReceivedFlag(recv_idx); } -static bool32 mevent_receive_func(struct mevent_srv_sub * svr) +static bool32 mevent_receive_func(struct MysteryGiftLink * svr) { struct send_recv_header header; @@ -148,7 +148,7 @@ static bool32 mevent_receive_func(struct mevent_srv_sub * svr) return FALSE; } -static bool32 mevent_send_func(struct mevent_srv_sub * svr) +static bool32 mevent_send_func(struct MysteryGiftLink * svr) { struct send_recv_header header; diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index 176eab7fc6..7b5e8ebe5c 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -65,15 +65,15 @@ static bool32 RunMysteryEventScriptCommand(struct ScriptContext *ctx) return FALSE; } -void sub_8153870(u8 *script) +void InitMysteryGiftScriptContext(u8 *script) { InitMysteryEventScript(&sMysteryEventScriptContext, script); } -bool32 sub_8153884(u32 *a0) +bool32 RunMysteryGiftScriptContextCommand(u32 *script) { bool32 ret = RunMysteryEventScriptCommand(&sMysteryEventScriptContext); - *a0 = sMysteryEventScriptContext.data[2]; + *script = sMysteryEventScriptContext.data[2]; return ret; } diff --git a/src/mystery_gift.c b/src/mystery_gift.c index eb14d0e7a9..b3ec493f5f 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -761,9 +761,9 @@ static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cann static bool32 ValidateCardOrNews(bool32 isWonderNews) { if (!isWonderNews) - return ValidateReceivedWonderCard(); + return ValidateSavedWonderCard(); else - return ValidateReceivedWonderNews(); + return ValidateSavedWonderNews(); } static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews) @@ -795,12 +795,12 @@ static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews) return FALSE; } -static bool32 DestroyNewsOrCard(bool32 isWonderNews) +static bool32 ClearSavedNewsOrCard(bool32 isWonderNews) { if (!isWonderNews) - DestroyWonderCard(); + ClearSavedWonderCard(); else - DestroyWonderNews(); + ClearSavedWonderNews(); return TRUE; } @@ -1055,8 +1055,8 @@ enum { MG_STATE_COMMUNICATE, MG_STATE_9, MG_STATE_10, - MG_STATE_11, - MG_STATE_12, + MG_STATE_LINK_ASK_TOSS, + MG_STATE_LINK_ASK_TOSS_UNRECEIVED, MG_STATE_LINK_COMPLETE_WAIT, MG_STATE_LINK_COMPLETED, MG_STATE_LINK_RESULT_MSG, @@ -1119,14 +1119,14 @@ static void Task_MysteryGift(u8 taskId) { case 0: // "Wonder Cards" data->isWonderNews = FALSE; - if (ValidateReceivedWonderCard() == TRUE) + if (ValidateSavedWonderCard() == TRUE) data->state = MG_STATE_LOAD_GIFT; else data->state = MG_STATE_DONT_HAVE_ANY; break; case 1: // "Wonder News" data->isWonderNews = TRUE; - if (ValidateReceivedWonderNews() == TRUE) + if (ValidateSavedWonderNews() == TRUE) data->state = MG_STATE_LOAD_GIFT; else data->state = MG_STATE_DONT_HAVE_ANY; @@ -1220,7 +1220,7 @@ static void Task_MysteryGift(u8 taskId) { ClearScreenInBg0(TRUE); data->state = MG_STATE_COMMUNICATING; - mevent_client_do_init(data->isWonderNews); + MysteryGiftClient_Create(data->isWonderNews); } else if (gSpecialVar_Result == LINKUP_FAILED) { @@ -1234,25 +1234,25 @@ static void Task_MysteryGift(u8 taskId) data->state = MG_STATE_COMMUNICATE; break; case MG_STATE_COMMUNICATE: - switch (mevent_client_do_exec(&data->curPromptWindowId)) + switch (MysteryGiftClient_Run(&data->curPromptWindowId)) { - case 6: + case CLI_RET_END: Rfu_SetCloseLinkCallback(); data->prevPromptWindowId = data->curPromptWindowId; data->state = MG_STATE_LINK_COMPLETE_WAIT; break; - case 5: + case CLI_RET_5: memcpy(data->buffer, mevent_client_get_buffer(), 0x40); - mevent_client_inc_flag(); + MysteryGiftClient_AdvanceState(); break; - case 3: + case CLI_RET_3: data->state = MG_STATE_10; break; - case 2: + case CLI_RET_2: data->state = MG_STATE_9; break; - case 4: - data->state = MG_STATE_11; + case CLI_RET_ASK_TOSS: + data->state = MG_STATE_LINK_ASK_TOSS; StringCopy(gStringVar1, gLinkPlayers[0].name); break; } @@ -1262,14 +1262,14 @@ static void Task_MysteryGift(u8 taskId) switch (input) { case 0: // Yes - mevent_client_set_param(0); - mevent_client_inc_flag(); + MysteryGiftClient_SetParam(0); + MysteryGiftClient_AdvanceState(); data->state = MG_STATE_COMMUNICATING; break; case 1: // No case MENU_B_PRESSED: - mevent_client_set_param(1); - mevent_client_inc_flag(); + MysteryGiftClient_SetParam(1); + MysteryGiftClient_AdvanceState(); data->state = MG_STATE_COMMUNICATING; break; } @@ -1277,47 +1277,47 @@ static void Task_MysteryGift(u8 taskId) case MG_STATE_10: if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, mevent_client_get_buffer())) { - mevent_client_inc_flag(); + MysteryGiftClient_AdvanceState(); data->state = MG_STATE_COMMUNICATING; } break; - case MG_STATE_11: + case MG_STATE_LINK_ASK_TOSS: input = DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, FALSE, gText_ThrowAwayWonderCard); switch (input) { case 0: // Yes if (CheckReceivedGiftFromWonderCard() == TRUE) { - data->state = MG_STATE_12; + data->state = MG_STATE_LINK_ASK_TOSS_UNRECEIVED; } else { - mevent_client_set_param(0); - mevent_client_inc_flag(); + MysteryGiftClient_SetParam(0); + MysteryGiftClient_AdvanceState(); data->state = MG_STATE_COMMUNICATING; } break; case 1: // No case MENU_B_PRESSED: - mevent_client_set_param(1); - mevent_client_inc_flag(); + MysteryGiftClient_SetParam(1); + MysteryGiftClient_AdvanceState(); data->state = MG_STATE_COMMUNICATING; break; } break; - case MG_STATE_12: + case MG_STATE_LINK_ASK_TOSS_UNRECEIVED: input = DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, FALSE, gText_HaventReceivedCardsGift); switch (input) { case 0: // Yes - mevent_client_set_param(0); - mevent_client_inc_flag(); + MysteryGiftClient_SetParam(0); + MysteryGiftClient_AdvanceState(); data->state = MG_STATE_COMMUNICATING; break; case 1: // No case MENU_B_PRESSED: - mevent_client_set_param(1); - mevent_client_inc_flag(); + MysteryGiftClient_SetParam(1); + MysteryGiftClient_AdvanceState(); data->state = MG_STATE_COMMUNICATING; break; } @@ -1436,7 +1436,7 @@ static void Task_MysteryGift(u8 taskId) break; } case MG_STATE_ASK_TOSS: - // Player is atempting to discard a Wonder Card/News + // Player is attempting to discard a Wonder Card/News switch (AskDiscardGift(&data->textState, &data->curPromptWindowId, data->isWonderNews)) { case 0: // Yes @@ -1452,7 +1452,8 @@ static void Task_MysteryGift(u8 taskId) } break; case MG_STATE_ASK_TOSS_UNRECEIVED: - // Player is attempting to discard a Wonder Card that they haven't received the gift for + // Player has selected to toss a Wonder Card that they haven't received the gift for. + // Ask for confirmation again. switch ((u32)DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, TRUE, gText_HaventReceivedGiftOkayToDiscard)) { case 0: // Yes @@ -1467,7 +1468,7 @@ static void Task_MysteryGift(u8 taskId) case MG_STATE_TOSS: if (ExitWonderCardOrNews(data->isWonderNews, 1)) { - DestroyNewsOrCard(data->isWonderNews); + ClearSavedNewsOrCard(data->isWonderNews); data->state = MG_STATE_TOSS_SAVE; } break; diff --git a/src/scrcmd.c b/src/scrcmd.c index dfda7b3a2d..674973289c 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2230,7 +2230,7 @@ bool8 ScrCmd_checkmoneventlegal(struct ScriptContext *ctx) } // TODO: Should be renamed. Name implies general usage, but its specifically for Wonder Card -// See GetSavedRamScriptIfValid, which is NULL if ValidateReceivedWonderCard returns FALSE +// See GetSavedRamScriptIfValid, which is NULL if ValidateSavedWonderCard returns FALSE bool8 ScrCmd_gotoram(struct ScriptContext *ctx) { const u8* script = GetSavedRamScriptIfValid(); diff --git a/src/script.c b/src/script.c index 726c065439..6c2115dee3 100644 --- a/src/script.c +++ b/src/script.c @@ -417,7 +417,7 @@ bool32 ValidateSavedRamScript(void) u8 *GetSavedRamScriptIfValid(void) { struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data; - if (!ValidateReceivedWonderCard()) + if (!ValidateSavedWonderCard()) return NULL; if (scriptData->magic != RAM_SCRIPT_MAGIC) return NULL; diff --git a/src/wonder_transfer.c b/src/wonder_transfer.c index 1928ba12e5..1c456ecb33 100644 --- a/src/wonder_transfer.c +++ b/src/wonder_transfer.c @@ -51,7 +51,7 @@ struct UnkStruct_203F3C8_02DC struct WonderCardData { /*0000*/ struct WonderCard card; - /*014c*/ struct MEventBuffer_3430_Sub unk_014C; + /*014c*/ struct MEventBuffer_3430 unk_014C; /*0170*/ const struct WonderGraphics * gfx; /*0174*/ u8 enterExitState; /*0175*/ u8 unk_0175; @@ -176,7 +176,7 @@ static const struct WonderGraphics sCardGraphics[NUM_WONDER_BGS] = { {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 7, .tiles = sWonderCardBgGfx8, .map = sWonderCardBgTilemap8, .pal = sWonderCardBgPal8} }; -bool32 WonderCard_Init(struct WonderCard * card, struct MEventBuffer_3430_Sub * r6) +bool32 WonderCard_Init(struct WonderCard * card, struct MEventBuffer_3430 * r6) { if (card == NULL || r6 == NULL) return FALSE; From e3bb257bcf4ec855a0a45794c2838f0e2b5708f5 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 15 Oct 2021 12:05:19 -0400 Subject: [PATCH 063/417] Fix some trainer card link access --- include/trainer_card.h | 15 +++++++---- src/cable_club.c | 6 ++--- src/trainer_card.c | 56 +++++++++++++++++++++--------------------- src/union_room.c | 15 ++++++----- 4 files changed, 50 insertions(+), 42 deletions(-) diff --git a/include/trainer_card.h b/include/trainer_card.h index 685d1cdcab..f5e73da839 100644 --- a/include/trainer_card.h +++ b/include/trainer_card.h @@ -44,8 +44,11 @@ struct TrainerCard /*0x28*/ u16 easyChatProfile[TRAINER_CARD_PROFILE_LENGTH]; /*0x30*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x38*/ u8 version; - /*0x3A*/ bool16 hasAllFrontierSymbols; - /*0x3C*/ u32 berryCrushPoints; + /*0x3A*/ bool16 linkHasAllFrontierSymbols; + /*0x3C*/ union { + u32 berryCrush; + u32 frontier; + } linkPoints; // This field is used differently by FRLG vs Emerald /*0x40*/ u32 unionRoomNum; /*0x44*/ u8 filler[8]; /*0x4C*/ bool8 shouldDrawStickers; // FRLG only @@ -54,7 +57,9 @@ struct TrainerCard /*0x4F*/ u8 facilityClass; /*0x50*/ u8 stickers[TRAINER_CARD_STICKER_TYPES]; // FRLG only /*0x54*/ u16 monSpecies[PARTY_SIZE]; // FRLG only - /*0x60*/ bool16 hasAllSymbols; + // Note: Link players use linkHasAllFrontierSymbols, not the field below, + // which they use for a Wonder Card flag id instead (see CreateTrainerCardInBuffer) + /*0x60*/ bool16 hasAllFrontierSymbols; /*0x62*/ u16 frontierBP; }; @@ -62,9 +67,9 @@ extern struct TrainerCard gTrainerCards[4]; u32 CountPlayerTrainerStars(void); u8 GetTrainerCardStars(u8 cardId); -void CopyTrainerCardData(struct TrainerCard *dst, u16 *src, u8 gameVersion); +void CopyTrainerCardData(struct TrainerCard *dst, struct TrainerCard *src, u8 gameVersion); void ShowPlayerTrainerCard(void (*callback)(void)); void ShowTrainerCardInLink(u8 arg0, void (*callback)(void)); -void TrainerCard_GenerateCardForPlayer(struct TrainerCard *); +void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard *); #endif // GUARD_TRAINER_CARD_H diff --git a/src/cable_club.c b/src/cable_club.c index 8db583989d..3a4f723eab 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -372,7 +372,7 @@ static void Task_LinkupExchangeDataWithLeader(u8 taskId) gLocalLinkPlayerId = GetMultiplayerId(); SaveLinkPlayers(gFieldLinkPlayerCount); card = (struct TrainerCard *)gBlockSendBuffer; - TrainerCard_GenerateCardForPlayer(card); + TrainerCard_GenerateCardForLinkPlayer(card); card->monSpecies[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES, NULL); card->monSpecies[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL); gTasks[taskId].func = Task_LinkupAwaitTrainerCardData; @@ -420,7 +420,7 @@ static void Task_LinkupCheckStatusAfterConfirm(u8 taskId) gLocalLinkPlayerId = GetMultiplayerId(); SaveLinkPlayers(gFieldLinkPlayerCount); card = (struct TrainerCard *)gBlockSendBuffer; - TrainerCard_GenerateCardForPlayer(card); + TrainerCard_GenerateCardForLinkPlayer(card); card->monSpecies[0] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[0] - 1], MON_DATA_SPECIES, NULL); card->monSpecies[1] = GetMonData(&gPlayerParty[gSelectedOrderFromParty[1] - 1], MON_DATA_SPECIES, NULL); gTasks[taskId].func = Task_LinkupAwaitTrainerCardData; @@ -518,7 +518,7 @@ static void Task_LinkupAwaitTrainerCardData(u8 taskId) for (index = 0; index < GetLinkPlayerCount(); index++) { - CopyTrainerCardData(&gTrainerCards[index], gBlockRecvBuffer[index], gLinkPlayers[index].version); + CopyTrainerCardData(&gTrainerCards[index], (struct TrainerCard *)gBlockRecvBuffer[index], gLinkPlayers[index].version); } SetSuppressLinkErrorMessage(FALSE); diff --git a/src/trainer_card.c b/src/trainer_card.c index c11ee83c03..bad015644c 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -110,7 +110,7 @@ static bool8 HasAllFrontierSymbols(void); static u8 GetRubyTrainerStars(struct TrainerCard*); static u16 GetCaughtMonsCount(void); static void SetPlayerCardData(struct TrainerCard*, u8); -static void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard*); +static void TrainerCard_GenerateCardForPlayer(struct TrainerCard*); static u8 VersionToCardType(u8); static void SetDataFromTrainerCard(void); static void InitGpuRegs(void); @@ -750,29 +750,13 @@ static void SetPlayerCardData(struct TrainerCard *trainerCard, u8 cardType) } } -static void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard *trainerCard) +static void TrainerCard_GenerateCardForPlayer(struct TrainerCard *trainerCard) { memset(trainerCard, 0, sizeof(struct TrainerCard)); trainerCard->version = GAME_VERSION; SetPlayerCardData(trainerCard, CARD_TYPE_EMERALD); - trainerCard->hasAllSymbols = HasAllFrontierSymbols(); - trainerCard->frontierBP = gSaveBlock2Ptr->frontier.cardBattlePoints; - if (trainerCard->hasAllSymbols) - trainerCard->stars++; - - if (trainerCard->gender == FEMALE) - trainerCard->facilityClass = gLinkPlayerFacilityClasses[(trainerCard->trainerId % NUM_FEMALE_LINK_FACILITY_CLASSES) + NUM_MALE_LINK_FACILITY_CLASSES]; - else - trainerCard->facilityClass = gLinkPlayerFacilityClasses[trainerCard->trainerId % NUM_MALE_LINK_FACILITY_CLASSES]; -} - -void TrainerCard_GenerateCardForPlayer(struct TrainerCard *trainerCard) -{ - memset(trainerCard, 0, 0x60); - trainerCard->version = GAME_VERSION; - SetPlayerCardData(trainerCard, CARD_TYPE_EMERALD); trainerCard->hasAllFrontierSymbols = HasAllFrontierSymbols(); - *((u16*)&trainerCard->berryCrushPoints) = gSaveBlock2Ptr->frontier.cardBattlePoints; + trainerCard->frontierBP = gSaveBlock2Ptr->frontier.cardBattlePoints; if (trainerCard->hasAllFrontierSymbols) trainerCard->stars++; @@ -782,7 +766,23 @@ void TrainerCard_GenerateCardForPlayer(struct TrainerCard *trainerCard) trainerCard->facilityClass = gLinkPlayerFacilityClasses[trainerCard->trainerId % NUM_MALE_LINK_FACILITY_CLASSES]; } -void CopyTrainerCardData(struct TrainerCard *dst, u16 *src, u8 gameVersion) +void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard *trainerCard) +{ + memset(trainerCard, 0, 0x60); + trainerCard->version = GAME_VERSION; + SetPlayerCardData(trainerCard, CARD_TYPE_EMERALD); + trainerCard->linkHasAllFrontierSymbols = HasAllFrontierSymbols(); + *((u16*)&trainerCard->linkPoints.frontier) = gSaveBlock2Ptr->frontier.cardBattlePoints; + if (trainerCard->linkHasAllFrontierSymbols) + trainerCard->stars++; + + if (trainerCard->gender == FEMALE) + trainerCard->facilityClass = gLinkPlayerFacilityClasses[(trainerCard->trainerId % NUM_FEMALE_LINK_FACILITY_CLASSES) + NUM_MALE_LINK_FACILITY_CLASSES]; + else + trainerCard->facilityClass = gLinkPlayerFacilityClasses[trainerCard->trainerId % NUM_MALE_LINK_FACILITY_CLASSES]; +} + +void CopyTrainerCardData(struct TrainerCard *dst, struct TrainerCard *src, u8 gameVersion) { memset(dst, 0, sizeof(struct TrainerCard)); dst->version = gameVersion; @@ -797,9 +797,9 @@ void CopyTrainerCardData(struct TrainerCard *dst, u16 *src, u8 gameVersion) break; case CARD_TYPE_EMERALD: memcpy(dst, src, 0x60); - dst->berryCrushPoints = 0; - dst->hasAllSymbols = src[29]; - dst->frontierBP = src[30]; + dst->linkPoints.frontier = 0; + dst->hasAllFrontierSymbols = src->linkHasAllFrontierSymbols; + dst->frontierBP = *((u16*)&src->linkPoints.frontier); break; } } @@ -1243,13 +1243,13 @@ static void PrintTradesStringOnCard(void) static void BufferBerryCrushPoints(void) { - if (sData->cardType == CARD_TYPE_FRLG && sData->trainerCard.berryCrushPoints) - ConvertIntToDecimalStringN(sData->textBerryCrushPts, sData->trainerCard.berryCrushPoints, STR_CONV_MODE_RIGHT_ALIGN, 5); + if (sData->cardType == CARD_TYPE_FRLG && sData->trainerCard.linkPoints.berryCrush) + ConvertIntToDecimalStringN(sData->textBerryCrushPts, sData->trainerCard.linkPoints.berryCrush, STR_CONV_MODE_RIGHT_ALIGN, 5); } static void PrintBerryCrushStringOnCard(void) { - if (sData->cardType == CARD_TYPE_FRLG && sData->trainerCard.berryCrushPoints) + if (sData->cardType == CARD_TYPE_FRLG && sData->trainerCard.linkPoints.berryCrush) PrintStatOnBackOfCard(4, gText_BerryCrush, sData->textBerryCrushPts, sTrainerCardStatColors); } @@ -1524,7 +1524,7 @@ static void DrawCardBackStats(void) FillBgTilemapBufferRect(3, 141, 27, 9, 1, 1, 1); FillBgTilemapBufferRect(3, 157, 27, 10, 1, 1, 1); } - if (sData->trainerCard.berryCrushPoints) + if (sData->trainerCard.linkPoints.berryCrush) { FillBgTilemapBufferRect(3, 141, 21, 13, 1, 1, 1); FillBgTilemapBufferRect(3, 157, 21, 14, 1, 1, 1); @@ -1803,7 +1803,7 @@ void ShowPlayerTrainerCard(void (*callback)(void)) sData->isLink = FALSE; sData->language = GAME_LANGUAGE; - TrainerCard_GenerateCardForLinkPlayer(&sData->trainerCard); + TrainerCard_GenerateCardForPlayer(&sData->trainerCard); SetMainCallback2(CB2_InitTrainerCard); } diff --git a/src/union_room.c b/src/union_room.c index 0512a1f5c4..37d2434dda 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1532,13 +1532,15 @@ static void Task_ExchangeCards(u8 taskId) for (i = 0; i < GetLinkPlayerCount(); i++) { recvBuff = gBlockRecvBuffer[i]; - CopyTrainerCardData(&gTrainerCards[i], recvBuff, gLinkPlayers[i].version); + CopyTrainerCardData(&gTrainerCards[i], (struct TrainerCard *)recvBuff, gLinkPlayers[i].version); } if (GetLinkPlayerCount() == 2) { + // Note: hasAllFrontierSymbols is a re-used field. + // Here it is set by CreateTrainerCardInBuffer. recvBuff = gBlockRecvBuffer[GetMultiplayerId() ^ 1]; - MEventHandleReceivedWonderCard(recvBuff[48]); + MEventHandleReceivedWonderCard(((struct TrainerCard *)recvBuff)->hasAllFrontierSymbols); } else { @@ -1626,13 +1628,14 @@ static void CB2_TransitionToCableClub(void) static void CreateTrainerCardInBuffer(void *dest, bool32 setWonderCard) { - u16 *argAsU16Ptr = dest; + struct TrainerCard * card = (struct TrainerCard *)dest; + TrainerCard_GenerateCardForLinkPlayer(card); - TrainerCard_GenerateCardForPlayer((struct TrainerCard *)argAsU16Ptr); + // Below field is re-used, to be read by Task_ExchangeCards if (setWonderCard) - argAsU16Ptr[48] = GetWonderCardFlagID(); + card->hasAllFrontierSymbols = GetWonderCardFlagID(); else - argAsU16Ptr[48] = 0; + card->hasAllFrontierSymbols = 0; } static void Task_StartActivity(u8 taskId) From 845a5e99cc01607aae5f74c3e5e700a72734145f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 15 Oct 2021 12:56:14 -0400 Subject: [PATCH 064/417] General mystery gift documentation, finish mystery gift client/server/scripts --- data/scripts/mevent_battle_card.inc | 6 +- data/scripts/mevent_pichu.inc | 22 +- data/scripts/mevent_stamp_card.inc | 4 +- data/specials.inc | 2 +- include/constants/flags.h | 68 ++-- include/constants/mevent.h | 40 ++- include/constants/vars.h | 16 +- include/event_data.h | 4 +- include/global.h | 45 ++- include/main.h | 3 +- include/mevent.h | 56 ++-- include/mevent2.h | 6 - include/mevent_client.h | 62 ++-- include/mevent_news.h | 4 +- include/mevent_server.h | 102 ++++-- include/mevent_server_helpers.h | 33 +- include/mystery_gift.h | 2 +- include/wonder_transfer.h | 2 +- src/cable_club.c | 6 +- src/ereader_screen.c | 14 +- src/event_data.c | 52 ++-- src/field_specials.c | 16 +- src/mevent2.c | 468 +++++++++++++++------------- src/mevent_client.c | 122 ++++---- src/mevent_news.c | 92 +++--- src/mevent_scripts.c | 310 +++++++++--------- src/mevent_server.c | 362 +++++++++++---------- src/mevent_server_helpers.c | 291 ++++++++--------- src/mystery_gift.c | 423 +++++++++++++------------ src/new_game.c | 2 +- src/script.c | 11 +- src/trade.c | 7 +- src/union_room.c | 20 +- src/wonder_transfer.c | 85 ++--- 34 files changed, 1479 insertions(+), 1279 deletions(-) delete mode 100644 include/mevent2.h diff --git a/data/scripts/mevent_battle_card.inc b/data/scripts/mevent_battle_card.inc index 3a66297e13..5361077464 100644 --- a/data/scripts/mevent_battle_card.inc +++ b/data/scripts/mevent_battle_card.inc @@ -1,8 +1,8 @@ MysteryEventScript_BattleCard:: setvaddress MysteryEventScript_BattleCard - vgoto_if_set FLAG_MYSTERY_EVENT_DONE, MysteryEventScript_BattleCardInfo + vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryEventScript_BattleCardInfo setorcopyvar VAR_RESULT, GET_CARD_BATTLES_WON - specialvar VAR_0x8008, GetMysteryEventCardVal + specialvar VAR_0x8008, GetMysteryGiftCardStat compare VAR_0x8008, REQUIRED_CARD_BATTLES vgoto_if_ne MysteryEventScript_BattleCardInfo lock @@ -12,7 +12,7 @@ MysteryEventScript_BattleCard:: waitbuttonpress giveitem ITEM_POTION release - setflag FLAG_MYSTERY_EVENT_DONE + setflag FLAG_MYSTERY_GIFT_DONE end MysteryEventScript_BattleCardInfo: diff --git a/data/scripts/mevent_pichu.inc b/data/scripts/mevent_pichu.inc index 02b47b41f6..9256d53a73 100644 --- a/data/scripts/mevent_pichu.inc +++ b/data/scripts/mevent_pichu.inc @@ -1,13 +1,13 @@ MysteryEventScript_SurfPichu:: setvaddress MysteryEventScript_SurfPichu - vgoto_if_unset FLAG_MYSTERY_EVENT_DONE, SurfPichu_GiveIfPossible + vgoto_if_unset FLAG_MYSTERY_GIFT_DONE, SurfPichu_GiveIfPossible returnram SurfPichu_GiveIfPossible: - specialvar VAR_EVENT_PICHU_SLOT, CalculatePlayerPartyCount - compare VAR_EVENT_PICHU_SLOT, PARTY_SIZE + specialvar VAR_GIFT_PICHU_SLOT, CalculatePlayerPartyCount + compare VAR_GIFT_PICHU_SLOT, PARTY_SIZE vgoto_if_eq SurfPichu_FullParty - setflag FLAG_MYSTERY_EVENT_DONE + setflag FLAG_MYSTERY_GIFT_DONE vcall SurfPichu_GiveEgg lock faceplayer @@ -30,17 +30,17 @@ SurfPichu_FullParty: SurfPichu_GiveEgg: giveegg SPECIES_PICHU - setmoneventlegal VAR_EVENT_PICHU_SLOT - setmonmetlocation VAR_EVENT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER - compare VAR_EVENT_PICHU_SLOT, 1 + setmoneventlegal VAR_GIFT_PICHU_SLOT + setmonmetlocation VAR_GIFT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER + compare VAR_GIFT_PICHU_SLOT, 1 vgoto_if_eq SurfPichu_Slot1 - compare VAR_EVENT_PICHU_SLOT, 2 + compare VAR_GIFT_PICHU_SLOT, 2 vgoto_if_eq SurfPichu_Slot2 - compare VAR_EVENT_PICHU_SLOT, 3 + compare VAR_GIFT_PICHU_SLOT, 3 vgoto_if_eq SurfPichu_Slot3 - compare VAR_EVENT_PICHU_SLOT, 4 + compare VAR_GIFT_PICHU_SLOT, 4 vgoto_if_eq SurfPichu_Slot4 - compare VAR_EVENT_PICHU_SLOT, 5 + compare VAR_GIFT_PICHU_SLOT, 5 vgoto_if_eq SurfPichu_Slot5 return diff --git a/data/scripts/mevent_stamp_card.inc b/data/scripts/mevent_stamp_card.inc index eeb3618548..e313aa29d5 100644 --- a/data/scripts/mevent_stamp_card.inc +++ b/data/scripts/mevent_stamp_card.inc @@ -1,9 +1,9 @@ MysteryEventScript_StampCard:: setvaddress MysteryEventScript_StampCard setorcopyvar VAR_RESULT, GET_MAX_STAMPS - specialvar VAR_0x8008, GetMysteryEventCardVal + specialvar VAR_0x8008, GetMysteryGiftCardStat setorcopyvar VAR_RESULT, GET_NUM_STAMPS - specialvar VAR_0x8009, GetMysteryEventCardVal + specialvar VAR_0x8009, GetMysteryGiftCardStat subvar VAR_0x8008, VAR_0x8009 buffernumberstring 0, VAR_0x8008 lock diff --git a/data/specials.inc b/data/specials.inc index 297cf7d8af..85c9251c6d 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -400,7 +400,7 @@ gSpecials:: def_special ClearQuizLadyQuestionAndAnswer def_special QuizLadySetCustomQuestion def_special QuizLadyTakePrizeForCustomQuiz - def_special GetMysteryEventCardVal + def_special GetMysteryGiftCardStat def_special QuizLadyRecordCustomQuizData def_special QuizLadySetWaitingForChallenger def_special BufferQuizCorrectAnswer diff --git a/include/constants/flags.h b/include/constants/flags.h index 880d227aa7..793fe11354 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -338,24 +338,24 @@ #define FLAG_RECEIVED_AURORA_TICKET 0x13A #define FLAG_RECEIVED_MYSTIC_TICKET 0x13B #define FLAG_RECEIVED_OLD_SEA_MAP 0x13C -#define FLAG_MYSTERY_GIFT_UNUSED_1 0x13D // These mystery gift flags are referenced but never set -#define FLAG_MYSTERY_GIFT_UNUSED_2 0x13E -#define FLAG_MYSTERY_GIFT_UNUSED_3 0x13F -#define FLAG_MYSTERY_GIFT_UNUSED_4 0x140 -#define FLAG_MYSTERY_GIFT_UNUSED_5 0x141 -#define FLAG_MYSTERY_GIFT_UNUSED_6 0x142 -#define FLAG_MYSTERY_GIFT_UNUSED_7 0x143 -#define FLAG_MYSTERY_GIFT_UNUSED_8 0x144 -#define FLAG_MYSTERY_GIFT_UNUSED_9 0x145 -#define FLAG_MYSTERY_GIFT_UNUSED_10 0x146 -#define FLAG_MYSTERY_GIFT_UNUSED_11 0x147 -#define FLAG_MYSTERY_GIFT_UNUSED_12 0x148 -#define FLAG_MYSTERY_GIFT_UNUSED_13 0x149 -#define FLAG_MYSTERY_GIFT_UNUSED_14 0x14A -#define FLAG_MYSTERY_GIFT_UNUSED_15 0x14B -#define FLAG_MYSTERY_GIFT_UNUSED_16 0x14C -#define FLAG_MYSTERY_GIFT_UNUSED_17 0x14D -#define NUM_MYSTERY_GIFT_FLAGS (1 + FLAG_MYSTERY_GIFT_UNUSED_17 - FLAG_RECEIVED_AURORA_TICKET) +#define FLAG_WONDER_CARD_UNUSED_1 0x13D // These Wonder Card flags are referenced but never set +#define FLAG_WONDER_CARD_UNUSED_2 0x13E +#define FLAG_WONDER_CARD_UNUSED_3 0x13F +#define FLAG_WONDER_CARD_UNUSED_4 0x140 +#define FLAG_WONDER_CARD_UNUSED_5 0x141 +#define FLAG_WONDER_CARD_UNUSED_6 0x142 +#define FLAG_WONDER_CARD_UNUSED_7 0x143 +#define FLAG_WONDER_CARD_UNUSED_8 0x144 +#define FLAG_WONDER_CARD_UNUSED_9 0x145 +#define FLAG_WONDER_CARD_UNUSED_10 0x146 +#define FLAG_WONDER_CARD_UNUSED_11 0x147 +#define FLAG_WONDER_CARD_UNUSED_12 0x148 +#define FLAG_WONDER_CARD_UNUSED_13 0x149 +#define FLAG_WONDER_CARD_UNUSED_14 0x14A +#define FLAG_WONDER_CARD_UNUSED_15 0x14B +#define FLAG_WONDER_CARD_UNUSED_16 0x14C +#define FLAG_WONDER_CARD_UNUSED_17 0x14D +#define NUM_WONDER_CARD_FLAGS (1 + FLAG_WONDER_CARD_UNUSED_17 - FLAG_RECEIVED_AURORA_TICKET) #define FLAG_MIRAGE_TOWER_VISIBLE 0x14E #define FLAG_CHOSE_ROOT_FOSSIL 0x14F @@ -519,22 +519,22 @@ #define FLAG_UNUSED_0x1E3 0x1E3 // Unused Flag // Mystery Gift Flags (Unknown) -#define FLAG_MYSTERY_EVENT_DONE 0x1E4 -#define FLAG_MYSTERY_EVENT_1 0x1E5 -#define FLAG_MYSTERY_EVENT_2 0x1E6 -#define FLAG_MYSTERY_EVENT_3 0x1E7 -#define FLAG_MYSTERY_EVENT_4 0x1E8 -#define FLAG_MYSTERY_EVENT_5 0x1E9 -#define FLAG_MYSTERY_EVENT_6 0x1EA -#define FLAG_MYSTERY_EVENT_7 0x1EB -#define FLAG_MYSTERY_EVENT_8 0x1EC -#define FLAG_MYSTERY_EVENT_9 0x1ED -#define FLAG_MYSTERY_EVENT_10 0x1EE -#define FLAG_MYSTERY_EVENT_11 0x1EF -#define FLAG_MYSTERY_EVENT_12 0x1F0 -#define FLAG_MYSTERY_EVENT_13 0x1F1 -#define FLAG_MYSTERY_EVENT_14 0x1F2 -#define FLAG_MYSTERY_EVENT_15 0x1F3 +#define FLAG_MYSTERY_GIFT_DONE 0x1E4 +#define FLAG_MYSTERY_GIFT_1 0x1E5 +#define FLAG_MYSTERY_GIFT_2 0x1E6 +#define FLAG_MYSTERY_GIFT_3 0x1E7 +#define FLAG_MYSTERY_GIFT_4 0x1E8 +#define FLAG_MYSTERY_GIFT_5 0x1E9 +#define FLAG_MYSTERY_GIFT_6 0x1EA +#define FLAG_MYSTERY_GIFT_7 0x1EB +#define FLAG_MYSTERY_GIFT_8 0x1EC +#define FLAG_MYSTERY_GIFT_9 0x1ED +#define FLAG_MYSTERY_GIFT_10 0x1EE +#define FLAG_MYSTERY_GIFT_11 0x1EF +#define FLAG_MYSTERY_GIFT_12 0x1F0 +#define FLAG_MYSTERY_GIFT_13 0x1F1 +#define FLAG_MYSTERY_GIFT_14 0x1F2 +#define FLAG_MYSTERY_GIFT_15 0x1F3 // Hidden Items #define FLAG_HIDDEN_ITEMS_START 0x1F4 diff --git a/include/constants/mevent.h b/include/constants/mevent.h index 3478816fd5..d659ffb14a 100644 --- a/include/constants/mevent.h +++ b/include/constants/mevent.h @@ -1,18 +1,46 @@ #ifndef GUARD_CONSTANTS_MEVENT_H #define GUARD_CONSTANTS_MEVENT_H -// mevent2.c -#define GET_NUM_STAMPS 0 -#define GET_MAX_STAMPS 1 +#define GET_NUM_STAMPS 0 +#define GET_MAX_STAMPS 1 #define GET_CARD_BATTLES_WON 2 +#define GET_CARD_BATTLE_LOST 3 +#define GET_CARD_NUM_TRADES 4 -#define GET_NUM_STAMPS_INTERNAL 3 -#define GET_MAX_STAMPS_INTERNAL 4 -#define GET_CARD_BATTLES_WON_INTERNAL 0 +#define CARD_STAT_BATTLES_WON 0 +#define CARD_STAT_BATTLES_LOST 1 +#define CARD_STAT_NUM_TRADES 2 +#define CARD_STAT_NUM_STAMPS 3 +#define CARD_STAT_MAX_STAMPS 4 + +#define CARD_TYPE_GIFT 0 +#define CARD_TYPE_STAMP 1 // "Stamp Card" +#define CARD_TYPE_LINK_STAT 2 // Referred to as the "Battle Card", shows battle and trade stats +#define CARD_TYPE_COUNT 3 + +#define SEND_TYPE_DISALLOWED 0 +#define SEND_TYPE_ALLOWED 1 +#define SEND_TYPE_ALLOWED_ALWAYS 2 + +// Return values for MysteryGift_CompareCardFlags, handled by gMysteryGiftServerScript_SendWonderCard +#define HAS_NO_CARD 0 +#define HAS_SAME_CARD 1 +#define HAS_DIFF_CARD 2 #define REQUIRED_CARD_BATTLES 3 +#define MAX_CARD_STAMPS 7 + +// Stamps are 32 bits. The first 16 bits are the species +// and the second 16 bits are a number (presumably an ID of some kind) +#define STAMP_SPECIES 0 +#define STAMP_ID 1 + // Number of different types/colors of Wonder Card and News backgrounds #define NUM_WONDER_BGS 8 +#define MAX_WONDER_CARD_STAT 999 + +#define WONDER_CARD_FLAG_OFFSET 1000 + #endif //GUARD_MEVENT_H diff --git a/include/constants/vars.h b/include/constants/vars.h index 2cbe3e9b80..e57b021854 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -237,14 +237,14 @@ #define VAR_REGISTER_BIRCH_STATE 0x40DA #define VAR_UNUSED_0x40DB 0x40DB // Unused Var #define VAR_UNUSED_0x40DC 0x40DC // Unused Var -#define VAR_EVENT_PICHU_SLOT 0x40DD -#define VAR_NEVER_READ_0x40DE 0x40DE // Var is written to, but never read -#define VAR_NEVER_READ_0x40DF 0x40DF // Var is written to, but never read -#define VAR_NEVER_READ_0x40E0 0x40E0 // Var is written to, but never read -#define VAR_NEVER_READ_0x40E1 0x40E1 // Var is written to, but never read -#define VAR_NEVER_READ_0x40E2 0x40E2 // Var is written to, but never read -#define VAR_NEVER_READ_0x40E3 0x40E3 // Var is written to, but never read -#define VAR_NEVER_READ_0x40E4 0x40E4 // var is written to, but never read +#define VAR_GIFT_PICHU_SLOT 0x40DD +#define VAR_GIFT_UNUSED_1 0x40DE // Var is written to, but never read +#define VAR_GIFT_UNUSED_2 0x40DF // Var is written to, but never read +#define VAR_GIFT_UNUSED_3 0x40E0 // Var is written to, but never read +#define VAR_GIFT_UNUSED_4 0x40E1 // Var is written to, but never read +#define VAR_GIFT_UNUSED_5 0x40E2 // Var is written to, but never read +#define VAR_GIFT_UNUSED_6 0x40E3 // Var is written to, but never read +#define VAR_GIFT_UNUSED_7 0x40E4 // var is written to, but never read #define VAR_UNUSED_0x40E5 0x40E5 // Unused Var #define VAR_DAILY_SLOTS 0x40E6 #define VAR_DAILY_WILDS 0x40E7 diff --git a/include/event_data.h b/include/event_data.h index 8b4510e39b..b1fa694601 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -13,8 +13,8 @@ bool32 IsMysteryEventEnabled(void); void DisableMysteryGift(void); void EnableMysteryGift(void); bool32 IsMysteryGiftEnabled(void); -void ClearMysteryEventFlags(void); -void ClearMysteryEventVars(void); +void ClearMysteryGiftFlags(void); +void ClearMysteryGiftVars(void); void DisableResetRTC(void); void EnableResetRTC(void); bool32 CanResetRTC(void); diff --git a/include/global.h b/include/global.h index c737be7b8f..a6071b2cd8 100644 --- a/include/global.h +++ b/include/global.h @@ -837,7 +837,7 @@ struct SaveTrainerHill /*0x3D6E*/ u16 tag:2; }; -struct MysteryEventStruct +struct WonderNewsMetadata { u8 unk_0_0:2; u8 unk_0_2:3; @@ -845,24 +845,24 @@ struct MysteryEventStruct u8 unk_1; }; - struct WonderNews +struct WonderNews { u16 unk_00; - u8 unk_02; + u8 sendType; // SEND_TYPE_* u8 bgType; u8 unk_04[WONDER_NEWS_TEXT_LENGTH]; u8 unk_2C[10][WONDER_NEWS_TEXT_LENGTH]; }; - struct WonderCard +struct WonderCard { u16 flagId; - u16 unk_02; + u16 iconSpecies; u32 unk_04; - u8 unk_08_0:2; + u8 type:2; // CARD_TYPE_* u8 bgType:4; - u8 unk_08_6:2; - u8 unk_09; + u8 sendType:2; // SEND_TYPE_* + u8 maxStamps; u8 unk_0A[WONDER_CARD_TEXT_LENGTH]; u8 unk_32[WONDER_CARD_TEXT_LENGTH]; u8 unk_5A[4][WONDER_CARD_TEXT_LENGTH]; @@ -870,26 +870,26 @@ struct MysteryEventStruct u8 unk_122[WONDER_CARD_TEXT_LENGTH]; }; - struct MEventBuffer_3430 +struct WonderCardMetadata { - u16 unk_00; - u16 unk_02; - u16 unk_04; - u16 unk_06; - u16 unk_08[2][7]; + u16 battlesWon; + u16 battlesLost; + u16 numTrades; + u16 iconSpecies; + u16 stampData[2][7]; }; - struct MysteryGiftSave +struct MysteryGiftSave { u32 newsCrc; struct WonderNews news; u32 cardCrc; struct WonderCard card; - u32 unkCrc; - struct MEventBuffer_3430 unk_3430; + u32 cardMetadataCrc; + struct WonderCardMetadata cardMetadata; u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; - struct MysteryEventStruct unk_340; - u32 unk_344[2][5]; + struct WonderNewsMetadata newsMetadata; + u32 trainerIds[2][5]; // Saved ids for 10 trainers, 5 each for battles and trades }; // 0x36C 0x3598 // For external event data storage. The majority of these may have never been used. @@ -966,7 +966,7 @@ struct SaveBlock1 /*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT]; /*0x988*/ u8 seen1[DEX_FLAGS_NO]; /*0x9BC*/ u16 berryBlenderRecords[3]; - /*0x9C2*/ u8 field_9C2[6]; + /*0x9C2*/ u8 unused_9C2[6]; /*0x9C8*/ u16 trainerRematchStepCounter; /*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES]; /*0xA30*/ struct ObjectEvent objectEvents[OBJECT_EVENTS_COUNT]; @@ -986,7 +986,6 @@ struct SaveBlock1 /*0x278E*/ u8 decorationPosters[10]; /*0x2798*/ u8 decorationDolls[40]; /*0x27C0*/ u8 decorationCushions[10]; - /*0x27CA*/ u8 padding_27CA[2]; /*0x27CC*/ TVShow tvShows[TV_SHOWS_COUNT]; /*0x2B50*/ PokeNews pokeNews[POKE_NEWS_COUNT]; /*0x2B90*/ u16 outbreakPokemonSpecies; @@ -1017,7 +1016,7 @@ struct SaveBlock1 /*0x31DC*/ struct Roamer roamer; /*0x31F8*/ struct EnigmaBerry enigmaBerry; /*0x322C*/ struct MysteryGiftSave mysteryGift; - /*0x3598*/ u8 field_3598[0x180]; + /*0x3598*/ u8 unused_3598[0x180]; /*0x3718*/ u32 trainerHillTimes[4]; /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; @@ -1025,7 +1024,7 @@ struct SaveBlock1 /*0x3B58*/ LilycoveLady lilycoveLady; /*0x3B98*/ struct TrainerNameRecord trainerNameRecords[20]; /*0x3C88*/ u8 registeredTexts[UNION_ROOM_KB_ROW_COUNT][21]; - /*0x3D5A*/ u8 filler3D5A[0xA]; + /*0x3D5A*/ u8 unused_3D5A[10]; /*0x3D64*/ struct SaveTrainerHill trainerHill; /*0x3D70*/ struct WaldaPhrase waldaPhrase; // sizeof: 0x3D88 diff --git a/include/main.h b/include/main.h index cad5c0ef9c..79d56d31ff 100644 --- a/include/main.h +++ b/include/main.h @@ -40,9 +40,10 @@ struct Main /*0x439*/ u8 anyLinkBattlerHasFrontierPass:1; }; +#define GAME_CODE_LENGTH 4 extern const u8 gGameVersion; extern const u8 gGameLanguage; -extern const u8 RomHeaderGameCode[4]; +extern const u8 RomHeaderGameCode[GAME_CODE_LENGTH]; extern const u8 RomHeaderSoftwareVersion; extern u16 gKeyRepeatStartDelay; diff --git a/include/mevent.h b/include/mevent.h index 4fda47fbd2..1297b4291d 100755 --- a/include/mevent.h +++ b/include/mevent.h @@ -1,6 +1,9 @@ #ifndef GUARD_MEVENT_H #define GUARD_MEVENT_H +#include "main.h" +#include "constants/mevent.h" + struct MEvent_Str_1 { u16 unk_000; @@ -13,51 +16,52 @@ struct MEvent_Str_2 u8 fill_00[0x40]; }; -struct MEventStruct_Unk1442CC +struct MysteryGiftLinkGameData { u32 unk_00; u16 unk_04; u32 unk_08; u16 unk_0C; u32 unk_10; - u16 unk_14; + u16 flagId; u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; - struct MEventBuffer_3430 unk_20; - u8 unk_44; + struct WonderCardMetadata cardMetadata; + u8 maxStamps; u8 playerName[PLAYER_NAME_LENGTH]; u8 playerTrainerId[TRAINER_ID_LENGTH]; u16 easyChatProfile[EASY_CHAT_BATTLE_WORDS_COUNT]; - u8 romHeaderGameCode[4]; + u8 romHeaderGameCode[GAME_CODE_LENGTH]; u8 romHeaderSoftwareVersion; }; -void sub_801AFD8(void); +void ClearMysteryGift(void); struct WonderNews *GetSavedWonderNews(void); struct WonderCard *GetSavedWonderCard(void); -struct MEventBuffer_3430 *sav1_get_mevent_buffer_2(void); -struct MysteryEventStruct *sub_801B044(void); +struct WonderCardMetadata *GetSavedWonderCardMetadata(void); +struct WonderNewsMetadata *GetSavedWonderNewsMetadata(void); u16 *GetQuestionnaireWordsPtr(void); -void ClearSavedWonderNews(void); +void ClearSavedWonderNewsAndRelated(void); +void ClearSavedWonderCardAndRelated(void); bool32 SaveWonderNews(const struct WonderNews *news); -bool32 ValidateSavedWonderNews(void); -bool32 WonderNews_Test_Unk_02(void); -bool32 sub_801B1A4(const u8 *src); -void ClearSavedWonderCard(void); bool32 SaveWonderCard(const struct WonderCard *card); +bool32 ValidateSavedWonderNews(void); bool32 ValidateSavedWonderCard(void); -bool32 WonderCard_Test_Unk_08_6(void); +bool32 IsWonderNewsSameAsSaved(const u8 *src); +bool32 IsSendingSavedWonderNewsAllowed(void); +bool32 IsSendingSavedWonderCardAllowed(void); u16 GetWonderCardFlagID(void); -void WonderCard_ResetInternalReceivedFlag(struct WonderCard *buffer); -bool32 CheckReceivedGiftFromWonderCard(void); -bool32 sub_801B508(const u16 *data); -void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1); -bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1); -u32 sub_801B6EC(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const void *unused); -u32 sub_801B708(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const void *unused); -bool32 MysteryGift_DoesQuestionnaireMatch(const struct MEventStruct_Unk1442CC *data, const u16 *words); -u16 MEventStruct_Unk1442CC_GetValueNFrom_unk_20(const struct MEventStruct_Unk1442CC *a0, u32 command); -u16 mevent_081445C0(u32 command); -void ResetReceivedWonderCardFlag(void); -bool32 MEventHandleReceivedWonderCard(u16 a0); +void DisableWonderCardSending(struct WonderCard *card); +bool32 IsSavedWonderCardGiftNotReceived(void); +bool32 MysteryGift_TrySaveStamp(const u16 *stamp); +void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 a1); +bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 a1); +u32 MysteryGift_CompareCardFlags(const u16 *a0, const struct MysteryGiftLinkGameData *data, const void *unused); +u32 MysteryGift_CheckStamps(const u16 *a0, const struct MysteryGiftLinkGameData *data, const void *unused); +bool32 MysteryGift_DoesQuestionnaireMatch(const struct MysteryGiftLinkGameData *data, const u16 *words); +u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *data, u32 stat); +u16 MysteryGift_GetCardStat(u32 stat); +void MysteryGift_DisableStats(void); +bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId); +void TryIncrementMysteryGiftStat(u32 stat, u32 trainerId); #endif //GUARD_MEVENT_H diff --git a/include/mevent2.h b/include/mevent2.h deleted file mode 100644 index 316a9e6dea..0000000000 --- a/include/mevent2.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef GUARD_MEVENT2_H -#define GUARD_MEVENT2_H - -void RecordIdOfWonderCardSenderByEventType(u32, u32); - -#endif //GUARD_MEVENT2_H diff --git a/include/mevent_client.h b/include/mevent_client.h index f68bb7592b..cc189ccc91 100644 --- a/include/mevent_client.h +++ b/include/mevent_client.h @@ -6,11 +6,11 @@ // Return values for client functions called by MysteryGiftClient_Run enum { CLI_RET_INIT, - CLI_RET_1, - CLI_RET_2, - CLI_RET_3, + CLI_RET_ACTIVE, + CLI_RET_YES_NO, + CLI_RET_PRINT_MSG, CLI_RET_ASK_TOSS, - CLI_RET_5, + CLI_RET_COPY_MSG, CLI_RET_END, }; @@ -21,25 +21,47 @@ enum { CLI_RECV, CLI_SEND_LOADED, CLI_COPY_RECV, - CLI_5, + CLI_YES_NO, CLI_COPY_RECV_IF_N, CLI_COPY_RECV_IF, - CLI_8, - CLI_9, - CLI_10, - CLI_11, - CLI_12, + CLI_LOAD_GAME_DATA, + CLI_SAVE_NEWS, + CLI_SAVE_CARD, + CLI_PRINT_MSG, + CLI_COPY_MSG, CLI_ASK_TOSS, CLI_LOAD_TOSS_RESPONSE, - CLI_15, - CLI_16, - CLI_17, + CLI_RUN_GIFT_SCRIPT, + CLI_SAVE_STAMP, + CLI_SAVE_RAM_SCRIPT, CLI_RECV_EREADER_TRAINER, CLI_SEND_STAT, - CLI_20, - CLI_21, + CLI_SEND_READY_END, + CLI_RUN_BUFFER_SCRIPT, }; +// IDs for client messages when ending a script. +// Given as the parameter to CLI_RETURN, and resolved to text in GetClientResultMessage +enum { + CLI_MSG_NOTHING_SENT, + CLI_MSG_RECORD_UPLOADED, + CLI_MSG_CARD_RECEIVED, + CLI_MSG_NEWS_RECEIVED, + CLI_MSG_STAMP_RECEIVED, + CLI_MSG_HAD_CARD, + CLI_MSG_HAD_STAMP, + CLI_MSG_HAD_NEWS, + CLI_MSG_NO_ROOM_STAMPS, + CLI_MSG_COMM_CANCELED, + CLI_MSG_CANT_ACCEPT, + CLI_MSG_COMM_ERROR, + CLI_MSG_TRAINER_RECEIVED, + CLI_MSG_BUFFER_SUCCESS, + CLI_MSG_BUFFER_FAILURE, +}; + +#define CLIENT_MAX_MSG_SIZE 64 + struct MysteryGiftClientCmd { u32 instr; @@ -48,23 +70,23 @@ struct MysteryGiftClientCmd struct MysteryGiftClient { - u32 unk_00; + u32 unused; u32 param; u32 funcId; u32 funcState; u32 cmdidx; void * sendBuffer; void * recvBuffer; - struct MysteryGiftClientCmd * cmdBuffer; - void * buffer; + struct MysteryGiftClientCmd * script; + void * msg; struct MysteryGiftLink link; bool32 isWonderNews; }; void MysteryGiftClient_Create(bool32 isWonderNews); -u32 MysteryGiftClient_Run(u16 * param); +u32 MysteryGiftClient_Run(u16 * endVal); void MysteryGiftClient_AdvanceState(void); -void * mevent_client_get_buffer(void); +void * MysteryGiftClient_GetMsg(void); void MysteryGiftClient_SetParam(u32 value); #endif //GUARD_MEVENT_CLIENT_H diff --git a/include/mevent_news.h b/include/mevent_news.h index 5fa0094995..7b4657e146 100755 --- a/include/mevent_news.h +++ b/include/mevent_news.h @@ -1,7 +1,7 @@ #ifndef GUARD_MEVENT_NEWS_H #define GUARD_MEVENT_NEWS_H -void sub_801DBC0(void); -void GenerateRandomNews(u32 a0); +void InitSavedWonderNews(void); +void GenerateRandomWonderNews(u32 a0); #endif //GUARD_MEVENT_NEWS_H diff --git a/include/mevent_server.h b/include/mevent_server.h index 3152280d34..98cb03f6a6 100644 --- a/include/mevent_server.h +++ b/include/mevent_server.h @@ -3,34 +3,98 @@ #include "mevent_server_helpers.h" -struct mevent_cmd +// Return values for Server_* functions. +// Other than SVR_RET_END, effectively useless (not checked for). +enum { + SVR_RET_INIT, + SVR_RET_ACTIVE, + SVR_RET_UNUSED, + SVR_RET_END +}; + +// IDs for server script instructions +enum { + SVR_RETURN, + SVR_SEND, + SVR_RECV, + SVR_GOTO, + SVR_GOTO_IF_EQ, + SVR_COPY_GAME_DATA, + SVR_CHECK_GAME_DATA_CARD, + SVR_CHECK_EXISTING_CARD, + SVR_READ_RESPONSE, + SVR_CHECK_EXISTING_STAMPS, + SVR_GET_CARD_STAT, + SVR_CHECK_QUESTIONNAIRE, + SVR_COMPARE, + SVR_LOAD_CARD, + SVR_LOAD_NEWS, + SVR_LOAD_RAM_SCRIPT, + SVR_LOAD_STAMP, + SVR_LOAD_UNK_2, + SVR_LOAD_CLIENT_SCRIPT, + SVR_LOAD_EREADER_TRAINER, + SVR_LOAD_MSG, + SVR_COPY_STAMP, + SVR_COPY_CARD, + SVR_COPY_NEWS, + SVR_SET_RAM_SCRIPT, + SVR_SET_CLIENT_SCRIPT, + SVR_COPY_SAVED_CARD, + SVR_COPY_SAVED_NEWS, + SVR_COPY_SAVED_RAM_SCRIPT, + SVR_LOAD_UNK_1, + SVR_CHECK_GAME_DATA_NEWS, +}; + +// IDs for server messages when ending a script. +// Given as the parameter to SVR_RETURN, and resolved to text in GetServerResultMessage +enum { + SVR_MSG_NOTHING_SENT, + SVR_MSG_RECORD_UPLOADED, + SVR_MSG_CARD_SENT, + SVR_MSG_NEWS_SENT, + SVR_MSG_STAMP_SENT, + SVR_MSG_HAS_CARD, + SVR_MSG_HAS_STAMP, + SVR_MSG_HAS_NEWS, + SVR_MSG_NO_ROOM_STAMPS, + SVR_MSG_CLIENT_CANCELED, + SVR_MSG_CANT_SEND_GIFT_1, + SVR_MSG_COMM_ERROR, + SVR_MSG_GIFT_SENT_1, + SVR_MSG_GIFT_SENT_2, + SVR_MSG_CANT_SEND_GIFT_2, +}; + +struct MysteryGiftServerCmd { u32 instr; - bool32 flag; - const void * parameter; + u32 parameter; + const void * ptr; }; -struct mevent_srv_common +struct MysteryGiftServer { - u32 unk_00; + u32 unused; u32 param; - u32 mainseqno; + u32 funcId; u32 cmdidx; - const struct mevent_cmd * cmdBuffer; + const struct MysteryGiftServerCmd * script; void * recvBuffer; - struct WonderCard * wonder_card; - struct WonderNews * wonder_news; - struct MEventStruct_Unk1442CC * mevent_unk1442cc; - const void * sendBuffer1; - u32 sendBuffer1Size; - const void * sendBuffer2; - u32 sendBuffer2Size; - u32 sendWord; - struct MysteryGiftLink manager; + struct WonderCard * card; + struct WonderNews * news; + struct MysteryGiftLinkGameData * linkGameData; + const void * ramScript; + u32 ramScriptSize; + const void * clientScript; + u32 clientScriptSize; + u32 stamp; + struct MysteryGiftLink link; }; -void mevent_srv_new_wcard(); -void mevent_srv_init_wnews(); -u32 mevent_srv_common_do_exec(u16 * a0); +void MysterGiftServer_CreateForCard(); +void MysterGiftServer_CreateForNews(); +u32 MysterGiftServer_Run(u16 * endVal); #endif //GUARD_MEVENT_SERVER_H diff --git a/include/mevent_server_helpers.h b/include/mevent_server_helpers.h index d2f292a0ba..77d966447a 100644 --- a/include/mevent_server_helpers.h +++ b/include/mevent_server_helpers.h @@ -1,13 +1,31 @@ #ifndef GUARD_MEVENT_SERVER_HELPERS_H #define GUARD_MEVENT_SERVER_HELPERS_H -#define ME_SEND_BUF_SIZE 0x400 +#define MG_LINK_BUFFER_SIZE 0x400 + +// Send/receive ids for the Client/Server to make sure +// they're sending/receiving the same thing +enum { + MG_LINKID_CLIENT_SCRIPT = 16, + MG_LINKID_GAME_DATA, + MG_LINKID_GAME_STAT, + MG_LINKID_RESPONSE, + MG_LINKID_READY_END, + MG_LINKID_DYNAMIC_MSG, + MG_LINKID_CARD, + MG_LINKID_NEWS, + MG_LINKID_STAMP, + MG_LINKID_RAM_SCRIPT, + MG_LINKID_EREADER_TRAINER, + MG_LINKID_UNK_1, + MG_LINKID_UNK_2, +}; struct MysteryGiftLink { - s32 seqno; - u8 sendPlayerNo; - u8 recvPlayerNo; + s32 state; + u8 sendPlayerId; + u8 recvPlayerId; u16 recvIdent; u16 recvCounter; u16 recvCRC; @@ -22,13 +40,6 @@ struct MysteryGiftLink u32 (*sendFunc)(struct MysteryGiftLink *); }; -struct send_recv_header -{ - u16 ident; - u16 crc; - u16 size; -}; - void MysteryGiftLink_Init(struct MysteryGiftLink *, u32, u32); void MysteryGiftLink_InitSend(struct MysteryGiftLink * manager, u32 ident, const void * src, u32 size); bool32 MysteryGiftLink_Recv(struct MysteryGiftLink * manager); diff --git a/include/mystery_gift.h b/include/mystery_gift.h index 42c7f47ba3..73d3b93eac 100644 --- a/include/mystery_gift.h +++ b/include/mystery_gift.h @@ -8,7 +8,7 @@ void CB2_MysteryGiftEReader(void); void PrintMysteryGiftOrEReaderTopMenu(bool8 isJapanese, bool32 usePickOkCancel); void MG_DrawCheckerboardPattern(u32 bg); void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void); -bool32 MG_PrintTextOnWindow1AndWaitButton(u8 *textState, const u8 *str); +bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str); void AddTextPrinterToWindow1(const u8 *src); void CB2_InitEReader(void); void CB2_InitMysteryGift(void); diff --git a/include/wonder_transfer.h b/include/wonder_transfer.h index 7532d6b3c9..398a2b37b5 100644 --- a/include/wonder_transfer.h +++ b/include/wonder_transfer.h @@ -9,7 +9,7 @@ enum { NEWS_INPUT_NONE = 0xFF }; -bool32 WonderCard_Init(struct WonderCard * card, struct MEventBuffer_3430 * r6); +bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * r6); bool32 WonderNews_Init(const struct WonderNews * news); s32 WonderCard_Enter(void); s32 WonderNews_Enter(void); diff --git a/src/cable_club.c b/src/cable_club.c index 3a4f723eab..e9100b0112 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -18,7 +18,7 @@ #include "overworld.h" #include "palette.h" #include "union_room.h" -#include "mevent2.h" +#include "mevent.h" #include "script.h" #include "script_pokemon_util.h" #include "sound.h" @@ -1004,10 +1004,10 @@ void CB2_ReturnFromCableClubBattle(void) switch (gBattleOutcome) { case B_OUTCOME_WON: - RecordIdOfWonderCardSenderByEventType(0, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); + TryIncrementMysteryGiftStat(CARD_STAT_BATTLES_WON, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); break; case B_OUTCOME_LOST: - RecordIdOfWonderCardSenderByEventType(1, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); + TryIncrementMysteryGiftStat(CARD_STAT_BATTLES_LOST, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); break; } } diff --git a/src/ereader_screen.c b/src/ereader_screen.c index 31794628b9..a76fb09c8c 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -250,7 +250,7 @@ static void Task_EReader(u8 taskId) switch (data->unk8) { case 0: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ReceiveMysteryGiftWithEReader)) + if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ReceiveMysteryGiftWithEReader)) data->unk8 = 1; break; case 1: @@ -274,7 +274,7 @@ static void Task_EReader(u8 taskId) } break; case 4: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_SelectConnectFromEReaderMenu)) + if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_SelectConnectFromEReaderMenu)) { AddTextPrinterToWindow1(gJPText_SelectConnectWithGBA); sub_81D505C(&data->unk0); @@ -323,7 +323,7 @@ static void Task_EReader(u8 taskId) } break; case 7: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_LinkIsIncorrect)) + if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_LinkIsIncorrect)) data->unk8 = 4; break; case 8: @@ -439,19 +439,19 @@ static void Task_EReader(u8 taskId) data->unk8 = 26; break; case 23: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_CardReadingHasBeenHalted)) + if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_CardReadingHasBeenHalted)) data->unk8 = 26; break; case 20: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ConnectionErrorCheckLink)) + if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ConnectionErrorCheckLink)) data->unk8 = 0; break; case 21: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_ConnectionErrorTryAgain)) + if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ConnectionErrorTryAgain)) data->unk8 = 0; break; case 22: - if (MG_PrintTextOnWindow1AndWaitButton(&data->unk9, gJPText_WriteErrorUnableToSaveData)) + if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_WriteErrorUnableToSaveData)) data->unk8 = 0; break; case 26: diff --git a/src/event_data.c b/src/event_data.c index 2bde09012d..e2af6c3d0d 100644 --- a/src/event_data.c +++ b/src/event_data.c @@ -114,36 +114,36 @@ bool32 IsMysteryGiftEnabled(void) return FlagGet(FLAG_SYS_MYSTERY_GIFT_ENABLE); } -void ClearMysteryEventFlags(void) +void ClearMysteryGiftFlags(void) { - FlagClear(FLAG_MYSTERY_EVENT_DONE); - FlagClear(FLAG_MYSTERY_EVENT_1); - FlagClear(FLAG_MYSTERY_EVENT_2); - FlagClear(FLAG_MYSTERY_EVENT_3); - FlagClear(FLAG_MYSTERY_EVENT_4); - FlagClear(FLAG_MYSTERY_EVENT_5); - FlagClear(FLAG_MYSTERY_EVENT_6); - FlagClear(FLAG_MYSTERY_EVENT_7); - FlagClear(FLAG_MYSTERY_EVENT_8); - FlagClear(FLAG_MYSTERY_EVENT_9); - FlagClear(FLAG_MYSTERY_EVENT_10); - FlagClear(FLAG_MYSTERY_EVENT_11); - FlagClear(FLAG_MYSTERY_EVENT_12); - FlagClear(FLAG_MYSTERY_EVENT_13); - FlagClear(FLAG_MYSTERY_EVENT_14); - FlagClear(FLAG_MYSTERY_EVENT_15); + FlagClear(FLAG_MYSTERY_GIFT_DONE); + FlagClear(FLAG_MYSTERY_GIFT_1); + FlagClear(FLAG_MYSTERY_GIFT_2); + FlagClear(FLAG_MYSTERY_GIFT_3); + FlagClear(FLAG_MYSTERY_GIFT_4); + FlagClear(FLAG_MYSTERY_GIFT_5); + FlagClear(FLAG_MYSTERY_GIFT_6); + FlagClear(FLAG_MYSTERY_GIFT_7); + FlagClear(FLAG_MYSTERY_GIFT_8); + FlagClear(FLAG_MYSTERY_GIFT_9); + FlagClear(FLAG_MYSTERY_GIFT_10); + FlagClear(FLAG_MYSTERY_GIFT_11); + FlagClear(FLAG_MYSTERY_GIFT_12); + FlagClear(FLAG_MYSTERY_GIFT_13); + FlagClear(FLAG_MYSTERY_GIFT_14); + FlagClear(FLAG_MYSTERY_GIFT_15); } -void ClearMysteryEventVars(void) +void ClearMysteryGiftVars(void) { - VarSet(VAR_EVENT_PICHU_SLOT, 0); - VarSet(VAR_NEVER_READ_0x40DE, 0); - VarSet(VAR_NEVER_READ_0x40DF, 0); - VarSet(VAR_NEVER_READ_0x40E0, 0); - VarSet(VAR_NEVER_READ_0x40E1, 0); - VarSet(VAR_NEVER_READ_0x40E2, 0); - VarSet(VAR_NEVER_READ_0x40E3, 0); - VarSet(VAR_NEVER_READ_0x40E4, 0); + VarSet(VAR_GIFT_PICHU_SLOT, 0); + VarSet(VAR_GIFT_UNUSED_1, 0); + VarSet(VAR_GIFT_UNUSED_2, 0); + VarSet(VAR_GIFT_UNUSED_3, 0); + VarSet(VAR_GIFT_UNUSED_4, 0); + VarSet(VAR_GIFT_UNUSED_5, 0); + VarSet(VAR_GIFT_UNUSED_6, 0); + VarSet(VAR_GIFT_UNUSED_7, 0); } void DisableResetRTC(void) diff --git a/src/field_specials.c b/src/field_specials.c index 131099ab7e..5d7829d12d 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1651,20 +1651,20 @@ void BufferLottoTicketNumber(void) } } -u16 GetMysteryEventCardVal(void) +u16 GetMysteryGiftCardStat(void) { switch (gSpecialVar_Result) { case GET_NUM_STAMPS: - return mevent_081445C0(GET_NUM_STAMPS_INTERNAL); + return MysteryGift_GetCardStat(CARD_STAT_NUM_STAMPS); case GET_MAX_STAMPS: - return mevent_081445C0(GET_MAX_STAMPS_INTERNAL); + return MysteryGift_GetCardStat(CARD_STAT_MAX_STAMPS); case GET_CARD_BATTLES_WON: - return mevent_081445C0(GET_CARD_BATTLES_WON_INTERNAL); - case 3: // Never occurs - return mevent_081445C0(1); - case 4: // Never occurs - return mevent_081445C0(2); + return MysteryGift_GetCardStat(CARD_STAT_BATTLES_WON); + case GET_CARD_BATTLE_LOST: // Never occurs + return MysteryGift_GetCardStat(CARD_STAT_BATTLES_LOST); + case GET_CARD_NUM_TRADES: // Never occurs + return MysteryGift_GetCardStat(CARD_STAT_NUM_TRADES); default: return 0; } diff --git a/src/mevent2.c b/src/mevent2.c index fd3ec7a672..d781e21197 100755 --- a/src/mevent2.c +++ b/src/mevent2.c @@ -11,23 +11,23 @@ #include "mevent.h" #include "constants/mevent.h" -static EWRAM_DATA bool32 gUnknown_02022C70 = FALSE; +static EWRAM_DATA bool32 sStatsEnabled = FALSE; -static void sub_801B180(void); -static void ClearSavedWonderNewsInternal(void); -static bool32 ValidateWonderNews(const struct WonderNews *news); -static bool32 ValidateWonderCard(const struct WonderCard *card); -static void InitSavedWonderCard(void); -static void sub_801B368(void); -static void sub_801B9F8(void); -static void sub_801BA8C(u32 a0, u32 a1, u32 *a2, int a3); +static void ClearSavedWonderNewsMetadata(void); +static void ClearSavedWonderNews(void); +static void ClearSavedWonderCard(void); +static bool32 ValidateWonderNews(const struct WonderNews *); +static bool32 ValidateWonderCard(const struct WonderCard *); +static void ClearSavedWonderCardMetadata(void); +static void ClearSavedTrainerIds(void); +static void IncrementCardStatForNewTrainer(u32, u32, u32 *, int); #define CALC_CRC(data) CalcCRC16WithTable((void *)&(data), sizeof(data)) -void sub_801AFD8(void) +void ClearMysteryGift(void) { CpuFill32(0, &gSaveBlock1Ptr->mysteryGift, sizeof(gSaveBlock1Ptr->mysteryGift)); - sub_801B180(); + ClearSavedWonderNewsMetadata(); // Clear is redundant, InitSavedWonderNews would be sufficient InitQuestionnaireWords(); } @@ -41,14 +41,14 @@ struct WonderCard *GetSavedWonderCard(void) return &gSaveBlock1Ptr->mysteryGift.card; } -struct MEventBuffer_3430 *sav1_get_mevent_buffer_2(void) +struct WonderCardMetadata *GetSavedWonderCardMetadata(void) { - return &gSaveBlock1Ptr->mysteryGift.unk_3430; + return &gSaveBlock1Ptr->mysteryGift.cardMetadata; } -struct MysteryEventStruct *sub_801B044(void) +struct WonderNewsMetadata *GetSavedWonderNewsMetadata(void) { - return &gSaveBlock1Ptr->mysteryGift.unk_340; + return &gSaveBlock1Ptr->mysteryGift.newsMetadata; } u16 *GetQuestionnaireWordsPtr(void) @@ -56,9 +56,10 @@ u16 *GetQuestionnaireWordsPtr(void) return gSaveBlock1Ptr->mysteryGift.questionnaireWords; } -void ClearSavedWonderNews(void) +// Equivalent to ClearSavedWonderCardAndRelated, but nothing else to clear +void ClearSavedWonderNewsAndRelated(void) { - ClearSavedWonderNewsInternal(); + ClearSavedWonderNews(); } bool32 SaveWonderNews(const struct WonderNews *news) @@ -66,7 +67,7 @@ bool32 SaveWonderNews(const struct WonderNews *news) if (!ValidateWonderNews(news)) return FALSE; - ClearSavedWonderNewsInternal(); + ClearSavedWonderNews(); gSaveBlock1Ptr->mysteryGift.news = *news; gSaveBlock1Ptr->mysteryGift.newsCrc = CALC_CRC(gSaveBlock1Ptr->mysteryGift.news); return TRUE; @@ -90,65 +91,65 @@ static bool32 ValidateWonderNews(const struct WonderNews *data) return TRUE; } -bool32 WonderNews_Test_Unk_02(void) +bool32 IsSendingSavedWonderNewsAllowed(void) { const struct WonderNews *data = &gSaveBlock1Ptr->mysteryGift.news; - if (data->unk_02 == 0) + if (data->sendType == SEND_TYPE_DISALLOWED) return FALSE; return TRUE; } -static void ClearSavedWonderNewsInternal(void) +static void ClearSavedWonderNews(void) { CpuFill32(0, GetSavedWonderNews(), sizeof(gSaveBlock1Ptr->mysteryGift.news)); gSaveBlock1Ptr->mysteryGift.newsCrc = 0; } -static void sub_801B180(void) +static void ClearSavedWonderNewsMetadata(void) { - CpuFill32(0, sub_801B044(), sizeof(struct MysteryEventStruct)); - sub_801DBC0(); + CpuFill32(0, GetSavedWonderNewsMetadata(), sizeof(gSaveBlock1Ptr->mysteryGift.newsMetadata)); + InitSavedWonderNews(); } -bool32 sub_801B1A4(const u8 *src) +bool32 IsWonderNewsSameAsSaved(const u8 *news) { - const u8 *r5 = (const u8 *)&gSaveBlock1Ptr->mysteryGift.news; + const u8 *savedNews = (const u8 *)&gSaveBlock1Ptr->mysteryGift.news; u32 i; if (!ValidateSavedWonderNews()) return FALSE; - for (i = 0; i < sizeof(struct WonderNews); i++) + for (i = 0; i < sizeof(gSaveBlock1Ptr->mysteryGift.news); i++) { - if (r5[i] != src[i]) + if (savedNews[i] != news[i]) return FALSE; } return TRUE; } -void ClearSavedWonderCard(void) +void ClearSavedWonderCardAndRelated(void) { - InitSavedWonderCard(); - sub_801B368(); - sub_801B9F8(); + ClearSavedWonderCard(); + ClearSavedWonderCardMetadata(); + ClearSavedTrainerIds(); ClearRamScript(); - ClearMysteryEventFlags(); - ClearMysteryEventVars(); + ClearMysteryGiftFlags(); + ClearMysteryGiftVars(); ClearEReaderTrainer(&gSaveBlock2Ptr->frontier.ereaderTrainer); } bool32 SaveWonderCard(const struct WonderCard *card) { - struct MEventBuffer_3430 *r2; + struct WonderCardMetadata *metadata; if (!ValidateWonderCard(card)) return FALSE; - ClearSavedWonderCard(); + ClearSavedWonderCardAndRelated(); memcpy(&gSaveBlock1Ptr->mysteryGift.card, card, sizeof(struct WonderCard)); gSaveBlock1Ptr->mysteryGift.cardCrc = CALC_CRC(gSaveBlock1Ptr->mysteryGift.card); - r2 = &gSaveBlock1Ptr->mysteryGift.unk_3430; - r2->unk_06 = (&gSaveBlock1Ptr->mysteryGift.card)->unk_02; + metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; + metadata->iconSpecies = (&gSaveBlock1Ptr->mysteryGift.card)->iconSpecies; return TRUE; } @@ -168,37 +169,39 @@ static bool32 ValidateWonderCard(const struct WonderCard *card) { if (card->flagId == 0) return FALSE; - if (card->unk_08_0 > 2) + if (card->type >= CARD_TYPE_COUNT) return FALSE; - if (!(card->unk_08_6 == 0 || card->unk_08_6 == 1 || card->unk_08_6 == 2)) + if (!(card->sendType == SEND_TYPE_DISALLOWED + || card->sendType == SEND_TYPE_ALLOWED + || card->sendType == SEND_TYPE_ALLOWED_ALWAYS)) return FALSE; if (card->bgType >= NUM_WONDER_BGS) return FALSE; - if (card->unk_09 > 7) + if (card->maxStamps > MAX_CARD_STAMPS) return FALSE; return TRUE; } -bool32 WonderCard_Test_Unk_08_6(void) +bool32 IsSendingSavedWonderCardAllowed(void) { const struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->unk_08_6 == 0) + if (card->sendType == SEND_TYPE_DISALLOWED) return FALSE; return TRUE; } -static void InitSavedWonderCard(void) +static void ClearSavedWonderCard(void) { CpuFill32(0, &gSaveBlock1Ptr->mysteryGift.card, sizeof(gSaveBlock1Ptr->mysteryGift.card)); gSaveBlock1Ptr->mysteryGift.cardCrc = 0; } -static void sub_801B368(void) +static void ClearSavedWonderCardMetadata(void) { - CpuFill32(0, sav1_get_mevent_buffer_2(), 18 *sizeof(u16)); - gSaveBlock1Ptr->mysteryGift.unkCrc = 0; + CpuFill32(0, GetSavedWonderCardMetadata(), sizeof(gSaveBlock1Ptr->mysteryGift.cardMetadata)); + gSaveBlock1Ptr->mysteryGift.cardMetadataCrc = 0; } u16 GetWonderCardFlagID(void) @@ -209,124 +212,126 @@ u16 GetWonderCardFlagID(void) return 0; } -void WonderCard_ResetInternalReceivedFlag(struct WonderCard *buffer) +void DisableWonderCardSending(struct WonderCard *card) { - if (buffer->unk_08_6 == 1) - buffer->unk_08_6 = 0; + if (card->sendType == SEND_TYPE_ALLOWED) + card->sendType = SEND_TYPE_DISALLOWED; } static bool32 IsWonderCardFlagIDInValidRange(u16 flagId) { - if (flagId >= 1000 && flagId < 1000 + NUM_MYSTERY_GIFT_FLAGS) + if (flagId >= WONDER_CARD_FLAG_OFFSET && flagId < WONDER_CARD_FLAG_OFFSET + NUM_WONDER_CARD_FLAGS) return TRUE; return FALSE; } -static const u16 sMysteryGiftFlags[] = +static const u16 sReceivedGiftFlags[] = { FLAG_RECEIVED_AURORA_TICKET, FLAG_RECEIVED_MYSTIC_TICKET, FLAG_RECEIVED_OLD_SEA_MAP, - FLAG_MYSTERY_GIFT_UNUSED_1, - FLAG_MYSTERY_GIFT_UNUSED_2, - FLAG_MYSTERY_GIFT_UNUSED_3, - FLAG_MYSTERY_GIFT_UNUSED_4, - FLAG_MYSTERY_GIFT_UNUSED_5, - FLAG_MYSTERY_GIFT_UNUSED_6, - FLAG_MYSTERY_GIFT_UNUSED_7, - FLAG_MYSTERY_GIFT_UNUSED_8, - FLAG_MYSTERY_GIFT_UNUSED_9, - FLAG_MYSTERY_GIFT_UNUSED_10, - FLAG_MYSTERY_GIFT_UNUSED_11, - FLAG_MYSTERY_GIFT_UNUSED_12, - FLAG_MYSTERY_GIFT_UNUSED_13, - FLAG_MYSTERY_GIFT_UNUSED_14, - FLAG_MYSTERY_GIFT_UNUSED_15, - FLAG_MYSTERY_GIFT_UNUSED_16, - FLAG_MYSTERY_GIFT_UNUSED_17, + FLAG_WONDER_CARD_UNUSED_1, + FLAG_WONDER_CARD_UNUSED_2, + FLAG_WONDER_CARD_UNUSED_3, + FLAG_WONDER_CARD_UNUSED_4, + FLAG_WONDER_CARD_UNUSED_5, + FLAG_WONDER_CARD_UNUSED_6, + FLAG_WONDER_CARD_UNUSED_7, + FLAG_WONDER_CARD_UNUSED_8, + FLAG_WONDER_CARD_UNUSED_9, + FLAG_WONDER_CARD_UNUSED_10, + FLAG_WONDER_CARD_UNUSED_11, + FLAG_WONDER_CARD_UNUSED_12, + FLAG_WONDER_CARD_UNUSED_13, + FLAG_WONDER_CARD_UNUSED_14, + FLAG_WONDER_CARD_UNUSED_15, + FLAG_WONDER_CARD_UNUSED_16, + FLAG_WONDER_CARD_UNUSED_17, }; -bool32 CheckReceivedGiftFromWonderCard(void) +bool32 IsSavedWonderCardGiftNotReceived(void) { u16 value = GetWonderCardFlagID(); if (!IsWonderCardFlagIDInValidRange(value)) return FALSE; - if (FlagGet(sMysteryGiftFlags[value - 1000]) == TRUE) + // If flag is set, player has received gift from this card + if (FlagGet(sReceivedGiftFlags[value - WONDER_CARD_FLAG_OFFSET]) == TRUE) return FALSE; return TRUE; } -static int sub_801B438(const struct MEventBuffer_3430 *data, int size) +static int GetNumStampsInMetadata(const struct WonderCardMetadata *data, int size) { - int r3 = 0; + int numStamps = 0; int i; for (i = 0; i < size; i++) { - if (data->unk_08[1][i] && data->unk_08[0][i]) - r3++; + if (data->stampData[STAMP_ID][i] && data->stampData[STAMP_SPECIES][i] != SPECIES_NONE) + numStamps++; } - return r3; + return numStamps; } -static bool32 sub_801B460(const struct MEventBuffer_3430 *data1, const u16 *data2, int size) +static bool32 IsStampInMetadata(const struct WonderCardMetadata *metadata, const u16 *stamp, int maxStamps) { int i; - for (i = 0; i < size; i++) + for (i = 0; i < maxStamps; i++) { - if (data1->unk_08[1][i] == data2[1]) + if (metadata->stampData[STAMP_ID][i] == stamp[STAMP_ID]) return TRUE; - if (data1->unk_08[0][i] == data2[0]) + if (metadata->stampData[STAMP_SPECIES][i] == stamp[STAMP_SPECIES]) return TRUE; } return FALSE; } -static bool32 sub_801B4A4(const u16 *data) +static bool32 ValidateStamp(const u16 *stamp) { - if (data[1] == 0) + if (stamp[STAMP_ID] == 0) return FALSE; - if (data[0] == 0) + if (stamp[STAMP_SPECIES] == SPECIES_NONE) return FALSE; - if (data[0] >= NUM_SPECIES) + if (stamp[STAMP_SPECIES] >= NUM_SPECIES) return FALSE; return TRUE; } -static int sub_801B4CC(void) +static int GetNumStampsInSavedCard(void) { - struct WonderCard *data; + struct WonderCard *card; if (!ValidateSavedWonderCard()) return 0; - data = &gSaveBlock1Ptr->mysteryGift.card; - if (data->unk_08_0 != 1) + card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type != CARD_TYPE_STAMP) return 0; - return sub_801B438(&gSaveBlock1Ptr->mysteryGift.unk_3430, data->unk_09); + return GetNumStampsInMetadata(&gSaveBlock1Ptr->mysteryGift.cardMetadata, card->maxStamps); } -bool32 sub_801B508(const u16 *data) +bool32 MysteryGift_TrySaveStamp(const u16 *stamp) { - struct WonderCard *buffer = &gSaveBlock1Ptr->mysteryGift.card; - int size = buffer->unk_09; + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + int maxStamps = card->maxStamps; int i; - if (!sub_801B4A4(data)) + if (!ValidateStamp(stamp)) return FALSE; - if (sub_801B460(&gSaveBlock1Ptr->mysteryGift.unk_3430, data, size)) + if (IsStampInMetadata(&gSaveBlock1Ptr->mysteryGift.cardMetadata, stamp, maxStamps)) return FALSE; - for (i = 0; i < size; i++) + for (i = 0; i < maxStamps; i++) { - if (gSaveBlock1Ptr->mysteryGift.unk_3430.unk_08[1][i] == 0 && gSaveBlock1Ptr->mysteryGift.unk_3430.unk_08[0][i] == 0) + if (gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_ID][i] == 0 + && gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_SPECIES][i] == SPECIES_NONE) { - gSaveBlock1Ptr->mysteryGift.unk_3430.unk_08[1][i] = data[1]; - gSaveBlock1Ptr->mysteryGift.unk_3430.unk_08[0][i] = data[0]; + gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_ID][i] = stamp[STAMP_ID]; + gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_SPECIES][i] = stamp[STAMP_SPECIES]; return TRUE; } } @@ -334,10 +339,10 @@ bool32 sub_801B508(const u16 *data) return FALSE; } -void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 isWonderNews) +void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 isWonderNews) { int i; - CpuFill32(0, data, sizeof(struct MEventStruct_Unk1442CC)); + CpuFill32(0, data, sizeof(*data)); data->unk_00 = 0x101; data->unk_04 = 1; data->unk_08 = 1; @@ -355,13 +360,13 @@ void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 isWonderNews) if (ValidateSavedWonderCard()) { - data->unk_14 = GetSavedWonderCard()->flagId; - data->unk_20 = *sav1_get_mevent_buffer_2(); - data->unk_44 = GetSavedWonderCard()->unk_09; + data->flagId = GetSavedWonderCard()->flagId; + data->cardMetadata = *GetSavedWonderCardMetadata(); + data->maxStamps = GetSavedWonderCard()->maxStamps; } else { - data->unk_14 = 0; + data->flagId = 0; } for (i = 0; i < NUM_QUESTIONNAIRE_WORDS; i++) @@ -372,11 +377,11 @@ void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 isWonderNews) for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) data->easyChatProfile[i] = gSaveBlock1Ptr->easyChatProfile[i]; - memcpy(data->romHeaderGameCode, RomHeaderGameCode, 4); + memcpy(data->romHeaderGameCode, RomHeaderGameCode, GAME_CODE_LENGTH); data->romHeaderSoftwareVersion = RomHeaderSoftwareVersion; } -bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1) +bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 forNews) { if (data->unk_00 != 0x101) return FALSE; @@ -387,7 +392,7 @@ bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1) if (!(data->unk_08 & 1)) return FALSE; - if (!a1) + if (!forNews) { if (!(data->unk_0C & 4)) return FALSE; @@ -399,30 +404,43 @@ bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1) return TRUE; } -u32 sub_801B6EC(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const void *unused) +u32 MysteryGift_CompareCardFlags(const u16 *flagId, const struct MysteryGiftLinkGameData *data, const void *unused) { - if (a1->unk_14 == 0) - return 0; + // Has a Wonder Card already? + if (data->flagId == 0) + return HAS_NO_CARD; - if (*a0 == a1->unk_14) - return 1; + // Has this Wonder Card already? + if (*flagId == data->flagId) + return HAS_SAME_CARD; - return 2; + // Player has a different Wonder Card + return HAS_DIFF_CARD; } -u32 sub_801B708(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const void *unused) +// This is referenced by the Mystery Gift server, but the instruction it's referenced in is never used, +// so the return values here are never checked by anything. +u32 MysteryGift_CheckStamps(const u16 *stamp, const struct MysteryGiftLinkGameData *data, const void *unused) { - int r4 = a1->unk_44 - sub_801B438(&a1->unk_20, a1->unk_44); - if (r4 == 0) + int stampsMissing = data->maxStamps - GetNumStampsInMetadata(&data->cardMetadata, data->maxStamps); + + // Has full stamp card? + if (stampsMissing == 0) return 1; - if (sub_801B460(&a1->unk_20, a0, a1->unk_44)) + + // Already has stamp? + if (IsStampInMetadata(&data->cardMetadata, stamp, data->maxStamps)) return 3; - if (r4 == 1) + + // Only 1 empty stamp left? + if (stampsMissing == 1) return 4; + + // This is a new stamp return 2; } -bool32 MysteryGift_DoesQuestionnaireMatch(const struct MEventStruct_Unk1442CC *data, const u16 *words) +bool32 MysteryGift_DoesQuestionnaireMatch(const struct MysteryGiftLinkGameData *data, const u16 *words) { int i; for (i = 0; i < NUM_QUESTIONNAIRE_WORDS; i++) @@ -434,127 +452,122 @@ bool32 MysteryGift_DoesQuestionnaireMatch(const struct MEventStruct_Unk1442CC *d return TRUE; } -static int sub_801B770(const struct MEventStruct_Unk1442CC *a0) +static int GetNumStampsInLinkData(const struct MysteryGiftLinkGameData *data) { - return sub_801B438(&a0->unk_20, a0->unk_44); + return GetNumStampsInMetadata(&data->cardMetadata, data->maxStamps); } -u16 MEventStruct_Unk1442CC_GetValueNFrom_unk_20(const struct MEventStruct_Unk1442CC *a0, u32 command) +u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *data, u32 stat) { - switch (command) + switch (stat) { - case 0: - return a0->unk_20.unk_00; - case 1: - return a0->unk_20.unk_02; - case 2: - return a0->unk_20.unk_04; - case 3: - return sub_801B770(a0); - case 4: - return a0->unk_44; + case CARD_STAT_BATTLES_WON: + return data->cardMetadata.battlesWon; + case CARD_STAT_BATTLES_LOST: + return data->cardMetadata.battlesLost; + case CARD_STAT_NUM_TRADES: + return data->cardMetadata.numTrades; + case CARD_STAT_NUM_STAMPS: + return GetNumStampsInLinkData(data); + case CARD_STAT_MAX_STAMPS: + return data->maxStamps; default: AGB_ASSERT(0); return 0; } } -static void sub_801B7D8(u32 command) +static void IncrementCardStat(u32 statType) { - struct WonderCard *data = &gSaveBlock1Ptr->mysteryGift.card; - if (data->unk_08_0 == 2) + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_LINK_STAT) { - u16 *dest = NULL; - switch (command) + u16 *stat = NULL; + switch (statType) { - case 0: - dest = &gSaveBlock1Ptr->mysteryGift.unk_3430.unk_00; + case CARD_STAT_BATTLES_WON: + stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.battlesWon; break; - case 1: - dest = &gSaveBlock1Ptr->mysteryGift.unk_3430.unk_02; + case CARD_STAT_BATTLES_LOST: + stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.battlesLost; break; - case 2: - dest = &gSaveBlock1Ptr->mysteryGift.unk_3430.unk_04; + case CARD_STAT_NUM_TRADES: + stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.numTrades; break; - case 3: - break; - case 4: + case CARD_STAT_NUM_STAMPS: // Unused + case CARD_STAT_MAX_STAMPS: // Unused break; } - if (dest == NULL) - { + if (stat == NULL) AGB_ASSERT(0); - } - else if (++(*dest) > 999) - { - *dest = 999; - } + else if (++(*stat) > MAX_WONDER_CARD_STAT) + *stat = MAX_WONDER_CARD_STAT; } } -u16 mevent_081445C0(u32 command) +u16 MysteryGift_GetCardStat(u32 stat) { - switch (command) + switch (stat) { - case GET_CARD_BATTLES_WON_INTERNAL: + case CARD_STAT_BATTLES_WON: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_LINK_STAT) { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->unk_08_0 == 2) - { - struct MEventBuffer_3430 *buffer = &gSaveBlock1Ptr->mysteryGift.unk_3430; - return buffer->unk_00; - } - break; + struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; + return metadata->battlesWon; } - case 1: // Never occurs + break; + } + case CARD_STAT_BATTLES_LOST: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_LINK_STAT) { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->unk_08_0 == 2) - { - struct MEventBuffer_3430 *buffer = &gSaveBlock1Ptr->mysteryGift.unk_3430; - return buffer->unk_02; - } - break; + struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; + return metadata->battlesLost; } - case 2: // Never occurs + break; + } + case CARD_STAT_NUM_TRADES: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_LINK_STAT) { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->unk_08_0 == 2) - { - struct MEventBuffer_3430 *buffer = &gSaveBlock1Ptr->mysteryGift.unk_3430; - return buffer->unk_04; - } - break; - } - case GET_NUM_STAMPS_INTERNAL: - { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->unk_08_0 == 1) - return sub_801B4CC(); - break; - } - case GET_MAX_STAMPS_INTERNAL: - { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->unk_08_0 == 1) - return card->unk_09; - break; + struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; + return metadata->numTrades; } + break; + } + case CARD_STAT_NUM_STAMPS: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_STAMP) + return GetNumStampsInSavedCard(); + break; + } + case CARD_STAT_MAX_STAMPS: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_STAMP) + return card->maxStamps; + break; + } } AGB_ASSERT(0); return 0; } -void ResetReceivedWonderCardFlag(void) +void MysteryGift_DisableStats(void) { - gUnknown_02022C70 = FALSE; + sStatsEnabled = FALSE; } -bool32 MEventHandleReceivedWonderCard(u16 flagId) +bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId) { - gUnknown_02022C70 = FALSE; + sStatsEnabled = FALSE; if (flagId == 0) return FALSE; @@ -564,67 +577,80 @@ bool32 MEventHandleReceivedWonderCard(u16 flagId) if (gSaveBlock1Ptr->mysteryGift.card.flagId != flagId) return FALSE; - gUnknown_02022C70 = TRUE; + sStatsEnabled = TRUE; return TRUE; } -void RecordIdOfWonderCardSenderByEventType(u32 a0, u32 a1) +void TryIncrementMysteryGiftStat(u32 stat, u32 trainerId) { - if (gUnknown_02022C70) + if (sStatsEnabled) { - switch (a0) + switch (stat) { - case 2: - sub_801BA8C(2, a1, gSaveBlock1Ptr->mysteryGift.unk_344[1], 5); + case CARD_STAT_NUM_TRADES: + IncrementCardStatForNewTrainer(CARD_STAT_NUM_TRADES, + trainerId, + gSaveBlock1Ptr->mysteryGift.trainerIds[1], + ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[1])); break; - case 0: - sub_801BA8C(0, a1, gSaveBlock1Ptr->mysteryGift.unk_344[0], 5); + case CARD_STAT_BATTLES_WON: + IncrementCardStatForNewTrainer(CARD_STAT_BATTLES_WON, + trainerId, + gSaveBlock1Ptr->mysteryGift.trainerIds[0], + ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[0])); break; - case 1: - sub_801BA8C(1, a1, gSaveBlock1Ptr->mysteryGift.unk_344[0], 5); + case CARD_STAT_BATTLES_LOST: + IncrementCardStatForNewTrainer(CARD_STAT_BATTLES_LOST, + trainerId, + gSaveBlock1Ptr->mysteryGift.trainerIds[0], + ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[0])); break; default: AGB_ASSERT(0); + break; } } } -static void sub_801B9F8(void) +static void ClearSavedTrainerIds(void) { - CpuFill32(0, gSaveBlock1Ptr->mysteryGift.unk_344, sizeof(gSaveBlock1Ptr->mysteryGift.unk_344)); + CpuFill32(0, gSaveBlock1Ptr->mysteryGift.trainerIds, sizeof(gSaveBlock1Ptr->mysteryGift.trainerIds)); } -static bool32 sub_801BA24(u32 a0, u32 *a1, int size) +// Returns TRUE if it's a new trainer id, FALSE if an existing one. +// In either case the given trainerId is saved in element 0 +static bool32 RecordTrainerId(u32 trainerId, u32 *trainerIds, int size) { - int i; - int j; + int i, j; for (i = 0; i < size; i++) { - if (a1[i] == a0) + if (trainerIds[i] == trainerId) break; } if (i == size) { + // New trainer, shift array and insert new id at front for (j = size - 1; j > 0; j--) - a1[j] = a1[j - 1]; + trainerIds[j] = trainerIds[j - 1]; - a1[0] = a0; + trainerIds[0] = trainerId; return TRUE; } else { + // Existing trainer, shift back to old slot and move id to front for (j = i; j > 0; j--) - a1[j] = a1[j - 1]; + trainerIds[j] = trainerIds[j - 1]; - a1[0] = a0; + trainerIds[0] = trainerId; return FALSE; } } -static void sub_801BA8C(u32 a0, u32 a1, u32 *a2, int a3) +static void IncrementCardStatForNewTrainer(u32 stat, u32 trainerId, u32 *trainerIds, int size) { - if (sub_801BA24(a1, a2, a3)) - sub_801B7D8(a0); + if (RecordTrainerId(trainerId, trainerIds, size)) + IncrementCardStat(stat); } diff --git a/src/mevent_client.c b/src/mevent_client.c index 2bcab1e5ac..e260f073ff 100644 --- a/src/mevent_client.c +++ b/src/mevent_client.c @@ -15,8 +15,8 @@ enum { FUNC_SEND, FUNC_RUN, FUNC_WAIT, - FUNC_6, - FUNC_7, + FUNC_RUN_GIFT_SCRIPT, + FUNC_RUN_BUFF_SCRIPT, }; EWRAM_DATA static struct MysteryGiftClient * sClient = NULL; @@ -25,7 +25,7 @@ static void MysteryGiftClient_Init(struct MysteryGiftClient *, u32, u32); static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient *); static void MysteryGiftClient_Free(struct MysteryGiftClient *); -extern const struct MysteryGiftClientCmd gUnknown_082F2598[]; +extern const struct MysteryGiftClientCmd gMysteryGiftClientScript_Init[]; void MysteryGiftClient_Create(bool32 isWonderNews) { @@ -55,9 +55,9 @@ void MysteryGiftClient_AdvanceState(void) sClient->funcState++; } -void * mevent_client_get_buffer(void) +void * MysteryGiftClient_GetMsg(void) { - return sClient->buffer; + return sClient->msg; } void MysteryGiftClient_SetParam(u32 val) @@ -65,42 +65,42 @@ void MysteryGiftClient_SetParam(u32 val) sClient->param = val; } -static void MysteryGiftClient_Init(struct MysteryGiftClient * client, u32 sendPlayerNo, u32 recvPlayerNo) +static void MysteryGiftClient_Init(struct MysteryGiftClient * client, u32 sendPlayerId, u32 recvPlayerId) { - client->unk_00 = 0; + client->unused = 0; client->funcId = FUNC_INIT; client->funcState = 0; - client->sendBuffer = AllocZeroed(ME_SEND_BUF_SIZE); - client->recvBuffer = AllocZeroed(ME_SEND_BUF_SIZE); - client->cmdBuffer = AllocZeroed(ME_SEND_BUF_SIZE); - client->buffer = AllocZeroed(0x40); - MysteryGiftLink_Init(&client->link, sendPlayerNo, recvPlayerNo); + client->sendBuffer = AllocZeroed(MG_LINK_BUFFER_SIZE); + client->recvBuffer = AllocZeroed(MG_LINK_BUFFER_SIZE); + client->script = AllocZeroed(MG_LINK_BUFFER_SIZE); + client->msg = AllocZeroed(CLIENT_MAX_MSG_SIZE); + MysteryGiftLink_Init(&client->link, sendPlayerId, recvPlayerId); } static void MysteryGiftClient_Free(struct MysteryGiftClient * client) { Free(client->sendBuffer); Free(client->recvBuffer); - Free(client->cmdBuffer); - Free(client->buffer); + Free(client->script); + Free(client->msg); } static void MysteryGiftClient_CopyRecvScript(struct MysteryGiftClient * client) { - memcpy(client->cmdBuffer, client->recvBuffer, ME_SEND_BUF_SIZE); + memcpy(client->script, client->recvBuffer, MG_LINK_BUFFER_SIZE); client->cmdidx = 0; } -static void MysteryGiftClient_InitSend(struct MysteryGiftClient * client, u32 ident, u32 word) +static void MysteryGiftClient_InitSendWord(struct MysteryGiftClient * client, u32 ident, u32 word) { - CpuFill32(0, client->sendBuffer, ME_SEND_BUF_SIZE); + CpuFill32(0, client->sendBuffer, MG_LINK_BUFFER_SIZE); *(u32 *)client->sendBuffer = word; - MysteryGiftLink_InitSend(&client->link, ident, client->sendBuffer, sizeof(u32)); + MysteryGiftLink_InitSend(&client->link, ident, client->sendBuffer, sizeof(word)); } static u32 Client_Init(struct MysteryGiftClient * client) { - memcpy(client->cmdBuffer, gUnknown_082F2598, ME_SEND_BUF_SIZE); + memcpy(client->script, gMysteryGiftClientScript_Init, MG_LINK_BUFFER_SIZE); client->cmdidx = 0; client->funcId = FUNC_RUN; client->funcState = 0; @@ -120,7 +120,7 @@ static u32 Client_Recv(struct MysteryGiftClient * client) client->funcId = FUNC_RUN; client->funcState = 0; } - return CLI_RET_1; + return CLI_RET_ACTIVE; } static u32 Client_Send(struct MysteryGiftClient * client) @@ -130,13 +130,13 @@ static u32 Client_Send(struct MysteryGiftClient * client) client->funcId = FUNC_RUN; client->funcState = 0; } - return CLI_RET_1; + return CLI_RET_ACTIVE; } static u32 Client_Run(struct MysteryGiftClient * client) { // process command - struct MysteryGiftClientCmd * cmd = &client->cmdBuffer[client->cmdidx]; + struct MysteryGiftClientCmd * cmd = &client->script[client->cmdidx]; client->cmdidx++; switch (cmd->instr) { @@ -158,13 +158,13 @@ static u32 Client_Run(struct MysteryGiftClient * client) client->funcId = FUNC_SEND; client->funcState = 0; break; - case CLI_20: - MysteryGiftLink_InitSend(&client->link, 0x14, client->sendBuffer, 0); + case CLI_SEND_READY_END: + MysteryGiftLink_InitSend(&client->link, MG_LINKID_READY_END, client->sendBuffer, 0); client->funcId = FUNC_SEND; client->funcState = 0; break; case CLI_SEND_STAT: - MysteryGiftClient_InitSend(client, 0x12, GetGameStat(cmd->parameter)); + MysteryGiftClient_InitSendWord(client, MG_LINKID_GAME_STAT, GetGameStat(cmd->parameter)); client->funcId = FUNC_SEND; client->funcState = 0; break; @@ -179,67 +179,71 @@ static u32 Client_Run(struct MysteryGiftClient * client) case CLI_COPY_RECV: MysteryGiftClient_CopyRecvScript(client); break; - case CLI_5: - memcpy(client->buffer, client->recvBuffer, 0x40); + case CLI_YES_NO: + memcpy(client->msg, client->recvBuffer, CLIENT_MAX_MSG_SIZE); client->funcId = FUNC_WAIT; client->funcState = 0; - return CLI_RET_2; - case CLI_11: - memcpy(client->buffer, client->recvBuffer, 0x40); + return CLI_RET_YES_NO; + case CLI_PRINT_MSG: + memcpy(client->msg, client->recvBuffer, CLIENT_MAX_MSG_SIZE); client->funcId = FUNC_WAIT; client->funcState = 0; - return CLI_RET_3; - case CLI_12: - memcpy(client->buffer, client->recvBuffer, 0x40); + return CLI_RET_PRINT_MSG; + case CLI_COPY_MSG: + memcpy(client->msg, client->recvBuffer, CLIENT_MAX_MSG_SIZE); client->funcId = FUNC_WAIT; client->funcState = 0; - return CLI_RET_5; + return CLI_RET_COPY_MSG; case CLI_ASK_TOSS: client->funcId = FUNC_WAIT; client->funcState = 0; return CLI_RET_ASK_TOSS; - case CLI_8: - sub_801B580(client->sendBuffer, client->isWonderNews); - MysteryGiftLink_InitSend(&client->link, 0x11, client->sendBuffer, sizeof(struct MEventStruct_Unk1442CC)); + case CLI_LOAD_GAME_DATA: + MysteryGift_LoadLinkGameData(client->sendBuffer, client->isWonderNews); + MysteryGiftLink_InitSend(&client->link, MG_LINKID_GAME_DATA, client->sendBuffer, sizeof(struct MysteryGiftLinkGameData)); break; case CLI_LOAD_TOSS_RESPONSE: // param here is set by MG_STATE_LINK_ASK_TOSS or MG_STATE_LINK_ASK_TOSS_UNRECEIVED - MysteryGiftClient_InitSend(client, 0x13, client->param); + MysteryGiftClient_InitSendWord(client, MG_LINKID_RESPONSE, client->param); break; - case CLI_10: + case CLI_SAVE_CARD: SaveWonderCard(client->recvBuffer); break; - case CLI_9: - if (!sub_801B1A4(client->recvBuffer)) + case CLI_SAVE_NEWS: + if (!IsWonderNewsSameAsSaved(client->recvBuffer)) { SaveWonderNews(client->recvBuffer); - MysteryGiftClient_InitSend(client, 0x13, 0); + MysteryGiftClient_InitSendWord(client, MG_LINKID_RESPONSE, FALSE); } else - MysteryGiftClient_InitSend(client, 0x13, 1); + { + // Wonder News has already been saved (or is invalid). + // Prepare a signal to indicate it was not saved. + MysteryGiftClient_InitSendWord(client, MG_LINKID_RESPONSE, TRUE); + } break; - case CLI_15: - client->funcId = FUNC_6; + case CLI_RUN_GIFT_SCRIPT: + client->funcId = FUNC_RUN_GIFT_SCRIPT; client->funcState = 0; break; - case CLI_16: - sub_801B508(client->recvBuffer); + case CLI_SAVE_STAMP: + MysteryGift_TrySaveStamp(client->recvBuffer); break; - case CLI_17: + case CLI_SAVE_RAM_SCRIPT: InitRamScript_NoObjectEvent(client->recvBuffer, 1000); break; case CLI_RECV_EREADER_TRAINER: memcpy(&gSaveBlock2Ptr->frontier.ereaderTrainer, client->recvBuffer, sizeof(gSaveBlock2Ptr->frontier.ereaderTrainer)); ValidateEReaderTrainer(); break; - case CLI_21: - memcpy(gDecompressionBuffer, client->recvBuffer, ME_SEND_BUF_SIZE); - client->funcId = FUNC_7; + case CLI_RUN_BUFFER_SCRIPT: + memcpy(gDecompressionBuffer, client->recvBuffer, MG_LINK_BUFFER_SIZE); + client->funcId = FUNC_RUN_BUFF_SCRIPT; client->funcState = 0; break; } - return CLI_RET_1; + return CLI_RET_ACTIVE; } static u32 Client_Wait(struct MysteryGiftClient * client) @@ -249,10 +253,10 @@ static u32 Client_Wait(struct MysteryGiftClient * client) client->funcId = FUNC_RUN; client->funcState = 0; } - return CLI_RET_1; + return CLI_RET_ACTIVE; } -static u32 Client_6(struct MysteryGiftClient * client) +static u32 Client_RunGiftScript(struct MysteryGiftClient * client) { switch (client->funcState) { @@ -268,10 +272,10 @@ static u32 Client_6(struct MysteryGiftClient * client) } break; } - return CLI_RET_1; + return CLI_RET_ACTIVE; } -static u32 Client_7(struct MysteryGiftClient * client) +static u32 Client_RunBufferScript(struct MysteryGiftClient * client) { // exec arbitrary code u32 (*func)(u32 *, struct SaveBlock2 *, struct SaveBlock1 *) = (void *)gDecompressionBuffer; @@ -280,7 +284,7 @@ static u32 Client_7(struct MysteryGiftClient * client) client->funcId = FUNC_RUN; client->funcState = 0; } - return CLI_RET_1; + return CLI_RET_ACTIVE; } static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient * client) @@ -292,8 +296,8 @@ static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient * client) [FUNC_SEND] = Client_Send, [FUNC_RUN] = Client_Run, [FUNC_WAIT] = Client_Wait, - [FUNC_6] = Client_6, - [FUNC_7] = Client_7 + [FUNC_RUN_GIFT_SCRIPT] = Client_RunGiftScript, + [FUNC_RUN_BUFF_SCRIPT] = Client_RunBufferScript }; return funcs[client->funcId](client); } diff --git a/src/mevent_news.c b/src/mevent_news.c index 13d50bb0df..0fbb9452d6 100644 --- a/src/mevent_news.c +++ b/src/mevent_news.c @@ -4,51 +4,51 @@ #include "event_data.h" #include "mevent_news.h" -static u32 sub_801DCAC(struct MysteryEventStruct *); -static void sub_801DD10(struct MysteryEventStruct *); -static u32 sub_801DD44(struct MysteryEventStruct *); -static void sub_801DCD8(struct MysteryEventStruct *); -static void sub_801DCCC(struct MysteryEventStruct *); +static u32 sub_801DCAC(struct WonderNewsMetadata *); +static void sub_801DD10(struct WonderNewsMetadata *); +static u32 sub_801DD44(struct WonderNewsMetadata *); +static void sub_801DCD8(struct WonderNewsMetadata *); +static void sub_801DCCC(struct WonderNewsMetadata *); -void GenerateRandomNews(u32 a0) +void GenerateRandomWonderNews(u32 a0) { - struct MysteryEventStruct *r5 = sub_801B044(); + struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata(); - r5->unk_0_0 = a0; + data->unk_0_0 = a0; switch (a0) { case 0: break; case 1: case 2: - r5->unk_1 = (Random() % 15) + 16; + data->unk_1 = (Random() % 15) + 16; break; case 3: - r5->unk_1 = (Random() % 15) + 1; + data->unk_1 = (Random() % 15) + 1; break; } } -void sub_801DBC0(void) +void InitSavedWonderNews(void) { - struct MysteryEventStruct *r5 = sub_801B044(); + struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata(); - r5->unk_0_0 = 0; - r5->unk_0_2 = 0; - r5->unk_0_5 = 0; - r5->unk_1 = 0; + data->unk_0_0 = 0; + data->unk_0_2 = 0; + data->unk_0_5 = 0; + data->unk_1 = 0; VarSet(VAR_0x402E, 0); } void sub_801DBDC(void) { u16 *r4 = GetVarPointer(VAR_0x402E); - struct MysteryEventStruct *r2 = sub_801B044(); - struct MysteryEventStruct r0 = *r2; + struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata(); + struct WonderNewsMetadata r0 = *data; if ((u8)r0.unk_0_5 > 4 && ++(*r4) > 0x1f3) { - r2->unk_0_5 = 0; + data->unk_0_5 = 0; *r4 = 0; } } @@ -57,33 +57,33 @@ void sub_801DBDC(void) u16 sub_801DC20(void) { u16 *r6 = &gSpecialVar_Result; - struct MysteryEventStruct *r4 = sub_801B044(); + struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata(); u16 r5; if (!IsMysteryEventEnabled() || !ValidateSavedWonderNews()) return 0; - r5 = sub_801DD44(r4); + r5 = sub_801DD44(data); switch (r5) { case 0: break; case 1: - *r6 = sub_801DCAC(r4); + *r6 = sub_801DCAC(data); break; case 2: - *r6 = sub_801DCAC(r4); + *r6 = sub_801DCAC(data); break; case 3: break; case 4: - *r6 = sub_801DCAC(r4); - sub_801DCD8(r4); + *r6 = sub_801DCAC(data); + sub_801DCD8(data); break; case 5: - *r6 = sub_801DCAC(r4); - sub_801DCCC(r4); + *r6 = sub_801DCAC(data); + sub_801DCCC(data); break; case 6: break; @@ -92,43 +92,43 @@ u16 sub_801DC20(void) return r5; } -static u32 sub_801DCAC(struct MysteryEventStruct *a0) +static u32 sub_801DCAC(struct WonderNewsMetadata *data) { u32 r4; - a0->unk_0_0 = 0; - r4 = a0->unk_1 + 0x84; - a0->unk_1 = 0; - sub_801DD10(a0); + data->unk_0_0 = 0; + r4 = data->unk_1 + 0x84; + data->unk_1 = 0; + sub_801DD10(data); return r4; } -static void sub_801DCCC(struct MysteryEventStruct *a0) +static void sub_801DCCC(struct WonderNewsMetadata *data) { - a0->unk_0_2 = 0; + data->unk_0_2 = 0; } -static void sub_801DCD8(struct MysteryEventStruct *a0) +static void sub_801DCD8(struct WonderNewsMetadata *data) { - a0->unk_0_2++; - if ((u8)a0->unk_0_2 > 4) - a0->unk_0_2 = 4; + data->unk_0_2++; + if ((u8)data->unk_0_2 > 4) + data->unk_0_2 = 4; } -static void sub_801DD10(struct MysteryEventStruct *a0) +static void sub_801DD10(struct WonderNewsMetadata *data) { - a0->unk_0_5++; - if ((u8)a0->unk_0_5 > 5) - a0->unk_0_5 = 5; + data->unk_0_5++; + if ((u8)data->unk_0_5 > 5) + data->unk_0_5 = 5; } -static u32 sub_801DD44(struct MysteryEventStruct *a0) +static u32 sub_801DD44(struct WonderNewsMetadata *data) { - struct MysteryEventStruct r0; - if ((u8)a0->unk_0_5 == 5) + struct WonderNewsMetadata r0; + if ((u8)data->unk_0_5 == 5) return 6; - r0 = *a0; + r0 = *data; switch (r0.unk_0_0) { case 0: diff --git a/src/mevent_scripts.c b/src/mevent_scripts.c index ddeca8f413..23e0d97a56 100644 --- a/src/mevent_scripts.c +++ b/src/mevent_scripts.c @@ -1,195 +1,217 @@ #include "global.h" #include "mevent_client.h" #include "mevent_server.h" +#include "mevent.h" -const u8 gText_CanceledReadingCard[] = _("Canceled reading\nthe Card."); +static const u8 sText_CanceledReadingCard[] = _("Canceled reading\nthe Card."); -const struct MysteryGiftClientCmd gUnknown_082F2598[] = { - {.instr = CLI_RECV, .parameter = 16}, - {.instr = CLI_COPY_RECV} +//================== +// Client scripts +//================== + +const struct MysteryGiftClientCmd gMysteryGiftClientScript_Init[] = { + {CLI_RECV, MG_LINKID_CLIENT_SCRIPT}, + {CLI_COPY_RECV} }; -const struct MysteryGiftClientCmd gUnknown_082F25A8[] = { - {.instr = CLI_8}, - {.instr = CLI_SEND_LOADED}, - {.instr = CLI_RECV, .parameter = 16}, - {.instr = CLI_COPY_RECV} +static const struct MysteryGiftClientCmd sClientScript_SendGameData[] = { + {CLI_LOAD_GAME_DATA}, + {CLI_SEND_LOADED}, + {CLI_RECV, MG_LINKID_CLIENT_SCRIPT}, + {CLI_COPY_RECV} }; -const struct MysteryGiftClientCmd gUnknown_082F25C8[] = { - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 10} +static const struct MysteryGiftClientCmd sClientScript_CantAccept[] = { + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_CANT_ACCEPT} }; -const struct MysteryGiftClientCmd gUnknown_082F25D8[] = { - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 11} +static const struct MysteryGiftClientCmd sClientScript_CommError[] = { + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_COMM_ERROR} }; -const struct MysteryGiftClientCmd gUnknown_082F25E8[] = { - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 0} +static const struct MysteryGiftClientCmd sClientScript_NothingSent[] = { + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_NOTHING_SENT} }; -const struct MysteryGiftClientCmd gUnknown_082F25F8[] = { - {.instr = CLI_RECV, .parameter = 22}, - {.instr = CLI_10}, - {.instr = CLI_RECV, .parameter = 25}, - {.instr = CLI_17}, - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 2} +static const struct MysteryGiftClientCmd sClientScript_SaveCard[] = { + {CLI_RECV, MG_LINKID_CARD}, + {CLI_SAVE_CARD}, + {CLI_RECV, MG_LINKID_RAM_SCRIPT}, + {CLI_SAVE_RAM_SCRIPT}, + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_CARD_RECEIVED} }; -const struct MysteryGiftClientCmd gUnknown_082F2628[] = { - {.instr = CLI_RECV, .parameter = 23}, - {.instr = CLI_9}, - {.instr = CLI_SEND_LOADED}, - {.instr = CLI_RECV, .parameter = 16}, - {.instr = CLI_COPY_RECV} +static const struct MysteryGiftClientCmd sClientScript_SaveNews[] = { + {CLI_RECV, MG_LINKID_NEWS}, + {CLI_SAVE_NEWS}, + {CLI_SEND_LOADED}, // Send whether or not the News was saved (read by sServerScript_SendNews) + {CLI_RECV, MG_LINKID_CLIENT_SCRIPT}, + {CLI_COPY_RECV} }; -const struct MysteryGiftClientCmd gUnknown_082F2650[] = { - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 7} +static const struct MysteryGiftClientCmd sClientScript_HadNews[] = { + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_HAD_NEWS} }; -const struct MysteryGiftClientCmd gUnknown_082F2660[] = { - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 3} +static const struct MysteryGiftClientCmd sClientScript_NewsReceived[] = { + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_NEWS_RECEIVED} }; -const struct MysteryGiftClientCmd gUnknown_082F2670[] = { - {.instr = CLI_ASK_TOSS}, - {.instr = CLI_LOAD_TOSS_RESPONSE}, - {.instr = CLI_SEND_LOADED}, - {.instr = CLI_RECV, .parameter = 16}, - {.instr = CLI_COPY_RECV} +static const struct MysteryGiftClientCmd sClientScript_AskToss[] = { + {CLI_ASK_TOSS}, + {CLI_LOAD_TOSS_RESPONSE}, + {CLI_SEND_LOADED}, + {CLI_RECV, MG_LINKID_CLIENT_SCRIPT}, + {CLI_COPY_RECV} }; -const struct MysteryGiftClientCmd gUnknown_082F2698[] = { - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 9} +static const struct MysteryGiftClientCmd sClientScript_Canceled[] = { + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_COMM_CANCELED} }; -const struct MysteryGiftClientCmd gUnknown_082F26A8[] = { - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 5} +static const struct MysteryGiftClientCmd sClientScript_HadCard[] = { + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_HAD_CARD} }; -const struct MysteryGiftClientCmd gUnknown_082F26B8[] = { - {.instr = CLI_RECV, .parameter = 21}, - {.instr = CLI_12}, - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 14} +static const struct MysteryGiftClientCmd sClientScript_DynamicError[] = { + {CLI_RECV, MG_LINKID_DYNAMIC_MSG}, + {CLI_COPY_MSG}, + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_BUFFER_FAILURE} }; -// Unused -const struct MysteryGiftClientCmd gUnknown_082F26B8_1[] = { - {.instr = CLI_RECV, .parameter = 21}, - {.instr = CLI_12}, - {.instr = CLI_20}, - {.instr = CLI_RETURN, .parameter = 13} +static const struct MysteryGiftClientCmd sClientScript_DynamicSuccess[] = { + {CLI_RECV, MG_LINKID_DYNAMIC_MSG}, + {CLI_COPY_MSG}, + {CLI_SEND_READY_END}, + {CLI_RETURN, CLI_MSG_BUFFER_SUCCESS} }; -const struct mevent_cmd gUnknown_082F26F8[] = { - {.instr = 18, .flag = sizeof(gUnknown_082F25C8), .parameter = gUnknown_082F25C8}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0, .flag = 0x0a}, - {.instr = 18, .flag = sizeof(gUnknown_082F25D8), .parameter = gUnknown_082F25D8}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0, .flag = 0x0b}, - {.instr = 18, .flag = sizeof(gUnknown_082F2698), .parameter = gUnknown_082F2698}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0, .flag = 0x09} + +//================== +// Server scripts +//================== + +// Create arguments for SVR_LOAD_CLIENT_SCRIPT or SVR_LOAD_MSG +// (a script/text size and pointer to send to the client) +#define PTR_ARG(pointer) .parameter = sizeof(pointer), .ptr = pointer + +static const struct MysteryGiftServerCmd sServerScript_CantSend[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_CantAccept)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_CANT_SEND_GIFT_1} }; -const struct mevent_cmd gUnknown_082F2788[] = { - {.instr = 18, .flag = sizeof(gUnknown_082F26B8), .parameter = gUnknown_082F26B8}, - {.instr = 1}, - {.instr = 20, .flag = 0x1b, .parameter = gText_CanceledReadingCard}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0, .flag = 0x09} +static const struct MysteryGiftServerCmd sServerScript_CommError[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_CommError)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_COMM_ERROR} }; -const struct mevent_cmd gUnknown_082F27D0[] = { - {.instr = 18, .flag = sizeof(gUnknown_082F2650), .parameter = gUnknown_082F2650}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0, .flag = 0x07} +static const struct MysteryGiftServerCmd sServerScript_ClientCanceledNews[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_Canceled)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_CLIENT_CANCELED} }; -const struct mevent_cmd gUnknown_082F2800[] = { - {.instr = 18, .flag = sizeof(gUnknown_082F2628), .parameter = gUnknown_082F2628}, - {.instr = 1}, - {.instr = 14}, - {.instr = 1}, - {.instr = 2, .flag = 0x13}, - {.instr = 8}, - {.instr = 4, .flag = 0x01, .parameter = gUnknown_082F27D0}, - {.instr = 18, .flag = sizeof(gUnknown_082F2660), .parameter = gUnknown_082F2660}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0, .flag = 0x03} +static const struct MysteryGiftServerCmd sServerScript_ClientCanceledCard[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_DynamicError)}, + {SVR_SEND}, + {SVR_LOAD_MSG, PTR_ARG(sText_CanceledReadingCard)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_CLIENT_CANCELED} }; -const struct mevent_cmd gUnknown_082F2884[] = { - {.instr = 18, .flag = sizeof(gUnknown_082F25F8), .parameter = gUnknown_082F25F8}, - {.instr = 1}, - {.instr = 13}, - {.instr = 1}, - {.instr = 15}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0, .flag = 0x02} +static const struct MysteryGiftServerCmd sServerScript_HasNews[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_HadNews)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_HAS_NEWS} }; -const struct mevent_cmd gUnknown_082F28E4[] = { - {.instr = 18, .flag = sizeof(gUnknown_082F2670), .parameter = gUnknown_082F2670}, - {.instr = 1}, - {.instr = 2, .flag = 0x13}, - {.instr = 8}, - {.instr = 4, .parameter = gUnknown_082F2884}, - {.instr = 3, .parameter = gUnknown_082F2788} +static const struct MysteryGiftServerCmd sServerScript_SendNews[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_SaveNews)}, + {SVR_SEND}, + {SVR_LOAD_NEWS}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_RESPONSE}, + {SVR_READ_RESPONSE}, + {SVR_GOTO_IF_EQ, TRUE, sServerScript_HasNews}, // Wonder News was not saved + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_NewsReceived)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_NEWS_SENT} }; -const struct mevent_cmd gUnknown_082F292C[] = { - {.instr = 18, .flag = sizeof(gUnknown_082F26A8), .parameter = gUnknown_082F26A8}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0, .flag = 0x05}, - {.instr = 18, .flag = sizeof(gUnknown_082F25E8), .parameter = gUnknown_082F25E8}, - {.instr = 1}, - {.instr = 2, .flag = 0x14}, - {.instr = 0} +static const struct MysteryGiftServerCmd sServerScript_SendCard[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_SaveCard)}, + {SVR_SEND}, + {SVR_LOAD_CARD}, + {SVR_SEND}, + {SVR_LOAD_RAM_SCRIPT}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_CARD_SENT} }; -const struct mevent_cmd s_mevent_wonder_news[] = { - {.instr = 27}, - {.instr = 18, .flag = sizeof(gUnknown_082F25A8), .parameter = gUnknown_082F25A8}, - {.instr = 1}, - {.instr = 2, .flag = 0x11}, - {.instr = 5}, - {.instr = 30}, - {.instr = 4, .parameter = gUnknown_082F26F8}, - {.instr = 3, .parameter = gUnknown_082F2800} +static const struct MysteryGiftServerCmd sServerScript_TossPrompt[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_AskToss)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_RESPONSE}, + {SVR_READ_RESPONSE}, + {SVR_GOTO_IF_EQ, FALSE, sServerScript_SendCard}, // Tossed old card, send new one + {SVR_GOTO, .ptr = sServerScript_ClientCanceledCard} // Kept old card, cancel new one }; -const struct mevent_cmd s_mevent_wonder_card[] = { - {.instr = 26}, - {.instr = 28}, - {.instr = 18, .flag = sizeof(gUnknown_082F25A8), .parameter = gUnknown_082F25A8}, - {.instr = 1}, - {.instr = 2, .flag = 0x11}, - {.instr = 5}, - {.instr = 6}, - {.instr = 4, .parameter = gUnknown_082F26F8}, - {.instr = 7}, - {.instr = 4, .flag = 0x02, .parameter = gUnknown_082F28E4}, - {.instr = 4, .parameter = gUnknown_082F2884}, - {.instr = 3, .parameter = gUnknown_082F292C} +static const struct MysteryGiftServerCmd sServerScript_HasCard[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_HadCard)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_HAS_CARD} +}; + +static const struct MysteryGiftServerCmd sServerScript_NothingSent[] = { + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_NothingSent)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_READY_END}, + {SVR_RETURN, SVR_MSG_NOTHING_SENT} +}; + +const struct MysteryGiftServerCmd gMysteryGiftServerScript_SendWonderNews[] = { + {SVR_COPY_SAVED_NEWS}, + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_SendGameData)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_GAME_DATA}, + {SVR_COPY_GAME_DATA}, + {SVR_CHECK_GAME_DATA_NEWS}, + {SVR_GOTO_IF_EQ, FALSE, sServerScript_CantSend}, + {SVR_GOTO, .ptr = sServerScript_SendNews} +}; + +const struct MysteryGiftServerCmd gMysteryGiftServerScript_SendWonderCard[] = { + {SVR_COPY_SAVED_CARD}, + {SVR_COPY_SAVED_RAM_SCRIPT}, + {SVR_LOAD_CLIENT_SCRIPT, PTR_ARG(sClientScript_SendGameData)}, + {SVR_SEND}, + {SVR_RECV, MG_LINKID_GAME_DATA}, + {SVR_COPY_GAME_DATA}, + {SVR_CHECK_GAME_DATA_CARD}, + {SVR_GOTO_IF_EQ, FALSE, sServerScript_CantSend}, + {SVR_CHECK_EXISTING_CARD}, + {SVR_GOTO_IF_EQ, HAS_DIFF_CARD, sServerScript_TossPrompt}, + {SVR_GOTO_IF_EQ, HAS_NO_CARD, sServerScript_SendCard}, + {SVR_GOTO, .ptr = sServerScript_HasCard} // HAS_SAME_CARD }; diff --git a/src/mevent_server.c b/src/mevent_server.c index 1bae6a3e16..5313e02f75 100644 --- a/src/mevent_server.c +++ b/src/mevent_server.c @@ -5,291 +5,287 @@ #include "mevent_server.h" #include "mevent_server_helpers.h" -EWRAM_DATA struct mevent_srv_common * s_mevent_srv_common_ptr = NULL; +enum { + FUNC_INIT, + FUNC_DONE, + FUNC_RECV, + FUNC_SEND, + FUNC_RUN, +}; -static void mevent_srv_init_common(struct mevent_srv_common *, const void *, u32, u32); -static void mevent_srv_free_resources(struct mevent_srv_common *); -static u32 mevent_srv_exec_common(struct mevent_srv_common *); +EWRAM_DATA static struct MysteryGiftServer * sServer = NULL; -extern const struct mevent_cmd s_mevent_wonder_news[]; -extern const struct mevent_cmd s_mevent_wonder_card[]; +static void MysteryGiftServer_Init(struct MysteryGiftServer *, const void *, u32, u32); +static void MysteryGiftServer_Free(struct MysteryGiftServer *); +static u32 MysteryGiftServer_CallFunc(struct MysteryGiftServer *); -void mevent_srv_init_wnews(void) +extern const struct MysteryGiftServerCmd gMysteryGiftServerScript_SendWonderNews[]; +extern const struct MysteryGiftServerCmd gMysteryGiftServerScript_SendWonderCard[]; + +void MysterGiftServer_CreateForNews(void) { - s_mevent_srv_common_ptr = AllocZeroed(sizeof(struct mevent_srv_common)); - mevent_srv_init_common(s_mevent_srv_common_ptr, s_mevent_wonder_news, 0, 1); + sServer = AllocZeroed(sizeof(*sServer)); + MysteryGiftServer_Init(sServer, gMysteryGiftServerScript_SendWonderNews, 0, 1); } -void mevent_srv_new_wcard(void) +void MysterGiftServer_CreateForCard(void) { - s_mevent_srv_common_ptr = AllocZeroed(sizeof(struct mevent_srv_common)); - mevent_srv_init_common(s_mevent_srv_common_ptr, s_mevent_wonder_card, 0, 1); + sServer = AllocZeroed(sizeof(*sServer)); + MysteryGiftServer_Init(sServer, gMysteryGiftServerScript_SendWonderCard, 0, 1); } -u32 mevent_srv_common_do_exec(u16 * a0) +u32 MysterGiftServer_Run(u16 * endVal) { u32 result; - if (s_mevent_srv_common_ptr == NULL) - return 3; - result = mevent_srv_exec_common(s_mevent_srv_common_ptr); - if (result == 3) + if (sServer == NULL) + return SVR_RET_END; + result = MysteryGiftServer_CallFunc(sServer); + if (result == SVR_RET_END) { - *a0 = s_mevent_srv_common_ptr->param; - mevent_srv_free_resources(s_mevent_srv_common_ptr); - Free(s_mevent_srv_common_ptr); - s_mevent_srv_common_ptr = NULL; + *endVal = sServer->param; + MysteryGiftServer_Free(sServer); + Free(sServer); + sServer = NULL; } return result; } -static void mevent_srv_init_common(struct mevent_srv_common * svr, const void * cmdBuffer, u32 sendPlayerNo, u32 recvPlayerNo) +static void MysteryGiftServer_Init(struct MysteryGiftServer * svr, const void * script, u32 sendPlayerId, u32 recvPlayerId) { - svr->unk_00 = 0; - svr->mainseqno = 0; - svr->wonder_card = AllocZeroed(sizeof(struct WonderCard)); - svr->wonder_news = AllocZeroed(sizeof(struct WonderNews)); - svr->recvBuffer = AllocZeroed(ME_SEND_BUF_SIZE); - svr->mevent_unk1442cc = AllocZeroed(sizeof(struct MEventStruct_Unk1442CC)); - svr->cmdBuffer = cmdBuffer; + svr->unused = 0; + svr->funcId = FUNC_INIT; + svr->card = AllocZeroed(sizeof(*svr->card)); + svr->news = AllocZeroed(sizeof(*svr->news)); + svr->recvBuffer = AllocZeroed(MG_LINK_BUFFER_SIZE); + svr->linkGameData = AllocZeroed(sizeof(*svr->linkGameData)); + svr->script = script; svr->cmdidx = 0; - MysteryGiftLink_Init(&svr->manager, sendPlayerNo, recvPlayerNo); + MysteryGiftLink_Init(&svr->link, sendPlayerId, recvPlayerId); } -static void mevent_srv_free_resources(struct mevent_srv_common * svr) +static void MysteryGiftServer_Free(struct MysteryGiftServer * svr) { - Free(svr->wonder_card); - Free(svr->wonder_news); + Free(svr->card); + Free(svr->news); Free(svr->recvBuffer); - Free(svr->mevent_unk1442cc); + Free(svr->linkGameData); } -void mevent_srv_common_init_send(struct mevent_srv_common * svr, u32 ident, const void * src, u32 size) +static void MysteryGiftServer_InitSend(struct MysteryGiftServer * svr, u32 ident, const void * src, u32 size) { - AGB_ASSERT(size <= ME_SEND_BUF_SIZE); - MysteryGiftLink_InitSend(&svr->manager, ident, src, size); + AGB_ASSERT(size <= MG_LINK_BUFFER_SIZE); + MysteryGiftLink_InitSend(&svr->link, ident, src, size); } -static const void * mevent_first_if_not_null_else_second(const void * a0, const void * a1) +// Given the command pointer parameter and the 'default' normal data. +// If the command's pointer is not empty use that as the send data, otherwise use the default. +static const void * MysteryGiftServer_GetSendData(const void * dynamicData, const void * defaultData) { - if (a0 != NULL) - return a0; + if (dynamicData != NULL) + return dynamicData; else - return a1; + return defaultData; } -static u32 mevent_compare_pointers(const void * a0, const void * a1) +static u32 MysteryGiftServer_Compare(const void * a, const void * b) { - if (a1 < a0) + if (b < a) return 0; - else if (a1 == a0) + else if (b == a) return 1; else return 2; } -static u32 common_mainseq_0(struct mevent_srv_common * svr) +static u32 Server_Init(struct MysteryGiftServer * svr) { - // start - svr->mainseqno = 4; - return 0; + svr->funcId = FUNC_RUN; + return SVR_RET_INIT; } -static u32 common_mainseq_1(struct mevent_srv_common * svr) +static u32 Server_Done(struct MysteryGiftServer * svr) { - // done - return 3; + return SVR_RET_END; } -static u32 common_mainseq_2(struct mevent_srv_common * svr) +static u32 Server_Recv(struct MysteryGiftServer * svr) { - // do recv - if (MysteryGiftLink_Recv(&svr->manager)) - svr->mainseqno = 4; - return 1; + if (MysteryGiftLink_Recv(&svr->link)) + svr->funcId = FUNC_RUN; + return SVR_RET_ACTIVE; } -static u32 common_mainseq_3(struct mevent_srv_common * svr) +static u32 Server_Send(struct MysteryGiftServer * svr) { - // do send - if (MysteryGiftLink_Send(&svr->manager)) - svr->mainseqno = 4; - return 1; + if (MysteryGiftLink_Send(&svr->link)) + svr->funcId = FUNC_RUN; + return SVR_RET_ACTIVE; } -static u32 common_mainseq_4(struct mevent_srv_common * svr) +static u32 Server_Run(struct MysteryGiftServer * svr) { // process command - const struct mevent_cmd * cmd = &svr->cmdBuffer[svr->cmdidx]; + const struct MysteryGiftServerCmd * cmd = &svr->script[svr->cmdidx]; const void * ptr; svr->cmdidx++; switch (cmd->instr) { - case 0: - // end - AGB_ASSERT(cmd->parameter == NULL); - svr->mainseqno = 1; - svr->param = cmd->flag; + case SVR_RETURN: + AGB_ASSERT(cmd->ptr == NULL); + svr->funcId = FUNC_DONE; + svr->param = cmd->parameter; // Set for endVal in MysteryGiftServer_Run break; - case 1: - // wait_send - svr->mainseqno = 3; + case SVR_SEND: + svr->funcId = FUNC_SEND; break; - case 2: - // receive - AGB_ASSERT(cmd->parameter == NULL); - MysteryGiftLink_InitRecv(&svr->manager, cmd->flag, svr->recvBuffer); - svr->mainseqno = 2; + case SVR_RECV: + AGB_ASSERT(cmd->ptr == NULL); + MysteryGiftLink_InitRecv(&svr->link, cmd->parameter, svr->recvBuffer); + svr->funcId = FUNC_RECV; break; - case 3: - // jump - AGB_ASSERT(cmd->flag == FALSE); + case SVR_GOTO: + AGB_ASSERT(cmd->parameter == 0); svr->cmdidx = 0; - svr->cmdBuffer = cmd->parameter; + svr->script = cmd->ptr; break; - case 5: - // get_1442CC - AGB_ASSERT(cmd->flag == FALSE); - AGB_ASSERT(cmd->parameter == NULL); - memcpy(svr->mevent_unk1442cc, svr->recvBuffer, sizeof(struct MEventStruct_Unk1442CC)); + case SVR_COPY_GAME_DATA: + AGB_ASSERT(cmd->parameter == 0); + AGB_ASSERT(cmd->ptr == NULL); + memcpy(svr->linkGameData, svr->recvBuffer, sizeof(*svr->linkGameData)); break; - case 6: - // check_header__pass_false - AGB_ASSERT(cmd->flag == FALSE); - AGB_ASSERT(cmd->parameter == NULL); - svr->param = sub_801B6A0(svr->mevent_unk1442cc, FALSE); + case SVR_CHECK_GAME_DATA_CARD: + AGB_ASSERT(cmd->parameter == 0); + AGB_ASSERT(cmd->ptr == NULL); + svr->param = MysteryGift_ValidateLinkGameData(svr->linkGameData, FALSE); break; - case 30: - // check_header__pass_true - AGB_ASSERT(cmd->flag == FALSE); - AGB_ASSERT(cmd->parameter == NULL); - svr->param = sub_801B6A0(svr->mevent_unk1442cc, TRUE); + case SVR_CHECK_GAME_DATA_NEWS: + AGB_ASSERT(cmd->parameter == 0); + AGB_ASSERT(cmd->ptr == NULL); + svr->param = MysteryGift_ValidateLinkGameData(svr->linkGameData, TRUE); break; - case 4: - // jump_if_eq - if (svr->param == cmd->flag) + case SVR_GOTO_IF_EQ: + if (svr->param == cmd->parameter) { svr->cmdidx = 0; - svr->cmdBuffer = cmd->parameter; + svr->script = cmd->ptr; } break; - case 7: - // check_crc - AGB_ASSERT(cmd->flag == FALSE); - ptr = mevent_first_if_not_null_else_second(cmd->parameter, svr->wonder_card); - svr->param = sub_801B6EC(ptr, svr->mevent_unk1442cc, ptr); + case SVR_CHECK_EXISTING_CARD: + AGB_ASSERT(cmd->parameter == 0); + ptr = MysteryGiftServer_GetSendData(cmd->ptr, svr->card); + svr->param = MysteryGift_CompareCardFlags(ptr, svr->linkGameData, ptr); break; - case 8: - // read_word - AGB_ASSERT(cmd->flag == FALSE); - AGB_ASSERT(cmd->parameter == NULL); + case SVR_READ_RESPONSE: + AGB_ASSERT(cmd->parameter == 0); + AGB_ASSERT(cmd->ptr == NULL); svr->param = *(u32 *)svr->recvBuffer; break; - case 9: - AGB_ASSERT(cmd->flag == FALSE); - ptr = mevent_first_if_not_null_else_second(cmd->parameter, &svr->sendWord); - svr->param = sub_801B708(ptr, svr->mevent_unk1442cc, ptr); + case SVR_CHECK_EXISTING_STAMPS: + AGB_ASSERT(cmd->parameter == 0); + ptr = MysteryGiftServer_GetSendData(cmd->ptr, &svr->stamp); + svr->param = MysteryGift_CheckStamps(ptr, svr->linkGameData, ptr); break; - case 10: - AGB_ASSERT(cmd->parameter == NULL); - svr->param = MEventStruct_Unk1442CC_GetValueNFrom_unk_20(svr->mevent_unk1442cc, cmd->flag); + case SVR_GET_CARD_STAT: + AGB_ASSERT(cmd->ptr == NULL); + svr->param = MysteryGift_GetCardStatFromLinkData(svr->linkGameData, cmd->parameter); break; - case 11: - AGB_ASSERT(cmd->flag == FALSE); - svr->param = MysteryGift_DoesQuestionnaireMatch(svr->mevent_unk1442cc, cmd->parameter); + case SVR_CHECK_QUESTIONNAIRE: + AGB_ASSERT(cmd->parameter == 0); + svr->param = MysteryGift_DoesQuestionnaireMatch(svr->linkGameData, cmd->ptr); break; - case 12: - AGB_ASSERT(cmd->flag == FALSE); - svr->param = mevent_compare_pointers(cmd->parameter, *(void **)svr->recvBuffer); + case SVR_COMPARE: + AGB_ASSERT(cmd->parameter == 0); + svr->param = MysteryGiftServer_Compare(cmd->ptr, *(void **)svr->recvBuffer); break; - case 14: - AGB_ASSERT(cmd->flag == FALSE); - mevent_srv_common_init_send(svr, 0x17, mevent_first_if_not_null_else_second(cmd->parameter, svr->wonder_news), sizeof(struct WonderNews)); + case SVR_LOAD_NEWS: + AGB_ASSERT(cmd->parameter == 0); + MysteryGiftServer_InitSend(svr, MG_LINKID_NEWS, MysteryGiftServer_GetSendData(cmd->ptr, svr->news), sizeof(*svr->news)); break; - case 13: - AGB_ASSERT(cmd->flag == FALSE); - mevent_srv_common_init_send(svr, 0x16, mevent_first_if_not_null_else_second(cmd->parameter, svr->wonder_card), sizeof(struct WonderCard)); + case SVR_LOAD_CARD: + AGB_ASSERT(cmd->parameter == 0); + MysteryGiftServer_InitSend(svr, MG_LINKID_CARD, MysteryGiftServer_GetSendData(cmd->ptr, svr->card), sizeof(*svr->card)); break; - case 16: - AGB_ASSERT(cmd->flag == FALSE); - mevent_srv_common_init_send(svr, 0x18, mevent_first_if_not_null_else_second(cmd->parameter, &svr->sendWord), 4); + case SVR_LOAD_STAMP: + AGB_ASSERT(cmd->parameter == 0); + MysteryGiftServer_InitSend(svr, MG_LINKID_STAMP, MysteryGiftServer_GetSendData(cmd->ptr, &svr->stamp), sizeof(svr->stamp)); break; - case 15: - if (cmd->parameter == NULL) - mevent_srv_common_init_send(svr, 0x19, svr->sendBuffer1, svr->sendBuffer1Size); + case SVR_LOAD_RAM_SCRIPT: + if (cmd->ptr == NULL) + MysteryGiftServer_InitSend(svr, MG_LINKID_RAM_SCRIPT, svr->ramScript, svr->ramScriptSize); else - mevent_srv_common_init_send(svr, 0x19, cmd->parameter, cmd->flag); + MysteryGiftServer_InitSend(svr, MG_LINKID_RAM_SCRIPT, cmd->ptr, cmd->parameter); break; - case 18: - if (cmd->parameter == NULL) - mevent_srv_common_init_send(svr, 0x10, svr->sendBuffer2, svr->sendBuffer2Size); + case SVR_LOAD_CLIENT_SCRIPT: + if (cmd->ptr == NULL) + MysteryGiftServer_InitSend(svr, MG_LINKID_CLIENT_SCRIPT, svr->clientScript, svr->clientScriptSize); else - mevent_srv_common_init_send(svr, 0x10, cmd->parameter, cmd->flag); + MysteryGiftServer_InitSend(svr, MG_LINKID_CLIENT_SCRIPT, cmd->ptr, cmd->parameter); break; - case 19: - AGB_ASSERT(cmd->flag == FALSE); - mevent_srv_common_init_send(svr, 0x1a, cmd->parameter, 188); + case SVR_LOAD_EREADER_TRAINER: + AGB_ASSERT(cmd->parameter == 0); + MysteryGiftServer_InitSend(svr, MG_LINKID_EREADER_TRAINER, cmd->ptr, sizeof(struct BattleTowerEReaderTrainer)); break; - case 20: - mevent_srv_common_init_send(svr, 0x15, cmd->parameter, cmd->flag); + case SVR_LOAD_MSG: + MysteryGiftServer_InitSend(svr, MG_LINKID_DYNAMIC_MSG, cmd->ptr, cmd->parameter); break; - case 17: - mevent_srv_common_init_send(svr, 0x1c, cmd->parameter, cmd->flag); + case SVR_LOAD_UNK_2: + MysteryGiftServer_InitSend(svr, MG_LINKID_UNK_2, cmd->ptr, cmd->parameter); break; - case 22: - AGB_ASSERT(cmd->flag == FALSE); - memcpy(svr->wonder_card, cmd->parameter, 332); + case SVR_COPY_CARD: + AGB_ASSERT(cmd->parameter == 0); + memcpy(svr->card, cmd->ptr, sizeof(*svr->card)); break; - case 23: - AGB_ASSERT(cmd->flag == FALSE); - memcpy(svr->wonder_news, cmd->parameter, 444); + case SVR_COPY_NEWS: + AGB_ASSERT(cmd->parameter == 0); + memcpy(svr->news, cmd->ptr, sizeof(*svr->news)); break; - case 21: - AGB_ASSERT(cmd->flag == FALSE); - svr->sendWord = *(u32 *)cmd->parameter; + case SVR_COPY_STAMP: + AGB_ASSERT(cmd->parameter == 0); + svr->stamp = *(u32 *)cmd->ptr; break; - case 24: - svr->sendBuffer1 = cmd->parameter; - svr->sendBuffer1Size = cmd->flag; + case SVR_SET_RAM_SCRIPT: + svr->ramScript = cmd->ptr; + svr->ramScriptSize = cmd->parameter; break; - case 25: - svr->sendBuffer2 = cmd->parameter; - svr->sendBuffer2Size = cmd->flag; + case SVR_SET_CLIENT_SCRIPT: + svr->clientScript = cmd->ptr; + svr->clientScriptSize = cmd->parameter; break; - case 26: - AGB_ASSERT(cmd->flag == FALSE && cmd->parameter == NULL); - memcpy(svr->wonder_card, GetSavedWonderCard(), 332); - WonderCard_ResetInternalReceivedFlag(svr->wonder_card); + case SVR_COPY_SAVED_CARD: + AGB_ASSERT(cmd->parameter == 0 && cmd->ptr == NULL); + memcpy(svr->card, GetSavedWonderCard(), sizeof(*svr->card)); + DisableWonderCardSending(svr->card); break; - case 27: - AGB_ASSERT(cmd->flag == FALSE && cmd->parameter == NULL); - memcpy(svr->wonder_news, GetSavedWonderNews(), 444); + case SVR_COPY_SAVED_NEWS: + AGB_ASSERT(cmd->parameter == 0 && cmd->ptr == NULL); + memcpy(svr->news, GetSavedWonderNews(), sizeof(*svr->news)); break; - case 28: - AGB_ASSERT(cmd->flag == FALSE && cmd->parameter == NULL); - svr->sendBuffer1 = GetSavedRamScriptIfValid(); + case SVR_COPY_SAVED_RAM_SCRIPT: + AGB_ASSERT(cmd->parameter == 0 && cmd->ptr == NULL); + svr->ramScript = GetSavedRamScriptIfValid(); break; - case 29: - mevent_srv_common_init_send(svr, 0x1b, cmd->parameter, cmd->flag); + case SVR_LOAD_UNK_1: + MysteryGiftServer_InitSend(svr, MG_LINKID_UNK_1, cmd->ptr, cmd->parameter); break; } - return 1; + return SVR_RET_ACTIVE; } -static u32 (*const func_tbl[])(struct mevent_srv_common *) = { - common_mainseq_0, - common_mainseq_1, - common_mainseq_2, - common_mainseq_3, - common_mainseq_4 +static u32 (*const sFuncTable[])(struct MysteryGiftServer *) = { + [FUNC_INIT] = Server_Init, + [FUNC_DONE] = Server_Done, + [FUNC_RECV] = Server_Recv, + [FUNC_SEND] = Server_Send, + [FUNC_RUN] = Server_Run }; -static u32 mevent_srv_exec_common(struct mevent_srv_common * svr) +static u32 MysteryGiftServer_CallFunc(struct MysteryGiftServer * svr) { u32 response; - AGB_ASSERT(svr->mainseqno < ARRAY_COUNT(func_tbl)); - response = func_tbl[svr->mainseqno](svr); - AGB_ASSERT(svr->mainseqno < ARRAY_COUNT(func_tbl)); + AGB_ASSERT(svr->funcId < ARRAY_COUNT(sFuncTable)); + response = sFuncTable[svr->funcId](svr); + AGB_ASSERT(svr->funcId < ARRAY_COUNT(sFuncTable)); return response; } diff --git a/src/mevent_server_helpers.c b/src/mevent_server_helpers.c index 17686e2875..83ecc9f502 100644 --- a/src/mevent_server_helpers.c +++ b/src/mevent_server_helpers.c @@ -11,200 +11,211 @@ #include "mevent.h" #include "mevent_server_helpers.h" -static u32 mevent_receive_func(struct MysteryGiftLink *); -static u32 mevent_send_func(struct MysteryGiftLink *); +/* + Handles the link connection functions used by the Mystery Gift client/server. + Note: MysteryGiftLink is shortened to MGL for internal functions. +*/ -u32 MysteryGiftLink_Recv(struct MysteryGiftLink * svr) +struct SendRecvHeader { - return svr->recvFunc(svr); + u16 ident; + u16 crc; + u16 size; +}; + +static u32 MGL_Receive(struct MysteryGiftLink *); +static u32 MGL_Send(struct MysteryGiftLink *); + +u32 MysteryGiftLink_Recv(struct MysteryGiftLink * link) +{ + return link->recvFunc(link); } -u32 MysteryGiftLink_Send(struct MysteryGiftLink * svr) +u32 MysteryGiftLink_Send(struct MysteryGiftLink * link) { - return svr->sendFunc(svr); + return link->sendFunc(link); } -void MysteryGiftLink_Init(struct MysteryGiftLink * svr, u32 sendPlayerNo, u32 recvPlayerNo) +void MysteryGiftLink_Init(struct MysteryGiftLink * link, u32 sendPlayerId, u32 recvPlayerId) { - svr->sendPlayerNo = sendPlayerNo; - svr->recvPlayerNo = recvPlayerNo; - svr->seqno = 0; - svr->sendCRC = 0; - svr->sendSize = 0; - svr->sendCounter = 0; - svr->recvCRC = 0; - svr->recvSize = 0; - svr->recvCounter = 0; - svr->sendBfr = NULL; - svr->recvBfr = NULL; - svr->sendFunc = mevent_send_func; - svr->recvFunc = mevent_receive_func; + link->sendPlayerId = sendPlayerId; + link->recvPlayerId = recvPlayerId; + link->state = 0; + link->sendCRC = 0; + link->sendSize = 0; + link->sendCounter = 0; + link->recvCRC = 0; + link->recvSize = 0; + link->recvCounter = 0; + link->sendBfr = NULL; + link->recvBfr = NULL; + link->sendFunc = MGL_Send; + link->recvFunc = MGL_Receive; } -void MysteryGiftLink_InitSend(struct MysteryGiftLink * svr, u32 ident, const void * src, u32 size) +void MysteryGiftLink_InitSend(struct MysteryGiftLink * link, u32 ident, const void * src, u32 size) { - svr->seqno = 0; - svr->sendIdent = ident; - svr->sendCounter = 0; - svr->sendCRC = 0; + link->state = 0; + link->sendIdent = ident; + link->sendCounter = 0; + link->sendCRC = 0; if (size != 0) - svr->sendSize = size; + link->sendSize = size; else - svr->sendSize = ME_SEND_BUF_SIZE; - svr->sendBfr = src; + link->sendSize = MG_LINK_BUFFER_SIZE; + link->sendBfr = src; } -void MysteryGiftLink_InitRecv(struct MysteryGiftLink * svr, u32 ident, void * dest) +void MysteryGiftLink_InitRecv(struct MysteryGiftLink * link, u32 ident, void * dest) { - svr->seqno = 0; - svr->recvIdent = ident; - svr->recvCounter = 0; - svr->recvCRC = 0; - svr->recvSize = 0; - svr->recvBfr = dest; + link->state = 0; + link->recvIdent = ident; + link->recvCounter = 0; + link->recvCRC = 0; + link->recvSize = 0; + link->recvBfr = dest; } -static void mevent_recv_block(u32 recv_idx, void * dest, size_t size) +static void MGL_ReceiveBlock(u32 playerId, void * dest, size_t size) { - memcpy(dest, gBlockRecvBuffer[recv_idx], size); + memcpy(dest, gBlockRecvBuffer[playerId], size); } -static bool32 mevent_has_received(u32 recv_idx) +static bool32 MGL_HasReceived(u32 playerId) { - if ((GetBlockReceivedStatus() >> recv_idx) & 1) + if ((GetBlockReceivedStatus() >> playerId) & 1) return TRUE; else return FALSE; } -static void mevent_reset_recv(u32 recv_idx) +static void MGL_ResetReceived(u32 playerId) { - ResetBlockReceivedFlag(recv_idx); + ResetBlockReceivedFlag(playerId); } -static bool32 mevent_receive_func(struct MysteryGiftLink * svr) +static bool32 MGL_Receive(struct MysteryGiftLink * link) { - struct send_recv_header header; + struct SendRecvHeader header; - switch (svr->seqno) + switch (link->state) { - case 0: - if (mevent_has_received(svr->recvPlayerNo)) + case 0: + if (MGL_HasReceived(link->recvPlayerId)) + { + MGL_ReceiveBlock(link->recvPlayerId, &header, sizeof(header)); + link->recvSize = header.size; + link->recvCRC = header.crc; + if (link->recvSize > MG_LINK_BUFFER_SIZE) { - mevent_recv_block(svr->recvPlayerNo, &header, sizeof(header)); - svr->recvSize = header.size; - svr->recvCRC = header.crc; - if (svr->recvSize > ME_SEND_BUF_SIZE) - { - LinkRfu_FatalError(); - return FALSE; - } - else if (svr->recvIdent != header.ident) - { - LinkRfu_FatalError(); - return FALSE; - } - else - { - svr->recvCounter = 0; - mevent_reset_recv(svr->recvPlayerNo); - ++svr->seqno; - } + LinkRfu_FatalError(); + return FALSE; } - break; - case 1: - if (mevent_has_received(svr->recvPlayerNo)) - { - size_t blocksiz = svr->recvCounter * 252; - if (svr->recvSize - blocksiz <= 252) - { - mevent_recv_block(svr->recvPlayerNo, svr->recvBfr + blocksiz, svr->recvSize - blocksiz); - ++svr->recvCounter; - ++svr->seqno; - } - else - { - mevent_recv_block(svr->recvPlayerNo, svr->recvBfr + blocksiz, 252); - ++svr->recvCounter; - } - mevent_reset_recv(svr->recvPlayerNo); - } - break; - case 2: - if (CalcCRC16WithTable(svr->recvBfr, svr->recvSize) != svr->recvCRC) + else if (link->recvIdent != header.ident) { LinkRfu_FatalError(); return FALSE; } else { - svr->seqno = 0; - return TRUE; + link->recvCounter = 0; + MGL_ResetReceived(link->recvPlayerId); + link->state++; } - break; - + } + break; + case 1: + if (MGL_HasReceived(link->recvPlayerId)) + { + size_t blocksize = link->recvCounter * 252; + if (link->recvSize - blocksize <= 252) + { + MGL_ReceiveBlock(link->recvPlayerId, link->recvBfr + blocksize, link->recvSize - blocksize); + link->recvCounter++; + link->state++; + } + else + { + MGL_ReceiveBlock(link->recvPlayerId, link->recvBfr + blocksize, 252); + link->recvCounter++; + } + MGL_ResetReceived(link->recvPlayerId); + } + break; + case 2: + if (CalcCRC16WithTable(link->recvBfr, link->recvSize) != link->recvCRC) + { + LinkRfu_FatalError(); + return FALSE; + } + else + { + link->state = 0; + return TRUE; + } + break; } return FALSE; } -static bool32 mevent_send_func(struct MysteryGiftLink * svr) +static bool32 MGL_Send(struct MysteryGiftLink * link) { - struct send_recv_header header; + struct SendRecvHeader header; - switch (svr->seqno) + switch (link->state) { - case 0: - if (IsLinkTaskFinished()) + case 0: + if (IsLinkTaskFinished()) + { + header.ident = link->sendIdent; + header.size = link->sendSize; + header.crc = CalcCRC16WithTable(link->sendBfr, link->sendSize); + link->sendCRC = header.crc; + link->sendCounter = 0; + SendBlock(0, &header, sizeof(header)); + link->state++; + } + break; + case 1: + if (IsLinkTaskFinished()) + { + if (MGL_HasReceived(link->sendPlayerId)) { - header.ident = svr->sendIdent; - header.size = svr->sendSize; - header.crc = CalcCRC16WithTable(svr->sendBfr, svr->sendSize); - svr->sendCRC = header.crc; - svr->sendCounter = 0; - SendBlock(0, &header, sizeof(header)); - ++svr->seqno; - } - break; - case 1: - if (IsLinkTaskFinished()) - { - if (mevent_has_received(svr->sendPlayerNo)) + size_t blocksize; + MGL_ResetReceived(link->sendPlayerId); + blocksize = 252 * link->sendCounter; + if (link->sendSize - blocksize <= 252) { - size_t blocksiz; - mevent_reset_recv(svr->sendPlayerNo); - blocksiz = 252 * svr->sendCounter; - if (svr->sendSize - blocksiz <= 252) - { - SendBlock(0, svr->sendBfr + blocksiz, svr->sendSize - blocksiz); - ++svr->sendCounter; - ++svr->seqno; - } - else - { - SendBlock(0, svr->sendBfr + blocksiz, 252); - ++svr->sendCounter; - } + SendBlock(0, link->sendBfr + blocksize, link->sendSize - blocksize); + link->sendCounter++; + link->state++; + } + else + { + SendBlock(0, link->sendBfr + blocksize, 252); + link->sendCounter++; } } - break; - case 2: - if (IsLinkTaskFinished()) - { - if (CalcCRC16WithTable(svr->sendBfr, svr->sendSize) != svr->sendCRC) - LinkRfu_FatalError(); - else - ++svr->seqno; - } - break; - case 3: - if (mevent_has_received(svr->sendPlayerNo)) - { - mevent_reset_recv(svr->sendPlayerNo); - svr->seqno = 0; - return TRUE; - } - break; + } + break; + case 2: + if (IsLinkTaskFinished()) + { + if (CalcCRC16WithTable(link->sendBfr, link->sendSize) != link->sendCRC) + LinkRfu_FatalError(); + else + link->state++; + } + break; + case 3: + if (MGL_HasReceived(link->sendPlayerId)) + { + MGL_ResetReceived(link->sendPlayerId); + link->state = 0; + return TRUE; + } + break; } return FALSE; diff --git a/src/mystery_gift.c b/src/mystery_gift.c index b3ec493f5f..de0874d28e 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -44,18 +44,18 @@ static const u32 gUnkTextboxBorderGfx[] = INCBIN_U32("graphics/interface/unk_tex struct MysteryGiftTaskData { - u16 curPromptWindowId; - u16 unk2; - u16 unk4; - u16 unk6; + u16 var; // Multipurpose + u16 unused1; + u16 unused2; + u16 unused3; u8 state; u8 textState; - u8 unkA; - u8 unkB; + u8 unused4; + u8 unused5; bool8 isWonderNews; bool8 sourceIsFriend; - u8 prevPromptWindowId; - u8 * buffer; + u8 msgId; + u8 * clientMsg; }; static const struct BgTemplate sBGTemplates[] = { @@ -547,7 +547,7 @@ static void ClearTextWindow(void) CopyWindowToVram(1, 1); } -bool32 MG_PrintTextOnWindow1AndWaitButton(u8 *textState, const u8 *str) +bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) { switch (*textState) { @@ -700,6 +700,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c return MENU_NOTHING_CHOSEN; } +// Handle the "Receive/Send/Toss" menu that appears when selecting Wonder Card/News static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cannotToss, bool32 cannotSend) { struct WindowTemplate windowTemplate; @@ -772,7 +773,7 @@ static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews) { case 0: if (!isWonderNews) - WonderCard_Init(GetSavedWonderCard(), sav1_get_mevent_buffer_2()); + WonderCard_Init(GetSavedWonderCard(), GetSavedWonderCardMetadata()); else WonderNews_Init(GetSavedWonderNews()); (*state)++; @@ -798,9 +799,9 @@ static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews) static bool32 ClearSavedNewsOrCard(bool32 isWonderNews) { if (!isWonderNews) - ClearSavedWonderCard(); + ClearSavedWonderCardAndRelated(); else - ClearSavedWonderNews(); + ClearSavedWonderNewsAndRelated(); return TRUE; } @@ -843,12 +844,12 @@ static s32 AskDiscardGift(u8 * textState, u16 * windowId, bool32 isWonderNews) static bool32 PrintThrownAway(u8 * textState, bool32 isWonderNews) { if (!isWonderNews) - return MG_PrintTextOnWindow1AndWaitButton(textState, gText_WonderCardThrownAway); + return PrintMysteryGiftMenuMessage(textState, gText_WonderCardThrownAway); else - return MG_PrintTextOnWindow1AndWaitButton(textState, gText_WonderNewsThrownAway); + return PrintMysteryGiftMenuMessage(textState, gText_WonderNewsThrownAway); } -static bool32 mevent_save_game(u8 * state) +static bool32 SaveOnMysteryGiftMenu(u8 * state) { switch (*state) { @@ -865,10 +866,8 @@ static bool32 mevent_save_game(u8 * state) (*state)++; break; case 3: - if (({JOY_NEW(A_BUTTON | B_BUTTON);})) - { + if (JOY_NEW(A_BUTTON | B_BUTTON)) (*state)++; - } break; case 4: *state = 0; @@ -879,70 +878,72 @@ static bool32 mevent_save_game(u8 * state) return FALSE; } -static const u8 * GetStdMessage(bool32 * receivedMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId) +static const u8 * GetClientResultMessage(bool32 * successMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId) { const u8 * msg = NULL; - *receivedMsg = FALSE; + *successMsg = FALSE; switch (msgId) { - case 0: - *receivedMsg = FALSE; + case CLI_MSG_NOTHING_SENT: + *successMsg = FALSE; msg = gText_NothingSentOver; break; - case 1: - *receivedMsg = FALSE; + case CLI_MSG_RECORD_UPLOADED: + *successMsg = FALSE; msg = gText_RecordUploadedViaWireless; break; - case 2: - *receivedMsg = TRUE; + case CLI_MSG_CARD_RECEIVED: + *successMsg = TRUE; msg = !sourceIsFriend ? gText_WonderCardReceived : gText_WonderCardReceivedFrom; break; - case 3: - *receivedMsg = TRUE; + case CLI_MSG_NEWS_RECEIVED: + *successMsg = TRUE; msg = !sourceIsFriend ? gText_WonderNewsReceived : gText_WonderNewsReceivedFrom; break; - case 4: - *receivedMsg = TRUE; + case CLI_MSG_STAMP_RECEIVED: + *successMsg = TRUE; msg = gText_NewStampReceived; break; - case 5: - *receivedMsg = FALSE; + case CLI_MSG_HAD_CARD: + *successMsg = FALSE; msg = gText_AlreadyHadCard; break; - case 6: - *receivedMsg = FALSE; + case CLI_MSG_HAD_STAMP: + *successMsg = FALSE; msg = gText_AlreadyHadStamp; break; - case 7: - *receivedMsg = FALSE; + case CLI_MSG_HAD_NEWS: + *successMsg = FALSE; msg = gText_AlreadyHadNews; break; - case 8: - *receivedMsg = FALSE; + case CLI_MSG_NO_ROOM_STAMPS: + *successMsg = FALSE; msg = gText_NoMoreRoomForStamps; break; - case 9: - *receivedMsg = FALSE; + case CLI_MSG_COMM_CANCELED: + *successMsg = FALSE; msg = gText_CommunicationCanceled; break; - case 10: - *receivedMsg = FALSE; + case CLI_MSG_CANT_ACCEPT: + *successMsg = FALSE; msg = !isWonderNews ? gText_CantAcceptCardFromTrainer : gText_CantAcceptNewsFromTrainer; break; - case 11: - *receivedMsg = FALSE; + case CLI_MSG_COMM_ERROR: + *successMsg = FALSE; msg = gText_CommunicationError; break; - case 12: - *receivedMsg = TRUE; + case CLI_MSG_TRAINER_RECEIVED: + *successMsg = TRUE; msg = gText_NewTrainerReceived; break; - case 13: - *receivedMsg = TRUE; + case CLI_MSG_BUFFER_SUCCESS: + *successMsg = TRUE; + // msg is NULL, use buffer break; - case 14: - *receivedMsg = FALSE; + case CLI_MSG_BUFFER_FAILURE: + *successMsg = FALSE; + // msg is NULL, use buffer break; } @@ -976,91 +977,95 @@ static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer) return FALSE; } -static const u8 * mevent_message_stamp_card_etc_send_status(u32 * a0, u8 unused, u32 msgId) +static const u8 * GetServerResultMessage(bool32 * wonderSuccess, bool8 sourceIsFriend, u32 msgId) { const u8 * result = gText_CommunicationError; - *a0 = 0; + *wonderSuccess = FALSE; switch (msgId) { - case 0: + case SVR_MSG_NOTHING_SENT: result = gText_NothingSentOver; break; - case 1: + case SVR_MSG_RECORD_UPLOADED: result = gText_RecordUploadedViaWireless; break; - case 2: + case SVR_MSG_CARD_SENT: result = gText_WonderCardSentTo; - *a0 = 1; + *wonderSuccess = TRUE; break; - case 3: + case SVR_MSG_NEWS_SENT: result = gText_WonderNewsSentTo; - *a0 = 1; + *wonderSuccess = TRUE; break; - case 4: + case SVR_MSG_STAMP_SENT: result = gText_StampSentTo; break; - case 5: + case SVR_MSG_HAS_CARD: result = gText_OtherTrainerHasCard; break; - case 6: + case SVR_MSG_HAS_STAMP: result = gText_OtherTrainerHasStamp; break; - case 7: + case SVR_MSG_HAS_NEWS: result = gText_OtherTrainerHasNews; break; - case 8: + case SVR_MSG_NO_ROOM_STAMPS: result = gText_NoMoreRoomForStamps; break; - case 9: + case SVR_MSG_CLIENT_CANCELED: result = gText_OtherTrainerCanceled; break; - case 10: + case SVR_MSG_CANT_SEND_GIFT_1: result = gText_CantSendGiftToTrainer; break; - case 11: + case SVR_MSG_COMM_ERROR: result = gText_CommunicationError; break; - case 12: + case SVR_MSG_GIFT_SENT_1: result = gText_GiftSentTo; break; - case 13: + case SVR_MSG_GIFT_SENT_2: result = gText_GiftSentTo; break; - case 14: + case SVR_MSG_CANT_SEND_GIFT_2: result = gText_CantSendGiftToTrainer; break; } return result; } -static bool32 PrintMGSendStatus(u8 * state, u16 * arg1, u8 arg2, u32 msgId) +static bool32 PrintServerResultMessage(u8 * state, u16 * timer, bool8 sourceIsFriend, u32 msgId) { - u32 flag; - const u8 * str = mevent_message_stamp_card_etc_send_status(&flag, arg2, msgId); - if (flag) - return PrintSuccessMessage(state, str, arg1); + bool32 wonderSuccess; + const u8 * str = GetServerResultMessage(&wonderSuccess, sourceIsFriend, msgId); + if (wonderSuccess) + return PrintSuccessMessage(state, str, timer); else - return MG_PrintTextOnWindow1AndWaitButton(state, str); + return PrintMysteryGiftMenuMessage(state, str); } +// States for Task_MysteryGift. +// CLIENT states are for when the player is receiving a gift, and use mevent_client.c link functions. +// SERVER states are for when the player is sending a gift, and use mevent_server.c link functions. +// Other states handle the general Mystery Gift menu usage. enum { MG_STATE_TO_MAIN_MENU, MG_STATE_MAIN_MENU, MG_STATE_DONT_HAVE_ANY, - MG_STATE_LINK_PROMPT, - MG_STATE_LINK_PROMPT_INPUT, - MG_STATE_LINK_START, - MG_STATE_LINK_WAIT, - MG_STATE_COMMUNICATING, - MG_STATE_COMMUNICATE, - MG_STATE_9, - MG_STATE_10, - MG_STATE_LINK_ASK_TOSS, - MG_STATE_LINK_ASK_TOSS_UNRECEIVED, - MG_STATE_LINK_COMPLETE_WAIT, - MG_STATE_LINK_COMPLETED, - MG_STATE_LINK_RESULT_MSG, - MG_STATE_LINK_ERROR_1, + MG_STATE_SOURCE_PROMPT, + MG_STATE_SOURCE_PROMPT_INPUT, + MG_STATE_CLIENT_LINK_START, + MG_STATE_CLIENT_LINK_WAIT, + MG_STATE_CLIENT_COMMUNICATING, + MG_STATE_CLIENT_LINK, + MG_STATE_CLIENT_YES_NO, + MG_STATE_CLIENT_MESSAGE, + MG_STATE_CLIENT_ASK_TOSS, + MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED, + MG_STATE_CLIENT_LINK_END, + MG_STATE_CLIENT_COMM_COMPLETED, + MG_STATE_CLIENT_RESULT_MSG, + MG_STATE_CLIENT_ERROR, MG_STATE_SAVE_LOAD_GIFT, MG_STATE_LOAD_GIFT, MG_STATE_UNUSED, @@ -1074,13 +1079,13 @@ enum { MG_STATE_GIFT_INPUT_EXIT, MG_STATE_RECEIVE, MG_STATE_SEND, - MG_STATE_SEND_WAIT, - MG_STATE_SEND_START, - MG_STATE_SENDING, - MG_STATE_SEND_FINISH, - MG_STATE_SEND_WAIT_END, - MG_STATE_SEND_END, - MG_STATE_LINK_ERROR_2, + MG_STATE_SERVER_LINK_WAIT, + MG_STATE_SERVER_LINK_START, + MG_STATE_SERVER_LINK, + MG_STATE_SERVER_LINK_END, + MG_STATE_SERVER_LINK_END_WAIT, + MG_STATE_SERVER_RESULT_MSG, + MG_STATE_SERVER_ERROR, MG_STATE_EXIT, }; @@ -1090,22 +1095,22 @@ static void CreateMysteryGiftTask(void) struct MysteryGiftTaskData * data = (void *)gTasks[taskId].data; data->state = MG_STATE_TO_MAIN_MENU; data->textState = 0; - data->unkA = 0; - data->unkB = 0; + data->unused4 = 0; + data->unused5 = 0; data->isWonderNews = 0; data->sourceIsFriend = 0; - data->curPromptWindowId = 0; - data->unk2 = 0; - data->unk4 = 0; - data->unk6 = 0; - data->prevPromptWindowId = 0; - data->buffer = AllocZeroed(0x40); + data->var = 0; + data->unused1 = 0; + data->unused2 = 0; + data->unused3 = 0; + data->msgId = 0; + data->clientMsg = AllocZeroed(CLIENT_MAX_MSG_SIZE); } static void Task_MysteryGift(u8 taskId) { struct MysteryGiftTaskData *data = (void *)gTasks[taskId].data; - u32 receivedMsg, input; + u32 successMsg, input; const u8 *msg; switch (data->state) @@ -1115,7 +1120,7 @@ static void Task_MysteryGift(u8 taskId) break; case MG_STATE_MAIN_MENU: // Main Mystery Gift menu, player can select Wonder Cards or News (or exit) - switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->curPromptWindowId, FALSE)) + switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->var, FALSE)) { case 0: // "Wonder Cards" data->isWonderNews = FALSE; @@ -1142,41 +1147,41 @@ static void Task_MysteryGift(u8 taskId) // Start prompt to ask where to read one from if (!data->isWonderNews) { - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_DontHaveCardNewOneInput)) + if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveCardNewOneInput)) { - data->state = MG_STATE_LINK_PROMPT; + data->state = MG_STATE_SOURCE_PROMPT; PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); } } else { - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_DontHaveNewsNewOneInput)) + if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveNewsNewOneInput)) { - data->state = MG_STATE_LINK_PROMPT; + data->state = MG_STATE_SOURCE_PROMPT; PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); } } break; } - case MG_STATE_LINK_PROMPT: + case MG_STATE_SOURCE_PROMPT: if (!data->isWonderNews) AddTextPrinterToWindow1(gText_WhereShouldCardBeAccessed); else AddTextPrinterToWindow1(gText_WhereShouldNewsBeAccessed); - data->state = MG_STATE_LINK_PROMPT_INPUT; + data->state = MG_STATE_SOURCE_PROMPT_INPUT; break; - case MG_STATE_LINK_PROMPT_INPUT: + case MG_STATE_SOURCE_PROMPT_INPUT: // Choose where to access the Wonder Card/News from - switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->curPromptWindowId, TRUE)) + switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->var, TRUE)) { case 0: // "Wireless Communication" ClearTextWindow(); - data->state = MG_STATE_LINK_START; + data->state = MG_STATE_CLIENT_LINK_START; data->sourceIsFriend = FALSE; break; case 1: // "Friend" ClearTextWindow(); - data->state = MG_STATE_LINK_START; + data->state = MG_STATE_CLIENT_LINK_START; data->sourceIsFriend = TRUE; break; case LIST_CANCEL: @@ -1193,7 +1198,7 @@ static void Task_MysteryGift(u8 taskId) break; } break; - case MG_STATE_LINK_START: + case MG_STATE_CLIENT_LINK_START: *gStringVar1 = EOS; *gStringVar2 = EOS; *gStringVar3 = EOS; @@ -1213,149 +1218,153 @@ static void Task_MysteryGift(u8 taskId) CreateTask_LinkMysteryGiftOverWireless(ACTIVITY_WONDER_NEWS); break; } - data->state = MG_STATE_LINK_WAIT; + data->state = MG_STATE_CLIENT_LINK_WAIT; break; - case MG_STATE_LINK_WAIT: + case MG_STATE_CLIENT_LINK_WAIT: if (gReceivedRemoteLinkPlayers != 0) { ClearScreenInBg0(TRUE); - data->state = MG_STATE_COMMUNICATING; + data->state = MG_STATE_CLIENT_COMMUNICATING; MysteryGiftClient_Create(data->isWonderNews); } else if (gSpecialVar_Result == LINKUP_FAILED) { // Link failed, return to link start menu ClearScreenInBg0(TRUE); - data->state = MG_STATE_LINK_PROMPT; + data->state = MG_STATE_SOURCE_PROMPT; } break; - case MG_STATE_COMMUNICATING: + case MG_STATE_CLIENT_COMMUNICATING: AddTextPrinterToWindow1(gText_Communicating); - data->state = MG_STATE_COMMUNICATE; + data->state = MG_STATE_CLIENT_LINK; break; - case MG_STATE_COMMUNICATE: - switch (MysteryGiftClient_Run(&data->curPromptWindowId)) + case MG_STATE_CLIENT_LINK: + switch (MysteryGiftClient_Run(&data->var)) { case CLI_RET_END: Rfu_SetCloseLinkCallback(); - data->prevPromptWindowId = data->curPromptWindowId; - data->state = MG_STATE_LINK_COMPLETE_WAIT; + data->msgId = data->var; + data->state = MG_STATE_CLIENT_LINK_END; break; - case CLI_RET_5: - memcpy(data->buffer, mevent_client_get_buffer(), 0x40); + case CLI_RET_COPY_MSG: + memcpy(data->clientMsg, MysteryGiftClient_GetMsg(), 0x40); MysteryGiftClient_AdvanceState(); break; - case CLI_RET_3: - data->state = MG_STATE_10; + case CLI_RET_PRINT_MSG: + data->state = MG_STATE_CLIENT_MESSAGE; break; - case CLI_RET_2: - data->state = MG_STATE_9; + case CLI_RET_YES_NO: + data->state = MG_STATE_CLIENT_YES_NO; break; case CLI_RET_ASK_TOSS: - data->state = MG_STATE_LINK_ASK_TOSS; + data->state = MG_STATE_CLIENT_ASK_TOSS; StringCopy(gStringVar1, gLinkPlayers[0].name); break; } break; - case MG_STATE_9: - input = DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, FALSE, mevent_client_get_buffer()); + case MG_STATE_CLIENT_YES_NO: + input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, MysteryGiftClient_GetMsg()); switch (input) { case 0: // Yes - MysteryGiftClient_SetParam(0); + MysteryGiftClient_SetParam(FALSE); MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_COMMUNICATING; + data->state = MG_STATE_CLIENT_COMMUNICATING; break; case 1: // No case MENU_B_PRESSED: - MysteryGiftClient_SetParam(1); + MysteryGiftClient_SetParam(TRUE); MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_COMMUNICATING; + data->state = MG_STATE_CLIENT_COMMUNICATING; break; } break; - case MG_STATE_10: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, mevent_client_get_buffer())) + case MG_STATE_CLIENT_MESSAGE: + if (PrintMysteryGiftMenuMessage(&data->textState, MysteryGiftClient_GetMsg())) { MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_COMMUNICATING; + data->state = MG_STATE_CLIENT_COMMUNICATING; } break; - case MG_STATE_LINK_ASK_TOSS: - input = DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, FALSE, gText_ThrowAwayWonderCard); + case MG_STATE_CLIENT_ASK_TOSS: + // Player is receiving a new Wonder Card/News but needs to toss an existing one to make room. + // Ask for confirmation. + input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, gText_ThrowAwayWonderCard); switch (input) { case 0: // Yes - if (CheckReceivedGiftFromWonderCard() == TRUE) + if (IsSavedWonderCardGiftNotReceived() == TRUE) { - data->state = MG_STATE_LINK_ASK_TOSS_UNRECEIVED; + data->state = MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED; } else { - MysteryGiftClient_SetParam(0); + MysteryGiftClient_SetParam(FALSE); MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_COMMUNICATING; + data->state = MG_STATE_CLIENT_COMMUNICATING; } break; case 1: // No case MENU_B_PRESSED: - MysteryGiftClient_SetParam(1); + MysteryGiftClient_SetParam(TRUE); MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_COMMUNICATING; + data->state = MG_STATE_CLIENT_COMMUNICATING; break; } break; - case MG_STATE_LINK_ASK_TOSS_UNRECEIVED: - input = DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, FALSE, gText_HaventReceivedCardsGift); + case MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED: + // Player has selected to toss a Wonder Card that they haven't received the gift for. + // Ask for confirmation again. + input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, gText_HaventReceivedCardsGift); switch (input) { case 0: // Yes - MysteryGiftClient_SetParam(0); + MysteryGiftClient_SetParam(FALSE); MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_COMMUNICATING; + data->state = MG_STATE_CLIENT_COMMUNICATING; break; case 1: // No case MENU_B_PRESSED: - MysteryGiftClient_SetParam(1); + MysteryGiftClient_SetParam(TRUE); MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_COMMUNICATING; + data->state = MG_STATE_CLIENT_COMMUNICATING; break; } break; - case MG_STATE_LINK_COMPLETE_WAIT: + case MG_STATE_CLIENT_LINK_END: if (gReceivedRemoteLinkPlayers == 0) { DestroyWirelessStatusIndicatorSprite(); - data->state = MG_STATE_LINK_COMPLETED; + data->state = MG_STATE_CLIENT_COMM_COMPLETED; } break; - case MG_STATE_LINK_COMPLETED: + case MG_STATE_CLIENT_COMM_COMPLETED: if (PrintStringAndWait2Seconds(&data->textState, gText_CommunicationCompleted)) { if (data->sourceIsFriend == TRUE) StringCopy(gStringVar1, gLinkPlayers[0].name); - data->state = MG_STATE_LINK_RESULT_MSG; + data->state = MG_STATE_CLIENT_RESULT_MSG; } break; - case MG_STATE_LINK_RESULT_MSG: - msg = GetStdMessage(&receivedMsg, data->isWonderNews, data->sourceIsFriend, data->prevPromptWindowId); + case MG_STATE_CLIENT_RESULT_MSG: + msg = GetClientResultMessage(&successMsg, data->isWonderNews, data->sourceIsFriend, data->msgId); if (msg == NULL) - msg = data->buffer; - if (receivedMsg) - input = PrintSuccessMessage(&data->textState, msg, &data->curPromptWindowId); + msg = data->clientMsg; + if (successMsg) + input = PrintSuccessMessage(&data->textState, msg, &data->var); else - input = MG_PrintTextOnWindow1AndWaitButton(&data->textState, msg); + input = PrintMysteryGiftMenuMessage(&data->textState, msg); // input var re-used, here it is TRUE if the message is finished if (input) { - if (data->prevPromptWindowId == 3) + if (data->msgId == CLI_MSG_NEWS_RECEIVED) { if (data->sourceIsFriend == TRUE) - GenerateRandomNews(1); + GenerateRandomWonderNews(1); else - GenerateRandomNews(2); + GenerateRandomWonderNews(2); } - if (!receivedMsg) + if (!successMsg) { // Did not receive card/news, return to main menu data->state = MG_STATE_TO_MAIN_MENU; @@ -1368,7 +1377,7 @@ static void Task_MysteryGift(u8 taskId) } break; case MG_STATE_SAVE_LOAD_GIFT: - if (mevent_save_game(&data->textState)) + if (SaveOnMysteryGiftMenu(&data->textState)) data->state = MG_STATE_LOAD_GIFT; break; case MG_STATE_LOAD_GIFT: @@ -1404,17 +1413,17 @@ static void Task_MysteryGift(u8 taskId) u32 result; if (!data->isWonderNews) { - if (WonderCard_Test_Unk_08_6()) - result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->isWonderNews, FALSE); + if (IsSendingSavedWonderCardAllowed()) + result = HandleMysteryGiftListMenu(&data->textState, &data->var, data->isWonderNews, FALSE); else - result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->isWonderNews, TRUE); + result = HandleMysteryGiftListMenu(&data->textState, &data->var, data->isWonderNews, TRUE); } else { - if (WonderNews_Test_Unk_02()) - result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->isWonderNews, FALSE); + if (IsSendingSavedWonderNewsAllowed()) + result = HandleMysteryGiftListMenu(&data->textState, &data->var, data->isWonderNews, FALSE); else - result = HandleMysteryGiftListMenu(&data->textState, &data->curPromptWindowId, data->isWonderNews, TRUE); + result = HandleMysteryGiftListMenu(&data->textState, &data->var, data->isWonderNews, TRUE); } switch (result) { @@ -1436,11 +1445,11 @@ static void Task_MysteryGift(u8 taskId) break; } case MG_STATE_ASK_TOSS: - // Player is attempting to discard a Wonder Card/News - switch (AskDiscardGift(&data->textState, &data->curPromptWindowId, data->isWonderNews)) + // Player is attempting to discard a saved Wonder Card/News + switch (AskDiscardGift(&data->textState, &data->var, data->isWonderNews)) { case 0: // Yes - if (!data->isWonderNews && CheckReceivedGiftFromWonderCard() == TRUE) + if (!data->isWonderNews && IsSavedWonderCardGiftNotReceived() == TRUE) data->state = MG_STATE_ASK_TOSS_UNRECEIVED; else data->state = MG_STATE_TOSS; @@ -1454,7 +1463,7 @@ static void Task_MysteryGift(u8 taskId) case MG_STATE_ASK_TOSS_UNRECEIVED: // Player has selected to toss a Wonder Card that they haven't received the gift for. // Ask for confirmation again. - switch ((u32)DoMysteryGiftYesNo(&data->textState, &data->curPromptWindowId, TRUE, gText_HaventReceivedGiftOkayToDiscard)) + switch ((u32)DoMysteryGiftYesNo(&data->textState, &data->var, TRUE, gText_HaventReceivedGiftOkayToDiscard)) { case 0: // Yes data->state = MG_STATE_TOSS; @@ -1473,7 +1482,7 @@ static void Task_MysteryGift(u8 taskId) } break; case MG_STATE_TOSS_SAVE: - if (mevent_save_game(&data->textState)) + if (SaveOnMysteryGiftMenu(&data->textState)) data->state = MG_STATE_TOSSED; break; case MG_STATE_TOSSED: @@ -1489,7 +1498,7 @@ static void Task_MysteryGift(u8 taskId) break; case MG_STATE_RECEIVE: if (ExitWonderCardOrNews(data->isWonderNews, 1)) - data->state = MG_STATE_LINK_PROMPT; + data->state = MG_STATE_SOURCE_PROMPT; break; case MG_STATE_SEND: if (ExitWonderCardOrNews(data->isWonderNews, 1)) @@ -1504,14 +1513,14 @@ static void Task_MysteryGift(u8 taskId) break; } data->sourceIsFriend = TRUE; - data->state = MG_STATE_SEND_WAIT; + data->state = MG_STATE_SERVER_LINK_WAIT; } break; - case MG_STATE_SEND_WAIT: + case MG_STATE_SERVER_LINK_WAIT: if (gReceivedRemoteLinkPlayers != 0) { ClearScreenInBg0(1); - data->state = MG_STATE_SEND_START; + data->state = MG_STATE_SERVER_LINK_START; } else if (gSpecialVar_Result == LINKUP_FAILED) { @@ -1519,7 +1528,7 @@ static void Task_MysteryGift(u8 taskId) data->state = MG_STATE_LOAD_GIFT; } break; - case MG_STATE_SEND_START: + case MG_STATE_SERVER_LINK_START: *gStringVar1 = EOS; *gStringVar2 = EOS; *gStringVar3 = EOS; @@ -1527,40 +1536,40 @@ static void Task_MysteryGift(u8 taskId) if (!data->isWonderNews) { AddTextPrinterToWindow1(gText_SendingWonderCard); - mevent_srv_new_wcard(); + MysterGiftServer_CreateForCard(); } else { AddTextPrinterToWindow1(gText_SendingWonderNews); - mevent_srv_init_wnews(); + MysterGiftServer_CreateForNews(); } - data->state = MG_STATE_SENDING; + data->state = MG_STATE_SERVER_LINK; break; - case MG_STATE_SENDING: - if (mevent_srv_common_do_exec(&data->curPromptWindowId) == 3) + case MG_STATE_SERVER_LINK: + if (MysterGiftServer_Run(&data->var) == SVR_RET_END) { - data->prevPromptWindowId = data->curPromptWindowId; - data->state = MG_STATE_SEND_FINISH; + data->msgId = data->var; + data->state = MG_STATE_SERVER_LINK_END; } break; - case MG_STATE_SEND_FINISH: + case MG_STATE_SERVER_LINK_END: Rfu_SetCloseLinkCallback(); StringCopy(gStringVar1, gLinkPlayers[1].name); - data->state = MG_STATE_SEND_WAIT_END; + data->state = MG_STATE_SERVER_LINK_END_WAIT; break; - case MG_STATE_SEND_WAIT_END: + case MG_STATE_SERVER_LINK_END_WAIT: if (gReceivedRemoteLinkPlayers == 0) { DestroyWirelessStatusIndicatorSprite(); - data->state = MG_STATE_SEND_END; + data->state = MG_STATE_SERVER_RESULT_MSG; } break; - case MG_STATE_SEND_END: - if (PrintMGSendStatus(&data->textState, &data->curPromptWindowId, data->sourceIsFriend, data->prevPromptWindowId)) + case MG_STATE_SERVER_RESULT_MSG: + if (PrintServerResultMessage(&data->textState, &data->var, data->sourceIsFriend, data->msgId)) { - if (data->sourceIsFriend == TRUE && data->prevPromptWindowId == 3) + if (data->sourceIsFriend == TRUE && data->msgId == SVR_MSG_NEWS_SENT) { - GenerateRandomNews(3); + GenerateRandomWonderNews(3); data->state = MG_STATE_SAVE_LOAD_GIFT; } else @@ -1570,9 +1579,9 @@ static void Task_MysteryGift(u8 taskId) } } break; - case MG_STATE_LINK_ERROR_1: - case MG_STATE_LINK_ERROR_2: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, gText_CommunicationError)) + case MG_STATE_CLIENT_ERROR: + case MG_STATE_SERVER_ERROR: + if (PrintMysteryGiftMenuMessage(&data->textState, gText_CommunicationError)) { data->state = MG_STATE_TO_MAIN_MENU; PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); @@ -1580,7 +1589,7 @@ static void Task_MysteryGift(u8 taskId) break; case MG_STATE_EXIT: CloseLink(); - Free(data->buffer); + Free(data->clientMsg); DestroyTask(taskId); SetMainCallback2(MainCB_FreeAllBuffersAndReturnToInitTitleScreen); break; diff --git a/src/new_game.c b/src/new_game.c index 2a950efbc9..c4622820c4 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -200,7 +200,7 @@ void NewGameInitData(void) ResetAllApprenticeData(); ClearRankingHallRecords(); InitMatchCallCounters(); - sub_801AFD8(); + ClearMysteryGift(); WipeTrainerNameRecords(); ResetTrainerHillResults(); ResetContestLinkResults(); diff --git a/src/script.c b/src/script.c index 6c2115dee3..a3e223768e 100644 --- a/src/script.c +++ b/src/script.c @@ -3,6 +3,7 @@ #include "event_data.h" #include "mevent.h" #include "util.h" +#include "constants/maps.h" #include "constants/map_scripts.h" #define RAM_SCRIPT_MAGIC 51 @@ -403,9 +404,9 @@ bool32 ValidateSavedRamScript(void) struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data; if (scriptData->magic != RAM_SCRIPT_MAGIC) return FALSE; - if (scriptData->mapGroup != 0xFF) + if (scriptData->mapGroup != MAP_GROUP(UNDEFINED)) return FALSE; - if (scriptData->mapNum != 0xFF) + if (scriptData->mapNum != MAP_NUM(UNDEFINED)) return FALSE; if (scriptData->objectId != 0xFF) return FALSE; @@ -421,9 +422,9 @@ u8 *GetSavedRamScriptIfValid(void) return NULL; if (scriptData->magic != RAM_SCRIPT_MAGIC) return NULL; - if (scriptData->mapGroup != 0xFF) + if (scriptData->mapGroup != MAP_GROUP(UNDEFINED)) return NULL; - if (scriptData->mapNum != 0xFF) + if (scriptData->mapNum != MAP_NUM(UNDEFINED)) return NULL; if (scriptData->objectId != 0xFF) return NULL; @@ -442,5 +443,5 @@ void InitRamScript_NoObjectEvent(u8 *script, u16 scriptSize) { if (scriptSize > sizeof(gSaveBlock1Ptr->ramScript.data.script)) scriptSize = sizeof(gSaveBlock1Ptr->ramScript.data.script); - InitRamScript(script, scriptSize, 0xFF, 0xFF, 0xFF); + InitRamScript(script, scriptSize, MAP_GROUP(UNDEFINED), MAP_NUM(UNDEFINED), 0xFF); } diff --git a/src/trade.c b/src/trade.c index 60d999eddc..f51a9f6e96 100644 --- a/src/trade.c +++ b/src/trade.c @@ -19,7 +19,7 @@ #include "load_save.h" #include "mail.h" #include "main.h" -#include "mevent2.h" +#include "mevent.h" #include "mystery_gift.h" #include "overworld.h" #include "palette.h" @@ -4655,9 +4655,8 @@ static void CB2_SaveAndEndTrade(void) if (!InUnionRoom()) IncrementGameStat(GAME_STAT_POKEMON_TRADES); if (gWirelessCommType) - { - RecordIdOfWonderCardSenderByEventType(2, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); - } + TryIncrementMysteryGiftStat(CARD_STAT_NUM_TRADES, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); + SetContinueGameWarpStatusToDynamicWarp(); sub_8153380(); gMain.state++; diff --git a/src/union_room.c b/src/union_room.c index 37d2434dda..1a7ccc8e36 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1539,12 +1539,14 @@ static void Task_ExchangeCards(u8 taskId) { // Note: hasAllFrontierSymbols is a re-used field. // Here it is set by CreateTrainerCardInBuffer. + // If the player has a saved Wonder Card and it is the same Wonder Card + // as their partner then mystery gift stats are enabled. recvBuff = gBlockRecvBuffer[GetMultiplayerId() ^ 1]; - MEventHandleReceivedWonderCard(((struct TrainerCard *)recvBuff)->hasAllFrontierSymbols); + MysteryGift_TryEnableStatsByFlagId(((struct TrainerCard *)recvBuff)->hasAllFrontierSymbols); } else { - ResetReceivedWonderCardFlag(); + MysteryGift_DisableStats(); } ResetBlockReceivedFlags(); @@ -1640,7 +1642,7 @@ static void CreateTrainerCardInBuffer(void *dest, bool32 setWonderCard) static void Task_StartActivity(u8 taskId) { - ResetReceivedWonderCardFlag(); + MysteryGift_DisableStats(); switch (gPlayerCurrActivity) { case ACTIVITY_BATTLE_SINGLE: @@ -1937,7 +1939,7 @@ static void Task_SendMysteryGift(u8 taskId) } break; case 6: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_LinkWithFriendDropped)) + if (PrintMysteryGiftMenuMessage(&data->textState, sText_LinkWithFriendDropped)) { data->playerCount = LeaderPrunePlayerList(data->playerList); RedrawListMenu(data->listTaskId); @@ -2034,7 +2036,7 @@ static void Task_SendMysteryGift(u8 taskId) data->state++; break; case 14: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_PleaseStartOver)) + if (PrintMysteryGiftMenuMessage(&data->textState, sText_PleaseStartOver)) { DestroyTask(taskId); gSpecialVar_Result = LINKUP_FAILED; @@ -2212,7 +2214,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) data->state++; break; case 9: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sLinkDroppedTexts[RfuGetStatus()])) + if (PrintMysteryGiftMenuMessage(&data->textState, sLinkDroppedTexts[RfuGetStatus()])) { DestroyWirelessStatusIndicatorSprite(); DestroyTask(taskId); @@ -2380,7 +2382,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) data->state++; break; case 9: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_WirelessLinkDropped)) + if (PrintMysteryGiftMenuMessage(&data->textState, sText_WirelessLinkDropped)) { DestroyWirelessStatusIndicatorSprite(); DestroyTask(taskId); @@ -2389,7 +2391,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) } break; case 7: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sText_WirelessSearchCanceled)) + if (PrintMysteryGiftMenuMessage(&data->textState, sText_WirelessSearchCanceled)) { DestroyWirelessStatusIndicatorSprite(); DestroyTask(taskId); @@ -2398,7 +2400,7 @@ static void Task_CardOrNewsOverWireless(u8 taskId) } break; case 11: - if (MG_PrintTextOnWindow1AndWaitButton(&data->textState, sNoWonderSharedTexts[data->isWonderNews])) + if (PrintMysteryGiftMenuMessage(&data->textState, sNoWonderSharedTexts[data->isWonderNews])) { DestroyWirelessStatusIndicatorSprite(); DestroyTask(taskId); diff --git a/src/wonder_transfer.c b/src/wonder_transfer.c index 1c456ecb33..f2754fbff0 100644 --- a/src/wonder_transfer.c +++ b/src/wonder_transfer.c @@ -51,7 +51,7 @@ struct UnkStruct_203F3C8_02DC struct WonderCardData { /*0000*/ struct WonderCard card; - /*014c*/ struct MEventBuffer_3430 unk_014C; + /*014c*/ struct WonderCardMetadata cardMetadata; /*0170*/ const struct WonderGraphics * gfx; /*0174*/ u8 enterExitState; /*0175*/ u8 unk_0175; @@ -81,7 +81,14 @@ static const u8 sCard_TextColorTable[][3] = { {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}, {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY} }; -const u8 ALIGNED(4) sCard_TextYOffsets[3] = {7, 4, 7}; + +static const u8 ALIGNED(4) sCard_TextYOffsets[CARD_TYPE_COUNT] = +{ + [CARD_TYPE_GIFT] = 7, + [CARD_TYPE_STAMP] = 4, + [CARD_TYPE_LINK_STAT] = 7 +}; + static const struct WindowTemplate sCard_WindowTemplates[] = { [CARD_WIN_0] = { .bg = 1, @@ -176,21 +183,21 @@ static const struct WonderGraphics sCardGraphics[NUM_WONDER_BGS] = { {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 7, .tiles = sWonderCardBgGfx8, .map = sWonderCardBgTilemap8, .pal = sWonderCardBgPal8} }; -bool32 WonderCard_Init(struct WonderCard * card, struct MEventBuffer_3430 * r6) +bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * metadata) { - if (card == NULL || r6 == NULL) + if (card == NULL || metadata == NULL) return FALSE; sWonderCardData = AllocZeroed(sizeof(*sWonderCardData)); if (sWonderCardData == NULL) return FALSE; sWonderCardData->card = *card; - sWonderCardData->unk_014C = *r6; - if (sWonderCardData->card.bgType >= ARRAY_COUNT(sCardGraphics)) + sWonderCardData->cardMetadata = *metadata; + if (sWonderCardData->card.bgType >= NUM_WONDER_BGS) sWonderCardData->card.bgType = 0; - if (sWonderCardData->card.unk_08_0 >= ARRAY_COUNT(sCard_TextYOffsets)) - sWonderCardData->card.unk_08_0 = 0; - if (sWonderCardData->card.unk_09 > ARRAY_COUNT(sWonderCardData->unk_017D)) - sWonderCardData->card.unk_09 = 0; + if (sWonderCardData->card.type >= CARD_TYPE_COUNT) + sWonderCardData->card.type = 0; + if (sWonderCardData->card.maxStamps > ARRAY_COUNT(sWonderCardData->unk_017D)) + sWonderCardData->card.maxStamps = 0; sWonderCardData->gfx = &sCardGraphics[sWonderCardData->card.bgType]; return TRUE; } @@ -337,20 +344,20 @@ static void BufferCardText(void) } memcpy(sWonderCardData->unk_0288, sWonderCardData->card.unk_FA, WONDER_CARD_TEXT_LENGTH); sWonderCardData->unk_0288[WONDER_CARD_TEXT_LENGTH] = EOS; - switch (sWonderCardData->card.unk_08_0) + switch (sWonderCardData->card.type) { - case 0: + case CARD_TYPE_GIFT: memcpy(sWonderCardData->unk_02B1, sWonderCardData->card.unk_122, WONDER_CARD_TEXT_LENGTH); sWonderCardData->unk_02B1[WONDER_CARD_TEXT_LENGTH] = EOS; break; - case 1: + case CARD_TYPE_STAMP: sWonderCardData->unk_02B1[0] = EOS; break; - case 2: + case CARD_TYPE_LINK_STAT: sWonderCardData->unk_02B1[0] = EOS; - sp0[0] = sWonderCardData->unk_014C.unk_00 < 999 ? sWonderCardData->unk_014C.unk_00 : 999; - sp0[1] = sWonderCardData->unk_014C.unk_02 < 999 ? sWonderCardData->unk_014C.unk_02 : 999; - sp0[2] = sWonderCardData->unk_014C.unk_04 < 999 ? sWonderCardData->unk_014C.unk_04 : 999; + sp0[0] = sWonderCardData->cardMetadata.battlesWon < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesWon : MAX_WONDER_CARD_STAT; + sp0[1] = sWonderCardData->cardMetadata.battlesLost < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesLost : MAX_WONDER_CARD_STAT; + sp0[2] = sWonderCardData->cardMetadata.numTrades < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.numTrades : MAX_WONDER_CARD_STAT; for (i = 0; i < 8; i++) { memset(sWonderCardData->unk_02DC[i].unk_42, EOS, sizeof(sWonderCardData->unk_02DC[i].unk_42)); @@ -410,15 +417,15 @@ static void DrawCardWindow(u8 whichWindow) AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, sCard_TextColorTable[sWonderCardData->gfx->textPal2], 0, sWonderCardData->unk_01E4[sp0C]); break; case CARD_WIN_2: - AddTextPrinterParameterized3(windowId, 3, 0, sCard_TextYOffsets[sWonderCardData->card.unk_08_0], sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_0288); - if (sWonderCardData->card.unk_08_0 != 2) + AddTextPrinterParameterized3(windowId, 3, 0, sCard_TextYOffsets[sWonderCardData->card.type], sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_0288); + if (sWonderCardData->card.type != CARD_TYPE_LINK_STAT) { - AddTextPrinterParameterized3(windowId, 3, 0, 16 + sCard_TextYOffsets[sWonderCardData->card.unk_08_0], sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_02B1); + AddTextPrinterParameterized3(windowId, 3, 0, 16 + sCard_TextYOffsets[sWonderCardData->card.type], sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_02B1); } else { s32 x = 0; - s32 y = sCard_TextYOffsets[sWonderCardData->card.unk_08_0] + 16; + s32 y = sCard_TextYOffsets[sWonderCardData->card.type] + 16; s32 spacing = GetFontAttribute(3, FONTATTR_LETTER_SPACING); for (; sp0C < sWonderCardData->unk_0175; sp0C++) { @@ -438,26 +445,26 @@ static void DrawCardWindow(u8 whichWindow) static void CreateCardSprites(void) { - u8 r7 = 0; + u8 i = 0; sWonderCardData->monIconSpriteId = SPRITE_NONE; - if (sWonderCardData->unk_014C.unk_06 != SPECIES_NONE) + if (sWonderCardData->cardMetadata.iconSpecies != SPECIES_NONE) { - sWonderCardData->monIconSpriteId = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->unk_014C.unk_06), SpriteCallbackDummy, 220, 20, 0, FALSE); + sWonderCardData->monIconSpriteId = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->cardMetadata.iconSpecies), SpriteCallbackDummy, 220, 20, 0, FALSE); gSprites[sWonderCardData->monIconSpriteId].oam.priority = 2; } - if (sWonderCardData->card.unk_09 != 0 && sWonderCardData->card.unk_08_0 == 1) + if (sWonderCardData->card.maxStamps != 0 && sWonderCardData->card.type == CARD_TYPE_STAMP) { LoadCompressedSpriteSheetUsingHeap(&sSpriteSheet_IconShadow); LoadSpritePalette(&sSpritePalettes_IconShadow[sWonderCardData->gfx->textPal4]); - for (; r7 < sWonderCardData->card.unk_09; r7++) + for (; i < sWonderCardData->card.maxStamps; i++) { - sWonderCardData->unk_017D[r7][0] = SPRITE_NONE; - sWonderCardData->unk_017D[r7][1] = SPRITE_NONE; - sWonderCardData->unk_017D[r7][0] = CreateSprite(&sSpriteTemplate_IconShadow, 216 - 32 * r7, 144, 8); - if (sWonderCardData->unk_014C.unk_08[0][r7] != SPECIES_NONE) - sWonderCardData->unk_017D[r7][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->unk_014C.unk_08[0][r7]), + sWonderCardData->unk_017D[i][0] = SPRITE_NONE; + sWonderCardData->unk_017D[i][1] = SPRITE_NONE; + sWonderCardData->unk_017D[i][0] = CreateSprite(&sSpriteTemplate_IconShadow, 216 - 32 * i, 144, 8); + if (sWonderCardData->cardMetadata.stampData[0][i] != SPECIES_NONE) + sWonderCardData->unk_017D[i][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->cardMetadata.stampData[0][i]), SpriteCallbackDummy, - 216 - 32 * r7, + 216 - 32 * i, 136, 0, 0); } } @@ -465,17 +472,17 @@ static void CreateCardSprites(void) static void DestroyCardSprites(void) { - u8 r6 = 0; + u8 i = 0; if (sWonderCardData->monIconSpriteId != SPRITE_NONE) FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->monIconSpriteId]); - if (sWonderCardData->card.unk_09 != 0 && sWonderCardData->card.unk_08_0 == 1) + if (sWonderCardData->card.maxStamps != 0 && sWonderCardData->card.type == CARD_TYPE_STAMP) { - for (; r6 < sWonderCardData->card.unk_09; r6++) + for (; i < sWonderCardData->card.maxStamps; i++) { - if (sWonderCardData->unk_017D[r6][0] != SPRITE_NONE) - DestroySprite(&gSprites[sWonderCardData->unk_017D[r6][0]]); - if (sWonderCardData->unk_017D[r6][1] != SPRITE_NONE) - FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->unk_017D[r6][1]]); + if (sWonderCardData->unk_017D[i][0] != SPRITE_NONE) + DestroySprite(&gSprites[sWonderCardData->unk_017D[i][0]]); + if (sWonderCardData->unk_017D[i][1] != SPRITE_NONE) + FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->unk_017D[i][1]]); } FreeSpriteTilesByTag(TAG_ICON_SHADOW); FreeSpritePaletteByTag(TAG_ICON_SHADOW); From 356e6d7f084c8cd53258299759ad7ead9e12c7f3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 16 Oct 2021 23:58:11 -0400 Subject: [PATCH 065/417] Clean up mystery gift menu --- ...er.png => mystery_gift_textbox_border.png} | Bin src/mystery_gift.c | 233 +++++++++--------- 2 files changed, 122 insertions(+), 111 deletions(-) rename graphics/interface/{unk_textbox_border.png => mystery_gift_textbox_border.png} (100%) diff --git a/graphics/interface/unk_textbox_border.png b/graphics/interface/mystery_gift_textbox_border.png similarity index 100% rename from graphics/interface/unk_textbox_border.png rename to graphics/interface/mystery_gift_textbox_border.png diff --git a/src/mystery_gift.c b/src/mystery_gift.c index de0874d28e..2936f2c3a1 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -32,15 +32,18 @@ #include "mevent_server.h" #include "constants/cable_club.h" -void bgid_upload_textbox_1(u8 bgId); +#define LIST_MENU_TILE_NUM 10 +#define LIST_MENU_PAL_NUM 224 + +static void LoadMysteryGiftTextboxBorder(u8 bgId); static void CreateMysteryGiftTask(void); static void Task_MysteryGift(u8 taskId); -EWRAM_DATA u8 sDownArrowCounterAndYCoordIdx[8] = {}; +EWRAM_DATA static u8 sDownArrowCounterAndYCoordIdx[8] = {}; EWRAM_DATA bool8 gGiftIsFromEReader = FALSE; -static const u16 gUnkTextboxBorderPal[] = INCBIN_U16("graphics/interface/unk_textbox_border.gbapal"); -static const u32 gUnkTextboxBorderGfx[] = INCBIN_U32("graphics/interface/unk_textbox_border.4bpp.lz"); +static const u16 sTextboxBorder_Pal[] = INCBIN_U16("graphics/interface/mystery_gift_textbox_border.gbapal"); +static const u32 sTextboxBorder_Gfx[] = INCBIN_U32("graphics/interface/mystery_gift_textbox_border.4bpp.lz"); struct MysteryGiftTaskData { @@ -96,110 +99,110 @@ static const struct BgTemplate sBGTemplates[] = { static const struct WindowTemplate sMainWindows[] = { { - .bg = 0x00, - .tilemapLeft = 0x00, - .tilemapTop = 0x00, - .width = 0x1e, - .height = 0x02, - .paletteNum = 0x0c, + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 30, + .height = 2, + .paletteNum = 12, .baseBlock = 0x0013 }, { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x0f, - .width = 0x1c, - .height = 0x04, - .paletteNum = 0x0c, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 12, .baseBlock = 0x004f }, { - .bg = 0x00, - .tilemapLeft = 0x00, - .tilemapTop = 0x0f, - .width = 0x1e, - .height = 0x05, - .paletteNum = 0x0d, + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 15, + .width = 30, + .height = 5, + .paletteNum = 13, .baseBlock = 0x004f }, DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate sWindowTemplate_PromptYesOrNo_Width28 = { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x0f, - .width = 0x1c, - .height = 0x04, - .paletteNum = 0x0c, +static const struct WindowTemplate sWindowTemplate_YesNoMsg_Wide = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 12, .baseBlock = 0x00e5 }; -static const struct WindowTemplate sWindowTemplate_PromptYesOrNo_Width20 = { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x0f, - .width = 0x14, - .height = 0x04, - .paletteNum = 0x0c, +static const struct WindowTemplate sWindowTemplate_YesNoMsg = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 20, + .height = 4, + .paletteNum = 12, .baseBlock = 0x00e5 }; -static const struct WindowTemplate sMysteryGiftMenuWindowTemplate = { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x0f, - .width = 0x13, - .height = 0x04, - .paletteNum = 0x0c, +static const struct WindowTemplate sWindowTemplate_GiftSelect = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 19, + .height = 4, + .paletteNum = 12, .baseBlock = 0x00e5 }; static const struct WindowTemplate sWindowTemplate_ThreeOptions = { - .bg = 0x00, - .tilemapLeft = 0x08, - .tilemapTop = 0x06, - .width = 0x0e, - .height = 0x06, - .paletteNum = 0x0c, + .bg = 0, + .tilemapLeft = 8, + .tilemapTop = 6, + .width = 14, + .height = 6, + .paletteNum = 12, .baseBlock = 0x0155 }; static const struct WindowTemplate sWindowTemplate_YesNoBox = { - .bg = 0x00, - .tilemapLeft = 0x17, - .tilemapTop = 0x0f, - .width = 0x06, - .height = 0x04, - .paletteNum = 0x0c, + .bg = 0, + .tilemapLeft = 23, + .tilemapTop = 15, + .width = 6, + .height = 4, + .paletteNum = 12, .baseBlock = 0x0155 }; -static const struct WindowTemplate sWindowTemplate_7by8 = { - .bg = 0x00, - .tilemapLeft = 0x16, - .tilemapTop = 0x0b, - .width = 0x07, - .height = 0x08, - .paletteNum = 0x0c, +static const struct WindowTemplate sWindowTemplate_GiftSelect_3Options = { + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 11, + .width = 7, + .height = 8, + .paletteNum = 12, .baseBlock = 0x0155 }; -static const struct WindowTemplate sWindowTemplate_7by6 = { - .bg = 0x00, - .tilemapLeft = 0x16, - .tilemapTop = 0x0d, - .width = 0x07, - .height = 0x06, - .paletteNum = 0x0c, +static const struct WindowTemplate sWindowTemplate_GiftSelect_2Options = { + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 13, + .width = 7, + .height = 6, + .paletteNum = 12, .baseBlock = 0x0155 }; -static const struct WindowTemplate sWindowTemplate_7by4 = { - .bg = 0x00, - .tilemapLeft = 0x16, - .tilemapTop = 0x0f, - .width = 0x07, - .height = 0x04, - .paletteNum = 0x0c, +static const struct WindowTemplate sWindowTemplate_GiftSelect_1Option = { + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 15, + .width = 7, + .height = 4, + .paletteNum = 12, .baseBlock = 0x0155 }; @@ -240,24 +243,24 @@ static const struct ListMenuItem sListMenuItems_ReceiveSendToss[] = { { gText_Receive, 0 }, { gText_Send, 1 }, { gText_Toss, 2 }, - { gText_Cancel2, -2 } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuItem sListMenuItems_ReceiveToss[] = { { gText_Receive, 0 }, { gText_Toss, 2 }, - { gText_Cancel2, -2 } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuItem sListMenuItems_ReceiveSend[] = { { gText_Receive, 0 }, { gText_Send, 1 }, - { gText_Cancel2, -2 } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuItem sListMenuItems_Receive[] = { { gText_Receive, 0 }, - { gText_Cancel2, -2 } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuTemplate sListMenu_ReceiveSendToss = { @@ -351,9 +354,9 @@ static const u8 *const Unref_082F0710[] = { gText_ReturnToTitle }; -ALIGNED(2) const u8 sMG_Ereader_TextColor_1[] = { 0, 1, 2 }; -ALIGNED(2) const u8 sMG_Ereader_TextColor_1_Copy[] = { 0, 1, 2 }; -ALIGNED(2) const u8 sMG_Ereader_TextColor_2[] = { 1, 2, 3 }; +ALIGNED(2) static const u8 sTextColors_TopMenu[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +ALIGNED(2) static const u8 sTextColors_TopMenu_Copy[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +ALIGNED(2) static const u8 sMG_Ereader_TextColor_2[] = { TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY }; static void VBlankCB_MysteryGiftEReader(void) { @@ -398,7 +401,7 @@ static bool32 HandleMysteryGiftOrEReaderSetup(s32 isEReader) SetBgTilemapBuffer(1, Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(0, Alloc(BG_SCREEN_SIZE)); - bgid_upload_textbox_1(3); + LoadMysteryGiftTextboxBorder(3); InitWindows(sMainWindows); DeactivateAllTextPrinters(); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON); @@ -408,7 +411,7 @@ static bool32 HandleMysteryGiftOrEReaderSetup(s32 isEReader) gMain.state++; break; case 1: - LoadPalette(gUnkTextboxBorderPal, 0, 0x20); + LoadPalette(sTextboxBorder_Pal, 0, 0x20); LoadPalette(GetTextWindowPalette(2), 0xd0, 0x20); Menu_LoadStdPalAt(0xC0); LoadUserWindowBorderGfx(0, 0xA, 0xE0); @@ -487,8 +490,8 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 usePickOkCancel) options = gJPText_DecideStop; } - AddTextPrinterParameterized4(0, 1, 4, 1, 0, 0, sMG_Ereader_TextColor_1, -1, header); - AddTextPrinterParameterized4(0, 0, GetStringRightAlignXOffset(0, options, 0xDE), 1, 0, 0, sMG_Ereader_TextColor_1, -1, options); + AddTextPrinterParameterized4(0, 1, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header); + AddTextPrinterParameterized4(0, 0, GetStringRightAlignXOffset(0, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options); CopyWindowToVram(0, 2); PutWindowTilemap(0); } @@ -516,7 +519,7 @@ void MG_DrawCheckerboardPattern(u32 bg) } } -void ClearScreenInBg0(bool32 ignoreTopTwoRows) +static void ClearScreenInBg0(bool32 ignoreTopTwoRows) { switch (ignoreTopTwoRows) { @@ -547,6 +550,9 @@ static void ClearTextWindow(void) CopyWindowToVram(1, 1); } +#define DOWN_ARROW_X 208 +#define DOWN_ARROW_Y 20 + bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) { switch (*textState) @@ -556,12 +562,12 @@ bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) (*textState)++; break; case 1: - DrawDownArrow(1, 0xD0, 0x14, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); if (({JOY_NEW(A_BUTTON | B_BUTTON);})) (*textState)++; break; case 2: - DrawDownArrow(1, 0xD0, 0x14, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); *textState = 0; ClearTextWindow(); return TRUE; @@ -574,15 +580,16 @@ bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) static void HideDownArrow(void) { - DrawDownArrow(1, 0xD0, 0x14, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); } static void ShowDownArrow(void) { - DrawDownArrow(1, 0xD0, 0x14, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); } -bool32 unref_HideDownArrowAndWaitButton(u8 * textState) +// Unused +static bool32 HideDownArrowAndWaitButton(u8 * textState) { switch (*textState) { @@ -638,7 +645,7 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whi else windowTemplate.tilemapLeft = 0; - response = DoMysteryGiftListMenu(&windowTemplate, &listMenuTemplate, 1, 0x00A, 0xE0); + response = DoMysteryGiftListMenu(&windowTemplate, &listMenuTemplate, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); if (response != LIST_NOTHING_CHOSEN) { ClearWindowTilemap(2); @@ -655,11 +662,12 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c switch (*textState) { case 0: + // Print question message StringExpandPlaceholders(gStringVar4, str); if (yesNoBoxPlacement == 0) - *windowId = AddWindow(&sWindowTemplate_PromptYesOrNo_Width28); + *windowId = AddWindow(&sWindowTemplate_YesNoMsg_Wide); else - *windowId = AddWindow(&sWindowTemplate_PromptYesOrNo_Width20); + *windowId = AddWindow(&sWindowTemplate_YesNoMsg); FillWindowPixelBuffer(*windowId, 0x11); AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); @@ -668,6 +676,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c (*textState)++; break; case 1: + // Create Yes/No windowTemplate = sWindowTemplate_YesNoBox; if (yesNoBoxPlacement == 0) windowTemplate.tilemapTop = 9; @@ -677,6 +686,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c (*textState)++; break; case 2: + // Handle Yes/No input input = Menu_ProcessInputNoWrapClearOnChoose(); if (input == MENU_B_PRESSED || input == 0 || input == 1) { @@ -688,7 +698,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c return input; } break; - case (u8)MENU_B_PRESSED: + case 0xFF: *textState = 0; rbox_fill_rectangle(*windowId); ClearWindowTilemap(*windowId); @@ -701,7 +711,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c } // Handle the "Receive/Send/Toss" menu that appears when selecting Wonder Card/News -static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cannotToss, bool32 cannotSend) +static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotToss, bool32 cannotSend) { struct WindowTemplate windowTemplate; s32 input; @@ -709,11 +719,12 @@ static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cann switch (*textState) { case 0: + // Print menu message if (!cannotToss) StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithCards); else StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithNews); - *windowId = AddWindow(&sMysteryGiftMenuWindowTemplate); + *windowId = AddWindow(&sWindowTemplate_GiftSelect); FillWindowPixelBuffer(*windowId, 0x11); AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); @@ -726,16 +737,16 @@ static s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cann if (cannotSend) { if (!cannotToss) - input = DoMysteryGiftListMenu(&sWindowTemplate_7by6, &sListMenu_ReceiveToss, 1, 0x00A, 0xE0); + input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_2Options, &sListMenu_ReceiveToss, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); else - input = DoMysteryGiftListMenu(&sWindowTemplate_7by4, &sListMenu_Receive, 1, 0x00A, 0xE0); + input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_1Option, &sListMenu_Receive, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); } else { if (!cannotToss) - input = DoMysteryGiftListMenu(&sWindowTemplate_7by8, &sListMenu_ReceiveSendToss, 1, 0x00A, 0xE0); + input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_3Options, &sListMenu_ReceiveSendToss, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); else - input = DoMysteryGiftListMenu(&sWindowTemplate_7by6, &sListMenu_ReceiveSend, 1, 0x00A, 0xE0); + input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_2Options, &sListMenu_ReceiveSend, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); } if (input != LIST_NOTHING_CHOSEN) { @@ -1414,16 +1425,16 @@ static void Task_MysteryGift(u8 taskId) if (!data->isWonderNews) { if (IsSendingSavedWonderCardAllowed()) - result = HandleMysteryGiftListMenu(&data->textState, &data->var, data->isWonderNews, FALSE); + result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, FALSE); else - result = HandleMysteryGiftListMenu(&data->textState, &data->var, data->isWonderNews, TRUE); + result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, TRUE); } else { if (IsSendingSavedWonderNewsAllowed()) - result = HandleMysteryGiftListMenu(&data->textState, &data->var, data->isWonderNews, FALSE); + result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, FALSE); else - result = HandleMysteryGiftListMenu(&data->textState, &data->var, data->isWonderNews, TRUE); + result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, TRUE); } switch (result) { @@ -1519,12 +1530,12 @@ static void Task_MysteryGift(u8 taskId) case MG_STATE_SERVER_LINK_WAIT: if (gReceivedRemoteLinkPlayers != 0) { - ClearScreenInBg0(1); + ClearScreenInBg0(TRUE); data->state = MG_STATE_SERVER_LINK_START; } else if (gSpecialVar_Result == LINKUP_FAILED) { - ClearScreenInBg0(1); + ClearScreenInBg0(TRUE); data->state = MG_STATE_LOAD_GIFT; } break; @@ -1601,7 +1612,7 @@ u16 GetMysteryGiftBaseBlock(void) return 0x1A9; } -void bgid_upload_textbox_1(u8 bgId) +static void LoadMysteryGiftTextboxBorder(u8 bgId) { - DecompressAndLoadBgGfxUsingHeap(bgId, gUnkTextboxBorderGfx, 0x100, 0, 0); + DecompressAndLoadBgGfxUsingHeap(bgId, sTextboxBorder_Gfx, 0x100, 0, 0); } From c7d550e96c88477d0e44d957439077e8f457ff61 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 01:15:16 -0400 Subject: [PATCH 066/417] Clean up wonder card/news view --- include/constants/global.h | 2 + include/constants/mevent.h | 2 +- include/global.h | 18 +- include/mevent.h | 12 -- src/mystery_gift.c | 12 +- src/wonder_transfer.c | 393 +++++++++++++++++++++---------------- 6 files changed, 244 insertions(+), 195 deletions(-) diff --git a/include/constants/global.h b/include/constants/global.h index 518fe6bad7..7fca5453c5 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -89,6 +89,8 @@ #define QUIZ_QUESTION_LEN 9 #define WONDER_CARD_TEXT_LENGTH 40 #define WONDER_NEWS_TEXT_LENGTH 40 +#define WONDER_CARD_BODY_TEXT_LINES 4 +#define WONDER_NEWS_BODY_TEXT_LINES 10 #define MALE 0 #define FEMALE 1 diff --git a/include/constants/mevent.h b/include/constants/mevent.h index d659ffb14a..91eacd8011 100644 --- a/include/constants/mevent.h +++ b/include/constants/mevent.h @@ -13,7 +13,7 @@ #define CARD_STAT_NUM_STAMPS 3 #define CARD_STAT_MAX_STAMPS 4 -#define CARD_TYPE_GIFT 0 +#define CARD_TYPE_GIFT 0 // Normal "Wonder Card" #define CARD_TYPE_STAMP 1 // "Stamp Card" #define CARD_TYPE_LINK_STAT 2 // Referred to as the "Battle Card", shows battle and trade stats #define CARD_TYPE_COUNT 3 diff --git a/include/global.h b/include/global.h index a6071b2cd8..36fbfc38d3 100644 --- a/include/global.h +++ b/include/global.h @@ -850,24 +850,24 @@ struct WonderNews u16 unk_00; u8 sendType; // SEND_TYPE_* u8 bgType; - u8 unk_04[WONDER_NEWS_TEXT_LENGTH]; - u8 unk_2C[10][WONDER_NEWS_TEXT_LENGTH]; + u8 titleText[WONDER_NEWS_TEXT_LENGTH]; + u8 bodyText[WONDER_NEWS_BODY_TEXT_LINES][WONDER_NEWS_TEXT_LENGTH]; }; struct WonderCard { - u16 flagId; + u16 flagId; // Event flag (sReceivedGiftFlags) + WONDER_CARD_FLAG_OFFSET u16 iconSpecies; - u32 unk_04; + u32 idNumber; u8 type:2; // CARD_TYPE_* u8 bgType:4; u8 sendType:2; // SEND_TYPE_* u8 maxStamps; - u8 unk_0A[WONDER_CARD_TEXT_LENGTH]; - u8 unk_32[WONDER_CARD_TEXT_LENGTH]; - u8 unk_5A[4][WONDER_CARD_TEXT_LENGTH]; - u8 unk_FA[WONDER_CARD_TEXT_LENGTH]; - u8 unk_122[WONDER_CARD_TEXT_LENGTH]; + u8 titleText[WONDER_CARD_TEXT_LENGTH]; + u8 subtitleText[WONDER_CARD_TEXT_LENGTH]; + u8 bodyText[WONDER_CARD_BODY_TEXT_LINES][WONDER_CARD_TEXT_LENGTH]; + u8 footerLine1Text[WONDER_CARD_TEXT_LENGTH]; + u8 footerLine2Text[WONDER_CARD_TEXT_LENGTH]; }; struct WonderCardMetadata diff --git a/include/mevent.h b/include/mevent.h index 1297b4291d..9b7ef3ab53 100755 --- a/include/mevent.h +++ b/include/mevent.h @@ -4,18 +4,6 @@ #include "main.h" #include "constants/mevent.h" -struct MEvent_Str_1 -{ - u16 unk_000; - size_t unk_004; - const void * unk_008; -}; - -struct MEvent_Str_2 -{ - u8 fill_00[0x40]; -}; - struct MysteryGiftLinkGameData { u32 unk_00; diff --git a/src/mystery_gift.c b/src/mystery_gift.c index 2936f2c3a1..35bf8e9edf 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -209,13 +209,13 @@ static const struct WindowTemplate sWindowTemplate_GiftSelect_1Option = { static const struct ListMenuItem sListMenuItems_CardsOrNews[] = { { gText_WonderCards, 0 }, { gText_WonderNews, 1 }, - { gText_Exit3, -2 } + { gText_Exit3, LIST_CANCEL } }; static const struct ListMenuItem sListMenuItems_WirelessOrFriend[] = { { gText_WirelessCommunication, 0 }, { gText_Friend2, 1 }, - { gText_Cancel2, -2 } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = { @@ -243,24 +243,24 @@ static const struct ListMenuItem sListMenuItems_ReceiveSendToss[] = { { gText_Receive, 0 }, { gText_Send, 1 }, { gText_Toss, 2 }, - { gText_Cancel2, LIST_CANCEL } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuItem sListMenuItems_ReceiveToss[] = { { gText_Receive, 0 }, { gText_Toss, 2 }, - { gText_Cancel2, LIST_CANCEL } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuItem sListMenuItems_ReceiveSend[] = { { gText_Receive, 0 }, { gText_Send, 1 }, - { gText_Cancel2, LIST_CANCEL } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuItem sListMenuItems_Receive[] = { { gText_Receive, 0 }, - { gText_Cancel2, LIST_CANCEL } + { gText_Cancel2, LIST_CANCEL } }; static const struct ListMenuTemplate sListMenu_ReceiveSendToss = { diff --git a/src/wonder_transfer.c b/src/wonder_transfer.c index f2754fbff0..efabc460e5 100644 --- a/src/wonder_transfer.c +++ b/src/wonder_transfer.c @@ -19,10 +19,10 @@ struct WonderGraphics { - u8 textPal1:4; - u8 textPal2:4; - u8 textPal3:4; - u8 textPal4:4; + u8 titleTextPal:4; + u8 bodyTextPal:4; + u8 footerTextPal:4; // Card only + u8 stampShadowPal:4; // Card only const u32 * tiles; const u32 * map; const u16 * pal; @@ -33,19 +33,19 @@ struct WonderGraphics //====================== enum { - CARD_WIN_0, - CARD_WIN_1, - CARD_WIN_2, + CARD_WIN_HEADER, + CARD_WIN_BODY, + CARD_WIN_FOOTER, CARD_WIN_COUNT }; -#define TAG_ICON_SHADOW 0x8000 +#define TAG_STAMP_SHADOW 0x8000 -struct UnkStruct_203F3C8_02DC +struct CardStatTextData { - u8 unk_00; - u8 unk_01[WONDER_CARD_TEXT_LENGTH + 1]; - u8 unk_42[4]; + u8 width; + u8 statText[WONDER_CARD_TEXT_LENGTH + 1]; + u8 statNumberText[4]; }; struct WonderCardData @@ -54,18 +54,18 @@ struct WonderCardData /*014c*/ struct WonderCardMetadata cardMetadata; /*0170*/ const struct WonderGraphics * gfx; /*0174*/ u8 enterExitState; - /*0175*/ u8 unk_0175; + /*0175*/ u8 statFooterWidth; /*0176*/ u16 windowIds[CARD_WIN_COUNT]; /*017C*/ u8 monIconSpriteId; - /*017D*/ u8 unk_017D[7][2]; - /*018B*/ u8 unk_018B[WONDER_CARD_TEXT_LENGTH + 1]; - /*01B4*/ u8 unk_01B4[WONDER_CARD_TEXT_LENGTH + 1]; - /*01DD*/ u8 unk_01DD[7]; - /*01E4*/ u8 unk_01E4[4][WONDER_CARD_TEXT_LENGTH + 1]; - /*0288*/ u8 unk_0288[WONDER_CARD_TEXT_LENGTH + 1]; - /*02B1*/ u8 unk_02B1[WONDER_CARD_TEXT_LENGTH + 1]; - /*02DC*/ struct UnkStruct_203F3C8_02DC unk_02DC[8]; - /*045C*/ u8 buffer_045C[0x1000]; + /*017D*/ u8 stampSpriteIds[MAX_CARD_STAMPS][2]; // 2 sprites each, 1 for the shadw and 1 for the Pokémon + /*018B*/ u8 titleText[WONDER_CARD_TEXT_LENGTH + 1]; + /*01B4*/ u8 subtitleText[WONDER_CARD_TEXT_LENGTH + 1]; + /*01DD*/ u8 idNumberText[7]; + /*01E4*/ u8 bodyText[WONDER_CARD_BODY_TEXT_LINES][WONDER_CARD_TEXT_LENGTH + 1]; + /*0288*/ u8 footerLine1Text[WONDER_CARD_TEXT_LENGTH + 1]; + /*02B1*/ u8 giftText[WONDER_CARD_TEXT_LENGTH + 1]; + /*02DC*/ struct CardStatTextData statTextData[8]; + /*045C*/ u8 bgTilemapBuffer[0x1000]; }; EWRAM_DATA static struct WonderCardData * sWonderCardData = NULL; @@ -82,7 +82,7 @@ static const u8 sCard_TextColorTable[][3] = { {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY} }; -static const u8 ALIGNED(4) sCard_TextYOffsets[CARD_TYPE_COUNT] = +static const u8 ALIGNED(4) sCard_FooterTextOffsets[CARD_TYPE_COUNT] = { [CARD_TYPE_GIFT] = 7, [CARD_TYPE_STAMP] = 4, @@ -90,7 +90,7 @@ static const u8 ALIGNED(4) sCard_TextYOffsets[CARD_TYPE_COUNT] = }; static const struct WindowTemplate sCard_WindowTemplates[] = { - [CARD_WIN_0] = { + [CARD_WIN_HEADER] = { .bg = 1, .tilemapLeft = 1, .tilemapTop = 1, @@ -99,7 +99,7 @@ static const struct WindowTemplate sCard_WindowTemplates[] = { .paletteNum = 2, .baseBlock = 0x029c }, - [CARD_WIN_1] = { + [CARD_WIN_BODY] = { .bg = 1, .tilemapLeft = 1, .tilemapTop = 6, @@ -108,7 +108,7 @@ static const struct WindowTemplate sCard_WindowTemplates[] = { .paletteNum = 2, .baseBlock = 0x01bc }, - [CARD_WIN_2] = { + [CARD_WIN_FOOTER] = { .bg = 1, .tilemapLeft = 1, .tilemapTop = 14, @@ -147,24 +147,24 @@ static const u16 sIconShadowPal7[] = INCBIN_U16("graphics/wonder_card/icon static const u16 sIconShadowPal8[] = INCBIN_U16("graphics/wonder_card/icon_shadow_8.gbapal"); static const u32 sIconShadowGfx[] = INCBIN_U32("graphics/wonder_card/icon_shadow.4bpp.lz"); -static const struct CompressedSpriteSheet sSpriteSheet_IconShadow = { - sIconShadowGfx, 0x100, TAG_ICON_SHADOW +static const struct CompressedSpriteSheet sSpriteSheet_StampShadow = { + sIconShadowGfx, 0x100, TAG_STAMP_SHADOW }; -static const struct SpritePalette sSpritePalettes_IconShadow[] = { - {sIconShadowPal1, TAG_ICON_SHADOW}, - {sIconShadowPal2, TAG_ICON_SHADOW}, - {sIconShadowPal3, TAG_ICON_SHADOW}, - {sIconShadowPal4, TAG_ICON_SHADOW}, - {sIconShadowPal5, TAG_ICON_SHADOW}, - {sIconShadowPal6, TAG_ICON_SHADOW}, - {sIconShadowPal7, TAG_ICON_SHADOW}, - {sIconShadowPal8, TAG_ICON_SHADOW} +static const struct SpritePalette sSpritePalettes_StampShadow[] = { + {sIconShadowPal1, TAG_STAMP_SHADOW}, + {sIconShadowPal2, TAG_STAMP_SHADOW}, + {sIconShadowPal3, TAG_STAMP_SHADOW}, + {sIconShadowPal4, TAG_STAMP_SHADOW}, + {sIconShadowPal5, TAG_STAMP_SHADOW}, + {sIconShadowPal6, TAG_STAMP_SHADOW}, + {sIconShadowPal7, TAG_STAMP_SHADOW}, + {sIconShadowPal8, TAG_STAMP_SHADOW} }; static const struct SpriteTemplate sSpriteTemplate_IconShadow = { - .tileTag = TAG_ICON_SHADOW, - .paletteTag = TAG_ICON_SHADOW, + .tileTag = TAG_STAMP_SHADOW, + .paletteTag = TAG_STAMP_SHADOW, .oam = &gOamData_AffineOff_ObjNormal_32x16, .anims = gDummySpriteAnimTable, .images = NULL, @@ -173,14 +173,14 @@ static const struct SpriteTemplate sSpriteTemplate_IconShadow = { }; static const struct WonderGraphics sCardGraphics[NUM_WONDER_BGS] = { - {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 0, .tiles = sWonderCardBgGfx1, .map = sWonderCardBgTilemap1, .pal = sWonderCardBgPal1}, - {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 1, .tiles = sWonderCardBgGfx2, .map = sWonderCardBgTilemap2, .pal = sWonderCardBgPal2}, - {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 2, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal3}, - {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 3, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal4}, - {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 4, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal5}, - {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 5, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal6}, - {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 6, .tiles = sWonderCardBgGfx7, .map = sWonderCardBgTilemap7, .pal = sWonderCardBgPal7}, - {.textPal1 = 1, .textPal2 = 0, .textPal3 = 0, .textPal4 = 7, .tiles = sWonderCardBgGfx8, .map = sWonderCardBgTilemap8, .pal = sWonderCardBgPal8} + {.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 0, .tiles = sWonderCardBgGfx1, .map = sWonderCardBgTilemap1, .pal = sWonderCardBgPal1}, + {.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 1, .tiles = sWonderCardBgGfx2, .map = sWonderCardBgTilemap2, .pal = sWonderCardBgPal2}, + {.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 2, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal3}, + {.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 3, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal4}, + {.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 4, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal5}, + {.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 5, .tiles = sWonderCardBgGfx3, .map = sWonderCardBgTilemap3, .pal = sWonderCardBgPal6}, + {.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 6, .tiles = sWonderCardBgGfx7, .map = sWonderCardBgTilemap7, .pal = sWonderCardBgPal7}, + {.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 7, .tiles = sWonderCardBgGfx8, .map = sWonderCardBgTilemap8, .pal = sWonderCardBgPal8} }; bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * metadata) @@ -196,7 +196,7 @@ bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * met sWonderCardData->card.bgType = 0; if (sWonderCardData->card.type >= CARD_TYPE_COUNT) sWonderCardData->card.type = 0; - if (sWonderCardData->card.maxStamps > ARRAY_COUNT(sWonderCardData->unk_017D)) + if (sWonderCardData->card.maxStamps > MAX_CARD_STAMPS) sWonderCardData->card.maxStamps = 0; sWonderCardData->gfx = &sCardGraphics[sWonderCardData->card.bgType]; return TRUE; @@ -233,9 +233,9 @@ s32 WonderCard_Enter(void) CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); DecompressAndCopyTileDataToVram(2, sWonderCardData->gfx->tiles, 0, 0x008, 0); - sWonderCardData->windowIds[CARD_WIN_0] = AddWindow(&sCard_WindowTemplates[CARD_WIN_0]); - sWonderCardData->windowIds[CARD_WIN_1] = AddWindow(&sCard_WindowTemplates[CARD_WIN_1]); - sWonderCardData->windowIds[CARD_WIN_2] = AddWindow(&sCard_WindowTemplates[CARD_WIN_2]); + sWonderCardData->windowIds[CARD_WIN_HEADER] = AddWindow(&sCard_WindowTemplates[CARD_WIN_HEADER]); + sWonderCardData->windowIds[CARD_WIN_BODY] = AddWindow(&sCard_WindowTemplates[CARD_WIN_BODY]); + sWonderCardData->windowIds[CARD_WIN_FOOTER] = AddWindow(&sCard_WindowTemplates[CARD_WIN_FOOTER]); break; case 3: if (FreeTempTileDataBuffersIfPossible()) @@ -243,17 +243,17 @@ s32 WonderCard_Enter(void) LoadPalette(GetTextWindowPalette(1), 0x20, 0x20); gPaletteFade.bufferTransferDisabled = TRUE; LoadPalette(sWonderCardData->gfx->pal, 0x10, 0x20); - LZ77UnCompWram(sWonderCardData->gfx->map, sWonderCardData->buffer_045C); - CopyRectToBgTilemapBufferRect(2, sWonderCardData->buffer_045C, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0); + LZ77UnCompWram(sWonderCardData->gfx->map, sWonderCardData->bgTilemapBuffer); + CopyRectToBgTilemapBufferRect(2, sWonderCardData->bgTilemapBuffer, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0); CopyBgTilemapBufferToVram(2); break; case 4: BufferCardText(); break; case 5: - DrawCardWindow(CARD_WIN_0); - DrawCardWindow(CARD_WIN_1); - DrawCardWindow(CARD_WIN_2); + DrawCardWindow(CARD_WIN_HEADER); + DrawCardWindow(CARD_WIN_BODY); + DrawCardWindow(CARD_WIN_FOOTER); CopyBgTilemapBufferToVram(1); break; case 6: @@ -301,9 +301,9 @@ s32 WonderCard_Exit(bool32 flag) case 3: HideBg(1); HideBg(2); - RemoveWindow(sWonderCardData->windowIds[CARD_WIN_2]); - RemoveWindow(sWonderCardData->windowIds[CARD_WIN_1]); - RemoveWindow(sWonderCardData->windowIds[CARD_WIN_0]); + RemoveWindow(sWonderCardData->windowIds[CARD_WIN_FOOTER]); + RemoveWindow(sWonderCardData->windowIds[CARD_WIN_BODY]); + RemoveWindow(sWonderCardData->windowIds[CARD_WIN_HEADER]); break; case 4: DestroyCardSprites(); @@ -327,64 +327,84 @@ s32 WonderCard_Exit(bool32 flag) static void BufferCardText(void) { u16 i = 0; - u16 r6; - u16 sp0[3] = {0, 0, 0}; + u16 charsUntilStat; + u16 stats[3] = {0, 0, 0}; - memcpy(sWonderCardData->unk_018B, sWonderCardData->card.unk_0A, WONDER_CARD_TEXT_LENGTH); - sWonderCardData->unk_018B[WONDER_CARD_TEXT_LENGTH] = EOS; - memcpy(sWonderCardData->unk_01B4, sWonderCardData->card.unk_32, WONDER_CARD_TEXT_LENGTH); - sWonderCardData->unk_01B4[WONDER_CARD_TEXT_LENGTH] = EOS; - if (sWonderCardData->card.unk_04 > 999999) - sWonderCardData->card.unk_04 = 999999; - ConvertIntToDecimalStringN(sWonderCardData->unk_01DD, sWonderCardData->card.unk_04, STR_CONV_MODE_LEFT_ALIGN, 6); - for (i = 0; i < 4; i++) + // Copy title/subtitle text + memcpy(sWonderCardData->titleText, sWonderCardData->card.titleText, WONDER_CARD_TEXT_LENGTH); + sWonderCardData->titleText[WONDER_CARD_TEXT_LENGTH] = EOS; + memcpy(sWonderCardData->subtitleText, sWonderCardData->card.subtitleText, WONDER_CARD_TEXT_LENGTH); + sWonderCardData->subtitleText[WONDER_CARD_TEXT_LENGTH] = EOS; + + // Copy card id number + if (sWonderCardData->card.idNumber > 999999) + sWonderCardData->card.idNumber = 999999; + ConvertIntToDecimalStringN(sWonderCardData->idNumberText, sWonderCardData->card.idNumber, STR_CONV_MODE_LEFT_ALIGN, 6); + + // Copy body text + for (i = 0; i < WONDER_CARD_BODY_TEXT_LINES; i++) { - memcpy(sWonderCardData->unk_01E4[i], sWonderCardData->card.unk_5A[i], WONDER_CARD_TEXT_LENGTH); - sWonderCardData->unk_01E4[i][WONDER_CARD_TEXT_LENGTH] = EOS; + memcpy(sWonderCardData->bodyText[i], sWonderCardData->card.bodyText[i], WONDER_CARD_TEXT_LENGTH); + sWonderCardData->bodyText[i][WONDER_CARD_TEXT_LENGTH] = EOS; } - memcpy(sWonderCardData->unk_0288, sWonderCardData->card.unk_FA, WONDER_CARD_TEXT_LENGTH); - sWonderCardData->unk_0288[WONDER_CARD_TEXT_LENGTH] = EOS; + + // Copy footer line 1 + memcpy(sWonderCardData->footerLine1Text, sWonderCardData->card.footerLine1Text, WONDER_CARD_TEXT_LENGTH); + sWonderCardData->footerLine1Text[WONDER_CARD_TEXT_LENGTH] = EOS; + + // Copy footer line 2 switch (sWonderCardData->card.type) { case CARD_TYPE_GIFT: - memcpy(sWonderCardData->unk_02B1, sWonderCardData->card.unk_122, WONDER_CARD_TEXT_LENGTH); - sWonderCardData->unk_02B1[WONDER_CARD_TEXT_LENGTH] = EOS; + memcpy(sWonderCardData->giftText, sWonderCardData->card.footerLine2Text, WONDER_CARD_TEXT_LENGTH); + sWonderCardData->giftText[WONDER_CARD_TEXT_LENGTH] = EOS; break; case CARD_TYPE_STAMP: - sWonderCardData->unk_02B1[0] = EOS; + sWonderCardData->giftText[0] = EOS; break; case CARD_TYPE_LINK_STAT: - sWonderCardData->unk_02B1[0] = EOS; - sp0[0] = sWonderCardData->cardMetadata.battlesWon < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesWon : MAX_WONDER_CARD_STAT; - sp0[1] = sWonderCardData->cardMetadata.battlesLost < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesLost : MAX_WONDER_CARD_STAT; - sp0[2] = sWonderCardData->cardMetadata.numTrades < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.numTrades : MAX_WONDER_CARD_STAT; - for (i = 0; i < 8; i++) + sWonderCardData->giftText[0] = EOS; + + // Load stats + stats[0] = sWonderCardData->cardMetadata.battlesWon < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesWon : MAX_WONDER_CARD_STAT; + stats[1] = sWonderCardData->cardMetadata.battlesLost < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesLost : MAX_WONDER_CARD_STAT; + stats[2] = sWonderCardData->cardMetadata.numTrades < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.numTrades : MAX_WONDER_CARD_STAT; + + // Init stat text arrays + for (i = 0; i < ARRAY_COUNT(sWonderCardData->statTextData); i++) { - memset(sWonderCardData->unk_02DC[i].unk_42, EOS, sizeof(sWonderCardData->unk_02DC[i].unk_42)); - memset(sWonderCardData->unk_02DC[i].unk_01, EOS, sizeof(sWonderCardData->unk_02DC[i].unk_01)); + memset(sWonderCardData->statTextData[i].statNumberText, EOS, sizeof(sWonderCardData->statTextData[i].statNumberText)); + memset(sWonderCardData->statTextData[i].statText, EOS, sizeof(sWonderCardData->statTextData[i].statText)); } - for (i = 0, r6 = 0; i < WONDER_CARD_TEXT_LENGTH; i++) + + // Copy stat texts + for (i = 0, charsUntilStat = 0; i < WONDER_CARD_TEXT_LENGTH; i++) { - if (sWonderCardData->card.unk_122[i] != CHAR_DYNAMIC) + if (sWonderCardData->card.footerLine2Text[i] != CHAR_DYNAMIC) { - sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_01[r6] = sWonderCardData->card.unk_122[i]; - r6++; + // Regular text, just copy as is + sWonderCardData->statTextData[sWonderCardData->statFooterWidth].statText[charsUntilStat] = sWonderCardData->card.footerLine2Text[i]; + charsUntilStat++; } else { - u8 r3 = sWonderCardData->card.unk_122[i + 1]; - if (r3 > 2) + // Dynamic char encountered + // These are used to give the id of which stat to print + u8 id = sWonderCardData->card.footerLine2Text[i + 1]; + if (id >= ARRAY_COUNT(stats)) { + // Invalid stat id, skip ahead i += 2; } else { - ConvertIntToDecimalStringN(sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_42, sp0[r3], STR_CONV_MODE_LEADING_ZEROS, 3); - sWonderCardData->unk_02DC[sWonderCardData->unk_0175].unk_00 = sWonderCardData->card.unk_122[i + 2]; - sWonderCardData->unk_0175++; - if (sWonderCardData->unk_0175 > 7) + // Copy stat number + ConvertIntToDecimalStringN(sWonderCardData->statTextData[sWonderCardData->statFooterWidth].statNumberText, stats[id], STR_CONV_MODE_LEADING_ZEROS, 3); + sWonderCardData->statTextData[sWonderCardData->statFooterWidth].width = sWonderCardData->card.footerLine2Text[i + 2]; + sWonderCardData->statFooterWidth++; + if (sWonderCardData->statFooterWidth >= ARRAY_COUNT(sWonderCardData->statTextData)) break; - r6 = 0; + charsUntilStat = 0; i += 2; } } @@ -394,47 +414,66 @@ static void BufferCardText(void) static void DrawCardWindow(u8 whichWindow) { - s8 sp0C = 0; + s8 i = 0; s32 windowId = sWonderCardData->windowIds[whichWindow]; PutWindowTilemap(windowId); FillWindowPixelBuffer(windowId, 0); switch (whichWindow) { - case CARD_WIN_0: + case CARD_WIN_HEADER: { + // Print card title/subtitle s32 x; - AddTextPrinterParameterized3(windowId, 3, 0, 1, sCard_TextColorTable[sWonderCardData->gfx->textPal1], 0, sWonderCardData->unk_018B); - x = 160 - GetStringWidth(3, sWonderCardData->unk_01B4, GetFontAttribute(3, FONTATTR_LETTER_SPACING)); + AddTextPrinterParameterized3(windowId, 3, 0, 1, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->titleText); + x = 160 - GetStringWidth(3, sWonderCardData->subtitleText, GetFontAttribute(3, FONTATTR_LETTER_SPACING)); if (x < 0) x = 0; - AddTextPrinterParameterized3(windowId, 3, x, 17, sCard_TextColorTable[sWonderCardData->gfx->textPal1], 0, sWonderCardData->unk_01B4); - if (sWonderCardData->card.unk_04 != 0) - AddTextPrinterParameterized3(windowId, 1, 166, 17, sCard_TextColorTable[sWonderCardData->gfx->textPal1], 0, sWonderCardData->unk_01DD); + AddTextPrinterParameterized3(windowId, 3, x, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->subtitleText); + + // Print id number + if (sWonderCardData->card.idNumber != 0) + AddTextPrinterParameterized3(windowId, 1, 166, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->idNumberText); break; } - case CARD_WIN_1: - for (; sp0C < 4; sp0C++) - AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, sCard_TextColorTable[sWonderCardData->gfx->textPal2], 0, sWonderCardData->unk_01E4[sp0C]); + case CARD_WIN_BODY: + // Print body text + for (; i < WONDER_CARD_BODY_TEXT_LINES; i++) + AddTextPrinterParameterized3(windowId, 3, 0, 16 * i + 2, sCard_TextColorTable[sWonderCardData->gfx->bodyTextPal], 0, sWonderCardData->bodyText[i]); break; - case CARD_WIN_2: - AddTextPrinterParameterized3(windowId, 3, 0, sCard_TextYOffsets[sWonderCardData->card.type], sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_0288); + case CARD_WIN_FOOTER: + // Print footer line 1 + AddTextPrinterParameterized3(windowId, 3, 0, + sCard_FooterTextOffsets[sWonderCardData->card.type], + sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], + 0, sWonderCardData->footerLine1Text); + + // Print footer line 2 if (sWonderCardData->card.type != CARD_TYPE_LINK_STAT) { - AddTextPrinterParameterized3(windowId, 3, 0, 16 + sCard_TextYOffsets[sWonderCardData->card.type], sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_02B1); + // Print gift text + // Odd that CARD_TYPE_STAMP is not ignored, it has empty text for this + AddTextPrinterParameterized3(windowId, 3, 0, + 16 + sCard_FooterTextOffsets[sWonderCardData->card.type], + sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], + 0, sWonderCardData->giftText); } else { s32 x = 0; - s32 y = sCard_TextYOffsets[sWonderCardData->card.type] + 16; + s32 y = sCard_FooterTextOffsets[sWonderCardData->card.type] + 16; s32 spacing = GetFontAttribute(3, FONTATTR_LETTER_SPACING); - for (; sp0C < sWonderCardData->unk_0175; sp0C++) + for (; i < sWonderCardData->statFooterWidth; i++) { - AddTextPrinterParameterized3(windowId, 3, x, y, sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_01); - if (sWonderCardData->unk_02DC[sp0C].unk_42[0] != EOS) + // Print stat text + AddTextPrinterParameterized3(windowId, 3, x, y, sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->statTextData[i].statText); + if (sWonderCardData->statTextData[i].statNumberText[0] != EOS) { - x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_01, spacing); - AddTextPrinterParameterized3(windowId, 3, x, y, sCard_TextColorTable[sWonderCardData->gfx->textPal3], 0, sWonderCardData->unk_02DC[sp0C].unk_42); - x += GetStringWidth(3, sWonderCardData->unk_02DC[sp0C].unk_42, spacing) + sWonderCardData->unk_02DC[sp0C].unk_00; + // Print stat number + x += GetStringWidth(3, sWonderCardData->statTextData[i].statText, spacing); + AddTextPrinterParameterized3(windowId, 3, x, y, + sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], + 0, sWonderCardData->statTextData[i].statNumberText); + x += GetStringWidth(3, sWonderCardData->statTextData[i].statNumberText, spacing) + sWonderCardData->statTextData[i].width; } } } @@ -447,22 +486,26 @@ static void CreateCardSprites(void) { u8 i = 0; sWonderCardData->monIconSpriteId = SPRITE_NONE; + + // Create icon sprite if (sWonderCardData->cardMetadata.iconSpecies != SPECIES_NONE) { sWonderCardData->monIconSpriteId = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->cardMetadata.iconSpecies), SpriteCallbackDummy, 220, 20, 0, FALSE); gSprites[sWonderCardData->monIconSpriteId].oam.priority = 2; } + + // Create stamp sprites if (sWonderCardData->card.maxStamps != 0 && sWonderCardData->card.type == CARD_TYPE_STAMP) { - LoadCompressedSpriteSheetUsingHeap(&sSpriteSheet_IconShadow); - LoadSpritePalette(&sSpritePalettes_IconShadow[sWonderCardData->gfx->textPal4]); + LoadCompressedSpriteSheetUsingHeap(&sSpriteSheet_StampShadow); + LoadSpritePalette(&sSpritePalettes_StampShadow[sWonderCardData->gfx->stampShadowPal]); for (; i < sWonderCardData->card.maxStamps; i++) { - sWonderCardData->unk_017D[i][0] = SPRITE_NONE; - sWonderCardData->unk_017D[i][1] = SPRITE_NONE; - sWonderCardData->unk_017D[i][0] = CreateSprite(&sSpriteTemplate_IconShadow, 216 - 32 * i, 144, 8); - if (sWonderCardData->cardMetadata.stampData[0][i] != SPECIES_NONE) - sWonderCardData->unk_017D[i][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->cardMetadata.stampData[0][i]), + sWonderCardData->stampSpriteIds[i][0] = SPRITE_NONE; + sWonderCardData->stampSpriteIds[i][1] = SPRITE_NONE; + sWonderCardData->stampSpriteIds[i][0] = CreateSprite(&sSpriteTemplate_IconShadow, 216 - 32 * i, 144, 8); + if (sWonderCardData->cardMetadata.stampData[STAMP_SPECIES][i] != SPECIES_NONE) + sWonderCardData->stampSpriteIds[i][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->cardMetadata.stampData[STAMP_SPECIES][i]), SpriteCallbackDummy, 216 - 32 * i, 136, 0, 0); @@ -473,19 +516,23 @@ static void CreateCardSprites(void) static void DestroyCardSprites(void) { u8 i = 0; + + // Destroy icon sprite if (sWonderCardData->monIconSpriteId != SPRITE_NONE) FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->monIconSpriteId]); + + // Destroy stamp sprites if (sWonderCardData->card.maxStamps != 0 && sWonderCardData->card.type == CARD_TYPE_STAMP) { for (; i < sWonderCardData->card.maxStamps; i++) { - if (sWonderCardData->unk_017D[i][0] != SPRITE_NONE) - DestroySprite(&gSprites[sWonderCardData->unk_017D[i][0]]); - if (sWonderCardData->unk_017D[i][1] != SPRITE_NONE) - FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->unk_017D[i][1]]); + if (sWonderCardData->stampSpriteIds[i][0] != SPRITE_NONE) + DestroySprite(&gSprites[sWonderCardData->stampSpriteIds[i][0]]); + if (sWonderCardData->stampSpriteIds[i][1] != SPRITE_NONE) + FreeAndDestroyMonIconSprite(&gSprites[sWonderCardData->stampSpriteIds[i][1]]); } - FreeSpriteTilesByTag(TAG_ICON_SHADOW); - FreeSpritePaletteByTag(TAG_ICON_SHADOW); + FreeSpriteTilesByTag(TAG_STAMP_SHADOW); + FreeSpritePaletteByTag(TAG_STAMP_SHADOW); } } @@ -494,8 +541,8 @@ static void DestroyCardSprites(void) //====================== enum { - NEWS_WIN_0, - NEWS_WIN_1, + NEWS_WIN_TITLE, + NEWS_WIN_BODY, NEWS_WIN_COUNT }; @@ -515,11 +562,11 @@ struct WonderNewsData /*01c4*/ u16 scrollEnd; /*01c6*/ u16 scrollOffset; /*01c8*/ u16 windowIds[NEWS_WIN_COUNT]; - /*01cc*/ u8 filler_01CC[2]; - /*01ce*/ u8 unk_01CE[WONDER_NEWS_TEXT_LENGTH + 1]; - /*01f7*/ u8 unk_01F7[10][WONDER_NEWS_TEXT_LENGTH + 1]; + /*01cc*/ u8 unused[2]; + /*01ce*/ u8 titleText[WONDER_NEWS_TEXT_LENGTH + 1]; + /*01f7*/ u8 bodyText[WONDER_NEWS_BODY_TEXT_LINES][WONDER_NEWS_TEXT_LENGTH + 1]; /*0394*/ struct ScrollArrowsTemplate arrowsTemplate; - /*03a4*/ u8 buffer_03A4[0x1000]; + /*03a4*/ u8 bgTilemapBuffer[0x1000]; }; EWRAM_DATA static struct WonderNewsData * sWonderNewsData = NULL; @@ -534,7 +581,7 @@ static const u8 sNews_TextColorTable[][3] = { }; static const struct WindowTemplate sNews_WindowTemplates[] = { - [NEWS_WIN_0] = { + [NEWS_WIN_TITLE] = { .bg = 0, .tilemapLeft = 1, .tilemapTop = 0, @@ -543,7 +590,7 @@ static const struct WindowTemplate sNews_WindowTemplates[] = { .paletteNum = 2, .baseBlock = 0x2AC }, - [NEWS_WIN_1] = { + [NEWS_WIN_BODY] = { .bg = 2, .tilemapLeft = 1, .tilemapTop = 3, @@ -583,14 +630,14 @@ static const u32 sWonderNewsGfx8[] = INCBIN_U32("graphics/wonder_news/bg8.4b static const u32 sWonderNewsTilemap8[] = INCBIN_U32("graphics/wonder_news/bg8.bin.lz"); static const struct WonderGraphics sNewsGraphics[NUM_WONDER_BGS] = { - {1, 0, 0, 0, sWonderNewsGfx1, sWonderNewsTilemap1, sWonderNewsPal1}, - {1, 0, 0, 0, sWonderNewsGfx2, sWonderNewsTilemap2, sWonderCardBgPal2}, - {1, 0, 0, 0, sWonderNewsGfx3, sWonderNewsTilemap3, sWonderCardBgPal3}, - {1, 0, 0, 0, sWonderNewsGfx3, sWonderNewsTilemap3, sWonderCardBgPal4}, - {1, 0, 0, 0, sWonderNewsGfx3, sWonderNewsTilemap3, sWonderCardBgPal5}, - {1, 0, 0, 0, sWonderNewsGfx3, sWonderNewsTilemap3, sWonderCardBgPal6}, - {1, 0, 0, 0, sWonderNewsGfx7, sWonderNewsTilemap7, sWonderNewsPal7}, - {1, 0, 0, 0, sWonderNewsGfx8, sWonderNewsTilemap8, sWonderNewsPal8} + {.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx1, .map = sWonderNewsTilemap1, .pal = sWonderNewsPal1}, + {.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx2, .map = sWonderNewsTilemap2, .pal = sWonderCardBgPal2}, + {.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx3, .map = sWonderNewsTilemap3, .pal = sWonderCardBgPal3}, + {.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx3, .map = sWonderNewsTilemap3, .pal = sWonderCardBgPal4}, + {.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx3, .map = sWonderNewsTilemap3, .pal = sWonderCardBgPal5}, + {.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx3, .map = sWonderNewsTilemap3, .pal = sWonderCardBgPal6}, + {.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx7, .map = sWonderNewsTilemap7, .pal = sWonderNewsPal7}, + {.titleTextPal = 1, .bodyTextPal = 0, .tiles = sWonderNewsGfx8, .map = sWonderNewsTilemap8, .pal = sWonderNewsPal8} }; bool32 WonderNews_Init(const struct WonderNews * news) @@ -601,7 +648,7 @@ bool32 WonderNews_Init(const struct WonderNews * news) if (sWonderNewsData == NULL) return FALSE; sWonderNewsData->news = *news; - if (sWonderNewsData->news.bgType >= ARRAY_COUNT(sNewsGraphics)) + if (sWonderNewsData->news.bgType >= NUM_WONDER_BGS) sWonderNewsData->news.bgType = 0; sWonderNewsData->gfx = &sNewsGraphics[sWonderNewsData->news.bgType]; sWonderNewsData->arrowTaskId = TASK_NONE; @@ -651,8 +698,8 @@ s32 WonderNews_Enter(void) CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(3); DecompressAndCopyTileDataToVram(3, sWonderNewsData->gfx->tiles, 0, 8, 0); - sWonderNewsData->windowIds[NEWS_WIN_0] = AddWindow(&sNews_WindowTemplates[NEWS_WIN_0]); - sWonderNewsData->windowIds[NEWS_WIN_1] = AddWindow(&sNews_WindowTemplates[NEWS_WIN_1]); + sWonderNewsData->windowIds[NEWS_WIN_TITLE] = AddWindow(&sNews_WindowTemplates[NEWS_WIN_TITLE]); + sWonderNewsData->windowIds[NEWS_WIN_BODY] = AddWindow(&sNews_WindowTemplates[NEWS_WIN_BODY]); break; case 3: if (FreeTempTileDataBuffersIfPossible()) @@ -660,9 +707,9 @@ s32 WonderNews_Enter(void) LoadPalette(GetTextWindowPalette(1), 0x20, 0x20); gPaletteFade.bufferTransferDisabled = TRUE; LoadPalette(sWonderNewsData->gfx->pal, 0x10, 0x20); - LZ77UnCompWram(sWonderNewsData->gfx->map, sWonderNewsData->buffer_03A4); - CopyRectToBgTilemapBufferRect(1, sWonderNewsData->buffer_03A4, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0); - CopyRectToBgTilemapBufferRect(3, sWonderNewsData->buffer_03A4, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0); + LZ77UnCompWram(sWonderNewsData->gfx->map, sWonderNewsData->bgTilemapBuffer); + CopyRectToBgTilemapBufferRect(1, sWonderNewsData->bgTilemapBuffer, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0); + CopyRectToBgTilemapBufferRect(3, sWonderNewsData->bgTilemapBuffer, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(3); break; @@ -726,8 +773,8 @@ s32 WonderNews_Exit(bool32 flag) case 3: HideBg(1); HideBg(2); - RemoveWindow(sWonderNewsData->windowIds[NEWS_WIN_1]); - RemoveWindow(sWonderNewsData->windowIds[NEWS_WIN_0]); + RemoveWindow(sWonderNewsData->windowIds[NEWS_WIN_BODY]); + RemoveWindow(sWonderNewsData->windowIds[NEWS_WIN_TITLE]); break; case 4: ChangeBgY(2, 0, 0); @@ -819,13 +866,17 @@ u32 WonderNews_GetInput(u16 input) static void BufferNewsText(void) { u8 i = 0; - memcpy(sWonderNewsData->unk_01CE, sWonderNewsData->news.unk_04, WONDER_NEWS_TEXT_LENGTH); - sWonderNewsData->unk_01CE[WONDER_NEWS_TEXT_LENGTH] = EOS; - for (; i < 10; ++i) + + // Copy title text + memcpy(sWonderNewsData->titleText, sWonderNewsData->news.titleText, WONDER_NEWS_TEXT_LENGTH); + sWonderNewsData->titleText[WONDER_NEWS_TEXT_LENGTH] = EOS; + + // Copy body text + for (; i < WONDER_NEWS_BODY_TEXT_LINES; ++i) { - memcpy(sWonderNewsData->unk_01F7[i], sWonderNewsData->news.unk_2C[i], WONDER_NEWS_TEXT_LENGTH); - sWonderNewsData->unk_01F7[i][WONDER_NEWS_TEXT_LENGTH] = EOS; - if (i > 7 && sWonderNewsData->unk_01F7[i][0] != EOS) + memcpy(sWonderNewsData->bodyText[i], sWonderNewsData->news.bodyText[i], WONDER_NEWS_TEXT_LENGTH); + sWonderNewsData->bodyText[i][WONDER_NEWS_TEXT_LENGTH] = EOS; + if (i > 7 && sWonderNewsData->bodyText[i][0] != EOS) ++sWonderNewsData->scrollEnd; } sWonderNewsData->arrowsTemplate = sNews_ArrowsTemplate; @@ -836,18 +887,26 @@ static void DrawNewsWindows(void) { u8 i = 0; s32 x; - PutWindowTilemap(sWonderNewsData->windowIds[NEWS_WIN_0]); - PutWindowTilemap(sWonderNewsData->windowIds[NEWS_WIN_1]); - FillWindowPixelBuffer(sWonderNewsData->windowIds[NEWS_WIN_0], 0); - FillWindowPixelBuffer(sWonderNewsData->windowIds[NEWS_WIN_1], 0); - x = (224 - GetStringWidth(3, sWonderNewsData->unk_01CE, GetFontAttribute(3, FONTATTR_LETTER_SPACING))) / 2; + PutWindowTilemap(sWonderNewsData->windowIds[NEWS_WIN_TITLE]); + PutWindowTilemap(sWonderNewsData->windowIds[NEWS_WIN_BODY]); + FillWindowPixelBuffer(sWonderNewsData->windowIds[NEWS_WIN_TITLE], 0); + FillWindowPixelBuffer(sWonderNewsData->windowIds[NEWS_WIN_BODY], 0); + + // Print title text + x = (224 - GetStringWidth(3, sWonderNewsData->titleText, GetFontAttribute(3, FONTATTR_LETTER_SPACING))) / 2; if (x < 0) x = 0; - AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_0], 3, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->textPal1], 0, sWonderNewsData->unk_01CE); - for (; i < 10; ++i) - AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_1], 3, 0, 16 * i + 2, sNews_TextColorTable[sWonderNewsData->gfx->textPal2], 0, sWonderNewsData->unk_01F7[i]); - CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_0], 3); - CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_1], 3); + AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_TITLE], 3, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText); + + // Print body text + for (; i < WONDER_NEWS_BODY_TEXT_LINES; ++i) + AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_BODY], 3, 0, + 16 * i + 2, + sNews_TextColorTable[sWonderNewsData->gfx->bodyTextPal], + 0, sWonderNewsData->bodyText[i]); + + CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_TITLE], 3); + CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_BODY], 3); } static void UpdateNewsScroll(void) From 5f9069628d193b61b7601dc016509b91024ffa1b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 01:35:26 -0400 Subject: [PATCH 067/417] Clean up mevent2 --- include/constants/global.h | 2 ++ include/constants/mevent.h | 5 +++-- include/global.h | 4 ++-- include/mevent.h | 14 +++++++------ src/cable_club.c | 4 ++-- src/mevent2.c | 42 ++++++++++++++++++++++---------------- src/trade.c | 2 +- src/wonder_transfer.c | 4 ++-- 8 files changed, 44 insertions(+), 33 deletions(-) diff --git a/include/constants/global.h b/include/constants/global.h index 7fca5453c5..12d6178b2e 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -92,6 +92,8 @@ #define WONDER_CARD_BODY_TEXT_LINES 4 #define WONDER_NEWS_BODY_TEXT_LINES 10 +#define MAX_STAMP_CARD_STAMPS 7 + #define MALE 0 #define FEMALE 1 #define GENDER_COUNT 2 diff --git a/include/constants/mevent.h b/include/constants/mevent.h index 91eacd8011..636043fdba 100644 --- a/include/constants/mevent.h +++ b/include/constants/mevent.h @@ -13,11 +13,13 @@ #define CARD_STAT_NUM_STAMPS 3 #define CARD_STAT_MAX_STAMPS 4 +// Values for the type field of Wonder Card #define CARD_TYPE_GIFT 0 // Normal "Wonder Card" #define CARD_TYPE_STAMP 1 // "Stamp Card" #define CARD_TYPE_LINK_STAT 2 // Referred to as the "Battle Card", shows battle and trade stats #define CARD_TYPE_COUNT 3 +// Values for the sendType field of Wonder Card/News #define SEND_TYPE_DISALLOWED 0 #define SEND_TYPE_ALLOWED 1 #define SEND_TYPE_ALLOWED_ALWAYS 2 @@ -27,10 +29,9 @@ #define HAS_SAME_CARD 1 #define HAS_DIFF_CARD 2 +// The number of battles needed to be recorded on a Battle Card to win a prize #define REQUIRED_CARD_BATTLES 3 -#define MAX_CARD_STAMPS 7 - // Stamps are 32 bits. The first 16 bits are the species // and the second 16 bits are a number (presumably an ID of some kind) #define STAMP_SPECIES 0 diff --git a/include/global.h b/include/global.h index 36fbfc38d3..8681f7289b 100644 --- a/include/global.h +++ b/include/global.h @@ -847,7 +847,7 @@ struct WonderNewsMetadata struct WonderNews { - u16 unk_00; + u16 id; u8 sendType; // SEND_TYPE_* u8 bgType; u8 titleText[WONDER_NEWS_TEXT_LENGTH]; @@ -876,7 +876,7 @@ struct WonderCardMetadata u16 battlesLost; u16 numTrades; u16 iconSpecies; - u16 stampData[2][7]; + u16 stampData[2][MAX_STAMP_CARD_STAMPS]; // First element is STAMP_SPECIES, second is STAMP_ID }; struct MysteryGiftSave diff --git a/include/mevent.h b/include/mevent.h index 9b7ef3ab53..c3e14f1f3d 100755 --- a/include/mevent.h +++ b/include/mevent.h @@ -6,11 +6,13 @@ struct MysteryGiftLinkGameData { - u32 unk_00; - u16 unk_04; - u32 unk_08; - u16 unk_0C; - u32 unk_10; + // It's possible these first 5 fields had some other meaningful purpose, + // but they are only ever set when creating this data and read to validate it. + u32 validationVar; + u16 validationFlag1; + u32 validationFlag2; + u16 validationGiftType1; + u32 validationGiftType2; u16 flagId; u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; struct WonderCardMetadata cardMetadata; @@ -50,6 +52,6 @@ u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *da u16 MysteryGift_GetCardStat(u32 stat); void MysteryGift_DisableStats(void); bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId); -void TryIncrementMysteryGiftStat(u32 stat, u32 trainerId); +void MysteryGift_TryIncrementStat(u32 stat, u32 trainerId); #endif //GUARD_MEVENT_H diff --git a/src/cable_club.c b/src/cable_club.c index e9100b0112..69fcb660b5 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -1004,10 +1004,10 @@ void CB2_ReturnFromCableClubBattle(void) switch (gBattleOutcome) { case B_OUTCOME_WON: - TryIncrementMysteryGiftStat(CARD_STAT_BATTLES_WON, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); + MysteryGift_TryIncrementStat(CARD_STAT_BATTLES_WON, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); break; case B_OUTCOME_LOST: - TryIncrementMysteryGiftStat(CARD_STAT_BATTLES_LOST, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); + MysteryGift_TryIncrementStat(CARD_STAT_BATTLES_LOST, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); break; } } diff --git a/src/mevent2.c b/src/mevent2.c index d781e21197..36652f44e0 100755 --- a/src/mevent2.c +++ b/src/mevent2.c @@ -83,9 +83,9 @@ bool32 ValidateSavedWonderNews(void) return TRUE; } -static bool32 ValidateWonderNews(const struct WonderNews *data) +static bool32 ValidateWonderNews(const struct WonderNews *news) { - if (data->unk_00 == 0) + if (news->id == 0) return FALSE; return TRUE; @@ -93,8 +93,8 @@ static bool32 ValidateWonderNews(const struct WonderNews *data) bool32 IsSendingSavedWonderNewsAllowed(void) { - const struct WonderNews *data = &gSaveBlock1Ptr->mysteryGift.news; - if (data->sendType == SEND_TYPE_DISALLOWED) + const struct WonderNews *news = &gSaveBlock1Ptr->mysteryGift.news; + if (news->sendType == SEND_TYPE_DISALLOWED) return FALSE; return TRUE; @@ -177,7 +177,7 @@ static bool32 ValidateWonderCard(const struct WonderCard *card) return FALSE; if (card->bgType >= NUM_WONDER_BGS) return FALSE; - if (card->maxStamps > MAX_CARD_STAMPS) + if (card->maxStamps > MAX_STAMP_CARD_STAMPS) return FALSE; return TRUE; @@ -339,23 +339,29 @@ bool32 MysteryGift_TrySaveStamp(const u16 *stamp) return FALSE; } +#define GAME_DATA_VALID_VAR 0x101 +#define GAME_DATA_VALID_GIFT_TYPE_1 (1 << 2) +#define GAME_DATA_VALID_GIFT_TYPE_2 (1 << 9) + void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 isWonderNews) { int i; CpuFill32(0, data, sizeof(*data)); - data->unk_00 = 0x101; - data->unk_04 = 1; - data->unk_08 = 1; + data->validationVar = GAME_DATA_VALID_VAR; + data->validationFlag1 = 1; + data->validationFlag2 = 1; if (isWonderNews) { - data->unk_0C = 5; - data->unk_10 = 0x0201; + // Despite setting these for News, they are + // only ever checked for Cards + data->validationGiftType1 = GAME_DATA_VALID_GIFT_TYPE_1 | 1; + data->validationGiftType2 = GAME_DATA_VALID_GIFT_TYPE_2 | 1; } else // Wonder Card { - data->unk_0C = 4; - data->unk_10 = 0x0200; + data->validationGiftType1 = GAME_DATA_VALID_GIFT_TYPE_1; + data->validationGiftType2 = GAME_DATA_VALID_GIFT_TYPE_2; } if (ValidateSavedWonderCard()) @@ -383,21 +389,21 @@ void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 i bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 forNews) { - if (data->unk_00 != 0x101) + if (data->validationVar != GAME_DATA_VALID_VAR) return FALSE; - if (!(data->unk_04 & 1)) + if (!(data->validationFlag1 & 1)) return FALSE; - if (!(data->unk_08 & 1)) + if (!(data->validationFlag2 & 1)) return FALSE; if (!forNews) { - if (!(data->unk_0C & 4)) + if (!(data->validationGiftType1 & GAME_DATA_VALID_GIFT_TYPE_1)) return FALSE; - if (!(data->unk_10 & 0x380)) + if (!(data->validationGiftType2 & (GAME_DATA_VALID_GIFT_TYPE_2 | 0x180))) return FALSE; } @@ -581,7 +587,7 @@ bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId) return TRUE; } -void TryIncrementMysteryGiftStat(u32 stat, u32 trainerId) +void MysteryGift_TryIncrementStat(u32 stat, u32 trainerId) { if (sStatsEnabled) { diff --git a/src/trade.c b/src/trade.c index f51a9f6e96..acae292e58 100644 --- a/src/trade.c +++ b/src/trade.c @@ -4655,7 +4655,7 @@ static void CB2_SaveAndEndTrade(void) if (!InUnionRoom()) IncrementGameStat(GAME_STAT_POKEMON_TRADES); if (gWirelessCommType) - TryIncrementMysteryGiftStat(CARD_STAT_NUM_TRADES, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); + MysteryGift_TryIncrementStat(CARD_STAT_NUM_TRADES, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); SetContinueGameWarpStatusToDynamicWarp(); sub_8153380(); diff --git a/src/wonder_transfer.c b/src/wonder_transfer.c index efabc460e5..d958b8aef9 100644 --- a/src/wonder_transfer.c +++ b/src/wonder_transfer.c @@ -57,7 +57,7 @@ struct WonderCardData /*0175*/ u8 statFooterWidth; /*0176*/ u16 windowIds[CARD_WIN_COUNT]; /*017C*/ u8 monIconSpriteId; - /*017D*/ u8 stampSpriteIds[MAX_CARD_STAMPS][2]; // 2 sprites each, 1 for the shadw and 1 for the Pokémon + /*017D*/ u8 stampSpriteIds[MAX_STAMP_CARD_STAMPS][2]; // 2 sprites each, 1 for the shadw and 1 for the Pokémon /*018B*/ u8 titleText[WONDER_CARD_TEXT_LENGTH + 1]; /*01B4*/ u8 subtitleText[WONDER_CARD_TEXT_LENGTH + 1]; /*01DD*/ u8 idNumberText[7]; @@ -196,7 +196,7 @@ bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * met sWonderCardData->card.bgType = 0; if (sWonderCardData->card.type >= CARD_TYPE_COUNT) sWonderCardData->card.type = 0; - if (sWonderCardData->card.maxStamps > MAX_CARD_STAMPS) + if (sWonderCardData->card.maxStamps > MAX_STAMP_CARD_STAMPS) sWonderCardData->card.maxStamps = 0; sWonderCardData->gfx = &sCardGraphics[sWonderCardData->card.bgType]; return TRUE; From 3cd27acbea87007fdb041035919c5b8a1b4bafcc Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 02:09:31 -0400 Subject: [PATCH 068/417] Document wonder news --- data/specials.inc | 2 +- include/constants/vars.h | 2 +- include/global.h | 8 +- include/mevent_news.h | 10 ++- src/mevent_news.c | 174 +++++++++++++++++++++------------------ src/mystery_gift.c | 6 +- 6 files changed, 111 insertions(+), 91 deletions(-) diff --git a/data/specials.inc b/data/specials.inc index 85c9251c6d..b8d7f232ce 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -430,7 +430,7 @@ gSpecials:: def_special ShowWirelessCommunicationScreen def_special InitUnionRoom def_special BufferUnionRoomPlayerName - def_special sub_801DC20 + def_special RetrieveWonderNewsVal def_special ChooseMonForWirelessMinigame def_special Script_ResetUnionRoomTrade def_special IsBadEggInParty diff --git a/include/constants/vars.h b/include/constants/vars.h index e57b021854..8128b6f321 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -60,7 +60,7 @@ #define VAR_POISON_STEP_COUNTER 0x402B #define VAR_RESET_RTC_ENABLE 0x402C #define VAR_ENIGMA_BERRY_AVAILABLE 0x402D -#define VAR_0x402E 0x402E +#define VAR_WONDER_NEWS_COUNTER 0x402E #define VAR_FRONTIER_MANIAC_FACILITY 0x402F #define VAR_FRONTIER_GAMBLER_CHALLENGE 0x4030 diff --git a/include/global.h b/include/global.h index 8681f7289b..d82ea875e0 100644 --- a/include/global.h +++ b/include/global.h @@ -839,10 +839,10 @@ struct SaveTrainerHill struct WonderNewsMetadata { - u8 unk_0_0:2; - u8 unk_0_2:3; - u8 unk_0_5:3; - u8 unk_1; + u8 newsType:2; + u8 sentCounter:3; + u8 getCounter:3; + u8 rand; }; struct WonderNews diff --git a/include/mevent_news.h b/include/mevent_news.h index 7b4657e146..b0a0b8f077 100755 --- a/include/mevent_news.h +++ b/include/mevent_news.h @@ -1,7 +1,15 @@ #ifndef GUARD_MEVENT_NEWS_H #define GUARD_MEVENT_NEWS_H +enum { + WONDER_NEWS_NONE, + WONDER_NEWS_RECV_FRIEND, + WONDER_NEWS_RECV_WIRELESS, + WONDER_NEWS_SENT, +}; + + void InitSavedWonderNews(void); -void GenerateRandomWonderNews(u32 a0); +void GenerateRandomWonderNews(u32 newsType); #endif //GUARD_MEVENT_NEWS_H diff --git a/src/mevent_news.c b/src/mevent_news.c index 0fbb9452d6..27b22566d7 100644 --- a/src/mevent_news.c +++ b/src/mevent_news.c @@ -4,27 +4,43 @@ #include "event_data.h" #include "mevent_news.h" -static u32 sub_801DCAC(struct WonderNewsMetadata *); -static void sub_801DD10(struct WonderNewsMetadata *); -static u32 sub_801DD44(struct WonderNewsMetadata *); -static void sub_801DCD8(struct WonderNewsMetadata *); -static void sub_801DCCC(struct WonderNewsMetadata *); +/* + Wonder News related functions. + Because this feature is largely unused, the names in here are + mostly nebulous and without a real indication of purpose. +*/ -void GenerateRandomWonderNews(u32 a0) +enum { + NEWS_VAL_INVALID, + NEWS_VAL_RECV_FRIEND, + NEWS_VAL_RECV_WIRELESS, + NEWS_VAL_NONE, + NEWS_VAL_SENT, + NEWS_VAL_SENT_MAX, + NEWS_VAL_GET_MAX, +}; + +static u32 GetNewsId(struct WonderNewsMetadata *); +static void IncrementGetNewsCounter(struct WonderNewsMetadata *); +static u32 GetNewsValByNewsType(struct WonderNewsMetadata *); +static void IncrementSentNewsCounter(struct WonderNewsMetadata *); +static void ResetSentNewsCounter(struct WonderNewsMetadata *); + +void GenerateRandomWonderNews(u32 newsType) { struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata(); - data->unk_0_0 = a0; - switch (a0) + data->newsType = newsType; + switch (newsType) { - case 0: + case WONDER_NEWS_NONE: break; - case 1: - case 2: - data->unk_1 = (Random() % 15) + 16; + case WONDER_NEWS_RECV_FRIEND: + case WONDER_NEWS_RECV_WIRELESS: + data->rand = (Random() % 15) + 16; break; - case 3: - data->unk_1 = (Random() % 15) + 1; + case WONDER_NEWS_SENT: + data->rand = (Random() % 15) + 1; break; } } @@ -33,116 +49,112 @@ void InitSavedWonderNews(void) { struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata(); - data->unk_0_0 = 0; - data->unk_0_2 = 0; - data->unk_0_5 = 0; - data->unk_1 = 0; - VarSet(VAR_0x402E, 0); + data->newsType = WONDER_NEWS_NONE; + data->sentCounter = 0; + data->getCounter = 0; + data->rand = 0; + VarSet(VAR_WONDER_NEWS_COUNTER, 0); } -void sub_801DBDC(void) +// Unused +static void TryIncrementWonderNewsVar(void) { - u16 *r4 = GetVarPointer(VAR_0x402E); + u16 *var = GetVarPointer(VAR_WONDER_NEWS_COUNTER); struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata(); - struct WonderNewsMetadata r0 = *data; - if ((u8)r0.unk_0_5 > 4 && ++(*r4) > 0x1f3) + if (data->getCounter > 4 && ++(*var) >= 500) { - data->unk_0_5 = 0; - *r4 = 0; + data->getCounter = 0; + *var = 0; } } // Unused -u16 sub_801DC20(void) +u16 RetrieveWonderNewsVal(void) { - u16 *r6 = &gSpecialVar_Result; + u16 *result = &gSpecialVar_Result; struct WonderNewsMetadata *data = GetSavedWonderNewsMetadata(); - u16 r5; + u16 newsVal; + // Checks if Mystery Event is enabled, not Mystery Gift? if (!IsMysteryEventEnabled() || !ValidateSavedWonderNews()) return 0; - r5 = sub_801DD44(data); + newsVal = GetNewsValByNewsType(data); - switch (r5) + switch (newsVal) { - case 0: + case NEWS_VAL_RECV_FRIEND: + *result = GetNewsId(data); break; - case 1: - *r6 = sub_801DCAC(data); + case NEWS_VAL_RECV_WIRELESS: + *result = GetNewsId(data); break; - case 2: - *r6 = sub_801DCAC(data); + case NEWS_VAL_SENT: + *result = GetNewsId(data); + IncrementSentNewsCounter(data); break; - case 3: + case NEWS_VAL_SENT_MAX: + *result = GetNewsId(data); + ResetSentNewsCounter(data); break; - case 4: - *r6 = sub_801DCAC(data); - sub_801DCD8(data); - break; - case 5: - *r6 = sub_801DCAC(data); - sub_801DCCC(data); - break; - case 6: + case NEWS_VAL_INVALID: + case NEWS_VAL_NONE: + case NEWS_VAL_GET_MAX: break; } - return r5; + return newsVal; } -static u32 sub_801DCAC(struct WonderNewsMetadata *data) +static u32 GetNewsId(struct WonderNewsMetadata *data) { - u32 r4; - - data->unk_0_0 = 0; - r4 = data->unk_1 + 0x84; - data->unk_1 = 0; - sub_801DD10(data); - return r4; + u32 id; + data->newsType = WONDER_NEWS_NONE; + id = data->rand + 132; + data->rand = 0; + IncrementGetNewsCounter(data); + return id; } -static void sub_801DCCC(struct WonderNewsMetadata *data) +static void ResetSentNewsCounter(struct WonderNewsMetadata *data) { - data->unk_0_2 = 0; + data->sentCounter = 0; } -static void sub_801DCD8(struct WonderNewsMetadata *data) +static void IncrementSentNewsCounter(struct WonderNewsMetadata *data) { - data->unk_0_2++; - if ((u8)data->unk_0_2 > 4) - data->unk_0_2 = 4; + data->sentCounter++; + if (data->sentCounter > 4) + data->sentCounter = 4; } -static void sub_801DD10(struct WonderNewsMetadata *data) +static void IncrementGetNewsCounter(struct WonderNewsMetadata *data) { - data->unk_0_5++; - if ((u8)data->unk_0_5 > 5) - data->unk_0_5 = 5; + data->getCounter++; + if (data->getCounter > 5) + data->getCounter = 5; } -static u32 sub_801DD44(struct WonderNewsMetadata *data) +static u32 GetNewsValByNewsType(struct WonderNewsMetadata *data) { - struct WonderNewsMetadata r0; - if ((u8)data->unk_0_5 == 5) - return 6; + if (data->getCounter == 5) + return NEWS_VAL_GET_MAX; - r0 = *data; - switch (r0.unk_0_0) + switch (data->newsType) { - case 0: - return 3; - case 1: - return 1; - case 2: - return 2; - case 3: - if ((u8)r0.unk_0_2 < 3) - return 4; - return 5; + case WONDER_NEWS_NONE: + return NEWS_VAL_NONE; + case WONDER_NEWS_RECV_FRIEND: + return NEWS_VAL_RECV_FRIEND; + case WONDER_NEWS_RECV_WIRELESS: + return NEWS_VAL_RECV_WIRELESS; + case WONDER_NEWS_SENT: + if (data->sentCounter < 3) + return NEWS_VAL_SENT; + return NEWS_VAL_SENT_MAX; default: AGB_ASSERT(0); - return 0; + return NEWS_VAL_INVALID; } } diff --git a/src/mystery_gift.c b/src/mystery_gift.c index 35bf8e9edf..864ea9838d 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -1371,9 +1371,9 @@ static void Task_MysteryGift(u8 taskId) if (data->msgId == CLI_MSG_NEWS_RECEIVED) { if (data->sourceIsFriend == TRUE) - GenerateRandomWonderNews(1); + GenerateRandomWonderNews(WONDER_NEWS_RECV_FRIEND); else - GenerateRandomWonderNews(2); + GenerateRandomWonderNews(WONDER_NEWS_RECV_WIRELESS); } if (!successMsg) { @@ -1580,7 +1580,7 @@ static void Task_MysteryGift(u8 taskId) { if (data->sourceIsFriend == TRUE && data->msgId == SVR_MSG_NEWS_SENT) { - GenerateRandomWonderNews(3); + GenerateRandomWonderNews(WONDER_NEWS_SENT); data->state = MG_STATE_SAVE_LOAD_GIFT; } else From d0455485c3ea862d4089b2b4bb02bb00f3005599 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 02:18:24 -0400 Subject: [PATCH 069/417] Clean up mystery gift headers --- include/mevent.h | 10 +++++----- include/mevent_server_helpers.h | 14 +++++++------- include/wonder_transfer.h | 2 +- src/mevent2.c | 4 ++-- src/mevent_server_helpers.c | 22 +++++++++++----------- src/mystery_gift.c | 18 +++++++++--------- src/wonder_transfer.c | 26 +++++++++++++------------- 7 files changed, 48 insertions(+), 48 deletions(-) diff --git a/include/mevent.h b/include/mevent.h index c3e14f1f3d..be7f5f8e64 100755 --- a/include/mevent.h +++ b/include/mevent.h @@ -36,17 +36,17 @@ bool32 SaveWonderNews(const struct WonderNews *news); bool32 SaveWonderCard(const struct WonderCard *card); bool32 ValidateSavedWonderNews(void); bool32 ValidateSavedWonderCard(void); -bool32 IsWonderNewsSameAsSaved(const u8 *src); +bool32 IsWonderNewsSameAsSaved(const u8 *news); bool32 IsSendingSavedWonderNewsAllowed(void); bool32 IsSendingSavedWonderCardAllowed(void); u16 GetWonderCardFlagID(void); void DisableWonderCardSending(struct WonderCard *card); bool32 IsSavedWonderCardGiftNotReceived(void); bool32 MysteryGift_TrySaveStamp(const u16 *stamp); -void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 a1); -bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 a1); -u32 MysteryGift_CompareCardFlags(const u16 *a0, const struct MysteryGiftLinkGameData *data, const void *unused); -u32 MysteryGift_CheckStamps(const u16 *a0, const struct MysteryGiftLinkGameData *data, const void *unused); +void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 isWonderNews); +bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 isWonderNews); +u32 MysteryGift_CompareCardFlags(const u16 *flagId, const struct MysteryGiftLinkGameData *data, const void *unused); +u32 MysteryGift_CheckStamps(const u16 *stamp, const struct MysteryGiftLinkGameData *data, const void *unused); bool32 MysteryGift_DoesQuestionnaireMatch(const struct MysteryGiftLinkGameData *data, const u16 *words); u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *data, u32 stat); u16 MysteryGift_GetCardStat(u32 stat); diff --git a/include/mevent_server_helpers.h b/include/mevent_server_helpers.h index 77d966447a..e8556419da 100644 --- a/include/mevent_server_helpers.h +++ b/include/mevent_server_helpers.h @@ -34,16 +34,16 @@ struct MysteryGiftLink u16 sendCounter; u16 sendCRC; u16 sendSize; - void * recvBfr; - const void * sendBfr; + void * recvBuffer; + const void * sendBuffer; u32 (*recvFunc)(struct MysteryGiftLink *); u32 (*sendFunc)(struct MysteryGiftLink *); }; -void MysteryGiftLink_Init(struct MysteryGiftLink *, u32, u32); -void MysteryGiftLink_InitSend(struct MysteryGiftLink * manager, u32 ident, const void * src, u32 size); -bool32 MysteryGiftLink_Recv(struct MysteryGiftLink * manager); -bool32 MysteryGiftLink_Send(struct MysteryGiftLink * manager); -void MysteryGiftLink_InitRecv(struct MysteryGiftLink *, u32, void *); +void MysteryGiftLink_Init(struct MysteryGiftLink * link, u32 sendPlayerId, u32 recvPlayerId); +void MysteryGiftLink_InitSend(struct MysteryGiftLink * link, u32 ident, const void * src, u32 size); +bool32 MysteryGiftLink_Recv(struct MysteryGiftLink * link); +bool32 MysteryGiftLink_Send(struct MysteryGiftLink * link); +void MysteryGiftLink_InitRecv(struct MysteryGiftLink * link, u32 ident, void * dest); #endif //GUARD_MEVENT_SERVER_HELPERS_H diff --git a/include/wonder_transfer.h b/include/wonder_transfer.h index 398a2b37b5..a9e80b1c7d 100644 --- a/include/wonder_transfer.h +++ b/include/wonder_transfer.h @@ -9,7 +9,7 @@ enum { NEWS_INPUT_NONE = 0xFF }; -bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * r6); +bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * metadata); bool32 WonderNews_Init(const struct WonderNews * news); s32 WonderCard_Enter(void); s32 WonderNews_Enter(void); diff --git a/src/mevent2.c b/src/mevent2.c index 36652f44e0..ce41a0fcd9 100755 --- a/src/mevent2.c +++ b/src/mevent2.c @@ -387,7 +387,7 @@ void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 i data->romHeaderSoftwareVersion = RomHeaderSoftwareVersion; } -bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 forNews) +bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 isWonderNews) { if (data->validationVar != GAME_DATA_VALID_VAR) return FALSE; @@ -398,7 +398,7 @@ bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *da if (!(data->validationFlag2 & 1)) return FALSE; - if (!forNews) + if (!isWonderNews) { if (!(data->validationGiftType1 & GAME_DATA_VALID_GIFT_TYPE_1)) return FALSE; diff --git a/src/mevent_server_helpers.c b/src/mevent_server_helpers.c index 83ecc9f502..c1fe883688 100644 --- a/src/mevent_server_helpers.c +++ b/src/mevent_server_helpers.c @@ -47,8 +47,8 @@ void MysteryGiftLink_Init(struct MysteryGiftLink * link, u32 sendPlayerId, u32 r link->recvCRC = 0; link->recvSize = 0; link->recvCounter = 0; - link->sendBfr = NULL; - link->recvBfr = NULL; + link->sendBuffer = NULL; + link->recvBuffer = NULL; link->sendFunc = MGL_Send; link->recvFunc = MGL_Receive; } @@ -63,7 +63,7 @@ void MysteryGiftLink_InitSend(struct MysteryGiftLink * link, u32 ident, const vo link->sendSize = size; else link->sendSize = MG_LINK_BUFFER_SIZE; - link->sendBfr = src; + link->sendBuffer = src; } void MysteryGiftLink_InitRecv(struct MysteryGiftLink * link, u32 ident, void * dest) @@ -73,7 +73,7 @@ void MysteryGiftLink_InitRecv(struct MysteryGiftLink * link, u32 ident, void * d link->recvCounter = 0; link->recvCRC = 0; link->recvSize = 0; - link->recvBfr = dest; + link->recvBuffer = dest; } static void MGL_ReceiveBlock(u32 playerId, void * dest, size_t size) @@ -130,20 +130,20 @@ static bool32 MGL_Receive(struct MysteryGiftLink * link) size_t blocksize = link->recvCounter * 252; if (link->recvSize - blocksize <= 252) { - MGL_ReceiveBlock(link->recvPlayerId, link->recvBfr + blocksize, link->recvSize - blocksize); + MGL_ReceiveBlock(link->recvPlayerId, link->recvBuffer + blocksize, link->recvSize - blocksize); link->recvCounter++; link->state++; } else { - MGL_ReceiveBlock(link->recvPlayerId, link->recvBfr + blocksize, 252); + MGL_ReceiveBlock(link->recvPlayerId, link->recvBuffer + blocksize, 252); link->recvCounter++; } MGL_ResetReceived(link->recvPlayerId); } break; case 2: - if (CalcCRC16WithTable(link->recvBfr, link->recvSize) != link->recvCRC) + if (CalcCRC16WithTable(link->recvBuffer, link->recvSize) != link->recvCRC) { LinkRfu_FatalError(); return FALSE; @@ -170,7 +170,7 @@ static bool32 MGL_Send(struct MysteryGiftLink * link) { header.ident = link->sendIdent; header.size = link->sendSize; - header.crc = CalcCRC16WithTable(link->sendBfr, link->sendSize); + header.crc = CalcCRC16WithTable(link->sendBuffer, link->sendSize); link->sendCRC = header.crc; link->sendCounter = 0; SendBlock(0, &header, sizeof(header)); @@ -187,13 +187,13 @@ static bool32 MGL_Send(struct MysteryGiftLink * link) blocksize = 252 * link->sendCounter; if (link->sendSize - blocksize <= 252) { - SendBlock(0, link->sendBfr + blocksize, link->sendSize - blocksize); + SendBlock(0, link->sendBuffer + blocksize, link->sendSize - blocksize); link->sendCounter++; link->state++; } else { - SendBlock(0, link->sendBfr + blocksize, 252); + SendBlock(0, link->sendBuffer + blocksize, 252); link->sendCounter++; } } @@ -202,7 +202,7 @@ static bool32 MGL_Send(struct MysteryGiftLink * link) case 2: if (IsLinkTaskFinished()) { - if (CalcCRC16WithTable(link->sendBfr, link->sendSize) != link->sendCRC) + if (CalcCRC16WithTable(link->sendBuffer, link->sendSize) != link->sendCRC) LinkRfu_FatalError(); else link->state++; diff --git a/src/mystery_gift.c b/src/mystery_gift.c index 864ea9838d..bc6e8c44b8 100644 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -474,7 +474,7 @@ void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void) SetMainCallback2(CB2_InitTitleScreen); } -void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 usePickOkCancel) +void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel) { const u8 * header; const u8 * options; @@ -482,7 +482,7 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 usePickOkCancel) if (!isEReader) { header = gText_MysteryGift; - options = !usePickOkCancel ? gText_PickOKExit : gText_PickOKCancel; + options = !useCancel ? gText_PickOKExit : gText_PickOKCancel; } else { @@ -816,11 +816,11 @@ static bool32 ClearSavedNewsOrCard(bool32 isWonderNews) return TRUE; } -static bool32 ExitWonderCardOrNews(bool32 isWonderNews, bool32 arg1) +static bool32 ExitWonderCardOrNews(bool32 isWonderNews, bool32 useCancel) { if (!isWonderNews) { - if (WonderCard_Exit(arg1)) + if (WonderCard_Exit(useCancel)) { WonderCard_Destroy(); return TRUE; @@ -832,7 +832,7 @@ static bool32 ExitWonderCardOrNews(bool32 isWonderNews, bool32 arg1) } else { - if (WonderNews_Exit(arg1)) + if (WonderNews_Exit(useCancel)) { WonderNews_Destroy(); return TRUE; @@ -1486,7 +1486,7 @@ static void Task_MysteryGift(u8 taskId) } break; case MG_STATE_TOSS: - if (ExitWonderCardOrNews(data->isWonderNews, 1)) + if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) { ClearSavedNewsOrCard(data->isWonderNews); data->state = MG_STATE_TOSS_SAVE; @@ -1504,15 +1504,15 @@ static void Task_MysteryGift(u8 taskId) } break; case MG_STATE_GIFT_INPUT_EXIT: - if (ExitWonderCardOrNews(data->isWonderNews, 0)) + if (ExitWonderCardOrNews(data->isWonderNews, FALSE)) data->state = MG_STATE_TO_MAIN_MENU; break; case MG_STATE_RECEIVE: - if (ExitWonderCardOrNews(data->isWonderNews, 1)) + if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) data->state = MG_STATE_SOURCE_PROMPT; break; case MG_STATE_SEND: - if (ExitWonderCardOrNews(data->isWonderNews, 1)) + if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) { switch (data->isWonderNews) { diff --git a/src/wonder_transfer.c b/src/wonder_transfer.c index d958b8aef9..c1fc69ca77 100644 --- a/src/wonder_transfer.c +++ b/src/wonder_transfer.c @@ -273,11 +273,11 @@ s32 WonderCard_Enter(void) sWonderCardData->enterExitState = 0; return 1; } - ++sWonderCardData->enterExitState; + sWonderCardData->enterExitState++; return 0; } -s32 WonderCard_Exit(bool32 flag) +s32 WonderCard_Exit(bool32 useCancel) { if (sWonderCardData == NULL) return -1; @@ -310,7 +310,7 @@ s32 WonderCard_Exit(bool32 flag) FreeMonIconPalettes(); break; case 5: - PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag); + PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, useCancel); CopyBgTilemapBufferToVram(0); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); break; @@ -320,7 +320,7 @@ s32 WonderCard_Exit(bool32 flag) sWonderCardData->enterExitState = 0; return 1; } - ++sWonderCardData->enterExitState; + sWonderCardData->enterExitState++; return 0; } @@ -737,11 +737,11 @@ s32 WonderNews_Enter(void) return 1; } - ++sWonderNewsData->enterExitState; + sWonderNewsData->enterExitState++; return 0; } -s32 WonderNews_Exit(bool32 flag) +s32 WonderNews_Exit(bool32 useCancel) { if (sWonderNewsData == NULL) return -1; @@ -786,7 +786,7 @@ s32 WonderNews_Exit(bool32 flag) } break; case 5: - PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag); + PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, useCancel); MG_DrawCheckerboardPattern(3); CopyBgTilemapBufferToVram(0); CopyBgTilemapBufferToVram(3); @@ -798,7 +798,7 @@ s32 WonderNews_Exit(bool32 flag) sWonderNewsData->enterExitState = 0; return 1; } - ++sWonderNewsData->enterExitState; + sWonderNewsData->enterExitState++; return 0; } @@ -872,12 +872,12 @@ static void BufferNewsText(void) sWonderNewsData->titleText[WONDER_NEWS_TEXT_LENGTH] = EOS; // Copy body text - for (; i < WONDER_NEWS_BODY_TEXT_LINES; ++i) + for (; i < WONDER_NEWS_BODY_TEXT_LINES; i++) { memcpy(sWonderNewsData->bodyText[i], sWonderNewsData->news.bodyText[i], WONDER_NEWS_TEXT_LENGTH); sWonderNewsData->bodyText[i][WONDER_NEWS_TEXT_LENGTH] = EOS; if (i > 7 && sWonderNewsData->bodyText[i][0] != EOS) - ++sWonderNewsData->scrollEnd; + sWonderNewsData->scrollEnd++; } sWonderNewsData->arrowsTemplate = sNews_ArrowsTemplate; sWonderNewsData->arrowsTemplate.fullyDownThreshold = sWonderNewsData->scrollEnd; @@ -899,7 +899,7 @@ static void DrawNewsWindows(void) AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_TITLE], 3, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText); // Print body text - for (; i < WONDER_NEWS_BODY_TEXT_LINES; ++i) + for (; i < WONDER_NEWS_BODY_TEXT_LINES; i++) AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_BODY], 3, 0, 16 * i + 2, sNews_TextColorTable[sWonderNewsData->gfx->bodyTextPal], @@ -927,9 +927,9 @@ static void UpdateNewsScroll(void) if (sWonderNewsData->scrollTotal > 15) { if (sWonderNewsData->scrollingDown) - ++sWonderNewsData->scrollOffset; + sWonderNewsData->scrollOffset++; else - --sWonderNewsData->scrollOffset; + sWonderNewsData->scrollOffset--; sWonderNewsData->scrolling = FALSE; sWonderNewsData->scrollTotal = 0; } From ece7ef3410eb9b114cf328426c4fc16c972f71c6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 03:00:48 -0400 Subject: [PATCH 070/417] Correct usage of MysteryEvent to MysteryGift --- data/event_scripts.s | 4 +- data/{mystery_event.s => mystery_gift.s} | 18 +- data/scripts/cable_club.inc | 4 +- ...tering_cave.inc => gift_altering_cave.inc} | 8 +- ...rora_ticket.inc => gift_aurora_ticket.inc} | 4 +- ...t_battle_card.inc => gift_battle_card.inc} | 10 +- ...stic_ticket.inc => gift_mystic_ticket.inc} | 4 +- ...t_old_sea_map.inc => gift_old_sea_map.inc} | 4 +- .../{mevent_pichu.inc => gift_pichu.inc} | 4 +- ...ent_stamp_card.inc => gift_stamp_card.inc} | 4 +- .../{mevent_trainer.inc => gift_trainer.inc} | 8 +- data/scripts/mevent.inc | 62 - data/scripts/questionnaire.inc | 62 + data/text/{mevent.inc => questionnaire.inc} | 16 +- .../constants/{mevent.h => mystery_gift.h} | 6 +- include/mevent.h | 57 - include/mystery_event_msg.h | 22 +- include/mystery_event_script.h | 4 +- include/mystery_gift.h | 63 +- ...{mevent_client.h => mystery_gift_client.h} | 10 +- ...t_server_helpers.h => mystery_gift_link.h} | 6 +- include/mystery_gift_menu.h | 18 + ...{mevent_server.h => mystery_gift_server.h} | 8 +- ...{wonder_transfer.h => mystery_gift_view.h} | 6 +- include/{mevent_news.h => wonder_news.h} | 6 +- ld_script.txt | 28 +- src/cable_club.c | 2 +- src/easy_chat.c | 2 +- src/ereader_screen.c | 2 +- src/field_specials.c | 4 +- src/link_rfu_2.c | 2 +- src/main_menu.c | 2 +- src/mevent2.c | 662 ----- src/mystery_event_msg.c | 22 +- src/mystery_event_script.c | 24 +- src/mystery_gift.c | 2130 +++++------------ ...{mevent_client.c => mystery_gift_client.c} | 24 +- ...t_server_helpers.c => mystery_gift_link.c} | 4 +- src/mystery_gift_menu.c | 1618 +++++++++++++ ...event_scripts.c => mystery_gift_scripts.c} | 6 +- ...{mevent_server.c => mystery_gift_server.c} | 6 +- ...{wonder_transfer.c => mystery_gift_view.c} | 6 +- src/new_game.c | 2 +- src/script.c | 2 +- src/trade.c | 2 +- src/union_room.c | 2 +- src/{mevent_news.c => wonder_news.c} | 4 +- sym_ewram.txt | 10 +- 48 files changed, 2492 insertions(+), 2492 deletions(-) rename data/{mystery_event.s => mystery_gift.s} (50%) rename data/scripts/{mevent_altering_cave.inc => gift_altering_cave.inc} (78%) rename data/scripts/{mevent_aurora_ticket.inc => gift_aurora_ticket.inc} (94%) rename data/scripts/{mevent_battle_card.inc => gift_battle_card.inc} (83%) rename data/scripts/{mevent_mystic_ticket.inc => gift_mystic_ticket.inc} (95%) rename data/scripts/{mevent_old_sea_map.inc => gift_old_sea_map.inc} (95%) rename data/scripts/{mevent_pichu.inc => gift_pichu.inc} (95%) rename data/scripts/{mevent_stamp_card.inc => gift_stamp_card.inc} (87%) rename data/scripts/{mevent_trainer.inc => gift_trainer.inc} (87%) delete mode 100644 data/scripts/mevent.inc create mode 100644 data/scripts/questionnaire.inc rename data/text/{mevent.inc => questionnaire.inc} (76%) rename include/constants/{mevent.h => mystery_gift.h} (92%) delete mode 100755 include/mevent.h mode change 100644 => 100755 include/mystery_gift.h rename include/{mevent_client.h => mystery_gift_client.h} (91%) rename include/{mevent_server_helpers.h => mystery_gift_link.h} (91%) create mode 100644 include/mystery_gift_menu.h rename include/{mevent_server.h => mystery_gift_server.h} (93%) rename include/{wonder_transfer.h => mystery_gift_view.h} (85%) rename include/{mevent_news.h => wonder_news.h} (69%) delete mode 100755 src/mevent2.c mode change 100644 => 100755 src/mystery_gift.c rename src/{mevent_client.c => mystery_gift_client.c} (94%) rename src/{mevent_server_helpers.c => mystery_gift_link.c} (99%) create mode 100644 src/mystery_gift_menu.c rename src/{mevent_scripts.c => mystery_gift_scripts.c} (98%) rename src/{mevent_server.c => mystery_gift_server.c} (99%) rename src/{wonder_transfer.c => mystery_gift_view.c} (99%) rename src/{mevent_news.c => wonder_news.c} (98%) diff --git a/data/event_scripts.s b/data/event_scripts.s index 852fa36d8c..a68c339a60 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -956,7 +956,7 @@ gText_LegendaryFlewAway:: .string "The {STR_VAR_1} flew away!$" .include "data/text/pc_transfer.inc" - .include "data/text/mevent.inc" + .include "data/text/questionnaire.inc" .include "data/text/abnormal_weather.inc" EventScript_SelectWithoutRegisteredItem:: @@ -1006,7 +1006,7 @@ Common_EventScript_LegendaryFlewAway:: end .include "data/scripts/pc_transfer.inc" - .include "data/scripts/mevent.inc" + .include "data/scripts/questionnaire.inc" .include "data/scripts/abnormal_weather.inc" .include "data/scripts/trainer_script.inc" .include "data/scripts/berry_tree.inc" diff --git a/data/mystery_event.s b/data/mystery_gift.s similarity index 50% rename from data/mystery_event.s rename to data/mystery_gift.s index d707731b62..df0cbd4ac0 100644 --- a/data/mystery_event.s +++ b/data/mystery_gift.s @@ -2,7 +2,7 @@ #include "constants/flags.h" #include "constants/items.h" #include "constants/map_scripts.h" -#include "constants/mevent.h" +#include "constants/mystery_gift.h" #include "constants/moves.h" #include "constants/region_map_sections.h" #include "constants/songs.h" @@ -15,11 +15,11 @@ .section .rodata .align 2 - .include "data/scripts/mevent_stamp_card.inc" - .include "data/scripts/mevent_pichu.inc" - .include "data/scripts/mevent_trainer.inc" - .include "data/scripts/mevent_battle_card.inc" - .include "data/scripts/mevent_aurora_ticket.inc" - .include "data/scripts/mevent_mystic_ticket.inc" - .include "data/scripts/mevent_altering_cave.inc" - .include "data/scripts/mevent_old_sea_map.inc" + .include "data/scripts/gift_stamp_card.inc" + .include "data/scripts/gift_pichu.inc" + .include "data/scripts/gift_trainer.inc" + .include "data/scripts/gift_battle_card.inc" + .include "data/scripts/gift_aurora_ticket.inc" + .include "data/scripts/gift_mystic_ticket.inc" + .include "data/scripts/gift_altering_cave.inc" + .include "data/scripts/gift_old_sea_map.inc" diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index c1bcc8d14d..ab76428990 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -40,11 +40,11 @@ CableClub_EventScript_DistributeEonTicket:: compare VAR_RESULT, TRUE goto_if_eq CableClub_EventScript_AlreadyGotEonTicket goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_AlreadyGotEonTicket - msgbox Mevent_Text_TheresATicketForYou, MSGBOX_DEFAULT + msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT giveitem ITEM_EON_TICKET setflag FLAG_ENABLE_SHIP_SOUTHERN_ISLAND setvar VAR_DISTRIBUTE_EON_TICKET, 0 - msgbox Mevent_Text_TryUsingItAtLilycovePort, MSGBOX_DEFAULT + msgbox MysteryGift_Text_TryUsingItAtLilycovePort, MSGBOX_DEFAULT release end diff --git a/data/scripts/mevent_altering_cave.inc b/data/scripts/gift_altering_cave.inc similarity index 78% rename from data/scripts/mevent_altering_cave.inc rename to data/scripts/gift_altering_cave.inc index 7e9b0a758e..8761b5fa40 100644 --- a/data/scripts/mevent_altering_cave.inc +++ b/data/scripts/gift_altering_cave.inc @@ -1,10 +1,10 @@ -MysteryEventScript_AlteringCave:: - setvaddress MysteryEventScript_AlteringCave +MysteryGiftScript_AlteringCave:: + setvaddress MysteryGiftScript_AlteringCave addvar VAR_ALTERING_CAVE_WILD_SET, 1 compare VAR_ALTERING_CAVE_WILD_SET, 10 - vgoto_if_ne MysteryEventScript_AlteringCave_ + vgoto_if_ne MysteryGiftScript_AlteringCave_ setvar VAR_ALTERING_CAVE_WILD_SET, 0 -MysteryEventScript_AlteringCave_: +MysteryGiftScript_AlteringCave_: lock faceplayer vmessage sText_MysteryGiftAlteringCave diff --git a/data/scripts/mevent_aurora_ticket.inc b/data/scripts/gift_aurora_ticket.inc similarity index 94% rename from data/scripts/mevent_aurora_ticket.inc rename to data/scripts/gift_aurora_ticket.inc index 9d73346381..c9250b9f93 100644 --- a/data/scripts/mevent_aurora_ticket.inc +++ b/data/scripts/gift_aurora_ticket.inc @@ -1,5 +1,5 @@ -MysteryEventScript_AuroraTicket:: - setvaddress MysteryEventScript_AuroraTicket +MysteryGiftScript_AuroraTicket:: + setvaddress MysteryGiftScript_AuroraTicket lock faceplayer vgoto_if_set FLAG_RECEIVED_AURORA_TICKET, AuroraTicket_Obtained diff --git a/data/scripts/mevent_battle_card.inc b/data/scripts/gift_battle_card.inc similarity index 83% rename from data/scripts/mevent_battle_card.inc rename to data/scripts/gift_battle_card.inc index 5361077464..80b4ba26eb 100644 --- a/data/scripts/mevent_battle_card.inc +++ b/data/scripts/gift_battle_card.inc @@ -1,10 +1,10 @@ -MysteryEventScript_BattleCard:: - setvaddress MysteryEventScript_BattleCard - vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryEventScript_BattleCardInfo +MysteryGiftScript_BattleCard:: + setvaddress MysteryGiftScript_BattleCard + vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryGiftScript_BattleCardInfo setorcopyvar VAR_RESULT, GET_CARD_BATTLES_WON specialvar VAR_0x8008, GetMysteryGiftCardStat compare VAR_0x8008, REQUIRED_CARD_BATTLES - vgoto_if_ne MysteryEventScript_BattleCardInfo + vgoto_if_ne MysteryGiftScript_BattleCardInfo lock faceplayer vmessage sText_MysteryGiftBattleCountCard_WonPrize @@ -15,7 +15,7 @@ MysteryEventScript_BattleCard:: setflag FLAG_MYSTERY_GIFT_DONE end -MysteryEventScript_BattleCardInfo: +MysteryGiftScript_BattleCardInfo: lock faceplayer vmessage sText_MysteryGiftBattleCountCard diff --git a/data/scripts/mevent_mystic_ticket.inc b/data/scripts/gift_mystic_ticket.inc similarity index 95% rename from data/scripts/mevent_mystic_ticket.inc rename to data/scripts/gift_mystic_ticket.inc index e085c5a596..29c325f72d 100644 --- a/data/scripts/mevent_mystic_ticket.inc +++ b/data/scripts/gift_mystic_ticket.inc @@ -1,5 +1,5 @@ -MysteryEventScript_MysticTicket:: - setvaddress MysteryEventScript_MysticTicket +MysteryGiftScript_MysticTicket:: + setvaddress MysteryGiftScript_MysticTicket lock faceplayer vgoto_if_set FLAG_RECEIVED_MYSTIC_TICKET, MysticTicket_Obtained diff --git a/data/scripts/mevent_old_sea_map.inc b/data/scripts/gift_old_sea_map.inc similarity index 95% rename from data/scripts/mevent_old_sea_map.inc rename to data/scripts/gift_old_sea_map.inc index 68714117b3..5e47a10df1 100644 --- a/data/scripts/mevent_old_sea_map.inc +++ b/data/scripts/gift_old_sea_map.inc @@ -1,5 +1,5 @@ -MysteryEventScript_OldSeaMap:: - setvaddress MysteryEventScript_OldSeaMap +MysteryGiftScript_OldSeaMap:: + setvaddress MysteryGiftScript_OldSeaMap lock faceplayer vgoto_if_set FLAG_RECEIVED_OLD_SEA_MAP, OldSeaMap_Obtained diff --git a/data/scripts/mevent_pichu.inc b/data/scripts/gift_pichu.inc similarity index 95% rename from data/scripts/mevent_pichu.inc rename to data/scripts/gift_pichu.inc index 9256d53a73..e62fc4536e 100644 --- a/data/scripts/mevent_pichu.inc +++ b/data/scripts/gift_pichu.inc @@ -1,5 +1,5 @@ -MysteryEventScript_SurfPichu:: - setvaddress MysteryEventScript_SurfPichu +MysteryGiftScript_SurfPichu:: + setvaddress MysteryGiftScript_SurfPichu vgoto_if_unset FLAG_MYSTERY_GIFT_DONE, SurfPichu_GiveIfPossible returnram diff --git a/data/scripts/mevent_stamp_card.inc b/data/scripts/gift_stamp_card.inc similarity index 87% rename from data/scripts/mevent_stamp_card.inc rename to data/scripts/gift_stamp_card.inc index e313aa29d5..f6e1eb7c7c 100644 --- a/data/scripts/mevent_stamp_card.inc +++ b/data/scripts/gift_stamp_card.inc @@ -1,5 +1,5 @@ -MysteryEventScript_StampCard:: - setvaddress MysteryEventScript_StampCard +MysteryGiftScript_StampCard:: + setvaddress MysteryGiftScript_StampCard setorcopyvar VAR_RESULT, GET_MAX_STAMPS specialvar VAR_0x8008, GetMysteryGiftCardStat setorcopyvar VAR_RESULT, GET_NUM_STAMPS diff --git a/data/scripts/mevent_trainer.inc b/data/scripts/gift_trainer.inc similarity index 87% rename from data/scripts/mevent_trainer.inc rename to data/scripts/gift_trainer.inc index f4318408d2..2dbc86d53e 100644 --- a/data/scripts/mevent_trainer.inc +++ b/data/scripts/gift_trainer.inc @@ -1,8 +1,8 @@ -MysteryEventScript_VisitingTrainer:: - setvaddress MysteryEventScript_VisitingTrainer +MysteryGiftScript_VisitingTrainer:: + setvaddress MysteryGiftScript_VisitingTrainer special ValidateEReaderTrainer compare VAR_RESULT, 0 - vgoto_if_eq MysteryEventScript_VisitingTrainerArrived + vgoto_if_eq MysteryGiftScript_VisitingTrainerArrived lock faceplayer vmessage sText_MysteryGiftVisitingTrainerInstructions @@ -11,7 +11,7 @@ MysteryEventScript_VisitingTrainer:: release end -MysteryEventScript_VisitingTrainerArrived: +MysteryGiftScript_VisitingTrainerArrived: lock faceplayer vmessage sText_MysteryGiftVisitingTrainerArrived diff --git a/data/scripts/mevent.inc b/data/scripts/mevent.inc deleted file mode 100644 index b33a332700..0000000000 --- a/data/scripts/mevent.inc +++ /dev/null @@ -1,62 +0,0 @@ -EventScript_Questionnaire:: - lockall - msgbox Mevent_Text_FillOutQuestionnaire, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Mevent_EventScript_Release - setvar VAR_0x8004, EASY_CHAT_TYPE_QUESTIONNAIRE - call Common_ShowEasyChatScreen - lock - faceplayer - specialvar VAR_0x8008, GetMartEmployeeObjectEventId - compare VAR_0x8004, 1 - goto_if_eq Mevent_EventScript_PlayerInputMysteryEventPhrase - compare VAR_0x8004, 2 - goto_if_eq Mevent_EventScript_PlayerInputMysteryGiftPhrase - compare VAR_RESULT, 0 - goto_if_eq Mevent_EventScript_Release - compare VAR_RESULT, 1 - goto_if_eq Mevent_EventScript_QuestionnaireThankYou - end - -Mevent_EventScript_PlayerInputMysteryEventPhrase:: - goto_if_unset FLAG_SYS_POKEDEX_GET, Mevent_EventScript_QuestionnaireThankYou - goto_if_set FLAG_SYS_MYSTERY_EVENT_ENABLE, Mevent_EventScript_QuestionnaireThankYou - applymovement VAR_0x8008, Common_Movement_FaceDown - waitmovement 0 - playse SE_PIN - applymovement VAR_0x8008, Common_Movement_ExclamationMark - waitmovement 0 - applymovement VAR_0x8008, Common_Movement_Delay48 - waitmovement 0 - msgbox Mevent_Text_YouKnowThoseWordsEvent, MSGBOX_DEFAULT - setflag FLAG_SYS_MYSTERY_EVENT_ENABLE - msgbox Mevent_Text_YouCanAccessMysteryEvent, MSGBOX_DEFAULT - releaseall - end - -Mevent_EventScript_PlayerInputMysteryGiftPhrase:: - goto_if_unset FLAG_SYS_POKEDEX_GET, Mevent_EventScript_QuestionnaireThankYou - goto_if_set FLAG_SYS_MYSTERY_GIFT_ENABLE, Mevent_EventScript_QuestionnaireThankYou - applymovement VAR_0x8008, Common_Movement_FaceDown - waitmovement 0 - playse SE_PIN - applymovement VAR_0x8008, Common_Movement_ExclamationMark - waitmovement 0 - applymovement VAR_0x8008, Common_Movement_Delay48 - waitmovement 0 - msgbox Mevent_Text_YouKnowThoseWordsGift, MSGBOX_DEFAULT - setflag FLAG_SYS_MYSTERY_GIFT_ENABLE - msgbox Mevent_Text_YouCanAccessMysteryGift, MSGBOX_DEFAULT - releaseall - end - -Mevent_EventScript_Release:: - releaseall - end - -Mevent_EventScript_QuestionnaireThankYou:: - applymovement VAR_0x8008, Common_Movement_FaceDown - waitmovement 0 - msgbox Mevent_Text_QuestionnaireThankYou, MSGBOX_DEFAULT - releaseall - end diff --git a/data/scripts/questionnaire.inc b/data/scripts/questionnaire.inc new file mode 100644 index 0000000000..62e149bb78 --- /dev/null +++ b/data/scripts/questionnaire.inc @@ -0,0 +1,62 @@ +EventScript_Questionnaire:: + lockall + msgbox Questionnaire_Text_FillOut, MSGBOX_YESNO + compare VAR_RESULT, NO + goto_if_eq Questionnaire_EventScript_Release + setvar VAR_0x8004, EASY_CHAT_TYPE_QUESTIONNAIRE + call Common_ShowEasyChatScreen + lock + faceplayer + specialvar VAR_0x8008, GetMartEmployeeObjectEventId + compare VAR_0x8004, 1 + goto_if_eq Questionnaire_EventScript_PlayerInputMysteryEventPhrase + compare VAR_0x8004, 2 + goto_if_eq Questionnaire_EventScript_PlayerInputMysteryGiftPhrase + compare VAR_RESULT, 0 + goto_if_eq Questionnaire_EventScript_Release + compare VAR_RESULT, 1 + goto_if_eq Questionnaire_EventScript_ThankYou + end + +Questionnaire_EventScript_PlayerInputMysteryEventPhrase:: + goto_if_unset FLAG_SYS_POKEDEX_GET, Questionnaire_EventScript_ThankYou + goto_if_set FLAG_SYS_MYSTERY_EVENT_ENABLE, Questionnaire_EventScript_ThankYou + applymovement VAR_0x8008, Common_Movement_FaceDown + waitmovement 0 + playse SE_PIN + applymovement VAR_0x8008, Common_Movement_ExclamationMark + waitmovement 0 + applymovement VAR_0x8008, Common_Movement_Delay48 + waitmovement 0 + msgbox Questionnaire_Text_YouKnowThoseWordsEvent, MSGBOX_DEFAULT + setflag FLAG_SYS_MYSTERY_EVENT_ENABLE + msgbox Questionnaire_Text_YouCanAccessMysteryEvent, MSGBOX_DEFAULT + releaseall + end + +Questionnaire_EventScript_PlayerInputMysteryGiftPhrase:: + goto_if_unset FLAG_SYS_POKEDEX_GET, Questionnaire_EventScript_ThankYou + goto_if_set FLAG_SYS_MYSTERY_GIFT_ENABLE, Questionnaire_EventScript_ThankYou + applymovement VAR_0x8008, Common_Movement_FaceDown + waitmovement 0 + playse SE_PIN + applymovement VAR_0x8008, Common_Movement_ExclamationMark + waitmovement 0 + applymovement VAR_0x8008, Common_Movement_Delay48 + waitmovement 0 + msgbox Questionnaire_Text_YouKnowThoseWordsGift, MSGBOX_DEFAULT + setflag FLAG_SYS_MYSTERY_GIFT_ENABLE + msgbox Questionnaire_Text_YouCanAccessMysteryGift, MSGBOX_DEFAULT + releaseall + end + +Questionnaire_EventScript_Release:: + releaseall + end + +Questionnaire_EventScript_ThankYou:: + applymovement VAR_0x8008, Common_Movement_FaceDown + waitmovement 0 + msgbox Questionnaire_Text_ThankYou, MSGBOX_DEFAULT + releaseall + end diff --git a/data/text/mevent.inc b/data/text/questionnaire.inc similarity index 76% rename from data/text/mevent.inc rename to data/text/questionnaire.inc index 5fb00bc970..a7fd09486f 100644 --- a/data/text/mevent.inc +++ b/data/text/questionnaire.inc @@ -1,14 +1,14 @@ -Mevent_Text_FillOutQuestionnaire:: +Questionnaire_Text_FillOut:: .string "There is a questionnaire.\n" .string "Would you like to fill it out?$" -Mevent_Text_QuestionnaireThankYou:: +Questionnaire_Text_ThankYou:: .string "Thank you for taking the time to\n" .string "fill out our questionnaire.\p" .string "Your feedback will be used for\n" .string "future reference.$" -Mevent_Text_YouKnowThoseWordsGift:: +Questionnaire_Text_YouKnowThoseWordsGift:: .string "Oh, hello!\n" .string "You know those words?\p" .string "That means you must know about\n" @@ -16,27 +16,27 @@ Mevent_Text_YouKnowThoseWordsGift:: .string "From now on, you should be\n" .string "receiving MYSTERY GIFTS!$" -Mevent_Text_YouCanAccessMysteryGift:: +Questionnaire_Text_YouCanAccessMysteryGift:: .string "Once you save your game, you can\n" .string "access the MYSTERY GIFT.$" -Mevent_Text_YouKnowThoseWordsEvent:: +Questionnaire_Text_YouKnowThoseWordsEvent:: .string "Oh, hello!\n" .string "You know those words?\p" .string "That means you must know about\n" .string "the MYSTERY EVENT.$" -Mevent_Text_YouCanAccessMysteryEvent:: +Questionnaire_Text_YouCanAccessMysteryEvent:: .string "Once you save your game, you can\n" .string "access the MYSTERY EVENT.$" -Mevent_Text_TheresATicketForYou:: +MysteryGift_Text_TheresATicketForYou:: .string "Thank you for using the MYSTERY\n" .string "EVENT System.\p" .string "You must be {PLAYER}.\n" .string "There is a ticket here for you.$" -Mevent_Text_TryUsingItAtLilycovePort:: +MysteryGift_Text_TryUsingItAtLilycovePort:: .string "It appears to be for use at\n" .string "the LILYCOVE CITY port.\p" .string "Why not give it a try and see what\n" diff --git a/include/constants/mevent.h b/include/constants/mystery_gift.h similarity index 92% rename from include/constants/mevent.h rename to include/constants/mystery_gift.h index 636043fdba..07690e37c4 100644 --- a/include/constants/mevent.h +++ b/include/constants/mystery_gift.h @@ -1,5 +1,5 @@ -#ifndef GUARD_CONSTANTS_MEVENT_H -#define GUARD_CONSTANTS_MEVENT_H +#ifndef GUARD_CONSTANTS_MYSTERY_GIFT_H +#define GUARD_CONSTANTS_MYSTERY_GIFT_H #define GET_NUM_STAMPS 0 #define GET_MAX_STAMPS 1 @@ -44,4 +44,4 @@ #define WONDER_CARD_FLAG_OFFSET 1000 -#endif //GUARD_MEVENT_H +#endif //GUARD_CONSTANTS_MYSTERY_GIFT_H diff --git a/include/mevent.h b/include/mevent.h deleted file mode 100755 index be7f5f8e64..0000000000 --- a/include/mevent.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef GUARD_MEVENT_H -#define GUARD_MEVENT_H - -#include "main.h" -#include "constants/mevent.h" - -struct MysteryGiftLinkGameData -{ - // It's possible these first 5 fields had some other meaningful purpose, - // but they are only ever set when creating this data and read to validate it. - u32 validationVar; - u16 validationFlag1; - u32 validationFlag2; - u16 validationGiftType1; - u32 validationGiftType2; - u16 flagId; - u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; - struct WonderCardMetadata cardMetadata; - u8 maxStamps; - u8 playerName[PLAYER_NAME_LENGTH]; - u8 playerTrainerId[TRAINER_ID_LENGTH]; - u16 easyChatProfile[EASY_CHAT_BATTLE_WORDS_COUNT]; - u8 romHeaderGameCode[GAME_CODE_LENGTH]; - u8 romHeaderSoftwareVersion; -}; - -void ClearMysteryGift(void); -struct WonderNews *GetSavedWonderNews(void); -struct WonderCard *GetSavedWonderCard(void); -struct WonderCardMetadata *GetSavedWonderCardMetadata(void); -struct WonderNewsMetadata *GetSavedWonderNewsMetadata(void); -u16 *GetQuestionnaireWordsPtr(void); -void ClearSavedWonderNewsAndRelated(void); -void ClearSavedWonderCardAndRelated(void); -bool32 SaveWonderNews(const struct WonderNews *news); -bool32 SaveWonderCard(const struct WonderCard *card); -bool32 ValidateSavedWonderNews(void); -bool32 ValidateSavedWonderCard(void); -bool32 IsWonderNewsSameAsSaved(const u8 *news); -bool32 IsSendingSavedWonderNewsAllowed(void); -bool32 IsSendingSavedWonderCardAllowed(void); -u16 GetWonderCardFlagID(void); -void DisableWonderCardSending(struct WonderCard *card); -bool32 IsSavedWonderCardGiftNotReceived(void); -bool32 MysteryGift_TrySaveStamp(const u16 *stamp); -void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 isWonderNews); -bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 isWonderNews); -u32 MysteryGift_CompareCardFlags(const u16 *flagId, const struct MysteryGiftLinkGameData *data, const void *unused); -u32 MysteryGift_CheckStamps(const u16 *stamp, const struct MysteryGiftLinkGameData *data, const void *unused); -bool32 MysteryGift_DoesQuestionnaireMatch(const struct MysteryGiftLinkGameData *data, const u16 *words); -u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *data, u32 stat); -u16 MysteryGift_GetCardStat(u32 stat); -void MysteryGift_DisableStats(void); -bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId); -void MysteryGift_TryIncrementStat(u32 stat, u32 trainerId); - -#endif //GUARD_MEVENT_H diff --git a/include/mystery_event_msg.h b/include/mystery_event_msg.h index 465b60ccb6..1844960237 100644 --- a/include/mystery_event_msg.h +++ b/include/mystery_event_msg.h @@ -1,16 +1,16 @@ #ifndef GUARD_MYSTERY_EVENT_MSG_H #define GUARD_MYSTERY_EVENT_MSG_H -extern const u8 gText_MysteryGiftBerry[]; -extern const u8 gText_MysteryGiftBerryTransform[]; -extern const u8 gText_MysteryGiftBerryObtained[]; -extern const u8 gText_MysteryGiftSpecialRibbon[]; -extern const u8 gText_MysteryGiftNationalDex[]; -extern const u8 gText_MysteryGiftRareWord[]; -extern const u8 gText_MysteryGiftSentOver[]; -extern const u8 gText_MysteryGiftFullParty[]; -extern const u8 gText_MysteryGiftNewTrainer[]; -extern const u8 gText_MysteryGiftNewAdversaryInBattleTower[]; -extern const u8 gText_MysteryGiftCantBeUsed[]; +extern const u8 gText_MysteryEventBerry[]; +extern const u8 gText_MysteryEventBerryTransform[]; +extern const u8 gText_MysteryEventBerryObtained[]; +extern const u8 gText_MysteryEventSpecialRibbon[]; +extern const u8 gText_MysteryEventNationalDex[]; +extern const u8 gText_MysteryEventRareWord[]; +extern const u8 gText_MysteryEventSentOver[]; +extern const u8 gText_MysteryEventFullParty[]; +extern const u8 gText_MysteryEventNewTrainer[]; +extern const u8 gText_MysteryEventNewAdversaryInBattleTower[]; +extern const u8 gText_MysteryEventCantBeUsed[]; #endif // GUARD_MYSTERY_EVENT_MSG_H diff --git a/include/mystery_event_script.h b/include/mystery_event_script.h index 807c78b132..32b9f009f6 100644 --- a/include/mystery_event_script.h +++ b/include/mystery_event_script.h @@ -1,8 +1,8 @@ #ifndef GUARD_MYSTERY_EVENT_SCRIPT_H #define GUARD_MYSTERY_EVENT_SCRIPT_H -void InitMysteryGiftScriptContext(u8 *script); -bool32 RunMysteryGiftScriptContextCommand(u32 *script); +void InitMysteryEventScriptContext(u8 *script); +bool32 RunMysteryEventScriptContextCommand(u32 *script); u32 RunMysteryEventScript(u8 *script); void SetMysteryEventScriptStatus(u32 val); u16 GetRecordMixingGift(void); diff --git a/include/mystery_gift.h b/include/mystery_gift.h old mode 100644 new mode 100755 index 73d3b93eac..3b27b3f2dc --- a/include/mystery_gift.h +++ b/include/mystery_gift.h @@ -1,18 +1,57 @@ #ifndef GUARD_MYSTERY_GIFT_H #define GUARD_MYSTERY_GIFT_H -extern bool8 gGiftIsFromEReader; +#include "main.h" +#include "constants/mystery_gift.h" -u16 GetMysteryGiftBaseBlock(void); -void CB2_MysteryGiftEReader(void); -void PrintMysteryGiftOrEReaderTopMenu(bool8 isJapanese, bool32 usePickOkCancel); -void MG_DrawCheckerboardPattern(u32 bg); -void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void); -bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str); -void AddTextPrinterToWindow1(const u8 *src); -void CB2_InitEReader(void); -void CB2_InitMysteryGift(void); -void MG_DrawTextBorder(u8 windowId); -s8 DoMysteryGiftYesNo(u8 *textState, u16 *windowId, bool8 yesNoBoxPlacement, const u8 *str); +struct MysteryGiftLinkGameData +{ + // It's possible these first 5 fields had some other meaningful purpose, + // but they are only ever set when creating this data and read to validate it. + u32 validationVar; + u16 validationFlag1; + u32 validationFlag2; + u16 validationGiftType1; + u32 validationGiftType2; + u16 flagId; + u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; + struct WonderCardMetadata cardMetadata; + u8 maxStamps; + u8 playerName[PLAYER_NAME_LENGTH]; + u8 playerTrainerId[TRAINER_ID_LENGTH]; + u16 easyChatProfile[EASY_CHAT_BATTLE_WORDS_COUNT]; + u8 romHeaderGameCode[GAME_CODE_LENGTH]; + u8 romHeaderSoftwareVersion; +}; + +void ClearMysteryGift(void); +struct WonderNews *GetSavedWonderNews(void); +struct WonderCard *GetSavedWonderCard(void); +struct WonderCardMetadata *GetSavedWonderCardMetadata(void); +struct WonderNewsMetadata *GetSavedWonderNewsMetadata(void); +u16 *GetQuestionnaireWordsPtr(void); +void ClearSavedWonderNewsAndRelated(void); +void ClearSavedWonderCardAndRelated(void); +bool32 SaveWonderNews(const struct WonderNews *news); +bool32 SaveWonderCard(const struct WonderCard *card); +bool32 ValidateSavedWonderNews(void); +bool32 ValidateSavedWonderCard(void); +bool32 IsWonderNewsSameAsSaved(const u8 *news); +bool32 IsSendingSavedWonderNewsAllowed(void); +bool32 IsSendingSavedWonderCardAllowed(void); +u16 GetWonderCardFlagID(void); +void DisableWonderCardSending(struct WonderCard *card); +bool32 IsSavedWonderCardGiftNotReceived(void); +bool32 MysteryGift_TrySaveStamp(const u16 *stamp); +void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 isWonderNews); +bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 isWonderNews); +u32 MysteryGift_CompareCardFlags(const u16 *flagId, const struct MysteryGiftLinkGameData *data, const void *unused); +u32 MysteryGift_CheckStamps(const u16 *stamp, const struct MysteryGiftLinkGameData *data, const void *unused); +bool32 MysteryGift_DoesQuestionnaireMatch(const struct MysteryGiftLinkGameData *data, const u16 *words); +u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *data, u32 stat); +u16 MysteryGift_GetCardStat(u32 stat); +void MysteryGift_DisableStats(void); +bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId); +void MysteryGift_TryIncrementStat(u32 stat, u32 trainerId); #endif //GUARD_MYSTERY_GIFT_H diff --git a/include/mevent_client.h b/include/mystery_gift_client.h similarity index 91% rename from include/mevent_client.h rename to include/mystery_gift_client.h index cc189ccc91..8214d69eff 100644 --- a/include/mevent_client.h +++ b/include/mystery_gift_client.h @@ -1,7 +1,7 @@ -#ifndef GUARD_MEVENT_CLIENT_H -#define GUARD_MEVENT_CLIENT_H +#ifndef GUARD_MYSTERY_GIFT_CLIENT_H +#define GUARD_MYSTERY_GIFT_CLIENT_H -#include "mevent_server_helpers.h" +#include "mystery_gift_link.h" // Return values for client functions called by MysteryGiftClient_Run enum { @@ -31,7 +31,7 @@ enum { CLI_COPY_MSG, CLI_ASK_TOSS, CLI_LOAD_TOSS_RESPONSE, - CLI_RUN_GIFT_SCRIPT, + CLI_RUN_MEVENT_SCRIPT, CLI_SAVE_STAMP, CLI_SAVE_RAM_SCRIPT, CLI_RECV_EREADER_TRAINER, @@ -89,4 +89,4 @@ void MysteryGiftClient_AdvanceState(void); void * MysteryGiftClient_GetMsg(void); void MysteryGiftClient_SetParam(u32 value); -#endif //GUARD_MEVENT_CLIENT_H +#endif //GUARD_MYSTERY_GIFT_CLIENT_H diff --git a/include/mevent_server_helpers.h b/include/mystery_gift_link.h similarity index 91% rename from include/mevent_server_helpers.h rename to include/mystery_gift_link.h index e8556419da..32100db5f1 100644 --- a/include/mevent_server_helpers.h +++ b/include/mystery_gift_link.h @@ -1,5 +1,5 @@ -#ifndef GUARD_MEVENT_SERVER_HELPERS_H -#define GUARD_MEVENT_SERVER_HELPERS_H +#ifndef GUARD_MYSTERY_GIFT_LINK_H +#define GUARD_MYSTERY_GIFT_LINK_H #define MG_LINK_BUFFER_SIZE 0x400 @@ -46,4 +46,4 @@ bool32 MysteryGiftLink_Recv(struct MysteryGiftLink * link); bool32 MysteryGiftLink_Send(struct MysteryGiftLink * link); void MysteryGiftLink_InitRecv(struct MysteryGiftLink * link, u32 ident, void * dest); -#endif //GUARD_MEVENT_SERVER_HELPERS_H +#endif //GUARD_MYSTERY_GIFT_LINK_H diff --git a/include/mystery_gift_menu.h b/include/mystery_gift_menu.h new file mode 100644 index 0000000000..dc30d30519 --- /dev/null +++ b/include/mystery_gift_menu.h @@ -0,0 +1,18 @@ +#ifndef GUARD_MYSTERY_GIFT_MENU_H +#define GUARD_MYSTERY_GIFT_MENU_H + +extern bool8 gGiftIsFromEReader; + +u16 GetMysteryGiftBaseBlock(void); +void CB2_MysteryGiftEReader(void); +void PrintMysteryGiftOrEReaderTopMenu(bool8 isJapanese, bool32 usePickOkCancel); +void MG_DrawCheckerboardPattern(u32 bg); +void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void); +bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str); +void AddTextPrinterToWindow1(const u8 *src); +void CB2_InitEReader(void); +void CB2_InitMysteryGift(void); +void MG_DrawTextBorder(u8 windowId); +s8 DoMysteryGiftYesNo(u8 *textState, u16 *windowId, bool8 yesNoBoxPlacement, const u8 *str); + +#endif //GUARD_MYSTERY_GIFT_MENU_H diff --git a/include/mevent_server.h b/include/mystery_gift_server.h similarity index 93% rename from include/mevent_server.h rename to include/mystery_gift_server.h index 98cb03f6a6..8e3842f73c 100644 --- a/include/mevent_server.h +++ b/include/mystery_gift_server.h @@ -1,7 +1,7 @@ -#ifndef GUARD_MEVENT_SERVER_H -#define GUARD_MEVENT_SERVER_H +#ifndef GUARD_MYSTERY_GIFT_SERVER_H +#define GUARD_MYSTERY_GIFT_SERVER_H -#include "mevent_server_helpers.h" +#include "mystery_gift_link.h" // Return values for Server_* functions. // Other than SVR_RET_END, effectively useless (not checked for). @@ -97,4 +97,4 @@ void MysterGiftServer_CreateForCard(); void MysterGiftServer_CreateForNews(); u32 MysterGiftServer_Run(u16 * endVal); -#endif //GUARD_MEVENT_SERVER_H +#endif //GUARD_MYSTERY_GIFT_SERVER_H diff --git a/include/wonder_transfer.h b/include/mystery_gift_view.h similarity index 85% rename from include/wonder_transfer.h rename to include/mystery_gift_view.h index a9e80b1c7d..038093c7a1 100644 --- a/include/wonder_transfer.h +++ b/include/mystery_gift_view.h @@ -1,5 +1,5 @@ -#ifndef GUARD_WONDER_TRANSFER_H -#define GUARD_WONDER_TRANSFER_H +#ifndef GUARD_MYSTERY_GIFT_VIEW_H +#define GUARD_MYSTERY_GIFT_VIEW_H enum { NEWS_INPUT_A, @@ -21,4 +21,4 @@ u32 WonderNews_GetInput(u16 input); void WonderNews_AddScrollIndicatorArrowPair(void); void WonderNews_RemoveScrollIndicatorArrowPair(void); -#endif //GUARD_WONDER_TRANSFER_H +#endif //GUARD_MYSTERY_GIFT_VIEW_H diff --git a/include/mevent_news.h b/include/wonder_news.h similarity index 69% rename from include/mevent_news.h rename to include/wonder_news.h index b0a0b8f077..68fd59e4ce 100755 --- a/include/mevent_news.h +++ b/include/wonder_news.h @@ -1,5 +1,5 @@ -#ifndef GUARD_MEVENT_NEWS_H -#define GUARD_MEVENT_NEWS_H +#ifndef GUARD_WONDER_NEWS_H +#define GUARD_WONDER_NEWS_H enum { WONDER_NEWS_NONE, @@ -12,4 +12,4 @@ enum { void InitSavedWonderNews(void); void GenerateRandomWonderNews(u32 newsType); -#endif //GUARD_MEVENT_NEWS_H +#endif //GUARD_WONDER_NEWS_H diff --git a/ld_script.txt b/ld_script.txt index 14feda1c01..93babfa163 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -63,16 +63,16 @@ SECTIONS { src/link_rfu_3.o(.text); src/link_rfu_2.o(.text); src/union_room.o(.text); - src/mystery_gift.o(.text); + src/mystery_gift_menu.o(.text); src/union_room_player_avatar.o(.text); src/wireless_communication_status_screen.o(.text); src/union_room_battle.o(.text); - src/mevent2.o(.text); - src/wonder_transfer.o(.text); - src/mevent_server.o(.text); - src/mevent_client.o(.text); - src/mevent_server_helpers.o(.text); - src/mevent_news.o(.text); + src/mystery_gift.o(.text); + src/mystery_gift_view.o(.text); + src/mystery_gift_server.o(.text); + src/mystery_gift_client.o(.text); + src/mystery_gift_link.o(.text); + src/wonder_news.o(.text); src/union_room_chat.o(.text); src/berry_crush.o(.text); src/berry_powder.o(.text); @@ -449,15 +449,15 @@ SECTIONS { src/link_rfu_2.o(.rodata); src/link_rfu_2.o(.rodata.str1.4); src/union_room.o(.rodata); - src/mystery_gift.o(.rodata); + src/mystery_gift_menu.o(.rodata); src/union_room_player_avatar.o(.rodata); src/wireless_communication_status_screen.o(.rodata); src/union_room_battle.o(.rodata); - src/mevent2.o(.rodata); - src/wonder_transfer.o(.rodata); - src/mevent_server.o(.rodata); - src/mevent_client.o(.rodata); - src/mevent_scripts.o(.rodata); + src/mystery_gift.o(.rodata); + src/mystery_gift_view.o(.rodata); + src/mystery_gift_server.o(.rodata); + src/mystery_gift_client.o(.rodata); + src/mystery_gift_scripts.o(.rodata); src/union_room_chat.o(.rodata); src/berry_crush.o(.rodata); src/berry_powder.o(.rodata); @@ -688,7 +688,7 @@ SECTIONS { src/text_input_strings.o(.rodata); data/fonts.o(.rodata); src/mystery_event_msg.o(.rodata); - data/mystery_event.o(.rodata); + data/mystery_gift.o(.rodata); src/m4a_tables.o(.rodata); data/sound_data.o(.rodata); } =0 diff --git a/src/cable_club.c b/src/cable_club.c index 69fcb660b5..3083ed9c0a 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -18,7 +18,7 @@ #include "overworld.h" #include "palette.h" #include "union_room.h" -#include "mevent.h" +#include "mystery_gift.h" #include "script.h" #include "script_pokemon_util.h" #include "sound.h" diff --git a/src/easy_chat.c b/src/easy_chat.c index 79300bd520..b18d09b833 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -15,7 +15,7 @@ #include "graphics.h" #include "international_string_util.h" #include "main.h" -#include "mevent.h" +#include "mystery_gift.h" #include "menu.h" #include "overworld.h" #include "palette.h" diff --git a/src/ereader_screen.c b/src/ereader_screen.c index a76fb09c8c..73a1b870e4 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -4,7 +4,7 @@ #include "ereader_helpers.h" #include "link.h" #include "main.h" -#include "mystery_gift.h" +#include "mystery_gift_menu.h" #include "save.h" #include "sound.h" #include "sprite.h" diff --git a/src/field_specials.c b/src/field_specials.c index 5d7829d12d..2789411a53 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -22,7 +22,7 @@ #include "link.h" #include "list_menu.h" #include "main.h" -#include "mevent.h" +#include "mystery_gift.h" #include "match_call.h" #include "menu.h" #include "overworld.h" @@ -56,7 +56,7 @@ #include "constants/heal_locations.h" #include "constants/map_types.h" #include "constants/maps.h" -#include "constants/mevent.h" +#include "constants/mystery_gift.h" #include "constants/script_menu.h" #include "constants/slot_machine.h" #include "constants/songs.h" diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index 0ab452a8d8..87e9f8e9d2 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -16,7 +16,7 @@ #include "task.h" #include "text.h" #include "save.h" -#include "mystery_gift.h" +#include "mystery_gift_menu.h" enum { RFUSTATE_INIT, diff --git a/src/main_menu.c b/src/main_menu.c index 8fd25abe1a..b245a16663 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -35,7 +35,7 @@ #include "text_window.h" #include "title_screen.h" #include "window.h" -#include "mystery_gift.h" +#include "mystery_gift_menu.h" /* * Main menu state machine diff --git a/src/mevent2.c b/src/mevent2.c deleted file mode 100755 index ce41a0fcd9..0000000000 --- a/src/mevent2.c +++ /dev/null @@ -1,662 +0,0 @@ -#include "global.h" -#include "util.h" -#include "main.h" -#include "event_data.h" -#include "easy_chat.h" -#include "script.h" -#include "battle_tower.h" -#include "mevent_news.h" -#include "string_util.h" -#include "new_game.h" -#include "mevent.h" -#include "constants/mevent.h" - -static EWRAM_DATA bool32 sStatsEnabled = FALSE; - -static void ClearSavedWonderNewsMetadata(void); -static void ClearSavedWonderNews(void); -static void ClearSavedWonderCard(void); -static bool32 ValidateWonderNews(const struct WonderNews *); -static bool32 ValidateWonderCard(const struct WonderCard *); -static void ClearSavedWonderCardMetadata(void); -static void ClearSavedTrainerIds(void); -static void IncrementCardStatForNewTrainer(u32, u32, u32 *, int); - -#define CALC_CRC(data) CalcCRC16WithTable((void *)&(data), sizeof(data)) - -void ClearMysteryGift(void) -{ - CpuFill32(0, &gSaveBlock1Ptr->mysteryGift, sizeof(gSaveBlock1Ptr->mysteryGift)); - ClearSavedWonderNewsMetadata(); // Clear is redundant, InitSavedWonderNews would be sufficient - InitQuestionnaireWords(); -} - -struct WonderNews *GetSavedWonderNews(void) -{ - return &gSaveBlock1Ptr->mysteryGift.news; -} - -struct WonderCard *GetSavedWonderCard(void) -{ - return &gSaveBlock1Ptr->mysteryGift.card; -} - -struct WonderCardMetadata *GetSavedWonderCardMetadata(void) -{ - return &gSaveBlock1Ptr->mysteryGift.cardMetadata; -} - -struct WonderNewsMetadata *GetSavedWonderNewsMetadata(void) -{ - return &gSaveBlock1Ptr->mysteryGift.newsMetadata; -} - -u16 *GetQuestionnaireWordsPtr(void) -{ - return gSaveBlock1Ptr->mysteryGift.questionnaireWords; -} - -// Equivalent to ClearSavedWonderCardAndRelated, but nothing else to clear -void ClearSavedWonderNewsAndRelated(void) -{ - ClearSavedWonderNews(); -} - -bool32 SaveWonderNews(const struct WonderNews *news) -{ - if (!ValidateWonderNews(news)) - return FALSE; - - ClearSavedWonderNews(); - gSaveBlock1Ptr->mysteryGift.news = *news; - gSaveBlock1Ptr->mysteryGift.newsCrc = CALC_CRC(gSaveBlock1Ptr->mysteryGift.news); - return TRUE; -} - -bool32 ValidateSavedWonderNews(void) -{ - if (CALC_CRC(gSaveBlock1Ptr->mysteryGift.news) != gSaveBlock1Ptr->mysteryGift.newsCrc) - return FALSE; - if (!ValidateWonderNews(&gSaveBlock1Ptr->mysteryGift.news)) - return FALSE; - - return TRUE; -} - -static bool32 ValidateWonderNews(const struct WonderNews *news) -{ - if (news->id == 0) - return FALSE; - - return TRUE; -} - -bool32 IsSendingSavedWonderNewsAllowed(void) -{ - const struct WonderNews *news = &gSaveBlock1Ptr->mysteryGift.news; - if (news->sendType == SEND_TYPE_DISALLOWED) - return FALSE; - - return TRUE; -} - -static void ClearSavedWonderNews(void) -{ - CpuFill32(0, GetSavedWonderNews(), sizeof(gSaveBlock1Ptr->mysteryGift.news)); - gSaveBlock1Ptr->mysteryGift.newsCrc = 0; -} - -static void ClearSavedWonderNewsMetadata(void) -{ - CpuFill32(0, GetSavedWonderNewsMetadata(), sizeof(gSaveBlock1Ptr->mysteryGift.newsMetadata)); - InitSavedWonderNews(); -} - -bool32 IsWonderNewsSameAsSaved(const u8 *news) -{ - const u8 *savedNews = (const u8 *)&gSaveBlock1Ptr->mysteryGift.news; - u32 i; - if (!ValidateSavedWonderNews()) - return FALSE; - - for (i = 0; i < sizeof(gSaveBlock1Ptr->mysteryGift.news); i++) - { - if (savedNews[i] != news[i]) - return FALSE; - } - - return TRUE; -} - -void ClearSavedWonderCardAndRelated(void) -{ - ClearSavedWonderCard(); - ClearSavedWonderCardMetadata(); - ClearSavedTrainerIds(); - ClearRamScript(); - ClearMysteryGiftFlags(); - ClearMysteryGiftVars(); - ClearEReaderTrainer(&gSaveBlock2Ptr->frontier.ereaderTrainer); -} - -bool32 SaveWonderCard(const struct WonderCard *card) -{ - struct WonderCardMetadata *metadata; - if (!ValidateWonderCard(card)) - return FALSE; - - ClearSavedWonderCardAndRelated(); - memcpy(&gSaveBlock1Ptr->mysteryGift.card, card, sizeof(struct WonderCard)); - gSaveBlock1Ptr->mysteryGift.cardCrc = CALC_CRC(gSaveBlock1Ptr->mysteryGift.card); - metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; - metadata->iconSpecies = (&gSaveBlock1Ptr->mysteryGift.card)->iconSpecies; - return TRUE; -} - -bool32 ValidateSavedWonderCard(void) -{ - if (gSaveBlock1Ptr->mysteryGift.cardCrc != CALC_CRC(gSaveBlock1Ptr->mysteryGift.card)) - return FALSE; - if (!ValidateWonderCard(&gSaveBlock1Ptr->mysteryGift.card)) - return FALSE; - if (!ValidateSavedRamScript()) - return FALSE; - - return TRUE; -} - -static bool32 ValidateWonderCard(const struct WonderCard *card) -{ - if (card->flagId == 0) - return FALSE; - if (card->type >= CARD_TYPE_COUNT) - return FALSE; - if (!(card->sendType == SEND_TYPE_DISALLOWED - || card->sendType == SEND_TYPE_ALLOWED - || card->sendType == SEND_TYPE_ALLOWED_ALWAYS)) - return FALSE; - if (card->bgType >= NUM_WONDER_BGS) - return FALSE; - if (card->maxStamps > MAX_STAMP_CARD_STAMPS) - return FALSE; - - return TRUE; -} - -bool32 IsSendingSavedWonderCardAllowed(void) -{ - const struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->sendType == SEND_TYPE_DISALLOWED) - return FALSE; - - return TRUE; -} - -static void ClearSavedWonderCard(void) -{ - CpuFill32(0, &gSaveBlock1Ptr->mysteryGift.card, sizeof(gSaveBlock1Ptr->mysteryGift.card)); - gSaveBlock1Ptr->mysteryGift.cardCrc = 0; -} - -static void ClearSavedWonderCardMetadata(void) -{ - CpuFill32(0, GetSavedWonderCardMetadata(), sizeof(gSaveBlock1Ptr->mysteryGift.cardMetadata)); - gSaveBlock1Ptr->mysteryGift.cardMetadataCrc = 0; -} - -u16 GetWonderCardFlagID(void) -{ - if (ValidateSavedWonderCard()) - return gSaveBlock1Ptr->mysteryGift.card.flagId; - - return 0; -} - -void DisableWonderCardSending(struct WonderCard *card) -{ - if (card->sendType == SEND_TYPE_ALLOWED) - card->sendType = SEND_TYPE_DISALLOWED; -} - -static bool32 IsWonderCardFlagIDInValidRange(u16 flagId) -{ - if (flagId >= WONDER_CARD_FLAG_OFFSET && flagId < WONDER_CARD_FLAG_OFFSET + NUM_WONDER_CARD_FLAGS) - return TRUE; - - return FALSE; -} - -static const u16 sReceivedGiftFlags[] = -{ - FLAG_RECEIVED_AURORA_TICKET, - FLAG_RECEIVED_MYSTIC_TICKET, - FLAG_RECEIVED_OLD_SEA_MAP, - FLAG_WONDER_CARD_UNUSED_1, - FLAG_WONDER_CARD_UNUSED_2, - FLAG_WONDER_CARD_UNUSED_3, - FLAG_WONDER_CARD_UNUSED_4, - FLAG_WONDER_CARD_UNUSED_5, - FLAG_WONDER_CARD_UNUSED_6, - FLAG_WONDER_CARD_UNUSED_7, - FLAG_WONDER_CARD_UNUSED_8, - FLAG_WONDER_CARD_UNUSED_9, - FLAG_WONDER_CARD_UNUSED_10, - FLAG_WONDER_CARD_UNUSED_11, - FLAG_WONDER_CARD_UNUSED_12, - FLAG_WONDER_CARD_UNUSED_13, - FLAG_WONDER_CARD_UNUSED_14, - FLAG_WONDER_CARD_UNUSED_15, - FLAG_WONDER_CARD_UNUSED_16, - FLAG_WONDER_CARD_UNUSED_17, -}; - -bool32 IsSavedWonderCardGiftNotReceived(void) -{ - u16 value = GetWonderCardFlagID(); - if (!IsWonderCardFlagIDInValidRange(value)) - return FALSE; - - // If flag is set, player has received gift from this card - if (FlagGet(sReceivedGiftFlags[value - WONDER_CARD_FLAG_OFFSET]) == TRUE) - return FALSE; - - return TRUE; -} - -static int GetNumStampsInMetadata(const struct WonderCardMetadata *data, int size) -{ - int numStamps = 0; - int i; - for (i = 0; i < size; i++) - { - if (data->stampData[STAMP_ID][i] && data->stampData[STAMP_SPECIES][i] != SPECIES_NONE) - numStamps++; - } - - return numStamps; -} - -static bool32 IsStampInMetadata(const struct WonderCardMetadata *metadata, const u16 *stamp, int maxStamps) -{ - int i; - for (i = 0; i < maxStamps; i++) - { - if (metadata->stampData[STAMP_ID][i] == stamp[STAMP_ID]) - return TRUE; - if (metadata->stampData[STAMP_SPECIES][i] == stamp[STAMP_SPECIES]) - return TRUE; - } - - return FALSE; -} - -static bool32 ValidateStamp(const u16 *stamp) -{ - if (stamp[STAMP_ID] == 0) - return FALSE; - if (stamp[STAMP_SPECIES] == SPECIES_NONE) - return FALSE; - if (stamp[STAMP_SPECIES] >= NUM_SPECIES) - return FALSE; - return TRUE; -} - -static int GetNumStampsInSavedCard(void) -{ - struct WonderCard *card; - if (!ValidateSavedWonderCard()) - return 0; - - card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->type != CARD_TYPE_STAMP) - return 0; - - return GetNumStampsInMetadata(&gSaveBlock1Ptr->mysteryGift.cardMetadata, card->maxStamps); -} - -bool32 MysteryGift_TrySaveStamp(const u16 *stamp) -{ - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - int maxStamps = card->maxStamps; - int i; - if (!ValidateStamp(stamp)) - return FALSE; - - if (IsStampInMetadata(&gSaveBlock1Ptr->mysteryGift.cardMetadata, stamp, maxStamps)) - return FALSE; - - for (i = 0; i < maxStamps; i++) - { - if (gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_ID][i] == 0 - && gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_SPECIES][i] == SPECIES_NONE) - { - gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_ID][i] = stamp[STAMP_ID]; - gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_SPECIES][i] = stamp[STAMP_SPECIES]; - return TRUE; - } - } - - return FALSE; -} - -#define GAME_DATA_VALID_VAR 0x101 -#define GAME_DATA_VALID_GIFT_TYPE_1 (1 << 2) -#define GAME_DATA_VALID_GIFT_TYPE_2 (1 << 9) - -void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 isWonderNews) -{ - int i; - CpuFill32(0, data, sizeof(*data)); - data->validationVar = GAME_DATA_VALID_VAR; - data->validationFlag1 = 1; - data->validationFlag2 = 1; - - if (isWonderNews) - { - // Despite setting these for News, they are - // only ever checked for Cards - data->validationGiftType1 = GAME_DATA_VALID_GIFT_TYPE_1 | 1; - data->validationGiftType2 = GAME_DATA_VALID_GIFT_TYPE_2 | 1; - } - else // Wonder Card - { - data->validationGiftType1 = GAME_DATA_VALID_GIFT_TYPE_1; - data->validationGiftType2 = GAME_DATA_VALID_GIFT_TYPE_2; - } - - if (ValidateSavedWonderCard()) - { - data->flagId = GetSavedWonderCard()->flagId; - data->cardMetadata = *GetSavedWonderCardMetadata(); - data->maxStamps = GetSavedWonderCard()->maxStamps; - } - else - { - data->flagId = 0; - } - - for (i = 0; i < NUM_QUESTIONNAIRE_WORDS; i++) - data->questionnaireWords[i] = gSaveBlock1Ptr->mysteryGift.questionnaireWords[i]; - - CopyTrainerId(data->playerTrainerId, gSaveBlock2Ptr->playerTrainerId); - StringCopy(data->playerName, gSaveBlock2Ptr->playerName); - for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) - data->easyChatProfile[i] = gSaveBlock1Ptr->easyChatProfile[i]; - - memcpy(data->romHeaderGameCode, RomHeaderGameCode, GAME_CODE_LENGTH); - data->romHeaderSoftwareVersion = RomHeaderSoftwareVersion; -} - -bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 isWonderNews) -{ - if (data->validationVar != GAME_DATA_VALID_VAR) - return FALSE; - - if (!(data->validationFlag1 & 1)) - return FALSE; - - if (!(data->validationFlag2 & 1)) - return FALSE; - - if (!isWonderNews) - { - if (!(data->validationGiftType1 & GAME_DATA_VALID_GIFT_TYPE_1)) - return FALSE; - - if (!(data->validationGiftType2 & (GAME_DATA_VALID_GIFT_TYPE_2 | 0x180))) - return FALSE; - } - - return TRUE; -} - -u32 MysteryGift_CompareCardFlags(const u16 *flagId, const struct MysteryGiftLinkGameData *data, const void *unused) -{ - // Has a Wonder Card already? - if (data->flagId == 0) - return HAS_NO_CARD; - - // Has this Wonder Card already? - if (*flagId == data->flagId) - return HAS_SAME_CARD; - - // Player has a different Wonder Card - return HAS_DIFF_CARD; -} - -// This is referenced by the Mystery Gift server, but the instruction it's referenced in is never used, -// so the return values here are never checked by anything. -u32 MysteryGift_CheckStamps(const u16 *stamp, const struct MysteryGiftLinkGameData *data, const void *unused) -{ - int stampsMissing = data->maxStamps - GetNumStampsInMetadata(&data->cardMetadata, data->maxStamps); - - // Has full stamp card? - if (stampsMissing == 0) - return 1; - - // Already has stamp? - if (IsStampInMetadata(&data->cardMetadata, stamp, data->maxStamps)) - return 3; - - // Only 1 empty stamp left? - if (stampsMissing == 1) - return 4; - - // This is a new stamp - return 2; -} - -bool32 MysteryGift_DoesQuestionnaireMatch(const struct MysteryGiftLinkGameData *data, const u16 *words) -{ - int i; - for (i = 0; i < NUM_QUESTIONNAIRE_WORDS; i++) - { - if (data->questionnaireWords[i] != words[i]) - return FALSE; - } - - return TRUE; -} - -static int GetNumStampsInLinkData(const struct MysteryGiftLinkGameData *data) -{ - return GetNumStampsInMetadata(&data->cardMetadata, data->maxStamps); -} - -u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *data, u32 stat) -{ - switch (stat) - { - case CARD_STAT_BATTLES_WON: - return data->cardMetadata.battlesWon; - case CARD_STAT_BATTLES_LOST: - return data->cardMetadata.battlesLost; - case CARD_STAT_NUM_TRADES: - return data->cardMetadata.numTrades; - case CARD_STAT_NUM_STAMPS: - return GetNumStampsInLinkData(data); - case CARD_STAT_MAX_STAMPS: - return data->maxStamps; - default: - AGB_ASSERT(0); - return 0; - } -} - -static void IncrementCardStat(u32 statType) -{ - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->type == CARD_TYPE_LINK_STAT) - { - u16 *stat = NULL; - switch (statType) - { - case CARD_STAT_BATTLES_WON: - stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.battlesWon; - break; - case CARD_STAT_BATTLES_LOST: - stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.battlesLost; - break; - case CARD_STAT_NUM_TRADES: - stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.numTrades; - break; - case CARD_STAT_NUM_STAMPS: // Unused - case CARD_STAT_MAX_STAMPS: // Unused - break; - } - - if (stat == NULL) - AGB_ASSERT(0); - else if (++(*stat) > MAX_WONDER_CARD_STAT) - *stat = MAX_WONDER_CARD_STAT; - } -} - -u16 MysteryGift_GetCardStat(u32 stat) -{ - switch (stat) - { - case CARD_STAT_BATTLES_WON: - { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->type == CARD_TYPE_LINK_STAT) - { - struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; - return metadata->battlesWon; - } - break; - } - case CARD_STAT_BATTLES_LOST: - { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->type == CARD_TYPE_LINK_STAT) - { - struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; - return metadata->battlesLost; - } - break; - } - case CARD_STAT_NUM_TRADES: - { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->type == CARD_TYPE_LINK_STAT) - { - struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; - return metadata->numTrades; - } - break; - } - case CARD_STAT_NUM_STAMPS: - { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->type == CARD_TYPE_STAMP) - return GetNumStampsInSavedCard(); - break; - } - case CARD_STAT_MAX_STAMPS: - { - struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; - if (card->type == CARD_TYPE_STAMP) - return card->maxStamps; - break; - } - } - - AGB_ASSERT(0); - return 0; -} - -void MysteryGift_DisableStats(void) -{ - sStatsEnabled = FALSE; -} - -bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId) -{ - sStatsEnabled = FALSE; - if (flagId == 0) - return FALSE; - - if (!ValidateSavedWonderCard()) - return FALSE; - - if (gSaveBlock1Ptr->mysteryGift.card.flagId != flagId) - return FALSE; - - sStatsEnabled = TRUE; - return TRUE; -} - -void MysteryGift_TryIncrementStat(u32 stat, u32 trainerId) -{ - if (sStatsEnabled) - { - switch (stat) - { - case CARD_STAT_NUM_TRADES: - IncrementCardStatForNewTrainer(CARD_STAT_NUM_TRADES, - trainerId, - gSaveBlock1Ptr->mysteryGift.trainerIds[1], - ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[1])); - break; - case CARD_STAT_BATTLES_WON: - IncrementCardStatForNewTrainer(CARD_STAT_BATTLES_WON, - trainerId, - gSaveBlock1Ptr->mysteryGift.trainerIds[0], - ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[0])); - break; - case CARD_STAT_BATTLES_LOST: - IncrementCardStatForNewTrainer(CARD_STAT_BATTLES_LOST, - trainerId, - gSaveBlock1Ptr->mysteryGift.trainerIds[0], - ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[0])); - break; - default: - AGB_ASSERT(0); - break; - } - } -} - -static void ClearSavedTrainerIds(void) -{ - CpuFill32(0, gSaveBlock1Ptr->mysteryGift.trainerIds, sizeof(gSaveBlock1Ptr->mysteryGift.trainerIds)); -} - -// Returns TRUE if it's a new trainer id, FALSE if an existing one. -// In either case the given trainerId is saved in element 0 -static bool32 RecordTrainerId(u32 trainerId, u32 *trainerIds, int size) -{ - int i, j; - - for (i = 0; i < size; i++) - { - if (trainerIds[i] == trainerId) - break; - } - - if (i == size) - { - // New trainer, shift array and insert new id at front - for (j = size - 1; j > 0; j--) - trainerIds[j] = trainerIds[j - 1]; - - trainerIds[0] = trainerId; - return TRUE; - } - else - { - // Existing trainer, shift back to old slot and move id to front - for (j = i; j > 0; j--) - trainerIds[j] = trainerIds[j - 1]; - - trainerIds[0] = trainerId; - return FALSE; - } -} - -static void IncrementCardStatForNewTrainer(u32 stat, u32 trainerId, u32 *trainerIds, int size) -{ - if (RecordTrainerId(trainerId, trainerIds, size)) - IncrementCardStat(stat); -} diff --git a/src/mystery_event_msg.c b/src/mystery_event_msg.c index e0e70a218d..51141bb77e 100644 --- a/src/mystery_event_msg.c +++ b/src/mystery_event_msg.c @@ -1,13 +1,13 @@ #include "global.h" -const u8 gText_MysteryGiftBerry[] = _("Obtained a {STR_VAR_2} BERRY!\nDad has it at PETALBURG GYM."); -const u8 gText_MysteryGiftBerryTransform[] = _("The {STR_VAR_1} BERRY transformed into\none {STR_VAR_2} BERRY."); -const u8 gText_MysteryGiftBerryObtained[] = _("The {STR_VAR_1} BERRY has already been\nobtained."); -const u8 gText_MysteryGiftSpecialRibbon[] = _("A special RIBBON was awarded to\nyour party POKéMON."); -const u8 gText_MysteryGiftNationalDex[] = _("The POKéDEX has been upgraded\nwith the NATIONAL MODE."); -const u8 gText_MysteryGiftRareWord[] = _("A rare word has been added."); -const u8 gText_MysteryGiftSentOver[] = _("{STR_VAR_1} was sent over!"); -const u8 gText_MysteryGiftFullParty[] = _("Your party is full.\n{STR_VAR_1} could not be sent over."); -const u8 gText_MysteryGiftNewTrainer[] = _("A new TRAINER has arrived in\nHOENN."); -const u8 gText_MysteryGiftNewAdversaryInBattleTower[] = _("A new adversary has arrived in the\nBATTLE TOWER."); -const u8 gText_MysteryGiftCantBeUsed[] = _("This data can't be used in\nthis version."); +const u8 gText_MysteryEventBerry[] = _("Obtained a {STR_VAR_2} BERRY!\nDad has it at PETALBURG GYM."); +const u8 gText_MysteryEventBerryTransform[] = _("The {STR_VAR_1} BERRY transformed into\none {STR_VAR_2} BERRY."); +const u8 gText_MysteryEventBerryObtained[] = _("The {STR_VAR_1} BERRY has already been\nobtained."); +const u8 gText_MysteryEventSpecialRibbon[] = _("A special RIBBON was awarded to\nyour party POKéMON."); +const u8 gText_MysteryEventNationalDex[] = _("The POKéDEX has been upgraded\nwith the NATIONAL MODE."); +const u8 gText_MysteryEventRareWord[] = _("A rare word has been added."); +const u8 gText_MysteryEventSentOver[] = _("{STR_VAR_1} was sent over!"); +const u8 gText_MysteryEventFullParty[] = _("Your party is full.\n{STR_VAR_1} could not be sent over."); +const u8 gText_MysteryEventNewTrainer[] = _("A new TRAINER has arrived in\nHOENN."); +const u8 gText_MysteryEventNewAdversaryInBattleTower[] = _("A new adversary has arrived in the\nBATTLE TOWER."); +const u8 gText_MysteryEventCantBeUsed[] = _("This data can't be used in\nthis version."); diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index 7b5e8ebe5c..f80240006f 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -43,7 +43,7 @@ static bool32 CheckCompatibility(u16 a1, u32 a2, u16 a3, u32 a4) static void SetIncompatible(void) { - StringExpandPlaceholders(gStringVar4, gText_MysteryGiftCantBeUsed); + StringExpandPlaceholders(gStringVar4, gText_MysteryEventCantBeUsed); SetMysteryEventScriptStatus(3); } @@ -65,12 +65,12 @@ static bool32 RunMysteryEventScriptCommand(struct ScriptContext *ctx) return FALSE; } -void InitMysteryGiftScriptContext(u8 *script) +void InitMysteryEventScriptContext(u8 *script) { InitMysteryEventScript(&sMysteryEventScriptContext, script); } -bool32 RunMysteryGiftScriptContextCommand(u32 *script) +bool32 RunMysteryEventScriptContextCommand(u32 *script) { bool32 ret = RunMysteryEventScriptCommand(&sMysteryEventScriptContext); *script = sMysteryEventScriptContext.data[2]; @@ -229,17 +229,17 @@ bool8 MEScrCmd_setenigmaberry(struct ScriptContext *ctx) if (!haveBerry) { str = gStringVar4; - message = gText_MysteryGiftBerry; + message = gText_MysteryEventBerry; } else if (StringCompare(gStringVar1, gStringVar2)) { str = gStringVar4; - message = gText_MysteryGiftBerryTransform; + message = gText_MysteryEventBerryTransform; } else { str = gStringVar4; - message = gText_MysteryGiftBerryObtained; + message = gText_MysteryEventBerryObtained; } StringExpandPlaceholders(str, message); @@ -259,7 +259,7 @@ bool8 MEScrCmd_giveribbon(struct ScriptContext *ctx) u8 index = ScriptReadByte(ctx); u8 ribbonId = ScriptReadByte(ctx); GiveGiftRibbonToParty(index, ribbonId); - StringExpandPlaceholders(gStringVar4, gText_MysteryGiftSpecialRibbon); + StringExpandPlaceholders(gStringVar4, gText_MysteryEventSpecialRibbon); ctx->data[2] = 2; return FALSE; } @@ -278,7 +278,7 @@ bool8 MEScrCmd_initramscript(struct ScriptContext *ctx) bool8 MEScrCmd_givenationaldex(struct ScriptContext *ctx) { EnableNationalPokedex(); - StringExpandPlaceholders(gStringVar4, gText_MysteryGiftNationalDex); + StringExpandPlaceholders(gStringVar4, gText_MysteryEventNationalDex); ctx->data[2] = 2; return FALSE; } @@ -286,7 +286,7 @@ bool8 MEScrCmd_givenationaldex(struct ScriptContext *ctx) bool8 MEScrCmd_addrareword(struct ScriptContext *ctx) { UnlockAdditionalPhrase(ScriptReadByte(ctx)); - StringExpandPlaceholders(gStringVar4, gText_MysteryGiftRareWord); + StringExpandPlaceholders(gStringVar4, gText_MysteryEventRareWord); ctx->data[2] = 2; return FALSE; } @@ -320,7 +320,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) if (gPlayerPartyCount == PARTY_SIZE) { - StringExpandPlaceholders(gStringVar4, gText_MysteryGiftFullParty); + StringExpandPlaceholders(gStringVar4, gText_MysteryEventFullParty); ctx->data[2] = 3; } else @@ -340,7 +340,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) GiveMailToMon2(&gPlayerParty[PARTY_SIZE - 1], &mail); CompactPartySlots(); CalculatePlayerPartyCount(); - StringExpandPlaceholders(gStringVar4, gText_MysteryGiftSentOver); + StringExpandPlaceholders(gStringVar4, gText_MysteryEventSentOver); ctx->data[2] = 2; } @@ -352,7 +352,7 @@ bool8 MEScrCmd_addtrainer(struct ScriptContext *ctx) u32 data = ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]; memcpy(&gSaveBlock2Ptr->frontier.ereaderTrainer, (void *)data, sizeof(gSaveBlock2Ptr->frontier.ereaderTrainer)); ValidateEReaderTrainer(); - StringExpandPlaceholders(gStringVar4, gText_MysteryGiftNewTrainer); + StringExpandPlaceholders(gStringVar4, gText_MysteryEventNewTrainer); ctx->data[2] = 2; return FALSE; } diff --git a/src/mystery_gift.c b/src/mystery_gift.c old mode 100644 new mode 100755 index bc6e8c44b8..1df6533d96 --- a/src/mystery_gift.c +++ b/src/mystery_gift.c @@ -1,1618 +1,662 @@ #include "global.h" +#include "util.h" #include "main.h" -#include "text.h" -#include "task.h" -#include "malloc.h" -#include "gpu_regs.h" -#include "scanline_effect.h" -#include "text_window.h" -#include "bg.h" -#include "window.h" -#include "strings.h" -#include "text_window.h" -#include "menu.h" -#include "palette.h" -#include "constants/songs.h" -#include "sound.h" -#include "mystery_gift.h" -#include "union_room.h" -#include "title_screen.h" -#include "ereader_screen.h" -#include "international_string_util.h" -#include "list_menu.h" -#include "string_util.h" -#include "mevent.h" -#include "wonder_transfer.h" -#include "save.h" -#include "link.h" -#include "mevent_client.h" #include "event_data.h" -#include "link_rfu.h" -#include "mevent_news.h" -#include "mevent_server.h" -#include "constants/cable_club.h" +#include "easy_chat.h" +#include "script.h" +#include "battle_tower.h" +#include "wonder_news.h" +#include "string_util.h" +#include "new_game.h" +#include "mystery_gift.h" +#include "constants/mystery_gift.h" -#define LIST_MENU_TILE_NUM 10 -#define LIST_MENU_PAL_NUM 224 +static EWRAM_DATA bool32 sStatsEnabled = FALSE; -static void LoadMysteryGiftTextboxBorder(u8 bgId); -static void CreateMysteryGiftTask(void); -static void Task_MysteryGift(u8 taskId); +static void ClearSavedWonderNewsMetadata(void); +static void ClearSavedWonderNews(void); +static void ClearSavedWonderCard(void); +static bool32 ValidateWonderNews(const struct WonderNews *); +static bool32 ValidateWonderCard(const struct WonderCard *); +static void ClearSavedWonderCardMetadata(void); +static void ClearSavedTrainerIds(void); +static void IncrementCardStatForNewTrainer(u32, u32, u32 *, int); -EWRAM_DATA static u8 sDownArrowCounterAndYCoordIdx[8] = {}; -EWRAM_DATA bool8 gGiftIsFromEReader = FALSE; +#define CALC_CRC(data) CalcCRC16WithTable((void *)&(data), sizeof(data)) -static const u16 sTextboxBorder_Pal[] = INCBIN_U16("graphics/interface/mystery_gift_textbox_border.gbapal"); -static const u32 sTextboxBorder_Gfx[] = INCBIN_U32("graphics/interface/mystery_gift_textbox_border.4bpp.lz"); - -struct MysteryGiftTaskData +void ClearMysteryGift(void) { - u16 var; // Multipurpose - u16 unused1; - u16 unused2; - u16 unused3; - u8 state; - u8 textState; - u8 unused4; - u8 unused5; - bool8 isWonderNews; - bool8 sourceIsFriend; - u8 msgId; - u8 * clientMsg; -}; - -static const struct BgTemplate sBGTemplates[] = { - { - .bg = 0, - .charBaseIndex = 2, - .mapBaseIndex = 15, - .screenSize = 0, - .paletteMode = 0, - .priority = 0, - .baseTile = 0x000 - }, { - .bg = 1, - .charBaseIndex = 0, - .mapBaseIndex = 14, - .screenSize = 0, - .paletteMode = 0, - .priority = 1, - .baseTile = 0x000 - }, { - .bg = 2, - .charBaseIndex = 0, - .mapBaseIndex = 13, - .screenSize = 0, - .paletteMode = 0, - .priority = 2, - .baseTile = 0x000 - }, { - .bg = 3, - .charBaseIndex = 0, - .mapBaseIndex = 12, - .screenSize = 0, - .paletteMode = 0, - .priority = 3, - .baseTile = 0x000 - } -}; - -static const struct WindowTemplate sMainWindows[] = { - { - .bg = 0, - .tilemapLeft = 0, - .tilemapTop = 0, - .width = 30, - .height = 2, - .paletteNum = 12, - .baseBlock = 0x0013 - }, { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 28, - .height = 4, - .paletteNum = 12, - .baseBlock = 0x004f - }, { - .bg = 0, - .tilemapLeft = 0, - .tilemapTop = 15, - .width = 30, - .height = 5, - .paletteNum = 13, - .baseBlock = 0x004f - }, - DUMMY_WIN_TEMPLATE -}; - -static const struct WindowTemplate sWindowTemplate_YesNoMsg_Wide = { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 28, - .height = 4, - .paletteNum = 12, - .baseBlock = 0x00e5 -}; - -static const struct WindowTemplate sWindowTemplate_YesNoMsg = { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 20, - .height = 4, - .paletteNum = 12, - .baseBlock = 0x00e5 -}; - -static const struct WindowTemplate sWindowTemplate_GiftSelect = { - .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 15, - .width = 19, - .height = 4, - .paletteNum = 12, - .baseBlock = 0x00e5 -}; - -static const struct WindowTemplate sWindowTemplate_ThreeOptions = { - .bg = 0, - .tilemapLeft = 8, - .tilemapTop = 6, - .width = 14, - .height = 6, - .paletteNum = 12, - .baseBlock = 0x0155 -}; - -static const struct WindowTemplate sWindowTemplate_YesNoBox = { - .bg = 0, - .tilemapLeft = 23, - .tilemapTop = 15, - .width = 6, - .height = 4, - .paletteNum = 12, - .baseBlock = 0x0155 -}; - -static const struct WindowTemplate sWindowTemplate_GiftSelect_3Options = { - .bg = 0, - .tilemapLeft = 22, - .tilemapTop = 11, - .width = 7, - .height = 8, - .paletteNum = 12, - .baseBlock = 0x0155 -}; - -static const struct WindowTemplate sWindowTemplate_GiftSelect_2Options = { - .bg = 0, - .tilemapLeft = 22, - .tilemapTop = 13, - .width = 7, - .height = 6, - .paletteNum = 12, - .baseBlock = 0x0155 -}; - -static const struct WindowTemplate sWindowTemplate_GiftSelect_1Option = { - .bg = 0, - .tilemapLeft = 22, - .tilemapTop = 15, - .width = 7, - .height = 4, - .paletteNum = 12, - .baseBlock = 0x0155 -}; - -static const struct ListMenuItem sListMenuItems_CardsOrNews[] = { - { gText_WonderCards, 0 }, - { gText_WonderNews, 1 }, - { gText_Exit3, LIST_CANCEL } -}; - -static const struct ListMenuItem sListMenuItems_WirelessOrFriend[] = { - { gText_WirelessCommunication, 0 }, - { gText_Friend2, 1 }, - { gText_Cancel2, LIST_CANCEL } -}; - -static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = { - .items = NULL, - .moveCursorFunc = ListMenuDefaultCursorMoveFunc, - .itemPrintFunc = NULL, - .totalItems = 3, - .maxShowed = 3, - .windowId = 0, - .header_X = 0, - .item_X = 8, - .cursor_X = 0, - .upText_Y = 1, - .cursorPal = 2, - .fillValue = 1, - .cursorShadowPal = 3, - .lettersSpacing = 0, - .itemVerticalPadding = 0, - .scrollMultiple = 0, - .fontId = 1, - .cursorKind = 0 -}; - -static const struct ListMenuItem sListMenuItems_ReceiveSendToss[] = { - { gText_Receive, 0 }, - { gText_Send, 1 }, - { gText_Toss, 2 }, - { gText_Cancel2, LIST_CANCEL } -}; - -static const struct ListMenuItem sListMenuItems_ReceiveToss[] = { - { gText_Receive, 0 }, - { gText_Toss, 2 }, - { gText_Cancel2, LIST_CANCEL } -}; - -static const struct ListMenuItem sListMenuItems_ReceiveSend[] = { - { gText_Receive, 0 }, - { gText_Send, 1 }, - { gText_Cancel2, LIST_CANCEL } -}; - -static const struct ListMenuItem sListMenuItems_Receive[] = { - { gText_Receive, 0 }, - { gText_Cancel2, LIST_CANCEL } -}; - -static const struct ListMenuTemplate sListMenu_ReceiveSendToss = { - .items = sListMenuItems_ReceiveSendToss, - .moveCursorFunc = ListMenuDefaultCursorMoveFunc, - .itemPrintFunc = NULL, - .totalItems = 4, - .maxShowed = 4, - .windowId = 0, - .header_X = 0, - .item_X = 8, - .cursor_X = 0, - .upText_Y = 1, - .cursorPal = 2, - .fillValue = 1, - .cursorShadowPal = 3, - .lettersSpacing = 0, - .itemVerticalPadding = 0, - .scrollMultiple = 0, - .fontId = 1, - .cursorKind = 0 -}; - -static const struct ListMenuTemplate sListMenu_ReceiveToss = { - .items = sListMenuItems_ReceiveToss, - .moveCursorFunc = ListMenuDefaultCursorMoveFunc, - .itemPrintFunc = NULL, - .totalItems = 3, - .maxShowed = 3, - .windowId = 0, - .header_X = 0, - .item_X = 8, - .cursor_X = 0, - .upText_Y = 1, - .cursorPal = 2, - .fillValue = 1, - .cursorShadowPal = 3, - .lettersSpacing = 0, - .itemVerticalPadding = 0, - .scrollMultiple = 0, - .fontId = 1, - .cursorKind = 0 -}; - -static const struct ListMenuTemplate sListMenu_ReceiveSend = { - .items = sListMenuItems_ReceiveSend, - .moveCursorFunc = ListMenuDefaultCursorMoveFunc, - .itemPrintFunc = NULL, - .totalItems = 3, - .maxShowed = 3, - .windowId = 0, - .header_X = 0, - .item_X = 8, - .cursor_X = 0, - .upText_Y = 1, - .cursorPal = 2, - .fillValue = 1, - .cursorShadowPal = 3, - .lettersSpacing = 0, - .itemVerticalPadding = 0, - .scrollMultiple = 0, - .fontId = 1, - .cursorKind = 0 -}; - -static const struct ListMenuTemplate sListMenu_Receive = { - .items = sListMenuItems_Receive, - .moveCursorFunc = ListMenuDefaultCursorMoveFunc, - .itemPrintFunc = NULL, - .totalItems = 2, - .maxShowed = 2, - .windowId = 0, - .header_X = 0, - .item_X = 8, - .cursor_X = 0, - .upText_Y = 1, - .cursorPal = 2, - .fillValue = 1, - .cursorShadowPal = 3, - .lettersSpacing = 0, - .itemVerticalPadding = 0, - .scrollMultiple = 0, - .fontId = 1, - .cursorKind = 0 -}; - -static const u8 *const Unref_082F0710[] = { - gText_VarietyOfEventsImportedWireless, - gText_WonderCardsInPossession, - gText_ReadNewsThatArrived, - gText_ReturnToTitle -}; - -ALIGNED(2) static const u8 sTextColors_TopMenu[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; -ALIGNED(2) static const u8 sTextColors_TopMenu_Copy[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; -ALIGNED(2) static const u8 sMG_Ereader_TextColor_2[] = { TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY }; - -static void VBlankCB_MysteryGiftEReader(void) -{ - ProcessSpriteCopyRequests(); - LoadOam(); - TransferPlttBuffer(); + CpuFill32(0, &gSaveBlock1Ptr->mysteryGift, sizeof(gSaveBlock1Ptr->mysteryGift)); + ClearSavedWonderNewsMetadata(); // Clear is redundant, InitSavedWonderNews would be sufficient + InitQuestionnaireWords(); } -void CB2_MysteryGiftEReader(void) +struct WonderNews *GetSavedWonderNews(void) { - RunTasks(); - RunTextPrinters(); - AnimateSprites(); - BuildOamBuffer(); + return &gSaveBlock1Ptr->mysteryGift.news; } -static bool32 HandleMysteryGiftOrEReaderSetup(s32 isEReader) +struct WonderCard *GetSavedWonderCard(void) { - switch (gMain.state) - { - case 0: - SetVBlankCallback(NULL); - ResetPaletteFade(); - ResetSpriteData(); - FreeAllSpritePalettes(); - ResetTasks(); - ScanlineEffect_Stop(); - ResetBgsAndClearDma3BusyFlags(0); - - InitBgsFromTemplates(0, sBGTemplates, ARRAY_COUNT(sBGTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); - - SetBgTilemapBuffer(3, Alloc(BG_SCREEN_SIZE)); - SetBgTilemapBuffer(2, Alloc(BG_SCREEN_SIZE)); - SetBgTilemapBuffer(1, Alloc(BG_SCREEN_SIZE)); - SetBgTilemapBuffer(0, Alloc(BG_SCREEN_SIZE)); - - LoadMysteryGiftTextboxBorder(3); - InitWindows(sMainWindows); - DeactivateAllTextPrinters(); - ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON); - SetGpuReg(REG_OFFSET_BLDCNT, 0); - SetGpuReg(REG_OFFSET_BLDALPHA, 0); - SetGpuReg(REG_OFFSET_BLDY, 0); - gMain.state++; - break; - case 1: - LoadPalette(sTextboxBorder_Pal, 0, 0x20); - LoadPalette(GetTextWindowPalette(2), 0xd0, 0x20); - Menu_LoadStdPalAt(0xC0); - LoadUserWindowBorderGfx(0, 0xA, 0xE0); - LoadUserWindowBorderGfx_(0, 0x1, 0xF0); - FillBgTilemapBufferRect(0, 0x000, 0, 0, 32, 32, 0x11); - FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); - FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11); - MG_DrawCheckerboardPattern(3); - PrintMysteryGiftOrEReaderTopMenu(isEReader, FALSE); - gMain.state++; - break; - case 2: - CopyBgTilemapBufferToVram(3); - CopyBgTilemapBufferToVram(2); - CopyBgTilemapBufferToVram(1); - CopyBgTilemapBufferToVram(0); - gMain.state++; - break; - case 3: - ShowBg(0); - ShowBg(3); - PlayBGM(MUS_RG_MYSTERY_GIFT); - SetVBlankCallback(VBlankCB_MysteryGiftEReader); - EnableInterrupts(INTR_FLAG_VBLANK | INTR_FLAG_VCOUNT | INTR_FLAG_TIMER3 | INTR_FLAG_SERIAL); - return TRUE; - } - - return FALSE; + return &gSaveBlock1Ptr->mysteryGift.card; } -void CB2_InitMysteryGift(void) +struct WonderCardMetadata *GetSavedWonderCardMetadata(void) { - if (HandleMysteryGiftOrEReaderSetup(FALSE)) - { - SetMainCallback2(CB2_MysteryGiftEReader); - gGiftIsFromEReader = FALSE; - CreateMysteryGiftTask(); - } - RunTasks(); + return &gSaveBlock1Ptr->mysteryGift.cardMetadata; } -void CB2_InitEReader(void) +struct WonderNewsMetadata *GetSavedWonderNewsMetadata(void) { - if (HandleMysteryGiftOrEReaderSetup(TRUE)) - { - SetMainCallback2(CB2_MysteryGiftEReader); - gGiftIsFromEReader = TRUE; - CreateEReaderTask(); - } + return &gSaveBlock1Ptr->mysteryGift.newsMetadata; } -void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void) +u16 *GetQuestionnaireWordsPtr(void) { - gGiftIsFromEReader = FALSE; - FreeAllWindowBuffers(); - Free(GetBgTilemapBuffer(0)); - Free(GetBgTilemapBuffer(1)); - Free(GetBgTilemapBuffer(2)); - Free(GetBgTilemapBuffer(3)); - SetMainCallback2(CB2_InitTitleScreen); + return gSaveBlock1Ptr->mysteryGift.questionnaireWords; } -void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel) +// Equivalent to ClearSavedWonderCardAndRelated, but nothing else to clear +void ClearSavedWonderNewsAndRelated(void) { - const u8 * header; - const u8 * options; - FillWindowPixelBuffer(0, 0); - if (!isEReader) - { - header = gText_MysteryGift; - options = !useCancel ? gText_PickOKExit : gText_PickOKCancel; - } - else - { - header = gJPText_MysteryGift; - options = gJPText_DecideStop; - } - - AddTextPrinterParameterized4(0, 1, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header); - AddTextPrinterParameterized4(0, 0, GetStringRightAlignXOffset(0, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options); - CopyWindowToVram(0, 2); - PutWindowTilemap(0); + ClearSavedWonderNews(); } -void MG_DrawTextBorder(u8 windowId) +bool32 SaveWonderNews(const struct WonderNews *news) { - DrawTextBorderOuter(windowId, 0x01, 0xF); -} - -void MG_DrawCheckerboardPattern(u32 bg) -{ - s32 i = 0, j; - - FillBgTilemapBufferRect(bg, 0x003, 0, 0, 32, 2, 0x11); - - for (i = 0; i < 18; i++) - { - for (j = 0; j < 32; j++) - { - if ((i & 1) != (j & 1)) - FillBgTilemapBufferRect(bg, 1, j, i + 2, 1, 1, 0x11); - else - FillBgTilemapBufferRect(bg, 2, j, i + 2, 1, 1, 0x11); - } - } -} - -static void ClearScreenInBg0(bool32 ignoreTopTwoRows) -{ - switch (ignoreTopTwoRows) - { - case 0: - FillBgTilemapBufferRect(0, 0, 0, 0, 32, 32, 0x11); - break; - case 1: - FillBgTilemapBufferRect(0, 0, 0, 2, 32, 30, 0x11); - break; - } - CopyBgTilemapBufferToVram(0); -} - -void AddTextPrinterToWindow1(const u8 *str) -{ - StringExpandPlaceholders(gStringVar4, str); - FillWindowPixelBuffer(1, 0x11); - AddTextPrinterParameterized4(1, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); - DrawTextBorderOuter(1, 0x001, 0xF); - PutWindowTilemap(1); - CopyWindowToVram(1, 3); -} - -static void ClearTextWindow(void) -{ - rbox_fill_rectangle(1); - ClearWindowTilemap(1); - CopyWindowToVram(1, 1); -} - -#define DOWN_ARROW_X 208 -#define DOWN_ARROW_Y 20 - -bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) -{ - switch (*textState) - { - case 0: - AddTextPrinterToWindow1(str); - (*textState)++; - break; - case 1: - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); - if (({JOY_NEW(A_BUTTON | B_BUTTON);})) - (*textState)++; - break; - case 2: - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); - *textState = 0; - ClearTextWindow(); - return TRUE; - case 0xFF: - *textState = 2; + if (!ValidateWonderNews(news)) return FALSE; - } - return FALSE; -} -static void HideDownArrow(void) -{ - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); -} - -static void ShowDownArrow(void) -{ - DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); -} - -// Unused -static bool32 HideDownArrowAndWaitButton(u8 * textState) -{ - switch (*textState) - { - case 0: - HideDownArrow(); - if (JOY_NEW(A_BUTTON | B_BUTTON)) - (*textState)++; - break; - case 1: - ShowDownArrow(); - *textState = 0; - return TRUE; - } - return FALSE; -} - -static bool32 PrintStringAndWait2Seconds(u8 * counter, const u8 * str) -{ - if (*counter == 0) - AddTextPrinterToWindow1(str); - - if (++(*counter) > 120) - { - *counter = 0; - ClearTextWindow(); - return TRUE; - } - else - { - return FALSE; - } -} - -static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whichMenu) -{ - struct ListMenuTemplate listMenuTemplate = sListMenuTemplate_ThreeOptions; - struct WindowTemplate windowTemplate = sWindowTemplate_ThreeOptions; - s32 width; - s32 response; - - if (whichMenu == 0) - listMenuTemplate.items = sListMenuItems_CardsOrNews; - else - listMenuTemplate.items = sListMenuItems_WirelessOrFriend; - - width = Intl_GetListMenuWidth(&listMenuTemplate); - if (width & 1) - width++; - - windowTemplate.width = width; - if (width < 30) - windowTemplate.tilemapLeft = (30 - width) / 2; - else - windowTemplate.tilemapLeft = 0; - - response = DoMysteryGiftListMenu(&windowTemplate, &listMenuTemplate, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); - if (response != LIST_NOTHING_CHOSEN) - { - ClearWindowTilemap(2); - CopyWindowToVram(2, 1); - } - return response; -} - -s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, const u8 * str) -{ - struct WindowTemplate windowTemplate; - s8 input; - - switch (*textState) - { - case 0: - // Print question message - StringExpandPlaceholders(gStringVar4, str); - if (yesNoBoxPlacement == 0) - *windowId = AddWindow(&sWindowTemplate_YesNoMsg_Wide); - else - *windowId = AddWindow(&sWindowTemplate_YesNoMsg); - FillWindowPixelBuffer(*windowId, 0x11); - AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); - DrawTextBorderOuter(*windowId, 0x001, 0x0F); - CopyWindowToVram(*windowId, 2); - PutWindowTilemap(*windowId); - (*textState)++; - break; - case 1: - // Create Yes/No - windowTemplate = sWindowTemplate_YesNoBox; - if (yesNoBoxPlacement == 0) - windowTemplate.tilemapTop = 9; - else - windowTemplate.tilemapTop = 15; - CreateYesNoMenu(&windowTemplate, 10, 14, 0); - (*textState)++; - break; - case 2: - // Handle Yes/No input - input = Menu_ProcessInputNoWrapClearOnChoose(); - if (input == MENU_B_PRESSED || input == 0 || input == 1) - { - *textState = 0; - rbox_fill_rectangle(*windowId); - ClearWindowTilemap(*windowId); - CopyWindowToVram(*windowId, 1); - RemoveWindow(*windowId); - return input; - } - break; - case 0xFF: - *textState = 0; - rbox_fill_rectangle(*windowId); - ClearWindowTilemap(*windowId); - CopyWindowToVram(*windowId, 1); - RemoveWindow(*windowId); - return MENU_B_PRESSED; - } - - return MENU_NOTHING_CHOSEN; -} - -// Handle the "Receive/Send/Toss" menu that appears when selecting Wonder Card/News -static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotToss, bool32 cannotSend) -{ - struct WindowTemplate windowTemplate; - s32 input; - - switch (*textState) - { - case 0: - // Print menu message - if (!cannotToss) - StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithCards); - else - StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithNews); - *windowId = AddWindow(&sWindowTemplate_GiftSelect); - FillWindowPixelBuffer(*windowId, 0x11); - AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); - DrawTextBorderOuter(*windowId, 0x001, 0x0F); - CopyWindowToVram(*windowId, 2); - PutWindowTilemap(*windowId); - (*textState)++; - break; - case 1: - windowTemplate = sWindowTemplate_YesNoBox; - if (cannotSend) - { - if (!cannotToss) - input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_2Options, &sListMenu_ReceiveToss, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); - else - input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_1Option, &sListMenu_Receive, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); - } - else - { - if (!cannotToss) - input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_3Options, &sListMenu_ReceiveSendToss, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); - else - input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_2Options, &sListMenu_ReceiveSend, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); - } - if (input != LIST_NOTHING_CHOSEN) - { - *textState = 0; - rbox_fill_rectangle(*windowId); - ClearWindowTilemap(*windowId); - CopyWindowToVram(*windowId, 1); - RemoveWindow(*windowId); - return input; - } - break; - case 0xFF: - *textState = 0; - rbox_fill_rectangle(*windowId); - ClearWindowTilemap(*windowId); - CopyWindowToVram(*windowId, 1); - RemoveWindow(*windowId); - return LIST_CANCEL; - } - - return LIST_NOTHING_CHOSEN; -} - -static bool32 ValidateCardOrNews(bool32 isWonderNews) -{ - if (!isWonderNews) - return ValidateSavedWonderCard(); - else - return ValidateSavedWonderNews(); -} - -static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews) -{ - switch (*state) - { - case 0: - if (!isWonderNews) - WonderCard_Init(GetSavedWonderCard(), GetSavedWonderCardMetadata()); - else - WonderNews_Init(GetSavedWonderNews()); - (*state)++; - break; - case 1: - if (!isWonderNews) - { - if (!WonderCard_Enter()) - return FALSE; - } - else - { - if (!WonderNews_Enter()) - return FALSE; - } - *state = 0; - return TRUE; - } - - return FALSE; -} - -static bool32 ClearSavedNewsOrCard(bool32 isWonderNews) -{ - if (!isWonderNews) - ClearSavedWonderCardAndRelated(); - else - ClearSavedWonderNewsAndRelated(); + ClearSavedWonderNews(); + gSaveBlock1Ptr->mysteryGift.news = *news; + gSaveBlock1Ptr->mysteryGift.newsCrc = CALC_CRC(gSaveBlock1Ptr->mysteryGift.news); return TRUE; } -static bool32 ExitWonderCardOrNews(bool32 isWonderNews, bool32 useCancel) +bool32 ValidateSavedWonderNews(void) { - if (!isWonderNews) + if (CALC_CRC(gSaveBlock1Ptr->mysteryGift.news) != gSaveBlock1Ptr->mysteryGift.newsCrc) + return FALSE; + if (!ValidateWonderNews(&gSaveBlock1Ptr->mysteryGift.news)) + return FALSE; + + return TRUE; +} + +static bool32 ValidateWonderNews(const struct WonderNews *news) +{ + if (news->id == 0) + return FALSE; + + return TRUE; +} + +bool32 IsSendingSavedWonderNewsAllowed(void) +{ + const struct WonderNews *news = &gSaveBlock1Ptr->mysteryGift.news; + if (news->sendType == SEND_TYPE_DISALLOWED) + return FALSE; + + return TRUE; +} + +static void ClearSavedWonderNews(void) +{ + CpuFill32(0, GetSavedWonderNews(), sizeof(gSaveBlock1Ptr->mysteryGift.news)); + gSaveBlock1Ptr->mysteryGift.newsCrc = 0; +} + +static void ClearSavedWonderNewsMetadata(void) +{ + CpuFill32(0, GetSavedWonderNewsMetadata(), sizeof(gSaveBlock1Ptr->mysteryGift.newsMetadata)); + InitSavedWonderNews(); +} + +bool32 IsWonderNewsSameAsSaved(const u8 *news) +{ + const u8 *savedNews = (const u8 *)&gSaveBlock1Ptr->mysteryGift.news; + u32 i; + if (!ValidateSavedWonderNews()) + return FALSE; + + for (i = 0; i < sizeof(gSaveBlock1Ptr->mysteryGift.news); i++) { - if (WonderCard_Exit(useCancel)) - { - WonderCard_Destroy(); - return TRUE; - } - else - { + if (savedNews[i] != news[i]) return FALSE; - } - } - else - { - if (WonderNews_Exit(useCancel)) - { - WonderNews_Destroy(); - return TRUE; - } - else - { - return FALSE; - } } + + return TRUE; } -static s32 AskDiscardGift(u8 * textState, u16 * windowId, bool32 isWonderNews) +void ClearSavedWonderCardAndRelated(void) { - if (!isWonderNews) - return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_IfThrowAwayCardEventWontHappen); - else - return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_OkayToDiscardNews); + ClearSavedWonderCard(); + ClearSavedWonderCardMetadata(); + ClearSavedTrainerIds(); + ClearRamScript(); + ClearMysteryGiftFlags(); + ClearMysteryGiftVars(); + ClearEReaderTrainer(&gSaveBlock2Ptr->frontier.ereaderTrainer); } -static bool32 PrintThrownAway(u8 * textState, bool32 isWonderNews) +bool32 SaveWonderCard(const struct WonderCard *card) { - if (!isWonderNews) - return PrintMysteryGiftMenuMessage(textState, gText_WonderCardThrownAway); - else - return PrintMysteryGiftMenuMessage(textState, gText_WonderNewsThrownAway); + struct WonderCardMetadata *metadata; + if (!ValidateWonderCard(card)) + return FALSE; + + ClearSavedWonderCardAndRelated(); + memcpy(&gSaveBlock1Ptr->mysteryGift.card, card, sizeof(struct WonderCard)); + gSaveBlock1Ptr->mysteryGift.cardCrc = CALC_CRC(gSaveBlock1Ptr->mysteryGift.card); + metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; + metadata->iconSpecies = (&gSaveBlock1Ptr->mysteryGift.card)->iconSpecies; + return TRUE; } -static bool32 SaveOnMysteryGiftMenu(u8 * state) +bool32 ValidateSavedWonderCard(void) { - switch (*state) - { - case 0: - AddTextPrinterToWindow1(gText_DataWillBeSaved); - (*state)++; - break; - case 1: - TrySavingData(SAVE_NORMAL); - (*state)++; - break; - case 2: - AddTextPrinterToWindow1(gText_SaveCompletedPressA); - (*state)++; - break; - case 3: - if (JOY_NEW(A_BUTTON | B_BUTTON)) - (*state)++; - break; - case 4: - *state = 0; - ClearTextWindow(); + if (gSaveBlock1Ptr->mysteryGift.cardCrc != CALC_CRC(gSaveBlock1Ptr->mysteryGift.card)) + return FALSE; + if (!ValidateWonderCard(&gSaveBlock1Ptr->mysteryGift.card)) + return FALSE; + if (!ValidateSavedRamScript()) + return FALSE; + + return TRUE; +} + +static bool32 ValidateWonderCard(const struct WonderCard *card) +{ + if (card->flagId == 0) + return FALSE; + if (card->type >= CARD_TYPE_COUNT) + return FALSE; + if (!(card->sendType == SEND_TYPE_DISALLOWED + || card->sendType == SEND_TYPE_ALLOWED + || card->sendType == SEND_TYPE_ALLOWED_ALWAYS)) + return FALSE; + if (card->bgType >= NUM_WONDER_BGS) + return FALSE; + if (card->maxStamps > MAX_STAMP_CARD_STAMPS) + return FALSE; + + return TRUE; +} + +bool32 IsSendingSavedWonderCardAllowed(void) +{ + const struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->sendType == SEND_TYPE_DISALLOWED) + return FALSE; + + return TRUE; +} + +static void ClearSavedWonderCard(void) +{ + CpuFill32(0, &gSaveBlock1Ptr->mysteryGift.card, sizeof(gSaveBlock1Ptr->mysteryGift.card)); + gSaveBlock1Ptr->mysteryGift.cardCrc = 0; +} + +static void ClearSavedWonderCardMetadata(void) +{ + CpuFill32(0, GetSavedWonderCardMetadata(), sizeof(gSaveBlock1Ptr->mysteryGift.cardMetadata)); + gSaveBlock1Ptr->mysteryGift.cardMetadataCrc = 0; +} + +u16 GetWonderCardFlagID(void) +{ + if (ValidateSavedWonderCard()) + return gSaveBlock1Ptr->mysteryGift.card.flagId; + + return 0; +} + +void DisableWonderCardSending(struct WonderCard *card) +{ + if (card->sendType == SEND_TYPE_ALLOWED) + card->sendType = SEND_TYPE_DISALLOWED; +} + +static bool32 IsWonderCardFlagIDInValidRange(u16 flagId) +{ + if (flagId >= WONDER_CARD_FLAG_OFFSET && flagId < WONDER_CARD_FLAG_OFFSET + NUM_WONDER_CARD_FLAGS) return TRUE; - } return FALSE; } -static const u8 * GetClientResultMessage(bool32 * successMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId) +static const u16 sReceivedGiftFlags[] = { - const u8 * msg = NULL; - *successMsg = FALSE; - - switch (msgId) - { - case CLI_MSG_NOTHING_SENT: - *successMsg = FALSE; - msg = gText_NothingSentOver; - break; - case CLI_MSG_RECORD_UPLOADED: - *successMsg = FALSE; - msg = gText_RecordUploadedViaWireless; - break; - case CLI_MSG_CARD_RECEIVED: - *successMsg = TRUE; - msg = !sourceIsFriend ? gText_WonderCardReceived : gText_WonderCardReceivedFrom; - break; - case CLI_MSG_NEWS_RECEIVED: - *successMsg = TRUE; - msg = !sourceIsFriend ? gText_WonderNewsReceived : gText_WonderNewsReceivedFrom; - break; - case CLI_MSG_STAMP_RECEIVED: - *successMsg = TRUE; - msg = gText_NewStampReceived; - break; - case CLI_MSG_HAD_CARD: - *successMsg = FALSE; - msg = gText_AlreadyHadCard; - break; - case CLI_MSG_HAD_STAMP: - *successMsg = FALSE; - msg = gText_AlreadyHadStamp; - break; - case CLI_MSG_HAD_NEWS: - *successMsg = FALSE; - msg = gText_AlreadyHadNews; - break; - case CLI_MSG_NO_ROOM_STAMPS: - *successMsg = FALSE; - msg = gText_NoMoreRoomForStamps; - break; - case CLI_MSG_COMM_CANCELED: - *successMsg = FALSE; - msg = gText_CommunicationCanceled; - break; - case CLI_MSG_CANT_ACCEPT: - *successMsg = FALSE; - msg = !isWonderNews ? gText_CantAcceptCardFromTrainer : gText_CantAcceptNewsFromTrainer; - break; - case CLI_MSG_COMM_ERROR: - *successMsg = FALSE; - msg = gText_CommunicationError; - break; - case CLI_MSG_TRAINER_RECEIVED: - *successMsg = TRUE; - msg = gText_NewTrainerReceived; - break; - case CLI_MSG_BUFFER_SUCCESS: - *successMsg = TRUE; - // msg is NULL, use buffer - break; - case CLI_MSG_BUFFER_FAILURE: - *successMsg = FALSE; - // msg is NULL, use buffer - break; - } - - return msg; -} - -static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer) -{ - switch (*state) - { - case 0: - if (msg != NULL) - AddTextPrinterToWindow1(msg); - PlayFanfare(MUS_OBTAIN_ITEM); - *timer = 0; - (*state)++; - break; - case 1: - if (++(*timer) > 240) - (*state)++; - break; - case 2: - if (IsFanfareTaskInactive()) - { - *state = 0; - ClearTextWindow(); - return TRUE; - } - break; - } - return FALSE; -} - -static const u8 * GetServerResultMessage(bool32 * wonderSuccess, bool8 sourceIsFriend, u32 msgId) -{ - const u8 * result = gText_CommunicationError; - *wonderSuccess = FALSE; - switch (msgId) - { - case SVR_MSG_NOTHING_SENT: - result = gText_NothingSentOver; - break; - case SVR_MSG_RECORD_UPLOADED: - result = gText_RecordUploadedViaWireless; - break; - case SVR_MSG_CARD_SENT: - result = gText_WonderCardSentTo; - *wonderSuccess = TRUE; - break; - case SVR_MSG_NEWS_SENT: - result = gText_WonderNewsSentTo; - *wonderSuccess = TRUE; - break; - case SVR_MSG_STAMP_SENT: - result = gText_StampSentTo; - break; - case SVR_MSG_HAS_CARD: - result = gText_OtherTrainerHasCard; - break; - case SVR_MSG_HAS_STAMP: - result = gText_OtherTrainerHasStamp; - break; - case SVR_MSG_HAS_NEWS: - result = gText_OtherTrainerHasNews; - break; - case SVR_MSG_NO_ROOM_STAMPS: - result = gText_NoMoreRoomForStamps; - break; - case SVR_MSG_CLIENT_CANCELED: - result = gText_OtherTrainerCanceled; - break; - case SVR_MSG_CANT_SEND_GIFT_1: - result = gText_CantSendGiftToTrainer; - break; - case SVR_MSG_COMM_ERROR: - result = gText_CommunicationError; - break; - case SVR_MSG_GIFT_SENT_1: - result = gText_GiftSentTo; - break; - case SVR_MSG_GIFT_SENT_2: - result = gText_GiftSentTo; - break; - case SVR_MSG_CANT_SEND_GIFT_2: - result = gText_CantSendGiftToTrainer; - break; - } - return result; -} - -static bool32 PrintServerResultMessage(u8 * state, u16 * timer, bool8 sourceIsFriend, u32 msgId) -{ - bool32 wonderSuccess; - const u8 * str = GetServerResultMessage(&wonderSuccess, sourceIsFriend, msgId); - if (wonderSuccess) - return PrintSuccessMessage(state, str, timer); - else - return PrintMysteryGiftMenuMessage(state, str); -} - -// States for Task_MysteryGift. -// CLIENT states are for when the player is receiving a gift, and use mevent_client.c link functions. -// SERVER states are for when the player is sending a gift, and use mevent_server.c link functions. -// Other states handle the general Mystery Gift menu usage. -enum { - MG_STATE_TO_MAIN_MENU, - MG_STATE_MAIN_MENU, - MG_STATE_DONT_HAVE_ANY, - MG_STATE_SOURCE_PROMPT, - MG_STATE_SOURCE_PROMPT_INPUT, - MG_STATE_CLIENT_LINK_START, - MG_STATE_CLIENT_LINK_WAIT, - MG_STATE_CLIENT_COMMUNICATING, - MG_STATE_CLIENT_LINK, - MG_STATE_CLIENT_YES_NO, - MG_STATE_CLIENT_MESSAGE, - MG_STATE_CLIENT_ASK_TOSS, - MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED, - MG_STATE_CLIENT_LINK_END, - MG_STATE_CLIENT_COMM_COMPLETED, - MG_STATE_CLIENT_RESULT_MSG, - MG_STATE_CLIENT_ERROR, - MG_STATE_SAVE_LOAD_GIFT, - MG_STATE_LOAD_GIFT, - MG_STATE_UNUSED, - MG_STATE_HANDLE_GIFT_INPUT, - MG_STATE_HANDLE_GIFT_SELECT, - MG_STATE_ASK_TOSS, - MG_STATE_ASK_TOSS_UNRECEIVED, - MG_STATE_TOSS, - MG_STATE_TOSS_SAVE, - MG_STATE_TOSSED, - MG_STATE_GIFT_INPUT_EXIT, - MG_STATE_RECEIVE, - MG_STATE_SEND, - MG_STATE_SERVER_LINK_WAIT, - MG_STATE_SERVER_LINK_START, - MG_STATE_SERVER_LINK, - MG_STATE_SERVER_LINK_END, - MG_STATE_SERVER_LINK_END_WAIT, - MG_STATE_SERVER_RESULT_MSG, - MG_STATE_SERVER_ERROR, - MG_STATE_EXIT, + FLAG_RECEIVED_AURORA_TICKET, + FLAG_RECEIVED_MYSTIC_TICKET, + FLAG_RECEIVED_OLD_SEA_MAP, + FLAG_WONDER_CARD_UNUSED_1, + FLAG_WONDER_CARD_UNUSED_2, + FLAG_WONDER_CARD_UNUSED_3, + FLAG_WONDER_CARD_UNUSED_4, + FLAG_WONDER_CARD_UNUSED_5, + FLAG_WONDER_CARD_UNUSED_6, + FLAG_WONDER_CARD_UNUSED_7, + FLAG_WONDER_CARD_UNUSED_8, + FLAG_WONDER_CARD_UNUSED_9, + FLAG_WONDER_CARD_UNUSED_10, + FLAG_WONDER_CARD_UNUSED_11, + FLAG_WONDER_CARD_UNUSED_12, + FLAG_WONDER_CARD_UNUSED_13, + FLAG_WONDER_CARD_UNUSED_14, + FLAG_WONDER_CARD_UNUSED_15, + FLAG_WONDER_CARD_UNUSED_16, + FLAG_WONDER_CARD_UNUSED_17, }; -static void CreateMysteryGiftTask(void) +bool32 IsSavedWonderCardGiftNotReceived(void) { - u8 taskId = CreateTask(Task_MysteryGift, 0); - struct MysteryGiftTaskData * data = (void *)gTasks[taskId].data; - data->state = MG_STATE_TO_MAIN_MENU; - data->textState = 0; - data->unused4 = 0; - data->unused5 = 0; - data->isWonderNews = 0; - data->sourceIsFriend = 0; - data->var = 0; - data->unused1 = 0; - data->unused2 = 0; - data->unused3 = 0; - data->msgId = 0; - data->clientMsg = AllocZeroed(CLIENT_MAX_MSG_SIZE); + u16 value = GetWonderCardFlagID(); + if (!IsWonderCardFlagIDInValidRange(value)) + return FALSE; + + // If flag is set, player has received gift from this card + if (FlagGet(sReceivedGiftFlags[value - WONDER_CARD_FLAG_OFFSET]) == TRUE) + return FALSE; + + return TRUE; } -static void Task_MysteryGift(u8 taskId) +static int GetNumStampsInMetadata(const struct WonderCardMetadata *data, int size) { - struct MysteryGiftTaskData *data = (void *)gTasks[taskId].data; - u32 successMsg, input; - const u8 *msg; - - switch (data->state) + int numStamps = 0; + int i; + for (i = 0; i < size; i++) { - case MG_STATE_TO_MAIN_MENU: - data->state = MG_STATE_MAIN_MENU; - break; - case MG_STATE_MAIN_MENU: - // Main Mystery Gift menu, player can select Wonder Cards or News (or exit) - switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->var, FALSE)) - { - case 0: // "Wonder Cards" - data->isWonderNews = FALSE; - if (ValidateSavedWonderCard() == TRUE) - data->state = MG_STATE_LOAD_GIFT; - else - data->state = MG_STATE_DONT_HAVE_ANY; - break; - case 1: // "Wonder News" - data->isWonderNews = TRUE; - if (ValidateSavedWonderNews() == TRUE) - data->state = MG_STATE_LOAD_GIFT; - else - data->state = MG_STATE_DONT_HAVE_ANY; - break; - case LIST_CANCEL: - data->state = MG_STATE_EXIT; - break; - } - break; - case MG_STATE_DONT_HAVE_ANY: - { - // Player doesn't have any Wonder Card/News - // Start prompt to ask where to read one from - if (!data->isWonderNews) - { - if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveCardNewOneInput)) - { - data->state = MG_STATE_SOURCE_PROMPT; - PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); - } - } - else - { - if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveNewsNewOneInput)) - { - data->state = MG_STATE_SOURCE_PROMPT; - PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); - } - } - break; + if (data->stampData[STAMP_ID][i] && data->stampData[STAMP_SPECIES][i] != SPECIES_NONE) + numStamps++; } - case MG_STATE_SOURCE_PROMPT: - if (!data->isWonderNews) - AddTextPrinterToWindow1(gText_WhereShouldCardBeAccessed); - else - AddTextPrinterToWindow1(gText_WhereShouldNewsBeAccessed); - data->state = MG_STATE_SOURCE_PROMPT_INPUT; - break; - case MG_STATE_SOURCE_PROMPT_INPUT: - // Choose where to access the Wonder Card/News from - switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->var, TRUE)) - { - case 0: // "Wireless Communication" - ClearTextWindow(); - data->state = MG_STATE_CLIENT_LINK_START; - data->sourceIsFriend = FALSE; - break; - case 1: // "Friend" - ClearTextWindow(); - data->state = MG_STATE_CLIENT_LINK_START; - data->sourceIsFriend = TRUE; - break; - case LIST_CANCEL: - ClearTextWindow(); - if (ValidateCardOrNews(data->isWonderNews)) - { - data->state = MG_STATE_LOAD_GIFT; - } - else - { - data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); - } - break; - } - break; - case MG_STATE_CLIENT_LINK_START: - *gStringVar1 = EOS; - *gStringVar2 = EOS; - *gStringVar3 = EOS; - switch (data->isWonderNews) - { - case FALSE: - if (data->sourceIsFriend == TRUE) - CreateTask_LinkMysteryGiftWithFriend(ACTIVITY_WONDER_CARD); - else if (data->sourceIsFriend == FALSE) - CreateTask_LinkMysteryGiftOverWireless(ACTIVITY_WONDER_CARD); - break; - case TRUE: - if (data->sourceIsFriend == TRUE) - CreateTask_LinkMysteryGiftWithFriend(ACTIVITY_WONDER_NEWS); - else if (data->sourceIsFriend == FALSE) - CreateTask_LinkMysteryGiftOverWireless(ACTIVITY_WONDER_NEWS); - break; - } - data->state = MG_STATE_CLIENT_LINK_WAIT; - break; - case MG_STATE_CLIENT_LINK_WAIT: - if (gReceivedRemoteLinkPlayers != 0) - { - ClearScreenInBg0(TRUE); - data->state = MG_STATE_CLIENT_COMMUNICATING; - MysteryGiftClient_Create(data->isWonderNews); - } - else if (gSpecialVar_Result == LINKUP_FAILED) - { - // Link failed, return to link start menu - ClearScreenInBg0(TRUE); - data->state = MG_STATE_SOURCE_PROMPT; - } - break; - case MG_STATE_CLIENT_COMMUNICATING: - AddTextPrinterToWindow1(gText_Communicating); - data->state = MG_STATE_CLIENT_LINK; - break; - case MG_STATE_CLIENT_LINK: - switch (MysteryGiftClient_Run(&data->var)) - { - case CLI_RET_END: - Rfu_SetCloseLinkCallback(); - data->msgId = data->var; - data->state = MG_STATE_CLIENT_LINK_END; - break; - case CLI_RET_COPY_MSG: - memcpy(data->clientMsg, MysteryGiftClient_GetMsg(), 0x40); - MysteryGiftClient_AdvanceState(); - break; - case CLI_RET_PRINT_MSG: - data->state = MG_STATE_CLIENT_MESSAGE; - break; - case CLI_RET_YES_NO: - data->state = MG_STATE_CLIENT_YES_NO; - break; - case CLI_RET_ASK_TOSS: - data->state = MG_STATE_CLIENT_ASK_TOSS; - StringCopy(gStringVar1, gLinkPlayers[0].name); - break; - } - break; - case MG_STATE_CLIENT_YES_NO: - input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, MysteryGiftClient_GetMsg()); - switch (input) - { - case 0: // Yes - MysteryGiftClient_SetParam(FALSE); - MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_CLIENT_COMMUNICATING; - break; - case 1: // No - case MENU_B_PRESSED: - MysteryGiftClient_SetParam(TRUE); - MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_CLIENT_COMMUNICATING; - break; - } - break; - case MG_STATE_CLIENT_MESSAGE: - if (PrintMysteryGiftMenuMessage(&data->textState, MysteryGiftClient_GetMsg())) - { - MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_CLIENT_COMMUNICATING; - } - break; - case MG_STATE_CLIENT_ASK_TOSS: - // Player is receiving a new Wonder Card/News but needs to toss an existing one to make room. - // Ask for confirmation. - input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, gText_ThrowAwayWonderCard); - switch (input) - { - case 0: // Yes - if (IsSavedWonderCardGiftNotReceived() == TRUE) - { - data->state = MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED; - } - else - { - MysteryGiftClient_SetParam(FALSE); - MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_CLIENT_COMMUNICATING; - } - break; - case 1: // No - case MENU_B_PRESSED: - MysteryGiftClient_SetParam(TRUE); - MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_CLIENT_COMMUNICATING; - break; - } - break; - case MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED: - // Player has selected to toss a Wonder Card that they haven't received the gift for. - // Ask for confirmation again. - input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, gText_HaventReceivedCardsGift); - switch (input) - { - case 0: // Yes - MysteryGiftClient_SetParam(FALSE); - MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_CLIENT_COMMUNICATING; - break; - case 1: // No - case MENU_B_PRESSED: - MysteryGiftClient_SetParam(TRUE); - MysteryGiftClient_AdvanceState(); - data->state = MG_STATE_CLIENT_COMMUNICATING; - break; - } - break; - case MG_STATE_CLIENT_LINK_END: - if (gReceivedRemoteLinkPlayers == 0) - { - DestroyWirelessStatusIndicatorSprite(); - data->state = MG_STATE_CLIENT_COMM_COMPLETED; - } - break; - case MG_STATE_CLIENT_COMM_COMPLETED: - if (PrintStringAndWait2Seconds(&data->textState, gText_CommunicationCompleted)) - { - if (data->sourceIsFriend == TRUE) - StringCopy(gStringVar1, gLinkPlayers[0].name); - data->state = MG_STATE_CLIENT_RESULT_MSG; - } - break; - case MG_STATE_CLIENT_RESULT_MSG: - msg = GetClientResultMessage(&successMsg, data->isWonderNews, data->sourceIsFriend, data->msgId); - if (msg == NULL) - msg = data->clientMsg; - if (successMsg) - input = PrintSuccessMessage(&data->textState, msg, &data->var); - else - input = PrintMysteryGiftMenuMessage(&data->textState, msg); - // input var re-used, here it is TRUE if the message is finished - if (input) - { - if (data->msgId == CLI_MSG_NEWS_RECEIVED) - { - if (data->sourceIsFriend == TRUE) - GenerateRandomWonderNews(WONDER_NEWS_RECV_FRIEND); - else - GenerateRandomWonderNews(WONDER_NEWS_RECV_WIRELESS); - } - if (!successMsg) - { - // Did not receive card/news, return to main menu - data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); - } - else - { - data->state = MG_STATE_SAVE_LOAD_GIFT; - } - } - break; - case MG_STATE_SAVE_LOAD_GIFT: - if (SaveOnMysteryGiftMenu(&data->textState)) - data->state = MG_STATE_LOAD_GIFT; - break; - case MG_STATE_LOAD_GIFT: - if (HandleLoadWonderCardOrNews(&data->textState, data->isWonderNews)) - data->state = MG_STATE_HANDLE_GIFT_INPUT; - break; - case MG_STATE_HANDLE_GIFT_INPUT: - if (!data->isWonderNews) - { - // Handle Wonder Card input - if (JOY_NEW(A_BUTTON)) - data->state = MG_STATE_HANDLE_GIFT_SELECT; - if (JOY_NEW(B_BUTTON)) - data->state = MG_STATE_GIFT_INPUT_EXIT; - } - else - { - switch (WonderNews_GetInput(gMain.newKeys)) - { - case NEWS_INPUT_A: - WonderNews_RemoveScrollIndicatorArrowPair(); - data->state = MG_STATE_HANDLE_GIFT_SELECT; - break; - case NEWS_INPUT_B: - data->state = MG_STATE_GIFT_INPUT_EXIT; - break; - } - } - break; - case MG_STATE_HANDLE_GIFT_SELECT: + return numStamps; +} + +static bool32 IsStampInMetadata(const struct WonderCardMetadata *metadata, const u16 *stamp, int maxStamps) +{ + int i; + for (i = 0; i < maxStamps; i++) { - // A Wonder Card/News has been selected, handle its menu - u32 result; - if (!data->isWonderNews) - { - if (IsSendingSavedWonderCardAllowed()) - result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, FALSE); - else - result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, TRUE); - } - else - { - if (IsSendingSavedWonderNewsAllowed()) - result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, FALSE); - else - result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, TRUE); - } - switch (result) - { - case 0: // Receive - data->state = MG_STATE_RECEIVE; - break; - case 1: // Send - data->state = MG_STATE_SEND; - break; - case 2: // Toss - data->state = MG_STATE_ASK_TOSS; - break; - case LIST_CANCEL: - if (data->isWonderNews == TRUE) - WonderNews_AddScrollIndicatorArrowPair(); - data->state = MG_STATE_HANDLE_GIFT_INPUT; - break; - } - break; + if (metadata->stampData[STAMP_ID][i] == stamp[STAMP_ID]) + return TRUE; + if (metadata->stampData[STAMP_SPECIES][i] == stamp[STAMP_SPECIES]) + return TRUE; } - case MG_STATE_ASK_TOSS: - // Player is attempting to discard a saved Wonder Card/News - switch (AskDiscardGift(&data->textState, &data->var, data->isWonderNews)) - { - case 0: // Yes - if (!data->isWonderNews && IsSavedWonderCardGiftNotReceived() == TRUE) - data->state = MG_STATE_ASK_TOSS_UNRECEIVED; - else - data->state = MG_STATE_TOSS; - break; - case 1: // No - case MENU_B_PRESSED: - data->state = MG_STATE_HANDLE_GIFT_SELECT; - break; - } - break; - case MG_STATE_ASK_TOSS_UNRECEIVED: - // Player has selected to toss a Wonder Card that they haven't received the gift for. - // Ask for confirmation again. - switch ((u32)DoMysteryGiftYesNo(&data->textState, &data->var, TRUE, gText_HaventReceivedGiftOkayToDiscard)) - { - case 0: // Yes - data->state = MG_STATE_TOSS; - break; - case 1: // No - case MENU_B_PRESSED: - data->state = MG_STATE_HANDLE_GIFT_SELECT; - break; - } - break; - case MG_STATE_TOSS: - if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) - { - ClearSavedNewsOrCard(data->isWonderNews); - data->state = MG_STATE_TOSS_SAVE; - } - break; - case MG_STATE_TOSS_SAVE: - if (SaveOnMysteryGiftMenu(&data->textState)) - data->state = MG_STATE_TOSSED; - break; - case MG_STATE_TOSSED: - if (PrintThrownAway(&data->textState, data->isWonderNews)) - { - data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); - } - break; - case MG_STATE_GIFT_INPUT_EXIT: - if (ExitWonderCardOrNews(data->isWonderNews, FALSE)) - data->state = MG_STATE_TO_MAIN_MENU; - break; - case MG_STATE_RECEIVE: - if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) - data->state = MG_STATE_SOURCE_PROMPT; - break; - case MG_STATE_SEND: - if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) - { - switch (data->isWonderNews) - { - case FALSE: - CreateTask_SendMysteryGift(ACTIVITY_WONDER_CARD); - break; - case TRUE: - CreateTask_SendMysteryGift(ACTIVITY_WONDER_NEWS); - break; - } - data->sourceIsFriend = TRUE; - data->state = MG_STATE_SERVER_LINK_WAIT; - } - break; - case MG_STATE_SERVER_LINK_WAIT: - if (gReceivedRemoteLinkPlayers != 0) - { - ClearScreenInBg0(TRUE); - data->state = MG_STATE_SERVER_LINK_START; - } - else if (gSpecialVar_Result == LINKUP_FAILED) - { - ClearScreenInBg0(TRUE); - data->state = MG_STATE_LOAD_GIFT; - } - break; - case MG_STATE_SERVER_LINK_START: - *gStringVar1 = EOS; - *gStringVar2 = EOS; - *gStringVar3 = EOS; - if (!data->isWonderNews) + return FALSE; +} + +static bool32 ValidateStamp(const u16 *stamp) +{ + if (stamp[STAMP_ID] == 0) + return FALSE; + if (stamp[STAMP_SPECIES] == SPECIES_NONE) + return FALSE; + if (stamp[STAMP_SPECIES] >= NUM_SPECIES) + return FALSE; + return TRUE; +} + +static int GetNumStampsInSavedCard(void) +{ + struct WonderCard *card; + if (!ValidateSavedWonderCard()) + return 0; + + card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type != CARD_TYPE_STAMP) + return 0; + + return GetNumStampsInMetadata(&gSaveBlock1Ptr->mysteryGift.cardMetadata, card->maxStamps); +} + +bool32 MysteryGift_TrySaveStamp(const u16 *stamp) +{ + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + int maxStamps = card->maxStamps; + int i; + if (!ValidateStamp(stamp)) + return FALSE; + + if (IsStampInMetadata(&gSaveBlock1Ptr->mysteryGift.cardMetadata, stamp, maxStamps)) + return FALSE; + + for (i = 0; i < maxStamps; i++) + { + if (gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_ID][i] == 0 + && gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_SPECIES][i] == SPECIES_NONE) { - AddTextPrinterToWindow1(gText_SendingWonderCard); - MysterGiftServer_CreateForCard(); + gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_ID][i] = stamp[STAMP_ID]; + gSaveBlock1Ptr->mysteryGift.cardMetadata.stampData[STAMP_SPECIES][i] = stamp[STAMP_SPECIES]; + return TRUE; } - else - { - AddTextPrinterToWindow1(gText_SendingWonderNews); - MysterGiftServer_CreateForNews(); - } - data->state = MG_STATE_SERVER_LINK; - break; - case MG_STATE_SERVER_LINK: - if (MysterGiftServer_Run(&data->var) == SVR_RET_END) - { - data->msgId = data->var; - data->state = MG_STATE_SERVER_LINK_END; - } - break; - case MG_STATE_SERVER_LINK_END: - Rfu_SetCloseLinkCallback(); - StringCopy(gStringVar1, gLinkPlayers[1].name); - data->state = MG_STATE_SERVER_LINK_END_WAIT; - break; - case MG_STATE_SERVER_LINK_END_WAIT: - if (gReceivedRemoteLinkPlayers == 0) - { - DestroyWirelessStatusIndicatorSprite(); - data->state = MG_STATE_SERVER_RESULT_MSG; - } - break; - case MG_STATE_SERVER_RESULT_MSG: - if (PrintServerResultMessage(&data->textState, &data->var, data->sourceIsFriend, data->msgId)) - { - if (data->sourceIsFriend == TRUE && data->msgId == SVR_MSG_NEWS_SENT) - { - GenerateRandomWonderNews(WONDER_NEWS_SENT); - data->state = MG_STATE_SAVE_LOAD_GIFT; - } - else - { - data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); - } - } - break; - case MG_STATE_CLIENT_ERROR: - case MG_STATE_SERVER_ERROR: - if (PrintMysteryGiftMenuMessage(&data->textState, gText_CommunicationError)) - { - data->state = MG_STATE_TO_MAIN_MENU; - PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); - } - break; - case MG_STATE_EXIT: - CloseLink(); - Free(data->clientMsg); - DestroyTask(taskId); - SetMainCallback2(MainCB_FreeAllBuffersAndReturnToInitTitleScreen); - break; + } + + return FALSE; +} + +#define GAME_DATA_VALID_VAR 0x101 +#define GAME_DATA_VALID_GIFT_TYPE_1 (1 << 2) +#define GAME_DATA_VALID_GIFT_TYPE_2 (1 << 9) + +void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 isWonderNews) +{ + int i; + CpuFill32(0, data, sizeof(*data)); + data->validationVar = GAME_DATA_VALID_VAR; + data->validationFlag1 = 1; + data->validationFlag2 = 1; + + if (isWonderNews) + { + // Despite setting these for News, they are + // only ever checked for Cards + data->validationGiftType1 = GAME_DATA_VALID_GIFT_TYPE_1 | 1; + data->validationGiftType2 = GAME_DATA_VALID_GIFT_TYPE_2 | 1; + } + else // Wonder Card + { + data->validationGiftType1 = GAME_DATA_VALID_GIFT_TYPE_1; + data->validationGiftType2 = GAME_DATA_VALID_GIFT_TYPE_2; + } + + if (ValidateSavedWonderCard()) + { + data->flagId = GetSavedWonderCard()->flagId; + data->cardMetadata = *GetSavedWonderCardMetadata(); + data->maxStamps = GetSavedWonderCard()->maxStamps; + } + else + { + data->flagId = 0; + } + + for (i = 0; i < NUM_QUESTIONNAIRE_WORDS; i++) + data->questionnaireWords[i] = gSaveBlock1Ptr->mysteryGift.questionnaireWords[i]; + + CopyTrainerId(data->playerTrainerId, gSaveBlock2Ptr->playerTrainerId); + StringCopy(data->playerName, gSaveBlock2Ptr->playerName); + for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) + data->easyChatProfile[i] = gSaveBlock1Ptr->easyChatProfile[i]; + + memcpy(data->romHeaderGameCode, RomHeaderGameCode, GAME_CODE_LENGTH); + data->romHeaderSoftwareVersion = RomHeaderSoftwareVersion; +} + +bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 isWonderNews) +{ + if (data->validationVar != GAME_DATA_VALID_VAR) + return FALSE; + + if (!(data->validationFlag1 & 1)) + return FALSE; + + if (!(data->validationFlag2 & 1)) + return FALSE; + + if (!isWonderNews) + { + if (!(data->validationGiftType1 & GAME_DATA_VALID_GIFT_TYPE_1)) + return FALSE; + + if (!(data->validationGiftType2 & (GAME_DATA_VALID_GIFT_TYPE_2 | 0x180))) + return FALSE; + } + + return TRUE; +} + +u32 MysteryGift_CompareCardFlags(const u16 *flagId, const struct MysteryGiftLinkGameData *data, const void *unused) +{ + // Has a Wonder Card already? + if (data->flagId == 0) + return HAS_NO_CARD; + + // Has this Wonder Card already? + if (*flagId == data->flagId) + return HAS_SAME_CARD; + + // Player has a different Wonder Card + return HAS_DIFF_CARD; +} + +// This is referenced by the Mystery Gift server, but the instruction it's referenced in is never used, +// so the return values here are never checked by anything. +u32 MysteryGift_CheckStamps(const u16 *stamp, const struct MysteryGiftLinkGameData *data, const void *unused) +{ + int stampsMissing = data->maxStamps - GetNumStampsInMetadata(&data->cardMetadata, data->maxStamps); + + // Has full stamp card? + if (stampsMissing == 0) + return 1; + + // Already has stamp? + if (IsStampInMetadata(&data->cardMetadata, stamp, data->maxStamps)) + return 3; + + // Only 1 empty stamp left? + if (stampsMissing == 1) + return 4; + + // This is a new stamp + return 2; +} + +bool32 MysteryGift_DoesQuestionnaireMatch(const struct MysteryGiftLinkGameData *data, const u16 *words) +{ + int i; + for (i = 0; i < NUM_QUESTIONNAIRE_WORDS; i++) + { + if (data->questionnaireWords[i] != words[i]) + return FALSE; + } + + return TRUE; +} + +static int GetNumStampsInLinkData(const struct MysteryGiftLinkGameData *data) +{ + return GetNumStampsInMetadata(&data->cardMetadata, data->maxStamps); +} + +u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *data, u32 stat) +{ + switch (stat) + { + case CARD_STAT_BATTLES_WON: + return data->cardMetadata.battlesWon; + case CARD_STAT_BATTLES_LOST: + return data->cardMetadata.battlesLost; + case CARD_STAT_NUM_TRADES: + return data->cardMetadata.numTrades; + case CARD_STAT_NUM_STAMPS: + return GetNumStampsInLinkData(data); + case CARD_STAT_MAX_STAMPS: + return data->maxStamps; + default: + AGB_ASSERT(0); + return 0; } } -u16 GetMysteryGiftBaseBlock(void) +static void IncrementCardStat(u32 statType) { - return 0x1A9; + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_LINK_STAT) + { + u16 *stat = NULL; + switch (statType) + { + case CARD_STAT_BATTLES_WON: + stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.battlesWon; + break; + case CARD_STAT_BATTLES_LOST: + stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.battlesLost; + break; + case CARD_STAT_NUM_TRADES: + stat = &gSaveBlock1Ptr->mysteryGift.cardMetadata.numTrades; + break; + case CARD_STAT_NUM_STAMPS: // Unused + case CARD_STAT_MAX_STAMPS: // Unused + break; + } + + if (stat == NULL) + AGB_ASSERT(0); + else if (++(*stat) > MAX_WONDER_CARD_STAT) + *stat = MAX_WONDER_CARD_STAT; + } } -static void LoadMysteryGiftTextboxBorder(u8 bgId) +u16 MysteryGift_GetCardStat(u32 stat) { - DecompressAndLoadBgGfxUsingHeap(bgId, sTextboxBorder_Gfx, 0x100, 0, 0); + switch (stat) + { + case CARD_STAT_BATTLES_WON: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_LINK_STAT) + { + struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; + return metadata->battlesWon; + } + break; + } + case CARD_STAT_BATTLES_LOST: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_LINK_STAT) + { + struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; + return metadata->battlesLost; + } + break; + } + case CARD_STAT_NUM_TRADES: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_LINK_STAT) + { + struct WonderCardMetadata *metadata = &gSaveBlock1Ptr->mysteryGift.cardMetadata; + return metadata->numTrades; + } + break; + } + case CARD_STAT_NUM_STAMPS: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_STAMP) + return GetNumStampsInSavedCard(); + break; + } + case CARD_STAT_MAX_STAMPS: + { + struct WonderCard *card = &gSaveBlock1Ptr->mysteryGift.card; + if (card->type == CARD_TYPE_STAMP) + return card->maxStamps; + break; + } + } + + AGB_ASSERT(0); + return 0; +} + +void MysteryGift_DisableStats(void) +{ + sStatsEnabled = FALSE; +} + +bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId) +{ + sStatsEnabled = FALSE; + if (flagId == 0) + return FALSE; + + if (!ValidateSavedWonderCard()) + return FALSE; + + if (gSaveBlock1Ptr->mysteryGift.card.flagId != flagId) + return FALSE; + + sStatsEnabled = TRUE; + return TRUE; +} + +void MysteryGift_TryIncrementStat(u32 stat, u32 trainerId) +{ + if (sStatsEnabled) + { + switch (stat) + { + case CARD_STAT_NUM_TRADES: + IncrementCardStatForNewTrainer(CARD_STAT_NUM_TRADES, + trainerId, + gSaveBlock1Ptr->mysteryGift.trainerIds[1], + ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[1])); + break; + case CARD_STAT_BATTLES_WON: + IncrementCardStatForNewTrainer(CARD_STAT_BATTLES_WON, + trainerId, + gSaveBlock1Ptr->mysteryGift.trainerIds[0], + ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[0])); + break; + case CARD_STAT_BATTLES_LOST: + IncrementCardStatForNewTrainer(CARD_STAT_BATTLES_LOST, + trainerId, + gSaveBlock1Ptr->mysteryGift.trainerIds[0], + ARRAY_COUNT(gSaveBlock1Ptr->mysteryGift.trainerIds[0])); + break; + default: + AGB_ASSERT(0); + break; + } + } +} + +static void ClearSavedTrainerIds(void) +{ + CpuFill32(0, gSaveBlock1Ptr->mysteryGift.trainerIds, sizeof(gSaveBlock1Ptr->mysteryGift.trainerIds)); +} + +// Returns TRUE if it's a new trainer id, FALSE if an existing one. +// In either case the given trainerId is saved in element 0 +static bool32 RecordTrainerId(u32 trainerId, u32 *trainerIds, int size) +{ + int i, j; + + for (i = 0; i < size; i++) + { + if (trainerIds[i] == trainerId) + break; + } + + if (i == size) + { + // New trainer, shift array and insert new id at front + for (j = size - 1; j > 0; j--) + trainerIds[j] = trainerIds[j - 1]; + + trainerIds[0] = trainerId; + return TRUE; + } + else + { + // Existing trainer, shift back to old slot and move id to front + for (j = i; j > 0; j--) + trainerIds[j] = trainerIds[j - 1]; + + trainerIds[0] = trainerId; + return FALSE; + } +} + +static void IncrementCardStatForNewTrainer(u32 stat, u32 trainerId, u32 *trainerIds, int size) +{ + if (RecordTrainerId(trainerId, trainerIds, size)) + IncrementCardStat(stat); } diff --git a/src/mevent_client.c b/src/mystery_gift_client.c similarity index 94% rename from src/mevent_client.c rename to src/mystery_gift_client.c index e260f073ff..adf3ce8a62 100644 --- a/src/mevent_client.c +++ b/src/mystery_gift_client.c @@ -4,9 +4,9 @@ #include "overworld.h" #include "script.h" #include "battle_tower.h" -#include "mevent.h" +#include "mystery_gift.h" #include "mystery_event_script.h" -#include "mevent_client.h" +#include "mystery_gift_client.h" enum { FUNC_INIT, @@ -15,8 +15,8 @@ enum { FUNC_SEND, FUNC_RUN, FUNC_WAIT, - FUNC_RUN_GIFT_SCRIPT, - FUNC_RUN_BUFF_SCRIPT, + FUNC_RUN_MEVENT, + FUNC_RUN_BUFFER, }; EWRAM_DATA static struct MysteryGiftClient * sClient = NULL; @@ -222,8 +222,8 @@ static u32 Client_Run(struct MysteryGiftClient * client) MysteryGiftClient_InitSendWord(client, MG_LINKID_RESPONSE, TRUE); } break; - case CLI_RUN_GIFT_SCRIPT: - client->funcId = FUNC_RUN_GIFT_SCRIPT; + case CLI_RUN_MEVENT_SCRIPT: + client->funcId = FUNC_RUN_MEVENT; client->funcState = 0; break; case CLI_SAVE_STAMP: @@ -238,7 +238,7 @@ static u32 Client_Run(struct MysteryGiftClient * client) break; case CLI_RUN_BUFFER_SCRIPT: memcpy(gDecompressionBuffer, client->recvBuffer, MG_LINK_BUFFER_SIZE); - client->funcId = FUNC_RUN_BUFF_SCRIPT; + client->funcId = FUNC_RUN_BUFFER; client->funcState = 0; break; } @@ -256,16 +256,16 @@ static u32 Client_Wait(struct MysteryGiftClient * client) return CLI_RET_ACTIVE; } -static u32 Client_RunGiftScript(struct MysteryGiftClient * client) +static u32 Client_RunMysteryEventScript(struct MysteryGiftClient * client) { switch (client->funcState) { case 0: - InitMysteryGiftScriptContext(client->recvBuffer); + InitMysteryEventScriptContext(client->recvBuffer); client->funcState++; break; case 1: - if (!RunMysteryGiftScriptContextCommand(&client->param)) + if (!RunMysteryEventScriptContextCommand(&client->param)) { client->funcId = FUNC_RUN; client->funcState = 0; @@ -296,8 +296,8 @@ static u32 MysteryGiftClient_CallFunc(struct MysteryGiftClient * client) [FUNC_SEND] = Client_Send, [FUNC_RUN] = Client_Run, [FUNC_WAIT] = Client_Wait, - [FUNC_RUN_GIFT_SCRIPT] = Client_RunGiftScript, - [FUNC_RUN_BUFF_SCRIPT] = Client_RunBufferScript + [FUNC_RUN_MEVENT] = Client_RunMysteryEventScript, + [FUNC_RUN_BUFFER] = Client_RunBufferScript }; return funcs[client->funcId](client); } diff --git a/src/mevent_server_helpers.c b/src/mystery_gift_link.c similarity index 99% rename from src/mevent_server_helpers.c rename to src/mystery_gift_link.c index c1fe883688..55f4b78527 100644 --- a/src/mevent_server_helpers.c +++ b/src/mystery_gift_link.c @@ -8,8 +8,8 @@ #include "script.h" #include "battle_tower.h" #include "mystery_event_script.h" -#include "mevent.h" -#include "mevent_server_helpers.h" +#include "mystery_gift.h" +#include "mystery_gift_link.h" /* Handles the link connection functions used by the Mystery Gift client/server. diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c new file mode 100644 index 0000000000..e1236adfd3 --- /dev/null +++ b/src/mystery_gift_menu.c @@ -0,0 +1,1618 @@ +#include "global.h" +#include "main.h" +#include "text.h" +#include "task.h" +#include "malloc.h" +#include "gpu_regs.h" +#include "scanline_effect.h" +#include "text_window.h" +#include "bg.h" +#include "window.h" +#include "strings.h" +#include "text_window.h" +#include "menu.h" +#include "palette.h" +#include "constants/songs.h" +#include "sound.h" +#include "mystery_gift_menu.h" +#include "union_room.h" +#include "title_screen.h" +#include "ereader_screen.h" +#include "international_string_util.h" +#include "list_menu.h" +#include "string_util.h" +#include "mystery_gift.h" +#include "mystery_gift_view.h" +#include "save.h" +#include "link.h" +#include "mystery_gift_client.h" +#include "mystery_gift_server.h" +#include "event_data.h" +#include "link_rfu.h" +#include "wonder_news.h" +#include "constants/cable_club.h" + +#define LIST_MENU_TILE_NUM 10 +#define LIST_MENU_PAL_NUM 224 + +static void LoadMysteryGiftTextboxBorder(u8 bgId); +static void CreateMysteryGiftTask(void); +static void Task_MysteryGift(u8 taskId); + +EWRAM_DATA static u8 sDownArrowCounterAndYCoordIdx[8] = {}; +EWRAM_DATA bool8 gGiftIsFromEReader = FALSE; + +static const u16 sTextboxBorder_Pal[] = INCBIN_U16("graphics/interface/mystery_gift_textbox_border.gbapal"); +static const u32 sTextboxBorder_Gfx[] = INCBIN_U32("graphics/interface/mystery_gift_textbox_border.4bpp.lz"); + +struct MysteryGiftTaskData +{ + u16 var; // Multipurpose + u16 unused1; + u16 unused2; + u16 unused3; + u8 state; + u8 textState; + u8 unused4; + u8 unused5; + bool8 isWonderNews; + bool8 sourceIsFriend; + u8 msgId; + u8 * clientMsg; +}; + +static const struct BgTemplate sBGTemplates[] = { + { + .bg = 0, + .charBaseIndex = 2, + .mapBaseIndex = 15, + .screenSize = 0, + .paletteMode = 0, + .priority = 0, + .baseTile = 0x000 + }, { + .bg = 1, + .charBaseIndex = 0, + .mapBaseIndex = 14, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0x000 + }, { + .bg = 2, + .charBaseIndex = 0, + .mapBaseIndex = 13, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0x000 + }, { + .bg = 3, + .charBaseIndex = 0, + .mapBaseIndex = 12, + .screenSize = 0, + .paletteMode = 0, + .priority = 3, + .baseTile = 0x000 + } +}; + +static const struct WindowTemplate sMainWindows[] = { + { + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 30, + .height = 2, + .paletteNum = 12, + .baseBlock = 0x0013 + }, { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 12, + .baseBlock = 0x004f + }, { + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 15, + .width = 30, + .height = 5, + .paletteNum = 13, + .baseBlock = 0x004f + }, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate sWindowTemplate_YesNoMsg_Wide = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 28, + .height = 4, + .paletteNum = 12, + .baseBlock = 0x00e5 +}; + +static const struct WindowTemplate sWindowTemplate_YesNoMsg = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 20, + .height = 4, + .paletteNum = 12, + .baseBlock = 0x00e5 +}; + +static const struct WindowTemplate sWindowTemplate_GiftSelect = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 19, + .height = 4, + .paletteNum = 12, + .baseBlock = 0x00e5 +}; + +static const struct WindowTemplate sWindowTemplate_ThreeOptions = { + .bg = 0, + .tilemapLeft = 8, + .tilemapTop = 6, + .width = 14, + .height = 6, + .paletteNum = 12, + .baseBlock = 0x0155 +}; + +static const struct WindowTemplate sWindowTemplate_YesNoBox = { + .bg = 0, + .tilemapLeft = 23, + .tilemapTop = 15, + .width = 6, + .height = 4, + .paletteNum = 12, + .baseBlock = 0x0155 +}; + +static const struct WindowTemplate sWindowTemplate_GiftSelect_3Options = { + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 11, + .width = 7, + .height = 8, + .paletteNum = 12, + .baseBlock = 0x0155 +}; + +static const struct WindowTemplate sWindowTemplate_GiftSelect_2Options = { + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 13, + .width = 7, + .height = 6, + .paletteNum = 12, + .baseBlock = 0x0155 +}; + +static const struct WindowTemplate sWindowTemplate_GiftSelect_1Option = { + .bg = 0, + .tilemapLeft = 22, + .tilemapTop = 15, + .width = 7, + .height = 4, + .paletteNum = 12, + .baseBlock = 0x0155 +}; + +static const struct ListMenuItem sListMenuItems_CardsOrNews[] = { + { gText_WonderCards, 0 }, + { gText_WonderNews, 1 }, + { gText_Exit3, LIST_CANCEL } +}; + +static const struct ListMenuItem sListMenuItems_WirelessOrFriend[] = { + { gText_WirelessCommunication, 0 }, + { gText_Friend2, 1 }, + { gText_Cancel2, LIST_CANCEL } +}; + +static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = { + .items = NULL, + .moveCursorFunc = ListMenuDefaultCursorMoveFunc, + .itemPrintFunc = NULL, + .totalItems = 3, + .maxShowed = 3, + .windowId = 0, + .header_X = 0, + .item_X = 8, + .cursor_X = 0, + .upText_Y = 1, + .cursorPal = 2, + .fillValue = 1, + .cursorShadowPal = 3, + .lettersSpacing = 0, + .itemVerticalPadding = 0, + .scrollMultiple = 0, + .fontId = 1, + .cursorKind = 0 +}; + +static const struct ListMenuItem sListMenuItems_ReceiveSendToss[] = { + { gText_Receive, 0 }, + { gText_Send, 1 }, + { gText_Toss, 2 }, + { gText_Cancel2, LIST_CANCEL } +}; + +static const struct ListMenuItem sListMenuItems_ReceiveToss[] = { + { gText_Receive, 0 }, + { gText_Toss, 2 }, + { gText_Cancel2, LIST_CANCEL } +}; + +static const struct ListMenuItem sListMenuItems_ReceiveSend[] = { + { gText_Receive, 0 }, + { gText_Send, 1 }, + { gText_Cancel2, LIST_CANCEL } +}; + +static const struct ListMenuItem sListMenuItems_Receive[] = { + { gText_Receive, 0 }, + { gText_Cancel2, LIST_CANCEL } +}; + +static const struct ListMenuTemplate sListMenu_ReceiveSendToss = { + .items = sListMenuItems_ReceiveSendToss, + .moveCursorFunc = ListMenuDefaultCursorMoveFunc, + .itemPrintFunc = NULL, + .totalItems = 4, + .maxShowed = 4, + .windowId = 0, + .header_X = 0, + .item_X = 8, + .cursor_X = 0, + .upText_Y = 1, + .cursorPal = 2, + .fillValue = 1, + .cursorShadowPal = 3, + .lettersSpacing = 0, + .itemVerticalPadding = 0, + .scrollMultiple = 0, + .fontId = 1, + .cursorKind = 0 +}; + +static const struct ListMenuTemplate sListMenu_ReceiveToss = { + .items = sListMenuItems_ReceiveToss, + .moveCursorFunc = ListMenuDefaultCursorMoveFunc, + .itemPrintFunc = NULL, + .totalItems = 3, + .maxShowed = 3, + .windowId = 0, + .header_X = 0, + .item_X = 8, + .cursor_X = 0, + .upText_Y = 1, + .cursorPal = 2, + .fillValue = 1, + .cursorShadowPal = 3, + .lettersSpacing = 0, + .itemVerticalPadding = 0, + .scrollMultiple = 0, + .fontId = 1, + .cursorKind = 0 +}; + +static const struct ListMenuTemplate sListMenu_ReceiveSend = { + .items = sListMenuItems_ReceiveSend, + .moveCursorFunc = ListMenuDefaultCursorMoveFunc, + .itemPrintFunc = NULL, + .totalItems = 3, + .maxShowed = 3, + .windowId = 0, + .header_X = 0, + .item_X = 8, + .cursor_X = 0, + .upText_Y = 1, + .cursorPal = 2, + .fillValue = 1, + .cursorShadowPal = 3, + .lettersSpacing = 0, + .itemVerticalPadding = 0, + .scrollMultiple = 0, + .fontId = 1, + .cursorKind = 0 +}; + +static const struct ListMenuTemplate sListMenu_Receive = { + .items = sListMenuItems_Receive, + .moveCursorFunc = ListMenuDefaultCursorMoveFunc, + .itemPrintFunc = NULL, + .totalItems = 2, + .maxShowed = 2, + .windowId = 0, + .header_X = 0, + .item_X = 8, + .cursor_X = 0, + .upText_Y = 1, + .cursorPal = 2, + .fillValue = 1, + .cursorShadowPal = 3, + .lettersSpacing = 0, + .itemVerticalPadding = 0, + .scrollMultiple = 0, + .fontId = 1, + .cursorKind = 0 +}; + +static const u8 *const Unref_082F0710[] = { + gText_VarietyOfEventsImportedWireless, + gText_WonderCardsInPossession, + gText_ReadNewsThatArrived, + gText_ReturnToTitle +}; + +ALIGNED(2) static const u8 sTextColors_TopMenu[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +ALIGNED(2) static const u8 sTextColors_TopMenu_Copy[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +ALIGNED(2) static const u8 sMG_Ereader_TextColor_2[] = { TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY }; + +static void VBlankCB_MysteryGiftEReader(void) +{ + ProcessSpriteCopyRequests(); + LoadOam(); + TransferPlttBuffer(); +} + +void CB2_MysteryGiftEReader(void) +{ + RunTasks(); + RunTextPrinters(); + AnimateSprites(); + BuildOamBuffer(); +} + +static bool32 HandleMysteryGiftOrEReaderSetup(s32 isEReader) +{ + switch (gMain.state) + { + case 0: + SetVBlankCallback(NULL); + ResetPaletteFade(); + ResetSpriteData(); + FreeAllSpritePalettes(); + ResetTasks(); + ScanlineEffect_Stop(); + ResetBgsAndClearDma3BusyFlags(0); + + InitBgsFromTemplates(0, sBGTemplates, ARRAY_COUNT(sBGTemplates)); + ChangeBgX(0, 0, 0); + ChangeBgY(0, 0, 0); + ChangeBgX(1, 0, 0); + ChangeBgY(1, 0, 0); + ChangeBgX(2, 0, 0); + ChangeBgY(2, 0, 0); + ChangeBgX(3, 0, 0); + ChangeBgY(3, 0, 0); + + SetBgTilemapBuffer(3, Alloc(BG_SCREEN_SIZE)); + SetBgTilemapBuffer(2, Alloc(BG_SCREEN_SIZE)); + SetBgTilemapBuffer(1, Alloc(BG_SCREEN_SIZE)); + SetBgTilemapBuffer(0, Alloc(BG_SCREEN_SIZE)); + + LoadMysteryGiftTextboxBorder(3); + InitWindows(sMainWindows); + DeactivateAllTextPrinters(); + ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); + gMain.state++; + break; + case 1: + LoadPalette(sTextboxBorder_Pal, 0, 0x20); + LoadPalette(GetTextWindowPalette(2), 0xd0, 0x20); + Menu_LoadStdPalAt(0xC0); + LoadUserWindowBorderGfx(0, 0xA, 0xE0); + LoadUserWindowBorderGfx_(0, 0x1, 0xF0); + FillBgTilemapBufferRect(0, 0x000, 0, 0, 32, 32, 0x11); + FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); + FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11); + MG_DrawCheckerboardPattern(3); + PrintMysteryGiftOrEReaderTopMenu(isEReader, FALSE); + gMain.state++; + break; + case 2: + CopyBgTilemapBufferToVram(3); + CopyBgTilemapBufferToVram(2); + CopyBgTilemapBufferToVram(1); + CopyBgTilemapBufferToVram(0); + gMain.state++; + break; + case 3: + ShowBg(0); + ShowBg(3); + PlayBGM(MUS_RG_MYSTERY_GIFT); + SetVBlankCallback(VBlankCB_MysteryGiftEReader); + EnableInterrupts(INTR_FLAG_VBLANK | INTR_FLAG_VCOUNT | INTR_FLAG_TIMER3 | INTR_FLAG_SERIAL); + return TRUE; + } + + return FALSE; +} + +void CB2_InitMysteryGift(void) +{ + if (HandleMysteryGiftOrEReaderSetup(FALSE)) + { + SetMainCallback2(CB2_MysteryGiftEReader); + gGiftIsFromEReader = FALSE; + CreateMysteryGiftTask(); + } + RunTasks(); +} + +void CB2_InitEReader(void) +{ + if (HandleMysteryGiftOrEReaderSetup(TRUE)) + { + SetMainCallback2(CB2_MysteryGiftEReader); + gGiftIsFromEReader = TRUE; + CreateEReaderTask(); + } +} + +void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void) +{ + gGiftIsFromEReader = FALSE; + FreeAllWindowBuffers(); + Free(GetBgTilemapBuffer(0)); + Free(GetBgTilemapBuffer(1)); + Free(GetBgTilemapBuffer(2)); + Free(GetBgTilemapBuffer(3)); + SetMainCallback2(CB2_InitTitleScreen); +} + +void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel) +{ + const u8 * header; + const u8 * options; + FillWindowPixelBuffer(0, 0); + if (!isEReader) + { + header = gText_MysteryGift; + options = !useCancel ? gText_PickOKExit : gText_PickOKCancel; + } + else + { + header = gJPText_MysteryGift; + options = gJPText_DecideStop; + } + + AddTextPrinterParameterized4(0, 1, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header); + AddTextPrinterParameterized4(0, 0, GetStringRightAlignXOffset(0, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options); + CopyWindowToVram(0, 2); + PutWindowTilemap(0); +} + +void MG_DrawTextBorder(u8 windowId) +{ + DrawTextBorderOuter(windowId, 0x01, 0xF); +} + +void MG_DrawCheckerboardPattern(u32 bg) +{ + s32 i = 0, j; + + FillBgTilemapBufferRect(bg, 0x003, 0, 0, 32, 2, 0x11); + + for (i = 0; i < 18; i++) + { + for (j = 0; j < 32; j++) + { + if ((i & 1) != (j & 1)) + FillBgTilemapBufferRect(bg, 1, j, i + 2, 1, 1, 0x11); + else + FillBgTilemapBufferRect(bg, 2, j, i + 2, 1, 1, 0x11); + } + } +} + +static void ClearScreenInBg0(bool32 ignoreTopTwoRows) +{ + switch (ignoreTopTwoRows) + { + case 0: + FillBgTilemapBufferRect(0, 0, 0, 0, 32, 32, 0x11); + break; + case 1: + FillBgTilemapBufferRect(0, 0, 0, 2, 32, 30, 0x11); + break; + } + CopyBgTilemapBufferToVram(0); +} + +void AddTextPrinterToWindow1(const u8 *str) +{ + StringExpandPlaceholders(gStringVar4, str); + FillWindowPixelBuffer(1, 0x11); + AddTextPrinterParameterized4(1, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); + DrawTextBorderOuter(1, 0x001, 0xF); + PutWindowTilemap(1); + CopyWindowToVram(1, 3); +} + +static void ClearTextWindow(void) +{ + rbox_fill_rectangle(1); + ClearWindowTilemap(1); + CopyWindowToVram(1, 1); +} + +#define DOWN_ARROW_X 208 +#define DOWN_ARROW_Y 20 + +bool32 PrintMysteryGiftMenuMessage(u8 *textState, const u8 *str) +{ + switch (*textState) + { + case 0: + AddTextPrinterToWindow1(str); + (*textState)++; + break; + case 1: + DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + if (({JOY_NEW(A_BUTTON | B_BUTTON);})) + (*textState)++; + break; + case 2: + DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); + *textState = 0; + ClearTextWindow(); + return TRUE; + case 0xFF: + *textState = 2; + return FALSE; + } + return FALSE; +} + +static void HideDownArrow(void) +{ + DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, FALSE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); +} + +static void ShowDownArrow(void) +{ + DrawDownArrow(1, DOWN_ARROW_X, DOWN_ARROW_Y, 1, TRUE, &sDownArrowCounterAndYCoordIdx[0], &sDownArrowCounterAndYCoordIdx[1]); +} + +// Unused +static bool32 HideDownArrowAndWaitButton(u8 * textState) +{ + switch (*textState) + { + case 0: + HideDownArrow(); + if (JOY_NEW(A_BUTTON | B_BUTTON)) + (*textState)++; + break; + case 1: + ShowDownArrow(); + *textState = 0; + return TRUE; + } + return FALSE; +} + +static bool32 PrintStringAndWait2Seconds(u8 * counter, const u8 * str) +{ + if (*counter == 0) + AddTextPrinterToWindow1(str); + + if (++(*counter) > 120) + { + *counter = 0; + ClearTextWindow(); + return TRUE; + } + else + { + return FALSE; + } +} + +static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whichMenu) +{ + struct ListMenuTemplate listMenuTemplate = sListMenuTemplate_ThreeOptions; + struct WindowTemplate windowTemplate = sWindowTemplate_ThreeOptions; + s32 width; + s32 response; + + if (whichMenu == 0) + listMenuTemplate.items = sListMenuItems_CardsOrNews; + else + listMenuTemplate.items = sListMenuItems_WirelessOrFriend; + + width = Intl_GetListMenuWidth(&listMenuTemplate); + if (width & 1) + width++; + + windowTemplate.width = width; + if (width < 30) + windowTemplate.tilemapLeft = (30 - width) / 2; + else + windowTemplate.tilemapLeft = 0; + + response = DoMysteryGiftListMenu(&windowTemplate, &listMenuTemplate, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); + if (response != LIST_NOTHING_CHOSEN) + { + ClearWindowTilemap(2); + CopyWindowToVram(2, 1); + } + return response; +} + +s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, const u8 * str) +{ + struct WindowTemplate windowTemplate; + s8 input; + + switch (*textState) + { + case 0: + // Print question message + StringExpandPlaceholders(gStringVar4, str); + if (yesNoBoxPlacement == 0) + *windowId = AddWindow(&sWindowTemplate_YesNoMsg_Wide); + else + *windowId = AddWindow(&sWindowTemplate_YesNoMsg); + FillWindowPixelBuffer(*windowId, 0x11); + AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); + DrawTextBorderOuter(*windowId, 0x001, 0x0F); + CopyWindowToVram(*windowId, 2); + PutWindowTilemap(*windowId); + (*textState)++; + break; + case 1: + // Create Yes/No + windowTemplate = sWindowTemplate_YesNoBox; + if (yesNoBoxPlacement == 0) + windowTemplate.tilemapTop = 9; + else + windowTemplate.tilemapTop = 15; + CreateYesNoMenu(&windowTemplate, 10, 14, 0); + (*textState)++; + break; + case 2: + // Handle Yes/No input + input = Menu_ProcessInputNoWrapClearOnChoose(); + if (input == MENU_B_PRESSED || input == 0 || input == 1) + { + *textState = 0; + rbox_fill_rectangle(*windowId); + ClearWindowTilemap(*windowId); + CopyWindowToVram(*windowId, 1); + RemoveWindow(*windowId); + return input; + } + break; + case 0xFF: + *textState = 0; + rbox_fill_rectangle(*windowId); + ClearWindowTilemap(*windowId); + CopyWindowToVram(*windowId, 1); + RemoveWindow(*windowId); + return MENU_B_PRESSED; + } + + return MENU_NOTHING_CHOSEN; +} + +// Handle the "Receive/Send/Toss" menu that appears when selecting Wonder Card/News +static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotToss, bool32 cannotSend) +{ + struct WindowTemplate windowTemplate; + s32 input; + + switch (*textState) + { + case 0: + // Print menu message + if (!cannotToss) + StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithCards); + else + StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithNews); + *windowId = AddWindow(&sWindowTemplate_GiftSelect); + FillWindowPixelBuffer(*windowId, 0x11); + AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); + DrawTextBorderOuter(*windowId, 0x001, 0x0F); + CopyWindowToVram(*windowId, 2); + PutWindowTilemap(*windowId); + (*textState)++; + break; + case 1: + windowTemplate = sWindowTemplate_YesNoBox; + if (cannotSend) + { + if (!cannotToss) + input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_2Options, &sListMenu_ReceiveToss, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); + else + input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_1Option, &sListMenu_Receive, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); + } + else + { + if (!cannotToss) + input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_3Options, &sListMenu_ReceiveSendToss, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); + else + input = DoMysteryGiftListMenu(&sWindowTemplate_GiftSelect_2Options, &sListMenu_ReceiveSend, 1, LIST_MENU_TILE_NUM, LIST_MENU_PAL_NUM); + } + if (input != LIST_NOTHING_CHOSEN) + { + *textState = 0; + rbox_fill_rectangle(*windowId); + ClearWindowTilemap(*windowId); + CopyWindowToVram(*windowId, 1); + RemoveWindow(*windowId); + return input; + } + break; + case 0xFF: + *textState = 0; + rbox_fill_rectangle(*windowId); + ClearWindowTilemap(*windowId); + CopyWindowToVram(*windowId, 1); + RemoveWindow(*windowId); + return LIST_CANCEL; + } + + return LIST_NOTHING_CHOSEN; +} + +static bool32 ValidateCardOrNews(bool32 isWonderNews) +{ + if (!isWonderNews) + return ValidateSavedWonderCard(); + else + return ValidateSavedWonderNews(); +} + +static bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 isWonderNews) +{ + switch (*state) + { + case 0: + if (!isWonderNews) + WonderCard_Init(GetSavedWonderCard(), GetSavedWonderCardMetadata()); + else + WonderNews_Init(GetSavedWonderNews()); + (*state)++; + break; + case 1: + if (!isWonderNews) + { + if (!WonderCard_Enter()) + return FALSE; + } + else + { + if (!WonderNews_Enter()) + return FALSE; + } + *state = 0; + return TRUE; + } + + return FALSE; +} + +static bool32 ClearSavedNewsOrCard(bool32 isWonderNews) +{ + if (!isWonderNews) + ClearSavedWonderCardAndRelated(); + else + ClearSavedWonderNewsAndRelated(); + return TRUE; +} + +static bool32 ExitWonderCardOrNews(bool32 isWonderNews, bool32 useCancel) +{ + if (!isWonderNews) + { + if (WonderCard_Exit(useCancel)) + { + WonderCard_Destroy(); + return TRUE; + } + else + { + return FALSE; + } + } + else + { + if (WonderNews_Exit(useCancel)) + { + WonderNews_Destroy(); + return TRUE; + } + else + { + return FALSE; + } + } +} + +static s32 AskDiscardGift(u8 * textState, u16 * windowId, bool32 isWonderNews) +{ + if (!isWonderNews) + return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_IfThrowAwayCardEventWontHappen); + else + return DoMysteryGiftYesNo(textState, windowId, TRUE, gText_OkayToDiscardNews); +} + +static bool32 PrintThrownAway(u8 * textState, bool32 isWonderNews) +{ + if (!isWonderNews) + return PrintMysteryGiftMenuMessage(textState, gText_WonderCardThrownAway); + else + return PrintMysteryGiftMenuMessage(textState, gText_WonderNewsThrownAway); +} + +static bool32 SaveOnMysteryGiftMenu(u8 * state) +{ + switch (*state) + { + case 0: + AddTextPrinterToWindow1(gText_DataWillBeSaved); + (*state)++; + break; + case 1: + TrySavingData(SAVE_NORMAL); + (*state)++; + break; + case 2: + AddTextPrinterToWindow1(gText_SaveCompletedPressA); + (*state)++; + break; + case 3: + if (JOY_NEW(A_BUTTON | B_BUTTON)) + (*state)++; + break; + case 4: + *state = 0; + ClearTextWindow(); + return TRUE; + } + + return FALSE; +} + +static const u8 * GetClientResultMessage(bool32 * successMsg, bool8 isWonderNews, bool8 sourceIsFriend, u32 msgId) +{ + const u8 * msg = NULL; + *successMsg = FALSE; + + switch (msgId) + { + case CLI_MSG_NOTHING_SENT: + *successMsg = FALSE; + msg = gText_NothingSentOver; + break; + case CLI_MSG_RECORD_UPLOADED: + *successMsg = FALSE; + msg = gText_RecordUploadedViaWireless; + break; + case CLI_MSG_CARD_RECEIVED: + *successMsg = TRUE; + msg = !sourceIsFriend ? gText_WonderCardReceived : gText_WonderCardReceivedFrom; + break; + case CLI_MSG_NEWS_RECEIVED: + *successMsg = TRUE; + msg = !sourceIsFriend ? gText_WonderNewsReceived : gText_WonderNewsReceivedFrom; + break; + case CLI_MSG_STAMP_RECEIVED: + *successMsg = TRUE; + msg = gText_NewStampReceived; + break; + case CLI_MSG_HAD_CARD: + *successMsg = FALSE; + msg = gText_AlreadyHadCard; + break; + case CLI_MSG_HAD_STAMP: + *successMsg = FALSE; + msg = gText_AlreadyHadStamp; + break; + case CLI_MSG_HAD_NEWS: + *successMsg = FALSE; + msg = gText_AlreadyHadNews; + break; + case CLI_MSG_NO_ROOM_STAMPS: + *successMsg = FALSE; + msg = gText_NoMoreRoomForStamps; + break; + case CLI_MSG_COMM_CANCELED: + *successMsg = FALSE; + msg = gText_CommunicationCanceled; + break; + case CLI_MSG_CANT_ACCEPT: + *successMsg = FALSE; + msg = !isWonderNews ? gText_CantAcceptCardFromTrainer : gText_CantAcceptNewsFromTrainer; + break; + case CLI_MSG_COMM_ERROR: + *successMsg = FALSE; + msg = gText_CommunicationError; + break; + case CLI_MSG_TRAINER_RECEIVED: + *successMsg = TRUE; + msg = gText_NewTrainerReceived; + break; + case CLI_MSG_BUFFER_SUCCESS: + *successMsg = TRUE; + // msg is NULL, use buffer + break; + case CLI_MSG_BUFFER_FAILURE: + *successMsg = FALSE; + // msg is NULL, use buffer + break; + } + + return msg; +} + +static bool32 PrintSuccessMessage(u8 * state, const u8 * msg, u16 * timer) +{ + switch (*state) + { + case 0: + if (msg != NULL) + AddTextPrinterToWindow1(msg); + PlayFanfare(MUS_OBTAIN_ITEM); + *timer = 0; + (*state)++; + break; + case 1: + if (++(*timer) > 240) + (*state)++; + break; + case 2: + if (IsFanfareTaskInactive()) + { + *state = 0; + ClearTextWindow(); + return TRUE; + } + break; + } + return FALSE; +} + +static const u8 * GetServerResultMessage(bool32 * wonderSuccess, bool8 sourceIsFriend, u32 msgId) +{ + const u8 * result = gText_CommunicationError; + *wonderSuccess = FALSE; + switch (msgId) + { + case SVR_MSG_NOTHING_SENT: + result = gText_NothingSentOver; + break; + case SVR_MSG_RECORD_UPLOADED: + result = gText_RecordUploadedViaWireless; + break; + case SVR_MSG_CARD_SENT: + result = gText_WonderCardSentTo; + *wonderSuccess = TRUE; + break; + case SVR_MSG_NEWS_SENT: + result = gText_WonderNewsSentTo; + *wonderSuccess = TRUE; + break; + case SVR_MSG_STAMP_SENT: + result = gText_StampSentTo; + break; + case SVR_MSG_HAS_CARD: + result = gText_OtherTrainerHasCard; + break; + case SVR_MSG_HAS_STAMP: + result = gText_OtherTrainerHasStamp; + break; + case SVR_MSG_HAS_NEWS: + result = gText_OtherTrainerHasNews; + break; + case SVR_MSG_NO_ROOM_STAMPS: + result = gText_NoMoreRoomForStamps; + break; + case SVR_MSG_CLIENT_CANCELED: + result = gText_OtherTrainerCanceled; + break; + case SVR_MSG_CANT_SEND_GIFT_1: + result = gText_CantSendGiftToTrainer; + break; + case SVR_MSG_COMM_ERROR: + result = gText_CommunicationError; + break; + case SVR_MSG_GIFT_SENT_1: + result = gText_GiftSentTo; + break; + case SVR_MSG_GIFT_SENT_2: + result = gText_GiftSentTo; + break; + case SVR_MSG_CANT_SEND_GIFT_2: + result = gText_CantSendGiftToTrainer; + break; + } + return result; +} + +static bool32 PrintServerResultMessage(u8 * state, u16 * timer, bool8 sourceIsFriend, u32 msgId) +{ + bool32 wonderSuccess; + const u8 * str = GetServerResultMessage(&wonderSuccess, sourceIsFriend, msgId); + if (wonderSuccess) + return PrintSuccessMessage(state, str, timer); + else + return PrintMysteryGiftMenuMessage(state, str); +} + +// States for Task_MysteryGift. +// CLIENT states are for when the player is receiving a gift, and use mystery_gift_client.c link functions. +// SERVER states are for when the player is sending a gift, and use mystery_gift_server.c link functions. +// Other states handle the general Mystery Gift menu usage. +enum { + MG_STATE_TO_MAIN_MENU, + MG_STATE_MAIN_MENU, + MG_STATE_DONT_HAVE_ANY, + MG_STATE_SOURCE_PROMPT, + MG_STATE_SOURCE_PROMPT_INPUT, + MG_STATE_CLIENT_LINK_START, + MG_STATE_CLIENT_LINK_WAIT, + MG_STATE_CLIENT_COMMUNICATING, + MG_STATE_CLIENT_LINK, + MG_STATE_CLIENT_YES_NO, + MG_STATE_CLIENT_MESSAGE, + MG_STATE_CLIENT_ASK_TOSS, + MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED, + MG_STATE_CLIENT_LINK_END, + MG_STATE_CLIENT_COMM_COMPLETED, + MG_STATE_CLIENT_RESULT_MSG, + MG_STATE_CLIENT_ERROR, + MG_STATE_SAVE_LOAD_GIFT, + MG_STATE_LOAD_GIFT, + MG_STATE_UNUSED, + MG_STATE_HANDLE_GIFT_INPUT, + MG_STATE_HANDLE_GIFT_SELECT, + MG_STATE_ASK_TOSS, + MG_STATE_ASK_TOSS_UNRECEIVED, + MG_STATE_TOSS, + MG_STATE_TOSS_SAVE, + MG_STATE_TOSSED, + MG_STATE_GIFT_INPUT_EXIT, + MG_STATE_RECEIVE, + MG_STATE_SEND, + MG_STATE_SERVER_LINK_WAIT, + MG_STATE_SERVER_LINK_START, + MG_STATE_SERVER_LINK, + MG_STATE_SERVER_LINK_END, + MG_STATE_SERVER_LINK_END_WAIT, + MG_STATE_SERVER_RESULT_MSG, + MG_STATE_SERVER_ERROR, + MG_STATE_EXIT, +}; + +static void CreateMysteryGiftTask(void) +{ + u8 taskId = CreateTask(Task_MysteryGift, 0); + struct MysteryGiftTaskData * data = (void *)gTasks[taskId].data; + data->state = MG_STATE_TO_MAIN_MENU; + data->textState = 0; + data->unused4 = 0; + data->unused5 = 0; + data->isWonderNews = 0; + data->sourceIsFriend = 0; + data->var = 0; + data->unused1 = 0; + data->unused2 = 0; + data->unused3 = 0; + data->msgId = 0; + data->clientMsg = AllocZeroed(CLIENT_MAX_MSG_SIZE); +} + +static void Task_MysteryGift(u8 taskId) +{ + struct MysteryGiftTaskData *data = (void *)gTasks[taskId].data; + u32 successMsg, input; + const u8 *msg; + + switch (data->state) + { + case MG_STATE_TO_MAIN_MENU: + data->state = MG_STATE_MAIN_MENU; + break; + case MG_STATE_MAIN_MENU: + // Main Mystery Gift menu, player can select Wonder Cards or News (or exit) + switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->var, FALSE)) + { + case 0: // "Wonder Cards" + data->isWonderNews = FALSE; + if (ValidateSavedWonderCard() == TRUE) + data->state = MG_STATE_LOAD_GIFT; + else + data->state = MG_STATE_DONT_HAVE_ANY; + break; + case 1: // "Wonder News" + data->isWonderNews = TRUE; + if (ValidateSavedWonderNews() == TRUE) + data->state = MG_STATE_LOAD_GIFT; + else + data->state = MG_STATE_DONT_HAVE_ANY; + break; + case LIST_CANCEL: + data->state = MG_STATE_EXIT; + break; + } + break; + case MG_STATE_DONT_HAVE_ANY: + { + // Player doesn't have any Wonder Card/News + // Start prompt to ask where to read one from + if (!data->isWonderNews) + { + if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveCardNewOneInput)) + { + data->state = MG_STATE_SOURCE_PROMPT; + PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); + } + } + else + { + if (PrintMysteryGiftMenuMessage(&data->textState, gText_DontHaveNewsNewOneInput)) + { + data->state = MG_STATE_SOURCE_PROMPT; + PrintMysteryGiftOrEReaderTopMenu(FALSE, TRUE); + } + } + break; + } + case MG_STATE_SOURCE_PROMPT: + if (!data->isWonderNews) + AddTextPrinterToWindow1(gText_WhereShouldCardBeAccessed); + else + AddTextPrinterToWindow1(gText_WhereShouldNewsBeAccessed); + data->state = MG_STATE_SOURCE_PROMPT_INPUT; + break; + case MG_STATE_SOURCE_PROMPT_INPUT: + // Choose where to access the Wonder Card/News from + switch (MysteryGift_HandleThreeOptionMenu(&data->textState, &data->var, TRUE)) + { + case 0: // "Wireless Communication" + ClearTextWindow(); + data->state = MG_STATE_CLIENT_LINK_START; + data->sourceIsFriend = FALSE; + break; + case 1: // "Friend" + ClearTextWindow(); + data->state = MG_STATE_CLIENT_LINK_START; + data->sourceIsFriend = TRUE; + break; + case LIST_CANCEL: + ClearTextWindow(); + if (ValidateCardOrNews(data->isWonderNews)) + { + data->state = MG_STATE_LOAD_GIFT; + } + else + { + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + } + break; + } + break; + case MG_STATE_CLIENT_LINK_START: + *gStringVar1 = EOS; + *gStringVar2 = EOS; + *gStringVar3 = EOS; + + switch (data->isWonderNews) + { + case FALSE: + if (data->sourceIsFriend == TRUE) + CreateTask_LinkMysteryGiftWithFriend(ACTIVITY_WONDER_CARD); + else if (data->sourceIsFriend == FALSE) + CreateTask_LinkMysteryGiftOverWireless(ACTIVITY_WONDER_CARD); + break; + case TRUE: + if (data->sourceIsFriend == TRUE) + CreateTask_LinkMysteryGiftWithFriend(ACTIVITY_WONDER_NEWS); + else if (data->sourceIsFriend == FALSE) + CreateTask_LinkMysteryGiftOverWireless(ACTIVITY_WONDER_NEWS); + break; + } + data->state = MG_STATE_CLIENT_LINK_WAIT; + break; + case MG_STATE_CLIENT_LINK_WAIT: + if (gReceivedRemoteLinkPlayers != 0) + { + ClearScreenInBg0(TRUE); + data->state = MG_STATE_CLIENT_COMMUNICATING; + MysteryGiftClient_Create(data->isWonderNews); + } + else if (gSpecialVar_Result == LINKUP_FAILED) + { + // Link failed, return to link start menu + ClearScreenInBg0(TRUE); + data->state = MG_STATE_SOURCE_PROMPT; + } + break; + case MG_STATE_CLIENT_COMMUNICATING: + AddTextPrinterToWindow1(gText_Communicating); + data->state = MG_STATE_CLIENT_LINK; + break; + case MG_STATE_CLIENT_LINK: + switch (MysteryGiftClient_Run(&data->var)) + { + case CLI_RET_END: + Rfu_SetCloseLinkCallback(); + data->msgId = data->var; + data->state = MG_STATE_CLIENT_LINK_END; + break; + case CLI_RET_COPY_MSG: + memcpy(data->clientMsg, MysteryGiftClient_GetMsg(), 0x40); + MysteryGiftClient_AdvanceState(); + break; + case CLI_RET_PRINT_MSG: + data->state = MG_STATE_CLIENT_MESSAGE; + break; + case CLI_RET_YES_NO: + data->state = MG_STATE_CLIENT_YES_NO; + break; + case CLI_RET_ASK_TOSS: + data->state = MG_STATE_CLIENT_ASK_TOSS; + StringCopy(gStringVar1, gLinkPlayers[0].name); + break; + } + break; + case MG_STATE_CLIENT_YES_NO: + input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, MysteryGiftClient_GetMsg()); + switch (input) + { + case 0: // Yes + MysteryGiftClient_SetParam(FALSE); + MysteryGiftClient_AdvanceState(); + data->state = MG_STATE_CLIENT_COMMUNICATING; + break; + case 1: // No + case MENU_B_PRESSED: + MysteryGiftClient_SetParam(TRUE); + MysteryGiftClient_AdvanceState(); + data->state = MG_STATE_CLIENT_COMMUNICATING; + break; + } + break; + case MG_STATE_CLIENT_MESSAGE: + if (PrintMysteryGiftMenuMessage(&data->textState, MysteryGiftClient_GetMsg())) + { + MysteryGiftClient_AdvanceState(); + data->state = MG_STATE_CLIENT_COMMUNICATING; + } + break; + case MG_STATE_CLIENT_ASK_TOSS: + // Player is receiving a new Wonder Card/News but needs to toss an existing one to make room. + // Ask for confirmation. + input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, gText_ThrowAwayWonderCard); + switch (input) + { + case 0: // Yes + if (IsSavedWonderCardGiftNotReceived() == TRUE) + { + data->state = MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED; + } + else + { + MysteryGiftClient_SetParam(FALSE); + MysteryGiftClient_AdvanceState(); + data->state = MG_STATE_CLIENT_COMMUNICATING; + } + break; + case 1: // No + case MENU_B_PRESSED: + MysteryGiftClient_SetParam(TRUE); + MysteryGiftClient_AdvanceState(); + data->state = MG_STATE_CLIENT_COMMUNICATING; + break; + } + break; + case MG_STATE_CLIENT_ASK_TOSS_UNRECEIVED: + // Player has selected to toss a Wonder Card that they haven't received the gift for. + // Ask for confirmation again. + input = DoMysteryGiftYesNo(&data->textState, &data->var, FALSE, gText_HaventReceivedCardsGift); + switch (input) + { + case 0: // Yes + MysteryGiftClient_SetParam(FALSE); + MysteryGiftClient_AdvanceState(); + data->state = MG_STATE_CLIENT_COMMUNICATING; + break; + case 1: // No + case MENU_B_PRESSED: + MysteryGiftClient_SetParam(TRUE); + MysteryGiftClient_AdvanceState(); + data->state = MG_STATE_CLIENT_COMMUNICATING; + break; + } + break; + case MG_STATE_CLIENT_LINK_END: + if (gReceivedRemoteLinkPlayers == 0) + { + DestroyWirelessStatusIndicatorSprite(); + data->state = MG_STATE_CLIENT_COMM_COMPLETED; + } + break; + case MG_STATE_CLIENT_COMM_COMPLETED: + if (PrintStringAndWait2Seconds(&data->textState, gText_CommunicationCompleted)) + { + if (data->sourceIsFriend == TRUE) + StringCopy(gStringVar1, gLinkPlayers[0].name); + data->state = MG_STATE_CLIENT_RESULT_MSG; + } + break; + case MG_STATE_CLIENT_RESULT_MSG: + msg = GetClientResultMessage(&successMsg, data->isWonderNews, data->sourceIsFriend, data->msgId); + if (msg == NULL) + msg = data->clientMsg; + if (successMsg) + input = PrintSuccessMessage(&data->textState, msg, &data->var); + else + input = PrintMysteryGiftMenuMessage(&data->textState, msg); + // input var re-used, here it is TRUE if the message is finished + if (input) + { + if (data->msgId == CLI_MSG_NEWS_RECEIVED) + { + if (data->sourceIsFriend == TRUE) + GenerateRandomWonderNews(WONDER_NEWS_RECV_FRIEND); + else + GenerateRandomWonderNews(WONDER_NEWS_RECV_WIRELESS); + } + if (!successMsg) + { + // Did not receive card/news, return to main menu + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + } + else + { + data->state = MG_STATE_SAVE_LOAD_GIFT; + } + } + break; + case MG_STATE_SAVE_LOAD_GIFT: + if (SaveOnMysteryGiftMenu(&data->textState)) + data->state = MG_STATE_LOAD_GIFT; + break; + case MG_STATE_LOAD_GIFT: + if (HandleLoadWonderCardOrNews(&data->textState, data->isWonderNews)) + data->state = MG_STATE_HANDLE_GIFT_INPUT; + break; + case MG_STATE_HANDLE_GIFT_INPUT: + if (!data->isWonderNews) + { + // Handle Wonder Card input + if (JOY_NEW(A_BUTTON)) + data->state = MG_STATE_HANDLE_GIFT_SELECT; + if (JOY_NEW(B_BUTTON)) + data->state = MG_STATE_GIFT_INPUT_EXIT; + } + else + { + switch (WonderNews_GetInput(gMain.newKeys)) + { + case NEWS_INPUT_A: + WonderNews_RemoveScrollIndicatorArrowPair(); + data->state = MG_STATE_HANDLE_GIFT_SELECT; + break; + case NEWS_INPUT_B: + data->state = MG_STATE_GIFT_INPUT_EXIT; + break; + } + } + break; + case MG_STATE_HANDLE_GIFT_SELECT: + { + // A Wonder Card/News has been selected, handle its menu + u32 result; + if (!data->isWonderNews) + { + if (IsSendingSavedWonderCardAllowed()) + result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, FALSE); + else + result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, TRUE); + } + else + { + if (IsSendingSavedWonderNewsAllowed()) + result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, FALSE); + else + result = HandleGiftSelectMenu(&data->textState, &data->var, data->isWonderNews, TRUE); + } + switch (result) + { + case 0: // Receive + data->state = MG_STATE_RECEIVE; + break; + case 1: // Send + data->state = MG_STATE_SEND; + break; + case 2: // Toss + data->state = MG_STATE_ASK_TOSS; + break; + case LIST_CANCEL: + if (data->isWonderNews == TRUE) + WonderNews_AddScrollIndicatorArrowPair(); + data->state = MG_STATE_HANDLE_GIFT_INPUT; + break; + } + break; + } + case MG_STATE_ASK_TOSS: + // Player is attempting to discard a saved Wonder Card/News + switch (AskDiscardGift(&data->textState, &data->var, data->isWonderNews)) + { + case 0: // Yes + if (!data->isWonderNews && IsSavedWonderCardGiftNotReceived() == TRUE) + data->state = MG_STATE_ASK_TOSS_UNRECEIVED; + else + data->state = MG_STATE_TOSS; + break; + case 1: // No + case MENU_B_PRESSED: + data->state = MG_STATE_HANDLE_GIFT_SELECT; + break; + } + break; + case MG_STATE_ASK_TOSS_UNRECEIVED: + // Player has selected to toss a Wonder Card that they haven't received the gift for. + // Ask for confirmation again. + switch ((u32)DoMysteryGiftYesNo(&data->textState, &data->var, TRUE, gText_HaventReceivedGiftOkayToDiscard)) + { + case 0: // Yes + data->state = MG_STATE_TOSS; + break; + case 1: // No + case MENU_B_PRESSED: + data->state = MG_STATE_HANDLE_GIFT_SELECT; + break; + } + break; + case MG_STATE_TOSS: + if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) + { + ClearSavedNewsOrCard(data->isWonderNews); + data->state = MG_STATE_TOSS_SAVE; + } + break; + case MG_STATE_TOSS_SAVE: + if (SaveOnMysteryGiftMenu(&data->textState)) + data->state = MG_STATE_TOSSED; + break; + case MG_STATE_TOSSED: + if (PrintThrownAway(&data->textState, data->isWonderNews)) + { + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + } + break; + case MG_STATE_GIFT_INPUT_EXIT: + if (ExitWonderCardOrNews(data->isWonderNews, FALSE)) + data->state = MG_STATE_TO_MAIN_MENU; + break; + case MG_STATE_RECEIVE: + if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) + data->state = MG_STATE_SOURCE_PROMPT; + break; + case MG_STATE_SEND: + if (ExitWonderCardOrNews(data->isWonderNews, TRUE)) + { + switch (data->isWonderNews) + { + case FALSE: + CreateTask_SendMysteryGift(ACTIVITY_WONDER_CARD); + break; + case TRUE: + CreateTask_SendMysteryGift(ACTIVITY_WONDER_NEWS); + break; + } + data->sourceIsFriend = TRUE; + data->state = MG_STATE_SERVER_LINK_WAIT; + } + break; + case MG_STATE_SERVER_LINK_WAIT: + if (gReceivedRemoteLinkPlayers != 0) + { + ClearScreenInBg0(TRUE); + data->state = MG_STATE_SERVER_LINK_START; + } + else if (gSpecialVar_Result == LINKUP_FAILED) + { + ClearScreenInBg0(TRUE); + data->state = MG_STATE_LOAD_GIFT; + } + break; + case MG_STATE_SERVER_LINK_START: + *gStringVar1 = EOS; + *gStringVar2 = EOS; + *gStringVar3 = EOS; + + if (!data->isWonderNews) + { + AddTextPrinterToWindow1(gText_SendingWonderCard); + MysterGiftServer_CreateForCard(); + } + else + { + AddTextPrinterToWindow1(gText_SendingWonderNews); + MysterGiftServer_CreateForNews(); + } + data->state = MG_STATE_SERVER_LINK; + break; + case MG_STATE_SERVER_LINK: + if (MysterGiftServer_Run(&data->var) == SVR_RET_END) + { + data->msgId = data->var; + data->state = MG_STATE_SERVER_LINK_END; + } + break; + case MG_STATE_SERVER_LINK_END: + Rfu_SetCloseLinkCallback(); + StringCopy(gStringVar1, gLinkPlayers[1].name); + data->state = MG_STATE_SERVER_LINK_END_WAIT; + break; + case MG_STATE_SERVER_LINK_END_WAIT: + if (gReceivedRemoteLinkPlayers == 0) + { + DestroyWirelessStatusIndicatorSprite(); + data->state = MG_STATE_SERVER_RESULT_MSG; + } + break; + case MG_STATE_SERVER_RESULT_MSG: + if (PrintServerResultMessage(&data->textState, &data->var, data->sourceIsFriend, data->msgId)) + { + if (data->sourceIsFriend == TRUE && data->msgId == SVR_MSG_NEWS_SENT) + { + GenerateRandomWonderNews(WONDER_NEWS_SENT); + data->state = MG_STATE_SAVE_LOAD_GIFT; + } + else + { + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + } + } + break; + case MG_STATE_CLIENT_ERROR: + case MG_STATE_SERVER_ERROR: + if (PrintMysteryGiftMenuMessage(&data->textState, gText_CommunicationError)) + { + data->state = MG_STATE_TO_MAIN_MENU; + PrintMysteryGiftOrEReaderTopMenu(FALSE, FALSE); + } + break; + case MG_STATE_EXIT: + CloseLink(); + Free(data->clientMsg); + DestroyTask(taskId); + SetMainCallback2(MainCB_FreeAllBuffersAndReturnToInitTitleScreen); + break; + } +} + +u16 GetMysteryGiftBaseBlock(void) +{ + return 0x1A9; +} + +static void LoadMysteryGiftTextboxBorder(u8 bgId) +{ + DecompressAndLoadBgGfxUsingHeap(bgId, sTextboxBorder_Gfx, 0x100, 0, 0); +} diff --git a/src/mevent_scripts.c b/src/mystery_gift_scripts.c similarity index 98% rename from src/mevent_scripts.c rename to src/mystery_gift_scripts.c index 23e0d97a56..fcd7f568d0 100644 --- a/src/mevent_scripts.c +++ b/src/mystery_gift_scripts.c @@ -1,7 +1,7 @@ #include "global.h" -#include "mevent_client.h" -#include "mevent_server.h" -#include "mevent.h" +#include "mystery_gift_client.h" +#include "mystery_gift_server.h" +#include "mystery_gift.h" static const u8 sText_CanceledReadingCard[] = _("Canceled reading\nthe Card."); diff --git a/src/mevent_server.c b/src/mystery_gift_server.c similarity index 99% rename from src/mevent_server.c rename to src/mystery_gift_server.c index 5313e02f75..0e0acb6428 100644 --- a/src/mevent_server.c +++ b/src/mystery_gift_server.c @@ -1,9 +1,9 @@ #include "global.h" #include "malloc.h" #include "script.h" -#include "mevent.h" -#include "mevent_server.h" -#include "mevent_server_helpers.h" +#include "mystery_gift.h" +#include "mystery_gift_server.h" +#include "mystery_gift_link.h" enum { FUNC_INIT, diff --git a/src/wonder_transfer.c b/src/mystery_gift_view.c similarity index 99% rename from src/wonder_transfer.c rename to src/mystery_gift_view.c index c1fc69ca77..1bd3e2a21c 100644 --- a/src/wonder_transfer.c +++ b/src/mystery_gift_view.c @@ -11,11 +11,11 @@ #include "text_window.h" #include "string_util.h" #include "link_rfu.h" -#include "mevent.h" #include "mystery_gift.h" -#include "wonder_transfer.h" +#include "mystery_gift_menu.h" +#include "mystery_gift_view.h" #include "constants/rgb.h" -#include "constants/mevent.h" +#include "constants/mystery_gift.h" struct WonderGraphics { diff --git a/src/new_game.c b/src/new_game.c index c4622820c4..1362c492d1 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -43,7 +43,7 @@ #include "player_pc.h" #include "field_specials.h" #include "berry_powder.h" -#include "mevent.h" +#include "mystery_gift.h" #include "union_room_chat.h" extern const u8 EventScript_ResetAllMapFlags[]; diff --git a/src/script.c b/src/script.c index a3e223768e..b10e0db49d 100644 --- a/src/script.c +++ b/src/script.c @@ -1,7 +1,7 @@ #include "global.h" #include "script.h" #include "event_data.h" -#include "mevent.h" +#include "mystery_gift.h" #include "util.h" #include "constants/maps.h" #include "constants/map_scripts.h" diff --git a/src/trade.c b/src/trade.c index acae292e58..3fdb15c459 100644 --- a/src/trade.c +++ b/src/trade.c @@ -19,8 +19,8 @@ #include "load_save.h" #include "mail.h" #include "main.h" -#include "mevent.h" #include "mystery_gift.h" +#include "mystery_gift_menu.h" #include "overworld.h" #include "palette.h" #include "party_menu.h" diff --git a/src/union_room.c b/src/union_room.c index 1a7ccc8e36..881a1d58ea 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -23,8 +23,8 @@ #include "load_save.h" #include "menu.h" #include "menu_helpers.h" -#include "mevent.h" #include "mystery_gift.h" +#include "mystery_gift_menu.h" #include "overworld.h" #include "palette.h" #include "party_menu.h" diff --git a/src/mevent_news.c b/src/wonder_news.c similarity index 98% rename from src/mevent_news.c rename to src/wonder_news.c index 27b22566d7..ec93d293ed 100644 --- a/src/mevent_news.c +++ b/src/wonder_news.c @@ -1,8 +1,8 @@ #include "global.h" -#include "mevent.h" +#include "mystery_gift.h" #include "random.h" #include "event_data.h" -#include "mevent_news.h" +#include "wonder_news.h" /* Wonder News related functions. diff --git a/sym_ewram.txt b/sym_ewram.txt index 360a91d328..a9ec00e3b9 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -9,14 +9,14 @@ .include "src/link_rfu_3.o" .include "src/link_rfu_2.o" .include "src/union_room.o" - .include "src/mystery_gift.o" + .include "src/mystery_gift_menu.o" .include "src/union_room_player_avatar.o" .include "src/wireless_communication_status_screen.o" .include "src/union_room_battle.o" - .include "src/mevent2.o" - .include "src/wonder_transfer.o" - .include "src/mevent_server.o" - .include "src/mevent_client.o" + .include "src/mystery_gift.o" + .include "src/mystery_gift_view.o" + .include "src/mystery_gift_server.o" + .include "src/mystery_gift_client.o" .include "src/union_room_chat.o" .include "src/berry_crush.o" .include "src/berry_powder.o" From ff594ccb8267623cc38528a3ad127a8b18585b1f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 03:22:55 -0400 Subject: [PATCH 071/417] Fix leftover icon_shadow names --- .../{icon_shadow.png => stamp_shadow.png} | Bin .../{icon_shadow_1.pal => stamp_shadow_1.pal} | 0 .../{icon_shadow_2.pal => stamp_shadow_2.pal} | 0 .../{icon_shadow_3.pal => stamp_shadow_3.pal} | 0 .../{icon_shadow_4.pal => stamp_shadow_4.pal} | 0 .../{icon_shadow_5.pal => stamp_shadow_5.pal} | 0 .../{icon_shadow_6.pal => stamp_shadow_6.pal} | 0 .../{icon_shadow_7.pal => stamp_shadow_7.pal} | 0 .../{icon_shadow_8.pal => stamp_shadow_8.pal} | 0 src/mystery_gift_view.c | 40 +++++++++--------- 10 files changed, 20 insertions(+), 20 deletions(-) rename graphics/wonder_card/{icon_shadow.png => stamp_shadow.png} (100%) rename graphics/wonder_card/{icon_shadow_1.pal => stamp_shadow_1.pal} (100%) rename graphics/wonder_card/{icon_shadow_2.pal => stamp_shadow_2.pal} (100%) rename graphics/wonder_card/{icon_shadow_3.pal => stamp_shadow_3.pal} (100%) rename graphics/wonder_card/{icon_shadow_4.pal => stamp_shadow_4.pal} (100%) rename graphics/wonder_card/{icon_shadow_5.pal => stamp_shadow_5.pal} (100%) rename graphics/wonder_card/{icon_shadow_6.pal => stamp_shadow_6.pal} (100%) rename graphics/wonder_card/{icon_shadow_7.pal => stamp_shadow_7.pal} (100%) rename graphics/wonder_card/{icon_shadow_8.pal => stamp_shadow_8.pal} (100%) diff --git a/graphics/wonder_card/icon_shadow.png b/graphics/wonder_card/stamp_shadow.png similarity index 100% rename from graphics/wonder_card/icon_shadow.png rename to graphics/wonder_card/stamp_shadow.png diff --git a/graphics/wonder_card/icon_shadow_1.pal b/graphics/wonder_card/stamp_shadow_1.pal similarity index 100% rename from graphics/wonder_card/icon_shadow_1.pal rename to graphics/wonder_card/stamp_shadow_1.pal diff --git a/graphics/wonder_card/icon_shadow_2.pal b/graphics/wonder_card/stamp_shadow_2.pal similarity index 100% rename from graphics/wonder_card/icon_shadow_2.pal rename to graphics/wonder_card/stamp_shadow_2.pal diff --git a/graphics/wonder_card/icon_shadow_3.pal b/graphics/wonder_card/stamp_shadow_3.pal similarity index 100% rename from graphics/wonder_card/icon_shadow_3.pal rename to graphics/wonder_card/stamp_shadow_3.pal diff --git a/graphics/wonder_card/icon_shadow_4.pal b/graphics/wonder_card/stamp_shadow_4.pal similarity index 100% rename from graphics/wonder_card/icon_shadow_4.pal rename to graphics/wonder_card/stamp_shadow_4.pal diff --git a/graphics/wonder_card/icon_shadow_5.pal b/graphics/wonder_card/stamp_shadow_5.pal similarity index 100% rename from graphics/wonder_card/icon_shadow_5.pal rename to graphics/wonder_card/stamp_shadow_5.pal diff --git a/graphics/wonder_card/icon_shadow_6.pal b/graphics/wonder_card/stamp_shadow_6.pal similarity index 100% rename from graphics/wonder_card/icon_shadow_6.pal rename to graphics/wonder_card/stamp_shadow_6.pal diff --git a/graphics/wonder_card/icon_shadow_7.pal b/graphics/wonder_card/stamp_shadow_7.pal similarity index 100% rename from graphics/wonder_card/icon_shadow_7.pal rename to graphics/wonder_card/stamp_shadow_7.pal diff --git a/graphics/wonder_card/icon_shadow_8.pal b/graphics/wonder_card/stamp_shadow_8.pal similarity index 100% rename from graphics/wonder_card/icon_shadow_8.pal rename to graphics/wonder_card/stamp_shadow_8.pal diff --git a/src/mystery_gift_view.c b/src/mystery_gift_view.c index 1bd3e2a21c..444ca8bd0e 100644 --- a/src/mystery_gift_view.c +++ b/src/mystery_gift_view.c @@ -137,32 +137,32 @@ static const u32 sWonderCardBgGfx7[] = INCBIN_U32("graphics/wonder_card/bg7. static const u32 sWonderCardBgTilemap7[] = INCBIN_U32("graphics/wonder_card/bg7.bin.lz"); static const u32 sWonderCardBgGfx8[] = INCBIN_U32("graphics/wonder_card/bg8.4bpp.lz"); static const u32 sWonderCardBgTilemap8[] = INCBIN_U32("graphics/wonder_card/bg8.bin.lz"); -static const u16 sIconShadowPal1[] = INCBIN_U16("graphics/wonder_card/icon_shadow_1.gbapal"); -static const u16 sIconShadowPal2[] = INCBIN_U16("graphics/wonder_card/icon_shadow_2.gbapal"); -static const u16 sIconShadowPal3[] = INCBIN_U16("graphics/wonder_card/icon_shadow_3.gbapal"); -static const u16 sIconShadowPal4[] = INCBIN_U16("graphics/wonder_card/icon_shadow_4.gbapal"); -static const u16 sIconShadowPal5[] = INCBIN_U16("graphics/wonder_card/icon_shadow_5.gbapal"); -static const u16 sIconShadowPal6[] = INCBIN_U16("graphics/wonder_card/icon_shadow_6.gbapal"); -static const u16 sIconShadowPal7[] = INCBIN_U16("graphics/wonder_card/icon_shadow_7.gbapal"); -static const u16 sIconShadowPal8[] = INCBIN_U16("graphics/wonder_card/icon_shadow_8.gbapal"); -static const u32 sIconShadowGfx[] = INCBIN_U32("graphics/wonder_card/icon_shadow.4bpp.lz"); +static const u16 sStampShadowPal1[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_1.gbapal"); +static const u16 sStampShadowPal2[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_2.gbapal"); +static const u16 sStampShadowPal3[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_3.gbapal"); +static const u16 sStampShadowPal4[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_4.gbapal"); +static const u16 sStampShadowPal5[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_5.gbapal"); +static const u16 sStampShadowPal6[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_6.gbapal"); +static const u16 sStampShadowPal7[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_7.gbapal"); +static const u16 sStampShadowPal8[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_8.gbapal"); +static const u32 sStampShadowGfx[] = INCBIN_U32("graphics/wonder_card/stamp_shadow.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheet_StampShadow = { - sIconShadowGfx, 0x100, TAG_STAMP_SHADOW + sStampShadowGfx, 0x100, TAG_STAMP_SHADOW }; static const struct SpritePalette sSpritePalettes_StampShadow[] = { - {sIconShadowPal1, TAG_STAMP_SHADOW}, - {sIconShadowPal2, TAG_STAMP_SHADOW}, - {sIconShadowPal3, TAG_STAMP_SHADOW}, - {sIconShadowPal4, TAG_STAMP_SHADOW}, - {sIconShadowPal5, TAG_STAMP_SHADOW}, - {sIconShadowPal6, TAG_STAMP_SHADOW}, - {sIconShadowPal7, TAG_STAMP_SHADOW}, - {sIconShadowPal8, TAG_STAMP_SHADOW} + {sStampShadowPal1, TAG_STAMP_SHADOW}, + {sStampShadowPal2, TAG_STAMP_SHADOW}, + {sStampShadowPal3, TAG_STAMP_SHADOW}, + {sStampShadowPal4, TAG_STAMP_SHADOW}, + {sStampShadowPal5, TAG_STAMP_SHADOW}, + {sStampShadowPal6, TAG_STAMP_SHADOW}, + {sStampShadowPal7, TAG_STAMP_SHADOW}, + {sStampShadowPal8, TAG_STAMP_SHADOW} }; -static const struct SpriteTemplate sSpriteTemplate_IconShadow = { +static const struct SpriteTemplate sSpriteTemplate_StampShadow = { .tileTag = TAG_STAMP_SHADOW, .paletteTag = TAG_STAMP_SHADOW, .oam = &gOamData_AffineOff_ObjNormal_32x16, @@ -503,7 +503,7 @@ static void CreateCardSprites(void) { sWonderCardData->stampSpriteIds[i][0] = SPRITE_NONE; sWonderCardData->stampSpriteIds[i][1] = SPRITE_NONE; - sWonderCardData->stampSpriteIds[i][0] = CreateSprite(&sSpriteTemplate_IconShadow, 216 - 32 * i, 144, 8); + sWonderCardData->stampSpriteIds[i][0] = CreateSprite(&sSpriteTemplate_StampShadow, 216 - 32 * i, 144, 8); if (sWonderCardData->cardMetadata.stampData[STAMP_SPECIES][i] != SPECIES_NONE) sWonderCardData->stampSpriteIds[i][1] = CreateMonIconNoPersonality(GetIconSpeciesNoPersonality(sWonderCardData->cardMetadata.stampData[STAMP_SPECIES][i]), SpriteCallbackDummy, From c70ec9748ac92e4b9ecc2f110ae5702a46097f90 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 15:11:36 -0400 Subject: [PATCH 072/417] Some union_room_chat clean up --- src/union_room_chat.c | 149 +++++++++++++++++++++++------------------- 1 file changed, 83 insertions(+), 66 deletions(-) diff --git a/src/union_room_chat.c b/src/union_room_chat.c index adf496fe62..7debe3cd4f 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -105,6 +105,17 @@ enum { CHAT_EXIT_DISBANDED, }; +enum { + GFXTAG_KEYBOARD_CURSOR, + GFXTAG_TEXT_ENTRY_ARROW, + GFXTAG_TEXT_ENTRY_CURSOR, + GFXTAG_RBUTTON_ICON, + GFXTAG_RBUTTON_LABELS, +}; + +// Shared by all above +#define PALTAG_INTERFACE 0 + struct UnionRoomChat { u32 filler1; @@ -123,7 +134,7 @@ struct UnionRoomChat u8 lastBufferCursorPos; u8 bufferCursorPos; u8 receivedPlayerIndex; - u8 exitType; + u8 exitType; // CHAT_EXIT_* bool8 changedRegisteredTexts; u8 afterSaveTimer; u8 messageEntryBuffer[2 * MAX_MESSAGE_LENGTH + 1]; @@ -249,9 +260,9 @@ static void CreateRButtonSprites(void); static void ShowKeyboardSwapMenu(void); static void HideKeyboardSwapMenu(void); static void SetKeyboardCursorInvisibility(bool32); -static bool32 sub_8020320(void); +static bool32 SlideKeyboardPageOut(void); static void PrintCurrentKeyboardPage(void); -static bool32 sub_8020368(void); +static bool32 SlideKeyboardPageIn(void); static void MoveKeyboardCursor(void); static void UpdateRButtonLabel(void); static void AddStdMessageWindow(int, u16); @@ -266,8 +277,8 @@ static void SetRegisteredTextPalette(bool32); static void PrintChatMessage(u16, u8 *, u8); static void StartKeyboardCursorAnim(void); static bool32 TryKeyboardCursorReopen(void); -static void sub_80207C0(s16); -static void sub_8020818(s16); +static void UpdateSlidingKeyboard(s16); +static void FinishSlidingKeyboard(s16); static bool32 Display_Dummy(u8 *); static bool32 Display_LoadGfx(u8 *state); static bool32 Display_ShowKeyboardSwapMenu(u8 *state); @@ -550,36 +561,36 @@ static const struct BgTemplate sBgTemplates[] = { static const struct WindowTemplate sWinTemplates[] = { { - .bg = 0x03, - .tilemapLeft = 0x08, - .tilemapTop = 0x01, - .width = 0x15, - .height = 0x13, - .paletteNum = 0x0f, + .bg = 3, + .tilemapLeft = 8, + .tilemapTop = 1, + .width = 21, + .height = 19, + .paletteNum = 15, .baseBlock = 0x0001, }, { - .bg = 0x01, - .tilemapLeft = 0x09, - .tilemapTop = 0x12, - .width = 0x0f, - .height = 0x02, - .paletteNum = 0x0c, + .bg = 1, + .tilemapLeft = 9, + .tilemapTop = 18, + .width = 15, + .height = 2, + .paletteNum = 12, .baseBlock = 0x007a, }, { - .bg = 0x01, - .tilemapLeft = 0x00, - .tilemapTop = 0x02, - .width = 0x06, - .height = 0x0f, - .paletteNum = 0x07, + .bg = 1, + .tilemapLeft = 0, + .tilemapTop = 2, + .width = 6, + .height = 15, + .paletteNum = 7, .baseBlock = 0x0020, }, { - .bg = 0x00, - .tilemapLeft = 0x01, - .tilemapTop = 0x02, - .width = 0x07, - .height = 0x09, - .paletteNum = 0x0e, + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 2, + .width = 7, + .height = 9, + .paletteNum = 14, .baseBlock = 0x0013, }, DUMMY_WIN_TEMPLATE }; @@ -783,8 +794,8 @@ static const union AnimCmd *const sAnims_KeyboardCursor[] = { }; static const struct SpriteTemplate sSpriteTemplate_KeyboardCursor = { - .tileTag = 0x0000, - .paletteTag = 0x0000, + .tileTag = GFXTAG_KEYBOARD_CURSOR, + .paletteTag = PALTAG_INTERFACE, .oam = &sOam_KeyboardCursor, .anims = sAnims_KeyboardCursor, .images = NULL, @@ -799,8 +810,8 @@ static const struct OamData sOam_TextEntrySprite = { }; static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = { - .tileTag = 0x0002, - .paletteTag = 0x0000, + .tileTag = GFXTAG_TEXT_ENTRY_CURSOR, + .paletteTag = PALTAG_INTERFACE, .oam = &sOam_TextEntrySprite, .anims = gDummySpriteAnimTable, .images = NULL, @@ -809,8 +820,8 @@ static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = { }; static const struct SpriteTemplate sSpriteTemplate_TextEntryArrow = { - .tileTag = 0x0001, - .paletteTag = 0x0000, + .tileTag = GFXTAG_TEXT_ENTRY_ARROW, + .paletteTag = PALTAG_INTERFACE, .oam = &sOam_TextEntrySprite, .anims = gDummySpriteAnimTable, .images = NULL, @@ -858,8 +869,8 @@ static const union AnimCmd *const sAnims_RButtonLabels[] = { }; static const struct SpriteTemplate sSpriteTemplate_RButtonIcon = { - .tileTag = 0x0003, - .paletteTag = 0x0000, + .tileTag = GFXTAG_RBUTTON_ICON, + .paletteTag = PALTAG_INTERFACE, .oam = &sOam_RButtonIcon, .anims = gDummySpriteAnimTable, .images = NULL, @@ -868,8 +879,8 @@ static const struct SpriteTemplate sSpriteTemplate_RButtonIcon = { }; static const struct SpriteTemplate sSpriteTemplate_RButtonLabels = { - .tileTag = 0x0004, - .paletteTag = 0x0000, + .tileTag = GFXTAG_RBUTTON_LABELS, + .paletteTag = PALTAG_INTERFACE, .oam = &sOam_RButtonLabel, .anims = sAnims_RButtonLabels, .images = NULL, @@ -879,7 +890,7 @@ static const struct SpriteTemplate sSpriteTemplate_RButtonLabels = { void EnterUnionRoomChat(void) { - sChat = Alloc(sizeof(struct UnionRoomChat)); + sChat = Alloc(sizeof(*sChat)); InitUnionRoomChat(sChat); gKeyRepeatStartDelay = 20; SetVBlankCallback(NULL); @@ -890,7 +901,7 @@ static void InitUnionRoomChat(struct UnionRoomChat *chat) { int i; - chat->funcId = 0; + chat->funcId = CHAT_FUNC_JOIN; chat->funcState = 0; chat->currentPage = 0; chat->currentCol = 0; @@ -901,7 +912,7 @@ static void InitUnionRoomChat(struct UnionRoomChat *chat) chat->messageEntryBuffer[0] = EOS; chat->linkPlayerCount = GetLinkPlayerCount(); chat->multiplayerId = GetMultiplayerId(); - chat->exitType = 0; + chat->exitType = CHAT_EXIT_NONE; chat->changedRegisteredTexts = FALSE; PrepareSendBuffer_Null(chat->sendMessageBuffer); for (i = 0; i < UNION_ROOM_KB_ROW_COUNT; i++) @@ -969,6 +980,8 @@ static void CB2_UnionRoomChatMain(void) static void Task_HandlePlayerInput(u8 taskId) { + // If exitType is not CHAT_EXIT_NONE, begin exit function. + // Otherwise just call main function below. switch (sChat->exitType) { case CHAT_EXIT_ONLY_LEADER: @@ -1056,7 +1069,7 @@ static void Chat_HandleInput(void) } else { - SetChatFunction(5); + SetChatFunction(CHAT_FUNC_REGISTER); } } else if (HandleDPadInput()) @@ -2080,7 +2093,7 @@ static void Task_ReceiveChatMessage(u8 taskId) if (GetLinkPlayerCount() == 2) { Rfu_StopPartnerSearch(); - sChat->exitType = 1; + sChat->exitType = CHAT_EXIT_ONLY_LEADER; DestroyTask(taskId); return; } @@ -2091,12 +2104,12 @@ static void Task_ReceiveChatMessage(u8 taskId) break; case 5: if (sChat->multiplayerId) - sChat->exitType = 2; + sChat->exitType = CHAT_EXIT_DROPPED; DestroyTask(taskId); break; case 6: - sChat->exitType = 3; + sChat->exitType = CHAT_EXIT_DISBANDED; DestroyTask(taskId); break; case 2: @@ -2295,7 +2308,7 @@ static bool32 Display_SwitchPages(u8 *state) { case 0: SetKeyboardCursorInvisibility(TRUE); - if (sub_8020320()) + if (SlideKeyboardPageOut()) return TRUE; PrintCurrentKeyboardPage(); @@ -2306,7 +2319,7 @@ static bool32 Display_SwitchPages(u8 *state) return TRUE; break; case 2: - if (sub_8020368()) + if (SlideKeyboardPageIn()) return TRUE; MoveKeyboardCursor(); @@ -2928,26 +2941,29 @@ static void PrintCurrentKeyboardPage(void) } } -static bool32 sub_8020320(void) +#define KEYBOARD_HOFS_END 56 + +static bool32 SlideKeyboardPageOut(void) { - if (sDisplay->bg1hofs < 56) + if (sDisplay->bg1hofs < KEYBOARD_HOFS_END) { sDisplay->bg1hofs += 12; - if (sDisplay->bg1hofs >= 56) - sDisplay->bg1hofs = 56; + if (sDisplay->bg1hofs >= KEYBOARD_HOFS_END) + sDisplay->bg1hofs = KEYBOARD_HOFS_END; - if (sDisplay->bg1hofs < 56) + if (sDisplay->bg1hofs < KEYBOARD_HOFS_END) { - sub_80207C0(sDisplay->bg1hofs); + // Still sliding + UpdateSlidingKeyboard(sDisplay->bg1hofs); return TRUE; } } - sub_8020818(sDisplay->bg1hofs); + FinishSlidingKeyboard(sDisplay->bg1hofs); return FALSE; } -static bool32 sub_8020368(void) +static bool32 SlideKeyboardPageIn(void) { if (sDisplay->bg1hofs > 0) { @@ -2957,12 +2973,13 @@ static bool32 sub_8020368(void) if (sDisplay->bg1hofs > 0) { - sub_80207C0(sDisplay->bg1hofs); + // Still sliding + UpdateSlidingKeyboard(sDisplay->bg1hofs); return TRUE; } } - sub_8020818(sDisplay->bg1hofs); + FinishSlidingKeyboard(sDisplay->bg1hofs); return FALSE; } @@ -3049,8 +3066,8 @@ static void LoadChatWindowGfx(void) ptr = DecompressAndCopyTileDataToVram(2, gUnionRoomChat_Background_Gfx, 0, 0, 0); if (ptr) { - CpuFastCopy(&ptr[0x220], sDisplay->unk2128, 0x20); - CpuFastCopy(&ptr[0x420], sDisplay->unk2148, 0x20); + CpuFastCopy(&ptr[0x220], sDisplay->unk2128, sizeof(sDisplay->unk2128)); + CpuFastCopy(&ptr[0x420], sDisplay->unk2148, sizeof(sDisplay->unk2148)); } CopyToBgTilemapBuffer(2, gUnionRoomChat_Background_Tilemap, 0, 0); @@ -3059,13 +3076,13 @@ static void LoadChatWindowGfx(void) static void sub_8020680(void) { - LoadPalette(sUnk_Palette1, 0x80, 0x20); + LoadPalette(sUnk_Palette1, 0x80, sizeof(sUnk_Palette1)); RequestDma3Fill(0, (void *)BG_CHAR_ADDR(1) + 0x20, 0x20, 1); } static void LoadChatMessagesWindow(void) { - LoadPalette(sUnk_Palette2, 0xF0, 0x20); + LoadPalette(sUnk_Palette2, 0xF0, sizeof(sUnk_Palette2)); PutWindowTilemap(0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); CopyWindowToVram(0, 3); @@ -3113,13 +3130,13 @@ static void InitScanlineEffect(void) ScanlineEffect_SetParams(params); } -static void sub_80207C0(s16 bg1hofs) +static void UpdateSlidingKeyboard(s16 bg1hofs) { CpuFill16(bg1hofs, gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer], 0x120); CpuFill16(0, gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer] + 0x90, 0x20); } -static void sub_8020818(s16 bg1hofs) +static void FinishSlidingKeyboard(s16 bg1hofs) { CpuFill16(bg1hofs, gScanlineEffectRegBuffers[0], 0x120); CpuFill16(0, gScanlineEffectRegBuffers[0] + 0x90, 0x20); @@ -3134,7 +3151,7 @@ static bool32 TryAllocSprites(void) LoadCompressedSpriteSheet(&sSpriteSheets[i]); LoadSpritePalette(&sSpritePalette); - sSprites = Alloc(sizeof(struct UnionRoomChatSprites)); + sSprites = Alloc(sizeof(*sSprites)); if (!sSprites) return FALSE; @@ -3180,7 +3197,7 @@ static void MoveKeyboardCursor(void) static void SetRegisteredTextPalette(bool32 registering) { const u16 *palette = &sUnionRoomChatInterfacePal[registering * 2 + 1]; - u8 index = IndexOfSpritePaletteTag(0); + u8 index = IndexOfSpritePaletteTag(PALTAG_INTERFACE); LoadPalette(palette, index * 16 + 0x101, 4); } From 371a13e9f9a44ba3959789361f3fc4a825fee9ab Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 17:38:52 -0400 Subject: [PATCH 073/417] Clean up in save_location --- src/save_location.c | 54 +++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/src/save_location.c b/src/save_location.c index aa56d7b16c..b201ca1c0d 100644 --- a/src/save_location.c +++ b/src/save_location.c @@ -2,14 +2,16 @@ #include "save_location.h" #include "constants/maps.h" +#define LIST_END 0xFFFF + static bool32 IsCurMapInLocationList(const u16 *list) { s32 i; - u16 locSum = (gSaveBlock1Ptr->location.mapGroup << 8) + (gSaveBlock1Ptr->location.mapNum); + u16 map = (gSaveBlock1Ptr->location.mapGroup << 8) + gSaveBlock1Ptr->location.mapNum; - for (i = 0; list[i] != 0xFFFF; i++) + for (i = 0; list[i] != LIST_END; i++) { - if (list[i] == locSum) + if (list[i] == map) return TRUE; } @@ -56,7 +58,7 @@ static const u16 sSaveLocationPokeCenterList[] = MAP_TRADE_CENTER, MAP_RECORD_CORNER, MAP_BATTLE_COLOSSEUM_4P, - 0xFFFF, + LIST_END, }; static bool32 IsCurMapPokeCenter(void) @@ -67,7 +69,7 @@ static bool32 IsCurMapPokeCenter(void) static const u16 sSaveLocationReloadLocList[] = // There's only 1 location, and it's presumed its for the save reload feature for battle tower. { MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, - 0xFFFF, + LIST_END, }; static bool32 IsCurMapReloadLocation(void) @@ -76,20 +78,20 @@ static bool32 IsCurMapReloadLocation(void) } // Nulled out list. Unknown what this would have been. -static const u16 sUnknown_0861440E[] = +static const u16 sEmptyMapList[] = { - 0xFFFF, + LIST_END, }; -static bool32 sub_81AFCEC(void) +static bool32 IsCurMapInEmptyList(void) { - return IsCurMapInLocationList(sUnknown_0861440E); + return IsCurMapInLocationList(sEmptyMapList); } static void TrySetPokeCenterWarpStatus(void) { - if (IsCurMapPokeCenter() == FALSE) - gSaveBlock2Ptr->specialSaveWarpFlags &= ~(POKECENTER_SAVEWARP); + if (!IsCurMapPokeCenter()) + gSaveBlock2Ptr->specialSaveWarpFlags &= ~POKECENTER_SAVEWARP; else gSaveBlock2Ptr->specialSaveWarpFlags |= POKECENTER_SAVEWARP; } @@ -97,16 +99,16 @@ static void TrySetPokeCenterWarpStatus(void) static void TrySetReloadWarpStatus(void) { if (!IsCurMapReloadLocation()) - gSaveBlock2Ptr->specialSaveWarpFlags &= ~(LOBBY_SAVEWARP); + gSaveBlock2Ptr->specialSaveWarpFlags &= ~LOBBY_SAVEWARP; else gSaveBlock2Ptr->specialSaveWarpFlags |= LOBBY_SAVEWARP; } -// this function definitely sets a warp status, but because the list is empty, it's unknown what this does yet. -static void sub_81AFD5C(void) +// Unknown save warp flag. Never set because map list is empty. +static void TrySetUnknownWarpStatus(void) { - if (!sub_81AFCEC()) - gSaveBlock2Ptr->specialSaveWarpFlags &= ~(UNK_SPECIAL_SAVE_WARP_FLAG_3); + if (!IsCurMapInEmptyList()) + gSaveBlock2Ptr->specialSaveWarpFlags &= ~UNK_SPECIAL_SAVE_WARP_FLAG_3; else gSaveBlock2Ptr->specialSaveWarpFlags |= UNK_SPECIAL_SAVE_WARP_FLAG_3; } @@ -115,21 +117,21 @@ void TrySetMapSaveWarpStatus(void) { TrySetPokeCenterWarpStatus(); TrySetReloadWarpStatus(); - sub_81AFD5C(); + TrySetUnknownWarpStatus(); } -// In FRLG, only 0x1, 0x10, and 0x20 are set when the pokedex is received -// 0x2, 0x4, 0x8, and 0x8000 are instead set by SetPostgameFlags +// In FRLG, only bits 0, 4, and 5 are set when the pokedex is received. +// Bits 1, 2, 3, and 15 are instead set by SetPostgameFlags. // These flags are read by Pokemon Colosseum/XD for linking. XD Additionally requires FLAG_SYS_GAME_CLEAR void SetUnlockedPokedexFlags(void) { - gSaveBlock2Ptr->gcnLinkFlags |= 0x8000; - gSaveBlock2Ptr->gcnLinkFlags |= 0x1; - gSaveBlock2Ptr->gcnLinkFlags |= 0x2; - gSaveBlock2Ptr->gcnLinkFlags |= 0x4; - gSaveBlock2Ptr->gcnLinkFlags |= 0x10; - gSaveBlock2Ptr->gcnLinkFlags |= 0x20; - gSaveBlock2Ptr->gcnLinkFlags |= 0x8; + gSaveBlock2Ptr->gcnLinkFlags |= (1 << 15); + gSaveBlock2Ptr->gcnLinkFlags |= (1 << 0); + gSaveBlock2Ptr->gcnLinkFlags |= (1 << 1); + gSaveBlock2Ptr->gcnLinkFlags |= (1 << 2); + gSaveBlock2Ptr->gcnLinkFlags |= (1 << 4); + gSaveBlock2Ptr->gcnLinkFlags |= (1 << 5); + gSaveBlock2Ptr->gcnLinkFlags |= (1 << 3); } void SetChampionSaveWarp(void) From f2e0c9ec9d6333813ca37edbb944ff333770679e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 17:51:35 -0400 Subject: [PATCH 074/417] Some pokedex clean up --- gflib/text.h | 2 +- src/battle_script_commands.c | 2 +- src/pokedex.c | 228 +++++++++++++++++++---------------- src/pokemon_storage_system.c | 2 +- src/pokenav_conditions_1.c | 2 +- 5 files changed, 126 insertions(+), 110 deletions(-) diff --git a/gflib/text.h b/gflib/text.h index f71cd557fa..8871ba2f18 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -71,7 +71,7 @@ // #define CHAR_i_ACUTE 0x6F // -#define CHAR_GENDERLESS 0x77 // Empty space for lack of gender icon +#define CHAR_SPACER 0x77 // Empty space // #define CHAR_UP_ARROW 0x79 #define CHAR_DOWN_ARROW 0x7A diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 91f89137a3..f717202950 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6047,7 +6047,7 @@ static void PutLevelAndGenderOnLvlUpBox(void) var = (u32)(txtPtr); txtPtr = ConvertIntToDecimalStringN(txtPtr, monLevel, STR_CONV_MODE_LEFT_ALIGN, 3); var = (u32)(txtPtr) - var; - txtPtr = StringFill(txtPtr, CHAR_GENDERLESS, 4 - var); + txtPtr = StringFill(txtPtr, CHAR_SPACER, 4 - var); if (monGender != MON_GENDERLESS) { diff --git a/src/pokedex.c b/src/pokedex.c index fa64b155c7..67e2d732e9 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -104,13 +104,15 @@ enum #define POKEBALL_ROTATION_TOP 64 #define POKEBALL_ROTATION_BOTTOM (POKEBALL_ROTATION_TOP - 16) -// EWRAM +// Coordinates of the Pokémon sprite on its page (info/cry screens) +#define MON_PAGE_X 48 +#define MON_PAGE_Y 56 + static EWRAM_DATA struct PokedexView *sPokedexView = NULL; static EWRAM_DATA u16 sLastSelectedPokemon = 0; static EWRAM_DATA u8 sPokeBallRotation = 0; static EWRAM_DATA struct PokedexListItem *sPokedexListItem = NULL; -// IWRAM common // This is written to, but never read. u8 gUnusedPokedexU8; void (*gPokedexVBlankCB)(void); @@ -241,7 +243,7 @@ static void SpriteCB_DexListStartMenuCursor(struct Sprite *sprite); static void SpriteCB_PokedexListMonSprite(struct Sprite *sprite); static u8 LoadInfoScreen(struct PokedexListItem*, u8 monSpriteId); static bool8 IsInfoScreenScrolling(u8); -static u8 sub_80BE9F8(struct PokedexListItem*, u8); +static u8 StartInfoScreenScroll(struct PokedexListItem*, u8); static void Task_LoadInfoScreen(u8); static void Task_HandleInfoScreenInput(u8); static void Task_SwitchScreensFromInfoScreen(u8); @@ -270,7 +272,7 @@ static void PrintMonHeight(u16 height, u8 left, u8 top); static void PrintMonWeight(u16 weight, u8 left, u8 top); static void ResetOtherVideoRegisters(u16); static u8 PrintCryScreenSpeciesName(u8, u16, u8, u8); -static void PrintFootprint(u8 windowId, u16 dexNum); +static void DrawFootprint(u8 windowId, u16 dexNum); static u16 CreateSizeScreenTrainerPic(u16, s16, s16, s8); static u16 GetNextPosition(u8, u16, u16, u16); static u8 LoadSearchMenu(void); @@ -1657,7 +1659,7 @@ void Task_OpenPokedexMainPage(u8 taskId) gTasks[taskId].func = Task_HandlePokedexInput; } -#define tTaskId data[0] +#define tLoadScreenTaskId data[0] static void Task_HandlePokedexInput(u8 taskId) { @@ -1669,7 +1671,7 @@ static void Task_HandlePokedexInput(u8 taskId) } else { - if ((JOY_NEW(A_BUTTON)) && sPokedexView->pokedexList[sPokedexView->selectedPokemon].seen) + if (JOY_NEW(A_BUTTON) && sPokedexView->pokedexList[sPokedexView->selectedPokemon].seen) { UpdateSelectedMonSpriteId(); BeginNormalPaletteFade(~(1 << (gSprites[sPokedexView->selectedMonSpriteId].oam.paletteNum + 16)), 0, 0, 0x10, RGB_BLACK); @@ -1690,7 +1692,7 @@ static void Task_HandlePokedexInput(u8 taskId) { PlaySE(SE_SELECT); BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].tTaskId = LoadSearchMenu(); + gTasks[taskId].tLoadScreenTaskId = LoadSearchMenu(); sPokedexView->screenSwitchState = 0; sPokedexView->pokeBallRotationBackup = sPokedexView->pokeBallRotation; sPokedexView->selectedPokemonBackup = sPokedexView->selectedPokemon; @@ -1770,12 +1772,12 @@ static void Task_HandlePokedexStartMenuInput(u8 taskId) gTasks[taskId].func = Task_HandlePokedexInput; PlaySE(SE_SELECT); } - else if ((JOY_REPEAT(DPAD_UP)) && sPokedexView->menuCursorPos != 0) + else if (JOY_REPEAT(DPAD_UP) && sPokedexView->menuCursorPos != 0) { sPokedexView->menuCursorPos--; PlaySE(SE_SELECT); } - else if ((JOY_REPEAT(DPAD_DOWN)) && sPokedexView->menuCursorPos < 3) + else if (JOY_REPEAT(DPAD_DOWN) && sPokedexView->menuCursorPos < 3) { sPokedexView->menuCursorPos++; PlaySE(SE_SELECT); @@ -1783,25 +1785,28 @@ static void Task_HandlePokedexStartMenuInput(u8 taskId) } } +// Opening the info screen from list view. Pokémon sprite is moving to its new position, wait for it to arrive static void Task_OpenInfoScreenAfterMonMovement(u8 taskId) { - if (gSprites[sPokedexView->selectedMonSpriteId].x == 48 && gSprites[sPokedexView->selectedMonSpriteId].y == 56) + if (gSprites[sPokedexView->selectedMonSpriteId].x == MON_PAGE_X && gSprites[sPokedexView->selectedMonSpriteId].y == MON_PAGE_Y) { sPokedexView->currentPageBackup = sPokedexView->currentPage; - gTasks[taskId].tTaskId = LoadInfoScreen(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], sPokedexView->selectedMonSpriteId); + gTasks[taskId].tLoadScreenTaskId = LoadInfoScreen(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], sPokedexView->selectedMonSpriteId); gTasks[taskId].func = Task_WaitForExitInfoScreen; } } static void Task_WaitForExitInfoScreen(u8 taskId) { - if (gTasks[gTasks[taskId].tTaskId].isActive) + if (gTasks[gTasks[taskId].tLoadScreenTaskId].isActive) { - if (sPokedexView->currentPage == PAGE_INFO && !IsInfoScreenScrolling(gTasks[taskId].tTaskId) && TryDoInfoScreenScroll()) - sub_80BE9F8(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], gTasks[taskId].tTaskId); + // While active, handle scroll input + if (sPokedexView->currentPage == PAGE_INFO && !IsInfoScreenScrolling(gTasks[taskId].tLoadScreenTaskId) && TryDoInfoScreenScroll()) + StartInfoScreenScroll(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], gTasks[taskId].tLoadScreenTaskId); } else { + // Exiting, back to list view sLastSelectedPokemon = sPokedexView->selectedPokemon; sPokeBallRotation = sPokedexView->pokeBallRotation; gTasks[taskId].func = Task_OpenPokedexMainPage; @@ -1810,7 +1815,7 @@ static void Task_WaitForExitInfoScreen(u8 taskId) static void Task_WaitForExitSearch(u8 taskId) { - if (!gTasks[gTasks[taskId].tTaskId].isActive) + if (!gTasks[gTasks[taskId].tLoadScreenTaskId].isActive) { ClearMonSprites(); @@ -1869,7 +1874,7 @@ static void Task_HandleSearchResultsInput(u8 taskId) } else { - if ((JOY_NEW(A_BUTTON)) && sPokedexView->pokedexList[sPokedexView->selectedPokemon].seen) + if (JOY_NEW(A_BUTTON) && sPokedexView->pokedexList[sPokedexView->selectedPokemon].seen) { u32 a; @@ -1892,7 +1897,7 @@ static void Task_HandleSearchResultsInput(u8 taskId) else if (JOY_NEW(SELECT_BUTTON)) { BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].tTaskId = LoadSearchMenu(); + gTasks[taskId].tLoadScreenTaskId = LoadSearchMenu(); sPokedexView->screenSwitchState = 0; gTasks[taskId].func = Task_WaitForExitSearch; PlaySE(SE_PC_LOGIN); @@ -1972,12 +1977,12 @@ static void Task_HandleSearchResultsStartMenuInput(u8 taskId) gTasks[taskId].func = Task_HandleSearchResultsInput; PlaySE(SE_SELECT); } - else if ((JOY_REPEAT(DPAD_UP)) && sPokedexView->menuCursorPos) + else if (JOY_REPEAT(DPAD_UP) && sPokedexView->menuCursorPos) { sPokedexView->menuCursorPos--; PlaySE(SE_SELECT); } - else if ((JOY_REPEAT(DPAD_DOWN)) && sPokedexView->menuCursorPos < 4) + else if (JOY_REPEAT(DPAD_DOWN) && sPokedexView->menuCursorPos < 4) { sPokedexView->menuCursorPos++; PlaySE(SE_SELECT); @@ -1987,10 +1992,10 @@ static void Task_HandleSearchResultsStartMenuInput(u8 taskId) static void Task_OpenSearchResultsInfoScreenAfterMonMovement(u8 taskId) { - if (gSprites[sPokedexView->selectedMonSpriteId].x == 48 && gSprites[sPokedexView->selectedMonSpriteId].y == 56) + if (gSprites[sPokedexView->selectedMonSpriteId].x == MON_PAGE_X && gSprites[sPokedexView->selectedMonSpriteId].y == MON_PAGE_Y) { sPokedexView->currentPageBackup = sPokedexView->currentPage; - gTasks[taskId].tTaskId = LoadInfoScreen(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], sPokedexView->selectedMonSpriteId); + gTasks[taskId].tLoadScreenTaskId = LoadInfoScreen(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], sPokedexView->selectedMonSpriteId); sPokedexView->selectedMonSpriteId = -1; gTasks[taskId].func = Task_WaitForExitSearchResultsInfoScreen; } @@ -1998,13 +2003,15 @@ static void Task_OpenSearchResultsInfoScreenAfterMonMovement(u8 taskId) static void Task_WaitForExitSearchResultsInfoScreen(u8 taskId) { - if (gTasks[gTasks[taskId].tTaskId].isActive) + if (gTasks[gTasks[taskId].tLoadScreenTaskId].isActive) { - if (sPokedexView->currentPage == PAGE_INFO && !IsInfoScreenScrolling(gTasks[taskId].tTaskId) && TryDoInfoScreenScroll()) - sub_80BE9F8(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], gTasks[taskId].tTaskId); + // While active, handle scroll input + if (sPokedexView->currentPage == PAGE_INFO && !IsInfoScreenScrolling(gTasks[taskId].tLoadScreenTaskId) && TryDoInfoScreenScroll()) + StartInfoScreenScroll(&sPokedexView->pokedexList[sPokedexView->selectedPokemon], gTasks[taskId].tLoadScreenTaskId); } else { + // Exiting, back to search results gTasks[taskId].func = Task_OpenSearchResults; } } @@ -2039,7 +2046,7 @@ static void Task_ClosePokedexFromSearchResultsStartMenu(u8 taskId) } } -#undef tTaskId +#undef tLoadScreenTaskId // For loading main pokedex page or pokedex search results static bool8 LoadPokedexListPage(u8 page) @@ -2586,7 +2593,7 @@ static u16 TryDoPokedexScroll(u16 selectedMon, u16 ignored) u16 startingPos; u8 scrollDir = 0; - if ((JOY_HELD(DPAD_UP)) && (selectedMon > 0)) + if (JOY_HELD(DPAD_UP) && (selectedMon > 0)) { scrollDir = 1; selectedMon = GetNextPosition(1, selectedMon, 0, sPokedexView->pokemonListCount - 1); @@ -2594,7 +2601,7 @@ static u16 TryDoPokedexScroll(u16 selectedMon, u16 ignored) CreateMonListEntry(1, selectedMon, ignored); PlaySE(SE_DEX_SCROLL); } - else if ((JOY_HELD(DPAD_DOWN)) && (selectedMon < sPokedexView->pokemonListCount - 1)) + else if (JOY_HELD(DPAD_DOWN) && (selectedMon < sPokedexView->pokemonListCount - 1)) { scrollDir = 2; selectedMon = GetNextPosition(0, selectedMon, 0, sPokedexView->pokemonListCount - 1); @@ -2602,7 +2609,7 @@ static u16 TryDoPokedexScroll(u16 selectedMon, u16 ignored) CreateMonListEntry(2, selectedMon, ignored); PlaySE(SE_DEX_SCROLL); } - else if ((JOY_NEW(DPAD_LEFT)) && (selectedMon > 0)) + else if (JOY_NEW(DPAD_LEFT) && (selectedMon > 0)) { startingPos = selectedMon; @@ -2613,7 +2620,7 @@ static u16 TryDoPokedexScroll(u16 selectedMon, u16 ignored) CreateMonSpritesAtPos(selectedMon, 0xE); PlaySE(SE_DEX_PAGE); } - else if ((JOY_NEW(DPAD_RIGHT)) && (selectedMon < sPokedexView->pokemonListCount - 1)) + else if (JOY_NEW(DPAD_RIGHT) && (selectedMon < sPokedexView->pokemonListCount - 1)) { startingPos = selectedMon; for (i = 0; i < 7; i++) @@ -2662,7 +2669,7 @@ static bool8 TryDoInfoScreenScroll(void) u16 nextPokemon; u16 selectedPokemon = sPokedexView->selectedPokemon; - if ((JOY_NEW(DPAD_UP)) && selectedPokemon) + if (JOY_NEW(DPAD_UP) && selectedPokemon) { nextPokemon = selectedPokemon; while (nextPokemon != 0) @@ -2685,7 +2692,7 @@ static bool8 TryDoInfoScreenScroll(void) return TRUE; } } - else if ((JOY_NEW(DPAD_DOWN)) && selectedPokemon < sPokedexView->pokemonListCount - 1) + else if (JOY_NEW(DPAD_DOWN) && selectedPokemon < sPokedexView->pokemonListCount - 1) { nextPokemon = selectedPokemon; while (nextPokemon < sPokedexView->pokemonListCount - 1) @@ -3002,16 +3009,16 @@ void SpriteCB_MoveMonForInfoScreen(struct Sprite *sprite) sprite->oam.affineMode = ST_OAM_AFFINE_OFF; sprite->x2 = 0; sprite->y2 = 0; - if (sprite->x != 48 || sprite->y != 56) + if (sprite->x != MON_PAGE_X || sprite->y != MON_PAGE_Y) { - if (sprite->x > 48) + if (sprite->x > MON_PAGE_X) sprite->x--; - if (sprite->x < 48) + if (sprite->x < MON_PAGE_X) sprite->x++; - if (sprite->y > 56) + if (sprite->y > MON_PAGE_Y) sprite->y--; - if (sprite->y < 56) + if (sprite->y < MON_PAGE_Y) sprite->y++; } else @@ -3165,7 +3172,12 @@ static void PrintInfoScreenText(const u8* str, u8 left, u8 top) AddTextPrinterParameterized4(0, 1, left, top, 0, 0, color, -1, str); } -#define tMonSpriteId data[4] +#define tScrolling data[0] +#define tMonSpriteDone data[1] +#define tBgLoaded data[2] +#define tSkipCry data[3] +#define tMonSpriteId data[4] +#define tTrainerSpriteId data[5] static u8 LoadInfoScreen(struct PokedexListItem* item, u8 monSpriteId) { @@ -3173,12 +3185,12 @@ static u8 LoadInfoScreen(struct PokedexListItem* item, u8 monSpriteId) sPokedexListItem = item; taskId = CreateTask(Task_LoadInfoScreen, 0); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = 1; - gTasks[taskId].data[2] = 0; - gTasks[taskId].data[3] = 0; + gTasks[taskId].tScrolling = FALSE; + gTasks[taskId].tMonSpriteDone = TRUE; // Already has sprite from list view + gTasks[taskId].tBgLoaded = FALSE; + gTasks[taskId].tSkipCry = FALSE; gTasks[taskId].tMonSpriteId = monSpriteId; - gTasks[taskId].data[5] = 255; + gTasks[taskId].tTrainerSpriteId = SPRITE_NONE; ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sInfoScreen_BgTemplate, ARRAY_COUNT(sInfoScreen_BgTemplate)); SetBgTilemapBuffer(3, AllocZeroed(BG_SCREEN_SIZE)); @@ -3193,19 +3205,19 @@ static u8 LoadInfoScreen(struct PokedexListItem* item, u8 monSpriteId) static bool8 IsInfoScreenScrolling(u8 taskId) { - if (gTasks[taskId].data[0] == 0 && gTasks[taskId].func == Task_HandleInfoScreenInput) + if (!gTasks[taskId].tScrolling && gTasks[taskId].func == Task_HandleInfoScreenInput) return FALSE; else return TRUE; } -static u8 sub_80BE9F8(struct PokedexListItem *item, u8 taskId) +static u8 StartInfoScreenScroll(struct PokedexListItem *item, u8 taskId) { sPokedexListItem = item; - gTasks[taskId].data[0] = 1; - gTasks[taskId].data[1] = 0; - gTasks[taskId].data[2] = 0; - gTasks[taskId].data[3] = 0; + gTasks[taskId].tScrolling = TRUE; + gTasks[taskId].tMonSpriteDone = FALSE; + gTasks[taskId].tBgLoaded = FALSE; + gTasks[taskId].tSkipCry = FALSE; return taskId; } @@ -3223,9 +3235,9 @@ static void Task_LoadInfoScreen(u8 taskId) gPokedexVBlankCB = gMain.vblankCallback; SetVBlankCallback(NULL); r2 = 0; - if (gTasks[taskId].data[1] != 0) + if (gTasks[taskId].tMonSpriteDone) r2 += DISPCNT_OBJ_ON; - if (gTasks[taskId].data[2] != 0) + if (gTasks[taskId].tBgLoaded) r2 |= DISPCNT_BG1_ON; ResetOtherVideoRegisters(r2); gMain.state = 1; @@ -3237,7 +3249,7 @@ static void Task_LoadInfoScreen(u8 taskId) FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); PutWindowTilemap(WIN_INFO); PutWindowTilemap(WIN_FOOTPRINT); - PrintFootprint(WIN_FOOTPRINT, sPokedexListItem->dexNum); + DrawFootprint(WIN_FOOTPRINT, sPokedexListItem->dexNum); CopyWindowToVram(WIN_FOOTPRINT, 2); gMain.state++; break; @@ -3261,9 +3273,9 @@ static void Task_LoadInfoScreen(u8 taskId) gMain.state++; break; case 5: - if (gTasks[taskId].data[1] == 0) + if (!gTasks[taskId].tMonSpriteDone) { - gTasks[taskId].tMonSpriteId = (u16)CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, 48, 56, 0); + gTasks[taskId].tMonSpriteId = (u16)CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, MON_PAGE_X, MON_PAGE_Y, 0); gSprites[gTasks[taskId].tMonSpriteId].oam.priority = 0; } gMain.state++; @@ -3272,9 +3284,9 @@ static void Task_LoadInfoScreen(u8 taskId) { u32 preservedPalettes = 0; - if (gTasks[taskId].data[2] != 0) + if (gTasks[taskId].tBgLoaded) preservedPalettes = 0x14; // each bit represents a palette index - if (gTasks[taskId].data[1] != 0) + if (gTasks[taskId].tMonSpriteDone) preservedPalettes |= (1 << (gSprites[gTasks[taskId].tMonSpriteId].oam.paletteNum + 16)); BeginNormalPaletteFade(~preservedPalettes, 0, 16, 0, RGB_BLACK); SetVBlankCallback(gPokedexVBlankCB); @@ -3296,10 +3308,10 @@ static void Task_LoadInfoScreen(u8 taskId) if (!gPaletteFade.active) { gMain.state++; - if (gTasks[taskId].data[3] == 0) + if (!gTasks[taskId].tSkipCry) { StopCryAndClearCrySongs(); - PlayCry2(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), 0, 0x7D, 0xA); + PlayCry2(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), 0, 125, 10); } else { @@ -3312,10 +3324,10 @@ static void Task_LoadInfoScreen(u8 taskId) gMain.state++; break; case 10: - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = 0; - gTasks[taskId].data[2] = 1; - gTasks[taskId].data[3] = 1; + gTasks[taskId].tScrolling = FALSE; + gTasks[taskId].tMonSpriteDone = FALSE; // Reload next time screen comes up + gTasks[taskId].tBgLoaded = TRUE; + gTasks[taskId].tSkipCry = TRUE; gTasks[taskId].func = Task_HandleInfoScreenInput; gMain.state = 0; break; @@ -3343,7 +3355,7 @@ static void FreeInfoScreenWindowAndBgBuffers(void) static void Task_HandleInfoScreenInput(u8 taskId) { - if (gTasks[taskId].data[0] != 0) + if (gTasks[taskId].tScrolling) { // Scroll up/down BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); @@ -3395,8 +3407,8 @@ static void Task_HandleInfoScreenInput(u8 taskId) } return; } - if (((JOY_NEW(DPAD_LEFT)) - || ((JOY_NEW(L_BUTTON)) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) + if ((JOY_NEW(DPAD_LEFT) + || (JOY_NEW(L_BUTTON) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) && sPokedexView->selectedScreen > 0) { sPokedexView->selectedScreen--; @@ -3404,8 +3416,8 @@ static void Task_HandleInfoScreenInput(u8 taskId) PlaySE(SE_DEX_PAGE); return; } - if (((JOY_NEW(DPAD_RIGHT)) - || ((JOY_NEW(R_BUTTON)) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) + if ((JOY_NEW(DPAD_RIGHT) + || (JOY_NEW(R_BUTTON) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) && sPokedexView->selectedScreen < CANCEL_SCREEN) { sPokedexView->selectedScreen++; @@ -3554,7 +3566,7 @@ static void Task_LoadCryScreen(u8 taskId) gMain.state++; break; case 5: - gTasks[taskId].tMonSpriteId = CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, 48, 56, 0); + gTasks[taskId].tMonSpriteId = CreateMonSpriteFromNationalDexNumber(sPokedexListItem->dexNum, MON_PAGE_X, MON_PAGE_Y, 0); gSprites[gTasks[taskId].tMonSpriteId].oam.priority = 0; gDexCryScreenState = 0; gMain.state++; @@ -3642,8 +3654,8 @@ static void Task_HandleCryScreenInput(u8 taskId) PlaySE(SE_PC_OFF); return; } - if ((JOY_NEW(DPAD_LEFT)) - || ((JOY_NEW(L_BUTTON)) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) + if (JOY_NEW(DPAD_LEFT) + || (JOY_NEW(L_BUTTON) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) { BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK); m4aMPlayContinue(&gMPlayInfo_BGM); @@ -3652,8 +3664,8 @@ static void Task_HandleCryScreenInput(u8 taskId) PlaySE(SE_DEX_PAGE); return; } - if ((JOY_NEW(DPAD_RIGHT)) - || ((JOY_NEW(R_BUTTON)) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) + if (JOY_NEW(DPAD_RIGHT) + || (JOY_NEW(R_BUTTON) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) { if (!sPokedexListItem->owned) { @@ -3758,7 +3770,7 @@ static void Task_LoadSizeScreen(u8 taskId) gSprites[spriteId].y2 = gPokedexEntries[sPokedexListItem->dexNum].trainerOffset; SetOamMatrix(1, gPokedexEntries[sPokedexListItem->dexNum].trainerScale, 0, 0, gPokedexEntries[sPokedexListItem->dexNum].trainerScale); LoadPalette(sSizeScreenSilhouette_Pal, (gSprites[spriteId].oam.paletteNum + 16) * 16, 0x20); - gTasks[taskId].data[5] = spriteId; + gTasks[taskId].tTrainerSpriteId = spriteId; gMain.state++; break; case 6: @@ -3812,8 +3824,8 @@ static void Task_HandleSizeScreenInput(u8 taskId) gTasks[taskId].func = Task_SwitchScreensFromSizeScreen; PlaySE(SE_PC_OFF); } - else if ((JOY_NEW(DPAD_LEFT)) - || ((JOY_NEW(L_BUTTON)) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) + else if (JOY_NEW(DPAD_LEFT) + || (JOY_NEW(L_BUTTON) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)) { BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK); sPokedexView->screenSwitchState = 2; @@ -3827,7 +3839,7 @@ static void Task_SwitchScreensFromSizeScreen(u8 taskId) if (!gPaletteFade.active) { FreeAndDestroyMonPicSprite(gTasks[taskId].tMonSpriteId); - FreeAndDestroyTrainerPicSprite(gTasks[taskId].data[5]); + FreeAndDestroyTrainerPicSprite(gTasks[taskId].tTrainerSpriteId); switch (sPokedexView->screenSwitchState) { default: @@ -3841,7 +3853,12 @@ static void Task_SwitchScreensFromSizeScreen(u8 taskId) } } +#undef tScrolling +#undef tMonSpriteDone +#undef tBgLoaded +#undef tSkipCry #undef tMonSpriteId +#undef tTrainerSpriteId static void LoadScreenSelectBarMain(u16 unused) { @@ -3959,7 +3976,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); PutWindowTilemap(WIN_INFO); PutWindowTilemap(WIN_FOOTPRINT); - PrintFootprint(WIN_FOOTPRINT, gTasks[taskId].tDexNum); + DrawFootprint(WIN_FOOTPRINT, gTasks[taskId].tDexNum); CopyWindowToVram(WIN_FOOTPRINT, 2); ResetPaletteFade(); LoadPokedexBgPalette(FALSE); @@ -3976,7 +3993,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) gTasks[taskId].tState++; break; case 4: - spriteId = CreateMonSpriteFromNationalDexNumber(dexNum, 48, 56, 0); + spriteId = CreateMonSpriteFromNationalDexNumber(dexNum, MON_PAGE_X, MON_PAGE_Y, 0); gSprites[spriteId].oam.priority = 0; BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); SetVBlankCallback(gPokedexVBlankCB); @@ -4174,7 +4191,7 @@ static void PrintMonWeight(u16 weight, u8 left, u8 top) if ((buffer[i] = (lbs / 100000) + CHAR_0) == CHAR_0 && !output) { - buffer[i++] = 0x77; + buffer[i++] = CHAR_SPACER; } else { @@ -4185,7 +4202,7 @@ static void PrintMonWeight(u16 weight, u8 left, u8 top) lbs %= 100000; if ((buffer[i] = (lbs / 10000) + CHAR_0) == CHAR_0 && !output) { - buffer[i++] = 0x77; + buffer[i++] = CHAR_SPACER; } else { @@ -4196,7 +4213,7 @@ static void PrintMonWeight(u16 weight, u8 left, u8 top) lbs %= 10000; if ((buffer[i] = (lbs / 1000) + CHAR_0) == CHAR_0 && !output) { - buffer[i++] = 0x77; + buffer[i++] = CHAR_SPACER; } else { @@ -4525,7 +4542,7 @@ static void UnusedPrintDecimalNum(u8 windowId, u16 b, u8 left, u8 top) result = b / 1000; if (result == 0) { - str[0] = 0x77; + str[0] = CHAR_SPACER; outputted = FALSE; } else @@ -4537,7 +4554,7 @@ static void UnusedPrintDecimalNum(u8 windowId, u16 b, u8 left, u8 top) result = (b % 1000) / 100; if (result == 0 && !outputted) { - str[1] = 0x77; + str[1] = CHAR_SPACER; outputted = FALSE; } else @@ -4553,36 +4570,35 @@ static void UnusedPrintDecimalNum(u8 windowId, u16 b, u8 left, u8 top) PrintInfoSubMenuText(windowId, str, left, top); } -static void PrintFootprint(u8 windowId, u16 dexNum) +static void DrawFootprint(u8 windowId, u16 dexNum) { - u8 image[32 * 4]; - const u8 * r12 = gMonFootprintTable[NationalPokedexNumToSpecies(dexNum)]; - u16 r5 = 0; - u16 i; - u16 j; + u8 footprint[32 * 4]; + const u8 * footprintGfx = gMonFootprintTable[NationalPokedexNumToSpecies(dexNum)]; + u16 tileIdx = 0; + u16 i, j; for (i = 0; i < 32; i++) { - u8 r3 = r12[i]; + u8 tile = footprintGfx[i]; for (j = 0; j < 4; j++) { - u8 value = ((r3 >> (2 * j)) & 1 ? 2 : 0); - if ((2 << (2 * j)) & r3) + u8 value = ((tile >> (2 * j)) & 1 ? 2 : 0); + if (tile & (2 << (2 * j))) value |= 0x20; - image[r5] = value; - r5++; + footprint[tileIdx] = value; + tileIdx++; } } - CopyToWindowPixelBuffer(windowId, image, sizeof(image), 0); + CopyToWindowPixelBuffer(windowId, footprint, sizeof(footprint), 0); } -// Unused -void sub_80C0DC0(u16 a, u16 b) +// Unused Ruby/Sapphire function. +static void RS_DrawFootprint(u16 offset, u16 tileNum) { - *(u16 *)(VRAM + a * 0x800 + 0x232) = 0xF000 + b + 0; - *(u16 *)(VRAM + a * 0x800 + 0x234) = 0xF000 + b + 1; - *(u16 *)(VRAM + a * 0x800 + 0x272) = 0xF000 + b + 2; - *(u16 *)(VRAM + a * 0x800 + 0x274) = 0xF000 + b + 3; + *(u16 *)(VRAM + offset * 0x800 + 0x232) = 0xF000 + tileNum + 0; + *(u16 *)(VRAM + offset * 0x800 + 0x234) = 0xF000 + tileNum + 1; + *(u16 *)(VRAM + offset * 0x800 + 0x272) = 0xF000 + tileNum + 2; + *(u16 *)(VRAM + offset * 0x800 + 0x274) = 0xF000 + tileNum + 3; } static u16 GetNextPosition(u8 direction, u16 position, u16 min, u16 max) @@ -4921,7 +4937,7 @@ static void Task_HandleSearchTopBarInput(u8 taskId) } return; } - if ((JOY_NEW(DPAD_LEFT)) && gTasks[taskId].tTopBarItem > SEARCH_TOPBAR_SEARCH) + if (JOY_NEW(DPAD_LEFT) && gTasks[taskId].tTopBarItem > SEARCH_TOPBAR_SEARCH) { PlaySE(SE_DEX_PAGE); gTasks[taskId].tTopBarItem--; @@ -4929,7 +4945,7 @@ static void Task_HandleSearchTopBarInput(u8 taskId) CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } - if ((JOY_NEW(DPAD_RIGHT)) && gTasks[taskId].tTopBarItem < SEARCH_TOPBAR_CANCEL) + if (JOY_NEW(DPAD_RIGHT) && gTasks[taskId].tTopBarItem < SEARCH_TOPBAR_CANCEL) { PlaySE(SE_DEX_PAGE); gTasks[taskId].tTopBarItem++; @@ -5010,7 +5026,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) return; } - if ((JOY_NEW(DPAD_LEFT)) && movementMap[gTasks[taskId].tMenuItem][0] != 0xFF) + if (JOY_NEW(DPAD_LEFT) && movementMap[gTasks[taskId].tMenuItem][0] != 0xFF) { PlaySE(SE_SELECT); gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][0]; @@ -5018,7 +5034,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } - if ((JOY_NEW(DPAD_RIGHT)) && movementMap[gTasks[taskId].tMenuItem][1] != 0xFF) + if (JOY_NEW(DPAD_RIGHT) && movementMap[gTasks[taskId].tMenuItem][1] != 0xFF) { PlaySE(SE_SELECT); gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][1]; @@ -5026,7 +5042,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } - if ((JOY_NEW(DPAD_UP)) && movementMap[gTasks[taskId].tMenuItem][2] != 0xFF) + if (JOY_NEW(DPAD_UP) && movementMap[gTasks[taskId].tMenuItem][2] != 0xFF) { PlaySE(SE_SELECT); gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][2]; @@ -5034,7 +5050,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) CopyWindowToVram(0, 2); CopyBgTilemapBufferToVram(3); } - if ((JOY_NEW(DPAD_DOWN)) && movementMap[gTasks[taskId].tMenuItem][3] != 0xFF) + if (JOY_NEW(DPAD_DOWN) && movementMap[gTasks[taskId].tMenuItem][3] != 0xFF) { PlaySE(SE_SELECT); gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][3]; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index bd09106585..3911f52f03 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -6980,7 +6980,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) *(txtPtr)++ = TEXT_COLOR_DARK_GRAY; *(txtPtr)++ = TEXT_COLOR_WHITE; *(txtPtr)++ = TEXT_COLOR_LIGHT_GRAY; - *(txtPtr)++ = CHAR_GENDERLESS; + *(txtPtr)++ = CHAR_SPACER; // Genderless break; } diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index d2424629a2..a01b93a803 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -372,7 +372,7 @@ u8 *CopyMonConditionNameGender(u8 *str, u16 id, bool8 arg3) switch (gender) { default: - *(str_++) = CHAR_GENDERLESS; + *(str_++) = CHAR_SPACER; // Genderless break; case MON_MALE: *(str_++) = EXT_CTRL_CODE_BEGIN; From a950f9c7712ed8794e385bb7ed6b9eff360b4260 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 21:51:11 -0400 Subject: [PATCH 075/417] Clean up international_string_util --- include/international_string_util.h | 8 ++--- src/international_string_util.c | 49 ++++++++++++++--------------- src/player_pc.c | 2 +- src/pokenav_conditions_3.c | 4 +-- src/pokenav_match_call_1.c | 6 ++-- src/pokenav_ribbons_1.c | 4 +-- src/tv.c | 2 +- 7 files changed, 36 insertions(+), 39 deletions(-) diff --git a/include/international_string_util.h b/include/international_string_util.h index fe7e85b41f..54f4c008ff 100644 --- a/include/international_string_util.h +++ b/include/international_string_util.h @@ -10,15 +10,15 @@ int GetStringCenterAlignXOffset(int fontId, const u8 *str, int totalWidth); int GetStringRightAlignXOffset(int fontId, const u8 *str, int totalWidth); int GetStringCenterAlignXOffsetWithLetterSpacing(int fontId, const u8 *str, int totalWidth, int letterSpacing); int GetStringWidthDifference(int fontId, const u8 *str, int totalWidth, int letterSpacing); -int GetMaxWidthInMenuTable(const struct MenuAction *str, int arg1); -int sub_81DB3D8(const struct MenuAction *str, const u8* arg1, int arg2); +int GetMaxWidthInMenuTable(const struct MenuAction *actions, int numActions); +int GetMaxWidthInSubsetOfMenuTable(const struct MenuAction *actions, const u8* actionIds, int numActions); int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu); void CopyMonCategoryText(int dexNum, u8 *dest); -u8 *sub_81DB494(u8 *str, int fontId, const u8 *str2, int totalStringWidth); +u8 *GetStringClearToWidth(u8 *dest, int fontId, const u8 *str, int totalStringWidth); void PadNameString(u8 *dest, u8 padChar); void ConvertInternationalPlayerNameStripChar(u8 *, u8); void ConvertInternationalContestantName(u8 *); -int sub_81DB604(u8 *); +int GetNicknameLanguage(u8 *); void sub_81DB620(int windowId, int columnStart, int rowStart, int numFillTiles, int numRows); #endif // GUARD_INTERNATIONAL_STRING_UTIL_H diff --git a/src/international_string_util.c b/src/international_string_util.c index eb2ec16e70..b2ee9743ea 100644 --- a/src/international_string_util.c +++ b/src/international_string_util.c @@ -34,32 +34,32 @@ int GetStringWidthDifference(int fontId, const u8 *str, int totalWidth, int lett return 0; } -int GetMaxWidthInMenuTable(const struct MenuAction *str, int numActions) +int GetMaxWidthInMenuTable(const struct MenuAction *actions, int numActions) { - int i, var; + int i, maxWidth; - for (var = 0, i = 0; i < numActions; i++) + for (maxWidth = 0, i = 0; i < numActions; i++) { - int stringWidth = GetStringWidth(1, str[i].text, 0); - if (stringWidth > var) - var = stringWidth; + int stringWidth = GetStringWidth(1, actions[i].text, 0); + if (stringWidth > maxWidth) + maxWidth = stringWidth; } - return ConvertPixelWidthToTileWidth(var); + return ConvertPixelWidthToTileWidth(maxWidth); } -int sub_81DB3D8(const struct MenuAction *str, const u8* arg1, int arg2) +int GetMaxWidthInSubsetOfMenuTable(const struct MenuAction *actions, const u8* actionIds, int numActions) { - int i, var; + int i, maxWidth; - for (var = 0, i = 0; i < arg2; i++) + for (maxWidth = 0, i = 0; i < numActions; i++) { - int stringWidth = GetStringWidth(1, str[arg1[i]].text, 0); - if (stringWidth > var) - var = stringWidth; + int stringWidth = GetStringWidth(1, actions[actionIds[i]].text, 0); + if (stringWidth > maxWidth) + maxWidth = stringWidth; } - return ConvertPixelWidthToTileWidth(var); + return ConvertPixelWidthToTileWidth(maxWidth); } int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu) @@ -93,32 +93,29 @@ void CopyMonCategoryText(int dexNum, u8 *dest) StringCopy(str + 1, gText_Pokemon); } -u8 *sub_81DB494(u8 *str, int fontId, const u8 *str2, int totalStringWidth) +u8 *GetStringClearToWidth(u8 *dest, int fontId, const u8 *str, int totalStringWidth) { u8 *buffer; int width; int clearWidth; - if (str2) + if (str) { - buffer = StringCopy(str, str2); - width = GetStringWidth(fontId, str2, 0); + buffer = StringCopy(dest, str); + width = GetStringWidth(fontId, str, 0); } else { - buffer = str; + buffer = dest; width = 0; } clearWidth = totalStringWidth - width; if (clearWidth > 0) { - *buffer = EXT_CTRL_CODE_BEGIN; - buffer++; - *buffer = EXT_CTRL_CODE_CLEAR; - buffer++; - *buffer = clearWidth; - buffer++; + *(buffer++) = EXT_CTRL_CODE_BEGIN; + *(buffer++) = EXT_CTRL_CODE_CLEAR; + *(buffer++) = clearWidth; *buffer = EOS; } @@ -209,7 +206,7 @@ void TVShowConvertInternationalString(u8 *dest, const u8 *src, int language) ConvertInternationalString(dest, language); } -int sub_81DB604(u8 *str) +int GetNicknameLanguage(u8 *str) { if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN) return LANGUAGE_JAPANESE; diff --git a/src/player_pc.c b/src/player_pc.c index 507fc65582..cc9d33067f 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -396,7 +396,7 @@ static void InitPlayerPCMenu(u8 taskId) else // Bedroom PC windowTemplate = sWindowTemplates_MainMenus[WIN_MAIN_MENU_BEDROOM]; - windowTemplate.width = sub_81DB3D8(sPlayerPCMenuActions, sTopMenuOptionOrder, sTopMenuNumOptions); + windowTemplate.width = GetMaxWidthInSubsetOfMenuTable(sPlayerPCMenuActions, sTopMenuOptionOrder, sTopMenuNumOptions); tWindowId = AddWindow(&windowTemplate); SetStandardWindowBorderStyle(tWindowId, 0); sub_81995E4(tWindowId, sTopMenuNumOptions, sPlayerPCMenuActions, sTopMenuOptionOrder); diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 219bb5a073..53987d11dd 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -705,7 +705,7 @@ static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest) } StringGetEnd10(gStringVar3); - dest = sub_81DB494(dest, 1, gStringVar3, 60); + dest = GetStringClearToWidth(dest, 1, gStringVar3, 60); switch (gender) { default: @@ -723,5 +723,5 @@ static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest) *s++ = CHAR_EXTRA_SYMBOL; *s++ = CHAR_LV_2; ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); - sub_81DB494(dest, 1, gStringVar1, 40); + GetStringClearToWidth(dest, 1, gStringVar1, 40); } diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index e9d4c0b673..64957995d5 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -413,12 +413,12 @@ void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries *matchCallEntry, if (className && trainerName) { - u8 *str2 = sub_81DB494(str, 7, className, 69); - sub_81DB494(str2, 7, trainerName, 51); + u8 *str2 = GetStringClearToWidth(str, 7, className, 69); + GetStringClearToWidth(str2, 7, trainerName, 51); } else { - sub_81DB494(str, 7, NULL, 120); + GetStringClearToWidth(str, 7, NULL, 120); } } diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c index 69326ad23b..a8aaafa354 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_1.c @@ -722,7 +722,7 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest) } StringGetEnd10(gStringVar3); - dest = sub_81DB494(dest, 1, gStringVar3, 60); + dest = GetStringClearToWidth(dest, 1, gStringVar3, 60); switch (gender) { default: @@ -741,6 +741,6 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest) *s++ = CHAR_EXTRA_SYMBOL; *s++ = CHAR_LV_2; ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); - dest = sub_81DB494(dest, 1, gStringVar1, 54); + dest = GetStringClearToWidth(dest, 1, gStringVar1, 54); ConvertIntToDecimalStringN(dest, item->data, STR_CONV_MODE_RIGHT_ALIGN, 2); } diff --git a/src/tv.c b/src/tv.c index 4529239338..310163e94d 100644 --- a/src/tv.c +++ b/src/tv.c @@ -1155,7 +1155,7 @@ void TryPutPokemonTodayOnAir(void) show->pokemonToday.ball = itemLastUsed; StringCopy(show->pokemonToday.playerName, gSaveBlock2Ptr->playerName); StringCopy(show->pokemonToday.nickname, gBattleResults.caughtMonNick); - language2 = sub_81DB604(show->pokemonToday.nickname); + language2 = GetNicknameLanguage(show->pokemonToday.nickname); StripExtCtrlCodes(show->pokemonToday.nickname); show->pokemonToday.species = gBattleResults.caughtMonSpecies; StorePlayerIdInRecordMixShow(show); From ed6fdd743f41185a1ebd030fb9d9ea36e37a3ced Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 17 Oct 2021 22:04:08 -0400 Subject: [PATCH 076/417] Some pokemon_icon clean up --- include/pokemon_icon.h | 3 +-- src/pokemon_icon.c | 44 +++++++++++++++++------------------- src/pokemon_storage_system.c | 2 +- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index c0f823bb1e..4731da90e9 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -4,7 +4,7 @@ extern const u8 gMonIconPaletteIndices[]; const u8 *GetMonIconTiles(u16 species, bool32); -void sub_80D304C(u16 offset); +void TryLoadAllMonIconPalettesAtOffset(u16 offset); u8 GetValidMonIconPalIndex(u16 species); const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo); const u16 *GetValidMonIconPalettePtr(u16 speciesId); @@ -20,7 +20,6 @@ void FreeAndDestroyMonIconSprite(struct Sprite *sprite); u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool32 handleDeoxys); u8 UpdateMonIconFrame(struct Sprite *sprite); void LoadMonIconPalette(u16 species); -void sub_80D328C(struct Sprite *sprite); void SpriteCB_MonIcon(struct Sprite *sprite); void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum); u8 GetMonIconPaletteIndexFromSpecies(u16 species); diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 3cd80cf0db..58d0b34200 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -19,10 +19,8 @@ struct MonIconSpriteTemplate u16 paletteTag; }; -// static functions static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *, s16, s16, u8); - -// .rodata +static void FreeAndDestroyMonIconSprite_(struct Sprite *sprite); const u8 *const gMonIconTable[] = { @@ -925,7 +923,7 @@ const struct SpritePalette gMonIconPaletteTable[] = { gMonIconPalettes[5], POKE_ICON_BASE_PAL_TAG + 5 }, }; -const struct OamData sMonIconOamData = +static const struct OamData sMonIconOamData = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -976,7 +974,7 @@ static const union AnimCmd sAnim_4[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const sMonIconAnims[] = +static const union AnimCmd *const sMonIconAnims[] = { sAnim_0, sAnim_1, @@ -997,34 +995,34 @@ static const union AffineAnimCmd sAffineAnim_1[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const sMonIconAffineAnims[] = +static const union AffineAnimCmd *const sMonIconAffineAnims[] = { sAffineAnim_0, sAffineAnim_1, }; -const u16 sSpriteImageSizes[3][4] = +static const u16 sSpriteImageSizes[3][4] = { [ST_OAM_SQUARE] = { - [SPRITE_SIZE(8x8)] = 0x20, - [SPRITE_SIZE(16x16)] = 0x80, - [SPRITE_SIZE(32x32)] = 0x200, - [SPRITE_SIZE(64x64)] = 0x800, + [SPRITE_SIZE(8x8)] = 8 * 8 / 2, + [SPRITE_SIZE(16x16)] = 16 * 16 / 2, + [SPRITE_SIZE(32x32)] = 32 * 32 / 2, + [SPRITE_SIZE(64x64)] = 64 * 64 / 2, }, [ST_OAM_H_RECTANGLE] = { - [SPRITE_SIZE(16x8)] = 0x40, - [SPRITE_SIZE(32x8)] = 0x80, - [SPRITE_SIZE(32x16)] = 0x100, - [SPRITE_SIZE(64x32)] = 0x400, + [SPRITE_SIZE(16x8)] = 16 * 8 / 2, + [SPRITE_SIZE(32x8)] = 32 * 8 / 2, + [SPRITE_SIZE(32x16)] = 32 * 16 / 2, + [SPRITE_SIZE(64x32)] = 64 * 32 / 2, }, [ST_OAM_V_RECTANGLE] = { - [SPRITE_SIZE(8x16)] = 0x40, - [SPRITE_SIZE(8x32)] = 0x80, - [SPRITE_SIZE(16x32)] = 0x100, - [SPRITE_SIZE(32x64)] = 0x400, + [SPRITE_SIZE(8x16)] = 8 * 16 / 2, + [SPRITE_SIZE(8x32)] = 8 * 32 / 2, + [SPRITE_SIZE(16x32)] = 16 * 32 / 2, + [SPRITE_SIZE(32x64)] = 32 * 64 / 2, }, }; @@ -1131,7 +1129,7 @@ const u8 *GetMonIconPtr(u16 species, u32 personality, bool32 handleDeoxys) void FreeAndDestroyMonIconSprite(struct Sprite *sprite) { - sub_80D328C(sprite); + FreeAndDestroyMonIconSprite_(sprite); } void LoadMonIconPalettes(void) @@ -1198,7 +1196,7 @@ const u8* GetMonIconTiles(u16 species, bool32 handleDeoxys) return iconSprite; } -void sub_80D304C(u16 offset) +void TryLoadAllMonIconPalettesAtOffset(u16 offset) { s32 i; const struct SpritePalette* monIconPalettePtr; @@ -1206,7 +1204,7 @@ void sub_80D304C(u16 offset) if (offset <= 0xA0) { monIconPalettePtr = gMonIconPaletteTable; - for(i = 5; i >= 0; i--) + for(i = ARRAY_COUNT(gMonIconPaletteTable) - 1; i >= 0; i--) { LoadPalette(monIconPalettePtr->data, offset, 0x20); offset += 0x10; @@ -1294,7 +1292,7 @@ static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *iconTemplate, s16 x, return spriteId; } -void sub_80D328C(struct Sprite *sprite) +static void FreeAndDestroyMonIconSprite_(struct Sprite *sprite) { struct SpriteFrameImage image = { NULL, sSpriteImageSizes[sprite->oam.shape][sprite->oam.size] }; sprite->images = ℑ diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 3911f52f03..e18a6db76b 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -8177,7 +8177,7 @@ static bool8 MultiMove_Start(void) { case 0: HideBg(0); - sub_80D304C(0x80); + TryLoadAllMonIconPalettesAtOffset(0x80); sMultiMove->state++; break; case 1: From db8ce5d7f9429e4054267617896f66daa2f56633 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 18 Oct 2021 00:08:36 -0400 Subject: [PATCH 077/417] Clean up mauville_old_man, drop ScrSpecial prefix --- .../MauvilleCity_PokemonCenter_1F/scripts.inc | 2 +- data/scripts/mauville_man.inc | 53 +- data/specials.inc | 44 +- include/constants/global.h | 1 + include/global.h | 2 +- include/mauville_old_man.h | 2 +- include/wild_encounter.h | 1 - src/mauville_old_man.c | 821 +++++++++--------- src/trader.c | 12 +- 9 files changed, 457 insertions(+), 481 deletions(-) diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc index 4347c47734..463d652b3b 100644 --- a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc @@ -12,7 +12,7 @@ MauvilleCity_PokemonCenter_1F_OnTransition: end MauvilleCity_PokemonCenter_1F_EventScript_SetMauvilleOldManGfx:: - special ScrSpecial_SetMauvilleOldManObjEventGfx + special SetMauvilleOldManObjEventGfx end MauvilleCity_PokemonCenter_1F_EventScript_Nurse:: diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index a9c008e5ec..b34f84e8e2 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -1,5 +1,5 @@ MauvilleCity_PokemonCenter_1F_EventScript_MauvilleOldMan:: - special ScrSpecial_GetCurrentMauvilleMan + special Script_GetCurrentMauvilleMan switch VAR_RESULT case MAUVILLE_MAN_BARD, MauvilleCity_PokemonCenter_1F_EventScript_Bard case MAUVILLE_MAN_HIPSTER, MauvilleCity_PokemonCenter_1F_EventScript_Hipster @@ -21,9 +21,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_Bard:: MauvilleCity_PokemonCenter_1F_EventScript_PlaySong:: setvar VAR_0x8004, 0 - special ScrSpecial_PlayBardSong + special PlayBardSong delay 60 - special ScrSpecial_HasBardSongBeenChanged + special HasBardSongBeenChanged compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_WishICouldPlaySongForOthers, MSGBOX_DEFAULT @@ -52,12 +52,12 @@ MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics:: goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_LetMeSingItForYou, MSGBOX_DEFAULT setvar VAR_0x8004, 1 - special ScrSpecial_PlayBardSong + special PlayBardSong delay 60 msgbox MauvilleCity_PokemonCenter_1F_Text_ThatHowYouWantedSongToGo, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics - special ScrSpecial_SaveBardSongLyrics + special SaveBardSongLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_IllSingThisSongForAWhile, MSGBOX_DEFAULT release end @@ -73,7 +73,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Hipster:: faceplayer setflag FLAG_SYS_HIPSTER_MEET msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT - special ScrSpecial_GetHipsterSpokenFlag + special GetHipsterSpokenFlag compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT @@ -81,7 +81,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Hipster:: end MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord:: - special ScrSpecial_HipsterTeachWord + special HipsterTryTeachWord compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach, MSGBOX_DEFAULT @@ -90,7 +90,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord:: MauvilleCity_PokemonCenter_1F_EventScript_TeachWord:: msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase, MSGBOX_DEFAULT - special ScrSpecial_SetHipsterSpokenFlag + special SetHipsterSpokenFlag release end @@ -160,7 +160,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Trader:: msgbox MauvilleCity_PokemonCenter_1F_Text_WantToTradeDecor, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade - special ScrSpecial_GetTraderTradedFlag + special GetTraderTradedFlag compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded message MauvilleCity_PokemonCenter_1F_Text_PickADecorItem @@ -179,7 +179,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded:: end MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive:: - special ScrSpecial_TraderMenuGetDecoration + special TraderMenuGetDecoration waitstate compare VAR_0x8004, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelPickDecor @@ -188,7 +188,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive:: msgbox MauvilleCity_PokemonCenter_1F_Text_OnceBelongedToPlayerDoYouWantIt, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor - special ScrSpecial_DoesPlayerHaveNoDecorations + special DoesPlayerHaveNoDecorations compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive @@ -218,19 +218,19 @@ MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor:: MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive:: msgbox MauvilleCity_PokemonCenter_1F_Text_PickTheDecorToTrade, MSGBOX_DEFAULT - special ScrSpecial_TraderMenuGiveDecoration + special TraderShowDecorationMenu waitstate compare VAR_0x8006, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelGiveDecor compare VAR_0x8006, 0xFFFF goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DecorInUse - special ScrSpecial_IsDecorationFull + special IsDecorationCategoryFull compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor msgbox MauvilleCity_PokemonCenter_1F_Text_SoWellTradeTheseDecor, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive - special ScrSpecial_TraderDoDecorationTrade + special TraderDoDecorationTrade msgbox MauvilleCity_PokemonCenter_1F_Text_SendDecorToYourPC, MSGBOX_DEFAULT release end @@ -818,20 +818,20 @@ MauvilleCity_PokemonCenter_1F_EventScript_Storyteller:: msgbox MauvilleCity_PokemonCenter_1F_Text_WillYouHearMyTale, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller - specialvar VAR_RESULT, ScrSpecial_StorytellerGetFreeStorySlot + specialvar VAR_RESULT, StorytellerGetFreeStorySlot compare VAR_RESULT, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales message MauvilleCity_PokemonCenter_1F_Text_WhichTaleToTell waitmessage - special ScrSpecial_StorytellerStoryListMenu + special StorytellerStoryListMenu waitstate compare VAR_RESULT, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection setvar VAR_0x8008, 1 - special ScrSpecial_StorytellerDisplayStory + special Script_StorytellerDisplayStory waitmessage waitbuttonpress - specialvar VAR_RESULT, ScrSpecial_StorytellerUpdateStat + specialvar VAR_RESULT, StorytellerUpdateStat compare VAR_RESULT, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales goto MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale @@ -842,7 +842,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection:: MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_CouldThereBeOtherLegends, MSGBOX_DEFAULT - specialvar VAR_RESULT, ScrSpecial_HasStorytellerAlreadyRecorded + specialvar VAR_RESULT, HasStorytellerAlreadyRecorded compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_StorytellerEnd goto MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales @@ -853,7 +853,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouAnyLegendaryTales, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller - specialvar VAR_RESULT, ScrSpecial_StorytellerInitializeRandomStat + specialvar VAR_RESULT, Script_StorytellerInitializeRandomStat compare VAR_RESULT, 1 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale msgbox MauvilleCity_PokemonCenter_1F_Text_NotWorthyOfLegend, MSGBOX_DEFAULT @@ -909,7 +909,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Giddy:: end MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale:: - special ScrSpecial_GiddyShouldTellAnotherTale + special GiddyShouldTellAnotherTale compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale compare VAR_RESULT, FALSE @@ -917,7 +917,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale:: end MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale:: - special ScrSpecial_GiddyShouldTellAnotherTale + special GiddyShouldTellAnotherTale compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale compare VAR_RESULT, FALSE @@ -929,15 +929,16 @@ MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale:: goto MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale end -@ Regardless of whether yes or no is selected below, Giddy will continue to tell stories until he's told 10 +@ Giddy will continue to tell stories regardless of whether yes or no is selected below. +@ Each story there is a 10% chance it will be his last. Otherwise he will stop at 10 stories. MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale:: - special ScrSpecial_GenerateGiddyLine + special GenerateGiddyLine special ShowFieldMessageStringVar4 waitmessage yesnobox 20, 8 - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale end diff --git a/data/specials.inc b/data/specials.inc index 81b25c14d4..0b053b7742 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -108,28 +108,28 @@ gSpecials:: def_special DoWateringBerryTreeAnim def_special ShowEasyChatScreen def_special ShowEasyChatProfile - def_special ScrSpecial_GetCurrentMauvilleMan - def_special ScrSpecial_HasBardSongBeenChanged - def_special ScrSpecial_SaveBardSongLyrics - def_special ScrSpecial_GetHipsterSpokenFlag - def_special ScrSpecial_SetHipsterSpokenFlag - def_special ScrSpecial_HipsterTeachWord - def_special ScrSpecial_PlayBardSong - def_special ScrSpecial_SetMauvilleOldManObjEventGfx - def_special ScrSpecial_GenerateGiddyLine - def_special ScrSpecial_GiddyShouldTellAnotherTale - def_special ScrSpecial_StorytellerGetFreeStorySlot - def_special ScrSpecial_StorytellerDisplayStory - def_special ScrSpecial_StorytellerStoryListMenu - def_special ScrSpecial_StorytellerUpdateStat - def_special ScrSpecial_StorytellerInitializeRandomStat - def_special ScrSpecial_HasStorytellerAlreadyRecorded - def_special ScrSpecial_TraderMenuGetDecoration - def_special ScrSpecial_GetTraderTradedFlag - def_special ScrSpecial_DoesPlayerHaveNoDecorations - def_special ScrSpecial_IsDecorationFull - def_special ScrSpecial_TraderMenuGiveDecoration - def_special ScrSpecial_TraderDoDecorationTrade + def_special Script_GetCurrentMauvilleMan + def_special HasBardSongBeenChanged + def_special SaveBardSongLyrics + def_special GetHipsterSpokenFlag + def_special SetHipsterSpokenFlag + def_special HipsterTryTeachWord + def_special PlayBardSong + def_special SetMauvilleOldManObjEventGfx + def_special GenerateGiddyLine + def_special GiddyShouldTellAnotherTale + def_special StorytellerGetFreeStorySlot + def_special Script_StorytellerDisplayStory + def_special StorytellerStoryListMenu + def_special StorytellerUpdateStat + def_special Script_StorytellerInitializeRandomStat + def_special HasStorytellerAlreadyRecorded + def_special TraderMenuGetDecoration + def_special GetTraderTradedFlag + def_special DoesPlayerHaveNoDecorations + def_special IsDecorationCategoryFull + def_special TraderShowDecorationMenu + def_special TraderDoDecorationTrade def_special GetSeedotSizeRecordInfo def_special CompareSeedotSize def_special GetLotadSizeRecordInfo diff --git a/include/constants/global.h b/include/constants/global.h index 1cece79753..6d3fa936d6 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -95,6 +95,7 @@ #define BARD_SONG_LENGTH 6 #define NUM_STORYTELLER_TALES 4 #define NUM_TRADER_ITEMS 4 +#define GIDDY_MAX_TALES 10 #define OPTIONS_BUTTON_MODE_NORMAL 0 #define OPTIONS_BUTTON_MODE_LR 1 diff --git a/include/global.h b/include/global.h index d14aa60f43..dcec2c4dbf 100644 --- a/include/global.h +++ b/include/global.h @@ -639,7 +639,7 @@ struct MauvilleManGiddy /*0x00*/ u8 id; /*0x01*/ u8 taleCounter; /*0x02*/ u8 questionNum; - /*0x04*/ u16 randomWords[10]; + /*0x04*/ u16 randomWords[GIDDY_MAX_TALES]; /*0x18*/ u8 questionList[8]; /*0x20*/ u8 language; }; /*size = 0x2C*/ diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h index 603d585dad..23a3cabfb4 100644 --- a/include/mauville_old_man.h +++ b/include/mauville_old_man.h @@ -5,7 +5,7 @@ extern struct BardSong gBardSong; void SetMauvilleOldMan(void); u8 GetCurrentMauvilleOldMan(void); -void ScrSpecial_SetMauvilleOldManObjEventGfx(void); +void SetMauvilleOldManObjEventGfx(void); u8 sub_81201C8(void); void SanitizeMauvilleOldManForRuby(OldMan *dest); void sub_8120670(void); diff --git a/include/wild_encounter.h b/include/wild_encounter.h index 55bbaa7dde..09525beff9 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -33,7 +33,6 @@ extern const struct WildPokemonHeader gWildMonHeaders[]; void DisableWildEncounters(bool8 disabled); bool8 StandardWildEncounter(u16 currMetaTileBehavior, u16 previousMetaTileBehavior); -void ScrSpecial_RockSmashWildEncounter(void); bool8 SweetScentWildEncounter(void); bool8 DoesCurrentMapHaveFishingMons(void); void FishingWildEncounter(u8 rod); diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index d3c41236ce..d202bc638f 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -21,12 +21,11 @@ #include "field_message_box.h" #include "script_menu.h" #include "trader.h" +#include "m4a.h" #include "constants/mauville_old_man.h" #define CHAR_SONG_WORD_SEPARATOR 0x37 -extern struct MusicPlayerInfo gMPlayInfo_SE2; - static void InitGiddyTaleList(void); static void StartBardSong(bool8 useTemporaryLyrics); static void Task_BardSong(u8 taskId); @@ -120,46 +119,41 @@ void SetMauvilleOldMan(void) // Determine man based on the last digit of the player's trainer ID. switch ((trainerId % 10) / 2) { - case MAUVILLE_MAN_BARD: - SetupBard(); - break; - case MAUVILLE_MAN_HIPSTER: - SetupHipster(); - break; - case MAUVILLE_MAN_TRADER: - SetupTrader(); - break; - case MAUVILLE_MAN_STORYTELLER: - SetupStoryteller(); - break; - case MAUVILLE_MAN_GIDDY: - SetupGiddy(); - break; + case MAUVILLE_MAN_BARD: + SetupBard(); + break; + case MAUVILLE_MAN_HIPSTER: + SetupHipster(); + break; + case MAUVILLE_MAN_TRADER: + SetupTrader(); + break; + case MAUVILLE_MAN_STORYTELLER: + SetupStoryteller(); + break; + case MAUVILLE_MAN_GIDDY: + SetupGiddy(); + break; } - ScrSpecial_SetMauvilleOldManObjEventGfx(); + SetMauvilleOldManObjEventGfx(); } u8 GetCurrentMauvilleOldMan(void) { - struct MauvilleManCommon *common = &gSaveBlock1Ptr->oldMan.common; - - return common->id; + return gSaveBlock1Ptr->oldMan.common.id; } -void ScrSpecial_GetCurrentMauvilleMan(void) +void Script_GetCurrentMauvilleMan(void) { gSpecialVar_Result = GetCurrentMauvilleOldMan(); } -void ScrSpecial_HasBardSongBeenChanged(void) +void HasBardSongBeenChanged(void) { - u16 *scriptResult = &gSpecialVar_Result; // why?? - struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - - *scriptResult = bard->hasChangedSong; + gSpecialVar_Result = (&gSaveBlock1Ptr->oldMan.bard)->hasChangedSong; } -void ScrSpecial_SaveBardSongLyrics(void) +void SaveBardSongLyrics(void) { u16 i; struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; @@ -225,28 +219,23 @@ static void PrepareSongText(void) } } -void ScrSpecial_PlayBardSong(void) +void PlayBardSong(void) { StartBardSong(gSpecialVar_0x8004); ScriptContext1_Stop(); } -void ScrSpecial_GetHipsterSpokenFlag(void) +void GetHipsterSpokenFlag(void) { - u16 *scriptResult = &gSpecialVar_Result; // again?? - struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster; - - *scriptResult = hipster->alreadySpoken; + gSpecialVar_Result = (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken; } -void ScrSpecial_SetHipsterSpokenFlag(void) +void SetHipsterSpokenFlag(void) { - struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster; - - hipster->alreadySpoken = TRUE; + (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken = TRUE; } -void ScrSpecial_HipsterTeachWord(void) +void HipsterTryTeachWord(void) { u16 phrase = GetNewHipsterPhraseToTeach(); @@ -261,11 +250,11 @@ void ScrSpecial_HipsterTeachWord(void) } } -void ScrSpecial_GiddyShouldTellAnotherTale(void) +void GiddyShouldTellAnotherTale(void) { struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy; - if (giddy->taleCounter == 10) + if (giddy->taleCounter == GIDDY_MAX_TALES) { gSpecialVar_Result = FALSE; giddy->taleCounter = 0; @@ -276,7 +265,7 @@ void ScrSpecial_GiddyShouldTellAnotherTale(void) } } -void ScrSpecial_GenerateGiddyLine(void) +void GenerateGiddyLine(void) { struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy; @@ -300,7 +289,7 @@ void ScrSpecial_GenerateGiddyLine(void) } if (!(Random() % 10)) - giddy->taleCounter = 10; + giddy->taleCounter = GIDDY_MAX_TALES; else giddy->taleCounter++; @@ -310,7 +299,7 @@ void ScrSpecial_GenerateGiddyLine(void) static void InitGiddyTaleList(void) { struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy; - u16 arr[][2] = { + u16 wordGroupsAndCount[][2] = { {EC_GROUP_POKEMON, 0}, {EC_GROUP_LIFESTYLE, 0}, {EC_GROUP_HOBBIES, 0}, @@ -323,27 +312,25 @@ static void InitGiddyTaleList(void) u16 r7; u16 r1; + // Shuffle question list for (i = 0; i < 8; i++) giddy->questionList[i] = i; - for (i = 0; i < 8; i++) { r1 = Random() % (i + 1); - r7 = giddy->questionList[i]; - giddy->questionList[i] = giddy->questionList[r1]; - giddy->questionList[r1] = r7; + SWAP(giddy->questionList[i], giddy->questionList[r1], r7); } r10 = 0; for (i = 0; i < 6; i++) { - arr[i][1] = EasyChat_GetNumWordsInGroup(arr[i][0]); - r10 += arr[i][1]; + wordGroupsAndCount[i][1] = EasyChat_GetNumWordsInGroup(wordGroupsAndCount[i][0]); + r10 += wordGroupsAndCount[i][1]; } giddy->questionNum = 0; r7 = 0; - for (i = 0; i < 10; i++) + for (i = 0; i < GIDDY_MAX_TALES; i++) { r1 = Random() % 10; if (r1 < 3 && r7 < 8) @@ -355,26 +342,22 @@ static void InitGiddyTaleList(void) { s16 r2 = Random() % r10; for (r1 = 0; i < 6; r1++) - if ((r2 -= arr[r1][1]) <= 0) + if ((r2 -= wordGroupsAndCount[r1][1]) <= 0) break; if (r1 == 6) r1 = 0; - giddy->randomWords[i] = GetRandomEasyChatWordFromUnlockedGroup(arr[r1][0]); + giddy->randomWords[i] = GetRandomEasyChatWordFromUnlockedGroup(wordGroupsAndCount[r1][0]); } } } static void ResetBardFlag(void) { - struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - - bard->hasChangedSong = FALSE; + (&gSaveBlock1Ptr->oldMan.bard)->hasChangedSong = FALSE; } static void ResetHipsterFlag(void) { - struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster; - - hipster->alreadySpoken = FALSE; + (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken = FALSE; } static void ResetTraderFlag(void) @@ -391,22 +374,22 @@ void ResetMauvilleOldManFlag(void) { switch (GetCurrentMauvilleOldMan()) { - case MAUVILLE_MAN_BARD: - ResetBardFlag(); - break; - case MAUVILLE_MAN_HIPSTER: - ResetHipsterFlag(); - break; - case MAUVILLE_MAN_STORYTELLER: - ResetStorytellerFlag(); - break; - case MAUVILLE_MAN_TRADER: - ResetTraderFlag(); - break; - case MAUVILLE_MAN_GIDDY: - break; + case MAUVILLE_MAN_BARD: + ResetBardFlag(); + break; + case MAUVILLE_MAN_HIPSTER: + ResetHipsterFlag(); + break; + case MAUVILLE_MAN_STORYTELLER: + ResetStorytellerFlag(); + break; + case MAUVILLE_MAN_TRADER: + ResetTraderFlag(); + break; + case MAUVILLE_MAN_GIDDY: + break; } - ScrSpecial_SetMauvilleOldManObjEventGfx(); + SetMauvilleOldManObjEventGfx(); } @@ -430,15 +413,15 @@ static void EnableTextPrinters(void) gDisableTextPrinters = FALSE; } -static void BardSong_DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1) +static void DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1) { gDisableTextPrinters = TRUE; } -static void sub_8120708(const u8 * src) +static void sub_8120708(const u8 * str) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, src, 0, 1, 1, BardSong_DisableTextPrinters); + AddTextPrinterParameterized(0, 1, str, 0, 1, 1, DisableTextPrinters); gDisableTextPrinters = TRUE; CopyWindowToVram(0, 3); } @@ -447,233 +430,233 @@ static void BardSing(struct Task *task, struct BardSong *song) { switch (task->tState) { - case 0: // Initialize song - { - struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - u16 *lyrics; - s32 i; + case 0: // Initialize song + { + struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; + u16 *lyrics; + s32 i; - // Copy lyrics - if (gSpecialVar_0x8004 == 0) - lyrics = bard->songLyrics; - else - lyrics = bard->temporaryLyrics; - for (i = 0; i < BARD_SONG_LENGTH; i++) - song->lyrics[i] = lyrics[i]; - song->currWord = 0; - } - break; - case 1: // Wait for BGM to end - break; - case 2: // Initialize word + // Copy lyrics + if (gSpecialVar_0x8004 == 0) + lyrics = bard->songLyrics; + else + lyrics = bard->temporaryLyrics; + for (i = 0; i < BARD_SONG_LENGTH; i++) + song->lyrics[i] = lyrics[i]; + song->currWord = 0; + } + break; + case 1: // Wait for BGM to end + break; + case 2: // Initialize word + { + u16 word = song->lyrics[song->currWord]; + song->sound = GetWordSounds(word); + GetWordPhonemes(song, MACRO1(word)); + song->currWord++; + if (song->sound->var00 != 0xFF) + song->state = 0; + else { - u16 word = song->lyrics[song->currWord]; - song->sound = GetWordSounds(word); - GetWordPhonemes(song, MACRO1(word)); - song->currWord++; - if (song->sound->var00 != 0xFF) - song->state = 0; - else + song->state = 3; + song->phonemeTimer = 2; + } + break; + } + case 3: + case 4: + { + const struct BardSound *sound = &song->sound[song->currPhoneme]; + + switch (song->state) + { + case 0: + song->phonemeTimer = song->phonemes[song->currPhoneme].length; + if (sound->var00 <= 50) { - song->state = 3; - song->phonemeTimer = 2; + u8 num = sound->var00 / 3; + m4aSongNumStart(PH_TRAP_HELD + 3 * num); + } + song->state = 2; + song->phonemeTimer--; + break; + case 2: + song->state = 1; + if (sound->var00 <= 50) + { + song->volume = 0x100 + sound->volume * 16; + m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); + song->pitch = 0x200 + song->phonemes[song->currPhoneme].pitch; + m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); + } + break; + case 1: + if (song->voiceInflection > 10) + song->volume -= 2; + if (song->voiceInflection & 1) + song->pitch += 64; + else + song->pitch -= 64; + m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); + m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); + song->voiceInflection++; + song->phonemeTimer--; + if (song->phonemeTimer == 0) + { + song->currPhoneme++; + if (song->currPhoneme != 6 && song->sound[song->currPhoneme].var00 != 0xFF) + song->state = 0; + else + { + song->state = 3; + song->phonemeTimer = 2; + } } break; - } case 3: - case 4: - { - const struct BardSound *sound = &song->sound[song->currPhoneme]; - - switch (song->state) + song->phonemeTimer--; + if (song->phonemeTimer == 0) { - case 0: - song->phonemeTimer = song->phonemes[song->currPhoneme].length; - if (sound->var00 <= 50) - { - u8 num = sound->var00 / 3; - m4aSongNumStart(PH_TRAP_HELD + 3 * num); - } - song->state = 2; - song->phonemeTimer--; - break; - case 2: - song->state = 1; - if (sound->var00 <= 50) - { - song->volume = 0x100 + sound->volume * 16; - m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); - song->pitch = 0x200 + song->phonemes[song->currPhoneme].pitch; - m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); - } - break; - case 1: - if (song->voiceInflection > 10) - song->volume -= 2; - if (song->voiceInflection & 1) - song->pitch += 64; - else - song->pitch -= 64; - m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); - m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); - song->voiceInflection++; - song->phonemeTimer--; - if (song->phonemeTimer == 0) - { - song->currPhoneme++; - if (song->currPhoneme != 6 && song->sound[song->currPhoneme].var00 != 0xFF) - song->state = 0; - else - { - song->state = 3; - song->phonemeTimer = 2; - } - } - break; - case 3: - song->phonemeTimer--; - if (song->phonemeTimer == 0) - { - m4aMPlayStop(&gMPlayInfo_SE2); - song->state = 4; - } - break; + m4aMPlayStop(&gMPlayInfo_SE2); + song->state = 4; } + break; } - break; - case 5: - break; + } + break; + case 5: + break; } } static void Task_BardSong(u8 taskId) { - struct Task *task = &gTasks[taskId]; // r5 + struct Task *task = &gTasks[taskId]; BardSing(task, &gBardSong); switch (task->tState) { - case 0: // Initialize song - PrepareSongText(); - sub_8120708(gStringVar4); - task->data[1] = 0; - task->data[2] = 0; - task->tCharIndex = 0; - task->tCurrWord = 0; - FadeOutBGMTemporarily(4); - task->tState = 1; - break; - case 1: // Wait for BGM to end - if (IsBGMPausedOrStopped()) - task->tState = 2; - break; - case 2: // Initialize word + case 0: // Initialize song + PrepareSongText(); + sub_8120708(gStringVar4); + task->data[1] = 0; + task->data[2] = 0; + task->tCharIndex = 0; + task->tCurrWord = 0; + FadeOutBGMTemporarily(4); + task->tState = 1; + break; + case 1: // Wait for BGM to end + if (IsBGMPausedOrStopped()) + task->tState = 2; + break; + case 2: // Initialize word + { + struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; + u8 *str = gStringVar4 + task->tCharIndex; + u16 wordLen = 0; + + while (*str != CHAR_SPACE + && *str != CHAR_NEWLINE + && *str != EXT_CTRL_CODE_BEGIN + && *str != EOS) { - struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - u8 *str = gStringVar4 + task->tCharIndex; - u16 wordLen = 0; + str++; + wordLen++; + } + if (!task->tUseTemporaryLyrics) + sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]); + else + sUnknownBardRelated = MACRO2(bard->temporaryLyrics[task->tCurrWord]); - while (*str != CHAR_SPACE - && *str != CHAR_NEWLINE - && *str != EXT_CTRL_CODE_BEGIN - && *str != EOS) + gBardSong.length /= wordLen; + if (gBardSong.length <= 0) + gBardSong.length = 1; + task->tCurrWord++; + + if (task->data[2] == 0) + { + task->tState = 3; + task->data[1] = 0; + } + else + { + task->tState = 5; + task->data[1] = 0; + } + } + break; + case 5: + if (task->data[2] == 0) + task->tState = 3; + else + task->data[2]--; + break; + case 3: + if (gStringVar4[task->tCharIndex] == EOS) + { + FadeInBGM(6); + m4aMPlayFadeOutTemporarily(&gMPlayInfo_SE2, 2); + EnableBothScriptContexts(); + DestroyTask(taskId); + } + else if (gStringVar4[task->tCharIndex] == CHAR_SPACE) + { + + EnableTextPrinters(); + task->tCharIndex++; + task->tState = 2; + task->data[2] = 0; + } + else if (gStringVar4[task->tCharIndex] == CHAR_NEWLINE) + { + task->tCharIndex++; + task->tState = 2; + task->data[2] = 0; + } + else if (gStringVar4[task->tCharIndex] == EXT_CTRL_CODE_BEGIN) + { + task->tCharIndex += 2; // skip over control codes + task->tState = 2; + task->data[2] = 8; + } + else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR) + { + gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space + EnableTextPrinters(); + task->tCharIndex++; + task->data[2] = 0; + } + else + { + switch (task->data[1]) { - str++; - wordLen++; - } - if (!task->tUseTemporaryLyrics) - sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]); - else - sUnknownBardRelated = MACRO2(bard->temporaryLyrics[task->tCurrWord]); - - gBardSong.length /= wordLen; - if (gBardSong.length <= 0) - gBardSong.length = 1; - task->tCurrWord++; - - if (task->data[2] == 0) - { - task->tState = 3; - task->data[1] = 0; - } - else - { - task->tState = 5; + case 0: + EnableTextPrinters(); + task->data[1]++; + break; + case 1: + task->data[1]++; + break; + case 2: + task->tCharIndex++; task->data[1] = 0; + task->data[2] = gBardSong.length; + task->tState = 4; + break; } } - break; - case 5: - if (task->data[2] == 0) - task->tState = 3; - else - task->data[2]--; - break; - case 3: - if (gStringVar4[task->tCharIndex] == EOS) - { - FadeInBGM(6); - m4aMPlayFadeOutTemporarily(&gMPlayInfo_SE2, 2); - EnableBothScriptContexts(); - DestroyTask(taskId); - } - else if (gStringVar4[task->tCharIndex] == CHAR_SPACE) - { - - EnableTextPrinters(); - task->tCharIndex++; - task->tState = 2; - task->data[2] = 0; - } - else if (gStringVar4[task->tCharIndex] == CHAR_NEWLINE) - { - task->tCharIndex++; - task->tState = 2; - task->data[2] = 0; - } - else if (gStringVar4[task->tCharIndex] == EXT_CTRL_CODE_BEGIN) - { - task->tCharIndex += 2; // skip over control codes - task->tState = 2; - task->data[2] = 8; - } - else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR) - { - gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space - EnableTextPrinters(); - task->tCharIndex++; - task->data[2] = 0; - } - else - { - switch (task->data[1]) - { - case 0: - EnableTextPrinters(); - task->data[1]++; - break; - case 1: - task->data[1]++; - break; - case 2: - task->tCharIndex++; - task->data[1] = 0; - task->data[2] = gBardSong.length; - task->tState = 4; - break; - } - } - break; - case 4: - task->data[2]--; - if (task->data[2] == 0) - task->tState = 3; - break; + break; + case 4: + task->data[2]--; + if (task->data[2] == 0) + task->tState = 3; + break; } RunTextPrintersAndIsPrinter0Active(); } -void ScrSpecial_SetMauvilleOldManObjEventGfx(void) +void SetMauvilleOldManObjEventGfx(void) { VarSet(VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_BARD); } @@ -720,76 +703,69 @@ void SanitizeMauvilleOldManForRuby(union OldMan * oldMan) } } -void sub_8120C0C(union OldMan * oldMan, u32 r8, u32 r7, u32 r3) +// Unused +static void SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language1, u32 language2, u32 language3) { s32 i; switch (oldMan->common.id) { - case MAUVILLE_MAN_TRADER: - { - struct MauvilleOldManTrader * trader = &oldMan->trader; + case MAUVILLE_MAN_TRADER: + { + struct MauvilleOldManTrader * trader = &oldMan->trader; - for (i = 0; i < NUM_TRADER_ITEMS; i++) - { - if (IsStringJapanese(trader->playerNames[i])) - { - trader->language[i] = r8; - } - else - { - trader->language[i] = r7; - } - } - } - break; - case MAUVILLE_MAN_STORYTELLER: + for (i = 0; i < NUM_TRADER_ITEMS; i++) { - struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - - for (i = 0; i < NUM_STORYTELLER_TALES; i++) - { - if (IsStringJapanese(storyteller->trainerNames[i])) - { - storyteller->language[i] = r8; - } - else - { - storyteller->language[i] = r7; - } - } - } - break; - case MAUVILLE_MAN_BARD: - { - struct MauvilleManBard * bard = &oldMan->bard; - - if (r3 == LANGUAGE_JAPANESE) - bard->language = r8; + if (IsStringJapanese(trader->playerNames[i])) + trader->language[i] = language1; else - bard->language = r7; + trader->language[i] = language2; } - break; - case MAUVILLE_MAN_HIPSTER: - { - struct MauvilleManHipster * hipster = &oldMan->hipster; + } + break; + case MAUVILLE_MAN_STORYTELLER: + { + struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - if (r3 == LANGUAGE_JAPANESE) - hipster->language = r8; - else - hipster->language = r7; - } - break; - case MAUVILLE_MAN_GIDDY: + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { - struct MauvilleManGiddy * giddy = &oldMan->giddy; - - if (r3 == LANGUAGE_JAPANESE) - giddy->language = r8; + if (IsStringJapanese(storyteller->trainerNames[i])) + storyteller->language[i] = language1; else - giddy->language = r7; + storyteller->language[i] = language2; } - break; + } + break; + case MAUVILLE_MAN_BARD: + { + struct MauvilleManBard * bard = &oldMan->bard; + + if (language3 == LANGUAGE_JAPANESE) + bard->language = language1; + else + bard->language = language2; + } + break; + case MAUVILLE_MAN_HIPSTER: + { + struct MauvilleManHipster * hipster = &oldMan->hipster; + + if (language3 == LANGUAGE_JAPANESE) + hipster->language = language1; + else + hipster->language = language2; + } + break; + case MAUVILLE_MAN_GIDDY: + { + struct MauvilleManGiddy * giddy = &oldMan->giddy; + + if (language3 == LANGUAGE_JAPANESE) + giddy->language = language1; + else + giddy->language = language2; + } + break; } } @@ -822,83 +798,83 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language switch (oldMan->common.id) { - case MAUVILLE_MAN_TRADER: - { - struct MauvilleOldManTrader * trader = &oldMan->trader; - s32 i; + case MAUVILLE_MAN_TRADER: + { + struct MauvilleOldManTrader * trader = &oldMan->trader; + s32 i; - if (isRuby) + if (isRuby) + { + for (i = 0; i < NUM_TRADER_ITEMS; i++) { - for (i = 0; i < NUM_TRADER_ITEMS; i++) + u8 * str = trader->playerNames[i]; + if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN) { - u8 * str = trader->playerNames[i]; - if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN) - { - StripExtCtrlCodes(str); - trader->language[i] = LANGUAGE_JAPANESE; - } - else - trader->language[i] = language; + StripExtCtrlCodes(str); + trader->language[i] = LANGUAGE_JAPANESE; } + else + trader->language[i] = language; } - else + } + else + { + for (i = 0; i < NUM_TRADER_ITEMS; i++) { - for (i = 0; i < NUM_TRADER_ITEMS; i++) + if (trader->language[i] == LANGUAGE_JAPANESE) { - if (trader->language[i] == LANGUAGE_JAPANESE) - { - StripExtCtrlCodes(trader->playerNames[i]); - } + StripExtCtrlCodes(trader->playerNames[i]); } } } - break; - case MAUVILLE_MAN_STORYTELLER: + } + break; + case MAUVILLE_MAN_STORYTELLER: + { + + struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; + s32 i; + + if (isRuby) { - - struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - s32 i; - - if (isRuby) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { - for (i = 0; i < NUM_STORYTELLER_TALES; i++) - { - if (storyteller->gameStatIDs[i] != 0) - storyteller->language[i] = language; - } + if (storyteller->gameStatIDs[i] != 0) + storyteller->language[i] = language; } } - break; - case MAUVILLE_MAN_BARD: - { - struct MauvilleManBard * bard = &oldMan->bard; + } + break; + case MAUVILLE_MAN_BARD: + { + struct MauvilleManBard * bard = &oldMan->bard; - if (isRuby) - { - bard->language = language; - } - } - break; - case MAUVILLE_MAN_HIPSTER: + if (isRuby) { - struct MauvilleManHipster * hipster = &oldMan->hipster; - - if (isRuby) - { - hipster->language = language; - } + bard->language = language; } - break; - case MAUVILLE_MAN_GIDDY: + } + break; + case MAUVILLE_MAN_HIPSTER: + { + struct MauvilleManHipster * hipster = &oldMan->hipster; + + if (isRuby) { - struct MauvilleManGiddy * giddy = &oldMan->giddy; - - if (isRuby) - { - giddy->language = language; - } + hipster->language = language; } - break; + } + break; + case MAUVILLE_MAN_GIDDY: + { + struct MauvilleManGiddy * giddy = &oldMan->giddy; + + if (isRuby) + { + giddy->language = language; + } + } + break; } } @@ -1260,9 +1236,8 @@ static void ScrambleStatList(u8 * arr, s32 count) { u32 a = Random() % count; u32 b = Random() % count; - u8 temp = arr[a]; - arr[a] = arr[b]; - arr[b] = temp; + u8 temp; + SWAP(arr[a], arr[b], temp); } } @@ -1354,63 +1329,63 @@ static void Task_StoryListMenu(u8 taskId) switch (task->data[0]) { - case 0: - PrintStoryList(); - task->data[0]++; - break; - case 1: - selection = Menu_ProcessInput(); - if (selection == MENU_NOTHING_CHOSEN) - break; - if (selection == MENU_B_PRESSED || selection == GetFreeStorySlot()) - { - gSpecialVar_Result = 0; - } - else - { - gSpecialVar_Result = 1; - sSelectedStory = selection; - } - ClearToTransparentAndRemoveWindow(sStorytellerWindowId); - DestroyTask(taskId); - EnableBothScriptContexts(); + case 0: + PrintStoryList(); + task->data[0]++; + break; + case 1: + selection = Menu_ProcessInput(); + if (selection == MENU_NOTHING_CHOSEN) break; + if (selection == MENU_B_PRESSED || selection == GetFreeStorySlot()) + { + gSpecialVar_Result = 0; + } + else + { + gSpecialVar_Result = 1; + sSelectedStory = selection; + } + ClearToTransparentAndRemoveWindow(sStorytellerWindowId); + DestroyTask(taskId); + EnableBothScriptContexts(); + break; } } // Sets gSpecialVar_Result to TRUE if player selected a story -void ScrSpecial_StorytellerStoryListMenu(void) +void StorytellerStoryListMenu(void) { CreateTask(Task_StoryListMenu, 80); } -void ScrSpecial_StorytellerDisplayStory(void) +void Script_StorytellerDisplayStory(void) { StorytellerDisplayStory(sSelectedStory); } -u8 ScrSpecial_StorytellerGetFreeStorySlot(void) +u8 StorytellerGetFreeStorySlot(void) { sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller; return GetFreeStorySlot(); } // Returns TRUE if stat has increased -bool8 ScrSpecial_StorytellerUpdateStat(void) +bool8 StorytellerUpdateStat(void) { - u8 r4; + u8 stat; sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller; - r4 = sStorytellerPtr->gameStatIDs[sSelectedStory]; + stat = sStorytellerPtr->gameStatIDs[sSelectedStory]; if (HasTrainerStatIncreased(sSelectedStory) == TRUE) { - StorytellerRecordNewStat(sSelectedStory, r4); + StorytellerRecordNewStat(sSelectedStory, stat); return TRUE; } return FALSE; } -bool8 ScrSpecial_HasStorytellerAlreadyRecorded(void) +bool8 HasStorytellerAlreadyRecorded(void) { sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller; @@ -1420,7 +1395,7 @@ bool8 ScrSpecial_HasStorytellerAlreadyRecorded(void) return TRUE; } -bool8 ScrSpecial_StorytellerInitializeRandomStat(void) +bool8 Script_StorytellerInitializeRandomStat(void) { sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller; return StorytellerInitializeRandomStat(); diff --git a/src/trader.c b/src/trader.c index f6d021dfe0..98b4f464ca 100644 --- a/src/trader.c +++ b/src/trader.c @@ -130,13 +130,13 @@ void Task_HandleGetDecorationMenuInput(u8 taskId) } } -void ScrSpecial_GetTraderTradedFlag(void) +void GetTraderTradedFlag(void) { struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader; gSpecialVar_Result = trader->alreadyTraded; } -void ScrSpecial_DoesPlayerHaveNoDecorations(void) +void DoesPlayerHaveNoDecorations(void) { u8 i; @@ -151,7 +151,7 @@ void ScrSpecial_DoesPlayerHaveNoDecorations(void) gSpecialVar_Result = TRUE; } -void ScrSpecial_IsDecorationFull(void) +void IsDecorationCategoryFull(void) { gSpecialVar_Result = FALSE; if (gDecorations[gSpecialVar_0x8004].category != gDecorations[gSpecialVar_0x8006].category @@ -162,7 +162,7 @@ void ScrSpecial_IsDecorationFull(void) } } -void ScrSpecial_TraderMenuGiveDecoration(void) +void TraderShowDecorationMenu(void) { CreateTask(ShowDecorationCategoriesWindow, 0); } @@ -190,7 +190,7 @@ void ExitTraderMenu(u8 taskId) EnableBothScriptContexts(); } -void ScrSpecial_TraderDoDecorationTrade(void) +void TraderDoDecorationTrade(void) { struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader; @@ -202,7 +202,7 @@ void ScrSpecial_TraderDoDecorationTrade(void) trader->alreadyTraded = TRUE; } -void ScrSpecial_TraderMenuGetDecoration(void) +void TraderMenuGetDecoration(void) { u8 taskId = CreateTask(Task_HandleGetDecorationMenuInput, 0); CreateAvailableDecorationsMenu(taskId); From 46dd10c87ba7abf8c10e5ab604a7c21e9beaebc3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 18 Oct 2021 01:39:07 -0400 Subject: [PATCH 078/417] Clean up trainer_pokemon_sprites --- include/trainer_pokemon_sprites.h | 8 ++- src/hall_of_fame.c | 2 +- src/main_menu.c | 4 +- src/starter_choose.c | 2 +- src/trainer_pokemon_sprites.c | 96 +++++++++++-------------------- 5 files changed, 45 insertions(+), 67 deletions(-) diff --git a/include/trainer_pokemon_sprites.h b/include/trainer_pokemon_sprites.h index d4390608e7..520268c47c 100644 --- a/include/trainer_pokemon_sprites.h +++ b/include/trainer_pokemon_sprites.h @@ -1,8 +1,14 @@ #ifndef GUARD_TRAINER_POKEMON_SPRITES_H #define GUARD_TRAINER_POKEMON_SPRITES_H +// For the flags argument of CreateMonPicSprite_Affine +#define MON_PIC_AFFINE_BACK 0 +#define MON_PIC_AFFINE_FRONT 1 +#define MON_PIC_AFFINE_NONE 3 +#define F_MON_PIC_NO_AFFINE (1 << 7) + bool16 ResetAllPicSprites(void); -u16 CreatePicSprite2(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); +u16 CreateMonPicSprite_Affine(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); u16 CreateMonPicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); u16 FreeAndDestroyMonPicSprite(u16 spriteId); u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 3485f3ba34..571c550012 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -588,7 +588,7 @@ static void Task_Hof_DisplayMon(u8 taskId) if (currMon->species == SPECIES_EGG) destY += 10; - spriteId = CreatePicSprite2(currMon->species, currMon->tid, currMon->personality, 1, startX, startY, currMonId, TAG_NONE); + spriteId = CreateMonPicSprite_Affine(currMon->species, currMon->tid, currMon->personality, MON_PIC_AFFINE_FRONT, startX, startY, currMonId, TAG_NONE); gSprites[spriteId].tDestinationX = destX; gSprites[spriteId].tDestinationY = destY; gSprites[spriteId].data[0] = 0; diff --git a/src/main_menu.c b/src/main_menu.c index f6dff3d445..6553278e8e 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -1871,9 +1871,9 @@ static void SpriteCB_MovePlayerDownWhileShrinking(struct Sprite *sprite) sprite->data[0] = y; } -static u8 NewGameBirchSpeech_CreateLotadSprite(u8 a, u8 b) +static u8 NewGameBirchSpeech_CreateLotadSprite(u8 x, u8 y) { - return CreatePicSprite2(SPECIES_LOTAD, SHINY_ODDS, 0, 1, a, b, 14, -1); + return CreateMonPicSprite_Affine(SPECIES_LOTAD, SHINY_ODDS, 0, MON_PIC_AFFINE_FRONT, x, y, 14, TAG_NONE); } static void AddBirchSpeechObjects(u8 taskId) diff --git a/src/starter_choose.c b/src/starter_choose.c index 37c3346809..d148461308 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -635,7 +635,7 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y) { u8 spriteId; - spriteId = CreatePicSprite2(species, SHINY_ODDS, 0, 1, x, y, 0xE, TAG_NONE); + spriteId = CreateMonPicSprite_Affine(species, SHINY_ODDS, 0, MON_PIC_AFFINE_FRONT, x, y, 14, TAG_NONE); gSprites[spriteId].oam.priority = 0; return spriteId; } diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index 9e30f636eb..a7289677e6 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -9,8 +9,6 @@ #include "pokemon.h" #include "constants/trainers.h" -// Static type declarations - struct PicData { u8 *frames; @@ -20,33 +18,26 @@ struct PicData u8 active; }; -// Static RAM declarations #define PICS_COUNT 8 static EWRAM_DATA struct SpriteTemplate sCreatingSpriteTemplate = {}; static EWRAM_DATA struct PicData sSpritePics[PICS_COUNT] = {}; -// Static ROM declarations - -// .rodata - static const struct PicData sDummyPicData = {}; -static const struct OamData gUnknown_0860B064 = +static const struct OamData sOamData_Normal = { .shape = SPRITE_SHAPE(64x64), .size = SPRITE_SIZE(64x64) }; -static const struct OamData gUnknown_0860B06C = +static const struct OamData sOamData_Affine = { .affineMode = ST_OAM_AFFINE_NORMAL, .shape = SPRITE_SHAPE(64x64), .size = SPRITE_SIZE(64x64) }; -// .text - static void DummyPicSpriteCallback(struct Sprite *sprite) { @@ -153,19 +144,15 @@ static u16 CreatePicSprite(u16 species, u32 otId, u32 personality, bool8 isFront for (i = 0; i < PICS_COUNT; i ++) { if (!sSpritePics[i].active) - { break; - } } if (i == PICS_COUNT) - { return 0xFFFF; - } + framePics = Alloc(4 * 0x800); if (!framePics) - { return 0xFFFF; - } + images = Alloc(4 * sizeof(struct SpriteFrameImage)); if (!images) { @@ -183,7 +170,7 @@ static u16 CreatePicSprite(u16 species, u32 otId, u32 personality, bool8 isFront images[j].size = 0x800; } sCreatingSpriteTemplate.tileTag = TAG_NONE; - sCreatingSpriteTemplate.oam = &gUnknown_0860B064; + sCreatingSpriteTemplate.oam = &sOamData_Normal; AssignSpriteAnimsTable(isTrainer); sCreatingSpriteTemplate.images = images; sCreatingSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable; @@ -191,9 +178,7 @@ static u16 CreatePicSprite(u16 species, u32 otId, u32 personality, bool8 isFront LoadPicPaletteByTagOrSlot(species, otId, personality, paletteSlot, paletteTag, isTrainer); spriteId = CreateSprite(&sCreatingSpriteTemplate, x, y, 0); if (paletteTag == TAG_NONE) - { gSprites[spriteId].oam.paletteNum = paletteSlot; - } sSpritePics[i].frames = framePics; sSpritePics[i].images = images; sSpritePics[i].paletteTag = paletteTag; @@ -207,39 +192,35 @@ static u16 CreatePicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, return CreatePicSprite(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, isTrainer, FALSE); } -u16 CreatePicSprite2(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag) +u16 CreateMonPicSprite_Affine(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag) { u8 *framePics; struct SpriteFrameImage *images; int j; u8 i; u8 spriteId; - u8 flags2; + u8 type; - for (i = 0; i < PICS_COUNT; i ++) + for (i = 0; i < PICS_COUNT; i++) { if (!sSpritePics[i].active) - { break; - } } if (i == PICS_COUNT) - { return 0xFFFF; - } - framePics = Alloc(4 * 0x800); + + framePics = Alloc(4 * MON_PIC_SIZE); if (!framePics) - { return 0xFFFF; - } - if (flags & 0x80) + + if (flags & F_MON_PIC_NO_AFFINE) { - flags &= 0x7F; - flags2 = 3; + flags &= ~F_MON_PIC_NO_AFFINE; + type = MON_PIC_AFFINE_NONE; } else { - flags2 = flags; + type = flags; } images = Alloc(4 * sizeof(struct SpriteFrameImage)); if (!images) @@ -254,34 +235,32 @@ u16 CreatePicSprite2(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s1 } for (j = 0; j < 4; j ++) { - images[j].data = framePics + 0x800 * j; - images[j].size = 0x800; + images[j].data = framePics + MON_PIC_SIZE * j; + images[j].size = MON_PIC_SIZE; } sCreatingSpriteTemplate.tileTag = TAG_NONE; sCreatingSpriteTemplate.anims = gMonFrontAnimsPtrTable[species]; sCreatingSpriteTemplate.images = images; - if (flags2 == 0x01) + if (type == MON_PIC_AFFINE_FRONT) { sCreatingSpriteTemplate.affineAnims = gAffineAnims_BattleSpriteOpponentSide; - sCreatingSpriteTemplate.oam = &gUnknown_0860B06C; + sCreatingSpriteTemplate.oam = &sOamData_Affine; } - else if (flags2 == 0x00) + else if (type == MON_PIC_AFFINE_BACK) { sCreatingSpriteTemplate.affineAnims = gAffineAnims_BattleSpritePlayerSide; - sCreatingSpriteTemplate.oam = &gUnknown_0860B06C; + sCreatingSpriteTemplate.oam = &sOamData_Affine; } - else + else // MON_PIC_AFFINE_NONE { - sCreatingSpriteTemplate.oam = &gUnknown_0860B064; + sCreatingSpriteTemplate.oam = &sOamData_Normal; sCreatingSpriteTemplate.affineAnims = gDummySpriteAffineAnimTable; } sCreatingSpriteTemplate.callback = DummyPicSpriteCallback; LoadPicPaletteByTagOrSlot(species, otId, personality, paletteSlot, paletteTag, FALSE); spriteId = CreateSprite(&sCreatingSpriteTemplate, x, y, 0); if (paletteTag == TAG_NONE) - { gSprites[spriteId].oam.paletteNum = paletteSlot; - } sSpritePics[i].frames = framePics; sSpritePics[i].images = images; sSpritePics[i].paletteTag = paletteTag; @@ -299,20 +278,15 @@ static u16 FreeAndDestroyPicSpriteInternal(u16 spriteId) for (i = 0; i < PICS_COUNT; i ++) { if (sSpritePics[i].spriteId == spriteId) - { break; - } } if (i == PICS_COUNT) - { return 0xFFFF; - } + framePics = sSpritePics[i].frames; images = sSpritePics[i].images; if (sSpritePics[i].paletteTag != TAG_NONE) - { FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[spriteId].oam.paletteNum)); - } DestroySprite(&gSprites[spriteId]); Free(framePics); Free(images); @@ -320,12 +294,11 @@ static u16 FreeAndDestroyPicSpriteInternal(u16 spriteId) return 0; } -static u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer) +static u16 LoadPicSpriteInWindow(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer) { if (DecompressPic_HandleDeoxys(species, personality, isFrontPic, (u8 *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE)) - { return 0xFFFF; - } + LoadPicPaletteBySlot(species, otId, personality, paletteSlot, isTrainer); return 0; } @@ -360,9 +333,10 @@ u16 FreeAndDestroyMonPicSprite(u16 spriteId) return FreeAndDestroyPicSpriteInternal(spriteId); } -u16 sub_818D834(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId) +// Unused +static u16 LoadMonPicInWindow(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId) { - return sub_818D65C(species, otId, personality, isFrontPic, paletteSlot, windowId, FALSE); + return LoadPicSpriteInWindow(species, otId, personality, isFrontPic, paletteSlot, windowId, FALSE); } // Unused, FRLG only @@ -381,9 +355,10 @@ u16 FreeAndDestroyTrainerPicSprite(u16 spriteId) return FreeAndDestroyPicSpriteInternal(spriteId); } -u16 sub_818D904(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId) +// Unused +static u16 LoadTrainerPicInWindow(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId) { - return sub_818D65C(species, 0, 0, isFrontPic, paletteSlot, windowId, TRUE); + return LoadPicSpriteInWindow(species, 0, 0, isFrontPic, paletteSlot, windowId, TRUE); } u16 CreateTrainerCardTrainerPicSprite(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId) @@ -395,13 +370,10 @@ u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass) { if (getClass == TRUE) { - switch (gender) - { - default: + if (gender != MALE) return gFacilityClassToPicIndex[FACILITY_CLASS_MAY]; - case MALE: + else return gFacilityClassToPicIndex[FACILITY_CLASS_BRENDAN]; - } } return gender; } From 7590bacec1362cd3d339aa422ced50bb57f6cca0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 18 Oct 2021 02:14:29 -0400 Subject: [PATCH 079/417] Label remaining symbols in field_specials --- data/specials.inc | 6 ++-- src/field_specials.c | 67 +++++++++++++++----------------------------- 2 files changed, 26 insertions(+), 47 deletions(-) diff --git a/data/specials.inc b/data/specials.inc index 0b053b7742..df6a6812e6 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -455,7 +455,7 @@ gSpecials:: def_special ClearLinkContestFlags def_special TryContestEModeLinkup def_special ShowScrollableMultichoice - def_special sub_813A630 + def_special ScrollableMultichoice_TryReturnToList def_special BufferBattleTowerElevatorFloors def_special TryStoreHeldItemsInPyramidBag def_special ChooseItemsToTossFromPyramidBag @@ -484,10 +484,10 @@ gSpecials:: def_special CountPlayerTrainerStars def_special BufferBattleFrontierTutorMoveName def_special CloseBattleFrontierTutorWindow - def_special sub_813ADD4 + def_special ScrollableMultichoice_RedrawPersistentMenu def_special ChooseMonForMoveTutor def_special GetBattleFrontierTutorMoveIndex - def_special sub_813AF48 + def_special ScrollableMultichoice_ClosePersistentMenu def_special DoDeoxysRockInteraction def_special SetDeoxysRockPalette def_special CreateEventLegalEnemyMon diff --git a/src/field_specials.c b/src/field_specials.c index ab02f9938b..44b9a0d5dd 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -116,8 +116,8 @@ static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused); static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection); static void CloseScrollableMultichoice(u8 taskId); static void ScrollableMultichoice_RemoveScrollArrows(u8 taskId); -static void sub_813A600(u8 taskId); -static void sub_813A664(u8 taskId); +static void Task_ScrollableMultichoice_WaitReturnToList(u8 taskId); +static void Task_ScrollableMultichoice_ReturnToList(u8 taskId); static void ShowFrontierExchangeCornerItemIcon(u16 item); static void Task_DeoxysRockInteraction(u8 taskId); static void ChangeDeoxysRockLevel(u8 a0); @@ -2702,10 +2702,10 @@ static void ScrollableMultichoice_ProcessInput(u8 taskId) { CloseScrollableMultichoice(taskId); } - else + else // Handle selection while keeping the menu open { ScrollableMultichoice_RemoveScrollArrows(taskId); - task->func = sub_813A600; + task->func = Task_ScrollableMultichoice_WaitReturnToList; EnableBothScriptContexts(); } break; @@ -2729,36 +2729,32 @@ static void CloseScrollableMultichoice(u8 taskId) EnableBothScriptContexts(); } -// Functionally unused; tKeepOpenAfterSelect is only != 0 in unused functions -static void sub_813A600(u8 taskId) +// Never run, tKeepOpenAfterSelect is FALSE for all scrollable multichoices. +static void Task_ScrollableMultichoice_WaitReturnToList(u8 taskId) { switch (gTasks[taskId].tKeepOpenAfterSelect) { - case 1: - default: - break; - case 2: - gTasks[taskId].tKeepOpenAfterSelect = 1; - gTasks[taskId].func = sub_813A664; - break; + case 1: + default: + break; + case 2: + gTasks[taskId].tKeepOpenAfterSelect = 1; + gTasks[taskId].func = Task_ScrollableMultichoice_ReturnToList; + break; } } // Never called -void sub_813A630(void) +void ScrollableMultichoice_TryReturnToList(void) { - u8 taskId = FindTaskIdByFunc(sub_813A600); + u8 taskId = FindTaskIdByFunc(Task_ScrollableMultichoice_WaitReturnToList); if (taskId == TASK_NONE) - { EnableBothScriptContexts(); - } else - { - gTasks[taskId].tKeepOpenAfterSelect++; - } + gTasks[taskId].tKeepOpenAfterSelect++; // Return to list } -static void sub_813A664(u8 taskId) +static void Task_ScrollableMultichoice_ReturnToList(u8 taskId) { ScriptContext2_Enable(); ScrollableMultichoice_UpdateScrollArrows(taskId); @@ -2807,23 +2803,7 @@ static void ScrollableMultichoice_RemoveScrollArrows(u8 taskId) // Removed for Emerald (replaced by ShowScrollableMultichoice) void ShowGlassWorkshopMenu(void) { - /* - u8 i; - ScriptContext2_Enable(); - Menu_DrawStdWindowFrame(0, 0, 10, 11); - InitMenu(0, 1, 1, 5, 0, 9); - gUnknown_0203925C = 0; - ClearVerticalScrollIndicatorPalettes(); - LoadScrollIndicatorPalette(); - sub_810F2B4(); - for (i = 0; i < 5; i++) - { - Menu_PrintText(gUnknown_083F83C0[i], 1, 2 * i + 1); - } - gUnknown_0203925B = 0; - gUnknown_0203925A = ARRAY_COUNT(gUnknown_083F83C0); - CreateTask(sub_810F118, 8); - */ + } void SetBattleTowerLinkPlayerGfx(void) @@ -3252,11 +3232,11 @@ void CloseBattleFrontierTutorWindow(void) } // Never called -void sub_813ADD4(void) +void ScrollableMultichoice_RedrawPersistentMenu(void) { u16 scrollOffset, selectedRow; u8 i; - u8 taskId = FindTaskIdByFunc(sub_813A600); + u8 taskId = FindTaskIdByFunc(Task_ScrollableMultichoice_WaitReturnToList); if (taskId != TASK_NONE) { struct Task *task = &gTasks[taskId]; @@ -3264,9 +3244,7 @@ void sub_813ADD4(void) SetStandardWindowBorderStyle(task->tWindowId, 0); for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++) - { AddTextPrinterParameterized5(task->tWindowId, 1, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0); - } AddTextPrinterParameterized(task->tWindowId, 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL); PutWindowTilemap(task->tWindowId); @@ -3313,9 +3291,10 @@ void GetBattleFrontierTutorMoveIndex(void) } // Never called -void sub_813AF48(void) +// Close a scrollable multichoice that stays open after selection +void ScrollableMultichoice_ClosePersistentMenu(void) { - u8 taskId = FindTaskIdByFunc(sub_813A600); + u8 taskId = FindTaskIdByFunc(Task_ScrollableMultichoice_WaitReturnToList); if (taskId != TASK_NONE) { struct Task *task = &gTasks[taskId]; From b31bddddca327bd15cc022717d19ace43b435ac2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 18 Oct 2021 12:20:35 -0400 Subject: [PATCH 080/417] Clean up metatile_behavior --- include/constants/metatile_behaviors.h | 20 ++--- include/metatile_behavior.h | 14 +++- src/battle_setup.c | 6 +- src/field_control_avatar.c | 6 +- src/field_effect_helpers.c | 10 ++- src/item_use.c | 2 +- src/metatile_behavior.c | 107 ++++++++++++++++--------- src/wild_encounter.c | 2 +- 8 files changed, 106 insertions(+), 61 deletions(-) diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h index 1d1557256d..df2d28c7df 100755 --- a/include/constants/metatile_behaviors.h +++ b/include/constants/metatile_behaviors.h @@ -113,22 +113,22 @@ #define MB_WATER_SOUTH_ARROW_WARP 0x6D #define MB_DEEP_SOUTH_WARP 0x6E #define MB_UNUSED_6F 0x6F -#define MB_WARP_OR_BRIDGE 0x70 -#define MB_UNUSED_71 0x71 -#define MB_ROUTE120_NORTH_BRIDGE_1 0x72 -#define MB_ROUTE120_NORTH_BRIDGE_2 0x73 +#define MB_BRIDGE_OVER_OCEAN 0x70 +#define MB_BRIDGE_OVER_POND_LOW 0x71 +#define MB_BRIDGE_OVER_POND_MED 0x72 +#define MB_BRIDGE_OVER_POND_HIGH 0x73 #define MB_PACIFIDLOG_VERTICAL_LOG_1 0x74 #define MB_PACIFIDLOG_VERTICAL_LOG_2 0x75 #define MB_PACIFIDLOG_HORIZONTAL_LOG_1 0x76 #define MB_PACIFIDLOG_HORIZONTAL_LOG_2 0x77 #define MB_FORTREE_BRIDGE 0x78 #define MB_UNUSED_79 0x79 -#define MB_ROUTE120_SOUTH_BRIDGE_1 0x7A -#define MB_ROUTE120_SOUTH_BRIDGE_2 0x7B -#define MB_ROUTE120_NORTH_BRIDGE_3 0x7C -#define MB_ROUTE120_NORTH_BRIDGE_4 0x7D -#define MB_UNUSED_7E 0x7E -#define MB_ROUTE110_BRIDGE 0x7F +#define MB_BRIDGE_OVER_POND_MED_EDGE_1 0x7A +#define MB_BRIDGE_OVER_POND_MED_EDGE_2 0x7B +#define MB_BRIDGE_OVER_POND_HIGH_EDGE_1 0x7C +#define MB_BRIDGE_OVER_POND_HIGH_EDGE_2 0x7D +#define MB_UNUSED_BRIDGE_1 0x7E +#define MB_UNUSED_BRIDGE_2 0x7F #define MB_COUNTER 0x80 #define MB_UNUSED_81 0x81 #define MB_UNUSED_82 0x82 diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index 584b3e546e..87a9ebcc59 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -1,6 +1,14 @@ #ifndef GUARD_METATILE_BEHAVIOR_H #define GUARD_METATILE_BEHAVIOR_H +// Return values for MetatileBehavior_GetBridgeType +enum { + BRIDGE_TYPE_OCEAN, // For log bridges over 'ocean' style water (Routes 110/119 use this). + BRIDGE_TYPE_POND_LOW, + BRIDGE_TYPE_POND_MED, + BRIDGE_TYPE_POND_HIGH, +}; + bool8 MetatileBehavior_IsATile(u8); bool8 MetatileBehavior_IsEncounterTile(u8); bool8 MetatileBehavior_IsJumpEast(u8); @@ -76,9 +84,9 @@ bool8 MetatileBehavior_IsLongGrass(u8); bool8 MetatileBehavior_IsBerryTreeSoil(u8); bool8 MetatileBehavior_IsAshGrass(u8); bool8 MetatileBehavior_IsFootprints(u8); -bool8 MetatileBehavior_IsBridge(u8); +bool8 MetatileBehavior_IsBridgeOverWater(u8); u8 MetatileBehavior_GetBridgeType(u8); -u8 MetatileBehavior_8089510(u8); +bool8 MetatileBehavior_IsBridgeOverWaterNoEdge(u8); bool8 MetatileBehavior_IsLandWildEncounter(u8); bool8 MetatileBehavior_IsWaterWildEncounter(u8); bool8 MetatileBehavior_IsIndoorEncounter(u8); @@ -115,7 +123,7 @@ bool8 MetatileBehavior_IsSecretBaseSpinMat(u8); bool8 MetatileBehavior_IsLavaridgeB1FWarp(u8); bool8 MetatileBehavior_IsLavaridge1FWarp(u8); bool8 MetatileBehavior_IsAquaHideoutWarp(u8); -bool8 MetatileBehavior_IsWarpOrBridge(u8); +bool8 MetatileBehavior_IsBridgeOverOcean(u8); bool8 MetatileBehavior_IsMossdeepGymWarp(u8); bool8 MetatileBehavior_IsSurfableFishableWater(u8); bool8 MetatileBehavior_IsMtPyreHole(u8); diff --git a/src/battle_setup.c b/src/battle_setup.c index 4337ec29cf..28e80545f1 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -674,9 +674,11 @@ u8 BattleSetup_GetTerrainId(void) return BATTLE_TERRAIN_MOUNTAIN; if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING)) { - if (MetatileBehavior_GetBridgeType(tileBehavior)) + // Is BRIDGE_TYPE_POND_*? + if (MetatileBehavior_GetBridgeType(tileBehavior) != BRIDGE_TYPE_OCEAN) return BATTLE_TERRAIN_POND; - if (MetatileBehavior_IsBridge(tileBehavior) == TRUE) + + if (MetatileBehavior_IsBridgeOverWater(tileBehavior) == TRUE) return BATTLE_TERRAIN_WATER; } if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE113) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE113)) diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 10f8d49bb1..e58fb783b3 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -729,9 +729,9 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB DoTeleportTileWarp(); return TRUE; } - if (MetatileBehavior_IsWarpOrBridge(metatileBehavior) == TRUE) + if (MetatileBehavior_IsBridgeOverOcean(metatileBehavior) == TRUE) { - // Maybe unused? This MB is used by log bridges, but there's never a warp event on them + // Maybe unused? This MB is used by log bridges, but there's never a warp event on them. DoSpinExitWarp(); return TRUE; } @@ -762,7 +762,7 @@ static bool8 IsWarpMetatileBehavior(u16 metatileBehavior) && MetatileBehavior_IsAquaHideoutWarp(metatileBehavior) != TRUE && MetatileBehavior_IsMtPyreHole(metatileBehavior) != TRUE && MetatileBehavior_IsMossdeepGymWarp(metatileBehavior) != TRUE - && MetatileBehavior_IsWarpOrBridge(metatileBehavior) != TRUE) + && MetatileBehavior_IsBridgeOverOcean(metatileBehavior) != TRUE) return FALSE; return TRUE; } diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index 0a0e465a87..0acb158637 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -71,9 +71,15 @@ static s16 GetReflectionVerticalOffset(struct ObjectEvent *objectEvent) static void LoadObjectReflectionPalette(struct ObjectEvent *objectEvent, struct Sprite *reflectionSprite) { u8 bridgeType; - u16 bridgeReflectionVerticalOffsets[] = { 12, 28, 44 }; + u16 bridgeReflectionVerticalOffsets[] = { + [BRIDGE_TYPE_POND_LOW - 1] = 12, + [BRIDGE_TYPE_POND_MED - 1] = 28, + [BRIDGE_TYPE_POND_HIGH - 1] = 44 + }; reflectionSprite->sReflectionVerticalOffset = 0; - if (!GetObjectEventGraphicsInfo(objectEvent->graphicsId)->disableReflectionPaletteLoad && ((bridgeType = MetatileBehavior_GetBridgeType(objectEvent->previousMetatileBehavior)) || (bridgeType = MetatileBehavior_GetBridgeType(objectEvent->currentMetatileBehavior)))) + if (!GetObjectEventGraphicsInfo(objectEvent->graphicsId)->disableReflectionPaletteLoad + && ((bridgeType = MetatileBehavior_GetBridgeType(objectEvent->previousMetatileBehavior)) + || (bridgeType = MetatileBehavior_GetBridgeType(objectEvent->currentMetatileBehavior)))) { reflectionSprite->sReflectionVerticalOffset = bridgeReflectionVerticalOffsets[bridgeType - 1]; LoadObjectHighBridgeReflectionPalette(objectEvent, reflectionSprite->oam.paletteNum); diff --git a/src/item_use.c b/src/item_use.c index 0a31816083..665d27e7d0 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -249,7 +249,7 @@ static bool32 CanFish(void) { if (MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehavior) && !MapGridIsImpassableAt(x, y)) return TRUE; - if (MetatileBehavior_8089510(tileBehavior) == TRUE) + if (MetatileBehavior_IsBridgeOverWaterNoEdge(tileBehavior) == TRUE) return TRUE; } diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 5c8b8ec512..3829523df2 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -122,22 +122,22 @@ static const u8 sTileBitAttributes[] = [MB_WATER_SOUTH_ARROW_WARP] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), [MB_DEEP_SOUTH_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_UNUSED_6F] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_WARP_OR_BRIDGE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_71] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ROUTE120_NORTH_BRIDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ROUTE120_NORTH_BRIDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_BRIDGE_OVER_OCEAN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), + [MB_BRIDGE_OVER_POND_LOW] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_BRIDGE_OVER_POND_MED] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_BRIDGE_OVER_POND_HIGH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_PACIFIDLOG_VERTICAL_LOG_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_PACIFIDLOG_VERTICAL_LOG_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_PACIFIDLOG_HORIZONTAL_LOG_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_PACIFIDLOG_HORIZONTAL_LOG_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_FORTREE_BRIDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_UNUSED_79] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_ROUTE120_SOUTH_BRIDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ROUTE120_SOUTH_BRIDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ROUTE120_NORTH_BRIDGE_3] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ROUTE120_NORTH_BRIDGE_4] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_7E] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ROUTE110_BRIDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_BRIDGE_OVER_POND_MED_EDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_BRIDGE_OVER_POND_MED_EDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_BRIDGE_OVER_POND_HIGH_EDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_BRIDGE_OVER_POND_HIGH_EDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_UNUSED_BRIDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_UNUSED_BRIDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_COUNTER] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_UNUSED_81] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_UNUSED_82] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), @@ -833,7 +833,9 @@ bool8 MetatileBehavior_IsPlayerRoomPCOn(u8 metatileBehavior) bool8 MetatileBehavior_HasRipples(u8 metatileBehavior) { - if (metatileBehavior == MB_POND_WATER || metatileBehavior == MB_PUDDLE || metatileBehavior == MB_SOOTOPOLIS_DEEP_WATER) + if (metatileBehavior == MB_POND_WATER + || metatileBehavior == MB_PUDDLE + || metatileBehavior == MB_SOOTOPOLIS_DEEP_WATER) return TRUE; else return FALSE; @@ -888,10 +890,19 @@ bool8 MetatileBehavior_IsFootprints(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsBridge(u8 metatileBehavior) +// For the sections of log bridges that span water / water's edge. +// Note that the rest of the metatiles for these bridges use MB_NORMAL. +// This is used to allow encounters on the water below the bridge. +bool8 MetatileBehavior_IsBridgeOverWater(u8 metatileBehavior) { - if ((metatileBehavior == MB_WARP_OR_BRIDGE || metatileBehavior == MB_UNUSED_71 || metatileBehavior == MB_ROUTE120_NORTH_BRIDGE_1 || metatileBehavior == MB_ROUTE120_NORTH_BRIDGE_2) - || (metatileBehavior == MB_ROUTE120_NORTH_BRIDGE_3 || metatileBehavior == MB_ROUTE120_NORTH_BRIDGE_4 || metatileBehavior == MB_UNUSED_7E || metatileBehavior == MB_ROUTE110_BRIDGE)) + if ((metatileBehavior == MB_BRIDGE_OVER_OCEAN + || metatileBehavior == MB_BRIDGE_OVER_POND_LOW + || metatileBehavior == MB_BRIDGE_OVER_POND_MED + || metatileBehavior == MB_BRIDGE_OVER_POND_HIGH) + || (metatileBehavior == MB_BRIDGE_OVER_POND_HIGH_EDGE_1 + || metatileBehavior == MB_BRIDGE_OVER_POND_HIGH_EDGE_2 + || metatileBehavior == MB_UNUSED_BRIDGE_1 + || metatileBehavior == MB_UNUSED_BRIDGE_2)) return TRUE; else return FALSE; @@ -899,34 +910,39 @@ bool8 MetatileBehavior_IsBridge(u8 metatileBehavior) u8 MetatileBehavior_GetBridgeType(u8 metatileBehavior) { - u8 result = metatileBehavior - MB_WARP_OR_BRIDGE; - if (result < 4) - return result; + // MB_BRIDGE_OVER_OCEAN --> BRIDGE_TYPE_OCEAN (Routes 110/119) + // MB_BRIDGE_OVER_POND_LOW --> BRIDGE_TYPE_POND_LOW (Unused) + // MB_BRIDGE_OVER_POND_MED --> BRIDGE_TYPE_POND_MED (Route 120, south) + // MB_BRIDGE_OVER_POND_HIGH --> BRIDGE_TYPE_POND_HIGH (Route 120, north) + if (metatileBehavior >= MB_BRIDGE_OVER_OCEAN + && metatileBehavior <= MB_BRIDGE_OVER_POND_HIGH) + return metatileBehavior - MB_BRIDGE_OVER_OCEAN; - result = metatileBehavior - MB_ROUTE120_SOUTH_BRIDGE_1; - if (result < 2) - return 2; + if (metatileBehavior >= MB_BRIDGE_OVER_POND_MED_EDGE_1 + && metatileBehavior <= MB_BRIDGE_OVER_POND_MED_EDGE_2) + return BRIDGE_TYPE_POND_MED; - result = metatileBehavior - MB_ROUTE120_NORTH_BRIDGE_3; - if (result < 2) - return 3; + if (metatileBehavior >= MB_BRIDGE_OVER_POND_HIGH_EDGE_1 + && metatileBehavior <= MB_BRIDGE_OVER_POND_HIGH_EDGE_2) + return BRIDGE_TYPE_POND_HIGH; - return 0; + return BRIDGE_TYPE_OCEAN; } -u8 MetatileBehavior_8089510(u8 metatileBehavior) +// Used to allow fishing below the bridge metatiles. +bool8 MetatileBehavior_IsBridgeOverWaterNoEdge(u8 metatileBehavior) { - u8 result = metatileBehavior - MB_WARP_OR_BRIDGE; - - if (result < 4) - return 1; + if (metatileBehavior >= MB_BRIDGE_OVER_OCEAN + && metatileBehavior <= MB_BRIDGE_OVER_POND_HIGH) + return TRUE; else - return 0; + return FALSE; } bool8 MetatileBehavior_IsLandWildEncounter(u8 metatileBehavior) { - if (MetatileBehavior_IsSurfableWaterOrUnderwater(metatileBehavior) == FALSE && MetatileBehavior_IsEncounterTile(metatileBehavior) == TRUE) + if (MetatileBehavior_IsSurfableWaterOrUnderwater(metatileBehavior) == FALSE + && MetatileBehavior_IsEncounterTile(metatileBehavior) == TRUE) return TRUE; else return FALSE; @@ -934,7 +950,8 @@ bool8 MetatileBehavior_IsLandWildEncounter(u8 metatileBehavior) bool8 MetatileBehavior_IsWaterWildEncounter(u8 metatileBehavior) { - if (MetatileBehavior_IsSurfableWaterOrUnderwater(metatileBehavior) == TRUE && MetatileBehavior_IsEncounterTile(metatileBehavior) == TRUE) + if (MetatileBehavior_IsSurfableWaterOrUnderwater(metatileBehavior) == TRUE + && MetatileBehavior_IsEncounterTile(metatileBehavior) == TRUE) return TRUE; else return FALSE; @@ -1148,8 +1165,10 @@ bool8 MetatileBehavior_IsPacifidlogHorizontalLog2(u8 metatileBehavior) bool8 MetatileBehavior_IsPacifidlogLog(u8 metatileBehavior) { - if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_1 || metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_2 - || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_1 || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_2) + if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_1 + || metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_2 + || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_1 + || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_2) return TRUE; else return FALSE; @@ -1243,9 +1262,13 @@ bool8 MetatileBehavior_IsAquaHideoutWarp(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsWarpOrBridge(u8 metatileBehavior) +// Very odd, used to initiate a teleport-style warp. +// No warp events seem to be on a metatile of this kind, and it's +// used by log bridges over ocean-style water, which wouldn't make +// sense to have a warp like this. +bool8 MetatileBehavior_IsBridgeOverOcean(u8 metatileBehavior) { - if (metatileBehavior == MB_WARP_OR_BRIDGE) + if (metatileBehavior == MB_BRIDGE_OVER_OCEAN) return TRUE; else return FALSE; @@ -1262,9 +1285,15 @@ bool8 MetatileBehavior_IsMossdeepGymWarp(u8 metatileBehavior) bool8 MetatileBehavior_IsSurfableFishableWater(u8 metatileBehavior) { - if (metatileBehavior == MB_POND_WATER || metatileBehavior == MB_OCEAN_WATER || metatileBehavior == MB_SEMI_DEEP_WATER || metatileBehavior == MB_DEEP_WATER - || metatileBehavior == MB_SOOTOPOLIS_DEEP_WATER || (metatileBehavior == MB_EASTWARD_CURRENT || metatileBehavior == MB_WESTWARD_CURRENT - || metatileBehavior == MB_NORTHWARD_CURRENT || metatileBehavior == MB_SOUTHWARD_CURRENT)) + if (metatileBehavior == MB_POND_WATER + || metatileBehavior == MB_OCEAN_WATER + || metatileBehavior == MB_SEMI_DEEP_WATER + || metatileBehavior == MB_DEEP_WATER + || metatileBehavior == MB_SOOTOPOLIS_DEEP_WATER + || (metatileBehavior == MB_EASTWARD_CURRENT + || metatileBehavior == MB_WESTWARD_CURRENT + || metatileBehavior == MB_NORTHWARD_CURRENT + || metatileBehavior == MB_SOUTHWARD_CURRENT)) return TRUE; else return FALSE; diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 5d74257629..458882853a 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -613,7 +613,7 @@ bool8 StandardWildEncounter(u16 currMetaTileBehavior, u16 previousMetaTileBehavi } } else if (MetatileBehavior_IsWaterWildEncounter(currMetaTileBehavior) == TRUE - || (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING) && MetatileBehavior_IsBridge(currMetaTileBehavior) == TRUE)) + || (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING) && MetatileBehavior_IsBridgeOverWater(currMetaTileBehavior) == TRUE)) { if (AreLegendariesInSootopolisPreventingEncounters() == TRUE) return FALSE; From 24b4e898ada55c79a0575684722b9d42e63017e9 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 18 Oct 2021 14:40:04 -0400 Subject: [PATCH 081/417] More mauville_old_man clean up --- data/text/mauville_man.inc | 38 +++--- gflib/text.h | 2 +- include/constants/global.h | 1 + include/event_scripts.h | 40 +++--- include/global.h | 2 +- src/mauville_old_man.c | 256 ++++++++++++++++++++----------------- 6 files changed, 184 insertions(+), 155 deletions(-) diff --git a/data/text/mauville_man.inc b/data/text/mauville_man.inc index 5d9954d9bc..5b7dfbb7b4 100644 --- a/data/text/mauville_man.inc +++ b/data/text/mauville_man.inc @@ -1,63 +1,63 @@ -@ Only contains a portion of the mauville_man text. The rest is in scripts/mauville_man.inc -gText_SoPretty:: +@ Only contains the text for the Mauville Man named Giddy. The rest is in scripts/mauville_man.inc +GiddyText_SoPretty:: .string " so pretty!$" -gText_SoDarling:: +GiddyText_SoDarling:: .string " so darling!$" -gText_SoRelaxed:: +GiddyText_SoRelaxed:: .string " so relaxed!$" -gText_SoSunny:: +GiddyText_SoSunny:: .string " so sunny!$" -gText_SoDesirable:: +GiddyText_SoDesirable:: .string " so desirable!$" -gText_SoExciting:: +GiddyText_SoExciting:: .string " so exciting!$" -gText_SoAmusing:: +GiddyText_SoAmusing:: .string " so amusing!$" -gText_SoMagical:: +GiddyText_SoMagical:: .string " so magical!$" -gOtherText_Is:: +GiddyText_Is:: .string " is$" -gOtherText_DontYouAgree:: +GiddyText_DontYouAgree:: .string "\n" .string "Don't you agree?$" -gMauvilleManText_ISoWantToGoOnAVacation:: +GiddyText_ISoWantToGoOnAVacation:: .string "I so want to go on a vacation.\n" .string "Would you happen to know a nice place?$" -gMauvilleManText_IBoughtCrayonsWith120Colors:: +GiddyText_IBoughtCrayonsWith120Colors:: .string "I bought crayons with 120 colors!\n" .string "Don't you think that's nice?$" -gMauvilleManText_WouldntItBeNiceIfWeCouldFloat:: +GiddyText_WouldntItBeNiceIfWeCouldFloat:: .string "Wouldn't it be nice if we could float\n" .string "away on a cloud of bubbles?$" -gMauvilleManText_WhenYouWriteOnASandyBeach:: +GiddyText_WhenYouWriteOnASandyBeach:: .string "When you write on a sandy beach,\n" .string "they wash away. It makes me sad.$" -gMauvilleManText_WhatsTheBottomOfTheSeaLike:: +GiddyText_WhatsTheBottomOfTheSeaLike:: .string "What's the bottom of the sea like?\n" .string "Just once I would so love to go!$" -gMauvilleManText_WhenYouSeeTheSettingSunDoesIt:: +GiddyText_WhenYouSeeTheSettingSunDoesIt:: .string "When you see the setting sun, does it\n" .string "make you want to go home?$" -gMauvilleManText_LyingBackInTheGreenGrass:: +GiddyText_LyingBackInTheGreenGrass:: .string "Lying back in the green grass…\n" .string "Oh, it's so, so nice!$" -gMauvilleManText_SecretBasesAreSoWonderful:: +GiddyText_SecretBasesAreSoWonderful:: .string "SECRET BASES are so wonderful!\n" .string "Can't you feel the excitement?$" diff --git a/gflib/text.h b/gflib/text.h index 8871ba2f18..ee3dfa34c5 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -52,7 +52,7 @@ #define CHAR_LV 0x34 #define CHAR_EQUALS 0x35 #define CHAR_SEMICOLON 0x36 -// +#define CHAR_BARD_WORD_DELIMIT 0x37 // Empty space to separate words in Bard's song #define CHAR_INV_QUESTION_MARK 0x51 #define CHAR_INV_EXCL_MARK 0x52 #define CHAR_PK 0x53 diff --git a/include/constants/global.h b/include/constants/global.h index 6d3fa936d6..3d5da00780 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -96,6 +96,7 @@ #define NUM_STORYTELLER_TALES 4 #define NUM_TRADER_ITEMS 4 #define GIDDY_MAX_TALES 10 +#define GIDDY_MAX_QUESTIONS 8 #define OPTIONS_BUTTON_MODE_NORMAL 0 #define OPTIONS_BUTTON_MODE_LR 1 diff --git a/include/event_scripts.h b/include/event_scripts.h index 1a24aa59d3..a19d4553a4 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -382,27 +382,27 @@ extern const u8 EventScript_UseRockSmash[]; extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[]; extern const u8 LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC[]; -//mauville_old_man -extern const u8 gOtherText_Is[]; -extern const u8 gOtherText_DontYouAgree[]; -extern const u8 gText_SoPretty[]; -extern const u8 gText_SoDarling[]; -extern const u8 gText_SoRelaxed[]; -extern const u8 gText_SoSunny[]; -extern const u8 gText_SoDesirable[]; -extern const u8 gText_SoExciting[]; -extern const u8 gText_SoAmusing[]; -extern const u8 gText_SoMagical[]; -extern const u8 gMauvilleManText_ISoWantToGoOnAVacation[]; -extern const u8 gMauvilleManText_IBoughtCrayonsWith120Colors[]; -extern const u8 gMauvilleManText_WouldntItBeNiceIfWeCouldFloat[]; -extern const u8 gMauvilleManText_WhenYouWriteOnASandyBeach[]; -extern const u8 gMauvilleManText_WhatsTheBottomOfTheSeaLike[]; -extern const u8 gMauvilleManText_WhenYouSeeTheSettingSunDoesIt[]; -extern const u8 gMauvilleManText_LyingBackInTheGreenGrass[]; -extern const u8 gMauvilleManText_SecretBasesAreSoWonderful[]; +// Mauville Old Man (Giddy) +extern const u8 GiddyText_Is[]; +extern const u8 GiddyText_DontYouAgree[]; +extern const u8 GiddyText_SoPretty[]; +extern const u8 GiddyText_SoDarling[]; +extern const u8 GiddyText_SoRelaxed[]; +extern const u8 GiddyText_SoSunny[]; +extern const u8 GiddyText_SoDesirable[]; +extern const u8 GiddyText_SoExciting[]; +extern const u8 GiddyText_SoAmusing[]; +extern const u8 GiddyText_SoMagical[]; +extern const u8 GiddyText_ISoWantToGoOnAVacation[]; +extern const u8 GiddyText_IBoughtCrayonsWith120Colors[]; +extern const u8 GiddyText_WouldntItBeNiceIfWeCouldFloat[]; +extern const u8 GiddyText_WhenYouWriteOnASandyBeach[]; +extern const u8 GiddyText_WhatsTheBottomOfTheSeaLike[]; +extern const u8 GiddyText_WhenYouSeeTheSettingSunDoesIt[]; +extern const u8 GiddyText_LyingBackInTheGreenGrass[]; +extern const u8 GiddyText_SecretBasesAreSoWonderful[]; -// mauville old man storyteller +// Mauville Old Man (storyteller) extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameTitle[]; extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameAction[]; extern const u8 MauvilleCity_PokemonCenter_1F_Text_SavedGameStory[]; diff --git a/include/global.h b/include/global.h index dcec2c4dbf..8b2c2ae862 100644 --- a/include/global.h +++ b/include/global.h @@ -640,7 +640,7 @@ struct MauvilleManGiddy /*0x01*/ u8 taleCounter; /*0x02*/ u8 questionNum; /*0x04*/ u16 randomWords[GIDDY_MAX_TALES]; - /*0x18*/ u8 questionList[8]; + /*0x18*/ u8 questionList[GIDDY_MAX_QUESTIONS]; /*0x20*/ u8 language; }; /*size = 0x2C*/ diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index d202bc638f..2fd0e67307 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -24,8 +24,6 @@ #include "m4a.h" #include "constants/mauville_old_man.h" -#define CHAR_SONG_WORD_SEPARATOR 0x37 - static void InitGiddyTaleList(void); static void StartBardSong(bool8 useTemporaryLyrics); static void Task_BardSong(u8 taskId); @@ -50,25 +48,28 @@ static const u16 sDefaultBardSongLyrics[BARD_SONG_LENGTH] = { }; static const u8 * const sGiddyAdjectives[] = { - gText_SoPretty, - gText_SoDarling, - gText_SoRelaxed, - gText_SoSunny, - gText_SoDesirable, - gText_SoExciting, - gText_SoAmusing, - gText_SoMagical + GiddyText_SoPretty, + GiddyText_SoDarling, + GiddyText_SoRelaxed, + GiddyText_SoSunny, + GiddyText_SoDesirable, + GiddyText_SoExciting, + GiddyText_SoAmusing, + GiddyText_SoMagical }; -static const u8 * const sGiddyQuestions[] = { - gMauvilleManText_ISoWantToGoOnAVacation, - gMauvilleManText_IBoughtCrayonsWith120Colors, - gMauvilleManText_WouldntItBeNiceIfWeCouldFloat, - gMauvilleManText_WhenYouWriteOnASandyBeach, - gMauvilleManText_WhatsTheBottomOfTheSeaLike, - gMauvilleManText_WhenYouSeeTheSettingSunDoesIt, - gMauvilleManText_LyingBackInTheGreenGrass, - gMauvilleManText_SecretBasesAreSoWonderful +// Non-random lines Giddy can say. Not all are strictly +// questions, but most are, and the player will receive +// a Yes/No prompt afterwards regardless. +static const u8 * const sGiddyQuestions[GIDDY_MAX_QUESTIONS] = { + GiddyText_ISoWantToGoOnAVacation, + GiddyText_IBoughtCrayonsWith120Colors, + GiddyText_WouldntItBeNiceIfWeCouldFloat, + GiddyText_WhenYouWriteOnASandyBeach, + GiddyText_WhatsTheBottomOfTheSeaLike, + GiddyText_WhenYouSeeTheSettingSunDoesIt, + GiddyText_LyingBackInTheGreenGrass, + GiddyText_SecretBasesAreSoWonderful }; static void SetupBard(void) @@ -185,7 +186,7 @@ static void PrepareSongText(void) while (wordEnd != str) { if (*str == CHAR_SPACE) - *str = CHAR_SONG_WORD_SEPARATOR; + *str = CHAR_BARD_WORD_DELIMIT; str++; } @@ -196,7 +197,7 @@ static void PrepareSongText(void) while (wordEnd != str) { if (*str == CHAR_SPACE) - *str = CHAR_SONG_WORD_SEPARATOR; + *str = CHAR_BARD_WORD_DELIMIT; str++; } @@ -207,7 +208,7 @@ static void PrepareSongText(void) while (wordEnd != str) { if (*str == CHAR_SPACE) - *str = CHAR_SONG_WORD_SEPARATOR; + *str = CHAR_BARD_WORD_DELIMIT; str++; } @@ -272,22 +273,26 @@ void GenerateGiddyLine(void) if (giddy->taleCounter == 0) InitGiddyTaleList(); + // A line from Giddy is either a line following this format: + // "{random word} is so {adjective}! Don't you agree?", + // or one of the texts in sGiddyQuestions. if (giddy->randomWords[giddy->taleCounter] != EC_EMPTY_WORD) { u8 *stringPtr; u32 adjective = Random(); + adjective %= ARRAY_COUNT(sGiddyAdjectives); - adjective %= 8; stringPtr = CopyEasyChatWord(gStringVar4, giddy->randomWords[giddy->taleCounter]); - stringPtr = StringCopy(stringPtr, gOtherText_Is); + stringPtr = StringCopy(stringPtr, GiddyText_Is); stringPtr = StringCopy(stringPtr, sGiddyAdjectives[adjective]); - StringCopy(stringPtr, gOtherText_DontYouAgree); + StringCopy(stringPtr, GiddyText_DontYouAgree); } else { StringCopy(gStringVar4, sGiddyQuestions[giddy->questionList[giddy->questionNum++]]); } + // 10% chance for Giddy to stop telling tales. if (!(Random() % 10)) giddy->taleCounter = GIDDY_MAX_TALES; else @@ -308,45 +313,53 @@ static void InitGiddyTaleList(void) {EC_GROUP_POKEMON_NATIONAL, 0} }; u16 i; - u16 r10; - u16 r7; - u16 r1; + u16 totalWords; + u16 temp; + u16 var; // re-used // Shuffle question list - for (i = 0; i < 8; i++) + for (i = 0; i < GIDDY_MAX_QUESTIONS; i++) giddy->questionList[i] = i; - for (i = 0; i < 8; i++) + for (i = 0; i < GIDDY_MAX_QUESTIONS; i++) { - r1 = Random() % (i + 1); - SWAP(giddy->questionList[i], giddy->questionList[r1], r7); + var = Random() % (i + 1); + SWAP(giddy->questionList[i], giddy->questionList[var], temp); } - r10 = 0; - for (i = 0; i < 6; i++) + // Count total number of words in above word groups + totalWords = 0; + for (i = 0; i < ARRAY_COUNT(wordGroupsAndCount); i++) { wordGroupsAndCount[i][1] = EasyChat_GetNumWordsInGroup(wordGroupsAndCount[i][0]); - r10 += wordGroupsAndCount[i][1]; + totalWords += wordGroupsAndCount[i][1]; } giddy->questionNum = 0; - r7 = 0; + temp = 0; for (i = 0; i < GIDDY_MAX_TALES; i++) { - r1 = Random() % 10; - if (r1 < 3 && r7 < 8) + var = Random() % 10; + if (var < 3 && temp < GIDDY_MAX_QUESTIONS) { + // 30% chance for word to be empty (in which case Giddy + // will say one of his non-random questions), unless + // the limit for questions has been reached already. giddy->randomWords[i] = EC_EMPTY_WORD; - r7++; + temp++; } else { - s16 r2 = Random() % r10; - for (r1 = 0; i < 6; r1++) - if ((r2 -= wordGroupsAndCount[r1][1]) <= 0) + // Pick a random word id, then advance through the word + // groups until the group where that id landed. + s16 randWord = Random() % totalWords; + for (var = 0; i < ARRAY_COUNT(wordGroupsAndCount); var++) + if ((randWord -= wordGroupsAndCount[var][1]) <= 0) break; - if (r1 == 6) - r1 = 0; - giddy->randomWords[i] = GetRandomEasyChatWordFromUnlockedGroup(wordGroupsAndCount[r1][0]); + if (var == ARRAY_COUNT(wordGroupsAndCount)) + var = 0; + + // Save the randomly selected word + giddy->randomWords[i] = GetRandomEasyChatWordFromUnlockedGroup(wordGroupsAndCount[var][0]); } } } @@ -392,10 +405,23 @@ void ResetMauvilleOldManFlag(void) SetMauvilleOldManObjEventGfx(); } +// States and task data for Task_BardSong. +// The function BardSing receives this task as an +// argument and reads its state as well. +enum { + BARD_STATE_INIT, + BARD_STATE_WAIT_BGM, + BARD_STATE_GET_WORD, + BARD_STATE_HANDLE_WORD, + BARD_STATE_WAIT_WORD, + BARD_STATE_PAUSE, +}; -#define tState data[0] -#define tCharIndex data[3] -#define tCurrWord data[4] +#define tState data[0] +#define tWordState data[1] +#define tDelay data[2] +#define tCharIndex data[3] +#define tCurrWord data[4] #define tUseTemporaryLyrics data[5] #define MACRO1(a) (((a) & 3) + (((a) / 8) & 1)) @@ -418,7 +444,7 @@ static void DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1) gDisableTextPrinters = TRUE; } -static void sub_8120708(const u8 * str) +static void DrawSongTextWindow(const u8 * str) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, 1, str, 0, 1, 1, DisableTextPrinters); @@ -430,7 +456,7 @@ static void BardSing(struct Task *task, struct BardSong *song) { switch (task->tState) { - case 0: // Initialize song + case BARD_STATE_INIT: { struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; u16 *lyrics; @@ -446,9 +472,9 @@ static void BardSing(struct Task *task, struct BardSong *song) song->currWord = 0; } break; - case 1: // Wait for BGM to end + case BARD_STATE_WAIT_BGM: break; - case 2: // Initialize word + case BARD_STATE_GET_WORD: { u16 word = song->lyrics[song->currWord]; song->sound = GetWordSounds(word); @@ -463,8 +489,8 @@ static void BardSing(struct Task *task, struct BardSong *song) } break; } - case 3: - case 4: + case BARD_STATE_HANDLE_WORD: + case BARD_STATE_WAIT_WORD: { const struct BardSound *sound = &song->sound[song->currPhoneme]; @@ -524,7 +550,7 @@ static void BardSing(struct Task *task, struct BardSong *song) } } break; - case 5: + case BARD_STATE_PAUSE: break; } } @@ -534,28 +560,30 @@ static void Task_BardSong(u8 taskId) struct Task *task = &gTasks[taskId]; BardSing(task, &gBardSong); + switch (task->tState) { - case 0: // Initialize song + case BARD_STATE_INIT: PrepareSongText(); - sub_8120708(gStringVar4); - task->data[1] = 0; - task->data[2] = 0; + DrawSongTextWindow(gStringVar4); + task->tWordState = 0; + task->tDelay = 0; task->tCharIndex = 0; task->tCurrWord = 0; FadeOutBGMTemporarily(4); - task->tState = 1; + task->tState = BARD_STATE_WAIT_BGM; break; - case 1: // Wait for BGM to end + case BARD_STATE_WAIT_BGM: if (IsBGMPausedOrStopped()) - task->tState = 2; + task->tState = BARD_STATE_GET_WORD; break; - case 2: // Initialize word + case BARD_STATE_GET_WORD: { struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - u8 *str = gStringVar4 + task->tCharIndex; + u8 *str = &gStringVar4[task->tCharIndex]; u16 wordLen = 0; + // Read letters until delimiter while (*str != CHAR_SPACE && *str != CHAR_NEWLINE && *str != EXT_CTRL_CODE_BEGIN @@ -564,6 +592,7 @@ static void Task_BardSong(u8 taskId) str++; wordLen++; } + if (!task->tUseTemporaryLyrics) sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]); else @@ -574,27 +603,29 @@ static void Task_BardSong(u8 taskId) gBardSong.length = 1; task->tCurrWord++; - if (task->data[2] == 0) + if (task->tDelay == 0) { - task->tState = 3; - task->data[1] = 0; + task->tState = BARD_STATE_HANDLE_WORD; + task->tWordState = 0; } else { - task->tState = 5; - task->data[1] = 0; + task->tState = BARD_STATE_PAUSE; + task->tWordState = 0; } } break; - case 5: - if (task->data[2] == 0) - task->tState = 3; + case BARD_STATE_PAUSE: + // Wait before singing next word + if (task->tDelay == 0) + task->tState = BARD_STATE_HANDLE_WORD; else - task->data[2]--; + task->tDelay--; break; - case 3: + case BARD_STATE_HANDLE_WORD: if (gStringVar4[task->tCharIndex] == EOS) { + // End song FadeInBGM(6); m4aMPlayFadeOutTemporarily(&gMPlayInfo_SE2, 2); EnableBothScriptContexts(); @@ -602,55 +633,61 @@ static void Task_BardSong(u8 taskId) } else if (gStringVar4[task->tCharIndex] == CHAR_SPACE) { - + // Handle space EnableTextPrinters(); task->tCharIndex++; - task->tState = 2; - task->data[2] = 0; + task->tState = BARD_STATE_GET_WORD; + task->tDelay = 0; } else if (gStringVar4[task->tCharIndex] == CHAR_NEWLINE) { + // Handle newline task->tCharIndex++; - task->tState = 2; - task->data[2] = 0; + task->tState = BARD_STATE_GET_WORD; + task->tDelay = 0; } else if (gStringVar4[task->tCharIndex] == EXT_CTRL_CODE_BEGIN) { + // Handle ctrl code task->tCharIndex += 2; // skip over control codes - task->tState = 2; - task->data[2] = 8; + task->tState = BARD_STATE_GET_WORD; + task->tDelay = 8; } - else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR) + else if (gStringVar4[task->tCharIndex] == CHAR_BARD_WORD_DELIMIT) { - gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space + // Handle word boundary + gStringVar4[task->tCharIndex] = CHAR_SPACE; // Replace with a real space EnableTextPrinters(); task->tCharIndex++; - task->data[2] = 0; + task->tDelay = 0; } else { - switch (task->data[1]) + // Handle regular word + switch (task->tWordState) { case 0: EnableTextPrinters(); - task->data[1]++; + task->tWordState++; break; case 1: - task->data[1]++; + task->tWordState++; break; case 2: task->tCharIndex++; - task->data[1] = 0; - task->data[2] = gBardSong.length; - task->tState = 4; + task->tWordState = 0; + task->tDelay = gBardSong.length; + task->tState = BARD_STATE_WAIT_WORD; break; } } break; - case 4: - task->data[2]--; - if (task->data[2] == 0) - task->tState = 3; + case BARD_STATE_WAIT_WORD: + // Wait for word to finish being sung. + // BardSing will continue to play it. + task->tDelay--; + if (task->tDelay == 0) + task->tState = BARD_STATE_HANDLE_WORD; break; } RunTextPrintersAndIsPrinter0Active(); @@ -1107,6 +1144,9 @@ static const struct Story sStorytellerStories[] = { } }; +static const s32 sNumStories = ARRAY_COUNT(sStorytellerStories); +static const u32 sUnused = 8; + static void StorytellerSetup(void) { s32 i; @@ -1140,12 +1180,12 @@ static const struct Story *GetStoryByStat(u32 stat) { s32 i; - for (i = 0; i < (int)ARRAY_COUNT(sStorytellerStories); i++) + for (i = 0; i < sNumStories; i++) { if (sStorytellerStories[i].stat == stat) return &sStorytellerStories[i]; } - return &sStorytellerStories[ARRAY_COUNT(sStorytellerStories) - 1]; + return &sStorytellerStories[sNumStories - 1]; } static const u8 *GetStoryTitleByStat(u32 stat) @@ -1241,28 +1281,16 @@ static void ScrambleStatList(u8 * arr, s32 count) } } -struct UnknownStruct_0859F288 -{ - s32 length; - u32 unused2; -}; - -static const struct UnknownStruct_0859F288 sStorytellerStuff = { - ARRAY_COUNT(sStorytellerStories), - sizeof(sStorytellerStuff) -}; - static bool8 StorytellerInitializeRandomStat(void) { - u8 arr[sStorytellerStuff.length]; - s32 i; - s32 j; + u8 storyIds[sNumStories]; + s32 i, j; - ScrambleStatList(arr, ARRAY_COUNT(sStorytellerStories)); - for (i = 0; i < (s32)ARRAY_COUNT(sStorytellerStories); i++) + ScrambleStatList(storyIds, sNumStories); + for (i = 0; i < sNumStories; i++) { - u8 stat = sStorytellerStories[arr[i]].stat; - u8 minVal = sStorytellerStories[arr[i]].minVal; + u8 stat = sStorytellerStories[storyIds[i]].stat; + u8 minVal = sStorytellerStories[storyIds[i]].minVal; for (j = 0; j < NUM_STORYTELLER_TALES; j++) { From bc409baeff4ef2ec9ab774e0ecd1d0cca991eaaf Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 19 Oct 2021 16:30:00 -0400 Subject: [PATCH 082/417] Fix incorrect NUM_SECTORS_PER_SLOT define --- include/save.h | 4 +--- src/save.c | 53 +++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/include/save.h b/include/save.h index 4eaa724584..406e2e492e 100644 --- a/include/save.h +++ b/include/save.h @@ -34,8 +34,6 @@ struct SaveSectionOffsets #define SECTOR_FOOTER_SIZE 128 #define SECTOR_SIZE (SECTOR_DATA_SIZE + SECTOR_FOOTER_SIZE) -// Emerald changes this definition to be the sectors per slot. -#define NUM_SECTORS_PER_SLOT 16 #define NUM_SAVE_SLOTS 2 #define UNKNOWN_CHECK_VALUE 0x8012025 @@ -66,7 +64,7 @@ enum #define SECTOR_ID_SAVEBLOCK1_END 4 #define SECTOR_ID_PKMN_STORAGE_START 5 #define SECTOR_ID_PKMN_STORAGE_END 13 -#define SECTOR_SAVE_SLOT_LENGTH 14 +#define NUM_SECTORS_PER_SLOT 14 // Save Slot 1: 0-13; Save Slot 2: 14-27 #define SECTOR_ID_HOF_1 28 #define SECTOR_ID_HOF_2 29 diff --git a/src/save.c b/src/save.c index 40fce4e8a7..3c8f4360dc 100644 --- a/src/save.c +++ b/src/save.c @@ -81,7 +81,7 @@ u16 gUnknown_03006208; u16 gSaveUnusedVar; u16 gSaveFileStatus; void (*gGameContinueCallback)(void); -struct SaveSectionLocation gRamSaveSectionLocations[SECTOR_SAVE_SLOT_LENGTH]; +struct SaveSectionLocation gRamSaveSectionLocations[NUM_SECTORS_PER_SLOT]; u16 gSaveUnusedVar2; u16 gSaveAttemptStatus; @@ -92,10 +92,11 @@ void ClearSaveData(void) { u16 i; - for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) + // Clear the full save two sectors at a time + for (i = 0; i < SECTORS_COUNT / 2; i++) { EraseFlashSector(i); - EraseFlashSector(i + NUM_SECTORS_PER_SLOT); // clear slot 2. + EraseFlashSector(i + SECTORS_COUNT / 2); } } @@ -143,11 +144,11 @@ static u8 SaveWriteToFlash(u16 sectorId, const struct SaveSectionLocation *locat gLastKnownGoodSector = gLastWrittenSector; // backup the current written sector before attempting to write. gLastSaveCounter = gSaveCounter; gLastWrittenSector++; - gLastWrittenSector = gLastWrittenSector % SECTOR_SAVE_SLOT_LENGTH; // array count save sector locations + gLastWrittenSector = gLastWrittenSector % NUM_SECTORS_PER_SLOT; // array count save sector locations gSaveCounter++; status = SAVE_STATUS_OK; - for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++) + for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) HandleWriteSector(i, location); if (gDamagedSaveSectors != 0) // skip the damaged sector. @@ -169,8 +170,8 @@ static u8 HandleWriteSector(u16 sectorId, const struct SaveSectionLocation *loca u16 size; sector = sectorId + gLastWrittenSector; - sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); + sector %= NUM_SECTORS_PER_SLOT; + sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); data = location[sectorId].data; size = location[sectorId].size; @@ -227,7 +228,7 @@ static u32 RestoreSaveBackupVarsAndIncrement(const struct SaveSectionLocation *l gLastKnownGoodSector = gLastWrittenSector; gLastSaveCounter = gSaveCounter; gLastWrittenSector++; - gLastWrittenSector %= SECTOR_SAVE_SLOT_LENGTH; + gLastWrittenSector %= NUM_SECTORS_PER_SLOT; gSaveCounter++; gUnknown_03006208 = 0; gDamagedSaveSectors = 0; @@ -292,8 +293,8 @@ static u8 ClearSaveData_2(u16 sectorId, const struct SaveSectionLocation *locati u8 status; sector = sectorId + gLastWrittenSector; - sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); + sector %= NUM_SECTORS_PER_SLOT; + sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); data = location[sectorId].data; size = location[sectorId].size; @@ -362,8 +363,8 @@ static u8 sav12_xor_get(u16 sectorId, const struct SaveSectionLocation *location u16 sector; sector = sectorId + gLastWrittenSector; // no sub 1? - sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); + sector %= NUM_SECTORS_PER_SLOT; + sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25)) { @@ -385,8 +386,8 @@ static u8 sub_8152CAC(u16 sectorId, const struct SaveSectionLocation *location) u16 sector; sector = sectorId + gLastWrittenSector - 1; - sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); + sector %= NUM_SECTORS_PER_SLOT; + sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), ((u8 *)gFastSaveSection)[sizeof(struct UnkSaveSection)])) { @@ -408,8 +409,8 @@ static u8 sub_8152D44(u16 sectorId, const struct SaveSectionLocation *location) u16 sector; sector = sectorId + gLastWrittenSector - 1; // no sub 1? - sector %= SECTOR_SAVE_SLOT_LENGTH; - sector += SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); + sector %= NUM_SECTORS_PER_SLOT; + sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25)) { @@ -447,10 +448,10 @@ static u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location) { u16 i; u16 checksum; - u16 slotOffset = SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); + u16 slotOffset = NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); u16 id; - for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++) + for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) { DoReadFlashWholeSection(i + slotOffset, gFastSaveSection); id = gFastSaveSection->id; @@ -481,7 +482,7 @@ static u8 GetSaveValidStatus(const struct SaveSectionLocation *location) u8 saveSlot2Status; // check save slot 1. - for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++) + for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) { DoReadFlashWholeSection(i, gFastSaveSection); if (gFastSaveSection->security == UNKNOWN_CHECK_VALUE) @@ -512,9 +513,9 @@ static u8 GetSaveValidStatus(const struct SaveSectionLocation *location) securityPassed = FALSE; // check save slot 2. - for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++) + for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) { - DoReadFlashWholeSection(i + SECTOR_SAVE_SLOT_LENGTH, gFastSaveSection); + DoReadFlashWholeSection(i + NUM_SECTORS_PER_SLOT, gFastSaveSection); if (gFastSaveSection->security == UNKNOWN_CHECK_VALUE) { securityPassed = TRUE; @@ -739,7 +740,7 @@ bool8 sub_8153380(void) // trade.c bool8 sub_81533AC(void) // trade.c { - u8 status = sub_81529D4(SECTOR_SAVE_SLOT_LENGTH, gRamSaveSectionLocations); + u8 status = sub_81529D4(NUM_SECTORS_PER_SLOT, gRamSaveSectionLocations); if (gDamagedSaveSectors) DoSaveFailedScreen(SAVE_NORMAL); if (status == SAVE_STATUS_ERROR) @@ -750,7 +751,7 @@ bool8 sub_81533AC(void) // trade.c bool8 sub_81533E0(void) // trade.c { - sub_8152A34(SECTOR_SAVE_SLOT_LENGTH, gRamSaveSectionLocations); + sub_8152A34(NUM_SECTORS_PER_SLOT, gRamSaveSectionLocations); if (gDamagedSaveSectors) DoSaveFailedScreen(SAVE_NORMAL); return FALSE; @@ -758,7 +759,7 @@ bool8 sub_81533E0(void) // trade.c bool8 sub_8153408(void) // trade.c { - sub_8152CAC(SECTOR_SAVE_SLOT_LENGTH, gRamSaveSectionLocations); + sub_8152CAC(NUM_SECTORS_PER_SLOT, gRamSaveSectionLocations); if (gDamagedSaveSectors) DoSaveFailedScreen(SAVE_NORMAL); return FALSE; @@ -835,8 +836,8 @@ u16 GetSaveBlocksPointersBaseOffset(void) return 0; UpdateSaveAddresses(); GetSaveValidStatus(gRamSaveSectionLocations); - slotOffset = SECTOR_SAVE_SLOT_LENGTH * (gSaveCounter % NUM_SAVE_SLOTS); - for (i = 0; i < SECTOR_SAVE_SLOT_LENGTH; i++) + slotOffset = NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); + for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) { DoReadFlashWholeSection(i + slotOffset, gFastSaveSection); From 303ce856ad307c9035a336ce7232a0c4decc4b98 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 21 Oct 2021 16:54:16 -0400 Subject: [PATCH 083/417] Fix GET_CARD_BATTLE_LOST typo --- include/constants/mystery_gift.h | 2 +- src/field_specials.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/constants/mystery_gift.h b/include/constants/mystery_gift.h index 07690e37c4..8ff71c3aa1 100644 --- a/include/constants/mystery_gift.h +++ b/include/constants/mystery_gift.h @@ -4,7 +4,7 @@ #define GET_NUM_STAMPS 0 #define GET_MAX_STAMPS 1 #define GET_CARD_BATTLES_WON 2 -#define GET_CARD_BATTLE_LOST 3 +#define GET_CARD_BATTLES_LOST 3 #define GET_CARD_NUM_TRADES 4 #define CARD_STAT_BATTLES_WON 0 diff --git a/src/field_specials.c b/src/field_specials.c index 2789411a53..ff02272be0 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1661,7 +1661,7 @@ u16 GetMysteryGiftCardStat(void) return MysteryGift_GetCardStat(CARD_STAT_MAX_STAMPS); case GET_CARD_BATTLES_WON: return MysteryGift_GetCardStat(CARD_STAT_BATTLES_WON); - case GET_CARD_BATTLE_LOST: // Never occurs + case GET_CARD_BATTLES_LOST: // Never occurs return MysteryGift_GetCardStat(CARD_STAT_BATTLES_LOST); case GET_CARD_NUM_TRADES: // Never occurs return MysteryGift_GetCardStat(CARD_STAT_NUM_TRADES); From 6067aa65b4d16649785f39fc2e8ff253abb34327 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 21 Oct 2021 22:15:08 -0400 Subject: [PATCH 084/417] Fix shadw typo --- src/mystery_gift_view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mystery_gift_view.c b/src/mystery_gift_view.c index 444ca8bd0e..0e1c11520a 100644 --- a/src/mystery_gift_view.c +++ b/src/mystery_gift_view.c @@ -57,7 +57,7 @@ struct WonderCardData /*0175*/ u8 statFooterWidth; /*0176*/ u16 windowIds[CARD_WIN_COUNT]; /*017C*/ u8 monIconSpriteId; - /*017D*/ u8 stampSpriteIds[MAX_STAMP_CARD_STAMPS][2]; // 2 sprites each, 1 for the shadw and 1 for the Pokémon + /*017D*/ u8 stampSpriteIds[MAX_STAMP_CARD_STAMPS][2]; // 2 sprites each, 1 for the shadow and 1 for the Pokémon /*018B*/ u8 titleText[WONDER_CARD_TEXT_LENGTH + 1]; /*01B4*/ u8 subtitleText[WONDER_CARD_TEXT_LENGTH + 1]; /*01DD*/ u8 idNumberText[7]; From eb860a368e974860db6b3e56b57e2eff186e4470 Mon Sep 17 00:00:00 2001 From: Jademalo <386846+Jademalo@users.noreply.github.com> Date: Fri, 22 Oct 2021 04:30:33 +0100 Subject: [PATCH 085/417] Improve IDE support --- berry_fix/payload/include/global.h | 4 ++-- include/global.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/berry_fix/payload/include/global.h b/berry_fix/payload/include/global.h index c218b5f4e8..46828630d7 100644 --- a/berry_fix/payload/include/global.h +++ b/berry_fix/payload/include/global.h @@ -6,7 +6,7 @@ // global.h from pokemon ruby // IDE support -#if defined(__APPLE__) || defined(__CYGWIN__) +#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) #define _(x) x #define __(x) x #define INCBIN(x) {0} @@ -16,7 +16,7 @@ #define INCBIN_S8 INCBIN #define INCBIN_S16 INCBIN #define INCBIN_S32 INCBIN -#endif +#endif // IDE support // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); diff --git a/include/global.h b/include/global.h index d14aa60f43..bcd037cb28 100644 --- a/include/global.h +++ b/include/global.h @@ -20,11 +20,9 @@ #define NAKED __attribute__((naked)) // IDE support -#if defined (__APPLE__) || defined (__CYGWIN__) || defined (_MSC_VER) +#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) #define _(x) x #define __(x) x - -// Fool CLion IDE #define INCBIN(x) {0} #define INCBIN_U8 INCBIN #define INCBIN_U16 INCBIN From 62436d9f67224e9df691c89222884146bd24263d Mon Sep 17 00:00:00 2001 From: Jademalo <386846+Jademalo@users.noreply.github.com> Date: Sat, 23 Oct 2021 10:10:00 +0100 Subject: [PATCH 086/417] IDE support formatting and consistency --- berry_fix/payload/include/global.h | 21 +++++++++++---------- include/global.h | 23 ++++++++++++----------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/berry_fix/payload/include/global.h b/berry_fix/payload/include/global.h index 46828630d7..4bea138d67 100644 --- a/berry_fix/payload/include/global.h +++ b/berry_fix/payload/include/global.h @@ -6,16 +6,17 @@ // global.h from pokemon ruby // IDE support -#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) -#define _(x) x -#define __(x) x -#define INCBIN(x) {0} -#define INCBIN_U8 INCBIN -#define INCBIN_U16 INCBIN -#define INCBIN_U32 INCBIN -#define INCBIN_S8 INCBIN -#define INCBIN_S16 INCBIN -#define INCBIN_S32 INCBIN +#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__) +// We define these when using certain IDEs to fool preproc +#define _(x) (x) +#define __(x) (x) +#define INCBIN(...) {0} +#define INCBIN_U8 INCBIN +#define INCBIN_U16 INCBIN +#define INCBIN_U32 INCBIN +#define INCBIN_S8 INCBIN +#define INCBIN_S16 INCBIN +#define INCBIN_S32 INCBIN #endif // IDE support // Prevent cross-jump optimization. diff --git a/include/global.h b/include/global.h index bcd037cb28..a919edddf5 100644 --- a/include/global.h +++ b/include/global.h @@ -19,17 +19,18 @@ #define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided") #define NAKED __attribute__((naked)) -// IDE support -#if defined (__APPLE__) || defined (__CYGWIN__) || defined (__INTELLISENSE__) -#define _(x) x -#define __(x) x -#define INCBIN(x) {0} -#define INCBIN_U8 INCBIN -#define INCBIN_U16 INCBIN -#define INCBIN_U32 INCBIN -#define INCBIN_S8 INCBIN -#define INCBIN_S16 INCBIN -#define INCBIN_S32 INCBIN +/// IDE support +#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__) +// We define these when using certain IDEs to fool preproc +#define _(x) (x) +#define __(x) (x) +#define INCBIN(...) {0} +#define INCBIN_U8 INCBIN +#define INCBIN_U16 INCBIN +#define INCBIN_U32 INCBIN +#define INCBIN_S8 INCBIN +#define INCBIN_S16 INCBIN +#define INCBIN_S32 INCBIN #endif // IDE support #define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0])) From f182e9b9fd908d95a6b478435c07e53acbf8e7cc Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 23 Oct 2021 11:17:23 -0300 Subject: [PATCH 087/417] Added .sym files to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9286b03c46..fd16840c67 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ porymap.project.cfg .fuse_hidden* *.sna *.diff +*.sym From 7f3c52993573b3cc1c8d1013c68d9b57c3146bd7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 23 Oct 2021 10:55:46 -0400 Subject: [PATCH 088/417] Document record mixing mail swap --- .../BattleFrontier_RankingHall/scripts.inc | 20 +- include/constants/battle_frontier.h | 47 +- include/constants/global.h | 14 +- include/daycare.h | 9 +- include/global.h | 94 +-- include/mail.h | 10 +- include/record_mixing.h | 4 +- include/trade.h | 6 +- src/battle_tower.c | 2 +- src/data/trade.h | 2 +- src/daycare.c | 20 +- src/dewford_trend.c | 2 - src/egg_hatch.c | 4 +- src/field_screen_effect.c | 2 - src/field_specials.c | 60 +- src/frontier_util.c | 68 +- src/item_use.c | 2 +- src/load_save.c | 2 +- src/mail.c | 4 +- src/mail_data.c | 22 +- src/match_call.c | 14 +- src/mystery_event_script.c | 6 +- src/new_game.c | 2 +- src/party_menu.c | 8 +- src/player_pc.c | 6 +- src/record_mixing.c | 737 +++++++++--------- src/trade.c | 22 +- src/union_room.c | 6 +- 28 files changed, 610 insertions(+), 585 deletions(-) diff --git a/data/maps/BattleFrontier_RankingHall/scripts.inc b/data/maps/BattleFrontier_RankingHall/scripts.inc index 20b2b21c1e..a6c62cf862 100644 --- a/data/maps/BattleFrontier_RankingHall/scripts.inc +++ b/data/maps/BattleFrontier_RankingHall/scripts.inc @@ -3,61 +3,61 @@ BattleFrontier_RankingHall_MapScripts:: BattleFrontier_RankingHall_EventScript_TowerSinglesRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_TOWER_SINGLES + setvar VAR_0x8005, RANKING_HALL_TOWER_SINGLES goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_TowerDoublesRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_TOWER_DOUBLES + setvar VAR_0x8005, RANKING_HALL_TOWER_DOUBLES goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_TowerMultisRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_TOWER_MULTIS + setvar VAR_0x8005, RANKING_HALL_TOWER_MULTIS goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_TowerLinkRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_TOWER_LINK + setvar VAR_0x8005, RANKING_HALL_TOWER_LINK goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_ArenaRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_ARENA + setvar VAR_0x8005, RANKING_HALL_ARENA goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_PalaceRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_PALACE + setvar VAR_0x8005, RANKING_HALL_PALACE goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_FactoryRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_FACTORY + setvar VAR_0x8005, RANKING_HALL_FACTORY goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_DomeRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_DOME + setvar VAR_0x8005, RANKING_HALL_DOME goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_PikeRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_PIKE + setvar VAR_0x8005, RANKING_HALL_PIKE goto BattleFrontier_RankingHall_EventScript_ShowRecords end BattleFrontier_RankingHall_EventScript_PyramidRecords:: lockall - setvar VAR_0x8005, RANKING_HALL_BATTLE_PYRAMID + setvar VAR_0x8005, RANKING_HALL_PYRAMID goto BattleFrontier_RankingHall_EventScript_ShowRecords end diff --git a/include/constants/battle_frontier.h b/include/constants/battle_frontier.h index 68c5a42ef3..b6d15e6b26 100644 --- a/include/constants/battle_frontier.h +++ b/include/constants/battle_frontier.h @@ -17,11 +17,6 @@ #define FACILITY_UNION_ROOM 8 #define FACILITY_MULTI_OR_EREADER 9 // Direct Corner multi battles, multi battle with Steven, and e-Reader battles -// Battle Frontier lvl modes. -#define FRONTIER_LVL_50 0 -#define FRONTIER_LVL_OPEN 1 -#define FRONTIER_LVL_TENT 2 - // Battle Frontier battle modes. #define FRONTIER_MODE_SINGLES 0 #define FRONTIER_MODE_DOUBLES 1 @@ -53,28 +48,28 @@ // These sets of facility ids would be redundant if the order was consistent // The order is important for this set so that all the non-link records can be continuous -#define RANKING_HALL_BATTLE_TOWER_SINGLES 0 -#define RANKING_HALL_BATTLE_TOWER_DOUBLES 1 -#define RANKING_HALL_BATTLE_TOWER_MULTIS 2 -#define RANKING_HALL_BATTLE_DOME 3 -#define RANKING_HALL_BATTLE_PALACE 4 -#define RANKING_HALL_BATTLE_ARENA 5 -#define RANKING_HALL_BATTLE_FACTORY 6 -#define RANKING_HALL_BATTLE_PIKE 7 -#define RANKING_HALL_BATTLE_PYRAMID 8 -#define RANKING_HALL_BATTLE_TOWER_LINK 9 +#define RANKING_HALL_TOWER_SINGLES 0 +#define RANKING_HALL_TOWER_DOUBLES 1 +#define RANKING_HALL_TOWER_MULTIS 2 +#define RANKING_HALL_DOME 3 +#define RANKING_HALL_PALACE 4 +#define RANKING_HALL_ARENA 5 +#define RANKING_HALL_FACTORY 6 +#define RANKING_HALL_PIKE 7 +#define RANKING_HALL_PYRAMID 8 +#define RANKING_HALL_TOWER_LINK 9 -#define FRONTIER_MANIAC_BATTLE_TOWER_SINGLES 0 -#define FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES 1 -#define FRONTIER_MANIAC_BATTLE_TOWER_MULTIS 2 -#define FRONTIER_MANIAC_BATTLE_TOWER_LINK 3 -#define FRONTIER_MANIAC_BATTLE_DOME 4 -#define FRONTIER_MANIAC_BATTLE_FACTORY 5 -#define FRONTIER_MANIAC_BATTLE_PALACE 6 -#define FRONTIER_MANIAC_BATTLE_ARENA 7 -#define FRONTIER_MANIAC_BATTLE_PIKE 8 -#define FRONTIER_MANIAC_BATTLE_PYRAMID 9 -#define FRONTIER_MANIAC_FACILITY_COUNT 10 +#define FRONTIER_MANIAC_TOWER_SINGLES 0 +#define FRONTIER_MANIAC_TOWER_DOUBLES 1 +#define FRONTIER_MANIAC_TOWER_MULTIS 2 +#define FRONTIER_MANIAC_TOWER_LINK 3 +#define FRONTIER_MANIAC_DOME 4 +#define FRONTIER_MANIAC_FACTORY 5 +#define FRONTIER_MANIAC_PALACE 6 +#define FRONTIER_MANIAC_ARENA 7 +#define FRONTIER_MANIAC_PIKE 8 +#define FRONTIER_MANIAC_PYRAMID 9 +#define FRONTIER_MANIAC_FACILITY_COUNT 10 #define FRONTIER_MANIAC_MESSAGE_COUNT 3 diff --git a/include/constants/global.h b/include/constants/global.h index 1cece79753..46518697cc 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -53,9 +53,19 @@ #define UNION_ROOM_KB_ROW_COUNT 10 #define GIFT_RIBBONS_COUNT 11 #define SAVED_TRENDS_COUNT 5 - #define PYRAMID_BAG_ITEMS_COUNT 10 -#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode. + +// Number of facilities for Ranking Hall. +// 7 facilities for single mode + tower double mode + tower multi mode. +// Excludes link modes. See RANKING_HALL_* in include/constants/battle_frontier.h +#define HALL_FACILITIES_COUNT 9 +#define HALL_RECORDS_COUNT 3 + +// Battle Frontier level modes. +#define FRONTIER_LVL_50 0 +#define FRONTIER_LVL_OPEN 1 +#define FRONTIER_LVL_MODE_COUNT 2 +#define FRONTIER_LVL_TENT FRONTIER_LVL_MODE_COUNT // Special usage for indicating Battle Tent #define TRAINER_ID_LENGTH 4 #define MAX_MON_MOVES 4 diff --git a/include/daycare.h b/include/daycare.h index d6c0d42017..62a7918ff3 100644 --- a/include/daycare.h +++ b/include/daycare.h @@ -3,10 +3,17 @@ #include "constants/daycare.h" +struct RecordMixingDaycareMail +{ + struct DaycareMail mail[DAYCARE_MON_COUNT]; + u32 numDaycareMons; + bool16 cantHoldItem[DAYCARE_MON_COUNT]; +}; + u8 *GetMonNickname2(struct Pokemon *mon, u8 *dest); u8 *GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest); u8 CountPokemonInDaycare(struct DayCare *daycare); -void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDaycareMail *daycareMail); +void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDaycareMail *mixMail); void StoreSelectedPokemonInDaycare(void); u16 TakePokemonFromDaycare(void); void GetDaycareCost(void); diff --git a/include/global.h b/include/global.h index d14aa60f43..87c1d3d45a 100644 --- a/include/global.h +++ b/include/global.h @@ -208,11 +208,10 @@ struct BerryPickingResults u8 field_F; }; -// two arrays for lvl50 and open level struct PyramidBag { - u16 itemId[2][PYRAMID_BAG_ITEMS_COUNT]; - u8 quantity[2][PYRAMID_BAG_ITEMS_COUNT]; + u16 itemId[FRONTIER_LVL_MODE_COUNT][PYRAMID_BAG_ITEMS_COUNT]; + u8 quantity[FRONTIER_LVL_MODE_COUNT][PYRAMID_BAG_ITEMS_COUNT]; }; struct BerryCrush @@ -353,8 +352,8 @@ struct BattleFrontier /*0xCB2*/ u16 curChallengeBattleNum; // Battle number / room number (Pike) / floor number (Pyramid) /*0xCB4*/ u16 trainerIds[20]; /*0xCDC*/ u32 winStreakActiveFlags; - /*0xCE0*/ u16 towerWinStreaks[4][2]; - /*0xCF0*/ u16 towerRecordWinStreaks[4][2]; + /*0xCE0*/ u16 towerWinStreaks[4][FRONTIER_LVL_MODE_COUNT]; + /*0xCF0*/ u16 towerRecordWinStreaks[4][FRONTIER_LVL_MODE_COUNT]; /*0xD00*/ u16 battledBrainFlags; /*0xD02*/ u16 towerSinglesStreak; // Never read /*0xD04*/ u16 towerNumWins; // Increments to MAX_STREAK but never read otherwise @@ -371,33 +370,33 @@ struct BattleFrontier /*0xD09*/ u8 domeUnused; /*0xD0A*/ u8 domeLvlMode; /*0xD0B*/ u8 domeBattleMode; - /*0xD0C*/ u16 domeWinStreaks[2][2]; - /*0xD14*/ u16 domeRecordWinStreaks[2][2]; - /*0xD1C*/ u16 domeTotalChampionships[2][2]; + /*0xD0C*/ u16 domeWinStreaks[2][FRONTIER_LVL_MODE_COUNT]; + /*0xD14*/ u16 domeRecordWinStreaks[2][FRONTIER_LVL_MODE_COUNT]; + /*0xD1C*/ u16 domeTotalChampionships[2][FRONTIER_LVL_MODE_COUNT]; /*0xD24*/ struct BattleDomeTrainer domeTrainers[DOME_TOURNAMENT_TRAINERS_COUNT]; /*0xD64*/ u16 domeMonIds[DOME_TOURNAMENT_TRAINERS_COUNT][FRONTIER_PARTY_SIZE]; /*0xDC4*/ u16 unused_DC4; /*0xDC6*/ u16 palacePrize; - /*0xDC8*/ u16 palaceWinStreaks[2][2]; - /*0xDD0*/ u16 palaceRecordWinStreaks[2][2]; + /*0xDC8*/ u16 palaceWinStreaks[2][FRONTIER_LVL_MODE_COUNT]; + /*0xDD0*/ u16 palaceRecordWinStreaks[2][FRONTIER_LVL_MODE_COUNT]; /*0xDD8*/ u16 arenaPrize; - /*0xDDA*/ u16 arenaWinStreaks[2]; - /*0xDDE*/ u16 arenaRecordStreaks[2]; - /*0xDE2*/ u16 factoryWinStreaks[2][2]; - /*0xDEA*/ u16 factoryRecordWinStreaks[2][2]; - /*0xDF6*/ u16 factoryRentsCount[2][2]; - /*0xDFA*/ u16 factoryRecordRentsCount[2][2]; + /*0xDDA*/ u16 arenaWinStreaks[FRONTIER_LVL_MODE_COUNT]; + /*0xDDE*/ u16 arenaRecordStreaks[FRONTIER_LVL_MODE_COUNT]; + /*0xDE2*/ u16 factoryWinStreaks[2][FRONTIER_LVL_MODE_COUNT]; + /*0xDEA*/ u16 factoryRecordWinStreaks[2][FRONTIER_LVL_MODE_COUNT]; + /*0xDF6*/ u16 factoryRentsCount[2][FRONTIER_LVL_MODE_COUNT]; + /*0xDFA*/ u16 factoryRecordRentsCount[2][FRONTIER_LVL_MODE_COUNT]; /*0xE02*/ u16 pikePrize; - /*0xE04*/ u16 pikeWinStreaks[2]; - /*0xE08*/ u16 pikeRecordStreaks[2]; - /*0xE0C*/ u16 pikeTotalStreaks[2]; + /*0xE04*/ u16 pikeWinStreaks[FRONTIER_LVL_MODE_COUNT]; + /*0xE08*/ u16 pikeRecordStreaks[FRONTIER_LVL_MODE_COUNT]; + /*0xE0C*/ u16 pikeTotalStreaks[FRONTIER_LVL_MODE_COUNT]; /*0xE10*/ u8 pikeHintedRoomIndex:3; /*0xE10*/ u8 pikeHintedRoomType:4; /*0xE10*/ u8 pikeHealingRoomsDisabled:1; /*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE]; /*0xE18*/ u16 pyramidPrize; - /*0xE1A*/ u16 pyramidWinStreaks[2]; - /*0xE1E*/ u16 pyramidRecordStreaks[2]; + /*0xE1A*/ u16 pyramidWinStreaks[FRONTIER_LVL_MODE_COUNT]; + /*0xE1E*/ u16 pyramidRecordStreaks[FRONTIER_LVL_MODE_COUNT]; /*0xE22*/ u16 pyramidRandoms[4]; /*0xE2A*/ u8 pyramidTrainerFlags; /*0xE2C*/ struct PyramidBag pyramidBag; @@ -411,8 +410,8 @@ struct BattleFrontier /*0xEBC*/ u32 battlesCount; /*0xEC0*/ u16 domeWinningMoves[DOME_TOURNAMENT_TRAINERS_COUNT]; /*0xEE0*/ u8 trainerFlags; - /*0xEE1*/ u8 opponentNames[2][PLAYER_NAME_LENGTH + 1]; - /*0xEF1*/ u8 opponentTrainerIds[2][TRAINER_ID_LENGTH]; + /*0xEE1*/ u8 opponentNames[FRONTIER_LVL_MODE_COUNT][PLAYER_NAME_LENGTH + 1]; + /*0xEF1*/ u8 opponentTrainerIds[FRONTIER_LVL_MODE_COUNT][TRAINER_ID_LENGTH]; /*0xEF9*/ u8 unk_EF9:7; // Never read /*0xEF9*/ u8 savedGame:1; /*0xEFA*/ u8 unused_EFA; @@ -488,8 +487,8 @@ struct SaveBlock2 /*0x1EC*/ struct BerryCrush berryCrush; /*0x1FC*/ struct PokemonJumpRecords pokeJump; /*0x20C*/ struct BerryPickingResults berryPick; - /*0x21C*/ struct RankingHall1P hallRecords1P[HALL_FACILITIES_COUNT][2][3]; // From record mixing. - /*0x57C*/ struct RankingHall2P hallRecords2P[2][3]; // From record mixing. + /*0x21C*/ struct RankingHall1P hallRecords1P[HALL_FACILITIES_COUNT][FRONTIER_LVL_MODE_COUNT][HALL_RECORDS_COUNT]; // From record mixing. + /*0x57C*/ struct RankingHall2P hallRecords2P[FRONTIER_LVL_MODE_COUNT][HALL_RECORDS_COUNT]; // From record mixing. /*0x624*/ u16 contestLinkResults[CONTEST_CATEGORIES_COUNT][CONTESTANT_COUNT]; /*0x64C*/ struct BattleFrontier frontier; }; // sizeof=0xF2C @@ -597,15 +596,6 @@ struct DewfordTrend u16 words[2]; }; /*size = 0x8*/ -struct MailStruct -{ - /*0x00*/ u16 words[MAIL_WORDS_COUNT]; - /*0x12*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; - /*0x1A*/ u8 trainerId[TRAINER_ID_LENGTH]; - /*0x1E*/ u16 species; - /*0x20*/ u16 itemId; -}; - struct MauvilleManCommon { u8 id; @@ -671,20 +661,6 @@ typedef union OldMan u8 filler[0x40]; } OldMan; -struct RecordMixing_UnknownStructSub -{ - u32 unk0; - u8 data[0x34]; - //u8 data[0x38]; -}; - -struct RecordMixing_UnknownStruct -{ - struct RecordMixing_UnknownStructSub data[2]; - u32 unk70; - u16 unk74[0x2]; -}; - #define LINK_B_RECORDS_COUNT 5 struct LinkBattleRecord @@ -727,10 +703,19 @@ struct ContestWinner u8 contestRank; }; +struct Mail +{ + /*0x00*/ u16 words[MAIL_WORDS_COUNT]; + /*0x12*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; + /*0x1A*/ u8 trainerId[TRAINER_ID_LENGTH]; + /*0x1E*/ u16 species; + /*0x20*/ u16 itemId; +}; + struct DaycareMail { - struct MailStruct message; - u8 OT_name[PLAYER_NAME_LENGTH + 1]; + struct Mail message; + u8 otName[PLAYER_NAME_LENGTH + 1]; u8 monName[POKEMON_NAME_LENGTH + 1]; u8 gameLanguage:4; u8 monLanguage:4; @@ -750,13 +735,6 @@ struct DayCare u8 stepCounter; }; -struct RecordMixingDaycareMail -{ - struct DaycareMail mail[DAYCARE_MON_COUNT]; - u32 numDaycareMons; - bool16 holdsItem[DAYCARE_MON_COUNT]; -}; - struct LilycoveLadyQuiz { /*0x000*/ u8 id; @@ -1019,7 +997,7 @@ struct SaveBlock1 /*0x2BBC*/ u16 easyChatBattleStart[EASY_CHAT_BATTLE_WORDS_COUNT]; /*0x2BC8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT]; /*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT]; - /*0x2BE0*/ struct MailStruct mail[MAIL_COUNT]; + /*0x2BE0*/ struct Mail mail[MAIL_COUNT]; /*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system /*0x2E28*/ OldMan oldMan; /*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT]; diff --git a/include/mail.h b/include/mail.h index 0425866539..8236811cbd 100644 --- a/include/mail.h +++ b/include/mail.h @@ -15,16 +15,16 @@ || itemId == ITEM_RETRO_MAIL)) // mail.h -void ReadMail(struct MailStruct *mail, void (*callback)(void), bool8 flag); +void ReadMail(struct Mail *mail, void (*callback)(void), bool8 flag); // mail_data.h -void ClearMailData(void); -void ClearMailStruct(struct MailStruct *mail); +void ClearAllMail(void); +void ClearMail(struct Mail *mail); bool8 MonHasMail(struct Pokemon *mon); -u8 GiveMailToMon(struct Pokemon *mon, u16 itemId); +u8 GiveMailToMonByItemId(struct Pokemon *mon, u16 itemId); u16 SpeciesToMailSpecies(u16 species, u32 personality); u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer); -u8 GiveMailToMon2(struct Pokemon *mon, struct MailStruct *mail); +u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail); void TakeMailFromMon(struct Pokemon *mon); void ClearMailItemId(u8 mailId); u8 TakeMailFromMon2(struct Pokemon *mon); diff --git a/include/record_mixing.h b/include/record_mixing.h index 4cd231e8a5..fec4952b8e 100644 --- a/include/record_mixing.h +++ b/include/record_mixing.h @@ -3,8 +3,8 @@ struct PlayerHallRecords { - struct RankingHall1P onePlayer[9][2]; - struct RankingHall2P twoPlayers[2]; + struct RankingHall1P onePlayer[HALL_FACILITIES_COUNT][FRONTIER_LVL_MODE_COUNT]; + struct RankingHall2P twoPlayers[FRONTIER_LVL_MODE_COUNT]; }; void RecordMixingPlayerSpotTriggered(void); diff --git a/include/trade.h b/include/trade.h index 05a905ab31..a0cb320a88 100644 --- a/include/trade.h +++ b/include/trade.h @@ -4,13 +4,9 @@ #include "link_rfu.h" #include "constants/trade.h" -// Exported type declarations - -// Exported RAM declarations -extern struct MailStruct gTradeMail[PARTY_SIZE]; +extern struct Mail gTradeMail[PARTY_SIZE]; extern u8 gSelectedTradeMonPositions[2]; -// Exported ROM declarations extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate; s32 GetGameProgressForLinkTrade(void); diff --git a/src/battle_tower.c b/src/battle_tower.c index e3712def29..b2f81cc1ac 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1830,7 +1830,7 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId) { u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; // Unused variable. u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); - u8 challengeNum = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][0] / 7; + u8 challengeNum = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][FRONTIER_LVL_50] / 7; if (gSaveBlock2Ptr->frontier.curChallengeBattleNum < 6) fixedIV = GetFactoryMonFixedIV(challengeNum, 0); else diff --git a/src/data/trade.h b/src/data/trade.h index 7088633a80..b260727636 100644 --- a/src/data/trade.h +++ b/src/data/trade.h @@ -19,7 +19,7 @@ static const u32 sUnusedStructSizes[] = sizeof(struct SaveBlock1), sizeof(struct MapHeader), // 0x00000530, in RS - sizeof(struct MailStruct), //or ObjectEvent / ObjectEventGraphicsInfo + sizeof(struct Mail), //or ObjectEvent / ObjectEventGraphicsInfo sizeof(struct Pokemon), //or TrainerCard 0x00000528 // 0x000004D8, in RS }; diff --git a/src/daycare.c b/src/daycare.c index 8dd7515319..8105c2e9ce 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -25,7 +25,6 @@ extern const struct Evolution gEvolutionTable[][EVOS_PER_MON]; -// this file's functions static void ClearDaycareMonMail(struct DaycareMail *mail); static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *daycare); static u8 GetDaycareCompatibilityScore(struct DayCare *daycare); @@ -122,7 +121,7 @@ u8 CountPokemonInDaycare(struct DayCare *daycare) return count; } -void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDaycareMail *daycareMail) +void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDaycareMail *mixMail) { u8 i; u8 numDaycareMons = 0; @@ -133,17 +132,18 @@ void InitDaycareMailRecordMixing(struct DayCare *daycare, struct RecordMixingDay { numDaycareMons++; if (GetBoxMonData(&daycare->mons[i].mon, MON_DATA_HELD_ITEM) == ITEM_NONE) - daycareMail->holdsItem[i] = FALSE; + mixMail->cantHoldItem[i] = FALSE; else - daycareMail->holdsItem[i] = TRUE; + mixMail->cantHoldItem[i] = TRUE; } else { - daycareMail->holdsItem[i] = TRUE; + // Daycare slot empty + mixMail->cantHoldItem[i] = TRUE; } } - daycareMail->numDaycareMons = numDaycareMons; + mixMail->numDaycareMons = numDaycareMons; } static s8 Daycare_FindEmptySpot(struct DayCare *daycare) @@ -165,7 +165,7 @@ static void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycar { u8 mailId; - StringCopy(daycareMon->mail.OT_name, gSaveBlock2Ptr->playerName); + StringCopy(daycareMon->mail.otName, gSaveBlock2Ptr->playerName); GetMonNickname2(mon, daycareMon->mail.monName); StripExtCtrlCodes(daycareMon->mail.monName); daycareMon->mail.gameLanguage = GAME_LANGUAGE; @@ -262,7 +262,7 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon) gPlayerParty[PARTY_SIZE - 1] = pokemon; if (daycareMon->mail.message.itemId) { - GiveMailToMon2(&gPlayerParty[PARTY_SIZE - 1], &daycareMon->mail.message); + GiveMailToMon(&gPlayerParty[PARTY_SIZE - 1], &daycareMon->mail.message); ClearDaycareMonMail(&daycareMon->mail); } @@ -352,11 +352,11 @@ static void ClearDaycareMonMail(struct DaycareMail *mail) s32 i; for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++) - mail->OT_name[i] = 0; + mail->otName[i] = 0; for (i = 0; i < POKEMON_NAME_LENGTH + 1; i++) mail->monName[i] = 0; - ClearMailStruct(&mail->message); + ClearMail(&mail->message); } static void ClearDaycareMon(struct DaycareMon *daycareMon) diff --git a/src/dewford_trend.c b/src/dewford_trend.c index d193ef1f5b..bba2085e8b 100644 --- a/src/dewford_trend.c +++ b/src/dewford_trend.c @@ -271,9 +271,7 @@ void ReceiveDewfordTrendData(struct DewfordTrend *linkedTrends, size_t size, u8 // Only overwrrite it if it's "trendier" temp = &savedTrendsBuffer[idx]; if (temp->trendiness < src->trendiness) - { *temp = *src; - } } src++; } diff --git a/src/egg_hatch.c b/src/egg_hatch.c index b8ab1b91e0..e491b7b144 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -396,10 +396,10 @@ static bool8 _CheckDaycareMonReceivedMail(struct DayCare *daycare, u8 daycareId) GetBoxMonNickname(&daycareMon->mon, nickname); if (daycareMon->mail.message.itemId != ITEM_NONE && (StringCompareWithoutExtCtrlCodes(nickname, daycareMon->mail.monName) != 0 - || StringCompareWithoutExtCtrlCodes(gSaveBlock2Ptr->playerName, daycareMon->mail.OT_name) != 0)) + || StringCompareWithoutExtCtrlCodes(gSaveBlock2Ptr->playerName, daycareMon->mail.otName) != 0)) { StringCopy(gStringVar1, nickname); - TVShowConvertInternationalString(gStringVar2, daycareMon->mail.OT_name, daycareMon->mail.gameLanguage); + TVShowConvertInternationalString(gStringVar2, daycareMon->mail.otName, daycareMon->mail.gameLanguage); TVShowConvertInternationalString(gStringVar3, daycareMon->mail.monName, daycareMon->mail.monLanguage); return TRUE; } diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 65611c0f16..e573fe5ab9 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -235,9 +235,7 @@ void Task_ReturnToFieldRecordMixing(u8 taskId) break; case 1: if (IsLinkTaskFinished()) - { task->tState++; - } break; case 2: StartSendingKeysToLink(); diff --git a/src/field_specials.c b/src/field_specials.c index ab02f9938b..3285ea9a48 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -2071,61 +2071,61 @@ void ShowFrontierManiacMessage(void) { static const u8 *const sFrontierManiacMessages[][FRONTIER_MANIAC_MESSAGE_COUNT] = { - [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] = + [FRONTIER_MANIAC_TOWER_SINGLES] = { BattleFrontier_Lounge2_Text_SalonMaidenIsThere, BattleFrontier_Lounge2_Text_SalonMaidenSilverMons, BattleFrontier_Lounge2_Text_SalonMaidenGoldMons }, - [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] = + [FRONTIER_MANIAC_TOWER_DOUBLES] = { BattleFrontier_Lounge2_Text_DoubleBattleAdvice1, BattleFrontier_Lounge2_Text_DoubleBattleAdvice2, BattleFrontier_Lounge2_Text_DoubleBattleAdvice3 }, - [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] = + [FRONTIER_MANIAC_TOWER_MULTIS] = { BattleFrontier_Lounge2_Text_MultiBattleAdvice, BattleFrontier_Lounge2_Text_MultiBattleAdvice, BattleFrontier_Lounge2_Text_MultiBattleAdvice }, - [FRONTIER_MANIAC_BATTLE_TOWER_LINK] = + [FRONTIER_MANIAC_TOWER_LINK] = { BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice }, - [FRONTIER_MANIAC_BATTLE_DOME] = + [FRONTIER_MANIAC_DOME] = { BattleFrontier_Lounge2_Text_DomeAceIsThere, BattleFrontier_Lounge2_Text_DomeAceSilverMons, BattleFrontier_Lounge2_Text_DomeAceGoldMons }, - [FRONTIER_MANIAC_BATTLE_FACTORY] = + [FRONTIER_MANIAC_FACTORY] = { BattleFrontier_Lounge2_Text_FactoryHeadIsThere, BattleFrontier_Lounge2_Text_FactoryHeadSilverMons, BattleFrontier_Lounge2_Text_FactoryHeadGoldMons }, - [FRONTIER_MANIAC_BATTLE_PALACE] = + [FRONTIER_MANIAC_PALACE] = { BattleFrontier_Lounge2_Text_PalaceMavenIsThere, BattleFrontier_Lounge2_Text_PalaceMavenSilverMons, BattleFrontier_Lounge2_Text_PalaceMavenGoldMons }, - [FRONTIER_MANIAC_BATTLE_ARENA] = + [FRONTIER_MANIAC_ARENA] = { BattleFrontier_Lounge2_Text_ArenaTycoonIsThere, BattleFrontier_Lounge2_Text_ArenaTycoonSilverMons, BattleFrontier_Lounge2_Text_ArenaTycoonGoldMons }, - [FRONTIER_MANIAC_BATTLE_PIKE] = + [FRONTIER_MANIAC_PIKE] = { BattleFrontier_Lounge2_Text_PikeQueenIsThere, BattleFrontier_Lounge2_Text_PikeQueenSilverMons, BattleFrontier_Lounge2_Text_PikeQueenGoldMons }, - [FRONTIER_MANIAC_BATTLE_PYRAMID] = + [FRONTIER_MANIAC_PYRAMID] = { BattleFrontier_Lounge2_Text_PyramidKingIsThere, BattleFrontier_Lounge2_Text_PyramidKingSilverMons, @@ -2135,16 +2135,16 @@ void ShowFrontierManiacMessage(void) static const u8 sFrontierManiacStreakThresholds[][FRONTIER_MANIAC_MESSAGE_COUNT - 1] = { - [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] = { 21, 56 }, - [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] = { 21, 35 }, - [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] = { 255, 255 }, - [FRONTIER_MANIAC_BATTLE_TOWER_LINK] = { 255, 255 }, - [FRONTIER_MANIAC_BATTLE_DOME] = { 2, 4 }, - [FRONTIER_MANIAC_BATTLE_FACTORY] = { 7, 21 }, - [FRONTIER_MANIAC_BATTLE_PALACE] = { 7, 21 }, - [FRONTIER_MANIAC_BATTLE_ARENA] = { 14, 28 }, - [FRONTIER_MANIAC_BATTLE_PIKE] = { 13, 112 }, //BUG: 112 (0x70) is probably a mistake; the Pike Queen is battled twice well before that - [FRONTIER_MANIAC_BATTLE_PYRAMID] = { 7, 56 } + [FRONTIER_MANIAC_TOWER_SINGLES] = { 21, 56 }, + [FRONTIER_MANIAC_TOWER_DOUBLES] = { 21, 35 }, + [FRONTIER_MANIAC_TOWER_MULTIS] = { 255, 255 }, + [FRONTIER_MANIAC_TOWER_LINK] = { 255, 255 }, + [FRONTIER_MANIAC_DOME] = { 2, 4 }, + [FRONTIER_MANIAC_FACTORY] = { 7, 21 }, + [FRONTIER_MANIAC_PALACE] = { 7, 21 }, + [FRONTIER_MANIAC_ARENA] = { 14, 28 }, + [FRONTIER_MANIAC_PIKE] = { 13, 112 }, //BUG: 112 (0x70) is probably a mistake; the Pike Queen is battled twice well before that + [FRONTIER_MANIAC_PYRAMID] = { 7, 56 } }; u8 i; @@ -2153,10 +2153,10 @@ void ShowFrontierManiacMessage(void) switch (facility) { - case FRONTIER_MANIAC_BATTLE_TOWER_SINGLES: - case FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES: - case FRONTIER_MANIAC_BATTLE_TOWER_MULTIS: - case FRONTIER_MANIAC_BATTLE_TOWER_LINK: + case FRONTIER_MANIAC_TOWER_SINGLES: + case FRONTIER_MANIAC_TOWER_DOUBLES: + case FRONTIER_MANIAC_TOWER_MULTIS: + case FRONTIER_MANIAC_TOWER_LINK: if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN]) { @@ -2167,7 +2167,7 @@ void ShowFrontierManiacMessage(void) winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN]; } break; - case FRONTIER_MANIAC_BATTLE_DOME: + case FRONTIER_MANIAC_DOME: if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { @@ -2178,7 +2178,7 @@ void ShowFrontierManiacMessage(void) winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; } break; - case FRONTIER_MANIAC_BATTLE_FACTORY: + case FRONTIER_MANIAC_FACTORY: if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { @@ -2189,7 +2189,7 @@ void ShowFrontierManiacMessage(void) winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; } break; - case FRONTIER_MANIAC_BATTLE_PALACE: + case FRONTIER_MANIAC_PALACE: if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { @@ -2200,7 +2200,7 @@ void ShowFrontierManiacMessage(void) winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; } break; - case FRONTIER_MANIAC_BATTLE_ARENA: + case FRONTIER_MANIAC_ARENA: if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]) { @@ -2211,7 +2211,7 @@ void ShowFrontierManiacMessage(void) winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]; } break; - case FRONTIER_MANIAC_BATTLE_PIKE: + case FRONTIER_MANIAC_PIKE: if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]) { @@ -2222,7 +2222,7 @@ void ShowFrontierManiacMessage(void) winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]; } break; - case FRONTIER_MANIAC_BATTLE_PYRAMID: + case FRONTIER_MANIAC_PYRAMID: if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN]) { diff --git a/src/frontier_util.c b/src/frontier_util.c index 352c14b01a..bb758de4b4 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -683,16 +683,16 @@ const u16 gFrontierBannedSpecies[] = static const u8 *const sRecordsWindowChallengeTexts[][2] = { - [RANKING_HALL_BATTLE_TOWER_SINGLES] = {gText_BattleTower2, gText_FacilitySingle}, - [RANKING_HALL_BATTLE_TOWER_DOUBLES] = {gText_BattleTower2, gText_FacilityDouble}, - [RANKING_HALL_BATTLE_TOWER_MULTIS] = {gText_BattleTower2, gText_FacilityMulti}, - [RANKING_HALL_BATTLE_DOME] = {gText_BattleDome, gText_FacilitySingle}, - [RANKING_HALL_BATTLE_PALACE] = {gText_BattlePalace, gText_FacilitySingle}, - [RANKING_HALL_BATTLE_ARENA] = {gText_BattleArena, gText_Facility}, - [RANKING_HALL_BATTLE_FACTORY] = {gText_BattleFactory, gText_FacilitySingle}, - [RANKING_HALL_BATTLE_PIKE] = {gText_BattlePike, gText_Facility}, - [RANKING_HALL_BATTLE_PYRAMID] = {gText_BattlePyramid, gText_Facility}, - [RANKING_HALL_BATTLE_TOWER_LINK] = {gText_BattleTower2, gText_FacilityLink}, + [RANKING_HALL_TOWER_SINGLES] = {gText_BattleTower2, gText_FacilitySingle}, + [RANKING_HALL_TOWER_DOUBLES] = {gText_BattleTower2, gText_FacilityDouble}, + [RANKING_HALL_TOWER_MULTIS] = {gText_BattleTower2, gText_FacilityMulti}, + [RANKING_HALL_DOME] = {gText_BattleDome, gText_FacilitySingle}, + [RANKING_HALL_PALACE] = {gText_BattlePalace, gText_FacilitySingle}, + [RANKING_HALL_ARENA] = {gText_BattleArena, gText_Facility}, + [RANKING_HALL_FACTORY] = {gText_BattleFactory, gText_FacilitySingle}, + [RANKING_HALL_PIKE] = {gText_BattlePike, gText_Facility}, + [RANKING_HALL_PYRAMID] = {gText_BattlePyramid, gText_Facility}, + [RANKING_HALL_TOWER_LINK] = {gText_BattleTower2, gText_FacilityLink}, }; static const u8 *const sLevelModeText[] = @@ -703,16 +703,16 @@ static const u8 *const sLevelModeText[] = static const u8 *const sHallFacilityToRecordsText[] = { - [RANKING_HALL_BATTLE_TOWER_SINGLES] = gText_FrontierFacilityWinStreak, - [RANKING_HALL_BATTLE_TOWER_DOUBLES] = gText_FrontierFacilityWinStreak, - [RANKING_HALL_BATTLE_TOWER_MULTIS] = gText_FrontierFacilityWinStreak, - [RANKING_HALL_BATTLE_DOME] = gText_FrontierFacilityClearStreak, - [RANKING_HALL_BATTLE_PALACE] = gText_FrontierFacilityWinStreak, - [RANKING_HALL_BATTLE_ARENA] = gText_FrontierFacilityKOsStreak, - [RANKING_HALL_BATTLE_FACTORY] = gText_FrontierFacilityWinStreak, - [RANKING_HALL_BATTLE_PIKE] = gText_FrontierFacilityRoomsCleared, - [RANKING_HALL_BATTLE_PYRAMID] = gText_FrontierFacilityFloorsCleared, - [RANKING_HALL_BATTLE_TOWER_LINK] = gText_FrontierFacilityWinStreak, + [RANKING_HALL_TOWER_SINGLES] = gText_FrontierFacilityWinStreak, + [RANKING_HALL_TOWER_DOUBLES] = gText_FrontierFacilityWinStreak, + [RANKING_HALL_TOWER_MULTIS] = gText_FrontierFacilityWinStreak, + [RANKING_HALL_DOME] = gText_FrontierFacilityClearStreak, + [RANKING_HALL_PALACE] = gText_FrontierFacilityWinStreak, + [RANKING_HALL_ARENA] = gText_FrontierFacilityKOsStreak, + [RANKING_HALL_FACTORY] = gText_FrontierFacilityWinStreak, + [RANKING_HALL_PIKE] = gText_FrontierFacilityRoomsCleared, + [RANKING_HALL_PYRAMID] = gText_FrontierFacilityFloorsCleared, + [RANKING_HALL_TOWER_LINK] = gText_FrontierFacilityWinStreak, }; static const u16 sFrontierBrainTrainerIds[NUM_FRONTIER_FACILITIES] = @@ -2261,28 +2261,28 @@ static void Print2PRecord(s32 position, s32 x, s32 y, struct RankingHall2P *hall if (winStreak > MAX_STREAK) winStreak = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4); - StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[RANKING_HALL_BATTLE_TOWER_LINK]); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, GetStringRightAlignXOffset(1, sHallFacilityToRecordsText[RANKING_HALL_BATTLE_TOWER_LINK], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK]); + AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, GetStringRightAlignXOffset(1, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); } } static void Fill1PRecords(struct RankingHall1P *dst, s32 hallFacilityId, s32 lvlMode) { s32 i, j; - struct RankingHall1P record1P[4]; + struct RankingHall1P record1P[HALL_RECORDS_COUNT + 1]; struct PlayerHallRecords *playerHallRecords = calloc(1, sizeof(struct PlayerHallRecords)); GetPlayerHallRecords(playerHallRecords); - for (i = 0; i < 3; i++) + for (i = 0; i < HALL_RECORDS_COUNT; i++) record1P[i] = gSaveBlock2Ptr->hallRecords1P[hallFacilityId][lvlMode][i]; - record1P[3] = playerHallRecords->onePlayer[hallFacilityId][lvlMode]; + record1P[HALL_RECORDS_COUNT] = playerHallRecords->onePlayer[hallFacilityId][lvlMode]; - for (i = 0; i < 3; i++) + for (i = 0; i < HALL_RECORDS_COUNT; i++) { s32 highestWinStreak = 0; s32 highestId = 0; - for (j = 0; j < 4; j++) + for (j = 0; j < HALL_RECORDS_COUNT + 1; j++) { if (record1P[j].winStreak > highestWinStreak) { @@ -2290,8 +2290,8 @@ static void Fill1PRecords(struct RankingHall1P *dst, s32 hallFacilityId, s32 lvl highestWinStreak = record1P[j].winStreak; } } - if (record1P[3].winStreak >= highestWinStreak) - highestId = 3; + if (record1P[HALL_RECORDS_COUNT].winStreak >= highestWinStreak) + highestId = HALL_RECORDS_COUNT; dst[i] = record1P[highestId]; record1P[highestId].winStreak = 0; @@ -2346,7 +2346,7 @@ static void PrintHallRecords(s32 hallFacilityId, s32 lvlMode) AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); x = GetStringRightAlignXOffset(1, sLevelModeText[lvlMode], 0xD0); AddTextPrinterParameterized(gRecordsWindowId, 1, sLevelModeText[lvlMode], x, 1, TEXT_SPEED_FF, NULL); - if (hallFacilityId == RANKING_HALL_BATTLE_TOWER_LINK) + if (hallFacilityId == RANKING_HALL_TOWER_LINK) { gSaveBlock2Ptr->frontier.opponentNames[0][PLAYER_NAME_LENGTH] = EOS; gSaveBlock2Ptr->frontier.opponentNames[1][PLAYER_NAME_LENGTH] = EOS; @@ -2393,9 +2393,9 @@ void ClearRankingHallRecords(void) for (i = 0; i < HALL_FACILITIES_COUNT; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { - for (k = 0; k < 3; k++) + for (k = 0; k < HALL_RECORDS_COUNT; k++) { CopyTrainerId(gSaveBlock2Ptr->hallRecords1P[i][j][k].id, ZERO); gSaveBlock2Ptr->hallRecords1P[i][j][k].name[0] = EOS; @@ -2404,9 +2404,9 @@ void ClearRankingHallRecords(void) } } - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { - for (k = 0; k < 3; k++) + for (k = 0; k < HALL_RECORDS_COUNT; k++) { CopyTrainerId(gSaveBlock2Ptr->hallRecords2P[j][k].id1, ZERO); CopyTrainerId(gSaveBlock2Ptr->hallRecords2P[j][k].id2, ZERO); diff --git a/src/item_use.c b/src/item_use.c index 0a31816083..4525cd7f98 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -182,7 +182,7 @@ u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId) // Mail in the bag menu can't have a message but it can be checked (view the mail background, no message) static void CB2_CheckMail(void) { - struct MailStruct mail; + struct Mail mail; mail.itemId = gSpecialVar_ItemId; ReadMail(&mail, CB2_ReturnToBagMenuPocket, 0); } diff --git a/src/load_save.c b/src/load_save.c index 0112f2a8f1..1ba5a1600a 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -25,7 +25,7 @@ struct LoadedSaveData /*0x00F0*/ struct ItemSlot pokeBalls[BAG_POKEBALLS_COUNT]; /*0x0130*/ struct ItemSlot TMsHMs[BAG_TMHM_COUNT]; /*0x0230*/ struct ItemSlot berries[BAG_BERRIES_COUNT]; - /*0x02E8*/ struct MailStruct mail[MAIL_COUNT]; + /*0x02E8*/ struct Mail mail[MAIL_COUNT]; }; // EWRAM DATA diff --git a/src/mail.c b/src/mail.c index 50ff553aa3..8bb6f69918 100644 --- a/src/mail.c +++ b/src/mail.c @@ -61,7 +61,7 @@ struct MailRead /*0x0200*/ u8 playerName[12]; /*0x020C*/ MainCallback exitCallback; /*0x0210*/ MainCallback callback; - /*0x0214*/ struct MailStruct *mail; + /*0x0214*/ struct Mail *mail; /*0x0218*/ bool8 hasText; /*0x0219*/ u8 signatureWidth; /*0x021a*/ u8 mailType; @@ -443,7 +443,7 @@ static const struct MailLayout sMailLayouts_Tall[] = { }, }; -void ReadMail(struct MailStruct *mail, void (*exitCallback)(void), bool8 hasText) +void ReadMail(struct Mail *mail, void (*exitCallback)(void), bool8 hasText) { u16 buffer[2]; u16 species; diff --git a/src/mail_data.c b/src/mail_data.c index 2ae9bedab7..683bd854ea 100644 --- a/src/mail_data.c +++ b/src/mail_data.c @@ -7,15 +7,17 @@ #include "international_string_util.h" #include "constants/easy_chat.h" -void ClearMailData(void) +#define UNOWN_OFFSET 30000 + +void ClearAllMail(void) { u8 i; for (i = 0; i < MAIL_COUNT; i++) - ClearMailStruct(&gSaveBlock1Ptr->mail[i]); + ClearMail(&gSaveBlock1Ptr->mail[i]); } -void ClearMailStruct(struct MailStruct *mail) +void ClearMail(struct Mail *mail) { s32 i; @@ -41,7 +43,7 @@ bool8 MonHasMail(struct Pokemon *mon) return FALSE; } -u8 GiveMailToMon(struct Pokemon *mon, u16 itemId) +u8 GiveMailToMonByItemId(struct Pokemon *mon, u16 itemId) { u8 heldItem[2]; u8 id, i; @@ -83,7 +85,7 @@ u16 SpeciesToMailSpecies(u16 species, u32 personality) { if (species == SPECIES_UNOWN) { - u32 species = GetUnownLetterByPersonality(personality) + 30000; + u32 species = GetUnownLetterByPersonality(personality) + UNOWN_OFFSET; return species; } @@ -94,10 +96,10 @@ u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer) { u16 result; - if (mailSpecies >= 30000 && mailSpecies < (30000 + NUM_UNOWN_FORMS)) + if (mailSpecies >= UNOWN_OFFSET && mailSpecies < UNOWN_OFFSET + NUM_UNOWN_FORMS) { result = SPECIES_UNOWN; - *buffer = mailSpecies - 30000; + *buffer = mailSpecies - UNOWN_OFFSET; } else { @@ -107,11 +109,11 @@ u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer) return result; } -u8 GiveMailToMon2(struct Pokemon *mon, struct MailStruct *mail) +u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail) { u8 heldItem[2]; u16 itemId = mail->itemId; - u8 mailId = GiveMailToMon(mon, itemId); + u8 mailId = GiveMailToMonByItemId(mon, itemId); if (mailId == MAIL_NONE) return MAIL_NONE; @@ -169,7 +171,7 @@ u8 TakeMailFromMon2(struct Pokemon *mon) { if (gSaveBlock1Ptr->mail[i].itemId == ITEM_NONE) { - memcpy(&gSaveBlock1Ptr->mail[i], &gSaveBlock1Ptr->mail[GetMonData(mon, MON_DATA_MAIL)], sizeof(struct MailStruct)); + memcpy(&gSaveBlock1Ptr->mail[i], &gSaveBlock1Ptr->mail[GetMonData(mon, MON_DATA_MAIL)], sizeof(struct Mail)); gSaveBlock1Ptr->mail[GetMonData(mon, MON_DATA_MAIL)].itemId = ITEM_NONE; SetMonData(mon, MON_DATA_MAIL, &newMailId); SetMonData(mon, MON_DATA_HELD_ITEM, newHeldItem); diff --git a/src/match_call.c b/src/match_call.c index b71fc83220..df6b08725a 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1902,7 +1902,7 @@ static u16 GetFrontierStreakInfo(u16 facilityId, u32 *topicTextId) case FRONTIER_FACILITY_DOME: for (i = 0; i < 2; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { if (streak < gSaveBlock2Ptr->frontier.domeRecordWinStreaks[i][j]) streak = gSaveBlock2Ptr->frontier.domeRecordWinStreaks[i][j]; @@ -1915,7 +1915,7 @@ static u16 GetFrontierStreakInfo(u16 facilityId, u32 *topicTextId) #else case FRONTIER_FACILITY_FACTORY: #endif - for (i = 0; i < 2; i++) + for (i = 0; i < FRONTIER_LVL_MODE_COUNT; i++) { if (streak < gSaveBlock2Ptr->frontier.pikeRecordStreaks[i]) streak = gSaveBlock2Ptr->frontier.pikeRecordStreaks[i]; @@ -1925,7 +1925,7 @@ static u16 GetFrontierStreakInfo(u16 facilityId, u32 *topicTextId) case FRONTIER_FACILITY_TOWER: for (i = 0; i < 4; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { if (streak < gSaveBlock2Ptr->frontier.towerRecordWinStreaks[i][j]) streak = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[i][j]; @@ -1936,7 +1936,7 @@ static u16 GetFrontierStreakInfo(u16 facilityId, u32 *topicTextId) case FRONTIER_FACILITY_PALACE: for (i = 0; i < 2; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { if (streak < gSaveBlock2Ptr->frontier.palaceRecordWinStreaks[i][j]) streak = gSaveBlock2Ptr->frontier.palaceRecordWinStreaks[i][j]; @@ -1951,7 +1951,7 @@ static u16 GetFrontierStreakInfo(u16 facilityId, u32 *topicTextId) #endif for (i = 0; i < 2; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { if (streak < gSaveBlock2Ptr->frontier.factoryRecordWinStreaks[i][j]) streak = gSaveBlock2Ptr->frontier.factoryRecordWinStreaks[i][j]; @@ -1960,7 +1960,7 @@ static u16 GetFrontierStreakInfo(u16 facilityId, u32 *topicTextId) *topicTextId = GEN_TOPIC_STREAK_RECORD - 1; break; case FRONTIER_FACILITY_ARENA: - for (i = 0; i < 2; i++) + for (i = 0; i < FRONTIER_LVL_MODE_COUNT; i++) { if (streak < gSaveBlock2Ptr->frontier.arenaRecordStreaks[i]) streak = gSaveBlock2Ptr->frontier.arenaRecordStreaks[i]; @@ -1968,7 +1968,7 @@ static u16 GetFrontierStreakInfo(u16 facilityId, u32 *topicTextId) *topicTextId = GEN_TOPIC_STREAK_RECORD - 1; break; case FRONTIER_FACILITY_PYRAMID: - for (i = 0; i < 2; i++) + for (i = 0; i < FRONTIER_LVL_MODE_COUNT; i++) { if (streak < gSaveBlock2Ptr->frontier.pyramidRecordStreaks[i]) streak = gSaveBlock2Ptr->frontier.pyramidRecordStreaks[i]; diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index 176eab7fc6..f590bcde62 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -302,7 +302,7 @@ bool8 MEScrCmd_setrecordmixinggift(struct ScriptContext *ctx) bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) { - struct MailStruct mail; + struct Mail mail; struct Pokemon pokemon; u16 species; u16 heldItem; @@ -326,7 +326,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) else { memcpy(&gPlayerParty[PARTY_SIZE - 1], pokemonPtr, sizeof(struct Pokemon)); - memcpy(&mail, mailPtr, sizeof(struct MailStruct)); + memcpy(&mail, mailPtr, sizeof(struct Mail)); if (species != SPECIES_EGG) { @@ -337,7 +337,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) heldItem = GetMonData(&gPlayerParty[PARTY_SIZE - 1], MON_DATA_HELD_ITEM); if (ItemIsMail(heldItem)) - GiveMailToMon2(&gPlayerParty[PARTY_SIZE - 1], &mail); + GiveMailToMon(&gPlayerParty[PARTY_SIZE - 1], &mail); CompactPartySlots(); CalculatePlayerPartyCount(); StringExpandPlaceholders(gStringVar4, gText_MysteryGiftSentOver); diff --git a/src/new_game.c b/src/new_game.c index 2a950efbc9..5bb3d44c58 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -158,7 +158,7 @@ void NewGameInitData(void) ResetPokedex(); ClearFrontierRecord(); ClearSav1(); - ClearMailData(); + ClearAllMail(); gSaveBlock2Ptr->specialSaveWarpFlags = 0; gSaveBlock2Ptr->gcnLinkFlags = 0; InitPlayerTrainerId(); diff --git a/src/party_menu.c b/src/party_menu.c index 9829d62e9a..95a4852db6 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -1726,7 +1726,7 @@ static void GiveItemToMon(struct Pokemon *mon, u16 item) if (ItemIsMail(item) == TRUE) { - if (GiveMailToMon(mon, item) == 0xFF) + if (GiveMailToMonByItemId(mon, item) == MAIL_NONE) return; } itemBytes[0] = item; @@ -5468,7 +5468,7 @@ void ChooseMonToGiveMailFromMailbox(void) static void TryGiveMailToSelectedMon(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; - struct MailStruct *mail; + struct Mail *mail; gPartyMenuUseExitCallback = FALSE; mail = &gSaveBlock1Ptr->mail[gPlayerPCItemPageInfo.itemsAbove + PARTY_SIZE + gPlayerPCItemPageInfo.cursorPos]; @@ -5478,8 +5478,8 @@ static void TryGiveMailToSelectedMon(u8 taskId) } else { - GiveMailToMon2(mon, mail); - ClearMailStruct(mail); + GiveMailToMon(mon, mail); + ClearMail(mail); DisplayPartyMenuMessage(gText_MailTransferredFromMailbox, TRUE); } ScheduleBgCopyTilemapToVram(2); diff --git a/src/player_pc.c b/src/player_pc.c index 507fc65582..a4e7505b4a 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -674,7 +674,7 @@ static u8 GetMailboxMailCount(void) static void Mailbox_CompactMailList(void) { - struct MailStruct temp; + struct Mail temp; u8 i, j; for (i = PARTY_SIZE; i < MAIL_COUNT - 1; i++) @@ -850,7 +850,7 @@ static void Mailbox_HandleConfirmMoveToBag(u8 taskId) static void Mailbox_DoMailMoveToBag(u8 taskId) { - struct MailStruct *mail = &gSaveBlock1Ptr->mail[gPlayerPCItemPageInfo.itemsAbove + PARTY_SIZE + gPlayerPCItemPageInfo.cursorPos]; + struct Mail *mail = &gSaveBlock1Ptr->mail[gPlayerPCItemPageInfo.itemsAbove + PARTY_SIZE + gPlayerPCItemPageInfo.cursorPos]; if (!AddBagItem(mail->itemId, 1)) { DisplayItemMessageOnField(taskId, gText_BagIsFull, Mailbox_Cancel); @@ -858,7 +858,7 @@ static void Mailbox_DoMailMoveToBag(u8 taskId) else { DisplayItemMessageOnField(taskId, gText_MailToBagMessageErased, Mailbox_Cancel); - ClearMailStruct(mail); + ClearMail(mail); Mailbox_CompactMailList(); gPlayerPCItemPageInfo.count--; if (gPlayerPCItemPageInfo.count < (gPlayerPCItemPageInfo.pageItems + gPlayerPCItemPageInfo.itemsAbove) && gPlayerPCItemPageInfo.itemsAbove != 0) diff --git a/src/record_mixing.c b/src/record_mixing.c index ad97b6af52..fe51667f42 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -35,16 +35,21 @@ #include "constants/battle_frontier.h" #include "dewford_trend.h" +// Number of bytes of the record transferred at a time +#define BUFFER_CHUNK_SIZE 200 -// Static type declarations +#define NUM_SWAP_COMBOS 3 + +// Used by several tasks in this file +#define tState data[0] struct RecordMixingHallRecords { - struct RankingHall1P hallRecords1P[HALL_FACILITIES_COUNT][2][6]; - struct RankingHall2P hallRecords2P[2][6]; + struct RankingHall1P hallRecords1P[HALL_FACILITIES_COUNT][FRONTIER_LVL_MODE_COUNT][HALL_RECORDS_COUNT * 2]; + struct RankingHall2P hallRecords2P[FRONTIER_LVL_MODE_COUNT][HALL_RECORDS_COUNT * 2]; }; -struct PlayerRecordsRS +struct PlayerRecordRS { struct SecretBase secretBases[SECRET_BASES_COUNT]; TVShow tvShows[TV_SHOWS_COUNT]; @@ -54,10 +59,10 @@ struct PlayerRecordsRS struct RecordMixingDaycareMail daycareMail; struct RSBattleTowerRecord battleTowerRecord; u16 giftItem; - u16 filler11C8[0x32]; + u16 padding[50]; }; -struct PlayerRecordsEmerald +struct PlayerRecordEmerald { /* 0x0000 */ struct SecretBase secretBases[SECRET_BASES_COUNT]; /* 0x0c80 */ TVShow tvShows[TV_SHOWS_COUNT]; @@ -70,73 +75,67 @@ struct PlayerRecordsEmerald /* 0x1214 */ LilycoveLady lilycoveLady; /* 0x1254 */ struct Apprentice apprentices[2]; /* 0x12dc */ struct PlayerHallRecords hallRecords; - /* 0x1434 */ u8 field_1434[0x10]; + /* 0x1434 */ u8 padding[16]; }; // 0x1444 -union PlayerRecords +union PlayerRecord { - struct PlayerRecordsRS ruby; - struct PlayerRecordsEmerald emerald; + struct PlayerRecordRS ruby; + struct PlayerRecordEmerald emerald; }; -// Static RAM declarations - -static bool8 gUnknown_03001130; +static bool8 sReadyToReceive; static struct SecretBase *sSecretBasesSave; static TVShow *sTvShowsSave; static PokeNews *sPokeNewsSave; static OldMan *sOldManSave; static struct DewfordTrend *sDewfordTrendsSave; -static struct RecordMixingDaycareMail *sDaycareMailSave; +static struct RecordMixingDaycareMail *sRecordMixMailSave; static void *sBattleTowerSave; static LilycoveLady *sLilycoveLadySave; static void *sApprenticesSave; static void *sBattleTowerSave_Duplicate; static u32 sRecordStructSize; -static u8 gUnknown_03001160; +static u8 sDaycareMailRandSum; static struct PlayerHallRecords *gUnknown_03001168[3]; -static EWRAM_DATA struct RecordMixingDaycareMail sDaycareMail = {0}; -static EWRAM_DATA union PlayerRecords *sReceivedRecords = NULL; -static EWRAM_DATA union PlayerRecords *sSentRecord = NULL; +static EWRAM_DATA struct RecordMixingDaycareMail sRecordMixMail = {0}; +static EWRAM_DATA union PlayerRecord *sReceivedRecords = NULL; +static EWRAM_DATA union PlayerRecord *sSentRecord = NULL; -// Static ROM declarations - -static void Task_RecordMixing_Main(u8 taskId); -static void Task_MixingRecordsRecv(u8 taskId); -static void Task_SendPacket(u8 taskId); -static void Task_CopyReceiveBuffer(u8 taskId); -static void Task_SendPacket_SwitchToReceive(u8 taskId); -static void *LoadPtrFromTaskData(const u16 *asShort); -static void StorePtrInTaskData(void *records, u16 *a1); +static void Task_RecordMixing_Main(u8); +static void Task_MixingRecordsRecv(u8); +static void Task_SendPacket(u8); +static void Task_CopyReceiveBuffer(u8); +static void Task_SendPacket_SwitchToReceive(u8); +static void *LoadPtrFromTaskData(const u16 *); +static void StorePtrInTaskData(void *, u16 *); static u8 GetMultiplayerId_(void); static void *GetPlayerRecvBuffer(u8); static void ReceiveOldManData(OldMan *, size_t, u8); -static void ReceiveBattleTowerData(void *battleTowerRecord, size_t, u8); +static void ReceiveBattleTowerData(void *, size_t, u8); static void ReceiveLilycoveLadyData(LilycoveLady *, size_t, u8); -static void sub_80E7B2C(const u8 *); +static void CalculateDaycareMailRandSum(const u8 *); static void ReceiveDaycareMailData(struct RecordMixingDaycareMail *, size_t, u8, TVShow *); -static void ReceiveGiftItem(u16 *item, u8 which); -static void Task_DoRecordMixing(u8 taskId); -static void GetSavedApprentices(struct Apprentice *dst, struct Apprentice *src); -static void ReceiveApprenticeData(struct Apprentice *mixApprentice, size_t recordSize, u32 multiplayerId); -static void ReceiveRankingHallRecords(struct PlayerHallRecords *hallRecords, size_t arg1, u32 arg2); -static void GetRecordMixingDaycareMail(struct RecordMixingDaycareMail *dst); -static void SanitizeDaycareMailForRuby(struct RecordMixingDaycareMail *src); -static void SanitizeEmeraldBattleTowerRecord(struct EmeraldBattleTowerRecord *arg0); -static void SanitizeRubyBattleTowerRecord(struct RSBattleTowerRecord *src); +static void ReceiveGiftItem(u16 *, u8 ); +static void Task_DoRecordMixing(u8); +static void GetSavedApprentices(struct Apprentice *, struct Apprentice *); +static void ReceiveApprenticeData(struct Apprentice *, size_t, u32); +static void ReceiveRankingHallRecords(struct PlayerHallRecords *, size_t, u32); +static void GetRecordMixingDaycareMail(struct RecordMixingDaycareMail *); +static void SanitizeDaycareMailForRuby(struct RecordMixingDaycareMail *); +static void SanitizeEmeraldBattleTowerRecord(struct EmeraldBattleTowerRecord *); +static void SanitizeRubyBattleTowerRecord(struct RSBattleTowerRecord *); -// .rodata +static const u8 sPlayerIdxOrders_2Player[] = {1, 0}; -static const u8 gUnknown_0858CF8C[] = {1, 0}; - -static const u8 gUnknown_0858CF8E[][3] = +static const u8 sPlayerIdxOrders_3Player[][3] = { {1, 2, 0}, {2, 0, 1}, }; -static const u8 gUnknown_0858CF94[][4] = +static const u8 sPlayerIdxOrders_4Player[][4] = { {1, 0, 3, 2}, {3, 0, 1, 2}, @@ -149,24 +148,21 @@ static const u8 gUnknown_0858CF94[][4] = {3, 2, 1, 0}, }; -static const u8 gUnknown_0858CFB8[3][2] = +// When 3 players can swap mail 2 players are randomly selected and the 3rd is left out +static const u8 sDaycareMailSwapIds_3Player[NUM_SWAP_COMBOS][2] = { {0, 1}, {1, 2}, {2, 0}, }; -static const u8 gUnknown_0858CFBE[3][4] = +static const u8 sDaycareMailSwapIds_4Player[NUM_SWAP_COMBOS][4] = { - {0, 1, 2, 3}, - {0, 2, 1, 3}, - {0, 3, 2, 1}, + {0, 1, 2, 3}, // 0 swaps with 1, 2 swaps with 3 + {0, 2, 1, 3}, + {0, 3, 2, 1}, }; -// .text - -#define BUFFER_CHUNK_SIZE 200 - void RecordMixingPlayerSpotTriggered(void) { CreateTask_EnterCableClubSeat(Task_RecordMixing_Main); @@ -180,14 +176,14 @@ static void SetSrcLookupPointers(void) sPokeNewsSave = gSaveBlock1Ptr->pokeNews; sOldManSave = &gSaveBlock1Ptr->oldMan; sDewfordTrendsSave = gSaveBlock1Ptr->dewfordTrends; - sDaycareMailSave = &sDaycareMail; + sRecordMixMailSave = &sRecordMixMail; sBattleTowerSave = &gSaveBlock2Ptr->frontier.towerPlayer; sLilycoveLadySave = &gSaveBlock1Ptr->lilycoveLady; sApprenticesSave = gSaveBlock2Ptr->apprentices; sBattleTowerSave_Duplicate = &gSaveBlock2Ptr->frontier.towerPlayer; } -static void PrepareUnknownExchangePacket(struct PlayerRecordsRS *dest) +static void PrepareUnknownExchangePacket(struct PlayerRecordRS *dest) { memcpy(dest->secretBases, sSecretBasesSave, sizeof(dest->secretBases)); memcpy(dest->tvShows, sTvShowsSave, sizeof(dest->tvShows)); @@ -202,7 +198,7 @@ static void PrepareUnknownExchangePacket(struct PlayerRecordsRS *dest) dest->giftItem = GetRecordMixingGift(); } -static void PrepareExchangePacketForRubySapphire(struct PlayerRecordsRS *dest) +static void PrepareExchangePacketForRubySapphire(struct PlayerRecordRS *dest) { memcpy(dest->secretBases, sSecretBasesSave, sizeof(dest->secretBases)); ClearJapaneseSecretBases(dest->secretBases); @@ -254,36 +250,36 @@ static void PrepareExchangePacket(void) } } -static void ReceiveExchangePacket(u32 which) +static void ReceiveExchangePacket(u32 multiplayerId) { if (Link_AnyPartnersPlayingRubyOrSapphire()) { // Ruby/Sapphire - sub_80E7B2C((void *)sReceivedRecords->ruby.tvShows); - ReceiveSecretBasesData(sReceivedRecords->ruby.secretBases, sizeof(struct PlayerRecordsRS), which); - ReceiveDaycareMailData(&sReceivedRecords->ruby.daycareMail, sizeof(struct PlayerRecordsRS), which, sReceivedRecords->ruby.tvShows); - ReceiveBattleTowerData(&sReceivedRecords->ruby.battleTowerRecord, sizeof(struct PlayerRecordsRS), which); - ReceiveTvShowsData(sReceivedRecords->ruby.tvShows, sizeof(struct PlayerRecordsRS), which); - ReceivePokeNewsData(sReceivedRecords->ruby.pokeNews, sizeof(struct PlayerRecordsRS), which); - ReceiveOldManData(&sReceivedRecords->ruby.oldMan, sizeof(struct PlayerRecordsRS), which); - ReceiveDewfordTrendData(sReceivedRecords->ruby.dewfordTrends, sizeof(struct PlayerRecordsRS), which); - ReceiveGiftItem(&sReceivedRecords->ruby.giftItem, which); + CalculateDaycareMailRandSum((void *)sReceivedRecords->ruby.tvShows); + ReceiveSecretBasesData(sReceivedRecords->ruby.secretBases, sizeof(sReceivedRecords->ruby), multiplayerId); + ReceiveDaycareMailData(&sReceivedRecords->ruby.daycareMail, sizeof(sReceivedRecords->ruby), multiplayerId, sReceivedRecords->ruby.tvShows); + ReceiveBattleTowerData(&sReceivedRecords->ruby.battleTowerRecord, sizeof(sReceivedRecords->ruby), multiplayerId); + ReceiveTvShowsData(sReceivedRecords->ruby.tvShows, sizeof(sReceivedRecords->ruby), multiplayerId); + ReceivePokeNewsData(sReceivedRecords->ruby.pokeNews, sizeof(sReceivedRecords->ruby), multiplayerId); + ReceiveOldManData(&sReceivedRecords->ruby.oldMan, sizeof(sReceivedRecords->ruby), multiplayerId); + ReceiveDewfordTrendData(sReceivedRecords->ruby.dewfordTrends, sizeof(sReceivedRecords->ruby), multiplayerId); + ReceiveGiftItem(&sReceivedRecords->ruby.giftItem, multiplayerId); } else { // Emerald - sub_80E7B2C((void *)sReceivedRecords->emerald.tvShows); - ReceiveSecretBasesData(sReceivedRecords->emerald.secretBases, sizeof(struct PlayerRecordsEmerald), which); - ReceiveTvShowsData(sReceivedRecords->emerald.tvShows, sizeof(struct PlayerRecordsEmerald), which); - ReceivePokeNewsData(sReceivedRecords->emerald.pokeNews, sizeof(struct PlayerRecordsEmerald), which); - ReceiveOldManData(&sReceivedRecords->emerald.oldMan, sizeof(struct PlayerRecordsEmerald), which); - ReceiveDewfordTrendData(sReceivedRecords->emerald.dewfordTrends, sizeof(struct PlayerRecordsEmerald), which); - ReceiveDaycareMailData(&sReceivedRecords->emerald.daycareMail, sizeof(struct PlayerRecordsEmerald), which, sReceivedRecords->emerald.tvShows); - ReceiveBattleTowerData(&sReceivedRecords->emerald.battleTowerRecord, sizeof(struct PlayerRecordsEmerald), which); - ReceiveGiftItem(&sReceivedRecords->emerald.giftItem, which); - ReceiveLilycoveLadyData(&sReceivedRecords->emerald.lilycoveLady, sizeof(struct PlayerRecordsEmerald), which); - ReceiveApprenticeData(sReceivedRecords->emerald.apprentices, sizeof(struct PlayerRecordsEmerald), (u8) which); - ReceiveRankingHallRecords(&sReceivedRecords->emerald.hallRecords, sizeof(struct PlayerRecordsEmerald), (u8) which); + CalculateDaycareMailRandSum((void *)sReceivedRecords->emerald.tvShows); + ReceiveSecretBasesData(sReceivedRecords->emerald.secretBases, sizeof(sReceivedRecords->emerald), multiplayerId); + ReceiveTvShowsData(sReceivedRecords->emerald.tvShows, sizeof(sReceivedRecords->emerald), multiplayerId); + ReceivePokeNewsData(sReceivedRecords->emerald.pokeNews, sizeof(sReceivedRecords->emerald), multiplayerId); + ReceiveOldManData(&sReceivedRecords->emerald.oldMan, sizeof(sReceivedRecords->emerald), multiplayerId); + ReceiveDewfordTrendData(sReceivedRecords->emerald.dewfordTrends, sizeof(sReceivedRecords->emerald), multiplayerId); + ReceiveDaycareMailData(&sReceivedRecords->emerald.daycareMail, sizeof(sReceivedRecords->emerald), multiplayerId, sReceivedRecords->emerald.tvShows); + ReceiveBattleTowerData(&sReceivedRecords->emerald.battleTowerRecord, sizeof(sReceivedRecords->emerald), multiplayerId); + ReceiveGiftItem(&sReceivedRecords->emerald.giftItem, multiplayerId); + ReceiveLilycoveLadyData(&sReceivedRecords->emerald.lilycoveLady, sizeof(sReceivedRecords->emerald), multiplayerId); + ReceiveApprenticeData(sReceivedRecords->emerald.apprentices, sizeof(sReceivedRecords->emerald), (u8) multiplayerId); + ReceiveRankingHallRecords(&sReceivedRecords->emerald.hallRecords, sizeof(sReceivedRecords->emerald), (u8) multiplayerId); } } @@ -307,10 +303,11 @@ static void Task_RecordMixing_SoundEffect(u8 taskId) #undef tCounter -#define tState data[0] -#define tSndEffTaskId data[15] +#define tTimer data[8] +#define tLinkTaskId data[10] +#define tSoundTaskId data[15] -// Note: Currently, special var 8005 contains the player's spot id. +// Note: gSpecialVar_0x8005 here contains the player's spot id. static void Task_RecordMixing_Main(u8 taskId) { s16 *data = gTasks[taskId].data; @@ -318,56 +315,54 @@ static void Task_RecordMixing_Main(u8 taskId) switch (tState) { case 0: // init - sSentRecord = malloc(sizeof(union PlayerRecords)); - sReceivedRecords = malloc(sizeof(union PlayerRecords) * MAX_LINK_PLAYERS); + sSentRecord = malloc(sizeof(*sSentRecord)); + sReceivedRecords = malloc(sizeof(*sReceivedRecords) * MAX_LINK_PLAYERS); SetLocalLinkPlayerId(gSpecialVar_0x8005); VarSet(VAR_TEMP_0, 1); - gUnknown_03001130 = FALSE; + sReadyToReceive = FALSE; PrepareExchangePacket(); CreateRecordMixingLights(); tState = 1; - data[10] = CreateTask(Task_MixingRecordsRecv, 80); - tSndEffTaskId = CreateTask(Task_RecordMixing_SoundEffect, 81); + tLinkTaskId = CreateTask(Task_MixingRecordsRecv, 80); + tSoundTaskId = CreateTask(Task_RecordMixing_SoundEffect, 81); break; case 1: // wait for Task_MixingRecordsRecv - if (!gTasks[data[10]].isActive) + if (!gTasks[tLinkTaskId].isActive) { tState = 2; FlagSet(FLAG_SYS_MIX_RECORD); DestroyRecordMixingLights(); - DestroyTask(tSndEffTaskId); + DestroyTask(tSoundTaskId); } break; case 2: - data[10] = CreateTask(Task_DoRecordMixing, 10); + tLinkTaskId = CreateTask(Task_DoRecordMixing, 10); tState = 3; PlaySE(SE_M_BATON_PASS); break; case 3: // wait for Task_DoRecordMixing - if (!gTasks[data[10]].isActive) + if (!gTasks[tLinkTaskId].isActive) { tState = 4; if (gWirelessCommType == 0) - data[10] = CreateTask_ReestablishCableClubLink(); + tLinkTaskId = CreateTask_ReestablishCableClubLink(); PrintTextOnRecordMixing(gText_RecordMixingComplete); - data[8] = 0; + tTimer = 0; } break; case 4: // wait 60 frames - if (++data[8] > 60) + if (++tTimer > 60) tState = 5; break; - case 5: - if (!gTasks[data[10]].isActive) + case 5: // Wait for the task created by CreateTask_ReestablishCableClubLink + if (!gTasks[tLinkTaskId].isActive) { free(sReceivedRecords); free(sSentRecord); SetLinkWaitingForScript(); if (gWirelessCommType != 0) - { CreateTask(Task_ReturnToFieldRecordMixing, 10); - } ClearDialogWindowAndFrame(0, 1); DestroyTask(taskId); EnableBothScriptContexts(); @@ -376,26 +371,38 @@ static void Task_RecordMixing_Main(u8 taskId) } } -#undef tState -#undef tSndEffTaskId +#undef tTimer +#undef tLinkTaskId +#undef tSoundTaskId + +// Task data for Task_MixingRecordsRecv and subsequent tasks +#define tSentRecord data[2] // Used to store a ptr, so data[2] and data[3] +#define tNumChunksSent data[4] +#define tMultiplayerId data[5] +#define tCopyTaskId data[10] + +// Task data for Task_CopyReceiveBuffer +#define tParentTaskId data[0] +#define tNumChunksRecv(i) data[1 + (i)] // Number of chunks of the record received per player +#define tRecvRecords data[5] // Used to store a ptr, so data[5] and data[6] static void Task_MixingRecordsRecv(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: PrintTextOnRecordMixing(gText_MixingRecords); task->data[8] = 0x708; - task->data[0] = 400; + task->tState = 400; ClearLinkCallback_2(); break; case 100: // wait 20 frames if (++task->data[12] > 20) { task->data[12] = 0; - task->data[0] = 101; + task->tState = 101; } break; case 101: @@ -406,14 +413,14 @@ static void Task_MixingRecordsRecv(u8 taskId) if (players == GetSavedPlayerCount()) { PlaySE(SE_PIN); - task->data[0] = 201; + task->tState = 201; task->data[12] = 0; } } else { PlaySE(SE_BOO); - task->data[0] = 301; + task->tState = 301; } } break; @@ -422,17 +429,17 @@ static void Task_MixingRecordsRecv(u8 taskId) if (GetSavedPlayerCount() == GetLinkPlayerCount_2() && ++task->data[12] > (GetLinkPlayerCount_2() * 30)) { CheckShouldAdvanceLinkState(); - task->data[0] = 1; + task->tState = 1; } break; case 301: if (GetSavedPlayerCount() == GetLinkPlayerCount_2()) - task->data[0] = 1; + task->tState = 1; break; case 400: // wait 20 frames if (++task->data[12] > 20) { - task->data[0] = 1; + task->tState = 1; task->data[12] = 0; } break; @@ -440,7 +447,7 @@ static void Task_MixingRecordsRecv(u8 taskId) if (gReceivedRemoteLinkPlayers != 0) { ConvertIntToDecimalStringN(gStringVar1, GetMultiplayerId_(), STR_CONV_MODE_LEADING_ZEROS, 2); - task->data[0] = 5; + task->tState = 5; } break; case 2: @@ -448,35 +455,34 @@ static void Task_MixingRecordsRecv(u8 taskId) u8 subTaskId; task->data[6] = GetLinkPlayerCount_2(); - task->data[0] = 0; - task->data[5] = GetMultiplayerId_(); + task->tState = 0; + task->tMultiplayerId = GetMultiplayerId_(); task->func = Task_SendPacket; if (Link_AnyPartnersPlayingRubyOrSapphire()) { - StorePtrInTaskData(sSentRecord, (u16 *)&task->data[2]); + StorePtrInTaskData(sSentRecord, &task->tSentRecord); subTaskId = CreateTask(Task_CopyReceiveBuffer, 80); - task->data[10] = subTaskId; - gTasks[subTaskId].data[0] = taskId; - StorePtrInTaskData(sReceivedRecords, (u16 *)&gTasks[subTaskId].data[5]); - sRecordStructSize = sizeof(struct PlayerRecordsRS); + task->tCopyTaskId = subTaskId; + gTasks[subTaskId].tParentTaskId = taskId; + StorePtrInTaskData(sReceivedRecords, &gTasks[subTaskId].tRecvRecords); + sRecordStructSize = sizeof(struct PlayerRecordRS); } else { - StorePtrInTaskData(sSentRecord, (u16 *)&task->data[2]); + StorePtrInTaskData(sSentRecord, &task->tSentRecord); subTaskId = CreateTask(Task_CopyReceiveBuffer, 80); - task->data[10] = subTaskId; - gTasks[subTaskId].data[0] = taskId; - StorePtrInTaskData(sReceivedRecords, (u16 *)&gTasks[subTaskId].data[5]); - sRecordStructSize = sizeof(struct PlayerRecordsEmerald); + task->tCopyTaskId = subTaskId; + gTasks[subTaskId].tParentTaskId = taskId; + StorePtrInTaskData(sReceivedRecords, &gTasks[subTaskId].tRecvRecords); + sRecordStructSize = sizeof(struct PlayerRecordEmerald); } - // Note: This task is destroyed by Task_CopyReceiveBuffer when it's done. } break; case 5: // wait 60 frames if (++task->data[10] > 60) { task->data[10] = 0; - task->data[0] = 2; + task->tState = 2; } break; } @@ -485,34 +491,34 @@ static void Task_MixingRecordsRecv(u8 taskId) static void Task_SendPacket(u8 taskId) { struct Task *task = &gTasks[taskId]; - // does this send the data 24 times? - - switch (task->data[0]) + switch (task->tState) { - case 0: // Copy record data to send buffer + case 0: // Copy record data chunk to send buffer { - void *recordData = LoadPtrFromTaskData(&task->data[2]) + task->data[4] * BUFFER_CHUNK_SIZE; + void *recordData = LoadPtrFromTaskData(&task->tSentRecord) + task->tNumChunksSent * BUFFER_CHUNK_SIZE; memcpy(gBlockSendBuffer, recordData, BUFFER_CHUNK_SIZE); - task->data[0]++; + task->tState++; } break; case 1: if (GetMultiplayerId() == 0) SendBlockRequest(BLOCK_REQ_SIZE_200); - task->data[0]++; + task->tState++; break; case 2: break; case 3: - task->data[4]++; - if (task->data[4] == sRecordStructSize / 200 + 1) - task->data[0]++; + // If sent final chunk of record, move on to next state. + // Otherwise return to first state and send next chunk. + task->tNumChunksSent++; + if (task->tNumChunksSent == sRecordStructSize / BUFFER_CHUNK_SIZE + 1) + task->tState++; else - task->data[0] = 0; + task->tState = 0; break; case 4: - if (!gTasks[task->data[10]].isActive) + if (!gTasks[task->tCopyTaskId].isActive) task->func = Task_SendPacket_SwitchToReceive; break; } @@ -527,38 +533,35 @@ static void Task_CopyReceiveBuffer(u8 taskId) if (status == GetLinkPlayerCountAsBitFlags()) { u8 i; - for (i = 0; i < GetLinkPlayerCount(); i++) { - void *dest; - void *src; - if ((status >> i) & 1) { - dest = LoadPtrFromTaskData((u16 *)&task->data[5]) + task->data[i + 1] * BUFFER_CHUNK_SIZE + sRecordStructSize * i; - src = GetPlayerRecvBuffer(i); - if ((task->data[i + 1] + 1) * BUFFER_CHUNK_SIZE > sRecordStructSize) - memcpy(dest, src, sRecordStructSize - task->data[i + 1] * BUFFER_CHUNK_SIZE); + void *dest = LoadPtrFromTaskData(&task->tRecvRecords) + task->tNumChunksRecv(i) * BUFFER_CHUNK_SIZE + sRecordStructSize * i; + void *src = GetPlayerRecvBuffer(i); + if ((task->tNumChunksRecv(i) + 1) * BUFFER_CHUNK_SIZE > sRecordStructSize) + memcpy(dest, src, sRecordStructSize - task->tNumChunksRecv(i) * BUFFER_CHUNK_SIZE); else memcpy(dest, src, BUFFER_CHUNK_SIZE); ResetBlockReceivedFlag(i); - task->data[i + 1]++; - if (task->data[i + 1] == sRecordStructSize / BUFFER_CHUNK_SIZE + 1) + task->tNumChunksRecv(i)++; + if (task->tNumChunksRecv(i) == sRecordStructSize / BUFFER_CHUNK_SIZE + 1) handledPlayers++; } } - gTasks[task->data[0]].data[0]++; + gTasks[task->tParentTaskId].tState++; } if (handledPlayers == GetLinkPlayerCount()) DestroyTask(taskId); } -static void sub_80E776C(u8 taskId) +static void Task_WaitReceivePacket(u8 taskId) { struct Task *task = &gTasks[taskId]; - if (!gTasks[task->data[10]].isActive) + // Wait for Task_CopyReceiveBuffer to finish + if (!gTasks[task->tCopyTaskId].isActive) DestroyTask(taskId); } @@ -566,15 +569,15 @@ static void Task_ReceivePacket(u8 taskId) { struct Task *task = &gTasks[taskId]; - task->func = sub_80E776C; - if (gUnknown_03001130 == TRUE) - ReceiveExchangePacket(task->data[5]); + task->func = Task_WaitReceivePacket; + if (sReadyToReceive == TRUE) + ReceiveExchangePacket(task->tMultiplayerId); } static void Task_SendPacket_SwitchToReceive(u8 taskId) { gTasks[taskId].func = Task_ReceivePacket; - gUnknown_03001130 = TRUE; + sReadyToReceive = TRUE; } static void *LoadPtrFromTaskData(const u16 *asShort) @@ -607,46 +610,46 @@ static void ShufflePlayerIndices(u32 *data) switch (players) { case 2: - for (i = 0; i < 2; i++) - data[i] = gUnknown_0858CF8C[i]; + for (i = 0; i < ARRAY_COUNT(sPlayerIdxOrders_2Player); i++) + data[i] = sPlayerIdxOrders_2Player[i]; break; case 3: - linkTrainerId = GetLinkPlayerTrainerId(0) % 2; - for (i = 0; i < 3; i++) - data[i] = gUnknown_0858CF8E[linkTrainerId][i]; + linkTrainerId = GetLinkPlayerTrainerId(0) % ARRAY_COUNT(sPlayerIdxOrders_3Player); + for (i = 0; i < ARRAY_COUNT(sPlayerIdxOrders_3Player[0]); i++) + data[i] = sPlayerIdxOrders_3Player[linkTrainerId][i]; break; case 4: - linkTrainerId = GetLinkPlayerTrainerId(0) % 9; - for (i = 0; i < 4; i++) - data[i] = gUnknown_0858CF94[linkTrainerId][i]; + linkTrainerId = GetLinkPlayerTrainerId(0) % ARRAY_COUNT(sPlayerIdxOrders_4Player); + for (i = 0; i < ARRAY_COUNT(sPlayerIdxOrders_4Player[0]); i++) + data[i] = sPlayerIdxOrders_4Player[linkTrainerId][i]; break; } } -static void ReceiveOldManData(OldMan *oldMan, size_t recordSize, u8 which) +static void ReceiveOldManData(OldMan *records, size_t recordSize, u8 multiplayerId) { u8 version; u16 language; - OldMan *dest; + OldMan *oldMan; u32 mixIndices[MAX_LINK_PLAYERS]; ShufflePlayerIndices(mixIndices); - dest = (void *)oldMan + recordSize * mixIndices[which]; - version = gLinkPlayers[mixIndices[which]].version; - language = gLinkPlayers[mixIndices[which]].language; + oldMan = (void *)records + recordSize * mixIndices[multiplayerId]; + version = gLinkPlayers[mixIndices[multiplayerId]].version; + language = gLinkPlayers[mixIndices[multiplayerId]].language; if (Link_AnyPartnersPlayingRubyOrSapphire()) - SanitizeReceivedRubyOldMan(dest, version, language); + SanitizeReceivedRubyOldMan(oldMan, version, language); else - SanitizeReceivedEmeraldOldMan(dest, version, language); + SanitizeReceivedEmeraldOldMan(oldMan, version, language); - memcpy(sOldManSave, (void *)oldMan + recordSize * mixIndices[which], sizeof(OldMan)); + memcpy(sOldManSave, (void *)records + recordSize * mixIndices[multiplayerId], sizeof(OldMan)); ResetMauvilleOldManFlag(); } -static void ReceiveBattleTowerData(void *battleTowerRecord, size_t recordSize, u8 which) +static void ReceiveBattleTowerData(void *records, size_t recordSize, u8 multiplayerId) { - struct EmeraldBattleTowerRecord *dest; + struct EmeraldBattleTowerRecord *battleTowerRecord; struct BattleTowerPokemon *btPokemon; u32 mixIndices[MAX_LINK_PLAYERS]; s32 i; @@ -654,77 +657,90 @@ static void ReceiveBattleTowerData(void *battleTowerRecord, size_t recordSize, u ShufflePlayerIndices(mixIndices); if (Link_AnyPartnersPlayingRubyOrSapphire()) { - if (RubyBattleTowerRecordToEmerald((void *)battleTowerRecord + recordSize * mixIndices[which], (void *)battleTowerRecord + recordSize * which) == TRUE) + if (RubyBattleTowerRecordToEmerald((void *)records + recordSize * mixIndices[multiplayerId], (void *)records + recordSize * multiplayerId) == TRUE) { - dest = (void *)battleTowerRecord + recordSize * which; - dest->language = gLinkPlayers[mixIndices[which]].language; - CalcEmeraldBattleTowerChecksum(dest); + battleTowerRecord = (void *)records + recordSize * multiplayerId; + battleTowerRecord->language = gLinkPlayers[mixIndices[multiplayerId]].language; + CalcEmeraldBattleTowerChecksum(battleTowerRecord); } } else { - memcpy((void *)battleTowerRecord + recordSize * which, (void *)battleTowerRecord + recordSize * mixIndices[which], sizeof(struct EmeraldBattleTowerRecord)); - dest = (void *)battleTowerRecord + recordSize * which; + memcpy((void *)records + recordSize * multiplayerId, (void *)records + recordSize * mixIndices[multiplayerId], sizeof(struct EmeraldBattleTowerRecord)); + battleTowerRecord = (void *)records + recordSize * multiplayerId; for (i = 0; i < MAX_FRONTIER_PARTY_SIZE; i++) { - btPokemon = &dest->party[i]; + btPokemon = &battleTowerRecord->party[i]; if (btPokemon->species != SPECIES_NONE && IsStringJapanese(btPokemon->nickname)) ConvertInternationalString(btPokemon->nickname, LANGUAGE_JAPANESE); } - CalcEmeraldBattleTowerChecksum(dest); + CalcEmeraldBattleTowerChecksum(battleTowerRecord); } - PutNewBattleTowerRecord((void *)battleTowerRecord + recordSize * which); + PutNewBattleTowerRecord((void *)records + recordSize * multiplayerId); } -static void ReceiveLilycoveLadyData(LilycoveLady *lilycoveLady, size_t recordSize, u8 which) +static void ReceiveLilycoveLadyData(LilycoveLady *records, size_t recordSize, u8 multiplayerId) { - LilycoveLady *dest; + LilycoveLady *lilycoveLady; u32 mixIndices[MAX_LINK_PLAYERS]; ShufflePlayerIndices(mixIndices); - memcpy((void *)lilycoveLady + recordSize * which, sLilycoveLadySave, sizeof(LilycoveLady)); + memcpy((void *)records + recordSize * multiplayerId, sLilycoveLadySave, sizeof(LilycoveLady)); if (GetLilycoveLadyId() == 0) { - dest = malloc(sizeof(LilycoveLady)); - if (dest == NULL) + lilycoveLady = malloc(sizeof(*lilycoveLady)); + if (lilycoveLady == NULL) return; - memcpy(dest, sLilycoveLadySave, sizeof(LilycoveLady)); + memcpy(lilycoveLady, sLilycoveLadySave, sizeof(LilycoveLady)); } else { - dest = NULL; + lilycoveLady = NULL; } - memcpy(sLilycoveLadySave, (void *)lilycoveLady + recordSize * mixIndices[which], sizeof(LilycoveLady)); + memcpy(sLilycoveLadySave, (void *)records + recordSize * mixIndices[multiplayerId], sizeof(LilycoveLady)); ResetLilycoveLadyForRecordMix(); - if (dest != NULL) + if (lilycoveLady != NULL) { - QuizLadyClearQuestionForRecordMix(dest); - free(dest); + QuizLadyClearQuestionForRecordMix(lilycoveLady); + free(lilycoveLady); } } -static u8 sub_80E7A9C(struct DaycareMail *rmMail) +static u8 GetDaycareMailItemId(struct DaycareMail *mail) { - return rmMail->message.itemId; + return mail->message.itemId; } -static void sub_80E7AA4(struct RecordMixingDaycareMail *src, size_t recordSize, u8 (*idxs)[2], u8 which0, u8 which1) -{ - struct DaycareMail buffer; - struct RecordMixingDaycareMail *mail1; - struct RecordMixingDaycareMail *mail2; +// Indexes for a 2 element array used to store the multiplayer id and daycare +// slot that correspond to a daycare Pokémon that can hold an item. +enum { + MULTIPLAYER_ID, + DAYCARE_SLOT, +}; - mail1 = (void *)src + recordSize * idxs[which0][0]; - memcpy(&buffer, &mail1->mail[idxs[which0][1]], sizeof(struct DaycareMail)); - mail2 = (void *)src + recordSize * idxs[which1][0]; - memcpy(&mail1->mail[idxs[which0][1]], &mail2->mail[idxs[which1][1]], sizeof(struct DaycareMail)); - memcpy(&mail2->mail[idxs[which1][1]], &buffer, sizeof(struct DaycareMail)); +static void SwapDaycareMail(struct RecordMixingDaycareMail *records, size_t recordSize, u8 (*idxs)[2], u8 playerSlot1, u8 playerSlot2) +{ + struct DaycareMail temp; + struct RecordMixingDaycareMail *mixMail1, *mixMail2; + + // 1st player's daycare mail --> temp + mixMail1 = (void *)records + recordSize * idxs[playerSlot1][MULTIPLAYER_ID]; + memcpy(&temp, &mixMail1->mail[idxs[playerSlot1][DAYCARE_SLOT]], sizeof(struct DaycareMail)); + + // 2nd player's daycare mail --> 1st player's daycare mail + mixMail2 = (void *)records + recordSize * idxs[playerSlot2][MULTIPLAYER_ID]; + memcpy(&mixMail1->mail[idxs[playerSlot1][DAYCARE_SLOT]], &mixMail2->mail[idxs[playerSlot2][DAYCARE_SLOT]], sizeof(struct DaycareMail)); + + // temp --> 2nd player's daycare mail + memcpy(&mixMail2->mail[idxs[playerSlot2][DAYCARE_SLOT]], &temp, sizeof(struct DaycareMail)); } -static void sub_80E7B2C(const u8 *src) +// This sum is used to determine which players will swap daycare mail if there are more than 2 players who can. +// The TV show data is used to calculate this sum. +static void CalculateDaycareMailRandSum(const u8 *src) { u8 sum; s32 i; @@ -733,73 +749,80 @@ static void sub_80E7B2C(const u8 *src) for (i = 0; i < 256; i++) sum += src[i]; - gUnknown_03001160 = sum; + sDaycareMailRandSum = sum; } -static u8 sub_80E7B54(void) +static u8 GetDaycareMailRandSum(void) { - return gUnknown_03001160; + return sDaycareMailRandSum; } -static void ReceiveDaycareMailData(struct RecordMixingDaycareMail *src, size_t recordSize, u8 which, TVShow *shows) +static void ReceiveDaycareMailData(struct RecordMixingDaycareMail *records, size_t recordSize, u8 multiplayerId, TVShow *shows) { u16 i, j; u8 linkPlayerCount; u8 tableId; - struct RecordMixingDaycareMail *_src; - u8 which0, which1; + struct RecordMixingDaycareMail *mixMail; + u8 playerSlot1, playerSlot2; void *ptr; - u8 sp04[4]; - u8 sp08[4]; - struct RecordMixingDaycareMail *sp0c[4]; - u8 sp1c[4][2]; - u8 sp24[4][2]; - u8 sp34; + u8 unusedArr1[MAX_LINK_PLAYERS]; + u8 unusedArr2[MAX_LINK_PLAYERS]; + struct RecordMixingDaycareMail *unusedMixMail[MAX_LINK_PLAYERS]; + bool8 canHoldItem[MAX_LINK_PLAYERS][DAYCARE_MON_COUNT]; + u8 idxs[MAX_LINK_PLAYERS][2]; + u8 numDaycareCanHold; u16 oldSeed; bool32 anyRS; + // Seed RNG to the first player's trainer id so that + // every player has the same random swap occur + // (see the other use of Random2 in this function) oldSeed = Random2(); SeedRng2(gLinkPlayers[0].trainerId); linkPlayerCount = GetLinkPlayerCount(); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_LINK_PLAYERS; i++) { - sp04[i] = 0xFF; - sp08[i] = 0; - sp1c[i][0] = 0; - sp1c[i][1] = 0; + unusedArr1[i] = 0xFF; + unusedArr2[i] = 0; + canHoldItem[i][0] = FALSE; + canHoldItem[i][1] = FALSE; } + // Handle language differences if RS / Japanese players are present anyRS = Link_AnyPartnersPlayingRubyOrSapphire(); for (i = 0; i < GetLinkPlayerCount(); i++) { u32 language, version; - _src = (void *)src + i * recordSize; + mixMail = (void *)records + i * recordSize; language = gLinkPlayers[i].language; version = gLinkPlayers[i].version & 0xFF; - for (j = 0; j < _src->numDaycareMons; j++) + + for (j = 0; j < mixMail->numDaycareMons; j++) { u16 otNameLanguage, nicknameLanguage; - struct DaycareMail *recordMixingMail = &_src->mail[j]; + struct DaycareMail *daycareMail = &mixMail->mail[j]; - if (!recordMixingMail->message.itemId) + if (daycareMail->message.itemId == ITEM_NONE) continue; if (anyRS) { - if (StringLength(recordMixingMail->OT_name) <= 5) + // Handle OT name language + if (StringLength(daycareMail->otName) <= 5) { otNameLanguage = LANGUAGE_JAPANESE; } else { - StripExtCtrlCodes(recordMixingMail->OT_name); + StripExtCtrlCodes(daycareMail->otName); otNameLanguage = language; } - if (recordMixingMail->monName[0] == EXT_CTRL_CODE_BEGIN && recordMixingMail->monName[1] == EXT_CTRL_CODE_JPN) + // Handle nickname langugae + if (daycareMail->monName[0] == EXT_CTRL_CODE_BEGIN && daycareMail->monName[1] == EXT_CTRL_CODE_JPN) { - StripExtCtrlCodes(recordMixingMail->monName); + StripExtCtrlCodes(daycareMail->monName); nicknameLanguage = LANGUAGE_JAPANESE; } else @@ -807,121 +830,145 @@ static void ReceiveDaycareMailData(struct RecordMixingDaycareMail *src, size_t r nicknameLanguage = language; } + // Set languages if (version == VERSION_RUBY || version == VERSION_SAPPHIRE) { - recordMixingMail->gameLanguage = otNameLanguage; - recordMixingMail->monLanguage = nicknameLanguage; + daycareMail->gameLanguage = otNameLanguage; + daycareMail->monLanguage = nicknameLanguage; } } else if (language == LANGUAGE_JAPANESE) { - if (IsStringJapanese(recordMixingMail->OT_name)) - recordMixingMail->gameLanguage = LANGUAGE_JAPANESE; + if (IsStringJapanese(daycareMail->otName)) + daycareMail->gameLanguage = LANGUAGE_JAPANESE; else - recordMixingMail->gameLanguage = GAME_LANGUAGE; + daycareMail->gameLanguage = GAME_LANGUAGE; - if (IsStringJapanese(recordMixingMail->monName)) - recordMixingMail->monLanguage = LANGUAGE_JAPANESE; + if (IsStringJapanese(daycareMail->monName)) + daycareMail->monLanguage = LANGUAGE_JAPANESE; else - recordMixingMail->monLanguage = GAME_LANGUAGE; + daycareMail->monLanguage = GAME_LANGUAGE; } } } - sp34 = 0; + // For each player, get which of their daycare Pokémon can hold items + // (can't hold items if already holding one, or if daycare slot is empty). + // Note that when deposited in the daycare, Pokémon have their mail taken + // from them and returned upon withdrawal, which means daycare Pokémon that + // have associated mail do not have a held item. + // Because not holding an item is the only determination for a swap, this also + // means that a "swap" can occur even if neither Pokémon has associated mail. + numDaycareCanHold = 0; for (i = 0; i < linkPlayerCount; i++) { - _src = (void *)src + i * recordSize; - if (_src->numDaycareMons == 0) + mixMail = (void *)records + i * recordSize; + if (mixMail->numDaycareMons == 0) continue; - for (j = 0; j < _src->numDaycareMons; j++) + for (j = 0; j < mixMail->numDaycareMons; j++) { - if (!_src->holdsItem[j]) - sp1c[i][j] = 1; + if (!mixMail->cantHoldItem[j]) + canHoldItem[i][j] = TRUE; } } + // Fill the idxs array with data about which players + // and which daycare slots should swap mail. j = 0; for (i = 0; i < linkPlayerCount; i++) { - _src = (void *)src + i * recordSize; - if (sp1c[i][0] == TRUE || sp1c[i][1] == TRUE) - sp34++; + mixMail = (void *)records + i * recordSize; + + // Count number of players that have at least + // one daycare Pokémon with no held item + if (canHoldItem[i][0] == TRUE || canHoldItem[i][1] == TRUE) + numDaycareCanHold++; - if (sp1c[i][0] == TRUE && sp1c[i][1] == FALSE) + if (canHoldItem[i][0] == TRUE && canHoldItem[i][1] == FALSE) { - sp24[j][0] = i; - sp24[j][1] = 0; + // Only daycare slot 0 can hold an item for this player, record it + idxs[j][MULTIPLAYER_ID] = i; + idxs[j][DAYCARE_SLOT] = 0; j++; } - else if (sp1c[i][0] == FALSE && sp1c[i][1] == TRUE) + else if (canHoldItem[i][0] == FALSE && canHoldItem[i][1] == TRUE) { - sp24[j][0] = i; - sp24[j][1] = 1; + // Only daycare slot 1 can hold an item for this player, record it + idxs[j][MULTIPLAYER_ID] = i; + idxs[j][DAYCARE_SLOT] = 1; j++; } - else if (sp1c[i][0] == TRUE && sp1c[i][1] == TRUE) + else if (canHoldItem[i][0] == TRUE && canHoldItem[i][1] == TRUE) { - u32 var1, var2; + // Both daycare slots can hold an item, choose which one to use. + // If either one is the only one to have associated mail, use that one. + // If both do or don't have associated mail, choose one randomly. + u32 itemId1, itemId2; + idxs[j][MULTIPLAYER_ID] = i; + itemId1 = GetDaycareMailItemId(&mixMail->mail[0]); + itemId2 = GetDaycareMailItemId(&mixMail->mail[1]); + + if ((!itemId1 && !itemId2) || (itemId1 && itemId2)) + idxs[j][DAYCARE_SLOT] = Random2() % 2; + else if (itemId1 && !itemId2) + idxs[j][DAYCARE_SLOT] = 0; + else if (!itemId1 && itemId2) + idxs[j][DAYCARE_SLOT] = 1; - sp24[j][0] = i; - var1 = sub_80E7A9C(&_src->mail[0]); - var2 = sub_80E7A9C(&_src->mail[1]); - if (!(var1 || var2) || (var1 && var2)) - { - sp24[j][1] = Random2() % 2; - } - else if (var1 && !var2) - { - sp24[j][1] = 0; - } - else if (!var1 && var2) - { - sp24[j][1] = 1; - } j++; } } - for (i = 0; i < 4; i++) + // Copy the player's record mix mail 4 times to an array that's never read. + for (i = 0; i < MAX_LINK_PLAYERS; i++) { - _src = &src[which * recordSize]; - sp0c[i] = _src; + mixMail = &records[multiplayerId * recordSize]; + unusedMixMail[i] = mixMail; } - tableId = sub_80E7B54() % 3; - switch (sp34) + // Choose a random table id to determine who will + // swap if there are more than 2 candidate players. + tableId = GetDaycareMailRandSum() % NUM_SWAP_COMBOS; + switch (numDaycareCanHold) { case 2: - sub_80E7AA4(src, recordSize, sp24, 0, 1); + // 2 players can swap, just perform swap. + SwapDaycareMail(records, recordSize, idxs, 0, 1); break; case 3: - which0 = gUnknown_0858CFB8[tableId][0]; - which1 = gUnknown_0858CFB8[tableId][1]; - sub_80E7AA4(src, recordSize, sp24, which0, which1); + // 3 players can swap, select 2 and leave the 3rd out + playerSlot1 = sDaycareMailSwapIds_3Player[tableId][0]; + playerSlot2 = sDaycareMailSwapIds_3Player[tableId][1]; + SwapDaycareMail(records, recordSize, idxs, playerSlot1, playerSlot2); break; case 4: - ptr = sp24; - which0 = gUnknown_0858CFBE[tableId][0]; - which1 = gUnknown_0858CFBE[tableId][1]; - sub_80E7AA4(src, recordSize, ptr, which0, which1); - which0 = gUnknown_0858CFBE[tableId][2]; - which1 = gUnknown_0858CFBE[tableId][3]; - sub_80E7AA4(src, recordSize, ptr, which0, which1); + // 4 players can swap, select which 2 pairings will swap + ptr = idxs; + + // Swap pair 1 + playerSlot1 = sDaycareMailSwapIds_4Player[tableId][0]; + playerSlot2 = sDaycareMailSwapIds_4Player[tableId][1]; + SwapDaycareMail(records, recordSize, ptr, playerSlot1, playerSlot2); + + // Swap pair 2 + playerSlot1 = sDaycareMailSwapIds_4Player[tableId][2]; + playerSlot2 = sDaycareMailSwapIds_4Player[tableId][3]; + SwapDaycareMail(records, recordSize, ptr, playerSlot1, playerSlot2); break; } - _src = (void *)src + which * recordSize; - memcpy(&gSaveBlock1Ptr->daycare.mons[0].mail, &_src->mail[0], sizeof(struct DaycareMail)); - memcpy(&gSaveBlock1Ptr->daycare.mons[1].mail, &_src->mail[1], sizeof(struct DaycareMail)); + // Save player's record mixed mail to the daycare (in case it has changed) + mixMail = (void *)records + multiplayerId * recordSize; + memcpy(&gSaveBlock1Ptr->daycare.mons[0].mail, &mixMail->mail[0], sizeof(struct DaycareMail)); + memcpy(&gSaveBlock1Ptr->daycare.mons[1].mail, &mixMail->mail[1], sizeof(struct DaycareMail)); SeedRng(oldSeed); } -static void ReceiveGiftItem(u16 *item, u8 which) +static void ReceiveGiftItem(u16 *item, u8 multiplayerId) { - if (which != 0 && *item != ITEM_NONE && GetPocketByItemId(*item) == POCKET_KEY_ITEMS) + if (multiplayerId != 0 && *item != ITEM_NONE && GetPocketByItemId(*item) == POCKET_KEY_ITEMS) { if (!CheckBagHasItem(*item, 1) && !CheckPCHasItem(*item, 1) && AddBagItem(*item, 1)) { @@ -941,29 +988,28 @@ static void Task_DoRecordMixing(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: - task->data[0]++; + task->tState++; break; case 1: if (Link_AnyPartnersPlayingRubyOrSapphire()) - task->data[0]++; + task->tState++; else - task->data[0] = 6; + task->tState = 6; break; - - // Mixing Ruby/Sapphire records. case 2: + // Mixing Ruby/Sapphire records. SetContinueGameWarpStatusToDynamicWarp(); FullSaveGame(); - task->data[0]++; + task->tState++; break; case 3: if (CheckSaveFile()) { ClearContinueGameWarpStatus2(); - task->data[0] = 4; + task->tState = 4; task->data[1] = 0; } break; @@ -971,10 +1017,11 @@ static void Task_DoRecordMixing(u8 taskId) if (++task->data[1] > 10) { SetCloseLinkCallback(); - task->data[0]++; + task->tState++; } break; case 5: + // Finish mixing Ruby/Sapphire records if (gReceivedRemoteLinkPlayers == FALSE) DestroyTask(taskId); break; @@ -984,7 +1031,7 @@ static void Task_DoRecordMixing(u8 taskId) if (!Rfu_SetLinkRecovery(FALSE)) { CreateTask(Task_LinkSave, 5); - task->data[0]++; + task->tState++; } break; case 7: // wait for Task_LinkSave to finish. @@ -993,17 +1040,17 @@ static void Task_DoRecordMixing(u8 taskId) if (gWirelessCommType) { Rfu_SetLinkRecovery(TRUE); - task->data[0] = 8; + task->tState = 8; } else { - task->data[0] = 4; + task->tState = 4; } } break; case 8: SetLinkStandbyCallback(); - task->data[0]++; + task->tState++; break; case 9: if (IsLinkTaskFinished()) @@ -1012,8 +1059,6 @@ static void Task_DoRecordMixing(u8 taskId) } } -// New Emerald functions - static void GetSavedApprentices(struct Apprentice *dst, struct Apprentice *src) { s32 i, id; @@ -1031,7 +1076,7 @@ static void GetSavedApprentices(struct Apprentice *dst, struct Apprentice *src) numMixApprentices = 0; for (i = 0; i < 2; i++) { - id = ((i + gSaveBlock2Ptr->playerApprentice.saveId) % (APPRENTICE_COUNT - 1)) + 1; + id = (i + gSaveBlock2Ptr->playerApprentice.saveId) % (APPRENTICE_COUNT - 1) + 1; if (src[id].playerName[0] != EOS) { if (GetTrainerId(src[id].playerId) != GetTrainerId(gSaveBlock2Ptr->playerTrainerId)) @@ -1074,7 +1119,7 @@ void GetPlayerHallRecords(struct PlayerHallRecords *dst) for (i = 0; i < HALL_FACILITIES_COUNT; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { CopyTrainerId(dst->onePlayer[i][j].id, gSaveBlock2Ptr->playerTrainerId); dst->onePlayer[i][j].language = GAME_LANGUAGE; @@ -1082,7 +1127,7 @@ void GetPlayerHallRecords(struct PlayerHallRecords *dst) } } - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { dst->twoPlayers[j].language = GAME_LANGUAGE; CopyTrainerId(dst->twoPlayers[j].id1, gSaveBlock2Ptr->playerTrainerId); @@ -1091,17 +1136,17 @@ void GetPlayerHallRecords(struct PlayerHallRecords *dst) StringCopy(dst->twoPlayers[j].name2, gSaveBlock2Ptr->frontier.opponentNames[j]); } - for (i = 0; i < 2; i++) + for (i = 0; i < FRONTIER_LVL_MODE_COUNT; i++) { - dst->onePlayer[0][i].winStreak = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[FRONTIER_MODE_SINGLES][i]; - dst->onePlayer[1][i].winStreak = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[FRONTIER_MODE_DOUBLES][i]; - dst->onePlayer[2][i].winStreak = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[FRONTIER_MODE_MULTIS][i]; - dst->onePlayer[3][i].winStreak = gSaveBlock2Ptr->frontier.domeRecordWinStreaks[FRONTIER_MODE_SINGLES][i]; - dst->onePlayer[4][i].winStreak = gSaveBlock2Ptr->frontier.palaceRecordWinStreaks[FRONTIER_MODE_SINGLES][i]; - dst->onePlayer[5][i].winStreak = gSaveBlock2Ptr->frontier.arenaRecordStreaks[i]; - dst->onePlayer[6][i].winStreak = gSaveBlock2Ptr->frontier.factoryRecordWinStreaks[FRONTIER_MODE_SINGLES][i]; - dst->onePlayer[7][i].winStreak = gSaveBlock2Ptr->frontier.pikeRecordStreaks[i]; - dst->onePlayer[8][i].winStreak = gSaveBlock2Ptr->frontier.pyramidRecordStreaks[i]; + dst->onePlayer[RANKING_HALL_TOWER_SINGLES][i].winStreak = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[FRONTIER_MODE_SINGLES][i]; + dst->onePlayer[RANKING_HALL_TOWER_DOUBLES][i].winStreak = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[FRONTIER_MODE_DOUBLES][i]; + dst->onePlayer[RANKING_HALL_TOWER_MULTIS][i].winStreak = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[FRONTIER_MODE_MULTIS][i]; + dst->onePlayer[RANKING_HALL_DOME][i].winStreak = gSaveBlock2Ptr->frontier.domeRecordWinStreaks[FRONTIER_MODE_SINGLES][i]; + dst->onePlayer[RANKING_HALL_PALACE][i].winStreak = gSaveBlock2Ptr->frontier.palaceRecordWinStreaks[FRONTIER_MODE_SINGLES][i]; + dst->onePlayer[RANKING_HALL_ARENA][i].winStreak = gSaveBlock2Ptr->frontier.arenaRecordStreaks[i]; + dst->onePlayer[RANKING_HALL_FACTORY][i].winStreak = gSaveBlock2Ptr->frontier.factoryRecordWinStreaks[FRONTIER_MODE_SINGLES][i]; + dst->onePlayer[RANKING_HALL_PIKE][i].winStreak = gSaveBlock2Ptr->frontier.pikeRecordStreaks[i]; + dst->onePlayer[RANKING_HALL_PYRAMID][i].winStreak = gSaveBlock2Ptr->frontier.pyramidRecordStreaks[i]; dst->twoPlayers[i].winStreak = gSaveBlock2Ptr->frontier.towerRecordWinStreaks[FRONTIER_MODE_LINK_MULTIS][i]; } @@ -1115,28 +1160,26 @@ static bool32 IsApprenticeAlreadySaved(struct Apprentice *mixApprentice, struct { if (GetTrainerId(mixApprentice->playerId) == GetTrainerId(apprentices[i].playerId) && mixApprentice->number == apprentices[i].number) - { return TRUE; - } } return FALSE; } -static void ReceiveApprenticeData(struct Apprentice *mixApprentice, size_t recordSize, u32 multiplayerId) +static void ReceiveApprenticeData(struct Apprentice *records, size_t recordSize, u32 multiplayerId) { s32 i, numApprentices, apprenticeId; - struct Apprentice *mixApprenticePtr; + struct Apprentice *mixApprentice; u32 mixIndices[MAX_LINK_PLAYERS]; u32 apprenticeSaveId; ShufflePlayerIndices(mixIndices); - mixApprenticePtr = (void*)(mixApprentice) + (recordSize * mixIndices[multiplayerId]); + mixApprentice = (void*)records + (recordSize * mixIndices[multiplayerId]); numApprentices = 0; apprenticeId = 0; for (i = 0; i < 2; i++) { - if (mixApprenticePtr[i].playerName[0] != EOS && !IsApprenticeAlreadySaved(&mixApprenticePtr[i], &gSaveBlock2Ptr->apprentices[0])) + if (mixApprentice[i].playerName[0] != EOS && !IsApprenticeAlreadySaved(&mixApprentice[i], &gSaveBlock2Ptr->apprentices[0])) { numApprentices++; apprenticeId = i; @@ -1147,14 +1190,14 @@ static void ReceiveApprenticeData(struct Apprentice *mixApprentice, size_t recor { case 1: apprenticeSaveId = gSaveBlock2Ptr->playerApprentice.saveId + 1; - gSaveBlock2Ptr->apprentices[apprenticeSaveId] = mixApprenticePtr[apprenticeId]; + gSaveBlock2Ptr->apprentices[apprenticeSaveId] = mixApprentice[apprenticeId]; gSaveBlock2Ptr->playerApprentice.saveId = (gSaveBlock2Ptr->playerApprentice.saveId + 1) % (APPRENTICE_COUNT - 1); break; case 2: for (i = 0; i < 2; i++) { apprenticeSaveId = ((i ^ 1) + gSaveBlock2Ptr->playerApprentice.saveId) % (APPRENTICE_COUNT - 1) + 1; - gSaveBlock2Ptr->apprentices[apprenticeSaveId] = mixApprenticePtr[i]; + gSaveBlock2Ptr->apprentices[apprenticeSaveId] = mixApprentice[i]; } gSaveBlock2Ptr->playerApprentice.saveId = (gSaveBlock2Ptr->playerApprentice.saveId + 2) % (APPRENTICE_COUNT - 1); break; @@ -1183,15 +1226,15 @@ static void sub_80E8578(struct RecordMixingHallRecords *dst, void *hallRecords, for (i = 0; i < HALL_FACILITIES_COUNT; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { - for (k = 0; k < 3; k++) + for (k = 0; k < HALL_RECORDS_COUNT; k++) dst->hallRecords1P[i][j][k] = gSaveBlock2Ptr->hallRecords1P[i][j][k]; for (k = 0; k < linkPlayerCount - 1; k++) { var_68 = 0; - for (l = 0; l < 3; l++) + for (l = 0; l < HALL_RECORDS_COUNT; l++) { if (GetTrainerId(dst->hallRecords1P[i][j][l].id) == GetTrainerId(gUnknown_03001168[k]->onePlayer[i][j].id)) { @@ -1201,20 +1244,20 @@ static void sub_80E8578(struct RecordMixingHallRecords *dst, void *hallRecords, } } if (var_68 == 0) - dst->hallRecords1P[i][j][k + 3] = gUnknown_03001168[k]->onePlayer[i][j]; + dst->hallRecords1P[i][j][k + HALL_RECORDS_COUNT] = gUnknown_03001168[k]->onePlayer[i][j]; } } } - for (j = 0; j < 2; j++) + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { - for (k = 0; k < 3; k++) + for (k = 0; k < HALL_RECORDS_COUNT; k++) dst->hallRecords2P[j][k] = gSaveBlock2Ptr->hallRecords2P[j][k]; for (k = 0; k < linkPlayerCount - 1; k++) { var_68 = 0; - for (l = 0; l < 3; l++) + for (l = 0; l < HALL_RECORDS_COUNT; l++) { if (GetTrainerId(dst->hallRecords2P[j][l].id1) == GetTrainerId(gUnknown_03001168[k]->twoPlayers[j].id1) && GetTrainerId(dst->hallRecords2P[j][l].id2) == GetTrainerId(gUnknown_03001168[k]->twoPlayers[j].id2)) @@ -1225,7 +1268,7 @@ static void sub_80E8578(struct RecordMixingHallRecords *dst, void *hallRecords, } } if (var_68 == 0) - dst->hallRecords2P[j][k + 3] = gUnknown_03001168[k]->twoPlayers[j]; + dst->hallRecords2P[j][k + HALL_RECORDS_COUNT] = gUnknown_03001168[k]->twoPlayers[j]; } } } @@ -1234,7 +1277,7 @@ static void sub_80E8880(struct RankingHall1P *arg0, struct RankingHall1P *arg1) { s32 i, j; - for (i = 0; i < 3; i++) + for (i = 0; i < HALL_RECORDS_COUNT; i++) { s32 highestWinStreak = 0; s32 highestId = -1; @@ -1280,36 +1323,36 @@ static void sub_80E88CC(struct RankingHall2P *arg0, struct RankingHall2P *arg1) } } -static void sub_80E8924(struct RecordMixingHallRecords *arg0) +static void sub_80E8924(struct RecordMixingHallRecords *mixHallRecords) { s32 i, j; for (i = 0; i < HALL_FACILITIES_COUNT; i++) { - for (j = 0; j < 2; j++) - sub_80E8880(gSaveBlock2Ptr->hallRecords1P[i][j], arg0->hallRecords1P[i][j]); + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) + sub_80E8880(gSaveBlock2Ptr->hallRecords1P[i][j], mixHallRecords->hallRecords1P[i][j]); } - for (j = 0; j < 2; j++) - sub_80E88CC(gSaveBlock2Ptr->hallRecords2P[j], arg0->hallRecords2P[j]); + for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) + sub_80E88CC(gSaveBlock2Ptr->hallRecords2P[j], mixHallRecords->hallRecords2P[j]); } static void ReceiveRankingHallRecords(struct PlayerHallRecords *hallRecords, size_t recordSize, u32 arg2) { u8 linkPlayerCount = GetLinkPlayerCount(); - struct RecordMixingHallRecords *largeStructPtr = AllocZeroed(sizeof(struct RecordMixingHallRecords)); + struct RecordMixingHallRecords *mixHallRecords = AllocZeroed(sizeof(*mixHallRecords)); - sub_80E8578(largeStructPtr, hallRecords, recordSize, arg2, linkPlayerCount); - sub_80E8924(largeStructPtr); + sub_80E8578(mixHallRecords, hallRecords, recordSize, arg2, linkPlayerCount); + sub_80E8924(mixHallRecords); - Free(largeStructPtr); + Free(mixHallRecords); } static void GetRecordMixingDaycareMail(struct RecordMixingDaycareMail *dst) { - sDaycareMail.mail[0] = gSaveBlock1Ptr->daycare.mons[0].mail; - sDaycareMail.mail[1] = gSaveBlock1Ptr->daycare.mons[1].mail; - InitDaycareMailRecordMixing(&gSaveBlock1Ptr->daycare, &sDaycareMail); - *dst = *sDaycareMailSave; + sRecordMixMail.mail[0] = gSaveBlock1Ptr->daycare.mons[0].mail; + sRecordMixMail.mail[1] = gSaveBlock1Ptr->daycare.mons[1].mail; + InitDaycareMailRecordMixing(&gSaveBlock1Ptr->daycare, &sRecordMixMail); + *dst = *sRecordMixMailSave; } static void SanitizeDaycareMailForRuby(struct RecordMixingDaycareMail *src) @@ -1319,10 +1362,10 @@ static void SanitizeDaycareMailForRuby(struct RecordMixingDaycareMail *src) for (i = 0; i < src->numDaycareMons; i++) { struct DaycareMail *mail = &src->mail[i]; - if (mail->message.itemId != 0) + if (mail->message.itemId != ITEM_NONE) { if (mail->gameLanguage != LANGUAGE_JAPANESE) - PadNameString(mail->OT_name, EXT_CTRL_CODE_BEGIN); + PadNameString(mail->otName, EXT_CTRL_CODE_BEGIN); ConvertInternationalString(mail->monName, mail->monLanguage); } diff --git a/src/trade.c b/src/trade.c index d1fc14efe8..00db3c2329 100644 --- a/src/trade.c +++ b/src/trade.c @@ -101,7 +101,7 @@ static EWRAM_DATA u8 *sMenuTextAllocBuffer = NULL; // See the corresponding GFXTAGs in src/data/trade.h static EWRAM_DATA u8 *sMenuTextTileBuffers[GFXTAG_MENU_TEXT_COUNT] = {NULL}; -EWRAM_DATA struct MailStruct gTradeMail[PARTY_SIZE] = {0}; +EWRAM_DATA struct Mail gTradeMail[PARTY_SIZE] = {0}; EWRAM_DATA u8 gSelectedTradeMonPositions[2] = {0}; static EWRAM_DATA struct { /*0x0000*/ u8 bg2hofs; @@ -144,7 +144,7 @@ static EWRAM_DATA struct { } *sTradeMenuData = {NULL}; static EWRAM_DATA struct { - /*0x00*/ struct Pokemon mon; + /*0x00*/ struct Pokemon tempMon; // Used as a temp variable when swapping Pokémon /*0x64*/ u32 timer; /*0x68*/ u32 monPersonalities[2]; /*0x70*/ u8 filler_70[2]; @@ -238,7 +238,7 @@ static void SpriteCB_BouncingPokeballDepart(struct Sprite *); static void SpriteCB_BouncingPokeballDepartEnd(struct Sprite *); static void SpriteCB_BouncingPokeballArrive(struct Sprite *); static void BufferInGameTradeMonName(void); -static void SetInGameTradeMail(struct MailStruct *, const struct InGameTrade *); +static void SetInGameTradeMail(struct Mail *, const struct InGameTrade *); static void CB2_UpdateLinkTrade(void); static void CB2_TryFinishTrade(void); static void CB2_SaveAndEndTrade(void); @@ -1054,7 +1054,7 @@ static bool8 BufferTradeParties(void) } break; case 13: - Trade_Memcpy(gBlockSendBuffer, gSaveBlock1Ptr->mail, PARTY_SIZE * sizeof(struct MailStruct) + 4); + Trade_Memcpy(gBlockSendBuffer, gSaveBlock1Ptr->mail, PARTY_SIZE * sizeof(struct Mail) + 4); sTradeMenuData->bufferPartyState++; break; case 15: @@ -1065,7 +1065,7 @@ static bool8 BufferTradeParties(void) case 16: if (_GetBlockReceivedStatus() == 3) { - Trade_Memcpy(gTradeMail, gBlockRecvBuffer[id ^ 1], PARTY_SIZE * sizeof(struct MailStruct)); + Trade_Memcpy(gTradeMail, gBlockRecvBuffer[id ^ 1], PARTY_SIZE * sizeof(struct Mail)); TradeResetReceivedFlags(); sTradeMenuData->bufferPartyState++; } @@ -3043,18 +3043,16 @@ static void TradeMons(u8 playerPartyIdx, u8 partnerPartyIdx) u16 partnerMail = GetMonData(partnerMon, MON_DATA_MAIL); if (playerMail != MAIL_NONE) - ClearMailStruct(&gSaveBlock1Ptr->mail[playerMail]); + ClearMail(&gSaveBlock1Ptr->mail[playerMail]); - sTradeData->mon = *playerMon; - *playerMon = *partnerMon; - *partnerMon = sTradeData->mon; + SWAP(*playerMon, *partnerMon, sTradeData->tempMon); friendship = 70; if (!GetMonData(playerMon, MON_DATA_IS_EGG)) SetMonData(playerMon, MON_DATA_FRIENDSHIP, &friendship); if (partnerMail != MAIL_NONE) - GiveMailToMon2(playerMon, &gTradeMail[partnerMail]); + GiveMailToMon(playerMon, &gTradeMail[partnerMail]); UpdatePokedexForReceivedMon(playerPartyIdx); if (gReceivedRemoteLinkPlayers) @@ -4492,7 +4490,7 @@ static void _CreateInGameTradePokemon(u8 whichPlayerMon, u8 whichInGameTrade) const struct InGameTrade *inGameTrade = &sIngameTrades[whichInGameTrade]; u8 level = GetMonData(&gPlayerParty[whichPlayerMon], MON_DATA_LEVEL); - struct MailStruct mail; + struct Mail mail; u8 metLocation = METLOC_IN_GAME_TRADE; u8 isMail; struct Pokemon *pokemon = &gEnemyParty[0]; @@ -4535,7 +4533,7 @@ static void _CreateInGameTradePokemon(u8 whichPlayerMon, u8 whichInGameTrade) CalculateMonStats(&gEnemyParty[0]); } -static void SetInGameTradeMail(struct MailStruct *mail, const struct InGameTrade *trade) { +static void SetInGameTradeMail(struct Mail *mail, const struct InGameTrade *trade) { s32 i; for (i = 0; i < MAIL_WORDS_COUNT; i++) diff --git a/src/union_room.c b/src/union_room.c index db2d0247be..a889490f1c 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -1495,14 +1495,14 @@ static void Task_StartUnionRoomTrade(u8 taskId) } break; case 2: - memcpy(gBlockSendBuffer, gSaveBlock1Ptr->mail, sizeof(struct MailStruct) * PARTY_SIZE + 4); - if (SendBlock(0, gBlockSendBuffer, sizeof(struct MailStruct) * PARTY_SIZE + 4)) + memcpy(gBlockSendBuffer, gSaveBlock1Ptr->mail, sizeof(struct Mail) * PARTY_SIZE + 4); + if (SendBlock(0, gBlockSendBuffer, sizeof(struct Mail) * PARTY_SIZE + 4)) gTasks[taskId].data[0]++; break; case 3: if (GetBlockReceivedStatus() == 3) { - memcpy(gTradeMail, gBlockRecvBuffer[GetMultiplayerId() ^ 1], sizeof(struct MailStruct) * PARTY_SIZE); + memcpy(gTradeMail, gBlockRecvBuffer[GetMultiplayerId() ^ 1], sizeof(struct Mail) * PARTY_SIZE); ResetBlockReceivedFlags(); gSelectedTradeMonPositions[TRADE_PLAYER] = monId; gSelectedTradeMonPositions[TRADE_PARTNER] = PARTY_SIZE; From 7a89ad98c38cee231a2659135ef487bb5fc5ad9d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 24 Oct 2021 15:49:45 -0400 Subject: [PATCH 089/417] Document record mixing hall records --- include/constants/global.h | 1 + src/frontier_util.c | 22 +++---- src/record_mixing.c | 114 +++++++++++++++++++++---------------- 3 files changed, 77 insertions(+), 60 deletions(-) diff --git a/include/constants/global.h b/include/constants/global.h index 46518697cc..589a3012c1 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -59,6 +59,7 @@ // 7 facilities for single mode + tower double mode + tower multi mode. // Excludes link modes. See RANKING_HALL_* in include/constants/battle_frontier.h #define HALL_FACILITIES_COUNT 9 +// Received via record mixing, 1 for each player other than yourself #define HALL_RECORDS_COUNT 3 // Battle Frontier level modes. diff --git a/src/frontier_util.c b/src/frontier_util.c index bb758de4b4..ec3eba43a4 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -2303,20 +2303,20 @@ static void Fill1PRecords(struct RankingHall1P *dst, s32 hallFacilityId, s32 lvl static void Fill2PRecords(struct RankingHall2P *dst, s32 lvlMode) { s32 i, j; - struct RankingHall2P record2P[4]; + struct RankingHall2P record2P[HALL_RECORDS_COUNT + 1]; struct PlayerHallRecords *playerHallRecords = calloc(1, sizeof(struct PlayerHallRecords)); GetPlayerHallRecords(playerHallRecords); - for (i = 0; i < 3; i++) + for (i = 0; i < HALL_RECORDS_COUNT; i++) record2P[i] = gSaveBlock2Ptr->hallRecords2P[lvlMode][i]; - record2P[3] = playerHallRecords->twoPlayers[lvlMode]; + record2P[HALL_RECORDS_COUNT] = playerHallRecords->twoPlayers[lvlMode]; - for (i = 0; i < 3; i++) + for (i = 0; i < HALL_RECORDS_COUNT; i++) { s32 highestWinStreak = 0; s32 highestId = 0; - for (j = 0; j < 3; j++) + for (j = 0; j < HALL_RECORDS_COUNT; j++) { if (record2P[j].winStreak > highestWinStreak) { @@ -2324,8 +2324,8 @@ static void Fill2PRecords(struct RankingHall2P *dst, s32 lvlMode) highestWinStreak = record2P[j].winStreak; } } - if (record2P[3].winStreak >= highestWinStreak) - highestId = 3; + if (record2P[HALL_RECORDS_COUNT].winStreak >= highestWinStreak) + highestId = HALL_RECORDS_COUNT; dst[i] = record2P[highestId]; record2P[highestId].winStreak = 0; @@ -2338,8 +2338,8 @@ static void PrintHallRecords(s32 hallFacilityId, s32 lvlMode) { s32 i; s32 x; - struct RankingHall1P records1P[3]; - struct RankingHall2P records2P[3]; + struct RankingHall1P records1P[HALL_RECORDS_COUNT]; + struct RankingHall2P records2P[HALL_RECORDS_COUNT]; StringCopy(gStringVar1, sRecordsWindowChallengeTexts[hallFacilityId][0]); StringExpandPlaceholders(gStringVar4, sRecordsWindowChallengeTexts[hallFacilityId][1]); @@ -2351,13 +2351,13 @@ static void PrintHallRecords(s32 hallFacilityId, s32 lvlMode) gSaveBlock2Ptr->frontier.opponentNames[0][PLAYER_NAME_LENGTH] = EOS; gSaveBlock2Ptr->frontier.opponentNames[1][PLAYER_NAME_LENGTH] = EOS; Fill2PRecords(records2P, lvlMode); - for (i = 0; i < 3; i++) + for (i = 0; i < HALL_RECORDS_COUNT; i++) Print2PRecord(i, 1, 4, &records2P[i]); } else { Fill1PRecords(records1P, hallFacilityId, lvlMode); - for (i = 0; i < 3; i++) + for (i = 0; i < HALL_RECORDS_COUNT; i++) Print1PRecord(i, 1, 4, &records1P[i], hallFacilityId); } } diff --git a/src/record_mixing.c b/src/record_mixing.c index fe51667f42..7ffe6680f5 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -97,7 +97,7 @@ static void *sApprenticesSave; static void *sBattleTowerSave_Duplicate; static u32 sRecordStructSize; static u8 sDaycareMailRandSum; -static struct PlayerHallRecords *gUnknown_03001168[3]; +static struct PlayerHallRecords *sPartnerHallRecords[HALL_RECORDS_COUNT]; static EWRAM_DATA struct RecordMixingDaycareMail sRecordMixMail = {0}; static EWRAM_DATA union PlayerRecord *sReceivedRecords = NULL; @@ -278,8 +278,8 @@ static void ReceiveExchangePacket(u32 multiplayerId) ReceiveBattleTowerData(&sReceivedRecords->emerald.battleTowerRecord, sizeof(sReceivedRecords->emerald), multiplayerId); ReceiveGiftItem(&sReceivedRecords->emerald.giftItem, multiplayerId); ReceiveLilycoveLadyData(&sReceivedRecords->emerald.lilycoveLady, sizeof(sReceivedRecords->emerald), multiplayerId); - ReceiveApprenticeData(sReceivedRecords->emerald.apprentices, sizeof(sReceivedRecords->emerald), (u8) multiplayerId); - ReceiveRankingHallRecords(&sReceivedRecords->emerald.hallRecords, sizeof(sReceivedRecords->emerald), (u8) multiplayerId); + ReceiveApprenticeData(sReceivedRecords->emerald.apprentices, sizeof(sReceivedRecords->emerald), (u8)multiplayerId); + ReceiveRankingHallRecords(&sReceivedRecords->emerald.hallRecords, sizeof(sReceivedRecords->emerald), (u8)multiplayerId); } } @@ -1204,145 +1204,161 @@ static void ReceiveApprenticeData(struct Apprentice *records, size_t recordSize, } } -static void sub_80E8578(struct RecordMixingHallRecords *dst, void *hallRecords, size_t recordSize, u32 arg3, s32 linkPlayerCount) +static void GetNewHallRecords(struct RecordMixingHallRecords *dst, void *records, size_t recordSize, u32 multiplayerId, s32 linkPlayerCount) { s32 i, j, k, l; - s32 var_68; + s32 repeatTrainers; + // Load sPartnerHallRecords with link partners' hall records k = 0; - i = 0; - while (1) + for (i = 0; i < linkPlayerCount; i++) { - if (i >= linkPlayerCount) + if (i != multiplayerId) + sPartnerHallRecords[k++] = records; + if (k == HALL_RECORDS_COUNT) break; - if (i != arg3) - gUnknown_03001168[k++] = hallRecords; - - if (k == 3) - break; - hallRecords += recordSize; - i++; + records += recordSize; } + // Get improved 1P hall records for (i = 0; i < HALL_FACILITIES_COUNT; i++) { for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { + // First get the existing saved records for (k = 0; k < HALL_RECORDS_COUNT; k++) dst->hallRecords1P[i][j][k] = gSaveBlock2Ptr->hallRecords1P[i][j][k]; + // Then read the new mixed records for (k = 0; k < linkPlayerCount - 1; k++) { - var_68 = 0; + repeatTrainers = 0; for (l = 0; l < HALL_RECORDS_COUNT; l++) { - if (GetTrainerId(dst->hallRecords1P[i][j][l].id) == GetTrainerId(gUnknown_03001168[k]->onePlayer[i][j].id)) + // If the new trainer is already in the existing saved records, only + // use the new one if the win streak is better + if (GetTrainerId(dst->hallRecords1P[i][j][l].id) == GetTrainerId(sPartnerHallRecords[k]->onePlayer[i][j].id)) { - var_68++; - if (dst->hallRecords1P[i][j][l].winStreak < gUnknown_03001168[k]->onePlayer[i][j].winStreak) - dst->hallRecords1P[i][j][l] = gUnknown_03001168[k]->onePlayer[i][j]; + repeatTrainers++; + if (dst->hallRecords1P[i][j][l].winStreak < sPartnerHallRecords[k]->onePlayer[i][j].winStreak) + dst->hallRecords1P[i][j][l] = sPartnerHallRecords[k]->onePlayer[i][j]; } } - if (var_68 == 0) - dst->hallRecords1P[i][j][k + HALL_RECORDS_COUNT] = gUnknown_03001168[k]->onePlayer[i][j]; + + // If all of the mixed records are new trainers, just save them + if (repeatTrainers == 0) + dst->hallRecords1P[i][j][k + HALL_RECORDS_COUNT] = sPartnerHallRecords[k]->onePlayer[i][j]; } } } + // Get improved 2P hall records for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) { + // First get the existing saved records for (k = 0; k < HALL_RECORDS_COUNT; k++) dst->hallRecords2P[j][k] = gSaveBlock2Ptr->hallRecords2P[j][k]; + // Then read the new mixed records for (k = 0; k < linkPlayerCount - 1; k++) { - var_68 = 0; + repeatTrainers = 0; for (l = 0; l < HALL_RECORDS_COUNT; l++) { - if (GetTrainerId(dst->hallRecords2P[j][l].id1) == GetTrainerId(gUnknown_03001168[k]->twoPlayers[j].id1) - && GetTrainerId(dst->hallRecords2P[j][l].id2) == GetTrainerId(gUnknown_03001168[k]->twoPlayers[j].id2)) + // If the new trainer pair is already in the existing saved records, only + // use the new pair if the win streak is better + if (GetTrainerId(dst->hallRecords2P[j][l].id1) == GetTrainerId(sPartnerHallRecords[k]->twoPlayers[j].id1) + && GetTrainerId(dst->hallRecords2P[j][l].id2) == GetTrainerId(sPartnerHallRecords[k]->twoPlayers[j].id2)) { - var_68++; - if (dst->hallRecords2P[j][l].winStreak < gUnknown_03001168[k]->twoPlayers[j].winStreak) - dst->hallRecords2P[j][l] = gUnknown_03001168[k]->twoPlayers[j]; + repeatTrainers++; + if (dst->hallRecords2P[j][l].winStreak < sPartnerHallRecords[k]->twoPlayers[j].winStreak) + dst->hallRecords2P[j][l] = sPartnerHallRecords[k]->twoPlayers[j]; } } - if (var_68 == 0) - dst->hallRecords2P[j][k + HALL_RECORDS_COUNT] = gUnknown_03001168[k]->twoPlayers[j]; + + // If all of the mixed records are new trainer pairs, just save them + if (repeatTrainers == 0) + dst->hallRecords2P[j][k + HALL_RECORDS_COUNT] = sPartnerHallRecords[k]->twoPlayers[j]; } } } -static void sub_80E8880(struct RankingHall1P *arg0, struct RankingHall1P *arg1) +static void FillWinStreakRecords1P(struct RankingHall1P *playerRecords, struct RankingHall1P *mixRecords) { s32 i, j; + // Fill the player's 1P records with the highest win streaks from the mixed records for (i = 0; i < HALL_RECORDS_COUNT; i++) { + // Get the highest remaining win streak in the mixed hall records s32 highestWinStreak = 0; s32 highestId = -1; - for (j = 0; j < 6; j++) + for (j = 0; j < HALL_RECORDS_COUNT * 2; j++) { - if (arg1[j].winStreak > highestWinStreak) + if (mixRecords[j].winStreak > highestWinStreak) { highestId = j; - highestWinStreak = arg1[j].winStreak; + highestWinStreak = mixRecords[j].winStreak; } } + // Save the win streak to the player's records, then clear it from the mixed records if (highestId >= 0) { - arg0[i] = arg1[highestId]; - arg1[highestId].winStreak = 0; + playerRecords[i] = mixRecords[highestId]; + mixRecords[highestId].winStreak = 0; } } } -static void sub_80E88CC(struct RankingHall2P *arg0, struct RankingHall2P *arg1) +static void FillWinStreakRecords2P(struct RankingHall2P *playerRecords, struct RankingHall2P *mixRecords) { s32 i, j; - for (i = 0; i < 3; i++) + // Fill the player's 2P records with the highest win streaks from the mixed records + for (i = 0; i < HALL_RECORDS_COUNT; i++) { + // Get the highest remaining win streak in the mixed hall records s32 highestWinStreak = 0; s32 highestId = -1; - for (j = 0; j < 6; j++) + for (j = 0; j < HALL_RECORDS_COUNT * 2; j++) { - if (arg1[j].winStreak > highestWinStreak) + if (mixRecords[j].winStreak > highestWinStreak) { highestId = j; - highestWinStreak = arg1[j].winStreak; + highestWinStreak = mixRecords[j].winStreak; } } + // Save the win streak to the player's records, then clear it from the mixed records if (highestId >= 0) { - arg0[i] = arg1[highestId]; - arg1[highestId].winStreak = 0; + playerRecords[i] = mixRecords[highestId]; + mixRecords[highestId].winStreak = 0; } } } -static void sub_80E8924(struct RecordMixingHallRecords *mixHallRecords) +static void SaveHighestWinStreakRecords(struct RecordMixingHallRecords *mixHallRecords) { s32 i, j; for (i = 0; i < HALL_FACILITIES_COUNT; i++) { for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) - sub_80E8880(gSaveBlock2Ptr->hallRecords1P[i][j], mixHallRecords->hallRecords1P[i][j]); + FillWinStreakRecords1P(gSaveBlock2Ptr->hallRecords1P[i][j], mixHallRecords->hallRecords1P[i][j]); } for (j = 0; j < FRONTIER_LVL_MODE_COUNT; j++) - sub_80E88CC(gSaveBlock2Ptr->hallRecords2P[j], mixHallRecords->hallRecords2P[j]); + FillWinStreakRecords2P(gSaveBlock2Ptr->hallRecords2P[j], mixHallRecords->hallRecords2P[j]); } -static void ReceiveRankingHallRecords(struct PlayerHallRecords *hallRecords, size_t recordSize, u32 arg2) +static void ReceiveRankingHallRecords(struct PlayerHallRecords *records, size_t recordSize, u32 multiplayerId) { u8 linkPlayerCount = GetLinkPlayerCount(); struct RecordMixingHallRecords *mixHallRecords = AllocZeroed(sizeof(*mixHallRecords)); - sub_80E8578(mixHallRecords, hallRecords, recordSize, arg2, linkPlayerCount); - sub_80E8924(mixHallRecords); + GetNewHallRecords(mixHallRecords, records, recordSize, multiplayerId, linkPlayerCount); + SaveHighestWinStreakRecords(mixHallRecords); Free(mixHallRecords); } From a612c27f2ded23f713b2199764b65c6b8b4aaf9d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 25 Oct 2021 10:20:48 -0400 Subject: [PATCH 090/417] Drop battle transition 'phase' terminology --- include/battle_transition.h | 3 +- include/battle_transition_frontier.h | 16 +- src/battle_transition.c | 1361 +++++++++++++------------- src/battle_transition_frontier.c | 67 +- src/tileset_anims.c | 4 +- 5 files changed, 723 insertions(+), 728 deletions(-) diff --git a/include/battle_transition.h b/include/battle_transition.h index 784c5f968f..e978e9094c 100644 --- a/include/battle_transition.h +++ b/include/battle_transition.h @@ -1,12 +1,11 @@ #ifndef GUARD_BATTLE_TRANSITION_H #define GUARD_BATTLE_TRANSITION_H -void TestBattleTransition(u8 transitionId); void BattleTransition_StartOnField(u8 transitionId); void BattleTransition_Start(u8 transitionId); bool8 IsBattleTransitionDone(void); bool8 FldEff_Pokeball(void); -void TransitionPhase1_Task_RunFuncs(u8 taskId); +void Task_BattleTransition_Intro(u8 taskId); void GetBg0TilesDst(u16 **tilemap, u16 **tileset); extern const struct SpritePalette gSpritePalette_Pokeball; diff --git a/include/battle_transition_frontier.h b/include/battle_transition_frontier.h index 8813fe81e0..22d674923e 100644 --- a/include/battle_transition_frontier.h +++ b/include/battle_transition_frontier.h @@ -1,13 +1,13 @@ #ifndef GUARD_BATTLE_TRANSITION_FRONTIER_H #define GUARD_BATTLE_TRANSITION_FRONTIER_H -void Phase2Task_FrontierCirclesMeet(u8 taskId); -void Phase2Task_FrontierCirclesCross(u8 taskId); -void Phase2Task_FrontierCirclesAsymmetricSpiral(u8 taskId); -void Phase2Task_FrontierCirclesSymmetricSpiral(u8 taskId); -void Phase2Task_FrontierCirclesMeetInSeq(u8 taskId); -void Phase2Task_FrontierCirclesCrossInSeq(u8 taskId); -void Phase2Task_FrontierCirclesAsymmetricSpiralInSeq(u8 taskId); -void Phase2Task_FrontierCirclesSymmetricSpiralInSeq(u8 taskId); +void Task_FrontierCirclesMeet(u8 taskId); +void Task_FrontierCirclesCross(u8 taskId); +void Task_FrontierCirclesAsymmetricSpiral(u8 taskId); +void Task_FrontierCirclesSymmetricSpiral(u8 taskId); +void Task_FrontierCirclesMeetInSeq(u8 taskId); +void Task_FrontierCirclesCrossInSeq(u8 taskId); +void Task_FrontierCirclesAsymmetricSpiralInSeq(u8 taskId); +void Task_FrontierCirclesSymmetricSpiralInSeq(u8 taskId); #endif // GUARD_BATTLE_TRANSITION_FRONTIER_H diff --git a/src/battle_transition.c b/src/battle_transition.c index 2fc4c68544..983a502176 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -60,186 +60,186 @@ struct StructRectangularSpiral typedef bool8 (*TransitionStateFunc)(struct Task *task); typedef bool8 (*TransitionSpriteCallback)(struct Sprite *sprite); -// this file's functions +static bool8 Transition_StartIntro(struct Task *task); +static bool8 Transition_WaitForIntro(struct Task *task); +static bool8 Transition_StartMain(struct Task *task); +static bool8 Transition_WaitForMain(struct Task *task); + static void LaunchBattleTransitionTask(u8 transitionId); -static void Task_BattleTransitionMain(u8 taskId); -static void Phase1Task_TransitionAll(u8 taskId); -static void Phase2Task_Blur(u8 taskId); -static void Phase2Task_Swirl(u8 taskId); -static void Phase2Task_Shuffle(u8 taskId); -static void Phase2Task_BigPokeball(u8 taskId); -static void Phase2Task_PokeballsTrail(u8 taskId); -static void Phase2Task_Clockwise_BlackFade(u8 taskId); -static void Phase2Task_Ripple(u8 taskId); -static void Phase2Task_Wave(u8 taskId); -static void Phase2Task_Slice(u8 taskId); -static void Phase2Task_WhiteFade(u8 taskId); -static void Phase2Task_GridSquares(u8 taskId); -static void Phase2Task_Shards(u8 taskId); -static void Phase2Task_Sidney(u8 taskId); -static void Phase2Task_Phoebe(u8 taskId); -static void Phase2Task_Glacia(u8 taskId); -static void Phase2Task_Drake(u8 taskId); -static void Phase2Task_Champion(u8 taskId); -static void Phase2Task_Aqua(u8 taskId); -static void Phase2Task_Magma(u8 taskId); -static void Phase2Task_Regice(u8 taskId); -static void Phase2Task_Registeel(u8 taskId); -static void Phase2Task_Regirock(u8 taskId); -static void Phase2Task_Kyogre(u8 taskId); -static void Phase2Task_Groudon(u8 taskId); -static void Phase2Task_Rayquaza(u8 taskId); -static void Phase2Task_ShredSplit(u8 taskId); -static void Phase2Task_Blackhole1(u8 taskId); -static void Phase2Task_Blackhole2(u8 taskId); -static void Phase2Task_RectangularSpiral(u8 taskId); -static void Phase2Task_FrontierLogoWiggle(u8 taskId); -static void Phase2Task_FrontierLogoWave(u8 taskId); -static void Phase2Task_FrontierSquares(u8 taskId); -static void Phase2Task_FrontierSquaresScroll(u8 taskId); -static void Phase2Task_FrontierSquaresSpiral(u8 taskId); +static void Task_BattleTransition(u8 taskId); +static void Task_Intro(u8 taskId); +static void Task_Blur(u8 taskId); +static void Task_Swirl(u8 taskId); +static void Task_Shuffle(u8 taskId); +static void Task_BigPokeball(u8 taskId); +static void Task_PokeballsTrail(u8 taskId); +static void Task_Clockwise_BlackFade(u8 taskId); +static void Task_Ripple(u8 taskId); +static void Task_Wave(u8 taskId); +static void Task_Slice(u8 taskId); +static void Task_WhiteFade(u8 taskId); +static void Task_GridSquares(u8 taskId); +static void Task_Shards(u8 taskId); +static void Task_Sidney(u8 taskId); +static void Task_Phoebe(u8 taskId); +static void Task_Glacia(u8 taskId); +static void Task_Drake(u8 taskId); +static void Task_Champion(u8 taskId); +static void Task_Aqua(u8 taskId); +static void Task_Magma(u8 taskId); +static void Task_Regice(u8 taskId); +static void Task_Registeel(u8 taskId); +static void Task_Regirock(u8 taskId); +static void Task_Kyogre(u8 taskId); +static void Task_Groudon(u8 taskId); +static void Task_Rayquaza(u8 taskId); +static void Task_ShredSplit(u8 taskId); +static void Task_Blackhole1(u8 taskId); +static void Task_Blackhole2(u8 taskId); +static void Task_RectangularSpiral(u8 taskId); +static void Task_FrontierLogoWiggle(u8 taskId); +static void Task_FrontierLogoWave(u8 taskId); +static void Task_FrontierSquares(u8 taskId); +static void Task_FrontierSquaresScroll(u8 taskId); +static void Task_FrontierSquaresSpiral(u8 taskId); static void VBlankCB_BattleTransition(void); -static void VBlankCB_Phase2_Swirl(void); -static void HBlankCB_Phase2_Swirl(void); -static void VBlankCB_Phase2_Shuffle(void); -static void HBlankCB_Phase2_Shuffle(void); -static void VBlankCB0_Phase2_BigPokeball(void); -static void VBlankCB1_Phase2_BigPokeball(void); -static void VBlankCB_Phase2_Clockwise_BlackFade(void); -static void VBlankCB_Phase2_Ripple(void); -static void HBlankCB_Phase2_Ripple(void); -static void VBlankCB_Phase2_30(void); -static void HBlankCB_Phase2_30(void); -static void VBlankCB_Phase2_Wave(void); -static void VBlankCB_Phase2_Slice(void); -static void HBlankCB_Phase2_Slice(void); -static void VBlankCB0_Phase2_WhiteFade(void); -static void VBlankCB1_Phase2_WhiteFade(void); -static void HBlankCB_Phase2_WhiteFade(void); -static void VBlankCB_Phase2_Shards(void); -static void VBlankCB_Phase2_Rayquaza(void); -static bool8 Phase2_Blur_Func1(struct Task *task); -static bool8 Phase2_Blur_Func2(struct Task *task); -static bool8 Phase2_Blur_Func3(struct Task *task); -static bool8 Phase2_Swirl_Func1(struct Task *task); -static bool8 Phase2_Swirl_Func2(struct Task *task); -static bool8 Phase2_Shuffle_Func1(struct Task *task); -static bool8 Phase2_Shuffle_Func2(struct Task *task); -static bool8 Phase2_Aqua_Func1(struct Task *task); -static bool8 Phase2_Aqua_Func2(struct Task *task); -static bool8 Phase2_Magma_Func1(struct Task *task); -static bool8 Phase2_Magma_Func2(struct Task *task); -static bool8 Phase2_FramesCountdown(struct Task *task); -static bool8 Phase2_Regi_Func1(struct Task *task); -static bool8 Phase2_Regice_Func2(struct Task *task); -static bool8 Phase2_Registeel_Func2(struct Task *task); -static bool8 Phase2_Regirock_Func2(struct Task *task); -static bool8 Phase2_WeatherTrio_Func1(struct Task *task); -static bool8 Phase2_WaitPaletteFade(struct Task *task); -static bool8 Phase2_Kyogre_Func3(struct Task *task); -static bool8 Phase2_Kyogre_Func4(struct Task *task); -static bool8 Phase2_Kyogre_Func5(struct Task *task); -static bool8 Phase2_Groudon_Func3(struct Task *task); -static bool8 Phase2_Groudon_Func4(struct Task *task); -static bool8 Phase2_Groudon_Func5(struct Task *task); -static bool8 Phase2_WeatherDuo_Func6(struct Task *task); -static bool8 Phase2_WeatherDuo_Func7(struct Task *task); -static bool8 Phase2_BigPokeball_Func1(struct Task *task); -static bool8 Phase2_BigPokeball_Func2(struct Task *task); -static bool8 Phase2_BigPokeball_Func3(struct Task *task); -static bool8 Phase2_BigPokeball_Func4(struct Task *task); -static bool8 Phase2_BigPokeball_Func5(struct Task *task); -static bool8 Phase2_BigPokeball_Func6(struct Task *task); -static bool8 Phase2_PokeballsTrail_Func1(struct Task *task); -static bool8 Phase2_PokeballsTrail_Func2(struct Task *task); -static bool8 Phase2_PokeballsTrail_Func3(struct Task *task); -static bool8 Phase2_Clockwise_BlackFade_Func1(struct Task *task); -static bool8 Phase2_Clockwise_BlackFade_Func2(struct Task *task); -static bool8 Phase2_Clockwise_BlackFade_Func3(struct Task *task); -static bool8 Phase2_Clockwise_BlackFade_Func4(struct Task *task); -static bool8 Phase2_Clockwise_BlackFade_Func5(struct Task *task); -static bool8 Phase2_Clockwise_BlackFade_Func6(struct Task *task); -static bool8 Phase2_Clockwise_BlackFade_Func7(struct Task *task); -static bool8 Phase2_Ripple_Func1(struct Task *task); -static bool8 Phase2_Ripple_Func2(struct Task *task); -static bool8 Phase2_Wave_Func1(struct Task *task); -static bool8 Phase2_Wave_Func2(struct Task *task); -static bool8 Phase2_Wave_Func3(struct Task *task); -static bool8 Phase2_Slice_Func1(struct Task *task); -static bool8 Phase2_Slice_Func2(struct Task *task); -static bool8 Phase2_Slice_Func3(struct Task *task); -static bool8 Phase2_WhiteFade_Func1(struct Task *task); -static bool8 Phase2_WhiteFade_Func2(struct Task *task); -static bool8 Phase2_WhiteFade_Func3(struct Task *task); -static bool8 Phase2_WhiteFade_Func4(struct Task *task); -static bool8 Phase2_WhiteFade_Func5(struct Task *task); -static bool8 Phase2_GridSquares_Func1(struct Task *task); -static bool8 Phase2_GridSquares_Func2(struct Task *task); -static bool8 Phase2_GridSquares_Func3(struct Task *task); -static bool8 Phase2_Shards_Func1(struct Task *task); -static bool8 Phase2_Shards_Func2(struct Task *task); -static bool8 Phase2_Shards_Func3(struct Task *task); -static bool8 Phase2_Shards_Func4(struct Task *task); -static bool8 Phase2_Shards_Func5(struct Task *task); -static bool8 Phase2_ShredSplit_Func1(struct Task *task); -static bool8 Phase2_ShredSplit_Func2(struct Task *task); -static bool8 Phase2_ShredSplit_Func3(struct Task *task); -static bool8 Phase2_ShredSplit_Func4(struct Task *task); -static bool8 Phase2_Blackhole_Func1(struct Task *task); -static bool8 Phase2_Blackhole1_Func2(struct Task *task); -static bool8 Phase2_Blackhole1_Func3(struct Task *task); -static bool8 Phase2_Blackhole2_Func2(struct Task *task); -static bool8 Phase2_RectangularSpiral_Func1(struct Task *task); -static bool8 Phase2_RectangularSpiral_Func2(struct Task *task); -static bool8 Phase2_RectangularSpiral_Func3(struct Task *task); -static bool8 Phase2_FrontierLogoWiggle_Func1(struct Task *task); -static bool8 Phase2_FrontierLogoWiggle_Func2(struct Task *task); -static bool8 Phase2_FrontierLogoWave_Func1(struct Task *task); -static bool8 Phase2_FrontierLogoWave_Func2(struct Task *task); -static bool8 Phase2_FrontierLogoWave_Func3(struct Task *task); -static bool8 Phase2_FrontierLogoWave_Func4(struct Task *task); -static bool8 Phase2_Rayquaza_Func3(struct Task *task); -static bool8 Phase2_Rayquaza_Func4(struct Task *task); -static bool8 Phase2_Rayquaza_Func5(struct Task *task); -static bool8 Phase2_Rayquaza_Func6(struct Task *task); -static bool8 Phase2_Rayquaza_Func7(struct Task *task); -static bool8 Phase2_Rayquaza_Func8(struct Task *task); -static bool8 Phase2_Rayquaza_Func9(struct Task *task); -static bool8 Phase2_FrontierSquares_Func1(struct Task *task); -static bool8 Phase2_FrontierSquares_Func2(struct Task *task); -static bool8 Phase2_FrontierSquares_Func3(struct Task *task); -static bool8 Phase2_FrontierSquares_End(struct Task *task); -static bool8 Phase2_FrontierSquaresSpiral_Func1(struct Task *task); -static bool8 Phase2_FrontierSquaresSpiral_Func2(struct Task *task); -static bool8 Phase2_FrontierSquaresSpiral_Func3(struct Task *task); -static bool8 Phase2_FrontierSquaresSpiral_Func4(struct Task *task); -static bool8 Phase2_FrontierSquaresScroll_Func1(struct Task *task); -static bool8 Phase2_FrontierSquaresScroll_Func2(struct Task *task); -static bool8 Phase2_FrontierSquaresScroll_Func3(struct Task *task); -static bool8 Phase2_FrontierSquaresScroll_Func4(struct Task *task); -static bool8 Phase2_FrontierSquaresScroll_Func5(struct Task *task); -static bool8 Phase2_Mugshot_Func1(struct Task *task); -static bool8 Phase2_Mugshot_Func2(struct Task *task); -static bool8 Phase2_Mugshot_Func3(struct Task *task); -static bool8 Phase2_Mugshot_Func4(struct Task *task); -static bool8 Phase2_Mugshot_Func5(struct Task *task); -static bool8 Phase2_Mugshot_Func6(struct Task *task); -static bool8 Phase2_Mugshot_Func7(struct Task *task); -static bool8 Phase2_Mugshot_Func8(struct Task *task); -static bool8 Phase2_Mugshot_Func9(struct Task *task); -static bool8 Phase2_Mugshot_Func10(struct Task *task); -static void Phase2Task_MugShotTransition(u8 taskId); +static void VBlankCB_Swirl(void); +static void HBlankCB_Swirl(void); +static void VBlankCB_Shuffle(void); +static void HBlankCB_Shuffle(void); +static void VBlankCB0_BigPokeball(void); +static void VBlankCB1_BigPokeball(void); +static void VBlankCB_Clockwise_BlackFade(void); +static void VBlankCB_Ripple(void); +static void HBlankCB_Ripple(void); +static void VBlankCB_30(void); +static void HBlankCB_30(void); +static void VBlankCB_Wave(void); +static void VBlankCB_Slice(void); +static void HBlankCB_Slice(void); +static void VBlankCB0_WhiteFade(void); +static void VBlankCB1_WhiteFade(void); +static void HBlankCB_WhiteFade(void); +static void VBlankCB_Shards(void); +static void VBlankCB_Rayquaza(void); +static bool8 Blur_Func1(struct Task *task); +static bool8 Blur_Func2(struct Task *task); +static bool8 Blur_Func3(struct Task *task); +static bool8 Swirl_Func1(struct Task *task); +static bool8 Swirl_Func2(struct Task *task); +static bool8 Shuffle_Func1(struct Task *task); +static bool8 Shuffle_Func2(struct Task *task); +static bool8 Aqua_Func1(struct Task *task); +static bool8 Aqua_Func2(struct Task *task); +static bool8 Magma_Func1(struct Task *task); +static bool8 Magma_Func2(struct Task *task); +static bool8 FramesCountdown(struct Task *task); +static bool8 Regi_Func1(struct Task *task); +static bool8 Regice_Func2(struct Task *task); +static bool8 Registeel_Func2(struct Task *task); +static bool8 Regirock_Func2(struct Task *task); +static bool8 WeatherTrio_Func1(struct Task *task); +static bool8 WaitPaletteFade(struct Task *task); +static bool8 Kyogre_Func3(struct Task *task); +static bool8 Kyogre_Func4(struct Task *task); +static bool8 Kyogre_Func5(struct Task *task); +static bool8 Groudon_Func3(struct Task *task); +static bool8 Groudon_Func4(struct Task *task); +static bool8 Groudon_Func5(struct Task *task); +static bool8 WeatherDuo_Func6(struct Task *task); +static bool8 WeatherDuo_Func7(struct Task *task); +static bool8 BigPokeball_Func1(struct Task *task); +static bool8 BigPokeball_Func2(struct Task *task); +static bool8 BigPokeball_Func3(struct Task *task); +static bool8 BigPokeball_Func4(struct Task *task); +static bool8 BigPokeball_Func5(struct Task *task); +static bool8 BigPokeball_Func6(struct Task *task); +static bool8 PokeballsTrail_Func1(struct Task *task); +static bool8 PokeballsTrail_Func2(struct Task *task); +static bool8 PokeballsTrail_Func3(struct Task *task); +static bool8 Clockwise_BlackFade_Func1(struct Task *task); +static bool8 Clockwise_BlackFade_Func2(struct Task *task); +static bool8 Clockwise_BlackFade_Func3(struct Task *task); +static bool8 Clockwise_BlackFade_Func4(struct Task *task); +static bool8 Clockwise_BlackFade_Func5(struct Task *task); +static bool8 Clockwise_BlackFade_Func6(struct Task *task); +static bool8 Clockwise_BlackFade_Func7(struct Task *task); +static bool8 Ripple_Func1(struct Task *task); +static bool8 Ripple_Func2(struct Task *task); +static bool8 Wave_Func1(struct Task *task); +static bool8 Wave_Func2(struct Task *task); +static bool8 Wave_Func3(struct Task *task); +static bool8 Slice_Func1(struct Task *task); +static bool8 Slice_Func2(struct Task *task); +static bool8 Slice_Func3(struct Task *task); +static bool8 WhiteFade_Func1(struct Task *task); +static bool8 WhiteFade_Func2(struct Task *task); +static bool8 WhiteFade_Func3(struct Task *task); +static bool8 WhiteFade_Func4(struct Task *task); +static bool8 WhiteFade_Func5(struct Task *task); +static bool8 GridSquares_Func1(struct Task *task); +static bool8 GridSquares_Func2(struct Task *task); +static bool8 GridSquares_Func3(struct Task *task); +static bool8 Shards_Func1(struct Task *task); +static bool8 Shards_Func2(struct Task *task); +static bool8 Shards_Func3(struct Task *task); +static bool8 Shards_Func4(struct Task *task); +static bool8 Shards_Func5(struct Task *task); +static bool8 ShredSplit_Func1(struct Task *task); +static bool8 ShredSplit_Func2(struct Task *task); +static bool8 ShredSplit_Func3(struct Task *task); +static bool8 ShredSplit_Func4(struct Task *task); +static bool8 Blackhole_Func1(struct Task *task); +static bool8 Blackhole1_Func2(struct Task *task); +static bool8 Blackhole1_Func3(struct Task *task); +static bool8 Blackhole2_Func2(struct Task *task); +static bool8 RectangularSpiral_Func1(struct Task *task); +static bool8 RectangularSpiral_Func2(struct Task *task); +static bool8 RectangularSpiral_Func3(struct Task *task); +static bool8 FrontierLogoWiggle_Func1(struct Task *task); +static bool8 FrontierLogoWiggle_Func2(struct Task *task); +static bool8 FrontierLogoWave_Func1(struct Task *task); +static bool8 FrontierLogoWave_Func2(struct Task *task); +static bool8 FrontierLogoWave_Func3(struct Task *task); +static bool8 FrontierLogoWave_Func4(struct Task *task); +static bool8 Rayquaza_Func3(struct Task *task); +static bool8 Rayquaza_Func4(struct Task *task); +static bool8 Rayquaza_Func5(struct Task *task); +static bool8 Rayquaza_Func6(struct Task *task); +static bool8 Rayquaza_Func7(struct Task *task); +static bool8 Rayquaza_Func8(struct Task *task); +static bool8 Rayquaza_Func9(struct Task *task); +static bool8 FrontierSquares_Func1(struct Task *task); +static bool8 FrontierSquares_Func2(struct Task *task); +static bool8 FrontierSquares_Func3(struct Task *task); +static bool8 FrontierSquares_End(struct Task *task); +static bool8 FrontierSquaresSpiral_Func1(struct Task *task); +static bool8 FrontierSquaresSpiral_Func2(struct Task *task); +static bool8 FrontierSquaresSpiral_Func3(struct Task *task); +static bool8 FrontierSquaresSpiral_Func4(struct Task *task); +static bool8 FrontierSquaresScroll_Func1(struct Task *task); +static bool8 FrontierSquaresScroll_Func2(struct Task *task); +static bool8 FrontierSquaresScroll_Func3(struct Task *task); +static bool8 FrontierSquaresScroll_Func4(struct Task *task); +static bool8 FrontierSquaresScroll_Func5(struct Task *task); +static bool8 Mugshot_Func1(struct Task *task); +static bool8 Mugshot_Func2(struct Task *task); +static bool8 Mugshot_Func3(struct Task *task); +static bool8 Mugshot_Func4(struct Task *task); +static bool8 Mugshot_Func5(struct Task *task); +static bool8 Mugshot_Func6(struct Task *task); +static bool8 Mugshot_Func7(struct Task *task); +static bool8 Mugshot_Func8(struct Task *task); +static bool8 Mugshot_Func9(struct Task *task); +static bool8 Mugshot_Func10(struct Task *task); +static void Task_MugShotTransition(u8 taskId); static void Mugshots_CreateOpponentPlayerSprites(struct Task *task); -static void VBlankCB0_Phase2_Mugshots(void); -static void VBlankCB1_Phase2_Mugshots(void); -static void HBlankCB_Phase2_Mugshots(void); -static bool8 Transition_Phase1(struct Task *task); -static bool8 Transition_WaitForPhase1(struct Task *task); -static bool8 Transition_Phase2(struct Task *task); -static bool8 Transition_WaitForPhase2(struct Task *task); +static void VBlankCB0_Mugshots(void); +static void VBlankCB1_Mugshots(void); +static void HBlankCB_Mugshots(void); static void InitTransitionStructVars(void); static void FadeScreenBlack(void); -static void CreatePhase1Task(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4); +static void CreateIntroTask(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4); static void sub_814A014(u16 *a0, s16 a1, s16 a2, s16 a3); static void sub_8149F98(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, s16 amplitude, s16 arrSize); static void GetBg0TilemapDst(u16 **tileset); @@ -248,9 +248,9 @@ static bool8 sub_814A228(s16 *a0, bool8 a1, bool8 a2); static void SetTrainerPicSlideTable(s16 spriteId, s16 arrId); static void IncrementTrainerPicState(s16 spriteId); static s16 IsTrainerPicSlideDone(s16 spriteId); -static bool8 Phase1_TransitionAll_Func1(struct Task *task); -static bool8 Phase1_TransitionAll_Func2(struct Task *task); -static bool8 IsPhase1Done(void); +static bool8 Transition_Intro_1(struct Task *task); +static bool8 Transition_Intro_2(struct Task *task); +static bool8 IsIntroTaskDone(void); static bool16 sub_8149048(const s16 * const *arg0, struct StructRectangularSpiral *arg1); static void sub_814713C(struct Sprite *sprite); static void SpriteCb_TrainerPic(struct Sprite *sprite); @@ -261,16 +261,13 @@ static bool8 TrainerPicCb_Slide1(struct Sprite *sprite); static bool8 TrainerPicCb_Slide2(struct Sprite *sprite); static bool8 TrainerPicCb_Slide3(struct Sprite *sprite); -// iwram bss vars static s16 sUnusedRectangularSpiralVar; static u8 sTestingTransitionId; static u8 sTestingTransitionState; static struct StructRectangularSpiral sRectangularSpiralTransition[4]; -// ewram vars EWRAM_DATA static struct TransitionData *sTransitionStructPtr = NULL; -// const rom data static const u32 sBigPokeball_Tileset[] = INCBIN_U32("graphics/battle_transitions/big_pokeball.4bpp"); static const u32 sPokeballTrail_Tileset[] = INCBIN_U32("graphics/battle_transitions/pokeball_trail.4bpp"); static const u8 sPokeball_Gfx[] = INCBIN_U8("graphics/battle_transitions/pokeball.4bpp"); @@ -312,205 +309,207 @@ static const u32 sFrontierSquares_Shrink1_Tileset[] = INCBIN_U32("graphics/battl static const u32 sFrontierSquares_Shrink2_Tileset[] = INCBIN_U32("graphics/battle_transitions/frontier_square_4.4bpp.lz"); static const u32 sFrontierSquares_Tilemap[] = INCBIN_U32("graphics/battle_transitions/frontier_squares.bin"); -static const TaskFunc sPhase1_Tasks[B_TRANSITION_COUNT] = +// All battle transitions use the same intro +static const TaskFunc sTasks_Intro[B_TRANSITION_COUNT] = { - [0 ... B_TRANSITION_COUNT - 1] = &Phase1Task_TransitionAll + [0 ... B_TRANSITION_COUNT - 1] = &Task_Intro }; -static const TaskFunc sPhase2_Tasks[B_TRANSITION_COUNT] = +// After the intro each transition has a unique main task +static const TaskFunc sTasks_Main[B_TRANSITION_COUNT] = { - [B_TRANSITION_BLUR] = Phase2Task_Blur, - [B_TRANSITION_SWIRL] = Phase2Task_Swirl, - [B_TRANSITION_SHUFFLE] = Phase2Task_Shuffle, - [B_TRANSITION_BIG_POKEBALL] = Phase2Task_BigPokeball, - [B_TRANSITION_POKEBALLS_TRAIL] = Phase2Task_PokeballsTrail, - [B_TRANSITION_CLOCKWISE_BLACKFADE] = Phase2Task_Clockwise_BlackFade, - [B_TRANSITION_RIPPLE] = Phase2Task_Ripple, - [B_TRANSITION_WAVE] = Phase2Task_Wave, - [B_TRANSITION_SLICE] = Phase2Task_Slice, - [B_TRANSITION_WHITEFADE] = Phase2Task_WhiteFade, - [B_TRANSITION_GRID_SQUARES] = Phase2Task_GridSquares, - [B_TRANSITION_SHARDS] = Phase2Task_Shards, - [B_TRANSITION_SIDNEY] = Phase2Task_Sidney, - [B_TRANSITION_PHOEBE] = Phase2Task_Phoebe, - [B_TRANSITION_GLACIA] = Phase2Task_Glacia, - [B_TRANSITION_DRAKE] = Phase2Task_Drake, - [B_TRANSITION_CHAMPION] = Phase2Task_Champion, - [B_TRANSITION_AQUA] = Phase2Task_Aqua, - [B_TRANSITION_MAGMA] = Phase2Task_Magma, - [B_TRANSITION_REGICE] = Phase2Task_Regice, - [B_TRANSITION_REGISTEEL] = Phase2Task_Registeel, - [B_TRANSITION_REGIROCK] = Phase2Task_Regirock, - [B_TRANSITION_KYOGRE] = Phase2Task_Kyogre, - [B_TRANSITION_GROUDON] = Phase2Task_Groudon, - [B_TRANSITION_RAYQUAZA] = Phase2Task_Rayquaza, - [B_TRANSITION_SHRED_SPLIT] = Phase2Task_ShredSplit, - [B_TRANSITION_BLACKHOLE1] = Phase2Task_Blackhole1, - [B_TRANSITION_BLACKHOLE2] = Phase2Task_Blackhole2, - [B_TRANSITION_RECTANGULAR_SPIRAL] = Phase2Task_RectangularSpiral, - [B_TRANSITION_FRONTIER_LOGO_WIGGLE] = Phase2Task_FrontierLogoWiggle, - [B_TRANSITION_FRONTIER_LOGO_WAVE] = Phase2Task_FrontierLogoWave, - [B_TRANSITION_FRONTIER_SQUARES] = Phase2Task_FrontierSquares, - [B_TRANSITION_FRONTIER_SQUARES_SCROLL] = Phase2Task_FrontierSquaresScroll, - [B_TRANSITION_FRONTIER_SQUARES_SPIRAL] = Phase2Task_FrontierSquaresSpiral, - [B_TRANSITION_FRONTIER_CIRCLES_MEET] = Phase2Task_FrontierCirclesMeet, - [B_TRANSITION_FRONTIER_CIRCLES_CROSS] = Phase2Task_FrontierCirclesCross, - [B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL] = Phase2Task_FrontierCirclesAsymmetricSpiral, - [B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL] = Phase2Task_FrontierCirclesSymmetricSpiral, - [B_TRANSITION_FRONTIER_CIRCLES_MEET_IN_SEQ] = Phase2Task_FrontierCirclesMeetInSeq, - [B_TRANSITION_FRONTIER_CIRCLES_CROSS_IN_SEQ] = Phase2Task_FrontierCirclesCrossInSeq, - [B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL_IN_SEQ] = Phase2Task_FrontierCirclesAsymmetricSpiralInSeq, - [B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL_IN_SEQ] = Phase2Task_FrontierCirclesSymmetricSpiralInSeq, + [B_TRANSITION_BLUR] = Task_Blur, + [B_TRANSITION_SWIRL] = Task_Swirl, + [B_TRANSITION_SHUFFLE] = Task_Shuffle, + [B_TRANSITION_BIG_POKEBALL] = Task_BigPokeball, + [B_TRANSITION_POKEBALLS_TRAIL] = Task_PokeballsTrail, + [B_TRANSITION_CLOCKWISE_BLACKFADE] = Task_Clockwise_BlackFade, + [B_TRANSITION_RIPPLE] = Task_Ripple, + [B_TRANSITION_WAVE] = Task_Wave, + [B_TRANSITION_SLICE] = Task_Slice, + [B_TRANSITION_WHITEFADE] = Task_WhiteFade, + [B_TRANSITION_GRID_SQUARES] = Task_GridSquares, + [B_TRANSITION_SHARDS] = Task_Shards, + [B_TRANSITION_SIDNEY] = Task_Sidney, + [B_TRANSITION_PHOEBE] = Task_Phoebe, + [B_TRANSITION_GLACIA] = Task_Glacia, + [B_TRANSITION_DRAKE] = Task_Drake, + [B_TRANSITION_CHAMPION] = Task_Champion, + [B_TRANSITION_AQUA] = Task_Aqua, + [B_TRANSITION_MAGMA] = Task_Magma, + [B_TRANSITION_REGICE] = Task_Regice, + [B_TRANSITION_REGISTEEL] = Task_Registeel, + [B_TRANSITION_REGIROCK] = Task_Regirock, + [B_TRANSITION_KYOGRE] = Task_Kyogre, + [B_TRANSITION_GROUDON] = Task_Groudon, + [B_TRANSITION_RAYQUAZA] = Task_Rayquaza, + [B_TRANSITION_SHRED_SPLIT] = Task_ShredSplit, + [B_TRANSITION_BLACKHOLE1] = Task_Blackhole1, + [B_TRANSITION_BLACKHOLE2] = Task_Blackhole2, + [B_TRANSITION_RECTANGULAR_SPIRAL] = Task_RectangularSpiral, + [B_TRANSITION_FRONTIER_LOGO_WIGGLE] = Task_FrontierLogoWiggle, + [B_TRANSITION_FRONTIER_LOGO_WAVE] = Task_FrontierLogoWave, + [B_TRANSITION_FRONTIER_SQUARES] = Task_FrontierSquares, + [B_TRANSITION_FRONTIER_SQUARES_SCROLL] = Task_FrontierSquaresScroll, + [B_TRANSITION_FRONTIER_SQUARES_SPIRAL] = Task_FrontierSquaresSpiral, + [B_TRANSITION_FRONTIER_CIRCLES_MEET] = Task_FrontierCirclesMeet, + [B_TRANSITION_FRONTIER_CIRCLES_CROSS] = Task_FrontierCirclesCross, + [B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL] = Task_FrontierCirclesAsymmetricSpiral, + [B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL] = Task_FrontierCirclesSymmetricSpiral, + [B_TRANSITION_FRONTIER_CIRCLES_MEET_IN_SEQ] = Task_FrontierCirclesMeetInSeq, + [B_TRANSITION_FRONTIER_CIRCLES_CROSS_IN_SEQ] = Task_FrontierCirclesCrossInSeq, + [B_TRANSITION_FRONTIER_CIRCLES_ASYMMETRIC_SPIRAL_IN_SEQ] = Task_FrontierCirclesAsymmetricSpiralInSeq, + [B_TRANSITION_FRONTIER_CIRCLES_SYMMETRIC_SPIRAL_IN_SEQ] = Task_FrontierCirclesSymmetricSpiralInSeq, }; -static const TransitionStateFunc sMainTransitionPhases[] = +static const TransitionStateFunc sTaskHandlers[] = { - &Transition_Phase1, - &Transition_WaitForPhase1, - &Transition_Phase2, - &Transition_WaitForPhase2 + &Transition_StartIntro, + &Transition_WaitForIntro, + &Transition_StartMain, + &Transition_WaitForMain }; -static const TransitionStateFunc sPhase2_Blur_Funcs[] = +static const TransitionStateFunc sBlur_Funcs[] = { - Phase2_Blur_Func1, - Phase2_Blur_Func2, - Phase2_Blur_Func3 + Blur_Func1, + Blur_Func2, + Blur_Func3 }; -static const TransitionStateFunc sPhase2_Swirl_Funcs[] = +static const TransitionStateFunc sSwirl_Funcs[] = { - Phase2_Swirl_Func1, - Phase2_Swirl_Func2, + Swirl_Func1, + Swirl_Func2, }; -static const TransitionStateFunc sPhase2_Shuffle_Funcs[] = +static const TransitionStateFunc sShuffle_Funcs[] = { - Phase2_Shuffle_Func1, - Phase2_Shuffle_Func2, + Shuffle_Func1, + Shuffle_Func2, }; -static const TransitionStateFunc sPhase2_Aqua_Funcs[] = +static const TransitionStateFunc sAqua_Funcs[] = { - Phase2_Aqua_Func1, - Phase2_Aqua_Func2, - Phase2_BigPokeball_Func3, - Phase2_BigPokeball_Func4, - Phase2_BigPokeball_Func5, - Phase2_FramesCountdown, - Phase2_BigPokeball_Func6 + Aqua_Func1, + Aqua_Func2, + BigPokeball_Func3, + BigPokeball_Func4, + BigPokeball_Func5, + FramesCountdown, + BigPokeball_Func6 }; -static const TransitionStateFunc sPhase2_Magma_Funcs[] = +static const TransitionStateFunc sMagma_Funcs[] = { - Phase2_Magma_Func1, - Phase2_Magma_Func2, - Phase2_BigPokeball_Func3, - Phase2_BigPokeball_Func4, - Phase2_BigPokeball_Func5, - Phase2_FramesCountdown, - Phase2_BigPokeball_Func6 + Magma_Func1, + Magma_Func2, + BigPokeball_Func3, + BigPokeball_Func4, + BigPokeball_Func5, + FramesCountdown, + BigPokeball_Func6 }; -static const TransitionStateFunc sPhase2_BigPokeball_Funcs[] = +static const TransitionStateFunc sBigPokeball_Funcs[] = { - Phase2_BigPokeball_Func1, - Phase2_BigPokeball_Func2, - Phase2_BigPokeball_Func3, - Phase2_BigPokeball_Func4, - Phase2_BigPokeball_Func5, - Phase2_BigPokeball_Func6 + BigPokeball_Func1, + BigPokeball_Func2, + BigPokeball_Func3, + BigPokeball_Func4, + BigPokeball_Func5, + BigPokeball_Func6 }; -static const TransitionStateFunc sPhase2_Regice_Funcs[] = +static const TransitionStateFunc sRegice_Funcs[] = { - Phase2_Regi_Func1, - Phase2_Regice_Func2, - Phase2_BigPokeball_Func3, - Phase2_BigPokeball_Func4, - Phase2_BigPokeball_Func5, - Phase2_BigPokeball_Func6 + Regi_Func1, + Regice_Func2, + BigPokeball_Func3, + BigPokeball_Func4, + BigPokeball_Func5, + BigPokeball_Func6 }; -static const TransitionStateFunc sPhase2_Registeel_Funcs[] = +static const TransitionStateFunc sRegisteel_Funcs[] = { - Phase2_Regi_Func1, - Phase2_Registeel_Func2, - Phase2_BigPokeball_Func3, - Phase2_BigPokeball_Func4, - Phase2_BigPokeball_Func5, - Phase2_BigPokeball_Func6 + Regi_Func1, + Registeel_Func2, + BigPokeball_Func3, + BigPokeball_Func4, + BigPokeball_Func5, + BigPokeball_Func6 }; -static const TransitionStateFunc sPhase2_Regirock_Funcs[] = +static const TransitionStateFunc sRegirock_Funcs[] = { - Phase2_Regi_Func1, - Phase2_Regirock_Func2, - Phase2_BigPokeball_Func3, - Phase2_BigPokeball_Func4, - Phase2_BigPokeball_Func5, - Phase2_BigPokeball_Func6 + Regi_Func1, + Regirock_Func2, + BigPokeball_Func3, + BigPokeball_Func4, + BigPokeball_Func5, + BigPokeball_Func6 }; -static const TransitionStateFunc sPhase2_Kyogre_Funcs[] = +static const TransitionStateFunc sKyogre_Funcs[] = { - Phase2_WeatherTrio_Func1, - Phase2_WaitPaletteFade, - Phase2_Kyogre_Func3, - Phase2_Kyogre_Func4, - Phase2_Kyogre_Func5, - Phase2_FramesCountdown, - Phase2_WeatherDuo_Func6, - Phase2_WeatherDuo_Func7 + WeatherTrio_Func1, + WaitPaletteFade, + Kyogre_Func3, + Kyogre_Func4, + Kyogre_Func5, + FramesCountdown, + WeatherDuo_Func6, + WeatherDuo_Func7 }; -static const TransitionStateFunc sPhase2_PokeballsTrail_Funcs[] = +static const TransitionStateFunc sPokeballsTrail_Funcs[] = { - Phase2_PokeballsTrail_Func1, - Phase2_PokeballsTrail_Func2, - Phase2_PokeballsTrail_Func3 + PokeballsTrail_Func1, + PokeballsTrail_Func2, + PokeballsTrail_Func3 }; static const s16 sUnknown_085C8B88[2] = {-16, 256}; static const s16 sUnknown_085C8B8C[5] = {0, 32, 64, 18, 48}; static const s16 sUnknown_085C8B96[2] = {8, -8}; -static const TransitionStateFunc sPhase2_Clockwise_BlackFade_Funcs[] = +static const TransitionStateFunc sClockwise_BlackFade_Funcs[] = { - Phase2_Clockwise_BlackFade_Func1, - Phase2_Clockwise_BlackFade_Func2, - Phase2_Clockwise_BlackFade_Func3, - Phase2_Clockwise_BlackFade_Func4, - Phase2_Clockwise_BlackFade_Func5, - Phase2_Clockwise_BlackFade_Func6, - Phase2_Clockwise_BlackFade_Func7 + Clockwise_BlackFade_Func1, + Clockwise_BlackFade_Func2, + Clockwise_BlackFade_Func3, + Clockwise_BlackFade_Func4, + Clockwise_BlackFade_Func5, + Clockwise_BlackFade_Func6, + Clockwise_BlackFade_Func7 }; -static const TransitionStateFunc sPhase2_Ripple_Funcs[] = +static const TransitionStateFunc sRipple_Funcs[] = { - Phase2_Ripple_Func1, - Phase2_Ripple_Func2 + Ripple_Func1, + Ripple_Func2 }; -static const TransitionStateFunc sPhase2_Wave_Funcs[] = +static const TransitionStateFunc sWave_Funcs[] = { - Phase2_Wave_Func1, - Phase2_Wave_Func2, - Phase2_Wave_Func3 + Wave_Func1, + Wave_Func2, + Wave_Func3 }; -static const TransitionStateFunc sPhase2_Mugshot_Funcs[] = +static const TransitionStateFunc sMugshot_Funcs[] = { - Phase2_Mugshot_Func1, - Phase2_Mugshot_Func2, - Phase2_Mugshot_Func3, - Phase2_Mugshot_Func4, - Phase2_Mugshot_Func5, - Phase2_Mugshot_Func6, - Phase2_Mugshot_Func7, - Phase2_Mugshot_Func8, - Phase2_Mugshot_Func9, - Phase2_Mugshot_Func10 + Mugshot_Func1, + Mugshot_Func2, + Mugshot_Func3, + Mugshot_Func4, + Mugshot_Func5, + Mugshot_Func6, + Mugshot_Func7, + Mugshot_Func8, + Mugshot_Func9, + Mugshot_Func10 }; static const u8 sMugshotsTrainerPicIDsTable[MUGSHOTS_COUNT] = @@ -552,44 +551,44 @@ static const TransitionSpriteCallback sTrainerPicSpriteCbs[] = static const s16 sTrainerPicSlideOffsets1[2] = {12, -12}; static const s16 sTrainerPicSlideOffsets2[2] = {-1, 1}; -static const TransitionStateFunc sPhase2_Slice_Funcs[] = +static const TransitionStateFunc sSlice_Funcs[] = { - Phase2_Slice_Func1, - Phase2_Slice_Func2, - Phase2_Slice_Func3 + Slice_Func1, + Slice_Func2, + Slice_Func3 }; -static const TransitionStateFunc sPhase2_ShredSplit_Funcs[] = +static const TransitionStateFunc sShredSplit_Funcs[] = { - Phase2_ShredSplit_Func1, - Phase2_ShredSplit_Func2, - Phase2_ShredSplit_Func3, - Phase2_ShredSplit_Func4 + ShredSplit_Func1, + ShredSplit_Func2, + ShredSplit_Func3, + ShredSplit_Func4 }; static const u8 gUnknown_085C8C64[] = {39, 119}; static const s16 gUnknown_085C8C66[] = {1, -1}; -static const TransitionStateFunc sPhase2_Blackhole1_Funcs[] = +static const TransitionStateFunc sBlackhole1_Funcs[] = { - Phase2_Blackhole_Func1, - Phase2_Blackhole1_Func2, - Phase2_Blackhole1_Func3 + Blackhole_Func1, + Blackhole1_Func2, + Blackhole1_Func3 }; -static const TransitionStateFunc sPhase2_Blackhole2_Funcs[] = +static const TransitionStateFunc sBlackhole2_Funcs[] = { - Phase2_Blackhole_Func1, - Phase2_Blackhole2_Func2 + Blackhole_Func1, + Blackhole2_Func2 }; static const s16 gUnknown_085C8C80[] = {-6, 4}; -static const TransitionStateFunc sPhase2_RectangularSpiral_Funcs[] = +static const TransitionStateFunc sRectangularSpiral_Funcs[] = { - Phase2_RectangularSpiral_Func1, - Phase2_RectangularSpiral_Func2, - Phase2_RectangularSpiral_Func3 + RectangularSpiral_Func1, + RectangularSpiral_Func2, + RectangularSpiral_Func3 }; static const s16 gUnknown_085C8C90[] = {1, 27, 275, -1}; @@ -639,58 +638,58 @@ static const s16 *const *const gUnknown_085C8D38[] = gUnknown_085C8D18 }; -static const TransitionStateFunc sPhase2_Groudon_Funcs[] = +static const TransitionStateFunc sGroudon_Funcs[] = { - Phase2_WeatherTrio_Func1, - Phase2_WaitPaletteFade, - Phase2_Groudon_Func3, - Phase2_Groudon_Func4, - Phase2_Groudon_Func5, - Phase2_FramesCountdown, - Phase2_WeatherDuo_Func6, - Phase2_WeatherDuo_Func7 + WeatherTrio_Func1, + WaitPaletteFade, + Groudon_Func3, + Groudon_Func4, + Groudon_Func5, + FramesCountdown, + WeatherDuo_Func6, + WeatherDuo_Func7 }; -static const TransitionStateFunc sPhase2_Rayquaza_Funcs[] = +static const TransitionStateFunc sRayquaza_Funcs[] = { - Phase2_WeatherTrio_Func1, - Phase2_WaitPaletteFade, - Phase2_Rayquaza_Func3, - Phase2_Rayquaza_Func4, - Phase2_Rayquaza_Func5, - Phase2_Rayquaza_Func6, - Phase2_Rayquaza_Func7, - Phase2_Rayquaza_Func8, - Phase2_Rayquaza_Func9, - Phase2_Blackhole1_Func2, - Phase2_Blackhole1_Func3 + WeatherTrio_Func1, + WaitPaletteFade, + Rayquaza_Func3, + Rayquaza_Func4, + Rayquaza_Func5, + Rayquaza_Func6, + Rayquaza_Func7, + Rayquaza_Func8, + Rayquaza_Func9, + Blackhole1_Func2, + Blackhole1_Func3 }; -static const TransitionStateFunc sPhase2_WhiteFade_Funcs[] = +static const TransitionStateFunc sWhiteFade_Funcs[] = { - Phase2_WhiteFade_Func1, - Phase2_WhiteFade_Func2, - Phase2_WhiteFade_Func3, - Phase2_WhiteFade_Func4, - Phase2_WhiteFade_Func5 + WhiteFade_Func1, + WhiteFade_Func2, + WhiteFade_Func3, + WhiteFade_Func4, + WhiteFade_Func5 }; static const s16 sUnknown_085C8DA0[] = {0, 20, 15, 40, 10, 25, 35, 5}; -static const TransitionStateFunc sPhase2_GridSquares_Funcs[] = +static const TransitionStateFunc sGridSquares_Funcs[] = { - Phase2_GridSquares_Func1, - Phase2_GridSquares_Func2, - Phase2_GridSquares_Func3 + GridSquares_Func1, + GridSquares_Func2, + GridSquares_Func3 }; -static const TransitionStateFunc sPhase2_Shards_Funcs[] = +static const TransitionStateFunc sShards_Funcs[] = { - Phase2_Shards_Func1, - Phase2_Shards_Func2, - Phase2_Shards_Func3, - Phase2_Shards_Func4, - Phase2_Shards_Func5 + Shards_Func1, + Shards_Func2, + Shards_Func3, + Shards_Func4, + Shards_Func5 }; static const s16 sUnknown_085C8DD0[][5] = @@ -706,10 +705,10 @@ static const s16 sUnknown_085C8DD0[][5] = static const s16 sUnknown_085C8E16[] = {8, 4, 2, 1, 1, 1, 0}; -static const TransitionStateFunc sPhase1_TransitionAll_Funcs[] = +static const TransitionStateFunc sTransitionIntroFuncs[] = { - Phase1_TransitionAll_Func1, - Phase1_TransitionAll_Func2 + Transition_Intro_1, + Transition_Intro_2 }; static const struct SpriteFrameImage sSpriteImage_Pokeball[] = @@ -850,54 +849,53 @@ static const struct SpritePalette sSpritePalette_UnusedTrainer = {sUnusedTrainer static const u16 sBigPokeball_Tilemap[] = INCBIN_U16("graphics/battle_transitions/big_pokeball_map.bin"); static const u16 sMugshotsTilemap[] = INCBIN_U16("graphics/battle_transitions/elite_four_bg_map.bin"); -static const TransitionStateFunc sPhase2_FrontierLogoWiggle_Funcs[] = +static const TransitionStateFunc sFrontierLogoWiggle_Funcs[] = { - Phase2_FrontierLogoWiggle_Func1, - Phase2_FrontierLogoWiggle_Func2, - Phase2_BigPokeball_Func3, - Phase2_BigPokeball_Func4, - Phase2_BigPokeball_Func5, - Phase2_BigPokeball_Func6 + FrontierLogoWiggle_Func1, + FrontierLogoWiggle_Func2, + BigPokeball_Func3, + BigPokeball_Func4, + BigPokeball_Func5, + BigPokeball_Func6 }; -static const TransitionStateFunc sPhase2_FrontierLogoWave_Funcs[] = +static const TransitionStateFunc sFrontierLogoWave_Funcs[] = { - Phase2_FrontierLogoWave_Func1, - Phase2_FrontierLogoWave_Func2, - Phase2_FrontierLogoWave_Func3, - Phase2_FrontierLogoWave_Func4 + FrontierLogoWave_Func1, + FrontierLogoWave_Func2, + FrontierLogoWave_Func3, + FrontierLogoWave_Func4 }; -static const TransitionStateFunc sPhase2_FrontierSquares_Funcs[] = +static const TransitionStateFunc sFrontierSquares_Funcs[] = { - Phase2_FrontierSquares_Func1, - Phase2_FrontierSquares_Func2, - Phase2_FrontierSquares_Func3, - Phase2_FrontierSquares_End + FrontierSquares_Func1, + FrontierSquares_Func2, + FrontierSquares_Func3, + FrontierSquares_End }; -static const TransitionStateFunc sPhase2_FrontierSquaresSpiral_Funcs[] = +static const TransitionStateFunc sFrontierSquaresSpiral_Funcs[] = { - Phase2_FrontierSquaresSpiral_Func1, - Phase2_FrontierSquaresSpiral_Func2, - Phase2_FrontierSquaresSpiral_Func3, - Phase2_FrontierSquaresSpiral_Func4, - Phase2_FrontierSquares_End + FrontierSquaresSpiral_Func1, + FrontierSquaresSpiral_Func2, + FrontierSquaresSpiral_Func3, + FrontierSquaresSpiral_Func4, + FrontierSquares_End }; -static const TransitionStateFunc sPhase2_FrontierSquaresScroll_Funcs[] = +static const TransitionStateFunc sFrontierSquaresScroll_Funcs[] = { - Phase2_FrontierSquaresScroll_Func1, - Phase2_FrontierSquaresScroll_Func2, - Phase2_FrontierSquaresScroll_Func3, - Phase2_FrontierSquaresScroll_Func4, - Phase2_FrontierSquaresScroll_Func5 + FrontierSquaresScroll_Func1, + FrontierSquaresScroll_Func2, + FrontierSquaresScroll_Func3, + FrontierSquaresScroll_Func4, + FrontierSquaresScroll_Func5 }; static const u8 gUnknown_085C9A30[] = {0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x1b, 0x14, 0x0d, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x07, 0x0e, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x13, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x10, 0x11, 0x12}; static const u8 gUnknown_085C9A53[] = {0x00, 0x10, 0x29, 0x16, 0x2c, 0x02, 0x2b, 0x15, 0x2e, 0x1b, 0x09, 0x30, 0x26, 0x05, 0x39, 0x3b, 0x0c, 0x3f, 0x23, 0x1c, 0x0a, 0x35, 0x07, 0x31, 0x27, 0x17, 0x37, 0x01, 0x3e, 0x11, 0x3d, 0x1e, 0x06, 0x22, 0x0f, 0x33, 0x20, 0x3a, 0x0d, 0x2d, 0x25, 0x34, 0x0b, 0x18, 0x3c, 0x13, 0x38, 0x21, 0x1d, 0x32, 0x28, 0x36, 0x0e, 0x03, 0x2f, 0x14, 0x12, 0x19, 0x04, 0x24, 0x1a, 0x2a, 0x1f, 0x08, 0x00}; -// code static void CB2_TestBattleTransition(void) { switch (sTestingTransitionState) @@ -921,7 +919,8 @@ static void CB2_TestBattleTransition(void) UpdatePaletteFade(); } -void TestBattleTransition(u8 transitionId) +// Unused +static void TestBattleTransition(u8 transitionId) { sTestingTransitionId = transitionId; SetMainCallback2(CB2_TestBattleTransition); @@ -947,7 +946,7 @@ void BattleTransition_Start(u8 transitionId) bool8 IsBattleTransitionDone(void) { - u8 taskId = FindTaskIdByFunc(Task_BattleTransitionMain); + u8 taskId = FindTaskIdByFunc(Task_BattleTransition); if (gTasks[taskId].tTransitionDone) { DestroyTask(taskId); @@ -962,23 +961,23 @@ bool8 IsBattleTransitionDone(void) static void LaunchBattleTransitionTask(u8 transitionId) { - u8 taskId = CreateTask(Task_BattleTransitionMain, 2); + u8 taskId = CreateTask(Task_BattleTransition, 2); gTasks[taskId].tTransitionId = transitionId; sTransitionStructPtr = AllocZeroed(sizeof(*sTransitionStructPtr)); } -static void Task_BattleTransitionMain(u8 taskId) +static void Task_BattleTransition(u8 taskId) { - while (sMainTransitionPhases[gTasks[taskId].tState](&gTasks[taskId])); + while (sTaskHandlers[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Transition_Phase1(struct Task *task) +static bool8 Transition_StartIntro(struct Task *task) { SetWeatherScreenFadeOut(); CpuCopy32(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); - if (sPhase1_Tasks[task->tTransitionId] != NULL) + if (sTasks_Intro[task->tTransitionId] != NULL) { - CreateTask(sPhase1_Tasks[task->tTransitionId], 4); + CreateTask(sTasks_Intro[task->tTransitionId], 4); task->tState++; return FALSE; } @@ -989,9 +988,9 @@ static bool8 Transition_Phase1(struct Task *task) } } -static bool8 Transition_WaitForPhase1(struct Task *task) +static bool8 Transition_WaitForIntro(struct Task *task) { - if (FindTaskIdByFunc(sPhase1_Tasks[task->tTransitionId]) == TASK_NONE) + if (FindTaskIdByFunc(sTasks_Intro[task->tTransitionId]) == TASK_NONE) { task->tState++; return TRUE; @@ -1002,17 +1001,17 @@ static bool8 Transition_WaitForPhase1(struct Task *task) } } -static bool8 Transition_Phase2(struct Task *task) +static bool8 Transition_StartMain(struct Task *task) { - CreateTask(sPhase2_Tasks[task->tTransitionId], 0); + CreateTask(sTasks_Main[task->tTransitionId], 0); task->tState++; return FALSE; } -static bool8 Transition_WaitForPhase2(struct Task *task) +static bool8 Transition_WaitForMain(struct Task *task) { task->tTransitionDone = FALSE; - if (FindTaskIdByFunc(sPhase2_Tasks[task->tTransitionId]) == TASK_NONE) + if (FindTaskIdByFunc(sTasks_Main[task->tTransitionId]) == TASK_NONE) task->tTransitionDone = TRUE; return FALSE; } @@ -1020,14 +1019,14 @@ static bool8 Transition_WaitForPhase2(struct Task *task) #undef tTransitionId #undef tTransitionDone -static void Phase1Task_TransitionAll(u8 taskId) +static void Task_Intro(u8 taskId) { if (gTasks[taskId].tState == 0) { gTasks[taskId].tState++; - CreatePhase1Task(0, 0, 3, 2, 2); // creates a sub-task for this sub-task + CreateIntroTask(0, 0, 3, 2, 2); } - else if (IsPhase1Done()) + else if (IsIntroTaskDone()) { DestroyTask(taskId); } @@ -1046,12 +1045,12 @@ static void Phase1Task_TransitionAll(u8 taskId) #define tPlayerSpriteId data[14] #define tMugshotId data[15] -static void Phase2Task_Blur(u8 taskId) +static void Task_Blur(u8 taskId) { - while (sPhase2_Blur_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sBlur_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Blur_Func1(struct Task *task) +static bool8 Blur_Func1(struct Task *task) { SetGpuReg(REG_OFFSET_MOSAIC, 0); SetGpuRegBits(REG_OFFSET_BG1CNT, BGCNT_MOSAIC); @@ -1061,7 +1060,7 @@ static bool8 Phase2_Blur_Func1(struct Task *task) return TRUE; } -static bool8 Phase2_Blur_Func2(struct Task *task) +static bool8 Blur_Func2(struct Task *task) { if (task->tData1 != 0) { @@ -1079,30 +1078,30 @@ static bool8 Phase2_Blur_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Blur_Func3(struct Task *task) +static bool8 Blur_Func3(struct Task *task) { if (!gPaletteFade.active) { - u8 taskId = FindTaskIdByFunc(Phase2Task_Blur); + u8 taskId = FindTaskIdByFunc(Task_Blur); DestroyTask(taskId); } return FALSE; } -static void Phase2Task_Swirl(u8 taskId) +static void Task_Swirl(u8 taskId) { - while (sPhase2_Swirl_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sSwirl_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Swirl_Func1(struct Task *task) +static bool8 Swirl_Func1(struct Task *task) { InitTransitionStructVars(); ScanlineEffect_Clear(); BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 0x10, RGB_BLACK); sub_8149F98(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_14, 0, 2, 0, 160); - SetVBlankCallback(VBlankCB_Phase2_Swirl); - SetHBlankCallback(HBlankCB_Phase2_Swirl); + SetVBlankCallback(VBlankCB_Swirl); + SetHBlankCallback(HBlankCB_Swirl); EnableInterrupts(INTR_FLAG_VBLANK | INTR_FLAG_HBLANK); @@ -1110,7 +1109,7 @@ static bool8 Phase2_Swirl_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_Swirl_Func2(struct Task *task) +static bool8 Swirl_Func2(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; task->tData1 += 4; @@ -1120,7 +1119,7 @@ static bool8 Phase2_Swirl_Func2(struct Task *task) if (!gPaletteFade.active) { - u8 taskId = FindTaskIdByFunc(Phase2Task_Swirl); + u8 taskId = FindTaskIdByFunc(Task_Swirl); DestroyTask(taskId); } @@ -1128,14 +1127,14 @@ static bool8 Phase2_Swirl_Func2(struct Task *task) return FALSE; } -static void VBlankCB_Phase2_Swirl(void) +static void VBlankCB_Swirl(void) { VBlankCB_BattleTransition(); if (sTransitionStructPtr->VBlank_DMA) DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); } -static void HBlankCB_Phase2_Swirl(void) +static void HBlankCB_Swirl(void) { u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT]; REG_BG1HOFS = var; @@ -1143,12 +1142,12 @@ static void HBlankCB_Phase2_Swirl(void) REG_BG3HOFS = var; } -static void Phase2Task_Shuffle(u8 taskId) +static void Task_Shuffle(u8 taskId) { - while (sPhase2_Shuffle_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sShuffle_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Shuffle_Func1(struct Task *task) +static bool8 Shuffle_Func1(struct Task *task) { InitTransitionStructVars(); ScanlineEffect_Clear(); @@ -1156,8 +1155,8 @@ static bool8 Phase2_Shuffle_Func1(struct Task *task) BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 0x10, RGB_BLACK); memset(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_16, 0x140); - SetVBlankCallback(VBlankCB_Phase2_Shuffle); - SetHBlankCallback(HBlankCB_Phase2_Shuffle); + SetVBlankCallback(VBlankCB_Shuffle); + SetHBlankCallback(HBlankCB_Shuffle); EnableInterrupts(INTR_FLAG_VBLANK | INTR_FLAG_HBLANK); @@ -1165,7 +1164,7 @@ static bool8 Phase2_Shuffle_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_Shuffle_Func2(struct Task *task) +static bool8 Shuffle_Func2(struct Task *task) { u8 i; u16 r3, r4; @@ -1183,20 +1182,20 @@ static bool8 Phase2_Shuffle_Func2(struct Task *task) } if (!gPaletteFade.active) - DestroyTask(FindTaskIdByFunc(Phase2Task_Shuffle)); + DestroyTask(FindTaskIdByFunc(Task_Shuffle)); sTransitionStructPtr->VBlank_DMA++; return FALSE; } -static void VBlankCB_Phase2_Shuffle(void) +static void VBlankCB_Shuffle(void) { VBlankCB_BattleTransition(); if (sTransitionStructPtr->VBlank_DMA) DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); } -static void HBlankCB_Phase2_Shuffle(void) +static void HBlankCB_Shuffle(void) { u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT]; REG_BG1VOFS = var; @@ -1204,39 +1203,39 @@ static void HBlankCB_Phase2_Shuffle(void) REG_BG3VOFS = var; } -static void Phase2Task_BigPokeball(u8 taskId) +static void Task_BigPokeball(u8 taskId) { - while (sPhase2_BigPokeball_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sBigPokeball_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_Aqua(u8 taskId) +static void Task_Aqua(u8 taskId) { - while (sPhase2_Aqua_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sAqua_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_Magma(u8 taskId) +static void Task_Magma(u8 taskId) { - while (sPhase2_Magma_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sMagma_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_Regice(u8 taskId) +static void Task_Regice(u8 taskId) { - while (sPhase2_Regice_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sRegice_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_Registeel(u8 taskId) +static void Task_Registeel(u8 taskId) { - while (sPhase2_Registeel_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sRegisteel_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_Regirock(u8 taskId) +static void Task_Regirock(u8 taskId) { - while (sPhase2_Regirock_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sRegirock_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_Kyogre(u8 taskId) +static void Task_Kyogre(u8 taskId) { - while (sPhase2_Kyogre_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sKyogre_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static void sub_814669C(struct Task *task) @@ -1262,10 +1261,10 @@ static void sub_814669C(struct Task *task) gScanlineEffectRegBuffers[1][i] = 240; } - SetVBlankCallback(VBlankCB0_Phase2_BigPokeball); + SetVBlankCallback(VBlankCB0_BigPokeball); } -static bool8 Phase2_Aqua_Func1(struct Task *task) +static bool8 Aqua_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -1280,7 +1279,7 @@ static bool8 Phase2_Aqua_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_Magma_Func1(struct Task *task) +static bool8 Magma_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -1295,7 +1294,7 @@ static bool8 Phase2_Magma_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_Regi_Func1(struct Task *task) +static bool8 Regi_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -1309,7 +1308,7 @@ static bool8 Phase2_Regi_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_BigPokeball_Func1(struct Task *task) +static bool8 BigPokeball_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -1329,7 +1328,7 @@ static bool8 Phase2_BigPokeball_Func1(struct Task *task) ptr[index] = toStore; \ } -static bool8 Phase2_BigPokeball_Func2(struct Task *task) +static bool8 BigPokeball_Func2(struct Task *task) { s16 i, j; u16 *tilemap, *tileset; @@ -1350,7 +1349,7 @@ static bool8 Phase2_BigPokeball_Func2(struct Task *task) return TRUE; } -static bool8 Phase2_Aqua_Func2(struct Task *task) +static bool8 Aqua_Func2(struct Task *task) { u16 *tilemap, *tileset; @@ -1362,7 +1361,7 @@ static bool8 Phase2_Aqua_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Magma_Func2(struct Task *task) +static bool8 Magma_Func2(struct Task *task) { u16 *tilemap, *tileset; @@ -1374,7 +1373,7 @@ static bool8 Phase2_Magma_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Regice_Func2(struct Task *task) +static bool8 Regice_Func2(struct Task *task) { u16 *tilemap, *tileset; @@ -1387,7 +1386,7 @@ static bool8 Phase2_Regice_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Registeel_Func2(struct Task *task) +static bool8 Registeel_Func2(struct Task *task) { u16 *tilemap, *tileset; @@ -1400,7 +1399,7 @@ static bool8 Phase2_Registeel_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Regirock_Func2(struct Task *task) +static bool8 Regirock_Func2(struct Task *task) { u16 *tilemap, *tileset; @@ -1413,7 +1412,7 @@ static bool8 Phase2_Regirock_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Kyogre_Func3(struct Task *task) +static bool8 Kyogre_Func3(struct Task *task) { u16 *tilemap, *tileset; @@ -1426,7 +1425,7 @@ static bool8 Phase2_Kyogre_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_Kyogre_Func4(struct Task *task) +static bool8 Kyogre_Func4(struct Task *task) { if (task->tData1 % 3 == 0) { @@ -1443,7 +1442,7 @@ static bool8 Phase2_Kyogre_Func4(struct Task *task) return FALSE; } -static bool8 Phase2_Kyogre_Func5(struct Task *task) +static bool8 Kyogre_Func5(struct Task *task) { if (task->tData1 % 5 == 0) { @@ -1460,14 +1459,14 @@ static bool8 Phase2_Kyogre_Func5(struct Task *task) return FALSE; } -static bool8 Phase2_WeatherDuo_Func6(struct Task *task) +static bool8 WeatherDuo_Func6(struct Task *task) { BeginNormalPaletteFade(PALETTES_OBJECTS | 0x8000, 1, 0, 0x10, RGB_BLACK); task->tState++; return FALSE; } -static bool8 Phase2_WeatherDuo_Func7(struct Task *task) +static bool8 WeatherDuo_Func7(struct Task *task) { if (!gPaletteFade.active) { @@ -1478,7 +1477,7 @@ static bool8 Phase2_WeatherDuo_Func7(struct Task *task) return FALSE; } -static bool8 Phase2_BigPokeball_Func3(struct Task *task) +static bool8 BigPokeball_Func3(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; if (task->tData3 == 0 || --task->tData3 == 0) @@ -1498,7 +1497,7 @@ static bool8 Phase2_BigPokeball_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_BigPokeball_Func4(struct Task *task) +static bool8 BigPokeball_Func4(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; if (task->tData3 == 0 || --task->tData3 == 0) @@ -1518,7 +1517,7 @@ static bool8 Phase2_BigPokeball_Func4(struct Task *task) return FALSE; } -static bool8 Phase2_BigPokeball_Func5(struct Task *task) +static bool8 BigPokeball_Func5(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; task->tData4 += 8; @@ -1538,28 +1537,28 @@ static bool8 Phase2_BigPokeball_Func5(struct Task *task) return FALSE; } -static bool8 Phase2_FramesCountdown(struct Task *task) +static bool8 FramesCountdown(struct Task *task) { if (--task->tFrames == 0) task->tState++; return FALSE; } -static bool8 Phase2_WeatherTrio_Func1(struct Task *task) +static bool8 WeatherTrio_Func1(struct Task *task) { BeginNormalPaletteFade(PALETTES_BG, 1, 0, 0x10, RGB_BLACK); task->tState++; return FALSE; } -static bool8 Phase2_WaitPaletteFade(struct Task *task) +static bool8 WaitPaletteFade(struct Task *task) { if (!gPaletteFade.active) task->tState++; return FALSE; } -static bool8 Phase2_BigPokeball_Func6(struct Task *task) +static bool8 BigPokeball_Func6(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; if (task->tData2 < 1024) @@ -1583,7 +1582,7 @@ static bool8 Phase2_BigPokeball_Func6(struct Task *task) if (task->tData3 == 0) { task->tData3++; - SetVBlankCallback(VBlankCB1_Phase2_BigPokeball); + SetVBlankCallback(VBlankCB1_BigPokeball); } sTransitionStructPtr->VBlank_DMA++; @@ -1605,24 +1604,24 @@ static void Transition_BigPokeball_Vblank(void) REG_BLDALPHA = sTransitionStructPtr->BLDALPHA; } -static void VBlankCB0_Phase2_BigPokeball(void) +static void VBlankCB0_BigPokeball(void) { Transition_BigPokeball_Vblank(); DmaSet(0, gScanlineEffectRegBuffers[1], ®_BG0HOFS, 0xA2400001); } -static void VBlankCB1_Phase2_BigPokeball(void) +static void VBlankCB1_BigPokeball(void) { Transition_BigPokeball_Vblank(); DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); } -static void Phase2Task_PokeballsTrail(u8 taskId) +static void Task_PokeballsTrail(u8 taskId) { - while (sPhase2_PokeballsTrail_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sPokeballsTrail_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_PokeballsTrail_Func1(struct Task *task) +static bool8 PokeballsTrail_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -1635,7 +1634,7 @@ static bool8 Phase2_PokeballsTrail_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_PokeballsTrail_Func2(struct Task *task) +static bool8 PokeballsTrail_Func2(struct Task *task) { s16 i; s16 rand; @@ -1658,12 +1657,12 @@ static bool8 Phase2_PokeballsTrail_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_PokeballsTrail_Func3(struct Task *task) +static bool8 PokeballsTrail_Func3(struct Task *task) { if (!FieldEffectActiveListContains(FLDEFF_POKEBALL)) { FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Phase2Task_PokeballsTrail)); + DestroyTask(FindTaskIdByFunc(Task_PokeballsTrail)); } return FALSE; } @@ -1718,12 +1717,12 @@ static void sub_814713C(struct Sprite *sprite) } } -static void Phase2Task_Clockwise_BlackFade(u8 taskId) +static void Task_Clockwise_BlackFade(u8 taskId) { - while (sPhase2_Clockwise_BlackFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sClockwise_BlackFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Clockwise_BlackFade_Func1(struct Task *task) +static bool8 Clockwise_BlackFade_Func1(struct Task *task) { u16 i; @@ -1740,14 +1739,14 @@ static bool8 Phase2_Clockwise_BlackFade_Func1(struct Task *task) gScanlineEffectRegBuffers[1][i] = 0xF3F4; } - SetVBlankCallback(VBlankCB_Phase2_Clockwise_BlackFade); + SetVBlankCallback(VBlankCB_Clockwise_BlackFade); sTransitionStructPtr->data[4] = 120; task->tState++; return TRUE; } -static bool8 Phase2_Clockwise_BlackFade_Func2(struct Task *task) +static bool8 Clockwise_BlackFade_Func2(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; @@ -1768,7 +1767,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Clockwise_BlackFade_Func3(struct Task *task) +static bool8 Clockwise_BlackFade_Func3(struct Task *task) { s16 r1, r3; vu8 var = 0; @@ -1806,7 +1805,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_Clockwise_BlackFade_Func4(struct Task *task) +static bool8 Clockwise_BlackFade_Func4(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; @@ -1827,7 +1826,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func4(struct Task *task) return FALSE; } -static bool8 Phase2_Clockwise_BlackFade_Func5(struct Task *task) +static bool8 Clockwise_BlackFade_Func5(struct Task *task) { s16 r1, r2, var4; vu8 var = 0; @@ -1867,7 +1866,7 @@ static bool8 Phase2_Clockwise_BlackFade_Func5(struct Task *task) return FALSE; } -static bool8 Phase2_Clockwise_BlackFade_Func6(struct Task *task) +static bool8 Clockwise_BlackFade_Func6(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; @@ -1891,15 +1890,15 @@ static bool8 Phase2_Clockwise_BlackFade_Func6(struct Task *task) return FALSE; } -static bool8 Phase2_Clockwise_BlackFade_Func7(struct Task *task) +static bool8 Clockwise_BlackFade_Func7(struct Task *task) { DmaStop(0); FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Phase2Task_Clockwise_BlackFade)); + DestroyTask(FindTaskIdByFunc(Task_Clockwise_BlackFade)); return FALSE; } -static void VBlankCB_Phase2_Clockwise_BlackFade(void) +static void VBlankCB_Clockwise_BlackFade(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -1912,12 +1911,12 @@ static void VBlankCB_Phase2_Clockwise_BlackFade(void) DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); } -static void Phase2Task_Ripple(u8 taskId) +static void Task_Ripple(u8 taskId) { - while (sPhase2_Ripple_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sRipple_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Ripple_Func1(struct Task *task) +static bool8 Ripple_Func1(struct Task *task) { u8 i; @@ -1929,8 +1928,8 @@ static bool8 Phase2_Ripple_Func1(struct Task *task) gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_16; } - SetVBlankCallback(VBlankCB_Phase2_Ripple); - SetHBlankCallback(HBlankCB_Phase2_Ripple); + SetVBlankCallback(VBlankCB_Ripple); + SetHBlankCallback(HBlankCB_Ripple); EnableInterrupts(INTR_FLAG_HBLANK); @@ -1938,7 +1937,7 @@ static bool8 Phase2_Ripple_Func1(struct Task *task) return TRUE; } -static bool8 Phase2_Ripple_Func2(struct Task *task) +static bool8 Ripple_Func2(struct Task *task) { u8 i; s16 r3; @@ -1966,20 +1965,20 @@ static bool8 Phase2_Ripple_Func2(struct Task *task) } if (task->tData4 != 0 && !gPaletteFade.active) - DestroyTask(FindTaskIdByFunc(Phase2Task_Ripple)); + DestroyTask(FindTaskIdByFunc(Task_Ripple)); sTransitionStructPtr->VBlank_DMA++; return FALSE; } -static void VBlankCB_Phase2_Ripple(void) +static void VBlankCB_Ripple(void) { VBlankCB_BattleTransition(); if (sTransitionStructPtr->VBlank_DMA) DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); } -static void HBlankCB_Phase2_Ripple(void) +static void HBlankCB_Ripple(void) { u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT]; REG_BG1VOFS = var; @@ -1987,12 +1986,12 @@ static void HBlankCB_Phase2_Ripple(void) REG_BG3VOFS = var; } -static void Phase2Task_Wave(u8 taskId) +static void Task_Wave(u8 taskId) { - while (sPhase2_Wave_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sWave_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Wave_Func1(struct Task *task) +static bool8 Wave_Func1(struct Task *task) { u8 i; @@ -2009,13 +2008,13 @@ static bool8 Phase2_Wave_Func1(struct Task *task) gScanlineEffectRegBuffers[1][i] = 242; } - SetVBlankCallback(VBlankCB_Phase2_Wave); + SetVBlankCallback(VBlankCB_Wave); task->tState++; return TRUE; } -static bool8 Phase2_Wave_Func2(struct Task *task) +static bool8 Wave_Func2(struct Task *task) { u8 i, r5; u16* toStore; @@ -2045,15 +2044,15 @@ static bool8 Phase2_Wave_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Wave_Func3(struct Task *task) +static bool8 Wave_Func3(struct Task *task) { DmaStop(0); FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Phase2Task_Wave)); + DestroyTask(FindTaskIdByFunc(Task_Wave)); return FALSE; } -static void VBlankCB_Phase2_Wave(void) +static void VBlankCB_Wave(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -2065,42 +2064,42 @@ static void VBlankCB_Phase2_Wave(void) DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); } -static void Phase2Task_Sidney(u8 taskId) +static void Task_Sidney(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_SIDNEY; - Phase2Task_MugShotTransition(taskId); + Task_MugShotTransition(taskId); } -static void Phase2Task_Phoebe(u8 taskId) +static void Task_Phoebe(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_PHOEBE; - Phase2Task_MugShotTransition(taskId); + Task_MugShotTransition(taskId); } -static void Phase2Task_Glacia(u8 taskId) +static void Task_Glacia(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_GLACIA; - Phase2Task_MugShotTransition(taskId); + Task_MugShotTransition(taskId); } -static void Phase2Task_Drake(u8 taskId) +static void Task_Drake(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_DRAKE; - Phase2Task_MugShotTransition(taskId); + Task_MugShotTransition(taskId); } -static void Phase2Task_Champion(u8 taskId) +static void Task_Champion(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_CHAMPION; - Phase2Task_MugShotTransition(taskId); + Task_MugShotTransition(taskId); } -static void Phase2Task_MugShotTransition(u8 taskId) +static void Task_MugShotTransition(u8 taskId) { - while (sPhase2_Mugshot_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sMugshot_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Mugshot_Func1(struct Task *task) +static bool8 Mugshot_Func1(struct Task *task) { u8 i; @@ -2120,13 +2119,13 @@ static bool8 Phase2_Mugshot_Func1(struct Task *task) gScanlineEffectRegBuffers[1][i] = 0xF0F1; } - SetVBlankCallback(VBlankCB0_Phase2_Mugshots); + SetVBlankCallback(VBlankCB0_Mugshots); task->tState++; return FALSE; } -static bool8 Phase2_Mugshot_Func2(struct Task *task) +static bool8 Mugshot_Func2(struct Task *task) { s16 i, j; u16 *tilemap, *tileset; @@ -2148,12 +2147,12 @@ static bool8 Phase2_Mugshot_Func2(struct Task *task) EnableInterrupts(INTR_FLAG_HBLANK); - SetHBlankCallback(HBlankCB_Phase2_Mugshots); + SetHBlankCallback(HBlankCB_Mugshots); task->tState++; return FALSE; } -static bool8 Phase2_Mugshot_Func3(struct Task *task) +static bool8 Mugshot_Func3(struct Task *task) { u8 i, r5; u16* toStore; @@ -2201,7 +2200,7 @@ static bool8 Phase2_Mugshot_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_Mugshot_Func4(struct Task *task) +static bool8 Mugshot_Func4(struct Task *task) { u8 i; u16* toStore; @@ -2230,7 +2229,7 @@ static bool8 Phase2_Mugshot_Func4(struct Task *task) return FALSE; } -static bool8 Phase2_Mugshot_Func5(struct Task *task) +static bool8 Mugshot_Func5(struct Task *task) { sTransitionStructPtr->BG0HOFS_1 -= 8; sTransitionStructPtr->BG0HOFS_2 += 8; @@ -2242,7 +2241,7 @@ static bool8 Phase2_Mugshot_Func5(struct Task *task) return FALSE; } -static bool8 Phase2_Mugshot_Func6(struct Task *task) +static bool8 Mugshot_Func6(struct Task *task) { sTransitionStructPtr->BG0HOFS_1 -= 8; sTransitionStructPtr->BG0HOFS_2 += 8; @@ -2259,12 +2258,12 @@ static bool8 Phase2_Mugshot_Func6(struct Task *task) task->tData3 = 0; task->tData4 = 0; sTransitionStructPtr->BLDCNT = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN; - SetVBlankCallback(VBlankCB1_Phase2_Mugshots); + SetVBlankCallback(VBlankCB1_Mugshots); } return FALSE; } -static bool8 Phase2_Mugshot_Func7(struct Task *task) +static bool8 Mugshot_Func7(struct Task *task) { bool32 r6; @@ -2305,7 +2304,7 @@ static bool8 Phase2_Mugshot_Func7(struct Task *task) return FALSE; } -static bool8 Phase2_Mugshot_Func8(struct Task *task) +static bool8 Mugshot_Func8(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; BlendPalettes(PALETTES_ALL, 0x10, RGB_WHITE); @@ -2316,7 +2315,7 @@ static bool8 Phase2_Mugshot_Func8(struct Task *task) return TRUE; } -static bool8 Phase2_Mugshot_Func9(struct Task *task) +static bool8 Mugshot_Func9(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; @@ -2329,7 +2328,7 @@ static bool8 Phase2_Mugshot_Func9(struct Task *task) return FALSE; } -static bool8 Phase2_Mugshot_Func10(struct Task *task) +static bool8 Mugshot_Func10(struct Task *task) { DmaStop(0); FadeScreenBlack(); @@ -2337,7 +2336,7 @@ static bool8 Phase2_Mugshot_Func10(struct Task *task) return FALSE; } -static void VBlankCB0_Phase2_Mugshots(void) +static void VBlankCB0_Mugshots(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -2350,7 +2349,7 @@ static void VBlankCB0_Phase2_Mugshots(void) DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); } -static void VBlankCB1_Phase2_Mugshots(void) +static void VBlankCB1_Mugshots(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -2360,7 +2359,7 @@ static void VBlankCB1_Phase2_Mugshots(void) DmaSet(0, gScanlineEffectRegBuffers[1], ®_BLDY, 0xA2400001); } -static void HBlankCB_Phase2_Mugshots(void) +static void HBlankCB_Mugshots(void) { if (REG_VCOUNT < 80) REG_BG0HOFS = sTransitionStructPtr->BG0HOFS_1; @@ -2491,12 +2490,12 @@ static s16 IsTrainerPicSlideDone(s16 spriteId) #undef sDone #undef sSlideTableId -static void Phase2Task_Slice(u8 taskId) +static void Task_Slice(u8 taskId) { - while (sPhase2_Slice_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sSlice_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Slice_Func1(struct Task *task) +static bool8 Slice_Func1(struct Task *task) { u16 i; @@ -2519,14 +2518,14 @@ static bool8 Phase2_Slice_Func1(struct Task *task) EnableInterrupts(INTR_FLAG_HBLANK); SetGpuRegBits(REG_OFFSET_DISPSTAT, DISPSTAT_HBLANK_INTR); - SetVBlankCallback(VBlankCB_Phase2_Slice); - SetHBlankCallback(HBlankCB_Phase2_Slice); + SetVBlankCallback(VBlankCB_Slice); + SetHBlankCallback(HBlankCB_Slice); task->tState++; return TRUE; } -static bool8 Phase2_Slice_Func2(struct Task *task) +static bool8 Slice_Func2(struct Task *task) { u16 i; @@ -2563,15 +2562,15 @@ static bool8 Phase2_Slice_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Slice_Func3(struct Task *task) +static bool8 Slice_Func3(struct Task *task) { DmaStop(0); FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Phase2Task_Slice)); + DestroyTask(FindTaskIdByFunc(Task_Slice)); return FALSE; } -static void VBlankCB_Phase2_Slice(void) +static void VBlankCB_Slice(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -2583,7 +2582,7 @@ static void VBlankCB_Phase2_Slice(void) DmaSet(0, &gScanlineEffectRegBuffers[1][160], ®_WIN0H, 0xA2400001); } -static void HBlankCB_Phase2_Slice(void) +static void HBlankCB_Slice(void) { if (REG_VCOUNT < 160) { @@ -2594,12 +2593,12 @@ static void HBlankCB_Phase2_Slice(void) } } -static void Phase2Task_ShredSplit(u8 taskId) +static void Task_ShredSplit(u8 taskId) { - while (sPhase2_ShredSplit_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sShredSplit_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_ShredSplit_Func1(struct Task *task) +static bool8 ShredSplit_Func1(struct Task *task) { u16 i; @@ -2627,14 +2626,14 @@ static bool8 Phase2_ShredSplit_Func1(struct Task *task) EnableInterrupts(INTR_FLAG_HBLANK); - SetVBlankCallback(VBlankCB_Phase2_Slice); - SetHBlankCallback(HBlankCB_Phase2_Slice); + SetVBlankCallback(VBlankCB_Slice); + SetHBlankCallback(HBlankCB_Slice); task->tState++; return TRUE; } -static bool8 Phase2_ShredSplit_Func2(struct Task *task) +static bool8 ShredSplit_Func2(struct Task *task) { u16 i, j, k; u8 arr1[ARRAY_COUNT(gUnknown_085C8C64)]; @@ -2735,7 +2734,7 @@ static bool8 Phase2_ShredSplit_Func2(struct Task *task) // is always false, resulting in the game being stuck in an infinite loop. // It's possible this transition is only partially // done and the second part was left out. -static bool8 Phase2_ShredSplit_Func3(struct Task *task) +static bool8 ShredSplit_Func3(struct Task *task) { u16 i; bool32 done = TRUE; @@ -2753,25 +2752,25 @@ static bool8 Phase2_ShredSplit_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_ShredSplit_Func4(struct Task *task) +static bool8 ShredSplit_Func4(struct Task *task) { DmaStop(0); FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Phase2Task_ShredSplit)); + DestroyTask(FindTaskIdByFunc(Task_ShredSplit)); return FALSE; } -static void Phase2Task_Blackhole1(u8 taskId) +static void Task_Blackhole1(u8 taskId) { - while (sPhase2_Blackhole1_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sBlackhole1_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_Blackhole2(u8 taskId) +static void Task_Blackhole2(u8 taskId) { - while (sPhase2_Blackhole2_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sBlackhole2_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Blackhole_Func1(struct Task *task) +static bool8 Blackhole_Func1(struct Task *task) { s32 i; @@ -2788,7 +2787,7 @@ static bool8 Phase2_Blackhole_Func1(struct Task *task) gScanlineEffectRegBuffers[1][i] = 0; } - SetVBlankCallback(VBlankCB1_Phase2_BigPokeball); + SetVBlankCallback(VBlankCB1_BigPokeball); task->tState++; task->tData1 = 1; @@ -2798,7 +2797,7 @@ static bool8 Phase2_Blackhole_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_Blackhole1_Func3(struct Task *task) +static bool8 Blackhole1_Func3(struct Task *task) { if (task->tFuncState == 1) { @@ -2830,7 +2829,7 @@ static bool8 Phase2_Blackhole1_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_Blackhole1_Func2(struct Task *task) +static bool8 Blackhole1_Func2(struct Task *task) { sTransitionStructPtr->VBlank_DMA = FALSE; if (task->tFuncState == 0) @@ -2852,7 +2851,7 @@ static bool8 Phase2_Blackhole1_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_Blackhole2_Func2(struct Task *task) +static bool8 Blackhole2_Func2(struct Task *task) { u16 index; // should be s16 I think s16 amplitude; @@ -2897,12 +2896,12 @@ static bool8 Phase2_Blackhole2_Func2(struct Task *task) return FALSE; } -static void Phase2Task_RectangularSpiral(u8 taskId) +static void Task_RectangularSpiral(u8 taskId) { - while (sPhase2_RectangularSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sRectangularSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_RectangularSpiral_Func1(struct Task *task) +static bool8 RectangularSpiral_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -2942,7 +2941,7 @@ static bool8 Phase2_RectangularSpiral_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_RectangularSpiral_Func2(struct Task *task) +static bool8 RectangularSpiral_Func2(struct Task *task) { u16 *tilemap, *tileset; u8 i; @@ -2978,7 +2977,7 @@ static bool8 Phase2_RectangularSpiral_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_RectangularSpiral_Func3(struct Task *task) +static bool8 RectangularSpiral_Func3(struct Task *task) { DmaStop(0); FadeScreenBlack(); @@ -3049,12 +3048,12 @@ static bool16 sub_8149048(const s16 * const *arg0, struct StructRectangularSpira return TRUE; } -static void Phase2Task_Groudon(u8 taskId) +static void Task_Groudon(u8 taskId) { - while (sPhase2_Groudon_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sGroudon_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Groudon_Func3(struct Task *task) +static bool8 Groudon_Func3(struct Task *task) { u16 *tilemap, *tileset; @@ -3068,7 +3067,7 @@ static bool8 Phase2_Groudon_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_Groudon_Func4(struct Task *task) +static bool8 Groudon_Func4(struct Task *task) { if (task->tData1 % 3 == 0) { @@ -3084,7 +3083,7 @@ static bool8 Phase2_Groudon_Func4(struct Task *task) return FALSE; } -static bool8 Phase2_Groudon_Func5(struct Task *task) +static bool8 Groudon_Func5(struct Task *task) { if (task->tData1 % 5 == 0) { @@ -3101,12 +3100,12 @@ static bool8 Phase2_Groudon_Func5(struct Task *task) return FALSE; } -static void Phase2Task_Rayquaza(u8 taskId) +static void Task_Rayquaza(u8 taskId) { - while (sPhase2_Rayquaza_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sRayquaza_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Rayquaza_Func3(struct Task *task) +static bool8 Rayquaza_Func3(struct Task *task) { u16 *tilemap, *tileset; u16 i; @@ -3129,11 +3128,11 @@ static bool8 Phase2_Rayquaza_Func3(struct Task *task) gScanlineEffectRegBuffers[1][i] = 0x100; } - SetVBlankCallback(VBlankCB_Phase2_Rayquaza); + SetVBlankCallback(VBlankCB_Rayquaza); return FALSE; } -static bool8 Phase2_Rayquaza_Func4(struct Task *task) +static bool8 Rayquaza_Func4(struct Task *task) { u16 *tilemap, *tileset; @@ -3143,7 +3142,7 @@ static bool8 Phase2_Rayquaza_Func4(struct Task *task) return FALSE; } -static bool8 Phase2_Rayquaza_Func5(struct Task *task) +static bool8 Rayquaza_Func5(struct Task *task) { if ((task->tData1 % 4) == 0) { @@ -3160,7 +3159,7 @@ static bool8 Phase2_Rayquaza_Func5(struct Task *task) return FALSE; } -static bool8 Phase2_Rayquaza_Func6(struct Task *task) +static bool8 Rayquaza_Func6(struct Task *task) { if (++task->tData1 > 20) { @@ -3172,7 +3171,7 @@ static bool8 Phase2_Rayquaza_Func6(struct Task *task) return FALSE; } -static bool8 Phase2_Rayquaza_Func7(struct Task *task) +static bool8 Rayquaza_Func7(struct Task *task) { if (!gPaletteFade.active) { @@ -3183,7 +3182,7 @@ static bool8 Phase2_Rayquaza_Func7(struct Task *task) return FALSE; } -static bool8 Phase2_Rayquaza_Func8(struct Task *task) +static bool8 Rayquaza_Func8(struct Task *task) { BlendPalettes(PALETTES_BG & ~(0x8000), 8, 0); BlendPalettes(PALETTES_OBJECTS | 0x8000, 0, 0); @@ -3192,7 +3191,7 @@ static bool8 Phase2_Rayquaza_Func8(struct Task *task) return FALSE; } -static bool8 Phase2_Rayquaza_Func9(struct Task *task) +static bool8 Rayquaza_Func9(struct Task *task) { if ((task->tData1 % 3) == 0) { @@ -3214,7 +3213,7 @@ static bool8 Phase2_Rayquaza_Func9(struct Task *task) gScanlineEffectRegBuffers[1][i] = 0; } - SetVBlankCallback(VBlankCB1_Phase2_BigPokeball); + SetVBlankCallback(VBlankCB1_BigPokeball); task->tState++; task->tData2 = 0x100; task->tFuncState = 0; @@ -3224,7 +3223,7 @@ static bool8 Phase2_Rayquaza_Func9(struct Task *task) return FALSE; } -static void VBlankCB_Phase2_Rayquaza(void) +static void VBlankCB_Rayquaza(void) { void *dmaSrc; @@ -3241,12 +3240,12 @@ static void VBlankCB_Phase2_Rayquaza(void) DmaSet(0, dmaSrc, ®_BG0VOFS, 0xA2400001); } -static void Phase2Task_WhiteFade(u8 taskId) +static void Task_WhiteFade(u8 taskId) { - while (sPhase2_WhiteFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sWhiteFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_WhiteFade_Func1(struct Task *task) +static bool8 WhiteFade_Func1(struct Task *task) { u16 i; @@ -3266,14 +3265,14 @@ static bool8 Phase2_WhiteFade_Func1(struct Task *task) } EnableInterrupts(INTR_FLAG_HBLANK); - SetHBlankCallback(HBlankCB_Phase2_WhiteFade); - SetVBlankCallback(VBlankCB0_Phase2_WhiteFade); + SetHBlankCallback(HBlankCB_WhiteFade); + SetVBlankCallback(VBlankCB0_WhiteFade); task->tState++; return FALSE; } -static bool8 Phase2_WhiteFade_Func2(struct Task *task) +static bool8 WhiteFade_Func2(struct Task *task) { s16 i, posY; s16 arr1[ARRAY_COUNT(sUnknown_085C8DA0)]; @@ -3293,7 +3292,7 @@ static bool8 Phase2_WhiteFade_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_WhiteFade_Func3(struct Task *task) +static bool8 WhiteFade_Func3(struct Task *task) { sTransitionStructPtr->VBlank_DMA = 0; if (sTransitionStructPtr->field_20 > 7) @@ -3304,7 +3303,7 @@ static bool8 Phase2_WhiteFade_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_WhiteFade_Func4(struct Task *task) +static bool8 WhiteFade_Func4(struct Task *task) { sTransitionStructPtr->VBlank_DMA = 0; @@ -3317,23 +3316,23 @@ static bool8 Phase2_WhiteFade_Func4(struct Task *task) sTransitionStructPtr->BLDCNT = 0xFF; sTransitionStructPtr->WININ = WININ_WIN0_ALL; - SetVBlankCallback(VBlankCB1_Phase2_WhiteFade); + SetVBlankCallback(VBlankCB1_WhiteFade); task->tState++; return FALSE; } -static bool8 Phase2_WhiteFade_Func5(struct Task *task) +static bool8 WhiteFade_Func5(struct Task *task) { if (++sTransitionStructPtr->BLDY > 16) { FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Phase2Task_WhiteFade)); + DestroyTask(FindTaskIdByFunc(Task_WhiteFade)); } return FALSE; } -static void VBlankCB0_Phase2_WhiteFade(void) +static void VBlankCB0_WhiteFade(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -3346,7 +3345,7 @@ static void VBlankCB0_Phase2_WhiteFade(void) DmaSet(0, &gScanlineEffectRegBuffers[1][160], ®_WIN0H, 0xA2400001); } -static void VBlankCB1_Phase2_WhiteFade(void) +static void VBlankCB1_WhiteFade(void) { VBlankCB_BattleTransition(); REG_BLDY = sTransitionStructPtr->BLDY; @@ -3357,7 +3356,7 @@ static void VBlankCB1_Phase2_WhiteFade(void) REG_WIN0V = sTransitionStructPtr->WIN0V; } -static void HBlankCB_Phase2_WhiteFade(void) +static void HBlankCB_WhiteFade(void) { REG_BLDY = gScanlineEffectRegBuffers[1][REG_VCOUNT]; } @@ -3405,12 +3404,12 @@ static void sub_8149864(struct Sprite *sprite) } } -static void Phase2Task_GridSquares(u8 taskId) +static void Task_GridSquares(u8 taskId) { - while (sPhase2_GridSquares_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sGridSquares_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_GridSquares_Func1(struct Task *task) +static bool8 GridSquares_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -3423,7 +3422,7 @@ static bool8 Phase2_GridSquares_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_GridSquares_Func2(struct Task *task) +static bool8 GridSquares_Func2(struct Task *task) { u16* tileset; @@ -3444,22 +3443,22 @@ static bool8 Phase2_GridSquares_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_GridSquares_Func3(struct Task *task) +static bool8 GridSquares_Func3(struct Task *task) { if (--task->tData1 == 0) { FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Phase2Task_GridSquares)); + DestroyTask(FindTaskIdByFunc(Task_GridSquares)); } return FALSE; } -static void Phase2Task_Shards(u8 taskId) +static void Task_Shards(u8 taskId) { - while (sPhase2_Shards_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sShards_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_Shards_Func1(struct Task *task) +static bool8 Shards_Func1(struct Task *task) { u16 i; @@ -3476,13 +3475,13 @@ static bool8 Phase2_Shards_Func1(struct Task *task) } CpuSet(gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 0xA0); - SetVBlankCallback(VBlankCB_Phase2_Shards); + SetVBlankCallback(VBlankCB_Shards); task->tState++; return TRUE; } -static bool8 Phase2_Shards_Func2(struct Task *task) +static bool8 Shards_Func2(struct Task *task) { sub_814A1AC(sTransitionStructPtr->data, sUnknown_085C8DD0[task->tData1][0], @@ -3495,7 +3494,7 @@ static bool8 Phase2_Shards_Func2(struct Task *task) return TRUE; } -static bool8 Phase2_Shards_Func3(struct Task *task) +static bool8 Shards_Func3(struct Task *task) { s16 i; bool8 nextFunc; @@ -3534,7 +3533,7 @@ static bool8 Phase2_Shards_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_Shards_Func4(struct Task *task) +static bool8 Shards_Func4(struct Task *task) { if (++task->tData1 < 7) { @@ -3546,12 +3545,12 @@ static bool8 Phase2_Shards_Func4(struct Task *task) { DmaStop(0); FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Phase2Task_Shards)); + DestroyTask(FindTaskIdByFunc(Task_Shards)); return FALSE; } } -static bool8 Phase2_Shards_Func5(struct Task *task) +static bool8 Shards_Func5(struct Task *task) { if (--task->tData3 == 0) { @@ -3562,7 +3561,7 @@ static bool8 Phase2_Shards_Func5(struct Task *task) return FALSE; } -static void VBlankCB_Phase2_Shards(void) +static void VBlankCB_Shards(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -3597,9 +3596,9 @@ static void VBlankCB_Phase2_Shards(void) #define tData6 data[6] #define tData7 data[7] -static void CreatePhase1Task(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4) +static void CreateIntroTask(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4) { - u8 taskId = CreateTask(TransitionPhase1_Task_RunFuncs, 3); + u8 taskId = CreateTask(Task_BattleTransition_Intro, 3); gTasks[taskId].tData1 = a0; gTasks[taskId].tData2 = a1; gTasks[taskId].tData3 = a2; @@ -3608,20 +3607,20 @@ static void CreatePhase1Task(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4) gTasks[taskId].tData6 = a0; } -static bool8 IsPhase1Done(void) +static bool8 IsIntroTaskDone(void) { - if (FindTaskIdByFunc(TransitionPhase1_Task_RunFuncs) == TASK_NONE) + if (FindTaskIdByFunc(Task_BattleTransition_Intro) == TASK_NONE) return TRUE; else return FALSE; } -void TransitionPhase1_Task_RunFuncs(u8 taskId) +void Task_BattleTransition_Intro(u8 taskId) { - while (sPhase1_TransitionAll_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sTransitionIntroFuncs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase1_TransitionAll_Func1(struct Task *task) +static bool8 Transition_Intro_1(struct Task *task) { if (task->tData6 == 0 || --task->tData6 == 0) { @@ -3639,7 +3638,7 @@ static bool8 Phase1_TransitionAll_Func1(struct Task *task) return FALSE; } -static bool8 Phase1_TransitionAll_Func2(struct Task *task) +static bool8 Transition_Intro_2(struct Task *task) { if (task->tData6 == 0 || --task->tData6 == 0) { @@ -3652,7 +3651,7 @@ static bool8 Phase1_TransitionAll_Func2(struct Task *task) if (task->tData7 == 0) { if (--task->tData3 == 0) - DestroyTask(FindTaskIdByFunc(TransitionPhase1_Task_RunFuncs)); + DestroyTask(FindTaskIdByFunc(Task_BattleTransition_Intro)); else { task->tData6 = task->tData1; @@ -3845,7 +3844,7 @@ static bool8 sub_814A228(s16 *data, bool8 a1, bool8 a2) #define tData6 data[6] #define tData7 data[7] -static bool8 Phase2_FrontierLogoWiggle_Func1(struct Task *task) +static bool8 FrontierLogoWiggle_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -3859,7 +3858,7 @@ static bool8 Phase2_FrontierLogoWiggle_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierLogoWiggle_Func2(struct Task *task) +static bool8 FrontierLogoWiggle_Func2(struct Task *task) { u16 *tilemap, *tileset; @@ -3871,17 +3870,17 @@ static bool8 Phase2_FrontierLogoWiggle_Func2(struct Task *task) return TRUE; } -static void Phase2Task_FrontierLogoWiggle(u8 taskId) +static void Task_FrontierLogoWiggle(u8 taskId) { - while (sPhase2_FrontierLogoWiggle_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierLogoWiggle_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_FrontierLogoWave(u8 taskId) +static void Task_FrontierLogoWave(u8 taskId) { - while (sPhase2_FrontierLogoWave_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierLogoWave_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_FrontierLogoWave_Func1(struct Task *task) +static bool8 FrontierLogoWave_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -3907,7 +3906,7 @@ static bool8 Phase2_FrontierLogoWave_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierLogoWave_Func2(struct Task *task) +static bool8 FrontierLogoWave_Func2(struct Task *task) { u16 *tilemap, *tileset; @@ -3918,7 +3917,7 @@ static bool8 Phase2_FrontierLogoWave_Func2(struct Task *task) return TRUE; } -static bool8 Phase2_FrontierLogoWave_Func3(struct Task *task) +static bool8 FrontierLogoWave_Func3(struct Task *task) { u8 i; @@ -3927,15 +3926,15 @@ static bool8 Phase2_FrontierLogoWave_Func3(struct Task *task) gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_16; } - SetVBlankCallback(VBlankCB_Phase2_30); - SetHBlankCallback(HBlankCB_Phase2_30); + SetVBlankCallback(VBlankCB_30); + SetHBlankCallback(HBlankCB_30); EnableInterrupts(INTR_FLAG_HBLANK); task->tState++; return TRUE; } -static bool8 Phase2_FrontierLogoWave_Func4(struct Task *task) +static bool8 FrontierLogoWave_Func4(struct Task *task) { u8 i; u16 var6, amplitude, var8; @@ -3979,14 +3978,14 @@ static bool8 Phase2_FrontierLogoWave_Func4(struct Task *task) } if (task->tData4 != 0 && !gPaletteFade.active) - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierLogoWave)); + DestroyTask(FindTaskIdByFunc(Task_FrontierLogoWave)); task->tData7 -= 17; sTransitionStructPtr->VBlank_DMA++; return FALSE; } -static void VBlankCB_Phase2_30(void) +static void VBlankCB_30(void) { VBlankCB_BattleTransition(); REG_BLDCNT = sTransitionStructPtr->BLDCNT; @@ -3996,28 +3995,28 @@ static void VBlankCB_Phase2_30(void) DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); } -static void HBlankCB_Phase2_30(void) +static void HBlankCB_30(void) { u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT]; REG_BG0VOFS = var; } -static void Phase2Task_FrontierSquares(u8 taskId) +static void Task_FrontierSquares(u8 taskId) { - while (sPhase2_FrontierSquares_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierSquares_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_FrontierSquaresSpiral(u8 taskId) +static void Task_FrontierSquaresSpiral(u8 taskId) { - while (sPhase2_FrontierSquaresSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierSquaresSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Phase2Task_FrontierSquaresScroll(u8 taskId) +static void Task_FrontierSquaresScroll(u8 taskId) { - while (sPhase2_FrontierSquaresScroll_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierSquaresScroll_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Phase2_FrontierSquares_Func1(struct Task *task) +static bool8 FrontierSquares_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -4039,7 +4038,7 @@ static bool8 Phase2_FrontierSquares_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquares_Func2(struct Task *task) +static bool8 FrontierSquares_Func2(struct Task *task) { CopyRectToBgTilemapBufferRect(0, sFrontierSquares_Tilemap, 0, 0, 4, 4, task->tData2, task->tData3, 4, 4, 0xF, 0, 0); CopyBgTilemapBufferToVram(0); @@ -4057,7 +4056,7 @@ static bool8 Phase2_FrontierSquares_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquares_Func3(struct Task *task) +static bool8 FrontierSquares_Func3(struct Task *task) { u8 i; u16 *tilemap, *tileset; @@ -4098,7 +4097,7 @@ static bool8 Phase2_FrontierSquares_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquaresSpiral_Func1(struct Task *task) +static bool8 FrontierSquaresSpiral_Func1(struct Task *task) { u16 *tilemap, *tileset; @@ -4120,7 +4119,7 @@ static bool8 Phase2_FrontierSquaresSpiral_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquaresSpiral_Func2(struct Task *task) +static bool8 FrontierSquaresSpiral_Func2(struct Task *task) { u8 var = gUnknown_085C9A30[task->tData2]; u8 varMod = var % 7; @@ -4133,7 +4132,7 @@ static bool8 Phase2_FrontierSquaresSpiral_Func2(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquaresSpiral_Func3(struct Task *task) +static bool8 FrontierSquaresSpiral_Func3(struct Task *task) { BlendPalette(0xE0, 0x10, 3, 0); BlendPalettes(PALETTES_ALL & ~(0x8000 | 0x4000), 0x10, 0); @@ -4145,7 +4144,7 @@ static bool8 Phase2_FrontierSquaresSpiral_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquaresSpiral_Func4(struct Task *task) +static bool8 FrontierSquaresSpiral_Func4(struct Task *task) { if ((task->tData3 ^= 1)) { @@ -4188,7 +4187,7 @@ static bool8 Phase2_FrontierSquaresSpiral_Func4(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquares_End(struct Task *task) +static bool8 FrontierSquares_End(struct Task *task) { FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 0x20, 0x20); CopyBgTilemapBufferToVram(0); @@ -4213,7 +4212,7 @@ static void sub_814ABE4(u8 taskId) } } -static bool8 Phase2_FrontierSquaresScroll_Func1(struct Task *task) +static bool8 FrontierSquaresScroll_Func1(struct Task *task) { u8 taskId = 0; u16 *tilemap, *tileset; @@ -4255,7 +4254,7 @@ static bool8 Phase2_FrontierSquaresScroll_Func1(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquaresScroll_Func2(struct Task *task) +static bool8 FrontierSquaresScroll_Func2(struct Task *task) { u8 var = gUnknown_085C9A53[task->tData2]; u8 varDiv = var / 8; @@ -4282,7 +4281,7 @@ static bool8 Phase2_FrontierSquaresScroll_Func2(struct Task *task) return 0; } -static bool8 Phase2_FrontierSquaresScroll_Func3(struct Task *task) +static bool8 FrontierSquaresScroll_Func3(struct Task *task) { BlendPalettes(PALETTES_ALL & ~(0x8000), 0x10, 0); @@ -4292,7 +4291,7 @@ static bool8 Phase2_FrontierSquaresScroll_Func3(struct Task *task) return FALSE; } -static bool8 Phase2_FrontierSquaresScroll_Func4(struct Task *task) +static bool8 FrontierSquaresScroll_Func4(struct Task *task) { u8 var = gUnknown_085C9A53[task->tData2]; u8 varDiv = var / 8; @@ -4314,7 +4313,7 @@ static bool8 Phase2_FrontierSquaresScroll_Func4(struct Task *task) #undef tSub32_Y_delta #undef tSub32_Bool -static bool8 Phase2_FrontierSquaresScroll_Func5(struct Task *task) +static bool8 FrontierSquaresScroll_Func5(struct Task *task) { gBattle_BG0_X = 0; gBattle_BG0_Y = 0; diff --git a/src/battle_transition_frontier.c b/src/battle_transition_frontier.c index 2d34c9f86a..3b35e53aa5 100644 --- a/src/battle_transition_frontier.c +++ b/src/battle_transition_frontier.c @@ -21,7 +21,6 @@ typedef bool8 (*TransitionStateFunc)(struct Task *task); -// this file's functions static void SpriteCB_LogoCircleSlide(struct Sprite *sprite); static void SpriteCB_LogoCircleSpiral(struct Sprite *sprite); static bool8 WaitForLogoCirclesAnim(struct Task *task); @@ -46,7 +45,6 @@ static bool8 CirclesSymmetricSpiralInSeq_End(struct Task *task); #define PALTAG_LOGO_CIRCLES 0x2E90 -// const rom data static const u32 sLogoCenter_Gfx[] = INCBIN_U32("graphics/battle_transitions/frontier_logo_center.4bpp.lz"); static const u32 sLogoCenter_Tilemap[] = INCBIN_U32("graphics/battle_transitions/frontier_logo_center.bin"); static const u32 sLogoCircles_Gfx[] = INCBIN_U32("graphics/battle_transitions/frontier_logo_circles.4bpp.lz"); @@ -121,7 +119,7 @@ static const struct SpriteTemplate sSpriteTemplate_LogoCircles = .callback = SpriteCallbackDummy, }; -static const TransitionStateFunc sPhase2_FrontierCirclesMeet_Funcs[] = +static const TransitionStateFunc sFrontierCirclesMeet_Funcs[] = { Circles_Init, CirclesMeet_CreateSprites, @@ -130,7 +128,7 @@ static const TransitionStateFunc sPhase2_FrontierCirclesMeet_Funcs[] = CirclesMeet_End }; -static const TransitionStateFunc sPhase2_FrontierCirclesCross_Funcs[] = +static const TransitionStateFunc sFrontierCirclesCross_Funcs[] = { Circles_Init, CirclesCross_CreateSprites, @@ -139,7 +137,7 @@ static const TransitionStateFunc sPhase2_FrontierCirclesCross_Funcs[] = CirclesCross_End }; -static const TransitionStateFunc sPhase2_FrontierCirclesAsymmetricSpiral_Funcs[] = +static const TransitionStateFunc sFrontierCirclesAsymmetricSpiral_Funcs[] = { Circles_Init, CirclesAsymmetricSpiral_CreateSprites, @@ -148,7 +146,7 @@ static const TransitionStateFunc sPhase2_FrontierCirclesAsymmetricSpiral_Funcs[] CirclesAsymmetricSpiral_End }; -static const TransitionStateFunc sPhase2_FrontierCirclesSymmetricSpiral_Funcs[] = +static const TransitionStateFunc sFrontierCirclesSymmetricSpiral_Funcs[] = { Circles_Init, CirclesSymmetricSpiral_CreateSprites, @@ -157,7 +155,7 @@ static const TransitionStateFunc sPhase2_FrontierCirclesSymmetricSpiral_Funcs[] CirclesSymmetricSpiral_End }; -static const TransitionStateFunc sPhase2_FrontierCirclesMeetInSeq_Funcs[] = +static const TransitionStateFunc sFrontierCirclesMeetInSeq_Funcs[] = { Circles_Init, CirclesMeetInSeq_CreateSprites, @@ -166,7 +164,7 @@ static const TransitionStateFunc sPhase2_FrontierCirclesMeetInSeq_Funcs[] = CirclesMeetInSeq_End }; -static const TransitionStateFunc sPhase2_FrontierCirclesCrossInSeq_Funcs[] = +static const TransitionStateFunc sFrontierCirclesCrossInSeq_Funcs[] = { Circles_Init, CirclesCrossInSeq_CreateSprites, @@ -175,7 +173,7 @@ static const TransitionStateFunc sPhase2_FrontierCirclesCrossInSeq_Funcs[] = CirclesCrossInSeq_End }; -static const TransitionStateFunc sPhase2_FrontierCirclesAsymmetricSpiralInSeq_Funcs[] = +static const TransitionStateFunc sFrontierCirclesAsymmetricSpiralInSeq_Funcs[] = { Circles_Init, CirclesAsymmetricSpiralInSeq_CreateSprites, @@ -184,7 +182,7 @@ static const TransitionStateFunc sPhase2_FrontierCirclesAsymmetricSpiralInSeq_Fu CirclesAsymmetricSpiralInSeq_End }; -static const TransitionStateFunc sPhase2_FrontierCirclesSymmetricSpiralInSeq_Funcs[] = +static const TransitionStateFunc sFrontierCirclesSymmetricSpiralInSeq_Funcs[] = { Circles_Init, CirclesSymmetricSpiralInSeq_CreateSprites, @@ -193,7 +191,6 @@ static const TransitionStateFunc sPhase2_FrontierCirclesSymmetricSpiralInSeq_Fun CirclesSymmetricSpiralInSeq_End }; -// code static void LoadLogoGfx(void) { u16 *dst1, *dst2; @@ -401,9 +398,9 @@ static bool8 WaitForLogoCirclesAnim(struct Task *task) return FALSE; } -void Phase2Task_FrontierCirclesMeet(u8 taskId) +void Task_FrontierCirclesMeet(u8 taskId) { - while (sPhase2_FrontierCirclesMeet_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierCirclesMeet_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static bool8 CirclesMeet_CreateSprites(struct Task *task) @@ -421,15 +418,15 @@ static bool8 CirclesMeet_End(struct Task *task) if (!gPaletteFade.active) { DestroyLogoCirclesGfx(task); - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierCirclesMeet)); + DestroyTask(FindTaskIdByFunc(Task_FrontierCirclesMeet)); } return FALSE; } -void Phase2Task_FrontierCirclesCross(u8 taskId) +void Task_FrontierCirclesCross(u8 taskId) { - while (sPhase2_FrontierCirclesCross_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierCirclesCross_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static bool8 CirclesCross_CreateSprites(struct Task *task) @@ -447,15 +444,15 @@ static bool8 CirclesCross_End(struct Task *task) if (!gPaletteFade.active) { DestroyLogoCirclesGfx(task); - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierCirclesCross)); + DestroyTask(FindTaskIdByFunc(Task_FrontierCirclesCross)); } return FALSE; } -void Phase2Task_FrontierCirclesAsymmetricSpiral(u8 taskId) +void Task_FrontierCirclesAsymmetricSpiral(u8 taskId) { - while (sPhase2_FrontierCirclesAsymmetricSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierCirclesAsymmetricSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static bool8 CirclesAsymmetricSpiral_CreateSprites(struct Task *task) @@ -473,15 +470,15 @@ static bool8 CirclesAsymmetricSpiral_End(struct Task *task) if (!gPaletteFade.active) { DestroyLogoCirclesGfx(task); - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierCirclesAsymmetricSpiral)); + DestroyTask(FindTaskIdByFunc(Task_FrontierCirclesAsymmetricSpiral)); } return FALSE; } -void Phase2Task_FrontierCirclesSymmetricSpiral(u8 taskId) +void Task_FrontierCirclesSymmetricSpiral(u8 taskId) { - while (sPhase2_FrontierCirclesSymmetricSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierCirclesSymmetricSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static bool8 CirclesSymmetricSpiral_CreateSprites(struct Task *task) @@ -499,15 +496,15 @@ static bool8 CirclesSymmetricSpiral_End(struct Task *task) if (!gPaletteFade.active) { DestroyLogoCirclesGfx(task); - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierCirclesSymmetricSpiral)); + DestroyTask(FindTaskIdByFunc(Task_FrontierCirclesSymmetricSpiral)); } return FALSE; } -void Phase2Task_FrontierCirclesMeetInSeq(u8 taskId) +void Task_FrontierCirclesMeetInSeq(u8 taskId) { - while (sPhase2_FrontierCirclesMeetInSeq_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierCirclesMeetInSeq_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static bool8 CirclesMeetInSeq_CreateSprites(struct Task *task) @@ -535,15 +532,15 @@ static bool8 CirclesMeetInSeq_End(struct Task *task) if (!gPaletteFade.active) { DestroyLogoCirclesGfx(task); - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierCirclesMeetInSeq)); + DestroyTask(FindTaskIdByFunc(Task_FrontierCirclesMeetInSeq)); } return FALSE; } -void Phase2Task_FrontierCirclesCrossInSeq(u8 taskId) +void Task_FrontierCirclesCrossInSeq(u8 taskId) { - while (sPhase2_FrontierCirclesCrossInSeq_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierCirclesCrossInSeq_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static bool8 CirclesCrossInSeq_CreateSprites(struct Task *task) @@ -571,15 +568,15 @@ static bool8 CirclesCrossInSeq_End(struct Task *task) if (!gPaletteFade.active) { DestroyLogoCirclesGfx(task); - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierCirclesCrossInSeq)); + DestroyTask(FindTaskIdByFunc(Task_FrontierCirclesCrossInSeq)); } return FALSE; } -void Phase2Task_FrontierCirclesAsymmetricSpiralInSeq(u8 taskId) +void Task_FrontierCirclesAsymmetricSpiralInSeq(u8 taskId) { - while (sPhase2_FrontierCirclesAsymmetricSpiralInSeq_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierCirclesAsymmetricSpiralInSeq_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static bool8 CirclesAsymmetricSpiralInSeq_CreateSprites(struct Task *task) @@ -607,15 +604,15 @@ static bool8 CirclesAsymmetricSpiralInSeq_End(struct Task *task) if (!gPaletteFade.active) { DestroyLogoCirclesGfx(task); - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierCirclesAsymmetricSpiralInSeq)); + DestroyTask(FindTaskIdByFunc(Task_FrontierCirclesAsymmetricSpiralInSeq)); } return FALSE; } -void Phase2Task_FrontierCirclesSymmetricSpiralInSeq(u8 taskId) +void Task_FrontierCirclesSymmetricSpiralInSeq(u8 taskId) { - while (sPhase2_FrontierCirclesSymmetricSpiralInSeq_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sFrontierCirclesSymmetricSpiralInSeq_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } static bool8 CirclesSymmetricSpiralInSeq_CreateSprites(struct Task *task) @@ -643,7 +640,7 @@ static bool8 CirclesSymmetricSpiralInSeq_End(struct Task *task) if (!gPaletteFade.active) { DestroyLogoCirclesGfx(task); - DestroyTask(FindTaskIdByFunc(Phase2Task_FrontierCirclesSymmetricSpiralInSeq)); + DestroyTask(FindTaskIdByFunc(Task_FrontierCirclesSymmetricSpiralInSeq)); } return FALSE; diff --git a/src/tileset_anims.c b/src/tileset_anims.c index f566fe3e0e..71f8044f9f 100644 --- a/src/tileset_anims.c +++ b/src/tileset_anims.c @@ -1169,7 +1169,7 @@ static void BlendAnimPalette_BattleDome_FloorLights(u16 timer) { CpuCopy16(gTilesetAnims_BattleDomeFloorLightPals[timer % 4], gPlttBufferUnfaded + 0x80, 32); BlendPalette(0x80, 16, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if ((u8)FindTaskIdByFunc(TransitionPhase1_Task_RunFuncs) != TASK_NONE) + if ((u8)FindTaskIdByFunc(Task_BattleTransition_Intro) != TASK_NONE) { sSecondaryTilesetAnimCallback = TilesetAnim_BattleDome2; sSecondaryTilesetAnimCounterMax = 32; @@ -1179,7 +1179,7 @@ static void BlendAnimPalette_BattleDome_FloorLights(u16 timer) static void BlendAnimPalette_BattleDome_FloorLightsNoBlend(u16 timer) { CpuCopy16(gTilesetAnims_BattleDomeFloorLightPals[timer % 4], gPlttBufferUnfaded + 0x80, 32); - if ((u8)FindTaskIdByFunc(TransitionPhase1_Task_RunFuncs) == TASK_NONE) + if ((u8)FindTaskIdByFunc(Task_BattleTransition_Intro) == TASK_NONE) { BlendPalette(0x80, 16, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); if (!--sSecondaryTilesetAnimCounterMax) From 120e75d275988c5d723ac827e141d4ea5195e461 Mon Sep 17 00:00:00 2001 From: sphericalice Date: Mon, 25 Oct 2021 18:03:14 +0100 Subject: [PATCH 091/417] Document the CloseBattlePikeCurtain special --- include/constants/metatile_labels.h | 1 + include/global.fieldmap.h | 5 +++++ src/field_specials.c | 34 +++++++++++++++++++---------- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index b4ee3eacf5..5191200828 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -352,6 +352,7 @@ #define METATILE_InsideShip_IntactDoor_Bottom_Interior 0x297 // gTileset_BattlePike +#define METATILE_BattlePike_CurtainFrames_Start 0x201 #define METATILE_BattlePike_Curtain_Stage0_Tile0 0x24A #define METATILE_BattlePike_Curtain_Stage0_Tile1 0x251 #define METATILE_BattlePike_Curtain_Stage0_Tile2 0x252 diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 41b8539ffd..a1e7524155 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -36,6 +36,11 @@ struct Tileset /*0x14*/ TilesetCB callback; }; +// Tilesets do not actually have s strict width. +// This constant is simply used for the offset between rows of metatiles for +// large tiles, such as the Battle Pike's curtain tile. +#define TILESET_WIDTH 8 + struct MapLayout { /*0x00*/ s32 width; diff --git a/src/field_specials.c b/src/field_specials.c index ab02f9938b..17790532b3 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3931,13 +3931,18 @@ static void Task_LoopWingFlapSE(u8 taskId) #undef playCount #undef delay +#define CURTAIN_HEIGHT 4 +#define CURTAIN_WIDTH 3 +#define tFrameTimer data +#define tCurrentFrame data[3] + void CloseBattlePikeCurtain(void) { u8 taskId = CreateTask(Task_CloseBattlePikeCurtain, 8); - gTasks[taskId].data[0] = 4; - gTasks[taskId].data[1] = 4; - gTasks[taskId].data[2] = 4; - gTasks[taskId].data[3] = 0; + gTasks[taskId].tFrameTimer[0] = 4; + gTasks[taskId].tFrameTimer[1] = 4; + gTasks[taskId].tFrameTimer[2] = 4; + gTasks[taskId].tCurrentFrame = 0; } static void Task_CloseBattlePikeCurtain(u8 taskId) @@ -3945,19 +3950,21 @@ static void Task_CloseBattlePikeCurtain(u8 taskId) u8 x, y; s16 *data = gTasks[taskId].data; - data[data[3]]--; - if (data[data[3]] == 0) + tFrameTimer[tCurrentFrame]--; + if (tFrameTimer[tCurrentFrame] == 0) { - for (y = 0; y < 4; y++) + for (y = 0; y < CURTAIN_HEIGHT; y++) { - for (x = 0; x < 3; x++) + for (x = 0; x < CURTAIN_WIDTH; x++) { - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + x + 6, gSaveBlock1Ptr->pos.y + y + 4, x + 513 + y * 8 + data[3] * 32); + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + x + MAP_OFFSET - 1, + gSaveBlock1Ptr->pos.y + y + MAP_OFFSET - 3, + (x + METATILE_BattlePike_CurtainFrames_Start) + (y * TILESET_WIDTH) + (tCurrentFrame * CURTAIN_HEIGHT * TILESET_WIDTH)); } } DrawWholeMapView(); - data[3]++; - if (data[3] == 3) + tCurrentFrame++; + if (tCurrentFrame == 3) { DestroyTask(taskId); EnableBothScriptContexts(); @@ -3965,6 +3972,11 @@ static void Task_CloseBattlePikeCurtain(u8 taskId) } } +#undef CURTAIN_HEIGHT +#undef CURTAIN_WIDTH +#undef tFrameTimer +#undef tCurrentFrame + void GetBattlePyramidHint(void) { gSpecialVar_Result = gSpecialVar_0x8004 / 7; From 0637910f5856ea0ee0e877f81c57150f7101d419 Mon Sep 17 00:00:00 2001 From: sphericalice Date: Mon, 25 Oct 2021 18:07:46 +0100 Subject: [PATCH 092/417] Use the TILESET_WIDTH constant in rotating_tile_puzzle.c --- src/rotating_tile_puzzle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rotating_tile_puzzle.c b/src/rotating_tile_puzzle.c index 56be9736f5..b8dd03f9e5 100644 --- a/src/rotating_tile_puzzle.c +++ b/src/rotating_tile_puzzle.c @@ -134,14 +134,14 @@ u16 MoveRotatingTileObjects(u8 puzzleNumber) continue; // Object is on a metatile after the puzzle tile section (never occurs, in both cases the puzzle tiles are last) - if ((u8)((metatile - puzzleTileStart) / 8) >= 5) + if ((u8)((metatile - puzzleTileStart) / TILESET_WIDTH) >= 5) continue; // Object is on a metatile in puzzle tile section, but not one of the currently rotating color - if ((u8)((metatile - puzzleTileStart) / 8) != puzzleNumber) + if ((u8)((metatile - puzzleTileStart) / TILESET_WIDTH) != puzzleNumber) continue; - puzzleTileNum = (u8)((metatile - puzzleTileStart) % 8); + puzzleTileNum = (u8)((metatile - puzzleTileStart) % TILESET_WIDTH); // First 4 puzzle tiles are the colored arrows if (puzzleTileNum < 4) @@ -221,7 +221,7 @@ void TurnRotatingTileObjects(void) // prevPuzzleTileNum will similarly be a number [0-3] representing the arrow tile the object just moved from // All the puzzles are oriented counter-clockwise and can only move 1 step at a time, so the difference between the current tile and the previous tile will always either be -1 or 3 (0-1, 1-2, 2-3, 3-0) // Which means tileDifference will always either be -1 or 3 after the below subtraction, and rotation will always be ROTATE_COUNTERCLOCKWISE after the following conditionals - tileDifference = (u8)((metatile - puzzleTileStart) % 8); + tileDifference = (u8)((metatile - puzzleTileStart) % TILESET_WIDTH); tileDifference -= (sRotatingTilePuzzle->objects[i].prevPuzzleTileNum); // Always true, see above @@ -331,7 +331,7 @@ static void TurnUnsavedRotatingTileObject(u8 eventTemplateId, u8 puzzleTileNum) else puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right; - tileDifference = (u8)((metatile - puzzleTileStart) % 8); + tileDifference = (u8)((metatile - puzzleTileStart) % TILESET_WIDTH); tileDifference -= puzzleTileNum; if (tileDifference < 0 || tileDifference == 3) From 5bce17cbcee66842b33e1c46c2a71684ee8093fb Mon Sep 17 00:00:00 2001 From: sphericalice Date: Mon, 25 Oct 2021 18:11:06 +0100 Subject: [PATCH 093/417] Fix typo in the TILESET_WIDTH comment --- include/global.fieldmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index a1e7524155..5c673fc452 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -36,7 +36,7 @@ struct Tileset /*0x14*/ TilesetCB callback; }; -// Tilesets do not actually have s strict width. +// Tilesets do not actually have a strict width. // This constant is simply used for the offset between rows of metatiles for // large tiles, such as the Battle Pike's curtain tile. #define TILESET_WIDTH 8 From 7b5267c799579047ac012928024ce92918c541fe Mon Sep 17 00:00:00 2001 From: sphericalice Date: Mon, 25 Oct 2021 20:51:04 +0100 Subject: [PATCH 094/417] Rename TILESET_WIDTH to METATILE_ROW_WIDTH --- include/global.fieldmap.h | 10 +++++----- src/field_specials.c | 2 +- src/rotating_tile_puzzle.c | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 5c673fc452..5d788ddf7d 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -11,6 +11,11 @@ #define METATILE_ID(tileset, name) (METATILE_##tileset##_##name) +// Rows of metatiles do not actually have a strict width. +// This constant is used for calculations for finding the next row of metatiles +// for constructing large tiles, such as the Battle Pike's curtain tile. +#define METATILE_ROW_WIDTH 8 + enum { CONNECTION_INVALID = -1, @@ -36,11 +41,6 @@ struct Tileset /*0x14*/ TilesetCB callback; }; -// Tilesets do not actually have a strict width. -// This constant is simply used for the offset between rows of metatiles for -// large tiles, such as the Battle Pike's curtain tile. -#define TILESET_WIDTH 8 - struct MapLayout { /*0x00*/ s32 width; diff --git a/src/field_specials.c b/src/field_specials.c index 17790532b3..53e1e7fb76 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3959,7 +3959,7 @@ static void Task_CloseBattlePikeCurtain(u8 taskId) { MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + x + MAP_OFFSET - 1, gSaveBlock1Ptr->pos.y + y + MAP_OFFSET - 3, - (x + METATILE_BattlePike_CurtainFrames_Start) + (y * TILESET_WIDTH) + (tCurrentFrame * CURTAIN_HEIGHT * TILESET_WIDTH)); + (x + METATILE_BattlePike_CurtainFrames_Start) + (y * METATILE_ROW_WIDTH) + (tCurrentFrame * CURTAIN_HEIGHT * METATILE_ROW_WIDTH)); } } DrawWholeMapView(); diff --git a/src/rotating_tile_puzzle.c b/src/rotating_tile_puzzle.c index b8dd03f9e5..2e919f550a 100644 --- a/src/rotating_tile_puzzle.c +++ b/src/rotating_tile_puzzle.c @@ -134,14 +134,14 @@ u16 MoveRotatingTileObjects(u8 puzzleNumber) continue; // Object is on a metatile after the puzzle tile section (never occurs, in both cases the puzzle tiles are last) - if ((u8)((metatile - puzzleTileStart) / TILESET_WIDTH) >= 5) + if ((u8)((metatile - puzzleTileStart) / METATILE_ROW_WIDTH) >= 5) continue; // Object is on a metatile in puzzle tile section, but not one of the currently rotating color - if ((u8)((metatile - puzzleTileStart) / TILESET_WIDTH) != puzzleNumber) + if ((u8)((metatile - puzzleTileStart) / METATILE_ROW_WIDTH) != puzzleNumber) continue; - puzzleTileNum = (u8)((metatile - puzzleTileStart) % TILESET_WIDTH); + puzzleTileNum = (u8)((metatile - puzzleTileStart) % METATILE_ROW_WIDTH); // First 4 puzzle tiles are the colored arrows if (puzzleTileNum < 4) @@ -221,7 +221,7 @@ void TurnRotatingTileObjects(void) // prevPuzzleTileNum will similarly be a number [0-3] representing the arrow tile the object just moved from // All the puzzles are oriented counter-clockwise and can only move 1 step at a time, so the difference between the current tile and the previous tile will always either be -1 or 3 (0-1, 1-2, 2-3, 3-0) // Which means tileDifference will always either be -1 or 3 after the below subtraction, and rotation will always be ROTATE_COUNTERCLOCKWISE after the following conditionals - tileDifference = (u8)((metatile - puzzleTileStart) % TILESET_WIDTH); + tileDifference = (u8)((metatile - puzzleTileStart) % METATILE_ROW_WIDTH); tileDifference -= (sRotatingTilePuzzle->objects[i].prevPuzzleTileNum); // Always true, see above @@ -331,7 +331,7 @@ static void TurnUnsavedRotatingTileObject(u8 eventTemplateId, u8 puzzleTileNum) else puzzleTileStart = METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right; - tileDifference = (u8)((metatile - puzzleTileStart) % TILESET_WIDTH); + tileDifference = (u8)((metatile - puzzleTileStart) % METATILE_ROW_WIDTH); tileDifference -= puzzleTileNum; if (tileDifference < 0 || tileDifference == 3) From 1056209d8e62770bac18cb6a4bc34ce96db30f12 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 25 Oct 2021 10:42:08 -0400 Subject: [PATCH 095/417] Start battle_transition documenting --- src/battle_setup.c | 39 +- src/battle_transition.c | 2325 ++++++++++++++++++++------------------- 2 files changed, 1200 insertions(+), 1164 deletions(-) diff --git a/src/battle_setup.c b/src/battle_setup.c index 2a716e08c7..6a4afe7462 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -47,8 +47,14 @@ #include "constants/trainers.h" #include "constants/trainer_hill.h" -enum -{ +enum { + TRANSITION_TYPE_NORMAL, + TRANSITION_TYPE_CAVE, + TRANSITION_TYPE_FLASH, + TRANSITION_TYPE_WATER, +}; + +enum { TRAINER_PARAM_LOAD_VAL_8BIT, TRAINER_PARAM_LOAD_VAL_16BIT, TRAINER_PARAM_LOAD_VAL_32BIT, @@ -85,7 +91,6 @@ static void HandleRematchVarsOnBattleEnd(void); static const u8 *GetIntroSpeechOfApproachingTrainer(void); static const u8 *GetTrainerCantBattleSpeech(void); -// ewram vars EWRAM_DATA static u16 sTrainerBattleMode = 0; EWRAM_DATA u16 gTrainerBattleOpponent_A = 0; EWRAM_DATA u16 gTrainerBattleOpponent_B = 0; @@ -103,24 +108,22 @@ EWRAM_DATA static u8 *sTrainerBBattleScriptRetAddr = NULL; EWRAM_DATA static bool8 sShouldCheckTrainerBScript = FALSE; EWRAM_DATA static u8 sNoOfPossibleTrainerRetScripts = 0; -// const rom data - // The first transition is used if the enemy pokemon are lower level than our pokemon. // Otherwise, the second transition is used. static const u8 sBattleTransitionTable_Wild[][2] = { - {B_TRANSITION_SLICE, B_TRANSITION_WHITEFADE}, // Normal - {B_TRANSITION_CLOCKWISE_BLACKFADE, B_TRANSITION_GRID_SQUARES}, // Cave - {B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES}, // Cave with flash used - {B_TRANSITION_WAVE, B_TRANSITION_RIPPLE}, // Water + [TRANSITION_TYPE_NORMAL] = {B_TRANSITION_SLICE, B_TRANSITION_WHITEFADE}, + [TRANSITION_TYPE_CAVE] = {B_TRANSITION_CLOCKWISE_BLACKFADE, B_TRANSITION_GRID_SQUARES}, + [TRANSITION_TYPE_FLASH] = {B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES}, + [TRANSITION_TYPE_WATER] = {B_TRANSITION_WAVE, B_TRANSITION_RIPPLE}, }; static const u8 sBattleTransitionTable_Trainer[][2] = { - {B_TRANSITION_POKEBALLS_TRAIL, B_TRANSITION_SHARDS}, // Normal - {B_TRANSITION_SHUFFLE, B_TRANSITION_BIG_POKEBALL}, // Cave - {B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES}, // Cave with flash used - {B_TRANSITION_SWIRL, B_TRANSITION_RIPPLE}, // Water + [TRANSITION_TYPE_NORMAL] = {B_TRANSITION_POKEBALLS_TRAIL, B_TRANSITION_SHARDS}, + [TRANSITION_TYPE_CAVE] = {B_TRANSITION_SHUFFLE, B_TRANSITION_BIG_POKEBALL}, + [TRANSITION_TYPE_FLASH] = {B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES}, + [TRANSITION_TYPE_WATER] = {B_TRANSITION_SWIRL, B_TRANSITION_RIPPLE}, }; // Battle Frontier (excluding Pyramid and Dome, which have their own tables below) @@ -697,20 +700,20 @@ static u8 GetBattleTransitionTypeByMap(void) PlayerGetDestCoords(&x, &y); tileBehavior = MapGridGetMetatileBehaviorAt(x, y); if (Overworld_GetFlashLevel()) - return B_TRANSITION_SHUFFLE; + return TRANSITION_TYPE_FLASH; if (!MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehavior)) { switch (gMapHeader.mapType) { case MAP_TYPE_UNDERGROUND: - return B_TRANSITION_SWIRL; + return TRANSITION_TYPE_CAVE; case MAP_TYPE_UNDERWATER: - return B_TRANSITION_BIG_POKEBALL; + return TRANSITION_TYPE_WATER; default: - return B_TRANSITION_BLUR; + return TRANSITION_TYPE_NORMAL; } } - return B_TRANSITION_BIG_POKEBALL; + return TRANSITION_TYPE_WATER; } static u16 GetSumOfPlayerPartyLevel(u8 numMons) diff --git a/src/battle_transition.c b/src/battle_transition.c index 983a502176..72edf92d5c 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -25,6 +25,16 @@ #include "constants/trainers.h" #include "constants/rgb.h" +#define PALTAG_UNUSED_MUGSHOT 0x100A + +#define B_TRANS_DMA_FLAGS (1 | ((DMA_SRC_INC | DMA_DEST_FIXED | DMA_REPEAT | DMA_16BIT | DMA_START_HBLANK | DMA_ENABLE) << 16)) + +#define SET_TILEMAP_TILE(ptr, posY, posX, toStore) \ +{ \ + u32 index = (posY) * 32 + posX; \ + ptr[index] = toStore; \ +} + struct TransitionData { vu8 VBlank_DMA; @@ -32,19 +42,19 @@ struct TransitionData u16 WINOUT; u16 WIN0H; u16 WIN0V; - u16 field_A; // unused - u16 field_C; // unused + u16 unused1; + u16 unused2; u16 BLDCNT; u16 BLDALPHA; u16 BLDY; - s16 field_14; - s16 field_16; - s16 BG0HOFS_1; - s16 BG0HOFS_2; + s16 cameraX; + s16 cameraY; + s16 BG0HOFS_Lower; + s16 BG0HOFS_Upper; s16 BG0VOFS; // used but not set - s16 field_1E; // unused + s16 unused3; s16 field_20; - s16 field_22; // unused + s16 unused4; s16 data[11]; }; @@ -107,13 +117,13 @@ static void VBlankCB_Swirl(void); static void HBlankCB_Swirl(void); static void VBlankCB_Shuffle(void); static void HBlankCB_Shuffle(void); -static void VBlankCB0_BigPokeball(void); +static void VBlankCB_PatternWeave(void); static void VBlankCB1_BigPokeball(void); static void VBlankCB_Clockwise_BlackFade(void); static void VBlankCB_Ripple(void); static void HBlankCB_Ripple(void); -static void VBlankCB_30(void); -static void HBlankCB_30(void); +static void VBlankCB_FrontierLogoWave(void); +static void HBlankCB_FrontierLogoWave(void); static void VBlankCB_Wave(void); static void VBlankCB_Slice(void); static void HBlankCB_Slice(void); @@ -122,84 +132,84 @@ static void VBlankCB1_WhiteFade(void); static void HBlankCB_WhiteFade(void); static void VBlankCB_Shards(void); static void VBlankCB_Rayquaza(void); -static bool8 Blur_Func1(struct Task *task); -static bool8 Blur_Func2(struct Task *task); -static bool8 Blur_Func3(struct Task *task); -static bool8 Swirl_Func1(struct Task *task); -static bool8 Swirl_Func2(struct Task *task); -static bool8 Shuffle_Func1(struct Task *task); -static bool8 Shuffle_Func2(struct Task *task); -static bool8 Aqua_Func1(struct Task *task); -static bool8 Aqua_Func2(struct Task *task); -static bool8 Magma_Func1(struct Task *task); -static bool8 Magma_Func2(struct Task *task); +static bool8 Blur_Init(struct Task *task); +static bool8 Blur_Main(struct Task *task); +static bool8 Blur_End(struct Task *task); +static bool8 Swirl_Init(struct Task *task); +static bool8 Swirl_End(struct Task *task); +static bool8 Shuffle_Init(struct Task *task); +static bool8 Shuffle_End(struct Task *task); +static bool8 Aqua_Init(struct Task *task); +static bool8 Aqua_SetGfx(struct Task *task); +static bool8 Magma_Init(struct Task *task); +static bool8 Magma_SetGfx(struct Task *task); static bool8 FramesCountdown(struct Task *task); -static bool8 Regi_Func1(struct Task *task); -static bool8 Regice_Func2(struct Task *task); -static bool8 Registeel_Func2(struct Task *task); -static bool8 Regirock_Func2(struct Task *task); -static bool8 WeatherTrio_Func1(struct Task *task); -static bool8 WaitPaletteFade(struct Task *task); -static bool8 Kyogre_Func3(struct Task *task); -static bool8 Kyogre_Func4(struct Task *task); -static bool8 Kyogre_Func5(struct Task *task); -static bool8 Groudon_Func3(struct Task *task); -static bool8 Groudon_Func4(struct Task *task); -static bool8 Groudon_Func5(struct Task *task); -static bool8 WeatherDuo_Func6(struct Task *task); -static bool8 WeatherDuo_Func7(struct Task *task); -static bool8 BigPokeball_Func1(struct Task *task); -static bool8 BigPokeball_Func2(struct Task *task); -static bool8 BigPokeball_Func3(struct Task *task); -static bool8 BigPokeball_Func4(struct Task *task); -static bool8 BigPokeball_Func5(struct Task *task); -static bool8 BigPokeball_Func6(struct Task *task); -static bool8 PokeballsTrail_Func1(struct Task *task); -static bool8 PokeballsTrail_Func2(struct Task *task); -static bool8 PokeballsTrail_Func3(struct Task *task); -static bool8 Clockwise_BlackFade_Func1(struct Task *task); +static bool8 Regi_Init(struct Task *task); +static bool8 Regice_SetGfx(struct Task *task); +static bool8 Registeel_SetGfx(struct Task *task); +static bool8 Regirock_SetGfx(struct Task *task); +static bool8 WeatherTrio_BgFadeBlack(struct Task *task); +static bool8 WeatherTrio_WaitFade(struct Task *task); +static bool8 Kyogre_Init(struct Task *task); +static bool8 Kyogre_PalettePulsate(struct Task *task); +static bool8 Kyogre_PaletteBrighten(struct Task *task); +static bool8 Groudon_Init(struct Task *task); +static bool8 Groudon_PalettePulsate(struct Task *task); +static bool8 Groudon_PaletteBrighten(struct Task *task); +static bool8 WeatherDuo_FadeOut(struct Task *task); +static bool8 WeatherDuo_End(struct Task *task); +static bool8 BigPokeball_Init(struct Task *task); +static bool8 BigPokeball_SetGfx(struct Task *task); +static bool8 PatternWeave_1(struct Task *task); +static bool8 PatternWeave_2(struct Task *task); +static bool8 PatternWeave_3(struct Task *task); +static bool8 PatternWeave_End(struct Task *task); +static bool8 PokeballsTrail_Init(struct Task *task); +static bool8 PokeballsTrail_Main(struct Task *task); +static bool8 PokeballsTrail_End(struct Task *task); +static bool8 Clockwise_BlackFade_Init(struct Task *task); static bool8 Clockwise_BlackFade_Func2(struct Task *task); static bool8 Clockwise_BlackFade_Func3(struct Task *task); static bool8 Clockwise_BlackFade_Func4(struct Task *task); static bool8 Clockwise_BlackFade_Func5(struct Task *task); static bool8 Clockwise_BlackFade_Func6(struct Task *task); -static bool8 Clockwise_BlackFade_Func7(struct Task *task); -static bool8 Ripple_Func1(struct Task *task); +static bool8 Clockwise_BlackFade_End(struct Task *task); +static bool8 Ripple_Init(struct Task *task); static bool8 Ripple_Func2(struct Task *task); -static bool8 Wave_Func1(struct Task *task); +static bool8 Wave_Init(struct Task *task); static bool8 Wave_Func2(struct Task *task); -static bool8 Wave_Func3(struct Task *task); -static bool8 Slice_Func1(struct Task *task); +static bool8 Wave_End(struct Task *task); +static bool8 Slice_Init(struct Task *task); static bool8 Slice_Func2(struct Task *task); -static bool8 Slice_Func3(struct Task *task); -static bool8 WhiteFade_Func1(struct Task *task); +static bool8 Slice_End(struct Task *task); +static bool8 WhiteFade_Init(struct Task *task); static bool8 WhiteFade_Func2(struct Task *task); static bool8 WhiteFade_Func3(struct Task *task); static bool8 WhiteFade_Func4(struct Task *task); -static bool8 WhiteFade_Func5(struct Task *task); -static bool8 GridSquares_Func1(struct Task *task); +static bool8 WhiteFade_End(struct Task *task); +static bool8 GridSquares_Init(struct Task *task); static bool8 GridSquares_Func2(struct Task *task); -static bool8 GridSquares_Func3(struct Task *task); -static bool8 Shards_Func1(struct Task *task); +static bool8 GridSquares_End(struct Task *task); +static bool8 Shards_Init(struct Task *task); static bool8 Shards_Func2(struct Task *task); static bool8 Shards_Func3(struct Task *task); static bool8 Shards_Func4(struct Task *task); static bool8 Shards_Func5(struct Task *task); -static bool8 ShredSplit_Func1(struct Task *task); +static bool8 ShredSplit_Init(struct Task *task); static bool8 ShredSplit_Func2(struct Task *task); static bool8 ShredSplit_Func3(struct Task *task); -static bool8 ShredSplit_Func4(struct Task *task); -static bool8 Blackhole_Func1(struct Task *task); +static bool8 ShredSplit_End(struct Task *task); +static bool8 Blackhole_Init(struct Task *task); static bool8 Blackhole1_Func2(struct Task *task); static bool8 Blackhole1_Func3(struct Task *task); static bool8 Blackhole2_Func2(struct Task *task); -static bool8 RectangularSpiral_Func1(struct Task *task); +static bool8 RectangularSpiral_Init(struct Task *task); static bool8 RectangularSpiral_Func2(struct Task *task); -static bool8 RectangularSpiral_Func3(struct Task *task); -static bool8 FrontierLogoWiggle_Func1(struct Task *task); -static bool8 FrontierLogoWiggle_Func2(struct Task *task); -static bool8 FrontierLogoWave_Func1(struct Task *task); -static bool8 FrontierLogoWave_Func2(struct Task *task); +static bool8 RectangularSpiral_End(struct Task *task); +static bool8 FrontierLogoWiggle_Init(struct Task *task); +static bool8 FrontierLogoWiggle_SetGfx(struct Task *task); +static bool8 FrontierLogoWave_Init(struct Task *task); +static bool8 FrontierLogoWave_SetGfx(struct Task *task); static bool8 FrontierLogoWave_Func3(struct Task *task); static bool8 FrontierLogoWave_Func4(struct Task *task); static bool8 Rayquaza_Func3(struct Task *task); @@ -209,39 +219,39 @@ static bool8 Rayquaza_Func6(struct Task *task); static bool8 Rayquaza_Func7(struct Task *task); static bool8 Rayquaza_Func8(struct Task *task); static bool8 Rayquaza_Func9(struct Task *task); -static bool8 FrontierSquares_Func1(struct Task *task); +static bool8 FrontierSquares_Init(struct Task *task); static bool8 FrontierSquares_Func2(struct Task *task); static bool8 FrontierSquares_Func3(struct Task *task); static bool8 FrontierSquares_End(struct Task *task); -static bool8 FrontierSquaresSpiral_Func1(struct Task *task); +static bool8 FrontierSquaresSpiral_Init(struct Task *task); static bool8 FrontierSquaresSpiral_Func2(struct Task *task); static bool8 FrontierSquaresSpiral_Func3(struct Task *task); static bool8 FrontierSquaresSpiral_Func4(struct Task *task); -static bool8 FrontierSquaresScroll_Func1(struct Task *task); +static bool8 FrontierSquaresScroll_Init(struct Task *task); static bool8 FrontierSquaresScroll_Func2(struct Task *task); static bool8 FrontierSquaresScroll_Func3(struct Task *task); static bool8 FrontierSquaresScroll_Func4(struct Task *task); -static bool8 FrontierSquaresScroll_Func5(struct Task *task); -static bool8 Mugshot_Func1(struct Task *task); -static bool8 Mugshot_Func2(struct Task *task); -static bool8 Mugshot_Func3(struct Task *task); -static bool8 Mugshot_Func4(struct Task *task); -static bool8 Mugshot_Func5(struct Task *task); -static bool8 Mugshot_Func6(struct Task *task); -static bool8 Mugshot_Func7(struct Task *task); -static bool8 Mugshot_Func8(struct Task *task); -static bool8 Mugshot_Func9(struct Task *task); -static bool8 Mugshot_Func10(struct Task *task); -static void Task_MugShotTransition(u8 taskId); -static void Mugshots_CreateOpponentPlayerSprites(struct Task *task); +static bool8 FrontierSquaresScroll_End(struct Task *task); +static bool8 Mugshot_Init(struct Task *task); +static bool8 Mugshot_SetGfx(struct Task *task); +static bool8 Mugshot_ShowBanner(struct Task *task); +static bool8 Mugshot_StartOpponentSlide(struct Task *task); +static bool8 Mugshot_WaitStartPlayerSlide(struct Task *task); +static bool8 Mugshot_WaitPlayerSlide(struct Task *task); +static bool8 Mugshot_GradualWhiteFade(struct Task *task); +static bool8 Mugshot_InitFadeWhiteToBlack(struct Task *task); +static bool8 Mugshot_FadeToBlack(struct Task *task); +static bool8 Mugshot_End(struct Task *task); +static void DoMugshotTransition(u8 taskId); +static void Mugshots_CreateTrainerPics(struct Task *task); static void VBlankCB0_Mugshots(void); static void VBlankCB1_Mugshots(void); static void HBlankCB_Mugshots(void); -static void InitTransitionStructVars(void); +static void InitTransitionData(void); static void FadeScreenBlack(void); static void CreateIntroTask(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4); static void sub_814A014(u16 *a0, s16 a1, s16 a2, s16 a3); -static void sub_8149F98(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, s16 amplitude, s16 arrSize); +static void SetSinWave(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, s16 amplitude, s16 arrSize); static void GetBg0TilemapDst(u16 **tileset); static void sub_814A1AC(s16 *a0, s16 a1, s16 a2, s16 a3, s16 a4, s16 a5, s16 a6); static bool8 sub_814A228(s16 *a0, bool8 a1, bool8 a2); @@ -252,21 +262,21 @@ static bool8 Transition_Intro_1(struct Task *task); static bool8 Transition_Intro_2(struct Task *task); static bool8 IsIntroTaskDone(void); static bool16 sub_8149048(const s16 * const *arg0, struct StructRectangularSpiral *arg1); -static void sub_814713C(struct Sprite *sprite); -static void SpriteCb_TrainerPic(struct Sprite *sprite); +static void SpriteCB_FldEffPokeball(struct Sprite *sprite); +static void SpriteCB_MugshotTrainerPic(struct Sprite *sprite); static void sub_8149864(struct Sprite *sprite); -static bool8 TrainerPicCb_Nothing(struct Sprite *sprite); -static bool8 TrainerPicCb_SetSlideOffsets(struct Sprite *sprite); -static bool8 TrainerPicCb_Slide1(struct Sprite *sprite); -static bool8 TrainerPicCb_Slide2(struct Sprite *sprite); -static bool8 TrainerPicCb_Slide3(struct Sprite *sprite); +static bool8 MugshotTrainerPic_Nothing(struct Sprite *sprite); +static bool8 MugshotTrainerPic_SetSlideOffsets(struct Sprite *sprite); +static bool8 MugshotTrainerPic_Slide1(struct Sprite *sprite); +static bool8 MugshotTrainerPic_Slide2(struct Sprite *sprite); +static bool8 MugshotTrainerPic_Slide3(struct Sprite *sprite); static s16 sUnusedRectangularSpiralVar; static u8 sTestingTransitionId; static u8 sTestingTransitionState; static struct StructRectangularSpiral sRectangularSpiralTransition[4]; -EWRAM_DATA static struct TransitionData *sTransitionStructPtr = NULL; +EWRAM_DATA static struct TransitionData *sTransitionData = NULL; static const u32 sBigPokeball_Tileset[] = INCBIN_U32("graphics/battle_transitions/big_pokeball.4bpp"); static const u32 sPokeballTrail_Tileset[] = INCBIN_U32("graphics/battle_transitions/pokeball_trail.4bpp"); @@ -315,7 +325,8 @@ static const TaskFunc sTasks_Intro[B_TRANSITION_COUNT] = [0 ... B_TRANSITION_COUNT - 1] = &Task_Intro }; -// After the intro each transition has a unique main task +// After the intro each transition has a unique main task. +// This task will call the functions that do the transition effects. static const TaskFunc sTasks_Main[B_TRANSITION_COUNT] = { [B_TRANSITION_BLUR] = Task_Blur, @@ -372,102 +383,102 @@ static const TransitionStateFunc sTaskHandlers[] = static const TransitionStateFunc sBlur_Funcs[] = { - Blur_Func1, - Blur_Func2, - Blur_Func3 + Blur_Init, + Blur_Main, + Blur_End }; static const TransitionStateFunc sSwirl_Funcs[] = { - Swirl_Func1, - Swirl_Func2, + Swirl_Init, + Swirl_End, }; static const TransitionStateFunc sShuffle_Funcs[] = { - Shuffle_Func1, - Shuffle_Func2, + Shuffle_Init, + Shuffle_End, }; static const TransitionStateFunc sAqua_Funcs[] = { - Aqua_Func1, - Aqua_Func2, - BigPokeball_Func3, - BigPokeball_Func4, - BigPokeball_Func5, + Aqua_Init, + Aqua_SetGfx, + PatternWeave_1, + PatternWeave_2, + PatternWeave_3, FramesCountdown, - BigPokeball_Func6 + PatternWeave_End }; static const TransitionStateFunc sMagma_Funcs[] = { - Magma_Func1, - Magma_Func2, - BigPokeball_Func3, - BigPokeball_Func4, - BigPokeball_Func5, + Magma_Init, + Magma_SetGfx, + PatternWeave_1, + PatternWeave_2, + PatternWeave_3, FramesCountdown, - BigPokeball_Func6 + PatternWeave_End }; static const TransitionStateFunc sBigPokeball_Funcs[] = { - BigPokeball_Func1, - BigPokeball_Func2, - BigPokeball_Func3, - BigPokeball_Func4, - BigPokeball_Func5, - BigPokeball_Func6 + BigPokeball_Init, + BigPokeball_SetGfx, + PatternWeave_1, + PatternWeave_2, + PatternWeave_3, + PatternWeave_End }; static const TransitionStateFunc sRegice_Funcs[] = { - Regi_Func1, - Regice_Func2, - BigPokeball_Func3, - BigPokeball_Func4, - BigPokeball_Func5, - BigPokeball_Func6 + Regi_Init, + Regice_SetGfx, + PatternWeave_1, + PatternWeave_2, + PatternWeave_3, + PatternWeave_End }; static const TransitionStateFunc sRegisteel_Funcs[] = { - Regi_Func1, - Registeel_Func2, - BigPokeball_Func3, - BigPokeball_Func4, - BigPokeball_Func5, - BigPokeball_Func6 + Regi_Init, + Registeel_SetGfx, + PatternWeave_1, + PatternWeave_2, + PatternWeave_3, + PatternWeave_End }; static const TransitionStateFunc sRegirock_Funcs[] = { - Regi_Func1, - Regirock_Func2, - BigPokeball_Func3, - BigPokeball_Func4, - BigPokeball_Func5, - BigPokeball_Func6 + Regi_Init, + Regirock_SetGfx, + PatternWeave_1, + PatternWeave_2, + PatternWeave_3, + PatternWeave_End }; static const TransitionStateFunc sKyogre_Funcs[] = { - WeatherTrio_Func1, - WaitPaletteFade, - Kyogre_Func3, - Kyogre_Func4, - Kyogre_Func5, + WeatherTrio_BgFadeBlack, + WeatherTrio_WaitFade, + Kyogre_Init, + Kyogre_PalettePulsate, + Kyogre_PaletteBrighten, FramesCountdown, - WeatherDuo_Func6, - WeatherDuo_Func7 + WeatherDuo_FadeOut, + WeatherDuo_End }; static const TransitionStateFunc sPokeballsTrail_Funcs[] = { - PokeballsTrail_Func1, - PokeballsTrail_Func2, - PokeballsTrail_Func3 + PokeballsTrail_Init, + PokeballsTrail_Main, + PokeballsTrail_End }; static const s16 sUnknown_085C8B88[2] = {-16, 256}; @@ -476,48 +487,48 @@ static const s16 sUnknown_085C8B96[2] = {8, -8}; static const TransitionStateFunc sClockwise_BlackFade_Funcs[] = { - Clockwise_BlackFade_Func1, + Clockwise_BlackFade_Init, Clockwise_BlackFade_Func2, Clockwise_BlackFade_Func3, Clockwise_BlackFade_Func4, Clockwise_BlackFade_Func5, Clockwise_BlackFade_Func6, - Clockwise_BlackFade_Func7 + Clockwise_BlackFade_End }; static const TransitionStateFunc sRipple_Funcs[] = { - Ripple_Func1, + Ripple_Init, Ripple_Func2 }; static const TransitionStateFunc sWave_Funcs[] = { - Wave_Func1, + Wave_Init, Wave_Func2, - Wave_Func3 + Wave_End }; static const TransitionStateFunc sMugshot_Funcs[] = { - Mugshot_Func1, - Mugshot_Func2, - Mugshot_Func3, - Mugshot_Func4, - Mugshot_Func5, - Mugshot_Func6, - Mugshot_Func7, - Mugshot_Func8, - Mugshot_Func9, - Mugshot_Func10 + Mugshot_Init, + Mugshot_SetGfx, + Mugshot_ShowBanner, + Mugshot_StartOpponentSlide, + Mugshot_WaitStartPlayerSlide, + Mugshot_WaitPlayerSlide, + Mugshot_GradualWhiteFade, + Mugshot_InitFadeWhiteToBlack, + Mugshot_FadeToBlack, + Mugshot_End }; static const u8 sMugshotsTrainerPicIDsTable[MUGSHOTS_COUNT] = { - [MUGSHOT_SIDNEY] = TRAINER_PIC_ELITE_FOUR_SIDNEY, - [MUGSHOT_PHOEBE] = TRAINER_PIC_ELITE_FOUR_PHOEBE, - [MUGSHOT_GLACIA] = TRAINER_PIC_ELITE_FOUR_GLACIA, - [MUGSHOT_DRAKE] = TRAINER_PIC_ELITE_FOUR_DRAKE, + [MUGSHOT_SIDNEY] = TRAINER_PIC_ELITE_FOUR_SIDNEY, + [MUGSHOT_PHOEBE] = TRAINER_PIC_ELITE_FOUR_PHOEBE, + [MUGSHOT_GLACIA] = TRAINER_PIC_ELITE_FOUR_GLACIA, + [MUGSHOT_DRAKE] = TRAINER_PIC_ELITE_FOUR_DRAKE, [MUGSHOT_CHAMPION] = TRAINER_PIC_CHAMPION_WALLACE, }; static const s16 sMugshotsOpponentRotationScales[MUGSHOTS_COUNT][2] = @@ -530,40 +541,40 @@ static const s16 sMugshotsOpponentRotationScales[MUGSHOTS_COUNT][2] = }; static const s16 sMugshotsOpponentCoords[MUGSHOTS_COUNT][2] = { - [MUGSHOT_SIDNEY] = {0, 0}, - [MUGSHOT_PHOEBE] = {0, 0}, - [MUGSHOT_GLACIA] = {-4, 4}, - [MUGSHOT_DRAKE] = {0, 5}, - [MUGSHOT_CHAMPION] = {-8, 7}, + [MUGSHOT_SIDNEY] = { 0, 0}, + [MUGSHOT_PHOEBE] = { 0, 0}, + [MUGSHOT_GLACIA] = {-4, 4}, + [MUGSHOT_DRAKE] = { 0, 5}, + [MUGSHOT_CHAMPION] = {-8, 7}, }; -static const TransitionSpriteCallback sTrainerPicSpriteCbs[] = +static const TransitionSpriteCallback sMugshotTrainerPicFuncs[] = { - TrainerPicCb_Nothing, - TrainerPicCb_SetSlideOffsets, - TrainerPicCb_Slide1, - TrainerPicCb_Slide2, - TrainerPicCb_Nothing, - TrainerPicCb_Slide3, - TrainerPicCb_Nothing + MugshotTrainerPic_Nothing, + MugshotTrainerPic_SetSlideOffsets, + MugshotTrainerPic_Slide1, + MugshotTrainerPic_Slide2, + MugshotTrainerPic_Nothing, + MugshotTrainerPic_Slide3, + MugshotTrainerPic_Nothing }; static const s16 sTrainerPicSlideOffsets1[2] = {12, -12}; -static const s16 sTrainerPicSlideOffsets2[2] = {-1, 1}; +static const s16 sTrainerPicSlideOffsets2[2] = {-1, 1}; static const TransitionStateFunc sSlice_Funcs[] = { - Slice_Func1, + Slice_Init, Slice_Func2, - Slice_Func3 + Slice_End }; static const TransitionStateFunc sShredSplit_Funcs[] = { - ShredSplit_Func1, + ShredSplit_Init, ShredSplit_Func2, ShredSplit_Func3, - ShredSplit_Func4 + ShredSplit_End }; static const u8 gUnknown_085C8C64[] = {39, 119}; @@ -571,14 +582,14 @@ static const s16 gUnknown_085C8C66[] = {1, -1}; static const TransitionStateFunc sBlackhole1_Funcs[] = { - Blackhole_Func1, + Blackhole_Init, Blackhole1_Func2, Blackhole1_Func3 }; static const TransitionStateFunc sBlackhole2_Funcs[] = { - Blackhole_Func1, + Blackhole_Init, Blackhole2_Func2 }; @@ -586,9 +597,9 @@ static const s16 gUnknown_085C8C80[] = {-6, 4}; static const TransitionStateFunc sRectangularSpiral_Funcs[] = { - RectangularSpiral_Func1, + RectangularSpiral_Init, RectangularSpiral_Func2, - RectangularSpiral_Func3 + RectangularSpiral_End }; static const s16 gUnknown_085C8C90[] = {1, 27, 275, -1}; @@ -640,20 +651,20 @@ static const s16 *const *const gUnknown_085C8D38[] = static const TransitionStateFunc sGroudon_Funcs[] = { - WeatherTrio_Func1, - WaitPaletteFade, - Groudon_Func3, - Groudon_Func4, - Groudon_Func5, + WeatherTrio_BgFadeBlack, + WeatherTrio_WaitFade, + Groudon_Init, + Groudon_PalettePulsate, + Groudon_PaletteBrighten, FramesCountdown, - WeatherDuo_Func6, - WeatherDuo_Func7 + WeatherDuo_FadeOut, + WeatherDuo_End }; static const TransitionStateFunc sRayquaza_Funcs[] = { - WeatherTrio_Func1, - WaitPaletteFade, + WeatherTrio_BgFadeBlack, + WeatherTrio_WaitFade, Rayquaza_Func3, Rayquaza_Func4, Rayquaza_Func5, @@ -667,25 +678,25 @@ static const TransitionStateFunc sRayquaza_Funcs[] = static const TransitionStateFunc sWhiteFade_Funcs[] = { - WhiteFade_Func1, + WhiteFade_Init, WhiteFade_Func2, WhiteFade_Func3, WhiteFade_Func4, - WhiteFade_Func5 + WhiteFade_End }; static const s16 sUnknown_085C8DA0[] = {0, 20, 15, 40, 10, 25, 35, 5}; static const TransitionStateFunc sGridSquares_Funcs[] = { - GridSquares_Func1, + GridSquares_Init, GridSquares_Func2, - GridSquares_Func3 + GridSquares_End }; static const TransitionStateFunc sShards_Funcs[] = { - Shards_Func1, + Shards_Init, Shards_Func2, Shards_Func3, Shards_Func4, @@ -753,7 +764,7 @@ static const struct SpriteTemplate sSpriteTemplate_Pokeball = .anims = sSpriteAnimTable_Pokeball, .images = sSpriteImage_Pokeball, .affineAnims = sSpriteAffineAnimTable_Pokeball, - .callback = sub_814713C + .callback = SpriteCB_FldEffPokeball }; static const struct OamData sOam_UnusedBrendanLass = @@ -797,23 +808,23 @@ static const union AnimCmd *const sSpriteAnimTable_UnusedBrendanLass[] = static const struct SpriteTemplate sSpriteTemplate_UnusedBrendan = { .tileTag = TAG_NONE, - .paletteTag = 0x100A, + .paletteTag = PALTAG_UNUSED_MUGSHOT, .oam = &sOam_UnusedBrendanLass, .anims = sSpriteAnimTable_UnusedBrendanLass, .images = sImageTable_UnusedBrendan, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCb_TrainerPic + .callback = SpriteCB_MugshotTrainerPic }; static const struct SpriteTemplate sSpriteTemplate_UnusedLass = { .tileTag = TAG_NONE, - .paletteTag = 0x100A, + .paletteTag = PALTAG_UNUSED_MUGSHOT, .oam = &sOam_UnusedBrendanLass, .anims = sSpriteAnimTable_UnusedBrendanLass, .images = sImageTable_UnusedLass, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCb_TrainerPic + .callback = SpriteCB_MugshotTrainerPic }; static const u16 sFieldEffectPal_Pokeball[] = INCBIN_U16("graphics/field_effects/palettes/pokeball.gbapal"); @@ -844,32 +855,32 @@ static const u16 *const sPlayerMugshotsPals[GENDER_COUNT] = }; static const u16 sUnusedTrainerPalette[] = INCBIN_U16("graphics/battle_transitions/unused_trainer.gbapal"); -static const struct SpritePalette sSpritePalette_UnusedTrainer = {sUnusedTrainerPalette, 0x100A}; +static const struct SpritePalette sSpritePalette_UnusedTrainer = {sUnusedTrainerPalette, PALTAG_UNUSED_MUGSHOT}; static const u16 sBigPokeball_Tilemap[] = INCBIN_U16("graphics/battle_transitions/big_pokeball_map.bin"); static const u16 sMugshotsTilemap[] = INCBIN_U16("graphics/battle_transitions/elite_four_bg_map.bin"); static const TransitionStateFunc sFrontierLogoWiggle_Funcs[] = { - FrontierLogoWiggle_Func1, - FrontierLogoWiggle_Func2, - BigPokeball_Func3, - BigPokeball_Func4, - BigPokeball_Func5, - BigPokeball_Func6 + FrontierLogoWiggle_Init, + FrontierLogoWiggle_SetGfx, + PatternWeave_1, + PatternWeave_2, + PatternWeave_3, + PatternWeave_End }; static const TransitionStateFunc sFrontierLogoWave_Funcs[] = { - FrontierLogoWave_Func1, - FrontierLogoWave_Func2, + FrontierLogoWave_Init, + FrontierLogoWave_SetGfx, FrontierLogoWave_Func3, FrontierLogoWave_Func4 }; static const TransitionStateFunc sFrontierSquares_Funcs[] = { - FrontierSquares_Func1, + FrontierSquares_Init, FrontierSquares_Func2, FrontierSquares_Func3, FrontierSquares_End @@ -877,7 +888,7 @@ static const TransitionStateFunc sFrontierSquares_Funcs[] = static const TransitionStateFunc sFrontierSquaresSpiral_Funcs[] = { - FrontierSquaresSpiral_Func1, + FrontierSquaresSpiral_Init, FrontierSquaresSpiral_Func2, FrontierSquaresSpiral_Func3, FrontierSquaresSpiral_Func4, @@ -886,15 +897,35 @@ static const TransitionStateFunc sFrontierSquaresSpiral_Funcs[] = static const TransitionStateFunc sFrontierSquaresScroll_Funcs[] = { - FrontierSquaresScroll_Func1, + FrontierSquaresScroll_Init, FrontierSquaresScroll_Func2, FrontierSquaresScroll_Func3, FrontierSquaresScroll_Func4, - FrontierSquaresScroll_Func5 + FrontierSquaresScroll_End }; -static const u8 gUnknown_085C9A30[] = {0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x1b, 0x14, 0x0d, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x07, 0x0e, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x13, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x10, 0x11, 0x12}; -static const u8 gUnknown_085C9A53[] = {0x00, 0x10, 0x29, 0x16, 0x2c, 0x02, 0x2b, 0x15, 0x2e, 0x1b, 0x09, 0x30, 0x26, 0x05, 0x39, 0x3b, 0x0c, 0x3f, 0x23, 0x1c, 0x0a, 0x35, 0x07, 0x31, 0x27, 0x17, 0x37, 0x01, 0x3e, 0x11, 0x3d, 0x1e, 0x06, 0x22, 0x0f, 0x33, 0x20, 0x3a, 0x0d, 0x2d, 0x25, 0x34, 0x0b, 0x18, 0x3c, 0x13, 0x38, 0x21, 0x1d, 0x32, 0x28, 0x36, 0x0e, 0x03, 0x2f, 0x14, 0x12, 0x19, 0x04, 0x24, 0x1a, 0x2a, 0x1f, 0x08, 0x00}; +static const u8 gUnknown_085C9A30[] = { + 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, + 0x1b, 0x14, 0x0d, 0x06, 0x05, 0x04, 0x03, + 0x02, 0x01, 0x00, 0x07, 0x0e, 0x15, 0x16, + 0x17, 0x18, 0x19, 0x1a, 0x13, 0x0c, 0x0b, + 0x0a, 0x09, 0x08, 0x0f, 0x10, 0x11, 0x12 +}; + +static const u8 gUnknown_085C9A53[] = { + 0x00, 0x10, 0x29, 0x16, 0x2c, 0x02, 0x2b, 0x15, + 0x2e, 0x1b, 0x09, 0x30, 0x26, 0x05, 0x39, 0x3b, + 0x0c, 0x3f, 0x23, 0x1c, 0x0a, 0x35, 0x07, 0x31, + 0x27, 0x17, 0x37, 0x01, 0x3e, 0x11, 0x3d, 0x1e, + 0x06, 0x22, 0x0f, 0x33, 0x20, 0x3a, 0x0d, 0x2d, + 0x25, 0x34, 0x0b, 0x18, 0x3c, 0x13, 0x38, 0x21, + 0x1d, 0x32, 0x28, 0x36, 0x0e, 0x03, 0x2f, 0x14, + 0x12, 0x19, 0x04, 0x24, 0x1a, 0x2a, 0x1f, 0x08 +}; + +//--------------------------- +// Main transition functions +//--------------------------- static void CB2_TestBattleTransition(void) { @@ -950,7 +981,7 @@ bool8 IsBattleTransitionDone(void) if (gTasks[taskId].tTransitionDone) { DestroyTask(taskId); - FREE_AND_SET_NULL(sTransitionStructPtr); + FREE_AND_SET_NULL(sTransitionData); return TRUE; } else @@ -963,7 +994,7 @@ static void LaunchBattleTransitionTask(u8 transitionId) { u8 taskId = CreateTask(Task_BattleTransition, 2); gTasks[taskId].tTransitionId = transitionId; - sTransitionStructPtr = AllocZeroed(sizeof(*sTransitionStructPtr)); + sTransitionData = AllocZeroed(sizeof(*sTransitionData)); } static void Task_BattleTransition(u8 taskId) @@ -1032,25 +1063,24 @@ static void Task_Intro(u8 taskId) } } -// sub-task for phase2 -#define tData1 data[1] -#define tData2 data[2] -#define tData3 data[3] -#define tData4 data[4] -#define tData5 data[5] -#define tData6 data[6] #define tFuncState data[7] -#define tFrames data[8] #define tOpponentSpriteId data[13] #define tPlayerSpriteId data[14] #define tMugshotId data[15] +//-------------------- +// B_TRANSITION_BLUR +//-------------------- + +#define tDelay data[1] +#define tCounter data[2] + static void Task_Blur(u8 taskId) { while (sBlur_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Blur_Func1(struct Task *task) +static bool8 Blur_Init(struct Task *task) { SetGpuReg(REG_OFFSET_MOSAIC, 0); SetGpuRegBits(REG_OFFSET_BG1CNT, BGCNT_MOSAIC); @@ -1060,25 +1090,25 @@ static bool8 Blur_Func1(struct Task *task) return TRUE; } -static bool8 Blur_Func2(struct Task *task) +static bool8 Blur_Main(struct Task *task) { - if (task->tData1 != 0) + if (task->tDelay != 0) { - task->tData1--; + task->tDelay--; } else { - task->tData1 = 4; - if (++task->tData2 == 10) - BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 0x10, RGB_BLACK); - SetGpuReg(REG_OFFSET_MOSAIC, (task->tData2 & 15) * 17); - if (task->tData2 > 14) + task->tDelay = 4; + if (++task->tCounter == 10) + BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK); + SetGpuReg(REG_OFFSET_MOSAIC, (task->tCounter & 15) * 17); + if (task->tCounter > 14) task->tState++; } return FALSE; } -static bool8 Blur_Func3(struct Task *task) +static bool8 Blur_End(struct Task *task) { if (!gPaletteFade.active) { @@ -1088,17 +1118,27 @@ static bool8 Blur_Func3(struct Task *task) return FALSE; } +#undef tDelay +#undef tCounter + +//-------------------- +// B_TRANSITION_SWIRL +//-------------------- + +#define tSinIndex data[1] +#define tAmplitude data[2] + static void Task_Swirl(u8 taskId) { while (sSwirl_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Swirl_Func1(struct Task *task) +static bool8 Swirl_Init(struct Task *task) { - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 0x10, RGB_BLACK); - sub_8149F98(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_14, 0, 2, 0, 160); + BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 16, RGB_BLACK); + SetSinWave(gScanlineEffectRegBuffers[1], sTransitionData->cameraX, 0, 2, 0, DISPLAY_HEIGHT); SetVBlankCallback(VBlankCB_Swirl); SetHBlankCallback(HBlankCB_Swirl); @@ -1109,13 +1149,13 @@ static bool8 Swirl_Func1(struct Task *task) return FALSE; } -static bool8 Swirl_Func2(struct Task *task) +static bool8 Swirl_End(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; - task->tData1 += 4; - task->tData2 += 8; + sTransitionData->VBlank_DMA = FALSE; + task->tSinIndex += 4; + task->tAmplitude += 8; - sub_8149F98(gScanlineEffectRegBuffers[0], sTransitionStructPtr->field_14, task->tData1, 2, task->tData2, 160); + SetSinWave(gScanlineEffectRegBuffers[0], sTransitionData->cameraX, task->tSinIndex, 2, task->tAmplitude, DISPLAY_HEIGHT); if (!gPaletteFade.active) { @@ -1123,15 +1163,15 @@ static bool8 Swirl_Func2(struct Task *task) DestroyTask(taskId); } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } static void VBlankCB_Swirl(void) { VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); + if (sTransitionData->VBlank_DMA) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); } static void HBlankCB_Swirl(void) @@ -1142,18 +1182,28 @@ static void HBlankCB_Swirl(void) REG_BG3HOFS = var; } +#undef tSinIndex +#undef tAmplitude + +//---------------------- +// B_TRANSITION_SHUFFLE +//---------------------- + +#define tSinVal data[1] +#define tAmplitude data[2] + static void Task_Shuffle(u8 taskId) { while (sShuffle_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Shuffle_Func1(struct Task *task) +static bool8 Shuffle_Init(struct Task *task) { - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 0x10, RGB_BLACK); - memset(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_16, 0x140); + BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 16, RGB_BLACK); + memset(gScanlineEffectRegBuffers[1], sTransitionData->cameraY, DISPLAY_HEIGHT * 2); SetVBlankCallback(VBlankCB_Shuffle); SetHBlankCallback(HBlankCB_Shuffle); @@ -1164,35 +1214,35 @@ static bool8 Shuffle_Func1(struct Task *task) return FALSE; } -static bool8 Shuffle_Func2(struct Task *task) +static bool8 Shuffle_End(struct Task *task) { u8 i; - u16 r3, r4; + u16 amplitude, sinVal; - sTransitionStructPtr->VBlank_DMA = FALSE; - r4 = task->tData1; - r3 = task->tData2 >> 8; - task->tData1 += 4224; - task->tData2 += 384; + sTransitionData->VBlank_DMA = FALSE; + sinVal = task->tSinVal; + amplitude = task->tAmplitude >> 8; + task->tSinVal += 4224; + task->tAmplitude += 384; - for (i = 0; i < 160; i++, r4 += 4224) + for (i = 0; i < DISPLAY_HEIGHT; i++, sinVal += 4224) { - u16 var = r4 / 256; - gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(var, r3); + u16 sinIndex = sinVal / 256; + gScanlineEffectRegBuffers[0][i] = sTransitionData->cameraY + Sin(sinIndex, amplitude); } if (!gPaletteFade.active) DestroyTask(FindTaskIdByFunc(Task_Shuffle)); - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } static void VBlankCB_Shuffle(void) { VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); + if (sTransitionData->VBlank_DMA) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); } static void HBlankCB_Shuffle(void) @@ -1203,6 +1253,32 @@ static void HBlankCB_Shuffle(void) REG_BG3VOFS = var; } +#undef tSinVal +#undef tAmplitude + +//------------------------------------------------------------------------ +// B_TRANSITION_BIG_POKEBALL, B_TRANSITION_AQUA, B_TRANSITION_MAGMA, +// B_TRANSITION_REGICE, B_TRANSITION_REGISTEEL, B_TRANSITION_REGIROCK +// and B_TRANSITION_KYOGRE. +// +// With the exception of B_TRANSITION_KYOGRE, all of the above transitions +// use the same weave effect (see the PatternWeave functions). +// Unclear why Kyogre's was grouped here and not with Groudon/Rayquaza's. +//------------------------------------------------------------------------ + +#define tBlendTarget1 data[1] +#define tBlendTarget2 data[2] +#define tBlendDelay data[3] + +// Data 1-3 change purpose for PatternWeave_End +#define tEndAmplitude data[1] +#define tEndAmplitudeDelta data[2] +#define tVBlankSet data[3] + +#define tSinIndex data[4] +#define tAmplitude data[5] +#define tEndDelay data[8] + static void Task_BigPokeball(u8 taskId) { while (sBigPokeball_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -1238,186 +1314,179 @@ static void Task_Kyogre(u8 taskId) while (sKyogre_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void sub_814669C(struct Task *task) +static void InitPatternWeaveTransition(struct Task *task) { s32 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - task->tData1 = 16; - task->tData2 = 0; - task->tData4 = 0; - task->tData5 = 0x4000; - sTransitionStructPtr->WININ = WININ_WIN0_ALL; - sTransitionStructPtr->WINOUT = 0; - sTransitionStructPtr->WIN0H = DISPLAY_WIDTH; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; - sTransitionStructPtr->BLDCNT = BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL; - sTransitionStructPtr->BLDALPHA = BLDALPHA_BLEND(task->tData2, task->tData1); + task->tBlendTarget1 = 16; + task->tBlendTarget2 = 0; + task->tSinIndex = 0; + task->tAmplitude = 0x4000; + sTransitionData->WININ = WININ_WIN0_ALL; + sTransitionData->WINOUT = 0; + sTransitionData->WIN0H = DISPLAY_WIDTH; + sTransitionData->WIN0V = DISPLAY_HEIGHT; + sTransitionData->BLDCNT = BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL; + sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->tBlendTarget2, task->tBlendTarget1); - for (i = 0; i < 160; i++) - { - gScanlineEffectRegBuffers[1][i] = 240; - } + for (i = 0; i < DISPLAY_HEIGHT; i++) + gScanlineEffectRegBuffers[1][i] = DISPLAY_WIDTH; - SetVBlankCallback(VBlankCB0_BigPokeball); + SetVBlankCallback(VBlankCB_PatternWeave); } -static bool8 Aqua_Func1(struct Task *task) +static bool8 Aqua_Init(struct Task *task) { u16 *tilemap, *tileset; - task->tFrames = 60; - sub_814669C(task); + task->tEndDelay = 60; + InitPatternWeaveTransition(task); GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); LZ77UnCompVram(sTeamAqua_Tileset, tileset); - LoadPalette(sEvilTeam_Palette, 0xF0, 0x20); + LoadPalette(sEvilTeam_Palette, 0xF0, sizeof(sEvilTeam_Palette)); task->tState++; return FALSE; } -static bool8 Magma_Func1(struct Task *task) +static bool8 Magma_Init(struct Task *task) { u16 *tilemap, *tileset; - task->tFrames = 60; - sub_814669C(task); + task->tEndDelay = 60; + InitPatternWeaveTransition(task); GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); LZ77UnCompVram(sTeamMagma_Tileset, tileset); - LoadPalette(sEvilTeam_Palette, 0xF0, 0x20); + LoadPalette(sEvilTeam_Palette, 0xF0, sizeof(sEvilTeam_Palette)); task->tState++; return FALSE; } -static bool8 Regi_Func1(struct Task *task) +static bool8 Regi_Init(struct Task *task) { u16 *tilemap, *tileset; - task->tFrames = 60; - sub_814669C(task); + task->tEndDelay = 60; + InitPatternWeaveTransition(task); GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); CpuCopy16(sRegis_Tileset, tileset, 0x2000); task->tState++; return FALSE; } -static bool8 BigPokeball_Func1(struct Task *task) +static bool8 BigPokeball_Init(struct Task *task) { u16 *tilemap, *tileset; - sub_814669C(task); + InitPatternWeaveTransition(task); GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); - CpuCopy16(sBigPokeball_Tileset, tileset, 0x580); - LoadPalette(sFieldEffectPal_Pokeball, 0xF0, 0x20); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); + CpuCopy16(sBigPokeball_Tileset, tileset, sizeof(sBigPokeball_Tileset)); + LoadPalette(sFieldEffectPal_Pokeball, 0xF0, sizeof(sFieldEffectPal_Pokeball)); task->tState++; return FALSE; } -#define SOME_VRAM_STORE(ptr, posY, posX, toStore) \ -{ \ - u32 index = (posY) * 32 + posX; \ - ptr[index] = toStore; \ -} - -static bool8 BigPokeball_Func2(struct Task *task) +static bool8 BigPokeball_SetGfx(struct Task *task) { s16 i, j; u16 *tilemap, *tileset; - const u16 *BigPokeballMap; + const u16 *bigPokeballMap; GetBg0TilesDst(&tilemap, &tileset); - BigPokeballMap = sBigPokeball_Tilemap; + bigPokeballMap = sBigPokeball_Tilemap; for (i = 0; i < 20; i++) { - for (j = 0; j < 30; j++, BigPokeballMap++) - { - SOME_VRAM_STORE(tilemap, i, j, *BigPokeballMap | 0xF000); - } + for (j = 0; j < 30; j++, bigPokeballMap++) + SET_TILEMAP_TILE(tilemap, i, j, *bigPokeballMap | 0xF000); } - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160); + + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude, DISPLAY_HEIGHT); task->tState++; return TRUE; } -static bool8 Aqua_Func2(struct Task *task) +static bool8 Aqua_SetGfx(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); LZ77UnCompVram(sTeamAqua_Tilemap, tilemap); - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude, DISPLAY_HEIGHT); task->tState++; return FALSE; } -static bool8 Magma_Func2(struct Task *task) +static bool8 Magma_SetGfx(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); LZ77UnCompVram(sTeamMagma_Tilemap, tilemap); - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude, DISPLAY_HEIGHT); task->tState++; return FALSE; } -static bool8 Regice_Func2(struct Task *task) +static bool8 Regice_SetGfx(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - LoadPalette(sRegice_Palette, 0xF0, 0x20); + LoadPalette(sRegice_Palette, 0xF0, sizeof(sRegice_Palette)); CpuCopy16(sRegice_Tilemap, tilemap, 0x500); - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude, DISPLAY_HEIGHT); task->tState++; return FALSE; } -static bool8 Registeel_Func2(struct Task *task) +static bool8 Registeel_SetGfx(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - LoadPalette(sRegisteel_Palette, 0xF0, 0x20); + LoadPalette(sRegisteel_Palette, 0xF0, sizeof(sRegisteel_Palette)); CpuCopy16(sRegisteel_Tilemap, tilemap, 0x500); - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude, DISPLAY_HEIGHT); task->tState++; return FALSE; } -static bool8 Regirock_Func2(struct Task *task) +static bool8 Regirock_SetGfx(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - LoadPalette(sRegirock_Palette, 0xF0, 0x20); + LoadPalette(sRegirock_Palette, 0xF0, sizeof(sRegirock_Palette)); CpuCopy16(sRegirock_Tilemap, tilemap, 0x500); - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude, DISPLAY_HEIGHT); task->tState++; return FALSE; } -static bool8 Kyogre_Func3(struct Task *task) +#define tTimer data[1] + +static bool8 Kyogre_Init(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); LZ77UnCompVram(sKyogre_Tileset, tileset); LZ77UnCompVram(sKyogre_Tilemap, tilemap); @@ -1425,48 +1494,48 @@ static bool8 Kyogre_Func3(struct Task *task) return FALSE; } -static bool8 Kyogre_Func4(struct Task *task) +static bool8 Kyogre_PalettePulsate(struct Task *task) { - if (task->tData1 % 3 == 0) + if (task->tTimer % 3 == 0) { - u16 var = task->tData1 % 30; + u16 var = task->tTimer % 30; var /= 3; LoadPalette(sKyogre1_Palette + (var * 16), 0xF0, 0x20); } - if (++task->tData1 > 58) + if (++task->tTimer > 58) { task->tState++; - task->tData1 = 0; + task->tTimer = 0; } return FALSE; } -static bool8 Kyogre_Func5(struct Task *task) +static bool8 Kyogre_PaletteBrighten(struct Task *task) { - if (task->tData1 % 5 == 0) + if (task->tTimer % 5 == 0) { - s16 var = task->tData1 / 5; + s16 var = task->tTimer / 5; LoadPalette(sKyogre2_Palette + (var * 16), 0xF0, 0x20); } - if (++task->tData1 > 68) + if (++task->tTimer > 68) { task->tState++; - task->tData1 = 0; - task->tFrames = 30; + task->tTimer = 0; + task->tEndDelay = 30; } return FALSE; } -static bool8 WeatherDuo_Func6(struct Task *task) +static bool8 WeatherDuo_FadeOut(struct Task *task) { - BeginNormalPaletteFade(PALETTES_OBJECTS | 0x8000, 1, 0, 0x10, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_OBJECTS | (1 << 15), 1, 0, 16, RGB_BLACK); task->tState++; return FALSE; } -static bool8 WeatherDuo_Func7(struct Task *task) +static bool8 WeatherDuo_End(struct Task *task) { if (!gPaletteFade.active) { @@ -1477,100 +1546,105 @@ static bool8 WeatherDuo_Func7(struct Task *task) return FALSE; } -static bool8 BigPokeball_Func3(struct Task *task) +#undef tTimer + +// The PatternWeave_ functions are used by several different transitions. +// They create an effect where a pattern/image (such as the Magma emblem) is +// formed by a shimmering weave effect. +static bool8 PatternWeave_1(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; - if (task->tData3 == 0 || --task->tData3 == 0) + sTransitionData->VBlank_DMA = FALSE; + if (task->tBlendDelay == 0 || --task->tBlendDelay == 0) { - task->tData2++; - task->tData3 = 2; + task->tBlendTarget2++; + task->tBlendDelay = 2; } - sTransitionStructPtr->BLDALPHA = BLDALPHA_BLEND(task->tData2, task->tData1); - if (task->tData2 > 15) + sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->tBlendTarget2, task->tBlendTarget1); + if (task->tBlendTarget2 > 15) task->tState++; - task->tData4 += 8; - task->tData5 -= 256; + task->tSinIndex += 8; + task->tAmplitude -= 256; - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5 >> 8, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude >> 8, DISPLAY_HEIGHT); - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 BigPokeball_Func4(struct Task *task) +static bool8 PatternWeave_2(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; - if (task->tData3 == 0 || --task->tData3 == 0) + sTransitionData->VBlank_DMA = FALSE; + if (task->tBlendDelay == 0 || --task->tBlendDelay == 0) { - task->tData1--; - task->tData3 = 2; + task->tBlendTarget1--; + task->tBlendDelay = 2; } - sTransitionStructPtr->BLDALPHA = BLDALPHA_BLEND(task->tData2, task->tData1); - if (task->tData1 == 0) + sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->tBlendTarget2, task->tBlendTarget1); + if (task->tBlendTarget1 == 0) task->tState++; - task->tData4 += 8; - task->tData5 -= 256; + task->tSinIndex += 8; + task->tAmplitude -= 256; - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5 >> 8, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude >> 8, DISPLAY_HEIGHT); - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 BigPokeball_Func5(struct Task *task) +static bool8 PatternWeave_3(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; - task->tData4 += 8; - task->tData5 -= 256; + sTransitionData->VBlank_DMA = FALSE; + task->tSinIndex += 8; + task->tAmplitude -= 256; - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 132, task->tData5 >> 8, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude >> 8, DISPLAY_HEIGHT); - if (task->tData5 <= 0) + if (task->tAmplitude <= 0) { task->tState++; - task->tData1 = 160; - task->tData2 = 256; - task->tData3 = 0; + task->tEndAmplitude = 160; + task->tEndAmplitudeDelta = 256; + task->tVBlankSet = FALSE; } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } static bool8 FramesCountdown(struct Task *task) { - if (--task->tFrames == 0) + if (--task->tEndDelay == 0) task->tState++; return FALSE; } -static bool8 WeatherTrio_Func1(struct Task *task) +static bool8 WeatherTrio_BgFadeBlack(struct Task *task) { - BeginNormalPaletteFade(PALETTES_BG, 1, 0, 0x10, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_BG, 1, 0, 16, RGB_BLACK); task->tState++; return FALSE; } -static bool8 WaitPaletteFade(struct Task *task) +static bool8 WeatherTrio_WaitFade(struct Task *task) { if (!gPaletteFade.active) task->tState++; return FALSE; } -static bool8 BigPokeball_Func6(struct Task *task) +static bool8 PatternWeave_End(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; - if (task->tData2 < 1024) - task->tData2 += 128; - if (task->tData1 != 0) + sTransitionData->VBlank_DMA = FALSE; + if (task->tEndAmplitudeDelta < 1024) + task->tEndAmplitudeDelta += 128; + if (task->tEndAmplitude != 0) { - task->tData1 -= (task->tData2 >> 8); - if (task->tData1 < 0) - task->tData1 = 0; + task->tEndAmplitude -= task->tEndAmplitudeDelta >> 8; + if (task->tEndAmplitude < 0) + task->tEndAmplitude = 0; } - sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->tData1); - if (task->tData1 == 0) + sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->tEndAmplitude); + if (task->tEndAmplitude == 0) { SetVBlankCallback(NULL); DmaStop(0); @@ -1579,13 +1653,13 @@ static bool8 BigPokeball_Func6(struct Task *task) } else { - if (task->tData3 == 0) + if (!task->tVBlankSet) { - task->tData3++; + task->tVBlankSet++; SetVBlankCallback(VBlankCB1_BigPokeball); } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; } return FALSE; @@ -1595,58 +1669,65 @@ static void Transition_BigPokeball_Vblank(void) { DmaStop(0); VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); - REG_WININ = sTransitionStructPtr->WININ; - REG_WINOUT = sTransitionStructPtr->WINOUT; - REG_WIN0V = sTransitionStructPtr->WIN0V; - REG_BLDCNT = sTransitionStructPtr->BLDCNT; - REG_BLDALPHA = sTransitionStructPtr->BLDALPHA; + if (sTransitionData->VBlank_DMA) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); + REG_WININ = sTransitionData->WININ; + REG_WINOUT = sTransitionData->WINOUT; + REG_WIN0V = sTransitionData->WIN0V; + REG_BLDCNT = sTransitionData->BLDCNT; + REG_BLDALPHA = sTransitionData->BLDALPHA; } -static void VBlankCB0_BigPokeball(void) +static void VBlankCB_PatternWeave(void) { Transition_BigPokeball_Vblank(); - DmaSet(0, gScanlineEffectRegBuffers[1], ®_BG0HOFS, 0xA2400001); + DmaSet(0, gScanlineEffectRegBuffers[1], ®_BG0HOFS, B_TRANS_DMA_FLAGS); } static void VBlankCB1_BigPokeball(void) { Transition_BigPokeball_Vblank(); - DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); + DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } +#undef tAmplitude +#undef tSinIndex +#undef tBlendTarget1 +#undef tBlendTarget2 +#undef tEndAmplitude +#undef tVBlankSet + static void Task_PokeballsTrail(u8 taskId) { while (sPokeballsTrail_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 PokeballsTrail_Func1(struct Task *task) +static bool8 PokeballsTrail_Init(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); CpuSet(sPokeballTrail_Tileset, tileset, 0x20); - CpuFill32(0, tilemap, 0x800); - LoadPalette(sFieldEffectPal_Pokeball, 0xF0, 0x20); + CpuFill32(0, tilemap, BG_SCREEN_SIZE); + LoadPalette(sFieldEffectPal_Pokeball, 0xF0, sizeof(sFieldEffectPal_Pokeball)); task->tState++; return FALSE; } -static bool8 PokeballsTrail_Func2(struct Task *task) +static bool8 PokeballsTrail_Main(struct Task *task) { s16 i; s16 rand; - s16 arr0[ARRAY_COUNT(sUnknown_085C8B88)]; + s16 xCoords[ARRAY_COUNT(sUnknown_085C8B88)]; s16 arr1[ARRAY_COUNT(sUnknown_085C8B8C)]; - memcpy(arr0, sUnknown_085C8B88, sizeof(sUnknown_085C8B88)); + memcpy(xCoords, sUnknown_085C8B88, sizeof(sUnknown_085C8B88)); memcpy(arr1, sUnknown_085C8B8C, sizeof(sUnknown_085C8B8C)); rand = Random() & 1; for (i = 0; i <= 4; i++, rand ^= 1) { - gFieldEffectArguments[0] = arr0[rand]; // x + gFieldEffectArguments[0] = xCoords[rand]; // x gFieldEffectArguments[1] = (i * 32) + 16; // y gFieldEffectArguments[2] = rand; gFieldEffectArguments[3] = arr1[i]; @@ -1657,7 +1738,7 @@ static bool8 PokeballsTrail_Func2(struct Task *task) return FALSE; } -static bool8 PokeballsTrail_Func3(struct Task *task) +static bool8 PokeballsTrail_End(struct Task *task) { if (!FieldEffectActiveListContains(FLDEFF_POKEBALL)) { @@ -1667,27 +1748,31 @@ static bool8 PokeballsTrail_Func3(struct Task *task) return FALSE; } +#define sData0 data[0] +#define sData1 data[1] +#define sData2 data[2] + bool8 FldEff_Pokeball(void) { u8 spriteId = CreateSpriteAtEnd(&sSpriteTemplate_Pokeball, gFieldEffectArguments[0], gFieldEffectArguments[1], 0); gSprites[spriteId].oam.priority = 0; gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; - gSprites[spriteId].data[0] = gFieldEffectArguments[2]; - gSprites[spriteId].data[1] = gFieldEffectArguments[3]; - gSprites[spriteId].data[2] = -1; + gSprites[spriteId].sData0 = gFieldEffectArguments[2]; + gSprites[spriteId].sData1 = gFieldEffectArguments[3]; + gSprites[spriteId].sData2 = -1; InitSpriteAffineAnim(&gSprites[spriteId]); StartSpriteAffineAnim(&gSprites[spriteId], gFieldEffectArguments[2]); return FALSE; } -static void sub_814713C(struct Sprite *sprite) +static void SpriteCB_FldEffPokeball(struct Sprite *sprite) { s16 arr0[ARRAY_COUNT(sUnknown_085C8B96)]; memcpy(arr0, sUnknown_085C8B96, sizeof(sUnknown_085C8B96)); - if (sprite->data[1] != 0) + if (sprite->sData1 != 0) { - sprite->data[1]--; + sprite->sData1--; } else { @@ -1696,51 +1781,53 @@ static void sub_814713C(struct Sprite *sprite) s16 posX = sprite->x >> 3; s16 posY = sprite->y >> 3; - if (posX != sprite->data[2]) + if (posX != sprite->sData2) { u32 var; u16 *ptr; - sprite->data[2] = posX; + sprite->sData2 = posX; var = (((REG_BG0CNT >> 8) & 0x1F) << 11); ptr = (u16 *)(VRAM + var); - SOME_VRAM_STORE(ptr, posY - 2, posX, 0xF001); - SOME_VRAM_STORE(ptr, posY - 1, posX, 0xF001); - SOME_VRAM_STORE(ptr, posY - 0, posX, 0xF001); - SOME_VRAM_STORE(ptr, posY + 1, posX, 0xF001); + SET_TILEMAP_TILE(ptr, posY - 2, posX, 0xF001); + SET_TILEMAP_TILE(ptr, posY - 1, posX, 0xF001); + SET_TILEMAP_TILE(ptr, posY - 0, posX, 0xF001); + SET_TILEMAP_TILE(ptr, posY + 1, posX, 0xF001); } } - sprite->x += arr0[sprite->data[0]]; - if (sprite->x < -15 || sprite->x > 255) + sprite->x += arr0[sprite->sData0]; + if (sprite->x < -15 || sprite->x > DISPLAY_WIDTH + 15) FieldEffectStop(sprite, FLDEFF_POKEBALL); } } +#undef sData0 +#undef sData1 +#undef sData2 + static void Task_Clockwise_BlackFade(u8 taskId) { while (sClockwise_BlackFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Clockwise_BlackFade_Func1(struct Task *task) +static bool8 Clockwise_BlackFade_Init(struct Task *task) { u16 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - sTransitionStructPtr->WININ = 0; - sTransitionStructPtr->WINOUT = WINOUT_WIN01_ALL; - sTransitionStructPtr->WIN0H = -3855; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; + sTransitionData->WININ = 0; + sTransitionData->WINOUT = WINOUT_WIN01_ALL; + sTransitionData->WIN0H = WIN_RANGE(DISPLAY_WIDTH, DISPLAY_WIDTH + 1); + sTransitionData->WIN0V = DISPLAY_HEIGHT; - for (i = 0; i < 160; i++) - { - gScanlineEffectRegBuffers[1][i] = 0xF3F4; - } + for (i = 0; i < DISPLAY_HEIGHT; i++) + gScanlineEffectRegBuffers[1][i] = WIN_RANGE(DISPLAY_WIDTH + 3, DISPLAY_WIDTH + 4); SetVBlankCallback(VBlankCB_Clockwise_BlackFade); - sTransitionStructPtr->data[4] = 120; + sTransitionData->data[4] = 120; task->tState++; return TRUE; @@ -1748,22 +1835,22 @@ static bool8 Clockwise_BlackFade_Func1(struct Task *task) static bool8 Clockwise_BlackFade_Func2(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionStructPtr->data, 120, 80, sTransitionStructPtr->data[4], -1, 1, 1); + sub_814A1AC(sTransitionData->data, 120, 80, sTransitionData->data[4], -1, 1, 1); do { - gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (sTransitionStructPtr->data[2] + 1) | 0x7800; - } while (!sub_814A228(sTransitionStructPtr->data, 1, 1)); + gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (sTransitionData->data[2] + 1) | 0x7800; + } while (!sub_814A228(sTransitionData->data, 1, 1)); - sTransitionStructPtr->data[4] += 16; - if (sTransitionStructPtr->data[4] >= 240) + sTransitionData->data[4] += 16; + if (sTransitionData->data[4] >= DISPLAY_WIDTH) { - sTransitionStructPtr->data[5] = 0; + sTransitionData->data[5] = 0; task->tState++; } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } @@ -1772,57 +1859,55 @@ static bool8 Clockwise_BlackFade_Func3(struct Task *task) s16 r1, r3; vu8 var = 0; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionStructPtr->data, 120, 80, 240, sTransitionStructPtr->data[5], 1, 1); + sub_814A1AC(sTransitionData->data, 120, 80, 240, sTransitionData->data[5], 1, 1); while (1) { - r1 = 120, r3 = sTransitionStructPtr->data[2] + 1; - if (sTransitionStructPtr->data[5] >= 80) - r1 = sTransitionStructPtr->data[2], r3 = 240; - gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (r3) | (r1 << 8); + r1 = 120, r3 = sTransitionData->data[2] + 1; + if (sTransitionData->data[5] >= DISPLAY_HEIGHT / 2) + r1 = sTransitionData->data[2], r3 = DISPLAY_WIDTH; + gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (r3) | (r1 << 8); if (var != 0) break; - var = sub_814A228(sTransitionStructPtr->data, 1, 1); + var = sub_814A228(sTransitionData->data, 1, 1); } - sTransitionStructPtr->data[5] += 8; - if (sTransitionStructPtr->data[5] >= 160) + sTransitionData->data[5] += 8; + if (sTransitionData->data[5] >= DISPLAY_HEIGHT) { - sTransitionStructPtr->data[4] = 240; + sTransitionData->data[4] = DISPLAY_WIDTH; task->tState++; } else { - while (sTransitionStructPtr->data[3] < sTransitionStructPtr->data[5]) - { - gScanlineEffectRegBuffers[0][++sTransitionStructPtr->data[3]] = (r3) | (r1 << 8); - } + while (sTransitionData->data[3] < sTransitionData->data[5]) + gScanlineEffectRegBuffers[0][++sTransitionData->data[3]] = (r3) | (r1 << 8); } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } static bool8 Clockwise_BlackFade_Func4(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionStructPtr->data, 120, 80, sTransitionStructPtr->data[4], 160, 1, 1); + sub_814A1AC(sTransitionData->data, 120, 80, sTransitionData->data[4], 160, 1, 1); do { - gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (sTransitionStructPtr->data[2] << 8) | 0xF0; - } while (!sub_814A228(sTransitionStructPtr->data, 1, 1)); + gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (sTransitionData->data[2] << 8) | 0xF0; + } while (!sub_814A228(sTransitionData->data, 1, 1)); - sTransitionStructPtr->data[4] -= 16; - if (sTransitionStructPtr->data[4] <= 0) + sTransitionData->data[4] -= 16; + if (sTransitionData->data[4] <= 0) { - sTransitionStructPtr->data[5] = 160; + sTransitionData->data[5] = DISPLAY_HEIGHT; task->tState++; } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } @@ -1831,66 +1916,66 @@ static bool8 Clockwise_BlackFade_Func5(struct Task *task) s16 r1, r2, var4; vu8 var = 0; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionStructPtr->data, 120, 80, 0, sTransitionStructPtr->data[5], 1, 1); + sub_814A1AC(sTransitionData->data, 120, 80, 0, sTransitionData->data[5], 1, 1); while (1) { - r1 = (gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]]) & 0xFF; - r2 = sTransitionStructPtr->data[2]; - if (sTransitionStructPtr->data[5] <= 80) - r2 = 120, r1 = sTransitionStructPtr->data[2]; + r1 = (gScanlineEffectRegBuffers[0][sTransitionData->data[3]]) & 0xFF; + r2 = sTransitionData->data[2]; + if (sTransitionData->data[5] <= DISPLAY_HEIGHT / 2) + r2 = 120, r1 = sTransitionData->data[2]; var4 = (r1) | (r2 << 8); - gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = var4; + gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = var4; if (var != 0) break; - var = sub_814A228(sTransitionStructPtr->data, 1, 1); + var = sub_814A228(sTransitionData->data, 1, 1); } - sTransitionStructPtr->data[5] -= 8; - if (sTransitionStructPtr->data[5] <= 0) + sTransitionData->data[5] -= 8; + if (sTransitionData->data[5] <= 0) { - sTransitionStructPtr->data[4] = 0; + sTransitionData->data[4] = 0; task->tState++; } else { - while (sTransitionStructPtr->data[3] > sTransitionStructPtr->data[5]) + while (sTransitionData->data[3] > sTransitionData->data[5]) { - gScanlineEffectRegBuffers[0][--sTransitionStructPtr->data[3]] = (r1) | (r2 << 8); + gScanlineEffectRegBuffers[0][--sTransitionData->data[3]] = (r1) | (r2 << 8); } } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } static bool8 Clockwise_BlackFade_Func6(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionStructPtr->data, 120, 80, sTransitionStructPtr->data[4], 0, 1, 1); + sub_814A1AC(sTransitionData->data, 120, 80, sTransitionData->data[4], 0, 1, 1); do { s16 r2, r3; - r2 = 120, r3 = sTransitionStructPtr->data[2]; - if (sTransitionStructPtr->data[2] >= 120) - r2 = 0, r3 = 240; - gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (r3) | (r2 << 8); + r2 = 120, r3 = sTransitionData->data[2]; + if (sTransitionData->data[2] >= 120) + r2 = 0, r3 = DISPLAY_WIDTH; + gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (r3) | (r2 << 8); - } while (!sub_814A228(sTransitionStructPtr->data, 1, 1)); + } while (!sub_814A228(sTransitionData->data, 1, 1)); - sTransitionStructPtr->data[4] += 16; - if (sTransitionStructPtr->data[2] > 120) + sTransitionData->data[4] += 16; + if (sTransitionData->data[2] > 120) task->tState++; - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Clockwise_BlackFade_Func7(struct Task *task) +static bool8 Clockwise_BlackFade_End(struct Task *task) { DmaStop(0); FadeScreenBlack(); @@ -1902,13 +1987,13 @@ static void VBlankCB_Clockwise_BlackFade(void) { DmaStop(0); VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA != 0) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); - REG_WININ = sTransitionStructPtr->WININ; - REG_WINOUT = sTransitionStructPtr->WINOUT; - REG_WIN0V = sTransitionStructPtr->WIN0V; + if (sTransitionData->VBlank_DMA != 0) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); + REG_WININ = sTransitionData->WININ; + REG_WINOUT = sTransitionData->WINOUT; + REG_WIN0V = sTransitionData->WIN0V; REG_WIN0H = gScanlineEffectRegBuffers[1][0]; - DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); + DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } static void Task_Ripple(u8 taskId) @@ -1916,17 +2001,15 @@ static void Task_Ripple(u8 taskId) while (sRipple_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Ripple_Func1(struct Task *task) +static bool8 Ripple_Init(struct Task *task) { u8 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - for (i = 0; i < 160; i++) - { - gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_16; - } + for (i = 0; i < DISPLAY_HEIGHT; i++) + gScanlineEffectRegBuffers[1][i] = sTransitionData->cameraY; SetVBlankCallback(VBlankCB_Ripple); SetHBlankCallback(HBlankCB_Ripple); @@ -1943,39 +2026,39 @@ static bool8 Ripple_Func2(struct Task *task) s16 r3; u16 r4, r8; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - r3 = task->tData2 >> 8; - r4 = task->tData1; + r3 = task->data[2] >> 8; + r4 = task->data[1]; r8 = 384; - task->tData1 += 0x400; - if (task->tData2 <= 0x1FFF) - task->tData2 += 0x180; + task->data[1] += 0x400; + if (task->data[2] <= 0x1FFF) + task->data[2] += 0x180; - for (i = 0; i < 160; i++, r4 += r8) + for (i = 0; i < DISPLAY_HEIGHT; i++, r4 += r8) { s16 var = r4 >> 8; - gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(var & 0xffff, r3); + gScanlineEffectRegBuffers[0][i] = sTransitionData->cameraY + Sin(var & 0xffff, r3); } - if (++task->tData3 == 81) + if (++task->data[3] == 81) { - task->tData4++; - BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 0x10, RGB_BLACK); + task->data[4]++; + BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, RGB_BLACK); } - if (task->tData4 != 0 && !gPaletteFade.active) + if (task->data[4] != 0 && !gPaletteFade.active) DestroyTask(FindTaskIdByFunc(Task_Ripple)); - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } static void VBlankCB_Ripple(void) { VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); + if (sTransitionData->VBlank_DMA) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); } static void HBlankCB_Ripple(void) @@ -1986,27 +2069,26 @@ static void HBlankCB_Ripple(void) REG_BG3VOFS = var; } +// B_TRANSITION_WAVE static void Task_Wave(u8 taskId) { while (sWave_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Wave_Func1(struct Task *task) +static bool8 Wave_Init(struct Task *task) { u8 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - sTransitionStructPtr->WININ = WININ_WIN0_ALL; - sTransitionStructPtr->WINOUT = 0; - sTransitionStructPtr->WIN0H = DISPLAY_WIDTH; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; + sTransitionData->WININ = WININ_WIN0_ALL; + sTransitionData->WINOUT = 0; + sTransitionData->WIN0H = DISPLAY_WIDTH; + sTransitionData->WIN0V = DISPLAY_HEIGHT; - for (i = 0; i < 160; i++) - { - gScanlineEffectRegBuffers[1][i] = 242; - } + for (i = 0; i < DISPLAY_HEIGHT; i++) + gScanlineEffectRegBuffers[1][i] = DISPLAY_WIDTH + 2; SetVBlankCallback(VBlankCB_Wave); @@ -2020,31 +2102,31 @@ static bool8 Wave_Func2(struct Task *task) u16* toStore; bool8 nextFunc; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; toStore = gScanlineEffectRegBuffers[0]; - r5 = task->tData2; - task->tData2 += 16; - task->tData1 += 8; + r5 = task->data[2]; + task->data[2] += 16; + task->data[1] += 8; - for (i = 0, nextFunc = TRUE; i < 160; i++, r5 += 4, toStore++) + for (i = 0, nextFunc = TRUE; i < DISPLAY_HEIGHT; i++, r5 += 4, toStore++) { - s16 value = task->tData1 + Sin(r5, 40); + s16 value = task->data[1] + Sin(r5, 40); if (value < 0) value = 0; - if (value > 240) - value = 240; - *toStore = (value << 8) | (0xF1); - if (value < 240) + if (value > DISPLAY_WIDTH) + value = DISPLAY_WIDTH; + *toStore = (value << 8) | (DISPLAY_WIDTH + 1); + if (value < DISPLAY_WIDTH) nextFunc = FALSE; } if (nextFunc) task->tState++; - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Wave_Func3(struct Task *task) +static bool8 Wave_End(struct Task *task) { DmaStop(0); FadeScreenBlack(); @@ -2056,68 +2138,66 @@ static void VBlankCB_Wave(void) { DmaStop(0); VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA != 0) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); - REG_WININ = sTransitionStructPtr->WININ; - REG_WINOUT = sTransitionStructPtr->WINOUT; - REG_WIN0V = sTransitionStructPtr->WIN0V; - DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); + if (sTransitionData->VBlank_DMA != 0) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); + REG_WININ = sTransitionData->WININ; + REG_WINOUT = sTransitionData->WINOUT; + REG_WIN0V = sTransitionData->WIN0V; + DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } static void Task_Sidney(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_SIDNEY; - Task_MugShotTransition(taskId); + DoMugshotTransition(taskId); } static void Task_Phoebe(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_PHOEBE; - Task_MugShotTransition(taskId); + DoMugshotTransition(taskId); } static void Task_Glacia(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_GLACIA; - Task_MugShotTransition(taskId); + DoMugshotTransition(taskId); } static void Task_Drake(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_DRAKE; - Task_MugShotTransition(taskId); + DoMugshotTransition(taskId); } static void Task_Champion(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_CHAMPION; - Task_MugShotTransition(taskId); + DoMugshotTransition(taskId); } -static void Task_MugShotTransition(u8 taskId) +static void DoMugshotTransition(u8 taskId) { while (sMugshot_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Mugshot_Func1(struct Task *task) +static bool8 Mugshot_Init(struct Task *task) { u8 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - Mugshots_CreateOpponentPlayerSprites(task); + Mugshots_CreateTrainerPics(task); - task->tData1 = 0; - task->tData2 = 1; - task->tData3 = 239; - sTransitionStructPtr->WININ = WININ_WIN0_ALL; - sTransitionStructPtr->WINOUT = WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; + task->data[1] = 0; + task->data[2] = 1; + task->data[3] = DISPLAY_WIDTH - 1; + sTransitionData->WININ = WININ_WIN0_ALL; + sTransitionData->WINOUT = WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR; + sTransitionData->WIN0V = DISPLAY_HEIGHT; - for (i = 0; i < 160; i++) - { + for (i = 0; i < DISPLAY_HEIGHT; i++) gScanlineEffectRegBuffers[1][i] = 0xF0F1; - } SetVBlankCallback(VBlankCB0_Mugshots); @@ -2125,7 +2205,7 @@ static bool8 Mugshot_Func1(struct Task *task) return FALSE; } -static bool8 Mugshot_Func2(struct Task *task) +static bool8 Mugshot_SetGfx(struct Task *task) { s16 i, j; u16 *tilemap, *tileset; @@ -2140,9 +2220,7 @@ static bool8 Mugshot_Func2(struct Task *task) for (i = 0; i < 20; i++) { for (j = 0; j < 32; j++, mugshotsMap++) - { - SOME_VRAM_STORE(tilemap, i, j, *mugshotsMap | 0xF000); - } + SET_TILEMAP_TILE(tilemap, i, j, *mugshotsMap | 0xF000); } EnableInterrupts(INTR_FLAG_HBLANK); @@ -2152,72 +2230,71 @@ static bool8 Mugshot_Func2(struct Task *task) return FALSE; } -static bool8 Mugshot_Func3(struct Task *task) +static bool8 Mugshot_ShowBanner(struct Task *task) { u8 i, r5; u16* toStore; s16 value; s32 mergedValue; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; toStore = gScanlineEffectRegBuffers[0]; - r5 = task->tData1; - task->tData1 += 0x10; + r5 = task->data[1]; + task->data[1] += 16; - for (i = 0; i < 80; i++, toStore++, r5 += 0x10) + for (i = 0; i < DISPLAY_HEIGHT / 2; i++, toStore++, r5 += 16) { - value = task->tData2 + Sin(r5, 0x10); + value = task->data[2] + Sin(r5, 16); if (value < 0) value = 1; - if (value > 0xF0) - value = 0xF0; + if (value > DISPLAY_WIDTH) + value = DISPLAY_WIDTH; *toStore = value; } - for (; i < 160; i++, toStore++, r5 += 0x10) + for (; i < DISPLAY_HEIGHT; i++, toStore++, r5 += 16) { - value = task->tData3 - Sin(r5, 0x10); + value = task->data[3] - Sin(r5, 16); if (value < 0) value = 0; - if (value > 0xEF) - value = 0xEF; - *toStore = (value << 8) | (0xF0); + if (value > DISPLAY_WIDTH - 1) + value = DISPLAY_WIDTH - 1; + *toStore = (value << 8) | (DISPLAY_WIDTH); } - task->tData2 += 8; - task->tData3 -= 8; - if (task->tData2 > 0xF0) - task->tData2 = 0xF0; - if (task->tData3 < 0) - task->tData3 = 0; - mergedValue = *(s32*)(&task->tData2); - if (mergedValue == 0xF0) + task->data[2] += 8; + task->data[3] -= 8; + if (task->data[2] > DISPLAY_WIDTH) + task->data[2] = DISPLAY_WIDTH; + if (task->data[3] < 0) + task->data[3] = 0; + mergedValue = *(s32*)(&task->data[2]); + if (mergedValue == DISPLAY_WIDTH) task->tState++; - sTransitionStructPtr->BG0HOFS_1 -= 8; - sTransitionStructPtr->BG0HOFS_2 += 8; - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->BG0HOFS_Lower -= 8; + sTransitionData->BG0HOFS_Upper += 8; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Mugshot_Func4(struct Task *task) +static bool8 Mugshot_StartOpponentSlide(struct Task *task) { u8 i; u16* toStore; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - for (i = 0, toStore = gScanlineEffectRegBuffers[0]; i < 160; i++, toStore++) - { - *toStore = 0xF0; - } + for (i = 0, toStore = gScanlineEffectRegBuffers[0]; i < DISPLAY_HEIGHT; i++, toStore++) + *toStore = DISPLAY_WIDTH; task->tState++; - task->tData1 = 0; - task->tData2 = 0; - task->tData3 = 0; - sTransitionStructPtr->BG0HOFS_1 -= 8; - sTransitionStructPtr->BG0HOFS_2 += 8; + task->data[1] = 0; + task->data[2] = 0; + task->data[3] = 0; + + sTransitionData->BG0HOFS_Lower -= 8; + sTransitionData->BG0HOFS_Upper += 8; SetTrainerPicSlideTable(task->tOpponentSpriteId, 0); SetTrainerPicSlideTable(task->tPlayerSpriteId, 1); @@ -2225,14 +2302,16 @@ static bool8 Mugshot_Func4(struct Task *task) PlaySE(SE_MUGSHOT); - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Mugshot_Func5(struct Task *task) +static bool8 Mugshot_WaitStartPlayerSlide(struct Task *task) { - sTransitionStructPtr->BG0HOFS_1 -= 8; - sTransitionStructPtr->BG0HOFS_2 += 8; + sTransitionData->BG0HOFS_Lower -= 8; + sTransitionData->BG0HOFS_Upper += 8; + + // Start player's pic slide in once the opponent is finished if (IsTrainerPicSlideDone(task->tOpponentSpriteId)) { task->tState++; @@ -2241,94 +2320,95 @@ static bool8 Mugshot_Func5(struct Task *task) return FALSE; } -static bool8 Mugshot_Func6(struct Task *task) +static bool8 Mugshot_WaitPlayerSlide(struct Task *task) { - sTransitionStructPtr->BG0HOFS_1 -= 8; - sTransitionStructPtr->BG0HOFS_2 += 8; + sTransitionData->BG0HOFS_Lower -= 8; + sTransitionData->BG0HOFS_Upper += 8; + if (IsTrainerPicSlideDone(task->tPlayerSpriteId)) { - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; SetVBlankCallback(NULL); DmaStop(0); - memset(gScanlineEffectRegBuffers[0], 0, 0x140); - memset(gScanlineEffectRegBuffers[1], 0, 0x140); + memset(gScanlineEffectRegBuffers[0], 0, DISPLAY_HEIGHT * 2); + memset(gScanlineEffectRegBuffers[1], 0, DISPLAY_HEIGHT * 2); SetGpuReg(REG_OFFSET_WIN0H, DISPLAY_WIDTH); SetGpuReg(REG_OFFSET_BLDY, 0); task->tState++; - task->tData3 = 0; - task->tData4 = 0; - sTransitionStructPtr->BLDCNT = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN; + task->data[3] = 0; + task->data[4] = 0; + sTransitionData->BLDCNT = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN; SetVBlankCallback(VBlankCB1_Mugshots); } return FALSE; } -static bool8 Mugshot_Func7(struct Task *task) +static bool8 Mugshot_GradualWhiteFade(struct Task *task) { - bool32 r6; + bool32 active; - sTransitionStructPtr->VBlank_DMA = FALSE; - r6 = TRUE; - sTransitionStructPtr->BG0HOFS_1 -= 8; - sTransitionStructPtr->BG0HOFS_2 += 8; + sTransitionData->VBlank_DMA = FALSE; + active = TRUE; + sTransitionData->BG0HOFS_Lower -= 8; + sTransitionData->BG0HOFS_Upper += 8; - if (task->tData4 < 0x50) - task->tData4 += 2; - if (task->tData4 > 0x50) - task->tData4 = 0x50; + if (task->data[4] < DISPLAY_HEIGHT / 2) + task->data[4] += 2; + if (task->data[4] > DISPLAY_HEIGHT / 2) + task->data[4] = DISPLAY_HEIGHT / 2; - if (++task->tData3 & 1) + if (++task->data[3] & 1) { s16 i; - for (i = 0, r6 = FALSE; i <= task->tData4; i++) + for (i = 0, active = FALSE; i <= task->data[4]; i++) { - s16 index1 = 0x50 - i; - s16 index2 = 0x50 + i; + s16 index1 = DISPLAY_HEIGHT / 2 - i; + s16 index2 = DISPLAY_HEIGHT / 2 + i; if (gScanlineEffectRegBuffers[0][index1] <= 15) { - r6 = TRUE; + active = TRUE; gScanlineEffectRegBuffers[0][index1]++; } if (gScanlineEffectRegBuffers[0][index2] <= 15) { - r6 = TRUE; + active = TRUE; gScanlineEffectRegBuffers[0][index2]++; } } } - if (task->tData4 == 0x50 && !r6) + if (task->data[4] == DISPLAY_HEIGHT / 2 && !active) task->tState++; - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Mugshot_Func8(struct Task *task) +static bool8 Mugshot_InitFadeWhiteToBlack(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; - BlendPalettes(PALETTES_ALL, 0x10, RGB_WHITE); - sTransitionStructPtr->BLDCNT = 0xFF; - task->tData3 = 0; + sTransitionData->VBlank_DMA = FALSE; + BlendPalettes(PALETTES_ALL, 16, RGB_WHITE); + sTransitionData->BLDCNT = 0xFF; + task->data[3] = 0; task->tState++; return TRUE; } -static bool8 Mugshot_Func9(struct Task *task) +static bool8 Mugshot_FadeToBlack(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - task->tData3++; - memset(gScanlineEffectRegBuffers[0], task->tData3, 0x140); - if (task->tData3 > 15) + task->data[3]++; + memset(gScanlineEffectRegBuffers[0], task->data[3], DISPLAY_HEIGHT * 2); + if (task->data[3] > 15) task->tState++; - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Mugshot_Func10(struct Task *task) +static bool8 Mugshot_End(struct Task *task) { DmaStop(0); FadeScreenBlack(); @@ -2340,31 +2420,31 @@ static void VBlankCB0_Mugshots(void) { DmaStop(0); VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA != 0) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); - REG_BG0VOFS = sTransitionStructPtr->BG0VOFS; - REG_WININ = sTransitionStructPtr->WININ; - REG_WINOUT = sTransitionStructPtr->WINOUT; - REG_WIN0V = sTransitionStructPtr->WIN0V; - DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); + if (sTransitionData->VBlank_DMA != 0) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); + REG_BG0VOFS = sTransitionData->BG0VOFS; + REG_WININ = sTransitionData->WININ; + REG_WINOUT = sTransitionData->WINOUT; + REG_WIN0V = sTransitionData->WIN0V; + DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } static void VBlankCB1_Mugshots(void) { DmaStop(0); VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA != 0) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); - REG_BLDCNT = sTransitionStructPtr->BLDCNT; - DmaSet(0, gScanlineEffectRegBuffers[1], ®_BLDY, 0xA2400001); + if (sTransitionData->VBlank_DMA != 0) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); + REG_BLDCNT = sTransitionData->BLDCNT; + DmaSet(0, gScanlineEffectRegBuffers[1], ®_BLDY, B_TRANS_DMA_FLAGS); } static void HBlankCB_Mugshots(void) { - if (REG_VCOUNT < 80) - REG_BG0HOFS = sTransitionStructPtr->BG0HOFS_1; + if (REG_VCOUNT < DISPLAY_HEIGHT / 2) + REG_BG0HOFS = sTransitionData->BG0HOFS_Lower; else - REG_BG0HOFS = sTransitionStructPtr->BG0HOFS_2; + REG_BG0HOFS = sTransitionData->BG0HOFS_Upper; } // data fields for player/opponent sprites in mugshots @@ -2374,7 +2454,7 @@ static void HBlankCB_Mugshots(void) #define sDone data[6] #define sSlideTableId data[7] -static void Mugshots_CreateOpponentPlayerSprites(struct Task *task) +static void Mugshots_CreateTrainerPics(struct Task *task) { struct Sprite *opponentSprite, *playerSprite; @@ -2383,13 +2463,16 @@ static void Mugshots_CreateOpponentPlayerSprites(struct Task *task) sMugshotsOpponentCoords[mugshotId][0] - 32, sMugshotsOpponentCoords[mugshotId][1] + 42, 0, gDecompressionBuffer); - task->tPlayerSpriteId = CreateTrainerSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), DISPLAY_WIDTH + 32, 106, 0, gDecompressionBuffer); + task->tPlayerSpriteId = CreateTrainerSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), + DISPLAY_WIDTH + 32, + 106, + 0, gDecompressionBuffer); opponentSprite = &gSprites[task->tOpponentSpriteId]; playerSprite = &gSprites[task->tPlayerSpriteId]; - opponentSprite->callback = SpriteCb_TrainerPic; - playerSprite->callback = SpriteCb_TrainerPic; + opponentSprite->callback = SpriteCB_MugshotTrainerPic; + playerSprite->callback = SpriteCB_MugshotTrainerPic; opponentSprite->oam.affineMode = ST_OAM_AFFINE_DOUBLE; playerSprite->oam.affineMode = ST_OAM_AFFINE_DOUBLE; @@ -2410,32 +2493,32 @@ static void Mugshots_CreateOpponentPlayerSprites(struct Task *task) SetOamMatrixRotationScaling(playerSprite->oam.matrixNum, -512, 512, 0); } -static void SpriteCb_TrainerPic(struct Sprite *sprite) +static void SpriteCB_MugshotTrainerPic(struct Sprite *sprite) { - while (sTrainerPicSpriteCbs[sprite->sState](sprite)); + while (sMugshotTrainerPicFuncs[sprite->sState](sprite)); } -static bool8 TrainerPicCb_Nothing(struct Sprite *sprite) +static bool8 MugshotTrainerPic_Nothing(struct Sprite *sprite) { return FALSE; } -static bool8 TrainerPicCb_SetSlideOffsets(struct Sprite *sprite) +static bool8 MugshotTrainerPic_SetSlideOffsets(struct Sprite *sprite) { - s16 offfsets1[ARRAY_COUNT(sTrainerPicSlideOffsets1)]; - s16 offfsets2[ARRAY_COUNT(sTrainerPicSlideOffsets2)]; + s16 offsets1[ARRAY_COUNT(sTrainerPicSlideOffsets1)]; + s16 offsets2[ARRAY_COUNT(sTrainerPicSlideOffsets2)]; - memcpy(offfsets1, sTrainerPicSlideOffsets1, sizeof(sTrainerPicSlideOffsets1)); - memcpy(offfsets2, sTrainerPicSlideOffsets2, sizeof(sTrainerPicSlideOffsets2)); + memcpy(offsets1, sTrainerPicSlideOffsets1, sizeof(sTrainerPicSlideOffsets1)); + memcpy(offsets2, sTrainerPicSlideOffsets2, sizeof(sTrainerPicSlideOffsets2)); sprite->sState++; - sprite->sOffsetX = offfsets1[sprite->sSlideTableId]; - sprite->sOffsetX2 = offfsets2[sprite->sSlideTableId]; + sprite->sOffsetX = offsets1[sprite->sSlideTableId]; + sprite->sOffsetX2 = offsets2[sprite->sSlideTableId]; return TRUE; } // fast slide to around middle screen -static bool8 TrainerPicCb_Slide1(struct Sprite *sprite) +static bool8 MugshotTrainerPic_Slide1(struct Sprite *sprite) { sprite->x += sprite->sOffsetX; if (sprite->sSlideTableId && sprite->x < 133) @@ -2446,7 +2529,7 @@ static bool8 TrainerPicCb_Slide1(struct Sprite *sprite) } // slower but accelerating slide -static bool8 TrainerPicCb_Slide2(struct Sprite *sprite) +static bool8 MugshotTrainerPic_Slide2(struct Sprite *sprite) { sprite->sOffsetX += sprite->sOffsetX2; sprite->x += sprite->sOffsetX; @@ -2460,11 +2543,11 @@ static bool8 TrainerPicCb_Slide2(struct Sprite *sprite) } // Has no practical effect -static bool8 TrainerPicCb_Slide3(struct Sprite *sprite) +static bool8 MugshotTrainerPic_Slide3(struct Sprite *sprite) { sprite->sOffsetX += sprite->sOffsetX2; sprite->x += sprite->sOffsetX; - if (sprite->x < -31 || sprite->x > 271) + if (sprite->x < -31 || sprite->x > DISPLAY_WIDTH + 31) sprite->sState++; return FALSE; } @@ -2495,24 +2578,24 @@ static void Task_Slice(u8 taskId) while (sSlice_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Slice_Func1(struct Task *task) +static bool8 Slice_Init(struct Task *task) { u16 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - task->tData2 = 256; - task->tData3 = 1; - sTransitionStructPtr->WININ = WININ_WIN0_ALL; - sTransitionStructPtr->WINOUT = 0; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; - sTransitionStructPtr->VBlank_DMA = FALSE; + task->data[2] = 256; + task->data[3] = 1; + sTransitionData->WININ = WININ_WIN0_ALL; + sTransitionData->WINOUT = 0; + sTransitionData->WIN0V = DISPLAY_HEIGHT; + sTransitionData->VBlank_DMA = FALSE; - for (i = 0; i < 160; i++) + for (i = 0; i < DISPLAY_HEIGHT; i++) { - gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_14; - gScanlineEffectRegBuffers[1][160 + i] = 0xF0; + gScanlineEffectRegBuffers[1][i] = sTransitionData->cameraX; + gScanlineEffectRegBuffers[1][DISPLAY_HEIGHT + i] = DISPLAY_WIDTH; } EnableInterrupts(INTR_FLAG_HBLANK); @@ -2529,40 +2612,40 @@ static bool8 Slice_Func2(struct Task *task) { u16 i; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - task->tData1 += (task->tData2 >> 8); - if (task->tData1 > 0xF0) - task->tData1 = 0xF0; - if (task->tData2 <= 0xFFF) - task->tData2 += task->tData3; - if (task->tData3 < 128) - task->tData3 <<= 1; // multiplying by two + task->data[1] += (task->data[2] >> 8); + if (task->data[1] > DISPLAY_WIDTH) + task->data[1] = DISPLAY_WIDTH; + if (task->data[2] <= 0xFFF) + task->data[2] += task->data[3]; + if (task->data[3] < 128) + task->data[3] <<= 1; // multiplying by two - for (i = 0; i < 160; i++) + for (i = 0; i < DISPLAY_HEIGHT; i++) { u16 *storeLoc1 = &gScanlineEffectRegBuffers[0][i]; - u16 *storeLoc2 = &gScanlineEffectRegBuffers[0][i + 160]; + u16 *storeLoc2 = &gScanlineEffectRegBuffers[0][i + DISPLAY_HEIGHT]; if (i & 1) { - *storeLoc1 = sTransitionStructPtr->field_14 + task->tData1; - *storeLoc2 = 0xF0 - task->tData1; + *storeLoc1 = sTransitionData->cameraX + task->data[1]; + *storeLoc2 = DISPLAY_WIDTH - task->data[1]; } else { - *storeLoc1 = sTransitionStructPtr->field_14 - task->tData1; - *storeLoc2 = (task->tData1 << 8) | (0xF1); + *storeLoc1 = sTransitionData->cameraX - task->data[1]; + *storeLoc2 = (task->data[1] << 8) | (DISPLAY_WIDTH + 1); } } - if (task->tData1 > 0xEF) + if (task->data[1] >= DISPLAY_WIDTH) task->tState++; - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Slice_Func3(struct Task *task) +static bool8 Slice_End(struct Task *task) { DmaStop(0); FadeScreenBlack(); @@ -2574,17 +2657,17 @@ static void VBlankCB_Slice(void) { DmaStop(0); VBlankCB_BattleTransition(); - REG_WININ = sTransitionStructPtr->WININ; - REG_WINOUT = sTransitionStructPtr->WINOUT; - REG_WIN0V = sTransitionStructPtr->WIN0V; - if (sTransitionStructPtr->VBlank_DMA) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 640); - DmaSet(0, &gScanlineEffectRegBuffers[1][160], ®_WIN0H, 0xA2400001); + REG_WININ = sTransitionData->WININ; + REG_WINOUT = sTransitionData->WINOUT; + REG_WIN0V = sTransitionData->WIN0V; + if (sTransitionData->VBlank_DMA) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 4); + DmaSet(0, &gScanlineEffectRegBuffers[1][DISPLAY_HEIGHT], ®_WIN0H, B_TRANS_DMA_FLAGS); } static void HBlankCB_Slice(void) { - if (REG_VCOUNT < 160) + if (REG_VCOUNT < DISPLAY_HEIGHT) { u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT]; REG_BG1HOFS = var; @@ -2598,31 +2681,31 @@ static void Task_ShredSplit(u8 taskId) while (sShredSplit_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 ShredSplit_Func1(struct Task *task) +static bool8 ShredSplit_Init(struct Task *task) { u16 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - sTransitionStructPtr->WININ = WININ_WIN0_ALL; - sTransitionStructPtr->WINOUT = 0; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; + sTransitionData->WININ = WININ_WIN0_ALL; + sTransitionData->WINOUT = 0; + sTransitionData->WIN0V = DISPLAY_HEIGHT; - for (i = 0; i < 0xA0; i++) + for (i = 0; i < DISPLAY_HEIGHT; i++) { - gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_14; - gScanlineEffectRegBuffers[1][0xA0 + i] = 0xF0; - gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_14; - gScanlineEffectRegBuffers[0][0xA0 + i] = 0xF0; - gScanlineEffectRegBuffers[0][0x140 + i] = 0; - gScanlineEffectRegBuffers[0][0x1E0 + i] = 0x100; - gScanlineEffectRegBuffers[0][0x280 + i] = 1; + gScanlineEffectRegBuffers[1][i] = sTransitionData->cameraX; + gScanlineEffectRegBuffers[1][DISPLAY_HEIGHT + i] = DISPLAY_WIDTH; + gScanlineEffectRegBuffers[0][i] = sTransitionData->cameraX; + gScanlineEffectRegBuffers[0][DISPLAY_HEIGHT + i] = DISPLAY_WIDTH; + gScanlineEffectRegBuffers[0][DISPLAY_HEIGHT * 2 + i] = 0; + gScanlineEffectRegBuffers[0][DISPLAY_HEIGHT * 3 + i] = 256; + gScanlineEffectRegBuffers[0][DISPLAY_HEIGHT * 4 + i] = 1; } - task->tData4 = 0; - task->tData5 = 0; - task->tData6 = 7; + task->data[4] = 0; + task->data[5] = 0; + task->data[6] = 7; EnableInterrupts(INTR_FLAG_HBLANK); @@ -2645,10 +2728,10 @@ static bool8 ShredSplit_Func2(struct Task *task) memcpy(arr1, gUnknown_085C8C64, sizeof(arr1)); memcpy(arr2, gUnknown_085C8C66, sizeof(arr2)); - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; var = 0; - for (i = 0; i <= task->tData5; i++) + for (i = 0; i <= task->data[5]; i++) { for (j = 0; j < 2; j++) { @@ -2657,12 +2740,12 @@ static bool8 ShredSplit_Func2(struct Task *task) unkVar = (arr1[j]) + (arr2[k] * -(i) * 2); if (unkVar >= 0 && (unkVar != 79 || j != 1)) { - ptr4 = &gScanlineEffectRegBuffers[0][unkVar + 320]; - ptr3 = &gScanlineEffectRegBuffers[0][unkVar + 480]; - ptr1 = &gScanlineEffectRegBuffers[0][unkVar + 640]; - if (*ptr4 > 0xEF) + ptr4 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 2]; + ptr3 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 3]; + ptr1 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 4]; + if (*ptr4 >= DISPLAY_WIDTH) { - *ptr4 = 0xF0; + *ptr4 = DISPLAY_WIDTH; var++; } else @@ -2674,9 +2757,9 @@ static bool8 ShredSplit_Func2(struct Task *task) *ptr3 += *ptr1; } ptr2 = &gScanlineEffectRegBuffers[0][unkVar]; - ptr3 = &gScanlineEffectRegBuffers[0][unkVar + 160]; - *ptr2 = sTransitionStructPtr->field_14 + *ptr4; - *ptr3 = 0xF0 - *ptr4; + ptr3 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT]; + *ptr2 = sTransitionData->cameraX + *ptr4; + *ptr3 = DISPLAY_WIDTH - *ptr4; if (i == 0) break; @@ -2689,14 +2772,14 @@ static bool8 ShredSplit_Func2(struct Task *task) for (k = 0; k < 2; k++) { unkVar = (arr1[j] + 1) + (arr2[k] * -(i) * 2); - if (unkVar <= 160 && (unkVar != 80 || j != 1)) + if (unkVar <= DISPLAY_HEIGHT && (unkVar != DISPLAY_HEIGHT / 2 || j != 1)) { - ptr4 = &gScanlineEffectRegBuffers[0][unkVar + 320]; - ptr3 = &gScanlineEffectRegBuffers[0][unkVar + 480]; - ptr1 = &gScanlineEffectRegBuffers[0][unkVar + 640]; - if (*ptr4 > 0xEF) + ptr4 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 2]; + ptr3 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 3]; + ptr1 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 4]; + if (*ptr4 >= DISPLAY_WIDTH) { - *ptr4 = 0xF0; + *ptr4 = DISPLAY_WIDTH; var++; } else @@ -2708,9 +2791,9 @@ static bool8 ShredSplit_Func2(struct Task *task) *ptr3 += *ptr1; } ptr2 = &gScanlineEffectRegBuffers[0][unkVar]; - ptr3 = &gScanlineEffectRegBuffers[0][unkVar + 160]; - *ptr2 = sTransitionStructPtr->field_14 - *ptr4; - *ptr3 = (*ptr4 << 8) | (0xF1); + ptr3 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT]; + *ptr2 = sTransitionData->cameraX - *ptr4; + *ptr3 = (*ptr4 << 8) | (DISPLAY_WIDTH + 1); if (i == 0) break; @@ -2719,14 +2802,14 @@ static bool8 ShredSplit_Func2(struct Task *task) } } - if (--task->tData4 < 0) - task->tData4 = 0; - if (task->tData4 <= 0 && task->tData5 + 1 <= 20) - task->tData4 = task->tData6, task->tData5++; - if (var > 0x9F) + if (--task->data[4] < 0) + task->data[4] = 0; + if (task->data[4] <= 0 && task->data[5] + 1 <= 20) + task->data[4] = task->data[6], task->data[5]++; + if (var >= DISPLAY_HEIGHT) task->tState++; - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } @@ -2740,9 +2823,9 @@ static bool8 ShredSplit_Func3(struct Task *task) bool32 done = TRUE; u16 checkVar2 = 0xFF10; - for (i = 0; i < 0xA0; i++) + for (i = 0; i < DISPLAY_HEIGHT; i++) { - if (gScanlineEffectRegBuffers[1][i] != 0xF0 && gScanlineEffectRegBuffers[1][i] != checkVar2) + if (gScanlineEffectRegBuffers[1][i] != DISPLAY_WIDTH && gScanlineEffectRegBuffers[1][i] != checkVar2) done = FALSE; // a break statement should be put here } @@ -2752,7 +2835,7 @@ static bool8 ShredSplit_Func3(struct Task *task) return FALSE; } -static bool8 ShredSplit_Func4(struct Task *task) +static bool8 ShredSplit_End(struct Task *task) { DmaStop(0); FadeScreenBlack(); @@ -2770,28 +2853,26 @@ static void Task_Blackhole2(u8 taskId) while (sBlackhole2_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Blackhole_Func1(struct Task *task) +static bool8 Blackhole_Init(struct Task *task) { s32 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - sTransitionStructPtr->WININ = 0; - sTransitionStructPtr->WINOUT = WINOUT_WIN01_ALL; - sTransitionStructPtr->WIN0H = DISPLAY_WIDTH; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; + sTransitionData->WININ = 0; + sTransitionData->WINOUT = WINOUT_WIN01_ALL; + sTransitionData->WIN0H = DISPLAY_WIDTH; + sTransitionData->WIN0V = DISPLAY_HEIGHT; - for (i = 0; i < 0xA0; i++) - { + for (i = 0; i < DISPLAY_HEIGHT; i++) gScanlineEffectRegBuffers[1][i] = 0; - } SetVBlankCallback(VBlankCB1_BigPokeball); task->tState++; - task->tData1 = 1; - task->tData2 = 0x100; + task->data[1] = 1; + task->data[2] = 0x100; task->tFuncState = 0; return FALSE; @@ -2807,22 +2888,22 @@ static bool8 Blackhole1_Func3(struct Task *task) } else { - sTransitionStructPtr->VBlank_DMA = FALSE; - if (task->tData2 < 0x400) - task->tData2 += 0x80; - if (task->tData1 < 0xA0) - task->tData1 += (task->tData2 >> 8); - if (task->tData1 > 0xA0) - task->tData1 = 0xA0; - sub_814A014(gScanlineEffectRegBuffers[0], 0x78, 0x50, task->tData1); - if (task->tData1 == 0xA0) + sTransitionData->VBlank_DMA = FALSE; + if (task->data[2] < 1024) + task->data[2] += 128; + if (task->data[1] < DISPLAY_HEIGHT) + task->data[1] += (task->data[2] >> 8); + if (task->data[1] > DISPLAY_HEIGHT) + task->data[1] = DISPLAY_HEIGHT; + sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->data[1]); + if (task->data[1] == DISPLAY_HEIGHT) { task->tFuncState = 1; FadeScreenBlack(); } else { - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; } } @@ -2831,23 +2912,23 @@ static bool8 Blackhole1_Func3(struct Task *task) static bool8 Blackhole1_Func2(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; if (task->tFuncState == 0) { task->tFuncState++; - task->tData1 = 0x30; - task->tData6 = 0; + task->data[1] = 0x30; + task->data[6] = 0; } - task->tData1 += gUnknown_085C8C80[task->tData6]; - task->tData6 = (task->tData6 + 1) % 2; - sub_814A014(gScanlineEffectRegBuffers[0], 0x78, 0x50, task->tData1); - if (task->tData1 < 9) + task->data[1] += gUnknown_085C8C80[task->data[6]]; + task->data[6] = (task->data[6] + 1) % 2; + sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->data[1]); + if (task->data[1] < 9) { task->tState++; task->tFuncState = 0; } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } @@ -2856,43 +2937,43 @@ static bool8 Blackhole2_Func2(struct Task *task) u16 index; // should be s16 I think s16 amplitude; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; if (task->tFuncState == 0) { task->tFuncState++; - task->tData5 = 2; - task->tData6 = 2; + task->data[5] = 2; + task->data[6] = 2; } - if (task->tData1 > 0xA0) - task->tData1 = 0xA0; + if (task->data[1] > DISPLAY_HEIGHT) + task->data[1] = DISPLAY_HEIGHT; - sub_814A014(gScanlineEffectRegBuffers[0], 0x78, 0x50, task->tData1); - if (task->tData1 == 0xA0) + sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->data[1]); + if (task->data[1] == DISPLAY_HEIGHT) { DmaStop(0); FadeScreenBlack(); DestroyTask(FindTaskIdByFunc(task->func)); } - index = task->tData5; - if ((task->tData5 & 0xFF) <= 128) + index = task->data[5]; + if ((task->data[5] & 0xFF) <= 128) { - amplitude = task->tData6; - task->tData5 += 8; + amplitude = task->data[6]; + task->data[5] += 8; } else { - amplitude = task->tData6 - 1; - task->tData5 += 16; + amplitude = task->data[6] - 1; + task->data[5] += 16; } - task->tData1 += Sin(index & 0xFF, amplitude); + task->data[1] += Sin(index & 0xFF, amplitude); - if (task->tData1 <= 0) - task->tData1 = 1; - if (task->tData5 > 0xFE) - task->tData5 >>= 8, task->tData6++; + if (task->data[1] <= 0) + task->data[1] = 1; + if (task->data[5] > 0xFE) + task->data[5] >>= 8, task->data[6]++; - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } @@ -2901,17 +2982,17 @@ static void Task_RectangularSpiral(u8 taskId) while (sRectangularSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 RectangularSpiral_Func1(struct Task *task) +static bool8 RectangularSpiral_Init(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); CpuCopy16(sShrinkingBoxTileset, tileset, 0x20); CpuCopy16(sShrinkingBoxTileset + 0x70, tileset + 0x20, 0x20); - CpuFill16(0xF000, tilemap, 0x800); - LoadPalette(sFieldEffectPal_Pokeball, 0xF0, 0x20); + CpuFill16(0xF000, tilemap, BG_SCREEN_SIZE); + LoadPalette(sFieldEffectPal_Pokeball, 0xF0, sizeof(sFieldEffectPal_Pokeball)); - task->tData3 = 1; + task->data[3] = 1; task->tState++; sRectangularSpiralTransition[0].field_0 = 0; @@ -2967,7 +3048,7 @@ static bool8 RectangularSpiral_Func2(struct Task *task) var2 = var % 32; var3 = var / 32; - SOME_VRAM_STORE(tilemap, var3, var2, 0xF002); + SET_TILEMAP_TILE(tilemap, var3, var2, 0xF002); } } } @@ -2977,7 +3058,7 @@ static bool8 RectangularSpiral_Func2(struct Task *task) return FALSE; } -static bool8 RectangularSpiral_Func3(struct Task *task) +static bool8 RectangularSpiral_End(struct Task *task) { DmaStop(0); FadeScreenBlack(); @@ -3053,53 +3134,55 @@ static void Task_Groudon(u8 taskId) while (sGroudon_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Groudon_Func3(struct Task *task) +static bool8 Groudon_Init(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); LZ77UnCompVram(sGroudon_Tileset, tileset); LZ77UnCompVram(sGroudon_Tilemap, tilemap); task->tState++; - task->tData1 = 0; + task->data[1] = 0; return FALSE; } -static bool8 Groudon_Func4(struct Task *task) +static bool8 Groudon_PalettePulsate(struct Task *task) { - if (task->tData1 % 3 == 0) + if (task->data[1] % 3 == 0) { - u16 var = (task->tData1 % 30) / 3; + u16 var = (task->data[1] % 30) / 3; LoadPalette(sGroudon1_Palette + (var * 16), 0xF0, 0x20); } - if (++task->tData1 > 58) + if (++task->data[1] > 58) { task->tState++; - task->tData1 = 0; + task->data[1] = 0; } return FALSE; } -static bool8 Groudon_Func5(struct Task *task) +static bool8 Groudon_PaletteBrighten(struct Task *task) { - if (task->tData1 % 5 == 0) + if (task->data[1] % 5 == 0) { - s16 var = task->tData1 / 5; + s16 var = task->data[1] / 5; LoadPalette(sGroudon2_Palette + (var * 16), 0xF0, 0x20); } - if (++task->tData1 > 68) + if (++task->data[1] > 68) { task->tState++; - task->tData1 = 0; - task->tFrames = 30; + task->data[1] = 0; + task->tEndDelay = 30; } return FALSE; } +#undef tEndDelay + static void Task_Rayquaza(u8 taskId) { while (sRayquaza_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -3110,19 +3193,19 @@ static bool8 Rayquaza_Func3(struct Task *task) u16 *tilemap, *tileset; u16 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_CHARBASE(2) | BGCNT_SCREENBASE(26) | BGCNT_TXT256x512); GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); CpuCopy16(sRayquaza_Tileset, tileset, 0x2000); - sTransitionStructPtr->field_20 = 0; + sTransitionData->field_20 = 0; task->tState++; LoadPalette(sRayquaza_Palette + 0x50, 0xF0, 0x20); - for (i = 0; i < 160; i++) + for (i = 0; i < DISPLAY_HEIGHT; i++) { gScanlineEffectRegBuffers[0][i] = 0; gScanlineEffectRegBuffers[1][i] = 0x100; @@ -3137,23 +3220,23 @@ static bool8 Rayquaza_Func4(struct Task *task) u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - CpuCopy16(sRayquaza_Tilemap, tilemap, 0x1000); + CpuCopy16(sRayquaza_Tilemap, tilemap, sizeof(sRayquaza_Tilemap)); task->tState++; return FALSE; } static bool8 Rayquaza_Func5(struct Task *task) { - if ((task->tData1 % 4) == 0) + if ((task->data[1] % 4) == 0) { - u16 value = task->tData1 / 4; + u16 value = task->data[1] / 4; const u16 *palPtr = &sRayquaza_Palette[(value + 5) * 16]; LoadPalette(palPtr, 0xF0, 0x20); } - if (++task->tData1 > 40) + if (++task->data[1] > 40) { task->tState++; - task->tData1 = 0; + task->data[1] = 0; } return FALSE; @@ -3161,11 +3244,11 @@ static bool8 Rayquaza_Func5(struct Task *task) static bool8 Rayquaza_Func6(struct Task *task) { - if (++task->tData1 > 20) + if (++task->data[1] > 20) { task->tState++; - task->tData1 = 0; - BeginNormalPaletteFade(PALETTES_OBJECTS | 0x8000, 2, 0, 0x10, RGB_BLACK); + task->data[1] = 0; + BeginNormalPaletteFade(PALETTES_OBJECTS | (1 << 15), 2, 0, 16, RGB_BLACK); } return FALSE; @@ -3175,7 +3258,7 @@ static bool8 Rayquaza_Func7(struct Task *task) { if (!gPaletteFade.active) { - sTransitionStructPtr->field_20 = 1; + sTransitionData->field_20 = 1; task->tState++; } @@ -3184,8 +3267,8 @@ static bool8 Rayquaza_Func7(struct Task *task) static bool8 Rayquaza_Func8(struct Task *task) { - BlendPalettes(PALETTES_BG & ~(0x8000), 8, 0); - BlendPalettes(PALETTES_OBJECTS | 0x8000, 0, 0); + BlendPalettes(PALETTES_BG & ~(1 << 15), 8, RGB_BLACK); + BlendPalettes(PALETTES_OBJECTS | (1 << 15), 0, RGB_BLACK); task->tState++; return FALSE; @@ -3193,29 +3276,27 @@ static bool8 Rayquaza_Func8(struct Task *task) static bool8 Rayquaza_Func9(struct Task *task) { - if ((task->tData1 % 3) == 0) + if ((task->data[1] % 3) == 0) { - u16 value = task->tData1 / 3; + u16 value = task->data[1] / 3; const u16 *palPtr = &sRayquaza_Palette[(value + 0) * 16]; LoadPalette(palPtr, 0xF0, 0x20); } - if (++task->tData1 >= 40) + if (++task->data[1] >= 40) { u16 i; - sTransitionStructPtr->WININ = 0; - sTransitionStructPtr->WINOUT = WINOUT_WIN01_ALL; - sTransitionStructPtr->WIN0H = DISPLAY_WIDTH; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; + sTransitionData->WININ = 0; + sTransitionData->WINOUT = WINOUT_WIN01_ALL; + sTransitionData->WIN0H = DISPLAY_WIDTH; + sTransitionData->WIN0V = DISPLAY_HEIGHT; - for (i = 0; i < 160; i++) - { + for (i = 0; i < DISPLAY_HEIGHT; i++) gScanlineEffectRegBuffers[1][i] = 0; - } SetVBlankCallback(VBlankCB1_BigPokeball); task->tState++; - task->tData2 = 0x100; + task->data[2] = 0x100; task->tFuncState = 0; ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG0_ON); } @@ -3230,14 +3311,14 @@ static void VBlankCB_Rayquaza(void) DmaStop(0); VBlankCB_BattleTransition(); - if (sTransitionStructPtr->field_20 == 0) + if (sTransitionData->field_20 == 0) dmaSrc = gScanlineEffectRegBuffers[0]; - else if (sTransitionStructPtr->field_20 == 1) + else if (sTransitionData->field_20 == 1) dmaSrc = gScanlineEffectRegBuffers[1]; else dmaSrc = gScanlineEffectRegBuffers[0]; - DmaSet(0, dmaSrc, ®_BG0VOFS, 0xA2400001); + DmaSet(0, dmaSrc, ®_BG0VOFS, B_TRANS_DMA_FLAGS); } static void Task_WhiteFade(u8 taskId) @@ -3245,23 +3326,23 @@ static void Task_WhiteFade(u8 taskId) while (sWhiteFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 WhiteFade_Func1(struct Task *task) +static bool8 WhiteFade_Init(struct Task *task) { u16 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - sTransitionStructPtr->BLDCNT = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN; - sTransitionStructPtr->BLDY = 0; - sTransitionStructPtr->WININ = WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3 | WININ_WIN0_OBJ; - sTransitionStructPtr->WINOUT = WINOUT_WIN01_ALL; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; + sTransitionData->BLDCNT = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN; + sTransitionData->BLDY = 0; + sTransitionData->WININ = WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3 | WININ_WIN0_OBJ; + sTransitionData->WINOUT = WINOUT_WIN01_ALL; + sTransitionData->WIN0V = DISPLAY_HEIGHT; - for (i = 0; i < 160; i++) + for (i = 0; i < DISPLAY_HEIGHT; i++) { gScanlineEffectRegBuffers[1][i] = 0; - gScanlineEffectRegBuffers[1][i + 160] = 0xF0; + gScanlineEffectRegBuffers[1][i + DISPLAY_HEIGHT] = DISPLAY_WIDTH; } EnableInterrupts(INTR_FLAG_HBLANK); @@ -3279,10 +3360,10 @@ static bool8 WhiteFade_Func2(struct Task *task) struct Sprite *sprite; memcpy(arr1, sUnknown_085C8DA0, sizeof(sUnknown_085C8DA0)); - for (i = 0, posY = 0; i < 8; i++, posY += 0x14) + for (i = 0, posY = 0; i < 8; i++, posY += 20) { sprite = &gSprites[CreateInvisibleSprite(sub_8149864)]; - sprite->x = 0xF0; + sprite->x = DISPLAY_WIDTH; sprite->y = posY; sprite->data[5] = arr1[i]; } @@ -3294,10 +3375,10 @@ static bool8 WhiteFade_Func2(struct Task *task) static bool8 WhiteFade_Func3(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = 0; - if (sTransitionStructPtr->field_20 > 7) + sTransitionData->VBlank_DMA = 0; + if (sTransitionData->field_20 > 7) { - BlendPalettes(PALETTES_ALL, 0x10, 0x7FFF); + BlendPalettes(PALETTES_ALL, 16, RGB_WHITE); task->tState++; } return FALSE; @@ -3305,16 +3386,16 @@ static bool8 WhiteFade_Func3(struct Task *task) static bool8 WhiteFade_Func4(struct Task *task) { - sTransitionStructPtr->VBlank_DMA = 0; + sTransitionData->VBlank_DMA = 0; DmaStop(0); SetVBlankCallback(0); SetHBlankCallback(0); - sTransitionStructPtr->WIN0H = DISPLAY_WIDTH; - sTransitionStructPtr->BLDY = 0; - sTransitionStructPtr->BLDCNT = 0xFF; - sTransitionStructPtr->WININ = WININ_WIN0_ALL; + sTransitionData->WIN0H = DISPLAY_WIDTH; + sTransitionData->BLDY = 0; + sTransitionData->BLDCNT = 0xFF; + sTransitionData->WININ = WININ_WIN0_ALL; SetVBlankCallback(VBlankCB1_WhiteFade); @@ -3322,9 +3403,9 @@ static bool8 WhiteFade_Func4(struct Task *task) return FALSE; } -static bool8 WhiteFade_Func5(struct Task *task) +static bool8 WhiteFade_End(struct Task *task) { - if (++sTransitionStructPtr->BLDY > 16) + if (++sTransitionData->BLDY > 16) { FadeScreenBlack(); DestroyTask(FindTaskIdByFunc(Task_WhiteFade)); @@ -3336,24 +3417,24 @@ static void VBlankCB0_WhiteFade(void) { DmaStop(0); VBlankCB_BattleTransition(); - REG_BLDCNT = sTransitionStructPtr->BLDCNT; - REG_WININ = sTransitionStructPtr->WININ; - REG_WINOUT = sTransitionStructPtr->WINOUT; - REG_WIN0V = sTransitionStructPtr->WIN0V; - if (sTransitionStructPtr->VBlank_DMA) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 640); - DmaSet(0, &gScanlineEffectRegBuffers[1][160], ®_WIN0H, 0xA2400001); + REG_BLDCNT = sTransitionData->BLDCNT; + REG_WININ = sTransitionData->WININ; + REG_WINOUT = sTransitionData->WINOUT; + REG_WIN0V = sTransitionData->WIN0V; + if (sTransitionData->VBlank_DMA) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 4); + DmaSet(0, &gScanlineEffectRegBuffers[1][DISPLAY_HEIGHT], ®_WIN0H, B_TRANS_DMA_FLAGS); } static void VBlankCB1_WhiteFade(void) { VBlankCB_BattleTransition(); - REG_BLDY = sTransitionStructPtr->BLDY; - REG_BLDCNT = sTransitionStructPtr->BLDCNT; - REG_WININ = sTransitionStructPtr->WININ; - REG_WINOUT = sTransitionStructPtr->WINOUT; - REG_WIN0H = sTransitionStructPtr->WIN0H; - REG_WIN0V = sTransitionStructPtr->WIN0V; + REG_BLDY = sTransitionData->BLDY; + REG_BLDCNT = sTransitionData->BLDCNT; + REG_WININ = sTransitionData->WININ; + REG_WINOUT = sTransitionData->WINOUT; + REG_WIN0H = sTransitionData->WIN0H; + REG_WIN0V = sTransitionData->WIN0V; } static void HBlankCB_WhiteFade(void) @@ -3367,13 +3448,13 @@ static void sub_8149864(struct Sprite *sprite) { sprite->data[5]--; if (sprite->data[6]) - sTransitionStructPtr->VBlank_DMA = 1; + sTransitionData->VBlank_DMA = 1; } else { u16 i; u16* ptr1 = &gScanlineEffectRegBuffers[0][sprite->y]; - u16* ptr2 = &gScanlineEffectRegBuffers[0][sprite->y + 160]; + u16* ptr2 = &gScanlineEffectRegBuffers[0][sprite->y + DISPLAY_HEIGHT]; for (i = 0; i < 20; i++) { ptr1[i] = sprite->data[0] >> 8; @@ -3391,13 +3472,13 @@ static void sub_8149864(struct Sprite *sprite) sprite->data[0] = 0x1000; if (sprite->data[6]) - sTransitionStructPtr->VBlank_DMA = 1; + sTransitionData->VBlank_DMA = 1; if (sprite->data[1]) { - if (sprite->data[6] == 0 || (sTransitionStructPtr->field_20 > 6 && sprite->data[2]++ > 7)) + if (sprite->data[6] == 0 || (sTransitionData->field_20 > 6 && sprite->data[2]++ > 7)) { - sTransitionStructPtr->field_20++; + sTransitionData->field_20++; DestroySprite(sprite); } } @@ -3409,14 +3490,14 @@ static void Task_GridSquares(u8 taskId) while (sGridSquares_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 GridSquares_Func1(struct Task *task) +static bool8 GridSquares_Init(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - CpuSet(sShrinkingBoxTileset, tileset, 0x10); - CpuFill16(0xF000, tilemap, 0x800); - LoadPalette(sFieldEffectPal_Pokeball, 0xF0, 0x20); + CpuSet(sShrinkingBoxTileset, tileset, 16); + CpuFill16(0xF000, tilemap, BG_SCREEN_SIZE); + LoadPalette(sFieldEffectPal_Pokeball, 0xF0, sizeof(sFieldEffectPal_Pokeball)); task->tState++; return FALSE; @@ -3426,26 +3507,26 @@ static bool8 GridSquares_Func2(struct Task *task) { u16* tileset; - if (task->tData1 == 0) + if (task->data[1] == 0) { GetBg0TilemapDst(&tileset); - task->tData1 = 3; - task->tData2++; - CpuSet(sShrinkingBoxTileset + (task->tData2 * 8), tileset, 0x10); - if (task->tData2 > 0xD) + task->data[1] = 3; + task->data[2]++; + CpuSet(sShrinkingBoxTileset + (task->data[2] * 8), tileset, 16); + if (task->data[2] > 13) { task->tState++; - task->tData1 = 16; + task->data[1] = 16; } } - task->tData1--; + task->data[1]--; return FALSE; } -static bool8 GridSquares_Func3(struct Task *task) +static bool8 GridSquares_End(struct Task *task) { - if (--task->tData1 == 0) + if (--task->data[1] == 0) { FadeScreenBlack(); DestroyTask(FindTaskIdByFunc(Task_GridSquares)); @@ -3458,23 +3539,21 @@ static void Task_Shards(u8 taskId) while (sShards_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Shards_Func1(struct Task *task) +static bool8 Shards_Init(struct Task *task) { u16 i; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); - sTransitionStructPtr->WININ = WININ_WIN0_ALL; - sTransitionStructPtr->WINOUT = 0; - sTransitionStructPtr->WIN0V = DISPLAY_HEIGHT; + sTransitionData->WININ = WININ_WIN0_ALL; + sTransitionData->WINOUT = 0; + sTransitionData->WIN0V = DISPLAY_HEIGHT; - for (i = 0; i < 160; i++) - { - gScanlineEffectRegBuffers[0][i] = 0xF0; - } + for (i = 0; i < DISPLAY_HEIGHT; i++) + gScanlineEffectRegBuffers[0][i] = DISPLAY_WIDTH; - CpuSet(gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 0xA0); + CpuSet(gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT); SetVBlankCallback(VBlankCB_Shards); task->tState++; @@ -3483,13 +3562,13 @@ static bool8 Shards_Func1(struct Task *task) static bool8 Shards_Func2(struct Task *task) { - sub_814A1AC(sTransitionStructPtr->data, - sUnknown_085C8DD0[task->tData1][0], - sUnknown_085C8DD0[task->tData1][1], - sUnknown_085C8DD0[task->tData1][2], - sUnknown_085C8DD0[task->tData1][3], + sub_814A1AC(sTransitionData->data, + sUnknown_085C8DD0[task->data[1]][0], + sUnknown_085C8DD0[task->data[1]][1], + sUnknown_085C8DD0[task->data[1]][2], + sUnknown_085C8DD0[task->data[1]][3], 1, 1); - task->tData2 = sUnknown_085C8DD0[task->tData1][4]; + task->data[2] = sUnknown_085C8DD0[task->data[1]][4]; task->tState++; return TRUE; } @@ -3499,46 +3578,46 @@ static bool8 Shards_Func3(struct Task *task) s16 i; bool8 nextFunc; - sTransitionStructPtr->VBlank_DMA = 0; + sTransitionData->VBlank_DMA = 0; for (i = 0, nextFunc = FALSE; i < 16; i++) { - s16 r3 = gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] >> 8; - s16 r4 = gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] & 0xFF; - if (task->tData2 == 0) + s16 r3 = gScanlineEffectRegBuffers[0][sTransitionData->data[3]] >> 8; + s16 r4 = gScanlineEffectRegBuffers[0][sTransitionData->data[3]] & 0xFF; + if (task->data[2] == 0) { - if (r3 < sTransitionStructPtr->data[2]) - r3 = sTransitionStructPtr->data[2]; + if (r3 < sTransitionData->data[2]) + r3 = sTransitionData->data[2]; if (r3 > r4) r3 = r4; } else { - if (r4 > sTransitionStructPtr->data[2]) - r4 = sTransitionStructPtr->data[2]; + if (r4 > sTransitionData->data[2]) + r4 = sTransitionData->data[2]; if (r4 <= r3) r4 = r3; } - gScanlineEffectRegBuffers[0][sTransitionStructPtr->data[3]] = (r4) | (r3 << 8); + gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (r4) | (r3 << 8); if (nextFunc) { task->tState++; break; } else - nextFunc = sub_814A228(sTransitionStructPtr->data, 1, 1); + nextFunc = sub_814A228(sTransitionData->data, 1, 1); } - sTransitionStructPtr->VBlank_DMA++; + sTransitionData->VBlank_DMA++; return FALSE; } static bool8 Shards_Func4(struct Task *task) { - if (++task->tData1 < 7) + if (++task->data[1] < 7) { task->tState++; - task->tData3 = sUnknown_085C8E16[task->tData1 - 1]; + task->data[3] = sUnknown_085C8E16[task->data[1] - 1]; return TRUE; } else @@ -3552,7 +3631,7 @@ static bool8 Shards_Func4(struct Task *task) static bool8 Shards_Func5(struct Task *task) { - if (--task->tData3 == 0) + if (--task->data[3] == 0) { task->tState = 1; return TRUE; @@ -3565,46 +3644,29 @@ static void VBlankCB_Shards(void) { DmaStop(0); VBlankCB_BattleTransition(); - if (sTransitionStructPtr->VBlank_DMA) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); - REG_WININ = sTransitionStructPtr->WININ; - REG_WINOUT = sTransitionStructPtr->WINOUT; - REG_WIN0V = sTransitionStructPtr->WIN0V; + if (sTransitionData->VBlank_DMA) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); + REG_WININ = sTransitionData->WININ; + REG_WINOUT = sTransitionData->WINOUT; + REG_WIN0V = sTransitionData->WIN0V; REG_WIN0H = gScanlineEffectRegBuffers[1][0]; - DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, 0xA2400001); + DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } -// sub-task for phase2 -#undef tData1 -#undef tData2 -#undef tData3 -#undef tData4 -#undef tData5 -#undef tData6 #undef tFuncState -#undef tFrames #undef tOpponentSpriteId #undef tPlayerSpriteId #undef tMugshotId -// sub-task for sub-task phase -#define tData1 data[1] -#define tData2 data[2] -#define tData3 data[3] -#define tData4 data[4] -#define tData5 data[5] -#define tData6 data[6] -#define tData7 data[7] - static void CreateIntroTask(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4) { u8 taskId = CreateTask(Task_BattleTransition_Intro, 3); - gTasks[taskId].tData1 = a0; - gTasks[taskId].tData2 = a1; - gTasks[taskId].tData3 = a2; - gTasks[taskId].tData4 = a3; - gTasks[taskId].tData5 = a4; - gTasks[taskId].tData6 = a0; + gTasks[taskId].data[1] = a0; + gTasks[taskId].data[2] = a1; + gTasks[taskId].data[3] = a2; + gTasks[taskId].data[4] = a3; + gTasks[taskId].data[5] = a4; + gTasks[taskId].data[6] = a0; } static bool8 IsIntroTaskDone(void) @@ -3622,57 +3684,49 @@ void Task_BattleTransition_Intro(u8 taskId) static bool8 Transition_Intro_1(struct Task *task) { - if (task->tData6 == 0 || --task->tData6 == 0) + if (task->data[6] == 0 || --task->data[6] == 0) { - task->tData6 = task->tData1; - task->tData7 += task->tData4; - if (task->tData7 > 16) - task->tData7 = 16; - BlendPalettes(PALETTES_ALL, task->tData7, 0x2D6B); + task->data[6] = task->data[1]; + task->data[7] += task->data[4]; + if (task->data[7] > 16) + task->data[7] = 16; + BlendPalettes(PALETTES_ALL, task->data[7], RGB(11, 11, 11)); } - if (task->tData7 > 15) + if (task->data[7] > 15) { task->tState++; - task->tData6 = task->tData2; + task->data[6] = task->data[2]; } return FALSE; } static bool8 Transition_Intro_2(struct Task *task) { - if (task->tData6 == 0 || --task->tData6 == 0) + if (task->data[6] == 0 || --task->data[6] == 0) { - task->tData6 = task->tData2; - task->tData7 -= task->tData5; - if (task->tData7 < 0) - task->tData7 = 0; - BlendPalettes(PALETTES_ALL, task->tData7, 0x2D6B); + task->data[6] = task->data[2]; + task->data[7] -= task->data[5]; + if (task->data[7] < 0) + task->data[7] = 0; + BlendPalettes(PALETTES_ALL, task->data[7], RGB(11, 11, 11)); } - if (task->tData7 == 0) + if (task->data[7] == 0) { - if (--task->tData3 == 0) + if (--task->data[3] == 0) DestroyTask(FindTaskIdByFunc(Task_BattleTransition_Intro)); else { - task->tData6 = task->tData1; + task->data[6] = task->data[1]; task->tState = 0; } } return FALSE; } -#undef tData1 -#undef tData2 -#undef tData3 -#undef tData4 -#undef tData5 -#undef tData6 -#undef tData7 - -static void InitTransitionStructVars(void) +static void InitTransitionData(void) { - memset(sTransitionStructPtr, 0, sizeof(*sTransitionStructPtr)); - GetCameraOffsetWithPan(&sTransitionStructPtr->field_14, &sTransitionStructPtr->field_16); + memset(sTransitionData, 0, sizeof(*sTransitionData)); + GetCameraOffsetWithPan(&sTransitionData->cameraX, &sTransitionData->cameraY); } static void VBlankCB_BattleTransition(void) @@ -3685,7 +3739,7 @@ static void VBlankCB_BattleTransition(void) static void GetBg0TilemapDst(u16 **tileset) { u16 charBase = REG_BG0CNT >> 2; - charBase <<= 0xE; + charBase <<= 14; *tileset = (u16*)(VRAM + charBase); } @@ -3694,8 +3748,8 @@ void GetBg0TilesDst(u16 **tilemap, u16 **tileset) u16 screenBase = REG_BG0CNT >> 8; u16 charBase = REG_BG0CNT >> 2; - screenBase <<= 0xB; - charBase <<= 0xE; + screenBase <<= 11; + charBase <<= 14; *tilemap = (u16*)(VRAM + screenBase); *tileset = (u16*)(VRAM + charBase); @@ -3706,54 +3760,52 @@ static void FadeScreenBlack(void) BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); } -static void sub_8149F98(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, s16 amplitude, s16 arrSize) +static void SetSinWave(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, s16 amplitude, s16 arrSize) { u8 i; for (i = 0; arrSize > 0; arrSize--, i++, index += indexIncrementer) - { - array[i] = sinAdd + Sin(0xFF & index, amplitude); - } + array[i] = sinAdd + Sin(index & 0xFF, amplitude); } -static void sub_814A014(u16 *array, s16 a1, s16 a2, s16 a3) +static void sub_814A014(u16 *array, s16 x, s16 y, s16 amplitude) { s16 i; - memset(array, 0xA, 160 * sizeof(s16)); + memset(array, 10, DISPLAY_HEIGHT * sizeof(s16)); for (i = 0; i < 64; i++) { s16 sinResult, cosResult; s16 toStoreOrr, r2, r3, toStore, r7, r8; - sinResult = Sin(i, a3); - cosResult = Cos(i, a3); + sinResult = Sin(i, amplitude); + cosResult = Cos(i, amplitude); - toStoreOrr = a1 - sinResult; - toStore = a1 + sinResult; - r7 = a2 - cosResult; - r8 = a2 + cosResult; + toStoreOrr = x - sinResult; + toStore = x + sinResult; + r7 = y - cosResult; + r8 = y + cosResult; if (toStoreOrr < 0) toStoreOrr = 0; - if (toStore > 0xF0) - toStore = 0xF0; + if (toStore > DISPLAY_WIDTH) + toStore = DISPLAY_WIDTH; if (r7 < 0) r7 = 0; - if (r8 > 0x9F) - r8 = 0x9F; + if (r8 > DISPLAY_HEIGHT - 1) + r8 = DISPLAY_HEIGHT - 1; toStore |= (toStoreOrr << 8); array[r7] = toStore; array[r8] = toStore; - cosResult = Cos(i + 1, a3); - r3 = a2 - cosResult; - r2 = a2 + cosResult; + cosResult = Cos(i + 1, amplitude); + r3 = y - cosResult; + r2 = y + cosResult; if (r3 < 0) r3 = 0; - if (r2 > 0x9F) - r2 = 0x9F; + if (r2 > DISPLAY_HEIGHT - 1) + r2 = DISPLAY_HEIGHT - 1; while (r7 > r3) array[--r7] = toStore; @@ -3835,36 +3887,27 @@ static bool8 sub_814A228(s16 *data, bool8 a1, bool8 a2) return FALSE; } -// sub-task for phase2 of a couple of new transitions -#define tData1 data[1] -#define tData2 data[2] -#define tData3 data[3] -#define tData4 data[4] -#define tData5 data[5] -#define tData6 data[6] -#define tData7 data[7] - -static bool8 FrontierLogoWiggle_Func1(struct Task *task) +static bool8 FrontierLogoWiggle_Init(struct Task *task) { u16 *tilemap, *tileset; - sub_814669C(task); + InitPatternWeaveTransition(task); GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); LZ77UnCompVram(sFrontierLogo_Tileset, tileset); - LoadPalette(sFrontierLogo_Palette, 0xF0, 0x20); + LoadPalette(sFrontierLogo_Palette, 0xF0, sizeof(sFrontierLogo_Palette)); task->tState++; return FALSE; } -static bool8 FrontierLogoWiggle_Func2(struct Task *task) +static bool8 FrontierLogoWiggle_SetGfx(struct Task *task) { u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); LZ77UnCompVram(sFrontierLogo_Tilemap, tilemap); - sub_8149F98(gScanlineEffectRegBuffers[0], 0, task->tData4, 0x84, task->tData5, 160); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->data[4], 0x84, task->data[5], DISPLAY_HEIGHT); task->tState++; return TRUE; @@ -3880,33 +3923,33 @@ static void Task_FrontierLogoWave(u8 taskId) while (sFrontierLogoWave_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 FrontierLogoWave_Func1(struct Task *task) +static bool8 FrontierLogoWave_Init(struct Task *task) { u16 *tilemap, *tileset; - InitTransitionStructVars(); + InitTransitionData(); ScanlineEffect_Clear(); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON); - task->tData2 = 0x2000; - task->tData1 = 0x7FFF; - task->tData5 = 0; - task->tData6 = 16; - task->tData7 = 2560; - sTransitionStructPtr->BLDCNT = BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL; - sTransitionStructPtr->BLDALPHA = BLDALPHA_BLEND(task->tData5, task->tData6); - REG_BLDCNT = sTransitionStructPtr->BLDCNT; - REG_BLDALPHA = sTransitionStructPtr->BLDALPHA; + task->data[2] = 0x2000; + task->data[1] = 0x7FFF; + task->data[5] = 0; + task->data[6] = 16; + task->data[7] = 2560; + sTransitionData->BLDCNT = BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL; + sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->data[5], task->data[6]); + REG_BLDCNT = sTransitionData->BLDCNT; + REG_BLDALPHA = sTransitionData->BLDALPHA; GetBg0TilesDst(&tilemap, &tileset); - CpuFill16(0, tilemap, 0x800); + CpuFill16(0, tilemap, BG_SCREEN_SIZE); LZ77UnCompVram(sFrontierLogo_Tileset, tileset); - LoadPalette(sFrontierLogo_Palette, 0xF0, 0x20); - sTransitionStructPtr->field_16 = 0; + LoadPalette(sFrontierLogo_Palette, 0xF0, sizeof(sFrontierLogo_Palette)); + sTransitionData->cameraY = 0; task->tState++; return FALSE; } -static bool8 FrontierLogoWave_Func2(struct Task *task) +static bool8 FrontierLogoWave_SetGfx(struct Task *task) { u16 *tilemap, *tileset; @@ -3921,13 +3964,11 @@ static bool8 FrontierLogoWave_Func3(struct Task *task) { u8 i; - for (i = 0; i < 160; i++) - { - gScanlineEffectRegBuffers[1][i] = sTransitionStructPtr->field_16; - } + for (i = 0; i < DISPLAY_HEIGHT; i++) + gScanlineEffectRegBuffers[1][i] = sTransitionData->cameraY; - SetVBlankCallback(VBlankCB_30); - SetHBlankCallback(HBlankCB_30); + SetVBlankCallback(VBlankCB_FrontierLogoWave); + SetHBlankCallback(HBlankCB_FrontierLogoWave); EnableInterrupts(INTR_FLAG_HBLANK); task->tState++; @@ -3939,63 +3980,63 @@ static bool8 FrontierLogoWave_Func4(struct Task *task) u8 i; u16 var6, amplitude, var8; - sTransitionStructPtr->VBlank_DMA = FALSE; + sTransitionData->VBlank_DMA = FALSE; - amplitude = task->tData2 >> 8; - var6 = task->tData1; + amplitude = task->data[2] >> 8; + var6 = task->data[1]; var8 = 384; - task->tData1 = var6 - task->tData7; + task->data[1] = var6 - task->data[7]; - if (task->tData3 >= 70) + if (task->data[3] >= 70) { - if (task->tData2 - 384 >= 0) - task->tData2 -= 384; + if (task->data[2] - 384 >= 0) + task->data[2] -= 384; else - task->tData2 = 0; + task->data[2] = 0; } - if (task->tData3 >= 0 && task->tData3 % 3 == 0) + if (task->data[3] >= 0 && task->data[3] % 3 == 0) { - if (task->tData5 < 16) - task->tData5++; - else if (task->tData6 > 0) - task->tData6--; + if (task->data[5] < 16) + task->data[5]++; + else if (task->data[6] > 0) + task->data[6]--; - sTransitionStructPtr->BLDALPHA = BLDALPHA_BLEND(task->tData5, task->tData6); + sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->data[5], task->data[6]); } - for (i = 0; i < 160; i++, var6 += var8) + for (i = 0; i < DISPLAY_HEIGHT; i++, var6 += var8) { s16 index = var6 / 256; - gScanlineEffectRegBuffers[0][i] = sTransitionStructPtr->field_16 + Sin(index & 0xff, amplitude); + gScanlineEffectRegBuffers[0][i] = sTransitionData->cameraY + Sin(index & 0xff, amplitude); } - if (++task->tData3 == 101) + if (++task->data[3] == 101) { - task->tData4++; - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); + task->data[4]++; + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); } - if (task->tData4 != 0 && !gPaletteFade.active) + if (task->data[4] != 0 && !gPaletteFade.active) DestroyTask(FindTaskIdByFunc(Task_FrontierLogoWave)); - task->tData7 -= 17; - sTransitionStructPtr->VBlank_DMA++; + task->data[7] -= 17; + sTransitionData->VBlank_DMA++; return FALSE; } -static void VBlankCB_30(void) +static void VBlankCB_FrontierLogoWave(void) { VBlankCB_BattleTransition(); - REG_BLDCNT = sTransitionStructPtr->BLDCNT; - REG_BLDALPHA = sTransitionStructPtr->BLDALPHA; + REG_BLDCNT = sTransitionData->BLDCNT; + REG_BLDALPHA = sTransitionData->BLDALPHA; - if (sTransitionStructPtr->VBlank_DMA) - DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], 320); + if (sTransitionData->VBlank_DMA) + DmaCopy16(3, gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); } -static void HBlankCB_30(void) +static void HBlankCB_FrontierLogoWave(void) { u16 var = gScanlineEffectRegBuffers[1][REG_VCOUNT]; REG_BG0VOFS = var; @@ -4016,7 +4057,7 @@ static void Task_FrontierSquaresScroll(u8 taskId) while (sFrontierSquaresScroll_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 FrontierSquares_Func1(struct Task *task) +static bool8 FrontierSquares_Init(struct Task *task) { u16 *tilemap, *tileset; @@ -4027,12 +4068,12 @@ static bool8 FrontierSquares_Func1(struct Task *task) FillBgTilemapBufferRect(0, 1, 0, 0, 1, 0x20, 0xF); FillBgTilemapBufferRect(0, 1, 0x1D, 0, 1, 0x20, 0xF); CopyBgTilemapBufferToVram(0); - LoadPalette(sFrontierSquares_Palette, 0xF0, 0x20); + LoadPalette(sFrontierSquares_Palette, 0xF0, sizeof(sFrontierSquares_Palette)); - task->tData2 = 1; - task->tData3 = 0; - task->tData4 = 0; - task->tData7 = 10; + task->data[2] = 1; + task->data[3] = 0; + task->data[4] = 0; + task->data[7] = 10; task->tState++; return FALSE; @@ -4040,16 +4081,16 @@ static bool8 FrontierSquares_Func1(struct Task *task) static bool8 FrontierSquares_Func2(struct Task *task) { - CopyRectToBgTilemapBufferRect(0, sFrontierSquares_Tilemap, 0, 0, 4, 4, task->tData2, task->tData3, 4, 4, 0xF, 0, 0); + CopyRectToBgTilemapBufferRect(0, sFrontierSquares_Tilemap, 0, 0, 4, 4, task->data[2], task->data[3], 4, 4, 0xF, 0, 0); CopyBgTilemapBufferToVram(0); - task->tData2 += 4; - if (++task->tData4 == 7) + task->data[2] += 4; + if (++task->data[4] == 7) { - task->tData2 = 1; - task->tData3 += 4; - task->tData4 = 0; - if (task->tData3 > 19) + task->data[2] = 1; + task->data[3] += 4; + task->data[4] = 0; + if (task->data[3] > 19) task->tState++; } @@ -4062,9 +4103,9 @@ static bool8 FrontierSquares_Func3(struct Task *task) u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - if (task->tData6++ >= task->tData7) + if (task->data[6]++ >= task->data[7]) { - switch (task->tData5) + switch (task->data[5]) { case 0: for (i = 250; i < 255; i++) @@ -4074,7 +4115,7 @@ static bool8 FrontierSquares_Func3(struct Task *task) } break; case 1: - BlendPalettes(PALETTES_ALL & ~(0x8000), 0x10, 0); + BlendPalettes(PALETTES_ALL & ~(1 << 15), 16, RGB_BLACK); LZ77UnCompVram(sFrontierSquares_EmptyBg_Tileset, tileset); break; case 2: @@ -4090,14 +4131,14 @@ static bool8 FrontierSquares_Func3(struct Task *task) return FALSE; } - task->tData6 = 0; - task->tData5++; + task->data[6] = 0; + task->data[5]++; } return FALSE; } -static bool8 FrontierSquaresSpiral_Func1(struct Task *task) +static bool8 FrontierSquaresSpiral_Init(struct Task *task) { u16 *tilemap, *tileset; @@ -4108,12 +4149,12 @@ static bool8 FrontierSquaresSpiral_Func1(struct Task *task) FillBgTilemapBufferRect(0, 1, 0, 0, 1, 0x20, 0xF); FillBgTilemapBufferRect(0, 1, 0x1D, 0, 1, 0x20, 0xF); CopyBgTilemapBufferToVram(0); - LoadPalette(sFrontierSquares_Palette, 0xE0, 0x20); - LoadPalette(sFrontierSquares_Palette, 0xF0, 0x20); - BlendPalette(0xE0, 0x10, 8, 0); + LoadPalette(sFrontierSquares_Palette, 0xE0, sizeof(sFrontierSquares_Palette)); + LoadPalette(sFrontierSquares_Palette, 0xF0, sizeof(sFrontierSquares_Palette)); + BlendPalette(0xE0, 16, 8, 0); - task->tData2 = 34; - task->tData3 = 0; + task->data[2] = 34; + task->data[3] = 0; task->tState++; return FALSE; @@ -4121,24 +4162,24 @@ static bool8 FrontierSquaresSpiral_Func1(struct Task *task) static bool8 FrontierSquaresSpiral_Func2(struct Task *task) { - u8 var = gUnknown_085C9A30[task->tData2]; + u8 var = gUnknown_085C9A30[task->data[2]]; u8 varMod = var % 7; u8 varDiv = var / 7; CopyRectToBgTilemapBufferRect(0, &sFrontierSquares_Tilemap, 0, 0, 4, 4, 4 * varMod + 1, 4 * varDiv, 4, 4, 0xF, 0, 0); CopyBgTilemapBufferToVram(0); - if (--task->tData2 < 0) + if (--task->data[2] < 0) task->tState++; return FALSE; } static bool8 FrontierSquaresSpiral_Func3(struct Task *task) { - BlendPalette(0xE0, 0x10, 3, 0); - BlendPalettes(PALETTES_ALL & ~(0x8000 | 0x4000), 0x10, 0); + BlendPalette(0xE0, 16, 3, 0); + BlendPalettes(PALETTES_ALL & ~(1 << 15 | 1 << 14), 16, RGB_BLACK); - task->tData2 = 0; - task->tData3 = 0; + task->data[2] = 0; + task->data[3] = 0; task->tState++; return FALSE; @@ -4146,7 +4187,7 @@ static bool8 FrontierSquaresSpiral_Func3(struct Task *task) static bool8 FrontierSquaresSpiral_Func4(struct Task *task) { - if ((task->tData3 ^= 1)) + if ((task->data[3] ^= 1)) { CopyRectToBgTilemapBufferRect( 0, @@ -4155,8 +4196,8 @@ static bool8 FrontierSquaresSpiral_Func4(struct Task *task) 0, 4, 4, - 4 * (gUnknown_085C9A30[task->tData2] % 7) + 1, - 4 * (gUnknown_085C9A30[task->tData2] / 7), + 4 * (gUnknown_085C9A30[task->data[2]] % 7) + 1, + 4 * (gUnknown_085C9A30[task->data[2]] / 7), 4, 4, 0xE, @@ -4165,22 +4206,22 @@ static bool8 FrontierSquaresSpiral_Func4(struct Task *task) } else { - if (task->tData2 > 0) + if (task->data[2] > 0) { FillBgTilemapBufferRect( 0, 1, - 4 * (gUnknown_085C9A30[task->tData2 - 1] % 7) + 1, - 4 * (gUnknown_085C9A30[task->tData2 - 1] / 7), + 4 * (gUnknown_085C9A30[task->data[2] - 1] % 7) + 1, + 4 * (gUnknown_085C9A30[task->data[2] - 1] / 7), 4, 4, 0xF); } - task->tData2++; + task->data[2]++; } - if (task->tData2 > 34) + if (task->data[2] > 34) task->tState++; CopyBgTilemapBufferToVram(0); @@ -4191,7 +4232,7 @@ static bool8 FrontierSquares_End(struct Task *task) { FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 0x20, 0x20); CopyBgTilemapBufferToVram(0); - BlendPalettes(PALETTES_ALL, 0x10, 0); + BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); DestroyTask(FindTaskIdByFunc(task->func)); return FALSE; } @@ -4212,7 +4253,7 @@ static void sub_814ABE4(u8 taskId) } } -static bool8 FrontierSquaresScroll_Func1(struct Task *task) +static bool8 FrontierSquaresScroll_Init(struct Task *task) { u8 taskId = 0; u16 *tilemap, *tileset; @@ -4221,14 +4262,14 @@ static bool8 FrontierSquaresScroll_Func1(struct Task *task) LZ77UnCompVram(sFrontierSquares_FilledBg_Tileset, tileset); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); CopyBgTilemapBufferToVram(0); - LoadPalette(sFrontierSquares_Palette, 0xF0, 0x20); + LoadPalette(sFrontierSquares_Palette, 0xF0, sizeof(sFrontierSquares_Palette)); gBattle_BG0_X = 0; gBattle_BG0_Y = 0; SetGpuReg(REG_OFFSET_BG0VOFS, gBattle_BG0_X); SetGpuReg(REG_OFFSET_BG0HOFS, gBattle_BG0_Y); - task->tData2 = 0; + task->data[2] = 0; taskId = CreateTask(sub_814ABE4, 1); switch (Random() % 4) { @@ -4256,7 +4297,7 @@ static bool8 FrontierSquaresScroll_Func1(struct Task *task) static bool8 FrontierSquaresScroll_Func2(struct Task *task) { - u8 var = gUnknown_085C9A53[task->tData2]; + u8 var = gUnknown_085C9A53[task->data[2]]; u8 varDiv = var / 8; u8 varAnd = var & 7; @@ -4276,16 +4317,16 @@ static bool8 FrontierSquaresScroll_Func2(struct Task *task) 0); CopyBgTilemapBufferToVram(0); - if (++task->tData2 > 63) + if (++task->data[2] > 63) task->tState++; return 0; } static bool8 FrontierSquaresScroll_Func3(struct Task *task) { - BlendPalettes(PALETTES_ALL & ~(0x8000), 0x10, 0); + BlendPalettes(PALETTES_ALL & ~(1 << 15), 16, RGB_BLACK); - task->tData2 = 0; + task->data[2] = 0; task->tState++; return FALSE; @@ -4293,14 +4334,14 @@ static bool8 FrontierSquaresScroll_Func3(struct Task *task) static bool8 FrontierSquaresScroll_Func4(struct Task *task) { - u8 var = gUnknown_085C9A53[task->tData2]; + u8 var = gUnknown_085C9A53[task->data[2]]; u8 varDiv = var / 8; - u8 varAnd = var & 7; + u8 varAnd = var % 8; FillBgTilemapBufferRect(0, 1, 4 * varDiv + 1, 4 * varAnd, 4, 4, 0xF); CopyBgTilemapBufferToVram(0); - if (++task->tData2 > 63) + if (++task->data[2] > 63) { DestroyTask(FindTaskIdByFunc(sub_814ABE4)); task->tState++; @@ -4313,7 +4354,7 @@ static bool8 FrontierSquaresScroll_Func4(struct Task *task) #undef tSub32_Y_delta #undef tSub32_Bool -static bool8 FrontierSquaresScroll_Func5(struct Task *task) +static bool8 FrontierSquaresScroll_End(struct Task *task) { gBattle_BG0_X = 0; gBattle_BG0_Y = 0; @@ -4322,7 +4363,7 @@ static bool8 FrontierSquaresScroll_Func5(struct Task *task) FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 0x20, 0x20); CopyBgTilemapBufferToVram(0); - BlendPalettes(PALETTES_ALL, 0x10, 0); + BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); DestroyTask(FindTaskIdByFunc(task->func)); @@ -4331,11 +4372,3 @@ static bool8 FrontierSquaresScroll_Func5(struct Task *task) #endif return FALSE; } - -#undef tData1 -#undef tData2 -#undef tData3 -#undef tData4 -#undef tData5 -#undef tData6 -#undef tData7 From bf87faa9225445a0b1065acada9398917558ba97 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 26 Oct 2021 02:00:28 -0400 Subject: [PATCH 096/417] Clean up battle_transition_frontier --- src/battle_transition_frontier.c | 229 +++++++++++++++++-------------- 1 file changed, 128 insertions(+), 101 deletions(-) diff --git a/src/battle_transition_frontier.c b/src/battle_transition_frontier.c index 3b35e53aa5..e1cb03d8df 100644 --- a/src/battle_transition_frontier.c +++ b/src/battle_transition_frontier.c @@ -191,44 +191,72 @@ static const TransitionStateFunc sFrontierCirclesSymmetricSpiralInSeq_Funcs[] = CirclesSymmetricSpiralInSeq_End }; +// Task data +#define tState data[0] +#define tTimer data[1] +#define tBlend data[2] +#define tFadeTimer data[3] +#define tCircle1SpriteId data[4] +#define tCircle2SpriteId data[5] +#define tCircle3SpriteId data[6] + +#define sTargetX data[0] +#define sTargetY data[1] + +// Sprite data for CreateSlidingLogoCircleSprite +#define sSpeedX data[2] +#define sSpeedY data[3] +#define sTimerX data[4] +#define sTimerY data[5] +#define sDelayX data[6] +#define sDelayY data[7] + +// Sprite data for CreateSpiralingLogoCircleSprite +#define sAngle data[2] +#define sRotateSpeed data[3] +#define sRadius data[4] +#define sTargetRadius data[5] +#define sRadiusDelta data[6] + + static void LoadLogoGfx(void) { - u16 *dst1, *dst2; + u16 *tilemap, *tileset; - GetBg0TilesDst(&dst1, &dst2); - LZ77UnCompVram(sLogoCenter_Gfx, dst2); - LZ77UnCompVram(sLogoCenter_Tilemap, dst1); - LoadPalette(sLogo_Pal, 0xF0, 0x20); + GetBg0TilesDst(&tilemap, &tileset); + LZ77UnCompVram(sLogoCenter_Gfx, tileset); + LZ77UnCompVram(sLogoCenter_Tilemap, tilemap); + LoadPalette(sLogo_Pal, 0xF0, sizeof(sLogo_Pal)); LoadCompressedSpriteSheet(&sSpriteSheet_LogoCircles); LoadSpritePalette(&sSpritePalette_LogoCircles); } -static u8 CreateSlidingLogoCircleSprite(s16 x, s16 y, u8 arg2, u8 arg3, s8 arg4, s8 arg5, u8 spriteAnimNum) +static u8 CreateSlidingLogoCircleSprite(s16 x, s16 y, u8 delayX, u8 delayY, s8 speedX, s8 speedY, u8 spriteAnimNum) { u8 spriteId = CreateSprite(&sSpriteTemplate_LogoCircles, x, y, 0); switch (spriteAnimNum) { case 0: - gSprites[spriteId].data[0] = 120; - gSprites[spriteId].data[1] = 45; + gSprites[spriteId].sTargetX = 120; + gSprites[spriteId].sTargetY = 45; break; case 1: - gSprites[spriteId].data[0] = 89; - gSprites[spriteId].data[1] = 97; + gSprites[spriteId].sTargetX = 89; + gSprites[spriteId].sTargetY = 97; break; case 2: - gSprites[spriteId].data[0] = 151; - gSprites[spriteId].data[1] = 97; + gSprites[spriteId].sTargetX = 151; + gSprites[spriteId].sTargetY = 97; break; } - gSprites[spriteId].data[2] = arg4; - gSprites[spriteId].data[3] = arg5; - gSprites[spriteId].data[6] = arg2; - gSprites[spriteId].data[7] = arg3; - gSprites[spriteId].data[4] = 0; - gSprites[spriteId].data[5] = 0; + gSprites[spriteId].sSpeedX = speedX; + gSprites[spriteId].sSpeedY = speedY; + gSprites[spriteId].sDelayX = delayX; + gSprites[spriteId].sDelayY = delayY; + gSprites[spriteId].sTimerX = 0; + gSprites[spriteId].sTimerY = 0; StartSpriteAnim(&gSprites[spriteId], spriteAnimNum); gSprites[spriteId].callback = SpriteCB_LogoCircleSlide; @@ -240,59 +268,60 @@ static void SpriteCB_LogoCircleSlide(struct Sprite *sprite) { s16 *data = sprite->data; - if (sprite->x == data[0] && sprite->y == data[1]) + if (sprite->x == sTargetX && sprite->y == sTargetY) { sprite->callback = SpriteCallbackDummy; } else { - if (data[4] == data[6]) + if (sTimerX == sDelayX) { - sprite->x += data[2]; - data[4] = 0; + sprite->x += sSpeedX; + sTimerX = 0; } else { - data[4]++; + sTimerX++; } - if (data[5] == data[7]) + if (sTimerY == sDelayY) { - sprite->y += data[3]; - data[5] = 0; + sprite->y += sSpeedY; + sTimerY = 0; } else { - data[5]++; + sTimerY++; } } } -static u8 CreateSpiralingLogoCircleSprite(s16 x, s16 y, s16 arg2, s16 arg3, s16 arg4, s16 arg5, s16 arg6, u8 spriteAnimNum) +static u8 CreateSpiralingLogoCircleSprite(s16 x, s16 y, s16 angle, s16 rotateSpeed, s16 radiusStart, s16 radiusEnd, s16 radiusDelta, u8 spriteAnimNum) { u8 spriteId = CreateSprite(&sSpriteTemplate_LogoCircles, x, y, 0); + // Target coords are set but irrelevant switch (spriteAnimNum) { case 0: - gSprites[spriteId].data[0] = 120; - gSprites[spriteId].data[1] = 45; + gSprites[spriteId].sTargetX = 120; + gSprites[spriteId].sTargetY = 45; break; case 1: - gSprites[spriteId].data[0] = 89; - gSprites[spriteId].data[1] = 97; + gSprites[spriteId].sTargetX = 89; + gSprites[spriteId].sTargetY = 97; break; case 2: - gSprites[spriteId].data[0] = 151; - gSprites[spriteId].data[1] = 97; + gSprites[spriteId].sTargetX = 151; + gSprites[spriteId].sTargetY = 97; break; } - gSprites[spriteId].data[2] = arg2; - gSprites[spriteId].data[3] = arg3; - gSprites[spriteId].data[4] = arg4; - gSprites[spriteId].data[5] = arg5; - gSprites[spriteId].data[6] = arg6; + gSprites[spriteId].sAngle = angle; + gSprites[spriteId].sRotateSpeed = rotateSpeed; + gSprites[spriteId].sRadius = radiusStart; + gSprites[spriteId].sTargetRadius = radiusEnd; + gSprites[spriteId].sRadiusDelta = radiusDelta; StartSpriteAnim(&gSprites[spriteId], spriteAnimNum); gSprites[spriteId].callback = SpriteCB_LogoCircleSpiral; @@ -302,34 +331,32 @@ static u8 CreateSpiralingLogoCircleSprite(s16 x, s16 y, s16 arg2, s16 arg3, s16 static void SpriteCB_LogoCircleSpiral(struct Sprite *sprite) { - sprite->x2 = (Sin2(sprite->data[2]) * sprite->data[4]) >> 12; // div by 4096 - sprite->y2 = (Cos2(sprite->data[2]) * sprite->data[4]) >> 12; // div by 4096 + sprite->x2 = (Sin2(sprite->sAngle) * sprite->sRadius) >> 12; // div by 4096 + sprite->y2 = (Cos2(sprite->sAngle) * sprite->sRadius) >> 12; // div by 4096 - sprite->data[2] = (sprite->data[2] + sprite->data[3]) % 360; + sprite->sAngle = (sprite->sAngle + sprite->sRotateSpeed) % 360; - if (sprite->data[4] != sprite->data[5]) - sprite->data[4] += sprite->data[6]; + if (sprite->sRadius != sprite->sTargetRadius) + sprite->sRadius += sprite->sRadiusDelta; else sprite->callback = SpriteCallbackDummy; } -#define tState data[0] - static void DestroyLogoCirclesGfx(struct Task *task) { FreeSpriteTilesByTag(PALTAG_LOGO_CIRCLES); FreeSpritePaletteByTag(PALTAG_LOGO_CIRCLES); - DestroySprite(&gSprites[task->data[4]]); - DestroySprite(&gSprites[task->data[5]]); - DestroySprite(&gSprites[task->data[6]]); + DestroySprite(&gSprites[task->tCircle1SpriteId]); + DestroySprite(&gSprites[task->tCircle2SpriteId]); + DestroySprite(&gSprites[task->tCircle3SpriteId]); } static bool8 IsLogoCirclesAnimFinished(struct Task *task) { - if (gSprites[task->data[4]].callback == SpriteCallbackDummy - && gSprites[task->data[5]].callback == SpriteCallbackDummy - && gSprites[task->data[6]].callback == SpriteCallbackDummy) + if (gSprites[task->tCircle1SpriteId].callback == SpriteCallbackDummy + && gSprites[task->tCircle2SpriteId].callback == SpriteCallbackDummy + && gSprites[task->tCircle3SpriteId].callback == SpriteCallbackDummy) return TRUE; else return FALSE; @@ -337,13 +364,13 @@ static bool8 IsLogoCirclesAnimFinished(struct Task *task) static bool8 Circles_Init(struct Task *task) { - if (task->data[1] == 0) + if (task->tTimer == 0) { ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN1_ON); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG0_ON); - task->data[1]++; + task->tTimer++; return FALSE; } else @@ -355,7 +382,7 @@ static bool8 Circles_Init(struct Task *task) ChangeBgY(0, 0, 0); ChangeBgY(0, 0x500, 2); - task->data[1] = 0; + task->tTimer = 0; task->tState++; return TRUE; } @@ -363,27 +390,27 @@ static bool8 Circles_Init(struct Task *task) static bool8 FadeInCenterLogoCircle(struct Task *task) { - if (task->data[2] == 0) + if (task->tBlend == 0) SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG0_ON); - if (task->data[2] == 16) + if (task->tBlend == 16) { - if (task->data[3] == 31) + if (task->tFadeTimer == 31) { BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 0x10, RGB_BLACK); task->tState++; } else { - task->data[3]++; + task->tFadeTimer++; } } else { u16 blnd; - task->data[2]++; - blnd = task->data[2]; + task->tBlend++; + blnd = task->tBlend; SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(blnd, 16 - blnd)); } @@ -405,9 +432,9 @@ void Task_FrontierCirclesMeet(u8 taskId) static bool8 CirclesMeet_CreateSprites(struct Task *task) { - task->data[4] = CreateSlidingLogoCircleSprite(120, -51, 0, 0, 0, 2, 0); - task->data[5] = CreateSlidingLogoCircleSprite(-7, 193, 0, 0, 2, -2, 1); - task->data[6] = CreateSlidingLogoCircleSprite(247, 193, 0, 0, -2, -2, 2); + task->tCircle1SpriteId = CreateSlidingLogoCircleSprite(120, -51, 0, 0, 0, 2, 0); + task->tCircle2SpriteId = CreateSlidingLogoCircleSprite(-7, 193, 0, 0, 2, -2, 1); + task->tCircle3SpriteId = CreateSlidingLogoCircleSprite(247, 193, 0, 0, -2, -2, 2); task->tState++; return FALSE; @@ -431,9 +458,9 @@ void Task_FrontierCirclesCross(u8 taskId) static bool8 CirclesCross_CreateSprites(struct Task *task) { - task->data[4] = CreateSlidingLogoCircleSprite(120, 197, 0, 0, 0, -4, 0); - task->data[5] = CreateSlidingLogoCircleSprite(241, 59, 0, 1, -4, 2, 1); - task->data[6] = CreateSlidingLogoCircleSprite(-1, 59, 0, 1, 4, 2, 2); + task->tCircle1SpriteId = CreateSlidingLogoCircleSprite(120, 197, 0, 0, 0, -4, 0); + task->tCircle2SpriteId = CreateSlidingLogoCircleSprite(241, 59, 0, 1, -4, 2, 1); + task->tCircle3SpriteId = CreateSlidingLogoCircleSprite(-1, 59, 0, 1, 4, 2, 2); task->tState++; return FALSE; @@ -457,9 +484,9 @@ void Task_FrontierCirclesAsymmetricSpiral(u8 taskId) static bool8 CirclesAsymmetricSpiral_CreateSprites(struct Task *task) { - task->data[4] = CreateSpiralingLogoCircleSprite(120, 45, 12, 4, 128, 0, -4, 0); - task->data[5] = CreateSpiralingLogoCircleSprite(89, 97, 252, 4, 128, 0, -4, 1); - task->data[6] = CreateSpiralingLogoCircleSprite(151, 97, 132, 4, 128, 0, -4, 2); + task->tCircle1SpriteId = CreateSpiralingLogoCircleSprite(120, 45, 12, 4, 128, 0, -4, 0); + task->tCircle2SpriteId = CreateSpiralingLogoCircleSprite(89, 97, 252, 4, 128, 0, -4, 1); + task->tCircle3SpriteId = CreateSpiralingLogoCircleSprite(151, 97, 132, 4, 128, 0, -4, 2); task->tState++; return FALSE; @@ -483,9 +510,9 @@ void Task_FrontierCirclesSymmetricSpiral(u8 taskId) static bool8 CirclesSymmetricSpiral_CreateSprites(struct Task *task) { - task->data[4] = CreateSpiralingLogoCircleSprite(120, 80, 284, 8, 131, 35, -3, 0); - task->data[5] = CreateSpiralingLogoCircleSprite(120, 80, 44, 8, 131, 35, -3, 1); - task->data[6] = CreateSpiralingLogoCircleSprite(121, 80, 164, 8, 131, 35, -3, 2); + task->tCircle1SpriteId = CreateSpiralingLogoCircleSprite(120, 80, 284, 8, 131, 35, -3, 0); + task->tCircle2SpriteId = CreateSpiralingLogoCircleSprite(120, 80, 44, 8, 131, 35, -3, 1); + task->tCircle3SpriteId = CreateSpiralingLogoCircleSprite(121, 80, 164, 8, 131, 35, -3, 2); task->tState++; return FALSE; @@ -509,21 +536,21 @@ void Task_FrontierCirclesMeetInSeq(u8 taskId) static bool8 CirclesMeetInSeq_CreateSprites(struct Task *task) { - if (task->data[1] == 0) + if (task->tTimer == 0) { - task->data[4] = CreateSlidingLogoCircleSprite(120, -51, 0, 0, 0, 4, 0); + task->tCircle1SpriteId = CreateSlidingLogoCircleSprite(120, -51, 0, 0, 0, 4, 0); } - else if (task->data[1] == 16) + else if (task->tTimer == 16) { - task->data[5] = CreateSlidingLogoCircleSprite(-7, 193, 0, 0, 4, -4, 1); + task->tCircle2SpriteId = CreateSlidingLogoCircleSprite(-7, 193, 0, 0, 4, -4, 1); } - else if (task->data[1] == 32) + else if (task->tTimer == 32) { - task->data[6] = CreateSlidingLogoCircleSprite(247, 193, 0, 0, -4, -4, 2); + task->tCircle3SpriteId = CreateSlidingLogoCircleSprite(247, 193, 0, 0, -4, -4, 2); task->tState++; } - task->data[1]++; + task->tTimer++; return FALSE; } @@ -545,21 +572,21 @@ void Task_FrontierCirclesCrossInSeq(u8 taskId) static bool8 CirclesCrossInSeq_CreateSprites(struct Task *task) { - if (task->data[1] == 0) + if (task->tTimer == 0) { - task->data[4] = CreateSlidingLogoCircleSprite(120, 197, 0, 0, 0, -8, 0); + task->tCircle1SpriteId = CreateSlidingLogoCircleSprite(120, 197, 0, 0, 0, -8, 0); } - else if (task->data[1] == 16) + else if (task->tTimer == 16) { - task->data[5] = CreateSlidingLogoCircleSprite(241, 78, 0, 0, -8, 1, 1); + task->tCircle2SpriteId = CreateSlidingLogoCircleSprite(241, 78, 0, 0, -8, 1, 1); } - else if (task->data[1] == 32) + else if (task->tTimer == 32) { - task->data[6] = CreateSlidingLogoCircleSprite(-1, 78, 0, 0, 8, 1, 2); + task->tCircle3SpriteId = CreateSlidingLogoCircleSprite(-1, 78, 0, 0, 8, 1, 2); task->tState++; } - task->data[1]++; + task->tTimer++; return FALSE; } @@ -581,21 +608,21 @@ void Task_FrontierCirclesAsymmetricSpiralInSeq(u8 taskId) static bool8 CirclesAsymmetricSpiralInSeq_CreateSprites(struct Task *task) { - if (task->data[1] == 0) + if (task->tTimer == 0) { - task->data[4] = CreateSpiralingLogoCircleSprite(120, 45, 12, 4, 128, 0, -4, 0); + task->tCircle1SpriteId = CreateSpiralingLogoCircleSprite(120, 45, 12, 4, 128, 0, -4, 0); } - else if (task->data[1] == 16) + else if (task->tTimer == 16) { - task->data[5] = CreateSpiralingLogoCircleSprite(89, 97, 252, 4, 128, 0, -4, 1); + task->tCircle2SpriteId = CreateSpiralingLogoCircleSprite(89, 97, 252, 4, 128, 0, -4, 1); } - else if (task->data[1] == 32) + else if (task->tTimer == 32) { - task->data[6] = CreateSpiralingLogoCircleSprite(151, 97, 132, 4, 128, 0, -4, 2); + task->tCircle3SpriteId = CreateSpiralingLogoCircleSprite(151, 97, 132, 4, 128, 0, -4, 2); task->tState++; } - task->data[1]++; + task->tTimer++; return FALSE; } @@ -617,21 +644,21 @@ void Task_FrontierCirclesSymmetricSpiralInSeq(u8 taskId) static bool8 CirclesSymmetricSpiralInSeq_CreateSprites(struct Task *task) { - if (task->data[1] == 0) + if (task->tTimer == 0) { - task->data[4] = CreateSpiralingLogoCircleSprite(120, 80, 284, 8, 131, 35, -3, 0); + task->tCircle1SpriteId = CreateSpiralingLogoCircleSprite(120, 80, 284, 8, 131, 35, -3, 0); } - else if (task->data[1] == 16) + else if (task->tTimer == 16) { - task->data[5] = CreateSpiralingLogoCircleSprite(120, 80, 44, 8, 131, 35, -3, 1); + task->tCircle2SpriteId = CreateSpiralingLogoCircleSprite(120, 80, 44, 8, 131, 35, -3, 1); } - else if (task->data[1] == 32) + else if (task->tTimer == 32) { - task->data[6] = CreateSpiralingLogoCircleSprite(121, 80, 164, 8, 131, 35, -3, 2); + task->tCircle3SpriteId = CreateSpiralingLogoCircleSprite(121, 80, 164, 8, 131, 35, -3, 2); task->tState++; } - task->data[1]++; + task->tTimer++; return FALSE; } From b3d779fd0d04df5a53e7615d776f12670a030946 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 27 Oct 2021 01:27:20 +0800 Subject: [PATCH 097/417] Document field player functions --- berry_fix/payload/include/global.fieldmap.h | 16 +++---- include/field_player_avatar.h | 4 +- include/global.fieldmap.h | 16 +++---- src/apprentice.c | 2 +- src/battle_setup.c | 8 ++-- src/event_object_lock.c | 6 +-- src/event_object_movement.c | 2 +- src/field_effect.c | 2 +- src/field_player_avatar.c | 49 +++++++++++---------- src/item_menu.c | 2 +- src/match_call.c | 2 +- src/start_menu.c | 2 +- src/trainer_see.c | 2 +- 13 files changed, 57 insertions(+), 56 deletions(-) diff --git a/berry_fix/payload/include/global.fieldmap.h b/berry_fix/payload/include/global.fieldmap.h index d5ab0812e5..e7150b429f 100644 --- a/berry_fix/payload/include/global.fieldmap.h +++ b/berry_fix/payload/include/global.fieldmap.h @@ -219,14 +219,14 @@ struct EventObjectGraphicsInfo /*0x20*/ const union AffineAnimCmd *const *affineAnims; }; -#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0) -#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1) -#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2) -#define PLAYER_AVATAR_FLAG_SURFING (1 << 3) -#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << 4) -#define PLAYER_AVATAR_FLAG_5 (1 << 5) -#define PLAYER_AVATAR_FLAG_6 (1 << 6) -#define PLAYER_AVATAR_FLAG_DASH (1 << 7) +#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0) +#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1) +#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2) +#define PLAYER_AVATAR_FLAG_SURFING (1 << 3) +#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << 4) +#define PLAYER_AVATAR_FLAG_CONTROLLABLE (1 << 5) +#define PLAYER_AVATAR_FLAG_FORCED_MOVE (1 << 6) +#define PLAYER_AVATAR_FLAG_DASH (1 << 7) enum { diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 903fe6ef1b..e9174d5894 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -32,10 +32,10 @@ void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction); u8 CheckForObjectEventCollision(struct ObjectEvent *a, s16 b, s16 c, u8 d, u8 e); u8 PlayerGetZCoord(void); void SetPlayerAvatarTransitionFlags(u16 a); -void sub_808BCE8(void); +void CancelPlayerForcedMovement(void); void InitPlayerAvatar(s16 a, s16 b, u8 c, u8 d); void PlayerFreeze(void); -void sub_808BCF4(void); +void StopPlayerAvatar(void); void SetSpinStartFacingDir(u8); void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr); u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 5d788ddf7d..71ccd70680 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -246,14 +246,14 @@ enum { PLAYER_AVATAR_STATE_WATERING, }; -#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0) -#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1) -#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2) -#define PLAYER_AVATAR_FLAG_SURFING (1 << 3) -#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << 4) -#define PLAYER_AVATAR_FLAG_5 (1 << 5) -#define PLAYER_AVATAR_FLAG_FORCED_MOVE (1 << 6) -#define PLAYER_AVATAR_FLAG_DASH (1 << 7) +#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0) +#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1) +#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2) +#define PLAYER_AVATAR_FLAG_SURFING (1 << 3) +#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << 4) +#define PLAYER_AVATAR_FLAG_CONTROLLABLE (1 << 5) +#define PLAYER_AVATAR_FLAG_FORCED_MOVE (1 << 6) +#define PLAYER_AVATAR_FLAG_DASH (1 << 7) enum { diff --git a/src/apprentice.c b/src/apprentice.c index f881c3bef6..5d1c4287b8 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -911,7 +911,7 @@ static void Script_PrintApprenticeMessage(void) ScriptContext2_Enable(); FreezeObjectEvents(); PlayerFreeze(); - sub_808BCF4(); + StopPlayerAvatar(); DrawDialogueFrame(0, 1); PrintApprenticeMessage(); } diff --git a/src/battle_setup.c b/src/battle_setup.c index 2a716e08c7..90c004b55d 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -399,7 +399,7 @@ static void DoStandardWildBattle(void) { ScriptContext2_Enable(); FreezeObjectEvents(); - sub_808BCF4(); + StopPlayerAvatar(); gMain.savedCallback = CB2_EndWildBattle; gBattleTypeFlags = 0; if (InBattlePyramid()) @@ -418,7 +418,7 @@ void BattleSetup_StartRoamerBattle(void) { ScriptContext2_Enable(); FreezeObjectEvents(); - sub_808BCF4(); + StopPlayerAvatar(); gMain.savedCallback = CB2_EndWildBattle; gBattleTypeFlags = BATTLE_TYPE_ROAMER; CreateBattleStartTask(GetWildBattleTransition(), 0); @@ -432,7 +432,7 @@ static void DoSafariBattle(void) { ScriptContext2_Enable(); FreezeObjectEvents(); - sub_808BCF4(); + StopPlayerAvatar(); gMain.savedCallback = CB2_EndSafariBattle; gBattleTypeFlags = BATTLE_TYPE_SAFARI; CreateBattleStartTask(GetWildBattleTransition(), 0); @@ -442,7 +442,7 @@ static void DoBattlePikeWildBattle(void) { ScriptContext2_Enable(); FreezeObjectEvents(); - sub_808BCF4(); + StopPlayerAvatar(); gMain.savedCallback = CB2_EndWildBattle; gBattleTypeFlags = BATTLE_TYPE_PIKE; CreateBattleStartTask(GetWildBattleTransition(), 0); diff --git a/src/event_object_lock.c b/src/event_object_lock.c index 179c728137..29575111fb 100644 --- a/src/event_object_lock.c +++ b/src/event_object_lock.c @@ -34,7 +34,7 @@ bool8 IsFreezePlayerFinished(void) } else { - sub_808BCF4(); + StopPlayerAvatar(); return TRUE; } } @@ -77,7 +77,7 @@ bool8 IsFreezeSelectedObjectAndPlayerFinished(void) } else { - sub_808BCF4(); + StopPlayerAvatar(); return TRUE; } } @@ -198,7 +198,7 @@ bool8 IsFreezeObjectAndPlayerFinished(void) } else { - sub_808BCF4(); + StopPlayerAvatar(); return TRUE; } } diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 2f7cb9e7a2..2616b65e81 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1770,7 +1770,7 @@ static void SetPlayerAvatarObjectEventIdAndObjectId(u8 objectEventId, u8 spriteI gPlayerAvatar.objectEventId = objectEventId; gPlayerAvatar.spriteId = spriteId; gPlayerAvatar.gender = GetPlayerAvatarGenderByGraphicsId(gObjectEvents[objectEventId].graphicsId); - SetPlayerAvatarExtraStateTransition(gObjectEvents[objectEventId].graphicsId, PLAYER_AVATAR_FLAG_5); + SetPlayerAvatarExtraStateTransition(gObjectEvents[objectEventId].graphicsId, PLAYER_AVATAR_FLAG_CONTROLLABLE); } void ObjectEventSetGraphicsId(struct ObjectEvent *objectEvent, u8 graphicsId) diff --git a/src/field_effect.c b/src/field_effect.c index 88f8065d3f..247744b879 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -3051,7 +3051,7 @@ static void SurfFieldEffect_End(struct Task *task) if (ObjectEventClearHeldMovementIfFinished(objectEvent)) { gPlayerAvatar.preventStep = FALSE; - gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_5; + gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_CONTROLLABLE; ObjectEventSetHeldMovement(objectEvent, GetFaceDirectionMovementAction(objectEvent->movementDirection)); SetSurfBlob_BobState(objectEvent->fieldEffectSpriteId, BOB_PLAYER_AND_MON); UnfreezeObjectEvents(); diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 276fb44b24..158248d177 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -69,8 +69,8 @@ static void PlayerNotOnBikeNotMoving(u8, u16); static void PlayerNotOnBikeTurningInPlace(u8, u16); static void PlayerNotOnBikeMoving(u8, u16); static u8 CheckForPlayerAvatarCollision(u8); -static u8 sub_808B028(u8); -static u8 sub_808B164(struct ObjectEvent *, s16, s16, u8, u8); +static u8 CheckForPlayerAvatarSomeCollision(u8); +static u8 CheckForObjectEventSomeCollision(struct ObjectEvent *, s16, s16, u8, u8); static bool8 CanStopSurfing(s16, s16, u8); static bool8 ShouldJumpLedge(s16, s16, u8); static bool8 TryPushBoulder(s16, s16, u8); @@ -85,8 +85,8 @@ static void PlayerAvatarTransition_Surfing(struct ObjectEvent *a); static void PlayerAvatarTransition_Underwater(struct ObjectEvent *a); static void PlayerAvatarTransition_ReturnToField(struct ObjectEvent *a); -static bool8 player_is_anim_in_certain_ranges(void); -static bool8 sub_808B618(void); +static bool8 PlayerAnimIsMultiFrameStationary(void); +static bool8 PlayerAnimIsMultiFrameStationaryAndStateNotTurning(void); static bool8 PlayerIsAnimActive(void); static bool8 PlayerCheckIfAnimFinishedOrInactive(void); @@ -187,7 +187,7 @@ static bool8 (*const sForcedMovementFuncs[])(void) = ForcedMovement_MuddySlope, }; -static void (*const gUnknown_08497490[])(u8, u16) = +static void (*const sPlayerNotOnBikeFuncs[])(u8, u16) = { PlayerNotOnBikeNotMoving, PlayerNotOnBikeTurningInPlace, @@ -359,7 +359,7 @@ static bool8 TryInterruptObjectEventSpecialAnim(struct ObjectEvent *playerObjEve return FALSE; } - if (!sub_808B028(direction)) + if (CheckForPlayerAvatarSomeCollision(direction) == COLLISION_NONE) { ObjectEventClearHeldMovement(playerObjEvent); return FALSE; @@ -391,7 +391,7 @@ static void MovePlayerAvatarUsingKeypadInput(u8 direction, u16 newKeys, u16 held static void PlayerAllowForcedMovementIfMovingSameDirection(void) { if (gPlayerAvatar.runningState == MOVING) - gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_5; + gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_CONTROLLABLE; } static bool8 TryDoMetatileBehaviorForcedMovement(void) @@ -403,7 +403,7 @@ static u8 GetForcedMovementByMetatileBehavior(void) { u8 i; - if (!(gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_5)) + if (!(gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_CONTROLLABLE)) { u8 metatileBehavior = gObjectEvents[gPlayerAvatar.objectEventId].currentMetatileBehavior; @@ -572,7 +572,7 @@ static bool8 ForcedMovement_MuddySlope(void) static void MovePlayerNotOnBike(u8 direction, u16 heldKeys) { - gUnknown_08497490[CheckMovementInputNotOnBike(direction)](direction, heldKeys); + sPlayerNotOnBikeFuncs[CheckMovementInputNotOnBike(direction)](direction, heldKeys); } static u8 CheckMovementInputNotOnBike(u8 direction) @@ -660,7 +660,7 @@ static u8 CheckForPlayerAvatarCollision(u8 direction) return CheckForObjectEventCollision(playerObjEvent, x, y, direction, MapGridGetMetatileBehaviorAt(x, y)); } -static u8 sub_808B028(u8 direction) +static u8 CheckForPlayerAvatarSomeCollision(u8 direction) { s16 x, y; struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -668,7 +668,7 @@ static u8 sub_808B028(u8 direction) x = playerObjEvent->currentCoords.x; y = playerObjEvent->currentCoords.y; MoveCoords(direction, &x, &y); - return sub_808B164(playerObjEvent, x, y, direction, MapGridGetMetatileBehaviorAt(x, y)); + return CheckForObjectEventSomeCollision(playerObjEvent, x, y, direction, MapGridGetMetatileBehaviorAt(x, y)); } u8 CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior) @@ -694,7 +694,7 @@ u8 CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u return collision; } -static u8 sub_808B164(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior) +static u8 CheckForObjectEventSomeCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior) { u8 collision = GetCollisionAtCoords(objectEvent, x, y, direction); @@ -876,7 +876,7 @@ static void PlayerAvatarTransition_Underwater(struct ObjectEvent *objEvent) static void PlayerAvatarTransition_ReturnToField(struct ObjectEvent *objEvent) { - gPlayerAvatar.flags |= PLAYER_AVATAR_FLAG_5; + gPlayerAvatar.flags |= PLAYER_AVATAR_FLAG_CONTROLLABLE; } void UpdatePlayerAvatarTransitionState(void) @@ -886,18 +886,18 @@ void UpdatePlayerAvatarTransitionState(void) { if (!PlayerCheckIfAnimFinishedOrInactive()) { - if (!player_is_anim_in_certain_ranges()) + if (!PlayerAnimIsMultiFrameStationary()) gPlayerAvatar.tileTransitionState = T_TILE_TRANSITION; } else { - if (!sub_808B618()) + if (!PlayerAnimIsMultiFrameStationaryAndStateNotTurning()) gPlayerAvatar.tileTransitionState = T_TILE_CENTER; } } } -static bool8 player_is_anim_in_certain_ranges(void) +static bool8 PlayerAnimIsMultiFrameStationary(void) { u8 movementActionId = gObjectEvents[gPlayerAvatar.objectEventId].movementActionId; @@ -911,9 +911,9 @@ static bool8 player_is_anim_in_certain_ranges(void) return FALSE; } -static bool8 sub_808B618(void) +static bool8 PlayerAnimIsMultiFrameStationaryAndStateNotTurning(void) { - if (player_is_anim_in_certain_ranges() && gPlayerAvatar.runningState != TURN_DIRECTION) + if (PlayerAnimIsMultiFrameStationary() && gPlayerAvatar.runningState != TURN_DIRECTION) return TRUE; else return FALSE; @@ -1177,7 +1177,8 @@ u8 PlayerGetZCoord(void) return gObjectEvents[gPlayerAvatar.objectEventId].previousElevation; } -void sub_808BC90(s16 x, s16 y) +// unused +void MovePlayerToMapCoords(s16 x, s16 y) { MoveObjectEventToMapCoords(&gObjectEvents[gPlayerAvatar.objectEventId], x, y); } @@ -1197,12 +1198,12 @@ u8 GetPlayerAvatarSpriteId(void) return gPlayerAvatar.spriteId; } -void sub_808BCE8(void) +void CancelPlayerForcedMovement(void) { ForcedMovement_None(); } -void sub_808BCF4(void) +void StopPlayerAvatar(void) { struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -1323,7 +1324,7 @@ void ClearPlayerAvatarInfo(void) void SetPlayerAvatarStateMask(u8 flags) { - gPlayerAvatar.flags &= (PLAYER_AVATAR_FLAG_DASH | PLAYER_AVATAR_FLAG_FORCED_MOVE | PLAYER_AVATAR_FLAG_5); + gPlayerAvatar.flags &= (PLAYER_AVATAR_FLAG_DASH | PLAYER_AVATAR_FLAG_FORCED_MOVE | PLAYER_AVATAR_FLAG_CONTROLLABLE); gPlayerAvatar.flags |= flags; } @@ -1389,7 +1390,7 @@ void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender) gPlayerAvatar.objectEventId = objectEventId; gPlayerAvatar.spriteId = objectEvent->spriteId; gPlayerAvatar.gender = gender; - SetPlayerAvatarStateMask(PLAYER_AVATAR_FLAG_5 | PLAYER_AVATAR_FLAG_ON_FOOT); + SetPlayerAvatarStateMask(PLAYER_AVATAR_FLAG_CONTROLLABLE | PLAYER_AVATAR_FLAG_ON_FOOT); } void SetPlayerInvisibility(bool8 invisible) @@ -1542,7 +1543,7 @@ static u8 PlayerAvatar_DoSecretBaseMatJump(struct Task *task, struct ObjectEvent if (task->data[1] > 1) { gPlayerAvatar.preventStep = FALSE; - gPlayerAvatar.transitionFlags |= PLAYER_AVATAR_FLAG_5; + gPlayerAvatar.transitionFlags |= PLAYER_AVATAR_FLAG_CONTROLLABLE; DestroyTask(FindTaskIdByFunc(DoPlayerAvatarSecretBaseMatJump)); } } diff --git a/src/item_menu.c b/src/item_menu.c index 8ada7ff62d..53f478a31d 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -2047,7 +2047,7 @@ bool8 UseRegisteredKeyItemOnField(void) ScriptContext2_Enable(); FreezeObjectEvents(); PlayerFreeze(); - sub_808BCF4(); + StopPlayerAvatar(); gSpecialVar_ItemId = gSaveBlock1Ptr->registeredItem; taskId = CreateTask(ItemId_GetFieldFunc(gSaveBlock1Ptr->registeredItem), 8); gTasks[taskId].tUsingRegisteredKeyItem = TRUE; diff --git a/src/match_call.c b/src/match_call.c index b71fc83220..d6bc5126e8 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1180,7 +1180,7 @@ static void StartMatchCall(void) ScriptContext2_Enable(); FreezeObjectEvents(); PlayerFreeze(); - sub_808BCF4(); + StopPlayerAvatar(); } PlaySE(SE_POKENAV_CALL); diff --git a/src/start_menu.c b/src/start_menu.c index 9f271b890a..59279d6b9f 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -558,7 +558,7 @@ void ShowStartMenu(void) { FreezeObjectEvents(); PlayerFreeze(); - sub_808BCF4(); + StopPlayerAvatar(); } CreateStartMenuTask(Task_ShowStartMenu); ScriptContext2_Enable(); diff --git a/src/trainer_see.c b/src/trainer_see.c index ec3dc8123e..ce06c5e9ce 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -523,7 +523,7 @@ static bool8 PlayerFaceApproachingTrainer(u8 taskId, struct Task *task, struct O if (ObjectEventIsMovementOverridden(playerObj) && !ObjectEventClearHeldMovementIfFinished(playerObj)) return FALSE; - sub_808BCE8(); + CancelPlayerForcedMovement(); ObjectEventSetHeldMovement(&gObjectEvents[gPlayerAvatar.objectEventId], GetFaceDirectionMovementAction(GetOppositeDirection(trainerObj->facingDirection))); task->tFuncId++; // TRSEE_PLAYER_FACE_WAIT return FALSE; From bd9ea239256ecdb716e31c9063102cf52f972f93 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 27 Oct 2021 02:20:12 +0800 Subject: [PATCH 098/417] Rename as StaticCollision instead --- src/field_player_avatar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 158248d177..e770ce35dc 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -69,8 +69,8 @@ static void PlayerNotOnBikeNotMoving(u8, u16); static void PlayerNotOnBikeTurningInPlace(u8, u16); static void PlayerNotOnBikeMoving(u8, u16); static u8 CheckForPlayerAvatarCollision(u8); -static u8 CheckForPlayerAvatarSomeCollision(u8); -static u8 CheckForObjectEventSomeCollision(struct ObjectEvent *, s16, s16, u8, u8); +static u8 CheckForPlayerAvatarStaticCollision(u8); +static u8 CheckForObjectEventStaticCollision(struct ObjectEvent *, s16, s16, u8, u8); static bool8 CanStopSurfing(s16, s16, u8); static bool8 ShouldJumpLedge(s16, s16, u8); static bool8 TryPushBoulder(s16, s16, u8); @@ -359,7 +359,7 @@ static bool8 TryInterruptObjectEventSpecialAnim(struct ObjectEvent *playerObjEve return FALSE; } - if (CheckForPlayerAvatarSomeCollision(direction) == COLLISION_NONE) + if (CheckForPlayerAvatarStaticCollision(direction) == COLLISION_NONE) { ObjectEventClearHeldMovement(playerObjEvent); return FALSE; @@ -660,7 +660,7 @@ static u8 CheckForPlayerAvatarCollision(u8 direction) return CheckForObjectEventCollision(playerObjEvent, x, y, direction, MapGridGetMetatileBehaviorAt(x, y)); } -static u8 CheckForPlayerAvatarSomeCollision(u8 direction) +static u8 CheckForPlayerAvatarStaticCollision(u8 direction) { s16 x, y; struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -668,7 +668,7 @@ static u8 CheckForPlayerAvatarSomeCollision(u8 direction) x = playerObjEvent->currentCoords.x; y = playerObjEvent->currentCoords.y; MoveCoords(direction, &x, &y); - return CheckForObjectEventSomeCollision(playerObjEvent, x, y, direction, MapGridGetMetatileBehaviorAt(x, y)); + return CheckForObjectEventStaticCollision(playerObjEvent, x, y, direction, MapGridGetMetatileBehaviorAt(x, y)); } u8 CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior) @@ -694,7 +694,7 @@ u8 CheckForObjectEventCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u return collision; } -static u8 CheckForObjectEventSomeCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior) +static u8 CheckForObjectEventStaticCollision(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior) { u8 collision = GetCollisionAtCoords(objectEvent, x, y, direction); From b0c27a852100dfd3b2eddd51e9742cb6a3b14cbe Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 26 Oct 2021 13:37:24 -0400 Subject: [PATCH 099/417] Document ereader screen --- common_syms/ereader_screen.txt | 2 +- ..._serial_data.bin => ereader_link_data.bin} | Bin data/ereader_link_data.s | 6 + data/unknown_serial_data.s | 5 - include/ereader_helpers.h | 28 + include/link.h | 7 +- ld_script.txt | 2 +- ld_script_modern.txt | 2 +- src/ereader_helpers.c | 37 +- src/ereader_screen.c | 483 ++++++++++-------- src/link.c | 18 +- 11 files changed, 330 insertions(+), 260 deletions(-) rename data/{unknown_serial_data.bin => ereader_link_data.bin} (100%) create mode 100644 data/ereader_link_data.s delete mode 100644 data/unknown_serial_data.s diff --git a/common_syms/ereader_screen.txt b/common_syms/ereader_screen.txt index 5a89d370d0..2189eedbc9 100644 --- a/common_syms/ereader_screen.txt +++ b/common_syms/ereader_screen.txt @@ -1 +1 @@ -gUnknown_03006370 +gEReaderData diff --git a/data/unknown_serial_data.bin b/data/ereader_link_data.bin similarity index 100% rename from data/unknown_serial_data.bin rename to data/ereader_link_data.bin diff --git a/data/ereader_link_data.s b/data/ereader_link_data.s new file mode 100644 index 0000000000..d3269ebfe0 --- /dev/null +++ b/data/ereader_link_data.s @@ -0,0 +1,6 @@ + .section .rodata + + .align 2 +gEReaderLinkData_Start:: + .incbin "data/ereader_link_data.bin" +gEReaderLinkData_End:: diff --git a/data/unknown_serial_data.s b/data/unknown_serial_data.s deleted file mode 100644 index 2fb1ba42bb..0000000000 --- a/data/unknown_serial_data.s +++ /dev/null @@ -1,5 +0,0 @@ - .section .rodata - - .align 2 -gUnknown_089A3470:: - .incbin "data/unknown_serial_data.bin" diff --git a/include/ereader_helpers.h b/include/ereader_helpers.h index 064b61ed7f..8bf3dc43b6 100755 --- a/include/ereader_helpers.h +++ b/include/ereader_helpers.h @@ -3,6 +3,34 @@ #include "trainer_hill.h" +enum { + EREADER_XFR_STATE_INIT = 0, + EREADER_XFR_STATE_HANDSHAKE, + EREADER_XFR_STATE_START, + EREADER_XFR_STATE_TRANSFER, + EREADER_XFR_STATE_TRANSFER_DONE, + EREADER_XFR_STATE_CHECKSUM, + EREADER_XFR_STATE_DONE +}; + +#define EREADER_XFER_EXE 1 +#define EREADER_XFER_CHK 2 +#define EREADER_XFER_SHIFT 0 +#define EREADER_XFER_MASK ((EREADER_XFER_EXE | EREADER_XFER_CHK) << EREADER_XFER_SHIFT) + +#define EREADER_CANCEL_TIMEOUT 1 +#define EREADER_CANCEL_KEY 2 +#define EREADER_CANCEL_SHIFT 2 +#define EREADER_CANCEL_TIMEOUT_MASK (EREADER_CANCEL_TIMEOUT << EREADER_CANCEL_SHIFT) +#define EREADER_CANCEL_KEY_MASK (EREADER_CANCEL_KEY << EREADER_CANCEL_SHIFT) +#define EREADER_CANCEL_MASK ((EREADER_CANCEL_TIMEOUT | EREADER_CANCEL_KEY) << EREADER_CANCEL_SHIFT) + +#define EREADER_CHECKSUM_OK 1 +#define EREADER_CHECKSUM_ERR 2 +#define EREADER_CHECKSUM_SHIFT 4 +#define EREADER_CHECKSUM_OK_MASK (EREADER_CHECKSUM_OK << EREADER_CHECKSUM_SHIFT) +#define EREADER_CHECKSUM_MASK ((EREADER_CHECKSUM_OK | EREADER_CHECKSUM_ERR) << EREADER_CHECKSUM_SHIFT) + struct EReaderTrainerHillTrainer { u8 trainerNum; diff --git a/include/link.h b/include/link.h index 4e0491356c..6061745af3 100644 --- a/include/link.h +++ b/include/link.h @@ -124,8 +124,9 @@ struct LinkStatus u32 errors:7; }; -#define MASTER_HANDSHAKE 0x8FFF -#define SLAVE_HANDSHAKE 0xB9A0 +#define MASTER_HANDSHAKE 0x8FFF +#define SLAVE_HANDSHAKE 0xB9A0 +#define EREADER_HANDSHAKE 0xCCD0 #define SIO_MULTI_CNT ((struct SioMultiCnt *)REG_ADDR_SIOCNT) @@ -208,7 +209,7 @@ struct Link /* 0x001 */ u8 state; /* 0x002 */ u8 localId; // local multi-player ID /* 0x003 */ u8 playerCount; - /* 0x004 */ u16 tempRecvBuffer[4]; + /* 0x004 */ u16 handshakeBuffer[MAX_LINK_PLAYERS]; /* 0x00c */ bool8 receivedNothing; /* 0x00d */ s8 serialIntrCounter; /* 0x00e */ bool8 handshakeAsMaster; diff --git a/ld_script.txt b/ld_script.txt index 93babfa163..3c1a250944 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -1250,7 +1250,7 @@ SECTIONS { other_data : ALIGN(4) { - data/unknown_serial_data.o(.rodata); + data/ereader_link_data.o(.rodata); data/multiboot_berry_glitch_fix.o(.rodata); data/multiboot_pokemon_colosseum.o(.rodata); } =0 diff --git a/ld_script_modern.txt b/ld_script_modern.txt index 59d032bb25..c5c711bfdb 100644 --- a/ld_script_modern.txt +++ b/ld_script_modern.txt @@ -114,7 +114,7 @@ SECTIONS { other_data : ALIGN(4) { - data/unknown_serial_data.o(.rodata); + data/ereader_link_data.o(.rodata); data/multiboot_berry_glitch_fix.o(.rodata); data/multiboot_pokemon_colosseum.o(.rodata); } =0 diff --git a/src/ereader_helpers.c b/src/ereader_helpers.c index 9f265143cc..9a93707d85 100755 --- a/src/ereader_helpers.c +++ b/src/ereader_helpers.c @@ -16,31 +16,6 @@ #include "constants/items.h" #include "constants/trainer_hill.h" -enum { - EREADER_XFR_STATE_INIT = 0, - EREADER_XFR_STATE_HANDSHAKE, - EREADER_XFR_STATE_START, - EREADER_XFR_STATE_TRANSFER, - EREADER_XFR_STATE_TRANSFER_DONE, - EREADER_XFR_STATE_CHECKSUM, - EREADER_XFR_STATE_DONE -}; - -#define EREADER_XFER_EXE 1 -#define EREADER_XFER_CHK 2 -#define EREADER_XFER_SHIFT 0 -#define EREADER_XFER_MASK 3 - -#define EREADER_CANCEL_TIMEOUT 1 -#define EREADER_CANCEL_KEY 2 -#define EREADER_CANCEL_MASK 0xC -#define EREADER_CANCEL_SHIFT 2 - -#define EREADER_CHECKSUM_OK 1 -#define EREADER_CHECKSUM_ERR 2 -#define EREADER_CHECKSUM_MASK 0x30 -#define EREADER_CHECKSUM_SHIFT 4 - struct SendRecvMgr { bool8 isParent; @@ -562,17 +537,17 @@ int EReader_Send(int size, const void * src) sendStatus = EReaderHandleTransfer(1, size, src, NULL); sSendRecvStatus = sendStatus; - if ((sSendRecvStatus & 0x13) == 0x10) + if ((sSendRecvStatus & EREADER_XFER_MASK) == 0 && sSendRecvStatus & EREADER_CHECKSUM_OK_MASK) { result = 0; break; } - else if (sSendRecvStatus & 0x8) + else if (sSendRecvStatus & EREADER_CANCEL_KEY_MASK) { result = 1; break; } - else if (sSendRecvStatus & 0x4) + else if (sSendRecvStatus & EREADER_CANCEL_TIMEOUT_MASK) { result = 2; break; @@ -603,17 +578,17 @@ int EReader_Recv(void * dest) recvStatus = EReaderHandleTransfer(0, 0, NULL, dest); sSendRecvStatus = recvStatus; - if ((sSendRecvStatus & 0x13) == 0x10) + if ((sSendRecvStatus & EREADER_XFER_MASK) == 0 && sSendRecvStatus & EREADER_CHECKSUM_OK_MASK) { result = 0; break; } - else if (sSendRecvStatus & 0x8) + else if (sSendRecvStatus & EREADER_CANCEL_KEY_MASK) { result = 1; break; } - else if (sSendRecvStatus & 0x4) + else if (sSendRecvStatus & EREADER_CANCEL_TIMEOUT_MASK) { result = 2; break; diff --git a/src/ereader_screen.c b/src/ereader_screen.c index 73a1b870e4..f98a0247d3 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -13,37 +13,38 @@ #include "util.h" #include "constants/songs.h" +// Equivalent to MysteryGiftTaskData struct EReaderTaskData { - u16 unk0; - u16 unk2; - u16 unk4; - u16 unk6; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; - u8 unkC; - u8 unkD; - u8 unkE; - u8 *unk10; + u16 timer; + u16 unused1; + u16 unused2; + u16 unused3; + u8 state; + u8 textState; + u8 unused4; + u8 unused5; + u8 unused6; + u8 unused7; + u8 status; + u8 *unusedBuffer; }; -struct Unk03006370 +struct EReaderData { - u16 unk0; - u32 unk4; - u32 *unk8; + u16 status; + u32 size; + u32 *data; }; static void Task_EReader(u8); -struct Unk03006370 gUnknown_03006370; +struct EReaderData gEReaderData; -extern const u8 gUnknown_089A3470[]; -extern const u8 gMultiBootProgram_BerryGlitchFix_Start[]; +extern const u8 gEReaderLinkData_Start[]; +extern const u8 gEReaderLinkData_End[]; -static void sub_81D4D50(struct Unk03006370 *arg0, int arg1, u32 *arg2) +static void EReader_Load(struct EReaderData *eReader, int size, u32 *data) { volatile u16 backupIME = REG_IME; REG_IME = 0; @@ -53,12 +54,12 @@ static void sub_81D4D50(struct Unk03006370 *arg0, int arg1, u32 *arg2) EReaderHelper_ClearSendRecvMgr(); REG_IE |= INTR_FLAG_VCOUNT; REG_IME = backupIME; - arg0->unk0 = 0; - arg0->unk4 = arg1; - arg0->unk8 = arg2; + eReader->status = 0; + eReader->size = size; + eReader->data = data; } -static void sub_81D4DB8(struct Unk03006370 *arg0) +static void EReader_Reset(struct EReaderData *eReader) { volatile u16 backupIME = REG_IME; REG_IME = 0; @@ -68,21 +69,30 @@ static void sub_81D4DB8(struct Unk03006370 *arg0) REG_IME = backupIME; } -static u8 sub_81D4DE8(struct Unk03006370 *arg0) +// Return values for EReader_Transfer +enum { + TRANSFER_ACTIVE, + TRANSFER_SUCCESS, + TRANSFER_CANCELED, + TRANSFER_TIMEOUT, +}; + +static u8 EReader_Transfer(struct EReaderData *eReader) { - u8 var0 = 0; - arg0->unk0 = EReaderHandleTransfer(1, arg0->unk4, arg0->unk8, NULL); - if ((arg0->unk0 & 0x13) == 0x10) - var0 = 1; + u8 transferStatus = TRANSFER_ACTIVE; + eReader->status = EReaderHandleTransfer(TRUE, eReader->size, eReader->data, NULL); - if (arg0->unk0 & 0x8) - var0 = 2; + if ((eReader->status & EREADER_XFER_MASK) == 0 && eReader->status & EREADER_CHECKSUM_OK_MASK) + transferStatus = TRANSFER_SUCCESS; - if (arg0->unk0 & 0x4) - var0 = 3; + if (eReader->status & EREADER_CANCEL_KEY_MASK) + transferStatus = TRANSFER_CANCELED; + + if (eReader->status & EREADER_CANCEL_TIMEOUT_MASK) + transferStatus = TRANSFER_TIMEOUT; gShouldAdvanceLinkState = 0; - return var0; + return transferStatus; } static void OpenEReaderLink(void) @@ -93,17 +103,20 @@ static void OpenEReaderLink(void) SetSuppressLinkErrorMessage(TRUE); } -static bool32 sub_81D4E60(void) +static bool32 ValidateEReaderConnection(void) { volatile u16 backupIME; - u16 sp4[4]; + u16 handshakes[MAX_LINK_PLAYERS]; backupIME = REG_IME; REG_IME = 0; - *(u64 *)sp4 = *(u64 *)gLink.tempRecvBuffer; + *(u64 *)handshakes = *(u64 *)gLink.handshakeBuffer; REG_IME = backupIME; - if (sp4[0] == 0xB9A0 && sp4[1] == 0xCCD0 - && sp4[2] == 0xFFFF && sp4[3] == 0xFFFF) + + // Validate that we are player 1, the EReader is player 2, + // and that players 3 and 4 are empty. + if (handshakes[0] == SLAVE_HANDSHAKE && handshakes[1] == EREADER_HANDSHAKE + && handshakes[2] == 0xFFFF && handshakes[3] == 0xFFFF) { return TRUE; } @@ -111,7 +124,7 @@ static bool32 sub_81D4E60(void) return FALSE; } -static bool32 sub_81D4EC0(void) +static bool32 IsChildConnected(void) { if (IsLinkMaster() && GetLinkPlayerCount_2() == 2) return TRUE; @@ -119,56 +132,77 @@ static bool32 sub_81D4EC0(void) return FALSE; } -static u32 sub_81D4EE4(u8 *arg0, u16 *arg1) -{ - u8 var0; +// States for TryReceiveCard +enum { + RECV_STATE_INIT, + RECV_STATE_WAIT_START, + RECV_STATE_START, + RECV_STATE_EXCHANGE, + RECV_STATE_START_DISCONNECT, + RECV_STATE_WAIT_DISCONNECT, +}; - var0 = *arg0 - 3; - if (var0 < 3 && HasLinkErrorOccurred()) +// Return values for TryReceiveCard +enum { + RECV_ACTIVE, + RECV_CANCELED, + RECV_SUCCESS, + RECV_ERROR, + RECV_DISCONNECTED, + RECV_TIMEOUT, +}; + +static u32 TryReceiveCard(u8 *state, u16 *timer) +{ + if (*state >= RECV_STATE_EXCHANGE + && *state <= RECV_STATE_WAIT_DISCONNECT + && HasLinkErrorOccurred()) { - *arg0 = 0; - return 3; + // Return error status if an error occurs + // during the link exchange. + *state = 0; + return RECV_ERROR; } - switch (*arg0) + switch (*state) { - case 0: + case RECV_STATE_INIT: if (IsLinkMaster() && GetLinkPlayerCount_2() > 1) { - *arg0 = 1; + *state = RECV_STATE_WAIT_START; } else if (JOY_NEW(B_BUTTON)) { - *arg0 = 0; - return 1; + *state = 0; + return RECV_CANCELED; } break; - case 1: - if (++(*arg1) > 5) + case RECV_STATE_WAIT_START: + if (++(*timer) > 5) { - *arg1 = 0; - *arg0 = 2; + *timer = 0; + *state = RECV_STATE_START; } break; - case 2: + case RECV_STATE_START: if (GetLinkPlayerCount_2() == 2) { PlaySE(SE_DING_DONG); CheckShouldAdvanceLinkState(); - *arg1 = 0; - *arg0 = 3; + *timer = 0; + *state = RECV_STATE_EXCHANGE; } else if (JOY_NEW(B_BUTTON)) { - *arg0 = 0; - return 1; + *state = 0; + return RECV_CANCELED; } break; - case 3: - if (++(*arg1) > 30) + case RECV_STATE_EXCHANGE: + if (++(*timer) > 30) { - *arg0 = 0; - return 5; + *state = 0; + return RECV_TIMEOUT; } if (IsLinkConnectionEstablished()) @@ -177,36 +211,36 @@ static u32 sub_81D4EE4(u8 *arg0, u16 *arg1) { if (IsLinkPlayerDataExchangeComplete()) { - *arg0 = 0; - return 2; + *state = 0; + return RECV_SUCCESS; } else { - *arg0 = 4; + *state = RECV_STATE_START_DISCONNECT; } } else { - *arg0 = 3; + *state = RECV_STATE_EXCHANGE; } } break; - case 4: + case RECV_STATE_START_DISCONNECT: SetCloseLinkCallbackAndType(0); - *arg0 = 5; + *state = RECV_STATE_WAIT_DISCONNECT; break; - case 5: + case RECV_STATE_WAIT_DISCONNECT: if (!gReceivedRemoteLinkPlayers) { - *arg0 = 0; - return 4; + *state = 0; + return RECV_DISCONNECTED; } break; default: - return 0; + return RECV_ACTIVE; } - return 0; + return RECV_ACTIVE; } void CreateEReaderTask(void) @@ -214,248 +248,283 @@ void CreateEReaderTask(void) struct EReaderTaskData *data; u8 taskId = CreateTask(Task_EReader, 0); data = (struct EReaderTaskData *)gTasks[taskId].data; - data->unk8 = 0; - data->unk9 = 0; - data->unkA = 0; - data->unkB = 0; - data->unkC = 0; - data->unkD = 0; - data->unk0 = 0; - data->unk2 = 0; - data->unk4 = 0; - data->unk6 = 0; - data->unkE = 0; - data->unk10 = AllocZeroed(0x40); + data->state = 0; + data->textState = 0; + data->unused4 = 0; + data->unused5 = 0; + data->unused6 = 0; + data->unused7 = 0; + data->timer = 0; + data->unused1 = 0; + data->unused2 = 0; + data->unused3 = 0; + data->status = 0; + data->unusedBuffer = AllocZeroed(0x40); } -static void sub_81D505C(u16 *arg0) +static void ResetTimer(u16 *timer) { - *arg0 = 0; + *timer = 0; } -static bool32 sub_81D5064(u16 *arg0, u16 arg1) +static bool32 UpdateTimer(u16 *timer, u16 time) { - if (++(*arg0) > arg1) + if (++(*timer) > time) { - *arg0 = 0; + // Timer has finished + *timer = 0; return TRUE; } return FALSE; } +// States for Task_EReader +enum { + ER_STATE_START, + ER_STATE_INIT_LINK, + ER_STATE_INIT_LINK_WAIT, + ER_STATE_INIT_LINK_CHECK, + ER_STATE_MSG_SELECT_CONNECT, + ER_STATE_MSG_SELECT_CONNECT_WAIT, + ER_STATE_TRY_LINK, + ER_STATE_INCORRECT_LINK, + ER_STATE_CONNECTING, + ER_STATE_TRANSFER, + ER_STATE_TRANSFER_END, + ER_STATE_TRANSFER_SUCCESS, + ER_STATE_LOAD_CARD_START, + ER_STATE_LOAD_CARD, + ER_STATE_WAIT_RECV_CARD, + ER_STATE_VALIDATE_CARD, + ER_STATE_WAIT_DISCONNECT, + ER_STATE_SAVE, + ER_STATE_SUCCESS_MSG, + ER_STATE_SUCCESS_END, + ER_STATE_LINK_ERROR, + ER_STATE_LINK_ERROR_TRY_AGAIN, + ER_STATE_SAVE_FAILED, + ER_STATE_CANCELED_CARD_READ, + ER_STATE_UNUSED_1, + ER_STATE_UNUSED_2, + ER_STATE_END, +}; + static void Task_EReader(u8 taskId) { struct EReaderTaskData *data = (struct EReaderTaskData *)gTasks[taskId].data; - switch (data->unk8) + switch (data->state) { - case 0: - if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ReceiveMysteryGiftWithEReader)) - data->unk8 = 1; + case ER_STATE_START: + if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_ReceiveMysteryGiftWithEReader)) + data->state = ER_STATE_INIT_LINK; break; - case 1: + case ER_STATE_INIT_LINK: OpenEReaderLink(); - sub_81D505C(&data->unk0); - data->unk8 = 2; + ResetTimer(&data->timer); + data->state = ER_STATE_INIT_LINK_WAIT; break; - case 2: - if (sub_81D5064(&data->unk0, 10)) - data->unk8 = 3; + case ER_STATE_INIT_LINK_WAIT: + if (UpdateTimer(&data->timer, 10)) + data->state = ER_STATE_INIT_LINK_CHECK; break; - case 3: - if (!sub_81D4EC0()) + case ER_STATE_INIT_LINK_CHECK: + if (!IsChildConnected()) { CloseLink(); - data->unk8 = 4; + data->state = ER_STATE_MSG_SELECT_CONNECT; } else { - data->unk8 = 13; + data->state = ER_STATE_LOAD_CARD; } break; - case 4: - if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_SelectConnectFromEReaderMenu)) + case ER_STATE_MSG_SELECT_CONNECT: + if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_SelectConnectFromEReaderMenu)) { AddTextPrinterToWindow1(gJPText_SelectConnectWithGBA); - sub_81D505C(&data->unk0); - data->unk8 = 5; + ResetTimer(&data->timer); + data->state = ER_STATE_MSG_SELECT_CONNECT_WAIT; } break; - case 5: - if (sub_81D5064(&data->unk0, 90)) + case ER_STATE_MSG_SELECT_CONNECT_WAIT: + if (UpdateTimer(&data->timer, 90)) { OpenEReaderLink(); - data->unk8 = 6; + data->state = ER_STATE_TRY_LINK; } else if (JOY_NEW(B_BUTTON)) { - sub_81D505C(&data->unk0); + ResetTimer(&data->timer); PlaySE(SE_SELECT); - data->unk8 = 23; + data->state = ER_STATE_CANCELED_CARD_READ; } break; - case 6: + case ER_STATE_TRY_LINK: if (JOY_NEW(B_BUTTON)) { + // Canceled PlaySE(SE_SELECT); CloseLink(); - sub_81D505C(&data->unk0); - data->unk8 = 23; + ResetTimer(&data->timer); + data->state = ER_STATE_CANCELED_CARD_READ; } else if (GetLinkPlayerCount_2() > 1) { - sub_81D505C(&data->unk0); + ResetTimer(&data->timer); CloseLink(); - data->unk8 = 7; + data->state = ER_STATE_INCORRECT_LINK; } - else if (sub_81D4E60()) + else if (ValidateEReaderConnection()) { + // Successful connection PlaySE(SE_SELECT); CloseLink(); - sub_81D505C(&data->unk0); - data->unk8 = 8; + ResetTimer(&data->timer); + data->state = ER_STATE_CONNECTING; } - else if (sub_81D5064(&data->unk0, 10)) + else if (UpdateTimer(&data->timer, 10)) { + // Retry connection CloseLink(); OpenEReaderLink(); - sub_81D505C(&data->unk0); + ResetTimer(&data->timer); } break; - case 7: - if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_LinkIsIncorrect)) - data->unk8 = 4; + case ER_STATE_INCORRECT_LINK: + if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_LinkIsIncorrect)) + data->state = ER_STATE_MSG_SELECT_CONNECT; break; - case 8: + case ER_STATE_CONNECTING: AddTextPrinterToWindow1(gJPText_Connecting); - // XXX: This (u32*) cast is discarding the const qualifier from gUnknown_089A3470 - sub_81D4D50(&gUnknown_03006370, gMultiBootProgram_BerryGlitchFix_Start - gUnknown_089A3470, (u32*)gUnknown_089A3470); - data->unk8 = 9; + // XXX: This (u32*) cast is discarding the const qualifier from gEReaderLinkData_Start + EReader_Load(&gEReaderData, gEReaderLinkData_End - gEReaderLinkData_Start, (u32*)gEReaderLinkData_Start); + data->state = ER_STATE_TRANSFER; break; - case 9: - data->unkE = sub_81D4DE8(&gUnknown_03006370); - if (data->unkE) - data->unk8 = 10; + case ER_STATE_TRANSFER: + data->status = EReader_Transfer(&gEReaderData); + if (data->status != TRANSFER_ACTIVE) + data->state = ER_STATE_TRANSFER_END; break; - case 10: - sub_81D4DB8(&gUnknown_03006370); - if (data->unkE == 3) + case ER_STATE_TRANSFER_END: + EReader_Reset(&gEReaderData); + if (data->status == TRANSFER_TIMEOUT) { - data->unk8 = 20; + data->state = ER_STATE_LINK_ERROR; } - else if (data->unkE == 1) + else if (data->status == TRANSFER_SUCCESS) { - sub_81D505C(&data->unk0); + ResetTimer(&data->timer); AddTextPrinterToWindow1(gJPText_PleaseWaitAMoment); - data->unk8 = 11; + data->state = ER_STATE_TRANSFER_SUCCESS; } - else + else // TRANSFER_CANCELED { - data->unk8 = 0; + data->state = ER_STATE_START; } break; - case 11: - if (sub_81D5064(&data->unk0, 840)) - data->unk8 = 12; + case ER_STATE_TRANSFER_SUCCESS: + if (UpdateTimer(&data->timer, 840)) + data->state = ER_STATE_LOAD_CARD_START; break; - case 12: + case ER_STATE_LOAD_CARD_START: OpenEReaderLink(); AddTextPrinterToWindow1(gJPText_AllowEReaderToLoadCard); - data->unk8 = 13; + data->state = ER_STATE_LOAD_CARD; break; - case 13: - switch (sub_81D4EE4(&data->unk9, &data->unk0)) + case ER_STATE_LOAD_CARD: + switch (TryReceiveCard(&data->textState, &data->timer)) { - case 0: - break; - case 2: - AddTextPrinterToWindow1(gJPText_Connecting); - data->unk8 = 14; - break; - case 1: - PlaySE(SE_SELECT); - CloseLink(); - data->unk8 = 23; - break; - case 5: - CloseLink(); - data->unk8 = 21; - break; - case 3: - case 4: - CloseLink(); - data->unk8 = 20; - break; + case RECV_ACTIVE: + break; + case RECV_SUCCESS: + AddTextPrinterToWindow1(gJPText_Connecting); + data->state = ER_STATE_WAIT_RECV_CARD; + break; + case RECV_CANCELED: + PlaySE(SE_SELECT); + CloseLink(); + data->state = ER_STATE_CANCELED_CARD_READ; + break; + case RECV_TIMEOUT: + CloseLink(); + data->state = ER_STATE_LINK_ERROR_TRY_AGAIN; + break; + case RECV_ERROR: + case RECV_DISCONNECTED: + CloseLink(); + data->state = ER_STATE_LINK_ERROR; + break; } break; - case 14: + case ER_STATE_WAIT_RECV_CARD: if (HasLinkErrorOccurred()) { CloseLink(); - data->unk8 = 20; + data->state = ER_STATE_LINK_ERROR; } else if (GetBlockReceivedStatus()) { ResetBlockReceivedFlags(); - data->unk8 = 15; + data->state = ER_STATE_VALIDATE_CARD; } break; - case 15: - data->unkE = ValidateTrainerHillData((struct EReaderTrainerHillSet *)gDecompressionBuffer); - SetCloseLinkCallbackAndType(data->unkE); - data->unk8 = 16; + case ER_STATE_VALIDATE_CARD: + data->status = ValidateTrainerHillData((struct EReaderTrainerHillSet *)gDecompressionBuffer); + SetCloseLinkCallbackAndType(data->status); + data->state = ER_STATE_WAIT_DISCONNECT; break; - case 16: + case ER_STATE_WAIT_DISCONNECT: if (!gReceivedRemoteLinkPlayers) { - if (data->unkE == 1) - data->unk8 = 17; + if (data->status == TRUE) // Was data valid? + data->state = ER_STATE_SAVE; else - data->unk8 = 20; + data->state = ER_STATE_LINK_ERROR; } break; - case 17: + case ER_STATE_SAVE: if (TryWriteTrainerHill((struct EReaderTrainerHillSet *)&gDecompressionBuffer)) { AddTextPrinterToWindow1(gJPText_ConnectionComplete); - sub_81D505C(&data->unk0); - data->unk8 = 18; + ResetTimer(&data->timer); + data->state = ER_STATE_SUCCESS_MSG; } else { - data->unk8 = 22; + data->state = ER_STATE_SAVE_FAILED; } break; - case 18: - if (sub_81D5064(&data->unk0, 120)) + case ER_STATE_SUCCESS_MSG: + if (UpdateTimer(&data->timer, 120)) { AddTextPrinterToWindow1(gJPText_NewTrainerHasComeToHoenn); PlayFanfare(MUS_OBTAIN_ITEM); - data->unk8 = 19; + data->state = ER_STATE_SUCCESS_END; } break; - case 19: + case ER_STATE_SUCCESS_END: if (IsFanfareTaskInactive() && (JOY_NEW(A_BUTTON | B_BUTTON))) - data->unk8 = 26; + data->state = ER_STATE_END; break; - case 23: - if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_CardReadingHasBeenHalted)) - data->unk8 = 26; + case ER_STATE_CANCELED_CARD_READ: + if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_CardReadingHasBeenHalted)) + data->state = ER_STATE_END; break; - case 20: - if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ConnectionErrorCheckLink)) - data->unk8 = 0; + case ER_STATE_LINK_ERROR: + if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_ConnectionErrorCheckLink)) + data->state = ER_STATE_START; break; - case 21: - if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_ConnectionErrorTryAgain)) - data->unk8 = 0; + case ER_STATE_LINK_ERROR_TRY_AGAIN: + if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_ConnectionErrorTryAgain)) + data->state = ER_STATE_START; break; - case 22: - if (PrintMysteryGiftMenuMessage(&data->unk9, gJPText_WriteErrorUnableToSaveData)) - data->unk8 = 0; + case ER_STATE_SAVE_FAILED: + if (PrintMysteryGiftMenuMessage(&data->textState, gJPText_WriteErrorUnableToSaveData)) + data->state = ER_STATE_START; break; - case 26: - Free(data->unk10); + case ER_STATE_END: + Free(data->unusedBuffer); DestroyTask(taskId); SetMainCallback2(MainCB_FreeAllBuffersAndReturnToInitTitleScreen); break; diff --git a/src/link.c b/src/link.c index 66549f648c..19b6d0f813 100644 --- a/src/link.c +++ b/src/link.c @@ -2192,30 +2192,26 @@ static bool8 DoHandshake(void) { REG_SIOMLT_SEND = SLAVE_HANDSHAKE; } - *(u64 *)gLink.tempRecvBuffer = REG_SIOMLT_RECV; + *(u64 *)gLink.handshakeBuffer = REG_SIOMLT_RECV; REG_SIOMLT_RECV = 0; gLink.handshakeAsMaster = FALSE; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_LINK_PLAYERS; i++) { - if ((gLink.tempRecvBuffer[i] & ~0x3) == SLAVE_HANDSHAKE || gLink.tempRecvBuffer[i] == MASTER_HANDSHAKE) + if ((gLink.handshakeBuffer[i] & ~0x3) == SLAVE_HANDSHAKE || gLink.handshakeBuffer[i] == MASTER_HANDSHAKE) { playerCount++; - if (minRecv > gLink.tempRecvBuffer[i] && gLink.tempRecvBuffer[i] != 0) - { - minRecv = gLink.tempRecvBuffer[i]; - } + if (minRecv > gLink.handshakeBuffer[i] && gLink.handshakeBuffer[i] != 0) + minRecv = gLink.handshakeBuffer[i]; } else { - if (gLink.tempRecvBuffer[i] != 0xFFFF) - { + if (gLink.handshakeBuffer[i] != 0xFFFF) playerCount = 0; - } break; } } gLink.playerCount = playerCount; - if (gLink.playerCount > 1 && gLink.playerCount == sHandshakePlayerCount && gLink.tempRecvBuffer[0] == MASTER_HANDSHAKE) + if (gLink.playerCount > 1 && gLink.playerCount == sHandshakePlayerCount && gLink.handshakeBuffer[0] == MASTER_HANDSHAKE) { return TRUE; } From fbf3bf2ce8e8dfff61afab94ebb72fb1671d3ea4 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 26 Oct 2021 22:43:56 -0400 Subject: [PATCH 100/417] Replace 'mystery_event_club' --- data/event_scripts.s | 2 +- .../PetalburgCity_PokemonCenter_1F/map.json | 2 +- data/scripts/mystery_event_club.inc | 170 ------------------ data/scripts/profile_man.inc | 170 ++++++++++++++++++ 4 files changed, 172 insertions(+), 172 deletions(-) delete mode 100644 data/scripts/mystery_event_club.inc create mode 100644 data/scripts/profile_man.inc diff --git a/data/event_scripts.s b/data/event_scripts.s index a68c339a60..bbf25c93cf 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1026,7 +1026,7 @@ Common_EventScript_LegendaryFlewAway:: .include "data/scripts/mauville_man.inc" .include "data/scripts/field_move_scripts.inc" .include "data/scripts/item_ball_scripts.inc" - .include "data/scripts/mystery_event_club.inc" + .include "data/scripts/profile_man.inc" .include "data/scripts/day_care.inc" .include "data/scripts/flash.inc" .include "data/scripts/players_house.inc" diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/map.json b/data/maps/PetalburgCity_PokemonCenter_1F/map.json index 1fd6e972b9..875c53c2b9 100644 --- a/data/maps/PetalburgCity_PokemonCenter_1F/map.json +++ b/data/maps/PetalburgCity_PokemonCenter_1F/map.json @@ -37,7 +37,7 @@ "movement_range_y": 0, "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", - "script": "MysteryEventClub_EventScript_Man", + "script": "ProfileMan_EventScript_Man", "flag": "0" }, { diff --git a/data/scripts/mystery_event_club.inc b/data/scripts/mystery_event_club.inc deleted file mode 100644 index f0cb559983..0000000000 --- a/data/scripts/mystery_event_club.inc +++ /dev/null @@ -1,170 +0,0 @@ -MysteryEventClub_EventScript_Man:: - lock - faceplayer - goto_if_set FLAG_SYS_CHAT_USED, MysteryEventClub_EventScript_GivenProfileBefore - msgbox MysteryEventClub_Text_CollectTrainerProfiles, MSGBOX_DEFAULT - goto MysteryEventClub_EventScript_AskToSeeProfile - end - -MysteryEventClub_EventScript_AskToSeeProfile:: - msgbox MysteryEventClub_Text_MayISeeYourProfile, MSGBOX_DEFAULT - multichoice 17, 6, MULTI_YESNOINFO_2, FALSE - switch VAR_RESULT - case 0, MysteryEventClub_EventScript_CreateProfile - case 1, MysteryEventClub_EventScript_DeclineShowProfile - case 2, MysteryEventClub_EventScript_Info - case MULTI_B_PRESSED, MysteryEventClub_EventScript_DeclineShowProfile - end - -MysteryEventClub_EventScript_Info:: - msgbox MysteryEventClub_Text_EasyChatExplanation, MSGBOX_DEFAULT - goto MysteryEventClub_EventScript_AskToSeeProfile - end - -MysteryEventClub_EventScript_CreateProfile:: - msgbox MysteryEventClub_Text_LetsSeeItThen, MSGBOX_DEFAULT - closemessage - setvar VAR_0x8004, EASY_CHAT_TYPE_PROFILE - call Common_ShowEasyChatScreen - lock - faceplayer - compare VAR_RESULT, 0 - goto_if_eq MysteryEventClub_EventScript_CancelShowProfile - compare VAR_RESULT, 1 - goto_if_eq MysteryEventClub_EventScript_ShowProfile - end - -MysteryEventClub_EventScript_CancelShowProfile:: - msgbox MysteryEventClub_Text_NotIntoItRightNow, MSGBOX_DEFAULT - release - end - -MysteryEventClub_EventScript_ShowProfile:: - setvar VAR_0x8004, 0 - special ShowEasyChatProfile - waitmessage - delay 80 - msgbox MysteryEventClub_Text_FantasticProfile, MSGBOX_DEFAULT - release - end - -MysteryEventClub_EventScript_DeclineShowProfile:: - msgbox MysteryEventClub_Text_ImagineYouWouldHaveWonderfulProfile, MSGBOX_DEFAULT - release - end - -MysteryEventClub_EventScript_GivenProfileBefore:: - msgbox MysteryEventClub_Text_YouHaveWonderfulSmile, MSGBOX_DEFAULT - goto MysteryEventClub_EventScript_AskToSeeNewProfile - end - -MysteryEventClub_EventScript_AskToSeeNewProfile:: - msgbox MysteryEventClub_Text_MayISeeYourNewProfile, MSGBOX_DEFAULT - multichoice 17, 6, MULTI_YESNOINFO_2, FALSE - switch VAR_RESULT - case 0, MysteryEventClub_EventScript_CreateNewProfile - case 1, MysteryEventClub_EventScript_DeclineNewProfile - case 2, MysteryEventClub_EventScript_InfoNewProfile - case MULTI_B_PRESSED, MysteryEventClub_EventScript_DeclineNewProfile - end - -MysteryEventClub_EventScript_InfoNewProfile:: - msgbox MysteryEventClub_Text_EasyChatExplanation, MSGBOX_DEFAULT - goto MysteryEventClub_EventScript_AskToSeeNewProfile - end - -MysteryEventClub_EventScript_CreateNewProfile:: - msgbox MysteryEventClub_Text_EvenBetterThanLastProfile, MSGBOX_DEFAULT - closemessage - setvar VAR_0x8004, EASY_CHAT_TYPE_PROFILE - call Common_ShowEasyChatScreen - lock - faceplayer - compare VAR_RESULT, 0 - goto_if_eq MysteryEventClub_EventScript_CancelShowProfile - compare VAR_RESULT, 1 - goto_if_eq MysteryEventClub_EventScript_ShowProfile - end - -MysteryEventClub_EventScript_DeclineNewProfile:: - msgbox MysteryEventClub_Text_LikeProfileWayItIs, MSGBOX_DEFAULT - release - end - -@ Unused -MysteryEventClub_EventScript_Ret:: - return - -MysteryEventClub_Text_CollectTrainerProfiles: - .string "Hello there, TRAINER!\n" - .string "You've got a wonderful smile, there.\p" - .string "I have a hobby--collecting the profiles\n" - .string "of POKéMON TRAINERS.$" - -MysteryEventClub_Text_MayISeeYourProfile: - .string "So, how about it?\n" - .string "May I see your profile?$" - -MysteryEventClub_Text_EasyChatExplanation: - .string "You make your own profile by putting\n" - .string "together four words or phrases.\p" - .string "Here, I'll show you an example of a\n" - .string "profile using four pieces of text.\p" - .string "You can switch those four pieces with\n" - .string "other text pieces any which way you\l" - .string "like to make your own profile.\p" - .string "There are a lot of text pieces that\n" - .string "you can use.\p" - .string "They are arranged in groups like\n" - .string "POKéMON, lifestyles, and hobbies so\l" - .string "it is easier to look them up.\p" - .string "So, first, choose the group of text\n" - .string "pieces to display a list of choices.\p" - .string "Then, pick the choice you want.\p" - .string "Repeat for the remaining text choices,\n" - .string "and you'll have your very own profile.$" - -MysteryEventClub_Text_LetsSeeItThen: - .string "Yes! Thank you!\n" - .string "So, let's see it, then.$" - -MysteryEventClub_Text_ImagineYouWouldHaveWonderfulProfile: - .string "Oh, no, really?\p" - .string "I imagine someone like you would have\n" - .string "a wonderful profile…$" - -MysteryEventClub_Text_NotIntoItRightNow: - .string "Oh? You're not into it right now?\p" - .string "Well, anytime is good by me!$" - -MysteryEventClub_Text_YouHaveWonderfulSmile: - .string "Hello there, TRAINER!\n" - .string "You've got a wonderful smile.$" - -MysteryEventClub_Text_MayISeeYourNewProfile: - .string "May I see your new profile?$" - -MysteryEventClub_Text_EvenBetterThanLastProfile: - .string "Yes! Thank you!\p" - .string "I hope it's even better than the profile\n" - .string "you showed me before.$" - -MysteryEventClub_Text_LikeProfileWayItIs: - .string "Oh, you like your profile the way it is.\p" - .string "I don't blame you--it's a wonderful\n" - .string "profile the way it is now.$" - -MysteryEventClub_Text_FantasticProfile: - .string "F-fantastic!\p" - .string "Your profile, it's wonderful!\n" - .string "It really says what you're about.\p" - .string "Why, anyone hearing this profile would\n" - .string "be captivated by you!\p" - .string "Thank you!$" - -@ Unused -MysteryEventClub_Text_YouKnowSecretSaying: - .string "Oh?\n" - .string "You know the secret saying!\p" - .string "That means you're now a fellow member\n" - .string "of the MYSTERY EVENT CLUB!$" diff --git a/data/scripts/profile_man.inc b/data/scripts/profile_man.inc new file mode 100644 index 0000000000..2c5b16122c --- /dev/null +++ b/data/scripts/profile_man.inc @@ -0,0 +1,170 @@ +ProfileMan_EventScript_Man:: + lock + faceplayer + goto_if_set FLAG_SYS_CHAT_USED, ProfileMan_EventScript_GivenProfileBefore + msgbox ProfileMan_Text_CollectTrainerProfiles, MSGBOX_DEFAULT + goto ProfileMan_EventScript_AskToSeeProfile + end + +ProfileMan_EventScript_AskToSeeProfile:: + msgbox ProfileMan_Text_MayISeeYourProfile, MSGBOX_DEFAULT + multichoice 17, 6, MULTI_YESNOINFO_2, FALSE + switch VAR_RESULT + case 0, ProfileMan_EventScript_CreateProfile + case 1, ProfileMan_EventScript_DeclineShowProfile + case 2, ProfileMan_EventScript_Info + case MULTI_B_PRESSED, ProfileMan_EventScript_DeclineShowProfile + end + +ProfileMan_EventScript_Info:: + msgbox ProfileMan_Text_EasyChatExplanation, MSGBOX_DEFAULT + goto ProfileMan_EventScript_AskToSeeProfile + end + +ProfileMan_EventScript_CreateProfile:: + msgbox ProfileMan_Text_LetsSeeItThen, MSGBOX_DEFAULT + closemessage + setvar VAR_0x8004, EASY_CHAT_TYPE_PROFILE + call Common_ShowEasyChatScreen + lock + faceplayer + compare VAR_RESULT, 0 + goto_if_eq ProfileMan_EventScript_CancelShowProfile + compare VAR_RESULT, 1 + goto_if_eq ProfileMan_EventScript_ShowProfile + end + +ProfileMan_EventScript_CancelShowProfile:: + msgbox ProfileMan_Text_NotIntoItRightNow, MSGBOX_DEFAULT + release + end + +ProfileMan_EventScript_ShowProfile:: + setvar VAR_0x8004, 0 + special ShowEasyChatProfile + waitmessage + delay 80 + msgbox ProfileMan_Text_FantasticProfile, MSGBOX_DEFAULT + release + end + +ProfileMan_EventScript_DeclineShowProfile:: + msgbox ProfileMan_Text_ImagineYouWouldHaveWonderfulProfile, MSGBOX_DEFAULT + release + end + +ProfileMan_EventScript_GivenProfileBefore:: + msgbox ProfileMan_Text_YouHaveWonderfulSmile, MSGBOX_DEFAULT + goto ProfileMan_EventScript_AskToSeeNewProfile + end + +ProfileMan_EventScript_AskToSeeNewProfile:: + msgbox ProfileMan_Text_MayISeeYourNewProfile, MSGBOX_DEFAULT + multichoice 17, 6, MULTI_YESNOINFO_2, FALSE + switch VAR_RESULT + case 0, ProfileMan_EventScript_CreateNewProfile + case 1, ProfileMan_EventScript_DeclineNewProfile + case 2, ProfileMan_EventScript_InfoNewProfile + case MULTI_B_PRESSED, ProfileMan_EventScript_DeclineNewProfile + end + +ProfileMan_EventScript_InfoNewProfile:: + msgbox ProfileMan_Text_EasyChatExplanation, MSGBOX_DEFAULT + goto ProfileMan_EventScript_AskToSeeNewProfile + end + +ProfileMan_EventScript_CreateNewProfile:: + msgbox ProfileMan_Text_EvenBetterThanLastProfile, MSGBOX_DEFAULT + closemessage + setvar VAR_0x8004, EASY_CHAT_TYPE_PROFILE + call Common_ShowEasyChatScreen + lock + faceplayer + compare VAR_RESULT, 0 + goto_if_eq ProfileMan_EventScript_CancelShowProfile + compare VAR_RESULT, 1 + goto_if_eq ProfileMan_EventScript_ShowProfile + end + +ProfileMan_EventScript_DeclineNewProfile:: + msgbox ProfileMan_Text_LikeProfileWayItIs, MSGBOX_DEFAULT + release + end + +@ Unused +ProfileMan_EventScript_Ret:: + return + +ProfileMan_Text_CollectTrainerProfiles: + .string "Hello there, TRAINER!\n" + .string "You've got a wonderful smile, there.\p" + .string "I have a hobby--collecting the profiles\n" + .string "of POKéMON TRAINERS.$" + +ProfileMan_Text_MayISeeYourProfile: + .string "So, how about it?\n" + .string "May I see your profile?$" + +ProfileMan_Text_EasyChatExplanation: + .string "You make your own profile by putting\n" + .string "together four words or phrases.\p" + .string "Here, I'll show you an example of a\n" + .string "profile using four pieces of text.\p" + .string "You can switch those four pieces with\n" + .string "other text pieces any which way you\l" + .string "like to make your own profile.\p" + .string "There are a lot of text pieces that\n" + .string "you can use.\p" + .string "They are arranged in groups like\n" + .string "POKéMON, lifestyles, and hobbies so\l" + .string "it is easier to look them up.\p" + .string "So, first, choose the group of text\n" + .string "pieces to display a list of choices.\p" + .string "Then, pick the choice you want.\p" + .string "Repeat for the remaining text choices,\n" + .string "and you'll have your very own profile.$" + +ProfileMan_Text_LetsSeeItThen: + .string "Yes! Thank you!\n" + .string "So, let's see it, then.$" + +ProfileMan_Text_ImagineYouWouldHaveWonderfulProfile: + .string "Oh, no, really?\p" + .string "I imagine someone like you would have\n" + .string "a wonderful profile…$" + +ProfileMan_Text_NotIntoItRightNow: + .string "Oh? You're not into it right now?\p" + .string "Well, anytime is good by me!$" + +ProfileMan_Text_YouHaveWonderfulSmile: + .string "Hello there, TRAINER!\n" + .string "You've got a wonderful smile.$" + +ProfileMan_Text_MayISeeYourNewProfile: + .string "May I see your new profile?$" + +ProfileMan_Text_EvenBetterThanLastProfile: + .string "Yes! Thank you!\p" + .string "I hope it's even better than the profile\n" + .string "you showed me before.$" + +ProfileMan_Text_LikeProfileWayItIs: + .string "Oh, you like your profile the way it is.\p" + .string "I don't blame you--it's a wonderful\n" + .string "profile the way it is now.$" + +ProfileMan_Text_FantasticProfile: + .string "F-fantastic!\p" + .string "Your profile, it's wonderful!\n" + .string "It really says what you're about.\p" + .string "Why, anyone hearing this profile would\n" + .string "be captivated by you!\p" + .string "Thank you!$" + +@ Unused +ProfileMan_Text_YouKnowSecretSaying: + .string "Oh?\n" + .string "You know the secret saying!\p" + .string "That means you're now a fellow member\n" + .string "of the MYSTERY EVENT CLUB!$" From 41ecae91f82d901fa61da79e29b4e4aeea72e69f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 26 Oct 2021 16:52:23 -0400 Subject: [PATCH 101/417] Label remaining symbols in graphics.c --- .../backgrounds/solarbeam.bin} | Bin graphics/battle_anims/sprites/black_ball.bin | Bin 0 -> 36 bytes .../{ => battle_anims}/unused/goosuto.bin | Bin .../{ => battle_anims}/unused/goosuto.png | Bin .../unused/lights.bin} | Bin .../unused/lights.png} | Bin .../{ => battle_anims}/unused/line_sketch.png | Bin .../unused/line_sketch_2.bin | Bin .../unused/line_sketch_2.png | Bin .../unused/line_sketch_2_pal.bin} | Bin .../unused/metronome_hand_small.png | Bin .../unused/music_notes.pal} | 0 .../{ => battle_anims}/unused/music_notes.png | Bin .../{ => battle_anims}/unused/old_beatup.png | Bin .../unused/spinning_ball.png} | Bin .../unused/spinning_ball_2.pal} | 0 .../{unused.pal => unused/unknown.pal} | 0 .../unused/unknown_1.bin} | Bin .../unused/unknown_2.bin} | Bin .../unused/unknown_2.pal} | 0 .../unused/unknown_3.bin} | Bin .../unused/unknown_4.bin} | Bin .../{unused_water.bin => unused/water.bin} | Bin .../water_gfx.png} | Bin .../unused/water_splash.bin | Bin .../unused/water_splash.png | Bin ...bin => multi_battle_intro_bg_opponent.bin} | Bin ...2.bin => multi_battle_intro_bg_player.bin} | Bin .../{pyramid_light.pal => pyramid_floor.pal} | 0 ...n_32C2D4.png => unused_status_summary.png} | Bin .../audience.bin} | Bin .../curtain.bin} | Bin .../interface.bin} | Bin graphics/contest/{misc.png => interface.png} | Bin .../interface_audience.pal} | 0 .../japanese/audience.png} | Bin .../japanese/floor.png} | Bin .../japanese/frame_1.png} | Bin .../japanese/frame_2.png} | Bin .../japanese/interface.png} | Bin .../japanese/letters.png} | Bin .../japanese/meter.png} | Bin .../japanese/numbers.png} | Bin .../japanese/palette.pal} | 0 .../japanese/symbols.png} | Bin .../japanese/tilemap_1.bin} | Bin .../japanese/tilemap_2.bin} | Bin .../japanese/voltage.png} | Bin .../unused_tilemap_1.bin} | Bin .../unused_tilemap_2.bin} | Bin .../bag_pyramid_interface.pal} | 0 ...map2.bin => summary_page_battle_moves.bin} | Bin ...ap3.bin => summary_page_contest_moves.bin} | Bin ...tatus_screen.bin => summary_page_info.bin} | Bin ...ilemap0.bin => summary_page_info_copy.bin} | Bin ...s_tilemap1.bin => summary_page_skills.bin} | Bin .../{status_screen.pal => summary_screen.pal} | 0 .../{status_screen.png => summary_screen.png} | Bin .../deoxys/icon_speed_wide.png} | Bin .../unused_garbage.bin} | Bin .../trade/{unknown_DDCF04.bin => menu.bin} | Bin .../unused_DDCEE4.bin => trade/unused.bin} | Bin .../records_window.bin} | Bin .../records_window.png} | Bin graphics/unknown/unknown_C035B8.png | Bin 156 -> 0 bytes graphics_file_rules.mk | 23 ++- include/graphics.h | 58 +++--- include/main.h | 1 - include/menu.h | 3 +- src/battle_anim_effects_3.c | 2 +- src/battle_anim_water.c | 4 +- src/battle_bg.c | 14 +- src/battle_gfx_sfx_util.c | 2 +- src/battle_interface.c | 4 +- src/battle_message.c | 9 +- src/battle_pyramid.c | 6 +- src/battle_pyramid_bag.c | 10 +- src/battle_records.c | 9 +- src/clear_save_data_screen.c | 2 +- src/contest.c | 18 +- src/data/graphics/pokemon.h | 4 +- src/diploma.c | 2 +- src/graphics.c | 188 ++++++++---------- src/item_menu.c | 2 +- src/link.c | 2 +- src/menu.c | 18 +- src/menu_specialized.c | 2 +- src/party_menu.c | 2 +- src/pokeblock.c | 6 +- src/pokeblock_feed.c | 4 +- src/pokemon_summary_screen.c | 16 +- src/save_failed_screen.c | 2 +- src/title_screen.c | 4 +- src/trade.c | 8 +- src/union_room_battle.c | 2 +- src/union_room_chat.c | 2 +- 96 files changed, 201 insertions(+), 228 deletions(-) rename graphics/{unknown/unknown_E6BC04.bin => battle_anims/backgrounds/solarbeam.bin} (100%) create mode 100644 graphics/battle_anims/sprites/black_ball.bin rename graphics/{ => battle_anims}/unused/goosuto.bin (100%) rename graphics/{ => battle_anims}/unused/goosuto.png (100%) rename graphics/{unknown/unknown_D1C060.bin => battle_anims/unused/lights.bin} (100%) rename graphics/{unknown/unknown_D1C060.png => battle_anims/unused/lights.png} (100%) rename graphics/{ => battle_anims}/unused/line_sketch.png (100%) rename graphics/{ => battle_anims}/unused/line_sketch_2.bin (100%) rename graphics/{ => battle_anims}/unused/line_sketch_2.png (100%) rename graphics/{unknown/unknown_C0CAE0.bin => battle_anims/unused/line_sketch_2_pal.bin} (100%) rename graphics/{ => battle_anims}/unused/metronome_hand_small.png (100%) rename graphics/{unused/battle_anim_023.pal => battle_anims/unused/music_notes.pal} (100%) rename graphics/{ => battle_anims}/unused/music_notes.png (100%) rename graphics/{ => battle_anims}/unused/old_beatup.png (100%) rename graphics/{unknown/unknown_C06D98.png => battle_anims/unused/spinning_ball.png} (100%) rename graphics/{unknown/unknown_C06D98_2.pal => battle_anims/unused/spinning_ball_2.pal} (100%) rename graphics/battle_anims/{unused.pal => unused/unknown.pal} (100%) rename graphics/{unknown/unknown_C0CA1C.bin => battle_anims/unused/unknown_1.bin} (100%) rename graphics/{unknown/unknown_C0CA40.bin => battle_anims/unused/unknown_2.bin} (100%) rename graphics/{unknown/unknown_C2F9E0.pal => battle_anims/unused/unknown_2.pal} (100%) rename graphics/{unknown/unknown_C0CA64.bin => battle_anims/unused/unknown_3.bin} (100%) rename graphics/{unknown/unknown_D0D2B4.bin => battle_anims/unused/unknown_4.bin} (100%) rename graphics/battle_anims/{unused_water.bin => unused/water.bin} (100%) rename graphics/battle_anims/{unused_water_gfx.png => unused/water_gfx.png} (100%) rename graphics/{ => battle_anims}/unused/water_splash.bin (100%) rename graphics/{ => battle_anims}/unused/water_splash.png (100%) rename graphics/battle_frontier/{battle_tilemap1.bin => multi_battle_intro_bg_opponent.bin} (100%) rename graphics/battle_frontier/{battle_tilemap2.bin => multi_battle_intro_bg_player.bin} (100%) rename graphics/battle_frontier/{pyramid_light.pal => pyramid_floor.pal} (100%) rename graphics/battle_interface/{unknown_32C2D4.png => unused_status_summary.png} (100%) rename graphics/{unused/old_contest_2.bin => contest/audience.bin} (100%) rename graphics/{unknown/unknown_C17980.bin => contest/curtain.bin} (100%) rename graphics/{unknown/unknown_C17170.bin => contest/interface.bin} (100%) rename graphics/contest/{misc.png => interface.png} (100%) rename graphics/{unused/old_contest_2.pal => contest/interface_audience.pal} (100%) rename graphics/{unused/old_contest_2_2.png => contest/japanese/audience.png} (100%) rename graphics/{unused/old_contest_floor.png => contest/japanese/floor.png} (100%) rename graphics/{unused/old_contest_frame_1.png => contest/japanese/frame_1.png} (100%) rename graphics/{unused/old_contest_frame_2.png => contest/japanese/frame_2.png} (100%) rename graphics/{unused/old_contest_2_1.png => contest/japanese/interface.png} (100%) rename graphics/{unused/old_contest_classes.png => contest/japanese/letters.png} (100%) rename graphics/{unused/old_contest_meter.png => contest/japanese/meter.png} (100%) rename graphics/{unused/old_contest_numbers.png => contest/japanese/numbers.png} (100%) rename graphics/{unused/old_contest.pal => contest/japanese/palette.pal} (100%) rename graphics/{unused/old_contest_symbols.png => contest/japanese/symbols.png} (100%) rename graphics/{unused/old_contest.bin => contest/japanese/tilemap_1.bin} (100%) rename graphics/{unknown/unknown_C15BC0.bin => contest/japanese/tilemap_2.bin} (100%) rename graphics/{unknown/unknown_C19470.png => contest/japanese/voltage.png} (100%) rename graphics/{unknown/unknown_C17410.bin => contest/unused_tilemap_1.bin} (100%) rename graphics/{unknown/unknown_C1751C.bin => contest/unused_tilemap_2.bin} (100%) rename graphics/{unknown/unknown_D9AF44.pal => interface/bag_pyramid_interface.pal} (100%) rename graphics/interface/{status_tilemap2.bin => summary_page_battle_moves.bin} (100%) rename graphics/interface/{status_tilemap3.bin => summary_page_contest_moves.bin} (100%) rename graphics/interface/{status_screen.bin => summary_page_info.bin} (100%) rename graphics/interface/{status_tilemap0.bin => summary_page_info_copy.bin} (100%) rename graphics/interface/{status_tilemap1.bin => summary_page_skills.bin} (100%) rename graphics/interface/{status_screen.pal => summary_screen.pal} (100%) rename graphics/interface/{status_screen.png => summary_screen.png} (100%) rename graphics/{unused/deoxys_speed_icon_wide.png => pokemon/deoxys/icon_speed_wide.png} (100%) rename graphics/{unknown/unknown_D437F8.bin => pokemon/unused_garbage.bin} (100%) rename graphics/trade/{unknown_DDCF04.bin => menu.bin} (100%) rename graphics/{unused/unused_DDCEE4.bin => trade/unused.bin} (100%) rename graphics/{unknown/unknown_5B3564.bin => trainer_hill/records_window.bin} (100%) rename graphics/{unknown/unknown_5B3484.png => trainer_hill/records_window.png} (100%) delete mode 100644 graphics/unknown/unknown_C035B8.png diff --git a/graphics/unknown/unknown_E6BC04.bin b/graphics/battle_anims/backgrounds/solarbeam.bin similarity index 100% rename from graphics/unknown/unknown_E6BC04.bin rename to graphics/battle_anims/backgrounds/solarbeam.bin diff --git a/graphics/battle_anims/sprites/black_ball.bin b/graphics/battle_anims/sprites/black_ball.bin new file mode 100644 index 0000000000000000000000000000000000000000..4a6592a8edc36cade78caec09192fd5174eb5e6c GIT binary patch literal 36 pcmWeoU|>)%HWpwsa5iRUW;Zc5aByZ|V_;`s=5Tg4HU=^o7yw7&1D^l@ literal 0 HcmV?d00001 diff --git a/graphics/unused/goosuto.bin b/graphics/battle_anims/unused/goosuto.bin similarity index 100% rename from graphics/unused/goosuto.bin rename to graphics/battle_anims/unused/goosuto.bin diff --git a/graphics/unused/goosuto.png b/graphics/battle_anims/unused/goosuto.png similarity index 100% rename from graphics/unused/goosuto.png rename to graphics/battle_anims/unused/goosuto.png diff --git a/graphics/unknown/unknown_D1C060.bin b/graphics/battle_anims/unused/lights.bin similarity index 100% rename from graphics/unknown/unknown_D1C060.bin rename to graphics/battle_anims/unused/lights.bin diff --git a/graphics/unknown/unknown_D1C060.png b/graphics/battle_anims/unused/lights.png similarity index 100% rename from graphics/unknown/unknown_D1C060.png rename to graphics/battle_anims/unused/lights.png diff --git a/graphics/unused/line_sketch.png b/graphics/battle_anims/unused/line_sketch.png similarity index 100% rename from graphics/unused/line_sketch.png rename to graphics/battle_anims/unused/line_sketch.png diff --git a/graphics/unused/line_sketch_2.bin b/graphics/battle_anims/unused/line_sketch_2.bin similarity index 100% rename from graphics/unused/line_sketch_2.bin rename to graphics/battle_anims/unused/line_sketch_2.bin diff --git a/graphics/unused/line_sketch_2.png b/graphics/battle_anims/unused/line_sketch_2.png similarity index 100% rename from graphics/unused/line_sketch_2.png rename to graphics/battle_anims/unused/line_sketch_2.png diff --git a/graphics/unknown/unknown_C0CAE0.bin b/graphics/battle_anims/unused/line_sketch_2_pal.bin similarity index 100% rename from graphics/unknown/unknown_C0CAE0.bin rename to graphics/battle_anims/unused/line_sketch_2_pal.bin diff --git a/graphics/unused/metronome_hand_small.png b/graphics/battle_anims/unused/metronome_hand_small.png similarity index 100% rename from graphics/unused/metronome_hand_small.png rename to graphics/battle_anims/unused/metronome_hand_small.png diff --git a/graphics/unused/battle_anim_023.pal b/graphics/battle_anims/unused/music_notes.pal similarity index 100% rename from graphics/unused/battle_anim_023.pal rename to graphics/battle_anims/unused/music_notes.pal diff --git a/graphics/unused/music_notes.png b/graphics/battle_anims/unused/music_notes.png similarity index 100% rename from graphics/unused/music_notes.png rename to graphics/battle_anims/unused/music_notes.png diff --git a/graphics/unused/old_beatup.png b/graphics/battle_anims/unused/old_beatup.png similarity index 100% rename from graphics/unused/old_beatup.png rename to graphics/battle_anims/unused/old_beatup.png diff --git a/graphics/unknown/unknown_C06D98.png b/graphics/battle_anims/unused/spinning_ball.png similarity index 100% rename from graphics/unknown/unknown_C06D98.png rename to graphics/battle_anims/unused/spinning_ball.png diff --git a/graphics/unknown/unknown_C06D98_2.pal b/graphics/battle_anims/unused/spinning_ball_2.pal similarity index 100% rename from graphics/unknown/unknown_C06D98_2.pal rename to graphics/battle_anims/unused/spinning_ball_2.pal diff --git a/graphics/battle_anims/unused.pal b/graphics/battle_anims/unused/unknown.pal similarity index 100% rename from graphics/battle_anims/unused.pal rename to graphics/battle_anims/unused/unknown.pal diff --git a/graphics/unknown/unknown_C0CA1C.bin b/graphics/battle_anims/unused/unknown_1.bin similarity index 100% rename from graphics/unknown/unknown_C0CA1C.bin rename to graphics/battle_anims/unused/unknown_1.bin diff --git a/graphics/unknown/unknown_C0CA40.bin b/graphics/battle_anims/unused/unknown_2.bin similarity index 100% rename from graphics/unknown/unknown_C0CA40.bin rename to graphics/battle_anims/unused/unknown_2.bin diff --git a/graphics/unknown/unknown_C2F9E0.pal b/graphics/battle_anims/unused/unknown_2.pal similarity index 100% rename from graphics/unknown/unknown_C2F9E0.pal rename to graphics/battle_anims/unused/unknown_2.pal diff --git a/graphics/unknown/unknown_C0CA64.bin b/graphics/battle_anims/unused/unknown_3.bin similarity index 100% rename from graphics/unknown/unknown_C0CA64.bin rename to graphics/battle_anims/unused/unknown_3.bin diff --git a/graphics/unknown/unknown_D0D2B4.bin b/graphics/battle_anims/unused/unknown_4.bin similarity index 100% rename from graphics/unknown/unknown_D0D2B4.bin rename to graphics/battle_anims/unused/unknown_4.bin diff --git a/graphics/battle_anims/unused_water.bin b/graphics/battle_anims/unused/water.bin similarity index 100% rename from graphics/battle_anims/unused_water.bin rename to graphics/battle_anims/unused/water.bin diff --git a/graphics/battle_anims/unused_water_gfx.png b/graphics/battle_anims/unused/water_gfx.png similarity index 100% rename from graphics/battle_anims/unused_water_gfx.png rename to graphics/battle_anims/unused/water_gfx.png diff --git a/graphics/unused/water_splash.bin b/graphics/battle_anims/unused/water_splash.bin similarity index 100% rename from graphics/unused/water_splash.bin rename to graphics/battle_anims/unused/water_splash.bin diff --git a/graphics/unused/water_splash.png b/graphics/battle_anims/unused/water_splash.png similarity index 100% rename from graphics/unused/water_splash.png rename to graphics/battle_anims/unused/water_splash.png diff --git a/graphics/battle_frontier/battle_tilemap1.bin b/graphics/battle_frontier/multi_battle_intro_bg_opponent.bin similarity index 100% rename from graphics/battle_frontier/battle_tilemap1.bin rename to graphics/battle_frontier/multi_battle_intro_bg_opponent.bin diff --git a/graphics/battle_frontier/battle_tilemap2.bin b/graphics/battle_frontier/multi_battle_intro_bg_player.bin similarity index 100% rename from graphics/battle_frontier/battle_tilemap2.bin rename to graphics/battle_frontier/multi_battle_intro_bg_player.bin diff --git a/graphics/battle_frontier/pyramid_light.pal b/graphics/battle_frontier/pyramid_floor.pal similarity index 100% rename from graphics/battle_frontier/pyramid_light.pal rename to graphics/battle_frontier/pyramid_floor.pal diff --git a/graphics/battle_interface/unknown_32C2D4.png b/graphics/battle_interface/unused_status_summary.png similarity index 100% rename from graphics/battle_interface/unknown_32C2D4.png rename to graphics/battle_interface/unused_status_summary.png diff --git a/graphics/unused/old_contest_2.bin b/graphics/contest/audience.bin similarity index 100% rename from graphics/unused/old_contest_2.bin rename to graphics/contest/audience.bin diff --git a/graphics/unknown/unknown_C17980.bin b/graphics/contest/curtain.bin similarity index 100% rename from graphics/unknown/unknown_C17980.bin rename to graphics/contest/curtain.bin diff --git a/graphics/unknown/unknown_C17170.bin b/graphics/contest/interface.bin similarity index 100% rename from graphics/unknown/unknown_C17170.bin rename to graphics/contest/interface.bin diff --git a/graphics/contest/misc.png b/graphics/contest/interface.png similarity index 100% rename from graphics/contest/misc.png rename to graphics/contest/interface.png diff --git a/graphics/unused/old_contest_2.pal b/graphics/contest/interface_audience.pal similarity index 100% rename from graphics/unused/old_contest_2.pal rename to graphics/contest/interface_audience.pal diff --git a/graphics/unused/old_contest_2_2.png b/graphics/contest/japanese/audience.png similarity index 100% rename from graphics/unused/old_contest_2_2.png rename to graphics/contest/japanese/audience.png diff --git a/graphics/unused/old_contest_floor.png b/graphics/contest/japanese/floor.png similarity index 100% rename from graphics/unused/old_contest_floor.png rename to graphics/contest/japanese/floor.png diff --git a/graphics/unused/old_contest_frame_1.png b/graphics/contest/japanese/frame_1.png similarity index 100% rename from graphics/unused/old_contest_frame_1.png rename to graphics/contest/japanese/frame_1.png diff --git a/graphics/unused/old_contest_frame_2.png b/graphics/contest/japanese/frame_2.png similarity index 100% rename from graphics/unused/old_contest_frame_2.png rename to graphics/contest/japanese/frame_2.png diff --git a/graphics/unused/old_contest_2_1.png b/graphics/contest/japanese/interface.png similarity index 100% rename from graphics/unused/old_contest_2_1.png rename to graphics/contest/japanese/interface.png diff --git a/graphics/unused/old_contest_classes.png b/graphics/contest/japanese/letters.png similarity index 100% rename from graphics/unused/old_contest_classes.png rename to graphics/contest/japanese/letters.png diff --git a/graphics/unused/old_contest_meter.png b/graphics/contest/japanese/meter.png similarity index 100% rename from graphics/unused/old_contest_meter.png rename to graphics/contest/japanese/meter.png diff --git a/graphics/unused/old_contest_numbers.png b/graphics/contest/japanese/numbers.png similarity index 100% rename from graphics/unused/old_contest_numbers.png rename to graphics/contest/japanese/numbers.png diff --git a/graphics/unused/old_contest.pal b/graphics/contest/japanese/palette.pal similarity index 100% rename from graphics/unused/old_contest.pal rename to graphics/contest/japanese/palette.pal diff --git a/graphics/unused/old_contest_symbols.png b/graphics/contest/japanese/symbols.png similarity index 100% rename from graphics/unused/old_contest_symbols.png rename to graphics/contest/japanese/symbols.png diff --git a/graphics/unused/old_contest.bin b/graphics/contest/japanese/tilemap_1.bin similarity index 100% rename from graphics/unused/old_contest.bin rename to graphics/contest/japanese/tilemap_1.bin diff --git a/graphics/unknown/unknown_C15BC0.bin b/graphics/contest/japanese/tilemap_2.bin similarity index 100% rename from graphics/unknown/unknown_C15BC0.bin rename to graphics/contest/japanese/tilemap_2.bin diff --git a/graphics/unknown/unknown_C19470.png b/graphics/contest/japanese/voltage.png similarity index 100% rename from graphics/unknown/unknown_C19470.png rename to graphics/contest/japanese/voltage.png diff --git a/graphics/unknown/unknown_C17410.bin b/graphics/contest/unused_tilemap_1.bin similarity index 100% rename from graphics/unknown/unknown_C17410.bin rename to graphics/contest/unused_tilemap_1.bin diff --git a/graphics/unknown/unknown_C1751C.bin b/graphics/contest/unused_tilemap_2.bin similarity index 100% rename from graphics/unknown/unknown_C1751C.bin rename to graphics/contest/unused_tilemap_2.bin diff --git a/graphics/unknown/unknown_D9AF44.pal b/graphics/interface/bag_pyramid_interface.pal similarity index 100% rename from graphics/unknown/unknown_D9AF44.pal rename to graphics/interface/bag_pyramid_interface.pal diff --git a/graphics/interface/status_tilemap2.bin b/graphics/interface/summary_page_battle_moves.bin similarity index 100% rename from graphics/interface/status_tilemap2.bin rename to graphics/interface/summary_page_battle_moves.bin diff --git a/graphics/interface/status_tilemap3.bin b/graphics/interface/summary_page_contest_moves.bin similarity index 100% rename from graphics/interface/status_tilemap3.bin rename to graphics/interface/summary_page_contest_moves.bin diff --git a/graphics/interface/status_screen.bin b/graphics/interface/summary_page_info.bin similarity index 100% rename from graphics/interface/status_screen.bin rename to graphics/interface/summary_page_info.bin diff --git a/graphics/interface/status_tilemap0.bin b/graphics/interface/summary_page_info_copy.bin similarity index 100% rename from graphics/interface/status_tilemap0.bin rename to graphics/interface/summary_page_info_copy.bin diff --git a/graphics/interface/status_tilemap1.bin b/graphics/interface/summary_page_skills.bin similarity index 100% rename from graphics/interface/status_tilemap1.bin rename to graphics/interface/summary_page_skills.bin diff --git a/graphics/interface/status_screen.pal b/graphics/interface/summary_screen.pal similarity index 100% rename from graphics/interface/status_screen.pal rename to graphics/interface/summary_screen.pal diff --git a/graphics/interface/status_screen.png b/graphics/interface/summary_screen.png similarity index 100% rename from graphics/interface/status_screen.png rename to graphics/interface/summary_screen.png diff --git a/graphics/unused/deoxys_speed_icon_wide.png b/graphics/pokemon/deoxys/icon_speed_wide.png similarity index 100% rename from graphics/unused/deoxys_speed_icon_wide.png rename to graphics/pokemon/deoxys/icon_speed_wide.png diff --git a/graphics/unknown/unknown_D437F8.bin b/graphics/pokemon/unused_garbage.bin similarity index 100% rename from graphics/unknown/unknown_D437F8.bin rename to graphics/pokemon/unused_garbage.bin diff --git a/graphics/trade/unknown_DDCF04.bin b/graphics/trade/menu.bin similarity index 100% rename from graphics/trade/unknown_DDCF04.bin rename to graphics/trade/menu.bin diff --git a/graphics/unused/unused_DDCEE4.bin b/graphics/trade/unused.bin similarity index 100% rename from graphics/unused/unused_DDCEE4.bin rename to graphics/trade/unused.bin diff --git a/graphics/unknown/unknown_5B3564.bin b/graphics/trainer_hill/records_window.bin similarity index 100% rename from graphics/unknown/unknown_5B3564.bin rename to graphics/trainer_hill/records_window.bin diff --git a/graphics/unknown/unknown_5B3484.png b/graphics/trainer_hill/records_window.png similarity index 100% rename from graphics/unknown/unknown_5B3484.png rename to graphics/trainer_hill/records_window.png diff --git a/graphics/unknown/unknown_C035B8.png b/graphics/unknown/unknown_C035B8.png deleted file mode 100644 index 0b2ae80f99e094b6f95db5de80c193783097aa58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U41_3@HuK)l4XZZjB=>PwQ99c*I zpZ)g#EQ8?`pd>EvEmq(NP)^;`#W93qX0ibr6I*g}nlM{3Gjlpya+;Vhn*#F@CP6hd dhsgBwWQO8eHm-Nu=NE#E^K|udS?83{1OQ{oCIJ8d diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 9fd9091a46..b81c3347f0 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -17,6 +17,7 @@ PKNAVOPTIONSGFXDIR := graphics/pokenav/options WALLPAPERGFXDIR := graphics/pokemon_storage/wallpapers OBJEVENTGFXDIR := graphics/object_events MISCGFXDIR := graphics/misc +JPCONTESTGFXDIR := graphics/contest/japanese types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark contest_types := cool beauty cute smart tough @@ -385,7 +386,7 @@ $(UNUSEDGFXDIR)/obi2.4bpp: $(UNUSEDGFXDIR)/old_bulbasaur2.4bpp \ $(UNUSEDGFXDIR)/old_battle_interface_3.4bpp @cat $^ >$@ -$(INTERFACEGFXDIR)/hp_numbers.4bpp: $(INTERFACEGFXDIR)/hpbar_anim.4bpp \ +$(INTERFACEGFXDIR)/battle_bar.4bpp: $(INTERFACEGFXDIR)/hpbar_anim.4bpp \ $(INTERFACEGFXDIR)/numbers1.4bpp \ $(INTERFACEGFXDIR)/numbers2.4bpp @cat $^ >$@ @@ -402,20 +403,20 @@ $(UNUSEDGFXDIR)/color_frames.4bpp: %.4bpp: %.png $(BATINTGFXDIR)/unused_window2bar.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 5 -$(UNUSEDGFXDIR)/old_contest.4bpp: $(UNUSEDGFXDIR)/old_contest_frame_1.4bpp \ - $(UNUSEDGFXDIR)/old_contest_floor.4bpp \ - $(UNUSEDGFXDIR)/old_contest_frame_2.4bpp \ - $(UNUSEDGFXDIR)/old_contest_symbols.4bpp \ - $(UNUSEDGFXDIR)/old_contest_meter.4bpp \ - $(UNUSEDGFXDIR)/old_contest_classes.4bpp \ - $(UNUSEDGFXDIR)/old_contest_numbers.4bpp +$(JPCONTESTGFXDIR)/composite_1.4bpp: $(JPCONTESTGFXDIR)/frame_1.4bpp \ + $(JPCONTESTGFXDIR)/floor.4bpp \ + $(JPCONTESTGFXDIR)/frame_2.4bpp \ + $(JPCONTESTGFXDIR)/symbols.4bpp \ + $(JPCONTESTGFXDIR)/meter.4bpp \ + $(JPCONTESTGFXDIR)/letters.4bpp \ + $(JPCONTESTGFXDIR)/numbers.4bpp @cat $^ >$@ -$(UNUSEDGFXDIR)/old_contest_2.4bpp: $(UNUSEDGFXDIR)/old_contest_2_1.4bpp \ - $(UNUSEDGFXDIR)/old_contest_2_2.4bpp +$(JPCONTESTGFXDIR)/composite_2.4bpp: $(JPCONTESTGFXDIR)/interface.4bpp \ + $(JPCONTESTGFXDIR)/audience.4bpp @cat $^ >$@ -$(UNKNOWNGFXDIR)/unknown_C19470.4bpp: %.4bpp: %.png +$(JPCONTESTGFXDIR)/voltage.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 36 $(BTLANMSPRGFXDIR)/ice_crystals.4bpp: $(BTLANMSPRGFXDIR)/ice_crystals_0.4bpp \ diff --git a/include/graphics.h b/include/graphics.h index dcb47a2266..cbb7fbb080 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3208,12 +3208,12 @@ extern const u16 gBerryFixWindow_Pal[]; extern const u32 gBattleTextboxTiles[]; extern const u32 gBattleTextboxTilemap[]; extern const u32 gBattleTextboxPalette[]; -extern const u32 gUnknown_08D778F0[]; extern const u32 gVsLettersGfx[]; -extern const u32 gUnknown_08D77AE4[]; -extern const u32 gUnknown_08D779D8[]; -extern const u32 gUnknown_08D857A8[]; -extern const u32 gUnknown_08D85A1C[]; +extern const u32 gBattleVSFrame_Gfx[]; +extern const u32 gBattleVSFrame_Pal[]; +extern const u32 gBattleVSFrame_Tilemap[]; +extern const u32 gMultiBattleIntroBg_Opponent_Tilemap[]; +extern const u32 gMultiBattleIntroBg_Player_Tilemap[]; // battle terrains extern const u32 gBattleTerrainTiles_TallGrass[]; @@ -4032,16 +4032,16 @@ extern const u16 gPokenavRibbonsSummaryBg_Pal[]; extern const u32 gPokenavRibbonsSummaryBg_Gfx[]; extern const u32 gPokenavRibbonsSummaryBg_Tilemap[]; -extern const u32 gPageInfoTilemap[]; -extern const u32 gUnknown_08D98CC8[]; -extern const u32 gPageSkillsTilemap[]; -extern const u32 gPageBattleMovesTilemap[]; -extern const u32 gPageContestMovesTilemap[]; -extern const u32 gStatusScreenPalette[]; -extern const u16 gUnknown_08D85620[]; +extern const u32 gSummaryScreen_Gfx[]; +extern const u32 gSummaryScreen_Pal[]; +extern const u32 gSummaryPage_Info_Tilemap[]; +extern const u32 gSummaryPage_InfoCopy_Tilemap[]; +extern const u32 gSummaryPage_Skills_Tilemap[]; +extern const u32 gSummaryPage_BattleMoves_Tilemap[]; +extern const u32 gSummaryPage_ContestMoves_Tilemap[]; +extern const u16 gPPTextPalette[]; extern const u16 gSummaryScreenWindow_Tilemap[]; extern const u32 gMoveTypes_Pal[]; -extern const u32 gStatusScreenBitmap[]; extern const u16 gSummaryScreenPowAcc_Tilemap[]; extern const u16 gSummaryScreenAppealJam_Tilemap[]; @@ -4081,7 +4081,7 @@ extern const u32 gPokeblockFeedBg_Tilemap[]; extern const u32 gConfetti_Gfx[]; extern const u32 gConfetti_Pal[]; -extern const u32 gUnknown_08C093F0[]; +extern const u32 gBattleInterfaceGfx_BattleBar[]; extern const u32 gSubstituteDollBackGfx[]; extern const u32 gSubstituteDollFrontGfx[]; extern const u32 gSubstituteDollPal[]; @@ -4097,17 +4097,19 @@ extern const u16 gBattleInterface_BallDisplayPal[]; extern const u32 gBagSwapLineGfx[]; extern const u32 gBagSwapLinePal[]; -extern const u32 gBattleFrontierGfx_PyramidBag[]; -extern const u32 gBattleFrontierGfx_PyramidBag_Pal[]; -extern const u32 gBattleFrontierGfx_PyramidBagTileMap[]; -extern const u32 gUnknown_08D9AF44[]; -extern const u16 gUnknown_0860F074[]; +extern const u32 gBattlePyramidBag_Gfx[]; +extern const u32 gBattlePyramidBag_Pal[]; +extern const u32 gBattlePyramidBagTilemap[]; +extern const u32 gBattlePyramidBagInterface_Pal[]; +extern const u16 gBattlePyramidFloor_Pal[][16]; + +extern const u16 gStandardMenuPalette[]; extern const u32 gTitleScreenEmeraldVersionGfx[]; extern const u32 gTitleScreenPressStartGfx[]; extern const u32 gTitleScreenPokemonLogoGfx[]; -extern const u32 gUnknown_08DE0644[]; -extern const u32 gUnknown_08DDE458[]; +extern const u32 gTitleScreenPokemonLogoTilemap[]; +extern const u32 gTitleScreenCloudsTilemap[]; extern const u16 gTitleScreenBgPalettes[]; extern const u16 gTitleScreenPressStartPal[]; extern const u16 gTitleScreenEmeraldVersionPal[]; @@ -4773,15 +4775,15 @@ extern const u32 gBattleStatMask6_Pal[]; extern const u32 gBattleStatMask7_Pal[]; extern const u32 gBattleStatMask8_Pal[]; -extern const u32 gContestMiscGfx[]; +extern const u32 gContestInterfaceGfx[]; extern const u32 gContestAudienceGfx[]; extern const u8 gContestApplauseMeterGfx[]; extern const u8 gContestNextTurnNumbersGfx[]; extern const u8 gContestNextTurnRandomGfx[]; -extern const u32 gOldContestGfx[]; -extern const u32 gOldContestPalette[]; -extern const u32 gUnknown_08C17170[]; -extern const u32 gUnknown_08C17980[]; +extern const u32 gContestAudienceTilemap[]; +extern const u32 gContestInterfaceAudiencePalette[]; +extern const u32 gContestInterfaceTilemap[]; +extern const u32 gContestCurtainTilemap[]; extern const u32 gContestSliderHeart_Gfx[]; extern const u32 gContestNextTurnGfx[]; extern const u16 gContestPal[]; @@ -4789,7 +4791,7 @@ extern const u32 gContestFaces_Gfx[]; extern const u32 gContestApplauseGfx[]; extern const u32 gContestJudgeGfx[]; extern const u32 gContestJudgeSymbolsGfx[]; -extern const u32 gContest3Pal[]; +extern const u32 gContestJudgeSymbolsPal[]; extern const u32 gBattleAnimBgTilemap_SurfOpponent[]; extern const u32 gBattleAnimBgTilemap_SurfPlayer[]; @@ -4899,7 +4901,7 @@ extern const u16 gCableCar_Pal[]; // Trade extern const u16 gTradeMenu_Pal[]; extern const u8 gTradeMenu_Gfx[]; -extern const u16 gUnknown_08DDCF04[]; +extern const u16 gTradeMenu_Tilemap[]; extern const u16 gTradeGba2_Pal[]; extern const u8 gTradeGba_Gfx[]; extern const u16 gTradeMenuMonBox_Tilemap[]; diff --git a/include/main.h b/include/main.h index 79d56d31ff..5ccb20df88 100644 --- a/include/main.h +++ b/include/main.h @@ -72,6 +72,5 @@ void RestoreSerialTimer3IntrHandlers(void); void StartTimer1(void); void SeedRngAndSetTrainerId(void); u16 GetGeneratedTrainerIdLower(void); -void sub_819789C(void); #endif // GUARD_MAIN_H diff --git a/include/menu.h b/include/menu.h index 07e00eb730..eb391e5654 100644 --- a/include/menu.h +++ b/include/menu.h @@ -41,7 +41,7 @@ struct MenuAction } func; }; -extern const u16 gUnknown_0860F074[]; +extern const u16 gStandardMenuPalette[]; void FreeAllOverworldWindowBuffers(void); void InitStandardTextBoxWindows(void); @@ -125,5 +125,6 @@ void ResetBgPositions(void); void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed); void sub_8198C78(void); void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs); +void Menu_LoadStdPal(void); #endif // GUARD_MENU_H diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 267b6db9cb..85dee52871 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -718,7 +718,7 @@ const struct SpriteTemplate gSweetScentPetalSpriteTemplate = .callback = AnimSweetScentPetal, }; -static const u16 sUnusedPalette[] = INCBIN_U16("graphics/battle_anims/unused.gbapal"); +static const u16 sUnusedPalette[] = INCBIN_U16("graphics/battle_anims/unused/unknown.gbapal"); const union AnimCmd gPainSplitAnimCmds[] = { diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index 1c2d08d6a8..50918a24ed 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -54,8 +54,8 @@ static void AnimTask_WaterSport_Step(u8); static void CreateWaterSportDroplet(struct Task*); static void CreateWaterPulseRingBubbles(struct Sprite*, int, int); -static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused_water_gfx.4bpp"); -static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused_water.bin"); +static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused/water_gfx.4bpp"); +static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused/water.bin"); static const union AnimCmd sAnim_RainDrop[] = { diff --git a/src/battle_bg.c b/src/battle_bg.c index cbd293294c..0e4370485c 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -1124,13 +1124,13 @@ void DrawBattleEntryBackground(void) { if (gBattleTypeFlags & BATTLE_TYPE_LINK) { - LZDecompressVram(gUnknown_08D778F0, (void*)(BG_CHAR_ADDR(1))); + LZDecompressVram(gBattleVSFrame_Gfx, (void*)(BG_CHAR_ADDR(1))); LZDecompressVram(gVsLettersGfx, (void*)OBJ_VRAM0); - LoadCompressedPalette(gUnknown_08D77AE4, 0x60, 0x20); + LoadCompressedPalette(gBattleVSFrame_Pal, 0x60, 0x20); SetBgAttribute(1, BG_ATTR_SCREENSIZE, 1); SetGpuReg(REG_OFFSET_BG1CNT, 0x5C04); - CopyToBgTilemapBuffer(1, gUnknown_08D779D8, 0, 0); - CopyToBgTilemapBuffer(2, gUnknown_08D779D8, 0, 0); + CopyToBgTilemapBuffer(1, gBattleVSFrame_Tilemap, 0, 0); + CopyToBgTilemapBuffer(2, gBattleVSFrame_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_OBJ | WININ_WIN0_CLR); @@ -1148,10 +1148,12 @@ void DrawBattleEntryBackground(void) } else { + // Set up bg for the multi battle intro where both teams slide in facing the screen. + // Note Steven's multi battle (which has a dedicated back pic) is excluded above. SetBgAttribute(1, BG_ATTR_CHARBASEINDEX, 2); SetBgAttribute(2, BG_ATTR_CHARBASEINDEX, 2); - CopyToBgTilemapBuffer(1, gUnknown_08D857A8, 0, 0); - CopyToBgTilemapBuffer(2, gUnknown_08D85A1C, 0, 0); + CopyToBgTilemapBuffer(1, gMultiBattleIntroBg_Opponent_Tilemap, 0, 0); + CopyToBgTilemapBuffer(2, gMultiBattleIntroBg_Player_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); } diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index c01c76b7cd..f36524f370 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -785,7 +785,7 @@ bool8 BattleLoadAllHealthBoxesGfx(u8 state) void LoadBattleBarGfx(u8 arg0) { - LZDecompressWram(gUnknown_08C093F0, gMonSpritesGfxPtr->barFontGfx); + LZDecompressWram(gBattleInterfaceGfx_BattleBar, gMonSpritesGfxPtr->barFontGfx); } bool8 BattleInitAllSprites(u8 *state1, u8 *battlerId) diff --git a/src/battle_interface.c b/src/battle_interface.c index 77308cb3cc..08da2da5f2 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -617,7 +617,7 @@ static const struct SubspriteTable sUnknown_0832C2CC[] = }; // unused unknown image -static const u8 sUnknown_0832C2D4[] = INCBIN_U8("graphics/battle_interface/unknown_32C2D4.4bpp"); +static const u8 sUnusedStatusSummary[] = INCBIN_U8("graphics/battle_interface/unused_status_summary.4bpp"); static const struct CompressedSpriteSheet sStatusSummaryBarSpriteSheet = { @@ -640,7 +640,7 @@ static const struct SpriteSheet sStatusSummaryBallsSpriteSheet = }; // unused oam data -static const struct OamData sUnknown_0832C354 = +static const struct OamData sOamData_Unused64x32 = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, diff --git a/src/battle_message.c b/src/battle_message.c index b69a171a13..91142dd555 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -8,6 +8,7 @@ #include "data.h" #include "event_data.h" #include "frontier_util.h" +#include "graphics.h" #include "international_string_util.h" #include "item.h" #include "link.h" @@ -42,18 +43,13 @@ struct BattleWindowText u8 shadowColor; }; -extern const u16 gUnknown_08D85620[]; - -// this file's functions static void ChooseMoveUsedParticle(u8 *textPtr); static void ChooseTypeOfMoveUsedString(u8 *dst); static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst); -// EWRAM vars static EWRAM_DATA u8 sBattlerAbilities[MAX_BATTLERS_COUNT] = {0}; EWRAM_DATA struct BattleMsgData *gBattleMsgDataPtr = NULL; -// const rom data // todo: make some of those names less vague: attacker/target vs pkmn, etc. static const u8 sText_Trainer1LoseText[] = _("{B_TRAINER1_LOSE_TEXT}"); @@ -2058,7 +2054,6 @@ static const struct BattleWindowText *const sBattleTextOnWindowsInfo[] = static const u8 sRecordedBattleTextSpeeds[] = {8, 4, 1, 0}; -// code void BufferStringBattle(u16 stringID) { s32 i; @@ -3125,7 +3120,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId) void SetPpNumbersPaletteInMoveSelection(void) { struct ChooseMoveStruct *chooseMoveStruct = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]); - const u16 *palPtr = gUnknown_08D85620; + const u16 *palPtr = gPPTextPalette; u8 var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]], chooseMoveStruct->maxPp[gMoveSelectionCursor[gActiveBattler]]); diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index e334e75d56..48155c8339 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -26,6 +26,7 @@ #include "malloc.h" #include "overworld.h" #include "event_scripts.h" +#include "graphics.h" #include "constants/battle_frontier.h" #include "constants/battle_pyramid.h" #include "constants/event_objects.h" @@ -39,9 +40,6 @@ #include "constants/trainers.h" extern const struct MapLayout *const gMapLayouts[]; -extern const u16 gUnknown_08D856C8[][16]; - - struct PyramidWildMon { @@ -1188,7 +1186,7 @@ static void Task_SetPyramidFloorPalette(u8 taskId) { if (gPaletteFade.active) { - CpuCopy16(gUnknown_08D856C8[gSaveBlock2Ptr->frontier.curChallengeBattleNum], &gPlttBufferUnfaded[96], 32); + CpuCopy16(gBattlePyramidFloor_Pal[gSaveBlock2Ptr->frontier.curChallengeBattleNum], &gPlttBufferUnfaded[96], 32); DestroyTask(taskId); } } diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 179f4dc654..d45770f746 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -358,7 +358,7 @@ static const union AffineAnimCmd * const sAffineAnims_PyramidBag[] = [ANIM_BAG_SHAKE] = sAffineAnim_PyramidBag_Shake, }; -static const struct CompressedSpriteSheet sSpriteSheet_PyramidBag = {gBattleFrontierGfx_PyramidBag, 0x0800, TAG_PYRAMID_BAG}; +static const struct CompressedSpriteSheet sSpriteSheet_PyramidBag = {gBattlePyramidBag_Gfx, 0x0800, TAG_PYRAMID_BAG}; static const struct SpriteTemplate sSpriteTemplate_PyramidBag = { @@ -573,12 +573,12 @@ static bool8 LoadPyramidBagGfx(void) case 1: if (FreeTempTileDataBuffersIfPossible() != TRUE) { - LZDecompressWram(gBattleFrontierGfx_PyramidBagTileMap, gPyramidBagMenu->tilemapBuffer); + LZDecompressWram(gBattlePyramidBagTilemap, gPyramidBagMenu->tilemapBuffer); gPyramidBagMenu->state++; } break; case 2: - LoadCompressedPalette(gUnknown_08D9AF44, 0, 32); + LoadCompressedPalette(gBattlePyramidBagInterface_Pal, 0, 32); gPyramidBagMenu->state++; break; case 3: @@ -1443,7 +1443,7 @@ static void InitPyramidBagWindows(void) DeactivateAllTextPrinters(); LoadUserWindowBorderGfx(0, 0x1, 0xE0); LoadMessageBoxGfx(0, 0xA, 0xD0); - LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(gStandardMenuPalette, 0xF0, 0x20); for (i = 0; i < ARRAY_COUNT(sWindowTemplates); i++) FillWindowPixelBuffer(i, PIXEL_FILL(0)); @@ -1541,7 +1541,7 @@ static void LoadPyramidBagPalette(void) struct SpritePalette spritePalette; u16 *palPtr = Alloc(0x40); - LZDecompressWram(gBattleFrontierGfx_PyramidBag_Pal, palPtr); + LZDecompressWram(gBattlePyramidBag_Pal, palPtr); spritePalette.data = palPtr + (gSaveBlock2Ptr->frontier.lvlMode * 16); spritePalette.tag = TAG_PYRAMID_BAG; LoadSpritePalette(&spritePalette); diff --git a/src/battle_records.c b/src/battle_records.c index 5dff8e6d34..b2e3790935 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -24,21 +24,18 @@ #include "trainer_hill.h" #include "constants/rgb.h" -// this file's functions static void Task_CloseTrainerHillRecordsOnButton(u8 taskId); static void Task_BeginPaletteFade(u8 taskId); static void Task_ExitTrainerHillRecords(u8 taskId); static void RemoveTrainerHillRecordsWindow(u8 windowId); static void CB2_ShowTrainerHillRecords(void); -// EWRAM variables EWRAM_DATA u8 gRecordsWindowId = 0; EWRAM_DATA static u8 *sTilemapBuffer = NULL; -// const rom data -static const u32 sTrainerHillWindowTileset[] = INCBIN_U32("graphics/unknown/unknown_5B3484.4bpp"); -static const u16 sTrainerHillWindowPalette[] = INCBIN_U16("graphics/unknown/unknown_5B3484.gbapal"); -static const u32 sTrainerHillWindowTilemap[] = INCBIN_U32("graphics/unknown/unknown_5B3564.bin"); +static const u32 sTrainerHillWindowTileset[] = INCBIN_U32("graphics/trainer_hill/records_window.4bpp"); +static const u16 sTrainerHillWindowPalette[] = INCBIN_U16("graphics/trainer_hill/records_window.gbapal"); +static const u32 sTrainerHillWindowTilemap[] = INCBIN_U32("graphics/trainer_hill/records_window.bin"); static const struct BgTemplate sTrainerHillRecordsBgTemplates[] = { diff --git a/src/clear_save_data_screen.c b/src/clear_save_data_screen.c index 0d69eb0fa9..187fd0ffea 100644 --- a/src/clear_save_data_screen.c +++ b/src/clear_save_data_screen.c @@ -205,5 +205,5 @@ static void InitClearSaveDataScreenWindows(void) DeactivateAllTextPrinters(); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadWindowGfx(0, 0, 2, 224); - LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(gStandardMenuPalette, 0xF0, 0x20); } diff --git a/src/contest.c b/src/contest.c index 05dd394832..336e622867 100644 --- a/src/contest.c +++ b/src/contest.c @@ -666,7 +666,7 @@ static const struct CompressedSpriteSheet sSpriteSheet_JudgeSymbols = const struct CompressedSpritePalette sSpritePalette_JudgeSymbols = { - .data = gContest3Pal, + .data = gContestJudgeSymbolsPal, .tag = TAG_CONTEST_SYMBOLS_PAL }; @@ -1028,11 +1028,11 @@ void LoadContestBgAfterMoveAnim(void) { s32 i; - LZDecompressVram(gContestMiscGfx, (void *)VRAM); + LZDecompressVram(gContestInterfaceGfx, (void *)VRAM); LZDecompressVram(gContestAudienceGfx, (void *)(BG_SCREEN_ADDR(4))); - CopyToBgTilemapBuffer(3, gOldContestGfx, 0, 0); + CopyToBgTilemapBuffer(3, gContestAudienceTilemap, 0, 0); CopyBgTilemapBufferToVram(3); - LoadCompressedPalette(gOldContestPalette, 0, 0x200); + LoadCompressedPalette(gContestInterfaceAudiencePalette, 0, 0x200); LoadContestPalettes(); for (i = 0; i < CONTESTANT_COUNT; i++) { @@ -1310,24 +1310,24 @@ static bool8 SetupContestGraphics(u8 *stateVar) RequestDma3Fill(0, (void *)VRAM + 0x10000, 0x8000, 1); break; case 1: - LZDecompressVram(gContestMiscGfx, (void *)VRAM); + LZDecompressVram(gContestInterfaceGfx, (void *)VRAM); break; case 2: LZDecompressVram(gContestAudienceGfx, (void *)(BG_SCREEN_ADDR(4))); DmaCopyLarge32(3, (void *)(BG_SCREEN_ADDR(4)), eUnzippedContestAudience_Gfx, 0x2000, 0x1000); break; case 3: - CopyToBgTilemapBuffer(3, gOldContestGfx, 0, 0); + CopyToBgTilemapBuffer(3, gContestAudienceTilemap, 0, 0); CopyBgTilemapBufferToVram(3); break; case 4: - CopyToBgTilemapBuffer(2, gUnknown_08C17170, 0, 0); + CopyToBgTilemapBuffer(2, gContestInterfaceTilemap, 0, 0); CopyBgTilemapBufferToVram(2); // This is a bug, and copies random junk. savedJunk is never read. DmaCopy32Defvars(3, gContestResources->contestBgTilemaps[2], eContestTempSave.savedJunk, sizeof(eContestTempSave.savedJunk)); break; case 5: - LoadCompressedPalette(gOldContestPalette, 0, 0x200); + LoadCompressedPalette(gContestInterfaceAudiencePalette, 0, 0x200); CpuCopy32(gPlttBufferUnfaded + 128, tempPalette1, 16 * sizeof(u16)); CpuCopy32(gPlttBufferUnfaded + (5 + gContestPlayerMonIndex) * 16, tempPalette2, 16 * sizeof(u16)); CpuCopy32(tempPalette2, gPlttBufferUnfaded + 128, 16 * sizeof(u16)); @@ -5089,7 +5089,7 @@ static void SetBgForCurtainDrop(void) CpuFill32(0, gContestResources->contestBgTilemaps[1], 0x1000); - CopyToBgTilemapBuffer(1, gUnknown_08C17980, 0, 0); + CopyToBgTilemapBuffer(1, gContestCurtainTilemap, 0, 0); Contest_SetBgCopyFlags(1); for (i = 0; i < CONTESTANT_COUNT; i++) diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index bce0b7a217..f69fafec84 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -2696,12 +2696,12 @@ const u32 gMonBackPic_Deoxys[] = INCBIN_U32("graphics/pokemon/deoxys/back.4bpp.l const u32 gMonShinyPalette_Deoxys[] = INCBIN_U32("graphics/pokemon/deoxys/shiny.gbapal.lz"); const u8 gMonIcon_Deoxys[] = INCBIN_U8("graphics/pokemon/deoxys/icon.4bpp"); const u8 gMonIcon_DeoxysSpeed[] = INCBIN_U8("graphics/pokemon/deoxys/icon_speed.4bpp"); -const u8 gMonIcon_DeoxysSpeedWide[] = INCBIN_U8("graphics/unused/deoxys_speed_icon_wide.4bpp"); +const u8 gMonIcon_DeoxysSpeedWide[] = INCBIN_U8("graphics/pokemon/deoxys/icon_speed_wide.4bpp"); // Unused // Probably the leftover space from the other Deoxys forms static const u8 sEmpty[0x6800] = {0}; -const u16 gUnknown_D437F8[] = INCBIN_U16("graphics/unknown/unknown_D437F8.bin"); +const u16 gMonUnusedGarbage[] = INCBIN_U16("graphics/pokemon/unused_garbage.bin"); const u8 gMonFootprint_Deoxys[] = INCBIN_U8("graphics/pokemon/deoxys/footprint.1bpp"); diff --git a/src/diploma.c b/src/diploma.c index dca0912e36..c68dc10000 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -196,7 +196,7 @@ static void InitDiplomaWindow(void) { InitWindows(sDiplomaWinTemplates); DeactivateAllTextPrinters(); - LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(gStandardMenuPalette, 0xF0, 0x20); FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); } diff --git a/src/graphics.c b/src/graphics.c index 4e820caec7..68d7ea5b9c 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -69,8 +69,7 @@ const u32 gBattleAnimSpriteGfx_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpritePal_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/sprites/black_smoke.gbapal.lz"); const u32 gBattleAnimSpriteGfx_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.4bpp.lz"); - -const u32 gUnknownGfx_C035B8[] = INCBIN_U32("graphics/unknown/unknown_C035B8.4bpp.lz"); +const u32 gBattleAnimSpritePal_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.bin"); const u32 gBattleAnimSpritePal_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.4bpp.lz"); @@ -81,9 +80,8 @@ const u32 gBattleAnimSpritePal_HornHit[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimSpritePal_BlueShards[] = INCBIN_U32("graphics/battle_anims/sprites/blue_shards.gbapal.lz"); const u32 gBattleAnimSpriteGfx_BlueShards[] = INCBIN_U32("graphics/battle_anims/sprites/blue_shards.4bpp.lz"); -const u32 gUnused_BattleSpritePalette_023[] = INCBIN_U32("graphics/unused/battle_anim_023.gbapal.lz"); - -const u32 gUnusedGfx_MusicNotes[] = INCBIN_U32("graphics/unused/music_notes.4bpp.lz"); +const u32 gBattleAnimUnusedPal_MusicNotes[] = INCBIN_U32("graphics/battle_anims/unused/music_notes.gbapal.lz"); +const u32 gBattleAnimUnusedGfx_MusicNotes[] = INCBIN_U32("graphics/battle_anims/unused/music_notes.4bpp.lz"); const u32 gBattleAnimSpritePal_Hit[] = INCBIN_U32("graphics/battle_anims/sprites/hit.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Hit[] = INCBIN_U32("graphics/battle_anims/sprites/hit.4bpp.lz"); @@ -128,9 +126,9 @@ const u32 gBattleAnimSpriteGfx_Lightning2[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpriteGfx_Lightning[] = INCBIN_U32("graphics/battle_anims/sprites/lightning.4bpp.lz"); -const u32 gUnknownGfx_C06D98[] = INCBIN_U32("graphics/unknown/unknown_C06D98.4bpp.lz"); -const u32 gUnknownPal_C06D98[] = INCBIN_U32("graphics/unknown/unknown_C06D98.gbapal.lz"); -const u32 gUnknownPal_C06D98_2[] = INCBIN_U32("graphics/unknown/unknown_C06D98_2.gbapal.lz"); +const u32 gBattleAnimSpriteGfx_SpinningBall[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball.4bpp.lz"); +const u32 gBattleAnimSpritePal_SpinningBall[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball.gbapal.lz"); +const u32 gBattleAnimSpritePal_SpinningBall2[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball_2.gbapal.lz"); // old battle interface data, unused @@ -164,18 +162,18 @@ const u32 gBattleAnimSpriteGfx_Glass2[] = INCBIN_U32("graphics/battle_anims/spri const u32 gBattleAnimSpritePal_PinkHeart2[] = INCBIN_U32("graphics/battle_anims/sprites/pink_heart_2.gbapal.lz"); const u32 gBattleAnimSpriteGfx_PinkHeart2[] = INCBIN_U32("graphics/battle_anims/sprites/pink_heart_2.4bpp.lz"); -const u32 gUnknown_08C08F0C[] = INCBIN_U32("graphics/battle_interface/unused_window.4bpp.lz"); -const u32 gUnknown_08C093C8[] = INCBIN_U32("graphics/battle_interface/unused_window.gbapal.lz"); +const u32 gBattleInterfaceGfx_UnusedWindow1[] = INCBIN_U32("graphics/battle_interface/unused_window.4bpp.lz"); +const u32 gBattleInterfacePal_UnusedWindow1[] = INCBIN_U32("graphics/battle_interface/unused_window.gbapal.lz"); -const u32 gUnknown_08C093F0[] = INCBIN_U32("graphics/interface/hp_numbers.4bpp.lz"); +const u32 gBattleInterfaceGfx_BattleBar[] = INCBIN_U32("graphics/interface/battle_bar.4bpp.lz"); const u32 gBattleAnimSpriteGfx_SapDrip[] = INCBIN_U32("graphics/battle_anims/sprites/sap_drip.4bpp.lz"); const u32 gBattleAnimSpritePal_SapDrip[] = INCBIN_U32("graphics/battle_anims/sprites/sap_drip.gbapal.lz"); const u32 gBattleAnimSpritePal_SapDrip2[] = INCBIN_U32("graphics/battle_anims/sprites/sap_drip_2.gbapal.lz"); -const u32 gUnusedGfx_Window2[] = INCBIN_U32("graphics/battle_interface/unused_window2.4bpp.lz"); -const u32 gUnusedGfx_Window2Bar[] = INCBIN_U32("graphics/battle_interface/unused_window2bar.4bpp.lz"); +const u32 gBattleInterfaceGfx_UnusedWindow2[] = INCBIN_U32("graphics/battle_interface/unused_window2.4bpp.lz"); +const u32 gBattleInterfaceGfx_UnusedWindow2Bar[] = INCBIN_U32("graphics/battle_interface/unused_window2bar.4bpp.lz"); const u32 gBattleAnimSpriteGfx_Sparkle1[] = INCBIN_U32("graphics/battle_anims/sprites/sparkle_1.4bpp.lz"); const u32 gBattleAnimSpritePal_Sparkle1[] = INCBIN_U32("graphics/battle_anims/sprites/sparkle_1.gbapal.lz"); @@ -187,8 +185,8 @@ const u32 gBattleAnimSpriteGfx_HumanoidFoot[] = INCBIN_U32("graphics/battle_anim const u32 gBattleAnimSpriteGfx_MonsterFoot[] = INCBIN_U32("graphics/battle_anims/sprites/monster_foot.4bpp.lz"); const u32 gBattleAnimSpriteGfx_HumanoidHand[] = INCBIN_U32("graphics/battle_anims/sprites/humanoid_hand.4bpp.lz"); -const u32 gUnusedGfx_LineSketch[] = INCBIN_U32("graphics/unused/line_sketch.4bpp.lz"); -const u32 gUnusedPal_LineSketch[] = INCBIN_U32("graphics/unused/line_sketch.gbapal.lz"); +const u32 gBattleAnimSpriteGfx_LineSketch[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch.4bpp.lz"); +const u32 gBattleAnimSpritePal_LineSketch[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch.gbapal.lz"); const u32 gBattleAnimSpriteGfx_YellowUnk[] = INCBIN_U32("graphics/battle_anims/sprites/yellow_unk.4bpp.lz"); const u32 gBattleAnimSpritePal_YellowUnk[] = INCBIN_U32("graphics/battle_anims/sprites/yellow_unk.gbapal.lz"); @@ -219,7 +217,7 @@ const u32 gBattleAnimSpritePal_SpinningGreenOrbs[] = INCBIN_U32("graphics/battle const u32 gBattleAnimSpriteGfx_Leaf[] = INCBIN_U32("graphics/battle_anims/sprites/leaf.4bpp.lz"); const u32 gBattleAnimSpritePal_Leaf[] = INCBIN_U32("graphics/battle_anims/sprites/leaf.gbapal.lz"); -const u32 gUnusedGfx_Metronome[] = INCBIN_U32("graphics/unused/metronome_hand_small.4bpp.lz"); // unused, was for metronome at one point +const u32 gBattleAnimSpriteGfx_MetronomeSmallHand[] = INCBIN_U32("graphics/battle_anims/unused/metronome_hand_small.4bpp.lz"); // unused, was for metronome at one point const u32 gBattleAnimSpritePal_Clapping[] = INCBIN_U32("graphics/battle_anims/sprites/clapping.gbapal.lz"); @@ -254,12 +252,13 @@ const u32 gBattleAnimSpritePal_Bell2[] = INCBIN_U32("graphics/battle_anims/sprit const u32 gBattleAnimSpriteGfx_PinkGlove[] = INCBIN_U32("graphics/battle_anims/sprites/pink_glove.4bpp.lz"); const u32 gBattleAnimSpritePal_PinkGlove[] = INCBIN_U32("graphics/battle_anims/sprites/pink_glove.gbapal.lz"); -const u16 gUnknown_C0CA1C[] = INCBIN_U16("graphics/unknown/unknown_C0CA1C.bin"); -const u16 gUnknown_C0CA40[] = INCBIN_U16("graphics/unknown/unknown_C0CA40.bin"); -const u16 gUnknown_C0CA64[] = INCBIN_U16("graphics/unknown/unknown_C0CA64.bin"); -const u32 gUnusedGfx8bpp_LineSketch2[] = INCBIN_U32("graphics/unused/line_sketch_2.8bpp.lz"); -const u16 gUnknown_C0CAE0[] = INCBIN_U16("graphics/unknown/unknown_C0CAE0.bin"); -const u32 gUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/unused/line_sketch_2.bin.lz"); +const u16 gBattleAnimUnused_Unknown1[] = INCBIN_U16("graphics/battle_anims/unused/unknown_1.bin"); +const u16 gBattleAnimUnused_Unknown2[] = INCBIN_U16("graphics/battle_anims/unused/unknown_2.bin"); +const u16 gBattleAnimUnused_Unknown3[] = INCBIN_U16("graphics/battle_anims/unused/unknown_3.bin"); + +const u32 gBattleAnimUnusedGfx_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.8bpp.lz"); +const u16 gBattleAnimUnusedPal_LineSketch2[] = INCBIN_U16("graphics/battle_anims/unused/line_sketch_2_pal.bin"); +const u32 gBattleAnimUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.bin.lz"); const u32 gBattleAnimSpriteGfx_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.4bpp.lz"); const u32 gBattleAnimSpritePal_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.gbapal.lz"); @@ -275,7 +274,7 @@ const u32 gBattleAnimSpritePal_RedTube[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimSpritePal_Amnesia[] = INCBIN_U32("graphics/battle_anims/sprites/amnesia.gbapal.lz"); const u32 gBattleAnimSpritePal_String2[] = INCBIN_U32("graphics/battle_anims/sprites/string_2.gbapal.lz"); -const u32 gUnknown_D0D2B4[] = INCBIN_U32("graphics/unknown/unknown_D0D2B4.bin.lz"); +const u32 gBattleAnimUnused_Unknown4[] = INCBIN_U32("graphics/battle_anims/unused/unknown_4.bin.lz"); const u32 gBattleAnimSpritePal_Pencil2[] = INCBIN_U32("graphics/battle_anims/sprites/pencil_2.gbapal.lz"); const u32 gBattleAnimSpritePal_Petal[] = INCBIN_U32("graphics/battle_anims/sprites/petal.gbapal.lz"); @@ -341,9 +340,9 @@ const u32 gUnusedPal_ColorFrames[] = INCBIN_U32("graphics/unused/color_frames.gb const u32 gBattleAnimSpriteGfx_RainDrops[] = INCBIN_U32("graphics/battle_anims/sprites/rain_drops.4bpp.lz"); -const u32 gUnusedGfx8bpp_WaterSplash [] = INCBIN_U32("graphics/unused/water_splash.8bpp.lz"); -const u32 gUnusedTilemap_WaterSplash[] = INCBIN_U32("graphics/unused/water_splash.bin.lz"); -const u32 gUnusedPalette_WaterSplash[] = INCBIN_U32("graphics/unused/water_splash.gbapal.lz"); +const u32 gBattleAnimUnusedGfx_WaterSplash[] = INCBIN_U32("graphics/battle_anims/unused/water_splash.8bpp.lz"); +const u32 gBattleAnimUnusedTilemap_WaterSplash[] = INCBIN_U32("graphics/battle_anims/unused/water_splash.bin.lz"); +const u32 gBattleAnimUnusedPal_WaterSplash[] = INCBIN_U32("graphics/battle_anims/unused/water_splash.gbapal.lz"); const u32 gUnusedGfx_BasicFrame[] = INCBIN_U32("graphics/unused/basic_frame.4bpp.lz"); const u32 gUnusedPal_BasicFrame[] = INCBIN_U32("graphics/unused/basic_frame.gbapal.lz"); @@ -434,39 +433,31 @@ const u32 gBattleAnimSpritePal_BlueFlames[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpriteGfx_BlueFlames2[] = INCBIN_U32("graphics/battle_anims/sprites/blue_flames_2.4bpp.lz"); // Contest +const u32 gJPContestGfx1[] = INCBIN_U32("graphics/contest/japanese/composite_1.4bpp.lz"); +const u32 gJPContestPal[] = INCBIN_U32("graphics/contest/japanese/palette.gbapal.lz"); +const u32 gJPContestTilemap1[] = INCBIN_U32("graphics/contest/japanese/tilemap_1.bin.lz"); +const u32 gJPContestTilemap2[] = INCBIN_U32("graphics/contest/japanese/tilemap_2.bin.lz"); +const u32 gJPContestGfx2[] = INCBIN_U32("graphics/contest/japanese/composite_2.4bpp.lz"); -const u32 gUnusedGfx_OldContest[] = INCBIN_U32("graphics/unused/old_contest.4bpp.lz"); -const u32 gUnusedPal_OldContest[] = INCBIN_U32("graphics/unused/old_contest.gbapal.lz"); -const u32 gUnusedTilemap_OldContest[] = INCBIN_U32("graphics/unused/old_contest.bin.lz"); - -const u32 gUnknownTilemap_C15BC0[] = INCBIN_U32("graphics/unknown/unknown_C15BC0.bin.lz"); - -const u32 gUnusedGfx_OldContest2[] = INCBIN_U32("graphics/unused/old_contest_2.4bpp.lz"); -const u32 gOldContestPalette[] = INCBIN_U32("graphics/unused/old_contest_2.gbapal.lz"); -const u32 gOldContestGfx[] = INCBIN_U32("graphics/unused/old_contest_2.bin.lz"); - -const u32 gUnknown_08C17170[] = INCBIN_U32("graphics/unknown/unknown_C17170.bin.lz"); - -const u32 gUnknown_08C17410[] = INCBIN_U32("graphics/unknown/unknown_C17410.bin.lz"); - -const u32 gUnknown_08C1751C[] = INCBIN_U32("graphics/unknown/unknown_C1751C.bin.lz"); - -const u32 gUnknown_08C17980[] = INCBIN_U32("graphics/unknown/unknown_C17980.bin.lz"); - -const u32 gContestMiscGfx[] = INCBIN_U32("graphics/contest/misc.4bpp.lz"); +const u32 gContestInterfaceAudiencePalette[] = INCBIN_U32("graphics/contest/interface_audience.gbapal.lz"); +const u32 gContestAudienceTilemap[] = INCBIN_U32("graphics/contest/audience.bin.lz"); +const u32 gContestInterfaceTilemap[] = INCBIN_U32("graphics/contest/interface.bin.lz"); +const u32 gContestUnusedTilemap1[] = INCBIN_U32("graphics/contest/unused_tilemap_1.bin.lz"); +const u32 gContestUnusedTilemap2[] = INCBIN_U32("graphics/contest/unused_tilemap_2.bin.lz"); +const u32 gContestCurtainTilemap[] = INCBIN_U32("graphics/contest/curtain.bin.lz"); +const u32 gContestInterfaceGfx[] = INCBIN_U32("graphics/contest/interface.4bpp.lz"); const u32 gContestAudienceGfx[] = INCBIN_U32("graphics/contest/audience.4bpp.lz"); - const u32 gContestFaces_Gfx[] = INCBIN_U32("graphics/contest/faces.4bpp.lz"); - const u32 gContestJudgeSymbolsGfx[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz"); -const u32 gContest3Pal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz"); - +const u32 gContestJudgeSymbolsPal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz"); const u8 gContestSliderHeart_Gfx[] = INCBIN_U8("graphics/contest/slider_heart.4bpp"); -const u32 gUnknownGfx_C19470[] = INCBIN_U32("graphics/unknown/unknown_C19470.4bpp.lz"); -const u32 gUnknownPal_C19470[] = INCBIN_U32("graphics/unknown/unknown_C19470.gbapal.lz"); +// JP equivalent of the Applause meter +const u32 gJPContestVoltageGfx[] = INCBIN_U32("graphics/contest/japanese/voltage.4bpp.lz"); +const u32 gJPContestVoltagePal[] = INCBIN_U32("graphics/contest/japanese/voltage.gbapal.lz"); +// Contest results const u32 gContestResults_Gfx[] = INCBIN_U32("graphics/contest/results_screen/tiles.4bpp.lz"); const u32 gContestResults_WinnerBanner_Tilemap[] = INCBIN_U32("graphics/contest/results_screen/winner_banner.bin.lz"); const u32 gContestResults_Interface_Tilemap[] = INCBIN_U32("graphics/contest/results_screen/interface.bin.lz"); @@ -498,8 +489,8 @@ const u32 gBattleAnimSpritePal_IceCrystals[] = INCBIN_U32("graphics/battle_anims const u32 gBattleAnimSpriteGfx_IceSpikes[] = INCBIN_U32("graphics/battle_anims/sprites/ice_spikes.4bpp.lz"); -const u32 gUnusedGfx_OldBeatUp[] = INCBIN_U32("graphics/unused/old_beatup.4bpp.lz"); -const u32 gUnusedPal_OldBeatUp[] = INCBIN_U32("graphics/unused/old_beatup.gbapal.lz"); +const u32 gBattleAnimSpriteGfx_OldBeatUp[] = INCBIN_U32("graphics/battle_anims/unused/old_beatup.4bpp.lz"); +const u32 gBattleAnimSpritePal_OldBeatUp[] = INCBIN_U32("graphics/battle_anims/unused/old_beatup.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Orbs[] = INCBIN_U32("graphics/battle_anims/sprites/orbs.4bpp.lz"); const u32 gBattleAnimSpritePal_Orbs[] = INCBIN_U32("graphics/battle_anims/sprites/orbs.gbapal.lz"); @@ -547,9 +538,9 @@ const u32 gBattleAnimSpritePal_RazorLeaf[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpriteGfx_MistCloud[] = INCBIN_U32("graphics/battle_anims/sprites/mist_cloud.4bpp.lz"); const u32 gBattleAnimSpritePal_MistCloud[] = INCBIN_U32("graphics/battle_anims/sprites/mist_cloud.gbapal.lz"); -const u32 gUnknownGfx_D1C060[] = INCBIN_U32("graphics/unknown/unknown_D1C060.4bpp.lz"); -const u32 gUnknownPal_D1C060[] = INCBIN_U32("graphics/unknown/unknown_D1C060.gbapal.lz"); -const u32 gUnknownTilemap_D1C060[] = INCBIN_U32("graphics/unknown/unknown_D1C060.bin.lz"); +const u32 gBattleAnimUnusedGfx_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.4bpp.lz"); +const u32 gBattleAnimUnusedPal_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.gbapal.lz"); +const u32 gBattleAnimUnusedTilemap_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.bin.lz"); const u32 gBattleAnimSpriteGfx_WhirlwindLines[] = INCBIN_U32("graphics/battle_anims/sprites/whirlwind_lines.4bpp.lz"); const u32 gBattleAnimSpritePal_WhirlwindLines[] = INCBIN_U32("graphics/battle_anims/sprites/whirlwind_lines.gbapal.lz"); @@ -590,9 +581,9 @@ const u32 gMetalShineGfx[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine const u32 gMetalShinePalette[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine.gbapal.lz"); const u32 gMetalShineTilemap[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine.bin.lz"); -const u32 gUnusedGfx_Goosuto[] = INCBIN_U32("graphics/unused/goosuto.4bpp.lz"); // ghost -const u32 gUnusedPal_Goosuto[] = INCBIN_U32("graphics/unused/goosuto.gbapal.lz"); -const u32 gUnusedTilemap_Goosuto[] = INCBIN_U32("graphics/unused/goosuto.bin.lz"); +const u32 gUnusedGfx_Goosuto[] = INCBIN_U32("graphics/battle_anims/unused/goosuto.4bpp.lz"); // ghost +const u32 gUnusedPal_Goosuto[] = INCBIN_U32("graphics/battle_anims/unused/goosuto.gbapal.lz"); +const u32 gUnusedTilemap_Goosuto[] = INCBIN_U32("graphics/battle_anims/unused/goosuto.bin.lz"); const u32 gBattleAnimSpriteGfx_YellowStar[] = INCBIN_U32("graphics/battle_anims/sprites/yellow_star.4bpp.lz"); const u32 gBattleAnimSpritePal_YellowStar[] = INCBIN_U32("graphics/battle_anims/sprites/yellow_star.gbapal.lz"); @@ -942,7 +933,7 @@ const u32 gBattleAnimSpritePal_Meteor[] = INCBIN_U32("graphics/battle_anims/spri const u32 gBattleAnimSpriteGfx_FlatRock[] = INCBIN_U32("graphics/battle_anims/sprites/flat_rock.4bpp.lz"); const u32 gBattleAnimSpritePal_FlatRock[] = INCBIN_U32("graphics/battle_anims/sprites/flat_rock.gbapal.lz"); -const u32 gUnknownPal_C2F9E0[] = INCBIN_U32("graphics/unknown/unknown_C2F9E0.gbapal.lz"); +const u32 gBattleAnimUnusedPal_Unknown2[] = INCBIN_U32("graphics/battle_anims/unused/unknown_2.gbapal.lz"); #include "data/graphics/pokemon.h" #include "data/graphics/trainers.h" @@ -950,9 +941,9 @@ const u32 gUnknownPal_C2F9E0[] = INCBIN_U32("graphics/unknown/unknown_C2F9E0.gba const u8 gMonIcon_QuestionMark[] = INCBIN_U8("graphics/pokemon/question_mark/icon.4bpp"); const u8 gMonFootprint_QuestionMark[] = INCBIN_U8("graphics/pokemon/question_mark/footprint.1bpp"); -const u32 gUnknown_08D778F0[] = INCBIN_U32("graphics/battle_transitions/vs_frame.4bpp.lz"); -const u32 gUnknown_08D779D8[] = INCBIN_U32("graphics/battle_transitions/vs_frame.bin.lz"); -const u32 gUnknown_08D77AE4[] = INCBIN_U32("graphics/battle_transitions/vs_frame.gbapal.lz"); +const u32 gBattleVSFrame_Gfx[] = INCBIN_U32("graphics/battle_transitions/vs_frame.4bpp.lz"); +const u32 gBattleVSFrame_Tilemap[] = INCBIN_U32("graphics/battle_transitions/vs_frame.bin.lz"); +const u32 gBattleVSFrame_Pal[] = INCBIN_U32("graphics/battle_transitions/vs_frame.gbapal.lz"); const u32 gVsLettersGfx[] = INCBIN_U32("graphics/battle_transitions/vs.4bpp.lz"); @@ -976,7 +967,7 @@ const u32 gBattleArenaJudgementSymbolsGfx[] = INCBIN_U32("graphics/battle_fronti const u32 gBattleArenaJudgementSymbolsPalette[] = INCBIN_U32("graphics/battle_frontier/arena_judgement_symbols.gbapal.lz"); const u32 gBattleWindowTextPalette[] = INCBIN_U32("graphics/battle_interface/text.gbapal.lz"); -const u16 gUnknown_08D85620[] = INCBIN_U16("graphics/battle_frontier/text_pp.gbapal"); +const u16 gPPTextPalette[] = INCBIN_U16("graphics/battle_frontier/text_pp.gbapal"); const u16 gTilesetAnims_BattleDomePals0_0[] = INCBIN_U16("graphics/battle_frontier/dome_anim1.gbapal"); const u16 gTilesetAnims_BattleDomePals0_1[] = INCBIN_U16("graphics/battle_frontier/dome_anim2.gbapal"); @@ -985,10 +976,10 @@ const u16 gTilesetAnims_BattleDomePals0_3[] = INCBIN_U16("graphics/battle_fronti static const u16 sUnused0[] = {0x13F, 0x119, 0x113, 0x10E}; -const u16 gUnknown_08D856C8[] = INCBIN_U16("graphics/battle_frontier/pyramid_light.gbapal"); // unfaded pal for the player light in battle pyramid +const u16 gBattlePyramidFloor_Pal[] = INCBIN_U16("graphics/battle_frontier/pyramid_floor.gbapal"); -const u32 gUnknown_08D857A8[] = INCBIN_U32("graphics/battle_frontier/battle_tilemap1.bin.lz"); -const u32 gUnknown_08D85A1C[] = INCBIN_U32("graphics/battle_frontier/battle_tilemap2.bin.lz"); +const u32 gMultiBattleIntroBg_Opponent_Tilemap[] = INCBIN_U32("graphics/battle_frontier/multi_battle_intro_bg_opponent.bin.lz"); +const u32 gMultiBattleIntroBg_Player_Tilemap[] = INCBIN_U32("graphics/battle_frontier/multi_battle_intro_bg_player.bin.lz"); #include "data/graphics/intro_scene.h" @@ -1060,8 +1051,7 @@ const u32 gBattleAnimBgTilemap_Ghost[] = INCBIN_U32("graphics/battle_anims/backg const u32 gBattleAnimSpritePal_WhipHit[] = INCBIN_U32("graphics/battle_anims/sprites/whip_hit.gbapal.lz"); const u32 gBattleAnimBgPalette_Solarbeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz"); - -const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz"); +const u32 gBattleAnimBgTilemap_Solarbeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.bin.lz"); // Unused const u32 gBerryBlenderCenter_Gfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz"); const u32 gBerryBlenderOuter_Gfx[] = INCBIN_U32("graphics/berry_blender/outer.4bpp.lz"); @@ -1139,13 +1129,13 @@ const u32 gMoveTypes_Pal[] = INCBIN_U32("graphics/types/move_types.gbapal.lz"); const u32 gSummaryMoveSelect_Gfx[] = INCBIN_U32("graphics/interface/summary_frames.4bpp.lz"); const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/interface/summary_frames.gbapal.lz"); -const u32 gStatusScreenBitmap[] = INCBIN_U32("graphics/interface/status_screen.4bpp.lz"); -const u32 gStatusScreenPalette[] = INCBIN_U32("graphics/interface/status_screen.gbapal.lz"); -const u32 gPageInfoTilemap[] = INCBIN_U32("graphics/interface/status_screen.bin.lz"); -const u32 gPageSkillsTilemap[] = INCBIN_U32("graphics/interface/status_tilemap1.bin.lz"); -const u32 gPageBattleMovesTilemap[] = INCBIN_U32("graphics/interface/status_tilemap2.bin.lz"); -const u32 gPageContestMovesTilemap[] = INCBIN_U32("graphics/interface/status_tilemap3.bin.lz"); -const u32 gUnknown_08D98CC8[] = INCBIN_U32("graphics/interface/status_tilemap0.bin.lz"); +const u32 gSummaryScreen_Gfx[] = INCBIN_U32("graphics/interface/summary_screen.4bpp.lz"); +const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/interface/summary_screen.gbapal.lz"); +const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info.bin.lz"); +const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_skills.bin.lz"); +const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_battle_moves.bin.lz"); +const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_contest_moves.bin.lz"); +const u32 gSummaryPage_InfoCopy_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info_copy.bin.lz"); const u32 gBagMaleTiles[] = INCBIN_U32("graphics/misc/bag_male.4bpp.lz"); const u32 gBagFemaleTiles[] = INCBIN_U32("graphics/misc/bag_female.4bpp.lz"); @@ -1157,11 +1147,10 @@ const u32 gBagScreenFemale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_fem const u32 gBagScreen_Gfx[] = INCBIN_U32("graphics/interface/bag_screen.4bpp.lz"); const u32 gBagScreen_GfxTileMap[] = INCBIN_U32("graphics/interface/bag_screen_tilemap.bin.lz"); -const u32 gBattleFrontierGfx_PyramidBag[] = INCBIN_U32("graphics/interface/bag_pyramid.4bpp.lz"); -const u32 gBattleFrontierGfx_PyramidBag_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid.gbapal.lz"); // female palette is first and male is second. -const u32 gBattleFrontierGfx_PyramidBagTileMap[] = INCBIN_U32("graphics/interface/bag_pyramid_tilemap.bin.lz"); - -const u32 gUnknown_08D9AF44[] = INCBIN_U32("graphics/unknown/unknown_D9AF44.gbapal.lz"); +const u32 gBattlePyramidBag_Gfx[] = INCBIN_U32("graphics/interface/bag_pyramid.4bpp.lz"); +const u32 gBattlePyramidBag_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid.gbapal.lz"); // female palette is first and male is second. +const u32 gBattlePyramidBagTilemap[] = INCBIN_U32("graphics/interface/bag_pyramid_tilemap.bin.lz"); +const u32 gBattlePyramidBagInterface_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid_interface.gbapal.lz"); const u32 gBagSwapLineGfx[] = INCBIN_U32("graphics/interface/bag_swap.4bpp.lz"); const u32 gBagSwapLinePal[] = INCBIN_U32("graphics/interface/bag_swap.gbapal.lz"); @@ -1473,8 +1462,8 @@ const u16 gTradeMenu_Pal[] = INCBIN_U16("graphics/trade/menu.gbapal"); const u16 gTradeCursor_Pal[] = INCBIN_U16("graphics/trade/cursor.gbapal"); const u8 gTradeMenu_Gfx[] = INCBIN_U8("graphics/trade/menu.4bpp"); const u8 gTradeCursor_Gfx[] = INCBIN_U8("graphics/trade/cursor.4bpp"); -const u16 gUnused_DDCEE4[] = INCBIN_U16("graphics/unused/unused_DDCEE4.bin"); -const u16 gUnknown_08DDCF04[] = INCBIN_U16("graphics/trade/unknown_DDCF04.bin"); +const u16 gTradeUnused_Tilemap[] = INCBIN_U16("graphics/trade/unused.bin"); +const u16 gTradeMenu_Tilemap[] = INCBIN_U16("graphics/trade/menu.bin"); const u16 gTradeMenuMonBox_Tilemap[] = INCBIN_U16("graphics/trade/menu_mon_box.bin"); const u16 gMessageBox_Pal[] = INCBIN_U16("graphics/text_window/message_box.gbapal"); @@ -1513,26 +1502,21 @@ const u16 gMonIconPalettes[][16] = INCBIN_U16("graphics/pokemon/icon_palettes/icon_palette_2.gbapal"), }; -const u16 gTitleScreenBgPalettes[] = INCBIN_U16("graphics/title_screen/pokemon_logo.gbapal", - "graphics/title_screen/rayquaza_and_clouds.gbapal"); +const u16 gTitleScreenBgPalettes[] = INCBIN_U16("graphics/title_screen/pokemon_logo.gbapal", + "graphics/title_screen/rayquaza_and_clouds.gbapal"); +const u16 gTitleScreenEmeraldVersionPal[] = INCBIN_U16("graphics/title_screen/emerald_version.gbapal"); +const u32 gTitleScreenCloudsTilemap[] = INCBIN_U32("graphics/title_screen/title_screen1.bin.lz"); +const u32 gTitleScreenPokemonLogoGfx[] = INCBIN_U32("graphics/title_screen/pokemon_logo.8bpp.lz"); +const u32 gTitleScreenEmeraldVersionGfx[] = INCBIN_U32("graphics/title_screen/emerald_version.8bpp.lz"); +const u16 gTitleScreenPressStartPal[] = INCBIN_U16("graphics/title_screen/press_start.gbapal"); +const u32 gTitleScreenPressStartGfx[] = INCBIN_U32("graphics/title_screen/press_start.4bpp.lz"); +const u32 gTitleScreenPokemonLogoTilemap[] = INCBIN_U32("graphics/title_screen/title_screen2.bin.lz"); -const u16 gTitleScreenEmeraldVersionPal[] = INCBIN_U16("graphics/title_screen/emerald_version.gbapal"); - -const u32 gUnknown_08DDE458[] = INCBIN_U32("graphics/title_screen/title_screen1.bin.lz"); - -const u32 gTitleScreenPokemonLogoGfx[] = INCBIN_U32("graphics/title_screen/pokemon_logo.8bpp.lz"); - -const u32 gTitleScreenEmeraldVersionGfx[] = INCBIN_U32("graphics/title_screen/emerald_version.8bpp.lz"); - -const u16 gTitleScreenPressStartPal[] = INCBIN_U16("graphics/title_screen/press_start.gbapal"); -const u32 gTitleScreenPressStartGfx[] = INCBIN_U32("graphics/title_screen/press_start.4bpp.lz"); - -const u32 gUnknown_08DE0644[] = INCBIN_U32("graphics/title_screen/title_screen2.bin.lz"); - -const u16 gFrontierPassBg_Pal[][16] = INCBIN_U16("graphics/frontier_pass/bg.gbapal");// size in LoadPalette calls is reported as 0xD0 << 1, which is 0x1A0, but palette is only 0x100 bytes long so it loads garbage as well -const u32 gFrontierPassBg_Gfx[] = INCBIN_U32("graphics/frontier_pass/bg.4bpp.lz"); -const u32 gFrontierPassMapAndCard_Gfx[] = INCBIN_U32("graphics/frontier_pass/map_and_card.8bpp.lz"); -const u32 gFrontierPassBg_Tilemap[] = INCBIN_U32("graphics/frontier_pass/bg.bin.lz"); +// size in LoadPalette calls is reported as 0xD0 << 1, which is 0x1A0, but palette is only 0x100 bytes long so it loads garbage as well +const u16 gFrontierPassBg_Pal[][16] = INCBIN_U16("graphics/frontier_pass/bg.gbapal"); +const u32 gFrontierPassBg_Gfx[] = INCBIN_U32("graphics/frontier_pass/bg.4bpp.lz"); +const u32 gFrontierPassMapAndCard_Gfx[] = INCBIN_U32("graphics/frontier_pass/map_and_card.8bpp.lz"); +const u32 gFrontierPassBg_Tilemap[] = INCBIN_U32("graphics/frontier_pass/bg.bin.lz"); const u16 gFrontierPassCancelButton_Tilemap[] = INCBIN_U16("graphics/frontier_pass/cancel.bin"); const u16 gFrontierPassCancelButtonHighlighted_Tilemap[] = INCBIN_U16("graphics/frontier_pass/cancel_highlighted.bin"); diff --git a/src/item_menu.c b/src/item_menu.c index 53f478a31d..32b035ec91 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -2451,7 +2451,7 @@ static void LoadBagMenuTextWindows(void) LoadUserWindowBorderGfx(0, 1, 0xE0); LoadMessageBoxGfx(0, 10, 0xD0); ListMenuLoadStdPalAt(0xC0, 1); - LoadPalette(&gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(&gStandardMenuPalette, 0xF0, 0x20); for (i = 0; i <= WIN_POCKET_NAME; i++) { FillWindowPixelBuffer(i, PIXEL_FILL(0)); diff --git a/src/link.c b/src/link.c index 66549f648c..779fba9dd4 100644 --- a/src/link.c +++ b/src/link.c @@ -1622,7 +1622,7 @@ void CB2_LinkError(void) SetGpuReg(REG_OFFSET_BG1HOFS, 0); SetGpuReg(REG_OFFSET_BG1VOFS, 0); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON | DISPCNT_OBJWIN_ON); - LoadPalette(gUnknown_0860F074, 0xf0, 0x20); + LoadPalette(gStandardMenuPalette, 0xf0, 0x20); gSoftResetDisabled = FALSE; CreateTask(Task_DestroySelf, 0); StopMapMusic(); diff --git a/src/menu.c b/src/menu.c index dcc32319e9..117642098e 100644 --- a/src/menu.c +++ b/src/menu.c @@ -60,7 +60,7 @@ static EWRAM_DATA bool8 sScheduledBgCopiesToVram[4] = {FALSE}; static EWRAM_DATA u16 sTempTileDataBufferIdx = 0; static EWRAM_DATA void *sTempTileDataBuffer[0x20] = {NULL}; -const u16 gUnknown_0860F074[] = INCBIN_U16("graphics/interface/860F074.gbapal"); +const u16 gStandardMenuPalette[] = INCBIN_U16("graphics/interface/860F074.gbapal"); static const u8 sTextSpeedFrameDelays[] = { @@ -433,26 +433,28 @@ void sub_819786C(u8 windowId, bool8 copyToVram) DrawDialogFrameWithCustomTileAndPalette(windowId, copyToVram, DLG_WINDOW_BASE_TILE_NUM, 0xF); } -void sub_819789C(void) +void Menu_LoadStdPal(void) { - LoadPalette(gUnknown_0860F074, STD_WINDOW_PALETTE_NUM * 0x10, 0x14); + LoadPalette(gStandardMenuPalette, STD_WINDOW_PALETTE_NUM * 0x10, 0x14); } void Menu_LoadStdPalAt(u16 offset) { - LoadPalette(gUnknown_0860F074, offset, 0x14); + LoadPalette(gStandardMenuPalette, offset, 0x14); } -const u16 *sub_81978C8(void) +// Unused +static const u16 *Menu_GetStdPal(void) { - return gUnknown_0860F074; + return gStandardMenuPalette; } -u16 sub_81978D0(u8 colorNum) +// Unused +static u16 Menu_GetStdPalColor(u8 colorNum) { if (colorNum > 15) colorNum = 0; - return gUnknown_0860F074[colorNum]; + return gStandardMenuPalette[colorNum]; } void DisplayItemMessageOnField(u8 taskId, const u8 *string, TaskFunc callback) diff --git a/src/menu_specialized.c b/src/menu_specialized.c index c9d895e193..1ea53a8988 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -683,7 +683,7 @@ void InitMoveRelearnerWindows(bool8 useContextWindow) InitWindows(sMoveRelearnerWindowTemplates); DeactivateAllTextPrinters(); LoadUserWindowBorderGfx(0, 1, 0xE0); - LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(gStandardMenuPalette, 0xF0, 0x20); for (i = 0; i < 5; i++) { diff --git a/src/party_menu.c b/src/party_menu.c index 95a4852db6..38ca8c9d51 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2019,7 +2019,7 @@ static void InitPartyMenuWindows(u8 layout) FillWindowPixelBuffer(i, PIXEL_FILL(0)); LoadUserWindowBorderGfx(0, 0x4F, 0xD0); LoadPalette(GetOverworldTextboxPalettePtr(), 0xE0, 0x20); - LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(gStandardMenuPalette, 0xF0, 0x20); } static void CreateCancelConfirmWindows(bool8 chooseHalf) diff --git a/src/pokeblock.c b/src/pokeblock.c index 89c2bc9622..647a85b109 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -95,10 +95,6 @@ enum PKBL_GIVE_TO_LADY }; - -extern const u16 gUnknown_0860F074[]; - -// this file's functions static void CB2_InitPokeblockMenu(void); static bool8 InitPokeblockMenu(void); static bool8 LoadPokeblockMenuGfx(void); @@ -685,7 +681,7 @@ static void HandleInitWindows(void) DeactivateAllTextPrinters(); LoadUserWindowBorderGfx(0, 1, 0xE0); LoadMessageBoxGfx(0, 0xA, 0xD0); - LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(gStandardMenuPalette, 0xF0, 0x20); for (i = 0; i < ARRAY_COUNT(sWindowTemplates) - 1; i++) FillWindowPixelBuffer(i, PIXEL_FILL(0)); diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index a4395d760a..2241d1668b 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -116,8 +116,6 @@ struct PokeblockFeed u8 unused4; }; -extern const u16 gUnknown_0860F074[]; - static void HandleInitBackgrounds(void); static void HandleInitWindows(void); static void LaunchPokeblockFeedTask(void); @@ -786,7 +784,7 @@ static void HandleInitWindows(void) InitWindows(sWindowTemplates); DeactivateAllTextPrinters(); LoadUserWindowBorderGfx(0, 1, 0xE0); - LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(gStandardMenuPalette, 0xF0, 0x20); FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); ScheduleBgCopyTilemapToVram(0); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index f6371b088f..dc05c52c4a 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1301,35 +1301,35 @@ static bool8 DecompressGraphics(void) { case 0: ResetTempTileDataBuffers(); - DecompressAndCopyTileDataToVram(1, &gStatusScreenBitmap, 0, 0, 0); + DecompressAndCopyTileDataToVram(1, &gSummaryScreen_Gfx, 0, 0, 0); sMonSummaryScreen->switchCounter++; break; case 1: if (FreeTempTileDataBuffersIfPossible() != 1) { - LZDecompressWram(gPageInfoTilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][0]); + LZDecompressWram(gSummaryPage_Info_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][0]); sMonSummaryScreen->switchCounter++; } break; case 2: - LZDecompressWram(gUnknown_08D98CC8, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]); + LZDecompressWram(gSummaryPage_InfoCopy_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]); sMonSummaryScreen->switchCounter++; break; case 3: - LZDecompressWram(gPageSkillsTilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_SKILLS][1]); + LZDecompressWram(gSummaryPage_Skills_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_SKILLS][1]); sMonSummaryScreen->switchCounter++; break; case 4: - LZDecompressWram(gPageBattleMovesTilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_BATTLE_MOVES][1]); + LZDecompressWram(gSummaryPage_BattleMoves_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_BATTLE_MOVES][1]); sMonSummaryScreen->switchCounter++; break; case 5: - LZDecompressWram(gPageContestMovesTilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_CONTEST_MOVES][1]); + LZDecompressWram(gSummaryPage_ContestMoves_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_CONTEST_MOVES][1]); sMonSummaryScreen->switchCounter++; break; case 6: - LoadCompressedPalette(gStatusScreenPalette, 0, 0x100); - LoadPalette(&gUnknown_08D85620, 0x81, 0x1E); + LoadCompressedPalette(gSummaryScreen_Pal, 0, 0x100); + LoadPalette(&gPPTextPalette, 0x81, 0x1E); sMonSummaryScreen->switchCounter++; break; case 7: diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 8f727310cd..da75a48040 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -217,7 +217,7 @@ static void CB2_SaveFailedScreen(void) LoadPalette(gBirchBagGrassPal, 0, 0x40); LoadPalette(sSaveFailedClockPal, 0x100, 0x20); LoadPalette(gTextWindowFrame1_Pal, 0xE0, 0x20); - LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + LoadPalette(gStandardMenuPalette, 0xF0, 0x20); DrawStdFrameWithCustomTileAndPalette(sWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE); DrawStdFrameWithCustomTileAndPalette(sWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE); FillWindowPixelBuffer(sWindowIds[CLOCK_WIN_ID], PIXEL_FILL(1)); // backwards? diff --git a/src/title_screen.c b/src/title_screen.c index ee71b68959..93e01327c2 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -547,14 +547,14 @@ void CB2_InitTitleScreen(void) case 1: // bg2 LZ77UnCompVram(gTitleScreenPokemonLogoGfx, (void *)(BG_CHAR_ADDR(0))); - LZ77UnCompVram(gUnknown_08DE0644, (void *)(BG_SCREEN_ADDR(9))); + LZ77UnCompVram(gTitleScreenPokemonLogoTilemap, (void *)(BG_SCREEN_ADDR(9))); LoadPalette(gTitleScreenBgPalettes, 0, 0x1E0); // bg3 LZ77UnCompVram(sTitleScreenRayquazaGfx, (void *)(BG_CHAR_ADDR(2))); LZ77UnCompVram(sTitleScreenRayquazaTilemap, (void *)(BG_SCREEN_ADDR(26))); // bg1 LZ77UnCompVram(sTitleScreenCloudsGfx, (void *)(BG_CHAR_ADDR(3))); - LZ77UnCompVram(gUnknown_08DDE458, (void *)(BG_SCREEN_ADDR(27))); + LZ77UnCompVram(gTitleScreenCloudsTilemap, (void *)(BG_SCREEN_ADDR(27))); ScanlineEffect_Stop(); ResetTasks(); ResetSpriteData(); diff --git a/src/trade.c b/src/trade.c index be2091eceb..566bb14f3f 100644 --- a/src/trade.c +++ b/src/trade.c @@ -334,8 +334,8 @@ static void InitTradeMenu(void) gPaletteFade.bufferTransferDisabled = TRUE; SetVBlankCallback(VBlankCB_TradeMenu); - LoadPalette(gUnknown_0860F074, 0xF0, 20); - LoadPalette(gUnknown_0860F074, 0xD0, 20); + LoadPalette(gStandardMenuPalette, 0xF0, 20); + LoadPalette(gStandardMenuPalette, 0xD0, 20); ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sTradeMenuBgTemplates, ARRAY_COUNT(sTradeMenuBgTemplates)); SetBgTilemapBuffer(1, sTradeMenuData->tilemapBuffer); @@ -913,7 +913,7 @@ static void LoadTradeBgGfx(u8 state) case 0: LoadPalette(gTradeMenu_Pal, 0, 0x60); LoadBgTiles(1, gTradeMenu_Gfx, 0x1280, 0); - CopyToBgTilemapBufferRect_ChangePalette(1, gUnknown_08DDCF04, 0, 0, 32, 20, 0); + CopyToBgTilemapBufferRect_ChangePalette(1, gTradeMenu_Tilemap, 0, 0, 32, 20, 0); LoadBgTilemap(2, sTradeStripesBG2Tilemap, 0x800, 0); break; case 1: @@ -924,9 +924,7 @@ static void LoadTradeBgGfx(u8 state) break; case 2: for (i = 0; i < 4; i++) - { SetGpuReg(REG_OFFSET_BG0HOFS + (i * 2), 0); - } ShowBg(0); ShowBg(1); ShowBg(2); diff --git a/src/union_room_battle.c b/src/union_room_battle.c index 1ca414d797..2a195730f7 100644 --- a/src/union_room_battle.c +++ b/src/union_room_battle.c @@ -132,7 +132,7 @@ void CB2_UnionRoomBattle(void) FillBgTilemapBufferRect(0, 0, 0, 0, 30, 20, 0xF); LoadUserWindowBorderGfx(0, 1, 0xD0); LoadUserWindowBorderGfx_(0, 1, 0xD0); - sub_819789C(); + Menu_LoadStdPal(); SetVBlankCallback(VBlankCB_UnionRoomBattle); gMain.state++; break; diff --git a/src/union_room_chat.c b/src/union_room_chat.c index 7debe3cd4f..ca6f8bd1d8 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -3115,7 +3115,7 @@ static void LoadKeyboardSwapWindow(void) FillWindowPixelBuffer(3, PIXEL_FILL(1)); LoadUserWindowBorderGfx(3, 1, 0xD0); LoadUserWindowBorderGfx_(3, 0xA, 0x20); - LoadPalette(gUnknown_0860F074, 0xE0, 0x20); + LoadPalette(gStandardMenuPalette, 0xE0, 0x20); } static void InitScanlineEffect(void) From a470e2c7612f88293685d2d6587a083dd6d98cd6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 27 Oct 2021 14:06:53 -0400 Subject: [PATCH 102/417] Tabs to spaces for graphics_file_rules alignment --- graphics_file_rules.mk | 132 ++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index b81c3347f0..c83c57e9ad 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -27,33 +27,33 @@ contest_types := cool beauty cute smart tough ### Castform ### $(CASTFORMGFXDIR)/front.4bpp: $(CASTFORMGFXDIR)/front_normal_form.4bpp \ - $(CASTFORMGFXDIR)/front_sunny_form.4bpp \ - $(CASTFORMGFXDIR)/front_rainy_form.4bpp \ - $(CASTFORMGFXDIR)/front_snowy_form.4bpp + $(CASTFORMGFXDIR)/front_sunny_form.4bpp \ + $(CASTFORMGFXDIR)/front_rainy_form.4bpp \ + $(CASTFORMGFXDIR)/front_snowy_form.4bpp @cat $^ >$@ $(CASTFORMGFXDIR)/back.4bpp: $(CASTFORMGFXDIR)/back_normal_form.4bpp \ - $(CASTFORMGFXDIR)/back_sunny_form.4bpp \ - $(CASTFORMGFXDIR)/back_rainy_form.4bpp \ - $(CASTFORMGFXDIR)/back_snowy_form.4bpp + $(CASTFORMGFXDIR)/back_sunny_form.4bpp \ + $(CASTFORMGFXDIR)/back_rainy_form.4bpp \ + $(CASTFORMGFXDIR)/back_snowy_form.4bpp @cat $^ >$@ $(CASTFORMGFXDIR)/anim_front.4bpp: $(CASTFORMGFXDIR)/anim_front_normal_form.4bpp \ - $(CASTFORMGFXDIR)/anim_front_sunny_form.4bpp \ - $(CASTFORMGFXDIR)/anim_front_rainy_form.4bpp \ - $(CASTFORMGFXDIR)/anim_front_snowy_form.4bpp + $(CASTFORMGFXDIR)/anim_front_sunny_form.4bpp \ + $(CASTFORMGFXDIR)/anim_front_rainy_form.4bpp \ + $(CASTFORMGFXDIR)/anim_front_snowy_form.4bpp @cat $^ >$@ $(CASTFORMGFXDIR)/normal.gbapal: $(CASTFORMGFXDIR)/normal_normal_form.gbapal \ - $(CASTFORMGFXDIR)/normal_sunny_form.gbapal \ - $(CASTFORMGFXDIR)/normal_rainy_form.gbapal \ - $(CASTFORMGFXDIR)/normal_snowy_form.gbapal + $(CASTFORMGFXDIR)/normal_sunny_form.gbapal \ + $(CASTFORMGFXDIR)/normal_rainy_form.gbapal \ + $(CASTFORMGFXDIR)/normal_snowy_form.gbapal @cat $^ >$@ $(CASTFORMGFXDIR)/shiny.gbapal: $(CASTFORMGFXDIR)/shiny_normal_form.gbapal \ - $(CASTFORMGFXDIR)/shiny_sunny_form.gbapal \ - $(CASTFORMGFXDIR)/shiny_rainy_form.gbapal \ - $(CASTFORMGFXDIR)/shiny_snowy_form.gbapal + $(CASTFORMGFXDIR)/shiny_sunny_form.gbapal \ + $(CASTFORMGFXDIR)/shiny_rainy_form.gbapal \ + $(CASTFORMGFXDIR)/shiny_snowy_form.gbapal @cat $^ >$@ @@ -357,38 +357,38 @@ $(MISCGFXDIR)/japanese_hof.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 29 $(BATINTGFXDIR)/textbox.gbapal: $(BATINTGFXDIR)/textbox_0.gbapal \ - $(BATINTGFXDIR)/textbox_1.gbapal + $(BATINTGFXDIR)/textbox_1.gbapal @cat $^ >$@ $(BTLANMSPRGFXDIR)/ice_cube.4bpp: $(BTLANMSPRGFXDIR)/ice_cube_0.4bpp \ - $(BTLANMSPRGFXDIR)/ice_cube_1.4bpp \ - $(BTLANMSPRGFXDIR)/ice_cube_2.4bpp \ - $(BTLANMSPRGFXDIR)/ice_cube_3.4bpp + $(BTLANMSPRGFXDIR)/ice_cube_1.4bpp \ + $(BTLANMSPRGFXDIR)/ice_cube_2.4bpp \ + $(BTLANMSPRGFXDIR)/ice_cube_3.4bpp @cat $^ >$@ $(UNUSEDGFXDIR)/obi_palpak1.gbapal: $(UNUSEDGFXDIR)/old_pal1.gbapal \ - $(UNUSEDGFXDIR)/old_pal2.gbapal \ - $(UNUSEDGFXDIR)/old_pal3.gbapal + $(UNUSEDGFXDIR)/old_pal2.gbapal \ + $(UNUSEDGFXDIR)/old_pal3.gbapal @cat $^ >$@ $(UNUSEDGFXDIR)/obi_palpak3.gbapal: $(UNUSEDGFXDIR)/old_pal5.gbapal \ - $(UNUSEDGFXDIR)/old_pal6.gbapal \ - $(UNUSEDGFXDIR)/old_pal7.gbapal + $(UNUSEDGFXDIR)/old_pal6.gbapal \ + $(UNUSEDGFXDIR)/old_pal7.gbapal @cat $^ >$@ $(UNUSEDGFXDIR)/obi1.4bpp: $(UNUSEDGFXDIR)/old_bulbasaur.4bpp \ - $(UNUSEDGFXDIR)/old_charizard.4bpp + $(UNUSEDGFXDIR)/old_charizard.4bpp @cat $^ >$@ $(UNUSEDGFXDIR)/obi2.4bpp: $(UNUSEDGFXDIR)/old_bulbasaur2.4bpp \ - $(UNUSEDGFXDIR)/old_battle_interface_1.4bpp \ - $(UNUSEDGFXDIR)/old_battle_interface_2.4bpp \ - $(UNUSEDGFXDIR)/old_battle_interface_3.4bpp + $(UNUSEDGFXDIR)/old_battle_interface_1.4bpp \ + $(UNUSEDGFXDIR)/old_battle_interface_2.4bpp \ + $(UNUSEDGFXDIR)/old_battle_interface_3.4bpp @cat $^ >$@ $(INTERFACEGFXDIR)/battle_bar.4bpp: $(INTERFACEGFXDIR)/hpbar_anim.4bpp \ - $(INTERFACEGFXDIR)/numbers1.4bpp \ - $(INTERFACEGFXDIR)/numbers2.4bpp + $(INTERFACEGFXDIR)/numbers1.4bpp \ + $(INTERFACEGFXDIR)/numbers2.4bpp @cat $^ >$@ $(UNUSEDGFXDIR)/redyellowgreen_frame.bin: $(UNUSEDGFXDIR)/red_frame.bin \ @@ -404,38 +404,38 @@ $(BATINTGFXDIR)/unused_window2bar.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 5 $(JPCONTESTGFXDIR)/composite_1.4bpp: $(JPCONTESTGFXDIR)/frame_1.4bpp \ - $(JPCONTESTGFXDIR)/floor.4bpp \ - $(JPCONTESTGFXDIR)/frame_2.4bpp \ - $(JPCONTESTGFXDIR)/symbols.4bpp \ - $(JPCONTESTGFXDIR)/meter.4bpp \ - $(JPCONTESTGFXDIR)/letters.4bpp \ - $(JPCONTESTGFXDIR)/numbers.4bpp + $(JPCONTESTGFXDIR)/floor.4bpp \ + $(JPCONTESTGFXDIR)/frame_2.4bpp \ + $(JPCONTESTGFXDIR)/symbols.4bpp \ + $(JPCONTESTGFXDIR)/meter.4bpp \ + $(JPCONTESTGFXDIR)/letters.4bpp \ + $(JPCONTESTGFXDIR)/numbers.4bpp @cat $^ >$@ $(JPCONTESTGFXDIR)/composite_2.4bpp: $(JPCONTESTGFXDIR)/interface.4bpp \ - $(JPCONTESTGFXDIR)/audience.4bpp + $(JPCONTESTGFXDIR)/audience.4bpp @cat $^ >$@ $(JPCONTESTGFXDIR)/voltage.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 36 $(BTLANMSPRGFXDIR)/ice_crystals.4bpp: $(BTLANMSPRGFXDIR)/ice_crystals_0.4bpp \ - $(BTLANMSPRGFXDIR)/ice_crystals_1.4bpp \ - $(BTLANMSPRGFXDIR)/ice_crystals_2.4bpp \ - $(BTLANMSPRGFXDIR)/ice_crystals_3.4bpp \ - $(BTLANMSPRGFXDIR)/ice_crystals_4.4bpp + $(BTLANMSPRGFXDIR)/ice_crystals_1.4bpp \ + $(BTLANMSPRGFXDIR)/ice_crystals_2.4bpp \ + $(BTLANMSPRGFXDIR)/ice_crystals_3.4bpp \ + $(BTLANMSPRGFXDIR)/ice_crystals_4.4bpp @cat $^ >$@ $(BTLANMSPRGFXDIR)/mud_sand.4bpp: $(BTLANMSPRGFXDIR)/mud_sand_0.4bpp \ - $(BTLANMSPRGFXDIR)/mud_sand_1.4bpp + $(BTLANMSPRGFXDIR)/mud_sand_1.4bpp @cat $^ >$@ $(BTLANMSPRGFXDIR)/flower.4bpp: $(BTLANMSPRGFXDIR)/flower_0.4bpp \ - $(BTLANMSPRGFXDIR)/flower_1.4bpp + $(BTLANMSPRGFXDIR)/flower_1.4bpp @cat $^ >$@ $(BTLANMSPRGFXDIR)/spark.4bpp: $(BTLANMSPRGFXDIR)/spark_0.4bpp \ - $(BTLANMSPRGFXDIR)/spark_1.4bpp + $(BTLANMSPRGFXDIR)/spark_1.4bpp @cat $^ >$@ $(MASKSGFXDIR)/unused_level_up.4bpp: %.4bpp: %.png @@ -451,8 +451,8 @@ $(TYPESGFXDIR)/move_types.4bpp: $(types:%=$(TYPESGFXDIR)/%.4bpp) $(contest_types @cat $^ >$@ $(TYPESGFXDIR)/move_types.gbapal: $(TYPESGFXDIR)/move_types_1.gbapal \ - $(TYPESGFXDIR)/move_types_2.gbapal \ - $(TYPESGFXDIR)/move_types_3.gbapal + $(TYPESGFXDIR)/move_types_2.gbapal \ + $(TYPESGFXDIR)/move_types_3.gbapal @cat $^ >$@ $(INTERFACEGFXDIR)/bag_screen.4bpp: %.4bpp: %.png @@ -481,13 +481,13 @@ graphics/picture_frame/lobby.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 86 $(ROULETTEGFXDIR)/roulette_tilt.4bpp: $(ROULETTEGFXDIR)/shroomish.4bpp \ - $(ROULETTEGFXDIR)/tailow.4bpp + $(ROULETTEGFXDIR)/tailow.4bpp @cat $^ >$@ $(ROULETTEGFXDIR)/wheel_icons.4bpp: $(ROULETTEGFXDIR)/wynaut.4bpp \ - $(ROULETTEGFXDIR)/azurill.4bpp \ - $(ROULETTEGFXDIR)/skitty.4bpp \ - $(ROULETTEGFXDIR)/makuhita.4bpp + $(ROULETTEGFXDIR)/azurill.4bpp \ + $(ROULETTEGFXDIR)/skitty.4bpp \ + $(ROULETTEGFXDIR)/makuhita.4bpp @cat $^ >$@ $(BATTRANSGFXDIR)/regis.4bpp: %.4bpp: %.png @@ -497,23 +497,23 @@ $(BATTRANSGFXDIR)/rayquaza.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 938 $(BATTRANSGFXDIR)/frontier_square_1.4bpp: $(BATTRANSGFXDIR)/frontier_squares_blanktiles.4bpp \ - $(BATTRANSGFXDIR)/frontier_squares_1.4bpp + $(BATTRANSGFXDIR)/frontier_squares_1.4bpp @cat $^ >$@ $(BATTRANSGFXDIR)/frontier_square_2.4bpp: $(BATTRANSGFXDIR)/frontier_squares_blanktiles.4bpp \ - $(BATTRANSGFXDIR)/frontier_squares_2.4bpp + $(BATTRANSGFXDIR)/frontier_squares_2.4bpp @cat $^ >$@ $(BATTRANSGFXDIR)/frontier_square_3.4bpp: $(BATTRANSGFXDIR)/frontier_squares_blanktiles.4bpp \ - $(BATTRANSGFXDIR)/frontier_squares_3.4bpp + $(BATTRANSGFXDIR)/frontier_squares_3.4bpp @cat $^ >$@ $(BATTRANSGFXDIR)/frontier_square_4.4bpp: $(BATTRANSGFXDIR)/frontier_squares_blanktiles.4bpp \ - $(BATTRANSGFXDIR)/frontier_squares_4.4bpp + $(BATTRANSGFXDIR)/frontier_squares_4.4bpp @cat $^ >$@ $(SLOTMACHINEGFXDIR)/reel_time_gfx.4bpp: $(SLOTMACHINEGFXDIR)/reel_time_pikachu.4bpp \ - $(SLOTMACHINEGFXDIR)/reel_time_machine.4bpp + $(SLOTMACHINEGFXDIR)/reel_time_machine.4bpp @cat $^ >$@ $(UNUSEDGFXDIR)/intro_birch_beauty.4bpp: %.4bpp: %.png @@ -693,18 +693,18 @@ $(BATTRANSGFXDIR)/frontier_logo_center.4bpp: %.4bpp: %.png ### Pokenav ### $(PKNAVOPTIONSGFXDIR)/options.4bpp: $(PKNAVOPTIONSGFXDIR)/hoenn_map.4bpp \ - $(PKNAVOPTIONSGFXDIR)/condition.4bpp \ - $(PKNAVOPTIONSGFXDIR)/match_call.4bpp \ - $(PKNAVOPTIONSGFXDIR)/ribbons.4bpp \ - $(PKNAVOPTIONSGFXDIR)/switch_off.4bpp \ - $(PKNAVOPTIONSGFXDIR)/party.4bpp \ - $(PKNAVOPTIONSGFXDIR)/search.4bpp \ - $(PKNAVOPTIONSGFXDIR)/cool.4bpp \ - $(PKNAVOPTIONSGFXDIR)/beauty.4bpp \ - $(PKNAVOPTIONSGFXDIR)/cute.4bpp \ - $(PKNAVOPTIONSGFXDIR)/smart.4bpp \ - $(PKNAVOPTIONSGFXDIR)/tough.4bpp \ - $(PKNAVOPTIONSGFXDIR)/cancel.4bpp + $(PKNAVOPTIONSGFXDIR)/condition.4bpp \ + $(PKNAVOPTIONSGFXDIR)/match_call.4bpp \ + $(PKNAVOPTIONSGFXDIR)/ribbons.4bpp \ + $(PKNAVOPTIONSGFXDIR)/switch_off.4bpp \ + $(PKNAVOPTIONSGFXDIR)/party.4bpp \ + $(PKNAVOPTIONSGFXDIR)/search.4bpp \ + $(PKNAVOPTIONSGFXDIR)/cool.4bpp \ + $(PKNAVOPTIONSGFXDIR)/beauty.4bpp \ + $(PKNAVOPTIONSGFXDIR)/cute.4bpp \ + $(PKNAVOPTIONSGFXDIR)/smart.4bpp \ + $(PKNAVOPTIONSGFXDIR)/tough.4bpp \ + $(PKNAVOPTIONSGFXDIR)/cancel.4bpp @cat $^ >$@ $(PKNAVGFXDIR)/header.4bpp: %.4bpp: %.png From 7f49f2633113175b78978bffe01000dcf1e858a8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 27 Oct 2021 22:38:48 -0400 Subject: [PATCH 103/417] Restore ModifyStatByNature bug notes --- src/pokemon.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index 6e3d37ae39..0f943734b8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5775,27 +5775,36 @@ u8 GetTrainerEncounterMusicId(u16 trainerOpponentId) return TRAINER_ENCOUNTER_MUSIC(trainerOpponentId); } -u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex) +u16 ModifyStatByNature(u8 nature, u16 stat, u8 statIndex) { +// Because this is a u16 it will be unable to store the +// result of the multiplication for any stat > 595 for a +// positive nature and > 728 for a negative nature. +// Neither occur in the base game, but this can happen if +// any Nature-affected base stat is increased to a value +// above 248. The closest by default is Shuckle at 230. +#ifdef BUGFIX + u32 retVal; +#else u16 retVal; +#endif + // Don't modify HP, Accuracy, or Evasion by nature if (statIndex <= STAT_HP || statIndex > NUM_NATURE_STATS) - { - return n; - } + return stat; switch (gNatureStatTable[nature][statIndex - 1]) { case 1: - retVal = n * 110; + retVal = stat * 110; retVal /= 100; break; case -1: - retVal = n * 90; + retVal = stat * 90; retVal /= 100; break; default: - retVal = n; + retVal = stat; break; } From 07bf225f9416b3d75fb69101d1d5ec87a19031b6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 27 Oct 2021 16:17:27 -0400 Subject: [PATCH 104/417] Continue battle_transition documenting --- data/field_effect_scripts.s | 6 +- .../{85BDB14.pal => unused.pal} | 0 include/battle_transition.h | 12 +- include/constants/field_effects.h | 4 +- src/battle_setup.c | 12 +- src/battle_transition.c | 2189 ++++++++++------- 6 files changed, 1286 insertions(+), 937 deletions(-) rename graphics/battle_transitions/{85BDB14.pal => unused.pal} (100%) diff --git a/data/field_effect_scripts.s b/data/field_effect_scripts.s index 1c97da8fe4..49fcf798b6 100644 --- a/data/field_effect_scripts.s +++ b/data/field_effect_scripts.s @@ -50,7 +50,7 @@ gFieldEffectScriptPointers:: .4byte gFieldEffectScript_HotSpringsWater @ FLDEFF_HOT_SPRINGS_WATER .4byte gFieldEffectScript_UseWaterfall @ FLDEFF_USE_WATERFALL .4byte gFieldEffectScript_UseDive @ FLDEFF_USE_DIVE - .4byte gFieldEffectScript_Pokeball @ FLDEFF_POKEBALL + .4byte gFieldEffectScript_PokeballTrail @ FLDEFF_POKEBALL_TRAIL .4byte gFieldEffectScript_HeartIcon @ FLDEFF_HEART_ICON .4byte gFieldEffectScript_Nop47 @ FLDEFF_NOP_47 .4byte gFieldEffectScript_Nop48 @ FLDEFF_NOP_48 @@ -254,9 +254,9 @@ gFieldEffectScript_UseDive:: field_eff_callnative FldEff_UseDive field_eff_end -gFieldEffectScript_Pokeball:: +gFieldEffectScript_PokeballTrail:: field_eff_loadpal gSpritePalette_Pokeball - field_eff_callnative FldEff_Pokeball + field_eff_callnative FldEff_PokeballTrail field_eff_end gFieldEffectScript_HeartIcon:: diff --git a/graphics/battle_transitions/85BDB14.pal b/graphics/battle_transitions/unused.pal similarity index 100% rename from graphics/battle_transitions/85BDB14.pal rename to graphics/battle_transitions/unused.pal diff --git a/include/battle_transition.h b/include/battle_transition.h index e978e9094c..1e7339fa2f 100644 --- a/include/battle_transition.h +++ b/include/battle_transition.h @@ -4,7 +4,7 @@ void BattleTransition_StartOnField(u8 transitionId); void BattleTransition_Start(u8 transitionId); bool8 IsBattleTransitionDone(void); -bool8 FldEff_Pokeball(void); +bool8 FldEff_PokeballTrail(void); void Task_BattleTransition_Intro(u8 taskId); void GetBg0TilesDst(u16 **tilemap, u16 **tileset); @@ -25,13 +25,13 @@ enum { B_TRANSITION_SHUFFLE, B_TRANSITION_BIG_POKEBALL, B_TRANSITION_POKEBALLS_TRAIL, - B_TRANSITION_CLOCKWISE_BLACKFADE, + B_TRANSITION_CLOCKWISE_WIPE, B_TRANSITION_RIPPLE, B_TRANSITION_WAVE, B_TRANSITION_SLICE, - B_TRANSITION_WHITEFADE, + B_TRANSITION_WHITE_BARS_FADE, B_TRANSITION_GRID_SQUARES, - B_TRANSITION_SHARDS, + B_TRANSITION_ANGLED_WIPES, B_TRANSITION_SIDNEY, B_TRANSITION_PHOEBE, B_TRANSITION_GLACIA, @@ -46,8 +46,8 @@ enum { B_TRANSITION_GROUDON, B_TRANSITION_RAYQUAZA, B_TRANSITION_SHRED_SPLIT, - B_TRANSITION_BLACKHOLE1, - B_TRANSITION_BLACKHOLE2, + B_TRANSITION_BLACKHOLE, + B_TRANSITION_BLACKHOLE_PULSATE, B_TRANSITION_RECTANGULAR_SPIRAL, B_TRANSITION_FRONTIER_LOGO_WIGGLE, B_TRANSITION_FRONTIER_LOGO_WAVE, diff --git a/include/constants/field_effects.h b/include/constants/field_effects.h index e02e01efbf..a620409479 100644 --- a/include/constants/field_effects.h +++ b/include/constants/field_effects.h @@ -46,7 +46,7 @@ #define FLDEFF_HOT_SPRINGS_WATER 42 #define FLDEFF_USE_WATERFALL 43 #define FLDEFF_USE_DIVE 44 -#define FLDEFF_POKEBALL 45 +#define FLDEFF_POKEBALL_TRAIL 45 #define FLDEFF_HEART_ICON 46 #define FLDEFF_NOP_47 47 #define FLDEFF_NOP_48 48 @@ -113,7 +113,7 @@ #define FLDEFF_PAL_TAG_GENERAL_1 0x1005 #define FLDEFF_PAL_TAG_POKEBALL_GLOW 0x1007 #define FLDEFF_PAL_TAG_SECRET_POWER_PLANT 0x1008 -#define FLDEFF_PAL_TAG_POKEBALL 0x1009 +#define FLDEFF_PAL_TAG_POKEBALL_TRAIL 0x1009 #define FLDEFF_PAL_TAG_ASH 0x100D #define FLDEFF_PAL_TAG_SAND_PILLAR 0x100E #define FLDEFF_PAL_TAG_SMALL_SPARKLE 0x100F diff --git a/src/battle_setup.c b/src/battle_setup.c index 6a4afe7462..b9833d20ae 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -112,15 +112,15 @@ EWRAM_DATA static u8 sNoOfPossibleTrainerRetScripts = 0; // Otherwise, the second transition is used. static const u8 sBattleTransitionTable_Wild[][2] = { - [TRANSITION_TYPE_NORMAL] = {B_TRANSITION_SLICE, B_TRANSITION_WHITEFADE}, - [TRANSITION_TYPE_CAVE] = {B_TRANSITION_CLOCKWISE_BLACKFADE, B_TRANSITION_GRID_SQUARES}, - [TRANSITION_TYPE_FLASH] = {B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES}, - [TRANSITION_TYPE_WATER] = {B_TRANSITION_WAVE, B_TRANSITION_RIPPLE}, + [TRANSITION_TYPE_NORMAL] = {B_TRANSITION_SLICE, B_TRANSITION_WHITE_BARS_FADE}, + [TRANSITION_TYPE_CAVE] = {B_TRANSITION_CLOCKWISE_WIPE, B_TRANSITION_GRID_SQUARES}, + [TRANSITION_TYPE_FLASH] = {B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES}, + [TRANSITION_TYPE_WATER] = {B_TRANSITION_WAVE, B_TRANSITION_RIPPLE}, }; static const u8 sBattleTransitionTable_Trainer[][2] = { - [TRANSITION_TYPE_NORMAL] = {B_TRANSITION_POKEBALLS_TRAIL, B_TRANSITION_SHARDS}, + [TRANSITION_TYPE_NORMAL] = {B_TRANSITION_POKEBALLS_TRAIL, B_TRANSITION_ANGLED_WIPES}, [TRANSITION_TYPE_CAVE] = {B_TRANSITION_SHUFFLE, B_TRANSITION_BIG_POKEBALL}, [TRANSITION_TYPE_FLASH] = {B_TRANSITION_BLUR, B_TRANSITION_GRID_SQUARES}, [TRANSITION_TYPE_WATER] = {B_TRANSITION_SWIRL, B_TRANSITION_RIPPLE}, @@ -555,7 +555,7 @@ void StartGroudonKyogreBattle(void) gBattleTypeFlags = BATTLE_TYPE_LEGENDARY | BATTLE_TYPE_KYOGRE_GROUDON; if (gGameVersion == VERSION_RUBY) - CreateBattleStartTask(B_TRANSITION_SHARDS, MUS_VS_KYOGRE_GROUDON); // GROUDON + CreateBattleStartTask(B_TRANSITION_ANGLED_WIPES, MUS_VS_KYOGRE_GROUDON); // GROUDON else CreateBattleStartTask(B_TRANSITION_RIPPLE, MUS_VS_KYOGRE_GROUDON); // KYOGRE diff --git a/src/battle_transition.c b/src/battle_transition.c index 72edf92d5c..88194db272 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -29,10 +29,27 @@ #define B_TRANS_DMA_FLAGS (1 | ((DMA_SRC_INC | DMA_DEST_FIXED | DMA_REPEAT | DMA_16BIT | DMA_START_HBLANK | DMA_ENABLE) << 16)) -#define SET_TILEMAP_TILE(ptr, posY, posX, toStore) \ -{ \ - u32 index = (posY) * 32 + posX; \ - ptr[index] = toStore; \ +// Used by each transition task to determine which of its functions to call +#define tState data[0] + +// Below are data defines for InitBlackWipe and UpdateBlackWipe, for the TransitionData data array. +// These will be re-used by any transitions that use these functions. +#define tWipeStartX data[0] +#define tWipeStartY data[1] +#define tWipeCurrX data[2] +#define tWipeCurrY data[3] +#define tWipeEndX data[4] +#define tWipeEndY data[5] +#define tWipeXMove data[6] +#define tWipeYMove data[7] +#define tWipeXDist data[8] +#define tWipeYDist data[9] +#define tWipeTemp data[10] + +#define SET_TILE(ptr, posY, posX, tile) \ +{ \ + u32 index = (posY) * 32 + posX; \ + ptr[index] = tile | (0xF0 << 8); \ } struct TransitionData @@ -53,17 +70,17 @@ struct TransitionData s16 BG0HOFS_Upper; s16 BG0VOFS; // used but not set s16 unused3; - s16 field_20; + s16 counter; s16 unused4; s16 data[11]; }; -struct StructRectangularSpiral +struct RectangularSpiralLine { - u8 field_0; - s16 field_2; - u8 field_4; - s16 field_6; + u8 state; + s16 position; + u8 moveIdx; + s16 skipPosition; u8 field_8; }; @@ -83,13 +100,13 @@ static void Task_Swirl(u8 taskId); static void Task_Shuffle(u8 taskId); static void Task_BigPokeball(u8 taskId); static void Task_PokeballsTrail(u8 taskId); -static void Task_Clockwise_BlackFade(u8 taskId); +static void Task_ClockwiseWipe(u8 taskId); static void Task_Ripple(u8 taskId); static void Task_Wave(u8 taskId); static void Task_Slice(u8 taskId); -static void Task_WhiteFade(u8 taskId); +static void Task_WhiteBarsFade(u8 taskId); static void Task_GridSquares(u8 taskId); -static void Task_Shards(u8 taskId); +static void Task_AngledWipes(u8 taskId); static void Task_Sidney(u8 taskId); static void Task_Phoebe(u8 taskId); static void Task_Glacia(u8 taskId); @@ -104,8 +121,8 @@ static void Task_Kyogre(u8 taskId); static void Task_Groudon(u8 taskId); static void Task_Rayquaza(u8 taskId); static void Task_ShredSplit(u8 taskId); -static void Task_Blackhole1(u8 taskId); -static void Task_Blackhole2(u8 taskId); +static void Task_Blackhole(u8 taskId); +static void Task_BlackholePulsate(u8 taskId); static void Task_RectangularSpiral(u8 taskId); static void Task_FrontierLogoWiggle(u8 taskId); static void Task_FrontierLogoWave(u8 taskId); @@ -118,8 +135,8 @@ static void HBlankCB_Swirl(void); static void VBlankCB_Shuffle(void); static void HBlankCB_Shuffle(void); static void VBlankCB_PatternWeave(void); -static void VBlankCB1_BigPokeball(void); -static void VBlankCB_Clockwise_BlackFade(void); +static void VBlankCB_CircularMask(void); +static void VBlankCB_ClockwiseWipe(void); static void VBlankCB_Ripple(void); static void HBlankCB_Ripple(void); static void VBlankCB_FrontierLogoWave(void); @@ -127,10 +144,10 @@ static void HBlankCB_FrontierLogoWave(void); static void VBlankCB_Wave(void); static void VBlankCB_Slice(void); static void HBlankCB_Slice(void); -static void VBlankCB0_WhiteFade(void); -static void VBlankCB1_WhiteFade(void); -static void HBlankCB_WhiteFade(void); -static void VBlankCB_Shards(void); +static void VBlankCB_WhiteBarsFade(void); +static void VBlankCB_WhiteBarsFade_Blend(void); +static void HBlankCB_WhiteBarsFade(void); +static void VBlankCB_AngledWipes(void); static void VBlankCB_Rayquaza(void); static bool8 Blur_Init(struct Task *task); static bool8 Blur_Main(struct Task *task); @@ -151,60 +168,60 @@ static bool8 Regirock_SetGfx(struct Task *task); static bool8 WeatherTrio_BgFadeBlack(struct Task *task); static bool8 WeatherTrio_WaitFade(struct Task *task); static bool8 Kyogre_Init(struct Task *task); -static bool8 Kyogre_PalettePulsate(struct Task *task); +static bool8 Kyogre_PaletteFlash(struct Task *task); static bool8 Kyogre_PaletteBrighten(struct Task *task); static bool8 Groudon_Init(struct Task *task); -static bool8 Groudon_PalettePulsate(struct Task *task); +static bool8 Groudon_PaletteFlash(struct Task *task); static bool8 Groudon_PaletteBrighten(struct Task *task); static bool8 WeatherDuo_FadeOut(struct Task *task); static bool8 WeatherDuo_End(struct Task *task); static bool8 BigPokeball_Init(struct Task *task); static bool8 BigPokeball_SetGfx(struct Task *task); -static bool8 PatternWeave_1(struct Task *task); -static bool8 PatternWeave_2(struct Task *task); -static bool8 PatternWeave_3(struct Task *task); -static bool8 PatternWeave_End(struct Task *task); +static bool8 PatternWeave_Blend1(struct Task *task); +static bool8 PatternWeave_Blend2(struct Task *task); +static bool8 PatternWeave_FinishAppear(struct Task *task); +static bool8 PatternWeave_CircularMask(struct Task *task); static bool8 PokeballsTrail_Init(struct Task *task); static bool8 PokeballsTrail_Main(struct Task *task); static bool8 PokeballsTrail_End(struct Task *task); -static bool8 Clockwise_BlackFade_Init(struct Task *task); -static bool8 Clockwise_BlackFade_Func2(struct Task *task); -static bool8 Clockwise_BlackFade_Func3(struct Task *task); -static bool8 Clockwise_BlackFade_Func4(struct Task *task); -static bool8 Clockwise_BlackFade_Func5(struct Task *task); -static bool8 Clockwise_BlackFade_Func6(struct Task *task); -static bool8 Clockwise_BlackFade_End(struct Task *task); +static bool8 ClockwiseWipe_Init(struct Task *task); +static bool8 ClockwiseWipe_TopRight(struct Task *task); +static bool8 ClockwiseWipe_Right(struct Task *task); +static bool8 ClockwiseWipe_Bottom(struct Task *task); +static bool8 ClockwiseWipe_Left(struct Task *task); +static bool8 ClockwiseWipe_TopLeft(struct Task *task); +static bool8 ClockwiseWipe_End(struct Task *task); static bool8 Ripple_Init(struct Task *task); -static bool8 Ripple_Func2(struct Task *task); +static bool8 Ripple_Main(struct Task *task); static bool8 Wave_Init(struct Task *task); -static bool8 Wave_Func2(struct Task *task); +static bool8 Wave_Main(struct Task *task); static bool8 Wave_End(struct Task *task); static bool8 Slice_Init(struct Task *task); -static bool8 Slice_Func2(struct Task *task); +static bool8 Slice_Main(struct Task *task); static bool8 Slice_End(struct Task *task); -static bool8 WhiteFade_Init(struct Task *task); -static bool8 WhiteFade_Func2(struct Task *task); -static bool8 WhiteFade_Func3(struct Task *task); -static bool8 WhiteFade_Func4(struct Task *task); -static bool8 WhiteFade_End(struct Task *task); +static bool8 WhiteBarsFade_Init(struct Task *task); +static bool8 WhiteBarsFade_StartBars(struct Task *task); +static bool8 WhiteBarsFade_WaitBars(struct Task *task); +static bool8 WhiteBarsFade_BlendToBlack(struct Task *task); +static bool8 WhiteBarsFade_End(struct Task *task); static bool8 GridSquares_Init(struct Task *task); -static bool8 GridSquares_Func2(struct Task *task); +static bool8 GridSquares_Main(struct Task *task); static bool8 GridSquares_End(struct Task *task); -static bool8 Shards_Init(struct Task *task); -static bool8 Shards_Func2(struct Task *task); -static bool8 Shards_Func3(struct Task *task); -static bool8 Shards_Func4(struct Task *task); -static bool8 Shards_Func5(struct Task *task); +static bool8 AngledWipes_Init(struct Task *task); +static bool8 AngledWipes_SetWipeData(struct Task *task); +static bool8 AngledWipes_DoWipe(struct Task *task); +static bool8 AngledWipes_TryEnd(struct Task *task); +static bool8 AngledWipes_StartNext(struct Task *task); static bool8 ShredSplit_Init(struct Task *task); -static bool8 ShredSplit_Func2(struct Task *task); -static bool8 ShredSplit_Func3(struct Task *task); +static bool8 ShredSplit_Main(struct Task *task); +static bool8 ShredSplit_BrokenCheck(struct Task *task); static bool8 ShredSplit_End(struct Task *task); static bool8 Blackhole_Init(struct Task *task); -static bool8 Blackhole1_Func2(struct Task *task); -static bool8 Blackhole1_Func3(struct Task *task); -static bool8 Blackhole2_Func2(struct Task *task); +static bool8 Blackhole_Vibrate(struct Task *task); +static bool8 Blackhole_GrowEnd(struct Task *task); +static bool8 BlackholePulsate_Main(struct Task *task); static bool8 RectangularSpiral_Init(struct Task *task); -static bool8 RectangularSpiral_Func2(struct Task *task); +static bool8 RectangularSpiral_Main(struct Task *task); static bool8 RectangularSpiral_End(struct Task *task); static bool8 FrontierLogoWiggle_Init(struct Task *task); static bool8 FrontierLogoWiggle_SetGfx(struct Task *task); @@ -212,16 +229,16 @@ static bool8 FrontierLogoWave_Init(struct Task *task); static bool8 FrontierLogoWave_SetGfx(struct Task *task); static bool8 FrontierLogoWave_Func3(struct Task *task); static bool8 FrontierLogoWave_Func4(struct Task *task); -static bool8 Rayquaza_Func3(struct Task *task); -static bool8 Rayquaza_Func4(struct Task *task); -static bool8 Rayquaza_Func5(struct Task *task); -static bool8 Rayquaza_Func6(struct Task *task); -static bool8 Rayquaza_Func7(struct Task *task); -static bool8 Rayquaza_Func8(struct Task *task); -static bool8 Rayquaza_Func9(struct Task *task); +static bool8 Rayquaza_Init(struct Task *task); +static bool8 Rayquaza_SetGfx(struct Task *task); +static bool8 Rayquaza_PaletteFlash(struct Task *task); +static bool8 Rayquaza_FadeToBlack(struct Task *task); +static bool8 Rayquaza_WaitFade(struct Task *task); +static bool8 Rayquaza_SetBlack(struct Task *task); +static bool8 Rayquaza_TriRing(struct Task *task); static bool8 FrontierSquares_Init(struct Task *task); -static bool8 FrontierSquares_Func2(struct Task *task); -static bool8 FrontierSquares_Func3(struct Task *task); +static bool8 FrontierSquares_Draw(struct Task *task); +static bool8 FrontierSquares_Shrink(struct Task *task); static bool8 FrontierSquares_End(struct Task *task); static bool8 FrontierSquaresSpiral_Init(struct Task *task); static bool8 FrontierSquaresSpiral_Func2(struct Task *task); @@ -244,37 +261,37 @@ static bool8 Mugshot_FadeToBlack(struct Task *task); static bool8 Mugshot_End(struct Task *task); static void DoMugshotTransition(u8 taskId); static void Mugshots_CreateTrainerPics(struct Task *task); -static void VBlankCB0_Mugshots(void); -static void VBlankCB1_Mugshots(void); +static void VBlankCB_Mugshots(void); +static void VBlankCB_MugshotsFadeOut(void); static void HBlankCB_Mugshots(void); static void InitTransitionData(void); static void FadeScreenBlack(void); static void CreateIntroTask(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4); -static void sub_814A014(u16 *a0, s16 a1, s16 a2, s16 a3); +static void SetCircularMask(u16 *a0, s16 a1, s16 a2, s16 a3); static void SetSinWave(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, s16 amplitude, s16 arrSize); static void GetBg0TilemapDst(u16 **tileset); -static void sub_814A1AC(s16 *a0, s16 a1, s16 a2, s16 a3, s16 a4, s16 a5, s16 a6); -static bool8 sub_814A228(s16 *a0, bool8 a1, bool8 a2); -static void SetTrainerPicSlideTable(s16 spriteId, s16 arrId); +static void InitBlackWipe(s16 *a0, s16 a1, s16 a2, s16 a3, s16 a4, s16 a5, s16 a6); +static bool8 UpdateBlackWipe(s16 *a0, bool8 a1, bool8 a2); +static void SetTrainerPicSlideDirection(s16 spriteId, s16 arrId); static void IncrementTrainerPicState(s16 spriteId); static s16 IsTrainerPicSlideDone(s16 spriteId); -static bool8 Transition_Intro_1(struct Task *task); -static bool8 Transition_Intro_2(struct Task *task); +static bool8 TransitionIntro_FadeToGray(struct Task *task); +static bool8 TransitionIntro_FadeFromGray(struct Task *task); static bool8 IsIntroTaskDone(void); -static bool16 sub_8149048(const s16 * const *arg0, struct StructRectangularSpiral *arg1); -static void SpriteCB_FldEffPokeball(struct Sprite *sprite); +static bool16 UpdateRectangularSpiralLine(const s16 * const *arg0, struct RectangularSpiralLine *arg1); +static void SpriteCB_FldEffPokeballTrail(struct Sprite *sprite); static void SpriteCB_MugshotTrainerPic(struct Sprite *sprite); -static void sub_8149864(struct Sprite *sprite); -static bool8 MugshotTrainerPic_Nothing(struct Sprite *sprite); -static bool8 MugshotTrainerPic_SetSlideOffsets(struct Sprite *sprite); -static bool8 MugshotTrainerPic_Slide1(struct Sprite *sprite); -static bool8 MugshotTrainerPic_Slide2(struct Sprite *sprite); -static bool8 MugshotTrainerPic_Slide3(struct Sprite *sprite); +static void SpriteCB_WhiteBarFade(struct Sprite *sprite); +static bool8 MugshotTrainerPic_Pause(struct Sprite *sprite); +static bool8 MugshotTrainerPic_Init(struct Sprite *sprite); +static bool8 MugshotTrainerPic_Slide(struct Sprite *sprite); +static bool8 MugshotTrainerPic_SlideSlow(struct Sprite *sprite); +static bool8 MugshotTrainerPic_SlideOffscreen(struct Sprite *sprite); -static s16 sUnusedRectangularSpiralVar; +static s16 sDebug_RectangularSpiralData; static u8 sTestingTransitionId; static u8 sTestingTransitionState; -static struct StructRectangularSpiral sRectangularSpiralTransition[4]; +static struct RectangularSpiralLine sRectangularSpiralLines[4]; EWRAM_DATA static struct TransitionData *sTransitionData = NULL; @@ -297,7 +314,7 @@ static const u16 sRegirock_Palette[] = INCBIN_U16("graphics/battle_transitions/r static const u32 sRegice_Tilemap[] = INCBIN_U32("graphics/battle_transitions/regice.bin"); static const u32 sRegisteel_Tilemap[] = INCBIN_U32("graphics/battle_transitions/registeel.bin"); static const u32 sRegirock_Tilemap[] = INCBIN_U32("graphics/battle_transitions/regirock.bin"); -static const u16 gUnknown_085BDB14[] = INCBIN_U16("graphics/battle_transitions/85BDB14.gbapal"); +static const u16 sUnused_Palette[] = INCBIN_U16("graphics/battle_transitions/unused.gbapal"); static const u32 sKyogre_Tileset[] = INCBIN_U32("graphics/battle_transitions/kyogre.4bpp.lz"); static const u32 sKyogre_Tilemap[] = INCBIN_U32("graphics/battle_transitions/kyogre.bin.lz"); static const u32 sGroudon_Tileset[] = INCBIN_U32("graphics/battle_transitions/groudon.4bpp.lz"); @@ -334,13 +351,13 @@ static const TaskFunc sTasks_Main[B_TRANSITION_COUNT] = [B_TRANSITION_SHUFFLE] = Task_Shuffle, [B_TRANSITION_BIG_POKEBALL] = Task_BigPokeball, [B_TRANSITION_POKEBALLS_TRAIL] = Task_PokeballsTrail, - [B_TRANSITION_CLOCKWISE_BLACKFADE] = Task_Clockwise_BlackFade, + [B_TRANSITION_CLOCKWISE_WIPE] = Task_ClockwiseWipe, [B_TRANSITION_RIPPLE] = Task_Ripple, [B_TRANSITION_WAVE] = Task_Wave, [B_TRANSITION_SLICE] = Task_Slice, - [B_TRANSITION_WHITEFADE] = Task_WhiteFade, + [B_TRANSITION_WHITE_BARS_FADE] = Task_WhiteBarsFade, [B_TRANSITION_GRID_SQUARES] = Task_GridSquares, - [B_TRANSITION_SHARDS] = Task_Shards, + [B_TRANSITION_ANGLED_WIPES] = Task_AngledWipes, [B_TRANSITION_SIDNEY] = Task_Sidney, [B_TRANSITION_PHOEBE] = Task_Phoebe, [B_TRANSITION_GLACIA] = Task_Glacia, @@ -355,8 +372,8 @@ static const TaskFunc sTasks_Main[B_TRANSITION_COUNT] = [B_TRANSITION_GROUDON] = Task_Groudon, [B_TRANSITION_RAYQUAZA] = Task_Rayquaza, [B_TRANSITION_SHRED_SPLIT] = Task_ShredSplit, - [B_TRANSITION_BLACKHOLE1] = Task_Blackhole1, - [B_TRANSITION_BLACKHOLE2] = Task_Blackhole2, + [B_TRANSITION_BLACKHOLE] = Task_Blackhole, + [B_TRANSITION_BLACKHOLE_PULSATE] = Task_BlackholePulsate, [B_TRANSITION_RECTANGULAR_SPIRAL] = Task_RectangularSpiral, [B_TRANSITION_FRONTIER_LOGO_WIGGLE] = Task_FrontierLogoWiggle, [B_TRANSITION_FRONTIER_LOGO_WAVE] = Task_FrontierLogoWave, @@ -404,62 +421,62 @@ static const TransitionStateFunc sAqua_Funcs[] = { Aqua_Init, Aqua_SetGfx, - PatternWeave_1, - PatternWeave_2, - PatternWeave_3, + PatternWeave_Blend1, + PatternWeave_Blend2, + PatternWeave_FinishAppear, FramesCountdown, - PatternWeave_End + PatternWeave_CircularMask }; static const TransitionStateFunc sMagma_Funcs[] = { Magma_Init, Magma_SetGfx, - PatternWeave_1, - PatternWeave_2, - PatternWeave_3, + PatternWeave_Blend1, + PatternWeave_Blend2, + PatternWeave_FinishAppear, FramesCountdown, - PatternWeave_End + PatternWeave_CircularMask }; static const TransitionStateFunc sBigPokeball_Funcs[] = { BigPokeball_Init, BigPokeball_SetGfx, - PatternWeave_1, - PatternWeave_2, - PatternWeave_3, - PatternWeave_End + PatternWeave_Blend1, + PatternWeave_Blend2, + PatternWeave_FinishAppear, + PatternWeave_CircularMask }; static const TransitionStateFunc sRegice_Funcs[] = { Regi_Init, Regice_SetGfx, - PatternWeave_1, - PatternWeave_2, - PatternWeave_3, - PatternWeave_End + PatternWeave_Blend1, + PatternWeave_Blend2, + PatternWeave_FinishAppear, + PatternWeave_CircularMask }; static const TransitionStateFunc sRegisteel_Funcs[] = { Regi_Init, Registeel_SetGfx, - PatternWeave_1, - PatternWeave_2, - PatternWeave_3, - PatternWeave_End + PatternWeave_Blend1, + PatternWeave_Blend2, + PatternWeave_FinishAppear, + PatternWeave_CircularMask }; static const TransitionStateFunc sRegirock_Funcs[] = { Regi_Init, Regirock_SetGfx, - PatternWeave_1, - PatternWeave_2, - PatternWeave_3, - PatternWeave_End + PatternWeave_Blend1, + PatternWeave_Blend2, + PatternWeave_FinishAppear, + PatternWeave_CircularMask }; static const TransitionStateFunc sKyogre_Funcs[] = @@ -467,7 +484,7 @@ static const TransitionStateFunc sKyogre_Funcs[] = WeatherTrio_BgFadeBlack, WeatherTrio_WaitFade, Kyogre_Init, - Kyogre_PalettePulsate, + Kyogre_PaletteFlash, Kyogre_PaletteBrighten, FramesCountdown, WeatherDuo_FadeOut, @@ -481,31 +498,32 @@ static const TransitionStateFunc sPokeballsTrail_Funcs[] = PokeballsTrail_End }; -static const s16 sUnknown_085C8B88[2] = {-16, 256}; -static const s16 sUnknown_085C8B8C[5] = {0, 32, 64, 18, 48}; -static const s16 sUnknown_085C8B96[2] = {8, -8}; +#define NUM_POKEBALL_TRAILS 5 +static const s16 sPokeballsTrail_StartXCoords[2] = { -16, DISPLAY_WIDTH + 16 }; +static const s16 sPokeballsTrail_Delays[NUM_POKEBALL_TRAILS] = {0, 32, 64, 18, 48}; +static const s16 sPokeballsTrail_Speeds[2] = {8, -8}; -static const TransitionStateFunc sClockwise_BlackFade_Funcs[] = +static const TransitionStateFunc sClockwiseWipe_Funcs[] = { - Clockwise_BlackFade_Init, - Clockwise_BlackFade_Func2, - Clockwise_BlackFade_Func3, - Clockwise_BlackFade_Func4, - Clockwise_BlackFade_Func5, - Clockwise_BlackFade_Func6, - Clockwise_BlackFade_End + ClockwiseWipe_Init, + ClockwiseWipe_TopRight, + ClockwiseWipe_Right, + ClockwiseWipe_Bottom, + ClockwiseWipe_Left, + ClockwiseWipe_TopLeft, + ClockwiseWipe_End }; static const TransitionStateFunc sRipple_Funcs[] = { Ripple_Init, - Ripple_Func2 + Ripple_Main }; static const TransitionStateFunc sWave_Funcs[] = { Wave_Init, - Wave_Func2, + Wave_Main, Wave_End }; @@ -550,76 +568,87 @@ static const s16 sMugshotsOpponentCoords[MUGSHOTS_COUNT][2] = static const TransitionSpriteCallback sMugshotTrainerPicFuncs[] = { - MugshotTrainerPic_Nothing, - MugshotTrainerPic_SetSlideOffsets, - MugshotTrainerPic_Slide1, - MugshotTrainerPic_Slide2, - MugshotTrainerPic_Nothing, - MugshotTrainerPic_Slide3, - MugshotTrainerPic_Nothing + MugshotTrainerPic_Pause, + MugshotTrainerPic_Init, + MugshotTrainerPic_Slide, + MugshotTrainerPic_SlideSlow, + MugshotTrainerPic_Pause, + MugshotTrainerPic_SlideOffscreen, + MugshotTrainerPic_Pause }; -static const s16 sTrainerPicSlideOffsets1[2] = {12, -12}; -static const s16 sTrainerPicSlideOffsets2[2] = {-1, 1}; +// One element per slide direction. +// Sign of acceleration is opposite speed, so slide decelerates. +static const s16 sTrainerPicSlideSpeeds[2] = {12, -12}; +static const s16 sTrainerPicSlideAccels[2] = {-1, 1}; static const TransitionStateFunc sSlice_Funcs[] = { Slice_Init, - Slice_Func2, + Slice_Main, Slice_End }; static const TransitionStateFunc sShredSplit_Funcs[] = { ShredSplit_Init, - ShredSplit_Func2, - ShredSplit_Func3, + ShredSplit_Main, + ShredSplit_BrokenCheck, ShredSplit_End }; -static const u8 gUnknown_085C8C64[] = {39, 119}; -static const s16 gUnknown_085C8C66[] = {1, -1}; +static const u8 sShredSplit_SectionYCoords[] = {39, DISPLAY_HEIGHT - 41}; +static const s16 sShredSplit_SectionMoveDirs[] = {1, -1}; -static const TransitionStateFunc sBlackhole1_Funcs[] = +static const TransitionStateFunc sBlackhole_Funcs[] = { Blackhole_Init, - Blackhole1_Func2, - Blackhole1_Func3 + Blackhole_Vibrate, + Blackhole_GrowEnd }; -static const TransitionStateFunc sBlackhole2_Funcs[] = +static const TransitionStateFunc sBlackholePulsate_Funcs[] = { Blackhole_Init, - Blackhole2_Func2 + BlackholePulsate_Main }; -static const s16 gUnknown_085C8C80[] = {-6, 4}; +// Blackhole rapidly alternates adding these values to the radius, +// resulting in a vibrating shrink/grow effect. +static const s16 sBlackhole_Vibrations[] = {-6, 4}; static const TransitionStateFunc sRectangularSpiral_Funcs[] = { RectangularSpiral_Init, - RectangularSpiral_Func2, + RectangularSpiral_Main, RectangularSpiral_End }; -static const s16 gUnknown_085C8C90[] = {1, 27, 275, -1}; -static const s16 gUnknown_085C8C98[] = {2, 486, -1}; -static const s16 gUnknown_085C8C9E[] = {3, 262, -1}; -static const s16 gUnknown_085C8CA4[] = {4, 507, -2}; -static const s16 gUnknown_085C8CAA[] = {1, 213, -1}; -static const s16 gUnknown_085C8CB0[] = {2, 548, -2}; -static const s16 gUnknown_085C8CB6[] = {3, 196, -1}; -static const s16 gUnknown_085C8CBC[] = {4, 573, 309, -1}; -static const s16 gUnknown_085C8CC4[] = {1, 474, -1}; -static const s16 gUnknown_085C8CCA[] = {2, 295, 32, -1}; -static const s16 gUnknown_085C8CD2[] = {3, 58, -1}; -static const s16 gUnknown_085C8CD8[] = {4, 455, -1}; -static const s16 gUnknown_085C8CDE[] = {1, 540, -1}; -static const s16 gUnknown_085C8CE4[] = {2, 229, -1}; -static const s16 gUnknown_085C8CEA[] = {3, 244, 28, -1}; -static const s16 gUnknown_085C8CF2[] = {4, 517, -1}; +#define SPIRAL_END (-1) +#define SPIRAL_SKIP (-2) -static const s16 *const gUnknown_085C8CF8[] = +static const s16 gUnknown_085C8C90[] = {1, 27, 275, SPIRAL_END}; +static const s16 gUnknown_085C8C98[] = {2, 486, SPIRAL_END}; +static const s16 gUnknown_085C8C9E[] = {3, 262, SPIRAL_END}; +static const s16 gUnknown_085C8CA4[] = {4, 507, SPIRAL_SKIP}; + +static const s16 gUnknown_085C8CAA[] = {1, 213, SPIRAL_END}; +static const s16 gUnknown_085C8CB0[] = {2, 548, SPIRAL_SKIP}; +static const s16 gUnknown_085C8CB6[] = {3, 196, SPIRAL_END}; +static const s16 gUnknown_085C8CBC[] = {4, 573, 309, SPIRAL_END}; + +static const s16 gUnknown_085C8CC4[] = {1, 474, SPIRAL_END}; +static const s16 gUnknown_085C8CCA[] = {2, 295, 32, SPIRAL_END}; +static const s16 gUnknown_085C8CD2[] = {3, 58, SPIRAL_END}; +static const s16 gUnknown_085C8CD8[] = {4, 455, SPIRAL_END}; + +static const s16 gUnknown_085C8CDE[] = {1, 540, SPIRAL_END}; +static const s16 gUnknown_085C8CE4[] = {2, 229, SPIRAL_END}; +static const s16 gUnknown_085C8CEA[] = {3, 244, 28, SPIRAL_END}; +static const s16 gUnknown_085C8CF2[] = {4, 517, SPIRAL_END}; + +// Move data for spiral lines starting in the top left / bottom right +static const s16 *const sRectangularSpiral_MoveDataTable_MajorDiagonal[] = { gUnknown_085C8C90, gUnknown_085C8CA4, @@ -631,7 +660,8 @@ static const s16 *const gUnknown_085C8CF8[] = gUnknown_085C8CDE }; -static const s16 *const gUnknown_085C8D18[] = +// Move data for spiral lines starting in the top right / bottom left +static const s16 *const sRectangularSpiral_MoveDataTable_MinorDiagonal[] = { gUnknown_085C8CBC, gUnknown_085C8CB0, @@ -643,10 +673,10 @@ static const s16 *const gUnknown_085C8D18[] = gUnknown_085C8CD2 }; -static const s16 *const *const gUnknown_085C8D38[] = +static const s16 *const *const sRectangularSpiral_MoveDataTables[] = { - gUnknown_085C8CF8, - gUnknown_085C8D18 + sRectangularSpiral_MoveDataTable_MajorDiagonal, + sRectangularSpiral_MoveDataTable_MinorDiagonal }; static const TransitionStateFunc sGroudon_Funcs[] = @@ -654,7 +684,7 @@ static const TransitionStateFunc sGroudon_Funcs[] = WeatherTrio_BgFadeBlack, WeatherTrio_WaitFade, Groudon_Init, - Groudon_PalettePulsate, + Groudon_PaletteFlash, Groudon_PaletteBrighten, FramesCountdown, WeatherDuo_FadeOut, @@ -665,61 +695,65 @@ static const TransitionStateFunc sRayquaza_Funcs[] = { WeatherTrio_BgFadeBlack, WeatherTrio_WaitFade, - Rayquaza_Func3, - Rayquaza_Func4, - Rayquaza_Func5, - Rayquaza_Func6, - Rayquaza_Func7, - Rayquaza_Func8, - Rayquaza_Func9, - Blackhole1_Func2, - Blackhole1_Func3 + Rayquaza_Init, + Rayquaza_SetGfx, + Rayquaza_PaletteFlash, + Rayquaza_FadeToBlack, + Rayquaza_WaitFade, + Rayquaza_SetBlack, + Rayquaza_TriRing, + Blackhole_Vibrate, + Blackhole_GrowEnd }; -static const TransitionStateFunc sWhiteFade_Funcs[] = +static const TransitionStateFunc sWhiteBarsFade_Funcs[] = { - WhiteFade_Init, - WhiteFade_Func2, - WhiteFade_Func3, - WhiteFade_Func4, - WhiteFade_End + WhiteBarsFade_Init, + WhiteBarsFade_StartBars, + WhiteBarsFade_WaitBars, + WhiteBarsFade_BlendToBlack, + WhiteBarsFade_End }; -static const s16 sUnknown_085C8DA0[] = {0, 20, 15, 40, 10, 25, 35, 5}; +#define NUM_WHITE_BARS 8 +static const s16 sWhiteBarsFade_StartDelays[NUM_WHITE_BARS] = {0, 20, 15, 40, 10, 25, 35, 5}; static const TransitionStateFunc sGridSquares_Funcs[] = { GridSquares_Init, - GridSquares_Func2, + GridSquares_Main, GridSquares_End }; -static const TransitionStateFunc sShards_Funcs[] = +static const TransitionStateFunc sAngledWipes_Funcs[] = { - Shards_Init, - Shards_Func2, - Shards_Func3, - Shards_Func4, - Shards_Func5 + AngledWipes_Init, + AngledWipes_SetWipeData, + AngledWipes_DoWipe, + AngledWipes_TryEnd, + AngledWipes_StartNext }; -static const s16 sUnknown_085C8DD0[][5] = +#define NUM_ANGLED_WIPES 7 + +static const s16 sAngledWipes_MoveData[NUM_ANGLED_WIPES][5] = { - {56, 0, 0, 160, 0}, - {104, 160, 240, 88, 1}, - {240, 72, 56, 0, 1}, - {0, 32, 144, 160, 0}, - {144, 160, 184, 0, 1}, - {56, 0, 168, 160, 0}, - {168, 160, 48, 0, 1}, +// startX startY endX endY yDirection + {56, 0, 0, DISPLAY_HEIGHT, 0}, + {104, DISPLAY_HEIGHT, DISPLAY_WIDTH, 88, 1}, + {DISPLAY_WIDTH, 72, 56, 0, 1}, + {0, 32, 144, DISPLAY_HEIGHT, 0}, + {144, DISPLAY_HEIGHT, 184, 0, 1}, + {56, 0, 168, DISPLAY_HEIGHT, 0}, + {168, DISPLAY_HEIGHT, 48, 0, 1}, }; -static const s16 sUnknown_085C8E16[] = {8, 4, 2, 1, 1, 1, 0}; +static const s16 sAngledWipes_EndDelays[NUM_ANGLED_WIPES] = {8, 4, 2, 1, 1, 1, 0}; static const TransitionStateFunc sTransitionIntroFuncs[] = { - Transition_Intro_1, - Transition_Intro_2 + TransitionIntro_FadeToGray, + TransitionIntro_FadeFromGray }; static const struct SpriteFrameImage sSpriteImage_Pokeball[] = @@ -759,12 +793,12 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_Pokeball[] = static const struct SpriteTemplate sSpriteTemplate_Pokeball = { .tileTag = TAG_NONE, - .paletteTag = FLDEFF_PAL_TAG_POKEBALL, + .paletteTag = FLDEFF_PAL_TAG_POKEBALL_TRAIL, .oam = &gObjectEventBaseOam_32x32, .anims = sSpriteAnimTable_Pokeball, .images = sSpriteImage_Pokeball, .affineAnims = sSpriteAffineAnimTable_Pokeball, - .callback = SpriteCB_FldEffPokeball + .callback = SpriteCB_FldEffPokeballTrail }; static const struct OamData sOam_UnusedBrendanLass = @@ -829,7 +863,7 @@ static const struct SpriteTemplate sSpriteTemplate_UnusedLass = static const u16 sFieldEffectPal_Pokeball[] = INCBIN_U16("graphics/field_effects/palettes/pokeball.gbapal"); -const struct SpritePalette gSpritePalette_Pokeball = {sFieldEffectPal_Pokeball, FLDEFF_PAL_TAG_POKEBALL}; +const struct SpritePalette gSpritePalette_Pokeball = {sFieldEffectPal_Pokeball, FLDEFF_PAL_TAG_POKEBALL_TRAIL}; static const u16 sMugshotPal_Sidney[] = INCBIN_U16("graphics/battle_transitions/sidney_bg.gbapal"); static const u16 sMugshotPal_Phoebe[] = INCBIN_U16("graphics/battle_transitions/phoebe_bg.gbapal"); @@ -864,10 +898,10 @@ static const TransitionStateFunc sFrontierLogoWiggle_Funcs[] = { FrontierLogoWiggle_Init, FrontierLogoWiggle_SetGfx, - PatternWeave_1, - PatternWeave_2, - PatternWeave_3, - PatternWeave_End + PatternWeave_Blend1, + PatternWeave_Blend2, + PatternWeave_FinishAppear, + PatternWeave_CircularMask }; static const TransitionStateFunc sFrontierLogoWave_Funcs[] = @@ -881,8 +915,8 @@ static const TransitionStateFunc sFrontierLogoWave_Funcs[] = static const TransitionStateFunc sFrontierSquares_Funcs[] = { FrontierSquares_Init, - FrontierSquares_Func2, - FrontierSquares_Func3, + FrontierSquares_Draw, + FrontierSquares_Shrink, FrontierSquares_End }; @@ -968,9 +1002,6 @@ void BattleTransition_Start(u8 transitionId) LaunchBattleTransitionTask(transitionId); } -// in all tasks data[0] is reserved for the state -#define tState data[0] - // main task that launches sub-tasks for phase1 and phase2 #define tTransitionId data[1] #define tTransitionDone data[15] @@ -1063,11 +1094,6 @@ static void Task_Intro(u8 taskId) } } -#define tFuncState data[7] -#define tOpponentSpriteId data[13] -#define tPlayerSpriteId data[14] -#define tMugshotId data[15] - //-------------------- // B_TRANSITION_BLUR //-------------------- @@ -1270,10 +1296,10 @@ static void HBlankCB_Shuffle(void) #define tBlendTarget2 data[2] #define tBlendDelay data[3] -// Data 1-3 change purpose for PatternWeave_End -#define tEndAmplitude data[1] -#define tEndAmplitudeDelta data[2] -#define tVBlankSet data[3] +// Data 1-3 change purpose for PatternWeave_CircularMask +#define tRadius data[1] +#define tRadiusDelta data[2] +#define tVBlankSet data[3] #define tSinIndex data[4] #define tAmplitude data[5] @@ -1407,7 +1433,7 @@ static bool8 BigPokeball_SetGfx(struct Task *task) for (i = 0; i < 20; i++) { for (j = 0; j < 30; j++, bigPokeballMap++) - SET_TILEMAP_TILE(tilemap, i, j, *bigPokeballMap | 0xF000); + SET_TILE(tilemap, i, j, *bigPokeballMap); } SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude, DISPLAY_HEIGHT); @@ -1494,13 +1520,13 @@ static bool8 Kyogre_Init(struct Task *task) return FALSE; } -static bool8 Kyogre_PalettePulsate(struct Task *task) +static bool8 Kyogre_PaletteFlash(struct Task *task) { if (task->tTimer % 3 == 0) { - u16 var = task->tTimer % 30; - var /= 3; - LoadPalette(sKyogre1_Palette + (var * 16), 0xF0, 0x20); + u16 offset = task->tTimer % 30; + offset /= 3; + LoadPalette(&sKyogre1_Palette[offset * 16], 0xF0, 0x20); } if (++task->tTimer > 58) { @@ -1515,8 +1541,8 @@ static bool8 Kyogre_PaletteBrighten(struct Task *task) { if (task->tTimer % 5 == 0) { - s16 var = task->tTimer / 5; - LoadPalette(sKyogre2_Palette + (var * 16), 0xF0, 0x20); + s16 offset = task->tTimer / 5; + LoadPalette(&sKyogre2_Palette[offset * 16], 0xF0, 0x20); } if (++task->tTimer > 68) { @@ -1551,7 +1577,7 @@ static bool8 WeatherDuo_End(struct Task *task) // The PatternWeave_ functions are used by several different transitions. // They create an effect where a pattern/image (such as the Magma emblem) is // formed by a shimmering weave effect. -static bool8 PatternWeave_1(struct Task *task) +static bool8 PatternWeave_Blend1(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; if (task->tBlendDelay == 0 || --task->tBlendDelay == 0) @@ -1571,7 +1597,7 @@ static bool8 PatternWeave_1(struct Task *task) return FALSE; } -static bool8 PatternWeave_2(struct Task *task) +static bool8 PatternWeave_Blend2(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; if (task->tBlendDelay == 0 || --task->tBlendDelay == 0) @@ -1591,7 +1617,7 @@ static bool8 PatternWeave_2(struct Task *task) return FALSE; } -static bool8 PatternWeave_3(struct Task *task) +static bool8 PatternWeave_FinishAppear(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; task->tSinIndex += 8; @@ -1602,8 +1628,8 @@ static bool8 PatternWeave_3(struct Task *task) if (task->tAmplitude <= 0) { task->tState++; - task->tEndAmplitude = 160; - task->tEndAmplitudeDelta = 256; + task->tRadius = DISPLAY_HEIGHT; + task->tRadiusDelta = 1 << 8; task->tVBlankSet = FALSE; } @@ -1632,19 +1658,20 @@ static bool8 WeatherTrio_WaitFade(struct Task *task) return FALSE; } -static bool8 PatternWeave_End(struct Task *task) +// Do a shrinking circular mask to go to a black screen after the pattern appears. +static bool8 PatternWeave_CircularMask(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; - if (task->tEndAmplitudeDelta < 1024) - task->tEndAmplitudeDelta += 128; - if (task->tEndAmplitude != 0) + if (task->tRadiusDelta < (4 << 8)) + task->tRadiusDelta += 128; // 256 is 1 unit of speed. Speed up every other frame (128 / 256) + if (task->tRadius != 0) { - task->tEndAmplitude -= task->tEndAmplitudeDelta >> 8; - if (task->tEndAmplitude < 0) - task->tEndAmplitude = 0; + task->tRadius -= task->tRadiusDelta >> 8; + if (task->tRadius < 0) + task->tRadius = 0; } - sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->tEndAmplitude); - if (task->tEndAmplitude == 0) + SetCircularMask(gScanlineEffectRegBuffers[0], DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, task->tRadius); + if (task->tRadius == 0) { SetVBlankCallback(NULL); DmaStop(0); @@ -1656,16 +1683,14 @@ static bool8 PatternWeave_End(struct Task *task) if (!task->tVBlankSet) { task->tVBlankSet++; - SetVBlankCallback(VBlankCB1_BigPokeball); + SetVBlankCallback(VBlankCB_CircularMask); } - sTransitionData->VBlank_DMA++; } - return FALSE; } -static void Transition_BigPokeball_Vblank(void) +static void VBlankCB_SetWinAndBlend(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -1680,13 +1705,13 @@ static void Transition_BigPokeball_Vblank(void) static void VBlankCB_PatternWeave(void) { - Transition_BigPokeball_Vblank(); + VBlankCB_SetWinAndBlend(); DmaSet(0, gScanlineEffectRegBuffers[1], ®_BG0HOFS, B_TRANS_DMA_FLAGS); } -static void VBlankCB1_BigPokeball(void) +static void VBlankCB_CircularMask(void) { - Transition_BigPokeball_Vblank(); + VBlankCB_SetWinAndBlend(); DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } @@ -1694,9 +1719,18 @@ static void VBlankCB1_BigPokeball(void) #undef tSinIndex #undef tBlendTarget1 #undef tBlendTarget2 -#undef tEndAmplitude +#undef tRadius +#undef tRadiusDelta #undef tVBlankSet +//------------------------------ +// B_TRANSITION_POKEBALLS_TRAIL +//------------------------------ + +#define sSide data[0] +#define sDelay data[1] +#define sPrevX data[2] + static void Task_PokeballsTrail(u8 taskId) { while (sPokeballsTrail_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -1718,20 +1752,22 @@ static bool8 PokeballsTrail_Init(struct Task *task) static bool8 PokeballsTrail_Main(struct Task *task) { s16 i; - s16 rand; - s16 xCoords[ARRAY_COUNT(sUnknown_085C8B88)]; - s16 arr1[ARRAY_COUNT(sUnknown_085C8B8C)]; + s16 side; + s16 startX[ARRAY_COUNT(sPokeballsTrail_StartXCoords)]; + s16 delays[ARRAY_COUNT(sPokeballsTrail_Delays)]; + memcpy(startX, sPokeballsTrail_StartXCoords, sizeof(sPokeballsTrail_StartXCoords)); + memcpy(delays, sPokeballsTrail_Delays, sizeof(sPokeballsTrail_Delays)); - memcpy(xCoords, sUnknown_085C8B88, sizeof(sUnknown_085C8B88)); - memcpy(arr1, sUnknown_085C8B8C, sizeof(sUnknown_085C8B8C)); - rand = Random() & 1; - for (i = 0; i <= 4; i++, rand ^= 1) + // Randomly pick which side the first ball should start on. + // The side is then flipped for each subsequent ball. + side = Random() & 1; + for (i = 0; i < NUM_POKEBALL_TRAILS; i++, side ^= 1) { - gFieldEffectArguments[0] = xCoords[rand]; // x - gFieldEffectArguments[1] = (i * 32) + 16; // y - gFieldEffectArguments[2] = rand; - gFieldEffectArguments[3] = arr1[i]; - FieldEffectStart(FLDEFF_POKEBALL); + gFieldEffectArguments[0] = startX[side]; // x + gFieldEffectArguments[1] = (i * 32) + 16; // y + gFieldEffectArguments[2] = side; + gFieldEffectArguments[3] = delays[i]; + FieldEffectStart(FLDEFF_POKEBALL_TRAIL); } task->tState++; @@ -1740,7 +1776,7 @@ static bool8 PokeballsTrail_Main(struct Task *task) static bool8 PokeballsTrail_End(struct Task *task) { - if (!FieldEffectActiveListContains(FLDEFF_POKEBALL)) + if (!FieldEffectActiveListContains(FLDEFF_POKEBALL_TRAIL)) { FadeScreenBlack(); DestroyTask(FindTaskIdByFunc(Task_PokeballsTrail)); @@ -1748,70 +1784,72 @@ static bool8 PokeballsTrail_End(struct Task *task) return FALSE; } -#define sData0 data[0] -#define sData1 data[1] -#define sData2 data[2] - -bool8 FldEff_Pokeball(void) +bool8 FldEff_PokeballTrail(void) { u8 spriteId = CreateSpriteAtEnd(&sSpriteTemplate_Pokeball, gFieldEffectArguments[0], gFieldEffectArguments[1], 0); gSprites[spriteId].oam.priority = 0; gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; - gSprites[spriteId].sData0 = gFieldEffectArguments[2]; - gSprites[spriteId].sData1 = gFieldEffectArguments[3]; - gSprites[spriteId].sData2 = -1; + gSprites[spriteId].sSide = gFieldEffectArguments[2]; + gSprites[spriteId].sDelay = gFieldEffectArguments[3]; + gSprites[spriteId].sPrevX = -1; InitSpriteAffineAnim(&gSprites[spriteId]); StartSpriteAffineAnim(&gSprites[spriteId], gFieldEffectArguments[2]); return FALSE; } -static void SpriteCB_FldEffPokeball(struct Sprite *sprite) +static void SpriteCB_FldEffPokeballTrail(struct Sprite *sprite) { - s16 arr0[ARRAY_COUNT(sUnknown_085C8B96)]; + s16 speeds[ARRAY_COUNT(sPokeballsTrail_Speeds)]; + memcpy(speeds, sPokeballsTrail_Speeds, sizeof(sPokeballsTrail_Speeds)); - memcpy(arr0, sUnknown_085C8B96, sizeof(sUnknown_085C8B96)); - if (sprite->sData1 != 0) + if (sprite->sDelay != 0) { - sprite->sData1--; + sprite->sDelay--; } else { if (sprite->x >= 0 && sprite->x <= DISPLAY_WIDTH) { + // Set Pokéball position s16 posX = sprite->x >> 3; s16 posY = sprite->y >> 3; - if (posX != sprite->sData2) + // If Pokéball moved forward clear trail behind it + if (posX != sprite->sPrevX) { u32 var; u16 *ptr; - sprite->sData2 = posX; - var = (((REG_BG0CNT >> 8) & 0x1F) << 11); - ptr = (u16 *)(VRAM + var); + sprite->sPrevX = posX; + var = ((REG_BG0CNT >> 8) & 0x1F) << 11; + ptr = (u16 *)(BG_VRAM + var); - SET_TILEMAP_TILE(ptr, posY - 2, posX, 0xF001); - SET_TILEMAP_TILE(ptr, posY - 1, posX, 0xF001); - SET_TILEMAP_TILE(ptr, posY - 0, posX, 0xF001); - SET_TILEMAP_TILE(ptr, posY + 1, posX, 0xF001); + SET_TILE(ptr, posY - 2, posX, 1); + SET_TILE(ptr, posY - 1, posX, 1); + SET_TILE(ptr, posY - 0, posX, 1); + SET_TILE(ptr, posY + 1, posX, 1); } } - sprite->x += arr0[sprite->sData0]; + sprite->x += speeds[sprite->sSide]; if (sprite->x < -15 || sprite->x > DISPLAY_WIDTH + 15) - FieldEffectStop(sprite, FLDEFF_POKEBALL); + FieldEffectStop(sprite, FLDEFF_POKEBALL_TRAIL); } } -#undef sData0 -#undef sData1 -#undef sData2 +#undef sSide +#undef sDelay +#undef sPrevX -static void Task_Clockwise_BlackFade(u8 taskId) +//----------------------------- +// B_TRANSITION_CLOCKWISE_WIPE +//----------------------------- + +static void Task_ClockwiseWipe(u8 taskId) { - while (sClockwise_BlackFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sClockwiseWipe_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Clockwise_BlackFade_Init(struct Task *task) +static bool8 ClockwiseWipe_Init(struct Task *task) { u16 i; @@ -1824,29 +1862,29 @@ static bool8 Clockwise_BlackFade_Init(struct Task *task) sTransitionData->WIN0V = DISPLAY_HEIGHT; for (i = 0; i < DISPLAY_HEIGHT; i++) - gScanlineEffectRegBuffers[1][i] = WIN_RANGE(DISPLAY_WIDTH + 3, DISPLAY_WIDTH + 4); + gScanlineEffectRegBuffers[1][i] = ((DISPLAY_WIDTH + 3) << 8) | (DISPLAY_WIDTH + 4); - SetVBlankCallback(VBlankCB_Clockwise_BlackFade); - sTransitionData->data[4] = 120; + SetVBlankCallback(VBlankCB_ClockwiseWipe); + sTransitionData->tWipeEndX = DISPLAY_WIDTH / 2; task->tState++; return TRUE; } -static bool8 Clockwise_BlackFade_Func2(struct Task *task) +static bool8 ClockwiseWipe_TopRight(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionData->data, 120, 80, sTransitionData->data[4], -1, 1, 1); + InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sTransitionData->tWipeEndX, -1, 1, 1); do { - gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (sTransitionData->data[2] + 1) | 0x7800; - } while (!sub_814A228(sTransitionData->data, 1, 1)); + gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = (sTransitionData->tWipeCurrX + 1) | ((DISPLAY_WIDTH / 2) << 8); + } while (!UpdateBlackWipe(sTransitionData->data, TRUE, TRUE)); - sTransitionData->data[4] += 16; - if (sTransitionData->data[4] >= DISPLAY_WIDTH) + sTransitionData->tWipeEndX += 16; + if (sTransitionData->tWipeEndX >= DISPLAY_WIDTH) { - sTransitionData->data[5] = 0; + sTransitionData->tWipeEndY = 0; task->tState++; } @@ -1854,56 +1892,56 @@ static bool8 Clockwise_BlackFade_Func2(struct Task *task) return FALSE; } -static bool8 Clockwise_BlackFade_Func3(struct Task *task) +static bool8 ClockwiseWipe_Right(struct Task *task) { - s16 r1, r3; - vu8 var = 0; + s16 start, end; + vu8 finished = FALSE; sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionData->data, 120, 80, 240, sTransitionData->data[5], 1, 1); + InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, DISPLAY_WIDTH, sTransitionData->tWipeEndY, 1, 1); while (1) { - r1 = 120, r3 = sTransitionData->data[2] + 1; - if (sTransitionData->data[5] >= DISPLAY_HEIGHT / 2) - r1 = sTransitionData->data[2], r3 = DISPLAY_WIDTH; - gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (r3) | (r1 << 8); - if (var != 0) + start = DISPLAY_WIDTH / 2, end = sTransitionData->tWipeCurrX + 1; + if (sTransitionData->tWipeEndY >= DISPLAY_HEIGHT / 2) + start = sTransitionData->tWipeCurrX, end = DISPLAY_WIDTH; + gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = end | (start << 8); + if (finished) break; - var = sub_814A228(sTransitionData->data, 1, 1); + finished = UpdateBlackWipe(sTransitionData->data, TRUE, TRUE); } - sTransitionData->data[5] += 8; - if (sTransitionData->data[5] >= DISPLAY_HEIGHT) + sTransitionData->tWipeEndY += 8; + if (sTransitionData->tWipeEndY >= DISPLAY_HEIGHT) { - sTransitionData->data[4] = DISPLAY_WIDTH; + sTransitionData->tWipeEndX = DISPLAY_WIDTH; task->tState++; } else { - while (sTransitionData->data[3] < sTransitionData->data[5]) - gScanlineEffectRegBuffers[0][++sTransitionData->data[3]] = (r3) | (r1 << 8); + while (sTransitionData->tWipeCurrY < sTransitionData->tWipeEndY) + gScanlineEffectRegBuffers[0][++sTransitionData->tWipeCurrY] = end | (start << 8); } sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Clockwise_BlackFade_Func4(struct Task *task) +static bool8 ClockwiseWipe_Bottom(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionData->data, 120, 80, sTransitionData->data[4], 160, 1, 1); + InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sTransitionData->tWipeEndX, DISPLAY_HEIGHT, 1, 1); do { - gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (sTransitionData->data[2] << 8) | 0xF0; - } while (!sub_814A228(sTransitionData->data, 1, 1)); + gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = (sTransitionData->tWipeCurrX << 8) | DISPLAY_WIDTH; + } while (!UpdateBlackWipe(sTransitionData->data, TRUE, TRUE)); - sTransitionData->data[4] -= 16; - if (sTransitionData->data[4] <= 0) + sTransitionData->tWipeEndX -= 16; + if (sTransitionData->tWipeEndX <= 0) { - sTransitionData->data[5] = DISPLAY_HEIGHT; + sTransitionData->tWipeEndY = DISPLAY_HEIGHT; task->tState++; } @@ -1911,79 +1949,75 @@ static bool8 Clockwise_BlackFade_Func4(struct Task *task) return FALSE; } -static bool8 Clockwise_BlackFade_Func5(struct Task *task) +static bool8 ClockwiseWipe_Left(struct Task *task) { - s16 r1, r2, var4; - vu8 var = 0; + s16 end, start, temp; + vu8 finished = FALSE; sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionData->data, 120, 80, 0, sTransitionData->data[5], 1, 1); + InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, 0, sTransitionData->tWipeEndY, 1, 1); while (1) { - r1 = (gScanlineEffectRegBuffers[0][sTransitionData->data[3]]) & 0xFF; - r2 = sTransitionData->data[2]; - if (sTransitionData->data[5] <= DISPLAY_HEIGHT / 2) - r2 = 120, r1 = sTransitionData->data[2]; - var4 = (r1) | (r2 << 8); - gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = var4; - if (var != 0) + end = (gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY]) & 0xFF; + start = sTransitionData->tWipeCurrX; + if (sTransitionData->tWipeEndY <= DISPLAY_HEIGHT / 2) + start = DISPLAY_WIDTH / 2, end = sTransitionData->tWipeCurrX; + temp = end | (start << 8); + gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = temp; + if (finished) break; - var = sub_814A228(sTransitionData->data, 1, 1); + finished = UpdateBlackWipe(sTransitionData->data, TRUE, TRUE); } - sTransitionData->data[5] -= 8; - if (sTransitionData->data[5] <= 0) + sTransitionData->tWipeEndY -= 8; + if (sTransitionData->tWipeEndY <= 0) { - sTransitionData->data[4] = 0; + sTransitionData->tWipeEndX = 0; task->tState++; } else { - while (sTransitionData->data[3] > sTransitionData->data[5]) - { - gScanlineEffectRegBuffers[0][--sTransitionData->data[3]] = (r1) | (r2 << 8); - } + while (sTransitionData->tWipeCurrY > sTransitionData->tWipeEndY) + gScanlineEffectRegBuffers[0][--sTransitionData->tWipeCurrY] = end | (start << 8); } sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Clockwise_BlackFade_Func6(struct Task *task) +static bool8 ClockwiseWipe_TopLeft(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; - sub_814A1AC(sTransitionData->data, 120, 80, sTransitionData->data[4], 0, 1, 1); + InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sTransitionData->tWipeEndX, 0, 1, 1); do { - s16 r2, r3; + s16 start, end; + start = DISPLAY_WIDTH / 2, end = sTransitionData->tWipeCurrX; + if (sTransitionData->tWipeCurrX >= DISPLAY_WIDTH / 2) + start = 0, end = DISPLAY_WIDTH; + gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = end | (start << 8); + } while (!UpdateBlackWipe(sTransitionData->data, TRUE, TRUE)); - r2 = 120, r3 = sTransitionData->data[2]; - if (sTransitionData->data[2] >= 120) - r2 = 0, r3 = DISPLAY_WIDTH; - gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (r3) | (r2 << 8); - - } while (!sub_814A228(sTransitionData->data, 1, 1)); - - sTransitionData->data[4] += 16; - if (sTransitionData->data[2] > 120) + sTransitionData->tWipeEndX += 16; + if (sTransitionData->tWipeCurrX > DISPLAY_WIDTH / 2) task->tState++; sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Clockwise_BlackFade_End(struct Task *task) +static bool8 ClockwiseWipe_End(struct Task *task) { DmaStop(0); FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Task_Clockwise_BlackFade)); + DestroyTask(FindTaskIdByFunc(Task_ClockwiseWipe)); return FALSE; } -static void VBlankCB_Clockwise_BlackFade(void) +static void VBlankCB_ClockwiseWipe(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -1996,6 +2030,15 @@ static void VBlankCB_Clockwise_BlackFade(void) DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } +//--------------------- +// B_TRANSITION_RIPPLE +//--------------------- + +#define tSinVal data[1] +#define tAmplitudeVal data[2] +#define tTimer data[3] +#define tFadeStarted data[4] + static void Task_Ripple(u8 taskId) { while (sRipple_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -2020,34 +2063,34 @@ static bool8 Ripple_Init(struct Task *task) return TRUE; } -static bool8 Ripple_Func2(struct Task *task) +static bool8 Ripple_Main(struct Task *task) { u8 i; - s16 r3; - u16 r4, r8; + s16 amplitude; + u16 sinVal, speed; sTransitionData->VBlank_DMA = FALSE; - r3 = task->data[2] >> 8; - r4 = task->data[1]; - r8 = 384; - task->data[1] += 0x400; - if (task->data[2] <= 0x1FFF) - task->data[2] += 0x180; + amplitude = task->tAmplitudeVal >> 8; + sinVal = task->tSinVal; + speed = 0x180; + task->tSinVal += 0x400; + if (task->tAmplitudeVal <= 0x1FFF) + task->tAmplitudeVal += 0x180; - for (i = 0; i < DISPLAY_HEIGHT; i++, r4 += r8) + for (i = 0; i < DISPLAY_HEIGHT; i++, sinVal += speed) { - s16 var = r4 >> 8; - gScanlineEffectRegBuffers[0][i] = sTransitionData->cameraY + Sin(var & 0xffff, r3); + s16 sinIndex = sinVal >> 8; + gScanlineEffectRegBuffers[0][i] = sTransitionData->cameraY + Sin(sinIndex & 0xffff, amplitude); } - if (++task->data[3] == 81) + if (++task->tTimer == 81) { - task->data[4]++; + task->tFadeStarted++; BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, RGB_BLACK); } - if (task->data[4] != 0 && !gPaletteFade.active) + if (task->tFadeStarted && !gPaletteFade.active) DestroyTask(FindTaskIdByFunc(Task_Ripple)); sTransitionData->VBlank_DMA++; @@ -2069,7 +2112,18 @@ static void HBlankCB_Ripple(void) REG_BG3VOFS = var; } +#undef tSinVal +#undef tAmplitudeVal +#undef tTimer +#undef tFadeStarted + +//------------------- // B_TRANSITION_WAVE +//------------------- + +#define tX data[1] +#define tSinIndex data[2] + static void Task_Wave(u8 taskId) { while (sWave_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -2096,30 +2150,30 @@ static bool8 Wave_Init(struct Task *task) return TRUE; } -static bool8 Wave_Func2(struct Task *task) +static bool8 Wave_Main(struct Task *task) { - u8 i, r5; + u8 i, sinIndex; u16* toStore; - bool8 nextFunc; + bool8 finished; sTransitionData->VBlank_DMA = FALSE; toStore = gScanlineEffectRegBuffers[0]; - r5 = task->data[2]; - task->data[2] += 16; - task->data[1] += 8; + sinIndex = task->tSinIndex; + task->tSinIndex += 16; + task->tX += 8; - for (i = 0, nextFunc = TRUE; i < DISPLAY_HEIGHT; i++, r5 += 4, toStore++) + for (i = 0, finished = TRUE; i < DISPLAY_HEIGHT; i++, sinIndex += 4, toStore++) { - s16 value = task->data[1] + Sin(r5, 40); - if (value < 0) - value = 0; - if (value > DISPLAY_WIDTH) - value = DISPLAY_WIDTH; - *toStore = (value << 8) | (DISPLAY_WIDTH + 1); - if (value < DISPLAY_WIDTH) - nextFunc = FALSE; + s16 x = task->tX + Sin(sinIndex, 40); + if (x < 0) + x = 0; + if (x > DISPLAY_WIDTH) + x = DISPLAY_WIDTH; + *toStore = (x << 8) | (DISPLAY_WIDTH + 1); + if (x < DISPLAY_WIDTH) + finished = FALSE; } - if (nextFunc) + if (finished) task->tState++; sTransitionData->VBlank_DMA++; @@ -2146,6 +2200,33 @@ static void VBlankCB_Wave(void) DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } +#undef tX +#undef tSinIndex + +//---------------------------------------------------------------- +// B_TRANSITION_SIDNEY, B_TRANSITION_PHOEBE, B_TRANSITION_GLACIA, +// B_TRANSITION_DRAKE, and B_TRANSITION_CHAMPION +// +// These are all the "mugshot" transitions, where a banner shows +// the trainer pic of the player and their opponent. +//---------------------------------------------------------------- + +#define tSinIndex data[1] +#define tTopBannerX data[2] +#define tBottomBannerX data[3] +#define tTimer data[3] // Re-used +#define tFadeSpread data[4] +#define tOpponentSpriteId data[13] +#define tPlayerSpriteId data[14] +#define tMugshotId data[15] + +// Sprite data for trainer sprites in mugshots +#define sState data[0] +#define sSlideSpeed data[1] +#define sSlideAccel data[2] +#define sDone data[6] +#define sSlideDir data[7] + static void Task_Sidney(u8 taskId) { gTasks[taskId].tMugshotId = MUGSHOT_SIDNEY; @@ -2189,17 +2270,17 @@ static bool8 Mugshot_Init(struct Task *task) ScanlineEffect_Clear(); Mugshots_CreateTrainerPics(task); - task->data[1] = 0; - task->data[2] = 1; - task->data[3] = DISPLAY_WIDTH - 1; + task->tSinIndex = 0; + task->tTopBannerX = 1; + task->tBottomBannerX = DISPLAY_WIDTH - 1; sTransitionData->WININ = WININ_WIN0_ALL; sTransitionData->WINOUT = WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR; sTransitionData->WIN0V = DISPLAY_HEIGHT; for (i = 0; i < DISPLAY_HEIGHT; i++) - gScanlineEffectRegBuffers[1][i] = 0xF0F1; + gScanlineEffectRegBuffers[1][i] = (DISPLAY_WIDTH << 8) | (DISPLAY_WIDTH + 1); - SetVBlankCallback(VBlankCB0_Mugshots); + SetVBlankCallback(VBlankCB_Mugshots); task->tState++; return FALSE; @@ -2220,7 +2301,7 @@ static bool8 Mugshot_SetGfx(struct Task *task) for (i = 0; i < 20; i++) { for (j = 0; j < 32; j++, mugshotsMap++) - SET_TILEMAP_TILE(tilemap, i, j, *mugshotsMap | 0xF000); + SET_TILE(tilemap, i, j, *mugshotsMap); } EnableInterrupts(INTR_FLAG_HBLANK); @@ -2232,43 +2313,49 @@ static bool8 Mugshot_SetGfx(struct Task *task) static bool8 Mugshot_ShowBanner(struct Task *task) { - u8 i, r5; + u8 i, sinIndex; u16* toStore; - s16 value; + s16 x; s32 mergedValue; sTransitionData->VBlank_DMA = FALSE; toStore = gScanlineEffectRegBuffers[0]; - r5 = task->data[1]; - task->data[1] += 16; + sinIndex = task->tSinIndex; + task->tSinIndex += 16; - for (i = 0; i < DISPLAY_HEIGHT / 2; i++, toStore++, r5 += 16) + // Update top banner + for (i = 0; i < DISPLAY_HEIGHT / 2; i++, toStore++, sinIndex += 16) { - value = task->data[2] + Sin(r5, 16); - if (value < 0) - value = 1; - if (value > DISPLAY_WIDTH) - value = DISPLAY_WIDTH; - *toStore = value; - } - for (; i < DISPLAY_HEIGHT; i++, toStore++, r5 += 16) - { - value = task->data[3] - Sin(r5, 16); - if (value < 0) - value = 0; - if (value > DISPLAY_WIDTH - 1) - value = DISPLAY_WIDTH - 1; - *toStore = (value << 8) | (DISPLAY_WIDTH); + x = task->tTopBannerX + Sin(sinIndex, 16); + if (x < 0) + x = 1; + if (x > DISPLAY_WIDTH) + x = DISPLAY_WIDTH; + *toStore = x; } - task->data[2] += 8; - task->data[3] -= 8; - if (task->data[2] > DISPLAY_WIDTH) - task->data[2] = DISPLAY_WIDTH; - if (task->data[3] < 0) - task->data[3] = 0; - mergedValue = *(s32*)(&task->data[2]); + // Update bottom banner + for (; i < DISPLAY_HEIGHT; i++, toStore++, sinIndex += 16) + { + x = task->tBottomBannerX - Sin(sinIndex, 16); + if (x < 0) + x = 0; + if (x > DISPLAY_WIDTH - 1) + x = DISPLAY_WIDTH - 1; + *toStore = (x << 8) | DISPLAY_WIDTH; + } + + // Slide banners across screen + task->tTopBannerX += 8; + task->tBottomBannerX -= 8; + + if (task->tTopBannerX > DISPLAY_WIDTH) + task->tTopBannerX = DISPLAY_WIDTH; + if (task->tBottomBannerX < 0) + task->tBottomBannerX = 0; + + mergedValue = *(s32*)(&task->tTopBannerX); if (mergedValue == DISPLAY_WIDTH) task->tState++; @@ -2289,15 +2376,19 @@ static bool8 Mugshot_StartOpponentSlide(struct Task *task) *toStore = DISPLAY_WIDTH; task->tState++; - task->data[1] = 0; - task->data[2] = 0; - task->data[3] = 0; + + // Clear old data + task->tSinIndex = 0; + task->tTopBannerX = 0; + task->tBottomBannerX = 0; sTransitionData->BG0HOFS_Lower -= 8; sTransitionData->BG0HOFS_Upper += 8; - SetTrainerPicSlideTable(task->tOpponentSpriteId, 0); - SetTrainerPicSlideTable(task->tPlayerSpriteId, 1); + SetTrainerPicSlideDirection(task->tOpponentSpriteId, 0); + SetTrainerPicSlideDirection(task->tPlayerSpriteId, 1); + + // Start opponent slide IncrementTrainerPicState(task->tOpponentSpriteId); PlaySE(SE_MUGSHOT); @@ -2311,7 +2402,7 @@ static bool8 Mugshot_WaitStartPlayerSlide(struct Task *task) sTransitionData->BG0HOFS_Lower -= 8; sTransitionData->BG0HOFS_Upper += 8; - // Start player's pic slide in once the opponent is finished + // Start player's slide in once the opponent is finished if (IsTrainerPicSlideDone(task->tOpponentSpriteId)) { task->tState++; @@ -2335,10 +2426,10 @@ static bool8 Mugshot_WaitPlayerSlide(struct Task *task) SetGpuReg(REG_OFFSET_WIN0H, DISPLAY_WIDTH); SetGpuReg(REG_OFFSET_BLDY, 0); task->tState++; - task->data[3] = 0; - task->data[4] = 0; + task->tTimer = 0; + task->tFadeSpread = 0; sTransitionData->BLDCNT = BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN; - SetVBlankCallback(VBlankCB1_Mugshots); + SetVBlankCallback(VBlankCB_MugshotsFadeOut); } return FALSE; } @@ -2352,16 +2443,18 @@ static bool8 Mugshot_GradualWhiteFade(struct Task *task) sTransitionData->BG0HOFS_Lower -= 8; sTransitionData->BG0HOFS_Upper += 8; - if (task->data[4] < DISPLAY_HEIGHT / 2) - task->data[4] += 2; - if (task->data[4] > DISPLAY_HEIGHT / 2) - task->data[4] = DISPLAY_HEIGHT / 2; + if (task->tFadeSpread < DISPLAY_HEIGHT / 2) + task->tFadeSpread += 2; + if (task->tFadeSpread > DISPLAY_HEIGHT / 2) + task->tFadeSpread = DISPLAY_HEIGHT / 2; - if (++task->data[3] & 1) + if (++task->tTimer & 1) { s16 i; - for (i = 0, active = FALSE; i <= task->data[4]; i++) + for (i = 0, active = FALSE; i <= task->tFadeSpread; i++) { + // Fade starts in middle of screen and + // spreads outwards in both directions. s16 index1 = DISPLAY_HEIGHT / 2 - i; s16 index2 = DISPLAY_HEIGHT / 2 + i; if (gScanlineEffectRegBuffers[0][index1] <= 15) @@ -2377,19 +2470,21 @@ static bool8 Mugshot_GradualWhiteFade(struct Task *task) } } - if (task->data[4] == DISPLAY_HEIGHT / 2 && !active) + if (task->tFadeSpread == DISPLAY_HEIGHT / 2 && !active) task->tState++; sTransitionData->VBlank_DMA++; return FALSE; } +// Set palette to white to replace the scanline white fade +// before the screen fades to black. static bool8 Mugshot_InitFadeWhiteToBlack(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; BlendPalettes(PALETTES_ALL, 16, RGB_WHITE); sTransitionData->BLDCNT = 0xFF; - task->data[3] = 0; + task->tTimer = 0; task->tState++; return TRUE; @@ -2399,9 +2494,9 @@ static bool8 Mugshot_FadeToBlack(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; - task->data[3]++; - memset(gScanlineEffectRegBuffers[0], task->data[3], DISPLAY_HEIGHT * 2); - if (task->data[3] > 15) + task->tTimer++; + memset(gScanlineEffectRegBuffers[0], task->tTimer, DISPLAY_HEIGHT * 2); + if (task->tTimer > 15) task->tState++; sTransitionData->VBlank_DMA++; @@ -2416,7 +2511,7 @@ static bool8 Mugshot_End(struct Task *task) return FALSE; } -static void VBlankCB0_Mugshots(void) +static void VBlankCB_Mugshots(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -2429,7 +2524,7 @@ static void VBlankCB0_Mugshots(void) DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } -static void VBlankCB1_Mugshots(void) +static void VBlankCB_MugshotsFadeOut(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -2447,26 +2542,19 @@ static void HBlankCB_Mugshots(void) REG_BG0HOFS = sTransitionData->BG0HOFS_Upper; } -// data fields for player/opponent sprites in mugshots -#define sState data[0] -#define sOffsetX data[1] -#define sOffsetX2 data[2] -#define sDone data[6] -#define sSlideTableId data[7] - static void Mugshots_CreateTrainerPics(struct Task *task) { struct Sprite *opponentSprite, *playerSprite; s16 mugshotId = task->tMugshotId; task->tOpponentSpriteId = CreateTrainerSprite(sMugshotsTrainerPicIDsTable[mugshotId], - sMugshotsOpponentCoords[mugshotId][0] - 32, - sMugshotsOpponentCoords[mugshotId][1] + 42, - 0, gDecompressionBuffer); + sMugshotsOpponentCoords[mugshotId][0] - 32, + sMugshotsOpponentCoords[mugshotId][1] + 42, + 0, gDecompressionBuffer); task->tPlayerSpriteId = CreateTrainerSprite(PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender), - DISPLAY_WIDTH + 32, - 106, - 0, gDecompressionBuffer); + DISPLAY_WIDTH + 32, + 106, + 0, gDecompressionBuffer); opponentSprite = &gSprites[task->tOpponentSpriteId]; playerSprite = &gSprites[task->tPlayerSpriteId]; @@ -2498,63 +2586,70 @@ static void SpriteCB_MugshotTrainerPic(struct Sprite *sprite) while (sMugshotTrainerPicFuncs[sprite->sState](sprite)); } -static bool8 MugshotTrainerPic_Nothing(struct Sprite *sprite) +// Wait until IncrementTrainerPicState is called +static bool8 MugshotTrainerPic_Pause(struct Sprite *sprite) { return FALSE; } -static bool8 MugshotTrainerPic_SetSlideOffsets(struct Sprite *sprite) +static bool8 MugshotTrainerPic_Init(struct Sprite *sprite) { - s16 offsets1[ARRAY_COUNT(sTrainerPicSlideOffsets1)]; - s16 offsets2[ARRAY_COUNT(sTrainerPicSlideOffsets2)]; + s16 speeds[ARRAY_COUNT(sTrainerPicSlideSpeeds)]; + s16 accels[ARRAY_COUNT(sTrainerPicSlideAccels)]; - memcpy(offsets1, sTrainerPicSlideOffsets1, sizeof(sTrainerPicSlideOffsets1)); - memcpy(offsets2, sTrainerPicSlideOffsets2, sizeof(sTrainerPicSlideOffsets2)); + memcpy(speeds, sTrainerPicSlideSpeeds, sizeof(sTrainerPicSlideSpeeds)); + memcpy(accels, sTrainerPicSlideAccels, sizeof(sTrainerPicSlideAccels)); sprite->sState++; - sprite->sOffsetX = offsets1[sprite->sSlideTableId]; - sprite->sOffsetX2 = offsets2[sprite->sSlideTableId]; + sprite->sSlideSpeed = speeds[sprite->sSlideDir]; + sprite->sSlideAccel = accels[sprite->sSlideDir]; return TRUE; } -// fast slide to around middle screen -static bool8 MugshotTrainerPic_Slide1(struct Sprite *sprite) +static bool8 MugshotTrainerPic_Slide(struct Sprite *sprite) { - sprite->x += sprite->sOffsetX; - if (sprite->sSlideTableId && sprite->x < 133) + sprite->x += sprite->sSlideSpeed; + + // Advance state when pic passes ~40% of screen + if (sprite->sSlideDir && sprite->x < DISPLAY_WIDTH - 107) sprite->sState++; - else if (!sprite->sSlideTableId && sprite->x > 103) + else if (!sprite->sSlideDir && sprite->x > 103) sprite->sState++; return FALSE; } -// slower but accelerating slide -static bool8 MugshotTrainerPic_Slide2(struct Sprite *sprite) +static bool8 MugshotTrainerPic_SlideSlow(struct Sprite *sprite) { - sprite->sOffsetX += sprite->sOffsetX2; - sprite->x += sprite->sOffsetX; - if (sprite->sOffsetX == 0) + // Add acceleration value to speed, then add speed. + // For both sides acceleration is opposite speed, so slide slows down. + sprite->sSlideSpeed += sprite->sSlideAccel; + sprite->x += sprite->sSlideSpeed; + + // Advance state when slide comes to a stop + if (sprite->sSlideSpeed == 0) { sprite->sState++; - sprite->sOffsetX2 = -sprite->sOffsetX2; + sprite->sSlideAccel = -sprite->sSlideAccel; sprite->sDone = TRUE; } return FALSE; } -// Has no practical effect -static bool8 MugshotTrainerPic_Slide3(struct Sprite *sprite) +// Slides trainer pic offscreen. This is never reached, because it's preceded +// by a second MugshotTrainerPic_Pause, and IncrementTrainerPicState is +// only called once per trainer pic. +static bool8 MugshotTrainerPic_SlideOffscreen(struct Sprite *sprite) { - sprite->sOffsetX += sprite->sOffsetX2; - sprite->x += sprite->sOffsetX; + sprite->sSlideSpeed += sprite->sSlideAccel; + sprite->x += sprite->sSlideSpeed; if (sprite->x < -31 || sprite->x > DISPLAY_WIDTH + 31) sprite->sState++; return FALSE; } -static void SetTrainerPicSlideTable(s16 spriteId, s16 arrId) +static void SetTrainerPicSlideDirection(s16 spriteId, s16 dirId) { - gSprites[spriteId].sSlideTableId = arrId; + gSprites[spriteId].sSlideDir = dirId; } static void IncrementTrainerPicState(s16 spriteId) @@ -2568,10 +2663,26 @@ static s16 IsTrainerPicSlideDone(s16 spriteId) } #undef sState -#undef sOffsetX -#undef sOffsetX2 +#undef sSlideSpeed +#undef sSlideAccel #undef sDone -#undef sSlideTableId +#undef sSlideDir +#undef tSinIndex +#undef tTopBannerX +#undef tBottomBannerX +#undef tTimer +#undef tFadeSpread +#undef tOpponentSpriteId +#undef tPlayerSpriteId +#undef tMugshotId + +//-------------------- +// B_TRANSITION_SLICE +//-------------------- + +#define tEffectX data[1] +#define tSpeed data[2] +#define tAccel data[3] static void Task_Slice(u8 taskId) { @@ -2585,8 +2696,8 @@ static bool8 Slice_Init(struct Task *task) InitTransitionData(); ScanlineEffect_Clear(); - task->data[2] = 256; - task->data[3] = 1; + task->tSpeed = 1 << 8; + task->tAccel = 1; sTransitionData->WININ = WININ_WIN0_ALL; sTransitionData->WINOUT = 0; sTransitionData->WIN0V = DISPLAY_HEIGHT; @@ -2608,37 +2719,39 @@ static bool8 Slice_Init(struct Task *task) return TRUE; } -static bool8 Slice_Func2(struct Task *task) +static bool8 Slice_Main(struct Task *task) { u16 i; sTransitionData->VBlank_DMA = FALSE; - task->data[1] += (task->data[2] >> 8); - if (task->data[1] > DISPLAY_WIDTH) - task->data[1] = DISPLAY_WIDTH; - if (task->data[2] <= 0xFFF) - task->data[2] += task->data[3]; - if (task->data[3] < 128) - task->data[3] <<= 1; // multiplying by two + task->tEffectX += (task->tSpeed >> 8); + if (task->tEffectX > DISPLAY_WIDTH) + task->tEffectX = DISPLAY_WIDTH; + if (task->tSpeed <= 0xFFF) + task->tSpeed += task->tAccel; + if (task->tAccel < 128) + task->tAccel <<= 1; // multiplying by two for (i = 0; i < DISPLAY_HEIGHT; i++) { u16 *storeLoc1 = &gScanlineEffectRegBuffers[0][i]; u16 *storeLoc2 = &gScanlineEffectRegBuffers[0][i + DISPLAY_HEIGHT]; - if (i & 1) + + // Alternate rows + if (i % 2) { - *storeLoc1 = sTransitionData->cameraX + task->data[1]; - *storeLoc2 = DISPLAY_WIDTH - task->data[1]; + *storeLoc1 = sTransitionData->cameraX + task->tEffectX; + *storeLoc2 = DISPLAY_WIDTH - task->tEffectX; } else { - *storeLoc1 = sTransitionData->cameraX - task->data[1]; - *storeLoc2 = (task->data[1] << 8) | (DISPLAY_WIDTH + 1); + *storeLoc1 = sTransitionData->cameraX - task->tEffectX; + *storeLoc2 = (task->tEffectX << 8) | (DISPLAY_WIDTH + 1); } } - if (task->data[1] >= DISPLAY_WIDTH) + if (task->tEffectX >= DISPLAY_WIDTH) task->tState++; sTransitionData->VBlank_DMA++; @@ -2676,6 +2789,20 @@ static void HBlankCB_Slice(void) } } +#undef tEffectX +#undef tSpeed +#undef tAccel + +//-------------------------- +// B_TRANSITION_SHRED_SPLIT +//-------------------------- + +// Data starts at 4. Possible it shared data +// with Slice above, which ends at 3. +#define tDelayTimer data[4] +#define tExtent data[5] +#define tDelay data[6] + static void Task_ShredSplit(u8 taskId) { while (sShredSplit_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -2703,9 +2830,9 @@ static bool8 ShredSplit_Init(struct Task *task) gScanlineEffectRegBuffers[0][DISPLAY_HEIGHT * 4 + i] = 1; } - task->data[4] = 0; - task->data[5] = 0; - task->data[6] = 7; + task->tDelayTimer = 0; + task->tExtent = 0; + task->tDelay = 7; EnableInterrupts(INTR_FLAG_HBLANK); @@ -2716,37 +2843,38 @@ static bool8 ShredSplit_Init(struct Task *task) return TRUE; } -static bool8 ShredSplit_Func2(struct Task *task) +static bool8 ShredSplit_Main(struct Task *task) { u16 i, j, k; - u8 arr1[ARRAY_COUNT(gUnknown_085C8C64)]; - s16 arr2[ARRAY_COUNT(gUnknown_085C8C66)]; - u8 var; + u8 baseY[ARRAY_COUNT(sShredSplit_SectionYCoords)]; + s16 moveDirs[ARRAY_COUNT(sShredSplit_SectionMoveDirs)]; + u8 linesFinished; u16 *ptr4, *ptr3, *ptr1, *ptr2; - s16 unkVar; + s16 y; - memcpy(arr1, gUnknown_085C8C64, sizeof(arr1)); - memcpy(arr2, gUnknown_085C8C66, sizeof(arr2)); + memcpy(baseY, sShredSplit_SectionYCoords, sizeof(baseY)); + memcpy(moveDirs, sShredSplit_SectionMoveDirs, sizeof(moveDirs)); sTransitionData->VBlank_DMA = FALSE; - var = 0; + linesFinished = 0; - for (i = 0; i <= task->data[5]; i++) + for (i = 0; i <= task->tExtent; i++) { + // Slide half of the pixel rows (alternating) right for (j = 0; j < 2; j++) { for (k = 0; k < 2; k++) { - unkVar = (arr1[j]) + (arr2[k] * -(i) * 2); - if (unkVar >= 0 && (unkVar != 79 || j != 1)) + y = baseY[j] + (moveDirs[k] * -i * 2); + if (y >= 0 && (y != DISPLAY_HEIGHT / 2 - 1 || j != 1)) { - ptr4 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 2]; - ptr3 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 3]; - ptr1 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 4]; + ptr4 = &gScanlineEffectRegBuffers[0][y + DISPLAY_HEIGHT * 2]; + ptr3 = &gScanlineEffectRegBuffers[0][y + DISPLAY_HEIGHT * 3]; + ptr1 = &gScanlineEffectRegBuffers[0][y + DISPLAY_HEIGHT * 4]; if (*ptr4 >= DISPLAY_WIDTH) { *ptr4 = DISPLAY_WIDTH; - var++; + linesFinished++; } else { @@ -2756,8 +2884,8 @@ static bool8 ShredSplit_Func2(struct Task *task) if (*ptr3 <= 0xFFF) *ptr3 += *ptr1; } - ptr2 = &gScanlineEffectRegBuffers[0][unkVar]; - ptr3 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT]; + ptr2 = &gScanlineEffectRegBuffers[0][y]; + ptr3 = &gScanlineEffectRegBuffers[0][y + DISPLAY_HEIGHT]; *ptr2 = sTransitionData->cameraX + *ptr4; *ptr3 = DISPLAY_WIDTH - *ptr4; @@ -2767,20 +2895,21 @@ static bool8 ShredSplit_Func2(struct Task *task) } } + // Slide the other half of the rows left for (j = 0; j < 2; j++) { for (k = 0; k < 2; k++) { - unkVar = (arr1[j] + 1) + (arr2[k] * -(i) * 2); - if (unkVar <= DISPLAY_HEIGHT && (unkVar != DISPLAY_HEIGHT / 2 || j != 1)) + y = baseY[j] + 1 + (moveDirs[k] * -i * 2); + if (y <= DISPLAY_HEIGHT && (y != DISPLAY_HEIGHT / 2 || j != 1)) { - ptr4 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 2]; - ptr3 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 3]; - ptr1 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT * 4]; + ptr4 = &gScanlineEffectRegBuffers[0][y + DISPLAY_HEIGHT * 2]; + ptr3 = &gScanlineEffectRegBuffers[0][y + DISPLAY_HEIGHT * 3]; + ptr1 = &gScanlineEffectRegBuffers[0][y + DISPLAY_HEIGHT * 4]; if (*ptr4 >= DISPLAY_WIDTH) { *ptr4 = DISPLAY_WIDTH; - var++; + linesFinished++; } else { @@ -2790,8 +2919,8 @@ static bool8 ShredSplit_Func2(struct Task *task) if (*ptr3 <= 0xFFF) *ptr3 += *ptr1; } - ptr2 = &gScanlineEffectRegBuffers[0][unkVar]; - ptr3 = &gScanlineEffectRegBuffers[0][unkVar + DISPLAY_HEIGHT]; + ptr2 = &gScanlineEffectRegBuffers[0][y]; + ptr3 = &gScanlineEffectRegBuffers[0][y + DISPLAY_HEIGHT]; *ptr2 = sTransitionData->cameraX - *ptr4; *ptr3 = (*ptr4 << 8) | (DISPLAY_WIDTH + 1); @@ -2802,11 +2931,19 @@ static bool8 ShredSplit_Func2(struct Task *task) } } - if (--task->data[4] < 0) - task->data[4] = 0; - if (task->data[4] <= 0 && task->data[5] + 1 <= 20) - task->data[4] = task->data[6], task->data[5]++; - if (var >= DISPLAY_HEIGHT) + // Count down to next move + if (--task->tDelayTimer < 0) + task->tDelayTimer = 0; + + // Try increase effect's extent + if (task->tDelayTimer <= 0 && task->tExtent + 1 <= DISPLAY_HEIGHT / 8) + { + task->tDelayTimer = task->tDelay; + task->tExtent++; + } + + // All lines have reached screen width, move on. + if (linesFinished >= DISPLAY_HEIGHT) task->tState++; sTransitionData->VBlank_DMA++; @@ -2817,7 +2954,8 @@ static bool8 ShredSplit_Func2(struct Task *task) // is always false, resulting in the game being stuck in an infinite loop. // It's possible this transition is only partially // done and the second part was left out. -static bool8 ShredSplit_Func3(struct Task *task) +// In any case removing or bypassing this state allows the transition to finish. +static bool8 ShredSplit_BrokenCheck(struct Task *task) { u16 i; bool32 done = TRUE; @@ -2826,7 +2964,7 @@ static bool8 ShredSplit_Func3(struct Task *task) for (i = 0; i < DISPLAY_HEIGHT; i++) { if (gScanlineEffectRegBuffers[1][i] != DISPLAY_WIDTH && gScanlineEffectRegBuffers[1][i] != checkVar2) - done = FALSE; // a break statement should be put here + done = FALSE; } if (done == TRUE) @@ -2843,16 +2981,32 @@ static bool8 ShredSplit_End(struct Task *task) return FALSE; } -static void Task_Blackhole1(u8 taskId) +#undef tDelayTimer +#undef tExtent +#undef tDelay + +//----------------------------------------------------------- +// B_TRANSITION_BLACKHOLE and B_TRANSITION_BLACKHOLE_PULSATE +//----------------------------------------------------------- + +#define tRadius data[1] +#define tGrowSpeed data[2] +#define tSinIndex data[5] +#define tVibrateId data[6] +#define tAmplitude data[6] // Used differently by the two transitions +#define tFlag data[7] // Used generally to indicate an action has taken place. + +static void Task_Blackhole(u8 taskId) { - while (sBlackhole1_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sBlackhole_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static void Task_Blackhole2(u8 taskId) +static void Task_BlackholePulsate(u8 taskId) { - while (sBlackhole2_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sBlackholePulsate_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } +// Init is shared by both transitions static bool8 Blackhole_Init(struct Task *task) { s32 i; @@ -2868,19 +3022,19 @@ static bool8 Blackhole_Init(struct Task *task) for (i = 0; i < DISPLAY_HEIGHT; i++) gScanlineEffectRegBuffers[1][i] = 0; - SetVBlankCallback(VBlankCB1_BigPokeball); + SetVBlankCallback(VBlankCB_CircularMask); task->tState++; - task->data[1] = 1; - task->data[2] = 0x100; - task->tFuncState = 0; + task->tRadius = 1; + task->tGrowSpeed = 1 << 8; + task->tFlag = FALSE; return FALSE; } -static bool8 Blackhole1_Func3(struct Task *task) +static bool8 Blackhole_GrowEnd(struct Task *task) { - if (task->tFuncState == 1) + if (task->tFlag == TRUE) { DmaStop(0); SetVBlankCallback(NULL); @@ -2889,16 +3043,16 @@ static bool8 Blackhole1_Func3(struct Task *task) else { sTransitionData->VBlank_DMA = FALSE; - if (task->data[2] < 1024) - task->data[2] += 128; - if (task->data[1] < DISPLAY_HEIGHT) - task->data[1] += (task->data[2] >> 8); - if (task->data[1] > DISPLAY_HEIGHT) - task->data[1] = DISPLAY_HEIGHT; - sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->data[1]); - if (task->data[1] == DISPLAY_HEIGHT) + if (task->tGrowSpeed < 1024) + task->tGrowSpeed += 128; + if (task->tRadius < DISPLAY_HEIGHT) + task->tRadius += task->tGrowSpeed >> 8; + if (task->tRadius > DISPLAY_HEIGHT) + task->tRadius = DISPLAY_HEIGHT; + SetCircularMask(gScanlineEffectRegBuffers[0], DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, task->tRadius); + if (task->tRadius == DISPLAY_HEIGHT) { - task->tFuncState = 1; + task->tFlag = TRUE; FadeScreenBlack(); } else @@ -2910,73 +3064,89 @@ static bool8 Blackhole1_Func3(struct Task *task) return FALSE; } -static bool8 Blackhole1_Func2(struct Task *task) +static bool8 Blackhole_Vibrate(struct Task *task) { sTransitionData->VBlank_DMA = FALSE; - if (task->tFuncState == 0) + if (task->tFlag == FALSE) { - task->tFuncState++; - task->data[1] = 0x30; - task->data[6] = 0; + task->tFlag++; + task->tRadius = 48; + task->tVibrateId = 0; } - task->data[1] += gUnknown_085C8C80[task->data[6]]; - task->data[6] = (task->data[6] + 1) % 2; - sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->data[1]); - if (task->data[1] < 9) + task->tRadius += sBlackhole_Vibrations[task->tVibrateId]; + task->tVibrateId = (task->tVibrateId + 1) % (int)ARRAY_COUNT(sBlackhole_Vibrations); + SetCircularMask(gScanlineEffectRegBuffers[0], DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, task->tRadius); + if (task->tRadius < 9) { task->tState++; - task->tFuncState = 0; + task->tFlag = FALSE; } sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Blackhole2_Func2(struct Task *task) +static bool8 BlackholePulsate_Main(struct Task *task) { u16 index; // should be s16 I think s16 amplitude; sTransitionData->VBlank_DMA = FALSE; - if (task->tFuncState == 0) + if (task->tFlag == FALSE) { - task->tFuncState++; - task->data[5] = 2; - task->data[6] = 2; + task->tFlag++; + task->tSinIndex = 2; + task->tAmplitude = 2; } - if (task->data[1] > DISPLAY_HEIGHT) - task->data[1] = DISPLAY_HEIGHT; - sub_814A014(gScanlineEffectRegBuffers[0], 120, 80, task->data[1]); - if (task->data[1] == DISPLAY_HEIGHT) + if (task->tRadius > DISPLAY_HEIGHT) + task->tRadius = DISPLAY_HEIGHT; + + SetCircularMask(gScanlineEffectRegBuffers[0], DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, task->tRadius); + if (task->tRadius == DISPLAY_HEIGHT) { DmaStop(0); FadeScreenBlack(); DestroyTask(FindTaskIdByFunc(task->func)); } - index = task->data[5]; - if ((task->data[5] & 0xFF) <= 128) + index = task->tSinIndex; + if ((task->tSinIndex & 0xFF) <= 128) { - amplitude = task->data[6]; - task->data[5] += 8; + amplitude = task->tAmplitude; + task->tSinIndex += 8; } else { - amplitude = task->data[6] - 1; - task->data[5] += 16; + amplitude = task->tAmplitude - 1; + task->tSinIndex += 16; } - task->data[1] += Sin(index & 0xFF, amplitude); + task->tRadius += Sin(index & 0xFF, amplitude); - if (task->data[1] <= 0) - task->data[1] = 1; - if (task->data[5] > 0xFE) - task->data[5] >>= 8, task->data[6]++; + if (task->tRadius <= 0) + task->tRadius = 1; + + if (task->tSinIndex >= 0xFF) + { + task->tSinIndex >>= 8; + task->tAmplitude++; + } sTransitionData->VBlank_DMA++; return FALSE; } +#undef tRadius +#undef tGrowSpeed +#undef tSinIndex +#undef tVibrateId +#undef tAmplitude +#undef tFlag + +//--------------------------------- +// B_TRANSITION_RECTANGULAR_SPIRAL +//--------------------------------- + static void Task_RectangularSpiral(u8 taskId) { while (sRectangularSpiral_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -2989,40 +3159,44 @@ static bool8 RectangularSpiral_Init(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); CpuCopy16(sShrinkingBoxTileset, tileset, 0x20); CpuCopy16(sShrinkingBoxTileset + 0x70, tileset + 0x20, 0x20); - CpuFill16(0xF000, tilemap, BG_SCREEN_SIZE); + CpuFill16(0xF0 << 8, tilemap, BG_SCREEN_SIZE); LoadPalette(sFieldEffectPal_Pokeball, 0xF0, sizeof(sFieldEffectPal_Pokeball)); task->data[3] = 1; task->tState++; - sRectangularSpiralTransition[0].field_0 = 0; - sRectangularSpiralTransition[0].field_2 = -1; - sRectangularSpiralTransition[0].field_4 = 1; - sRectangularSpiralTransition[0].field_6 = 308; - sRectangularSpiralTransition[0].field_8 = 0; + // Top left + sRectangularSpiralLines[0].state = 0; + sRectangularSpiralLines[0].position = -1; + sRectangularSpiralLines[0].moveIdx = 1; + sRectangularSpiralLines[0].skipPosition = 308; + sRectangularSpiralLines[0].field_8 = 0; - sRectangularSpiralTransition[1].field_0 = 0; - sRectangularSpiralTransition[1].field_2 = -1; - sRectangularSpiralTransition[1].field_4 = 1; - sRectangularSpiralTransition[1].field_6 = 308; - sRectangularSpiralTransition[1].field_8 = 0; + // Bottom right + sRectangularSpiralLines[1].state = 0; + sRectangularSpiralLines[1].position = -1; + sRectangularSpiralLines[1].moveIdx = 1; + sRectangularSpiralLines[1].skipPosition = 308; + sRectangularSpiralLines[1].field_8 = 0; - sRectangularSpiralTransition[2].field_0 = 0; - sRectangularSpiralTransition[2].field_2 = -3; - sRectangularSpiralTransition[2].field_4 = 1; - sRectangularSpiralTransition[2].field_6 = 307; - sRectangularSpiralTransition[2].field_8 = 0; + // Top right + sRectangularSpiralLines[2].state = 0; + sRectangularSpiralLines[2].position = -3; + sRectangularSpiralLines[2].moveIdx = 1; + sRectangularSpiralLines[2].skipPosition = 307; + sRectangularSpiralLines[2].field_8 = 0; - sRectangularSpiralTransition[3].field_0 = 0; - sRectangularSpiralTransition[3].field_2 = -3; - sRectangularSpiralTransition[3].field_4 = 1; - sRectangularSpiralTransition[3].field_6 = 307; - sRectangularSpiralTransition[3].field_8 = 0; + // Bottom left + sRectangularSpiralLines[3].state = 0; + sRectangularSpiralLines[3].position = -3; + sRectangularSpiralLines[3].moveIdx = 1; + sRectangularSpiralLines[3].skipPosition = 307; + sRectangularSpiralLines[3].field_8 = 0; return FALSE; } -static bool8 RectangularSpiral_Func2(struct Task *task) +static bool8 RectangularSpiral_Main(struct Task *task) { u16 *tilemap, *tileset; u8 i; @@ -3031,24 +3205,28 @@ static bool8 RectangularSpiral_Func2(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); + // Draw 2 tiles at a time for each spiral line for (i = 0; i < 2; i++) { - for (j = 0; j < ARRAY_COUNT(sRectangularSpiralTransition); j++) + for (j = 0; j < ARRAY_COUNT(sRectangularSpiralLines); j++) { - s16 var = 0, var2 = 0; - s32 var3 = 0; + s16 position = 0; + s16 x = 0, y = 0; - if (sub_8149048(gUnknown_085C8D38[j / 2], &sRectangularSpiralTransition[j])) + if (UpdateRectangularSpiralLine(sRectangularSpiral_MoveDataTables[j / 2], &sRectangularSpiralLines[j])) { + // The line moved to a new position, draw the tile. done = FALSE; - var = sRectangularSpiralTransition[j].field_2; + position = sRectangularSpiralLines[j].position; + + // Invert position for the two bottom lines if ((j % 2) == 1) - var = 0x27D - var; + position = 637 - position; - var2 = var % 32; - var3 = var / 32; + x = position % 32; + y = position / 32; - SET_TILEMAP_TILE(tilemap, var3, var2, 0xF002); + SET_TILE(tilemap, y, x, 2); } } } @@ -3066,69 +3244,77 @@ static bool8 RectangularSpiral_End(struct Task *task) return FALSE; } -static bool16 sub_8149048(const s16 * const *arg0, struct StructRectangularSpiral *arg1) +// Returns TRUE if a tile should be drawn, FALSE otherwise +static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, struct RectangularSpiralLine *line) { - const s16 *array = arg0[arg1->field_0]; - if (array[arg1->field_4] == -1) + const s16 *moveData = moveDataTable[line->state]; + if (moveData[line->moveIdx] == SPIRAL_END) return FALSE; - // ?? - sUnusedRectangularSpiralVar = array[0]; - sUnusedRectangularSpiralVar = array[1]; - sUnusedRectangularSpiralVar = array[2]; - sUnusedRectangularSpiralVar = array[3]; + // Presumably saving data for debug. + sDebug_RectangularSpiralData = moveData[0]; + sDebug_RectangularSpiralData = moveData[1]; + sDebug_RectangularSpiralData = moveData[2]; + sDebug_RectangularSpiralData = moveData[3]; - switch (array[0]) + switch (moveData[0]) { case 1: - arg1->field_2 += 0x1; + line->position += 1; break; case 2: - arg1->field_2 -= 0x1; + line->position -= 1; break; case 3: - arg1->field_2 -= 0x20; + line->position -= 32; break; case 4: - arg1->field_2 += 0x20; + line->position += 32; break; } - if (arg1->field_2 > 0x27F || array[arg1->field_4] == -1) + // Below check is never true. + // SPIRAL_END was already checked, and position is never >= 640 + if (line->position >= 640 || moveData[line->moveIdx] == SPIRAL_END) return FALSE; - if (arg1->field_8 == 0 && array[arg1->field_4] == -2) + if (line->field_8 == 0 && moveData[line->moveIdx] == SPIRAL_SKIP) { - arg1->field_8 = 1; - arg1->field_4 = 1; - arg1->field_2 = arg1->field_6; - arg1->field_0 = 4; + line->field_8 = 1; + line->moveIdx = 1; + line->position = line->skipPosition; + line->state = 4; } - if (arg1->field_2 == array[arg1->field_4]) + if (line->position == moveData[line->moveIdx]) { - (arg1->field_0)++; - if (arg1->field_8 == 1) + line->state++; + if (line->field_8 == 1) { - if (arg1->field_0 > 7) + if (line->state > 7) { - (arg1->field_4)++; - (arg1->field_0) = 4; + line->moveIdx++; + line->state = 4; } } else { - if (arg1->field_0 > 3) + if (line->state > 3) { - (arg1->field_4)++; - (arg1->field_0) = 0; + line->moveIdx++; + line->state = 0; } } } - return TRUE; } +//---------------------- +// B_TRANSITION_GROUDON +//---------------------- + +#define tTimer data[1] + static void Task_Groudon(u8 taskId) { while (sGroudon_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -3144,21 +3330,21 @@ static bool8 Groudon_Init(struct Task *task) LZ77UnCompVram(sGroudon_Tilemap, tilemap); task->tState++; - task->data[1] = 0; + task->tTimer = 0; return FALSE; } -static bool8 Groudon_PalettePulsate(struct Task *task) +static bool8 Groudon_PaletteFlash(struct Task *task) { - if (task->data[1] % 3 == 0) + if (task->tTimer % 3 == 0) { - u16 var = (task->data[1] % 30) / 3; - LoadPalette(sGroudon1_Palette + (var * 16), 0xF0, 0x20); + u16 offset = (task->tTimer % 30) / 3; + LoadPalette(&sGroudon1_Palette[offset * 16], 0xF0, 0x20); } - if (++task->data[1] > 58) + if (++task->tTimer > 58) { task->tState++; - task->data[1] = 0; + task->tTimer = 0; } return FALSE; @@ -3166,29 +3352,38 @@ static bool8 Groudon_PalettePulsate(struct Task *task) static bool8 Groudon_PaletteBrighten(struct Task *task) { - if (task->data[1] % 5 == 0) + if (task->tTimer % 5 == 0) { - s16 var = task->data[1] / 5; - LoadPalette(sGroudon2_Palette + (var * 16), 0xF0, 0x20); + s16 offset = task->tTimer / 5; + LoadPalette(&sGroudon2_Palette[offset * 16], 0xF0, 0x20); } - if (++task->data[1] > 68) + if (++task->tTimer > 68) { task->tState++; - task->data[1] = 0; + task->tTimer = 0; task->tEndDelay = 30; } return FALSE; } +#undef tTimer #undef tEndDelay +//----------------------- +// B_TRANSITION_RAYQUAZA +//----------------------- + +#define tTimer data[1] +#define tGrowSpeed data[2] // Shared from B_TRANSITION_BLACKHOLE +#define tFlag data[7] // Shared from B_TRANSITION_BLACKHOLE + static void Task_Rayquaza(u8 taskId) { while (sRayquaza_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Rayquaza_Func3(struct Task *task) +static bool8 Rayquaza_Init(struct Task *task) { u16 *tilemap, *tileset; u16 i; @@ -3201,9 +3396,9 @@ static bool8 Rayquaza_Func3(struct Task *task) CpuFill16(0, tilemap, BG_SCREEN_SIZE); CpuCopy16(sRayquaza_Tileset, tileset, 0x2000); - sTransitionData->field_20 = 0; + sTransitionData->counter = 0; task->tState++; - LoadPalette(sRayquaza_Palette + 0x50, 0xF0, 0x20); + LoadPalette(&sRayquaza_Palette[0x50], 0xF0, 0x20); for (i = 0; i < DISPLAY_HEIGHT; i++) { @@ -3215,7 +3410,7 @@ static bool8 Rayquaza_Func3(struct Task *task) return FALSE; } -static bool8 Rayquaza_Func4(struct Task *task) +static bool8 Rayquaza_SetGfx(struct Task *task) { u16 *tilemap, *tileset; @@ -3225,47 +3420,46 @@ static bool8 Rayquaza_Func4(struct Task *task) return FALSE; } -static bool8 Rayquaza_Func5(struct Task *task) +static bool8 Rayquaza_PaletteFlash(struct Task *task) { - if ((task->data[1] % 4) == 0) + if ((task->tTimer % 4) == 0) { - u16 value = task->data[1] / 4; + u16 value = task->tTimer / 4; const u16 *palPtr = &sRayquaza_Palette[(value + 5) * 16]; LoadPalette(palPtr, 0xF0, 0x20); } - if (++task->data[1] > 40) + if (++task->tTimer > 40) { task->tState++; - task->data[1] = 0; + task->tTimer = 0; } return FALSE; } -static bool8 Rayquaza_Func6(struct Task *task) +static bool8 Rayquaza_FadeToBlack(struct Task *task) { - if (++task->data[1] > 20) + if (++task->tTimer > 20) { task->tState++; - task->data[1] = 0; + task->tTimer = 0; BeginNormalPaletteFade(PALETTES_OBJECTS | (1 << 15), 2, 0, 16, RGB_BLACK); } return FALSE; } -static bool8 Rayquaza_Func7(struct Task *task) +static bool8 Rayquaza_WaitFade(struct Task *task) { if (!gPaletteFade.active) { - sTransitionData->field_20 = 1; + sTransitionData->counter = 1; task->tState++; } - return FALSE; } -static bool8 Rayquaza_Func8(struct Task *task) +static bool8 Rayquaza_SetBlack(struct Task *task) { BlendPalettes(PALETTES_BG & ~(1 << 15), 8, RGB_BLACK); BlendPalettes(PALETTES_OBJECTS | (1 << 15), 0, RGB_BLACK); @@ -3274,15 +3468,15 @@ static bool8 Rayquaza_Func8(struct Task *task) return FALSE; } -static bool8 Rayquaza_Func9(struct Task *task) +static bool8 Rayquaza_TriRing(struct Task *task) { - if ((task->data[1] % 3) == 0) + if ((task->tTimer % 3) == 0) { - u16 value = task->data[1] / 3; + u16 value = task->tTimer / 3; const u16 *palPtr = &sRayquaza_Palette[(value + 0) * 16]; LoadPalette(palPtr, 0xF0, 0x20); } - if (++task->data[1] >= 40) + if (++task->tTimer >= 40) { u16 i; @@ -3294,10 +3488,10 @@ static bool8 Rayquaza_Func9(struct Task *task) for (i = 0; i < DISPLAY_HEIGHT; i++) gScanlineEffectRegBuffers[1][i] = 0; - SetVBlankCallback(VBlankCB1_BigPokeball); + SetVBlankCallback(VBlankCB_CircularMask); task->tState++; - task->data[2] = 0x100; - task->tFuncState = 0; + task->tGrowSpeed = 1 << 8; + task->tFlag = FALSE; ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG0_ON); } @@ -3311,9 +3505,9 @@ static void VBlankCB_Rayquaza(void) DmaStop(0); VBlankCB_BattleTransition(); - if (sTransitionData->field_20 == 0) + if (sTransitionData->counter == 0) dmaSrc = gScanlineEffectRegBuffers[0]; - else if (sTransitionData->field_20 == 1) + else if (sTransitionData->counter == 1) dmaSrc = gScanlineEffectRegBuffers[1]; else dmaSrc = gScanlineEffectRegBuffers[0]; @@ -3321,12 +3515,28 @@ static void VBlankCB_Rayquaza(void) DmaSet(0, dmaSrc, ®_BG0VOFS, B_TRANS_DMA_FLAGS); } -static void Task_WhiteFade(u8 taskId) +#undef tTimer +#undef tGrowSpeed +#undef tFlag + +//------------------------------ +// B_TRANSITION_WHITE_BARS_FADE +//------------------------------ + +#define sFade data[0] +#define sFinished data[1] +#define sDestroyAttempts data[2] +#define sDelay data[5] +#define sIsMainSprite data[6] + +#define FADE_TARGET (16 << 8) + +static void Task_WhiteBarsFade(u8 taskId) { - while (sWhiteFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sWhiteBarsFade_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 WhiteFade_Init(struct Task *task) +static bool8 WhiteBarsFade_Init(struct Task *task) { u16 i; @@ -3346,37 +3556,40 @@ static bool8 WhiteFade_Init(struct Task *task) } EnableInterrupts(INTR_FLAG_HBLANK); - SetHBlankCallback(HBlankCB_WhiteFade); - SetVBlankCallback(VBlankCB0_WhiteFade); + SetHBlankCallback(HBlankCB_WhiteBarsFade); + SetVBlankCallback(VBlankCB_WhiteBarsFade); task->tState++; return FALSE; } -static bool8 WhiteFade_Func2(struct Task *task) +static bool8 WhiteBarsFade_StartBars(struct Task *task) { s16 i, posY; - s16 arr1[ARRAY_COUNT(sUnknown_085C8DA0)]; + s16 delays[ARRAY_COUNT(sWhiteBarsFade_StartDelays)]; struct Sprite *sprite; + memcpy(delays, sWhiteBarsFade_StartDelays, sizeof(sWhiteBarsFade_StartDelays)); - memcpy(arr1, sUnknown_085C8DA0, sizeof(sUnknown_085C8DA0)); - for (i = 0, posY = 0; i < 8; i++, posY += 20) + for (i = 0, posY = 0; i < NUM_WHITE_BARS; i++, posY += DISPLAY_HEIGHT / NUM_WHITE_BARS) { - sprite = &gSprites[CreateInvisibleSprite(sub_8149864)]; + sprite = &gSprites[CreateInvisibleSprite(SpriteCB_WhiteBarFade)]; sprite->x = DISPLAY_WIDTH; sprite->y = posY; - sprite->data[5] = arr1[i]; + sprite->sDelay = delays[i]; } - sprite->data[6]++; + + // Set on one sprite only. This one will enable the DMA + // copy in VBlank and wait for the others to destroy. + sprite->sIsMainSprite++; task->tState++; return FALSE; } -static bool8 WhiteFade_Func3(struct Task *task) +static bool8 WhiteBarsFade_WaitBars(struct Task *task) { sTransitionData->VBlank_DMA = 0; - if (sTransitionData->field_20 > 7) + if (sTransitionData->counter >= NUM_WHITE_BARS) { BlendPalettes(PALETTES_ALL, 16, RGB_WHITE); task->tState++; @@ -3384,7 +3597,7 @@ static bool8 WhiteFade_Func3(struct Task *task) return FALSE; } -static bool8 WhiteFade_Func4(struct Task *task) +static bool8 WhiteBarsFade_BlendToBlack(struct Task *task) { sTransitionData->VBlank_DMA = 0; @@ -3397,23 +3610,23 @@ static bool8 WhiteFade_Func4(struct Task *task) sTransitionData->BLDCNT = 0xFF; sTransitionData->WININ = WININ_WIN0_ALL; - SetVBlankCallback(VBlankCB1_WhiteFade); + SetVBlankCallback(VBlankCB_WhiteBarsFade_Blend); task->tState++; return FALSE; } -static bool8 WhiteFade_End(struct Task *task) +static bool8 WhiteBarsFade_End(struct Task *task) { if (++sTransitionData->BLDY > 16) { FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Task_WhiteFade)); + DestroyTask(FindTaskIdByFunc(Task_WhiteBarsFade)); } return FALSE; } -static void VBlankCB0_WhiteFade(void) +static void VBlankCB_WhiteBarsFade(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -3426,7 +3639,7 @@ static void VBlankCB0_WhiteFade(void) DmaSet(0, &gScanlineEffectRegBuffers[1][DISPLAY_HEIGHT], ®_WIN0H, B_TRANS_DMA_FLAGS); } -static void VBlankCB1_WhiteFade(void) +static void VBlankCB_WhiteBarsFade_Blend(void) { VBlankCB_BattleTransition(); REG_BLDY = sTransitionData->BLDY; @@ -3437,17 +3650,17 @@ static void VBlankCB1_WhiteFade(void) REG_WIN0V = sTransitionData->WIN0V; } -static void HBlankCB_WhiteFade(void) +static void HBlankCB_WhiteBarsFade(void) { REG_BLDY = gScanlineEffectRegBuffers[1][REG_VCOUNT]; } -static void sub_8149864(struct Sprite *sprite) +static void SpriteCB_WhiteBarFade(struct Sprite *sprite) { - if (sprite->data[5]) + if (sprite->sDelay) { - sprite->data[5]--; - if (sprite->data[6]) + sprite->sDelay--; + if (sprite->sIsMainSprite) sTransitionData->VBlank_DMA = 1; } else @@ -3455,36 +3668,51 @@ static void sub_8149864(struct Sprite *sprite) u16 i; u16* ptr1 = &gScanlineEffectRegBuffers[0][sprite->y]; u16* ptr2 = &gScanlineEffectRegBuffers[0][sprite->y + DISPLAY_HEIGHT]; - for (i = 0; i < 20; i++) + for (i = 0; i < DISPLAY_HEIGHT / NUM_WHITE_BARS; i++) { - ptr1[i] = sprite->data[0] >> 8; - ptr2[i] = (u8)(sprite->x); + ptr1[i] = sprite->sFade >> 8; + ptr2[i] = (u8)sprite->x; } - if (sprite->x == 0 && sprite->data[0] == 0x1000) - sprite->data[1] = 1; + if (sprite->x == 0 && sprite->sFade == FADE_TARGET) + sprite->sFinished = TRUE; sprite->x -= 16; - sprite->data[0] += 0x80; + sprite->sFade += FADE_TARGET / 32; if (sprite->x < 0) sprite->x = 0; - if (sprite->data[0] > 0x1000) - sprite->data[0] = 0x1000; + if (sprite->sFade > FADE_TARGET) + sprite->sFade = FADE_TARGET; - if (sprite->data[6]) + if (sprite->sIsMainSprite) sTransitionData->VBlank_DMA = 1; - if (sprite->data[1]) + if (sprite->sFinished) { - if (sprite->data[6] == 0 || (sTransitionData->field_20 > 6 && sprite->data[2]++ > 7)) + // If not the main sprite, destroy self. Otherwise, wait until the + // others have destroyed themselves, or until enough time has elapsed. + if (!sprite->sIsMainSprite || (sTransitionData->counter >= NUM_WHITE_BARS - 1 && sprite->sDestroyAttempts++ > 7)) { - sTransitionData->field_20++; + sTransitionData->counter++; DestroySprite(sprite); } } } } +#undef sFade +#undef sFinished +#undef sDestroyAttempts +#undef sDelay +#undef sIsMainSprite + +//--------------------------- +// B_TRANSITION_GRID_SQUARES +//--------------------------- + +#define tDelay data[1] +#define tShrinkStage data[2] + static void Task_GridSquares(u8 taskId) { while (sGridSquares_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -3496,37 +3724,37 @@ static bool8 GridSquares_Init(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); CpuSet(sShrinkingBoxTileset, tileset, 16); - CpuFill16(0xF000, tilemap, BG_SCREEN_SIZE); + CpuFill16(0xF0 << 8, tilemap, BG_SCREEN_SIZE); LoadPalette(sFieldEffectPal_Pokeball, 0xF0, sizeof(sFieldEffectPal_Pokeball)); task->tState++; return FALSE; } -static bool8 GridSquares_Func2(struct Task *task) +static bool8 GridSquares_Main(struct Task *task) { u16* tileset; - if (task->data[1] == 0) + if (task->tDelay == 0) { GetBg0TilemapDst(&tileset); - task->data[1] = 3; - task->data[2]++; - CpuSet(sShrinkingBoxTileset + (task->data[2] * 8), tileset, 16); - if (task->data[2] > 13) + task->tDelay = 3; + task->tShrinkStage++; + CpuSet(&sShrinkingBoxTileset[task->tShrinkStage * 8], tileset, 16); + if (task->tShrinkStage > 13) { task->tState++; - task->data[1] = 16; + task->tDelay = 16; } } - task->data[1]--; + task->tDelay--; return FALSE; } static bool8 GridSquares_End(struct Task *task) { - if (--task->data[1] == 0) + if (--task->tDelay == 0) { FadeScreenBlack(); DestroyTask(FindTaskIdByFunc(Task_GridSquares)); @@ -3534,12 +3762,23 @@ static bool8 GridSquares_End(struct Task *task) return FALSE; } -static void Task_Shards(u8 taskId) +#undef tDelay +#undef tShrinkStage + +//--------------------------- +// B_TRANSITION_ANGLED_WIPES +//--------------------------- + +#define tWipeId data[1] +#define tDir data[2] +#define tDelay data[3] + +static void Task_AngledWipes(u8 taskId) { - while (sShards_Funcs[gTasks[taskId].tState](&gTasks[taskId])); + while (sAngledWipes_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Shards_Init(struct Task *task) +static bool8 AngledWipes_Init(struct Task *task) { u16 i; @@ -3554,85 +3793,89 @@ static bool8 Shards_Init(struct Task *task) gScanlineEffectRegBuffers[0][i] = DISPLAY_WIDTH; CpuSet(gScanlineEffectRegBuffers[0], gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT); - SetVBlankCallback(VBlankCB_Shards); + SetVBlankCallback(VBlankCB_AngledWipes); task->tState++; return TRUE; } -static bool8 Shards_Func2(struct Task *task) +static bool8 AngledWipes_SetWipeData(struct Task *task) { - sub_814A1AC(sTransitionData->data, - sUnknown_085C8DD0[task->data[1]][0], - sUnknown_085C8DD0[task->data[1]][1], - sUnknown_085C8DD0[task->data[1]][2], - sUnknown_085C8DD0[task->data[1]][3], - 1, 1); - task->data[2] = sUnknown_085C8DD0[task->data[1]][4]; + InitBlackWipe(sTransitionData->data, + sAngledWipes_MoveData[task->tWipeId][0], + sAngledWipes_MoveData[task->tWipeId][1], + sAngledWipes_MoveData[task->tWipeId][2], + sAngledWipes_MoveData[task->tWipeId][3], + 1, 1); + task->tDir = sAngledWipes_MoveData[task->tWipeId][4]; task->tState++; return TRUE; } -static bool8 Shards_Func3(struct Task *task) +static bool8 AngledWipes_DoWipe(struct Task *task) { s16 i; - bool8 nextFunc; + bool8 finished; sTransitionData->VBlank_DMA = 0; - for (i = 0, nextFunc = FALSE; i < 16; i++) + for (i = 0, finished = FALSE; i < 16; i++) { - s16 r3 = gScanlineEffectRegBuffers[0][sTransitionData->data[3]] >> 8; - s16 r4 = gScanlineEffectRegBuffers[0][sTransitionData->data[3]] & 0xFF; - if (task->data[2] == 0) + s16 r3 = gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] >> 8; + s16 r4 = gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] & 0xFF; + if (task->tDir == 0) { - if (r3 < sTransitionData->data[2]) - r3 = sTransitionData->data[2]; + // Moving down + if (r3 < sTransitionData->tWipeCurrX) + r3 = sTransitionData->tWipeCurrX; if (r3 > r4) r3 = r4; } else { - if (r4 > sTransitionData->data[2]) - r4 = sTransitionData->data[2]; + // Moving up + if (r4 > sTransitionData->tWipeCurrX) + r4 = sTransitionData->tWipeCurrX; if (r4 <= r3) r4 = r3; } - gScanlineEffectRegBuffers[0][sTransitionData->data[3]] = (r4) | (r3 << 8); - if (nextFunc) + gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = (r4) | (r3 << 8); + if (finished) { task->tState++; break; } - else - nextFunc = sub_814A228(sTransitionData->data, 1, 1); + finished = UpdateBlackWipe(sTransitionData->data, TRUE, TRUE); } sTransitionData->VBlank_DMA++; return FALSE; } -static bool8 Shards_Func4(struct Task *task) +static bool8 AngledWipes_TryEnd(struct Task *task) { - if (++task->data[1] < 7) + if (++task->tWipeId < NUM_ANGLED_WIPES) { + // Continue with next wipe task->tState++; - task->data[3] = sUnknown_085C8E16[task->data[1] - 1]; + task->tDelay = sAngledWipes_EndDelays[task->tWipeId - 1]; return TRUE; } else { + // End transition DmaStop(0); FadeScreenBlack(); - DestroyTask(FindTaskIdByFunc(Task_Shards)); + DestroyTask(FindTaskIdByFunc(Task_AngledWipes)); return FALSE; } } -static bool8 Shards_Func5(struct Task *task) +static bool8 AngledWipes_StartNext(struct Task *task) { - if (--task->data[3] == 0) + if (--task->tDelay == 0) { + // Return to AngledWipes_SetWipeData task->tState = 1; return TRUE; } @@ -3640,7 +3883,7 @@ static bool8 Shards_Func5(struct Task *task) return FALSE; } -static void VBlankCB_Shards(void) +static void VBlankCB_AngledWipes(void) { DmaStop(0); VBlankCB_BattleTransition(); @@ -3653,20 +3896,31 @@ static void VBlankCB_Shards(void) DmaSet(0, gScanlineEffectRegBuffers[1], ®_WIN0H, B_TRANS_DMA_FLAGS); } -#undef tFuncState -#undef tOpponentSpriteId -#undef tPlayerSpriteId -#undef tMugshotId +#undef tWipeId +#undef tDir +#undef tDelay -static void CreateIntroTask(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4) +//----------------------------------- +// Transition intro +//----------------------------------- + +#define tFadeToGrayDelay data[1] +#define tFadeFromGrayDelay data[2] +#define tNumFades data[3] +#define tFadeToGrayIncrement data[4] +#define tFadeFromGrayIncrement data[5] +#define tDelayTimer data[6] +#define tBlend data[7] + +static void CreateIntroTask(s16 fadeToGrayDelay, s16 fadeFromGrayDelay, s16 numFades, s16 fadeToGrayIncrement, s16 fadeFromGrayIncrement) { u8 taskId = CreateTask(Task_BattleTransition_Intro, 3); - gTasks[taskId].data[1] = a0; - gTasks[taskId].data[2] = a1; - gTasks[taskId].data[3] = a2; - gTasks[taskId].data[4] = a3; - gTasks[taskId].data[5] = a4; - gTasks[taskId].data[6] = a0; + gTasks[taskId].tFadeToGrayDelay = fadeToGrayDelay; + gTasks[taskId].tFadeFromGrayDelay = fadeFromGrayDelay; + gTasks[taskId].tNumFades = numFades; + gTasks[taskId].tFadeToGrayIncrement = fadeToGrayIncrement; + gTasks[taskId].tFadeFromGrayIncrement = fadeFromGrayIncrement; + gTasks[taskId].tDelayTimer = fadeToGrayDelay; } static bool8 IsIntroTaskDone(void) @@ -3682,47 +3936,64 @@ void Task_BattleTransition_Intro(u8 taskId) while (sTransitionIntroFuncs[gTasks[taskId].tState](&gTasks[taskId])); } -static bool8 Transition_Intro_1(struct Task *task) +static bool8 TransitionIntro_FadeToGray(struct Task *task) { - if (task->data[6] == 0 || --task->data[6] == 0) + if (task->tDelayTimer == 0 || --task->tDelayTimer == 0) { - task->data[6] = task->data[1]; - task->data[7] += task->data[4]; - if (task->data[7] > 16) - task->data[7] = 16; - BlendPalettes(PALETTES_ALL, task->data[7], RGB(11, 11, 11)); + task->tDelayTimer = task->tFadeToGrayDelay; + task->tBlend += task->tFadeToGrayIncrement; + if (task->tBlend > 16) + task->tBlend = 16; + BlendPalettes(PALETTES_ALL, task->tBlend, RGB(11, 11, 11)); } - if (task->data[7] > 15) + if (task->tBlend >= 16) { + // Fade to gray complete, start fade back task->tState++; - task->data[6] = task->data[2]; + task->tDelayTimer = task->tFadeFromGrayDelay; } return FALSE; } -static bool8 Transition_Intro_2(struct Task *task) +static bool8 TransitionIntro_FadeFromGray(struct Task *task) { - if (task->data[6] == 0 || --task->data[6] == 0) + if (task->tDelayTimer == 0 || --task->tDelayTimer == 0) { - task->data[6] = task->data[2]; - task->data[7] -= task->data[5]; - if (task->data[7] < 0) - task->data[7] = 0; - BlendPalettes(PALETTES_ALL, task->data[7], RGB(11, 11, 11)); + task->tDelayTimer = task->tFadeFromGrayDelay; + task->tBlend -= task->tFadeFromGrayIncrement; + if (task->tBlend < 0) + task->tBlend = 0; + BlendPalettes(PALETTES_ALL, task->tBlend, RGB(11, 11, 11)); } - if (task->data[7] == 0) + if (task->tBlend == 0) { - if (--task->data[3] == 0) + if (--task->tNumFades == 0) + { + // All fades done, end intro DestroyTask(FindTaskIdByFunc(Task_BattleTransition_Intro)); + } else { - task->data[6] = task->data[1]; + // Fade from gray complete, start new fade + task->tDelayTimer = task->tFadeToGrayDelay; task->tState = 0; } } return FALSE; } +#undef tFadeToGrayDelay +#undef tFadeFromGrayDelay +#undef tNumFades +#undef tFadeToGrayIncrement +#undef tFadeFromGrayIncrement +#undef tDelayTimer +#undef tBlend + +//----------------------------------- +// General transition functions +//----------------------------------- + static void InitTransitionData(void) { memset(sTransitionData, 0, sizeof(*sTransitionData)); @@ -3740,7 +4011,7 @@ static void GetBg0TilemapDst(u16 **tileset) { u16 charBase = REG_BG0CNT >> 2; charBase <<= 14; - *tileset = (u16*)(VRAM + charBase); + *tileset = (u16*)(BG_VRAM + charBase); } void GetBg0TilesDst(u16 **tilemap, u16 **tileset) @@ -3751,8 +4022,8 @@ void GetBg0TilesDst(u16 **tilemap, u16 **tileset) screenBase <<= 11; charBase <<= 14; - *tilemap = (u16*)(VRAM + screenBase); - *tileset = (u16*)(VRAM + charBase); + *tilemap = (u16*)(BG_VRAM + screenBase); + *tileset = (u16*)(BG_VRAM + charBase); } static void FadeScreenBlack(void) @@ -3767,126 +4038,151 @@ static void SetSinWave(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, array[i] = sinAdd + Sin(index & 0xFF, amplitude); } -static void sub_814A014(u16 *array, s16 x, s16 y, s16 amplitude) +static void SetCircularMask(u16 *buffer, s16 centerX, s16 centerY, s16 radius) { s16 i; - memset(array, 10, DISPLAY_HEIGHT * sizeof(s16)); + memset(buffer, 10, DISPLAY_HEIGHT * sizeof(u16)); for (i = 0; i < 64; i++) { s16 sinResult, cosResult; - s16 toStoreOrr, r2, r3, toStore, r7, r8; + s16 drawXLeft, drawYBottNext, drawYTopNext, drawX, drawYTop, drawYBott; - sinResult = Sin(i, amplitude); - cosResult = Cos(i, amplitude); + sinResult = Sin(i, radius); + cosResult = Cos(i, radius); - toStoreOrr = x - sinResult; - toStore = x + sinResult; - r7 = y - cosResult; - r8 = y + cosResult; + drawXLeft = centerX - sinResult; + drawX = centerX + sinResult; + drawYTop = centerY - cosResult; + drawYBott = centerY + cosResult; - if (toStoreOrr < 0) - toStoreOrr = 0; - if (toStore > DISPLAY_WIDTH) - toStore = DISPLAY_WIDTH; - if (r7 < 0) - r7 = 0; - if (r8 > DISPLAY_HEIGHT - 1) - r8 = DISPLAY_HEIGHT - 1; + if (drawXLeft < 0) + drawXLeft = 0; + if (drawX > DISPLAY_WIDTH) + drawX = DISPLAY_WIDTH; + if (drawYTop < 0) + drawYTop = 0; + if (drawYBott > DISPLAY_HEIGHT - 1) + drawYBott = DISPLAY_HEIGHT - 1; - toStore |= (toStoreOrr << 8); - array[r7] = toStore; - array[r8] = toStore; + drawX |= (drawXLeft << 8); + buffer[drawYTop] = drawX; + buffer[drawYBott] = drawX; - cosResult = Cos(i + 1, amplitude); - r3 = y - cosResult; - r2 = y + cosResult; + cosResult = Cos(i + 1, radius); + drawYTopNext = centerY - cosResult; + drawYBottNext = centerY + cosResult; - if (r3 < 0) - r3 = 0; - if (r2 > DISPLAY_HEIGHT - 1) - r2 = DISPLAY_HEIGHT - 1; + if (drawYTopNext < 0) + drawYTopNext = 0; + if (drawYBottNext > DISPLAY_HEIGHT - 1) + drawYBottNext = DISPLAY_HEIGHT - 1; - while (r7 > r3) - array[--r7] = toStore; - while (r7 < r3) - array[++r7] = toStore; + while (drawYTop > drawYTopNext) + buffer[--drawYTop] = drawX; + while (drawYTop < drawYTopNext) + buffer[++drawYTop] = drawX; - while (r8 > r2) - array[--r8] = toStore; - while (r8 < r2) - array[++r8] = toStore; + while (drawYBott > drawYBottNext) + buffer[--drawYBott] = drawX; + while (drawYBott < drawYBottNext) + buffer[++drawYBott] = drawX; } } -static void sub_814A1AC(s16 *data, s16 a1, s16 a2, s16 a3, s16 a4, s16 a5, s16 a6) +static void InitBlackWipe(s16 *data, s16 startX, s16 startY, s16 endX, s16 endY, s16 xMove, s16 yMove) { - data[0] = a1; - data[1] = a2; - data[2] = a1; - data[3] = a2; - data[4] = a3; - data[5] = a4; - data[6] = a5; - data[7] = a6; - data[8] = a3 - a1; - if (data[8] < 0) + tWipeStartX = startX; + tWipeStartY = startY; + tWipeCurrX = startX; + tWipeCurrY = startY; + tWipeEndX = endX; + tWipeEndY = endY; + tWipeXMove = xMove; + tWipeYMove = yMove; + tWipeXDist = endX - startX; + if (tWipeXDist < 0) { - data[8] = -data[8]; - data[6] = -a5; + // If end was less than start, reverse direction + tWipeXDist = -tWipeXDist; + tWipeXMove = -xMove; } - data[9] = a4 - a2; - if (data[9] < 0) + tWipeYDist = endY - startY; + if (tWipeYDist < 0) { - data[9] = -data[9]; - data[7] = -a6; + // If end was less than start, reverse direction + tWipeYDist = -tWipeYDist; + tWipeYMove = -yMove; } - data[10] = 0; + tWipeTemp = 0; } -static bool8 sub_814A228(s16 *data, bool8 a1, bool8 a2) +static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact) { - u8 var; - if (data[8] > data[9]) + u8 numFinished; + + if (tWipeXDist > tWipeYDist) { - data[2] += data[6]; - data[10] += data[9]; - if (data[10] > data[8]) + // X has further to move, move it first + tWipeCurrX += tWipeXMove; + + // If it has been far enough since Y's + // last move then move it too + tWipeTemp += tWipeYDist; + if (tWipeTemp > tWipeXDist) { - data[3] += data[7]; - data[10] -= data[8]; + tWipeCurrY += tWipeYMove; + tWipeTemp -= tWipeXDist; } } else { - data[3] += data[7]; - data[10] += data[8]; - if (data[10] > data[9]) + // Y has further to move, move it first + tWipeCurrY += tWipeYMove; + + // If it has been far enough since X's + // last move then move it too + tWipeTemp += tWipeXDist; + if (tWipeTemp > tWipeYDist) { - data[2] += data[6]; - data[10] -= data[9]; + tWipeCurrX += tWipeXMove; + tWipeTemp -= tWipeYDist; } } - var = 0; - if ((data[6] > 0 && data[2] >= data[4]) || (data[6] < 0 && data[2] <= data[4])) + + numFinished = 0; + + // Has X coord reached end? + if ((tWipeXMove > 0 && tWipeCurrX >= tWipeEndX) + || (tWipeXMove < 0 && tWipeCurrX <= tWipeEndX)) { - var++; - if (a1) - data[2] = data[4]; - } - if ((data[7] > 0 && data[3] >= data[5]) || (data[7] < 0 && data[3] <= data[5])) - { - var++; - if (a2) - data[3] = data[5]; + numFinished++; + if (xExact) + tWipeCurrX = tWipeEndX; } - if (var == 2) + // Has Y coord reached end? + if ((tWipeYMove > 0 && tWipeCurrY >= tWipeEndY) + || (tWipeYMove < 0 && tWipeCurrY <= tWipeEndY)) + { + numFinished++; + if (yExact) + tWipeCurrY = tWipeEndY; + } + + // Return TRUE if both coords have reached end + if (numFinished == 2) return TRUE; else return FALSE; } +//----------------------------------- +// B_TRANSITION_FRONTIER_LOGO_WIGGLE +//----------------------------------- + +#define tAmplitude data[5] + static bool8 FrontierLogoWiggle_Init(struct Task *task) { u16 *tilemap, *tileset; @@ -3907,7 +4203,7 @@ static bool8 FrontierLogoWiggle_SetGfx(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); LZ77UnCompVram(sFrontierLogo_Tilemap, tilemap); - SetSinWave(gScanlineEffectRegBuffers[0], 0, task->data[4], 0x84, task->data[5], DISPLAY_HEIGHT); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->data[4], 0x84, task->tAmplitude, DISPLAY_HEIGHT); task->tState++; return TRUE; @@ -3918,6 +4214,20 @@ static void Task_FrontierLogoWiggle(u8 taskId) while (sFrontierLogoWiggle_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } +#undef tAmplitude + +//--------------------------------- +// B_TRANSITION_FRONTIER_LOGO_WAVE +//--------------------------------- + +#define tSinVal data[1] +#define tAmplitudeVal data[2] +#define tTimer data[3] +#define tStartedFade data[4] +#define tBlendTarget2 data[5] +#define tBlendTarget1 data[6] +#define tSinDecrement data[7] + static void Task_FrontierLogoWave(u8 taskId) { while (sFrontierLogoWave_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -3930,13 +4240,13 @@ static bool8 FrontierLogoWave_Init(struct Task *task) InitTransitionData(); ScanlineEffect_Clear(); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON); - task->data[2] = 0x2000; - task->data[1] = 0x7FFF; - task->data[5] = 0; - task->data[6] = 16; - task->data[7] = 2560; + task->tAmplitudeVal = 32 << 8; + task->tSinVal = 0x7FFF; + task->tBlendTarget2 = 0; + task->tBlendTarget1 = 16; + task->tSinDecrement = 2560; sTransitionData->BLDCNT = BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL; - sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->data[5], task->data[6]); + sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->tBlendTarget2, task->tBlendTarget1); REG_BLDCNT = sTransitionData->BLDCNT; REG_BLDALPHA = sTransitionData->BLDALPHA; GetBg0TilesDst(&tilemap, &tileset); @@ -3978,50 +4288,54 @@ static bool8 FrontierLogoWave_Func3(struct Task *task) static bool8 FrontierLogoWave_Func4(struct Task *task) { u8 i; - u16 var6, amplitude, var8; + u16 sinVal, amplitude, sinSpread; sTransitionData->VBlank_DMA = FALSE; - amplitude = task->data[2] >> 8; - var6 = task->data[1]; - var8 = 384; + amplitude = task->tAmplitudeVal >> 8; + sinVal = task->tSinVal; + sinSpread = 384; - task->data[1] = var6 - task->data[7]; + task->tSinVal -= task->tSinDecrement; - if (task->data[3] >= 70) + if (task->tTimer >= 70) { - if (task->data[2] - 384 >= 0) - task->data[2] -= 384; + // Decrease amount logo moves up and down + // until it rests in the middle of the screen. + if (task->tAmplitudeVal - 384 >= 0) + task->tAmplitudeVal -= 384; else - task->data[2] = 0; + task->tAmplitudeVal = 0; } - if (task->data[3] >= 0 && task->data[3] % 3 == 0) + if (task->tTimer >= 0 && task->tTimer % 3 == 0) { - if (task->data[5] < 16) - task->data[5]++; - else if (task->data[6] > 0) - task->data[6]--; + // Blend logo into view + if (task->tBlendTarget2 < 16) + task->tBlendTarget2++; + else if (task->tBlendTarget1 > 0) + task->tBlendTarget1--; - sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->data[5], task->data[6]); + sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->tBlendTarget2, task->tBlendTarget1); } - for (i = 0; i < DISPLAY_HEIGHT; i++, var6 += var8) + // Move logo up and down + for (i = 0; i < DISPLAY_HEIGHT; i++, sinVal += sinSpread) { - s16 index = var6 / 256; + s16 index = sinVal / 256; gScanlineEffectRegBuffers[0][i] = sTransitionData->cameraY + Sin(index & 0xff, amplitude); } - if (++task->data[3] == 101) + if (++task->tTimer == 101) { - task->data[4]++; + task->tStartedFade++; BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); } - if (task->data[4] != 0 && !gPaletteFade.active) + if (task->tStartedFade && !gPaletteFade.active) DestroyTask(FindTaskIdByFunc(Task_FrontierLogoWave)); - task->data[7] -= 17; + task->tSinDecrement -= 17; sTransitionData->VBlank_DMA++; return FALSE; } @@ -4042,6 +4356,30 @@ static void HBlankCB_FrontierLogoWave(void) REG_BG0VOFS = var; } +#undef tSinVal +#undef tAmplitudeVal +#undef tTimer +#undef tStartedFade +#undef tBlendTarget2 +#undef tBlendTarget1 +#undef tSinDecrement + +//---------------------------------------------------------------------- +// B_TRANSITION_FRONTIER_SQUARES, B_TRANSITION_FRONTIER_SQUARES_SCROLL, +// and B_TRANSITION_FRONTIER_SQUARES_SPIRAL +//---------------------------------------------------------------------- + +#define NUM_SQUARES_PER_ROW 7 +#define NUM_SQUARES_PER_COL 5 +#define SQUARE_SIZE 4 + +#define tPosX data[2] +#define tPosY data[3] +#define tRowPos data[4] +#define tShrinkState data[5] +#define tShrinkDelayTimer data[6] +#define tShrinkDelay data[7] + static void Task_FrontierSquares(u8 taskId) { while (sFrontierSquares_Funcs[gTasks[taskId].tState](&gTasks[taskId])); @@ -4070,42 +4408,46 @@ static bool8 FrontierSquares_Init(struct Task *task) CopyBgTilemapBufferToVram(0); LoadPalette(sFrontierSquares_Palette, 0xF0, sizeof(sFrontierSquares_Palette)); - task->data[2] = 1; - task->data[3] = 0; - task->data[4] = 0; - task->data[7] = 10; + task->tPosX = 1; + task->tPosY = 0; + task->tRowPos = 0; + task->tShrinkDelay = 10; task->tState++; return FALSE; } -static bool8 FrontierSquares_Func2(struct Task *task) +static bool8 FrontierSquares_Draw(struct Task *task) { - CopyRectToBgTilemapBufferRect(0, sFrontierSquares_Tilemap, 0, 0, 4, 4, task->data[2], task->data[3], 4, 4, 0xF, 0, 0); + CopyRectToBgTilemapBufferRect(0, sFrontierSquares_Tilemap, 0, 0, + SQUARE_SIZE, SQUARE_SIZE, + task->tPosX, task->tPosY, + SQUARE_SIZE, SQUARE_SIZE, + 15, 0, 0); CopyBgTilemapBufferToVram(0); - task->data[2] += 4; - if (++task->data[4] == 7) + task->tPosX += SQUARE_SIZE; + if (++task->tRowPos == NUM_SQUARES_PER_ROW) { - task->data[2] = 1; - task->data[3] += 4; - task->data[4] = 0; - if (task->data[3] > 19) + task->tPosX = 1; + task->tPosY += SQUARE_SIZE; + task->tRowPos = 0; + if (task->tPosY >= NUM_SQUARES_PER_COL * SQUARE_SIZE) task->tState++; } return FALSE; } -static bool8 FrontierSquares_Func3(struct Task *task) +static bool8 FrontierSquares_Shrink(struct Task *task) { u8 i; u16 *tilemap, *tileset; GetBg0TilesDst(&tilemap, &tileset); - if (task->data[6]++ >= task->data[7]) + if (task->tShrinkDelayTimer++ >= task->tShrinkDelay) { - switch (task->data[5]) + switch (task->tShrinkState) { case 0: for (i = 250; i < 255; i++) @@ -4131,13 +4473,20 @@ static bool8 FrontierSquares_Func3(struct Task *task) return FALSE; } - task->data[6] = 0; - task->data[5]++; + task->tShrinkDelayTimer = 0; + task->tShrinkState++; } return FALSE; } +#undef tPosX +#undef tPosY +#undef tRowPos +#undef tShrinkState +#undef tShrinkDelayTimer +#undef tShrinkDelay + static bool8 FrontierSquaresSpiral_Init(struct Task *task) { u16 *tilemap, *tileset; From 901cd476b65b9212032f21b4ff19f6e77154af4a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 29 Oct 2021 11:51:47 -0400 Subject: [PATCH 105/417] Fix incorrect arguments on CopyRectToBgTilemapBufferRect --- gflib/bg.c | 18 +++++++++--------- gflib/bg.h | 2 +- src/party_menu.c | 13 ++++++------- src/pokemon_storage_system.c | 8 ++++---- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/gflib/bg.c b/gflib/bg.c index fd72f2d240..c3a4be1d46 100644 --- a/gflib/bg.c +++ b/gflib/bg.c @@ -950,7 +950,7 @@ void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, const void *src, u8 destX, u CopyRectToBgTilemapBufferRect(bg, src, 0, 0, rectWidth, rectHeight, destX, destY, rectWidth, rectHeight, palette, 0, 0); } -void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 unused, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, s16 palette1, s16 tileOffset) +void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, s16 tileOffset, s16 palette2) { u16 screenWidth, screenHeight, screenSize; u16 var; @@ -966,28 +966,28 @@ void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 { case BG_TYPE_NORMAL: srcPtr = src + ((srcY * srcWidth) + srcX) * 2; - for (i = destX; i < (destX + rectWidth); i++) + for (i = destY; i < (destY + rectHeight); i++) { - for (j = srcHeight; j < (srcHeight + destY); j++) + for (j = destX; j < (destX + rectWidth); j++) { u16 index = GetTileMapIndexFromCoords(j, i, screenSize, screenWidth, screenHeight); - CopyTileMapEntry(srcPtr, sGpuBgConfigs2[bg].tilemap + (index * 2), rectHeight, palette1, tileOffset); + CopyTileMapEntry(srcPtr, sGpuBgConfigs2[bg].tilemap + (index * 2), palette1, tileOffset, palette2); srcPtr += 2; } - srcPtr += (srcWidth - destY) * 2; + srcPtr += (srcWidth - rectWidth) * 2; } break; case BG_TYPE_AFFINE: srcPtr = src + ((srcY * srcWidth) + srcX); var = GetBgMetricAffineMode(bg, 0x1); - for (i = destX; i < (destX + rectWidth); i++) + for (i = destY; i < (destY + rectHeight); i++) { - for (j = srcHeight; j < (srcHeight + destY); j++) + for (j = destX; j < (destX + rectWidth); j++) { - *(u8*)(sGpuBgConfigs2[bg].tilemap + ((var * i) + j)) = *(u8*)(srcPtr) + palette1; + *(u8*)(sGpuBgConfigs2[bg].tilemap + ((var * i) + j)) = *(u8*)(srcPtr) + tileOffset; srcPtr++; } - srcPtr += (srcWidth - destY); + srcPtr += (srcWidth - rectWidth); } break; } diff --git a/gflib/bg.h b/gflib/bg.h index 9335875b59..b5d18d6d03 100644 --- a/gflib/bg.h +++ b/gflib/bg.h @@ -72,7 +72,7 @@ void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset); void CopyBgTilemapBufferToVram(u8 bg); void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height); void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, const void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette); -void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 unused, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, s16 palette1, s16 tileOffset); +void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, s16 tileOffset, s16 palette2); void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height); void FillBgTilemapBufferRect(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height, u8 palette); void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 width, u8 height, u8 paletteSlot, s16 tileNumDelta); diff --git a/src/party_menu.c b/src/party_menu.c index 9829d62e9a..5ef8699fa9 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2792,7 +2792,7 @@ static void SwitchSelectedMons(u8 taskId) // returns FALSE if the slot has slid fully offscreen / back onscreen static bool8 TryMovePartySlot(s16 x, s16 width, u8 *leftMove, u8 *newX, u8 *newWidth) { - if ((x + width) < 0) + if (x + width < 0) return FALSE; if (x > 31) return FALSE; @@ -2807,7 +2807,7 @@ static bool8 TryMovePartySlot(s16 x, s16 width, u8 *leftMove, u8 *newX, u8 *newW { *leftMove = 0; *newX = x; - if ((x + width) > 31) + if (x + width > 31) *newWidth = 32 - x; else *newWidth = width; @@ -2818,14 +2818,13 @@ static bool8 TryMovePartySlot(s16 x, s16 width, u8 *leftMove, u8 *newX, u8 *newW static void MoveAndBufferPartySlot(const void *rectSrc, s16 x, s16 y, s16 width, s16 height, s16 dir) { - // The use of the dimension parameters here is a mess - u8 leftMove, newX, newWidth; // leftMove is used as a srcX, newX is used as both x and srcHeight, newWidth is used as both width and destY + u8 srcX, newX, newWidth; - if (TryMovePartySlot(x, width, &leftMove, &newX, &newWidth)) + if (TryMovePartySlot(x, width, &srcX, &newX, &newWidth)) { FillBgTilemapBufferRect_Palette0(0, 0, newX, y, newWidth, height); - if (TryMovePartySlot(x + dir, width, &leftMove, &newX, &newWidth)) - CopyRectToBgTilemapBufferRect(0, rectSrc, leftMove, 0, width, height, newX, y, newWidth, height, 17, 0, 0); + if (TryMovePartySlot(x + dir, width, &srcX, &newX, &newWidth)) + CopyRectToBgTilemapBufferRect(0, rectSrc, srcX, 0, width, height, newX, y, newWidth, height, 17, 0, 0); } } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index e18a6db76b..36d54123cd 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -5437,16 +5437,16 @@ static bool32 WaitForWallpaperGfxLoad(void) static void DrawWallpaper(const void *tilemap, s8 direction, u8 offset) { - s16 var = offset * 256; - s16 var2 = (offset * 2) + 3; + s16 tileOffset = offset * 256; + s16 paletteNum = (offset * 2) + 3; s16 x = ((sStorage->bg2_X / 8 + 10) + (direction * 24)) & 0x3F; - CopyRectToBgTilemapBufferRect(2, tilemap, 0, 0, 0x14, 0x12, x, 2, 0x14, 0x12, 0x11, var, var2); + CopyRectToBgTilemapBufferRect(2, tilemap, 0, 0, 20, 18, x, 2, 20, 18, 17, tileOffset, paletteNum); if (direction == 0) return; if (direction > 0) - x += 0x14; + x += 20; else x -= 4; From 9a1764f83e579e473eaa4885a4dea8d3ec744a63 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Sat, 30 Oct 2021 01:37:49 +0800 Subject: [PATCH 106/417] Label some animation index numbers --- include/constants/event_object_movement.h | 73 +++ src/cable_car.c | 13 +- src/data/object_events/object_event_anims.h | 466 ++++++++++---------- src/event_object_movement.c | 276 ++++++------ src/field_effect.c | 4 +- src/field_player_avatar.c | 2 +- 6 files changed, 452 insertions(+), 382 deletions(-) diff --git a/include/constants/event_object_movement.h b/include/constants/event_object_movement.h index 13e91c4157..4ffb869e4f 100755 --- a/include/constants/event_object_movement.h +++ b/include/constants/event_object_movement.h @@ -245,4 +245,77 @@ #define MOVEMENT_ACTION_STEP_END 0xFE #define MOVEMENT_ACTION_NONE 0xFF +#define ANIM_STD_FACE_SOUTH 0 +#define ANIM_STD_FACE_NORTH 1 +#define ANIM_STD_FACE_WEST 2 +#define ANIM_STD_FACE_EAST 3 +#define ANIM_STD_GO_SOUTH 4 +#define ANIM_STD_GO_NORTH 5 +#define ANIM_STD_GO_WEST 6 +#define ANIM_STD_GO_EAST 7 +#define ANIM_STD_GO_FAST_SOUTH 8 +#define ANIM_STD_GO_FAST_NORTH 9 +#define ANIM_STD_GO_FAST_WEST 10 +#define ANIM_STD_GO_FAST_EAST 11 +#define ANIM_STD_GO_FASTER_SOUTH 12 +#define ANIM_STD_GO_FASTER_NORTH 13 +#define ANIM_STD_GO_FASTER_WEST 14 +#define ANIM_STD_GO_FASTER_EAST 15 +#define ANIM_STD_GO_FASTEST_SOUTH 16 +#define ANIM_STD_GO_FASTEST_NORTH 17 +#define ANIM_STD_GO_FASTEST_WEST 18 +#define ANIM_STD_GO_FASTEST_EAST 19 +#define ANIM_STD_COUNT 20 + +#define ANIM_RUN_SOUTH (ANIM_STD_COUNT + 0) +#define ANIM_RUN_NORTH (ANIM_STD_COUNT + 1) +#define ANIM_RUN_WEST (ANIM_STD_COUNT + 2) +#define ANIM_RUN_EAST (ANIM_STD_COUNT + 3) + +#define ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH (ANIM_STD_COUNT + 0) +#define ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH (ANIM_STD_COUNT + 1) +#define ANIM_BUNNY_HOPPY_BACK_WHEEL_WEST (ANIM_STD_COUNT + 2) +#define ANIM_BUNNY_HOPPY_BACK_WHEEL_EAST (ANIM_STD_COUNT + 3) +#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH (ANIM_STD_COUNT + 4) +#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH (ANIM_STD_COUNT + 5) +#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_WEST (ANIM_STD_COUNT + 6) +#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_EAST (ANIM_STD_COUNT + 7) +#define ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH (ANIM_STD_COUNT + 8) +#define ANIM_STANDING_WHEELIE_BACK_WHEEL_NORTH (ANIM_STD_COUNT + 9) +#define ANIM_STANDING_WHEELIE_BACK_WHEEL_WEST (ANIM_STD_COUNT + 10) +#define ANIM_STANDING_WHEELIE_BACK_WHEEL_EAST (ANIM_STD_COUNT + 11) +#define ANIM_STANDING_WHEELIE_FRONT_WHEEL_SOUTH (ANIM_STD_COUNT + 12) +#define ANIM_STANDING_WHEELIE_FRONT_WHEEL_NORTH (ANIM_STD_COUNT + 13) +#define ANIM_STANDING_WHEELIE_FRONT_WHEEL_WEST (ANIM_STD_COUNT + 14) +#define ANIM_STANDING_WHEELIE_FRONT_WHEEL_EAST (ANIM_STD_COUNT + 15) +#define ANIM_MOVING_WHEELIE_SOUTH (ANIM_STD_COUNT + 16) +#define ANIM_MOVING_WHEELIE_NORTH (ANIM_STD_COUNT + 17) +#define ANIM_MOVING_WHEELIE_WEST (ANIM_STD_COUNT + 18) +#define ANIM_MOVING_WHEELIE_EAST (ANIM_STD_COUNT + 19) + +#define ANIM_GET_ON_OFF_POKEMON_SOUTH (ANIM_STD_COUNT + 0) +#define ANIM_GET_ON_OFF_POKEMON_NORTH (ANIM_STD_COUNT + 1) +#define ANIM_GET_ON_OFF_POKEMON_WEST (ANIM_STD_COUNT + 2) +#define ANIM_GET_ON_OFF_POKEMON_EAST (ANIM_STD_COUNT + 3) + +#define ANIM_NURSE_BOW (ANIM_STD_COUNT + 0) + +#define ANIM_FIELD_MOVE 0 + +#define ANIM_STAY_STILL 0 +#define ANIM_REMOVE_OBSTACLE 1 + +#define ANIM_TAKE_OUT_ROD_SOUTH 0 +#define ANIM_TAKE_OUT_ROD_NORTH 1 +#define ANIM_TAKE_OUT_ROD_WEST 2 +#define ANIM_TAKE_OUT_ROD_EAST 3 +#define ANIM_PUT_AWAY_ROD_SOUTH 4 +#define ANIM_PUT_AWAY_ROD_NORTH 5 +#define ANIM_PUT_AWAY_ROD_WEST 6 +#define ANIM_PUT_AWAY_ROD_EAST 7 +#define ANIM_HOOKED_POKEMON_SOUTH 8 +#define ANIM_HOOKED_POKEMON_NORTH 9 +#define ANIM_HOOKED_POKEMON_WEST 10 +#define ANIM_HOOKED_POKEMON_EAST 11 + #endif // GUARD_CONSTANTS_EVENT_OBJECT_MOVEMENT_H diff --git a/src/cable_car.c b/src/cable_car.c index 39154cd1d8..c3e6564f8d 100644 --- a/src/cable_car.c +++ b/src/cable_car.c @@ -17,6 +17,7 @@ #include "sound.h" #include "sprite.h" #include "task.h" +#include "constants/event_object_movement.h" #include "constants/event_objects.h" #include "constants/rgb.h" #include "constants/songs.h" @@ -902,15 +903,13 @@ static void CreateCableCarSprites(void) { if (rval % 2) { - // Do walking west anim - StartSpriteAnim(&gSprites[spriteId], 6); + StartSpriteAnim(&gSprites[spriteId], ANIM_STD_GO_WEST); gSprites[spriteId].sSameDir = TRUE; gSprites[spriteId].y += 2; } else { - // Do walking east anim - StartSpriteAnim(&gSprites[spriteId], 7); + StartSpriteAnim(&gSprites[spriteId], ANIM_STD_GO_EAST); gSprites[spriteId].sSameDir = FALSE; } } @@ -918,15 +917,13 @@ static void CreateCableCarSprites(void) { if (rval % 2) { - // Do walking east anim - StartSpriteAnim(&gSprites[spriteId], 7); + StartSpriteAnim(&gSprites[spriteId], ANIM_STD_GO_EAST); gSprites[spriteId].sSameDir = TRUE; gSprites[spriteId].y += 2; } else { - // Do walking west anim - StartSpriteAnim(&gSprites[spriteId], 6); + StartSpriteAnim(&gSprites[spriteId], ANIM_STD_GO_WEST); gSprites[spriteId].sSameDir = FALSE; } } diff --git a/src/data/object_events/object_event_anims.h b/src/data/object_events/object_event_anims.h index a66d634b07..a5fb414628 100755 --- a/src/data/object_events/object_event_anims.h +++ b/src/data/object_events/object_event_anims.h @@ -796,99 +796,100 @@ static const union AnimCmd sAnim_HoOhStayStill[] = }; static const union AnimCmd *const sAnimTable_Inanimate[] = { - sAnim_StayStill, + [ANIM_STAY_STILL] = sAnim_StayStill, }; static const union AnimCmd *const sAnimTable_QuintyPlump[] = { - sAnim_QuintyPlumpFaceSouth, - sAnim_QuintyPlumpFaceNorth, - sAnim_QuintyPlumpFaceWest, - sAnim_QuintyPlumpFaceEast, - sAnim_QuintyPlumpGoSouth, - sAnim_QuintyPlumpGoNorth, - sAnim_QuintyPlumpGoWest, - sAnim_QuintyPlumpGoEast, - sAnim_QuintyPlumpGoFastSouth, - sAnim_QuintyPlumpGoFastNorth, - sAnim_QuintyPlumpGoFastWest, - sAnim_QuintyPlumpGoFastEast, - sAnim_QuintyPlumpGoFasterSouth, - sAnim_QuintyPlumpGoFasterNorth, - sAnim_QuintyPlumpGoFasterWest, - sAnim_QuintyPlumpGoFasterEast, - sAnim_QuintyPlumpGoFastestSouth, - sAnim_QuintyPlumpGoFastestNorth, - sAnim_QuintyPlumpGoFastestWest, - sAnim_QuintyPlumpGoFastestEast, + [ANIM_STD_FACE_SOUTH] = sAnim_QuintyPlumpFaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_QuintyPlumpFaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_QuintyPlumpFaceWest, + [ANIM_STD_FACE_EAST] = sAnim_QuintyPlumpFaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_QuintyPlumpGoSouth, + [ANIM_STD_GO_NORTH] = sAnim_QuintyPlumpGoNorth, + [ANIM_STD_GO_WEST] = sAnim_QuintyPlumpGoWest, + [ANIM_STD_GO_EAST] = sAnim_QuintyPlumpGoEast, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_QuintyPlumpGoFastSouth, + [ANIM_STD_GO_FAST_NORTH] = sAnim_QuintyPlumpGoFastNorth, + [ANIM_STD_GO_FAST_WEST] = sAnim_QuintyPlumpGoFastWest, + [ANIM_STD_GO_FAST_EAST] = sAnim_QuintyPlumpGoFastEast, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_QuintyPlumpGoFasterSouth, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_QuintyPlumpGoFasterNorth, + [ANIM_STD_GO_FASTER_WEST] = sAnim_QuintyPlumpGoFasterWest, + [ANIM_STD_GO_FASTER_EAST] = sAnim_QuintyPlumpGoFasterEast, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_QuintyPlumpGoFastestSouth, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_QuintyPlumpGoFastestNorth, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_QuintyPlumpGoFastestWest, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_QuintyPlumpGoFastestEast, }; static const union AnimCmd *const sAnimTable_Standard[] = { - sAnim_FaceSouth, - sAnim_FaceNorth, - sAnim_FaceWest, - sAnim_FaceEast, - sAnim_GoSouth, - sAnim_GoNorth, - sAnim_GoWest, - sAnim_GoEast, - sAnim_GoFastSouth, - sAnim_GoFastNorth, - sAnim_GoFastWest, - sAnim_GoFastEast, - sAnim_GoFasterSouth, - sAnim_GoFasterNorth, - sAnim_GoFasterWest, - sAnim_GoFasterEast, - sAnim_GoFastestSouth, - sAnim_GoFastestNorth, - sAnim_GoFastestWest, - sAnim_GoFastestEast, + [ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_FaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_FaceWest, + [ANIM_STD_FACE_EAST] = sAnim_FaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_GoSouth, + [ANIM_STD_GO_NORTH] = sAnim_GoNorth, + [ANIM_STD_GO_WEST] = sAnim_GoWest, + [ANIM_STD_GO_EAST] = sAnim_GoEast, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_GoFastSouth, + [ANIM_STD_GO_FAST_NORTH] = sAnim_GoFastNorth, + [ANIM_STD_GO_FAST_WEST] = sAnim_GoFastWest, + [ANIM_STD_GO_FAST_EAST] = sAnim_GoFastEast, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_GoFasterSouth, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_GoFasterNorth, + [ANIM_STD_GO_FASTER_WEST] = sAnim_GoFasterWest, + [ANIM_STD_GO_FASTER_EAST] = sAnim_GoFasterEast, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_GoFastestSouth, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestNorth, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast, }; static const union AnimCmd *const sAnimTable_HoOh[] = { - sAnim_FaceSouth, - sAnim_FaceNorth, - sAnim_FaceWest, - sAnim_FaceEast, - sAnim_HoOhFlapWings, - sAnim_HoOhStayStill, - sAnim_GoWest, - sAnim_GoEast, - sAnim_GoFastSouth, - sAnim_GoFastNorth, - sAnim_GoFastWest, - sAnim_GoFastEast, - sAnim_GoFasterSouth, - sAnim_GoFasterNorth, - sAnim_GoFasterWest, - sAnim_GoFasterEast, - sAnim_GoFastestSouth, - sAnim_GoFastestNorth, - sAnim_GoFastestWest, - sAnim_GoFastestEast, + [ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_FaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_FaceWest, + [ANIM_STD_FACE_EAST] = sAnim_FaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_HoOhFlapWings, + [ANIM_STD_GO_NORTH] = sAnim_HoOhStayStill, + [ANIM_STD_GO_WEST] = sAnim_GoWest, + [ANIM_STD_GO_EAST] = sAnim_GoEast, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_GoFastSouth, + [ANIM_STD_GO_FAST_NORTH] = sAnim_GoFastNorth, + [ANIM_STD_GO_FAST_WEST] = sAnim_GoFastWest, + [ANIM_STD_GO_FAST_EAST] = sAnim_GoFastEast, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_GoFasterSouth, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_GoFasterNorth, + [ANIM_STD_GO_FASTER_WEST] = sAnim_GoFasterWest, + [ANIM_STD_GO_FASTER_EAST] = sAnim_GoFasterEast, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_GoFastestSouth, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestNorth, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast, }; +// The movements for going up use the animations for going right instead. static const union AnimCmd *const sAnimTable_GroudonSide[] = { - sAnim_FaceSouth, - sAnim_FaceNorth, - sAnim_FaceWest, - sAnim_FaceEast, - sAnim_GoSouth, - sAnim_GoEast, - sAnim_GoWest, - sAnim_GoEast, - sAnim_GoFastSouth, - sAnim_GoFastEast, - sAnim_GoFastWest, - sAnim_GoFastEast, - sAnim_GoFasterSouth, - sAnim_GoFasterEast, - sAnim_GoFasterWest, - sAnim_GoFasterEast, - sAnim_GoFastestSouth, - sAnim_GoFastestEast, - sAnim_GoFastestWest, - sAnim_GoFastestEast, + [ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_FaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_FaceWest, + [ANIM_STD_FACE_EAST] = sAnim_FaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_GoSouth, + [ANIM_STD_GO_NORTH] = sAnim_GoEast, + [ANIM_STD_GO_WEST] = sAnim_GoWest, + [ANIM_STD_GO_EAST] = sAnim_GoEast, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_GoFastSouth, + [ANIM_STD_GO_FAST_NORTH] = sAnim_GoFastEast, + [ANIM_STD_GO_FAST_WEST] = sAnim_GoFastWest, + [ANIM_STD_GO_FAST_EAST] = sAnim_GoFastEast, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_GoFasterSouth, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_GoFasterEast, + [ANIM_STD_GO_FASTER_WEST] = sAnim_GoFasterWest, + [ANIM_STD_GO_FASTER_EAST] = sAnim_GoFasterEast, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_GoFastestSouth, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestEast, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast, }; static const union AnimCmd sAnim_RayquazaCoiledAwake[] = @@ -952,186 +953,185 @@ static const union AnimCmd sAnim_RayquazaFaceEast[] = // Though they correspond to facing/walking movements, Rayquaza doesn't have // equivalent images aside from flying up. Its other frames aside from the 'normal' // frame are for the sequence where it awakens on Sky Pillar. -// The corresponding facing/walking movements are commented alongside static const union AnimCmd *const sAnimTable_Rayquaza[] = { - sAnim_RayquazaFaceSouth, // Face South - sAnim_RayquazaFaceNorth, // Face North - sAnim_RayquazaFaceWest, // Face West - sAnim_RayquazaFaceEast, // Face East - sAnim_RayquazaCoiledAsleep, // Go South - sAnim_RayquazaFlyUp, // Go North - sAnim_RayquazaCoiledMouthOpen, // Go West - sAnim_RayquazaNormal, // Go East - sAnim_RayquazaCoiledAsleep, // Go fast South - sAnim_RayquazaFlyUp, // Go fast North - sAnim_RayquazaCoiledAwake, // Go fast West - sAnim_RayquazaNormal, // Go fast East - sAnim_RayquazaCoiledAsleep, // Go faster South - sAnim_RayquazaFlyUp, // Go faster North - sAnim_RayquazaCoiledMouthOpen, // Go faster West - sAnim_RayquazaNormal, // Go faster East - sAnim_RayquazaCoiledAsleep, // Go fastest South - sAnim_RayquazaFlyUp, // Go fastest North - sAnim_RayquazaCoiledMouthOpen, // Go fastest West - sAnim_RayquazaNormal, // Go fastest East + [ANIM_STD_FACE_SOUTH] = sAnim_RayquazaFaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_RayquazaFaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_RayquazaFaceWest, + [ANIM_STD_FACE_EAST] = sAnim_RayquazaFaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_RayquazaCoiledAsleep, + [ANIM_STD_GO_NORTH] = sAnim_RayquazaFlyUp, + [ANIM_STD_GO_WEST] = sAnim_RayquazaCoiledMouthOpen, + [ANIM_STD_GO_EAST] = sAnim_RayquazaNormal, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_RayquazaCoiledAsleep, + [ANIM_STD_GO_FAST_NORTH] = sAnim_RayquazaFlyUp, + [ANIM_STD_GO_FAST_WEST] = sAnim_RayquazaCoiledAwake, + [ANIM_STD_GO_FAST_EAST] = sAnim_RayquazaNormal, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_RayquazaCoiledAsleep, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_RayquazaFlyUp, + [ANIM_STD_GO_FASTER_WEST] = sAnim_RayquazaCoiledMouthOpen, + [ANIM_STD_GO_FASTER_EAST] = sAnim_RayquazaNormal, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_RayquazaCoiledAsleep, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_RayquazaFlyUp, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_RayquazaCoiledMouthOpen, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_RayquazaNormal, }; static const union AnimCmd *const sAnimTable_BrendanMayNormal[] = { - sAnim_FaceSouth, - sAnim_FaceNorth, - sAnim_FaceWest, - sAnim_FaceEast, - sAnim_GoSouth, - sAnim_GoNorth, - sAnim_GoWest, - sAnim_GoEast, - sAnim_GoFastSouth, - sAnim_GoFastNorth, - sAnim_GoFastWest, - sAnim_GoFastEast, - sAnim_GoFasterSouth, - sAnim_GoFasterNorth, - sAnim_GoFasterWest, - sAnim_GoFasterEast, - sAnim_GoFastestSouth, - sAnim_GoFastestNorth, - sAnim_GoFastestWest, - sAnim_GoFastestEast, - sAnim_RunSouth, - sAnim_RunNorth, - sAnim_RunWest, - sAnim_RunEast, + [ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_FaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_FaceWest, + [ANIM_STD_FACE_EAST] = sAnim_FaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_GoSouth, + [ANIM_STD_GO_NORTH] = sAnim_GoNorth, + [ANIM_STD_GO_WEST] = sAnim_GoWest, + [ANIM_STD_GO_EAST] = sAnim_GoEast, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_GoFastSouth, + [ANIM_STD_GO_FAST_NORTH] = sAnim_GoFastNorth, + [ANIM_STD_GO_FAST_WEST] = sAnim_GoFastWest, + [ANIM_STD_GO_FAST_EAST] = sAnim_GoFastEast, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_GoFasterSouth, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_GoFasterNorth, + [ANIM_STD_GO_FASTER_WEST] = sAnim_GoFasterWest, + [ANIM_STD_GO_FASTER_EAST] = sAnim_GoFasterEast, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_GoFastestSouth, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestNorth, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast, + [ANIM_RUN_SOUTH] = sAnim_RunSouth, + [ANIM_RUN_NORTH] = sAnim_RunNorth, + [ANIM_RUN_WEST] = sAnim_RunWest, + [ANIM_RUN_EAST] = sAnim_RunEast, }; static const union AnimCmd *const sAnimTable_AcroBike[] = { - sAnim_FaceSouth, - sAnim_FaceNorth, - sAnim_FaceWest, - sAnim_FaceEast, - sAnim_GoSouth, - sAnim_GoNorth, - sAnim_GoWest, - sAnim_GoEast, - sAnim_GoFastSouth, - sAnim_GoFastNorth, - sAnim_GoFastWest, - sAnim_GoFastEast, - sAnim_GoFasterSouth, - sAnim_GoFasterNorth, - sAnim_GoFasterWest, - sAnim_GoFasterEast, - sAnim_GoFastestSouth, - sAnim_GoFastestNorth, - sAnim_GoFastestWest, - sAnim_GoFastestEast, - sAnim_BunnyHoppyBackWheelSouth, - sAnim_BunnyHoppyBackWheelNorth, - sAnim_BunnyHoppyBackWheelWest, - sAnim_BunnyHoppyBackWheelEast, - sAnim_BunnyHoppyFrontWheelSouth, - sAnim_BunnyHoppyFrontWheelNorth, - sAnim_BunnyHoppyFrontWheelWest, - sAnim_BunnyHoppyFrontWheelEast, - sAnim_StandingWheelieBackWheelSouth, - sAnim_StandingWheelieBackWheelNorth, - sAnim_StandingWheelieBackWheelWest, - sAnim_StandingWheelieBackWheelEast, - sAnim_StandingWheelieFrontWheelSouth, - sAnim_StandingWheelieFrontWheelNorth, - sAnim_StandingWheelieFrontWheelWest, - sAnim_StandingWheelieFrontWheelEast, - sAnim_MovingWheelieSouth, - sAnim_MovingWheelieNorth, - sAnim_MovingWheelieWest, - sAnim_MovingWheelieEast, + [ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_FaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_FaceWest, + [ANIM_STD_FACE_EAST] = sAnim_FaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_GoSouth, + [ANIM_STD_GO_NORTH] = sAnim_GoNorth, + [ANIM_STD_GO_WEST] = sAnim_GoWest, + [ANIM_STD_GO_EAST] = sAnim_GoEast, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_GoFastSouth, + [ANIM_STD_GO_FAST_NORTH] = sAnim_GoFastNorth, + [ANIM_STD_GO_FAST_WEST] = sAnim_GoFastWest, + [ANIM_STD_GO_FAST_EAST] = sAnim_GoFastEast, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_GoFasterSouth, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_GoFasterNorth, + [ANIM_STD_GO_FASTER_WEST] = sAnim_GoFasterWest, + [ANIM_STD_GO_FASTER_EAST] = sAnim_GoFasterEast, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_GoFastestSouth, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestNorth, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast, + [ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH] = sAnim_BunnyHoppyBackWheelSouth, + [ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH] = sAnim_BunnyHoppyBackWheelNorth, + [ANIM_BUNNY_HOPPY_BACK_WHEEL_WEST] = sAnim_BunnyHoppyBackWheelWest, + [ANIM_BUNNY_HOPPY_BACK_WHEEL_EAST] = sAnim_BunnyHoppyBackWheelEast, + [ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH] = sAnim_BunnyHoppyFrontWheelSouth, + [ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH] = sAnim_BunnyHoppyFrontWheelNorth, + [ANIM_BUNNY_HOPPY_FRONT_WHEEL_WEST] = sAnim_BunnyHoppyFrontWheelWest, + [ANIM_BUNNY_HOPPY_FRONT_WHEEL_EAST] = sAnim_BunnyHoppyFrontWheelEast, + [ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH] = sAnim_StandingWheelieBackWheelSouth, + [ANIM_STANDING_WHEELIE_BACK_WHEEL_NORTH] = sAnim_StandingWheelieBackWheelNorth, + [ANIM_STANDING_WHEELIE_BACK_WHEEL_WEST] = sAnim_StandingWheelieBackWheelWest, + [ANIM_STANDING_WHEELIE_BACK_WHEEL_EAST] = sAnim_StandingWheelieBackWheelEast, + [ANIM_STANDING_WHEELIE_FRONT_WHEEL_SOUTH] = sAnim_StandingWheelieFrontWheelSouth, + [ANIM_STANDING_WHEELIE_FRONT_WHEEL_NORTH] = sAnim_StandingWheelieFrontWheelNorth, + [ANIM_STANDING_WHEELIE_FRONT_WHEEL_WEST] = sAnim_StandingWheelieFrontWheelWest, + [ANIM_STANDING_WHEELIE_FRONT_WHEEL_EAST] = sAnim_StandingWheelieFrontWheelEast, + [ANIM_MOVING_WHEELIE_SOUTH] = sAnim_MovingWheelieSouth, + [ANIM_MOVING_WHEELIE_NORTH] = sAnim_MovingWheelieNorth, + [ANIM_MOVING_WHEELIE_WEST] = sAnim_MovingWheelieWest, + [ANIM_MOVING_WHEELIE_EAST] = sAnim_MovingWheelieEast, }; static const union AnimCmd *const sAnimTable_Surfing[] = { - sAnim_FaceSouth, - sAnim_FaceNorth, - sAnim_FaceWest, - sAnim_FaceEast, - sAnim_GoSouth, - sAnim_GoNorth, - sAnim_GoWest, - sAnim_GoEast, - sAnim_GoFastSouth, - sAnim_GoFastNorth, - sAnim_GoFastWest, - sAnim_GoFastEast, - sAnim_GoFasterSouth, - sAnim_GoFasterNorth, - sAnim_GoFasterWest, - sAnim_GoFasterEast, - sAnim_GoFastestSouth, - sAnim_GoFastestNorth, - sAnim_GoFastestWest, - sAnim_GoFastestEast, - sAnim_GetOnOffSurfBlobSouth, - sAnim_GetOnOffSurfBlobNorth, - sAnim_GetOnOffSurfBlobWest, - sAnim_GetOnOffSurfBlobEast, + [ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_FaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_FaceWest, + [ANIM_STD_FACE_EAST] = sAnim_FaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_GoSouth, + [ANIM_STD_GO_NORTH] = sAnim_GoNorth, + [ANIM_STD_GO_WEST] = sAnim_GoWest, + [ANIM_STD_GO_EAST] = sAnim_GoEast, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_GoFastSouth, + [ANIM_STD_GO_FAST_NORTH] = sAnim_GoFastNorth, + [ANIM_STD_GO_FAST_WEST] = sAnim_GoFastWest, + [ANIM_STD_GO_FAST_EAST] = sAnim_GoFastEast, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_GoFasterSouth, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_GoFasterNorth, + [ANIM_STD_GO_FASTER_WEST] = sAnim_GoFasterWest, + [ANIM_STD_GO_FASTER_EAST] = sAnim_GoFasterEast, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_GoFastestSouth, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestNorth, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast, + [ANIM_GET_ON_OFF_POKEMON_SOUTH] = sAnim_GetOnOffSurfBlobSouth, + [ANIM_GET_ON_OFF_POKEMON_NORTH] = sAnim_GetOnOffSurfBlobNorth, + [ANIM_GET_ON_OFF_POKEMON_WEST] = sAnim_GetOnOffSurfBlobWest, + [ANIM_GET_ON_OFF_POKEMON_EAST] = sAnim_GetOnOffSurfBlobEast, }; static const union AnimCmd *const sAnimTable_Nurse[] = { - sAnim_FaceSouth, - sAnim_FaceNorth, - sAnim_FaceWest, - sAnim_FaceEast, - sAnim_GoSouth, - sAnim_GoNorth, - sAnim_GoWest, - sAnim_GoEast, - sAnim_GoFastSouth, - sAnim_GoFastNorth, - sAnim_GoFastWest, - sAnim_GoFastEast, - sAnim_GoFasterSouth, - sAnim_GoFasterNorth, - sAnim_GoFasterWest, - sAnim_GoFasterEast, - sAnim_GoFastestSouth, - sAnim_GoFastestNorth, - sAnim_GoFastestWest, - sAnim_GoFastestEast, - sAnim_NurseBow, + [ANIM_STD_FACE_SOUTH] = sAnim_FaceSouth, + [ANIM_STD_FACE_NORTH] = sAnim_FaceNorth, + [ANIM_STD_FACE_WEST] = sAnim_FaceWest, + [ANIM_STD_FACE_EAST] = sAnim_FaceEast, + [ANIM_STD_GO_SOUTH] = sAnim_GoSouth, + [ANIM_STD_GO_NORTH] = sAnim_GoNorth, + [ANIM_STD_GO_WEST] = sAnim_GoWest, + [ANIM_STD_GO_EAST] = sAnim_GoEast, + [ANIM_STD_GO_FAST_SOUTH] = sAnim_GoFastSouth, + [ANIM_STD_GO_FAST_NORTH] = sAnim_GoFastNorth, + [ANIM_STD_GO_FAST_WEST] = sAnim_GoFastWest, + [ANIM_STD_GO_FAST_EAST] = sAnim_GoFastEast, + [ANIM_STD_GO_FASTER_SOUTH] = sAnim_GoFasterSouth, + [ANIM_STD_GO_FASTER_NORTH] = sAnim_GoFasterNorth, + [ANIM_STD_GO_FASTER_WEST] = sAnim_GoFasterWest, + [ANIM_STD_GO_FASTER_EAST] = sAnim_GoFasterEast, + [ANIM_STD_GO_FASTEST_SOUTH] = sAnim_GoFastestSouth, + [ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestNorth, + [ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest, + [ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast, + [ANIM_NURSE_BOW] = sAnim_NurseBow, }; static const union AnimCmd *const sAnimTable_FieldMove[] = { - sAnim_FieldMove, + [ANIM_FIELD_MOVE] = sAnim_FieldMove, }; static const union AnimCmd *const sAnimTable_BerryTree[] = { - sAnim_BerryTreeStage0, - sAnim_BerryTreeStage1, - sAnim_BerryTreeStage2, - sAnim_BerryTreeStage3, - sAnim_BerryTreeStage4, + [BERRY_STAGE_PLANTED - 1] = sAnim_BerryTreeStage0, + [BERRY_STAGE_SPROUTED - 1] = sAnim_BerryTreeStage1, + [BERRY_STAGE_TALLER - 1] = sAnim_BerryTreeStage2, + [BERRY_STAGE_FLOWERING - 1] = sAnim_BerryTreeStage3, + [BERRY_STAGE_BERRIES - 1] = sAnim_BerryTreeStage4, }; static const union AnimCmd *const sAnimTable_BreakableRock[] = { - sAnim_StayStill, - sAnim_RockBreak, + [ANIM_STAY_STILL] = sAnim_StayStill, + [ANIM_REMOVE_OBSTACLE] = sAnim_RockBreak, }; static const union AnimCmd *const sAnimTable_CuttableTree[] = { - sAnim_StayStill, - sAnim_TreeCut, + [ANIM_STAY_STILL] = sAnim_StayStill, + [ANIM_REMOVE_OBSTACLE] = sAnim_TreeCut, }; static const union AnimCmd *const sAnimTable_Fishing[] = { - sAnim_TakeOutRodSouth, - sAnim_TakeOutRodNorth, - sAnim_TakeOutRodWest, - sAnim_TakeOutRodEast, - sAnim_PutAwayRodSouth, - sAnim_PutAwayRodNorth, - sAnim_PutAwayRodWest, - sAnim_PutAwayRodEast, - sAnim_HookedPokemonSouth, - sAnim_HookedPokemonNorth, - sAnim_HookedPokemonWest, - sAnim_HookedPokemonEast, + [ANIM_TAKE_OUT_ROD_SOUTH] = sAnim_TakeOutRodSouth, + [ANIM_TAKE_OUT_ROD_NORTH] = sAnim_TakeOutRodNorth, + [ANIM_TAKE_OUT_ROD_WEST] = sAnim_TakeOutRodWest, + [ANIM_TAKE_OUT_ROD_EAST] = sAnim_TakeOutRodEast, + [ANIM_PUT_AWAY_ROD_SOUTH] = sAnim_PutAwayRodSouth, + [ANIM_PUT_AWAY_ROD_NORTH] = sAnim_PutAwayRodNorth, + [ANIM_PUT_AWAY_ROD_WEST] = sAnim_PutAwayRodWest, + [ANIM_PUT_AWAY_ROD_EAST] = sAnim_PutAwayRodEast, + [ANIM_HOOKED_POKEMON_SOUTH] = sAnim_HookedPokemonSouth, + [ANIM_HOOKED_POKEMON_NORTH] = sAnim_HookedPokemonNorth, + [ANIM_HOOKED_POKEMON_WEST] = sAnim_HookedPokemonWest, + [ANIM_HOOKED_POKEMON_EAST] = sAnim_HookedPokemonEast, }; static const union AffineAnimCmd *const sAffineAnimTable_KyogreGroudon[] = { diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 2616b65e81..074fa23863 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -703,169 +703,169 @@ static const s16 sMovementDelaysShort[] = {32, 48, 64, 80}; #include "data/object_events/movement_type_func_tables.h" static const u8 sFaceDirectionAnimNums[] = { - [DIR_NONE] = 0, - [DIR_SOUTH] = 0, - [DIR_NORTH] = 1, - [DIR_WEST] = 2, - [DIR_EAST] = 3, - [DIR_SOUTHWEST] = 0, - [DIR_SOUTHEAST] = 0, - [DIR_NORTHWEST] = 1, - [DIR_NORTHEAST] = 1, + [DIR_NONE] = ANIM_STD_FACE_SOUTH, + [DIR_SOUTH] = ANIM_STD_FACE_SOUTH, + [DIR_NORTH] = ANIM_STD_FACE_NORTH, + [DIR_WEST] = ANIM_STD_FACE_WEST, + [DIR_EAST] = ANIM_STD_FACE_EAST, + [DIR_SOUTHWEST] = ANIM_STD_FACE_SOUTH, + [DIR_SOUTHEAST] = ANIM_STD_FACE_SOUTH, + [DIR_NORTHWEST] = ANIM_STD_FACE_NORTH, + [DIR_NORTHEAST] = ANIM_STD_FACE_NORTH, }; static const u8 sMoveDirectionAnimNums[] = { - [DIR_NONE] = 4, - [DIR_SOUTH] = 4, - [DIR_NORTH] = 5, - [DIR_WEST] = 6, - [DIR_EAST] = 7, - [DIR_SOUTHWEST] = 4, - [DIR_SOUTHEAST] = 4, - [DIR_NORTHWEST] = 5, - [DIR_NORTHEAST] = 5, + [DIR_NONE] = ANIM_STD_GO_SOUTH, + [DIR_SOUTH] = ANIM_STD_GO_SOUTH, + [DIR_NORTH] = ANIM_STD_GO_NORTH, + [DIR_WEST] = ANIM_STD_GO_WEST, + [DIR_EAST] = ANIM_STD_GO_EAST, + [DIR_SOUTHWEST] = ANIM_STD_GO_SOUTH, + [DIR_SOUTHEAST] = ANIM_STD_GO_SOUTH, + [DIR_NORTHWEST] = ANIM_STD_GO_NORTH, + [DIR_NORTHEAST] = ANIM_STD_GO_NORTH, }; static const u8 sMoveDirectionFastAnimNums[] = { - [DIR_NONE] = 8, - [DIR_SOUTH] = 8, - [DIR_NORTH] = 9, - [DIR_WEST] = 10, - [DIR_EAST] = 11, - [DIR_SOUTHWEST] = 8, - [DIR_SOUTHEAST] = 8, - [DIR_NORTHWEST] = 9, - [DIR_NORTHEAST] = 9, + [DIR_NONE] = ANIM_STD_GO_FAST_SOUTH, + [DIR_SOUTH] = ANIM_STD_GO_FAST_SOUTH, + [DIR_NORTH] = ANIM_STD_GO_FAST_NORTH, + [DIR_WEST] = ANIM_STD_GO_FAST_WEST, + [DIR_EAST] = ANIM_STD_GO_FAST_EAST, + [DIR_SOUTHWEST] = ANIM_STD_GO_FAST_SOUTH, + [DIR_SOUTHEAST] = ANIM_STD_GO_FAST_SOUTH, + [DIR_NORTHWEST] = ANIM_STD_GO_FAST_NORTH, + [DIR_NORTHEAST] = ANIM_STD_GO_FAST_NORTH, }; static const u8 sMoveDirectionFasterAnimNums[] = { - [DIR_NONE] = 12, - [DIR_SOUTH] = 12, - [DIR_NORTH] = 13, - [DIR_WEST] = 14, - [DIR_EAST] = 15, - [DIR_SOUTHWEST] = 12, - [DIR_SOUTHEAST] = 12, - [DIR_NORTHWEST] = 13, - [DIR_NORTHEAST] = 13, + [DIR_NONE] = ANIM_STD_GO_FASTER_SOUTH, + [DIR_SOUTH] = ANIM_STD_GO_FASTER_SOUTH, + [DIR_NORTH] = ANIM_STD_GO_FASTER_NORTH, + [DIR_WEST] = ANIM_STD_GO_FASTER_WEST, + [DIR_EAST] = ANIM_STD_GO_FASTER_EAST, + [DIR_SOUTHWEST] = ANIM_STD_GO_FASTER_SOUTH, + [DIR_SOUTHEAST] = ANIM_STD_GO_FASTER_SOUTH, + [DIR_NORTHWEST] = ANIM_STD_GO_FASTER_NORTH, + [DIR_NORTHEAST] = ANIM_STD_GO_FASTER_NORTH, }; static const u8 sMoveDirectionFastestAnimNums[] = { - [DIR_NONE] = 16, - [DIR_SOUTH] = 16, - [DIR_NORTH] = 17, - [DIR_WEST] = 18, - [DIR_EAST] = 19, - [DIR_SOUTHWEST] = 16, - [DIR_SOUTHEAST] = 16, - [DIR_NORTHWEST] = 17, - [DIR_NORTHEAST] = 17, + [DIR_NONE] = ANIM_STD_GO_FASTEST_SOUTH, + [DIR_SOUTH] = ANIM_STD_GO_FASTEST_SOUTH, + [DIR_NORTH] = ANIM_STD_GO_FASTEST_NORTH, + [DIR_WEST] = ANIM_STD_GO_FASTEST_WEST, + [DIR_EAST] = ANIM_STD_GO_FASTEST_EAST, + [DIR_SOUTHWEST] = ANIM_STD_GO_FASTEST_SOUTH, + [DIR_SOUTHEAST] = ANIM_STD_GO_FASTEST_SOUTH, + [DIR_NORTHWEST] = ANIM_STD_GO_FASTEST_NORTH, + [DIR_NORTHEAST] = ANIM_STD_GO_FASTEST_NORTH, }; static const u8 sJumpSpecialDirectionAnimNums[] = { // used for jumping onto surf mon - [DIR_NONE] = 20, - [DIR_SOUTH] = 20, - [DIR_NORTH] = 21, - [DIR_WEST] = 22, - [DIR_EAST] = 23, - [DIR_SOUTHWEST] = 20, - [DIR_SOUTHEAST] = 20, - [DIR_NORTHWEST] = 21, - [DIR_NORTHEAST] = 21, + [DIR_NONE] = ANIM_GET_ON_OFF_POKEMON_SOUTH, + [DIR_SOUTH] = ANIM_GET_ON_OFF_POKEMON_SOUTH, + [DIR_NORTH] = ANIM_GET_ON_OFF_POKEMON_NORTH, + [DIR_WEST] = ANIM_GET_ON_OFF_POKEMON_WEST, + [DIR_EAST] = ANIM_GET_ON_OFF_POKEMON_EAST, + [DIR_SOUTHWEST] = ANIM_GET_ON_OFF_POKEMON_SOUTH, + [DIR_SOUTHEAST] = ANIM_GET_ON_OFF_POKEMON_SOUTH, + [DIR_NORTHWEST] = ANIM_GET_ON_OFF_POKEMON_NORTH, + [DIR_NORTHEAST] = ANIM_GET_ON_OFF_POKEMON_NORTH, }; static const u8 sAcroWheelieDirectionAnimNums[] = { - [DIR_NONE] = 20, - [DIR_SOUTH] = 20, - [DIR_NORTH] = 21, - [DIR_WEST] = 22, - [DIR_EAST] = 23, - [DIR_SOUTHWEST] = 20, - [DIR_SOUTHEAST] = 20, - [DIR_NORTHWEST] = 21, - [DIR_NORTHEAST] = 21, + [DIR_NONE] = ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH, + [DIR_SOUTH] = ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH, + [DIR_NORTH] = ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH, + [DIR_WEST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_WEST, + [DIR_EAST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_EAST, + [DIR_SOUTHWEST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH, + [DIR_SOUTHEAST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH, + [DIR_NORTHWEST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH, + [DIR_NORTHEAST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH, }; static const u8 sAcroUnusedDirectionAnimNums[] = { - [DIR_NONE] = 24, - [DIR_SOUTH] = 24, - [DIR_NORTH] = 25, - [DIR_WEST] = 26, - [DIR_EAST] = 27, - [DIR_SOUTHWEST] = 24, - [DIR_SOUTHEAST] = 24, - [DIR_NORTHWEST] = 25, - [DIR_NORTHEAST] = 25, + [DIR_NONE] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH, + [DIR_SOUTH] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH, + [DIR_NORTH] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH, + [DIR_WEST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_WEST, + [DIR_EAST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_EAST, + [DIR_SOUTHWEST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH, + [DIR_SOUTHEAST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH, + [DIR_NORTHWEST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH, + [DIR_NORTHEAST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH, }; static const u8 sAcroEndWheelieDirectionAnimNums[] = { - [DIR_NONE] = 28, - [DIR_SOUTH] = 28, - [DIR_NORTH] = 29, - [DIR_WEST] = 30, - [DIR_EAST] = 31, - [DIR_SOUTHWEST] = 28, - [DIR_SOUTHEAST] = 28, - [DIR_NORTHWEST] = 29, - [DIR_NORTHEAST] = 29, + [DIR_NONE] = ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH, + [DIR_SOUTH] = ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH, + [DIR_NORTH] = ANIM_STANDING_WHEELIE_BACK_WHEEL_NORTH, + [DIR_WEST] = ANIM_STANDING_WHEELIE_BACK_WHEEL_WEST, + [DIR_EAST] = ANIM_STANDING_WHEELIE_BACK_WHEEL_EAST, + [DIR_SOUTHWEST] = ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH, + [DIR_SOUTHEAST] = ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH, + [DIR_NORTHWEST] = ANIM_STANDING_WHEELIE_BACK_WHEEL_NORTH, + [DIR_NORTHEAST] = ANIM_STANDING_WHEELIE_BACK_WHEEL_NORTH, }; static const u8 sAcroUnusedActionDirectionAnimNums[] = { - [DIR_NONE] = 32, - [DIR_SOUTH] = 32, - [DIR_NORTH] = 33, - [DIR_WEST] = 34, - [DIR_EAST] = 35, - [DIR_SOUTHWEST] = 32, - [DIR_SOUTHEAST] = 32, - [DIR_NORTHWEST] = 33, - [DIR_NORTHEAST] = 33, + [DIR_NONE] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_SOUTH, + [DIR_SOUTH] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_SOUTH, + [DIR_NORTH] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_NORTH, + [DIR_WEST] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_WEST, + [DIR_EAST] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_EAST, + [DIR_SOUTHWEST] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_SOUTH, + [DIR_SOUTHEAST] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_SOUTH, + [DIR_NORTHWEST] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_NORTH, + [DIR_NORTHEAST] = ANIM_STANDING_WHEELIE_FRONT_WHEEL_NORTH, }; static const u8 sAcroWheeliePedalDirectionAnimNums[] = { - [DIR_NONE] = 36, - [DIR_SOUTH] = 36, - [DIR_NORTH] = 37, - [DIR_WEST] = 38, - [DIR_EAST] = 39, - [DIR_SOUTHWEST] = 36, - [DIR_SOUTHEAST] = 36, - [DIR_NORTHWEST] = 37, - [DIR_NORTHEAST] = 37, + [DIR_NONE] = ANIM_MOVING_WHEELIE_SOUTH, + [DIR_SOUTH] = ANIM_MOVING_WHEELIE_SOUTH, + [DIR_NORTH] = ANIM_MOVING_WHEELIE_NORTH, + [DIR_WEST] = ANIM_MOVING_WHEELIE_WEST, + [DIR_EAST] = ANIM_MOVING_WHEELIE_EAST, + [DIR_SOUTHWEST] = ANIM_MOVING_WHEELIE_SOUTH, + [DIR_SOUTHEAST] = ANIM_MOVING_WHEELIE_SOUTH, + [DIR_NORTHWEST] = ANIM_MOVING_WHEELIE_NORTH, + [DIR_NORTHEAST] = ANIM_MOVING_WHEELIE_NORTH, }; static const u8 sFishingDirectionAnimNums[] = { - [DIR_NONE] = 0, - [DIR_SOUTH] = 0, - [DIR_NORTH] = 1, - [DIR_WEST] = 2, - [DIR_EAST] = 3, - [DIR_SOUTHWEST] = 0, - [DIR_SOUTHEAST] = 0, - [DIR_NORTHWEST] = 1, - [DIR_NORTHEAST] = 1, + [DIR_NONE] = ANIM_TAKE_OUT_ROD_SOUTH, + [DIR_SOUTH] = ANIM_TAKE_OUT_ROD_SOUTH, + [DIR_NORTH] = ANIM_TAKE_OUT_ROD_NORTH, + [DIR_WEST] = ANIM_TAKE_OUT_ROD_WEST, + [DIR_EAST] = ANIM_TAKE_OUT_ROD_EAST, + [DIR_SOUTHWEST] = ANIM_TAKE_OUT_ROD_SOUTH, + [DIR_SOUTHEAST] = ANIM_TAKE_OUT_ROD_SOUTH, + [DIR_NORTHWEST] = ANIM_TAKE_OUT_ROD_NORTH, + [DIR_NORTHEAST] = ANIM_TAKE_OUT_ROD_NORTH, }; static const u8 sFishingNoCatchDirectionAnimNums[] = { - [DIR_NONE] = 4, - [DIR_SOUTH] = 4, - [DIR_NORTH] = 5, - [DIR_WEST] = 6, - [DIR_EAST] = 7, - [DIR_SOUTHWEST] = 4, - [DIR_SOUTHEAST] = 4, - [DIR_NORTHWEST] = 5, - [DIR_NORTHEAST] = 5, + [DIR_NONE] = ANIM_PUT_AWAY_ROD_SOUTH, + [DIR_SOUTH] = ANIM_PUT_AWAY_ROD_SOUTH, + [DIR_NORTH] = ANIM_PUT_AWAY_ROD_NORTH, + [DIR_WEST] = ANIM_PUT_AWAY_ROD_WEST, + [DIR_EAST] = ANIM_PUT_AWAY_ROD_EAST, + [DIR_SOUTHWEST] = ANIM_PUT_AWAY_ROD_SOUTH, + [DIR_SOUTHEAST] = ANIM_PUT_AWAY_ROD_SOUTH, + [DIR_NORTHWEST] = ANIM_PUT_AWAY_ROD_NORTH, + [DIR_NORTHEAST] = ANIM_PUT_AWAY_ROD_NORTH, }; static const u8 sFishingBiteDirectionAnimNums[] = { - [DIR_NONE] = 8, - [DIR_SOUTH] = 8, - [DIR_NORTH] = 9, - [DIR_WEST] = 10, - [DIR_EAST] = 11, - [DIR_SOUTHWEST] = 8, - [DIR_SOUTHEAST] = 8, - [DIR_NORTHWEST] = 9, - [DIR_NORTHEAST] = 9, + [DIR_NONE] = ANIM_HOOKED_POKEMON_SOUTH, + [DIR_SOUTH] = ANIM_HOOKED_POKEMON_SOUTH, + [DIR_NORTH] = ANIM_HOOKED_POKEMON_NORTH, + [DIR_WEST] = ANIM_HOOKED_POKEMON_WEST, + [DIR_EAST] = ANIM_HOOKED_POKEMON_EAST, + [DIR_SOUTHWEST] = ANIM_HOOKED_POKEMON_SOUTH, + [DIR_SOUTHEAST] = ANIM_HOOKED_POKEMON_SOUTH, + [DIR_NORTHWEST] = ANIM_HOOKED_POKEMON_NORTH, + [DIR_NORTHEAST] = ANIM_HOOKED_POKEMON_NORTH, }; static const u8 sRunningDirectionAnimNums[] = { - [DIR_NONE] = 20, - [DIR_SOUTH] = 20, - [DIR_NORTH] = 21, - [DIR_WEST] = 22, - [DIR_EAST] = 23, - [DIR_SOUTHWEST] = 20, - [DIR_SOUTHEAST] = 20, - [DIR_NORTHWEST] = 21, - [DIR_NORTHEAST] = 21, + [DIR_NONE] = ANIM_RUN_SOUTH, + [DIR_SOUTH] = ANIM_RUN_SOUTH, + [DIR_NORTH] = ANIM_RUN_NORTH, + [DIR_WEST] = ANIM_RUN_WEST, + [DIR_EAST] = ANIM_RUN_EAST, + [DIR_SOUTHWEST] = ANIM_RUN_SOUTH, + [DIR_SOUTHEAST] = ANIM_RUN_SOUTH, + [DIR_NORTHWEST] = ANIM_RUN_NORTH, + [DIR_NORTHEAST] = ANIM_RUN_NORTH, }; const u8 gTrainerFacingDirectionMovementTypes[] = { @@ -6492,7 +6492,7 @@ bool8 MovementAction_FaceOriginalDirection_Step0(struct ObjectEvent *objectEvent bool8 MovementAction_NurseJoyBowDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - StartSpriteAnimInDirection(objectEvent, sprite, DIR_SOUTH, 0x14); + StartSpriteAnimInDirection(objectEvent, sprite, DIR_SOUTH, ANIM_NURSE_BOW); return FALSE; } @@ -6591,7 +6591,7 @@ bool8 MovementAction_RevealTrainer_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_RockSmashBreak_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - SetAndStartSpriteAnim(sprite, 1, 0); + SetAndStartSpriteAnim(sprite, ANIM_REMOVE_OBSTACLE, 0); sprite->sActionFuncId = 1; return FALSE; } @@ -6619,7 +6619,7 @@ bool8 MovementAction_RockSmashBreak_Step2(struct ObjectEvent *objectEvent, struc bool8 MovementAction_CutTree_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - SetAndStartSpriteAnim(sprite, 1, 0); + SetAndStartSpriteAnim(sprite, ANIM_REMOVE_OBSTACLE, 0); sprite->sActionFuncId = 1; return FALSE; } diff --git a/src/field_effect.c b/src/field_effect.c index 247744b879..7e1ebdff4d 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -3240,7 +3240,7 @@ static void FlyOutFieldEffect_JumpOnBird(struct Task *task) { struct ObjectEvent *objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; ObjectEventSetGraphicsId(objectEvent, GetPlayerAvatarGraphicsIdByStateId(PLAYER_AVATAR_STATE_SURFING)); - StartSpriteAnim(&gSprites[objectEvent->spriteId], 0x16); + StartSpriteAnim(&gSprites[objectEvent->spriteId], ANIM_GET_ON_OFF_POKEMON_WEST); objectEvent->inanimate = TRUE; ObjectEventSetHeldMovement(objectEvent, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT); if (task->tAvatarFlags & PLAYER_AVATAR_FLAG_SURFING) @@ -3478,7 +3478,7 @@ static void FlyInFieldEffect_BirdSwoopDown(struct Task *task) ObjectEventSetGraphicsId(objectEvent, GetPlayerAvatarGraphicsIdByStateId(PLAYER_AVATAR_STATE_SURFING)); CameraObjectReset2(); ObjectEventTurn(objectEvent, DIR_WEST); - StartSpriteAnim(&gSprites[objectEvent->spriteId], 0x16); + StartSpriteAnim(&gSprites[objectEvent->spriteId], ANIM_GET_ON_OFF_POKEMON_WEST); objectEvent->invisible = FALSE; task->tBirdSpriteId = CreateFlyBirdSprite(); StartFlyBirdSwoopDown(task->tBirdSpriteId); diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index e770ce35dc..6ce304c2c0 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1403,7 +1403,7 @@ void SetPlayerInvisibility(bool8 invisible) void SetPlayerAvatarFieldMove(void) { ObjectEventSetGraphicsId(&gObjectEvents[gPlayerAvatar.objectEventId], GetPlayerAvatarGraphicsIdByStateId(PLAYER_AVATAR_STATE_FIELD_MOVE)); - StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], 0); + StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], ANIM_FIELD_MOVE); } static void SetPlayerAvatarFishing(u8 direction) From 5536bce88d252a545822b185a399361fa8e17419 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 29 Oct 2021 18:39:31 -0300 Subject: [PATCH 107/417] SIZE -> FONT --- charmap.txt | 2 +- src/strings.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charmap.txt b/charmap.txt index 84e1496f05..335610b131 100644 --- a/charmap.txt +++ b/charmap.txt @@ -414,7 +414,7 @@ HIGHLIGHT = FC 02 @ same as fc 01 SHADOW = FC 03 @ same as fc 01 COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes PALETTE = FC 05 @ used in credits -SIZE = FC 06 @ note that anything other than "SMALL" is invalid +FONT = FC 06 @ valid values are 0, 1, 2, 7 and 8 RESET_SIZE = FC 07 PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them PAUSE_UNTIL_PRESS = FC 09 diff --git a/src/strings.c b/src/strings.c index bebe890110..ae39e3d4de 100644 --- a/src/strings.c +++ b/src/strings.c @@ -839,17 +839,17 @@ const u8 gText_B4F[] = _("B4F"); const u8 gText_Rooftop[] = _("ROOFTOP"); const u8 gText_ElevatorNowOn[] = _("Now on:"); const u8 gText_BP[] = _("BP"); -const u8 gText_EnergyPowder50[] = _("ENERGYPOWDER{CLEAR_TO 0x72}{SIZE 0}50"); -const u8 gText_EnergyRoot80[] = _("ENERGY ROOT{CLEAR_TO 0x72}{SIZE 0}80"); -const u8 gText_HealPowder50[] = _("HEAL POWDER{CLEAR_TO 0x72}{SIZE 0}50"); -const u8 gText_RevivalHerb300[] = _("REVIVAL HERB{CLEAR_TO 0x6C}{SIZE 0}300"); -const u8 gText_Protein1000[] = _("PROTEIN{CLEAR_TO 0x63}{SIZE 0}1,000"); -const u8 gText_Iron1000[] = _("IRON{CLEAR_TO 0x63}{SIZE 0}1,000"); -const u8 gText_Carbos1000[] = _("CARBOS{CLEAR_TO 0x63}{SIZE 0}1,000"); -const u8 gText_Calcium1000[] = _("CALCIUM{CLEAR_TO 0x63}{SIZE 0}1,000"); -const u8 gText_Zinc1000[] = _("ZINC{CLEAR_TO 0x63}{SIZE 0}1,000"); -const u8 gText_HPUp1000[] = _("HP UP{CLEAR_TO 0x63}{SIZE 0}1,000"); -const u8 gText_PPUp3000[] = _("PP UP{CLEAR_TO 0x63}{SIZE 0}3,000"); +const u8 gText_EnergyPowder50[] = _("ENERGYPOWDER{CLEAR_TO 0x72}{FONT 0}50"); +const u8 gText_EnergyRoot80[] = _("ENERGY ROOT{CLEAR_TO 0x72}{FONT 0}80"); +const u8 gText_HealPowder50[] = _("HEAL POWDER{CLEAR_TO 0x72}{FONT 0}50"); +const u8 gText_RevivalHerb300[] = _("REVIVAL HERB{CLEAR_TO 0x6C}{FONT 0}300"); +const u8 gText_Protein1000[] = _("PROTEIN{CLEAR_TO 0x63}{FONT 0}1,000"); +const u8 gText_Iron1000[] = _("IRON{CLEAR_TO 0x63}{FONT 0}1,000"); +const u8 gText_Carbos1000[] = _("CARBOS{CLEAR_TO 0x63}{FONT 0}1,000"); +const u8 gText_Calcium1000[] = _("CALCIUM{CLEAR_TO 0x63}{FONT 0}1,000"); +const u8 gText_Zinc1000[] = _("ZINC{CLEAR_TO 0x63}{FONT 0}1,000"); +const u8 gText_HPUp1000[] = _("HP UP{CLEAR_TO 0x63}{FONT 0}1,000"); +const u8 gText_PPUp3000[] = _("PP UP{CLEAR_TO 0x63}{FONT 0}3,000"); const u8 gText_RankingHall[] = _("RANKING HALL"); const u8 gText_ExchangeService[] = _("EXCHANGE SERVICE"); const u8 gText_LilycoveCity[] = _("LILYCOVE CITY"); From cde0ce878ce8344fe6149cb7015b6673bfb94bf3 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 29 Oct 2021 19:00:07 -0300 Subject: [PATCH 108/417] EXT_CTRL_CODE_SIZE -> EXT_CTRL_CODE_FONT --- gflib/string_util.c | 4 ++-- gflib/text.c | 8 ++++---- gflib/text.h | 2 +- src/battle_controller_player.c | 2 +- src/unk_text_util_2.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gflib/string_util.c b/gflib/string_util.c index b7485184ad..4bf0d2ae9b 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -386,7 +386,7 @@ u8 *StringBraille(u8 *dest, const u8 *src) { const u8 setBrailleFont[] = { EXT_CTRL_CODE_BEGIN, - EXT_CTRL_CODE_SIZE, + EXT_CTRL_CODE_FONT, 6, EOS }; @@ -664,7 +664,7 @@ u8 GetExtCtrlCodeLength(u8 code) [EXT_CTRL_CODE_SHADOW] = 2, [EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW] = 4, [EXT_CTRL_CODE_PALETTE] = 2, - [EXT_CTRL_CODE_SIZE] = 2, + [EXT_CTRL_CODE_FONT] = 2, [EXT_CTRL_CODE_RESET_SIZE] = 1, [EXT_CTRL_CODE_PAUSE] = 2, [EXT_CTRL_CODE_PAUSE_UNTIL_PRESS] = 1, diff --git a/gflib/text.c b/gflib/text.c index eb993c4214..e3043230b0 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -906,7 +906,7 @@ u16 RenderText(struct TextPrinter *textPrinter) case EXT_CTRL_CODE_PALETTE: textPrinter->printerTemplate.currentChar++; return 2; - case EXT_CTRL_CODE_SIZE: + case EXT_CTRL_CODE_FONT: subStruct->glyphId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; @@ -1170,7 +1170,7 @@ u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) case EXT_CTRL_CODE_HIGHLIGHT: case EXT_CTRL_CODE_SHADOW: case EXT_CTRL_CODE_PALETTE: - case EXT_CTRL_CODE_SIZE: + case EXT_CTRL_CODE_FONT: case EXT_CTRL_CODE_PAUSE: case EXT_CTRL_CODE_ESCAPE: case EXT_CTRL_CODE_SHIFT_TEXT: @@ -1319,7 +1319,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) case EXT_CTRL_CODE_SHIFT_DOWN: ++str; break; - case EXT_CTRL_CODE_SIZE: + case EXT_CTRL_CODE_FONT: func = GetFontWidthFunc(*++str); if (func == NULL) return 0; @@ -1449,7 +1449,7 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str) shadowColor = strLocal[strPos++]; GenerateFontHalfRowLookupTable(fgColor, bgColor, shadowColor); continue; - case EXT_CTRL_CODE_SIZE: + case EXT_CTRL_CODE_FONT: fontId = strLocal[strPos++]; break; case EXT_CTRL_CODE_PLAY_BGM: diff --git a/gflib/text.h b/gflib/text.h index ee3dfa34c5..9bb07580e0 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -211,7 +211,7 @@ #define EXT_CTRL_CODE_SHADOW 0x03 #define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04 #define EXT_CTRL_CODE_PALETTE 0x05 -#define EXT_CTRL_CODE_SIZE 0x06 +#define EXT_CTRL_CODE_FONT 0x06 #define EXT_CTRL_CODE_RESET_SIZE 0x07 #define EXT_CTRL_CODE_PAUSE 0x08 #define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09 diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index ac8babb607..f4e47b4347 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1500,7 +1500,7 @@ static void MoveSelectionDisplayMoveType(void) txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType); *(txtPtr)++ = EXT_CTRL_CODE_BEGIN; - *(txtPtr)++ = EXT_CTRL_CODE_SIZE; + *(txtPtr)++ = EXT_CTRL_CODE_FONT; *(txtPtr)++ = 1; StringCopy(txtPtr, gTypeNames[gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].type]); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index 3459dde858..a0eea575e7 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -80,7 +80,7 @@ u16 Font6Func(struct TextPrinter *textPrinter) case EXT_CTRL_CODE_PALETTE: textPrinter->printerTemplate.currentChar++; return 2; - case EXT_CTRL_CODE_SIZE: + case EXT_CTRL_CODE_FONT: subStruct->glyphId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; From 7574af35588c5025bcf46759501b16d25956f35f Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 29 Oct 2021 19:08:21 -0300 Subject: [PATCH 109/417] Fixed charmap comment about the FONT text controller --- charmap.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charmap.txt b/charmap.txt index 335610b131..1bca4e4f46 100644 --- a/charmap.txt +++ b/charmap.txt @@ -414,7 +414,7 @@ HIGHLIGHT = FC 02 @ same as fc 01 SHADOW = FC 03 @ same as fc 01 COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes PALETTE = FC 05 @ used in credits -FONT = FC 06 @ valid values are 0, 1, 2, 7 and 8 +FONT = FC 06 @ valid values are 0, 1, 2, 6 (braille), 7 and 8 RESET_SIZE = FC 07 PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them PAUSE_UNTIL_PRESS = FC 09 From f51247615e5734f1b9d61e22156b90ab1f1b489f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 29 Oct 2021 11:56:06 -0400 Subject: [PATCH 110/417] Finish documenting battle_transition --- include/palette.h | 4 +- src/battle_transition.c | 492 ++++++++++++++++++++++------------------ 2 files changed, 276 insertions(+), 220 deletions(-) diff --git a/include/palette.h b/include/palette.h index 072edef563..be2a0dd487 100644 --- a/include/palette.h +++ b/include/palette.h @@ -49,8 +49,8 @@ struct PaletteFadeControl extern struct PaletteFadeControl gPaletteFade; extern u32 gPlttBufferTransferPending; extern u8 gPaletteDecompressionBuffer[]; -extern u16 gPlttBufferUnfaded[]; -extern u16 gPlttBufferFaded[]; +extern u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE]; +extern u16 gPlttBufferFaded[PLTT_BUFFER_SIZE]; void LoadCompressedPalette(const u32 *, u16, u16); void LoadPalette(const void *, u16, u16); diff --git a/src/battle_transition.c b/src/battle_transition.c index 88194db272..6aa3883024 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -80,8 +80,8 @@ struct RectangularSpiralLine u8 state; s16 position; u8 moveIdx; - s16 skipPosition; - u8 field_8; + s16 reboundPosition; + bool8 outward; }; typedef bool8 (*TransitionStateFunc)(struct Task *task); @@ -227,8 +227,8 @@ static bool8 FrontierLogoWiggle_Init(struct Task *task); static bool8 FrontierLogoWiggle_SetGfx(struct Task *task); static bool8 FrontierLogoWave_Init(struct Task *task); static bool8 FrontierLogoWave_SetGfx(struct Task *task); -static bool8 FrontierLogoWave_Func3(struct Task *task); -static bool8 FrontierLogoWave_Func4(struct Task *task); +static bool8 FrontierLogoWave_InitScanline(struct Task *task); +static bool8 FrontierLogoWave_Main(struct Task *task); static bool8 Rayquaza_Init(struct Task *task); static bool8 Rayquaza_SetGfx(struct Task *task); static bool8 Rayquaza_PaletteFlash(struct Task *task); @@ -241,13 +241,13 @@ static bool8 FrontierSquares_Draw(struct Task *task); static bool8 FrontierSquares_Shrink(struct Task *task); static bool8 FrontierSquares_End(struct Task *task); static bool8 FrontierSquaresSpiral_Init(struct Task *task); -static bool8 FrontierSquaresSpiral_Func2(struct Task *task); -static bool8 FrontierSquaresSpiral_Func3(struct Task *task); -static bool8 FrontierSquaresSpiral_Func4(struct Task *task); +static bool8 FrontierSquaresSpiral_Outward(struct Task *task); +static bool8 FrontierSquaresSpiral_SetBlack(struct Task *task); +static bool8 FrontierSquaresSpiral_Inward(struct Task *task); static bool8 FrontierSquaresScroll_Init(struct Task *task); -static bool8 FrontierSquaresScroll_Func2(struct Task *task); -static bool8 FrontierSquaresScroll_Func3(struct Task *task); -static bool8 FrontierSquaresScroll_Func4(struct Task *task); +static bool8 FrontierSquaresScroll_Draw(struct Task *task); +static bool8 FrontierSquaresScroll_SetBlack(struct Task *task); +static bool8 FrontierSquaresScroll_Erase(struct Task *task); static bool8 FrontierSquaresScroll_End(struct Task *task); static bool8 Mugshot_Init(struct Task *task); static bool8 Mugshot_SetGfx(struct Task *task); @@ -625,52 +625,73 @@ static const TransitionStateFunc sRectangularSpiral_Funcs[] = }; #define SPIRAL_END (-1) -#define SPIRAL_SKIP (-2) +#define SPIRAL_REBOUND (-2) -static const s16 gUnknown_085C8C90[] = {1, 27, 275, SPIRAL_END}; -static const s16 gUnknown_085C8C98[] = {2, 486, SPIRAL_END}; -static const s16 gUnknown_085C8C9E[] = {3, 262, SPIRAL_END}; -static const s16 gUnknown_085C8CA4[] = {4, 507, SPIRAL_SKIP}; +// Note that the directions are inverted for the lines originating at the bottom. +// i.e. MOVE_RIGHT is a right move for the top lines and a left move for the inverted bottom lines. +enum { + MOVE_RIGHT = 1, + MOVE_LEFT, + MOVE_UP, + MOVE_DOWN, +}; -static const s16 gUnknown_085C8CAA[] = {1, 213, SPIRAL_END}; -static const s16 gUnknown_085C8CB0[] = {2, 548, SPIRAL_SKIP}; -static const s16 gUnknown_085C8CB6[] = {3, 196, SPIRAL_END}; -static const s16 gUnknown_085C8CBC[] = {4, 573, 309, SPIRAL_END}; +// Offsets of the movement data for spiraling in either direction. +#define SPIRAL_INWARD_START 0 +#define SPIRAL_INWARD_END 3 +#define SPIRAL_OUTWARD_START 4 +#define SPIRAL_OUTWARD_END 7 -static const s16 gUnknown_085C8CC4[] = {1, 474, SPIRAL_END}; -static const s16 gUnknown_085C8CCA[] = {2, 295, 32, SPIRAL_END}; -static const s16 gUnknown_085C8CD2[] = {3, 58, SPIRAL_END}; -static const s16 gUnknown_085C8CD8[] = {4, 455, SPIRAL_END}; +static const s16 sRectangularSpiral_Major_InwardRight[] = {MOVE_RIGHT, 27, 275, SPIRAL_END}; +static const s16 sRectangularSpiral_Major_InwardLeft[] = {MOVE_LEFT, 486, SPIRAL_END}; +static const s16 sRectangularSpiral_Major_InwardUp[] = {MOVE_UP, 262, SPIRAL_END}; +static const s16 sRectangularSpiral_Major_InwardDown[] = {MOVE_DOWN, 507, SPIRAL_REBOUND}; -static const s16 gUnknown_085C8CDE[] = {1, 540, SPIRAL_END}; -static const s16 gUnknown_085C8CE4[] = {2, 229, SPIRAL_END}; -static const s16 gUnknown_085C8CEA[] = {3, 244, 28, SPIRAL_END}; -static const s16 gUnknown_085C8CF2[] = {4, 517, SPIRAL_END}; +static const s16 sRectangularSpiral_Minor_InwardRight[] = {MOVE_RIGHT, 213, SPIRAL_END}; +static const s16 sRectangularSpiral_Minor_InwardLeft[] = {MOVE_LEFT, 548, SPIRAL_REBOUND}; +static const s16 sRectangularSpiral_Minor_InwardUp[] = {MOVE_UP, 196, SPIRAL_END}; +static const s16 sRectangularSpiral_Minor_InwardDown[] = {MOVE_DOWN, 573, 309, SPIRAL_END}; + +static const s16 sRectangularSpiral_Minor_OutwardRight[] = {MOVE_RIGHT, 474, SPIRAL_END}; +static const s16 sRectangularSpiral_Minor_OutwardLeft[] = {MOVE_LEFT, 295, 32, SPIRAL_END}; +static const s16 sRectangularSpiral_Minor_OutwardUp[] = {MOVE_UP, 58, SPIRAL_END}; +static const s16 sRectangularSpiral_Minor_OutwardDown[] = {MOVE_DOWN, 455, SPIRAL_END}; + +static const s16 sRectangularSpiral_Major_OutwardRight[] = {MOVE_RIGHT, 540, SPIRAL_END}; +static const s16 sRectangularSpiral_Major_OutwardLeft[] = {MOVE_LEFT, 229, SPIRAL_END}; +static const s16 sRectangularSpiral_Major_OutwardUp[] = {MOVE_UP, 244, 28, SPIRAL_END}; +static const s16 sRectangularSpiral_Major_OutwardDown[] = {MOVE_DOWN, 517, SPIRAL_END}; // Move data for spiral lines starting in the top left / bottom right static const s16 *const sRectangularSpiral_MoveDataTable_MajorDiagonal[] = { - gUnknown_085C8C90, - gUnknown_085C8CA4, - gUnknown_085C8C98, - gUnknown_085C8C9E, - gUnknown_085C8CEA, - gUnknown_085C8CE4, - gUnknown_085C8CF2, - gUnknown_085C8CDE + [SPIRAL_INWARD_START] = + sRectangularSpiral_Major_InwardRight, + sRectangularSpiral_Major_InwardDown, + sRectangularSpiral_Major_InwardLeft, + sRectangularSpiral_Major_InwardUp, + + [SPIRAL_OUTWARD_START] = + sRectangularSpiral_Major_OutwardUp, + sRectangularSpiral_Major_OutwardLeft, + sRectangularSpiral_Major_OutwardDown, + sRectangularSpiral_Major_OutwardRight }; // Move data for spiral lines starting in the top right / bottom left static const s16 *const sRectangularSpiral_MoveDataTable_MinorDiagonal[] = { - gUnknown_085C8CBC, - gUnknown_085C8CB0, - gUnknown_085C8CB6, - gUnknown_085C8CAA, - gUnknown_085C8CCA, - gUnknown_085C8CD8, - gUnknown_085C8CC4, - gUnknown_085C8CD2 + [SPIRAL_INWARD_START] = + sRectangularSpiral_Minor_InwardDown, + sRectangularSpiral_Minor_InwardLeft, + sRectangularSpiral_Minor_InwardUp, + sRectangularSpiral_Minor_InwardRight, + + [SPIRAL_OUTWARD_START] = + sRectangularSpiral_Minor_OutwardLeft, + sRectangularSpiral_Minor_OutwardDown, + sRectangularSpiral_Minor_OutwardRight, + sRectangularSpiral_Minor_OutwardUp }; static const s16 *const *const sRectangularSpiral_MoveDataTables[] = @@ -738,7 +759,7 @@ static const TransitionStateFunc sAngledWipes_Funcs[] = static const s16 sAngledWipes_MoveData[NUM_ANGLED_WIPES][5] = { -// startX startY endX endY yDirection +// startX startY endX endY yDirection {56, 0, 0, DISPLAY_HEIGHT, 0}, {104, DISPLAY_HEIGHT, DISPLAY_WIDTH, 88, 1}, {DISPLAY_WIDTH, 72, 56, 0, 1}, @@ -908,8 +929,8 @@ static const TransitionStateFunc sFrontierLogoWave_Funcs[] = { FrontierLogoWave_Init, FrontierLogoWave_SetGfx, - FrontierLogoWave_Func3, - FrontierLogoWave_Func4 + FrontierLogoWave_InitScanline, + FrontierLogoWave_Main }; static const TransitionStateFunc sFrontierSquares_Funcs[] = @@ -923,38 +944,54 @@ static const TransitionStateFunc sFrontierSquares_Funcs[] = static const TransitionStateFunc sFrontierSquaresSpiral_Funcs[] = { FrontierSquaresSpiral_Init, - FrontierSquaresSpiral_Func2, - FrontierSquaresSpiral_Func3, - FrontierSquaresSpiral_Func4, + FrontierSquaresSpiral_Outward, + FrontierSquaresSpiral_SetBlack, + FrontierSquaresSpiral_Inward, FrontierSquares_End }; static const TransitionStateFunc sFrontierSquaresScroll_Funcs[] = { FrontierSquaresScroll_Init, - FrontierSquaresScroll_Func2, - FrontierSquaresScroll_Func3, - FrontierSquaresScroll_Func4, + FrontierSquaresScroll_Draw, + FrontierSquaresScroll_SetBlack, + FrontierSquaresScroll_Erase, FrontierSquaresScroll_End }; -static const u8 gUnknown_085C9A30[] = { - 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, - 0x1b, 0x14, 0x0d, 0x06, 0x05, 0x04, 0x03, - 0x02, 0x01, 0x00, 0x07, 0x0e, 0x15, 0x16, - 0x17, 0x18, 0x19, 0x1a, 0x13, 0x0c, 0x0b, - 0x0a, 0x09, 0x08, 0x0f, 0x10, 0x11, 0x12 +// Dimensions for the 2 non-scrolling frontier square transitions. +// SQUARE_SIZE is the same in the scrolling version but it uses +// more because it needs to show more than can be shown at a single +// time n-screen. +#define SQUARE_SIZE 4 +#define MARGIN_SIZE 1 // Squares do not fit evenly across the width, so there is a margin on either side. +#define NUM_SQUARES_PER_ROW ((DISPLAY_WIDTH - (MARGIN_SIZE * 8 * 2)) / (SQUARE_SIZE * 8)) +#define NUM_SQUARES_PER_COL (DISPLAY_HEIGHT / (SQUARE_SIZE * 8)) +#define NUM_SQUARES (NUM_SQUARES_PER_ROW * NUM_SQUARES_PER_COL) + +// The order in which the squares should appear/disappear to create +// the spiral effect. Spiraling inward starts with the first element, +// and spiraling outward starts with the last. The positions are the +// squares numbered left-to-right top-to-bottom. +static const u8 sFrontierSquaresSpiral_Positions[NUM_SQUARES] = { + 28, 29, 30, 31, 32, 33, 34, + 27, 20, 13, 6, 5, 4, 3, + 2, 1, 0, 7, 14, 21, 22, + 23, 24, 25, 26, 19, 12, 11, + 10, 9, 8, 15, 16, 17, 18 }; -static const u8 gUnknown_085C9A53[] = { - 0x00, 0x10, 0x29, 0x16, 0x2c, 0x02, 0x2b, 0x15, - 0x2e, 0x1b, 0x09, 0x30, 0x26, 0x05, 0x39, 0x3b, - 0x0c, 0x3f, 0x23, 0x1c, 0x0a, 0x35, 0x07, 0x31, - 0x27, 0x17, 0x37, 0x01, 0x3e, 0x11, 0x3d, 0x1e, - 0x06, 0x22, 0x0f, 0x33, 0x20, 0x3a, 0x0d, 0x2d, - 0x25, 0x34, 0x0b, 0x18, 0x3c, 0x13, 0x38, 0x21, - 0x1d, 0x32, 0x28, 0x36, 0x0e, 0x03, 0x2f, 0x14, - 0x12, 0x19, 0x04, 0x24, 0x1a, 0x2a, 0x1f, 0x08 +// In the scrolling version the squares appear/disappear in a "random" order +// dictated by the list below. +static const u8 sFrontierSquaresScroll_Positions[] = { + 0, 16, 41, 22, 44, 2, 43, 21, + 46, 27, 9, 48, 38, 5, 57, 59, + 12, 63, 35, 28, 10, 53, 7, 49, + 39, 23, 55, 1, 62, 17, 61, 30, + 6, 34, 15, 51, 32, 58, 13, 45, + 37, 52, 11, 24, 60, 19, 56, 33, + 29, 50, 40, 54, 14, 3, 47, 20, + 18, 25, 4, 36, 26, 42, 31, 8 }; //--------------------------- @@ -1036,7 +1073,7 @@ static void Task_BattleTransition(u8 taskId) static bool8 Transition_StartIntro(struct Task *task) { SetWeatherScreenFadeOut(); - CpuCopy32(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); + CpuCopy32(gPlttBufferFaded, gPlttBufferUnfaded, sizeof(gPlttBufferUnfaded)); if (sTasks_Intro[task->tTransitionId] != NULL) { CreateTask(sTasks_Intro[task->tTransitionId], 4); @@ -3158,40 +3195,40 @@ static bool8 RectangularSpiral_Init(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); CpuCopy16(sShrinkingBoxTileset, tileset, 0x20); - CpuCopy16(sShrinkingBoxTileset + 0x70, tileset + 0x20, 0x20); + CpuCopy16(&sShrinkingBoxTileset[0x70], &tileset[0x20], 0x20); CpuFill16(0xF0 << 8, tilemap, BG_SCREEN_SIZE); LoadPalette(sFieldEffectPal_Pokeball, 0xF0, sizeof(sFieldEffectPal_Pokeball)); task->data[3] = 1; task->tState++; - // Top left - sRectangularSpiralLines[0].state = 0; + // Line starting in top left + sRectangularSpiralLines[0].state = SPIRAL_INWARD_START; sRectangularSpiralLines[0].position = -1; sRectangularSpiralLines[0].moveIdx = 1; - sRectangularSpiralLines[0].skipPosition = 308; - sRectangularSpiralLines[0].field_8 = 0; + sRectangularSpiralLines[0].reboundPosition = 308; + sRectangularSpiralLines[0].outward = FALSE; - // Bottom right - sRectangularSpiralLines[1].state = 0; + // Line starting in bottom right + sRectangularSpiralLines[1].state = SPIRAL_INWARD_START; sRectangularSpiralLines[1].position = -1; sRectangularSpiralLines[1].moveIdx = 1; - sRectangularSpiralLines[1].skipPosition = 308; - sRectangularSpiralLines[1].field_8 = 0; + sRectangularSpiralLines[1].reboundPosition = 308; + sRectangularSpiralLines[1].outward = FALSE; - // Top right - sRectangularSpiralLines[2].state = 0; + // Line starting in top right + sRectangularSpiralLines[2].state = SPIRAL_INWARD_START; sRectangularSpiralLines[2].position = -3; sRectangularSpiralLines[2].moveIdx = 1; - sRectangularSpiralLines[2].skipPosition = 307; - sRectangularSpiralLines[2].field_8 = 0; + sRectangularSpiralLines[2].reboundPosition = 307; + sRectangularSpiralLines[2].outward = FALSE; - // Bottom left - sRectangularSpiralLines[3].state = 0; + // Line starting in bottom left + sRectangularSpiralLines[3].state = SPIRAL_INWARD_START; sRectangularSpiralLines[3].position = -3; sRectangularSpiralLines[3].moveIdx = 1; - sRectangularSpiralLines[3].skipPosition = 307; - sRectangularSpiralLines[3].field_8 = 0; + sRectangularSpiralLines[3].reboundPosition = 307; + sRectangularSpiralLines[3].outward = FALSE; return FALSE; } @@ -3219,7 +3256,7 @@ static bool8 RectangularSpiral_Main(struct Task *task) done = FALSE; position = sRectangularSpiralLines[j].position; - // Invert position for the two bottom lines + // Invert position for the two lines that start at the bottom. if ((j % 2) == 1) position = 637 - position; @@ -3248,6 +3285,10 @@ static bool8 RectangularSpiral_End(struct Task *task) static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, struct RectangularSpiralLine *line) { const s16 *moveData = moveDataTable[line->state]; + + // Has spiral finished? + // Note that most move data arrays endsin SPIRAL_END but it is + // only ever reached on the final array of spiraling outward. if (moveData[line->moveIdx] == SPIRAL_END) return FALSE; @@ -3257,18 +3298,22 @@ static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, stru sDebug_RectangularSpiralData = moveData[2]; sDebug_RectangularSpiralData = moveData[3]; + // Note that for the two lines originating at the bottom the + // position is inverted, so the directions are flipped. + // i.e. position += 1 is right for the top lines and left + // for their inverted partners on the bottom. switch (moveData[0]) { - case 1: + case MOVE_RIGHT: line->position += 1; break; - case 2: + case MOVE_LEFT: line->position -= 1; break; - case 3: + case MOVE_UP: line->position -= 32; break; - case 4: + case MOVE_DOWN: line->position += 32; break; } @@ -3278,31 +3323,40 @@ static bool16 UpdateRectangularSpiralLine(const s16 * const *moveDataTable, stru if (line->position >= 640 || moveData[line->moveIdx] == SPIRAL_END) return FALSE; - if (line->field_8 == 0 && moveData[line->moveIdx] == SPIRAL_SKIP) + if (!line->outward && moveData[line->moveIdx] == SPIRAL_REBOUND) { - line->field_8 = 1; + // Line has reached the final point of spiraling inward. + // Time to flip and start spiraling outward. + line->outward = TRUE; line->moveIdx = 1; - line->position = line->skipPosition; - line->state = 4; + line->position = line->reboundPosition; + line->state = SPIRAL_OUTWARD_START; } + // Reached move target, advance to next movement. if (line->position == moveData[line->moveIdx]) { line->state++; - if (line->field_8 == 1) + if (line->outward == TRUE) { - if (line->state > 7) + if (line->state > SPIRAL_OUTWARD_END) { + // Still spiraling outward, loop back to the first state + // but use the second set of move targets. + // For example, the 28 in sRectangularSpiral_Major_OutwardUp line->moveIdx++; - line->state = 4; + line->state = SPIRAL_OUTWARD_START; } } else { - if (line->state > 3) + if (line->state > SPIRAL_INWARD_END) { + // Still spiraling inward, loop back to the first state + // but use the second set of move targets. + // For example, the 275 in sRectangularSpiral_Major_InwardRight line->moveIdx++; - line->state = 0; + line->state = SPIRAL_INWARD_START; } } } @@ -4181,6 +4235,7 @@ static bool8 UpdateBlackWipe(s16 *data, bool8 xExact, bool8 yExact) // B_TRANSITION_FRONTIER_LOGO_WIGGLE //----------------------------------- +#define tSinIndex data[4] #define tAmplitude data[5] static bool8 FrontierLogoWiggle_Init(struct Task *task) @@ -4203,7 +4258,7 @@ static bool8 FrontierLogoWiggle_SetGfx(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); LZ77UnCompVram(sFrontierLogo_Tilemap, tilemap); - SetSinWave(gScanlineEffectRegBuffers[0], 0, task->data[4], 0x84, task->tAmplitude, DISPLAY_HEIGHT); + SetSinWave(gScanlineEffectRegBuffers[0], 0, task->tSinIndex, 132, task->tAmplitude, DISPLAY_HEIGHT); task->tState++; return TRUE; @@ -4214,6 +4269,7 @@ static void Task_FrontierLogoWiggle(u8 taskId) while (sFrontierLogoWiggle_Funcs[gTasks[taskId].tState](&gTasks[taskId])); } +#undef tSinIndex #undef tAmplitude //--------------------------------- @@ -4270,7 +4326,7 @@ static bool8 FrontierLogoWave_SetGfx(struct Task *task) return TRUE; } -static bool8 FrontierLogoWave_Func3(struct Task *task) +static bool8 FrontierLogoWave_InitScanline(struct Task *task) { u8 i; @@ -4285,7 +4341,7 @@ static bool8 FrontierLogoWave_Func3(struct Task *task) return TRUE; } -static bool8 FrontierLogoWave_Func4(struct Task *task) +static bool8 FrontierLogoWave_Main(struct Task *task) { u8 i; u16 sinVal, amplitude, sinSpread; @@ -4300,8 +4356,8 @@ static bool8 FrontierLogoWave_Func4(struct Task *task) if (task->tTimer >= 70) { - // Decrease amount logo moves up and down - // until it rests in the middle of the screen. + // Decrease amount of logo movement and distortion + // until it rests normally in the middle of the screen. if (task->tAmplitudeVal - 384 >= 0) task->tAmplitudeVal -= 384; else @@ -4319,7 +4375,7 @@ static bool8 FrontierLogoWave_Func4(struct Task *task) sTransitionData->BLDALPHA = BLDALPHA_BLEND(task->tBlendTarget2, task->tBlendTarget1); } - // Move logo up and down + // Move logo up and down and distort it for (i = 0; i < DISPLAY_HEIGHT; i++, sinVal += sinSpread) { s16 index = sinVal / 256; @@ -4369,10 +4425,6 @@ static void HBlankCB_FrontierLogoWave(void) // and B_TRANSITION_FRONTIER_SQUARES_SPIRAL //---------------------------------------------------------------------- -#define NUM_SQUARES_PER_ROW 7 -#define NUM_SQUARES_PER_COL 5 -#define SQUARE_SIZE 4 - #define tPosX data[2] #define tPosY data[3] #define tRowPos data[4] @@ -4402,13 +4454,13 @@ static bool8 FrontierSquares_Init(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); LZ77UnCompVram(sFrontierSquares_FilledBg_Tileset, tileset); - FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); - FillBgTilemapBufferRect(0, 1, 0, 0, 1, 0x20, 0xF); - FillBgTilemapBufferRect(0, 1, 0x1D, 0, 1, 0x20, 0xF); + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); + FillBgTilemapBufferRect(0, 1, 0, 0, MARGIN_SIZE, 32, 15); + FillBgTilemapBufferRect(0, 1, 30 - MARGIN_SIZE, 0, MARGIN_SIZE, 32, 15); CopyBgTilemapBufferToVram(0); LoadPalette(sFrontierSquares_Palette, 0xF0, sizeof(sFrontierSquares_Palette)); - task->tPosX = 1; + task->tPosX = MARGIN_SIZE; task->tPosY = 0; task->tRowPos = 0; task->tShrinkDelay = 10; @@ -4429,7 +4481,7 @@ static bool8 FrontierSquares_Draw(struct Task *task) task->tPosX += SQUARE_SIZE; if (++task->tRowPos == NUM_SQUARES_PER_ROW) { - task->tPosX = 1; + task->tPosX = MARGIN_SIZE; task->tPosY += SQUARE_SIZE; task->tRowPos = 0; if (task->tPosY >= NUM_SQUARES_PER_COL * SQUARE_SIZE) @@ -4452,8 +4504,8 @@ static bool8 FrontierSquares_Shrink(struct Task *task) case 0: for (i = 250; i < 255; i++) { - gPlttBufferUnfaded[i] = 0; - gPlttBufferFaded[i] = 0; + gPlttBufferUnfaded[i] = RGB_BLACK; + gPlttBufferFaded[i] = RGB_BLACK; } break; case 1: @@ -4467,7 +4519,7 @@ static bool8 FrontierSquares_Shrink(struct Task *task) LZ77UnCompVram(sFrontierSquares_Shrink2_Tileset, tileset); break; default: - FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 0x20, 0x20); + FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 32, 32); CopyBgTilemapBufferToVram(0); task->tState++; return FALSE; @@ -4487,6 +4539,9 @@ static bool8 FrontierSquares_Shrink(struct Task *task) #undef tShrinkDelayTimer #undef tShrinkDelay +#define tSquareNum data[2] +#define tFadeFlag data[3] + static bool8 FrontierSquaresSpiral_Init(struct Task *task) { u16 *tilemap, *tileset; @@ -4494,83 +4549,81 @@ static bool8 FrontierSquaresSpiral_Init(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); LZ77UnCompVram(sFrontierSquares_FilledBg_Tileset, tileset); - FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); - FillBgTilemapBufferRect(0, 1, 0, 0, 1, 0x20, 0xF); - FillBgTilemapBufferRect(0, 1, 0x1D, 0, 1, 0x20, 0xF); + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); + FillBgTilemapBufferRect(0, 1, 0, 0, MARGIN_SIZE, 32, 15); + FillBgTilemapBufferRect(0, 1, 30 - MARGIN_SIZE, 0, MARGIN_SIZE, 32, 15); CopyBgTilemapBufferToVram(0); LoadPalette(sFrontierSquares_Palette, 0xE0, sizeof(sFrontierSquares_Palette)); LoadPalette(sFrontierSquares_Palette, 0xF0, sizeof(sFrontierSquares_Palette)); - BlendPalette(0xE0, 16, 8, 0); + BlendPalette(0xE0, 16, 8, RGB_BLACK); - task->data[2] = 34; - task->data[3] = 0; + task->tSquareNum = NUM_SQUARES - 1; + task->tFadeFlag = 0; task->tState++; return FALSE; } -static bool8 FrontierSquaresSpiral_Func2(struct Task *task) +static bool8 FrontierSquaresSpiral_Outward(struct Task *task) { - u8 var = gUnknown_085C9A30[task->data[2]]; - u8 varMod = var % 7; - u8 varDiv = var / 7; - CopyRectToBgTilemapBufferRect(0, &sFrontierSquares_Tilemap, 0, 0, 4, 4, 4 * varMod + 1, 4 * varDiv, 4, 4, 0xF, 0, 0); + u8 pos = sFrontierSquaresSpiral_Positions[task->tSquareNum]; + u8 x = pos % NUM_SQUARES_PER_ROW; + u8 y = pos / NUM_SQUARES_PER_ROW; + CopyRectToBgTilemapBufferRect(0, sFrontierSquares_Tilemap, 0, 0, + SQUARE_SIZE, SQUARE_SIZE, + SQUARE_SIZE * x + MARGIN_SIZE, SQUARE_SIZE * y, + SQUARE_SIZE, SQUARE_SIZE, + 15, 0, 0); CopyBgTilemapBufferToVram(0); - if (--task->data[2] < 0) + if (--task->tSquareNum < 0) task->tState++; return FALSE; } -static bool8 FrontierSquaresSpiral_Func3(struct Task *task) +// Now that the overworld is completely covered by the squares, +// set it to black so it's not revealed when the squares are removed. +static bool8 FrontierSquaresSpiral_SetBlack(struct Task *task) { - BlendPalette(0xE0, 16, 3, 0); + BlendPalette(0xE0, 16, 3, RGB_BLACK); BlendPalettes(PALETTES_ALL & ~(1 << 15 | 1 << 14), 16, RGB_BLACK); - task->data[2] = 0; - task->data[3] = 0; + task->tSquareNum = 0; + task->tFadeFlag = 0; task->tState++; return FALSE; } -static bool8 FrontierSquaresSpiral_Func4(struct Task *task) +// Spiral inward erasing the squares +static bool8 FrontierSquaresSpiral_Inward(struct Task *task) { - if ((task->data[3] ^= 1)) + // Each square is faded first, then the one that was faded last move is erased. + if (task->tFadeFlag ^= 1) { - CopyRectToBgTilemapBufferRect( - 0, - sFrontierSquares_Tilemap, - 0, - 0, - 4, - 4, - 4 * (gUnknown_085C9A30[task->data[2]] % 7) + 1, - 4 * (gUnknown_085C9A30[task->data[2]] / 7), - 4, - 4, - 0xE, - 0, - 0); + // Shade square + CopyRectToBgTilemapBufferRect(0, sFrontierSquares_Tilemap, 0, 0, + SQUARE_SIZE, SQUARE_SIZE, + SQUARE_SIZE * (sFrontierSquaresSpiral_Positions[task->tSquareNum] % NUM_SQUARES_PER_ROW) + MARGIN_SIZE, + SQUARE_SIZE * (sFrontierSquaresSpiral_Positions[task->tSquareNum] / NUM_SQUARES_PER_ROW), + SQUARE_SIZE, SQUARE_SIZE, + 14, 0, 0); } else { - if (task->data[2] > 0) + if (task->tSquareNum > 0) { - FillBgTilemapBufferRect( - 0, - 1, - 4 * (gUnknown_085C9A30[task->data[2] - 1] % 7) + 1, - 4 * (gUnknown_085C9A30[task->data[2] - 1] / 7), - 4, - 4, - 0xF); + // Erase square + FillBgTilemapBufferRect(0, 1, + SQUARE_SIZE * (sFrontierSquaresSpiral_Positions[task->tSquareNum - 1] % NUM_SQUARES_PER_ROW) + MARGIN_SIZE, + SQUARE_SIZE * (sFrontierSquaresSpiral_Positions[task->tSquareNum - 1] / NUM_SQUARES_PER_ROW), + SQUARE_SIZE, SQUARE_SIZE, + 15); } - - task->data[2]++; + task->tSquareNum++; } - if (task->data[2] > 34) + if (task->tSquareNum >= NUM_SQUARES) task->tState++; CopyBgTilemapBufferToVram(0); @@ -4579,26 +4632,30 @@ static bool8 FrontierSquaresSpiral_Func4(struct Task *task) static bool8 FrontierSquares_End(struct Task *task) { - FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 0x20, 0x20); + FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 32, 32); CopyBgTilemapBufferToVram(0); BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); DestroyTask(FindTaskIdByFunc(task->func)); return FALSE; } -// sub task for phase2 32 -#define tSub32_X_delta data[0] -#define tSub32_Y_delta data[1] -#define tSub32_Bool data[2] +#undef tSquareNum +#undef tFadeFlag -static void sub_814ABE4(u8 taskId) +#define tScrollXDir data[0] +#define tScrollYDir data[1] +#define tScrollUpdateFlag data[2] + +#define tSquareNum data[2] + +static void Task_ScrollBg(u8 taskId) { - if (!(gTasks[taskId].tSub32_Bool ^= 1)) + if (!(gTasks[taskId].tScrollUpdateFlag ^= 1)) { SetGpuReg(REG_OFFSET_BG0VOFS, gBattle_BG0_X); SetGpuReg(REG_OFFSET_BG0HOFS, gBattle_BG0_Y); - gBattle_BG0_X += gTasks[taskId].tSub32_X_delta; - gBattle_BG0_Y += gTasks[taskId].tSub32_Y_delta; + gBattle_BG0_X += gTasks[taskId].tScrollXDir; + gBattle_BG0_Y += gTasks[taskId].tScrollYDir; } } @@ -4609,7 +4666,7 @@ static bool8 FrontierSquaresScroll_Init(struct Task *task) GetBg0TilesDst(&tilemap, &tileset); LZ77UnCompVram(sFrontierSquares_FilledBg_Tileset, tileset); - FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); CopyBgTilemapBufferToVram(0); LoadPalette(sFrontierSquares_Palette, 0xF0, sizeof(sFrontierSquares_Palette)); @@ -4618,25 +4675,27 @@ static bool8 FrontierSquaresScroll_Init(struct Task *task) SetGpuReg(REG_OFFSET_BG0VOFS, gBattle_BG0_X); SetGpuReg(REG_OFFSET_BG0HOFS, gBattle_BG0_Y); - task->data[2] = 0; - taskId = CreateTask(sub_814ABE4, 1); + task->tSquareNum = 0; + + // Start scrolling bg in a random direction. + taskId = CreateTask(Task_ScrollBg, 1); switch (Random() % 4) { - case 0: - gTasks[taskId].tSub32_X_delta = 1; - gTasks[taskId].tSub32_Y_delta = 1; + case 0: // Down/right + gTasks[taskId].tScrollXDir = 1; + gTasks[taskId].tScrollYDir = 1; break; - case 1: - gTasks[taskId].tSub32_X_delta = -1; - gTasks[taskId].tSub32_Y_delta = -1; + case 1: // Up/left + gTasks[taskId].tScrollXDir = -1; + gTasks[taskId].tScrollYDir = -1; break; - case 2: - gTasks[taskId].tSub32_X_delta = 1; - gTasks[taskId].tSub32_Y_delta = -1; + case 2: // Up/right + gTasks[taskId].tScrollXDir = 1; + gTasks[taskId].tScrollYDir = -1; break; - default: - gTasks[taskId].tSub32_X_delta = -1; - gTasks[taskId].tSub32_Y_delta = 1; + default: // Down/left + gTasks[taskId].tScrollXDir = -1; + gTasks[taskId].tScrollYDir = 1; break; } @@ -4644,65 +4703,57 @@ static bool8 FrontierSquaresScroll_Init(struct Task *task) return FALSE; } -static bool8 FrontierSquaresScroll_Func2(struct Task *task) +static bool8 FrontierSquaresScroll_Draw(struct Task *task) { - u8 var = gUnknown_085C9A53[task->data[2]]; - u8 varDiv = var / 8; - u8 varAnd = var & 7; + u8 pos = sFrontierSquaresScroll_Positions[task->tSquareNum]; + u8 x = pos / (NUM_SQUARES_PER_ROW + 1); // +1 because during scroll an additional column covers the margin. + u8 y = pos % (NUM_SQUARES_PER_ROW + 1); - CopyRectToBgTilemapBufferRect( - 0, - &sFrontierSquares_Tilemap, - 0, - 0, - 4, - 4, - 4 * varDiv + 1, - 4 * varAnd, - 4, - 4, - 0xF, - 0, - 0); + CopyRectToBgTilemapBufferRect(0, &sFrontierSquares_Tilemap, 0, 0, + SQUARE_SIZE, SQUARE_SIZE, + SQUARE_SIZE * x + MARGIN_SIZE, SQUARE_SIZE * y, + SQUARE_SIZE, SQUARE_SIZE, + 15, 0, 0); CopyBgTilemapBufferToVram(0); - if (++task->data[2] > 63) + if (++task->tSquareNum >= (int)ARRAY_COUNT(sFrontierSquaresScroll_Positions)) task->tState++; return 0; } -static bool8 FrontierSquaresScroll_Func3(struct Task *task) +// Now that the overworld is completely covered by the squares, +// set it to black so it's not revealed when the squares are removed. +static bool8 FrontierSquaresScroll_SetBlack(struct Task *task) { BlendPalettes(PALETTES_ALL & ~(1 << 15), 16, RGB_BLACK); - task->data[2] = 0; + task->tSquareNum = 0; task->tState++; return FALSE; } -static bool8 FrontierSquaresScroll_Func4(struct Task *task) +static bool8 FrontierSquaresScroll_Erase(struct Task *task) { - u8 var = gUnknown_085C9A53[task->data[2]]; - u8 varDiv = var / 8; - u8 varAnd = var % 8; + u8 pos = sFrontierSquaresScroll_Positions[task->tSquareNum]; + u8 x = pos / (NUM_SQUARES_PER_ROW + 1); + u8 y = pos % (NUM_SQUARES_PER_ROW + 1); - FillBgTilemapBufferRect(0, 1, 4 * varDiv + 1, 4 * varAnd, 4, 4, 0xF); + FillBgTilemapBufferRect(0, 1, + SQUARE_SIZE * x + MARGIN_SIZE, SQUARE_SIZE * y, + SQUARE_SIZE, SQUARE_SIZE, + 15); CopyBgTilemapBufferToVram(0); - if (++task->data[2] > 63) + if (++task->tSquareNum >= (int)ARRAY_COUNT(sFrontierSquaresScroll_Positions)) { - DestroyTask(FindTaskIdByFunc(sub_814ABE4)); + DestroyTask(FindTaskIdByFunc(Task_ScrollBg)); task->tState++; } return FALSE; } -#undef tSub32_X_delta -#undef tSub32_Y_delta -#undef tSub32_Bool - static bool8 FrontierSquaresScroll_End(struct Task *task) { gBattle_BG0_X = 0; @@ -4710,7 +4761,7 @@ static bool8 FrontierSquaresScroll_End(struct Task *task) SetGpuReg(REG_OFFSET_BG0VOFS, 0); SetGpuReg(REG_OFFSET_BG0HOFS, gBattle_BG0_Y); - FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 0x20, 0x20); + FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 32, 32); CopyBgTilemapBufferToVram(0); BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); @@ -4721,3 +4772,8 @@ static bool8 FrontierSquaresScroll_End(struct Task *task) #endif return FALSE; } + +#undef tScrollXDir +#undef tScrollYDir +#undef tScrollUpdateFlag +#undef tSquareNum From 886551f655ee0651b47ad81e55404059f3e2673b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 29 Oct 2021 18:43:27 -0400 Subject: [PATCH 111/417] Clean up battle transition doc --- src/battle_transition.c | 350 ++++++++++++++++++++-------------------- 1 file changed, 173 insertions(+), 177 deletions(-) diff --git a/src/battle_transition.c b/src/battle_transition.c index 6aa3883024..1e421b5e47 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -87,48 +87,48 @@ struct RectangularSpiralLine typedef bool8 (*TransitionStateFunc)(struct Task *task); typedef bool8 (*TransitionSpriteCallback)(struct Sprite *sprite); -static bool8 Transition_StartIntro(struct Task *task); -static bool8 Transition_WaitForIntro(struct Task *task); -static bool8 Transition_StartMain(struct Task *task); -static bool8 Transition_WaitForMain(struct Task *task); +static bool8 Transition_StartIntro(struct Task *); +static bool8 Transition_WaitForIntro(struct Task *); +static bool8 Transition_StartMain(struct Task *); +static bool8 Transition_WaitForMain(struct Task *); -static void LaunchBattleTransitionTask(u8 transitionId); -static void Task_BattleTransition(u8 taskId); -static void Task_Intro(u8 taskId); -static void Task_Blur(u8 taskId); -static void Task_Swirl(u8 taskId); -static void Task_Shuffle(u8 taskId); -static void Task_BigPokeball(u8 taskId); -static void Task_PokeballsTrail(u8 taskId); -static void Task_ClockwiseWipe(u8 taskId); -static void Task_Ripple(u8 taskId); -static void Task_Wave(u8 taskId); -static void Task_Slice(u8 taskId); -static void Task_WhiteBarsFade(u8 taskId); -static void Task_GridSquares(u8 taskId); -static void Task_AngledWipes(u8 taskId); -static void Task_Sidney(u8 taskId); -static void Task_Phoebe(u8 taskId); -static void Task_Glacia(u8 taskId); -static void Task_Drake(u8 taskId); -static void Task_Champion(u8 taskId); -static void Task_Aqua(u8 taskId); -static void Task_Magma(u8 taskId); -static void Task_Regice(u8 taskId); -static void Task_Registeel(u8 taskId); -static void Task_Regirock(u8 taskId); -static void Task_Kyogre(u8 taskId); -static void Task_Groudon(u8 taskId); -static void Task_Rayquaza(u8 taskId); -static void Task_ShredSplit(u8 taskId); -static void Task_Blackhole(u8 taskId); -static void Task_BlackholePulsate(u8 taskId); -static void Task_RectangularSpiral(u8 taskId); -static void Task_FrontierLogoWiggle(u8 taskId); -static void Task_FrontierLogoWave(u8 taskId); -static void Task_FrontierSquares(u8 taskId); -static void Task_FrontierSquaresScroll(u8 taskId); -static void Task_FrontierSquaresSpiral(u8 taskId); +static void LaunchBattleTransitionTask(u8); +static void Task_BattleTransition(u8); +static void Task_Intro(u8); +static void Task_Blur(u8); +static void Task_Swirl(u8); +static void Task_Shuffle(u8); +static void Task_BigPokeball(u8); +static void Task_PokeballsTrail(u8); +static void Task_ClockwiseWipe(u8); +static void Task_Ripple(u8); +static void Task_Wave(u8); +static void Task_Slice(u8); +static void Task_WhiteBarsFade(u8); +static void Task_GridSquares(u8); +static void Task_AngledWipes(u8); +static void Task_Sidney(u8); +static void Task_Phoebe(u8); +static void Task_Glacia(u8); +static void Task_Drake(u8); +static void Task_Champion(u8); +static void Task_Aqua(u8); +static void Task_Magma(u8); +static void Task_Regice(u8); +static void Task_Registeel(u8); +static void Task_Regirock(u8); +static void Task_Kyogre(u8); +static void Task_Groudon(u8); +static void Task_Rayquaza(u8); +static void Task_ShredSplit(u8); +static void Task_Blackhole(u8); +static void Task_BlackholePulsate(u8); +static void Task_RectangularSpiral(u8); +static void Task_FrontierLogoWiggle(u8); +static void Task_FrontierLogoWave(u8); +static void Task_FrontierSquares(u8); +static void Task_FrontierSquaresScroll(u8); +static void Task_FrontierSquaresSpiral(u8); static void VBlankCB_BattleTransition(void); static void VBlankCB_Swirl(void); static void HBlankCB_Swirl(void); @@ -149,144 +149,144 @@ static void VBlankCB_WhiteBarsFade_Blend(void); static void HBlankCB_WhiteBarsFade(void); static void VBlankCB_AngledWipes(void); static void VBlankCB_Rayquaza(void); -static bool8 Blur_Init(struct Task *task); -static bool8 Blur_Main(struct Task *task); -static bool8 Blur_End(struct Task *task); -static bool8 Swirl_Init(struct Task *task); -static bool8 Swirl_End(struct Task *task); -static bool8 Shuffle_Init(struct Task *task); -static bool8 Shuffle_End(struct Task *task); -static bool8 Aqua_Init(struct Task *task); -static bool8 Aqua_SetGfx(struct Task *task); -static bool8 Magma_Init(struct Task *task); -static bool8 Magma_SetGfx(struct Task *task); -static bool8 FramesCountdown(struct Task *task); -static bool8 Regi_Init(struct Task *task); -static bool8 Regice_SetGfx(struct Task *task); -static bool8 Registeel_SetGfx(struct Task *task); -static bool8 Regirock_SetGfx(struct Task *task); -static bool8 WeatherTrio_BgFadeBlack(struct Task *task); -static bool8 WeatherTrio_WaitFade(struct Task *task); -static bool8 Kyogre_Init(struct Task *task); -static bool8 Kyogre_PaletteFlash(struct Task *task); -static bool8 Kyogre_PaletteBrighten(struct Task *task); -static bool8 Groudon_Init(struct Task *task); -static bool8 Groudon_PaletteFlash(struct Task *task); -static bool8 Groudon_PaletteBrighten(struct Task *task); -static bool8 WeatherDuo_FadeOut(struct Task *task); -static bool8 WeatherDuo_End(struct Task *task); -static bool8 BigPokeball_Init(struct Task *task); -static bool8 BigPokeball_SetGfx(struct Task *task); -static bool8 PatternWeave_Blend1(struct Task *task); -static bool8 PatternWeave_Blend2(struct Task *task); -static bool8 PatternWeave_FinishAppear(struct Task *task); -static bool8 PatternWeave_CircularMask(struct Task *task); -static bool8 PokeballsTrail_Init(struct Task *task); -static bool8 PokeballsTrail_Main(struct Task *task); -static bool8 PokeballsTrail_End(struct Task *task); -static bool8 ClockwiseWipe_Init(struct Task *task); -static bool8 ClockwiseWipe_TopRight(struct Task *task); -static bool8 ClockwiseWipe_Right(struct Task *task); -static bool8 ClockwiseWipe_Bottom(struct Task *task); -static bool8 ClockwiseWipe_Left(struct Task *task); -static bool8 ClockwiseWipe_TopLeft(struct Task *task); -static bool8 ClockwiseWipe_End(struct Task *task); -static bool8 Ripple_Init(struct Task *task); -static bool8 Ripple_Main(struct Task *task); -static bool8 Wave_Init(struct Task *task); -static bool8 Wave_Main(struct Task *task); -static bool8 Wave_End(struct Task *task); -static bool8 Slice_Init(struct Task *task); -static bool8 Slice_Main(struct Task *task); -static bool8 Slice_End(struct Task *task); -static bool8 WhiteBarsFade_Init(struct Task *task); -static bool8 WhiteBarsFade_StartBars(struct Task *task); -static bool8 WhiteBarsFade_WaitBars(struct Task *task); -static bool8 WhiteBarsFade_BlendToBlack(struct Task *task); -static bool8 WhiteBarsFade_End(struct Task *task); -static bool8 GridSquares_Init(struct Task *task); -static bool8 GridSquares_Main(struct Task *task); -static bool8 GridSquares_End(struct Task *task); -static bool8 AngledWipes_Init(struct Task *task); -static bool8 AngledWipes_SetWipeData(struct Task *task); -static bool8 AngledWipes_DoWipe(struct Task *task); -static bool8 AngledWipes_TryEnd(struct Task *task); -static bool8 AngledWipes_StartNext(struct Task *task); -static bool8 ShredSplit_Init(struct Task *task); -static bool8 ShredSplit_Main(struct Task *task); -static bool8 ShredSplit_BrokenCheck(struct Task *task); -static bool8 ShredSplit_End(struct Task *task); -static bool8 Blackhole_Init(struct Task *task); -static bool8 Blackhole_Vibrate(struct Task *task); -static bool8 Blackhole_GrowEnd(struct Task *task); -static bool8 BlackholePulsate_Main(struct Task *task); -static bool8 RectangularSpiral_Init(struct Task *task); -static bool8 RectangularSpiral_Main(struct Task *task); -static bool8 RectangularSpiral_End(struct Task *task); -static bool8 FrontierLogoWiggle_Init(struct Task *task); -static bool8 FrontierLogoWiggle_SetGfx(struct Task *task); -static bool8 FrontierLogoWave_Init(struct Task *task); -static bool8 FrontierLogoWave_SetGfx(struct Task *task); -static bool8 FrontierLogoWave_InitScanline(struct Task *task); -static bool8 FrontierLogoWave_Main(struct Task *task); -static bool8 Rayquaza_Init(struct Task *task); -static bool8 Rayquaza_SetGfx(struct Task *task); -static bool8 Rayquaza_PaletteFlash(struct Task *task); -static bool8 Rayquaza_FadeToBlack(struct Task *task); -static bool8 Rayquaza_WaitFade(struct Task *task); -static bool8 Rayquaza_SetBlack(struct Task *task); -static bool8 Rayquaza_TriRing(struct Task *task); -static bool8 FrontierSquares_Init(struct Task *task); -static bool8 FrontierSquares_Draw(struct Task *task); -static bool8 FrontierSquares_Shrink(struct Task *task); -static bool8 FrontierSquares_End(struct Task *task); -static bool8 FrontierSquaresSpiral_Init(struct Task *task); -static bool8 FrontierSquaresSpiral_Outward(struct Task *task); -static bool8 FrontierSquaresSpiral_SetBlack(struct Task *task); -static bool8 FrontierSquaresSpiral_Inward(struct Task *task); -static bool8 FrontierSquaresScroll_Init(struct Task *task); -static bool8 FrontierSquaresScroll_Draw(struct Task *task); -static bool8 FrontierSquaresScroll_SetBlack(struct Task *task); -static bool8 FrontierSquaresScroll_Erase(struct Task *task); -static bool8 FrontierSquaresScroll_End(struct Task *task); -static bool8 Mugshot_Init(struct Task *task); -static bool8 Mugshot_SetGfx(struct Task *task); -static bool8 Mugshot_ShowBanner(struct Task *task); -static bool8 Mugshot_StartOpponentSlide(struct Task *task); -static bool8 Mugshot_WaitStartPlayerSlide(struct Task *task); -static bool8 Mugshot_WaitPlayerSlide(struct Task *task); -static bool8 Mugshot_GradualWhiteFade(struct Task *task); -static bool8 Mugshot_InitFadeWhiteToBlack(struct Task *task); -static bool8 Mugshot_FadeToBlack(struct Task *task); -static bool8 Mugshot_End(struct Task *task); -static void DoMugshotTransition(u8 taskId); -static void Mugshots_CreateTrainerPics(struct Task *task); +static bool8 Blur_Init(struct Task *); +static bool8 Blur_Main(struct Task *); +static bool8 Blur_End(struct Task *); +static bool8 Swirl_Init(struct Task *); +static bool8 Swirl_End(struct Task *); +static bool8 Shuffle_Init(struct Task *); +static bool8 Shuffle_End(struct Task *); +static bool8 Aqua_Init(struct Task *); +static bool8 Aqua_SetGfx(struct Task *); +static bool8 Magma_Init(struct Task *); +static bool8 Magma_SetGfx(struct Task *); +static bool8 FramesCountdown(struct Task *); +static bool8 Regi_Init(struct Task *); +static bool8 Regice_SetGfx(struct Task *); +static bool8 Registeel_SetGfx(struct Task *); +static bool8 Regirock_SetGfx(struct Task *); +static bool8 WeatherTrio_BgFadeBlack(struct Task *); +static bool8 WeatherTrio_WaitFade(struct Task *); +static bool8 Kyogre_Init(struct Task *); +static bool8 Kyogre_PaletteFlash(struct Task *); +static bool8 Kyogre_PaletteBrighten(struct Task *); +static bool8 Groudon_Init(struct Task *); +static bool8 Groudon_PaletteFlash(struct Task *); +static bool8 Groudon_PaletteBrighten(struct Task *); +static bool8 WeatherDuo_FadeOut(struct Task *); +static bool8 WeatherDuo_End(struct Task *); +static bool8 BigPokeball_Init(struct Task *); +static bool8 BigPokeball_SetGfx(struct Task *); +static bool8 PatternWeave_Blend1(struct Task *); +static bool8 PatternWeave_Blend2(struct Task *); +static bool8 PatternWeave_FinishAppear(struct Task *); +static bool8 PatternWeave_CircularMask(struct Task *); +static bool8 PokeballsTrail_Init(struct Task *); +static bool8 PokeballsTrail_Main(struct Task *); +static bool8 PokeballsTrail_End(struct Task *); +static bool8 ClockwiseWipe_Init(struct Task *); +static bool8 ClockwiseWipe_TopRight(struct Task *); +static bool8 ClockwiseWipe_Right(struct Task *); +static bool8 ClockwiseWipe_Bottom(struct Task *); +static bool8 ClockwiseWipe_Left(struct Task *); +static bool8 ClockwiseWipe_TopLeft(struct Task *); +static bool8 ClockwiseWipe_End(struct Task *); +static bool8 Ripple_Init(struct Task *); +static bool8 Ripple_Main(struct Task *); +static bool8 Wave_Init(struct Task *); +static bool8 Wave_Main(struct Task *); +static bool8 Wave_End(struct Task *); +static bool8 Slice_Init(struct Task *); +static bool8 Slice_Main(struct Task *); +static bool8 Slice_End(struct Task *); +static bool8 WhiteBarsFade_Init(struct Task *); +static bool8 WhiteBarsFade_StartBars(struct Task *); +static bool8 WhiteBarsFade_WaitBars(struct Task *); +static bool8 WhiteBarsFade_BlendToBlack(struct Task *); +static bool8 WhiteBarsFade_End(struct Task *); +static bool8 GridSquares_Init(struct Task *); +static bool8 GridSquares_Main(struct Task *); +static bool8 GridSquares_End(struct Task *); +static bool8 AngledWipes_Init(struct Task *); +static bool8 AngledWipes_SetWipeData(struct Task *); +static bool8 AngledWipes_DoWipe(struct Task *); +static bool8 AngledWipes_TryEnd(struct Task *); +static bool8 AngledWipes_StartNext(struct Task *); +static bool8 ShredSplit_Init(struct Task *); +static bool8 ShredSplit_Main(struct Task *); +static bool8 ShredSplit_BrokenCheck(struct Task *); +static bool8 ShredSplit_End(struct Task *); +static bool8 Blackhole_Init(struct Task *); +static bool8 Blackhole_Vibrate(struct Task *); +static bool8 Blackhole_GrowEnd(struct Task *); +static bool8 BlackholePulsate_Main(struct Task *); +static bool8 RectangularSpiral_Init(struct Task *); +static bool8 RectangularSpiral_Main(struct Task *); +static bool8 RectangularSpiral_End(struct Task *); +static bool8 FrontierLogoWiggle_Init(struct Task *); +static bool8 FrontierLogoWiggle_SetGfx(struct Task *); +static bool8 FrontierLogoWave_Init(struct Task *); +static bool8 FrontierLogoWave_SetGfx(struct Task *); +static bool8 FrontierLogoWave_InitScanline(struct Task *); +static bool8 FrontierLogoWave_Main(struct Task *); +static bool8 Rayquaza_Init(struct Task *); +static bool8 Rayquaza_SetGfx(struct Task *); +static bool8 Rayquaza_PaletteFlash(struct Task *); +static bool8 Rayquaza_FadeToBlack(struct Task *); +static bool8 Rayquaza_WaitFade(struct Task *); +static bool8 Rayquaza_SetBlack(struct Task *); +static bool8 Rayquaza_TriRing(struct Task *); +static bool8 FrontierSquares_Init(struct Task *); +static bool8 FrontierSquares_Draw(struct Task *); +static bool8 FrontierSquares_Shrink(struct Task *); +static bool8 FrontierSquares_End(struct Task *); +static bool8 FrontierSquaresSpiral_Init(struct Task *); +static bool8 FrontierSquaresSpiral_Outward(struct Task *); +static bool8 FrontierSquaresSpiral_SetBlack(struct Task *); +static bool8 FrontierSquaresSpiral_Inward(struct Task *); +static bool8 FrontierSquaresScroll_Init(struct Task *); +static bool8 FrontierSquaresScroll_Draw(struct Task *); +static bool8 FrontierSquaresScroll_SetBlack(struct Task *); +static bool8 FrontierSquaresScroll_Erase(struct Task *); +static bool8 FrontierSquaresScroll_End(struct Task *); +static bool8 Mugshot_Init(struct Task *); +static bool8 Mugshot_SetGfx(struct Task *); +static bool8 Mugshot_ShowBanner(struct Task *); +static bool8 Mugshot_StartOpponentSlide(struct Task *); +static bool8 Mugshot_WaitStartPlayerSlide(struct Task *); +static bool8 Mugshot_WaitPlayerSlide(struct Task *); +static bool8 Mugshot_GradualWhiteFade(struct Task *); +static bool8 Mugshot_InitFadeWhiteToBlack(struct Task *); +static bool8 Mugshot_FadeToBlack(struct Task *); +static bool8 Mugshot_End(struct Task *); +static void DoMugshotTransition(u8); +static void Mugshots_CreateTrainerPics(struct Task *); static void VBlankCB_Mugshots(void); static void VBlankCB_MugshotsFadeOut(void); static void HBlankCB_Mugshots(void); static void InitTransitionData(void); static void FadeScreenBlack(void); -static void CreateIntroTask(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4); -static void SetCircularMask(u16 *a0, s16 a1, s16 a2, s16 a3); -static void SetSinWave(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, s16 amplitude, s16 arrSize); -static void GetBg0TilemapDst(u16 **tileset); -static void InitBlackWipe(s16 *a0, s16 a1, s16 a2, s16 a3, s16 a4, s16 a5, s16 a6); -static bool8 UpdateBlackWipe(s16 *a0, bool8 a1, bool8 a2); -static void SetTrainerPicSlideDirection(s16 spriteId, s16 arrId); -static void IncrementTrainerPicState(s16 spriteId); -static s16 IsTrainerPicSlideDone(s16 spriteId); -static bool8 TransitionIntro_FadeToGray(struct Task *task); -static bool8 TransitionIntro_FadeFromGray(struct Task *task); +static void CreateIntroTask(s16, s16, s16, s16, s16); +static void SetCircularMask(u16 *, s16, s16, s16); +static void SetSinWave(s16 *, s16, s16, s16, s16, s16); +static void GetBg0TilemapDst(u16 **); +static void InitBlackWipe(s16 *, s16, s16, s16, s16, s16, s16); +static bool8 UpdateBlackWipe(s16 *, bool8, bool8); +static void SetTrainerPicSlideDirection(s16, s16); +static void IncrementTrainerPicState(s16); +static s16 IsTrainerPicSlideDone(s16); +static bool8 TransitionIntro_FadeToGray(struct Task *); +static bool8 TransitionIntro_FadeFromGray(struct Task *); static bool8 IsIntroTaskDone(void); -static bool16 UpdateRectangularSpiralLine(const s16 * const *arg0, struct RectangularSpiralLine *arg1); -static void SpriteCB_FldEffPokeballTrail(struct Sprite *sprite); -static void SpriteCB_MugshotTrainerPic(struct Sprite *sprite); -static void SpriteCB_WhiteBarFade(struct Sprite *sprite); -static bool8 MugshotTrainerPic_Pause(struct Sprite *sprite); -static bool8 MugshotTrainerPic_Init(struct Sprite *sprite); -static bool8 MugshotTrainerPic_Slide(struct Sprite *sprite); -static bool8 MugshotTrainerPic_SlideSlow(struct Sprite *sprite); -static bool8 MugshotTrainerPic_SlideOffscreen(struct Sprite *sprite); +static bool16 UpdateRectangularSpiralLine(const s16 * const *, struct RectangularSpiralLine *); +static void SpriteCB_FldEffPokeballTrail(struct Sprite *); +static void SpriteCB_MugshotTrainerPic(struct Sprite *); +static void SpriteCB_WhiteBarFade(struct Sprite *); +static bool8 MugshotTrainerPic_Pause(struct Sprite *); +static bool8 MugshotTrainerPic_Init(struct Sprite *); +static bool8 MugshotTrainerPic_Slide(struct Sprite *); +static bool8 MugshotTrainerPic_SlideSlow(struct Sprite *); +static bool8 MugshotTrainerPic_SlideOffscreen(struct Sprite *); static s16 sDebug_RectangularSpiralData; static u8 sTestingTransitionId; @@ -959,10 +959,6 @@ static const TransitionStateFunc sFrontierSquaresScroll_Funcs[] = FrontierSquaresScroll_End }; -// Dimensions for the 2 non-scrolling frontier square transitions. -// SQUARE_SIZE is the same in the scrolling version but it uses -// more because it needs to show more than can be shown at a single -// time n-screen. #define SQUARE_SIZE 4 #define MARGIN_SIZE 1 // Squares do not fit evenly across the width, so there is a margin on either side. #define NUM_SQUARES_PER_ROW ((DISPLAY_WIDTH - (MARGIN_SIZE * 8 * 2)) / (SQUARE_SIZE * 8)) From 1a69eb33e8ae68e45c7ce886d26dbc59782f6767 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 29 Oct 2021 20:27:58 -0400 Subject: [PATCH 112/417] Add newlines around calcrom output --- .github/calcrom/webhook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/calcrom/webhook.sh b/.github/calcrom/webhook.sh index 2a3015969e..fd54b660b6 100755 --- a/.github/calcrom/webhook.sh +++ b/.github/calcrom/webhook.sh @@ -8,4 +8,4 @@ if [ ! -f $map_file ]; then fi output=$(perl $(dirname "$0")/calcrom.pl $build_name.map | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g') -curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST "$CALCROM_DISCORD_WEBHOOK_URL" +curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`\\n$build_name progress:\\n$output\\n\`\`\`\"}" -H "Content-Type: application/json" -X POST "$CALCROM_DISCORD_WEBHOOK_URL" From 71605556ab6efef43fdaed3f4e84e41c85ac719b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 30 Oct 2021 11:59:14 -0400 Subject: [PATCH 113/417] Clean up braille_puzzles --- data/maps/SealedChamber_InnerRoom/scripts.inc | 8 +- data/specials.inc | 4 +- src/braille_puzzles.c | 99 ++++++++++--------- 3 files changed, 57 insertions(+), 54 deletions(-) diff --git a/data/maps/SealedChamber_InnerRoom/scripts.inc b/data/maps/SealedChamber_InnerRoom/scripts.inc index f81e5f9fde..8c45c81ca2 100644 --- a/data/maps/SealedChamber_InnerRoom/scripts.inc +++ b/data/maps/SealedChamber_InnerRoom/scripts.inc @@ -12,18 +12,18 @@ SealedChamber_InnerRoom_EventScript_BrailleBackWall:: goto_if_eq SealedChamber_InnerRoom_EventScript_NoEffect fadeoutbgm 0 playse SE_TRUCK_MOVE - special DoSealedChamberShakingEffect1 + special DoSealedChamberShakingEffect_Long waitstate delay 40 - special DoSealedChamberShakingEffect2 + special DoSealedChamberShakingEffect_Short waitstate playse SE_DOOR delay 40 - special DoSealedChamberShakingEffect2 + special DoSealedChamberShakingEffect_Short waitstate playse SE_DOOR delay 40 - special DoSealedChamberShakingEffect2 + special DoSealedChamberShakingEffect_Short waitstate playse SE_DOOR delay 40 diff --git a/data/specials.inc b/data/specials.inc index 82eacbac0e..a863b6e137 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -315,7 +315,7 @@ gSpecials:: def_special IsStarterInParty def_special CopyCurSecretBaseOwnerName_StrVar1 def_special ScriptCheckFreePokemonStorageSpace - def_special DoSealedChamberShakingEffect1 + def_special DoSealedChamberShakingEffect_Long def_special ShowDeptStoreElevatorFloorSelect def_special InteractWithShieldOrTVDecoration def_special IsPokerusInParty @@ -325,7 +325,7 @@ gSpecials:: def_special BattleSetup_StartLegendaryBattle def_special StartRegiBattle def_special SetTrainerFacingDirection - def_special DoSealedChamberShakingEffect2 + def_special DoSealedChamberShakingEffect_Short def_special FoundBlackGlasses def_special StartDroughtWeatherBlend def_special DoDiveWarp diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index d8410988dd..61fab39e28 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -13,16 +13,9 @@ #include "party_menu.h" #include "fldeff.h" -// why do this, GF? -enum -{ - REGIROCK_PUZZLE, - REGISTEEL_PUZZLE -}; +EWRAM_DATA static bool8 sIsRegisteelPuzzle = 0; -EWRAM_DATA static u8 sBraillePuzzleCallbackFlag = 0; - -static const u8 gRegicePathCoords[][2] = +static const u8 sRegicePathCoords[][2] = { {4, 21}, {5, 21}, @@ -62,9 +55,9 @@ static const u8 gRegicePathCoords[][2] = {4, 22}, }; -void SealedChamberShakingEffect(u8); -void DoBrailleRegirockEffect(void); -void DoBrailleRegisteelEffect(void); +static void Task_SealedChamberShakingEffect(u8); +static void DoBrailleRegirockEffect(void); +static void DoBrailleRegisteelEffect(void); bool8 ShouldDoBrailleDigEffect(void) { @@ -116,43 +109,48 @@ void ShouldDoBrailleRegirockEffectOld(void) { } -void DoSealedChamberShakingEffect1(void) -{ - u8 taskId = CreateTask(SealedChamberShakingEffect, 9); +#define tDelayCounter data[1] +#define tShakeCounter data[2] +#define tVerticalPan data[4] +#define tDelay data[5] +#define tNumShakes data[6] - gTasks[taskId].data[1] = 0; - gTasks[taskId].data[2] = 0; - gTasks[taskId].data[4] = 2; - gTasks[taskId].data[5] = 5; - gTasks[taskId].data[6] = 50; +void DoSealedChamberShakingEffect_Long(void) +{ + u8 taskId = CreateTask(Task_SealedChamberShakingEffect, 9); + + gTasks[taskId].tDelayCounter = 0; + gTasks[taskId].tShakeCounter = 0; + gTasks[taskId].tVerticalPan = 2; + gTasks[taskId].tDelay = 5; + gTasks[taskId].tNumShakes = 50; SetCameraPanningCallback(0); } -void DoSealedChamberShakingEffect2(void) +void DoSealedChamberShakingEffect_Short(void) { - u8 taskId = CreateTask(SealedChamberShakingEffect, 9); + u8 taskId = CreateTask(Task_SealedChamberShakingEffect, 9); - gTasks[taskId].data[1] = 0; - gTasks[taskId].data[2] = 0; - gTasks[taskId].data[4] = 3; - gTasks[taskId].data[5] = 5; - gTasks[taskId].data[6] = 2; + gTasks[taskId].tDelayCounter = 0; + gTasks[taskId].tShakeCounter = 0; + gTasks[taskId].tVerticalPan = 3; + gTasks[taskId].tDelay = 5; + gTasks[taskId].tNumShakes = 2; SetCameraPanningCallback(0); } -void SealedChamberShakingEffect(u8 taskId) +static void Task_SealedChamberShakingEffect(u8 taskId) { struct Task *task = &gTasks[taskId]; - task->data[1]++; - - if (!(task->data[1] % task->data[5])) + task->tDelayCounter++; + if (task->tDelayCounter % task->tDelay == 0) { - task->data[1] = 0; - task->data[2]++; - task->data[4] = -task->data[4]; - SetCameraPanning(0, task->data[4]); - if (task->data[2] == task->data[6]) + task->tDelayCounter = 0; + task->tShakeCounter++; + task->tVerticalPan = -task->tVerticalPan; + SetCameraPanning(0, task->tVerticalPan); + if (task->tShakeCounter == task->tNumShakes) { DestroyTask(taskId); EnableBothScriptContexts(); @@ -161,7 +159,12 @@ void SealedChamberShakingEffect(u8 taskId) } } -// moved later in the function because it was rewritten. +#undef tDelayCounter +#undef tShakeCounter +#undef tVerticalPan +#undef tDelay +#undef tNumShakes + bool8 ShouldDoBrailleRegirockEffect(void) { if (!FlagGet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED) @@ -170,17 +173,17 @@ bool8 ShouldDoBrailleRegirockEffect(void) { if (gSaveBlock1Ptr->pos.x == 6 && gSaveBlock1Ptr->pos.y == 23) { - sBraillePuzzleCallbackFlag = REGIROCK_PUZZLE; + sIsRegisteelPuzzle = FALSE; return TRUE; } else if (gSaveBlock1Ptr->pos.x == 5 && gSaveBlock1Ptr->pos.y == 23) { - sBraillePuzzleCallbackFlag = REGIROCK_PUZZLE; + sIsRegisteelPuzzle = FALSE; return TRUE; } else if (gSaveBlock1Ptr->pos.x == 7 && gSaveBlock1Ptr->pos.y == 23) { - sBraillePuzzleCallbackFlag = REGIROCK_PUZZLE; + sIsRegisteelPuzzle = FALSE; return TRUE; } } @@ -200,7 +203,7 @@ void UseRegirockHm_Callback(void) DoBrailleRegirockEffect(); } -void DoBrailleRegirockEffect(void) +static void DoBrailleRegirockEffect(void) { MapGridSetMetatileIdAt(7 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopLeft); MapGridSetMetatileIdAt(8 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopMid); @@ -220,7 +223,7 @@ bool8 ShouldDoBrailleRegisteelEffect(void) { if (gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 25) { - sBraillePuzzleCallbackFlag = REGISTEEL_PUZZLE; + sIsRegisteelPuzzle = TRUE; return TRUE; } } @@ -239,7 +242,7 @@ void UseRegisteelHm_Callback(void) DoBrailleRegisteelEffect(); } -void DoBrailleRegisteelEffect(void) +static void DoBrailleRegisteelEffect(void) { MapGridSetMetatileIdAt(7 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopLeft); MapGridSetMetatileIdAt(8 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopMid); @@ -254,7 +257,7 @@ void DoBrailleRegisteelEffect(void) } // theory: another commented out DoBrailleWait and Task_BrailleWait. -void DoBrailleWait(void) +static void DoBrailleWait(void) { } @@ -263,7 +266,7 @@ bool8 FldEff_UsePuzzleEffect(void) { u8 taskId = CreateFieldMoveTask(); - if (sBraillePuzzleCallbackFlag == REGISTEEL_PUZZLE) + if (sIsRegisteelPuzzle == TRUE) { gTasks[taskId].data[8] = (u32)UseRegisteelHm_Callback >> 16; gTasks[taskId].data[9] = (u32)UseRegisteelHm_Callback; @@ -290,10 +293,10 @@ bool8 ShouldDoBrailleRegicePuzzle(void) if (FlagGet(FLAG_TEMP_3) == TRUE) return FALSE; - for (i = 0; i < 36; i++) + for (i = 0; i < ARRAY_COUNT(sRegicePathCoords); i++) { - u8 xPos = gRegicePathCoords[i][0]; - u8 yPos = gRegicePathCoords[i][1]; + u8 xPos = sRegicePathCoords[i][0]; + u8 yPos = sRegicePathCoords[i][1]; if (gSaveBlock1Ptr->pos.x == xPos && gSaveBlock1Ptr->pos.y == yPos) { u16 varValue; From 13cd2a41f03ca56f45cab6769cb2738070cc5cf2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 30 Oct 2021 16:19:10 -0400 Subject: [PATCH 114/417] Better braille support --- asm/macros/event.inc | 6 + data/maps/AncientTomb/scripts.inc | 8 +- data/maps/DesertRuins/scripts.inc | 8 +- data/maps/SealedChamber_InnerRoom/scripts.inc | 28 +- data/maps/SealedChamber_OuterRoom/scripts.inc | 48 +-- .../maps/Underwater_SealedChamber/scripts.inc | 4 +- data/text/braille.inc | 4 + gflib/characters.h | 350 ++++++++++++++++++ gflib/string_util.c | 8 +- gflib/text.h | 268 +------------- src/contest.c | 8 +- src/pokedex.c | 4 +- src/union_room_chat.c | 8 +- tools/preproc/asm_file.cpp | 137 +++++-- tools/preproc/asm_file.h | 1 + 15 files changed, 502 insertions(+), 388 deletions(-) create mode 100644 gflib/characters.h diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 480684ef6e..62437ccb8a 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1792,3 +1792,9 @@ setfieldeffectargument 2, \priority dofieldeffect FLDEFF_SPARKLE .endm + + .macro braillemsgbox text:req + braillemessage \text + waitbuttonpress + closebraillemessage + .endm diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index 40d9f0dff0..edbb75ccc5 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -40,9 +40,7 @@ AncientTomb_EventScript_HideRegiEntrance:: AncientTomb_EventScript_CaveEntranceMiddle:: lockall goto_if_set FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED, AncientTomb_EventScript_BigHoleInWall - braillemessage AncientTomb_Braille_ShineInTheMiddle - waitbuttonpress - closebraillemessage + braillemsgbox AncientTomb_Braille_ShineInTheMiddle releaseall end @@ -53,9 +51,7 @@ AncientTomb_EventScript_BigHoleInWall:: AncientTomb_EventScript_CaveEntranceSide:: lockall - braillemessage AncientTomb_Braille_ShineInTheMiddle - waitbuttonpress - closebraillemessage + braillemsgbox AncientTomb_Braille_ShineInTheMiddle releaseall end diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index 414dbfc572..1bcaa23bff 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -40,9 +40,7 @@ DesertRuins_EventScript_ShowRegirock:: DesertRuins_EventScript_CaveEntranceMiddle:: lockall goto_if_set FLAG_SYS_REGIROCK_PUZZLE_COMPLETED, DesertRuins_EventScript_BigHoleInWall - braillemessage DesertRuins_Braille_UseRockSmash - waitbuttonpress - closebraillemessage + braillemsgbox DesertRuins_Braille_UseRockSmash releaseall end @@ -53,9 +51,7 @@ DesertRuins_EventScript_BigHoleInWall:: DesertRuins_EventScript_CaveEntranceSide:: lockall - braillemessage DesertRuins_Braille_UseRockSmash - waitbuttonpress - closebraillemessage + braillemsgbox DesertRuins_Braille_UseRockSmash releaseall end diff --git a/data/maps/SealedChamber_InnerRoom/scripts.inc b/data/maps/SealedChamber_InnerRoom/scripts.inc index 8c45c81ca2..7d240535ca 100644 --- a/data/maps/SealedChamber_InnerRoom/scripts.inc +++ b/data/maps/SealedChamber_InnerRoom/scripts.inc @@ -3,9 +3,7 @@ SealedChamber_InnerRoom_MapScripts:: SealedChamber_InnerRoom_EventScript_BrailleBackWall:: lockall - braillemessage SealedChamber_InnerRoom_Braille_FirstWailordLastRelicanth - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_InnerRoom_Braille_FirstWailordLastRelicanth goto_if_set FLAG_REGI_DOORS_OPENED, SealedChamber_InnerRoom_EventScript_NoEffect specialvar VAR_RESULT, CheckRelicanthWailord compare VAR_RESULT, FALSE @@ -40,49 +38,37 @@ SealedChamber_InnerRoom_EventScript_NoEffect:: SealedChamber_InnerRoom_EventScript_BrailleStoryPart1:: lockall - braillemessage SealedChamber_InnerRoom_Braille_InThisCaveWeHaveLived - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_InnerRoom_Braille_InThisCaveWeHaveLived releaseall end SealedChamber_InnerRoom_EventScript_BrailleStoryPart2:: lockall - braillemessage SealedChamber_InnerRoom_Braille_WeOweAllToThePokemon - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_InnerRoom_Braille_WeOweAllToThePokemon releaseall end SealedChamber_InnerRoom_EventScript_BrailleStoryPart3:: lockall - braillemessage SealedChamber_InnerRoom_Braille_ButWeSealedThePokemonAway - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_InnerRoom_Braille_ButWeSealedThePokemonAway releaseall end SealedChamber_InnerRoom_EventScript_BrailleStoryPart4:: lockall - braillemessage SealedChamber_InnerRoom_Braille_WeFearedIt - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_InnerRoom_Braille_WeFearedIt releaseall end SealedChamber_InnerRoom_EventScript_BrailleStoryPart5:: lockall - braillemessage SealedChamber_InnerRoom_Braille_ThoseWithCourageHope - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_InnerRoom_Braille_ThoseWithCourageHope releaseall end SealedChamber_InnerRoom_EventScript_BrailleStoryPart6:: lockall - braillemessage SealedChamber_InnerRoom_Braille_OpenDoorEternalPokemonWaits - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_InnerRoom_Braille_OpenDoorEternalPokemonWaits releaseall end diff --git a/data/maps/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc index 2e80d06c82..7d57ea5449 100644 --- a/data/maps/SealedChamber_OuterRoom/scripts.inc +++ b/data/maps/SealedChamber_OuterRoom/scripts.inc @@ -28,90 +28,68 @@ SealedChamber_OuterRoom_EventScript_CloseInnerRoomEntrance:: SealedChamber_OuterRoom_EventScript_BrailleABC:: lockall - braillemessage SealedChamber_OuterRoom_Braille_ABC - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_ABC releaseall end SealedChamber_OuterRoom_EventScript_BrailleGHI:: lockall - braillemessage SealedChamber_OuterRoom_Braille_GHI - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_GHI releaseall end SealedChamber_OuterRoom_EventScript_BrailleMNO:: lockall - braillemessage SealedChamber_OuterRoom_Braille_MNO - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_MNO releaseall end SealedChamber_OuterRoom_EventScript_BrailleTUV:: lockall - braillemessage SealedChamber_OuterRoom_Braille_TUV - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_TUV releaseall end SealedChamber_OuterRoom_EventScript_BrailleDEF:: lockall - braillemessage SealedChamber_OuterRoom_Braille_DEF - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_DEF releaseall end SealedChamber_OuterRoom_EventScript_BrailleJKL:: lockall - braillemessage SealedChamber_OuterRoom_Braille_JKL - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_JKL releaseall end SealedChamber_OuterRoom_EventScript_BraillePQRS:: lockall - braillemessage SealedChamber_OuterRoom_Braille_PQRS - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_PQRS releaseall end SealedChamber_OuterRoom_EventScript_BraillePeriod:: lockall - braillemessage SealedChamber_OuterRoom_Braille_Period - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_Period releaseall end SealedChamber_OuterRoom_EventScript_BrailleWXYZ:: lockall - braillemessage SealedChamber_OuterRoom_Braille_WXYZ - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_WXYZ releaseall end SealedChamber_OuterRoom_EventScript_BrailleComma:: lockall - braillemessage SealedChamber_OuterRoom_Braille_Comma - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_Comma releaseall end SealedChamber_OuterRoom_EventScript_InnerRoomEntranceWall:: lockall goto_if_set FLAG_SYS_BRAILLE_DIG, SealedChamber_OuterRoom_EventScript_HoleInWall - braillemessage SealedChamber_OuterRoom_Braille_DigHere - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_DigHere releaseall end @@ -122,9 +100,7 @@ SealedChamber_OuterRoom_EventScript_HoleInWall:: SealedChamber_OuterRoom_EventScript_BrailleDigHere:: lockall - braillemessage SealedChamber_OuterRoom_Braille_DigHere - waitbuttonpress - closebraillemessage + braillemsgbox SealedChamber_OuterRoom_Braille_DigHere releaseall end diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc index 3d8aaf979f..2b3fe5e0de 100644 --- a/data/maps/Underwater_SealedChamber/scripts.inc +++ b/data/maps/Underwater_SealedChamber/scripts.inc @@ -20,9 +20,7 @@ Underwater_SealedChamber_EventScript_SurfaceSealedChamber:: Underwater_SealedChamber_EventScript_Braille:: lockall - braillemessage Underwater_SealedChamber_Braille_GoUpHere - waitbuttonpress - closebraillemessage + braillemsgbox Underwater_SealedChamber_Braille_GoUpHere releaseall end diff --git a/data/text/braille.inc b/data/text/braille.inc index 69f0a81e38..4518c5769d 100644 --- a/data/text/braille.inc +++ b/data/text/braille.inc @@ -1,3 +1,7 @@ +@ NOTE: The brailleformat macro in this file is leftover from RS. +@ The numbers are simply skipped over. If you'd like to omit +@ this macro you must also stop it from skipping over this +@ section by editing ScrCmd_braillemessage. Underwater_SealedChamber_Braille_GoUpHere: brailleformat 4, 6, 26, 13, 7, 9 .braille "GO UP HERE.$" diff --git a/gflib/characters.h b/gflib/characters.h new file mode 100644 index 0000000000..ab003a3e3d --- /dev/null +++ b/gflib/characters.h @@ -0,0 +1,350 @@ +#ifndef GUARD_CHARACTERS_H +#define GUARD_CHARACTERS_H + +#define CHAR_SPACE 0x00 +#define CHAR_A_GRAVE 0x01 +#define CHAR_A_ACUTE 0x02 +#define CHAR_A_CIRCUMFLEX 0x03 +#define CHAR_C_CEDILLA 0x04 +#define CHAR_E_GRAVE 0x05 +#define CHAR_E_ACUTE 0x06 +#define CHAR_E_CIRCUMFLEX 0x07 +#define CHAR_E_DIAERESIS 0x08 +#define CHAR_I_GRAVE 0x09 +//#define CHAR_I_ACUTE 0x0A // Is 0x5A instead +#define CHAR_I_CIRCUMFLEX 0x0B +#define CHAR_I_DIAERESIS 0x0C +#define CHAR_O_GRAVE 0x0D +#define CHAR_O_ACUTE 0x0E +#define CHAR_O_CIRCUMFLEX 0x0F +#define CHAR_OE 0x10 +#define CHAR_U_GRAVE 0x11 +#define CHAR_U_ACUTE 0x12 +#define CHAR_U_CIRCUMFLEX 0x13 +#define CHAR_N_TILDE 0x14 +#define CHAR_ESZETT 0x15 +#define CHAR_a_GRAVE 0x16 +#define CHAR_a_ACUTE 0x17 +//#define CHAR_a_CIRCUMFLEX 0x18 // Is 0x68 instead +#define CHAR_c_CEDILLA 0x19 +#define CHAR_e_GRAVE 0x1A +#define CHAR_e_ACUTE 0x1B +#define CHAR_e_CIRCUMFLEX 0x1C +#define CHAR_e_DIAERESIS 0x1D +#define CHAR_i_GRAVE 0x1E +//#define CHAR_i_ACUTE 0x1F // Is 0x6F instead +#define CHAR_i_CIRCUMFLEX 0x20 +#define CHAR_i_DIAERESIS 0x21 +#define CHAR_o_GRAVE 0x22 +#define CHAR_o_ACUTE 0x23 +#define CHAR_o_CIRCUMFLEX 0x24 +#define CHAR_oe 0x25 +#define CHAR_u_GRAVE 0x26 +#define CHAR_u_ACUTE 0x27 +#define CHAR_u_CIRCUMFLEX 0x28 +#define CHAR_n_TILDE 0x29 +#define CHAR_MASCULINE_ORDINAL 0x2A +#define CHAR_FEMININE_ORDINAL 0x2B +#define CHAR_SUPER_ER 0x2C +#define CHAR_AMPERSAND 0x2D +#define CHAR_PLUS 0x2E +// +#define CHAR_LV 0x34 +#define CHAR_EQUALS 0x35 +#define CHAR_SEMICOLON 0x36 +#define CHAR_BARD_WORD_DELIMIT 0x37 // Empty space to separate words in Bard's song +#define CHAR_INV_QUESTION_MARK 0x51 +#define CHAR_INV_EXCL_MARK 0x52 +#define CHAR_PK 0x53 +#define CHAR_MN 0x54 +#define CHAR_PO 0x55 +#define CHAR_KE 0x56 +#define CHAR_BLOCK_1 0x57 // Each of these 3 +#define CHAR_BLOCK_2 0x58 // chars contains 1/3 +#define CHAR_BLOCK_3 0x59 // of the word BLOCK +#define CHAR_I_ACUTE 0x5A +#define CHAR_PERCENT 0x5B +#define CHAR_LEFT_PAREN 0x5C +#define CHAR_RIGHT_PAREN 0x5D +// +#define CHAR_a_CIRCUMFLEX 0x68 +// +#define CHAR_i_ACUTE 0x6F +// +#define CHAR_SPACER 0x77 // Empty space +// +#define CHAR_UP_ARROW 0x79 +#define CHAR_DOWN_ARROW 0x7A +#define CHAR_LEFT_ARROW 0x7B +#define CHAR_RIGHT_ARROW 0x7C +// +#define CHAR_SUPER_E 0x84 +#define CHAR_LESS_THAN 0x85 +#define CHAR_GREATER_THAN 0x86 +// +#define CHAR_SUPER_RE 0xA0 +#define CHAR_0 0xA1 +#define CHAR_1 0xA2 +#define CHAR_2 0xA3 +#define CHAR_3 0xA4 +#define CHAR_4 0xA5 +#define CHAR_5 0xA6 +#define CHAR_6 0xA7 +#define CHAR_7 0xA8 +#define CHAR_8 0xA9 +#define CHAR_9 0xAA +#define CHAR_EXCL_MARK 0xAB +#define CHAR_QUESTION_MARK 0xAC +#define CHAR_PERIOD 0xAD +#define CHAR_HYPHEN 0xAE +#define CHAR_BULLET 0xAF +#define CHAR_ELLIPSIS 0xB0 +#define CHAR_DBL_QUOTE_LEFT 0xB1 +#define CHAR_DBL_QUOTE_RIGHT 0xB2 +#define CHAR_SGL_QUOTE_LEFT 0xB3 +#define CHAR_SGL_QUOTE_RIGHT 0xB4 +#define CHAR_MALE 0xB5 +#define CHAR_FEMALE 0xB6 +#define CHAR_CURRENCY 0xB7 +#define CHAR_COMMA 0xB8 +#define CHAR_MULT_SIGN 0xB9 +#define CHAR_SLASH 0xBA +#define CHAR_A 0xBB +#define CHAR_B 0xBC +#define CHAR_C 0xBD +#define CHAR_D 0xBE +#define CHAR_E 0xBF +#define CHAR_F 0xC0 +#define CHAR_G 0xC1 +#define CHAR_H 0xC2 +#define CHAR_I 0xC3 +#define CHAR_J 0xC4 +#define CHAR_K 0xC5 +#define CHAR_L 0xC6 +#define CHAR_M 0xC7 +#define CHAR_N 0xC8 +#define CHAR_O 0xC9 +#define CHAR_P 0xCA +#define CHAR_Q 0xCB +#define CHAR_R 0xCC +#define CHAR_S 0xCD +#define CHAR_T 0xCE +#define CHAR_U 0xCF +#define CHAR_V 0xD0 +#define CHAR_W 0xD1 +#define CHAR_X 0xD2 +#define CHAR_Y 0xD3 +#define CHAR_Z 0xD4 +#define CHAR_a 0xD5 +#define CHAR_b 0xD6 +#define CHAR_c 0xD7 +#define CHAR_d 0xD8 +#define CHAR_e 0xD9 +#define CHAR_f 0xDA +#define CHAR_g 0xDB +#define CHAR_h 0xDC +#define CHAR_i 0xDD +#define CHAR_j 0xDE +#define CHAR_k 0xDF +#define CHAR_l 0xE0 +#define CHAR_m 0xE1 +#define CHAR_n 0xE2 +#define CHAR_o 0xE3 +#define CHAR_p 0xE4 +#define CHAR_q 0xE5 +#define CHAR_r 0xE6 +#define CHAR_s 0xE7 +#define CHAR_t 0xE8 +#define CHAR_u 0xE9 +#define CHAR_v 0xEA +#define CHAR_w 0xEB +#define CHAR_x 0xEC +#define CHAR_y 0xED +#define CHAR_z 0xEE +#define CHAR_BLACK_TRIANGLE 0xEF +#define CHAR_COLON 0xF0 +#define CHAR_A_DIAERESIS 0xF1 +#define CHAR_O_DIAERESIS 0xF2 +#define CHAR_U_DIAERESIS 0xF3 +#define CHAR_a_DIAERESIS 0xF4 +#define CHAR_o_DIAERESIS 0xF5 +#define CHAR_u_DIAERESIS 0xF6 +#define CHAR_DYNAMIC 0xF7 +#define CHAR_KEYPAD_ICON 0xF8 +#define CHAR_EXTRA_SYMBOL 0xF9 +#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog +#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog +#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code +#define PLACEHOLDER_BEGIN 0xFD // string placeholder +#define CHAR_NEWLINE 0xFE +#define EOS 0xFF // end of string + +// CHAR_KEYPAD_ICON chars +#define CHAR_A_BUTTON 0x00 +#define CHAR_B_BUTTON 0x01 +#define CHAR_L_BUTTON 0x02 +#define CHAR_R_BUTTON 0x03 +#define CHAR_START_BUTTON 0x04 +#define CHAR_SELECT_BUTTON 0x05 +#define CHAR_DPAD_UP 0x06 +#define CHAR_DPAD_DOWN 0x07 +#define CHAR_DPAD_LEFT 0x08 +#define CHAR_DPAD_RIGHT 0x09 +#define CHAR_DPAD_UPDOWN 0x0A +#define CHAR_DPAD_LEFTRIGHT 0x0B +#define CHAR_DPAD_NONE 0x0C + +// CHAR_EXTRA_SYMBOL chars +#define CHAR_UP_ARROW_2 0x00 +#define CHAR_DOWN_ARROW_2 0x01 +#define CHAR_LEFT_ARROW_2 0x02 +#define CHAR_RIGHT_ARROW_2 0x03 +#define CHAR_PLUS_2 0x04 +#define CHAR_LV_2 0x05 +#define CHAR_PP 0x06 +#define CHAR_ID 0x07 +#define CHAR_NO 0x08 +#define CHAR_UNDERSCORE 0x09 + +#define EXT_CTRL_CODE_COLOR 0x01 +#define EXT_CTRL_CODE_HIGHLIGHT 0x02 +#define EXT_CTRL_CODE_SHADOW 0x03 +#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04 +#define EXT_CTRL_CODE_PALETTE 0x05 +#define EXT_CTRL_CODE_FONT 0x06 +#define EXT_CTRL_CODE_RESET_SIZE 0x07 +#define EXT_CTRL_CODE_PAUSE 0x08 +#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09 +#define EXT_CTRL_CODE_WAIT_SE 0x0A +#define EXT_CTRL_CODE_PLAY_BGM 0x0B +#define EXT_CTRL_CODE_ESCAPE 0x0C +#define EXT_CTRL_CODE_SHIFT_TEXT 0x0D +#define EXT_CTRL_CODE_SHIFT_DOWN 0x0E +#define EXT_CTRL_CODE_FILL_WINDOW 0x0F +#define EXT_CTRL_CODE_PLAY_SE 0x10 +#define EXT_CTRL_CODE_CLEAR 0x11 +#define EXT_CTRL_CODE_SKIP 0x12 +#define EXT_CTRL_CODE_CLEAR_TO 0x13 +#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14 +#define EXT_CTRL_CODE_JPN 0x15 +#define EXT_CTRL_CODE_ENG 0x16 +#define EXT_CTRL_CODE_PAUSE_MUSIC 0x17 +#define EXT_CTRL_CODE_RESUME_MUSIC 0x18 + +#define TEXT_COLOR_TRANSPARENT 0x0 +#define TEXT_COLOR_WHITE 0x1 +#define TEXT_COLOR_DARK_GRAY 0x2 +#define TEXT_COLOR_LIGHT_GRAY 0x3 +#define TEXT_COLOR_RED 0x4 +#define TEXT_COLOR_LIGHT_RED 0x5 +#define TEXT_COLOR_GREEN 0x6 +#define TEXT_COLOR_LIGHT_GREEN 0x7 +#define TEXT_COLOR_BLUE 0x8 +#define TEXT_COLOR_LIGHT_BLUE 0x9 +#define TEXT_DYNAMIC_COLOR_1 0xA // Usually white +#define TEXT_DYNAMIC_COLOR_2 0xB // Usually white w/ tinge of green +#define TEXT_DYNAMIC_COLOR_3 0xC // Usually white +#define TEXT_DYNAMIC_COLOR_4 0xD // Usually aquamarine +#define TEXT_DYNAMIC_COLOR_5 0xE // Usually blue-green +#define TEXT_DYNAMIC_COLOR_6 0xF // Usually cerulean + +#define FONT_0 0 +#define FONT_1 1 +#define FONT_2 2 +#define FONT_3 3 +#define FONT_4 4 +#define FONT_5 5 +#define FONT_6 6 +#define FONT_7 7 +#define FONT_8 8 + + +#define PLACEHOLDER_ID_UNKNOWN 0x0 +#define PLACEHOLDER_ID_PLAYER 0x1 +#define PLACEHOLDER_ID_STRING_VAR_1 0x2 +#define PLACEHOLDER_ID_STRING_VAR_2 0x3 +#define PLACEHOLDER_ID_STRING_VAR_3 0x4 +#define PLACEHOLDER_ID_KUN 0x5 +#define PLACEHOLDER_ID_RIVAL 0x6 +#define PLACEHOLDER_ID_VERSION 0x7 +#define PLACEHOLDER_ID_AQUA 0x8 +#define PLACEHOLDER_ID_MAGMA 0x9 +#define PLACEHOLDER_ID_ARCHIE 0xA +#define PLACEHOLDER_ID_MAXIE 0xB +#define PLACEHOLDER_ID_KYOGRE 0xC +#define PLACEHOLDER_ID_GROUDON 0xD + +// battle placeholders are located in battle_message.h + +// Hiragana from 0x1-0x50, Katakana from 0x51-0xA0. +// This excludes Japanese punctuation, which end at 0xB0 +#define JAPANESE_CHAR_END 0xA0 + +// Note that while all dot combinations are represented in +// the Braille font, they are not all meaningful characters. +// Only those that have direct single-character translations are listed. +#define BRAILLE_CHAR_SPACE 0x00 +#define BRAILLE_CHAR_A 0x01 +// +#define BRAILLE_CHAR_C 0x03 +#define BRAILLE_CHAR_COMMA 0x04 +#define BRAILLE_CHAR_B 0x05 +#define BRAILLE_CHAR_I 0x06 +#define BRAILLE_CHAR_F 0x07 +// +#define BRAILLE_CHAR_E 0x09 +// +#define BRAILLE_CHAR_D 0x0B +#define BRAILLE_CHAR_COLON 0x0C +#define BRAILLE_CHAR_H 0x0D +#define BRAILLE_CHAR_J 0x0E +#define BRAILLE_CHAR_G 0x0F +#define BRAILLE_CHAR_APOSTROPHE 0x10 +#define BRAILLE_CHAR_K 0x11 +#define BRAILLE_CHAR_SLASH 0x12 +#define BRAILLE_CHAR_M 0x13 +#define BRAILLE_CHAR_SEMICOLON 0x14 +#define BRAILLE_CHAR_L 0x15 +#define BRAILLE_CHAR_S 0x16 +#define BRAILLE_CHAR_P 0x17 +// +#define BRAILLE_CHAR_O 0x19 +// +#define BRAILLE_CHAR_N 0x1B +#define BRAILLE_CHAR_EXCL_MARK 0x1C +#define BRAILLE_CHAR_R 0x1D +#define BRAILLE_CHAR_T 0x1E +#define BRAILLE_CHAR_Q 0x1F +// +#define BRAILLE_CHAR_PERIOD 0x2C +// +#define BRAILLE_CHAR_W 0x2E +// +#define BRAILLE_CHAR_HYPHEN 0x30 +#define BRAILLE_CHAR_U 0x31 +// +#define BRAILLE_CHAR_X 0x33 +#define BRAILLE_CHAR_QUESTION_MARK 0x34 // Also double quote left +#define BRAILLE_CHAR_V 0x35 +// +#define BRAILLE_CHAR_DBL_QUOTE_RIGHT 0x38 +#define BRAILLE_CHAR_Z 0x39 +#define BRAILLE_CHAR_NUMBER 0x3A +#define BRAILLE_CHAR_Y 0x3B +#define BRAILLE_CHAR_PAREN 0x3C +// +#define NUM_BRAILLE_CHARS 0x40 + +// Digits must be preceded by BRAILLE_CHAR_NUMBER +#define BRAILLE_CHAR_1 BRAILLE_CHAR_A +#define BRAILLE_CHAR_2 BRAILLE_CHAR_B +#define BRAILLE_CHAR_3 BRAILLE_CHAR_C +#define BRAILLE_CHAR_4 BRAILLE_CHAR_D +#define BRAILLE_CHAR_5 BRAILLE_CHAR_E +#define BRAILLE_CHAR_6 BRAILLE_CHAR_F +#define BRAILLE_CHAR_7 BRAILLE_CHAR_G +#define BRAILLE_CHAR_8 BRAILLE_CHAR_H +#define BRAILLE_CHAR_9 BRAILLE_CHAR_I +#define BRAILLE_CHAR_0 BRAILLE_CHAR_J + +#endif // GUARD_CHARACTERS_H diff --git a/gflib/string_util.c b/gflib/string_util.c index 4bf0d2ae9b..9463b4a7b4 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -206,7 +206,7 @@ u8 *ConvertIntToDecimalStringN(u8 *dest, s32 value, enum StringConvertMode mode, } else if (state == WRITING_SPACES) { - *dest++ = 0x77; + *dest++ = CHAR_SPACER; } value = temp; @@ -262,7 +262,7 @@ u8 *ConvertUIntToDecimalStringN(u8 *dest, u32 value, enum StringConvertMode mode } else if (state == WRITING_SPACES) { - *dest++ = 0x77; + *dest++ = CHAR_SPACER; } value = temp; @@ -322,7 +322,7 @@ u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 } else if (state == WRITING_SPACES) { - *dest++ = 0x77; + *dest++ = CHAR_SPACER; } value = temp; @@ -414,7 +414,7 @@ u8 *StringBraille(u8 *dest, const u8 *src) break; default: *dest++ = c; - *dest++ = c + 0x40; + *dest++ = c + NUM_BRAILLE_CHARS; break; } } diff --git a/gflib/text.h b/gflib/text.h index 9bb07580e0..91b9ef77ff 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -1,273 +1,7 @@ #ifndef GUARD_TEXT_H #define GUARD_TEXT_H -#define CHAR_SPACE 0x00 -#define CHAR_A_GRAVE 0x01 -#define CHAR_A_ACUTE 0x02 -#define CHAR_A_CIRCUMFLEX 0x03 -#define CHAR_C_CEDILLA 0x04 -#define CHAR_E_GRAVE 0x05 -#define CHAR_E_ACUTE 0x06 -#define CHAR_E_CIRCUMFLEX 0x07 -#define CHAR_E_DIAERESIS 0x08 -#define CHAR_I_GRAVE 0x09 -//#define CHAR_I_ACUTE 0x0A // Is 0x5A instead -#define CHAR_I_CIRCUMFLEX 0x0B -#define CHAR_I_DIAERESIS 0x0C -#define CHAR_O_GRAVE 0x0D -#define CHAR_O_ACUTE 0x0E -#define CHAR_O_CIRCUMFLEX 0x0F -#define CHAR_OE 0x10 -#define CHAR_U_GRAVE 0x11 -#define CHAR_U_ACUTE 0x12 -#define CHAR_U_CIRCUMFLEX 0x13 -#define CHAR_N_TILDE 0x14 -#define CHAR_ESZETT 0x15 -#define CHAR_a_GRAVE 0x16 -#define CHAR_a_ACUTE 0x17 -//#define CHAR_a_CIRCUMFLEX 0x18 // Is 0x68 instead -#define CHAR_c_CEDILLA 0x19 -#define CHAR_e_GRAVE 0x1A -#define CHAR_e_ACUTE 0x1B -#define CHAR_e_CIRCUMFLEX 0x1C -#define CHAR_e_DIAERESIS 0x1D -#define CHAR_i_GRAVE 0x1E -//#define CHAR_i_ACUTE 0x1F // Is 0x6F instead -#define CHAR_i_CIRCUMFLEX 0x20 -#define CHAR_i_DIAERESIS 0x21 -#define CHAR_o_GRAVE 0x22 -#define CHAR_o_ACUTE 0x23 -#define CHAR_o_CIRCUMFLEX 0x24 -#define CHAR_oe 0x25 -#define CHAR_u_GRAVE 0x26 -#define CHAR_u_ACUTE 0x27 -#define CHAR_u_CIRCUMFLEX 0x28 -#define CHAR_n_TILDE 0x29 -#define CHAR_MASCULINE_ORDINAL 0x2A -#define CHAR_FEMININE_ORDINAL 0x2B -#define CHAR_SUPER_ER 0x2C -#define CHAR_AMPERSAND 0x2D -#define CHAR_PLUS 0x2E -// -#define CHAR_LV 0x34 -#define CHAR_EQUALS 0x35 -#define CHAR_SEMICOLON 0x36 -#define CHAR_BARD_WORD_DELIMIT 0x37 // Empty space to separate words in Bard's song -#define CHAR_INV_QUESTION_MARK 0x51 -#define CHAR_INV_EXCL_MARK 0x52 -#define CHAR_PK 0x53 -#define CHAR_MN 0x54 -#define CHAR_PO 0x55 -#define CHAR_KE 0x56 -#define CHAR_BLOCK_1 0x57 // Each of these 3 -#define CHAR_BLOCK_2 0x58 // chars contains 1/3 -#define CHAR_BLOCK_3 0x59 // of the word BLOCK -#define CHAR_I_ACUTE 0x5A -#define CHAR_PERCENT 0x5B -#define CHAR_LEFT_PAREN 0x5C -#define CHAR_RIGHT_PAREN 0x5D -// -#define CHAR_a_CIRCUMFLEX 0x68 -// -#define CHAR_i_ACUTE 0x6F -// -#define CHAR_SPACER 0x77 // Empty space -// -#define CHAR_UP_ARROW 0x79 -#define CHAR_DOWN_ARROW 0x7A -#define CHAR_LEFT_ARROW 0x7B -#define CHAR_RIGHT_ARROW 0x7C -// -#define CHAR_SUPER_E 0x84 -#define CHAR_LESS_THAN 0x85 -#define CHAR_GREATER_THAN 0x86 -// -#define CHAR_SUPER_RE 0xA0 -#define CHAR_0 0xA1 -#define CHAR_1 0xA2 -#define CHAR_2 0xA3 -#define CHAR_3 0xA4 -#define CHAR_4 0xA5 -#define CHAR_5 0xA6 -#define CHAR_6 0xA7 -#define CHAR_7 0xA8 -#define CHAR_8 0xA9 -#define CHAR_9 0xAA -#define CHAR_EXCL_MARK 0xAB -#define CHAR_QUESTION_MARK 0xAC -#define CHAR_PERIOD 0xAD -#define CHAR_HYPHEN 0xAE -#define CHAR_BULLET 0xAF -#define CHAR_ELLIPSIS 0xB0 -#define CHAR_DBL_QUOT_LEFT 0xB1 -#define CHAR_DBL_QUOT_RIGHT 0xB2 -#define CHAR_SGL_QUOT_LEFT 0xB3 -#define CHAR_SGL_QUOT_RIGHT 0xB4 -#define CHAR_MALE 0xB5 -#define CHAR_FEMALE 0xB6 -#define CHAR_CURRENCY 0xB7 -#define CHAR_COMMA 0xB8 -#define CHAR_MULT_SIGN 0xB9 -#define CHAR_SLASH 0xBA -#define CHAR_A 0xBB -#define CHAR_B 0xBC -#define CHAR_C 0xBD -#define CHAR_D 0xBE -#define CHAR_E 0xBF -#define CHAR_F 0xC0 -#define CHAR_G 0xC1 -#define CHAR_H 0xC2 -#define CHAR_I 0xC3 -#define CHAR_J 0xC4 -#define CHAR_K 0xC5 -#define CHAR_L 0xC6 -#define CHAR_M 0xC7 -#define CHAR_N 0xC8 -#define CHAR_O 0xC9 -#define CHAR_P 0xCA -#define CHAR_Q 0xCB -#define CHAR_R 0xCC -#define CHAR_S 0xCD -#define CHAR_T 0xCE -#define CHAR_U 0xCF -#define CHAR_V 0xD0 -#define CHAR_W 0xD1 -#define CHAR_X 0xD2 -#define CHAR_Y 0xD3 -#define CHAR_Z 0xD4 -#define CHAR_a 0xD5 -#define CHAR_b 0xD6 -#define CHAR_c 0xD7 -#define CHAR_d 0xD8 -#define CHAR_e 0xD9 -#define CHAR_f 0xDA -#define CHAR_g 0xDB -#define CHAR_h 0xDC -#define CHAR_i 0xDD -#define CHAR_j 0xDE -#define CHAR_k 0xDF -#define CHAR_l 0xE0 -#define CHAR_m 0xE1 -#define CHAR_n 0xE2 -#define CHAR_o 0xE3 -#define CHAR_p 0xE4 -#define CHAR_q 0xE5 -#define CHAR_r 0xE6 -#define CHAR_s 0xE7 -#define CHAR_t 0xE8 -#define CHAR_u 0xE9 -#define CHAR_v 0xEA -#define CHAR_w 0xEB -#define CHAR_x 0xEC -#define CHAR_y 0xED -#define CHAR_z 0xEE -#define CHAR_BLACK_TRIANGLE 0xEF -#define CHAR_COLON 0xF0 -#define CHAR_A_DIAERESIS 0xF1 -#define CHAR_O_DIAERESIS 0xF2 -#define CHAR_U_DIAERESIS 0xF3 -#define CHAR_a_DIAERESIS 0xF4 -#define CHAR_o_DIAERESIS 0xF5 -#define CHAR_u_DIAERESIS 0xF6 -#define CHAR_DYNAMIC 0xF7 -#define CHAR_KEYPAD_ICON 0xF8 -#define CHAR_EXTRA_SYMBOL 0xF9 -#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog -#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog -#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code -#define PLACEHOLDER_BEGIN 0xFD // string placeholder -#define CHAR_NEWLINE 0xFE -#define EOS 0xFF // end of string - -// CHAR_KEYPAD_ICON chars -#define CHAR_A_BUTTON 0x00 -#define CHAR_B_BUTTON 0x01 -#define CHAR_L_BUTTON 0x02 -#define CHAR_R_BUTTON 0x03 -#define CHAR_START_BUTTON 0x04 -#define CHAR_SELECT_BUTTON 0x05 -#define CHAR_DPAD_UP 0x06 -#define CHAR_DPAD_DOWN 0x07 -#define CHAR_DPAD_LEFT 0x08 -#define CHAR_DPAD_RIGHT 0x09 -#define CHAR_DPAD_UPDOWN 0x0A -#define CHAR_DPAD_LEFTRIGHT 0x0B -#define CHAR_DPAD_NONE 0x0C - -// CHAR_EXTRA_SYMBOL chars -#define CHAR_UP_ARROW_2 0x00 -#define CHAR_DOWN_ARROW_2 0x01 -#define CHAR_LEFT_ARROW_2 0x02 -#define CHAR_RIGHT_ARROW_2 0x03 -#define CHAR_PLUS_2 0x04 -#define CHAR_LV_2 0x05 -#define CHAR_PP 0x06 -#define CHAR_ID 0x07 -#define CHAR_NO 0x08 -#define CHAR_UNDERSCORE 0x09 - -#define EXT_CTRL_CODE_COLOR 0x01 -#define EXT_CTRL_CODE_HIGHLIGHT 0x02 -#define EXT_CTRL_CODE_SHADOW 0x03 -#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04 -#define EXT_CTRL_CODE_PALETTE 0x05 -#define EXT_CTRL_CODE_FONT 0x06 -#define EXT_CTRL_CODE_RESET_SIZE 0x07 -#define EXT_CTRL_CODE_PAUSE 0x08 -#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09 -#define EXT_CTRL_CODE_WAIT_SE 0x0A -#define EXT_CTRL_CODE_PLAY_BGM 0x0B -#define EXT_CTRL_CODE_ESCAPE 0x0C -#define EXT_CTRL_CODE_SHIFT_TEXT 0x0D -#define EXT_CTRL_CODE_SHIFT_DOWN 0x0E -#define EXT_CTRL_CODE_FILL_WINDOW 0x0F -#define EXT_CTRL_CODE_PLAY_SE 0x10 -#define EXT_CTRL_CODE_CLEAR 0x11 -#define EXT_CTRL_CODE_SKIP 0x12 -#define EXT_CTRL_CODE_CLEAR_TO 0x13 -#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14 -#define EXT_CTRL_CODE_JPN 0x15 -#define EXT_CTRL_CODE_ENG 0x16 -#define EXT_CTRL_CODE_PAUSE_MUSIC 0x17 -#define EXT_CTRL_CODE_RESUME_MUSIC 0x18 - -#define TEXT_COLOR_TRANSPARENT 0x0 -#define TEXT_COLOR_WHITE 0x1 -#define TEXT_COLOR_DARK_GRAY 0x2 -#define TEXT_COLOR_LIGHT_GRAY 0x3 -#define TEXT_COLOR_RED 0x4 -#define TEXT_COLOR_LIGHT_RED 0x5 -#define TEXT_COLOR_GREEN 0x6 -#define TEXT_COLOR_LIGHT_GREEN 0x7 -#define TEXT_COLOR_BLUE 0x8 -#define TEXT_COLOR_LIGHT_BLUE 0x9 -#define TEXT_DYNAMIC_COLOR_1 0xA // Usually white -#define TEXT_DYNAMIC_COLOR_2 0xB // Usually white w/ tinge of green -#define TEXT_DYNAMIC_COLOR_3 0xC // Usually white -#define TEXT_DYNAMIC_COLOR_4 0xD // Usually aquamarine -#define TEXT_DYNAMIC_COLOR_5 0xE // Usually blue-green -#define TEXT_DYNAMIC_COLOR_6 0xF // Usually cerulean - -#define PLACEHOLDER_ID_UNKNOWN 0x0 -#define PLACEHOLDER_ID_PLAYER 0x1 -#define PLACEHOLDER_ID_STRING_VAR_1 0x2 -#define PLACEHOLDER_ID_STRING_VAR_2 0x3 -#define PLACEHOLDER_ID_STRING_VAR_3 0x4 -#define PLACEHOLDER_ID_KUN 0x5 -#define PLACEHOLDER_ID_RIVAL 0x6 -#define PLACEHOLDER_ID_VERSION 0x7 -#define PLACEHOLDER_ID_AQUA 0x8 -#define PLACEHOLDER_ID_MAGMA 0x9 -#define PLACEHOLDER_ID_ARCHIE 0xA -#define PLACEHOLDER_ID_MAXIE 0xB -#define PLACEHOLDER_ID_KYOGRE 0xC -#define PLACEHOLDER_ID_GROUDON 0xD - -// battle placeholders are located in battle_message.h - -// Hiragana from 0x1-0x50, Katakana from 0x51-0xA0. -// This excludes Japanese punctuation, which end at 0xB0 -#define JAPANESE_CHAR_END 0xA0 +#include "characters.h" #define NUM_TEXT_PRINTERS 32 diff --git a/src/contest.c b/src/contest.c index 05dd394832..aebe437e69 100644 --- a/src/contest.c +++ b/src/contest.c @@ -6031,10 +6031,10 @@ static u8 GetMonNicknameLanguage(u8 *nickname) || *nickname == CHAR_SLASH || *nickname == CHAR_HYPHEN || *nickname == CHAR_ELLIPSIS - || *nickname == CHAR_DBL_QUOT_LEFT - || *nickname == CHAR_DBL_QUOT_RIGHT - || *nickname == CHAR_SGL_QUOT_LEFT - || *nickname == CHAR_DBL_QUOT_LEFT) // Most likely a typo, CHAR_SGL_QUOT_RIGHT should be here instead. + || *nickname == CHAR_DBL_QUOTE_LEFT + || *nickname == CHAR_DBL_QUOTE_RIGHT + || *nickname == CHAR_SGL_QUOTE_LEFT + || *nickname == CHAR_DBL_QUOTE_LEFT) // Most likely a typo, CHAR_SGL_QUOTE_RIGHT should be here instead. { nickname++; } diff --git a/src/pokedex.c b/src/pokedex.c index 81d7c67305..d56b301833 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4167,10 +4167,10 @@ static void PrintMonHeight(u16 height, u8 left, u8 top) buffer[i++] = feet / 10 + CHAR_0; buffer[i++] = (feet % 10) + CHAR_0; } - buffer[i++] = CHAR_SGL_QUOT_RIGHT; + buffer[i++] = CHAR_SGL_QUOTE_RIGHT; buffer[i++] = (inches / 10) + CHAR_0; buffer[i++] = (inches % 10) + CHAR_0; - buffer[i++] = CHAR_DBL_QUOT_RIGHT; + buffer[i++] = CHAR_DBL_QUOTE_RIGHT; buffer[i++] = EOS; PrintInfoScreenText(buffer, left, top); } diff --git a/src/union_room_chat.c b/src/union_room_chat.c index 7debe3cd4f..cb9b2f6a4b 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -458,10 +458,10 @@ static const u8 sCaseToggleTable[256] = { [CHAR_LEFT_PAREN] = CHAR_LEFT_PAREN, [CHAR_RIGHT_PAREN] = CHAR_RIGHT_PAREN, [CHAR_AMPERSAND] = CHAR_AMPERSAND, - [CHAR_DBL_QUOT_LEFT] = CHAR_DBL_QUOT_LEFT, - [CHAR_DBL_QUOT_RIGHT] = CHAR_DBL_QUOT_RIGHT, - [CHAR_SGL_QUOT_LEFT] = CHAR_SGL_QUOT_LEFT, - [CHAR_SGL_QUOT_RIGHT] = CHAR_SGL_QUOT_RIGHT, + [CHAR_DBL_QUOTE_LEFT] = CHAR_DBL_QUOTE_LEFT, + [CHAR_DBL_QUOTE_RIGHT] = CHAR_DBL_QUOTE_RIGHT, + [CHAR_SGL_QUOTE_LEFT] = CHAR_SGL_QUOTE_LEFT, + [CHAR_SGL_QUOTE_RIGHT] = CHAR_SGL_QUOTE_RIGHT, [CHAR_MASCULINE_ORDINAL] = CHAR_MASCULINE_ORDINAL, [CHAR_FEMININE_ORDINAL] = CHAR_FEMININE_ORDINAL, [CHAR_BULLET] = CHAR_BULLET, diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index 7756cadc52..be8d54fc4c 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -26,6 +26,7 @@ #include "char_util.h" #include "utf8.h" #include "string_parser.h" +#include "../../gflib/characters.h" AsmFile::AsmFile(std::string filename) : m_filename(filename) { @@ -281,7 +282,7 @@ int AsmFile::ReadString(unsigned char* s) while (length < padLength) { - s[length++] = 0; + s[length++] = CHAR_SPACE; } } @@ -290,40 +291,92 @@ int AsmFile::ReadString(unsigned char* s) return length; } +void AsmFile::VerifyStringLength(int length) +{ + if (length == kMaxStringLength) + RaiseError("mapped string longer than %d bytes", kMaxStringLength); +} + int AsmFile::ReadBraille(unsigned char* s) { static std::map encoding = { - { 'A', 0x01 }, - { 'B', 0x05 }, - { 'C', 0x03 }, - { 'D', 0x0B }, - { 'E', 0x09 }, - { 'F', 0x07 }, - { 'G', 0x0F }, - { 'H', 0x0D }, - { 'I', 0x06 }, - { 'J', 0x0E }, - { 'K', 0x11 }, - { 'L', 0x15 }, - { 'M', 0x13 }, - { 'N', 0x1B }, - { 'O', 0x19 }, - { 'P', 0x17 }, - { 'Q', 0x1F }, - { 'R', 0x1D }, - { 'S', 0x16 }, - { 'T', 0x1E }, - { 'U', 0x31 }, - { 'V', 0x35 }, - { 'W', 0x2E }, - { 'X', 0x33 }, - { 'Y', 0x3B }, - { 'Z', 0x39 }, - { ' ', 0x00 }, - { ',', 0x04 }, - { '.', 0x2C }, - { '$', 0xFF }, + { 'A', BRAILLE_CHAR_A }, + { 'B', BRAILLE_CHAR_B }, + { 'C', BRAILLE_CHAR_C }, + { 'D', BRAILLE_CHAR_D }, + { 'E', BRAILLE_CHAR_E }, + { 'F', BRAILLE_CHAR_F }, + { 'G', BRAILLE_CHAR_G }, + { 'H', BRAILLE_CHAR_H }, + { 'I', BRAILLE_CHAR_I }, + { 'J', BRAILLE_CHAR_J }, + { 'K', BRAILLE_CHAR_K }, + { 'L', BRAILLE_CHAR_L }, + { 'M', BRAILLE_CHAR_M }, + { 'N', BRAILLE_CHAR_N }, + { 'O', BRAILLE_CHAR_O }, + { 'P', BRAILLE_CHAR_P }, + { 'Q', BRAILLE_CHAR_Q }, + { 'R', BRAILLE_CHAR_R }, + { 'S', BRAILLE_CHAR_S }, + { 'T', BRAILLE_CHAR_T }, + { 'U', BRAILLE_CHAR_U }, + { 'V', BRAILLE_CHAR_V }, + { 'W', BRAILLE_CHAR_W }, + { 'X', BRAILLE_CHAR_X }, + { 'Y', BRAILLE_CHAR_Y }, + { 'Z', BRAILLE_CHAR_Z }, + { 'a', BRAILLE_CHAR_A }, + { 'b', BRAILLE_CHAR_B }, + { 'c', BRAILLE_CHAR_C }, + { 'd', BRAILLE_CHAR_D }, + { 'e', BRAILLE_CHAR_E }, + { 'f', BRAILLE_CHAR_F }, + { 'g', BRAILLE_CHAR_G }, + { 'h', BRAILLE_CHAR_H }, + { 'i', BRAILLE_CHAR_I }, + { 'j', BRAILLE_CHAR_J }, + { 'k', BRAILLE_CHAR_K }, + { 'l', BRAILLE_CHAR_L }, + { 'm', BRAILLE_CHAR_M }, + { 'n', BRAILLE_CHAR_N }, + { 'o', BRAILLE_CHAR_O }, + { 'p', BRAILLE_CHAR_P }, + { 'q', BRAILLE_CHAR_Q }, + { 'r', BRAILLE_CHAR_R }, + { 's', BRAILLE_CHAR_S }, + { 't', BRAILLE_CHAR_T }, + { 'u', BRAILLE_CHAR_U }, + { 'v', BRAILLE_CHAR_V }, + { 'w', BRAILLE_CHAR_W }, + { 'x', BRAILLE_CHAR_X }, + { 'y', BRAILLE_CHAR_Y }, + { 'z', BRAILLE_CHAR_Z }, + { '0', BRAILLE_CHAR_0 }, + { '1', BRAILLE_CHAR_1 }, + { '2', BRAILLE_CHAR_2 }, + { '3', BRAILLE_CHAR_3 }, + { '4', BRAILLE_CHAR_4 }, + { '5', BRAILLE_CHAR_5 }, + { '6', BRAILLE_CHAR_6 }, + { '7', BRAILLE_CHAR_7 }, + { '8', BRAILLE_CHAR_8 }, + { '9', BRAILLE_CHAR_9 }, + { ' ', BRAILLE_CHAR_SPACE }, + { ',', BRAILLE_CHAR_COMMA }, + { '.', BRAILLE_CHAR_PERIOD }, + { '?', BRAILLE_CHAR_QUESTION_MARK }, + { '!', BRAILLE_CHAR_EXCL_MARK }, + { ':', BRAILLE_CHAR_COLON }, + { ';', BRAILLE_CHAR_SEMICOLON }, + { '-', BRAILLE_CHAR_HYPHEN }, + { '/', BRAILLE_CHAR_PAREN }, + { '(', BRAILLE_CHAR_PAREN }, + { ')', BRAILLE_CHAR_PAREN }, + { '\'', BRAILLE_CHAR_APOSTROPHE }, + { '#', BRAILLE_CHAR_NUMBER }, + { '$', EOS }, }; SkipWhitespace(); @@ -335,14 +388,13 @@ int AsmFile::ReadBraille(unsigned char* s) m_pos++; + bool inNumber = false; while (m_buffer[m_pos] != '"') { - if (length == kMaxStringLength) - RaiseError("mapped string longer than %d bytes", kMaxStringLength); - if (m_buffer[m_pos] == '\\' && m_buffer[m_pos + 1] == 'n') { - s[length++] = 0xFE; + VerifyStringLength(length); + s[length++] = CHAR_NEWLINE; m_pos += 2; } else @@ -357,6 +409,21 @@ int AsmFile::ReadBraille(unsigned char* s) RaiseError("character '\\x%02X' not valid in braille string", m_buffer[m_pos]); } + if (!inNumber && c >= '0' && c <= '9' ) + { + // Output number indicator at start of a number + inNumber = true; + VerifyStringLength(length); + s[length++] = BRAILLE_CHAR_NUMBER; + } + else if (inNumber && encoding[c] == BRAILLE_CHAR_SPACE) + { + // Number ends at a space. + // Non-number characters encountered before a space will simply be output as is. + inNumber = false; + } + + VerifyStringLength(length); s[length++] = encoding[c]; m_pos++; } diff --git a/tools/preproc/asm_file.h b/tools/preproc/asm_file.h index d73b36e90b..29435f76a4 100644 --- a/tools/preproc/asm_file.h +++ b/tools/preproc/asm_file.h @@ -67,6 +67,7 @@ private: void ReportDiagnostic(const char* type, const char* format, std::va_list args); void RaiseError(const char* format, ...); void RaiseWarning(const char* format, ...); + void VerifyStringLength(int length); }; #endif // ASM_FILE_H From fdaf436960b4a1feab037eafdb76e279ddc787e2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 30 Oct 2021 16:47:37 -0400 Subject: [PATCH 115/417] Add font id constants --- charmap.txt | 10 +- data/fonts.s | 56 +-- gflib/characters.h | 11 - gflib/text.c | 419 +++++++++++------- gflib/text.h | 49 +- .../{font9_japanese.png => bold_japanese.png} | Bin .../fonts/{font6_braille.png => braille.png} | Bin .../{font7_latin.png => narrow/latin.png} | Bin .../latin_widths.inc} | 0 .../japanese.png} | Bin .../{font1_latin.png => normal/latin.png} | Bin .../latin_widths.inc} | 0 .../japanese.png} | Bin .../japanese_widths.inc} | 0 .../{font2_latin.png => short/latin.png} | Bin .../latin_widths.inc} | 0 .../japanese.png} | Bin .../{font0_latin.png => small/latin.png} | Bin .../latin_widths.inc} | 0 .../latin.png} | Bin .../latin_widths.inc} | 0 graphics_file_rules.mk | 20 +- ld_script.txt | 4 +- src/apprentice.c | 4 +- src/battle_dome.c | 12 +- src/battle_factory_screen.c | 60 +-- src/battle_interface.c | 35 +- src/battle_message.c | 94 ++-- src/battle_pyramid_bag.c | 48 +- src/battle_records.c | 26 +- src/battle_script_commands.c | 2 +- src/battle_tower.c | 2 +- src/berry_blender.c | 22 +- src/berry_crush.c | 82 ++-- src/berry_fix_program.c | 18 +- src/berry_powder.c | 4 +- src/berry_tag_screen.c | 20 +- src/{unk_text_util_2.c => braille.c} | 24 +- src/cable_club.c | 4 +- src/clear_save_data_screen.c | 4 +- src/coins.c | 4 +- src/contest.c | 24 +- src/contest_painting.c | 4 +- src/contest_util.c | 6 +- src/credits.c | 4 +- src/daycare.c | 6 +- src/decoration.c | 14 +- src/diploma.c | 2 +- src/dodrio_berry_picking.c | 74 ++-- src/easy_chat.c | 22 +- src/egg_hatch.c | 2 +- src/field_player_avatar.c | 10 +- src/field_region_map.c | 6 +- src/field_specials.c | 30 +- src/frontier_pass.c | 30 +- src/frontier_util.c | 118 ++--- src/hall_of_fame.c | 42 +- src/international_string_util.c | 4 +- src/item_menu.c | 78 ++-- src/item_use.c | 26 +- src/link.c | 10 +- src/mail.c | 6 +- src/main_menu.c | 52 +-- src/map_name_popup.c | 4 +- src/match_call.c | 2 +- src/mauville_old_man.c | 10 +- src/menu.c | 66 +-- src/menu_specialized.c | 60 +-- src/money.c | 2 +- src/move_relearner.c | 4 +- src/mystery_event_menu.c | 2 +- src/mystery_gift_menu.c | 20 +- src/mystery_gift_view.c | 30 +- src/naming_screen.c | 14 +- src/option_menu.c | 28 +- src/party_menu.c | 30 +- src/player_pc.c | 22 +- src/pokeblock.c | 12 +- src/pokeblock_feed.c | 2 +- src/pokedex.c | 16 +- src/pokemon_jump.c | 34 +- src/pokemon_storage_system.c | 48 +- src/pokemon_summary_screen.c | 42 +- src/pokenav_conditions_2.c | 8 +- src/pokenav_conditions_3.c | 10 +- src/pokenav_main_menu.c | 2 +- src/pokenav_match_call_1.c | 6 +- src/pokenav_match_call_2.c | 20 +- src/pokenav_match_call_ui.c | 4 +- src/pokenav_menu_handler_2.c | 8 +- src/pokenav_region_map.c | 8 +- src/pokenav_ribbons_1.c | 10 +- src/pokenav_ribbons_2.c | 14 +- src/record_mixing.c | 2 +- src/region_map.c | 8 +- src/reset_rtc_screen.c | 10 +- src/roulette.c | 28 +- src/save_failed_screen.c | 2 +- src/scrcmd.c | 6 +- src/script_menu.c | 48 +- src/secret_base.c | 2 +- src/shop.c | 10 +- src/slot_machine.c | 10 +- src/start_menu.c | 34 +- src/starter_choose.c | 12 +- src/strings.c | 22 +- src/trade.c | 22 +- src/trader.c | 12 +- src/trainer_card.c | 60 +-- src/trainer_hill.c | 10 +- src/union_room.c | 4 +- src/union_room_battle.c | 2 +- src/union_room_chat.c | 28 +- src/use_pokeblock.c | 10 +- src/wallclock.c | 6 +- src/wireless_communication_status_screen.c | 10 +- 116 files changed, 1290 insertions(+), 1210 deletions(-) rename graphics/fonts/{font9_japanese.png => bold_japanese.png} (100%) rename graphics/fonts/{font6_braille.png => braille.png} (100%) rename graphics/fonts/{font7_latin.png => narrow/latin.png} (100%) rename graphics/fonts/{font7_latin_widths.inc => narrow/latin_widths.inc} (100%) rename graphics/fonts/{font1_japanese.png => normal/japanese.png} (100%) rename graphics/fonts/{font1_latin.png => normal/latin.png} (100%) rename graphics/fonts/{font1_latin_widths.inc => normal/latin_widths.inc} (100%) rename graphics/fonts/{font2_japanese.png => short/japanese.png} (100%) rename graphics/fonts/{font2_japanese_widths.inc => short/japanese_widths.inc} (100%) rename graphics/fonts/{font2_latin.png => short/latin.png} (100%) rename graphics/fonts/{font2_latin_widths.inc => short/latin_widths.inc} (100%) rename graphics/fonts/{font0_japanese.png => small/japanese.png} (100%) rename graphics/fonts/{font0_latin.png => small/latin.png} (100%) rename graphics/fonts/{font0_latin_widths.inc => small/latin_widths.inc} (100%) rename graphics/fonts/{font8_latin.png => small_narrow/latin.png} (100%) rename graphics/fonts/{font8_latin_widths.inc => small_narrow/latin_widths.inc} (100%) rename src/{unk_text_util_2.c => braille.c} (94%) diff --git a/charmap.txt b/charmap.txt index 1bca4e4f46..4c01451c80 100644 --- a/charmap.txt +++ b/charmap.txt @@ -414,7 +414,7 @@ HIGHLIGHT = FC 02 @ same as fc 01 SHADOW = FC 03 @ same as fc 01 COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes PALETTE = FC 05 @ used in credits -FONT = FC 06 @ valid values are 0, 1, 2, 6 (braille), 7 and 8 +FONT = FC 06 @ Given a font id, or use font constants below instead RESET_SIZE = FC 07 PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them PAUSE_UNTIL_PRESS = FC 09 @@ -434,6 +434,14 @@ ENG = FC 16 PAUSE_MUSIC = FC 17 RESUME_MUSIC = FC 18 +@ fonts + +FONT_SMALL = FC 06 00 +FONT_NORMAL = FC 06 01 +FONT_SHORT = FC 06 02 +FONT_NARROW = FC 06 07 +FONT_SMALL_NARROW = FC 06 08 + @ colors TRANSPARENT = 00 diff --git a/data/fonts.s b/data/fonts.s index 9283724814..4fdf029b4f 100644 --- a/data/fonts.s +++ b/data/fonts.s @@ -4,52 +4,52 @@ .section .rodata .align 2 -gFont8LatinGlyphs:: - .incbin "graphics/fonts/font8.latfont" +gFontSmallNarrowLatinGlyphs:: + .incbin "graphics/fonts/small_narrow/glyphs.latfont" .align 2 -gFont8LatinGlyphWidths:: - .include "graphics/fonts/font8_latin_widths.inc" +gFontSmallNarrowLatinGlyphWidths:: + .include "graphics/fonts/small_narrow/latin_widths.inc" .align 2 -gFont0LatinGlyphs:: - .incbin "graphics/fonts/font0.latfont" +gFontSmallLatinGlyphs:: + .incbin "graphics/fonts/small/glyphs.latfont" .align 2 -gFont0LatinGlyphWidths:: - .include "graphics/fonts/font0_latin_widths.inc" +gFontSmallLatinGlyphWidths:: + .include "graphics/fonts/small/latin_widths.inc" .align 2 -gFont7LatinGlyphs:: - .incbin "graphics/fonts/font7.latfont" +gFontNarrowLatinGlyphs:: + .incbin "graphics/fonts/narrow/glyphs.latfont" .align 2 -gFont7LatinGlyphWidths:: - .include "graphics/fonts/font7_latin_widths.inc" +gFontNarrowLatinGlyphWidths:: + .include "graphics/fonts/narrow/latin_widths.inc" .align 2 -gFont2LatinGlyphs:: - .incbin "graphics/fonts/font2.latfont" +gFontShortLatinGlyphs:: + .incbin "graphics/fonts/short/glyphs.latfont" .align 2 -gFont2LatinGlyphWidths:: - .include "graphics/fonts/font2_latin_widths.inc" +gFontShortLatinGlyphWidths:: + .include "graphics/fonts/short/latin_widths.inc" .align 2 -gFont1LatinGlyphs:: - .incbin "graphics/fonts/font1.latfont" +gFontNormalLatinGlyphs:: + .incbin "graphics/fonts/normal/glyphs.latfont" .align 2 -gFont1LatinGlyphWidths:: - .include "graphics/fonts/font1_latin_widths.inc" +gFontNormalLatinGlyphWidths:: + .include "graphics/fonts/normal/latin_widths.inc" .align 2 -gFont0JapaneseGlyphs:: - .incbin "graphics/fonts/font0.hwjpnfont" +gFontSmallJapaneseGlyphs:: + .incbin "graphics/fonts/small/glyphs.hwjpnfont" .align 2 -gFont1JapaneseGlyphs:: - .incbin "graphics/fonts/font1.hwjpnfont" +gFontNormalJapaneseGlyphs:: + .incbin "graphics/fonts/normal/glyphs.hwjpnfont" .align 2 gUnusedJapaneseFireRedLeafGreenMaleFontGlyphs:: @@ -68,9 +68,9 @@ gUnusedJapaneseFireRedLeafGreenFemaleFontGlyphWidths:: .include "graphics/fonts/unused_japanese_frlg_female_font_widths.inc" .align 2 -gFont2JapaneseGlyphs:: - .incbin "graphics/fonts/font2.fwjpnfont" +gFontShortJapaneseGlyphs:: + .incbin "graphics/fonts/short/glyphs.fwjpnfont" .align 2 -gFont2JapaneseGlyphWidths:: - .include "graphics/fonts/font2_japanese_widths.inc" +gFontShortJapaneseGlyphWidths:: + .include "graphics/fonts/short/japanese_widths.inc" diff --git a/gflib/characters.h b/gflib/characters.h index ab003a3e3d..480652df03 100644 --- a/gflib/characters.h +++ b/gflib/characters.h @@ -248,17 +248,6 @@ #define TEXT_DYNAMIC_COLOR_5 0xE // Usually blue-green #define TEXT_DYNAMIC_COLOR_6 0xF // Usually cerulean -#define FONT_0 0 -#define FONT_1 1 -#define FONT_2 2 -#define FONT_3 3 -#define FONT_4 4 -#define FONT_5 5 -#define FONT_6 6 -#define FONT_7 7 -#define FONT_8 8 - - #define PLACEHOLDER_ID_UNKNOWN 0x0 #define PLACEHOLDER_ID_PLAYER 0x1 #define PLACEHOLDER_ID_STRING_VAR_1 0x2 diff --git a/gflib/text.c b/gflib/text.c index e3043230b0..31a75e0d53 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -12,6 +12,26 @@ #include "menu.h" #include "dynamic_placeholder_text_util.h" +static u16 FontFunc_Small(struct TextPrinter *); +static u16 FontFunc_Normal(struct TextPrinter *); +static u16 FontFunc_Short(struct TextPrinter *); +static u16 FontFunc_ShortCopy1(struct TextPrinter *); +static u16 FontFunc_ShortCopy2(struct TextPrinter *); +static u16 FontFunc_ShortCopy3(struct TextPrinter *); +static u16 FontFunc_Narrow(struct TextPrinter *); +static u16 FontFunc_SmallNarrow(struct TextPrinter *); +static void DecompressGlyph_Small(u16 glyphId, bool32 isJapanese); +static void DecompressGlyph_Normal(u16 glyphId, bool32 isJapanese); +static void DecompressGlyph_Short(u16 glyphId, bool32 isJapanese); +static void DecompressGlyph_Narrow(u16 glyphId, bool32 isJapanese); +static void DecompressGlyph_SmallNarrow(u16 glyphId, bool32 isJapanese); +static void DecompressGlyph_Bold(u16 glyphId); +static u32 GetGlyphWidth_Small(u16 glyphId, bool32 isJapanese); +static u32 GetGlyphWidth_Normal(u16 glyphId, bool32 isJapanese); +static u32 GetGlyphWidth_Short(u16 glyphId, bool32 isJapanese); +static u32 GetGlyphWidth_Narrow(u16 glyphId, bool32 isJapanese); +static u32 GetGlyphWidth_SmallNarrow(u16 glyphId, bool32 isJapanese); + EWRAM_DATA struct TextPrinter gTempTextPrinter = {0}; EWRAM_DATA struct TextPrinter gTextPrinters[NUM_TEXT_PRINTERS] = {0}; @@ -49,20 +69,20 @@ const u8 gDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow.4bpp"); const u8 gDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_RS.4bpp"); const u8 gUnusedFRLGBlankedDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_blanked_down_arrow.4bpp"); const u8 gUnusedFRLGDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_down_arrow.4bpp"); -const u8 gDownArrowYCoords[] = { 0x0, 0x1, 0x2, 0x1 }; -const u8 gWindowVerticalScrollSpeeds[] = { 0x1, 0x2, 0x4, 0x0 }; +const u8 gDownArrowYCoords[] = { 0, 1, 2, 1 }; +const u8 gWindowVerticalScrollSpeeds[] = { 1, 2, 4, 0x0 }; -const struct GlyphWidthFunc gGlyphWidthFuncs[] = +static const struct GlyphWidthFunc sGlyphWidthFuncs[] = { - { 0x0, GetGlyphWidthFont0 }, - { 0x1, GetGlyphWidthFont1 }, - { 0x2, GetGlyphWidthFont2 }, - { 0x3, GetGlyphWidthFont2 }, - { 0x4, GetGlyphWidthFont2 }, - { 0x5, GetGlyphWidthFont2 }, - { 0x6, GetGlyphWidthFont6 }, - { 0x7, GetGlyphWidthFont7 }, - { 0x8, GetGlyphWidthFont8 } + { FONT_SMALL, GetGlyphWidth_Small }, + { FONT_NORMAL, GetGlyphWidth_Normal }, + { FONT_SHORT, GetGlyphWidth_Short }, + { FONT_SHORT_COPY_1, GetGlyphWidth_Short }, + { FONT_SHORT_COPY_2, GetGlyphWidth_Short }, + { FONT_SHORT_COPY_3, GetGlyphWidth_Short }, + { FONT_BRAILLE, GetGlyphWidth_Braille }, + { FONT_NARROW, GetGlyphWidth_Narrow }, + { FONT_SMALL_NARROW, GetGlyphWidth_SmallNarrow } }; const struct KeypadIcon gKeypadIcons[] = @@ -84,52 +104,142 @@ const struct KeypadIcon gKeypadIcons[] = const u8 gKeypadIconTiles[] = INCBIN_U8("graphics/fonts/keypad_icons.4bpp"); -const struct FontInfo gFontInfos[] = +static const struct FontInfo sFontInfos[] = { - { Font0Func, 0x5, 0xC, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 }, - { Font1Func, 0x6, 0x10, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 }, - { Font2Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 }, - { Font3Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 }, - { Font4Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 }, - { Font5Func, 0x6, 0xE, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 }, - { Font6Func, 0x8, 0x10, 0x0, 0x8, 0x0, 0x2, 0x1, 0x3 }, - { Font7Func, 0x5, 0x10, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 }, - { Font8Func, 0x5, 0x8, 0x0, 0x0, 0x0, 0x2, 0x1, 0x3 }, - { NULL, 0x8, 0x8, 0x0, 0x0, 0x0, 0x1, 0x2, 0xF } + [FONT_SMALL] = { + .fontFunction = FontFunc_Small, + .maxLetterWidth = 5, + .maxLetterHeight = 12, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_NORMAL] = { + .fontFunction = FontFunc_Normal, + .maxLetterWidth = 6, + .maxLetterHeight = 16, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_SHORT] = { + .fontFunction = FontFunc_Short, + .maxLetterWidth = 6, + .maxLetterHeight = 14, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_SHORT_COPY_1] = { + .fontFunction = FontFunc_ShortCopy1, + .maxLetterWidth = 6, + .maxLetterHeight = 14, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_SHORT_COPY_2] = { + .fontFunction = FontFunc_ShortCopy2, + .maxLetterWidth = 6, + .maxLetterHeight = 14, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_SHORT_COPY_3] = { + .fontFunction = FontFunc_ShortCopy3, + .maxLetterWidth = 6, + .maxLetterHeight = 14, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_BRAILLE] = { + .fontFunction = FontFunc_Braille, + .maxLetterWidth = 8, + .maxLetterHeight = 16, + .letterSpacing = 0, + .lineSpacing = 8, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_NARROW] = { + .fontFunction = FontFunc_Narrow, + .maxLetterWidth = 5, + .maxLetterHeight = 16, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_SMALL_NARROW] = { + .fontFunction = FontFunc_SmallNarrow, + .maxLetterWidth = 5, + .maxLetterHeight = 8, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 2, + .bgColor = 1, + .shadowColor = 3, + }, + [FONT_BOLD] = { + .fontFunction = NULL, + .maxLetterWidth = 8, + .maxLetterHeight = 8, + .letterSpacing = 0, + .lineSpacing = 0, + .fgColor = 1, + .bgColor = 2, + .shadowColor = 15, + } }; -const u8 gMenuCursorDimensions[][2] = +static const u8 sMenuCursorDimensions[][2] = { - { 0x8, 0xC }, - { 0x8, 0xF }, - { 0x8, 0xE }, - { 0x8, 0xE }, - { 0x8, 0xE }, - { 0x8, 0xE }, - { 0x8, 0x10 }, - { 0x8, 0xF }, - { 0x8, 0x8 }, - { 0x0, 0x0 } + [FONT_SMALL] = { 8, 12 }, + [FONT_NORMAL] = { 8, 15 }, + [FONT_SHORT] = { 8, 14 }, + [FONT_SHORT_COPY_1] = { 8, 14 }, + [FONT_SHORT_COPY_2] = { 8, 14 }, + [FONT_SHORT_COPY_3] = { 8, 14 }, + [FONT_BRAILLE] = { 8, 16 }, + [FONT_NARROW] = { 8, 15 }, + [FONT_SMALL_NARROW] = { 8, 8 }, + [FONT_BOLD] = {} }; -const u16 gFont9JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font9.hwjpnfont"); +const u16 gFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold_glyphs.hwjpnfont"); -extern const u16 gFont8LatinGlyphs[]; -extern const u8 gFont8LatinGlyphWidths[]; -extern const u16 gFont0LatinGlyphs[]; -extern const u8 gFont0LatinGlyphWidths[]; -extern const u16 gFont7LatinGlyphs[]; -extern const u8 gFont7LatinGlyphWidths[]; -extern const u16 gFont2LatinGlyphs[]; -extern const u8 gFont2LatinGlyphWidths[]; -extern const u16 gFont1LatinGlyphs[]; -extern const u8 gFont1LatinGlyphWidths[]; -extern const u16 gFont0JapaneseGlyphs[]; -extern const u16 gFont1JapaneseGlyphs[]; -extern const u16 gFont2JapaneseGlyphs[]; -extern const u8 gFont2JapaneseGlyphWidths[]; +extern const u16 gFontNormalLatinGlyphs[]; +extern const u8 gFontNormalLatinGlyphWidths[]; +extern const u16 gFontNormalJapaneseGlyphs[]; +extern const u16 gFontSmallLatinGlyphs[]; +extern const u8 gFontSmallLatinGlyphWidths[]; +extern const u16 gFontSmallJapaneseGlyphs[]; +extern const u16 gFontShortLatinGlyphs[]; +extern const u8 gFontShortLatinGlyphWidths[]; +extern const u16 gFontShortJapaneseGlyphs[]; +extern const u8 gFontShortJapaneseGlyphWidths[]; +extern const u16 gFontNarrowLatinGlyphs[]; +extern const u8 gFontNarrowLatinGlyphWidths[]; +extern const u16 gFontSmallNarrowLatinGlyphs[]; +extern const u8 gFontSmallNarrowLatinGlyphWidths[]; -void SetFontsPointer(const struct FontInfo *fonts) +static void SetFontsPointer(const struct FontInfo *fonts) { gFonts = fonts; } @@ -565,98 +675,98 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width) } } -u16 Font0Func(struct TextPrinter *textPrinter) +static u16 FontFunc_Small(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - if (subStruct->hasGlyphIdBeenSet == FALSE) + if (subStruct->hasFontIdBeenSet == FALSE) { - subStruct->glyphId = 0; - subStruct->hasGlyphIdBeenSet = TRUE; + subStruct->fontId = FONT_SMALL; + subStruct->hasFontIdBeenSet = TRUE; } return RenderText(textPrinter); } -u16 Font1Func(struct TextPrinter *textPrinter) +static u16 FontFunc_Normal(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - if (subStruct->hasGlyphIdBeenSet == FALSE) + if (subStruct->hasFontIdBeenSet == FALSE) { - subStruct->glyphId = 1; - subStruct->hasGlyphIdBeenSet = TRUE; + subStruct->fontId = FONT_NORMAL; + subStruct->hasFontIdBeenSet = TRUE; } return RenderText(textPrinter); } -u16 Font2Func(struct TextPrinter *textPrinter) +static u16 FontFunc_Short(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - if (subStruct->hasGlyphIdBeenSet == FALSE) + if (subStruct->hasFontIdBeenSet == FALSE) { - subStruct->glyphId = 2; - subStruct->hasGlyphIdBeenSet = TRUE; + subStruct->fontId = FONT_SHORT; + subStruct->hasFontIdBeenSet = TRUE; } return RenderText(textPrinter); } -u16 Font3Func(struct TextPrinter *textPrinter) +static u16 FontFunc_ShortCopy1(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - if (subStruct->hasGlyphIdBeenSet == FALSE) + if (subStruct->hasFontIdBeenSet == FALSE) { - subStruct->glyphId = 3; - subStruct->hasGlyphIdBeenSet = TRUE; + subStruct->fontId = FONT_SHORT_COPY_1; + subStruct->hasFontIdBeenSet = TRUE; } return RenderText(textPrinter); } -u16 Font4Func(struct TextPrinter *textPrinter) +static u16 FontFunc_ShortCopy2(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - if (subStruct->hasGlyphIdBeenSet == FALSE) + if (subStruct->hasFontIdBeenSet == FALSE) { - subStruct->glyphId = 4; - subStruct->hasGlyphIdBeenSet = TRUE; + subStruct->fontId = FONT_SHORT_COPY_2; + subStruct->hasFontIdBeenSet = TRUE; } return RenderText(textPrinter); } -u16 Font5Func(struct TextPrinter *textPrinter) +static u16 FontFunc_ShortCopy3(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - if (subStruct->hasGlyphIdBeenSet == FALSE) + if (subStruct->hasFontIdBeenSet == FALSE) { - subStruct->glyphId = 5; - subStruct->hasGlyphIdBeenSet = TRUE; + subStruct->fontId = FONT_SHORT_COPY_3; + subStruct->hasFontIdBeenSet = TRUE; } return RenderText(textPrinter); } -u16 Font7Func(struct TextPrinter *textPrinter) +static u16 FontFunc_Narrow(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - if (subStruct->hasGlyphIdBeenSet == FALSE) + if (subStruct->hasFontIdBeenSet == FALSE) { - subStruct->glyphId = 7; - subStruct->hasGlyphIdBeenSet = TRUE; + subStruct->fontId = FONT_NARROW; + subStruct->hasFontIdBeenSet = TRUE; } return RenderText(textPrinter); } -u16 Font8Func(struct TextPrinter *textPrinter) +static u16 FontFunc_SmallNarrow(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); - if (subStruct->hasGlyphIdBeenSet == FALSE) + if (subStruct->hasFontIdBeenSet == FALSE) { - subStruct->glyphId = 8; - subStruct->hasGlyphIdBeenSet = TRUE; + subStruct->fontId = FONT_SMALL_NARROW; + subStruct->hasFontIdBeenSet = TRUE; } return RenderText(textPrinter); } @@ -907,7 +1017,7 @@ u16 RenderText(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentChar++; return 2; case EXT_CTRL_CODE_FONT: - subStruct->glyphId = *textPrinter->printerTemplate.currentChar; + subStruct->fontId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; case EXT_CTRL_CODE_RESET_SIZE: @@ -1022,27 +1132,27 @@ u16 RenderText(struct TextPrinter *textPrinter) return 1; } - switch (subStruct->glyphId) + switch (subStruct->fontId) { - case 0: - DecompressGlyphFont0(currChar, textPrinter->japanese); + case FONT_SMALL: + DecompressGlyph_Small(currChar, textPrinter->japanese); break; - case 1: - DecompressGlyphFont1(currChar, textPrinter->japanese); + case FONT_NORMAL: + DecompressGlyph_Normal(currChar, textPrinter->japanese); break; - case 2: - case 3: - case 4: - case 5: - DecompressGlyphFont2(currChar, textPrinter->japanese); + case FONT_SHORT: + case FONT_SHORT_COPY_1: + case FONT_SHORT_COPY_2: + case FONT_SHORT_COPY_3: + DecompressGlyph_Short(currChar, textPrinter->japanese); break; - case 7: - DecompressGlyphFont7(currChar, textPrinter->japanese); + case FONT_NARROW: + DecompressGlyph_Narrow(currChar, textPrinter->japanese); break; - case 8: - DecompressGlyphFont8(currChar, textPrinter->japanese); + case FONT_SMALL_NARROW: + DecompressGlyph_SmallNarrow(currChar, textPrinter->japanese); break; - case 6: + case FONT_BRAILLE: break; } @@ -1125,7 +1235,8 @@ u16 RenderText(struct TextPrinter *textPrinter) return 1; } -u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) +// Unused +static u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) { int i; u8 width; @@ -1136,10 +1247,8 @@ u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) u8 lineWidths[8]; const u8 *strLocal; - for (i = 0; i < 8; i++) - { + for (i = 0; i < (int)ARRAY_COUNT(lineWidths); i++) lineWidths[i] = 0; - } width = 0; line = 0; @@ -1216,14 +1325,14 @@ u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) return (u8)(GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH) + letterSpacing) * width; } -u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32) +static u32 (*GetFontWidthFunc(u8 fontId))(u16, bool32) { u32 i; - for (i = 0; i < 9; ++i) + for (i = 0; i < ARRAY_COUNT(sGlyphWidthFuncs); ++i) { - if (glyphId == gGlyphWidthFuncs[i].fontId) - return gGlyphWidthFuncs[i].func; + if (fontId == sGlyphWidthFuncs[i].fontId) + return sGlyphWidthFuncs[i].func; } return NULL; @@ -1233,7 +1342,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) { bool8 isJapanese; int minGlyphWidth; - u32 (*func)(u16 glyphId, bool32 isJapanese); + u32 (*func)(u16 fontId, bool32 isJapanese); int localLetterSpacing; u32 lineWidth; const u8 *bufferPointer; @@ -1490,12 +1599,12 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str) default: switch (fontId) { - case 9: - DecompressGlyphFont9(temp); + case FONT_BOLD: + DecompressGlyph_Bold(temp); break; - case 1: + case FONT_NORMAL: default: - DecompressGlyphFont1(temp, 1); + DecompressGlyph_Normal(temp, TRUE); break; } CpuCopy32(gCurGlyph.gfxBufferTop, pixels, 0x20); @@ -1543,7 +1652,7 @@ u8 GetKeypadIconHeight(u8 keypadIconId) void SetDefaultFontsPointer(void) { - SetFontsPointer(&gFontInfos[0]); + SetFontsPointer(sFontInfos); } u8 GetFontAttribute(u8 fontId, u8 attributeId) @@ -1552,28 +1661,28 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId) switch (attributeId) { case FONTATTR_MAX_LETTER_WIDTH: - result = gFontInfos[fontId].maxLetterWidth; + result = sFontInfos[fontId].maxLetterWidth; break; case FONTATTR_MAX_LETTER_HEIGHT: - result = gFontInfos[fontId].maxLetterHeight; + result = sFontInfos[fontId].maxLetterHeight; break; case FONTATTR_LETTER_SPACING: - result = gFontInfos[fontId].letterSpacing; + result = sFontInfos[fontId].letterSpacing; break; case FONTATTR_LINE_SPACING: - result = gFontInfos[fontId].lineSpacing; + result = sFontInfos[fontId].lineSpacing; break; case FONTATTR_UNKNOWN: - result = gFontInfos[fontId].unk; + result = sFontInfos[fontId].unk; break; case FONTATTR_COLOR_FOREGROUND: - result = gFontInfos[fontId].fgColor; + result = sFontInfos[fontId].fgColor; break; case FONTATTR_COLOR_BACKGROUND: - result = gFontInfos[fontId].bgColor; + result = sFontInfos[fontId].bgColor; break; case FONTATTR_COLOR_SHADOW: - result = gFontInfos[fontId].shadowColor; + result = sFontInfos[fontId].shadowColor; break; } return result; @@ -1581,16 +1690,16 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId) u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension) { - return gMenuCursorDimensions[fontId][whichDimension]; + return sMenuCursorDimensions[fontId][whichDimension]; } -void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese) +static void DecompressGlyph_Small(u16 glyphId, bool32 isJapanese) { const u16* glyphs; if (isJapanese == 1) { - glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF)); + glyphs = gFontSmallJapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF)); DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); gCurGlyph.width = 8; @@ -1598,8 +1707,8 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese) } else { - glyphs = gFont0LatinGlyphs + (0x20 * glyphId); - gCurGlyph.width = gFont0LatinGlyphWidths[glyphId]; + glyphs = gFontSmallLatinGlyphs + (0x20 * glyphId); + gCurGlyph.width = gFontSmallLatinGlyphWidths[glyphId]; if (gCurGlyph.width <= 8) { @@ -1618,21 +1727,21 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese) } } -u32 GetGlyphWidthFont0(u16 glyphId, bool32 isJapanese) +static u32 GetGlyphWidth_Small(u16 glyphId, bool32 isJapanese) { if (isJapanese == TRUE) return 8; else - return gFont0LatinGlyphWidths[glyphId]; + return gFontSmallLatinGlyphWidths[glyphId]; } -void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese) +static void DecompressGlyph_Narrow(u16 glyphId, bool32 isJapanese) { const u16* glyphs; if (isJapanese == TRUE) { - glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10)); + glyphs = gFontNormalJapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10)); DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); gCurGlyph.width = 8; @@ -1640,8 +1749,8 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese) } else { - glyphs = gFont7LatinGlyphs + (0x20 * glyphId); - gCurGlyph.width = gFont7LatinGlyphWidths[glyphId]; + glyphs = gFontNarrowLatinGlyphs + (0x20 * glyphId); + gCurGlyph.width = gFontNarrowLatinGlyphWidths[glyphId]; if (gCurGlyph.width <= 8) { @@ -1660,21 +1769,21 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese) } } -u32 GetGlyphWidthFont7(u16 glyphId, bool32 isJapanese) +static u32 GetGlyphWidth_Narrow(u16 glyphId, bool32 isJapanese) { if (isJapanese == TRUE) return 8; else - return gFont7LatinGlyphWidths[glyphId]; + return gFontNarrowLatinGlyphWidths[glyphId]; } -void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese) +static void DecompressGlyph_SmallNarrow(u16 glyphId, bool32 isJapanese) { const u16* glyphs; if (isJapanese == TRUE) { - glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF)); + glyphs = gFontSmallJapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF)); DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); gCurGlyph.width = 8; @@ -1682,8 +1791,8 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese) } else { - glyphs = gFont8LatinGlyphs + (0x20 * glyphId); - gCurGlyph.width = gFont8LatinGlyphWidths[glyphId]; + glyphs = gFontSmallNarrowLatinGlyphs + (0x20 * glyphId); + gCurGlyph.width = gFontSmallNarrowLatinGlyphWidths[glyphId]; if (gCurGlyph.width <= 8) { @@ -1702,32 +1811,32 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese) } } -u32 GetGlyphWidthFont8(u16 glyphId, bool32 isJapanese) +static u32 GetGlyphWidth_SmallNarrow(u16 glyphId, bool32 isJapanese) { if (isJapanese == TRUE) return 8; else - return gFont8LatinGlyphWidths[glyphId]; + return gFontSmallNarrowLatinGlyphWidths[glyphId]; } -void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese) +static void DecompressGlyph_Short(u16 glyphId, bool32 isJapanese) { const u16* glyphs; if (isJapanese == TRUE) { - glyphs = gFont2JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7)); + glyphs = gFontShortJapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7)); DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8); DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); // gCurGlyph + 0x20 DecompressGlyphTile(glyphs + 0x88, gCurGlyph.gfxBufferBottom + 8); // gCurGlyph + 0x60 - gCurGlyph.width = gFont2JapaneseGlyphWidths[glyphId]; + gCurGlyph.width = gFontShortJapaneseGlyphWidths[glyphId]; gCurGlyph.height = 14; } else { - glyphs = gFont2LatinGlyphs + (0x20 * glyphId); - gCurGlyph.width = gFont2LatinGlyphWidths[glyphId]; + glyphs = gFontShortLatinGlyphs + (0x20 * glyphId); + gCurGlyph.width = gFontShortLatinGlyphWidths[glyphId]; if (gCurGlyph.width <= 8) { @@ -1746,21 +1855,21 @@ void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese) } } -u32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese) +static u32 GetGlyphWidth_Short(u16 glyphId, bool32 isJapanese) { if (isJapanese == TRUE) - return gFont2JapaneseGlyphWidths[glyphId]; + return gFontShortJapaneseGlyphWidths[glyphId]; else - return gFont2LatinGlyphWidths[glyphId]; + return gFontShortLatinGlyphWidths[glyphId]; } -void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese) +static void DecompressGlyph_Normal(u16 glyphId, bool32 isJapanese) { const u16* glyphs; if (isJapanese == TRUE) { - glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10)); + glyphs = gFontNormalJapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId % 0x10)); DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); gCurGlyph.width = 8; @@ -1768,8 +1877,8 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese) } else { - glyphs = gFont1LatinGlyphs + (0x20 * glyphId); - gCurGlyph.width = gFont1LatinGlyphWidths[glyphId]; + glyphs = gFontNormalLatinGlyphs + (0x20 * glyphId); + gCurGlyph.width = gFontNormalLatinGlyphWidths[glyphId]; if (gCurGlyph.width <= 8) { @@ -1788,19 +1897,19 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese) } } -u32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese) +static u32 GetGlyphWidth_Normal(u16 glyphId, bool32 isJapanese) { if (isJapanese == TRUE) return 8; else - return gFont1LatinGlyphWidths[glyphId]; + return gFontNormalLatinGlyphWidths[glyphId]; } -void DecompressGlyphFont9(u16 glyphId) +static void DecompressGlyph_Bold(u16 glyphId) { const u16* glyphs; - glyphs = gFont9JapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF)); + glyphs = gFontBoldJapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF)); DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); gCurGlyph.width = 8; diff --git a/gflib/text.h b/gflib/text.h index 91b9ef77ff..2c981de209 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -7,8 +7,20 @@ #define TEXT_SPEED_FF 0xFF -enum -{ +enum { + FONT_SMALL, + FONT_NORMAL, + FONT_SHORT, + FONT_SHORT_COPY_1, + FONT_SHORT_COPY_2, + FONT_SHORT_COPY_3, + FONT_BRAILLE, + FONT_NARROW, + FONT_SMALL_NARROW, // Very similar to FONT_SMALL, some glyphs are narrower + FONT_BOLD, // JP glyph set only +}; + +enum { FONTATTR_MAX_LETTER_WIDTH, FONTATTR_MAX_LETTER_HEIGHT, FONTATTR_LETTER_SPACING, @@ -21,12 +33,12 @@ enum struct TextPrinterSubStruct { - u8 glyphId:4; // 0x14 + u8 fontId:4; // 0x14 bool8 hasPrintBeenSpedUp:1; u8 unk:3; u8 downArrowDelay:5; u8 downArrowYPosIdx:2; - bool8 hasGlyphIdBeenSet:1; + bool8 hasFontIdBeenSet:1; u8 autoScrollDelay; }; @@ -111,7 +123,6 @@ extern TextFlags gTextFlags; extern u8 gDisableTextPrinters; extern struct TextGlyph gCurGlyph; -void SetFontsPointer(const struct FontInfo *fonts); void DeactivateAllTextPrinters(void); u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); bool16 AddTextPrinter(struct TextPrinterTemplate *template, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); @@ -127,15 +138,6 @@ void CopyGlyphToWindow(struct TextPrinter *x); void ClearTextSpan(struct TextPrinter *textPrinter, u32 width); u8 GetMenuCursorDimensionByFont(u8, u8); -u16 Font0Func(struct TextPrinter *textPrinter); -u16 Font1Func(struct TextPrinter *textPrinter); -u16 Font2Func(struct TextPrinter *textPrinter); -u16 Font3Func(struct TextPrinter *textPrinter); -u16 Font4Func(struct TextPrinter *textPrinter); -u16 Font5Func(struct TextPrinter *textPrinter); -u16 Font7Func(struct TextPrinter *textPrinter); -u16 Font8Func(struct TextPrinter *textPrinter); - void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter); void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter); void TextPrinterClearDownArrow(struct TextPrinter *textPrinter); @@ -144,8 +146,6 @@ bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter); bool16 TextPrinterWait(struct TextPrinter *textPrinter); void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex); u16 RenderText(struct TextPrinter *textPrinter); -u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing); -u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32); s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing); u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str); u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y); @@ -155,20 +155,9 @@ u8 GetKeypadIconHeight(u8 keypadIconId); void SetDefaultFontsPointer(void); u8 GetFontAttribute(u8 fontId, u8 attributeId); u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension); -void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese); -u32 GetGlyphWidthFont0(u16 glyphId, bool32 isJapanese); -void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese); -u32 GetGlyphWidthFont7(u16 glyphId, bool32 isJapanese); -void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese); -u32 GetGlyphWidthFont8(u16 glyphId, bool32 isJapanese); -void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese); -u32 GetGlyphWidthFont2(u16 glyphId, bool32 isJapanese); -void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese); -u32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese); -void DecompressGlyphFont9(u16 glyphId); -// unk_text_util_2.c -u16 Font6Func(struct TextPrinter *textPrinter); -u32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese); +// braille.c +u16 FontFunc_Braille(struct TextPrinter *textPrinter); +u32 GetGlyphWidth_Braille(u16 glyphId, bool32 isJapanese); #endif // GUARD_TEXT_H diff --git a/graphics/fonts/font9_japanese.png b/graphics/fonts/bold_japanese.png similarity index 100% rename from graphics/fonts/font9_japanese.png rename to graphics/fonts/bold_japanese.png diff --git a/graphics/fonts/font6_braille.png b/graphics/fonts/braille.png similarity index 100% rename from graphics/fonts/font6_braille.png rename to graphics/fonts/braille.png diff --git a/graphics/fonts/font7_latin.png b/graphics/fonts/narrow/latin.png similarity index 100% rename from graphics/fonts/font7_latin.png rename to graphics/fonts/narrow/latin.png diff --git a/graphics/fonts/font7_latin_widths.inc b/graphics/fonts/narrow/latin_widths.inc similarity index 100% rename from graphics/fonts/font7_latin_widths.inc rename to graphics/fonts/narrow/latin_widths.inc diff --git a/graphics/fonts/font1_japanese.png b/graphics/fonts/normal/japanese.png similarity index 100% rename from graphics/fonts/font1_japanese.png rename to graphics/fonts/normal/japanese.png diff --git a/graphics/fonts/font1_latin.png b/graphics/fonts/normal/latin.png similarity index 100% rename from graphics/fonts/font1_latin.png rename to graphics/fonts/normal/latin.png diff --git a/graphics/fonts/font1_latin_widths.inc b/graphics/fonts/normal/latin_widths.inc similarity index 100% rename from graphics/fonts/font1_latin_widths.inc rename to graphics/fonts/normal/latin_widths.inc diff --git a/graphics/fonts/font2_japanese.png b/graphics/fonts/short/japanese.png similarity index 100% rename from graphics/fonts/font2_japanese.png rename to graphics/fonts/short/japanese.png diff --git a/graphics/fonts/font2_japanese_widths.inc b/graphics/fonts/short/japanese_widths.inc similarity index 100% rename from graphics/fonts/font2_japanese_widths.inc rename to graphics/fonts/short/japanese_widths.inc diff --git a/graphics/fonts/font2_latin.png b/graphics/fonts/short/latin.png similarity index 100% rename from graphics/fonts/font2_latin.png rename to graphics/fonts/short/latin.png diff --git a/graphics/fonts/font2_latin_widths.inc b/graphics/fonts/short/latin_widths.inc similarity index 100% rename from graphics/fonts/font2_latin_widths.inc rename to graphics/fonts/short/latin_widths.inc diff --git a/graphics/fonts/font0_japanese.png b/graphics/fonts/small/japanese.png similarity index 100% rename from graphics/fonts/font0_japanese.png rename to graphics/fonts/small/japanese.png diff --git a/graphics/fonts/font0_latin.png b/graphics/fonts/small/latin.png similarity index 100% rename from graphics/fonts/font0_latin.png rename to graphics/fonts/small/latin.png diff --git a/graphics/fonts/font0_latin_widths.inc b/graphics/fonts/small/latin_widths.inc similarity index 100% rename from graphics/fonts/font0_latin_widths.inc rename to graphics/fonts/small/latin_widths.inc diff --git a/graphics/fonts/font8_latin.png b/graphics/fonts/small_narrow/latin.png similarity index 100% rename from graphics/fonts/font8_latin.png rename to graphics/fonts/small_narrow/latin.png diff --git a/graphics/fonts/font8_latin_widths.inc b/graphics/fonts/small_narrow/latin_widths.inc similarity index 100% rename from graphics/fonts/font8_latin_widths.inc rename to graphics/fonts/small_narrow/latin_widths.inc diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 9fd9091a46..fb2eee5051 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -289,34 +289,34 @@ $(TILESETGFXDIR)/secondary/mystery_events_house/tiles.4bpp: %.4bpp: %.png ### Fonts ### -$(FONTGFXDIR)/font0.latfont: $(FONTGFXDIR)/font0_latin.png +$(FONTGFXDIR)/small/glyphs.latfont: $(FONTGFXDIR)/small/latin.png $(GFX) $< $@ -$(FONTGFXDIR)/font1.latfont: $(FONTGFXDIR)/font1_latin.png +$(FONTGFXDIR)/normal/glyphs.latfont: $(FONTGFXDIR)/normal/latin.png $(GFX) $< $@ -$(FONTGFXDIR)/font2.latfont: $(FONTGFXDIR)/font2_latin.png +$(FONTGFXDIR)/short/glyphs.latfont: $(FONTGFXDIR)/short/latin.png $(GFX) $< $@ -$(FONTGFXDIR)/font7.latfont: $(FONTGFXDIR)/font7_latin.png +$(FONTGFXDIR)/narrow/glyphs.latfont: $(FONTGFXDIR)/narrow/latin.png $(GFX) $< $@ -$(FONTGFXDIR)/font8.latfont: $(FONTGFXDIR)/font8_latin.png +$(FONTGFXDIR)/small_narrow/glyphs.latfont: $(FONTGFXDIR)/small_narrow/latin.png $(GFX) $< $@ -$(FONTGFXDIR)/font0.hwjpnfont: $(FONTGFXDIR)/font0_japanese.png +$(FONTGFXDIR)/small/glyphs.hwjpnfont: $(FONTGFXDIR)/small/japanese.png $(GFX) $< $@ -$(FONTGFXDIR)/font1.hwjpnfont: $(FONTGFXDIR)/font1_japanese.png +$(FONTGFXDIR)/normal/glyphs.hwjpnfont: $(FONTGFXDIR)/normal/japanese.png $(GFX) $< $@ -$(FONTGFXDIR)/font9.hwjpnfont: $(FONTGFXDIR)/font9_japanese.png +$(FONTGFXDIR)/bold_glyphs.hwjpnfont: $(FONTGFXDIR)/bold_japanese.png $(GFX) $< $@ -$(FONTGFXDIR)/font2.fwjpnfont: $(FONTGFXDIR)/font2_japanese.png +$(FONTGFXDIR)/short/glyphs.fwjpnfont: $(FONTGFXDIR)/short/japanese.png $(GFX) $< $@ -$(FONTGFXDIR)/font6.fwjpnfont: $(FONTGFXDIR)/font6_braille.png +$(FONTGFXDIR)/braille_glyphs.fwjpnfont: $(FONTGFXDIR)/braille.png $(GFX) $< $@ $(FONTGFXDIR)/unused_frlg_male.fwjpnfont: $(FONTGFXDIR)/unused_japanese_frlg_male_font.png diff --git a/ld_script.txt b/ld_script.txt index 3c1a250944..34ba15c582 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -299,7 +299,7 @@ SECTIONS { src/item_icon.o(.text); src/party_menu.o(.text); src/battle_tent.o(.text); - src/unk_text_util_2.o(.text); + src/braille.o(.text); src/multiboot.o(.text); src/berry_fix_graphics.o(.text); src/battle_controller_player_partner.o(.text); @@ -654,7 +654,7 @@ SECTIONS { src/item_icon.o(.rodata); src/party_menu.o(.rodata); src/battle_tent.o(.rodata); - src/unk_text_util_2.o(.rodata); + src/braille.o(.rodata); src/multiboot.o(.rodata); src/berry_fix_graphics.o(.rodata); src/battle_controller_player_partner.o(.rodata); diff --git a/src/apprentice.c b/src/apprentice.c index 5d1c4287b8..032b76715c 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -632,7 +632,7 @@ static void CreateApprenticeMenu(u8 menu) pixelWidth = 0; for (i = 0; i < count; i++) { - s32 width = GetStringWidth(1, strings[i], 0); + s32 width = GetStringWidth(FONT_NORMAL, strings[i], 0); if (width > pixelWidth) pixelWidth = width; } @@ -643,7 +643,7 @@ static void CreateApprenticeMenu(u8 menu) SetStandardWindowBorderStyle(windowId, 0); for (i = 0; i < count; i++) - AddTextPrinterParameterized(windowId, 1, strings[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, 0); CreateChooseAnswerTask(TRUE, count, windowId); diff --git a/src/battle_dome.c b/src/battle_dome.c index 9449186310..429cc58d7e 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -4312,7 +4312,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) } // Initialize the text printer - textPrinter.fontId = 2; + textPrinter.fontId = FONT_SHORT; textPrinter.x = 0; textPrinter.y = 0; textPrinter.currentX = textPrinter.x; @@ -4393,7 +4393,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) else textPrinter.currentChar = sBattleDomePotentialTexts[trainerTourneyId]; - textPrinter.fontId = 1; + textPrinter.fontId = FONT_NORMAL; textPrinter.windowId = windowId + 4; textPrinter.currentX = 0; textPrinter.y = 4; @@ -4859,7 +4859,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) StringExpandPlaceholders(gStringVar4, sBattleDomeWinTexts[winStringId]); textPrinter.currentChar = gStringVar4; textPrinter.windowId = windowId + 8; - textPrinter.fontId = 1; + textPrinter.fontId = FONT_NORMAL; PutWindowTilemap(windowId + 8); CopyWindowToVram(windowId + 8, 3); textPrinter.currentX = 0; @@ -4874,7 +4874,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) else CopyDomeTrainerName(gStringVar1, trainerIds[0]); - textPrinter.fontId = 2; + textPrinter.fontId = FONT_SHORT; textPrinter.letterSpacing = 2; textPrinter.currentChar = gStringVar1; textPrinter.windowId = windowId + 6; @@ -5339,7 +5339,7 @@ static void Task_ShowTourneyTree(u8 taskId) gTasks[taskId].tState++; break; case 4: - textPrinter.fontId = 2; + textPrinter.fontId = FONT_SHORT; textPrinter.currentChar = gText_BattleTourney; textPrinter.windowId = 2; textPrinter.x = 0; @@ -5524,7 +5524,7 @@ static void Task_HandleStaticTourneyTreeInput(u8 taskId) { gTasks[taskId].tState = STATE_DELAY; gTasks[taskId].data[3] = 64; - textPrinter.fontId = 2; + textPrinter.fontId = FONT_SHORT; textPrinter.x = 0; textPrinter.y = 0; textPrinter.letterSpacing = 2; diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 64d5640622..cd0a44e38a 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -1861,7 +1861,7 @@ static void Select_ErasePopupMenu(u8 windowId) static void Select_PrintRentalPkmnString(void) { FillWindowPixelBuffer(SELECT_WIN_TITLE, PIXEL_FILL(0)); - AddTextPrinterParameterized(SELECT_WIN_TITLE, 1, gText_RentalPkmn2, 2, 1, 0, NULL); + AddTextPrinterParameterized(SELECT_WIN_TITLE, FONT_NORMAL, gText_RentalPkmn2, 2, 1, 0, NULL); CopyWindowToVram(SELECT_WIN_TITLE, 3); } @@ -1874,8 +1874,8 @@ static void Select_PrintMonSpecies(void) FillWindowPixelBuffer(SELECT_WIN_SPECIES, PIXEL_FILL(0)); species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); - x = GetStringRightAlignXOffset(1, gStringVar4, 86); - AddTextPrinterParameterized3(SELECT_WIN_SPECIES, 1, x, 1, sSpeciesNameTextColors, 0, gStringVar4); + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86); + AddTextPrinterParameterized3(SELECT_WIN_SPECIES, FONT_NORMAL, x, 1, sSpeciesNameTextColors, 0, gStringVar4); CopyWindowToVram(SELECT_WIN_SPECIES, 2); } @@ -1893,14 +1893,14 @@ static void Select_PrintSelectMonString(void) else str = gText_TheseThreePkmnOkay; - AddTextPrinterParameterized(SELECT_WIN_INFO, 1, str, 2, 5, 0, NULL); + AddTextPrinterParameterized(SELECT_WIN_INFO, FONT_NORMAL, str, 2, 5, 0, NULL); CopyWindowToVram(SELECT_WIN_INFO, 2); } static void Select_PrintCantSelectSameMon(void) { FillWindowPixelBuffer(SELECT_WIN_INFO, PIXEL_FILL(0)); - AddTextPrinterParameterized(SELECT_WIN_INFO, 1, gText_CantSelectSamePkmn, 2, 5, 0, NULL); + AddTextPrinterParameterized(SELECT_WIN_INFO, FONT_NORMAL, gText_CantSelectSamePkmn, 2, 5, 0, NULL); CopyWindowToVram(SELECT_WIN_INFO, 2); } @@ -1910,13 +1910,13 @@ static void Select_PrintMenuOptions(void) PutWindowTilemap(SELECT_WIN_OPTIONS); FillWindowPixelBuffer(SELECT_WIN_OPTIONS, PIXEL_FILL(0)); - AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, 1, 7, 1, sMenuOptionTextColors, 0, gText_Summary); + AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 1, sMenuOptionTextColors, 0, gText_Summary); if (selectedId != 0) - AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, 1, 7, 17, sMenuOptionTextColors, 0, gText_Deselect); + AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 17, sMenuOptionTextColors, 0, gText_Deselect); else - AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, 1, 7, 17, sMenuOptionTextColors, 0, gText_Rent); + AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 17, sMenuOptionTextColors, 0, gText_Rent); - AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, 1, 7, 33, sMenuOptionTextColors, 0, gText_Others2); + AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 33, sMenuOptionTextColors, 0, gText_Others2); CopyWindowToVram(SELECT_WIN_OPTIONS, 3); } @@ -1924,8 +1924,8 @@ static void Select_PrintYesNoOptions(void) { PutWindowTilemap(SELECT_WIN_YES_NO); FillWindowPixelBuffer(SELECT_WIN_YES_NO, PIXEL_FILL(0)); - AddTextPrinterParameterized3(SELECT_WIN_YES_NO, 1, 7, 1, sMenuOptionTextColors, 0, gText_Yes2); - AddTextPrinterParameterized3(SELECT_WIN_YES_NO, 1, 7, 17, sMenuOptionTextColors, 0, gText_No2); + AddTextPrinterParameterized3(SELECT_WIN_YES_NO, FONT_NORMAL, 7, 1, sMenuOptionTextColors, 0, gText_Yes2); + AddTextPrinterParameterized3(SELECT_WIN_YES_NO, FONT_NORMAL, 7, 17, sMenuOptionTextColors, 0, gText_No2); CopyWindowToVram(SELECT_WIN_YES_NO, 3); } @@ -1994,8 +1994,8 @@ static void Select_PrintMonCategory(void) FillWindowPixelBuffer(SELECT_WIN_MON_CATEGORY, PIXEL_FILL(0)); species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL); CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text); - x = GetStringRightAlignXOffset(1, text, 0x76); - AddTextPrinterParameterized(SELECT_WIN_MON_CATEGORY, 1, text, x, 1, 0, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x76); + AddTextPrinterParameterized(SELECT_WIN_MON_CATEGORY, FONT_NORMAL, text, x, 1, 0, NULL); CopyWindowToVram(SELECT_WIN_MON_CATEGORY, 2); } } @@ -3753,7 +3753,7 @@ static void Swap_EraseActionFadeWindow(void) static void Swap_PrintPkmnSwap(void) { FillWindowPixelBuffer(SWAP_WIN_TITLE, PIXEL_FILL(1)); - AddTextPrinterParameterized(SWAP_WIN_TITLE, 1, gText_PkmnSwap, 2, 1, 0, NULL); + AddTextPrinterParameterized(SWAP_WIN_TITLE, FONT_NORMAL, gText_PkmnSwap, 2, 1, 0, NULL); CopyWindowToVram(SWAP_WIN_TITLE, 3); } @@ -3775,8 +3775,8 @@ static void Swap_PrintMonSpecies(void) else species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); - x = GetStringRightAlignXOffset(1, gStringVar4, 86); - AddTextPrinterParameterized3(SWAP_WIN_SPECIES, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86); + AddTextPrinterParameterized3(SWAP_WIN_SPECIES, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); CopyWindowToVram(SWAP_WIN_SPECIES, 3); } } @@ -3784,7 +3784,7 @@ static void Swap_PrintMonSpecies(void) static void Swap_PrintOnInfoWindow(const u8 *str) { FillWindowPixelBuffer(SWAP_WIN_INFO, PIXEL_FILL(0)); - AddTextPrinterParameterized(SWAP_WIN_INFO, 1, str, 2, 5, 0, NULL); + AddTextPrinterParameterized(SWAP_WIN_INFO, FONT_NORMAL, str, 2, 5, 0, NULL); CopyWindowToVram(SWAP_WIN_INFO, 2); } @@ -3792,9 +3792,9 @@ static void Swap_PrintMenuOptions(void) { PutWindowTilemap(SWAP_WIN_OPTIONS); FillWindowPixelBuffer(SWAP_WIN_OPTIONS, PIXEL_FILL(0)); - AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, 1, 15, 1, sSwapMenuOptionsTextColors, 0, gText_Summary2); - AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, 1, 15, 17, sSwapMenuOptionsTextColors, 0, gText_Swap); - AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, 1, 15, 33, sSwapMenuOptionsTextColors, 0, gText_Rechoose); + AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 1, sSwapMenuOptionsTextColors, 0, gText_Summary2); + AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 17, sSwapMenuOptionsTextColors, 0, gText_Swap); + AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 33, sSwapMenuOptionsTextColors, 0, gText_Rechoose); CopyWindowToVram(SWAP_WIN_OPTIONS, 3); } @@ -3802,15 +3802,15 @@ static void Swap_PrintYesNoOptions(void) { PutWindowTilemap(SWAP_WIN_YES_NO); FillWindowPixelBuffer(SWAP_WIN_YES_NO, PIXEL_FILL(0)); - AddTextPrinterParameterized3(SWAP_WIN_YES_NO, 1, 7, 1, sSwapMenuOptionsTextColors, 0, gText_Yes3); - AddTextPrinterParameterized3(SWAP_WIN_YES_NO, 1, 7, 17, sSwapMenuOptionsTextColors, 0, gText_No3); + AddTextPrinterParameterized3(SWAP_WIN_YES_NO, FONT_NORMAL, 7, 1, sSwapMenuOptionsTextColors, 0, gText_Yes3); + AddTextPrinterParameterized3(SWAP_WIN_YES_NO, FONT_NORMAL, 7, 17, sSwapMenuOptionsTextColors, 0, gText_No3); CopyWindowToVram(SWAP_WIN_YES_NO, 3); } static void Swap_PrintActionString(const u8 *str, u32 y, u32 windowId) { - s32 x = GetStringRightAlignXOffset(0, str, 0x46); - AddTextPrinterParameterized3(windowId, 0, x, y, sSwapMenuOptionsTextColors, 0, str); + s32 x = GetStringRightAlignXOffset(FONT_SMALL, str, 0x46); + AddTextPrinterParameterized3(windowId, FONT_SMALL, x, y, sSwapMenuOptionsTextColors, 0, str); } static void Swap_PrintActionStrings(void) @@ -3884,8 +3884,8 @@ static void Swap_PrintMonSpeciesAtFade(void) else species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); - x = GetStringRightAlignXOffset(1, gStringVar4, 86); - AddTextPrinterParameterized3(SWAP_WIN_SPECIES_AT_FADE, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86); + AddTextPrinterParameterized3(SWAP_WIN_SPECIES_AT_FADE, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, 3); } } @@ -3911,8 +3911,8 @@ static void Swap_PrintMonSpeciesForTransition(void) else species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL); StringCopy(gStringVar4, gSpeciesNames[species]); - x = GetStringRightAlignXOffset(1, gStringVar4, 86); - AddTextPrinterParameterized3(SWAP_WIN_SPECIES, 1, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86); + AddTextPrinterParameterized3(SWAP_WIN_SPECIES, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); CopyWindowToVram(SWAP_WIN_SPECIES, 3); } } @@ -3937,8 +3937,8 @@ static void Swap_PrintMonCategory(void) else species = GetMonData(&gEnemyParty[monId], MON_DATA_SPECIES, NULL); CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text); - x = GetStringRightAlignXOffset(1, text, 0x76); - AddTextPrinterParameterized(SWAP_WIN_MON_CATEGORY, 1, text, x, 1, 0, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x76); + AddTextPrinterParameterized(SWAP_WIN_MON_CATEGORY, FONT_NORMAL, text, x, 1, 0, NULL); CopyWindowToVram(SWAP_WIN_MON_CATEGORY, 2); } } diff --git a/src/battle_interface.c b/src/battle_interface.c index 77308cb3cc..933a75d436 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -718,21 +718,8 @@ static const struct SpriteTemplate sStatusSummaryBallsSpriteTemplates[2] = } }; -// possibly text -static const u8 sUnknown_0832C3C4[] = -{ - 0xfc, 0x01, 0x01, 0xfc, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; - -// possibly text -static const u8 sUnknown_0832C3D8[] = -{ - 0xfc, 0x01, 0x01, 0xfc, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, -}; +static const u8 sEmptyWhiteText_GrayHighlight[] = __("{COLOR WHITE}{HIGHLIGHT DARK_GRAY} "); +static const u8 sEmptyWhiteText_TransparentHighlight[] = __("{COLOR WHITE}{HIGHLIGHT TRANSPARENT} "); enum { @@ -1166,7 +1153,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) { u8 battler; - memcpy(text, sUnknown_0832C3C4, sizeof(sUnknown_0832C3C4)); + memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight)); battler = gSprites[healthboxSpriteId].hMain_Battler; if (IsDoubleBattle() == TRUE || GetBattlerSide(battler) == B_SIDE_OPPONENT) { @@ -1193,7 +1180,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) } ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text); + RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); for (i = 0; i < 3; i++) { @@ -1245,7 +1232,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 { u8 battlerId; - memcpy(text, sUnknown_0832C3D8, sizeof(sUnknown_0832C3D8)); + memcpy(text, sEmptyWhiteText_TransparentHighlight, sizeof(sEmptyWhiteText_TransparentHighlight)); battlerId = gSprites[healthboxSpriteId].hMain_Battler; if (gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars) // don't print text if only bars are visible @@ -1262,7 +1249,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3); if (!maxOrCurrent) StringCopy(txtPtr, gText_Slash); - RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text); + RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); for (i = var; i < var + 3; i++) { @@ -1308,12 +1295,12 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon) u8 *barFontGfx; u8 i, var, nature, healthBarSpriteId; - memcpy(text, sUnknown_0832C3C4, sizeof(sUnknown_0832C3C4)); + memcpy(text, sEmptyWhiteText_GrayHighlight, sizeof(sEmptyWhiteText_GrayHighlight)); barFontGfx = &gMonSpritesGfxPtr->barFontGfx[0x520 + (GetBattlerPosition(gSprites[healthboxSpriteId].hMain_Battler) * 384)]; var = 5; nature = GetNature(mon); StringCopy(text + 6, gNatureNamePointers[nature]); - RenderTextFont9(barFontGfx, 9, text); + RenderTextFont9(barFontGfx, FONT_BOLD, text); for (j = 6, i = 0; i < var; i++, j++) { @@ -1345,7 +1332,7 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon) ConvertIntToDecimalStringN(text + 9, gBattleStruct->safariEscapeFactor, STR_CONV_MODE_RIGHT_ALIGN, 2); text[5] = CHAR_SPACE; text[8] = CHAR_SLASH; - RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, 9, text); + RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); j = healthBarSpriteId; // Needed to match for some reason. for (j = 0; j < 5; j++) @@ -2130,7 +2117,7 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId) txtPtr = StringCopy(text, gText_SafariBallLeft); ConvertIntToDecimalStringN(txtPtr, gNumSafariBalls, STR_CONV_MODE_LEFT_ALIGN, 2); - windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(0, text, 0x2F), 3, 2, &windowId); + windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(FONT_SMALL, text, 0x2F), 3, 2, &windowId); spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP; SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2); SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4); @@ -2538,7 +2525,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, color[1] = 1; color[2] = 3; - AddTextPrinterParameterized4(winId, 0, x, y, 0, 0, color, -1, str); + AddTextPrinterParameterized4(winId, FONT_SMALL, x, y, 0, 0, color, -1, str); *windowId = winId; return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA)); diff --git a/src/battle_message.c b/src/battle_message.c index b69a171a13..00f63bcad0 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1482,7 +1482,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = { [B_WIN_MSG] = { .fillValue = PIXEL_FILL(0xF), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1494,7 +1494,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_ACTION_PROMPT] = { .fillValue = PIXEL_FILL(0xF), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 1, .y = 1, .letterSpacing = 0, @@ -1506,7 +1506,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_ACTION_MENU] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1518,7 +1518,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_MOVE_NAME_1] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1530,7 +1530,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_MOVE_NAME_2] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1542,7 +1542,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_MOVE_NAME_3] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1554,7 +1554,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_MOVE_NAME_4] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1566,7 +1566,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_PP] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1578,7 +1578,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_DUMMY] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1590,7 +1590,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_PP_REMAINING] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 2, .y = 1, .letterSpacing = 0, @@ -1602,7 +1602,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_MOVE_TYPE] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1614,7 +1614,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_SWITCH_PROMPT] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1626,7 +1626,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_YESNO] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1638,7 +1638,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_LEVEL_UP_BOX] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1650,7 +1650,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_LEVEL_UP_BANNER] = { .fillValue = PIXEL_FILL(0), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 32, .y = 1, .letterSpacing = 0, @@ -1662,7 +1662,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_PLAYER] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1674,7 +1674,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_OPPONENT] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1686,7 +1686,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_MULTI_PLAYER_1] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1698,7 +1698,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_MULTI_PLAYER_2] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1710,7 +1710,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_MULTI_PLAYER_3] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1722,7 +1722,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_MULTI_PLAYER_4] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1734,7 +1734,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_OUTCOME_DRAW] = { .fillValue = PIXEL_FILL(0), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1746,7 +1746,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_OUTCOME_LEFT] = { .fillValue = PIXEL_FILL(0), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1758,7 +1758,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] = }, [B_WIN_VS_OUTCOME_RIGHT] = { .fillValue = PIXEL_FILL(0x0), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1774,7 +1774,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = { [B_WIN_MSG] = { .fillValue = PIXEL_FILL(0xF), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1786,7 +1786,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_ACTION_PROMPT] = { .fillValue = PIXEL_FILL(0xF), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 1, .y = 1, .letterSpacing = 0, @@ -1798,7 +1798,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_ACTION_MENU] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1810,7 +1810,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_MOVE_NAME_1] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1822,7 +1822,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_MOVE_NAME_2] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1834,7 +1834,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_MOVE_NAME_3] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1846,7 +1846,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_MOVE_NAME_4] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1858,7 +1858,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_PP] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1870,7 +1870,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_DUMMY] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1882,7 +1882,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_PP_REMAINING] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 2, .y = 1, .letterSpacing = 0, @@ -1894,7 +1894,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_MOVE_TYPE] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1906,7 +1906,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_SWITCH_PROMPT] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 7, + .fontId = FONT_NARROW, .x = 0, .y = 1, .letterSpacing = 0, @@ -1918,7 +1918,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_YESNO] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1930,7 +1930,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_LEVEL_UP_BOX] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, @@ -1942,7 +1942,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [B_WIN_LEVEL_UP_BANNER] = { .fillValue = PIXEL_FILL(0), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 32, .y = 1, .letterSpacing = 0, @@ -1954,7 +1954,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [ARENA_WIN_PLAYER_NAME] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1966,7 +1966,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [ARENA_WIN_VS] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1978,7 +1978,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [ARENA_WIN_OPPONENT_NAME] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -1990,7 +1990,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [ARENA_WIN_MIND] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -2002,7 +2002,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [ARENA_WIN_SKILL] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -2014,7 +2014,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [ARENA_WIN_BODY] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -2026,7 +2026,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [ARENA_WIN_JUDGEMENT_TITLE] = { .fillValue = PIXEL_FILL(0xE), - .fontId = 1, + .fontId = FONT_NORMAL, .x = -1, .y = 1, .letterSpacing = 0, @@ -2038,7 +2038,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] = }, [ARENA_WIN_JUDGEMENT_TEXT] = { .fillValue = PIXEL_FILL(0x1), - .fontId = 1, + .fontId = FONT_NORMAL, .x = 0, .y = 1, .letterSpacing = 0, diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 179f4dc654..02e0e5c3a4 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -88,8 +88,8 @@ static void CopyBagItemName(u8 *, u16); static void FreeItemIconSpriteByAltId(u8); static void PrintItemDescription(s32); static void PrintSelectorArrowAtPos(u8, u8); -static void PrintOnWindow_Font1(u8, const u8 *, u8, u8, u8, u8, u8, u8); -static void PrintOnWindow_Font7(u8, const u8 *, u8, u8, u8, u8, u8, u8); +static void PyramidBagPrint(u8, const u8 *, u8, u8, u8, u8, u8, u8); +static void PyramidBagPrint_Quantity(u8, const u8 *, u8, u8, u8, u8, u8, u8); static u8 OpenMenuActionWindowById(u8); static void CloseMenuActionWindowById(u8); static void PrintMenuActionText_SingleRow(u8); @@ -159,7 +159,7 @@ static const struct ListMenuTemplate sListMenuTemplate = .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 7, + .fontId = FONT_NARROW, .cursorKind = 0 }; @@ -672,8 +672,8 @@ static void PrintItemQuantity(u8 windowId, u32 itemIndex, u8 y) STR_CONV_MODE_RIGHT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_xVar1); - xAlign = GetStringRightAlignXOffset(7, gStringVar4, 119); - PrintOnWindow_Font7(windowId, gStringVar4, xAlign, y, 0, 0, TEXT_SPEED_FF, COLORID_DARK_GRAY); + xAlign = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119); + PyramidBagPrint_Quantity(windowId, gStringVar4, xAlign, y, 0, 0, TEXT_SPEED_FF, COLORID_DARK_GRAY); } static void PrintItemDescription(s32 listMenuId) @@ -690,7 +690,7 @@ static void PrintItemDescription(s32 listMenuId) desc = gStringVar4; } FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PrintOnWindow_Font1(WIN_INFO, desc, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); + PyramidBagPrint(WIN_INFO, desc, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); } static void AddScrollArrows(void) @@ -849,9 +849,9 @@ static void PrintSelectorArrow(u8 listMenuTaskId, u8 colorId) static void PrintSelectorArrowAtPos(u8 y, u8 colorId) { if (colorId == COLORID_NONE) // If 'no color', erase arrow - FillWindowPixelRect(WIN_LIST, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); + FillWindowPixelRect(WIN_LIST, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(FONT_NORMAL, 0), GetMenuCursorDimensionByFont(FONT_NORMAL, 1)); else - PrintOnWindow_Font1(WIN_LIST, gText_SelectorArrow2, 0, y, 0, 0, 0, colorId); + PyramidBagPrint(WIN_LIST, gText_SelectorArrow2, 0, y, 0, 0, 0, colorId); } void CloseBattlePyramidBag(u8 taskId) @@ -962,7 +962,7 @@ static void OpenContextMenu(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected); FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); + PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); if (gPyramidBagMenu->menuActionsCount == 1) PrintMenuActionText_SingleRow(OpenMenuActionWindowById(MENU_WIN_1x1)); else if (gPyramidBagMenu->menuActionsCount == 2) @@ -978,13 +978,13 @@ static void OpenContextMenu(u8 taskId) static void PrintMenuActionText_SingleRow(u8 windowId) { - AddItemMenuActionTextPrinters(windowId, 7, 8, 1, 0, 0x10, gPyramidBagMenu->menuActionsCount, sMenuActions, gPyramidBagMenu->menuActionIds); + AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 0x10, gPyramidBagMenu->menuActionsCount, sMenuActions, gPyramidBagMenu->menuActionIds); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, gPyramidBagMenu->menuActionsCount, 0); } static void PrintMenuActionText_MultiRow(u8 windowId, u8 horizontalCount, u8 verticalCount) { - PrintMenuActionGrid(windowId, 7, 8, 1, 56, horizontalCount, verticalCount, sMenuActions, gPyramidBagMenu->menuActionIds); + PrintMenuActionGrid(windowId, FONT_NARROW, 8, 1, 56, horizontalCount, verticalCount, sMenuActions, gPyramidBagMenu->menuActionIds); InitMenuActionGrid(windowId, 56, horizontalCount, verticalCount, 0); } @@ -1137,7 +1137,7 @@ static void BagAction_Toss(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s); FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); + PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); ShowNumToToss(); gTasks[taskId].func = Task_ChooseHowManyToToss; } @@ -1151,7 +1151,7 @@ static void AskConfirmToss(u8 taskId) ConvertIntToDecimalStringN(gStringVar2, tNumToToss, STR_CONV_MODE_LEFT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems); FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); + PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); CreatePyramidBagYesNo(taskId, &sYesNoTossFuncions); } @@ -1170,8 +1170,8 @@ static void ShowNumToToss(void) ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_xVar1); DrawTossNumberWindow(WIN_TOSS_NUM); - x = GetStringCenterAlignXOffset(1, gStringVar4, 0x28); - AddTextPrinterParameterized(WIN_TOSS_NUM, 1, gStringVar4, x, 2, 0, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 0x28); + AddTextPrinterParameterized(WIN_TOSS_NUM, FONT_NORMAL, gStringVar4, x, 2, 0, NULL); } static void UpdateNumToToss(s16 num) @@ -1179,8 +1179,8 @@ static void UpdateNumToToss(s16 num) s32 x; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_xVar1); - x = GetStringCenterAlignXOffset(1, gStringVar4, 0x28); - AddTextPrinterParameterized(WIN_TOSS_NUM, 1, gStringVar4, x, 2, 0, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 0x28); + AddTextPrinterParameterized(WIN_TOSS_NUM, FONT_NORMAL, gStringVar4, x, 2, 0, NULL); } static void Task_ChooseHowManyToToss(u8 taskId) @@ -1219,7 +1219,7 @@ static void TossItem(u8 taskId) ConvertIntToDecimalStringN(gStringVar2, tNumToToss, STR_CONV_MODE_LEFT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s); FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); + PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); gTasks[taskId].func = Task_TossItem; } @@ -1316,7 +1316,7 @@ static void Task_BeginItemSwap(u8 taskId) CopyItemName(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode][tListPos], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where); FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0)); - PrintOnWindow_Font1(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); + PyramidBagPrint(WIN_INFO, gStringVar4, 3, 0, 0, 1, 0, COLORID_DARK_GRAY); PrintSelectorArrow(tListTaskId, COLORID_LIGHT_GRAY); UpdateSwapLinePos(tListPos); gTasks[taskId].func = Task_ItemSwapHandleInput; @@ -1454,14 +1454,14 @@ static void InitPyramidBagWindows(void) ScheduleBgCopyTilemapToVram(1); } -static void PrintOnWindow_Font1(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId) +static void PyramidBagPrint(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId) { - AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, sTextColors[colorTableId], speed, src); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, lineSpacing, sTextColors[colorTableId], speed, src); } -static void PrintOnWindow_Font7(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId) +static void PyramidBagPrint_Quantity(u8 windowId, const u8 *src, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorTableId) { - AddTextPrinterParameterized4(windowId, 7, x, y, letterSpacing, lineSpacing, sTextColors[colorTableId], speed, src); + AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, letterSpacing, lineSpacing, sTextColors[colorTableId], speed, src); } static void DrawTossNumberWindow(u8 windowId) @@ -1509,7 +1509,7 @@ static void CreatePyramidBagYesNo(u8 taskId, const struct YesNoFuncTable *yesNoT void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId)) { FillWindowPixelBuffer(WIN_MSG, PIXEL_FILL(1)); - DisplayMessageAndContinueTask(taskId, WIN_MSG, 0xA, 0xD, 1, GetPlayerTextSpeedDelay(), str, callback); + DisplayMessageAndContinueTask(taskId, WIN_MSG, 0xA, 0xD, FONT_NORMAL, GetPlayerTextSpeedDelay(), str, callback); ScheduleBgCopyTilemapToVram(1); } diff --git a/src/battle_records.c b/src/battle_records.c index 5dff8e6d34..1004f7bc92 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -282,8 +282,8 @@ static void PrintLinkBattleWinsLossesDraws(struct LinkBattleRecord *records) ConvertIntToDecimalStringN(gStringVar3, GetGameStat(GAME_STAT_LINK_BATTLE_DRAWS), STR_CONV_MODE_LEFT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_TotalRecordWLD); - x = GetStringCenterAlignXOffset(1, gStringVar4, 0xD0); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x, 0x11, 0, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 0xD0); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 0x11, 0, NULL); } static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 language) @@ -291,10 +291,10 @@ static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 lan if (record->wins == 0 && record->losses == 0 && record->draws == 0) { // empty slot - AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoPlayer, 8, (y * 8) + 1, 0, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 80, (y * 8) + 1, 0, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 128, (y * 8) + 1, 0, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, sText_DashesNoScore, 176, (y * 8) + 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sText_DashesNoPlayer, 8, (y * 8) + 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sText_DashesNoScore, 80, (y * 8) + 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sText_DashesNoScore, 128, (y * 8) + 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sText_DashesNoScore, 176, (y * 8) + 1, 0, NULL); } else { @@ -302,16 +302,16 @@ static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 lan StringCopyN(gStringVar1, record->name, 7); ConvertInternationalString(gStringVar1, language); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 8, (y * 8) + 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 8, (y * 8) + 1, 0, NULL); ConvertIntToDecimalStringN(gStringVar1, record->wins, STR_CONV_MODE_RIGHT_ALIGN, 4); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 80, (y * 8) + 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 80, (y * 8) + 1, 0, NULL); ConvertIntToDecimalStringN(gStringVar1, record->losses, STR_CONV_MODE_RIGHT_ALIGN, 4); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 128, (y * 8) + 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 128, (y * 8) + 1, 0, NULL); ConvertIntToDecimalStringN(gStringVar1, record->draws, STR_CONV_MODE_RIGHT_ALIGN, 4); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar1, 176, (y * 8) + 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 176, (y * 8) + 1, 0, NULL); } } @@ -324,12 +324,12 @@ void ShowLinkBattleRecords(void) FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_PlayersBattleResults); - x = GetStringCenterAlignXOffset(1, gStringVar4, 208); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x, 1, 0, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 1, 0, NULL); PrintLinkBattleWinsLossesDraws(gSaveBlock1Ptr->linkBattleRecords.entries); StringExpandPlaceholders(gStringVar4, gText_WinLoseDraw); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, 0, 41, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, 0, 41, 0, NULL); for (i = 0; i < LINK_B_RECORDS_COUNT; i++) { diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 92d4b97079..d9447ac746 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6041,7 +6041,7 @@ static void DrawLevelUpBannerText(void) printerTemplate.currentChar = gStringVar4; printerTemplate.windowId = B_WIN_LEVEL_UP_BANNER; - printerTemplate.fontId = 0; + printerTemplate.fontId = FONT_SMALL; printerTemplate.x = 32; printerTemplate.y = 0; printerTemplate.currentX = 32; diff --git a/src/battle_tower.c b/src/battle_tower.c index b2f81cc1ac..d9bd18bf73 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1909,7 +1909,7 @@ static void FillFactoryTentTrainerParty(u16 trainerId, u8 firstMonId) void FrontierSpeechToString(const u16 *words) { ConvertEasyChatWordsToString(gStringVar4, words, 3, 2); - if (GetStringWidth(1, gStringVar4, -1) > 204u) + if (GetStringWidth(FONT_NORMAL, gStringVar4, -1) > 204u) { s32 i = 0; diff --git a/src/berry_blender.c b/src/berry_blender.c index 9701c8c81b..65008dae07 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -1608,7 +1608,7 @@ static void PrintPlayerNames(void) text[0] = EOS; StringCopy(text, gLinkPlayers[sBerryBlender->arrowIdToPlayerId[i]].name); - xPos = GetStringCenterAlignXOffset(1, text, 0x38); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, text, 0x38); if (playerId == sBerryBlender->arrowIdToPlayerId[i]) Blender_AddTextPrinter(i, text, xPos, 1, 0, 2); // Highlight player's name in red @@ -3494,7 +3494,7 @@ static bool8 PrintBlendingResults(void) u16 minutes, seconds; u8 *txtPtr; - xPos = GetStringCenterAlignXOffset(1, sText_BlendingResults, 0xA8); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_BlendingResults, 0xA8); Blender_AddTextPrinter(5, sText_BlendingResults, xPos, 1, TEXT_SPEED_FF, 0); if (sBerryBlender->numPlayers == BLENDER_MAX_PLAYERS) @@ -3526,7 +3526,7 @@ static bool8 PrintBlendingResults(void) StringAppend(sBerryBlender->stringVar, text); StringAppend(sBerryBlender->stringVar, sText_RPM); - xPos = GetStringRightAlignXOffset(1, sBerryBlender->stringVar, 0xA8); + xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8); Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x51, TEXT_SPEED_FF, 3); Blender_AddTextPrinter(5, sText_Time, 0, 0x61, TEXT_SPEED_FF, 3); @@ -3539,7 +3539,7 @@ static bool8 PrintBlendingResults(void) ConvertIntToDecimalStringN(txtPtr, seconds, STR_CONV_MODE_LEADING_ZEROS, 2); StringAppend(sBerryBlender->stringVar, sText_Sec); - xPos = GetStringRightAlignXOffset(1, sBerryBlender->stringVar, 0xA8); + xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8); Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x61, TEXT_SPEED_FF, 3); sBerryBlender->framesToWait = 0; @@ -3693,7 +3693,7 @@ static bool8 PrintBlendingRanking(void) break; case 3: DrawStdFrameWithCustomTileAndPalette(5, 0, 1, 0xD); - xPos = GetStringCenterAlignXOffset(1, sText_Ranking, 168); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168); Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SPEED_FF, 0); sBerryBlender->scoreIconIds[SCORE_BEST] = CreateSprite(&sSpriteTemplate_ScoreSymbols, 128, 52, 0); @@ -3767,9 +3767,9 @@ void ShowBerryBlenderRecordWindow(void) DrawStdWindowFrame(gRecordsWindowId, 0); FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); - xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 144); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_234Players, 4, 41, 0, NULL); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_BlenderMaxSpeedRecord, 144); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_234Players, 4, 41, 0, NULL); for (i = 0, yPos = 41; i < NUM_SCORE_TYPES; i++) { @@ -3783,8 +3783,8 @@ void ShowBerryBlenderRecordWindow(void) txtPtr = ConvertIntToDecimalStringN(txtPtr, record % 100, STR_CONV_MODE_LEADING_ZEROS, 2); txtPtr = StringAppend(txtPtr, sText_RPM); - xPos = GetStringRightAlignXOffset(1, text, 140); - AddTextPrinterParameterized(gRecordsWindowId, 1, text, xPos, yPos + (i * 16), 0, NULL); + xPos = GetStringRightAlignXOffset(FONT_NORMAL, text, 140); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, xPos, yPos + (i * 16), 0, NULL); } PutWindowTilemap(gRecordsWindowId); @@ -3879,7 +3879,7 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3 FillWindowPixelBuffer(windowId, PIXEL_FILL(txtColor[0])); } - AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, 1, txtColor, speed, string); } static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed) diff --git a/src/berry_crush.c b/src/berry_crush.c index dcd7363bd3..8ac6bb3123 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1591,8 +1591,8 @@ static void FramesToMinSec(struct BerryCrushGame_Gfx *gfx, u16 frames) static void PrintTextCentered(u8 windowId, u8 left, u8 colorId, const u8 *string) { - left = (left * 4) - (GetStringWidth(2, string, -1) / 2u); - AddTextPrinterParameterized3(windowId, 2, left, 0, sTextColorTable[colorId], 0, string); + left = (left * 4) - (GetStringWidth(FONT_SHORT, string, -1) / 2u); + AddTextPrinterParameterized3(windowId, FONT_SHORT, left, 0, sTextColorTable[colorId], 0, string); } static void PrintResultsText(struct BerryCrushGame * game, u8 page, u8 sp14, u8 baseY) @@ -1652,8 +1652,8 @@ static void PrintResultsText(struct BerryCrushGame * game, u8 page, u8 sp14, u8 StringExpandPlaceholders(gStringVar4, sResultsTexts[page]); break; } - x = GetStringRightAlignXOffset(2, gStringVar4, sp14 - 4); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); + x = GetStringRightAlignXOffset(FONT_SHORT, gStringVar4, sp14 - 4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); if (playerId == game->localId) StringCopy(gStringVar3, gText_1DotBlueF700); else @@ -1661,7 +1661,7 @@ static void PrintResultsText(struct BerryCrushGame * game, u8 page, u8 sp14, u8 gStringVar3[0] = ranking + CHAR_1; DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, game->players[playerId].name); DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gStringVar3); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 4, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, 4, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); } } @@ -1676,34 +1676,34 @@ static void PrintCrushingResults(struct BerryCrushGame *game) FramesToMinSec(&game->gfx, results->time); // Print time text - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimeColon); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimeColon); // Print seconds text - x = 176 - (u8)GetStringWidth(2, gText_SpaceSec, -1); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_SpaceSec); + x = 176 - (u8)GetStringWidth(FONT_SHORT, gText_SpaceSec, -1); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gText_SpaceSec); // Print seconds value ConvertIntToDecimalStringN(gStringVar1, game->gfx.secondsInt, STR_CONV_MODE_LEADING_ZEROS, 2); ConvertIntToDecimalStringN(gStringVar2, game->gfx.secondsFrac, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_XDotY2); - x -= GetStringWidth(2, gStringVar4, -1); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); + x -= GetStringWidth(FONT_SHORT, gStringVar4, -1); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); // Print minutes text - x -= GetStringWidth(2, gText_SpaceMin, -1); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_SpaceMin); + x -= GetStringWidth(FONT_SHORT, gText_SpaceMin, -1); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gText_SpaceMin); // Print minutes value ConvertIntToDecimalStringN(gStringVar1, game->gfx.minutes, STR_CONV_MODE_LEADING_ZEROS, 1); StringExpandPlaceholders(gStringVar4, gText_StrVar1); - x -= GetStringWidth(2, gStringVar4, -1); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); + x -= GetStringWidth(FONT_SHORT, gStringVar4, -1); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); // Print pressing speed text y += 14; - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_PressingSpeed); - x = 176 - (u8)GetStringWidth(2, gText_TimesPerSec, -1); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_PressingSpeed); + x = 176 - (u8)GetStringWidth(FONT_SHORT, gText_TimesPerSec, -1); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec); // Print pressing speed value for (i = 0; i < 8; i++) @@ -1712,21 +1712,21 @@ static void PrintCrushingResults(struct BerryCrushGame *game) ConvertIntToDecimalStringN(gStringVar1, game->pressingSpeed >> 8, STR_CONV_MODE_RIGHT_ALIGN, 3); ConvertIntToDecimalStringN(gStringVar2, pressingSpeedFrac / 1000000, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_XDotY3); - x -= GetStringWidth(2, gStringVar4, -1); + x -= GetStringWidth(FONT_SHORT, gStringVar4, -1); if (game->newRecord) - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_RED], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_RED], 0, gStringVar4); else - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); // Print silkiness text y += 14; - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_Silkiness); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, 0, y, sTextColorTable[COLORID_GRAY], 0, gText_Silkiness); // Print silkiness value ConvertIntToDecimalStringN(gStringVar1, results->silkiness, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_Var1Percent); - x = 176 - (u8)GetStringWidth(2, gStringVar4, -1); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); + x = 176 - (u8)GetStringWidth(FONT_SHORT, gStringVar4, -1); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_SHORT, x, y, sTextColorTable[COLORID_GRAY], 0, gStringVar4); } static bool32 OpenResultsWindow(struct BerryCrushGame *game, struct BerryCrushGame_Gfx *gfx) @@ -1814,10 +1814,10 @@ static void Task_ShowRankings(u8 taskId) break; case 1: // Print header text - xPos = 96 - GetStringWidth(1, gText_BerryCrush2, -1) / 2u; - AddTextPrinterParameterized3(tWindowId, 1, xPos, 1, sTextColorTable[COLORID_BLUE], 0, gText_BerryCrush2); - xPos = 96 - GetStringWidth(1, gText_PressingSpeedRankings, -1) / 2u; - AddTextPrinterParameterized3(tWindowId, 1, xPos, 17, sTextColorTable[COLORID_BLUE], 0, gText_PressingSpeedRankings); + xPos = 96 - GetStringWidth(FONT_NORMAL, gText_BerryCrush2, -1) / 2u; + AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, xPos, 1, sTextColorTable[COLORID_BLUE], 0, gText_BerryCrush2); + xPos = 96 - GetStringWidth(FONT_NORMAL, gText_PressingSpeedRankings, -1) / 2u; + AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, xPos, 17, sTextColorTable[COLORID_BLUE], 0, gText_PressingSpeedRankings); // Print pressing speed record for each group size, ranked yPos = 41; @@ -1825,9 +1825,9 @@ static void Task_ShowRankings(u8 taskId) { ConvertIntToDecimalStringN(gStringVar1, i + 2, STR_CONV_MODE_LEFT_ALIGN, 1); StringExpandPlaceholders(gStringVar4, gText_Var1Players); - AddTextPrinterParameterized3(tWindowId, 1, 0, yPos, sTextColorTable[COLORID_GRAY], 0, gStringVar4); - xPos = 192 - (u8)GetStringWidth(1, gText_TimesPerSec, -1); - AddTextPrinterParameterized3(tWindowId, 1, xPos, yPos, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec); + AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, 0, yPos, sTextColorTable[COLORID_GRAY], 0, gStringVar4); + xPos = 192 - (u8)GetStringWidth(FONT_NORMAL, gText_TimesPerSec, -1); + AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, xPos, yPos, sTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec); for (j = 0; j < 8; j++) { if (((tPressingSpeeds(i) & 0xFF) >> (7 - j)) & 1) @@ -1836,8 +1836,8 @@ static void Task_ShowRankings(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, (u16)tPressingSpeeds(i) >> 8, STR_CONV_MODE_RIGHT_ALIGN, 3); ConvertIntToDecimalStringN(gStringVar2, score / 1000000, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_XDotY3); - xPos -= GetStringWidth(1, gStringVar4, -1); - AddTextPrinterParameterized3(tWindowId, 1, xPos, yPos, sTextColorTable[COLORID_GRAY], 0, gStringVar4); + xPos -= GetStringWidth(FONT_NORMAL, gStringVar4, -1); + AddTextPrinterParameterized3(tWindowId, FONT_NORMAL, xPos, yPos, sTextColorTable[COLORID_GRAY], 0, gStringVar4); yPos += 16; score = 0; } @@ -1913,8 +1913,8 @@ static void DrawPlayerNameWindows(struct BerryCrushGame *game) // Print the player's name AddTextPrinterParameterized4( game->gfx.nameWindowIds[i], - 2, - 36 - GetStringWidth(2, game->players[i].name, 0) / 2u, + FONT_SHORT, + 36 - GetStringWidth(FONT_SHORT, game->players[i].name, 0) / 2u, 1, 0, 0, @@ -1928,8 +1928,8 @@ static void DrawPlayerNameWindows(struct BerryCrushGame *game) // Print a partner's name AddTextPrinterParameterized4( game->gfx.nameWindowIds[i], - 2, - 36 - GetStringWidth(2, game->players[i].name, 0) / 2u, + FONT_SHORT, + 36 - GetStringWidth(FONT_SHORT, game->players[i].name, 0) / 2u, 1, 0, 0, @@ -2258,11 +2258,11 @@ static u32 Cmd_PrintMessage(struct BerryCrushGame *game, u8 *args) if (args[1] & F_MSG_EXPAND) { StringExpandPlaceholders(gStringVar4, sMessages[args[0]]); - AddTextPrinterParameterized2(0, 1, gStringVar4, game->textSpeed, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, game->textSpeed, 0, 2, 1, 3); } else { - AddTextPrinterParameterized2(0, 1, sMessages[args[0]], game->textSpeed, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[args[0]], game->textSpeed, 0, 2, 1, 3); } CopyWindowToVram(0, 3); break; @@ -3242,7 +3242,7 @@ static u32 Cmd_SaveGame(struct BerryCrushGame *game, u8 *args) if (!IsLinkTaskFinished()) return 0; DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 0, 2, 1, 3); CopyWindowToVram(0, 3); CreateTask(Task_LinkSave, 0); break; @@ -3391,9 +3391,9 @@ static u32 Cmd_StopGame(struct BerryCrushGame *game, u8 *args) case 0: DrawDialogueFrame(0, 0); if (game->playAgainState == PLAY_AGAIN_NO_BERRIES) - AddTextPrinterParameterized2(0, 1, sMessages[MSG_NO_BERRIES], game->textSpeed, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[MSG_NO_BERRIES], game->textSpeed, 0, 2, 1, 3); else - AddTextPrinterParameterized2(0, 1, sMessages[MSG_DROPPED], game->textSpeed, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[MSG_DROPPED], game->textSpeed, 0, 2, 1, 3); CopyWindowToVram(0, 3); break; case 1: diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index dc025c0a49..9b0da5bd2e 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -303,21 +303,21 @@ static void BerryFix_GpuSet(void) FillWindowPixelBuffer(3, PIXEL_FILL(0)); FillWindowPixelBuffer(0, PIXEL_FILL(10)); - width = GetStringWidth(0, sText_Emerald, 0); + width = GetStringWidth(FONT_SMALL, sText_Emerald, 0); left = (120 - width) / 2; - AddTextPrinterParameterized3(2, 0, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_Emerald); + AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_Emerald); - width = GetStringWidth(0, sText_RubySapphire, 0); + width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0); left = (120 - width) / 2 + 120; - AddTextPrinterParameterized3(2, 0, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire); + AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire); - width = GetStringWidth(0, sText_RubySapphire, 0); + width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0); left = (112 - width) / 2; - AddTextPrinterParameterized3(3, 0, left, 0, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire); + AddTextPrinterParameterized3(3, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire); - width = GetStringWidth(1, sText_BerryProgramUpdate, 0); + width = GetStringWidth(FONT_NORMAL, sText_BerryProgramUpdate, 0); left = (208 - width) / 2; - AddTextPrinterParameterized3(0, 1, left, 2, sBerryProgramTextColors, TEXT_SPEED_FF, sText_BerryProgramUpdate); + AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SPEED_FF, sText_BerryProgramUpdate); CopyWindowToVram(2, 2); CopyWindowToVram(3, 2); @@ -346,7 +346,7 @@ static void BerryFix_SetScene(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); FillWindowPixelBuffer(1, PIXEL_FILL(10)); - AddTextPrinterParameterized3(1, 1, 0, 0, sBerryProgramTextColors, -1, sBerryProgramTexts[scene]); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, -1, sBerryProgramTexts[scene]); PutWindowTilemap(1); CopyWindowToVram(1, 2); switch (scene) diff --git a/src/berry_powder.c b/src/berry_powder.c index f77265412f..d933dbff13 100755 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -205,13 +205,13 @@ u32 GetBerryPowder(void) static void PrintBerryPowderAmount(u8 windowId, int amount, u8 x, u8 y, u8 speed) { ConvertIntToDecimalStringN(gStringVar1, amount, STR_CONV_MODE_RIGHT_ALIGN, 5); - AddTextPrinterParameterized(windowId, 1, gStringVar1, x, y, speed, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, y, speed, NULL); } static void DrawPlayerPowderAmount(u8 windowId, u16 baseTileOffset, u8 paletteNum, u32 amount) { DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, baseTileOffset, paletteNum); - AddTextPrinterParameterized(windowId, 1, gText_Powder, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Powder, 0, 1, TEXT_SPEED_FF, NULL); PrintBerryPowderAmount(windowId, amount, 26, 17, 0); } diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index babbbb3eb2..fac8c12c2a 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -376,14 +376,14 @@ static void HandleInitWindows(void) static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed, u8 colorStructId) { - AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sTextColors[colorStructId], speed, text); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, 0, sTextColors[colorStructId], speed, text); } static void AddBerryTagTextToBg0(void) { memcpy(GetBgTilemapBuffer(0), sBerryTag->tilemapBuffers[2], sizeof(sBerryTag->tilemapBuffers[2])); FillWindowPixelBuffer(WIN_BERRY_TAG, PIXEL_FILL(15)); - PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(1, gText_BerryTag, 0x40), 1, 0, 1); + PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryTag, 0x40), 1, 0, 1); PutWindowTilemap(WIN_BERRY_TAG); ScheduleBgCopyTilemapToVram(0); } @@ -409,7 +409,7 @@ static void PrintBerryNumberAndName(void) static void PrintBerrySize(void) { const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); - AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_SizeSlash, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_SizeSlash, 0, 1, TEXT_SPEED_FF, NULL); if (berry->size != 0) { u32 inches, fraction; @@ -423,34 +423,34 @@ static void PrintBerrySize(void) ConvertIntToDecimalStringN(gStringVar1, inches, STR_CONV_MODE_LEFT_ALIGN, 2); ConvertIntToDecimalStringN(gStringVar2, fraction, STR_CONV_MODE_LEFT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_Var1DotVar2); - AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gStringVar4, 0x28, 1, 0, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gStringVar4, 0x28, 1, 0, NULL); } else { - AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_ThreeMarks, 0x28, 1, 0, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_ThreeMarks, 0x28, 1, 0, NULL); } } static void PrintBerryFirmness(void) { const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); - AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_FirmSlash, 0, 0x11, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_FirmSlash, 0, 0x11, TEXT_SPEED_FF, NULL); if (berry->firmness != 0) - AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL); else - AddTextPrinterParameterized(WIN_SIZE_FIRM, 1, gText_ThreeMarks, 0x28, 0x11, 0, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_ThreeMarks, 0x28, 0x11, 0, NULL); } static void PrintBerryDescription1(void) { const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); - AddTextPrinterParameterized(WIN_DESC, 1, berry->description1, 0, 1, 0, NULL); + AddTextPrinterParameterized(WIN_DESC, FONT_NORMAL, berry->description1, 0, 1, 0, NULL); } static void PrintBerryDescription2(void) { const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); - AddTextPrinterParameterized(WIN_DESC, 1, berry->description2, 0, 0x11, 0, NULL); + AddTextPrinterParameterized(WIN_DESC, FONT_NORMAL, berry->description2, 0, 0x11, 0, NULL); } static void CreateBerrySprite(void) diff --git a/src/unk_text_util_2.c b/src/braille.c similarity index 94% rename from src/unk_text_util_2.c rename to src/braille.c index a0eea575e7..d43758f9e9 100644 --- a/src/unk_text_util_2.c +++ b/src/braille.c @@ -6,11 +6,11 @@ ALIGNED(4) static const u8 sScrollDistances[] = {1, 2, 4}; -static const u16 sFont6BrailleGlyphs[] = INCBIN_U16("graphics/fonts/font6.fwjpnfont"); +static const u16 sFont_Braille[] = INCBIN_U16("graphics/fonts/braille_glyphs.fwjpnfont"); -static void DecompressGlyphFont6(u16); +static void DecompressGlyph_Braille(u16); -u16 Font6Func(struct TextPrinter *textPrinter) +u16 FontFunc_Braille(struct TextPrinter *textPrinter) { u16 char_; struct TextPrinterSubStruct *subStruct; @@ -81,7 +81,7 @@ u16 Font6Func(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentChar++; return 2; case EXT_CTRL_CODE_FONT: - subStruct->glyphId = *textPrinter->printerTemplate.currentChar; + subStruct->fontId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; case EXT_CTRL_CODE_RESET_SIZE: @@ -133,7 +133,7 @@ u16 Font6Func(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentChar++; return 0; } - DecompressGlyphFont6(char_); + DecompressGlyph_Braille(char_); CopyGlyphToWindow(textPrinter); textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing; return 0; @@ -201,20 +201,18 @@ u16 Font6Func(struct TextPrinter *textPrinter) return 1; } -static void DecompressGlyphFont6(u16 glyph) +static void DecompressGlyph_Braille(u16 glyph) { - const u16 *glyphs; - - glyphs = sFont6BrailleGlyphs + 0x100 * (glyph / 8) + 0x10 * (glyph % 8); + const u16 *glyphs = sFont_Braille + 0x100 * (glyph / 8) + 0x10 * (glyph % 8); DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8); DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); DecompressGlyphTile(glyphs + 0x88, gCurGlyph.gfxBufferBottom + 8); - gCurGlyph.width = 0x10; - gCurGlyph.height = 0x10; + gCurGlyph.width = 16; + gCurGlyph.height = 16; } -u32 GetGlyphWidthFont6(u16 glyphId, bool32 isJapanese) +u32 GetGlyphWidth_Braille(u16 glyphId, bool32 isJapanese) { - return 0x10; + return 16; } diff --git a/src/cable_club.c b/src/cable_club.c index 3083ed9c0a..1284aee77f 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -99,8 +99,8 @@ static void PrintNumPlayersInLink(u16 windowId, u32 numPlayers) ConvertIntToDecimalStringN(gStringVar1, numPlayers, STR_CONV_MODE_LEFT_ALIGN, 1); SetStandardWindowBorderStyle(windowId, 0); StringExpandPlaceholders(gStringVar4, gText_NumPlayerLink); - xPos = GetStringCenterAlignXOffset(1, gStringVar4, 88); - AddTextPrinterParameterized(windowId, 1, gStringVar4, xPos, 1, 0xFF, NULL); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 88); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, 0xFF, NULL); CopyWindowToVram(windowId, 3); } diff --git a/src/clear_save_data_screen.c b/src/clear_save_data_screen.c index 0d69eb0fa9..3dd58389cb 100644 --- a/src/clear_save_data_screen.c +++ b/src/clear_save_data_screen.c @@ -80,7 +80,7 @@ void CB2_InitClearSaveDataScreen(void) static void Task_DoClearSaveDataScreenYesNo(u8 taskId) { DrawStdFrameWithCustomTileAndPalette(0, 0, 2, 14); - AddTextPrinterParameterized(0, 1, gText_ClearAllSaveData, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_ClearAllSaveData, 0, 1, 0, 0); CreateYesNoMenu(sClearSaveYesNo, 2, 14, 1); gTasks[taskId].func = Task_ClearSaveDataScreenYesNoChoice; } @@ -91,7 +91,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId) { case 0: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_ClearingData, 0, 1, 0, 0); gTasks[taskId].func = Task_ClearSaveData; break; case 1: diff --git a/src/coins.c b/src/coins.c index 52c7dd3ece..17fd147b74 100644 --- a/src/coins.c +++ b/src/coins.c @@ -17,8 +17,8 @@ void PrintCoinsString(u32 coinAmount) ConvertIntToDecimalStringN(gStringVar1, coinAmount, STR_CONV_MODE_RIGHT_ALIGN, MAX_COIN_DIGITS); StringExpandPlaceholders(gStringVar4, gText_Coins); - xAlign = GetStringRightAlignXOffset(1, gStringVar4, 0x40); - AddTextPrinterParameterized(sCoinsWindowId, 1, gStringVar4, xAlign, 1, 0, NULL); + xAlign = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x40); + AddTextPrinterParameterized(sCoinsWindowId, FONT_NORMAL, gStringVar4, xAlign, 1, 0, NULL); } void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y) diff --git a/src/contest.c b/src/contest.c index aebe437e69..ed476de5a3 100644 --- a/src/contest.c +++ b/src/contest.c @@ -1543,7 +1543,7 @@ static void Task_ShowMoveSelectScreen(u8 taskId) moveNameBuffer = StringCopy(moveNameBuffer, gMoveNames[move]); FillWindowPixelBuffer(i + MOVE_WINDOWS_START, PIXEL_FILL(0)); - Contest_PrintTextToBg0WindowAt(i + MOVE_WINDOWS_START, moveName, 5, 1, 7); + Contest_PrintTextToBg0WindowAt(i + MOVE_WINDOWS_START, moveName, 5, 1, FONT_NARROW); } DrawMoveSelectArrow(eContest.playerMoveChoice); @@ -3029,10 +3029,10 @@ static void PrintContestantTrainerNameWithColor(u8 contestant, u8 color) StringCopy(buffer, gText_Slash); StringAppend(buffer, gContestMons[contestant].trainerName); Contest_CopyStringWithColor(buffer, color); - offset = GetStringRightAlignXOffset(7, gDisplayedStringBattle, 0x60); + offset = GetStringRightAlignXOffset(FONT_NARROW, gDisplayedStringBattle, 0x60); if (offset > 55) offset = 55; - Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, offset, 1, 7); + Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, offset, 1, FONT_NARROW); } static void PrintContestantMonName(u8 contestant) @@ -3043,7 +3043,7 @@ static void PrintContestantMonName(u8 contestant) static void PrintContestantMonNameWithColor(u8 contestant, u8 color) { Contest_CopyStringWithColor(gContestMons[contestant].nickname, color); - Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, 5, 1, 7); + Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[contestant], gDisplayedStringBattle, 5, 1, FONT_NARROW); } static u16 CalculateContestantRound1Points(u8 who, u8 contestCategory) @@ -4273,7 +4273,7 @@ static void ContestDebugDoPrint(void) txtPtr = StringCopy(txtPtr, gText_OneDash); } ConvertIntToDecimalStringN(txtPtr, value, STR_CONV_MODE_LEFT_ALIGN, 4); - Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text, 55, 1, 7); + Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text, 55, 1, FONT_NARROW); } for (i = 0; i < CONTESTANT_COUNT; i++) { @@ -4285,7 +4285,7 @@ static void ContestDebugDoPrint(void) txtPtr = StringCopy(txtPtr, gText_OneDash); } ConvertIntToDecimalStringN(txtPtr, value, STR_CONV_MODE_LEFT_ALIGN, 4); - Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text, 5, 1, 7); + Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text, 5, 1, FONT_NARROW); } SwapMoveDescAndContestTilemaps(); break; @@ -5410,7 +5410,7 @@ static void Contest_PrintTextToBg0WindowStd(u32 windowId, const u8 *b) printerTemplate.currentChar = b; printerTemplate.windowId = windowId; - printerTemplate.fontId = 1; + printerTemplate.fontId = FONT_NORMAL; printerTemplate.x = 0; printerTemplate.y = 1; printerTemplate.currentX = 0; @@ -5457,7 +5457,7 @@ static void Contest_StartTextPrinter(const u8 *currChar, bool32 b) printerTemplate.currentChar = currChar; printerTemplate.windowId = 4; - printerTemplate.fontId = 1; + printerTemplate.fontId = FONT_NORMAL; printerTemplate.x = 0; printerTemplate.y = 1; printerTemplate.currentX = 0; @@ -5968,7 +5968,7 @@ static void ContestDebugPrintBitStrings(void) for (i = 0; i < CONTESTANT_COUNT; i++) { txtPtr = StringCopy(text1, gText_CDot); - Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1, 5, 1, 7); + Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1, 5, 1, FONT_NARROW); bits = gContestResources->tv[i].winnerFlags; for (j = 7; j > -1; j--) // Weird loop. { @@ -5981,7 +5981,7 @@ static void ContestDebugPrintBitStrings(void) text2[j] = EOS; Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text2, 5, 1, 7); - Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1 + j, 55, 1, 7); + Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1 + j, 55, 1, FONT_NARROW); } } else // CONTEST_DEBUG_MODE_PRINT_LOSER_FLAGS @@ -6001,8 +6001,8 @@ static void ContestDebugPrintBitStrings(void) text2[j] = text1[j]; text2[j] = EOS; - Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text2, 5, 1, 7); - Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1 + j, 55, 1, 7); + Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text2, 5, 1, FONT_NARROW); + Contest_PrintTextToBg0WindowAt(gContestantTurnOrder[i], text1 + j, 55, 1, FONT_NARROW); } } SwapMoveDescAndContestTilemaps(); diff --git a/src/contest_painting.c b/src/contest_painting.c index c591fc9efe..db6bf44557 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -306,8 +306,8 @@ static void PrintContestPaintingCaption(u8 contestType, bool8 isForArtist) StringExpandPlaceholders(gStringVar4, sMuseumCaptions[category]); } - x = GetStringCenterAlignXOffset(1, gStringVar4, 208); - AddTextPrinterParameterized(sWindowId, 1, gStringVar4, x, 1, 0, 0); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208); + AddTextPrinterParameterized(sWindowId, FONT_NORMAL, gStringVar4, x, 1, 0, 0); CopyBgTilemapBufferToVram(1); } diff --git a/src/contest_util.c b/src/contest_util.c index d3e1a600e8..e1c95d4a2f 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -1176,12 +1176,12 @@ static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId) windowId = AddWindow(&windowTemplate); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - origWidth = GetStringWidth(1, text, 0); + origWidth = GetStringWidth(FONT_NORMAL, text, 0); strWidth = (origWidth + 9) / 8; if (strWidth > 30) strWidth = 30; - AddTextPrinterParameterized3(windowId, 1, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, -1, text); + AddTextPrinterParameterized3(windowId, FONT_NORMAL, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, -1, text); { s32 i; struct Sprite *sprite; @@ -1931,7 +1931,7 @@ static void AddContestTextPrinter(int windowId, u8 *str, int x) struct TextPrinterTemplate textPrinter; textPrinter.currentChar = str; textPrinter.windowId = windowId; - textPrinter.fontId = 7; + textPrinter.fontId = FONT_NARROW; textPrinter.x = x; textPrinter.y = 2; textPrinter.currentX = x; diff --git a/src/credits.c b/src/credits.c index 519cfe39e3..de7597e321 100644 --- a/src/credits.c +++ b/src/credits.c @@ -400,8 +400,8 @@ static void PrintCreditsText(const u8 *string, u8 y, bool8 isTitle) color[2] = TEXT_COLOR_DARK_GRAY; } - x = GetStringCenterAlignXOffsetWithLetterSpacing(1, string, DISPLAY_WIDTH, 1); - AddTextPrinterParameterized4(0, 1, x, y, 1, 0, color, -1, string); + x = GetStringCenterAlignXOffsetWithLetterSpacing(FONT_NORMAL, string, DISPLAY_WIDTH, 1); + AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 1, 0, color, -1, string); } #define tMainTaskId data[1] diff --git a/src/daycare.c b/src/daycare.c index 8105c2e9ce..eb17147b5d 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -77,7 +77,7 @@ static const struct ListMenuTemplate sDaycareListMenuLevelTemplate = .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 0 }; @@ -1186,7 +1186,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y) printer.currentChar = text; printer.windowId = windowId; - printer.fontId = 1; + printer.fontId = FONT_NORMAL; printer.x = x; printer.y = y; printer.currentX = x; @@ -1222,7 +1222,7 @@ static void DaycarePrintMonLvl(struct DayCare *daycare, u8 windowId, u32 daycare level = GetLevelAfterDaycareSteps(&daycare->mons[daycareSlotId].mon, daycare->mons[daycareSlotId].steps); ConvertIntToDecimalStringN(intText, level, STR_CONV_MODE_LEFT_ALIGN, 3); StringAppend(lvlText, intText); - x = GetStringRightAlignXOffset(1, lvlText, 112); + x = GetStringRightAlignXOffset(FONT_NORMAL, lvlText, 112); DaycareAddTextPrinter(windowId, lvlText, x, y); } diff --git a/src/decoration.c b/src/decoration.c index 838b5cb66a..52d1054c9b 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -315,7 +315,7 @@ static const struct ListMenuTemplate sDecorationItemsListMenuTemplate = .lettersSpacing = FALSE, .itemVerticalPadding = 0, .scrollMultiple = FALSE, - .fontId = 7 + .fontId = FONT_NARROW }; #include "data/decoration/icon.h" @@ -615,7 +615,7 @@ static void HandleDecorationActionsMenuInput(u8 taskId) static void PrintCurMainMenuDescription(void) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sSecretBasePCMenuItemDescriptions[sDecorationActionsCursorPos], 0, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sSecretBasePCMenuItemDescriptions[sDecorationActionsCursorPos], 0, 0, 2, 1, 3); } static void DecorationMenuAction_Decorate(u8 taskId) @@ -728,7 +728,7 @@ static void PrintDecorationCategoryMenuItems(u8 taskId) PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, FALSE, TEXT_SPEED_FF); } - AddTextPrinterParameterized(windowId, 1, gTasks[taskId].tDecorationMenuCommand == DECOR_MENU_TRADE ? gText_Exit : gText_Cancel, 8, i * 16 + 1, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gTasks[taskId].tDecorationMenuCommand == DECOR_MENU_TRADE ? gText_Exit : gText_Cancel, 8, i * 16 + 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); } @@ -742,12 +742,12 @@ static void PrintDecorationCategoryMenuItem(u8 winid, u8 category, u8 x, u8 y, b ColorMenuItemString(gStringVar4, disabled); str = StringLength(gStringVar4) + gStringVar4; StringCopy(str, sDecorationCategoryNames[category]); - AddTextPrinterParameterized(winid, 1, gStringVar4, x, y, speed, NULL); + AddTextPrinterParameterized(winid, FONT_NORMAL, gStringVar4, x, y, speed, NULL); str = ConvertIntToDecimalStringN(str, GetNumOwnedDecorationsInCategory(category), STR_CONV_MODE_RIGHT_ALIGN, 2); *(str++) = CHAR_SLASH; ConvertIntToDecimalStringN(str, gDecorationInventories[category].size, STR_CONV_MODE_RIGHT_ALIGN, 2); - x = GetStringRightAlignXOffset(1, gStringVar4, width); - AddTextPrinterParameterized(winid, 1, gStringVar4, x, y, speed, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, width); + AddTextPrinterParameterized(winid, FONT_NORMAL, gStringVar4, x, y, speed, NULL); } static void ColorMenuItemString(u8 *str, bool8 disabled) @@ -1024,7 +1024,7 @@ static void PrintDecorationItemDescription(s32 itemIndex) else str = gDecorations[gCurDecorationItems[itemIndex]].description; - AddTextPrinterParameterized(windowId, 1, str, 0, 1, 0, 0); + AddTextPrinterParameterized(windowId, FONT_NORMAL, str, 0, 1, 0, 0); } static void RemoveDecorationItemsOtherWindows(void) diff --git a/src/diploma.c b/src/diploma.c index dca0912e36..8c31c9962e 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -205,5 +205,5 @@ static void PrintDiplomaText(u8 *text, u8 var1, u8 var2) { u8 color[3] = {0, 2, 3}; - AddTextPrinterParameterized4(0, 1, var1, var2, 0, 0, color, -1, text); + AddTextPrinterParameterized4(0, FONT_NORMAL, var1, var2, 0, 0, color, -1, text); } diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index d7361ce967..838e8ed945 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -2954,10 +2954,10 @@ static void Task_ShowDodrioBerryPickingRecords(u8 taskId) { case 0: window = sWindowTemplates_Records; - width = GetStringWidth(1, gText_BerryPickingRecords, 0); + width = GetStringWidth(FONT_NORMAL, gText_BerryPickingRecords, 0); for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++) { - widthCurr = GetStringWidth(1, sRecordsTexts[i], 0) + 50; + widthCurr = GetStringWidth(FONT_NORMAL, sRecordsTexts[i], 0) + 50; if (widthCurr > width) width = widthCurr; } @@ -3008,14 +3008,14 @@ static void PrintRecordsText(u8 windowId, s32 width) LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0); DrawTextBorderOuter(windowId, 0x21D, 0xD); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(windowId, 1, gText_BerryPickingRecords, GetStringCenterAlignXOffset(1, gText_BerryPickingRecords, width * 8), 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BerryPickingRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryPickingRecords, width * 8), 1, TEXT_SPEED_FF, NULL); for (i = 0; i < NUM_RECORD_TYPES; i++) { ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, sRecordNumMaxDigits[i]); - numWidth = GetStringWidth(1, gStringVar1, -1); - AddTextPrinterParameterized(windowId, 1, sRecordsTexts[i], 0, sRecordTextYCoords[i][0], TEXT_SPEED_FF, NULL); + numWidth = GetStringWidth(FONT_NORMAL, gStringVar1, -1); + AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, sRecordTextYCoords[i][0], TEXT_SPEED_FF, NULL); x = (width * 8) - numWidth; - AddTextPrinterParameterized(windowId, 1, gStringVar1, x, sRecordNumYCoords[i][0], TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, sRecordNumYCoords[i][0], TEXT_SPEED_FF, NULL); } PutWindowTilemap(windowId); } @@ -4640,7 +4640,7 @@ static void ShowNames(void) { colorsId = COLORID_GRAY; playerId = GetPlayerIdByPos(i); - left = (56 - GetStringWidth(1, GetPlayerName(playerId), -1)) / 2u; + left = (56 - GetStringWidth(FONT_NORMAL, GetPlayerName(playerId), -1)) / 2u; window.tilemapLeft = coords->left; window.tilemapTop = coords->top; sGfx->windowIds[i] = AddWindow(&window); @@ -4649,7 +4649,7 @@ static void ShowNames(void) if (playerId == GetMultiplayerId()) colorsId = COLORID_BLUE; name = GetPlayerName(playerId); - AddTextPrinterParameterized3(sGfx->windowIds[i], 1, left, 1, sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(sGfx->windowIds[i], FONT_NORMAL, left, 1, sTextColorTable[colorsId], -1, name); CopyWindowToVram(sGfx->windowIds[i], 2); window.baseBlock += 0xE; DrawMessageWindow(&window); @@ -4726,22 +4726,22 @@ static void PrintRankedScores(u8 numPlayers_) } // Print text - x = 216 - GetStringWidth(1, gText_SpacePoints, 0); + x = 216 - GetStringWidth(FONT_NORMAL, gText_SpacePoints, 0); for (i = 0; i < numPlayers; i++) { u8 colorsId = COLORID_GRAY; u8 playerId = playersByRanking[i]; u32 points = scoreResults[playerId].score; - AddTextPrinterParameterized(sGfx->windowIds[1], 1, sRankingTexts[scoreResults[playerId].ranking], 8, sRankingYCoords[i], -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, sRankingTexts[scoreResults[playerId].ranking], 8, sRankingYCoords[i], -1, NULL); if (playerId == GetMultiplayerId()) colorsId = COLORID_BLUE; name = GetPlayerName(playerId); - AddTextPrinterParameterized3(sGfx->windowIds[1], 1, 28, sRankingYCoords[i], sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 28, sRankingYCoords[i], sTextColorTable[colorsId], -1, name); ConvertIntToDecimalStringN(numString, points, STR_CONV_MODE_LEFT_ALIGN, 7); - numWidth = GetStringWidth(1, numString, -1); - AddTextPrinterParameterized(sGfx->windowIds[1], 1, numString, x - numWidth, sRankingYCoords[i], -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[1], 1, gText_SpacePoints, x, sRankingYCoords[i], -1, NULL); + numWidth = GetStringWidth(FONT_NORMAL, numString, -1); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, numString, x - numWidth, sRankingYCoords[i], -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_SpacePoints, x, sRankingYCoords[i], -1, NULL); } } @@ -4770,10 +4770,10 @@ static void ShowResults(void) case 2: FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1)); - strWidth = GetStringWidth(1, gText_BerryPickingResults, -1); + strWidth = GetStringWidth(FONT_NORMAL, gText_BerryPickingResults, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_BerryPickingResults, x, 1, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[1], 1, gText_10P30P50P50P, 68, 17, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_BerryPickingResults, x, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_10P30P50P50P, 68, 17, -1, NULL); for (i = 0; i < numPlayers; i++) { u8 colorsId = COLORID_GRAY; @@ -4781,7 +4781,7 @@ static void ShowResults(void) colorsId = COLORID_BLUE; name = GetPlayerName(i); - AddTextPrinterParameterized3(sGfx->windowIds[1], 1, 0, sResultsYCoords[i], sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 0, sResultsYCoords[i], sTextColorTable[colorsId], -1, name); for (j = 0; j < 4; j++) { u32 width; @@ -4789,13 +4789,13 @@ static void ShowResults(void) u16 maxBerriesPicked = Min(GetHighestBerryResult(j), MAX_BERRIES); ConvertIntToDecimalStringN(gStringVar4, berriesPicked, STR_CONV_MODE_LEFT_ALIGN, 4); - width = GetStringWidth(1, gStringVar4, -1); + width = GetStringWidth(FONT_NORMAL, gStringVar4, -1); // If player got the most of a berry type, highlight their number in red if (maxBerriesPicked == berriesPicked && maxBerriesPicked != 0) - AddTextPrinterParameterized3(sGfx->windowIds[1], 1, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], -1, gStringVar4); + AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], -1, gStringVar4); else - AddTextPrinterParameterized(sGfx->windowIds[1], 1, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], -1, NULL); } } CopyWindowToVram(sGfx->windowIds[0], 2); @@ -4824,9 +4824,9 @@ static void ShowResults(void) case 5: FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1)); - strWidth = GetStringWidth(1, gText_AnnouncingRankings, -1); + strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingRankings, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_AnnouncingRankings, x, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingRankings, x, 1, -1, NULL); sGfx->state++; break; case 6: @@ -4870,14 +4870,14 @@ static void ShowResults(void) PlayNewMapMusic(MUS_LEVEL_UP); FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1)); - strWidth = GetStringWidth(1, gText_AnnouncingPrizes, -1); + strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingPrizes, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_AnnouncingPrizes, x, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingPrizes, x, 1, -1, NULL); DynamicPlaceholderTextUtil_Reset(); CopyItemName(GetPrizeItemId(), gStringVar1); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FirstPlacePrize); - AddTextPrinterParameterized(sGfx->windowIds[1], 1, gStringVar4, 0, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 1, -1, NULL); prizeState = TryGivePrize(); if (prizeState != PRIZE_RECEIVED && prizeState != NO_PRIZE) { @@ -4888,7 +4888,7 @@ static void ShowResults(void) DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_CantHoldAnyMore); else if (prizeState == PRIZE_FILLED_BAG) DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FilledStorageSpace); - AddTextPrinterParameterized(sGfx->windowIds[1], 1, gStringVar4, 0, 41, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 41, -1, NULL); } CopyWindowToVram(sGfx->windowIds[0], 2); CopyWindowToVram(sGfx->windowIds[1], 2); @@ -4946,10 +4946,10 @@ static void Msg_WantToPlayAgain(void) // Print text FillWindowPixelBuffer(sGfx->windowIds[WIN_PLAY_AGAIN], PIXEL_FILL(1)); FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1)); - AddTextPrinterParameterized(sGfx->windowIds[WIN_PLAY_AGAIN], 1, gText_WantToPlayAgain, 0, 5, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_Yes, 8, 1, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_No, 8, 17, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_SelectorArrow2, 0, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_PLAY_AGAIN], FONT_NORMAL, gText_WantToPlayAgain, 0, 5, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, 1, -1, NULL); CopyWindowToVram(sGfx->windowIds[WIN_PLAY_AGAIN], 2); CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], 2); sGfx->state++; @@ -4970,9 +4970,9 @@ static void Msg_WantToPlayAgain(void) if (y == PLAY_AGAIN_NONE) y = PLAY_AGAIN_YES; FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1)); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_Yes, 8, 1, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_No, 8, 17, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], 1, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL); CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], 3); // Increment state only if A or B button have been pressed. @@ -5025,7 +5025,7 @@ static void Msg_SavingDontTurnOff(void) { case 0: DrawDialogueFrame(0, FALSE); - AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3); sGfx->state++; break; case 1: @@ -5063,7 +5063,7 @@ static void Msg_CommunicationStandby(void) break; case 1: FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); - AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_CommunicationStandby3, 0, 5, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_CommunicationStandby3, 0, 5, -1, NULL); CopyWindowToVram(sGfx->windowIds[0], 2); sGfx->state++; break; @@ -5103,7 +5103,7 @@ static void Msg_SomeoneDroppedOut(void) break; case 1: FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); - AddTextPrinterParameterized(sGfx->windowIds[0], 1, gText_SomeoneDroppedOut, 0, 5, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_SomeoneDroppedOut, 0, 5, -1, NULL); CopyWindowToVram(sGfx->windowIds[0], 2); sGfx->state++; break; diff --git a/src/easy_chat.c b/src/easy_chat.c index b18d09b833..ff4049cd7d 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -3176,7 +3176,7 @@ static bool8 UpdateMainCursor(void) else { CopyEasyChatWord(str, *ecWord); - stringWidth = GetStringWidth(1, str, 0); + stringWidth = GetStringWidth(FONT_NORMAL, str, 0); } trueStringWidth = stringWidth + 17; @@ -3930,9 +3930,9 @@ static void PrintTitle(void) if (!titleText) return; - xOffset = GetStringCenterAlignXOffset(1, titleText, 144); + xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 144); FillWindowPixelBuffer(0, PIXEL_FILL(0)); - PrintEasyChatTextWithColors(0, 1, titleText, xOffset, 1, TEXT_SPEED_FF, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); + PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SPEED_FF, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); PutWindowTilemap(0); CopyWindowToVram(0, 3); } @@ -4003,10 +4003,10 @@ static void PrintEasyChatStdMessage(u8 msgId) FillWindowPixelBuffer(1, PIXEL_FILL(1)); if (text1) - PrintEasyChatText(1, 1, text1, 0, 1, TEXT_SPEED_FF, 0); + PrintEasyChatText(1, FONT_NORMAL, text1, 0, 1, TEXT_SPEED_FF, 0); if (text2) - PrintEasyChatText(1, 1, text2, 0, 17, TEXT_SPEED_FF, 0); + PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SPEED_FF, 0); CopyWindowToVram(1, 3); } @@ -4099,7 +4099,7 @@ static void PrintCurrentPhrase(void) } *str = EOS; - PrintEasyChatText(sScreenControl->windowId, 1, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SPEED_FF, 0); + PrintEasyChatText(sScreenControl->windowId, FONT_NORMAL, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SPEED_FF, 0); } CopyWindowToVram(sScreenControl->windowId, 3); @@ -4245,7 +4245,7 @@ static void PrintKeyboardGroupNames(void) return; } - PrintEasyChatText(2, 1, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SPEED_FF, NULL); + PrintEasyChatText(2, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SPEED_FF, NULL); } y += 16; @@ -4257,7 +4257,7 @@ static void PrintKeyboardAlphabet(void) u32 i; for (i = 0; i < ARRAY_COUNT(sEasyChatKeyboardAlphabet); i++) - PrintEasyChatText(2, 1, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SPEED_FF, NULL); + PrintEasyChatText(2, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SPEED_FF, NULL); } static void PrintInitialWordSelectText(void) @@ -4328,9 +4328,9 @@ static void PrintWordSelectText(u8 scrollOffset, u8 numRows) { CopyEasyChatWordPadded(sScreenControl->wordSelectPrintBuffer, easyChatWord, 0); if (!DummyWordCheck(easyChatWord)) - PrintEasyChatText(2, 1, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, NULL); + PrintEasyChatText(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, NULL); else // Never reached - PrintEasyChatTextWithColors(2, 1, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY); + PrintEasyChatTextWithColors(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY); } } @@ -5082,7 +5082,7 @@ static void AddMainScreenButtonWindow(void) if (str) { int x = sFooterOptionXOffsets[footerIndex][i]; - PrintEasyChatText(windowId, 1, str, x, 1, 0, NULL); + PrintEasyChatText(windowId, FONT_NORMAL, str, x, 1, 0, NULL); } } diff --git a/src/egg_hatch.c b/src/egg_hatch.c index e491b7b144..25a61fcf67 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -866,7 +866,7 @@ static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) sEggHatchData->textColor[0] = 0; sEggHatchData->textColor[1] = 5; sEggHatchData->textColor[2] = 6; - AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sEggHatchData->textColor, speed, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, 0, sEggHatchData->textColor, speed, string); } u8 GetEggCyclesToSubtract(void) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 6ce304c2c0..dd6ce8d93f 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1807,7 +1807,7 @@ static bool8 Fishing_ShowDots(struct Task *task) } else { - AddTextPrinterParameterized(0, 1, dot, task->tNumDots * 8, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, dot, task->tNumDots * 8, 1, 0, NULL); task->tNumDots++; } } @@ -1856,7 +1856,7 @@ static bool8 Fishing_CheckForBite(struct Task *task) static bool8 Fishing_GotBite(struct Task *task) { AlignFishingAnimationFrames(); - AddTextPrinterParameterized(0, 1, gText_OhABite, 0, 17, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_OhABite, 0, 17, 0, NULL); task->tStep++; task->tFrameCounter = 0; return FALSE; @@ -1911,7 +1911,7 @@ static bool8 Fishing_MonOnHook(struct Task *task) { AlignFishingAnimationFrames(); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_PokemonOnHook, 1, 0, 2, 1, 3); task->tStep++; task->tFrameCounter = 0; return FALSE; @@ -1958,7 +1958,7 @@ static bool8 Fishing_NotEvenNibble(struct Task *task) AlignFishingAnimationFrames(); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection())); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_NotEvenANibble, 1, 0, 2, 1, 3); task->tStep = FISHING_SHOW_RESULT; return TRUE; } @@ -1968,7 +1968,7 @@ static bool8 Fishing_GotAway(struct Task *task) AlignFishingAnimationFrames(); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection())); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_ItGotAway, 1, 0, 2, 1, 3); task->tStep++; return TRUE; } diff --git a/src/field_region_map.c b/src/field_region_map.c index 99def49016..9dcc65c9a4 100644 --- a/src/field_region_map.c +++ b/src/field_region_map.c @@ -151,8 +151,8 @@ static void FieldUpdateRegionMap(void) break; case 1: DrawStdFrameWithCustomTileAndPalette(1, 0, 0x27, 0xd); - offset = GetStringCenterAlignXOffset(1, gText_Hoenn, 0x38); - AddTextPrinterParameterized(1, 1, gText_Hoenn, offset, 1, 0, NULL); + offset = GetStringCenterAlignXOffset(FONT_NORMAL, gText_Hoenn, 0x38); + AddTextPrinterParameterized(1, FONT_NORMAL, gText_Hoenn, offset, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); DrawStdFrameWithCustomTileAndPalette(0, 0, 0x27, 0xd); PrintRegionMapSecName(); @@ -207,7 +207,7 @@ static void PrintRegionMapSecName(void) if (sFieldRegionMapHandler->regionMap.mapSecType != MAPSECTYPE_NONE) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); } else diff --git a/src/field_specials.c b/src/field_specials.c index 22fd6872b5..c859401622 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1910,11 +1910,11 @@ void ShowDeptStoreElevatorFloorSelect(void) sTutorMoveAndElevatorWindowId = AddWindow(&gElevatorFloor_WindowTemplate); SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0); - xPos = GetStringCenterAlignXOffset(1, gText_ElevatorNowOn, 64); - AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_ElevatorNowOn, 64); + AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL); - xPos = GetStringCenterAlignXOffset(1, gDeptStoreFloorNames[gSpecialVar_0x8005], 64); - AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], 64); + AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL); PutWindowTilemap(sTutorMoveAndElevatorWindowId); CopyWindowToVram(sTutorMoveAndElevatorWindowId, 3); @@ -2653,7 +2653,7 @@ static void InitScrollableMultichoice(void) gScrollableMultichoice_ListMenuTemplate.lettersSpacing = 0; gScrollableMultichoice_ListMenuTemplate.itemVerticalPadding = 0; gScrollableMultichoice_ListMenuTemplate.scrollMultiple = 0; - gScrollableMultichoice_ListMenuTemplate.fontId = 1; + gScrollableMultichoice_ListMenuTemplate.fontId = FONT_NORMAL; gScrollableMultichoice_ListMenuTemplate.cursorKind = 0; } @@ -2957,8 +2957,8 @@ void UpdateBattlePointsWindow(void) u8 string[32]; u32 x; StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.battlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP); - x = GetStringRightAlignXOffset(1, string, 48); - AddTextPrinterParameterized(sBattlePointsWindowId, 1, string, x, 1, 0, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, string, 48); + AddTextPrinterParameterized(sBattlePointsWindowId, FONT_NORMAL, string, x, 1, 0, NULL); } void ShowBattlePointsWindow(void) @@ -3047,7 +3047,7 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) switch (menu) { case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1: - AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3); if (sFrontierExchangeCorner_Decor1[selection] == 0xFFFF) { ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor1[selection]); @@ -3060,7 +3060,7 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) } break; case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: - AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3); if (sFrontierExchangeCorner_Decor2[selection] == 0xFFFF) { ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor2[selection]); @@ -3073,11 +3073,11 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) } break; case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: - AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3); ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Vitamins[selection]); break; case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR: - AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3); ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_HoldItems[selection]); break; } @@ -3216,11 +3216,11 @@ static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection) FillWindowPixelRect(sTutorMoveAndElevatorWindowId, PIXEL_FILL(1), 0, 0, 96, 48); if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_2) { - AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, sBattleFrontier_TutorMoveDescriptions2[selection], 0, 1, 0, NULL); + AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, sBattleFrontier_TutorMoveDescriptions2[selection], 0, 1, 0, NULL); } else { - AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, 1, sBattleFrontier_TutorMoveDescriptions1[selection], 0, 1, 0, NULL); + AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, sBattleFrontier_TutorMoveDescriptions1[selection], 0, 1, 0, NULL); } } } @@ -3244,9 +3244,9 @@ void ScrollableMultichoice_RedrawPersistentMenu(void) SetStandardWindowBorderStyle(task->tWindowId, 0); for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++) - AddTextPrinterParameterized5(task->tWindowId, 1, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0); + AddTextPrinterParameterized5(task->tWindowId, FONT_NORMAL, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0); - AddTextPrinterParameterized(task->tWindowId, 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(task->tWindowId, FONT_NORMAL, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL); PutWindowTilemap(task->tWindowId); CopyWindowToVram(task->tWindowId, 3); } diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 53bd68eac2..699e19c7aa 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -1150,16 +1150,16 @@ static void ShowAndPrintWindows(void) FillWindowPixelBuffer(i, PIXEL_FILL(0)); } - x = GetStringCenterAlignXOffset(1, gText_SymbolsEarned, 96); - AddTextPrinterParameterized3(WINDOW_EARNED_SYMBOLS, 1, x, 5, sTextColors[0], 0, gText_SymbolsEarned); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gText_SymbolsEarned, 96); + AddTextPrinterParameterized3(WINDOW_EARNED_SYMBOLS, FONT_NORMAL, x, 5, sTextColors[0], 0, gText_SymbolsEarned); - x = GetStringCenterAlignXOffset(1, gText_BattleRecord, 96); - AddTextPrinterParameterized3(WINDOW_BATTLE_RECORD, 1, x, 5, sTextColors[0], 0, gText_BattleRecord); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gText_BattleRecord, 96); + AddTextPrinterParameterized3(WINDOW_BATTLE_RECORD, FONT_NORMAL, x, 5, sTextColors[0], 0, gText_BattleRecord); - AddTextPrinterParameterized3(WINDOW_BATTLE_POINTS, 8, 5, 4, sTextColors[0], 0, gText_BattlePoints); + AddTextPrinterParameterized3(WINDOW_BATTLE_POINTS, FONT_SMALL_NARROW, 5, 4, sTextColors[0], 0, gText_BattlePoints); ConvertIntToDecimalStringN(gStringVar4, sPassData->battlePoints, STR_CONV_MODE_LEFT_ALIGN, 5); - x = GetStringRightAlignXOffset(8, gStringVar4, 91); - AddTextPrinterParameterized3(WINDOW_BATTLE_POINTS, 8, x, 16, sTextColors[0], 0, gStringVar4); + x = GetStringRightAlignXOffset(FONT_SMALL_NARROW, gStringVar4, 91); + AddTextPrinterParameterized3(WINDOW_BATTLE_POINTS, FONT_SMALL_NARROW, x, 16, sTextColors[0], 0, gStringVar4); sPassData->cursorArea = GetCursorAreaFromCoords(sPassData->cursorX - 5, sPassData->cursorY + 5); sPassData->previousCursorArea = CURSOR_AREA_NOTHING; @@ -1176,9 +1176,9 @@ static void PrintAreaDescription(u8 cursorArea) FillWindowPixelBuffer(WINDOW_DESCRIPTION, PIXEL_FILL(0)); if (cursorArea == CURSOR_AREA_RECORD && !sPassData->hasBattleRecord) - AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[CURSOR_AREA_NOTHING]); + AddTextPrinterParameterized3(WINDOW_DESCRIPTION, FONT_NORMAL, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[CURSOR_AREA_NOTHING]); else if (cursorArea != CURSOR_AREA_NOTHING) - AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[cursorArea]); + AddTextPrinterParameterized3(WINDOW_DESCRIPTION, FONT_NORMAL, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[cursorArea]); CopyWindowToVram(WINDOW_DESCRIPTION, 3); CopyBgTilemapBufferToVram(0); @@ -1715,12 +1715,12 @@ static void PrintOnFrontierMap(void) for (i = 0; i < NUM_FRONTIER_FACILITIES; i++) { if (i == sMapData->cursorPos) - AddTextPrinterParameterized3(MAP_WINDOW_NAME, 7, 4, (i * 16) + 1, sTextColors[2], 0, sMapLandmarks[i].name); + AddTextPrinterParameterized3(MAP_WINDOW_NAME, FONT_NARROW, 4, (i * 16) + 1, sTextColors[2], 0, sMapLandmarks[i].name); else - AddTextPrinterParameterized3(MAP_WINDOW_NAME, 7, 4, (i * 16) + 1, sTextColors[1], 0, sMapLandmarks[i].name); + AddTextPrinterParameterized3(MAP_WINDOW_NAME, FONT_NARROW, 4, (i * 16) + 1, sTextColors[1], 0, sMapLandmarks[i].name); } - AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description); + AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, FONT_NORMAL, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description); for (i = 0; i < MAP_WINDOW_COUNT; i++) CopyWindowToVram(i, 3); @@ -1743,8 +1743,8 @@ static void HandleFrontierMapCursorMove(u8 direction) sMapData->cursorPos = (oldCursorPos + 1) % NUM_FRONTIER_FACILITIES; } - AddTextPrinterParameterized3(MAP_WINDOW_NAME, 7, 4, (oldCursorPos * 16) + 1, sTextColors[1], 0, sMapLandmarks[oldCursorPos].name); - AddTextPrinterParameterized3(MAP_WINDOW_NAME, 7, 4, (sMapData->cursorPos * 16) + 1, sTextColors[2], 0, sMapLandmarks[sMapData->cursorPos].name); + AddTextPrinterParameterized3(MAP_WINDOW_NAME, FONT_NARROW, 4, (oldCursorPos * 16) + 1, sTextColors[1], 0, sMapLandmarks[oldCursorPos].name); + AddTextPrinterParameterized3(MAP_WINDOW_NAME, FONT_NARROW, 4, (sMapData->cursorPos * 16) + 1, sTextColors[2], 0, sMapLandmarks[sMapData->cursorPos].name); sMapData->cursorSprite->y = (sMapData->cursorPos * 16) + 8; @@ -1752,7 +1752,7 @@ static void HandleFrontierMapCursorMove(u8 direction) sMapData->mapIndicatorSprite->x = sMapLandmarks[sMapData->cursorPos].x; sMapData->mapIndicatorSprite->y = sMapLandmarks[sMapData->cursorPos].y; FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, PIXEL_FILL(0)); - AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description); + AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, FONT_NORMAL, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description); for (i = 0; i < MAP_WINDOW_COUNT; i++) CopyWindowToVram(i, 3); diff --git a/src/frontier_util.c b/src/frontier_util.c index ec3eba43a4..25153b05c7 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -958,9 +958,9 @@ static bool8 IsWinStreakActive(u32 challenge) static void PrintAligned(const u8 *str, s32 y) { - s32 x = GetStringCenterAlignXOffset(1, str, 224); + s32 x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 224); y = (y * 8) + 1; - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, y, TEXT_SPEED_FF, NULL); } static void PrintHyphens(s32 y) @@ -973,18 +973,18 @@ static void PrintHyphens(s32 y) text[i] = EOS; y = (y * 8) + 1; - AddTextPrinterParameterized(gRecordsWindowId, 1, text, 4, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, 4, y, TEXT_SPEED_FF, NULL); } // Battle Tower records. static void TowerPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); if (num > MAX_STREAK) num = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_WinStreak); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); } static void TowerPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1056,8 +1056,8 @@ static void ShowTowerResultsWindow(u8 battleMode) StringExpandPlaceholders(gStringVar4, gText_LinkMultiBattleRoomResults); PrintAligned(gStringVar4, 2); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); PrintHyphens(10); TowerPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 132, 49); TowerPrintRecordStreak(battleMode, FRONTIER_LVL_50, 72, 132, 65); @@ -1079,10 +1079,10 @@ static u16 DomeGetWinStreak(u8 battleMode, u8 lvlMode) static void PrintTwoStrings(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, 1, str1, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SPEED_FF, NULL); ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, str2); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); } static void DomePrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1123,8 +1123,8 @@ static void ShowDomeResultsWindow(u8 battleMode) StringExpandPlaceholders(gStringVar4, gText_DoubleBattleTourneyResults); PrintAligned(gStringVar4, 0); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); PrintHyphens(10); DomePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 64, 121, 33); PrintTwoStrings(gText_Record, gText_ClearStreak, gSaveBlock2Ptr->frontier.domeRecordWinStreaks[battleMode][FRONTIER_LVL_50], 64, 121, 49); @@ -1139,12 +1139,12 @@ static void ShowDomeResultsWindow(u8 battleMode) // Battle Palace records. static void PalacePrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); if (num > MAX_STREAK) num = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_WinStreak); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); } static void PalacePrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1199,8 +1199,8 @@ static void ShowPalaceResultsWindow(u8 battleMode) StringExpandPlaceholders(gStringVar4, gText_DoubleBattleHallResults); PrintAligned(gStringVar4, 2); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); PrintHyphens(10); PalacePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 131, 49); PalacePrintRecordStreak(battleMode, FRONTIER_LVL_50, 72, 131, 65); @@ -1222,10 +1222,10 @@ static u16 PikeGetWinStreak(u8 lvlMode) static void PikePrintCleared(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, 1, str1, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SPEED_FF, NULL); ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, str2); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); } static void PikePrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1251,8 +1251,8 @@ static void ShowPikeResultsWindow(void) FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults); PrintAligned(gStringVar4, 0); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); PrintHyphens(10); PikePrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 114, 33); PikePrintCleared(gText_Record, gText_RoomsCleared, gSaveBlock2Ptr->frontier.pikeRecordStreaks[FRONTIER_LVL_50], 64, 114, 49); @@ -1267,12 +1267,12 @@ static void ShowPikeResultsWindow(void) // Battle Arena records. static void ArenaPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); if (num > MAX_STREAK) num = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_KOsInARow); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); } static void ArenaPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1314,8 +1314,8 @@ static void ShowArenaResultsWindow(void) PrintHyphens(10); StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults); PrintAligned(gStringVar4, 2); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 72, 126, 49); ArenaPrintRecordStreak(FRONTIER_LVL_50, 72, 126, 65); ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_OPEN, 72, 126, 97); @@ -1327,16 +1327,16 @@ static void ShowArenaResultsWindow(void) // Battle Factory records. static void FactoryPrintStreak(const u8 *str, u16 num1, u16 num2, u8 x1, u8 x2, u8 x3, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); if (num1 > MAX_STREAK) num1 = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num1, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_WinStreak); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); ConvertIntToDecimalStringN(gStringVar1, num2, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_TimesVar1); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x3, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x3, y, TEXT_SPEED_FF, NULL); } static void FactoryPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 x3, u8 y) @@ -1403,9 +1403,9 @@ static void ShowFactoryResultsWindow(u8 battleMode) StringExpandPlaceholders(gStringVar4, gText_BattleSwapDoubleResults); PrintAligned(gStringVar4, 0); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_RentalSwap, 152, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_RentalSwap, 152, 33, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); PrintHyphens(10); FactoryPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 49); FactoryPrintRecordStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 65); @@ -1418,12 +1418,12 @@ static void ShowFactoryResultsWindow(u8 battleMode) // Battle Pyramid records. static void PyramidPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); if (num > MAX_STREAK) num = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_FloorsCleared); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); } static void PyramidPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1464,8 +1464,8 @@ static void ShowPyramidResultsWindow(void) FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults); PrintAligned(gStringVar4, 2); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); PrintHyphens(10); PyramidPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 111, 49); PyramidPrintRecordStreak(FRONTIER_LVL_50, 64, 111, 65); @@ -1487,38 +1487,38 @@ static void ShowLinkContestResultsWindow(void) FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_LinkContestResults); - x = GetStringCenterAlignXOffset(1, gStringVar4, 208); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, x, 1, TEXT_SPEED_FF, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 1, TEXT_SPEED_FF, NULL); str = gText_1st; - x = GetStringRightAlignXOffset(1, str, 38) + 50; - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, 25, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 50; + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL); str = gText_2nd; - x = GetStringRightAlignXOffset(1, str, 38) + 88; - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, 25, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 88; + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL); str = gText_3rd; - x = GetStringRightAlignXOffset(1, str, 38) + 126; - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, 25, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 126; + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL); str = gText_4th; - x = GetStringRightAlignXOffset(1, str, 38) + 164; - AddTextPrinterParameterized(gRecordsWindowId, 1, str, x, 25, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 164; + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL); x = 6; - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Cool, x, 41, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Beauty, x, 57, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Cute, x, 73, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Smart, x, 89, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Tough, x, 105, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cool, x, 41, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Beauty, x, 57, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cute, x, 73, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Smart, x, 89, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Tough, x, 105, TEXT_SPEED_FF, NULL); for (i = 0; i < CONTEST_CATEGORIES_COUNT; i++) { for (j = 0; j < CONTESTANT_COUNT; j++) { ConvertIntToDecimalStringN(gStringVar4, gSaveBlock2Ptr->contestLinkResults[i][j], STR_CONV_MODE_RIGHT_ALIGN, 4); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SPEED_FF, NULL); } } @@ -2224,18 +2224,18 @@ static void Print1PRecord(s32 position, s32 x, s32 y, struct RankingHall1P *hall u8 text[32]; u16 winStreak; - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); hallRecord->name[PLAYER_NAME_LENGTH] = EOS; if (hallRecord->winStreak) { TVShowConvertInternationalString(text, hallRecord->name, hallRecord->language); - AddTextPrinterParameterized(gRecordsWindowId, 1, text, (x + 2) * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); winStreak = hallRecord->winStreak; if (winStreak > MAX_STREAK) winStreak = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[hallFacilityId]); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, GetStringRightAlignXOffset(1, sHallFacilityToRecordsText[hallFacilityId], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[hallFacilityId], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); } } @@ -2244,25 +2244,25 @@ static void Print2PRecord(s32 position, s32 x, s32 y, struct RankingHall2P *hall u8 text[32]; u16 winStreak; - AddTextPrinterParameterized(gRecordsWindowId, 1, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); if (hallRecord->winStreak) { hallRecord->name1[PLAYER_NAME_LENGTH] = EOS; hallRecord->name2[PLAYER_NAME_LENGTH] = EOS; TVShowConvertInternationalString(text, hallRecord->name1, hallRecord->language); - AddTextPrinterParameterized(gRecordsWindowId, 1, text, (x + 2) * 8, (8 * (y + 5 * position - 1)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position - 1)) + 1, TEXT_SPEED_FF, NULL); if (IsStringJapanese(hallRecord->name2)) TVShowConvertInternationalString(text, hallRecord->name2, LANGUAGE_JAPANESE); else StringCopy(text, hallRecord->name2); - AddTextPrinterParameterized(gRecordsWindowId, 1, text, (x + 4) * 8, (8 * (y + 5 * position + 1)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 4) * 8, (8 * (y + 5 * position + 1)) + 1, TEXT_SPEED_FF, NULL); winStreak = hallRecord->winStreak; if (winStreak > MAX_STREAK) winStreak = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK]); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, GetStringRightAlignXOffset(1, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); } } @@ -2343,9 +2343,9 @@ static void PrintHallRecords(s32 hallFacilityId, s32 lvlMode) StringCopy(gStringVar1, sRecordsWindowChallengeTexts[hallFacilityId][0]); StringExpandPlaceholders(gStringVar4, sRecordsWindowChallengeTexts[hallFacilityId][1]); - AddTextPrinterParameterized(gRecordsWindowId, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); - x = GetStringRightAlignXOffset(1, sLevelModeText[lvlMode], 0xD0); - AddTextPrinterParameterized(gRecordsWindowId, 1, sLevelModeText[lvlMode], x, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, sLevelModeText[lvlMode], 0xD0); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sLevelModeText[lvlMode], x, 1, TEXT_SPEED_FF, NULL); if (hallFacilityId == RANKING_HALL_TOWER_LINK) { gSaveBlock2Ptr->frontier.opponentNames[0][PLAYER_NAME_LENGTH] = EOS; diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 3cbe8df6e7..8d69b03bc9 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -514,7 +514,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId) *lastSavedTeam = *sHofMonPtr; DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_Hof_TrySaveData; } @@ -724,7 +724,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId) FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); HallOfFame_PrintPlayerInfo(1, 2); DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 1, gText_LeagueChamp, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_LeagueChamp, 0, NULL, 2, 1, 3); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_Hof_ExitOnKeyPressed; } @@ -1093,7 +1093,7 @@ static void Task_HofPC_PrintDataIsCorrupted(u8 taskId) { sub_8198180(gText_AButtonExit, 8, TRUE); DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 1, gText_HOFCorrupted, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_HOFCorrupted, 0, NULL, 2, 1, 3); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_HofPC_ExitOnButtonPress; } @@ -1114,7 +1114,7 @@ static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2) { FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); - AddTextPrinterParameterized3(0, 1, GetStringCenterAlignXOffset(1, gText_WelcomeToHOF, 0xD0), 1, sMonInfoTextColors, 0, gText_WelcomeToHOF); + AddTextPrinterParameterized3(0, FONT_NORMAL, GetStringCenterAlignXOffset(FONT_NORMAL, gText_WelcomeToHOF, 0xD0), 1, sMonInfoTextColors, 0, gText_WelcomeToHOF); CopyWindowToVram(0, 3); } @@ -1150,7 +1150,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u *(stringPtr)++ = CHAR_QUESTION_MARK; } stringPtr[0] = EOS; - AddTextPrinterParameterized3(0, 1, 0x10, 1, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0x10, 1, sMonInfoTextColors, -1, text); } // nick, species names, gender and level @@ -1158,14 +1158,14 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u text[POKEMON_NAME_LENGTH] = EOS; if (currMon->species == SPECIES_EGG) { - width = GetStringCenterAlignXOffset(1, text, 0xD0); - AddTextPrinterParameterized3(0, 1, width, 1, sMonInfoTextColors, -1, text); + width = GetStringCenterAlignXOffset(FONT_NORMAL, text, 0xD0); + AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text); CopyWindowToVram(0, 3); } else { - width = GetStringRightAlignXOffset(1, text, 0x80); - AddTextPrinterParameterized3(0, 1, width, 1, sMonInfoTextColors, -1, text); + width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x80); + AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text); text[0] = CHAR_SLASH; stringPtr = StringCopy(text + 1, gSpeciesNames[currMon->species]); @@ -1186,15 +1186,15 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u } stringPtr[0] = EOS; - AddTextPrinterParameterized3(0, 1, 0x80, 1, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0x80, 1, sMonInfoTextColors, -1, text); stringPtr = StringCopy(text, gText_Level); ConvertIntToDecimalStringN(stringPtr, currMon->lvl, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized3(0, 1, 0x24, 0x11, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0x24, 0x11, sMonInfoTextColors, -1, text); stringPtr = StringCopy(text, gText_IDNumber); ConvertIntToDecimalStringN(stringPtr, (u16)(currMon->tid), STR_CONV_MODE_LEADING_ZEROS, 5); - AddTextPrinterParameterized3(0, 1, 0x68, 0x11, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0x68, 0x11, sMonInfoTextColors, -1, text); CopyWindowToVram(0, 3); } @@ -1209,23 +1209,23 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) FillWindowPixelBuffer(1, PIXEL_FILL(1)); PutWindowTilemap(1); DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized3(1, 1, 0, 1, sPlayerInfoTextColors, -1, gText_Name); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sPlayerInfoTextColors, -1, gText_Name); - width = GetStringRightAlignXOffset(1, gSaveBlock2Ptr->playerName, 0x70); - AddTextPrinterParameterized3(1, 1, width, 1, sPlayerInfoTextColors, -1, gSaveBlock2Ptr->playerName); + width = GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 0x70); + AddTextPrinterParameterized3(1, FONT_NORMAL, width, 1, sPlayerInfoTextColors, -1, gSaveBlock2Ptr->playerName); trainerId = (gSaveBlock2Ptr->playerTrainerId[0]) | (gSaveBlock2Ptr->playerTrainerId[1] << 8); - AddTextPrinterParameterized3(1, 1, 0, 0x11, sPlayerInfoTextColors, 0, gText_IDNumber); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x11, sPlayerInfoTextColors, 0, gText_IDNumber); text[0] = (trainerId % 100000) / 10000 + CHAR_0; text[1] = (trainerId % 10000) / 1000 + CHAR_0; text[2] = (trainerId % 1000) / 100 + CHAR_0; text[3] = (trainerId % 100) / 10 + CHAR_0; text[4] = (trainerId % 10) / 1 + CHAR_0; text[5] = EOS; - width = GetStringRightAlignXOffset(1, text, 0x70); - AddTextPrinterParameterized3(1, 1, width, 0x11, sPlayerInfoTextColors, -1, text); + width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70); + AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x11, sPlayerInfoTextColors, -1, text); - AddTextPrinterParameterized3(1, 1, 0, 0x21, sPlayerInfoTextColors, -1, gText_Time); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x21, sPlayerInfoTextColors, -1, gText_Time); text[0] = (gSaveBlock2Ptr->playTimeHours / 100) + CHAR_0; text[1] = (gSaveBlock2Ptr->playTimeHours % 100) / 10 + CHAR_0; text[2] = (gSaveBlock2Ptr->playTimeHours % 10) + CHAR_0; @@ -1240,8 +1240,8 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) text[5] = (gSaveBlock2Ptr->playTimeMinutes % 10) + CHAR_0; text[6] = EOS; - width = GetStringRightAlignXOffset(1, text, 0x70); - AddTextPrinterParameterized3(1, 1, width, 0x21, sPlayerInfoTextColors, -1, text); + width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70); + AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x21, sPlayerInfoTextColors, -1, text); CopyWindowToVram(1, 3); } diff --git a/src/international_string_util.c b/src/international_string_util.c index b2ee9743ea..ef779c6980 100644 --- a/src/international_string_util.c +++ b/src/international_string_util.c @@ -40,7 +40,7 @@ int GetMaxWidthInMenuTable(const struct MenuAction *actions, int numActions) for (maxWidth = 0, i = 0; i < numActions; i++) { - int stringWidth = GetStringWidth(1, actions[i].text, 0); + int stringWidth = GetStringWidth(FONT_NORMAL, actions[i].text, 0); if (stringWidth > maxWidth) maxWidth = stringWidth; } @@ -54,7 +54,7 @@ int GetMaxWidthInSubsetOfMenuTable(const struct MenuAction *actions, const u8* a for (maxWidth = 0, i = 0; i < numActions; i++) { - int stringWidth = GetStringWidth(1, actions[actionIds[i]].text, 0); + int stringWidth = GetStringWidth(FONT_NORMAL, actions[actionIds[i]].text, 0); if (stringWidth > maxWidth) maxWidth = stringWidth; } diff --git a/src/item_menu.c b/src/item_menu.c index 53f478a31d..3de5c17a35 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -260,7 +260,7 @@ static const struct ListMenuTemplate sItemListMenu = .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 7, + .fontId = FONT_NARROW, .cursorKind = 0 }; @@ -973,16 +973,16 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y) // Print berry quantity ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BERRY_CAPACITY_DIGITS); StringExpandPlaceholders(gStringVar4, gText_xVar1); - offset = GetStringRightAlignXOffset(7, gStringVar4, 119); - BagMenu_Print(windowId, 7, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL); + offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119); + BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL); } else if (gBagPosition.pocket != KEYITEMS_POCKET && ItemId_GetImportance(itemId) == FALSE) { // Print item quantity ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BAG_ITEM_CAPACITY_DIGITS); StringExpandPlaceholders(gStringVar4, gText_xVar1); - offset = GetStringRightAlignXOffset(7, gStringVar4, 119); - BagMenu_Print(windowId, 7, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL); + offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119); + BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL); } else { @@ -1008,7 +1008,7 @@ static void PrintItemDescription(int itemIndex) str = gStringVar4; } FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0)); - BagMenu_Print(WIN_DESCRIPTION, 1, str, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, str, 3, 1, 0, 0, 0, COLORID_NORMAL); } static void BagMenu_PrintCursor(u8 listTaskId, u8 colorIndex) @@ -1019,9 +1019,9 @@ static void BagMenu_PrintCursor(u8 listTaskId, u8 colorIndex) static void BagMenu_PrintCursorAtPos(u8 y, u8 colorIndex) { if (colorIndex == COLORID_NONE) - FillWindowPixelRect(WIN_ITEM_LIST, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); + FillWindowPixelRect(WIN_ITEM_LIST, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(FONT_NORMAL, 0), GetMenuCursorDimensionByFont(FONT_NORMAL, 1)); else - BagMenu_Print(WIN_ITEM_LIST, 1, gText_SelectorArrow2, 0, y, 0, 0, 0, colorIndex); + BagMenu_Print(WIN_ITEM_LIST, FONT_NORMAL, gText_SelectorArrow2, 0, y, 0, 0, 0, colorIndex); } @@ -1195,7 +1195,7 @@ static void PrintItemQuantity(u8 windowId, s16 quantity) u8 numDigits = (gBagPosition.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS; ConvertIntToDecimalStringN(gStringVar1, quantity, STR_CONV_MODE_LEADING_ZEROS, numDigits); StringExpandPlaceholders(gStringVar4, gText_xVar1); - AddTextPrinterParameterized(windowId, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 0x28), 2, 0, 0); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 0x28), 2, 0, 0); } // Prints the quantity of items to be sold and the amount that would be earned @@ -1204,7 +1204,7 @@ static void PrintItemSoldAmount(int windowId, int numSold, int moneyEarned) u8 numDigits = (gBagPosition.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS; ConvertIntToDecimalStringN(gStringVar1, numSold, STR_CONV_MODE_LEADING_ZEROS, numDigits); StringExpandPlaceholders(gStringVar4, gText_xVar1); - AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, 0); PrintMoneyAmount(windowId, 38, 1, moneyEarned, 0); } @@ -1438,7 +1438,7 @@ static void StartItemSwap(u8 taskId) CopyItemName(BagGetItemIdByPocketPosition(gBagPosition.pocket + 1, tListPosition), gStringVar1); StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where); FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0)); - BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); UpdateItemMenuSwapLinePos(tListPosition); DestroyPocketSwitchArrowPair(); BagMenu_PrintCursor(tListTaskId, COLORID_GRAY_CURSOR); @@ -1653,7 +1653,7 @@ static void OpenContextMenu(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected); FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0)); - BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); } if (gBagMenu->contextMenuNumItems == 1) PrintContextMenuItems(BagMenu_AddWindow(ITEMWIN_1x1)); @@ -1667,13 +1667,13 @@ static void OpenContextMenu(u8 taskId) static void PrintContextMenuItems(u8 windowId) { - AddItemMenuActionTextPrinters(windowId, 7, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr); + AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, gBagMenu->contextMenuNumItems, 0); } static void PrintContextMenuItemGrid(u8 windowId, u8 columns, u8 rows) { - PrintMenuActionGrid(windowId, 7, 8, 1, 56, columns, rows, sItemMenuActions, gBagMenu->contextMenuItemsPtr); + PrintMenuActionGrid(windowId, FONT_NARROW, 8, 1, 56, columns, rows, sItemMenuActions, gBagMenu->contextMenuItemsPtr); InitMenuActionGrid(windowId, 56, columns, rows, 0); } @@ -1819,7 +1819,7 @@ static void ItemMenu_Toss(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s); FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0)); - BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); AddItemQuantityWindow(ITEMWIN_QUANTITY); gTasks[taskId].func = Task_ChooseHowManyToToss; } @@ -1833,7 +1833,7 @@ static void AskTossItems(u8 taskId) ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS); StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems); FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0)); - BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); BagMenu_YesNo(taskId, ITEMWIN_YESNO_LOW, &sYesNoTossFunctions); } @@ -1876,7 +1876,7 @@ static void ConfirmToss(u8 taskId) ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS); StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s); FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0)); - BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); gTasks[taskId].func = Task_RemoveItemFromBag; } @@ -1924,7 +1924,7 @@ static void ItemMenu_Give(u8 taskId) RemoveContextWindow(); if (!IsWritingMailAllowed(gSpecialVar_ItemId)) { - DisplayItemMessage(taskId, 1, gText_CantWriteMail, HandleErrorMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gText_CantWriteMail, HandleErrorMessage); } else if (!ItemId_GetImportance(gSpecialVar_ItemId)) { @@ -1946,14 +1946,14 @@ static void ItemMenu_Give(u8 taskId) static void PrintThereIsNoPokemon(u8 taskId) { - DisplayItemMessage(taskId, 1, gText_NoPokemon, HandleErrorMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gText_NoPokemon, HandleErrorMessage); } static void PrintItemCantBeHeld(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeld); - DisplayItemMessage(taskId, 1, gStringVar4, HandleErrorMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, HandleErrorMessage); } static void HandleErrorMessage(u8 taskId) @@ -2001,13 +2001,13 @@ static void Task_ItemContext_GiveToParty(u8 taskId) { if (!IsWritingMailAllowed(gSpecialVar_ItemId)) { - DisplayItemMessage(taskId, 1, gText_CantWriteMail, HandleErrorMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gText_CantWriteMail, HandleErrorMessage); } else if (!IsHoldingItemAllowed(gSpecialVar_ItemId)) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeldHere); - DisplayItemMessage(taskId, 1, gStringVar4, HandleErrorMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, HandleErrorMessage); } else if (gBagPosition.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId)) { @@ -2023,7 +2023,7 @@ static void Task_ItemContext_GiveToParty(u8 taskId) static void Task_ItemContext_GiveToPC(u8 taskId) { if (ItemIsMail(gSpecialVar_ItemId) == TRUE) - DisplayItemMessage(taskId, 1, gText_CantWriteMail, HandleErrorMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gText_CantWriteMail, HandleErrorMessage); else if (gBagPosition.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId)) gTasks[taskId].func = Task_FadeAndCloseBagMenu; else @@ -2072,7 +2072,7 @@ static void Task_ItemContext_Sell(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar2); StringExpandPlaceholders(gStringVar4, gText_CantBuyKeyItem); - DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage); } else { @@ -2086,7 +2086,7 @@ static void Task_ItemContext_Sell(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar2); StringExpandPlaceholders(gStringVar4, gText_HowManyToSell); - DisplayItemMessage(taskId, 1, gStringVar4, InitSellHowManyInput); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, InitSellHowManyInput); } } } @@ -2097,7 +2097,7 @@ static void DisplaySellItemPriceAndConfirm(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_ICanPayVar1); - DisplayItemMessage(taskId, 1, gStringVar4, AskSellItems); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, AskSellItems); } static void AskSellItems(u8 taskId) @@ -2157,7 +2157,7 @@ static void ConfirmSell(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar2); ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverVar1ForVar2); - DisplayItemMessage(taskId, 1, gStringVar4, SellItem); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, SellItem); } static void SellItem(u8 taskId) @@ -2203,7 +2203,7 @@ static void Task_ItemContext_Deposit(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_DepositHowManyVar1); FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0)); - BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); AddItemQuantityWindow(ITEMWIN_QUANTITY); gTasks[taskId].func = Task_ChooseHowManyToDeposit; } @@ -2241,7 +2241,7 @@ static void TryDepositItem(u8 taskId) if (ItemId_GetImportance(gSpecialVar_ItemId)) { // Can't deposit important items - BagMenu_Print(WIN_DESCRIPTION, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, COLORID_NORMAL); gTasks[taskId].func = WaitDepositErrorMessage; } else if (AddPCItem(gSpecialVar_ItemId, tItemCount) == TRUE) @@ -2250,13 +2250,13 @@ static void TryDepositItem(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS); StringExpandPlaceholders(gStringVar4, gText_DepositedVar2Var1s); - BagMenu_Print(WIN_DESCRIPTION, 1, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL); gTasks[taskId].func = Task_RemoveItemFromBag; } else { // No room to deposit - BagMenu_Print(WIN_DESCRIPTION, 1, gText_NoRoomForItems, 3, 1, 0, 0, 0, COLORID_NORMAL); + BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gText_NoRoomForItems, 3, 1, 0, 0, 0, COLORID_NORMAL); gTasks[taskId].func = WaitDepositErrorMessage; } } @@ -2416,12 +2416,12 @@ static void PrintPocketNames(const u8 *pocketName1, const u8 *pocketName2) window.height = 2; windowId = AddWindow(&window); FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); - offset = GetStringCenterAlignXOffset(1, pocketName1, 0x40); - BagMenu_Print(windowId, 1, pocketName1, offset, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME); + offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName1, 0x40); + BagMenu_Print(windowId, FONT_NORMAL, pocketName1, offset, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME); if (pocketName2) { - offset = GetStringCenterAlignXOffset(1, pocketName2, 0x40); - BagMenu_Print(windowId, 1, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME); + offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName2, 0x40); + BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME); } CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, sizeof(gBagMenu->pocketNameBuffer)); RemoveWindow(windowId); @@ -2557,7 +2557,7 @@ static void PrintTMHMMoveData(u16 itemId) if (itemId == ITEM_NONE) { for (i = 0; i < 4; i++) - BagMenu_Print(WIN_TMHM_INFO, 1, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); CopyWindowToVram(WIN_TMHM_INFO, 2); } else @@ -2575,7 +2575,7 @@ static void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].power, STR_CONV_MODE_RIGHT_ALIGN, 3); text = gStringVar1; } - BagMenu_Print(WIN_TMHM_INFO, 1, text, 7, 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); // Print TMHM accuracy if (gBattleMoves[moveId].accuracy == 0) @@ -2587,11 +2587,11 @@ static void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].accuracy, STR_CONV_MODE_RIGHT_ALIGN, 3); text = gStringVar1; } - BagMenu_Print(WIN_TMHM_INFO, 1, text, 7, 24, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 24, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); // Print TMHM pp ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].pp, STR_CONV_MODE_RIGHT_ALIGN, 3); - BagMenu_Print(WIN_TMHM_INFO, 1, gStringVar1, 7, 36, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); CopyWindowToVram(WIN_TMHM_INFO, 2); } diff --git a/src/item_use.c b/src/item_use.c index 833e80b976..394e7922bd 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -143,7 +143,7 @@ static void DisplayCannotUseItemMessage(u8 taskId, bool8 isUsingRegisteredKeyIte if (!isUsingRegisteredKeyItemOnField) { if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage); else DisplayItemMessageInBattlePyramid(taskId, gText_DadsAdvice, Task_CloseBattlePyramidBagMessage); } @@ -651,7 +651,7 @@ void ItemUseOutOfBattle_CoinCase(u8 taskId) if (!gTasks[taskId].tUsingRegisteredKeyItem) { - DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage); } else { @@ -666,7 +666,7 @@ void ItemUseOutOfBattle_PowderJar(u8 taskId) if (!gTasks[taskId].tUsingRegisteredKeyItem) { - DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage); } else { @@ -782,9 +782,9 @@ void ItemUseOutOfBattle_RareCandy(u8 taskId) void ItemUseOutOfBattle_TMHM(u8 taskId) { if (gSpecialVar_ItemId >= ITEM_HM01_CUT) - DisplayItemMessage(taskId, 1, gText_BootedUpHM, BootUpSoundTMHM); // HM + DisplayItemMessage(taskId, FONT_NORMAL, gText_BootedUpHM, BootUpSoundTMHM); // HM else - DisplayItemMessage(taskId, 1, gText_BootedUpTM, BootUpSoundTMHM); // TM + DisplayItemMessage(taskId, FONT_NORMAL, gText_BootedUpTM, BootUpSoundTMHM); // TM } static void BootUpSoundTMHM(u8 taskId) @@ -799,7 +799,7 @@ static void Task_ShowTMHMContainedMessage(u8 taskId) { StringCopy(gStringVar1, gMoveNames[ItemIdToBattleMoveId(gSpecialVar_ItemId)]); StringExpandPlaceholders(gStringVar4, gText_TMHMContainedVar1); - DisplayItemMessage(taskId, 1, gStringVar4, UseTMHMYesNo); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, UseTMHMYesNo); } } @@ -836,7 +836,7 @@ void ItemUseOutOfBattle_Repel(u8 taskId) if (VarGet(VAR_REPEL_STEP_COUNT) == 0) gTasks[taskId].func = Task_StartUseRepel; else if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gText_RepelEffectsLingered, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gText_RepelEffectsLingered, CloseItemMessage); else DisplayItemMessageInBattlePyramid(taskId, gText_RepelEffectsLingered, Task_CloseBattlePyramidBagMessage); } @@ -860,7 +860,7 @@ static void Task_UseRepel(u8 taskId) VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId)); RemoveUsedItem(); if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage); else DisplayItemMessageInBattlePyramid(taskId, gStringVar4, Task_CloseBattlePyramidBagMessage); } @@ -872,7 +872,7 @@ static void Task_UsedBlackWhiteFlute(u8 taskId) { PlaySE(SE_GLASS_FLUTE); if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gStringVar4, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, CloseItemMessage); else DisplayItemMessageInBattlePyramid(taskId, gStringVar4, Task_CloseBattlePyramidBagMessage); } @@ -951,7 +951,7 @@ void ItemUseInBattle_PokeBall(u8 taskId) } else if (!InBattlePyramid()) { - DisplayItemMessage(taskId, 1, gText_BoxFull, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gText_BoxFull, CloseItemMessage); } else DisplayItemMessageInBattlePyramid(taskId, gText_BoxFull, Task_CloseBattlePyramidBagMessage); @@ -975,7 +975,7 @@ static void Task_UseStatIncreaseItem(u8 taskId) PlaySE(SE_USE_ITEM); RemoveBagItem(gSpecialVar_ItemId, 1); if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, UseStatIncreaseItem(gSpecialVar_ItemId), Task_CloseStatIncreaseMessage); + DisplayItemMessage(taskId, FONT_NORMAL, UseStatIncreaseItem(gSpecialVar_ItemId), Task_CloseStatIncreaseMessage); else DisplayItemMessageInBattlePyramid(taskId, UseStatIncreaseItem(gSpecialVar_ItemId), Task_CloseStatIncreaseMessage); } @@ -989,7 +989,7 @@ void ItemUseInBattle_StatIncrease(u8 taskId) if (ExecuteTableBasedItemEffect(&gPlayerParty[partyId], gSpecialVar_ItemId, partyId, 0) != FALSE) { if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gText_WontHaveEffect, CloseItemMessage); + DisplayItemMessage(taskId, FONT_NORMAL, gText_WontHaveEffect, CloseItemMessage); else DisplayItemMessageInBattlePyramid(taskId, gText_WontHaveEffect, Task_CloseBattlePyramidBagMessage); } @@ -1041,7 +1041,7 @@ void ItemUseInBattle_Escape(u8 taskId) { RemoveUsedItem(); if (!InBattlePyramid()) - DisplayItemMessage(taskId, 1, gStringVar4, Task_FadeAndCloseBagMenu); + DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, Task_FadeAndCloseBagMenu); else DisplayItemMessageInBattlePyramid(taskId, gStringVar4, CloseBattlePyramidBag); } diff --git a/src/link.c b/src/link.c index 19b6d0f813..cf5e265737 100644 --- a/src/link.c +++ b/src/link.c @@ -1644,8 +1644,8 @@ static void ErrorMsg_MoveCloserToPartner(void) LoadPalette(sWirelessLinkDisplayPal, 0, 0x20); FillWindowPixelBuffer(0, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized3(0, 3, 2, 6, sTextColors, 0, gText_CommErrorEllipsis); - AddTextPrinterParameterized3(2, 3, 2, 1, sTextColors, 0, gText_MoveCloserToLinkPartner); + AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 6, sTextColors, 0, gText_CommErrorEllipsis); + AddTextPrinterParameterized3(2, FONT_SHORT_COPY_1, 2, 1, sTextColors, 0, gText_MoveCloserToLinkPartner); PutWindowTilemap(0); PutWindowTilemap(2); CopyWindowToVram(0, 0); @@ -1657,7 +1657,7 @@ static void ErrorMsg_CheckConnections(void) LoadBgTiles(0, sCommErrorBg_Gfx, 0x20, 0); FillWindowPixelBuffer(1, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized3(1, 3, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections); + AddTextPrinterParameterized3(1, FONT_SHORT_COPY_1, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections); PutWindowTilemap(1); PutWindowTilemap(2); CopyWindowToVram(1, 0); @@ -1692,9 +1692,9 @@ static void CB2_PrintErrorMessage(void) break; case 130: if (gWirelessCommType == 2) - AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnTitleScreen); + AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 20, sTextColors, 0, gText_ABtnTitleScreen); else if (gWirelessCommType == 1) - AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter); + AddTextPrinterParameterized3(0, FONT_SHORT_COPY_1, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter); break; } if (gMain.state == 160) diff --git a/src/mail.c b/src/mail.c index 8bb6f69918..5b4e62bafa 100644 --- a/src/mail.c +++ b/src/mail.c @@ -692,14 +692,14 @@ static void PrintMailText(void) if (sMailRead->message[i][0] == EOS || sMailRead->message[i][0] == CHAR_SPACE) continue; - AddTextPrinterParameterized3(0, 1, sMailRead->layout->lines[i].xOffset + sMailRead->layout->wordsXPos, y + sMailRead->layout->wordsYPos, sTextColors, 0, sMailRead->message[i]); + AddTextPrinterParameterized3(0, FONT_NORMAL, sMailRead->layout->lines[i].xOffset + sMailRead->layout->wordsXPos, y + sMailRead->layout->wordsYPos, sTextColors, 0, sMailRead->message[i]); y += sMailRead->layout->lines[i].height; } bufptr = StringCopy(signature, gText_FromSpace); StringCopy(bufptr, sMailRead->playerName); - box_x = GetStringCenterAlignXOffset(1, signature, sMailRead->signatureWidth) + 104; + box_x = GetStringCenterAlignXOffset(FONT_NORMAL, signature, sMailRead->signatureWidth) + 104; box_y = sMailRead->layout->signatureYPos + 88; - AddTextPrinterParameterized3(0, 1, box_x, box_y, sTextColors, 0, signature); + AddTextPrinterParameterized3(0, FONT_NORMAL, box_x, box_y, sTextColors, 0, signature); CopyWindowToVram(0, 3); CopyWindowToVram(1, 3); } diff --git a/src/main_menu.c b/src/main_menu.c index b2879968c9..637719dea7 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -780,8 +780,8 @@ static void Task_DisplayMainMenu(u8 taskId) default: FillWindowPixelBuffer(0, PIXEL_FILL(0xA)); FillWindowPixelBuffer(1, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(0, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); - AddTextPrinterParameterized3(1, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); PutWindowTilemap(0); PutWindowTilemap(1); CopyWindowToVram(0, 2); @@ -793,9 +793,9 @@ static void Task_DisplayMainMenu(u8 taskId) FillWindowPixelBuffer(2, PIXEL_FILL(0xA)); FillWindowPixelBuffer(3, PIXEL_FILL(0xA)); FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); - AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); - AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); + AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); + AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); MainMenu_FormatSavegameText(); PutWindowTilemap(2); PutWindowTilemap(3); @@ -812,10 +812,10 @@ static void Task_DisplayMainMenu(u8 taskId) FillWindowPixelBuffer(3, PIXEL_FILL(0xA)); FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); FillWindowPixelBuffer(5, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); - AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); - AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift); - AddTextPrinterParameterized3(5, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); + AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); + AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift); + AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); MainMenu_FormatSavegameText(); PutWindowTilemap(2); PutWindowTilemap(3); @@ -836,11 +836,11 @@ static void Task_DisplayMainMenu(u8 taskId) FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); FillWindowPixelBuffer(5, PIXEL_FILL(0xA)); FillWindowPixelBuffer(6, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); - AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); - AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift2); - AddTextPrinterParameterized3(5, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryEvents); - AddTextPrinterParameterized3(6, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); + AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); + AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift2); + AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryEvents); + AddTextPrinterParameterized3(6, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); MainMenu_FormatSavegameText(); PutWindowTilemap(2); PutWindowTilemap(3); @@ -2117,7 +2117,7 @@ static void NewGameBirchSpeech_SetDefaultPlayerName(u8 nameId) static void CreateMainMenuErrorWindow(const u8* str) { FillWindowPixelBuffer(7, PIXEL_FILL(1)); - AddTextPrinterParameterized(7, 1, str, 0, 1, 2, 0); + AddTextPrinterParameterized(7, FONT_NORMAL, str, 0, 1, 2, 0); PutWindowTilemap(7); CopyWindowToVram(7, 2); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[7], MAIN_MENU_BORDER_TILE); @@ -2136,8 +2136,8 @@ static void MainMenu_FormatSavegameText(void) static void MainMenu_FormatSavegamePlayer(void) { StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPlayer); - AddTextPrinterParameterized3(2, 1, 0, 17, sTextColor_MenuInfo, -1, gStringVar4); - AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, -1, gSaveBlock2Ptr->playerName); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 17, sTextColor_MenuInfo, -1, gStringVar4); + AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, -1, gSaveBlock2Ptr->playerName); } static void MainMenu_FormatSavegameTime(void) @@ -2146,11 +2146,11 @@ static void MainMenu_FormatSavegameTime(void) u8* ptr; StringExpandPlaceholders(gStringVar4, gText_ContinueMenuTime); - AddTextPrinterParameterized3(2, 1, 0x6C, 17, sTextColor_MenuInfo, -1, gStringVar4); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 17, sTextColor_MenuInfo, -1, gStringVar4); ptr = ConvertIntToDecimalStringN(str, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3); *ptr = 0xF0; ConvertIntToDecimalStringN(ptr + 1, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2); - AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 0xD0), 17, sTextColor_MenuInfo, -1, str); + AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 17, sTextColor_MenuInfo, -1, str); } static void MainMenu_FormatSavegamePokedex(void) @@ -2165,9 +2165,9 @@ static void MainMenu_FormatSavegamePokedex(void) else dexCount = GetHoennPokedexCount(FLAG_GET_CAUGHT); StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPokedex); - AddTextPrinterParameterized3(2, 1, 0, 33, sTextColor_MenuInfo, -1, gStringVar4); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 33, sTextColor_MenuInfo, -1, gStringVar4); ConvertIntToDecimalStringN(str, dexCount, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 100), 33, sTextColor_MenuInfo, -1, str); + AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 100), 33, sTextColor_MenuInfo, -1, str); } } @@ -2183,9 +2183,9 @@ static void MainMenu_FormatSavegameBadges(void) badgeCount++; } StringExpandPlaceholders(gStringVar4, gText_ContinueMenuBadges); - AddTextPrinterParameterized3(2, 1, 0x6C, 33, sTextColor_MenuInfo, -1, gStringVar4); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 33, sTextColor_MenuInfo, -1, gStringVar4); ConvertIntToDecimalStringN(str, badgeCount, STR_CONV_MODE_LEADING_ZEROS, 1); - AddTextPrinterParameterized3(2, 1, GetStringRightAlignXOffset(1, str, 0xD0), 33, sTextColor_MenuInfo, -1, str); + AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 33, sTextColor_MenuInfo, -1, str); } static void LoadMainMenuWindowFrameTiles(u8 bgId, u16 tileOffset) @@ -2237,9 +2237,9 @@ static void NewGameBirchSpeech_ClearGenderWindow(u8 windowId, bool8 copyToVram) static void NewGameBirchSpeech_ClearWindow(u8 windowId) { - u8 bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND); - u8 maxCharWidth = GetFontAttribute(1, FONTATTR_MAX_LETTER_WIDTH); - u8 maxCharHeight = GetFontAttribute(1, FONTATTR_MAX_LETTER_HEIGHT); + u8 bgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_BACKGROUND); + u8 maxCharWidth = GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_WIDTH); + u8 maxCharHeight = GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_HEIGHT); u8 winWidth = GetWindowAttribute(windowId, WINDOW_WIDTH); u8 winHeight = GetWindowAttribute(windowId, WINDOW_HEIGHT); diff --git a/src/map_name_popup.c b/src/map_name_popup.c index 97b02acf63..88a06eed42 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -325,11 +325,11 @@ static void ShowMapNamePopUpWindow(void) } AddMapNamePopUpWindow(); LoadMapNamePopUpWindowBg(); - x = GetStringCenterAlignXOffset(7, withoutPrefixPtr, 80); + x = GetStringCenterAlignXOffset(FONT_NARROW, withoutPrefixPtr, 80); mapDisplayHeader[0] = EXT_CTRL_CODE_BEGIN; mapDisplayHeader[1] = EXT_CTRL_CODE_HIGHLIGHT; mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT; - AddTextPrinterParameterized(GetMapNamePopUpWindowId(), 7, mapDisplayHeader, x, 3, 0xFF, NULL); + AddTextPrinterParameterized(GetMapNamePopUpWindowId(), FONT_NARROW, mapDisplayHeader, x, 3, 0xFF, NULL); CopyWindowToVram(GetMapNamePopUpWindowId(), 3); } diff --git a/src/match_call.c b/src/match_call.c index 9939b09d27..4c77b87646 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1401,7 +1401,7 @@ static void InitMatchCallTextPrinter(int windowId, const u8 *str) struct TextPrinterTemplate printerTemplate; printerTemplate.currentChar = str; printerTemplate.windowId = windowId; - printerTemplate.fontId = 1; + printerTemplate.fontId = FONT_NORMAL; printerTemplate.x = 32; printerTemplate.y = 1; printerTemplate.currentX = 32; diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 2fd0e67307..a9f7df744a 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -447,7 +447,7 @@ static void DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1) static void DrawSongTextWindow(const u8 * str) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, str, 0, 1, 1, DisableTextPrinters); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 0, 1, 1, DisableTextPrinters); gDisableTextPrinters = TRUE; CopyWindowToVram(0, 3); } @@ -1324,7 +1324,7 @@ static void StorytellerDisplayStory(u32 player) static void PrintStoryList(void) { s32 i; - s32 width = GetStringWidth(1, gText_Exit, 0); + s32 width = GetStringWidth(FONT_NORMAL, gText_Exit, 0); for (i = 0; i < NUM_STORYTELLER_TALES; i++) { s32 curWidth; @@ -1332,7 +1332,7 @@ static void PrintStoryList(void) if (gameStatID == 0) break; - curWidth = GetStringWidth(1, GetStoryTitleByStat(gameStatID), 0); + curWidth = GetStringWidth(FONT_NORMAL, GetStoryTitleByStat(gameStatID), 0); if (curWidth > width) width = curWidth; } @@ -1343,9 +1343,9 @@ static void PrintStoryList(void) u16 gameStatID = sStorytellerPtr->gameStatIDs[i]; if (gameStatID == 0) break; - AddTextPrinterParameterized(sStorytellerWindowId, 1, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL); + AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL); } - AddTextPrinterParameterized(sStorytellerWindowId, 1, gText_Exit, 8, 16 * i + 1, 0xFF, NULL); + AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 0xFF, NULL); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sStorytellerWindowId, GetFreeStorySlot() + 1, 0); CopyWindowToVram(sStorytellerWindowId, 3); } diff --git a/src/menu.c b/src/menu.c index dcc32319e9..e86d671731 100644 --- a/src/menu.c +++ b/src/menu.c @@ -193,19 +193,19 @@ void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress) { void (*callback)(struct TextPrinterTemplate *, u16) = NULL; gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; - AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3); } void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress) { gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; - AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), NULL, 2, 1, 3); } void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed) { gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; - AddTextPrinterParameterized2(0, 1, gStringVar4, speed, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, speed, NULL, 2, 1, 3); } void LoadMessageBoxAndBorderGfx(void) @@ -458,7 +458,7 @@ u16 sub_81978D0(u8 colorNum) void DisplayItemMessageOnField(u8 taskId, const u8 *string, TaskFunc callback) { LoadMessageBoxAndBorderGfx(); - DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, 1, GetPlayerTextSpeedDelay(), string, callback); + DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, FONT_NORMAL, GetPlayerTextSpeedDelay(), string, callback); CopyWindowToVram(0, 3); } @@ -545,7 +545,7 @@ void RemoveMapNamePopUpWindow(void) void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16)) { gTextFlags.canABSpeedUpPrint = a1; - AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3); } void sub_8197AE8(bool8 copyToVram) @@ -821,9 +821,9 @@ void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram) { PutWindowTilemap(sWindowId); FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); - width = GetStringWidth(0, string, 0); + width = GetStringWidth(FONT_SMALL, string, 0); AddTextPrinterParameterized3(sWindowId, - 0, + FONT_SMALL, 0xEC - (GetWindowAttribute(sWindowId, WINDOW_TILEMAP_LEFT) * 8) - a2 - width, 1, sTextColors, @@ -857,16 +857,16 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); if (string2 != NULL) { - width = GetStringWidth(0, string2, 0); + width = GetStringWidth(FONT_SMALL, string2, 0); AddTextPrinterParameterized3(sWindowId, - 0, + FONT_SMALL, 0xEC - (GetWindowAttribute(sWindowId, WINDOW_TILEMAP_LEFT) * 8) - a4 - width, 1, color, 0, string2); } - AddTextPrinterParameterized4(sWindowId, 1, 4, 1, 0, 0, color, 0, string); + AddTextPrinterParameterized4(sWindowId, FONT_NORMAL, 4, 1, 0, 0, color, 0, string); if (copyToVram) CopyWindowToVram(sWindowId, 3); } @@ -1200,7 +1200,7 @@ void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING); printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING); - AddTextPrinter(&printer, 0xFF, NULL); + AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); sub_81983AC(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos); } @@ -1578,7 +1578,7 @@ u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, boo sMenu.minCursorPos = 0; sMenu.maxCursorPos = itemCount - 1; sMenu.windowId = windowId; - sMenu.fontId = 1; + sMenu.fontId = FONT_NORMAL; sMenu.optionHeight = 16; sMenu.APressMuted = APressMuted; @@ -1615,11 +1615,11 @@ void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *menuActions struct TextPrinterTemplate printer; printer.windowId = windowId; - printer.fontId = 1; - printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND); - printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND); - printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN); + printer.fontId = FONT_NORMAL; + printer.fgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_FOREGROUND); + printer.bgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_BACKGROUND); + printer.shadowColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_SHADOW); + printer.unk = GetFontAttribute(FONT_NORMAL, FONTATTR_UNKNOWN); printer.letterSpacing = 0; printer.lineSpacing = 0; printer.x = 8; @@ -1645,15 +1645,15 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa printer.currentChar = gText_YesNo; printer.windowId = sYesNoWindowId; - printer.fontId = 1; + printer.fontId = FONT_NORMAL; printer.x = 8; printer.y = 1; printer.currentX = printer.x; printer.currentY = printer.y; - printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND); - printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND); - printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN); + printer.fgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_FOREGROUND); + printer.bgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_BACKGROUND); + printer.shadowColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_SHADOW); + printer.unk = GetFontAttribute(FONT_NORMAL, FONTATTR_UNKNOWN); printer.letterSpacing = 0; printer.lineSpacing = 0; @@ -1680,11 +1680,11 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M struct TextPrinterTemplate printer; printer.windowId = windowId; - printer.fontId = 1; - printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND); - printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND); - printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN); + printer.fontId = FONT_NORMAL; + printer.fgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_FOREGROUND); + printer.bgColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_BACKGROUND); + printer.shadowColor = GetFontAttribute(FONT_NORMAL, FONTATTR_COLOR_SHADOW); + printer.unk = GetFontAttribute(FONT_NORMAL, FONTATTR_UNKNOWN); printer.letterSpacing = 0; printer.lineSpacing = 0; @@ -1713,7 +1713,7 @@ u8 InitMenuActionGrid(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initi sMenu.minCursorPos = 0; sMenu.maxCursorPos = (columns * rows) - 1; sMenu.windowId = windowId; - sMenu.fontId = 1; + sMenu.fontId = FONT_NORMAL; sMenu.optionWidth = optionWidth; sMenu.optionHeight = 16; sMenu.columns = columns; @@ -1946,8 +1946,8 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const printer.y = top; printer.currentX = printer.x; printer.currentY = printer.y; - printer.letterSpacing = GetFontAttribute(fontId, 2); - printer.lineSpacing = GetFontAttribute(fontId, 3); + printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING); + printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING); printer.unk = 0; printer.fgColor = color[1]; printer.bgColor = color[0]; @@ -1992,9 +1992,9 @@ void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left printer.lineSpacing = lineSpacing; printer.unk = 0; - printer.fgColor = GetFontAttribute(fontId, 5); - printer.bgColor = GetFontAttribute(fontId, 6); - printer.shadowColor = GetFontAttribute(fontId, 7); + printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND); + printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND); + printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW); AddTextPrinter(&printer, speed, callback); } diff --git a/src/menu_specialized.c b/src/menu_specialized.c index c9d895e193..a1abe4fcdf 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -203,7 +203,7 @@ static const struct ListMenuTemplate sMoveRelearnerMovesListTemplate = .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 0 }; @@ -268,7 +268,7 @@ static void MailboxMenu_ItemPrintFunc(u8 windowId, u32 itemId, u8 y) length = StringLength(buffer); if (length < PLAYER_NAME_LENGTH - 1) ConvertInternationalString(buffer, LANGUAGE_JAPANESE); - AddTextPrinterParameterized4(windowId, 1, 8, y, 0, 0, sPlayerNameTextColors, -1, buffer); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 8, y, 0, 0, sPlayerNameTextColors, -1, buffer); } u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page) @@ -296,7 +296,7 @@ u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page) gMultiuseListMenuTemplate.cursorShadowPal = 3; gMultiuseListMenuTemplate.moveCursorFunc = MailboxMenu_MoveCursorFunc; gMultiuseListMenuTemplate.itemPrintFunc = MailboxMenu_ItemPrintFunc; - gMultiuseListMenuTemplate.fontId = 1; + gMultiuseListMenuTemplate.fontId = FONT_NORMAL; gMultiuseListMenuTemplate.cursorKind = 0; gMultiuseListMenuTemplate.lettersSpacing = 0; gMultiuseListMenuTemplate.itemVerticalPadding = 0; @@ -739,19 +739,19 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) FillWindowPixelBuffer(0, PIXEL_FILL(1)); str = gText_MoveRelearnerBattleMoves; - x = GetStringCenterAlignXOffset(1, str, 0x80); - AddTextPrinterParameterized(0, 1, str, x, 1, TEXT_SPEED_FF, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80); + AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 1, TEXT_SPEED_FF, NULL); str = gText_MoveRelearnerPP; - AddTextPrinterParameterized(0, 1, str, 4, 0x29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x29, TEXT_SPEED_FF, NULL); str = gText_MoveRelearnerPower; - x = GetStringRightAlignXOffset(1, str, 0x6A); - AddTextPrinterParameterized(0, 1, str, x, 0x19, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A); + AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x19, TEXT_SPEED_FF, NULL); str = gText_MoveRelearnerAccuracy; - x = GetStringRightAlignXOffset(1, str, 0x6A); - AddTextPrinterParameterized(0, 1, str, x, 0x29, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A); + AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL); if (chosenMove == LIST_CANCEL) { CopyWindowToVram(0, 2); @@ -759,11 +759,11 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) } move = &gBattleMoves[chosenMove]; str = gTypeNames[move->type]; - AddTextPrinterParameterized(0, 1, str, 4, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x19, TEXT_SPEED_FF, NULL); - x = 4 + GetStringWidth(1, gText_MoveRelearnerPP, 0); + x = 4 + GetStringWidth(FONT_NORMAL, gText_MoveRelearnerPP, 0); ConvertIntToDecimalStringN(buffer, move->pp, STR_CONV_MODE_LEFT_ALIGN, 2); - AddTextPrinterParameterized(0, 1, buffer, x, 0x29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, buffer, x, 0x29, TEXT_SPEED_FF, NULL); if (move->power < 2) { @@ -774,7 +774,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) ConvertIntToDecimalStringN(buffer, move->power, STR_CONV_MODE_LEFT_ALIGN, 3); str = buffer; } - AddTextPrinterParameterized(0, 1, str, 0x6A, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x19, TEXT_SPEED_FF, NULL); if (move->accuracy == 0) { @@ -785,10 +785,10 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) ConvertIntToDecimalStringN(buffer, move->accuracy, STR_CONV_MODE_LEFT_ALIGN, 3); str = buffer; } - AddTextPrinterParameterized(0, 1, str, 0x6A, 0x29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SPEED_FF, NULL); str = gMoveDescriptionPointers[chosenMove - 1]; - AddTextPrinterParameterized(0, 7, str, 0, 0x41, 0, NULL); + AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL); } static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) @@ -800,16 +800,16 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) MoveRelearnerShowHideHearts(chosenMove); FillWindowPixelBuffer(1, PIXEL_FILL(1)); str = gText_MoveRelearnerContestMovesTitle; - x = GetStringCenterAlignXOffset(1, str, 0x80); - AddTextPrinterParameterized(1, 1, str, x, 1, TEXT_SPEED_FF, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80); + AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 1, TEXT_SPEED_FF, NULL); str = gText_MoveRelearnerAppeal; - x = GetStringRightAlignXOffset(1, str, 0x5C); - AddTextPrinterParameterized(1, 1, str, x, 0x19, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C); + AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x19, TEXT_SPEED_FF, NULL); str = gText_MoveRelearnerJam; - x = GetStringRightAlignXOffset(1, str, 0x5C); - AddTextPrinterParameterized(1, 1, str, x, 0x29, TEXT_SPEED_FF, NULL); + x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C); + AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL); if (chosenMove == MENU_NOTHING_CHOSEN) { @@ -819,10 +819,10 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) move = &gContestMoves[chosenMove]; str = gContestMoveTypeTextPointers[move->contestCategory]; - AddTextPrinterParameterized(1, 1, str, 4, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, str, 4, 0x19, TEXT_SPEED_FF, NULL); str = gContestEffectDescriptionPointers[move->effect]; - AddTextPrinterParameterized(1, 7, str, 0, 0x41, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NARROW, str, 0, 0x41, TEXT_SPEED_FF, NULL); CopyWindowToVram(1, 2); } @@ -842,7 +842,7 @@ void MoveRelearnerPrintText(u8 *str) FillWindowPixelBuffer(3, PIXEL_FILL(1)); gTextFlags.canABSpeedUpPrint = TRUE; speed = GetPlayerTextSpeedDelay(); - AddTextPrinterParameterized2(3, 1, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, 3); + AddTextPrinterParameterized2(3, FONT_NORMAL, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, 3); } bool16 MoveRelearnerRunTextPrinters(void) @@ -1512,7 +1512,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg { AddTextPrinterParameterized3(windowId, - 1, + FONT_NORMAL, 0, 15 * i, color, @@ -1521,7 +1521,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg StringCopy(text, (statsDiff[i] >= 0) ? gText_Plus : gText_Dash); AddTextPrinterParameterized3(windowId, - 1, + FONT_NORMAL, 56, 15 * i, color, @@ -1534,7 +1534,7 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bg ConvertIntToDecimalStringN(text, abs(statsDiff[i]), STR_CONV_MODE_LEFT_ALIGN, 2); AddTextPrinterParameterized3(windowId, - 1, + FONT_NORMAL, 56 + x, 15 * i, color, @@ -1576,7 +1576,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s x = 6 * (4 - numDigits); AddTextPrinterParameterized3(windowId, - 1, + FONT_NORMAL, 0, 15 * i, color, @@ -1584,7 +1584,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 s sLvlUpStatStrings[i]); AddTextPrinterParameterized3(windowId, - 1, + FONT_NORMAL, 56 + x, 15 * i, color, diff --git a/src/money.c b/src/money.c index 6213f2dd00..db571939a8 100644 --- a/src/money.c +++ b/src/money.c @@ -149,7 +149,7 @@ void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed) *(txtPtr++) = 0x77; StringExpandPlaceholders(txtPtr, gText_PokedollarVar1); - AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, speed, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, speed, NULL); } void PrintMoneyAmountInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount) diff --git a/src/move_relearner.c b/src/move_relearner.c index 1fa947eba5..554f84fe98 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -766,7 +766,7 @@ static void HideHeartSpritesAndShowTeachMoveText(bool8 onlyHideSprites) { StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn); FillWindowPixelBuffer(3, 0x11); - AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL); + AddTextPrinterParameterized(3, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); } } @@ -836,7 +836,7 @@ static void ShowTeachMoveText(bool8 shouldDoNothingInstead) { StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn); FillWindowPixelBuffer(3, 0x11); - AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL); + AddTextPrinterParameterized(3, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); } } diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c index 297883e9cd..0bf65a91c8 100644 --- a/src/mystery_event_menu.c +++ b/src/mystery_event_menu.c @@ -315,5 +315,5 @@ static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 sp textColor[2] = 3; FillWindowPixelBuffer(windowId, PIXEL_FILL(textColor[0])); - AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, lineSpacing, textColor, speed, text); } diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index e1236adfd3..cd12e163ce 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -235,7 +235,7 @@ static const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 0 }; @@ -280,7 +280,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveSendToss = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 0 }; @@ -301,7 +301,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveToss = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 0 }; @@ -322,7 +322,7 @@ static const struct ListMenuTemplate sListMenu_ReceiveSend = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 0 }; @@ -343,7 +343,7 @@ static const struct ListMenuTemplate sListMenu_Receive = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 0 }; @@ -490,8 +490,8 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel) options = gJPText_DecideStop; } - AddTextPrinterParameterized4(0, 1, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header); - AddTextPrinterParameterized4(0, 0, GetStringRightAlignXOffset(0, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options); + AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header); + AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options); CopyWindowToVram(0, 2); PutWindowTilemap(0); } @@ -537,7 +537,7 @@ void AddTextPrinterToWindow1(const u8 *str) { StringExpandPlaceholders(gStringVar4, str); FillWindowPixelBuffer(1, 0x11); - AddTextPrinterParameterized4(1, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); + AddTextPrinterParameterized4(1, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(1, 0x001, 0xF); PutWindowTilemap(1); CopyWindowToVram(1, 3); @@ -669,7 +669,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c else *windowId = AddWindow(&sWindowTemplate_YesNoMsg); FillWindowPixelBuffer(*windowId, 0x11); - AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); + AddTextPrinterParameterized4(*windowId, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); CopyWindowToVram(*windowId, 2); PutWindowTilemap(*windowId); @@ -726,7 +726,7 @@ static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotTos StringExpandPlaceholders(gStringVar4, gText_WhatToDoWithNews); *windowId = AddWindow(&sWindowTemplate_GiftSelect); FillWindowPixelBuffer(*windowId, 0x11); - AddTextPrinterParameterized4(*windowId, 1, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); + AddTextPrinterParameterized4(*windowId, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); CopyWindowToVram(*windowId, 2); PutWindowTilemap(*windowId); diff --git a/src/mystery_gift_view.c b/src/mystery_gift_view.c index 0e1c11520a..400367b920 100644 --- a/src/mystery_gift_view.c +++ b/src/mystery_gift_view.c @@ -424,25 +424,25 @@ static void DrawCardWindow(u8 whichWindow) { // Print card title/subtitle s32 x; - AddTextPrinterParameterized3(windowId, 3, 0, 1, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->titleText); - x = 160 - GetStringWidth(3, sWonderCardData->subtitleText, GetFontAttribute(3, FONTATTR_LETTER_SPACING)); + AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, 0, 1, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->titleText); + x = 160 - GetStringWidth(FONT_SHORT_COPY_1, sWonderCardData->subtitleText, GetFontAttribute(FONT_SHORT_COPY_1, FONTATTR_LETTER_SPACING)); if (x < 0) x = 0; - AddTextPrinterParameterized3(windowId, 3, x, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->subtitleText); + AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, x, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->subtitleText); // Print id number if (sWonderCardData->card.idNumber != 0) - AddTextPrinterParameterized3(windowId, 1, 166, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->idNumberText); + AddTextPrinterParameterized3(windowId, FONT_NORMAL, 166, 17, sCard_TextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->idNumberText); break; } case CARD_WIN_BODY: // Print body text for (; i < WONDER_CARD_BODY_TEXT_LINES; i++) - AddTextPrinterParameterized3(windowId, 3, 0, 16 * i + 2, sCard_TextColorTable[sWonderCardData->gfx->bodyTextPal], 0, sWonderCardData->bodyText[i]); + AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, 0, 16 * i + 2, sCard_TextColorTable[sWonderCardData->gfx->bodyTextPal], 0, sWonderCardData->bodyText[i]); break; case CARD_WIN_FOOTER: // Print footer line 1 - AddTextPrinterParameterized3(windowId, 3, 0, + AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, 0, sCard_FooterTextOffsets[sWonderCardData->card.type], sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->footerLine1Text); @@ -452,7 +452,7 @@ static void DrawCardWindow(u8 whichWindow) { // Print gift text // Odd that CARD_TYPE_STAMP is not ignored, it has empty text for this - AddTextPrinterParameterized3(windowId, 3, 0, + AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, 0, 16 + sCard_FooterTextOffsets[sWonderCardData->card.type], sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->giftText); @@ -461,19 +461,19 @@ static void DrawCardWindow(u8 whichWindow) { s32 x = 0; s32 y = sCard_FooterTextOffsets[sWonderCardData->card.type] + 16; - s32 spacing = GetFontAttribute(3, FONTATTR_LETTER_SPACING); + s32 spacing = GetFontAttribute(FONT_SHORT_COPY_1, FONTATTR_LETTER_SPACING); for (; i < sWonderCardData->statFooterWidth; i++) { // Print stat text - AddTextPrinterParameterized3(windowId, 3, x, y, sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->statTextData[i].statText); + AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, x, y, sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->statTextData[i].statText); if (sWonderCardData->statTextData[i].statNumberText[0] != EOS) { // Print stat number - x += GetStringWidth(3, sWonderCardData->statTextData[i].statText, spacing); - AddTextPrinterParameterized3(windowId, 3, x, y, + x += GetStringWidth(FONT_SHORT_COPY_1, sWonderCardData->statTextData[i].statText, spacing); + AddTextPrinterParameterized3(windowId, FONT_SHORT_COPY_1, x, y, sCard_TextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->statTextData[i].statNumberText); - x += GetStringWidth(3, sWonderCardData->statTextData[i].statNumberText, spacing) + sWonderCardData->statTextData[i].width; + x += GetStringWidth(FONT_SHORT_COPY_1, sWonderCardData->statTextData[i].statNumberText, spacing) + sWonderCardData->statTextData[i].width; } } } @@ -893,14 +893,14 @@ static void DrawNewsWindows(void) FillWindowPixelBuffer(sWonderNewsData->windowIds[NEWS_WIN_BODY], 0); // Print title text - x = (224 - GetStringWidth(3, sWonderNewsData->titleText, GetFontAttribute(3, FONTATTR_LETTER_SPACING))) / 2; + x = (224 - GetStringWidth(FONT_SHORT_COPY_1, sWonderNewsData->titleText, GetFontAttribute(FONT_SHORT_COPY_1, FONTATTR_LETTER_SPACING))) / 2; if (x < 0) x = 0; - AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_TITLE], 3, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText); + AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_TITLE], FONT_SHORT_COPY_1, x, 6, sNews_TextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText); // Print body text for (; i < WONDER_NEWS_BODY_TEXT_LINES; i++) - AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_BODY], 3, 0, + AddTextPrinterParameterized3(sWonderNewsData->windowIds[NEWS_WIN_BODY], FONT_SHORT_COPY_1, 0, 16 * i + 2, sNews_TextColorTable[sWonderNewsData->gfx->bodyTextPal], 0, sWonderNewsData->bodyText[i]); diff --git a/src/naming_screen.c b/src/naming_screen.c index f6558921b5..65629215ca 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -740,7 +740,7 @@ static void DisplaySentToPCMessage(void) StringExpandPlaceholders(gStringVar4, sTransferredToPCMessages[stringToDisplay]); DrawDialogueFrame(0, 0); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); CopyWindowToVram(0, 3); } @@ -1714,7 +1714,7 @@ static void HandleDpadMovement(struct Task *task) static void DrawNormalTextEntryBox(void) { FillWindowPixelBuffer(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], PIXEL_FILL(1)); - AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], 1, sNamingScreen->template->title, 8, 1, 0, 0); + AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], FONT_NORMAL, sNamingScreen->template->title, 8, 1, 0, 0); PutWindowTilemap(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX]); } @@ -1725,7 +1725,7 @@ static void DrawMonTextEntryBox(void) StringCopy(buffer, gSpeciesNames[sNamingScreen->monSpecies]); StringAppendN(buffer, sNamingScreen->template->title, 15); FillWindowPixelBuffer(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], PIXEL_FILL(1)); - AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], 1, buffer, 8, 1, 0, 0); + AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX], FONT_NORMAL, buffer, 8, 1, 0, 0); PutWindowTilemap(sNamingScreen->windows[WIN_TEXT_ENTRY_BOX]); } @@ -1781,7 +1781,7 @@ static void DrawGenderIcon(void) StringCopy(text, gText_FemaleSymbol); isFemale = TRUE; } - AddTextPrinterParameterized3(sNamingScreen->windows[WIN_TEXT_ENTRY], 1, 0x68, 1, sGenderColors[isFemale], -1, text); + AddTextPrinterParameterized3(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, 0x68, 1, sGenderColors[isFemale], -1, text); } } @@ -1921,7 +1921,7 @@ static void DrawTextEntry(void) temp[1] = gText_ExpandedPlaceholder_Empty[0]; extraWidth = (IsWideLetter(temp[0]) == TRUE) ? 2 : 0; - AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY], 1, temp, i * 8 + x + extraWidth, 1, 0xFF, NULL); + AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, temp, i * 8 + x + extraWidth, 1, 0xFF, NULL); } TryDrawGenderIcon(); @@ -1964,7 +1964,7 @@ static void PrintKeyboardKeys(u8 window, u8 page) FillWindowPixelBuffer(window, sFillValues[page]); for (i = 0; i < KBROW_COUNT; i++) - AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sKeyboardTextColors[page], 0, sNamingScreenKeyboardText[page][i]); + AddTextPrinterParameterized3(window, FONT_NORMAL, 0, i * 16 + 1, sKeyboardTextColors[page], 0, sNamingScreenKeyboardText[page][i]); PutWindowTilemap(window); } @@ -2010,7 +2010,7 @@ static void PrintControls(void) const u8 color[3] = { TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; FillWindowPixelBuffer(sNamingScreen->windows[WIN_BANNER], PIXEL_FILL(15)); - AddTextPrinterParameterized3(sNamingScreen->windows[WIN_BANNER], 0, 2, 1, color, 0, gText_MoveOkBack); + AddTextPrinterParameterized3(sNamingScreen->windows[WIN_BANNER], FONT_SMALL, 2, 1, color, 0, gText_MoveOkBack); PutWindowTilemap(sNamingScreen->windows[WIN_BANNER]); CopyWindowToVram(sNamingScreen->windows[WIN_BANNER], 3); } diff --git a/src/option_menu.c b/src/option_menu.c index 0174b69db7..d96ed1ecfa 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -400,7 +400,7 @@ static void DrawOptionMenuChoice(const u8 *text, u8 x, u8 y, u8 style) } dst[i] = EOS; - AddTextPrinterParameterized(WIN_OPTIONS, 1, dst, x, y + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, dst, x, y + 1, TEXT_SPEED_FF, NULL); } static u8 TextSpeed_ProcessInput(u8 selection) @@ -438,15 +438,15 @@ static void TextSpeed_DrawChoices(u8 selection) DrawOptionMenuChoice(gText_TextSpeedSlow, 104, YPOS_TEXTSPEED, styles[0]); - widthSlow = GetStringWidth(1, gText_TextSpeedSlow, 0); - widthMid = GetStringWidth(1, gText_TextSpeedMid, 0); - widthFast = GetStringWidth(1, gText_TextSpeedFast, 0); + widthSlow = GetStringWidth(FONT_NORMAL, gText_TextSpeedSlow, 0); + widthMid = GetStringWidth(FONT_NORMAL, gText_TextSpeedMid, 0); + widthFast = GetStringWidth(FONT_NORMAL, gText_TextSpeedFast, 0); widthMid -= 94; xMid = (widthSlow - widthMid - widthFast) / 2 + 104; DrawOptionMenuChoice(gText_TextSpeedMid, xMid, YPOS_TEXTSPEED, styles[1]); - DrawOptionMenuChoice(gText_TextSpeedFast, GetStringRightAlignXOffset(1, gText_TextSpeedFast, 198), YPOS_TEXTSPEED, styles[2]); + DrawOptionMenuChoice(gText_TextSpeedFast, GetStringRightAlignXOffset(FONT_NORMAL, gText_TextSpeedFast, 198), YPOS_TEXTSPEED, styles[2]); } static u8 BattleScene_ProcessInput(u8 selection) @@ -469,7 +469,7 @@ static void BattleScene_DrawChoices(u8 selection) styles[selection] = 1; DrawOptionMenuChoice(gText_BattleSceneOn, 104, YPOS_BATTLESCENE, styles[0]); - DrawOptionMenuChoice(gText_BattleSceneOff, GetStringRightAlignXOffset(1, gText_BattleSceneOff, 198), YPOS_BATTLESCENE, styles[1]); + DrawOptionMenuChoice(gText_BattleSceneOff, GetStringRightAlignXOffset(FONT_NORMAL, gText_BattleSceneOff, 198), YPOS_BATTLESCENE, styles[1]); } static u8 BattleStyle_ProcessInput(u8 selection) @@ -492,7 +492,7 @@ static void BattleStyle_DrawChoices(u8 selection) styles[selection] = 1; DrawOptionMenuChoice(gText_BattleStyleShift, 104, YPOS_BATTLESTYLE, styles[0]); - DrawOptionMenuChoice(gText_BattleStyleSet, GetStringRightAlignXOffset(1, gText_BattleStyleSet, 198), YPOS_BATTLESTYLE, styles[1]); + DrawOptionMenuChoice(gText_BattleStyleSet, GetStringRightAlignXOffset(FONT_NORMAL, gText_BattleStyleSet, 198), YPOS_BATTLESTYLE, styles[1]); } static u8 Sound_ProcessInput(u8 selection) @@ -516,7 +516,7 @@ static void Sound_DrawChoices(u8 selection) styles[selection] = 1; DrawOptionMenuChoice(gText_SoundMono, 104, YPOS_SOUND, styles[0]); - DrawOptionMenuChoice(gText_SoundStereo, GetStringRightAlignXOffset(1, gText_SoundStereo, 198), YPOS_SOUND, styles[1]); + DrawOptionMenuChoice(gText_SoundStereo, GetStringRightAlignXOffset(FONT_NORMAL, gText_SoundStereo, 198), YPOS_SOUND, styles[1]); } static u8 FrameType_ProcessInput(u8 selection) @@ -612,21 +612,21 @@ static void ButtonMode_DrawChoices(u8 selection) DrawOptionMenuChoice(gText_ButtonTypeNormal, 104, YPOS_BUTTONMODE, styles[0]); - widthNormal = GetStringWidth(1, gText_ButtonTypeNormal, 0); - widthLR = GetStringWidth(1, gText_ButtonTypeLR, 0); - widthLA = GetStringWidth(1, gText_ButtonTypeLEqualsA, 0); + widthNormal = GetStringWidth(FONT_NORMAL, gText_ButtonTypeNormal, 0); + widthLR = GetStringWidth(FONT_NORMAL, gText_ButtonTypeLR, 0); + widthLA = GetStringWidth(FONT_NORMAL, gText_ButtonTypeLEqualsA, 0); widthLR -= 94; xLR = (widthNormal - widthLR - widthLA) / 2 + 104; DrawOptionMenuChoice(gText_ButtonTypeLR, xLR, YPOS_BUTTONMODE, styles[1]); - DrawOptionMenuChoice(gText_ButtonTypeLEqualsA, GetStringRightAlignXOffset(1, gText_ButtonTypeLEqualsA, 198), YPOS_BUTTONMODE, styles[2]); + DrawOptionMenuChoice(gText_ButtonTypeLEqualsA, GetStringRightAlignXOffset(FONT_NORMAL, gText_ButtonTypeLEqualsA, 198), YPOS_BUTTONMODE, styles[2]); } static void DrawTextOption(void) { FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1)); - AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_TEXT_OPTION, FONT_NORMAL, gText_Option, 8, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(WIN_TEXT_OPTION, 3); } @@ -637,7 +637,7 @@ static void DrawOptionMenuTexts(void) FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1)); for (i = 0; i < MENUITEM_COUNT; i++) { - AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); } CopyWindowToVram(WIN_OPTIONS, 3); } diff --git a/src/party_menu.c b/src/party_menu.c index 95a4852db6..2074073ef0 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2035,8 +2035,8 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf) { confirmWindowId = AddWindow(&sConfirmButtonWindowTemplate); FillWindowPixelBuffer(confirmWindowId, PIXEL_FILL(0)); - mainOffset = GetStringCenterAlignXOffset(0, gMenuText_Confirm, 48); - AddTextPrinterParameterized4(confirmWindowId, 0, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); + mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gMenuText_Confirm, 48); + AddTextPrinterParameterized4(confirmWindowId, FONT_SMALL, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); PutWindowTilemap(confirmWindowId); CopyWindowToVram(confirmWindowId, 2); cancelWindowId = AddWindow(&sMultiCancelButtonWindowTemplate); @@ -2052,13 +2052,13 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf) // Branches are functionally identical. Second branch is never reached, Spin Trade wasnt fully implemented if (gPartyMenu.menuType != PARTY_MENU_TYPE_SPIN_TRADE) { - mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48); - AddTextPrinterParameterized3(cancelWindowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel); + mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel, 48); + AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel); } else { - mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel2, 48); - AddTextPrinterParameterized3(cancelWindowId, 0, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2); + mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel2, 48); + AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2); } PutWindowTilemap(cancelWindowId); CopyWindowToVram(cancelWindowId, 2); @@ -2205,7 +2205,7 @@ static void LoadPartyBoxPalette(struct PartyMenuBox *menuBox, u8 palFlags) static void DisplayPartyPokemonBarDetail(u8 windowId, const u8 *str, u8 color, const u8 *align) { - AddTextPrinterParameterized3(windowId, 0, align[0], align[1], sFontColorTable[color], 0, str); + AddTextPrinterParameterized3(windowId, FONT_SMALL, align[0], align[1], sFontColorTable[color], 0, str); } static void DisplayPartyPokemonNickname(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) @@ -2366,7 +2366,7 @@ static void DisplayPartyPokemonDescriptionText(u8 stringID, struct PartyMenuBox menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->descTextLeft >> 3, menuBox->infoRects->descTextTop >> 3, width, height, TRUE); } if (c != 2) - AddTextPrinterParameterized3(menuBox->windowId, 1, menuBox->infoRects->descTextLeft, menuBox->infoRects->descTextTop, sFontColorTable[0], 0, sDescriptionStringTable[stringID]); + AddTextPrinterParameterized3(menuBox->windowId, FONT_NORMAL, menuBox->infoRects->descTextLeft, menuBox->infoRects->descTextTop, sFontColorTable[0], 0, sDescriptionStringTable[stringID]); } static void PartyMenuRemoveWindow(u8 *ptr) @@ -2421,7 +2421,7 @@ void DisplayPartyMenuStdMessage(u32 stringId) } DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x4F, 0xD); StringExpandPlaceholders(gStringVar4, sActionStringTable[stringId]); - AddTextPrinterParameterized(*windowPtr, 1, gStringVar4, 0, 1, 0, 0); + AddTextPrinterParameterized(*windowPtr, FONT_NORMAL, gStringVar4, 0, 1, 0, 0); ScheduleBgCopyTilemapToVram(2); } } @@ -2449,7 +2449,7 @@ static u8 DisplaySelectionWindow(u8 windowType) { struct WindowTemplate window; u8 cursorDimension; - u8 fontAttribute; + u8 letterSpacing; u8 i; switch (windowType) @@ -2472,13 +2472,13 @@ static u8 DisplaySelectionWindow(u8 windowType) DrawStdFrameWithCustomTileAndPalette(sPartyMenuInternal->windowId[0], FALSE, 0x4F, 13); if (windowType == SELECTWINDOW_MOVES) return sPartyMenuInternal->windowId[0]; - cursorDimension = GetMenuCursorDimensionByFont(1, 0); - fontAttribute = GetFontAttribute(1, 2); + cursorDimension = GetMenuCursorDimensionByFont(FONT_NORMAL, 0); + letterSpacing = GetFontAttribute(FONT_NORMAL, FONTATTR_LETTER_SPACING); for (i = 0; i < sPartyMenuInternal->numActions; i++) { u8 fontColorsId = (sPartyMenuInternal->actions[i] >= MENU_FIELD_MOVES) ? 4 : 3; - AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], 1, cursorDimension, (i * 16) + 1, fontAttribute, 0, sFontColorTable[fontColorsId], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text); + AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], FONT_NORMAL, cursorDimension, (i * 16) + 1, letterSpacing, 0, sFontColorTable[fontColorsId], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text); } InitMenuInUpperLeftCorner(sPartyMenuInternal->windowId[0], sPartyMenuInternal->numActions, 0, 1); @@ -2491,7 +2491,7 @@ static void PartyMenuPrintText(const u8 *text) { DrawStdFrameWithCustomTileAndPalette(6, FALSE, 0x4F, 13); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(6, 1, text, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); + AddTextPrinterParameterized2(6, FONT_NORMAL, text, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); } static void PartyMenuDisplayYesNoMenu(void) @@ -4498,7 +4498,7 @@ static void ShowMoveSelectWindow(u8 slot) { u8 i; u8 moveCount = 0; - u8 fontId = 1; + u8 fontId = FONT_NORMAL; u8 windowId = DisplaySelectionWindow(SELECTWINDOW_MOVES); u16 move; diff --git a/src/player_pc.c b/src/player_pc.c index 3b37b02192..b83ecdaba7 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -291,7 +291,7 @@ static const struct ListMenuTemplate sListMenuTemplate_ItemStorage = .lettersSpacing = FALSE, .itemVerticalPadding = 0, .scrollMultiple = FALSE, - .fontId = 7 + .fontId = FONT_NARROW }; static const struct WindowTemplate sWindowTemplates_ItemStorage[ITEMPC_WIN_COUNT] = @@ -519,7 +519,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var) static void ItemStorageMenuPrint(const u8 *textPtr) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, textPtr, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, textPtr, 0, 1, 0, 0); } static void ItemStorageMenuProcessInput(u8 taskId) @@ -691,7 +691,7 @@ static void Mailbox_DrawMailboxMenu(u8 taskId) { u8 windowId = MailboxMenu_AddWindow(MAILBOXWIN_TITLE); MailboxMenu_AddWindow(MAILBOXWIN_LIST); - AddTextPrinterParameterized(windowId, 1, gText_Mailbox, GetStringCenterAlignXOffset(1, gText_Mailbox, 0x40), 1, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Mailbox, GetStringCenterAlignXOffset(FONT_NORMAL, gText_Mailbox, 0x40), 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].tListTaskId = MailboxMenu_CreateList(&gPlayerPCItemPageInfo); MailboxMenu_AddScrollArrows(&gPlayerPCItemPageInfo); @@ -1033,7 +1033,7 @@ static void ItemStorage_PrintMenuItem(u8 windowId, u32 id, u8 yOffset) } ConvertIntToDecimalStringN(gStringVar1, gSaveBlock1Ptr->pcItems[id].quantity, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_xVar1); - AddTextPrinterParameterized(windowId, 7, gStringVar4, GetStringRightAlignXOffset(7, gStringVar4, 104), yOffset, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NARROW, gStringVar4, GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 104), yOffset, 0xFF, NULL); } } @@ -1049,7 +1049,7 @@ static void ItemStorage_PrintDescription(s32 id) description = ItemStorage_GetMessage(MSG_GO_BACK_TO_PREV); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(windowId, 1, description, 0, 1, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, description, 0, 1, 0, NULL); } static void ItemStorage_AddScrollIndicator(void) @@ -1080,9 +1080,9 @@ static void ItemStorage_DrawSwapArrow(u8 y, u8 b, u8 speed) { u8 windowId = sItemStorageMenu->windowIds[ITEMPC_WIN_LIST]; if (b == 0xFF) - FillWindowPixelRect(windowId, PIXEL_FILL(1), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1)); + FillWindowPixelRect(windowId, PIXEL_FILL(1), 0, y, GetMenuCursorDimensionByFont(FONT_NORMAL, 0), GetMenuCursorDimensionByFont(FONT_NORMAL, 1)); else - AddTextPrinterParameterized4(windowId, 1, 0, y, 0, 0, sSwapArrowTextColors, speed, gText_SelectorArrow2); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, y, 0, 0, sSwapArrowTextColors, speed, gText_SelectorArrow2); } static void ItemStorage_DrawItemIcon(u16 itemId) @@ -1142,8 +1142,8 @@ static void ItemStorage_CreateListMenu(u8 taskId) text = gText_TossItem; if (!toss) text = gText_WithdrawItem; - x = GetStringCenterAlignXOffset(1, text, 104); - AddTextPrinterParameterized(sItemStorageMenu->windowIds[ITEMPC_WIN_TITLE], 1, text, x, 1, 0, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 104); + AddTextPrinterParameterized(sItemStorageMenu->windowIds[ITEMPC_WIN_TITLE], FONT_NORMAL, text, x, 1, 0, NULL); CopyWindowToVram(sItemStorageMenu->windowIds[ITEMPC_WIN_ICON], 2); ItemStorage_CompactList(); ItemStorage_CompactCursor(); @@ -1199,7 +1199,7 @@ static void ItemStorage_PrintMessage(const u8 *string) u8 windowId = sItemStorageMenu->windowIds[ITEMPC_WIN_MESSAGE]; FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, string); - AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); } // Process input while on the item storage's item list @@ -1338,7 +1338,7 @@ static void ItemStorage_PrintItemQuantity(u8 windowId, u16 value, u32 mode, u8 x { ConvertIntToDecimalStringN(gStringVar1, value, mode, n); StringExpandPlaceholders(gStringVar4, gText_xVar1); - AddTextPrinterParameterized(windowId, 1, gStringVar4, GetStringCenterAlignXOffset(1, gStringVar4, 48), y, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 48), y, 0, NULL); } // Start an item Withdraw/Toss diff --git a/src/pokeblock.c b/src/pokeblock.c index 89c2bc9622..30107e9d54 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -443,7 +443,7 @@ static const struct ListMenuTemplate sPokeblockListMenuTemplate = .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 1 }; @@ -696,7 +696,7 @@ static void HandleInitWindows(void) static void PrintOnPokeblockWindow(u8 windowId, const u8 *string, s32 x) { - AddTextPrinterParameterized4(windowId, 1, x, 1, 0, 0, sTextColor, 0, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, 1, 0, 0, sTextColor, 0, string); } static void DrawPokeblockMenuTitleText(void) @@ -704,7 +704,7 @@ static void DrawPokeblockMenuTitleText(void) u8 i; const u8 *itemName = ItemId_GetName(ITEM_POKEBLOCK_CASE); - PrintOnPokeblockWindow(WIN_TITLE, itemName, GetStringCenterAlignXOffset(1, itemName, 0x48)); + PrintOnPokeblockWindow(WIN_TITLE, itemName, GetStringCenterAlignXOffset(FONT_NORMAL, itemName, 0x48)); PrintOnPokeblockWindow(WIN_SPICY, gText_Spicy, 0); PrintOnPokeblockWindow(WIN_DRY, gText_Dry, 0); @@ -732,7 +732,7 @@ static void UpdatePokeblockList(void) sPokeblockMenu->items[i].id = LIST_CANCEL; gMultiuseListMenuTemplate = sPokeblockListMenuTemplate; - gMultiuseListMenuTemplate.fontId = 7; + gMultiuseListMenuTemplate.fontId = FONT_NARROW; gMultiuseListMenuTemplate.totalItems = sPokeblockMenu->itemsNo; gMultiuseListMenuTemplate.items = sPokeblockMenu->items; gMultiuseListMenuTemplate.maxShowed = sPokeblockMenu->maxShowed; @@ -1208,7 +1208,7 @@ static void PokeblockAction_Toss(u8 taskId) ClearStdWindowAndFrameToTransparent(tWindowId, FALSE); StringCopy(gStringVar1, gPokeblockNames[gSaveBlock1Ptr->pokeblocks[gSpecialVar_ItemId].color]); StringExpandPlaceholders(gStringVar4, gText_ThrowAwayVar1); - DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, 1, GetPlayerTextSpeedDelay(), gStringVar4, CreateTossPokeblockYesNoMenu); + DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, FONT_NORMAL, GetPlayerTextSpeedDelay(), gStringVar4, CreateTossPokeblockYesNoMenu); } static void CreateTossPokeblockYesNoMenu(u8 taskId) @@ -1219,7 +1219,7 @@ static void CreateTossPokeblockYesNoMenu(u8 taskId) static void TossedPokeblockMessage(u8 taskId) { StringExpandPlaceholders(gStringVar4, gText_Var1ThrownAway); - DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, 1, GetPlayerTextSpeedDelay(), gStringVar4, TossPokeblock); + DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, FONT_NORMAL, GetPlayerTextSpeedDelay(), gStringVar4, TossPokeblock); } static void TossPokeblock(u8 taskId) diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index a4395d760a..1472c514b3 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -874,7 +874,7 @@ static void Task_PrintAtePokeblockMessage(u8 taskId) StringExpandPlaceholders(gStringVar4, gText_Var1DisdainfullyAteVar2); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), NULL, 2, 1, 3); gTasks[taskId].func = Task_WaitForAtePokeblockMessage; } diff --git a/src/pokedex.c b/src/pokedex.c index d56b301833..8a85762436 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -2427,7 +2427,7 @@ static void CreateMonDexNum(u16 entryNum, u8 left, u8 top, u16 unused) text[2] = CHAR_0 + dexNum / 100; text[3] = CHAR_0 + (dexNum % 100) / 10; text[4] = CHAR_0 + (dexNum % 100) % 10; - PrintMonDexNumAndName(0, 7, text, left, top); + PrintMonDexNumAndName(0, FONT_NARROW, text, left, top); } static void CreateCaughtBall(bool16 owned, u8 x, u8 y, u16 unused) @@ -2447,7 +2447,7 @@ static u8 CreateMonName(u16 num, u8 left, u8 top) str = gSpeciesNames[num]; else str = sText_TenDashes; - PrintMonDexNumAndName(0, 7, str, left, top); + PrintMonDexNumAndName(0, FONT_NARROW, str, left, top); return StringLength(str); } @@ -3167,7 +3167,7 @@ static void PrintInfoScreenText(const u8* str, u8 left, u8 top) color[1] = TEXT_DYNAMIC_COLOR_6; color[2] = TEXT_COLOR_LIGHT_GRAY; - AddTextPrinterParameterized4(0, 1, left, top, 0, 0, color, -1, str); + AddTextPrinterParameterized4(0, FONT_NORMAL, left, top, 0, 0, color, -1, str); } #define tScrolling data[0] @@ -3752,7 +3752,7 @@ static void Task_LoadSizeScreen(u8 taskId) StringCopy(string, gText_SizeComparedTo); StringAppend(string, gSaveBlock2Ptr->playerName); - PrintInfoScreenText(string, GetStringCenterAlignXOffset(1, string, 0xF0), 0x79); + PrintInfoScreenText(string, GetStringCenterAlignXOffset(FONT_NORMAL, string, 0xF0), 0x79); gMain.state++; } break; @@ -4100,7 +4100,7 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry) const u8 *description; if (newEntry) - PrintInfoScreenText(gText_PokedexRegistration, GetStringCenterAlignXOffset(1, gText_PokedexRegistration, 0xF0), 0); + PrintInfoScreenText(gText_PokedexRegistration, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PokedexRegistration, 0xF0), 0); if (value == 0) value = NationalToHoennOrder(num); else @@ -4139,7 +4139,7 @@ static void PrintMonInfo(u32 num, u32 value, u32 owned, u32 newEntry) description = gPokedexEntries[num].description; else description = gExpandedPlaceholder_PokedexDescription; - PrintInfoScreenText(description, GetStringCenterAlignXOffset(1, description, 0xF0), 0x5F); + PrintInfoScreenText(description, GetStringCenterAlignXOffset(FONT_NORMAL, description, 0xF0), 0x5F); } static void PrintMonHeight(u16 height, u8 left, u8 top) @@ -4474,7 +4474,7 @@ static void PrintInfoSubMenuText(u8 windowId, const u8 *str, u8 left, u8 top) color[1] = TEXT_DYNAMIC_COLOR_6; color[2] = TEXT_COLOR_LIGHT_GRAY; - AddTextPrinterParameterized4(windowId, 1, left, top, 0, 0, color, -1, str); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, left, top, 0, 0, color, -1, str); } static void UnusedPrintNum(u8 windowId, u16 num, u8 left, u8 top) @@ -4781,7 +4781,7 @@ static void PrintSearchText(const u8 *str, u32 x, u32 y) color[0] = TEXT_COLOR_TRANSPARENT; color[1] = TEXT_DYNAMIC_COLOR_6; color[2] = TEXT_COLOR_DARK_GRAY; - AddTextPrinterParameterized4(0, 1, x, y, 0, 0, color, -1, str); + AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 0, 0, color, -1, str); } static void ClearSearchMenuRect(u32 x, u32 y, u32 width, u32 height) diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index ab86ee09fe..c95a86a41a 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3313,7 +3313,7 @@ static void Msg_WantToPlayAgain(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(1, 8, 20, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, gText_WantToPlayAgain2, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_WantToPlayAgain2, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); sPokemonJumpGfx->mainState++; break; @@ -3340,7 +3340,7 @@ static void Msg_SavingDontTurnOff(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 7, 26, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, gText_SavingDontTurnOffPower, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); sPokemonJumpGfx->mainState++; break; @@ -3383,7 +3383,7 @@ static void Msg_SomeoneDroppedOut(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, gText_SomeoneDroppedOut2, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SomeoneDroppedOut2, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); sPokemonJumpGfx->mainState++; break; @@ -3409,7 +3409,7 @@ static void Msg_CommunicationStandby(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(7, 10, 16, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, gText_CommunicationStandby4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_CommunicationStandby4, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); sPokemonJumpGfx->mainState++; break; @@ -3487,7 +3487,7 @@ static void PrintPrizeMessage(u16 itemId, u16 quantity) DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, sPokemonJumpGfx->itemQuantityStr); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_AwesomeWonF701F700); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); sPokemonJumpGfx->fanfare = MUS_LEVEL_UP; sPokemonJumpGfx->msgWindowState = 0; @@ -3500,7 +3500,7 @@ static void PrintPrizeFilledBagMessage(u16 itemId) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_FilledStorageSpace2); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); sPokemonJumpGfx->fanfare = MUS_DUMMY; sPokemonJumpGfx->msgWindowState = 0; @@ -3513,7 +3513,7 @@ static void PrintNoRoomForPrizeMessage(u16 itemId) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_CantHoldMore); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 9, 22, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 1, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); sPokemonJumpGfx->fanfare = MUS_DUMMY; sPokemonJumpGfx->msgWindowState = 0; @@ -3634,8 +3634,8 @@ static void PrintScoreSuffixes(void) PutWindowTilemap(WIN_TIMES); FillWindowPixelBuffer(WIN_POINTS, 0); FillWindowPixelBuffer(WIN_TIMES, 0); - AddTextPrinterParameterized3(WIN_POINTS, 0, 0, 1, color, 0, gText_SpacePoints2); - AddTextPrinterParameterized3(WIN_TIMES, 0, 0, 1, color, 0, gText_SpaceTimes3); + AddTextPrinterParameterized3(WIN_POINTS, FONT_SMALL, 0, 1, color, 0, gText_SpacePoints2); + AddTextPrinterParameterized3(WIN_TIMES, FONT_SMALL, 0, 1, color, 0, gText_SpaceTimes3); } // The venusaurs in the background are actually an empty 256x512 bg with 3 pairs of venusaurs on it. @@ -3855,9 +3855,9 @@ static void PrintPokeJumpPlayerName(int multiplayerId, u8 bgColor, u8 fgColor, u u8 colors[3] = {bgColor, fgColor, shadow}; FillWindowPixelBuffer(sPokemonJumpGfx->nameWindowIds[multiplayerId], 0); - x = 64 - GetStringWidth(1, GetPokeJumpPlayerName(multiplayerId), -1); + x = 64 - GetStringWidth(FONT_NORMAL, GetPokeJumpPlayerName(multiplayerId), -1); x /= 2; - AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], 1, x, 1, colors, -1, GetPokeJumpPlayerName(multiplayerId)); + AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_NORMAL, x, 1, colors, -1, GetPokeJumpPlayerName(multiplayerId)); CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], 2); } @@ -4162,10 +4162,10 @@ static void Task_ShowPokemonJumpRecords(u8 taskId) { case 0: window = sWindowTemplate_Records; - width = GetStringWidth(1, gText_PkmnJumpRecords, 0); + width = GetStringWidth(FONT_NORMAL, gText_PkmnJumpRecords, 0); for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++) { - widthCurr = GetStringWidth(1, sRecordsTexts[i], 0) + 38; + widthCurr = GetStringWidth(FONT_NORMAL, sRecordsTexts[i], 0) + 38; if (widthCurr > width) width = widthCurr; } @@ -4217,14 +4217,14 @@ static void PrintRecordsText(u16 windowId, int width) LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0); DrawTextBorderOuter(windowId, 0x21D, 0xD); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(windowId, 1, gText_PkmnJumpRecords, GetStringCenterAlignXOffset(1, gText_PkmnJumpRecords, width * 8), 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_PkmnJumpRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PkmnJumpRecords, width * 8), 1, TEXT_SPEED_FF, NULL); for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++) { - AddTextPrinterParameterized(windowId, 1, sRecordsTexts[i], 0, 25 + (i * 16), TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, 25 + (i * 16), TEXT_SPEED_FF, NULL); ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, 5); TruncateToFirstWordOnly(gStringVar1); - x = (width * 8) - GetStringWidth(1, gStringVar1, 0); - AddTextPrinterParameterized(windowId, 1, gStringVar1, x, 25 + (i * 16), TEXT_SPEED_FF, NULL); + x = (width * 8) - GetStringWidth(FONT_NORMAL, gStringVar1, 0); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, 25 + (i * 16), TEXT_SPEED_FF, NULL); } PutWindowTilemap(windowId); } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index e18a6db76b..61ded6a000 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1358,7 +1358,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero txtColor[0] = zero2; txtColor[1] = TEXT_DYNAMIC_COLOR_6; txtColor[2] = TEXT_DYNAMIC_COLOR_5; - AddTextPrinterParameterized4(windowId, 1, 0, 1, 0, 0, txtColor, -1, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 1, 0, 0, txtColor, -1, string); tileBytesToBuffer = bytesToBuffer; if (tileBytesToBuffer > 6u) @@ -1402,7 +1402,7 @@ static void UnusedDrawTextWindow(const u8 *string, void *dst, u16 offset, u8 bgC txtColor[0] = bgColor; txtColor[1] = fgColor; txtColor[2] = shadowColor; - AddTextPrinterParameterized4(windowId, 1, 0, 2, 0, 0, txtColor, -1, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, txtColor, -1, string); CpuCopy16(tileData1, dst, tileSize); CpuCopy16(tileData2, dst + offset, tileSize); RemoveWindow(windowId); @@ -1561,7 +1561,7 @@ static void Task_PCMainMenu(u8 taskId) LoadMessageBoxAndBorderGfx(); DrawDialogueFrame(0, 0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SPEED_FF, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SPEED_FF, NULL, 2, 1, 3); CopyWindowToVram(0, 3); CopyWindowToVram(task->tWindowId, 3); task->tState++; @@ -1585,7 +1585,7 @@ static void Task_PCMainMenu(u8 taskId) { task->tSelectedOption = task->tNextOption; FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3); } break; case MENU_B_PRESSED: @@ -1601,14 +1601,14 @@ static void Task_PCMainMenu(u8 taskId) { // Can't withdraw FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, gText_PartyFull, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_PartyFull, 0, NULL, 2, 1, 3); task->tState = STATE_ERROR_MSG; } else if (task->tInput == OPTION_DEPOSIT && CountPartyMons() == 1) { // Can't deposit FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, gText_JustOnePkmn, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_JustOnePkmn, 0, NULL, 2, 1, 3); task->tState = STATE_ERROR_MSG; } else @@ -1626,7 +1626,7 @@ static void Task_PCMainMenu(u8 taskId) if (JOY_NEW(A_BUTTON | B_BUTTON)) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3); task->tState = STATE_HANDLE_INPUT; } else if (JOY_NEW(DPAD_UP)) @@ -1636,7 +1636,7 @@ static void Task_PCMainMenu(u8 taskId) Menu_MoveCursor(-1); task->tSelectedOption = Menu_GetCursorPos(); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3); task->tState = STATE_HANDLE_INPUT; } else if (JOY_NEW(DPAD_DOWN)) @@ -1646,7 +1646,7 @@ static void Task_PCMainMenu(u8 taskId) Menu_MoveCursor(1); task->tSelectedOption = Menu_GetCursorPos(); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, 2, 1, 3); task->tState = STATE_HANDLE_INPUT; } break; @@ -1950,14 +1950,14 @@ static void ChooseBoxMenu_PrintInfo(void) FillWindowPixelBuffer(windowId, PIXEL_FILL(4)); // Print box name - center = GetStringCenterAlignXOffset(1, boxName, 64); - AddTextPrinterParameterized3(windowId, 1, center, 1, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, boxName); + center = GetStringCenterAlignXOffset(FONT_NORMAL, boxName, 64); + AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 1, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, boxName); // Print #/30 for number of Pokémon in the box ConvertIntToDecimalStringN(numBoxMonsText, numInBox, STR_CONV_MODE_RIGHT_ALIGN, 2); StringAppend(numBoxMonsText, sText_OutOf30); - center = GetStringCenterAlignXOffset(1, numBoxMonsText, 64); - AddTextPrinterParameterized3(windowId, 1, center, 17, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, numBoxMonsText); + center = GetStringCenterAlignXOffset(FONT_NORMAL, numBoxMonsText, 64); + AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 17, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, numBoxMonsText); winTileData = GetWindowAttribute(windowId, WINDOW_TILE_DATA); CpuCopy32((void *)winTileData, (void *)OBJ_VRAM0 + 0x100 + (GetSpriteTileStartByTag(sChooseBoxMenu->tileTag) * 32), 0x400); @@ -4005,17 +4005,17 @@ static void PrintDisplayMonInfo(void) FillWindowPixelBuffer(0, PIXEL_FILL(1)); if (sStorage->boxOption != OPTION_MOVE_ITEMS) { - AddTextPrinterParameterized(0, 1, sStorage->displayMonNameText, 6, 0, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, 2, sStorage->displayMonSpeciesName, 6, 15, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, 2, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, 0, sStorage->displayMonItemName, 6, 43, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 0, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 15, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 43, TEXT_SPEED_FF, NULL); } else { - AddTextPrinterParameterized(0, 0, sStorage->displayMonItemName, 6, 0, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, 1, sStorage->displayMonNameText, 6, 13, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, 2, sStorage->displayMonSpeciesName, 6, 28, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, 2, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 0, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 13, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 28, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SPEED_FF, NULL); } CopyWindowToVram(0, 2); @@ -4319,7 +4319,7 @@ static void PrintMessage(u8 id) DynamicPlaceholderTextUtil_ExpandPlaceholders(sStorage->messageText, sMessages[id].text); FillWindowPixelBuffer(1, PIXEL_FILL(1)); - AddTextPrinterParameterized(1, 1, sStorage->messageText, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SPEED_FF, NULL); DrawTextBorderOuter(1, 2, 14); PutWindowTilemap(1); CopyWindowToVram(1, 2); @@ -5635,7 +5635,7 @@ static void CycleBoxTitleColor(void) static s16 GetBoxTitleBaseX(const u8 *string) { - return DISPLAY_WIDTH - 64 - GetStringWidth(1, string, 0) / 2; + return DISPLAY_WIDTH - 64 - GetStringWidth(FONT_NORMAL, string, 0) / 2; } @@ -9203,7 +9203,7 @@ static void PrintItemDescription(void) description = ItemId_GetDescription(sStorage->displayMonItemId); FillWindowPixelBuffer(2, PIXEL_FILL(1)); - AddTextPrinterParameterized5(2, 1, description, 4, 0, 0, NULL, 0, 1); + AddTextPrinterParameterized5(2, FONT_NORMAL, description, 4, 0, 0, NULL, 0, 1); } static void InitItemInfoWindow(void) diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index f6371b088f..e0ee5974cd 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -2700,7 +2700,7 @@ static void ResetWindows(void) static void PrintTextOnWindow(u8 windowId, const u8 *string, u8 x, u8 y, u8 lineSpacing, u8 colorId) { - AddTextPrinterParameterized4(windowId, 1, x, y, 0, lineSpacing, sTextColors[colorId], 0, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, lineSpacing, sTextColors[colorId], 0, string); } static void PrintMonInfo(void) @@ -2803,21 +2803,21 @@ static void PrintPageNamesAndStats(void) PrintTextOnWindow(PSS_LABEL_WINDOW_BATTLE_MOVES_TITLE, gText_BattleMoves, 2, 1, 0, 1); PrintTextOnWindow(PSS_LABEL_WINDOW_CONTEST_MOVES_TITLE, gText_ContestMoves, 2, 1, 0, 1); - stringXPos = GetStringRightAlignXOffset(1, gText_Cancel2, 62); + stringXPos = GetStringRightAlignXOffset(FONT_NORMAL, gText_Cancel2, 62); iconXPos = stringXPos - 16; if (iconXPos < 0) iconXPos = 0; PrintAOrBButtonIcon(PSS_LABEL_WINDOW_PROMPT_CANCEL, FALSE, iconXPos); PrintTextOnWindow(PSS_LABEL_WINDOW_PROMPT_CANCEL, gText_Cancel2, stringXPos, 1, 0, 0); - stringXPos = GetStringRightAlignXOffset(1, gText_Info, 62); + stringXPos = GetStringRightAlignXOffset(FONT_NORMAL, gText_Info, 62); iconXPos = stringXPos - 16; if (iconXPos < 0) iconXPos = 0; PrintAOrBButtonIcon(PSS_LABEL_WINDOW_PROMPT_INFO, FALSE, iconXPos); PrintTextOnWindow(PSS_LABEL_WINDOW_PROMPT_INFO, gText_Info, stringXPos, 1, 0, 0); - stringXPos = GetStringRightAlignXOffset(1, gText_Switch, 62); + stringXPos = GetStringRightAlignXOffset(FONT_NORMAL, gText_Switch, 62); iconXPos = stringXPos - 16; if (iconXPos < 0) iconXPos = 0; @@ -2826,17 +2826,17 @@ static void PrintPageNamesAndStats(void) PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_INFO_RENTAL, gText_RentalPkmn, 0, 1, 0, 1); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_INFO_TYPE, gText_TypeSlash, 0, 1, 0, 0); - statsXPos = 6 + GetStringCenterAlignXOffset(1, gText_HP4, 42); + statsXPos = 6 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_HP4, 42); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_LEFT, gText_HP4, statsXPos, 1, 0, 1); - statsXPos = 6 + GetStringCenterAlignXOffset(1, gText_Attack3, 42); + statsXPos = 6 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_Attack3, 42); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_LEFT, gText_Attack3, statsXPos, 17, 0, 1); - statsXPos = 6 + GetStringCenterAlignXOffset(1, gText_Defense3, 42); + statsXPos = 6 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_Defense3, 42); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_LEFT, gText_Defense3, statsXPos, 33, 0, 1); - statsXPos = 2 + GetStringCenterAlignXOffset(1, gText_SpAtk4, 36); + statsXPos = 2 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_SpAtk4, 36); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_RIGHT, gText_SpAtk4, statsXPos, 1, 0, 1); - statsXPos = 2 + GetStringCenterAlignXOffset(1, gText_SpDef4, 36); + statsXPos = 2 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_SpDef4, 36); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_RIGHT, gText_SpDef4, statsXPos, 17, 0, 1); - statsXPos = 2 + GetStringCenterAlignXOffset(1, gText_Speed2, 36); + statsXPos = 2 + GetStringCenterAlignXOffset(FONT_NORMAL, gText_Speed2, 36); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATS_RIGHT, gText_Speed2, statsXPos, 33, 0, 1); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_EXP, gText_ExpPoints, 6, 1, 0, 1); PrintTextOnWindow(PSS_LABEL_WINDOW_POKEMON_SKILLS_EXP, gText_NextLv, 6, 17, 0, 1); @@ -3045,7 +3045,7 @@ static void PrintMonOTName(void) { windowId = AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ORIGINAL_TRAINER); PrintTextOnWindow(windowId, gText_OTSlash, 0, 1, 0, 1); - x = GetStringWidth(1, gText_OTSlash, 0); + x = GetStringWidth(FONT_NORMAL, gText_OTSlash, 0); if (sMonSummaryScreen->summary.OTGender == 0) PrintTextOnWindow(windowId, sMonSummaryScreen->summary.OTName, x, 1, 0, 5); else @@ -3059,7 +3059,7 @@ static void PrintMonOTID(void) if (InBattleFactory() != TRUE && InSlateportBattleTent() != TRUE) { ConvertIntToDecimalStringN(StringCopy(gStringVar1, gText_IDNumber2), (u16)sMonSummaryScreen->summary.OTID, STR_CONV_MODE_LEADING_ZEROS, 5); - xPos = GetStringRightAlignXOffset(1, gStringVar1, 56); + xPos = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar1, 56); PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ID), gStringVar1, xPos, 1, 0, 1); } } @@ -3204,7 +3204,7 @@ static bool8 IsInGamePartnerMon(void) static void PrintEggOTName(void) { u32 windowId = AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ORIGINAL_TRAINER); - u32 width = GetStringWidth(1, gText_OTSlash, 0); + u32 width = GetStringWidth(FONT_NORMAL, gText_OTSlash, 0); PrintTextOnWindow(windowId, gText_OTSlash, 0, 1, 0, 1); PrintTextOnWindow(windowId, gText_FiveMarks, width, 1, 0, 1); } @@ -3214,7 +3214,7 @@ static void PrintEggOTID(void) int x; StringCopy(gStringVar1, gText_IDNumber2); StringAppend(gStringVar1, gText_FiveMarks); - x = GetStringRightAlignXOffset(1, gStringVar1, 56); + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar1, 56); PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ID), gStringVar1, x, 1, 0, 1); } @@ -3327,7 +3327,7 @@ static void PrintHeldItemName(void) text = gStringVar1; } - x = GetStringCenterAlignXOffset(1, text, 72) + 6; + x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 72) + 6; PrintTextOnWindow(AddWindowFromTemplateList(sPageSkillsTemplate, PSS_DATA_WINDOW_SKILLS_HELD_ITEM), text, x, 1, 0, 0); } @@ -3347,7 +3347,7 @@ static void PrintRibbonCount(void) text = gStringVar4; } - x = GetStringCenterAlignXOffset(1, text, 70) + 6; + x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 70) + 6; PrintTextOnWindow(AddWindowFromTemplateList(sPageSkillsTemplate, PSS_DATA_WINDOW_SKILLS_RIBBON_COUNT), text, x, 1, 0, 0); } @@ -3407,7 +3407,7 @@ static void PrintExpPointsNextLevel(void) u32 expToNextLevel; ConvertIntToDecimalStringN(gStringVar1, sum->exp, STR_CONV_MODE_RIGHT_ALIGN, 7); - x = GetStringRightAlignXOffset(1, gStringVar1, 42) + 2; + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar1, 42) + 2; PrintTextOnWindow(windowId, gStringVar1, x, 1, 0, 0); if (sum->level < MAX_LEVEL) @@ -3416,7 +3416,7 @@ static void PrintExpPointsNextLevel(void) expToNextLevel = 0; ConvertIntToDecimalStringN(gStringVar1, expToNextLevel, STR_CONV_MODE_RIGHT_ALIGN, 6); - x = GetStringRightAlignXOffset(1, gStringVar1, 42) + 2; + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar1, 42) + 2; PrintTextOnWindow(windowId, gStringVar1, x, 17, 0, 0); } @@ -3509,14 +3509,14 @@ static void PrintMoveNameAndPP(u8 moveIndex) DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, sMovesPPLayout); text = gStringVar4; ppState = GetCurrentPpToMaxPpState(summary->pp[moveIndex], pp) + 9; - x = GetStringRightAlignXOffset(1, text, 44); + x = GetStringRightAlignXOffset(FONT_NORMAL, text, 44); } else { PrintTextOnWindow(moveNameWindowId, gText_OneDash, 0, moveIndex * 16 + 1, 0, 1); text = gText_TwoDashes; ppState = 12; - x = GetStringCenterAlignXOffset(1, text, 44); + x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 44); } PrintTextOnWindow(ppValueWindowId, text, x, moveIndex * 16 + 1, 0, ppState); @@ -3669,7 +3669,7 @@ static void PrintNewMoveDetailsOrCancelText(void) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, gStringVar1); DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, sMovesPPLayout); - PrintTextOnWindow(windowId2, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 44), 65, 0, 12); + PrintTextOnWindow(windowId2, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 44), 65, 0, 12); } } diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index ef3792063f..089a56e263 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -572,23 +572,23 @@ bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode) if (GetConditionGraphCurrentMonIndex() != GetMonListCount() - 1 || IsConditionMenuSearchMode() == TRUE) { str = GetConditionMonNameBuffer(bufferIndex); - AddTextPrinterParameterized(structPtr->nameGenderWindowId, 1, str, 0, 1, 0, NULL); + AddTextPrinterParameterized(structPtr->nameGenderWindowId, FONT_NORMAL, str, 0, 1, 0, NULL); } break; case 2: if (IsConditionMenuSearchMode() == TRUE) { str = GetConditionMonLocationBuffer(bufferIndex); - AddTextPrinterParameterized(structPtr->nameGenderWindowId, 1, str, 0, 17, 0, NULL); + AddTextPrinterParameterized(structPtr->nameGenderWindowId, FONT_NORMAL, str, 0, 17, 0, NULL); text[0] = EXT_CTRL_CODE_BEGIN; text[1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; text[2] = TEXT_COLOR_BLUE; text[3] = TEXT_COLOR_TRANSPARENT; text[4] = TEXT_COLOR_LIGHT_BLUE; StringCopy(text + 5, gText_Number2); - AddTextPrinterParameterized(structPtr->listIndexWindowId, 1, text, 4, 1, 0, NULL); + AddTextPrinterParameterized(structPtr->listIndexWindowId, FONT_NORMAL, text, 4, 1, 0, NULL); ConvertIntToDecimalStringN(text + 5, GetConditionMonDataBuffer(), STR_CONV_MODE_RIGHT_ALIGN, 4); - AddTextPrinterParameterized(structPtr->listIndexWindowId, 1, text, 28, 1, 0, NULL); + AddTextPrinterParameterized(structPtr->listIndexWindowId, FONT_NORMAL, text, 28, 1, 0, NULL); } break; case 3: diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 53987d11dd..0e5a9b7853 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -655,9 +655,9 @@ static void PrintSearchResultListMenuItems(struct PokenavSub8 *searchList) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); *gStringVar1 = EOS; DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar2, gText_NumberF700); - AddTextPrinterParameterized(searchList->winid, 1, gStringVar2, 4, 1, 0xFF, NULL); + AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar2, 4, 1, 0xFF, NULL); ConvertIntToDecimalStringN(gStringVar1, r7, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized(searchList->winid, 1, gStringVar1, 34, 1, 0xFF, NULL); + AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar1, 34, 1, 0xFF, NULL); CopyWindowToVram(searchList->winid, 2); } @@ -674,7 +674,7 @@ static void InitConditionSearchListMenuTemplate(void) template.listTop = 1; template.maxShowed = 8; template.fillValue = 2; - template.fontId = 1; + template.fontId = FONT_NORMAL; template.listFunc.printMonFunc = PrintSearchMonListItem; template.unk14 = NULL; sub_81C81D4(&sConditionSearchResultBgTemplates[1], &template, 0); @@ -705,7 +705,7 @@ static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest) } StringGetEnd10(gStringVar3); - dest = GetStringClearToWidth(dest, 1, gStringVar3, 60); + dest = GetStringClearToWidth(dest, FONT_NORMAL, gStringVar3, 60); switch (gender) { default: @@ -723,5 +723,5 @@ static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest) *s++ = CHAR_EXTRA_SYMBOL; *s++ = CHAR_LV_2; ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); - GetStringClearToWidth(dest, 1, gStringVar1, 40); + GetStringClearToWidth(dest, FONT_NORMAL, gStringVar1, 40); } diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index 88c1773a6d..0166cc10c9 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -563,7 +563,7 @@ void PrintHelpBarText(u32 textId) struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); DrawHelpBar(structPtr->helpBarWindowId); - AddTextPrinterParameterized3(structPtr->helpBarWindowId, 1, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[textId]); + AddTextPrinterParameterized3(structPtr->helpBarWindowId, FONT_NORMAL, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[textId]); } bool32 WaitForHelpBar(void) diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index 64957995d5..5612ba6cb4 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -413,12 +413,12 @@ void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries *matchCallEntry, if (className && trainerName) { - u8 *str2 = GetStringClearToWidth(str, 7, className, 69); - GetStringClearToWidth(str2, 7, trainerName, 51); + u8 *str2 = GetStringClearToWidth(str, FONT_NARROW, className, 69); + GetStringClearToWidth(str2, FONT_NARROW, trainerName, 51); } else { - GetStringClearToWidth(str, 7, NULL, 120); + GetStringClearToWidth(str, FONT_NARROW, NULL, 120); } } diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index e3f0bb6efc..727aa36940 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -874,7 +874,7 @@ static void InitMatchCallPokenavListMenuTemplate(void) template.listTop = 1; template.maxShowed = 8; template.fillValue = 3; - template.fontId = 7; + template.fontId = FONT_NARROW; template.listFunc.unk10_2 = BufferMatchCallNameAndDesc; template.unk14 = TryDrawRematchPokeballIcon; sub_81C81D4(&sMatchCallBgTemplates[2], &template, 2); @@ -986,14 +986,14 @@ static void PrintNumberOfBattles(u16 windowId) static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top) { int y = top * 16 + 1; - AddTextPrinterParameterized(windowId, 7, str, 2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NARROW, str, 2, y, TEXT_SPEED_FF, NULL); } static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top) { - int x = GetStringRightAlignXOffset(7, str, 86); + int x = GetStringRightAlignXOffset(FONT_NARROW, str, 86); int y = top * 16 + 1; - AddTextPrinterParameterized(windowId, 7, str, x, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NARROW, str, x, y, TEXT_SPEED_FF, NULL); } static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1) @@ -1007,9 +1007,9 @@ static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1) else StringCopy(mapName, gText_Unknown); - x = GetStringCenterAlignXOffset(7, mapName, 88); + x = GetStringCenterAlignXOffset(FONT_NARROW, mapName, 88); FillWindowPixelBuffer(state->locWindowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(state->locWindowId, 7, mapName, x, 1, 0, NULL); + AddTextPrinterParameterized(state->locWindowId, FONT_NARROW, mapName, x, 1, 0, NULL); } static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state) @@ -1023,7 +1023,7 @@ static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state) if (optionText == MATCH_CALL_OPTION_COUNT) break; - AddTextPrinterParameterized(state->infoBoxWindowId, 7, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); } CopyWindowToVram(state->infoBoxWindowId, 2); @@ -1095,7 +1095,7 @@ static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav4Struct *state) static void PrintCallingDots(struct Pokenav4Struct *state) { - AddTextPrinterParameterized(state->msgBoxWindowId, 1, sText_CallingDots, 32, 1, 1, NULL); + AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, sText_CallingDots, 32, 1, 1, NULL); } static bool32 WaitForCallingDotsText(struct Pokenav4Struct *state) @@ -1106,7 +1106,7 @@ static bool32 WaitForCallingDotsText(struct Pokenav4Struct *state) static void PrintTrainerIsCloseBy(struct Pokenav4Struct *state) { - AddTextPrinterParameterized(state->msgBoxWindowId, 1, gText_TrainerCloseBy, 0, 1, 1, NULL); + AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, gText_TrainerCloseBy, 0, 1, 1, NULL); } static bool32 WaitForTrainerIsCloseByText(struct Pokenav4Struct *state) @@ -1120,7 +1120,7 @@ static void PrintMatchCallMessage(struct Pokenav4Struct *state) int index = GetSelectedPokenavListIndex(); const u8 *str = GetMatchCallMessageText(index, &state->unkF); u8 speed = GetPlayerTextSpeedDelay(); - AddTextPrinterParameterized(state->msgBoxWindowId, 1, str, 32, 1, speed, NULL); + AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, str, 32, 1, speed, NULL); } static bool32 WaitForMatchCallMessageText(struct Pokenav4Struct *state) diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index ba495245b6..dc3be81813 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -734,7 +734,7 @@ void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId) u32 top = (list->listWindow.unkA + 1 + (fieldId * 2)) & 0xF; FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.unk4, 16); - AddTextPrinterParameterized3(list->listWindow.windowId, 7, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]); + AddTextPrinterParameterized3(list->listWindow.windowId, FONT_NARROW, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]); CopyWindowRectToVram(list->listWindow.windowId, 2, 0, top << 1, list->listWindow.unk4, 2); } @@ -755,7 +755,7 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok if (str != NULL) { sub_81DB620(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2); - AddTextPrinterParameterized(list->listWindow.windowId, 7, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL); CopyWindowRectToVram(list->listWindow.windowId, 2, 0, r6 * 2, list->listWindow.unk4, 2); } } diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index 5f6c4460a4..ded4c70077 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -1133,9 +1133,9 @@ static void PrintCurrentOptionDescription(void) struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); int menuItem = GetCurrentMenuItemId(); const u8 * s = sPageDescriptions[menuItem]; - u32 width = GetStringWidth(1, s, -1); + u32 width = GetStringWidth(FONT_NORMAL, s, -1); FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6)); - AddTextPrinterParameterized3(ptr->optionDescWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors, 0, s); + AddTextPrinterParameterized3(ptr->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors, 0, s); } // Printed when Ribbons is selected if no PC/party mons have ribbons @@ -1144,9 +1144,9 @@ static void PrintNoRibbonWinners(void) { struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); const u8 * s = gText_NoRibbonWinners; - u32 width = GetStringWidth(1, s, -1); + u32 width = GetStringWidth(FONT_NORMAL, s, -1); FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6)); - AddTextPrinterParameterized3(ptr->optionDescWindowId, 1, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s); + AddTextPrinterParameterized3(ptr->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s); } static bool32 IsDma3ManagerBusyWithBgCopy_(void) diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 13a7030da2..07788a5d30 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -535,7 +535,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) case MAPSECTYPE_CITY_CANFLY: FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2); - AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); DrawCityMap(state, regionMap->mapSecId, regionMap->posWithinMapSec); CopyWindowToVram(state->infoWindowId, 3); SetCityZoomTextInvisibility(FALSE); @@ -543,7 +543,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) case MAPSECTYPE_CITY_CANTFLY: FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2); - AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); FillBgTilemapBufferRect(1, 0x1041, 17, 6, 12, 11, 17); CopyWindowToVram(state->infoWindowId, 3); SetCityZoomTextInvisibility(TRUE); @@ -552,7 +552,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) case MAPSECTYPE_BATTLE_FRONTIER: FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); PutWindowTilemap(state->infoWindowId); - AddTextPrinterParameterized(state->infoWindowId, 7, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); PrintLandmarkNames(state, regionMap->mapSecId, regionMap->posWithinMapSec); CopyWindowToVram(state->infoWindowId, 3); SetCityZoomTextInvisibility(TRUE); @@ -654,7 +654,7 @@ static void PrintLandmarkNames(struct Pokenav5Struct_2 *state, int mapSecId, int break; StringCopyPadded(gStringVar1, landmarkName, CHAR_SPACE, 12); - AddTextPrinterParameterized(state->infoWindowId, 7, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL); i++; } } diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c index a8aaafa354..3d8611a4a4 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_1.c @@ -673,8 +673,8 @@ static void sub_81D02B0(s32 windowId, s32 val1, s32 val2) ptr = ConvertIntToDecimalStringN(ptr, val1, STR_CONV_MODE_RIGHT_ALIGN, 3); *ptr++ = CHAR_SLASH; ConvertIntToDecimalStringN(ptr, val2, STR_CONV_MODE_RIGHT_ALIGN, 3); - x = GetStringCenterAlignXOffset(1, strbuf, 56); - AddTextPrinterParameterized(windowId, 1, strbuf, x, 1, 0xFF, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, strbuf, 56); + AddTextPrinterParameterized(windowId, FONT_NORMAL, strbuf, x, 1, 0xFF, NULL); } static void InitMonRibbonPokenavListMenuTemplate(void) @@ -689,7 +689,7 @@ static void InitMonRibbonPokenavListMenuTemplate(void) template.listTop = 1; template.maxShowed = 8; template.fillValue = 2; - template.fontId = 1; + template.fontId = FONT_NORMAL; template.listFunc.printMonFunc = BufferRibbonMonInfoText; template.unk14 = NULL; sub_81C81D4(&sMonRibbonListBgTemplates[1], &template, 0); @@ -722,7 +722,7 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest) } StringGetEnd10(gStringVar3); - dest = GetStringClearToWidth(dest, 1, gStringVar3, 60); + dest = GetStringClearToWidth(dest, FONT_NORMAL, gStringVar3, 60); switch (gender) { default: @@ -741,6 +741,6 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest) *s++ = CHAR_EXTRA_SYMBOL; *s++ = CHAR_LV_2; ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); - dest = GetStringClearToWidth(dest, 1, gStringVar1, 54); + dest = GetStringClearToWidth(dest, FONT_NORMAL, gStringVar1, 54); ConvertIntToDecimalStringN(dest, item->data, STR_CONV_MODE_RIGHT_ALIGN, 2); } diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index bf1886ed00..75d9f5bd00 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -809,7 +809,7 @@ static void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700); FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4)); - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, 1, color, -1, gStringVar4); + AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, -1, gStringVar4); CopyWindowToVram(structPtr->ribbonCountWindowId, 2); } @@ -824,7 +824,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) { // Print normal ribbon name/description for (i = 0; i < 2; i++) - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]); + AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]); } else { @@ -840,7 +840,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) // Print gift ribbon name/description ribbonId--; for (i = 0; i < 2; i++) - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, 1, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]); + AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]); } CopyWindowToVram(structPtr->ribbonCountWindowId, 2); @@ -877,7 +877,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); GetMonNicknameLevelGender(gStringVar3, &level, &gender); - AddTextPrinterParameterized(windowId, 1, gStringVar3, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar3, 0, 1, TEXT_SPEED_FF, NULL); switch (gender) { case MON_MALE: @@ -896,7 +896,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr) *(txtPtr++) = CHAR_EXTRA_SYMBOL; *(txtPtr++) = CHAR_LV_2; ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized(windowId, 1, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(windowId, 2); } @@ -932,8 +932,8 @@ static void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr) txtPtr = ConvertIntToDecimalStringN(gStringVar1, id, STR_CONV_MODE_RIGHT_ALIGN, 3); *(txtPtr++) = CHAR_SLASH; ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3); - x = GetStringCenterAlignXOffset(1, gStringVar1, 56); - AddTextPrinterParameterized(structPtr->listIdxWindowId, 1, gStringVar1, x, 1, TEXT_SPEED_FF, NULL); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar1, 56); + AddTextPrinterParameterized(structPtr->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(structPtr->listIdxWindowId, 2); } diff --git a/src/record_mixing.c b/src/record_mixing.c index 7ffe6680f5..2197d85421 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -286,7 +286,7 @@ static void ReceiveExchangePacket(u32 multiplayerId) static void PrintTextOnRecordMixing(const u8 *src) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, src, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, src, 0, 1, 0, NULL); CopyWindowToVram(0, 3); } diff --git a/src/region_map.c b/src/region_map.c index 4e547b5fb3..46539205b4 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1718,7 +1718,7 @@ void CB2_OpenFlyMap(void) LoadPalette(sRegionMapFramePal, 0x10, 0x20); PutWindowTilemap(2); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized(2, 1, gText_FlyToWhere, 0, 1, 0, NULL); + AddTextPrinterParameterized(2, FONT_NORMAL, gText_FlyToWhere, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); gMain.state++; break; @@ -1784,9 +1784,9 @@ static void DrawFlyDestTextWindow(void) namePrinted = TRUE; ClearStdWindowAndFrameToTransparent(0, FALSE); DrawStdFrameWithCustomTileAndPalette(1, FALSE, 101, 13); - AddTextPrinterParameterized(1, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); name = sMultiNameFlyDestinations[i].name[sFlyMap->regionMap.posWithinMapSec]; - AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 96), 17, 0, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, name, GetStringRightAlignXOffset(FONT_NORMAL, name, 96), 17, 0, NULL); ScheduleBgCopyTilemapToVram(0); sDrawFlyDestTextWindow = TRUE; } @@ -1805,7 +1805,7 @@ static void DrawFlyDestTextWindow(void) // Window is already drawn, just empty it FillWindowPixelBuffer(0, PIXEL_FILL(1)); } - AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); sDrawFlyDestTextWindow = FALSE; } diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index 5e6fcd4361..5fe1a6013b 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -381,14 +381,14 @@ static void PrintTime(u8 windowId, u8 x, u8 y, u16 days, u8 hours, u8 minutes, u ConvertIntToDecimalStringN(gStringVar1, seconds, STR_CONV_MODE_LEADING_ZEROS, 2); dest = StringCopy(dest, gStringVar1); - AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, TEXT_SPEED_FF, NULL); } static void ShowChooseTimeWindow(u8 windowId, u16 days, u8 hours, u8 minutes, u8 seconds) { DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, 0x214, 0xE); PrintTime(windowId, 0, 1, days, hours, minutes, seconds); - AddTextPrinterParameterized(windowId, 1, gText_Confirm2, 126, 1, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Confirm2, 126, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); } @@ -563,7 +563,7 @@ static void VBlankCB(void) static void ShowMessage(const u8 *str) { DrawDialogFrameWithCustomTileAndPalette(1, FALSE, 0x200, 0xF); - AddTextPrinterParameterized(1, 1, str, 0, 1, 0, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, str, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); } @@ -578,7 +578,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId) case 0: DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x214, 0xE); - AddTextPrinterParameterized(0, 1, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0); PrintTime( 0, 0, @@ -588,7 +588,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId) gLocalTime.minutes, gLocalTime.seconds); - AddTextPrinterParameterized(0, 1, gText_PreviousTime, 0, 33, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_PreviousTime, 0, 33, TEXT_SPEED_FF, 0); PrintTime( 0, 0, diff --git a/src/roulette.c b/src/roulette.c index b6ef1168b2..29a8f779ad 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -1223,7 +1223,7 @@ static void CB2_LoadRoulette(void) SetMultiplierSprite(SELECTION_NONE); DrawGridBackground(SELECTION_NONE); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); gSpriteCoordOffsetX = -60; gSpriteCoordOffsetY = 0; @@ -1294,7 +1294,7 @@ static void Task_AskKeepPlaying(u8 taskId) { DisplayYesNoMenuDefaultYes(); DrawStdWindowFrame(sTextWindowId, 0); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_KeepPlaying, 0, 1, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SPEED_FF, 0); CopyWindowToVram(sTextWindowId, 3); DoYesNoFuncWithChoice(taskId, &sYesNoTable_KeepPlaying); } @@ -1806,14 +1806,14 @@ static void Task_PrintSpinResult(u8 taskId) { PlayFanfare(MUS_SLOTS_JACKPOT); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_Jackpot, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_Jackpot, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); } else { PlayFanfare(MUS_SLOTS_WIN); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_ItsAHit, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ItsAHit, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); } break; @@ -1821,7 +1821,7 @@ static void Task_PrintSpinResult(u8 taskId) default: m4aSongNumStart(SE_FAILURE); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_NothingDoing, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NothingDoing, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); break; } @@ -1866,7 +1866,7 @@ static void Task_PrintPayout(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, (sRoulette->minBet * gTasks[taskId].tMultiplier), STR_CONV_MODE_LEFT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, Roulette_Text_YouveWonXCoins); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); gTasks[taskId].tPayout = (sRoulette->minBet * gTasks[taskId].tMultiplier); gTasks[taskId].data[7] = 0; @@ -1902,7 +1902,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) { // Reached Ball 6, clear board DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); StartTaskAfterDelayOrInput(taskId, Task_ClearBoard, NO_DELAY, A_BUTTON | B_BUTTON); } @@ -1910,7 +1910,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) { // Player maxed out coins DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON); } @@ -1924,7 +1924,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) { // Player out of coins DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); StartTaskAfterDelayOrInput(taskId, Task_StopPlaying, 60, A_BUTTON | B_BUTTON); } @@ -1949,7 +1949,7 @@ static void Task_ClearBoard(u8 taskId) if (gTasks[taskId].tCoins == MAX_COINS) { DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, 1, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(sTextWindowId, 3); StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON); } @@ -3426,7 +3426,7 @@ static void Task_PrintMinBet(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, minBet, STR_CONV_MODE_LEADING_ZEROS, 1); StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX); DrawStdWindowFrame(0, FALSE); - AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_ShowMinBetYesNo; } @@ -3445,7 +3445,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) { // Special rate for Game Corner service day (only at second table) DrawStdWindowFrame(0, FALSE); - AddTextPrinterParameterized(0, 1, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_PrintMinBet; } @@ -3454,7 +3454,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) // Print minimum bet StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX); DrawStdWindowFrame(0, FALSE); - AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_ShowMinBetYesNo; } @@ -3464,7 +3464,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) // Not enough for minimum bet StringExpandPlaceholders(gStringVar4, Roulette_Text_NotEnoughCoins); DrawStdWindowFrame(0, FALSE); - AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(0, 3); gTasks[taskId].func = Task_NotEnoughForMinBet; gTasks[taskId].tCoins = 0; diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 8f727310cd..9dff99bc12 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -153,7 +153,7 @@ static void SaveFailedScreenTextPrint(const u8 *text, u8 x, u8 y) color[0] = TEXT_COLOR_TRANSPARENT; color[1] = TEXT_DYNAMIC_COLOR_6; color[2] = TEXT_COLOR_LIGHT_GRAY; - AddTextPrinterParameterized4(sWindowIds[TEXT_WIN_ID], 1, x * 8, y * 8 + 1, 0, 0, color, 0, text); + AddTextPrinterParameterized4(sWindowIds[TEXT_WIN_ID], FONT_NORMAL, x * 8, y * 8 + 1, 0, 0, color, 0, text); } void DoSaveFailedScreen(u8 saveType) diff --git a/src/scrcmd.c b/src/scrcmd.c index 3e3beee59c..a6223bdf51 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1310,7 +1310,7 @@ bool8 ScrCmd_messageinstant(struct ScriptContext *ctx) msg = (const u8 *)ctx->data[0]; LoadMessageBoxAndBorderGfx(); DrawDialogueFrame(0, 1); - AddTextPrinterParameterized(0, 1, msg, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, msg, 0, 1, 0, 0); return FALSE; } @@ -1497,7 +1497,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) // in Emerald they are unused and position is calculated below instead StringExpandPlaceholders(gStringVar4, ptr + 6); - width = GetStringWidth(6, gStringVar4, -1) / 8u; + width = GetStringWidth(FONT_BRAILLE, gStringVar4, -1) / 8u; if (width > 28) width = 28; @@ -1532,7 +1532,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) DrawStdWindowFrame(gBrailleWindowId, 0); PutWindowTilemap(gBrailleWindowId); FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(gBrailleWindowId, 6, gStringVar4, xText, yText, 0xFF, 0x0); + AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, 0xFF, 0x0); CopyWindowToVram(gBrailleWindowId, 3); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c index f3317773af..f0dccd9f98 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -353,22 +353,22 @@ static void CreatePCMultichoice(void) numChoices = 4; windowId = CreateWindowFromRect(0, 0, width, 8); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, 1, gText_HallOfFame, y, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_LogOff, y, 49, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SPEED_FF, NULL); } else { numChoices = 3; windowId = CreateWindowFromRect(0, 0, width, 6); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, 1, gText_LogOff, y, 33, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SPEED_FF, NULL); } // Change PC name if player has met Lanette if (FlagGet(FLAG_SYS_PC_LANETTE)) - AddTextPrinterParameterized(windowId, 1, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL); else - AddTextPrinterParameterized(windowId, 1, gText_SomeonesPC, y, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeonesPC, y, 1, TEXT_SPEED_FF, NULL); StringExpandPlaceholders(gStringVar4, gText_PlayersPC); PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17); @@ -380,7 +380,7 @@ static void CreatePCMultichoice(void) void ScriptMenu_DisplayPCStartupPrompt(void) { sub_819786C(0, TRUE); - AddTextPrinterParameterized2(0, 1, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3); } bool8 ScriptMenu_CreateLilycoveSSTidalMultichoice(void) @@ -414,7 +414,7 @@ static void CreateLilycoveSSTidalMultichoice(void) sLilycoveSSTidalSelections[i] = 0xFF; } - GetFontAttribute(1, FONTATTR_MAX_LETTER_WIDTH); + GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_WIDTH); if (gSpecialVar_0x8004 == 0) { @@ -527,7 +527,7 @@ static void CreateLilycoveSSTidalMultichoice(void) { if (sLilycoveSSTidalSelections[i] != 0xFF) { - AddTextPrinterParameterized(windowId, 1, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SPEED_FF, NULL); selectionCount++; } } @@ -645,27 +645,27 @@ static void DrawLinkServicesMultichoiceMenu(u8 multichoiceId) { case MULTI_WIRELESS_NO_BERRY: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sWirelessOptionsNoBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptionsNoBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_CABLE_CLUB_WITH_RECORD_MIX: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sCableClubOptions_WithRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sCableClubOptions_WithRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_WIRELESS_NO_RECORD: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sWirelessOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_WIRELESS_ALL_SERVICES: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sWirelessOptions_AllServices[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_AllServices[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_WIRELESS_NO_RECORD_BERRY: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sWirelessOptions_NoRecordMixBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sWirelessOptions_NoRecordMixBerryCrush[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; case MULTI_CABLE_CLUB_NO_RECORD_MIX: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 1, sCableClubOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sCableClubOptions_NoRecordMix[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); break; } } @@ -688,15 +688,15 @@ static void CreateStartMenuForPokenavTutorial(void) { u8 windowId = CreateWindowFromRect(21, 0, 7, 18); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokedex, 8, 9, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokemon, 8, 25, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionBag, 8, 41, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionPokenav, 8, 57, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, 1, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL); - sub_81983AC(windowId, 1, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokenav, 8, 57, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL); + sub_81983AC(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0); InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU); CopyWindowToVram(windowId, 3); } @@ -727,7 +727,7 @@ static int DisplayTextAndGetWidthInternal(const u8 *str) { u8 temp[64]; StringExpandPlaceholders(temp, str); - return GetStringWidth(1, temp, 0); + return GetStringWidth(FONT_NORMAL, temp, 0); } int DisplayTextAndGetWidth(const u8 *str, int prevWidth) diff --git a/src/secret_base.c b/src/secret_base.c index e728f34884..12f6df5ab5 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -214,7 +214,7 @@ static const struct ListMenuTemplate sRegistryListMenuTemplate = .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 1, + .fontId = FONT_NORMAL, .cursorKind = 0, }; diff --git a/src/shop.c b/src/shop.c index f4e3fa2d86..817146d785 100755 --- a/src/shop.c +++ b/src/shop.c @@ -152,7 +152,7 @@ static const struct ListMenuTemplate sShopBuyMenuListTemplate = .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 7, + .fontId = FONT_NARROW, .cursorKind = 0 }; @@ -576,8 +576,8 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y) } StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); - x = GetStringRightAlignXOffset(7, gStringVar4, 0x78); - AddTextPrinterParameterized4(windowId, 7, x, y, 0, 0, sShopBuyMenuTextColors[1], -1, gStringVar4); + x = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 0x78); + AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, 0, 0, sShopBuyMenuTextColors[1], -1, gStringVar4); } } @@ -692,12 +692,12 @@ static void BuyMenuInitWindows(void) static void BuyMenuPrint(u8 windowId, const u8 *text, u8 x, u8 y, s8 speed, u8 colorSet) { - AddTextPrinterParameterized4(windowId, 1, x, y, 0, 0, sShopBuyMenuTextColors[colorSet], speed, text); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, 0, 0, sShopBuyMenuTextColors[colorSet], speed, text); } static void BuyMenuDisplayMessage(u8 taskId, const u8 *text, TaskFunc callback) { - DisplayMessageAndContinueTask(taskId, 5, 10, 14, 1, GetPlayerTextSpeedDelay(), text, callback); + DisplayMessageAndContinueTask(taskId, 5, 10, 14, FONT_NORMAL, GetPlayerTextSpeedDelay(), text, callback); ScheduleBgCopyTilemapToVram(0); } diff --git a/src/slot_machine.c b/src/slot_machine.c index af55e0d9b9..7d46102736 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -1253,7 +1253,7 @@ static bool8 SlotAction_HandleBetInput(struct Task *task) static bool8 SlotAction_PrintMsg_Need3Coins(struct Task *task) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, gText_YouDontHaveThreeCoins, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouDontHaveThreeCoins, 0, 1, 0, 0); CopyWindowToVram(0, 3); sSlotMachine->state = SLOT_ACTION_WAIT_MSG_NEED_3_COINS; return FALSE; @@ -1518,7 +1518,7 @@ static bool8 SlotAction_NoMatches(struct Task *task) static bool8 SlotAction_AskQuit(struct Task *task) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, gText_QuitTheGame, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_QuitTheGame, 0, 1, 0, 0); CopyWindowToVram(0, 3); CreateYesNoMenuParameterized(0x15, 7, 0x214, 0x180, 0xE, 0xF); sSlotMachine->state = SLOT_ACTION_HANDLE_QUIT_INPUT; @@ -1550,7 +1550,7 @@ static bool8 SlotAction_HandleQuitInput(struct Task *task) static bool8 SlotAction_PrintMsg_9999Coins(struct Task *task) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, gText_YouveGot9999Coins, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouveGot9999Coins, 0, 1, 0, 0); CopyWindowToVram(0, 3); sSlotMachine->state = SLOT_ACTION_WAIT_MSG_MAX_COINS; return FALSE; @@ -1571,7 +1571,7 @@ static bool8 SlotAction_WaitMsg_9999Coins(struct Task *task) static bool8 SlotAction_PrintMsg_NoMoreCoins(struct Task *task) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, gText_YouveRunOutOfCoins, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouveRunOutOfCoins, 0, 1, 0, 0); CopyWindowToVram(0, 3); sSlotMachine->state = SLOT_ACTION_WAIT_MSG_NO_MORE_COINS; return FALSE; @@ -3444,7 +3444,7 @@ static void InfoBox_DrawWindow(struct Task *task) static void InfoBox_AddText(struct Task *task) { - AddTextPrinterParameterized3(1, 1, 2, 5, sColors_ReeltimeHelp, 0, gText_ReelTimeHelp); + AddTextPrinterParameterized3(1, FONT_NORMAL, 2, 5, sColors_ReeltimeHelp, 0, gText_ReelTimeHelp); CopyWindowToVram(1, 3); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0)); task->tState++; diff --git a/src/start_menu.c b/src/start_menu.c index 59279d6b9f..a9d3ce15b1 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -386,7 +386,7 @@ static void ShowSafariBallsWindow(void) DrawStdWindowFrame(sSafariBallsWindowId, FALSE); ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_SafariBallStock); - AddTextPrinterParameterized(sSafariBallsWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL); + AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 0, 1, 0xFF, NULL); CopyWindowToVram(sSafariBallsWindowId, 2); } @@ -401,7 +401,7 @@ static void ShowPyramidFloorWindow(void) DrawStdWindowFrame(sBattlePyramidFloorWindowId, FALSE); StringCopy(gStringVar1, sPyramidFloorNames[gSaveBlock2Ptr->frontier.curChallengeBattleNum]); StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor); - AddTextPrinterParameterized(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL); + AddTextPrinterParameterized(sBattlePyramidFloorWindowId, FONT_NORMAL, gStringVar4, 0, 1, 0xFF, NULL); CopyWindowToVram(sBattlePyramidFloorWindowId, 2); } @@ -433,7 +433,7 @@ static bool32 PrintStartMenuActions(s8 *pIndex, u32 count) else { StringExpandPlaceholders(gStringVar4, sStartMenuItems[sCurrentStartMenuActions[index]].text); - AddTextPrinterParameterized(GetStartMenuWindowId(), 1, gStringVar4, 8, (index << 4) + 9, 0xFF, NULL); + AddTextPrinterParameterized(GetStartMenuWindowId(), FONT_NORMAL, gStringVar4, 8, (index << 4) + 9, 0xFF, NULL); } index++; @@ -482,7 +482,7 @@ static bool32 InitStartMenuStep(void) sInitStartMenuData[0]++; break; case 5: - sStartMenuCursorPos = sub_81983AC(GetStartMenuWindowId(), 1, 0, 9, 16, sNumStartMenuActions, sStartMenuCursorPos); + sStartMenuCursorPos = sub_81983AC(GetStartMenuWindowId(), FONT_NORMAL, 0, 9, 16, sNumStartMenuActions, sStartMenuCursorPos); CopyWindowToVram(GetStartMenuWindowId(), TRUE); return TRUE; } @@ -1238,7 +1238,7 @@ static void Task_SaveAfterLinkBattle(u8 taskId) case 0: FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, - 1, + FONT_NORMAL, gText_SavingDontTurnOffPower, TEXT_SPEED_FF, NULL, @@ -1330,38 +1330,38 @@ static void ShowSaveInfoWindow(void) // Print region name yOffset = 1; BufferSaveMenuText(SAVE_MENU_LOCATION, gStringVar4, TEXT_COLOR_GREEN); - AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, 0, yOffset, 0xFF, NULL); // Print player name yOffset += 16; - AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingPlayer, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPlayer, 0, yOffset, 0xFF, NULL); BufferSaveMenuText(SAVE_MENU_NAME, gStringVar4, color); - xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70); + xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); PrintPlayerNameOnWindow(sSaveInfoWindowId, gStringVar4, xOffset, yOffset); // Print badge count yOffset += 16; - AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingBadges, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingBadges, 0, yOffset, 0xFF, NULL); BufferSaveMenuText(SAVE_MENU_BADGES, gStringVar4, color); - xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70); - AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL); + xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL); if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE) { // Print pokedex count yOffset += 16; - AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingPokedex, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPokedex, 0, yOffset, 0xFF, NULL); BufferSaveMenuText(SAVE_MENU_CAUGHT, gStringVar4, color); - xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70); - AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL); + xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL); } // Print play time yOffset += 16; - AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingTime, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingTime, 0, yOffset, 0xFF, NULL); BufferSaveMenuText(SAVE_MENU_PLAY_TIME, gStringVar4, color); - xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70); - AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL); + xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL); CopyWindowToVram(sSaveInfoWindowId, 2); } diff --git a/src/starter_choose.c b/src/starter_choose.c index d148461308..942f602730 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -480,7 +480,7 @@ static void Task_StarterChoose(u8 taskId) { CreateStarterPokemonLabel(gTasks[taskId].tStarterSelection); DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x2A8, 0xD); - AddTextPrinterParameterized(0, 1, gText_BirchInTrouble, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_BirchInTrouble, 0, 1, 0, NULL); PutWindowTilemap(0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = Task_HandleStarterChooseInput; @@ -534,7 +534,7 @@ static void Task_AskConfirmStarter(u8 taskId) { PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(0, 1, gText_ConfirmStarterChoice, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_ConfirmStarterChoice, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); CreateYesNoMenu(&sWindowTemplate_ConfirmStarter, 0x2A8, 0xD, 0); gTasks[taskId].func = Task_HandleConfirmStarterInput; @@ -591,11 +591,11 @@ static void CreateStarterPokemonLabel(u8 selection) sStarterLabelWindowId = AddWindow(&winTemplate); FillWindowPixelBuffer(sStarterLabelWindowId, PIXEL_FILL(0)); - width = GetStringCenterAlignXOffset(7, categoryText, 0x68); - AddTextPrinterParameterized3(sStarterLabelWindowId, 7, width, 1, sTextColors, 0, categoryText); + width = GetStringCenterAlignXOffset(FONT_NARROW, categoryText, 0x68); + AddTextPrinterParameterized3(sStarterLabelWindowId, FONT_NARROW, width, 1, sTextColors, 0, categoryText); - width = GetStringCenterAlignXOffset(1, speciesName, 0x68); - AddTextPrinterParameterized3(sStarterLabelWindowId, 1, width, 17, sTextColors, 0, speciesName); + width = GetStringCenterAlignXOffset(FONT_NORMAL, speciesName, 0x68); + AddTextPrinterParameterized3(sStarterLabelWindowId, FONT_NORMAL, width, 17, sTextColors, 0, speciesName); PutWindowTilemap(sStarterLabelWindowId); ScheduleBgCopyTilemapToVram(0); diff --git a/src/strings.c b/src/strings.c index ae39e3d4de..3785766ce9 100644 --- a/src/strings.c +++ b/src/strings.c @@ -839,17 +839,17 @@ const u8 gText_B4F[] = _("B4F"); const u8 gText_Rooftop[] = _("ROOFTOP"); const u8 gText_ElevatorNowOn[] = _("Now on:"); const u8 gText_BP[] = _("BP"); -const u8 gText_EnergyPowder50[] = _("ENERGYPOWDER{CLEAR_TO 0x72}{FONT 0}50"); -const u8 gText_EnergyRoot80[] = _("ENERGY ROOT{CLEAR_TO 0x72}{FONT 0}80"); -const u8 gText_HealPowder50[] = _("HEAL POWDER{CLEAR_TO 0x72}{FONT 0}50"); -const u8 gText_RevivalHerb300[] = _("REVIVAL HERB{CLEAR_TO 0x6C}{FONT 0}300"); -const u8 gText_Protein1000[] = _("PROTEIN{CLEAR_TO 0x63}{FONT 0}1,000"); -const u8 gText_Iron1000[] = _("IRON{CLEAR_TO 0x63}{FONT 0}1,000"); -const u8 gText_Carbos1000[] = _("CARBOS{CLEAR_TO 0x63}{FONT 0}1,000"); -const u8 gText_Calcium1000[] = _("CALCIUM{CLEAR_TO 0x63}{FONT 0}1,000"); -const u8 gText_Zinc1000[] = _("ZINC{CLEAR_TO 0x63}{FONT 0}1,000"); -const u8 gText_HPUp1000[] = _("HP UP{CLEAR_TO 0x63}{FONT 0}1,000"); -const u8 gText_PPUp3000[] = _("PP UP{CLEAR_TO 0x63}{FONT 0}3,000"); +const u8 gText_EnergyPowder50[] = _("ENERGYPOWDER{CLEAR_TO 114}{FONT_SMALL}50"); +const u8 gText_EnergyRoot80[] = _("ENERGY ROOT{CLEAR_TO 114}{FONT_SMALL}80"); +const u8 gText_HealPowder50[] = _("HEAL POWDER{CLEAR_TO 114}{FONT_SMALL}50"); +const u8 gText_RevivalHerb300[] = _("REVIVAL HERB{CLEAR_TO 108}{FONT_SMALL}300"); +const u8 gText_Protein1000[] = _("PROTEIN{CLEAR_TO 99}{FONT_SMALL}1,000"); +const u8 gText_Iron1000[] = _("IRON{CLEAR_TO 99}{FONT_SMALL}1,000"); +const u8 gText_Carbos1000[] = _("CARBOS{CLEAR_TO 99}{FONT_SMALL}1,000"); +const u8 gText_Calcium1000[] = _("CALCIUM{CLEAR_TO 99}{FONT_SMALL}1,000"); +const u8 gText_Zinc1000[] = _("ZINC{CLEAR_TO 99}{FONT_SMALL}1,000"); +const u8 gText_HPUp1000[] = _("HP UP{CLEAR_TO 99}{FONT_SMALL}1,000"); +const u8 gText_PPUp3000[] = _("PP UP{CLEAR_TO 99}{FONT_SMALL}3,000"); const u8 gText_RankingHall[] = _("RANKING HALL"); const u8 gText_ExchangeService[] = _("EXCHANGE SERVICE"); const u8 gText_LilycoveCity[] = _("LILYCOVE CITY"); diff --git a/src/trade.c b/src/trade.c index be2091eceb..4c083c3d73 100644 --- a/src/trade.c +++ b/src/trade.c @@ -542,7 +542,7 @@ static void CB2_CreateTradeMenu(void) break; case 12: // Create player's name text sprites - xPos = GetStringCenterAlignXOffset(1, gSaveBlock2Ptr->playerName, 120); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 120); for (i = 0; i < GFXTAG_PLAYER_NAME; i++) { temp = sSpriteTemplate_MenuText; @@ -551,7 +551,7 @@ static void CB2_CreateTradeMenu(void) } // Create partner's name text sprites - xPos = GetStringCenterAlignXOffset(1, gLinkPlayers[GetMultiplayerId() ^ 1].name, 120); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gLinkPlayers[GetMultiplayerId() ^ 1].name, 120); for (i = 0; i < GFXTAG_PARTNER_NAME; i++) { temp = sSpriteTemplate_MenuText; @@ -733,7 +733,7 @@ static void CB2_ReturnToTradeMenu(void) break; case 12: // Create player's name text sprites - xPos = GetStringCenterAlignXOffset(1, gSaveBlock2Ptr->playerName, 120); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 120); for (i = 0; i < GFXTAG_PLAYER_NAME; i++) { temp = sSpriteTemplate_MenuText; @@ -742,7 +742,7 @@ static void CB2_ReturnToTradeMenu(void) } // Create partner's name text sprites - xPos = GetStringCenterAlignXOffset(1, gLinkPlayers[GetMultiplayerId() ^ 1].name, 120); + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gLinkPlayers[GetMultiplayerId() ^ 1].name, 120); for (i = 0; i < GFXTAG_PARTNER_NAME; i++) { temp = sSpriteTemplate_MenuText; @@ -1853,9 +1853,9 @@ static void DrawTradeMenuParty(u8 whichParty) gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].x2 = 0; gSprites[sTradeMenuData->partySpriteIds[0][partyIdx + (selectedMonParty * PARTY_SIZE)]].y2 = 0; nameStringWidth = GetMonNicknameWidth(nickname, selectedMonParty, partyIdx); - AddTextPrinterParameterized3((whichParty * 2) + 14, 0, (80 - nameStringWidth) / 2, 4, sTradeTextColors, 0, nickname); + AddTextPrinterParameterized3((whichParty * 2) + 14, FONT_SMALL, (80 - nameStringWidth) / 2, 4, sTradeTextColors, 0, nickname); BufferTradeMonMoves(movesString, selectedMonParty, partyIdx); - AddTextPrinterParameterized4((whichParty * 2) + 15, 1, 0, 0, 0, 0, sTradeTextColors, 0, movesString); + AddTextPrinterParameterized4((whichParty * 2) + 15, FONT_NORMAL, 0, 0, 0, 0, sTradeTextColors, 0, movesString); PutWindowTilemap((whichParty * 2) + 14); CopyWindowToVram((whichParty * 2) + 14, 3); PutWindowTilemap((whichParty * 2) + 15); @@ -1883,7 +1883,7 @@ static u8 GetMonNicknameWidth(u8 *str, u8 whichParty, u8 monIdx) GetMonData(&gEnemyParty[monIdx], MON_DATA_NICKNAME, nickname); StringCopy10(str, nickname); - return GetStringWidth(0, str, GetFontAttribute(0, FONTATTR_LETTER_SPACING)); + return GetStringWidth(FONT_SMALL, str, GetFontAttribute(FONT_SMALL, FONTATTR_LETTER_SPACING)); } static void BufferTradeMonMoves(u8 *str, u8 whichParty, u8 partyIdx) @@ -1928,8 +1928,8 @@ static void PrintMonNicknameForTradeMenu(u8 whichParty, u8 windowId, u8 *nicknam { u8 xPos; windowId += (whichParty * PARTY_SIZE) + 2; - xPos = GetStringCenterAlignXOffset(0, nickname, 64); - AddTextPrinterParameterized3(windowId, 0, xPos, 4, sTradeTextColors, 0, nickname); + xPos = GetStringCenterAlignXOffset(FONT_SMALL, nickname, 64); + AddTextPrinterParameterized3(windowId, FONT_SMALL, xPos, 4, sTradeTextColors, 0, nickname); PutWindowTilemap(windowId); CopyWindowToVram(windowId, 3); } @@ -2155,7 +2155,7 @@ static void DoQueuedActions(void) static void PrintTradeMessage(u8 messageId) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(0, 1, sTradeMessages[messageId], 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sTradeMessages[messageId], 0, 1, TEXT_SPEED_FF, NULL); DrawTextBorderOuter(0, 20, 12); PutWindowTilemap(0); CopyWindowToVram(0, 3); @@ -4835,7 +4835,7 @@ void DrawTextOnTradeWindow(u8 windowId, const u8 *str, u8 speed) sTradeData->textColors[0] = TEXT_DYNAMIC_COLOR_6; sTradeData->textColors[1] = TEXT_COLOR_WHITE; sTradeData->textColors[2] = TEXT_COLOR_GREEN; - AddTextPrinterParameterized4(windowId, 1, 0, 2, 0, 0, sTradeData->textColors, speed, str); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, sTradeData->textColors, speed, str); CopyWindowToVram(windowId, 3); } diff --git a/src/trader.c b/src/trader.c index 98b4f464ca..c65d5ff87b 100644 --- a/src/trader.c +++ b/src/trader.c @@ -59,15 +59,15 @@ void CreateAvailableDecorationsMenu(u8 taskId) s16 * data = gTasks[taskId].data; struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader; struct WindowTemplate windowTemplate = {0, 1, 1, 10, 10, 15, 1}; - s32 windowWidth = GetStringWidth(1, gText_Exit, 0); - s32 fiveMarksWidth = GetStringWidth(1, gText_FiveMarks, 0); + s32 windowWidth = GetStringWidth(FONT_NORMAL, gText_Exit, 0); + s32 fiveMarksWidth = GetStringWidth(FONT_NORMAL, gText_FiveMarks, 0); for (i = 0; i < 4; i++) { s32 curWidth; if (trader->decorations[i] > NUM_DECORATIONS) curWidth = fiveMarksWidth; else - curWidth = GetStringWidth(1, gDecorations[trader->decorations[i]].name, 0); + curWidth = GetStringWidth(FONT_NORMAL, gDecorations[trader->decorations[i]].name, 0); if (curWidth > windowWidth) windowWidth = curWidth; } @@ -77,11 +77,11 @@ void CreateAvailableDecorationsMenu(u8 taskId) for (i = 0; i < 4; i++) { if (trader->decorations[i] > NUM_DECORATIONS) - AddTextPrinterParameterized(data[3], 1, gText_FiveMarks, 8, 16 * i + 1, 255, NULL); + AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_FiveMarks, 8, 16 * i + 1, 255, NULL); else - AddTextPrinterParameterized(data[3], 1, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, 255, NULL); + AddTextPrinterParameterized(data[3], FONT_NORMAL, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, 255, NULL); } - AddTextPrinterParameterized(data[3], 1, gText_Exit, 8, 16 * i + 1, 255, NULL); + AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 255, NULL); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[3], 5, 0); ScheduleBgCopyTilemapToVram(0); } diff --git a/src/trainer_card.c b/src/trainer_card.c index bad015644c..a2c90e867f 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -497,7 +497,7 @@ static void Task_TrainerCard(u8 taskId) case STATE_WAIT_LINK_PARTNER: SetCloseLinkCallback(); DrawDialogueFrame(0, 1); - AddTextPrinterParameterized(0, 1, gText_WaitingTrainerFinishReading, 0, 1, 255, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_WaitingTrainerFinishReading, 0, 1, 255, 0); CopyWindowToVram(0, 3); sData->mainState = STATE_CLOSE_CARD_LINK; break; @@ -1001,9 +1001,9 @@ static void PrintNameOnCardFront(void) StringCopy(txtPtr, sData->trainerCard.playerName); ConvertInternationalString(txtPtr, sData->language); if (sData->cardType == CARD_TYPE_FRLG) - AddTextPrinterParameterized3(1, 1, 20, 28, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 28, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); else - AddTextPrinterParameterized3(1, 1, 16, 33, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 33, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); } static void PrintIdOnCard(void) @@ -1016,16 +1016,16 @@ static void PrintIdOnCard(void) ConvertIntToDecimalStringN(txtPtr, sData->trainerCard.trainerId, STR_CONV_MODE_LEADING_ZEROS, 5); if (sData->cardType == CARD_TYPE_FRLG) { - xPos = GetStringCenterAlignXOffset(1, buffer, 80) + 132; + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, buffer, 80) + 132; top = 9; } else { - xPos = GetStringCenterAlignXOffset(1, buffer, 96) + 120; + xPos = GetStringCenterAlignXOffset(FONT_NORMAL, buffer, 96) + 120; top = 9; } - AddTextPrinterParameterized3(1, 1, xPos, top, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, FONT_NORMAL, xPos, top, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); } static void PrintMoneyOnCard(void) @@ -1034,23 +1034,23 @@ static void PrintMoneyOnCard(void) u8 top; if (!sData->isHoenn) - AddTextPrinterParameterized3(1, 1, 20, 56, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney); + AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 56, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney); else - AddTextPrinterParameterized3(1, 1, 16, 57, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney); + AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 57, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney); ConvertIntToDecimalStringN(gStringVar1, sData->trainerCard.money, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); if (!sData->isHoenn) { - xOffset = GetStringRightAlignXOffset(1, gStringVar4, 144); + xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 144); top = 56; } else { - xOffset = GetStringRightAlignXOffset(1, gStringVar4, 128); + xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128); top = 57; } - AddTextPrinterParameterized3(1, 1, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); } static u16 GetCaughtMonsCount(void) @@ -1068,21 +1068,21 @@ static void PrintPokedexOnCard(void) if (FlagGet(FLAG_SYS_POKEDEX_GET)) { if (!sData->isHoenn) - AddTextPrinterParameterized3(1, 1, 20, 72, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex); + AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 72, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex); else - AddTextPrinterParameterized3(1, 1, 16, 73, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex); + AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 73, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex); StringCopy(ConvertIntToDecimalStringN(gStringVar4, sData->trainerCard.caughtMonsCount, STR_CONV_MODE_LEFT_ALIGN, 3), gText_EmptyString6); if (!sData->isHoenn) { - xOffset = GetStringRightAlignXOffset(1, gStringVar4, 144); + xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 144); top = 72; } else { - xOffset = GetStringRightAlignXOffset(1, gStringVar4, 128); + xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128); top = 73; } - AddTextPrinterParameterized3(1, 1, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); } } @@ -1096,9 +1096,9 @@ static void PrintTimeOnCard(void) u32 x, y, totalWidth; if (!sData->isHoenn) - AddTextPrinterParameterized3(1, 1, 20, 88, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime); + AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 88, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime); else - AddTextPrinterParameterized3(1, 1, 16, 89, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime); + AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 89, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime); if (sData->isLink) { @@ -1115,7 +1115,7 @@ static void PrintTimeOnCard(void) hours = 999; if (minutes > 59) minutes = 59; - width = GetStringWidth(1, gText_Colon2, 0); + width = GetStringWidth(FONT_NORMAL, gText_Colon2, 0); if (!sData->isHoenn) { @@ -1132,12 +1132,12 @@ static void PrintTimeOnCard(void) FillWindowPixelRect(1, PIXEL_FILL(0), x, y, totalWidth, 15); ConvertIntToDecimalStringN(gStringVar4, hours, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized3(1, 1, x, y, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); x += 18; - AddTextPrinterParameterized3(1, 1, x, y, sTimeColonTextColors[sData->timeColonInvisible], TEXT_SPEED_FF, gText_Colon2); + AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTimeColonTextColors[sData->timeColonInvisible], TEXT_SPEED_FF, gText_Colon2); x += width; ConvertIntToDecimalStringN(gStringVar4, minutes, STR_CONV_MODE_LEADING_ZEROS, 2); - AddTextPrinterParameterized3(1, 1, x, y, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); } static void PrintProfilePhraseOnCard(void) @@ -1147,10 +1147,10 @@ static void PrintProfilePhraseOnCard(void) if (sData->isLink) { - AddTextPrinterParameterized3(1, 1, 8, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[0]); - AddTextPrinterParameterized3(1, 1, GetStringWidth(1, sData->easyChatProfile[0], 0) + 14, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[1]); - AddTextPrinterParameterized3(1, 1, 8, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[2]); - AddTextPrinterParameterized3(1, 1, GetStringWidth(1, sData->easyChatProfile[2], 0) + 14, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[3]); + AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[0]); + AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[0], 0) + 14, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[1]); + AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[2]); + AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[2], 0) + 14, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[3]); } } @@ -1168,9 +1168,9 @@ static void BufferNameForCardBack(void) static void PrintNameOnCardBack(void) { if (!sData->isHoenn) - AddTextPrinterParameterized3(1, 1, 136, 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->textPlayersCard); + AddTextPrinterParameterized3(1, FONT_NORMAL, 136, 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->textPlayersCard); else - AddTextPrinterParameterized3(1, 1, GetStringRightAlignXOffset(1, sData->textPlayersCard, 216), 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->textPlayersCard); + AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, sData->textPlayersCard, 216), 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->textPlayersCard); } static const u8 sText_HofTime[] = _("{STR_VAR_1}:{STR_VAR_2}:{STR_VAR_3}"); @@ -1191,8 +1191,8 @@ static void PrintStatOnBackOfCard(u8 top, const u8* statName, u8* stat, const u8 static const u8 xOffsets[] = {8, 16}; static const u8 widths[] = {216, 216}; - AddTextPrinterParameterized3(1, 1, xOffsets[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SPEED_FF, statName); - AddTextPrinterParameterized3(1, 1, GetStringRightAlignXOffset(1, stat, widths[sData->isHoenn]), top * 16 + 33, color, TEXT_SPEED_FF, stat); + AddTextPrinterParameterized3(1, FONT_NORMAL, xOffsets[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SPEED_FF, statName); + AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, stat, widths[sData->isHoenn]), top * 16 + 33, color, TEXT_SPEED_FF, stat); } static void PrintHofDebutTimeOnCard(void) diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 34fa24f747..621f811336 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -590,13 +590,13 @@ void PrintOnTrainerHillRecordsWindow(void) SetUpDataStruct(); FillWindowPixelBuffer(0, PIXEL_FILL(0)); - x = GetStringCenterAlignXOffset(1, gText_TimeBoard, 0xD0); - AddTextPrinterParameterized3(0, 1, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard); + x = GetStringCenterAlignXOffset(FONT_NORMAL, gText_TimeBoard, 0xD0); + AddTextPrinterParameterized3(0, FONT_NORMAL, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard); y = 18; for (i = 0; i < 4; i++) { - AddTextPrinterParameterized3(0, 1, 0, y, sRecordWinColors, TEXT_SPEED_FF, sTagMatchStrings[i]); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0, y, sRecordWinColors, TEXT_SPEED_FF, sTagMatchStrings[i]); y += 15; total = GetTimerValue(&gSaveBlock1Ptr->trainerHillTimes[i]); minutes = total / (60 * 60); @@ -608,8 +608,8 @@ void PrintOnTrainerHillRecordsWindow(void) secondsFraction = (total * 168) / 100; ConvertIntToDecimalStringN(gStringVar3, secondsFraction, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(StringCopy(gStringVar4, gText_TimeCleared), gText_XMinYDotZSec); - x = GetStringRightAlignXOffset(1, gStringVar4, 0xD0); - AddTextPrinterParameterized3(0, 1, x, y, sRecordWinColors, TEXT_SPEED_FF, gStringVar4); + x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0xD0); + AddTextPrinterParameterized3(0, FONT_NORMAL, x, y, sRecordWinColors, TEXT_SPEED_FF, gStringVar4); y += 17; } diff --git a/src/union_room.c b/src/union_room.c index 18cb02c33a..5196c1cdb2 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -3982,7 +3982,7 @@ static void PrintGroupMemberOnWindow(u8 windowId, u8 x, u8 y, struct RfuPlayer * ConvertIntToDecimalStringN(trainerId, player->rfu.data.compatibility.playerTrainerId[0] | (player->rfu.data.compatibility.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5); StringCopy(gStringVar4, sText_ID); StringAppend(gStringVar4, trainerId); - PrintUnionRoomText(windowId, 1, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 0x88), y, colorIdx); + PrintUnionRoomText(windowId, 1, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x88), y, colorIdx); } } @@ -3997,7 +3997,7 @@ static void PrintGroupCandidateOnWindow(u8 windowId, u8 x, u8 y, struct RfuPlaye ConvertIntToDecimalStringN(trainerId, player->rfu.data.compatibility.playerTrainerId[0] | (player->rfu.data.compatibility.playerTrainerId[1] << 8), STR_CONV_MODE_LEADING_ZEROS, 5); StringCopy(gStringVar4, sText_ID); StringAppend(gStringVar4, trainerId); - PrintUnionRoomText(windowId, 1, gStringVar4, GetStringRightAlignXOffset(1, gStringVar4, 0x68), y, colorIdx); + PrintUnionRoomText(windowId, 1, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x68), y, colorIdx); } } diff --git a/src/union_room_battle.c b/src/union_room_battle.c index 1ca414d797..f6fb74f73b 100644 --- a/src/union_room_battle.c +++ b/src/union_room_battle.c @@ -78,7 +78,7 @@ static void AddTextPrinterForUnionRoomBattle(u8 windowId, const u8 * str, u8 x, s32 letterSpacing = 0; s32 lineSpacing = 1; FillWindowPixelBuffer(windowId, (sTextColors[0] << 4) | sTextColors[0]); - AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, sTextColors, speed, str); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, x, y, letterSpacing, lineSpacing, sTextColors, speed, str); } static bool32 PrintUnionRoomBattleMessage(s16 * state, const u8 * str, s32 speed) diff --git a/src/union_room_chat.c b/src/union_room_chat.c index cb9b2f6a4b..d6cc047beb 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -2740,8 +2740,8 @@ static void AddYesNoMenuAt(u8 left, u8 top, u8 initialCursorPos) { FillWindowPixelBuffer(sDisplay->yesNoMenuWindowId, PIXEL_FILL(1)); PutWindowTilemap(sDisplay->yesNoMenuWindowId); - AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, 1, gText_Yes, 8, 1, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, 1, gText_No, 8, 17, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_Yes, 8, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_No, 8, 17, TEXT_SPEED_FF, NULL); DrawTextBorderOuter(sDisplay->yesNoMenuWindowId, 1, 13); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDisplay->yesNoMenuWindowId, 2, initialCursorPos); } @@ -2811,7 +2811,7 @@ static void AddStdMessageWindow(int msgId, u16 bg0vofs) DrawTextBorderInner(windowId, 0xA, 2); AddTextPrinterParameterized5( windowId, - 1, + FONT_NORMAL, str, sDisplayStdMessages[msgId].x + 8, sDisplayStdMessages[msgId].y + 8, @@ -2825,7 +2825,7 @@ static void AddStdMessageWindow(int msgId, u16 bg0vofs) DrawTextBorderOuter(windowId, 0xA, 2); AddTextPrinterParameterized5( windowId, - 1, + FONT_NORMAL, str, sDisplayStdMessages[msgId].x, sDisplayStdMessages[msgId].y, @@ -2877,7 +2877,7 @@ static void DrawTextEntryMessage(u16 x, u8 *str, u8 bgColor, u8 fgColor, u8 shad strBuffer[1] = EXT_CTRL_CODE_MIN_LETTER_SPACING; strBuffer[2] = 8; StringCopy(&strBuffer[3], str); - AddTextPrinterParameterized3(1, 2, x * 8, 1, color, TEXT_SPEED_FF, strBuffer); + AddTextPrinterParameterized3(1, FONT_SHORT, x * 8, 1, color, TEXT_SPEED_FF, strBuffer); } static void PrintCurrentKeyboardPage(void) @@ -2912,7 +2912,7 @@ static void PrintCurrentKeyboardPage(void) return; StringCopy(&str[3], sUnionRoomKeyboardText[page][i]); - AddTextPrinterParameterized3(2, 0, left, top, color, TEXT_SPEED_FF, str); + AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str); } } else @@ -2921,9 +2921,9 @@ static void PrintCurrentKeyboardPage(void) for (i = 0, top = 0; i < UNION_ROOM_KB_ROW_COUNT; i++, top += 12) { str2 = GetRegisteredTextByRow(i); - if (GetStringWidth(0, str2, 0) <= 40) + if (GetStringWidth(FONT_SMALL, str2, 0) <= 40) { - AddTextPrinterParameterized3(2, 0, left, top, color, TEXT_SPEED_FF, str2); + AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str2); } else { @@ -2932,10 +2932,10 @@ static void PrintCurrentKeyboardPage(void) { length--; StringCopyN_Multibyte(str, str2, length); - } while (GetStringWidth(0, str, 0) > 35); + } while (GetStringWidth(FONT_SMALL, str, 0) > 35); - AddTextPrinterParameterized3(2, 0, left, top, color, TEXT_SPEED_FF, str); - AddTextPrinterParameterized3(2, 0, left + 35, top, color, TEXT_SPEED_FF, sText_Ellipsis); + AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str); + AddTextPrinterParameterized3(2, FONT_SMALL, left + 35, top, color, TEXT_SPEED_FF, sText_Ellipsis); } } } @@ -2987,8 +2987,8 @@ static void ShowKeyboardSwapMenu(void) { FillWindowPixelBuffer(3, PIXEL_FILL(1)); DrawTextBorderOuter(3, 1, 13); - PrintTextArray(3, 2, 8, 1, 14, 5, sKeyboardPageTitleTexts); - sub_81983AC(3, 2, 0, 1, 14, 5, GetCurrentKeyboardPage()); + PrintTextArray(3, FONT_SHORT, 8, 1, 14, 5, sKeyboardPageTitleTexts); + sub_81983AC(3, FONT_SHORT, 0, 1, 14, 5, GetCurrentKeyboardPage()); PutWindowTilemap(3); } @@ -3006,7 +3006,7 @@ static void PrintChatMessage(u16 row, u8 *str, u8 colorIdx) color[1] = colorIdx * 2 + 2; color[2] = colorIdx * 2 + 3; FillWindowPixelRect(0, PIXEL_FILL(1), 0, row * 15, 168, 15); - AddTextPrinterParameterized3(0, 2, 0, row * 15 + 1, color, TEXT_SPEED_FF, str); + AddTextPrinterParameterized3(0, FONT_SHORT, 0, row * 15 + 1, color, TEXT_SPEED_FF, str); } static void ResetGpuBgState(void) diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index 6ebc707e54..dcfc27d916 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -876,7 +876,7 @@ static void AskUsePokeblock(void) StringCopy(gStringVar4, stringBuffer); FillWindowPixelBuffer(WIN_TEXT, 17); DrawTextBorderOuter(WIN_TEXT, 151, 14); - AddTextPrinterParameterized(WIN_TEXT, 1, gStringVar4, 0, 1, 0, NULL); + AddTextPrinterParameterized(WIN_TEXT, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); PutWindowTilemap(WIN_TEXT); CopyWindowToVram(WIN_TEXT, 3); CreateYesNoMenu(&sUsePokeblockYesNoWinTemplate, 151, 14, 0); @@ -952,7 +952,7 @@ static void PrintWontEatAnymore(void) { FillWindowPixelBuffer(WIN_TEXT, 17); DrawTextBorderOuter(WIN_TEXT, 151, 14); - AddTextPrinterParameterized(WIN_TEXT, 1, gText_WontEatAnymore, 0, 1, 0, NULL); + AddTextPrinterParameterized(WIN_TEXT, FONT_NORMAL, gText_WontEatAnymore, 0, 1, 0, NULL); PutWindowTilemap(WIN_TEXT); CopyWindowToVram(WIN_TEXT, 3); } @@ -966,7 +966,7 @@ static void EraseMenuWindow(void) static void PrintMenuWindowText(const u8 *message) { - AddTextPrinterParameterized(WIN_TEXT, 1, gStringVar4, 0, 1, 0, NULL); + AddTextPrinterParameterized(WIN_TEXT, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); } static void BufferEnhancedStatText(u8 *dest, u8 statId, s16 enhancement) @@ -1389,12 +1389,12 @@ static void UpdateMonInfoText(u16 loadId, bool8 firstPrint) FillWindowPixelBuffer(WIN_NATURE, PIXEL_FILL(0)); if (sMenu->info.curSelection != sMenu->info.numSelections - 1) { - AddTextPrinterParameterized(WIN_NAME, 1, sMenu->monNameStrings[loadId], 0, 1, 0, NULL); + AddTextPrinterParameterized(WIN_NAME, FONT_NORMAL, sMenu->monNameStrings[loadId], 0, 1, 0, NULL); partyIndex = GetPartyIdFromSelectionId(sMenu->info.curSelection); nature = GetNature(&gPlayerParty[partyIndex]); str = StringCopy(sMenu->info.natureText, gText_NatureSlash); str = StringCopy(str, gNatureNamePointers[nature]); - AddTextPrinterParameterized3(WIN_NATURE, 1, 2, 1, sNatureTextColors, 0, sMenu->info.natureText); + AddTextPrinterParameterized3(WIN_NATURE, FONT_NORMAL, 2, 1, sNatureTextColors, 0, sMenu->info.natureText); } if (firstPrint) diff --git a/src/wallclock.c b/src/wallclock.c index 6f9bc02aee..407c89c49a 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -715,7 +715,7 @@ void CB2_StartWallClock(void) WallClockInit(); - AddTextPrinterParameterized(1, 1, gText_Confirm3, 0, 1, 0, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, gText_Confirm3, 0, 1, 0, NULL); PutWindowTilemap(1); ScheduleBgCopyTilemapToVram(2); } @@ -763,7 +763,7 @@ void CB2_ViewWallClock(void) WallClockInit(); - AddTextPrinterParameterized(1, 1, gText_Cancel4, 0, 1, 0, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, gText_Cancel4, 0, 1, 0, NULL); PutWindowTilemap(1); ScheduleBgCopyTilemapToVram(2); } @@ -828,7 +828,7 @@ static void Task_SetClock_HandleInput(u8 taskId) static void Task_SetClock_AskConfirm(u8 taskId) { DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x250, 0x0d); - AddTextPrinterParameterized(0, 1, gText_IsThisTheCorrectTime, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_IsThisTheCorrectTime, 0, 1, 0, NULL); PutWindowTilemap(0); ScheduleBgCopyTilemapToVram(0); CreateYesNoMenu(&sWindowTemplate_ConfirmYesNo, 0x250, 0x0d, 1); diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 5c5272a44b..295eab97fc 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -236,12 +236,12 @@ static void PrintHeaderTexts(void) FillWindowPixelBuffer(0, PIXEL_FILL(0)); FillWindowPixelBuffer(1, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - WCSS_AddTextPrinterParameterized(0, 1, sHeaderTexts[0], GetStringCenterAlignXOffset(1, sHeaderTexts[0], 0xC0), 6, COLORMODE_GREEN); + WCSS_AddTextPrinterParameterized(0, FONT_NORMAL, sHeaderTexts[0], GetStringCenterAlignXOffset(FONT_NORMAL, sHeaderTexts[0], 0xC0), 6, COLORMODE_GREEN); for (i = 0; i < (int)ARRAY_COUNT(*sHeaderTexts) - 1; i++) { - WCSS_AddTextPrinterParameterized(1, 1, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_WHITE_LGRAY); + WCSS_AddTextPrinterParameterized(1, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_WHITE_LGRAY); } - WCSS_AddTextPrinterParameterized(1, 1, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_RED); + WCSS_AddTextPrinterParameterized(1, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_RED); PutWindowTilemap(0); CopyWindowToVram(0, 2); PutWindowTilemap(1); @@ -280,9 +280,9 @@ static void Task_WirelessCommunicationScreen(u8 taskId) { ConvertIntToDecimalStringN(gStringVar4, sStatusScreen->groupCounts[i], STR_CONV_MODE_RIGHT_ALIGN, 2); if (i != GROUPTYPE_TOTAL) - WCSS_AddTextPrinterParameterized(2, 1, gStringVar4, 12, 30 * i + 8, COLORMODE_WHITE_LGRAY); + WCSS_AddTextPrinterParameterized(2, FONT_NORMAL, gStringVar4, 12, 30 * i + 8, COLORMODE_WHITE_LGRAY); else - WCSS_AddTextPrinterParameterized(2, 1, gStringVar4, 12, 98, COLORMODE_RED); + WCSS_AddTextPrinterParameterized(2, FONT_NORMAL, gStringVar4, 12, 98, COLORMODE_RED); } PutWindowTilemap(2); CopyWindowToVram(2, 3); From 36039e1b86631bf92c6bb06ee27357a6a40ca4bd Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 31 Oct 2021 01:44:18 -0400 Subject: [PATCH 116/417] Convert fonts.s to C --- data/fonts.s | 76 ----- gflib/text.c | 20 +- gflib/text.h | 2 +- .../{bold_japanese.png => japanese_bold.png} | Bin ...font.png => japanese_frlg_female_font.png} | Bin ...e_font.png => japanese_frlg_male_font.png} | Bin .../japanese.png => japanese_normal.png} | Bin .../japanese.png => japanese_short.png} | Bin .../japanese.png => japanese_small.png} | Bin .../{narrow/latin.png => latin_narrow.png} | Bin .../{normal/latin.png => latin_normal.png} | Bin .../{short/latin.png => latin_short.png} | Bin .../{small/latin.png => latin_small.png} | Bin .../latin.png => latin_small_narrow.png} | Bin graphics/fonts/narrow/latin_widths.inc | 32 -- graphics/fonts/normal/latin_widths.inc | 32 -- graphics/fonts/short/japanese_widths.inc | 32 -- graphics/fonts/short/latin_widths.inc | 32 -- graphics/fonts/small/latin_widths.inc | 32 -- graphics/fonts/small_narrow/latin_widths.inc | 32 -- ...nused_japanese_frlg_female_font_widths.inc | 32 -- .../unused_japanese_frlg_male_font_widths.inc | 32 -- graphics_file_rules.mk | 40 +-- include/fonts.h | 19 ++ ld_script.txt | 2 +- src/battle_interface.c | 8 +- src/braille.c | 5 +- src/fonts.c | 292 ++++++++++++++++++ 28 files changed, 336 insertions(+), 384 deletions(-) delete mode 100644 data/fonts.s rename graphics/fonts/{bold_japanese.png => japanese_bold.png} (100%) rename graphics/fonts/{unused_japanese_frlg_female_font.png => japanese_frlg_female_font.png} (100%) rename graphics/fonts/{unused_japanese_frlg_male_font.png => japanese_frlg_male_font.png} (100%) rename graphics/fonts/{normal/japanese.png => japanese_normal.png} (100%) rename graphics/fonts/{short/japanese.png => japanese_short.png} (100%) rename graphics/fonts/{small/japanese.png => japanese_small.png} (100%) rename graphics/fonts/{narrow/latin.png => latin_narrow.png} (100%) rename graphics/fonts/{normal/latin.png => latin_normal.png} (100%) rename graphics/fonts/{short/latin.png => latin_short.png} (100%) rename graphics/fonts/{small/latin.png => latin_small.png} (100%) rename graphics/fonts/{small_narrow/latin.png => latin_small_narrow.png} (100%) delete mode 100644 graphics/fonts/narrow/latin_widths.inc delete mode 100644 graphics/fonts/normal/latin_widths.inc delete mode 100644 graphics/fonts/short/japanese_widths.inc delete mode 100644 graphics/fonts/short/latin_widths.inc delete mode 100644 graphics/fonts/small/latin_widths.inc delete mode 100644 graphics/fonts/small_narrow/latin_widths.inc delete mode 100644 graphics/fonts/unused_japanese_frlg_female_font_widths.inc delete mode 100644 graphics/fonts/unused_japanese_frlg_male_font_widths.inc create mode 100644 include/fonts.h create mode 100644 src/fonts.c diff --git a/data/fonts.s b/data/fonts.s deleted file mode 100644 index 4fdf029b4f..0000000000 --- a/data/fonts.s +++ /dev/null @@ -1,76 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - .align 2 -gFontSmallNarrowLatinGlyphs:: - .incbin "graphics/fonts/small_narrow/glyphs.latfont" - - .align 2 -gFontSmallNarrowLatinGlyphWidths:: - .include "graphics/fonts/small_narrow/latin_widths.inc" - - .align 2 -gFontSmallLatinGlyphs:: - .incbin "graphics/fonts/small/glyphs.latfont" - - .align 2 -gFontSmallLatinGlyphWidths:: - .include "graphics/fonts/small/latin_widths.inc" - - .align 2 -gFontNarrowLatinGlyphs:: - .incbin "graphics/fonts/narrow/glyphs.latfont" - - .align 2 -gFontNarrowLatinGlyphWidths:: - .include "graphics/fonts/narrow/latin_widths.inc" - - .align 2 -gFontShortLatinGlyphs:: - .incbin "graphics/fonts/short/glyphs.latfont" - - .align 2 -gFontShortLatinGlyphWidths:: - .include "graphics/fonts/short/latin_widths.inc" - - .align 2 -gFontNormalLatinGlyphs:: - .incbin "graphics/fonts/normal/glyphs.latfont" - - .align 2 -gFontNormalLatinGlyphWidths:: - .include "graphics/fonts/normal/latin_widths.inc" - - .align 2 -gFontSmallJapaneseGlyphs:: - .incbin "graphics/fonts/small/glyphs.hwjpnfont" - - .align 2 -gFontNormalJapaneseGlyphs:: - .incbin "graphics/fonts/normal/glyphs.hwjpnfont" - - .align 2 -gUnusedJapaneseFireRedLeafGreenMaleFontGlyphs:: - .incbin "graphics/fonts/unused_frlg_male.fwjpnfont" - - .align 2 -gUnusedJapaneseFireRedLeafGreenMaleFontGlyphWidths:: - .include "graphics/fonts/unused_japanese_frlg_male_font_widths.inc" - - .align 2 -gUnusedJapaneseFireRedLeafGreenFemaleFontGlyphs:: - .incbin "graphics/fonts/unused_frlg_female.fwjpnfont" - - .align 2 -gUnusedJapaneseFireRedLeafGreenFemaleFontGlyphWidths:: - .include "graphics/fonts/unused_japanese_frlg_female_font_widths.inc" - - .align 2 -gFontShortJapaneseGlyphs:: - .incbin "graphics/fonts/short/glyphs.fwjpnfont" - - .align 2 -gFontShortJapaneseGlyphWidths:: - .include "graphics/fonts/short/japanese_widths.inc" diff --git a/gflib/text.c b/gflib/text.c index 31a75e0d53..54155affed 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -11,6 +11,7 @@ #include "blit.h" #include "menu.h" #include "dynamic_placeholder_text_util.h" +#include "fonts.h" static u16 FontFunc_Small(struct TextPrinter *); static u16 FontFunc_Normal(struct TextPrinter *); @@ -222,22 +223,7 @@ static const u8 sMenuCursorDimensions[][2] = [FONT_BOLD] = {} }; -const u16 gFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold_glyphs.hwjpnfont"); - -extern const u16 gFontNormalLatinGlyphs[]; -extern const u8 gFontNormalLatinGlyphWidths[]; -extern const u16 gFontNormalJapaneseGlyphs[]; -extern const u16 gFontSmallLatinGlyphs[]; -extern const u8 gFontSmallLatinGlyphWidths[]; -extern const u16 gFontSmallJapaneseGlyphs[]; -extern const u16 gFontShortLatinGlyphs[]; -extern const u8 gFontShortLatinGlyphWidths[]; -extern const u16 gFontShortJapaneseGlyphs[]; -extern const u8 gFontShortJapaneseGlyphWidths[]; -extern const u16 gFontNarrowLatinGlyphs[]; -extern const u8 gFontNarrowLatinGlyphWidths[]; -extern const u16 gFontSmallNarrowLatinGlyphs[]; -extern const u8 gFontSmallNarrowLatinGlyphWidths[]; +const u16 gFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold.hwjpnfont"); static void SetFontsPointer(const struct FontInfo *fonts) { @@ -1510,7 +1496,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) return width; } -u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str) +u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str) { u8 shadowColor; u8 *strLocal; diff --git a/gflib/text.h b/gflib/text.h index 2c981de209..d23ee1be5a 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -147,7 +147,7 @@ bool16 TextPrinterWait(struct TextPrinter *textPrinter); void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex); u16 RenderText(struct TextPrinter *textPrinter); s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing); -u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str); +u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str); u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y); u8 GetKeypadIconTileOffset(u8 keypadIconId); u8 GetKeypadIconWidth(u8 keypadIconId); diff --git a/graphics/fonts/bold_japanese.png b/graphics/fonts/japanese_bold.png similarity index 100% rename from graphics/fonts/bold_japanese.png rename to graphics/fonts/japanese_bold.png diff --git a/graphics/fonts/unused_japanese_frlg_female_font.png b/graphics/fonts/japanese_frlg_female_font.png similarity index 100% rename from graphics/fonts/unused_japanese_frlg_female_font.png rename to graphics/fonts/japanese_frlg_female_font.png diff --git a/graphics/fonts/unused_japanese_frlg_male_font.png b/graphics/fonts/japanese_frlg_male_font.png similarity index 100% rename from graphics/fonts/unused_japanese_frlg_male_font.png rename to graphics/fonts/japanese_frlg_male_font.png diff --git a/graphics/fonts/normal/japanese.png b/graphics/fonts/japanese_normal.png similarity index 100% rename from graphics/fonts/normal/japanese.png rename to graphics/fonts/japanese_normal.png diff --git a/graphics/fonts/short/japanese.png b/graphics/fonts/japanese_short.png similarity index 100% rename from graphics/fonts/short/japanese.png rename to graphics/fonts/japanese_short.png diff --git a/graphics/fonts/small/japanese.png b/graphics/fonts/japanese_small.png similarity index 100% rename from graphics/fonts/small/japanese.png rename to graphics/fonts/japanese_small.png diff --git a/graphics/fonts/narrow/latin.png b/graphics/fonts/latin_narrow.png similarity index 100% rename from graphics/fonts/narrow/latin.png rename to graphics/fonts/latin_narrow.png diff --git a/graphics/fonts/normal/latin.png b/graphics/fonts/latin_normal.png similarity index 100% rename from graphics/fonts/normal/latin.png rename to graphics/fonts/latin_normal.png diff --git a/graphics/fonts/short/latin.png b/graphics/fonts/latin_short.png similarity index 100% rename from graphics/fonts/short/latin.png rename to graphics/fonts/latin_short.png diff --git a/graphics/fonts/small/latin.png b/graphics/fonts/latin_small.png similarity index 100% rename from graphics/fonts/small/latin.png rename to graphics/fonts/latin_small.png diff --git a/graphics/fonts/small_narrow/latin.png b/graphics/fonts/latin_small_narrow.png similarity index 100% rename from graphics/fonts/small_narrow/latin.png rename to graphics/fonts/latin_small_narrow.png diff --git a/graphics/fonts/narrow/latin_widths.inc b/graphics/fonts/narrow/latin_widths.inc deleted file mode 100644 index b82b115403..0000000000 --- a/graphics/fonts/narrow/latin_widths.inc +++ /dev/null @@ -1,32 +0,0 @@ - .byte 3, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5 - .byte 8, 5, 5, 5, 5, 6, 5, 5, 3, 5, 5, 5, 5, 5, 4, 3 - .byte 4, 4, 5, 5, 5, 8, 5, 5, 5, 5, 5, 6, 9, 6, 6, 3 - .byte 3, 3, 3, 3, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 5, 5, 4, 8, 8, 8, 7, 8, 8, 4, 4, 6, 4, 4, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4 - .byte 3, 3, 3, 3, 3, 3, 3, 5, 3, 7, 7, 7, 7, 1, 2, 3 - .byte 4, 5, 6, 7, 5, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 3, 5, 3 - .byte 5, 5, 5, 3, 3, 5, 5, 6, 3, 6, 6, 5, 5, 5, 5, 5 - .byte 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 - .byte 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5 - .byte 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8 - .byte 3, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 10, 10, 10, 10, 8, 8, 10, 8, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3 diff --git a/graphics/fonts/normal/latin_widths.inc b/graphics/fonts/normal/latin_widths.inc deleted file mode 100644 index 5d62068cd5..0000000000 --- a/graphics/fonts/normal/latin_widths.inc +++ /dev/null @@ -1,32 +0,0 @@ - .byte 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6 - .byte 8, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 3 - .byte 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 9, 7, 6, 3 - .byte 3, 3, 3, 3, 10, 8, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 6, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6 - .byte 3, 3, 3, 3, 3, 3, 3, 6, 3, 7, 7, 7, 7, 1, 2, 3 - .byte 4, 5, 6, 7, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 6, 3, 6, 3 - .byte 6, 6, 6, 3, 3, 6, 6, 6, 3, 7, 6, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6 - .byte 4, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 8 - .byte 3, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 10, 10, 10, 10, 8, 10, 10, 8, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3 diff --git a/graphics/fonts/short/japanese_widths.inc b/graphics/fonts/short/japanese_widths.inc deleted file mode 100644 index 22cad52817..0000000000 --- a/graphics/fonts/short/japanese_widths.inc +++ /dev/null @@ -1,32 +0,0 @@ - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9 - .byte 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9 - .byte 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 9, 10, 10, 10 - .byte 8, 10, 10, 10, 10, 8, 8, 8, 10, 10, 8, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6 - .byte 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 - .byte 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 diff --git a/graphics/fonts/short/latin_widths.inc b/graphics/fonts/short/latin_widths.inc deleted file mode 100644 index 79bf539bea..0000000000 --- a/graphics/fonts/short/latin_widths.inc +++ /dev/null @@ -1,32 +0,0 @@ - .byte 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6 - .byte 8, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 3 - .byte 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 9, 8, 8, 3 - .byte 3, 3, 3, 3, 10, 8, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 6, 6, 6, 8, 8, 8, 8, 8, 8, 4, 6, 8, 5, 5, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6 - .byte 3, 3, 3, 3, 3, 3, 3, 6, 3, 12, 12, 12, 12, 1, 2, 3 - .byte 4, 5, 6, 7, 8, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5 - .byte 6, 6, 6, 3, 3, 6, 6, 8, 5, 9, 6, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 4, 6, 5 - .byte 5, 6, 5, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, 6, 8 - .byte 5, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 12, 12, 12, 12, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3 diff --git a/graphics/fonts/small/latin_widths.inc b/graphics/fonts/small/latin_widths.inc deleted file mode 100644 index 2392e97179..0000000000 --- a/graphics/fonts/small/latin_widths.inc +++ /dev/null @@ -1,32 +0,0 @@ - .byte 3, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5 - .byte 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5, 5, 5, 5, 4, 3 - .byte 4, 4, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 8, 7, 8, 3 - .byte 3, 3, 3, 3, 8, 8, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 4, 7, 5, 5, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4 - .byte 3, 3, 3, 3, 3, 3, 3, 5, 3, 8, 8, 8, 8, 1, 2, 3 - .byte 4, 5, 6, 7, 5, 7, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5 - .byte 5, 5, 5, 5, 5, 5, 5, 8, 5, 8, 5, 5, 5, 5, 5, 5 - .byte 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5 - .byte 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5 - .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8 - .byte 7, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3 diff --git a/graphics/fonts/small_narrow/latin_widths.inc b/graphics/fonts/small_narrow/latin_widths.inc deleted file mode 100644 index 2e2a8d7464..0000000000 --- a/graphics/fonts/small_narrow/latin_widths.inc +++ /dev/null @@ -1,32 +0,0 @@ - .byte 3, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5 - .byte 5, 5, 5, 5, 5, 5, 5, 5, 3, 4, 5, 5, 5, 5, 4, 3 - .byte 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 3 - .byte 3, 3, 3, 3, 8, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 5, 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4 - .byte 3, 3, 3, 3, 3, 3, 3, 5, 3, 8, 8, 8, 8, 1, 2, 3 - .byte 4, 5, 6, 7, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 3, 5, 5 - .byte 5, 5, 5, 3, 3, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 5 - .byte 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5 - .byte 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 5 - .byte 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7 - .byte 3, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 - .byte 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3 diff --git a/graphics/fonts/unused_japanese_frlg_female_font_widths.inc b/graphics/fonts/unused_japanese_frlg_female_font_widths.inc deleted file mode 100644 index 56bdecb280..0000000000 --- a/graphics/fonts/unused_japanese_frlg_female_font_widths.inc +++ /dev/null @@ -1,32 +0,0 @@ - .byte 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9 - .byte 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9 - .byte 9, 9, 9, 9, 9, 9, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 9, 10, 10, 10 - .byte 8, 10, 10, 10, 10, 8, 8, 8, 10, 10, 8, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6 - .byte 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 - .byte 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 diff --git a/graphics/fonts/unused_japanese_frlg_male_font_widths.inc b/graphics/fonts/unused_japanese_frlg_male_font_widths.inc deleted file mode 100644 index ad18d28849..0000000000 --- a/graphics/fonts/unused_japanese_frlg_male_font_widths.inc +++ /dev/null @@ -1,32 +0,0 @@ - .byte 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9 - .byte 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 9, 10, 10, 10 - .byte 8, 10, 10, 10, 10, 8, 8, 8, 10, 10, 8, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 - .byte 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6 - .byte 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 - .byte 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 - .byte 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index fb2eee5051..c7beae14ac 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -289,58 +289,42 @@ $(TILESETGFXDIR)/secondary/mystery_events_house/tiles.4bpp: %.4bpp: %.png ### Fonts ### -$(FONTGFXDIR)/small/glyphs.latfont: $(FONTGFXDIR)/small/latin.png +$(FONTGFXDIR)/small.latfont: $(FONTGFXDIR)/latin_small.png $(GFX) $< $@ -$(FONTGFXDIR)/normal/glyphs.latfont: $(FONTGFXDIR)/normal/latin.png +$(FONTGFXDIR)/normal.latfont: $(FONTGFXDIR)/latin_normal.png $(GFX) $< $@ -$(FONTGFXDIR)/short/glyphs.latfont: $(FONTGFXDIR)/short/latin.png +$(FONTGFXDIR)/short.latfont: $(FONTGFXDIR)/latin_short.png $(GFX) $< $@ -$(FONTGFXDIR)/narrow/glyphs.latfont: $(FONTGFXDIR)/narrow/latin.png +$(FONTGFXDIR)/narrow.latfont: $(FONTGFXDIR)/latin_narrow.png $(GFX) $< $@ -$(FONTGFXDIR)/small_narrow/glyphs.latfont: $(FONTGFXDIR)/small_narrow/latin.png +$(FONTGFXDIR)/small_narrow.latfont: $(FONTGFXDIR)/latin_small_narrow.png $(GFX) $< $@ -$(FONTGFXDIR)/small/glyphs.hwjpnfont: $(FONTGFXDIR)/small/japanese.png +$(FONTGFXDIR)/small.hwjpnfont: $(FONTGFXDIR)/japanese_small.png $(GFX) $< $@ -$(FONTGFXDIR)/normal/glyphs.hwjpnfont: $(FONTGFXDIR)/normal/japanese.png +$(FONTGFXDIR)/normal.hwjpnfont: $(FONTGFXDIR)/japanese_normal.png $(GFX) $< $@ -$(FONTGFXDIR)/bold_glyphs.hwjpnfont: $(FONTGFXDIR)/bold_japanese.png +$(FONTGFXDIR)/bold.hwjpnfont: $(FONTGFXDIR)/japanese_bold.png $(GFX) $< $@ -$(FONTGFXDIR)/short/glyphs.fwjpnfont: $(FONTGFXDIR)/short/japanese.png +$(FONTGFXDIR)/short.fwjpnfont: $(FONTGFXDIR)/japanese_short.png $(GFX) $< $@ -$(FONTGFXDIR)/braille_glyphs.fwjpnfont: $(FONTGFXDIR)/braille.png +$(FONTGFXDIR)/braille.fwjpnfont: $(FONTGFXDIR)/braille.png $(GFX) $< $@ -$(FONTGFXDIR)/unused_frlg_male.fwjpnfont: $(FONTGFXDIR)/unused_japanese_frlg_male_font.png +$(FONTGFXDIR)/frlg_male.fwjpnfont: $(FONTGFXDIR)/japanese_frlg_male_font.png $(GFX) $< $@ -$(FONTGFXDIR)/unused_frlg_female.fwjpnfont: $(FONTGFXDIR)/unused_japanese_frlg_female_font.png +$(FONTGFXDIR)/frlg_female.fwjpnfont: $(FONTGFXDIR)/japanese_frlg_female_font.png $(GFX) $< $@ -$(FONTGFXDIR)/down_arrow.4bpp: %.4bpp: %.png - $(GFX) $< $@ - -$(FONTGFXDIR)/down_arrow_rs.4bpp: %.4bpp: %.png - $(GFX) $< $@ - -$(FONTGFXDIR)/unused_frlg_blanked_down_arrow.4bpp: %.4bpp: %.png - $(GFX) $< $@ - -$(FONTGFXDIR)/unused_frlg_down_arrow.4bpp: %.4bpp: %.png - $(GFX) $< $@ - -$(FONTGFXDIR)/keypad_icons.4bpp: %.4bpp: %.png - $(GFX) $< $@ - - ### Miscellaneous ### graphics/title_screen/pokemon_logo.gbapal: %.gbapal: %.pal diff --git a/include/fonts.h b/include/fonts.h new file mode 100644 index 0000000000..c21c75942d --- /dev/null +++ b/include/fonts.h @@ -0,0 +1,19 @@ +#ifndef GUARD_FONTS_H +#define GUARD_FONTS_H + +extern const u16 gFontNormalLatinGlyphs[]; +extern const u8 gFontNormalLatinGlyphWidths[]; +extern const u16 gFontNormalJapaneseGlyphs[]; +extern const u16 gFontSmallLatinGlyphs[]; +extern const u8 gFontSmallLatinGlyphWidths[]; +extern const u16 gFontSmallJapaneseGlyphs[]; +extern const u16 gFontShortLatinGlyphs[]; +extern const u8 gFontShortLatinGlyphWidths[]; +extern const u16 gFontShortJapaneseGlyphs[]; +extern const u8 gFontShortJapaneseGlyphWidths[]; +extern const u16 gFontNarrowLatinGlyphs[]; +extern const u8 gFontNarrowLatinGlyphWidths[]; +extern const u16 gFontSmallNarrowLatinGlyphs[]; +extern const u8 gFontSmallNarrowLatinGlyphWidths[]; + +#endif // GUARD_FONTS_H diff --git a/ld_script.txt b/ld_script.txt index 34ba15c582..e310bf717c 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -686,7 +686,7 @@ SECTIONS { src/gym_leader_rematch.o(.rodata); src/battle_transition_frontier.o(.rodata); src/text_input_strings.o(.rodata); - data/fonts.o(.rodata); + src/fonts.o(.rodata); src/mystery_event_msg.o(.rodata); data/mystery_gift.o(.rodata); src/m4a_tables.o(.rodata); diff --git a/src/battle_interface.c b/src/battle_interface.c index 933a75d436..085bb49679 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1180,7 +1180,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent) } ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3); - RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); + RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); for (i = 0; i < 3; i++) { @@ -1249,7 +1249,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3); if (!maxOrCurrent) StringCopy(txtPtr, gText_Slash); - RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); + RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); for (i = var; i < var + 3; i++) { @@ -1300,7 +1300,7 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon) var = 5; nature = GetNature(mon); StringCopy(text + 6, gNatureNamePointers[nature]); - RenderTextFont9(barFontGfx, FONT_BOLD, text); + RenderTextHandleBold(barFontGfx, FONT_BOLD, text); for (j = 6, i = 0; i < var; i++, j++) { @@ -1332,7 +1332,7 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon) ConvertIntToDecimalStringN(text + 9, gBattleStruct->safariEscapeFactor, STR_CONV_MODE_RIGHT_ALIGN, 2); text[5] = CHAR_SPACE; text[8] = CHAR_SLASH; - RenderTextFont9(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); + RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); j = healthBarSpriteId; // Needed to match for some reason. for (j = 0; j < 5; j++) diff --git a/src/braille.c b/src/braille.c index d43758f9e9..4e22a12efe 100644 --- a/src/braille.c +++ b/src/braille.c @@ -4,9 +4,12 @@ #include "text.h" #include "sound.h" +// This file handles the braille font. +// For printing braille messages, see ScrCmd_braillemessage + ALIGNED(4) static const u8 sScrollDistances[] = {1, 2, 4}; -static const u16 sFont_Braille[] = INCBIN_U16("graphics/fonts/braille_glyphs.fwjpnfont"); +static const u16 sFont_Braille[] = INCBIN_U16("graphics/fonts/braille.fwjpnfont"); static void DecompressGlyph_Braille(u16); diff --git a/src/fonts.c b/src/fonts.c new file mode 100644 index 0000000000..df904bacaf --- /dev/null +++ b/src/fonts.c @@ -0,0 +1,292 @@ +#include "global.h" + +ALIGNED(4) const u16 gFontSmallNarrowLatinGlyphs[] = INCBIN_U16("graphics/fonts/small_narrow.latfont"); +ALIGNED(4) const u8 gFontSmallNarrowLatinGlyphWidths[] = { + 3, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 3, 4, 5, 5, 5, 5, 4, 3, + 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 3, + 3, 3, 3, 3, 8, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4, + 3, 3, 3, 3, 3, 3, 3, 5, 3, 8, 8, 8, 8, 1, 2, 3, + 4, 5, 6, 7, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 3, 5, 5, + 5, 5, 5, 3, 3, 5, 5, 5, 3, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, + 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 5, + 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, + 3, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, +}; + +ALIGNED(4) const u16 gFontSmallLatinGlyphs[] = INCBIN_U16("graphics/fonts/small.latfont"); +ALIGNED(4) const u8 gFontSmallLatinGlyphWidths[] = { + 3, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5, 5, 5, 5, 4, 3, + 4, 4, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 8, 7, 8, 3, + 3, 3, 3, 3, 8, 8, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 4, 7, 5, 5, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4, + 3, 3, 3, 3, 3, 3, 3, 5, 3, 8, 8, 8, 8, 1, 2, 3, + 4, 5, 6, 7, 5, 7, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 8, 5, 8, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, + 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, + 7, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, +}; + +ALIGNED(4) const u16 gFontNarrowLatinGlyphs[] = INCBIN_U16("graphics/fonts/narrow.latfont"); +ALIGNED(4) const u8 gFontNarrowLatinGlyphWidths[] = { + 3, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, + 8, 5, 5, 5, 5, 6, 5, 5, 3, 5, 5, 5, 5, 5, 4, 3, + 4, 4, 5, 5, 5, 8, 5, 5, 5, 5, 5, 6, 9, 6, 6, 3, + 3, 3, 3, 3, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 5, 4, 8, 8, 8, 7, 8, 8, 4, 4, 6, 4, 4, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 3, 4, + 3, 3, 3, 3, 3, 3, 3, 5, 3, 7, 7, 7, 7, 1, 2, 3, + 4, 5, 6, 7, 5, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 3, 5, 3, + 5, 5, 5, 3, 3, 5, 5, 6, 3, 6, 6, 5, 5, 5, 5, 5, + 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, + 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, + 3, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 10, 10, 10, 10, 8, 8, 10, 8, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, +}; + +ALIGNED(4) const u16 gFontShortLatinGlyphs[] = INCBIN_U16("graphics/fonts/short.latfont"); +ALIGNED(4) const u8 gFontShortLatinGlyphWidths[] = { + 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, + 8, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 3, + 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 9, 8, 8, 3, + 3, 3, 3, 3, 10, 8, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 6, 6, 6, 8, 8, 8, 8, 8, 8, 4, 6, 8, 5, 5, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6, + 3, 3, 3, 3, 3, 3, 3, 6, 3, 12, 12, 12, 12, 1, 2, 3, + 4, 5, 6, 7, 8, 8, 8, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, + 6, 6, 6, 3, 3, 6, 6, 8, 5, 9, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 4, 6, 5, + 5, 6, 5, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, 6, 8, + 5, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 12, 12, 12, 12, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, +}; + +ALIGNED(4) const u16 gFontNormalLatinGlyphs[] = INCBIN_U16("graphics/fonts/normal.latfont"); +ALIGNED(4) const u8 gFontNormalLatinGlyphWidths[] = { + 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, + 8, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 3, + 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 9, 7, 6, 3, + 3, 3, 3, 3, 10, 8, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 6, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6, + 3, 3, 3, 3, 3, 3, 3, 6, 3, 7, 7, 7, 7, 1, 2, 3, + 4, 5, 6, 7, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 6, 3, 6, 3, + 6, 6, 6, 3, 3, 6, 6, 6, 3, 7, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6, + 4, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 8, + 3, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 10, 10, 10, 10, 8, 10, 10, 8, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, +}; + +ALIGNED(4) const u16 gFontSmallJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/small.hwjpnfont"); +ALIGNED(4) const u16 gFontNormalJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/normal.hwjpnfont"); + +ALIGNED(4) const u16 gFontFRLGMaleJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/frlg_male.fwjpnfont"); +ALIGNED(4) const u8 gFontFRLGMaleJapaneseGlyphWidths[] = { + 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 9, 10, 10, 10, + 8, 10, 10, 10, 10, 8, 8, 8, 10, 10, 8, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6, + 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +}; + +ALIGNED(4) const u16 gFontFRLGFemaleJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/frlg_female.fwjpnfont"); +ALIGNED(4) const u8 gFontFRLGFemaleJapaneseGlyphWidths[] = { + 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 9, 9, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 9, 10, 10, 10, + 8, 10, 10, 10, 10, 8, 8, 8, 10, 10, 8, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6, + 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +}; + +ALIGNED(4) const u16 gFontShortJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/short.fwjpnfont"); +ALIGNED(4) const u8 gFontShortJapaneseGlyphWidths[] = { + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 9, 10, 10, 10, + 8, 10, 10, 10, 10, 8, 8, 8, 10, 10, 8, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6, + 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, +}; From dac4192fd3b875706a7f1ce8bfb97c813ea503de Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 31 Oct 2021 16:36:31 -0400 Subject: [PATCH 117/417] Split headers from crt0 --- ld_script.txt | 4 + src/crt0.s | 100 ------------------------- asm/rom_header.inc => src/rom_header.s | 7 ++ src/rom_header_gf.s | 89 ++++++++++++++++++++++ 4 files changed, 100 insertions(+), 100 deletions(-) rename asm/rom_header.inc => src/rom_header.s (73%) create mode 100644 src/rom_header_gf.s diff --git a/ld_script.txt b/ld_script.txt index 3c1a250944..10abd88105 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -47,6 +47,8 @@ SECTIONS { .text : ALIGN(4) { + src/rom_header.o(.text); + src/rom_header_gf.o(.text); src/crt0.o(.text); src/main.o(.text); gflib/malloc.o(.text); @@ -435,6 +437,8 @@ SECTIONS { .rodata : ALIGN(4) { + src/rom_header.o(.rodata); + src/rom_header_gf.o(.rodata); src/main.o(.rodata); gflib/bg.o(.rodata); gflib/window.o(.rodata); diff --git a/src/crt0.s b/src/crt0.s index 672fc94f2a..6e3b86a72f 100644 --- a/src/crt0.s +++ b/src/crt0.s @@ -1,107 +1,7 @@ -#include "constants/global.h" .include "constants/gba_constants.inc" .syntax unified - .global Start - - .text - - .arm - -Start: @ 8000000 - b Init - - .include "asm/rom_header.inc" - -@ 80000C0 - .word 0 - - .global GPIOPortData -GPIOPortData: @ 80000C4 - .2byte 0 - - .global GPIOPortDirection -GPIOPortDirection: @ 80000C6 - .2byte 0 - - .global GPIOPortReadEnable -GPIOPortReadEnable: @ 80000C8 - .2byte 0 - -@ 80000CA - .2byte 0 - -@ 80000CC - .space 0x34 - - .4byte GAME_VERSION - .4byte GAME_LANGUAGE - - .ascii "pokemon emerald version" - .space 9 - - .4byte gMonFrontPicTable - .4byte gMonBackPicTable - .4byte gMonPaletteTable - .4byte gMonShinyPaletteTable - .4byte gMonIconTable - .4byte gMonIconPaletteIndices - .4byte gMonIconPaletteTable - .4byte gSpeciesNames - .4byte gMoveNames - .4byte gDecorations - - .4byte 0x00001270 @ offsetof(struct SaveBlock1, flags) - .4byte 0x0000139c @ offsetof(struct SaveBlock1, vars) - .4byte 0x00000018 @ offsetof(struct SaveBlock2, pokedex) - .4byte 0x00000988 @ offsetof(struct SaveBlock1, seen1) - .4byte 0x00003b24 @ offsetof(struct SaveBlock1, seen2) - .4byte 0x00000046 @ ? - .4byte 0x000008e4 @ ? - .4byte 0x000008ac @ ? - .4byte 0x00000182 @ NATIONAL_DEX_COUNT? - - .byte 0x07, 0x0a, 0x0a, 0x0a, 0x0c, 0x0c, 0x06, 0x0c - .byte 0x06, 0x10, 0x12, 0x0c, 0x0f, 0x0b, 0x01, 0x08 - - .4byte 0x0000000c @ ? - .4byte 0x00000f2c @ sizeof(struct SaveBlock2) - .4byte 0x00003d88 @ sizeof(struct SaveBlock1) - .4byte 0x00000234 @ offsetof(struct SaveBlock1, playerPartyCount) - .4byte 0x00000238 @ offsetof(struct SaveBlock1, playerParty) - .4byte 0x00000009 @ offsetof(struct SaveBlock2, specialSaveWarpFlags) - .4byte 0x0000000a @ offsetof(struct SaveBlock2, playerTrainerId) - .4byte 0x00000000 @ offsetof(struct SaveBlock2, playerName) - .4byte 0x00000008 @ offsetof(struct SaveBlock2, playerGender) - .4byte 0x00000ca8 @ offsetof(struct SaveBlock2, frontier.challengeStatus) - .4byte 0x00000ca8 @ offsetof(struct SaveBlock2, frontier.challengeStatus) - .4byte 0x000031c7 @ offsetof(struct SaveBlock1, externalEventFlags) - .4byte 0x000031b3 @ offsetof(struct SaveBlock1, externalEventData) - .4byte 0x00000000 - - .4byte gBaseStats - .4byte gAbilityNames - .4byte gAbilityDescriptionPointers - .4byte gItems - .4byte gBattleMoves - .4byte gBallSpriteSheets - .4byte gBallSpritePalettes - - .4byte 0x000000a8 @ offsetof(struct SaveBlock2, gcnLinkFlags) - .4byte 0x00000864 @ ? - .4byte 0x0000089b @ ? - - .byte 0x1e, 0x1e, 0x10, 0x40 - - .4byte 0x0000322e @ offsetof(struct SaveBlock1, ? part-way into mysteryGift) - .4byte 0x00000498 @ offsetof(struct SaveBlock1, pcItems) - .4byte 0x000031a8 @ offsetof(struct SaveBlock1, giftRibbons) - .4byte 0x000031f8 @ offsetof(struct SaveBlock1, enigmaBerry) - .4byte 0x00000034 @ offsetof(struct SaveBlock1, mapView) - .4byte 0x00000000 - .4byte 0x00000000 - .arm .align 2, 0 .global Init diff --git a/asm/rom_header.inc b/src/rom_header.s similarity index 73% rename from asm/rom_header.inc rename to src/rom_header.s index 6730efae28..596fd379f5 100644 --- a/asm/rom_header.inc +++ b/src/rom_header.s @@ -1,3 +1,10 @@ +@ Note: ROM header data is empty space here. +@ It's populated by gbafix using data provided in the Makefile. + + .global Start +Start: @ 8000000 + b Init + .global RomHeaderNintendoLogo RomHeaderNintendoLogo: .space 156 diff --git a/src/rom_header_gf.s b/src/rom_header_gf.s new file mode 100644 index 0000000000..b021158f53 --- /dev/null +++ b/src/rom_header_gf.s @@ -0,0 +1,89 @@ +#include "constants/global.h" + +@ 80000C0 + .word 0 + + .global GPIOPortData +GPIOPortData: @ 80000C4 + .2byte 0 + + .global GPIOPortDirection +GPIOPortDirection: @ 80000C6 + .2byte 0 + + .global GPIOPortReadEnable +GPIOPortReadEnable: @ 80000C8 + .2byte 0 + +@ 80000CA + .2byte 0 + +@ 80000CC + .space 0x34 + + .4byte GAME_VERSION + .4byte GAME_LANGUAGE + + .ascii "pokemon emerald version" + .space 9 + + .4byte gMonFrontPicTable + .4byte gMonBackPicTable + .4byte gMonPaletteTable + .4byte gMonShinyPaletteTable + .4byte gMonIconTable + .4byte gMonIconPaletteIndices + .4byte gMonIconPaletteTable + .4byte gSpeciesNames + .4byte gMoveNames + .4byte gDecorations + + .4byte 0x00001270 @ offsetof(struct SaveBlock1, flags) + .4byte 0x0000139c @ offsetof(struct SaveBlock1, vars) + .4byte 0x00000018 @ offsetof(struct SaveBlock2, pokedex) + .4byte 0x00000988 @ offsetof(struct SaveBlock1, seen1) + .4byte 0x00003b24 @ offsetof(struct SaveBlock1, seen2) + .4byte 0x00000046 @ ? + .4byte 0x000008e4 @ ? + .4byte 0x000008ac @ ? + .4byte 0x00000182 @ NATIONAL_DEX_COUNT? + + .byte 0x07, 0x0a, 0x0a, 0x0a, 0x0c, 0x0c, 0x06, 0x0c + .byte 0x06, 0x10, 0x12, 0x0c, 0x0f, 0x0b, 0x01, 0x08 + + .4byte 0x0000000c @ ? + .4byte 0x00000f2c @ sizeof(struct SaveBlock2) + .4byte 0x00003d88 @ sizeof(struct SaveBlock1) + .4byte 0x00000234 @ offsetof(struct SaveBlock1, playerPartyCount) + .4byte 0x00000238 @ offsetof(struct SaveBlock1, playerParty) + .4byte 0x00000009 @ offsetof(struct SaveBlock2, specialSaveWarpFlags) + .4byte 0x0000000a @ offsetof(struct SaveBlock2, playerTrainerId) + .4byte 0x00000000 @ offsetof(struct SaveBlock2, playerName) + .4byte 0x00000008 @ offsetof(struct SaveBlock2, playerGender) + .4byte 0x00000ca8 @ offsetof(struct SaveBlock2, frontier.challengeStatus) + .4byte 0x00000ca8 @ offsetof(struct SaveBlock2, frontier.challengeStatus) + .4byte 0x000031c7 @ offsetof(struct SaveBlock1, externalEventFlags) + .4byte 0x000031b3 @ offsetof(struct SaveBlock1, externalEventData) + .4byte 0x00000000 + + .4byte gBaseStats + .4byte gAbilityNames + .4byte gAbilityDescriptionPointers + .4byte gItems + .4byte gBattleMoves + .4byte gBallSpriteSheets + .4byte gBallSpritePalettes + + .4byte 0x000000a8 @ offsetof(struct SaveBlock2, gcnLinkFlags) + .4byte 0x00000864 @ ? + .4byte 0x0000089b @ ? + + .byte 0x1e, 0x1e, 0x10, 0x40 + + .4byte 0x0000322e @ offsetof(struct SaveBlock1, ? part-way into mysteryGift) + .4byte 0x00000498 @ offsetof(struct SaveBlock1, pcItems) + .4byte 0x000031a8 @ offsetof(struct SaveBlock1, giftRibbons) + .4byte 0x000031f8 @ offsetof(struct SaveBlock1, enigmaBerry) + .4byte 0x00000034 @ offsetof(struct SaveBlock1, mapView) + .4byte 0x00000000 + .4byte 0x00000000 From ef2971d8dcc0768265d9b8c0eec40ea55251db8b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 1 Nov 2021 01:42:02 -0400 Subject: [PATCH 118/417] Convert GF ROM header to C --- include/item.h | 1 + include/pokeball.h | 2 + include/pokemon_icon.h | 2 + src/crt0.s | 1 + src/rom_header.s | 21 ++++++ src/rom_header_gf.c | 162 +++++++++++++++++++++++++++++++++++++++++ src/rom_header_gf.s | 89 ---------------------- 7 files changed, 189 insertions(+), 89 deletions(-) create mode 100644 src/rom_header_gf.c delete mode 100644 src/rom_header_gf.s diff --git a/include/item.h b/include/item.h index 87ff57bc79..ceca83bd5f 100644 --- a/include/item.h +++ b/include/item.h @@ -29,6 +29,7 @@ struct BagPocket u8 capacity; }; +extern const struct Item gItems[]; extern struct BagPocket gBagPockets[]; void ApplyNewEncryptionKeyToBagItems(u32 newKey); diff --git a/include/pokeball.h b/include/pokeball.h index d88e80173b..297788db12 100644 --- a/include/pokeball.h +++ b/include/pokeball.h @@ -26,6 +26,8 @@ enum { BALL_AFFINE_ANIM_4 }; +extern const struct CompressedSpriteSheet gBallSpriteSheets[]; +extern const struct CompressedSpritePalette gBallSpritePalettes[]; extern const struct SpriteTemplate gBallSpriteTemplates[]; #define POKEBALL_PLAYER_SENDOUT 0xFF diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 4731da90e9..9b917c3bf4 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -2,6 +2,8 @@ #define GUARD_POKEMON_ICON_H extern const u8 gMonIconPaletteIndices[]; +extern const u8 *const gMonIconTable[]; +extern const struct SpritePalette gMonIconPaletteTable[]; const u8 *GetMonIconTiles(u16 species, bool32); void TryLoadAllMonIconPalettesAtOffset(u16 offset); diff --git a/src/crt0.s b/src/crt0.s index 6e3b86a72f..7c679c13b5 100644 --- a/src/crt0.s +++ b/src/crt0.s @@ -3,6 +3,7 @@ .syntax unified .arm + .align 2, 0 .global Init Init: @ 8000204 diff --git a/src/rom_header.s b/src/rom_header.s index 596fd379f5..5ed45124de 100644 --- a/src/rom_header.s +++ b/src/rom_header.s @@ -40,3 +40,24 @@ RomHeaderChecksum: RomHeaderReserved2: .space 2 + +@ 80000C0 + .word 0 + + .global GPIOPortData +GPIOPortData: @ 80000C4 + .2byte 0 + + .global GPIOPortDirection +GPIOPortDirection: @ 80000C6 + .2byte 0 + + .global GPIOPortReadEnable +GPIOPortReadEnable: @ 80000C8 + .2byte 0 + +@ 80000CA + .2byte 0 + +@ 80000CC + .space 0x34 diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c new file mode 100644 index 0000000000..dc61fa1e36 --- /dev/null +++ b/src/rom_header_gf.c @@ -0,0 +1,162 @@ +#include "global.h" +#include "data.h" +#include "pokemon_icon.h" +#include "decoration.h" +#include "battle_main.h" +#include "item.h" +#include "pokeball.h" + +struct GFRomHeader +{ + u32 version; + u32 language; + u8 gameName[32]; + const struct CompressedSpriteSheet * monFrontPics; + const struct CompressedSpriteSheet * monBackPics; + const struct CompressedSpritePalette * monNormalPalettes; + const struct CompressedSpritePalette * monShinyPalettes; + const u8 * const * monIcons; + const u8 * monIconPaletteIds; + const struct SpritePalette * monIconPalettes; + const u8 (* monSpeciesNames)[]; + const u8 (* moveNames)[]; + const struct Decoration * decorations; + u32 flagsOffset; + u32 varsOffset; + u32 pokedexOffset; + u32 seen1Offset; + u32 seen2Offset; + u32 unk_01; + u32 unk_02; + u32 unk_03; + u32 dexCount; + u8 unk_04; + u8 unk_05; + u8 unk_06; + u8 unk_07; + u8 unk_08; + u8 unk_09; + u8 unk_0A; + u8 unk_0B; + u8 unk_0C; + u8 unk_0D; + u8 unk_0E; + u8 unk_0F; + u8 unk_10; + u8 unk_11; + u8 unk_12; + u8 unk_13; + u8 unk_14; + u32 saveBlock2Size; + u32 saveBlock1Size; + u32 partyCountOffset; + u32 partyOffset; + u32 warpFlagsOffset; + u32 trainerIdOffset; + u32 playerNameOffset; + u32 playerGenderOffset; + u32 frontierStatusOffset; + u32 frontierStatusOffset2; + u32 externalEventFlagsOffset; + u32 externalEventDataOffset; + u32 unk_15; + const struct BaseStats * baseStats; + const u8 (* abilityNames)[]; + const u8 * const * abilityDescriptions; + const struct Item * items; + const struct BattleMove * moves; + const struct CompressedSpriteSheet * ballGfx; + const struct CompressedSpritePalette * ballPalettes; + u32 gcnLinkFlagsOffset; + u32 unk_16; + u32 unk_17; + u8 unk_18; + u8 unk_19; + u8 unk_1A; + u8 unk_1B; + u32 unk_1C; + u32 pcItemsOffset; + u32 giftRibbonsOffset; + u32 enigmaBerryOffset; + u32 mapViewOffset; + u32 unk_1D; + u32 unk_1E; +}; + +__attribute__((section(".text"))) +static const struct GFRomHeader sGFRomHeader = { + .version = GAME_VERSION, + .language = GAME_LANGUAGE, + .gameName = "pokemon emerald version", + .monFrontPics = gMonFrontPicTable, + .monBackPics = gMonBackPicTable, + .monNormalPalettes = gMonPaletteTable, + .monShinyPalettes = gMonShinyPaletteTable, + .monIcons = gMonIconTable, + .monIconPaletteIds = gMonIconPaletteIndices, + .monIconPalettes = gMonIconPaletteTable, + .monSpeciesNames = gSpeciesNames, + .moveNames = gMoveNames, + .decorations = gDecorations, + .flagsOffset = offsetof(struct SaveBlock1, flags), + .varsOffset = offsetof(struct SaveBlock1, vars), + .pokedexOffset = offsetof(struct SaveBlock2, pokedex), + .seen1Offset = offsetof(struct SaveBlock1, seen1), + .seen2Offset = offsetof(struct SaveBlock1, seen2), + .unk_01 = 0x00000046, + .unk_02 = 0x000008e4, + .unk_03 = 0x000008ac, + .dexCount = NATIONAL_DEX_COUNT, + .unk_04 = 0x07, + .unk_05 = 0x0a, + .unk_06 = 0x0a, + .unk_07 = 0x0a, + .unk_08 = 0x0c, + .unk_09 = 0x0c, + .unk_0A = 0x06, + .unk_0B = 0x0c, + .unk_0C = 0x06, + .unk_0D = 0x10, + .unk_0E = 0x12, + .unk_0F = 0x0c, + .unk_10 = 0x0f, + .unk_11 = 0x0b, + .unk_12 = 0x01, + .unk_13 = 0x08, + .unk_14 = 0x0c, + .saveBlock2Size = sizeof(struct SaveBlock2), + .saveBlock1Size = sizeof(struct SaveBlock1), + .partyCountOffset = offsetof(struct SaveBlock1, playerPartyCount), + .partyOffset = offsetof(struct SaveBlock1, playerParty), + .warpFlagsOffset = offsetof(struct SaveBlock2, specialSaveWarpFlags), + .trainerIdOffset = offsetof(struct SaveBlock2, playerTrainerId), + .playerNameOffset = offsetof(struct SaveBlock2, playerName), + .playerGenderOffset = offsetof(struct SaveBlock2, playerGender), + .frontierStatusOffset = offsetof(struct SaveBlock2, frontier.challengeStatus), + .frontierStatusOffset2 = offsetof(struct SaveBlock2, frontier.challengeStatus), + .externalEventFlagsOffset = offsetof(struct SaveBlock1, externalEventFlags), + .externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData), + .unk_15 = 0x00000000, + .baseStats = gBaseStats, + .abilityNames = gAbilityNames, + .abilityDescriptions = gAbilityDescriptionPointers, + .items = gItems, + .moves = gBattleMoves, + .ballGfx = gBallSpriteSheets, + .ballPalettes = gBallSpritePalettes, + .gcnLinkFlagsOffset = offsetof(struct SaveBlock2, gcnLinkFlags), + .unk_16 = 0x00000864, + .unk_17 = 0x0000089b, + .unk_18 = 0x1e, + .unk_19 = 0x1e, + .unk_1A = 0x10, + .unk_1B = 0x40, + .unk_1C = 0x0000322e, // offsetof(struct SaveBlock1, ? part-way into mysteryGift) + .pcItemsOffset = offsetof(struct SaveBlock1, pcItems), + .giftRibbonsOffset = offsetof(struct SaveBlock1, giftRibbons), + .enigmaBerryOffset = offsetof(struct SaveBlock1, enigmaBerry), + .mapViewOffset = offsetof(struct SaveBlock1, mapView), + .unk_1D = 0x00000000, + .unk_1E = 0x00000000, +}; + diff --git a/src/rom_header_gf.s b/src/rom_header_gf.s deleted file mode 100644 index b021158f53..0000000000 --- a/src/rom_header_gf.s +++ /dev/null @@ -1,89 +0,0 @@ -#include "constants/global.h" - -@ 80000C0 - .word 0 - - .global GPIOPortData -GPIOPortData: @ 80000C4 - .2byte 0 - - .global GPIOPortDirection -GPIOPortDirection: @ 80000C6 - .2byte 0 - - .global GPIOPortReadEnable -GPIOPortReadEnable: @ 80000C8 - .2byte 0 - -@ 80000CA - .2byte 0 - -@ 80000CC - .space 0x34 - - .4byte GAME_VERSION - .4byte GAME_LANGUAGE - - .ascii "pokemon emerald version" - .space 9 - - .4byte gMonFrontPicTable - .4byte gMonBackPicTable - .4byte gMonPaletteTable - .4byte gMonShinyPaletteTable - .4byte gMonIconTable - .4byte gMonIconPaletteIndices - .4byte gMonIconPaletteTable - .4byte gSpeciesNames - .4byte gMoveNames - .4byte gDecorations - - .4byte 0x00001270 @ offsetof(struct SaveBlock1, flags) - .4byte 0x0000139c @ offsetof(struct SaveBlock1, vars) - .4byte 0x00000018 @ offsetof(struct SaveBlock2, pokedex) - .4byte 0x00000988 @ offsetof(struct SaveBlock1, seen1) - .4byte 0x00003b24 @ offsetof(struct SaveBlock1, seen2) - .4byte 0x00000046 @ ? - .4byte 0x000008e4 @ ? - .4byte 0x000008ac @ ? - .4byte 0x00000182 @ NATIONAL_DEX_COUNT? - - .byte 0x07, 0x0a, 0x0a, 0x0a, 0x0c, 0x0c, 0x06, 0x0c - .byte 0x06, 0x10, 0x12, 0x0c, 0x0f, 0x0b, 0x01, 0x08 - - .4byte 0x0000000c @ ? - .4byte 0x00000f2c @ sizeof(struct SaveBlock2) - .4byte 0x00003d88 @ sizeof(struct SaveBlock1) - .4byte 0x00000234 @ offsetof(struct SaveBlock1, playerPartyCount) - .4byte 0x00000238 @ offsetof(struct SaveBlock1, playerParty) - .4byte 0x00000009 @ offsetof(struct SaveBlock2, specialSaveWarpFlags) - .4byte 0x0000000a @ offsetof(struct SaveBlock2, playerTrainerId) - .4byte 0x00000000 @ offsetof(struct SaveBlock2, playerName) - .4byte 0x00000008 @ offsetof(struct SaveBlock2, playerGender) - .4byte 0x00000ca8 @ offsetof(struct SaveBlock2, frontier.challengeStatus) - .4byte 0x00000ca8 @ offsetof(struct SaveBlock2, frontier.challengeStatus) - .4byte 0x000031c7 @ offsetof(struct SaveBlock1, externalEventFlags) - .4byte 0x000031b3 @ offsetof(struct SaveBlock1, externalEventData) - .4byte 0x00000000 - - .4byte gBaseStats - .4byte gAbilityNames - .4byte gAbilityDescriptionPointers - .4byte gItems - .4byte gBattleMoves - .4byte gBallSpriteSheets - .4byte gBallSpritePalettes - - .4byte 0x000000a8 @ offsetof(struct SaveBlock2, gcnLinkFlags) - .4byte 0x00000864 @ ? - .4byte 0x0000089b @ ? - - .byte 0x1e, 0x1e, 0x10, 0x40 - - .4byte 0x0000322e @ offsetof(struct SaveBlock1, ? part-way into mysteryGift) - .4byte 0x00000498 @ offsetof(struct SaveBlock1, pcItems) - .4byte 0x000031a8 @ offsetof(struct SaveBlock1, giftRibbons) - .4byte 0x000031f8 @ offsetof(struct SaveBlock1, enigmaBerry) - .4byte 0x00000034 @ offsetof(struct SaveBlock1, mapView) - .4byte 0x00000000 - .4byte 0x00000000 From e0e2212db300566d17468fc237a2708455ed3034 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 1 Nov 2021 01:47:38 -0400 Subject: [PATCH 119/417] Avoid changed section warning --- ld_script.txt | 2 +- src/rom_header_gf.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ld_script.txt b/ld_script.txt index 10abd88105..9c81f1da91 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -48,7 +48,7 @@ SECTIONS { ALIGN(4) { src/rom_header.o(.text); - src/rom_header_gf.o(.text); + src/rom_header_gf.o(.text.*); src/crt0.o(.text); src/main.o(.text); gflib/malloc.o(.text); diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c index dc61fa1e36..5e78e3a932 100644 --- a/src/rom_header_gf.c +++ b/src/rom_header_gf.c @@ -83,7 +83,9 @@ struct GFRomHeader u32 unk_1E; }; -__attribute__((section(".text"))) +// This seems to need to be in the text section for some reason. +// To avoid a changed section warning it's put in a special .text.consts section instead of .text. +__attribute__((section(".text.consts"))) static const struct GFRomHeader sGFRomHeader = { .version = GAME_VERSION, .language = GAME_LANGUAGE, From 9b2038a9a55f49969a2c7f650865ed47bea9b99d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 1 Nov 2021 02:34:38 -0400 Subject: [PATCH 120/417] Additional GF ROM header doc --- src/rom_header_gf.c | 129 ++++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 64 deletions(-) diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c index 5e78e3a932..782a05c75c 100644 --- a/src/rom_header_gf.c +++ b/src/rom_header_gf.c @@ -26,27 +26,27 @@ struct GFRomHeader u32 pokedexOffset; u32 seen1Offset; u32 seen2Offset; - u32 unk_01; - u32 unk_02; - u32 unk_03; - u32 dexCount; - u8 unk_04; - u8 unk_05; - u8 unk_06; - u8 unk_07; - u8 unk_08; - u8 unk_09; - u8 unk_0A; - u8 unk_0B; - u8 unk_0C; - u8 unk_0D; - u8 unk_0E; - u8 unk_0F; - u8 unk_10; - u8 unk_11; - u8 unk_12; - u8 unk_13; - u8 unk_14; + u32 pokedexVar; + u32 pokedexFlag; + u32 mysteryEventFlag; + u32 pokedexCount; + u8 unk1; + u8 unk2; + u8 unk3; + u8 unk4; + u8 unk5; + u8 unk6; + u8 unk7; + u8 unk8; + u8 unk9; + u8 unk10; + u8 unk11; + u8 unk12; + u8 unk13; + u8 unk14; + u8 unk15; + u8 unk16; + u8 unk17; u32 saveBlock2Size; u32 saveBlock1Size; u32 partyCountOffset; @@ -59,7 +59,7 @@ struct GFRomHeader u32 frontierStatusOffset2; u32 externalEventFlagsOffset; u32 externalEventDataOffset; - u32 unk_15; + u32 unk18; const struct BaseStats * baseStats; const u8 (* abilityNames)[]; const u8 * const * abilityDescriptions; @@ -68,23 +68,24 @@ struct GFRomHeader const struct CompressedSpriteSheet * ballGfx; const struct CompressedSpritePalette * ballPalettes; u32 gcnLinkFlagsOffset; - u32 unk_16; - u32 unk_17; - u8 unk_18; - u8 unk_19; - u8 unk_1A; - u8 unk_1B; - u32 unk_1C; + u32 gameClearFlag; + u32 ribbonFlag; + u8 bagCountItems; + u8 bagCountKeyItems; + u8 bagCountPokeballs; + u8 bagCountTMHMs; + u8 bagCountBerries; + u8 pcItemsCount; u32 pcItemsOffset; u32 giftRibbonsOffset; u32 enigmaBerryOffset; u32 mapViewOffset; - u32 unk_1D; - u32 unk_1E; + u32 unk19; + u32 unk20; }; // This seems to need to be in the text section for some reason. -// To avoid a changed section warning it's put in a special .text.consts section instead of .text. +// To avoid a changed section attributes warning it's put in a special .text.consts section. __attribute__((section(".text.consts"))) static const struct GFRomHeader sGFRomHeader = { .version = GAME_VERSION, @@ -105,27 +106,27 @@ static const struct GFRomHeader sGFRomHeader = { .pokedexOffset = offsetof(struct SaveBlock2, pokedex), .seen1Offset = offsetof(struct SaveBlock1, seen1), .seen2Offset = offsetof(struct SaveBlock1, seen2), - .unk_01 = 0x00000046, - .unk_02 = 0x000008e4, - .unk_03 = 0x000008ac, - .dexCount = NATIONAL_DEX_COUNT, - .unk_04 = 0x07, - .unk_05 = 0x0a, - .unk_06 = 0x0a, - .unk_07 = 0x0a, - .unk_08 = 0x0c, - .unk_09 = 0x0c, - .unk_0A = 0x06, - .unk_0B = 0x0c, - .unk_0C = 0x06, - .unk_0D = 0x10, - .unk_0E = 0x12, - .unk_0F = 0x0c, - .unk_10 = 0x0f, - .unk_11 = 0x0b, - .unk_12 = 0x01, - .unk_13 = 0x08, - .unk_14 = 0x0c, + .pokedexVar = VAR_NATIONAL_DEX - VARS_START, + .pokedexFlag = FLAG_RECEIVED_POKEDEX_FROM_BIRCH, + .mysteryEventFlag = FLAG_SYS_MYSTERY_EVENT_ENABLE, + .pokedexCount = NATIONAL_DEX_COUNT, + .unk1 = 0x07, + .unk2 = 0x0a, + .unk3 = 0x0a, + .unk4 = 0x0a, + .unk5 = 0x0c, + .unk6 = 0x0c, + .unk7 = 0x06, + .unk8 = 0x0c, + .unk9 = 0x06, + .unk10 = 0x10, + .unk11 = 0x12, + .unk12 = 0x0c, + .unk13 = 0x0f, + .unk14 = 0x0b, + .unk15 = 0x01, + .unk16 = 0x08, + .unk17 = 0x0c, .saveBlock2Size = sizeof(struct SaveBlock2), .saveBlock1Size = sizeof(struct SaveBlock1), .partyCountOffset = offsetof(struct SaveBlock1, playerPartyCount), @@ -138,7 +139,7 @@ static const struct GFRomHeader sGFRomHeader = { .frontierStatusOffset2 = offsetof(struct SaveBlock2, frontier.challengeStatus), .externalEventFlagsOffset = offsetof(struct SaveBlock1, externalEventFlags), .externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData), - .unk_15 = 0x00000000, + .unk18 = 0x00000000, .baseStats = gBaseStats, .abilityNames = gAbilityNames, .abilityDescriptions = gAbilityDescriptionPointers, @@ -147,18 +148,18 @@ static const struct GFRomHeader sGFRomHeader = { .ballGfx = gBallSpriteSheets, .ballPalettes = gBallSpritePalettes, .gcnLinkFlagsOffset = offsetof(struct SaveBlock2, gcnLinkFlags), - .unk_16 = 0x00000864, - .unk_17 = 0x0000089b, - .unk_18 = 0x1e, - .unk_19 = 0x1e, - .unk_1A = 0x10, - .unk_1B = 0x40, - .unk_1C = 0x0000322e, // offsetof(struct SaveBlock1, ? part-way into mysteryGift) + .gameClearFlag = FLAG_SYS_GAME_CLEAR, + .ribbonFlag = FLAG_SYS_RIBBON_GET, + .bagCountItems = BAG_ITEMS_COUNT, + .bagCountKeyItems = BAG_KEYITEMS_COUNT, + .bagCountPokeballs = BAG_POKEBALLS_COUNT, + .bagCountTMHMs = BAG_TMHM_COUNT, + .bagCountBerries = BAG_BERRIES_COUNT, + .pcItemsCount = PC_ITEMS_COUNT, .pcItemsOffset = offsetof(struct SaveBlock1, pcItems), .giftRibbonsOffset = offsetof(struct SaveBlock1, giftRibbons), .enigmaBerryOffset = offsetof(struct SaveBlock1, enigmaBerry), .mapViewOffset = offsetof(struct SaveBlock1, mapView), - .unk_1D = 0x00000000, - .unk_1E = 0x00000000, + .unk19 = 0x00000000, + .unk20 = 0x00000000, // 0xFFFFFFFF in FRLG }; - From f3013d8ee923472e89fe01fdbc3d386bb5006cec Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 1 Nov 2021 18:36:35 -0300 Subject: [PATCH 121/417] Standarized Solarbeam into Solar Beam --- data/battle_ai_scripts.s | 4 +- data/battle_anim_scripts.s | 64 +++--- data/battle_scripts_1.s | 14 +- include/constants/battle_anim.h | 6 +- include/constants/battle_move_effects.h | 2 +- include/constants/items.h | 2 +- include/graphics.h | 2 +- src/battle_ai_script_commands.c | 2 +- src/battle_anim_effects_1.c | 72 +++---- src/battle_script_commands.c | 6 +- src/battle_tv.c | 2 +- src/data/battle_anim.h | 6 +- src/data/battle_moves.h | 2 +- src/data/items.h | 4 +- src/data/pokemon/tmhm_learnsets.h | 248 ++++++++++++------------ src/graphics.c | 4 +- 16 files changed, 220 insertions(+), 220 deletions(-) diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index 0d4c85771d..d856b926a2 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -735,7 +735,7 @@ AI_CheckViability: if_effect EFFECT_PSYCH_UP, AI_CV_PsychUp if_effect EFFECT_MIRROR_COAT, AI_CV_MirrorCoat if_effect EFFECT_SKULL_BASH, AI_CV_ChargeUpMove - if_effect EFFECT_SOLARBEAM, AI_CV_ChargeUpMove + if_effect EFFECT_SOLAR_BEAM, AI_CV_ChargeUpMove if_effect EFFECT_SEMI_INVULNERABLE, AI_CV_SemiInvulnerable if_effect EFFECT_SOFTBOILED, AI_CV_Heal if_effect EFFECT_FAKE_OUT, AI_CV_FakeOut @@ -3051,7 +3051,7 @@ AI_HPAware_DiscouragedEffectsWhenLowHP: .byte EFFECT_BELLY_DRUM .byte EFFECT_PSYCH_UP .byte EFFECT_MIRROR_COAT - .byte EFFECT_SOLARBEAM + .byte EFFECT_SOLAR_BEAM .byte EFFECT_ERUPTION .byte EFFECT_TICKLE .byte EFFECT_COSMIC_POWER diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 45cf17c348..2c5c9ba046 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -5474,45 +5474,45 @@ SolarBeamAbsorbEffect: delay 2 return SolarBeamUnleash: - call SetSolarbeamBg + call SetSolarBeamBg panse SE_M_SOLAR_BEAM, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 - createvisualtask AnimTask_CreateSmallSolarbeamOrbs, 5 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0 + createvisualtask AnimTask_CreateSmallSolarBeamOrbs, 5 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1 delay 4 createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 0, 10, RGB(25, 31, 0) - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2 delay 4 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 65, 1 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 3 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 3 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 4 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 4 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 5 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 5 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 6 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 6 delay 4 call SolarBeamUnleash1 call SolarBeamUnleash1 waitforvisualfinish createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 10, 0, RGB(25, 31, 0) - call UnsetSolarbeamBg + call UnsetSolarBeamBg goto SolarBeamEnd SolarBeamUnleash1: - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 3 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 3 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 4 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 4 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 5 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 5 delay 4 - createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 6 + createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 6 delay 4 return @@ -10189,26 +10189,26 @@ UnsetSkyBg: waitbgfadein return -SetSolarbeamBg: +SetSolarBeamBg: createvisualtask AnimTask_IsContest, 2 - jumprettrue SetSolarbeamBgContest + jumprettrue SetSolarBeamBgContest createvisualtask AnimTask_IsTargetPlayerSide, 2 - jumpretfalse SetSolarbeamBgOpponent - goto SetSolarbeamBgPlayer -SetSolarbeamBgContinue: + jumpretfalse SetSolarBeamBgOpponent + goto SetSolarBeamBgPlayer +SetSolarBeamBgContinue: waitbgfadein return -SetSolarbeamBgContest: - fadetobg BG_SOLARBEAM_CONTESTS - goto SetSolarbeamBgContinue -SetSolarbeamBgPlayer: - fadetobg BG_SOLARBEAM_PLAYER - goto SetSolarbeamBgContinue -SetSolarbeamBgOpponent: - fadetobg BG_SOLARBEAM_OPPONENT - goto SetSolarbeamBgContinue +SetSolarBeamBgContest: + fadetobg BG_SOLAR_BEAM_CONTESTS + goto SetSolarBeamBgContinue +SetSolarBeamBgPlayer: + fadetobg BG_SOLAR_BEAM_PLAYER + goto SetSolarBeamBgContinue +SetSolarBeamBgOpponent: + fadetobg BG_SOLAR_BEAM_OPPONENT + goto SetSolarBeamBgContinue -UnsetSolarbeamBg: +UnsetSolarBeamBg: restorebg waitbgfadein return diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index eecb3d08df..e3408a3a78 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -168,7 +168,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectFutureSight @ EFFECT_FUTURE_SIGHT .4byte BattleScript_EffectGust @ EFFECT_GUST .4byte BattleScript_EffectStomp @ EFFECT_FLINCH_MINIMIZE_HIT - .4byte BattleScript_EffectSolarbeam @ EFFECT_SOLARBEAM + .4byte BattleScript_EffectSolarBeam @ EFFECT_SOLAR_BEAM .4byte BattleScript_EffectThunder @ EFFECT_THUNDER .4byte BattleScript_EffectTeleport @ EFFECT_TELEPORT .4byte BattleScript_EffectBeatUp @ EFFECT_BEAT_UP @@ -1898,17 +1898,17 @@ BattleScript_EffectStomp:: setbyte sDMG_MULTIPLIER, 2 goto BattleScript_FlinchEffect -BattleScript_EffectSolarbeam:: - jumpifabilitypresent ABILITY_CLOUD_NINE, BattleScript_SolarbeamDecideTurn - jumpifabilitypresent ABILITY_AIR_LOCK, BattleScript_SolarbeamDecideTurn - jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN, BattleScript_SolarbeamOnFirstTurn -BattleScript_SolarbeamDecideTurn:: +BattleScript_EffectSolarBeam:: + jumpifabilitypresent ABILITY_CLOUD_NINE, BattleScript_SolarBeamDecideTurn + jumpifabilitypresent ABILITY_AIR_LOCK, BattleScript_SolarBeamDecideTurn + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN, BattleScript_SolarBeamOnFirstTurn +BattleScript_SolarBeamDecideTurn:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SOLAR_BEAM call BattleScriptFirstChargingTurn goto BattleScript_MoveEnd -BattleScript_SolarbeamOnFirstTurn:: +BattleScript_SolarBeamOnFirstTurn:: orword gHitMarker, HITMARKER_CHARGING setmoveeffect MOVE_EFFECT_CHARGING | MOVE_EFFECT_AFFECTS_USER seteffectprimary diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 48de594e2a..2ff9318be0 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -342,9 +342,9 @@ #define BG_FISSURE 21 #define BG_BUG_OPPONENT 22 #define BG_BUG_PLAYER 23 -#define BG_SOLARBEAM_OPPONENT 24 -#define BG_SOLARBEAM_PLAYER 25 -#define BG_SOLARBEAM_CONTESTS 26 +#define BG_SOLAR_BEAM_OPPONENT 24 +#define BG_SOLAR_BEAM_PLAYER 25 +#define BG_SOLAR_BEAM_CONTESTS 26 // table ids for general animations (gBattleAnims_General) #define B_ANIM_CASTFORM_CHANGE 0 diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index cc62208fa1..c4f79efc31 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -152,7 +152,7 @@ #define EFFECT_FUTURE_SIGHT 148 #define EFFECT_GUST 149 #define EFFECT_FLINCH_MINIMIZE_HIT 150 // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM -#define EFFECT_SOLARBEAM 151 +#define EFFECT_SOLAR_BEAM 151 #define EFFECT_THUNDER 152 #define EFFECT_TELEPORT 153 #define EFFECT_BEAT_UP 154 diff --git a/include/constants/items.h b/include/constants/items.h index c596dd3b8d..e9d889cfa0 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -402,7 +402,7 @@ #define ITEM_TM19_GIGA_DRAIN ITEM_TM19 #define ITEM_TM20_SAFEGUARD ITEM_TM20 #define ITEM_TM21_FRUSTRATION ITEM_TM21 -#define ITEM_TM22_SOLARBEAM ITEM_TM22 +#define ITEM_TM22_SOLAR_BEAM ITEM_TM22 #define ITEM_TM23_IRON_TAIL ITEM_TM23 #define ITEM_TM24_THUNDERBOLT ITEM_TM24 #define ITEM_TM25_THUNDER ITEM_TM25 diff --git a/include/graphics.h b/include/graphics.h index cbb7fbb080..a58b0f0f13 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4733,7 +4733,7 @@ extern const u32 gBattleAnimBgPalette_Sky[]; extern const u32 gBattleAnimBgPalette_Aurora[]; extern const u32 gBattleAnimBgPalette_Fissure[]; extern const u32 gBattleAnimBgPalette_Bug[]; -extern const u32 gBattleAnimBgPalette_Solarbeam[]; +extern const u32 gBattleAnimBgPalette_SolarBeam[]; extern const u32 gBattleAnimBgTilemap_Dark[]; extern const u32 gBattleAnimBgTilemap_Ghost[]; extern const u32 gBattleAnimBgTilemap_Psychic[]; diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 6fdfb0d7ae..e9f55bd8bc 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -274,7 +274,7 @@ static const u16 sIgnoredPowerfulMoveEffects[] = EFFECT_SKY_ATTACK, EFFECT_RECHARGE, EFFECT_SKULL_BASH, - EFFECT_SOLARBEAM, + EFFECT_SOLAR_BEAM, EFFECT_SPIT_UP, EFFECT_FOCUS_PUNCH, EFFECT_SUPERPOWER, diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index ebdb471bfd..f54ebfbf7e 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -26,9 +26,9 @@ struct { static void AnimMovePowderParticle(struct Sprite *); static void AnimMovePowderParticle_Step(struct Sprite *); static void AnimPowerAbsorptionOrb(struct Sprite *); -static void AnimSolarbeamBigOrb(struct Sprite *); -static void AnimSolarbeamSmallOrb(struct Sprite *); -static void AnimSolarbeamSmallOrb_Step(struct Sprite *); +static void AnimSolarBeamBigOrb(struct Sprite *); +static void AnimSolarBeamSmallOrb(struct Sprite *); +static void AnimSolarBeamSmallOrb_Step(struct Sprite *); static void AnimAbsorptionOrb(struct Sprite *); static void AnimAbsorptionOrb_Step(struct Sprite *); static void AnimHyperBeamOrb(struct Sprite *); @@ -208,49 +208,49 @@ const struct SpriteTemplate gPoisonPowderParticleSpriteTemplate = .callback = AnimMovePowderParticle, }; -const union AnimCmd gSolarbeamBigOrbAnimCmds1[] = +const union AnimCmd gSolarBeamBigOrbAnimCmds1[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -const union AnimCmd gSolarbeamBigOrbAnimCmds2[] = +const union AnimCmd gSolarBeamBigOrbAnimCmds2[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -const union AnimCmd gSolarbeamBigOrbAnimCmds3[] = +const union AnimCmd gSolarBeamBigOrbAnimCmds3[] = { ANIMCMD_FRAME(2, 1), ANIMCMD_END, }; -const union AnimCmd gSolarbeamBigOrbAnimCmds4[] = +const union AnimCmd gSolarBeamBigOrbAnimCmds4[] = { ANIMCMD_FRAME(3, 1), ANIMCMD_END, }; -const union AnimCmd gSolarbeamBigOrbAnimCmds5[] = +const union AnimCmd gSolarBeamBigOrbAnimCmds5[] = { ANIMCMD_FRAME(4, 1), ANIMCMD_END, }; -const union AnimCmd gSolarbeamBigOrbAnimCmds6[] = +const union AnimCmd gSolarBeamBigOrbAnimCmds6[] = { ANIMCMD_FRAME(5, 1), ANIMCMD_END, }; -const union AnimCmd gSolarbeamBigOrbAnimCmds7[] = +const union AnimCmd gSolarBeamBigOrbAnimCmds7[] = { ANIMCMD_FRAME(6, 1), ANIMCMD_END, }; -const union AnimCmd gSolarbeamSmallOrbAnimCms[] = +const union AnimCmd gSolarBeamSmallOrbAnimCms[] = { ANIMCMD_FRAME(7, 1), ANIMCMD_END, @@ -262,20 +262,20 @@ const union AnimCmd gPowerAbsorptionOrbAnimCmds[] = ANIMCMD_END, }; -const union AnimCmd *const gSolarbeamBigOrbAnimTable[] = +const union AnimCmd *const gSolarBeamBigOrbAnimTable[] = { - gSolarbeamBigOrbAnimCmds1, - gSolarbeamBigOrbAnimCmds2, - gSolarbeamBigOrbAnimCmds3, - gSolarbeamBigOrbAnimCmds4, - gSolarbeamBigOrbAnimCmds5, - gSolarbeamBigOrbAnimCmds6, - gSolarbeamBigOrbAnimCmds7, + gSolarBeamBigOrbAnimCmds1, + gSolarBeamBigOrbAnimCmds2, + gSolarBeamBigOrbAnimCmds3, + gSolarBeamBigOrbAnimCmds4, + gSolarBeamBigOrbAnimCmds5, + gSolarBeamBigOrbAnimCmds6, + gSolarBeamBigOrbAnimCmds7, }; -const union AnimCmd *const gSolarbeamSmallOrbAnimTable[] = +const union AnimCmd *const gSolarBeamSmallOrbAnimTable[] = { - gSolarbeamSmallOrbAnimCms, + gSolarBeamSmallOrbAnimCms, }; const union AnimCmd *const gPowerAbsorptionOrbAnimTable[] = @@ -303,26 +303,26 @@ const struct SpriteTemplate gPowerAbsorptionOrbSpriteTemplate = .callback = AnimPowerAbsorptionOrb, }; -const struct SpriteTemplate gSolarbeamBigOrbSpriteTemplate = +const struct SpriteTemplate gSolarBeamBigOrbSpriteTemplate = { .tileTag = ANIM_TAG_ORBS, .paletteTag = ANIM_TAG_ORBS, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gSolarbeamBigOrbAnimTable, + .anims = gSolarBeamBigOrbAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSolarbeamBigOrb, + .callback = AnimSolarBeamBigOrb, }; -const struct SpriteTemplate gSolarbeamSmallOrbSpriteTemplate = +const struct SpriteTemplate gSolarBeamSmallOrbSpriteTemplate = { .tileTag = ANIM_TAG_ORBS, .paletteTag = ANIM_TAG_ORBS, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gSolarbeamSmallOrbAnimTable, + .anims = gSolarBeamSmallOrbAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSolarbeamSmallOrb, + .callback = AnimSolarBeamSmallOrb, }; const union AffineAnimCmd gStockpileAbsorptionOrbAffineCmds[] = { @@ -371,7 +371,7 @@ const struct SpriteTemplate gHyperBeamOrbSpriteTemplate = .tileTag = ANIM_TAG_ORBS, .paletteTag = ANIM_TAG_ORBS, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gSolarbeamBigOrbAnimTable, + .anims = gSolarBeamBigOrbAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimHyperBeamOrb, @@ -2252,7 +2252,7 @@ static void AnimPowerAbsorptionOrb(struct Sprite* sprite) // arg 1: initial y pixel offset // arg 2: duration // arg 3: sprite anim number -static void AnimSolarbeamBigOrb(struct Sprite* sprite) +static void AnimSolarBeamBigOrb(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); StartSpriteAnim(sprite, gBattleAnimArgs[3]); @@ -2264,12 +2264,12 @@ static void AnimSolarbeamBigOrb(struct Sprite* sprite) } // Moves a small orb in a wavy pattern towards the target mon. -// The small orb "circles" the big orbs in AnimSolarbeamBigOrb. +// The small orb "circles" the big orbs in AnimSolarBeamBigOrb. // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: duration // arg 3: initial wave offset -static void AnimSolarbeamSmallOrb(struct Sprite* sprite) +static void AnimSolarBeamSmallOrb(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[2]; @@ -2279,11 +2279,11 @@ static void AnimSolarbeamSmallOrb(struct Sprite* sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); sprite->data[5] = gBattleAnimArgs[3]; - sprite->callback = AnimSolarbeamSmallOrb_Step; + sprite->callback = AnimSolarBeamSmallOrb_Step; sprite->callback(sprite); } -static void AnimSolarbeamSmallOrb_Step(struct Sprite* sprite) +static void AnimSolarBeamSmallOrb_Step(struct Sprite* sprite) { if (AnimTranslateLinear(sprite)) { @@ -2302,10 +2302,10 @@ static void AnimSolarbeamSmallOrb_Step(struct Sprite* sprite) } } -// Creates 15 small secondary orbs used in the solarbeam anim effect. +// Creates 15 small secondary orbs used in the SolarBeam anim effect. // There is a 7-frame delay between each of them. // No args. -void AnimTask_CreateSmallSolarbeamOrbs(u8 taskId) +void AnimTask_CreateSmallSolarBeamOrbs(u8 taskId) { if (--gTasks[taskId].data[0] == -1) { @@ -2315,7 +2315,7 @@ void AnimTask_CreateSmallSolarbeamOrbs(u8 taskId) gBattleAnimArgs[1] = 0; gBattleAnimArgs[2] = 80; gBattleAnimArgs[3] = 0; - CreateSpriteAndAnimate(&gSolarbeamSmallOrbSpriteTemplate, 0, 0, GetBattlerSpriteSubpriority(gBattleAnimTarget) + 1); + CreateSpriteAndAnimate(&gSolarBeamSmallOrbSpriteTemplate, 0, 0, GetBattlerSpriteSubpriority(gBattleAnimTarget) + 1); } if (gTasks[taskId].data[1] == 15) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 92d4b97079..2bc1cfedb0 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -8098,7 +8098,7 @@ static bool8 IsTwoTurnsMove(u16 move) if (gBattleMoves[move].effect == EFFECT_SKULL_BASH || gBattleMoves[move].effect == EFFECT_RAZOR_WIND || gBattleMoves[move].effect == EFFECT_SKY_ATTACK - || gBattleMoves[move].effect == EFFECT_SOLARBEAM + || gBattleMoves[move].effect == EFFECT_SOLAR_BEAM || gBattleMoves[move].effect == EFFECT_SEMI_INVULNERABLE || gBattleMoves[move].effect == EFFECT_BIDE) return TRUE; @@ -8118,14 +8118,14 @@ static bool8 IsInvalidForSleepTalkOrAssist(u16 move) static u8 AttacksThisTurn(u8 battlerId, u16 move) // Note: returns 1 if it's a charging turn, otherwise 2 { // first argument is unused - if (gBattleMoves[move].effect == EFFECT_SOLARBEAM + if (gBattleMoves[move].effect == EFFECT_SOLAR_BEAM && (gBattleWeather & B_WEATHER_SUN)) return 2; if (gBattleMoves[move].effect == EFFECT_SKULL_BASH || gBattleMoves[move].effect == EFFECT_RAZOR_WIND || gBattleMoves[move].effect == EFFECT_SKY_ATTACK - || gBattleMoves[move].effect == EFFECT_SOLARBEAM + || gBattleMoves[move].effect == EFFECT_SOLAR_BEAM || gBattleMoves[move].effect == EFFECT_SEMI_INVULNERABLE || gBattleMoves[move].effect == EFFECT_BIDE) { diff --git a/src/battle_tv.c b/src/battle_tv.c index c78f1bff44..f65bf73ea0 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -237,7 +237,7 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_FUTURE_SIGHT] = 1, [EFFECT_GUST] = 1, [EFFECT_FLINCH_MINIMIZE_HIT] = 1, - [EFFECT_SOLARBEAM] = 1, + [EFFECT_SOLAR_BEAM] = 1, [EFFECT_THUNDER] = 1, [EFFECT_TELEPORT] = 1, [EFFECT_BEAT_UP] = 2, diff --git a/src/data/battle_anim.h b/src/data/battle_anim.h index 5b24981d57..58b990c738 100644 --- a/src/data/battle_anim.h +++ b/src/data/battle_anim.h @@ -1619,7 +1619,7 @@ const struct BattleAnimBackground gBattleAnimBackgroundTable[] = [BG_FISSURE] = {gBattleAnimBgImage_Fissure, gBattleAnimBgPalette_Fissure, gBattleAnimBgTilemap_Fissure}, [BG_BUG_OPPONENT] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedOpponent}, [BG_BUG_PLAYER] = {gBattleAnimBgImage_Highspeed, gBattleAnimBgPalette_Bug, gBattleAnimBgTilemap_HighspeedPlayer}, - [BG_SOLARBEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactOpponent}, - [BG_SOLARBEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactPlayer}, - [BG_SOLARBEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactContests}, + [BG_SOLAR_BEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactOpponent}, + [BG_SOLAR_BEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactPlayer}, + [BG_SOLAR_BEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_SolarBeam, gBattleAnimBgTilemap_ImpactContests}, }; diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index f78fa2c8c7..82892120fa 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -990,7 +990,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_SOLAR_BEAM] = { - .effect = EFFECT_SOLARBEAM, + .effect = EFFECT_SOLAR_BEAM, .power = 120, .type = TYPE_GRASS, .accuracy = 100, diff --git a/src/data/items.h b/src/data/items.h index 370cd2022c..20ee057da8 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -3744,10 +3744,10 @@ const struct Item gItems[] = .fieldUseFunc = ItemUseOutOfBattle_TMHM, }, - [ITEM_TM22_SOLARBEAM] = + [ITEM_TM22_SOLAR_BEAM] = { .name = _("TM22"), - .itemId = ITEM_TM22_SOLARBEAM, + .itemId = ITEM_TM22_SOLAR_BEAM, .price = 3000, .description = sTM22Desc, .pocket = POCKET_TM_HM, diff --git a/src/data/pokemon/tmhm_learnsets.h b/src/data/pokemon/tmhm_learnsets.h index deeeda16f8..cb42d7c6fc 100644 --- a/src/data/pokemon/tmhm_learnsets.h +++ b/src/data/pokemon/tmhm_learnsets.h @@ -15,7 +15,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -35,7 +35,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -57,7 +57,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) @@ -239,7 +239,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -264,7 +264,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM31_BRICK_BREAK) | TMHM(TM32_DOUBLE_TEAM) @@ -758,7 +758,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -794,7 +794,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -867,7 +867,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM27_RETURN) @@ -901,7 +901,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM27_RETURN) @@ -974,7 +974,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -992,7 +992,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -1011,7 +1011,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -1029,7 +1029,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM32_DOUBLE_TEAM) @@ -1052,7 +1052,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM32_DOUBLE_TEAM) @@ -1073,7 +1073,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM32_DOUBLE_TEAM) @@ -1093,7 +1093,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM32_DOUBLE_TEAM) @@ -1607,7 +1607,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -1626,7 +1626,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -1646,7 +1646,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -1778,7 +1778,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM11_SUNNY_DAY) | TMHM(TM17_PROTECT) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) @@ -1797,7 +1797,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM15_HYPER_BEAM) | TMHM(TM17_PROTECT) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) @@ -2348,7 +2348,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM32_DOUBLE_TEAM) @@ -2372,7 +2372,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM32_DOUBLE_TEAM) @@ -2495,7 +2495,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -2647,7 +2647,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -2680,7 +2680,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -2706,7 +2706,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -2872,7 +2872,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM27_RETURN) @@ -3021,7 +3021,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -3198,7 +3198,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -3356,7 +3356,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM26_EARTHQUAKE) @@ -3560,7 +3560,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -3608,7 +3608,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -3655,7 +3655,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) @@ -3676,7 +3676,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) @@ -3700,7 +3700,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) @@ -3874,7 +3874,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM27_RETURN) @@ -3903,7 +3903,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -3976,7 +3976,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM31_BRICK_BREAK) @@ -4000,7 +4000,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM31_BRICK_BREAK) @@ -4020,7 +4020,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM29_PSYCHIC) @@ -4040,7 +4040,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM29_PSYCHIC) @@ -4151,7 +4151,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -4177,7 +4177,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM29_PSYCHIC) @@ -4202,7 +4202,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -4229,7 +4229,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -4258,7 +4258,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -4284,7 +4284,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -4373,7 +4373,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -4493,7 +4493,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM40_AERIAL_ACE) @@ -4510,7 +4510,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM40_AERIAL_ACE) @@ -4528,7 +4528,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM40_AERIAL_ACE) @@ -4547,7 +4547,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -4577,7 +4577,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -4598,7 +4598,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -4615,7 +4615,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -4855,7 +4855,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -4877,7 +4877,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -4901,7 +4901,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -4982,7 +4982,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM26_EARTHQUAKE) @@ -5017,7 +5017,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -5455,7 +5455,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM12_TAUNT) | TMHM(TM17_PROTECT) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) @@ -5481,7 +5481,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM15_HYPER_BEAM) | TMHM(TM17_PROTECT) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) @@ -5568,7 +5568,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -5593,7 +5593,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -5731,7 +5731,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -5766,7 +5766,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -5826,7 +5826,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -6003,7 +6003,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM26_EARTHQUAKE) @@ -6039,7 +6039,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -6114,7 +6114,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -6140,7 +6140,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -6169,7 +6169,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) @@ -6450,7 +6450,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -6473,7 +6473,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) | TMHM(TM30_SHADOW_BALL) @@ -6499,7 +6499,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM42_FACADE) @@ -6522,7 +6522,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM31_BRICK_BREAK) | TMHM(TM32_DOUBLE_TEAM) @@ -6552,7 +6552,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM31_BRICK_BREAK) | TMHM(TM32_DOUBLE_TEAM) @@ -6575,7 +6575,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM30_SHADOW_BALL) @@ -6595,7 +6595,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM30_SHADOW_BALL) @@ -6621,7 +6621,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM30_SHADOW_BALL) @@ -6646,7 +6646,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM30_SHADOW_BALL) @@ -6666,7 +6666,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM30_SHADOW_BALL) @@ -6688,7 +6688,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) | TMHM(TM30_SHADOW_BALL) @@ -6745,7 +6745,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -6767,7 +6767,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM27_RETURN) | TMHM(TM31_BRICK_BREAK) @@ -6866,7 +6866,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) | TMHM(TM32_DOUBLE_TEAM) @@ -6888,7 +6888,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) | TMHM(TM32_DOUBLE_TEAM) @@ -6960,7 +6960,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -6987,7 +6987,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -7014,7 +7014,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -7048,7 +7048,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -7073,7 +7073,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -7383,7 +7383,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -7404,7 +7404,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM28_DIG) @@ -7428,7 +7428,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) @@ -7660,7 +7660,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM37_SANDSTORM) @@ -7680,7 +7680,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM37_SANDSTORM) @@ -7769,7 +7769,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM29_PSYCHIC) @@ -7906,7 +7906,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM31_BRICK_BREAK) | TMHM(TM32_DOUBLE_TEAM) @@ -7982,7 +7982,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM40_AERIAL_ACE) @@ -8005,7 +8005,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) @@ -8085,7 +8085,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) | TMHM(TM32_DOUBLE_TEAM) @@ -8108,7 +8108,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM27_RETURN) @@ -8140,7 +8140,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM26_EARTHQUAKE) @@ -8174,7 +8174,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM26_EARTHQUAKE) @@ -8204,7 +8204,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) | TMHM(TM32_DOUBLE_TEAM) @@ -8229,7 +8229,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) | TMHM(TM32_DOUBLE_TEAM) @@ -8253,7 +8253,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM19_GIGA_DRAIN) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) @@ -8279,7 +8279,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) | TMHM(TM32_DOUBLE_TEAM) @@ -8302,7 +8302,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) @@ -8332,7 +8332,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM30_SHADOW_BALL) @@ -8538,7 +8538,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -8649,7 +8649,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -8683,7 +8683,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM27_RETURN) @@ -8710,7 +8710,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM27_RETURN) @@ -8736,7 +8736,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM27_RETURN) @@ -8759,7 +8759,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) | TMHM(TM36_SLUDGE_BOMB) @@ -8777,7 +8777,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM19_GIGA_DRAIN) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM26_EARTHQUAKE) | TMHM(TM27_RETURN) | TMHM(TM32_DOUBLE_TEAM) @@ -9160,7 +9160,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -9196,7 +9196,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM17_PROTECT) | TMHM(TM18_RAIN_DANCE) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM23_IRON_TAIL) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) @@ -9234,7 +9234,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM26_EARTHQUAKE) @@ -9272,7 +9272,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM26_EARTHQUAKE) @@ -9337,7 +9337,7 @@ const u32 gTMHMLearnsets[][2] = | TMHM(TM18_RAIN_DANCE) | TMHM(TM20_SAFEGUARD) | TMHM(TM21_FRUSTRATION) - | TMHM(TM22_SOLARBEAM) + | TMHM(TM22_SOLAR_BEAM) | TMHM(TM24_THUNDERBOLT) | TMHM(TM25_THUNDER) | TMHM(TM27_RETURN) diff --git a/src/graphics.c b/src/graphics.c index 68d7ea5b9c..b4e1dfabe0 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1050,8 +1050,8 @@ const u32 gBattleAnimBgTilemap_Ghost[] = INCBIN_U32("graphics/battle_anims/backg const u32 gBattleAnimSpritePal_WhipHit[] = INCBIN_U32("graphics/battle_anims/sprites/whip_hit.gbapal.lz"); -const u32 gBattleAnimBgPalette_Solarbeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz"); -const u32 gBattleAnimBgTilemap_Solarbeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.bin.lz"); // Unused +const u32 gBattleAnimBgPalette_SolarBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz"); +const u32 gBattleAnimBgTilemap_SolarBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.bin.lz"); // Unused const u32 gBerryBlenderCenter_Gfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz"); const u32 gBerryBlenderOuter_Gfx[] = INCBIN_U32("graphics/berry_blender/outer.4bpp.lz"); From a2c2d7e230436f208e0d5e7aa3226310a5f6cc42 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 00:28:49 +0800 Subject: [PATCH 122/417] Label indexes for movement speeds --- .../movement_action_func_tables.h | 18 +++++-- src/event_object_movement.c | 52 +++++++++---------- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/src/data/object_events/movement_action_func_tables.h b/src/data/object_events/movement_action_func_tables.h index 4df07be0dd..97dace0440 100755 --- a/src/data/object_events/movement_action_func_tables.h +++ b/src/data/object_events/movement_action_func_tables.h @@ -602,12 +602,20 @@ u8 (*const gMovementActionFuncs_FaceRight[])(struct ObjectEvent *, struct Sprite MovementAction_PauseSpriteAnim, }; +enum { + MOVE_SPEED_NORMAL, // walking + MOVE_SPEED_FAST_1, // running / surfing / sliding (ice tile) + MOVE_SPEED_FAST_2, // water current / acro bike + MOVE_SPEED_FASTER, // mach bike's max speed + MOVE_SPEED_FASTEST, +}; + static u8 (*const sDirectionAnimFuncsBySpeed[])(u8) = { - GetMoveDirectionAnimNum, - GetMoveDirectionFastAnimNum, - GetMoveDirectionFastAnimNum, - GetMoveDirectionFasterAnimNum, - GetMoveDirectionFastestAnimNum, + [MOVE_SPEED_NORMAL] = GetMoveDirectionAnimNum, + [MOVE_SPEED_FAST_1] = GetMoveDirectionFastAnimNum, + [MOVE_SPEED_FAST_2] = GetMoveDirectionFastAnimNum, + [MOVE_SPEED_FASTER] = GetMoveDirectionFasterAnimNum, + [MOVE_SPEED_FASTEST] = GetMoveDirectionFastestAnimNum, }; u8 (*const gMovementActionFuncs_WalkSlowDiagonalUpLeft[])(struct ObjectEvent *, struct Sprite *) = { diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 074fa23863..704896f199 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -5356,7 +5356,7 @@ bool8 MovementAction_WalkSlowRight_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_WalkNormalDiagonalUpLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_NORTHWEST, 0); + InitMovementNormal(objectEvent, sprite, DIR_NORTHWEST, MOVE_SPEED_NORMAL); return MovementAction_WalkNormalDiagonalUpLeft_Step1(objectEvent, sprite); } @@ -5372,7 +5372,7 @@ bool8 MovementAction_WalkNormalDiagonalUpLeft_Step1(struct ObjectEvent *objectEv bool8 MovementAction_WalkNormalDiagonalUpRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_NORTHEAST, 0); + InitMovementNormal(objectEvent, sprite, DIR_NORTHEAST, MOVE_SPEED_NORMAL); return MovementAction_WalkNormalDiagonalUpRight_Step1(objectEvent, sprite); } @@ -5388,7 +5388,7 @@ bool8 MovementAction_WalkNormalDiagonalUpRight_Step1(struct ObjectEvent *objectE bool8 MovementAction_WalkNormalDiagonalDownLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_SOUTHWEST, 0); + InitMovementNormal(objectEvent, sprite, DIR_SOUTHWEST, MOVE_SPEED_NORMAL); return MovementAction_WalkNormalDiagonalDownLeft_Step1(objectEvent, sprite); } @@ -5404,7 +5404,7 @@ bool8 MovementAction_WalkNormalDiagonalDownLeft_Step1(struct ObjectEvent *object bool8 MovementAction_WalkNormalDiagonalDownRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_SOUTHEAST, 0); + InitMovementNormal(objectEvent, sprite, DIR_SOUTHEAST, MOVE_SPEED_NORMAL); return MovementAction_WalkNormalDiagonalDownRight_Step1(objectEvent, sprite); } @@ -5420,7 +5420,7 @@ bool8 MovementAction_WalkNormalDiagonalDownRight_Step1(struct ObjectEvent *objec bool8 MovementAction_WalkNormalDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_SOUTH, 0); + InitMovementNormal(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_NORMAL); return MovementAction_WalkNormalDown_Step1(objectEvent, sprite); } @@ -5436,7 +5436,7 @@ bool8 MovementAction_WalkNormalDown_Step1(struct ObjectEvent *objectEvent, struc bool8 MovementAction_WalkNormalUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_NORTH, 0); + InitMovementNormal(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_NORMAL); return MovementAction_WalkNormalUp_Step1(objectEvent, sprite); } @@ -5452,7 +5452,7 @@ bool8 MovementAction_WalkNormalUp_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_WalkNormalLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_WEST, 0); + InitMovementNormal(objectEvent, sprite, DIR_WEST, MOVE_SPEED_NORMAL); return MovementAction_WalkNormalLeft_Step1(objectEvent, sprite); } @@ -5468,7 +5468,7 @@ bool8 MovementAction_WalkNormalLeft_Step1(struct ObjectEvent *objectEvent, struc bool8 MovementAction_WalkNormalRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_EAST, 0); + InitMovementNormal(objectEvent, sprite, DIR_EAST, MOVE_SPEED_NORMAL); return MovementAction_WalkNormalRight_Step1(objectEvent, sprite); } @@ -5701,7 +5701,7 @@ bool8 MovementAction_Delay16_Step0(struct ObjectEvent *objectEvent, struct Sprit bool8 MovementAction_WalkFastDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_SOUTH, 1); + InitMovementNormal(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1); return MovementAction_WalkFastDown_Step1(objectEvent, sprite); } @@ -5717,7 +5717,7 @@ bool8 MovementAction_WalkFastDown_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_WalkFastUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_NORTH, 1); + InitMovementNormal(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1); return MovementAction_WalkFastUp_Step1(objectEvent, sprite); } @@ -5733,7 +5733,7 @@ bool8 MovementAction_WalkFastUp_Step1(struct ObjectEvent *objectEvent, struct Sp bool8 MovementAction_WalkFastLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_WEST, 1); + InitMovementNormal(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1); return MovementAction_WalkFastLeft_Step1(objectEvent, sprite); } @@ -5749,7 +5749,7 @@ bool8 MovementAction_WalkFastLeft_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_WalkFastRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_EAST, 1); + InitMovementNormal(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1); return MovementAction_WalkFastRight_Step1(objectEvent, sprite); } @@ -5891,7 +5891,7 @@ bool8 MovementAction_WalkInPlaceFastestRight_Step0(struct ObjectEvent *objectEve bool8 MovementAction_RideWaterCurrentDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_SOUTH, 2); + InitMovementNormal(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_2); return MovementAction_RideWaterCurrentDown_Step1(objectEvent, sprite); } @@ -5907,7 +5907,7 @@ bool8 MovementAction_RideWaterCurrentDown_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_RideWaterCurrentUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_NORTH, 2); + InitMovementNormal(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_2); return MovementAction_RideWaterCurrentUp_Step1(objectEvent, sprite); } @@ -5923,7 +5923,7 @@ bool8 MovementAction_RideWaterCurrentUp_Step1(struct ObjectEvent *objectEvent, s bool8 MovementAction_RideWaterCurrentLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_WEST, 2); + InitMovementNormal(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_2); return MovementAction_RideWaterCurrentLeft_Step1(objectEvent, sprite); } @@ -5939,7 +5939,7 @@ bool8 MovementAction_RideWaterCurrentLeft_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_RideWaterCurrentRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_EAST, 2); + InitMovementNormal(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_2); return MovementAction_RideWaterCurrentRight_Step1(objectEvent, sprite); } @@ -5955,7 +5955,7 @@ bool8 MovementAction_RideWaterCurrentRight_Step1(struct ObjectEvent *objectEvent bool8 MovementAction_WalkFastestDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_SOUTH, 3); + InitMovementNormal(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FASTER); return MovementAction_WalkFastestDown_Step1(objectEvent, sprite); } @@ -5971,7 +5971,7 @@ bool8 MovementAction_WalkFastestDown_Step1(struct ObjectEvent *objectEvent, stru bool8 MovementAction_WalkFastestUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_NORTH, 3); + InitMovementNormal(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FASTER); return MovementAction_WalkFastestUp_Step1(objectEvent, sprite); } @@ -5987,7 +5987,7 @@ bool8 MovementAction_WalkFastestUp_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_WalkFastestLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_WEST, 3); + InitMovementNormal(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FASTER); return MovementAction_WalkFastestLeft_Step1(objectEvent, sprite); } @@ -6003,7 +6003,7 @@ bool8 MovementAction_WalkFastestLeft_Step1(struct ObjectEvent *objectEvent, stru bool8 MovementAction_WalkFastestRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_EAST, 3); + InitMovementNormal(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FASTER); return MovementAction_WalkFastestRight_Step1(objectEvent, sprite); } @@ -6019,7 +6019,7 @@ bool8 MovementAction_WalkFastestRight_Step1(struct ObjectEvent *objectEvent, str bool8 MovementAction_SlideDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_SOUTH, 4); + InitMovementNormal(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FASTEST); return MovementAction_SlideDown_Step1(objectEvent, sprite); } @@ -6035,7 +6035,7 @@ bool8 MovementAction_SlideDown_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_SlideUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_NORTH, 4); + InitMovementNormal(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FASTEST); return MovementAction_SlideUp_Step1(objectEvent, sprite); } @@ -6051,7 +6051,7 @@ bool8 MovementAction_SlideUp_Step1(struct ObjectEvent *objectEvent, struct Sprit bool8 MovementAction_SlideLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_WEST, 4); + InitMovementNormal(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FASTEST); return MovementAction_SlideLeft_Step1(objectEvent, sprite); } @@ -6067,7 +6067,7 @@ bool8 MovementAction_SlideLeft_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_SlideRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_EAST, 4); + InitMovementNormal(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FASTEST); return MovementAction_SlideRight_Step1(objectEvent, sprite); } @@ -6728,7 +6728,7 @@ bool8 MovementAction_WalkDownAffine_Step1(struct ObjectEvent *objectEvent, struc bool8 MovementAction_WalkLeftAffine_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_WEST, 1); + InitMovementNormal(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1); sprite->affineAnimPaused = FALSE; ChangeSpriteAffineAnimIfDifferent(sprite, 2); return MovementAction_WalkLeftAffine_Step1(objectEvent, sprite); @@ -6747,7 +6747,7 @@ bool8 MovementAction_WalkLeftAffine_Step1(struct ObjectEvent *objectEvent, struc bool8 MovementAction_WalkRightAffine_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitMovementNormal(objectEvent, sprite, DIR_EAST, 1); + InitMovementNormal(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1); sprite->affineAnimPaused = FALSE; ChangeSpriteAffineAnimIfDifferent(sprite, 3); return MovementAction_WalkRightAffine_Step1(objectEvent, sprite); From 4cedd2d551ee10cccb68f4f427a02e777d98c843 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 01:01:07 +0800 Subject: [PATCH 123/417] Rename WalkFastest functions to WalkFaster --- include/constants/event_object_movement.h | 8 +-- include/event_object_movement.h | 2 +- src/bike.c | 4 +- .../movement_action_func_tables.h | 56 +++++++++---------- src/event_object_movement.c | 40 ++++++------- src/field_player_avatar.c | 4 +- 6 files changed, 57 insertions(+), 57 deletions(-) diff --git a/include/constants/event_object_movement.h b/include/constants/event_object_movement.h index 4ffb869e4f..e7238b56e0 100755 --- a/include/constants/event_object_movement.h +++ b/include/constants/event_object_movement.h @@ -128,10 +128,10 @@ #define MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP 0x2A #define MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT 0x2B #define MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT 0x2C -#define MOVEMENT_ACTION_WALK_FASTEST_DOWN 0x2D -#define MOVEMENT_ACTION_WALK_FASTEST_UP 0x2E -#define MOVEMENT_ACTION_WALK_FASTEST_LEFT 0x2F -#define MOVEMENT_ACTION_WALK_FASTEST_RIGHT 0x30 +#define MOVEMENT_ACTION_WALK_FASTER_DOWN 0x2D +#define MOVEMENT_ACTION_WALK_FASTER_UP 0x2E +#define MOVEMENT_ACTION_WALK_FASTER_LEFT 0x2F +#define MOVEMENT_ACTION_WALK_FASTER_RIGHT 0x30 #define MOVEMENT_ACTION_SLIDE_DOWN 0x31 #define MOVEMENT_ACTION_SLIDE_UP 0x32 #define MOVEMENT_ACTION_SLIDE_LEFT 0x33 diff --git a/include/event_object_movement.h b/include/event_object_movement.h index a935502e64..11dac813d9 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -136,7 +136,7 @@ u8 GetFaceDirectionMovementAction(u32); u8 GetWalkNormalMovementAction(u32); u8 GetWalkFastMovementAction(u32); u8 GetRideWaterCurrentMovementAction(u32); -u8 GetWalkFastestMovementAction(u32); +u8 GetWalkFasterMovementAction(u32); u8 GetPlayerRunMovementAction(u32); u8 GetJumpInPlaceMovementAction(u32); u8 GetAcroWheelieFaceDirectionMovementAction(u32); diff --git a/src/bike.c b/src/bike.c index 39433522ec..5aa132a9e3 100644 --- a/src/bike.c +++ b/src/bike.c @@ -71,12 +71,12 @@ static void (*const sMachBikeTransitions[])(u8) = MachBikeTransition_TrySlowDown, }; -// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order: 0 is normal speed (1 speed), 1 is fast speed (2 speed), 2 is fastest speed (4 speed) +// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order: 0 is normal speed (1 speed), 1 is fast speed (2 speed), 2 is faster speed static void (*const sMachBikeSpeedCallbacks[])(u8) = { PlayerGoSpeed1, // normal speed (1 speed) PlayerGoSpeed2, // fast speed (2 speed) - PlayerGoSpeed4, // fastest speed (4 speed) + PlayerGoSpeed4, // faster speed }; static void (*const sAcroBikeTransitions[])(u8) = diff --git a/src/data/object_events/movement_action_func_tables.h b/src/data/object_events/movement_action_func_tables.h index 97dace0440..729b4fe234 100755 --- a/src/data/object_events/movement_action_func_tables.h +++ b/src/data/object_events/movement_action_func_tables.h @@ -85,14 +85,14 @@ u8 MovementAction_RideWaterCurrentLeft_Step0(struct ObjectEvent *, struct Sprite u8 MovementAction_RideWaterCurrentLeft_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementAction_RideWaterCurrentRight_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementAction_RideWaterCurrentRight_Step1(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkFastestDown_Step0(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkFastestDown_Step1(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkFastestUp_Step0(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkFastestUp_Step1(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkFastestLeft_Step0(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkFastestLeft_Step1(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkFastestRight_Step0(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkFastestRight_Step1(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkFasterDown_Step0(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkFasterDown_Step1(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkFasterUp_Step0(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkFasterUp_Step1(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkFasterLeft_Step0(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkFasterLeft_Step1(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkFasterRight_Step0(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkFasterRight_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementAction_SlideDown_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementAction_SlideDown_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementAction_SlideUp_Step0(struct ObjectEvent *, struct Sprite *); @@ -307,10 +307,10 @@ u8 (*const gMovementActionFuncs_RideWaterCurrentDown[])(struct ObjectEvent *, st u8 (*const gMovementActionFuncs_RideWaterCurrentUp[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_RideWaterCurrentLeft[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_RideWaterCurrentRight[])(struct ObjectEvent *, struct Sprite *); -u8 (*const gMovementActionFuncs_WalkFastestDown[])(struct ObjectEvent *, struct Sprite *); -u8 (*const gMovementActionFuncs_WalkFastestUp[])(struct ObjectEvent *, struct Sprite *); -u8 (*const gMovementActionFuncs_WalkFastestLeft[])(struct ObjectEvent *, struct Sprite *); -u8 (*const gMovementActionFuncs_WalkFastestRight[])(struct ObjectEvent *, struct Sprite *); +u8 (*const gMovementActionFuncs_WalkFasterDown[])(struct ObjectEvent *, struct Sprite *); +u8 (*const gMovementActionFuncs_WalkFasterUp[])(struct ObjectEvent *, struct Sprite *); +u8 (*const gMovementActionFuncs_WalkFasterLeft[])(struct ObjectEvent *, struct Sprite *); +u8 (*const gMovementActionFuncs_WalkFasterRight[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_SlideDown[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_SlideUp[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_SlideLeft[])(struct ObjectEvent *, struct Sprite *); @@ -467,10 +467,10 @@ u8 (*const *const gMovementActionFuncs[])(struct ObjectEvent *, struct Sprite *) [MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP] = gMovementActionFuncs_RideWaterCurrentUp, [MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT] = gMovementActionFuncs_RideWaterCurrentLeft, [MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT] = gMovementActionFuncs_RideWaterCurrentRight, - [MOVEMENT_ACTION_WALK_FASTEST_DOWN] = gMovementActionFuncs_WalkFastestDown, - [MOVEMENT_ACTION_WALK_FASTEST_UP] = gMovementActionFuncs_WalkFastestUp, - [MOVEMENT_ACTION_WALK_FASTEST_LEFT] = gMovementActionFuncs_WalkFastestLeft, - [MOVEMENT_ACTION_WALK_FASTEST_RIGHT] = gMovementActionFuncs_WalkFastestRight, + [MOVEMENT_ACTION_WALK_FASTER_DOWN] = gMovementActionFuncs_WalkFasterDown, + [MOVEMENT_ACTION_WALK_FASTER_UP] = gMovementActionFuncs_WalkFasterUp, + [MOVEMENT_ACTION_WALK_FASTER_LEFT] = gMovementActionFuncs_WalkFasterLeft, + [MOVEMENT_ACTION_WALK_FASTER_RIGHT] = gMovementActionFuncs_WalkFasterRight, [MOVEMENT_ACTION_SLIDE_DOWN] = gMovementActionFuncs_SlideDown, [MOVEMENT_ACTION_SLIDE_UP] = gMovementActionFuncs_SlideUp, [MOVEMENT_ACTION_SLIDE_LEFT] = gMovementActionFuncs_SlideLeft, @@ -915,27 +915,27 @@ u8 (*const gMovementActionFuncs_RideWaterCurrentRight[])(struct ObjectEvent *, s MovementAction_PauseSpriteAnim, }; -u8 (*const gMovementActionFuncs_WalkFastestDown[])(struct ObjectEvent *, struct Sprite *) = { - MovementAction_WalkFastestDown_Step0, - MovementAction_WalkFastestDown_Step1, +u8 (*const gMovementActionFuncs_WalkFasterDown[])(struct ObjectEvent *, struct Sprite *) = { + MovementAction_WalkFasterDown_Step0, + MovementAction_WalkFasterDown_Step1, MovementAction_PauseSpriteAnim, }; -u8 (*const gMovementActionFuncs_WalkFastestUp[])(struct ObjectEvent *, struct Sprite *) = { - MovementAction_WalkFastestUp_Step0, - MovementAction_WalkFastestUp_Step1, +u8 (*const gMovementActionFuncs_WalkFasterUp[])(struct ObjectEvent *, struct Sprite *) = { + MovementAction_WalkFasterUp_Step0, + MovementAction_WalkFasterUp_Step1, MovementAction_PauseSpriteAnim, }; -u8 (*const gMovementActionFuncs_WalkFastestLeft[])(struct ObjectEvent *, struct Sprite *) = { - MovementAction_WalkFastestLeft_Step0, - MovementAction_WalkFastestLeft_Step1, +u8 (*const gMovementActionFuncs_WalkFasterLeft[])(struct ObjectEvent *, struct Sprite *) = { + MovementAction_WalkFasterLeft_Step0, + MovementAction_WalkFasterLeft_Step1, MovementAction_PauseSpriteAnim, }; -u8 (*const gMovementActionFuncs_WalkFastestRight[])(struct ObjectEvent *, struct Sprite *) = { - MovementAction_WalkFastestRight_Step0, - MovementAction_WalkFastestRight_Step1, +u8 (*const gMovementActionFuncs_WalkFasterRight[])(struct ObjectEvent *, struct Sprite *) = { + MovementAction_WalkFasterRight_Step0, + MovementAction_WalkFasterRight_Step1, MovementAction_PauseSpriteAnim, }; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 704896f199..cddad9aa0d 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -941,12 +941,12 @@ const u8 gRideWaterCurrentMovementActions[] = { MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT, MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT, }; -const u8 gWalkFastestMovementActions[] = { - MOVEMENT_ACTION_WALK_FASTEST_DOWN, - MOVEMENT_ACTION_WALK_FASTEST_DOWN, - MOVEMENT_ACTION_WALK_FASTEST_UP, - MOVEMENT_ACTION_WALK_FASTEST_LEFT, - MOVEMENT_ACTION_WALK_FASTEST_RIGHT, +const u8 gWalkFasterMovementActions[] = { + MOVEMENT_ACTION_WALK_FASTER_DOWN, + MOVEMENT_ACTION_WALK_FASTER_DOWN, + MOVEMENT_ACTION_WALK_FASTER_UP, + MOVEMENT_ACTION_WALK_FASTER_LEFT, + MOVEMENT_ACTION_WALK_FASTER_RIGHT, }; const u8 gSlideMovementActions[] = { MOVEMENT_ACTION_SLIDE_DOWN, @@ -4314,7 +4314,7 @@ bool8 CopyablePlayerMovement_GoSpeed2(struct ObjectEvent *objectEvent, struct Sp direction = playerDirection; direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); ObjectEventMoveDestCoords(objectEvent, direction, &x, &y); - ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkFastestMovementAction(direction)); + ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkFasterMovementAction(direction)); if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y)))) { ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); @@ -5025,7 +5025,7 @@ dirn_to_anim(GetWalkSlowMovementAction, gWalkSlowMovementActions); dirn_to_anim(GetWalkNormalMovementAction, gWalkNormalMovementActions); dirn_to_anim(GetWalkFastMovementAction, gWalkFastMovementActions); dirn_to_anim(GetRideWaterCurrentMovementAction, gRideWaterCurrentMovementActions); -dirn_to_anim(GetWalkFastestMovementAction, gWalkFastestMovementActions); +dirn_to_anim(GetWalkFasterMovementAction, gWalkFasterMovementActions); dirn_to_anim(GetSlideMovementAction, gSlideMovementActions); dirn_to_anim(GetPlayerRunMovementAction, gPlayerRunMovementActions); dirn_to_anim(GetJump2MovementAction, gJump2MovementActions); @@ -5953,13 +5953,13 @@ bool8 MovementAction_RideWaterCurrentRight_Step1(struct ObjectEvent *objectEvent return FALSE; } -bool8 MovementAction_WalkFastestDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkFasterDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { InitMovementNormal(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FASTER); - return MovementAction_WalkFastestDown_Step1(objectEvent, sprite); + return MovementAction_WalkFasterDown_Step1(objectEvent, sprite); } -bool8 MovementAction_WalkFastestDown_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkFasterDown_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (UpdateMovementNormal(objectEvent, sprite)) { @@ -5969,13 +5969,13 @@ bool8 MovementAction_WalkFastestDown_Step1(struct ObjectEvent *objectEvent, stru return FALSE; } -bool8 MovementAction_WalkFastestUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkFasterUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { InitMovementNormal(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FASTER); - return MovementAction_WalkFastestUp_Step1(objectEvent, sprite); + return MovementAction_WalkFasterUp_Step1(objectEvent, sprite); } -bool8 MovementAction_WalkFastestUp_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkFasterUp_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (UpdateMovementNormal(objectEvent, sprite)) { @@ -5985,13 +5985,13 @@ bool8 MovementAction_WalkFastestUp_Step1(struct ObjectEvent *objectEvent, struct return FALSE; } -bool8 MovementAction_WalkFastestLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkFasterLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { InitMovementNormal(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FASTER); - return MovementAction_WalkFastestLeft_Step1(objectEvent, sprite); + return MovementAction_WalkFasterLeft_Step1(objectEvent, sprite); } -bool8 MovementAction_WalkFastestLeft_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkFasterLeft_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (UpdateMovementNormal(objectEvent, sprite)) { @@ -6001,13 +6001,13 @@ bool8 MovementAction_WalkFastestLeft_Step1(struct ObjectEvent *objectEvent, stru return FALSE; } -bool8 MovementAction_WalkFastestRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkFasterRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { InitMovementNormal(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FASTER); - return MovementAction_WalkFastestRight_Step1(objectEvent, sprite); + return MovementAction_WalkFasterRight_Step1(objectEvent, sprite); } -bool8 MovementAction_WalkFastestRight_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkFasterRight_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (UpdateMovementNormal(objectEvent, sprite)) { diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 6ce304c2c0..84c70435d6 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -970,10 +970,10 @@ void PlayerRideWaterCurrent(u8 a) PlayerSetAnimId(GetRideWaterCurrentMovementAction(a), 2); } -// fastest speed (4 speed) +// faster speed void PlayerGoSpeed4(u8 a) { - PlayerSetAnimId(GetWalkFastestMovementAction(a), 2); + PlayerSetAnimId(GetWalkFasterMovementAction(a), 2); } static void PlayerRun(u8 a) From 3f5f057ebeebc7330af453fbc445e021ac64cbe7 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 01:20:41 +0800 Subject: [PATCH 124/417] Rename GoSpeedX functions to WalkNormal, WalkFast, etc. --- include/field_player_avatar.h | 6 ++--- src/bike.c | 8 +++---- src/field_player_avatar.c | 41 ++++++++++++++++------------------- 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index e9174d5894..823564f226 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -11,10 +11,10 @@ void PlayerGetDestCoords(s16 *, s16 *); u8 GetPlayerFacingDirection(void); u8 GetPlayerMovementDirection(void); u8 PlayerGetCopyableMovement(void); -void PlayerGoSpeed1(u8); -void PlayerGoSpeed2(u8); +void PlayerWalkNormal(u8); +void PlayerWalkFast(u8); void PlayerRideWaterCurrent(u8); -void PlayerGoSpeed4(u8); +void PlayerWalkFaster(u8); void PlayerOnBikeCollide(u8); void PlayerFaceDirection(u8 a); void PlayerTurnInPlace(u8 a); diff --git a/src/bike.c b/src/bike.c index 5aa132a9e3..470b6412f1 100644 --- a/src/bike.c +++ b/src/bike.c @@ -71,12 +71,12 @@ static void (*const sMachBikeTransitions[])(u8) = MachBikeTransition_TrySlowDown, }; -// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order: 0 is normal speed (1 speed), 1 is fast speed (2 speed), 2 is faster speed +// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order static void (*const sMachBikeSpeedCallbacks[])(u8) = { - PlayerGoSpeed1, // normal speed (1 speed) - PlayerGoSpeed2, // fast speed (2 speed) - PlayerGoSpeed4, // faster speed + PlayerWalkNormal, + PlayerWalkFast, + PlayerWalkFaster, }; static void (*const sAcroBikeTransitions[])(u8) = diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 84c70435d6..00800636de 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -470,27 +470,27 @@ static u8 DoForcedMovementInCurrentDirection(void (*a)(u8)) static bool8 ForcedMovement_Slip(void) { - return DoForcedMovementInCurrentDirection(PlayerGoSpeed2); + return DoForcedMovementInCurrentDirection(PlayerWalkFast); } static bool8 ForcedMovement_WalkSouth(void) { - return DoForcedMovement(DIR_SOUTH, PlayerGoSpeed1); + return DoForcedMovement(DIR_SOUTH, PlayerWalkNormal); } static bool8 ForcedMovement_WalkNorth(void) { - return DoForcedMovement(DIR_NORTH, PlayerGoSpeed1); + return DoForcedMovement(DIR_NORTH, PlayerWalkNormal); } static bool8 ForcedMovement_WalkWest(void) { - return DoForcedMovement(DIR_WEST, PlayerGoSpeed1); + return DoForcedMovement(DIR_WEST, PlayerWalkNormal); } static bool8 ForcedMovement_WalkEast(void) { - return DoForcedMovement(DIR_EAST, PlayerGoSpeed1); + return DoForcedMovement(DIR_EAST, PlayerWalkNormal); } static bool8 ForcedMovement_PushedSouthByCurrent(void) @@ -524,22 +524,22 @@ static u8 ForcedMovement_Slide(u8 direction, void (*b)(u8)) static bool8 ForcedMovement_SlideSouth(void) { - return ForcedMovement_Slide(DIR_SOUTH, PlayerGoSpeed2); + return ForcedMovement_Slide(DIR_SOUTH, PlayerWalkFast); } static bool8 ForcedMovement_SlideNorth(void) { - return ForcedMovement_Slide(DIR_NORTH, PlayerGoSpeed2); + return ForcedMovement_Slide(DIR_NORTH, PlayerWalkFast); } static bool8 ForcedMovement_SlideWest(void) { - return ForcedMovement_Slide(DIR_WEST, PlayerGoSpeed2); + return ForcedMovement_Slide(DIR_WEST, PlayerWalkFast); } static bool8 ForcedMovement_SlideEast(void) { - return ForcedMovement_Slide(DIR_EAST, PlayerGoSpeed2); + return ForcedMovement_Slide(DIR_EAST, PlayerWalkFast); } static bool8 ForcedMovement_MatJump(void) @@ -562,7 +562,7 @@ static bool8 ForcedMovement_MuddySlope(void) { Bike_UpdateBikeCounterSpeed(0); playerObjEvent->facingDirectionLocked = TRUE; - return DoForcedMovement(DIR_SOUTH, PlayerGoSpeed2); + return DoForcedMovement(DIR_SOUTH, PlayerWalkFast); } else { @@ -631,8 +631,8 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys) if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING) { - // speed 2 is fast, same speed as running - PlayerGoSpeed2(direction); + // same speed as running + PlayerWalkFast(direction); return; } @@ -645,7 +645,7 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys) } else { - PlayerGoSpeed1(direction); + PlayerWalkNormal(direction); } } @@ -953,16 +953,14 @@ void PlayerSetAnimId(u8 movementActionId, u8 copyableMovement) } } -// normal speed (1 speed) -void PlayerGoSpeed1(u8 a) +void PlayerWalkNormal(u8 direction) { - PlayerSetAnimId(GetWalkNormalMovementAction(a), 2); + PlayerSetAnimId(GetWalkNormalMovementAction(direction), 2); } -// fast speed (2 speed) -void PlayerGoSpeed2(u8 a) +void PlayerWalkFast(u8 direction) { - PlayerSetAnimId(GetWalkFastMovementAction(a), 2); + PlayerSetAnimId(GetWalkFastMovementAction(direction), 2); } void PlayerRideWaterCurrent(u8 a) @@ -970,10 +968,9 @@ void PlayerRideWaterCurrent(u8 a) PlayerSetAnimId(GetRideWaterCurrentMovementAction(a), 2); } -// faster speed -void PlayerGoSpeed4(u8 a) +void PlayerWalkFaster(u8 direction) { - PlayerSetAnimId(GetWalkFasterMovementAction(a), 2); + PlayerSetAnimId(GetWalkFasterMovementAction(direction), 2); } static void PlayerRun(u8 a) From 3556024a06b3d1c973cdd0ce64623652c5e0e5b8 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 02:51:30 +0800 Subject: [PATCH 125/417] Distinguish clearly the two enums related to speed --- include/bike.h | 10 +++++----- src/bike.c | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/bike.h b/include/bike.h index 893b0b19e4..afe773d42e 100644 --- a/include/bike.h +++ b/include/bike.h @@ -17,11 +17,11 @@ struct BikeHistoryInputInfo // Player speeds enum { - SPEED_STANDING, - SPEED_NORMAL, - SPEED_FAST, - SPEED_FASTER, - SPEED_FASTEST, + BIKE_SPEED_STANDING, + BIKE_SPEED_NORMAL, + BIKE_SPEED_FAST, + BIKE_SPEED_FASTER, + BIKE_SPEED_FASTEST, }; // mach bike transitions enum diff --git a/src/bike.c b/src/bike.c index 470b6412f1..fd794a3c7a 100644 --- a/src/bike.c +++ b/src/bike.c @@ -108,7 +108,7 @@ static u8 (*const sAcroBikeInputHandlers[])(u8 *, u16, u16) = }; // used with bikeFrameCounter from mach bike -static const u16 sMachBikeSpeeds[] = {SPEED_NORMAL, SPEED_FAST, SPEED_FASTEST}; +static const u16 sMachBikeSpeeds[] = {BIKE_SPEED_NORMAL, BIKE_SPEED_FAST, BIKE_SPEED_FASTEST}; // this is a list of timers to compare against later, terminated with 0. the only timer being compared against is 4 frames in this list. static const u8 sAcroBikeJumpTimerList[] = {4, 0}; @@ -147,7 +147,7 @@ static u8 GetMachBikeTransition(u8 *dirTraveling) if (*dirTraveling == 0) { *dirTraveling = direction; // update the direction, since below we either faced a direction or we started moving. - if (gPlayerAvatar.bikeSpeed == SPEED_STANDING) + if (gPlayerAvatar.bikeSpeed == BIKE_SPEED_STANDING) { gPlayerAvatar.runningState = NOT_MOVING; return MACH_TRANS_FACE_DIRECTION; @@ -159,7 +159,7 @@ static u8 GetMachBikeTransition(u8 *dirTraveling) // we need to check if the last traveled direction changed from the new direction as well as ensuring that we dont update the state while the player is moving: see the else check. if (*dirTraveling != direction && gPlayerAvatar.runningState != MOVING) { - if (gPlayerAvatar.bikeSpeed != SPEED_STANDING) + if (gPlayerAvatar.bikeSpeed != BIKE_SPEED_STANDING) { *dirTraveling = direction; // implement the new direction gPlayerAvatar.runningState = MOVING; @@ -246,7 +246,7 @@ static void MachBikeTransition_TrySlowDown(u8 direction) { u8 collision; - if (gPlayerAvatar.bikeSpeed != SPEED_STANDING) + if (gPlayerAvatar.bikeSpeed != BIKE_SPEED_STANDING) gPlayerAvatar.bikeFrameCounter = --gPlayerAvatar.bikeSpeed; collision = GetBikeCollision(direction); @@ -306,7 +306,7 @@ static u8 AcroBikeHandleInputNormal(u8 *newDirection, u16 newKeys, u16 heldKeys) return ACRO_TRANS_FACE_DIRECTION; } } - if (*newDirection == direction && (heldKeys & B_BUTTON) && gPlayerAvatar.bikeSpeed == SPEED_STANDING) + if (*newDirection == direction && (heldKeys & B_BUTTON) && gPlayerAvatar.bikeSpeed == BIKE_SPEED_STANDING) { gPlayerAvatar.bikeSpeed++; gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_MOVING; @@ -342,7 +342,7 @@ static u8 AcroBikeHandleInputTurning(u8 *newDirection, u16 newKeys, u16 heldKeys if (*newDirection == AcroBike_GetJumpDirection()) { Bike_SetBikeStill(); // Bike_SetBikeStill sets speed to standing, but the next line immediately overrides it. could have just reset acroBikeState to 0 here instead of wasting a jump. - gPlayerAvatar.bikeSpeed = SPEED_NORMAL; + gPlayerAvatar.bikeSpeed = BIKE_SPEED_NORMAL; if (*newDirection == GetOppositeDirection(direction)) { // do a turn jump. @@ -775,7 +775,7 @@ static void AcroBike_TryHistoryUpdate(u16 newKeys, u16 heldKeys) // newKeys is u else { Bike_UpdateDirTimerHistory(direction); - gPlayerAvatar.bikeSpeed = SPEED_STANDING; + gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING; } direction = heldKeys & (A_BUTTON | B_BUTTON | SELECT_BUTTON | START_BUTTON); // directions is reused for some reason. @@ -787,7 +787,7 @@ static void AcroBike_TryHistoryUpdate(u16 newKeys, u16 heldKeys) // newKeys is u else { Bike_UpdateABStartSelectHistory(direction); - gPlayerAvatar.bikeSpeed = SPEED_STANDING; + gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING; } } @@ -994,7 +994,7 @@ void BikeClearState(int newDirHistory, int newAbStartHistory) gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL; gPlayerAvatar.newDirBackup = DIR_NONE; gPlayerAvatar.bikeFrameCounter = 0; - gPlayerAvatar.bikeSpeed = SPEED_STANDING; + gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING; gPlayerAvatar.directionHistory = newDirHistory; gPlayerAvatar.abStartSelectHistory = newAbStartHistory; @@ -1014,7 +1014,7 @@ void Bike_UpdateBikeCounterSpeed(u8 counter) static void Bike_SetBikeStill(void) { gPlayerAvatar.bikeFrameCounter = 0; - gPlayerAvatar.bikeSpeed = SPEED_STANDING; + gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING; } s16 GetPlayerSpeed(void) @@ -1027,11 +1027,11 @@ s16 GetPlayerSpeed(void) if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_MACH_BIKE) return machSpeeds[gPlayerAvatar.bikeFrameCounter]; else if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_ACRO_BIKE) - return SPEED_FASTER; + return BIKE_SPEED_FASTER; else if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_SURFING | PLAYER_AVATAR_FLAG_DASH)) - return SPEED_FAST; + return BIKE_SPEED_FAST; else - return SPEED_NORMAL; + return BIKE_SPEED_NORMAL; } void Bike_HandleBumpySlopeJump(void) From 510ccbdf4cdc380594d9ee253fc209cb477d9df4 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 02:56:23 +0800 Subject: [PATCH 126/417] Move definition of constants for movement speed --- src/data/object_events/movement_action_func_tables.h | 8 -------- src/event_object_movement.c | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/data/object_events/movement_action_func_tables.h b/src/data/object_events/movement_action_func_tables.h index 729b4fe234..aa55c31ef5 100755 --- a/src/data/object_events/movement_action_func_tables.h +++ b/src/data/object_events/movement_action_func_tables.h @@ -602,14 +602,6 @@ u8 (*const gMovementActionFuncs_FaceRight[])(struct ObjectEvent *, struct Sprite MovementAction_PauseSpriteAnim, }; -enum { - MOVE_SPEED_NORMAL, // walking - MOVE_SPEED_FAST_1, // running / surfing / sliding (ice tile) - MOVE_SPEED_FAST_2, // water current / acro bike - MOVE_SPEED_FASTER, // mach bike's max speed - MOVE_SPEED_FASTEST, -}; - static u8 (*const sDirectionAnimFuncsBySpeed[])(u8) = { [MOVE_SPEED_NORMAL] = GetMoveDirectionAnimNum, [MOVE_SPEED_FAST_1] = GetMoveDirectionFastAnimNum, diff --git a/src/event_object_movement.c b/src/event_object_movement.c index cddad9aa0d..1bb4991abb 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -32,6 +32,14 @@ // this file was known as evobjmv.c in Game Freak's original source +enum { + MOVE_SPEED_NORMAL, // walking + MOVE_SPEED_FAST_1, // running / surfing / sliding (ice tile) + MOVE_SPEED_FAST_2, // water current / acro bike + MOVE_SPEED_FASTER, // mach bike's max speed + MOVE_SPEED_FASTEST, +}; + // Sprite data used throughout #define sObjEventId data[0] #define sTypeFuncId data[1] // Index into corresponding gMovementTypeFuncs_* table From afb9ff3a40dcfb2681ef274752bceb726d14b783 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 1 Nov 2021 18:06:15 -0400 Subject: [PATCH 127/417] Document files with a few remaining symbols --- gflib/sprite.c | 103 ++- gflib/sprite.h | 7 +- include/constants/event_object_movement.h | 15 + include/constants/metatile_behaviors.h | 6 +- include/event_object_movement.h | 12 +- include/field_weather.h | 2 +- include/global.fieldmap.h | 2 +- include/international_string_util.h | 2 +- include/link.h | 3 +- include/menu_helpers.h | 4 +- include/metatile_behavior.h | 9 +- include/overworld.h | 4 +- include/palette_util.h | 2 +- include/text_window.h | 4 +- src/battle_dome.c | 18 +- src/battle_pyramid_bag.c | 14 +- src/berry_tag_screen.c | 6 +- src/bike.c | 2 +- src/confetti_util.c | 37 - .../object_events/movement_type_func_tables.h | 22 +- src/decompress.c | 2 +- src/easy_chat.c | 2 +- src/event_object_movement.c | 632 +++++++----------- src/field_control_avatar.c | 7 +- src/field_player_avatar.c | 97 +-- src/field_weather.c | 4 +- src/field_weather_effect.c | 2 +- src/international_string_util.c | 9 +- src/item_menu.c | 16 +- src/item_use.c | 2 +- src/link.c | 4 +- src/mail.c | 6 +- src/menu_helpers.c | 46 +- src/metatile_behavior.c | 23 +- src/minigame_countdown.c | 2 +- src/mystery_event_menu.c | 7 +- src/mystery_gift_menu.c | 2 +- src/overworld.c | 34 +- src/palette_util.c | 41 +- src/party_menu.c | 16 +- src/pokeblock.c | 10 +- src/pokeblock_feed.c | 4 +- src/pokemon_jump.c | 2 +- src/pokemon_summary_screen.c | 14 +- src/pokenav.c | 4 +- src/pokenav_match_call_ui.c | 5 +- src/roulette.c | 8 +- src/scrcmd.c | 6 +- src/start_menu.c | 6 +- src/text_window.c | 4 +- src/trainer_card.c | 6 +- src/union_room_chat.c | 14 +- 52 files changed, 582 insertions(+), 729 deletions(-) diff --git a/gflib/sprite.c b/gflib/sprite.c index 9629fc31b4..f05fe76f2c 100644 --- a/gflib/sprite.c +++ b/gflib/sprite.c @@ -7,6 +7,9 @@ #define OAM_MATRIX_COUNT 32 +#define sAnchorX data[6] +#define sAnchorY data[7] + #define SET_SPRITE_TILE_RANGE(index, start, count) \ { \ sSpriteTileRanges[index * 2] = start; \ @@ -91,7 +94,7 @@ static void ApplyAffineAnimFrame(u8 matrixNum, struct AffineAnimFrameCmd *frameC static u8 IndexOfSpriteTileTag(u16 tag); static void AllocSpriteTileRange(u16 tag, u16 start, u16 count); static void DoLoadSpritePalette(const u16 *src, u16 paletteOffset); -static void obj_update_pos2(struct Sprite* sprite, s32 a1, s32 a2); +static void UpdateSpriteMatrixAnchorPos(struct Sprite* sprite, s32 a1, s32 a2); typedef void (*AnimFunc)(struct Sprite *); typedef void (*AnimCmdFunc)(struct Sprite *); @@ -99,13 +102,13 @@ typedef void (*AffineAnimCmdFunc)(u8 matrixNum, struct Sprite *); #define DUMMY_OAM_DATA \ { \ - .y = 160, \ + .y = DISPLAY_HEIGHT, \ .affineMode = 0, \ .objMode = 0, \ .mosaic = 0, \ .bpp = 0, \ .shape = SPRITE_SHAPE(8x8), \ - .x = 304, \ + .x = DISPLAY_WIDTH + 64, \ .matrixNum = 0, \ .size = SPRITE_SIZE(8x8), \ .tileNum = 0, \ @@ -159,41 +162,11 @@ static const struct Sprite sDummySprite = { .oam = DUMMY_OAM_DATA, .anims = gDummySpriteAnimTable, - .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .template = &gDummySpriteTemplate, - .subspriteTables = NULL, .callback = SpriteCallbackDummy, - .x = 304, .y = 160, - .x2 = 0, .y2 = 0, - .centerToCornerVecX = 0, - .centerToCornerVecY = 0, - .animNum = 0, - .animCmdIndex = 0, - .animDelayCounter = 0, - .animPaused = 0, - .affineAnimPaused = 0, - .animLoopCounter = 0, - .data = {0, 0, 0, 0, 0, 0, 0}, - .inUse = 0, - .coordOffsetEnabled = 0, - .invisible = FALSE, - .flags_3 = 0, - .flags_4 = 0, - .flags_5 = 0, - .flags_6 = 0, - .flags_7 = 0, - .hFlip = 0, - .vFlip = 0, - .animBeginning = 0, - .affineAnimBeginning = 0, - .animEnded = 0, - .affineAnimEnded = 0, - .usingSheet = 0, - .flags_f = 0, - .sheetTileStart = 0, - .subspriteTableNum = 0, - .subspriteMode = 0, + .x = DISPLAY_WIDTH + 64, + .y = DISPLAY_HEIGHT, .subpriority = 0xFF }; @@ -890,16 +863,26 @@ void ResetAllSprites(void) ResetSprite(&gSprites[i]); } -// UB: template pointer may point to freed temporary storage void FreeSpriteTiles(struct Sprite *sprite) { +// UB: template pointer may point to freed temporary storage +#ifdef UBFIX + if (!sprite || !sprite->template) + return; +#endif + if (sprite->template->tileTag != TAG_NONE) FreeSpriteTilesByTag(sprite->template->tileTag); } -// UB: template pointer may point to freed temporary storage void FreeSpritePalette(struct Sprite *sprite) { +// UB: template pointer may point to freed temporary storage +#ifdef UBFIX + if (!sprite || !sprite->template) + return; +#endif + FreeSpritePaletteByTag(sprite->template->paletteTag); } @@ -1098,8 +1081,8 @@ void BeginAffineAnim(struct Sprite *sprite) sprite->affineAnimEnded = FALSE; ApplyAffineAnimFrame(matrixNum, &frameCmd); sAffineAnimStates[matrixNum].delayCounter = frameCmd.duration; - if (sprite->flags_f) - obj_update_pos2(sprite, sprite->data[6], sprite->data[7]); + if (sprite->anchored) + UpdateSpriteMatrixAnchorPos(sprite, sprite->sAnchorX, sprite->sAnchorY); } } @@ -1124,8 +1107,8 @@ void ContinueAffineAnim(struct Sprite *sprite) funcIndex = type - 32765; sAffineAnimCmdFuncs[funcIndex](matrixNum, sprite); } - if (sprite->flags_f) - obj_update_pos2(sprite, sprite->data[6], sprite->data[7]); + if (sprite->anchored) + UpdateSpriteMatrixAnchorPos(sprite, sprite->sAnchorX, sprite->sAnchorY); } } @@ -1219,14 +1202,16 @@ u8 GetSpriteMatrixNum(struct Sprite *sprite) return matrixNum; } -void sub_8007E18(struct Sprite* sprite, s16 a2, s16 a3) +// Used to shift a sprite's position as it scales. +// Only used by the minigame countdown, so that for instance the numbers don't slide up as they squish down before jumping. +void SetSpriteMatrixAnchor(struct Sprite* sprite, s16 x, s16 y) { - sprite->data[6] = a2; - sprite->data[7] = a3; - sprite->flags_f = 1; + sprite->sAnchorX = x; + sprite->sAnchorY = y; + sprite->anchored = TRUE; } -s32 sub_8007E28(s32 a0, s32 a1, s32 a2) +static s32 GetAnchorCoord(s32 a0, s32 a1, s32 coord) { s32 subResult, var1; @@ -1235,27 +1220,27 @@ s32 sub_8007E28(s32 a0, s32 a1, s32 a2) var1 = -(subResult) >> 9; else var1 = -(subResult >> 9); - return a2 - ((u32)(a2 * a1) / (u32)(a0) + var1); + return coord - ((u32)(coord * a1) / (u32)(a0) + var1); } -void obj_update_pos2(struct Sprite *sprite, s32 a1, s32 a2) +static void UpdateSpriteMatrixAnchorPos(struct Sprite *sprite, s32 x, s32 y) { - s32 var0, var1, var2; + s32 dimension, var1, var2; u32 matrixNum = sprite->oam.matrixNum; - if (a1 != 0x800) + if (x != NO_ANCHOR) { - var0 = sOamDimensions32[sprite->oam.shape][sprite->oam.size].width; - var1 = var0 << 8; - var2 = (var0 << 16) / gOamMatrices[matrixNum].a; - sprite->x2 = sub_8007E28(var1, var2, a1); + dimension = sOamDimensions32[sprite->oam.shape][sprite->oam.size].width; + var1 = dimension << 8; + var2 = (dimension << 16) / gOamMatrices[matrixNum].a; + sprite->x2 = GetAnchorCoord(var1, var2, x); } - if (a2 != 0x800) + if (y != NO_ANCHOR) { - var0 = sOamDimensions32[sprite->oam.shape][sprite->oam.size].height; - var1 = var0 << 8; - var2 = (var0 << 16) / gOamMatrices[matrixNum].d; - sprite->y2 = sub_8007E28(var1, var2, a2); + dimension = sOamDimensions32[sprite->oam.shape][sprite->oam.size].height; + var1 = dimension << 8; + var2 = (dimension << 16) / gOamMatrices[matrixNum].d; + sprite->y2 = GetAnchorCoord(var1, var2, y); } } diff --git a/gflib/sprite.h b/gflib/sprite.h index 89299d43ed..595ecd7dbd 100644 --- a/gflib/sprite.h +++ b/gflib/sprite.h @@ -5,6 +5,9 @@ #define SPRITE_NONE 0xFF #define TAG_NONE 0xFFFF +// Given to SetSpriteMatrixAnchor to skip anchoring one of the coords. +#define NO_ANCHOR 0x800 + struct SpriteSheet { const void *data; // Raw uncompressed pixel data @@ -227,7 +230,7 @@ struct Sprite bool16 animEnded:1; //0x10 bool16 affineAnimEnded:1; //0x20 bool16 usingSheet:1; //0x40 - bool16 flags_f:1; //0x80 + bool16 anchored:1; //0x80 /*0x40*/ u16 sheetTileStart; @@ -280,7 +283,7 @@ void FreeSpriteOamMatrix(struct Sprite *sprite); void DestroySpriteAndFreeResources(struct Sprite *sprite); void sub_800142C(u32 a1, u32 a2, u16 *a3, u16 a4, u32 a5); void AnimateSprite(struct Sprite *sprite); -void sub_8007E18(struct Sprite* sprite, s16 a2, s16 a3); +void SetSpriteMatrixAnchor(struct Sprite* sprite, s16 x, s16 y); void StartSpriteAnim(struct Sprite *sprite, u8 animNum); void StartSpriteAnimIfDifferent(struct Sprite *sprite, u8 animNum); void SeekSpriteAnim(struct Sprite *sprite, u8 animCmdIndex); diff --git a/include/constants/event_object_movement.h b/include/constants/event_object_movement.h index e7238b56e0..9611d008b1 100755 --- a/include/constants/event_object_movement.h +++ b/include/constants/event_object_movement.h @@ -82,6 +82,7 @@ #define MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_UP 0x4E #define MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_LEFT 0x4F #define MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_RIGHT 0x50 +#define NUM_MOVEMENT_TYPES 0x51 #define MOVEMENT_ACTION_FACE_DOWN 0x0 #define MOVEMENT_ACTION_FACE_UP 0x1 @@ -318,4 +319,18 @@ #define ANIM_HOOKED_POKEMON_WEST 10 #define ANIM_HOOKED_POKEMON_EAST 11 +// IDs for how NPCs that copy player movement should respond. +// Most go unused. +#define COPY_MOVE_NONE 0 +#define COPY_MOVE_FACE 1 +#define COPY_MOVE_WALK 2 +#define COPY_MOVE_WALK_FAST 3 +#define COPY_MOVE_WALK_FASTER 4 +#define COPY_MOVE_SLIDE 5 +#define COPY_MOVE_JUMP_IN_PLACE 6 +#define COPY_MOVE_JUMP 7 +#define COPY_MOVE_JUMP2 8 +#define COPY_MOVE_EMPTY_1 9 +#define COPY_MOVE_EMPTY_2 10 + #endif // GUARD_CONSTANTS_EVENT_OBJECT_MOVEMENT_H diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h index df2d28c7df..dde8213587 100755 --- a/include/constants/metatile_behaviors.h +++ b/include/constants/metatile_behaviors.h @@ -127,8 +127,8 @@ #define MB_BRIDGE_OVER_POND_MED_EDGE_2 0x7B #define MB_BRIDGE_OVER_POND_HIGH_EDGE_1 0x7C #define MB_BRIDGE_OVER_POND_HIGH_EDGE_2 0x7D -#define MB_UNUSED_BRIDGE_1 0x7E -#define MB_UNUSED_BRIDGE_2 0x7F +#define MB_UNUSED_BRIDGE 0x7E +#define MB_BIKE_BRIDGE_OVER_BARRIER 0x7F #define MB_COUNTER 0x80 #define MB_UNUSED_81 0x81 #define MB_UNUSED_82 0x82 @@ -199,7 +199,7 @@ #define MB_HOLDS_LARGE_DECORATION 0xC3 #define MB_SECRET_BASE_TV_SHIELD 0xC4 #define MB_PLAYER_ROOM_PC_ON 0xC5 -#define MB_C6 0xC6 +#define MB_SECRET_BASE_DECORATION_BASE 0xC6 #define MB_SECRET_BASE_POSTER 0xC7 #define MB_UNUSED_C8 0xC8 #define MB_UNUSED_C9 0xC9 diff --git a/include/event_object_movement.h b/include/event_object_movement.h index 11dac813d9..9ed524e665 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -1,6 +1,8 @@ #ifndef GUARD_EVENT_OBJECT_MOVEMENT_H #define GUARD_EVENT_OBJECT_MOVEMENT_H +#include "constants/event_object_movement.h" + enum SpinnerRunnerFollowPatterns { RUNFOLLOW_ANY, @@ -395,13 +397,13 @@ u8 MovementType_CopyPlayer_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementType_CopyPlayer_Step2(struct ObjectEvent *, struct Sprite *); bool8 CopyablePlayerMovement_None(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); bool8 CopyablePlayerMovement_FaceDirection(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); -bool8 CopyablePlayerMovement_GoSpeed0(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); -bool8 CopyablePlayerMovement_GoSpeed1(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); -bool8 CopyablePlayerMovement_GoSpeed2(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); +bool8 CopyablePlayerMovement_WalkNormal(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); +bool8 CopyablePlayerMovement_WalkFast(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); +bool8 CopyablePlayerMovement_WalkFaster(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); bool8 CopyablePlayerMovement_Slide(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); -bool8 cph_IM_DIFFERENT(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); -bool8 CopyablePlayerMovement_GoSpeed4(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); +bool8 CopyablePlayerMovement_JumpInPlace(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); bool8 CopyablePlayerMovement_Jump(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); +bool8 CopyablePlayerMovement_Jump2(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)); u8 MovementType_CopyPlayerInGrass_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementType_Buried_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementType_WalkInPlace_Step0(struct ObjectEvent *, struct Sprite *); diff --git a/include/field_weather.h b/include/field_weather.h index 9c6a4ab7ad..72a56ab6ec 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -147,7 +147,7 @@ void SetNextWeather(u8 weather); void SetCurrentAndNextWeather(u8 weather); void SetCurrentAndNextWeatherNoDelay(u8 weather); void ApplyWeatherGammaShiftIfIdle(s8 gammaIndex); -void sub_80ABC7C(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay); +void ApplyWeatherGammaShiftIfIdle_Gradual(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay); void FadeScreen(u8 mode, s8 delay); bool8 IsWeatherNotFadingIn(void); void UpdateSpritePaletteWithWeather(u8 spritePaletteIndex); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 71ccd70680..33be942c80 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -211,7 +211,7 @@ struct ObjectEvent /*0x1F*/ u8 previousMetatileBehavior; /*0x20*/ u8 previousMovementDirection; /*0x21*/ u8 directionSequenceIndex; - /*0x22*/ u8 playerCopyableMovement; + /*0x22*/ u8 playerCopyableMovement; // COPY_MOVE_* /*size = 0x24*/ }; diff --git a/include/international_string_util.h b/include/international_string_util.h index 54f4c008ff..dd5c6ac5fe 100644 --- a/include/international_string_util.h +++ b/include/international_string_util.h @@ -19,6 +19,6 @@ void PadNameString(u8 *dest, u8 padChar); void ConvertInternationalPlayerNameStripChar(u8 *, u8); void ConvertInternationalContestantName(u8 *); int GetNicknameLanguage(u8 *); -void sub_81DB620(int windowId, int columnStart, int rowStart, int numFillTiles, int numRows); +void FillWindowTilesByRow(int windowId, int columnStart, int rowStart, int numFillTiles, int numRows); #endif // GUARD_INTERNATIONAL_STRING_UTIL_H diff --git a/include/link.h b/include/link.h index 6061745af3..96a76e120c 100644 --- a/include/link.h +++ b/include/link.h @@ -5,6 +5,7 @@ #define MAX_RFU_PLAYERS 5 #define CMD_LENGTH 8 #define QUEUE_CAPACITY 50 +#define OVERWORLD_RECV_QUEUE_MAX 3 #define BLOCK_BUFFER_SIZE 0x100 #define LINK_SLAVE 0 @@ -301,7 +302,7 @@ bool32 Link_AnyPartnersPlayingFRLG_JP(void); void ResetLinkPlayerCount(void); void SaveLinkPlayers(u8 a0); void SetWirelessCommType0(void); -bool32 IsLinkRecvQueueLengthAtLeast3(void); +bool32 IsLinkRecvQueueAtOverworldMax(void); extern u16 gLinkPartnersHeldKeys[6]; extern u32 gLinkDebugSeed; diff --git a/include/menu_helpers.h b/include/menu_helpers.h index df71ce2521..0e063e5c1f 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -27,8 +27,8 @@ u8 GetLRKeysPressed(void); u8 GetLRKeysPressedAndHeld(void); bool8 IsHoldingItemAllowed(u16 itemId); bool8 IsWritingMailAllowed(u16 itemId); -bool8 MenuHelpers_LinkSomething(void); -bool8 MenuHelpers_CallLinkSomething(void); +bool8 MenuHelpers_IsLinkActive(void); +bool8 MenuHelpers_ShouldWaitForLinkRecv(void); void SetItemListPerPageCount(struct ItemSlot *slots, u8 slotsCount, u8 *pageItems, u8 *totalItems, u8 maxPerPage); void SetCursorWithinListBounds(u16 *scrollOffset, u16 *cursorPos, u8 maxShownItems, u8 totalItems); void SetCursorScrollWithinListBounds(u16 *scrollOffset, u16 *cursorPos, u8 shownItems, u8 totalItems, u8 maxShownItems); diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index 87a9ebcc59..23c84dffb1 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -23,7 +23,6 @@ bool8 MetatileBehavior_IsIce(u8); bool8 MetatileBehavior_IsWarpDoor(u8); bool8 MetatileBehavior_IsDoor(u8); bool8 MetatileBehavior_IsEscalator(u8); -bool8 MetatileBehavior_IsMB_04(u8); bool8 MetatileBehavior_IsLadder(u8); bool8 MetatileBehavior_IsNonAnimDoor(u8); bool8 MetatileBehavior_IsDeepSouthWarp(u8); @@ -36,7 +35,6 @@ bool8 MetatileBehavior_IsArrowWarp(u8); bool8 MetatileBehavior_IsForcedMovementTile(u8); bool8 MetatileBehavior_IsIce_2(u8); bool8 MetatileBehavior_IsTrickHouseSlipperyFloor(u8); -bool8 MetatileBehavior_IsMB_05(u8); bool8 MetatileBehavior_IsWalkNorth(u8); bool8 MetatileBehavior_IsWalkSouth(u8); bool8 MetatileBehavior_IsWalkWest(u8); @@ -59,14 +57,12 @@ bool8 MetatileBehavior_IsSecretBaseTree(u8); bool8 MetatileBehavior_IsSecretBaseShrub(u8); bool8 MetatileBehavior_IsSecretBasePC(u8); bool8 MetatileBehavior_IsRecordMixingSecretBasePC(u8); -bool8 MetatileBehavior_IsMB_B2(u8); bool8 MetatileBehavior_IsBlockDecoration(u8); bool8 MetatileBehavior_IsSecretBaseImpassable(u8); -bool8 MetatileBehavior_IsMB_C6(u8); +bool8 MetatileBehavior_IsSecretBaseDecorationBase(u8); bool8 MetatileBehavior_IsSecretBasePoster(u8); bool8 MetatileBehavior_IsNormal(u8); bool8 MetatileBehavior_IsSecretBaseNorthWall(u8); -bool8 MetatileBehavior_IsMB_B2_Duplicate(u8); bool8 MetatileBehavior_HoldsSmallDecoration(u8); bool8 MetatileBehavior_HoldsLargeDecoration(u8); bool8 MetatileBehavior_IsSecretBaseHole(u8); @@ -97,7 +93,6 @@ bool8 MetatileBehavior_IsShallowFlowingWater(u8); bool8 MetatileBehavior_IsThinIce(u8); bool8 MetatileBehavior_IsCrackedIce(u8); bool8 MetatileBehavior_IsDeepOrOceanWater(u8); -bool8 MetatileBehavior_IsMB_18_OrMB_1A(u8); bool8 MetatileBehavior_IsSurfableAndNotWaterfall(u8); bool8 MetatileBehavior_IsEastBlocked(u8); bool8 MetatileBehavior_IsWestBlocked(u8); @@ -123,7 +118,7 @@ bool8 MetatileBehavior_IsSecretBaseSpinMat(u8); bool8 MetatileBehavior_IsLavaridgeB1FWarp(u8); bool8 MetatileBehavior_IsLavaridge1FWarp(u8); bool8 MetatileBehavior_IsAquaHideoutWarp(u8); -bool8 MetatileBehavior_IsBridgeOverOcean(u8); +bool8 MetatileBehavior_IsUnionRoomWarp(u8); bool8 MetatileBehavior_IsMossdeepGymWarp(u8); bool8 MetatileBehavior_IsSurfableFishableWater(u8); bool8 MetatileBehavior_IsMtPyreHole(u8); diff --git a/include/overworld.h b/include/overworld.h index 8005a22228..e1cf100db5 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -127,7 +127,7 @@ u8 GetSavedWarpRegionMapSectionId(void); u8 GetCurrentRegionMapSectionId(void); u8 GetCurrentMapBattleScene(void); void CleanupOverworldWindowsAndTilemaps(void); -bool32 IsUpdateLinkStateCBActive(void); +bool32 IsOverworldLinkActive(void); void CB1_Overworld(void); void CB2_OverworldBasic(void); void CB2_Overworld(void); @@ -151,7 +151,7 @@ u16 SetInCableClubSeat(void); u16 SetLinkWaitingForScript(void); u16 QueueExitLinkRoomKey(void); u16 SetStartedCableClubActivity(void); -bool32 Overworld_LinkRecvQueueLengthMoreThan2(void); +bool32 Overworld_IsRecvQueueAtMax(void); bool32 Overworld_RecvKeysFromLinkIsRunning(void); bool32 Overworld_SendKeysToLinkIsRunning(void); bool32 IsSendingKeysOverCable(void); diff --git a/include/palette_util.h b/include/palette_util.h index 46468c0a6a..12ffc145e4 100644 --- a/include/palette_util.h +++ b/include/palette_util.h @@ -72,7 +72,7 @@ void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); void UpdatePulseBlend(struct PulseBlend *); -void ClearTilemapRect(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height); +void FillTilemapRect(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height); void SetTilemapRect(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height); void RouletteFlash_Run(struct RouletteFlashUtil *r0); void RouletteFlash_Reset(struct RouletteFlashUtil *r0); diff --git a/include/text_window.h b/include/text_window.h index 7bdcacd17c..aa7798c358 100644 --- a/include/text_window.h +++ b/include/text_window.h @@ -14,14 +14,14 @@ extern const u16 gTextWindowFrame1_Pal[]; const struct TilesPal *GetWindowFrameTilesPal(u8 id); void LoadMessageBoxGfx(u8 windowId, u16 destOffset, u8 palOffset); -void LoadUserWindowBorderGfx(u8 windowId, u16 destOffset, u8 palOffset); void LoadWindowGfx(u8 windowId, u8 frameId, u16 destOffset, u8 palOffset); +void LoadUserWindowBorderGfx(u8 windowId, u16 destOffset, u8 palOffset); void LoadUserWindowBorderGfx_(u8 windowId, u16 destOffset, u8 palOffset); +void LoadUserWindowBorderGfxOnBg(u8 bg, u16 destOffset, u8 palOffset); void DrawTextBorderOuter(u8 windowId, u16 tileNum, u8 palNum); void DrawTextBorderInner(u8 windowId, u16 tileNum, u8 palNum); void rbox_fill_rectangle(u8 windowId); const u16 *GetTextWindowPalette(u8 id); const u16 *GetOverworldTextboxPalettePtr(void); -void sub_8098C6C(u8 bg, u16 destOffset, u8 palOffset); #endif // GUARD_TEXT_WINDOW_H diff --git a/src/battle_dome.c b/src/battle_dome.c index 9449186310..84bc774df1 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -104,7 +104,7 @@ static void HblankCb_TourneyTree(void); static void VblankCb_TourneyTree(void); static u8 UpdateTourneyTreeCursor(u8 taskId); static void DecideRoundWinners(u8 roundId); -static u8 sub_81953E8(u8 tournamentId, u8); +static u8 GetOpposingNPCTournamentIdByRound(u8 tournamentId, u8); static void DrawTourneyAdvancementLine(u8, u8); static void SpriteCb_HorizontalScrollArrow(struct Sprite *sprite); static void SpriteCb_VerticalScrollArrow(struct Sprite *sprite); @@ -1197,7 +1197,7 @@ static const u8 sLastMatchCardNum[DOME_ROUNDS_COUNT] = [DOME_FINAL] = 30 }; -static const u8 gUnknown_0860D1A0[DOME_TOURNAMENT_TRAINERS_COUNT / 2][DOME_ROUNDS_COUNT] = +static const u8 sTrainerAndRoundToLastMatchCardNum[DOME_TOURNAMENT_TRAINERS_COUNT / 2][DOME_ROUNDS_COUNT] = { {16, 24, 28, 30}, {17, 24, 28, 30}, @@ -1209,7 +1209,7 @@ static const u8 gUnknown_0860D1A0[DOME_TOURNAMENT_TRAINERS_COUNT / 2][DOME_ROUND {23, 27, 29, 30}, }; -static const u8 gUnknown_0860D1C0[DOME_TOURNAMENT_TRAINERS_COUNT] = {0, 15, 8, 7, 3, 12, 11, 4, 1, 14, 9, 6, 2, 13, 10, 5}; +static const u8 sTournamentIdToPairedTrainerIds[DOME_TOURNAMENT_TRAINERS_COUNT] = {0, 15, 8, 7, 3, 12, 11, 4, 1, 14, 9, 6, 2, 13, 10, 5}; // The first line of text on a trainers info card. It describes their potential to win, based on their seed in the tournament tree. // Dome Ace Tucker has their own separate potential text. @@ -4178,7 +4178,7 @@ static u8 Task_GetInfoCardInput(u8 taskId) if (input == INFOCARD_INPUT_AB) { if (sInfoCard->pos != 0) - gTasks[taskId2].data[1] = gUnknown_0860D1A0[position / 2][sInfoCard->pos - 1]; + gTasks[taskId2].data[1] = sTrainerAndRoundToLastMatchCardNum[position / 2][sInfoCard->pos - 1]; else gTasks[taskId2].data[1] = position; } @@ -4218,9 +4218,9 @@ static u8 Task_GetInfoCardInput(u8 taskId) if (input == INFOCARD_INPUT_AB) { if (sInfoCard->pos == 0) // On left trainer info card - gTasks[taskId2].data[1] = gUnknown_0860D1C0[sInfoCard->tournamentIds[0]]; + gTasks[taskId2].data[1] = sTournamentIdToPairedTrainerIds[sInfoCard->tournamentIds[0]]; else if (sInfoCard->pos == 2) // On right trainer info card - gTasks[taskId2].data[1] = gUnknown_0860D1C0[sInfoCard->tournamentIds[1]]; + gTasks[taskId2].data[1] = sTournamentIdToPairedTrainerIds[sInfoCard->tournamentIds[1]]; else // On match info card gTasks[taskId2].data[1] = position; } @@ -5224,7 +5224,7 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun { for (i = 0; i < roundId - 1; i++) { - if (gSaveBlock2Ptr->frontier.domeWinningMoves[sub_81953E8(winnerTournamentId, i)] == moveIds[j]) + if (gSaveBlock2Ptr->frontier.domeWinningMoves[GetOpposingNPCTournamentIdByRound(winnerTournamentId, i)] == moveIds[j]) break; } if (i != roundId - 1) @@ -5934,10 +5934,10 @@ int TrainerIdToDomeTournamentId(u16 trainerId) return i; } -static u8 sub_81953E8(u8 tournamentId, u8 round) +static u8 GetOpposingNPCTournamentIdByRound(u8 tournamentId, u8 round) { u8 tournamentIds[2]; - BufferDomeWinString(gUnknown_0860D1A0[gUnknown_0860D1C0[tournamentId] / 2][round] - 16, tournamentIds); + BufferDomeWinString(sTrainerAndRoundToLastMatchCardNum[sTournamentIdToPairedTrainerIds[tournamentId] / 2][round] - 16, tournamentIds); if (tournamentId == tournamentIds[0]) return tournamentIds[1]; else diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index d45770f746..286049e8b3 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -452,9 +452,9 @@ static void VBlankCB_PyramidBag(void) static void CB2_LoadPyramidBagMenu(void) { - while (MenuHelpers_CallLinkSomething() != TRUE + while (MenuHelpers_ShouldWaitForLinkRecv() != TRUE && LoadPyramidBagMenu() != TRUE - && MenuHelpers_LinkSomething() != TRUE); + && MenuHelpers_IsLinkActive() != TRUE); } static bool8 LoadPyramidBagMenu(void) @@ -484,7 +484,7 @@ static bool8 LoadPyramidBagMenu(void) gMain.state++; break; case 5: - if (!MenuHelpers_LinkSomething()) + if (!MenuHelpers_IsLinkActive()) ResetTasks(); gMain.state++; break; @@ -885,7 +885,7 @@ static void Task_ClosePyramidBag(u8 taskId) static void Task_HandlePyramidBagInput(u8 taskId) { s16 *data = gTasks[taskId].data; - if (MenuHelpers_CallLinkSomething() == TRUE || gPaletteFade.active) + if (MenuHelpers_ShouldWaitForLinkRecv() == TRUE || gPaletteFade.active) return; if (JOY_NEW(SELECT_BUTTON)) @@ -990,7 +990,7 @@ static void PrintMenuActionText_MultiRow(u8 windowId, u8 horizontalCount, u8 ver static void HandleMenuActionInput_SingleRow(u8 taskId) { - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { s32 id = Menu_ProcessInputNoWrap(); switch (id) @@ -1012,7 +1012,7 @@ static void HandleMenuActionInput_SingleRow(u8 taskId) static void HandleMenuActionInput_2x2(u8 taskId) { - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { s8 id = Menu_GetCursorPos(); if (JOY_NEW(DPAD_UP)) @@ -1325,7 +1325,7 @@ static void Task_BeginItemSwap(u8 taskId) static void Task_ItemSwapHandleInput(u8 taskId) { s16 *data = gTasks[taskId].data; - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { if (JOY_NEW(SELECT_BUTTON)) { diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index babbbb3eb2..5a6f6f694a 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -200,11 +200,11 @@ static void CB2_InitBerryTagScreen(void) { while (1) { - if (MenuHelpers_CallLinkSomething() == TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() == TRUE) break; if (InitBerryTagScreen() == TRUE) break; - if (MenuHelpers_LinkSomething() == TRUE) + if (MenuHelpers_IsLinkActive() == TRUE) break; } } @@ -237,7 +237,7 @@ static bool8 InitBerryTagScreen(void) gMain.state++; break; case 5: - if (!MenuHelpers_LinkSomething()) + if (!MenuHelpers_IsLinkActive()) ResetTasks(); gMain.state++; break; diff --git a/src/bike.c b/src/bike.c index fd794a3c7a..20166392e9 100644 --- a/src/bike.c +++ b/src/bike.c @@ -658,7 +658,7 @@ static void AcroBikeTransition_SideJump(u8 direction) playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; PlaySE(SE_BIKE_HOP); playerObjEvent->facingDirectionLocked = 1; - PlayerSetAnimId(GetJumpMovementAction(direction), 2); + PlayerSetAnimId(GetJumpMovementAction(direction), COPY_MOVE_WALK); } static void AcroBikeTransition_TurnJump(u8 direction) diff --git a/src/confetti_util.c b/src/confetti_util.c index bcf19f705c..9ede3088a8 100644 --- a/src/confetti_util.c +++ b/src/confetti_util.c @@ -10,43 +10,6 @@ static EWRAM_DATA struct struct ConfettiUtil *array; } *sWork = NULL; -static void sub_81520A8(void *dest, u16 value, u8 left, u8 top, u8 width, u8 height) // Unused. -{ - u8 i; - u8 j; - u8 x; - u8 y; - - for (i = 0, y = top; i < height; i++) - { - for (x = left, j = 0; j < width; j++) - { - *(u16 *)((dest) + (y * 64 + x * 2)) = value; - x = (x + 1) % 32; - } - y = (y + 1) % 32; - } -} - -static void sub_8152134(void *dest, const u16 *src, u8 left, u8 top, u8 width, u8 height) // Unused. -{ - u8 i; - u8 j; - u8 x; - u8 y; - const u16 *_src; - - for (i = 0, _src = src, y = top; i < height; i++) - { - for (x = left, j = 0; j < width; j++) - { - *(u16 *)((dest) + (y * 64 + x * 2)) = *(_src++); - x = (x + 1) % 32; - } - y = (y + 1) % 32; - } -} - bool32 ConfettiUtil_Init(u8 count) { u8 i = 0; diff --git a/src/data/object_events/movement_type_func_tables.h b/src/data/object_events/movement_type_func_tables.h index f4890d6846..f5189d838f 100755 --- a/src/data/object_events/movement_type_func_tables.h +++ b/src/data/object_events/movement_type_func_tables.h @@ -388,17 +388,17 @@ u8 (*const gMovementTypeFuncs_CopyPlayer[])(struct ObjectEvent *, struct Sprite }; bool8 (*const gCopyPlayerMovementFuncs[])(struct ObjectEvent *, struct Sprite *, u8, bool8(u8)) = { - CopyablePlayerMovement_None, - CopyablePlayerMovement_FaceDirection, - CopyablePlayerMovement_GoSpeed0, - CopyablePlayerMovement_GoSpeed1, - CopyablePlayerMovement_GoSpeed2, - CopyablePlayerMovement_Slide, - cph_IM_DIFFERENT, - CopyablePlayerMovement_GoSpeed4, - CopyablePlayerMovement_Jump, - CopyablePlayerMovement_None, - CopyablePlayerMovement_None, + [COPY_MOVE_NONE] = CopyablePlayerMovement_None, + [COPY_MOVE_FACE] = CopyablePlayerMovement_FaceDirection, + [COPY_MOVE_WALK] = CopyablePlayerMovement_WalkNormal, + [COPY_MOVE_WALK_FAST] = CopyablePlayerMovement_WalkFast, + [COPY_MOVE_WALK_FASTER] = CopyablePlayerMovement_WalkFaster, + [COPY_MOVE_SLIDE] = CopyablePlayerMovement_Slide, + [COPY_MOVE_JUMP_IN_PLACE] = CopyablePlayerMovement_JumpInPlace, + [COPY_MOVE_JUMP] = CopyablePlayerMovement_Jump, + [COPY_MOVE_JUMP2] = CopyablePlayerMovement_Jump2, + [COPY_MOVE_EMPTY_1] = CopyablePlayerMovement_None, + [COPY_MOVE_EMPTY_2] = CopyablePlayerMovement_None, }; u8 (*const gMovementTypeFuncs_CopyPlayerInGrass[])(struct ObjectEvent *, struct Sprite *) = { diff --git a/src/decompress.c b/src/decompress.c index a65f38c2d7..b74d4e814a 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -113,7 +113,7 @@ void Unused_LZDecompressWramIndirect(const void **src, void *dest) LZ77UnCompWram(*src, dest); } -void sub_803471C(s32 object_size, s32 object_count, u8 *src_tiles, u8 *dest_tiles) +static void StitchObjectsOn8x8Canvas(s32 object_size, s32 object_count, u8 *src_tiles, u8 *dest_tiles) { /* This function appears to emulate behaviour found in the GB(C) versions regarding how the Pokemon images diff --git a/src/easy_chat.c b/src/easy_chat.c index b18d09b833..625e8cd9e2 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -1310,7 +1310,7 @@ static void StartEasyChatScreen(u8 taskId, TaskFunc taskFunc) static void Task_InitEasyChatScreen(u8 taskId) { - if (!IsUpdateLinkStateCBActive()) + if (!IsOverworldLinkActive()) { while (InitEasyChatScreen(taskId)); } diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 1bb4991abb..5b1857297c 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -26,6 +26,7 @@ #include "constants/event_objects.h" #include "constants/field_effects.h" #include "constants/items.h" +#include "constants/maps.h" #include "constants/mauville_old_man.h" #include "constants/trainer_types.h" #include "constants/union_room.h" @@ -79,7 +80,7 @@ static bool8 ObjectEventExecSingleMovementAction(struct ObjectEvent *, struct Sp static void SetMovementDelay(struct Sprite *, s16); static bool8 WaitForMovementDelay(struct Sprite *); static u8 GetCollisionInDirection(struct ObjectEvent *, u8); -static u32 state_to_direction(u8, u32, u32); +static u32 GetCopyDirection(u8, u32, u32); static void TryEnableObjectEventAnim(struct ObjectEvent *, struct Sprite *); static void ObjectEventExecHeldMovementAction(struct ObjectEvent *, struct Sprite *); static void UpdateObjectEventSpriteAnimPause(struct ObjectEvent *, struct Sprite *); @@ -267,88 +268,48 @@ static void (*const sMovementTypeCallbacks[])(struct Sprite *) = [MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_RIGHT] = MovementType_WalkSlowlyInPlace, }; -const u8 gRangedMovementTypes[] = { - [MOVEMENT_TYPE_NONE] = 0, - [MOVEMENT_TYPE_LOOK_AROUND] = 0, - [MOVEMENT_TYPE_WANDER_AROUND] = 1, - [MOVEMENT_TYPE_WANDER_UP_AND_DOWN] = 1, - [MOVEMENT_TYPE_WANDER_DOWN_AND_UP] = 1, - [MOVEMENT_TYPE_WANDER_LEFT_AND_RIGHT] = 1, - [MOVEMENT_TYPE_WANDER_RIGHT_AND_LEFT] = 1, - [MOVEMENT_TYPE_FACE_UP] = 0, - [MOVEMENT_TYPE_FACE_DOWN] = 0, - [MOVEMENT_TYPE_FACE_LEFT] = 0, - [MOVEMENT_TYPE_FACE_RIGHT] = 0, - [MOVEMENT_TYPE_PLAYER] = 0, - [MOVEMENT_TYPE_BERRY_TREE_GROWTH] = 0, - [MOVEMENT_TYPE_FACE_DOWN_AND_UP] = 0, - [MOVEMENT_TYPE_FACE_LEFT_AND_RIGHT] = 0, - [MOVEMENT_TYPE_FACE_UP_AND_LEFT] = 0, - [MOVEMENT_TYPE_FACE_UP_AND_RIGHT] = 0, - [MOVEMENT_TYPE_FACE_DOWN_AND_LEFT] = 0, - [MOVEMENT_TYPE_FACE_DOWN_AND_RIGHT] = 0, - [MOVEMENT_TYPE_FACE_DOWN_UP_AND_LEFT] = 0, - [MOVEMENT_TYPE_FACE_DOWN_UP_AND_RIGHT] = 0, - [MOVEMENT_TYPE_FACE_UP_LEFT_AND_RIGHT] = 0, - [MOVEMENT_TYPE_FACE_DOWN_LEFT_AND_RIGHT] = 0, - [MOVEMENT_TYPE_ROTATE_COUNTERCLOCKWISE] = 0, - [MOVEMENT_TYPE_ROTATE_CLOCKWISE] = 0, - [MOVEMENT_TYPE_WALK_UP_AND_DOWN] = 1, - [MOVEMENT_TYPE_WALK_DOWN_AND_UP] = 1, - [MOVEMENT_TYPE_WALK_LEFT_AND_RIGHT] = 1, - [MOVEMENT_TYPE_WALK_RIGHT_AND_LEFT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_UP_RIGHT_LEFT_DOWN] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_LEFT_DOWN_UP] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_UP_RIGHT_LEFT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_DOWN_UP_RIGHT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_UP_LEFT_RIGHT_DOWN] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_RIGHT_DOWN_UP] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_UP_LEFT_RIGHT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_DOWN_UP_LEFT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_DOWN_RIGHT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_UP_DOWN_RIGHT_LEFT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_LEFT_UP_DOWN] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_RIGHT_LEFT_UP] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_UP_DOWN_LEFT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_UP_DOWN_LEFT_RIGHT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_RIGHT_UP_DOWN] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_RIGHT_UP] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_UP_LEFT_DOWN_RIGHT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_RIGHT_UP_LEFT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_DOWN_RIGHT_UP] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_UP_LEFT_DOWN] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_UP_RIGHT_DOWN_LEFT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_UP_RIGHT] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_RIGHT_DOWN] = 1, - [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_DOWN_LEFT_UP] = 1, - [MOVEMENT_TYPE_COPY_PLAYER] = 1, - [MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE] = 1, - [MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE] = 1, - [MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE] = 1, - [MOVEMENT_TYPE_TREE_DISGUISE] = 0, - [MOVEMENT_TYPE_MOUNTAIN_DISGUISE] = 0, - [MOVEMENT_TYPE_COPY_PLAYER_IN_GRASS] = 1, - [MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS] = 1, - [MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS] = 1, - [MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS] = 1, - [MOVEMENT_TYPE_BURIED] = 0, - [MOVEMENT_TYPE_WALK_IN_PLACE_DOWN] = 0, - [MOVEMENT_TYPE_WALK_IN_PLACE_UP] = 0, - [MOVEMENT_TYPE_WALK_IN_PLACE_LEFT] = 0, - [MOVEMENT_TYPE_WALK_IN_PLACE_RIGHT] = 0, - [MOVEMENT_TYPE_JOG_IN_PLACE_DOWN] = 0, - [MOVEMENT_TYPE_JOG_IN_PLACE_UP] = 0, - [MOVEMENT_TYPE_JOG_IN_PLACE_LEFT] = 0, - [MOVEMENT_TYPE_JOG_IN_PLACE_RIGHT] = 0, - [MOVEMENT_TYPE_RUN_IN_PLACE_DOWN] = 0, - [MOVEMENT_TYPE_RUN_IN_PLACE_UP] = 0, - [MOVEMENT_TYPE_RUN_IN_PLACE_LEFT] = 0, - [MOVEMENT_TYPE_RUN_IN_PLACE_RIGHT] = 0, - [MOVEMENT_TYPE_INVISIBLE] = 0, - [MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_DOWN] = 0, - [MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_UP] = 0, - [MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_LEFT] = 0, - [MOVEMENT_TYPE_WALK_SLOWLY_IN_PLACE_RIGHT] = 0, +static const bool8 sMovementTypeHasRange[NUM_MOVEMENT_TYPES] = { + [MOVEMENT_TYPE_WANDER_AROUND] = TRUE, + [MOVEMENT_TYPE_WANDER_UP_AND_DOWN] = TRUE, + [MOVEMENT_TYPE_WANDER_DOWN_AND_UP] = TRUE, + [MOVEMENT_TYPE_WANDER_LEFT_AND_RIGHT] = TRUE, + [MOVEMENT_TYPE_WANDER_RIGHT_AND_LEFT] = TRUE, + [MOVEMENT_TYPE_WALK_UP_AND_DOWN] = TRUE, + [MOVEMENT_TYPE_WALK_DOWN_AND_UP] = TRUE, + [MOVEMENT_TYPE_WALK_LEFT_AND_RIGHT] = TRUE, + [MOVEMENT_TYPE_WALK_RIGHT_AND_LEFT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_UP_RIGHT_LEFT_DOWN] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_LEFT_DOWN_UP] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_UP_RIGHT_LEFT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_DOWN_UP_RIGHT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_UP_LEFT_RIGHT_DOWN] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_RIGHT_DOWN_UP] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_UP_LEFT_RIGHT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_DOWN_UP_LEFT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_DOWN_RIGHT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_UP_DOWN_RIGHT_LEFT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_LEFT_UP_DOWN] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_RIGHT_LEFT_UP] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_UP_DOWN_LEFT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_UP_DOWN_LEFT_RIGHT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_RIGHT_UP_DOWN] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_RIGHT_UP] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_UP_LEFT_DOWN_RIGHT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_RIGHT_UP_LEFT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_DOWN_RIGHT_UP] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_UP_LEFT_DOWN] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_UP_RIGHT_DOWN_LEFT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_DOWN_LEFT_UP_RIGHT] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_LEFT_UP_RIGHT_DOWN] = TRUE, + [MOVEMENT_TYPE_WALK_SEQUENCE_RIGHT_DOWN_LEFT_UP] = TRUE, + [MOVEMENT_TYPE_COPY_PLAYER] = TRUE, + [MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE] = TRUE, + [MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE] = TRUE, + [MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE] = TRUE, + [MOVEMENT_TYPE_COPY_PLAYER_IN_GRASS] = TRUE, + [MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS] = TRUE, + [MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS] = TRUE, + [MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS] = TRUE, }; const u8 gInitialMovementTypeFacingDirections[] = { @@ -517,7 +478,7 @@ static const struct SpritePalette sObjectEventSpritePalettes[] = { {gObjectEventPal_Lugia, OBJ_EVENT_PAL_TAG_LUGIA}, {gObjectEventPal_RubySapphireBrendan, OBJ_EVENT_PAL_TAG_RS_BRENDAN}, {gObjectEventPal_RubySapphireMay, OBJ_EVENT_PAL_TAG_RS_MAY}, - {NULL, 0x0000}, + {}, }; static const u16 sReflectionPaletteTags_Brendan[] = { @@ -1115,31 +1076,75 @@ static const u8 sOppositeDirections[] = { DIR_SOUTHWEST, }; -const u8 gUnknown_0850DC2F[][4] = { - {2, 1, 4, 3}, - {1, 2, 3, 4}, - {3, 4, 2, 1}, - {4, 3, 1, 2} +// Takes the player's original and current facing direction to get the direction that should be considered to copy. +// Note that this means an NPC who copies the player's movement changes how they copy them based on how +// the player entered the area. For instance an NPC who does the same movements as the player when they +// entered the area facing South will do the opposite movements as the player if they enter facing North. +static const u8 sPlayerDirectionsForCopy[][4] = { + [DIR_SOUTH - 1] = { + [DIR_SOUTH - 1] = DIR_NORTH, + [DIR_NORTH - 1] = DIR_SOUTH, + [DIR_WEST - 1] = DIR_EAST, + [DIR_EAST - 1] = DIR_WEST + }, + [DIR_NORTH - 1] = { + [DIR_SOUTH - 1] = DIR_SOUTH, + [DIR_NORTH - 1] = DIR_NORTH, + [DIR_WEST - 1] = DIR_WEST, + [DIR_EAST - 1] = DIR_EAST + }, + [DIR_WEST - 1] = { + [DIR_SOUTH - 1] = DIR_WEST, + [DIR_NORTH - 1] = DIR_EAST, + [DIR_WEST - 1] = DIR_NORTH, + [DIR_EAST - 1] = DIR_SOUTH + }, + [DIR_EAST - 1] = { + [DIR_SOUTH - 1] = DIR_EAST, + [DIR_NORTH - 1] = DIR_WEST, + [DIR_WEST - 1] = DIR_SOUTH, + [DIR_EAST - 1] = DIR_NORTH + } }; -const u8 gUnknown_0850DC3F[][4] = { - {2, 1, 4, 3}, - {1, 2, 3, 4}, - {4, 3, 1, 2}, - {3, 4, 2, 1} +// Indexed first with the NPC's initial facing direction based on movement type, and secondly with the player direction to copy. +// Returns the direction the copy NPC should travel in. +static const u8 sPlayerDirectionToCopyDirection[][4] = { + [DIR_SOUTH - 1] = { // MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE(_IN_GRASS) + [DIR_SOUTH - 1] = DIR_NORTH, + [DIR_NORTH - 1] = DIR_SOUTH, + [DIR_WEST - 1] = DIR_EAST, + [DIR_EAST - 1] = DIR_WEST + }, + [DIR_NORTH - 1] = { // MOVEMENT_TYPE_COPY_PLAYER(_IN_GRASS) + [DIR_SOUTH - 1] = DIR_SOUTH, + [DIR_NORTH - 1] = DIR_NORTH, + [DIR_WEST - 1] = DIR_WEST, + [DIR_EAST - 1] = DIR_EAST + }, + [DIR_WEST - 1] = { // MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE(_IN_GRASS) + [DIR_SOUTH - 1] = DIR_EAST, + [DIR_NORTH - 1] = DIR_WEST, + [DIR_WEST - 1] = DIR_SOUTH, + [DIR_EAST - 1] = DIR_NORTH + }, + [DIR_EAST - 1] = { // MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE(_IN_GRASS) + [DIR_SOUTH - 1] = DIR_WEST, + [DIR_NORTH - 1] = DIR_EAST, + [DIR_WEST - 1] = DIR_NORTH, + [DIR_EAST - 1] = DIR_SOUTH + } }; #include "data/object_events/movement_action_func_tables.h" -// Code - static void ClearObjectEvent(struct ObjectEvent *objectEvent) { *objectEvent = (struct ObjectEvent){}; objectEvent->localId = 0xFF; - objectEvent->mapNum = 0xFF; - objectEvent->mapGroup = 0xFF; - objectEvent->movementActionId = 0xFF; + objectEvent->mapNum = MAP_NUM(UNDEFINED); + objectEvent->mapGroup = MAP_GROUP(UNDEFINED); + objectEvent->movementActionId = MOVEMENT_ACTION_NONE; } static void ClearAllObjectEvents(void) @@ -1188,9 +1193,8 @@ u8 GetFirstInactiveObjectEventId(void) u8 GetObjectEventIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroupId) { if (localId < OBJ_EVENT_ID_PLAYER) - { return GetObjectEventIdByLocalIdAndMapInternal(localId, mapNum, mapGroupId); - } + return GetObjectEventIdByLocalId(localId); } @@ -1275,16 +1279,12 @@ static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, objectEvent->previousMovementDirection = gInitialMovementTypeFacingDirections[template->movementType]; SetObjectEventDirection(objectEvent, objectEvent->previousMovementDirection); SetObjectEventDynamicGraphicsId(objectEvent); - if (gRangedMovementTypes[objectEvent->movementType]) + if (sMovementTypeHasRange[objectEvent->movementType]) { if (objectEvent->rangeX == 0) - { objectEvent->rangeX++; - } if (objectEvent->rangeY == 0) - { objectEvent->rangeY++; - } } return objectEventId; } @@ -1298,24 +1298,17 @@ u8 Unref_TryInitLocalObjectEvent(u8 localId) if (gMapHeader.events != NULL) { if (InBattlePyramid()) - { objectEventCount = GetNumBattlePyramidObjectEvents(); - } else if (InTrainerHill()) - { objectEventCount = 2; - } else - { objectEventCount = gMapHeader.events->objectEventCount; - } + for (i = 0; i < objectEventCount; i++) { template = &gSaveBlock1Ptr->objectEventTemplates[i]; if (template->localId == localId && !FlagGet(template->flagId)) - { return InitObjectEventStateFromTemplate(template, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); - } } } return OBJECT_EVENTS_COUNT; @@ -1540,9 +1533,8 @@ u8 AddPseudoObjectEvent(u16 graphicsId, void (*callback)(struct Sprite *), s16 x spriteTemplate = malloc(sizeof(struct SpriteTemplate)); MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, callback, spriteTemplate, &subspriteTables); if (spriteTemplate->paletteTag != TAG_NONE) - { LoadObjectEventPalette(spriteTemplate->paletteTag); - } + spriteId = CreateSprite(spriteTemplate, x, y, subpriority); free(spriteTemplate); @@ -1580,20 +1572,16 @@ u8 CreateObjectSprite(u8 graphicsId, u8 objectEventId, s16 x, s16 y, u8 z, u8 di sprite->y += sprite->centerToCornerVecY; sprite->oam.paletteNum = graphicsInfo->paletteSlot; if (sprite->oam.paletteNum >= 16) - { sprite->oam.paletteNum -= 16; - } + sprite->coordOffsetEnabled = TRUE; sprite->sObjEventId = objectEventId; sprite->data[1] = z; if (graphicsInfo->paletteSlot == 10) - { LoadSpecialObjectReflectionPalette(graphicsInfo->paletteTag, graphicsInfo->paletteSlot); - } else if (graphicsInfo->paletteSlot >= 16) - { _PatchObjectPalette(graphicsInfo->paletteTag, graphicsInfo->paletteSlot | 0xf0); - } + if (subspriteTables != NULL) { SetSubspriteTables(sprite, subspriteTables); @@ -1817,9 +1805,7 @@ void ObjectEventSetGraphicsId(struct ObjectEvent *objectEvent, u8 graphicsId) sprite->x += 8; sprite->y += 16 + sprite->centerToCornerVecY; if (objectEvent->trackedByCamera) - { CameraObjectReset1(); - } } void ObjectEventSetGraphicsIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 graphicsId) @@ -1827,9 +1813,7 @@ void ObjectEventSetGraphicsIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 objectEventId; if (!TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId)) - { ObjectEventSetGraphicsId(&gObjectEvents[objectEventId], graphicsId); - } } void ObjectEventTurn(struct ObjectEvent *objectEvent, u8 direction) @@ -1847,9 +1831,7 @@ void ObjectEventTurnByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 direc u8 objectEventId; if (!TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId)) - { ObjectEventTurn(&gObjectEvents[objectEventId], direction); - } } void PlayerObjectTurn(struct PlayerAvatar *playerAvatar, u8 direction) @@ -1886,9 +1868,8 @@ const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId) u8 bard; if (graphicsId >= OBJ_EVENT_GFX_VARS) - { graphicsId = VarGetObjectEventGraphicsId(graphicsId - OBJ_EVENT_GFX_VARS); - } + if (graphicsId == OBJ_EVENT_GFX_BARD) { bard = GetCurrentMauvilleOldMan(); @@ -1896,9 +1877,7 @@ const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId) } if (graphicsId >= NUM_OBJ_EVENT_GFX) - { graphicsId = OBJ_EVENT_GFX_NINJA_BOY; - } return gObjectEventGraphicsInfoPointers[graphicsId]; } @@ -1906,9 +1885,7 @@ const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId) static void SetObjectEventDynamicGraphicsId(struct ObjectEvent *objectEvent) { if (objectEvent->graphicsId >= OBJ_EVENT_GFX_VARS) - { objectEvent->graphicsId = VarGetObjectEventGraphicsId(objectEvent->graphicsId - OBJ_EVENT_GFX_VARS); - } } void SetObjectInvisibility(u8 localId, u8 mapNum, u8 mapGroup, bool8 invisible) @@ -1916,9 +1893,7 @@ void SetObjectInvisibility(u8 localId, u8 mapNum, u8 mapGroup, bool8 invisible) u8 objectEventId; if (!TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId)) - { gObjectEvents[objectEventId].invisible = invisible; - } } void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup) @@ -2037,9 +2012,7 @@ static u8 FindObjectEventPaletteIndexByTag(u16 tag) for (i = 0; sObjectEventSpritePalettes[i].tag != OBJ_EVENT_PAL_TAG_NONE; i++) { if (sObjectEventSpritePalettes[i].tag == tag) - { return i; - } } return 0xFF; } @@ -2173,9 +2146,7 @@ u8 GetObjectEventIdByXYZ(u16 x, u16 y, u8 z) if (gObjectEvents[i].active) { if (gObjectEvents[i].currentCoords.x == x && gObjectEvents[i].currentCoords.y == y && ObjectEventDoesZCoordMatch(&gObjectEvents[i], z)) - { return i; - } } } return OBJECT_EVENTS_COUNT; @@ -2184,9 +2155,8 @@ u8 GetObjectEventIdByXYZ(u16 x, u16 y, u8 z) static bool8 ObjectEventDoesZCoordMatch(struct ObjectEvent *objectEvent, u8 z) { if (objectEvent->currentElevation != 0 && z != 0 && objectEvent->currentElevation != z) - { return FALSE; - } + return TRUE; } @@ -2288,9 +2258,8 @@ static u8 CameraObjectGetFollowedSpriteId(void) camera = FindCameraSprite(); if (camera == NULL) - { return MAX_SPRITES; - } + return camera->sLinkedSpriteId; } @@ -2298,13 +2267,9 @@ void CameraObjectReset2(void) { // UB: Possible null dereference #ifdef UBFIX - struct Sprite *camera; - - camera = FindCameraSprite(); - if (camera != NULL) - { + struct Sprite *camera = FindCameraSprite(); + if (camera) camera->sState = 2; - } #else FindCameraSprite()->sState = 2; #endif // UBFIX @@ -2390,9 +2355,8 @@ static u8 GetObjectTrainerTypeByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup u8 objectEventId; if (TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId)) - { return 0xFF; - } + return gObjectEvents[objectEventId].trainerType; } @@ -2408,9 +2372,8 @@ u8 GetObjectEventBerryTreeIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) u8 objectEventId; if (TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId)) - { return 0xFF; - } + return gObjectEvents[objectEventId].trainerRange_berryTreeId; } @@ -2446,9 +2409,7 @@ static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, for (i = 0; i < count; i++) { if (templates[i].localId == localId) - { return &templates[i]; - } } return NULL; } @@ -2457,16 +2418,14 @@ struct ObjectEventTemplate *GetBaseTemplateForObjectEvent(const struct ObjectEve { int i; - if (objectEvent->mapNum != gSaveBlock1Ptr->location.mapNum || objectEvent->mapGroup != gSaveBlock1Ptr->location.mapGroup) - { + if (objectEvent->mapNum != gSaveBlock1Ptr->location.mapNum + || objectEvent->mapGroup != gSaveBlock1Ptr->location.mapGroup) return NULL; - } + for (i = 0; i < OBJECT_EVENT_TEMPLATES_COUNT; i++) { if (objectEvent->localId == gSaveBlock1Ptr->objectEventTemplates[i].localId) - { return &gSaveBlock1Ptr->objectEventTemplates[i]; - } } return NULL; } @@ -2498,9 +2457,7 @@ void TryOverrideTemplateCoordsForObjectEvent(const struct ObjectEvent *objectEve objectEventTemplate = GetBaseTemplateForObjectEvent(objectEvent); if (objectEventTemplate != NULL) - { objectEventTemplate->movementType = movementType; - } } void TryOverrideObjectEventTemplateCoords(u8 localId, u8 mapNum, u8 mapGroup) @@ -2548,15 +2505,12 @@ u16 GetObjectPaletteTag(u8 palSlot) u8 i; if (palSlot < 10) - { return sObjectPaletteTagSets[sCurrentReflectionType][palSlot]; - } + for (i = 0; sSpecialObjectReflectionPaletteSets[i].tag != OBJ_EVENT_PAL_TAG_NONE; i++) { if (sSpecialObjectReflectionPaletteSets[i].tag == sCurrentSpecialObjectPaletteTag) - { return sSpecialObjectReflectionPaletteSets[i].data[sCurrentReflectionType]; - } } return OBJ_EVENT_PAL_TAG_NONE; } @@ -2581,9 +2535,7 @@ bool8 MovementType_WanderAround_Step1(struct ObjectEvent *objectEvent, struct Sp bool8 MovementType_WanderAround_Step2(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (!ObjectEventExecSingleMovementAction(objectEvent, sprite)) - { return FALSE; - } SetMovementDelay(sprite, sMovementDelaysMedium[Random() & 3]); sprite->sTypeFuncId = 3; return TRUE; @@ -2644,13 +2596,11 @@ bool8 ObjectEventIsTrainerAndCloseToPlayer(struct ObjectEvent *objectEvent) s16 maxY; if (!TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_DASH)) - { return FALSE; - } + if (objectEvent->trainerType != TRAINER_TYPE_NORMAL && objectEvent->trainerType != TRAINER_TYPE_BURIED) - { return FALSE; - } + PlayerGetDestCoords(&playerX, &playerY); objX = objectEvent->currentCoords.x; objY = objectEvent->currentCoords.y; @@ -2658,10 +2608,10 @@ bool8 ObjectEventIsTrainerAndCloseToPlayer(struct ObjectEvent *objectEvent) minY = objY - objectEvent->trainerRange_berryTreeId; maxX = objX + objectEvent->trainerRange_berryTreeId; maxY = objY + objectEvent->trainerRange_berryTreeId; - if (minX > playerX || maxX < playerX || minY > playerY || maxY < playerY) - { + if (minX > playerX || maxX < playerX + || minY > playerY || maxY < playerY) return FALSE; - } + return TRUE; } @@ -3229,10 +3179,8 @@ bool8 MovementType_FaceDownAndUp_Step4(struct ObjectEvent *objectEvent, struct S u8 directions[2]; memcpy(directions, gUpAndDownDirections, sizeof gUpAndDownDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_NORTH_SOUTH); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 1]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3281,10 +3229,8 @@ bool8 MovementType_FaceLeftAndRight_Step4(struct ObjectEvent *objectEvent, struc u8 directions[2]; memcpy(directions, gLeftAndRightDirections, sizeof gLeftAndRightDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_EAST_WEST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 1]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3333,10 +3279,8 @@ bool8 MovementType_FaceUpAndLeft_Step4(struct ObjectEvent *objectEvent, struct S u8 directions[2]; memcpy(directions, gUpAndLeftDirections, sizeof gUpAndLeftDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_NORTH_WEST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 1]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3385,10 +3329,8 @@ bool8 MovementType_FaceUpAndRight_Step4(struct ObjectEvent *objectEvent, struct u8 directions[2]; memcpy(directions, gUpAndRightDirections, sizeof gUpAndRightDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_NORTH_EAST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 1]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3437,10 +3379,8 @@ bool8 MovementType_FaceDownAndLeft_Step4(struct ObjectEvent *objectEvent, struct u8 directions[2]; memcpy(directions, gDownAndLeftDirections, sizeof gDownAndLeftDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_SOUTH_WEST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 1]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3489,10 +3429,8 @@ bool8 MovementType_FaceDownAndRight_Step4(struct ObjectEvent *objectEvent, struc u8 directions[2]; memcpy(directions, gDownAndRightDirections, sizeof gDownAndRightDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_SOUTH_EAST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 1]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3541,10 +3479,8 @@ bool8 MovementType_FaceDownUpAndLeft_Step4(struct ObjectEvent *objectEvent, stru u8 directions[4]; memcpy(directions, gDownUpAndLeftDirections, sizeof gDownUpAndLeftDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_NORTH_SOUTH_WEST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 3]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3593,10 +3529,8 @@ bool8 MovementType_FaceDownUpAndRight_Step4(struct ObjectEvent *objectEvent, str u8 directions[4]; memcpy(directions, gDownUpAndRightDirections, sizeof gDownUpAndRightDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_NORTH_SOUTH_EAST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 3]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3645,10 +3579,8 @@ bool8 MovementType_FaceUpLeftAndRight_Step4(struct ObjectEvent *objectEvent, str u8 directions[4]; memcpy(directions, gUpLeftAndRightDirections, sizeof gUpLeftAndRightDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_NORTH_EAST_WEST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 3]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3697,10 +3629,8 @@ bool8 MovementType_FaceDownLeftAndRight_Step4(struct ObjectEvent *objectEvent, s u8 directions[4]; memcpy(directions, gDownLeftAndRightDirections, sizeof gDownLeftAndRightDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_SOUTH_EAST_WEST); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[Random() & 3]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 1; return TRUE; @@ -3729,9 +3659,7 @@ bool8 MovementType_RotateCounterclockwise_Step1(struct ObjectEvent *objectEvent, bool8 MovementType_RotateCounterclockwise_Step2(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (WaitForMovementDelay(sprite) || ObjectEventIsTrainerAndCloseToPlayer(objectEvent)) - { sprite->sTypeFuncId = 3; - } return FALSE; } @@ -3741,10 +3669,8 @@ bool8 MovementType_RotateCounterclockwise_Step3(struct ObjectEvent *objectEvent, u8 directions[5]; memcpy(directions, gCounterclockwiseDirections, sizeof gCounterclockwiseDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_ANY); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[objectEvent->facingDirection]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 0; return TRUE; @@ -3773,9 +3699,7 @@ bool8 MovementType_RotateClockwise_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementType_RotateClockwise_Step2(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (WaitForMovementDelay(sprite) || ObjectEventIsTrainerAndCloseToPlayer(objectEvent)) - { sprite->sTypeFuncId = 3; - } return FALSE; } @@ -3785,10 +3709,8 @@ bool8 MovementType_RotateClockwise_Step3(struct ObjectEvent *objectEvent, struct u8 directions[5]; memcpy(directions, gClockwiseDirections, sizeof gClockwiseDirections); direction = TryGetTrainerEncounterDirection(objectEvent, RUNFOLLOW_ANY); - if (direction == 0) - { + if (direction == DIR_NONE) direction = directions[objectEvent->facingDirection]; - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 0; return TRUE; @@ -3809,9 +3731,7 @@ bool8 MovementType_WalkBackAndForth_Step1(struct ObjectEvent *objectEvent, struc direction = gInitialMovementTypeFacingDirections[objectEvent->movementType]; if (objectEvent->directionSequenceIndex) - { direction = GetOppositeDirection(direction); - } SetObjectEventDirection(objectEvent, direction); sprite->sTypeFuncId = 2; return TRUE; @@ -3908,9 +3828,8 @@ u8 MovementType_WalkSequenceUpRightLeftDown_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gUpRightLeftDownDirections)]; memcpy(directions, gUpRightLeftDownDirections, sizeof(gUpRightLeftDownDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -3921,9 +3840,8 @@ u8 MovementType_WalkSequenceRightLeftDownUp_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gRightLeftDownUpDirections)]; memcpy(directions, gRightLeftDownUpDirections, sizeof(gRightLeftDownUpDirections)); if (objectEvent->directionSequenceIndex == 1 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 2; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -3934,9 +3852,8 @@ u8 MovementType_WalkSequenceDownUpRightLeft_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gDownUpRightLeftDirections)]; memcpy(directions, gDownUpRightLeftDirections, sizeof(gDownUpRightLeftDirections)); if (objectEvent->directionSequenceIndex == 1 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 2; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -3947,9 +3864,8 @@ u8 MovementType_WalkSequenceLeftDownUpRight_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gLeftDownUpRightDirections)]; memcpy(directions, gLeftDownUpRightDirections, sizeof(gLeftDownUpRightDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -3960,9 +3876,8 @@ u8 MovementType_WalkSequenceUpLeftRightDown_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gUpLeftRightDownDirections)]; memcpy(directions, gUpLeftRightDownDirections, sizeof(gUpLeftRightDownDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -3973,9 +3888,8 @@ u8 MovementType_WalkSequenceLeftRightDownUp_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gLeftRightDownUpDirections)]; memcpy(directions, gLeftRightDownUpDirections, sizeof(gLeftRightDownUpDirections)); if (objectEvent->directionSequenceIndex == 1 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 2; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -3986,9 +3900,8 @@ u8 MovementType_WalkSequenceDownUpLeftRight_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gStandardDirections)]; memcpy(directions, gStandardDirections, sizeof(gStandardDirections)); if (objectEvent->directionSequenceIndex == 1 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 2; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -3999,9 +3912,8 @@ u8 MovementType_WalkSequenceRightDownUpLeft_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gRightDownUpLeftDirections)]; memcpy(directions, gRightDownUpLeftDirections, sizeof(gRightDownUpLeftDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4012,9 +3924,8 @@ u8 MovementType_WalkSequenceLeftUpDownRight_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gLeftUpDownRightDirections)]; memcpy(directions, gLeftUpDownRightDirections, sizeof(gLeftUpDownRightDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4025,9 +3936,8 @@ u8 MovementType_WalkSequenceUpDownRightLeft_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gUpDownRightLeftDirections)]; memcpy(directions, gUpDownRightLeftDirections, sizeof(gUpDownRightLeftDirections)); if (objectEvent->directionSequenceIndex == 1 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 2; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4038,9 +3948,8 @@ u8 MovementType_WalkSequenceRightLeftUpDown_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gRightLeftUpDownDirections)]; memcpy(directions, gRightLeftUpDownDirections, sizeof(gRightLeftUpDownDirections)); if (objectEvent->directionSequenceIndex == 1 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 2; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4051,9 +3960,8 @@ u8 MovementType_WalkSequenceDownRightLeftUp_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gDownRightLeftUpDirections)]; memcpy(directions, gDownRightLeftUpDirections, sizeof(gDownRightLeftUpDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4064,9 +3972,8 @@ u8 MovementType_WalkSequenceRightUpDownLeft_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gRightUpDownLeftDirections)]; memcpy(directions, gRightUpDownLeftDirections, sizeof(gRightUpDownLeftDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4077,9 +3984,8 @@ u8 MovementType_WalkSequenceUpDownLeftRight_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gUpDownLeftRightDirections)]; memcpy(directions, gUpDownLeftRightDirections, sizeof(gUpDownLeftRightDirections)); if (objectEvent->directionSequenceIndex == 1 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 2; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4090,9 +3996,8 @@ u8 MovementType_WalkSequenceLeftRightUpDown_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gLeftRightUpDownDirections)]; memcpy(directions, gLeftRightUpDownDirections, sizeof(gLeftRightUpDownDirections)); if (objectEvent->directionSequenceIndex == 1 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 2; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4103,9 +4008,8 @@ u8 MovementType_WalkSequenceDownLeftRightUp_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gDownLeftRightUpDirections)]; memcpy(directions, gDownLeftRightUpDirections, sizeof(gDownLeftRightUpDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4116,9 +4020,8 @@ u8 MovementType_WalkSequenceUpLeftDownRight_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gUpLeftDownRightDirections)]; memcpy(directions, gUpLeftDownRightDirections, sizeof(gUpLeftDownRightDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4129,9 +4032,8 @@ u8 MovementType_WalkSequenceDownRightUpLeft_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gDownRightUpLeftDirections)]; memcpy(directions, gDownRightUpLeftDirections, sizeof(gDownRightUpLeftDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4142,9 +4044,8 @@ u8 MovementType_WalkSequenceLeftDownRightUp_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gLeftDownRightUpDirections)]; memcpy(directions, gLeftDownRightUpDirections, sizeof(gLeftDownRightUpDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4155,9 +4056,8 @@ u8 MovementType_WalkSequenceRightUpLeftDown_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gRightUpLeftDownDirections)]; memcpy(directions, gRightUpLeftDownDirections, sizeof(gRightUpLeftDownDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4168,9 +4068,8 @@ u8 MovementType_WalkSequenceUpRightDownLeft_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gUpRightDownLeftDirections)]; memcpy(directions, gUpRightDownLeftDirections, sizeof(gUpRightDownLeftDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4181,9 +4080,8 @@ u8 MovementType_WalkSequenceDownLeftUpRight_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gDownLeftUpRightDirections)]; memcpy(directions, gDownLeftUpRightDirections, sizeof(gDownLeftUpRightDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.y == objectEvent->currentCoords.y) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4194,9 +4092,8 @@ u8 MovementType_WalkSequenceLeftUpRightDown_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gLeftUpRightDownDirections)]; memcpy(directions, gLeftUpRightDownDirections, sizeof(gLeftUpRightDownDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4207,9 +4104,8 @@ u8 MovementType_WalkSequenceRightDownLeftUp_Step1(struct ObjectEvent *objectEven u8 directions[sizeof(gRightDownLeftUpDirections)]; memcpy(directions, gRightDownLeftUpDirections, sizeof(gRightDownLeftUpDirections)); if (objectEvent->directionSequenceIndex == 2 && objectEvent->initialCoords.x == objectEvent->currentCoords.x) - { objectEvent->directionSequenceIndex = 3; - } + return MoveNextDirectionInSequence(objectEvent, sprite, directions); } @@ -4219,19 +4115,16 @@ bool8 MovementType_CopyPlayer_Step0(struct ObjectEvent *objectEvent, struct Spri { ClearObjectEventMovement(objectEvent, sprite); if (objectEvent->directionSequenceIndex == 0) - { objectEvent->directionSequenceIndex = GetPlayerFacingDirection(); - } sprite->sTypeFuncId = 1; return TRUE; } bool8 MovementType_CopyPlayer_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - if (gObjectEvents[gPlayerAvatar.objectEventId].movementActionId == 0xFF || gPlayerAvatar.tileTransitionState == T_TILE_CENTER) - { + if (gObjectEvents[gPlayerAvatar.objectEventId].movementActionId == MOVEMENT_ACTION_NONE || gPlayerAvatar.tileTransitionState == T_TILE_CENTER) return FALSE; - } + return gCopyPlayerMovementFuncs[PlayerGetCopyableMovement()](objectEvent, sprite, GetPlayerMovementDirection(), NULL); } @@ -4252,13 +4145,13 @@ bool8 CopyablePlayerMovement_None(struct ObjectEvent *objectEvent, struct Sprite bool8 CopyablePlayerMovement_FaceDirection(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) { - ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, playerDirection))); + ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, playerDirection))); objectEvent->singleMovementActive = TRUE; sprite->sTypeFuncId = 2; return TRUE; } -bool8 CopyablePlayerMovement_GoSpeed0(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) +bool8 CopyablePlayerMovement_WalkNormal(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) { u32 direction; s16 x; @@ -4271,7 +4164,7 @@ bool8 CopyablePlayerMovement_GoSpeed0(struct ObjectEvent *objectEvent, struct Sp if (direction == DIR_NONE) { direction = playerDirection; - direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); + direction = GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); ObjectEventMoveDestCoords(objectEvent, direction, &x, &y); ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); objectEvent->singleMovementActive = TRUE; @@ -4281,52 +4174,52 @@ bool8 CopyablePlayerMovement_GoSpeed0(struct ObjectEvent *objectEvent, struct Sp } else { - direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); + direction = GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); } ObjectEventMoveDestCoords(objectEvent, direction, &x, &y); ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkNormalMovementAction(direction)); + if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y)))) - { ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); - } + objectEvent->singleMovementActive = TRUE; sprite->sTypeFuncId = 2; return TRUE; } -bool8 CopyablePlayerMovement_GoSpeed1(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) +bool8 CopyablePlayerMovement_WalkFast(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) { u32 direction; s16 x; s16 y; direction = playerDirection; - direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); + direction = GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); ObjectEventMoveDestCoords(objectEvent, direction, &x, &y); ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkFastMovementAction(direction)); + if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y)))) - { ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); - } + objectEvent->singleMovementActive = TRUE; sprite->sTypeFuncId = 2; return TRUE; } -bool8 CopyablePlayerMovement_GoSpeed2(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) +bool8 CopyablePlayerMovement_WalkFaster(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) { u32 direction; s16 x; s16 y; direction = playerDirection; - direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); + direction = GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); ObjectEventMoveDestCoords(objectEvent, direction, &x, &y); ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkFasterMovementAction(direction)); + if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y)))) - { ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); - } + objectEvent->singleMovementActive = TRUE; sprite->sTypeFuncId = 2; return TRUE; @@ -4339,49 +4232,30 @@ bool8 CopyablePlayerMovement_Slide(struct ObjectEvent *objectEvent, struct Sprit s16 y; direction = playerDirection; - direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); + direction = GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); ObjectEventMoveDestCoords(objectEvent, direction, &x, &y); ObjectEventSetSingleMovement(objectEvent, sprite, GetSlideMovementAction(direction)); + if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y)))) - { ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); - } + objectEvent->singleMovementActive = TRUE; sprite->sTypeFuncId = 2; return TRUE; } -bool8 cph_IM_DIFFERENT(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) +bool8 CopyablePlayerMovement_JumpInPlace(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) { u32 direction; direction = playerDirection; - direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); + direction = GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); ObjectEventSetSingleMovement(objectEvent, sprite, GetJumpInPlaceMovementAction(direction)); objectEvent->singleMovementActive = TRUE; sprite->sTypeFuncId = 2; return TRUE; } -bool8 CopyablePlayerMovement_GoSpeed4(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) -{ - u32 direction; - s16 x; - s16 y; - - direction = playerDirection; - direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); - ObjectEventMoveDestCoords(objectEvent, direction, &x, &y); - ObjectEventSetSingleMovement(objectEvent, sprite, GetJumpMovementAction(direction)); - if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y)))) - { - ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); - } - objectEvent->singleMovementActive = TRUE; - sprite->sTypeFuncId = 2; - return TRUE; -} - bool8 CopyablePlayerMovement_Jump(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) { u32 direction; @@ -4389,15 +4263,34 @@ bool8 CopyablePlayerMovement_Jump(struct ObjectEvent *objectEvent, struct Sprite s16 y; direction = playerDirection; - direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); + direction = GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); + ObjectEventMoveDestCoords(objectEvent, direction, &x, &y); + ObjectEventSetSingleMovement(objectEvent, sprite, GetJumpMovementAction(direction)); + + if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y)))) + ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); + + objectEvent->singleMovementActive = TRUE; + sprite->sTypeFuncId = 2; + return TRUE; +} + +bool8 CopyablePlayerMovement_Jump2(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 playerDirection, bool8 tileCallback(u8)) +{ + u32 direction; + s16 x; + s16 y; + + direction = playerDirection; + direction = GetCopyDirection(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction); x = objectEvent->currentCoords.x; y = objectEvent->currentCoords.y; MoveCoordsInDirection(direction, &x, &y, 2, 2); ObjectEventSetSingleMovement(objectEvent, sprite, GetJump2MovementAction(direction)); + if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y)))) - { ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction)); - } + objectEvent->singleMovementActive = TRUE; sprite->sTypeFuncId = 2; return TRUE; @@ -4475,9 +4368,7 @@ bool8 MovementType_Buried_Step0(struct ObjectEvent *objectEvent, struct Sprite * bool8 MovementType_MoveInPlace_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (ObjectEventExecSingleMovementAction(objectEvent, sprite)) - { sprite->sTypeFuncId = 0; - } return FALSE; } @@ -4552,7 +4443,7 @@ static void ClearObjectEventMovement(struct ObjectEvent *objectEvent, struct Spr objectEvent->singleMovementActive = FALSE; objectEvent->heldMovementActive = FALSE; objectEvent->heldMovementFinished = FALSE; - objectEvent->movementActionId = 0xFF; + objectEvent->movementActionId = MOVEMENT_ACTION_NONE; sprite->sTypeFuncId = 0; } @@ -4780,9 +4671,8 @@ static bool8 IsMetatileDirectionallyImpassable(struct ObjectEvent *objectEvent, { if (gOppositeDirectionBlockedMetatileFuncs[direction - 1](objectEvent->currentMetatileBehavior) || gDirectionBlockedMetatileFuncs[direction - 1](MapGridGetMetatileBehaviorAt(x, y))) - { return TRUE; - } + return FALSE; } @@ -4799,9 +4689,7 @@ static bool8 DoesObjectCollideWithObjectAt(struct ObjectEvent *objectEvent, s16 if ((curObject->currentCoords.x == x && curObject->currentCoords.y == y) || (curObject->previousCoords.x == x && curObject->previousCoords.y == y)) { if (AreZCoordsCompatible(objectEvent->currentElevation, curObject->currentElevation)) - { return TRUE; - } } } } @@ -4814,9 +4702,7 @@ bool8 IsBerryTreeSparkling(u8 localId, u8 mapNum, u8 mapGroup) if (!TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId) && gSprites[gObjectEvents[objectEventId].spriteId].sBerryTreeFlags & BERRY_FLAG_SPARKLING) - { return TRUE; - } return FALSE; } @@ -4826,9 +4712,7 @@ void SetBerryTreeJustPicked(u8 localId, u8 mapNum, u8 mapGroup) u8 objectEventId; if (!TryGetObjectEventIdByLocalIdAndMap(localId, mapNum, mapGroup, &objectEventId)) - { gSprites[gObjectEvents[objectEventId].spriteId].sBerryTreeFlags |= BERRY_FLAG_JUST_PICKED; - } } #undef sTimer @@ -4933,7 +4817,7 @@ bool8 ObjectEventIsMovementOverridden(struct ObjectEvent *objectEvent) bool8 ObjectEventIsHeldMovementActive(struct ObjectEvent *objectEvent) { - if (objectEvent->heldMovementActive && objectEvent->movementActionId != 0xFF) + if (objectEvent->heldMovementActive && objectEvent->movementActionId != MOVEMENT_ACTION_NONE) return TRUE; return FALSE; @@ -4966,7 +4850,7 @@ void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *objectEvent) void ObjectEventClearHeldMovement(struct ObjectEvent *objectEvent) { - objectEvent->movementActionId = 0xFF; + objectEvent->movementActionId = MOVEMENT_ACTION_NONE; objectEvent->heldMovementActive = FALSE; objectEvent->heldMovementFinished = FALSE; gSprites[objectEvent->spriteId].sTypeFuncId = 0; @@ -5002,14 +4886,12 @@ void UpdateObjectEventCurrentMovement(struct ObjectEvent *objectEvent, struct Sp { DoGroundEffects_OnSpawn(objectEvent, sprite); TryEnableObjectEventAnim(objectEvent, sprite); + if (ObjectEventIsHeldMovementActive(objectEvent)) - { ObjectEventExecHeldMovementAction(objectEvent, sprite); - } else if (!objectEvent->frozen) - { while (callback(objectEvent, sprite)); - } + DoGroundEffects_OnBeginStep(objectEvent, sprite); DoGroundEffects_OnFinishStep(objectEvent, sprite); UpdateObjectEventSpriteAnimPause(objectEvent, sprite); @@ -5068,46 +4950,45 @@ u8 GetOppositeDirection(u8 direction) memcpy(directions, sOppositeDirections, sizeof sOppositeDirections); if (direction <= DIR_NONE || direction > (sizeof sOppositeDirections)) - { return direction; - } + return directions[direction - 1]; } -static u32 zffu_offset_calc(u8 a0, u8 a1) +// Takes the player's original and current direction and gives a direction the copy NPC should consider as the player's direction. +// See comments at the table's definition. +static u32 GetPlayerDirectionForCopy(u8 initDir, u8 moveDir) { - return gUnknown_0850DC2F[a0 - 1][a1 - 1]; + return sPlayerDirectionsForCopy[initDir - 1][moveDir - 1]; } -static u32 state_to_direction(u8 a0, u32 a1, u32 a2) +// copyInitDir is the initial facing direction of the copying NPC. +// playerInitDir is the direction the player was facing when the copying NPC was spawned, as set by MovementType_CopyPlayer_Step0. +// playerMoveDir is the direction the player is currently moving. +static u32 GetCopyDirection(u8 copyInitDir, u32 playerInitDir, u32 playerMoveDir) { - u32 zffuOffset; - u8 a1_2; - u8 a2_2; + u32 dir; + u8 _playerInitDir = playerInitDir; + u8 _playerMoveDir = playerMoveDir; + if (_playerInitDir == DIR_NONE || _playerMoveDir == DIR_NONE + || _playerInitDir > DIR_EAST || _playerMoveDir > DIR_EAST) + return DIR_NONE; - a1_2 = a1; - a2_2 = a2; - if (a1_2 == 0 || a2_2 == 0 || a1_2 > DIR_EAST || a2_2 > DIR_EAST) - { - return 0; - } - zffuOffset = zffu_offset_calc(a1_2, a2); - return gUnknown_0850DC3F[a0 - 1][zffuOffset - 1]; + dir = GetPlayerDirectionForCopy(_playerInitDir, playerMoveDir); + return sPlayerDirectionToCopyDirection[copyInitDir - 1][dir - 1]; } static void ObjectEventExecHeldMovementAction(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (gMovementActionFuncs[objectEvent->movementActionId][sprite->sActionFuncId](objectEvent, sprite)) - { objectEvent->heldMovementFinished = TRUE; - } } static bool8 ObjectEventExecSingleMovementAction(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (gMovementActionFuncs[objectEvent->movementActionId][sprite->sActionFuncId](objectEvent, sprite)) { - objectEvent->movementActionId = 0xFF; + objectEvent->movementActionId = MOVEMENT_ACTION_NONE; sprite->sActionFuncId = 0; return TRUE; } @@ -5795,9 +5676,8 @@ bool8 MovementAction_WalkInPlace_Step1(struct ObjectEvent *objectEvent, struct S bool8 MovementAction_WalkInPlaceSlow_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (sprite->data[3] & 1) - { sprite->animDelayCounter++; - } + return MovementAction_WalkInPlace_Step1(objectEvent, sprite); } @@ -6255,9 +6135,10 @@ bool8 MovementAction_FacePlayer_Step0(struct ObjectEvent *objectEvent, struct Sp u8 playerObjectId; if (!TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0, &playerObjectId)) - { - FaceDirection(objectEvent, sprite, GetDirectionToFace(objectEvent->currentCoords.x, objectEvent->currentCoords.y, gObjectEvents[playerObjectId].currentCoords.x, gObjectEvents[playerObjectId].currentCoords.y)); - } + FaceDirection(objectEvent, sprite, GetDirectionToFace(objectEvent->currentCoords.x, + objectEvent->currentCoords.y, + gObjectEvents[playerObjectId].currentCoords.x, + gObjectEvents[playerObjectId].currentCoords.y)); sprite->sActionFuncId = 1; return TRUE; } @@ -6267,9 +6148,10 @@ bool8 MovementAction_FaceAwayPlayer_Step0(struct ObjectEvent *objectEvent, struc u8 playerObjectId; if (!TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0, &playerObjectId)) - { - FaceDirection(objectEvent, sprite, GetOppositeDirection(GetDirectionToFace(objectEvent->currentCoords.x, objectEvent->currentCoords.y, gObjectEvents[playerObjectId].currentCoords.x, gObjectEvents[playerObjectId].currentCoords.y))); - } + FaceDirection(objectEvent, sprite, GetOppositeDirection(GetDirectionToFace(objectEvent->currentCoords.x, + objectEvent->currentCoords.y, + gObjectEvents[playerObjectId].currentCoords.x, + gObjectEvents[playerObjectId].currentCoords.y))); sprite->sActionFuncId = 1; return TRUE; } @@ -7399,9 +7281,7 @@ bool8 MovementAction_PauseSpriteAnim(struct ObjectEvent *objectEvent, struct Spr static void UpdateObjectEventSpriteAnimPause(struct ObjectEvent *objectEvent, struct Sprite *sprite) { if (objectEvent->disableAnim) - { sprite->animPaused = TRUE; - } } static void TryEnableObjectEventAnim(struct ObjectEvent *objectEvent, struct Sprite *sprite) @@ -7552,14 +7432,10 @@ static void GetGroundEffectFlags_LongGrassOnBeginStep(struct ObjectEvent *objEve static void GetGroundEffectFlags_Tracks(struct ObjectEvent *objEvent, u32 *flags) { if (MetatileBehavior_IsDeepSand(objEvent->previousMetatileBehavior)) - { *flags |= GROUND_EFFECT_FLAG_DEEP_SAND; - } else if (MetatileBehavior_IsSandOrDeepSand(objEvent->previousMetatileBehavior) || MetatileBehavior_IsFootprints(objEvent->previousMetatileBehavior)) - { *flags |= GROUND_EFFECT_FLAG_SAND; - } } static void GetGroundEffectFlags_SandHeap(struct ObjectEvent *objEvent, u32 *flags) @@ -7569,14 +7445,14 @@ static void GetGroundEffectFlags_SandHeap(struct ObjectEvent *objEvent, u32 *fla { if (!objEvent->inSandPile) { - objEvent->inSandPile = 0; - objEvent->inSandPile = 1; + objEvent->inSandPile = FALSE; + objEvent->inSandPile = TRUE; *flags |= GROUND_EFFECT_FLAG_SAND_PILE; } } else { - objEvent->inSandPile = 0; + objEvent->inSandPile = FALSE; } } @@ -7589,14 +7465,14 @@ static void GetGroundEffectFlags_ShallowFlowingWater(struct ObjectEvent *objEven { if (!objEvent->inShallowFlowingWater) { - objEvent->inShallowFlowingWater = 0; - objEvent->inShallowFlowingWater = 1; + objEvent->inShallowFlowingWater = FALSE; + objEvent->inShallowFlowingWater = TRUE; *flags |= GROUND_EFFECT_FLAG_SHALLOW_FLOWING_WATER; } } else { - objEvent->inShallowFlowingWater = 0; + objEvent->inShallowFlowingWater = FALSE; } } @@ -7604,9 +7480,7 @@ static void GetGroundEffectFlags_Puddle(struct ObjectEvent *objEvent, u32 *flags { if (MetatileBehavior_IsPuddle(objEvent->currentMetatileBehavior) && MetatileBehavior_IsPuddle(objEvent->previousMetatileBehavior)) - { *flags |= GROUND_EFFECT_FLAG_PUDDLE; - } } static void GetGroundEffectFlags_Ripple(struct ObjectEvent *objEvent, u32 *flags) @@ -7622,14 +7496,14 @@ static void GetGroundEffectFlags_ShortGrass(struct ObjectEvent *objEvent, u32 *f { if (!objEvent->inShortGrass) { - objEvent->inShortGrass = 0; - objEvent->inShortGrass = 1; + objEvent->inShortGrass = FALSE; + objEvent->inShortGrass = TRUE; *flags |= GROUND_EFFECT_FLAG_SHORT_GRASS; } } else { - objEvent->inShortGrass = 0; + objEvent->inShortGrass = FALSE; } } @@ -7640,14 +7514,14 @@ static void GetGroundEffectFlags_HotSprings(struct ObjectEvent *objEvent, u32 *f { if (!objEvent->inHotSprings) { - objEvent->inHotSprings = 0; - objEvent->inHotSprings = 1; + objEvent->inHotSprings = FALSE; + objEvent->inHotSprings = TRUE; *flags |= GROUND_EFFECT_FLAG_HOT_SPRINGS; } } else { - objEvent->inHotSprings = 0; + objEvent->inHotSprings = FALSE; } } @@ -8213,11 +8087,11 @@ bool8 FreezeObjectEvent(struct ObjectEvent *objectEvent) } else { - objectEvent->frozen = 1; + objectEvent->frozen = TRUE; objectEvent->spriteAnimPausedBackup = gSprites[objectEvent->spriteId].animPaused; objectEvent->spriteAffineAnimPausedBackup = gSprites[objectEvent->spriteId].affineAnimPaused; - gSprites[objectEvent->spriteId].animPaused = 1; - gSprites[objectEvent->spriteId].affineAnimPaused = 1; + gSprites[objectEvent->spriteId].animPaused = TRUE; + gSprites[objectEvent->spriteId].affineAnimPaused = TRUE; return FALSE; } } diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index e58fb783b3..6d338c06d7 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -421,7 +421,7 @@ static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 me return SecretBase_EventScript_SandOrnament; if (MetatileBehavior_IsSecretBaseShieldOrToyTV(metatileBehavior) == TRUE) return SecretBase_EventScript_ShieldOrToyTV; - if (MetatileBehavior_IsMB_C6(metatileBehavior) == TRUE) + if (MetatileBehavior_IsSecretBaseDecorationBase(metatileBehavior) == TRUE) { CheckInteractedWithFriendsFurnitureBottom(); return NULL; @@ -729,9 +729,8 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB DoTeleportTileWarp(); return TRUE; } - if (MetatileBehavior_IsBridgeOverOcean(metatileBehavior) == TRUE) + if (MetatileBehavior_IsUnionRoomWarp(metatileBehavior) == TRUE) { - // Maybe unused? This MB is used by log bridges, but there's never a warp event on them. DoSpinExitWarp(); return TRUE; } @@ -762,7 +761,7 @@ static bool8 IsWarpMetatileBehavior(u16 metatileBehavior) && MetatileBehavior_IsAquaHideoutWarp(metatileBehavior) != TRUE && MetatileBehavior_IsMtPyreHole(metatileBehavior) != TRUE && MetatileBehavior_IsMossdeepGymWarp(metatileBehavior) != TRUE - && MetatileBehavior_IsBridgeOverOcean(metatileBehavior) != TRUE) + && MetatileBehavior_IsUnionRoomWarp(metatileBehavior) != TRUE) return FALSE; return TRUE; } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 00800636de..bc86a80083 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -225,10 +225,10 @@ static void (*const sPlayerAvatarTransitionFuncs[])(struct ObjectEvent *) = static bool8 (*const sArrowWarpMetatileBehaviorChecks[])(u8) = { - MetatileBehavior_IsSouthArrowWarp, - MetatileBehavior_IsNorthArrowWarp, - MetatileBehavior_IsWestArrowWarp, - MetatileBehavior_IsEastArrowWarp, + [DIR_SOUTH - 1] = MetatileBehavior_IsSouthArrowWarp, + [DIR_NORTH - 1] = MetatileBehavior_IsNorthArrowWarp, + [DIR_WEST - 1] = MetatileBehavior_IsWestArrowWarp, + [DIR_EAST - 1] = MetatileBehavior_IsEastArrowWarp, }; static const u8 sRivalAvatarGfxIds[][2] = @@ -281,10 +281,10 @@ static const u8 sPlayerAvatarGfxToStateFlag[2][5][2] = static bool8 (*const sArrowWarpMetatileBehaviorChecks2[])(u8) = //Duplicate of sArrowWarpMetatileBehaviorChecks { - MetatileBehavior_IsSouthArrowWarp, - MetatileBehavior_IsNorthArrowWarp, - MetatileBehavior_IsWestArrowWarp, - MetatileBehavior_IsEastArrowWarp, + [DIR_SOUTH - 1] = MetatileBehavior_IsSouthArrowWarp, + [DIR_NORTH - 1] = MetatileBehavior_IsNorthArrowWarp, + [DIR_WEST - 1] = MetatileBehavior_IsWestArrowWarp, + [DIR_EAST - 1] = MetatileBehavior_IsEastArrowWarp, }; static bool8 (*const sPushBoulderFuncs[])(struct Task *, struct ObjectEvent *, struct ObjectEvent *) = @@ -929,9 +929,9 @@ static bool8 PlayerCheckIfAnimFinishedOrInactive(void) return ObjectEventCheckHeldMovementStatus(&gObjectEvents[gPlayerAvatar.objectEventId]); } -static void PlayerSetCopyableMovement(u8 a) +static void PlayerSetCopyableMovement(u8 movement) { - gObjectEvents[gPlayerAvatar.objectEventId].playerCopyableMovement = a; + gObjectEvents[gPlayerAvatar.objectEventId].playerCopyableMovement = movement; } u8 PlayerGetCopyableMovement(void) @@ -955,65 +955,65 @@ void PlayerSetAnimId(u8 movementActionId, u8 copyableMovement) void PlayerWalkNormal(u8 direction) { - PlayerSetAnimId(GetWalkNormalMovementAction(direction), 2); + PlayerSetAnimId(GetWalkNormalMovementAction(direction), COPY_MOVE_WALK); } void PlayerWalkFast(u8 direction) { - PlayerSetAnimId(GetWalkFastMovementAction(direction), 2); + PlayerSetAnimId(GetWalkFastMovementAction(direction), COPY_MOVE_WALK); } -void PlayerRideWaterCurrent(u8 a) +void PlayerRideWaterCurrent(u8 direction) { - PlayerSetAnimId(GetRideWaterCurrentMovementAction(a), 2); + PlayerSetAnimId(GetRideWaterCurrentMovementAction(direction), COPY_MOVE_WALK); } void PlayerWalkFaster(u8 direction) { - PlayerSetAnimId(GetWalkFasterMovementAction(direction), 2); + PlayerSetAnimId(GetWalkFasterMovementAction(direction), COPY_MOVE_WALK); } -static void PlayerRun(u8 a) +static void PlayerRun(u8 direction) { - PlayerSetAnimId(GetPlayerRunMovementAction(a), 2); + PlayerSetAnimId(GetPlayerRunMovementAction(direction), COPY_MOVE_WALK); } -void PlayerOnBikeCollide(u8 a) +void PlayerOnBikeCollide(u8 direction) { - PlayCollisionSoundIfNotFacingWarp(a); - PlayerSetAnimId(GetWalkInPlaceNormalMovementAction(a), 2); + PlayCollisionSoundIfNotFacingWarp(direction); + PlayerSetAnimId(GetWalkInPlaceNormalMovementAction(direction), COPY_MOVE_WALK); } -void PlayerOnBikeCollideWithFarawayIslandMew(u8 a) +void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction) { - PlayerSetAnimId(GetWalkInPlaceNormalMovementAction(a), 2); + PlayerSetAnimId(GetWalkInPlaceNormalMovementAction(direction), COPY_MOVE_WALK); } -static void PlayerNotOnBikeCollide(u8 a) +static void PlayerNotOnBikeCollide(u8 direction) { - PlayCollisionSoundIfNotFacingWarp(a); - PlayerSetAnimId(GetWalkInPlaceSlowMovementAction(a), 2); + PlayCollisionSoundIfNotFacingWarp(direction); + PlayerSetAnimId(GetWalkInPlaceSlowMovementAction(direction), COPY_MOVE_WALK); } -static void PlayerNotOnBikeCollideWithFarawayIslandMew(u8 a) +static void PlayerNotOnBikeCollideWithFarawayIslandMew(u8 direction) { - PlayerSetAnimId(GetWalkInPlaceSlowMovementAction(a), 2); + PlayerSetAnimId(GetWalkInPlaceSlowMovementAction(direction), COPY_MOVE_WALK); } void PlayerFaceDirection(u8 direction) { - PlayerSetAnimId(GetFaceDirectionMovementAction(direction), 1); + PlayerSetAnimId(GetFaceDirectionMovementAction(direction), COPY_MOVE_FACE); } void PlayerTurnInPlace(u8 direction) { - PlayerSetAnimId(GetWalkInPlaceFastMovementAction(direction), 1); + PlayerSetAnimId(GetWalkInPlaceFastMovementAction(direction), COPY_MOVE_FACE); } void PlayerJumpLedge(u8 direction) { PlaySE(SE_LEDGE); - PlayerSetAnimId(GetJump2MovementAction(direction), 8); + PlayerSetAnimId(GetJump2MovementAction(direction), COPY_MOVE_JUMP2); } // Stop player on current facing direction once they're done moving and if they're not currently Acro Biking on bumpy slope @@ -1029,81 +1029,82 @@ void PlayerFreeze(void) // wheelie idle void PlayerIdleWheelie(u8 direction) { - PlayerSetAnimId(GetAcroWheelieFaceDirectionMovementAction(direction), 1); + PlayerSetAnimId(GetAcroWheelieFaceDirectionMovementAction(direction), COPY_MOVE_FACE); } // normal to wheelie void PlayerStartWheelie(u8 direction) { - PlayerSetAnimId(GetAcroPopWheelieFaceDirectionMovementAction(direction), 1); + PlayerSetAnimId(GetAcroPopWheelieFaceDirectionMovementAction(direction), COPY_MOVE_FACE); } // wheelie to normal void PlayerEndWheelie(u8 direction) { - PlayerSetAnimId(GetAcroEndWheelieFaceDirectionMovementAction(direction), 1); + PlayerSetAnimId(GetAcroEndWheelieFaceDirectionMovementAction(direction), COPY_MOVE_FACE); } // wheelie hopping standing -void PlayerStandingHoppingWheelie(u8 a) +void PlayerStandingHoppingWheelie(u8 direction) { PlaySE(SE_BIKE_HOP); - PlayerSetAnimId(GetAcroWheelieHopFaceDirectionMovementAction(a), 1); + PlayerSetAnimId(GetAcroWheelieHopFaceDirectionMovementAction(direction), COPY_MOVE_FACE); } // wheelie hopping moving -void PlayerMovingHoppingWheelie(u8 a) +void PlayerMovingHoppingWheelie(u8 direction) { PlaySE(SE_BIKE_HOP); - PlayerSetAnimId(GetAcroWheelieHopDirectionMovementAction(a), 2); + PlayerSetAnimId(GetAcroWheelieHopDirectionMovementAction(direction), COPY_MOVE_WALK); } // wheelie hopping ledge -void PlayerLedgeHoppingWheelie(u8 a) +void PlayerLedgeHoppingWheelie(u8 direction) { PlaySE(SE_BIKE_HOP); - PlayerSetAnimId(GetAcroWheelieJumpDirectionMovementAction(a), 8); + PlayerSetAnimId(GetAcroWheelieJumpDirectionMovementAction(direction), COPY_MOVE_JUMP2); } // acro turn jump void PlayerAcroTurnJump(u8 direction) { PlaySE(SE_BIKE_HOP); - PlayerSetAnimId(GetJumpInPlaceTurnAroundMovementAction(direction), 1); + PlayerSetAnimId(GetJumpInPlaceTurnAroundMovementAction(direction), COPY_MOVE_FACE); } void PlayerWheelieInPlace(u8 direction) { PlaySE(SE_WALL_HIT); - PlayerSetAnimId(GetAcroWheelieInPlaceDirectionMovementAction(direction), 2); + PlayerSetAnimId(GetAcroWheelieInPlaceDirectionMovementAction(direction), COPY_MOVE_WALK); } void PlayerPopWheelieWhileMoving(u8 direction) { - PlayerSetAnimId(GetAcroPopWheelieMoveDirectionMovementAction(direction), 2); + PlayerSetAnimId(GetAcroPopWheelieMoveDirectionMovementAction(direction), COPY_MOVE_WALK); } void PlayerWheelieMove(u8 direction) { - PlayerSetAnimId(GetAcroWheelieMoveDirectionMovementAction(direction), 2); + PlayerSetAnimId(GetAcroWheelieMoveDirectionMovementAction(direction), COPY_MOVE_WALK); } void PlayerEndWheelieWhileMoving(u8 direction) { - PlayerSetAnimId(GetAcroEndWheelieMoveDirectionMovementAction(direction), 2); + PlayerSetAnimId(GetAcroEndWheelieMoveDirectionMovementAction(direction), COPY_MOVE_WALK); } -static void PlayCollisionSoundIfNotFacingWarp(u8 a) +static void PlayCollisionSoundIfNotFacingWarp(u8 direction) { s16 x, y; u8 metatileBehavior = gObjectEvents[gPlayerAvatar.objectEventId].currentMetatileBehavior; - if (!sArrowWarpMetatileBehaviorChecks[a - 1](metatileBehavior)) + if (!sArrowWarpMetatileBehaviorChecks[direction - 1](metatileBehavior)) { - if (a == 2) + // Check if walking up into a door + if (direction == DIR_NORTH) { PlayerGetDestCoords(&x, &y); - MoveCoords(2, &x, &y); + MoveCoords(direction, &x, &y); if (MetatileBehavior_IsWarpDoor(MapGridGetMetatileBehaviorAt(x, y))) return; } diff --git a/src/field_weather.c b/src/field_weather.c index c067e8ebd7..cd34364414 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -719,7 +719,7 @@ void ApplyWeatherGammaShiftIfIdle(s8 gammaIndex) } } -void sub_80ABC7C(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay) +void ApplyWeatherGammaShiftIfIdle_Gradual(u8 gammaIndex, u8 gammaTargetIndex, u8 gammaStepDelay) { if (gWeatherPtr->palProcessingState == WEATHER_PAL_STATE_IDLE) { @@ -779,7 +779,7 @@ void FadeScreen(u8 mode, s8 delay) if (fadeOut) { if (useWeatherPal) - CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); + CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, PLTT_BUFFER_SIZE * 2); BeginNormalPaletteFade(PALETTES_ALL, delay, 0, 16, fadeColor); gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_SCREEN_FADING_OUT; diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c index 27ade478f0..5720363c21 100644 --- a/src/field_weather_effect.c +++ b/src/field_weather_effect.c @@ -1181,7 +1181,7 @@ void Thunderstorm_Main(void) case TSTORM_STATE_FADE_THUNDER_LONG: if (--gWeatherPtr->thunderDelay == 0) { - sub_80ABC7C(19, 3, 5); + ApplyWeatherGammaShiftIfIdle_Gradual(19, 3, 5); gWeatherPtr->initStep++; } break; diff --git a/src/international_string_util.c b/src/international_string_util.c index b2ee9743ea..21e3e4bee9 100644 --- a/src/international_string_util.c +++ b/src/international_string_util.c @@ -214,10 +214,11 @@ int GetNicknameLanguage(u8 *str) return GAME_LANGUAGE; } -void sub_81DB620(int windowId, int columnStart, int rowStart, int numFillTiles, int numRows) +// Used by Pokénav's Match Call to erase the previous trainer's flavor text when switching between their info pages. +void FillWindowTilesByRow(int windowId, int columnStart, int rowStart, int numFillTiles, int numRows) { u8 *windowTileData; - int fillSize, windowRowSize, rowsToFill; + int fillSize, windowRowSize, i; struct Window *window = &gWindows[windowId]; fillSize = numFillTiles * TILE_SIZE_4BPP; @@ -225,12 +226,10 @@ void sub_81DB620(int windowId, int columnStart, int rowStart, int numFillTiles, windowTileData = window->tileData + (rowStart * windowRowSize) + (columnStart * TILE_SIZE_4BPP); if (numRows > 0) { - rowsToFill = numRows; - while (rowsToFill) + for (i = numRows; i != 0; i--) { CpuFastFill8(0x11, windowTileData, fillSize); windowTileData += windowRowSize; - rowsToFill--; } } } diff --git a/src/item_menu.c b/src/item_menu.c index 32b035ec91..720c6f3983 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -669,7 +669,7 @@ void VBlankCB_BagMenuRun(void) static void CB2_Bag(void) { - while(MenuHelpers_CallLinkSomething() != TRUE && SetupBagMenu() != TRUE && MenuHelpers_LinkSomething() != TRUE) + while(MenuHelpers_ShouldWaitForLinkRecv() != TRUE && SetupBagMenu() != TRUE && MenuHelpers_IsLinkActive() != TRUE) {}; } @@ -705,7 +705,7 @@ static bool8 SetupBagMenu(void) gMain.state++; break; case 6: - if (!MenuHelpers_LinkSomething()) + if (!MenuHelpers_IsLinkActive()) ResetTasks(); gMain.state++; break; @@ -1215,7 +1215,7 @@ static void Task_BagMenu_HandleInput(u8 taskId) u16* cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket]; s32 listPosition; - if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE && !gPaletteFade.active) { switch (GetSwitchBagPocketDirection()) { @@ -1354,7 +1354,7 @@ static void Task_SwitchBagPocket(u8 taskId) { s16* data = gTasks[taskId].data; - if (!MenuHelpers_LinkSomething() && !IsWallysBag()) + if (!MenuHelpers_IsLinkActive() && !IsWallysBag()) { switch (GetSwitchBagPocketDirection()) { @@ -1449,7 +1449,7 @@ static void Task_HandleSwappingItemsInput(u8 taskId) { s16* data = gTasks[taskId].data; - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { if (JOY_NEW(SELECT_BUTTON)) { @@ -1589,7 +1589,7 @@ static void OpenContextMenu(u8 taskId) case ITEMMENULOCATION_BERRY_TREE: case ITEMMENULOCATION_ITEMPC: default: - if (MenuHelpers_LinkSomething() == TRUE || InUnionRoom() == TRUE) + if (MenuHelpers_IsLinkActive() == TRUE || InUnionRoom() == TRUE) { if (gBagPosition.pocket == KEYITEMS_POCKET || !IsHoldingItemAllowed(gSpecialVar_ItemId)) { @@ -1691,7 +1691,7 @@ static void Task_ItemContext_Normal(u8 taskId) static void Task_ItemContext_SingleRow(u8 taskId) { - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { s8 selection = Menu_ProcessInputNoWrap(); switch (selection) @@ -1712,7 +1712,7 @@ static void Task_ItemContext_SingleRow(u8 taskId) static void Task_ItemContext_MultipleRows(u8 taskId) { - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { s8 cursorPos = Menu_GetCursorPos(); if (JOY_NEW(DPAD_UP)) diff --git a/src/item_use.c b/src/item_use.c index 833e80b976..cee451f360 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -612,7 +612,7 @@ static void Task_StandingOnHiddenItem(u8 taskId) void ItemUseOutOfBattle_PokeblockCase(u8 taskId) { - if (MenuHelpers_LinkSomething() == TRUE) // link func + if (MenuHelpers_IsLinkActive() == TRUE) { DisplayDadsAdviceCannotUseItemMessage(taskId, gTasks[taskId].tUsingRegisteredKeyItem); } diff --git a/src/link.c b/src/link.c index 8ba7610ccc..f5eb8b68c4 100644 --- a/src/link.c +++ b/src/link.c @@ -1832,9 +1832,9 @@ u32 GetLinkRecvQueueLength(void) return gLink.recvQueue.count; } -bool32 IsLinkRecvQueueLengthAtLeast3(void) +bool32 IsLinkRecvQueueAtOverworldMax(void) { - if (GetLinkRecvQueueLength() > 2) + if (GetLinkRecvQueueLength() >= OVERWORLD_RECV_QUEUE_MAX) return TRUE; return FALSE; diff --git a/src/mail.c b/src/mail.c index 8bb6f69918..1cbfd8baab 100644 --- a/src/mail.c +++ b/src/mail.c @@ -593,10 +593,8 @@ static bool8 MailReadBuildGraphics(void) } break; case 15: - if (Overworld_LinkRecvQueueLengthMoreThan2() == TRUE) - { + if (Overworld_IsRecvQueueAtMax() == TRUE) return FALSE; - } break; case 16: SetVBlankCallback(VBlankCB_MailRead); @@ -641,7 +639,7 @@ static void CB2_InitMailRead(void) SetMainCallback2(CB2_MailRead); break; } - } while (MenuHelpers_LinkSomething() != TRUE); + } while (MenuHelpers_IsLinkActive() != TRUE); } static void BufferMailText(void) diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 3317555908..3e6b6a914d 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -278,51 +278,45 @@ u8 GetLRKeysPressedAndHeld(void) bool8 IsHoldingItemAllowed(u16 itemId) { // Enigma Berry can't be held in link areas - if (itemId != ITEM_ENIGMA_BERRY) - return TRUE; - else if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRADE_CENTER) - && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRADE_CENTER)) + if (itemId == ITEM_ENIGMA_BERRY + && ((gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRADE_CENTER) + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRADE_CENTER)) + || InUnionRoom() == TRUE)) return FALSE; - else if (InUnionRoom() != TRUE) - return TRUE; else - return FALSE; + return TRUE; } bool8 IsWritingMailAllowed(u16 itemId) { - if (IsUpdateLinkStateCBActive() != TRUE && InUnionRoom() != TRUE) + if ((IsOverworldLinkActive() == TRUE || InUnionRoom() == TRUE) && ItemIsMail(itemId) == TRUE) + return FALSE; + else return TRUE; - else if (ItemIsMail(itemId) != TRUE) +} + +bool8 MenuHelpers_IsLinkActive(void) +{ + if (IsOverworldLinkActive() == TRUE || gReceivedRemoteLinkPlayers == 1) return TRUE; else return FALSE; } -bool8 MenuHelpers_LinkSomething(void) +static bool8 IsActiveOverworldLinkBusy(void) { - if (IsUpdateLinkStateCBActive() == TRUE || gReceivedRemoteLinkPlayers == 1) - return TRUE; - else + if (!MenuHelpers_IsLinkActive()) return FALSE; + else + return Overworld_IsRecvQueueAtMax(); } -static bool8 sub_81221D0(void) +bool8 MenuHelpers_ShouldWaitForLinkRecv(void) { - if (!MenuHelpers_LinkSomething()) - return FALSE; - else - return Overworld_LinkRecvQueueLengthMoreThan2(); -} - -bool8 MenuHelpers_CallLinkSomething(void) -{ - if (sub_81221D0() == TRUE) + if (IsActiveOverworldLinkBusy() == TRUE || IsLinkRecvQueueAtOverworldMax() == TRUE ) return TRUE; - else if (IsLinkRecvQueueLengthAtLeast3() != TRUE) - return FALSE; else - return TRUE; + return FALSE; } void SetItemListPerPageCount(struct ItemSlot *slots, u8 slotsCount, u8 *pageItems, u8 *totalItems, u8 maxPerPage) diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 3829523df2..ad5eb42ccd 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -136,8 +136,8 @@ static const u8 sTileBitAttributes[] = [MB_BRIDGE_OVER_POND_MED_EDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_BRIDGE_OVER_POND_HIGH_EDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_BRIDGE_OVER_POND_HIGH_EDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_BRIDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_BRIDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_UNUSED_BRIDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_BIKE_BRIDGE_OVER_BARRIER] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_COUNTER] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_UNUSED_81] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_UNUSED_82] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), @@ -208,7 +208,7 @@ static const u8 sTileBitAttributes[] = [MB_HOLDS_LARGE_DECORATION] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_SECRET_BASE_TV_SHIELD] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_PLAYER_ROOM_PC_ON] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_C6] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), + [MB_SECRET_BASE_DECORATION_BASE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_SECRET_BASE_POSTER] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_UNUSED_C8] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_UNUSED_C9] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), @@ -711,9 +711,9 @@ bool8 MetatileBehavior_IsSecretBaseImpassable(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsMB_C6(u8 metatileBehavior) +bool8 MetatileBehavior_IsSecretBaseDecorationBase(u8 metatileBehavior) { - if (metatileBehavior == MB_C6) + if (metatileBehavior == MB_SECRET_BASE_DECORATION_BASE) return TRUE; else return FALSE; @@ -901,8 +901,8 @@ bool8 MetatileBehavior_IsBridgeOverWater(u8 metatileBehavior) || metatileBehavior == MB_BRIDGE_OVER_POND_HIGH) || (metatileBehavior == MB_BRIDGE_OVER_POND_HIGH_EDGE_1 || metatileBehavior == MB_BRIDGE_OVER_POND_HIGH_EDGE_2 - || metatileBehavior == MB_UNUSED_BRIDGE_1 - || metatileBehavior == MB_UNUSED_BRIDGE_2)) + || metatileBehavior == MB_UNUSED_BRIDGE + || metatileBehavior == MB_BIKE_BRIDGE_OVER_BARRIER)) return TRUE; else return FALSE; @@ -1262,12 +1262,11 @@ bool8 MetatileBehavior_IsAquaHideoutWarp(u8 metatileBehavior) return FALSE; } -// Very odd, used to initiate a teleport-style warp. -// No warp events seem to be on a metatile of this kind, and it's -// used by log bridges over ocean-style water, which wouldn't make -// sense to have a warp like this. -bool8 MetatileBehavior_IsBridgeOverOcean(u8 metatileBehavior) +bool8 MetatileBehavior_IsUnionRoomWarp(u8 metatileBehavior) { + // This metatile behavior is re-used for some reason by + // the Union Room exit metatile. This function is used to + // initiate a teleport-style warp. if (metatileBehavior == MB_BRIDGE_OVER_OCEAN) return TRUE; else diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c index cd29717321..178b6d5b79 100644 --- a/src/minigame_countdown.c +++ b/src/minigame_countdown.c @@ -447,7 +447,7 @@ static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId) switch (sprite->sState) { case 0: - sub_8007E18(sprite, 0x800, 0x1A); + SetSpriteMatrixAnchor(sprite, NO_ANCHOR, 26); sprite->sState++; // fallthrough case 1: diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c index 297883e9cd..f6c07acd15 100644 --- a/src/mystery_event_menu.c +++ b/src/mystery_event_menu.c @@ -20,14 +20,11 @@ #include "decompress.h" #include "constants/rgb.h" -// this file's functions static void CB2_MysteryEventMenu(void); static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 speed); -// EWRAM vars -static EWRAM_DATA u8 sUnknown_0203BCF8 = 0; // set but unused +static EWRAM_DATA u8 sUnused = 0; // set but unused -// const rom data static const struct BgTemplate sBgTemplates[] = { { @@ -270,7 +267,7 @@ static void CB2_MysteryEventMenu(void) if (!IsTextPrinterActive(0)) { gMain.state++; - sUnknown_0203BCF8 = 0; + sUnused = 0; } break; case 14: diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index e1236adfd3..709aa28c00 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -347,7 +347,7 @@ static const struct ListMenuTemplate sListMenu_Receive = { .cursorKind = 0 }; -static const u8 *const Unref_082F0710[] = { +static const u8 *const sUnusedMenuTexts[] = { gText_VarietyOfEventsImportedWireless, gText_WonderCardsInPossession, gText_ReadNewsThatArrived, diff --git a/src/overworld.c b/src/overworld.c index a8d9a4a833..8b32b286c2 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -166,7 +166,7 @@ static void ResetPlayerHeldKeys(u16 *); static u16 KeyInterCB_SelfIdle(u32); static u16 KeyInterCB_DeferToEventScript(u32); static u16 GetDirectionForDpadKey(u16); -static void CB1_UpdateLinkState(void); +static void CB1_OverworldLink(void); static void SetKeyInterceptCallback(u16 (*func)(u32)); static void SetFieldVBlankCallback(void); static void FieldClearVBlankHBlankCallbacks(void); @@ -1417,9 +1417,9 @@ static void ResetSafariZoneFlag_(void) ResetSafariZoneFlag(); } -bool32 IsUpdateLinkStateCBActive(void) +bool32 IsOverworldLinkActive(void) { - if (gMain.callback1 == CB1_UpdateLinkState) + if (gMain.callback1 == CB1_OverworldLink) return TRUE; else return FALSE; @@ -1606,7 +1606,7 @@ static void CB2_LoadMapOnReturnToFieldCableClub(void) if (LoadMapInStepsLink(&gMain.state)) { SetFieldVBlankCallback(); - SetMainCallback1(CB1_UpdateLinkState); + SetMainCallback1(CB1_OverworldLink); ResetAllMultiplayerState(); SetMainCallback2(CB2_Overworld); } @@ -1614,7 +1614,7 @@ static void CB2_LoadMapOnReturnToFieldCableClub(void) void CB2_ReturnToField(void) { - if (IsUpdateLinkStateCBActive() == TRUE) + if (IsOverworldLinkActive() == TRUE) { SetMainCallback2(CB2_ReturnToFieldLink); } @@ -1636,7 +1636,7 @@ static void CB2_ReturnToFieldLocal(void) static void CB2_ReturnToFieldLink(void) { - if (!Overworld_LinkRecvQueueLengthMoreThan2() && ReturnToFieldLink(&gMain.state)) + if (!Overworld_IsRecvQueueAtMax() && ReturnToFieldLink(&gMain.state)) SetMainCallback2(CB2_Overworld); } @@ -1644,7 +1644,7 @@ void CB2_ReturnToFieldFromMultiplayer(void) { FieldClearVBlankHBlankCallbacks(); StopMapMusic(); - SetMainCallback1(CB1_UpdateLinkState); + SetMainCallback1(CB1_OverworldLink); ResetAllMultiplayerState(); if (gWirelessCommType != 0) @@ -2226,7 +2226,7 @@ static void CreateLinkPlayerSprites(void) } -static void CB1_UpdateLinkState(void) +static void CB1_OverworldLink(void) { if (gWirelessCommType == 0 || !IsRfuRecvQueueEmpty() || !IsSendingKeysToLink()) { @@ -2442,7 +2442,7 @@ static void UpdateHeldKeyCode(u16 key) if (gWirelessCommType != 0 && GetLinkSendQueueLength() > 1 - && IsUpdateLinkStateCBActive() == TRUE + && IsOverworldLinkActive() == TRUE && IsSendingKeysToLink() == TRUE) { switch (key) @@ -2541,7 +2541,7 @@ static u16 KeyInterCB_DeferToEventScript(u32 key) static u16 KeyInterCB_DeferToRecvQueue(u32 key) { u16 retVal; - if (GetLinkRecvQueueLength() > 2) + if (GetLinkRecvQueueLength() >= OVERWORLD_RECV_QUEUE_MAX) { retVal = LINK_KEY_CODE_EMPTY; } @@ -2613,7 +2613,7 @@ static u16 KeyInterCB_WaitForPlayersToExit(u32 keyOrPlayerId) { // keyOrPlayerId could be any keycode. This callback does no sanity checking // on the size of the key. It's assuming that it is being called from - // CB1_UpdateLinkState. + // CB1_OverworldLink. if (sPlayerLinkStates[keyOrPlayerId] != PLAYER_LINK_STATE_EXITING_ROOM) CheckRfuKeepAliveTimer(); if (AreAllPlayersInLinkState(PLAYER_LINK_STATE_EXITING_ROOM) == TRUE) @@ -2834,11 +2834,11 @@ static void RunTerminateLinkScript(void) ScriptContext2_Enable(); } -bool32 Overworld_LinkRecvQueueLengthMoreThan2(void) +bool32 Overworld_IsRecvQueueAtMax(void) { - if (!IsUpdateLinkStateCBActive()) + if (!IsOverworldLinkActive()) return FALSE; - if (GetLinkRecvQueueLength() >= 3) + if (GetLinkRecvQueueLength() >= OVERWORLD_RECV_QUEUE_MAX) sReceivingFromLink = TRUE; else sReceivingFromLink = FALSE; @@ -2849,9 +2849,9 @@ bool32 Overworld_RecvKeysFromLinkIsRunning(void) { u8 temp; - if (GetLinkRecvQueueLength() < 2) + if (GetLinkRecvQueueLength() < OVERWORLD_RECV_QUEUE_MAX - 1) return FALSE; - else if (IsUpdateLinkStateCBActive() != TRUE) + else if (IsOverworldLinkActive() != TRUE) return FALSE; else if (IsSendingKeysToLink() != TRUE) return FALSE; @@ -2875,7 +2875,7 @@ bool32 Overworld_SendKeysToLinkIsRunning(void) { if (GetLinkSendQueueLength() < 2) return FALSE; - else if (IsUpdateLinkStateCBActive() != TRUE) + else if (IsOverworldLinkActive() != TRUE) return FALSE; else if (IsSendingKeysToLink() != TRUE) return FALSE; diff --git a/src/palette_util.c b/src/palette_util.c index 3fbde9284e..08239c3363 100755 --- a/src/palette_util.c +++ b/src/palette_util.c @@ -439,7 +439,7 @@ void UpdatePulseBlend(struct PulseBlend *pulseBlend) } // Below used for the Roulette grid -void ClearTilemapRect(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height) +void FillTilemapRect(u16 *dest, u16 value, u8 left, u8 top, u8 width, u8 height) { u16 *_dest; u8 i; @@ -450,9 +450,7 @@ void ClearTilemapRect(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height) { _dest = dest + i * 32; for (j = 0; j < width; j++) - { - *_dest++ = src; - } + *_dest++ = value; } } @@ -468,8 +466,39 @@ void SetTilemapRect(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height) { _dest = dest + i * 32; for (j = 0; j < width; j++) - { *_dest++ = *_src++; - } + } +} + +static void FillTilemapRect_Unused(void *dest, u16 value, u8 left, u8 top, u8 width, u8 height) +{ + u8 i, j; + u8 x, y; + + for (i = 0, y = top; i < height; i++) + { + for (x = left, j = 0; j < width; j++) + { + *(u16 *)((dest) + (y * 64 + x * 2)) = value; + x = (x + 1) % 32; + } + y = (y + 1) % 32; + } +} + +static void SetTilemapRect_Unused(void *dest, const u16 *src, u8 left, u8 top, u8 width, u8 height) +{ + u8 i, j; + u8 x, y; + const u16 *_src; + + for (i = 0, _src = src, y = top; i < height; i++) + { + for (x = left, j = 0; j < width; j++) + { + *(u16 *)((dest) + (y * 64 + x * 2)) = *(_src++); + x = (x + 1) % 32; + } + y = (y + 1) % 32; } } diff --git a/src/party_menu.c b/src/party_menu.c index 38ca8c9d51..14215f9c0c 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -476,7 +476,7 @@ static void CB2_InitPartyMenu(void) { while (TRUE) { - if (MenuHelpers_CallLinkSomething() == TRUE || ShowPartyMenu() == TRUE || MenuHelpers_LinkSomething() == TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() == TRUE || ShowPartyMenu() == TRUE || MenuHelpers_IsLinkActive() == TRUE) break; } } @@ -509,7 +509,7 @@ static bool8 ShowPartyMenu(void) gMain.state++; break; case 5: - if (!MenuHelpers_LinkSomething()) + if (!MenuHelpers_IsLinkActive()) ResetTasks(); gMain.state++; break; @@ -1182,7 +1182,7 @@ u8 GetPartyMenuType(void) void Task_HandleChooseMonInput(u8 taskId) { - if (!gPaletteFade.active && MenuHelpers_CallLinkSomething() != TRUE) + if (!gPaletteFade.active && MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { s8 *slotPtr = GetCurrentPartySlotPtr(); @@ -1319,7 +1319,7 @@ static void HandleChooseMonCancel(u8 taskId, s8 *slotPtr) PlaySE(SE_SELECT); if (DisplayCancelChooseMonYesNo(taskId) != TRUE) { - if (!MenuHelpers_LinkSomething()) + if (!MenuHelpers_IsLinkActive()) gSpecialVar_0x8004 = PARTY_SIZE + 1; gPartyMenuUseExitCallback = FALSE; *slotPtr = PARTY_SIZE + 1; @@ -1659,7 +1659,7 @@ bool8 IsPartyMenuTextPrinterActive(void) static void Task_WaitForLinkAndReturnToChooseMon(u8 taskId) { - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON); gTasks[taskId].func = Task_HandleChooseMonInput; @@ -1672,7 +1672,7 @@ static void Task_ReturnToChooseMonAfterText(u8 taskId) { ClearStdWindowAndFrameToTransparent(6, 0); ClearWindowTilemap(6); - if (MenuHelpers_LinkSomething() == TRUE) + if (MenuHelpers_IsLinkActive() == TRUE) { gTasks[taskId].func = Task_WaitForLinkAndReturnToChooseMon; } @@ -2663,7 +2663,7 @@ static void Task_TryCreateSelectionWindow(u8 taskId) static void Task_HandleSelectionMenuInput(u8 taskId) { - if (!gPaletteFade.active && MenuHelpers_CallLinkSomething() != TRUE) + if (!gPaletteFade.active && MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { s8 input; s16 *data = gTasks[taskId].data; @@ -3635,7 +3635,7 @@ static void CursorCb_FieldMove(u8 taskId) PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[0]); PartyMenuRemoveWindow(&sPartyMenuInternal->windowId[1]); - if (MenuHelpers_LinkSomething() == TRUE || InUnionRoom() == TRUE) + if (MenuHelpers_IsLinkActive() == TRUE || InUnionRoom() == TRUE) { if (fieldMove == FIELD_MOVE_MILK_DRINK || fieldMove == FIELD_MOVE_SOFT_BOILED) DisplayPartyMenuStdMessage(PARTY_MSG_CANT_USE_HERE); diff --git a/src/pokeblock.c b/src/pokeblock.c index 647a85b109..67c9602d26 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -505,11 +505,11 @@ static void CB2_InitPokeblockMenu(void) { while (1) { - if (MenuHelpers_CallLinkSomething() == TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() == TRUE) break; if (InitPokeblockMenu() == TRUE) break; - if (MenuHelpers_LinkSomething() == TRUE) + if (MenuHelpers_IsLinkActive() == TRUE) break; } } @@ -1004,7 +1004,7 @@ static void Task_HandlePokeblockMenuInput(u8 taskId) { s16 *data = gTasks[taskId].data; - if (!gPaletteFade.active && MenuHelpers_CallLinkSomething() != TRUE) + if (!gPaletteFade.active && MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { if (JOY_NEW(SELECT_BUTTON)) { @@ -1057,7 +1057,7 @@ static void Task_HandlePokeblocksSwapInput(u8 taskId) { s16 *data = gTasks[taskId].data; - if (MenuHelpers_CallLinkSomething() == TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() == TRUE) return; if (JOY_NEW(SELECT_BUTTON)) @@ -1161,7 +1161,7 @@ static void Task_HandlePokeblockActionsInput(u8 taskId) { s8 itemId; - if (MenuHelpers_CallLinkSomething() == TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() == TRUE) return; itemId = Menu_ProcessInputNoWrap(); diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 2241d1668b..1253f22852 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -688,11 +688,11 @@ void PreparePokeblockFeedScene(void) { while (1) { - if (MenuHelpers_CallLinkSomething() == TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() == TRUE) break; if (LoadPokeblockFeedScene() == TRUE) break; - if (MenuHelpers_LinkSomething() == TRUE) + if (MenuHelpers_IsLinkActive() == TRUE) break; } } diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index ab86ee09fe..2ad25576f5 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3197,7 +3197,7 @@ static void LoadPokeJumpGfx(void) FillBgTilemapBufferRect_Palette0(BG_INTERFACE, 0, 0, 0, 0x20, 0x20); PrintScoreSuffixes(); PrintScore(0); - sub_8098C6C(0, 1, 0xE0); + LoadUserWindowBorderGfxOnBg(0, 1, 0xE0); CopyBgTilemapBufferToVram(BG_INTERFACE); CopyBgTilemapBufferToVram(BG_VENUSAUR); CopyBgTilemapBufferToVram(BG_BONUSES); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index dc05c52c4a..4dbdd13348 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1146,7 +1146,7 @@ static void VBlank(void) static void CB2_InitSummaryScreen(void) { - while (MenuHelpers_CallLinkSomething() != TRUE && LoadGraphics() != TRUE && MenuHelpers_LinkSomething() != TRUE); + while (MenuHelpers_ShouldWaitForLinkRecv() != TRUE && LoadGraphics() != TRUE && MenuHelpers_IsLinkActive() != TRUE); } static bool8 LoadGraphics(void) @@ -1490,7 +1490,7 @@ static void BeginCloseSummaryScreen(u8 taskId) static void CloseSummaryScreen(u8 taskId) { - if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE && !gPaletteFade.active) { SetMainCallback2(sMonSummaryScreen->callback); gLastViewedMonIndex = sMonSummaryScreen->curMonIndex; @@ -1508,7 +1508,7 @@ static void CloseSummaryScreen(u8 taskId) static void Task_HandleInput(u8 taskId) { - if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE && !gPaletteFade.active) { if (JOY_NEW(DPAD_UP)) { @@ -1660,7 +1660,7 @@ static void Task_ChangeSummaryMon(u8 taskId) gSprites[sMonSummaryScreen->spriteIds[SPRITE_ARR_ID_MON]].data[2] = 0; break; default: - if (MenuHelpers_CallLinkSomething() == 0 && FuncIsActiveTask(Task_ShowStatusWindow) == 0) + if (!MenuHelpers_ShouldWaitForLinkRecv() && !FuncIsActiveTask(Task_ShowStatusWindow)) { data[0] = 0; gTasks[taskId].func = Task_HandleInput; @@ -1889,7 +1889,7 @@ static void Task_HandleInput_MoveSelect(u8 taskId) { s16 *data = gTasks[taskId].data; - if (MenuHelpers_CallLinkSomething() != 1) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { if (JOY_NEW(DPAD_UP)) { @@ -2029,7 +2029,7 @@ static void Task_HandleInput_MovePositionSwitch(u8 taskId) { s16* data = gTasks[taskId].data; - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { if (JOY_NEW(DPAD_UP)) { @@ -2170,7 +2170,7 @@ static void Task_HandleReplaceMoveInput(u8 taskId) { s16* data = gTasks[taskId].data; - if (MenuHelpers_CallLinkSomething() != TRUE) + if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE) { if (gPaletteFade.active != TRUE) { diff --git a/src/pokenav.c b/src/pokenav.c index 925560543b..d30c523f92 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -212,7 +212,7 @@ u32 CreateLoopedTask(LoopedTask loopedTask, u32 priority) { u16 taskId; - if (!IsUpdateLinkStateCBActive()) + if (!IsOverworldLinkActive()) taskId = CreateTask(Task_RunLoopedTask, priority); else taskId = CreateTask(Task_RunLoopedTask_LinkMode, priority); @@ -288,7 +288,7 @@ static void Task_RunLoopedTask_LinkMode(u8 taskId) s16 *state; u32 action; - if (Overworld_LinkRecvQueueLengthMoreThan2()) + if (Overworld_IsRecvQueueAtMax()) return; task = (LoopedTask)GetWordTaskArg(taskId, 1); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index ba495245b6..f022f04bfc 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -6,6 +6,7 @@ #include "bg.h" #include "menu.h" #include "decompress.h" +#include "international_string_util.h" // TODO: This UI isnt just for match call, seems to be the general pokenav list UI @@ -66,8 +67,6 @@ struct PokenavSub17 u32 loopedTaskId; }; -extern void sub_81DB620(u32 windowId, u32 a1, u32 a2, u32 a3, u32 a4); - void sub_81C82E4(struct PokenavSub17 *matchCall); bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3); void InitMatchCallWindowState(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1); @@ -754,7 +753,7 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok if (str != NULL) { - sub_81DB620(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2); + FillWindowTilesByRow(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2); AddTextPrinterParameterized(list->listWindow.windowId, 7, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL); CopyWindowRectToVram(list->listWindow.windowId, 2, 0, r6 * 2, list->listWindow.unk4, 2); } diff --git a/src/roulette.c b/src/roulette.c index b6ef1168b2..acfeea2b71 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -1317,28 +1317,28 @@ static void UpdateGridSelectionRect(u8 selectionId) switch (selectionId) { case SELECTION_NONE: - ClearTilemapRect(&sRoulette->tilemapBuffers[0][0], 0, 14, 7, 16, 13); + FillTilemapRect(&sRoulette->tilemapBuffers[0][0], 0, 14, 7, 16, 13); break; case COL_WYNAUT: case COL_AZURILL: case COL_SKITTY: case COL_MAKUHITA: temp0 = (selectionId * 3 + 14); - ClearTilemapRect(&sRoulette->tilemapBuffers[0][0], 0, 14, 7, 16, 13); + FillTilemapRect(&sRoulette->tilemapBuffers[0][0], 0, 14, 7, 16, 13); SetTilemapRect(&sRoulette->tilemapBuffers[0][0], &sRoulette->gridTilemap[281], temp0, 7, 3, 13); break; case ROW_ORANGE: case ROW_GREEN: case ROW_PURPLE: temp1 = ((selectionId - 1) / 5 * 3 + 10); - ClearTilemapRect(&sRoulette->tilemapBuffers[0][0], 0, 14, 7, 16, 13); + FillTilemapRect(&sRoulette->tilemapBuffers[0][0], 0, 14, 7, 16, 13); SetTilemapRect(&sRoulette->tilemapBuffers[0][0], &sRoulette->gridTilemap[320], 14, temp1, 16, 3); break; // Individual square default: temp0 = GET_COL(selectionId) * 3 + 14; temp1 = ((selectionId - 1) / 5 * 3 + 7); - ClearTilemapRect(&sRoulette->tilemapBuffers[0][0], 0, 14, 7, 16, 13); + FillTilemapRect(&sRoulette->tilemapBuffers[0][0], 0, 14, 7, 16, 13); SetTilemapRect(&sRoulette->tilemapBuffers[0][0], &sRoulette->gridTilemap[272], temp0, temp1, 3, 3); break; } diff --git a/src/scrcmd.c b/src/scrcmd.c index 3e3beee59c..96d95da277 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1207,7 +1207,7 @@ bool8 ScrCmd_turnvobject(struct ScriptContext *ctx) // The player is frozen after waiting for their current movement to finish. bool8 ScrCmd_lockall(struct ScriptContext *ctx) { - if (IsUpdateLinkStateCBActive()) + if (IsOverworldLinkActive()) { return FALSE; } @@ -1223,7 +1223,7 @@ bool8 ScrCmd_lockall(struct ScriptContext *ctx) // The player and selected object are frozen after waiting for their current movement to finish. bool8 ScrCmd_lock(struct ScriptContext *ctx) { - if (IsUpdateLinkStateCBActive()) + if (IsOverworldLinkActive()) { return FALSE; } @@ -2196,7 +2196,7 @@ bool8 ScrCmd_selectapproachingtrainer(struct ScriptContext *ctx) bool8 ScrCmd_lockfortrainer(struct ScriptContext *ctx) { - if (IsUpdateLinkStateCBActive()) + if (IsOverworldLinkActive()) { return FALSE; } diff --git a/src/start_menu.c b/src/start_menu.c index 59279d6b9f..236c6e4041 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -251,7 +251,7 @@ static void BuildStartMenuActions(void) { sNumStartMenuActions = 0; - if (IsUpdateLinkStateCBActive() == TRUE) + if (IsOverworldLinkActive() == TRUE) { BuildLinkModeStartMenu(); } @@ -554,7 +554,7 @@ void Task_ShowStartMenu(u8 taskId) void ShowStartMenu(void) { - if (!IsUpdateLinkStateCBActive()) + if (!IsOverworldLinkActive()) { FreezeObjectEvents(); PlayerFreeze(); @@ -679,7 +679,7 @@ static bool8 StartMenuPlayerNameCallback(void) RemoveExtraStartMenuWindows(); CleanupOverworldWindowsAndTilemaps(); - if (IsUpdateLinkStateCBActive() || InUnionRoom()) + if (IsOverworldLinkActive() || InUnionRoom()) ShowPlayerTrainerCard(CB2_ReturnToFieldWithOpenMenu); // Display trainer card else if (FlagGet(FLAG_SYS_FRONTIER_PASS)) ShowFrontierPass(CB2_ReturnToFieldWithOpenMenu); // Display frontier pass diff --git a/src/text_window.c b/src/text_window.c index 864bd08316..798b791ced 100644 --- a/src/text_window.c +++ b/src/text_window.c @@ -6,7 +6,6 @@ #include "bg.h" #include "graphics.h" -// const rom data const u8 gTextWindowFrame1_Gfx[] = INCBIN_U8("graphics/text_window/1.4bpp"); static const u8 sTextWindowFrame2_Gfx[] = INCBIN_U8("graphics/text_window/2.4bpp"); static const u8 sTextWindowFrame3_Gfx[] = INCBIN_U8("graphics/text_window/3.4bpp"); @@ -190,7 +189,8 @@ const u16 *GetOverworldTextboxPalettePtr(void) return gMessageBox_Pal; } -void sub_8098C6C(u8 bg, u16 destOffset, u8 palOffset) +// Effectively LoadUserWindowBorderGfx but specifying the bg directly instead of a window from that bg +void LoadUserWindowBorderGfxOnBg(u8 bg, u16 destOffset, u8 palOffset) { LoadBgTiles(bg, sWindowFrames[gSaveBlock2Ptr->optionsWindowFrameType].tiles, 0x120, destOffset); LoadPalette(GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType)->pal, palOffset, 0x20); diff --git a/src/trainer_card.c b/src/trainer_card.c index bad015644c..45902e7f81 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -456,7 +456,7 @@ static void Task_TrainerCard(u8 taskId) } break; case STATE_WAIT_FLIP_TO_BACK: - if (IsCardFlipTaskActive() && Overworld_LinkRecvQueueLengthMoreThan2() != TRUE) + if (IsCardFlipTaskActive() && Overworld_IsRecvQueueAtMax() != TRUE) { PlaySE(SE_RG_CARD_OPEN); sData->mainState = STATE_HANDLE_INPUT_BACK; @@ -513,7 +513,7 @@ static void Task_TrainerCard(u8 taskId) CloseTrainerCard(taskId); break; case STATE_WAIT_FLIP_TO_FRONT: - if (IsCardFlipTaskActive() && Overworld_LinkRecvQueueLengthMoreThan2() != TRUE) + if (IsCardFlipTaskActive() && Overworld_IsRecvQueueAtMax() != TRUE) { sData->mainState = STATE_HANDLE_INPUT_FRONT; PlaySE(SE_RG_CARD_OPEN); @@ -1663,7 +1663,7 @@ static bool8 Task_AnimateCardFlipDown(struct Task* task) static bool8 Task_DrawFlippedCardSide(struct Task* task) { sData->allowDMACopy = FALSE; - if (Overworld_LinkRecvQueueLengthMoreThan2() == TRUE) + if (Overworld_IsRecvQueueAtMax() == TRUE) return FALSE; do diff --git a/src/union_room_chat.c b/src/union_room_chat.c index ca6f8bd1d8..a1aae08cf3 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -249,7 +249,7 @@ static void SetBgTilemapBuffers(void); static void ClearBg0(void); static void LoadChatWindowBorderGfx(void); static void LoadChatWindowGfx(void); -static void sub_8020680(void); +static void LoadChatUnkPalette(void); static void LoadChatMessagesWindow(void); static void LoadKeyboardWindow(void); static void LoadKeyboardSwapWindow(void); @@ -1983,10 +1983,10 @@ static int GetShouldShowCaseToggleIcon(void) { u8 *str = GetLastCharOfMessagePtr(); u32 character = *str; - if (character > 0xFF || sCaseToggleTable[character] == character || sCaseToggleTable[character] == 0) - return 3; + if (character > EOS || sCaseToggleTable[character] == character || sCaseToggleTable[character] == CHAR_SPACE) + return 3; // Don't show else - return 0; + return 0; // Show } static u8 *GetChatHostName(void) @@ -2063,7 +2063,7 @@ static void Task_ReceiveChatMessage(u8 taskId) switch (buffer[0]) { default: - case CHAT_MESSAGE_CHAT: tNextState = 3; break; + case CHAT_MESSAGE_CHAT: tNextState = 3; break; case CHAT_MESSAGE_JOIN: tNextState = 3; break; case CHAT_MESSAGE_LEAVE: tNextState = 4; break; case CHAT_MESSAGE_DROP: tNextState = 5; break; @@ -2246,7 +2246,7 @@ static bool32 Display_LoadGfx(u8 *state) LoadChatWindowGfx(); break; case 4: - sub_8020680(); + LoadChatUnkPalette(); break; case 5: LoadChatMessagesWindow(); @@ -3074,7 +3074,7 @@ static void LoadChatWindowGfx(void) CopyBgTilemapBufferToVram(2); } -static void sub_8020680(void) +static void LoadChatUnkPalette(void) { LoadPalette(sUnk_Palette1, 0x80, sizeof(sUnk_Palette1)); RequestDma3Fill(0, (void *)BG_CHAR_ADDR(1) + 0x20, 0x20, 1); From 929aade0fd0e5ea0fba4e18650bda02e6a943ba5 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 2 Nov 2021 18:34:05 -0400 Subject: [PATCH 128/417] Fix braille slash --- gflib/characters.h | 2 +- tools/preproc/asm_file.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gflib/characters.h b/gflib/characters.h index 480652df03..714904aa42 100644 --- a/gflib/characters.h +++ b/gflib/characters.h @@ -300,7 +300,7 @@ #define BRAILLE_CHAR_O 0x19 // #define BRAILLE_CHAR_N 0x1B -#define BRAILLE_CHAR_EXCL_MARK 0x1C +#define BRAILLE_CHAR_EXCL_MARK 0x1C #define BRAILLE_CHAR_R 0x1D #define BRAILLE_CHAR_T 0x1E #define BRAILLE_CHAR_Q 0x1F diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index be8d54fc4c..af16e232d3 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -371,7 +371,7 @@ int AsmFile::ReadBraille(unsigned char* s) { ':', BRAILLE_CHAR_COLON }, { ';', BRAILLE_CHAR_SEMICOLON }, { '-', BRAILLE_CHAR_HYPHEN }, - { '/', BRAILLE_CHAR_PAREN }, + { '/', BRAILLE_CHAR_SLASH }, { '(', BRAILLE_CHAR_PAREN }, { ')', BRAILLE_CHAR_PAREN }, { '\'', BRAILLE_CHAR_APOSTROPHE }, From dc44548e43b8cc9dcd8e32061c67ed84073a8631 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 2 Nov 2021 20:28:17 -0400 Subject: [PATCH 129/417] Sync libgcnmultiboot --- src/libgcnmultiboot.s | 429 +++++++++++++++++++++++++----------------- 1 file changed, 260 insertions(+), 169 deletions(-) diff --git a/src/libgcnmultiboot.s b/src/libgcnmultiboot.s index dbf70ccf86..5ecc7d2f90 100644 --- a/src/libgcnmultiboot.s +++ b/src/libgcnmultiboot.s @@ -4,11 +4,36 @@ .include "asm/macros.inc" .include "constants/constants.inc" + .equiv GCMB_STRUCT_COUNTER1, 0x00 + .equiv GCMB_STRUCT_COUNTER2, 0x01 + .equiv GCMB_STRUCT_MBPROGRESS, 0x02 + .equiv GCMB_STRUCT_SAVEDVCOUNT, 0x03 + .equiv GCMB_STRUCT_KEYA, 0x04 + .equiv GCMB_STRUCT_KEYB, 0x08 + .equiv GCMB_STRUCT_KEYC, 0x0C + .equiv GCMB_STRUCT_BOOT_KEY, 0x10 + .equiv GCMB_STRUCT_IMAGE_SIZE, 0x12 + .equiv GCMB_STRUCT_SESSION_KEY, 0x14 + .equiv GCMB_STRUCT_HASH_VAL, 0x18 + .equiv GCMB_STRUCT_KEYC_DERIVATION, 0x1C .equiv GCMB_STRUCT_BASE_DEST_PTR, 0x20 .equiv GCMB_STRUCT_CUR_DEST_PTR, 0x24 .equiv GCMB_STRUCT_SERIAL_INTR_HANDLER, 0x28 - .equiv ROM_HEADER_NINTENDO_LOGO_OFFSET, 0x4 + .equiv ROM_HEADER_NINTENDO_LOGO_OFFSET, 0x04 + .equiv ROM_HEADER_NINTENDO_LOGO_LENGTH, 0x98 + .equiv ROM_HEADER_NINTENDO_LOGO_END, 0xA0 + + .equiv MBPROGRESS_NONE, 0x00 + .equiv MBPROGRESS_LOGO_CORRECT, 0x01 + .equiv MBPROGRESS_READY_TO_BOOT, 0x02 + + .equiv GCMB_MAGIC_BOOTKEY_HASHVAL, 0xBB + .equiv GCMB_MAGIC_BOOTKEY, 0xBB + .equiv GCMB_MAGIC_COUNTER2, 0xCC + .equiv GCMB_MAGIC_KEYA, 0xDD + .equiv GCMB_MAGIC_KEYB, 0xEE + .equiv GCMB_MAGIC_KEYCDERIVATION, 0xFF .syntax unified @@ -22,7 +47,7 @@ GameCubeMultiBoot_Hash: @ 82DED70 movs r2, 0x20 GameCubeMultiBoot_Hash_Loop: - lsrs r3, #1 + lsrs r3, 1 bcc GameCubeMultiBoot_Hash_SkipEor eors r3, r4 @@ -37,137 +62,177 @@ GameCubeMultiBoot_Hash_SkipEor: thumb_func_start GameCubeMultiBoot_Main @ void GameCubeMultiBoot_Main(struct GameCubeMultiBoot *mb); GameCubeMultiBoot_Main: @ 82DED84 - ldr r1, [r0, #GCMB_STRUCT_SERIAL_INTR_HANDLER] - cmp r1, #0 - beq _082DEDAA - ldrb r1, [r0, 0x1] - adds r1, 0x1 - strb r1, [r0, 0x1] - ldrb r1, [r0, 0x2] - cmp r1, 0x2 - beq _082DEDF4 - ldr r3, pool_InterruptRegs - ldrh r2, [r3, #OFFSET_REG_IME - 0x200] - movs r1, 0 - strh r1, [r3, #OFFSET_REG_IME - 0x200] - ldrb r1, [r0] - cmp r1, 0xA - bgt _082DEDA8 - adds r1, 0x1 - strb r1, [r0] -_082DEDA8: - strh r2, [r3, #OFFSET_REG_IME - 0x200] -_082DEDAA: - bcs GameCubeMultiBoot_Init - ldrb r1, [r0, 0x2] + @ If there is no interrupt handler, skip counter manipulation + ldr r1, [r0, GCMB_STRUCT_SERIAL_INTR_HANDLER] cmp r1, 0 - bne _082DEDF6 - ldr r1, [r0, #GCMB_STRUCT_CUR_DEST_PTR] - ldr r2, [r0, #GCMB_STRUCT_BASE_DEST_PTR] + beq GameCubeMultiBoot_Main_SkipCounters + @ Increment the second counter + ldrb r1, [r0, GCMB_STRUCT_COUNTER2] + adds r1, 0x1 + strb r1, [r0, GCMB_STRUCT_COUNTER2] + @ If there is nothing more to do, bail out + ldrb r1, [r0, GCMB_STRUCT_MBPROGRESS] + cmp r1, MBPROGRESS_READY_TO_BOOT + beq GameCubeMultiBoot_Main_Return + @ Save current interrupt master register value + ldr r3, pool_InterruptRegs + ldrh r2, [r3, OFFSET_REG_IME - 0x200] + @ Disable all interrupts + movs r1, 0 + strh r1, [r3, OFFSET_REG_IME - 0x200] + @ Increment the first counter, if it's less than or equal to 10. + ldrb r1, [r0, GCMB_STRUCT_COUNTER1] + cmp r1, 0xA + bgt GameCubeMultiBoot_Main_SkipCounter1Inc + adds r1, 0x1 + strb r1, [r0, GCMB_STRUCT_COUNTER1] +GameCubeMultiBoot_Main_SkipCounter1Inc: + @ Load the saved interrupt master register value (re-enables interrupts if they were enabled before) + strh r2, [r3, OFFSET_REG_IME - 0x200] +GameCubeMultiBoot_Main_SkipCounters: + @ Initialise multiboot structures if required + bcs GameCubeMultiBoot_Init + @ Skip this section (check Nintendo logo) if the check has already passed + ldrb r1, [r0, GCMB_STRUCT_MBPROGRESS] + cmp r1, MBPROGRESS_NONE + bne GameCubeMultiBoot_Main_SkipLogoCheck + @ Bail out if no multiboot image data has been transferred yet + ldr r1, [r0, GCMB_STRUCT_CUR_DEST_PTR] + ldr r2, [r0, GCMB_STRUCT_BASE_DEST_PTR] subs r1, r2 - beq _082DEE76 - cmp r1, 0xA0 - bcc _082DEE76 + beq GameCubeMultiBoot_Main_Return2 + @ Also bail out if not enough data has been transferred + cmp r1, ROM_HEADER_NINTENDO_LOGO_END + bcc GameCubeMultiBoot_Main_Return2 + @ Compare the Nintendo logo of the transferred multiboot image header, with the one in the ROM image of the inserted cart push {r4-r6} - movs r1, 0x98 - adds r2, #ROM_HEADER_NINTENDO_LOGO_OFFSET + movs r1, ROM_HEADER_NINTENDO_LOGO_LENGTH + adds r2, ROM_HEADER_NINTENDO_LOGO_OFFSET ldr r4, pool_NintendoLogo -_082DEDC6: +GameCubeMultiBoot_Main_LogoCmpLoop: ldm r2!, {r5} ldm r4!, {r6} cmp r5, r6 - bne _082DEDDC + bne GameCubeMultiBoot_Main_LogoCmpEnd subs r1, 0x4 - bne _082DEDC6 + bne GameCubeMultiBoot_Main_LogoCmpLoop ldm r2!, {r5} ldm r4!, {r6} eors r5, r6 - lsrs r5, #8 - str r2, [r0, #GCMB_STRUCT_BASE_DEST_PTR] -_082DEDDC: + lsrs r5, 8 + str r2, [r0, GCMB_STRUCT_BASE_DEST_PTR] +GameCubeMultiBoot_Main_LogoCmpEnd: pop {r4-r6} + @ Throw everything away if the logo data didn't match bne GameCubeMultiBoot_Init - movs r1, 0x1 - strb r1, [r0, 0x2] - ldr r1, [r0, 0x4] - ldr r2, [r0, 0x8] + @ Logo matched, set the relevent multiboot progress bit + movs r1, MBPROGRESS_LOGO_CORRECT + strb r1, [r0, GCMB_STRUCT_MBPROGRESS] + @ XOR together KeyA and KeyB to get the initial multiboot image checksum value + ldr r1, [r0, GCMB_STRUCT_KEYA] + ldr r2, [r0, GCMB_STRUCT_KEYB] eors r1, r2 - str r1, [r0, 0x18] + str r1, [r0, GCMB_STRUCT_HASH_VAL] + @ ...also use it as the initial value for the image encryption session key. Algorithm is the same as the GBA BIOS multiboot: sessionkey = (initialvalue * 0x6177614b) + 1 ldr r2, pool_Kawa muls r1, r2 adds r1, 0x1 - str r1, [r0, 0x14] -_082DEDF4: + str r1, [r0, GCMB_STRUCT_SESSION_KEY] +GameCubeMultiBoot_Main_Return: bx lr -_082DEDF6: - ldr r1, [r0, #GCMB_STRUCT_CUR_DEST_PTR] +GameCubeMultiBoot_Main_SkipLogoCheck: + @ If this code is executed, then the logo check has passed, and the data being transferred in is encrypted. + @ Set up registers. + ldr r1, [r0, GCMB_STRUCT_CUR_DEST_PTR] mov r12, r1 - ldr r3, [r0, 0x18] + ldr r3, [r0, GCMB_STRUCT_HASH_VAL] push {r4-r7} - ldr r4, [r0, #GCMB_STRUCT_BASE_DEST_PTR] + ldr r4, [r0, GCMB_STRUCT_BASE_DEST_PTR] ldr r5, pool_Kawa - ldr r6, [r0, 0x14] + ldr r6, [r0, GCMB_STRUCT_SESSION_KEY] ldr r7, pool_HashVal -_082DEE06: +GameCubeMultiBoot_Main_ImageDecryptHashLoop: + @ If there's no more data, break out of the loop cmp r4, r12 - bcs _082DEE26 + bcs GameCubeMultiBoot_Main_ImageDecryptHashEnd + @ Get the next uint32 ldr r1, [r4] + @ Decrypt the ciphertext: plaintext = (ciphertext ^ sessionkey) + hashval eors r1, r6 adds r1, r3 + @ Save the current uint32 of plaintext and advance the pointer stm r4!, {r1} + @ Advance the hashval with this uint32 of plaintext -- this is the same code as GameCubeMultiBoot_Hash. eors r3, r1 movs r2, 0x20 -_082DEE16: - lsrs r3, #1 - bcc _082DEE1C +GameCubeMultiBoot_Main_HashLoop: + lsrs r3, 1 + bcc GameCubeMultiBoot_Main_HashSkipEor eors r3, r7 -_082DEE1C: +GameCubeMultiBoot_Main_HashSkipEor: subs r2, 0x1 - bne _082DEE16 + bne GameCubeMultiBoot_Main_HashLoop + @ Advance the sessionkey with the usual algorithm: sessionkey = (sessionkey * 0x6177614b) + 1 muls r6, r5 adds r6, 0x1 - b _082DEE06 -_082DEE26: - str r4, [r0, #GCMB_STRUCT_BASE_DEST_PTR] - str r6, [r0, 0x14] + b GameCubeMultiBoot_Main_ImageDecryptHashLoop +GameCubeMultiBoot_Main_ImageDecryptHashEnd: + @ Save the new pointer, sessionkey, hashval + str r4, [r0, GCMB_STRUCT_BASE_DEST_PTR] + str r6, [r0, GCMB_STRUCT_SESSION_KEY] pop {r4-r7} - str r3, [r0, 0x18] - ldrh r1, [r0, 0x12] - cmp r1, #0 - bne _082DEE76 - ldr r1, [r0, #GCMB_STRUCT_CUR_DEST_PTR] - ldr r2, [r0, #GCMB_STRUCT_BASE_DEST_PTR] + str r3, [r0, GCMB_STRUCT_HASH_VAL] + @ Bail out if the image size is unknown + ldrh r1, [r0, GCMB_STRUCT_IMAGE_SIZE] + cmp r1, 0 + bne GameCubeMultiBoot_Main_Return2 + @ Bail out if no image data has been transferred + ldr r1, [r0, GCMB_STRUCT_CUR_DEST_PTR] + ldr r2, [r0, GCMB_STRUCT_BASE_DEST_PTR] cmp r1, r2 - bne _082DEE76 - ldr r1, [r0, 0xC] - cmp r1, #0 - beq _082DEE60 - ldrh r1, [r0, 0x10] - cmp r1, #0 - beq _082DEDF4 + bne GameCubeMultiBoot_Main_Return2 + @ If KeyC hasn't been generated yet, go generate it + ldr r1, [r0, GCMB_STRUCT_KEYC] + cmp r1, 0 + beq GameCubeMultiBoot_Main_GenerateKeyC + @ If the other side hasn't sent its boot key yet, bail out + ldrh r1, [r0, GCMB_STRUCT_BOOT_KEY] + cmp r1, 0 + beq GameCubeMultiBoot_Main_Return + @ Save off LR so it doesn't get clobbered by the upcoming function call mov r12, lr - movs r1, 0xBB - ldr r3, [r0, 0xC] + @ Generate the real boot key, which is the checksum of a hardcoded value and KeyC + movs r1, GCMB_MAGIC_BOOTKEY_HASHVAL + ldr r3, [r0, GCMB_STRUCT_KEYC] bl GameCubeMultiBoot_Hash - ldrh r1, [r0, 0x10] + ldrh r1, [r0, GCMB_STRUCT_BOOT_KEY] + @ Restore the saved LR value mov lr, r12 + @ Compare the two boot keys (real and passed in), if they don't match then throw everything away subs r1, r3 bne GameCubeMultiBoot_Init - movs r1, 0x2 - strb r1, [r0, 0x2] + @ The two boot keys matched, tell the caller that the image is ready to boot + movs r1, MBPROGRESS_READY_TO_BOOT + strb r1, [r0, GCMB_STRUCT_MBPROGRESS] + @ Nothing more to do, return. bx lr -_082DEE60: +GameCubeMultiBoot_Main_GenerateKeyC: + @ Save off LR so it doesn't get clobbered by the upcoming function call mov r12, lr - ldrb r1, [r0, 0x3] - lsls r1, #24 + @ KeyC = (SavedVCount << 24) - 1 + ldrb r1, [r0, GCMB_STRUCT_SAVEDVCOUNT] + lsls r1, 24 subs r1, 0x1 - str r1, [r0, 0xC] + str r1, [r0, GCMB_STRUCT_KEYC] + @ Hash the KeyC with the multiboot image checksum to generate the KeyC derivation material to be sent to the other side of the link bl GameCubeMultiBoot_Hash - lsls r3, #8 - adds r3, 0xFF - str r3, [r0, 0x1C] + @ Make sure the sent KeyC derivation material contains a magic value so that the other side can detect it + lsls r3, 8 + adds r3, GCMB_MAGIC_KEYCDERIVATION + @ Save off the KeyC derivation material and return to caller + str r3, [r0, GCMB_STRUCT_KEYC_DERIVATION] bx r12 -_082DEE76: +GameCubeMultiBoot_Main_Return2: bx lr thumb_func_end GameCubeMultiBoot_Main @@ -182,12 +247,15 @@ pool_NintendoLogo: .4byte RomHeaderNintendoLogo thumb_func_start GameCubeMultiBoot_ExecuteProgram @ void GameCubeMultiBoot_ExecuteProgram(struct GameCubeMultiBoot *mb); GameCubeMultiBoot_ExecuteProgram: @ 82DEE84 - ldrb r1, [r0, 0x2] - cmp r1, 0x2 + @ If there's no multiboot image ready, just return to caller + ldrb r1, [r0, GCMB_STRUCT_MBPROGRESS] + cmp r1, MBPROGRESS_READY_TO_BOOT bne GameCubeMultiBoot_ExecuteProgram_Fail + @ Disable interrupts ldr r3, pool_InterruptRegs - movs r1, #0 - strh r1, [r3, #OFFSET_REG_IME - 0x200] + movs r1, 0 + strh r1, [r3, OFFSET_REG_IME - 0x200] + @ Jump to the real entry point of the multiboot image (past the image header), in ARM mode ldr r1, pool_MultiBootLoadAddr adds r1, 0xC0 bx r1 @@ -201,25 +269,25 @@ GameCubeMultiBoot_Init: @ 82DEE98 ldr r3, pool_InterruptRegs @ Save IME register. - ldrh r2, [r3, #OFFSET_REG_IME - 0x200] + ldrh r2, [r3, OFFSET_REG_IME - 0x200] @ Disable interrupts. movs r1, 0 - strh r1, [r3, #OFFSET_REG_IME - 0x200] + strh r1, [r3, OFFSET_REG_IME - 0x200] @ Set the handler to the "Stop" routine. @ Unless the first command that is received is a device reset command, the @ "Stop" routine will be executed and no further commands will be processed. adr r3, GcMbIntrHandler_Stop - str r3, [r0, #GCMB_STRUCT_SERIAL_INTR_HANDLER] + str r3, [r0, GCMB_STRUCT_SERIAL_INTR_HANDLER] ldrb r3, [r0, 0x3] push {r3} ldrb r3, [r0, 0x1] push {r0,r3} - adds r3, r0, #0 - adds r3, #GCMB_STRUCT_BASE_DEST_PTR + adds r3, r0, 0 + adds r3, GCMB_STRUCT_BASE_DEST_PTR @ clear all but the last 3 fields of the struct GameCubeMultiBoot_Init_ClearStructLoop: @@ -261,7 +329,7 @@ GameCubeMultiBoot_Init_ClearStructLoop: strh r1, [r3, OFFSET_REG_IE - 0x200] @ Restore IME register. - strh r2, [r3, #OFFSET_REG_IME - 0x200] + strh r2, [r3, OFFSET_REG_IME - 0x200] bx lr thumb_func_end GameCubeMultiBoot_Init @@ -275,11 +343,11 @@ GameCubeMultiBoot_HandleSerialInterrupt: @ 82DEEE2 ldrh r1, [r3, OFFSET_REG_JOYCNT - 0x120] strh r1, [r3, OFFSET_REG_JOYCNT - 0x120] - movs r2, #0 + movs r2, 0 strb r2, [r0] - ldr r2, [r0, #GCMB_STRUCT_SERIAL_INTR_HANDLER] - cmp r2, #0 + ldr r2, [r0, GCMB_STRUCT_SERIAL_INTR_HANDLER] + cmp r2, 0 beq GameCubeMultiBoot_HandleSerialInterruptDone lsrs r1, 1 @ was a device reset command received? @@ -297,7 +365,7 @@ GcMbIntrHandler_Stop: strh r2, [r3, OFFSET_REG_JOYSTAT - 0x120] GameCubeMultiBoot_SetInterruptHandler: - str r2, [r0, #GCMB_STRUCT_SERIAL_INTR_HANDLER] + str r2, [r0, GCMB_STRUCT_SERIAL_INTR_HANDLER] GameCubeMultiBoot_ReadVCount: ldr r3, pool_RegDispstat @@ -308,19 +376,25 @@ GameCubeMultiBoot_HandleSerialInterruptDone: bx lr GameCubeMultiBoot_BeginHandshake: + @ Throw away anything that got sent ldr r1, [r3, OFFSET_REG_JOY_RECV - 0x120] + @ Send the game code, the other side of the link must send back the same game code ldr r1, pool_RubyUSAGameCode str r1, [r3, OFFSET_REG_JOY_TRANS - 0x120] movs r1, 0x10 strh r1, [r3, OFFSET_REG_JOYSTAT - 0x120] - ldrb r1, [r0, 0x3] - strb r1, [r0, 0x9] - ldrb r1, [r0, 0x2] + @ Use the saved VCount value to provide 8 bits of entropy for KeyB + ldrb r1, [r0, GCMB_STRUCT_SAVEDVCOUNT] + strb r1, [r0, GCMB_STRUCT_KEYB + 1] + @ If a multiboot image has been transferred at least enough such that the Nintendo logo check has passed, stop everything. + ldrb r1, [r0, GCMB_STRUCT_MBPROGRESS] cmp r1, 0 bne GcMbIntrHandler_Stop + @ Set the image destination pointers. ldr r1, pool_MultiBootLoadAddr - str r1, [r0, #GCMB_STRUCT_BASE_DEST_PTR] - str r1, [r0, #GCMB_STRUCT_CUR_DEST_PTR] + str r1, [r0, GCMB_STRUCT_BASE_DEST_PTR] + str r1, [r0, GCMB_STRUCT_CUR_DEST_PTR] + @ Set the new interrupt handler. adr r2, GcMbIntrHandler_CheckGameCodeSent b GameCubeMultiBoot_SetInterruptHandler @@ -347,149 +421,166 @@ GameCubeMultiBoot_CheckHandshakeResponse: ldr r2, pool_RubyUSAGameCode cmp r1, r2 bne GcMbIntrHandler_Stop @ stop if the GameCube didn't reply with the same game code - ldrb r1, [r0, 0x3] - strb r1, [r0, 0xB] - adr r2, GcMbIntrHandler_82DEF44 + @ Use the saved VCount value to provide another 8 bits of entropy for KeyB. + ldrb r1, [r0, GCMB_STRUCT_SAVEDVCOUNT] + strb r1, [r0, GCMB_STRUCT_KEYB + 3] + adr r2, GcMbIntrHandler_ReceiveKeyA b GameCubeMultiBoot_SetInterruptHandler .align 2, 0 -GcMbIntrHandler_82DEF44: @ 82DEF44 +GcMbIntrHandler_ReceiveKeyA: @ 82DEF44 lsrs r1, 1 @ is receive complete? bcc GcMbIntrHandler_Stop @ branch if not ldr r1, [r3, OFFSET_REG_JOY_RECV - 0x120] + @ make sure top 8 bits of the received value is the KeyA magic number, stop if KeyA is invalid lsrs r2, r1, 24 - cmp r2, 0xDD + cmp r2, GCMB_MAGIC_KEYA bne GcMbIntrHandler_Stop - str r1, [r0, 0x4] - ldrb r1, [r0, 0x1] - strb r1, [r0, 0xA] + @ save received KeyA + str r1, [r0, GCMB_STRUCT_KEYA] + @ use the second GameCubeMultiBoot_Main() counter as another 8 bits of entropy for KeyB + ldrb r1, [r0, GCMB_STRUCT_COUNTER2] + strb r1, [r0, GCMB_STRUCT_KEYB + 2] movs r2, 0 movs r3, 0 - ldr r1, [r0, 0x8] + ldr r1, [r0, GCMB_STRUCT_KEYB] lsrs r1, 8 -_082DEF5E: + @ make sure KeyB is valid (other side of the link is supposed to check KeyB too), if it's not then change the byte that was just set so it is +GameCubeMultiBoot_KeyBCheckLoop: lsrs r1, 1 adcs r2, r3 cmp r1, 0 - bne _082DEF5E + bne GameCubeMultiBoot_KeyBCheckLoop cmp r2, 0xE - bgt _082DEF70 + bgt GameCubeMultiBoot_KeyBSaveNewByte cmp r2, 0x7 - bge _082DEF72 + bge GameCubeMultiBoot_KeyBCheckEnd movs r1, 0xFF -_082DEF70: - strb r1, [r0, 0xA] -_082DEF72: - ldr r1, [r0, 0x8] - adds r1, 0xEE +GameCubeMultiBoot_KeyBSaveNewByte: + strb r1, [r0, GCMB_STRUCT_KEYB + 2] +GameCubeMultiBoot_KeyBCheckEnd: + @ add in the KeyB magic number and send off KeyB + ldr r1, [r0, GCMB_STRUCT_KEYB] + adds r1, GCMB_MAGIC_KEYB ldr r3, pool_SerialRegs str r1, [r3, OFFSET_REG_JOY_TRANS - 0x120] movs r1, 0x30 strh r1, [r3, OFFSET_REG_JOYSTAT - 0x120] - adr r2, GcMbIntrHandler_82DEF84 + @ set new interrupt handler + adr r2, GcMbIntrHandler_CheckKeyBSent b GameCubeMultiBoot_SetInterruptHandler .align 2, 0 -GcMbIntrHandler_82DEF84: @ 82DEF84 +GcMbIntrHandler_CheckKeyBSent: @ 82DEF84 lsls r1, 31 bcc GcMbIntrHandler_Stop @ stop if send failed - bmi _082DEF94 @ branch if receive is complete - adr r2, GcMbIntrHandler_82DEF90 + bmi GameCubeMultiBoot_CheckImageSizeResponse @ branch if receive is complete + adr r2, GcMbIntrHandler_CheckImageSizeResponse b GameCubeMultiBoot_SetInterruptHandler .align 2, 0 -GcMbIntrHandler_82DEF90: @ 82DEF90 +GcMbIntrHandler_CheckImageSizeResponse: @ 82DEF90 lsrs r1, 1 @ is receive complete? bcc GcMbIntrHandler_Stop @ branch if not -_082DEF94: +GameCubeMultiBoot_CheckImageSizeResponse: ldr r1, [r3, OFFSET_REG_JOY_RECV - 0x120] - ldr r2, _082DF034 + ldr r2, GameCubeMultiBoot_MaximumImageSizeUInt32s cmp r1, r2 bhs GcMbIntrHandler_Stop adds r1, 0x1 adds r1, r1 - strh r1, [r0, 0x12] - ldrb r1, [r0, 0x2] + strh r1, [r0, GCMB_STRUCT_IMAGE_SIZE] + ldrb r1, [r0, GCMB_STRUCT_MBPROGRESS] cmp r1, 0 -_082DEFA6: +GcMbIntrHandler_StopIfNotEqual: bne GcMbIntrHandler_Stop ldr r1, pool_MultiBootLoadAddr - str r1, [r0, #GCMB_STRUCT_BASE_DEST_PTR] - str r1, [r0, #GCMB_STRUCT_CUR_DEST_PTR] - adr r2, GcMbIntrHandler_82DEFB4 + str r1, [r0, GCMB_STRUCT_BASE_DEST_PTR] + str r1, [r0, GCMB_STRUCT_CUR_DEST_PTR] + adr r2, GcMbIntrHandler_CheckImageResponse b GameCubeMultiBoot_SetInterruptHandler .align 2, 0 -GcMbIntrHandler_82DEFB4: @ 82DEFB4 +GcMbIntrHandler_CheckImageResponse: @ 82DEFB4 lsrs r1, 1 @ is receive complete? bcc GcMbIntrHandler_Stop @ branch if not - ldr r2, [r0, #GCMB_STRUCT_CUR_DEST_PTR] + ldr r2, [r0, GCMB_STRUCT_CUR_DEST_PTR] movs r1, 0x4 ands r1, r2 adds r1, 0x8 lsls r1, 2 strh r1, [r3, OFFSET_REG_JOYSTAT - 0x120] + @ get the recieved uint32 ldr r1, [r3, OFFSET_REG_JOY_RECV - 0x120] + @ put it in the current destination pointer and advance that pointer stm r2!, {r1} - str r2, [r0, #GCMB_STRUCT_CUR_DEST_PTR] - ldrh r1, [r0, 0x12] + @ save off the advanced pointer + str r2, [r0, GCMB_STRUCT_CUR_DEST_PTR] + @ decrease the image size (in uint32s) + ldrh r1, [r0, GCMB_STRUCT_IMAGE_SIZE] subs r1, 0x1 - strh r1, [r0, 0x12] + strh r1, [r0, GCMB_STRUCT_IMAGE_SIZE] + @ branch away if the transfer is not yet complete bne GameCubeMultiBoot_ReadVCount -_082DEFD2: - ldrb r1, [r0, 0x1] +GcMbIntrHandler_SendCounter2: + @ send counter2 with magic number + ldrb r1, [r0, GCMB_STRUCT_COUNTER2] lsls r1, 8 - adds r1, 0xCC + adds r1, GCMB_MAGIC_COUNTER2 str r1, [r3, OFFSET_REG_JOY_TRANS - 0x120] - adr r2, _082DEFE0 + adr r2, GcMbIntrHandler_CheckCounter2Sent b GameCubeMultiBoot_SetInterruptHandler .align 2, 0 -_082DEFE0: +GcMbIntrHandler_CheckCounter2Sent: lsls r1, 31 -_082DEFE2: - bcc GcMbIntrHandler_Stop - ldr r1, [r0, 0x1C] +GcMbIntrHandler_StopIfSendFailed: + bcc GcMbIntrHandler_Stop @ stop if send failed + @ if KeyC derivation value has not yet been generated, send Counter2 again, otherwise, send KeyC derivation + ldr r1, [r0, GCMB_STRUCT_KEYC_DERIVATION] cmp r1, 0 - beq _082DEFD2 + beq GcMbIntrHandler_SendCounter2 str r1, [r3, OFFSET_REG_JOY_TRANS - 0x120] - adr r2, GcMbIntrHandler_82DEFF0 + adr r2, GcMbIntrHandler_CheckKeyCDerivationSent b GameCubeMultiBoot_SetInterruptHandler .align 2, 0 -GcMbIntrHandler_82DEFF0: @ 82DEFF0 +GcMbIntrHandler_CheckKeyCDerivationSent: @ 82DEFF0 lsls r1, 31 - bcc _082DEFE2 @ branch if send failed - bmi _082DF000 @ branch if receive is complete - adr r2, GcMbIntrHandler_82DEFFC + bcc GcMbIntrHandler_StopIfSendFailed @ branch if send failed + bmi GameCubeMultiBoot_CheckBootKeyResponse @ branch if receive is complete + adr r2, GcMbIntrHandler_CheckBootKeyResponse b GameCubeMultiBoot_SetInterruptHandler .align 2, 0 -GcMbIntrHandler_82DEFFC: @ 82DEFFC +GcMbIntrHandler_CheckBootKeyResponse: @ 82DEFFC lsrs r1, 1 @ is receive complete? - bcc _082DEFE2 @ branch if not + bcc GcMbIntrHandler_StopIfSendFailed @ branch if not -_082DF000: +GameCubeMultiBoot_CheckBootKeyResponse: ldr r1, [r3, OFFSET_REG_JOY_RECV - 0x120] + @ make sure received boot key contains expected magic number, stop if not lsrs r2, r1, 24 - cmp r2, 0xBB - bne _082DEFA6 - strh r1, [r0, 0x10] - adr r2, GcMbIntrHandler_82DF010 + cmp r2, GCMB_MAGIC_BOOTKEY + bne GcMbIntrHandler_StopIfNotEqual + @ save received bootkey to be checked in GameCubeMultiBoot_Main() + strh r1, [r0, GCMB_STRUCT_BOOT_KEY] + @ stop if anything more gets sent + adr r2, GcMbIntrHandler_StopUnconditionally b GameCubeMultiBoot_SetInterruptHandler .align 2, 0 -GcMbIntrHandler_82DF010: @ 82DF010 +GcMbIntrHandler_StopUnconditionally: @ 82DF010 b GcMbIntrHandler_Stop thumb_func_end GameCubeMultiBoot_HandleSerialInterrupt @@ -500,11 +591,11 @@ GameCubeMultiBoot_Quit: @ 82DF012 ldr r3, pool_InterruptRegs @ Save IME register. - ldrh r2, [r3, #OFFSET_REG_IME - 0x200] + ldrh r2, [r3, OFFSET_REG_IME - 0x200] @ Disable interrupts. movs r1, 0 - strh r1, [r3, #OFFSET_REG_IME - 0x200] + strh r1, [r3, OFFSET_REG_IME - 0x200] ldr r3, pool_SerialRegs @@ -528,14 +619,14 @@ GameCubeMultiBoot_Quit: @ 82DF012 strh r1, [r3, OFFSET_REG_IE - 0x200] @ Restore IME register. - strh r2, [r3, #OFFSET_REG_IME - 0x200] + strh r2, [r3, OFFSET_REG_IME - 0x200] bx lr thumb_func_end GameCubeMultiBoot_Quit .align 2, 0 -_082DF034: .4byte 0x4000 +GameCubeMultiBoot_MaximumImageSizeUInt32s: .4byte 0x4000 pool_InterruptRegs: .4byte REG_BASE + 0x200 From 87a094edcb4c043224f57944f1de211feae97c88 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 20:51:41 +0800 Subject: [PATCH 130/417] Use constants for movement speeds --- src/event_object_movement.c | 84 ++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 1bb4991abb..ea57e124d4 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -5184,7 +5184,7 @@ static void InitMovementNormal(struct ObjectEvent *objectEvent, struct Sprite *s static void StartRunningAnim(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction) { - InitNpcForMovement(objectEvent, sprite, direction, 1); + InitNpcForMovement(objectEvent, sprite, direction, MOVE_SPEED_FAST_1); SetStepAnimHandleAlternation(objectEvent, sprite, GetRunningDirectionAnimNum(objectEvent->facingDirection)); } @@ -5595,7 +5595,7 @@ static bool8 DoJumpInPlaceAnim(struct ObjectEvent *objectEvent, struct Sprite *s bool8 MovementAction_Jump2Down_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); return MovementAction_Jump2Down_Step1(objectEvent, sprite); } @@ -5612,7 +5612,7 @@ bool8 MovementAction_Jump2Down_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_Jump2Up_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, 2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); return MovementAction_Jump2Up_Step1(objectEvent, sprite); } @@ -5629,7 +5629,7 @@ bool8 MovementAction_Jump2Up_Step1(struct ObjectEvent *objectEvent, struct Sprit bool8 MovementAction_Jump2Left_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, 2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); return MovementAction_Jump2Left_Step1(objectEvent, sprite); } @@ -5646,7 +5646,7 @@ bool8 MovementAction_Jump2Left_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_Jump2Right_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, 2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); return MovementAction_Jump2Right_Step1(objectEvent, sprite); } @@ -6178,7 +6178,7 @@ bool8 MovementAction_WaitSpriteAnim(struct ObjectEvent *objectEvent, struct Spri static void InitJumpSpecial(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction) { - InitJump(objectEvent, sprite, direction, 1, JUMP_TYPE_HIGH); + InitJump(objectEvent, sprite, direction, MOVE_SPEED_FAST_1, JUMP_TYPE_HIGH); StartSpriteAnim(sprite, GetJumpSpecialDirectionAnimNum(direction)); } @@ -6290,7 +6290,7 @@ bool8 MovementAction_UnlockFacingDirection_Step0(struct ObjectEvent *objectEvent bool8 MovementAction_JumpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1, JUMP_TYPE_NORMAL); return MovementAction_JumpDown_Step1(objectEvent, sprite); } @@ -6307,7 +6307,7 @@ bool8 MovementAction_JumpDown_Step1(struct ObjectEvent *objectEvent, struct Spri bool8 MovementAction_JumpUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, 1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1, JUMP_TYPE_NORMAL); return MovementAction_JumpUp_Step1(objectEvent, sprite); } @@ -6324,7 +6324,7 @@ bool8 MovementAction_JumpUp_Step1(struct ObjectEvent *objectEvent, struct Sprite bool8 MovementAction_JumpLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, 1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1, JUMP_TYPE_NORMAL); return MovementAction_JumpLeft_Step1(objectEvent, sprite); } @@ -6341,7 +6341,7 @@ bool8 MovementAction_JumpLeft_Step1(struct ObjectEvent *objectEvent, struct Spri bool8 MovementAction_JumpRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, 1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1, JUMP_TYPE_NORMAL); return MovementAction_JumpRight_Step1(objectEvent, sprite); } @@ -6358,7 +6358,7 @@ bool8 MovementAction_JumpRight_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_JumpInPlaceDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_NORMAL, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceDown_Step1(objectEvent, sprite); } @@ -6375,7 +6375,7 @@ bool8 MovementAction_JumpInPlaceDown_Step1(struct ObjectEvent *objectEvent, stru bool8 MovementAction_JumpInPlaceUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_NORMAL, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceUp_Step1(objectEvent, sprite); } @@ -6392,7 +6392,7 @@ bool8 MovementAction_JumpInPlaceUp_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_JumpInPlaceLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_WEST, MOVE_SPEED_NORMAL, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceLeft_Step1(objectEvent, sprite); } @@ -6409,7 +6409,7 @@ bool8 MovementAction_JumpInPlaceLeft_Step1(struct ObjectEvent *objectEvent, stru bool8 MovementAction_JumpInPlaceRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_EAST, MOVE_SPEED_NORMAL, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceRight_Step1(objectEvent, sprite); } @@ -6426,7 +6426,7 @@ bool8 MovementAction_JumpInPlaceRight_Step1(struct ObjectEvent *objectEvent, str bool8 MovementAction_JumpInPlaceDownUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_NORMAL, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceDownUp_Step1(objectEvent, sprite); } @@ -6443,7 +6443,7 @@ bool8 MovementAction_JumpInPlaceDownUp_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_JumpInPlaceUpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_NORMAL, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceUpDown_Step1(objectEvent, sprite); } @@ -6460,7 +6460,7 @@ bool8 MovementAction_JumpInPlaceUpDown_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_JumpInPlaceLeftRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_WEST, MOVE_SPEED_NORMAL, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceLeftRight_Step1(objectEvent, sprite); } @@ -6477,7 +6477,7 @@ bool8 MovementAction_JumpInPlaceLeftRight_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_JumpInPlaceRightLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_EAST, MOVE_SPEED_NORMAL, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceRightLeft_Step1(objectEvent, sprite); } @@ -6921,7 +6921,7 @@ static void InitAcroWheelieJump(struct ObjectEvent *objectEvent, struct Sprite * bool8 MovementAction_AcroWheelieHopFaceDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_NORMAL, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceDown_Step1(objectEvent, sprite); } @@ -6938,7 +6938,7 @@ bool8 MovementAction_AcroWheelieHopFaceDown_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroWheelieHopFaceUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_NORMAL, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceUp_Step1(objectEvent, sprite); } @@ -6955,7 +6955,7 @@ bool8 MovementAction_AcroWheelieHopFaceUp_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieHopFaceLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, MOVE_SPEED_NORMAL, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceLeft_Step1(objectEvent, sprite); } @@ -6972,7 +6972,7 @@ bool8 MovementAction_AcroWheelieHopFaceLeft_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroWheelieHopFaceRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, MOVE_SPEED_NORMAL, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceRight_Step1(objectEvent, sprite); } @@ -6989,7 +6989,7 @@ bool8 MovementAction_AcroWheelieHopFaceRight_Step1(struct ObjectEvent *objectEve bool8 MovementAction_AcroWheelieHopDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopDown_Step1(objectEvent, sprite); } @@ -7006,7 +7006,7 @@ bool8 MovementAction_AcroWheelieHopDown_Step1(struct ObjectEvent *objectEvent, s bool8 MovementAction_AcroWheelieHopUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopUp_Step1(objectEvent, sprite); } @@ -7023,7 +7023,7 @@ bool8 MovementAction_AcroWheelieHopUp_Step1(struct ObjectEvent *objectEvent, str bool8 MovementAction_AcroWheelieHopLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopLeft_Step1(objectEvent, sprite); } @@ -7040,7 +7040,7 @@ bool8 MovementAction_AcroWheelieHopLeft_Step1(struct ObjectEvent *objectEvent, s bool8 MovementAction_AcroWheelieHopRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopRight_Step1(objectEvent, sprite); } @@ -7057,7 +7057,7 @@ bool8 MovementAction_AcroWheelieHopRight_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpDown_Step1(objectEvent, sprite); } @@ -7074,7 +7074,7 @@ bool8 MovementAction_AcroWheelieJumpDown_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpUp_Step1(objectEvent, sprite); } @@ -7091,7 +7091,7 @@ bool8 MovementAction_AcroWheelieJumpUp_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_AcroWheelieJumpLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpLeft_Step1(objectEvent, sprite); } @@ -7108,7 +7108,7 @@ bool8 MovementAction_AcroWheelieJumpLeft_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpRight_Step1(objectEvent, sprite); } @@ -7156,7 +7156,7 @@ static void InitAcroPopWheelie(struct ObjectEvent *objectEvent, struct Sprite *s bool8 MovementAction_AcroPopWheelieMoveDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroPopWheelie(objectEvent, sprite, DIR_SOUTH, 1); + InitAcroPopWheelie(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1); return MovementAction_AcroPopWheelieMoveDown_Step1(objectEvent, sprite); } @@ -7172,7 +7172,7 @@ bool8 MovementAction_AcroPopWheelieMoveDown_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroPopWheelieMoveUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroPopWheelie(objectEvent, sprite, DIR_NORTH, 1); + InitAcroPopWheelie(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1); return MovementAction_AcroPopWheelieMoveUp_Step1(objectEvent, sprite); } @@ -7188,7 +7188,7 @@ bool8 MovementAction_AcroPopWheelieMoveUp_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroPopWheelieMoveLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroPopWheelie(objectEvent, sprite, DIR_WEST, 1); + InitAcroPopWheelie(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1); return MovementAction_AcroPopWheelieMoveLeft_Step1(objectEvent, sprite); } @@ -7204,7 +7204,7 @@ bool8 MovementAction_AcroPopWheelieMoveLeft_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroPopWheelieMoveRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroPopWheelie(objectEvent, sprite, DIR_EAST, 1); + InitAcroPopWheelie(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1); return MovementAction_AcroPopWheelieMoveRight_Step1(objectEvent, sprite); } @@ -7226,7 +7226,7 @@ static void InitAcroWheelieMove(struct ObjectEvent *objectEvent, struct Sprite * bool8 MovementAction_AcroWheelieMoveDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieMove(objectEvent, sprite, DIR_SOUTH, 1); + InitAcroWheelieMove(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1); return MovementAction_AcroWheelieMoveDown_Step1(objectEvent, sprite); } @@ -7242,7 +7242,7 @@ bool8 MovementAction_AcroWheelieMoveDown_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieMoveUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieMove(objectEvent, sprite, DIR_NORTH, 1); + InitAcroWheelieMove(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1); return MovementAction_AcroWheelieMoveUp_Step1(objectEvent, sprite); } @@ -7258,7 +7258,7 @@ bool8 MovementAction_AcroWheelieMoveUp_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_AcroWheelieMoveLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieMove(objectEvent, sprite, DIR_WEST, 1); + InitAcroWheelieMove(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1); return MovementAction_AcroWheelieMoveLeft_Step1(objectEvent, sprite); } @@ -7274,7 +7274,7 @@ bool8 MovementAction_AcroWheelieMoveLeft_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieMoveRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieMove(objectEvent, sprite, DIR_EAST, 1); + InitAcroWheelieMove(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1); return MovementAction_AcroWheelieMoveRight_Step1(objectEvent, sprite); } @@ -7297,7 +7297,7 @@ static void InitAcroEndWheelie(struct ObjectEvent *objectEvent, struct Sprite *s bool8 MovementAction_AcroEndWheelieMoveDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroEndWheelie(objectEvent, sprite, DIR_SOUTH, 1); + InitAcroEndWheelie(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1); return MovementAction_AcroEndWheelieMoveDown_Step1(objectEvent, sprite); } @@ -7313,7 +7313,7 @@ bool8 MovementAction_AcroEndWheelieMoveDown_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroEndWheelieMoveUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroEndWheelie(objectEvent, sprite, DIR_NORTH, 1); + InitAcroEndWheelie(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1); return MovementAction_AcroEndWheelieMoveUp_Step1(objectEvent, sprite); } @@ -7329,7 +7329,7 @@ bool8 MovementAction_AcroEndWheelieMoveUp_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroEndWheelieMoveLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroEndWheelie(objectEvent, sprite, DIR_WEST, 1); + InitAcroEndWheelie(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1); return MovementAction_AcroEndWheelieMoveLeft_Step1(objectEvent, sprite); } @@ -7345,7 +7345,7 @@ bool8 MovementAction_AcroEndWheelieMoveLeft_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroEndWheelieMoveRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroEndWheelie(objectEvent, sprite, DIR_EAST, 1); + InitAcroEndWheelie(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1); return MovementAction_AcroEndWheelieMoveRight_Step1(objectEvent, sprite); } From 680f5f44583ae69b0149ba01a5f74a73492ff6e7 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 23:00:37 +0800 Subject: [PATCH 131/417] Revert movement speed constants for jump movements --- src/event_object_movement.c | 82 ++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index ea57e124d4..6c84f0eba2 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -5595,7 +5595,7 @@ static bool8 DoJumpInPlaceAnim(struct ObjectEvent *objectEvent, struct Sprite *s bool8 MovementAction_Jump2Down_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 2, JUMP_TYPE_HIGH); return MovementAction_Jump2Down_Step1(objectEvent, sprite); } @@ -5612,7 +5612,7 @@ bool8 MovementAction_Jump2Down_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_Jump2Up_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, 2, JUMP_TYPE_HIGH); return MovementAction_Jump2Up_Step1(objectEvent, sprite); } @@ -5629,7 +5629,7 @@ bool8 MovementAction_Jump2Up_Step1(struct ObjectEvent *objectEvent, struct Sprit bool8 MovementAction_Jump2Left_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_WEST, 2, JUMP_TYPE_HIGH); return MovementAction_Jump2Left_Step1(objectEvent, sprite); } @@ -5646,7 +5646,7 @@ bool8 MovementAction_Jump2Left_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_Jump2Right_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_EAST, 2, JUMP_TYPE_HIGH); return MovementAction_Jump2Right_Step1(objectEvent, sprite); } @@ -6178,7 +6178,7 @@ bool8 MovementAction_WaitSpriteAnim(struct ObjectEvent *objectEvent, struct Spri static void InitJumpSpecial(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction) { - InitJump(objectEvent, sprite, direction, MOVE_SPEED_FAST_1, JUMP_TYPE_HIGH); + InitJump(objectEvent, sprite, direction, 1, JUMP_TYPE_HIGH); StartSpriteAnim(sprite, GetJumpSpecialDirectionAnimNum(direction)); } @@ -6290,7 +6290,7 @@ bool8 MovementAction_UnlockFacingDirection_Step0(struct ObjectEvent *objectEvent bool8 MovementAction_JumpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 1, JUMP_TYPE_NORMAL); return MovementAction_JumpDown_Step1(objectEvent, sprite); } @@ -6307,7 +6307,7 @@ bool8 MovementAction_JumpDown_Step1(struct ObjectEvent *objectEvent, struct Spri bool8 MovementAction_JumpUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, 1, JUMP_TYPE_NORMAL); return MovementAction_JumpUp_Step1(objectEvent, sprite); } @@ -6324,7 +6324,7 @@ bool8 MovementAction_JumpUp_Step1(struct ObjectEvent *objectEvent, struct Sprite bool8 MovementAction_JumpLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_WEST, 1, JUMP_TYPE_NORMAL); return MovementAction_JumpLeft_Step1(objectEvent, sprite); } @@ -6341,7 +6341,7 @@ bool8 MovementAction_JumpLeft_Step1(struct ObjectEvent *objectEvent, struct Spri bool8 MovementAction_JumpRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_EAST, 1, JUMP_TYPE_NORMAL); return MovementAction_JumpRight_Step1(objectEvent, sprite); } @@ -6358,7 +6358,7 @@ bool8 MovementAction_JumpRight_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_JumpInPlaceDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_NORMAL, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceDown_Step1(objectEvent, sprite); } @@ -6375,7 +6375,7 @@ bool8 MovementAction_JumpInPlaceDown_Step1(struct ObjectEvent *objectEvent, stru bool8 MovementAction_JumpInPlaceUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_NORMAL, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceUp_Step1(objectEvent, sprite); } @@ -6392,7 +6392,7 @@ bool8 MovementAction_JumpInPlaceUp_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_JumpInPlaceLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, MOVE_SPEED_NORMAL, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceLeft_Step1(objectEvent, sprite); } @@ -6409,7 +6409,7 @@ bool8 MovementAction_JumpInPlaceLeft_Step1(struct ObjectEvent *objectEvent, stru bool8 MovementAction_JumpInPlaceRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, MOVE_SPEED_NORMAL, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceRight_Step1(objectEvent, sprite); } @@ -6426,7 +6426,7 @@ bool8 MovementAction_JumpInPlaceRight_Step1(struct ObjectEvent *objectEvent, str bool8 MovementAction_JumpInPlaceDownUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_NORMAL, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceDownUp_Step1(objectEvent, sprite); } @@ -6443,7 +6443,7 @@ bool8 MovementAction_JumpInPlaceDownUp_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_JumpInPlaceUpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_NORMAL, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceUpDown_Step1(objectEvent, sprite); } @@ -6460,7 +6460,7 @@ bool8 MovementAction_JumpInPlaceUpDown_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_JumpInPlaceLeftRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, MOVE_SPEED_NORMAL, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceLeftRight_Step1(objectEvent, sprite); } @@ -6477,7 +6477,7 @@ bool8 MovementAction_JumpInPlaceLeftRight_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_JumpInPlaceRightLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, MOVE_SPEED_NORMAL, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceRightLeft_Step1(objectEvent, sprite); } @@ -6921,7 +6921,7 @@ static void InitAcroWheelieJump(struct ObjectEvent *objectEvent, struct Sprite * bool8 MovementAction_AcroWheelieHopFaceDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_NORMAL, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceDown_Step1(objectEvent, sprite); } @@ -6938,7 +6938,7 @@ bool8 MovementAction_AcroWheelieHopFaceDown_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroWheelieHopFaceUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_NORMAL, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceUp_Step1(objectEvent, sprite); } @@ -6955,7 +6955,7 @@ bool8 MovementAction_AcroWheelieHopFaceUp_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieHopFaceLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, MOVE_SPEED_NORMAL, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceLeft_Step1(objectEvent, sprite); } @@ -6972,7 +6972,7 @@ bool8 MovementAction_AcroWheelieHopFaceLeft_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroWheelieHopFaceRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, MOVE_SPEED_NORMAL, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceRight_Step1(objectEvent, sprite); } @@ -6989,7 +6989,7 @@ bool8 MovementAction_AcroWheelieHopFaceRight_Step1(struct ObjectEvent *objectEve bool8 MovementAction_AcroWheelieHopDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 1, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopDown_Step1(objectEvent, sprite); } @@ -7006,7 +7006,7 @@ bool8 MovementAction_AcroWheelieHopDown_Step1(struct ObjectEvent *objectEvent, s bool8 MovementAction_AcroWheelieHopUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 1, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopUp_Step1(objectEvent, sprite); } @@ -7023,7 +7023,7 @@ bool8 MovementAction_AcroWheelieHopUp_Step1(struct ObjectEvent *objectEvent, str bool8 MovementAction_AcroWheelieHopLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 1, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopLeft_Step1(objectEvent, sprite); } @@ -7040,7 +7040,7 @@ bool8 MovementAction_AcroWheelieHopLeft_Step1(struct ObjectEvent *objectEvent, s bool8 MovementAction_AcroWheelieHopRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 1, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopRight_Step1(objectEvent, sprite); } @@ -7057,7 +7057,7 @@ bool8 MovementAction_AcroWheelieHopRight_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 2, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpDown_Step1(objectEvent, sprite); } @@ -7074,7 +7074,7 @@ bool8 MovementAction_AcroWheelieJumpDown_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 2, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpUp_Step1(objectEvent, sprite); } @@ -7091,7 +7091,7 @@ bool8 MovementAction_AcroWheelieJumpUp_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_AcroWheelieJumpLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 2, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpLeft_Step1(objectEvent, sprite); } @@ -7108,7 +7108,7 @@ bool8 MovementAction_AcroWheelieJumpLeft_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 2, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpRight_Step1(objectEvent, sprite); } @@ -7156,7 +7156,7 @@ static void InitAcroPopWheelie(struct ObjectEvent *objectEvent, struct Sprite *s bool8 MovementAction_AcroPopWheelieMoveDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroPopWheelie(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1); + InitAcroPopWheelie(objectEvent, sprite, DIR_SOUTH, 1); return MovementAction_AcroPopWheelieMoveDown_Step1(objectEvent, sprite); } @@ -7172,7 +7172,7 @@ bool8 MovementAction_AcroPopWheelieMoveDown_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroPopWheelieMoveUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroPopWheelie(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1); + InitAcroPopWheelie(objectEvent, sprite, DIR_NORTH, 1); return MovementAction_AcroPopWheelieMoveUp_Step1(objectEvent, sprite); } @@ -7188,7 +7188,7 @@ bool8 MovementAction_AcroPopWheelieMoveUp_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroPopWheelieMoveLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroPopWheelie(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1); + InitAcroPopWheelie(objectEvent, sprite, DIR_WEST, 1); return MovementAction_AcroPopWheelieMoveLeft_Step1(objectEvent, sprite); } @@ -7204,7 +7204,7 @@ bool8 MovementAction_AcroPopWheelieMoveLeft_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroPopWheelieMoveRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroPopWheelie(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1); + InitAcroPopWheelie(objectEvent, sprite, DIR_EAST, 1); return MovementAction_AcroPopWheelieMoveRight_Step1(objectEvent, sprite); } @@ -7226,7 +7226,7 @@ static void InitAcroWheelieMove(struct ObjectEvent *objectEvent, struct Sprite * bool8 MovementAction_AcroWheelieMoveDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieMove(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1); + InitAcroWheelieMove(objectEvent, sprite, DIR_SOUTH, 1); return MovementAction_AcroWheelieMoveDown_Step1(objectEvent, sprite); } @@ -7242,7 +7242,7 @@ bool8 MovementAction_AcroWheelieMoveDown_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieMoveUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieMove(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1); + InitAcroWheelieMove(objectEvent, sprite, DIR_NORTH, 1); return MovementAction_AcroWheelieMoveUp_Step1(objectEvent, sprite); } @@ -7258,7 +7258,7 @@ bool8 MovementAction_AcroWheelieMoveUp_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_AcroWheelieMoveLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieMove(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1); + InitAcroWheelieMove(objectEvent, sprite, DIR_WEST, 1); return MovementAction_AcroWheelieMoveLeft_Step1(objectEvent, sprite); } @@ -7274,7 +7274,7 @@ bool8 MovementAction_AcroWheelieMoveLeft_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieMoveRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieMove(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1); + InitAcroWheelieMove(objectEvent, sprite, DIR_EAST, 1); return MovementAction_AcroWheelieMoveRight_Step1(objectEvent, sprite); } @@ -7297,7 +7297,7 @@ static void InitAcroEndWheelie(struct ObjectEvent *objectEvent, struct Sprite *s bool8 MovementAction_AcroEndWheelieMoveDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroEndWheelie(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FAST_1); + InitAcroEndWheelie(objectEvent, sprite, DIR_SOUTH, 1); return MovementAction_AcroEndWheelieMoveDown_Step1(objectEvent, sprite); } @@ -7313,7 +7313,7 @@ bool8 MovementAction_AcroEndWheelieMoveDown_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroEndWheelieMoveUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroEndWheelie(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FAST_1); + InitAcroEndWheelie(objectEvent, sprite, DIR_NORTH, 1); return MovementAction_AcroEndWheelieMoveUp_Step1(objectEvent, sprite); } @@ -7329,7 +7329,7 @@ bool8 MovementAction_AcroEndWheelieMoveUp_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroEndWheelieMoveLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroEndWheelie(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FAST_1); + InitAcroEndWheelie(objectEvent, sprite, DIR_WEST, 1); return MovementAction_AcroEndWheelieMoveLeft_Step1(objectEvent, sprite); } @@ -7345,7 +7345,7 @@ bool8 MovementAction_AcroEndWheelieMoveLeft_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroEndWheelieMoveRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroEndWheelie(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FAST_1); + InitAcroEndWheelie(objectEvent, sprite, DIR_EAST, 1); return MovementAction_AcroEndWheelieMoveRight_Step1(objectEvent, sprite); } From fca863244b9097c79dba14154eaeb3719c91bfbe Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 3 Nov 2021 23:07:05 +0800 Subject: [PATCH 132/417] Index sStepTimes and sNpcStepFuncTables --- src/event_object_movement.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 6c84f0eba2..5932008937 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -8349,15 +8349,19 @@ static const SpriteStepFunc sStep8Funcs[] = { }; static const SpriteStepFunc *const sNpcStepFuncTables[] = { - sStep1Funcs, - sStep2Funcs, - sStep3Funcs, - sStep4Funcs, - sStep8Funcs, + [MOVE_SPEED_NORMAL] = sStep1Funcs, + [MOVE_SPEED_FAST_1] = sStep2Funcs, + [MOVE_SPEED_FAST_2] = sStep3Funcs, + [MOVE_SPEED_FASTER] = sStep4Funcs, + [MOVE_SPEED_FASTEST] = sStep8Funcs, }; static const s16 sStepTimes[] = { - 16, 8, 6, 4, 2 + [MOVE_SPEED_NORMAL] = 16, + [MOVE_SPEED_FAST_1] = 8, + [MOVE_SPEED_FAST_2] = 6, + [MOVE_SPEED_FASTER] = 4, + [MOVE_SPEED_FASTEST] = 2, }; static bool8 NpcTakeStep(struct Sprite *sprite) From 9a0618afc3f7ccf8a5d19ee5815fd388003d4a95 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 3 Nov 2021 15:29:18 -0400 Subject: [PATCH 133/417] Add COPYWIN constants --- gflib/text.c | 12 ++--- gflib/window.c | 18 +++---- gflib/window.h | 19 +++---- include/menu.h | 2 +- src/apprentice.c | 2 +- src/battle_dome.c | 22 ++++---- src/battle_factory_screen.c | 60 +++++++++++----------- src/battle_message.c | 2 +- src/battle_records.c | 4 +- src/battle_script_commands.c | 12 ++--- src/berry_blender.c | 16 +++--- src/berry_crush.c | 12 ++--- src/berry_fix_program.c | 8 +-- src/braille.c | 2 +- src/cable_club.c | 6 +-- src/contest.c | 4 +- src/contest_painting.c | 2 +- src/credits.c | 6 +-- src/daycare.c | 2 +- src/diploma.c | 2 +- src/dodrio_berry_picking.c | 30 +++++------ src/easy_chat.c | 12 ++--- src/egg_hatch.c | 2 +- src/field_region_map.c | 2 +- src/field_specials.c | 20 +++----- src/frontier_pass.c | 8 +-- src/frontier_util.c | 20 ++++---- src/hall_of_fame.c | 16 +++--- src/item_menu.c | 8 +-- src/link.c | 8 +-- src/list_menu.c | 14 ++--- src/mail.c | 4 +- src/main_menu.c | 40 +++++++-------- src/map_name_popup.c | 2 +- src/match_call.c | 4 +- src/mauville_old_man.c | 4 +- src/menu.c | 55 ++++++++++---------- src/menu_specialized.c | 6 +-- src/money.c | 4 +- src/move_relearner.c | 2 +- src/mystery_event_menu.c | 4 +- src/mystery_gift_menu.c | 20 ++++---- src/mystery_gift_view.c | 6 +-- src/naming_screen.c | 6 +-- src/option_menu.c | 10 ++-- src/party_menu.c | 14 ++--- src/player_pc.c | 2 +- src/pokeblock.c | 2 +- src/pokedex.c | 50 +++++++++--------- src/pokedex_cry_screen.c | 2 +- src/pokemon_jump.c | 24 ++++----- src/pokemon_storage_system.c | 12 ++--- src/pokemon_summary_screen.c | 2 +- src/pokenav_conditions_2.c | 12 ++--- src/pokenav_conditions_3.c | 4 +- src/pokenav_main_menu.c | 2 +- src/pokenav_match_call_2.c | 12 ++--- src/pokenav_match_call_ui.c | 22 ++++---- src/pokenav_menu_handler_2.c | 2 +- src/pokenav_region_map.c | 8 +-- src/pokenav_ribbons_1.c | 4 +- src/pokenav_ribbons_2.c | 8 +-- src/record_mixing.c | 2 +- src/region_map.c | 2 +- src/reset_rtc_screen.c | 4 +- src/roulette.c | 28 +++++----- src/save_failed_screen.c | 4 +- src/scrcmd.c | 2 +- src/script_menu.c | 8 +-- src/shop.c | 2 +- src/slot_machine.c | 12 ++--- src/start_menu.c | 12 ++--- src/trade.c | 22 ++++---- src/trainer_card.c | 4 +- src/trainer_hill.c | 2 +- src/union_room.c | 20 ++++---- src/union_room_battle.c | 2 +- src/union_room_chat.c | 46 ++++++++--------- src/use_pokeblock.c | 18 +++---- src/wireless_communication_status_screen.c | 6 +-- 80 files changed, 444 insertions(+), 454 deletions(-) diff --git a/gflib/text.c b/gflib/text.c index 54155affed..9d1a5464f6 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -297,7 +297,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi } if (speed != TEXT_SPEED_FF) - CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, 2); + CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, COPYWIN_GFX); gTextPrinters[printerTemplate->windowId].active = 0; } gDisableTextPrinters = 0; @@ -318,7 +318,7 @@ void RunTextPrinters(void) switch (temp) { case 0: - CopyWindowToVram(gTextPrinters[i].printerTemplate.windowId, 2); + CopyWindowToVram(gTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX); case 3: if (gTextPrinters[i].callback != 0) gTextPrinters[i].callback(&gTextPrinters[i].printerTemplate, temp); @@ -815,7 +815,7 @@ void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentY, 8, 16); - CopyWindowToVram(textPrinter->printerTemplate.windowId, 2); + CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX); subStruct->downArrowDelay = 8; subStruct->downArrowYPosIdx++; @@ -832,7 +832,7 @@ void TextPrinterClearDownArrow(struct TextPrinter *textPrinter) textPrinter->printerTemplate.currentY, 8, 16); - CopyWindowToVram(textPrinter->printerTemplate.windowId, 2); + CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX); } bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter) @@ -922,7 +922,7 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c y - 2, 0x8, 0x10); - CopyWindowToVram(windowId, 0x2); + CopyWindowToVram(windowId, COPYWIN_GFX); *counter = 8; ++*yCoordIndex; } @@ -1199,7 +1199,7 @@ u16 RenderText(struct TextPrinter *textPrinter) ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance -= speed; } - CopyWindowToVram(textPrinter->printerTemplate.windowId, 2); + CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX); } else { diff --git a/gflib/window.c b/gflib/window.c index c7b8c8917b..8ca1a4b628 100644 --- a/gflib/window.c +++ b/gflib/window.c @@ -275,13 +275,13 @@ void CopyWindowToVram(u8 windowId, u8 mode) switch (mode) { - case 1: + case COPYWIN_MAP: CopyBgTilemapBufferToVram(windowLocal.window.bg); break; - case 2: + case COPYWIN_GFX: LoadBgTiles(windowLocal.window.bg, windowLocal.tileData, windowSize, windowLocal.window.baseBlock); break; - case 3: + case COPYWIN_FULL: LoadBgTiles(windowLocal.window.bg, windowLocal.tileData, windowSize, windowLocal.window.baseBlock); CopyBgTilemapBufferToVram(windowLocal.window.bg); break; @@ -307,13 +307,13 @@ void CopyWindowRectToVram(u32 windowId, u32 mode, u32 x, u32 y, u32 w, u32 h) switch (mode) { - case 1: + case COPYWIN_MAP: CopyBgTilemapBufferToVram(windowLocal.window.bg); break; - case 2: + case COPYWIN_GFX: LoadBgTiles(windowLocal.window.bg, windowLocal.tileData + (rectPos * 32), rectSize, windowLocal.window.baseBlock + rectPos); break; - case 3: + case COPYWIN_FULL: LoadBgTiles(windowLocal.window.bg, windowLocal.tileData + (rectPos * 32), rectSize, windowLocal.window.baseBlock + rectPos); CopyBgTilemapBufferToVram(windowLocal.window.bg); break; @@ -693,13 +693,13 @@ void CopyWindowToVram8Bit(u8 windowId, u8 mode) switch (mode) { - case 1: + case COPYWIN_MAP: CopyBgTilemapBufferToVram(sWindowPtr->window.bg); break; - case 2: + case COPYWIN_GFX: LoadBgTiles(sWindowPtr->window.bg, sWindowPtr->tileData, sWindowSize, sWindowPtr->window.baseBlock); break; - case 3: + case COPYWIN_FULL: LoadBgTiles(sWindowPtr->window.bg, sWindowPtr->tileData, sWindowSize, sWindowPtr->window.baseBlock); CopyBgTilemapBufferToVram(sWindowPtr->window.bg); break; diff --git a/gflib/window.h b/gflib/window.h index 3eac75a280..6cb98c8456 100644 --- a/gflib/window.h +++ b/gflib/window.h @@ -3,8 +3,7 @@ #define PIXEL_FILL(num) ((num) | ((num) << 4)) -enum -{ +enum { WINDOW_BG, WINDOW_TILEMAP_LEFT, WINDOW_TILEMAP_TOP, @@ -15,6 +14,14 @@ enum WINDOW_TILE_DATA }; +// Mode for CopyWindowToVram, CopyWindowRectToVram and CopyWindowToVram8Bit +enum { + COPYWIN_NONE, + COPYWIN_MAP, + COPYWIN_GFX, + COPYWIN_FULL, +}; + struct WindowTemplate { u8 bg; @@ -28,13 +35,7 @@ struct WindowTemplate #define DUMMY_WIN_TEMPLATE \ { \ - 0xFF, \ - 0, \ - 0, \ - 0, \ - 0, \ - 0, \ - 0, \ + .bg = 0xFF, \ } #define WINDOW_NONE 0xFF diff --git a/include/menu.h b/include/menu.h index eb391e5654..cc65a51dca 100644 --- a/include/menu.h +++ b/include/menu.h @@ -123,7 +123,7 @@ void sub_8198314(void); void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram); void ResetBgPositions(void); void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed); -void sub_8198C78(void); +void EraseYesNoWindow(void); void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs); void Menu_LoadStdPal(void); diff --git a/src/apprentice.c b/src/apprentice.c index 032b76715c..8421d4d8b2 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -691,7 +691,7 @@ static u8 CreateAndShowWindow(u8 left, u8 top, u8 width, u8 height) windowId = AddWindow(&winTemplate); PutWindowTilemap(windowId); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); return windowId; } diff --git a/src/battle_dome.c b/src/battle_dome.c index 429cc58d7e..0075e84d6a 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -3428,7 +3428,7 @@ static void Task_HandleInfoCardInput(u8 taskId) for (i = windowId; i < windowId + 9; i++) { - CopyWindowToVram(i, 2); + CopyWindowToVram(i, COPYWIN_GFX); FillWindowPixelBuffer(i, PIXEL_FILL(0)); } gTasks[taskId].tState = STATE_REACT_INPUT; @@ -4358,7 +4358,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) textPrinter.currentChar = gStringVar1; textPrinter.windowId = windowId; PutWindowTilemap(windowId); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); textPrinter.letterSpacing = 0; @@ -4380,12 +4380,12 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId) textPrinter.currentX = 0; PutWindowTilemap(1 + i + windowId); - CopyWindowToVram(1 + i + windowId, 3); + CopyWindowToVram(1 + i + windowId, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); } PutWindowTilemap(windowId + 4); - CopyWindowToVram(windowId + 4, 3); + CopyWindowToVram(windowId + 4, COPYWIN_FULL); // Print text about trainers potential in the tourney if (trainerId == TRAINER_FRONTIER_BRAIN) @@ -4861,7 +4861,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) textPrinter.windowId = windowId + 8; textPrinter.fontId = FONT_NORMAL; PutWindowTilemap(windowId + 8); - CopyWindowToVram(windowId + 8, 3); + CopyWindowToVram(windowId + 8, COPYWIN_FULL); textPrinter.currentX = 0; textPrinter.currentY = textPrinter.y = 0; AddTextPrinter(&textPrinter, 0, NULL); @@ -4881,7 +4881,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0x40, textPrinter.letterSpacing); textPrinter.currentY = textPrinter.y = 2; PutWindowTilemap(windowId + 6); - CopyWindowToVram(windowId + 6, 3); + CopyWindowToVram(windowId + 6, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); // Print right trainer's name. @@ -4897,7 +4897,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0x40, textPrinter.letterSpacing); textPrinter.currentY = textPrinter.y = 2; PutWindowTilemap(windowId + 7); - CopyWindowToVram(windowId + 7, 3); + CopyWindowToVram(windowId + 7, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); // Print match number. @@ -4907,7 +4907,7 @@ static void DisplayMatchInfoOnCard(u8 flags, u8 matchNo) textPrinter.currentX = GetStringCenterAlignXOffsetWithLetterSpacing(textPrinter.fontId, textPrinter.currentChar, 0xA0, textPrinter.letterSpacing); textPrinter.currentY = textPrinter.y = 2; PutWindowTilemap(windowId + 5); - CopyWindowToVram(windowId + 5, 3); + CopyWindowToVram(windowId + 5, COPYWIN_FULL); AddTextPrinter(&textPrinter, 0, NULL); } @@ -5442,9 +5442,9 @@ static void Task_ShowTourneyTree(u8 taskId) PutWindowTilemap(0); PutWindowTilemap(1); PutWindowTilemap(2); - CopyWindowToVram(0, 3); - CopyWindowToVram(1, 3); - CopyWindowToVram(2, 3); + CopyWindowToVram(0, COPYWIN_FULL); + CopyWindowToVram(1, COPYWIN_FULL); + CopyWindowToVram(2, COPYWIN_FULL); SetHBlankCallback(HblankCb_TourneyTree); SetVBlankCallback(VblankCb_TourneyTree); if (r4 == 2) diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index cd0a44e38a..98caada1d9 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -1854,7 +1854,7 @@ static void Select_ErasePopupMenu(u8 windowId) gSprites[sFactorySelectScreen->menuCursor1SpriteId].invisible = TRUE; gSprites[sFactorySelectScreen->menuCursor2SpriteId].invisible = TRUE; FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); ClearWindowTilemap(windowId); } @@ -1862,7 +1862,7 @@ static void Select_PrintRentalPkmnString(void) { FillWindowPixelBuffer(SELECT_WIN_TITLE, PIXEL_FILL(0)); AddTextPrinterParameterized(SELECT_WIN_TITLE, FONT_NORMAL, gText_RentalPkmn2, 2, 1, 0, NULL); - CopyWindowToVram(SELECT_WIN_TITLE, 3); + CopyWindowToVram(SELECT_WIN_TITLE, COPYWIN_FULL); } static void Select_PrintMonSpecies(void) @@ -1876,7 +1876,7 @@ static void Select_PrintMonSpecies(void) StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86); AddTextPrinterParameterized3(SELECT_WIN_SPECIES, FONT_NORMAL, x, 1, sSpeciesNameTextColors, 0, gStringVar4); - CopyWindowToVram(SELECT_WIN_SPECIES, 2); + CopyWindowToVram(SELECT_WIN_SPECIES, COPYWIN_GFX); } static void Select_PrintSelectMonString(void) @@ -1894,14 +1894,14 @@ static void Select_PrintSelectMonString(void) str = gText_TheseThreePkmnOkay; AddTextPrinterParameterized(SELECT_WIN_INFO, FONT_NORMAL, str, 2, 5, 0, NULL); - CopyWindowToVram(SELECT_WIN_INFO, 2); + CopyWindowToVram(SELECT_WIN_INFO, COPYWIN_GFX); } static void Select_PrintCantSelectSameMon(void) { FillWindowPixelBuffer(SELECT_WIN_INFO, PIXEL_FILL(0)); AddTextPrinterParameterized(SELECT_WIN_INFO, FONT_NORMAL, gText_CantSelectSamePkmn, 2, 5, 0, NULL); - CopyWindowToVram(SELECT_WIN_INFO, 2); + CopyWindowToVram(SELECT_WIN_INFO, COPYWIN_GFX); } static void Select_PrintMenuOptions(void) @@ -1917,7 +1917,7 @@ static void Select_PrintMenuOptions(void) AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 17, sMenuOptionTextColors, 0, gText_Rent); AddTextPrinterParameterized3(SELECT_WIN_OPTIONS, FONT_NORMAL, 7, 33, sMenuOptionTextColors, 0, gText_Others2); - CopyWindowToVram(SELECT_WIN_OPTIONS, 3); + CopyWindowToVram(SELECT_WIN_OPTIONS, COPYWIN_FULL); } static void Select_PrintYesNoOptions(void) @@ -1926,7 +1926,7 @@ static void Select_PrintYesNoOptions(void) FillWindowPixelBuffer(SELECT_WIN_YES_NO, PIXEL_FILL(0)); AddTextPrinterParameterized3(SELECT_WIN_YES_NO, FONT_NORMAL, 7, 1, sMenuOptionTextColors, 0, gText_Yes2); AddTextPrinterParameterized3(SELECT_WIN_YES_NO, FONT_NORMAL, 7, 17, sMenuOptionTextColors, 0, gText_No2); - CopyWindowToVram(SELECT_WIN_YES_NO, 3); + CopyWindowToVram(SELECT_WIN_YES_NO, COPYWIN_FULL); } static u8 Select_RunMenuOptionFunc(void) @@ -1996,7 +1996,7 @@ static void Select_PrintMonCategory(void) CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text); x = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x76); AddTextPrinterParameterized(SELECT_WIN_MON_CATEGORY, FONT_NORMAL, text, x, 1, 0, NULL); - CopyWindowToVram(SELECT_WIN_MON_CATEGORY, 2); + CopyWindowToVram(SELECT_WIN_MON_CATEGORY, COPYWIN_GFX); } } @@ -3012,7 +3012,7 @@ static void Swap_Task_ScreenInfoTransitionOut(u8 taskId) if (!gPaletteFade.active) { FillWindowPixelBuffer(SWAP_WIN_ACTION_FADE, PIXEL_FILL(0)); - CopyWindowToVram(SWAP_WIN_ACTION_FADE, 2); + CopyWindowToVram(SWAP_WIN_ACTION_FADE, COPYWIN_GFX); if (sFactorySwapScreen->inEnemyScreen == TRUE) { // Start "Pkmn for Swap" button slide offscreen @@ -3150,7 +3150,7 @@ static void Swap_Task_ScreenInfoTransitionIn(u8 taskId) break; case 6: FillWindowPixelBuffer(SWAP_WIN_ACTION_FADE, PIXEL_FILL(0)); - CopyWindowToVram(SWAP_WIN_ACTION_FADE, 2); + CopyWindowToVram(SWAP_WIN_ACTION_FADE, COPYWIN_GFX); gTasks[taskId].tState++; break; case 7: @@ -3724,7 +3724,7 @@ static void Swap_ErasePopupMenu(u8 windowId) gSprites[sFactorySwapScreen->menuCursor1SpriteId].invisible = TRUE; gSprites[sFactorySwapScreen->menuCursor2SpriteId].invisible = TRUE; FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); ClearWindowTilemap(windowId); } @@ -3732,14 +3732,14 @@ static void Swap_EraseSpeciesWindow(void) { PutWindowTilemap(SWAP_WIN_SPECIES); FillWindowPixelBuffer(SWAP_WIN_SPECIES, PIXEL_FILL(0)); - CopyWindowToVram(SWAP_WIN_SPECIES, 2); + CopyWindowToVram(SWAP_WIN_SPECIES, COPYWIN_GFX); } static void Swap_EraseSpeciesAtFadeWindow(void) { PutWindowTilemap(SWAP_WIN_SPECIES_AT_FADE); FillWindowPixelBuffer(SWAP_WIN_SPECIES_AT_FADE, PIXEL_FILL(0)); - CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, 2); + CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, COPYWIN_GFX); } static void Swap_EraseActionFadeWindow(void) @@ -3747,14 +3747,14 @@ static void Swap_EraseActionFadeWindow(void) Swap_EraseSpeciesWindow(); PutWindowTilemap(SWAP_WIN_ACTION_FADE); FillWindowPixelBuffer(SWAP_WIN_ACTION_FADE, PIXEL_FILL(0)); - CopyWindowToVram(SWAP_WIN_ACTION_FADE, 2); + CopyWindowToVram(SWAP_WIN_ACTION_FADE, COPYWIN_GFX); } static void Swap_PrintPkmnSwap(void) { FillWindowPixelBuffer(SWAP_WIN_TITLE, PIXEL_FILL(1)); AddTextPrinterParameterized(SWAP_WIN_TITLE, FONT_NORMAL, gText_PkmnSwap, 2, 1, 0, NULL); - CopyWindowToVram(SWAP_WIN_TITLE, 3); + CopyWindowToVram(SWAP_WIN_TITLE, COPYWIN_FULL); } static void Swap_PrintMonSpecies(void) @@ -3765,7 +3765,7 @@ static void Swap_PrintMonSpecies(void) FillWindowPixelBuffer(SWAP_WIN_SPECIES, PIXEL_FILL(0)); if (sFactorySwapScreen->cursorPos >= FRONTIER_PARTY_SIZE) { - CopyWindowToVram(SWAP_WIN_SPECIES, 2); + CopyWindowToVram(SWAP_WIN_SPECIES, COPYWIN_GFX); } else { @@ -3777,7 +3777,7 @@ static void Swap_PrintMonSpecies(void) StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86); AddTextPrinterParameterized3(SWAP_WIN_SPECIES, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); - CopyWindowToVram(SWAP_WIN_SPECIES, 3); + CopyWindowToVram(SWAP_WIN_SPECIES, COPYWIN_FULL); } } @@ -3785,7 +3785,7 @@ static void Swap_PrintOnInfoWindow(const u8 *str) { FillWindowPixelBuffer(SWAP_WIN_INFO, PIXEL_FILL(0)); AddTextPrinterParameterized(SWAP_WIN_INFO, FONT_NORMAL, str, 2, 5, 0, NULL); - CopyWindowToVram(SWAP_WIN_INFO, 2); + CopyWindowToVram(SWAP_WIN_INFO, COPYWIN_GFX); } static void Swap_PrintMenuOptions(void) @@ -3795,7 +3795,7 @@ static void Swap_PrintMenuOptions(void) AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 1, sSwapMenuOptionsTextColors, 0, gText_Summary2); AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 17, sSwapMenuOptionsTextColors, 0, gText_Swap); AddTextPrinterParameterized3(SWAP_WIN_OPTIONS, FONT_NORMAL, 15, 33, sSwapMenuOptionsTextColors, 0, gText_Rechoose); - CopyWindowToVram(SWAP_WIN_OPTIONS, 3); + CopyWindowToVram(SWAP_WIN_OPTIONS, COPYWIN_FULL); } static void Swap_PrintYesNoOptions(void) @@ -3804,7 +3804,7 @@ static void Swap_PrintYesNoOptions(void) FillWindowPixelBuffer(SWAP_WIN_YES_NO, PIXEL_FILL(0)); AddTextPrinterParameterized3(SWAP_WIN_YES_NO, FONT_NORMAL, 7, 1, sSwapMenuOptionsTextColors, 0, gText_Yes3); AddTextPrinterParameterized3(SWAP_WIN_YES_NO, FONT_NORMAL, 7, 17, sSwapMenuOptionsTextColors, 0, gText_No3); - CopyWindowToVram(SWAP_WIN_YES_NO, 3); + CopyWindowToVram(SWAP_WIN_YES_NO, COPYWIN_FULL); } static void Swap_PrintActionString(const u8 *str, u32 y, u32 windowId) @@ -3824,7 +3824,7 @@ static void Swap_PrintActionStrings(void) Swap_PrintActionString(gText_Cancel3, 24, SWAP_WIN_ACTION_FADE); break; } - CopyWindowToVram(SWAP_WIN_ACTION_FADE, 3); + CopyWindowToVram(SWAP_WIN_ACTION_FADE, COPYWIN_FULL); } static void Swap_PrintActionStrings2(void) @@ -3838,7 +3838,7 @@ static void Swap_PrintActionStrings2(void) Swap_PrintActionString(gText_Cancel3, 32, SWAP_WIN_OPTIONS); break; } - CopyWindowToVram(SWAP_WIN_OPTIONS, 3); + CopyWindowToVram(SWAP_WIN_OPTIONS, COPYWIN_FULL); } static void Swap_PrintOneActionString(u8 which) @@ -3853,7 +3853,7 @@ static void Swap_PrintOneActionString(u8 which) Swap_PrintActionString(gText_Cancel3, 32, SWAP_WIN_OPTIONS); break; } - CopyWindowToVram(SWAP_WIN_OPTIONS, 3); + CopyWindowToVram(SWAP_WIN_OPTIONS, COPYWIN_FULL); } // For printing the species name once its selected. Keep the current fade but don't keep fading in and out @@ -3874,7 +3874,7 @@ static void Swap_PrintMonSpeciesAtFade(void) FillWindowPixelBuffer(SWAP_WIN_SPECIES_AT_FADE, PIXEL_FILL(0)); if (sFactorySwapScreen->cursorPos >= FRONTIER_PARTY_SIZE) { - CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, 3); + CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, COPYWIN_FULL); } else { @@ -3886,7 +3886,7 @@ static void Swap_PrintMonSpeciesAtFade(void) StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86); AddTextPrinterParameterized3(SWAP_WIN_SPECIES_AT_FADE, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); - CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, 3); + CopyWindowToVram(SWAP_WIN_SPECIES_AT_FADE, COPYWIN_FULL); } } @@ -3901,7 +3901,7 @@ static void Swap_PrintMonSpeciesForTransition(void) if (sFactorySwapScreen->cursorPos >= FRONTIER_PARTY_SIZE) { - CopyWindowToVram(SWAP_WIN_SPECIES, 2); + CopyWindowToVram(SWAP_WIN_SPECIES, COPYWIN_GFX); } else { @@ -3913,7 +3913,7 @@ static void Swap_PrintMonSpeciesForTransition(void) StringCopy(gStringVar4, gSpeciesNames[species]); x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 86); AddTextPrinterParameterized3(SWAP_WIN_SPECIES, FONT_NORMAL, x, 1, sSwapSpeciesNameTextColors, 0, gStringVar4); - CopyWindowToVram(SWAP_WIN_SPECIES, 3); + CopyWindowToVram(SWAP_WIN_SPECIES, COPYWIN_FULL); } } @@ -3927,7 +3927,7 @@ static void Swap_PrintMonCategory(void) FillWindowPixelBuffer(SWAP_WIN_MON_CATEGORY, PIXEL_FILL(0)); if (monId >= FRONTIER_PARTY_SIZE) { - CopyWindowToVram(SWAP_WIN_MON_CATEGORY, 2); + CopyWindowToVram(SWAP_WIN_MON_CATEGORY, COPYWIN_GFX); } else { @@ -3939,7 +3939,7 @@ static void Swap_PrintMonCategory(void) CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text); x = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x76); AddTextPrinterParameterized(SWAP_WIN_MON_CATEGORY, FONT_NORMAL, text, x, 1, 0, NULL); - CopyWindowToVram(SWAP_WIN_MON_CATEGORY, 2); + CopyWindowToVram(SWAP_WIN_MON_CATEGORY, COPYWIN_GFX); } } @@ -4126,7 +4126,7 @@ static void Swap_TaskCantHaveSameMons(u8 taskId) if (sFactorySwapScreen->monPicAnimating != TRUE) { FillWindowPixelBuffer(SWAP_WIN_ACTION_FADE, PIXEL_FILL(0)); - CopyWindowToVram(SWAP_WIN_ACTION_FADE, 2); + CopyWindowToVram(SWAP_WIN_ACTION_FADE, COPYWIN_GFX); gTasks[taskId].tState++; } break; diff --git a/src/battle_message.c b/src/battle_message.c index 31f256e3c6..b88eedfb37 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -3113,7 +3113,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId) if (copyToVram) { PutWindowTilemap(windowId); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } } diff --git a/src/battle_records.c b/src/battle_records.c index 5c8c92d847..850feef59e 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -334,7 +334,7 @@ void ShowLinkBattleRecords(void) } PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } void RemoveRecordsWindow(void) @@ -382,7 +382,7 @@ static void RemoveTrainerHillRecordsWindow(u8 windowId) { FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); ClearWindowTilemap(windowId); - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); RemoveWindow(windowId); } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 92e5b31e9e..c3263099f2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5921,7 +5921,7 @@ static void Cmd_drawlvlupbox(void) // Draw page 1 of level up box DrawLevelUpWindow1(); PutWindowTilemap(B_WIN_LEVEL_UP_BOX); - CopyWindowToVram(B_WIN_LEVEL_UP_BOX, 3); + CopyWindowToVram(B_WIN_LEVEL_UP_BOX, COPYWIN_FULL); gBattleScripting.drawlvlupboxState++; break; case 5: @@ -5939,7 +5939,7 @@ static void Cmd_drawlvlupbox(void) // Draw page 2 of level up box PlaySE(SE_SELECT); DrawLevelUpWindow2(); - CopyWindowToVram(B_WIN_LEVEL_UP_BOX, 2); + CopyWindowToVram(B_WIN_LEVEL_UP_BOX, COPYWIN_GFX); gBattleScripting.drawlvlupboxState++; } break; @@ -5956,10 +5956,10 @@ static void Cmd_drawlvlupbox(void) if (!SlideOutLevelUpBanner()) { ClearWindowTilemap(B_WIN_LEVEL_UP_BANNER); - CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, 1); + CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, COPYWIN_MAP); ClearWindowTilemap(B_WIN_LEVEL_UP_BOX); - CopyWindowToVram(B_WIN_LEVEL_UP_BOX, 1); + CopyWindowToVram(B_WIN_LEVEL_UP_BOX, COPYWIN_MAP); SetBgAttribute(2, BG_ATTR_PRIORITY, 2); ShowBg(2); @@ -6004,7 +6004,7 @@ static void InitLevelUpBanner(void) LoadPalette(sLevelUpBanner_Pal, 0x60, 0x20); CopyToWindowPixelBuffer(B_WIN_LEVEL_UP_BANNER, sLevelUpBanner_Gfx, 0, 0); PutWindowTilemap(B_WIN_LEVEL_UP_BANNER); - CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, 3); + CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, COPYWIN_FULL); PutMonIconOnLvlUpBanner(); } @@ -6085,7 +6085,7 @@ static void DrawLevelUpBannerText(void) printerTemplate.currentY = 10; AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL); - CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, 2); + CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, COPYWIN_GFX); } static bool8 SlideOutLevelUpBanner(void) diff --git a/src/berry_blender.c b/src/berry_blender.c index 65008dae07..6603f91fb1 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -1616,7 +1616,7 @@ static void PrintPlayerNames(void) Blender_AddTextPrinter(i, text, xPos, 1, 0, 1); PutWindowTilemap(i); - CopyWindowToVram(i, 3); + CopyWindowToVram(i, COPYWIN_FULL); } } } @@ -2684,7 +2684,7 @@ static void CB2_EndBlenderGame(void) if (sBerryBlender->arrowIdToPlayerId[i] != NO_PLAYER) { PutWindowTilemap(i); - CopyWindowToVram(i, 3); + CopyWindowToVram(i, COPYWIN_FULL); } } break; @@ -2696,7 +2696,7 @@ static void CB2_EndBlenderGame(void) if (sBerryBlender->arrowIdToPlayerId[i] != NO_PLAYER) { PutWindowTilemap(i); - CopyWindowToVram(i, 3); + CopyWindowToVram(i, COPYWIN_FULL); } } break; @@ -3545,7 +3545,7 @@ static bool8 PrintBlendingResults(void) sBerryBlender->framesToWait = 0; sBerryBlender->mainState++; - CopyWindowToVram(5, 2); + CopyWindowToVram(5, COPYWIN_GFX); } break; case 4: @@ -3562,7 +3562,7 @@ static bool8 PrintBlendingResults(void) if (sBerryBlender->arrowIdToPlayerId[i] != NO_PLAYER) { PutWindowTilemap(i); - CopyWindowToVram(i, 3); + CopyWindowToVram(i, COPYWIN_FULL); } } @@ -3731,7 +3731,7 @@ static bool8 PrintBlendingRanking(void) } PutWindowTilemap(5); - CopyWindowToVram(5, 3); + CopyWindowToVram(5, COPYWIN_FULL); sBerryBlender->framesToWait = 0; sBerryBlender->mainState++; @@ -3788,7 +3788,7 @@ void ShowBerryBlenderRecordWindow(void) } PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } static void Task_PlayPokeblockFanfare(u8 taskId) @@ -3890,7 +3890,7 @@ static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed) DrawDialogFrameWithCustomTileAndPalette(4, FALSE, 0x14, 0xF); Blender_AddTextPrinter(4, string, 0, 1, textSpeed, 0); PutWindowTilemap(4); - CopyWindowToVram(4, 3); + CopyWindowToVram(4, COPYWIN_FULL); (*textState)++; break; case 1: diff --git a/src/berry_crush.c b/src/berry_crush.c index 8ac6bb3123..10f7987e05 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1778,7 +1778,7 @@ static bool32 OpenResultsWindow(struct BerryCrushGame *game, struct BerryCrushGa PrintCrushingResults(game); break; case 5: - CopyWindowToVram(gfx->resultsWindowId, 3); + CopyWindowToVram(gfx->resultsWindowId, COPYWIN_FULL); gfx->resultsState = 0; return TRUE; } @@ -1841,7 +1841,7 @@ static void Task_ShowRankings(u8 taskId) yPos += 16; score = 0; } - CopyWindowToVram(tWindowId, 3); + CopyWindowToVram(tWindowId, COPYWIN_FULL); break; case 2: if (JOY_NEW(A_BUTTON | B_BUTTON)) @@ -1938,7 +1938,7 @@ static void DrawPlayerNameWindows(struct BerryCrushGame *game) game->players[i].name ); } - CopyWindowToVram(game->gfx.nameWindowIds[i], 3); + CopyWindowToVram(game->gfx.nameWindowIds[i], COPYWIN_FULL); } CopyBgTilemapBufferToVram(0); } @@ -2264,7 +2264,7 @@ static u32 Cmd_PrintMessage(struct BerryCrushGame *game, u8 *args) { AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[args[0]], game->textSpeed, 0, 2, 1, 3); } - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); break; case 1: if (!IsTextPrinterActive(0)) @@ -3243,7 +3243,7 @@ static u32 Cmd_SaveGame(struct BerryCrushGame *game, u8 *args) return 0; DrawDialogueFrame(0, 0); AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 0, 2, 1, 3); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); CreateTask(Task_LinkSave, 0); break; case 3: @@ -3394,7 +3394,7 @@ static u32 Cmd_StopGame(struct BerryCrushGame *game, u8 *args) AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[MSG_NO_BERRIES], game->textSpeed, 0, 2, 1, 3); else AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[MSG_DROPPED], game->textSpeed, 0, 2, 1, 3); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); break; case 1: if (IsTextPrinterActive(0)) diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 9b0da5bd2e..3a0e4c3261 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -319,9 +319,9 @@ static void BerryFix_GpuSet(void) left = (208 - width) / 2; AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SPEED_FF, sText_BerryProgramUpdate); - CopyWindowToVram(2, 2); - CopyWindowToVram(3, 2); - CopyWindowToVram(0, 2); + CopyWindowToVram(2, COPYWIN_GFX); + CopyWindowToVram(3, COPYWIN_GFX); + CopyWindowToVram(0, COPYWIN_GFX); } static int BerryFix_TrySetScene(int scene) @@ -348,7 +348,7 @@ static void BerryFix_SetScene(int scene) FillWindowPixelBuffer(1, PIXEL_FILL(10)); AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, -1, sBerryProgramTexts[scene]); PutWindowTilemap(1); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); switch (scene) { case SCENE_ENSURE_CONNECT: diff --git a/src/braille.c b/src/braille.c index 4e22a12efe..e9c2ddc400 100644 --- a/src/braille.c +++ b/src/braille.c @@ -177,7 +177,7 @@ u16 FontFunc_Braille(struct TextPrinter *textPrinter) ScrollWindow(textPrinter->printerTemplate.windowId, 0, sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->scrollDistance -= sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed]; } - CopyWindowToVram(textPrinter->printerTemplate.windowId, 2); + CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX); } else { diff --git a/src/cable_club.c b/src/cable_club.c index 1284aee77f..ef1d9ff0d2 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -101,15 +101,15 @@ static void PrintNumPlayersInLink(u16 windowId, u32 numPlayers) StringExpandPlaceholders(gStringVar4, gText_NumPlayerLink); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 88); AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, 0xFF, NULL); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } static void ClearLinkPlayerCountWindow(u16 windowId) { - // Following this call with a copy-to-vram with mode 3 is identical to + // Following this call with a copy-to-vram with mode COPYWIN_FULL is identical to // calling ClearStdWindowAndFrame(windowId, TRUE). ClearStdWindowAndFrame(windowId, FALSE); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } static void UpdateLinkPlayerCountDisplay(u8 taskId, u8 numPlayers) diff --git a/src/contest.c b/src/contest.c index 1cd8f18b01..b5a035ff85 100644 --- a/src/contest.c +++ b/src/contest.c @@ -1667,7 +1667,7 @@ static void Task_HideMoveSelectScreen(u8 taskId) { FillWindowPixelBuffer(MOVE_WINDOWS_START + i, PIXEL_FILL(0)); PutWindowTilemap(MOVE_WINDOWS_START + i); - CopyWindowToVram(MOVE_WINDOWS_START + i, 2); + CopyWindowToVram(MOVE_WINDOWS_START + i, COPYWIN_GFX); } Contest_SetBgCopyFlags(0); // This seems to be a bug; it should have just copied PLTT_BUFFER_SIZE. @@ -3377,7 +3377,7 @@ static void DrawStatusSymbols(void) static void ContestClearGeneralTextWindow(void) { FillWindowPixelBuffer(WIN_GENERAL_TEXT, PIXEL_FILL(0)); - CopyWindowToVram(WIN_GENERAL_TEXT, 2); + CopyWindowToVram(WIN_GENERAL_TEXT, COPYWIN_GFX); Contest_SetBgCopyFlags(0); } diff --git a/src/contest_painting.c b/src/contest_painting.c index db6bf44557..84b160eb82 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -274,7 +274,7 @@ static void InitContestPaintingWindow(void) DeactivateAllTextPrinters(); FillWindowPixelBuffer(sWindowId, PIXEL_FILL(0)); PutWindowTilemap(sWindowId); - CopyWindowToVram(sWindowId, 3); + CopyWindowToVram(sWindowId, COPYWIN_FULL); ShowBg(1); } diff --git a/src/credits.c b/src/credits.c index de7597e321..0643f2c597 100644 --- a/src/credits.c +++ b/src/credits.c @@ -369,7 +369,7 @@ static void InitCreditsBgsAndWindows(void) InitWindows(sWindowTemplates); DeactivateAllTextPrinters(); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); ShowBg(0); } @@ -761,7 +761,7 @@ static void Task_UpdatePage(u8 taskId) sCreditsEntryPointerTable[gTasks[taskId].tCurrentPage][i]->text, 5 + i * 16, sCreditsEntryPointerTable[gTasks[taskId].tCurrentPage][i]->isTitle); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); gTasks[taskId].tCurrentPage++; gTasks[taskId].tState++; @@ -811,7 +811,7 @@ static void Task_UpdatePage(u8 taskId) { // Still more Credits pages to show, return to state 2 to print FillWindowPixelBuffer(0, PIXEL_FILL(0)); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); gTasks[taskId].tState = 2; } return; diff --git a/src/daycare.c b/src/daycare.c index eb17147b5d..ce11e43759 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -1285,7 +1285,7 @@ void ShowDaycareLevelMenu(void) menuTemplate.windowId = windowId; listMenuTaskId = ListMenuInit(&menuTemplate, 0, 0); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); daycareMenuTaskId = CreateTask(Task_HandleDaycareLevelMenuInput, 3); gTasks[daycareMenuTaskId].tMenuListTaskId = listMenuTaskId; diff --git a/src/diploma.c b/src/diploma.c index ffb1447eb8..6b1b7fbf5f 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -140,7 +140,7 @@ static void DisplayDiplomaText(void) StringExpandPlaceholders(gStringVar4, gText_PokedexDiploma); PrintDiplomaText(gStringVar4, 0, 1); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static const struct BgTemplate sDiplomaBgTemplates[2] = diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 838e8ed945..41060415e0 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -2968,7 +2968,7 @@ static void Task_ShowDodrioBerryPickingRecords(u8 taskId) window.width = width; tWindowId = AddWindow(&window); PrintRecordsText(tWindowId, width); - CopyWindowToVram(tWindowId, 3); + CopyWindowToVram(tWindowId, COPYWIN_FULL); tState++; break; case 1: @@ -2979,7 +2979,7 @@ static void Task_ShowDodrioBerryPickingRecords(u8 taskId) if (JOY_NEW(A_BUTTON | B_BUTTON)) { rbox_fill_rectangle(tWindowId); - CopyWindowToVram(tWindowId, 1); + CopyWindowToVram(tWindowId, COPYWIN_MAP); tState++; } break; @@ -4650,7 +4650,7 @@ static void ShowNames(void) colorsId = COLORID_BLUE; name = GetPlayerName(playerId); AddTextPrinterParameterized3(sGfx->windowIds[i], FONT_NORMAL, left, 1, sTextColorTable[colorsId], -1, name); - CopyWindowToVram(sGfx->windowIds[i], 2); + CopyWindowToVram(sGfx->windowIds[i], COPYWIN_GFX); window.baseBlock += 0xE; DrawMessageWindow(&window); } @@ -4798,8 +4798,8 @@ static void ShowResults(void) AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], -1, NULL); } } - CopyWindowToVram(sGfx->windowIds[0], 2); - CopyWindowToVram(sGfx->windowIds[1], 2); + CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); + CopyWindowToVram(sGfx->windowIds[1], COPYWIN_GFX); sGfx->state++; break; case 3: @@ -4831,8 +4831,8 @@ static void ShowResults(void) break; case 6: PrintRankedScores(numPlayers); - CopyWindowToVram(sGfx->windowIds[0], 2); - CopyWindowToVram(sGfx->windowIds[1], 2); + CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); + CopyWindowToVram(sGfx->windowIds[1], COPYWIN_GFX); sGfx->state++; break; case 7: @@ -4890,8 +4890,8 @@ static void ShowResults(void) DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FilledStorageSpace); AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 41, -1, NULL); } - CopyWindowToVram(sGfx->windowIds[0], 2); - CopyWindowToVram(sGfx->windowIds[1], 2); + CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); + CopyWindowToVram(sGfx->windowIds[1], COPYWIN_GFX); sGfx->state++; break; case 10: @@ -4950,8 +4950,8 @@ static void Msg_WantToPlayAgain(void) AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL); AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL); AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, 1, -1, NULL); - CopyWindowToVram(sGfx->windowIds[WIN_PLAY_AGAIN], 2); - CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], 2); + CopyWindowToVram(sGfx->windowIds[WIN_PLAY_AGAIN], COPYWIN_GFX); + CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], COPYWIN_GFX); sGfx->state++; break; case 2: @@ -4973,7 +4973,7 @@ static void Msg_WantToPlayAgain(void) AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL); AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL); AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL); - CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], 3); + CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], COPYWIN_FULL); // Increment state only if A or B button have been pressed. if (JOY_NEW(A_BUTTON)) @@ -5029,7 +5029,7 @@ static void Msg_SavingDontTurnOff(void) sGfx->state++; break; case 1: - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); sGfx->state++; break; case 2: @@ -5064,7 +5064,7 @@ static void Msg_CommunicationStandby(void) case 1: FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_CommunicationStandby3, 0, 5, -1, NULL); - CopyWindowToVram(sGfx->windowIds[0], 2); + CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); sGfx->state++; break; case 2: @@ -5104,7 +5104,7 @@ static void Msg_SomeoneDroppedOut(void) case 1: FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_SomeoneDroppedOut, 0, 5, -1, NULL); - CopyWindowToVram(sGfx->windowIds[0], 2); + CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); sGfx->state++; break; case 2: diff --git a/src/easy_chat.c b/src/easy_chat.c index ff4049cd7d..078e07eb2f 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -3934,7 +3934,7 @@ static void PrintTitle(void) FillWindowPixelBuffer(0, PIXEL_FILL(0)); PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SPEED_FF, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static void PrintEasyChatText(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)) @@ -4008,7 +4008,7 @@ static void PrintEasyChatStdMessage(u8 msgId) if (text2) PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SPEED_FF, 0); - CopyWindowToVram(1, 3); + CopyWindowToVram(1, COPYWIN_FULL); } static void CreateEasyChatYesNoMenu(u8 initialCursorPos) @@ -4102,7 +4102,7 @@ static void PrintCurrentPhrase(void) PrintEasyChatText(sScreenControl->windowId, FONT_NORMAL, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SPEED_FF, 0); } - CopyWindowToVram(sScreenControl->windowId, 3); + CopyWindowToVram(sScreenControl->windowId, COPYWIN_FULL); } static void BufferFrameTilemap(u16 *tilemap) @@ -4216,7 +4216,7 @@ static void InitLowerWindowText(u32 whichText) break; } - CopyWindowToVram(2, 2); + CopyWindowToVram(2, COPYWIN_GFX); } static void PrintKeyboardText(void) @@ -4337,7 +4337,7 @@ static void PrintWordSelectText(u8 scrollOffset, u8 numRows) y += 16; } - CopyWindowToVram(2, 2); + CopyWindowToVram(2, COPYWIN_GFX); } static void EraseWordSelectRows(u8 scrollOffset, u8 numRows) @@ -4369,7 +4369,7 @@ static void EraseWordSelectRows(u8 scrollOffset, u8 numRows) static void ClearWordSelectWindow(void) { FillWindowPixelBuffer(2, PIXEL_FILL(1)); - CopyWindowToVram(2, 2); + CopyWindowToVram(2, COPYWIN_GFX); } static void InitLowerWindowAnim(int winAnimType) diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 25a61fcf67..c705cf24b5 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -644,7 +644,7 @@ static void CB2_EggHatch_1(void) PlayFanfare(MUS_EVOLVED); sEggHatchData->CB2_state++; PutWindowTilemap(sEggHatchData->windowId); - CopyWindowToVram(sEggHatchData->windowId, 3); + CopyWindowToVram(sEggHatchData->windowId, COPYWIN_FULL); break; case 6: if (IsFanfareTaskInactive()) diff --git a/src/field_region_map.c b/src/field_region_map.c index 9dcc65c9a4..26ae736a68 100644 --- a/src/field_region_map.c +++ b/src/field_region_map.c @@ -213,6 +213,6 @@ static void PrintRegionMapSecName(void) else { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } } diff --git a/src/field_specials.c b/src/field_specials.c index c859401622..96cef93ba4 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1917,7 +1917,7 @@ void ShowDeptStoreElevatorFloorSelect(void) AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL); PutWindowTilemap(sTutorMoveAndElevatorWindowId); - CopyWindowToVram(sTutorMoveAndElevatorWindowId, 3); + CopyWindowToVram(sTutorMoveAndElevatorWindowId, COPYWIN_FULL); } void CloseDeptStoreElevatorWindow(void) @@ -2723,7 +2723,7 @@ static void CloseScrollableMultichoice(u8 taskId) Free(sScrollableMultichoice_ListMenuItem); ClearStdWindowAndFrameToTransparent(task->tWindowId, 1); FillWindowPixelBuffer(task->tWindowId, PIXEL_FILL(0)); - CopyWindowToVram(task->tWindowId, 2); + CopyWindowToVram(task->tWindowId, COPYWIN_GFX); RemoveWindow(task->tWindowId); DestroyTask(taskId); EnableBothScriptContexts(); @@ -2976,7 +2976,7 @@ void ShowBattlePointsWindow(void) sBattlePointsWindowId = AddWindow(&sBattlePoints_WindowTemplate); SetStandardWindowBorderStyle(sBattlePointsWindowId, 0); UpdateBattlePointsWindow(); - CopyWindowToVram(sBattlePointsWindowId, 2); + CopyWindowToVram(sBattlePointsWindowId, COPYWIN_GFX); } void CloseBattlePointsWindow(void) @@ -2988,25 +2988,17 @@ void CloseBattlePointsWindow(void) void TakeFrontierBattlePoints(void) { if (gSaveBlock2Ptr->frontier.battlePoints < gSpecialVar_0x8004) - { gSaveBlock2Ptr->frontier.battlePoints = 0; - } else - { gSaveBlock2Ptr->frontier.battlePoints -= gSpecialVar_0x8004; - } } void GiveFrontierBattlePoints(void) { if (gSaveBlock2Ptr->frontier.battlePoints + gSpecialVar_0x8004 > MAX_BATTLE_FRONTIER_POINTS) - { gSaveBlock2Ptr->frontier.battlePoints = MAX_BATTLE_FRONTIER_POINTS; - } else - { gSaveBlock2Ptr->frontier.battlePoints = gSaveBlock2Ptr->frontier.battlePoints + gSpecialVar_0x8004; - } } u16 GetFrontierBattlePoints(void) @@ -3028,7 +3020,7 @@ void ShowFrontierExchangeCornerItemIconWindow(void) sFrontierExchangeCorner_ItemIconWindowId = AddWindow(&sFrontierExchangeCorner_ItemIconWindowTemplate); SetStandardWindowBorderStyle(sFrontierExchangeCorner_ItemIconWindowId, 0); - CopyWindowToVram(sFrontierExchangeCorner_ItemIconWindowId, 2); + CopyWindowToVram(sFrontierExchangeCorner_ItemIconWindowId, COPYWIN_GFX); } void CloseFrontierExchangeCornerItemIconWindow(void) @@ -3248,7 +3240,7 @@ void ScrollableMultichoice_RedrawPersistentMenu(void) AddTextPrinterParameterized(task->tWindowId, FONT_NORMAL, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL); PutWindowTilemap(task->tWindowId); - CopyWindowToVram(task->tWindowId, 3); + CopyWindowToVram(task->tWindowId, COPYWIN_FULL); } } @@ -3303,7 +3295,7 @@ void ScrollableMultichoice_ClosePersistentMenu(void) ClearStdWindowAndFrameToTransparent(task->tWindowId, TRUE); FillWindowPixelBuffer(task->tWindowId, PIXEL_FILL(0)); ClearWindowTilemap(task->tWindowId); - CopyWindowToVram(task->tWindowId, 2); + CopyWindowToVram(task->tWindowId, COPYWIN_GFX); RemoveWindow(task->tWindowId); DestroyTask(taskId); } diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 699e19c7aa..9dfd5e9354 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -1166,7 +1166,7 @@ static void ShowAndPrintWindows(void) PrintAreaDescription(sPassData->cursorArea); for (i = 0; i < WINDOW_COUNT; i++) - CopyWindowToVram(i, 3); + CopyWindowToVram(i, COPYWIN_FULL); CopyBgTilemapBufferToVram(0); } @@ -1180,7 +1180,7 @@ static void PrintAreaDescription(u8 cursorArea) else if (cursorArea != CURSOR_AREA_NOTHING) AddTextPrinterParameterized3(WINDOW_DESCRIPTION, FONT_NORMAL, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[cursorArea]); - CopyWindowToVram(WINDOW_DESCRIPTION, 3); + CopyWindowToVram(WINDOW_DESCRIPTION, COPYWIN_FULL); CopyBgTilemapBufferToVram(0); } @@ -1723,7 +1723,7 @@ static void PrintOnFrontierMap(void) AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, FONT_NORMAL, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description); for (i = 0; i < MAP_WINDOW_COUNT; i++) - CopyWindowToVram(i, 3); + CopyWindowToVram(i, COPYWIN_FULL); CopyBgTilemapBufferToVram(0); } @@ -1755,7 +1755,7 @@ static void HandleFrontierMapCursorMove(u8 direction) AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, FONT_NORMAL, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description); for (i = 0; i < MAP_WINDOW_COUNT; i++) - CopyWindowToVram(i, 3); + CopyWindowToVram(i, COPYWIN_FULL); CopyBgTilemapBufferToVram(0); PlaySE(SE_DEX_SCROLL); diff --git a/src/frontier_util.c b/src/frontier_util.c index 25153b05c7..88db7af1fa 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -1064,7 +1064,7 @@ static void ShowTowerResultsWindow(u8 battleMode) TowerPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_OPEN, 72, 132, 97); TowerPrintRecordStreak(battleMode, FRONTIER_LVL_OPEN, 72, 132, 113); PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } // Battle Dome records. @@ -1133,7 +1133,7 @@ static void ShowDomeResultsWindow(u8 battleMode) PrintTwoStrings(gText_Record, gText_ClearStreak, gSaveBlock2Ptr->frontier.domeRecordWinStreaks[battleMode][FRONTIER_LVL_OPEN], 64, 121, 113); PrintTwoStrings(gText_Total, gText_Championships, gSaveBlock2Ptr->frontier.domeTotalChampionships[battleMode][FRONTIER_LVL_OPEN], 64, 112, 129); PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } // Battle Palace records. @@ -1207,7 +1207,7 @@ static void ShowPalaceResultsWindow(u8 battleMode) PalacePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_OPEN, 72, 131, 97); PalacePrintRecordStreak(battleMode, FRONTIER_LVL_OPEN, 72, 131, 113); PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } // Battle Pike records. @@ -1261,7 +1261,7 @@ static void ShowPikeResultsWindow(void) PikePrintCleared(gText_Record, gText_RoomsCleared, gSaveBlock2Ptr->frontier.pikeRecordStreaks[FRONTIER_LVL_OPEN], 64, 114, 113); PikePrintCleared(gText_Total, gText_TimesCleared, gSaveBlock2Ptr->frontier.pikeTotalStreaks[FRONTIER_LVL_OPEN], 64, 114, 129); PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } // Battle Arena records. @@ -1321,7 +1321,7 @@ static void ShowArenaResultsWindow(void) ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_OPEN, 72, 126, 97); ArenaPrintRecordStreak(FRONTIER_LVL_OPEN, 72, 126, 113); PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } // Battle Factory records. @@ -1412,7 +1412,7 @@ static void ShowFactoryResultsWindow(u8 battleMode) FactoryPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_OPEN, 8, 64, 158, 113); FactoryPrintRecordStreak(battleMode, FRONTIER_LVL_OPEN, 8, 64, 158, 129); PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } // Battle Pyramid records. @@ -1472,7 +1472,7 @@ static void ShowPyramidResultsWindow(void) PyramidPrintPrevOrCurrentStreak(FRONTIER_LVL_OPEN, 64, 111, 97); PyramidPrintRecordStreak(FRONTIER_LVL_OPEN, 64, 111, 113); PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } // Link contest records. Why is it in this file? @@ -1523,7 +1523,7 @@ static void ShowLinkContestResultsWindow(void) } PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } static void CheckPutFrontierTVShowOnAir(void) @@ -2369,14 +2369,14 @@ void ShowRankingHallRecordsWindow(void) FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_50); PutWindowTilemap(gRecordsWindowId); - CopyWindowToVram(gRecordsWindowId, 3); + CopyWindowToVram(gRecordsWindowId, COPYWIN_FULL); } void ScrollRankingHallRecordsWindow(void) { FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_OPEN); - CopyWindowToVram(gRecordsWindowId, 2); + CopyWindowToVram(gRecordsWindowId, COPYWIN_GFX); } void ClearRankingHallRecords(void) diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 8d69b03bc9..58e062d50c 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -515,7 +515,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId) DrawDialogueFrame(0, 0); AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_Hof_TrySaveData; } @@ -676,7 +676,7 @@ static void Task_Hof_DoConfetti(u8 taskId) } BeginNormalPaletteFade(sHofFadePalettes, 0, 12, 12, RGB(16, 29, 24)); FillWindowPixelBuffer(0, PIXEL_FILL(0)); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].tFrameCount = 7; gTasks[taskId].func = Task_Hof_WaitToDisplayPlayer; } @@ -725,7 +725,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId) HallOfFame_PrintPlayerInfo(1, 2); DrawDialogueFrame(0, 0); AddTextPrinterParameterized2(0, FONT_NORMAL, gText_LeagueChamp, 0, NULL, 2, 1, 3); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_Hof_ExitOnKeyPressed; } } @@ -1094,7 +1094,7 @@ static void Task_HofPC_PrintDataIsCorrupted(u8 taskId) sub_8198180(gText_AButtonExit, 8, TRUE); DrawDialogueFrame(0, 0); AddTextPrinterParameterized2(0, FONT_NORMAL, gText_HOFCorrupted, 0, NULL, 2, 1, 3); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_HofPC_ExitOnButtonPress; } @@ -1115,7 +1115,7 @@ static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2) FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); AddTextPrinterParameterized3(0, FONT_NORMAL, GetStringCenterAlignXOffset(FONT_NORMAL, gText_WelcomeToHOF, 0xD0), 1, sMonInfoTextColors, 0, gText_WelcomeToHOF); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u8 unused2) @@ -1160,7 +1160,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u { width = GetStringCenterAlignXOffset(FONT_NORMAL, text, 0xD0); AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } else { @@ -1196,7 +1196,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u ConvertIntToDecimalStringN(stringPtr, (u16)(currMon->tid), STR_CONV_MODE_LEADING_ZEROS, 5); AddTextPrinterParameterized3(0, FONT_NORMAL, 0x68, 0x11, sMonInfoTextColors, -1, text); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } } @@ -1243,7 +1243,7 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70); AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x21, sPlayerInfoTextColors, -1, text); - CopyWindowToVram(1, 3); + CopyWindowToVram(1, COPYWIN_FULL); } static void ClearVramOamPltt_LoadHofPal(void) diff --git a/src/item_menu.c b/src/item_menu.c index bee5dc7165..1baa3965cf 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -2439,7 +2439,7 @@ static void CopyPocketNameToWindow(u32 a) CpuCopy32(tileDataBuffer[0][a], windowTileData, 0x100); // Top half of pocket name b = a + 16; CpuCopy32(tileDataBuffer[0][b], windowTileData + 0x100, 0x100); // Bottom half of pocket name - CopyWindowToVram(WIN_POCKET_NAME, 2); + CopyWindowToVram(WIN_POCKET_NAME, COPYWIN_GFX); } static void LoadBagMenuTextWindows(void) @@ -2544,7 +2544,7 @@ static void PrepareTMHMMoveWindow(void) BlitMenuInfoIcon(WIN_TMHM_INFO_ICONS, MENU_INFO_ICON_POWER, 0, 12); BlitMenuInfoIcon(WIN_TMHM_INFO_ICONS, MENU_INFO_ICON_ACCURACY, 0, 24); BlitMenuInfoIcon(WIN_TMHM_INFO_ICONS, MENU_INFO_ICON_PP, 0, 36); - CopyWindowToVram(WIN_TMHM_INFO_ICONS, 2); + CopyWindowToVram(WIN_TMHM_INFO_ICONS, COPYWIN_GFX); } static void PrintTMHMMoveData(u16 itemId) @@ -2558,7 +2558,7 @@ static void PrintTMHMMoveData(u16 itemId) { for (i = 0; i < 4; i++) BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); - CopyWindowToVram(WIN_TMHM_INFO, 2); + CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX); } else { @@ -2593,6 +2593,6 @@ static void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].pp, STR_CONV_MODE_RIGHT_ALIGN, 3); BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); - CopyWindowToVram(WIN_TMHM_INFO, 2); + CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX); } } diff --git a/src/link.c b/src/link.c index 40f6ce786c..3380514e13 100644 --- a/src/link.c +++ b/src/link.c @@ -1648,8 +1648,8 @@ static void ErrorMsg_MoveCloserToPartner(void) AddTextPrinterParameterized3(2, FONT_SHORT_COPY_1, 2, 1, sTextColors, 0, gText_MoveCloserToLinkPartner); PutWindowTilemap(0); PutWindowTilemap(2); - CopyWindowToVram(0, 0); - CopyWindowToVram(2, 3); + CopyWindowToVram(0, COPYWIN_NONE); // Does nothing + CopyWindowToVram(2, COPYWIN_FULL); } static void ErrorMsg_CheckConnections(void) @@ -1660,8 +1660,8 @@ static void ErrorMsg_CheckConnections(void) AddTextPrinterParameterized3(1, FONT_SHORT_COPY_1, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections); PutWindowTilemap(1); PutWindowTilemap(2); - CopyWindowToVram(1, 0); - CopyWindowToVram(2, 3); + CopyWindowToVram(1, COPYWIN_NONE); // Does nothing + CopyWindowToVram(2, COPYWIN_FULL); } static void CB2_PrintErrorMessage(void) diff --git a/src/list_menu.c b/src/list_menu.c index 84b917eecc..6b1c377f36 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -330,7 +330,7 @@ s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const str gMultiuseListMenuTemplate = *listMenuTemplate; gMultiuseListMenuTemplate.windowId = sMysteryGiftLinkMenu.windowId; sMysteryGiftLinkMenu.listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0); - CopyWindowToVram(sMysteryGiftLinkMenu.windowId, 1); + CopyWindowToVram(sMysteryGiftLinkMenu.windowId, COPYWIN_MAP); sMysteryGiftLinkMenu.state = 1; break; case 1: @@ -364,7 +364,7 @@ s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const str } } - CopyWindowToVram(sMysteryGiftLinkMenu.windowId, 1); + CopyWindowToVram(sMysteryGiftLinkMenu.windowId, COPYWIN_MAP); } break; case 2: @@ -381,7 +381,7 @@ u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 { u8 taskId = ListMenuInitInternal(listMenuTemplate, scrollOffset, selectedRow); PutWindowTilemap(listMenuTemplate->windowId); - CopyWindowToVram(listMenuTemplate->windowId, 2); + CopyWindowToVram(listMenuTemplate->windowId, COPYWIN_GFX); return taskId; } @@ -401,7 +401,7 @@ u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenu rect[i].height, rect[i].palNum); } - CopyWindowToVram(listMenuTemplate->windowId, 2); + CopyWindowToVram(listMenuTemplate->windowId, COPYWIN_GFX); return taskId; } @@ -489,7 +489,7 @@ void RedrawListMenu(u8 listTaskId) FillWindowPixelBuffer(list->template.windowId, PIXEL_FILL(list->template.fillValue)); ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed); ListMenuDrawCursor(list); - CopyWindowToVram(list->template.windowId, 2); + CopyWindowToVram(list->template.windowId, COPYWIN_GFX); } // unused @@ -862,7 +862,7 @@ static bool8 ListMenuChangeSelection(struct ListMenu *list, bool8 updateCursorAn ListMenuErasePrintedCursor(list, oldSelectedRow); ListMenuDrawCursor(list); ListMenuCallSelectionChangedCallback(list, FALSE); - CopyWindowToVram(list->template.windowId, 2); + CopyWindowToVram(list->template.windowId, COPYWIN_GFX); break; case 2: case 3: @@ -870,7 +870,7 @@ static bool8 ListMenuChangeSelection(struct ListMenu *list, bool8 updateCursorAn ListMenuScroll(list, cursorCount, movingDown); ListMenuDrawCursor(list); ListMenuCallSelectionChangedCallback(list, FALSE); - CopyWindowToVram(list->template.windowId, 2); + CopyWindowToVram(list->template.windowId, COPYWIN_GFX); break; } } diff --git a/src/mail.c b/src/mail.c index 5b4e62bafa..f59e7edf14 100644 --- a/src/mail.c +++ b/src/mail.c @@ -700,8 +700,8 @@ static void PrintMailText(void) box_x = GetStringCenterAlignXOffset(FONT_NORMAL, signature, sMailRead->signatureWidth) + 104; box_y = sMailRead->layout->signatureYPos + 88; AddTextPrinterParameterized3(0, FONT_NORMAL, box_x, box_y, sTextColors, 0, signature); - CopyWindowToVram(0, 3); - CopyWindowToVram(1, 3); + CopyWindowToVram(0, COPYWIN_FULL); + CopyWindowToVram(1, COPYWIN_FULL); } static void VBlankCB_MailRead(void) diff --git a/src/main_menu.c b/src/main_menu.c index 637719dea7..bd7107963e 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -784,8 +784,8 @@ static void Task_DisplayMainMenu(u8 taskId) AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); PutWindowTilemap(0); PutWindowTilemap(1); - CopyWindowToVram(0, 2); - CopyWindowToVram(1, 2); + CopyWindowToVram(0, COPYWIN_GFX); + CopyWindowToVram(1, COPYWIN_GFX); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[0], MAIN_MENU_BORDER_TILE); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[1], MAIN_MENU_BORDER_TILE); break; @@ -800,9 +800,9 @@ static void Task_DisplayMainMenu(u8 taskId) PutWindowTilemap(2); PutWindowTilemap(3); PutWindowTilemap(4); - CopyWindowToVram(2, 2); - CopyWindowToVram(3, 2); - CopyWindowToVram(4, 2); + CopyWindowToVram(2, COPYWIN_GFX); + CopyWindowToVram(3, COPYWIN_GFX); + CopyWindowToVram(4, COPYWIN_GFX); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[2], MAIN_MENU_BORDER_TILE); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[3], MAIN_MENU_BORDER_TILE); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[4], MAIN_MENU_BORDER_TILE); @@ -821,10 +821,10 @@ static void Task_DisplayMainMenu(u8 taskId) PutWindowTilemap(3); PutWindowTilemap(4); PutWindowTilemap(5); - CopyWindowToVram(2, 2); - CopyWindowToVram(3, 2); - CopyWindowToVram(4, 2); - CopyWindowToVram(5, 2); + CopyWindowToVram(2, COPYWIN_GFX); + CopyWindowToVram(3, COPYWIN_GFX); + CopyWindowToVram(4, COPYWIN_GFX); + CopyWindowToVram(5, COPYWIN_GFX); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[2], MAIN_MENU_BORDER_TILE); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[3], MAIN_MENU_BORDER_TILE); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[4], MAIN_MENU_BORDER_TILE); @@ -847,11 +847,11 @@ static void Task_DisplayMainMenu(u8 taskId) PutWindowTilemap(4); PutWindowTilemap(5); PutWindowTilemap(6); - CopyWindowToVram(2, 2); - CopyWindowToVram(3, 2); - CopyWindowToVram(4, 2); - CopyWindowToVram(5, 2); - CopyWindowToVram(6, 2); + CopyWindowToVram(2, COPYWIN_GFX); + CopyWindowToVram(3, COPYWIN_GFX); + CopyWindowToVram(4, COPYWIN_GFX); + CopyWindowToVram(5, COPYWIN_GFX); + CopyWindowToVram(6, COPYWIN_GFX); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[2], MAIN_MENU_BORDER_TILE); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[3], MAIN_MENU_BORDER_TILE); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[4], MAIN_MENU_BORDER_TILE); @@ -1330,7 +1330,7 @@ static void Task_NewGameBirchSpeech_WaitForSpriteFadeInWelcome(u8 taskId) LoadMessageBoxGfx(0, 0xFC, 0xF0); NewGameBirchSpeech_ShowDialogueWindow(0, 1); PutWindowTilemap(0); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); NewGameBirchSpeech_ClearWindow(0); StringExpandPlaceholders(gStringVar4, gText_Birch_Welcome); AddTextPrinterForMessage(1); @@ -1855,7 +1855,7 @@ static void CB2_NewGameBirchSpeech_ReturnFromNamingScreen(void) LoadMainMenuWindowFrameTiles(0, 0xF3); LoadMessageBoxGfx(0, 0xFC, 0xF0); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static void SpriteCB_Null(struct Sprite *sprite) @@ -2092,7 +2092,7 @@ static void NewGameBirchSpeech_ShowGenderMenu(void) PrintMenuTable(1, ARRAY_COUNT(sMenuActions_Gender), sMenuActions_Gender); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0); PutWindowTilemap(1); - CopyWindowToVram(1, 3); + CopyWindowToVram(1, COPYWIN_FULL); } static s8 NewGameBirchSpeech_ProcessGenderMenuInput(void) @@ -2119,7 +2119,7 @@ static void CreateMainMenuErrorWindow(const u8* str) FillWindowPixelBuffer(7, PIXEL_FILL(1)); AddTextPrinterParameterized(7, FONT_NORMAL, str, 0, 1, 2, 0); PutWindowTilemap(7); - CopyWindowToVram(7, 2); + CopyWindowToVram(7, COPYWIN_GFX); DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[7], MAIN_MENU_BORDER_TILE); SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(9, DISPLAY_WIDTH - 9)); SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(113, DISPLAY_HEIGHT - 1)); @@ -2232,7 +2232,7 @@ static void NewGameBirchSpeech_ClearGenderWindow(u8 windowId, bool8 copyToVram) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } static void NewGameBirchSpeech_ClearWindow(u8 windowId) @@ -2244,7 +2244,7 @@ static void NewGameBirchSpeech_ClearWindow(u8 windowId) u8 winHeight = GetWindowAttribute(windowId, WINDOW_HEIGHT); FillWindowPixelRect(windowId, bgColor, 0, 0, maxCharWidth * winWidth, maxCharHeight * winHeight); - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } static void NewGameBirchSpeech_WaitForThisIsPokemonText(struct TextPrinterTemplate *printer, u16 a) diff --git a/src/map_name_popup.c b/src/map_name_popup.c index 88a06eed42..bc0b311622 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -330,7 +330,7 @@ static void ShowMapNamePopUpWindow(void) mapDisplayHeader[1] = EXT_CTRL_CODE_HIGHLIGHT; mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT; AddTextPrinterParameterized(GetMapNamePopUpWindowId(), FONT_NARROW, mapDisplayHeader, x, 3, 0xFF, NULL); - CopyWindowToVram(GetMapNamePopUpWindowId(), 3); + CopyWindowToVram(GetMapNamePopUpWindowId(), COPYWIN_FULL); } #define TILE_TOP_EDGE_START 0x21D diff --git a/src/match_call.c b/src/match_call.c index 4c77b87646..b292ede31c 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1277,7 +1277,7 @@ static bool32 MatchCall_DrawWindow(u8 taskId) DrawMatchCallTextBoxBorder_Internal(tWindowId, TILE_MC_WINDOW, 14); WriteSequenceToBgTilemapBuffer(0, (0xF << 12) | TILE_POKENAV_ICON, 1, 15, 4, 4, 17, 1); tIconTaskId = CreateTask(Task_SpinPokenavIcon, 10); - CopyWindowToVram(tWindowId, 2); + CopyWindowToVram(tWindowId, COPYWIN_GFX); CopyBgTilemapBufferToVram(0); return TRUE; } @@ -1329,7 +1329,7 @@ static bool32 MatchCall_PrintMessage(u8 taskId) if (!RunMatchCallTextPrinter(tWindowId) && !IsSEPlaying() && JOY_NEW(A_BUTTON | B_BUTTON)) { FillWindowPixelBuffer(tWindowId, PIXEL_FILL(8)); - CopyWindowToVram(tWindowId, 2); + CopyWindowToVram(tWindowId, COPYWIN_GFX); PlaySE(SE_POKENAV_HANG_UP); return TRUE; } diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index a9f7df744a..2525e065a8 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -449,7 +449,7 @@ static void DrawSongTextWindow(const u8 * str) DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, str, 0, 1, 1, DisableTextPrinters); gDisableTextPrinters = TRUE; - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static void BardSing(struct Task *task, struct BardSong *song) @@ -1347,7 +1347,7 @@ static void PrintStoryList(void) } AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 0xFF, NULL); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sStorytellerWindowId, GetFreeStorySlot() + 1, 0); - CopyWindowToVram(sStorytellerWindowId, 3); + CopyWindowToVram(sStorytellerWindowId, COPYWIN_FULL); } static void Task_StoryListMenu(u8 taskId) diff --git a/src/menu.c b/src/menu.c index b8f09063da..7625f113cf 100644 --- a/src/menu.c +++ b/src/menu.c @@ -138,7 +138,6 @@ void WindowFunc_DrawDialogFrameWithCustomTileAndPalette(u8, u8, u8, u8, u8, u8); void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8, u8, u8, u8, u8, u8); void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8, u8, u8, u8, u8, u8); void WindowFunc_ClearStdWindowAndFrameToTransparent(u8, u8, u8, u8, u8, u8); -void sub_8198C78(void); void task_free_buf_after_copying_tile_data_to_vram(u8 taskId); void InitStandardTextBoxWindows(void) @@ -220,7 +219,7 @@ void DrawDialogueFrame(u8 windowId, bool8 copyToVram) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } void DrawStdWindowFrame(u8 windowId, bool8 copyToVram) @@ -229,7 +228,7 @@ void DrawStdWindowFrame(u8 windowId, bool8 copyToVram) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram) @@ -238,7 +237,7 @@ void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram) @@ -247,7 +246,7 @@ void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } void WindowFunc_DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) @@ -461,7 +460,7 @@ void DisplayItemMessageOnField(u8 taskId, const u8 *string, TaskFunc callback) { LoadMessageBoxAndBorderGfx(); DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, FONT_NORMAL, GetPlayerTextSpeedDelay(), string, callback); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } void DisplayYesNoMenuDefaultYes(void) @@ -565,7 +564,7 @@ void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } // Never used. @@ -577,7 +576,7 @@ void DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } void WindowFunc_DrawDialogFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) @@ -682,7 +681,7 @@ void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram) FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) @@ -698,7 +697,7 @@ void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 bas FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } // Never used. @@ -710,7 +709,7 @@ void DrawStdFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 baseTileNum) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) @@ -779,7 +778,7 @@ void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram) FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); ClearWindowTilemap(windowId); if (copyToVram == TRUE) - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } void WindowFunc_ClearStdWindowAndFrameToTransparent(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) @@ -832,7 +831,7 @@ void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram) 0, string); if (copyToVram) - CopyWindowToVram(sWindowId, 3); + CopyWindowToVram(sWindowId, COPYWIN_FULL); } } @@ -870,14 +869,14 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo } AddTextPrinterParameterized4(sWindowId, FONT_NORMAL, 4, 1, 0, 0, color, 0, string); if (copyToVram) - CopyWindowToVram(sWindowId, 3); + CopyWindowToVram(sWindowId, COPYWIN_FULL); } } void sub_81982D8(void) { if (sWindowId != WINDOW_NONE) - CopyWindowToVram(sWindowId, 3); + CopyWindowToVram(sWindowId, COPYWIN_FULL); } void sub_81982F0(void) @@ -885,7 +884,7 @@ void sub_81982F0(void) if (sWindowId != WINDOW_NONE) { FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); - CopyWindowToVram(sWindowId, 3); + CopyWindowToVram(sWindowId, COPYWIN_FULL); } } @@ -895,7 +894,7 @@ void sub_8198314(void) { FillWindowPixelBuffer(sWindowId, PIXEL_FILL(0)); ClearWindowTilemap(sWindowId); - CopyWindowToVram(sWindowId, 3); + CopyWindowToVram(sWindowId, COPYWIN_FULL); RemoveWindow(sWindowId); sWindowId = WINDOW_NONE; } @@ -1106,7 +1105,7 @@ void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 i { AddTextPrinterParameterized(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, 0xFF, NULL); } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } void sub_81987BC(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, u8 a6, u8 a7) @@ -1116,7 +1115,7 @@ void sub_81987BC(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 item { AddTextPrinterParameterized5(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, 0xFF, NULL, a6, a7); } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } void sub_8198854(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions) @@ -1148,7 +1147,7 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l AddTextPrinter(&printer, 0xFF, NULL); } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } void sub_81989B8(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) @@ -1216,11 +1215,11 @@ s8 Menu_ProcessInputNoWrapClearOnChoose(void) { s8 result = Menu_ProcessInputNoWrap(); if (result != MENU_NOTHING_CHOSEN) - sub_8198C78(); + EraseYesNoWindow(); return result; } -void sub_8198C78(void) +void EraseYesNoWindow(void) { ClearStdWindowAndFrameToTransparent(sYesNoWindowId, TRUE); RemoveWindow(sYesNoWindowId); @@ -1237,7 +1236,7 @@ void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u AddTextPrinterParameterized(windowId, fontId, menuActions[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, 0xFF, NULL); } } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } void sub_8198D54(u8 windowId, u8 fontId, u8 a2, u8 a3, u8 a4, u8 a5, const struct MenuAction *menuActions) @@ -1273,7 +1272,7 @@ void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth } } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } // Unused @@ -1608,7 +1607,7 @@ void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *menuActi AddTextPrinterParameterized(windowId, 1, menuActions[i].text, 8, (i * 16) + 1, 0xFF, NULL); } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) @@ -1635,7 +1634,7 @@ void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *menuActions AddTextPrinter(&printer, 0xFF, NULL); } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 paletteNum, u8 initialCursorPos) @@ -1672,7 +1671,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const for (j = 0; j < columns; j++) AddTextPrinterParameterized(windowId, 1, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, 0xFF, NULL); } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *menuActions, const u8 *actionIds) @@ -1703,7 +1702,7 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M } } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } u8 InitMenuActionGrid(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos) diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 6e13a769f6..d5bb975c8c 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -754,7 +754,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL); if (chosenMove == LIST_CANCEL) { - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); return; } move = &gBattleMoves[chosenMove]; @@ -813,7 +813,7 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) if (chosenMove == MENU_NOTHING_CHOSEN) { - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); return; } @@ -824,7 +824,7 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) str = gContestEffectDescriptionPointers[move->effect]; AddTextPrinterParameterized(1, FONT_NARROW, str, 0, 0x41, TEXT_SPEED_FF, NULL); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); } static void MoveRelearnerCursorCallback(s32 itemIndex, bool8 onInit, struct ListMenu *list) diff --git a/src/money.c b/src/money.c index db571939a8..c331462d4e 100644 --- a/src/money.c +++ b/src/money.c @@ -171,7 +171,7 @@ void DrawMoneyBox(int amount, u8 x, u8 y) sMoneyBoxWindowId = AddWindow(&template); FillWindowPixelBuffer(sMoneyBoxWindowId, PIXEL_FILL(0)); PutWindowTilemap(sMoneyBoxWindowId); - CopyWindowToVram(sMoneyBoxWindowId, 1); + CopyWindowToVram(sMoneyBoxWindowId, COPYWIN_MAP); PrintMoneyAmountInMoneyBoxWithBorder(sMoneyBoxWindowId, 0x214, 14, amount); AddMoneyLabelObject((8 * x) + 19, (8 * y) + 11); } @@ -180,7 +180,7 @@ void HideMoneyBox(void) { RemoveMoneyLabelObject(); ClearStdWindowAndFrameToTransparent(sMoneyBoxWindowId, FALSE); - CopyWindowToVram(sMoneyBoxWindowId, 2); + CopyWindowToVram(sMoneyBoxWindowId, COPYWIN_GFX); RemoveWindow(sMoneyBoxWindowId); } diff --git a/src/move_relearner.c b/src/move_relearner.c index 554f84fe98..92d2306167 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -687,7 +687,7 @@ static void DoMoveRelearnerMain(void) ShowTeachMoveText(TRUE); } RemoveScrollArrows(); - CopyWindowToVram(3, 2); + CopyWindowToVram(3, COPYWIN_GFX); break; case MENU_STATE_TRY_OVERWRITE_MOVE: if (!gPaletteFade.active) diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c index 0bf65a91c8..f36995a9ce 100644 --- a/src/mystery_event_menu.c +++ b/src/mystery_event_menu.c @@ -136,7 +136,7 @@ static void CB2_MysteryEventMenu(void) case 0: DrawStdFrameWithCustomTileAndPalette(0, 1, 1, 0xD); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); ShowBg(0); BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); gMain.state++; @@ -184,7 +184,7 @@ static void CB2_MysteryEventMenu(void) DrawStdFrameWithCustomTileAndPalette(1, 1, 1, 0xD); PrintMysteryMenuText(1, gText_LoadingEvent, 1, 2, 0); PutWindowTilemap(1); - CopyWindowToVram(1, 3); + CopyWindowToVram(1, COPYWIN_FULL); gMain.state++; } else if (JOY_NEW(B_BUTTON)) diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index cd12e163ce..a6d5953f99 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -492,7 +492,7 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel) AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header); AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); PutWindowTilemap(0); } @@ -540,14 +540,14 @@ void AddTextPrinterToWindow1(const u8 *str) AddTextPrinterParameterized4(1, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(1, 0x001, 0xF); PutWindowTilemap(1); - CopyWindowToVram(1, 3); + CopyWindowToVram(1, COPYWIN_FULL); } static void ClearTextWindow(void) { rbox_fill_rectangle(1); ClearWindowTilemap(1); - CopyWindowToVram(1, 1); + CopyWindowToVram(1, COPYWIN_MAP); } #define DOWN_ARROW_X 208 @@ -649,7 +649,7 @@ static u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whi if (response != LIST_NOTHING_CHOSEN) { ClearWindowTilemap(2); - CopyWindowToVram(2, 1); + CopyWindowToVram(2, COPYWIN_MAP); } return response; } @@ -671,7 +671,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c FillWindowPixelBuffer(*windowId, 0x11); AddTextPrinterParameterized4(*windowId, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); - CopyWindowToVram(*windowId, 2); + CopyWindowToVram(*windowId, COPYWIN_GFX); PutWindowTilemap(*windowId); (*textState)++; break; @@ -693,7 +693,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c *textState = 0; rbox_fill_rectangle(*windowId); ClearWindowTilemap(*windowId); - CopyWindowToVram(*windowId, 1); + CopyWindowToVram(*windowId, COPYWIN_MAP); RemoveWindow(*windowId); return input; } @@ -702,7 +702,7 @@ s8 DoMysteryGiftYesNo(u8 * textState, u16 * windowId, bool8 yesNoBoxPlacement, c *textState = 0; rbox_fill_rectangle(*windowId); ClearWindowTilemap(*windowId); - CopyWindowToVram(*windowId, 1); + CopyWindowToVram(*windowId, COPYWIN_MAP); RemoveWindow(*windowId); return MENU_B_PRESSED; } @@ -728,7 +728,7 @@ static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotTos FillWindowPixelBuffer(*windowId, 0x11); AddTextPrinterParameterized4(*windowId, FONT_NORMAL, 0, 1, 0, 0, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); - CopyWindowToVram(*windowId, 2); + CopyWindowToVram(*windowId, COPYWIN_GFX); PutWindowTilemap(*windowId); (*textState)++; break; @@ -753,7 +753,7 @@ static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotTos *textState = 0; rbox_fill_rectangle(*windowId); ClearWindowTilemap(*windowId); - CopyWindowToVram(*windowId, 1); + CopyWindowToVram(*windowId, COPYWIN_MAP); RemoveWindow(*windowId); return input; } @@ -762,7 +762,7 @@ static s32 HandleGiftSelectMenu(u8 * textState, u16 * windowId, bool32 cannotTos *textState = 0; rbox_fill_rectangle(*windowId); ClearWindowTilemap(*windowId); - CopyWindowToVram(*windowId, 1); + CopyWindowToVram(*windowId, COPYWIN_MAP); RemoveWindow(*windowId); return LIST_CANCEL; } diff --git a/src/mystery_gift_view.c b/src/mystery_gift_view.c index 400367b920..cf3a019f53 100644 --- a/src/mystery_gift_view.c +++ b/src/mystery_gift_view.c @@ -479,7 +479,7 @@ static void DrawCardWindow(u8 whichWindow) } break; } - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } static void CreateCardSprites(void) @@ -905,8 +905,8 @@ static void DrawNewsWindows(void) sNews_TextColorTable[sWonderNewsData->gfx->bodyTextPal], 0, sWonderNewsData->bodyText[i]); - CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_TITLE], 3); - CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_BODY], 3); + CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_TITLE], COPYWIN_FULL); + CopyWindowToVram(sWonderNewsData->windowIds[NEWS_WIN_BODY], COPYWIN_FULL); } static void UpdateNewsScroll(void) diff --git a/src/naming_screen.c b/src/naming_screen.c index 65629215ca..1d42d70631 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -741,7 +741,7 @@ static void DisplaySentToPCMessage(void) DrawDialogueFrame(0, 0); gTextFlags.canABSpeedUpPrint = TRUE; AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static bool8 MainState_WaitSentToPCMessage(void) @@ -1925,7 +1925,7 @@ static void DrawTextEntry(void) } TryDrawGenderIcon(); - CopyWindowToVram(sNamingScreen->windows[WIN_TEXT_ENTRY], 2); + CopyWindowToVram(sNamingScreen->windows[WIN_TEXT_ENTRY], COPYWIN_GFX); PutWindowTilemap(sNamingScreen->windows[WIN_TEXT_ENTRY]); } @@ -2012,7 +2012,7 @@ static void PrintControls(void) FillWindowPixelBuffer(sNamingScreen->windows[WIN_BANNER], PIXEL_FILL(15)); AddTextPrinterParameterized3(sNamingScreen->windows[WIN_BANNER], FONT_SMALL, 2, 1, color, 0, gText_MoveOkBack); PutWindowTilemap(sNamingScreen->windows[WIN_BANNER]); - CopyWindowToVram(sNamingScreen->windows[WIN_BANNER], 3); + CopyWindowToVram(sNamingScreen->windows[WIN_BANNER], COPYWIN_FULL); } static void CB2_NamingScreen(void) diff --git a/src/option_menu.c b/src/option_menu.c index d96ed1ecfa..58d63b19b2 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -251,7 +251,7 @@ void CB2_InitOptionMenu(void) FrameType_DrawChoices(gTasks[taskId].data[TD_FRAMETYPE]); HighlightOptionMenuItem(gTasks[taskId].data[TD_MENUSELECTION]); - CopyWindowToVram(WIN_OPTIONS, 3); + CopyWindowToVram(WIN_OPTIONS, COPYWIN_FULL); gMain.state++; break; } @@ -351,7 +351,7 @@ static void Task_OptionMenuProcessInput(u8 taskId) if (sArrowPressed) { sArrowPressed = FALSE; - CopyWindowToVram(WIN_OPTIONS, 2); + CopyWindowToVram(WIN_OPTIONS, COPYWIN_GFX); } } } @@ -627,7 +627,7 @@ static void DrawTextOption(void) { FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1)); AddTextPrinterParameterized(WIN_TEXT_OPTION, FONT_NORMAL, gText_Option, 8, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(WIN_TEXT_OPTION, 3); + CopyWindowToVram(WIN_TEXT_OPTION, COPYWIN_FULL); } static void DrawOptionMenuTexts(void) @@ -636,10 +636,8 @@ static void DrawOptionMenuTexts(void) FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1)); for (i = 0; i < MENUITEM_COUNT; i++) - { AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); - } - CopyWindowToVram(WIN_OPTIONS, 3); + CopyWindowToVram(WIN_OPTIONS, COPYWIN_FULL); } #define TILE_TOP_CORNER_L 0x1A2 diff --git a/src/party_menu.c b/src/party_menu.c index ae55463b8c..609d5249ff 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -754,7 +754,7 @@ static void RenderPartyMenuBox(u8 slot) LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_NO_MON); else LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_MULTI_ALT); - CopyWindowToVram(sPartyMenuBoxes[slot].windowId, 2); + CopyWindowToVram(sPartyMenuBoxes[slot].windowId, COPYWIN_GFX); PutWindowTilemap(sPartyMenuBoxes[slot].windowId); ScheduleBgCopyTilemapToVram(2); } @@ -764,7 +764,7 @@ static void RenderPartyMenuBox(u8 slot) { DrawEmptySlot(sPartyMenuBoxes[slot].windowId); LoadPartyBoxPalette(&sPartyMenuBoxes[slot], PARTY_PAL_NO_MON); - CopyWindowToVram(sPartyMenuBoxes[slot].windowId, 2); + CopyWindowToVram(sPartyMenuBoxes[slot].windowId, COPYWIN_GFX); } else { @@ -2038,7 +2038,7 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf) mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gMenuText_Confirm, 48); AddTextPrinterParameterized4(confirmWindowId, FONT_SMALL, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); PutWindowTilemap(confirmWindowId); - CopyWindowToVram(confirmWindowId, 2); + CopyWindowToVram(confirmWindowId, COPYWIN_GFX); cancelWindowId = AddWindow(&sMultiCancelButtonWindowTemplate); offset = 0; } @@ -2061,7 +2061,7 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf) AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2); } PutWindowTilemap(cancelWindowId); - CopyWindowToVram(cancelWindowId, 2); + CopyWindowToVram(cancelWindowId, COPYWIN_GFX); ScheduleBgCopyTilemapToVram(0); } } @@ -2354,7 +2354,7 @@ static void DisplayPartyPokemonHPBar(u16 hp, u16 maxhp, struct PartyMenuBox *men FillWindowPixelRect(menuBox->windowId, 0x0D, menuBox->infoRects->dimensions[20] + hpFraction, menuBox->infoRects->dimensions[21], menuBox->infoRects->dimensions[22] - hpFraction, 1); FillWindowPixelRect(menuBox->windowId, 0x02, menuBox->infoRects->dimensions[20] + hpFraction, menuBox->infoRects->dimensions[21] + 1, menuBox->infoRects->dimensions[22] - hpFraction, 2); } - CopyWindowToVram(menuBox->windowId, 2); + CopyWindowToVram(menuBox->windowId, COPYWIN_GFX); } static void DisplayPartyPokemonDescriptionText(u8 stringID, struct PartyMenuBox *menuBox, u8 c) @@ -4954,7 +4954,7 @@ static void DisplayLevelUpStatsPg1(u8 taskId) arrayPtr[12] = CreateLevelUpStatsWindow(); DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); - CopyWindowToVram(arrayPtr[12], 2); + CopyWindowToVram(arrayPtr[12], COPYWIN_GFX); ScheduleBgCopyTilemapToVram(2); } @@ -4963,7 +4963,7 @@ static void DisplayLevelUpStatsPg2(u8 taskId) s16 *arrayPtr = sPartyMenuInternal->data; DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); - CopyWindowToVram(arrayPtr[12], 2); + CopyWindowToVram(arrayPtr[12], COPYWIN_GFX); ScheduleBgCopyTilemapToVram(2); } diff --git a/src/player_pc.c b/src/player_pc.c index b83ecdaba7..0742341ece 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -1144,7 +1144,7 @@ static void ItemStorage_CreateListMenu(u8 taskId) text = gText_WithdrawItem; x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 104); AddTextPrinterParameterized(sItemStorageMenu->windowIds[ITEMPC_WIN_TITLE], FONT_NORMAL, text, x, 1, 0, NULL); - CopyWindowToVram(sItemStorageMenu->windowIds[ITEMPC_WIN_ICON], 2); + CopyWindowToVram(sItemStorageMenu->windowIds[ITEMPC_WIN_ICON], COPYWIN_GFX); ItemStorage_CompactList(); ItemStorage_CompactCursor(); ItemStorage_RefreshListMenu(); diff --git a/src/pokeblock.c b/src/pokeblock.c index 77c22d24ab..b5f1c92987 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -802,7 +802,7 @@ static void DrawPokeblockInfo(s32 pkblId) for (i = 0; i < FLAVOR_COUNT; i++) CopyToBgTilemapBufferRect(2, rectTilemapSrc, (i / 3 * 6) + 1, (i % 3 * 2) + 13, 1, 2); - CopyWindowToVram(7, 2); + CopyWindowToVram(7, COPYWIN_GFX); } ScheduleBgCopyTilemapToVram(0); diff --git a/src/pokedex.c b/src/pokedex.c index 8a85762436..ae4def99a3 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -2081,7 +2081,7 @@ static bool8 LoadPokedexListPage(u8 page) InitWindows(sPokemonList_WindowTemplate); DeactivateAllTextPrinters(); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gMain.state = 1; break; case 1: @@ -2412,7 +2412,7 @@ static void CreateMonListEntry(u8 position, u16 b, u16 ignored) } break; } - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); } static void CreateMonDexNum(u16 entryNum, u8 left, u8 top, u16 unused) @@ -3248,7 +3248,7 @@ static void Task_LoadInfoScreen(u8 taskId) PutWindowTilemap(WIN_INFO); PutWindowTilemap(WIN_FOOTPRINT); DrawFootprint(WIN_FOOTPRINT, sPokedexListItem->dexNum); - CopyWindowToVram(WIN_FOOTPRINT, 2); + CopyWindowToVram(WIN_FOOTPRINT, COPYWIN_GFX); gMain.state++; break; case 2: @@ -3264,7 +3264,7 @@ static void Task_LoadInfoScreen(u8 taskId) PrintMonInfo(sPokedexListItem->dexNum, sPokedexView->dexMode == DEX_MODE_HOENN ? FALSE : TRUE, sPokedexListItem->owned, 0); if (!sPokedexListItem->owned) LoadPalette(gPlttBufferUnfaded + 1, 0x31, 0x1E); - CopyWindowToVram(WIN_INFO, 3); + CopyWindowToVram(WIN_INFO, COPYWIN_FULL); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(3); @@ -3594,8 +3594,8 @@ static void Task_LoadCryScreen(u8 taskId) cryMeter.yPos = 3; if (LoadCryMeter(&cryMeter, 3)) gMain.state++; - CopyWindowToVram(WIN_VU_METER, 2); - CopyWindowToVram(WIN_INFO, 3); + CopyWindowToVram(WIN_VU_METER, COPYWIN_GFX); + CopyWindowToVram(WIN_INFO, COPYWIN_FULL); CopyBgTilemapBufferToVram(0); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); @@ -3780,7 +3780,7 @@ static void Task_LoadSizeScreen(u8 taskId) SetOamMatrix(2, gPokedexEntries[sPokedexListItem->dexNum].pokemonScale, 0, 0, gPokedexEntries[sPokedexListItem->dexNum].pokemonScale); LoadPalette(sSizeScreenSilhouette_Pal, (gSprites[spriteId].oam.paletteNum + 16) * 16, 0x20); gTasks[taskId].tMonSpriteId = spriteId; - CopyWindowToVram(WIN_INFO, 3); + CopyWindowToVram(WIN_INFO, COPYWIN_FULL); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(3); @@ -3975,7 +3975,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) PutWindowTilemap(WIN_INFO); PutWindowTilemap(WIN_FOOTPRINT); DrawFootprint(WIN_FOOTPRINT, gTasks[taskId].tDexNum); - CopyWindowToVram(WIN_FOOTPRINT, 2); + CopyWindowToVram(WIN_FOOTPRINT, COPYWIN_GFX); ResetPaletteFade(); LoadPokedexBgPalette(FALSE); gTasks[taskId].tState++; @@ -3985,7 +3985,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) break; case 3: PrintMonInfo(dexNum, IsNationalPokedexEnabled(), 1, 1); - CopyWindowToVram(WIN_INFO, 3); + CopyWindowToVram(WIN_INFO, COPYWIN_FULL); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(3); gTasks[taskId].tState++; @@ -4847,7 +4847,7 @@ static void Task_LoadSearchMenu(u8 taskId) SetDefaultSearchModeAndOrder(taskId); HighlightSelectedSearchTopBarItem(SEARCH_TOPBAR_SEARCH); PrintSelectedSearchParameters(taskId); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(3); @@ -4901,7 +4901,7 @@ static void Task_SwitchToSearchMenuTopBar(u8 taskId) { HighlightSelectedSearchTopBarItem(gTasks[taskId].tTopBarItem); PrintSelectedSearchParameters(taskId); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); gTasks[taskId].func = Task_HandleSearchTopBarInput; } @@ -4940,7 +4940,7 @@ static void Task_HandleSearchTopBarInput(u8 taskId) PlaySE(SE_DEX_PAGE); gTasks[taskId].tTopBarItem--; HighlightSelectedSearchTopBarItem(gTasks[taskId].tTopBarItem); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); } if (JOY_NEW(DPAD_RIGHT) && gTasks[taskId].tTopBarItem < SEARCH_TOPBAR_CANCEL) @@ -4948,7 +4948,7 @@ static void Task_HandleSearchTopBarInput(u8 taskId) PlaySE(SE_DEX_PAGE); gTasks[taskId].tTopBarItem++; HighlightSelectedSearchTopBarItem(gTasks[taskId].tTopBarItem); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); } } @@ -4957,7 +4957,7 @@ static void Task_SwitchToSearchMenu(u8 taskId) { HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); PrintSelectedSearchParameters(taskId); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); gTasks[taskId].func = Task_HandleSearchMenuInput; } @@ -5013,7 +5013,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) EraseAndPrintSearchTextBox(gText_SearchingPleaseWait); gTasks[taskId].func = Task_StartPokedexSearch; PlaySE(SE_DEX_SEARCH); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); } } else @@ -5029,7 +5029,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) PlaySE(SE_SELECT); gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][0]; HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); } if (JOY_NEW(DPAD_RIGHT) && movementMap[gTasks[taskId].tMenuItem][1] != 0xFF) @@ -5037,7 +5037,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) PlaySE(SE_SELECT); gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][1]; HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); } if (JOY_NEW(DPAD_UP) && movementMap[gTasks[taskId].tMenuItem][2] != 0xFF) @@ -5045,7 +5045,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) PlaySE(SE_SELECT); gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][2]; HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); } if (JOY_NEW(DPAD_DOWN) && movementMap[gTasks[taskId].tMenuItem][3] != 0xFF) @@ -5053,7 +5053,7 @@ static void Task_HandleSearchMenuInput(u8 taskId) PlaySE(SE_SELECT); gTasks[taskId].tMenuItem = movementMap[gTasks[taskId].tMenuItem][3]; HighlightSelectedSearchMenuItem(gTasks[taskId].tTopBarItem, gTasks[taskId].tMenuItem); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); } } @@ -5086,7 +5086,7 @@ static void Task_WaitAndCompleteSearch(u8 taskId) EraseAndPrintSearchTextBox(gText_NoMatchingPkmnWereFound); } gTasks[taskId].func = Task_SearchCompleteWaitForInput; - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); } } @@ -5126,7 +5126,7 @@ static void Task_SelectSearchMenuItem(u8 taskId) PrintSearchParameterText(taskId); PrintSelectorArrow(*cursorPos); gTasks[taskId].func = Task_HandleSearchParameterInput; - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); } @@ -5151,7 +5151,7 @@ static void Task_HandleSearchParameterInput(u8 taskId) ClearSearchParameterBoxText(); DrawOrEraseSearchParameterBox(TRUE); gTasks[taskId].func = Task_SwitchToSearchMenu; - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); return; } @@ -5163,7 +5163,7 @@ static void Task_HandleSearchParameterInput(u8 taskId) *cursorPos = gTasks[taskId].tCursorPos; *scrollOffset = gTasks[taskId].tScrollOffset; gTasks[taskId].func = Task_SwitchToSearchMenu; - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); CopyBgTilemapBufferToVram(3); return; } @@ -5190,7 +5190,7 @@ static void Task_HandleSearchParameterInput(u8 taskId) { PlaySE(SE_SELECT); EraseAndPrintSearchTextBox(texts[*cursorPos + *scrollOffset].description); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); } return; } @@ -5216,7 +5216,7 @@ static void Task_HandleSearchParameterInput(u8 taskId) { PlaySE(SE_SELECT); EraseAndPrintSearchTextBox(texts[*cursorPos + *scrollOffset].description); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); } return; } diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c index 350946f3b2..a01c06daab 100644 --- a/src/pokedex_cry_screen.c +++ b/src/pokedex_cry_screen.c @@ -432,7 +432,7 @@ static void DrawWaveformSegment(u8 position, u8 amplitude) static void DrawWaveformWindow(u8 windowId) { - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } // rsVertical is leftover from a very different version of this function in RS diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index c95a86a41a..dd213989cb 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3314,7 +3314,7 @@ static void Msg_WantToPlayAgain(void) case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(1, 8, 20, 2); AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_WantToPlayAgain2, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); + CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; case 1: @@ -3341,7 +3341,7 @@ static void Msg_SavingDontTurnOff(void) case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 7, 26, 4); AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); + CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; case 1: @@ -3366,7 +3366,7 @@ static void EraseMessage(void) { case 0: ClearMessageWindow(); - sub_8198C78(); + EraseYesNoWindow(); CopyBgTilemapBufferToVram(BG_INTERFACE); sPokemonJumpGfx->mainState++; break; @@ -3384,7 +3384,7 @@ static void Msg_SomeoneDroppedOut(void) case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 8, 22, 4); AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SomeoneDroppedOut2, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); + CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; case 1: @@ -3410,7 +3410,7 @@ static void Msg_CommunicationStandby(void) case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(7, 10, 16, 2); AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_CommunicationStandby4, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); + CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; case 1: @@ -3488,7 +3488,7 @@ static void PrintPrizeMessage(u16 itemId, u16 quantity) DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_AwesomeWonF701F700); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4); AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); + CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_LEVEL_UP; sPokemonJumpGfx->msgWindowState = 0; } @@ -3501,7 +3501,7 @@ static void PrintPrizeFilledBagMessage(u16 itemId) DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_FilledStorageSpace2); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4); AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); + CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_DUMMY; sPokemonJumpGfx->msgWindowState = 0; } @@ -3514,7 +3514,7 @@ static void PrintNoRoomForPrizeMessage(u16 itemId) DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_CantHoldMore); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 9, 22, 2); AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 2); + CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_DUMMY; sPokemonJumpGfx->msgWindowState = 0; } @@ -3558,7 +3558,7 @@ static void ClearMessageWindow(void) if (sPokemonJumpGfx->msgWindowId != WINDOW_NONE) { rbox_fill_rectangle(sPokemonJumpGfx->msgWindowId); - CopyWindowToVram(sPokemonJumpGfx->msgWindowId, 1); + CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_MAP); sPokemonJumpGfx->msgWindowState = 0; } } @@ -3858,7 +3858,7 @@ static void PrintPokeJumpPlayerName(int multiplayerId, u8 bgColor, u8 fgColor, u x = 64 - GetStringWidth(FONT_NORMAL, GetPokeJumpPlayerName(multiplayerId), -1); x /= 2; AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_NORMAL, x, 1, colors, -1, GetPokeJumpPlayerName(multiplayerId)); - CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], 2); + CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], COPYWIN_GFX); } static void PrintPokeJumpPlayerNames(bool32 highlightSelf) @@ -4176,7 +4176,7 @@ static void Task_ShowPokemonJumpRecords(u8 taskId) window.width = width; tWindowId = AddWindow(&window); PrintRecordsText(tWindowId, width); - CopyWindowToVram(tWindowId, 3); + CopyWindowToVram(tWindowId, COPYWIN_FULL); tState++; break; case 1: @@ -4187,7 +4187,7 @@ static void Task_ShowPokemonJumpRecords(u8 taskId) if (JOY_NEW(A_BUTTON | B_BUTTON)) { rbox_fill_rectangle(tWindowId); - CopyWindowToVram(tWindowId, 1); + CopyWindowToVram(tWindowId, COPYWIN_MAP); tState++; } break; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index ee2d9b1a79..f936d87119 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1562,8 +1562,8 @@ static void Task_PCMainMenu(u8 taskId) DrawDialogueFrame(0, 0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SPEED_FF, NULL, 2, 1, 3); - CopyWindowToVram(0, 3); - CopyWindowToVram(task->tWindowId, 3); + CopyWindowToVram(0, COPYWIN_FULL); + CopyWindowToVram(task->tWindowId, COPYWIN_FULL); task->tState++; break; case STATE_FADE_IN: @@ -4018,7 +4018,7 @@ static void PrintDisplayMonInfo(void) AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SPEED_FF, NULL); } - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); if (sStorage->displayMonSpecies != SPECIES_NONE) { UpdateMonMarkingTiles(sStorage->displayMonMarkings, sStorage->markingComboTilesPtr); @@ -4322,7 +4322,7 @@ static void PrintMessage(u8 id) AddTextPrinterParameterized(1, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SPEED_FF, NULL); DrawTextBorderOuter(1, 2, 14); PutWindowTilemap(1); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); ScheduleBgCopyTilemapToVram(0); } @@ -8191,7 +8191,7 @@ static bool8 MultiMove_Start(void) MultiMove_SetIconToBg(sMultiMove->fromColumn, sMultiMove->fromRow); SetBgAttribute(0, BG_ATTR_PALETTEMODE, 1); PutWindowTilemap(sStorage->multiMoveWindowId); - CopyWindowToVram8Bit(sStorage->multiMoveWindowId, 3); + CopyWindowToVram8Bit(sStorage->multiMoveWindowId, COPYWIN_FULL); BlendPalettes(0x3F00, 8, RGB_WHITE); StartCursorAnim(CURSOR_ANIM_OPEN); SetGpuRegBits(REG_OFFSET_BG0CNT, BGCNT_256COLOR); @@ -8247,7 +8247,7 @@ static bool8 MultiMove_ChangeSelection(void) MultiMove_UpdateSelectedIcons(); sMultiMove->toColumn = sMultiMove->cursorColumn; sMultiMove->toRow = sMultiMove->cursorRow; - CopyWindowToVram8Bit(sStorage->multiMoveWindowId, 2); + CopyWindowToVram8Bit(sStorage->multiMoveWindowId, COPYWIN_GFX); sMultiMove->state++; } break; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 4c5b351abc..c83ce727f6 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3677,7 +3677,7 @@ static void AddAndFillMoveNamesWindow(void) { u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, PSS_DATA_WINDOW_MOVE_NAMES); FillWindowPixelRect(windowId, PIXEL_FILL(0), 0, 66, 72, 16); - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } static void SwapMovesNamesPP(u8 moveIndex1, u8 moveIndex2) diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index 089a56e263..4862fdc6f6 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -596,9 +596,9 @@ bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode) { case 0: if (winMode) - CopyWindowToVram(structPtr->nameGenderWindowId, 3); + CopyWindowToVram(structPtr->nameGenderWindowId, COPYWIN_FULL); else - CopyWindowToVram(structPtr->nameGenderWindowId, 2); + CopyWindowToVram(structPtr->nameGenderWindowId, COPYWIN_GFX); if (IsConditionMenuSearchMode() == TRUE) { @@ -612,9 +612,9 @@ bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode) } case 1: if (winMode) - CopyWindowToVram(structPtr->listIndexWindowId, 3); + CopyWindowToVram(structPtr->listIndexWindowId, COPYWIN_FULL); else - CopyWindowToVram(structPtr->listIndexWindowId, 2); + CopyWindowToVram(structPtr->listIndexWindowId, COPYWIN_GFX); structPtr->windowModeState = 0; return TRUE; @@ -628,8 +628,8 @@ void CopyUnusedConditionWindowsToVram(void) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); - CopyWindowToVram(structPtr->unusedWindowId1, 3); - CopyWindowToVram(structPtr->unusedWindowId2, 3); + CopyWindowToVram(structPtr->unusedWindowId1, COPYWIN_FULL); + CopyWindowToVram(structPtr->unusedWindowId2, COPYWIN_FULL); } void sub_81CE964(struct Sprite *sprite) diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 0e5a9b7853..37079b1718 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -644,7 +644,7 @@ static void AddSearchResultListMenuWindow(struct PokenavSub8 *searchList) { searchList->winid = AddWindow(&sSearchResultListMenuWindowTemplate); PutWindowTilemap(searchList->winid); - CopyWindowToVram(searchList->winid, 1); + CopyWindowToVram(searchList->winid, COPYWIN_MAP); PrintSearchResultListMenuItems(searchList); } @@ -658,7 +658,7 @@ static void PrintSearchResultListMenuItems(struct PokenavSub8 *searchList) AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar2, 4, 1, 0xFF, NULL); ConvertIntToDecimalStringN(gStringVar1, r7, STR_CONV_MODE_RIGHT_ALIGN, 3); AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar1, 34, 1, 0xFF, NULL); - CopyWindowToVram(searchList->winid, 2); + CopyWindowToVram(searchList->winid, COPYWIN_GFX); } static void InitConditionSearchListMenuTemplate(void) diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index 0166cc10c9..5936ef9d21 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -555,7 +555,7 @@ static void InitHelpBar(void) structPtr->helpBarWindowId = 0; DrawHelpBar(structPtr->helpBarWindowId); PutWindowTilemap(structPtr->helpBarWindowId); - CopyWindowToVram(structPtr->helpBarWindowId, 3); // TODO: Use a defined constant here. + CopyWindowToVram(structPtr->helpBarWindowId, COPYWIN_FULL); } void PrintHelpBarText(u32 textId) diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 727aa36940..e8751e0bf9 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -942,7 +942,7 @@ static void DrawMatchCallLeftColumnWindows(struct Pokenav4Struct *state) PutWindowTilemap(state->locWindowId); FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); PutWindowTilemap(state->infoBoxWindowId); - CopyWindowToVram(state->locWindowId, 1); + CopyWindowToVram(state->locWindowId, COPYWIN_MAP); } static void UpdateMatchCallInfoBox(struct Pokenav4Struct *state) @@ -952,7 +952,7 @@ static void UpdateMatchCallInfoBox(struct Pokenav4Struct *state) PrintNumberRegistered(state->infoBoxWindowId); PrintNumberOfBattlesLabel(state->infoBoxWindowId); PrintNumberOfBattles(state->infoBoxWindowId); - CopyWindowToVram(state->infoBoxWindowId, 2); + CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX); } static void PrintNumberRegisteredLabel(u16 windowId) @@ -1026,7 +1026,7 @@ static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state) AddTextPrinterParameterized(state->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); } - CopyWindowToVram(state->infoBoxWindowId, 2); + CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX); } static bool32 sub_81CBFC4(struct Pokenav4Struct *state) @@ -1055,7 +1055,7 @@ static void UpdateWindowsToShowCheckPage(struct Pokenav4Struct *state) { CloseMatchCallSelectOptionsWindow(state); FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); - CopyWindowToVram(state->infoBoxWindowId, 2); + CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX); } static void sub_81CC034(struct Pokenav4Struct *state) @@ -1072,7 +1072,7 @@ static void DrawMsgBoxForMatchCallMsg(struct Pokenav4Struct *state) DrawMatchCallTextBoxBorder(state->msgBoxWindowId, 1, 4); FillWindowPixelBuffer(state->msgBoxWindowId, PIXEL_FILL(1)); PutWindowTilemap(state->msgBoxWindowId); - CopyWindowToVram(state->msgBoxWindowId, 3); + CopyWindowToVram(state->msgBoxWindowId, COPYWIN_FULL); sprite = PauseSpinningPokenavSprite(); sprite->x = 24; sprite->y = 112; @@ -1085,7 +1085,7 @@ static void DrawMsgBoxForCloseByMsg(struct Pokenav4Struct *state) DrawTextBorderOuter(state->msgBoxWindowId, 1, 4); FillWindowPixelBuffer(state->msgBoxWindowId, PIXEL_FILL(1)); PutWindowTilemap(state->msgBoxWindowId); - CopyWindowToVram(state->msgBoxWindowId, 3); + CopyWindowToVram(state->msgBoxWindowId, COPYWIN_FULL); } static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav4Struct *state) diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index dc3be81813..b8e543c67e 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -184,7 +184,7 @@ void sub_81C835C(struct PokenavListMenuWindow *listWindow) { FillWindowPixelBuffer(listWindow->windowId, PIXEL_FILL(1)); PutWindowTilemap(listWindow->windowId); - CopyWindowToVram(listWindow->windowId, 1); + CopyWindowToVram(listWindow->windowId, COPYWIN_MAP); } void sub_81C837C(struct MatchCallWindowState *state, struct PokenavSub17Substruct *a1) @@ -232,9 +232,9 @@ u32 LoopedTask_sub_81C83F0(s32 state) if (++structPtr->listWindow.unkC >= structPtr->listWindow.unkE) { if (structPtr->unk38 != NULL) - CopyWindowToVram(structPtr->listWindow.windowId, 3); + CopyWindowToVram(structPtr->listWindow.windowId, COPYWIN_FULL); else - CopyWindowToVram(structPtr->listWindow.windowId, 2); + CopyWindowToVram(structPtr->listWindow.windowId, COPYWIN_GFX); return LT_INC_AND_PAUSE; } else @@ -495,7 +495,7 @@ void sub_81C8838(void) struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); struct MatchCallWindowState *subPtr = &structPtr->unk888; structPtr->list.unk38(structPtr->list.listWindow.windowId, subPtr->windowTopIndex + subPtr->selectedIndexOffset, (structPtr->list.listWindow.unkA + subPtr->selectedIndexOffset) & 0xF); - CopyWindowToVram(structPtr->list.listWindow.windowId, 1); + CopyWindowToVram(structPtr->list.listWindow.windowId, COPYWIN_MAP); } // TODO: @@ -673,7 +673,7 @@ void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2) if (a1 + a2 <= 16) { CpuFastFill8(PIXEL_FILL(1), v1 + a1 * v2, a2 * v2); - CopyWindowToVram(listWindow->windowId, 2); + CopyWindowToVram(listWindow->windowId, COPYWIN_GFX); } else { @@ -682,13 +682,13 @@ void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2) CpuFastFill8(PIXEL_FILL(1), v1 + a1 * v2, v3 * v2); CpuFastFill8(PIXEL_FILL(1), v1, v4 * v2); - CopyWindowToVram(listWindow->windowId, 2); + CopyWindowToVram(listWindow->windowId, COPYWIN_GFX); } for (a2--; a2 != -1; a1 = (a1 + 1) & 0xF, a2--) ClearRematchPokeballIcon(listWindow->windowId, a1); - CopyWindowToVram(listWindow->windowId, 1); + CopyWindowToVram(listWindow->windowId, COPYWIN_MAP); } void sub_81C8C64(struct PokenavListMenuWindow *listWindow, u32 a1) @@ -715,7 +715,7 @@ void sub_81C8CB4(struct MatchCallWindowState *state, struct PokenavSub17Substruc FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(4), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16); AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SPEED_FF, list->unkTextBuffer); sub_81C8C64(&list->listWindow, 1); - CopyWindowRectToVram(list->listWindow.windowId, 3, 0, list->listWindow.unkA * 2, list->listWindow.unk4, 2); + CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_FULL, 0, list->listWindow.unkA * 2, list->listWindow.unk4, 2); } void sub_81C8D4C(struct MatchCallWindowState *state, struct PokenavSub17Substruct *list) @@ -724,7 +724,7 @@ void sub_81C8D4C(struct MatchCallWindowState *state, struct PokenavSub17Substruc FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16); AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->unkTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SPEED_FF, NULL); sub_81C8C64(&list->listWindow, 0); - CopyWindowToVram(list->listWindow.windowId, 3); + CopyWindowToVram(list->listWindow.windowId, COPYWIN_FULL); } void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId) @@ -735,7 +735,7 @@ void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId) FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.unk4, 16); AddTextPrinterParameterized3(list->listWindow.windowId, FONT_NARROW, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]); - CopyWindowRectToVram(list->listWindow.windowId, 2, 0, top << 1, list->listWindow.unk4, 2); + CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, top << 1, list->listWindow.unk4, 2); } static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *list, u32 checkPageEntry) @@ -756,7 +756,7 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok { sub_81DB620(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2); AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL); - CopyWindowRectToVram(list->listWindow.windowId, 2, 0, r6 * 2, list->listWindow.unk4, 2); + CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, r6 * 2, list->listWindow.unk4, 2); } } diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index ded4c70077..10b6703da3 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -1125,7 +1125,7 @@ static void AddOptionDescriptionWindow(void) ptr->optionDescWindowId = AddWindow(&sOptionDescWindowTemplate); PutWindowTilemap(ptr->optionDescWindowId); FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6)); - CopyWindowToVram(ptr->optionDescWindowId, 3); + CopyWindowToVram(ptr->optionDescWindowId, COPYWIN_FULL); } static void PrintCurrentOptionDescription(void) diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 07788a5d30..8da5ddc908 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -511,7 +511,7 @@ static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *state) DecompressAndCopyTileDataToVram(1, sRegionMapCityZoomTiles_Gfx, 0, 0, 0); FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); PutWindowTilemap(state->infoWindowId); - CopyWindowToVram(state->infoWindowId, 3); + CopyWindowToVram(state->infoWindowId, COPYWIN_FULL); CopyPaletteIntoBufferUnfaded(sMapSecInfoWindow_Pal, 0x10, 0x20); CopyPaletteIntoBufferUnfaded(gRegionMapCityZoomTiles_Pal, 0x30, 0x20); if (!IsRegionMapZoomed()) @@ -537,7 +537,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2); AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); DrawCityMap(state, regionMap->mapSecId, regionMap->posWithinMapSec); - CopyWindowToVram(state->infoWindowId, 3); + CopyWindowToVram(state->infoWindowId, COPYWIN_FULL); SetCityZoomTextInvisibility(FALSE); break; case MAPSECTYPE_CITY_CANTFLY: @@ -545,7 +545,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2); AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); FillBgTilemapBufferRect(1, 0x1041, 17, 6, 12, 11, 17); - CopyWindowToVram(state->infoWindowId, 3); + CopyWindowToVram(state->infoWindowId, COPYWIN_FULL); SetCityZoomTextInvisibility(TRUE); break; case MAPSECTYPE_ROUTE: @@ -554,7 +554,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) PutWindowTilemap(state->infoWindowId); AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); PrintLandmarkNames(state, regionMap->mapSecId, regionMap->posWithinMapSec); - CopyWindowToVram(state->infoWindowId, 3); + CopyWindowToVram(state->infoWindowId, COPYWIN_FULL); SetCityZoomTextInvisibility(TRUE); break; case MAPSECTYPE_NONE: diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c index 3d8611a4a4..8f7e27fe10 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_1.c @@ -652,7 +652,7 @@ static void AddRibbonsMonListWindow(struct PokenavSub10 *monMenu) PutWindowTilemap(monMenu->winid); r2 = GetRibbonsMonListCount(); sub_81D02B0(monMenu->winid, 0, r2); - CopyWindowToVram(monMenu->winid, 1); + CopyWindowToVram(monMenu->winid, COPYWIN_MAP); sub_81D0288(monMenu); } @@ -661,7 +661,7 @@ static void sub_81D0288(struct PokenavSub10 *monMenu) s32 r4 = GetSelectedPokenavListIndex(); s32 r2 = GetRibbonsMonListCount(); sub_81D02B0(monMenu->winid, r4 + 1, r2); - CopyWindowToVram(monMenu->winid, 2); + CopyWindowToVram(monMenu->winid, COPYWIN_GFX); } static void sub_81D02B0(s32 windowId, s32 val1, s32 val2) diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index 75d9f5bd00..c8c63f0178 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -810,7 +810,7 @@ static void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr) DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700); FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4)); AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, -1, gStringVar4); - CopyWindowToVram(structPtr->ribbonCountWindowId, 2); + CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX); } static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) @@ -843,7 +843,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]); } - CopyWindowToVram(structPtr->ribbonCountWindowId, 2); + CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX); } static const struct WindowTemplate sRibbonSummaryMonNameWindowTemplate = @@ -897,7 +897,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr) *(txtPtr++) = CHAR_LV_2; ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3); AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } static const struct WindowTemplate sRibbonMonListIndexWindowTemplate[] = @@ -934,7 +934,7 @@ static void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr) ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3); x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar1, 56); AddTextPrinterParameterized(structPtr->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(structPtr->listIdxWindowId, 2); + CopyWindowToVram(structPtr->listIdxWindowId, COPYWIN_GFX); } static void ResetSpritesAndDrawMonFrontPic(struct PokenavSub14 *structPtr) diff --git a/src/record_mixing.c b/src/record_mixing.c index 2197d85421..f308e5b3df 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -287,7 +287,7 @@ static void PrintTextOnRecordMixing(const u8 *src) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, src, 0, 1, 0, NULL); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } #define tCounter data[0] diff --git a/src/region_map.c b/src/region_map.c index 46539205b4..021ef7c710 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1819,7 +1819,7 @@ static void DrawFlyDestTextWindow(void) DrawStdFrameWithCustomTileAndPalette(0, FALSE, 101, 13); } FillWindowPixelBuffer(0, PIXEL_FILL(1)); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); ScheduleBgCopyTilemapToVram(0); sDrawFlyDestTextWindow = FALSE; } diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index 5fe1a6013b..da434482e8 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -493,7 +493,7 @@ static void Task_ResetRtc_HandleInput(u8 taskId) { PlaySE(SE_SELECT); PrintTime(tWindowId, 0, 1, tDays, tHours, tMinutes, tSeconds); - CopyWindowToVram(tWindowId, 2); + CopyWindowToVram(tWindowId, COPYWIN_GFX); } } @@ -599,7 +599,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId) gSaveBlock2Ptr->lastBerryTreeUpdate.seconds); ShowMessage(gText_ResetRTCConfirmCancel); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); ScheduleBgCopyTilemapToVram(0); tState++; case 1: diff --git a/src/roulette.c b/src/roulette.c index 29a8f779ad..7e43f5db39 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -1224,7 +1224,7 @@ static void CB2_LoadRoulette(void) DrawGridBackground(SELECTION_NONE); DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); gSpriteCoordOffsetX = -60; gSpriteCoordOffsetY = 0; break; @@ -1295,7 +1295,7 @@ static void Task_AskKeepPlaying(u8 taskId) DisplayYesNoMenuDefaultYes(); DrawStdWindowFrame(sTextWindowId, 0); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SPEED_FF, 0); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); DoYesNoFuncWithChoice(taskId, &sYesNoTable_KeepPlaying); } @@ -1807,14 +1807,14 @@ static void Task_PrintSpinResult(u8 taskId) PlayFanfare(MUS_SLOTS_JACKPOT); DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_Jackpot, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); } else { PlayFanfare(MUS_SLOTS_WIN); DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ItsAHit, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); } break; case FALSE: @@ -1822,7 +1822,7 @@ static void Task_PrintSpinResult(u8 taskId) m4aSongNumStart(SE_FAILURE); DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NothingDoing, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); break; } gTasks[taskId].data[1] = 0; @@ -1867,7 +1867,7 @@ static void Task_PrintPayout(u8 taskId) StringExpandPlaceholders(gStringVar4, Roulette_Text_YouveWonXCoins); DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); gTasks[taskId].tPayout = (sRoulette->minBet * gTasks[taskId].tMultiplier); gTasks[taskId].data[7] = 0; gTasks[taskId].func = Task_GivePayout; @@ -1903,7 +1903,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) // Reached Ball 6, clear board DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); StartTaskAfterDelayOrInput(taskId, Task_ClearBoard, NO_DELAY, A_BUTTON | B_BUTTON); } else if (gTasks[taskId].tCoins == MAX_COINS) @@ -1911,7 +1911,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) // Player maxed out coins DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON); } else @@ -1925,7 +1925,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) // Player out of coins DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); StartTaskAfterDelayOrInput(taskId, Task_StopPlaying, 60, A_BUTTON | B_BUTTON); } } @@ -1950,7 +1950,7 @@ static void Task_ClearBoard(u8 taskId) { DrawStdWindowFrame(sTextWindowId, FALSE); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(sTextWindowId, 3); + CopyWindowToVram(sTextWindowId, COPYWIN_FULL); StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON); } else @@ -3427,7 +3427,7 @@ static void Task_PrintMinBet(u8 taskId) StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX); DrawStdWindowFrame(0, FALSE); AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_ShowMinBetYesNo; } } @@ -3446,7 +3446,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) // Special rate for Game Corner service day (only at second table) DrawStdWindowFrame(0, FALSE); AddTextPrinterParameterized(0, FONT_NORMAL, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_PrintMinBet; } else @@ -3455,7 +3455,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX); DrawStdWindowFrame(0, FALSE); AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_ShowMinBetYesNo; } } @@ -3465,7 +3465,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) StringExpandPlaceholders(gStringVar4, Roulette_Text_NotEnoughCoins); DrawStdWindowFrame(0, FALSE); AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_NotEnoughForMinBet; gTasks[taskId].tCoins = 0; gTasks[taskId].data[0] = 0; diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 4f03732706..e7bdc3400a 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -222,8 +222,8 @@ static void CB2_SaveFailedScreen(void) DrawStdFrameWithCustomTileAndPalette(sWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE); FillWindowPixelBuffer(sWindowIds[CLOCK_WIN_ID], PIXEL_FILL(1)); // backwards? FillWindowPixelBuffer(sWindowIds[TEXT_WIN_ID], PIXEL_FILL(1)); - CopyWindowToVram(sWindowIds[CLOCK_WIN_ID], 2); // again? - CopyWindowToVram(sWindowIds[TEXT_WIN_ID], 1); + CopyWindowToVram(sWindowIds[CLOCK_WIN_ID], COPYWIN_GFX); // again? + CopyWindowToVram(sWindowIds[TEXT_WIN_ID], COPYWIN_MAP); SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); EnableInterrupts(1); diff --git a/src/scrcmd.c b/src/scrcmd.c index a6223bdf51..ce312a563c 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1533,7 +1533,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) PutWindowTilemap(gBrailleWindowId); FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1)); AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, 0xFF, 0x0); - CopyWindowToVram(gBrailleWindowId, 3); + CopyWindowToVram(gBrailleWindowId, COPYWIN_FULL); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c index f0dccd9f98..30aa4a0635 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -280,7 +280,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignore SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, 0); PrintMenuGridTable(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, sMultichoiceLists[multichoiceId].list); InitMenuActionGrid(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, 0); - CopyWindowToVram(gTasks[taskId].tWindowId, 3); + CopyWindowToVram(gTasks[taskId].tWindowId, COPYWIN_FULL); return TRUE; } } @@ -373,7 +373,7 @@ static void CreatePCMultichoice(void) StringExpandPlaceholders(gStringVar4, gText_PlayersPC); PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, numChoices, 0); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); InitMultichoiceCheckWrap(FALSE, numChoices, windowId, MULTI_PC); } @@ -533,7 +533,7 @@ static void CreateLilycoveSSTidalMultichoice(void) } InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, count - 1); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); InitMultichoiceCheckWrap(FALSE, count, windowId, MULTI_SSTIDAL_LILYCOVE); } } @@ -698,7 +698,7 @@ static void CreateStartMenuForPokenavTutorial(void) AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL); sub_81983AC(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0); InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } #define tWindowId data[6] diff --git a/src/shop.c b/src/shop.c index 817146d785..43b7816f51 100755 --- a/src/shop.c +++ b/src/shop.c @@ -303,7 +303,7 @@ static u8 CreateShopMenu(u8 martType) PrintMenuTable(sMartInfo.windowId, numMenuItems, sMartInfo.menuActions); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sMartInfo.windowId, numMenuItems, 0); PutWindowTilemap(sMartInfo.windowId); - CopyWindowToVram(sMartInfo.windowId, 1); + CopyWindowToVram(sMartInfo.windowId, COPYWIN_MAP); return CreateTask(Task_ShopMenu, 8); } diff --git a/src/slot_machine.c b/src/slot_machine.c index 7d46102736..1c21f230d3 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -1254,7 +1254,7 @@ static bool8 SlotAction_PrintMsg_Need3Coins(struct Task *task) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouDontHaveThreeCoins, 0, 1, 0, 0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); sSlotMachine->state = SLOT_ACTION_WAIT_MSG_NEED_3_COINS; return FALSE; } @@ -1519,7 +1519,7 @@ static bool8 SlotAction_AskQuit(struct Task *task) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_QuitTheGame, 0, 1, 0, 0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); CreateYesNoMenuParameterized(0x15, 7, 0x214, 0x180, 0xE, 0xF); sSlotMachine->state = SLOT_ACTION_HANDLE_QUIT_INPUT; return FALSE; @@ -1551,7 +1551,7 @@ static bool8 SlotAction_PrintMsg_9999Coins(struct Task *task) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouveGot9999Coins, 0, 1, 0, 0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); sSlotMachine->state = SLOT_ACTION_WAIT_MSG_MAX_COINS; return FALSE; } @@ -1572,7 +1572,7 @@ static bool8 SlotAction_PrintMsg_NoMoreCoins(struct Task *task) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouveRunOutOfCoins, 0, 1, 0, 0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); sSlotMachine->state = SLOT_ACTION_WAIT_MSG_NO_MORE_COINS; return FALSE; } @@ -3445,7 +3445,7 @@ static void InfoBox_DrawWindow(struct Task *task) static void InfoBox_AddText(struct Task *task) { AddTextPrinterParameterized3(1, FONT_NORMAL, 2, 5, sColors_ReeltimeHelp, 0, gText_ReelTimeHelp); - CopyWindowToVram(1, 3); + CopyWindowToVram(1, COPYWIN_FULL); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0)); task->tState++; } @@ -3456,7 +3456,7 @@ static void InfoBox_AwaitPlayerInput(struct Task *task) { FillWindowPixelBuffer(1, PIXEL_FILL(0)); ClearWindowTilemap(1); - CopyWindowToVram(1, 1); + CopyWindowToVram(1, COPYWIN_MAP); RemoveWindow(1); BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0)); task->tState++; diff --git a/src/start_menu.c b/src/start_menu.c index a9d3ce15b1..1c0b006e62 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -387,7 +387,7 @@ static void ShowSafariBallsWindow(void) ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_SafariBallStock); AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 0, 1, 0xFF, NULL); - CopyWindowToVram(sSafariBallsWindowId, 2); + CopyWindowToVram(sSafariBallsWindowId, COPYWIN_GFX); } static void ShowPyramidFloorWindow(void) @@ -402,7 +402,7 @@ static void ShowPyramidFloorWindow(void) StringCopy(gStringVar1, sPyramidFloorNames[gSaveBlock2Ptr->frontier.curChallengeBattleNum]); StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor); AddTextPrinterParameterized(sBattlePyramidFloorWindowId, FONT_NORMAL, gStringVar4, 0, 1, 0xFF, NULL); - CopyWindowToVram(sBattlePyramidFloorWindowId, 2); + CopyWindowToVram(sBattlePyramidFloorWindowId, COPYWIN_GFX); } static void RemoveExtraStartMenuWindows(void) @@ -410,7 +410,7 @@ static void RemoveExtraStartMenuWindows(void) if (GetSafariZoneFlag()) { ClearStdWindowAndFrameToTransparent(sSafariBallsWindowId, FALSE); - CopyWindowToVram(sSafariBallsWindowId, 2); + CopyWindowToVram(sSafariBallsWindowId, COPYWIN_GFX); RemoveWindow(sSafariBallsWindowId); } if (InBattlePyramid()) @@ -483,7 +483,7 @@ static bool32 InitStartMenuStep(void) break; case 5: sStartMenuCursorPos = sub_81983AC(GetStartMenuWindowId(), FONT_NORMAL, 0, 9, 16, sNumStartMenuActions, sStartMenuCursorPos); - CopyWindowToVram(GetStartMenuWindowId(), TRUE); + CopyWindowToVram(GetStartMenuWindowId(), COPYWIN_MAP); return TRUE; } @@ -1247,7 +1247,7 @@ static void Task_SaveAfterLinkBattle(u8 taskId) TEXT_COLOR_LIGHT_GRAY); DrawTextBorderOuter(0, 8, 14); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); if (gWirelessCommType != 0 && InUnionRoom()) @@ -1363,7 +1363,7 @@ static void ShowSaveInfoWindow(void) xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL); - CopyWindowToVram(sSaveInfoWindowId, 2); + CopyWindowToVram(sSaveInfoWindowId, COPYWIN_GFX); } static void RemoveSaveInfoWindow(void) diff --git a/src/trade.c b/src/trade.c index 475b82d5ee..5716fdd84d 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1397,7 +1397,7 @@ static void TradeMenuProcessInput(void) PrintMenuTable(1, ARRAY_COUNT(sSelectTradeMonActions), sSelectTradeMonActions); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0); PutWindowTilemap(1); - CopyWindowToVram(1, 3); + CopyWindowToVram(1, COPYWIN_FULL); sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_SELECTED_MON; } // Cursor is in partner's party @@ -1584,7 +1584,7 @@ static void RestoreNicknamesCoveredByYesNo(void) for (i = 0; i < sTradeMenuData->partyCounts[1] - 4; i++) { PutWindowTilemap(i + 12); - CopyWindowToVram(i + 12, 1); + CopyWindowToVram(i + 12, COPYWIN_MAP); } } @@ -1855,9 +1855,9 @@ static void DrawTradeMenuParty(u8 whichParty) BufferTradeMonMoves(movesString, selectedMonParty, partyIdx); AddTextPrinterParameterized4((whichParty * 2) + 15, FONT_NORMAL, 0, 0, 0, 0, sTradeTextColors, 0, movesString); PutWindowTilemap((whichParty * 2) + 14); - CopyWindowToVram((whichParty * 2) + 14, 3); + CopyWindowToVram((whichParty * 2) + 14, COPYWIN_FULL); PutWindowTilemap((whichParty * 2) + 15); - CopyWindowToVram((whichParty * 2) + 15, 3); + CopyWindowToVram((whichParty * 2) + 15, COPYWIN_FULL); sTradeMenuData->drawPartyState[whichParty]++; break; case 4: @@ -1929,7 +1929,7 @@ static void PrintMonNicknameForTradeMenu(u8 whichParty, u8 windowId, u8 *nicknam xPos = GetStringCenterAlignXOffset(FONT_SMALL, nickname, 64); AddTextPrinterParameterized3(windowId, FONT_SMALL, xPos, 4, sTradeTextColors, 0, nickname); PutWindowTilemap(windowId); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } static void PrintPartyNicknamesForTradeMenu(u8 whichParty) @@ -2156,7 +2156,7 @@ static void PrintTradeMessage(u8 messageId) AddTextPrinterParameterized(0, FONT_NORMAL, sTradeMessages[messageId], 0, 1, TEXT_SPEED_FF, NULL); DrawTextBorderOuter(0, 20, 12); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static bool8 LoadTradeMenuSpriteSheetsAndPalettes(void) @@ -2899,7 +2899,7 @@ void LinkTradeDrawWindow(void) { FillWindowPixelBuffer(0, PIXEL_FILL(15)); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static void InitTradeBgInternal(void) @@ -2976,7 +2976,7 @@ static void CB2_InGameTrade(void) LoadTradeMonPic(TRADE_PARTNER, 1); FillWindowPixelBuffer(0, PIXEL_FILL(15)); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); gMain.state++; break; case 9: @@ -3433,7 +3433,7 @@ static bool8 AnimateTradeSequenceCable(void) { SetTradeSequenceBgGpuRegs(4); FillWindowPixelBuffer(0, PIXEL_FILL(15)); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); sTradeData->state++; } break; @@ -3904,7 +3904,7 @@ static bool8 AnimateTradeSequenceWireless(void) { SetTradeSequenceBgGpuRegs(4); FillWindowPixelBuffer(0, PIXEL_FILL(15)); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); sTradeData->state++; } break; @@ -4834,7 +4834,7 @@ void DrawTextOnTradeWindow(u8 windowId, const u8 *str, u8 speed) sTradeData->textColors[1] = TEXT_COLOR_WHITE; sTradeData->textColors[2] = TEXT_COLOR_GREEN; AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, sTradeData->textColors, speed, str); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } #define idx data[0] diff --git a/src/trainer_card.c b/src/trainer_card.c index a2c90e867f..b72e454985 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -498,7 +498,7 @@ static void Task_TrainerCard(u8 taskId) SetCloseLinkCallback(); DrawDialogueFrame(0, 1); AddTextPrinterParameterized(0, FONT_NORMAL, gText_WaitingTrainerFinishReading, 0, 1, 255, 0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); sData->mainState = STATE_CLOSE_CARD_LINK; break; case STATE_CLOSE_CARD_LINK: @@ -1408,7 +1408,7 @@ static void LoadStickerGfx(void) static void DrawTrainerCardWindow(u8 windowId) { PutWindowTilemap(windowId); - CopyWindowToVram(windowId, 3); + CopyWindowToVram(windowId, COPYWIN_FULL); } static u8 SetCardBgsAndPals(void) diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 621f811336..f0a6337293 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -614,7 +614,7 @@ void PrintOnTrainerHillRecordsWindow(void) } PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); FreeDataStruct(); } diff --git a/src/union_room.c b/src/union_room.c index 5196c1cdb2..a2fbd382de 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -306,7 +306,7 @@ static void PrintNumPlayersWaitingForMsg(u8 windowId, u8 capacityCode, u8 string break; } - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); } static void PrintPlayerNameAndIdOnWindow(u8 windowId) @@ -434,7 +434,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) FillWindowPixelBuffer(data->bButtonCancelWindowId, PIXEL_FILL(2)); PrintUnionRoomText(data->bButtonCancelWindowId, 0, sText_BButtonCancel, 8, 1, UR_COLOR_CANCEL); PutWindowTilemap(data->bButtonCancelWindowId); - CopyWindowToVram(data->bButtonCancelWindowId, 2); + CopyWindowToVram(data->bButtonCancelWindowId, COPYWIN_GFX); DrawStdWindowFrame(data->listWindowId, FALSE); gMultiuseListMenuTemplate = sListMenuTemplate_PossibleGroupMembers; @@ -443,7 +443,7 @@ static void Task_TryBecomeLinkLeader(u8 taskId) DrawStdWindowFrame(data->nPlayerModeWindowId, FALSE); PutWindowTilemap(data->nPlayerModeWindowId); - CopyWindowToVram(data->nPlayerModeWindowId, 2); + CopyWindowToVram(data->nPlayerModeWindowId, COPYWIN_GFX); CopyBgTilemapBufferToVram(0); data->playerCount = 1; @@ -1014,7 +1014,7 @@ static void Task_TryJoinLinkGroup(u8 taskId) FillWindowPixelBuffer(data->bButtonCancelWindowId, PIXEL_FILL(2)); PrintUnionRoomText(data->bButtonCancelWindowId, 0, sText_ChooseJoinCancel, 8, 1, UR_COLOR_CANCEL); PutWindowTilemap(data->bButtonCancelWindowId); - CopyWindowToVram(data->bButtonCancelWindowId, 2); + CopyWindowToVram(data->bButtonCancelWindowId, COPYWIN_GFX); DrawStdWindowFrame(data->listWindowId, FALSE); gMultiuseListMenuTemplate = sListMenuTemplate_UnionRoomGroups; @@ -1024,7 +1024,7 @@ static void Task_TryJoinLinkGroup(u8 taskId) DrawStdWindowFrame(data->playerNameAndIdWindowId, FALSE); PutWindowTilemap(data->playerNameAndIdWindowId); PrintPlayerNameAndIdOnWindow(data->playerNameAndIdWindowId); - CopyWindowToVram(data->playerNameAndIdWindowId, 2); + CopyWindowToVram(data->playerNameAndIdWindowId, COPYWIN_GFX); CopyBgTilemapBufferToVram(0); data->leaderId = 0; @@ -2131,7 +2131,7 @@ static void Task_CardOrNewsWithFriend(u8 taskId) FillWindowPixelBuffer(data->playerNameAndIdWindowId, PIXEL_FILL(1)); PutWindowTilemap(data->playerNameAndIdWindowId); PrintPlayerNameAndIdOnWindow(data->playerNameAndIdWindowId); - CopyWindowToVram(data->playerNameAndIdWindowId, 2); + CopyWindowToVram(data->playerNameAndIdWindowId, COPYWIN_GFX); CopyBgTilemapBufferToVram(0); data->leaderId = 0; @@ -3637,7 +3637,7 @@ static s8 UnionRoomHandleYesNo(u8 *state, bool32 noDraw) case 1: if (noDraw) { - sub_8198C78(); + EraseYesNoWindow(); *state = 0; return -3; } @@ -3658,7 +3658,7 @@ static u8 CreateTradeBoardWindow(const struct WindowTemplate * template) DrawStdWindowFrame(windowId, FALSE); FillWindowPixelBuffer(windowId, PIXEL_FILL(15)); PrintUnionRoomText(windowId, 1, sText_NameWantedOfferLv, 8, 1, UR_COLOR_TRADE_BOARD_OTHER); - CopyWindowToVram(windowId, 2); + CopyWindowToVram(windowId, COPYWIN_GFX); PutWindowTilemap(windowId); return windowId; } @@ -3689,7 +3689,7 @@ static s32 ListMenuHandler_AllItemsAvailable(u8 *state, u8 *windowId, u8 *listMe gMultiuseListMenuTemplate = *menuTemplate; gMultiuseListMenuTemplate.windowId = *windowId; *listMenuId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0); - CopyWindowToVram(*windowId, TRUE); + CopyWindowToVram(*windowId, COPYWIN_MAP); (*state)++; break; case 1: @@ -3736,7 +3736,7 @@ static s32 TradeBoardMenuHandler(u8 *state, u8 *mainWindowId, u8 *listMenuId, u8 (*state)++; break; case 1: - CopyWindowToVram(*mainWindowId, TRUE); + CopyWindowToVram(*mainWindowId, COPYWIN_MAP); (*state)++; break; case 2: diff --git a/src/union_room_battle.c b/src/union_room_battle.c index 6c4dfc268e..1ec8be77b5 100644 --- a/src/union_room_battle.c +++ b/src/union_room_battle.c @@ -89,7 +89,7 @@ static bool32 PrintUnionRoomBattleMessage(s16 * state, const u8 * str, s32 speed DrawTextBorderOuter(0, 0x001, 0xD); AddTextPrinterForUnionRoomBattle(0, str, 0, 1, speed); PutWindowTilemap(0); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); (*state)++; break; case 1: diff --git a/src/union_room_chat.c b/src/union_room_chat.c index 90a9cda480..96c2aa8862 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -2276,7 +2276,7 @@ static bool32 Display_ShowKeyboardSwapMenu(u8 *state) { case 0: ShowKeyboardSwapMenu(); - CopyWindowToVram(3, 3); + CopyWindowToVram(3, COPYWIN_FULL); break; case 1: return IsDma3ManagerBusyWithBgCopy(); @@ -2292,7 +2292,7 @@ static bool32 Display_HideKeyboardSwapMenu(u8 *state) { case 0: HideKeyboardSwapMenu(); - CopyWindowToVram(3, 3); + CopyWindowToVram(3, COPYWIN_FULL); break; case 1: return IsDma3ManagerBusyWithBgCopy(); @@ -2312,7 +2312,7 @@ static bool32 Display_SwitchPages(u8 *state) return TRUE; PrintCurrentKeyboardPage(); - CopyWindowToVram(2, 2); + CopyWindowToVram(2, COPYWIN_GFX); break; case 1: if (IsDma3ManagerBusyWithBgCopy()) @@ -2345,7 +2345,7 @@ static bool32 Display_AskQuitChatting(u8 *state) case 0: AddStdMessageWindow(STDMESSAGE_QUIT_CHATTING, 0); AddYesNoMenuAt(23, 11, 1); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); break; case 1: return IsDma3ManagerBusyWithBgCopy(); @@ -2389,7 +2389,7 @@ static bool32 Display_UpdateMessageBuffer(u8 *state) FillTextEntryWindow(x, width, 0); str = GetMessageEntryBuffer(); DrawTextEntryMessage(0, str, 3, 1, 2); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); break; case 1: if (!IsDma3ManagerBusyWithBgCopy()) @@ -2418,13 +2418,13 @@ static bool32 Display_AskRegisterText(u8 *state) length = StringLength_Multibyte(str); FillTextEntryWindow(x, length, PIXEL_FILL(6)); DrawTextEntryMessage(x, str, 0, 4, 5); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); break; case 1: if (!IsDma3ManagerBusyWithBgCopy()) { AddStdMessageWindow(STDMESSAGE_REGISTER_WHERE, 16); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); } else { @@ -2459,13 +2459,13 @@ static bool32 Display_CancelRegister(u8 *state) length = StringLength_Multibyte(str); FillTextEntryWindow(x, length, PIXEL_FILL(0)); DrawTextEntryMessage(x, str, 3, 1, 2); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); break; case 1: if (!IsDma3ManagerBusyWithBgCopy()) { HideStdMessageWindow(); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); } else { @@ -2497,7 +2497,7 @@ static bool32 Display_ReturnToKeyboard(u8 *state) { case 0: PrintCurrentKeyboardPage(); - CopyWindowToVram(2, 2); + CopyWindowToVram(2, COPYWIN_GFX); (*state)++; break; case 1: @@ -2523,7 +2523,7 @@ static bool32 Display_ScrollChat(u8 *state) str = GetLastReceivedMessage(); colorIdx = GetReceivedPlayerIndex(); PrintChatMessage(row, str, colorIdx); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); break; case 1: if (IsDma3ManagerBusyWithBgCopy()) @@ -2543,7 +2543,7 @@ static bool32 Display_ScrollChat(u8 *state) // fall through case 2: ScrollWindow(0, 0, 5, PIXEL_FILL(1)); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); sDisplay->scrollCount++; (*state)++; // fall through @@ -2588,7 +2588,7 @@ static bool32 Display_PrintInputText(u8 *state) { case 0: AddStdMessageWindow(STDMESSAGE_INPUT_TEXT, 16); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); (*state)++; break; case 1: @@ -2604,7 +2604,7 @@ static bool32 Display_PrintExitingChat(u8 *state) { case 0: AddStdMessageWindow(STDMESSAGE_EXITING_CHAT, 0); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); (*state)++; break; case 1: @@ -2625,7 +2625,7 @@ static bool32 Display_PrintLeaderLeft(u8 *state) str = GetChatHostName(); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, str); AddStdMessageWindow(STDMESSAGE_LEADER_LEFT, 0); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); (*state)++; break; case 1: @@ -2642,7 +2642,7 @@ static bool32 Display_AskSave(u8 *state) case 0: AddStdMessageWindow(STDMESSAGE_ASK_SAVE, 0); AddYesNoMenuAt(23, 10, 1); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); (*state)++; break; case 1: @@ -2659,7 +2659,7 @@ static bool32 Display_AskOverwriteSave(u8 *state) case 0: AddStdMessageWindow(STDMESSAGE_ASK_OVERWRITE, 0); AddYesNoMenuAt(23, 10, 1); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); (*state)++; break; case 1: @@ -2675,7 +2675,7 @@ static bool32 Display_PrintSavingDontTurnOff(u8 *state) { case 0: AddStdMessageWindow(STDMESSAGE_SAVING_NO_OFF, 0); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); (*state)++; break; case 1: @@ -2693,7 +2693,7 @@ static bool32 Display_PrintSavedTheGame(u8 *state) DynamicPlaceholderTextUtil_Reset(); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gSaveBlock2Ptr->playerName); AddStdMessageWindow(STDMESSAGE_SAVED_THE_GAME, 0); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); (*state)++; break; case 1: @@ -2710,7 +2710,7 @@ static bool32 Display_AskConfirmLeaderLeave(u8 *state) case 0: AddStdMessageWindow(STDMESSAGE_WARN_LEADER_LEAVE, 0); AddYesNoMenuAt(23, 10, 1); - CopyWindowToVram(sDisplay->messageWindowId, 3); + CopyWindowToVram(sDisplay->messageWindowId, COPYWIN_FULL); (*state)++; break; case 1: @@ -3085,14 +3085,14 @@ static void LoadChatMessagesWindow(void) LoadPalette(sUnk_Palette2, 0xF0, sizeof(sUnk_Palette2)); PutWindowTilemap(0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - CopyWindowToVram(0, 3); + CopyWindowToVram(0, COPYWIN_FULL); } static void LoadKeyboardWindow(void) { PutWindowTilemap(2); PrintCurrentKeyboardPage(); - CopyWindowToVram(2, 3); + CopyWindowToVram(2, COPYWIN_FULL); } static void LoadTextEntryWindow(void) @@ -3107,7 +3107,7 @@ static void LoadTextEntryWindow(void) FillWindowPixelBuffer(1, PIXEL_FILL(0)); PutWindowTilemap(1); - CopyWindowToVram(1, 3); + CopyWindowToVram(1, COPYWIN_FULL); } static void LoadKeyboardSwapWindow(void) diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index dcfc27d916..e67ade342c 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -878,7 +878,7 @@ static void AskUsePokeblock(void) DrawTextBorderOuter(WIN_TEXT, 151, 14); AddTextPrinterParameterized(WIN_TEXT, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); PutWindowTilemap(WIN_TEXT); - CopyWindowToVram(WIN_TEXT, 3); + CopyWindowToVram(WIN_TEXT, COPYWIN_FULL); CreateYesNoMenu(&sUsePokeblockYesNoWinTemplate, 151, 14, 0); } @@ -919,7 +919,7 @@ static void PrintFirstEnhancement(void) PrintMenuWindowText(gStringVar4); PutWindowTilemap(WIN_TEXT); - CopyWindowToVram(WIN_TEXT, 3); + CopyWindowToVram(WIN_TEXT, COPYWIN_FULL); } static bool8 TryPrintNextEnhancement(void) @@ -943,7 +943,7 @@ static bool8 TryPrintNextEnhancement(void) BufferEnhancedStatText(gStringVar4, sInfo->statId, sInfo->enhancements[sInfo->statId]); PrintMenuWindowText(gStringVar4); - CopyWindowToVram(WIN_TEXT, 2); + CopyWindowToVram(WIN_TEXT, COPYWIN_GFX); return TRUE; } @@ -954,14 +954,14 @@ static void PrintWontEatAnymore(void) DrawTextBorderOuter(WIN_TEXT, 151, 14); AddTextPrinterParameterized(WIN_TEXT, FONT_NORMAL, gText_WontEatAnymore, 0, 1, 0, NULL); PutWindowTilemap(WIN_TEXT); - CopyWindowToVram(WIN_TEXT, 3); + CopyWindowToVram(WIN_TEXT, COPYWIN_FULL); } static void EraseMenuWindow(void) { rbox_fill_rectangle(WIN_TEXT); ClearWindowTilemap(WIN_TEXT); - CopyWindowToVram(WIN_TEXT, 3); + CopyWindowToVram(WIN_TEXT, COPYWIN_FULL); } static void PrintMenuWindowText(const u8 *message) @@ -1399,13 +1399,13 @@ static void UpdateMonInfoText(u16 loadId, bool8 firstPrint) if (firstPrint) { - CopyWindowToVram(WIN_NAME, 3); - CopyWindowToVram(WIN_NATURE, 3); + CopyWindowToVram(WIN_NAME, COPYWIN_FULL); + CopyWindowToVram(WIN_NATURE, COPYWIN_FULL); } else { - CopyWindowToVram(WIN_NAME, 2); - CopyWindowToVram(WIN_NATURE, 2); + CopyWindowToVram(WIN_NAME, COPYWIN_GFX); + CopyWindowToVram(WIN_NATURE, COPYWIN_GFX); } } diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 295eab97fc..7a69cf6d62 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -243,9 +243,9 @@ static void PrintHeaderTexts(void) } WCSS_AddTextPrinterParameterized(1, FONT_NORMAL, sHeaderTexts[i + 1], 0, 30 * i + 8, COLORMODE_RED); PutWindowTilemap(0); - CopyWindowToVram(0, 2); + CopyWindowToVram(0, COPYWIN_GFX); PutWindowTilemap(1); - CopyWindowToVram(1, 2); + CopyWindowToVram(1, COPYWIN_GFX); } #define tState data[0] @@ -285,7 +285,7 @@ static void Task_WirelessCommunicationScreen(u8 taskId) WCSS_AddTextPrinterParameterized(2, FONT_NORMAL, gStringVar4, 12, 98, COLORMODE_RED); } PutWindowTilemap(2); - CopyWindowToVram(2, 3); + CopyWindowToVram(2, COPYWIN_FULL); } if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON)) { From 085f8adec62be6a1ecf7b4389148867408b30bed Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 3 Nov 2021 16:06:58 -0400 Subject: [PATCH 134/417] Start remaining menu documentation --- .../{860F0B0.pal => hof_pc_topbar.pal} | 0 .../menu.png => interface/menu_info.png} | Bin .../menu1.pal => interface/menu_info1.pal} | 0 .../menu2.pal => interface/menu_info2.pal} | 0 .../menu3.pal => interface/menu_info3.pal} | 0 include/graphics.h | 8 +- include/menu.h | 19 +- src/apprentice.c | 2 +- src/battle_pyramid_bag.c | 2 +- src/cable_club.c | 2 +- src/decoration.c | 6 +- src/graphics.c | 8 +- src/hall_of_fame.c | 11 +- src/item_menu.c | 2 +- src/main_menu.c | 2 +- src/mauville_old_man.c | 2 +- src/menu.c | 214 +++++++++--------- src/party_menu.c | 4 +- src/player_pc.c | 6 +- src/pokeblock.c | 2 +- src/pokemon_storage_system.c | 4 +- src/script_menu.c | 8 +- src/secret_base.c | 2 +- src/shop.c | 2 +- src/start_menu.c | 4 +- src/trade.c | 2 +- src/trader.c | 2 +- src/union_room_chat.c | 6 +- 28 files changed, 161 insertions(+), 159 deletions(-) rename graphics/interface/{860F0B0.pal => hof_pc_topbar.pal} (100%) rename graphics/{interface_fr/menu.png => interface/menu_info.png} (100%) rename graphics/{interface_fr/menu1.pal => interface/menu_info1.pal} (100%) rename graphics/{interface_fr/menu2.pal => interface/menu_info2.pal} (100%) rename graphics/{interface_fr/menu3.pal => interface/menu_info3.pal} (100%) diff --git a/graphics/interface/860F0B0.pal b/graphics/interface/hof_pc_topbar.pal similarity index 100% rename from graphics/interface/860F0B0.pal rename to graphics/interface/hof_pc_topbar.pal diff --git a/graphics/interface_fr/menu.png b/graphics/interface/menu_info.png similarity index 100% rename from graphics/interface_fr/menu.png rename to graphics/interface/menu_info.png diff --git a/graphics/interface_fr/menu1.pal b/graphics/interface/menu_info1.pal similarity index 100% rename from graphics/interface_fr/menu1.pal rename to graphics/interface/menu_info1.pal diff --git a/graphics/interface_fr/menu2.pal b/graphics/interface/menu_info2.pal similarity index 100% rename from graphics/interface_fr/menu2.pal rename to graphics/interface/menu_info2.pal diff --git a/graphics/interface_fr/menu3.pal b/graphics/interface/menu_info3.pal similarity index 100% rename from graphics/interface_fr/menu3.pal rename to graphics/interface/menu_info3.pal diff --git a/include/graphics.h b/include/graphics.h index a58b0f0f13..eeb8f65a30 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3855,10 +3855,10 @@ extern const u32 gItemIcon_ReturnToFieldArrow[]; extern const u32 gItemIconPalette_ReturnToFieldArrow[]; //menu graphics -extern const u16 gFireRedMenuElements1_Pal[16]; -extern const u16 gFireRedMenuElements2_Pal[16]; -extern const u16 gFireRedMenuElements3_Pal[16]; -extern const u8 gFireRedMenuElements_Gfx[]; +extern const u16 gMenuInfoElements1_Pal[16]; +extern const u16 gMenuInfoElements2_Pal[16]; +extern const u16 gMenuInfoElements3_Pal[16]; +extern const u8 gMenuInfoElements_Gfx[]; // item menu graphics extern const u32 gBagScreen_Gfx[]; diff --git a/include/menu.h b/include/menu.h index cc65a51dca..3f9ccd721e 100644 --- a/include/menu.h +++ b/include/menu.h @@ -66,7 +66,7 @@ void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 ti void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette); void ScheduleBgCopyTilemapToVram(u8 bgNum); void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs); -u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos); +u8 InitMenuInUpperLeftCornerNormal(u8 windowId, u8 numItems, u8 initialCursorPos); u8 Menu_GetCursorPos(void); s8 Menu_ProcessInput(void); s8 Menu_ProcessInputNoWrap(void); @@ -85,7 +85,6 @@ void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterS void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 a2, u8 a3); void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds); void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram); -u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16); void *malloc_and_decompress(const void *src, u32 *sizeOut); u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode); void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress); @@ -98,8 +97,8 @@ void ListMenuLoadStdPalAt(u8, u8); u8 Menu_MoveCursor(s8 cursorDelta); u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta); void DrawStdWindowFrame(u8 windowId, bool8 CopyToVram); -u8 sub_81979C4(u8 a1); -u8 sub_81983AC(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos); +u8 AddStartMenuWindow(u8 numActions); +u8 InitMenuNormal(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos); void sub_819786C(u8 windowId, bool8 copyToVram); void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress); void RemoveStartMenuWindow(void); @@ -111,20 +110,20 @@ u8 AddMapNamePopUpWindow(void); void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing); void SetBgTilemapPalette(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette); void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP); -void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram); -void sub_8197AE8(bool8 copyToVram); +void EraseFieldMessageBox(bool8 copyToVram); void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *strs); s8 Menu_ProcessInputGridLayout(void); u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, bool8 APressMuted); s8 Menu_ProcessInputNoWrapAround_other(void); void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height); -u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile); -void sub_8198314(void); -void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram); +u8 HofPCTopBar_AddWindow(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile); +void HofPCTopBar_RemoveWindow(void); +void HofPCTopBar_Print(const u8 *string, u8 left, bool8 copyToVram); +void HofPCTopBar_PrintPair(const u8 *string, const u8 *string2, bool8 noBg, u8 left, bool8 copyToVram); void ResetBgPositions(void); void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed); void EraseYesNoWindow(void); -void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs); +void PrintMenuActionTextsAtPos(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs); void Menu_LoadStdPal(void); #endif // GUARD_MENU_H diff --git a/src/apprentice.c b/src/apprentice.c index 8421d4d8b2..6048915117 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -645,7 +645,7 @@ static void CreateApprenticeMenu(u8 menu) for (i = 0; i < count; i++) AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, 0); + InitMenuInUpperLeftCornerNormal(windowId, count, 0); CreateChooseAnswerTask(TRUE, count, windowId); } diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index 7ba4c96e7a..fdd3f03789 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -979,7 +979,7 @@ static void OpenContextMenu(u8 taskId) static void PrintMenuActionText_SingleRow(u8 windowId) { AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 0x10, gPyramidBagMenu->menuActionsCount, sMenuActions, gPyramidBagMenu->menuActionIds); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, gPyramidBagMenu->menuActionsCount, 0); + InitMenuInUpperLeftCornerNormal(windowId, gPyramidBagMenu->menuActionsCount, 0); } static void PrintMenuActionText_MultiRow(u8 windowId, u8 horizontalCount, u8 verticalCount) diff --git a/src/cable_club.c b/src/cable_club.c index ef1d9ff0d2..7d16c5b419 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -1078,7 +1078,7 @@ static void Task_EnterCableClubSeat(u8 taskId) case 3: // Exit, failure SetLinkWaitingForScript(); - sub_8197AE8(TRUE); + EraseFieldMessageBox(TRUE); DestroyTask(taskId); EnableBothScriptContexts(); break; diff --git a/src/decoration.c b/src/decoration.c index 52d1054c9b..3f93d9ccc2 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -557,7 +557,7 @@ static void AddDecorationActionsWindow(void) { u8 windowId = AddDecorationWindow(WINDOW_MAIN_MENU); PrintMenuTable(windowId, ARRAY_COUNT(sDecorationMainMenuActions), sDecorationMainMenuActions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, ARRAY_COUNT(sDecorationMainMenuActions), sDecorationActionsCursorPos); + InitMenuInUpperLeftCornerNormal(windowId, ARRAY_COUNT(sDecorationMainMenuActions), sDecorationActionsCursorPos); } static void InitDecorationActionsWindow(void) @@ -697,7 +697,7 @@ static void InitDecorationCategoriesWindow(u8 taskId) { u8 windowId = AddDecorationWindow(WINDOW_DECORATION_CATEGORIES); PrintDecorationCategoryMenuItems(taskId); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, DECORCAT_COUNT + 1, sCurDecorationCategory); + InitMenuInUpperLeftCornerNormal(windowId, DECORCAT_COUNT + 1, sCurDecorationCategory); gTasks[taskId].func = HandleDecorationCategoriesMenuInput; } @@ -705,7 +705,7 @@ static void ReinitDecorationCategoriesWindow(u8 taskId) { FillWindowPixelBuffer(sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES], PIXEL_FILL(1)); PrintDecorationCategoryMenuItems(taskId); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES], DECORCAT_COUNT + 1, sCurDecorationCategory); + InitMenuInUpperLeftCornerNormal(sDecorMenuWindowIds[WINDOW_DECORATION_CATEGORIES], DECORCAT_COUNT + 1, sCurDecorationCategory); gTasks[taskId].func = HandleDecorationCategoriesMenuInput; } diff --git a/src/graphics.c b/src/graphics.c index b4e1dfabe0..73825aebf3 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1272,10 +1272,10 @@ const u32 gPokedexAreaScreenAreaUnknown_Gfx[] = INCBIN_U32("graphics/pokedex/are // seems to be fire red leftovers, but the menu elements is reused in the item menu for TM descriptions. -const u16 gFireRedMenuElements1_Pal[] = INCBIN_U16("graphics/interface_fr/menu1.gbapal"); -const u16 gFireRedMenuElements2_Pal[] = INCBIN_U16("graphics/interface_fr/menu2.gbapal"); -const u16 gFireRedMenuElements3_Pal[] = INCBIN_U16("graphics/interface_fr/menu3.gbapal"); -const u8 gFireRedMenuElements_Gfx[] = INCBIN_U8("graphics/interface_fr/menu.4bpp"); //the types are reused for item menu +const u16 gMenuInfoElements1_Pal[] = INCBIN_U16("graphics/interface/menu_info1.gbapal"); +const u16 gMenuInfoElements2_Pal[] = INCBIN_U16("graphics/interface/menu_info2.gbapal"); +const u16 gMenuInfoElements3_Pal[] = INCBIN_U16("graphics/interface/menu_info3.gbapal"); +const u8 gMenuInfoElements_Gfx[] = INCBIN_U8("graphics/interface/menu_info.4bpp"); //the types are reused for item menu const u8 gBagMenuHMIcon_Gfx[] = INCBIN_U8("graphics/interface/hm.4bpp"); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 58e062d50c..e977828f99 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -343,7 +343,6 @@ static const struct HallofFameMon sDummyFameMon = static const u8 sHallOfFame_SlotOrder[] = { 2, 1, 3, 6, 4, 5, - 0, 0 }; // code @@ -862,7 +861,7 @@ void CB2_DoHallOfFamePC(void) static void Task_HofPC_CopySaveData(u8 taskId) { - sub_81980F0(0, 0x1E, 0, 0xC, 0x226); + HofPCTopBar_AddWindow(0, 30, 0, 12, 0x226); if (Save_LoadGameData(SAVE_HALL_OF_FAME) != SAVE_STATUS_OK) { gTasks[taskId].func = Task_HofPC_PrintDataIsCorrupted; @@ -950,9 +949,9 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId) StringExpandPlaceholders(gStringVar4, gText_HOFNumber); if (gTasks[taskId].tCurrTeamNo <= 0) - sub_8198204(gStringVar4, gText_PickCancel, 0, 0, TRUE); + HofPCTopBar_PrintPair(gStringVar4, gText_PickCancel, FALSE, 0, TRUE); else - sub_8198204(gStringVar4, gText_PickNextCancel, 0, 0, TRUE); + HofPCTopBar_PrintPair(gStringVar4, gText_PickNextCancel, FALSE, 0, TRUE); gTasks[taskId].func = Task_HofPC_PrintMonInfo; } @@ -1073,7 +1072,7 @@ static void Task_HofPC_HandleExit(u8 taskId) HideBg(0); HideBg(1); HideBg(3); - sub_8198314(); + HofPCTopBar_RemoveWindow(); FreeAllWindowBuffers(); UnsetBgTilemapBuffer(1); UnsetBgTilemapBuffer(3); @@ -1091,7 +1090,7 @@ static void Task_HofPC_HandleExit(u8 taskId) static void Task_HofPC_PrintDataIsCorrupted(u8 taskId) { - sub_8198180(gText_AButtonExit, 8, TRUE); + HofPCTopBar_Print(gText_AButtonExit, 8, TRUE); DrawDialogueFrame(0, 0); AddTextPrinterParameterized2(0, FONT_NORMAL, gText_HOFCorrupted, 0, NULL, 2, 1, 3); CopyWindowToVram(0, COPYWIN_FULL); diff --git a/src/item_menu.c b/src/item_menu.c index 1baa3965cf..74e29fe873 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -1668,7 +1668,7 @@ static void OpenContextMenu(u8 taskId) static void PrintContextMenuItems(u8 windowId) { AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, gBagMenu->contextMenuNumItems, 0); + InitMenuInUpperLeftCornerNormal(windowId, gBagMenu->contextMenuNumItems, 0); } static void PrintContextMenuItemGrid(u8 windowId, u8 columns, u8 rows) diff --git a/src/main_menu.c b/src/main_menu.c index bd7107963e..5a9a48d70b 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -2090,7 +2090,7 @@ static void NewGameBirchSpeech_ShowGenderMenu(void) DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3); FillWindowPixelBuffer(1, PIXEL_FILL(1)); PrintMenuTable(1, ARRAY_COUNT(sMenuActions_Gender), sMenuActions_Gender); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0); + InitMenuInUpperLeftCornerNormal(1, 2, 0); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_FULL); } diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 2525e065a8..751e5f91c6 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -1346,7 +1346,7 @@ static void PrintStoryList(void) AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL); } AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 0xFF, NULL); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sStorytellerWindowId, GetFreeStorySlot() + 1, 0); + InitMenuInUpperLeftCornerNormal(sStorytellerWindowId, GetFreeStorySlot() + 1, 0); CopyWindowToVram(sStorytellerWindowId, COPYWIN_FULL); } diff --git a/src/menu.c b/src/menu.c index 7625f113cf..94ad65e214 100644 --- a/src/menu.c +++ b/src/menu.c @@ -48,13 +48,24 @@ struct Menu bool8 APressMuted; }; +static u16 AddWindowParameterized(u8, u8, u8, u8, u8, u8, u16); +static void WindowFunc_DrawStandardFrame(u8, u8, u8, u8, u8, u8); +static void WindowFunc_DrawDialogueFrame(u8, u8, u8, u8, u8, u8); +static void WindowFunc_ClearStdWindowAndFrame(u8, u8, u8, u8, u8, u8); +static void WindowFunc_ClearDialogWindowAndFrame(u8, u8, u8, u8, u8, u8); +static void WindowFunc_DrawDialogFrameWithCustomTileAndPalette(u8, u8, u8, u8, u8, u8); +static void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8, u8, u8, u8, u8, u8); +static void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8, u8, u8, u8, u8, u8); +static void WindowFunc_ClearStdWindowAndFrameToTransparent(u8, u8, u8, u8, u8, u8); +static void task_free_buf_after_copying_tile_data_to_vram(u8 taskId); + static EWRAM_DATA u8 sStartMenuWindowId = 0; static EWRAM_DATA u8 sMapNamePopupWindowId = 0; static EWRAM_DATA struct Menu sMenu = {0}; static EWRAM_DATA u16 sTileNum = 0; static EWRAM_DATA u8 sPaletteNum = 0; static EWRAM_DATA u8 sYesNoWindowId = 0; -static EWRAM_DATA u8 sWindowId = 0; +static EWRAM_DATA u8 sHofPCTopBarWindowId = 0; static EWRAM_DATA u16 sFiller = 0; // needed to align static EWRAM_DATA bool8 sScheduledBgCopiesToVram[4] = {FALSE}; static EWRAM_DATA u16 sTempTileDataBufferIdx = 0; @@ -94,10 +105,10 @@ static const struct WindowTemplate sYesNo_WindowTemplates = .baseBlock = 0x125 }; -const u16 gUnknown_0860F0B0[] = INCBIN_U16("graphics/interface/860F0B0.gbapal"); -const u8 sTextColors[] = { TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; +static const u16 sHofPC_TopBar_Pal[] = INCBIN_U16("graphics/interface/hof_pc_topbar.gbapal"); +static const u8 sTextColors[] = { TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; -// Table of move info icon offsets in graphics/interface_fr/menu.png +// Table of move info icon offsets in graphics/interface/menu_info.png static const struct MenuInfoIcon sMenuInfoIcons[] = { // { width, height, offset } { 12, 12, 0x00 }, // Unused @@ -128,18 +139,6 @@ static const struct MenuInfoIcon sMenuInfoIcons[] = [MENU_INFO_ICON_BALL_BLUE] = { 8, 8, 0xAF }, // For placed decorations in player's room }; - -// Forward declarations -void WindowFunc_DrawStandardFrame(u8, u8, u8, u8, u8, u8); -void WindowFunc_DrawDialogueFrame(u8, u8, u8, u8, u8, u8); -void WindowFunc_ClearStdWindowAndFrame(u8, u8, u8, u8, u8, u8); -void WindowFunc_ClearDialogWindowAndFrame(u8, u8, u8, u8, u8, u8); -void WindowFunc_DrawDialogFrameWithCustomTileAndPalette(u8, u8, u8, u8, u8, u8); -void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8, u8, u8, u8, u8, u8); -void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8, u8, u8, u8, u8, u8); -void WindowFunc_ClearStdWindowAndFrameToTransparent(u8, u8, u8, u8, u8, u8); -void task_free_buf_after_copying_tile_data_to_vram(u8 taskId); - void InitStandardTextBoxWindows(void) { InitWindows(sStandardTextBox_WindowTemplates); @@ -249,7 +248,7 @@ void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram) CopyWindowToVram(windowId, COPYWIN_FULL); } -void WindowFunc_DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +static void WindowFunc_DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) { int i; @@ -316,7 +315,7 @@ void WindowFunc_DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width STD_WINDOW_PALETTE_NUM); } -void WindowFunc_DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +static void WindowFunc_DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) { FillBgTilemapBufferRect(bg, DLG_WINDOW_BASE_TILE_NUM + 1, @@ -411,12 +410,12 @@ void WindowFunc_DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width DLG_WINDOW_PALETTE_NUM); } -void WindowFunc_ClearStdWindowAndFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +static void WindowFunc_ClearStdWindowAndFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) { FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, STD_WINDOW_PALETTE_NUM); } -void WindowFunc_ClearDialogWindowAndFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +static void WindowFunc_ClearDialogWindowAndFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) { FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, STD_WINDOW_PALETTE_NUM); } @@ -489,10 +488,10 @@ u8 GetPlayerTextSpeedDelay(void) return sTextSpeedFrameDelays[speed]; } -u8 sub_81979C4(u8 a1) +u8 AddStartMenuWindow(u8 numActions) { if (sStartMenuWindowId == WINDOW_NONE) - sStartMenuWindowId = sub_8198AA4(0, 0x16, 1, 7, (a1 * 2) + 2, 0xF, 0x139); + sStartMenuWindowId = AddWindowParameterized(0, 22, 1, 7, (numActions * 2) + 2, 15, 0x139); return sStartMenuWindowId; } @@ -525,7 +524,7 @@ static u16 GetStandardFrameBaseTileNum(void) u8 AddMapNamePopUpWindow(void) { if (sMapNamePopupWindowId == WINDOW_NONE) - sMapNamePopupWindowId = sub_8198AA4(0, 1, 1, 10, 3, 14, 0x107); + sMapNamePopupWindowId = AddWindowParameterized(0, 1, 1, 10, 3, 14, 0x107); return sMapNamePopupWindowId; } @@ -549,7 +548,7 @@ void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct Text AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), callback, 2, 1, 3); } -void sub_8197AE8(bool8 copyToVram) +void EraseFieldMessageBox(bool8 copyToVram) { FillBgTilemapBufferRect(0, 0, 0, 0, 32, 32, 0x11); if (copyToVram == TRUE) @@ -568,7 +567,7 @@ void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 } // Never used. -void DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum) +static void DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum) { sTileNum = tileNum; sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM); @@ -579,7 +578,7 @@ void DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum) CopyWindowToVram(windowId, COPYWIN_FULL); } -void WindowFunc_DrawDialogFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +static void WindowFunc_DrawDialogFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) { FillBgTilemapBufferRect(bg, sTileNum + 1, @@ -684,7 +683,7 @@ void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram) CopyWindowToVram(windowId, COPYWIN_FULL); } -void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +static void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) { FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, 0); } @@ -712,7 +711,7 @@ void DrawStdFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 baseTileNum) CopyWindowToVram(windowId, COPYWIN_FULL); } -void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +static void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) { FillBgTilemapBufferRect(bg, sTileNum + 0, @@ -781,12 +780,13 @@ void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram) CopyWindowToVram(windowId, COPYWIN_FULL); } -void WindowFunc_ClearStdWindowAndFrameToTransparent(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) +static void WindowFunc_ClearStdWindowAndFrameToTransparent(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum) { FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, 0); } -u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile) +// Creates the window used to display the info bar at the top of the HOF PC that shows the controls and team number. +u8 HofPCTopBar_AddWindow(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile) { struct WindowTemplate window; memset(&window, 0, sizeof(window)); @@ -798,51 +798,54 @@ u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile) window.tilemapTop = yPos; window.height = 2; - window.tilemapLeft = 0x1E - xPos; + window.tilemapLeft = 30 - xPos; window.width = xPos; window.paletteNum = palette; window.baseBlock = baseTile; - sWindowId = AddWindow(&window); + sHofPCTopBarWindowId = AddWindow(&window); if (palette > 15) palette = 15 * 16; else palette *= 16; - LoadPalette(gUnknown_0860F0B0, palette, sizeof(gUnknown_0860F0B0)); - return sWindowId; + LoadPalette(sHofPC_TopBar_Pal, palette, sizeof(sHofPC_TopBar_Pal)); + return sHofPCTopBarWindowId; } -void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram) +// All the below functions checking WINDOW_NONE only handle failure of AddWindow in the above function. +// Because sHofPCTopBarWindowId is not initialized to WINDOW_NONE anywhere it does not handle +// the window not having been drawn yet. +void HofPCTopBar_Print(const u8 *string, u8 left, bool8 copyToVram) { u16 width = 0; - if (sWindowId != WINDOW_NONE) + if (sHofPCTopBarWindowId != WINDOW_NONE) { - PutWindowTilemap(sWindowId); - FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); + PutWindowTilemap(sHofPCTopBarWindowId); + FillWindowPixelBuffer(sHofPCTopBarWindowId, PIXEL_FILL(15)); width = GetStringWidth(FONT_SMALL, string, 0); - AddTextPrinterParameterized3(sWindowId, + AddTextPrinterParameterized3(sHofPCTopBarWindowId, FONT_SMALL, - 0xEC - (GetWindowAttribute(sWindowId, WINDOW_TILEMAP_LEFT) * 8) - a2 - width, + 236 - (GetWindowAttribute(sHofPCTopBarWindowId, WINDOW_TILEMAP_LEFT) * 8) - left - width, 1, sTextColors, 0, string); if (copyToVram) - CopyWindowToVram(sWindowId, COPYWIN_FULL); + CopyWindowToVram(sHofPCTopBarWindowId, COPYWIN_FULL); } } -void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram) +void HofPCTopBar_PrintPair(const u8 *string, const u8 *string2, bool8 noBg, u8 left, bool8 copyToVram) { u8 color[3]; u16 width = 0; - if (sWindowId != WINDOW_NONE) + if (sHofPCTopBarWindowId != WINDOW_NONE) { - if (a3 != 0) + if (noBg) { color[0] = TEXT_COLOR_TRANSPARENT; color[1] = TEXT_COLOR_WHITE; @@ -854,53 +857,55 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo color[1] = TEXT_COLOR_WHITE; color[2] = TEXT_COLOR_DARK_GRAY; } - PutWindowTilemap(sWindowId); - FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); + PutWindowTilemap(sHofPCTopBarWindowId); + FillWindowPixelBuffer(sHofPCTopBarWindowId, PIXEL_FILL(15)); if (string2 != NULL) { width = GetStringWidth(FONT_SMALL, string2, 0); - AddTextPrinterParameterized3(sWindowId, + AddTextPrinterParameterized3(sHofPCTopBarWindowId, FONT_SMALL, - 0xEC - (GetWindowAttribute(sWindowId, WINDOW_TILEMAP_LEFT) * 8) - a4 - width, + 236 - (GetWindowAttribute(sHofPCTopBarWindowId, WINDOW_TILEMAP_LEFT) * 8) - left - width, 1, color, 0, string2); } - AddTextPrinterParameterized4(sWindowId, FONT_NORMAL, 4, 1, 0, 0, color, 0, string); + AddTextPrinterParameterized4(sHofPCTopBarWindowId, FONT_NORMAL, 4, 1, 0, 0, color, 0, string); if (copyToVram) - CopyWindowToVram(sWindowId, COPYWIN_FULL); + CopyWindowToVram(sHofPCTopBarWindowId, COPYWIN_FULL); } } -void sub_81982D8(void) +// Unused +static void HofPCTopBar_CopyToVram(void) { - if (sWindowId != WINDOW_NONE) - CopyWindowToVram(sWindowId, COPYWIN_FULL); + if (sHofPCTopBarWindowId != WINDOW_NONE) + CopyWindowToVram(sHofPCTopBarWindowId, COPYWIN_FULL); } -void sub_81982F0(void) +// Unused +static void HofPCTopBar_Clear(void) { - if (sWindowId != WINDOW_NONE) + if (sHofPCTopBarWindowId != WINDOW_NONE) { - FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15)); - CopyWindowToVram(sWindowId, COPYWIN_FULL); + FillWindowPixelBuffer(sHofPCTopBarWindowId, PIXEL_FILL(15)); + CopyWindowToVram(sHofPCTopBarWindowId, COPYWIN_FULL); } } -void sub_8198314(void) +void HofPCTopBar_RemoveWindow(void) { - if (sWindowId != WINDOW_NONE) + if (sHofPCTopBarWindowId != WINDOW_NONE) { - FillWindowPixelBuffer(sWindowId, PIXEL_FILL(0)); - ClearWindowTilemap(sWindowId); - CopyWindowToVram(sWindowId, COPYWIN_FULL); - RemoveWindow(sWindowId); - sWindowId = WINDOW_NONE; + FillWindowPixelBuffer(sHofPCTopBarWindowId, PIXEL_FILL(0)); + ClearWindowTilemap(sHofPCTopBarWindowId); + CopyWindowToVram(sHofPCTopBarWindowId, COPYWIN_FULL); + RemoveWindow(sHofPCTopBarWindowId); + sHofPCTopBarWindowId = WINDOW_NONE; } } -u8 sub_8198348(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos, u8 a7) +static u8 InitMenu(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos, bool8 muteAPress) { s32 pos; @@ -911,7 +916,7 @@ u8 sub_8198348(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numC sMenu.windowId = windowId; sMenu.fontId = fontId; sMenu.optionHeight = cursorHeight; - sMenu.APressMuted = a7; + sMenu.APressMuted = muteAPress; pos = initialCursorPos; @@ -924,15 +929,17 @@ u8 sub_8198348(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numC return sMenu.cursorPos; } -u8 sub_81983AC(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos) +// There is no muted version of this, so the version that plays sound when A is pressed is the "Normal" one. +u8 InitMenuNormal(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos) { - return sub_8198348(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos, 0); + return InitMenu(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos, FALSE); } -u8 sub_81983EC(u8 windowId, u8 fontId, u8 left, u8 top, u8 numChoices, u8 initialCursorPos) +// Unused +static u8 InitMenuDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 numChoices, u8 initialCursorPos) { u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1); - return sub_81983AC(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos); + return InitMenuNormal(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos); } void RedrawMenuCursor(u8 oldPos, u8 newPos) @@ -1098,29 +1105,27 @@ s8 Menu_ProcessInputNoWrapAround_other(void) return MENU_NOTHING_CHOSEN; } -void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions) +void PrintMenuActionTextsAtPos(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions) { u8 i; for (i = 0; i < itemCount; i++) - { - AddTextPrinterParameterized(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, 0xFF, NULL); - } + AddTextPrinterParameterized(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SPEED_FF, NULL); CopyWindowToVram(windowId, COPYWIN_GFX); } -void sub_81987BC(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, u8 a6, u8 a7) +// Unused +static void PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, u8 letterSpacing, u8 lineSpacing) { u8 i; for (i = 0; i < itemCount; i++) - { - AddTextPrinterParameterized5(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, 0xFF, NULL, a6, a7); - } + AddTextPrinterParameterized5(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SPEED_FF, NULL, letterSpacing, lineSpacing); CopyWindowToVram(windowId, COPYWIN_GFX); } -void sub_8198854(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions) +// Unused +static void PrintMenuActionTextsAtTop(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions) { - PrintTextArray(windowId, fontId, GetFontAttribute(fontId, 0), 1, lineHeight, itemCount, menuActions); + PrintMenuActionTextsAtPos(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, lineHeight, itemCount, menuActions); } void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) @@ -1144,13 +1149,14 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l printer.currentChar = menuActions[actionIds[i]].text; printer.y = (lineHeight * i) + top; printer.currentY = printer.y; - AddTextPrinter(&printer, 0xFF, NULL); + AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); } -void sub_81989B8(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) +// Unused +static void AddItemMenuActionTextPrintersAtTop(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) { AddItemMenuActionTextPrinters(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, GetFontAttribute(fontId, FONTATTR_LETTER_SPACING), lineHeight, itemCount, menuActions, actionIds); } @@ -1173,14 +1179,15 @@ struct WindowTemplate CreateWindowTemplate(u8 bg, u8 left, u8 top, u8 width, u8 return template; } -u16 sub_8198AA4(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock) +u16 AddWindowParameterized(u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock) { struct WindowTemplate template; SetWindowTemplateFields(&template, bg, left, top, width, height, paletteNum, baseBlock); return AddWindow(&template); } -void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top, u16 baseTileNum, u8 paletteNum, u8 initialCursorPos) +// As opposed to CreateYesNoMenu, which has a hard-coded position. +static void CreateYesNoMenuAtPos(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top, u16 baseTileNum, u8 paletteNum, u8 initialCursorPos) { struct TextPrinterTemplate printer; @@ -1203,12 +1210,12 @@ void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); - sub_81983AC(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos); + InitMenuNormal(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos); } -void sub_8198C34(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 paletteNum) +static void CreateYesNoMenuInTopLeft(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 paletteNum) { - sub_8198AF8(window, fontId, 0, 1, baseTileNum, paletteNum, 0); + CreateYesNoMenuAtPos(window, fontId, 0, 1, baseTileNum, paletteNum, 0); } s8 Menu_ProcessInputNoWrapClearOnChoose(void) @@ -1232,9 +1239,7 @@ void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u for (i = 0; i < a7; i++) { for (j = 0; j < a6; j++) - { - AddTextPrinterParameterized(windowId, fontId, menuActions[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, 0xFF, NULL); - } + AddTextPrinterParameterized(windowId, fontId, menuActions[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, TEXT_SPEED_FF, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -1268,7 +1273,7 @@ void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth printer.y = (GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT) * i) + top; printer.currentX = printer.x; printer.currentY = printer.y; - AddTextPrinter(&printer, 0xFF, NULL); + AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); } } @@ -1593,7 +1598,8 @@ u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, boo return Menu_MoveCursor(0); } -u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 itemCount, u8 initialCursorPos) +// There is no muted version of this function, so the version that plays sound when A is pressed is the "Normal" one. +u8 InitMenuInUpperLeftCornerNormal(u8 windowId, u8 itemCount, u8 initialCursorPos) { return InitMenuInUpperLeftCorner(windowId, itemCount, initialCursorPos, FALSE); } @@ -1603,9 +1609,7 @@ void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *menuActi u32 i; for (i = 0; i < itemCount; i++) - { - AddTextPrinterParameterized(windowId, 1, menuActions[i].text, 8, (i * 16) + 1, 0xFF, NULL); - } + AddTextPrinterParameterized(windowId, 1, menuActions[i].text, 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -1631,7 +1635,7 @@ void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *menuActions printer.currentChar = menuActions[actionIds[i]].text; printer.y = (i * 16) + 1; printer.currentY = (i * 16) + 1; - AddTextPrinter(&printer, 0xFF, NULL); + AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); @@ -1658,8 +1662,8 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa printer.letterSpacing = 0; printer.lineSpacing = 0; - AddTextPrinter(&printer, 0xFF, NULL); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sYesNoWindowId, 2, initialCursorPos); + AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); + InitMenuInUpperLeftCornerNormal(sYesNoWindowId, 2, initialCursorPos); } void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *menuActions) @@ -1669,7 +1673,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const for (i = 0; i < rows; i++) { for (j = 0; j < columns; j++) - AddTextPrinterParameterized(windowId, 1, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, 0xFF, NULL); + AddTextPrinterParameterized(windowId, 1, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -1698,7 +1702,7 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M printer.y = (16 * i) + 1; printer.currentX = printer.x; printer.currentY = printer.y; - AddTextPrinter(&printer, 0xFF, NULL); + AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); } } @@ -2008,7 +2012,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y) StringExpandPlaceholders(gStringVar4, src); - AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, 0xFF, 0); + AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SPEED_FF, 0); } // Unused. Similar to BlitBitmapRect4Bit. @@ -2105,13 +2109,13 @@ void ListMenuLoadStdPalAt(u8 palOffset, u8 palId) { case 0: default: - palette = gFireRedMenuElements1_Pal; + palette = gMenuInfoElements1_Pal; break; case 1: - palette = gFireRedMenuElements2_Pal; + palette = gMenuInfoElements2_Pal; break; case 2: - palette = gFireRedMenuElements3_Pal; + palette = gMenuInfoElements3_Pal; break; } @@ -2120,7 +2124,7 @@ void ListMenuLoadStdPalAt(u8 palOffset, u8 palId) void BlitMenuInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y) { - BlitBitmapRectToWindow(windowId, gFireRedMenuElements_Gfx + sMenuInfoIcons[iconId].offset * 32, 0, 0, 128, 128, x, y, sMenuInfoIcons[iconId].width, sMenuInfoIcons[iconId].height); + BlitBitmapRectToWindow(windowId, &gMenuInfoElements_Gfx[sMenuInfoIcons[iconId].offset * 32], 0, 0, 128, 128, x, y, sMenuInfoIcons[iconId].width, sMenuInfoIcons[iconId].height); } void BufferSaveMenuText(u8 textId, u8 *dest, u8 color) diff --git a/src/party_menu.c b/src/party_menu.c index 609d5249ff..fd112c9959 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2481,7 +2481,7 @@ static u8 DisplaySelectionWindow(u8 windowType) AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], FONT_NORMAL, cursorDimension, (i * 16) + 1, letterSpacing, 0, sFontColorTable[fontColorsId], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text); } - InitMenuInUpperLeftCorner(sPartyMenuInternal->windowId[0], sPartyMenuInternal->numActions, 0, 1); + InitMenuInUpperLeftCorner(sPartyMenuInternal->windowId[0], sPartyMenuInternal->numActions, 0, TRUE); ScheduleBgCopyTilemapToVram(2); return sPartyMenuInternal->windowId[0]; @@ -4508,7 +4508,7 @@ static void ShowMoveSelectWindow(u8 slot) if (move != MOVE_NONE) moveCount++; } - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, moveCount, 0); + InitMenuInUpperLeftCornerNormal(windowId, moveCount, 0); ScheduleBgCopyTilemapToVram(2); } diff --git a/src/player_pc.c b/src/player_pc.c index 0742341ece..a4e55bf32a 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -400,7 +400,7 @@ static void InitPlayerPCMenu(u8 taskId) tWindowId = AddWindow(&windowTemplate); SetStandardWindowBorderStyle(tWindowId, 0); sub_81995E4(tWindowId, sTopMenuNumOptions, sPlayerPCMenuActions, sTopMenuOptionOrder); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(tWindowId, sTopMenuNumOptions, 0); + InitMenuInUpperLeftCornerNormal(tWindowId, sTopMenuNumOptions, 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = PlayerPCProcessMenuInput; } @@ -511,7 +511,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var) tWindowId = AddWindow(&windowTemplate); SetStandardWindowBorderStyle(tWindowId, 0); PrintMenuTable(tWindowId, ARRAY_COUNT(sItemStorage_MenuActions), sItemStorage_MenuActions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(tWindowId, 4, var); + InitMenuInUpperLeftCornerNormal(tWindowId, 4, var); ScheduleBgCopyTilemapToVram(0); ItemStorageMenuPrint(sItemStorage_OptionDescriptions[var]); } @@ -753,7 +753,7 @@ static void Mailbox_PrintMailOptions(u8 taskId) { u8 windowId = MailboxMenu_AddWindow(MAILBOXWIN_OPTIONS); PrintMenuTable(windowId, ARRAY_COUNT(gMailboxMailOptions), gMailboxMailOptions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, 4, 0); + InitMenuInUpperLeftCornerNormal(windowId, 4, 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = Mailbox_MailOptionsProcessInput; } diff --git a/src/pokeblock.c b/src/pokeblock.c index b5f1c92987..e07ad018ee 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -1150,7 +1150,7 @@ static void ShowPokeblockActionsWindow(u8 taskId) DestroyScrollArrows(); DrawStdFrameWithCustomTileAndPalette(tWindowId, 0, 1, 0xE); sub_81995E4(tWindowId, sPokeblockMenu->numActions, sPokeblockMenuActions, sPokeblockMenu->pokeblockActionIds); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(tWindowId, sPokeblockMenu->numActions, 0); + InitMenuInUpperLeftCornerNormal(tWindowId, sPokeblockMenu->numActions, 0); PutWindowTilemap(tWindowId); ScheduleBgCopyTilemapToVram(1); diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index f936d87119..ec3555088c 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1699,7 +1699,7 @@ static void CreateMainMenu(u8 whichMenu, s16 *windowIdPtr) DrawStdWindowFrame(windowId, FALSE); PrintMenuTable(windowId, OPTIONS_COUNT, (void *)sMainMenuTexts); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, OPTIONS_COUNT, whichMenu); + InitMenuInUpperLeftCornerNormal(windowId, OPTIONS_COUNT, whichMenu); *windowIdPtr = windowId; } @@ -8024,7 +8024,7 @@ static void AddMenu(void) ClearWindowTilemap(sStorage->menuWindowId); DrawStdFrameWithCustomTileAndPalette(sStorage->menuWindowId, FALSE, 11, 14); PrintMenuTable(sStorage->menuWindowId, sStorage->menuItemsCount, (void*)sStorage->menuItems); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sStorage->menuWindowId, sStorage->menuItemsCount, 0); + InitMenuInUpperLeftCornerNormal(sStorage->menuWindowId, sStorage->menuItemsCount, 0); ScheduleBgCopyTilemapToVram(0); sStorage->menuUnusedField = 0; } diff --git a/src/script_menu.c b/src/script_menu.c index 30aa4a0635..8293b6f7a1 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -109,7 +109,7 @@ static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, bool8 ignoreB windowId = CreateWindowFromRect(left, top, newWidth, count * 2); SetStandardWindowBorderStyle(windowId, 0); PrintMenuTable(windowId, count, actions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, cursorPos); + InitMenuInUpperLeftCornerNormal(windowId, count, cursorPos); ScheduleBgCopyTilemapToVram(0); InitMultichoiceCheckWrap(ignoreBPress, count, windowId, multichoiceId); } @@ -372,7 +372,7 @@ static void CreatePCMultichoice(void) StringExpandPlaceholders(gStringVar4, gText_PlayersPC); PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, numChoices, 0); + InitMenuInUpperLeftCornerNormal(windowId, numChoices, 0); CopyWindowToVram(windowId, COPYWIN_FULL); InitMultichoiceCheckWrap(FALSE, numChoices, windowId, MULTI_PC); } @@ -532,7 +532,7 @@ static void CreateLilycoveSSTidalMultichoice(void) } } - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, count, count - 1); + InitMenuInUpperLeftCornerNormal(windowId, count, count - 1); CopyWindowToVram(windowId, COPYWIN_FULL); InitMultichoiceCheckWrap(FALSE, count, windowId, MULTI_SSTIDAL_LILYCOVE); } @@ -696,7 +696,7 @@ static void CreateStartMenuForPokenavTutorial(void) AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL); - sub_81983AC(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0); + InitMenuNormal(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0); InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU); CopyWindowToVram(windowId, COPYWIN_FULL); } diff --git a/src/secret_base.c b/src/secret_base.c index 12f6df5ab5..72560ee23b 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -1028,7 +1028,7 @@ static void ShowRegistryMenuActions(u8 taskId) tActionWindowId = AddWindow(&template); SetStandardWindowBorderStyle(tActionWindowId, 0); PrintMenuTable(tActionWindowId, ARRAY_COUNT(sRegistryMenuActions), sRegistryMenuActions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(tActionWindowId, 2, 0); + InitMenuInUpperLeftCornerNormal(tActionWindowId, 2, 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = HandleRegistryMenuActionsInput; } diff --git a/src/shop.c b/src/shop.c index 43b7816f51..604abd1ab5 100755 --- a/src/shop.c +++ b/src/shop.c @@ -301,7 +301,7 @@ static u8 CreateShopMenu(u8 martType) SetStandardWindowBorderStyle(sMartInfo.windowId, 0); PrintMenuTable(sMartInfo.windowId, numMenuItems, sMartInfo.menuActions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sMartInfo.windowId, numMenuItems, 0); + InitMenuInUpperLeftCornerNormal(sMartInfo.windowId, numMenuItems, 0); PutWindowTilemap(sMartInfo.windowId); CopyWindowToVram(sMartInfo.windowId, COPYWIN_MAP); diff --git a/src/start_menu.c b/src/start_menu.c index 1c0b006e62..0cf102efcd 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -466,7 +466,7 @@ static bool32 InitStartMenuStep(void) break; case 2: LoadMessageBoxAndBorderGfx(); - DrawStdWindowFrame(sub_81979C4(sNumStartMenuActions), FALSE); + DrawStdWindowFrame(AddStartMenuWindow(sNumStartMenuActions), FALSE); sInitStartMenuData[1] = 0; sInitStartMenuData[0]++; break; @@ -482,7 +482,7 @@ static bool32 InitStartMenuStep(void) sInitStartMenuData[0]++; break; case 5: - sStartMenuCursorPos = sub_81983AC(GetStartMenuWindowId(), FONT_NORMAL, 0, 9, 16, sNumStartMenuActions, sStartMenuCursorPos); + sStartMenuCursorPos = InitMenuNormal(GetStartMenuWindowId(), FONT_NORMAL, 0, 9, 16, sNumStartMenuActions, sStartMenuCursorPos); CopyWindowToVram(GetStartMenuWindowId(), COPYWIN_MAP); return TRUE; } diff --git a/src/trade.c b/src/trade.c index 5716fdd84d..603d92c871 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1395,7 +1395,7 @@ static void TradeMenuProcessInput(void) DrawTextBorderOuter(1, 1, 14); FillWindowPixelBuffer(1, PIXEL_FILL(1)); PrintMenuTable(1, ARRAY_COUNT(sSelectTradeMonActions), sSelectTradeMonActions); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0); + InitMenuInUpperLeftCornerNormal(1, 2, 0); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_FULL); sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_SELECTED_MON; diff --git a/src/trader.c b/src/trader.c index c65d5ff87b..1d4424e751 100644 --- a/src/trader.c +++ b/src/trader.c @@ -82,7 +82,7 @@ void CreateAvailableDecorationsMenu(u8 taskId) AddTextPrinterParameterized(data[3], FONT_NORMAL, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, 255, NULL); } AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 255, NULL); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[3], 5, 0); + InitMenuInUpperLeftCornerNormal(data[3], 5, 0); ScheduleBgCopyTilemapToVram(0); } diff --git a/src/union_room_chat.c b/src/union_room_chat.c index 96c2aa8862..d2bce295be 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -2743,7 +2743,7 @@ static void AddYesNoMenuAt(u8 left, u8 top, u8 initialCursorPos) AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_Yes, 8, 1, TEXT_SPEED_FF, NULL); AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_No, 8, 17, TEXT_SPEED_FF, NULL); DrawTextBorderOuter(sDisplay->yesNoMenuWindowId, 1, 13); - InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDisplay->yesNoMenuWindowId, 2, initialCursorPos); + InitMenuInUpperLeftCornerNormal(sDisplay->yesNoMenuWindowId, 2, initialCursorPos); } } @@ -2987,8 +2987,8 @@ static void ShowKeyboardSwapMenu(void) { FillWindowPixelBuffer(3, PIXEL_FILL(1)); DrawTextBorderOuter(3, 1, 13); - PrintTextArray(3, FONT_SHORT, 8, 1, 14, 5, sKeyboardPageTitleTexts); - sub_81983AC(3, FONT_SHORT, 0, 1, 14, 5, GetCurrentKeyboardPage()); + PrintMenuActionTextsAtPos(3, FONT_SHORT, 8, 1, 14, 5, sKeyboardPageTitleTexts); + InitMenuNormal(3, FONT_SHORT, 0, 1, 14, 5, GetCurrentKeyboardPage()); PutWindowTilemap(3); } From 50d3003a0d66b30fa1bf50b33e1a7de6263dca5d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 3 Nov 2021 18:29:18 -0400 Subject: [PATCH 135/417] Text clean-up, TEXT_SPEED_FF to TEXT_SKIP_DRAW --- gflib/text.c | 185 ++++++------ gflib/text.h | 25 +- src/apprentice.c | 2 +- src/battle_interface.c | 2 +- src/battle_main.c | 2 +- src/battle_pyramid_bag.c | 2 +- src/battle_script_commands.c | 4 +- src/berry_blender.c | 24 +- src/berry_fix_program.c | 10 +- src/berry_powder.c | 2 +- src/berry_tag_screen.c | 4 +- src/braille.c | 319 ++++++++++----------- src/cable_club.c | 2 +- src/contest_util.c | 2 +- src/credits.c | 2 +- src/daycare.c | 2 +- src/decoration.c | 4 +- src/diploma.c | 2 +- src/dodrio_berry_picking.c | 52 ++-- src/easy_chat.c | 16 +- src/egg_hatch.c | 2 +- src/field_specials.c | 8 +- src/frontier_util.c | 104 +++---- src/hall_of_fame.c | 22 +- src/item_menu.c | 18 +- src/list_menu.c | 4 +- src/main_menu.c | 44 +-- src/map_name_popup.c | 2 +- src/mauville_old_man.c | 4 +- src/menu.c | 24 +- src/menu_specialized.c | 28 +- src/mystery_gift_menu.c | 4 +- src/naming_screen.c | 4 +- src/option_menu.c | 6 +- src/party_menu.c | 8 +- src/player_pc.c | 6 +- src/pokedex.c | 8 +- src/pokedex_area_screen.c | 2 +- src/pokemon_jump.c | 22 +- src/pokemon_storage_system.c | 28 +- src/pokenav_conditions_3.c | 4 +- src/pokenav_match_call_2.c | 6 +- src/pokenav_match_call_ui.c | 8 +- src/pokenav_region_map.c | 8 +- src/pokenav_ribbons_1.c | 2 +- src/pokenav_ribbons_2.c | 12 +- src/reset_rtc_screen.c | 6 +- src/roulette.c | 28 +- src/scrcmd.c | 5 +- src/script_menu.c | 28 +- src/shop.c | 4 +- src/start_menu.c | 24 +- src/trade.c | 2 +- src/trainer_card.c | 44 +-- src/trainer_hill.c | 6 +- src/union_room.c | 2 +- src/union_room_chat.c | 20 +- src/wild_encounter.c | 2 +- src/wireless_communication_status_screen.c | 2 +- 59 files changed, 617 insertions(+), 607 deletions(-) diff --git a/gflib/text.c b/gflib/text.c index 9d1a5464f6..bf5b01e486 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -13,6 +13,8 @@ #include "dynamic_placeholder_text_util.h" #include "fonts.h" +static u16 RenderText(struct TextPrinter *textPrinter); +static u32 RenderFont(struct TextPrinter *textPrinter); static u16 FontFunc_Small(struct TextPrinter *); static u16 FontFunc_Normal(struct TextPrinter *); static u16 FontFunc_Short(struct TextPrinter *); @@ -42,7 +44,7 @@ static u16 gLastTextFgColor; static u16 gLastTextShadowColor; const struct FontInfo *gFonts; -u8 gDisableTextPrinters; +bool8 gDisableTextPrinters; struct TextGlyph gCurGlyph; TextFlags gTextFlags; @@ -234,7 +236,7 @@ void DeactivateAllTextPrinters(void) { int printer; for (printer = 0; printer < NUM_TEXT_PRINTERS; ++printer) - gTextPrinters[printer].active = 0; + gTextPrinters[printer].active = FALSE; } u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)) @@ -265,16 +267,14 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi if (!gFonts) return FALSE; - gTempTextPrinter.active = 1; - gTempTextPrinter.state = 0; + gTempTextPrinter.active = TRUE; + gTempTextPrinter.state = RENDER_STATE_HANDLE_CHAR; gTempTextPrinter.textSpeed = speed; gTempTextPrinter.delayCounter = 0; gTempTextPrinter.scrollDistance = 0; - for (i = 0; i < 7; i++) - { + for (i = 0; i < (int)ARRAY_COUNT(gTempTextPrinter.subStructFields); i++) gTempTextPrinter.subStructFields[i] = 0; - } gTempTextPrinter.printerTemplate = *printerTemplate; gTempTextPrinter.callback = callback; @@ -282,7 +282,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi gTempTextPrinter.japanese = 0; GenerateFontHalfRowLookupTable(printerTemplate->fgColor, printerTemplate->bgColor, printerTemplate->shadowColor); - if (speed != TEXT_SPEED_FF && speed != 0) + if (speed != TEXT_SKIP_DRAW && speed != 0) { --gTempTextPrinter.textSpeed; gTextPrinters[printerTemplate->windowId] = gTempTextPrinter; @@ -290,17 +290,20 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi else { gTempTextPrinter.textSpeed = 0; + + // Render all text (up to limit) at once for (j = 0; j < 0x400; ++j) { - if (RenderFont(&gTempTextPrinter) == 1) + if (RenderFont(&gTempTextPrinter) == RENDER_FINISH) break; } - if (speed != TEXT_SPEED_FF) + // All the text is rendered to the window but don't draw it yet. + if (speed != TEXT_SKIP_DRAW) CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, COPYWIN_GFX); - gTextPrinters[printerTemplate->windowId].active = 0; + gTextPrinters[printerTemplate->windowId].active = FALSE; } - gDisableTextPrinters = 0; + gDisableTextPrinters = FALSE; return TRUE; } @@ -308,7 +311,7 @@ void RunTextPrinters(void) { int i; - if (gDisableTextPrinters == 0) + if (!gDisableTextPrinters) { for (i = 0; i < NUM_TEXT_PRINTERS; ++i) { @@ -317,14 +320,14 @@ void RunTextPrinters(void) u16 temp = RenderFont(&gTextPrinters[i]); switch (temp) { - case 0: + case RENDER_PRINT: CopyWindowToVram(gTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX); - case 3: + case RENDER_UPDATE: if (gTextPrinters[i].callback != 0) gTextPrinters[i].callback(&gTextPrinters[i].printerTemplate, temp); break; - case 1: - gTextPrinters[i].active = 0; + case RENDER_FINISH: + gTextPrinters[i].active = FALSE; break; } } @@ -337,13 +340,13 @@ bool16 IsTextPrinterActive(u8 id) return gTextPrinters[id].active; } -u32 RenderFont(struct TextPrinter *textPrinter) +static u32 RenderFont(struct TextPrinter *textPrinter) { u32 ret; while (TRUE) { ret = gFonts[textPrinter->printerTemplate.fontId].fontFunction(textPrinter); - if (ret != 2) + if (ret != RENDER_REPEAT) return ret; } } @@ -929,7 +932,7 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c } } -u16 RenderText(struct TextPrinter *textPrinter) +static u16 RenderText(struct TextPrinter *textPrinter) { struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields); u16 currChar; @@ -938,7 +941,7 @@ u16 RenderText(struct TextPrinter *textPrinter) switch (textPrinter->state) { - case 0: + case RENDER_STATE_HANDLE_CHAR: if ((JOY_HELD(A_BUTTON | B_BUTTON)) && subStruct->hasPrintBeenSpedUp) textPrinter->delayCounter = 0; @@ -950,7 +953,7 @@ u16 RenderText(struct TextPrinter *textPrinter) subStruct->hasPrintBeenSpedUp = TRUE; textPrinter->delayCounter = 0; } - return 3; + return RENDER_UPDATE; } if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED) && gTextFlags.autoScroll) @@ -966,10 +969,10 @@ u16 RenderText(struct TextPrinter *textPrinter) case CHAR_NEWLINE: textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentY += (gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing); - return 2; + return RENDER_REPEAT; case PLACEHOLDER_BEGIN: textPrinter->printerTemplate.currentChar++; - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_BEGIN: currChar = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; @@ -979,17 +982,17 @@ u16 RenderText(struct TextPrinter *textPrinter) textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_HIGHLIGHT: textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_SHADOW: textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; @@ -998,36 +1001,36 @@ u16 RenderText(struct TextPrinter *textPrinter) textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_PALETTE: textPrinter->printerTemplate.currentChar++; - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_FONT: subStruct->fontId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_RESET_SIZE: - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_PAUSE: textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; - textPrinter->state = 6; - return 2; + textPrinter->state = RENDER_STATE_PAUSE; + return RENDER_REPEAT; case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: - textPrinter->state = 1; + textPrinter->state = RENDER_STATE_WAIT; if (gTextFlags.autoScroll) subStruct->autoScrollDelay = 0; - return 3; + return RENDER_UPDATE; case EXT_CTRL_CODE_WAIT_SE: - textPrinter->state = 5; - return 3; + textPrinter->state = RENDER_STATE_WAIT_SE; + return RENDER_UPDATE; case EXT_CTRL_CODE_PLAY_BGM: currChar = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; currChar |= *textPrinter->printerTemplate.currentChar << 8; textPrinter->printerTemplate.currentChar++; PlayBGM(currChar); - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_ESCAPE: currChar = *textPrinter->printerTemplate.currentChar | 0x100; textPrinter->printerTemplate.currentChar++; @@ -1038,26 +1041,26 @@ u16 RenderText(struct TextPrinter *textPrinter) currChar |= (*textPrinter->printerTemplate.currentChar << 8); textPrinter->printerTemplate.currentChar++; PlaySE(currChar); - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_SHIFT_TEXT: textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_SHIFT_DOWN: textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_FILL_WINDOW: FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y; - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_PAUSE_MUSIC: m4aMPlayStop(&gMPlayInfo_BGM); - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_RESUME_MUSIC: m4aMPlayContinue(&gMPlayInfo_BGM); - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_CLEAR: width = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; @@ -1065,13 +1068,13 @@ u16 RenderText(struct TextPrinter *textPrinter) { ClearTextSpan(textPrinter, width); textPrinter->printerTemplate.currentX += width; - return 0; + return RENDER_PRINT; } - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_SKIP: textPrinter->printerTemplate.currentX = *textPrinter->printerTemplate.currentChar + textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentChar++; - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_CLEAR_TO: { widthHelper = *textPrinter->printerTemplate.currentChar; @@ -1082,29 +1085,29 @@ u16 RenderText(struct TextPrinter *textPrinter) { ClearTextSpan(textPrinter, width); textPrinter->printerTemplate.currentX += width; - return 0; + return RENDER_PRINT; } } - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_MIN_LETTER_SPACING: textPrinter->minLetterSpacing = *textPrinter->printerTemplate.currentChar++; - return 2; + return RENDER_REPEAT; case EXT_CTRL_CODE_JPN: - textPrinter->japanese = 1; - return 2; + textPrinter->japanese = TRUE; + return RENDER_REPEAT; case EXT_CTRL_CODE_ENG: - textPrinter->japanese = 0; - return 2; + textPrinter->japanese = FALSE; + return RENDER_REPEAT; } break; case CHAR_PROMPT_CLEAR: - textPrinter->state = 2; + textPrinter->state = RENDER_STATE_CLEAR; TextPrinterInitDownArrowCounters(textPrinter); - return 3; + return RENDER_UPDATE; case CHAR_PROMPT_SCROLL: - textPrinter->state = 3; + textPrinter->state = RENDER_STATE_SCROLL_START; TextPrinterInitDownArrowCounters(textPrinter); - return 3; + return RENDER_UPDATE; case CHAR_EXTRA_SYMBOL: currChar = *textPrinter->printerTemplate.currentChar | 0x100; textPrinter->printerTemplate.currentChar++; @@ -1113,9 +1116,9 @@ u16 RenderText(struct TextPrinter *textPrinter) currChar = *textPrinter->printerTemplate.currentChar++; gCurGlyph.width = DrawKeypadIcon(textPrinter->printerTemplate.windowId, currChar, textPrinter->printerTemplate.currentX, textPrinter->printerTemplate.currentY); textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing; - return 0; + return RENDER_PRINT; case EOS: - return 1; + return RENDER_FINISH; } switch (subStruct->fontId) @@ -1161,30 +1164,30 @@ u16 RenderText(struct TextPrinter *textPrinter) else textPrinter->printerTemplate.currentX += gCurGlyph.width; } - return 0; - case 1: + return RENDER_PRINT; + case RENDER_STATE_WAIT: if (TextPrinterWait(textPrinter)) - textPrinter->state = 0; - return 3; - case 2: + textPrinter->state = RENDER_STATE_HANDLE_CHAR; + return RENDER_UPDATE; + case RENDER_STATE_CLEAR: if (TextPrinterWaitWithDownArrow(textPrinter)) { FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y; - textPrinter->state = 0; + textPrinter->state = RENDER_STATE_HANDLE_CHAR; } - return 3; - case 3: + return RENDER_UPDATE; + case RENDER_STATE_SCROLL_START: if (TextPrinterWaitWithDownArrow(textPrinter)) { TextPrinterClearDownArrow(textPrinter); textPrinter->scrollDistance = gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing; textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; - textPrinter->state = 4; + textPrinter->state = RENDER_STATE_SCROLL; } - return 3; - case 4: + return RENDER_UPDATE; + case RENDER_STATE_SCROLL: if (textPrinter->scrollDistance) { int scrollSpeed = GetPlayerTextSpeed(); @@ -1203,22 +1206,22 @@ u16 RenderText(struct TextPrinter *textPrinter) } else { - textPrinter->state = 0; + textPrinter->state = RENDER_STATE_HANDLE_CHAR; } - return 3; - case 5: + return RENDER_UPDATE; + case RENDER_STATE_WAIT_SE: if (!IsSEPlaying()) - textPrinter->state = 0; - return 3; - case 6: + textPrinter->state = RENDER_STATE_HANDLE_CHAR; + return RENDER_UPDATE; + case RENDER_STATE_PAUSE: if (textPrinter->delayCounter != 0) textPrinter->delayCounter--; else - textPrinter->state = 0; - return 3; + textPrinter->state = RENDER_STATE_HANDLE_CHAR; + return RENDER_UPDATE; } - return 1; + return RENDER_FINISH; } // Unused @@ -1363,17 +1366,17 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) case PLACEHOLDER_BEGIN: switch (*++str) { - case PLACEHOLDER_ID_STRING_VAR_1: - bufferPointer = gStringVar1; - break; - case PLACEHOLDER_ID_STRING_VAR_2: - bufferPointer = gStringVar2; - break; - case PLACEHOLDER_ID_STRING_VAR_3: - bufferPointer = gStringVar3; - break; - default: - return 0; + case PLACEHOLDER_ID_STRING_VAR_1: + bufferPointer = gStringVar1; + break; + case PLACEHOLDER_ID_STRING_VAR_2: + bufferPointer = gStringVar2; + break; + case PLACEHOLDER_ID_STRING_VAR_3: + bufferPointer = gStringVar3; + break; + default: + return 0; } case CHAR_DYNAMIC: if (bufferPointer == NULL) diff --git a/gflib/text.h b/gflib/text.h index d23ee1be5a..110df8b87f 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -5,7 +5,9 @@ #define NUM_TEXT_PRINTERS 32 -#define TEXT_SPEED_FF 0xFF +// Given as a text speed when all the text should be +// loaded at once but not copied to vram yet. +#define TEXT_SKIP_DRAW 0xFF enum { FONT_SMALL, @@ -20,6 +22,25 @@ enum { FONT_BOLD, // JP glyph set only }; +// Return values for font functions +enum { + RENDER_PRINT, + RENDER_FINISH, + RENDER_REPEAT, // Run render function again, if e.g. a control code is encountered. + RENDER_UPDATE, +}; + +// Text printer states read by RenderText / FontFunc_Braille +enum { + RENDER_STATE_HANDLE_CHAR, + RENDER_STATE_WAIT, + RENDER_STATE_CLEAR, + RENDER_STATE_SCROLL_START, + RENDER_STATE_SCROLL, + RENDER_STATE_WAIT_SE, + RENDER_STATE_PAUSE, +}; + enum { FONTATTR_MAX_LETTER_WIDTH, FONTATTR_MAX_LETTER_HEIGHT, @@ -128,7 +149,6 @@ u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 bool16 AddTextPrinter(struct TextPrinterTemplate *template, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); void RunTextPrinters(void); bool16 IsTextPrinterActive(u8 id); -u32 RenderFont(struct TextPrinter *textPrinter); void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor); void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor); void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor); @@ -145,7 +165,6 @@ bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter); bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter); bool16 TextPrinterWait(struct TextPrinter *textPrinter); void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex); -u16 RenderText(struct TextPrinter *textPrinter); s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing); u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str); u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y); diff --git a/src/apprentice.c b/src/apprentice.c index 6048915117..6255b9215a 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -643,7 +643,7 @@ static void CreateApprenticeMenu(u8 menu) SetStandardWindowBorderStyle(windowId, 0); for (i = 0; i < count; i++) - AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL); InitMenuInUpperLeftCornerNormal(windowId, count, 0); CreateChooseAnswerTask(TRUE, count, windowId); diff --git a/src/battle_interface.c b/src/battle_interface.c index 17497cb2f5..94850ec573 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -2525,7 +2525,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, color[1] = 1; color[2] = 3; - AddTextPrinterParameterized4(winId, FONT_SMALL, x, y, 0, 0, color, -1, str); + AddTextPrinterParameterized4(winId, FONT_SMALL, x, y, 0, 0, color, TEXT_SKIP_DRAW, str); *windowId = winId; return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA)); diff --git a/src/battle_main.c b/src/battle_main.c index ec093ecc7b..8079546d48 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -682,7 +682,7 @@ static void CB2_InitBattleInternal(void) { CreateNPCTrainerParty(&gEnemyParty[0], gTrainerBattleOpponent_A, TRUE); if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) - CreateNPCTrainerParty(&gEnemyParty[3], gTrainerBattleOpponent_B, FALSE); + CreateNPCTrainerParty(&gEnemyParty[PARTY_SIZE / 2], gTrainerBattleOpponent_B, FALSE); SetWildMonHeldItem(); } diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index fdd3f03789..e18a292950 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -673,7 +673,7 @@ static void PrintItemQuantity(u8 windowId, u32 itemIndex, u8 y) 2); StringExpandPlaceholders(gStringVar4, gText_xVar1); xAlign = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119); - PyramidBagPrint_Quantity(windowId, gStringVar4, xAlign, y, 0, 0, TEXT_SPEED_FF, COLORID_DARK_GRAY); + PyramidBagPrint_Quantity(windowId, gStringVar4, xAlign, y, 0, 0, TEXT_SKIP_DRAW, COLORID_DARK_GRAY); } static void PrintItemDescription(s32 listMenuId) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index c3263099f2..391e828502 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6053,7 +6053,7 @@ static void DrawLevelUpBannerText(void) printerTemplate.bgColor = TEXT_COLOR_TRANSPARENT; printerTemplate.shadowColor = TEXT_COLOR_DARK_GRAY; - AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printerTemplate, TEXT_SKIP_DRAW, NULL); txtPtr = gStringVar4; *(txtPtr)++ = CHAR_EXTRA_SYMBOL; @@ -6083,7 +6083,7 @@ static void DrawLevelUpBannerText(void) printerTemplate.y = 10; printerTemplate.currentY = 10; - AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printerTemplate, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(B_WIN_LEVEL_UP_BANNER, COPYWIN_GFX); } diff --git a/src/berry_blender.c b/src/berry_blender.c index 6603f91fb1..4e7168fc1a 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -3495,7 +3495,7 @@ static bool8 PrintBlendingResults(void) u8 *txtPtr; xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_BlendingResults, 0xA8); - Blender_AddTextPrinter(5, sText_BlendingResults, xPos, 1, TEXT_SPEED_FF, 0); + Blender_AddTextPrinter(5, sText_BlendingResults, xPos, 1, TEXT_SKIP_DRAW, 0); if (sBerryBlender->numPlayers == BLENDER_MAX_PLAYERS) yPos = 17; @@ -3510,15 +3510,15 @@ static bool8 PrintBlendingResults(void) StringAppend(sBerryBlender->stringVar, sText_Dot); StringAppend(sBerryBlender->stringVar, gText_Space); StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 8, yPos, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sBerryBlender->stringVar, 8, yPos, TEXT_SKIP_DRAW, 3); StringCopy(sBerryBlender->stringVar, sBerryBlender->blendedBerries[place].name); ConvertInternationalString(sBerryBlender->stringVar, gLinkPlayers[place].language); StringAppend(sBerryBlender->stringVar, sText_SpaceBerry); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0x54, yPos, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0x54, yPos, TEXT_SKIP_DRAW, 3); } - Blender_AddTextPrinter(5, sText_MaximumSpeed, 0, 0x51, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sText_MaximumSpeed, 0, 0x51, TEXT_SKIP_DRAW, 3); ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->maxRPM / 100, STR_CONV_MODE_RIGHT_ALIGN, 3); StringAppend(sBerryBlender->stringVar, sText_Dot); @@ -3527,8 +3527,8 @@ static bool8 PrintBlendingResults(void) StringAppend(sBerryBlender->stringVar, sText_RPM); xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x51, TEXT_SPEED_FF, 3); - Blender_AddTextPrinter(5, sText_Time, 0, 0x61, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x51, TEXT_SKIP_DRAW, 3); + Blender_AddTextPrinter(5, sText_Time, 0, 0x61, TEXT_SKIP_DRAW, 3); seconds = (sBerryBlender->gameFrameTime / 60) % 60; minutes = (sBerryBlender->gameFrameTime / (60 * 60)); @@ -3540,7 +3540,7 @@ static bool8 PrintBlendingResults(void) StringAppend(sBerryBlender->stringVar, sText_Sec); xPos = GetStringRightAlignXOffset(FONT_NORMAL, sBerryBlender->stringVar, 0xA8); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x61, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sBerryBlender->stringVar, xPos, 0x61, TEXT_SKIP_DRAW, 3); sBerryBlender->framesToWait = 0; sBerryBlender->mainState++; @@ -3694,7 +3694,7 @@ static bool8 PrintBlendingRanking(void) case 3: DrawStdFrameWithCustomTileAndPalette(5, 0, 1, 0xD); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168); - Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SPEED_FF, 0); + Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SKIP_DRAW, 0); sBerryBlender->scoreIconIds[SCORE_BEST] = CreateSprite(&sSpriteTemplate_ScoreSymbols, 128, 52, 0); StartSpriteAnim(&gSprites[sBerryBlender->scoreIconIds[SCORE_BEST]], SCOREANIM_BEST_STATIC); @@ -3718,16 +3718,16 @@ static bool8 PrintBlendingRanking(void) StringAppend(sBerryBlender->stringVar, sText_Dot); StringAppend(sBerryBlender->stringVar, gText_Space); StringAppend(sBerryBlender->stringVar, gLinkPlayers[place].name); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0, yPos, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sBerryBlender->stringVar, 0, yPos, TEXT_SKIP_DRAW, 3); ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_BEST], STR_CONV_MODE_RIGHT_ALIGN, 3); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78, yPos, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78, yPos, TEXT_SKIP_DRAW, 3); ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_GOOD], STR_CONV_MODE_RIGHT_ALIGN, 3); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 32, yPos, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 32, yPos, TEXT_SKIP_DRAW, 3); ConvertIntToDecimalStringN(sBerryBlender->stringVar, sBerryBlender->scores[place][SCORE_MISS], STR_CONV_MODE_RIGHT_ALIGN, 3); - Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 64, yPos, TEXT_SPEED_FF, 3); + Blender_AddTextPrinter(5, sBerryBlender->stringVar, 78 + 64, yPos, TEXT_SKIP_DRAW, 3); } PutWindowTilemap(5); diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 3a0e4c3261..e2f7651795 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -305,19 +305,19 @@ static void BerryFix_GpuSet(void) width = GetStringWidth(FONT_SMALL, sText_Emerald, 0); left = (120 - width) / 2; - AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_Emerald); + AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_Emerald); width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0); left = (120 - width) / 2 + 120; - AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire); + AddTextPrinterParameterized3(2, FONT_SMALL, left, 3, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire); width = GetStringWidth(FONT_SMALL, sText_RubySapphire, 0); left = (112 - width) / 2; - AddTextPrinterParameterized3(3, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SPEED_FF, sText_RubySapphire); + AddTextPrinterParameterized3(3, FONT_SMALL, left, 0, sGameTitleTextColors, TEXT_SKIP_DRAW, sText_RubySapphire); width = GetStringWidth(FONT_NORMAL, sText_BerryProgramUpdate, 0); left = (208 - width) / 2; - AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SPEED_FF, sText_BerryProgramUpdate); + AddTextPrinterParameterized3(0, FONT_NORMAL, left, 2, sBerryProgramTextColors, TEXT_SKIP_DRAW, sText_BerryProgramUpdate); CopyWindowToVram(2, COPYWIN_GFX); CopyWindowToVram(3, COPYWIN_GFX); @@ -346,7 +346,7 @@ static void BerryFix_SetScene(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); FillWindowPixelBuffer(1, PIXEL_FILL(10)); - AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, -1, sBerryProgramTexts[scene]); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0, sBerryProgramTextColors, TEXT_SKIP_DRAW, sBerryProgramTexts[scene]); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_GFX); switch (scene) diff --git a/src/berry_powder.c b/src/berry_powder.c index d933dbff13..96f14d6e4e 100755 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -211,7 +211,7 @@ static void PrintBerryPowderAmount(u8 windowId, int amount, u8 x, u8 y, u8 speed static void DrawPlayerPowderAmount(u8 windowId, u16 baseTileOffset, u8 paletteNum, u32 amount) { DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, baseTileOffset, paletteNum); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Powder, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Powder, 0, 1, TEXT_SKIP_DRAW, NULL); PrintBerryPowderAmount(windowId, amount, 26, 17, 0); } diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index fac8c12c2a..80a66d0cb1 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -409,7 +409,7 @@ static void PrintBerryNumberAndName(void) static void PrintBerrySize(void) { const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); - AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_SizeSlash, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_SizeSlash, 0, 1, TEXT_SKIP_DRAW, NULL); if (berry->size != 0) { u32 inches, fraction; @@ -434,7 +434,7 @@ static void PrintBerrySize(void) static void PrintBerryFirmness(void) { const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); - AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_FirmSlash, 0, 0x11, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_FirmSlash, 0, 0x11, TEXT_SKIP_DRAW, NULL); if (berry->firmness != 0) AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL); else diff --git a/src/braille.c b/src/braille.c index e9c2ddc400..b4ee43ad02 100644 --- a/src/braille.c +++ b/src/braille.c @@ -21,187 +21,174 @@ u16 FontFunc_Braille(struct TextPrinter *textPrinter) switch (textPrinter->state) { - case 0: - if (JOY_HELD(A_BUTTON | B_BUTTON) && subStruct->hasPrintBeenSpedUp) + case RENDER_STATE_HANDLE_CHAR: + if (JOY_HELD(A_BUTTON | B_BUTTON) && subStruct->hasPrintBeenSpedUp) + { + textPrinter->delayCounter = 0; + } + if (textPrinter->delayCounter && textPrinter->textSpeed) + { + textPrinter->delayCounter --; + if (gTextFlags.canABSpeedUpPrint && JOY_NEW(A_BUTTON | B_BUTTON)) { + subStruct->hasPrintBeenSpedUp = TRUE; textPrinter->delayCounter = 0; } - if (textPrinter->delayCounter && textPrinter->textSpeed) - { - textPrinter->delayCounter --; - if (gTextFlags.canABSpeedUpPrint && JOY_NEW(A_BUTTON | B_BUTTON)) - { - subStruct->hasPrintBeenSpedUp = TRUE; - textPrinter->delayCounter = 0; - } - return 3; - } - if (gTextFlags.autoScroll) - { - textPrinter->delayCounter = 3; - } - else - { - textPrinter->delayCounter = textPrinter->textSpeed; - } + return RENDER_UPDATE; + } + if (gTextFlags.autoScroll) + textPrinter->delayCounter = 3; + else + textPrinter->delayCounter = textPrinter->textSpeed; + + char_ = *textPrinter->printerTemplate.currentChar++; + switch (char_) + { + case EOS: + return RENDER_FINISH; + case CHAR_NEWLINE: + textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; + textPrinter->printerTemplate.currentY += gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing; + return RENDER_REPEAT; + case PLACEHOLDER_BEGIN: + textPrinter->printerTemplate.currentChar++; + return RENDER_REPEAT; + case EXT_CTRL_CODE_BEGIN: char_ = *textPrinter->printerTemplate.currentChar++; switch (char_) { - case EOS: - return 1; - case CHAR_NEWLINE: - textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; - textPrinter->printerTemplate.currentY += gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing; - return 2; - case PLACEHOLDER_BEGIN: - textPrinter->printerTemplate.currentChar++; - return 2; - case EXT_CTRL_CODE_BEGIN: - char_ = *textPrinter->printerTemplate.currentChar++; - switch (char_) - { - case EXT_CTRL_CODE_COLOR: - textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar++; - GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); - return 2; - case EXT_CTRL_CODE_HIGHLIGHT: - textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar++; - GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); - return 2; - case EXT_CTRL_CODE_SHADOW: - textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar++; - GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); - return 2; - case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: - textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar; - textPrinter->printerTemplate.bgColor = *++textPrinter->printerTemplate.currentChar; - textPrinter->printerTemplate.shadowColor = *++textPrinter->printerTemplate.currentChar; - textPrinter->printerTemplate.currentChar++; + case EXT_CTRL_CODE_COLOR: + textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar++; + GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); + return RENDER_REPEAT; + case EXT_CTRL_CODE_HIGHLIGHT: + textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar++; + GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); + return RENDER_REPEAT; + case EXT_CTRL_CODE_SHADOW: + textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar++; + GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); + return RENDER_REPEAT; + case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: + textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar; + textPrinter->printerTemplate.bgColor = *++textPrinter->printerTemplate.currentChar; + textPrinter->printerTemplate.shadowColor = *++textPrinter->printerTemplate.currentChar; + textPrinter->printerTemplate.currentChar++; - GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); - return 2; - case EXT_CTRL_CODE_PALETTE: - textPrinter->printerTemplate.currentChar++; - return 2; - case EXT_CTRL_CODE_FONT: - subStruct->fontId = *textPrinter->printerTemplate.currentChar; - textPrinter->printerTemplate.currentChar++; - return 2; - case EXT_CTRL_CODE_RESET_SIZE: - return 2; - case EXT_CTRL_CODE_PAUSE: - textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++; - textPrinter->state = 6; - return 2; - case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: - textPrinter->state = 1; - if (gTextFlags.autoScroll) - { - subStruct->autoScrollDelay = 0; - } - return 3; - case EXT_CTRL_CODE_WAIT_SE: - textPrinter->state = 5; - return 3; - case EXT_CTRL_CODE_PLAY_BGM: - case EXT_CTRL_CODE_PLAY_SE: - textPrinter->printerTemplate.currentChar += 2; - return 2; - case EXT_CTRL_CODE_ESCAPE: - char_ = *++textPrinter->printerTemplate.currentChar; - break; - case EXT_CTRL_CODE_SHIFT_TEXT: - textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++; - return 2; - case EXT_CTRL_CODE_SHIFT_DOWN: - textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar++; - return 2; - case EXT_CTRL_CODE_FILL_WINDOW: - FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); - return 2; - } - break; - case CHAR_PROMPT_CLEAR: - textPrinter->state = 2; - TextPrinterInitDownArrowCounters(textPrinter); - return 3; - case CHAR_PROMPT_SCROLL: - textPrinter->state = 3; - TextPrinterInitDownArrowCounters(textPrinter); - return 3; - case CHAR_EXTRA_SYMBOL: - char_ = *textPrinter->printerTemplate.currentChar++| 0x100; - break; - case CHAR_KEYPAD_ICON: - textPrinter->printerTemplate.currentChar++; - return 0; - } - DecompressGlyph_Braille(char_); - CopyGlyphToWindow(textPrinter); - textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing; - return 0; - case 1: - if (TextPrinterWait(textPrinter)) - { - textPrinter->state = 0; - } - return 3; - case 2: - if (TextPrinterWaitWithDownArrow(textPrinter)) - { + GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); + return RENDER_REPEAT; + case EXT_CTRL_CODE_PALETTE: + textPrinter->printerTemplate.currentChar++; + return RENDER_REPEAT; + case EXT_CTRL_CODE_FONT: + subStruct->fontId = *textPrinter->printerTemplate.currentChar; + textPrinter->printerTemplate.currentChar++; + return RENDER_REPEAT; + case EXT_CTRL_CODE_RESET_SIZE: + return RENDER_REPEAT; + case EXT_CTRL_CODE_PAUSE: + textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++; + textPrinter->state = RENDER_STATE_PAUSE; + return RENDER_REPEAT; + case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: + textPrinter->state = RENDER_STATE_WAIT; + if (gTextFlags.autoScroll) + subStruct->autoScrollDelay = 0; + return RENDER_UPDATE; + case EXT_CTRL_CODE_WAIT_SE: + textPrinter->state = RENDER_STATE_WAIT_SE; + return RENDER_UPDATE; + case EXT_CTRL_CODE_PLAY_BGM: + case EXT_CTRL_CODE_PLAY_SE: + textPrinter->printerTemplate.currentChar += 2; + return RENDER_REPEAT; + case EXT_CTRL_CODE_ESCAPE: + char_ = *++textPrinter->printerTemplate.currentChar; + break; + case EXT_CTRL_CODE_SHIFT_TEXT: + textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++; + return RENDER_REPEAT; + case EXT_CTRL_CODE_SHIFT_DOWN: + textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar++; + return RENDER_REPEAT; + case EXT_CTRL_CODE_FILL_WINDOW: FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); - textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; - textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y; - textPrinter->state = 0; + return RENDER_REPEAT; } - return 3; - case 3: - if (TextPrinterWaitWithDownArrow(textPrinter)) + break; + case CHAR_PROMPT_CLEAR: + textPrinter->state = RENDER_STATE_CLEAR; + TextPrinterInitDownArrowCounters(textPrinter); + return RENDER_UPDATE; + case CHAR_PROMPT_SCROLL: + textPrinter->state = RENDER_STATE_SCROLL_START; + TextPrinterInitDownArrowCounters(textPrinter); + return RENDER_UPDATE; + case CHAR_EXTRA_SYMBOL: + char_ = *textPrinter->printerTemplate.currentChar++| 0x100; + break; + case CHAR_KEYPAD_ICON: + textPrinter->printerTemplate.currentChar++; + return RENDER_PRINT; + } + DecompressGlyph_Braille(char_); + CopyGlyphToWindow(textPrinter); + textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing; + return RENDER_PRINT; + case RENDER_STATE_WAIT: + if (TextPrinterWait(textPrinter)) + textPrinter->state = RENDER_STATE_HANDLE_CHAR; + return RENDER_UPDATE; + case RENDER_STATE_CLEAR: + if (TextPrinterWaitWithDownArrow(textPrinter)) + { + FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); + textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; + textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y; + textPrinter->state = RENDER_STATE_HANDLE_CHAR; + } + return RENDER_UPDATE; + case RENDER_STATE_SCROLL_START: + if (TextPrinterWaitWithDownArrow(textPrinter)) + { + TextPrinterClearDownArrow(textPrinter); + textPrinter->scrollDistance = gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing; + textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; + textPrinter->state = RENDER_STATE_SCROLL; + } + return RENDER_UPDATE; + case RENDER_STATE_SCROLL: + if (textPrinter->scrollDistance) + { + if (textPrinter->scrollDistance < sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed]) { - TextPrinterClearDownArrow(textPrinter); - textPrinter->scrollDistance = gFonts[textPrinter->printerTemplate.fontId].maxLetterHeight + textPrinter->printerTemplate.lineSpacing; - textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x; - textPrinter->state = 4; - } - return 3; - case 4: - if (textPrinter->scrollDistance) - { - if (textPrinter->scrollDistance < sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed]) - { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); - textPrinter->scrollDistance = 0; - } - else - { - ScrollWindow(textPrinter->printerTemplate.windowId, 0, sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor)); - textPrinter->scrollDistance -= sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed]; - } - CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX); + ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); + textPrinter->scrollDistance = 0; } else { - textPrinter->state = 0; + ScrollWindow(textPrinter->printerTemplate.windowId, 0, sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor)); + textPrinter->scrollDistance -= sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed]; } - return 3; - case 5: - if (!IsSEPlaying()) - { - textPrinter->state = 0; - } - return 3; - case 6: - if (textPrinter->delayCounter) - { - textPrinter->delayCounter --; - } - else - { - textPrinter->state = 0; - } - return 3; + CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX); + } + else + { + textPrinter->state = RENDER_STATE_HANDLE_CHAR; + } + return RENDER_UPDATE; + case RENDER_STATE_WAIT_SE: + if (!IsSEPlaying()) + textPrinter->state = RENDER_STATE_HANDLE_CHAR; + return RENDER_UPDATE; + case RENDER_STATE_PAUSE: + if (textPrinter->delayCounter) + textPrinter->delayCounter --; + else + textPrinter->state = RENDER_STATE_HANDLE_CHAR; + return RENDER_UPDATE; } - return 1; + return RENDER_FINISH; } static void DecompressGlyph_Braille(u16 glyph) diff --git a/src/cable_club.c b/src/cable_club.c index 7d16c5b419..1f943b03ab 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -100,7 +100,7 @@ static void PrintNumPlayersInLink(u16 windowId, u32 numPlayers) SetStandardWindowBorderStyle(windowId, 0); StringExpandPlaceholders(gStringVar4, gText_NumPlayerLink); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 88); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(windowId, COPYWIN_FULL); } diff --git a/src/contest_util.c b/src/contest_util.c index e1c95d4a2f..37a5dedcd9 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -1181,7 +1181,7 @@ static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId) if (strWidth > 30) strWidth = 30; - AddTextPrinterParameterized3(windowId, FONT_NORMAL, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, -1, text); + AddTextPrinterParameterized3(windowId, FONT_NORMAL, (strWidth * 8 - origWidth) / 2, 1, sContestLinkTextColors, TEXT_SKIP_DRAW, text); { s32 i; struct Sprite *sprite; diff --git a/src/credits.c b/src/credits.c index 0643f2c597..43c8d66283 100644 --- a/src/credits.c +++ b/src/credits.c @@ -401,7 +401,7 @@ static void PrintCreditsText(const u8 *string, u8 y, bool8 isTitle) } x = GetStringCenterAlignXOffsetWithLetterSpacing(FONT_NORMAL, string, DISPLAY_WIDTH, 1); - AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 1, 0, color, -1, string); + AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 1, 0, color, TEXT_SKIP_DRAW, string); } #define tMainTaskId data[1] diff --git a/src/daycare.c b/src/daycare.c index ce11e43759..c900e34933 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -1199,7 +1199,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y) printer.bgColor = 1; printer.shadowColor = 3; - AddTextPrinter(&printer, 0xFF, NULL); + AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL); } static void DaycarePrintMonNickname(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y) diff --git a/src/decoration.c b/src/decoration.c index 3f93d9ccc2..bb2dea7f97 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -723,9 +723,9 @@ static void PrintDecorationCategoryMenuItems(u8 taskId) { // Only DOLL and CUSHION decorations are enabled when decorating the player's room. if (shouldDisable == TRUE && i != DECORCAT_DOLL && i != DECORCAT_CUSHION) - PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, TRUE, TEXT_SPEED_FF); + PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, TRUE, TEXT_SKIP_DRAW); else - PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, FALSE, TEXT_SPEED_FF); + PrintDecorationCategoryMenuItem(windowId, i, 8, i * 16, FALSE, TEXT_SKIP_DRAW); } AddTextPrinterParameterized(windowId, FONT_NORMAL, gTasks[taskId].tDecorationMenuCommand == DECOR_MENU_TRADE ? gText_Exit : gText_Cancel, 8, i * 16 + 1, 0, NULL); diff --git a/src/diploma.c b/src/diploma.c index 6b1b7fbf5f..52fe94a530 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -205,5 +205,5 @@ static void PrintDiplomaText(u8 *text, u8 var1, u8 var2) { u8 color[3] = {0, 2, 3}; - AddTextPrinterParameterized4(0, FONT_NORMAL, var1, var2, 0, 0, color, -1, text); + AddTextPrinterParameterized4(0, FONT_NORMAL, var1, var2, 0, 0, color, TEXT_SKIP_DRAW, text); } diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 41060415e0..8c09afeb3c 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -3008,14 +3008,14 @@ static void PrintRecordsText(u8 windowId, s32 width) LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0); DrawTextBorderOuter(windowId, 0x21D, 0xD); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BerryPickingRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryPickingRecords, width * 8), 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BerryPickingRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryPickingRecords, width * 8), 1, TEXT_SKIP_DRAW, NULL); for (i = 0; i < NUM_RECORD_TYPES; i++) { ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, sRecordNumMaxDigits[i]); numWidth = GetStringWidth(FONT_NORMAL, gStringVar1, -1); - AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, sRecordTextYCoords[i][0], TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, sRecordTextYCoords[i][0], TEXT_SKIP_DRAW, NULL); x = (width * 8) - numWidth; - AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, sRecordNumYCoords[i][0], TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, sRecordNumYCoords[i][0], TEXT_SKIP_DRAW, NULL); } PutWindowTilemap(windowId); } @@ -4649,7 +4649,7 @@ static void ShowNames(void) if (playerId == GetMultiplayerId()) colorsId = COLORID_BLUE; name = GetPlayerName(playerId); - AddTextPrinterParameterized3(sGfx->windowIds[i], FONT_NORMAL, left, 1, sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(sGfx->windowIds[i], FONT_NORMAL, left, 1, sTextColorTable[colorsId], TEXT_SKIP_DRAW, name); CopyWindowToVram(sGfx->windowIds[i], COPYWIN_GFX); window.baseBlock += 0xE; DrawMessageWindow(&window); @@ -4733,15 +4733,15 @@ static void PrintRankedScores(u8 numPlayers_) u8 playerId = playersByRanking[i]; u32 points = scoreResults[playerId].score; - AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, sRankingTexts[scoreResults[playerId].ranking], 8, sRankingYCoords[i], -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, sRankingTexts[scoreResults[playerId].ranking], 8, sRankingYCoords[i], TEXT_SKIP_DRAW, NULL); if (playerId == GetMultiplayerId()) colorsId = COLORID_BLUE; name = GetPlayerName(playerId); - AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 28, sRankingYCoords[i], sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 28, sRankingYCoords[i], sTextColorTable[colorsId], TEXT_SKIP_DRAW, name); ConvertIntToDecimalStringN(numString, points, STR_CONV_MODE_LEFT_ALIGN, 7); numWidth = GetStringWidth(FONT_NORMAL, numString, -1); - AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, numString, x - numWidth, sRankingYCoords[i], -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_SpacePoints, x, sRankingYCoords[i], -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, numString, x - numWidth, sRankingYCoords[i], TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_SpacePoints, x, sRankingYCoords[i], TEXT_SKIP_DRAW, NULL); } } @@ -4772,8 +4772,8 @@ static void ShowResults(void) FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1)); strWidth = GetStringWidth(FONT_NORMAL, gText_BerryPickingResults, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_BerryPickingResults, x, 1, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_10P30P50P50P, 68, 17, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_BerryPickingResults, x, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gText_10P30P50P50P, 68, 17, TEXT_SKIP_DRAW, NULL); for (i = 0; i < numPlayers; i++) { u8 colorsId = COLORID_GRAY; @@ -4781,7 +4781,7 @@ static void ShowResults(void) colorsId = COLORID_BLUE; name = GetPlayerName(i); - AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 0, sResultsYCoords[i], sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, 0, sResultsYCoords[i], sTextColorTable[colorsId], TEXT_SKIP_DRAW, name); for (j = 0; j < 4; j++) { u32 width; @@ -4793,9 +4793,9 @@ static void ShowResults(void) // If player got the most of a berry type, highlight their number in red if (maxBerriesPicked == berriesPicked && maxBerriesPicked != 0) - AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], -1, gStringVar4); + AddTextPrinterParameterized3(sGfx->windowIds[1], FONT_NORMAL, sResultsXCoords[j] - width, sResultsYCoords[i], sTextColorTable[COLORID_RED], TEXT_SKIP_DRAW, gStringVar4); else - AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, sResultsXCoords[j] - width, sResultsYCoords[i], TEXT_SKIP_DRAW, NULL); } } CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); @@ -4826,7 +4826,7 @@ static void ShowResults(void) FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1)); strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingRankings, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingRankings, x, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingRankings, x, 1, TEXT_SKIP_DRAW, NULL); sGfx->state++; break; case 6: @@ -4872,12 +4872,12 @@ static void ShowResults(void) FillWindowPixelBuffer(sGfx->windowIds[1], PIXEL_FILL(1)); strWidth = GetStringWidth(FONT_NORMAL, gText_AnnouncingPrizes, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingPrizes, x, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_AnnouncingPrizes, x, 1, TEXT_SKIP_DRAW, NULL); DynamicPlaceholderTextUtil_Reset(); CopyItemName(GetPrizeItemId(), gStringVar1); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FirstPlacePrize); - AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); prizeState = TryGivePrize(); if (prizeState != PRIZE_RECEIVED && prizeState != NO_PRIZE) { @@ -4888,7 +4888,7 @@ static void ShowResults(void) DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_CantHoldAnyMore); else if (prizeState == PRIZE_FILLED_BAG) DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_FilledStorageSpace); - AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 41, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[1], FONT_NORMAL, gStringVar4, 0, 41, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); CopyWindowToVram(sGfx->windowIds[1], COPYWIN_GFX); @@ -4946,10 +4946,10 @@ static void Msg_WantToPlayAgain(void) // Print text FillWindowPixelBuffer(sGfx->windowIds[WIN_PLAY_AGAIN], PIXEL_FILL(1)); FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1)); - AddTextPrinterParameterized(sGfx->windowIds[WIN_PLAY_AGAIN], FONT_NORMAL, gText_WantToPlayAgain, 0, 5, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_PLAY_AGAIN], FONT_NORMAL, gText_WantToPlayAgain, 0, 5, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sGfx->windowIds[WIN_PLAY_AGAIN], COPYWIN_GFX); CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], COPYWIN_GFX); sGfx->state++; @@ -4970,9 +4970,9 @@ static void Msg_WantToPlayAgain(void) if (y == PLAY_AGAIN_NONE) y = PLAY_AGAIN_YES; FillWindowPixelBuffer(sGfx->windowIds[WIN_YES_NO], PIXEL_FILL(1)); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, -1, NULL); - AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_Yes, 8, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_No, 8, 17, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sGfx->windowIds[WIN_YES_NO], FONT_NORMAL, gText_SelectorArrow2, 0, ((y - 1) * 16) + 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sGfx->windowIds[WIN_YES_NO], COPYWIN_FULL); // Increment state only if A or B button have been pressed. @@ -5063,7 +5063,7 @@ static void Msg_CommunicationStandby(void) break; case 1: FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); - AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_CommunicationStandby3, 0, 5, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_CommunicationStandby3, 0, 5, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); sGfx->state++; break; @@ -5103,7 +5103,7 @@ static void Msg_SomeoneDroppedOut(void) break; case 1: FillWindowPixelBuffer(sGfx->windowIds[0], PIXEL_FILL(1)); - AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_SomeoneDroppedOut, 0, 5, -1, NULL); + AddTextPrinterParameterized(sGfx->windowIds[0], FONT_NORMAL, gText_SomeoneDroppedOut, 0, 5, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sGfx->windowIds[0], COPYWIN_GFX); sGfx->state++; break; diff --git a/src/easy_chat.c b/src/easy_chat.c index 078e07eb2f..c78e14ecf3 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -3932,7 +3932,7 @@ static void PrintTitle(void) xOffset = GetStringCenterAlignXOffset(FONT_NORMAL, titleText, 144); FillWindowPixelBuffer(0, PIXEL_FILL(0)); - PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SPEED_FF, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); + PrintEasyChatTextWithColors(0, FONT_NORMAL, titleText, xOffset, 1, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_FULL); } @@ -4003,10 +4003,10 @@ static void PrintEasyChatStdMessage(u8 msgId) FillWindowPixelBuffer(1, PIXEL_FILL(1)); if (text1) - PrintEasyChatText(1, FONT_NORMAL, text1, 0, 1, TEXT_SPEED_FF, 0); + PrintEasyChatText(1, FONT_NORMAL, text1, 0, 1, TEXT_SKIP_DRAW, 0); if (text2) - PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SPEED_FF, 0); + PrintEasyChatText(1, FONT_NORMAL, text2, 0, 17, TEXT_SKIP_DRAW, 0); CopyWindowToVram(1, COPYWIN_FULL); } @@ -4099,7 +4099,7 @@ static void PrintCurrentPhrase(void) } *str = EOS; - PrintEasyChatText(sScreenControl->windowId, FONT_NORMAL, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SPEED_FF, 0); + PrintEasyChatText(sScreenControl->windowId, FONT_NORMAL, sScreenControl->phrasePrintBuffer, 0, i * 16 + 1, TEXT_SKIP_DRAW, 0); } CopyWindowToVram(sScreenControl->windowId, COPYWIN_FULL); @@ -4245,7 +4245,7 @@ static void PrintKeyboardGroupNames(void) return; } - PrintEasyChatText(2, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SPEED_FF, NULL); + PrintEasyChatText(2, FONT_NORMAL, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SKIP_DRAW, NULL); } y += 16; @@ -4257,7 +4257,7 @@ static void PrintKeyboardAlphabet(void) u32 i; for (i = 0; i < ARRAY_COUNT(sEasyChatKeyboardAlphabet); i++) - PrintEasyChatText(2, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SPEED_FF, NULL); + PrintEasyChatText(2, FONT_NORMAL, sEasyChatKeyboardAlphabet[i], 10, 97 + i * 16, TEXT_SKIP_DRAW, NULL); } static void PrintInitialWordSelectText(void) @@ -4328,9 +4328,9 @@ static void PrintWordSelectText(u8 scrollOffset, u8 numRows) { CopyEasyChatWordPadded(sScreenControl->wordSelectPrintBuffer, easyChatWord, 0); if (!DummyWordCheck(easyChatWord)) - PrintEasyChatText(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, NULL); + PrintEasyChatText(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, NULL); else // Never reached - PrintEasyChatTextWithColors(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SPEED_FF, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY); + PrintEasyChatTextWithColors(2, FONT_NORMAL, sScreenControl->wordSelectPrintBuffer, (j * 13 + 3) * 8, y, TEXT_SKIP_DRAW, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_RED, TEXT_COLOR_LIGHT_GRAY); } } diff --git a/src/egg_hatch.c b/src/egg_hatch.c index c705cf24b5..4c9456f2e6 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -640,7 +640,7 @@ static void CB2_EggHatch_1(void) case 5: GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_HatchedFromEgg); - EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, 0xFF); + EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, TEXT_SKIP_DRAW); PlayFanfare(MUS_EVOLVED); sEggHatchData->CB2_state++; PutWindowTilemap(sEggHatchData->windowId); diff --git a/src/field_specials.c b/src/field_specials.c index 96cef93ba4..ef569ca006 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1911,10 +1911,10 @@ void ShowDeptStoreElevatorFloorSelect(void) SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_ElevatorNowOn, 64); - AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SKIP_DRAW, NULL); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], 64); - AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SKIP_DRAW, NULL); PutWindowTilemap(sTutorMoveAndElevatorWindowId); CopyWindowToVram(sTutorMoveAndElevatorWindowId, COPYWIN_FULL); @@ -3236,9 +3236,9 @@ void ScrollableMultichoice_RedrawPersistentMenu(void) SetStandardWindowBorderStyle(task->tWindowId, 0); for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++) - AddTextPrinterParameterized5(task->tWindowId, FONT_NORMAL, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0); + AddTextPrinterParameterized5(task->tWindowId, FONT_NORMAL, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SKIP_DRAW, NULL, 0, 0); - AddTextPrinterParameterized(task->tWindowId, FONT_NORMAL, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(task->tWindowId, FONT_NORMAL, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SKIP_DRAW, NULL); PutWindowTilemap(task->tWindowId); CopyWindowToVram(task->tWindowId, COPYWIN_FULL); } diff --git a/src/frontier_util.c b/src/frontier_util.c index 88db7af1fa..03d7b0cb51 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -960,7 +960,7 @@ static void PrintAligned(const u8 *str, s32 y) { s32 x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 224); y = (y * 8) + 1; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, y, TEXT_SKIP_DRAW, NULL); } static void PrintHyphens(s32 y) @@ -973,18 +973,18 @@ static void PrintHyphens(s32 y) text[i] = EOS; y = (y * 8) + 1; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, 4, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, 4, y, TEXT_SKIP_DRAW, NULL); } // Battle Tower records. static void TowerPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL); if (num > MAX_STREAK) num = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_WinStreak); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL); } static void TowerPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1056,8 +1056,8 @@ static void ShowTowerResultsWindow(u8 battleMode) StringExpandPlaceholders(gStringVar4, gText_LinkMultiBattleRoomResults); PrintAligned(gStringVar4, 2); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SKIP_DRAW, NULL); PrintHyphens(10); TowerPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 132, 49); TowerPrintRecordStreak(battleMode, FRONTIER_LVL_50, 72, 132, 65); @@ -1079,10 +1079,10 @@ static u16 DomeGetWinStreak(u8 battleMode, u8 lvlMode) static void PrintTwoStrings(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SKIP_DRAW, NULL); ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, str2); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL); } static void DomePrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1123,8 +1123,8 @@ static void ShowDomeResultsWindow(u8 battleMode) StringExpandPlaceholders(gStringVar4, gText_DoubleBattleTourneyResults); PrintAligned(gStringVar4, 0); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SKIP_DRAW, NULL); PrintHyphens(10); DomePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 64, 121, 33); PrintTwoStrings(gText_Record, gText_ClearStreak, gSaveBlock2Ptr->frontier.domeRecordWinStreaks[battleMode][FRONTIER_LVL_50], 64, 121, 49); @@ -1139,12 +1139,12 @@ static void ShowDomeResultsWindow(u8 battleMode) // Battle Palace records. static void PalacePrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL); if (num > MAX_STREAK) num = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_WinStreak); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL); } static void PalacePrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1199,8 +1199,8 @@ static void ShowPalaceResultsWindow(u8 battleMode) StringExpandPlaceholders(gStringVar4, gText_DoubleBattleHallResults); PrintAligned(gStringVar4, 2); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SKIP_DRAW, NULL); PrintHyphens(10); PalacePrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 72, 131, 49); PalacePrintRecordStreak(battleMode, FRONTIER_LVL_50, 72, 131, 65); @@ -1222,10 +1222,10 @@ static u16 PikeGetWinStreak(u8 lvlMode) static void PikePrintCleared(const u8 *str1, const u8 *str2, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str1, x1, y, TEXT_SKIP_DRAW, NULL); ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, str2); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL); } static void PikePrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1251,8 +1251,8 @@ static void ShowPikeResultsWindow(void) FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults); PrintAligned(gStringVar4, 0); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SKIP_DRAW, NULL); PrintHyphens(10); PikePrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 114, 33); PikePrintCleared(gText_Record, gText_RoomsCleared, gSaveBlock2Ptr->frontier.pikeRecordStreaks[FRONTIER_LVL_50], 64, 114, 49); @@ -1267,12 +1267,12 @@ static void ShowPikeResultsWindow(void) // Battle Arena records. static void ArenaPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL); if (num > MAX_STREAK) num = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_KOsInARow); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL); } static void ArenaPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1314,8 +1314,8 @@ static void ShowArenaResultsWindow(void) PrintHyphens(10); StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults); PrintAligned(gStringVar4, 2); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 16, 49, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 16, 97, TEXT_SKIP_DRAW, NULL); ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 72, 126, 49); ArenaPrintRecordStreak(FRONTIER_LVL_50, 72, 126, 65); ArenaPrintPrevOrCurrentStreak(FRONTIER_LVL_OPEN, 72, 126, 97); @@ -1327,16 +1327,16 @@ static void ShowArenaResultsWindow(void) // Battle Factory records. static void FactoryPrintStreak(const u8 *str, u16 num1, u16 num2, u8 x1, u8 x2, u8 x3, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL); if (num1 > MAX_STREAK) num1 = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num1, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_WinStreak); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL); ConvertIntToDecimalStringN(gStringVar1, num2, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_TimesVar1); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x3, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x3, y, TEXT_SKIP_DRAW, NULL); } static void FactoryPrintRecordStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2, u8 x3, u8 y) @@ -1403,9 +1403,9 @@ static void ShowFactoryResultsWindow(u8 battleMode) StringExpandPlaceholders(gStringVar4, gText_BattleSwapDoubleResults); PrintAligned(gStringVar4, 0); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_RentalSwap, 152, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 33, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_RentalSwap, 152, 33, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SKIP_DRAW, NULL); PrintHyphens(10); FactoryPrintPrevOrCurrentStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 49); FactoryPrintRecordStreak(battleMode, FRONTIER_LVL_50, 8, 64, 158, 65); @@ -1418,12 +1418,12 @@ static void ShowFactoryResultsWindow(u8 battleMode) // Battle Pyramid records. static void PyramidPrintStreak(const u8 *str, u16 num, u8 x1, u8 x2, u8 y) { - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x1, y, TEXT_SKIP_DRAW, NULL); if (num > MAX_STREAK) num = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_FloorsCleared); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x2, y, TEXT_SKIP_DRAW, NULL); } static void PyramidPrintRecordStreak(u8 lvlMode, u8 x1, u8 x2, u8 y) @@ -1464,8 +1464,8 @@ static void ShowPyramidResultsWindow(void) FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults); PrintAligned(gStringVar4, 2); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Lv502, 8, 49, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_OpenLv, 8, 97, TEXT_SKIP_DRAW, NULL); PrintHyphens(10); PyramidPrintPrevOrCurrentStreak(FRONTIER_LVL_50, 64, 111, 49); PyramidPrintRecordStreak(FRONTIER_LVL_50, 64, 111, 65); @@ -1488,37 +1488,37 @@ static void ShowLinkContestResultsWindow(void) StringExpandPlaceholders(gStringVar4, gText_LinkContestResults); x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 208); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, x, 1, TEXT_SKIP_DRAW, NULL); str = gText_1st; x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 50; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL); str = gText_2nd; x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 88; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL); str = gText_3rd; x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 126; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL); str = gText_4th; x = GetStringRightAlignXOffset(FONT_NORMAL, str, 38) + 164; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, str, x, 25, TEXT_SKIP_DRAW, NULL); x = 6; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cool, x, 41, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Beauty, x, 57, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cute, x, 73, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Smart, x, 89, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Tough, x, 105, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cool, x, 41, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Beauty, x, 57, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Cute, x, 73, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Smart, x, 89, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_Tough, x, 105, TEXT_SKIP_DRAW, NULL); for (i = 0; i < CONTEST_CATEGORIES_COUNT; i++) { for (j = 0; j < CONTESTANT_COUNT; j++) { ConvertIntToDecimalStringN(gStringVar4, gSaveBlock2Ptr->contestLinkResults[i][j], STR_CONV_MODE_RIGHT_ALIGN, 4); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, (j * 38) + 64, (i * 16) + 41, TEXT_SKIP_DRAW, NULL); } } @@ -2224,18 +2224,18 @@ static void Print1PRecord(s32 position, s32 x, s32 y, struct RankingHall1P *hall u8 text[32]; u16 winStreak; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL); hallRecord->name[PLAYER_NAME_LENGTH] = EOS; if (hallRecord->winStreak) { TVShowConvertInternationalString(text, hallRecord->name, hallRecord->language); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL); winStreak = hallRecord->winStreak; if (winStreak > MAX_STREAK) winStreak = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[hallFacilityId]); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[hallFacilityId], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[hallFacilityId], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL); } } @@ -2244,25 +2244,25 @@ static void Print2PRecord(s32 position, s32 x, s32 y, struct RankingHall2P *hall u8 text[32]; u16 winStreak; - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gText_123Dot[position], x * 8, (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL); if (hallRecord->winStreak) { hallRecord->name1[PLAYER_NAME_LENGTH] = EOS; hallRecord->name2[PLAYER_NAME_LENGTH] = EOS; TVShowConvertInternationalString(text, hallRecord->name1, hallRecord->language); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position - 1)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 2) * 8, (8 * (y + 5 * position - 1)) + 1, TEXT_SKIP_DRAW, NULL); if (IsStringJapanese(hallRecord->name2)) TVShowConvertInternationalString(text, hallRecord->name2, LANGUAGE_JAPANESE); else StringCopy(text, hallRecord->name2); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 4) * 8, (8 * (y + 5 * position + 1)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, text, (x + 4) * 8, (8 * (y + 5 * position + 1)) + 1, TEXT_SKIP_DRAW, NULL); winStreak = hallRecord->winStreak; if (winStreak > MAX_STREAK) winStreak = MAX_STREAK; ConvertIntToDecimalStringN(gStringVar2, winStreak, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK]); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, GetStringRightAlignXOffset(FONT_NORMAL, sHallFacilityToRecordsText[RANKING_HALL_TOWER_LINK], 0xC8), (8 * (y + 5 * position)) + 1, TEXT_SKIP_DRAW, NULL); } } @@ -2343,9 +2343,9 @@ static void PrintHallRecords(s32 hallFacilityId, s32 lvlMode) StringCopy(gStringVar1, sRecordsWindowChallengeTexts[hallFacilityId][0]); StringExpandPlaceholders(gStringVar4, sRecordsWindowChallengeTexts[hallFacilityId][1]); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); x = GetStringRightAlignXOffset(FONT_NORMAL, sLevelModeText[lvlMode], 0xD0); - AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sLevelModeText[lvlMode], x, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, sLevelModeText[lvlMode], x, 1, TEXT_SKIP_DRAW, NULL); if (hallFacilityId == RANKING_HALL_TOWER_LINK) { gSaveBlock2Ptr->frontier.opponentNames[0][PLAYER_NAME_LENGTH] = EOS; diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index e977828f99..ecc8b18ae4 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -1149,7 +1149,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u *(stringPtr)++ = CHAR_QUESTION_MARK; } stringPtr[0] = EOS; - AddTextPrinterParameterized3(0, FONT_NORMAL, 0x10, 1, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0x10, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text); } // nick, species names, gender and level @@ -1158,13 +1158,13 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u if (currMon->species == SPECIES_EGG) { width = GetStringCenterAlignXOffset(FONT_NORMAL, text, 0xD0); - AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text); CopyWindowToVram(0, COPYWIN_FULL); } else { width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x80); - AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, width, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text); text[0] = CHAR_SLASH; stringPtr = StringCopy(text + 1, gSpeciesNames[currMon->species]); @@ -1185,15 +1185,15 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u } stringPtr[0] = EOS; - AddTextPrinterParameterized3(0, FONT_NORMAL, 0x80, 1, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0x80, 1, sMonInfoTextColors, TEXT_SKIP_DRAW, text); stringPtr = StringCopy(text, gText_Level); ConvertIntToDecimalStringN(stringPtr, currMon->lvl, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized3(0, FONT_NORMAL, 0x24, 0x11, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0x24, 0x11, sMonInfoTextColors, TEXT_SKIP_DRAW, text); stringPtr = StringCopy(text, gText_IDNumber); ConvertIntToDecimalStringN(stringPtr, (u16)(currMon->tid), STR_CONV_MODE_LEADING_ZEROS, 5); - AddTextPrinterParameterized3(0, FONT_NORMAL, 0x68, 0x11, sMonInfoTextColors, -1, text); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0x68, 0x11, sMonInfoTextColors, TEXT_SKIP_DRAW, text); CopyWindowToVram(0, COPYWIN_FULL); } @@ -1208,10 +1208,10 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) FillWindowPixelBuffer(1, PIXEL_FILL(1)); PutWindowTilemap(1); DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sPlayerInfoTextColors, -1, gText_Name); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sPlayerInfoTextColors, TEXT_SKIP_DRAW, gText_Name); width = GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 0x70); - AddTextPrinterParameterized3(1, FONT_NORMAL, width, 1, sPlayerInfoTextColors, -1, gSaveBlock2Ptr->playerName); + AddTextPrinterParameterized3(1, FONT_NORMAL, width, 1, sPlayerInfoTextColors, TEXT_SKIP_DRAW, gSaveBlock2Ptr->playerName); trainerId = (gSaveBlock2Ptr->playerTrainerId[0]) | (gSaveBlock2Ptr->playerTrainerId[1] << 8); AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x11, sPlayerInfoTextColors, 0, gText_IDNumber); @@ -1222,9 +1222,9 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) text[4] = (trainerId % 10) / 1 + CHAR_0; text[5] = EOS; width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70); - AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x11, sPlayerInfoTextColors, -1, text); + AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x11, sPlayerInfoTextColors, TEXT_SKIP_DRAW, text); - AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x21, sPlayerInfoTextColors, -1, gText_Time); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 0x21, sPlayerInfoTextColors, TEXT_SKIP_DRAW, gText_Time); text[0] = (gSaveBlock2Ptr->playTimeHours / 100) + CHAR_0; text[1] = (gSaveBlock2Ptr->playTimeHours % 100) / 10 + CHAR_0; text[2] = (gSaveBlock2Ptr->playTimeHours % 10) + CHAR_0; @@ -1240,7 +1240,7 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) text[6] = EOS; width = GetStringRightAlignXOffset(FONT_NORMAL, text, 0x70); - AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x21, sPlayerInfoTextColors, -1, text); + AddTextPrinterParameterized3(1, FONT_NORMAL, width, 0x21, sPlayerInfoTextColors, TEXT_SKIP_DRAW, text); CopyWindowToVram(1, COPYWIN_FULL); } diff --git a/src/item_menu.c b/src/item_menu.c index 74e29fe873..0c4b674525 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -974,7 +974,7 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y) ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BERRY_CAPACITY_DIGITS); StringExpandPlaceholders(gStringVar4, gText_xVar1); offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119); - BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL); + BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SKIP_DRAW, COLORID_NORMAL); } else if (gBagPosition.pocket != KEYITEMS_POCKET && ItemId_GetImportance(itemId) == FALSE) { @@ -982,7 +982,7 @@ static void BagMenu_ItemPrintCallback(u8 windowId, u32 itemIndex, u8 y) ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, BAG_ITEM_CAPACITY_DIGITS); StringExpandPlaceholders(gStringVar4, gText_xVar1); offset = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 119); - BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SPEED_FF, COLORID_NORMAL); + BagMenu_Print(windowId, FONT_NARROW, gStringVar4, offset, y, 0, 0, TEXT_SKIP_DRAW, COLORID_NORMAL); } else { @@ -1204,7 +1204,7 @@ static void PrintItemSoldAmount(int windowId, int numSold, int moneyEarned) u8 numDigits = (gBagPosition.pocket == BERRIES_POCKET) ? BERRY_CAPACITY_DIGITS : BAG_ITEM_CAPACITY_DIGITS; ConvertIntToDecimalStringN(gStringVar1, numSold, STR_CONV_MODE_LEADING_ZEROS, numDigits); StringExpandPlaceholders(gStringVar4, gText_xVar1); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, 0); PrintMoneyAmount(windowId, 38, 1, moneyEarned, 0); } @@ -2417,11 +2417,11 @@ static void PrintPocketNames(const u8 *pocketName1, const u8 *pocketName2) windowId = AddWindow(&window); FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName1, 0x40); - BagMenu_Print(windowId, FONT_NORMAL, pocketName1, offset, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME); + BagMenu_Print(windowId, FONT_NORMAL, pocketName1, offset, 1, 0, 0, TEXT_SKIP_DRAW, COLORID_POCKET_NAME); if (pocketName2) { offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName2, 0x40); - BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SPEED_FF, COLORID_POCKET_NAME); + BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SKIP_DRAW, COLORID_POCKET_NAME); } CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, sizeof(gBagMenu->pocketNameBuffer)); RemoveWindow(windowId); @@ -2557,7 +2557,7 @@ static void PrintTMHMMoveData(u16 itemId) if (itemId == ITEM_NONE) { for (i = 0; i < 4; i++) - BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gText_ThreeDashes, 7, i * 12, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO); CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX); } else @@ -2575,7 +2575,7 @@ static void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].power, STR_CONV_MODE_RIGHT_ALIGN, 3); text = gStringVar1; } - BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 12, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 12, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO); // Print TMHM accuracy if (gBattleMoves[moveId].accuracy == 0) @@ -2587,11 +2587,11 @@ static void PrintTMHMMoveData(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].accuracy, STR_CONV_MODE_RIGHT_ALIGN, 3); text = gStringVar1; } - BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 24, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, text, 7, 24, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO); // Print TMHM pp ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[moveId].pp, STR_CONV_MODE_RIGHT_ALIGN, 3); - BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SPEED_FF, COLORID_TMHM_INFO); + BagMenu_Print(WIN_TMHM_INFO, FONT_NORMAL, gStringVar1, 7, 36, 0, 0, TEXT_SKIP_DRAW, COLORID_TMHM_INFO); CopyWindowToVram(WIN_TMHM_INFO, COPYWIN_GFX); } diff --git a/src/list_menu.c b/src/list_menu.c index 6b1c377f36..ccb1838912 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -604,7 +604,7 @@ static void ListMenuPrint(struct ListMenu *list, const u8 *str, u8 x, u8 y) gListMenuOverride.fontId, x, y, gListMenuOverride.lettersSpacing, - 0, colors, TEXT_SPEED_FF, str); + 0, colors, TEXT_SKIP_DRAW, str); gListMenuOverride.enabled = FALSE; } @@ -617,7 +617,7 @@ static void ListMenuPrint(struct ListMenu *list, const u8 *str, u8 x, u8 y) list->template.fontId, x, y, list->template.lettersSpacing, - 0, colors, TEXT_SPEED_FF, str); + 0, colors, TEXT_SKIP_DRAW, str); } } diff --git a/src/main_menu.c b/src/main_menu.c index 5a9a48d70b..748575ce34 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -780,8 +780,8 @@ static void Task_DisplayMainMenu(u8 taskId) default: FillWindowPixelBuffer(0, PIXEL_FILL(0xA)); FillWindowPixelBuffer(1, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(0, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); - AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuNewGame); + AddTextPrinterParameterized3(1, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuOption); PutWindowTilemap(0); PutWindowTilemap(1); CopyWindowToVram(0, COPYWIN_GFX); @@ -793,9 +793,9 @@ static void Task_DisplayMainMenu(u8 taskId) FillWindowPixelBuffer(2, PIXEL_FILL(0xA)); FillWindowPixelBuffer(3, PIXEL_FILL(0xA)); FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); - AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); - AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuContinue); + AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuNewGame); + AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuOption); MainMenu_FormatSavegameText(); PutWindowTilemap(2); PutWindowTilemap(3); @@ -812,10 +812,10 @@ static void Task_DisplayMainMenu(u8 taskId) FillWindowPixelBuffer(3, PIXEL_FILL(0xA)); FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); FillWindowPixelBuffer(5, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); - AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); - AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift); - AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuContinue); + AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuNewGame); + AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuMysteryGift); + AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuOption); MainMenu_FormatSavegameText(); PutWindowTilemap(2); PutWindowTilemap(3); @@ -836,11 +836,11 @@ static void Task_DisplayMainMenu(u8 taskId) FillWindowPixelBuffer(4, PIXEL_FILL(0xA)); FillWindowPixelBuffer(5, PIXEL_FILL(0xA)); FillWindowPixelBuffer(6, PIXEL_FILL(0xA)); - AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue); - AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame); - AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift2); - AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryEvents); - AddTextPrinterParameterized3(6, FONT_NORMAL, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuContinue); + AddTextPrinterParameterized3(3, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuNewGame); + AddTextPrinterParameterized3(4, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuMysteryGift2); + AddTextPrinterParameterized3(5, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuMysteryEvents); + AddTextPrinterParameterized3(6, FONT_NORMAL, 0, 1, sTextColor_Headers, TEXT_SKIP_DRAW, gText_MainMenuOption); MainMenu_FormatSavegameText(); PutWindowTilemap(2); PutWindowTilemap(3); @@ -2136,8 +2136,8 @@ static void MainMenu_FormatSavegameText(void) static void MainMenu_FormatSavegamePlayer(void) { StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPlayer); - AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 17, sTextColor_MenuInfo, -1, gStringVar4); - AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, -1, gSaveBlock2Ptr->playerName); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 17, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gStringVar4); + AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, gSaveBlock2Ptr->playerName, 100), 17, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gSaveBlock2Ptr->playerName); } static void MainMenu_FormatSavegameTime(void) @@ -2146,11 +2146,11 @@ static void MainMenu_FormatSavegameTime(void) u8* ptr; StringExpandPlaceholders(gStringVar4, gText_ContinueMenuTime); - AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 17, sTextColor_MenuInfo, -1, gStringVar4); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 17, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gStringVar4); ptr = ConvertIntToDecimalStringN(str, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3); *ptr = 0xF0; ConvertIntToDecimalStringN(ptr + 1, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2); - AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 17, sTextColor_MenuInfo, -1, str); + AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 17, sTextColor_MenuInfo, TEXT_SKIP_DRAW, str); } static void MainMenu_FormatSavegamePokedex(void) @@ -2165,9 +2165,9 @@ static void MainMenu_FormatSavegamePokedex(void) else dexCount = GetHoennPokedexCount(FLAG_GET_CAUGHT); StringExpandPlaceholders(gStringVar4, gText_ContinueMenuPokedex); - AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 33, sTextColor_MenuInfo, -1, gStringVar4); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0, 33, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gStringVar4); ConvertIntToDecimalStringN(str, dexCount, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 100), 33, sTextColor_MenuInfo, -1, str); + AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 100), 33, sTextColor_MenuInfo, TEXT_SKIP_DRAW, str); } } @@ -2183,9 +2183,9 @@ static void MainMenu_FormatSavegameBadges(void) badgeCount++; } StringExpandPlaceholders(gStringVar4, gText_ContinueMenuBadges); - AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 33, sTextColor_MenuInfo, -1, gStringVar4); + AddTextPrinterParameterized3(2, FONT_NORMAL, 0x6C, 33, sTextColor_MenuInfo, TEXT_SKIP_DRAW, gStringVar4); ConvertIntToDecimalStringN(str, badgeCount, STR_CONV_MODE_LEADING_ZEROS, 1); - AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 33, sTextColor_MenuInfo, -1, str); + AddTextPrinterParameterized3(2, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, str, 0xD0), 33, sTextColor_MenuInfo, TEXT_SKIP_DRAW, str); } static void LoadMainMenuWindowFrameTiles(u8 bgId, u16 tileOffset) diff --git a/src/map_name_popup.c b/src/map_name_popup.c index bc0b311622..e44fb33833 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -329,7 +329,7 @@ static void ShowMapNamePopUpWindow(void) mapDisplayHeader[0] = EXT_CTRL_CODE_BEGIN; mapDisplayHeader[1] = EXT_CTRL_CODE_HIGHLIGHT; mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT; - AddTextPrinterParameterized(GetMapNamePopUpWindowId(), FONT_NARROW, mapDisplayHeader, x, 3, 0xFF, NULL); + AddTextPrinterParameterized(GetMapNamePopUpWindowId(), FONT_NARROW, mapDisplayHeader, x, 3, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(GetMapNamePopUpWindowId(), COPYWIN_FULL); } diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 751e5f91c6..06c3b82886 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -1343,9 +1343,9 @@ static void PrintStoryList(void) u16 gameStatID = sStorytellerPtr->gameStatIDs[i]; if (gameStatID == 0) break; - AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL); + AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); } - AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 0xFF, NULL); + AddTextPrinterParameterized(sStorytellerWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); InitMenuInUpperLeftCornerNormal(sStorytellerWindowId, GetFreeStorySlot() + 1, 0); CopyWindowToVram(sStorytellerWindowId, COPYWIN_FULL); } diff --git a/src/menu.c b/src/menu.c index 94ad65e214..9f1077b465 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1109,7 +1109,7 @@ void PrintMenuActionTextsAtPos(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineH { u8 i; for (i = 0; i < itemCount; i++) - AddTextPrinterParameterized(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -1118,7 +1118,7 @@ static void PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8 { u8 i; for (i = 0; i < itemCount; i++) - AddTextPrinterParameterized5(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SPEED_FF, NULL, letterSpacing, lineSpacing); + AddTextPrinterParameterized5(windowId, fontId, menuActions[i].text, left, (lineHeight * i) + top, TEXT_SKIP_DRAW, NULL, letterSpacing, lineSpacing); CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -1149,7 +1149,7 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l printer.currentChar = menuActions[actionIds[i]].text; printer.y = (lineHeight * i) + top; printer.currentY = printer.y; - AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); @@ -1208,7 +1208,7 @@ static void CreateYesNoMenuAtPos(const struct WindowTemplate *window, u8 fontId, printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING); printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING); - AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL); InitMenuNormal(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos); } @@ -1239,7 +1239,7 @@ void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u for (i = 0; i < a7; i++) { for (j = 0; j < a6; j++) - AddTextPrinterParameterized(windowId, fontId, menuActions[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, fontId, menuActions[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -1273,7 +1273,7 @@ void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth printer.y = (GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT) * i) + top; printer.currentX = printer.x; printer.currentY = printer.y; - AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL); } } @@ -1609,7 +1609,7 @@ void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *menuActi u32 i; for (i = 0; i < itemCount; i++) - AddTextPrinterParameterized(windowId, 1, menuActions[i].text, 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, 1, menuActions[i].text, 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -1635,7 +1635,7 @@ void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *menuActions printer.currentChar = menuActions[actionIds[i]].text; printer.y = (i * 16) + 1; printer.currentY = (i * 16) + 1; - AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); @@ -1662,7 +1662,7 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa printer.letterSpacing = 0; printer.lineSpacing = 0; - AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL); InitMenuInUpperLeftCornerNormal(sYesNoWindowId, 2, initialCursorPos); } @@ -1673,7 +1673,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const for (i = 0; i < rows; i++) { for (j = 0; j < columns; j++) - AddTextPrinterParameterized(windowId, 1, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, 1, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -1702,7 +1702,7 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M printer.y = (16 * i) + 1; printer.currentX = printer.x; printer.currentY = printer.y; - AddTextPrinter(&printer, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printer, TEXT_SKIP_DRAW, NULL); } } @@ -2012,7 +2012,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y) StringExpandPlaceholders(gStringVar4, src); - AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SKIP_DRAW, 0); } // Unused. Similar to BlitBitmapRect4Bit. diff --git a/src/menu_specialized.c b/src/menu_specialized.c index d5bb975c8c..3a6a60885d 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -268,7 +268,7 @@ static void MailboxMenu_ItemPrintFunc(u8 windowId, u32 itemId, u8 y) length = StringLength(buffer); if (length < PLAYER_NAME_LENGTH - 1) ConvertInternationalString(buffer, LANGUAGE_JAPANESE); - AddTextPrinterParameterized4(windowId, FONT_NORMAL, 8, y, 0, 0, sPlayerNameTextColors, -1, buffer); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 8, y, 0, 0, sPlayerNameTextColors, TEXT_SKIP_DRAW, buffer); } u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page) @@ -740,18 +740,18 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) FillWindowPixelBuffer(0, PIXEL_FILL(1)); str = gText_MoveRelearnerBattleMoves; x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80); - AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 1, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerPP; - AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x29, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerPower; x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A); - AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x19, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerAccuracy; x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x6A); - AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, x, 0x29, TEXT_SKIP_DRAW, NULL); if (chosenMove == LIST_CANCEL) { CopyWindowToVram(0, COPYWIN_GFX); @@ -759,11 +759,11 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) } move = &gBattleMoves[chosenMove]; str = gTypeNames[move->type]; - AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 4, 0x19, TEXT_SKIP_DRAW, NULL); x = 4 + GetStringWidth(FONT_NORMAL, gText_MoveRelearnerPP, 0); ConvertIntToDecimalStringN(buffer, move->pp, STR_CONV_MODE_LEFT_ALIGN, 2); - AddTextPrinterParameterized(0, FONT_NORMAL, buffer, x, 0x29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, buffer, x, 0x29, TEXT_SKIP_DRAW, NULL); if (move->power < 2) { @@ -774,7 +774,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) ConvertIntToDecimalStringN(buffer, move->power, STR_CONV_MODE_LEFT_ALIGN, 3); str = buffer; } - AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x19, TEXT_SKIP_DRAW, NULL); if (move->accuracy == 0) { @@ -785,7 +785,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) ConvertIntToDecimalStringN(buffer, move->accuracy, STR_CONV_MODE_LEFT_ALIGN, 3); str = buffer; } - AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, str, 0x6A, 0x29, TEXT_SKIP_DRAW, NULL); str = gMoveDescriptionPointers[chosenMove - 1]; AddTextPrinterParameterized(0, FONT_NARROW, str, 0, 0x41, 0, NULL); @@ -801,15 +801,15 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) FillWindowPixelBuffer(1, PIXEL_FILL(1)); str = gText_MoveRelearnerContestMovesTitle; x = GetStringCenterAlignXOffset(FONT_NORMAL, str, 0x80); - AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 1, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerAppeal; x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C); - AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x19, TEXT_SKIP_DRAW, NULL); str = gText_MoveRelearnerJam; x = GetStringRightAlignXOffset(FONT_NORMAL, str, 0x5C); - AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x29, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, str, x, 0x29, TEXT_SKIP_DRAW, NULL); if (chosenMove == MENU_NOTHING_CHOSEN) { @@ -819,10 +819,10 @@ static void MoveRelearnerMenuLoadContestMoveDescription(u32 chosenMove) move = &gContestMoves[chosenMove]; str = gContestMoveTypeTextPointers[move->contestCategory]; - AddTextPrinterParameterized(1, FONT_NORMAL, str, 4, 0x19, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, str, 4, 0x19, TEXT_SKIP_DRAW, NULL); str = gContestEffectDescriptionPointers[move->effect]; - AddTextPrinterParameterized(1, FONT_NARROW, str, 0, 0x41, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NARROW, str, 0, 0x41, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(1, COPYWIN_GFX); } diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index a6d5953f99..4a314b076a 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -490,8 +490,8 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 isEReader, bool32 useCancel) options = gJPText_DecideStop; } - AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, header); - AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SPEED_FF, options); + AddTextPrinterParameterized4(0, FONT_NORMAL, 4, 1, 0, 0, sTextColors_TopMenu, TEXT_SKIP_DRAW, header); + AddTextPrinterParameterized4(0, FONT_SMALL, GetStringRightAlignXOffset(FONT_SMALL, options, 0xDE), 1, 0, 0, sTextColors_TopMenu, TEXT_SKIP_DRAW, options); CopyWindowToVram(0, COPYWIN_GFX); PutWindowTilemap(0); } diff --git a/src/naming_screen.c b/src/naming_screen.c index 1d42d70631..cd48242d07 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1781,7 +1781,7 @@ static void DrawGenderIcon(void) StringCopy(text, gText_FemaleSymbol); isFemale = TRUE; } - AddTextPrinterParameterized3(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, 0x68, 1, sGenderColors[isFemale], -1, text); + AddTextPrinterParameterized3(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, 0x68, 1, sGenderColors[isFemale], TEXT_SKIP_DRAW, text); } } @@ -1921,7 +1921,7 @@ static void DrawTextEntry(void) temp[1] = gText_ExpandedPlaceholder_Empty[0]; extraWidth = (IsWideLetter(temp[0]) == TRUE) ? 2 : 0; - AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, temp, i * 8 + x + extraWidth, 1, 0xFF, NULL); + AddTextPrinterParameterized(sNamingScreen->windows[WIN_TEXT_ENTRY], FONT_NORMAL, temp, i * 8 + x + extraWidth, 1, TEXT_SKIP_DRAW, NULL); } TryDrawGenderIcon(); diff --git a/src/option_menu.c b/src/option_menu.c index 58d63b19b2..f985e2c52a 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -400,7 +400,7 @@ static void DrawOptionMenuChoice(const u8 *text, u8 x, u8 y, u8 style) } dst[i] = EOS; - AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, dst, x, y + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, dst, x, y + 1, TEXT_SKIP_DRAW, NULL); } static u8 TextSpeed_ProcessInput(u8 selection) @@ -626,7 +626,7 @@ static void ButtonMode_DrawChoices(u8 selection) static void DrawTextOption(void) { FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1)); - AddTextPrinterParameterized(WIN_TEXT_OPTION, FONT_NORMAL, gText_Option, 8, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_TEXT_OPTION, FONT_NORMAL, gText_Option, 8, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(WIN_TEXT_OPTION, COPYWIN_FULL); } @@ -636,7 +636,7 @@ static void DrawOptionMenuTexts(void) FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1)); for (i = 0; i < MENUITEM_COUNT; i++) - AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(WIN_OPTIONS, FONT_NORMAL, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(WIN_OPTIONS, COPYWIN_FULL); } diff --git a/src/party_menu.c b/src/party_menu.c index fd112c9959..30a8696086 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2036,7 +2036,7 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf) confirmWindowId = AddWindow(&sConfirmButtonWindowTemplate); FillWindowPixelBuffer(confirmWindowId, PIXEL_FILL(0)); mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gMenuText_Confirm, 48); - AddTextPrinterParameterized4(confirmWindowId, FONT_SMALL, mainOffset, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); + AddTextPrinterParameterized4(confirmWindowId, FONT_SMALL, mainOffset, 1, 0, 0, sFontColorTable[0], TEXT_SKIP_DRAW, gMenuText_Confirm); PutWindowTilemap(confirmWindowId); CopyWindowToVram(confirmWindowId, COPYWIN_GFX); cancelWindowId = AddWindow(&sMultiCancelButtonWindowTemplate); @@ -2053,12 +2053,12 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf) if (gPartyMenu.menuType != PARTY_MENU_TYPE_SPIN_TRADE) { mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel, 48); - AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel); + AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], TEXT_SKIP_DRAW, gText_Cancel); } else { mainOffset = GetStringCenterAlignXOffset(FONT_SMALL, gText_Cancel2, 48); - AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], -1, gText_Cancel2); + AddTextPrinterParameterized3(cancelWindowId, FONT_SMALL, mainOffset + offset, 1, sFontColorTable[0], TEXT_SKIP_DRAW, gText_Cancel2); } PutWindowTilemap(cancelWindowId); CopyWindowToVram(cancelWindowId, COPYWIN_GFX); @@ -4504,7 +4504,7 @@ static void ShowMoveSelectWindow(u8 slot) for (i = 0; i < MAX_MON_MOVES; i++) { move = GetMonData(&gPlayerParty[slot], MON_DATA_MOVE1 + i); - AddTextPrinterParameterized(windowId, fontId, gMoveNames[move], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, fontId, gMoveNames[move], 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL); if (move != MOVE_NONE) moveCount++; } diff --git a/src/player_pc.c b/src/player_pc.c index a4e55bf32a..622c30ec02 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -1027,13 +1027,13 @@ static void ItemStorage_PrintMenuItem(u8 windowId, u32 id, u8 yOffset) if (sItemStorageMenu->toSwapPos != NOT_SWAPPING) { if (sItemStorageMenu->toSwapPos == (u8)id) - ItemStorage_DrawSwapArrow(yOffset, 0, TEXT_SPEED_FF); + ItemStorage_DrawSwapArrow(yOffset, 0, TEXT_SKIP_DRAW); else - ItemStorage_DrawSwapArrow(yOffset, 0xFF, TEXT_SPEED_FF); + ItemStorage_DrawSwapArrow(yOffset, 0xFF, TEXT_SKIP_DRAW); } ConvertIntToDecimalStringN(gStringVar1, gSaveBlock1Ptr->pcItems[id].quantity, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_xVar1); - AddTextPrinterParameterized(windowId, FONT_NARROW, gStringVar4, GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 104), yOffset, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NARROW, gStringVar4, GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 104), yOffset, TEXT_SKIP_DRAW, NULL); } } diff --git a/src/pokedex.c b/src/pokedex.c index ae4def99a3..58676b215c 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -2324,7 +2324,7 @@ static void PrintMonDexNumAndName(u8 windowId, u8 fontId, const u8* str, u8 left color[0] = TEXT_COLOR_TRANSPARENT; color[1] = TEXT_DYNAMIC_COLOR_6; color[2] = TEXT_COLOR_LIGHT_GRAY; - AddTextPrinterParameterized4(windowId, fontId, left * 8, (top * 8) + 1, 0, 0, color, -1, str); + AddTextPrinterParameterized4(windowId, fontId, left * 8, (top * 8) + 1, 0, 0, color, TEXT_SKIP_DRAW, str); } // u16 ignored is passed but never used @@ -3167,7 +3167,7 @@ static void PrintInfoScreenText(const u8* str, u8 left, u8 top) color[1] = TEXT_DYNAMIC_COLOR_6; color[2] = TEXT_COLOR_LIGHT_GRAY; - AddTextPrinterParameterized4(0, FONT_NORMAL, left, top, 0, 0, color, -1, str); + AddTextPrinterParameterized4(0, FONT_NORMAL, left, top, 0, 0, color, TEXT_SKIP_DRAW, str); } #define tScrolling data[0] @@ -4474,7 +4474,7 @@ static void PrintInfoSubMenuText(u8 windowId, const u8 *str, u8 left, u8 top) color[1] = TEXT_DYNAMIC_COLOR_6; color[2] = TEXT_COLOR_LIGHT_GRAY; - AddTextPrinterParameterized4(windowId, FONT_NORMAL, left, top, 0, 0, color, -1, str); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, left, top, 0, 0, color, TEXT_SKIP_DRAW, str); } static void UnusedPrintNum(u8 windowId, u16 num, u8 left, u8 top) @@ -4781,7 +4781,7 @@ static void PrintSearchText(const u8 *str, u32 x, u32 y) color[0] = TEXT_COLOR_TRANSPARENT; color[1] = TEXT_DYNAMIC_COLOR_6; color[2] = TEXT_COLOR_DARK_GRAY; - AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 0, 0, color, -1, str); + AddTextPrinterParameterized4(0, FONT_NORMAL, x, y, 0, 0, color, TEXT_SKIP_DRAW, str); } static void ClearSearchMenuRect(u32 x, u32 y, u32 width, u32 height) diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 2f0d676cbe..1b6e6a388a 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -367,7 +367,7 @@ static void FindMapsWithMon(u16 species) } } - for (i = 0; gWildMonHeaders[i].mapGroup != 0xFF; i++) + for (i = 0; gWildMonHeaders[i].mapGroup != MAP_GROUP(UNDEFINED); i++) { if (MapHasMon(&gWildMonHeaders[i], species)) { diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index dd213989cb..a6b4b6f424 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3313,7 +3313,7 @@ static void Msg_WantToPlayAgain(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(1, 8, 20, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_WantToPlayAgain2, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_WantToPlayAgain2, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; @@ -3340,7 +3340,7 @@ static void Msg_SavingDontTurnOff(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 7, 26, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; @@ -3383,7 +3383,7 @@ static void Msg_SomeoneDroppedOut(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SomeoneDroppedOut2, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_SomeoneDroppedOut2, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; @@ -3409,7 +3409,7 @@ static void Msg_CommunicationStandby(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(7, 10, 16, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_CommunicationStandby4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, gText_CommunicationStandby4, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; @@ -3487,7 +3487,7 @@ static void PrintPrizeMessage(u16 itemId, u16 quantity) DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, sPokemonJumpGfx->itemQuantityStr); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_AwesomeWonF701F700); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_LEVEL_UP; sPokemonJumpGfx->msgWindowState = 0; @@ -3500,7 +3500,7 @@ static void PrintPrizeFilledBagMessage(u16 itemId) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_FilledStorageSpace2); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_DUMMY; sPokemonJumpGfx->msgWindowState = 0; @@ -3513,7 +3513,7 @@ static void PrintNoRoomForPrizeMessage(u16 itemId) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_CantHoldMore); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 9, 22, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_NORMAL, sPokemonJumpGfx->prizeMsg, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_DUMMY; sPokemonJumpGfx->msgWindowState = 0; @@ -3857,7 +3857,7 @@ static void PrintPokeJumpPlayerName(int multiplayerId, u8 bgColor, u8 fgColor, u FillWindowPixelBuffer(sPokemonJumpGfx->nameWindowIds[multiplayerId], 0); x = 64 - GetStringWidth(FONT_NORMAL, GetPokeJumpPlayerName(multiplayerId), -1); x /= 2; - AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_NORMAL, x, 1, colors, -1, GetPokeJumpPlayerName(multiplayerId)); + AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_NORMAL, x, 1, colors, TEXT_SKIP_DRAW, GetPokeJumpPlayerName(multiplayerId)); CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], COPYWIN_GFX); } @@ -4217,14 +4217,14 @@ static void PrintRecordsText(u16 windowId, int width) LoadUserWindowBorderGfx_(windowId, 0x21D, 0xD0); DrawTextBorderOuter(windowId, 0x21D, 0xD); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_PkmnJumpRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PkmnJumpRecords, width * 8), 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_PkmnJumpRecords, GetStringCenterAlignXOffset(FONT_NORMAL, gText_PkmnJumpRecords, width * 8), 1, TEXT_SKIP_DRAW, NULL); for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++) { - AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, 25 + (i * 16), TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, sRecordsTexts[i], 0, 25 + (i * 16), TEXT_SKIP_DRAW, NULL); ConvertIntToDecimalStringN(gStringVar1, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, 5); TruncateToFirstWordOnly(gStringVar1); x = (width * 8) - GetStringWidth(FONT_NORMAL, gStringVar1, 0); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, 25 + (i * 16), TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, x, 25 + (i * 16), TEXT_SKIP_DRAW, NULL); } PutWindowTilemap(windowId); } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index ec3555088c..01133251b7 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -1358,7 +1358,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero txtColor[0] = zero2; txtColor[1] = TEXT_DYNAMIC_COLOR_6; txtColor[2] = TEXT_DYNAMIC_COLOR_5; - AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 1, 0, 0, txtColor, -1, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 1, 0, 0, txtColor, TEXT_SKIP_DRAW, string); tileBytesToBuffer = bytesToBuffer; if (tileBytesToBuffer > 6u) @@ -1402,7 +1402,7 @@ static void UnusedDrawTextWindow(const u8 *string, void *dst, u16 offset, u8 bgC txtColor[0] = bgColor; txtColor[1] = fgColor; txtColor[2] = shadowColor; - AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, txtColor, -1, string); + AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, txtColor, TEXT_SKIP_DRAW, string); CpuCopy16(tileData1, dst, tileSize); CpuCopy16(tileData2, dst + offset, tileSize); RemoveWindow(windowId); @@ -1561,7 +1561,7 @@ static void Task_PCMainMenu(u8 taskId) LoadMessageBoxAndBorderGfx(); DrawDialogueFrame(0, 0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SPEED_FF, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SKIP_DRAW, NULL, 2, 1, 3); CopyWindowToVram(0, COPYWIN_FULL); CopyWindowToVram(task->tWindowId, COPYWIN_FULL); task->tState++; @@ -1951,13 +1951,13 @@ static void ChooseBoxMenu_PrintInfo(void) // Print box name center = GetStringCenterAlignXOffset(FONT_NORMAL, boxName, 64); - AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 1, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, boxName); + AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 1, sChooseBoxMenu_TextColors, TEXT_SKIP_DRAW, boxName); // Print #/30 for number of Pokémon in the box ConvertIntToDecimalStringN(numBoxMonsText, numInBox, STR_CONV_MODE_RIGHT_ALIGN, 2); StringAppend(numBoxMonsText, sText_OutOf30); center = GetStringCenterAlignXOffset(FONT_NORMAL, numBoxMonsText, 64); - AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 17, sChooseBoxMenu_TextColors, TEXT_SPEED_FF, numBoxMonsText); + AddTextPrinterParameterized3(windowId, FONT_NORMAL, center, 17, sChooseBoxMenu_TextColors, TEXT_SKIP_DRAW, numBoxMonsText); winTileData = GetWindowAttribute(windowId, WINDOW_TILE_DATA); CpuCopy32((void *)winTileData, (void *)OBJ_VRAM0 + 0x100 + (GetSpriteTileStartByTag(sChooseBoxMenu->tileTag) * 32), 0x400); @@ -4005,17 +4005,17 @@ static void PrintDisplayMonInfo(void) FillWindowPixelBuffer(0, PIXEL_FILL(1)); if (sStorage->boxOption != OPTION_MOVE_ITEMS) { - AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 0, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 15, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 43, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 0, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 15, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 43, TEXT_SKIP_DRAW, NULL); } else { - AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 0, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 13, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 28, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 0, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 13, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 28, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(0, COPYWIN_GFX); @@ -4319,7 +4319,7 @@ static void PrintMessage(u8 id) DynamicPlaceholderTextUtil_ExpandPlaceholders(sStorage->messageText, sMessages[id].text); FillWindowPixelBuffer(1, PIXEL_FILL(1)); - AddTextPrinterParameterized(1, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(1, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SKIP_DRAW, NULL); DrawTextBorderOuter(1, 2, 14); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_GFX); diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 37079b1718..6ce819c04e 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -655,9 +655,9 @@ static void PrintSearchResultListMenuItems(struct PokenavSub8 *searchList) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); *gStringVar1 = EOS; DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar2, gText_NumberF700); - AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar2, 4, 1, 0xFF, NULL); + AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar2, 4, 1, TEXT_SKIP_DRAW, NULL); ConvertIntToDecimalStringN(gStringVar1, r7, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar1, 34, 1, 0xFF, NULL); + AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar1, 34, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(searchList->winid, COPYWIN_GFX); } diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index e8751e0bf9..5af60a001d 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -986,14 +986,14 @@ static void PrintNumberOfBattles(u16 windowId) static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top) { int y = top * 16 + 1; - AddTextPrinterParameterized(windowId, FONT_NARROW, str, 2, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NARROW, str, 2, y, TEXT_SKIP_DRAW, NULL); } static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top) { int x = GetStringRightAlignXOffset(FONT_NARROW, str, 86); int y = top * 16 + 1; - AddTextPrinterParameterized(windowId, FONT_NARROW, str, x, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NARROW, str, x, y, TEXT_SKIP_DRAW, NULL); } static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1) @@ -1023,7 +1023,7 @@ static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state) if (optionText == MATCH_CALL_OPTION_COUNT) break; - AddTextPrinterParameterized(state->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index b8e543c67e..9e0ae89f18 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -713,7 +713,7 @@ void sub_81C8CB4(struct MatchCallWindowState *state, struct PokenavSub17Substruc list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer); list->unk38(list->listWindow.windowId, state->windowTopIndex, list->listWindow.unkA); FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(4), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16); - AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SPEED_FF, list->unkTextBuffer); + AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SKIP_DRAW, list->unkTextBuffer); sub_81C8C64(&list->listWindow, 1); CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_FULL, 0, list->listWindow.unkA * 2, list->listWindow.unk4, 2); } @@ -722,7 +722,7 @@ void sub_81C8D4C(struct MatchCallWindowState *state, struct PokenavSub17Substruc { list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer); FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16); - AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->unkTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->unkTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SKIP_DRAW, NULL); sub_81C8C64(&list->listWindow, 0); CopyWindowToVram(list->listWindow.windowId, COPYWIN_FULL); } @@ -734,7 +734,7 @@ void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId) u32 top = (list->listWindow.unkA + 1 + (fieldId * 2)) & 0xF; FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.unk4, 16); - AddTextPrinterParameterized3(list->listWindow.windowId, FONT_NARROW, 2, (top << 4) + 1, colors, -1, fieldNames[fieldId]); + AddTextPrinterParameterized3(list->listWindow.windowId, FONT_NARROW, 2, (top << 4) + 1, colors, TEXT_SKIP_DRAW, fieldNames[fieldId]); CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, top << 1, list->listWindow.unk4, 2); } @@ -755,7 +755,7 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok if (str != NULL) { sub_81DB620(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2); - AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SKIP_DRAW, NULL); CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, r6 * 2, list->listWindow.unk4, 2); } } diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 8da5ddc908..78c60a09c0 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -535,7 +535,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) case MAPSECTYPE_CITY_CANFLY: FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2); - AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SKIP_DRAW, NULL); DrawCityMap(state, regionMap->mapSecId, regionMap->posWithinMapSec); CopyWindowToVram(state->infoWindowId, COPYWIN_FULL); SetCityZoomTextInvisibility(FALSE); @@ -543,7 +543,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) case MAPSECTYPE_CITY_CANTFLY: FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); PutWindowRectTilemap(state->infoWindowId, 0, 0, 12, 2); - AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SKIP_DRAW, NULL); FillBgTilemapBufferRect(1, 0x1041, 17, 6, 12, 11, 17); CopyWindowToVram(state->infoWindowId, COPYWIN_FULL); SetCityZoomTextInvisibility(TRUE); @@ -552,7 +552,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) case MAPSECTYPE_BATTLE_FRONTIER: FillWindowPixelBuffer(state->infoWindowId, PIXEL_FILL(1)); PutWindowTilemap(state->infoWindowId); - AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, regionMap->mapSecName, 0, 1, TEXT_SKIP_DRAW, NULL); PrintLandmarkNames(state, regionMap->mapSecId, regionMap->posWithinMapSec); CopyWindowToVram(state->infoWindowId, COPYWIN_FULL); SetCityZoomTextInvisibility(TRUE); @@ -654,7 +654,7 @@ static void PrintLandmarkNames(struct Pokenav5Struct_2 *state, int mapSecId, int break; StringCopyPadded(gStringVar1, landmarkName, CHAR_SPACE, 12); - AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, gStringVar1, 0, i * 16 + 17, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(state->infoWindowId, FONT_NARROW, gStringVar1, 0, i * 16 + 17, TEXT_SKIP_DRAW, NULL); i++; } } diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c index 8f7e27fe10..464e0b55cb 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_1.c @@ -674,7 +674,7 @@ static void sub_81D02B0(s32 windowId, s32 val1, s32 val2) *ptr++ = CHAR_SLASH; ConvertIntToDecimalStringN(ptr, val2, STR_CONV_MODE_RIGHT_ALIGN, 3); x = GetStringCenterAlignXOffset(FONT_NORMAL, strbuf, 56); - AddTextPrinterParameterized(windowId, FONT_NORMAL, strbuf, x, 1, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, strbuf, x, 1, TEXT_SKIP_DRAW, NULL); } static void InitMonRibbonPokenavListMenuTemplate(void) diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index c8c63f0178..bf1c156e58 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -809,7 +809,7 @@ static void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700); FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4)); - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, -1, gStringVar4); + AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, TEXT_SKIP_DRAW, gStringVar4); CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX); } @@ -824,7 +824,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) { // Print normal ribbon name/description for (i = 0; i < 2; i++) - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gRibbonDescriptionPointers[ribbonId][i]); + AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, TEXT_SKIP_DRAW, gRibbonDescriptionPointers[ribbonId][i]); } else { @@ -840,7 +840,7 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) // Print gift ribbon name/description ribbonId--; for (i = 0; i < 2; i++) - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, -1, gGiftRibbonDescriptionPointers[ribbonId][i]); + AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, TEXT_SKIP_DRAW, gGiftRibbonDescriptionPointers[ribbonId][i]); } CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX); @@ -877,7 +877,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); GetMonNicknameLevelGender(gStringVar3, &level, &gender); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar3, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar3, 0, 1, TEXT_SKIP_DRAW, NULL); switch (gender) { case MON_MALE: @@ -896,7 +896,7 @@ static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr) *(txtPtr++) = CHAR_EXTRA_SYMBOL; *(txtPtr++) = CHAR_LV_2; ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar1, 60, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(windowId, COPYWIN_GFX); } @@ -933,7 +933,7 @@ static void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr) *(txtPtr++) = CHAR_SLASH; ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3); x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar1, 56); - AddTextPrinterParameterized(structPtr->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(structPtr->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(structPtr->listIdxWindowId, COPYWIN_GFX); } diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index da434482e8..25e3a73302 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -381,7 +381,7 @@ static void PrintTime(u8 windowId, u8 x, u8 y, u16 days, u8 hours, u8 minutes, u ConvertIntToDecimalStringN(gStringVar1, seconds, STR_CONV_MODE_LEADING_ZEROS, 2); dest = StringCopy(dest, gStringVar1); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, TEXT_SKIP_DRAW, NULL); } static void ShowChooseTimeWindow(u8 windowId, u16 days, u8 hours, u8 minutes, u8 seconds) @@ -578,7 +578,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId) case 0: DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x214, 0xE); - AddTextPrinterParameterized(0, FONT_NORMAL, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_PresentTime, 0, 1, TEXT_SKIP_DRAW, 0); PrintTime( 0, 0, @@ -588,7 +588,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId) gLocalTime.minutes, gLocalTime.seconds); - AddTextPrinterParameterized(0, FONT_NORMAL, gText_PreviousTime, 0, 33, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, gText_PreviousTime, 0, 33, TEXT_SKIP_DRAW, 0); PrintTime( 0, 0, diff --git a/src/roulette.c b/src/roulette.c index 7e43f5db39..1e5e1f513c 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -1223,7 +1223,7 @@ static void CB2_LoadRoulette(void) SetMultiplierSprite(SELECTION_NONE); DrawGridBackground(SELECTION_NONE); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); gSpriteCoordOffsetX = -60; gSpriteCoordOffsetY = 0; @@ -1294,7 +1294,7 @@ static void Task_AskKeepPlaying(u8 taskId) { DisplayYesNoMenuDefaultYes(); DrawStdWindowFrame(sTextWindowId, 0); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SPEED_FF, 0); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SKIP_DRAW, 0); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); DoYesNoFuncWithChoice(taskId, &sYesNoTable_KeepPlaying); } @@ -1806,14 +1806,14 @@ static void Task_PrintSpinResult(u8 taskId) { PlayFanfare(MUS_SLOTS_JACKPOT); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_Jackpot, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_Jackpot, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); } else { PlayFanfare(MUS_SLOTS_WIN); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ItsAHit, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_ItsAHit, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); } break; @@ -1821,7 +1821,7 @@ static void Task_PrintSpinResult(u8 taskId) default: m4aSongNumStart(SE_FAILURE); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NothingDoing, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NothingDoing, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); break; } @@ -1866,7 +1866,7 @@ static void Task_PrintPayout(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, (sRoulette->minBet * gTasks[taskId].tMultiplier), STR_CONV_MODE_LEFT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, Roulette_Text_YouveWonXCoins); DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); gTasks[taskId].tPayout = (sRoulette->minBet * gTasks[taskId].tMultiplier); gTasks[taskId].data[7] = 0; @@ -1902,7 +1902,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) { // Reached Ball 6, clear board DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); StartTaskAfterDelayOrInput(taskId, Task_ClearBoard, NO_DELAY, A_BUTTON | B_BUTTON); } @@ -1910,7 +1910,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) { // Player maxed out coins DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON); } @@ -1924,7 +1924,7 @@ static void Task_TryPrintEndTurnMsg(u8 taskId) { // Player out of coins DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); StartTaskAfterDelayOrInput(taskId, Task_StopPlaying, 60, A_BUTTON | B_BUTTON); } @@ -1949,7 +1949,7 @@ static void Task_ClearBoard(u8 taskId) if (gTasks[taskId].tCoins == MAX_COINS) { DrawStdWindowFrame(sTextWindowId, FALSE); - AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL); StartTaskAfterDelayOrInput(taskId, Task_AskKeepPlaying, NO_DELAY, A_BUTTON | B_BUTTON); } @@ -3426,7 +3426,7 @@ static void Task_PrintMinBet(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, minBet, STR_CONV_MODE_LEADING_ZEROS, 1); StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX); DrawStdWindowFrame(0, FALSE); - AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_ShowMinBetYesNo; } @@ -3445,7 +3445,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) { // Special rate for Game Corner service day (only at second table) DrawStdWindowFrame(0, FALSE); - AddTextPrinterParameterized(0, FONT_NORMAL, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_PrintMinBet; } @@ -3454,7 +3454,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) // Print minimum bet StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX); DrawStdWindowFrame(0, FALSE); - AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_ShowMinBetYesNo; } @@ -3464,7 +3464,7 @@ static void Task_PrintRouletteEntryMsg(u8 taskId) // Not enough for minimum bet StringExpandPlaceholders(gStringVar4, Roulette_Text_NotEnoughCoins); DrawStdWindowFrame(0, FALSE); - AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_NotEnoughForMinBet; gTasks[taskId].tCoins = 0; diff --git a/src/scrcmd.c b/src/scrcmd.c index ce312a563c..ffe75b370f 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -49,6 +49,7 @@ #include "tv.h" #include "window.h" #include "constants/event_objects.h" +#include "constants/maps.h" typedef u16 (*SpecialFunc)(void); typedef void (*NativeFunc)(void); @@ -790,7 +791,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx) u16 y; PlayerGetDestCoords(&x, &y); - if (mapGroup == 0xFF && mapNum == 0xFF) + if (mapGroup == MAP_GROUP(UNDEFINED) && mapNum == MAP_NUM(UNDEFINED)) SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET); else SetWarpDestination(mapGroup, mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET); @@ -1532,7 +1533,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) DrawStdWindowFrame(gBrailleWindowId, 0); PutWindowTilemap(gBrailleWindowId); FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, 0xFF, 0x0); + AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(gBrailleWindowId, COPYWIN_FULL); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c index 8293b6f7a1..c82440b79a 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -353,22 +353,22 @@ static void CreatePCMultichoice(void) numChoices = 4; windowId = CreateWindowFromRect(0, 0, width, 8); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SKIP_DRAW, NULL); } else { numChoices = 3; windowId = CreateWindowFromRect(0, 0, width, 6); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SKIP_DRAW, NULL); } // Change PC name if player has met Lanette if (FlagGet(FLAG_SYS_PC_LANETTE)) - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LanettesPC, y, 1, TEXT_SKIP_DRAW, NULL); else - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeonesPC, y, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeonesPC, y, 1, TEXT_SKIP_DRAW, NULL); StringExpandPlaceholders(gStringVar4, gText_PlayersPC); PrintPlayerNameOnWindow(windowId, gStringVar4, y, 17); @@ -527,7 +527,7 @@ static void CreateLilycoveSSTidalMultichoice(void) { if (sLilycoveSSTidalSelections[i] != 0xFF) { - AddTextPrinterParameterized(windowId, FONT_NORMAL, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, sLilycoveSSTidalDestinations[sLilycoveSSTidalSelections[i]], 8, selectionCount * 16 + 1, TEXT_SKIP_DRAW, NULL); selectionCount++; } } @@ -688,14 +688,14 @@ static void CreateStartMenuForPokenavTutorial(void) { u8 windowId = CreateWindowFromRect(21, 0, 7, 18); SetStandardWindowBorderStyle(windowId, 0); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokenav, 8, 57, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokenav, 8, 57, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gSaveBlock2Ptr->playerName, 8, 73, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionSave, 8, 89, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionOption, 8, 105, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionExit, 8, 121, TEXT_SKIP_DRAW, NULL); InitMenuNormal(windowId, FONT_NORMAL, 0, 9, 16, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), 0); InitMultichoiceNoWrap(FALSE, ARRAY_COUNT(MultichoiceList_ForcedStartMenu), windowId, MULTI_FORCED_START_MENU); CopyWindowToVram(windowId, COPYWIN_FULL); diff --git a/src/shop.c b/src/shop.c index 604abd1ab5..fa4a73bbbd 100755 --- a/src/shop.c +++ b/src/shop.c @@ -577,7 +577,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y) StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); x = GetStringRightAlignXOffset(FONT_NARROW, gStringVar4, 0x78); - AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, 0, 0, sShopBuyMenuTextColors[1], -1, gStringVar4); + AddTextPrinterParameterized4(windowId, FONT_NARROW, x, y, 0, 0, sShopBuyMenuTextColors[1], TEXT_SKIP_DRAW, gStringVar4); } } @@ -1145,7 +1145,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId) s16 *data = gTasks[taskId].data; FillWindowPixelBuffer(4, PIXEL_FILL(1)); - PrintMoneyAmount(4, 38, 1, sShopData->totalCost, TEXT_SPEED_FF); + PrintMoneyAmount(4, 38, 1, sShopData->totalCost, TEXT_SKIP_DRAW); ConvertIntToDecimalStringN(gStringVar1, tItemCount, STR_CONV_MODE_LEADING_ZEROS, BAG_ITEM_CAPACITY_DIGITS); StringExpandPlaceholders(gStringVar4, gText_xVar1); BuyMenuPrint(4, gStringVar4, 0, 1, 0, 0); diff --git a/src/start_menu.c b/src/start_menu.c index 0cf102efcd..05ceb11194 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -386,7 +386,7 @@ static void ShowSafariBallsWindow(void) DrawStdWindowFrame(sSafariBallsWindowId, FALSE); ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gText_SafariBallStock); - AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 0, 1, 0xFF, NULL); + AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sSafariBallsWindowId, COPYWIN_GFX); } @@ -401,7 +401,7 @@ static void ShowPyramidFloorWindow(void) DrawStdWindowFrame(sBattlePyramidFloorWindowId, FALSE); StringCopy(gStringVar1, sPyramidFloorNames[gSaveBlock2Ptr->frontier.curChallengeBattleNum]); StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor); - AddTextPrinterParameterized(sBattlePyramidFloorWindowId, FONT_NORMAL, gStringVar4, 0, 1, 0xFF, NULL); + AddTextPrinterParameterized(sBattlePyramidFloorWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sBattlePyramidFloorWindowId, COPYWIN_GFX); } @@ -433,7 +433,7 @@ static bool32 PrintStartMenuActions(s8 *pIndex, u32 count) else { StringExpandPlaceholders(gStringVar4, sStartMenuItems[sCurrentStartMenuActions[index]].text); - AddTextPrinterParameterized(GetStartMenuWindowId(), FONT_NORMAL, gStringVar4, 8, (index << 4) + 9, 0xFF, NULL); + AddTextPrinterParameterized(GetStartMenuWindowId(), FONT_NORMAL, gStringVar4, 8, (index << 4) + 9, TEXT_SKIP_DRAW, NULL); } index++; @@ -1240,7 +1240,7 @@ static void Task_SaveAfterLinkBattle(u8 taskId) AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, - TEXT_SPEED_FF, + TEXT_SKIP_DRAW, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, @@ -1330,38 +1330,38 @@ static void ShowSaveInfoWindow(void) // Print region name yOffset = 1; BufferSaveMenuText(SAVE_MENU_LOCATION, gStringVar4, TEXT_COLOR_GREEN); - AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, 0, yOffset, TEXT_SKIP_DRAW, NULL); // Print player name yOffset += 16; - AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPlayer, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPlayer, 0, yOffset, TEXT_SKIP_DRAW, NULL); BufferSaveMenuText(SAVE_MENU_NAME, gStringVar4, color); xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); PrintPlayerNameOnWindow(sSaveInfoWindowId, gStringVar4, xOffset, yOffset); // Print badge count yOffset += 16; - AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingBadges, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingBadges, 0, yOffset, TEXT_SKIP_DRAW, NULL); BufferSaveMenuText(SAVE_MENU_BADGES, gStringVar4, color); xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); - AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, TEXT_SKIP_DRAW, NULL); if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE) { // Print pokedex count yOffset += 16; - AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPokedex, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingPokedex, 0, yOffset, TEXT_SKIP_DRAW, NULL); BufferSaveMenuText(SAVE_MENU_CAUGHT, gStringVar4, color); xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); - AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, TEXT_SKIP_DRAW, NULL); } // Print play time yOffset += 16; - AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingTime, 0, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gText_SavingTime, 0, yOffset, TEXT_SKIP_DRAW, NULL); BufferSaveMenuText(SAVE_MENU_PLAY_TIME, gStringVar4, color); xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0x70); - AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, 0xFF, NULL); + AddTextPrinterParameterized(sSaveInfoWindowId, FONT_NORMAL, gStringVar4, xOffset, yOffset, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sSaveInfoWindowId, COPYWIN_GFX); } diff --git a/src/trade.c b/src/trade.c index 603d92c871..88bef1ea01 100644 --- a/src/trade.c +++ b/src/trade.c @@ -2153,7 +2153,7 @@ static void DoQueuedActions(void) static void PrintTradeMessage(u8 messageId) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(0, FONT_NORMAL, sTradeMessages[messageId], 0, 1, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sTradeMessages[messageId], 0, 1, TEXT_SKIP_DRAW, NULL); DrawTextBorderOuter(0, 20, 12); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_FULL); diff --git a/src/trainer_card.c b/src/trainer_card.c index b72e454985..8f3b61a356 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -1001,9 +1001,9 @@ static void PrintNameOnCardFront(void) StringCopy(txtPtr, sData->trainerCard.playerName); ConvertInternationalString(txtPtr, sData->language); if (sData->cardType == CARD_TYPE_FRLG) - AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 28, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 28, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); else - AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 33, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 33, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); } static void PrintIdOnCard(void) @@ -1025,7 +1025,7 @@ static void PrintIdOnCard(void) top = 9; } - AddTextPrinterParameterized3(1, FONT_NORMAL, xPos, top, sTrainerCardTextColors, TEXT_SPEED_FF, buffer); + AddTextPrinterParameterized3(1, FONT_NORMAL, xPos, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, buffer); } static void PrintMoneyOnCard(void) @@ -1034,9 +1034,9 @@ static void PrintMoneyOnCard(void) u8 top; if (!sData->isHoenn) - AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 56, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney); + AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 56, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardMoney); else - AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 57, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardMoney); + AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 57, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardMoney); ConvertIntToDecimalStringN(gStringVar1, sData->trainerCard.money, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_PokedollarVar1); @@ -1050,7 +1050,7 @@ static void PrintMoneyOnCard(void) xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128); top = 57; } - AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); } static u16 GetCaughtMonsCount(void) @@ -1068,9 +1068,9 @@ static void PrintPokedexOnCard(void) if (FlagGet(FLAG_SYS_POKEDEX_GET)) { if (!sData->isHoenn) - AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 72, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex); + AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 72, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardPokedex); else - AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 73, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardPokedex); + AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 73, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardPokedex); StringCopy(ConvertIntToDecimalStringN(gStringVar4, sData->trainerCard.caughtMonsCount, STR_CONV_MODE_LEFT_ALIGN, 3), gText_EmptyString6); if (!sData->isHoenn) { @@ -1082,7 +1082,7 @@ static void PrintPokedexOnCard(void) xOffset = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 128); top = 73; } - AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, FONT_NORMAL, xOffset, top, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); } } @@ -1096,9 +1096,9 @@ static void PrintTimeOnCard(void) u32 x, y, totalWidth; if (!sData->isHoenn) - AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 88, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime); + AddTextPrinterParameterized3(1, FONT_NORMAL, 20, 88, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardTime); else - AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 89, sTrainerCardTextColors, TEXT_SPEED_FF, gText_TrainerCardTime); + AddTextPrinterParameterized3(1, FONT_NORMAL, 16, 89, sTrainerCardTextColors, TEXT_SKIP_DRAW, gText_TrainerCardTime); if (sData->isLink) { @@ -1132,12 +1132,12 @@ static void PrintTimeOnCard(void) FillWindowPixelRect(1, PIXEL_FILL(0), x, y, totalWidth, 15); ConvertIntToDecimalStringN(gStringVar4, hours, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); x += 18; - AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTimeColonTextColors[sData->timeColonInvisible], TEXT_SPEED_FF, gText_Colon2); + AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTimeColonTextColors[sData->timeColonInvisible], TEXT_SKIP_DRAW, gText_Colon2); x += width; ConvertIntToDecimalStringN(gStringVar4, minutes, STR_CONV_MODE_LEADING_ZEROS, 2); - AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(1, FONT_NORMAL, x, y, sTrainerCardTextColors, TEXT_SKIP_DRAW, gStringVar4); } static void PrintProfilePhraseOnCard(void) @@ -1147,10 +1147,10 @@ static void PrintProfilePhraseOnCard(void) if (sData->isLink) { - AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[0]); - AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[0], 0) + 14, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[1]); - AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[2]); - AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[2], 0) + 14, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SPEED_FF, sData->easyChatProfile[3]); + AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[0]); + AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[0], 0) + 14, yOffsetsLine1[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[1]); + AddTextPrinterParameterized3(1, FONT_NORMAL, 8, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[2]); + AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringWidth(FONT_NORMAL, sData->easyChatProfile[2], 0) + 14, yOffsetsLine2[sData->isHoenn], sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->easyChatProfile[3]); } } @@ -1168,9 +1168,9 @@ static void BufferNameForCardBack(void) static void PrintNameOnCardBack(void) { if (!sData->isHoenn) - AddTextPrinterParameterized3(1, FONT_NORMAL, 136, 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->textPlayersCard); + AddTextPrinterParameterized3(1, FONT_NORMAL, 136, 9, sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->textPlayersCard); else - AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, sData->textPlayersCard, 216), 9, sTrainerCardTextColors, TEXT_SPEED_FF, sData->textPlayersCard); + AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, sData->textPlayersCard, 216), 9, sTrainerCardTextColors, TEXT_SKIP_DRAW, sData->textPlayersCard); } static const u8 sText_HofTime[] = _("{STR_VAR_1}:{STR_VAR_2}:{STR_VAR_3}"); @@ -1191,8 +1191,8 @@ static void PrintStatOnBackOfCard(u8 top, const u8* statName, u8* stat, const u8 static const u8 xOffsets[] = {8, 16}; static const u8 widths[] = {216, 216}; - AddTextPrinterParameterized3(1, FONT_NORMAL, xOffsets[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SPEED_FF, statName); - AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, stat, widths[sData->isHoenn]), top * 16 + 33, color, TEXT_SPEED_FF, stat); + AddTextPrinterParameterized3(1, FONT_NORMAL, xOffsets[sData->isHoenn], top * 16 + 33, sTrainerCardTextColors, TEXT_SKIP_DRAW, statName); + AddTextPrinterParameterized3(1, FONT_NORMAL, GetStringRightAlignXOffset(FONT_NORMAL, stat, widths[sData->isHoenn]), top * 16 + 33, color, TEXT_SKIP_DRAW, stat); } static void PrintHofDebutTimeOnCard(void) diff --git a/src/trainer_hill.c b/src/trainer_hill.c index f0a6337293..2c34f196e5 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -591,12 +591,12 @@ void PrintOnTrainerHillRecordsWindow(void) SetUpDataStruct(); FillWindowPixelBuffer(0, PIXEL_FILL(0)); x = GetStringCenterAlignXOffset(FONT_NORMAL, gText_TimeBoard, 0xD0); - AddTextPrinterParameterized3(0, FONT_NORMAL, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard); + AddTextPrinterParameterized3(0, FONT_NORMAL, x, 2, sRecordWinColors, TEXT_SKIP_DRAW, gText_TimeBoard); y = 18; for (i = 0; i < 4; i++) { - AddTextPrinterParameterized3(0, FONT_NORMAL, 0, y, sRecordWinColors, TEXT_SPEED_FF, sTagMatchStrings[i]); + AddTextPrinterParameterized3(0, FONT_NORMAL, 0, y, sRecordWinColors, TEXT_SKIP_DRAW, sTagMatchStrings[i]); y += 15; total = GetTimerValue(&gSaveBlock1Ptr->trainerHillTimes[i]); minutes = total / (60 * 60); @@ -609,7 +609,7 @@ void PrintOnTrainerHillRecordsWindow(void) ConvertIntToDecimalStringN(gStringVar3, secondsFraction, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(StringCopy(gStringVar4, gText_TimeCleared), gText_XMinYDotZSec); x = GetStringRightAlignXOffset(FONT_NORMAL, gStringVar4, 0xD0); - AddTextPrinterParameterized3(0, FONT_NORMAL, x, y, sRecordWinColors, TEXT_SPEED_FF, gStringVar4); + AddTextPrinterParameterized3(0, FONT_NORMAL, x, y, sRecordWinColors, TEXT_SKIP_DRAW, gStringVar4); y += 17; } diff --git a/src/union_room.c b/src/union_room.c index a2fbd382de..1400a0b1d4 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -3852,7 +3852,7 @@ static void PrintUnionRoomText(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y break; } - AddTextPrinter(&printerTemplate, TEXT_SPEED_FF, NULL); + AddTextPrinter(&printerTemplate, TEXT_SKIP_DRAW, NULL); } static void ClearRfuPlayerList(struct RfuPlayer *players, u8 count) diff --git a/src/union_room_chat.c b/src/union_room_chat.c index d2bce295be..c6fe7413e1 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -2740,8 +2740,8 @@ static void AddYesNoMenuAt(u8 left, u8 top, u8 initialCursorPos) { FillWindowPixelBuffer(sDisplay->yesNoMenuWindowId, PIXEL_FILL(1)); PutWindowTilemap(sDisplay->yesNoMenuWindowId); - AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_Yes, 8, 1, TEXT_SPEED_FF, NULL); - AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_No, 8, 17, TEXT_SPEED_FF, NULL); + AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_Yes, 8, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sDisplay->yesNoMenuWindowId, FONT_NORMAL, gText_No, 8, 17, TEXT_SKIP_DRAW, NULL); DrawTextBorderOuter(sDisplay->yesNoMenuWindowId, 1, 13); InitMenuInUpperLeftCornerNormal(sDisplay->yesNoMenuWindowId, 2, initialCursorPos); } @@ -2815,7 +2815,7 @@ static void AddStdMessageWindow(int msgId, u16 bg0vofs) str, sDisplayStdMessages[msgId].x + 8, sDisplayStdMessages[msgId].y + 8, - TEXT_SPEED_FF, + TEXT_SKIP_DRAW, NULL, sDisplayStdMessages[msgId].letterSpacing, sDisplayStdMessages[msgId].lineSpacing); @@ -2829,7 +2829,7 @@ static void AddStdMessageWindow(int msgId, u16 bg0vofs) str, sDisplayStdMessages[msgId].x, sDisplayStdMessages[msgId].y, - TEXT_SPEED_FF, + TEXT_SKIP_DRAW, NULL, sDisplayStdMessages[msgId].letterSpacing, sDisplayStdMessages[msgId].lineSpacing); @@ -2877,7 +2877,7 @@ static void DrawTextEntryMessage(u16 x, u8 *str, u8 bgColor, u8 fgColor, u8 shad strBuffer[1] = EXT_CTRL_CODE_MIN_LETTER_SPACING; strBuffer[2] = 8; StringCopy(&strBuffer[3], str); - AddTextPrinterParameterized3(1, FONT_SHORT, x * 8, 1, color, TEXT_SPEED_FF, strBuffer); + AddTextPrinterParameterized3(1, FONT_SHORT, x * 8, 1, color, TEXT_SKIP_DRAW, strBuffer); } static void PrintCurrentKeyboardPage(void) @@ -2912,7 +2912,7 @@ static void PrintCurrentKeyboardPage(void) return; StringCopy(&str[3], sUnionRoomKeyboardText[page][i]); - AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str); + AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str); } } else @@ -2923,7 +2923,7 @@ static void PrintCurrentKeyboardPage(void) str2 = GetRegisteredTextByRow(i); if (GetStringWidth(FONT_SMALL, str2, 0) <= 40) { - AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str2); + AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str2); } else { @@ -2934,8 +2934,8 @@ static void PrintCurrentKeyboardPage(void) StringCopyN_Multibyte(str, str2, length); } while (GetStringWidth(FONT_SMALL, str, 0) > 35); - AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SPEED_FF, str); - AddTextPrinterParameterized3(2, FONT_SMALL, left + 35, top, color, TEXT_SPEED_FF, sText_Ellipsis); + AddTextPrinterParameterized3(2, FONT_SMALL, left, top, color, TEXT_SKIP_DRAW, str); + AddTextPrinterParameterized3(2, FONT_SMALL, left + 35, top, color, TEXT_SKIP_DRAW, sText_Ellipsis); } } } @@ -3006,7 +3006,7 @@ static void PrintChatMessage(u16 row, u8 *str, u8 colorIdx) color[1] = colorIdx * 2 + 2; color[2] = colorIdx * 2 + 3; FillWindowPixelRect(0, PIXEL_FILL(1), 0, row * 15, 168, 15); - AddTextPrinterParameterized3(0, FONT_SHORT, 0, row * 15 + 1, color, TEXT_SPEED_FF, str); + AddTextPrinterParameterized3(0, FONT_SHORT, 0, row * 15 + 1, color, TEXT_SKIP_DRAW, str); } static void ResetGpuBgState(void) diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 458882853a..65d8c86d09 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -301,7 +301,7 @@ static u16 GetCurrentMapWildMonHeaderId(void) for (i = 0; ; i++) { const struct WildPokemonHeader *wildHeader = &gWildMonHeaders[i]; - if (wildHeader->mapGroup == 0xFF) + if (wildHeader->mapGroup == MAP_GROUP(UNDEFINED)) break; if (gWildMonHeaders[i].mapGroup == gSaveBlock1Ptr->location.mapGroup && diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 7a69cf6d62..a12a8920c1 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -344,7 +344,7 @@ static void WCSS_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 * break; } - AddTextPrinterParameterized4(windowId, fontId, x, y, 0, 0, color, -1, str); + AddTextPrinterParameterized4(windowId, fontId, x, y, 0, 0, color, TEXT_SKIP_DRAW, str); } static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer * player, u32 * groupCounts) From d6f873ba69af5e4dd9733c2f9f3f75be0d4c6816 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 3 Nov 2021 20:28:43 -0400 Subject: [PATCH 136/417] Continue menu documentation --- include/menu.h | 2 +- src/menu.c | 65 ++++++++++++++++++----------------- src/pokedex_area_region_map.c | 7 ++-- 3 files changed, 39 insertions(+), 35 deletions(-) diff --git a/include/menu.h b/include/menu.h index 3f9ccd721e..7ecb04e53e 100644 --- a/include/menu.h +++ b/include/menu.h @@ -109,7 +109,7 @@ u8 GetMapNamePopUpWindowId(void); u8 AddMapNamePopUpWindow(void); void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 letterSpacing, u8 lineSpacing); void SetBgTilemapPalette(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette); -void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP); +void AddValToTilemapBuffer(void *ptr, int delta, int width, int height, bool32 is8BPP); void EraseFieldMessageBox(bool8 copyToVram); void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *strs); s8 Menu_ProcessInputGridLayout(void); diff --git a/src/menu.c b/src/menu.c index 9f1077b465..0e7c0c6e46 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1232,7 +1232,7 @@ void EraseYesNoWindow(void) RemoveWindow(sYesNoWindowId); } -void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u8 a7, const struct MenuAction *menuActions) +static void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u8 a7, const struct MenuAction *menuActions) { u8 i; u8 j; @@ -1244,7 +1244,8 @@ void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u CopyWindowToVram(windowId, COPYWIN_GFX); } -void sub_8198D54(u8 windowId, u8 fontId, u8 a2, u8 a3, u8 a4, u8 a5, const struct MenuAction *menuActions) +// Unused +static void sub_8198D54(u8 windowId, u8 fontId, u8 a2, u8 a3, u8 a4, u8 a5, const struct MenuAction *menuActions) { sub_8198C94(windowId, fontId, GetFontAttribute(fontId, 0), 0, a2, a3, a4, a5, menuActions); } @@ -1286,7 +1287,7 @@ static void PrintMenuActionGrid_TopLeft(u8 windowId, u8 fontId, u8 optionWidth, PrintMenuActionGrid(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 0, optionWidth, horizontalCount, verticalCount, menuActions, actionIds); } -u8 sub_8198F58(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 cursorHeight, u8 a6, u8 a7, u8 numChoices, u8 a9) +static u8 sub_8198F58(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth, u8 optionHeight, u8 columns, u8 rows, u8 numChoices, u8 cursorPos) { s32 pos; @@ -1296,12 +1297,12 @@ u8 sub_8198F58(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 cursorHeight, sMenu.maxCursorPos = numChoices - 1; sMenu.windowId = windowId; sMenu.fontId = fontId; - sMenu.optionWidth = a4; - sMenu.optionHeight = cursorHeight; - sMenu.columns = a6; - sMenu.rows = a7; + sMenu.optionWidth = optionWidth; + sMenu.optionHeight = optionHeight; + sMenu.columns = columns; + sMenu.rows = rows; - pos = a9; + pos = cursorPos; if (pos < 0 || pos > sMenu.maxCursorPos) sMenu.cursorPos = 0; @@ -1314,14 +1315,14 @@ u8 sub_8198F58(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 cursorHeight, } // Unused -u8 sub_8198FD4(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u8 a7) +static u8 sub_8198FD4(u8 windowId, u8 fontId, u8 left, u8 top, u8 width, u8 columns, u8 rows, u8 cursorPos) { u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1); - u8 numChoices = a5 * a6; - return sub_8198F58(windowId, fontId, left, top, a4, cursorHeight, a5, a6, numChoices, a7); + u8 numChoices = columns * rows; + return sub_8198F58(windowId, fontId, left, top, width, cursorHeight, columns, rows, numChoices, cursorPos); } -void sub_8199060(u8 oldCursorPos, u8 newCursorPos) +static void sub_8199060(u8 oldCursorPos, u8 newCursorPos) { u8 cursorWidth = GetMenuCursorDimensionByFont(sMenu.fontId, 0); u8 cursorHeight = GetMenuCursorDimensionByFont(sMenu.fontId, 1); @@ -1414,7 +1415,8 @@ u8 ChangeGridMenuCursorPosition(s8 deltaX, s8 deltaY) } } -s8 sub_8199284(void) +// Unused +static s8 sub_8199284(void) { if (JOY_NEW(A_BUTTON)) { @@ -1494,7 +1496,8 @@ s8 Menu_ProcessInputGridLayout(void) return MENU_NOTHING_CHOSEN; } -s8 sub_81993D8(void) +// Unused +static s8 sub_81993D8(void) { if (JOY_NEW(A_BUTTON)) { @@ -1505,25 +1508,25 @@ s8 sub_81993D8(void) { return MENU_B_PRESSED; } - else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_UP) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_UP) { PlaySE(SE_SELECT); ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); return MENU_NOTHING_CHOSEN; } - else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_DOWN) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_DOWN) { PlaySE(SE_SELECT); ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); return MENU_NOTHING_CHOSEN; } - else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) { PlaySE(SE_SELECT); ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); return MENU_NOTHING_CHOSEN; } - else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) { PlaySE(SE_SELECT); ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); @@ -1533,8 +1536,8 @@ s8 sub_81993D8(void) return MENU_NOTHING_CHOSEN; } -//Unused -s8 sub_8199484(void) +// Unused +static s8 sub_8199484(void) { u8 oldPos = sMenu.cursorPos; @@ -1678,7 +1681,8 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const CopyWindowToVram(windowId, COPYWIN_GFX); } -void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *menuActions, const u8 *actionIds) +// Unused +static void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *menuActions, const u8 *actionIds) { u8 i; u8 j; @@ -1893,31 +1897,26 @@ void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 for (i = 0; i < height; i++) { for (j = 0; j < width; j++) - { dest[(i * width) + j] = src[(i + top) * 32 + j + left]; - } } } -void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP) +void AddValToTilemapBuffer(void *ptr, int delta, int width, int height, bool32 isAffine) { int i; int area = width * height; - if (is8BPP == TRUE) + if (isAffine == TRUE) { u8 *as8BPP = ptr; for (i = 0; i < area; i++) - { as8BPP[i] += delta; - } } else { + // Limit add to first 10 bits u16 *as4BPP = ptr; for (i = 0; i < area; i++) - { as4BPP[i] = (as4BPP[i] & 0xFC00) | ((as4BPP[i] + delta) & 0x3FF); - } } } @@ -2016,7 +2015,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y) } // Unused. Similar to BlitBitmapRect4Bit. -void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height) +static void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height) { int loopSrcY, loopDstY, loopSrcX, loopDstX, xEnd, yEnd, multiplierSrcY, multiplierDstY; const u8 *pixelsSrc; @@ -2091,12 +2090,14 @@ void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 src } } -void sub_819A25C(u8 palOffset, u16 speciesId) +// Unused +static void sub_819A25C(u8 palOffset, u16 speciesId) { LoadPalette(GetValidMonIconPalettePtr(speciesId), palOffset, 0x20); } -void sub_819A27C(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) +// Unused +static void sub_819A27C(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) { BlitBitmapToWindow(windowId, GetMonIconPtr(speciesId, personality, 1), x, y, 32, 32); } diff --git a/src/pokedex_area_region_map.c b/src/pokedex_area_region_map.c index 1ee5ca988d..fce550bde0 100644 --- a/src/pokedex_area_region_map.c +++ b/src/pokedex_area_region_map.c @@ -17,6 +17,7 @@ static const u32 sPokedexAreaMapAffine_Tilemap[] = INCBIN_U32("graphics/interfac void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) { u8 mode; + void * tilemap; sPokedexAreaMapBgNum = Alloc(sizeof(sPokedexAreaMapBgNum)); mode = template->mode; @@ -24,7 +25,8 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) { SetBgAttribute(template->bg, BG_ATTR_METRIC, 0); DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMap_Gfx, 0, template->offset, 0); - sub_8199D3C(DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMap_Tilemap, 0, 0, 1), template->offset, 32, 32, FALSE); + tilemap = DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMap_Tilemap, 0, 0, 1); + AddValToTilemapBuffer(tilemap, template->offset, 32, 32, FALSE); // template->offset is always 0, so this does nothing. } else { @@ -32,7 +34,8 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) SetBgAttribute(template->bg, BG_ATTR_METRIC, 2); SetBgAttribute(template->bg, BG_ATTR_TYPE, BG_TYPE_AFFINE); // This does nothing. BG_ATTR_TYPE can't be set with this function DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMapAffine_Gfx, 0, template->offset, 0); - sub_8199D3C(DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMapAffine_Tilemap, 0, 0, 1), template->offset, 64, 64, TRUE); + tilemap = DecompressAndCopyTileDataToVram(template->bg, sPokedexAreaMapAffine_Tilemap, 0, 0, 1); + AddValToTilemapBuffer(tilemap, template->offset, 64, 64, TRUE); // template->offset is always 0, so this does nothing. } ChangeBgX(template->bg, 0, 0); From c291fa8e7fc8f823544e483eccb9b87fd7f99206 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 3 Nov 2021 23:02:06 -0400 Subject: [PATCH 137/417] Propagate BG_COORD constants --- gflib/bg.h | 1 + src/battle_dome.c | 16 +++++------ src/battle_factory_screen.c | 28 +++++++++---------- src/battle_records.c | 16 +++++------ src/battle_transition_frontier.c | 6 ++-- src/berry_blender.c | 8 +++--- src/berry_crush.c | 16 +++++------ src/berry_fix_program.c | 8 +++--- src/contest_painting.c | 4 +-- src/dodrio_berry_picking.c | 32 +++++++++++----------- src/easy_chat.c | 22 +++++++-------- src/egg_hatch.c | 8 +++--- src/frontier_pass.c | 16 +++++------ src/hall_of_fame.c | 12 ++++---- src/item_menu.c | 2 +- src/main_menu.c | 24 ++++++++-------- src/match_call.c | 10 +++---- src/menu.c | 20 +++++++------- src/menu_helpers.c | 16 +++++------ src/mirage_tower.c | 4 +-- src/mystery_gift_menu.c | 16 +++++------ src/mystery_gift_view.c | 14 +++++----- src/naming_screen.c | 16 +++++------ src/option_menu.c | 16 +++++------ src/overworld.c | 16 +++++------ src/party_menu.c | 4 +-- src/pokedex_area_region_map.c | 6 ++-- src/pokedex_area_screen.c | 2 +- src/pokedex_cry_screen.c | 2 +- src/pokemon_jump.c | 8 +++--- src/pokemon_storage_system.c | 16 +++++------ src/pokemon_summary_screen.c | 16 +++++------ src/pokenav_conditions_2.c | 12 ++++---- src/pokenav_conditions_3.c | 4 +-- src/pokenav_main_menu.c | 8 +++--- src/pokenav_match_call_2.c | 8 +++--- src/pokenav_match_call_ui.c | 16 +++++------ src/pokenav_menu_handler_2.c | 14 +++++----- src/pokenav_region_map.c | 14 +++++----- src/pokenav_ribbons_1.c | 4 +-- src/pokenav_ribbons_2.c | 8 +++--- src/rayquaza_scene.c | 28 +++++++++---------- src/starter_choose.c | 16 +++++------ src/trade.c | 4 +-- src/trainer_card.c | 16 +++++------ src/union_room_chat.c | 20 +++++++------- src/use_pokeblock.c | 16 +++++------ src/wallclock.c | 16 +++++------ src/wireless_communication_status_screen.c | 8 +++--- 49 files changed, 307 insertions(+), 306 deletions(-) diff --git a/gflib/bg.h b/gflib/bg.h index b5d18d6d03..3a0bf3bf90 100644 --- a/gflib/bg.h +++ b/gflib/bg.h @@ -21,6 +21,7 @@ enum { BG_TYPE_NONE = 0xFFFF }; +// Modes for ChangeBgX / ChangeBgY enum { BG_COORD_SET, BG_COORD_ADD, diff --git a/src/battle_dome.c b/src/battle_dome.c index 0075e84d6a..08f1fa9343 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -5281,10 +5281,10 @@ static void Task_ShowTourneyTree(u8 taskId) gBattle_BG0_Y = 0; gBattle_BG1_X = 0; gBattle_BG1_Y = 0; - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0xB00, 0); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0xB00, BG_COORD_SET); gTasks[taskId].tState++; break; case 1: @@ -5597,8 +5597,8 @@ static void CB2_TourneyTree(void) static void VblankCb_TourneyInfoCard(void) { - ChangeBgX(3, 0x80, 1); - ChangeBgY(3, 0x80, 2); + ChangeBgX(3, 0x80, BG_COORD_ADD); + ChangeBgY(3, 0x80, BG_COORD_SUB); SetGpuReg(REG_OFFSET_BG0HOFS, gBattle_BG0_X); SetGpuReg(REG_OFFSET_BG0VOFS, gBattle_BG0_Y); SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X); @@ -5693,8 +5693,8 @@ static void VblankCb_TourneyTree(void) SetGpuReg(REG_OFFSET_BG0VOFS, gBattle_BG0_Y); SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X); SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); - ChangeBgY(2, 0x80, 2); - ChangeBgY(3, 0x80, 1); + ChangeBgY(2, 0x80, BG_COORD_SUB); + ChangeBgY(3, 0x80, BG_COORD_ADD); LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 98caada1d9..247b8712fe 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -1147,12 +1147,12 @@ static void CB2_InitSelectScreen(void) sSelectMonPicBgTilesetBuffer = AllocZeroed(0x440); sSelectMenuTilemapBuffer = Alloc(BG_SCREEN_SIZE); sSelectMonPicBgTilemapBuffer = AllocZeroed(BG_SCREEN_SIZE); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0); @@ -3280,14 +3280,14 @@ static void CB2_InitSwapScreen(void) sSwapMonPicBgTilesetBuffer = AllocZeroed(0x440); sSwapMenuTilemapBuffer = Alloc(BG_SCREEN_SIZE); sSwapMonPicBgTilemapBuffer = AllocZeroed(BG_SCREEN_SIZE); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_BLDY, 0); SetGpuReg(REG_OFFSET_MOSAIC, 0); SetGpuReg(REG_OFFSET_WIN0H, 0); diff --git a/src/battle_records.c b/src/battle_records.c index 850feef59e..f576d5912d 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -425,14 +425,14 @@ static void ClearTasksAndGraphicalStructs(void) static void ResetBgCoordinates(void) { - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); } static void SetDispcntReg(void) diff --git a/src/battle_transition_frontier.c b/src/battle_transition_frontier.c index e1cb03d8df..a1a39abdab 100644 --- a/src/battle_transition_frontier.c +++ b/src/battle_transition_frontier.c @@ -378,9 +378,9 @@ static bool8 Circles_Init(struct Task *task) LoadLogoGfx(); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgY(0, 0x500, 2); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgY(0, 0x500, BG_COORD_SUB); task->tTimer = 0; task->tState++; diff --git a/src/berry_blender.c b/src/berry_blender.c index 4e7168fc1a..7d22eae774 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -1013,10 +1013,10 @@ static void DrawBlenderBg(void) ShowBg(0); ShowBg(1); SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); } static void InitBerryBlenderWindows(void) diff --git a/src/berry_crush.c b/src/berry_crush.c index 10f7987e05..6f432a3f98 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1202,12 +1202,12 @@ static s32 ShowGameDisplay(void) SetBgTilemapBuffer(1, game->gfx.bgBuffers[0]); SetBgTilemapBuffer(2, game->gfx.bgBuffers[2]); SetBgTilemapBuffer(3, game->gfx.bgBuffers[3]); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); break; @@ -1249,8 +1249,8 @@ static s32 ShowGameDisplay(void) CreateWirelessStatusIndicatorSprite(0, 0); CreateGameSprites(game); SetGpuReg(REG_OFFSET_BG1VOFS, -gSpriteCoordOffsetY); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); break; case 9: gPaletteFade.bufferTransferDisabled = FALSE; diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index e2f7651795..e8c4bc7e68 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -290,10 +290,10 @@ static void BerryFix_GpuSet(void) ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sBerryFixBgTemplates, ARRAY_COUNT(sBerryFixBgTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); InitWindows(sBerryFixWindowTemplates); DeactivateAllTextPrinters(); diff --git a/src/contest_painting.c b/src/contest_painting.c index 84b160eb82..e71cf391f8 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -267,8 +267,8 @@ static void InitContestPaintingWindow(void) { ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); SetBgTilemapBuffer(1, AllocZeroed(BG_SCREEN_SIZE)); sWindowId = AddWindow(&sWindowTemplate); DeactivateAllTextPrinters(); diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 8c09afeb3c..e680b56d39 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -1352,14 +1352,14 @@ static void ResetGame(void) } break; case 2: - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); sGame->state++; break; case 3: @@ -5172,14 +5172,14 @@ static void InitBgs(void) SetGpuReg(REG_OFFSET_DISPCNT, 0); ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); InitStandardTextBoxWindows(); InitTextBoxGfxAndPrinters(); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); diff --git a/src/easy_chat.c b/src/easy_chat.c index c78e14ecf3..3257a122db 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -3900,14 +3900,14 @@ static bool8 InitEasyChatScreenControl_(void) static void InitEasyChatBgs(void) { - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON | DISPCNT_WIN0_ON); } @@ -4550,7 +4550,7 @@ static void BufferLowerWindowFrame(int left, int top, int width, int height) static void ResetLowerWindowScroll(void) { - ChangeBgY(2, 0x800, 0); + ChangeBgY(2, 0x800, BG_COORD_SET); sScreenControl->scrollOffset = 0; } @@ -4572,7 +4572,7 @@ static void InitLowerWindowScroll(s16 scrollChange, u8 speed) } else { - ChangeBgY(2, bgY, 0); + ChangeBgY(2, bgY, BG_COORD_SET); } } @@ -4587,7 +4587,7 @@ static bool8 UpdateLowerWindowScroll(void) } else { - ChangeBgY(2, sScreenControl->scrollSpeed, 1); + ChangeBgY(2, sScreenControl->scrollSpeed, BG_COORD_ADD); return TRUE; } } diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 4c9456f2e6..283ec753af 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -495,10 +495,10 @@ static void CB2_EggHatch_0(void) ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sBgTemplates_EggHatch, ARRAY_COUNT(sBgTemplates_EggHatch)); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); SetBgAttribute(1, BG_ATTR_PRIORITY, 2); SetBgTilemapBuffer(1, Alloc(0x1000)); diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 9dfd5e9354..8ce1e14dc4 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -561,14 +561,14 @@ static void ResetGpuRegsAndBgs(void) SetGpuReg(REG_OFFSET_BG2CNT, 0); SetGpuReg(REG_OFFSET_BG1CNT, 0); SetGpuReg(REG_OFFSET_BG0CNT, 0); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDY, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index ecc8b18ae4..84f7d8fe67 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -1295,12 +1295,12 @@ static void InitHofBgs(void) InitBgsFromTemplates(0, sHof_BgTemplates, ARRAY_COUNT(sHof_BgTemplates)); SetBgTilemapBuffer(1, sHofGfxPtr->tilemap1); SetBgTilemapBuffer(3, sHofGfxPtr->tilemap2); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); } static bool8 LoadHofBgs(void) diff --git a/src/item_menu.c b/src/item_menu.c index 0c4b674525..037567daa7 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -2039,7 +2039,7 @@ bool8 UseRegisteredKeyItemOnField(void) if (InUnionRoom() == TRUE || InBattlePyramid() || InBattlePike() || InMultiPartnerRoom() == TRUE) return FALSE; HideMapNamePopUpWindow(); - ChangeBgY_ScreenOff(0, 0, 0); + ChangeBgY_ScreenOff(0, 0, BG_COORD_SET); if (gSaveBlock1Ptr->registeredItem != ITEM_NONE) { if (CheckBagHasItem(gSaveBlock1Ptr->registeredItem, 1) == TRUE) diff --git a/src/main_menu.c b/src/main_menu.c index 748575ce34..601e66cb9d 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -583,10 +583,10 @@ static u32 InitMainMenu(bool8 returningFromOptionsMenu) BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_WHITEALPHA); // fade to white ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sMainMenuBgTemplates, ARRAY_COUNT(sMainMenuBgTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); InitWindows(sWindowTemplates_MainMenu); DeactivateAllTextPrinters(); LoadMainMenuWindowFrameTiles(0, MAIN_MENU_BORDER_TILE); @@ -861,8 +861,8 @@ static void Task_DisplayMainMenu(u8 taskId) gTasks[tScrollArrowTaskId].func = Task_ScrollIndicatorArrowPairOnMainMenu; if (sCurrItemAndOptionMenuCheck == 4) { - ChangeBgY(0, 0x2000, 1); - ChangeBgY(1, 0x2000, 1); + ChangeBgY(0, 0x2000, BG_COORD_ADD); + ChangeBgY(1, 0x2000, BG_COORD_ADD); tIsScrolled = TRUE; gTasks[tScrollArrowTaskId].tArrowTaskIsScrolled = TRUE; } @@ -901,8 +901,8 @@ static bool8 HandleMainMenuInput(u8 taskId) { if (tMenuType == HAS_MYSTERY_EVENTS && tIsScrolled == TRUE && tCurrItem == 1) { - ChangeBgY(0, 0x2000, 2); - ChangeBgY(1, 0x2000, 2); + ChangeBgY(0, 0x2000, BG_COORD_SUB); + ChangeBgY(1, 0x2000, BG_COORD_SUB); gTasks[tScrollArrowTaskId].tArrowTaskIsScrolled = tIsScrolled = FALSE; } tCurrItem--; @@ -913,8 +913,8 @@ static bool8 HandleMainMenuInput(u8 taskId) { if (tMenuType == HAS_MYSTERY_EVENTS && tCurrItem == 3 && tIsScrolled == FALSE) { - ChangeBgY(0, 0x2000, 1); - ChangeBgY(1, 0x2000, 1); + ChangeBgY(0, 0x2000, BG_COORD_ADD); + ChangeBgY(1, 0x2000, BG_COORD_ADD); gTasks[tScrollArrowTaskId].tArrowTaskIsScrolled = tIsScrolled = TRUE; } tCurrItem++; @@ -1048,8 +1048,8 @@ static void Task_HandleMainMenuAPressed(u8 taskId) } break; } - ChangeBgY(0, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); switch (action) { case ACTION_NEW_GAME: diff --git a/src/match_call.c b/src/match_call.c index b292ede31c..9e4659ee60 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1263,7 +1263,7 @@ static bool32 MatchCall_LoadGfx(u8 taskId) FillWindowPixelBuffer(tWindowId, PIXEL_FILL(8)); LoadPalette(sMatchCallWindow_Pal, 0xE0, sizeof(sMatchCallWindow_Pal)); LoadPalette(sPokenavIcon_Pal, 0xF0, sizeof(sPokenavIcon_Pal)); - ChangeBgY(0, -0x2000, 0); + ChangeBgY(0, -0x2000, BG_COORD_SET); return TRUE; } @@ -1297,9 +1297,9 @@ static bool32 MatchCall_ReadyIntro(u8 taskId) static bool32 MatchCall_SlideWindowIn(u8 taskId) { - if (ChangeBgY(0, 0x600, 1) >= 0) + if (ChangeBgY(0, 0x600, BG_COORD_ADD) >= 0) { - ChangeBgY(0, 0, 0); + ChangeBgY(0, 0, BG_COORD_SET); return TRUE; } @@ -1340,7 +1340,7 @@ static bool32 MatchCall_PrintMessage(u8 taskId) static bool32 MatchCall_SlideWindowOut(u8 taskId) { s16 *data = gTasks[taskId].data; - if (ChangeBgY(0, 0x600, 2) <= -0x2000) + if (ChangeBgY(0, 0x600, BG_COORD_SUB) <= -0x2000) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 14, 30, 6); DestroyTask(tIconTaskId); @@ -1357,7 +1357,7 @@ static bool32 MatchCall_EndCall(u8 taskId) u8 playerObjectId; if (!IsDma3ManagerBusyWithBgCopy() && !IsSEPlaying()) { - ChangeBgY(0, 0, 0); + ChangeBgY(0, 0, BG_COORD_SET); if (!sMatchCallState.triggeredFromScript) { LoadMessageBoxAndBorderGfx(); diff --git a/src/menu.c b/src/menu.c index 0e7c0c6e46..ddbc826869 100644 --- a/src/menu.c +++ b/src/menu.c @@ -153,8 +153,8 @@ void FreeAllOverworldWindowBuffers(void) void InitTextBoxGfxAndPrinters(void) { - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); DeactivateAllTextPrinters(); LoadMessageBoxAndBorderGfx(); } @@ -1922,14 +1922,14 @@ void AddValToTilemapBuffer(void *ptr, int delta, int width, int height, bool32 i void ResetBgPositions(void) { - ChangeBgX(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); } void sub_8199DF0(u32 bg, u8 a1, int a2, int a3) diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 3317555908..7670c69251 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -106,14 +106,14 @@ void ResetVramOamAndBgCntRegs(void) void ResetAllBgsCoordinates(void) { - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); } void SetVBlankHBlankCallbacksToNull(void) diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 7fc883ca18..9473b0f82e 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -536,8 +536,8 @@ static void InitMirageTowerShake(u8 taskId) case 1: sMirageTowerGfxBuffer = (u8 *)AllocZeroed(MIRAGE_TOWER_GFX_LENGTH); sMirageTowerTilemapBuffer = (u8 *)AllocZeroed(BG_SCREEN_SIZE); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); gTasks[taskId].tState++; break; case 2: diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index 4a314b076a..429922e58f 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -387,14 +387,14 @@ static bool32 HandleMysteryGiftOrEReaderSetup(s32 isEReader) ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sBGTemplates, ARRAY_COUNT(sBGTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); SetBgTilemapBuffer(3, Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(2, Alloc(BG_SCREEN_SIZE)); diff --git a/src/mystery_gift_view.c b/src/mystery_gift_view.c index cf3a019f53..3047a219e8 100644 --- a/src/mystery_gift_view.c +++ b/src/mystery_gift_view.c @@ -678,10 +678,10 @@ s32 WonderNews_Enter(void) case 1: if (UpdatePaletteFade()) return 0; - ChangeBgY(0, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH)); SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(26, 152)); SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ); @@ -753,7 +753,7 @@ s32 WonderNews_Exit(bool32 useCancel) case 1: if (UpdatePaletteFade()) return 0; - ChangeBgY(2, 0, 0); + ChangeBgY(2, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_WIN0H, 0); SetGpuReg(REG_OFFSET_WIN0V, 0); SetGpuReg(REG_OFFSET_WININ, 0); @@ -777,8 +777,8 @@ s32 WonderNews_Exit(bool32 useCancel) RemoveWindow(sWonderNewsData->windowIds[NEWS_WIN_TITLE]); break; case 4: - ChangeBgY(2, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); if (sWonderNewsData->arrowTaskId != TASK_NONE) { RemoveScrollIndicatorArrowPair(sWonderNewsData->arrowTaskId); diff --git a/src/naming_screen.c b/src/naming_screen.c index cd48242d07..dcd60259b7 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -516,14 +516,14 @@ static void NamingScreen_InitBGs(void) ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); InitStandardTextBoxWindows(); InitTextBoxGfxAndPrinters(); diff --git a/src/option_menu.c b/src/option_menu.c index f985e2c52a..e66bddd7f2 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -173,14 +173,14 @@ void CB2_InitOptionMenu(void) SetGpuReg(REG_OFFSET_DISPCNT, 0); ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sOptionMenuBgTemplates, ARRAY_COUNT(sOptionMenuBgTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); InitWindows(sOptionMenuWinTemplates); DeactivateAllTextPrinters(); SetGpuReg(REG_OFFSET_WIN0H, 0); diff --git a/src/overworld.c b/src/overworld.c index a8d9a4a833..776d30c754 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -2101,14 +2101,14 @@ static void InitOverworldGraphicsRegisters(void) ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(2); ScheduleBgCopyTilemapToVram(3); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_WIN0_ON | DISPCNT_WIN1_ON | DISPCNT_OBJ_1D_MAP | DISPCNT_HBLANK_INTERVAL); ShowBg(0); diff --git a/src/party_menu.c b/src/party_menu.c index 30a8696086..202b57a529 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -6056,7 +6056,7 @@ static void Task_InitMultiPartnerPartySlideIn(u8 taskId) // The first slide step also sets the sprites offscreen gTasks[taskId].tXPos = 256; SlideMultiPartyMenuBoxSpritesOneStep(taskId); - ChangeBgX(2, 0x10000, 0); + ChangeBgX(2, 0x10000, BG_COORD_SET); gTasks[taskId].func = Task_MultiPartnerPartySlideIn; } @@ -6112,7 +6112,7 @@ static void SlideMultiPartyMenuBoxSpritesOneStep(u8 taskId) MoveMultiPartyMenuBoxSprite(sPartyMenuBoxes[i].statusSpriteId, tXPos - 8); } } - ChangeBgX(2, 0x800, 1); + ChangeBgX(2, 0x800, BG_COORD_ADD); } #undef tXpos diff --git a/src/pokedex_area_region_map.c b/src/pokedex_area_region_map.c index fce550bde0..2ec2c5c8d7 100644 --- a/src/pokedex_area_region_map.c +++ b/src/pokedex_area_region_map.c @@ -38,8 +38,8 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) AddValToTilemapBuffer(tilemap, template->offset, 64, 64, TRUE); // template->offset is always 0, so this does nothing. } - ChangeBgX(template->bg, 0, 0); - ChangeBgY(template->bg, 0, 0); + ChangeBgX(template->bg, 0, BG_COORD_SET); + ChangeBgY(template->bg, 0, BG_COORD_SET); SetBgAttribute(template->bg, BG_ATTR_PALETTEMODE, 1); CpuCopy32(sPokedexAreaMap_Pal, &gPlttBufferUnfaded[0x70], 0x60); *sPokedexAreaMapBgNum = template->bg; @@ -65,5 +65,5 @@ void FreePokedexAreaMapBgNum(void) void PokedexAreaMapChangeBgY(u32 a0) { - ChangeBgY(*sPokedexAreaMapBgNum, a0 * 0x100, 0); + ChangeBgY(*sPokedexAreaMapBgNum, a0 * 0x100, BG_COORD_SET); } diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 1b6e6a388a..e2973dcab3 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -319,7 +319,7 @@ static bool8 DrawAreaGlow(void) } return TRUE; case 4: - ChangeBgY(2, -0x800, 0); + ChangeBgY(2, -0x800, BG_COORD_SET); break; default: return FALSE; diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c index a01c06daab..4c9bfe15cb 100644 --- a/src/pokedex_cry_screen.c +++ b/src/pokedex_cry_screen.c @@ -443,7 +443,7 @@ static void ShiftWaveformOver(u8 windowId, s16 offset, bool8 rsVertical) if (!rsVertical) { u8 bg = GetWindowAttribute(windowId, WINDOW_BG); - ChangeBgX(bg, offset << 8, 0); + ChangeBgX(bg, offset << 8, BG_COORD_SET); } } diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index a6b4b6f424..c86682273a 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3732,7 +3732,7 @@ static void SetMonSpriteY(u32 id, s16 y) static void UpdateVineSwing(int vineState) { UpdateVineAnim(sPokemonJumpGfx, vineState); - ChangeBgY(BG_VENUSAUR, (sVenusaurStates[vineState] * 5) << 13, 0); + ChangeBgY(BG_VENUSAUR, (sVenusaurStates[vineState] * 5) << 13, BG_COORD_SET); } static int DoSameJumpTimeBonus(u8 flags) @@ -3896,8 +3896,8 @@ static void DrawPlayerNameWindows(void) static void ShowBonus(u8 bonusId) { sPokemonJumpGfx->bonusTimer = 0; - ChangeBgX(BG_BONUSES, (bonusId / 2) * 256 * 256, 0); - ChangeBgY(BG_BONUSES, (((bonusId % 2) * 256) - 40) * 256, 0); + ChangeBgX(BG_BONUSES, (bonusId / 2) * 256 * 256, BG_COORD_SET); + ChangeBgY(BG_BONUSES, (((bonusId % 2) * 256) - 40) * 256, BG_COORD_SET); ShowBg(BG_BONUSES); CreateTask(Task_UpdateBonus, 4); } @@ -3910,7 +3910,7 @@ static bool32 UpdateBonus(void) } else { - ChangeBgY(BG_BONUSES, 128, 1); + ChangeBgY(BG_BONUSES, 128, BG_COORD_ADD); if (++sPokemonJumpGfx->bonusTimer >= 32) HideBg(BG_BONUSES); return TRUE; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 01133251b7..f18dc68d13 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -3827,8 +3827,8 @@ static void SetScrollingBackground(void) static void ScrollBackground(void) { - ChangeBgX(3, 128, 1); - ChangeBgY(3, 128, 2); + ChangeBgX(3, 128, BG_COORD_ADD); + ChangeBgY(3, 128, BG_COORD_SUB); } static void LoadPokeStorageMenuGfx(void) @@ -8184,8 +8184,8 @@ static bool8 MultiMove_Start(void) GetCursorBoxColumnAndRow(&sMultiMove->fromColumn, &sMultiMove->fromRow); sMultiMove->toColumn = sMultiMove->fromColumn; sMultiMove->toRow = sMultiMove->fromRow; - ChangeBgX(0, -1024, 0); - ChangeBgY(0, -1024, 0); + ChangeBgX(0, -1024, BG_COORD_SET); + ChangeBgY(0, -1024, BG_COORD_SET); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); FillWindowPixelBuffer8Bit(sStorage->multiMoveWindowId, PIXEL_FILL(0)); MultiMove_SetIconToBg(sMultiMove->fromColumn, sMultiMove->fromRow); @@ -8499,8 +8499,8 @@ static u8 MultiMove_UpdateMove(void) { if (sMultiMove->bgMoveSteps != 0) { - ChangeBgX(0, sMultiMove->bgX, 1); - ChangeBgY(0, sMultiMove->bgY, 1); + ChangeBgX(0, sMultiMove->bgX, BG_COORD_ADD); + ChangeBgY(0, sMultiMove->bgY, BG_COORD_ADD); sMultiMove->bgMoveSteps--; } @@ -8605,8 +8605,8 @@ static void MultiMove_SetPlacedMonData(void) static void MultiMove_ResetBg(void) { - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); SetBgAttribute(0, BG_ATTR_PALETTEMODE, 0); ClearGpuRegBits(REG_OFFSET_BG0CNT, BGCNT_256COLOR); FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index c83ce727f6..6567cc4caf 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1462,7 +1462,7 @@ static void SetDefaultTilemaps(void) TilemapFiveMovesDisplay(sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_CONTEST_MOVES][0], 1, FALSE); SetBgTilemapBuffer(1, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_CONTEST_MOVES][0]); SetBgTilemapBuffer(2, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_BATTLE_MOVES][0]); - ChangeBgX(2, 0x10000, 1); + ChangeBgX(2, 0x10000, BG_COORD_ADD); ClearWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES); ClearWindowTilemap(PSS_LABEL_WINDOW_POKEMON_SKILLS_STATUS); } @@ -1778,12 +1778,12 @@ static void PssScrollRight(u8 taskId) // Scroll right SetBgAttribute(1, BG_ATTR_PRIORITY, 2); ScheduleBgCopyTilemapToVram(2); } - ChangeBgX(data[1], 0, 0); + ChangeBgX(data[1], 0, BG_COORD_SET); SetBgTilemapBuffer(data[1], sMonSummaryScreen->bgTilemapBuffers[sMonSummaryScreen->currPageIndex][0]); ShowBg(1); ShowBg(2); } - ChangeBgX(data[1], 0x2000, 1); + ChangeBgX(data[1], 0x2000, BG_COORD_ADD); data[0] += 32; if (data[0] > 0xFF) gTasks[taskId].func = PssScrollRightEnd; @@ -1811,9 +1811,9 @@ static void PssScrollLeft(u8 taskId) // Scroll left data[1] = 2; else data[1] = 1; - ChangeBgX(data[1], 0x10000, 0); + ChangeBgX(data[1], 0x10000, BG_COORD_SET); } - ChangeBgX(data[1], 0x2000, 2); + ChangeBgX(data[1], 0x2000, BG_COORD_SUB); data[0] += 32; if (data[0] > 0xFF) gTasks[taskId].func = PssScrollLeftEnd; @@ -1837,7 +1837,7 @@ static void PssScrollLeftEnd(u8 taskId) // display left if (sMonSummaryScreen->currPageIndex > 1) { SetBgTilemapBuffer(data[1], sMonSummaryScreen->bgTilemapBuffers[sMonSummaryScreen->currPageIndex - 1][0]); - ChangeBgX(data[1], 0x10000, 0); + ChangeBgX(data[1], 0x10000, BG_COORD_SET); } ShowBg(1); ShowBg(2); @@ -2681,9 +2681,9 @@ static void DrawContestMoveHearts(u16 move) static void LimitEggSummaryPageDisplay(void) // If the pokemon is an egg, limit the number of pages displayed to 1 { if (sMonSummaryScreen->summary.isEgg) - ChangeBgX(3, 0x10000, 0); + ChangeBgX(3, 0x10000, BG_COORD_SET); else - ChangeBgX(3, 0, 0); + ChangeBgX(3, 0, BG_COORD_SET); } static void ResetWindows(void) diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index 4862fdc6f6..9fc7d33a15 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -199,12 +199,12 @@ u32 LoopedTask_OpenPartyConditionGraph(s32 state) return LT_INC_AND_PAUSE; case 1: InitBgTemplates(sPartyConditionBgTemplates, ARRAY_COUNT(sPartyConditionBgTemplates)); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_WIN1_ON | DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | DISPCNT_BG3_ON); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG2 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG3); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(11, 4)); diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 6ce819c04e..1172774d79 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -448,8 +448,8 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state) case 4: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); ShowBg(1); ShowBg(2); HideBg(3); diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index 5936ef9d21..714c8221a3 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -421,9 +421,9 @@ static u32 LoopedTask_SlideMenuHeaderUp(s32 a0) case 0: return LT_INC_AND_PAUSE; case 2: - if (ChangeBgY(0, 384, 1) >= 0x2000u) + if (ChangeBgY(0, 384, BG_COORD_ADD) >= 0x2000u) { - ChangeBgY(0, 0x2000, 0); + ChangeBgY(0, 0x2000, BG_COORD_SET); return LT_FINISH; } @@ -433,9 +433,9 @@ static u32 LoopedTask_SlideMenuHeaderUp(s32 a0) static u32 LoopedTask_SlideMenuHeaderDown(s32 a0) { - if (ChangeBgY(0, 384, 2) <= 0) + if (ChangeBgY(0, 384, BG_COORD_SUB) <= 0) { - ChangeBgY(0, 0, 0); + ChangeBgY(0, 0, BG_COORD_SET); return LT_FINISH; } return LT_PAUSE; diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 5af60a001d..3bfacfede4 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -322,8 +322,8 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState) { case 0: InitBgTemplates(sMatchCallBgTemplates, ARRAY_COUNT(sMatchCallBgTemplates)); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); DecompressAndCopyTileDataToVram(2, sMatchCallUI_Gfx, 0, 0, 0); SetBgTilemapBuffer(2, state->unk1024); CopyToBgTilemapBuffer(2, sMatchCallUI_Tilemap, 0, 0); @@ -367,8 +367,8 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState) PrintMatchCallLocation(state, 0); return LT_INC_AND_PAUSE; case 6: - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); ShowBg(2); ShowBg(3); ShowBg(1); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 9e0ae89f18..5f95f24935 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -174,9 +174,9 @@ void sub_81C82E4(struct PokenavSub17 *matchCall) sub_8199DF0(matchCall->list.listWindow.bg, PIXEL_FILL(4), matchCall->list.listWindow.unk6 + 1, 1); SetBgTilemapBuffer(matchCall->list.listWindow.bg, matchCall->tilemapBuffer); FillBgTilemapBufferRect_Palette0(matchCall->list.listWindow.bg, tileNum, 0, 0, 32, 32); - ChangeBgY(matchCall->list.listWindow.bg, 0, 0); - ChangeBgX(matchCall->list.listWindow.bg, 0, 0); - ChangeBgY(matchCall->list.listWindow.bg, matchCall->list.listWindow.unk3 << 11, 2); + ChangeBgY(matchCall->list.listWindow.bg, 0, BG_COORD_SET); + ChangeBgX(matchCall->list.listWindow.bg, 0, BG_COORD_SET); + ChangeBgY(matchCall->list.listWindow.bg, matchCall->list.listWindow.unk3 << 11, BG_COORD_SUB); CopyBgTilemapBufferToVram(matchCall->list.listWindow.bg); } @@ -296,9 +296,9 @@ void sub_81C8568(s32 a0, struct PokenavSub17Substruct *list) list->unk20 = GetBgY(list->listWindow.bg); list->unk24 = list->unk20 + (a0 << 12); if (a0 > 0) - list->unk30 = 1; + list->unk30 = BG_COORD_ADD; else - list->unk30 = 2; + list->unk30 = BG_COORD_SUB; list->unk2C = a0; list->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C85A0, 6); } @@ -320,12 +320,12 @@ u32 LoopedTask_sub_81C85A0(s32 state) flag = FALSE; y = GetBgY(subPtr->listWindow.bg); v1 = ChangeBgY(subPtr->listWindow.bg, 0x1000, subPtr->unk30); - if (subPtr->unk30 == 2) + if (subPtr->unk30 == BG_COORD_SUB) { if ((y > subPtr->unk24 || y <= subPtr->unk20) && v1 <= subPtr->unk24) flag = TRUE; } - else + else // BG_COORD_ADD { if ((y < subPtr->unk24 || y >= subPtr->unk20) && v1 >= subPtr->unk24) flag = TRUE; @@ -334,7 +334,7 @@ u32 LoopedTask_sub_81C85A0(s32 state) if (flag) { subPtr->listWindow.unkA = (subPtr->listWindow.unkA + subPtr->unk2C) & 0xF; - ChangeBgY(subPtr->listWindow.bg, subPtr->unk24, 0); + ChangeBgY(subPtr->listWindow.bg, subPtr->unk24, BG_COORD_SET); return LT_FINISH; } return LT_PAUSE; diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index 10b6703da3..bcfe94cb7a 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -415,12 +415,12 @@ static u32 LoopedTask_OpenMenu(s32 state) CopyToBgTilemapBuffer(1, gPokenavMessageBox_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); CopyPaletteIntoBufferUnfaded(gPokenavMessageBox_Pal, 0x10, 0x20); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); return LT_INC_AND_PAUSE; case 1: if (FreeTempTileDataBuffersIfPossible()) @@ -1168,7 +1168,7 @@ static void DestroyMovingDotsBgTask(void) static void Task_MoveBgDots(u8 taskId) { - ChangeBgX(3, 0x80, 1); + ChangeBgX(3, 0x80, BG_COORD_ADD); } static void CreateBgDotPurplePalTask(void) diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 78c60a09c0..c117dce3bd 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -515,11 +515,11 @@ static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *state) CopyPaletteIntoBufferUnfaded(sMapSecInfoWindow_Pal, 0x10, 0x20); CopyPaletteIntoBufferUnfaded(gRegionMapCityZoomTiles_Pal, 0x30, 0x20); if (!IsRegionMapZoomed()) - ChangeBgY(1, -0x6000, 0); + ChangeBgY(1, -0x6000, BG_COORD_SET); else - ChangeBgY(1, 0, 0); + ChangeBgY(1, 0, BG_COORD_SET); - ChangeBgX(1, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); } static bool32 TryFreeTempTileDataBuffers(void) @@ -587,9 +587,9 @@ static void Task_ChangeBgYForZoom(u8 taskId) { if (gTasks[taskId].tZoomIn) { - if (ChangeBgY(1, 0x480, 1) >= 0) + if (ChangeBgY(1, 0x480, BG_COORD_ADD) >= 0) { - ChangeBgY(1, 0, 0); + ChangeBgY(1, 0, BG_COORD_SET); DestroyTask(taskId); } @@ -597,9 +597,9 @@ static void Task_ChangeBgYForZoom(u8 taskId) } else { - if (ChangeBgY(1, 0x480, 2) <= -0x6000) + if (ChangeBgY(1, 0x480, BG_COORD_SUB) <= -0x6000) { - ChangeBgY(1, -0x6000, 0); + ChangeBgY(1, -0x6000, BG_COORD_SET); DestroyTask(taskId); } diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c index 464e0b55cb..862128967c 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_1.c @@ -439,8 +439,8 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state) return LT_PAUSE; if (!UpdateMonListBgs()) return LT_PAUSE; - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); ShowBg(1); return LT_INC_AND_PAUSE; case 2: diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index bf1c156e58..361ec950d9 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -631,10 +631,10 @@ static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state) if (!IsDma3ManagerBusyWithBgCopy()) { CreateBigRibbonSprite(structPtr); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); ShowBg(1); ShowBg(2); HideBg(3); diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c index 642fe6233b..51498fa1d6 100644 --- a/src/rayquaza_scene.c +++ b/src/rayquaza_scene.c @@ -1757,8 +1757,8 @@ static void DuoFight_LightningLong(void) static void DuoFight_AnimateRain(void) { - ChangeBgX(2, 0x400, 1); - ChangeBgY(2, 0x800, 2); + ChangeBgX(2, 0x400, BG_COORD_ADD); + ChangeBgY(2, 0x800, BG_COORD_SUB); } // Only used by the full version, which pans up at the end (so scene objects move down) @@ -1772,7 +1772,7 @@ static void DuoFight_PanOffScene(u8 taskId) bgY = GetBgY(1); if (GetBgY(1) == 0 || bgY > 0x8000) - ChangeBgY(1, 0x400, 2); + ChangeBgY(1, 0x400, BG_COORD_SUB); if (tTimer != 16) { @@ -1795,7 +1795,7 @@ static void Task_DuoFightEnd(u8 taskId) if (!gPaletteFade.active) { DestroyTask(tHelperTaskId); - ChangeBgY(1, 0, 0); + ChangeBgY(1, 0, BG_COORD_SET); SetVBlankCallback(NULL); ScanlineEffect_Stop(); ResetSpriteData(); @@ -2579,8 +2579,8 @@ static void Task_RayCharges_ShakeRayquaza(u8 taskId) s16 *data = gTasks[taskId].data; if ((tTimer & 3) == 0) { - ChangeBgX(1, (Random() % 8 - 4) << 8, 0); - ChangeBgY(1, (Random() % 8 - 4) << 8, 0); + ChangeBgX(1, (Random() % 8 - 4) << 8, BG_COORD_SET); + ChangeBgY(1, (Random() % 8 - 4) << 8, BG_COORD_SET); } tTimer++; @@ -2592,16 +2592,16 @@ static void Task_RayCharges_FlyOffscreen(u8 taskId) s16 *data = gTasks[taskId].data; if (tState == 0) { - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); tState++; tOffset = 10; tShakeDir = -1; } else if (tState == 1) { - ChangeBgX(1, tOffset << 8, 2); - ChangeBgY(1, tOffset << 8, 1); + ChangeBgX(1, tOffset << 8, BG_COORD_SUB); + ChangeBgY(1, tOffset << 8, BG_COORD_ADD); tOffset += tShakeDir; if (tOffset == -10) tShakeDir *= -1; @@ -2616,12 +2616,12 @@ static void Task_RayCharges_FlyOffscreen(u8 taskId) static void RayCharges_AnimateBg(void) { // Update yellow orbs - ChangeBgX(2, 0x400, 2); - ChangeBgY(2, 0x400, 1); + ChangeBgX(2, 0x400, BG_COORD_SUB); + ChangeBgY(2, 0x400, BG_COORD_ADD); // Update blue streaks - ChangeBgX(0, 0x800, 2); - ChangeBgY(0, 0x800, 1); + ChangeBgX(0, 0x800, BG_COORD_SUB); + ChangeBgY(0, 0x800, BG_COORD_ADD); } static void Task_RayChargesEnd(u8 taskId) diff --git a/src/starter_choose.c b/src/starter_choose.c index 942f602730..403964684f 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -389,14 +389,14 @@ void CB2_ChooseStarter(void) SetGpuReg(REG_OFFSET_BG1CNT, 0); SetGpuReg(REG_OFFSET_BG0CNT, 0); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); DmaFill16(3, 0, VRAM, VRAM_SIZE); DmaFill32(3, 0, OAM, OAM_SIZE); diff --git a/src/trade.c b/src/trade.c index 88bef1ea01..4089cf1dfd 100644 --- a/src/trade.c +++ b/src/trade.c @@ -2907,8 +2907,8 @@ static void InitTradeBgInternal(void) SetGpuReg(REG_OFFSET_DISPCNT, 0); ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sTradeSequenceBgTemplates, ARRAY_COUNT(sTradeSequenceBgTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); SetBgTilemapBuffer(0, Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(1, Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(3, Alloc(BG_SCREEN_SIZE)); diff --git a/src/trainer_card.c b/src/trainer_card.c index 8f3b61a356..02c7056314 100755 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -884,14 +884,14 @@ static void InitBgsAndWindows(void) { ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, sTrainerCardBgTemplates, ARRAY_COUNT(sTrainerCardBgTemplates)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); InitWindows(sTrainerCardWindowTemplates); DeactivateAllTextPrinters(); LoadMessageBoxAndBorderGfx(); diff --git a/src/union_room_chat.c b/src/union_room_chat.c index c6fe7413e1..34aef1a887 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -2803,7 +2803,7 @@ static void AddStdMessageWindow(int msgId, u16 bg0vofs) str = sDisplayStdMessages[msgId].text; } - ChangeBgY(0, bg0vofs * 256, 0); + ChangeBgY(0, bg0vofs * 256, BG_COORD_SET); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); PutWindowTilemap(windowId); if (sDisplayStdMessages[msgId].boxType == 1) @@ -2846,7 +2846,7 @@ static void HideStdMessageWindow(void) ClearWindowTilemap(sDisplay->messageWindowId); } - ChangeBgY(0, 0, 0); + ChangeBgY(0, 0, BG_COORD_SET); } static void DestroyStdMessageWindow(void) @@ -3011,14 +3011,14 @@ static void PrintChatMessage(u16 row, u8 *str, u8 colorIdx) static void ResetGpuBgState(void) { - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); ShowBg(0); ShowBg(1); ShowBg(2); diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index e67ade342c..9f8918ba2d 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -1316,14 +1316,14 @@ static bool8 LoadUsePokeblockMenuGfx(void) switch (sMenu->info.helperState) { case 0: - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 136 << 6, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 136 << 6, BG_COORD_SET); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON | DISPCNT_WIN0_ON | DISPCNT_WIN1_ON); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG2 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG1); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(11, 4)); diff --git a/src/wallclock.c b/src/wallclock.c index 407c89c49a..759b1d11ff 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -628,14 +628,14 @@ static void LoadWallClockGraphics(void) SetGpuReg(REG_OFFSET_BG2CNT, 0); SetGpuReg(REG_OFFSET_BG1CNT, 0); SetGpuReg(REG_OFFSET_BG0CNT, 0); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); - ChangeBgX(2, 0, 0); - ChangeBgY(2, 0, 0); - ChangeBgX(3, 0, 0); - ChangeBgY(3, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); + ChangeBgX(2, 0, BG_COORD_SET); + ChangeBgY(2, 0, BG_COORD_SET); + ChangeBgX(3, 0, BG_COORD_SET); + ChangeBgY(3, 0, BG_COORD_SET); DmaFillLarge16(3, 0, (void *)VRAM, VRAM_SIZE, 0x1000); DmaClear32(3, (void *)OAM, OAM_SIZE); DmaClear16(3, (void *)PLTT, PLTT_SIZE); diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index a12a8920c1..ffb86488aa 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -189,10 +189,10 @@ static void CB2_InitWirelessCommunicationScreen(void) sStatusScreen->taskId = CreateTask(Task_WirelessCommunicationScreen, 0); sStatusScreen->rfuTaskId = CreateTask_ListenToWireless(); sStatusScreen->prevGroupCounts[GROUPTYPE_TOTAL] = 1; - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); LoadPalette(sBgTiles_Pal, 0x00, 0x20); Menu_LoadStdPalAt(0xF0); DynamicPlaceholderTextUtil_Reset(); From 17b657d83a29919253675b06c12a9ea5471385b2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 3 Nov 2021 23:20:59 -0400 Subject: [PATCH 138/417] Finish menu documentation --- graphics/interface/855C604.pal | 19 --- graphics/interface/855C624.bin | 1 - .../interface/{860F074.pal => std_menu.pal} | 0 graphics/slot_machine/85A8524.pal | 19 --- include/menu.h | 12 +- src/battle_pyramid_bag.c | 10 +- src/field_player_avatar.c | 2 +- src/field_screen_effect.c | 4 +- src/item_menu.c | 10 +- src/menu.c | 121 ++++++++---------- src/player_pc.c | 2 +- src/pokeblock.c | 2 +- src/pokenav_conditions_2.c | 4 +- src/pokenav_match_call_2.c | 2 +- src/pokenav_match_call_ui.c | 4 +- src/pokenav_region_map.c | 4 +- src/pokenav_ribbons_2.c | 2 +- src/script_menu.c | 4 +- src/start_menu.c | 2 +- 19 files changed, 88 insertions(+), 136 deletions(-) delete mode 100644 graphics/interface/855C604.pal delete mode 100644 graphics/interface/855C624.bin rename graphics/interface/{860F074.pal => std_menu.pal} (100%) delete mode 100644 graphics/slot_machine/85A8524.pal diff --git a/graphics/interface/855C604.pal b/graphics/interface/855C604.pal deleted file mode 100644 index e7d6c330ae..0000000000 --- a/graphics/interface/855C604.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -255 180 82 -197 123 0 -255 139 131 -255 49 24 -74 74 74 -213 213 205 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/interface/855C624.bin b/graphics/interface/855C624.bin deleted file mode 100644 index 6f48b39f69..0000000000 --- a/graphics/interface/855C624.bin +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/graphics/interface/860F074.pal b/graphics/interface/std_menu.pal similarity index 100% rename from graphics/interface/860F074.pal rename to graphics/interface/std_menu.pal diff --git a/graphics/slot_machine/85A8524.pal b/graphics/slot_machine/85A8524.pal deleted file mode 100644 index b93d15ddc3..0000000000 --- a/graphics/slot_machine/85A8524.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -0 0 0 -65 65 65 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/include/menu.h b/include/menu.h index 7ecb04e53e..69000d4089 100644 --- a/include/menu.h +++ b/include/menu.h @@ -59,7 +59,7 @@ u32 GetPlayerTextSpeed(void); u8 GetPlayerTextSpeedDelay(void); void Menu_LoadStdPalAt(u16 arg0); void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16)); -void sub_8199DF0(u32 bg, u8 a1, int a2, int a3); +void BgDmaFill(u32 bg, u8 a1, int a2, int a3); void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str); void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram); void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock); @@ -83,15 +83,15 @@ void DoScheduledBgTilemapCopiesToVram(void); void ClearScheduledBgCopiesToVram(void); void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str); void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 a2, u8 a3); -void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds); +void PrintMenuActionTextsInUpperLeftCorner(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds); void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram); void *malloc_and_decompress(const void *src, u32 *sizeOut); u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode); void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress); -void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a8); +void PrintMenuActionTexts(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a8); void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *strs, const u8 *a8); u8 InitMenuActionGrid(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos); -u8 ChangeListMenuCursorPosition(s8 deltaX, s8 deltaY); +u8 ChangeMenuGridCursorPosition(s8 deltaX, s8 deltaY); u8 GetStartMenuWindowId(void); void ListMenuLoadStdPalAt(u8, u8); u8 Menu_MoveCursor(s8 cursorDelta); @@ -99,7 +99,7 @@ u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta); void DrawStdWindowFrame(u8 windowId, bool8 CopyToVram); u8 AddStartMenuWindow(u8 numActions); u8 InitMenuNormal(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos); -void sub_819786C(u8 windowId, bool8 copyToVram); +void LoadMessageBoxAndFrameGfx(u8 windowId, bool8 copyToVram); void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress); void RemoveStartMenuWindow(void); void DisplayYesNoMenuWithDefault(u8 initialCursorPos); @@ -112,7 +112,7 @@ void SetBgTilemapPalette(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palet void AddValToTilemapBuffer(void *ptr, int delta, int width, int height, bool32 is8BPP); void EraseFieldMessageBox(bool8 copyToVram); void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *strs); -s8 Menu_ProcessInputGridLayout(void); +s8 Menu_ProcessGridInput(void); u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, bool8 APressMuted); s8 Menu_ProcessInputNoWrapAround_other(void); void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height); diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index e18a292950..9e17817e00 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -978,7 +978,7 @@ static void OpenContextMenu(u8 taskId) static void PrintMenuActionText_SingleRow(u8 windowId) { - AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 0x10, gPyramidBagMenu->menuActionsCount, sMenuActions, gPyramidBagMenu->menuActionIds); + PrintMenuActionTexts(windowId, FONT_NARROW, 8, 1, 0, 0x10, gPyramidBagMenu->menuActionsCount, sMenuActions, gPyramidBagMenu->menuActionIds); InitMenuInUpperLeftCornerNormal(windowId, gPyramidBagMenu->menuActionsCount, 0); } @@ -1020,7 +1020,7 @@ static void HandleMenuActionInput_2x2(u8 taskId) if (id > 0 && IsValidMenuAction(id - 2)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); } } else if (JOY_NEW(DPAD_DOWN)) @@ -1028,7 +1028,7 @@ static void HandleMenuActionInput_2x2(u8 taskId) if (id < gPyramidBagMenu->menuActionsCount - 2 && IsValidMenuAction(id + 2)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); } } else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) @@ -1036,7 +1036,7 @@ static void HandleMenuActionInput_2x2(u8 taskId) if (id & 1 && IsValidMenuAction(id - 1)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); } } else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) @@ -1044,7 +1044,7 @@ static void HandleMenuActionInput_2x2(u8 taskId) if (!(id & 1) && IsValidMenuAction(id + 1)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); } } else if (JOY_NEW(A_BUTTON)) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 06b5827568..f694628ff6 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1763,7 +1763,7 @@ static bool8 Fishing_InitDots(struct Task *task) { u32 randVal; - sub_819786C(0, TRUE); + LoadMessageBoxAndFrameGfx(0, TRUE); task->tStep++; task->tFrameCounter = 0; task->tNumDots = 0; diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index e573fe5ab9..c27ec6c4c3 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -1145,7 +1145,7 @@ static void Task_OrbEffect(u8 taskId) tState = 1; break; case 1: - sub_8199DF0(0, PIXEL_FILL(1), 0, 1); + BgDmaFill(0, PIXEL_FILL(1), 0, 1); LoadOrbEffectPalette(tBlueOrb); StartUpdateOrbFlashEffect(tCenterX, tCenterY, 1, 160, 1, 2); tState = 2; @@ -1190,7 +1190,7 @@ static void Task_OrbEffect(u8 taskId) if (UpdateOrbEffectBlend(tShakeDir) == TRUE) { tState = 5; - sub_8199DF0(0, PIXEL_FILL(0), 0, 1); + BgDmaFill(0, PIXEL_FILL(0), 0, 1); } } break; diff --git a/src/item_menu.c b/src/item_menu.c index 037567daa7..4a21c07903 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -1667,7 +1667,7 @@ static void OpenContextMenu(u8 taskId) static void PrintContextMenuItems(u8 windowId) { - AddItemMenuActionTextPrinters(windowId, FONT_NARROW, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr); + PrintMenuActionTexts(windowId, FONT_NARROW, 8, 1, 0, 16, gBagMenu->contextMenuNumItems, sItemMenuActions, gBagMenu->contextMenuItemsPtr); InitMenuInUpperLeftCornerNormal(windowId, gBagMenu->contextMenuNumItems, 0); } @@ -1720,7 +1720,7 @@ static void Task_ItemContext_MultipleRows(u8 taskId) if (cursorPos > 0 && IsValidContextMenuPos(cursorPos - 2)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); } } else if (JOY_NEW(DPAD_DOWN)) @@ -1728,7 +1728,7 @@ static void Task_ItemContext_MultipleRows(u8 taskId) if (cursorPos < (gBagMenu->contextMenuNumItems - 2) && IsValidContextMenuPos(cursorPos + 2)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); } } else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) @@ -1736,7 +1736,7 @@ static void Task_ItemContext_MultipleRows(u8 taskId) if ((cursorPos & 1) && IsValidContextMenuPos(cursorPos - 1)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); } } else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) @@ -1744,7 +1744,7 @@ static void Task_ItemContext_MultipleRows(u8 taskId) if (!(cursorPos & 1) && IsValidContextMenuPos(cursorPos + 1)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); } } else if (JOY_NEW(A_BUTTON)) diff --git a/src/menu.c b/src/menu.c index ddbc826869..6b915f9cec 100644 --- a/src/menu.c +++ b/src/menu.c @@ -71,7 +71,7 @@ static EWRAM_DATA bool8 sScheduledBgCopiesToVram[4] = {FALSE}; static EWRAM_DATA u16 sTempTileDataBufferIdx = 0; static EWRAM_DATA void *sTempTileDataBuffer[0x20] = {NULL}; -const u16 gStandardMenuPalette[] = INCBIN_U16("graphics/interface/860F074.gbapal"); +const u16 gStandardMenuPalette[] = INCBIN_U16("graphics/interface/std_menu.gbapal"); static const u8 sTextSpeedFrameDelays[] = { @@ -425,7 +425,7 @@ void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram) DrawStdFrameWithCustomTileAndPalette(windowId, copyToVram, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM); } -void sub_819786C(u8 windowId, bool8 copyToVram) +void LoadMessageBoxAndFrameGfx(u8 windowId, bool8 copyToVram) { LoadMessageBoxGfx(windowId, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10); DrawDialogFrameWithCustomTileAndPalette(windowId, copyToVram, DLG_WINDOW_BASE_TILE_NUM, 0xF); @@ -1128,7 +1128,7 @@ static void PrintMenuActionTextsAtTop(u8 windowId, u8 fontId, u8 lineHeight, u8 PrintMenuActionTextsAtPos(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, lineHeight, itemCount, menuActions); } -void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) +void PrintMenuActionTexts(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) { u8 i; struct TextPrinterTemplate printer; @@ -1156,9 +1156,9 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l } // Unused -static void AddItemMenuActionTextPrintersAtTop(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) +static void PrintMenuActionTextsAtTopById(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) { - AddItemMenuActionTextPrinters(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, GetFontAttribute(fontId, FONTATTR_LETTER_SPACING), lineHeight, itemCount, menuActions, actionIds); + PrintMenuActionTexts(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, GetFontAttribute(fontId, FONTATTR_LETTER_SPACING), lineHeight, itemCount, menuActions, actionIds); } void SetWindowTemplateFields(struct WindowTemplate *template, u8 bg, u8 left, u8 top, u8 width, u8 height, u8 paletteNum, u16 baseBlock) @@ -1232,22 +1232,22 @@ void EraseYesNoWindow(void) RemoveWindow(sYesNoWindowId); } -static void sub_8198C94(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 a5, u8 a6, u8 a7, const struct MenuAction *menuActions) +static void PrintMenuActionGridText(u8 windowId, u8 fontId, u8 left, u8 top, u8 width, u8 height, u8 columns, u8 rows, const struct MenuAction *menuActions) { u8 i; u8 j; - for (i = 0; i < a7; i++) + for (i = 0; i < rows; i++) { - for (j = 0; j < a6; j++) - AddTextPrinterParameterized(windowId, fontId, menuActions[(i * a6) + j].text, (a4 * j) + left, (a5 * i) + top, TEXT_SKIP_DRAW, NULL); + for (j = 0; j < columns; j++) + AddTextPrinterParameterized(windowId, fontId, menuActions[(i * columns) + j].text, (width * j) + left, (height * i) + top, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(windowId, COPYWIN_GFX); } // Unused -static void sub_8198D54(u8 windowId, u8 fontId, u8 a2, u8 a3, u8 a4, u8 a5, const struct MenuAction *menuActions) +static void PrintMenuActionGridTextAtTop(u8 windowId, u8 fontId, u8 a2, u8 a3, u8 a4, u8 a5, const struct MenuAction *menuActions) { - sub_8198C94(windowId, fontId, GetFontAttribute(fontId, 0), 0, a2, a3, a4, a5, menuActions); + PrintMenuActionGridText(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 0, a2, a3, a4, a5, menuActions); } void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth, u8 horizontalCount, u8 verticalCount, const struct MenuAction *menuActions, const u8 *actionIds) @@ -1287,7 +1287,7 @@ static void PrintMenuActionGrid_TopLeft(u8 windowId, u8 fontId, u8 optionWidth, PrintMenuActionGrid(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 0, optionWidth, horizontalCount, verticalCount, menuActions, actionIds); } -static u8 sub_8198F58(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth, u8 optionHeight, u8 columns, u8 rows, u8 numChoices, u8 cursorPos) +static u8 InitMenuGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth, u8 optionHeight, u8 columns, u8 rows, u8 numChoices, u8 cursorPos) { s32 pos; @@ -1310,42 +1310,34 @@ static u8 sub_8198F58(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth, u sMenu.cursorPos = pos; // Why call this when it's not gonna move? - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_NONE); return sMenu.cursorPos; } // Unused -static u8 sub_8198FD4(u8 windowId, u8 fontId, u8 left, u8 top, u8 width, u8 columns, u8 rows, u8 cursorPos) +static u8 InitMenuGridDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 width, u8 columns, u8 rows, u8 cursorPos) { u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1); u8 numChoices = columns * rows; - return sub_8198F58(windowId, fontId, left, top, width, cursorHeight, columns, rows, numChoices, cursorPos); + return InitMenuGrid(windowId, fontId, left, top, width, cursorHeight, columns, rows, numChoices, cursorPos); } -static void sub_8199060(u8 oldCursorPos, u8 newCursorPos) +// Erase cursor at old position, draw cursor at new position. +static void MoveMenuGridCursor(u8 oldCursorPos, u8 newCursorPos) { u8 cursorWidth = GetMenuCursorDimensionByFont(sMenu.fontId, 0); u8 cursorHeight = GetMenuCursorDimensionByFont(sMenu.fontId, 1); + u8 xPos = (oldCursorPos % sMenu.columns) * sMenu.optionWidth + sMenu.left; u8 yPos = (oldCursorPos / sMenu.columns) * sMenu.optionHeight + sMenu.top; - FillWindowPixelRect(sMenu.windowId, - PIXEL_FILL(1), - xPos, - yPos, - cursorWidth, - cursorHeight); + FillWindowPixelRect(sMenu.windowId, PIXEL_FILL(1), xPos, yPos, cursorWidth, cursorHeight); + xPos = (newCursorPos % sMenu.columns) * sMenu.optionWidth + sMenu.left; yPos = (newCursorPos / sMenu.columns) * sMenu.optionHeight + sMenu.top; - AddTextPrinterParameterized(sMenu.windowId, - sMenu.fontId, - gText_SelectorArrow3, - xPos, - yPos, - 0, - 0); + AddTextPrinterParameterized(sMenu.windowId, sMenu.fontId, gText_SelectorArrow3, xPos, yPos, 0, 0); } -u8 ChangeListMenuCursorPosition(s8 deltaX, s8 deltaY) +u8 ChangeMenuGridCursorPosition(s8 deltaX, s8 deltaY) { u8 oldPos = sMenu.cursorPos; @@ -1376,7 +1368,7 @@ u8 ChangeListMenuCursorPosition(s8 deltaX, s8 deltaY) } else { - sub_8199060(oldPos, sMenu.cursorPos); + MoveMenuGridCursor(oldPos, sMenu.cursorPos); return sMenu.cursorPos; } } @@ -1410,13 +1402,13 @@ u8 ChangeGridMenuCursorPosition(s8 deltaX, s8 deltaY) } else { - sub_8199060(oldPos, sMenu.cursorPos); + MoveMenuGridCursor(oldPos, sMenu.cursorPos); return sMenu.cursorPos; } } // Unused -static s8 sub_8199284(void) +static s8 Menu_ProcessGridInput_NoSoundLimit(void) { if (JOY_NEW(A_BUTTON)) { @@ -1430,32 +1422,32 @@ static s8 sub_8199284(void) else if (JOY_NEW(DPAD_UP)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); return MENU_NOTHING_CHOSEN; } else if (JOY_NEW(DPAD_DOWN)) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); return MENU_NOTHING_CHOSEN; } else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); return MENU_NOTHING_CHOSEN; } else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); return MENU_NOTHING_CHOSEN; } return MENU_NOTHING_CHOSEN; } -s8 Menu_ProcessInputGridLayout(void) +s8 Menu_ProcessGridInput(void) { u8 oldPos = sMenu.cursorPos; @@ -1497,7 +1489,7 @@ s8 Menu_ProcessInputGridLayout(void) } // Unused -static s8 sub_81993D8(void) +static s8 Menu_ProcessGridInputRepeat_NoSoundLimit(void) { if (JOY_NEW(A_BUTTON)) { @@ -1511,25 +1503,25 @@ static s8 sub_81993D8(void) else if (JOY_REPEAT(DPAD_ANY) == DPAD_UP) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); return MENU_NOTHING_CHOSEN; } else if (JOY_REPEAT(DPAD_ANY) == DPAD_DOWN) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); return MENU_NOTHING_CHOSEN; } else if (JOY_REPEAT(DPAD_ANY) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); return MENU_NOTHING_CHOSEN; } else if (JOY_REPEAT(DPAD_ANY) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) { PlaySE(SE_SELECT); - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); return MENU_NOTHING_CHOSEN; } @@ -1537,7 +1529,7 @@ static s8 sub_81993D8(void) } // Unused -static s8 sub_8199484(void) +static s8 Menu_ProcessGridInputRepeat(void) { u8 oldPos = sMenu.cursorPos; @@ -1617,7 +1609,7 @@ void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *menuActi CopyWindowToVram(windowId, COPYWIN_GFX); } -void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) +void PrintMenuActionTextsInUpperLeftCorner(u8 windowId, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds) { u8 i; struct TextPrinterTemplate printer; @@ -1682,7 +1674,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const } // Unused -static void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *menuActions, const u8 *actionIds) +static void PrintMenuActionGridTextNoSpacing(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *menuActions, const u8 *actionIds) { u8 i; u8 j; @@ -1697,12 +1689,12 @@ static void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const s printer.letterSpacing = 0; printer.lineSpacing = 0; - for (i = 0; i < itemCount2; i++) + for (i = 0; i < rows; i++) { - for (j = 0; j < itemCount; j++) + for (j = 0; j < columns; j++) { - printer.currentChar = menuActions[actionIds[(itemCount * i) + j]].text; - printer.x = (a4 * j) + 8; + printer.currentChar = menuActions[actionIds[(columns * i) + j]].text; + printer.x = (optionWidth * j) + 8; printer.y = (16 * i) + 1; printer.currentX = printer.x; printer.currentY = printer.y; @@ -1736,7 +1728,7 @@ u8 InitMenuActionGrid(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initi sMenu.cursorPos = pos; // Why call this when it's not gonna move? - ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_NONE); + ChangeMenuGridCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_NONE); return sMenu.cursorPos; } @@ -1932,11 +1924,11 @@ void ResetBgPositions(void) ChangeBgY(3, 0, BG_COORD_SET); } -void sub_8199DF0(u32 bg, u8 a1, int a2, int a3) +void BgDmaFill(u32 bg, u8 value, int offset, int size) { - int temp = (!GetBgAttribute(bg, BG_ATTR_PALETTEMODE)) ? 0x20 : 0x40; - void *addr = (void *)((GetBgAttribute(bg, BG_ATTR_CHARBASEINDEX) * 0x4000) + (GetBgAttribute(bg, BG_ATTR_BASETILE) + a2) * temp); - RequestDma3Fill(a1 << 24 | a1 << 16 | a1 << 8 | a1, addr + VRAM, a3 * temp, 1); + int temp = (!GetBgAttribute(bg, BG_ATTR_PALETTEMODE)) ? 32 : 64; + void *addr = (void *)((GetBgAttribute(bg, BG_ATTR_CHARBASEINDEX) * 0x4000) + (GetBgAttribute(bg, BG_ATTR_BASETILE) + offset) * temp); + RequestDma3Fill(value << 24 | value << 16 | value << 8 | value, VRAM + addr, size * temp, 1); } void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str) @@ -2014,8 +2006,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y) AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SKIP_DRAW, 0); } -// Unused. Similar to BlitBitmapRect4Bit. -static void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height) +static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height) { int loopSrcY, loopDstY, loopSrcX, loopDstX, xEnd, yEnd, multiplierSrcY, multiplierDstY; const u8 *pixelsSrc; @@ -2032,8 +2023,8 @@ static void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, else yEnd = srcY + height; - multiplierSrcY = (src->width + (src->width & 7)) >> 3; - multiplierDstY = (dst->width + (dst->width & 7)) >> 3; + multiplierSrcY = (src->width + (src->width % 8)) >> 3; + multiplierDstY = (dst->width + (dst->width % 8)) >> 3; for (loopSrcY = srcY, loopDstY = dstY; loopSrcY < yEnd; loopSrcY++, loopDstY++) { @@ -2042,14 +2033,14 @@ static void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, pixelsSrc = src->pixels + ((loopSrcX >> 1) & 3) + ((loopSrcX >> 3) << 5) + (((loopSrcY >> 3) * multiplierSrcY) << 5) + ((u32)(loopSrcY << 29) >> 27); pixelsDst = (void*) dst->pixels + ((loopDstX >> 1) & 3) + ((loopDstX >> 3) << 5) + ((( loopDstY >> 3) * multiplierDstY) << 5) + ((u32)(loopDstY << 29) >> 27); - if ((uintptr_t)pixelsDst & 0x1) + if ((uintptr_t)pixelsDst & 1) { pixelsDst--; - if (loopDstX & 0x1) + if (loopDstX & 1) { toOrr = *(vu16*)pixelsDst; toOrr &= 0x0fff; - if (loopSrcX & 0x1) + if (loopSrcX & 1) toOrr |= ((*pixelsSrc & 0xf0) << 8); else toOrr |= ((*pixelsSrc & 0x0f) << 12); @@ -2058,7 +2049,7 @@ static void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, { toOrr = *(vu16*)pixelsDst; toOrr &= 0xf0ff; - if (loopSrcX & 0x1) + if (loopSrcX & 1) toOrr |= ((*pixelsSrc & 0xf0) << 4); else toOrr |= ((*pixelsSrc & 0x0f) << 8); @@ -2091,13 +2082,13 @@ static void sub_819A080(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, } // Unused -static void sub_819A25C(u8 palOffset, u16 speciesId) +static void LoadMonIconPalAtOffset(u8 palOffset, u16 speciesId) { LoadPalette(GetValidMonIconPalettePtr(speciesId), palOffset, 0x20); } // Unused -static void sub_819A27C(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) +static void DrawMonIconAtPos(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y) { BlitBitmapToWindow(windowId, GetMonIconPtr(speciesId, personality, 1), x, y, 32, 32); } diff --git a/src/player_pc.c b/src/player_pc.c index 622c30ec02..06f58fdeb4 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -399,7 +399,7 @@ static void InitPlayerPCMenu(u8 taskId) windowTemplate.width = GetMaxWidthInSubsetOfMenuTable(sPlayerPCMenuActions, sTopMenuOptionOrder, sTopMenuNumOptions); tWindowId = AddWindow(&windowTemplate); SetStandardWindowBorderStyle(tWindowId, 0); - sub_81995E4(tWindowId, sTopMenuNumOptions, sPlayerPCMenuActions, sTopMenuOptionOrder); + PrintMenuActionTextsInUpperLeftCorner(tWindowId, sTopMenuNumOptions, sPlayerPCMenuActions, sTopMenuOptionOrder); InitMenuInUpperLeftCornerNormal(tWindowId, sTopMenuNumOptions, 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = PlayerPCProcessMenuInput; diff --git a/src/pokeblock.c b/src/pokeblock.c index e07ad018ee..3ea5938410 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -1149,7 +1149,7 @@ static void ShowPokeblockActionsWindow(u8 taskId) DestroyScrollArrows(); DrawStdFrameWithCustomTileAndPalette(tWindowId, 0, 1, 0xE); - sub_81995E4(tWindowId, sPokeblockMenu->numActions, sPokeblockMenuActions, sPokeblockMenu->pokeblockActionIds); + PrintMenuActionTextsInUpperLeftCorner(tWindowId, sPokeblockMenu->numActions, sPokeblockMenuActions, sPokeblockMenu->pokeblockActionIds); InitMenuInUpperLeftCornerNormal(tWindowId, sPokeblockMenu->numActions, 0); PutWindowTilemap(tWindowId); ScheduleBgCopyTilemapToVram(1); diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index 9fc7d33a15..4799b163c2 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -240,8 +240,8 @@ u32 LoopedTask_OpenPartyConditionGraph(s32 state) SetConditionGraphIOWindows(2); return LT_INC_AND_PAUSE; case 5: - sub_8199DF0(1, 0, 0, 1); - sub_8199DF0(1, 17, 1, 1); + BgDmaFill(1, 0, 0, 1); + BgDmaFill(1, 17, 1, 1); CpuFill32(0, structPtr->tilemapBuffers[1], BG_SCREEN_SIZE); SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]); return LT_INC_AND_PAUSE; diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 3bfacfede4..8f22209579 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -335,7 +335,7 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState) if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - sub_8199DF0(1, 0, 0, 1); + BgDmaFill(1, 0, 0, 1); SetBgTilemapBuffer(1, state->unk24); FillBgTilemapBufferRect_Palette0(1, 0x1000, 0, 0, 32, 20); CopyPaletteIntoBufferUnfaded(gUnknown_086226E0, 0x10, 0x20); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 5f95f24935..fd0af90e08 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -170,8 +170,8 @@ u32 LoopedTask_sub_81C8254(s32 state) void sub_81C82E4(struct PokenavSub17 *matchCall) { u16 tileNum = (matchCall->list.listWindow.unk1 << 12) | matchCall->list.listWindow.unk6; - sub_8199DF0(matchCall->list.listWindow.bg, PIXEL_FILL(1), matchCall->list.listWindow.unk6, 1); - sub_8199DF0(matchCall->list.listWindow.bg, PIXEL_FILL(4), matchCall->list.listWindow.unk6 + 1, 1); + BgDmaFill(matchCall->list.listWindow.bg, PIXEL_FILL(1), matchCall->list.listWindow.unk6, 1); + BgDmaFill(matchCall->list.listWindow.bg, PIXEL_FILL(4), matchCall->list.listWindow.unk6 + 1, 1); SetBgTilemapBuffer(matchCall->list.listWindow.bg, matchCall->tilemapBuffer); FillBgTilemapBufferRect_Palette0(matchCall->list.listWindow.bg, tileNum, 0, 0, 32, 32); ChangeBgY(matchCall->list.listWindow.bg, 0, BG_COORD_SET); diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index c117dce3bd..89bd2f7c75 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -501,8 +501,8 @@ static void FreeCityZoomViewGfx(void) static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *state) { - sub_8199DF0(1, PIXEL_FILL(0), 0x40, 1); - sub_8199DF0(1, PIXEL_FILL(1), 0x41, 1); + BgDmaFill(1, PIXEL_FILL(0), 0x40, 1); + BgDmaFill(1, PIXEL_FILL(1), 0x41, 1); CpuFill16(0x1040, state->tilemapBuffer, 0x800); SetBgTilemapBuffer(1, state->tilemapBuffer); state->infoWindowId = AddWindow(&sMapSecInfoWindowTemplate); diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index 361ec950d9..ef08ba3927 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -578,7 +578,7 @@ static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state) case 1: if (!FreeTempTileDataBuffersIfPossible()) { - sub_8199DF0(1, 0, 0, 1); + BgDmaFill(1, 0, 0, 1); DecompressAndCopyTileDataToVram(1, sRibbonIconsSmall_Gfx, 0, 1, 0); SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); diff --git a/src/script_menu.c b/src/script_menu.c index c82440b79a..ae0fe91e67 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -288,7 +288,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignore static void Task_HandleMultichoiceGridInput(u8 taskId) { s16 *data = gTasks[taskId].data; - s8 selection = Menu_ProcessInputGridLayout(); + s8 selection = Menu_ProcessGridInput(); switch (selection) { @@ -379,7 +379,7 @@ static void CreatePCMultichoice(void) void ScriptMenu_DisplayPCStartupPrompt(void) { - sub_819786C(0, TRUE); + LoadMessageBoxAndFrameGfx(0, TRUE); AddTextPrinterParameterized2(0, FONT_NORMAL, gText_WhichPCShouldBeAccessed, 0, NULL, 2, 1, 3); } diff --git a/src/start_menu.c b/src/start_menu.c index 05ceb11194..540073b7f1 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -876,7 +876,7 @@ void SaveGame(void) static void ShowSaveMessage(const u8 *message, u8 (*saveCallback)(void)) { StringExpandPlaceholders(gStringVar4, message); - sub_819786C(0, TRUE); + LoadMessageBoxAndFrameGfx(0, TRUE); AddTextPrinterForMessage_2(TRUE); sSavingComplete = TRUE; sSaveDialogCallback = saveCallback; From c6b83bbb215ad25f533346873286f103c582d906 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 4 Nov 2021 12:18:34 -0400 Subject: [PATCH 139/417] Fix merge --- src/pokenav_match_call_ui.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 2c981d07f8..47226ca729 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -755,6 +755,7 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok { FillWindowTilesByRow(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2); AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SKIP_DRAW, NULL); + CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, r6 * 2, list->listWindow.unk4, 2); } } From 0fe38819616372d8de160fbd2ab8c38c2a109540 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Fri, 5 Nov 2021 01:54:34 +0800 Subject: [PATCH 140/417] Rename WalkInPlaceFastest to WalkInPlaceFaster --- include/constants/event_object_movement.h | 8 ++-- include/event_object_movement.h | 2 +- .../movement_action_func_tables.h | 40 +++++++++---------- src/event_object_movement.c | 24 +++++------ src/field_effect.c | 2 +- src/field_player_avatar.c | 2 +- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/include/constants/event_object_movement.h b/include/constants/event_object_movement.h index 9611d008b1..2c42735248 100755 --- a/include/constants/event_object_movement.h +++ b/include/constants/event_object_movement.h @@ -121,10 +121,10 @@ #define MOVEMENT_ACTION_WALK_IN_PLACE_FAST_UP 0x22 #define MOVEMENT_ACTION_WALK_IN_PLACE_FAST_LEFT 0x23 #define MOVEMENT_ACTION_WALK_IN_PLACE_FAST_RIGHT 0x24 -#define MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_DOWN 0x25 -#define MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_UP 0x26 -#define MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_LEFT 0x27 -#define MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_RIGHT 0x28 +#define MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_DOWN 0x25 +#define MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_UP 0x26 +#define MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_LEFT 0x27 +#define MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_RIGHT 0x28 #define MOVEMENT_ACTION_RIDE_WATER_CURRENT_DOWN 0x29 #define MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP 0x2A #define MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT 0x2B diff --git a/include/event_object_movement.h b/include/event_object_movement.h index 9ed524e665..6ad4b55e4f 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -121,7 +121,7 @@ void InitObjectEventPalettes(u8 palSlot); void UpdateObjectEventCurrentMovement(struct ObjectEvent *, struct Sprite *, bool8(struct ObjectEvent *, struct Sprite *)); u8 ObjectEventFaceOppositeDirection(struct ObjectEvent *, u8); u8 GetOppositeDirection(u8); -u8 GetWalkInPlaceFastestMovementAction(u32); +u8 GetWalkInPlaceFasterMovementAction(u32); u8 GetWalkInPlaceFastMovementAction(u32); u8 GetWalkInPlaceNormalMovementAction(u32); u8 GetWalkInPlaceSlowMovementAction(u32); diff --git a/src/data/object_events/movement_action_func_tables.h b/src/data/object_events/movement_action_func_tables.h index aa55c31ef5..f601cf82b6 100755 --- a/src/data/object_events/movement_action_func_tables.h +++ b/src/data/object_events/movement_action_func_tables.h @@ -73,10 +73,10 @@ u8 MovementAction_WalkInPlaceFastDown_Step0(struct ObjectEvent *, struct Sprite u8 MovementAction_WalkInPlaceFastUp_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementAction_WalkInPlaceFastLeft_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementAction_WalkInPlaceFastRight_Step0(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkInPlaceFastestDown_Step0(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkInPlaceFastestUp_Step0(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkInPlaceFastestLeft_Step0(struct ObjectEvent *, struct Sprite *); -u8 MovementAction_WalkInPlaceFastestRight_Step0(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkInPlaceFasterDown_Step0(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkInPlaceFasterUp_Step0(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkInPlaceFasterLeft_Step0(struct ObjectEvent *, struct Sprite *); +u8 MovementAction_WalkInPlaceFasterRight_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementAction_RideWaterCurrentDown_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementAction_RideWaterCurrentDown_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementAction_RideWaterCurrentUp_Step0(struct ObjectEvent *, struct Sprite *); @@ -299,10 +299,10 @@ u8 (*const gMovementActionFuncs_WalkInPlaceFastDown[])(struct ObjectEvent *, str u8 (*const gMovementActionFuncs_WalkInPlaceFastUp[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_WalkInPlaceFastLeft[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_WalkInPlaceFastRight[])(struct ObjectEvent *, struct Sprite *); -u8 (*const gMovementActionFuncs_WalkInPlaceFastestDown[])(struct ObjectEvent *, struct Sprite *); -u8 (*const gMovementActionFuncs_WalkInPlaceFastestUp[])(struct ObjectEvent *, struct Sprite *); -u8 (*const gMovementActionFuncs_WalkInPlaceFastestLeft[])(struct ObjectEvent *, struct Sprite *); -u8 (*const gMovementActionFuncs_WalkInPlaceFastestRight[])(struct ObjectEvent *, struct Sprite *); +u8 (*const gMovementActionFuncs_WalkInPlaceFasterDown[])(struct ObjectEvent *, struct Sprite *); +u8 (*const gMovementActionFuncs_WalkInPlaceFasterUp[])(struct ObjectEvent *, struct Sprite *); +u8 (*const gMovementActionFuncs_WalkInPlaceFasterLeft[])(struct ObjectEvent *, struct Sprite *); +u8 (*const gMovementActionFuncs_WalkInPlaceFasterRight[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_RideWaterCurrentDown[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_RideWaterCurrentUp[])(struct ObjectEvent *, struct Sprite *); u8 (*const gMovementActionFuncs_RideWaterCurrentLeft[])(struct ObjectEvent *, struct Sprite *); @@ -459,10 +459,10 @@ u8 (*const *const gMovementActionFuncs[])(struct ObjectEvent *, struct Sprite *) [MOVEMENT_ACTION_WALK_IN_PLACE_FAST_UP] = gMovementActionFuncs_WalkInPlaceFastUp, [MOVEMENT_ACTION_WALK_IN_PLACE_FAST_LEFT] = gMovementActionFuncs_WalkInPlaceFastLeft, [MOVEMENT_ACTION_WALK_IN_PLACE_FAST_RIGHT] = gMovementActionFuncs_WalkInPlaceFastRight, - [MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_DOWN] = gMovementActionFuncs_WalkInPlaceFastestDown, - [MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_UP] = gMovementActionFuncs_WalkInPlaceFastestUp, - [MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_LEFT] = gMovementActionFuncs_WalkInPlaceFastestLeft, - [MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_RIGHT] = gMovementActionFuncs_WalkInPlaceFastestRight, + [MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_DOWN] = gMovementActionFuncs_WalkInPlaceFasterDown, + [MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_UP] = gMovementActionFuncs_WalkInPlaceFasterUp, + [MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_LEFT] = gMovementActionFuncs_WalkInPlaceFasterLeft, + [MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_RIGHT] = gMovementActionFuncs_WalkInPlaceFasterRight, [MOVEMENT_ACTION_RIDE_WATER_CURRENT_DOWN] = gMovementActionFuncs_RideWaterCurrentDown, [MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP] = gMovementActionFuncs_RideWaterCurrentUp, [MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT] = gMovementActionFuncs_RideWaterCurrentLeft, @@ -859,26 +859,26 @@ u8 (*const gMovementActionFuncs_WalkInPlaceFastRight[])(struct ObjectEvent *, st MovementAction_PauseSpriteAnim, }; -u8 (*const gMovementActionFuncs_WalkInPlaceFastestDown[])(struct ObjectEvent *, struct Sprite *) = { - MovementAction_WalkInPlaceFastestDown_Step0, +u8 (*const gMovementActionFuncs_WalkInPlaceFasterDown[])(struct ObjectEvent *, struct Sprite *) = { + MovementAction_WalkInPlaceFasterDown_Step0, MovementAction_WalkInPlace_Step1, MovementAction_PauseSpriteAnim, }; -u8 (*const gMovementActionFuncs_WalkInPlaceFastestUp[])(struct ObjectEvent *, struct Sprite *) = { - MovementAction_WalkInPlaceFastestUp_Step0, +u8 (*const gMovementActionFuncs_WalkInPlaceFasterUp[])(struct ObjectEvent *, struct Sprite *) = { + MovementAction_WalkInPlaceFasterUp_Step0, MovementAction_WalkInPlace_Step1, MovementAction_PauseSpriteAnim, }; -u8 (*const gMovementActionFuncs_WalkInPlaceFastestLeft[])(struct ObjectEvent *, struct Sprite *) = { - MovementAction_WalkInPlaceFastestLeft_Step0, +u8 (*const gMovementActionFuncs_WalkInPlaceFasterLeft[])(struct ObjectEvent *, struct Sprite *) = { + MovementAction_WalkInPlaceFasterLeft_Step0, MovementAction_WalkInPlace_Step1, MovementAction_PauseSpriteAnim, }; -u8 (*const gMovementActionFuncs_WalkInPlaceFastestRight[])(struct ObjectEvent *, struct Sprite *) = { - MovementAction_WalkInPlaceFastestRight_Step0, +u8 (*const gMovementActionFuncs_WalkInPlaceFasterRight[])(struct ObjectEvent *, struct Sprite *) = { + MovementAction_WalkInPlaceFasterRight_Step0, MovementAction_WalkInPlace_Step1, MovementAction_PauseSpriteAnim, }; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index a1fbb0b6e5..107ee47abe 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -987,12 +987,12 @@ const u8 gWalkInPlaceFastMovementActions[] = { MOVEMENT_ACTION_WALK_IN_PLACE_FAST_LEFT, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_RIGHT, }; -const u8 gWalkInPlaceFastestMovementActions[] = { - MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_DOWN, - MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_DOWN, - MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_UP, - MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_LEFT, - MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_RIGHT, +const u8 gWalkInPlaceFasterMovementActions[] = { + MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_DOWN, + MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_DOWN, + MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_UP, + MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_LEFT, + MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_RIGHT, }; const u8 gAcroWheelieFaceDirectionMovementActions[] = { MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN, @@ -4407,7 +4407,7 @@ movement_type_def(MovementType_RunInPlace, gMovementTypeFuncs_RunInPlace) bool8 MovementType_RunInPlace_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { ClearObjectEventMovement(objectEvent, sprite); - ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkInPlaceFastestMovementAction(objectEvent->facingDirection)); + ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkInPlaceFasterMovementAction(objectEvent->facingDirection)); sprite->sTypeFuncId = 1; return TRUE; } @@ -4926,7 +4926,7 @@ dirn_to_anim(GetJumpSpecialMovementAction, gJumpSpecialMovementActions); dirn_to_anim(GetWalkInPlaceSlowMovementAction, gWalkInPlaceSlowMovementActions); dirn_to_anim(GetWalkInPlaceNormalMovementAction, gWalkInPlaceNormalMovementActions); dirn_to_anim(GetWalkInPlaceFastMovementAction, gWalkInPlaceFastMovementActions); -dirn_to_anim(GetWalkInPlaceFastestMovementAction, gWalkInPlaceFastestMovementActions); +dirn_to_anim(GetWalkInPlaceFasterMovementAction, gWalkInPlaceFasterMovementActions); bool8 ObjectEventFaceOppositeDirection(struct ObjectEvent *objectEvent, u8 direction) { @@ -5753,25 +5753,25 @@ bool8 MovementAction_WalkInPlaceFastRight_Step0(struct ObjectEvent *objectEvent, return MovementAction_WalkInPlace_Step1(objectEvent, sprite); } -bool8 MovementAction_WalkInPlaceFastestDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkInPlaceFasterDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { InitMoveInPlace(objectEvent, sprite, DIR_SOUTH, GetMoveDirectionFasterAnimNum(DIR_SOUTH), 4); return MovementAction_WalkInPlace_Step1(objectEvent, sprite); } -bool8 MovementAction_WalkInPlaceFastestUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkInPlaceFasterUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { InitMoveInPlace(objectEvent, sprite, DIR_NORTH, GetMoveDirectionFasterAnimNum(DIR_NORTH), 4); return MovementAction_WalkInPlace_Step1(objectEvent, sprite); } -bool8 MovementAction_WalkInPlaceFastestLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkInPlaceFasterLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { InitMoveInPlace(objectEvent, sprite, DIR_WEST, GetMoveDirectionFasterAnimNum(DIR_WEST), 4); return MovementAction_WalkInPlace_Step1(objectEvent, sprite); } -bool8 MovementAction_WalkInPlaceFastestRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) +bool8 MovementAction_WalkInPlaceFasterRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { InitMoveInPlace(objectEvent, sprite, DIR_EAST, GetMoveDirectionFasterAnimNum(DIR_EAST), 4); return MovementAction_WalkInPlace_Step1(objectEvent, sprite); diff --git a/src/field_effect.c b/src/field_effect.c index 7e1ebdff4d..574bec879d 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -2163,7 +2163,7 @@ static bool8 LavaridgeGym1FWarpEffect_AshPuff(struct Task *task, struct ObjectEv } else { task->data[1]++; - ObjectEventSetHeldMovement(objectEvent, GetWalkInPlaceFastestMovementAction(objectEvent->facingDirection)); + ObjectEventSetHeldMovement(objectEvent, GetWalkInPlaceFasterMovementAction(objectEvent->facingDirection)); PlaySE(SE_LAVARIDGE_FALL_WARP); } } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 00ac41e525..6e0e3cb678 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -903,7 +903,7 @@ static bool8 PlayerAnimIsMultiFrameStationary(void) if (movementActionId <= MOVEMENT_ACTION_FACE_RIGHT || (movementActionId >= MOVEMENT_ACTION_DELAY_1 && movementActionId <= MOVEMENT_ACTION_DELAY_16) - || (movementActionId >= MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_DOWN && movementActionId <= MOVEMENT_ACTION_WALK_IN_PLACE_FASTEST_RIGHT) + || (movementActionId >= MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_DOWN && movementActionId <= MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_RIGHT) || (movementActionId >= MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN && movementActionId <= MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_RIGHT) || (movementActionId >= MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_DOWN && movementActionId <= MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_RIGHT)) return TRUE; From 32aaf6912feb59f48782f7e0f176de7c5391ae7b Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Fri, 5 Nov 2021 02:22:28 +0800 Subject: [PATCH 141/417] Rename movement scripts to use Faster over Fastest --- asm/macros/movement.inc | 16 +- data/event_scripts.s | 2 +- data/maps/AquaHideout_B2F/scripts.inc | 4 +- .../scripts.inc | 16 +- .../scripts.inc | 4 +- .../scripts.inc | 4 +- .../scripts.inc | 8 +- .../scripts.inc | 4 +- .../scripts.inc | 12 +- .../scripts.inc | 12 +- .../scripts.inc | 6 +- .../scripts.inc | 4 +- .../scripts.inc | 8 +- .../scripts.inc | 6 +- .../BattleFrontier_OutsideWest/scripts.inc | 28 +- .../BattleFrontier_ReceptionGate/scripts.inc | 12 +- .../BattleFrontier_ScottsHouse/scripts.inc | 8 +- data/maps/BirthIsland_Harbor/scripts.inc | 2 +- data/maps/CaveOfOrigin_B1F/scripts.inc | 2 +- data/maps/DewfordTown/scripts.inc | 596 +++++++++--------- data/maps/DewfordTown_Hall/scripts.inc | 12 +- .../EverGrandeCity_ChampionsRoom/scripts.inc | 26 +- .../EverGrandeCity_HallOfFame/scripts.inc | 12 +- .../scripts.inc | 8 +- .../scripts.inc | 12 +- data/maps/FarawayIsland_Entrance/scripts.inc | 2 +- data/maps/FarawayIsland_Interior/scripts.inc | 2 +- data/maps/FortreeCity_House4/scripts.inc | 2 +- data/maps/GraniteCave_StevensRoom/scripts.inc | 2 +- data/maps/LavaridgeTown/scripts.inc | 8 +- data/maps/LilycoveCity/scripts.inc | 2 +- .../LilycoveCity_ContestLobby/scripts.inc | 22 +- .../LilycoveCity_CoveLilyMotel_1F/scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/LilycoveCity_Harbor/scripts.inc | 30 +- .../scripts.inc | 2 +- .../scripts.inc | 12 +- data/maps/LittlerootTown/scripts.inc | 54 +- .../scripts.inc | 38 +- .../scripts.inc | 36 +- .../LittlerootTown_MaysHouse_1F/scripts.inc | 38 +- .../LittlerootTown_MaysHouse_2F/scripts.inc | 40 +- .../scripts.inc | 26 +- data/maps/MagmaHideout_4F/scripts.inc | 4 +- data/maps/MauvilleCity/scripts.inc | 30 +- data/maps/MeteorFalls_1F_1R/scripts.inc | 30 +- data/maps/MossdeepCity/scripts.inc | 2 +- .../MossdeepCity_SpaceCenter_1F/scripts.inc | 8 +- .../MossdeepCity_SpaceCenter_2F/scripts.inc | 16 +- .../MossdeepCity_StevensHouse/scripts.inc | 6 +- data/maps/MtChimney/scripts.inc | 10 +- .../MtChimney_CableCarStation/scripts.inc | 2 +- data/maps/MtPyre_Summit/scripts.inc | 52 +- data/maps/NavelRock_Harbor/scripts.inc | 2 +- data/maps/NewMauville_Entrance/scripts.inc | 2 +- data/maps/OldaleTown/scripts.inc | 18 +- data/maps/PetalburgCity/scripts.inc | 54 +- data/maps/PetalburgCity_Gym/scripts.inc | 90 +-- data/maps/PetalburgWoods/scripts.inc | 20 +- data/maps/Route101/scripts.inc | 6 +- data/maps/Route103/scripts.inc | 6 +- data/maps/Route104/scripts.inc | 572 ++++++++--------- data/maps/Route109/scripts.inc | 312 ++++----- data/maps/Route110/scripts.inc | 14 +- data/maps/Route110_TrickHouseEnd/scripts.inc | 10 +- .../Route110_TrickHouseEntrance/scripts.inc | 4 +- data/maps/Route111/scripts.inc | 10 +- data/maps/Route112/scripts.inc | 8 +- .../maps/Route112_CableCarStation/scripts.inc | 2 +- .../Route114_FossilManiacsTunnel/scripts.inc | 4 +- data/maps/Route116/scripts.inc | 4 +- data/maps/Route118/scripts.inc | 2 +- data/maps/Route119/scripts.inc | 10 +- .../Route119_WeatherInstitute_2F/scripts.inc | 4 +- data/maps/Route120/scripts.inc | 12 +- .../Route121_SafariZoneEntrance/scripts.inc | 2 +- data/maps/Route128/scripts.inc | 26 +- data/maps/RustboroCity/scripts.inc | 84 +-- .../RustboroCity_DevonCorp_3F/scripts.inc | 8 +- .../RustboroCity_PokemonSchool/scripts.inc | 12 +- data/maps/RusturfTunnel/scripts.inc | 36 +- data/maps/SSTidalCorridor/scripts.inc | 12 +- data/maps/SafariZone_South/scripts.inc | 8 +- data/maps/SeafloorCavern_Entrance/scripts.inc | 10 +- data/maps/SeafloorCavern_Room9/scripts.inc | 18 +- data/maps/SkyPillar_Outside/scripts.inc | 8 +- data/maps/SkyPillar_Top/scripts.inc | 2 +- data/maps/SlateportCity/scripts.inc | 38 +- .../scripts.inc | 4 +- .../scripts.inc | 4 +- data/maps/SlateportCity_Harbor/scripts.inc | 16 +- .../scripts.inc | 8 +- .../scripts.inc | 18 +- data/maps/SootopolisCity/scripts.inc | 34 +- .../scripts.inc | 8 +- data/maps/SouthernIsland_Exterior/scripts.inc | 4 +- data/maps/SouthernIsland_Interior/scripts.inc | 2 +- .../scripts.inc | 8 +- data/maps/VictoryRoad_1F/scripts.inc | 2 +- data/scripts/berry_blender.inc | 2 +- data/scripts/cable_club.inc | 2 +- data/scripts/contest_hall.inc | 40 +- data/scripts/gabby_and_ty.inc | 4 +- data/scripts/movement.inc | 16 +- data/scripts/pkmn_center_nurse.inc | 4 +- data/scripts/players_house.inc | 68 +- 108 files changed, 1491 insertions(+), 1491 deletions(-) diff --git a/asm/macros/movement.inc b/asm/macros/movement.inc index e26a00d76c..0220c11a96 100644 --- a/asm/macros/movement.inc +++ b/asm/macros/movement.inc @@ -43,18 +43,18 @@ create_movement_action walk_in_place_fast_up create_movement_action walk_in_place_fast_left create_movement_action walk_in_place_fast_right - create_movement_action walk_in_place_fastest_down - create_movement_action walk_in_place_fastest_up - create_movement_action walk_in_place_fastest_left - create_movement_action walk_in_place_fastest_right + create_movement_action walk_in_place_faster_down + create_movement_action walk_in_place_faster_up + create_movement_action walk_in_place_faster_left + create_movement_action walk_in_place_faster_right create_movement_action ride_water_current_down create_movement_action ride_water_current_up create_movement_action ride_water_current_left create_movement_action ride_water_current_right - create_movement_action walk_fastest_down - create_movement_action walk_fastest_up - create_movement_action walk_fastest_left - create_movement_action walk_fastest_right + create_movement_action walk_faster_down + create_movement_action walk_faster_up + create_movement_action walk_faster_left + create_movement_action walk_faster_right create_movement_action slide_down create_movement_action slide_up create_movement_action slide_left diff --git a/data/event_scripts.s b/data/event_scripts.s index bbf25c93cf..720875735b 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -786,7 +786,7 @@ RusturfTunnel_EventScript_SetRusturfTunnelOpen:: EventScript_UnusedBoardFerry:: delay 30 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 showobjectat OBJ_EVENT_ID_PLAYER, 0 delay 30 diff --git a/data/maps/AquaHideout_B2F/scripts.inc b/data/maps/AquaHideout_B2F/scripts.inc index 95059fb6d3..7dc34676b3 100644 --- a/data/maps/AquaHideout_B2F/scripts.inc +++ b/data/maps/AquaHideout_B2F/scripts.inc @@ -34,14 +34,14 @@ AquaHideout_B2F_EventScript_Matt:: AquaHideout_B2F_EventScript_SubmarineEscape:: setvar VAR_0x8008, LOCALID_MATT setvar VAR_0x8009, LOCALID_SUBMARINE - applymovement VAR_0x8008, Common_Movement_WalkInPlaceFastestLeft + applymovement VAR_0x8008, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 applymovement VAR_0x8008, Common_Movement_FacePlayer waitmovement 0 msgbox AquaHideout_B2F_Text_OurBossGotThroughHisPreparations, MSGBOX_DEFAULT closemessage - applymovement VAR_0x8008, Common_Movement_WalkInPlaceFastestLeft + applymovement VAR_0x8008, Common_Movement_WalkInPlaceFasterLeft applymovement VAR_0x8009, AquaHideout_B2F_Movement_SumbarineDepartLeft waitmovement 0 removeobject VAR_0x8009 diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index 4f7d3bd873..adea508ae6 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -426,15 +426,15 @@ BattleFrontier_BattleArenaBattleRoom_Movement_PlayerStepForward: BattleFrontier_BattleArenaBattleRoom_Movement_PlayerWalkBackToLine: walk_left walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceLeft: - walk_in_place_fastest_up + walk_in_place_faster_up step_end BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight: - walk_in_place_fastest_right + walk_in_place_faster_right step_end BattleFrontier_BattleArenaBattleRoom_Movement_OpponentEnter: @@ -475,12 +475,12 @@ BattleFrontier_BattleArenaBattleRoom_Movement_JumpInPlaceUp: step_end BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceDown: - walk_in_place_fastest_down + walk_in_place_faster_down step_end @ Unused, redundant BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceRight2: - walk_in_place_fastest_right + walk_in_place_faster_right step_end BattleFrontier_BattleArenaBattleRoom_OnWarp: @@ -497,19 +497,19 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_SetUpRoomObjects:: BattleFrontier_BattleArenaBattleRoom_Movement_GretaLookAroundPlayer: walk_down - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 delay_16 delay_16 delay_16 walk_up walk_up - walk_in_place_fastest_left + walk_in_place_faster_left step_end BattleFrontier_BattleArenaBattleRoom_Movement_GretaWalkBackToCenter: walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end BattleFrontier_BattleArenaBattleRoom_Text_PlayerStepForward: diff --git a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc index fe808159e2..1752b93421 100644 --- a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc @@ -78,12 +78,12 @@ BattleFrontier_BattleArenaCorridor_Movement_AttendantWalkToDoor: step_end BattleFrontier_BattleArenaCorridor_Movement_AttendantFacePlayer: - walk_in_place_fastest_left + walk_in_place_faster_left step_end BattleFrontier_BattleArenaCorridor_Movement_AttendantMoveOutOfWay: walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end BattleFrontier_BattleArenaCorridor_Text_PleaseStepIn: diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index 287fd4639a..12b600f69b 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -247,7 +247,7 @@ BattleFrontier_BattleArenaLobby_Movement_PlayerWalkToLeftDoor: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end BattleFrontier_BattleArenaLobby_Movement_PlayerEnterDoor: @@ -289,7 +289,7 @@ BattleFrontier_BattleArenaLobby_Movement_PlayerWalkToRightDoor: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end BattleFrontier_BattleArenaLobby_EventScript_ShowResults:: diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index b092d56034..76088f54d1 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -758,7 +758,7 @@ BattleFrontier_BattleDomeBattleRoom_Movement_AnnouncerMoveForTuckerEntrance: delay_16 walk_left walk_left - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_16 delay_16 @@ -800,7 +800,7 @@ BattleFrontier_BattleDomeBattleRoom_Movement_AnnouncerMoveForTuckerEntrance: delay_16 walk_right walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end BattleFrontier_BattleDomeBattleRoom_Movement_TuckerStepForward: @@ -936,7 +936,7 @@ BattleFrontier_BattleDomeBattleRoom_Movement_AudienceMemberWalkToSeat: walk_down walk_right walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end BattleFrontier_BattleDomeBattleRoom_Movement_RefereeEnter: @@ -947,7 +947,7 @@ BattleFrontier_BattleDomeBattleRoom_Movement_RefereeEnter: step_end BattleFrontier_BattleDomeBattleRoom_Movement_AnnouncerFaceLeft: - walk_in_place_fastest_left + walk_in_place_faster_left step_end BattleFrontier_BattleDomeBattleRoom_Movement_RefereeExit: diff --git a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc index 2c35779c7e..32f3c82ba3 100644 --- a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc @@ -56,7 +56,7 @@ BattleFrontier_BattleDomeCorridor_Movement_PlayerWalkToDoorLv50: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end BattleFrontier_BattleDomeCorridor_Movement_PlayerEnterDoorLv50: @@ -100,7 +100,7 @@ BattleFrontier_BattleDomeCorridor_Movement_PlayerWalkToDoorLvOpen: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end BattleFrontier_BattleDomeCorridor_Movement_PlayerEnterDoorLvOpen: diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index 367756054f..24f5ebe103 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc @@ -257,12 +257,12 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles:: end BattleFrontier_BattleFactoryBattleRoom_EventScript_ScientistsFaceBattle:: - applymovement LOCALID_SCIENTIST_1, Common_Movement_WalkInPlaceFastestRight - applymovement LOCALID_SCIENTIST_2, Common_Movement_WalkInPlaceFastestRight - applymovement LOCALID_SCIENTIST_3, Common_Movement_WalkInPlaceFastestRight - applymovement LOCALID_SCIENTIST_4, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_SCIENTIST_5, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_SCIENTIST_6, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_SCIENTIST_1, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SCIENTIST_2, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SCIENTIST_3, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_SCIENTIST_4, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SCIENTIST_5, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_SCIENTIST_6, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index a838c7eadd..13015dd3e1 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -252,8 +252,8 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver:: frontier_givesymbol applymovement LOCALID_OPPONENT, Common_Movement_WalkInPlaceLeft waitmovement 0 - applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFastestRight - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserAwaitNextTime, MSGBOX_DEFAULT goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon @@ -287,8 +287,8 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold:: frontier_givesymbol applymovement LOCALID_OPPONENT, Common_Movement_WalkInPlaceLeft waitmovement 0 - applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFastestRight - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserComeSeeMeAgain, MSGBOX_DEFAULT goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon @@ -435,7 +435,7 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_DusclopsEnter: walk_down walk_right walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end BattleFrontier_BattlePalaceBattleRoom_Movement_AzurillEnter: @@ -447,7 +447,7 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_AzurillEnter: walk_fast_down walk_fast_down walk_fast_down - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 step_end diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc index 1f031ea40f..0c1db1eea8 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc @@ -204,12 +204,12 @@ BattleFrontier_BattlePyramidTop_EventScript_DoBrandonBattle:: BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside: walk_right - walk_in_place_fastest_left + walk_in_place_faster_left step_end BattleFrontier_BattlePyramidTop_Movement_AttendantBlockPath: walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end BattleFrontier_BattlePyramidTop_Movement_PlayerClimbToTop: @@ -218,7 +218,7 @@ BattleFrontier_BattlePyramidTop_Movement_PlayerClimbToTop: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end BattleFrontier_BattlePyramidTop_Movement_BrandonApproachPlayer: diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc index b7354d9a20..9bfcfddc2f 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc @@ -408,7 +408,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant: step_end BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceBattle: - walk_in_place_fastest_right + walk_in_place_faster_right step_end BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent1Enter: @@ -449,7 +449,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer: BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantReturnToPos: walk_left walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft: diff --git a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc index 9c6a8bb2bf..70922d473c 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc @@ -76,8 +76,8 @@ BattleFrontier_BattleTowerMultiCorridor_EventScript_EnterCorridor:: applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiCorridor_Movement_PartnerAttendantWalkToDoor waitmovement 0 delay 40 - applymovement LOCALID_ATTENDANT_2, Common_Movement_WalkInPlaceFastestUp - applymovement LOCALID_ATTENDANT_1, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_ATTENDANT_2, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_ATTENDANT_1, Common_Movement_WalkInPlaceFasterUp waitmovement 0 opendoor 7, 1 waitdooranim @@ -149,7 +149,7 @@ BattleFrontier_BattleTowerMultiCorridor_Movement_PlayerAttendantWalkToDoor: walk_right walk_right walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end BattleFrontier_BattleTowerMultiCorridor_Movement_PartnerAttendantWalkToDoor: @@ -160,7 +160,7 @@ BattleFrontier_BattleTowerMultiCorridor_Movement_PartnerAttendantWalkToDoor: walk_left walk_left walk_up - walk_in_place_fastest_left + walk_in_place_faster_left step_end BattleFrontier_BattleTowerMultiCorridor_Movement_TrainerEnterDoor: diff --git a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc index 4a6d29446e..06038b43cd 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc @@ -64,7 +64,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_EnterRoom:: applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantBlockExit waitmovement 0 copyobjectxytoperm LOCALID_ATTENDANT - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox BattleFrontier_BattleTowerMultiPartnerRoom_Text_PleaseFindPartner, MSGBOX_DEFAULT special HealPlayerParty @@ -78,7 +78,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_Movement_PlayerEnterRoom: BattleFrontier_BattleTowerMultiPartnerRoom_Movement_AttendantBlockExit: walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_Attendant:: @@ -101,7 +101,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_QuitChallenge:: BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_EnterElevator:: msgbox BattleFrontier_BattleTowerMultiPartnerRoom_Text_ThankYouForChoosingPartner, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 opendoor 10, 1 waitdooranim diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc index 19f0562585..d359ee89ad 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -72,7 +72,7 @@ BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination:: BattleFrontier_OutsideWest_EventScript_BoardFerry:: closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 hideobjectat LOCALID_FERRY_ATTENDANT, MAP_BATTLE_FRONTIER_OUTSIDE_WEST @@ -137,16 +137,16 @@ BattleFrontier_OutsideWest_EventScript_Maniac2:: end BattleFrontier_OutsideWest_EventScript_FactoryChallengersTalk:: - applymovement LOCALID_MANIAC_1, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_MANIAC_1, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox BattleFrontier_OutsideWest_Text_SureWeCanChallengeWithNoMons, MSGBOX_DEFAULT - applymovement LOCALID_MANIAC_2, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_MANIAC_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox BattleFrontier_OutsideWest_Text_BigGuySaidIllLendYouMons, MSGBOX_DEFAULT closemessage delay 25 - applymovement LOCALID_MANIAC_1, Common_Movement_WalkInPlaceFastestUp - applymovement LOCALID_MANIAC_2, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_MANIAC_1, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_MANIAC_2, Common_Movement_WalkInPlaceFasterUp waitmovement 0 release end @@ -168,7 +168,7 @@ BattleFrontier_OutsideWest_EventScript_Camper:: end BattleFrontier_OutsideWest_EventScript_CamperFaceFactory:: - applymovement LOCALID_CAMPER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_CAMPER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return @@ -213,23 +213,23 @@ BattleFrontier_OutsideWest_EventScript_GirlShudderEast:: return BattleFrontier_OutsideWest_Movement_GirlShudderNorth: - walk_in_place_fastest_down - walk_in_place_fastest_down + walk_in_place_faster_down + walk_in_place_faster_down step_end BattleFrontier_OutsideWest_Movement_GirlShudderSouth: - walk_in_place_fastest_up - walk_in_place_fastest_up + walk_in_place_faster_up + walk_in_place_faster_up step_end BattleFrontier_OutsideWest_Movement_GirlShudderWest: - walk_in_place_fastest_right - walk_in_place_fastest_right + walk_in_place_faster_right + walk_in_place_faster_right step_end BattleFrontier_OutsideWest_Movement_GirlShudderEast: - walk_in_place_fastest_left - walk_in_place_fastest_left + walk_in_place_faster_left + walk_in_place_faster_left step_end BattleFrontier_OutsideWest_EventScript_Woman2:: diff --git a/data/maps/BattleFrontier_ReceptionGate/scripts.inc b/data/maps/BattleFrontier_ReceptionGate/scripts.inc index 410eb747d7..151bc665b5 100644 --- a/data/maps/BattleFrontier_ReceptionGate/scripts.inc +++ b/data/maps/BattleFrontier_ReceptionGate/scripts.inc @@ -42,9 +42,9 @@ BattleFrontier_ReceptionGate_EventScript_ScottScene:: msgbox BattleFrontier_ReceptionGate_Text_EnjoyBattleFrontier, MSGBOX_DEFAULT msgbox BattleFrontier_ReceptionGate_Text_IfItIsntPlayerYouCame, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GREETER, Common_Movement_WalkInPlaceFastestUp - applymovement LOCALID_GUIDE, Common_Movement_WalkInPlaceFastestUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_GREETER, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_GUIDE, Common_Movement_WalkInPlaceFasterUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN applymovement LOCALID_GREETER, Common_Movement_ExclamationMark @@ -78,7 +78,7 @@ BattleFrontier_ReceptionGate_Movement_PlayerFaceScott: delay_16 delay_16 delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right step_end @ Unused @@ -112,7 +112,7 @@ BattleFrontier_ReceptionGate_Movement_GreeterFaceScott: delay_16 delay_16 delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right step_end BattleFrontier_ReceptionGate_Movement_FacilityGuideFaceScott: @@ -120,7 +120,7 @@ BattleFrontier_ReceptionGate_Movement_FacilityGuideFaceScott: delay_16 delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end BattleFrontier_ReceptionGate_EventScript_Greeter:: diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc index 5c793517ee..edb4bdf411 100644 --- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc +++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc @@ -209,22 +209,22 @@ BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints:: end BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth:: - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth:: - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast:: - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest:: - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index 7ec88ae188..06c5b08e9d 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -12,7 +12,7 @@ BirthIsland_Harbor_EventScript_Sailor:: goto_if_eq BirthIsland_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 hideobjectat LOCALID_SAILOR, MAP_BIRTH_ISLAND_HARBOR diff --git a/data/maps/CaveOfOrigin_B1F/scripts.inc b/data/maps/CaveOfOrigin_B1F/scripts.inc index 511364cfa5..11ca66aab0 100644 --- a/data/maps/CaveOfOrigin_B1F/scripts.inc +++ b/data/maps/CaveOfOrigin_B1F/scripts.inc @@ -8,7 +8,7 @@ CaveOfOrigin_B1F_EventScript_Wallace:: faceplayer msgbox CaveOfOrigin_B1F_Text_WallaceStory, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 60 playse SE_PIN diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index 52b9be2642..281648aeb6 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -230,46 +230,46 @@ DewfordTown_Movement_SailToPetalburg: walk_fast_left walk_fast_left walk_fast_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left walk_fast_left walk_fast_left walk_fast_left @@ -278,119 +278,119 @@ DewfordTown_Movement_SailToPetalburg: walk_fast_up walk_fast_up walk_fast_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up walk_fast_up walk_fast_up walk_fast_up walk_fast_up walk_fast_left walk_fast_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left walk_fast_left walk_fast_left walk_fast_up walk_fast_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up walk_fast_up walk_fast_up walk_fast_up @@ -405,164 +405,164 @@ DewfordTown_Movement_SailToSlateport: walk_right walk_fast_right walk_fast_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right walk_fast_right walk_fast_right walk_fast_up walk_fast_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up walk_fast_up walk_fast_up walk_fast_up @@ -590,7 +590,7 @@ DewfordTown_Movement_ExitBoatSlateport: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end DewfordTown_Movement_BrineyBoardBoat: diff --git a/data/maps/DewfordTown_Hall/scripts.inc b/data/maps/DewfordTown_Hall/scripts.inc index db9d13518b..9d8392ff16 100644 --- a/data/maps/DewfordTown_Hall/scripts.inc +++ b/data/maps/DewfordTown_Hall/scripts.inc @@ -58,7 +58,7 @@ DewfordTown_Hall_EventScript_ExpertM:: call Common_EventScript_BufferTrendyPhrase msgbox DewfordTown_Hall_Text_TVShowAboutTrend, MSGBOX_DEFAULT closemessage - applymovement LOCALID_EXPERT_M, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_EXPERT_M, Common_Movement_WalkInPlaceFasterUp waitmovement 0 release end @@ -69,7 +69,7 @@ DewfordTown_Hall_EventScript_Twin:: call Common_EventScript_BufferTrendyPhrase msgbox DewfordTown_Hall_Text_IsTrendMorePopularAcrossSea, MSGBOX_DEFAULT closemessage - applymovement LOCALID_TWIN, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_TWIN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 release end @@ -205,7 +205,7 @@ DewfordTown_Hall_EventScript_DebateReact1:: DewfordTown_Hall_EventScript_PlayerReactWest:: compare VAR_FACING, DIR_EAST goto_if_eq DewfordTown_Hall_EventScript_DontMovePlayer1 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -229,19 +229,19 @@ DewfordTown_Hall_EventScript_PlayerReactNorthSouth:: return DewfordTown_Hall_EventScript_PlayerWalkInPlaceUp:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return DewfordTown_Hall_EventScript_PlayerWalkInPlaceDown:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return DewfordTown_Hall_EventScript_PlayerReactEast:: compare VAR_FACING, DIR_WEST goto_if_eq DewfordTown_Hall_EventScript_DontMovePlayer1 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index dc2bb4d722..6b9281ae6d 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -109,26 +109,26 @@ EverGrandeCity_ChampionsRoom_EventScript_BirchArrivesExitForHoF:: addobject LOCALID_BIRCH applymovement LOCALID_BIRCH, EverGrandeCity_ChampionsRoom_Movement_BirchArrives waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_BirchArriveRatePokedex, MSGBOX_DEFAULT call ProfBirch_EventScript_RatePokedex msgbox EverGrandeCity_ChampionsRoom_Text_BirchCongratulations, MSGBOX_DEFAULT - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_WallaceComeWithMe, MSGBOX_DEFAULT closemessage delay 30 applymovement LOCALID_WALLACE, EverGrandeCity_ChampionsRoom_Movement_WallaceExitStart applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExitStart - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterUp applymovement LOCALID_RIVAL, EverGrandeCity_ChampionsRoom_Movement_RivalFollows waitmovement 0 delay 20 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_WallaceWaitOutside, MSGBOX_DEFAULT checkplayergender @@ -157,7 +157,7 @@ EverGrandeCity_ChampionsRoom_EventScript_BrendanCongratulations:: EverGrandeCity_ChampionsRoom_EventScript_RivalApproachPlayer:: applymovement LOCALID_RIVAL, EverGrandeCity_ChampionsRoom_Movement_RivalApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -187,17 +187,17 @@ EverGrandeCity_ChampionsRoom_Movement_RivalApproachPlayer: walk_up walk_left walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end EverGrandeCity_ChampionsRoom_Movement_RivalLookBackAndForth: - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 step_end @@ -209,7 +209,7 @@ EverGrandeCity_ChampionsRoom_Movement_RivalFollows: EverGrandeCity_ChampionsRoom_Movement_WallaceExitStart: walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end EverGrandeCity_ChampionsRoom_Movement_WallaceExit: @@ -226,7 +226,7 @@ EverGrandeCity_ChampionsRoom_Movement_BirchArrives: walk_up walk_right walk_up - walk_in_place_fastest_left + walk_in_place_faster_left step_end EverGrandeCity_ChampionsRoom_Text_IntroSpeech: diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc index f5e4155652..b494408f13 100644 --- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc +++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc @@ -22,8 +22,8 @@ EverGrandeCity_HallOfFame_EventScript_EnterHallOfFame:: applymovement LOCALID_WALLACE, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame1 waitmovement 0 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox EverGrandeCity_HallOfFame_Text_HereWeHonorLeagueChampions, MSGBOX_DEFAULT closemessage @@ -31,13 +31,13 @@ EverGrandeCity_HallOfFame_EventScript_EnterHallOfFame:: applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_HallOfFame_Movement_WalkIntoHallOfFame2 waitmovement 0 delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox EverGrandeCity_HallOfFame_Text_LetsRecordYouAndYourPartnersNames, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 20 dofieldeffect FLDEFF_HALL_OF_FAME_RECORD diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc index 1be2e7c1f3..ac7d4f9b45 100644 --- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc @@ -108,23 +108,23 @@ EverGrandeCity_PokemonLeague_1F_EventScript_GoForth:: EverGrandeCity_PokemonLeague_1F_Movement_MoveToFrontFromRight: walk_down walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end EverGrandeCity_PokemonLeague_1F_Movement_MoveToFrontFromLeft: walk_down walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end EverGrandeCity_PokemonLeague_1F_Movement_LeftGuardOutOfWay: walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end EverGrandeCity_PokemonLeague_1F_Movement_RightGuardOutOfWay: walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end EverGrandeCity_PokemonLeague_1F_Text_MustHaveAllGymBadges: diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index 947bbb8bba..3f51ba3935 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -185,15 +185,15 @@ FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter: walk_up walk_up walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceBattle: - walk_in_place_fastest_right + walk_in_place_faster_right step_end FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant: - walk_in_place_fastest_left + walk_in_place_faster_left step_end FallarborTown_BattleTentBattleRoom_Movement_OpponentEnter: @@ -201,7 +201,7 @@ FallarborTown_BattleTentBattleRoom_Movement_OpponentEnter: walk_down walk_down walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end @ Unused @@ -225,14 +225,14 @@ FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer: walk_down walk_down walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end FallarborTown_BattleTentBattleRoom_Movement_AttendantReturnToPos: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end FallarborTown_BattleTentBattleRoom_OnWarp: diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc index c4b4c9ab08..15deb95e6f 100644 --- a/data/maps/FarawayIsland_Entrance/scripts.inc +++ b/data/maps/FarawayIsland_Entrance/scripts.inc @@ -27,7 +27,7 @@ FarawayIsland_Entrance_EventScript_Sailor:: goto_if_eq FarawayIsland_Entrance_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 hideobjectat LOCALID_SAILOR, MAP_FARAWAY_ISLAND_ENTRANCE diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index bd2b479f70..adb55d72ee 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -73,7 +73,7 @@ FarawayIsland_Interior_Movement_MewMoveAndHide: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down set_invisible step_end diff --git a/data/maps/FortreeCity_House4/scripts.inc b/data/maps/FortreeCity_House4/scripts.inc index 8a6d71eb4d..db17e34740 100644 --- a/data/maps/FortreeCity_House4/scripts.inc +++ b/data/maps/FortreeCity_House4/scripts.inc @@ -51,7 +51,7 @@ FortreeCity_House4_Movement_WingullExit: walk_fast_down walk_fast_down walk_fast_right - walk_in_place_fastest_down + walk_in_place_faster_down delay_8 step_end diff --git a/data/maps/GraniteCave_StevensRoom/scripts.inc b/data/maps/GraniteCave_StevensRoom/scripts.inc index 73c50b70a5..b57eb0de6d 100644 --- a/data/maps/GraniteCave_StevensRoom/scripts.inc +++ b/data/maps/GraniteCave_StevensRoom/scripts.inc @@ -72,7 +72,7 @@ GraniteCave_StevensRoom_Movement_PlayerTurnTowardExit: delay_16 delay_16 delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up step_end GraniteCave_StevensRoom_Movement_StevenExitSouth: diff --git a/data/maps/LavaridgeTown/scripts.inc b/data/maps/LavaridgeTown/scripts.inc index baa9027a94..2b7f8f331f 100644 --- a/data/maps/LavaridgeTown/scripts.inc +++ b/data/maps/LavaridgeTown/scripts.inc @@ -113,7 +113,7 @@ LavaridgeTown_EventScript_PlayBrendanMusic:: return LavaridgeTown_EventScript_RivalNoticePlayer:: - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -130,14 +130,14 @@ LavaridgeTown_EventScript_RivalExitHerbShop:: waitmovement 0 closedoor 12, 15 waitdooranim - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark waitmovement 0 applymovement LOCALID_RIVAL, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -178,7 +178,7 @@ LavaridgeTown_Movement_RivalExit2: LavaridgeTown_Movement_PlayerWatchRivalExit: delay_16 delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right step_end LavaridgeTown_Movement_RivalExit1: diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index 048cabacbc..eb3f140a86 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -390,7 +390,7 @@ LilycoveCity_EventScript_BrendanBattleFrontier:: LilycoveCity_EventScript_RivalFlyAway:: closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 setfieldeffectargument 0, 1 diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 48a8e6b926..7bfa1419ad 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -188,7 +188,7 @@ LilycoveCity_ContestLobby_Movement_ArtistExit: step_end LilycoveCity_ContestLobby_Movement_PlayerFaceArtist: - walk_in_place_fastest_left + walk_in_place_faster_left step_end LilycoveCity_ContestLobby_Movement_ArtistBeginToExit: @@ -205,7 +205,7 @@ LilycoveCity_ContestLobby_Movement_ArtistReturnToPlayer: walk_fast_up walk_fast_up walk_fast_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end LilycoveCity_ContestLobby_EventScript_TryDoLinkContestArtist:: @@ -303,7 +303,7 @@ LilycoveCity_ContestLobby_Movement_LinkArtistExit: step_end LilycoveCity_ContestLobby_Movement_PlayerFaceLinkArtist: - walk_in_place_fastest_right + walk_in_place_faster_right step_end LilycoveCity_ContestLobby_Movement_LinkArtistBeginExit: @@ -320,7 +320,7 @@ LilycoveCity_ContestLobby_Movement_LinkArtistReturnToPlayer: walk_fast_up walk_fast_up walk_fast_up - walk_in_place_fastest_left + walk_in_place_faster_left step_end @ EventScript_SpeakToContestReceptionist either ends or returns after a contest entry is submitted @@ -453,20 +453,20 @@ LilycoveCity_ContestLobby_Movement_PlayerWalkToContestHall: step_end LilycoveCity_ContestLobby_Movement_PlayerApproachReceptionist: - walk_in_place_fastest_left + walk_in_place_faster_left walk_left step_end LilycoveCity_ContestLobby_Movement_ReceptionistApproachCounter: walk_left walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end LilycoveCity_ContestLobby_Movement_ReceptionistExitCounter: walk_down walk_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end LilycoveCity_ContestLobby_Movement_ReceptionistWalkToContestHall: @@ -481,7 +481,7 @@ LilycoveCity_ContestLobby_Movement_ReceptionistWalkToContestHall: step_end LilycoveCity_ContestLobby_Movement_ReceptionistFacePlayer: - walk_in_place_fastest_right + walk_in_place_faster_right step_end LilycoveCity_ContestLobby_EventScript_BlackBelt:: @@ -984,13 +984,13 @@ LilycoveCity_ContestLobby_Movement_PlayerApproachLinkReceptionist: LilycoveCity_ContestLobby_Movement_LinkReceptionistApproachCounter: walk_right walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end LilycoveCity_ContestLobby_Movement_LinkReceptionistExitCounter: walk_down walk_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end LilycoveCity_ContestLobby_Movement_LinkReceptionistWalkToContestHall: @@ -1006,7 +1006,7 @@ LilycoveCity_ContestLobby_Movement_LinkReceptionistWalkToContestHall: step_end LilycoveCity_ContestLobby_Movement_LinkReceptionistFacePlayer: - walk_in_place_fastest_left + walk_in_place_faster_left step_end LilycoveCity_ContestLobby_EventScript_LittleGirl:: diff --git a/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc b/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc index 8ce2a97df2..796645f47f 100644 --- a/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc +++ b/data/maps/LilycoveCity_CoveLilyMotel_1F/scripts.inc @@ -46,7 +46,7 @@ LilycoveCity_CoveLilyMotel_1F_EventScript_BlockingTV:: waitmovement 0 applymovement LOCALID_OWNER, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_CantSeeTheTV, MSGBOX_DEFAULT closemessage diff --git a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc index a7b062096f..b6ad2e4e6f 100644 --- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc @@ -115,7 +115,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect:: LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator:: special CloseDeptStoreElevatorWindow closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 waitse special MoveElevator diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc index e1167ad7ea..ab4616cb50 100644 --- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc @@ -24,7 +24,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_LotteryClerk:: copyvar VAR_0x8008, VAR_RESULT special BufferLottoTicketNumber msgbox LilycoveCity_DepartmentStore_1F_Text_TicketNumberIsXPleaseWait, MSGBOX_DEFAULT - applymovement LOCALID_LOTTERY_CLERK, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_LOTTERY_CLERK, Common_Movement_WalkInPlaceFasterRight waitmovement 0 playse SE_PC_ON special DoLotteryCornerComputerEffect diff --git a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc index 185d49551c..d1d074c8ce 100644 --- a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc @@ -145,7 +145,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal:: LilycoveCity_DepartmentStore_5F_EventScript_WomanLegendaryWeather:: msgbox LilycoveCity_DepartmentStore_5F_Text_ClosedRooftopForWeather, MSGBOX_DEFAULT closemessage - applymovement LOCALID_WOMAN, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_WOMAN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index 0e15c20486..216a6ff033 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -252,7 +252,7 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: call LilycoveCity_Harbor_EventScript_GetEventTicketSailor msgbox EventTicket_Text_OldSeaMapTooFar, MSGBOX_DEFAULT closemessage - applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN applymovement LOCALID_FERRY_SAILOR, Common_Movement_ExclamationMark @@ -334,12 +334,12 @@ LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime:: LilycoveCity_Harbor_EventScript_ExitFirstTimeTicketSailSelect:: msgbox EventTicket_Text_AsYouLike, MSGBOX_DEFAULT closemessage - applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 30 removeobject LOCALID_FERRY_SAILOR delay 30 - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterDown waitmovement 0 showobjectat LOCALID_ATTENDANT, MAP_LILYCOVE_CITY_HARBOR delay 30 @@ -348,7 +348,7 @@ LilycoveCity_Harbor_EventScript_ExitFirstTimeTicketSailSelect:: end LilycoveCity_Harbor_EventScript_GetEventTicketSailor:: - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestUp + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 30 hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR @@ -360,7 +360,7 @@ LilycoveCity_Harbor_EventScript_GetEventTicketSailor:: return LilycoveCity_Harbor_EventScript_BoardFerryWithSailor:: - applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_FERRY_SAILOR, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 30 removeobject LOCALID_FERRY_SAILOR @@ -424,7 +424,7 @@ LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind:: LilycoveCity_Harbor_EventScript_BoardFerry:: msgbox LilycoveCity_Harbor_Text_PleaseBoard, MSGBOX_DEFAULT closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestUp + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 30 hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR @@ -455,7 +455,7 @@ LilycoveCity_Harbor_EventScript_ExitSailSelect:: LilycoveCity_Harbor_Movement_PlayerBoardFerryEast: walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LilycoveCity_Harbor_Movement_PlayerBoardFerryNorth: @@ -490,7 +490,7 @@ LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast:: return LilycoveCity_Harbor_Movement_SailorOutOfWayNorth: - walk_in_place_fastest_right + walk_in_place_faster_right lock_facing_direction walk_left unlock_facing_direction @@ -503,22 +503,22 @@ LilycoveCity_Harbor_Movement_SailorOutOfWayEast: step_end LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth:: - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast:: - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return LilycoveCity_Harbor_EventScript_BrineyFacePlayerNorth:: - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return LilycoveCity_Harbor_EventScript_BrineyFacePlayerEast:: - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -537,7 +537,7 @@ LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast:: return LilycoveCity_Harbor_Movement_BrineyBoardFerry: - walk_in_place_fastest_up + walk_in_place_faster_up delay_8 set_invisible step_end @@ -554,7 +554,7 @@ LilycoveCity_Harbor_Movement_SailorBoardWithBrineyNorth: delay_16 delay_16 walk_right - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 set_invisible step_end @@ -562,7 +562,7 @@ LilycoveCity_Harbor_Movement_SailorBoardWithBrineyNorth: LilycoveCity_Harbor_Movement_PlayerBoardWithBrineyEast: delay_16 walk_right - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 set_invisible step_end diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index 27b59502cd..929bba3e17 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -83,7 +83,7 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_ShowExhibitHall:: end LilycoveCity_LilycoveMuseum_2F_Movement_PlayerWalkInPlaceLeft: - walk_in_place_fastest_left + walk_in_place_faster_left step_end LilycoveCity_LilycoveMuseum_2F_Movement_FaceExhibitHall: diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc index 211073c581..63e7084880 100644 --- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc +++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc @@ -20,18 +20,18 @@ LilycoveCity_PokemonTrainerFanClub_OnFrame: LilycoveCity_PokemonTrainerFanClub_EventScript_MeetFirstFans:: lockall - applymovement LOCALID_LASS, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_LASS, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox LilycoveCity_PokemonTrainerFanClub_Text_OhWowItsPlayer, MSGBOX_DEFAULT applymovement LOCALID_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlWatchPlayer applymovement LOCALID_MAN, LilycoveCity_PokemonTrainerFanClub_Movement_FanApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox LilycoveCity_PokemonTrainerFanClub_Text_HeardAboutYouImYourFan, MSGBOX_DEFAULT applymovement LOCALID_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlMoveCloserToPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 applymovement LOCALID_LITTLE_GIRL, LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlHideFromPlayer waitmovement 0 @@ -41,7 +41,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_MeetFirstFans:: LilycoveCity_PokemonTrainerFanClub_Movement_FanApproachPlayer: delay_8 - walk_in_place_fastest_down + walk_in_place_faster_down walk_down walk_down walk_down @@ -60,7 +60,7 @@ LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlWatchPlayer: LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlMoveCloserToPlayer: walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlHideFromPlayer: @@ -68,7 +68,7 @@ LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlHideFromPlayer: walk_fast_up walk_fast_up walk_fast_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end LilycoveCity_PokemonTrainerFanClub_OnTransition: diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc index 2d74a26183..1936b5ad83 100644 --- a/data/maps/LittlerootTown/scripts.inc +++ b/data/maps/LittlerootTown/scripts.inc @@ -185,7 +185,7 @@ LittlerootTown_Movement_MomExitHouse: LittlerootTown_Movement_MomApproachPlayerAtTruck: walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_Movement_MomApproachDoor: @@ -203,7 +203,7 @@ LittlerootTown_Movement_PlayerApproachDoor: delay_16 delay_8 walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_PlayerEnterHouse: @@ -347,7 +347,7 @@ LittlerootTown_Movement_TwinReturnLeft: walk_left walk_left walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end LittlerootTown_Movement_PushPlayerBackFromRoute: @@ -387,14 +387,14 @@ LittlerootTown_Movement_TwinReturnRight: walk_left walk_left walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end LittlerootTown_EventScript_GoSaveBirchTrigger:: lockall - applymovement LOCALID_TWIN, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_TWIN, Common_Movement_WalkInPlaceFasterRight waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 special GetPlayerBigGuyGirlString msgbox LittlerootTown_Text_CanYouGoSeeWhatsHappening, MSGBOX_DEFAULT @@ -525,12 +525,12 @@ LittlerootTown_EventScript_SetHomeDoorCoordsFemale:: return LittlerootTown_EventScript_MomNoticePlayerMale:: - applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return LittlerootTown_EventScript_MomNoticePlayerFemale:: - applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -565,70 +565,70 @@ LittlerootTown_EventScript_MomApproachPlayerFemale:: return LittlerootTown_EventScript_MomApproachPlayer0:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayer0 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayer1:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayer1 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerMale2:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerMale2 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerMale3:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerMale3 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerMale4:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerMale4 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerMale5:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerMale5 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerFemale2:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerFemale2 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerFemale3:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerFemale3 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerFemale4:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerFemale4 waitmovement 0 return LittlerootTown_EventScript_MomApproachPlayerFemale5:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 applymovement LOCALID_MOM, LittlerootTown_Movement_MomApproachPlayerFemale5 waitmovement 0 @@ -861,7 +861,7 @@ LittlerootTown_Movement_MomReturnHomeMale2: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_MomReturnHomeMale3: @@ -870,33 +870,33 @@ LittlerootTown_Movement_MomReturnHomeMale3: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_MomReturnHomeMale4: walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_MomReturnHomeMale5: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_MomReturnHomeFemale2: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_MomReturnHomeFemale3: walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_MomReturnHomeFemale4: @@ -905,7 +905,7 @@ LittlerootTown_Movement_MomReturnHomeFemale4: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_MomReturnHomeFemale5: @@ -913,7 +913,7 @@ LittlerootTown_Movement_MomReturnHomeFemale5: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_Movement_MomExitThroughDoor: @@ -929,7 +929,7 @@ LittlerootTown_EventScript_Mom:: compare VAR_RESULT, FEMALE call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsFemale call LittlerootTown_EventScript_GiveRunningShoes - applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterUp waitmovement 0 opendoor VAR_0x8009, VAR_0x800A waitdooranim diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index 9d19519c81..2e4ff739d1 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -100,7 +100,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_YoureNewNeighbor:: waitmovement 0 applymovement LOCALID_RIVAL_MOM, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft applymovement LOCALID_RIVAL_MOM, LittlerootTown_BrendansHouse_1F_Movement_RivalMomApproach waitmovement 0 special GetRivalSonDaughterString @@ -123,7 +123,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_GoSeeRoom:: lockall setvar VAR_0x8004, LOCALID_MOM setvar VAR_0x8005, MALE - applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestLeft + applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 goto PlayersHouse_1F_EventScript_MomGoSeeRoom end @@ -187,7 +187,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_MeetRival:: end LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -207,9 +207,9 @@ LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer2:: return LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer0: - walk_in_place_fastest_left + walk_in_place_faster_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up walk_up @@ -223,9 +223,9 @@ LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer1: step_end LittlerootTown_BrendansHouse_1F_Movement_BrendanApproachPlayer2: - walk_in_place_fastest_right + walk_in_place_faster_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up walk_up @@ -253,48 +253,48 @@ LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2:: LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit0: delay_16 delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right step_end LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit1: delay_16 delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_BrendansHouse_1F_Movement_PlayerWatchBrendanExit2: delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs0: - walk_in_place_fastest_right + walk_in_place_faster_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up step_end LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs1: - walk_in_place_fastest_right + walk_in_place_faster_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up - walk_in_place_fastest_left + walk_in_place_faster_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up walk_up step_end LittlerootTown_BrendansHouse_1F_Movement_BrendanGoUpstairs2: - walk_in_place_fastest_left + walk_in_place_faster_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up step_end diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index 5d6af5cf00..b4db71e290 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -95,7 +95,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan:: LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth:: applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerNorth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage @@ -107,7 +107,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth:: LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth:: applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerSouth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage @@ -119,7 +119,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth:: LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest:: applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerWest waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage @@ -131,7 +131,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest:: LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast:: applymovement LOCALID_RIVAL, LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox RivalsHouse_2F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage @@ -142,7 +142,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast:: LittlerootTown_BrendansHouse_2F_Movement_BrendanEnters: walk_down walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerNorth: @@ -161,17 +161,17 @@ LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCNorth: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanNorth: delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerSouth: @@ -186,22 +186,22 @@ LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCSouth: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanSouth: delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerWest: walk_left walk_left walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCWest: @@ -212,16 +212,16 @@ LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCWest: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanWest: delay_8 delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast: @@ -230,21 +230,21 @@ LittlerootTown_BrendansHouse_2F_Movement_BrendanApproachPlayerEast: walk_left walk_left walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end LittlerootTown_BrendansHouse_2F_Movement_BrendanWalkToPCEast: walk_up walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end @ Unused, the player is already facing this direction so its unneeded LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanEast: delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_BrendansHouse_2F_EventScript_PC:: diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index 80c8c919e3..5fcec19512 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -99,7 +99,7 @@ LittlerootTown_MaysHouse_1F_EventScript_YoureNewNeighbor:: waitmovement 0 applymovement LOCALID_RIVAL_MOM, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight applymovement LOCALID_RIVAL_MOM, LittlerootTown_MaysHouse_1F_Movement_RivalMomApproach waitmovement 0 special GetRivalSonDaughterString @@ -157,7 +157,7 @@ LittlerootTown_MaysHouse_1F_EventScript_GoSeeRoom:: lockall setvar VAR_0x8004, LOCALID_MOM setvar VAR_0x8005, FEMALE - applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestRight + applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterRight waitmovement 0 goto PlayersHouse_1F_EventScript_MomGoSeeRoom end @@ -221,7 +221,7 @@ LittlerootTown_MaysHouse_1F_EventScript_MeetRival:: end LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -241,9 +241,9 @@ LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2:: return LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer0: - walk_in_place_fastest_left + walk_in_place_faster_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up walk_up @@ -257,9 +257,9 @@ LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer1: step_end LittlerootTown_MaysHouse_1F_Movement_MayApproachPlayer2: - walk_in_place_fastest_right + walk_in_place_faster_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up walk_up @@ -287,48 +287,48 @@ LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2:: LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit0: delay_16 delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right step_end LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit1: delay_16 delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_MaysHouse_1F_Movement_PlayerWatchMayExit2: delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs0: - walk_in_place_fastest_right + walk_in_place_faster_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up step_end LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs1: - walk_in_place_fastest_right + walk_in_place_faster_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up - walk_in_place_fastest_left + walk_in_place_faster_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up walk_up step_end LittlerootTown_MaysHouse_1F_Movement_MayGoUpstairs2: - walk_in_place_fastest_left + walk_in_place_faster_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up walk_up walk_up step_end diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index 1483a845c3..af6877a887 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -95,7 +95,7 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMay:: LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth:: applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerNorth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage @@ -107,7 +107,7 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth:: LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth:: applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage @@ -119,7 +119,7 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth:: LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest:: applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage @@ -130,7 +130,7 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest:: LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast:: applymovement LOCALID_RIVAL, LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerEast waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox RivalsHouse_2F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage @@ -142,7 +142,7 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast:: LittlerootTown_MaysHouse_2F_Movement_MayEnters: walk_down walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerNorth: @@ -157,22 +157,22 @@ LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCNorth: walk_up walk_up walk_up - walk_in_place_fastest_right + walk_in_place_faster_right walk_right walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayNorth: delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 delay_16 delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth: @@ -183,20 +183,20 @@ LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerSouth: LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCSouth: walk_up - walk_in_place_fastest_right + walk_in_place_faster_right walk_right walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMaySouth: delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest: @@ -205,28 +205,28 @@ LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerWest: walk_right walk_right walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCWest: walk_up walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end @ Unused, the player is already facing this direction so its unneeded LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayWest: delay_16 delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end LittlerootTown_MaysHouse_2F_Movement_MayApproachPlayerEast: walk_right walk_right walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCEast: @@ -237,15 +237,15 @@ LittlerootTown_MaysHouse_2F_Movement_MayWalkToPCEast: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_MaysHouse_2F_Movement_PlayerWatchMayEast: delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end RivalsHouse_2F_EventScript_Rival:: diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 2bff65b313..0a828c426b 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -191,8 +191,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_UpgradeToNationalDex:: delay 10 playse SE_CLICK delay 20 - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 checkplayergender compare VAR_RESULT, MALE @@ -204,8 +204,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_UpgradeToNationalDex:: delay 20 applymovement LOCALID_BIRCH, LittlerootTown_ProfessorBirchsLab_Movement_BirchReturnPokedex waitmovement 0 - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox LittlerootTown_ProfessorBirchsLab_Text_OkayAllDone, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_ITEM @@ -236,11 +236,11 @@ LittlerootTown_ProfessorBirchsLab_EventScript_BrendanUpgradeComment:: LittlerootTown_ProfessorBirchsLab_Movement_BirchRetrievePokedexes: walk_left - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 walk_right - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 walk_right @@ -251,7 +251,7 @@ LittlerootTown_ProfessorBirchsLab_Movement_BirchRetrievePokedexes: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end LittlerootTown_ProfessorBirchsLab_Movement_BirchReturnPokedex: @@ -263,7 +263,7 @@ LittlerootTown_ProfessorBirchsLab_Movement_BirchReturnPokedex: walk_up walk_up walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end LittlerootTown_ProfessorBirchsLab_EventScript_ChooseJohtoStarter:: @@ -310,7 +310,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_Cyndaquil:: release compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_CYNDAQUIL, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeCyndaquil, MSGBOX_YESNO @@ -323,7 +323,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_Totodile:: release compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_TOTODILE, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeTotodile, MSGBOX_YESNO @@ -336,7 +336,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_Chikorita:: release compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_CHIKORITA, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeChikorita, MSGBOX_YESNO @@ -553,7 +553,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedex:: closemessage applymovement LOCALID_RIVAL, LittlerootTown_ProfessorBirchsLab_Movement_RivalApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 checkplayergender compare VAR_RESULT, MALE @@ -611,7 +611,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_BrendanNoRoomForPokeBalls:: LittlerootTown_ProfessorBirchsLab_Movement_RivalApproachPlayer: walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end LittlerootTown_ProfessorBirchsLab_EventScript_Machine:: diff --git a/data/maps/MagmaHideout_4F/scripts.inc b/data/maps/MagmaHideout_4F/scripts.inc index a89054b7af..ef29d1180a 100644 --- a/data/maps/MagmaHideout_4F/scripts.inc +++ b/data/maps/MagmaHideout_4F/scripts.inc @@ -23,7 +23,7 @@ MagmaHideout_4F_EventScript_Maxie:: playfanfare MUS_AWAKEN_LEGEND playse SE_ORB special DoOrbEffect - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 150 removeobject LOCALID_GROUDON_SLEEPING @@ -55,7 +55,7 @@ MagmaHideout_4F_EventScript_Maxie:: waitmovement 0 msgbox MagmaHideout_4F_Text_MaxieGroudonWhatsWrong, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 applymovement LOCALID_MAXIE, Common_Movement_FacePlayer diff --git a/data/maps/MauvilleCity/scripts.inc b/data/maps/MauvilleCity/scripts.inc index 748fbd3c79..eb243ec593 100644 --- a/data/maps/MauvilleCity/scripts.inc +++ b/data/maps/MauvilleCity/scripts.inc @@ -90,7 +90,7 @@ MauvilleCity_EventScript_UncleAskPlayerToBattleWally:: MauvilleCity_EventScript_Wally:: lockall goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_WallyRequestBattleAgain - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_WallyWantToChallengeGym, MSGBOX_DEFAULT msgbox MauvilleCity_Text_UncleYourePushingIt, MSGBOX_DEFAULT @@ -122,7 +122,7 @@ MauvilleCity_EventScript_WallyAndUncleExitNorth:: applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitNorth1 applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitNorth1 waitmovement 0 - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 applymovement OBJ_EVENT_ID_PLAYER, MauvilleCity_Movement_PlayerFaceUncleNorth @@ -142,7 +142,7 @@ MauvilleCity_EventScript_WallyAndUncleExitEast:: applymovement LOCALID_WALLY, MauvilleCity_Movement_WallyExitEast1 applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleExitEast1 waitmovement 0 - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 applymovement LOCALID_WALLYS_UNCLE, MauvilleCity_Movement_WallysUncleApproachPlayerEast @@ -168,7 +168,7 @@ MauvilleCity_EventScript_DefeatedWally:: call_if_eq MauvilleCity_EventScript_ScottApproachPlayerNorth compare VAR_FACING, DIR_EAST call_if_eq MauvilleCity_EventScript_ScottApproachPlayerEast - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox MauvilleCity_Text_ScottYouDidntHoldBack, MSGBOX_DEFAULT closemessage @@ -209,13 +209,13 @@ MauvilleCity_EventScript_ScottExitEast:: MauvilleCity_EventScript_BattleWally:: msgbox MauvilleCity_Text_WallyHereICome, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_WALLY_MAUVILLE, MauvilleCity_Text_WallyDefeat - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_WallyIllGoBackToVerdanturf, MSGBOX_DEFAULT applymovement LOCALID_WALLY, Common_Movement_FacePlayer waitmovement 0 msgbox MauvilleCity_Text_ThankYouNotEnoughToBattle, MSGBOX_DEFAULT - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MauvilleCity_Text_UncleNoNeedToBeDown, MSGBOX_DEFAULT return @@ -280,35 +280,35 @@ MauvilleCity_Movement_WallyExitEast2: MauvilleCity_Movement_PlayerWatchWallyExitNorth2: delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end MauvilleCity_Movement_PlayerWatchWallyExitEast2: delay_16 delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end MauvilleCity_Movement_PlayerWatchScottExitNorth: delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end MauvilleCity_Movement_PlayerWatchScottExitEast: delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end MauvilleCity_Movement_PlayerWatchWallyExitEast1: delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end MauvilleCity_Movement_PlayerWatchWallyExitNorth1: delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end MauvilleCity_Movement_WallysUncleExitNorth1: @@ -331,13 +331,13 @@ MauvilleCity_Movement_PlayerFaceUncleNorth: delay_16 delay_8 delay_4 - walk_in_place_fastest_down + walk_in_place_faster_down step_end MauvilleCity_Movement_WallysUncleApproachPlayerNorth: walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end MauvilleCity_Movement_WallysUncleApproachPlayerEast: @@ -379,7 +379,7 @@ MauvilleCity_Movement_ScottApproachPlayerNorth: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end MauvilleCity_Movement_ScottApproachPlayerEast: diff --git a/data/maps/MeteorFalls_1F_1R/scripts.inc b/data/maps/MeteorFalls_1F_1R/scripts.inc index 4a40912697..23ae9728de 100644 --- a/data/maps/MeteorFalls_1F_1R/scripts.inc +++ b/data/maps/MeteorFalls_1F_1R/scripts.inc @@ -29,8 +29,8 @@ MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene:: waitmovement 0 msgbox MeteorFalls_1F_1R_Text_WithThisMeteorite, MSGBOX_DEFAULT closemessage - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFastestUp - applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_ExclamationMark @@ -43,9 +43,9 @@ MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene:: waitmovement 0 msgbox MeteorFalls_1F_1R_Text_HoldItRightThereMagma, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 addobject LOCALID_ARCHIE addobject LOCALID_AQUA_GRUNT_1 @@ -55,8 +55,8 @@ MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene:: applymovement LOCALID_AQUA_GRUNT_1, MeteorFalls_1F_1R_Movement_AquaGrunt1Arrive applymovement LOCALID_AQUA_GRUNT_2, MeteorFalls_1F_1R_Movement_AquaGrunt2Arrive waitmovement 0 - applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_MAGMA_GRUNT_1, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_MAGMA_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MeteorFalls_1F_1R_Text_BeSeeingYouTeamAqua, MSGBOX_DEFAULT closemessage @@ -74,10 +74,10 @@ MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene:: applymovement LOCALID_AQUA_GRUNT_2, MeteorFalls_1F_1R_Movement_AquaGrunt2ApproachArchie waitmovement 0 msgbox MeteorFalls_1F_1R_Text_BossWeShouldChaseMagma, MSGBOX_DEFAULT - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox MeteorFalls_1F_1R_Text_ArchieYesNoTellingWhatMagmaWillDo, MSGBOX_DEFAULT - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MeteorFalls_1F_1R_Text_ArchieFarewell, MSGBOX_DEFAULT closemessage @@ -99,7 +99,7 @@ MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene:: MeteorFalls_1F_1R_Movement_MagmaGruntApproachPlayer: walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end MeteorFalls_1F_1R_Movement_MagmaGrunt1Exit: @@ -171,7 +171,7 @@ MeteorFalls_1F_1R_Movement_ArchieApproachPlayer: walk_right walk_up walk_up - walk_in_place_fastest_left + walk_in_place_faster_left step_end MeteorFalls_1F_1R_Movement_AquaGrunt1Exit: @@ -190,7 +190,7 @@ MeteorFalls_1F_1R_Movement_AquaGrunt1ApproachArchie: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end MeteorFalls_1F_1R_Movement_AquaGrunt2Exit: @@ -210,13 +210,13 @@ MeteorFalls_1F_1R_Movement_AquaGrunt2ApproachArchie: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end MeteorFalls_1F_1R_Movement_PushPlayerOutOfWay: - walk_in_place_fastest_down + walk_in_place_faster_down delay_4 - walk_in_place_fastest_right + walk_in_place_faster_right lock_facing_direction walk_left unlock_facing_direction diff --git a/data/maps/MossdeepCity/scripts.inc b/data/maps/MossdeepCity/scripts.inc index 07758873d8..f5af3a391b 100644 --- a/data/maps/MossdeepCity/scripts.inc +++ b/data/maps/MossdeepCity/scripts.inc @@ -286,7 +286,7 @@ MossdeepCity_EventScript_ScottExitEast:: MossdeepCity_Movement_PlayerWatchScottExit: delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end MossdeepCity_Movement_ScottExitNorth: diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index 4d69725b4c..b44b343a65 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -90,7 +90,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma:: compare VAR_RESULT, 1 call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestRight + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterRight waitmovement 0 release end @@ -114,7 +114,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_Scientist:: MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma:: msgbox MossdeepCity_SpaceCenter_1F_Text_MagmaHaveSightsOnSpaceCenter, MSGBOX_DEFAULT - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestRight + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterRight waitmovement 0 release end @@ -147,14 +147,14 @@ MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma:: goto_if_eq Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP msgbox MossdeepCity_SpaceCenter_1F_Text_CantStrollOnBeachWithMagma, MSGBOX_DEFAULT - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestRight + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterRight waitmovement 0 release end MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStoneMagma:: msgbox MossdeepCity_SpaceCenter_1F_Text_CantStrollOnBeachWithMagma, MSGBOX_DEFAULT - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestRight + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterRight waitmovement 0 release end diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index 839ab8f248..044979c123 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -68,13 +68,13 @@ MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts:: trainerbattle_no_intro TRAINER_GRUNT_SPACE_CENTER_5, MossdeepCity_SpaceCenter_2F_Text_Grunt5Defeat applymovement LOCALID_GRUNT_5, MossdeepCity_SpaceCenter_2F_Movement_Grunt5Defeated waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt6Intro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_SPACE_CENTER_6, MossdeepCity_SpaceCenter_2F_Text_Grunt6Defeat applymovement LOCALID_GRUNT_6, MossdeepCity_SpaceCenter_2F_Movement_Grunt6Defeated waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_Grunt7Intro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_SPACE_CENTER_7, MossdeepCity_SpaceCenter_2F_Text_Grunt7Defeat @@ -250,13 +250,13 @@ MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt:: goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle msgbox MossdeepCity_SpaceCenter_2F_Text_StevenHurryGetReadyQuickly, MSGBOX_DEFAULT closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 releaseall end MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle:: - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 special SavePlayerParty fadescreen FADE_TO_BLACK @@ -286,12 +286,12 @@ MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha:: msgbox MossdeepCity_SpaceCenter_2F_Text_MaxieWeFailedIsAquaAlsoMisguided, MSGBOX_DEFAULT closemessage delay 20 - applymovement LOCALID_MAXIE, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_TABITHA, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_MAXIE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_TABITHA, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 60 - applymovement LOCALID_MAXIE, Common_Movement_WalkInPlaceFastestUp - applymovement LOCALID_TABITHA, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_MAXIE, Common_Movement_WalkInPlaceFasterUp + applymovement LOCALID_TABITHA, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 msgbox MossdeepCity_SpaceCenter_2F_Text_MaxieWeWillGiveUp, MSGBOX_DEFAULT diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index 1f5a9e09a9..22b26f3927 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -31,7 +31,7 @@ MossdeepCity_StevensHouse_OnFrame: MossdeepCity_StevensHouse_EventScript_StevenGivesDive:: lockall - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_PIN applymovement LOCALID_STEVEN, Common_Movement_ExclamationMark @@ -62,7 +62,7 @@ MossdeepCity_StevensHouse_Movement_StevenApproachPlayer: walk_left walk_left walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end MossdeepCity_StevensHouse_Movement_StevenReturn: @@ -70,7 +70,7 @@ MossdeepCity_StevensHouse_Movement_StevenReturn: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end MossdeepCity_StevensHouse_EventScript_BeldumPokeball:: diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index cd07667b5b..320e2dc194 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -67,7 +67,7 @@ MtChimney_EventScript_Maxie:: call_if_eq MtChimney_EventScript_ArchieApproachPlayerEast compare VAR_FACING, DIR_NORTH call_if_eq MtChimney_EventScript_ArchieApproachPlayerNorth - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MtChimney_Text_ArchieThankYou, MSGBOX_DEFAULT closemessage @@ -323,7 +323,7 @@ MtChimney_Movement_Unused8: walk_left walk_left walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end MtChimney_Movement_Unused9: @@ -359,7 +359,7 @@ MtChimney_Movement_Unused11: MtChimney_Movement_Unused12: delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 walk_down walk_down @@ -375,7 +375,7 @@ MtChimney_Movement_Unused13: delay_16 delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 walk_down walk_down @@ -390,7 +390,7 @@ MtChimney_Movement_Unused14: MtChimney_Movement_Unused15: walk_left - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 step_end diff --git a/data/maps/MtChimney_CableCarStation/scripts.inc b/data/maps/MtChimney_CableCarStation/scripts.inc index c2e8da486e..a3a2b360e0 100644 --- a/data/maps/MtChimney_CableCarStation/scripts.inc +++ b/data/maps/MtChimney_CableCarStation/scripts.inc @@ -64,7 +64,7 @@ MtChimney_CableCarStation_Movement_LeadPlayerToCableCar: walk_up walk_up walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end MtChimney_CableCarStation_Movement_FollowPlayerOutFromCableCar: diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc index d55872792b..cd58627aff 100644 --- a/data/maps/MtPyre_Summit/scripts.inc +++ b/data/maps/MtPyre_Summit/scripts.inc @@ -42,7 +42,7 @@ MtPyre_Summit_EventScript_TeamAquaExits:: playbgm MUS_ENCOUNTER_AQUA, FALSE applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 compare VAR_0x8008, 0 @@ -95,7 +95,7 @@ MtPyre_Summit_EventScript_ArchieFacePlayer2:: MtPyre_Summit_EventScript_OldLadyApproachPlayer0:: applymovement LOCALID_OLD_LADY, MtPyre_Summit_Movement_OldLadyApproachPlayer0 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -107,14 +107,14 @@ MtPyre_Summit_EventScript_OldLadyApproachPlayer1:: MtPyre_Summit_EventScript_OldLadyApproachPlayer2:: applymovement LOCALID_OLD_LADY, MtPyre_Summit_Movement_OldLadyApproachPlayer2 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return MtPyre_Summit_Movement_OldLadyApproachPlayer0: walk_down walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end MtPyre_Summit_Movement_OldLadyApproachPlayer1: @@ -124,17 +124,17 @@ MtPyre_Summit_Movement_OldLadyApproachPlayer1: MtPyre_Summit_Movement_OldLadyApproachPlayer2: walk_down walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end MtPyre_Summit_Movement_ArchieFacePlayer0: walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end MtPyre_Summit_Movement_ArchieFacePlayer2: walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end MtPyre_Summit_EventScript_OldMan:: @@ -216,7 +216,7 @@ MtPyre_Summit_EventScript_ArchieMaxieTrigger2:: end MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 60 compare VAR_0x8008, 0 @@ -301,7 +301,7 @@ MtPyre_Summit_EventScript_MaxieApproachArchie0:: applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie0 waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -309,7 +309,7 @@ MtPyre_Summit_EventScript_MaxieApproachArchie1:: applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie1 waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -317,20 +317,20 @@ MtPyre_Summit_EventScript_MaxieApproachArchie2:: applymovement OBJ_EVENT_ID_PLAYER, MtPyre_Summit_Movement_PlayerWatchMaxie applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieApproachArchie2 waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return MtPyre_Summit_Movement_PlayerFaceMaxie0: delay_16 delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end MtPyre_Summit_Movement_PlayerFaceMaxie: delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end MtPyre_Summit_Movement_ArchieExit: @@ -355,26 +355,26 @@ MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit0: delay_16 delay_8 walk_left - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit1: delay_16 delay_8 walk_right - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end MtPyre_Summit_Movement_PlayerWatchArchieMaxieExit2: delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end MtPyre_Summit_Movement_MaxieApproachPlayer0: @@ -388,24 +388,24 @@ MtPyre_Summit_Movement_MaxieApproachPlayer1: walk_up walk_up walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end MtPyre_Summit_Movement_MaxieApproachPlayer2: walk_up walk_up walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end MtPyre_Summit_Movement_ArchieWatchMaxie: delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up step_end MtPyre_Summit_Movement_PlayerWatchMaxie: delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end MtPyre_Summit_Movement_MaxieApproachArchie0: @@ -413,21 +413,21 @@ MtPyre_Summit_Movement_MaxieApproachArchie0: walk_right walk_down walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end MtPyre_Summit_Movement_MaxieApproachArchie1: walk_down walk_down walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end MtPyre_Summit_Movement_MaxieApproachArchie2: walk_down walk_down walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end MtPyre_Summit_EventScript_Grunt1:: diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index 586085cbfb..b12e62248f 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -12,7 +12,7 @@ NavelRock_Harbor_EventScript_Sailor:: goto_if_eq NavelRock_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 hideobjectat LOCALID_SAILOR, MAP_NAVEL_ROCK_HARBOR diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 7bc134d502..0a98d4ba62 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -23,7 +23,7 @@ NewMauville_Entrance_OnTransition: NewMauville_Entrance_EventScript_Door:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT checkitem ITEM_BASEMENT_KEY, 1 diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc index 8ba0e4d25d..7d4ce4389e 100644 --- a/data/maps/OldaleTown/scripts.inc +++ b/data/maps/OldaleTown/scripts.inc @@ -103,7 +103,7 @@ OldaleTown_Movement_EmployeeEast: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end OldaleTown_Movement_EmployeeSouth: @@ -116,7 +116,7 @@ OldaleTown_Movement_EmployeeSouth: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end OldaleTown_Movement_EmployeeNorth: @@ -127,7 +127,7 @@ OldaleTown_Movement_EmployeeNorth: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end OldaleTown_Movement_Unknown1: @@ -143,7 +143,7 @@ OldaleTown_Movement_Unknown1: walk_up walk_up delay_8 - walk_in_place_fastest_down + walk_in_place_faster_down step_end OldaleTown_Movement_PlayerEast: @@ -232,7 +232,7 @@ OldaleTown_EventScript_RivalTrigger1:: lockall applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalApproachPlayer1 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 setvar VAR_0x8009, 1 goto OldaleTown_EventScript_ShowRivalMessage @@ -242,7 +242,7 @@ OldaleTown_EventScript_RivalTrigger2:: lockall applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalApproachPlayer2 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 setvar VAR_0x8009, 1 goto OldaleTown_EventScript_ShowRivalMessage @@ -252,7 +252,7 @@ OldaleTown_EventScript_RivalTrigger3:: lockall applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalApproachPlayer3 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 setvar VAR_0x8009, 1 goto OldaleTown_EventScript_ShowRivalMessage @@ -328,7 +328,7 @@ OldaleTown_Movement_RivalExit: OldaleTown_Movement_WatchRivalExit: delay_8 delay_4 - walk_in_place_fastest_down + walk_in_place_faster_down step_end OldaleTown_Movement_PlayerStepBack: @@ -338,7 +338,7 @@ OldaleTown_Movement_PlayerStepBack: OldaleTown_Movement_BackUp: walk_fast_up - walk_in_place_fastest_left + walk_in_place_faster_left lock_facing_direction walk_right unlock_facing_direction diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc index 49f1efadb2..a77939c4de 100644 --- a/data/maps/PetalburgCity/scripts.inc +++ b/data/maps/PetalburgCity/scripts.inc @@ -50,7 +50,7 @@ PetalburgCity_EventScript_WallyTutorial:: special StartWallyTutorialBattle waitstate msgbox Route102_Text_WallyIDidIt, MSGBOX_DEFAULT - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFastestLeft, MAP_PETALBURG_CITY + applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterLeft, MAP_PETALBURG_CITY waitmovement LOCALID_WALLY, MAP_PETALBURG_CITY msgbox Route102_Text_LetsGoBack, MSGBOX_DEFAULT closemessage @@ -186,7 +186,7 @@ PetalburgCity_Movement_WallyTutorialPlayer: walk_right walk_up walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end PetalburgCity_Movement_WallyTutorialWally: @@ -222,10 +222,10 @@ PetalburgCity_Movement_WallyTutorialWally: walk_up walk_right delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end PetalburgCity_EventScript_GymSign:: @@ -296,8 +296,8 @@ PetalburgCity_EventScript_ShowGymToPlayer:: compare VAR_0x8008, 3 call_if_eq PetalburgCity_EventScript_LeadPlayerToGym3 msgbox PetalburgCity_Text_ThisIsPetalburgGym, MSGBOX_DEFAULT - applymovement LOCALID_GYM_BOY, Common_Movement_WalkInPlaceFastestRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_GYM_BOY, Common_Movement_WalkInPlaceFasterRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox PetalburgCity_Text_ThisIsGymSign, MSGBOX_DEFAULT closemessage @@ -310,7 +310,7 @@ PetalburgCity_EventScript_ShowGymToPlayer:: PetalburgCity_EventScript_BoyApproachPlayer0:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyApproachPlayer0 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -322,14 +322,14 @@ PetalburgCity_EventScript_BoyApproachPlayer1:: PetalburgCity_EventScript_BoyApproachPlayer2:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyApproachPlayer2 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_EventScript_BoyApproachPlayer3:: applymovement LOCALID_GYM_BOY, PetalburgCity_Movement_BoyApproachPlayer3 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return @@ -368,7 +368,7 @@ PetalburgCity_Movement_BoyApproachPlayer0: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgCity_Movement_BoyApproachPlayer1: @@ -380,7 +380,7 @@ PetalburgCity_Movement_BoyApproachPlayer2: walk_right walk_right walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end PetalburgCity_Movement_BoyApproachPlayer3: @@ -388,7 +388,7 @@ PetalburgCity_Movement_BoyApproachPlayer3: walk_right walk_right walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end PetalburgCity_Movement_BoyWalkToGym0: @@ -401,7 +401,7 @@ PetalburgCity_Movement_BoyWalkToGym0: walk_right walk_up walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgCity_Movement_BoyWalkToGym1: @@ -417,7 +417,7 @@ PetalburgCity_Movement_BoyWalkToGym1: walk_up walk_up walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgCity_Movement_BoyWalkToGym2: @@ -430,7 +430,7 @@ PetalburgCity_Movement_BoyWalkToGym2: walk_right walk_up walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgCity_Movement_BoyWalkToGym3: @@ -444,7 +444,7 @@ PetalburgCity_Movement_BoyWalkToGym3: walk_up walk_up walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgCity_Movement_BoyWalkAway: @@ -556,17 +556,17 @@ PetalburgCity_EventScript_Scott:: waitmovement 0 applymovement LOCALID_SCOTT, PetalburgCity_Movement_ScottApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 setvar VAR_SCOTT_STATE, 1 msgbox PetalburgCity_Text_AreYouATrainer, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 30 msgbox PetalburgCity_Text_WellMaybeNot, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 30 msgbox PetalburgCity_Text_ImLookingForTalentedTrainers, MSGBOX_DEFAULT @@ -640,11 +640,11 @@ PetalburgCity_Movement_ScottExit0: PetalburgCity_Movement_PlayerWatchScottExit0: delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end PetalburgCity_Movement_ScottExit1: @@ -664,10 +664,10 @@ PetalburgCity_Movement_ScottExit1: PetalburgCity_Movement_PlayerWatchScottExit1: delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end PetalburgCity_Movement_ScottExit2: @@ -687,10 +687,10 @@ PetalburgCity_Movement_ScottExit2: PetalburgCity_Movement_PlayerWatchScottExit2: delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end PetalburgCity_Movement_ScottExit3: @@ -710,10 +710,10 @@ PetalburgCity_Movement_ScottExit3: PetalburgCity_Movement_PlayerWatchScottExit3: delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end PetalburgCity_EventScript_GymBoy:: diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index 43e8c4108c..cae696a50a 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -88,14 +88,14 @@ PetalburgCity_Gym_EventScript_ReturnFromWallyTutorial:: msgbox PetalburgCity_Gym_Text_DadSoDidItWorkOut, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_WallyThankYouBye, MSGBOX_DEFAULT closemessage - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyExitGym waitmovement 0 playse SE_EXIT removeobject LOCALID_WALLY setflag FLAG_HIDE_PETALBURG_CITY_WALLY delay 30 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PetalburgCity_Gym_Text_DadGoCollectBadges, MSGBOX_DEFAULT setvar VAR_PETALBURG_GYM_STATE, 2 @@ -226,7 +226,7 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorial:: end PetalburgCity_Gym_EventScript_WallyArriveSouth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyArrive waitmovement 0 return @@ -234,20 +234,20 @@ PetalburgCity_Gym_EventScript_WallyArriveSouth:: PetalburgCity_Gym_EventScript_WallyArriveNorth:: applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyArriveNorth waitmovement 0 - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PetalburgCity_Gym_EventScript_WallyArriveWestEast:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyArrive waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallySouth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown applymovement LOCALID_WALLY, PetalburgCity_Gym_Movement_WallyExitSouthWest applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallySouth waitmovement 0 @@ -272,45 +272,45 @@ PetalburgCity_Gym_EventScript_ExitGymWithWallyEast:: return PetalburgCity_Gym_EventScript_NormanAddressPlayerSouth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressPlayerWest:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressPlayerEast:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestLeft - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressWallySouth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressWallyNorth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressWallyWest:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_NormanAddressWallyEast:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -320,7 +320,7 @@ PetalburgCity_Gym_EventScript_WallyFacePlayer:: return PetalburgCity_Gym_EventScript_WallyFaceDown:: - applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_WALLY, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -349,7 +349,7 @@ PetalburgCity_Gym_EventScript_NormanFaceDoorSouth:: @ For all other NormanFaceDoorX, Norman is already facing the door from NormanAddressWallyX PetalburgCity_Gym_EventScript_NormanFaceDoorNorth:: - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -503,47 +503,47 @@ PetalburgCity_Gym_EventScript_WallysDadArrives:: end PetalburgCity_Gym_EventScript_WallysDadFaceNormanNorth:: - applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadFaceNormanEast:: - applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadFaceNormanWest:: - applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_WALLYS_DAD, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadApproachPlayerNorth:: applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerNorth waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadApproachPlayerEast:: applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerEast waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_WallysDadApproachPlayerWest:: applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadApproachPlayerWest waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return PetalburgCity_Gym_EventScript_ExitGymWithWallysDadNorth:: applymovement LOCALID_WALLYS_DAD, PetalburgCity_Gym_Movement_WallysDadExitNorth - applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_NORMAN, Common_Movement_WalkInPlaceFasterDown applymovement OBJ_EVENT_ID_PLAYER, PetalburgCity_Gym_Movement_PlayerExitWithWallysDadNorth waitmovement 0 return @@ -567,7 +567,7 @@ PetalburgCity_Gym_Movement_WallysDadExitNorth: walk_left walk_down walk_down - walk_in_place_fastest_up + walk_in_place_faster_up delay_8 walk_in_place_down set_invisible @@ -580,7 +580,7 @@ PetalburgCity_Gym_Movement_WallysDadExitEast: walk_left walk_down walk_down - walk_in_place_fastest_up + walk_in_place_faster_up delay_8 walk_in_place_down set_invisible @@ -595,7 +595,7 @@ PetalburgCity_Gym_Movement_WallysDadExitWest: walk_left walk_down walk_down - walk_in_place_fastest_up + walk_in_place_faster_up delay_8 walk_in_place_down set_invisible @@ -636,11 +636,11 @@ PetalburgCity_Gym_Movement_PlayerExitWithWallysDadWest: PetalburgCity_Gym_Movement_WallysDadEnterGym: walk_up delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgCity_Gym_Movement_WallysDadApproachPlayerNorth: @@ -649,7 +649,7 @@ PetalburgCity_Gym_Movement_WallysDadApproachPlayerNorth: walk_up walk_up walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end PetalburgCity_Gym_Movement_WallysDadApproachPlayerEast: @@ -671,14 +671,14 @@ PetalburgCity_Gym_Movement_WallysDadApproachPlayerWest: step_end PetalburgCity_Gym_Movement_Unused: - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 delay_16 delay_16 delay_16 delay_8 - walk_in_place_fastest_down + walk_in_place_faster_down step_end PetalburgCity_Gym_Movement_WallyArriveNorth: @@ -690,7 +690,7 @@ PetalburgCity_Gym_Movement_WallyArriveNorth: walk_right walk_up walk_up - walk_in_place_fastest_left + walk_in_place_faster_left step_end PetalburgCity_Gym_Movement_WallyArrive: @@ -707,7 +707,7 @@ PetalburgCity_Gym_Movement_WallyExitNorth: walk_down walk_down walk_down - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 walk_in_place_down step_end @@ -717,7 +717,7 @@ PetalburgCity_Gym_Movement_WallyExitEast: walk_down walk_right walk_down - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 walk_in_place_down step_end @@ -726,7 +726,7 @@ PetalburgCity_Gym_Movement_WallyExitSouthWest: walk_down walk_down walk_down - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 walk_in_place_down step_end @@ -764,7 +764,7 @@ PetalburgCity_Gym_Movement_PlayerExitWithWallyWest: step_end PetalburgCity_Gym_Movement_PlayerExitWithWallyEast: - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 walk_down diff --git a/data/maps/PetalburgWoods/scripts.inc b/data/maps/PetalburgWoods/scripts.inc index 2ade896421..dd2d9273f5 100644 --- a/data/maps/PetalburgWoods/scripts.inc +++ b/data/maps/PetalburgWoods/scripts.inc @@ -18,7 +18,7 @@ PetalburgWoods_EventScript_DevonResearcherLeft:: closemessage applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaApproachResearcherLeft waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PetalburgWoods_Text_HandOverThosePapers, MSGBOX_DEFAULT closemessage @@ -44,7 +44,7 @@ PetalburgWoods_EventScript_DevonResearcherRight:: call PetalburgWoods_EventScript_DevonResearcherIntro applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherApproachPlayerRight waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox PetalburgWoods_Text_HaveYouSeenShroomish, MSGBOX_DEFAULT closemessage @@ -55,14 +55,14 @@ PetalburgWoods_EventScript_DevonResearcherRight:: closemessage applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaApproachResearcherRight waitmovement 0 - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PetalburgWoods_Text_HandOverThosePapers, MSGBOX_DEFAULT closemessage applymovement LOCALID_DEVON_EMPLOYEE, PetalburgWoods_Movement_DevonResearcherFleeToPlayerRight waitmovement 0 msgbox PetalburgWoods_Text_YouHaveToHelpMe, MSGBOX_DEFAULT - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PetalburgWoods_Text_NoOneCrossesTeamAqua, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_GRUNT_PETALBURG_WOODS, PetalburgWoods_Text_YoureKiddingMe @@ -88,7 +88,7 @@ PetalburgWoods_EventScript_DevonResearcherPostBattle:: applymovement LOCALID_GRUNT, PetalburgWoods_Movement_AquaRunAway waitmovement 0 removeobject LOCALID_GRUNT - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox PetalburgWoods_Text_ThatWasAwfullyClose, MSGBOX_DEFAULT giveitem ITEM_GREAT_BALL @@ -159,7 +159,7 @@ PetalburgWoods_Movement_DevonResearcherApproachPlayerRight: walk_down walk_down walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end PetalburgWoods_Movement_DevonResearcherExitRight: @@ -176,7 +176,7 @@ PetalburgWoods_Movement_DevonResearcherExitRight: PetalburgWoods_Movement_WatchResearcherLeave: delay_16 delay_16 - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgWoods_Movement_DevonResearcherFleeToPlayerLeft: @@ -184,17 +184,17 @@ PetalburgWoods_Movement_DevonResearcherFleeToPlayerLeft: walk_fast_down walk_fast_down walk_fast_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgWoods_Movement_DevonResearcherFleeToPlayerRight: walk_fast_down walk_fast_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end PetalburgWoods_Movement_DevonResearcherStartExit: - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 delay_16 diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index d83c8213b6..a41bc2fcbc 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -33,7 +33,7 @@ Route101_EventScript_StartBirchRescue:: applymovement LOCALID_ZIGZAGOON, Route101_Movement_ZigzagoonChaseInCircles applymovement LOCALID_BIRCH, Route101_Movement_BirchRunInCircles waitmovement 0 - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 applymovement LOCALID_ZIGZAGOON, Route101_Movement_ZigzagoonFaceBirch applymovement LOCALID_BIRCH, Route101_Movement_BirchFaceZigzagoon @@ -140,7 +140,7 @@ Route101_Movement_EnterScene: walk_fast_up walk_fast_up walk_fast_up - walk_in_place_fastest_left + walk_in_place_faster_left step_end Route101_Movement_BirchRunInCircles: @@ -226,7 +226,7 @@ Route101_EventScript_BirchsBag:: fadescreen FADE_TO_BLACK removeobject LOCALID_ZIGZAGOON setobjectxy OBJ_EVENT_ID_PLAYER, 6, 13 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 special ChooseStarter waitstate diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index f0ac53949d..4553f431c0 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -169,9 +169,9 @@ Route103_EventScript_RivalExitFacingNorth2: Route103_Movement_WatchRivalExitFacingNorth: delay_16 delay_4 - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route103_Movement_RivalExit1: @@ -188,7 +188,7 @@ Route103_Movement_RivalExit2: Route103_Movement_WatchRivalExitFacingEastOrWest: delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route103_EventScript_Boy:: diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index e527c055e3..d58bc50600 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -55,7 +55,7 @@ Route104_EventScript_RivalTrigger:: setflag FLAG_HIDE_RUSTBORO_CITY_RIVAL setvar VAR_RUSTBORO_CITY_STATE, 8 setvar VAR_ROUTE104_STATE, 2 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 10 addobject LOCALID_RIVAL @@ -139,7 +139,7 @@ Route104_Movement_RivalApproachPlayer: Route104_Movement_PlayerFaceRival: delay_4 - walk_in_place_fastest_left + walk_in_place_faster_left step_end Route104_EventScript_MayAskToBattle:: @@ -446,122 +446,122 @@ Route104_Movement_SailToDewfordBeforeDadCalls: walk_fast_down walk_fast_down walk_fast_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down walk_fast_down walk_fast_down walk_fast_down walk_fast_down walk_fast_right walk_fast_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right walk_fast_right walk_fast_right walk_fast_down walk_fast_down walk_fast_down walk_fast_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down step_end Route104_Movement_SailToDewfordAfterDadCalls: - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down walk_fast_down walk_fast_down walk_fast_down @@ -570,46 +570,46 @@ Route104_Movement_SailToDewfordAfterDadCalls: walk_fast_right walk_fast_right walk_fast_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right walk_fast_right walk_fast_right walk_fast_right @@ -646,119 +646,119 @@ Route104_Movement_SailToDewford: walk_fast_down walk_fast_down walk_fast_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down walk_fast_down walk_fast_down walk_fast_down walk_fast_down walk_fast_right walk_fast_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right walk_fast_right walk_fast_right walk_fast_down walk_fast_down walk_fast_down walk_fast_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down walk_fast_down walk_fast_down walk_fast_down @@ -767,46 +767,46 @@ Route104_Movement_SailToDewford: walk_fast_right walk_fast_right walk_fast_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right - walk_fastest_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right + walk_faster_right walk_fast_right walk_fast_right walk_fast_right @@ -847,7 +847,7 @@ Route104_Movement_PlayerExitBoat: Route104_Movement_PlayerMoveForBriney: walk_down walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end Route104_Movement_BrineyBoardBoat: @@ -857,7 +857,7 @@ Route104_Movement_BrineyBoardBoat: Route104_Movement_BrineyExitBoat: walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end Route104_EventScript_Ivan:: diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index 6c38a8bd76..03bd51b43d 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -66,167 +66,167 @@ Route109_EventScript_DoSailToDewford:: end Route109_Movement_SailToDewford: - walk_in_place_fastest_down + walk_in_place_faster_down walk_down walk_down walk_fast_down walk_fast_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down - walk_fastest_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down + walk_faster_down walk_fast_down walk_fast_down walk_fast_left walk_fast_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left - walk_fastest_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left + walk_faster_left walk_fast_left walk_fast_left walk_fast_left @@ -238,7 +238,7 @@ Route109_Movement_SailToDewford: walk_fast_left walk_left walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route109_Movement_PlayerEnterBoatSouth: @@ -250,7 +250,7 @@ Route109_Movement_PlayerExitBoat: walk_down walk_down walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end Route109_Movement_PlayerEnterBoatEast: @@ -269,7 +269,7 @@ Route109_Movement_BrineyEnterBoat: Route109_Movement_BrineyExitBoat: walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end Route109_EventScript_MrBriney:: diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc index e9caf68ade..abb42cc127 100644 --- a/data/maps/Route110/scripts.inc +++ b/data/maps/Route110/scripts.inc @@ -312,7 +312,7 @@ Route110_EventScript_Alyssa:: Route110_EventScript_CyclingChallengeEnd:: lockall - applymovement LOCALID_CHALLENGE_BIKER, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_CHALLENGE_BIKER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 call Route110_EventScript_CyclingChallengeResults releaseall @@ -388,7 +388,7 @@ Route110_EventScript_RivalScene:: call_if_eq Route110_EventScript_PlayMayMusic compare VAR_RESULT, FEMALE call_if_eq Route110_EventScript_PlayBrendanMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark waitmovement 0 @@ -552,7 +552,7 @@ Route110_EventScript_MoveRival3:: Route110_Movement_RivalApproachPlayer1: walk_down walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route110_Movement_RivalApproachPlayer2: @@ -562,7 +562,7 @@ Route110_Movement_RivalApproachPlayer2: Route110_Movement_RivalApproachPlayer3: walk_down walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route110_Movement_RivalExit1: @@ -636,13 +636,13 @@ Route110_EventScript_BirchScene:: msgbox Route110_Text_ImagineSeeingYouHere, MSGBOX_DEFAULT closemessage delay 20 - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 10 - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 - applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 msgbox Route110_Text_HeardYouInstallMatchCall, MSGBOX_DEFAULT diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc index 9167cbd34a..f30d74f01c 100644 --- a/data/maps/Route110_TrickHouseEnd/scripts.inc +++ b/data/maps/Route110_TrickHouseEnd/scripts.inc @@ -214,22 +214,22 @@ Route110_TrickHouseEnd_EventScript_NoRoomForTent:: return Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwaySouth:: - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayNorth:: - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayWest:: - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayEast:: - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -243,7 +243,7 @@ Route110_TrickHouseEnd_EventScript_TrickMasterExitTrigger:: applymovement LOCALID_TRICK_MASTER, Route110_TrickHouseEnd_Movement_TrickMasterSurprise waitmovement 0 playse SE_M_EXPLOSION - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox Route110_TrickHouseEnd_Text_YoureIgnoringMe, MSGBOX_DEFAULT closemessage diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index 9375f2046f..e756feadca 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -343,7 +343,7 @@ Route110_TrickHouseEntrance_EventScript_StillMakingPuzzle:: applymovement LOCALID_TRICK_MASTER, Common_Movement_Delay48 waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_InMidstOfDevisingNewChallenges, MSGBOX_DEFAULT - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end @@ -441,7 +441,7 @@ Route110_TrickHouseEntrance_EventScript_GivePuzzle7Reward:: Route110_TrickHouseEntrance_EventScript_GotReward:: setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 setvar VAR_TRICK_HOUSE_ENTRANCE_STATE, 3 - applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_TRICK_MASTER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 95f262dd24..72e30958a5 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -294,7 +294,7 @@ Route111_EventScript_Victor:: Route111_EventScript_BattleWinstrates:: msgbox Route111_Text_VictorIntro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_VICTOR, Route111_Text_VictorDefeat - applymovement LOCALID_VICTOR, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_VICTOR, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call Route111_EventScript_OpenWinstrateDoor msgbox Route111_Text_VictorPostBattle, MSGBOX_DEFAULT @@ -312,7 +312,7 @@ Route111_EventScript_BattleWinstrates:: call Route111_EventScript_CloseWinstrateDoor msgbox Route111_Text_VictoriaIntro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_VICTORIA, Route111_Text_VictoriaDefeat - applymovement LOCALID_VICTORIA, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_VICTORIA, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call Route111_EventScript_OpenWinstrateDoor msgbox Route111_Text_VictoriaPostBattle, MSGBOX_DEFAULT @@ -330,7 +330,7 @@ Route111_EventScript_BattleWinstrates:: call Route111_EventScript_CloseWinstrateDoor msgbox Route111_Text_ViviIntro, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_VIVI, Route111_Text_ViviDefeat - applymovement LOCALID_VIVI, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_VIVI, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call Route111_EventScript_OpenWinstrateDoor msgbox Route111_Text_ViviPostBattle, MSGBOX_DEFAULT @@ -350,7 +350,7 @@ Route111_EventScript_BattleWinstrates:: trainerbattle_no_intro TRAINER_VICKY, Route111_Text_VickyDefeat msgbox Route111_Text_VickyPostBattle, MSGBOX_DEFAULT closemessage - applymovement LOCALID_VICKY, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_VICKY, Common_Movement_WalkInPlaceFasterUp waitmovement 0 call Route111_EventScript_OpenWinstrateDoor applymovement LOCALID_VICKY, Route111_Movement_WinstrateEnterHouse @@ -371,7 +371,7 @@ Route111_EventScript_CloseWinstrateDoor:: return Route111_Movement_WinstrateEnterHouse: - walk_in_place_fastest_up + walk_in_place_faster_up walk_up step_end diff --git a/data/maps/Route112/scripts.inc b/data/maps/Route112/scripts.inc index 4f9d60206b..abea230be1 100644 --- a/data/maps/Route112/scripts.inc +++ b/data/maps/Route112/scripts.inc @@ -13,7 +13,7 @@ Route112_OnTransition: Route112_EventScript_MagmaGrunts:: lockall delay 40 - applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 msgbox Route112_Text_LeaderGoingToAwakenThing, MSGBOX_DEFAULT @@ -21,7 +21,7 @@ Route112_EventScript_MagmaGrunts:: applymovement LOCALID_GRUNT_1, Common_Movement_FaceOriginalDirection waitmovement 0 delay 40 - applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 msgbox Route112_Text_YeahWeNeedMeteorite, MSGBOX_DEFAULT @@ -29,7 +29,7 @@ Route112_EventScript_MagmaGrunts:: applymovement LOCALID_GRUNT_2, Common_Movement_FaceOriginalDirection waitmovement 0 delay 40 - applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 msgbox Route112_Text_OhThatsWhyCrewWentToFallarbor, MSGBOX_DEFAULT @@ -37,7 +37,7 @@ Route112_EventScript_MagmaGrunts:: applymovement LOCALID_GRUNT_1, Common_Movement_FaceOriginalDirection waitmovement 0 delay 40 - applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 msgbox Route112_Text_CantLetAnyonePassUntilTheyreBack, MSGBOX_DEFAULT diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc index ebc5142ae2..86fe61a05b 100644 --- a/data/maps/Route112_CableCarStation/scripts.inc +++ b/data/maps/Route112_CableCarStation/scripts.inc @@ -65,7 +65,7 @@ Route112_CableCarStation_Movement_LeadPlayerToCableCar: walk_up walk_up walk_right - walk_in_place_fastest_left + walk_in_place_faster_left step_end Route112_CableCarStation_Movement_FollowPlayerOutFromCableCar: diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc index a5181be793..3a6dd785cc 100644 --- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc +++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc @@ -25,8 +25,8 @@ Route114_FossilManiacsTunnel_EventScript_CloseDesertUnderpass:: Route114_FossilManiacsTunnel_EventScript_ManiacMentionCaveIn:: lockall - applymovement LOCALID_FOSSIL_MANIAC, Common_Movement_WalkInPlaceFastestUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_FOSSIL_MANIAC, Common_Movement_WalkInPlaceFasterUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox Route114_FossilManiacsTunnel_Text_NotSafeThatWay, MSGBOX_DEFAULT setvar VAR_FOSSIL_MANIAC_STATE, 2 diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc index 2b974035a0..0ef6a05e1a 100644 --- a/data/maps/Route116/scripts.inc +++ b/data/maps/Route116/scripts.inc @@ -154,8 +154,8 @@ Route116_EventScript_Briney:: Route116_EventScript_BrineyTrigger:: lockall - applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFastestRight - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_BRINEY, Common_Movement_WalkInPlaceFasterRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox Route116_Text_ScoundrelMadeOffWithPeeko, MSGBOX_DEFAULT setvar VAR_ROUTE116_STATE, 2 diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc index 723f3c0b54..5b68804b5b 100644 --- a/data/maps/Route118/scripts.inc +++ b/data/maps/Route118/scripts.inc @@ -134,7 +134,7 @@ Route118_EventScript_StevenExit2:: Route118_Movement_PlayerWatchStevenExit: delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end Route118_Movement_StevenApproachLedge0: diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc index 5e53f4ac8f..839f4101ba 100644 --- a/data/maps/Route119/scripts.inc +++ b/data/maps/Route119/scripts.inc @@ -55,7 +55,7 @@ Route119_EventScript_RivalEncounter:: call_if_eq Route119_EventScript_RivalEnter1 compare VAR_TEMP_1, 2 call_if_eq Route119_EventScript_RivalEnter2 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 compare VAR_TEMP_1, 1 @@ -234,16 +234,16 @@ Route119_EventScript_SetRivalPos2:: Route119_Movement_PlayerWatchRivalExit1: delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right delay_8 - walk_in_place_fastest_up + walk_in_place_faster_up step_end Route119_Movement_PlayerWatchRivalExit2: delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left delay_8 - walk_in_place_fastest_up + walk_in_place_faster_up step_end Route119_Movement_RivalEnter1: diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index af281ea0a5..3b94d5cc14 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -197,12 +197,12 @@ Route119_WeatherInstitute_2F_Movement_ShovePlayerOutOfWay: delay_16 delay_16 ride_water_current_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route119_WeatherInstitute_2F_Movement_PlayerReturnToPosition: slide_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end Route119_WeatherInstitute_2F_Movement_ScientistApproachPlayer: diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index f073958246..9e0e43bd20 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -200,12 +200,12 @@ Route120_EventScript_StevenBattleKecleon:: call_if_eq Route120_EventScript_PlayerApproachKecleonNorth compare VAR_FACING, DIR_WEST call_if_eq Route120_EventScript_PlayerApproachKecleonWest - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 msgbox Route120_Text_StevenUsedDevonScope, MSGBOX_DEFAULT closemessage - applymovement LOCALID_BRIDGE_KECLEON, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_BRIDGE_KECLEON, Common_Movement_WalkInPlaceFasterRight waitmovement 0 applymovement LOCALID_BRIDGE_KECLEON, Movement_KecleonAppears waitmovement 0 @@ -237,15 +237,15 @@ Route120_EventScript_RemoveBridgeKecleonPostBattle:: end Route120_EventScript_StevenGiveDeconScope:: - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFastestDown - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox Route120_Text_StevenGiveDevonScope, MSGBOX_DEFAULT giveitem ITEM_DEVON_SCOPE setflag FLAG_RECEIVED_DEVON_SCOPE msgbox Route120_Text_StevenGoodbye, MSGBOX_DEFAULT closemessage - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 setfieldeffectargument 0, 1 @@ -262,7 +262,7 @@ Route120_EventScript_StevenGiveDeconScope:: end Route120_EventScript_PlayerApproachKecleonNorth:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 6945f69dcb..8bd5dac04f 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -46,7 +46,7 @@ Route121_SafariZoneEntrance_EventScript_FirstTimeInfo:: Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 showmoneybox 0, 0, 0 msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO diff --git a/data/maps/Route128/scripts.inc b/data/maps/Route128/scripts.inc index 09b5c404ac..e550f2bd12 100644 --- a/data/maps/Route128/scripts.inc +++ b/data/maps/Route128/scripts.inc @@ -28,18 +28,18 @@ Route128_EventScript_KyogreAwakenedScene:: closemessage applymovement LOCALID_MAXIE, Route128_Movement_MaxieApproachArchie waitmovement 0 - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox Route128_Text_MaxieDoYouUnderstandNow, MSGBOX_DEFAULT closemessage applymovement LOCALID_MAXIE, Route128_Movement_MaxieApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox Route128_Text_MaxieResposibilityFallsToArchieAndMe, MSGBOX_DEFAULT closemessage applymovement LOCALID_ARCHIE, Route128_Movement_ArchieRunLeft - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft applymovement LOCALID_MAXIE, Route128_Movement_MaxieWalkLeft waitmovement 0 msgbox Route128_Text_MaxieThisDefiesBelief, MSGBOX_DEFAULT @@ -57,19 +57,19 @@ Route128_EventScript_KyogreAwakenedScene:: addobject LOCALID_STEVEN applymovement LOCALID_STEVEN, Route128_Movement_StevenApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox Route128_Text_StevenWhatIsHappening, MSGBOX_DEFAULT closemessage applymovement LOCALID_STEVEN, Route128_Movement_StevenWalkUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox Route128_Text_StevenWholeWorldWillDrown, MSGBOX_DEFAULT - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox Route128_Text_StevenImGoingToSootopolis, MSGBOX_DEFAULT closemessage - applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 setfieldeffectargument 0, 1 @@ -111,12 +111,12 @@ Route128_Movement_StevenApproachPlayer: Route128_Movement_ArchieLookAround: walk_fast_down - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route128_Movement_ArchieBackUp: @@ -130,7 +130,7 @@ Route128_Movement_ArchieRunLeft: walk_fast_left walk_fast_left walk_fast_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end Route128_Movement_ArchieExit: @@ -157,7 +157,7 @@ Route128_Movement_MaxieWalkLeft: Route128_Movement_MaxieApproachArchie: walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route128_Movement_MaxieExit: @@ -175,7 +175,7 @@ Route128_Movement_MaxieExit: Route128_Movement_MaxieApproachPlayer: walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end Route128_EventScript_Isaiah:: diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index 5c6ef09022..8d286d5de2 100644 --- a/data/maps/RustboroCity/scripts.inc +++ b/data/maps/RustboroCity/scripts.inc @@ -53,14 +53,14 @@ RustboroCity_EventScript_ScientistAddMatchCall:: waitmovement 0 applymovement LOCALID_SCIENTIST, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 applymovement LOCALID_SCIENTIST, RustboroCity_Movement_ScientistWalkInPlaceDown waitmovement 0 msgbox RustboroCity_Text_DevelopedNewPokenavFeature, MSGBOX_DEFAULT closemessage setflag FLAG_HAS_MATCH_CALL - applymovement LOCALID_SCIENTIST, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_SCIENTIST, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_CLICK delay 10 @@ -70,7 +70,7 @@ RustboroCity_EventScript_ScientistAddMatchCall:: delay 10 playse SE_CLICK delay 20 - applymovement LOCALID_SCIENTIST, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_SCIENTIST, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox RustboroCity_Text_AddedMatchCallPleaseCallMrStone, MSGBOX_DEFAULT closemessage @@ -131,7 +131,7 @@ RustboroCity_Movement_ScientistWalkAroundPlayer: walk_down walk_down walk_right - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 step_end @@ -360,14 +360,14 @@ RustboroCity_EventScript_EmployeeApproachDown:: RustboroCity_EventScript_EmployeeApproachPlayerFar:: applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerFar waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return @ Unused RustboroCity_Movement_GruntEscapeExtended: - walk_fastest_right - walk_fastest_right + walk_faster_right + walk_faster_right walk_fast_right walk_fast_right walk_fast_right @@ -386,8 +386,8 @@ RustboroCity_Movement_GruntEscapeExtended: step_end RustboroCity_Movement_GruntEscape: - walk_fastest_right - walk_fastest_right + walk_faster_right + walk_faster_right walk_fast_right walk_fast_right walk_fast_right @@ -411,7 +411,7 @@ RustboroCity_Movement_EmployeeChaseGrunt1: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end RustboroCity_Movement_EmployeeChaseGrunt2: @@ -464,7 +464,7 @@ RustboroCity_Movement_EmployeeApproachPlayerFar: walk_right walk_right walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end RustboroCity_EventScript_DevonEmployee1:: @@ -523,19 +523,19 @@ RustboroCity_EventScript_EmployeeAskToGetGoods:: @ The below movement scripts are either partially or fully duplicated by the movement scripts when the player returns the goods RustboroCity_EventScript_EmployeeFacePlayerUp1:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return RustboroCity_EventScript_EmployeeFacePlayerLeft1:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark @@ -547,19 +547,19 @@ RustboroCity_EventScript_EmployeeFacePlayerLeft1:: return RustboroCity_EventScript_EmployeeFacePlayerDown1:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return RustboroCity_EventScript_EmployeeApproachPlayerDown1:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark @@ -568,7 +568,7 @@ RustboroCity_EventScript_EmployeeApproachPlayerDown1:: waitmovement 0 applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerDown waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return @@ -631,19 +631,19 @@ RustboroCity_EventScript_BagFull:: return RustboroCity_EventScript_EmployeeFacePlayerUp2:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterUp waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return RustboroCity_EventScript_EmployeeFacePlayerLeft2:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark @@ -655,19 +655,19 @@ RustboroCity_EventScript_EmployeeFacePlayerLeft2:: return RustboroCity_EventScript_EmployeeFacePlayerDown2:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark waitmovement 0 applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_Delay48 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return RustboroCity_EventScript_EmployeeApproachPlayerDown2:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark @@ -676,12 +676,12 @@ RustboroCity_EventScript_EmployeeApproachPlayerDown2:: waitmovement 0 applymovement LOCALID_DEVON_EMPLOYEE, RustboroCity_Movement_EmployeeApproachPlayerDown waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return RustboroCity_EventScript_EmployeeFacePlayerRight:: - applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 playse SE_PIN applymovement LOCALID_DEVON_EMPLOYEE, Common_Movement_ExclamationMark @@ -716,7 +716,7 @@ RustboroCity_EventScript_PlayBrendanMusic:: RustboroCity_EventScript_RivalTrigger0:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -725,14 +725,14 @@ RustboroCity_EventScript_RivalTrigger0:: waitmovement 0 applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer0 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger1:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -741,14 +741,14 @@ RustboroCity_EventScript_RivalTrigger1:: waitmovement 0 applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer1 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger2:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -757,14 +757,14 @@ RustboroCity_EventScript_RivalTrigger2:: waitmovement 0 applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer2 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger3:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -773,14 +773,14 @@ RustboroCity_EventScript_RivalTrigger3:: waitmovement 0 applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer3 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger4:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -789,14 +789,14 @@ RustboroCity_EventScript_RivalTrigger4:: waitmovement 0 applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer4 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger5:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -805,14 +805,14 @@ RustboroCity_EventScript_RivalTrigger5:: waitmovement 0 applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer5 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger6:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -821,14 +821,14 @@ RustboroCity_EventScript_RivalTrigger6:: waitmovement 0 applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer6 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter RustboroCity_EventScript_RivalTrigger7:: lockall call RustboroCity_EventScript_PlayRivalMusic - applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 playse SE_PIN applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -837,7 +837,7 @@ RustboroCity_EventScript_RivalTrigger7:: waitmovement 0 applymovement LOCALID_RIVAL, RustboroCity_Movement_RivalApproachPlayer7 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 goto RustboroCity_EventScript_RivalEncounter diff --git a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc index cfd6709983..d249cc51f6 100644 --- a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc @@ -78,7 +78,7 @@ RustboroCity_DevonCorp_3F_Movement_Unused: walk_up walk_up walk_up - walk_in_place_fastest_left + walk_in_place_faster_left step_end RustboroCity_DevonCorp_3F_Movement_LeadPlayerToPresident: @@ -95,12 +95,12 @@ RustboroCity_DevonCorp_3F_Movement_LeadPlayerToPresident: walk_right walk_right walk_right - walk_in_place_fastest_left + walk_in_place_faster_left step_end RustboroCity_DevonCorp_3F_Movement_EmployeeFaceDesk: delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end RustboroCity_DevonCorp_3F_Movement_EmployeeWalkOffscreen: @@ -146,7 +146,7 @@ RustboroCity_DevonCorp_3F_Movement_PlayerApproachDesk: delay_16 walk_down walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end RustboroCity_DevonCorp_3F_EventScript_MrStone:: diff --git a/data/maps/RustboroCity_PokemonSchool/scripts.inc b/data/maps/RustboroCity_PokemonSchool/scripts.inc index 791f5ee841..fcc374ddc7 100644 --- a/data/maps/RustboroCity_PokemonSchool/scripts.inc +++ b/data/maps/RustboroCity_PokemonSchool/scripts.inc @@ -87,7 +87,7 @@ RustboroCity_PokemonSchool_EventScript_Teacher:: compare VAR_RESULT, 0 goto_if_eq Common_EventScript_ShowBagIsFull closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 setflag FLAG_RECEIVED_QUICK_CLAW release @@ -106,7 +106,7 @@ RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsWest:: RustboroCity_PokemonSchool_EventScript_GaveQuickClaw:: msgbox RustboroCity_PokemonSchool_Text_ExplainQuickClaw, MSGBOX_DEFAULT closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 release end @@ -116,12 +116,12 @@ RustboroCity_PokemonSchool_Movement_TeacherCheckOnStudentsWest: walk_down walk_down walk_right - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 delay_16 walk_down - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 delay_16 walk_right @@ -143,12 +143,12 @@ RustboroCity_PokemonSchool_Movement_TeacherCheckOnStudentsEast: walk_down walk_left walk_left - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 delay_16 walk_down - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 delay_16 walk_right diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc index 1ba3c240c4..b8ffe49d0c 100644 --- a/data/maps/RusturfTunnel/scripts.inc +++ b/data/maps/RusturfTunnel/scripts.inc @@ -100,7 +100,7 @@ RusturfTunnel_EventScript_BoyfriendApproachWanda2:: applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda waitmovement 0 - applymovement LOCALID_WANDA, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_WANDA, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -108,14 +108,14 @@ RusturfTunnel_EventScript_BoyfriendApproachWanda3:: applymovement OBJ_EVENT_ID_PLAYER, RusturfTunnel_Movement_PlayerWatchBoyfriend applymovement LOCALID_WANDAS_BF, RusturfTunnel_Movement_BoyfriendApproachWanda waitmovement 0 - applymovement LOCALID_WANDA, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_WANDA, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return RusturfTunnel_EventScript_FaceWandasBoyfriend1:: - applymovement LOCALID_WANDAS_BF, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_WANDAS_BF, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return @@ -184,44 +184,44 @@ RusturfTunnel_Movement_WandaExit: RusturfTunnel_Movement_PlayerWatchWandaExit: delay_8 - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end RusturfTunnel_Movement_Unused1: walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end RusturfTunnel_Movement_Unused2: walk_down - walk_in_place_fastest_up + walk_in_place_faster_up delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right step_end RusturfTunnel_Movement_Unused3: walk_up - walk_in_place_fastest_down + walk_in_place_faster_down delay_8 - walk_in_place_fastest_right + walk_in_place_faster_right step_end RusturfTunnel_Movement_PlayerWatchBoyfriend1: walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end RusturfTunnel_Movement_PlayerWatchBoyfriend: walk_right - walk_in_place_fastest_left + walk_in_place_faster_left step_end RusturfTunnel_Movement_BoyfriendFaceRight: walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end RusturfTunnel_Movement_WandasBoyfriendExit1: @@ -269,7 +269,7 @@ RusturfTunnel_Movement_BoyfriendApproachWanda: walk_in_place_fast_right walk_in_place_fast_right walk_fast_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end RusturfTunnel_EventScript_TunnelBlockagePos1:: @@ -362,12 +362,12 @@ RusturfTunnel_Movement_PushPlayerAsideForGrunt: lock_facing_direction walk_up unlock_facing_direction - walk_in_place_fastest_left + walk_in_place_faster_left step_end RusturfTunnel_Movement_PlayerMoveAsideForBriney: walk_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end RusturfTunnel_Movement_GruntEscape: @@ -410,7 +410,7 @@ RusturfTunnel_Movement_PlayerWatchBrineyExit: delay_16 delay_8 delay_4 - walk_in_place_fastest_left + walk_in_place_faster_left step_end RusturfTunnel_Movement_BrineyApproachPeeko2: diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc index 07c397e8c8..a94d50ec3f 100644 --- a/data/maps/SSTidalCorridor/scripts.inc +++ b/data/maps/SSTidalCorridor/scripts.inc @@ -196,7 +196,7 @@ SSTidalCorridor_EventScript_ScottScene:: lockall applymovement LOCALID_SCOTT, SSTidalCorridor_Movement_ScottApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox SSTidalCorridor_Text_ScottBattleFrontierInvite, MSGBOX_DEFAULT closemessage @@ -226,7 +226,7 @@ SSTidalCorridor_Movement_ScottApproachPlayer: step_end SSTidalCorridor_Movement_ScottExit: - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 delay_16 @@ -241,22 +241,22 @@ SSTidalCorridor_Movement_PlayerWatchScottExit: delay_16 delay_16 delay_8 - walk_in_place_fastest_down + walk_in_place_faster_down step_end SSTidalCorridor_Movement_SailorMoveForScott: delay_16 walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end SSTidalCorridor_Movement_SailorReturn: walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end SSTidalCorridor_Text_ScottBattleFrontierInvite: diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc index ee98443400..791572fe0c 100644 --- a/data/maps/SafariZone_South/scripts.inc +++ b/data/maps/SafariZone_South/scripts.inc @@ -35,7 +35,7 @@ SafariZone_South_Movement_PlayerEnter: SafariZone_South_Movement_ExitAttendantBlockDoor: walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end SafariZone_South_EventScript_Boy:: @@ -104,17 +104,17 @@ SafariZone_South_Movement_PlayerExitNorth: SafariZone_South_Movement_PlayerExitEast: walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end SafariZone_South_Movement_MoveExitAttendantNorth: walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end SafariZone_South_Movement_MoveExitAttendantEast: walk_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end SafariZone_South_EventScript_ConstructionWorker1:: diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc index b6b7b66759..a4c621e3e0 100644 --- a/data/maps/SeafloorCavern_Entrance/scripts.inc +++ b/data/maps/SeafloorCavern_Entrance/scripts.inc @@ -31,7 +31,7 @@ SeafloorCavern_Entrance_EventScript_Grunt:: copyobjectxytoperm LOCALID_GRUNT msgbox SeafloorCavern_Entrance_Text_HearMagmaNearMossdeep, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end @@ -45,23 +45,23 @@ SeafloorCavern_Entrance_EventScript_GruntSpeechShort:: call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth msgbox SeafloorCavern_Entrance_Text_HearMagmaNearMossdeepShort, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast:: - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest:: - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth:: - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return diff --git a/data/maps/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc index 7749d7a194..3db2348a4a 100644 --- a/data/maps/SeafloorCavern_Room9/scripts.inc +++ b/data/maps/SeafloorCavern_Room9/scripts.inc @@ -14,7 +14,7 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: setvar VAR_0x8005, LOCALID_MAXIE setvar VAR_0x8006, LOCALID_GRUNT_1 setvar VAR_0x8007, LOCALID_GRUNT_2 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, SeafloorCavern_Room9_Movement_Delay32 waitmovement 0 @@ -22,12 +22,12 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: msgbox SeafloorCavern_Room9_Text_ArchieHoldItRightThere, MSGBOX_DEFAULT closemessage addobject VAR_0x8004 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_ArchieApproachPlayer waitmovement 0 msgbox SeafloorCavern_Room9_Text_ArchieSoItWasYou, MSGBOX_DEFAULT - applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestUp + applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SeafloorCavern_Room9_Text_ArchieBeholdKyogre, MSGBOX_DEFAULT applymovement VAR_0x8004, Common_Movement_FacePlayer @@ -51,8 +51,8 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: playfanfare MUS_AWAKEN_LEGEND playse SE_ORB special DoOrbEffect - applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestUp - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 150 removeobject LOCALID_KYOGRE_SLEEPING @@ -86,7 +86,7 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: setvar VAR_0x8007, LOCALID_GRUNT_2 msgbox SeafloorCavern_Room9_Text_ArchieWhereDidKyogreGo, MSGBOX_DEFAULT playse SE_PC_LOGIN - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox SeafloorCavern_Room9_Text_ArchieAMessageFromOutside, MSGBOX_DEFAULT closemessage @@ -96,7 +96,7 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: closemessage playse SE_PC_OFF delay 20 - applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox SeafloorCavern_Room9_Text_ArchieWhyDidKyogreDisappear, MSGBOX_DEFAULT closemessage @@ -107,7 +107,7 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: applymovement VAR_0x8006, SeafloorCavern_Room9_Movement_MagmaGruntArrive applymovement VAR_0x8005, SeafloorCavern_Room9_Movement_MaxieArrive waitmovement 0 - applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestLeft + applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox SeafloorCavern_Room9_Text_MaxieWhatHaveYouWrought, MSGBOX_DEFAULT playse SE_PIN @@ -179,7 +179,7 @@ SeafloorCavern_Room9_Movement_ArchieExit: lock_facing_direction walk_down unlock_facing_direction - walk_in_place_fastest_right + walk_in_place_faster_right step_end SeafloorCavern_Room9_Movement_KyogreApproach: diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc index f11b378ed3..9ffcd2de73 100644 --- a/data/maps/SkyPillar_Outside/scripts.inc +++ b/data/maps/SkyPillar_Outside/scripts.inc @@ -38,7 +38,7 @@ SkyPillar_Outside_EventScript_WallaceScene:: lockall applymovement LOCALID_WALLACE, SkyPillar_Outside_Movement_WallaceApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox SkyPillar_Outside_Text_OpenedDoorToSkyPillar, MSGBOX_DEFAULT closemessage @@ -62,13 +62,13 @@ SkyPillar_Outside_EventScript_WallaceScene:: special ShakeCamera waitstate delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 10 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 20 - applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_WALLACE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 msgbox SkyPillar_Outside_Text_SituationGettingWorse, MSGBOX_DEFAULT diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index acbdb4c8bd..0406509d2e 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -165,7 +165,7 @@ SkyPillar_Top_Movement_RayquazaFlyOff: delay_8 walk_in_place_right @ Normal, awake delay_8 - walk_fastest_up @ Fly up + walk_faster_up @ Fly up slide_up slide_up slide_up diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index 4a56717149..3e8648531f 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -82,11 +82,11 @@ SlateportCity_EventScript_ScottScene:: waitmovement 0 msgbox SlateportCity_Text_YouDroveTeamAquaAway, MSGBOX_DEFAULT closemessage - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 60 msgbox SlateportCity_Text_MaybeThisTrainer, MSGBOX_DEFAULT - applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_SCOTT, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox SlateportCity_Text_LetsRegisterEachOther, MSGBOX_DEFAULT closemessage @@ -113,7 +113,7 @@ SlateportCity_EventScript_ScottScene:: SlateportCity_Movement_PlayerFaceScott: delay_16 delay_8 - walk_in_place_fastest_left + walk_in_place_faster_left step_end SlateportCity_Movement_ScottApproachPlayer: @@ -588,10 +588,10 @@ SlateportCity_EventScript_CaptStern:: msgbox SlateportCity_Text_SternMoveAheadWithExploration, MSGBOX_DEFAULT msgbox SlateportCity_Text_GabbyWonderfulThanksForInterview, MSGBOX_DEFAULT closemessage - applymovement LOCALID_GABBY, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_GABBY, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 10 - applymovement LOCALID_TY, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_TY, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 25 applymovement LOCALID_CAPT_STERN, SlateportCity_Movement_SternWatchGabbyAndTyExit @@ -602,18 +602,18 @@ SlateportCity_EventScript_CaptStern:: removeobject LOCALID_GABBY removeobject LOCALID_TY msgbox SlateportCity_Text_SternWhewFirstInterview, MSGBOX_DEFAULT - applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SlateportCity_Text_OhPlayerWeMadeDiscovery, MSGBOX_DEFAULT playbgm MUS_ENCOUNTER_AQUA, FALSE msgbox SlateportCity_Text_AquaWillAssumeControlOfSubmarine, MSGBOX_DEFAULT - applymovement LOCALID_COOK, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_FAT_MAN, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_COOK, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_FAT_MAN, Common_Movement_WalkInPlaceFasterLeft applymovement LOCALID_OLD_WOMAN, SlateportCity_Movement_OldWomanConcern applymovement LOCALID_RICH_BOY, Common_Movement_QuestionMark applymovement LOCALID_MAN_1, SlateportCity_Movement_ManConcern waitmovement 0 - applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox SlateportCity_Text_SternWhatWasAllThat, MSGBOX_DEFAULT playse SE_PIN @@ -621,7 +621,7 @@ SlateportCity_EventScript_CaptStern:: waitmovement 0 applymovement LOCALID_CAPT_STERN, Common_Movement_Delay48 waitmovement 0 - applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SlateportCity_Text_FromHarborTryingToTakeSub, MSGBOX_DEFAULT msgbox SlateportCity_Text_PleaseComeWithMe, MSGBOX_DEFAULT @@ -644,20 +644,20 @@ SlateportCity_Movement_OldWomanConcern: delay_16 delay_16 emote_question_mark - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end SlateportCity_Movement_ManConcern: emote_question_mark - walk_in_place_fastest_up + walk_in_place_faster_up delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left step_end SlateportCity_Movement_GabbyExit: @@ -693,7 +693,7 @@ SlateportCity_Movement_TyExit: SlateportCity_Movement_Unused: walk_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end SlateportCity_Movement_SternEnterHarbor: @@ -714,7 +714,7 @@ SlateportCity_Movement_SternWatchGabbyAndTyExit: step_end SlateportCity_Movement_PlayerEnterHarbor: - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_16 walk_right @@ -729,7 +729,7 @@ SlateportCity_Movement_PlayerFaceStern: delay_16 delay_16 delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end SlateportCity_EventScript_Ty:: @@ -939,7 +939,7 @@ SlateportCity_Movement_PushPlayerDown: SlateportCity_Movement_PlayerWatchScottExit: delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end SlateportCity_Movement_ScottExitBattleTent: diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc index c1e9bfc532..06052e1451 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc +++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc @@ -94,7 +94,7 @@ SlateportCity_BattleTentBattleRoom_Movement_PlayerEnter: walk_up walk_up walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter: @@ -102,6 +102,6 @@ SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter: walk_down walk_down walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 08b19391ce..37b0f6fc88 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -43,7 +43,7 @@ SlateportCity_BattleTentCorridor_EventScript_EnterCorridor:: SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom:: msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_RightThisWay, MSGBOX_DEFAULT closemessage - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterUp waitmovement 0 opendoor 2, 1 waitdooranim @@ -151,7 +151,7 @@ SlateportCity_BattleTentCorridor_Movement_AttendantEnter: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end SlateportCity_BattleTentCorridor_Movement_AttendantExit: diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index fb73f5b938..58e5978cf0 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -54,10 +54,10 @@ SlateportCity_Harbor_EventScript_AquaEscapeTrigger3:: end SlateportCity_Harbor_EventScript_AquaEscapeScene:: - applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFastestDown + applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 - applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFastestDown - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SlateportCity_Harbor_Text_ArchieYouAgainHideoutInLilycove, MSGBOX_DEFAULT closemessage @@ -91,21 +91,21 @@ SlateportCity_Harbor_EventScript_AquaEscapeScene:: SlateportCity_Harbor_EventScript_SternApproachPlayer0:: applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer0 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 return SlateportCity_Harbor_EventScript_SternApproachPlayer1:: applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer1 waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return SlateportCity_Harbor_EventScript_SternApproachPlayer:: applymovement LOCALID_CAPT_STERN, SlateportCity_Harbor_Movement_SternApproachPlayer waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -234,7 +234,7 @@ SlateportCity_Harbor_EventScript_ChooseNewDestination:: SlateportCity_Harbor_EventScript_BoardFerry:: msgbox SlateportCity_Harbor_Text_PleaseBoardFerry, MSGBOX_DEFAULT closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestUp + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 30 hideobjectat VAR_LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR @@ -265,7 +265,7 @@ SlateportCity_Harbor_EventScript_BoardFerryNorth:: SlateportCity_Harbor_Movement_BoardFerryEast: walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end SlateportCity_Harbor_Movement_BoardFerryNorth: diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index 38ec344649..cfe547de56 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -9,14 +9,14 @@ SlateportCity_OceanicMuseum_1F_EventScript_EntranceAttendant:: SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeLeft:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 goto SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee end SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 goto SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee end @@ -205,12 +205,12 @@ SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitNorth: delay_16 delay_8 delay_4 - walk_in_place_fastest_down + walk_in_place_faster_down step_end SlateportCity_OceanicMuseum_1F_Movement_PlayerWatchGruntExitWestEast: delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end SlateportCity_OceanicMuseum_1F_Movement_FamiliarGruntExit: diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc index 90b5c83de0..b993c9fab1 100644 --- a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc @@ -48,8 +48,8 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: trainerbattle_no_intro TRAINER_GRUNT_MUSEUM_2, SlateportCity_OceanicMuseum_2F_Text_Grunt2Defeat applymovement LOCALID_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_GruntDefeated waitmovement 0 - applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFastestDown - applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_GRUNT_1, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_GRUNT_2, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_MeddlingKid, MSGBOX_DEFAULT closemessage @@ -73,7 +73,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: fadescreen FADE_FROM_BLACK delay 30 setflag FLAG_HIDE_SLATEPORT_CITY_OCEANIC_MUSEUM_AQUA_GRUNTS - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_SternThankYouForSavingUs, MSGBOX_DEFAULT setvar VAR_0x8004, ITEM_DEVON_GOODS @@ -101,12 +101,12 @@ SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch:: return SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return SlateportCity_OceanicMuseum_2F_EventScript_SternFaceGrunts:: - applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFastestLeft + applymovement LOCALID_CAPT_STERN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -123,7 +123,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest:: SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntSouth: walk_left walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntWest: @@ -131,7 +131,7 @@ SlateportCity_OceanicMuseum_2F_Movement_PlayerApproachGruntWest: walk_left walk_left walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end SlateportCity_OceanicMuseum_2F_Movement_Unused: @@ -173,7 +173,7 @@ SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle: SlateportCity_OceanicMuseum_2F_Movement_FirstGruntEnter: walk_down walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end SlateportCity_OceanicMuseum_2F_Movement_FirstGruntApproach: @@ -217,7 +217,7 @@ SlateportCity_OceanicMuseum_2F_Movement_GruntMoveForArchie: delay_16 delay_8 walk_fast_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end SlateportCity_OceanicMuseum_2F_EventScript_WaterQualitySample1:: diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index efeae33d1e..a9f9ebb39b 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -238,8 +238,8 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: setvar VAR_0x8004, FALSE @ Just do Groudon/Kyogre fight scene special Script_DoRayquazaScene waitstate - applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_GROUDON, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_GROUDON, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 60 waitse @@ -338,8 +338,8 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: setvar VAR_0x8004, FALSE @ Just do Groudon/Kyogre fight scene special Script_DoRayquazaScene waitstate - applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFastestLeft - applymovement LOCALID_GROUDON, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_KYOGRE, Common_Movement_WalkInPlaceFasterLeft + applymovement LOCALID_GROUDON, Common_Movement_WalkInPlaceFasterRight waitmovement 0 delay 60 waitse @@ -651,12 +651,12 @@ SootopolisCity_EventScript_SetRoughWater:: SootopolisCity_Movement_RayquazaFlyOff: walk_fast_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up - walk_fastest_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up + walk_faster_up step_end SootopolisCity_Movement_PanUp: @@ -1055,7 +1055,7 @@ SootopolisCity_Movement_StevenStartWalkToCaveOfOrigin: walk_up walk_up walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end SootopolisCity_Movement_PlayerStartWalkToCaveOfOriginWest: @@ -1186,7 +1186,7 @@ SootopolisCity_Movement_StevenWalkToCaveOfOrigin: walk_right walk_right delay_4 - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 delay_16 walk_right @@ -1249,7 +1249,7 @@ SootopolisCity_Movement_PlayerWalkToCaveOfOrigin: SootopolisCity_Movement_ExpertMoveAside: walk_slow_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end SootopolisCity_Movement_StevenArriveCaveEntrance: @@ -1262,7 +1262,7 @@ SootopolisCity_Movement_StevenArriveCaveEntrance: walk_up walk_up walk_right - walk_in_place_fastest_left + walk_in_place_faster_left step_end SootopolisCity_Movement_PlayerArriveCaveEntrance: @@ -1275,7 +1275,7 @@ SootopolisCity_Movement_PlayerArriveCaveEntrance: walk_up walk_up walk_up - walk_in_place_fastest_right + walk_in_place_faster_right step_end SootopolisCity_Movement_PlayerEnterCaveOfOrigin: @@ -1413,12 +1413,12 @@ SootopolisCity_EventScript_GoToGym:: SootopolisCity_Movement_WallaceMoveFromGym: walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end SootopolisCity_Movement_WallaceMoveFromGymWest: walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end SootopolisCity_EventScript_Maxie:: diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc index 6b1bc0eb56..1fb8a8f723 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc @@ -38,7 +38,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle:: applymovement LOCALID_OLD_MAN, SootopolisCity_MysteryEventsHouse_1F_Movement_OldManWalkBehindPlayer waitmovement 0 copyobjectxytoperm LOCALID_OLD_MAN - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1 call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment @@ -69,7 +69,7 @@ SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerExitStairs: SootopolisCity_MysteryEventsHouse_1F_Movement_OldManWalkBehindPlayer: walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end SootopolisCity_MysteryEventsHouse_1F_EventScript_OldMan:: @@ -171,12 +171,12 @@ SootopolisCity_MysteryEventsHouse_1F_Movement_PlayerEnterBasementWest: SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideLeft: walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end SootopolisCity_MysteryEventsHouse_1F_Movement_OldManMoveAsideRight: walk_right - walk_in_place_fastest_left + walk_in_place_faster_left step_end SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles: diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc index 3769f164ce..b491c2f6c5 100644 --- a/data/maps/SouthernIsland_Exterior/scripts.inc +++ b/data/maps/SouthernIsland_Exterior/scripts.inc @@ -17,7 +17,7 @@ SouthernIsland_Exterior_EventScript_Sailor:: goto_if_eq SouthernIsland_Exterior_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage - applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 hideobjectat LOCALID_SAILOR, MAP_SOUTHERN_ISLAND_EXTERIOR @@ -49,7 +49,7 @@ Ferry_EventScript_DepartIslandBoardSouth: Ferry_EventScript_DepartIslandBoardWest: walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end SouthernIsland_Exterior_EventScript_Sign:: diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 20ed1e58d5..a4c2c4960e 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -145,7 +145,7 @@ SouthernIsland_Interior_Movement_CameraPanDown: walk_down walk_down walk_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end SouthernIsland_Interior_Movement_LatiApproach: diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index 755e6d8be7..b349a395cf 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -71,8 +71,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: applymovement LOCALID_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit waitmovement 0 removeobject LOCALID_OPPONENT - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFastestDown - applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterDown + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetMeRestoreYourMons, MSGBOX_DEFAULT special LoadPlayerParty @@ -111,8 +111,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_AskRetireChallenge:: case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: - applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFastestRight - applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterRight + applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 closemessage goto VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc index 7f6669f7bd..e07da7e60d 100644 --- a/data/maps/VictoryRoad_1F/scripts.inc +++ b/data/maps/VictoryRoad_1F/scripts.inc @@ -40,7 +40,7 @@ VictoryRoad_1F_EventScript_WallyBattleTrigger2:: end VictoryRoad_1F_EventScript_WallyEntranceBattle:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestDown + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox VictoryRoad_1F_Text_WallyNotGoingToLoseAnymore, MSGBOX_DEFAULT trainerbattle_no_intro TRAINER_WALLY_VR_1, VictoryRoad_1F_Text_WallyEntranceDefeat diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc index 1e4f551690..1d833f470c 100644 --- a/data/scripts/berry_blender.inc +++ b/data/scripts/berry_blender.inc @@ -567,7 +567,7 @@ BerryBlender_EventScript_ExpertMGiveBerry: end BerryBlender_Movement_BlendLeaderWalkInPlace: - walk_in_place_fastest_right + walk_in_place_faster_right step_end BerryBlender_EventScript_BerryBlenderLink:: diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index ab76428990..d6ea1a707e 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -245,7 +245,7 @@ CableClub_EventScript_PlayerExitLinkRoom:: CableClub_EventScript_Tutorial:: lockall - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox CableClub_Text_FirstTimeRightThisWay, MSGBOX_DEFAULT closemessage diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 0d9e023371..17364559bb 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -1285,7 +1285,7 @@ ContestHall_Movement_MCBackUp: step_end ContestHall_Movement_MCFaceJudge: - walk_in_place_fastest_right + walk_in_place_faster_right step_end ContestHall_Movement_Heart: @@ -1293,24 +1293,24 @@ ContestHall_Movement_Heart: step_end ContestHall_Movement_FaceContestants: - walk_in_place_fastest_down + walk_in_place_faster_down step_end ContestHall_Movement_WalkStageLeft: walk_left walk_left - walk_in_place_fastest_down + walk_in_place_faster_down step_end ContestHall_Movement_WalkStageRight: walk_right walk_right - walk_in_place_fastest_down + walk_in_place_faster_down step_end ContestHall_Movement_WinningPlayerWalkUp: walk_up - walk_in_place_fastest_down + walk_in_place_faster_down step_end ContestHall_Movement_ContestantDelay32: @@ -1319,15 +1319,15 @@ ContestHall_Movement_ContestantDelay32: step_end ContestHall_Movement_MCFaceJudge2: - walk_in_place_fastest_right + walk_in_place_faster_right step_end ContestHall_Movement_JudgeFaceMC: - walk_in_place_fastest_left + walk_in_place_faster_left step_end ContestHall_Movement_FaceContestants2: - walk_in_place_fastest_down + walk_in_place_faster_down step_end ContestHall_Movement_Player3ApproachForPrize: @@ -1375,20 +1375,20 @@ ContestHall_Movement_Player4FaceUp: ContestHall_Movement_MCLookAtJudge: face_up delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right step_end ContestHall_Movement_JudgeLookAtMC: - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end ContestHall_Movement_MCWalkInPlaceDown: delay_16 delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end ContestHall_Movement_Player1WalkToCenter: @@ -1396,7 +1396,7 @@ ContestHall_Movement_Player1WalkToCenter: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end ContestHall_Movement_Player1WalkBack: @@ -1404,31 +1404,31 @@ ContestHall_Movement_Player1WalkBack: walk_fast_left walk_fast_left walk_fast_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end ContestHall_Movement_Player2WalkToCenter: walk_up walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end ContestHall_Movement_Player2WalkBack: walk_fast_left walk_fast_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end ContestHall_Movement_Player3WalkToCenter: walk_up walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end ContestHall_Movement_Player3WalkBack: walk_fast_right walk_fast_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end ContestHall_Movement_Player4WalkToCenter: @@ -1436,7 +1436,7 @@ ContestHall_Movement_Player4WalkToCenter: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end ContestHall_Movement_Player4WalkBack: @@ -1444,7 +1444,7 @@ ContestHall_Movement_Player4WalkBack: walk_fast_right walk_fast_right walk_fast_down - walk_in_place_fastest_up + walk_in_place_faster_up step_end ContestHall_Movement_Player1ApproachForPrize: diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index baee6c96fd..68be27a028 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -217,13 +217,13 @@ GabbyAndTy_EventScript_FacePlayerNorth:: GabbyAndTy_EventScript_FacePlayerSouth:: applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceUp - applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestUp + applymovement VAR_0x8005, Common_Movement_WalkInPlaceFasterUp waitmovement 0 return GabbyAndTy_EventScript_FacePlayerEast:: applymovement VAR_0x8004, GabbyAndTy_Movement_WalkInPlaceLeft - applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestLeft + applymovement VAR_0x8005, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return diff --git a/data/scripts/movement.inc b/data/scripts/movement.inc index 3f75d30dd4..383c014130 100644 --- a/data/scripts/movement.inc +++ b/data/scripts/movement.inc @@ -24,20 +24,20 @@ Common_Movement_FaceOriginalDirection: face_original_direction step_end -Common_Movement_WalkInPlaceFastestLeft: - walk_in_place_fastest_left +Common_Movement_WalkInPlaceFasterLeft: + walk_in_place_faster_left step_end -Common_Movement_WalkInPlaceFastestUp: - walk_in_place_fastest_up +Common_Movement_WalkInPlaceFasterUp: + walk_in_place_faster_up step_end -Common_Movement_WalkInPlaceFastestRight: - walk_in_place_fastest_right +Common_Movement_WalkInPlaceFasterRight: + walk_in_place_faster_right step_end -Common_Movement_WalkInPlaceFastestDown: - walk_in_place_fastest_down +Common_Movement_WalkInPlaceFasterDown: + walk_in_place_faster_down step_end Common_Movement_FaceRight: diff --git a/data/scripts/pkmn_center_nurse.inc b/data/scripts/pkmn_center_nurse.inc index 7797b30615..21f2abe0a2 100644 --- a/data/scripts/pkmn_center_nurse.inc +++ b/data/scripts/pkmn_center_nurse.inc @@ -38,11 +38,11 @@ EventScript_PkmnCenterNurse_IllTakeYourPkmn2:: return EventScript_PkmnCenterNurse_TakeAndHealPkmn:: - applymovement VAR_0x800B, Common_Movement_WalkInPlaceFastestLeft + applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 dofieldeffect FLDEFF_POKECENTER_HEAL waitfieldeffect FLDEFF_POKECENTER_HEAL - applymovement VAR_0x800B, Common_Movement_WalkInPlaceFastestDown + applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterDown waitmovement 0 special HealPlayerParty return diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index e7e862039a..571b61e62f 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -19,18 +19,18 @@ PlayersHouse_1F_EventScript_EnterHouseMovingIn:: closemessage setvar VAR_LITTLEROOT_INTRO_STATE, 4 applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerWalkIn - applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestUp + applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterUp waitmovement 0 releaseall end PlayersHouse_1F_EventScript_MomFacePlayerMovingInMale:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PlayersHouse_1F_EventScript_MomFacePlayerMovingInFemale:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -41,7 +41,7 @@ PlayersHouse_1F_Movement_PlayerWalkIn: PlayersHouse_1F_EventScript_MomGoSeeRoom:: msgbox PlayersHouse_1F_Text_ArentYouInterestedInRoom, MSGBOX_DEFAULT closemessage - applymovement VAR_0x8004, Common_Movement_WalkInPlaceFastestUp + applymovement VAR_0x8004, Common_Movement_WalkInPlaceFasterUp applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_MovePlayerAwayFromDoor waitmovement 0 releaseall @@ -83,7 +83,7 @@ PlayersHouse_2F_EventScript_MomComesUpstairsMale:: addobject VAR_0x8008 applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomEntersMale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox PlayersHouse_2F_Text_HowDoYouLikeYourRoom, MSGBOX_DEFAULT closemessage @@ -96,7 +96,7 @@ PlayersHouse_2F_EventScript_MomComesUpstairsFemale:: addobject VAR_0x8008 applymovement VAR_0x8008, PlayersHouse_2F_Movement_MomEntersFemale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox PlayersHouse_2F_Text_HowDoYouLikeYourRoom, MSGBOX_DEFAULT closemessage @@ -121,7 +121,7 @@ PlayersHouse_2F_EventScript_SetWallClock:: PlayersHouse_2F_Movement_MomEntersMale: delay_8 walk_down - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 delay_8 walk_left @@ -136,7 +136,7 @@ PlayersHouse_2F_Movement_MomExitsMale: PlayersHouse_2F_Movement_MomEntersFemale: delay_8 walk_down - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_8 walk_right @@ -154,7 +154,7 @@ PlayersHouse_1F_EventScript_SetWatchedBroadcast:: end PlayersHouse_1F_EventScript_PetalburgGymReportMale:: - applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestRight + applymovement VAR_0x8005, Common_Movement_WalkInPlaceFasterRight waitmovement 0 call PlayersHouse_1F_EventScript_MomNoticeGymBroadcast applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForGymMale @@ -167,7 +167,7 @@ PlayersHouse_1F_EventScript_PetalburgGymReportMale:: applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerMoveToTVMale waitmovement 0 call PlayersHouse_1F_EventScript_WatchGymBroadcast - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox PlayersHouse_1F_Text_ItsOverWeMissedHim, MSGBOX_DEFAULT msgbox PlayersHouse_1F_Text_GoIntroduceYourselfNextDoor, MSGBOX_DEFAULT @@ -179,7 +179,7 @@ PlayersHouse_1F_EventScript_PetalburgGymReportMale:: end PlayersHouse_1F_EventScript_PetalburgGymReportFemale:: - applymovement VAR_0x8005, Common_Movement_WalkInPlaceFastestLeft + applymovement VAR_0x8005, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 call PlayersHouse_1F_EventScript_MomNoticeGymBroadcast applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForGymFemale @@ -192,7 +192,7 @@ PlayersHouse_1F_EventScript_PetalburgGymReportFemale:: applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerMoveToTVFemale waitmovement 0 call PlayersHouse_1F_EventScript_WatchGymBroadcast - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 msgbox PlayersHouse_1F_Text_ItsOverWeMissedHim, MSGBOX_DEFAULT msgbox PlayersHouse_1F_Text_GoIntroduceYourselfNextDoor, MSGBOX_DEFAULT @@ -214,7 +214,7 @@ PlayersHouse_1F_EventScript_MomNoticeGymBroadcast:: return PlayersHouse_1F_EventScript_WatchGymBroadcast:: - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox PlayersHouse_1F_Text_ReportFromPetalburgGym, MSGBOX_DEFAULT fadedefaultbgm @@ -230,7 +230,7 @@ PlayersHouse_1F_Movement_MomApproachDadMale: walk_right walk_right walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end PlayersHouse_1F_Movement_MomApproachDadFemale: @@ -240,7 +240,7 @@ PlayersHouse_1F_Movement_MomApproachDadFemale: walk_left walk_left walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end PlayersHouse_1F_Movement_MomApproachPlayerMale: @@ -252,23 +252,23 @@ PlayersHouse_1F_Movement_MomApproachPlayerFemale: step_end PlayersHouse_1F_Movement_MomNoticesLatiBroadcastMale: - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 delay_16 delay_16 delay_16 - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_16 step_end PlayersHouse_1F_Movement_MomNoticesLatiBroadcastFemale: - walk_in_place_fastest_right + walk_in_place_faster_right delay_16 delay_16 delay_16 delay_16 - walk_in_place_fastest_left + walk_in_place_faster_left delay_16 delay_16 step_end @@ -287,24 +287,24 @@ PlayersHouse_1F_Movement_MomApproachPlayerAfterTVFemale: PlayersHouse_1F_Movement_MomMakeRoomToSeeTVMale: walk_left - walk_in_place_fastest_right + walk_in_place_faster_right step_end PlayersHouse_1F_Movement_MomMakeRoomToSeeTVFemale: walk_right - walk_in_place_fastest_left + walk_in_place_faster_left step_end PlayersHouse_1F_Movement_MomReturnToSeatMale: walk_left walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end PlayersHouse_1F_Movement_MomReturnToSeatFemale: walk_right walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end PlayersHouse_1F_EventScript_Mom:: @@ -580,28 +580,28 @@ PlayersHouse_1F_EventScript_PlayerEnterRoomFemale:: PlayersHouse_1F_EventScript_PlayerApproachTVForLatiMale:: applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForLatiMale waitmovement 0 - applymovement VAR_0x800A, Common_Movement_WalkInPlaceFastestLeft + applymovement VAR_0x800A, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale:: applymovement OBJ_EVENT_ID_PLAYER, PlayersHouse_1F_Movement_PlayerApproachTVForLatiFemale waitmovement 0 - applymovement VAR_0x800A, Common_Movement_WalkInPlaceFastestRight + applymovement VAR_0x800A, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PlayersHouse_1F_EventScript_MomApproachPlayerMale:: applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerMale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return PlayersHouse_1F_EventScript_MomApproachPlayerFemale:: applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerFemale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -618,14 +618,14 @@ PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastFemale:: PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVMale:: applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerAfterTVMale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestRight + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale:: applymovement VAR_0x800A, PlayersHouse_1F_Movement_MomApproachPlayerAfterTVFemale waitmovement 0 - applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFastestLeft + applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -666,14 +666,14 @@ PlayersHouse_1F_Movement_PlayerEnterRoomMale: walk_down walk_down walk_down - walk_in_place_fastest_left + walk_in_place_faster_left step_end PlayersHouse_1F_Movement_MomAndPlayerWatchDadExit: delay_8 delay_16 delay_16 - walk_in_place_fastest_down + walk_in_place_faster_down step_end PlayersHouse_1F_Movement_PlayerEnterRoomFemale: @@ -681,7 +681,7 @@ PlayersHouse_1F_Movement_PlayerEnterRoomFemale: walk_down walk_down walk_down - walk_in_place_fastest_right + walk_in_place_faster_right step_end PlayersHouse_1F_Movement_PlayerApproachTVForLatiMale: @@ -690,7 +690,7 @@ PlayersHouse_1F_Movement_PlayerApproachTVForLatiMale: walk_left walk_left walk_left - walk_in_place_fastest_up + walk_in_place_faster_up step_end PlayersHouse_1F_Movement_PlayerApproachTVForLatiFemale: @@ -699,7 +699,7 @@ PlayersHouse_1F_Movement_PlayerApproachTVForLatiFemale: walk_right walk_right walk_right - walk_in_place_fastest_up + walk_in_place_faster_up step_end EventScript_RunningShoesManual:: From e65677c944b786c8f94adc8c962b7ee180bfe548 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 4 Nov 2021 17:28:41 -0400 Subject: [PATCH 142/417] Update modern linker script --- include/crt0.h | 5 ----- ld_script_modern.txt | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/crt0.h b/include/crt0.h index 3121eeaedb..a4a5c7f79b 100644 --- a/include/crt0.h +++ b/include/crt0.h @@ -1,11 +1,6 @@ #ifndef GUARD_CRT0_H #define GUARD_CRT0_H -// Exported type declarations - -// Exported RAM declarations - -// Exported ROM declarations extern u32 IntrMain[]; #endif //GUARD_CRT0_H diff --git a/ld_script_modern.txt b/ld_script_modern.txt index c5c711bfdb..ac62abe276 100644 --- a/ld_script_modern.txt +++ b/ld_script_modern.txt @@ -47,7 +47,7 @@ SECTIONS { .text : ALIGN(4) { - src/crt0.o(.text*); + src/rom_header.o(.text*); src/*.o(.text*); gflib/*.o(.text*); asm/*.o(.text*); From aec4d78bd4d9736aa35ffbfd77b1736d1ee26d70 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 4 Nov 2021 21:22:03 -0300 Subject: [PATCH 143/417] Fixed edge case with givemon --- src/script_pokemon_util.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 93a7477720..c24255ccdf 100755 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -64,11 +64,23 @@ u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 u int sentToPc; u8 heldItem[2]; struct Pokemon mon; + u16 targetSpecies; CreateMon(&mon, species, level, USE_RANDOM_IVS, 0, 0, OT_ID_PLAYER_ID, 0); heldItem[0] = item; heldItem[1] = item >> 8; SetMonData(&mon, MON_DATA_HELD_ITEM, heldItem); + + // In case a mon with a form changing item is given. Eg: SPECIES_ARCEUS with ITEM_SPLASH_PLATE will transform into SPECIES_ARCEUS_WATER upon gifted. + targetSpecies = GetFormChangeTargetSpecies(&mon, FORM_ITEM_HOLD_ABILITY, 0); + if (targetSpecies == SPECIES_NONE) + targetSpecies = GetFormChangeTargetSpecies(&mon, FORM_ITEM_HOLD, 0); + if (targetSpecies != SPECIES_NONE) + { + SetMonData(&mon, MON_DATA_SPECIES, &targetSpecies); + CalculateMonStats(&mon); + } + sentToPc = GiveMonToPlayer(&mon); nationalDexNum = SpeciesToNationalPokedexNum(species); From 262569845ae60f2468ede190d05a83bfa730b112 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 5 Nov 2021 17:01:15 -0300 Subject: [PATCH 144/417] Comment capitalise Co-authored-by: BuffelSaft --- src/pokemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index a6b07dbf57..8324041c3e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8054,7 +8054,7 @@ u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg) return GetFormChangeTargetSpeciesBoxMon(&mon->box, method, arg); } -// returns SPECIES_NONE if no form change is possible +// Returns SPECIES_NONE if no form change is possible u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg) { u32 i; From 6e49b45eb63c26854a05f9b0aae25254f9833fbd Mon Sep 17 00:00:00 2001 From: sphericalice Date: Fri, 5 Nov 2021 21:58:13 +0000 Subject: [PATCH 145/417] Use relevant constants for BlendPalettes --- src/diploma.c | 2 +- src/start_menu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diploma.c b/src/diploma.c index ffb1447eb8..e1c292b541 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -83,7 +83,7 @@ void CB2_ShowDiploma(void) LZDecompressWram(sDiplomaTilemap, sDiplomaTilemapPtr); CopyBgTilemapBufferToVram(1); DisplayDiplomaText(); - BlendPalettes(-1, 16, 0); + BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); EnableInterrupts(1); SetVBlankCallback(VBlankCB); diff --git a/src/start_menu.c b/src/start_menu.c index dcff75ff60..7fc4c6ddba 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -1200,7 +1200,7 @@ static bool32 InitSaveWindowAfterLinkBattle(u8 *state) break; case 3: ShowBg(0); - BlendPalettes(-1, 16, 0); + BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); SetVBlankCallback(VBlankCB_LinkBattleSave); EnableInterrupts(1); break; From abab6cef098601c32dac909e17a8e9456b71bd81 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 6 Nov 2021 11:42:34 -0400 Subject: [PATCH 146/417] Label remaining m4a functions --- src/m4a_1.s | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/m4a_1.s b/src/m4a_1.s index 62b913c863..f71a5546e4 100644 --- a/src/m4a_1.s +++ b/src/m4a_1.s @@ -302,7 +302,7 @@ _081DD044: ldrb r0, [r4, o_SoundChannel_type] tst r0, TONEDATA_TYPE_CMP | TONEDATA_TYPE_REV beq _081DD068 - bl sub_82DF49C + bl SoundMainRAM_Unk1 b _081DD228 _081DD068: mov r10, r10, lsl 16 @@ -465,8 +465,9 @@ _081DD25E: .pool thumb_func_end SoundMainRAM - arm_func_start sub_82DF49C -sub_82DF49C: +@ Not present in GBA SDK 3.0 + arm_func_start SoundMainRAM_Unk1 +SoundMainRAM_Unk1: ldr r6, [r4, o_SoundChannel_wav] ldrb r0, [r4, o_SoundChannel_statusFlags] tst r0, SOUND_CHANNEL_SF_SPECIAL @@ -505,10 +506,10 @@ _081DD2B4: ldrb r0, [r4, o_SoundChannel_type] tst r0, TONEDATA_TYPE_REV bne _081DD3C0 - bl sub_82DF758 + bl SoundMainRAM_Unk2 mov r0, r1 add r3, r3, 0x1 - bl sub_82DF758 + bl SoundMainRAM_Unk2 sub r1, r1, r0 _081DD308: ldr r6, [r5] @@ -534,11 +535,11 @@ _081DD310: b _081DD364 _081DD358: add r3, r3, lr - bl sub_82DF758 + bl SoundMainRAM_Unk2 mov r0, r1 _081DD364: add r3, r3, 0x1 - bl sub_82DF758 + bl SoundMainRAM_Unk2 sub r1, r1, r0 _081DD370: adds r5, r5, 0x40000000 @@ -565,10 +566,10 @@ _081DD3B0: b _081DD3B0 _081DD3C0: sub r3, r3, 0x1 - bl sub_82DF758 + bl SoundMainRAM_Unk2 mov r0, r1 sub r3, r3, 0x1 - bl sub_82DF758 + bl SoundMainRAM_Unk2 sub r1, r1, r0 _081DD3D8: ldr r6, [r5] @@ -594,11 +595,11 @@ _081DD3E0: b _081DD434 _081DD428: sub r3, r3, lr - bl sub_82DF758 + bl SoundMainRAM_Unk2 mov r0, r1 _081DD434: sub r3, r3, 0x1 - bl sub_82DF758 + bl SoundMainRAM_Unk2 sub r1, r1, r0 _081DD440: adds r5, r5, 0x40000000 @@ -663,10 +664,11 @@ _081DD4F4: str r7, [r5, 0x630] str r6, [r5], 0x4 pop {r8,r12,pc} - arm_func_end sub_82DF49C + arm_func_end SoundMainRAM_Unk1 - arm_func_start sub_82DF758 -sub_82DF758: +@ Not present in GBA SDK 3.0 + arm_func_start SoundMainRAM_Unk2 +SoundMainRAM_Unk2: push {r0,r2,r5-r7,lr} mov r0, r3, lsr 6 ldr r1, [r4, o_SoundChannel_xpi] @@ -704,7 +706,7 @@ _081DD594: ldrsb r1, [r5, r0] pop {r0,r2,r5-r7,pc} .pool - arm_func_end sub_82DF758 + arm_func_end SoundMainRAM_Unk2 thumb_func_start SoundMainBTM SoundMainBTM: From 44295261b0839a521168aca379f66c9ce7d01282 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 6 Nov 2021 12:07:42 -0400 Subject: [PATCH 147/417] Give programmable wave samples generic names --- sound/programmable_wave_data.inc | 104 +++++++++--------- .../{86B4830.pcm => 01.pcm} | 0 .../{86B4840.pcm => 02.pcm} | 0 .../{86B4850.pcm => 03.pcm} | 0 .../{86B4860.pcm => 04.pcm} | 0 .../{86B4870.pcm => 05.pcm} | 0 .../{86B4880.pcm => 06.pcm} | 0 .../{86B4890.pcm => 07.pcm} | Bin .../{86B48A0.pcm => 08.pcm} | Bin .../{86B48B0.pcm => 09.pcm} | Bin .../{86B48C0.pcm => 10.pcm} | 0 .../{86B48D0.pcm => 11.pcm} | 0 .../{86B48E0.pcm => 12.pcm} | 0 .../{86B48F0.pcm => 13.pcm} | 0 .../{86B4900.pcm => 14.pcm} | 0 .../{86B4910.pcm => 15.pcm} | Bin .../{86B4920.pcm => 16.pcm} | 0 .../{unused_86B4930.pcm => 17.pcm} | 0 .../{unused_86B4940.pcm => 18.pcm} | 0 .../{unused_86B4950.pcm => 19.pcm} | 0 .../{unused_86B4960.pcm => 20.pcm} | 0 .../{86B4970.pcm => 21.pcm} | 0 .../{86B4980.pcm => 22.pcm} | 0 .../{86B4990.pcm => 23.pcm} | Bin .../{86B49A0.pcm => 24.pcm} | Bin .../{86B49B0.pcm => 25.pcm} | Bin sound/voicegroups/voicegroup001.inc | 4 +- sound/voicegroups/voicegroup010.inc | 2 +- sound/voicegroups/voicegroup011.inc | 2 +- sound/voicegroups/voicegroup012.inc | 4 +- sound/voicegroups/voicegroup013.inc | 2 +- sound/voicegroups/voicegroup014.inc | 4 +- sound/voicegroups/voicegroup015.inc | 4 +- sound/voicegroups/voicegroup017.inc | 6 +- sound/voicegroups/voicegroup018.inc | 2 +- sound/voicegroups/voicegroup019.inc | 2 +- sound/voicegroups/voicegroup022.inc | 8 +- sound/voicegroups/voicegroup023.inc | 2 +- sound/voicegroups/voicegroup024.inc | 6 +- sound/voicegroups/voicegroup025.inc | 2 +- sound/voicegroups/voicegroup026.inc | 2 +- sound/voicegroups/voicegroup027.inc | 4 +- sound/voicegroups/voicegroup028.inc | 2 +- sound/voicegroups/voicegroup029.inc | 2 +- sound/voicegroups/voicegroup031.inc | 2 +- sound/voicegroups/voicegroup032.inc | 4 +- sound/voicegroups/voicegroup034.inc | 2 +- sound/voicegroups/voicegroup035.inc | 4 +- sound/voicegroups/voicegroup036.inc | 2 +- sound/voicegroups/voicegroup037.inc | 4 +- sound/voicegroups/voicegroup038.inc | 2 +- sound/voicegroups/voicegroup039.inc | 2 +- sound/voicegroups/voicegroup040.inc | 2 +- sound/voicegroups/voicegroup041.inc | 2 +- sound/voicegroups/voicegroup042.inc | 2 +- sound/voicegroups/voicegroup044.inc | 2 +- sound/voicegroups/voicegroup045.inc | 4 +- sound/voicegroups/voicegroup046.inc | 4 +- sound/voicegroups/voicegroup047.inc | 4 +- sound/voicegroups/voicegroup048.inc | 4 +- sound/voicegroups/voicegroup049.inc | 2 +- sound/voicegroups/voicegroup050.inc | 2 +- sound/voicegroups/voicegroup052.inc | 6 +- sound/voicegroups/voicegroup053.inc | 2 +- sound/voicegroups/voicegroup054.inc | 2 +- sound/voicegroups/voicegroup055.inc | 4 +- sound/voicegroups/voicegroup056.inc | 2 +- sound/voicegroups/voicegroup057.inc | 2 +- sound/voicegroups/voicegroup058.inc | 2 +- sound/voicegroups/voicegroup059.inc | 8 +- sound/voicegroups/voicegroup061.inc | 4 +- sound/voicegroups/voicegroup062.inc | 2 +- sound/voicegroups/voicegroup063.inc | 4 +- sound/voicegroups/voicegroup064.inc | 2 +- sound/voicegroups/voicegroup065.inc | 6 +- sound/voicegroups/voicegroup066.inc | 2 +- sound/voicegroups/voicegroup067.inc | 4 +- sound/voicegroups/voicegroup068.inc | 4 +- sound/voicegroups/voicegroup069.inc | 2 +- sound/voicegroups/voicegroup070.inc | 2 +- sound/voicegroups/voicegroup071.inc | 2 +- sound/voicegroups/voicegroup072.inc | 4 +- sound/voicegroups/voicegroup073.inc | 2 +- sound/voicegroups/voicegroup074.inc | 4 +- sound/voicegroups/voicegroup075.inc | 6 +- sound/voicegroups/voicegroup076.inc | 4 +- sound/voicegroups/voicegroup077.inc | 2 +- sound/voicegroups/voicegroup078.inc | 2 +- sound/voicegroups/voicegroup079.inc | 6 +- sound/voicegroups/voicegroup080.inc | 2 +- sound/voicegroups/voicegroup082.inc | 4 +- sound/voicegroups/voicegroup083.inc | 4 +- sound/voicegroups/voicegroup084.inc | 2 +- sound/voicegroups/voicegroup085.inc | 4 +- sound/voicegroups/voicegroup086.inc | 2 +- sound/voicegroups/voicegroup087.inc | 4 +- sound/voicegroups/voicegroup088.inc | 6 +- sound/voicegroups/voicegroup089.inc | 6 +- sound/voicegroups/voicegroup090.inc | 2 +- sound/voicegroups/voicegroup091.inc | 4 +- sound/voicegroups/voicegroup092.inc | 2 +- sound/voicegroups/voicegroup093.inc | 2 +- sound/voicegroups/voicegroup094.inc | 2 +- sound/voicegroups/voicegroup095.inc | 2 +- sound/voicegroups/voicegroup096.inc | 2 +- sound/voicegroups/voicegroup097.inc | 2 +- sound/voicegroups/voicegroup098.inc | 2 +- sound/voicegroups/voicegroup099.inc | 2 +- sound/voicegroups/voicegroup100.inc | 4 +- sound/voicegroups/voicegroup101.inc | 8 +- sound/voicegroups/voicegroup103.inc | 6 +- sound/voicegroups/voicegroup104.inc | 6 +- sound/voicegroups/voicegroup105.inc | 2 +- sound/voicegroups/voicegroup106.inc | 8 +- sound/voicegroups/voicegroup107.inc | 8 +- sound/voicegroups/voicegroup108.inc | 6 +- sound/voicegroups/voicegroup109.inc | 2 +- sound/voicegroups/voicegroup110.inc | 6 +- sound/voicegroups/voicegroup111.inc | 6 +- sound/voicegroups/voicegroup112.inc | 2 +- sound/voicegroups/voicegroup113.inc | 24 ++-- sound/voicegroups/voicegroup115.inc | 6 +- sound/voicegroups/voicegroup116.inc | 6 +- sound/voicegroups/voicegroup117.inc | 2 +- sound/voicegroups/voicegroup118.inc | 4 +- sound/voicegroups/voicegroup119.inc | 4 +- sound/voicegroups/voicegroup120.inc | 4 +- sound/voicegroups/voicegroup121.inc | 2 +- sound/voicegroups/voicegroup122.inc | 2 +- sound/voicegroups/voicegroup124.inc | 2 +- sound/voicegroups/voicegroup125.inc | 2 +- sound/voicegroups/voicegroup126.inc | 2 +- sound/voicegroups/voicegroup131.inc | 2 +- sound/voicegroups/voicegroup132.inc | 6 +- sound/voicegroups/voicegroup133.inc | 4 +- sound/voicegroups/voicegroup134.inc | 2 +- sound/voicegroups/voicegroup136.inc | 4 +- sound/voicegroups/voicegroup137.inc | 4 +- sound/voicegroups/voicegroup138.inc | 2 +- sound/voicegroups/voicegroup139.inc | 2 +- sound/voicegroups/voicegroup140.inc | 2 +- sound/voicegroups/voicegroup141.inc | 4 +- sound/voicegroups/voicegroup142.inc | 2 +- sound/voicegroups/voicegroup143.inc | 2 +- sound/voicegroups/voicegroup144.inc | 2 +- sound/voicegroups/voicegroup145.inc | 2 +- sound/voicegroups/voicegroup146.inc | 2 +- sound/voicegroups/voicegroup147.inc | 2 +- sound/voicegroups/voicegroup148.inc | 2 +- sound/voicegroups/voicegroup149.inc | 4 +- sound/voicegroups/voicegroup150.inc | 2 +- sound/voicegroups/voicegroup151.inc | 2 +- sound/voicegroups/voicegroup152.inc | 6 +- sound/voicegroups/voicegroup153.inc | 2 +- sound/voicegroups/voicegroup154.inc | 4 +- sound/voicegroups/voicegroup155.inc | 8 +- sound/voicegroups/voicegroup156.inc | 2 +- sound/voicegroups/voicegroup157.inc | 6 +- sound/voicegroups/voicegroup158.inc | 6 +- sound/voicegroups/voicegroup159.inc | 2 +- sound/voicegroups/voicegroup160.inc | 2 +- sound/voicegroups/voicegroup161.inc | 2 +- sound/voicegroups/voicegroup162.inc | 2 +- sound/voicegroups/voicegroup163.inc | 2 +- sound/voicegroups/voicegroup164.inc | 4 +- sound/voicegroups/voicegroup165.inc | 2 +- sound/voicegroups/voicegroup166.inc | 4 +- sound/voicegroups/voicegroup167.inc | 2 +- sound/voicegroups/voicegroup168.inc | 2 +- sound/voicegroups/voicegroup169.inc | 2 +- sound/voicegroups/voicegroup170.inc | 2 +- sound/voicegroups/voicegroup171.inc | 6 +- sound/voicegroups/voicegroup172.inc | 2 +- sound/voicegroups/voicegroup173.inc | 2 +- sound/voicegroups/voicegroup174.inc | 6 +- sound/voicegroups/voicegroup176.inc | 2 +- sound/voicegroups/voicegroup178.inc | 2 +- sound/voicegroups/voicegroup179.inc | 2 +- sound/voicegroups/voicegroup180.inc | 2 +- sound/voicegroups/voicegroup182.inc | 2 +- sound/voicegroups/voicegroup183.inc | 2 +- sound/voicegroups/voicegroup184.inc | 2 +- sound/voicegroups/voicegroup185.inc | 6 +- sound/voicegroups/voicegroup187.inc | 2 +- sound/voicegroups/voicegroup188.inc | 2 +- sound/voicegroups/voicegroup190.inc | 2 +- 186 files changed, 324 insertions(+), 320 deletions(-) rename sound/programmable_wave_samples/{86B4830.pcm => 01.pcm} (100%) rename sound/programmable_wave_samples/{86B4840.pcm => 02.pcm} (100%) rename sound/programmable_wave_samples/{86B4850.pcm => 03.pcm} (100%) rename sound/programmable_wave_samples/{86B4860.pcm => 04.pcm} (100%) rename sound/programmable_wave_samples/{86B4870.pcm => 05.pcm} (100%) rename sound/programmable_wave_samples/{86B4880.pcm => 06.pcm} (100%) rename sound/programmable_wave_samples/{86B4890.pcm => 07.pcm} (100%) rename sound/programmable_wave_samples/{86B48A0.pcm => 08.pcm} (100%) rename sound/programmable_wave_samples/{86B48B0.pcm => 09.pcm} (100%) rename sound/programmable_wave_samples/{86B48C0.pcm => 10.pcm} (100%) rename sound/programmable_wave_samples/{86B48D0.pcm => 11.pcm} (100%) rename sound/programmable_wave_samples/{86B48E0.pcm => 12.pcm} (100%) rename sound/programmable_wave_samples/{86B48F0.pcm => 13.pcm} (100%) rename sound/programmable_wave_samples/{86B4900.pcm => 14.pcm} (100%) rename sound/programmable_wave_samples/{86B4910.pcm => 15.pcm} (100%) rename sound/programmable_wave_samples/{86B4920.pcm => 16.pcm} (100%) rename sound/programmable_wave_samples/{unused_86B4930.pcm => 17.pcm} (100%) rename sound/programmable_wave_samples/{unused_86B4940.pcm => 18.pcm} (100%) rename sound/programmable_wave_samples/{unused_86B4950.pcm => 19.pcm} (100%) rename sound/programmable_wave_samples/{unused_86B4960.pcm => 20.pcm} (100%) rename sound/programmable_wave_samples/{86B4970.pcm => 21.pcm} (100%) rename sound/programmable_wave_samples/{86B4980.pcm => 22.pcm} (100%) rename sound/programmable_wave_samples/{86B4990.pcm => 23.pcm} (100%) rename sound/programmable_wave_samples/{86B49A0.pcm => 24.pcm} (100%) rename sound/programmable_wave_samples/{86B49B0.pcm => 25.pcm} (100%) diff --git a/sound/programmable_wave_data.inc b/sound/programmable_wave_data.inc index 45da43b001..3e354d88a5 100644 --- a/sound/programmable_wave_data.inc +++ b/sound/programmable_wave_data.inc @@ -1,74 +1,78 @@ -ProgrammableWaveData_86B4830:: - .incbin "sound/programmable_wave_samples/86B4830.pcm" +ProgrammableWaveData_1:: + .incbin "sound/programmable_wave_samples/01.pcm" -ProgrammableWaveData_86B4840:: - .incbin "sound/programmable_wave_samples/86B4840.pcm" +ProgrammableWaveData_2:: + .incbin "sound/programmable_wave_samples/02.pcm" -ProgrammableWaveData_86B4850:: - .incbin "sound/programmable_wave_samples/86B4850.pcm" +ProgrammableWaveData_3:: + .incbin "sound/programmable_wave_samples/03.pcm" -ProgrammableWaveData_86B4860:: - .incbin "sound/programmable_wave_samples/86B4860.pcm" +ProgrammableWaveData_4:: + .incbin "sound/programmable_wave_samples/04.pcm" -ProgrammableWaveData_86B4870:: - .incbin "sound/programmable_wave_samples/86B4870.pcm" +ProgrammableWaveData_5:: + .incbin "sound/programmable_wave_samples/05.pcm" -ProgrammableWaveData_86B4880:: - .incbin "sound/programmable_wave_samples/86B4880.pcm" +ProgrammableWaveData_6:: + .incbin "sound/programmable_wave_samples/06.pcm" -ProgrammableWaveData_86B4890:: - .incbin "sound/programmable_wave_samples/86B4890.pcm" +ProgrammableWaveData_7:: + .incbin "sound/programmable_wave_samples/07.pcm" -ProgrammableWaveData_86B48A0:: - .incbin "sound/programmable_wave_samples/86B48A0.pcm" +ProgrammableWaveData_8:: + .incbin "sound/programmable_wave_samples/08.pcm" -ProgrammableWaveData_86B48B0:: - .incbin "sound/programmable_wave_samples/86B48B0.pcm" +ProgrammableWaveData_9:: + .incbin "sound/programmable_wave_samples/09.pcm" -ProgrammableWaveData_86B48C0:: - .incbin "sound/programmable_wave_samples/86B48C0.pcm" +ProgrammableWaveData_10:: + .incbin "sound/programmable_wave_samples/10.pcm" -ProgrammableWaveData_86B48D0:: - .incbin "sound/programmable_wave_samples/86B48D0.pcm" +ProgrammableWaveData_11:: + .incbin "sound/programmable_wave_samples/11.pcm" -ProgrammableWaveData_86B48E0:: - .incbin "sound/programmable_wave_samples/86B48E0.pcm" +ProgrammableWaveData_12:: + .incbin "sound/programmable_wave_samples/12.pcm" -ProgrammableWaveData_86B48F0:: - .incbin "sound/programmable_wave_samples/86B48F0.pcm" +ProgrammableWaveData_13:: + .incbin "sound/programmable_wave_samples/13.pcm" -ProgrammableWaveData_86B4900:: - .incbin "sound/programmable_wave_samples/86B4900.pcm" +ProgrammableWaveData_14:: + .incbin "sound/programmable_wave_samples/14.pcm" -ProgrammableWaveData_86B4910:: - .incbin "sound/programmable_wave_samples/86B4910.pcm" +ProgrammableWaveData_15:: + .incbin "sound/programmable_wave_samples/15.pcm" -ProgrammableWaveData_86B4920:: - .incbin "sound/programmable_wave_samples/86B4920.pcm" +ProgrammableWaveData_16:: + .incbin "sound/programmable_wave_samples/16.pcm" -ProgrammableWaveData_Unused_86B4930:: - .incbin "sound/programmable_wave_samples/unused_86B4930.pcm" +@ Unused +ProgrammableWaveData_17:: + .incbin "sound/programmable_wave_samples/17.pcm" -ProgrammableWaveData_Unused_86B4940:: - .incbin "sound/programmable_wave_samples/unused_86B4940.pcm" +@ Unused +ProgrammableWaveData_18:: + .incbin "sound/programmable_wave_samples/18.pcm" -ProgrammableWaveData_Unused_86B4950:: - .incbin "sound/programmable_wave_samples/unused_86B4950.pcm" +@ Unused +ProgrammableWaveData_19:: + .incbin "sound/programmable_wave_samples/19.pcm" -ProgrammableWaveData_Unused_86B4960:: - .incbin "sound/programmable_wave_samples/unused_86B4960.pcm" +@ Unused +ProgrammableWaveData_20:: + .incbin "sound/programmable_wave_samples/20.pcm" -ProgrammableWaveData_86B4970:: - .incbin "sound/programmable_wave_samples/86B4970.pcm" +ProgrammableWaveData_21:: + .incbin "sound/programmable_wave_samples/21.pcm" -ProgrammableWaveData_86B4980:: - .incbin "sound/programmable_wave_samples/86B4980.pcm" +ProgrammableWaveData_22:: + .incbin "sound/programmable_wave_samples/22.pcm" -ProgrammableWaveData_86B4990:: - .incbin "sound/programmable_wave_samples/86B4990.pcm" +ProgrammableWaveData_23:: + .incbin "sound/programmable_wave_samples/23.pcm" -ProgrammableWaveData_86B49A0:: - .incbin "sound/programmable_wave_samples/86B49A0.pcm" +ProgrammableWaveData_24:: + .incbin "sound/programmable_wave_samples/24.pcm" -ProgrammableWaveData_86B49B0:: - .incbin "sound/programmable_wave_samples/86B49B0.pcm" +ProgrammableWaveData_25:: + .incbin "sound/programmable_wave_samples/25.pcm" diff --git a/sound/programmable_wave_samples/86B4830.pcm b/sound/programmable_wave_samples/01.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4830.pcm rename to sound/programmable_wave_samples/01.pcm diff --git a/sound/programmable_wave_samples/86B4840.pcm b/sound/programmable_wave_samples/02.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4840.pcm rename to sound/programmable_wave_samples/02.pcm diff --git a/sound/programmable_wave_samples/86B4850.pcm b/sound/programmable_wave_samples/03.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4850.pcm rename to sound/programmable_wave_samples/03.pcm diff --git a/sound/programmable_wave_samples/86B4860.pcm b/sound/programmable_wave_samples/04.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4860.pcm rename to sound/programmable_wave_samples/04.pcm diff --git a/sound/programmable_wave_samples/86B4870.pcm b/sound/programmable_wave_samples/05.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4870.pcm rename to sound/programmable_wave_samples/05.pcm diff --git a/sound/programmable_wave_samples/86B4880.pcm b/sound/programmable_wave_samples/06.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4880.pcm rename to sound/programmable_wave_samples/06.pcm diff --git a/sound/programmable_wave_samples/86B4890.pcm b/sound/programmable_wave_samples/07.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4890.pcm rename to sound/programmable_wave_samples/07.pcm diff --git a/sound/programmable_wave_samples/86B48A0.pcm b/sound/programmable_wave_samples/08.pcm similarity index 100% rename from sound/programmable_wave_samples/86B48A0.pcm rename to sound/programmable_wave_samples/08.pcm diff --git a/sound/programmable_wave_samples/86B48B0.pcm b/sound/programmable_wave_samples/09.pcm similarity index 100% rename from sound/programmable_wave_samples/86B48B0.pcm rename to sound/programmable_wave_samples/09.pcm diff --git a/sound/programmable_wave_samples/86B48C0.pcm b/sound/programmable_wave_samples/10.pcm similarity index 100% rename from sound/programmable_wave_samples/86B48C0.pcm rename to sound/programmable_wave_samples/10.pcm diff --git a/sound/programmable_wave_samples/86B48D0.pcm b/sound/programmable_wave_samples/11.pcm similarity index 100% rename from sound/programmable_wave_samples/86B48D0.pcm rename to sound/programmable_wave_samples/11.pcm diff --git a/sound/programmable_wave_samples/86B48E0.pcm b/sound/programmable_wave_samples/12.pcm similarity index 100% rename from sound/programmable_wave_samples/86B48E0.pcm rename to sound/programmable_wave_samples/12.pcm diff --git a/sound/programmable_wave_samples/86B48F0.pcm b/sound/programmable_wave_samples/13.pcm similarity index 100% rename from sound/programmable_wave_samples/86B48F0.pcm rename to sound/programmable_wave_samples/13.pcm diff --git a/sound/programmable_wave_samples/86B4900.pcm b/sound/programmable_wave_samples/14.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4900.pcm rename to sound/programmable_wave_samples/14.pcm diff --git a/sound/programmable_wave_samples/86B4910.pcm b/sound/programmable_wave_samples/15.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4910.pcm rename to sound/programmable_wave_samples/15.pcm diff --git a/sound/programmable_wave_samples/86B4920.pcm b/sound/programmable_wave_samples/16.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4920.pcm rename to sound/programmable_wave_samples/16.pcm diff --git a/sound/programmable_wave_samples/unused_86B4930.pcm b/sound/programmable_wave_samples/17.pcm similarity index 100% rename from sound/programmable_wave_samples/unused_86B4930.pcm rename to sound/programmable_wave_samples/17.pcm diff --git a/sound/programmable_wave_samples/unused_86B4940.pcm b/sound/programmable_wave_samples/18.pcm similarity index 100% rename from sound/programmable_wave_samples/unused_86B4940.pcm rename to sound/programmable_wave_samples/18.pcm diff --git a/sound/programmable_wave_samples/unused_86B4950.pcm b/sound/programmable_wave_samples/19.pcm similarity index 100% rename from sound/programmable_wave_samples/unused_86B4950.pcm rename to sound/programmable_wave_samples/19.pcm diff --git a/sound/programmable_wave_samples/unused_86B4960.pcm b/sound/programmable_wave_samples/20.pcm similarity index 100% rename from sound/programmable_wave_samples/unused_86B4960.pcm rename to sound/programmable_wave_samples/20.pcm diff --git a/sound/programmable_wave_samples/86B4970.pcm b/sound/programmable_wave_samples/21.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4970.pcm rename to sound/programmable_wave_samples/21.pcm diff --git a/sound/programmable_wave_samples/86B4980.pcm b/sound/programmable_wave_samples/22.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4980.pcm rename to sound/programmable_wave_samples/22.pcm diff --git a/sound/programmable_wave_samples/86B4990.pcm b/sound/programmable_wave_samples/23.pcm similarity index 100% rename from sound/programmable_wave_samples/86B4990.pcm rename to sound/programmable_wave_samples/23.pcm diff --git a/sound/programmable_wave_samples/86B49A0.pcm b/sound/programmable_wave_samples/24.pcm similarity index 100% rename from sound/programmable_wave_samples/86B49A0.pcm rename to sound/programmable_wave_samples/24.pcm diff --git a/sound/programmable_wave_samples/86B49B0.pcm b/sound/programmable_wave_samples/25.pcm similarity index 100% rename from sound/programmable_wave_samples/86B49B0.pcm rename to sound/programmable_wave_samples/25.pcm diff --git a/sound/voicegroups/voicegroup001.inc b/sound/voicegroups/voicegroup001.inc index 9960daf4a9..20a2795dc1 100644 --- a/sound/voicegroups/voicegroup001.inc +++ b/sound/voicegroups/voicegroup001.inc @@ -11,7 +11,7 @@ voicegroup001:: voice_square_1 60, 0, 0, 2, 0, 1, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -19,7 +19,7 @@ voicegroup001:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 2, 0, 1, 6, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_programmable_wave 60, 0, ProgrammableWaveData_3, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 1, 6, 0 voice_square_2 60, 0, 3, 0, 1, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup010.inc b/sound/voicegroups/voicegroup010.inc index e2b38fcbd2..8d0f7a56dd 100644 --- a/sound/voicegroups/voicegroup010.inc +++ b/sound/voicegroups/voicegroup010.inc @@ -81,7 +81,7 @@ voicegroup010:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 2 voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup011.inc b/sound/voicegroups/voicegroup011.inc index a8655cb8c9..5527cc3698 100644 --- a/sound/voicegroups/voicegroup011.inc +++ b/sound/voicegroups/voicegroup011.inc @@ -74,7 +74,7 @@ voicegroup011:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup012.inc b/sound/voicegroups/voicegroup012.inc index d92c270cbb..2fe7cf8180 100644 --- a/sound/voicegroups/voicegroup012.inc +++ b/sound/voicegroups/voicegroup012.inc @@ -87,8 +87,8 @@ voicegroup012:: voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 2, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 1, 4, 1 diff --git a/sound/voicegroups/voicegroup013.inc b/sound/voicegroups/voicegroup013.inc index f17ad599a0..f99c6f3cdc 100644 --- a/sound/voicegroups/voicegroup013.inc +++ b/sound/voicegroups/voicegroup013.inc @@ -87,7 +87,7 @@ voicegroup013:: voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 1, 0, 0, 7, 1 voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup014.inc b/sound/voicegroups/voicegroup014.inc index c3136f2fd2..6ce0897d10 100644 --- a/sound/voicegroups/voicegroup014.inc +++ b/sound/voicegroups/voicegroup014.inc @@ -81,8 +81,8 @@ voicegroup014:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 diff --git a/sound/voicegroups/voicegroup015.inc b/sound/voicegroups/voicegroup015.inc index 81e200180e..a528476356 100644 --- a/sound/voicegroups/voicegroup015.inc +++ b/sound/voicegroups/voicegroup015.inc @@ -74,14 +74,14 @@ voicegroup015:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup017.inc b/sound/voicegroups/voicegroup017.inc index f963fb77e8..06738d297b 100644 --- a/sound/voicegroups/voicegroup017.inc +++ b/sound/voicegroups/voicegroup017.inc @@ -74,18 +74,18 @@ voicegroup017:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 1, 1, 7, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 2 voice_square_1_alt 60, 0, 0, 2, 1, 1, 7, 2 voice_square_2_alt 60, 0, 3, 1, 1, 7, 2 voice_square_1_alt 60, 0, 0, 3, 1, 1, 7, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 3 voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 2 voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 2 voice_square_2_alt 60, 0, 1, 1, 2, 6, 2 diff --git a/sound/voicegroups/voicegroup018.inc b/sound/voicegroups/voicegroup018.inc index 0364349f04..30b63bb26e 100644 --- a/sound/voicegroups/voicegroup018.inc +++ b/sound/voicegroups/voicegroup018.inc @@ -81,7 +81,7 @@ voicegroup018:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 2 voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup019.inc b/sound/voicegroups/voicegroup019.inc index d15be40a14..a983659c39 100644 --- a/sound/voicegroups/voicegroup019.inc +++ b/sound/voicegroups/voicegroup019.inc @@ -81,7 +81,7 @@ voicegroup019:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 2 voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 1 voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 1 voice_square_1_alt 60, 0, 0, 1, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup022.inc b/sound/voicegroups/voicegroup022.inc index 2a1bba75d4..877f57d6ce 100644 --- a/sound/voicegroups/voicegroup022.inc +++ b/sound/voicegroups/voicegroup022.inc @@ -30,11 +30,11 @@ voicegroup022:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 0, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 0, 0, 0, 7, 0 voice_directsound_no_resample 60, 64, DirectSoundWaveData_sc88pro_rnd_kick, 255, 0, 255, 242 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup023.inc b/sound/voicegroups/voicegroup023.inc index df0f663a79..eede8dc019 100644 --- a/sound/voicegroups/voicegroup023.inc +++ b/sound/voicegroups/voicegroup023.inc @@ -81,7 +81,7 @@ voicegroup023:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 voice_square_2_alt 60, 0, 2, 0, 1, 6, 1 voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 1 diff --git a/sound/voicegroups/voicegroup024.inc b/sound/voicegroups/voicegroup024.inc index d4e1397046..3806b462d6 100644 --- a/sound/voicegroups/voicegroup024.inc +++ b/sound/voicegroups/voicegroup024.inc @@ -81,7 +81,7 @@ voicegroup024:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 voice_square_2_alt 60, 0, 2, 0, 2, 0, 0 voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 @@ -89,6 +89,6 @@ voicegroup024:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 0 voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 diff --git a/sound/voicegroups/voicegroup025.inc b/sound/voicegroups/voicegroup025.inc index 1be1beea6b..3449629469 100644 --- a/sound/voicegroups/voicegroup025.inc +++ b/sound/voicegroups/voicegroup025.inc @@ -81,7 +81,7 @@ voicegroup025:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 voice_square_2_alt 60, 0, 2, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup026.inc b/sound/voicegroups/voicegroup026.inc index 5012411663..d18047d582 100644 --- a/sound/voicegroups/voicegroup026.inc +++ b/sound/voicegroups/voicegroup026.inc @@ -81,7 +81,7 @@ voicegroup026:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 9, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 9, 0 voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 diff --git a/sound/voicegroups/voicegroup027.inc b/sound/voicegroups/voicegroup027.inc index ef84f846ec..517ee87d43 100644 --- a/sound/voicegroups/voicegroup027.inc +++ b/sound/voicegroups/voicegroup027.inc @@ -73,7 +73,7 @@ voicegroup027:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -81,7 +81,7 @@ voicegroup027:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup028.inc b/sound/voicegroups/voicegroup028.inc index 6d1071850d..9af19f1879 100644 --- a/sound/voicegroups/voicegroup028.inc +++ b/sound/voicegroups/voicegroup028.inc @@ -81,6 +81,6 @@ voicegroup028:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 2, 0, 2, 0, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_2 60, 0, 3, 0, 4, 0, 0 diff --git a/sound/voicegroups/voicegroup029.inc b/sound/voicegroups/voicegroup029.inc index e65818f90f..7c801afcb3 100644 --- a/sound/voicegroups/voicegroup029.inc +++ b/sound/voicegroups/voicegroup029.inc @@ -81,7 +81,7 @@ voicegroup029:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 0 voice_square_2_alt 60, 0, 3, 0, 1, 0, 0 voice_square_1_alt 60, 0, 0, 3, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup031.inc b/sound/voicegroups/voicegroup031.inc index a24251c78c..178d7ec63d 100644 --- a/sound/voicegroups/voicegroup031.inc +++ b/sound/voicegroups/voicegroup031.inc @@ -26,7 +26,7 @@ voicegroup031:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup032.inc b/sound/voicegroups/voicegroup032.inc index f50eb844ba..dc60bbdf3b 100644 --- a/sound/voicegroups/voicegroup032.inc +++ b/sound/voicegroups/voicegroup032.inc @@ -74,14 +74,14 @@ voicegroup032:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 127, 231, 127 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup034.inc b/sound/voicegroups/voicegroup034.inc index 6dc04e97a6..fe973b84c3 100644 --- a/sound/voicegroups/voicegroup034.inc +++ b/sound/voicegroups/voicegroup034.inc @@ -83,5 +83,5 @@ voicegroup034:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 2 + voice_programmable_wave 60, 0, ProgrammableWaveData_16, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup035.inc b/sound/voicegroups/voicegroup035.inc index 359a43a8c9..2c3ac4bddd 100644 --- a/sound/voicegroups/voicegroup035.inc +++ b/sound/voicegroups/voicegroup035.inc @@ -81,8 +81,8 @@ voicegroup035:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 6, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 2 voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 3, 0, 0, 6, 1 diff --git a/sound/voicegroups/voicegroup036.inc b/sound/voicegroups/voicegroup036.inc index b3ef9cfbc7..c3d2df146c 100644 --- a/sound/voicegroups/voicegroup036.inc +++ b/sound/voicegroups/voicegroup036.inc @@ -73,7 +73,7 @@ voicegroup036:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup037.inc b/sound/voicegroups/voicegroup037.inc index d05a4c6e24..057891c01b 100644 --- a/sound/voicegroups/voicegroup037.inc +++ b/sound/voicegroups/voicegroup037.inc @@ -81,12 +81,12 @@ voicegroup037:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 0, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 1 voice_square_1_alt 60, 0, 0, 0, 0, 0, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup038.inc b/sound/voicegroups/voicegroup038.inc index 61ecc67460..bcb211d6f5 100644 --- a/sound/voicegroups/voicegroup038.inc +++ b/sound/voicegroups/voicegroup038.inc @@ -81,5 +81,5 @@ voicegroup038:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup039.inc b/sound/voicegroups/voicegroup039.inc index 887f238dc8..9e8d16df0b 100644 --- a/sound/voicegroups/voicegroup039.inc +++ b/sound/voicegroups/voicegroup039.inc @@ -83,7 +83,7 @@ voicegroup039:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup040.inc b/sound/voicegroups/voicegroup040.inc index 4e523072a7..f390cb3d85 100644 --- a/sound/voicegroups/voicegroup040.inc +++ b/sound/voicegroups/voicegroup040.inc @@ -83,7 +83,7 @@ voicegroup040:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup041.inc b/sound/voicegroups/voicegroup041.inc index 101a6ddb7b..def4e46b00 100644 --- a/sound/voicegroups/voicegroup041.inc +++ b/sound/voicegroups/voicegroup041.inc @@ -83,7 +83,7 @@ voicegroup041:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup042.inc b/sound/voicegroups/voicegroup042.inc index 55fa84d60d..1298ddbd52 100644 --- a/sound/voicegroups/voicegroup042.inc +++ b/sound/voicegroups/voicegroup042.inc @@ -83,7 +83,7 @@ voicegroup042:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup044.inc b/sound/voicegroups/voicegroup044.inc index 838f58fbde..9a057754b3 100644 --- a/sound/voicegroups/voicegroup044.inc +++ b/sound/voicegroups/voicegroup044.inc @@ -80,5 +80,5 @@ voicegroup044:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 1 diff --git a/sound/voicegroups/voicegroup045.inc b/sound/voicegroups/voicegroup045.inc index 9647f7e457..2e2016e439 100644 --- a/sound/voicegroups/voicegroup045.inc +++ b/sound/voicegroups/voicegroup045.inc @@ -4,10 +4,10 @@ voicegroup045:: voice_square_1_alt 60, 0, 0, 1, 0, 2, 0, 1 voice_square_1_alt 60, 0, 0, 3, 1, 2, 6, 0 voice_square_2_alt 60, 0, 3, 1, 2, 6, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 0, 2, 0, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 1, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_4, 1, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_keysplit voicegroup005, KeySplitTable1 diff --git a/sound/voicegroups/voicegroup046.inc b/sound/voicegroups/voicegroup046.inc index e8165dcc6e..f653241e35 100644 --- a/sound/voicegroups/voicegroup046.inc +++ b/sound/voicegroups/voicegroup046.inc @@ -1,10 +1,10 @@ .align 2 voicegroup046:: voice_keysplit voicegroup005, KeySplitTable1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 1, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_14, 0, 1, 12, 0 voice_square_1_alt 60, 0, 0, 0, 1, 1, 9, 0 voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 1 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 253, 0, 216 voice_square_2_alt 60, 0, 1, 0, 2, 6, 3 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup047.inc b/sound/voicegroups/voicegroup047.inc index 80faa09c3c..84fa9335a8 100644 --- a/sound/voicegroups/voicegroup047.inc +++ b/sound/voicegroups/voicegroup047.inc @@ -81,9 +81,9 @@ voicegroup047:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 7, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 1, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 1, 7, 15, 2 voice_square_2_alt 60, 0, 1, 1, 1, 4, 1 voice_square_1_alt 60, 0, 0, 1, 1, 2, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup048.inc b/sound/voicegroups/voicegroup048.inc index c81ebf39ff..eeb5b682a3 100644 --- a/sound/voicegroups/voicegroup048.inc +++ b/sound/voicegroups/voicegroup048.inc @@ -73,7 +73,7 @@ voicegroup048:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -84,7 +84,7 @@ voicegroup048:: voice_square_1_alt 60, 0, 0, 3, 0, 3, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 3, 3, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 12, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 12, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 3 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 0, 0, 2, 4, 0 diff --git a/sound/voicegroups/voicegroup049.inc b/sound/voicegroups/voicegroup049.inc index 4ece4cb76a..b6b0774cf3 100644 --- a/sound/voicegroups/voicegroup049.inc +++ b/sound/voicegroups/voicegroup049.inc @@ -83,7 +83,7 @@ voicegroup049:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 voice_square_2_alt 60, 0, 1, 1, 3, 4, 2 voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 1, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 1, 7, 15, 0 voice_square_2_alt 60, 0, 2, 0, 2, 4, 2 voice_square_2_alt 60, 0, 1, 1, 3, 4, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup050.inc b/sound/voicegroups/voicegroup050.inc index 6f401b9593..6b45664eb0 100644 --- a/sound/voicegroups/voicegroup050.inc +++ b/sound/voicegroups/voicegroup050.inc @@ -83,7 +83,7 @@ voicegroup050:: voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup052.inc b/sound/voicegroups/voicegroup052.inc index ce6c19e3a0..438e2d5f17 100644 --- a/sound/voicegroups/voicegroup052.inc +++ b/sound/voicegroups/voicegroup052.inc @@ -29,7 +29,7 @@ voicegroup052:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_4, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -82,9 +82,9 @@ voicegroup052:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 0, 1, 6, 1 voice_square_1_alt 60, 0, 0, 0, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 7, 6, 1 diff --git a/sound/voicegroups/voicegroup053.inc b/sound/voicegroups/voicegroup053.inc index f9c21afe3a..e5f1a4d7e8 100644 --- a/sound/voicegroups/voicegroup053.inc +++ b/sound/voicegroups/voicegroup053.inc @@ -83,7 +83,7 @@ voicegroup053:: voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup054.inc b/sound/voicegroups/voicegroup054.inc index 4cd90843c4..ddd17ed995 100644 --- a/sound/voicegroups/voicegroup054.inc +++ b/sound/voicegroups/voicegroup054.inc @@ -82,7 +82,7 @@ voicegroup054:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 5, 2 voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup055.inc b/sound/voicegroups/voicegroup055.inc index aa9f7d1139..9157030e83 100644 --- a/sound/voicegroups/voicegroup055.inc +++ b/sound/voicegroups/voicegroup055.inc @@ -82,8 +82,8 @@ voicegroup055:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 voice_square_1_alt 60, 0, 0, 3, 0, 1, 6, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_4, 0, 7, 15, 2 voice_square_2_alt 60, 0, 1, 1, 1, 4, 1 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup056.inc b/sound/voicegroups/voicegroup056.inc index 42f7791001..ec543b9b33 100644 --- a/sound/voicegroups/voicegroup056.inc +++ b/sound/voicegroups/voicegroup056.inc @@ -87,7 +87,7 @@ voicegroup056:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup057.inc b/sound/voicegroups/voicegroup057.inc index 6bd58e87eb..391b7cf8bc 100644 --- a/sound/voicegroups/voicegroup057.inc +++ b/sound/voicegroups/voicegroup057.inc @@ -82,7 +82,7 @@ voicegroup057:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 1, 4, 10, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 1, 4, 10, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup058.inc b/sound/voicegroups/voicegroup058.inc index af043d943e..56dff5f5bb 100644 --- a/sound/voicegroups/voicegroup058.inc +++ b/sound/voicegroups/voicegroup058.inc @@ -75,7 +75,7 @@ voicegroup058:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup059.inc b/sound/voicegroups/voicegroup059.inc index f0c4d3415d..5a45d437d3 100644 --- a/sound/voicegroups/voicegroup059.inc +++ b/sound/voicegroups/voicegroup059.inc @@ -5,8 +5,8 @@ voicegroup059:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 1, 1, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 165, 51, 242 @@ -82,11 +82,11 @@ voicegroup059:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 6, 2 voice_square_2_alt 60, 0, 2, 0, 1, 6, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_1_alt 60, 0, 0, 1, 1, 2, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 diff --git a/sound/voicegroups/voicegroup061.inc b/sound/voicegroups/voicegroup061.inc index af46400940..d73730ecbc 100644 --- a/sound/voicegroups/voicegroup061.inc +++ b/sound/voicegroups/voicegroup061.inc @@ -83,8 +83,8 @@ voicegroup061:: voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup062.inc b/sound/voicegroups/voicegroup062.inc index d3745820e9..ad2e6cad7f 100644 --- a/sound/voicegroups/voicegroup062.inc +++ b/sound/voicegroups/voicegroup062.inc @@ -29,7 +29,7 @@ voicegroup062:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup063.inc b/sound/voicegroups/voicegroup063.inc index bd316ea2c5..966ae20809 100644 --- a/sound/voicegroups/voicegroup063.inc +++ b/sound/voicegroups/voicegroup063.inc @@ -83,8 +83,8 @@ voicegroup063:: voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup064.inc b/sound/voicegroups/voicegroup064.inc index e617f0ffd2..fa56af03ea 100644 --- a/sound/voicegroups/voicegroup064.inc +++ b/sound/voicegroups/voicegroup064.inc @@ -82,7 +82,7 @@ voicegroup064:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup065.inc b/sound/voicegroups/voicegroup065.inc index d435a0a306..163bce0c7e 100644 --- a/sound/voicegroups/voicegroup065.inc +++ b/sound/voicegroups/voicegroup065.inc @@ -83,11 +83,11 @@ voicegroup065:: voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup066.inc b/sound/voicegroups/voicegroup066.inc index d5bffde63e..af4a7f8410 100644 --- a/sound/voicegroups/voicegroup066.inc +++ b/sound/voicegroups/voicegroup066.inc @@ -82,7 +82,7 @@ voicegroup066:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 3 voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup067.inc b/sound/voicegroups/voicegroup067.inc index dffd21a706..ed8ccef4f8 100644 --- a/sound/voicegroups/voicegroup067.inc +++ b/sound/voicegroups/voicegroup067.inc @@ -83,8 +83,8 @@ voicegroup067:: voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup068.inc b/sound/voicegroups/voicegroup068.inc index fc3f7246d8..787ce997b7 100644 --- a/sound/voicegroups/voicegroup068.inc +++ b/sound/voicegroups/voicegroup068.inc @@ -83,8 +83,8 @@ voicegroup068:: voice_square_1 60, 0, 0, 2, 0, 2, 3, 1 voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup069.inc b/sound/voicegroups/voicegroup069.inc index 477fd538b4..26ea294051 100644 --- a/sound/voicegroups/voicegroup069.inc +++ b/sound/voicegroups/voicegroup069.inc @@ -83,7 +83,7 @@ voicegroup069:: voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 3 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 3 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup070.inc b/sound/voicegroups/voicegroup070.inc index aaa4078028..59a43180df 100644 --- a/sound/voicegroups/voicegroup070.inc +++ b/sound/voicegroups/voicegroup070.inc @@ -83,7 +83,7 @@ voicegroup070:: voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup071.inc b/sound/voicegroups/voicegroup071.inc index c6c7414e3f..a4cb9c721f 100644 --- a/sound/voicegroups/voicegroup071.inc +++ b/sound/voicegroups/voicegroup071.inc @@ -83,7 +83,7 @@ voicegroup071:: voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup072.inc b/sound/voicegroups/voicegroup072.inc index 7c040a3e77..50fa4e4cfa 100644 --- a/sound/voicegroups/voicegroup072.inc +++ b/sound/voicegroups/voicegroup072.inc @@ -82,8 +82,8 @@ voicegroup072:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup073.inc b/sound/voicegroups/voicegroup073.inc index 9692cc87db..b10ab81d1a 100644 --- a/sound/voicegroups/voicegroup073.inc +++ b/sound/voicegroups/voicegroup073.inc @@ -82,7 +82,7 @@ voicegroup073:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup074.inc b/sound/voicegroups/voicegroup074.inc index 5be06711b5..1c3c67f8dc 100644 --- a/sound/voicegroups/voicegroup074.inc +++ b/sound/voicegroups/voicegroup074.inc @@ -82,12 +82,12 @@ voicegroup074:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 0 voice_square_2_alt 60, 0, 2, 0, 1, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup075.inc b/sound/voicegroups/voicegroup075.inc index 72b144a13a..86af71af4b 100644 --- a/sound/voicegroups/voicegroup075.inc +++ b/sound/voicegroups/voicegroup075.inc @@ -82,10 +82,10 @@ voicegroup075:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 2, 3, 1 voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 0 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup076.inc b/sound/voicegroups/voicegroup076.inc index a4eadcef3f..378a8ff669 100644 --- a/sound/voicegroups/voicegroup076.inc +++ b/sound/voicegroups/voicegroup076.inc @@ -82,8 +82,8 @@ voicegroup076:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup077.inc b/sound/voicegroups/voicegroup077.inc index 08f0e5e389..994d9f411d 100644 --- a/sound/voicegroups/voicegroup077.inc +++ b/sound/voicegroups/voicegroup077.inc @@ -82,7 +82,7 @@ voicegroup077:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup078.inc b/sound/voicegroups/voicegroup078.inc index b6dba9dca1..e3ef10feb7 100644 --- a/sound/voicegroups/voicegroup078.inc +++ b/sound/voicegroups/voicegroup078.inc @@ -82,7 +82,7 @@ voicegroup078:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup079.inc b/sound/voicegroups/voicegroup079.inc index ecea4eca18..42b51faea4 100644 --- a/sound/voicegroups/voicegroup079.inc +++ b/sound/voicegroups/voicegroup079.inc @@ -39,7 +39,7 @@ voicegroup079:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 6, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 6, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -82,9 +82,9 @@ voicegroup079:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 1 voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 5 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 4, 4 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 4, 4 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 6, 2 diff --git a/sound/voicegroups/voicegroup080.inc b/sound/voicegroups/voicegroup080.inc index a6827083c6..6d627ad92e 100644 --- a/sound/voicegroups/voicegroup080.inc +++ b/sound/voicegroups/voicegroup080.inc @@ -82,7 +82,7 @@ voicegroup080:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup082.inc b/sound/voicegroups/voicegroup082.inc index 9aa1d7c5b4..b6b5506f1a 100644 --- a/sound/voicegroups/voicegroup082.inc +++ b/sound/voicegroups/voicegroup082.inc @@ -82,8 +82,8 @@ voicegroup082:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 3, 0, 2, 4, 1 voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 4, 4 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 4, 4 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup083.inc b/sound/voicegroups/voicegroup083.inc index 09cee33e15..4f2fcd809f 100644 --- a/sound/voicegroups/voicegroup083.inc +++ b/sound/voicegroups/voicegroup083.inc @@ -82,6 +82,6 @@ voicegroup083:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 6, 4 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 6, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 6, 4 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 2, 6, 1 diff --git a/sound/voicegroups/voicegroup084.inc b/sound/voicegroups/voicegroup084.inc index ee994d84d3..510b37c23a 100644 --- a/sound/voicegroups/voicegroup084.inc +++ b/sound/voicegroups/voicegroup084.inc @@ -87,7 +87,7 @@ voicegroup084:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup085.inc b/sound/voicegroups/voicegroup085.inc index bd2cc348f0..6260fb198a 100644 --- a/sound/voicegroups/voicegroup085.inc +++ b/sound/voicegroups/voicegroup085.inc @@ -83,8 +83,8 @@ voicegroup085:: voice_square_1_alt 60, 0, 0, 2, 1, 2, 4, 0 voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 13, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 13, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup086.inc b/sound/voicegroups/voicegroup086.inc index 482a7729e3..d5298f9b03 100644 --- a/sound/voicegroups/voicegroup086.inc +++ b/sound/voicegroups/voicegroup086.inc @@ -83,7 +83,7 @@ voicegroup086:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 0 voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup087.inc b/sound/voicegroups/voicegroup087.inc index d9295b3fe7..1ccb69ea55 100644 --- a/sound/voicegroups/voicegroup087.inc +++ b/sound/voicegroups/voicegroup087.inc @@ -29,7 +29,7 @@ voicegroup087:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -83,7 +83,7 @@ voicegroup087:: voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup088.inc b/sound/voicegroups/voicegroup088.inc index 82afd10f63..8f6f216884 100644 --- a/sound/voicegroups/voicegroup088.inc +++ b/sound/voicegroups/voicegroup088.inc @@ -6,7 +6,7 @@ voicegroup088:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 1, 1, 6, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -82,12 +82,12 @@ voicegroup088:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 6, 2 voice_square_2_alt 60, 0, 1, 0, 2, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 6, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup089.inc b/sound/voicegroups/voicegroup089.inc index 7d71119ba3..4b5e7d57bd 100644 --- a/sound/voicegroups/voicegroup089.inc +++ b/sound/voicegroups/voicegroup089.inc @@ -82,9 +82,9 @@ voicegroup089:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 3 voice_square_2_alt 60, 0, 2, 0, 2, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup090.inc b/sound/voicegroups/voicegroup090.inc index f66d09b65c..4039ad8d14 100644 --- a/sound/voicegroups/voicegroup090.inc +++ b/sound/voicegroups/voicegroup090.inc @@ -82,7 +82,7 @@ voicegroup090:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 2, 4, 1 voice_square_2_alt 60, 0, 0, 0, 2, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup091.inc b/sound/voicegroups/voicegroup091.inc index df866235ed..28a64ab488 100644 --- a/sound/voicegroups/voicegroup091.inc +++ b/sound/voicegroups/voicegroup091.inc @@ -82,8 +82,8 @@ voicegroup091:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 5, 2 voice_square_2_alt 60, 0, 2, 0, 1, 5, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 6, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 2, 6, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup092.inc b/sound/voicegroups/voicegroup092.inc index 9b91a44aa2..90e2858175 100644 --- a/sound/voicegroups/voicegroup092.inc +++ b/sound/voicegroups/voicegroup092.inc @@ -82,7 +82,7 @@ voicegroup092:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 2, 0, 1, 4, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 7, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup093.inc b/sound/voicegroups/voicegroup093.inc index 44149b083c..8cea357335 100644 --- a/sound/voicegroups/voicegroup093.inc +++ b/sound/voicegroups/voicegroup093.inc @@ -82,7 +82,7 @@ voicegroup093:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 7, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup094.inc b/sound/voicegroups/voicegroup094.inc index 21cab6cd2a..b52e958926 100644 --- a/sound/voicegroups/voicegroup094.inc +++ b/sound/voicegroups/voicegroup094.inc @@ -82,7 +82,7 @@ voicegroup094:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 7, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup095.inc b/sound/voicegroups/voicegroup095.inc index 0c791dc9eb..96b531f8ed 100644 --- a/sound/voicegroups/voicegroup095.inc +++ b/sound/voicegroups/voicegroup095.inc @@ -82,7 +82,7 @@ voicegroup095:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 3 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 3 voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup096.inc b/sound/voicegroups/voicegroup096.inc index 8fe0892e69..b0cb653caf 100644 --- a/sound/voicegroups/voicegroup096.inc +++ b/sound/voicegroups/voicegroup096.inc @@ -84,7 +84,7 @@ voicegroup096:: voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup097.inc b/sound/voicegroups/voicegroup097.inc index e184093479..fb0542dac6 100644 --- a/sound/voicegroups/voicegroup097.inc +++ b/sound/voicegroups/voicegroup097.inc @@ -82,7 +82,7 @@ voicegroup097:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 7, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup098.inc b/sound/voicegroups/voicegroup098.inc index 001bd5222a..d670cb16d0 100644 --- a/sound/voicegroups/voicegroup098.inc +++ b/sound/voicegroups/voicegroup098.inc @@ -82,7 +82,7 @@ voicegroup098:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 7, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup099.inc b/sound/voicegroups/voicegroup099.inc index f4031beebb..e750f95831 100644 --- a/sound/voicegroups/voicegroup099.inc +++ b/sound/voicegroups/voicegroup099.inc @@ -82,7 +82,7 @@ voicegroup099:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 0 voice_square_2_alt 60, 0, 0, 0, 1, 4, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 7, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 7, 0 voice_square_1_alt 60, 0, 0, 1, 2, 1, 5, 0 voice_square_2_alt 60, 0, 1, 2, 1, 5, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup100.inc b/sound/voicegroups/voicegroup100.inc index fa936e9590..577d05c354 100644 --- a/sound/voicegroups/voicegroup100.inc +++ b/sound/voicegroups/voicegroup100.inc @@ -29,7 +29,7 @@ voicegroup100:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -85,7 +85,7 @@ voicegroup100:: voice_square_2_alt 60, 0, 2, 1, 1, 4, 1 voice_square_2_alt 60, 0, 1, 0, 1, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup101.inc b/sound/voicegroups/voicegroup101.inc index 5527ec7964..768c18dea2 100644 --- a/sound/voicegroups/voicegroup101.inc +++ b/sound/voicegroups/voicegroup101.inc @@ -6,7 +6,7 @@ voicegroup101:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 1, 5, 2, 4 voice_square_2_alt 60, 0, 1, 1, 5, 2, 4 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -74,7 +74,7 @@ voicegroup101:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -82,12 +82,12 @@ voicegroup101:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 1, 1, 6, 0 voice_square_1_alt 60, 0, 0, 0, 0, 4, 6, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 1, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 1, 4, 6, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup103.inc b/sound/voicegroups/voicegroup103.inc index e60c3c1aae..cc743edb22 100644 --- a/sound/voicegroups/voicegroup103.inc +++ b/sound/voicegroups/voicegroup103.inc @@ -83,8 +83,8 @@ voicegroup103:: voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 0, 0, 10, 1 @@ -92,7 +92,7 @@ voicegroup103:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup104.inc b/sound/voicegroups/voicegroup104.inc index 9ca1a88484..c1b623918b 100644 --- a/sound/voicegroups/voicegroup104.inc +++ b/sound/voicegroups/voicegroup104.inc @@ -83,8 +83,8 @@ voicegroup104:: voice_square_1_alt 60, 0, 0, 1, 2, 0, 12, 5 voice_square_2_alt 60, 0, 0, 0, 0, 10, 4 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 2, 0, 12, 5 @@ -92,7 +92,7 @@ voicegroup104:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup105.inc b/sound/voicegroups/voicegroup105.inc index c3bfdec9aa..a1a1bc2d61 100644 --- a/sound/voicegroups/voicegroup105.inc +++ b/sound/voicegroups/voicegroup105.inc @@ -82,5 +82,5 @@ voicegroup105:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 2, 9, 4 voice_square_2_alt 60, 0, 2, 0, 2, 9, 4 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 diff --git a/sound/voicegroups/voicegroup106.inc b/sound/voicegroups/voicegroup106.inc index 834b9a8a26..1a1125be8a 100644 --- a/sound/voicegroups/voicegroup106.inc +++ b/sound/voicegroups/voicegroup106.inc @@ -6,7 +6,7 @@ voicegroup106:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -74,7 +74,7 @@ voicegroup106:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_flute, 255, 0, 255, 165 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -84,10 +84,10 @@ voicegroup106:: voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup107.inc b/sound/voicegroups/voicegroup107.inc index e2945809e6..c43a518ec7 100644 --- a/sound/voicegroups/voicegroup107.inc +++ b/sound/voicegroups/voicegroup107.inc @@ -6,7 +6,7 @@ voicegroup107:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -74,7 +74,7 @@ voicegroup107:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -84,10 +84,10 @@ voicegroup107:: voice_square_2_alt 60, 0, 2, 0, 1, 4, 1 voice_square_2_alt 60, 0, 0, 0, 1, 4, 1 voice_square_1_alt 60, 0, 0, 0, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 0 voice_square_1_alt 60, 0, 0, 3, 0, 1, 4, 1 voice_square_2_alt 60, 0, 3, 0, 1, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup108.inc b/sound/voicegroups/voicegroup108.inc index b539070109..a92ee43c6a 100644 --- a/sound/voicegroups/voicegroup108.inc +++ b/sound/voicegroups/voicegroup108.inc @@ -84,15 +84,15 @@ voicegroup108:: voice_square_2_alt 60, 0, 0, 0, 0, 9, 2 voice_square_2_alt 60, 0, 1, 0, 0, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_4, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup109.inc b/sound/voicegroups/voicegroup109.inc index 52942e9ecf..a999143737 100644 --- a/sound/voicegroups/voicegroup109.inc +++ b/sound/voicegroups/voicegroup109.inc @@ -82,5 +82,5 @@ voicegroup109:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 0, 13, 1 voice_square_2_alt 60, 0, 0, 0, 0, 12, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup110.inc b/sound/voicegroups/voicegroup110.inc index a13facb2cf..25b6fdaae0 100644 --- a/sound/voicegroups/voicegroup110.inc +++ b/sound/voicegroups/voicegroup110.inc @@ -83,8 +83,8 @@ voicegroup110:: voice_square_1_alt 60, 0, 0, 1, 1, 1, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 3, 0, 0, 10, 1 @@ -92,7 +92,7 @@ voicegroup110:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup111.inc b/sound/voicegroups/voicegroup111.inc index 546ed3a465..27b418f462 100644 --- a/sound/voicegroups/voicegroup111.inc +++ b/sound/voicegroups/voicegroup111.inc @@ -83,8 +83,8 @@ voicegroup111:: voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 @@ -92,7 +92,7 @@ voicegroup111:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup112.inc b/sound/voicegroups/voicegroup112.inc index ad1c4a1b7d..9cb2f415a9 100644 --- a/sound/voicegroups/voicegroup112.inc +++ b/sound/voicegroups/voicegroup112.inc @@ -4,7 +4,7 @@ voicegroup112:: voice_keysplit voicegroup005, KeySplitTable1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_21, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup113.inc b/sound/voicegroups/voicegroup113.inc index cfe06aa97b..0fa279c8a6 100644 --- a/sound/voicegroups/voicegroup113.inc +++ b/sound/voicegroups/voicegroup113.inc @@ -1,16 +1,16 @@ .align 2 voicegroup113:: voice_keysplit_all voicegroup002 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4990, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B49B0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B49A0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4980, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48B0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48C0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48D0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48E0, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48F0, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_23, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_25, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_24, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_21, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_22, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_9, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_10, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_11, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_12, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_13, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_xylophone, 255, 235, 0, 204 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -39,7 +39,7 @@ voicegroup113:: voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 235, 128, 99 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 252, 0, 115 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -87,7 +87,7 @@ voicegroup113:: voice_square_2_alt 60, 0, 3, 0, 7, 7, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 7, 15, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup115.inc b/sound/voicegroups/voicegroup115.inc index afdfebaf7b..eb4f52b878 100644 --- a/sound/voicegroups/voicegroup115.inc +++ b/sound/voicegroups/voicegroup115.inc @@ -87,9 +87,9 @@ voicegroup115:: voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 voice_square_1_alt 60, 0, 0, 0, 0, 1, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 1, 9, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_21, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 1, 9, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 diff --git a/sound/voicegroups/voicegroup116.inc b/sound/voicegroups/voicegroup116.inc index c5b16797ae..a86a87f5d1 100644 --- a/sound/voicegroups/voicegroup116.inc +++ b/sound/voicegroups/voicegroup116.inc @@ -82,12 +82,12 @@ voicegroup116:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 voice_square_2_alt 60, 0, 3, 0, 3, 3, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 3, 6, 5 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_21, 0, 3, 6, 5 voice_square_1_alt 60, 0, 0, 0, 0, 2, 7, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4970, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_21, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup117.inc b/sound/voicegroups/voicegroup117.inc index da6a16d7af..3a86ec4f58 100644 --- a/sound/voicegroups/voicegroup117.inc +++ b/sound/voicegroups/voicegroup117.inc @@ -81,5 +81,5 @@ voicegroup117:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup118.inc b/sound/voicegroups/voicegroup118.inc index 129831d75e..89e66b21d2 100644 --- a/sound/voicegroups/voicegroup118.inc +++ b/sound/voicegroups/voicegroup118.inc @@ -81,10 +81,10 @@ voicegroup118:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup119.inc b/sound/voicegroups/voicegroup119.inc index 063ed24b96..8b7fe24c79 100644 --- a/sound/voicegroups/voicegroup119.inc +++ b/sound/voicegroups/voicegroup119.inc @@ -81,7 +81,7 @@ voicegroup119:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 voice_square_2 60, 0, 1, 0, 1, 9, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -90,5 +90,5 @@ voicegroup119:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup120.inc b/sound/voicegroups/voicegroup120.inc index f80380fc48..2c104fb10b 100644 --- a/sound/voicegroups/voicegroup120.inc +++ b/sound/voicegroups/voicegroup120.inc @@ -81,7 +81,7 @@ voicegroup120:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 7, 1 voice_square_2 60, 0, 3, 0, 1, 7, 1 @@ -90,5 +90,5 @@ voicegroup120:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 2 diff --git a/sound/voicegroups/voicegroup121.inc b/sound/voicegroups/voicegroup121.inc index 2c9e9fa3e6..f09ddd7741 100644 --- a/sound/voicegroups/voicegroup121.inc +++ b/sound/voicegroups/voicegroup121.inc @@ -81,7 +81,7 @@ voicegroup121:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 2, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 1, 7, 1 voice_square_2 60, 0, 0, 0, 1, 7, 1 voice_square_1 60, 0, 0, 0, 0, 1, 7, 1 diff --git a/sound/voicegroups/voicegroup122.inc b/sound/voicegroups/voicegroup122.inc index ca64a7c009..65356a3d17 100644 --- a/sound/voicegroups/voicegroup122.inc +++ b/sound/voicegroups/voicegroup122.inc @@ -81,7 +81,7 @@ voicegroup122:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 voice_square_1 60, 0, 0, 3, 0, 1, 9, 1 voice_square_1 60, 0, 0, 3, 0, 0, 9, 1 diff --git a/sound/voicegroups/voicegroup124.inc b/sound/voicegroups/voicegroup124.inc index 6f5d263b3d..274d76dcd1 100644 --- a/sound/voicegroups/voicegroup124.inc +++ b/sound/voicegroups/voicegroup124.inc @@ -81,7 +81,7 @@ voicegroup124:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 2, 0, 1, 7, 1 diff --git a/sound/voicegroups/voicegroup125.inc b/sound/voicegroups/voicegroup125.inc index afe16b0b0f..644002abf7 100644 --- a/sound/voicegroups/voicegroup125.inc +++ b/sound/voicegroups/voicegroup125.inc @@ -81,7 +81,7 @@ voicegroup125:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 3, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 voice_square_1 60, 0, 0, 3, 0, 1, 7, 1 voice_square_1 60, 0, 0, 3, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup126.inc b/sound/voicegroups/voicegroup126.inc index a2e663cf12..51959b4f1e 100644 --- a/sound/voicegroups/voicegroup126.inc +++ b/sound/voicegroups/voicegroup126.inc @@ -81,7 +81,7 @@ voicegroup126:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2 60, 0, 3, 1, 1, 6, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 2 voice_square_1 60, 0, 0, 3, 1, 1, 6, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup131.inc b/sound/voicegroups/voicegroup131.inc index e0e8c6ceed..029afa5be5 100644 --- a/sound/voicegroups/voicegroup131.inc +++ b/sound/voicegroups/voicegroup131.inc @@ -92,7 +92,7 @@ voicegroup131:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 9, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 9, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup132.inc b/sound/voicegroups/voicegroup132.inc index 2e7dbc825a..2806916bca 100644 --- a/sound/voicegroups/voicegroup132.inc +++ b/sound/voicegroups/voicegroup132.inc @@ -82,9 +82,9 @@ voicegroup132:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 4, 2, 2 voice_square_2_alt 60, 0, 3, 0, 1, 7, 5 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 4, 6, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 4, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 4, 6, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 4, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 0, 0, 4, 2, 2 @@ -92,7 +92,7 @@ voicegroup132:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 2, 9, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 2, 9, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup133.inc b/sound/voicegroups/voicegroup133.inc index 23bfa92495..be70f6ae33 100644 --- a/sound/voicegroups/voicegroup133.inc +++ b/sound/voicegroups/voicegroup133.inc @@ -87,12 +87,12 @@ voicegroup133:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup134.inc b/sound/voicegroups/voicegroup134.inc index 2266c55dee..1bc01fed07 100644 --- a/sound/voicegroups/voicegroup134.inc +++ b/sound/voicegroups/voicegroup134.inc @@ -87,7 +87,7 @@ voicegroup134:: voice_square_2_alt 60, 0, 3, 0, 1, 7, 1 voice_square_1_alt 60, 0, 0, 3, 0, 1, 7, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 2, 0, 0, 7, 1 voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 1 diff --git a/sound/voicegroups/voicegroup136.inc b/sound/voicegroups/voicegroup136.inc index 672c9435c3..0428c8c004 100644 --- a/sound/voicegroups/voicegroup136.inc +++ b/sound/voicegroups/voicegroup136.inc @@ -86,8 +86,8 @@ voicegroup136:: voice_square_2_alt 60, 0, 0, 0, 5, 0, 0 voice_square_1_alt 60, 0, 0, 1, 0, 5, 0, 0 voice_square_2_alt 60, 0, 3, 2, 4, 10, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 1, 5, 0, 3 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 1, 5, 0, 3 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 1, 5, 0, 3 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 1, 5, 0, 3 voice_square_2_alt 60, 0, 1, 0, 1, 10, 2 voice_square_1_alt 60, 0, 0, 1, 0, 1, 10, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup137.inc b/sound/voicegroups/voicegroup137.inc index 494b82d375..cf7422cd23 100644 --- a/sound/voicegroups/voicegroup137.inc +++ b/sound/voicegroups/voicegroup137.inc @@ -87,8 +87,8 @@ voicegroup137:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 2, 4, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 2, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 2, 4, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 2, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup138.inc b/sound/voicegroups/voicegroup138.inc index 599dd92fff..227538f5dc 100644 --- a/sound/voicegroups/voicegroup138.inc +++ b/sound/voicegroups/voicegroup138.inc @@ -92,7 +92,7 @@ voicegroup138:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup139.inc b/sound/voicegroups/voicegroup139.inc index 32250fd92e..e8969de570 100644 --- a/sound/voicegroups/voicegroup139.inc +++ b/sound/voicegroups/voicegroup139.inc @@ -92,7 +92,7 @@ voicegroup139:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup140.inc b/sound/voicegroups/voicegroup140.inc index a12a9f30a8..8206cca1d2 100644 --- a/sound/voicegroups/voicegroup140.inc +++ b/sound/voicegroups/voicegroup140.inc @@ -3,5 +3,5 @@ voicegroup140:: voice_keysplit_all voicegroup001 voice_square_1 60, 0, 0, 2, 0, 2, 3, 1 voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup141.inc b/sound/voicegroups/voicegroup141.inc index 6373309ed5..1e556a21b6 100644 --- a/sound/voicegroups/voicegroup141.inc +++ b/sound/voicegroups/voicegroup141.inc @@ -83,9 +83,9 @@ voicegroup141:: voice_square_1_alt 60, 0, 0, 0, 0, 2, 5, 2 voice_square_2_alt 60, 0, 3, 0, 2, 7, 3 voice_square_2_alt 60, 0, 2, 0, 2, 6, 5 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 1, 7, 0, 6 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 1, 7, 0, 6 voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 2, 9, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 2, 9, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup142.inc b/sound/voicegroups/voicegroup142.inc index 3764a327f3..af5b809bf8 100644 --- a/sound/voicegroups/voicegroup142.inc +++ b/sound/voicegroups/voicegroup142.inc @@ -83,5 +83,5 @@ voicegroup142:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 6, 4 voice_square_2_alt 60, 0, 2, 0, 2, 5, 5 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_14, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup143.inc b/sound/voicegroups/voicegroup143.inc index 346c644d80..9cb286ac13 100644 --- a/sound/voicegroups/voicegroup143.inc +++ b/sound/voicegroups/voicegroup143.inc @@ -83,7 +83,7 @@ voicegroup143:: voice_square_2_alt 60, 0, 3, 0, 2, 3, 2 voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup144.inc b/sound/voicegroups/voicegroup144.inc index 60bd142ade..87830a387b 100644 --- a/sound/voicegroups/voicegroup144.inc +++ b/sound/voicegroups/voicegroup144.inc @@ -83,7 +83,7 @@ voicegroup144:: voice_square_2_alt 60, 0, 3, 0, 2, 4, 2 voice_square_2_alt 60, 0, 1, 0, 2, 4, 3 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup145.inc b/sound/voicegroups/voicegroup145.inc index 374987162b..96cda70e48 100644 --- a/sound/voicegroups/voicegroup145.inc +++ b/sound/voicegroups/voicegroup145.inc @@ -92,7 +92,7 @@ voicegroup145:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup146.inc b/sound/voicegroups/voicegroup146.inc index fcbfedcfed..b0f1b92d6f 100644 --- a/sound/voicegroups/voicegroup146.inc +++ b/sound/voicegroups/voicegroup146.inc @@ -92,7 +92,7 @@ voicegroup146:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup147.inc b/sound/voicegroups/voicegroup147.inc index de4c5a02ff..4767815824 100644 --- a/sound/voicegroups/voicegroup147.inc +++ b/sound/voicegroups/voicegroup147.inc @@ -83,5 +83,5 @@ voicegroup147:: voice_square_1_alt 60, 0, 0, 2, 0, 0, 6, 1 voice_square_2_alt 60, 0, 2, 0, 0, 6, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 2, 4, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 2, 4, 2 diff --git a/sound/voicegroups/voicegroup148.inc b/sound/voicegroups/voicegroup148.inc index ba25340f0d..4fc324df88 100644 --- a/sound/voicegroups/voicegroup148.inc +++ b/sound/voicegroups/voicegroup148.inc @@ -87,7 +87,7 @@ voicegroup148:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup149.inc b/sound/voicegroups/voicegroup149.inc index 50c47bc356..c0239fef95 100644 --- a/sound/voicegroups/voicegroup149.inc +++ b/sound/voicegroups/voicegroup149.inc @@ -87,10 +87,10 @@ voicegroup149:: voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup150.inc b/sound/voicegroups/voicegroup150.inc index 97de70ac64..c51150d782 100644 --- a/sound/voicegroups/voicegroup150.inc +++ b/sound/voicegroups/voicegroup150.inc @@ -83,7 +83,7 @@ voicegroup150:: voice_square_2_alt 60, 0, 1, 0, 1, 4, 6 voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 5 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup151.inc b/sound/voicegroups/voicegroup151.inc index c7e150baf2..29571169d6 100644 --- a/sound/voicegroups/voicegroup151.inc +++ b/sound/voicegroups/voicegroup151.inc @@ -87,5 +87,5 @@ voicegroup151:: voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup152.inc b/sound/voicegroups/voicegroup152.inc index 19340b82c3..06ccc3ae9d 100644 --- a/sound/voicegroups/voicegroup152.inc +++ b/sound/voicegroups/voicegroup152.inc @@ -82,9 +82,9 @@ voicegroup152:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 4, 2, 1 voice_square_2_alt 60, 0, 3, 0, 1, 5, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 4, 6, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 4, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 4, 6, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 4, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 2, 4, 1 @@ -92,7 +92,7 @@ voicegroup152:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 2, 9, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 2, 9, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup153.inc b/sound/voicegroups/voicegroup153.inc index 4284b89913..7206c7ba3d 100644 --- a/sound/voicegroups/voicegroup153.inc +++ b/sound/voicegroups/voicegroup153.inc @@ -92,7 +92,7 @@ voicegroup153:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B48A0, 0, 1, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_8, 0, 1, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup154.inc b/sound/voicegroups/voicegroup154.inc index e38e7a4483..ce70e65d57 100644 --- a/sound/voicegroups/voicegroup154.inc +++ b/sound/voicegroups/voicegroup154.inc @@ -87,10 +87,10 @@ voicegroup154:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4860, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_4, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 0, 12, 0 diff --git a/sound/voicegroups/voicegroup155.inc b/sound/voicegroups/voicegroup155.inc index 87cd504986..8150754aab 100644 --- a/sound/voicegroups/voicegroup155.inc +++ b/sound/voicegroups/voicegroup155.inc @@ -83,13 +83,13 @@ voicegroup155:: voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 voice_square_2_alt 60, 0, 3, 0, 3, 6, 2 voice_square_2_alt 60, 0, 3, 0, 2, 6, 5 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 3, 6, 5 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 3, 6, 5 voice_square_2_alt 60, 0, 0, 0, 2, 6, 5 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4850, 0, 7, 15, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 1, 9, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_3, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 1, 9, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 2, 6, 3 diff --git a/sound/voicegroups/voicegroup156.inc b/sound/voicegroups/voicegroup156.inc index 76291c1e6a..374464fff9 100644 --- a/sound/voicegroups/voicegroup156.inc +++ b/sound/voicegroups/voicegroup156.inc @@ -3,7 +3,7 @@ voicegroup156:: voice_keysplit_all voicegroup002 voice_keysplit voicegroup005, KeySplitTable1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_directsound 60, 0, DirectSoundWaveData_sd90_classical_detuned_ep1_low, 255, 249, 0, 165 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup157.inc b/sound/voicegroups/voicegroup157.inc index 66cd6ff1cd..7dd93abd0a 100644 --- a/sound/voicegroups/voicegroup157.inc +++ b/sound/voicegroups/voicegroup157.inc @@ -82,12 +82,12 @@ voicegroup157:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 1, 0, 2, 7, 2 voice_square_2_alt 60, 0, 3, 0, 3, 3, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 3, 6, 5 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 3, 6, 5 voice_square_1_alt 60, 0, 0, 0, 0, 2, 7, 2 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup158.inc b/sound/voicegroups/voicegroup158.inc index 6a8ca184b4..50fa566068 100644 --- a/sound/voicegroups/voicegroup158.inc +++ b/sound/voicegroups/voicegroup158.inc @@ -84,15 +84,15 @@ voicegroup158:: voice_square_2_alt 60, 0, 3, 0, 1, 10, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 1, 0, 9, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup159.inc b/sound/voicegroups/voicegroup159.inc index 7ee1e3a56e..f1d2046560 100644 --- a/sound/voicegroups/voicegroup159.inc +++ b/sound/voicegroups/voicegroup159.inc @@ -82,7 +82,7 @@ voicegroup159:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1_alt 60, 0, 0, 2, 0, 7, 0, 6 voice_square_2_alt 60, 0, 1, 1, 5, 1, 6 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 1, 7, 0, 6 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 1, 7, 0, 6 voice_square_1_alt 60, 0, 0, 0, 1, 4, 3, 6 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup160.inc b/sound/voicegroups/voicegroup160.inc index faff810958..160d0cad8f 100644 --- a/sound/voicegroups/voicegroup160.inc +++ b/sound/voicegroups/voicegroup160.inc @@ -87,5 +87,5 @@ voicegroup160:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup161.inc b/sound/voicegroups/voicegroup161.inc index 71374e1a06..c334fa2647 100644 --- a/sound/voicegroups/voicegroup161.inc +++ b/sound/voicegroups/voicegroup161.inc @@ -87,7 +87,7 @@ voicegroup161:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup162.inc b/sound/voicegroups/voicegroup162.inc index 53edb3b0e8..3a532b23ee 100644 --- a/sound/voicegroups/voicegroup162.inc +++ b/sound/voicegroups/voicegroup162.inc @@ -92,5 +92,5 @@ voicegroup162:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup163.inc b/sound/voicegroups/voicegroup163.inc index 86ff86ef94..b8a3303f07 100644 --- a/sound/voicegroups/voicegroup163.inc +++ b/sound/voicegroups/voicegroup163.inc @@ -92,7 +92,7 @@ voicegroup163:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_14, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup164.inc b/sound/voicegroups/voicegroup164.inc index fe48fbfb99..d64cfd33ad 100644 --- a/sound/voicegroups/voicegroup164.inc +++ b/sound/voicegroups/voicegroup164.inc @@ -82,7 +82,7 @@ voicegroup164:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 2, 6, 2 voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 4 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -92,7 +92,7 @@ voicegroup164:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup165.inc b/sound/voicegroups/voicegroup165.inc index e633e5671a..c3262766cb 100644 --- a/sound/voicegroups/voicegroup165.inc +++ b/sound/voicegroups/voicegroup165.inc @@ -92,7 +92,7 @@ voicegroup165:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup166.inc b/sound/voicegroups/voicegroup166.inc index e4ac4a28e7..edd94624c0 100644 --- a/sound/voicegroups/voicegroup166.inc +++ b/sound/voicegroups/voicegroup166.inc @@ -87,12 +87,12 @@ voicegroup166:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup167.inc b/sound/voicegroups/voicegroup167.inc index 307379eb91..0213b7aec0 100644 --- a/sound/voicegroups/voicegroup167.inc +++ b/sound/voicegroups/voicegroup167.inc @@ -84,7 +84,7 @@ voicegroup167:: voice_square_2_alt 60, 0, 3, 0, 2, 8, 3 voice_square_2_alt 60, 0, 2, 0, 2, 6, 5 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 0, 6, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 0, 6, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup168.inc b/sound/voicegroups/voicegroup168.inc index 05dbf3954a..ea6b59d2ef 100644 --- a/sound/voicegroups/voicegroup168.inc +++ b/sound/voicegroups/voicegroup168.inc @@ -92,7 +92,7 @@ voicegroup168:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_14, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup169.inc b/sound/voicegroups/voicegroup169.inc index 220425ff01..77ee6ffee4 100644 --- a/sound/voicegroups/voicegroup169.inc +++ b/sound/voicegroups/voicegroup169.inc @@ -75,7 +75,7 @@ voicegroup169:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup170.inc b/sound/voicegroups/voicegroup170.inc index 68c29a6c9d..43c8ae6df7 100644 --- a/sound/voicegroups/voicegroup170.inc +++ b/sound/voicegroups/voicegroup170.inc @@ -81,7 +81,7 @@ voicegroup170:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 1, 0, 1, 7, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 1, 0, 1, 7, 1 voice_square_2_alt 60, 0, 2, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup171.inc b/sound/voicegroups/voicegroup171.inc index 76eee5f8a3..f4ae315ce5 100644 --- a/sound/voicegroups/voicegroup171.inc +++ b/sound/voicegroups/voicegroup171.inc @@ -81,7 +81,7 @@ voicegroup171:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_2_alt 60, 0, 2, 0, 1, 7, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 1 voice_square_1_alt 60, 0, 0, 2, 0, 1, 7, 0 voice_square_2_alt 60, 0, 2, 0, 2, 0, 0 voice_square_2_alt 60, 0, 3, 0, 1, 7, 0 @@ -89,6 +89,6 @@ voicegroup171:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 0 voice_square_1_alt 60, 0, 0, 3, 0, 0, 7, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4880, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4890, 0, 7, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_6, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_7, 0, 7, 15, 1 diff --git a/sound/voicegroups/voicegroup172.inc b/sound/voicegroups/voicegroup172.inc index 3e04a358c4..ffd981c830 100644 --- a/sound/voicegroups/voicegroup172.inc +++ b/sound/voicegroups/voicegroup172.inc @@ -92,7 +92,7 @@ voicegroup172:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4900, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_14, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup173.inc b/sound/voicegroups/voicegroup173.inc index ee4a2c8662..46979c6258 100644 --- a/sound/voicegroups/voicegroup173.inc +++ b/sound/voicegroups/voicegroup173.inc @@ -92,7 +92,7 @@ voicegroup173:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup174.inc b/sound/voicegroups/voicegroup174.inc index 82be8ccf9b..ab7d43fc72 100644 --- a/sound/voicegroups/voicegroup174.inc +++ b/sound/voicegroups/voicegroup174.inc @@ -92,7 +92,7 @@ voicegroup174:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4840, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_2, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -131,7 +131,7 @@ voicegroup174:: voice_keysplit_all voicegroup177 voice_square_1_alt 60, 0, 0, 2, 0, 2, 9, 1 voice_square_2_alt 60, 0, 2, 0, 2, 9, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 @@ -156,5 +156,5 @@ voicegroup174:: voice_keysplit_all voicegroup002 voice_square_1_alt 60, 0, 0, 2, 0, 2, 3, 1 voice_square_2_alt 60, 0, 2, 0, 2, 3, 1 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup176.inc b/sound/voicegroups/voicegroup176.inc index 9743d50e20..ee3c97e493 100644 --- a/sound/voicegroups/voicegroup176.inc +++ b/sound/voicegroups/voicegroup176.inc @@ -35,7 +35,7 @@ voicegroup176:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup178.inc b/sound/voicegroups/voicegroup178.inc index 1dc6971d75..026d7bb3d8 100644 --- a/sound/voicegroups/voicegroup178.inc +++ b/sound/voicegroups/voicegroup178.inc @@ -87,5 +87,5 @@ voicegroup178:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 0, 15, 1 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 0, 15, 1 diff --git a/sound/voicegroups/voicegroup179.inc b/sound/voicegroups/voicegroup179.inc index b7df91e68c..e69cace5b8 100644 --- a/sound/voicegroups/voicegroup179.inc +++ b/sound/voicegroups/voicegroup179.inc @@ -87,5 +87,5 @@ voicegroup179:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup180.inc b/sound/voicegroups/voicegroup180.inc index 82e98196d3..ea182d38e5 100644 --- a/sound/voicegroups/voicegroup180.inc +++ b/sound/voicegroups/voicegroup180.inc @@ -92,7 +92,7 @@ voicegroup180:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup182.inc b/sound/voicegroups/voicegroup182.inc index 1fb444fec6..ec39554958 100644 --- a/sound/voicegroups/voicegroup182.inc +++ b/sound/voicegroups/voicegroup182.inc @@ -87,5 +87,5 @@ voicegroup182:: voice_square_1_alt 60, 0, 0, 0, 0, 2, 3, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 diff --git a/sound/voicegroups/voicegroup183.inc b/sound/voicegroups/voicegroup183.inc index 92b953fc4c..ff49e3763b 100644 --- a/sound/voicegroups/voicegroup183.inc +++ b/sound/voicegroups/voicegroup183.inc @@ -83,7 +83,7 @@ voicegroup183:: voice_square_1_alt 60, 0, 0, 2, 0, 2, 4, 1 voice_square_2_alt 60, 0, 2, 0, 2, 4, 1 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup184.inc b/sound/voicegroups/voicegroup184.inc index e0d1c958d7..86f392e65c 100644 --- a/sound/voicegroups/voicegroup184.inc +++ b/sound/voicegroups/voicegroup184.inc @@ -3,7 +3,7 @@ voicegroup184:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup185.inc b/sound/voicegroups/voicegroup185.inc index 8417a2407b..879a4e8883 100644 --- a/sound/voicegroups/voicegroup185.inc +++ b/sound/voicegroups/voicegroup185.inc @@ -84,10 +84,10 @@ voicegroup185:: voice_square_1_alt 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4920, 0, 7, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4910, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_16, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_15, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4870, 0, 7, 15, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_5, 0, 7, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup187.inc b/sound/voicegroups/voicegroup187.inc index 46c5c1f9da..640912505a 100644 --- a/sound/voicegroups/voicegroup187.inc +++ b/sound/voicegroups/voicegroup187.inc @@ -92,7 +92,7 @@ voicegroup187:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 0, 12, 0 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 0, 12, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup188.inc b/sound/voicegroups/voicegroup188.inc index c6afe243b3..8556bcd4d2 100644 --- a/sound/voicegroups/voicegroup188.inc +++ b/sound/voicegroups/voicegroup188.inc @@ -92,7 +92,7 @@ voicegroup188:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup190.inc b/sound/voicegroups/voicegroup190.inc index 6faa27c620..25a84e84ed 100644 --- a/sound/voicegroups/voicegroup190.inc +++ b/sound/voicegroups/voicegroup190.inc @@ -1,6 +1,6 @@ .align 2 voicegroup190:: - voice_programmable_wave_alt 60, 0, ProgrammableWaveData_86B4830, 0, 7, 15, 2 + voice_programmable_wave_alt 60, 0, ProgrammableWaveData_1, 0, 7, 15, 2 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 From 93705bc257934a07061e6dd918507f6e9f4bfd53 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 6 Nov 2021 12:30:40 -0400 Subject: [PATCH 148/417] Label phonemes --- sound/direct_sound_data.inc | 204 +++++++++--------- .../{88DBBC0.aif => phonemes/01.aif} | Bin .../{88DC220.aif => phonemes/02.aif} | Bin .../{88DC704.aif => phonemes/03.aif} | Bin .../{88DD054.aif => phonemes/04.aif} | Bin .../{88DDAC4.aif => phonemes/05.aif} | Bin .../{88DDDE4.aif => phonemes/06.aif} | Bin .../{88DEA6C.aif => phonemes/07.aif} | Bin .../{88DF08C.aif => phonemes/08.aif} | Bin .../{88DF414.aif => phonemes/09.aif} | Bin .../{88E01F8.aif => phonemes/10.aif} | Bin .../{88E0B68.aif => phonemes/11.aif} | Bin .../{88E0F04.aif => phonemes/12.aif} | Bin .../{88E16B8.aif => phonemes/13.aif} | Bin .../{88E2414.aif => phonemes/14.aif} | Bin .../{88E2658.aif => phonemes/15.aif} | Bin .../{88E3498.aif => phonemes/16.aif} | Bin .../{88E3DEC.aif => phonemes/17.aif} | Bin .../{88E4140.aif => phonemes/18.aif} | Bin .../{88E4774.aif => phonemes/19.aif} | Bin .../{88E53E0.aif => phonemes/20.aif} | Bin .../{88E5978.aif => phonemes/21.aif} | Bin .../{88E647C.aif => phonemes/22.aif} | Bin .../{88E6A80.aif => phonemes/23.aif} | Bin .../{88E6C78.aif => phonemes/24.aif} | Bin .../{88E75DC.aif => phonemes/25.aif} | Bin .../{88E8568.aif => phonemes/26.aif} | Bin .../{88E8BA0.aif => phonemes/27.aif} | Bin .../{88E9674.aif => phonemes/28.aif} | Bin .../{88EA5B8.aif => phonemes/29.aif} | Bin .../{88EAB30.aif => phonemes/30.aif} | Bin .../{88EB97C.aif => phonemes/31.aif} | Bin .../{88EC884.aif => phonemes/32.aif} | Bin .../{88ED358.aif => phonemes/33.aif} | Bin .../{88EDEEC.aif => phonemes/34.aif} | Bin .../{88EE8C4.aif => phonemes/35.aif} | Bin .../{88EEF04.aif => phonemes/36.aif} | Bin .../{88EF9E4.aif => phonemes/37.aif} | Bin .../{88F0020.aif => phonemes/38.aif} | Bin .../{88F0738.aif => phonemes/39.aif} | Bin .../{88F1074.aif => phonemes/40.aif} | Bin .../{88F1830.aif => phonemes/41.aif} | Bin .../{88F1D94.aif => phonemes/42.aif} | Bin .../{88F2B08.aif => phonemes/43.aif} | Bin .../{88F2F84.aif => phonemes/44.aif} | Bin .../{88F3470.aif => phonemes/45.aif} | Bin .../{88F3C38.aif => phonemes/46.aif} | Bin .../{88F4834.aif => phonemes/47.aif} | Bin .../{88F4BAC.aif => phonemes/48.aif} | Bin .../{88F5368.aif => phonemes/49.aif} | Bin .../{88F5FCC.aif => phonemes/50.aif} | Bin .../{88F6498.aif => phonemes/51.aif} | Bin sound/voicegroups/voicegroup130.inc | 102 ++++----- 53 files changed, 153 insertions(+), 153 deletions(-) rename sound/direct_sound_samples/{88DBBC0.aif => phonemes/01.aif} (100%) rename sound/direct_sound_samples/{88DC220.aif => phonemes/02.aif} (100%) rename sound/direct_sound_samples/{88DC704.aif => phonemes/03.aif} (100%) rename sound/direct_sound_samples/{88DD054.aif => phonemes/04.aif} (100%) rename sound/direct_sound_samples/{88DDAC4.aif => phonemes/05.aif} (100%) rename sound/direct_sound_samples/{88DDDE4.aif => phonemes/06.aif} (100%) rename sound/direct_sound_samples/{88DEA6C.aif => phonemes/07.aif} (100%) rename sound/direct_sound_samples/{88DF08C.aif => phonemes/08.aif} (100%) rename sound/direct_sound_samples/{88DF414.aif => phonemes/09.aif} (100%) rename sound/direct_sound_samples/{88E01F8.aif => phonemes/10.aif} (100%) rename sound/direct_sound_samples/{88E0B68.aif => phonemes/11.aif} (100%) rename sound/direct_sound_samples/{88E0F04.aif => phonemes/12.aif} (100%) rename sound/direct_sound_samples/{88E16B8.aif => phonemes/13.aif} (100%) rename sound/direct_sound_samples/{88E2414.aif => phonemes/14.aif} (100%) rename sound/direct_sound_samples/{88E2658.aif => phonemes/15.aif} (100%) rename sound/direct_sound_samples/{88E3498.aif => phonemes/16.aif} (100%) rename sound/direct_sound_samples/{88E3DEC.aif => phonemes/17.aif} (100%) rename sound/direct_sound_samples/{88E4140.aif => phonemes/18.aif} (100%) rename sound/direct_sound_samples/{88E4774.aif => phonemes/19.aif} (100%) rename sound/direct_sound_samples/{88E53E0.aif => phonemes/20.aif} (100%) rename sound/direct_sound_samples/{88E5978.aif => phonemes/21.aif} (100%) rename sound/direct_sound_samples/{88E647C.aif => phonemes/22.aif} (100%) rename sound/direct_sound_samples/{88E6A80.aif => phonemes/23.aif} (100%) rename sound/direct_sound_samples/{88E6C78.aif => phonemes/24.aif} (100%) rename sound/direct_sound_samples/{88E75DC.aif => phonemes/25.aif} (100%) rename sound/direct_sound_samples/{88E8568.aif => phonemes/26.aif} (100%) rename sound/direct_sound_samples/{88E8BA0.aif => phonemes/27.aif} (100%) rename sound/direct_sound_samples/{88E9674.aif => phonemes/28.aif} (100%) rename sound/direct_sound_samples/{88EA5B8.aif => phonemes/29.aif} (100%) rename sound/direct_sound_samples/{88EAB30.aif => phonemes/30.aif} (100%) rename sound/direct_sound_samples/{88EB97C.aif => phonemes/31.aif} (100%) rename sound/direct_sound_samples/{88EC884.aif => phonemes/32.aif} (100%) rename sound/direct_sound_samples/{88ED358.aif => phonemes/33.aif} (100%) rename sound/direct_sound_samples/{88EDEEC.aif => phonemes/34.aif} (100%) rename sound/direct_sound_samples/{88EE8C4.aif => phonemes/35.aif} (100%) rename sound/direct_sound_samples/{88EEF04.aif => phonemes/36.aif} (100%) rename sound/direct_sound_samples/{88EF9E4.aif => phonemes/37.aif} (100%) rename sound/direct_sound_samples/{88F0020.aif => phonemes/38.aif} (100%) rename sound/direct_sound_samples/{88F0738.aif => phonemes/39.aif} (100%) rename sound/direct_sound_samples/{88F1074.aif => phonemes/40.aif} (100%) rename sound/direct_sound_samples/{88F1830.aif => phonemes/41.aif} (100%) rename sound/direct_sound_samples/{88F1D94.aif => phonemes/42.aif} (100%) rename sound/direct_sound_samples/{88F2B08.aif => phonemes/43.aif} (100%) rename sound/direct_sound_samples/{88F2F84.aif => phonemes/44.aif} (100%) rename sound/direct_sound_samples/{88F3470.aif => phonemes/45.aif} (100%) rename sound/direct_sound_samples/{88F3C38.aif => phonemes/46.aif} (100%) rename sound/direct_sound_samples/{88F4834.aif => phonemes/47.aif} (100%) rename sound/direct_sound_samples/{88F4BAC.aif => phonemes/48.aif} (100%) rename sound/direct_sound_samples/{88F5368.aif => phonemes/49.aif} (100%) rename sound/direct_sound_samples/{88F5FCC.aif => phonemes/50.aif} (100%) rename sound/direct_sound_samples/{88F6498.aif => phonemes/51.aif} (100%) diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index 508e6a6c44..bc277d144c 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -1955,208 +1955,208 @@ DirectSoundWaveData_sd90_special_scream_drive:: .incbin "sound/direct_sound_samples/sd90_special_scream_drive.bin" .align 2 -DirectSoundWaveData_88DBBC0:: - .incbin "sound/direct_sound_samples/88DBBC0.bin" +DirectSoundWaveData_Phoneme_1:: + .incbin "sound/direct_sound_samples/phonemes/01.bin" .align 2 -DirectSoundWaveData_88DC220:: - .incbin "sound/direct_sound_samples/88DC220.bin" +DirectSoundWaveData_Phoneme_2:: + .incbin "sound/direct_sound_samples/phonemes/02.bin" .align 2 -DirectSoundWaveData_88DC704:: - .incbin "sound/direct_sound_samples/88DC704.bin" +DirectSoundWaveData_Phoneme_3:: + .incbin "sound/direct_sound_samples/phonemes/03.bin" .align 2 -DirectSoundWaveData_88DD054:: - .incbin "sound/direct_sound_samples/88DD054.bin" +DirectSoundWaveData_Phoneme_4:: + .incbin "sound/direct_sound_samples/phonemes/04.bin" .align 2 -DirectSoundWaveData_88DDAC4:: - .incbin "sound/direct_sound_samples/88DDAC4.bin" +DirectSoundWaveData_Phoneme_5:: + .incbin "sound/direct_sound_samples/phonemes/05.bin" .align 2 -DirectSoundWaveData_88DDDE4:: - .incbin "sound/direct_sound_samples/88DDDE4.bin" +DirectSoundWaveData_Phoneme_6:: + .incbin "sound/direct_sound_samples/phonemes/06.bin" .align 2 -DirectSoundWaveData_88DEA6C:: - .incbin "sound/direct_sound_samples/88DEA6C.bin" +DirectSoundWaveData_Phoneme_7:: + .incbin "sound/direct_sound_samples/phonemes/07.bin" .align 2 -DirectSoundWaveData_88DF08C:: - .incbin "sound/direct_sound_samples/88DF08C.bin" +DirectSoundWaveData_Phoneme_8:: + .incbin "sound/direct_sound_samples/phonemes/08.bin" .align 2 -DirectSoundWaveData_88DF414:: - .incbin "sound/direct_sound_samples/88DF414.bin" +DirectSoundWaveData_Phoneme_9:: + .incbin "sound/direct_sound_samples/phonemes/09.bin" .align 2 -DirectSoundWaveData_88E01F8:: - .incbin "sound/direct_sound_samples/88E01F8.bin" +DirectSoundWaveData_Phoneme_10:: + .incbin "sound/direct_sound_samples/phonemes/10.bin" .align 2 -DirectSoundWaveData_88E0B68:: - .incbin "sound/direct_sound_samples/88E0B68.bin" +DirectSoundWaveData_Phoneme_11:: + .incbin "sound/direct_sound_samples/phonemes/11.bin" .align 2 -DirectSoundWaveData_88E0F04:: - .incbin "sound/direct_sound_samples/88E0F04.bin" +DirectSoundWaveData_Phoneme_12:: + .incbin "sound/direct_sound_samples/phonemes/12.bin" .align 2 -DirectSoundWaveData_88E16B8:: - .incbin "sound/direct_sound_samples/88E16B8.bin" +DirectSoundWaveData_Phoneme_13:: + .incbin "sound/direct_sound_samples/phonemes/13.bin" .align 2 -DirectSoundWaveData_88E2414:: - .incbin "sound/direct_sound_samples/88E2414.bin" +DirectSoundWaveData_Phoneme_14:: + .incbin "sound/direct_sound_samples/phonemes/14.bin" .align 2 -DirectSoundWaveData_88E2658:: - .incbin "sound/direct_sound_samples/88E2658.bin" +DirectSoundWaveData_Phoneme_15:: + .incbin "sound/direct_sound_samples/phonemes/15.bin" .align 2 -DirectSoundWaveData_88E3498:: - .incbin "sound/direct_sound_samples/88E3498.bin" +DirectSoundWaveData_Phoneme_16:: + .incbin "sound/direct_sound_samples/phonemes/16.bin" .align 2 -DirectSoundWaveData_88E3DEC:: - .incbin "sound/direct_sound_samples/88E3DEC.bin" +DirectSoundWaveData_Phoneme_17:: + .incbin "sound/direct_sound_samples/phonemes/17.bin" .align 2 -DirectSoundWaveData_88E4140:: - .incbin "sound/direct_sound_samples/88E4140.bin" +DirectSoundWaveData_Phoneme_18:: + .incbin "sound/direct_sound_samples/phonemes/18.bin" .align 2 -DirectSoundWaveData_88E4774:: - .incbin "sound/direct_sound_samples/88E4774.bin" +DirectSoundWaveData_Phoneme_19:: + .incbin "sound/direct_sound_samples/phonemes/19.bin" .align 2 -DirectSoundWaveData_88E53E0:: - .incbin "sound/direct_sound_samples/88E53E0.bin" +DirectSoundWaveData_Phoneme_20:: + .incbin "sound/direct_sound_samples/phonemes/20.bin" .align 2 -DirectSoundWaveData_88E5978:: - .incbin "sound/direct_sound_samples/88E5978.bin" +DirectSoundWaveData_Phoneme_21:: + .incbin "sound/direct_sound_samples/phonemes/21.bin" .align 2 -DirectSoundWaveData_88E647C:: - .incbin "sound/direct_sound_samples/88E647C.bin" +DirectSoundWaveData_Phoneme_22:: + .incbin "sound/direct_sound_samples/phonemes/22.bin" .align 2 -DirectSoundWaveData_88E6A80:: - .incbin "sound/direct_sound_samples/88E6A80.bin" +DirectSoundWaveData_Phoneme_23:: + .incbin "sound/direct_sound_samples/phonemes/23.bin" .align 2 -DirectSoundWaveData_88E6C78:: - .incbin "sound/direct_sound_samples/88E6C78.bin" +DirectSoundWaveData_Phoneme_24:: + .incbin "sound/direct_sound_samples/phonemes/24.bin" .align 2 -DirectSoundWaveData_88E75DC:: - .incbin "sound/direct_sound_samples/88E75DC.bin" +DirectSoundWaveData_Phoneme_25:: + .incbin "sound/direct_sound_samples/phonemes/25.bin" .align 2 -DirectSoundWaveData_88E8568:: - .incbin "sound/direct_sound_samples/88E8568.bin" +DirectSoundWaveData_Phoneme_26:: + .incbin "sound/direct_sound_samples/phonemes/26.bin" .align 2 -DirectSoundWaveData_88E8BA0:: - .incbin "sound/direct_sound_samples/88E8BA0.bin" +DirectSoundWaveData_Phoneme_27:: + .incbin "sound/direct_sound_samples/phonemes/27.bin" .align 2 -DirectSoundWaveData_88E9674:: - .incbin "sound/direct_sound_samples/88E9674.bin" +DirectSoundWaveData_Phoneme_28:: + .incbin "sound/direct_sound_samples/phonemes/28.bin" .align 2 -DirectSoundWaveData_88EA5B8:: - .incbin "sound/direct_sound_samples/88EA5B8.bin" +DirectSoundWaveData_Phoneme_29:: + .incbin "sound/direct_sound_samples/phonemes/29.bin" .align 2 -DirectSoundWaveData_88EAB30:: - .incbin "sound/direct_sound_samples/88EAB30.bin" +DirectSoundWaveData_Phoneme_30:: + .incbin "sound/direct_sound_samples/phonemes/30.bin" .align 2 -DirectSoundWaveData_88EB97C:: - .incbin "sound/direct_sound_samples/88EB97C.bin" +DirectSoundWaveData_Phoneme_31:: + .incbin "sound/direct_sound_samples/phonemes/31.bin" .align 2 -DirectSoundWaveData_88EC884:: - .incbin "sound/direct_sound_samples/88EC884.bin" +DirectSoundWaveData_Phoneme_32:: + .incbin "sound/direct_sound_samples/phonemes/32.bin" .align 2 -DirectSoundWaveData_88ED358:: - .incbin "sound/direct_sound_samples/88ED358.bin" +DirectSoundWaveData_Phoneme_33:: + .incbin "sound/direct_sound_samples/phonemes/33.bin" .align 2 -DirectSoundWaveData_88EDEEC:: - .incbin "sound/direct_sound_samples/88EDEEC.bin" +DirectSoundWaveData_Phoneme_34:: + .incbin "sound/direct_sound_samples/phonemes/34.bin" .align 2 -DirectSoundWaveData_88EE8C4:: - .incbin "sound/direct_sound_samples/88EE8C4.bin" +DirectSoundWaveData_Phoneme_35:: + .incbin "sound/direct_sound_samples/phonemes/35.bin" .align 2 -DirectSoundWaveData_88EEF04:: - .incbin "sound/direct_sound_samples/88EEF04.bin" +DirectSoundWaveData_Phoneme_36:: + .incbin "sound/direct_sound_samples/phonemes/36.bin" .align 2 -DirectSoundWaveData_88EF9E4:: - .incbin "sound/direct_sound_samples/88EF9E4.bin" +DirectSoundWaveData_Phoneme_37:: + .incbin "sound/direct_sound_samples/phonemes/37.bin" .align 2 -DirectSoundWaveData_88F0020:: - .incbin "sound/direct_sound_samples/88F0020.bin" +DirectSoundWaveData_Phoneme_38:: + .incbin "sound/direct_sound_samples/phonemes/38.bin" .align 2 -DirectSoundWaveData_88F0738:: - .incbin "sound/direct_sound_samples/88F0738.bin" +DirectSoundWaveData_Phoneme_39:: + .incbin "sound/direct_sound_samples/phonemes/39.bin" .align 2 -DirectSoundWaveData_88F1074:: - .incbin "sound/direct_sound_samples/88F1074.bin" +DirectSoundWaveData_Phoneme_40:: + .incbin "sound/direct_sound_samples/phonemes/40.bin" .align 2 -DirectSoundWaveData_88F1830:: - .incbin "sound/direct_sound_samples/88F1830.bin" +DirectSoundWaveData_Phoneme_41:: + .incbin "sound/direct_sound_samples/phonemes/41.bin" .align 2 -DirectSoundWaveData_88F1D94:: - .incbin "sound/direct_sound_samples/88F1D94.bin" +DirectSoundWaveData_Phoneme_42:: + .incbin "sound/direct_sound_samples/phonemes/42.bin" .align 2 -DirectSoundWaveData_88F2B08:: - .incbin "sound/direct_sound_samples/88F2B08.bin" +DirectSoundWaveData_Phoneme_43:: + .incbin "sound/direct_sound_samples/phonemes/43.bin" .align 2 -DirectSoundWaveData_88F2F84:: - .incbin "sound/direct_sound_samples/88F2F84.bin" +DirectSoundWaveData_Phoneme_44:: + .incbin "sound/direct_sound_samples/phonemes/44.bin" .align 2 -DirectSoundWaveData_88F3470:: - .incbin "sound/direct_sound_samples/88F3470.bin" +DirectSoundWaveData_Phoneme_45:: + .incbin "sound/direct_sound_samples/phonemes/45.bin" .align 2 -DirectSoundWaveData_88F3C38:: - .incbin "sound/direct_sound_samples/88F3C38.bin" +DirectSoundWaveData_Phoneme_46:: + .incbin "sound/direct_sound_samples/phonemes/46.bin" .align 2 -DirectSoundWaveData_88F4834:: - .incbin "sound/direct_sound_samples/88F4834.bin" +DirectSoundWaveData_Phoneme_47:: + .incbin "sound/direct_sound_samples/phonemes/47.bin" .align 2 -DirectSoundWaveData_88F4BAC:: - .incbin "sound/direct_sound_samples/88F4BAC.bin" +DirectSoundWaveData_Phoneme_48:: + .incbin "sound/direct_sound_samples/phonemes/48.bin" .align 2 -DirectSoundWaveData_88F5368:: - .incbin "sound/direct_sound_samples/88F5368.bin" +DirectSoundWaveData_Phoneme_49:: + .incbin "sound/direct_sound_samples/phonemes/49.bin" .align 2 -DirectSoundWaveData_88F5FCC:: - .incbin "sound/direct_sound_samples/88F5FCC.bin" +DirectSoundWaveData_Phoneme_50:: + .incbin "sound/direct_sound_samples/phonemes/50.bin" .align 2 -DirectSoundWaveData_88F6498:: - .incbin "sound/direct_sound_samples/88F6498.bin" +DirectSoundWaveData_Phoneme_51:: + .incbin "sound/direct_sound_samples/phonemes/51.bin" .align 2 DirectSoundWaveData_sc88pro_accordion_duplicate:: diff --git a/sound/direct_sound_samples/88DBBC0.aif b/sound/direct_sound_samples/phonemes/01.aif similarity index 100% rename from sound/direct_sound_samples/88DBBC0.aif rename to sound/direct_sound_samples/phonemes/01.aif diff --git a/sound/direct_sound_samples/88DC220.aif b/sound/direct_sound_samples/phonemes/02.aif similarity index 100% rename from sound/direct_sound_samples/88DC220.aif rename to sound/direct_sound_samples/phonemes/02.aif diff --git a/sound/direct_sound_samples/88DC704.aif b/sound/direct_sound_samples/phonemes/03.aif similarity index 100% rename from sound/direct_sound_samples/88DC704.aif rename to sound/direct_sound_samples/phonemes/03.aif diff --git a/sound/direct_sound_samples/88DD054.aif b/sound/direct_sound_samples/phonemes/04.aif similarity index 100% rename from sound/direct_sound_samples/88DD054.aif rename to sound/direct_sound_samples/phonemes/04.aif diff --git a/sound/direct_sound_samples/88DDAC4.aif b/sound/direct_sound_samples/phonemes/05.aif similarity index 100% rename from sound/direct_sound_samples/88DDAC4.aif rename to sound/direct_sound_samples/phonemes/05.aif diff --git a/sound/direct_sound_samples/88DDDE4.aif b/sound/direct_sound_samples/phonemes/06.aif similarity index 100% rename from sound/direct_sound_samples/88DDDE4.aif rename to sound/direct_sound_samples/phonemes/06.aif diff --git a/sound/direct_sound_samples/88DEA6C.aif b/sound/direct_sound_samples/phonemes/07.aif similarity index 100% rename from sound/direct_sound_samples/88DEA6C.aif rename to sound/direct_sound_samples/phonemes/07.aif diff --git a/sound/direct_sound_samples/88DF08C.aif b/sound/direct_sound_samples/phonemes/08.aif similarity index 100% rename from sound/direct_sound_samples/88DF08C.aif rename to sound/direct_sound_samples/phonemes/08.aif diff --git a/sound/direct_sound_samples/88DF414.aif b/sound/direct_sound_samples/phonemes/09.aif similarity index 100% rename from sound/direct_sound_samples/88DF414.aif rename to sound/direct_sound_samples/phonemes/09.aif diff --git a/sound/direct_sound_samples/88E01F8.aif b/sound/direct_sound_samples/phonemes/10.aif similarity index 100% rename from sound/direct_sound_samples/88E01F8.aif rename to sound/direct_sound_samples/phonemes/10.aif diff --git a/sound/direct_sound_samples/88E0B68.aif b/sound/direct_sound_samples/phonemes/11.aif similarity index 100% rename from sound/direct_sound_samples/88E0B68.aif rename to sound/direct_sound_samples/phonemes/11.aif diff --git a/sound/direct_sound_samples/88E0F04.aif b/sound/direct_sound_samples/phonemes/12.aif similarity index 100% rename from sound/direct_sound_samples/88E0F04.aif rename to sound/direct_sound_samples/phonemes/12.aif diff --git a/sound/direct_sound_samples/88E16B8.aif b/sound/direct_sound_samples/phonemes/13.aif similarity index 100% rename from sound/direct_sound_samples/88E16B8.aif rename to sound/direct_sound_samples/phonemes/13.aif diff --git a/sound/direct_sound_samples/88E2414.aif b/sound/direct_sound_samples/phonemes/14.aif similarity index 100% rename from sound/direct_sound_samples/88E2414.aif rename to sound/direct_sound_samples/phonemes/14.aif diff --git a/sound/direct_sound_samples/88E2658.aif b/sound/direct_sound_samples/phonemes/15.aif similarity index 100% rename from sound/direct_sound_samples/88E2658.aif rename to sound/direct_sound_samples/phonemes/15.aif diff --git a/sound/direct_sound_samples/88E3498.aif b/sound/direct_sound_samples/phonemes/16.aif similarity index 100% rename from sound/direct_sound_samples/88E3498.aif rename to sound/direct_sound_samples/phonemes/16.aif diff --git a/sound/direct_sound_samples/88E3DEC.aif b/sound/direct_sound_samples/phonemes/17.aif similarity index 100% rename from sound/direct_sound_samples/88E3DEC.aif rename to sound/direct_sound_samples/phonemes/17.aif diff --git a/sound/direct_sound_samples/88E4140.aif b/sound/direct_sound_samples/phonemes/18.aif similarity index 100% rename from sound/direct_sound_samples/88E4140.aif rename to sound/direct_sound_samples/phonemes/18.aif diff --git a/sound/direct_sound_samples/88E4774.aif b/sound/direct_sound_samples/phonemes/19.aif similarity index 100% rename from sound/direct_sound_samples/88E4774.aif rename to sound/direct_sound_samples/phonemes/19.aif diff --git a/sound/direct_sound_samples/88E53E0.aif b/sound/direct_sound_samples/phonemes/20.aif similarity index 100% rename from sound/direct_sound_samples/88E53E0.aif rename to sound/direct_sound_samples/phonemes/20.aif diff --git a/sound/direct_sound_samples/88E5978.aif b/sound/direct_sound_samples/phonemes/21.aif similarity index 100% rename from sound/direct_sound_samples/88E5978.aif rename to sound/direct_sound_samples/phonemes/21.aif diff --git a/sound/direct_sound_samples/88E647C.aif b/sound/direct_sound_samples/phonemes/22.aif similarity index 100% rename from sound/direct_sound_samples/88E647C.aif rename to sound/direct_sound_samples/phonemes/22.aif diff --git a/sound/direct_sound_samples/88E6A80.aif b/sound/direct_sound_samples/phonemes/23.aif similarity index 100% rename from sound/direct_sound_samples/88E6A80.aif rename to sound/direct_sound_samples/phonemes/23.aif diff --git a/sound/direct_sound_samples/88E6C78.aif b/sound/direct_sound_samples/phonemes/24.aif similarity index 100% rename from sound/direct_sound_samples/88E6C78.aif rename to sound/direct_sound_samples/phonemes/24.aif diff --git a/sound/direct_sound_samples/88E75DC.aif b/sound/direct_sound_samples/phonemes/25.aif similarity index 100% rename from sound/direct_sound_samples/88E75DC.aif rename to sound/direct_sound_samples/phonemes/25.aif diff --git a/sound/direct_sound_samples/88E8568.aif b/sound/direct_sound_samples/phonemes/26.aif similarity index 100% rename from sound/direct_sound_samples/88E8568.aif rename to sound/direct_sound_samples/phonemes/26.aif diff --git a/sound/direct_sound_samples/88E8BA0.aif b/sound/direct_sound_samples/phonemes/27.aif similarity index 100% rename from sound/direct_sound_samples/88E8BA0.aif rename to sound/direct_sound_samples/phonemes/27.aif diff --git a/sound/direct_sound_samples/88E9674.aif b/sound/direct_sound_samples/phonemes/28.aif similarity index 100% rename from sound/direct_sound_samples/88E9674.aif rename to sound/direct_sound_samples/phonemes/28.aif diff --git a/sound/direct_sound_samples/88EA5B8.aif b/sound/direct_sound_samples/phonemes/29.aif similarity index 100% rename from sound/direct_sound_samples/88EA5B8.aif rename to sound/direct_sound_samples/phonemes/29.aif diff --git a/sound/direct_sound_samples/88EAB30.aif b/sound/direct_sound_samples/phonemes/30.aif similarity index 100% rename from sound/direct_sound_samples/88EAB30.aif rename to sound/direct_sound_samples/phonemes/30.aif diff --git a/sound/direct_sound_samples/88EB97C.aif b/sound/direct_sound_samples/phonemes/31.aif similarity index 100% rename from sound/direct_sound_samples/88EB97C.aif rename to sound/direct_sound_samples/phonemes/31.aif diff --git a/sound/direct_sound_samples/88EC884.aif b/sound/direct_sound_samples/phonemes/32.aif similarity index 100% rename from sound/direct_sound_samples/88EC884.aif rename to sound/direct_sound_samples/phonemes/32.aif diff --git a/sound/direct_sound_samples/88ED358.aif b/sound/direct_sound_samples/phonemes/33.aif similarity index 100% rename from sound/direct_sound_samples/88ED358.aif rename to sound/direct_sound_samples/phonemes/33.aif diff --git a/sound/direct_sound_samples/88EDEEC.aif b/sound/direct_sound_samples/phonemes/34.aif similarity index 100% rename from sound/direct_sound_samples/88EDEEC.aif rename to sound/direct_sound_samples/phonemes/34.aif diff --git a/sound/direct_sound_samples/88EE8C4.aif b/sound/direct_sound_samples/phonemes/35.aif similarity index 100% rename from sound/direct_sound_samples/88EE8C4.aif rename to sound/direct_sound_samples/phonemes/35.aif diff --git a/sound/direct_sound_samples/88EEF04.aif b/sound/direct_sound_samples/phonemes/36.aif similarity index 100% rename from sound/direct_sound_samples/88EEF04.aif rename to sound/direct_sound_samples/phonemes/36.aif diff --git a/sound/direct_sound_samples/88EF9E4.aif b/sound/direct_sound_samples/phonemes/37.aif similarity index 100% rename from sound/direct_sound_samples/88EF9E4.aif rename to sound/direct_sound_samples/phonemes/37.aif diff --git a/sound/direct_sound_samples/88F0020.aif b/sound/direct_sound_samples/phonemes/38.aif similarity index 100% rename from sound/direct_sound_samples/88F0020.aif rename to sound/direct_sound_samples/phonemes/38.aif diff --git a/sound/direct_sound_samples/88F0738.aif b/sound/direct_sound_samples/phonemes/39.aif similarity index 100% rename from sound/direct_sound_samples/88F0738.aif rename to sound/direct_sound_samples/phonemes/39.aif diff --git a/sound/direct_sound_samples/88F1074.aif b/sound/direct_sound_samples/phonemes/40.aif similarity index 100% rename from sound/direct_sound_samples/88F1074.aif rename to sound/direct_sound_samples/phonemes/40.aif diff --git a/sound/direct_sound_samples/88F1830.aif b/sound/direct_sound_samples/phonemes/41.aif similarity index 100% rename from sound/direct_sound_samples/88F1830.aif rename to sound/direct_sound_samples/phonemes/41.aif diff --git a/sound/direct_sound_samples/88F1D94.aif b/sound/direct_sound_samples/phonemes/42.aif similarity index 100% rename from sound/direct_sound_samples/88F1D94.aif rename to sound/direct_sound_samples/phonemes/42.aif diff --git a/sound/direct_sound_samples/88F2B08.aif b/sound/direct_sound_samples/phonemes/43.aif similarity index 100% rename from sound/direct_sound_samples/88F2B08.aif rename to sound/direct_sound_samples/phonemes/43.aif diff --git a/sound/direct_sound_samples/88F2F84.aif b/sound/direct_sound_samples/phonemes/44.aif similarity index 100% rename from sound/direct_sound_samples/88F2F84.aif rename to sound/direct_sound_samples/phonemes/44.aif diff --git a/sound/direct_sound_samples/88F3470.aif b/sound/direct_sound_samples/phonemes/45.aif similarity index 100% rename from sound/direct_sound_samples/88F3470.aif rename to sound/direct_sound_samples/phonemes/45.aif diff --git a/sound/direct_sound_samples/88F3C38.aif b/sound/direct_sound_samples/phonemes/46.aif similarity index 100% rename from sound/direct_sound_samples/88F3C38.aif rename to sound/direct_sound_samples/phonemes/46.aif diff --git a/sound/direct_sound_samples/88F4834.aif b/sound/direct_sound_samples/phonemes/47.aif similarity index 100% rename from sound/direct_sound_samples/88F4834.aif rename to sound/direct_sound_samples/phonemes/47.aif diff --git a/sound/direct_sound_samples/88F4BAC.aif b/sound/direct_sound_samples/phonemes/48.aif similarity index 100% rename from sound/direct_sound_samples/88F4BAC.aif rename to sound/direct_sound_samples/phonemes/48.aif diff --git a/sound/direct_sound_samples/88F5368.aif b/sound/direct_sound_samples/phonemes/49.aif similarity index 100% rename from sound/direct_sound_samples/88F5368.aif rename to sound/direct_sound_samples/phonemes/49.aif diff --git a/sound/direct_sound_samples/88F5FCC.aif b/sound/direct_sound_samples/phonemes/50.aif similarity index 100% rename from sound/direct_sound_samples/88F5FCC.aif rename to sound/direct_sound_samples/phonemes/50.aif diff --git a/sound/direct_sound_samples/88F6498.aif b/sound/direct_sound_samples/phonemes/51.aif similarity index 100% rename from sound/direct_sound_samples/88F6498.aif rename to sound/direct_sound_samples/phonemes/51.aif diff --git a/sound/voicegroups/voicegroup130.inc b/sound/voicegroups/voicegroup130.inc index 6f06938aae..7044bb38e4 100644 --- a/sound/voicegroups/voicegroup130.inc +++ b/sound/voicegroups/voicegroup130.inc @@ -1,56 +1,56 @@ .align 2 voicegroup130:: - voice_directsound 60, 0, DirectSoundWaveData_88DBBC0, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DC220, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DC704, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DD054, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DDAC4, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DDDE4, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DEA6C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DF08C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88DF414, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E01F8, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E0B68, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E0F04, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E16B8, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E2414, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E2658, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E3498, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E3DEC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E4140, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E4774, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E53E0, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E5978, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E647C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E6A80, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E6C78, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E75DC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E8568, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E8BA0, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88E9674, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EA5B8, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EAB30, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EB97C, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EC884, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88ED358, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EDEEC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EE8C4, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EEF04, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88EF9E4, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F0020, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F0738, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F1074, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F1830, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F1D94, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F2B08, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F2F84, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F3470, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F3C38, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F4834, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F4BAC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F5368, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F5FCC, 255, 0, 255, 0 - voice_directsound 60, 0, DirectSoundWaveData_88F6498, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_1, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_2, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_3, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_4, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_5, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_6, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_7, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_8, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_9, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_10, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_11, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_12, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_13, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_14, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_15, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_16, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_17, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_18, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_19, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_20, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_21, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_22, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_23, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_24, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_25, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_26, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_27, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_28, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_29, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_30, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_31, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_32, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_33, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_34, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_35, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_36, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_37, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_38, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_39, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_40, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_41, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_42, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_43, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_44, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_45, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_46, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_47, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_48, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_49, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_50, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_Phoneme_51, 255, 0, 255, 0 voice_keysplit_all voicegroup001 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 From b282bbc2702f57322401247fae1a5e8a1281d149 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 6 Nov 2021 14:55:27 -0300 Subject: [PATCH 149/417] Using WEATHER_SANDSTORM in battle_setup --- src/battle_setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/battle_setup.c b/src/battle_setup.c index a1b01f9c15..a9d4eeddf5 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -46,6 +46,7 @@ #include "constants/maps.h" #include "constants/trainers.h" #include "constants/trainer_hill.h" +#include "constants/weather.h" enum { TRANSITION_TYPE_NORMAL, @@ -686,7 +687,7 @@ u8 BattleSetup_GetTerrainId(void) } if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE113) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE113)) return BATTLE_TERRAIN_SAND; - if (GetSav1Weather() == 8) + if (GetSav1Weather() == WEATHER_SANDSTORM) return BATTLE_TERRAIN_SAND; return BATTLE_TERRAIN_PLAIN; From 4f825a6ee012c925b3da100b67d363676a03029d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 6 Nov 2021 17:00:24 -0400 Subject: [PATCH 150/417] Give generic names to unknown direct sound wave data --- sound/direct_sound_data.inc | 72 +++++++++--------- .../{8725A2C.aif => unknown_01.aif} | Bin .../{872762C.aif => unknown_02.aif} | Bin .../{872921C.aif => unknown_03.aif} | Bin .../{872A5D0.aif => unknown_04.aif} | Bin .../{872EEA8.aif => unknown_05.aif} | Bin .../{87301B0.aif => unknown_06.aif} | Bin .../{8734298.aif => unknown_07.aif} | Bin .../{87364A8.aif => unknown_08.aif} | Bin .../{87385E4.aif => unknown_09.aif} | Bin .../{873ECD8.aif => unknown_10.aif} | Bin .../{8740818.aif => unknown_11.aif} | Bin .../{87424B0.aif => unknown_12.aif} | Bin .../{87430C0.aif => unknown_13.aif} | Bin .../{8743C50.aif => unknown_14.aif} | Bin .../{87446EC.aif => unknown_15.aif} | Bin .../{8745034.aif => unknown_16.aif} | Bin .../{8745A7C.aif => unknown_17.aif} | Bin .../{88D6978.aif => unknown_18.aif} | Bin sound/voicegroups/voicegroup098.inc | 2 +- sound/voicegroups/voicegroup128.inc | 36 ++++----- sound/voicegroups/voicegroup129.inc | 4 +- sound/voicegroups/voicegroup163.inc | 2 +- 23 files changed, 58 insertions(+), 58 deletions(-) rename sound/direct_sound_samples/{8725A2C.aif => unknown_01.aif} (100%) rename sound/direct_sound_samples/{872762C.aif => unknown_02.aif} (100%) rename sound/direct_sound_samples/{872921C.aif => unknown_03.aif} (100%) rename sound/direct_sound_samples/{872A5D0.aif => unknown_04.aif} (100%) rename sound/direct_sound_samples/{872EEA8.aif => unknown_05.aif} (100%) rename sound/direct_sound_samples/{87301B0.aif => unknown_06.aif} (100%) rename sound/direct_sound_samples/{8734298.aif => unknown_07.aif} (100%) rename sound/direct_sound_samples/{87364A8.aif => unknown_08.aif} (100%) rename sound/direct_sound_samples/{87385E4.aif => unknown_09.aif} (100%) rename sound/direct_sound_samples/{873ECD8.aif => unknown_10.aif} (100%) rename sound/direct_sound_samples/{8740818.aif => unknown_11.aif} (100%) rename sound/direct_sound_samples/{87424B0.aif => unknown_12.aif} (100%) rename sound/direct_sound_samples/{87430C0.aif => unknown_13.aif} (100%) rename sound/direct_sound_samples/{8743C50.aif => unknown_14.aif} (100%) rename sound/direct_sound_samples/{87446EC.aif => unknown_15.aif} (100%) rename sound/direct_sound_samples/{8745034.aif => unknown_16.aif} (100%) rename sound/direct_sound_samples/{8745A7C.aif => unknown_17.aif} (100%) rename sound/direct_sound_samples/{88D6978.aif => unknown_18.aif} (100%) diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index bc277d144c..298088ef41 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -283,24 +283,24 @@ DirectSoundWaveData_bicycle_bell:: .incbin "sound/direct_sound_samples/bicycle_bell.bin" .align 2 -DirectSoundWaveData_8725A2C:: - .incbin "sound/direct_sound_samples/8725A2C.bin" +DirectSoundWaveData_unknown_1:: + .incbin "sound/direct_sound_samples/unknown_01.bin" .align 2 DirectSoundWaveData_sc88pro_pizzicato_strings:: .incbin "sound/direct_sound_samples/sc88pro_pizzicato_strings.bin" .align 2 -DirectSoundWaveData_872762C:: - .incbin "sound/direct_sound_samples/872762C.bin" +DirectSoundWaveData_unknown_2:: + .incbin "sound/direct_sound_samples/unknown_02.bin" .align 2 -DirectSoundWaveData_872921C:: - .incbin "sound/direct_sound_samples/872921C.bin" +DirectSoundWaveData_unknown_3:: + .incbin "sound/direct_sound_samples/unknown_03.bin" .align 2 -DirectSoundWaveData_872A5D0:: - .incbin "sound/direct_sound_samples/872A5D0.bin" +DirectSoundWaveData_unknown_4:: + .incbin "sound/direct_sound_samples/unknown_04.bin" .align 2 DirectSoundWaveData_sc88pro_wind:: @@ -311,32 +311,32 @@ DirectSoundWaveData_sc88pro_bubbles:: .incbin "sound/direct_sound_samples/sc88pro_bubbles.bin" .align 2 -DirectSoundWaveData_872EEA8:: - .incbin "sound/direct_sound_samples/872EEA8.bin" +DirectSoundWaveData_unknown_5:: + .incbin "sound/direct_sound_samples/unknown_05.bin" .align 2 -DirectSoundWaveData_87301B0:: - .incbin "sound/direct_sound_samples/87301B0.bin" +DirectSoundWaveData_unknown_6:: + .incbin "sound/direct_sound_samples/unknown_06.bin" .align 2 DirectSoundWaveData_trinity_30303_mega_bass:: .incbin "sound/direct_sound_samples/trinity_30303_mega_bass.bin" .align 2 -DirectSoundWaveData_8734298:: - .incbin "sound/direct_sound_samples/8734298.bin" +DirectSoundWaveData_unknown_7:: + .incbin "sound/direct_sound_samples/unknown_07.bin" .align 2 -DirectSoundWaveData_87364A8:: - .incbin "sound/direct_sound_samples/87364A8.bin" +DirectSoundWaveData_unknown_8:: + .incbin "sound/direct_sound_samples/unknown_08.bin" .align 2 DirectSoundWaveData_sc88pro_tubular_bell:: .incbin "sound/direct_sound_samples/sc88pro_tubular_bell.bin" .align 2 -DirectSoundWaveData_87385E4:: - .incbin "sound/direct_sound_samples/87385E4.bin" +DirectSoundWaveData_unknown_9:: + .incbin "sound/direct_sound_samples/unknown_09.bin" .align 2 DirectSoundWaveData_trinity_big_boned:: @@ -351,40 +351,40 @@ DirectSoundWaveData_sc88pro_xylophone:: .incbin "sound/direct_sound_samples/sc88pro_xylophone.bin" .align 2 -DirectSoundWaveData_873ECD8:: - .incbin "sound/direct_sound_samples/873ECD8.bin" +DirectSoundWaveData_unknown_10:: + .incbin "sound/direct_sound_samples/unknown_10.bin" .align 2 -DirectSoundWaveData_8740818:: - .incbin "sound/direct_sound_samples/8740818.bin" +DirectSoundWaveData_unknown_11:: + .incbin "sound/direct_sound_samples/unknown_11.bin" .align 2 DirectSoundWaveData_sc88pro_accordion:: .incbin "sound/direct_sound_samples/sc88pro_accordion.bin" .align 2 -DirectSoundWaveData_87424B0:: - .incbin "sound/direct_sound_samples/87424B0.bin" +DirectSoundWaveData_unknown_12:: + .incbin "sound/direct_sound_samples/unknown_12.bin" .align 2 -DirectSoundWaveData_87430C0:: - .incbin "sound/direct_sound_samples/87430C0.bin" +DirectSoundWaveData_unknown_13:: + .incbin "sound/direct_sound_samples/unknown_13.bin" .align 2 -DirectSoundWaveData_8743C50:: - .incbin "sound/direct_sound_samples/8743C50.bin" +DirectSoundWaveData_unknown_14:: + .incbin "sound/direct_sound_samples/unknown_14.bin" .align 2 -DirectSoundWaveData_87446EC:: - .incbin "sound/direct_sound_samples/87446EC.bin" +DirectSoundWaveData_unknown_15:: + .incbin "sound/direct_sound_samples/unknown_15.bin" .align 2 -DirectSoundWaveData_8745034:: - .incbin "sound/direct_sound_samples/8745034.bin" +DirectSoundWaveData_unknown_16:: + .incbin "sound/direct_sound_samples/unknown_16.bin" .align 2 -DirectSoundWaveData_8745A7C:: - .incbin "sound/direct_sound_samples/8745A7C.bin" +DirectSoundWaveData_unknown_17:: + .incbin "sound/direct_sound_samples/unknown_17.bin" .align 2 Cry_Bulbasaur:: @@ -1943,8 +1943,8 @@ DirectSoundWaveData_register_noise:: .incbin "sound/direct_sound_samples/register_noise.bin" .align 2 -DirectSoundWaveData_88D6978:: - .incbin "sound/direct_sound_samples/88D6978.bin" +DirectSoundWaveData_unknown_18:: + .incbin "sound/direct_sound_samples/unknown_18.bin" .align 2 DirectSoundWaveData_sc88pro_nylon_str_guitar:: diff --git a/sound/direct_sound_samples/8725A2C.aif b/sound/direct_sound_samples/unknown_01.aif similarity index 100% rename from sound/direct_sound_samples/8725A2C.aif rename to sound/direct_sound_samples/unknown_01.aif diff --git a/sound/direct_sound_samples/872762C.aif b/sound/direct_sound_samples/unknown_02.aif similarity index 100% rename from sound/direct_sound_samples/872762C.aif rename to sound/direct_sound_samples/unknown_02.aif diff --git a/sound/direct_sound_samples/872921C.aif b/sound/direct_sound_samples/unknown_03.aif similarity index 100% rename from sound/direct_sound_samples/872921C.aif rename to sound/direct_sound_samples/unknown_03.aif diff --git a/sound/direct_sound_samples/872A5D0.aif b/sound/direct_sound_samples/unknown_04.aif similarity index 100% rename from sound/direct_sound_samples/872A5D0.aif rename to sound/direct_sound_samples/unknown_04.aif diff --git a/sound/direct_sound_samples/872EEA8.aif b/sound/direct_sound_samples/unknown_05.aif similarity index 100% rename from sound/direct_sound_samples/872EEA8.aif rename to sound/direct_sound_samples/unknown_05.aif diff --git a/sound/direct_sound_samples/87301B0.aif b/sound/direct_sound_samples/unknown_06.aif similarity index 100% rename from sound/direct_sound_samples/87301B0.aif rename to sound/direct_sound_samples/unknown_06.aif diff --git a/sound/direct_sound_samples/8734298.aif b/sound/direct_sound_samples/unknown_07.aif similarity index 100% rename from sound/direct_sound_samples/8734298.aif rename to sound/direct_sound_samples/unknown_07.aif diff --git a/sound/direct_sound_samples/87364A8.aif b/sound/direct_sound_samples/unknown_08.aif similarity index 100% rename from sound/direct_sound_samples/87364A8.aif rename to sound/direct_sound_samples/unknown_08.aif diff --git a/sound/direct_sound_samples/87385E4.aif b/sound/direct_sound_samples/unknown_09.aif similarity index 100% rename from sound/direct_sound_samples/87385E4.aif rename to sound/direct_sound_samples/unknown_09.aif diff --git a/sound/direct_sound_samples/873ECD8.aif b/sound/direct_sound_samples/unknown_10.aif similarity index 100% rename from sound/direct_sound_samples/873ECD8.aif rename to sound/direct_sound_samples/unknown_10.aif diff --git a/sound/direct_sound_samples/8740818.aif b/sound/direct_sound_samples/unknown_11.aif similarity index 100% rename from sound/direct_sound_samples/8740818.aif rename to sound/direct_sound_samples/unknown_11.aif diff --git a/sound/direct_sound_samples/87424B0.aif b/sound/direct_sound_samples/unknown_12.aif similarity index 100% rename from sound/direct_sound_samples/87424B0.aif rename to sound/direct_sound_samples/unknown_12.aif diff --git a/sound/direct_sound_samples/87430C0.aif b/sound/direct_sound_samples/unknown_13.aif similarity index 100% rename from sound/direct_sound_samples/87430C0.aif rename to sound/direct_sound_samples/unknown_13.aif diff --git a/sound/direct_sound_samples/8743C50.aif b/sound/direct_sound_samples/unknown_14.aif similarity index 100% rename from sound/direct_sound_samples/8743C50.aif rename to sound/direct_sound_samples/unknown_14.aif diff --git a/sound/direct_sound_samples/87446EC.aif b/sound/direct_sound_samples/unknown_15.aif similarity index 100% rename from sound/direct_sound_samples/87446EC.aif rename to sound/direct_sound_samples/unknown_15.aif diff --git a/sound/direct_sound_samples/8745034.aif b/sound/direct_sound_samples/unknown_16.aif similarity index 100% rename from sound/direct_sound_samples/8745034.aif rename to sound/direct_sound_samples/unknown_16.aif diff --git a/sound/direct_sound_samples/8745A7C.aif b/sound/direct_sound_samples/unknown_17.aif similarity index 100% rename from sound/direct_sound_samples/8745A7C.aif rename to sound/direct_sound_samples/unknown_17.aif diff --git a/sound/direct_sound_samples/88D6978.aif b/sound/direct_sound_samples/unknown_18.aif similarity index 100% rename from sound/direct_sound_samples/88D6978.aif rename to sound/direct_sound_samples/unknown_18.aif diff --git a/sound/voicegroups/voicegroup098.inc b/sound/voicegroups/voicegroup098.inc index d670cb16d0..3a927368bc 100644 --- a/sound/voicegroups/voicegroup098.inc +++ b/sound/voicegroups/voicegroup098.inc @@ -125,7 +125,7 @@ voicegroup098:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_873ECD8, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_10, 255, 255, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 voice_noise_alt 60, 0, 0, 0, 1, 0, 0 diff --git a/sound/voicegroups/voicegroup128.inc b/sound/voicegroups/voicegroup128.inc index ce4904626a..69b52d29d6 100644 --- a/sound/voicegroups/voicegroup128.inc +++ b/sound/voicegroups/voicegroup128.inc @@ -8,17 +8,17 @@ voicegroup128:: voice_noise_alt 60, 0, 1, 0, 1, 0, 1 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_timpani, 255, 0, 255, 165 voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 1 - voice_directsound 60, 0, DirectSoundWaveData_8725A2C, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_1, 255, 0, 255, 165 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_pizzicato_strings, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_872762C, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_2, 255, 0, 255, 127 voice_noise_alt 60, 0, 1, 0, 2, 0, 0 voice_square_1 60, 0, 103, 3, 2, 7, 0, 0 voice_square_2 60, 0, 3, 2, 7, 0, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 226, 0, 127 - voice_directsound 60, 0, DirectSoundWaveData_872921C, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_unknown_3, 255, 0, 255, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 204, 0, 127 voice_square_1_alt 60, 0, 0, 2, 0, 2, 0, 1 - voice_directsound 60, 0, DirectSoundWaveData_872A5D0, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_4, 255, 0, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_square_wave, 255, 0, 255, 127 voice_square_1 60, 0, 103, 0, 0, 7, 0, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_orchestra_snare, 255, 0, 255, 127 @@ -26,22 +26,22 @@ voicegroup128:: voice_directsound 60, 0, DirectSoundWaveData_sc88pro_bubbles, 255, 0, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_rnd_snare, 255, 0, 255, 127 voice_noise_alt 60, 0, 0, 0, 7, 15, 1 - voice_directsound 60, 0, DirectSoundWaveData_872EEA8, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_5, 255, 0, 255, 127 voice_noise_alt 60, 0, 1, 0, 7, 15, 1 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 255, 246, 0, 127 - voice_directsound 60, 0, DirectSoundWaveData_87301B0, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_6, 255, 0, 255, 127 voice_square_1_alt 60, 0, 19, 2, 0, 2, 0, 0 voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 255, 0, 255, 127 voice_square_1 60, 0, 103, 0, 0, 0, 15, 0 - voice_directsound_alt 60, 0, DirectSoundWaveData_87301B0, 255, 0, 255, 127 + voice_directsound_alt 60, 0, DirectSoundWaveData_unknown_6, 255, 0, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_fretless_bass, 255, 255, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_synth_bass, 255, 0, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_8734298, 255, 0, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_7, 255, 0, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_trinity_30303_mega_bass, 255, 242, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_87364A8, 255, 0, 255, 0 + voice_directsound 60, 0, DirectSoundWaveData_unknown_8, 255, 0, 255, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 255, 165, 90, 216 voice_directsound 60, 0, DirectSoundWaveData_unknown_close_hihat, 255, 127, 0, 188 - voice_directsound 60, 0, DirectSoundWaveData_87385E4, 255, 249, 0, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_9, 255, 249, 0, 165 voice_square_1 60, 0, 0, 0, 4, 6, 0, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_glockenspiel, 13, 0, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tubular_bell, 13, 0, 255, 127 @@ -60,10 +60,10 @@ voicegroup128:: voice_noise_alt 60, 0, 0, 1, 6, 0, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_slap_bass, 255, 255, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 255, 255, 127 - voice_directsound 60, 0, DirectSoundWaveData_873ECD8, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_10, 255, 255, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_french_horn_72, 11, 242, 0, 127 voice_square_1_alt 60, 0, 0, 2, 4, 6, 0, 0 - voice_directsound 60, 0, DirectSoundWaveData_8740818, 255, 255, 255, 127 + voice_directsound 60, 0, DirectSoundWaveData_unknown_11, 255, 255, 255, 127 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_accordion, 255, 0, 255, 165 voice_directsound 60, 0, DirectSoundWaveData_unused_sc55_tom, 255, 0, 255, 165 voice_noise_alt 60, 0, 0, 5, 7, 15, 1 @@ -122,10 +122,10 @@ voicegroup128:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_87424B0, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_87430C0, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_8743C50, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_87446EC, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_8745034, 255, 0, 255, 165 - voice_directsound 60, 0, DirectSoundWaveData_8745A7C, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_12, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_13, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_14, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_15, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_16, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_17, 255, 0, 255, 165 diff --git a/sound/voicegroups/voicegroup129.inc b/sound/voicegroups/voicegroup129.inc index ad94d1f704..8e136bdf48 100644 --- a/sound/voicegroups/voicegroup129.inc +++ b/sound/voicegroups/voicegroup129.inc @@ -5,11 +5,11 @@ voicegroup129:: voice_directsound 60, 0, DirectSoundWaveData_sc88pro_open_low_conga, 255, 0, 255, 0 voice_directsound 60, 0, DirectSoundWaveData_sc88pro_tr909_hand_clap, 255, 226, 25, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_8725A2C, 255, 0, 255, 165 + voice_directsound 60, 0, DirectSoundWaveData_unknown_1, 255, 0, 255, 165 voice_directsound 60, 0, DirectSoundWaveData_dance_drums_ride_bell, 255, 165, 103, 231 voice_directsound 60, 0, DirectSoundWaveData_sd90_open_triangle, 255, 204, 128, 249 voice_directsound 60, 0, DirectSoundWaveData_register_noise, 255, 0, 255, 76 - voice_directsound 60, 0, DirectSoundWaveData_88D6978, 255, 0, 206, 204 + voice_directsound 60, 0, DirectSoundWaveData_unknown_18, 255, 0, 206, 204 voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_ohtsuzumi, 255, 0, 206, 38 voice_directsound 60, 0, DirectSoundWaveData_ethnic_flavours_hyoushigi, 255, 0, 206, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 diff --git a/sound/voicegroups/voicegroup163.inc b/sound/voicegroups/voicegroup163.inc index b8a3303f07..cd7c6ebef2 100644 --- a/sound/voicegroups/voicegroup163.inc +++ b/sound/voicegroups/voicegroup163.inc @@ -58,7 +58,7 @@ voicegroup163:: voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_keysplit voicegroup007, KeySplitTable3 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 - voice_directsound 60, 0, DirectSoundWaveData_88D6978, 255, 0, 206, 204 + voice_directsound 60, 0, DirectSoundWaveData_unknown_18, 255, 0, 206, 204 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 voice_square_1 60, 0, 0, 2, 0, 0, 15, 0 From 54b254a829d973345b0d282b7a4ffd7458a5c7da Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 7 Nov 2021 12:58:11 -0500 Subject: [PATCH 151/417] Add CRY_MODE constants --- asm/macros/event.inc | 10 +- asm/macros/music_voice.inc | 2 +- data/battle_anim_scripts.s | 6 +- data/event_scripts.s | 1 + data/maps/AncientTomb/scripts.inc | 2 +- data/maps/AquaHideout_B1F/scripts.inc | 4 +- .../scripts.inc | 12 +- .../BattleFrontier_OutsideEast/scripts.inc | 4 +- .../scripts.inc | 2 +- data/maps/BirthIsland_Exterior/scripts.inc | 2 +- data/maps/DesertRuins/scripts.inc | 2 +- data/maps/DewfordTown_House1/scripts.inc | 2 +- data/maps/FallarborTown/scripts.inc | 2 +- data/maps/FallarborTown_Mart/scripts.inc | 2 +- data/maps/FarawayIsland_Interior/scripts.inc | 2 +- data/maps/FortreeCity/scripts.inc | 2 +- data/maps/FortreeCity_House1/scripts.inc | 2 +- data/maps/FortreeCity_House4/scripts.inc | 2 +- data/maps/FortreeCity_House5/scripts.inc | 2 +- data/maps/IslandCave/scripts.inc | 2 +- data/maps/LavaridgeTown_House/scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/LilycoveCity_House1/scripts.inc | 2 +- data/maps/MarineCave_End/scripts.inc | 2 +- data/maps/MossdeepCity_House2/scripts.inc | 2 +- data/maps/MossdeepCity_House4/scripts.inc | 2 +- data/maps/NavelRock_Bottom/scripts.inc | 2 +- data/maps/NavelRock_Top/scripts.inc | 2 +- data/maps/NewMauville_Inside/scripts.inc | 6 +- data/maps/PacifidlogTown_House2/scripts.inc | 4 +- data/maps/Route104_MrBrineysHouse/scripts.inc | 2 +- data/maps/Route109/scripts.inc | 2 +- data/maps/Route114/scripts.inc | 2 +- data/maps/Route119_House/scripts.inc | 2 +- data/maps/Route120/scripts.inc | 2 +- data/maps/RustboroCity_Flat2_1F/scripts.inc | 2 +- data/maps/RustboroCity_House3/scripts.inc | 2 +- data/maps/RusturfTunnel/scripts.inc | 4 +- data/maps/SSTidalCorridor/scripts.inc | 2 +- data/maps/SkyPillar_Top/scripts.inc | 6 +- .../SlateportCity_PokemonFanClub/scripts.inc | 6 +- data/maps/SootopolisCity/scripts.inc | 20 +- data/maps/SootopolisCity_House1/scripts.inc | 2 +- data/maps/SootopolisCity_House4/scripts.inc | 2 +- data/maps/SouthernIsland_Interior/scripts.inc | 2 +- data/maps/TerraCave_End/scripts.inc | 2 +- .../scripts.inc | 2 +- data/scripts/cave_of_origin.inc | 2 +- data/scripts/day_care.inc | 4 +- data/scripts/kecleon.inc | 2 +- data/scripts/lilycove_lady.inc | 12 +- data/scripts/players_house.inc | 4 +- include/constants/sound.h | 41 + include/sound.h | 21 +- sound/cry_tables.inc | 778 +++++++++--------- src/battle_anim_sound_tasks.c | 25 +- src/battle_controller_link_opponent.c | 2 +- src/battle_controller_link_partner.c | 2 +- src/battle_controller_opponent.c | 2 +- src/battle_controller_player.c | 2 +- src/battle_controller_player_partner.c | 2 +- src/battle_controller_recorded_opponent.c | 2 +- src/battle_controller_recorded_player.c | 2 +- src/intro.c | 2 +- src/pokeball.c | 14 +- src/pokemon_summary_screen.c | 4 +- src/sound.c | 66 +- 67 files changed, 586 insertions(+), 556 deletions(-) create mode 100644 include/constants/sound.h diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 62437ccb8a..27a4397258 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -334,10 +334,10 @@ .byte 0x30 .endm - @ Plays the specified (fanfare_number) fanfare. - .macro playfanfare fanfare_number:req + @ Plays the fanfare specified by the song number. If the specified song is not a fanfare it will instead play the first song in sFanfares. + .macro playfanfare songNumber:req .byte 0x31 - .2byte \fanfare_number + .2byte \songNumber .endm @ Blocks script execution until all currently-playing fanfares finish. @@ -1208,10 +1208,10 @@ .endm @ Plays the specified (species) Pokemon's cry. You can use waitcry to block script execution until the sound finishes. - .macro playmoncry species:req, effect:req + .macro playmoncry species:req, mode:req .byte 0xa1 .2byte \species - .2byte \effect + .2byte \mode .endm @ Changes the metatile at (x, y) on the current map. diff --git a/asm/macros/music_voice.inc b/asm/macros/music_voice.inc index 64dd382140..ff87c56d6b 100644 --- a/asm/macros/music_voice.inc +++ b/asm/macros/music_voice.inc @@ -145,7 +145,7 @@ .byte 0xff, 0, 0xff, 0 .endm - .macro cry2 sample:req + .macro cry_reverse sample:req .byte 0x30, 60, 0, 0 .4byte \sample .byte 0xff, 0, 0xff, 0 diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 2c5c9ba046..aea55fcd17 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -2,6 +2,7 @@ #include "constants/battle_anim.h" #include "constants/rgb.h" #include "constants/songs.h" +#include "constants/sound.h" #include "constants/moves.h" .include "asm/macros.inc" .include "asm/macros/battle_anim_script.inc" @@ -4960,7 +4961,7 @@ Move_ROAR: monbg ANIM_ATTACKER splitbgprio ANIM_ATTACKER setalpha 8, 8 - createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, 2 + createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, DOUBLE_CRY_ROAR createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 10, ANIM_ATTACKER, 1 call RoarEffect delay 20 @@ -4985,7 +4986,7 @@ RoarEffect: Move_GROWL: loadspritegfx ANIM_TAG_NOISE_LINE - createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, 255 + createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, DOUBLE_CRY_GROWL call RoarEffect delay 10 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 9, 1 @@ -8507,6 +8508,7 @@ Move_HYPER_VOICE: call HyperVoiceEffect waitforvisualfinish end + HyperVoiceEffect: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 8, 0, RGB_YELLOW createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 5, ANIM_ATTACKER, 0 diff --git a/data/event_scripts.s b/data/event_scripts.s index bbf25c93cf..77af6761b7 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -44,6 +44,7 @@ #include "constants/script_menu.h" #include "constants/secret_bases.h" #include "constants/songs.h" +#include "constants/sound.h" #include "constants/species.h" #include "constants/trade.h" #include "constants/trainer_hill.h" diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index edbb75ccc5..f2e242bbd6 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -59,7 +59,7 @@ AncientTomb_EventScript_Registeel:: lock faceplayer waitse - playmoncry SPECIES_REGISTEEL, 2 + playmoncry SPECIES_REGISTEEL, CRY_MODE_ENCOUNTER delay 40 waitmoncry setwildbattle SPECIES_REGISTEEL, 40, ITEM_NONE diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc index 4a4a95cc44..2a6f156e5c 100644 --- a/data/maps/AquaHideout_B1F/scripts.inc +++ b/data/maps/AquaHideout_B1F/scripts.inc @@ -32,7 +32,7 @@ AquaHideout_B1F_EventScript_Electrode1:: faceplayer setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE waitse - playmoncry SPECIES_ELECTRODE, 2 + playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_SYS_CTRL_OBJ_DELETE @@ -59,7 +59,7 @@ AquaHideout_B1F_EventScript_Electrode2:: faceplayer setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE waitse - playmoncry SPECIES_ELECTRODE, 2 + playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_SYS_CTRL_OBJ_DELETE diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 6ab862287c..5bd04bfb40 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -303,7 +303,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_KirliaStop, MSGBOX_DEFAULT closemessage waitse - playmoncry SPECIES_KIRLIA, 0 + playmoncry SPECIES_KIRLIA, CRY_MODE_NORMAL waitmoncry pike_getstatus compare VAR_RESULT, PIKE_STATUS_TOXIC @@ -321,11 +321,11 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack:: applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC waitmovement 0 waitse - playmoncry SPECIES_KIRLIA, 0 + playmoncry SPECIES_KIRLIA, CRY_MODE_NORMAL waitmoncry msgbox BattleFrontier_BattlePikeRoomNormal_Text_ThatsEnough, MSGBOX_DEFAULT waitse - playmoncry SPECIES_KIRLIA, 0 + playmoncry SPECIES_KIRLIA, CRY_MODE_NORMAL waitmoncry closemessage applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside @@ -338,7 +338,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_DusclopsStop, MSGBOX_DEFAULT closemessage waitse - playmoncry SPECIES_DUSCLOPS, 0 + playmoncry SPECIES_DUSCLOPS, CRY_MODE_NORMAL waitmoncry pike_getstatus compare VAR_RESULT, PIKE_STATUS_FREEZE @@ -352,11 +352,11 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack:: applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonFaceNPC waitmovement 0 waitse - playmoncry SPECIES_DUSCLOPS, 0 + playmoncry SPECIES_DUSCLOPS, CRY_MODE_NORMAL waitmoncry msgbox BattleFrontier_BattlePikeRoomNormal_Text_ThatsEnough, MSGBOX_DEFAULT waitse - playmoncry SPECIES_DUSCLOPS, 0 + playmoncry SPECIES_DUSCLOPS, CRY_MODE_NORMAL waitmoncry closemessage applymovement LOCALID_OBJ_1, BattleFrontier_BattlePikeRoomNormal_Movement_MonMoveAside diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc index 8166f91869..9157f0befe 100644 --- a/data/maps/BattleFrontier_OutsideEast/scripts.inc +++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc @@ -72,7 +72,7 @@ BattleFrontier_OutsideEast_EventScript_Zigzagoon:: lock faceplayer waitse - playmoncry SPECIES_ZIGZAGOON, 0 + playmoncry SPECIES_ZIGZAGOON, CRY_MODE_NORMAL msgbox BattleFrontier_OutsideEast_Text_ZigzagoonLooksVacant, MSGBOX_DEFAULT waitmoncry release @@ -126,7 +126,7 @@ BattleFrontier_OutsideEast_EventScript_WaterSudowoodo:: msgbox gText_Sudowoodo_Attacked, MSGBOX_DEFAULT closemessage waitse - playmoncry SPECIES_SUDOWOODO, 2 + playmoncry SPECIES_SUDOWOODO, CRY_MODE_ENCOUNTER delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_SUDOWOODO diff --git a/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc b/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc index 6479270503..44806858fb 100644 --- a/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc +++ b/data/maps/BattleFrontier_PokemonCenter_1F/scripts.inc @@ -33,7 +33,7 @@ BattleFrontier_PokemonCenter_1F_EventScript_Skitty:: lock faceplayer waitse - playmoncry SPECIES_SKITTY, 0 + playmoncry SPECIES_SKITTY, CRY_MODE_NORMAL msgbox BattleFrontier_PokemonCenter_1F_Text_Skitty, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index 03463729cb..cd1583b420 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -79,7 +79,7 @@ BirthIsland_Exterior_EventScript_Deoxys:: applymovement LOCALID_DEOXYS, BirthIsland_Exterior_Movement_DeoxysApproach waitmovement 0 waitse - playmoncry SPECIES_DEOXYS, 2 + playmoncry SPECIES_DEOXYS, CRY_MODE_ENCOUNTER delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_DEOXYS diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index 1bcaa23bff..443915d7e2 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -59,7 +59,7 @@ DesertRuins_EventScript_Regirock:: lock faceplayer waitse - playmoncry SPECIES_REGIROCK, 2 + playmoncry SPECIES_REGIROCK, CRY_MODE_ENCOUNTER delay 40 waitmoncry setwildbattle SPECIES_REGIROCK, 40, ITEM_NONE diff --git a/data/maps/DewfordTown_House1/scripts.inc b/data/maps/DewfordTown_House1/scripts.inc index 0aba45d3c7..cdd9d0cd29 100644 --- a/data/maps/DewfordTown_House1/scripts.inc +++ b/data/maps/DewfordTown_House1/scripts.inc @@ -13,7 +13,7 @@ DewfordTown_House1_EventScript_Zigzagoon:: lock faceplayer waitse - playmoncry SPECIES_ZIGZAGOON, 0 + playmoncry SPECIES_ZIGZAGOON, CRY_MODE_NORMAL msgbox DewfordTown_House1_Text_Zigzagoon, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/FallarborTown/scripts.inc b/data/maps/FallarborTown/scripts.inc index 809909a5ca..96f4088436 100644 --- a/data/maps/FallarborTown/scripts.inc +++ b/data/maps/FallarborTown/scripts.inc @@ -33,7 +33,7 @@ FallarborTown_EventScript_Azurill:: lock faceplayer waitse - playmoncry SPECIES_AZURILL, 0 + playmoncry SPECIES_AZURILL, CRY_MODE_NORMAL msgbox FallarborTown_Text_Azurill, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/FallarborTown_Mart/scripts.inc b/data/maps/FallarborTown_Mart/scripts.inc index 2b18a9e143..cb92f28f52 100644 --- a/data/maps/FallarborTown_Mart/scripts.inc +++ b/data/maps/FallarborTown_Mart/scripts.inc @@ -41,7 +41,7 @@ FallarborTown_Mart_EventScript_Skitty:: lock faceplayer waitse - playmoncry SPECIES_SKITTY, 0 + playmoncry SPECIES_SKITTY, CRY_MODE_NORMAL msgbox FallarborTown_Mart_Text_Skitty, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index bd2b479f70..5f9444f87b 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -126,7 +126,7 @@ FarawayIsland_Interior_EventScript_Mew:: special SetMewAboveGrass message FarawayIsland_Interior_Text_Mew waitse - playmoncry SPECIES_MEW, 2 + playmoncry SPECIES_MEW, CRY_MODE_ENCOUNTER compare VAR_FACING, DIR_NORTH call_if_eq FarawayIsland_Interior_EventScript_FoundMewNorth compare VAR_FACING, DIR_SOUTH diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc index 1ef3cffc73..6371d5b0cd 100644 --- a/data/maps/FortreeCity/scripts.inc +++ b/data/maps/FortreeCity/scripts.inc @@ -75,7 +75,7 @@ FortreeCity_EventScript_UseDevonScope:: applymovement VAR_LAST_TALKED, Movement_KecleonAppears waitmovement 0 waitse - playmoncry SPECIES_KECLEON, 2 + playmoncry SPECIES_KECLEON, CRY_MODE_ENCOUNTER delay 40 waitmoncry applymovement VAR_LAST_TALKED, FortreeCity_Movement_KecleonFlee diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc index 3dd58ca344..e25334ee9a 100644 --- a/data/maps/FortreeCity_House1/scripts.inc +++ b/data/maps/FortreeCity_House1/scripts.inc @@ -57,7 +57,7 @@ FortreeCity_House1_EventScript_Zigzagoon:: lock faceplayer waitse - playmoncry SPECIES_ZIGZAGOON, 0 + playmoncry SPECIES_ZIGZAGOON, CRY_MODE_NORMAL msgbox FortreeCity_House1_Text_Zigzagoon, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/FortreeCity_House4/scripts.inc b/data/maps/FortreeCity_House4/scripts.inc index 8a6d71eb4d..ad94337a0e 100644 --- a/data/maps/FortreeCity_House4/scripts.inc +++ b/data/maps/FortreeCity_House4/scripts.inc @@ -59,7 +59,7 @@ FortreeCity_House4_EventScript_Wingull:: lock faceplayer waitse - playmoncry SPECIES_WINGULL, 0 + playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL msgbox FortreeCity_House4_Text_Wingull, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/FortreeCity_House5/scripts.inc b/data/maps/FortreeCity_House5/scripts.inc index 71fcc78cad..eee6d358bf 100644 --- a/data/maps/FortreeCity_House5/scripts.inc +++ b/data/maps/FortreeCity_House5/scripts.inc @@ -13,7 +13,7 @@ FortreeCity_House5_EventScript_Zigzagoon:: lock faceplayer waitse - playmoncry SPECIES_ZIGZAGOON, 0 + playmoncry SPECIES_ZIGZAGOON, CRY_MODE_NORMAL msgbox FortreeCity_House5_Text_Zigzagoon, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index af93863b7c..d660aadf06 100644 --- a/data/maps/IslandCave/scripts.inc +++ b/data/maps/IslandCave/scripts.inc @@ -92,7 +92,7 @@ IslandCave_EventScript_Regice:: lock faceplayer waitse - playmoncry SPECIES_REGICE, 2 + playmoncry SPECIES_REGICE, CRY_MODE_ENCOUNTER delay 40 waitmoncry setwildbattle SPECIES_REGICE, 40, ITEM_NONE diff --git a/data/maps/LavaridgeTown_House/scripts.inc b/data/maps/LavaridgeTown_House/scripts.inc index 58fd8ecb25..30f4e99ba4 100644 --- a/data/maps/LavaridgeTown_House/scripts.inc +++ b/data/maps/LavaridgeTown_House/scripts.inc @@ -9,7 +9,7 @@ LavaridgeTown_House_EventScript_Zigzagoon:: lock faceplayer waitse - playmoncry SPECIES_ZIGZAGOON, 0 + playmoncry SPECIES_ZIGZAGOON, CRY_MODE_NORMAL msgbox LavaridgeTown_House_Text_Zigzagoon, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc index e1167ad7ea..965e4bbbcf 100644 --- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc @@ -141,7 +141,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_Azumarill:: lock faceplayer waitse - playmoncry SPECIES_AZUMARILL, 0 + playmoncry SPECIES_AZUMARILL, CRY_MODE_NORMAL msgbox LilycoveCity_DepartmentStore_1F_Text_Azumarill, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/LilycoveCity_House1/scripts.inc b/data/maps/LilycoveCity_House1/scripts.inc index 34e9e6d90e..c2bd21cdc2 100644 --- a/data/maps/LilycoveCity_House1/scripts.inc +++ b/data/maps/LilycoveCity_House1/scripts.inc @@ -9,7 +9,7 @@ LilycoveCity_House1_EventScript_Kecleon:: lock faceplayer waitse - playmoncry SPECIES_KECLEON, 0 + playmoncry SPECIES_KECLEON, CRY_MODE_NORMAL msgbox LilycoveCity_House1_Text_Kecleon, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc index 47bbf9aada..296ef02f82 100644 --- a/data/maps/MarineCave_End/scripts.inc +++ b/data/maps/MarineCave_End/scripts.inc @@ -32,7 +32,7 @@ MarineCave_End_EventScript_Kyogre:: applymovement LOCALID_KYOGRE, MarineCave_End_Movement_KyogreApproach waitmovement 0 waitse - playmoncry SPECIES_KYOGRE, 2 + playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_KYOGRE diff --git a/data/maps/MossdeepCity_House2/scripts.inc b/data/maps/MossdeepCity_House2/scripts.inc index 63036814b2..5f568ac772 100644 --- a/data/maps/MossdeepCity_House2/scripts.inc +++ b/data/maps/MossdeepCity_House2/scripts.inc @@ -15,7 +15,7 @@ MossdeepCity_House2_EventScript_Wingull:: lock faceplayer waitse - playmoncry SPECIES_WINGULL, 0 + playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL msgbox MossdeepCity_House2_Text_Wingull, MSGBOX_DEFAULT waitmoncry closemessage diff --git a/data/maps/MossdeepCity_House4/scripts.inc b/data/maps/MossdeepCity_House4/scripts.inc index 85c0e5ebc0..7b7348f4e6 100644 --- a/data/maps/MossdeepCity_House4/scripts.inc +++ b/data/maps/MossdeepCity_House4/scripts.inc @@ -34,7 +34,7 @@ MossdeepCity_House4_EventScript_Skitty:: lock faceplayer waitse - playmoncry SPECIES_SKITTY, 0 + playmoncry SPECIES_SKITTY, CRY_MODE_NORMAL msgbox MossdeepCity_House4_Text_Skitty, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/NavelRock_Bottom/scripts.inc b/data/maps/NavelRock_Bottom/scripts.inc index da9e06cff3..d79c00c687 100644 --- a/data/maps/NavelRock_Bottom/scripts.inc +++ b/data/maps/NavelRock_Bottom/scripts.inc @@ -51,7 +51,7 @@ NavelRock_Bottom_EventScript_Lugia:: delay 30 delay 50 waitse - playmoncry SPECIES_LUGIA, 2 + playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER waitmoncry delay 20 setvar VAR_0x8004, SPECIES_LUGIA diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc index 4355699ee5..e8b3e7e296 100644 --- a/data/maps/NavelRock_Top/scripts.inc +++ b/data/maps/NavelRock_Top/scripts.inc @@ -47,7 +47,7 @@ NavelRock_Top_EventScript_HoOh:: setweather WEATHER_NONE doweather waitse - playmoncry SPECIES_HO_OH, 2 + playmoncry SPECIES_HO_OH, CRY_MODE_ENCOUNTER delay 30 waitmoncry delay 60 diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc index ac9572ea85..d924651cef 100644 --- a/data/maps/NewMauville_Inside/scripts.inc +++ b/data/maps/NewMauville_Inside/scripts.inc @@ -183,7 +183,7 @@ NewMauville_Inside_EventScript_Voltorb1:: faceplayer setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE waitse - playmoncry SPECIES_VOLTORB, 2 + playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_SYS_CTRL_OBJ_DELETE @@ -210,7 +210,7 @@ NewMauville_Inside_EventScript_Voltorb2:: faceplayer setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE waitse - playmoncry SPECIES_VOLTORB, 2 + playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_SYS_CTRL_OBJ_DELETE @@ -237,7 +237,7 @@ NewMauville_Inside_EventScript_Voltorb3:: faceplayer setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE waitse - playmoncry SPECIES_VOLTORB, 2 + playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_SYS_CTRL_OBJ_DELETE diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc index 3c0be269e2..27f966e961 100644 --- a/data/maps/PacifidlogTown_House2/scripts.inc +++ b/data/maps/PacifidlogTown_House2/scripts.inc @@ -77,7 +77,7 @@ PacifidlogTown_House2_EventScript_HappyAzurill:: lock faceplayer waitse - playmoncry SPECIES_AZURILL, 0 + playmoncry SPECIES_AZURILL, CRY_MODE_NORMAL msgbox PacifidlogTown_House2_Text_Rurii, MSGBOX_DEFAULT waitmoncry msgbox PacifidlogTown_House2_Text_VeryFriendlyWithTrainer, MSGBOX_DEFAULT @@ -88,7 +88,7 @@ PacifidlogTown_House2_EventScript_UnhappyAzurill:: lock faceplayer waitse - playmoncry SPECIES_AZURILL, 2 + playmoncry SPECIES_AZURILL, CRY_MODE_ENCOUNTER msgbox PacifidlogTown_House2_Text_Rururi, MSGBOX_DEFAULT waitmoncry msgbox PacifidlogTown_House2_Text_DoesntLikeTrainerVeryMuch, MSGBOX_DEFAULT diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc index 60e08c7b89..f2e169d105 100644 --- a/data/maps/Route104_MrBrineysHouse/scripts.inc +++ b/data/maps/Route104_MrBrineysHouse/scripts.inc @@ -95,7 +95,7 @@ Route104_MrBrineysHouse_EventScript_Peeko:: lock faceplayer waitse - playmoncry SPECIES_WINGULL, 0 + playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL msgbox Route104_MrBrineysHouse_Text_Peeko, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index 6c38a8bd76..6370caec72 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -362,7 +362,7 @@ Route109_EventScript_Zigzagoon:: lock faceplayer waitse - playmoncry SPECIES_ZIGZAGOON, 0 + playmoncry SPECIES_ZIGZAGOON, CRY_MODE_NORMAL msgbox Route109_Text_ZigzagoonCry, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/Route114/scripts.inc b/data/maps/Route114/scripts.inc index 3eb92d0f1e..c0420fbf61 100644 --- a/data/maps/Route114/scripts.inc +++ b/data/maps/Route114/scripts.inc @@ -68,7 +68,7 @@ Route114_EventScript_Poochyena:: lock faceplayer waitse - playmoncry SPECIES_POOCHYENA, 2 + playmoncry SPECIES_POOCHYENA, CRY_MODE_ENCOUNTER msgbox Route114_Text_Poochyena, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/Route119_House/scripts.inc b/data/maps/Route119_House/scripts.inc index 548b2c3948..9a44179a58 100644 --- a/data/maps/Route119_House/scripts.inc +++ b/data/maps/Route119_House/scripts.inc @@ -9,7 +9,7 @@ Route119_House_EventScript_Wingull:: lock faceplayer waitse - playmoncry SPECIES_WINGULL, 0 + playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL msgbox Route119_House_Text_Wingull, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index f073958246..23eaec8c2d 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -210,7 +210,7 @@ Route120_EventScript_StevenBattleKecleon:: applymovement LOCALID_BRIDGE_KECLEON, Movement_KecleonAppears waitmovement 0 waitse - playmoncry SPECIES_KECLEON, 2 + playmoncry SPECIES_KECLEON, CRY_MODE_ENCOUNTER delay 40 waitmoncry setwildbattle SPECIES_KECLEON, 30, ITEM_NONE diff --git a/data/maps/RustboroCity_Flat2_1F/scripts.inc b/data/maps/RustboroCity_Flat2_1F/scripts.inc index eda27c7168..7d965e8f3d 100644 --- a/data/maps/RustboroCity_Flat2_1F/scripts.inc +++ b/data/maps/RustboroCity_Flat2_1F/scripts.inc @@ -9,7 +9,7 @@ RustboroCity_Flat2_1F_EventScript_Skitty:: lock faceplayer waitse - playmoncry SPECIES_SKITTY, 0 + playmoncry SPECIES_SKITTY, CRY_MODE_NORMAL msgbox RustboroCity_Flat2_1F_Text_Skitty, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/RustboroCity_House3/scripts.inc b/data/maps/RustboroCity_House3/scripts.inc index 70a359df63..549b4246c7 100644 --- a/data/maps/RustboroCity_House3/scripts.inc +++ b/data/maps/RustboroCity_House3/scripts.inc @@ -14,7 +14,7 @@ RustboroCity_House3_EventScript_Pekachu:: lock faceplayer waitse - playmoncry SPECIES_PIKACHU, 0 + playmoncry SPECIES_PIKACHU, CRY_MODE_NORMAL msgbox RustboroCity_House3_Text_Pekachu, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc index 1ba3c240c4..17408a5d17 100644 --- a/data/maps/RusturfTunnel/scripts.inc +++ b/data/maps/RusturfTunnel/scripts.inc @@ -307,7 +307,7 @@ RusturfTunnel_EventScript_Peeko:: lock faceplayer waitse - playmoncry SPECIES_WINGULL, 0 + playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL msgbox RusturfTunnel_Text_Peeko, MSGBOX_DEFAULT waitmoncry release @@ -339,7 +339,7 @@ RusturfTunnel_EventScript_Grunt:: message RusturfTunnel_Text_ThankYouLetsGoHomePeeko waitmessage waitse - playmoncry SPECIES_WINGULL, 0 + playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL waitbuttonpress waitmoncry closemessage diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc index 07c397e8c8..4ab8104f71 100644 --- a/data/maps/SSTidalCorridor/scripts.inc +++ b/data/maps/SSTidalCorridor/scripts.inc @@ -92,7 +92,7 @@ SSTidalCorridor_EventScript_Peeko:: lock faceplayer waitse - playmoncry SPECIES_WINGULL, 0 + playmoncry SPECIES_WINGULL, CRY_MODE_NORMAL msgbox SSTidalCorridor_Text_Peeko, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index acbdb4c8bd..089856d770 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -48,7 +48,7 @@ SkyPillar_Top_EventScript_RayquazaFaceDown:: SkyPillar_Top_EventScript_Rayquaza:: lockall waitse - playmoncry SPECIES_RAYQUAZA, 2 + playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER delay 40 waitmoncry setwildbattle SPECIES_RAYQUAZA, 70, ITEM_NONE @@ -105,7 +105,7 @@ SkyPillar_Top_EventScript_AwakenRayquaza:: applymovement LOCALID_RAYQUAZA_SLEEPING, SkyPillar_Top_Movement_RayquazaStir waitmovement 0 waitse - playmoncry SPECIES_RAYQUAZA, 2 + playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan setvar VAR_0x8006, 8 @ num shakes @@ -113,7 +113,7 @@ SkyPillar_Top_EventScript_AwakenRayquaza:: special ShakeCamera waitstate waitse - playmoncry SPECIES_RAYQUAZA, 2 + playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 2 @ horizontal pan setvar VAR_0x8006, 8 @ num shakes diff --git a/data/maps/SlateportCity_PokemonFanClub/scripts.inc b/data/maps/SlateportCity_PokemonFanClub/scripts.inc index 3bff728164..96e1a7633d 100644 --- a/data/maps/SlateportCity_PokemonFanClub/scripts.inc +++ b/data/maps/SlateportCity_PokemonFanClub/scripts.inc @@ -240,7 +240,7 @@ SlateportCity_PokemonFanClub_EventScript_Skitty:: lock faceplayer waitse - playmoncry SPECIES_SKITTY, 0 + playmoncry SPECIES_SKITTY, CRY_MODE_NORMAL msgbox SlateportCity_PokemonFanClub_Text_Skitty, MSGBOX_DEFAULT waitmoncry release @@ -250,7 +250,7 @@ SlateportCity_PokemonFanClub_EventScript_Zigzagoon:: lock faceplayer waitse - playmoncry SPECIES_ZIGZAGOON, 0 + playmoncry SPECIES_ZIGZAGOON, CRY_MODE_NORMAL msgbox SlateportCity_PokemonFanClub_Text_Zigzagoon, MSGBOX_DEFAULT waitmoncry release @@ -260,7 +260,7 @@ SlateportCity_PokemonFanClub_EventScript_Azumarill:: lock faceplayer waitse - playmoncry SPECIES_AZUMARILL, 0 + playmoncry SPECIES_AZUMARILL, CRY_MODE_NORMAL msgbox SlateportCity_PokemonFanClub_Text_Azumarill, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index efeae33d1e..bff49ede04 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -243,7 +243,7 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: waitmovement 0 delay 60 waitse - playmoncry SPECIES_KYOGRE, 2 + playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreAttack applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonDefend waitmovement 0 @@ -257,7 +257,7 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 waitse - playmoncry SPECIES_GROUDON, 2 + playmoncry SPECIES_GROUDON, CRY_MODE_ENCOUNTER applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreDefend applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonAttack waitmovement 0 @@ -271,7 +271,7 @@ SootopolisCity_EventScript_LegendariesSceneFromPokeCenter:: applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 waitse - playmoncry SPECIES_KYOGRE, 2 + playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreAttack applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonDefend waitmovement 0 @@ -343,7 +343,7 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: waitmovement 0 delay 60 waitse - playmoncry SPECIES_KYOGRE, 2 + playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreAttack applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonDefend waitmovement 0 @@ -357,7 +357,7 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 waitse - playmoncry SPECIES_GROUDON, 2 + playmoncry SPECIES_GROUDON, CRY_MODE_ENCOUNTER applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreDefend applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonAttack waitmovement 0 @@ -371,7 +371,7 @@ SootopolisCity_EventScript_LegendariesSceneFromDive:: applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonMoveBack waitmovement 0 waitse - playmoncry SPECIES_KYOGRE, 2 + playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER applymovement LOCALID_KYOGRE, SootopolisCity_Movement_KyogreAttack applymovement LOCALID_GROUDON, SootopolisCity_Movement_GroudonDefend waitmovement 0 @@ -536,7 +536,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: applymovement OBJ_EVENT_ID_CAMERA, SootopolisCity_Movement_PanUp waitmovement 0 waitse - playmoncry SPECIES_RAYQUAZA, 2 + playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan setvar VAR_0x8006, 8 @ num shakes @@ -544,7 +544,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: special ShakeCamera waitstate waitse - playmoncry SPECIES_RAYQUAZA, 2 + playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 2 @ horizontal pan setvar VAR_0x8006, 8 @ num shakes @@ -589,7 +589,7 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerApproachLegendaries waitmovement 0 waitse - playmoncry SPECIES_RAYQUAZA, 2 + playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 1 @ horizontal pan setvar VAR_0x8006, 8 @ num shakes @@ -597,7 +597,7 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: special ShakeCamera waitstate waitse - playmoncry SPECIES_RAYQUAZA, 2 + playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER setvar VAR_0x8004, 1 @ vertical pan setvar VAR_0x8005, 2 @ horizontal pan setvar VAR_0x8006, 8 @ num shakes diff --git a/data/maps/SootopolisCity_House1/scripts.inc b/data/maps/SootopolisCity_House1/scripts.inc index 1cedf7c579..65df8587f3 100644 --- a/data/maps/SootopolisCity_House1/scripts.inc +++ b/data/maps/SootopolisCity_House1/scripts.inc @@ -23,7 +23,7 @@ SootopolisCity_House1_EventScript_Kecleon:: lock faceplayer waitse - playmoncry SPECIES_KECLEON, 0 + playmoncry SPECIES_KECLEON, CRY_MODE_NORMAL msgbox SootopolisCity_House1_Text_Kecleon, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/SootopolisCity_House4/scripts.inc b/data/maps/SootopolisCity_House4/scripts.inc index a1102bdd9f..1bc2b62ea3 100644 --- a/data/maps/SootopolisCity_House4/scripts.inc +++ b/data/maps/SootopolisCity_House4/scripts.inc @@ -13,7 +13,7 @@ SootopolisCity_House4_EventScript_Azumarill:: lock faceplayer waitse - playmoncry SPECIES_AZUMARILL, 0 + playmoncry SPECIES_AZUMARILL, CRY_MODE_NORMAL msgbox SootopolisCity_House4_Text_Azumarill, MSGBOX_DEFAULT waitmoncry release diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 20ed1e58d5..76cbeb8483 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -68,7 +68,7 @@ SouthernIsland_Interior_EventScript_Lati:: waitmovement 0 delay 50 waitse - playmoncry VAR_TEMP_4, 0 + playmoncry VAR_TEMP_4, CRY_MODE_NORMAL delay 30 waitmoncry addobject LOCALID_LATI diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc index 2b35b3c513..0036f33b5a 100644 --- a/data/maps/TerraCave_End/scripts.inc +++ b/data/maps/TerraCave_End/scripts.inc @@ -32,7 +32,7 @@ TerraCave_End_EventScript_Groudon:: applymovement LOCALID_GROUDON, TerraCave_End_Movement_GroudonApproach waitmovement 0 waitse - playmoncry SPECIES_GROUDON, 2 + playmoncry SPECIES_GROUDON, CRY_MODE_ENCOUNTER delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_GROUDON diff --git a/data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc b/data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc index 9d0485a776..84cdef029e 100644 --- a/data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc +++ b/data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc @@ -56,7 +56,7 @@ VerdanturfTown_FriendshipRatersHouse_EventScript_Pikachu:: lock faceplayer waitse - playmoncry SPECIES_PIKACHU, 0 + playmoncry SPECIES_PIKACHU, CRY_MODE_NORMAL msgbox VerdanturfTown_FriendshipRatersHouse_Text_Pikachu, MSGBOX_DEFAULT waitmoncry release diff --git a/data/scripts/cave_of_origin.inc b/data/scripts/cave_of_origin.inc index abffd07ff1..6773c06624 100644 --- a/data/scripts/cave_of_origin.inc +++ b/data/scripts/cave_of_origin.inc @@ -2,7 +2,7 @@ CaveOfOrigin_EventScript_LegendaryCry:: lockall waitse - playmoncry SPECIES_KYOGRE, 2 @ SPECIES_GROUDON in Ruby + playmoncry SPECIES_KYOGRE, CRY_MODE_ENCOUNTER @ SPECIES_GROUDON in Ruby waitmoncry setvar VAR_TEMP_5, 1 releaseall diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index f5c023147b..8d529d5e10 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -114,7 +114,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise:: goto_if_eq Route117_PokemonDayCare_EventScript_OnlyOneAliveMon specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL msgbox Route117_PokemonDayCare_Text_WellRaiseYourMon, MSGBOX_DEFAULT waitmoncry special StoreSelectedPokemonInDaycare @@ -220,7 +220,7 @@ Route117_PokemonDayCare_EventScript_RetrieveMon:: playse SE_SHOP msgbox Route117_PokemonDayCare_Text_HeresYourMon, MSGBOX_DEFAULT waitse - playmoncry VAR_RESULT, 0 + playmoncry VAR_RESULT, CRY_MODE_NORMAL msgbox Route117_PokemonDayCare_Text_TookBackMon, MSGBOX_DEFAULT waitmoncry specialvar VAR_RESULT, GetDaycareState diff --git a/data/scripts/kecleon.inc b/data/scripts/kecleon.inc index 4142174990..82eca777d5 100644 --- a/data/scripts/kecleon.inc +++ b/data/scripts/kecleon.inc @@ -70,7 +70,7 @@ EventScript_BattleKecleon:: applymovement VAR_LAST_TALKED, Movement_KecleonAppears waitmovement 0 waitse - playmoncry SPECIES_KECLEON, 2 + playmoncry SPECIES_KECLEON, CRY_MODE_ENCOUNTER delay 40 waitmoncry setwildbattle SPECIES_KECLEON, 30, ITEM_NONE diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index 137af87524..576fa28ade 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -454,7 +454,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: waitmovement 0 delay 60 waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL delay 120 waitmoncry compare VAR_0x8004, 1 @@ -552,7 +552,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon:: lock faceplayer waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL msgbox LilycoveCity_PokemonCenter_1F_Text_Zigzagoon, MSGBOX_DEFAULT waitmoncry release @@ -562,7 +562,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_Skitty:: lock faceplayer waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL msgbox LilycoveCity_PokemonCenter_1F_Text_Skitty, MSGBOX_DEFAULT waitmoncry release @@ -572,7 +572,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_Poochyena:: lock faceplayer waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL msgbox LilycoveCity_PokemonCenter_1F_Text_Poochyena, MSGBOX_DEFAULT waitmoncry release @@ -582,7 +582,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_Kecleon:: lock faceplayer waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL msgbox LilycoveCity_PokemonCenter_1F_Text_Kecleon, MSGBOX_DEFAULT waitmoncry release @@ -592,7 +592,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_Pikachu:: lock faceplayer waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL msgbox LilycoveCity_PokemonCenter_1F_Text_Pikachu, MSGBOX_DEFAULT waitmoncry release diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index e7e862039a..ce558c5880 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -385,7 +385,7 @@ PlayersHouse_1F_EventScript_Vigoroth1:: lock faceplayer waitse - playmoncry SPECIES_VIGOROTH, 0 + playmoncry SPECIES_VIGOROTH, CRY_MODE_NORMAL msgbox PlayersHouse_1F_Text_Vigoroth1, MSGBOX_DEFAULT waitmoncry release @@ -395,7 +395,7 @@ PlayersHouse_1F_EventScript_Vigoroth2:: lock faceplayer waitse - playmoncry SPECIES_VIGOROTH, 0 + playmoncry SPECIES_VIGOROTH, CRY_MODE_NORMAL msgbox PlayersHouse_1F_Text_Vigoroth2, MSGBOX_DEFAULT waitmoncry release diff --git a/include/constants/sound.h b/include/constants/sound.h new file mode 100644 index 0000000000..82cc4ffac3 --- /dev/null +++ b/include/constants/sound.h @@ -0,0 +1,41 @@ +#ifndef GUARD_CONSTANTS_SOUND_H +#define GUARD_CONSTANTS_SOUND_H + +#define FANFARE_LEVEL_UP 0 +#define FANFARE_OBTAIN_ITEM 1 +#define FANFARE_EVOLVED 2 +#define FANFARE_OBTAIN_TMHM 3 +#define FANFARE_HEAL 4 +#define FANFARE_OBTAIN_BADGE 5 +#define FANFARE_MOVE_DELETED 6 +#define FANFARE_OBTAIN_BERRY 7 +#define FANFARE_AWAKEN_LEGEND 8 +#define FANFARE_SLOTS_JACKPOT 9 +#define FANFARE_SLOTS_WIN 10 +#define FANFARE_TOO_BAD 11 +#define FANFARE_RG_POKE_FLUTE 12 +#define FANFARE_RG_OBTAIN_KEY_ITEM 13 +#define FANFARE_RG_DEX_RATING 14 +#define FANFARE_OBTAIN_B_POINTS 15 +#define FANFARE_OBTAIN_SYMBOL 16 +#define FANFARE_REGISTER_MATCH_CALL 17 + +#define CRY_MODE_NORMAL 0 // Default +#define CRY_MODE_DOUBLES 1 // Shortened cry for double battles +#define CRY_MODE_ENCOUNTER 2 // Used when starting a static encounter, or when a Pokémon is "aggressive" +#define CRY_MODE_HIGH_PITCH 3 // Highest pitch mode, used exclusively by the move Howl +#define CRY_MODE_ECHO_END 4 // For 2nd cry used by the move Hyper Voice. Played in reverse +#define CRY_MODE_FAINT 5 // Used when a Pokémon faints +#define CRY_MODE_ECHO_START 6 // For 1st cry used by the move Hyper Voice +#define CRY_MODE_ROAR_1 7 // For 1st cry used by the move Roar +#define CRY_MODE_ROAR_2 8 // For 2nd cry used by the move Roar +#define CRY_MODE_GROWL_1 9 // For 1st cry used by the move Growl. Played in reverse +#define CRY_MODE_GROWL_2 10 // For 2nd cry used by the move Growl +#define CRY_MODE_WEAK 11 // Used when a Pokémon is unhealthy +#define CRY_MODE_WEAK_DOUBLES 12 // Equivalent to CRY_MODE_DOUBLES for CRY_MODE_WEAK + +// Given to SoundTask_PlayDoubleCry to determine which cry mode to use. Values are arbitrary +#define DOUBLE_CRY_ROAR 2 +#define DOUBLE_CRY_GROWL 255 + +#endif // GUARD_CONSTANTS_SOUND_H diff --git a/include/sound.h b/include/sound.h index 25ffa2d6e4..5b34b69ba7 100644 --- a/include/sound.h +++ b/include/sound.h @@ -1,26 +1,7 @@ #ifndef GUARD_SOUND_H #define GUARD_SOUND_H -enum { - FANFARE_LEVEL_UP, - FANFARE_OBTAIN_ITEM, - FANFARE_EVOLVED, - FANFARE_OBTAIN_TMHM, - FANFARE_HEAL, - FANFARE_OBTAIN_BADGE, - FANFARE_MOVE_DELETED, - FANFARE_OBTAIN_BERRY, - FANFARE_AWAKEN_LEGEND, - FANFARE_SLOTS_JACKPOT, - FANFARE_SLOTS_WIN, - FANFARE_TOO_BAD, - FANFARE_RG_POKE_FLUTE, - FANFARE_RG_OBTAIN_KEY_ITEM, - FANFARE_RG_DEX_RATING, - FANFARE_OBTAIN_B_POINTS, - FANFARE_OBTAIN_SYMBOL, - FANFARE_REGISTER_MATCH_CALL, -}; +#include "constants/sound.h" void InitMapMusic(void); void MapMusicMain(void); diff --git a/sound/cry_tables.inc b/sound/cry_tables.inc index bceb1ccb49..22e7433635 100644 --- a/sound/cry_tables.inc +++ b/sound/cry_tables.inc @@ -390,392 +390,392 @@ gCryTable:: cry Cry_Chimecho .align 2 -gCryTable2:: - cry2 Cry_Bulbasaur - cry2 Cry_Ivysaur - cry2 Cry_Venusaur - cry2 Cry_Charmander - cry2 Cry_Charmeleon - cry2 Cry_Charizard - cry2 Cry_Squirtle - cry2 Cry_Wartortle - cry2 Cry_Blastoise - cry2 Cry_Caterpie - cry2 Cry_Metapod - cry2 Cry_Butterfree - cry2 Cry_Weedle - cry2 Cry_Kakuna - cry2 Cry_Beedrill - cry2 Cry_Pidgey - cry2 Cry_Pidgeotto - cry2 Cry_Pidgeot - cry2 Cry_Rattata - cry2 Cry_Raticate - cry2 Cry_Spearow - cry2 Cry_Fearow - cry2 Cry_Ekans - cry2 Cry_Arbok - cry2 Cry_Pikachu - cry2 Cry_Raichu - cry2 Cry_Sandshrew - cry2 Cry_Sandslash - cry2 Cry_NidoranF - cry2 Cry_Nidorina - cry2 Cry_Nidoqueen - cry2 Cry_NidoranM - cry2 Cry_Nidorino - cry2 Cry_Nidoking - cry2 Cry_Clefairy - cry2 Cry_Clefable - cry2 Cry_Vulpix - cry2 Cry_Ninetales - cry2 Cry_Jigglypuff - cry2 Cry_Wigglytuff - cry2 Cry_Zubat - cry2 Cry_Golbat - cry2 Cry_Oddish - cry2 Cry_Gloom - cry2 Cry_Vileplume - cry2 Cry_Paras - cry2 Cry_Parasect - cry2 Cry_Venonat - cry2 Cry_Venomoth - cry2 Cry_Diglett - cry2 Cry_Dugtrio - cry2 Cry_Meowth - cry2 Cry_Persian - cry2 Cry_Psyduck - cry2 Cry_Golduck - cry2 Cry_Mankey - cry2 Cry_Primeape - cry2 Cry_Growlithe - cry2 Cry_Arcanine - cry2 Cry_Poliwag - cry2 Cry_Poliwhirl - cry2 Cry_Poliwrath - cry2 Cry_Abra - cry2 Cry_Kadabra - cry2 Cry_Alakazam - cry2 Cry_Machop - cry2 Cry_Machoke - cry2 Cry_Machamp - cry2 Cry_Bellsprout - cry2 Cry_Weepinbell - cry2 Cry_Victreebel - cry2 Cry_Tentacool - cry2 Cry_Tentacruel - cry2 Cry_Geodude - cry2 Cry_Graveler - cry2 Cry_Golem - cry2 Cry_Ponyta - cry2 Cry_Rapidash - cry2 Cry_Slowpoke - cry2 Cry_Slowbro - cry2 Cry_Magnemite - cry2 Cry_Magneton - cry2 Cry_Farfetchd - cry2 Cry_Doduo - cry2 Cry_Dodrio - cry2 Cry_Seel - cry2 Cry_Dewgong - cry2 Cry_Grimer - cry2 Cry_Muk - cry2 Cry_Shellder - cry2 Cry_Cloyster - cry2 Cry_Gastly - cry2 Cry_Haunter - cry2 Cry_Gengar - cry2 Cry_Onix - cry2 Cry_Drowzee - cry2 Cry_Hypno - cry2 Cry_Krabby - cry2 Cry_Kingler - cry2 Cry_Voltorb - cry2 Cry_Electrode - cry2 Cry_Exeggcute - cry2 Cry_Exeggutor - cry2 Cry_Cubone - cry2 Cry_Marowak - cry2 Cry_Hitmonlee - cry2 Cry_Hitmonchan - cry2 Cry_Lickitung - cry2 Cry_Koffing - cry2 Cry_Weezing - cry2 Cry_Rhyhorn - cry2 Cry_Rhydon - cry2 Cry_Chansey - cry2 Cry_Tangela - cry2 Cry_Kangaskhan - cry2 Cry_Horsea - cry2 Cry_Seadra - cry2 Cry_Goldeen - cry2 Cry_Seaking - cry2 Cry_Staryu - cry2 Cry_Starmie - cry2 Cry_MrMime - cry2 Cry_Scyther - cry2 Cry_Jynx - cry2 Cry_Electabuzz - cry2 Cry_Magmar - cry2 Cry_Pinsir - cry2 Cry_Tauros - cry2 Cry_Magikarp - cry2 Cry_Gyarados - cry2 Cry_Lapras - cry2 Cry_Ditto - cry2 Cry_Eevee - cry2 Cry_Vaporeon - cry2 Cry_Jolteon - cry2 Cry_Flareon - cry2 Cry_Porygon - cry2 Cry_Omanyte - cry2 Cry_Omastar - cry2 Cry_Kabuto - cry2 Cry_Kabutops - cry2 Cry_Aerodactyl - cry2 Cry_Snorlax - cry2 Cry_Articuno - cry2 Cry_Zapdos - cry2 Cry_Moltres - cry2 Cry_Dratini - cry2 Cry_Dragonair - cry2 Cry_Dragonite - cry2 Cry_Mewtwo - cry2 Cry_Mew - cry2 Cry_Chikorita - cry2 Cry_Bayleef - cry2 Cry_Meganium - cry2 Cry_Cyndaquil - cry2 Cry_Quilava - cry2 Cry_Typhlosion - cry2 Cry_Totodile - cry2 Cry_Croconaw - cry2 Cry_Feraligatr - cry2 Cry_Sentret - cry2 Cry_Furret - cry2 Cry_Hoothoot - cry2 Cry_Noctowl - cry2 Cry_Ledyba - cry2 Cry_Ledian - cry2 Cry_Spinarak - cry2 Cry_Ariados - cry2 Cry_Crobat - cry2 Cry_Chinchou - cry2 Cry_Lanturn - cry2 Cry_Pichu - cry2 Cry_Cleffa - cry2 Cry_Igglybuff - cry2 Cry_Togepi - cry2 Cry_Togetic - cry2 Cry_Natu - cry2 Cry_Xatu - cry2 Cry_Mareep - cry2 Cry_Flaaffy - cry2 Cry_Ampharos - cry2 Cry_Bellossom - cry2 Cry_Marill - cry2 Cry_Azumarill - cry2 Cry_Sudowoodo - cry2 Cry_Politoed - cry2 Cry_Hoppip - cry2 Cry_Skiploom - cry2 Cry_Jumpluff - cry2 Cry_Aipom - cry2 Cry_Sunkern - cry2 Cry_Sunflora - cry2 Cry_Yanma - cry2 Cry_Wooper - cry2 Cry_Quagsire - cry2 Cry_Espeon - cry2 Cry_Umbreon - cry2 Cry_Murkrow - cry2 Cry_Slowking - cry2 Cry_Misdreavus - cry2 Cry_Unown - cry2 Cry_Wobbuffet - cry2 Cry_Girafarig - cry2 Cry_Pineco - cry2 Cry_Forretress - cry2 Cry_Dunsparce - cry2 Cry_Gligar - cry2 Cry_Steelix - cry2 Cry_Snubbull - cry2 Cry_Granbull - cry2 Cry_Qwilfish - cry2 Cry_Scizor - cry2 Cry_Shuckle - cry2 Cry_Heracross - cry2 Cry_Sneasel - cry2 Cry_Teddiursa - cry2 Cry_Ursaring - cry2 Cry_Slugma - cry2 Cry_Magcargo - cry2 Cry_Swinub - cry2 Cry_Piloswine - cry2 Cry_Corsola - cry2 Cry_Remoraid - cry2 Cry_Octillery - cry2 Cry_Delibird - cry2 Cry_Mantine - cry2 Cry_Skarmory - cry2 Cry_Houndour - cry2 Cry_Houndoom - cry2 Cry_Kingdra - cry2 Cry_Phanpy - cry2 Cry_Donphan - cry2 Cry_Porygon2 - cry2 Cry_Stantler - cry2 Cry_Smeargle - cry2 Cry_Tyrogue - cry2 Cry_Hitmontop - cry2 Cry_Smoochum - cry2 Cry_Elekid - cry2 Cry_Magby - cry2 Cry_Miltank - cry2 Cry_Blissey - cry2 Cry_Raikou - cry2 Cry_Entei - cry2 Cry_Suicune - cry2 Cry_Larvitar - cry2 Cry_Pupitar - cry2 Cry_Tyranitar - cry2 Cry_Lugia - cry2 Cry_HoOh - cry2 Cry_Celebi - cry2 Cry_Kecleon - cry2 Cry_Roselia - cry2 Cry_Torkoal - cry2 Cry_Electrike - cry2 Cry_Manectric - cry2 Cry_Duskull - cry2 Cry_Latias - cry2 Cry_Wynaut - cry2 Cry_Seviper - cry2 Cry_Sharpedo - cry2 Cry_Zangoose - cry2 Cry_Azurill - cry2 Cry_Swablu - cry2 Cry_Altaria - cry2 Cry_Unused265 - cry2 Cry_Taillow - cry2 Cry_Swellow - cry2 Cry_Unused268 - cry2 Cry_Spinda - cry2 Cry_Torchic - cry2 Cry_Combusken - cry2 Cry_Blaziken - cry2 Cry_Treecko - cry2 Cry_Grovyle - cry2 Cry_Sceptile - cry2 Cry_Mudkip - cry2 Cry_Marshtomp - cry2 Cry_Swampert - cry2 Cry_Pelipper - cry2 Cry_Wingull - cry2 Cry_Banette - cry2 Cry_Shuppet - cry2 Cry_Lotad - cry2 Cry_Lombre - cry2 Cry_Ludicolo - cry2 Cry_Seedot - cry2 Cry_Nuzleaf - cry2 Cry_Shiftry - cry2 Cry_Carvanha - cry2 Cry_Wurmple - cry2 Cry_Silcoon - cry2 Cry_Beautifly - cry2 Cry_Cascoon - cry2 Cry_Dustox - cry2 Cry_Ralts - cry2 Cry_Kirlia - cry2 Cry_Gardevoir - cry2 Cry_Slakoth - cry2 Cry_Vigoroth - cry2 Cry_Slaking - cry2 Cry_Nincada - cry2 Cry_Ninjask - cry2 Cry_Shedinja - cry2 Cry_Makuhita - cry2 Cry_Hariyama - cry2 Cry_Nosepass - cry2 Cry_Glalie - cry2 Cry_Plusle - cry2 Cry_Minun - cry2 Cry_Surskit - cry2 Cry_Masquerain - cry2 Cry_Skitty - cry2 Cry_Delcatty - cry2 Cry_Gulpin - cry2 Cry_Swalot - cry2 Cry_Numel - cry2 Cry_Camerupt - cry2 Cry_Barboach - cry2 Cry_Whiscash - cry2 Cry_Corphish - cry2 Cry_Crawdaunt - cry2 Cry_Spoink - cry2 Cry_Grumpig - cry2 Cry_Trapinch - cry2 Cry_Vibrava - cry2 Cry_Flygon - cry2 Cry_Cacnea - cry2 Cry_Cacturne - cry2 Cry_Baltoy - cry2 Cry_Claydol - cry2 Cry_Lunatone - cry2 Cry_Solrock - cry2 Cry_Feebas - cry2 Cry_Milotic - cry2 Cry_Absol - cry2 Cry_Meditite - cry2 Cry_Medicham - cry2 Cry_Spheal - cry2 Cry_Sealeo - cry2 Cry_Walrein - cry2 Cry_Clamperl - cry2 Cry_Huntail - cry2 Cry_Gorebyss - cry2 Cry_Lileep - cry2 Cry_Cradily - cry2 Cry_Anorith - cry2 Cry_Armaldo - cry2 Cry_Beldum - cry2 Cry_Metang - cry2 Cry_Metagross - cry2 Cry_Bagon - cry2 Cry_Shelgon - cry2 Cry_Regirock - cry2 Cry_Regice - cry2 Cry_Registeel - cry2 Cry_Castform - cry2 Cry_Volbeat - cry2 Cry_Illumise - cry2 Cry_Poochyena - cry2 Cry_Mightyena - cry2 Cry_Dusclops - cry2 Cry_Sableye - cry2 Cry_Mawile - cry2 Cry_Aron - cry2 Cry_Lairon - cry2 Cry_Aggron - cry2 Cry_Relicanth - cry2 Cry_Luvdisc - cry2 Cry_Groudon - cry2 Cry_Kyogre - cry2 Cry_Rayquaza - cry2 Cry_Salamence - cry2 Cry_Breloom - cry2 Cry_Shroomish - cry2 Cry_Linoone - cry2 Cry_Tropius - cry2 Cry_Wailmer - cry2 Cry_Zigzagoon - cry2 Cry_Exploud - cry2 Cry_Loudred - cry2 Cry_Wailord - cry2 Cry_Whismur - cry2 Cry_Snorunt - cry2 Cry_Latios - cry2 Cry_Jirachi - cry2 Cry_Deoxys - cry2 Cry_Chimecho +gCryTable_Reverse:: + cry_reverse Cry_Bulbasaur + cry_reverse Cry_Ivysaur + cry_reverse Cry_Venusaur + cry_reverse Cry_Charmander + cry_reverse Cry_Charmeleon + cry_reverse Cry_Charizard + cry_reverse Cry_Squirtle + cry_reverse Cry_Wartortle + cry_reverse Cry_Blastoise + cry_reverse Cry_Caterpie + cry_reverse Cry_Metapod + cry_reverse Cry_Butterfree + cry_reverse Cry_Weedle + cry_reverse Cry_Kakuna + cry_reverse Cry_Beedrill + cry_reverse Cry_Pidgey + cry_reverse Cry_Pidgeotto + cry_reverse Cry_Pidgeot + cry_reverse Cry_Rattata + cry_reverse Cry_Raticate + cry_reverse Cry_Spearow + cry_reverse Cry_Fearow + cry_reverse Cry_Ekans + cry_reverse Cry_Arbok + cry_reverse Cry_Pikachu + cry_reverse Cry_Raichu + cry_reverse Cry_Sandshrew + cry_reverse Cry_Sandslash + cry_reverse Cry_NidoranF + cry_reverse Cry_Nidorina + cry_reverse Cry_Nidoqueen + cry_reverse Cry_NidoranM + cry_reverse Cry_Nidorino + cry_reverse Cry_Nidoking + cry_reverse Cry_Clefairy + cry_reverse Cry_Clefable + cry_reverse Cry_Vulpix + cry_reverse Cry_Ninetales + cry_reverse Cry_Jigglypuff + cry_reverse Cry_Wigglytuff + cry_reverse Cry_Zubat + cry_reverse Cry_Golbat + cry_reverse Cry_Oddish + cry_reverse Cry_Gloom + cry_reverse Cry_Vileplume + cry_reverse Cry_Paras + cry_reverse Cry_Parasect + cry_reverse Cry_Venonat + cry_reverse Cry_Venomoth + cry_reverse Cry_Diglett + cry_reverse Cry_Dugtrio + cry_reverse Cry_Meowth + cry_reverse Cry_Persian + cry_reverse Cry_Psyduck + cry_reverse Cry_Golduck + cry_reverse Cry_Mankey + cry_reverse Cry_Primeape + cry_reverse Cry_Growlithe + cry_reverse Cry_Arcanine + cry_reverse Cry_Poliwag + cry_reverse Cry_Poliwhirl + cry_reverse Cry_Poliwrath + cry_reverse Cry_Abra + cry_reverse Cry_Kadabra + cry_reverse Cry_Alakazam + cry_reverse Cry_Machop + cry_reverse Cry_Machoke + cry_reverse Cry_Machamp + cry_reverse Cry_Bellsprout + cry_reverse Cry_Weepinbell + cry_reverse Cry_Victreebel + cry_reverse Cry_Tentacool + cry_reverse Cry_Tentacruel + cry_reverse Cry_Geodude + cry_reverse Cry_Graveler + cry_reverse Cry_Golem + cry_reverse Cry_Ponyta + cry_reverse Cry_Rapidash + cry_reverse Cry_Slowpoke + cry_reverse Cry_Slowbro + cry_reverse Cry_Magnemite + cry_reverse Cry_Magneton + cry_reverse Cry_Farfetchd + cry_reverse Cry_Doduo + cry_reverse Cry_Dodrio + cry_reverse Cry_Seel + cry_reverse Cry_Dewgong + cry_reverse Cry_Grimer + cry_reverse Cry_Muk + cry_reverse Cry_Shellder + cry_reverse Cry_Cloyster + cry_reverse Cry_Gastly + cry_reverse Cry_Haunter + cry_reverse Cry_Gengar + cry_reverse Cry_Onix + cry_reverse Cry_Drowzee + cry_reverse Cry_Hypno + cry_reverse Cry_Krabby + cry_reverse Cry_Kingler + cry_reverse Cry_Voltorb + cry_reverse Cry_Electrode + cry_reverse Cry_Exeggcute + cry_reverse Cry_Exeggutor + cry_reverse Cry_Cubone + cry_reverse Cry_Marowak + cry_reverse Cry_Hitmonlee + cry_reverse Cry_Hitmonchan + cry_reverse Cry_Lickitung + cry_reverse Cry_Koffing + cry_reverse Cry_Weezing + cry_reverse Cry_Rhyhorn + cry_reverse Cry_Rhydon + cry_reverse Cry_Chansey + cry_reverse Cry_Tangela + cry_reverse Cry_Kangaskhan + cry_reverse Cry_Horsea + cry_reverse Cry_Seadra + cry_reverse Cry_Goldeen + cry_reverse Cry_Seaking + cry_reverse Cry_Staryu + cry_reverse Cry_Starmie + cry_reverse Cry_MrMime + cry_reverse Cry_Scyther + cry_reverse Cry_Jynx + cry_reverse Cry_Electabuzz + cry_reverse Cry_Magmar + cry_reverse Cry_Pinsir + cry_reverse Cry_Tauros + cry_reverse Cry_Magikarp + cry_reverse Cry_Gyarados + cry_reverse Cry_Lapras + cry_reverse Cry_Ditto + cry_reverse Cry_Eevee + cry_reverse Cry_Vaporeon + cry_reverse Cry_Jolteon + cry_reverse Cry_Flareon + cry_reverse Cry_Porygon + cry_reverse Cry_Omanyte + cry_reverse Cry_Omastar + cry_reverse Cry_Kabuto + cry_reverse Cry_Kabutops + cry_reverse Cry_Aerodactyl + cry_reverse Cry_Snorlax + cry_reverse Cry_Articuno + cry_reverse Cry_Zapdos + cry_reverse Cry_Moltres + cry_reverse Cry_Dratini + cry_reverse Cry_Dragonair + cry_reverse Cry_Dragonite + cry_reverse Cry_Mewtwo + cry_reverse Cry_Mew + cry_reverse Cry_Chikorita + cry_reverse Cry_Bayleef + cry_reverse Cry_Meganium + cry_reverse Cry_Cyndaquil + cry_reverse Cry_Quilava + cry_reverse Cry_Typhlosion + cry_reverse Cry_Totodile + cry_reverse Cry_Croconaw + cry_reverse Cry_Feraligatr + cry_reverse Cry_Sentret + cry_reverse Cry_Furret + cry_reverse Cry_Hoothoot + cry_reverse Cry_Noctowl + cry_reverse Cry_Ledyba + cry_reverse Cry_Ledian + cry_reverse Cry_Spinarak + cry_reverse Cry_Ariados + cry_reverse Cry_Crobat + cry_reverse Cry_Chinchou + cry_reverse Cry_Lanturn + cry_reverse Cry_Pichu + cry_reverse Cry_Cleffa + cry_reverse Cry_Igglybuff + cry_reverse Cry_Togepi + cry_reverse Cry_Togetic + cry_reverse Cry_Natu + cry_reverse Cry_Xatu + cry_reverse Cry_Mareep + cry_reverse Cry_Flaaffy + cry_reverse Cry_Ampharos + cry_reverse Cry_Bellossom + cry_reverse Cry_Marill + cry_reverse Cry_Azumarill + cry_reverse Cry_Sudowoodo + cry_reverse Cry_Politoed + cry_reverse Cry_Hoppip + cry_reverse Cry_Skiploom + cry_reverse Cry_Jumpluff + cry_reverse Cry_Aipom + cry_reverse Cry_Sunkern + cry_reverse Cry_Sunflora + cry_reverse Cry_Yanma + cry_reverse Cry_Wooper + cry_reverse Cry_Quagsire + cry_reverse Cry_Espeon + cry_reverse Cry_Umbreon + cry_reverse Cry_Murkrow + cry_reverse Cry_Slowking + cry_reverse Cry_Misdreavus + cry_reverse Cry_Unown + cry_reverse Cry_Wobbuffet + cry_reverse Cry_Girafarig + cry_reverse Cry_Pineco + cry_reverse Cry_Forretress + cry_reverse Cry_Dunsparce + cry_reverse Cry_Gligar + cry_reverse Cry_Steelix + cry_reverse Cry_Snubbull + cry_reverse Cry_Granbull + cry_reverse Cry_Qwilfish + cry_reverse Cry_Scizor + cry_reverse Cry_Shuckle + cry_reverse Cry_Heracross + cry_reverse Cry_Sneasel + cry_reverse Cry_Teddiursa + cry_reverse Cry_Ursaring + cry_reverse Cry_Slugma + cry_reverse Cry_Magcargo + cry_reverse Cry_Swinub + cry_reverse Cry_Piloswine + cry_reverse Cry_Corsola + cry_reverse Cry_Remoraid + cry_reverse Cry_Octillery + cry_reverse Cry_Delibird + cry_reverse Cry_Mantine + cry_reverse Cry_Skarmory + cry_reverse Cry_Houndour + cry_reverse Cry_Houndoom + cry_reverse Cry_Kingdra + cry_reverse Cry_Phanpy + cry_reverse Cry_Donphan + cry_reverse Cry_Porygon2 + cry_reverse Cry_Stantler + cry_reverse Cry_Smeargle + cry_reverse Cry_Tyrogue + cry_reverse Cry_Hitmontop + cry_reverse Cry_Smoochum + cry_reverse Cry_Elekid + cry_reverse Cry_Magby + cry_reverse Cry_Miltank + cry_reverse Cry_Blissey + cry_reverse Cry_Raikou + cry_reverse Cry_Entei + cry_reverse Cry_Suicune + cry_reverse Cry_Larvitar + cry_reverse Cry_Pupitar + cry_reverse Cry_Tyranitar + cry_reverse Cry_Lugia + cry_reverse Cry_HoOh + cry_reverse Cry_Celebi + cry_reverse Cry_Kecleon + cry_reverse Cry_Roselia + cry_reverse Cry_Torkoal + cry_reverse Cry_Electrike + cry_reverse Cry_Manectric + cry_reverse Cry_Duskull + cry_reverse Cry_Latias + cry_reverse Cry_Wynaut + cry_reverse Cry_Seviper + cry_reverse Cry_Sharpedo + cry_reverse Cry_Zangoose + cry_reverse Cry_Azurill + cry_reverse Cry_Swablu + cry_reverse Cry_Altaria + cry_reverse Cry_Unused265 + cry_reverse Cry_Taillow + cry_reverse Cry_Swellow + cry_reverse Cry_Unused268 + cry_reverse Cry_Spinda + cry_reverse Cry_Torchic + cry_reverse Cry_Combusken + cry_reverse Cry_Blaziken + cry_reverse Cry_Treecko + cry_reverse Cry_Grovyle + cry_reverse Cry_Sceptile + cry_reverse Cry_Mudkip + cry_reverse Cry_Marshtomp + cry_reverse Cry_Swampert + cry_reverse Cry_Pelipper + cry_reverse Cry_Wingull + cry_reverse Cry_Banette + cry_reverse Cry_Shuppet + cry_reverse Cry_Lotad + cry_reverse Cry_Lombre + cry_reverse Cry_Ludicolo + cry_reverse Cry_Seedot + cry_reverse Cry_Nuzleaf + cry_reverse Cry_Shiftry + cry_reverse Cry_Carvanha + cry_reverse Cry_Wurmple + cry_reverse Cry_Silcoon + cry_reverse Cry_Beautifly + cry_reverse Cry_Cascoon + cry_reverse Cry_Dustox + cry_reverse Cry_Ralts + cry_reverse Cry_Kirlia + cry_reverse Cry_Gardevoir + cry_reverse Cry_Slakoth + cry_reverse Cry_Vigoroth + cry_reverse Cry_Slaking + cry_reverse Cry_Nincada + cry_reverse Cry_Ninjask + cry_reverse Cry_Shedinja + cry_reverse Cry_Makuhita + cry_reverse Cry_Hariyama + cry_reverse Cry_Nosepass + cry_reverse Cry_Glalie + cry_reverse Cry_Plusle + cry_reverse Cry_Minun + cry_reverse Cry_Surskit + cry_reverse Cry_Masquerain + cry_reverse Cry_Skitty + cry_reverse Cry_Delcatty + cry_reverse Cry_Gulpin + cry_reverse Cry_Swalot + cry_reverse Cry_Numel + cry_reverse Cry_Camerupt + cry_reverse Cry_Barboach + cry_reverse Cry_Whiscash + cry_reverse Cry_Corphish + cry_reverse Cry_Crawdaunt + cry_reverse Cry_Spoink + cry_reverse Cry_Grumpig + cry_reverse Cry_Trapinch + cry_reverse Cry_Vibrava + cry_reverse Cry_Flygon + cry_reverse Cry_Cacnea + cry_reverse Cry_Cacturne + cry_reverse Cry_Baltoy + cry_reverse Cry_Claydol + cry_reverse Cry_Lunatone + cry_reverse Cry_Solrock + cry_reverse Cry_Feebas + cry_reverse Cry_Milotic + cry_reverse Cry_Absol + cry_reverse Cry_Meditite + cry_reverse Cry_Medicham + cry_reverse Cry_Spheal + cry_reverse Cry_Sealeo + cry_reverse Cry_Walrein + cry_reverse Cry_Clamperl + cry_reverse Cry_Huntail + cry_reverse Cry_Gorebyss + cry_reverse Cry_Lileep + cry_reverse Cry_Cradily + cry_reverse Cry_Anorith + cry_reverse Cry_Armaldo + cry_reverse Cry_Beldum + cry_reverse Cry_Metang + cry_reverse Cry_Metagross + cry_reverse Cry_Bagon + cry_reverse Cry_Shelgon + cry_reverse Cry_Regirock + cry_reverse Cry_Regice + cry_reverse Cry_Registeel + cry_reverse Cry_Castform + cry_reverse Cry_Volbeat + cry_reverse Cry_Illumise + cry_reverse Cry_Poochyena + cry_reverse Cry_Mightyena + cry_reverse Cry_Dusclops + cry_reverse Cry_Sableye + cry_reverse Cry_Mawile + cry_reverse Cry_Aron + cry_reverse Cry_Lairon + cry_reverse Cry_Aggron + cry_reverse Cry_Relicanth + cry_reverse Cry_Luvdisc + cry_reverse Cry_Groudon + cry_reverse Cry_Kyogre + cry_reverse Cry_Rayquaza + cry_reverse Cry_Salamence + cry_reverse Cry_Breloom + cry_reverse Cry_Shroomish + cry_reverse Cry_Linoone + cry_reverse Cry_Tropius + cry_reverse Cry_Wailmer + cry_reverse Cry_Zigzagoon + cry_reverse Cry_Exploud + cry_reverse Cry_Loudred + cry_reverse Cry_Wailord + cry_reverse Cry_Whismur + cry_reverse Cry_Snorunt + cry_reverse Cry_Latios + cry_reverse Cry_Jirachi + cry_reverse Cry_Deoxys + cry_reverse Cry_Chimecho diff --git a/src/battle_anim_sound_tasks.c b/src/battle_anim_sound_tasks.c index 6068b0f33a..435c5dcdc6 100644 --- a/src/battle_anim_sound_tasks.c +++ b/src/battle_anim_sound_tasks.c @@ -168,7 +168,7 @@ void SoundTask_PlayCryHighPitch(u8 taskId) } if (species != SPECIES_NONE) - PlayCry3(species, pan, 3); + PlayCry3(species, pan, CRY_MODE_HIGH_PITCH); DestroyAnimVisualTask(taskId); } @@ -219,10 +219,10 @@ void SoundTask_PlayDoubleCry(u8 taskId) if (species != SPECIES_NONE) { - if (gBattleAnimArgs[1] == 0xFF) - PlayCry3(species, pan, 9); - else - PlayCry3(species, pan, 7); + if (gBattleAnimArgs[1] == DOUBLE_CRY_GROWL) + PlayCry3(species, pan, CRY_MODE_GROWL_1); + else // DOUBLE_CRY_ROAR + PlayCry3(species, pan, CRY_MODE_ROAR_1); gTasks[taskId].func = SoundTask_PlayDoubleCry_Step; } @@ -243,19 +243,19 @@ static void SoundTask_PlayDoubleCry_Step(u8 taskId) } else { - if (gTasks[taskId].data[0] == 0xFF) + if (gTasks[taskId].data[0] == DOUBLE_CRY_GROWL) { if (!IsCryPlaying()) { - PlayCry3(species, pan, 10); + PlayCry3(species, pan, CRY_MODE_GROWL_2); DestroyAnimVisualTask(taskId); } } - else + else // DOUBLE_CRY_ROAR { if (!IsCryPlaying()) { - PlayCry3(species, pan, 8); + PlayCry3(species, pan, CRY_MODE_ROAR_2); DestroyAnimVisualTask(taskId); } } @@ -302,10 +302,11 @@ static void SoundTask_PlayCryWithEcho_Step(u8 taskId) u16 species = gTasks[taskId].data[1]; s8 pan = gTasks[taskId].data[2]; + // Note the cases are not in order of execution switch (gTasks[taskId].data[9]) { case 2: - PlayCry6(species, pan, 4); + PlayCry6(species, pan, CRY_MODE_ECHO_END); gTasks[taskId].data[9]++; break; case 1: @@ -322,9 +323,9 @@ static void SoundTask_PlayCryWithEcho_Step(u8 taskId) break; default: if (gTasks[taskId].data[10] == 0) - PlayCry6(species, pan, 6); + PlayCry6(species, pan, CRY_MODE_ECHO_START); else - PlayCry3(species, pan, 6); + PlayCry3(species, pan, CRY_MODE_ECHO_START); DestroyAnimVisualTask(taskId); break; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 1660f6ec18..e45b0c64b7 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -1681,7 +1681,7 @@ static void LinkOpponentHandleFaintingCry(void) { u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, 25, 5); + PlayCry3(species, 25, CRY_MODE_FAINT); LinkOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index a9240b0ac7..ac65596878 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -1513,7 +1513,7 @@ static void LinkPartnerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, 5); + PlayCry3(species, -25, CRY_MODE_FAINT); LinkPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index ac330be76a..d0aaf01fac 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -1847,7 +1847,7 @@ static void OpponentHandleFaintingCry(void) { u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, 25, 5); + PlayCry3(species, 25, CRY_MODE_FAINT); OpponentBufferExecCompleted(); } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index f4e47b4347..34559541e6 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -2926,7 +2926,7 @@ static void PlayerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, 5); + PlayCry3(species, -25, CRY_MODE_FAINT); PlayerBufferExecCompleted(); } diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 91fea6cde2..863cdbdea8 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -1763,7 +1763,7 @@ static void PlayerPartnerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, 5); + PlayCry3(species, -25, CRY_MODE_FAINT); PlayerPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index c6e649508f..5394250ee1 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1621,7 +1621,7 @@ static void RecordedOpponentHandleFaintingCry(void) { u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, 25, 5); + PlayCry3(species, 25, CRY_MODE_FAINT); RecordedOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 93d059fe99..d634fca5d8 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -1644,7 +1644,7 @@ static void RecordedPlayerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, 5); + PlayCry3(species, -25, CRY_MODE_FAINT); RecordedPlayerBufferExecCompleted(); } diff --git a/src/intro.c b/src/intro.c index 5cf99c97e6..00cb42ac2d 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1925,7 +1925,7 @@ static void Task_Scene3_Groudon(u8 taskId) tScreenX = 80; tScreenY = 41; tDelay = 16; - PlayCryInternal(SPECIES_GROUDON, 0, 100, 10, 0); + PlayCryInternal(SPECIES_GROUDON, 0, 100, 10, CRY_MODE_NORMAL); tState++; } break; diff --git a/src/pokeball.c b/src/pokeball.c index 11f03eefed..4e7386f4f1 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -641,7 +641,7 @@ static void SpriteCB_BallThrow_Shake(struct Sprite *sprite) #define tCryTaskSpecies data[0] #define tCryTaskPan data[1] #define tCryTaskWantedCry data[2] -#define tCryTaskBattler data[3] +#define tCryTaskBattler data[3] #define tCryTaskMonSpriteId data[4] #define tCryTaskMonPtr1 data[5] #define tCryTaskMonPtr2 data[6] @@ -666,9 +666,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) break; case 1: if (ShouldPlayNormalMonCry(mon) == TRUE) - PlayCry3(species, pan, 0); + PlayCry3(species, pan, CRY_MODE_NORMAL); else - PlayCry3(species, pan, 11); + PlayCry3(species, pan, CRY_MODE_WEAK); gBattleSpritesDataPtr->healthBoxesData[battlerId].waitForCry = FALSE; DestroyTask(taskId); break; @@ -681,9 +681,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) if (gTasks[taskId].tCryTaskFrames == 0) { if (ShouldPlayNormalMonCry(mon) == TRUE) - PlayCry4(species, pan, 1); + PlayCry4(species, pan, CRY_MODE_DOUBLES); else - PlayCry4(species, pan, 12); + PlayCry4(species, pan, CRY_MODE_WEAK_DOUBLES); gBattleSpritesDataPtr->healthBoxesData[battlerId].waitForCry = FALSE; DestroyTask(taskId); @@ -720,9 +720,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) break; } if (ShouldPlayNormalMonCry(mon) == TRUE) - PlayCry4(species, pan, 0); + PlayCry4(species, pan, CRY_MODE_NORMAL); else - PlayCry4(species, pan, 11); + PlayCry4(species, pan, CRY_MODE_WEAK); gBattleSpritesDataPtr->healthBoxesData[battlerId].waitForCry = FALSE; DestroyTask(taskId); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 5a48586200..ca31a0045a 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3929,9 +3929,9 @@ static void PlayMonCry(void) if (!summary->isEgg) { if (ShouldPlayNormalMonCry(&sMonSummaryScreen->currentMon) == TRUE) - PlayCry3(summary->species2, 0, 0); + PlayCry3(summary->species2, 0, CRY_MODE_NORMAL); else - PlayCry3(summary->species2, 0, 11); + PlayCry3(summary->species2, 0, CRY_MODE_WEAK); } } diff --git a/src/sound.c b/src/sound.c index 8c3cd39978..ee5113f890 100644 --- a/src/sound.c +++ b/src/sound.c @@ -26,7 +26,7 @@ static u16 sFanfareCounter; bool8 gDisableMusic; extern struct ToneData gCryTable[]; -extern struct ToneData gCryTable2[]; +extern struct ToneData gCryTable_Reverse[]; static void Task_Fanfare(u8 taskId); static void CreateFanfareTask(void); @@ -303,21 +303,21 @@ bool8 IsBGMStopped(void) void PlayCry1(u16 species, s8 pan) { m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); - PlayCryInternal(species, pan, CRY_VOLUME, 10, 0); + PlayCryInternal(species, pan, CRY_VOLUME, 10, CRY_MODE_NORMAL); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); } void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority) { - PlayCryInternal(species, pan, volume, priority, 0); + PlayCryInternal(species, pan, volume, priority, CRY_MODE_NORMAL); } void PlayCry3(u16 species, s8 pan, u8 mode) { - if (mode == 1) + if (mode == CRY_MODE_DOUBLES) { - PlayCryInternal(species, pan, CRY_VOLUME, 10, 1); + PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); } else { @@ -330,9 +330,9 @@ void PlayCry3(u16 species, s8 pan, u8 mode) void PlayCry4(u16 species, s8 pan, u8 mode) { - if (mode == 1) + if (mode == CRY_MODE_DOUBLES) { - PlayCryInternal(species, pan, CRY_VOLUME, 10, 1); + PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); } else { @@ -344,9 +344,9 @@ void PlayCry4(u16 species, s8 pan, u8 mode) void PlayCry6(u16 species, s8 pan, u8 mode) // not present in R/S { - if (mode == 1) + if (mode == CRY_MODE_DOUBLES) { - PlayCryInternal(species, pan, CRY_VOLUME, 10, 1); + PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); } else { @@ -366,7 +366,7 @@ void PlayCry5(u16 species, u8 mode) void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) { - bool32 v0; + bool32 reverse; u32 release; u32 length; u32 pitch; @@ -375,76 +375,80 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) u8 table; species--; + + // Set default values + // May be overridden depending on mode. length = 140; - v0 = FALSE; + reverse = FALSE; release = 0; pitch = 15360; chorus = 0; switch (mode) { - case 0: + case CRY_MODE_NORMAL: break; - case 1: + case CRY_MODE_DOUBLES: length = 20; release = 225; break; - case 2: + case CRY_MODE_ENCOUNTER: release = 225; pitch = 15600; chorus = 20; volume = 90; break; - case 3: + case CRY_MODE_HIGH_PITCH: length = 50; release = 200; pitch = 15800; chorus = 20; volume = 90; break; - case 4: + case CRY_MODE_ECHO_END: length = 25; - v0 = TRUE; + reverse = TRUE; release = 100; pitch = 15600; chorus = 192; volume = 90; break; - case 5: + case CRY_MODE_FAINT: release = 200; pitch = 14440; break; - case 6: + case CRY_MODE_ECHO_START: release = 220; pitch = 15555; chorus = 192; volume = 70; break; - case 7: + case CRY_MODE_ROAR_1: length = 10; release = 100; pitch = 14848; break; - case 8: + case CRY_MODE_ROAR_2: length = 60; release = 225; pitch = 15616; break; - case 9: + case CRY_MODE_GROWL_1: length = 15; - v0 = TRUE; + reverse = TRUE; release = 125; pitch = 15200; break; - case 10: + case CRY_MODE_GROWL_2: length = 100; release = 225; pitch = 15200; break; - case 12: + case CRY_MODE_WEAK_DOUBLES: length = 20; release = 225; - case 11: + // fallthrough + case CRY_MODE_WEAK: pitch = 15000; break; } @@ -463,26 +467,26 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) // If you wish to expand pokemon, you need to // append new cases to the switch. species = SpeciesToCryId(species); - index = species & 0x7F; + index = species % 128; table = species / 128; switch (table) { case 0: gMPlay_PokemonCry = SetPokemonCryTone( - v0 ? &gCryTable2[(128 * 0) + index] : &gCryTable[(128 * 0) + index]); + reverse ? &gCryTable_Reverse[(128 * 0) + index] : &gCryTable[(128 * 0) + index]); break; case 1: gMPlay_PokemonCry = SetPokemonCryTone( - v0 ? &gCryTable2[(128 * 1) + index] : &gCryTable[(128 * 1) + index]); + reverse ? &gCryTable_Reverse[(128 * 1) + index] : &gCryTable[(128 * 1) + index]); break; case 2: gMPlay_PokemonCry = SetPokemonCryTone( - v0 ? &gCryTable2[(128 * 2) + index] : &gCryTable[(128 * 2) + index]); + reverse ? &gCryTable_Reverse[(128 * 2) + index] : &gCryTable[(128 * 2) + index]); break; case 3: gMPlay_PokemonCry = SetPokemonCryTone( - v0 ? &gCryTable2[(128 * 3) + index] : &gCryTable[(128 * 3) + index]); + reverse ? &gCryTable_Reverse[(128 * 3) + index] : &gCryTable[(128 * 3) + index]); break; } } From c4169cfd290dcf7703b79debd66142b277af5613 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 7 Nov 2021 13:54:44 -0500 Subject: [PATCH 152/417] Disambiguate cry functions --- data/battle_anim_scripts.s | 4 +- include/constants/sound.h | 7 ++++ include/sound.h | 12 +++--- src/battle_anim_sound_tasks.c | 47 +++++++++++++-------- src/battle_controller_link_opponent.c | 2 +- src/battle_controller_link_partner.c | 2 +- src/battle_controller_opponent.c | 2 +- src/battle_controller_player.c | 2 +- src/battle_controller_player_partner.c | 2 +- src/battle_controller_recorded_opponent.c | 2 +- src/battle_controller_recorded_player.c | 2 +- src/battle_controller_safari.c | 2 +- src/battle_controller_wally.c | 4 +- src/contest_util.c | 2 +- src/evolution_scene.c | 2 +- src/field_effect.c | 24 +++++------ src/hall_of_fame.c | 2 +- src/intro.c | 4 +- src/overworld.c | 2 +- src/pokeball.c | 15 ++++--- src/pokeblock_feed.c | 2 +- src/pokedex.c | 4 +- src/pokedex_cry_screen.c | 2 +- src/pokemon.c | 4 +- src/pokemon_summary_screen.c | 4 +- src/rayquaza_scene.c | 2 +- src/roulette.c | 10 ++--- src/scrcmd.c | 2 +- src/sound.c | 50 ++++++++++++----------- src/starter_choose.c | 2 +- src/trade.c | 4 +- 31 files changed, 125 insertions(+), 102 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index aea55fcd17..7e970ed176 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -8500,11 +8500,11 @@ Move_BLAZE_KICK: Move_HYPER_VOICE: loadspritegfx ANIM_TAG_THIN_RING - createvisualtask SoundTask_PlayCryWithEcho, 5, 0 + createvisualtask SoundTask_PlayCryWithEcho, 5, FALSE call HyperVoiceEffect waitforvisualfinish delay 8 - createvisualtask SoundTask_PlayCryWithEcho, 5, 1 + createvisualtask SoundTask_PlayCryWithEcho, 5, TRUE call HyperVoiceEffect waitforvisualfinish end diff --git a/include/constants/sound.h b/include/constants/sound.h index 82cc4ffac3..40c3b7d58f 100644 --- a/include/constants/sound.h +++ b/include/constants/sound.h @@ -38,4 +38,11 @@ #define DOUBLE_CRY_ROAR 2 #define DOUBLE_CRY_GROWL 255 +#define CRY_PRIORITY_NORMAL 10 +#define CRY_PRIORITY_AMBIENT 1 + +// Cry volume was changed from 125 in R/S to 120 for FRLG/Em, but was (accidentally?) not updated outside of sound.c +#define CRY_VOLUME 120 +#define CRY_VOLUME_RS 125 + #endif // GUARD_CONSTANTS_SOUND_H diff --git a/include/sound.h b/include/sound.h index 5b34b69ba7..a5463a4561 100644 --- a/include/sound.h +++ b/include/sound.h @@ -25,12 +25,12 @@ bool8 IsBGMPausedOrStopped(void); void FadeInBGM(u8 speed); void FadeOutBGM(u8 speed); bool8 IsBGMStopped(void); -void PlayCry1(u16 species, s8 pan); -void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority); -void PlayCry3(u16 species, s8 pan, u8 mode); -void PlayCry4(u16 species, s8 pan, u8 mode); -void PlayCry5(u16 species, u8 mode); -void PlayCry6(u16 species, s8 pan, u8 mode); +void PlayCry_Normal(u16 species, s8 pan); +void PlayCry_NormalNoDucking(u16 species, s8 pan, s8 volume, u8 priority); +void PlayCry_ByMode(u16 species, s8 pan, u8 mode); +void PlayCry_ReleaseDouble(u16 species, s8 pan, u8 mode); +void PlayCry_Script(u16 species, u8 mode); +void PlayCry_DuckNoRestore(u16 species, s8 pan, u8 mode); void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode); bool8 IsCryFinished(void); void StopCryAndClearCrySongs(void); diff --git a/src/battle_anim_sound_tasks.c b/src/battle_anim_sound_tasks.c index 435c5dcdc6..7180041b32 100644 --- a/src/battle_anim_sound_tasks.c +++ b/src/battle_anim_sound_tasks.c @@ -168,7 +168,7 @@ void SoundTask_PlayCryHighPitch(u8 taskId) } if (species != SPECIES_NONE) - PlayCry3(species, pan, CRY_MODE_HIGH_PITCH); + PlayCry_ByMode(species, pan, CRY_MODE_HIGH_PITCH); DestroyAnimVisualTask(taskId); } @@ -220,9 +220,9 @@ void SoundTask_PlayDoubleCry(u8 taskId) if (species != SPECIES_NONE) { if (gBattleAnimArgs[1] == DOUBLE_CRY_GROWL) - PlayCry3(species, pan, CRY_MODE_GROWL_1); + PlayCry_ByMode(species, pan, CRY_MODE_GROWL_1); else // DOUBLE_CRY_ROAR - PlayCry3(species, pan, CRY_MODE_ROAR_1); + PlayCry_ByMode(species, pan, CRY_MODE_ROAR_1); gTasks[taskId].func = SoundTask_PlayDoubleCry_Step; } @@ -247,7 +247,7 @@ static void SoundTask_PlayDoubleCry_Step(u8 taskId) { if (!IsCryPlaying()) { - PlayCry3(species, pan, CRY_MODE_GROWL_2); + PlayCry_ByMode(species, pan, CRY_MODE_GROWL_2); DestroyAnimVisualTask(taskId); } } @@ -255,7 +255,7 @@ static void SoundTask_PlayDoubleCry_Step(u8 taskId) { if (!IsCryPlaying()) { - PlayCry3(species, pan, CRY_MODE_ROAR_2); + PlayCry_ByMode(species, pan, CRY_MODE_ROAR_2); DestroyAnimVisualTask(taskId); } } @@ -275,12 +275,18 @@ void SoundTask_WaitForCry(u8 taskId) } } + +#define tSpecies data[1] +#define tPan data[2] +#define tState data[9] +#define tLastCry data[10] // If it's not the last cry, don't try to restore the BGM, because another is coming + void SoundTask_PlayCryWithEcho(u8 taskId) { u16 species; s8 pan; - gTasks[taskId].data[10] = gBattleAnimArgs[0]; + gTasks[taskId].tLastCry = gBattleAnimArgs[0]; pan = BattleAnimAdjustPanning(SOUND_PAN_ATTACKER); if (IsContest()) @@ -288,8 +294,8 @@ void SoundTask_PlayCryWithEcho(u8 taskId) else species = gAnimBattlerSpecies[gBattleAnimAttacker]; - gTasks[taskId].data[1] = species; - gTasks[taskId].data[2] = pan; + gTasks[taskId].tSpecies = species; + gTasks[taskId].tPan = pan; if (species != SPECIES_NONE) gTasks[taskId].func = SoundTask_PlayCryWithEcho_Step; @@ -299,39 +305,44 @@ void SoundTask_PlayCryWithEcho(u8 taskId) static void SoundTask_PlayCryWithEcho_Step(u8 taskId) { - u16 species = gTasks[taskId].data[1]; - s8 pan = gTasks[taskId].data[2]; + u16 species = gTasks[taskId].tSpecies; + s8 pan = gTasks[taskId].tPan; // Note the cases are not in order of execution - switch (gTasks[taskId].data[9]) + switch (gTasks[taskId].tState) { case 2: - PlayCry6(species, pan, CRY_MODE_ECHO_END); - gTasks[taskId].data[9]++; + PlayCry_DuckNoRestore(species, pan, CRY_MODE_ECHO_END); + gTasks[taskId].tState++; break; case 1: case 3: case 4: - gTasks[taskId].data[9]++; + gTasks[taskId].tState++; break; case 5: if (IsCryPlaying()) break; case 0: StopCryAndClearCrySongs(); - gTasks[taskId].data[9]++; + gTasks[taskId].tState++; break; default: - if (gTasks[taskId].data[10] == 0) - PlayCry6(species, pan, CRY_MODE_ECHO_START); + if (!gTasks[taskId].tLastCry) + PlayCry_DuckNoRestore(species, pan, CRY_MODE_ECHO_START); else - PlayCry3(species, pan, CRY_MODE_ECHO_START); + PlayCry_ByMode(species, pan, CRY_MODE_ECHO_START); DestroyAnimVisualTask(taskId); break; } } +#undef tSpecies +#undef tPan +#undef tState +#undef tLastCry + void SoundTask_PlaySE1WithPanning(u8 taskId) { u16 songId = gBattleAnimArgs[0]; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index e45b0c64b7..efc3270911 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -1681,7 +1681,7 @@ static void LinkOpponentHandleFaintingCry(void) { u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, 25, CRY_MODE_FAINT); + PlayCry_ByMode(species, 25, CRY_MODE_FAINT); LinkOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index ac65596878..682618c07a 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -1513,7 +1513,7 @@ static void LinkPartnerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, CRY_MODE_FAINT); + PlayCry_ByMode(species, -25, CRY_MODE_FAINT); LinkPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index d0aaf01fac..2bea4183bf 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -1847,7 +1847,7 @@ static void OpponentHandleFaintingCry(void) { u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, 25, CRY_MODE_FAINT); + PlayCry_ByMode(species, 25, CRY_MODE_FAINT); OpponentBufferExecCompleted(); } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 34559541e6..02dc7ce294 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -2926,7 +2926,7 @@ static void PlayerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, CRY_MODE_FAINT); + PlayCry_ByMode(species, -25, CRY_MODE_FAINT); PlayerBufferExecCompleted(); } diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 863cdbdea8..745354795c 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -1763,7 +1763,7 @@ static void PlayerPartnerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, CRY_MODE_FAINT); + PlayCry_ByMode(species, -25, CRY_MODE_FAINT); PlayerPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 5394250ee1..0af395693c 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1621,7 +1621,7 @@ static void RecordedOpponentHandleFaintingCry(void) { u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, 25, CRY_MODE_FAINT); + PlayCry_ByMode(species, 25, CRY_MODE_FAINT); RecordedOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index d634fca5d8..264e273449 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -1644,7 +1644,7 @@ static void RecordedPlayerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, CRY_MODE_FAINT); + PlayCry_ByMode(species, -25, CRY_MODE_FAINT); RecordedPlayerBufferExecCompleted(); } diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c index a26f31b929..78a57a0f79 100644 --- a/src/battle_controller_safari.c +++ b/src/battle_controller_safari.c @@ -616,7 +616,7 @@ static void SafariHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry1(species, 25); + PlayCry_Normal(species, 25); SafariBufferExecCompleted(); } diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index d018fe1c01..29e8d2b7d8 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -1415,7 +1415,9 @@ static void WallyHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry1(species, 25); + // Seems that it doesn't bother using CRY_MODE_FAINT because + // Wally's Pokémon during the tutorial is never intended to faint. + PlayCry_Normal(species, 25); WallyBufferExecCompleted(); } diff --git a/src/contest_util.c b/src/contest_util.c index e1c95d4a2f..5f23231ac5 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -1578,7 +1578,7 @@ static void SpriteCB_WinnerMonSlideIn(struct Sprite *sprite) { if (++sprite->data[0] == 10) { - PlayCry1(sprite->data[1], 0); + PlayCry_Normal(sprite->data[1], 0); sprite->data[1] = 0; } } diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 1d583343f8..99ff268213 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -1094,7 +1094,7 @@ static void Task_TradeEvolutionScene(u8 taskId) case T_EVOSTATE_INTRO_CRY: if (!IsTextPrinterActive(0)) { - PlayCry1(gTasks[taskId].tPreEvoSpecies, 0); + PlayCry_Normal(gTasks[taskId].tPreEvoSpecies, 0); gTasks[taskId].tState++; } break; diff --git a/src/field_effect.c b/src/field_effect.c index 7e1ebdff4d..3d0c179be9 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -2565,15 +2565,17 @@ bool8 FldEff_FieldMoveShowMon(void) return FALSE; } +#define SHOW_MON_CRY_NO_DUCKING (1 << 31) + bool8 FldEff_FieldMoveShowMonInit(void) { struct Pokemon *pokemon; - u32 flag = gFieldEffectArguments[0] & 0x80000000; + bool32 noDucking = gFieldEffectArguments[0] & SHOW_MON_CRY_NO_DUCKING; pokemon = &gPlayerParty[(u8)gFieldEffectArguments[0]]; gFieldEffectArguments[0] = GetMonData(pokemon, MON_DATA_SPECIES); gFieldEffectArguments[1] = GetMonData(pokemon, MON_DATA_OT_ID); gFieldEffectArguments[2] = GetMonData(pokemon, MON_DATA_PERSONALITY); - gFieldEffectArguments[0] |= flag; + gFieldEffectArguments[0] |= noDucking; FieldEffectStart(FLDEFF_FIELD_MOVE_SHOW_MON); FieldEffectActiveListRemove(FLDEFF_FIELD_MOVE_SHOW_MON_INIT); return FALSE; @@ -2913,17 +2915,17 @@ static bool8 SlideIndoorBannerOffscreen(struct Task *task) static u8 InitFieldMoveMonSprite(u32 species, u32 otId, u32 personality) { - u16 v0; + bool16 noDucking; u8 monSprite; struct Sprite *sprite; - v0 = (species & 0x80000000) >> 16; - species &= 0x7fffffff; + noDucking = (species & SHOW_MON_CRY_NO_DUCKING) >> 16; + species &= ~SHOW_MON_CRY_NO_DUCKING; monSprite = CreateMonSprite_FieldMove(species, otId, personality, 320, 80, 0); sprite = &gSprites[monSprite]; sprite->callback = SpriteCallbackDummy; sprite->oam.priority = 0; sprite->sSpecies = species; - sprite->data[6] = v0; + sprite->data[6] = noDucking; return monSprite; } @@ -2935,13 +2937,9 @@ static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite *sprite) sprite->sOnscreenTimer = 30; sprite->callback = SpriteCB_FieldMoveMonWaitAfterCry; if (sprite->data[6]) - { - PlayCry2(sprite->sSpecies, 0, 0x7d, 0xa); - } + PlayCry_NormalNoDucking(sprite->sSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); else - { - PlayCry1(sprite->sSpecies, 0); - } + PlayCry_Normal(sprite->sSpecies, 0); } } @@ -3021,7 +3019,7 @@ static void SurfFieldEffect_ShowMon(struct Task *task) objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; if (ObjectEventCheckHeldMovementStatus(objectEvent)) { - gFieldEffectArguments[0] = task->tMonId | 0x80000000; + gFieldEffectArguments[0] = task->tMonId | SHOW_MON_CRY_NO_DUCKING; FieldEffectStart(FLDEFF_FIELD_MOVE_SHOW_MON_INIT); task->tState++; } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 8d69b03bc9..8c10d1400b 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -983,7 +983,7 @@ static void Task_HofPC_PrintMonInfo(u8 taskId) if (currMon->species != SPECIES_EGG) { StopCryAndClearCrySongs(); - PlayCry1(currMon->species, 0); + PlayCry_Normal(currMon->species, 0); } HallOfFame_PrintMonInfo(currMon, 0, 14); diff --git a/src/intro.c b/src/intro.c index 00cb42ac2d..3e805dca4c 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1925,7 +1925,7 @@ static void Task_Scene3_Groudon(u8 taskId) tScreenX = 80; tScreenY = 41; tDelay = 16; - PlayCryInternal(SPECIES_GROUDON, 0, 100, 10, CRY_MODE_NORMAL); + PlayCryInternal(SPECIES_GROUDON, 0, 100, CRY_PRIORITY_NORMAL, CRY_MODE_NORMAL); tState++; } break; @@ -2127,7 +2127,7 @@ static void Task_Scene3_Kyogre(u8 taskId) { tDelay = 1; tState++; - PlayCryInternal(SPECIES_KYOGRE, 0, 120, 10, 0); + PlayCryInternal(SPECIES_KYOGRE, 0, 120, CRY_PRIORITY_NORMAL, CRY_MODE_NORMAL); } } break; diff --git a/src/overworld.c b/src/overworld.c index 8b32b286c2..0e1c211c11 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -1254,7 +1254,7 @@ static void PlayAmbientCry(void) return; pan = (Random() % 88) + 212; volume = (Random() % 30) + 50; - PlayCry2(sAmbientCrySpecies, pan, volume, 1); + PlayCry_NormalNoDucking(sAmbientCrySpecies, pan, volume, CRY_PRIORITY_AMBIENT); } void UpdateAmbientCry(s16 *state, u16 *delayCounter) diff --git a/src/pokeball.c b/src/pokeball.c index 4e7386f4f1..a0800d38fc 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -665,10 +665,11 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) gTasks[taskId].tCryTaskState = wantedCry + 1; break; case 1: + // Play single cry if (ShouldPlayNormalMonCry(mon) == TRUE) - PlayCry3(species, pan, CRY_MODE_NORMAL); + PlayCry_ByMode(species, pan, CRY_MODE_NORMAL); else - PlayCry3(species, pan, CRY_MODE_WEAK); + PlayCry_ByMode(species, pan, CRY_MODE_WEAK); gBattleSpritesDataPtr->healthBoxesData[battlerId].waitForCry = FALSE; DestroyTask(taskId); break; @@ -680,10 +681,11 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) case 20: if (gTasks[taskId].tCryTaskFrames == 0) { + // Play first doubles cry if (ShouldPlayNormalMonCry(mon) == TRUE) - PlayCry4(species, pan, CRY_MODE_DOUBLES); + PlayCry_ReleaseDouble(species, pan, CRY_MODE_DOUBLES); else - PlayCry4(species, pan, CRY_MODE_WEAK_DOUBLES); + PlayCry_ReleaseDouble(species, pan, CRY_MODE_WEAK_DOUBLES); gBattleSpritesDataPtr->healthBoxesData[battlerId].waitForCry = FALSE; DestroyTask(taskId); @@ -719,10 +721,11 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) gTasks[taskId].tCryTaskFrames--; break; } + // Play second doubles cry if (ShouldPlayNormalMonCry(mon) == TRUE) - PlayCry4(species, pan, CRY_MODE_NORMAL); + PlayCry_ReleaseDouble(species, pan, CRY_MODE_NORMAL); else - PlayCry4(species, pan, CRY_MODE_WEAK); + PlayCry_ReleaseDouble(species, pan, CRY_MODE_WEAK); gBattleSpritesDataPtr->healthBoxesData[battlerId].waitForCry = FALSE; DestroyTask(taskId); diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index da9b7767cd..98a76421c1 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -945,7 +945,7 @@ static void SpriteCB_MonJumpForPokeblock(struct Sprite* sprite) // Play cry at jump peak if (sprite->sSpeed == 0) - PlayCry1(sprite->sSpecies, 0); + PlayCry_Normal(sprite->sSpecies, 0); if (sprite->sSpeed == 9) sprite->callback = SpriteCallbackDummy; diff --git a/src/pokedex.c b/src/pokedex.c index 8a85762436..91ca5887e1 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3309,7 +3309,7 @@ static void Task_LoadInfoScreen(u8 taskId) if (!gTasks[taskId].tSkipCry) { StopCryAndClearCrySongs(); - PlayCry2(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), 0, 125, 10); + PlayCry_NormalNoDucking(NationalPokedexNumToSpecies(sPokedexListItem->dexNum), 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); } else { @@ -4010,7 +4010,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) case 6: if (!gPaletteFade.active) { - PlayCry1(NationalPokedexNumToSpecies(dexNum), 0); + PlayCry_Normal(NationalPokedexNumToSpecies(dexNum), 0); gTasks[taskId].tPalTimer = 0; gTasks[taskId].func = Task_HandleCaughtMonPageInput; } diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c index 350946f3b2..d62cf86cb9 100644 --- a/src/pokedex_cry_screen.c +++ b/src/pokedex_cry_screen.c @@ -345,7 +345,7 @@ void CryScreenPlayButton(u16 species) static void PlayCryScreenCry(u16 species) { - PlayCry2(species, 0, 125, 10); + PlayCry_NormalNoDucking(species, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); sDexCryScreen->cryState = 1; } diff --git a/src/pokemon.c b/src/pokemon.c index 0f943734b8..1607e1a40f 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6690,14 +6690,14 @@ void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, { // No animation, only check if cry needs to be played if (!noCry) - PlayCry1(species, pan); + PlayCry_Normal(species, pan); sprite->callback = SpriteCallbackDummy; } else { if (!noCry) { - PlayCry1(species, pan); + PlayCry_Normal(species, pan); if (HasTwoFramesAnimation(species)) StartSpriteAnim(sprite, 1); } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index ca31a0045a..72289fa759 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3929,9 +3929,9 @@ static void PlayMonCry(void) if (!summary->isEgg) { if (ShouldPlayNormalMonCry(&sMonSummaryScreen->currentMon) == TRUE) - PlayCry3(summary->species2, 0, CRY_MODE_NORMAL); + PlayCry_ByMode(summary->species2, 0, CRY_MODE_NORMAL); else - PlayCry3(summary->species2, 0, CRY_MODE_WEAK); + PlayCry_ByMode(summary->species2, 0, CRY_MODE_WEAK); } } diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c index 642fe6233b..7dfe141c11 100644 --- a/src/rayquaza_scene.c +++ b/src/rayquaza_scene.c @@ -3064,7 +3064,7 @@ static void SpriteCB_ChasesAway_Rayquaza(struct Sprite *sprite) ChasesAway_SetRayquazaAnim(sprite, 3, 48, 16); sprite->x2 = 1; gSprites[sprite->sTailSpriteId].x2 = 1; - PlayCry1(SPECIES_RAYQUAZA, 0); + PlayCry_Normal(SPECIES_RAYQUAZA, 0); CreateTask(Task_ChasesAway_AnimateRing, 0); } else diff --git a/src/roulette.c b/src/roulette.c index ea0f9332b4..6c1dce1edf 100644 --- a/src/roulette.c +++ b/src/roulette.c @@ -4449,13 +4449,13 @@ static void SetBallStuck(struct Sprite *sprite) if (sRoulette->useTaillow) { if (sprite->sStuckOnWheelLeft) - PlayCry1(SPECIES_TAILLOW, -63); + PlayCry_Normal(SPECIES_TAILLOW, -63); else - PlayCry1(SPECIES_TAILLOW, 63); + PlayCry_Normal(SPECIES_TAILLOW, 63); } else { - PlayCry1(SPECIES_SHROOMISH, -63); + PlayCry_Normal(SPECIES_SHROOMISH, -63); } slotsToSkip = 2; @@ -4719,9 +4719,9 @@ static void SpriteCB_Taillow_FlyIn(struct Sprite *sprite) { m4aSongNumStartOrChange(SE_TAILLOW_WING_FLAP); if (sRoulette->ball->sStuckOnWheelLeft == 0) - PlayCry1(SPECIES_TAILLOW, 63); + PlayCry_Normal(SPECIES_TAILLOW, 63); else - PlayCry1(SPECIES_TAILLOW, -63); + PlayCry_Normal(SPECIES_TAILLOW, -63); StartSpriteAnim(sprite, sRoulette->ball->sStuckOnWheelLeft + 2); sprite->data[1] = 45; sprite->callback = SpriteCB_Taillow_PickUpBall; diff --git a/src/scrcmd.c b/src/scrcmd.c index 57f133d0d9..1fe8e6338f 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2026,7 +2026,7 @@ bool8 ScrCmd_playmoncry(struct ScriptContext *ctx) u16 species = VarGet(ScriptReadHalfword(ctx)); u16 mode = VarGet(ScriptReadHalfword(ctx)); - PlayCry5(species, mode); + PlayCry_Script(species, mode); return FALSE; } diff --git a/src/sound.c b/src/sound.c index ee5113f890..c2a8c9e8c8 100644 --- a/src/sound.c +++ b/src/sound.c @@ -54,8 +54,6 @@ static const struct Fanfare sFanfares[] = { [FANFARE_REGISTER_MATCH_CALL] = { MUS_REGISTER_MATCH_CALL, 135 }, }; -#define CRY_VOLUME 120 // was 125 in R/S - void InitMapMusic(void) { gDisableMusic = FALSE; @@ -300,66 +298,69 @@ bool8 IsBGMStopped(void) return FALSE; } -void PlayCry1(u16 species, s8 pan) +void PlayCry_Normal(u16 species, s8 pan) { m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); - PlayCryInternal(species, pan, CRY_VOLUME, 10, CRY_MODE_NORMAL); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, CRY_MODE_NORMAL); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); } -void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority) +void PlayCry_NormalNoDucking(u16 species, s8 pan, s8 volume, u8 priority) { PlayCryInternal(species, pan, volume, priority, CRY_MODE_NORMAL); } -void PlayCry3(u16 species, s8 pan, u8 mode) +// Assuming it's not CRY_MODE_DOUBLES, this is equivalent to PlayCry_Normal except it allows other modes. +void PlayCry_ByMode(u16 species, s8 pan, u8 mode) { if (mode == CRY_MODE_DOUBLES) { - PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); } else { m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); - PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); } } -void PlayCry4(u16 species, s8 pan, u8 mode) +// Used when releasing multiple Pokémon at once in battle. +void PlayCry_ReleaseDouble(u16 species, s8 pan, u8 mode) { if (mode == CRY_MODE_DOUBLES) { - PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); } else { if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); - PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); } } -void PlayCry6(u16 species, s8 pan, u8 mode) // not present in R/S +// Duck the BGM but don't restore it. Not present in R/S +void PlayCry_DuckNoRestore(u16 species, s8 pan, u8 mode) { if (mode == CRY_MODE_DOUBLES) { - PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); } else { m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); - PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); gPokemonCryBGMDuckingCounter = 2; } } -void PlayCry5(u16 species, u8 mode) +void PlayCry_Script(u16 species, u8 mode) { m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); - PlayCryInternal(species, 0, CRY_VOLUME, 10, mode); + PlayCryInternal(species, 0, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); } @@ -470,25 +471,26 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) index = species % 128; table = species / 128; + #define GET_CRY(speciesIndex, tableId, reversed) \ + ((reversed) ? &gCryTable_Reverse[(128 * (tableId)) + (speciesIndex)] : &gCryTable[(128 * (tableId)) + (speciesIndex)]) + switch (table) { case 0: - gMPlay_PokemonCry = SetPokemonCryTone( - reverse ? &gCryTable_Reverse[(128 * 0) + index] : &gCryTable[(128 * 0) + index]); + gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 0, reverse)); break; case 1: - gMPlay_PokemonCry = SetPokemonCryTone( - reverse ? &gCryTable_Reverse[(128 * 1) + index] : &gCryTable[(128 * 1) + index]); + gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 1, reverse)); break; case 2: - gMPlay_PokemonCry = SetPokemonCryTone( - reverse ? &gCryTable_Reverse[(128 * 2) + index] : &gCryTable[(128 * 2) + index]); + gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 2, reverse)); break; case 3: - gMPlay_PokemonCry = SetPokemonCryTone( - reverse ? &gCryTable_Reverse[(128 * 3) + index] : &gCryTable[(128 * 3) + index]); + gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 3, reverse)); break; } + + #undef GET_CRY } bool8 IsCryFinished(void) diff --git a/src/starter_choose.c b/src/starter_choose.c index 942f602730..f8282c822d 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -532,7 +532,7 @@ static void Task_WaitForStarterSprite(u8 taskId) static void Task_AskConfirmStarter(u8 taskId) { - PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0); + PlayCry_Normal(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized(0, FONT_NORMAL, gText_ConfirmStarterChoice, 0, 1, 0, NULL); ScheduleBgCopyTilemapToVram(0); diff --git a/src/trade.c b/src/trade.c index 475b82d5ee..c120e3310b 100644 --- a/src/trade.c +++ b/src/trade.c @@ -3398,7 +3398,7 @@ static bool8 AnimateTradeSequenceCable(void) DrawTextOnTradeWindow(0, gStringVar4, 0); if (sTradeData->monSpecies[TRADE_PLAYER] != SPECIES_EGG) - PlayCry1(sTradeData->monSpecies[TRADE_PLAYER], 0); + PlayCry_Normal(sTradeData->monSpecies[TRADE_PLAYER], 0); sTradeData->state = TS_STATE_BYE_BYE; sTradeData->timer = 0; @@ -3869,7 +3869,7 @@ static bool8 AnimateTradeSequenceWireless(void) DrawTextOnTradeWindow(0, gStringVar4, 0); if (sTradeData->monSpecies[TRADE_PLAYER] != SPECIES_EGG) - PlayCry1(sTradeData->monSpecies[TRADE_PLAYER], 0); + PlayCry_Normal(sTradeData->monSpecies[TRADE_PLAYER], 0); sTradeData->state = TS_STATE_BYE_BYE; sTradeData->timer = 0; From 1548e902cd6d9515362b171ae9aa5ff36c60b230 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 1 Nov 2021 12:02:08 -0400 Subject: [PATCH 153/417] Add MonCoods size macro --- include/constants/pokemon.h | 4 +- include/data.h | 4 + include/global.h | 8 +- src/battle_anim_mons.c | 70 +- .../pokemon_graphics/back_pic_coordinates.h | 884 +++++++++--------- .../pokemon_graphics/front_pic_coordinates.h | 884 +++++++++--------- 6 files changed, 934 insertions(+), 920 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 827725fc29..5b6b8cb5e7 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -337,7 +337,9 @@ #define NUM_MALE_LINK_FACILITY_CLASSES 8 #define NUM_FEMALE_LINK_FACILITY_CLASSES 8 -#define MON_PIC_SIZE (64 * 64 / 2) +#define MON_PIC_WIDTH 64 +#define MON_PIC_HEIGHT 64 +#define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2) #define BATTLE_ALIVE_EXCEPT_ACTIVE 0 #define BATTLE_ALIVE_ATK_SIDE 1 diff --git a/include/data.h b/include/data.h index 374435cbab..2d3619e679 100644 --- a/include/data.h +++ b/include/data.h @@ -21,6 +21,10 @@ struct MonCoords u8 y_offset; }; +#define MON_COORDS_SIZE(width, height)(DIV_ROUND_UP(width, 8) << 4 | DIV_ROUND_UP(height, 8)) +#define GET_MON_COORDS_WIDTH(size)((size >> 4) * 8) +#define GET_MON_COORDS_HEIGHT(size)((size & 0xF) * 8) + struct TrainerMonNoItemDefaultMoves { u16 iv; diff --git a/include/global.h b/include/global.h index dd02a17901..53e9ba1341 100644 --- a/include/global.h +++ b/include/global.h @@ -120,10 +120,12 @@ f; \ }) -#define ROUND_BITS_TO_BYTES(numBits)(((numBits) / 8) + (((numBits) % 8) ? 1 : 0)) +#define DIV_ROUND_UP(val, roundBy)(((val) / (roundBy)) + (((val) % (roundBy)) ? 1 : 0)) -#define DEX_FLAGS_NO (ROUND_BITS_TO_BYTES(NUM_SPECIES)) -#define NUM_FLAG_BYTES (ROUND_BITS_TO_BYTES(FLAGS_COUNT)) +#define ROUND_BITS_TO_BYTES(numBits) DIV_ROUND_UP(numBits, 8) + +#define DEX_FLAGS_NO ROUND_BITS_TO_BYTES(NUM_SPECIES) +#define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT) struct Coords8 { diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index d0ddfdd771..5c170adf22 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -33,10 +33,8 @@ static void AnimTask_BlendMonInAndOut_Step(u8 taskId); static bool8 sub_80A7238(void); static void sub_80A8D78(struct Task *task, u8 taskId); -// EWRAM vars -EWRAM_DATA static union AffineAnimCmd *gAnimTaskAffineAnim = NULL; +EWRAM_DATA static union AffineAnimCmd *sAnimTaskAffineAnim = NULL; -// Const rom data static const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = { { // Single battle @@ -56,10 +54,10 @@ static const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = // One entry for each of the four Castform forms. const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS] = { - [CASTFORM_NORMAL] = { .size = 0x44, .y_offset = 17 }, - [CASTFORM_FIRE] = { .size = 0x66, .y_offset = 9 }, - [CASTFORM_WATER] = { .size = 0x46, .y_offset = 9 }, - [CASTFORM_ICE] = { .size = 0x86, .y_offset = 8 }, + [CASTFORM_NORMAL] = { .size = MON_COORDS_SIZE(32, 32), .y_offset = 17 }, + [CASTFORM_FIRE] = { .size = MON_COORDS_SIZE(48, 48), .y_offset = 9 }, + [CASTFORM_WATER] = { .size = MON_COORDS_SIZE(32, 48), .y_offset = 9 }, + [CASTFORM_ICE] = { .size = MON_COORDS_SIZE(64, 48), .y_offset = 8 }, }; static const u8 sCastformElevations[NUM_CASTFORM_FORMS] = @@ -1740,34 +1738,34 @@ void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union Aff bool8 RunAffineAnimFromTaskData(struct Task *task) { - gAnimTaskAffineAnim = &((union AffineAnimCmd *)LoadPointerFromVars(task->data[13], task->data[14]))[task->data[7]]; - switch (gAnimTaskAffineAnim->type) + sAnimTaskAffineAnim = &((union AffineAnimCmd *)LoadPointerFromVars(task->data[13], task->data[14]))[task->data[7]]; + switch (sAnimTaskAffineAnim->type) { default: - if (!gAnimTaskAffineAnim->frame.duration) + if (!sAnimTaskAffineAnim->frame.duration) { - task->data[10] = gAnimTaskAffineAnim->frame.xScale; - task->data[11] = gAnimTaskAffineAnim->frame.yScale; - task->data[12] = gAnimTaskAffineAnim->frame.rotation; + task->data[10] = sAnimTaskAffineAnim->frame.xScale; + task->data[11] = sAnimTaskAffineAnim->frame.yScale; + task->data[12] = sAnimTaskAffineAnim->frame.rotation; task->data[7]++; - gAnimTaskAffineAnim++; + sAnimTaskAffineAnim++; } - task->data[10] += gAnimTaskAffineAnim->frame.xScale; - task->data[11] += gAnimTaskAffineAnim->frame.yScale; - task->data[12] += gAnimTaskAffineAnim->frame.rotation; + task->data[10] += sAnimTaskAffineAnim->frame.xScale; + task->data[11] += sAnimTaskAffineAnim->frame.yScale; + task->data[12] += sAnimTaskAffineAnim->frame.rotation; SetSpriteRotScale(task->data[15], task->data[10], task->data[11], task->data[12]); SetBattlerSpriteYOffsetFromYScale(task->data[15]); - if (++task->data[8] >= gAnimTaskAffineAnim->frame.duration) + if (++task->data[8] >= sAnimTaskAffineAnim->frame.duration) { task->data[8] = 0; task->data[7]++; } break; case AFFINEANIMCMDTYPE_JUMP: - task->data[7] = gAnimTaskAffineAnim->jump.target; + task->data[7] = sAnimTaskAffineAnim->jump.target; break; case AFFINEANIMCMDTYPE_LOOP: - if (gAnimTaskAffineAnim->loop.count) + if (sAnimTaskAffineAnim->loop.count) { if (task->data[9]) { @@ -1779,7 +1777,7 @@ bool8 RunAffineAnimFromTaskData(struct Task *task) } else { - task->data[9] = gAnimTaskAffineAnim->loop.count; + task->data[9] = sAnimTaskAffineAnim->loop.count; } if (!task->data[7]) { @@ -1788,8 +1786,8 @@ bool8 RunAffineAnimFromTaskData(struct Task *task) for (;;) { task->data[7]--; - gAnimTaskAffineAnim--; - if (gAnimTaskAffineAnim->type == AFFINEANIMCMDTYPE_LOOP) + sAnimTaskAffineAnim--; + if (sAnimTaskAffineAnim->type == AFFINEANIMCMDTYPE_LOOP) { task->data[7]++; return TRUE; @@ -1813,12 +1811,12 @@ bool8 RunAffineAnimFromTaskData(struct Task *task) // matrix's scale in the y dimension. void SetBattlerSpriteYOffsetFromYScale(u8 spriteId) { - int var = 64 - GetBattlerYDeltaFromSpriteId(spriteId) * 2; + int var = MON_PIC_HEIGHT - GetBattlerYDeltaFromSpriteId(spriteId) * 2; u16 matrix = gSprites[spriteId].oam.matrixNum; int var2 = SAFE_DIV(var << 8, gOamMatrices[matrix].d); - if (var2 > 128) - var2 = 128; + if (var2 > MON_PIC_HEIGHT * 2) + var2 = MON_PIC_HEIGHT * 2; gSprites[spriteId].y2 = (var - var2) / 2; } @@ -1826,12 +1824,12 @@ void SetBattlerSpriteYOffsetFromYScale(u8 spriteId) // matrix's scale in the y dimension. void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId) { - int var = 64 - GetBattlerYDeltaFromSpriteId(otherSpriteId) * 2; + int var = MON_PIC_HEIGHT - GetBattlerYDeltaFromSpriteId(otherSpriteId) * 2; u16 matrix = gSprites[spriteId].oam.matrixNum; int var2 = SAFE_DIV(var << 8, gOamMatrices[matrix].d); - if (var2 > 128) - var2 = 128; + if (var2 > MON_PIC_HEIGHT * 2) + var2 = MON_PIC_HEIGHT * 2; gSprites[spriteId].y2 = (var - var2) / 2; } @@ -1882,7 +1880,7 @@ static u16 GetBattlerYDeltaFromSpriteId(u8 spriteId) } } } - return 64; + return MON_PIC_HEIGHT; } void StorePointerInVars(s16 *lo, s16 *hi, const void *ptr) @@ -2209,17 +2207,17 @@ s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 attr) switch (attr) { case BATTLER_COORD_ATTR_HEIGHT: - return (coords->size & 0xf) * 8; + return GET_MON_COORDS_HEIGHT(coords->size); case BATTLER_COORD_ATTR_WIDTH: - return (coords->size >> 4) * 8; + return GET_MON_COORDS_WIDTH(coords->size); case BATTLER_COORD_ATTR_LEFT: - return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2) - ((coords->size >> 4) * 4); + return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2) - (GET_MON_COORDS_WIDTH(coords->size) / 2); case BATTLER_COORD_ATTR_RIGHT: - return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2) + ((coords->size >> 4) * 4); + return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2) + (GET_MON_COORDS_WIDTH(coords->size) / 2); case BATTLER_COORD_ATTR_TOP: - return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y_PIC_OFFSET) - ((coords->size & 0xf) * 4); + return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y_PIC_OFFSET) - (GET_MON_COORDS_HEIGHT(coords->size) / 2); case BATTLER_COORD_ATTR_BOTTOM: - return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y_PIC_OFFSET) + ((coords->size & 0xf) * 4); + return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y_PIC_OFFSET) + (GET_MON_COORDS_HEIGHT(coords->size) / 2); case BATTLER_COORD_ATTR_RAW_BOTTOM: ret = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y) + 31; return ret - coords->y_offset; diff --git a/src/data/pokemon_graphics/back_pic_coordinates.h b/src/data/pokemon_graphics/back_pic_coordinates.h index 131ac13d9b..ea81706080 100644 --- a/src/data/pokemon_graphics/back_pic_coordinates.h +++ b/src/data/pokemon_graphics/back_pic_coordinates.h @@ -1,2203 +1,2207 @@ +// All Pokémon pics are 64x64, but this data table defines where in this 64x64 the +// non-trasparent area of pixels the sprite actually occupies are. +// .size is the dimensions of this drawn pixel area. +// .y_offset is the number of pixels between the drawn pixel area and the bottom edge. const struct MonCoords gMonBackPicCoords[] = { [SPECIES_NONE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_BULBASAUR] = { - .size = 0x64, + .size = MON_COORDS_SIZE(48, 32), .y_offset = 16, }, [SPECIES_IVYSAUR] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_VENUSAUR] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_CHARMANDER] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 14, }, [SPECIES_CHARMELEON] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_CHARIZARD] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_SQUIRTLE] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 14, }, [SPECIES_WARTORTLE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_BLASTOISE] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_CATERPIE] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_METAPOD] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_BUTTERFREE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_WEEDLE] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_KAKUNA] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 10, }, [SPECIES_BEEDRILL] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_PIDGEY] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_PIDGEOTTO] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 12, }, [SPECIES_PIDGEOT] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 2, }, [SPECIES_RATTATA] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_RATICATE] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 13, }, [SPECIES_SPEAROW] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_FEAROW] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_EKANS] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_ARBOK] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_PIKACHU] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_RAICHU] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_SANDSHREW] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_SANDSLASH] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_NIDORAN_F] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_NIDORINA] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_NIDOQUEEN] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_NIDORAN_M] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 8, }, [SPECIES_NIDORINO] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_NIDOKING] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_CLEFAIRY] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_CLEFABLE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_VULPIX] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_NINETALES] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_JIGGLYPUFF] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_WIGGLYTUFF] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_ZUBAT] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_GOLBAT] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_ODDISH] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_GLOOM] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_VILEPLUME] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_PARAS] = { - .size = 0x63, + .size = MON_COORDS_SIZE(48, 24), .y_offset = 20, }, [SPECIES_PARASECT] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_VENONAT] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_VENOMOTH] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_DIGLETT] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 16, }, [SPECIES_DUGTRIO] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_MEOWTH] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_PERSIAN] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_PSYDUCK] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_GOLDUCK] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_MANKEY] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_PRIMEAPE] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_GROWLITHE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_ARCANINE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_POLIWAG] = { - .size = 0x74, + .size = MON_COORDS_SIZE(56, 32), .y_offset = 16, }, [SPECIES_POLIWHIRL] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_POLIWRATH] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 11, }, [SPECIES_ABRA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_KADABRA] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_ALAKAZAM] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 5, }, [SPECIES_MACHOP] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_MACHOKE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_MACHAMP] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 4, }, [SPECIES_BELLSPROUT] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_WEEPINBELL] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_VICTREEBEL] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_TENTACOOL] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 10, }, [SPECIES_TENTACRUEL] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 11, }, [SPECIES_GEODUDE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_GRAVELER] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 12, }, [SPECIES_GOLEM] = { - .size = 0x84, + .size = MON_COORDS_SIZE(64, 32), .y_offset = 16, }, [SPECIES_PONYTA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_RAPIDASH] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_SLOWPOKE] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 14, }, [SPECIES_SLOWBRO] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_MAGNEMITE] = { - .size = 0x43, + .size = MON_COORDS_SIZE(32, 24), .y_offset = 20, }, [SPECIES_MAGNETON] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_FARFETCHD] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_DODUO] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_DODRIO] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_SEEL] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_DEWGONG] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_GRIMER] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 12, }, [SPECIES_MUK] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_SHELLDER] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_CLOYSTER] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_GASTLY] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 14, }, [SPECIES_HAUNTER] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_GENGAR] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_ONIX] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_DROWZEE] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_HYPNO] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_KRABBY] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_KINGLER] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_VOLTORB] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 14, }, [SPECIES_ELECTRODE] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_EXEGGCUTE] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_EXEGGUTOR] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_CUBONE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_MAROWAK] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_HITMONLEE] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_HITMONCHAN] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_LICKITUNG] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 14, }, [SPECIES_KOFFING] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_WEEZING] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_RHYHORN] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 12, }, [SPECIES_RHYDON] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_CHANSEY] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 11, }, [SPECIES_TANGELA] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 14, }, [SPECIES_KANGASKHAN] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_HORSEA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_SEADRA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_GOLDEEN] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_SEAKING] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_STARYU] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_STARMIE] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 14, }, [SPECIES_MR_MIME] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_SCYTHER] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_JYNX] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_ELECTABUZZ] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_MAGMAR] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_PINSIR] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_TAUROS] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_MAGIKARP] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_GYARADOS] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_LAPRAS] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_DITTO] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 17, }, [SPECIES_EEVEE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_VAPOREON] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_JOLTEON] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_FLAREON] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 5, }, [SPECIES_PORYGON] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_OMANYTE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_OMASTAR] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_KABUTO] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_KABUTOPS] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_AERODACTYL] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_SNORLAX] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 11, }, [SPECIES_ARTICUNO] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_ZAPDOS] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_MOLTRES] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_DRATINI] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_DRAGONAIR] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_DRAGONITE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_MEWTWO] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 1, }, [SPECIES_MEW] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_CHIKORITA] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 10, }, [SPECIES_BAYLEEF] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_MEGANIUM] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_CYNDAQUIL] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_QUILAVA] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_TYPHLOSION] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_TOTODILE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_CROCONAW] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_FERALIGATR] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_SENTRET] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 5, }, [SPECIES_FURRET] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_HOOTHOOT] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_NOCTOWL] = { - .size = 0x68, + .size = MON_COORDS_SIZE(48, 64), .y_offset = 3, }, [SPECIES_LEDYBA] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_LEDIAN] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_SPINARAK] = { - .size = 0x73, + .size = MON_COORDS_SIZE(56, 24), .y_offset = 21, }, [SPECIES_ARIADOS] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 11, }, [SPECIES_CROBAT] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_CHINCHOU] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_LANTURN] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_PICHU] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_CLEFFA] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 15, }, [SPECIES_IGGLYBUFF] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_TOGEPI] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 16, }, [SPECIES_TOGETIC] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_NATU] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 17, }, [SPECIES_XATU] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_MAREEP] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_FLAAFFY] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_AMPHAROS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_BELLOSSOM] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_MARILL] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 12, }, [SPECIES_AZUMARILL] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_SUDOWOODO] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_POLITOED] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_HOPPIP] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_SKIPLOOM] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_JUMPLUFF] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_AIPOM] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_SUNKERN] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 10, }, [SPECIES_SUNFLORA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_YANMA] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_WOOPER] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 15, }, [SPECIES_QUAGSIRE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_ESPEON] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_UMBREON] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_MURKROW] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_SLOWKING] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_MISDREAVUS] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_UNOWN] = { - .size = 0x36, + .size = MON_COORDS_SIZE(24, 48), .y_offset = 8, }, [SPECIES_WOBBUFFET] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 12, }, [SPECIES_GIRAFARIG] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_PINECO] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 15, }, [SPECIES_FORRETRESS] = { - .size = 0x84, + .size = MON_COORDS_SIZE(64, 32), .y_offset = 16, }, [SPECIES_DUNSPARCE] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 15, }, [SPECIES_GLIGAR] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_STEELIX] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SNUBBULL] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_GRANBULL] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_QWILFISH] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_SCIZOR] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_SHUCKLE] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_HERACROSS] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_SNEASEL] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_TEDDIURSA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_URSARING] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_SLUGMA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_MAGCARGO] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_SWINUB] = { - .size = 0x63, + .size = MON_COORDS_SIZE(48, 24), .y_offset = 21, }, [SPECIES_PILOSWINE] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 13, }, [SPECIES_CORSOLA] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_REMORAID] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 13, }, [SPECIES_OCTILLERY] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_DELIBIRD] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_MANTINE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_SKARMORY] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_HOUNDOUR] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_HOUNDOOM] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_KINGDRA] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_PHANPY] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 14, }, [SPECIES_DONPHAN] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_PORYGON2] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_STANTLER] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 3, }, [SPECIES_SMEARGLE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_TYROGUE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_HITMONTOP] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_SMOOCHUM] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 9, }, [SPECIES_ELEKID] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_MAGBY] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_MILTANK] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_BLISSEY] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_RAIKOU] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_ENTEI] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_SUICUNE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_LARVITAR] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_PUPITAR] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 5, }, [SPECIES_TYRANITAR] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_LUGIA] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_HO_OH] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_CELEBI] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_OLD_UNOWN_B] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_C] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_D] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_E] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_F] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_G] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_H] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_I] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_J] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_K] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_L] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_M] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_N] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_O] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_P] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_Q] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_R] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_S] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_T] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_U] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_V] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_W] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_X] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_Y] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_OLD_UNOWN_Z] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_TREECKO] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_GROVYLE] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_SCEPTILE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_TORCHIC] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 5, }, [SPECIES_COMBUSKEN] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_BLAZIKEN] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_MUDKIP] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_MARSHTOMP] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_SWAMPERT] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_POOCHYENA] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_MIGHTYENA] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_ZIGZAGOON] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_LINOONE] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 15, }, [SPECIES_WURMPLE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_SILCOON] = { - .size = 0x83, + .size = MON_COORDS_SIZE(64, 24), .y_offset = 21, }, [SPECIES_BEAUTIFLY] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_CASCOON] = { - .size = 0x73, + .size = MON_COORDS_SIZE(56, 24), .y_offset = 20, }, [SPECIES_DUSTOX] = { - .size = 0x83, + .size = MON_COORDS_SIZE(64, 24), .y_offset = 20, }, [SPECIES_LOTAD] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 15, }, [SPECIES_LOMBRE] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_LUDICOLO] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_SEEDOT] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_NUZLEAF] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_SHIFTRY] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_NINCADA] = { - .size = 0x83, + .size = MON_COORDS_SIZE(64, 24), .y_offset = 20, }, [SPECIES_NINJASK] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_SHEDINJA] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_TAILLOW] = { - .size = 0x64, + .size = MON_COORDS_SIZE(48, 32), .y_offset = 17, }, [SPECIES_SWELLOW] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_SHROOMISH] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_BRELOOM] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_SPINDA] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_WINGULL] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 14, }, [SPECIES_PELIPPER] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_SURSKIT] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 11, }, [SPECIES_MASQUERAIN] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_WAILMER] = { - .size = 0x83, + .size = MON_COORDS_SIZE(64, 24), .y_offset = 21, }, [SPECIES_WAILORD] = { - .size = 0x83, + .size = MON_COORDS_SIZE(64, 24), .y_offset = 22, }, [SPECIES_SKITTY] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_DELCATTY] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_KECLEON] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_BALTOY] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_CLAYDOL] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_NOSEPASS] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 12, }, [SPECIES_TORKOAL] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_SABLEYE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_BARBOACH] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_WHISCASH] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_LUVDISC] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 10, }, [SPECIES_CORPHISH] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_CRAWDAUNT] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_FEEBAS] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_MILOTIC] = { - .size = 0x68, + .size = MON_COORDS_SIZE(48, 64), .y_offset = 2, }, [SPECIES_CARVANHA] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_SHARPEDO] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_TRAPINCH] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 14, }, [SPECIES_VIBRAVA] = { - .size = 0x74, + .size = MON_COORDS_SIZE(56, 32), .y_offset = 17, }, [SPECIES_FLYGON] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_MAKUHITA] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_HARIYAMA] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_ELECTRIKE] = { - .size = 0x84, + .size = MON_COORDS_SIZE(64, 32), .y_offset = 16, }, [SPECIES_MANECTRIC] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_NUMEL] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 11, }, [SPECIES_CAMERUPT] = { - .size = 0x84, + .size = MON_COORDS_SIZE(64, 32), .y_offset = 19, }, [SPECIES_SPHEAL] = { - .size = 0x64, + .size = MON_COORDS_SIZE(48, 32), .y_offset = 18, }, [SPECIES_SEALEO] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_WALREIN] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_CACNEA] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 15, }, [SPECIES_CACTURNE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_SNORUNT] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_GLALIE] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 12, }, [SPECIES_LUNATONE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_SOLROCK] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_AZURILL] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_SPOINK] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_GRUMPIG] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_PLUSLE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_MINUN] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_MAWILE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_MEDITITE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_MEDICHAM] = { - .size = 0x68, + .size = MON_COORDS_SIZE(48, 64), .y_offset = 3, }, [SPECIES_SWABLU] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_ALTARIA] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_WYNAUT] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_DUSKULL] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_DUSCLOPS] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_ROSELIA] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_SLAKOTH] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 15, }, [SPECIES_VIGOROTH] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_SLAKING] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_GULPIN] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_SWALOT] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_TROPIUS] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_WHISMUR] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_LOUDRED] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_EXPLOUD] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_CLAMPERL] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_HUNTAIL] = { - .size = 0x68, + .size = MON_COORDS_SIZE(48, 64), .y_offset = 2, }, [SPECIES_GOREBYSS] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_ABSOL] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 3, }, [SPECIES_SHUPPET] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_BANETTE] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_SEVIPER] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_ZANGOOSE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_RELICANTH] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_ARON] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 17, }, [SPECIES_LAIRON] = { - .size = 0x84, + .size = MON_COORDS_SIZE(64, 32), .y_offset = 17, }, [SPECIES_AGGRON] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_CASTFORM] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 13, }, [SPECIES_VOLBEAT] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_ILLUMISE] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_LILEEP] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_CRADILY] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_ANORITH] = { - .size = 0x83, + .size = MON_COORDS_SIZE(64, 24), .y_offset = 23, }, [SPECIES_ARMALDO] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_RALTS] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 13, }, [SPECIES_KIRLIA] = { - .size = 0x57, + .size = MON_COORDS_SIZE(40, 56), .y_offset = 6, }, [SPECIES_GARDEVOIR] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_BAGON] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_SHELGON] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_SALAMENCE] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_BELDUM] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_METANG] = { - .size = 0x84, + .size = MON_COORDS_SIZE(64, 32), .y_offset = 16, }, [SPECIES_METAGROSS] = { - .size = 0x83, + .size = MON_COORDS_SIZE(64, 24), .y_offset = 20, }, [SPECIES_REGIROCK] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_REGICE] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 14, }, [SPECIES_REGISTEEL] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 14, }, [SPECIES_KYOGRE] = { - .size = 0x84, + .size = MON_COORDS_SIZE(64, 32), .y_offset = 19, }, [SPECIES_GROUDON] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_RAYQUAZA] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_LATIAS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_LATIOS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_JIRACHI] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_DEOXYS] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_CHIMECHO] = { - .size = 0x47, + .size = MON_COORDS_SIZE(32, 56), .y_offset = 7, }, [SPECIES_EGG] = { - .size = 0x36, + .size = MON_COORDS_SIZE(24, 48), .y_offset = 10, }, [SPECIES_UNOWN_B] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 9, }, [SPECIES_UNOWN_C] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_UNOWN_D] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 8, }, [SPECIES_UNOWN_E] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 10, }, [SPECIES_UNOWN_F] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_UNOWN_G] = { - .size = 0x57, + .size = MON_COORDS_SIZE(40, 56), .y_offset = 5, }, [SPECIES_UNOWN_H] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_UNOWN_I] = { - .size = 0x37, + .size = MON_COORDS_SIZE(24, 56), .y_offset = 7, }, [SPECIES_UNOWN_J] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 9, }, [SPECIES_UNOWN_K] = { - .size = 0x57, + .size = MON_COORDS_SIZE(40, 56), .y_offset = 7, }, [SPECIES_UNOWN_L] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 10, }, [SPECIES_UNOWN_M] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_UNOWN_N] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_UNOWN_O] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_UNOWN_P] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 10, }, [SPECIES_UNOWN_Q] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_UNOWN_R] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 12, }, [SPECIES_UNOWN_S] = { - .size = 0x57, + .size = MON_COORDS_SIZE(40, 56), .y_offset = 4, }, [SPECIES_UNOWN_T] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 13, }, [SPECIES_UNOWN_U] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_UNOWN_V] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_UNOWN_W] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 13, }, [SPECIES_UNOWN_X] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_UNOWN_Y] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 10, }, [SPECIES_UNOWN_Z] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 10, }, [SPECIES_UNOWN_EMARK] = { - .size = 0x37, + .size = MON_COORDS_SIZE(24, 56), .y_offset = 6, }, [SPECIES_UNOWN_QMARK] = { - .size = 0x47, + .size = MON_COORDS_SIZE(32, 56), .y_offset = 6, }, }; diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index b787877b95..f0cebf1f51 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -1,2203 +1,2207 @@ +// All Pokémon pics are 64x64, but this data table defines where in this 64x64 the +// non-trasparent area of pixels the sprite actually occupies are. +// .size is the dimensions of this drawn pixel area. +// .y_offset is the number of pixels between the drawn pixel area and the bottom edge. const struct MonCoords gMonFrontPicCoords[] = { [SPECIES_NONE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_BULBASAUR] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 14, }, [SPECIES_IVYSAUR] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 10, }, [SPECIES_VENUSAUR] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_CHARMANDER] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_CHARMELEON] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_CHARIZARD] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_SQUIRTLE] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_WARTORTLE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_BLASTOISE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_CATERPIE] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 16, }, [SPECIES_METAPOD] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 20, }, [SPECIES_BUTTERFREE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_WEEDLE] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 18, }, [SPECIES_KAKUNA] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 14, }, [SPECIES_BEEDRILL] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_PIDGEY] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_PIDGEOTTO] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 11, }, [SPECIES_PIDGEOT] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_RATTATA] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 16, }, [SPECIES_RATICATE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_SPEAROW] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 15, }, [SPECIES_FEAROW] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_EKANS] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_ARBOK] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_PIKACHU] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 9, }, [SPECIES_RAICHU] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 4, }, [SPECIES_SANDSHREW] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 14, }, [SPECIES_SANDSLASH] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_NIDORAN_F] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 15, }, [SPECIES_NIDORINA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_NIDOQUEEN] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 3, }, [SPECIES_NIDORAN_M] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_NIDORINO] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_NIDOKING] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 2, }, [SPECIES_CLEFAIRY] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 16, }, [SPECIES_CLEFABLE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_VULPIX] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_NINETALES] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_JIGGLYPUFF] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 16, }, [SPECIES_WIGGLYTUFF] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 8, }, [SPECIES_ZUBAT] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_GOLBAT] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_ODDISH] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 15, }, [SPECIES_GLOOM] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_VILEPLUME] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_PARAS] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_PARASECT] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_VENONAT] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_VENOMOTH] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_DIGLETT] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 18, }, [SPECIES_DUGTRIO] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 13, }, [SPECIES_MEOWTH] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_PERSIAN] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_PSYDUCK] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 9, }, [SPECIES_GOLDUCK] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 2, }, [SPECIES_MANKEY] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 14, }, [SPECIES_PRIMEAPE] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_GROWLITHE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_ARCANINE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_POLIWAG] = { - .size = 0x74, + .size = MON_COORDS_SIZE(56, 32), .y_offset = 19, }, [SPECIES_POLIWHIRL] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_POLIWRATH] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_ABRA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_KADABRA] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_ALAKAZAM] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_MACHOP] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_MACHOKE] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_MACHAMP] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_BELLSPROUT] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 15, }, [SPECIES_WEEPINBELL] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_VICTREEBEL] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_TENTACOOL] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 9, }, [SPECIES_TENTACRUEL] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_GEODUDE] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 18, }, [SPECIES_GRAVELER] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_GOLEM] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_PONYTA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_RAPIDASH] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_SLOWPOKE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_SLOWBRO] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_MAGNEMITE] = { - .size = 0x43, + .size = MON_COORDS_SIZE(32, 24), .y_offset = 21, }, [SPECIES_MAGNETON] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_FARFETCHD] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_DODUO] = { - .size = 0x57, + .size = MON_COORDS_SIZE(40, 56), .y_offset = 5, }, [SPECIES_DODRIO] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SEEL] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_DEWGONG] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_GRIMER] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_MUK] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_SHELLDER] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 16, }, [SPECIES_CLOYSTER] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_GASTLY] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_HAUNTER] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_GENGAR] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_ONIX] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 2, }, [SPECIES_DROWZEE] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_HYPNO] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_KRABBY] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 13, }, [SPECIES_KINGLER] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_VOLTORB] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 19, }, [SPECIES_ELECTRODE] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 14, }, [SPECIES_EXEGGCUTE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_EXEGGUTOR] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_CUBONE] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_MAROWAK] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 11, }, [SPECIES_HITMONLEE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_HITMONCHAN] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 4, }, [SPECIES_LICKITUNG] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_KOFFING] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_WEEZING] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_RHYHORN] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_RHYDON] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_CHANSEY] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_TANGELA] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_KANGASKHAN] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_HORSEA] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 15, }, [SPECIES_SEADRA] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_GOLDEEN] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_SEAKING] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_STARYU] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_STARMIE] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_MR_MIME] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_SCYTHER] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_JYNX] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_ELECTABUZZ] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 2, }, [SPECIES_MAGMAR] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_PINSIR] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_TAUROS] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_MAGIKARP] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_GYARADOS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 8, }, [SPECIES_LAPRAS] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 13, }, [SPECIES_DITTO] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 17, }, [SPECIES_EEVEE] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 9, }, [SPECIES_VAPOREON] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_JOLTEON] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_FLAREON] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_PORYGON] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 13, }, [SPECIES_OMANYTE] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 15, }, [SPECIES_OMASTAR] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_KABUTO] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 17, }, [SPECIES_KABUTOPS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_AERODACTYL] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_SNORLAX] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_ARTICUNO] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_ZAPDOS] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_MOLTRES] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_DRATINI] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 14, }, [SPECIES_DRAGONAIR] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_DRAGONITE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_MEWTWO] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_MEW] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 13, }, [SPECIES_CHIKORITA] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 13, }, [SPECIES_BAYLEEF] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_MEGANIUM] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_CYNDAQUIL] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 14, }, [SPECIES_QUILAVA] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_TYPHLOSION] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_TOTODILE] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_CROCONAW] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_FERALIGATR] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SENTRET] = { - .size = 0x47, + .size = MON_COORDS_SIZE(32, 56), .y_offset = 4, }, [SPECIES_FURRET] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_HOOTHOOT] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 13, }, [SPECIES_NOCTOWL] = { - .size = 0x58, + .size = MON_COORDS_SIZE(40, 64), .y_offset = 3, }, [SPECIES_LEDYBA] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 12, }, [SPECIES_LEDIAN] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 4, }, [SPECIES_SPINARAK] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 19, }, [SPECIES_ARIADOS] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_CROBAT] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_CHINCHOU] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 16, }, [SPECIES_LANTURN] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 11, }, [SPECIES_PICHU] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 12, }, [SPECIES_CLEFFA] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 20, }, [SPECIES_IGGLYBUFF] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 18, }, [SPECIES_TOGEPI] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 20, }, [SPECIES_TOGETIC] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 9, }, [SPECIES_NATU] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 20, }, [SPECIES_XATU] = { - .size = 0x47, + .size = MON_COORDS_SIZE(32, 56), .y_offset = 7, }, [SPECIES_MAREEP] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 16, }, [SPECIES_FLAAFFY] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 10, }, [SPECIES_AMPHAROS] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_BELLOSSOM] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 14, }, [SPECIES_MARILL] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 14, }, [SPECIES_AZUMARILL] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_SUDOWOODO] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_POLITOED] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_HOPPIP] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_SKIPLOOM] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_JUMPLUFF] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_AIPOM] = { - .size = 0x58, + .size = MON_COORDS_SIZE(40, 64), .y_offset = 3, }, [SPECIES_SUNKERN] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 16, }, [SPECIES_SUNFLORA] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 8, }, [SPECIES_YANMA] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_WOOPER] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 16, }, [SPECIES_QUAGSIRE] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 7, }, [SPECIES_ESPEON] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_UMBREON] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 8, }, [SPECIES_MURKROW] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_SLOWKING] = { - .size = 0x58, + .size = MON_COORDS_SIZE(40, 64), .y_offset = 1, }, [SPECIES_MISDREAVUS] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_UNOWN] = { - .size = 0x35, + .size = MON_COORDS_SIZE(24, 40), .y_offset = 15, }, [SPECIES_WOBBUFFET] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_GIRAFARIG] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_PINECO] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 10, }, [SPECIES_FORRETRESS] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_DUNSPARCE] = { - .size = 0x74, + .size = MON_COORDS_SIZE(56, 32), .y_offset = 17, }, [SPECIES_GLIGAR] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 3, }, [SPECIES_STEELIX] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SNUBBULL] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 13, }, [SPECIES_GRANBULL] = { - .size = 0x57, + .size = MON_COORDS_SIZE(40, 56), .y_offset = 6, }, [SPECIES_QWILFISH] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 10, }, [SPECIES_SCIZOR] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SHUCKLE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_HERACROSS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_SNEASEL] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 5, }, [SPECIES_TEDDIURSA] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 13, }, [SPECIES_URSARING] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 1, }, [SPECIES_SLUGMA] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 13, }, [SPECIES_MAGCARGO] = { - .size = 0x57, + .size = MON_COORDS_SIZE(40, 56), .y_offset = 13, }, [SPECIES_SWINUB] = { - .size = 0x43, + .size = MON_COORDS_SIZE(32, 24), .y_offset = 20, }, [SPECIES_PILOSWINE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_CORSOLA] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_REMORAID] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 14, }, [SPECIES_OCTILLERY] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_DELIBIRD] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 8, }, [SPECIES_MANTINE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_SKARMORY] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_HOUNDOUR] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_HOUNDOOM] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_KINGDRA] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 4, }, [SPECIES_PHANPY] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 16, }, [SPECIES_DONPHAN] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_PORYGON2] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_STANTLER] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SMEARGLE] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_TYROGUE] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 9, }, [SPECIES_HITMONTOP] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 5, }, [SPECIES_SMOOCHUM] = { - .size = 0x35, + .size = MON_COORDS_SIZE(24, 40), .y_offset = 15, }, [SPECIES_ELEKID] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_MAGBY] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 13, }, [SPECIES_MILTANK] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_BLISSEY] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 6, }, [SPECIES_RAIKOU] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_ENTEI] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SUICUNE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_LARVITAR] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 9, }, [SPECIES_PUPITAR] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 9, }, [SPECIES_TYRANITAR] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_LUGIA] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_HO_OH] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_CELEBI] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 14, }, [SPECIES_OLD_UNOWN_B] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_C] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_D] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_E] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_F] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_G] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_H] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_I] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_J] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_K] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_L] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_M] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_N] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_O] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_P] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_Q] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_R] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_S] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_T] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_U] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_V] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_W] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_X] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_Y] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_OLD_UNOWN_Z] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_TREECKO] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_GROVYLE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_SCEPTILE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_TORCHIC] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 8, }, [SPECIES_COMBUSKEN] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_BLAZIKEN] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_MUDKIP] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 12, }, [SPECIES_MARSHTOMP] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_SWAMPERT] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_POOCHYENA] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_MIGHTYENA] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_ZIGZAGOON] = { - .size = 0x85, + .size = MON_COORDS_SIZE(64, 40), .y_offset = 15, }, [SPECIES_LINOONE] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 3, }, [SPECIES_WURMPLE] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 14, }, [SPECIES_SILCOON] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 17, }, [SPECIES_BEAUTIFLY] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 9, }, [SPECIES_CASCOON] = { - .size = 0x74, + .size = MON_COORDS_SIZE(56, 32), .y_offset = 16, }, [SPECIES_DUSTOX] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 15, }, [SPECIES_LOTAD] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 14, }, [SPECIES_LOMBRE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_LUDICOLO] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SEEDOT] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 16, }, [SPECIES_NUZLEAF] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 8, }, [SPECIES_SHIFTRY] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_NINCADA] = { - .size = 0x74, + .size = MON_COORDS_SIZE(56, 32), .y_offset = 18, }, [SPECIES_NINJASK] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_SHEDINJA] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_TAILLOW] = { - .size = 0x64, + .size = MON_COORDS_SIZE(48, 32), .y_offset = 16, }, [SPECIES_SWELLOW] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_SHROOMISH] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 16, }, [SPECIES_BRELOOM] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_SPINDA] = { - .size = 0x68, + .size = MON_COORDS_SIZE(48, 64), .y_offset = 8, }, [SPECIES_WINGULL] = { - .size = 0x84, + .size = MON_COORDS_SIZE(64, 32), .y_offset = 24, }, [SPECIES_PELIPPER] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 4, }, [SPECIES_SURSKIT] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 15, }, [SPECIES_MASQUERAIN] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_WAILMER] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 15, }, [SPECIES_WAILORD] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 10, }, [SPECIES_SKITTY] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 11, }, [SPECIES_DELCATTY] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_KECLEON] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_BALTOY] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 16, }, [SPECIES_CLAYDOL] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 6, }, [SPECIES_NOSEPASS] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 12, }, [SPECIES_TORKOAL] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_SABLEYE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_BARBOACH] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 11, }, [SPECIES_WHISCASH] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 9, }, [SPECIES_LUVDISC] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 24, }, [SPECIES_CORPHISH] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 12, }, [SPECIES_CRAWDAUNT] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_FEEBAS] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 13, }, [SPECIES_MILOTIC] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_CARVANHA] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 6, }, [SPECIES_SHARPEDO] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 3, }, [SPECIES_TRAPINCH] = { - .size = 0x54, + .size = MON_COORDS_SIZE(40, 32), .y_offset = 16, }, [SPECIES_VIBRAVA] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 12, }, [SPECIES_FLYGON] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_MAKUHITA] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_HARIYAMA] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_ELECTRIKE] = { - .size = 0x64, + .size = MON_COORDS_SIZE(48, 32), .y_offset = 18, }, [SPECIES_MANECTRIC] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 4, }, [SPECIES_NUMEL] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 15, }, [SPECIES_CAMERUPT] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 9, }, [SPECIES_SPHEAL] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 16, }, [SPECIES_SEALEO] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 10, }, [SPECIES_WALREIN] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_CACNEA] = { - .size = 0x74, + .size = MON_COORDS_SIZE(56, 32), .y_offset = 16, }, [SPECIES_CACTURNE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_SNORUNT] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_GLALIE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 10, }, [SPECIES_LUNATONE] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_SOLROCK] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_AZURILL] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_SPOINK] = { - .size = 0x46, + .size = MON_COORDS_SIZE(32, 48), .y_offset = 9, }, [SPECIES_GRUMPIG] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_PLUSLE] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 14, }, [SPECIES_MINUN] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 12, }, [SPECIES_MAWILE] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_MEDITITE] = { - .size = 0x65, + .size = MON_COORDS_SIZE(48, 40), .y_offset = 12, }, [SPECIES_MEDICHAM] = { - .size = 0x68, + .size = MON_COORDS_SIZE(48, 64), .y_offset = 1, }, [SPECIES_SWABLU] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 17, }, [SPECIES_ALTARIA] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_WYNAUT] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_DUSKULL] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 10, }, [SPECIES_DUSCLOPS] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 5, }, [SPECIES_ROSELIA] = { - .size = 0x76, + .size = MON_COORDS_SIZE(56, 48), .y_offset = 8, }, [SPECIES_SLAKOTH] = { - .size = 0x74, + .size = MON_COORDS_SIZE(56, 32), .y_offset = 18, }, [SPECIES_VIGOROTH] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_SLAKING] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 8, }, [SPECIES_GULPIN] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 18, }, [SPECIES_SWALOT] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_TROPIUS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_WHISMUR] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 14, }, [SPECIES_LOUDRED] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 3, }, [SPECIES_EXPLOUD] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_CLAMPERL] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 14, }, [SPECIES_HUNTAIL] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 3, }, [SPECIES_GOREBYSS] = { - .size = 0x86, + .size = MON_COORDS_SIZE(64, 48), .y_offset = 11, }, [SPECIES_ABSOL] = { - .size = 0x68, + .size = MON_COORDS_SIZE(48, 64), .y_offset = 0, }, [SPECIES_SHUPPET] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 14, }, [SPECIES_BANETTE] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 12, }, [SPECIES_SEVIPER] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 8, }, [SPECIES_ZANGOOSE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 5, }, [SPECIES_RELICANTH] = { - .size = 0x77, + .size = MON_COORDS_SIZE(56, 56), .y_offset = 11, }, [SPECIES_ARON] = { - .size = 0x43, + .size = MON_COORDS_SIZE(32, 24), .y_offset = 20, }, [SPECIES_LAIRON] = { - .size = 0x75, + .size = MON_COORDS_SIZE(56, 40), .y_offset = 13, }, [SPECIES_AGGRON] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_CASTFORM] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 17, }, [SPECIES_VOLBEAT] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_ILLUMISE] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 8, }, [SPECIES_LILEEP] = { - .size = 0x67, + .size = MON_COORDS_SIZE(48, 56), .y_offset = 7, }, [SPECIES_CRADILY] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 0, }, [SPECIES_ANORITH] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 8, }, [SPECIES_ARMALDO] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_RALTS] = { - .size = 0x35, + .size = MON_COORDS_SIZE(24, 40), .y_offset = 15, }, [SPECIES_KIRLIA] = { - .size = 0x47, + .size = MON_COORDS_SIZE(32, 56), .y_offset = 6, }, [SPECIES_GARDEVOIR] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 1, }, [SPECIES_BAGON] = { - .size = 0x56, + .size = MON_COORDS_SIZE(40, 48), .y_offset = 11, }, [SPECIES_SHELGON] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 9, }, [SPECIES_SALAMENCE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_BELDUM] = { - .size = 0x55, + .size = MON_COORDS_SIZE(40, 40), .y_offset = 15, }, [SPECIES_METANG] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 7, }, [SPECIES_METAGROSS] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 6, }, [SPECIES_REGIROCK] = { - .size = 0x78, + .size = MON_COORDS_SIZE(56, 64), .y_offset = 4, }, [SPECIES_REGICE] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_REGISTEEL] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 3, }, [SPECIES_KYOGRE] = { - .size = 0x87, + .size = MON_COORDS_SIZE(64, 56), .y_offset = 4, }, [SPECIES_GROUDON] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_RAYQUAZA] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 0, }, [SPECIES_LATIAS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_LATIOS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 2, }, [SPECIES_JIRACHI] = { - .size = 0x66, + .size = MON_COORDS_SIZE(48, 48), .y_offset = 13, }, [SPECIES_DEOXYS] = { - .size = 0x88, + .size = MON_COORDS_SIZE(64, 64), .y_offset = 1, }, [SPECIES_CHIMECHO] = { - .size = 0x37, + .size = MON_COORDS_SIZE(24, 56), .y_offset = 6, }, [SPECIES_EGG] = { - .size = 0x33, + .size = MON_COORDS_SIZE(24, 24), .y_offset = 20, }, [SPECIES_UNOWN_B] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 16, }, [SPECIES_UNOWN_C] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 16, }, [SPECIES_UNOWN_D] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 16, }, [SPECIES_UNOWN_E] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 17, }, [SPECIES_UNOWN_F] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 17, }, [SPECIES_UNOWN_G] = { - .size = 0x35, + .size = MON_COORDS_SIZE(24, 40), .y_offset = 14, }, [SPECIES_UNOWN_H] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 16, }, [SPECIES_UNOWN_I] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 16, }, [SPECIES_UNOWN_J] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 17, }, [SPECIES_UNOWN_K] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 17, }, [SPECIES_UNOWN_L] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 19, }, [SPECIES_UNOWN_M] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 19, }, [SPECIES_UNOWN_N] = { - .size = 0x43, + .size = MON_COORDS_SIZE(32, 24), .y_offset = 20, }, [SPECIES_UNOWN_O] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 16, }, [SPECIES_UNOWN_P] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 19, }, [SPECIES_UNOWN_Q] = { - .size = 0x43, + .size = MON_COORDS_SIZE(32, 24), .y_offset = 21, }, [SPECIES_UNOWN_R] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 19, }, [SPECIES_UNOWN_S] = { - .size = 0x45, + .size = MON_COORDS_SIZE(32, 40), .y_offset = 12, }, [SPECIES_UNOWN_T] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 18, }, [SPECIES_UNOWN_U] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 18, }, [SPECIES_UNOWN_V] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 18, }, [SPECIES_UNOWN_W] = { - .size = 0x44, + .size = MON_COORDS_SIZE(32, 32), .y_offset = 19, }, [SPECIES_UNOWN_X] = { - .size = 0x33, + .size = MON_COORDS_SIZE(24, 24), .y_offset = 21, }, [SPECIES_UNOWN_Y] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 17, }, [SPECIES_UNOWN_Z] = { - .size = 0x34, + .size = MON_COORDS_SIZE(24, 32), .y_offset = 16, }, [SPECIES_UNOWN_EMARK] = { - .size = 0x35, + .size = MON_COORDS_SIZE(24, 40), .y_offset = 15, }, [SPECIES_UNOWN_QMARK] = { - .size = 0x35, + .size = MON_COORDS_SIZE(24, 40), .y_offset = 13, }, }; From d20341646a2ddf40ec4f8bfde235ba442093abb0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 1 Nov 2021 12:41:21 -0400 Subject: [PATCH 154/417] Start battle_anim_mons doc --- include/battle_anim.h | 8 +- src/battle_anim_effects_1.c | 6 +- src/battle_anim_effects_2.c | 4 +- src/battle_anim_effects_3.c | 4 +- src/battle_anim_ghost.c | 4 +- src/battle_anim_ice.c | 4 +- src/battle_anim_mon_movement.c | 12 +- src/battle_anim_mons.c | 208 ++++++++++++++++++++------------ src/battle_anim_psychic.c | 2 +- src/battle_anim_utility_funcs.c | 2 +- src/pokemon_icon.c | 2 +- 11 files changed, 154 insertions(+), 102 deletions(-) diff --git a/include/battle_anim.h b/include/battle_anim.h index 3f73f1daf6..01931125fc 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -113,7 +113,7 @@ void GetBattleAnimBgData(struct BattleAnimBgData*, u32 arg1); u8 GetBattlerSpriteSubpriority(u8 battlerId); bool8 TranslateAnimHorizontalArc(struct Sprite *sprite); void sub_80A6630(struct Sprite *sprite); -void TranslateMonSpriteLinearFixedPoint(struct Sprite *sprite); +void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite); void ResetSpriteRotScale(u8 spriteId); void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation); void InitSpriteDataForLinearTranslation(struct Sprite *sprite); @@ -123,7 +123,7 @@ u32 GetBattleBgPalettesMask(u8 battleBackground, u8 attacker, u8 target, u8 atta u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLeft, u8 opponentRight); u8 AnimDummyReturnArg(u8 battler); s16 CloneBattlerSpriteWithBlend(u8); -void obj_delete_but_dont_free_vram(struct Sprite*); +void DestroySpriteWithActiveSheet(struct Sprite*); u8 CreateInvisibleSpriteCopy(int, u8, int); void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void*, bool32); void AnimLoadCompressedBgGfx(u32, const u32*, u32); @@ -138,7 +138,7 @@ void AnimLoadCompressedBgTilemap(u32 bgId, const void *src); void InitAnimFastLinearTranslationWithSpeed(struct Sprite *sprite); bool8 AnimFastTranslateLinear(struct Sprite *sprite); void InitAndRunAnimFastLinearTranslation(struct Sprite *sprite); -void TranslateMonSpriteLinear(struct Sprite *sprite); +void TranslateSpriteLinearById(struct Sprite *sprite); void TranslateSpriteLinear(struct Sprite *sprite); void AnimSpriteOnMonPos(struct Sprite *sprite); void InitAnimLinearTranslationWithSpeedAndPos(struct Sprite *sprite); @@ -157,7 +157,7 @@ void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId); u8 GetBattlerSide(u8 battler); u8 GetBattlerPosition(u8 battler); u8 GetBattlerAtPosition(u8 position); -void sub_80A64EC(struct Sprite *sprite); +void ConvertPosDataToTranslateLinearData(struct Sprite *sprite); void InitAnimFastLinearTranslationWithSpeedAndPos(struct Sprite *sprite); enum diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index f54ebfbf7e..1966250ad6 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -4442,7 +4442,7 @@ static void AnimBowMon_Step1(struct Sprite* sprite) sprite->data[2] = 0; sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker]; StoreSpriteCallbackInData6(sprite, AnimBowMon_Step1_Callback); - sprite->callback = TranslateMonSpriteLinear; + sprite->callback = TranslateSpriteLinearById; } static void AnimBowMon_Step1_Callback(struct Sprite* sprite) @@ -4472,7 +4472,7 @@ static void AnimBowMon_Step2(struct Sprite* sprite) sprite->data[2] = 0; sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker]; StoreSpriteCallbackInData6(sprite, AnimBowMon_Step4); - sprite->callback = TranslateMonSpriteLinear; + sprite->callback = TranslateSpriteLinearById; } static void AnimBowMon_Step3(struct Sprite* sprite) @@ -5226,7 +5226,7 @@ static void AnimDoubleTeam(struct Sprite* sprite) if (sprite->data[0] > 64) { gTasks[sprite->data[2]].data[3]--; - obj_delete_but_dont_free_vram(sprite); + DestroySpriteWithActiveSheet(sprite); } else { diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 27149873d6..e25c71007f 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -2113,7 +2113,7 @@ static void CreateMinimizeSprite(struct Task* task, u8 taskId) { if ((matrixNum = AllocOamMatrix()) == 0xFF) { - obj_delete_but_dont_free_vram(&gSprites[spriteId]); + DestroySpriteWithActiveSheet(&gSprites[spriteId]); } else { @@ -2141,7 +2141,7 @@ static void ClonedMinizeSprite_Step(struct Sprite *sprite) { gTasks[sprite->data[1]].data[sprite->data[2]]--; FreeOamMatrix(sprite->oam.matrixNum); - obj_delete_but_dont_free_vram(sprite); + DestroySpriteWithActiveSheet(sprite); } } diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 85dee52871..6bf53c5d6e 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -4896,7 +4896,7 @@ void AnimTask_OdorSleuthMovement(u8 taskId) spriteId2 = CloneBattlerSpriteWithBlend(ANIM_TARGET); if (spriteId2 < 0) { - obj_delete_but_dont_free_vram(&gSprites[spriteId1]); + DestroySpriteWithActiveSheet(&gSprites[spriteId1]); DestroyAnimVisualTask(taskId); return; } @@ -4974,7 +4974,7 @@ static void MoveOdorSleuthClone(struct Sprite *sprite) if (sprite->data[5] < 0) { gTasks[sprite->data[6]].data[sprite->data[7]]--; - obj_delete_but_dont_free_vram(sprite); + DestroySpriteWithActiveSheet(sprite); } } break; diff --git a/src/battle_anim_ghost.c b/src/battle_anim_ghost.c index 03a003c604..16daa42196 100644 --- a/src/battle_anim_ghost.c +++ b/src/battle_anim_ghost.c @@ -567,7 +567,7 @@ static void AnimTask_NightmareClone_Step(u8 taskId) break; if (task->data[1] <= 80) break; - obj_delete_but_dont_free_vram(&gSprites[task->data[0]]); + DestroySpriteWithActiveSheet(&gSprites[task->data[0]]); task->data[4] = 1; break; case 1: @@ -723,7 +723,7 @@ static void AnimTask_SpiteTargetShadow_Step3(u8 taskId) break; case 2: gSprites[task->data[14]].invisible = TRUE; - obj_delete_but_dont_free_vram(&gSprites[task->data[0]]); + DestroySpriteWithActiveSheet(&gSprites[task->data[0]]); FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON); SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); diff --git a/src/battle_anim_ice.c b/src/battle_anim_ice.c index 95c64f7cad..1d65d9570c 100644 --- a/src/battle_anim_ice.c +++ b/src/battle_anim_ice.c @@ -538,7 +538,7 @@ static void AnimUnusedIceCrystalThrow(struct Sprite *sprite) sprite->data[2] = gBattleAnimArgs[2] + targetX; sprite->data[3] = gBattleAnimArgs[1] + attackerY; sprite->data[4] = gBattleAnimArgs[3] + targetY; - sub_80A64EC(sprite); + ConvertPosDataToTranslateLinearData(sprite); for (;(targetX >= -32 && targetX <= DISPLAY_WIDTH + 32) && (targetY >= -32 && targetY <= DISPLAY_HEIGHT + 32); targetX += sprite->data[1], targetY += sprite->data[2]) @@ -557,7 +557,7 @@ static void AnimUnusedIceCrystalThrow(struct Sprite *sprite) sprite->data[2] = targetX; sprite->data[3] = attackerY; sprite->data[4] = targetY; - sub_80A64EC(sprite); + ConvertPosDataToTranslateLinearData(sprite); sprite->data[3] = gBattleAnimArgs[5]; sprite->data[4] = gBattleAnimArgs[6]; sprite->callback = AnimUnusedIceCrystalThrow_Step; diff --git a/src/battle_anim_mon_movement.c b/src/battle_anim_mon_movement.c index 31857c4dcc..ba2cbe29ac 100644 --- a/src/battle_anim_mon_movement.c +++ b/src/battle_anim_mon_movement.c @@ -441,14 +441,14 @@ static void DoHorizontalLunge(struct Sprite *sprite) sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker]; sprite->data[4] = gBattleAnimArgs[0]; StoreSpriteCallbackInData6(sprite, ReverseHorizontalLungeDirection); - sprite->callback = TranslateMonSpriteLinear; + sprite->callback = TranslateSpriteLinearById; } static void ReverseHorizontalLungeDirection(struct Sprite *sprite) { sprite->data[0] = sprite->data[4]; sprite->data[1] = -sprite->data[1]; - sprite->callback = TranslateMonSpriteLinear; + sprite->callback = TranslateSpriteLinearById; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } @@ -468,14 +468,14 @@ static void DoVerticalDip(struct Sprite *sprite) sprite->data[3] = spriteId; sprite->data[4] = gBattleAnimArgs[0]; StoreSpriteCallbackInData6(sprite, ReverseVerticalDipDirection); - sprite->callback = TranslateMonSpriteLinear; + sprite->callback = TranslateSpriteLinearById; } static void ReverseVerticalDipDirection(struct Sprite *sprite) { sprite->data[0] = sprite->data[4]; sprite->data[2] = -sprite->data[2]; - sprite->callback = TranslateMonSpriteLinear; + sprite->callback = TranslateSpriteLinearById; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } @@ -581,7 +581,7 @@ static void SlideMonToOffset(struct Sprite *sprite) sprite->data[5] = monSpriteId; sprite->invisible = TRUE; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); - sprite->callback = TranslateMonSpriteLinearFixedPoint; + sprite->callback = TranslateSpriteLinearByIdFixedPoint; } static void SlideMonToOffsetAndBack(struct Sprite *sprite) @@ -622,7 +622,7 @@ static void SlideMonToOffsetAndBack(struct Sprite *sprite) { StoreSpriteCallbackInData6(sprite, SlideMonToOffsetAndBack_End); } - sprite->callback = TranslateMonSpriteLinearFixedPoint; + sprite->callback = TranslateSpriteLinearByIdFixedPoint; } diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 5c170adf22..75e1dadf7e 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -23,15 +23,15 @@ extern const struct OamData gOamData_AffineNormal_ObjNormal_64x64; static void sub_80A6FB4(struct Sprite *sprite); static void AnimFastTranslateLinearWaitEnd(struct Sprite *sprite); static void AnimThrowProjectile_Step(struct Sprite *sprite); -static void sub_80A8DFC(struct Sprite *sprite); +static void AnimBattlerTrace(struct Sprite *sprite); static void AnimWeatherBallUp_Step(struct Sprite *sprite); static u16 GetBattlerYDeltaFromSpriteId(u8 spriteId); static void AnimTask_BlendPalInAndOutSetup(struct Task *task); static void AnimTask_AlphaFadeIn_Step(u8 taskId); static void AnimTask_AttackerPunchWithTrace_Step(u8 taskId); static void AnimTask_BlendMonInAndOut_Step(u8 taskId); -static bool8 sub_80A7238(void); -static void sub_80A8D78(struct Task *task, u8 taskId); +static bool8 ShouldRotScaleSpeciesBeFlipped(void); +static void CreateBattlerTrace(struct Task *task, u8 taskId); EWRAM_DATA static union AffineAnimCmd *sAnimTaskAffineAnim = NULL; @@ -285,8 +285,8 @@ u8 GetBattlerSpriteFinal_Y(u8 battlerId, u16 species, bool8 a3) { if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) y += 8; - if (y > 104) - y = 104; + if (y > DISPLAY_HEIGHT - MON_PIC_HEIGHT + 8) + y = DISPLAY_HEIGHT - MON_PIC_HEIGHT + 8; } return y; } @@ -465,7 +465,8 @@ void TranslateSpriteInGrowingCircleOverDuration(struct Sprite *sprite) } } -void sub_80A63C8(struct Sprite *sprite) +// Unused +static void sub_80A63C8(struct Sprite *sprite) { if (sprite->data[3]) { @@ -519,34 +520,47 @@ void WaitAnimForDuration(struct Sprite *sprite) SetCallbackToStoredInData6(sprite); } -static void sub_80A64D0(struct Sprite *sprite) +// Sprite data for ConvertPosDataToTranslateLinearData +#define sStepsX data[0] +#define sStartX data[1] +#define sTargetX data[2] +#define sStartY data[3] +#define sTargetY data[4] + +// Sprite data for TranslateSpriteLinear +#define sMoveSteps data[0] +#define sSpeedX data[1] +#define sSpeedY data[2] + +// Functionally unused +static void AnimPosToTranslateLinear(struct Sprite *sprite) { - sub_80A64EC(sprite); + ConvertPosDataToTranslateLinearData(sprite); sprite->callback = TranslateSpriteLinear; sprite->callback(sprite); } -void sub_80A64EC(struct Sprite *sprite) +void ConvertPosDataToTranslateLinearData(struct Sprite *sprite) { s16 old; int xDiff; - if (sprite->data[1] > sprite->data[2]) - sprite->data[0] = -sprite->data[0]; - xDiff = sprite->data[2] - sprite->data[1]; - old = sprite->data[0]; - sprite->data[0] = abs(xDiff / sprite->data[0]); - sprite->data[2] = (sprite->data[4] - sprite->data[3]) / sprite->data[0]; - sprite->data[1] = old; + if (sprite->sStartX > sprite->sTargetX) + sprite->sStepsX = -sprite->sStepsX; + xDiff = sprite->sTargetX - sprite->sStartX; + old = sprite->sStepsX; + sprite->sMoveSteps = abs(xDiff / sprite->sStepsX); + sprite->sSpeedY = (sprite->sTargetY - sprite->sStartY) / sprite->sMoveSteps; + sprite->sSpeedX = old; } void TranslateSpriteLinear(struct Sprite *sprite) { - if (sprite->data[0] > 0) + if (sprite->sMoveSteps > 0) { - sprite->data[0]--; - sprite->x2 += sprite->data[1]; - sprite->y2 += sprite->data[2]; + sprite->sMoveSteps--; + sprite->x2 += sprite->sSpeedX; + sprite->y2 += sprite->sSpeedY; } else { @@ -588,16 +602,18 @@ static void TranslateSpriteLinearFixedPointIconFrame(struct Sprite *sprite) UpdateMonIconFrame(sprite); } -void sub_80A65EC(struct Sprite *sprite) +// Unused +static void TranslateSpriteToBattleTargetPos(struct Sprite *sprite) { - sprite->data[1] = sprite->x + sprite->x2; - sprite->data[3] = sprite->y + sprite->y2; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); - sprite->callback = sub_80A64D0; + sprite->sStartX = sprite->x + sprite->x2; + sprite->sStartY = sprite->y + sprite->y2; + sprite->sTargetX = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->sTargetY = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); + sprite->callback = AnimPosToTranslateLinear; } -void TranslateMonSpriteLinear(struct Sprite *sprite) +// Same as TranslateSpriteLinear but takes an id to specify which sprite to move +void TranslateSpriteLinearById(struct Sprite *sprite) { if (sprite->data[0] > 0) { @@ -611,7 +627,7 @@ void TranslateMonSpriteLinear(struct Sprite *sprite) } } -void TranslateMonSpriteLinearFixedPoint(struct Sprite *sprite) +void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite) { if (sprite->data[0] > 0) { @@ -654,16 +670,18 @@ void DestroySpriteAndMatrix(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_80A6760(struct Sprite *sprite) +// Unused +static void TranslateSpriteToBattleAttackerPos(struct Sprite *sprite) { - sprite->data[1] = sprite->x + sprite->x2; - sprite->data[3] = sprite->y + sprite->y2; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); - sprite->callback = sub_80A64D0; + sprite->sStartX = sprite->x + sprite->x2; + sprite->sStartY = sprite->y + sprite->y2; + sprite->sTargetX = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->sTargetY = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + sprite->callback = AnimPosToTranslateLinear; } -void sub_80A67A4(struct Sprite *sprite) +// Unused +static void sub_80A67A4(struct Sprite *sprite) { ResetPaletteStructByUid(sprite->data[5]); DestroySpriteAndMatrix(sprite); @@ -1038,7 +1056,8 @@ void StartAnimLinearTranslation(struct Sprite *sprite) sprite->callback(sprite); } -void sub_80A6F14(struct Sprite *sprite) +// Unused +static void sub_80A6F14(struct Sprite *sprite) { sprite->data[1] = sprite->x; sprite->data[3] = sprite->y; @@ -1083,6 +1102,7 @@ void AnimTranslateLinear_WaitEnd(struct Sprite *sprite) SetCallbackToStoredInData6(sprite); } +// Functionally unused static void sub_80A6FB4(struct Sprite *sprite) { sub_8039E9C(sprite); @@ -1204,7 +1224,7 @@ void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation) src.xScale = xScale; src.yScale = yScale; src.rotation = rotation; - if (sub_80A7238()) + if (ShouldRotScaleSpeciesBeFlipped()) src.xScale = -src.xScale; i = gSprites[spriteId].oam.matrixNum; ObjAffineSet(&src, &matrix, 1, 2); @@ -1214,7 +1234,8 @@ void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation) gOamMatrices[i].d = matrix.d; } -static bool8 sub_80A7238(void) +// Pokémon in Contests (except Unown) should be flipped. +static bool8 ShouldRotScaleSpeciesBeFlipped(void) { if (IsContest()) { @@ -1279,7 +1300,7 @@ void TrySetSpriteRotScale(struct Sprite *sprite, bool8 recalcCenterVector, s16 x src.xScale = xScale; src.yScale = yScale; src.rotation = rotation; - if (sub_80A7238()) + if (ShouldRotScaleSpeciesBeFlipped()) src.xScale = -src.xScale; i = sprite->oam.matrixNum; ObjAffineSet(&src, &matrix, 1, 2); @@ -1583,7 +1604,7 @@ s16 CloneBattlerSpriteWithBlend(u8 animBattler) return -1; } -void obj_delete_but_dont_free_vram(struct Sprite *sprite) +void DestroySpriteWithActiveSheet(struct Sprite *sprite) { sprite->usingSheet = TRUE; DestroySprite(sprite); @@ -2329,6 +2350,19 @@ void AnimSpinningSparkle(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } +// Task and sprite data for AnimTask_AttackerPunchWithTrace +#define tBattlerSpriteId data[0] +#define tMoveSpeed data[1] +#define tState data[2] +#define tCounter data[3] +#define tPaletteNum data[4] +#define tNumTracesActive data[5] +#define tPriority data[6] + +#define sActiveTime data[0] +#define sTaskId data[1] +#define sSpriteId data[2] + // Slides attacker to right and back with a cloned trace of the specified color // arg0: Trace palette blend color // arg1: Trace palette blend coeff @@ -2338,21 +2372,24 @@ void AnimTask_AttackerPunchWithTrace(u8 taskId) u16 dest; struct Task *task = &gTasks[taskId]; - task->data[0] = GetAnimBattlerSpriteId(ANIM_ATTACKER); - task->data[1] = ((GetBattlerSide(gBattleAnimAttacker)) != B_SIDE_PLAYER) ? -8 : 8; - task->data[2] = 0; - task->data[3] = 0; - gSprites[task->data[0]].x2 -= task->data[0]; - task->data[4] = AllocSpritePalette(ANIM_TAG_BENT_SPOON); - task->data[5] = 0; + task->tBattlerSpriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + task->tMoveSpeed = (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) ? -8 : 8; + task->tState = 0; + task->tCounter = 0; + gSprites[task->tBattlerSpriteId].x2 -= task->tBattlerSpriteId; + task->tPaletteNum = AllocSpritePalette(ANIM_TAG_BENT_SPOON); + task->tNumTracesActive = 0; - dest = (task->data[4] + 0x10) * 0x10; - src = (gSprites[task->data[0]].oam.paletteNum + 0x10) * 0x10; - task->data[6] = GetBattlerSpriteSubpriority(gBattleAnimAttacker); - if (task->data[6] == 20 || task->data[6] == 40) - task->data[6] = 2; + dest = (task->tPaletteNum + 16) * 16; + src = (gSprites[task->tBattlerSpriteId].oam.paletteNum + 0x10) * 0x10; + + // Set trace's priority based on battler's subpriority + task->tPriority = GetBattlerSpriteSubpriority(gBattleAnimAttacker); + if (task->tPriority == 20 || task->tPriority == 40) + task->tPriority = 2; else - task->data[6] = 3; + task->tPriority = 3; + CpuCopy32(&gPlttBufferUnfaded[src], &gPlttBufferFaded[dest], 0x20); BlendPalette(dest, 16, gBattleAnimArgs[1], gBattleAnimArgs[0]); task->func = AnimTask_AttackerPunchWithTrace_Step; @@ -2361,28 +2398,30 @@ void AnimTask_AttackerPunchWithTrace(u8 taskId) static void AnimTask_AttackerPunchWithTrace_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[2]) + switch (task->tState) { case 0: - sub_80A8D78(task, taskId); - gSprites[task->data[0]].x2 += task->data[1]; - if (++task->data[3] == 5) + // Move forward + CreateBattlerTrace(task, taskId); + gSprites[task->tBattlerSpriteId].x2 += task->tMoveSpeed; + if (++task->tCounter == 5) { - task->data[3]--; - task->data[2]++; + task->tCounter--; + task->tState++; } break; case 1: - sub_80A8D78(task, taskId); - gSprites[task->data[0]].x2 -= task->data[1]; - if (--task->data[3] == 0) + // Move back (do same number of traces as before) + CreateBattlerTrace(task, taskId); + gSprites[task->tBattlerSpriteId].x2 -= task->tMoveSpeed; + if (--task->tCounter == 0) { - gSprites[task->data[0]].x2 = 0; - task->data[2]++; + gSprites[task->tBattlerSpriteId].x2 = 0; + task->tState++; } break; case 2: - if (!task->data[5]) + if (task->tNumTracesActive == 0) { FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON); DestroyAnimVisualTask(taskId); @@ -2391,31 +2430,44 @@ static void AnimTask_AttackerPunchWithTrace_Step(u8 taskId) } } -static void sub_80A8D78(struct Task *task, u8 taskId) +static void CreateBattlerTrace(struct Task *task, u8 taskId) { s16 spriteId = CloneBattlerSpriteWithBlend(0); if (spriteId >= 0) { - gSprites[spriteId].oam.priority = task->data[6]; - gSprites[spriteId].oam.paletteNum = task->data[4]; - gSprites[spriteId].data[0] = 8; - gSprites[spriteId].data[1] = taskId; - gSprites[spriteId].data[2] = spriteId; - gSprites[spriteId].x2 = gSprites[task->data[0]].x2; - gSprites[spriteId].callback = sub_80A8DFC; - task->data[5]++; + gSprites[spriteId].oam.priority = task->tPriority; + gSprites[spriteId].oam.paletteNum = task->tPaletteNum; + gSprites[spriteId].sActiveTime = 8; + gSprites[spriteId].sTaskId = taskId; + gSprites[spriteId].sSpriteId = spriteId; + gSprites[spriteId].x2 = gSprites[task->tBattlerSpriteId].x2; + gSprites[spriteId].callback = AnimBattlerTrace; + task->tNumTracesActive++; } } -static void sub_80A8DFC(struct Sprite *sprite) +// Just waits until destroyed +static void AnimBattlerTrace(struct Sprite *sprite) { - if (--sprite->data[0] == 0) + if (--sprite->sActiveTime == 0) { - gTasks[sprite->data[1]].data[5]--; - obj_delete_but_dont_free_vram(sprite); + gTasks[sprite->sTaskId].tNumTracesActive--; + DestroySpriteWithActiveSheet(sprite); } } +#undef tBattlerSpriteId +#undef tMoveSpeed +#undef tState +#undef tCounter +#undef tPaletteNum +#undef tNumTracesActive +#undef tPriority + +#undef sActiveTime +#undef sTaskId +#undef sSpriteId + void AnimWeatherBallUp(struct Sprite *sprite) { sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); diff --git a/src/battle_anim_psychic.c b/src/battle_anim_psychic.c index b3c7b4ce8e..c98f311bd1 100644 --- a/src/battle_anim_psychic.c +++ b/src/battle_anim_psychic.c @@ -1108,7 +1108,7 @@ static void AnimTask_TransparentCloneGrowAndShrink_Step(u8 taskId) task->data[0]++; break; case 2: - obj_delete_but_dont_free_vram(&gSprites[task->data[15]]); + DestroySpriteWithActiveSheet(&gSprites[task->data[15]]); task->data[0]++; break; case 3: diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index b0eab5b743..e2c674c57f 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -267,7 +267,7 @@ static void AnimMonTrace(struct Sprite *sprite) else { gTasks[sprite->data[1]].data[sprite->data[2]]--; - obj_delete_but_dont_free_vram(sprite); + DestroySpriteWithActiveSheet(sprite); } } diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 58d0b34200..2c010f35e6 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1116,7 +1116,7 @@ u16 GetIconSpeciesNoPersonality(u16 species) } else { - if (species > (SPECIES_UNOWN_B - 1)) + if (species > NUM_SPECIES) species = INVALID_ICON_SPECIES; return GetIconSpecies(species, 0); } From ae2602b5a576c2bcbea1c978b7943ce3c747e329 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 8 Nov 2021 11:46:38 -0500 Subject: [PATCH 155/417] Add missing BATTLER_COORD usage --- src/battle_anim_effects_1.c | 57 ++++++++++---------- src/battle_anim_effects_2.c | 104 ++++++++++++++++++------------------ src/battle_anim_effects_3.c | 76 +++++++++++++------------- src/battle_anim_electric.c | 4 +- src/battle_anim_fight.c | 52 +++++++++--------- src/battle_anim_fire.c | 12 ++--- src/battle_anim_flying.c | 30 +++++------ src/battle_anim_ghost.c | 38 ++++++------- src/battle_anim_ground.c | 28 +++++----- src/battle_anim_poison.c | 4 +- src/battle_anim_psychic.c | 4 +- src/battle_anim_rock.c | 12 ++--- src/battle_anim_water.c | 42 +++++++-------- 13 files changed, 231 insertions(+), 232 deletions(-) diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 1966250ad6..9d1842176e 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -2548,7 +2548,7 @@ static void AnimPetalDanceSmallFlower(struct Sprite* sprite) sprite->data[1] = sprite->x; sprite->data[2] = sprite->x; sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2]; + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; InitAnimLinearTranslation(sprite); sprite->data[5] = 0x40; sprite->callback = AnimPetalDanceSmallFlower_Step; @@ -2971,8 +2971,8 @@ static void AnimIngrainOrb(struct Sprite* sprite) { if (!sprite->data[0]) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[1]; sprite->data[1] = gBattleAnimArgs[2]; sprite->data[2] = gBattleAnimArgs[3]; sprite->data[3] = gBattleAnimArgs[4]; @@ -3309,8 +3309,8 @@ void AnimTask_LeafBlade(u8 taskId) struct Task *task = &gTasks[taskId]; task->data[4] = GetBattlerSpriteSubpriority(gBattleAnimTarget) - 1; - task->data[6] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - task->data[7] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + task->data[6] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + task->data[7] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); task->data[10] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_WIDTH); task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_HEIGHT); task->data[5] = (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT) ? 1 : -1; @@ -3601,11 +3601,11 @@ static void AnimFlyingParticle(struct Sprite* sprite) sprite->oam.priority = GetBattlerSpriteBGPriority(battler) + 1; break; case 2: - sprite->y = GetBattlerSpriteCoord(battler, 3) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[0]; sprite->oam.priority = GetBattlerSpriteBGPriority(battler); break; case 3: - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[0]; GetAnimBattlerSpriteId(ANIM_TARGET); sprite->oam.priority = GetBattlerSpriteBGPriority(battler) + 1; break; @@ -3681,13 +3681,13 @@ static void AnimNeedleArmSpike(struct Sprite* sprite) { if (gBattleAnimArgs[0] == 0) { - a = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - b = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + a = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + b = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); } else { - a = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - b = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + a = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + b = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); } sprite->data[0] = gBattleAnimArgs[4]; @@ -3790,8 +3790,8 @@ static void AnimFlickeringPunch(struct Sprite* sprite) // arg 2: slice direction; 0 = right-to-left, 1 = left-to-right static void AnimCuttingSlice(struct Sprite* sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) sprite->y += 8; @@ -3816,32 +3816,31 @@ static void AnimCuttingSlice(struct Sprite* sprite) static void AnimAirCutterSlice(struct Sprite* sprite) { - u8 a; - u8 b; + u8 x, y; switch (gBattleAnimArgs[3]) { case 1: - a = GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimTarget), 0); - b = GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimTarget), 1); + x = GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimTarget), BATTLER_COORD_X); + y = GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimTarget), BATTLER_COORD_Y); break; case 2: - a = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - b = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget))) { - a = (GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimTarget), 0) + a) / 2; - b = (GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimTarget), 1) + b) / 2; + x = (GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimTarget), BATTLER_COORD_X) + x) / 2; + y = (GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimTarget), BATTLER_COORD_Y) + y) / 2; } break; case 0: default: - a = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - b = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); break; } - sprite->x = a; - sprite->y = b; + sprite->x = x; + sprite->y = y; if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) sprite->y += 8; @@ -3956,8 +3955,8 @@ static void AnimProtect(struct Sprite* sprite) if (IsContest()) gBattleAnimArgs[1] += 8; - sprite->x = GetBattlerSpriteCoord2(gBattleAnimAttacker, 0) + gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord2(gBattleAnimAttacker, 1) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord2(gBattleAnimAttacker, BATTLER_COORD_X) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord2(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[1]; if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER || IsContest()) sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimAttacker) + 1; else @@ -4016,8 +4015,8 @@ static void AnimProtect_Step(struct Sprite *sprite) static void AnimMilkBottle(struct Sprite* sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 0xFFE8; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + 0xFFE8; sprite->data[0] = 0; sprite->data[1] = 0; sprite->data[2] = 0; diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index e25c71007f..fcdb56a103 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -1329,8 +1329,8 @@ static void AnimVibrateBattlerBack_Step(struct Sprite *sprite) static void AnimVibrateBattlerBack(struct Sprite *sprite) { u8 spriteId; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); spriteId = gBattlerSpriteIds[gBattleAnimTarget]; if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) sprite->x -= gBattleAnimArgs[0]; @@ -1498,8 +1498,8 @@ static void AnimSonicBoomProjectile(struct Sprite *sprite) } InitSpritePosToAnimAttacker(sprite, TRUE); - targetXPos = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2]; - targetYPos = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; + targetXPos = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2]; + targetYPos = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; rotation = ArcTan2Neg(targetXPos - sprite->x, targetYPos - sprite->y); rotation += 0xF000; if (IsContest()) @@ -1772,8 +1772,8 @@ static void AnimCoinThrow(struct Sprite *sprite) u16 var; InitSpritePosToAnimAttacker(sprite, TRUE); - r6 = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - r7 = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; + r6 = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + r7 = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; @@ -2467,7 +2467,7 @@ static void AnimTask_SketchDrawMon_Step(u8 taskId) static void AnimPencil(struct Sprite *sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) - 16; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X) - 16; sprite->y = GetBattlerYCoordWithElevation(gBattleAnimTarget) + 16; sprite->data[0] = 0; sprite->data[1] = 0; @@ -2555,9 +2555,9 @@ static void AnimBlendThinRing(struct Sprite *sprite) { SetAverageBattlerPositions(battler, r4, &sp0, &sp1); if (r4 == 0) - r4 = GetBattlerSpriteCoord(battler, 0); + r4 = GetBattlerSpriteCoord(battler, BATTLER_COORD_X); else - r4 = GetBattlerSpriteCoord(battler, 2); + r4 = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2); if (GetBattlerSide(battler) != B_SIDE_PLAYER) gBattleAnimArgs[0] -= (sp0 - r4) - gBattleAnimArgs[0]; // This is weird. @@ -2580,14 +2580,14 @@ static void AnimHyperVoiceRing_WaitEnd(struct Sprite *sprite) static void AnimHyperVoiceRing(struct Sprite *sprite) { - u16 r9 = 0; - u16 r6 = 0; - s16 sp0 = 0; - s16 sp1 = 0; - u8 sp4; + u16 startX = 0; + u16 startY = 0; + s16 x = 0; + s16 y = 0; + u8 yCoordType; u8 battler1; u8 battler2; - u8 r10; + u8 xCoordType; if (gBattleAnimArgs[5] == 0) { @@ -2602,18 +2602,18 @@ static void AnimHyperVoiceRing(struct Sprite *sprite) if (!gBattleAnimArgs[6]) { - r10 = 0; - sp4 = 1; + xCoordType = BATTLER_COORD_X; + yCoordType = BATTLER_COORD_Y; } else { - r10 = 2; - sp4 = 3; + xCoordType = BATTLER_COORD_X_2; + yCoordType = BATTLER_COORD_Y_PIC_OFFSET; } if (GetBattlerSide(battler1) != B_SIDE_PLAYER) { - r9 = GetBattlerSpriteCoord(battler1, r10) + gBattleAnimArgs[0]; + startX = GetBattlerSpriteCoord(battler1, xCoordType) + gBattleAnimArgs[0]; if (IsBattlerSpriteVisible(BATTLE_PARTNER(battler2))) sprite->subpriority = gSprites[gBattlerSpriteIds[BATTLE_PARTNER(battler2)]].subpriority - 1; else @@ -2621,7 +2621,7 @@ static void AnimHyperVoiceRing(struct Sprite *sprite) } else { - r9 = GetBattlerSpriteCoord(battler1, r10) - gBattleAnimArgs[0]; + startX = GetBattlerSpriteCoord(battler1, xCoordType) - gBattleAnimArgs[0]; if (!IsContest() && IsBattlerSpriteVisible(BATTLE_PARTNER(battler1))) { if (gSprites[gBattlerSpriteIds[battler1]].x < gSprites[gBattlerSpriteIds[BATTLE_PARTNER(battler1)]].x) @@ -2636,27 +2636,27 @@ static void AnimHyperVoiceRing(struct Sprite *sprite) } - r6 = GetBattlerSpriteCoord(battler1, sp4) + gBattleAnimArgs[1]; + startY = GetBattlerSpriteCoord(battler1, yCoordType) + gBattleAnimArgs[1]; if (!IsContest() && IsBattlerSpriteVisible(BATTLE_PARTNER(battler2))) { - SetAverageBattlerPositions(battler2, gBattleAnimArgs[6], &sp0, &sp1); + SetAverageBattlerPositions(battler2, gBattleAnimArgs[6], &x, &y); } else { - sp0 = GetBattlerSpriteCoord(battler2, r10); - sp1 = GetBattlerSpriteCoord(battler2, sp4); + x = GetBattlerSpriteCoord(battler2, xCoordType); + y = GetBattlerSpriteCoord(battler2, yCoordType); } if (GetBattlerSide(battler2)) - sp0 += gBattleAnimArgs[3]; + x += gBattleAnimArgs[3]; else - sp0 -= gBattleAnimArgs[3]; + x -= gBattleAnimArgs[3]; - sp1 += gBattleAnimArgs[4]; - sprite->x = sprite->data[1] = r9; - sprite->y = sprite->data[3] = r6; - sprite->data[2] = sp0; - sprite->data[4] = sp1; + y += gBattleAnimArgs[4]; + sprite->x = sprite->data[1] = startX; + sprite->y = sprite->data[3] = startY; + sprite->data[2] = x; + sprite->data[4] = y; sprite->data[0] = gBattleAnimArgs[0]; InitAnimLinearTranslation(sprite); sprite->callback = AnimHyperVoiceRing_WaitEnd; @@ -2923,8 +2923,8 @@ void AnimTask_SpeedDust(u8 taskId) task->data[7] = 0; task->data[8] = 0; task->data[13] = 0; - task->data[14] = GetBattlerSpriteCoord(gBattleAnimAttacker, ANIM_ATTACKER); - task->data[15] = GetBattlerSpriteCoord(gBattleAnimAttacker, ANIM_TARGET); + task->data[14] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + task->data[15] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); task->func = AnimTask_SpeedDust_Step; } @@ -3047,8 +3047,8 @@ static void AnimHealBellMusicNote(struct Sprite *sprite) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[4]; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[2]; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[3]; + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X) + gBattleAnimArgs[2]; + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[3]; sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); SetMusicNotePalette(sprite, gBattleAnimArgs[5], gBattleAnimArgs[6]); @@ -3165,9 +3165,9 @@ static void AnimRedHeartProjectile(struct Sprite *sprite) InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = 95; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); sprite->callback = AnimRedHeartProjectile_Step; } @@ -3402,8 +3402,8 @@ static void AnimTask_ScaryFace_Step(u8 taskId) // arg 1: initial wave offset static void AnimOrbitFast(struct Sprite *sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->affineAnimPaused = 1; sprite->data[0] = gBattleAnimArgs[0]; sprite->data[1] = gBattleAnimArgs[1]; @@ -3453,8 +3453,8 @@ static void AnimOrbitFast_Step(struct Sprite *sprite) // arg 0: initial wave offset static void AnimOrbitScatter(struct Sprite *sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] = Sin(gBattleAnimArgs[0], 10); sprite->data[1] = Cos(gBattleAnimArgs[0], 7); sprite->callback = AnimOrbitScatter_Step; @@ -3479,8 +3479,8 @@ static void AnimSpitUpOrb_Step(struct Sprite *sprite) static void AnimSpitUpOrb(struct Sprite *sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] = Sin(gBattleAnimArgs[0], 10); sprite->data[1] = Cos(gBattleAnimArgs[0], 7); sprite->data[2] = gBattleAnimArgs[1]; @@ -3617,13 +3617,13 @@ static void AnimMovementWaves(struct Sprite *sprite) { if (!gBattleAnimArgs[0]) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); } if (!gBattleAnimArgs[1]) @@ -3671,8 +3671,8 @@ static void AnimJaggedMusicNote(struct Sprite *sprite) if (GetBattlerSide(battler) == B_SIDE_OPPONENT) gBattleAnimArgs[1] *= -1; - sprite->x = GetBattlerSpriteCoord(battler, 2) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(battler, 3) + gBattleAnimArgs[2]; + sprite->x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; sprite->data[0] = 0; sprite->data[1] = (u16)sprite->x << 3; sprite->data[2] = (u16)sprite->y << 3; @@ -3804,8 +3804,8 @@ static void AnimGuardRing(struct Sprite *sprite) } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 40; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + 40; } sprite->data[0] = 13; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 6bf53c5d6e..cd80519981 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -1211,8 +1211,8 @@ static void AnimBlackSmoke_Step(struct Sprite *sprite) void AnimTask_SmokescreenImpact(u8 taskId) { SmokescreenImpact( - GetBattlerSpriteCoord(gBattleAnimTarget, 2) + 8, - GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 8, + GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + 8, + GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + 8, 0); DestroyAnimVisualTask(taskId); } @@ -1247,8 +1247,8 @@ static void AnimWhiteHalo_Step2(struct Sprite *sprite) static void AnimTealAlert(struct Sprite *sprite) { u16 rotation; - u8 x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - u8 y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + u8 x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + u8 y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitSpritePosToAnimTarget(sprite, TRUE); @@ -1608,8 +1608,8 @@ static void AnimClappingHand(struct Sprite *sprite) { if (gBattleAnimArgs[3] == 0) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); } sprite->x += gBattleAnimArgs[0]; @@ -1710,13 +1710,13 @@ static void AnimRapidSpin(struct Sprite *sprite) { if (gBattleAnimArgs[0] == 0) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); } sprite->y2 = gBattleAnimArgs[2]; @@ -1896,8 +1896,8 @@ void AnimTask_TormentAttacker(u8 taskId) task->data[0] = 0; task->data[1] = 0; - task->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - task->data[3] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + task->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + task->data[3] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); task->data[4] = 32; task->data[5] = -20; task->data[6] = 0; @@ -2038,8 +2038,8 @@ static void AnimTriAttackTriangle(struct Sprite *sprite) sprite->x2 = 0; sprite->y2 = 0; sprite->data[0] = 20; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->callback = StartAnimLinearTranslation; } } @@ -2066,8 +2066,8 @@ static void AnimBatonPassPokeball(struct Sprite *sprite) switch (sprite->data[0]) { case 0: - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_NORMAL); sprite->data[1] = 256; sprite->data[2] = 256; @@ -2222,7 +2222,7 @@ static void AnimSwallowBlueOrb(struct Sprite *sprite) case 0: InitSpritePosToAnimAttacker(sprite, FALSE); sprite->data[1] = 0x900; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0]++; break; case 1: @@ -2476,8 +2476,8 @@ static void AnimGreenStar(struct Sprite *sprite) if (xOffset > 31) xOffset = 32 - xOffset; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + xOffset; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 32; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X) + xOffset; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + 32; sprite->data[1] = gBattleAnimArgs[0]; sprite->data[2] = gBattleAnimArgs[1]; @@ -3246,8 +3246,8 @@ void AnimTask_RolePlaySilhouette(u8 taskId) } } - coord1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - coord2 = GetBattlerSpriteCoord(gBattleAnimAttacker, 1); + coord1 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + coord2 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); spriteId = CreateAdditionalMonSpriteForMoveAnim(species, isBackPic, 0, coord1 + xOffset, coord2, 5, personality, otId, gBattleAnimTarget, TRUE); gSprites[spriteId].oam.priority = priority; @@ -4165,7 +4165,7 @@ static void AnimSmellingSaltsHand(struct Sprite *sprite) sprite->oam.tileNum += 16; sprite->data[6] = gBattleAnimArgs[2]; sprite->data[7] = gBattleAnimArgs[1] == 0 ? -1 : 1; - sprite->y = GetBattlerSpriteCoord(battler, 3); + sprite->y = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y_PIC_OFFSET); if (gBattleAnimArgs[1] == 0) { sprite->oam.matrixNum |= ST_OAM_HFLIP; @@ -4280,12 +4280,12 @@ static void AnimSmellingSaltExclamation(struct Sprite *sprite) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->y = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_TOP); } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->y = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_TOP); } @@ -4426,9 +4426,9 @@ void AnimTask_HelpingHandAttackerMovement(u8 taskId) { if (IsDoubleBattle() == TRUE) { - int x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - int y = GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimAttacker), 0); - if (x > y) + int attackerX = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + int partnerX = GetBattlerSpriteCoord(BATTLE_PARTNER(gBattleAnimAttacker), BATTLER_COORD_X); + if (attackerX > partnerX) task->data[14] = 1; else task->data[14] = -1; @@ -4566,24 +4566,24 @@ static void AnimForesightMagnifyingGlass_Step(struct Sprite *sprite) sprite->data[6] = 0; case 0: case 4: - x = GetBattlerSpriteCoordAttr(sprite->data[7], 5) - 4; - y = GetBattlerSpriteCoordAttr(sprite->data[7], 3) - 4; + x = GetBattlerSpriteCoordAttr(sprite->data[7], BATTLER_COORD_ATTR_RIGHT) - 4; + y = GetBattlerSpriteCoordAttr(sprite->data[7], BATTLER_COORD_ATTR_BOTTOM) - 4; break; case 1: - x = GetBattlerSpriteCoordAttr(sprite->data[7], 5) - 4; - y = GetBattlerSpriteCoordAttr(sprite->data[7], 2) + 4; + x = GetBattlerSpriteCoordAttr(sprite->data[7], BATTLER_COORD_ATTR_RIGHT) - 4; + y = GetBattlerSpriteCoordAttr(sprite->data[7], BATTLER_COORD_ATTR_TOP) + 4; break; case 2: - x = GetBattlerSpriteCoordAttr(sprite->data[7], 4) + 4; - y = GetBattlerSpriteCoordAttr(sprite->data[7], 3) - 4; + x = GetBattlerSpriteCoordAttr(sprite->data[7], BATTLER_COORD_ATTR_LEFT) + 4; + y = GetBattlerSpriteCoordAttr(sprite->data[7], BATTLER_COORD_ATTR_BOTTOM) - 4; break; case 3: - x = GetBattlerSpriteCoordAttr(sprite->data[7], 4) + 4; - y = GetBattlerSpriteCoordAttr(sprite->data[7], 2) - 4; + x = GetBattlerSpriteCoordAttr(sprite->data[7], BATTLER_COORD_ATTR_LEFT) + 4; + y = GetBattlerSpriteCoordAttr(sprite->data[7], BATTLER_COORD_ATTR_TOP) - 4; break; case 5: - x = GetBattlerSpriteCoord(sprite->data[7], 2); - y = GetBattlerSpriteCoord(sprite->data[7], 3); + x = GetBattlerSpriteCoord(sprite->data[7], BATTLER_COORD_X_2); + y = GetBattlerSpriteCoord(sprite->data[7], BATTLER_COORD_Y_PIC_OFFSET); break; } @@ -4814,7 +4814,7 @@ static void AnimBlockX(struct Sprite *sprite) y = -96; } - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->y2 = y; sprite->callback = AnimBlockX_Step; } diff --git a/src/battle_anim_electric.c b/src/battle_anim_electric.c index a9a876920f..bd527d244c 100644 --- a/src/battle_anim_electric.c +++ b/src/battle_anim_electric.c @@ -682,8 +682,8 @@ static void AnimElectricity(struct Sprite *sprite) // The vertical falling thunder bolt used in Thunder Wave/Shock/Bolt void AnimTask_ElectricBolt(u8 taskId) { - gTasks[taskId].data[0] = GetBattlerSpriteCoord(gBattleAnimTarget, 0) + gBattleAnimArgs[0]; - gTasks[taskId].data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + gBattleAnimArgs[1]; + gTasks[taskId].data[0] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X) + gBattleAnimArgs[0]; + gTasks[taskId].data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + gBattleAnimArgs[1]; gTasks[taskId].data[2] = gBattleAnimArgs[2]; gTasks[taskId].func = AnimTask_ElectricBolt_Step; } diff --git a/src/battle_anim_fight.c b/src/battle_anim_fight.c index 47bb9312fc..76cefcd2cc 100644 --- a/src/battle_anim_fight.c +++ b/src/battle_anim_fight.c @@ -478,8 +478,8 @@ static void AnimFistOrFootRandomPos(struct Sprite *sprite) gBattleAnimArgs[2] = Random2() % 5; StartSpriteAnim(sprite, gBattleAnimArgs[2]); - sprite->x = GetBattlerSpriteCoord(battler, 2); - sprite->y = GetBattlerSpriteCoord(battler, 3); + sprite->x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y_PIC_OFFSET); xMod = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_WIDTH) / 2; yMod = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_HEIGHT) / 4; @@ -646,8 +646,8 @@ static void AnimStompFoot_Step(struct Sprite *sprite) if (--sprite->data[0] == -1) { sprite->data[0] = 6; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, AnimStompFoot_End); @@ -691,13 +691,13 @@ static void AnimBrickBreakWall(struct Sprite *sprite) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); } sprite->x += gBattleAnimArgs[1]; @@ -745,13 +745,13 @@ static void AnimBrickBreakWallShard(struct Sprite *sprite) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[2]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[3]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X) + gBattleAnimArgs[2]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[3]; } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) + gBattleAnimArgs[2]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + gBattleAnimArgs[3]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X) + gBattleAnimArgs[2]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + gBattleAnimArgs[3]; } sprite->oam.tileNum += gBattleAnimArgs[1] * 16; @@ -796,8 +796,8 @@ static void AnimSuperpowerOrb(struct Sprite *sprite) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) { - sprite->x = GetBattlerSpriteCoord(gBattlerAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattlerAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattlerAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattlerAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimAttacker); sprite->data[7] = gBattleAnimTarget; } @@ -821,9 +821,9 @@ static void AnimSuperpowerOrb_Step(struct Sprite *sprite) sprite->data[0] = 16; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(sprite->data[7], 2); + sprite->data[2] = GetBattlerSpriteCoord(sprite->data[7], BATTLER_COORD_X_2); sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(sprite->data[7], 3); + sprite->data[4] = GetBattlerSpriteCoord(sprite->data[7], BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); @@ -865,10 +865,10 @@ static void AnimSuperpowerRock_Step1(struct Sprite *sprite) } else { - s16 pos0 = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - s16 pos1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); - s16 pos2 = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - s16 pos3 = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + s16 pos0 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + s16 pos1 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + s16 pos2 = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + s16 pos3 = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] = pos2 - pos0; sprite->data[1] = pos3 - pos1; @@ -899,8 +899,8 @@ static void AnimSuperpowerFireball(struct Sprite *sprite) if (gBattleAnimArgs[0] == ANIM_ATTACKER) { - sprite->x = GetBattlerSpriteCoord(gBattlerAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattlerAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattlerAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattlerAttacker, BATTLER_COORD_Y_PIC_OFFSET); battler = gBattleAnimTarget; sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimAttacker); } @@ -917,9 +917,9 @@ static void AnimSuperpowerFireball(struct Sprite *sprite) sprite->data[0] = 16; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(battler, 2); + sprite->data[2] = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2); sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(battler, 3); + sprite->data[4] = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); @@ -938,8 +938,8 @@ static void AnimArmThrustHit(struct Sprite *sprite) { u8 turn; - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[1] = gBattleAnimArgs[3]; sprite->data[2] = gBattleAnimArgs[0]; sprite->data[3] = gBattleAnimArgs[1]; diff --git a/src/battle_anim_fire.c b/src/battle_anim_fire.c index 9123912801..e06ebca7b2 100644 --- a/src/battle_anim_fire.c +++ b/src/battle_anim_fire.c @@ -665,9 +665,9 @@ static void AnimFireRing_Step1(struct Sprite *sprite) { sprite->data[0] = 0x19; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); @@ -681,8 +681,8 @@ static void AnimFireRing_Step2(struct Sprite *sprite) { sprite->data[0] = 0; - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->y2 = 0; sprite->x2 = 0; @@ -1101,9 +1101,9 @@ static void AnimWillOWispOrb(struct Sprite *sprite) sprite->data[0] = 256; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslationWithSpeed(sprite); sprite->callback = AnimWillOWispOrb_Step; diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index b1098ad807..3c6341faa2 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -895,8 +895,8 @@ static void AnimFallingFeather_Step(struct Sprite *sprite) static void AnimUnusedBubbleThrow(struct Sprite *sprite) { sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimTarget); - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->callback = TranslateAnimSpriteToTargetMonLocation; } @@ -955,8 +955,8 @@ void AnimTask_DrillPeckHitSplats(u8 task) gBattleAnimArgs[3] = 3; CreateSpriteAndAnimate(&gFlashingHitSplatSpriteTemplate, - GetBattlerSpriteCoord(gBattleAnimTarget, 2), - GetBattlerSpriteCoord(gBattleAnimTarget, 3), + GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2), + GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET), 3); } @@ -987,7 +987,7 @@ static void AnimBounceBallLand(struct Sprite *sprite) switch (sprite->data[0]) { case 0: - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); sprite->y2 = -sprite->y - 32; sprite->data[0]++; break; @@ -1056,13 +1056,13 @@ static void AnimDiveWaterSplash(struct Sprite *sprite) case 0: if (!gBattleAnimArgs[0]) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); } sprite->data[1] = 0x200; @@ -1123,13 +1123,13 @@ static void AnimSprayWaterDroplet(struct Sprite *sprite) if (gBattleAnimArgs[1] == 0) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 32; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + 32; } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + 32; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + 32; } sprite->callback = AnimSprayWaterDroplet_Step; @@ -1190,8 +1190,8 @@ static void AnimSkyAttackBird(struct Sprite *sprite) s16 posx = sprite->x; s16 posy = sprite->y; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[4] = sprite->x << 4; sprite->data[5] = sprite->y << 4; diff --git a/src/battle_anim_ghost.c b/src/battle_anim_ghost.c index 16daa42196..c6005ebc21 100644 --- a/src/battle_anim_ghost.c +++ b/src/battle_anim_ghost.c @@ -222,9 +222,9 @@ static void AnimConfuseRayBallBounce(struct Sprite *sprite) InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[2]; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslationWithSpeed(sprite); sprite->callback = AnimConfuseRayBallBounce_Step1; sprite->data[6] = 16; @@ -400,8 +400,8 @@ static void AnimShadowBall(struct Sprite *sprite) s16 oldPosX = sprite->x; s16 oldPosY = sprite->y; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] = 0; sprite->data[1] = gBattleAnimArgs[0]; sprite->data[2] = gBattleAnimArgs[1]; @@ -431,8 +431,8 @@ static void AnimShadowBall_Step(struct Sprite *sprite) sprite->data[2] -= 1; if (sprite->data[2] > 0) break; - sprite->data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[4] = sprite->x << 4; sprite->data[5] = sprite->y << 4; sprite->data[6] = ((sprite->data[1] - sprite->x) << 4) / sprite->data[3]; @@ -447,8 +447,8 @@ static void AnimShadowBall_Step(struct Sprite *sprite) sprite->data[3] -= 1; if (sprite->data[3] > 0) break; - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] += 1; break; case 3: @@ -747,17 +747,17 @@ static void AnimDestinyBondWhiteShadow(struct Sprite *sprite) if (gBattleAnimArgs[0] == 0) { - battler1X = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - battler1Y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 28; - battler2X = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - battler2Y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + 28; + battler1X = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + battler1Y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + 28; + battler2X = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + battler2Y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + 28; } else { - battler1X = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - battler1Y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + 28; - battler2X = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - battler2Y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 28; + battler1X = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + battler1Y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + 28; + battler2X = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + battler2Y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + 28; } yDiff = battler2Y - battler1Y; @@ -807,7 +807,7 @@ void AnimTask_DestinyBondWhiteShadow(u8 taskId) task->data[9] = 16; task->data[10] = gBattleAnimArgs[0]; - baseX = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); + baseX = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); baseY = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_BOTTOM); if (!IsContest()) { @@ -820,7 +820,7 @@ void AnimTask_DestinyBondWhiteShadow(u8 taskId) spriteId = CreateSprite(&gDestinyBondWhiteShadowSpriteTemplate, baseX, baseY, 55); if (spriteId != MAX_SPRITES) { - x = GetBattlerSpriteCoord(battler, 2); + x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2); y = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_BOTTOM); gSprites[spriteId].data[0] = baseX << 4; gSprites[spriteId].data[1] = baseY << 4; @@ -1175,7 +1175,7 @@ void AnimTask_GrudgeFlames(u8 taskId) task->data[0] = 0; task->data[1] = 16; - task->data[9] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); + task->data[9] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); task->data[10] = GetBattlerYCoordWithElevation(gBattleAnimAttacker); task->data[11] = (GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_WIDTH) / 2) + 8; task->data[7] = 0; diff --git a/src/battle_anim_ground.c b/src/battle_anim_ground.c index 81b3d160f0..0e581035e8 100644 --- a/src/battle_anim_ground.c +++ b/src/battle_anim_ground.c @@ -141,11 +141,11 @@ const struct SpriteTemplate gDirtMoundSpriteTemplate = // a boomerang. After hitting the target mon, it comes back to the user. static void AnimBonemerangProjectile(struct Sprite *sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] = 20; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[5] = -40; InitAnimArcTranslation(sprite); sprite->callback = AnimBonemerangProjectile_Step; @@ -160,8 +160,8 @@ static void AnimBonemerangProjectile_Step(struct Sprite *sprite) sprite->y2 = 0; sprite->x2 = 0; sprite->data[0] = 20; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[5] = 40; InitAnimArcTranslation(sprite); sprite->callback = AnimBonemerangProjectile_End; @@ -188,8 +188,8 @@ static void AnimBoneHitProjectile(struct Sprite *sprite) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[4]; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2]; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2]; + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } @@ -207,8 +207,8 @@ static void AnimDirtScatter(struct Sprite *sprite) InitSpritePosToAnimAttacker(sprite, 1); - targetXPos = GetBattlerSpriteCoord2(gBattleAnimTarget, 2); - targetYPos = GetBattlerSpriteCoord2(gBattleAnimTarget, 3); + targetXPos = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_X_2); + targetYPos = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); xOffset = Random2() & 0x1F; yOffset = Random2() & 0x1F; @@ -234,8 +234,8 @@ static void AnimMudSportDirt(struct Sprite *sprite) sprite->oam.tileNum++; if (gBattleAnimArgs[0] == 0) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[1] > 0 ? 1 : -1; sprite->callback = AnimMudSportDirtRising; } @@ -518,7 +518,7 @@ void AnimDirtPlumeParticle(struct Sprite *sprite) gBattleAnimArgs[2] *= -1; } - sprite->x = GetBattlerSpriteCoord(battler, 2) + xOffset; + sprite->x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2) + xOffset; sprite->y = GetBattlerYCoordWithElevation(battler) + 30; sprite->data[0] = gBattleAnimArgs[5]; sprite->data[2] = sprite->x + gBattleAnimArgs[2]; @@ -549,7 +549,7 @@ static void AnimDigDirtMound(struct Sprite *sprite) else battler = gBattleAnimTarget; - sprite->x = GetBattlerSpriteCoord(battler, 0) - 16 + (gBattleAnimArgs[1] * 32); + sprite->x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X) - 16 + (gBattleAnimArgs[1] * 32); sprite->y = GetBattlerYCoordWithElevation(battler) + 32; sprite->oam.tileNum += gBattleAnimArgs[1] * 8; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); diff --git a/src/battle_anim_poison.c b/src/battle_anim_poison.c index 6dedbd9555..664df389d6 100644 --- a/src/battle_anim_poison.c +++ b/src/battle_anim_poison.c @@ -193,8 +193,8 @@ static void AnimSludgeProjectile(struct Sprite *sprite) InitSpritePosToAnimAttacker(sprite, 1); sprite->data[0] = gBattleAnimArgs[2]; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[5] = -30; InitAnimArcTranslation(sprite); diff --git a/src/battle_anim_psychic.c b/src/battle_anim_psychic.c index c98f311bd1..a7faa76586 100644 --- a/src/battle_anim_psychic.c +++ b/src/battle_anim_psychic.c @@ -650,8 +650,8 @@ static void AnimQuestionMark(struct Sprite *sprite) if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) x = -x; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + x; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + y; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + x; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + y; if (sprite->y < 16) sprite->y = 16; diff --git a/src/battle_anim_rock.c b/src/battle_anim_rock.c index 905f51a79e..f1dc4b734b 100644 --- a/src/battle_anim_rock.c +++ b/src/battle_anim_rock.c @@ -564,10 +564,10 @@ void AnimTask_Rollout(u8 taskId) task = &gTasks[taskId]; - var0 = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - var1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + 24; - var2 = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - var3 = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + 24; + var0 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + var1 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + 24; + var2 = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + var3 = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + 24; if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget) var3 = var1; @@ -787,8 +787,8 @@ static void AnimRockBlastRock(struct Sprite *sprite) static void AnimRockScatter(struct Sprite *sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); sprite->x += gBattleAnimArgs[0]; sprite->y += gBattleAnimArgs[1]; diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index 50918a24ed..3d6733d471 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -517,23 +517,23 @@ static void AnimWaterBubbleProjectile(struct Sprite *sprite) if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) - gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) - gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[1]; sprite->animPaused = TRUE; } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[1]; sprite->animPaused = TRUE; } if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[6]; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); spriteId = CreateInvisibleSpriteWithCallback(SpriteCallbackDummy); sprite->data[5] = spriteId; @@ -595,9 +595,9 @@ static void AnimAuroraBeamRings(struct Sprite *sprite) unkArg = gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[4]; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + unkArg; + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + unkArg; sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; InitAnimLinearTranslation(sprite); sprite->callback = AnimAuroraBeamRings_Step; sprite->affineAnimPaused = TRUE; @@ -650,9 +650,9 @@ static void AnimToTargetInSinWave(struct Sprite *sprite) InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = 30; sprite->data[1] = sprite->x; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[3] = sprite->y; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); sprite->data[5] = 0xD200 / sprite->data[0]; sprite->data[7] = gBattleAnimArgs[3]; @@ -705,8 +705,8 @@ static void AnimHydroCannonCharge(struct Sprite *sprite) { u8 priority; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); sprite->y2 = -10; priority = GetBattlerSpriteSubpriority(gBattleAnimAttacker); if (!IsContest()) @@ -752,14 +752,14 @@ static void AnimHydroCannonBeam(struct Sprite *sprite) else animType = FALSE; if ((u8)gBattleAnimArgs[5] == 0) - coordType = 3; + coordType = BATTLER_COORD_Y_PIC_OFFSET; else - coordType = 1; + coordType = BATTLER_COORD_Y; InitSpritePosToAnimAttacker(sprite, animType); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[4]; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2]; + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2]; sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, coordType) + gBattleAnimArgs[3]; sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); @@ -1167,8 +1167,8 @@ static u8 GetWaterSpoutPowerForAnim(void) static void CreateWaterSpoutLaunchDroplets(struct Task *task, u8 taskId) { s16 i; - s16 attackerCoordX = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - s16 attackerCoordY = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + s16 attackerCoordX = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + s16 attackerCoordY = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); s16 trigIndex = 172; u8 subpriority = GetBattlerSpriteSubpriority(gBattleAnimAttacker) - 1; s16 increment = 4 - task->data[1]; @@ -1341,8 +1341,8 @@ void AnimTask_WaterSport(u8 taskId) { struct Task *task = &gTasks[taskId]; - task->data[3] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - task->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + task->data[3] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + task->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); task->data[7] = (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) ? 1 : -1; if (IsContest()) task->data[7] *= -1; @@ -1514,8 +1514,8 @@ static void AnimWaterPulseRingBubble(struct Sprite *sprite) void AnimWaterPulseRing(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); - sprite->data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[3] = gBattleAnimArgs[2]; sprite->data[4] = gBattleAnimArgs[3]; sprite->callback = AnimWaterPulseRing_Step; From e3b6337c3ad4b57b293344b1ef71e85055ed3b44 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 8 Nov 2021 13:18:58 -0500 Subject: [PATCH 156/417] Finish battle_anim_mons doc --- include/battle_anim.h | 10 +- include/battle_main.h | 2 +- src/battle_anim_bug.c | 36 ++--- src/battle_anim_dragon.c | 24 ++-- src/battle_anim_effects_1.c | 70 +++++----- src/battle_anim_effects_2.c | 22 ++- src/battle_anim_effects_3.c | 2 +- src/battle_anim_electric.c | 2 +- src/battle_anim_fight.c | 4 +- src/battle_anim_fire.c | 2 +- src/battle_anim_ice.c | 2 +- src/battle_anim_mons.c | 163 ++++++++++++++-------- src/battle_anim_normal.c | 2 +- src/battle_anim_rock.c | 4 +- src/battle_controller_link_opponent.c | 4 +- src/battle_controller_link_partner.c | 4 +- src/battle_controller_opponent.c | 4 +- src/battle_controller_player.c | 2 +- src/battle_controller_player_partner.c | 4 +- src/battle_controller_recorded_opponent.c | 4 +- src/battle_controller_recorded_player.c | 4 +- src/battle_controller_wally.c | 2 +- src/battle_gfx_sfx_util.c | 10 +- src/battle_main.c | 8 +- src/pokeball.c | 4 +- src/reshow_battle_screen.c | 4 +- 26 files changed, 229 insertions(+), 170 deletions(-) diff --git a/include/battle_anim.h b/include/battle_anim.h index 01931125fc..8745b0d264 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -74,7 +74,7 @@ void HandleIntroSlide(u8 terrainId); int GetAnimBgAttribute(u8 bgId, u8 attributeId); // battle_anim_mons.c -void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite); +void TranslateSpriteInEllipse(struct Sprite *sprite); void AnimTranslateLinearAndFlicker(struct Sprite *sprite); void AnimTranslateLinearAndFlicker_Flipped(struct Sprite *sprite); void AnimWeatherBallUp(struct Sprite *sprite); @@ -103,7 +103,7 @@ u8 GetBattlerYCoordWithElevation(u8 battlerId); void WaitAnimForDuration(struct Sprite *sprite); void AnimTravelDiagonally(struct Sprite *sprite); void InitAnimLinearTranslation(struct Sprite *sprite); -void AnimTranslateLinear_WaitEnd(struct Sprite *sprite); +void AnimTranslateLinear_WithFollowup(struct Sprite *sprite); u8 GetBattlerSpriteBGPriority(u8 battlerId); void *LoadPointerFromVars(s16 bottom, s16 top); void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr); @@ -128,7 +128,7 @@ u8 CreateInvisibleSpriteCopy(int, u8, int); void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void*, bool32); void AnimLoadCompressedBgGfx(u32, const u32*, u32); void UpdateAnimBg3ScreenSize(bool8); -void TranslateSpriteInGrowingCircleOverDuration(struct Sprite *); +void TranslateSpriteInGrowingCircle(struct Sprite *); void sub_80A653C(struct Sprite *); void SetBattlerSpriteYOffsetFromYScale(u8 spriteId); void PrepareEruptAnimTaskData(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a7); @@ -142,12 +142,12 @@ void TranslateSpriteLinearById(struct Sprite *sprite); void TranslateSpriteLinear(struct Sprite *sprite); void AnimSpriteOnMonPos(struct Sprite *sprite); void InitAnimLinearTranslationWithSpeedAndPos(struct Sprite *sprite); -void TranslateSpriteInCircleOverDuration(struct Sprite *sprite); +void TranslateSpriteInCircle(struct Sprite *sprite); void SetGrayscaleOrOriginalPalette(u16 palNum, bool8 restoreOriginal); void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union AffineAnimCmd *affineAnimCmds); bool8 RunAffineAnimFromTaskData(struct Task *task); void AnimThrowProjectile(struct Sprite *sprite); -void sub_80A6BFC(struct BattleAnimBgData *unk, u8 unused); +void GetBgDataForTransform(struct BattleAnimBgData *dest, u8 battlerId); u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, bool32 ignoreDeoxysForm); void ResetSpriteRotScale_PreserveAffine(struct Sprite *sprite); void TradeMenuBouncePartySprites(struct Sprite *sprite); diff --git a/include/battle_main.h b/include/battle_main.h index f3e961b7bf..b7691b4fd1 100644 --- a/include/battle_main.h +++ b/include/battle_main.h @@ -65,7 +65,7 @@ void DoBounceEffect(u8 battlerId, u8 b, s8 c, s8 d); void EndBounceEffect(u8 battlerId, bool8 b); void SpriteCB_PlayerMonFromBall(struct Sprite *sprite); void SpriteCB_TrainerThrowObject(struct Sprite *sprite); -void sub_8039E9C(struct Sprite *sprite); +void AnimSetCenterToCornerVecX(struct Sprite *sprite); void BeginBattleIntroDummy(void); void BeginBattleIntro(void); void SwitchInClearSetData(void); diff --git a/src/battle_anim_bug.c b/src/battle_anim_bug.c index 105cc611ea..14b98fcb21 100644 --- a/src/battle_anim_bug.c +++ b/src/battle_anim_bug.c @@ -212,12 +212,12 @@ static void AnimMegahornHorn(struct Sprite *sprite) gBattleAnimArgs[0] = -gBattleAnimArgs[0]; } - sprite->x = GetBattlerSpriteCoord2(gBattleAnimTarget, 2) + gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord2(gBattleAnimTarget, 3) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[1]; sprite->data[0] = gBattleAnimArgs[4]; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2]; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2]; + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); @@ -236,12 +236,12 @@ static void AnimLeechLifeNeedle(struct Sprite *sprite) gBattleAnimArgs[0] = -gBattleAnimArgs[0]; } - sprite->x = GetBattlerSpriteCoord2(gBattleAnimTarget, 2) + gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord2(gBattleAnimTarget, 3) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[1]; sprite->data[0] = gBattleAnimArgs[2]; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); @@ -266,8 +266,8 @@ static void AnimTranslateWebThread(struct Sprite *sprite) if (!gBattleAnimArgs[4]) { - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); } else { @@ -394,8 +394,8 @@ static void AnimTranslateStinger(struct Sprite *sprite) InitSpritePosToAnimAttacker(sprite, 1); - lVarX = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2]; - lVarY = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; + lVarX = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2]; + lVarY = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; rot = ArcTan2Neg(lVarX - sprite->x, lVarY - sprite->y); rot += 0xC000; TrySetSpriteRotScale(sprite, FALSE, 0x100, 0x100, rot); @@ -423,8 +423,8 @@ static void AnimMissileArc(struct Sprite *sprite) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[4]; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2]; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2]; + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; sprite->data[5] = gBattleAnimArgs[5]; InitAnimArcTranslation(sprite); @@ -473,13 +473,13 @@ static void AnimTailGlowOrb(struct Sprite *sprite) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + 18; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + 18; } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 18; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + 18; } StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); diff --git a/src/battle_anim_dragon.c b/src/battle_anim_dragon.c index 1bc0f569b9..029a5c30dd 100644 --- a/src/battle_anim_dragon.c +++ b/src/battle_anim_dragon.c @@ -189,8 +189,8 @@ const struct SpriteTemplate gOverheatFlameSpriteTemplate = static void AnimOutrageFlame(struct Sprite *sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) { sprite->x -= gBattleAnimArgs[0]; @@ -215,8 +215,8 @@ static void AnimOutrageFlame(struct Sprite *sprite) static void StartDragonFireTranslation(struct Sprite *sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) { sprite->x -= gBattleAnimArgs[1]; @@ -242,13 +242,13 @@ static void AnimDragonRageFirePlume(struct Sprite *sprite) { if (gBattleAnimArgs[0] == 0) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0); - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); } SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[1]); @@ -270,8 +270,8 @@ static void AnimDragonDanceOrb(struct Sprite *sprite) { u16 r5; u16 r0; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[4] = 0; sprite->data[5] = 1; sprite->data[6] = gBattleAnimArgs[0]; @@ -417,8 +417,8 @@ static void AnimOverheatFlame(struct Sprite *sprite) { int i; int yAmplitude = (gBattleAnimArgs[2] * 3) / 5; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[4]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[4]; sprite->data[1] = Cos(gBattleAnimArgs[1], gBattleAnimArgs[2]); sprite->data[2] = Sin(gBattleAnimArgs[1], yAmplitude); sprite->x += sprite->data[1] * gBattleAnimArgs[0]; diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 9d1842176e..d460b9236b 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -4155,13 +4155,13 @@ static void AnimSparkingStars(struct Sprite* sprite) { if (!gBattleAnimArgs[6]) { - sprite->x = GetBattlerSpriteCoord(battler, 0); - sprite->y = GetBattlerSpriteCoord(battler, 1) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X); + sprite->y = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y) + gBattleAnimArgs[1]; } else { - sprite->x = GetBattlerSpriteCoord(battler, 2); - sprite->y = GetBattlerSpriteCoord(battler, 3) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[1]; } SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]); @@ -4324,8 +4324,8 @@ static void AnimLockOnTarget_Step3(struct Sprite* sprite) sprite->y2 = 0; sprite->x2 = 0; sprite->data[0] = 6; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + a; - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + b; + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + a; + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + b; sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step5); } @@ -4709,13 +4709,13 @@ static void AnimSlashSlice(struct Sprite* sprite) { if (gBattleAnimArgs[0] == 0) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[2]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; } sprite->data[0] = 0; @@ -4726,16 +4726,16 @@ static void AnimSlashSlice(struct Sprite* sprite) static void AnimFalseSwipeSlice(struct Sprite* sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + 0xFFD0; - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + 0xFFD0; + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); StoreSpriteCallbackInData6(sprite, AnimFalseSwipeSlice_Step1); sprite->callback = RunStoredCallbackWhenAnimEnds; } static void AnimFalseSwipePositionedSlice(struct Sprite* sprite) { - sprite->x = sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + 0xFFD0 + gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + sprite->x = sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + 0xFFD0 + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); StartSpriteAnim(sprite, 1); sprite->data[0] = 0; sprite->data[1] = 0; @@ -4776,13 +4776,13 @@ static void AnimEndureEnergy(struct Sprite* sprite) { if (gBattleAnimArgs[0] == 0) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[2]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[2]; } else { - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + gBattleAnimArgs[2]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + gBattleAnimArgs[2]; } sprite->data[0] = 0; @@ -4805,8 +4805,8 @@ static void AnimEndureEnergy_Step(struct Sprite* sprite) static void AnimSharpenSphere(struct Sprite* sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) - 12; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) - 12; sprite->data[0] = 0; sprite->data[1] = 2; sprite->data[2] = 0; @@ -4844,8 +4844,8 @@ static void AnimConversion(struct Sprite* sprite) { if (sprite->data[0] == 0) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[1]; if (IsContest()) sprite->y += 10; @@ -4898,8 +4898,8 @@ static void AnimConversion2_Step(struct Sprite* sprite) { sprite->animPaused = 0; sprite->data[0] = 30; - sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->callback = StartAnimLinearTranslation; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } @@ -4970,7 +4970,7 @@ static void AnimMoon_Step(struct Sprite* sprite) static void AnimMoonlightSparkle(struct Sprite* sprite) { - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[0]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + gBattleAnimArgs[0]; sprite->y = gBattleAnimArgs[1]; sprite->data[0] = 0; sprite->data[1] = 0; @@ -5111,8 +5111,8 @@ static void AnimHornHit(struct Sprite* sprite) sprite->data[0] = 0; sprite->data[1] = gBattleAnimArgs[2]; - sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[0]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[1]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[0]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[1]; sprite->data[6] = sprite->x; sprite->data[7] = sprite->y; if (IsContest()) @@ -5299,8 +5299,8 @@ static void AnimWavyMusicNotes(struct Sprite* sprite) } else { - a = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - b = GetBattlerSpriteCoord(gBattleAnimTarget, 3); + a = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + b = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); } sprite->data[4] = sprite->x << 4; @@ -5363,8 +5363,8 @@ static void AnimFlyingMusicNotes(struct Sprite* sprite) if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) gBattleAnimArgs[1] *= -1; - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1]; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2]; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + gBattleAnimArgs[1]; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; StartSpriteAnim(sprite, gBattleAnimArgs[0]); sprite->data[2] = 0; sprite->data[3] = 0; @@ -5407,8 +5407,8 @@ static void AnimBellyDrumHand(struct Sprite* sprite) a = -16; } - sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + a; - sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + 8; + sprite->x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + a; + sprite->y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + 8; sprite->data[0] = 8; sprite->callback = WaitAnimForDuration; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); @@ -5462,7 +5462,7 @@ void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite) else sprite->x = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_LEFT) - 8; - sprite->y = GetBattlerSpriteCoord(battler, 3) - (s16)GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_HEIGHT) / 4; + sprite->y = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y_PIC_OFFSET) - (s16)GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_HEIGHT) / 4; } static void AnimThoughtBubble(struct Sprite* sprite) @@ -5525,7 +5525,7 @@ static void AnimFollowMeFinger(struct Sprite* sprite) else battler = gBattleAnimTarget; - sprite->x = GetBattlerSpriteCoord(battler, 0); + sprite->x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X); sprite->y = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_TOP); if (sprite->y <= 9) sprite->y = 10; diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index fcdb56a103..c2a89ed4ba 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -1262,20 +1262,30 @@ const struct SpriteTemplate gGuardRingSpriteTemplate = .callback = AnimGuardRing, }; +#define sAmplitudeX data[1] +#define sCircleSpeed data[2] +#define sMoveSteps data[3] +#define sAmplitudeY data[4] + static void AnimCirclingFinger(struct Sprite *sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]); sprite->y += gBattleAnimArgs[1]; - sprite->data[1] = gBattleAnimArgs[2]; - sprite->data[2] = gBattleAnimArgs[4]; - sprite->data[3] = gBattleAnimArgs[5]; - sprite->data[4] = gBattleAnimArgs[3]; + sprite->sAmplitudeX = gBattleAnimArgs[2]; + sprite->sCircleSpeed = gBattleAnimArgs[4]; + sprite->sMoveSteps = gBattleAnimArgs[5]; + sprite->sAmplitudeY = gBattleAnimArgs[3]; StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); - sprite->callback = TranslateSpriteInEllipseOverDuration; + sprite->callback = TranslateSpriteInEllipse; sprite->callback(sprite); } +#undef sAmplitudeX +#undef sCircleSpeed +#undef sMoveSteps +#undef sAmplitudeY + static void AnimBouncingMusicNote(struct Sprite *sprite) { u8 battler; @@ -1883,7 +1893,7 @@ static void AnimRazorWindTornado(struct Sprite *sprite) sprite->data[2] = gBattleAnimArgs[5]; sprite->data[3] = gBattleAnimArgs[6]; sprite->data[4] = gBattleAnimArgs[3]; - sprite->callback = TranslateSpriteInCircleOverDuration; + sprite->callback = TranslateSpriteInCircle; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); sprite->callback(sprite); } diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index cd80519981..f73393de4e 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -2283,7 +2283,7 @@ void AnimTask_TransformMon(u8 taskId) break; case 2: HandleSpeciesGfxDataChange(gBattleAnimAttacker, gBattleAnimTarget, gTasks[taskId].data[10]); - sub_80A6BFC(&animBg, gBattleAnimAttacker); + GetBgDataForTransform(&animBg, gBattleAnimAttacker); if (IsContest()) position = B_POSITION_PLAYER_LEFT; diff --git a/src/battle_anim_electric.c b/src/battle_anim_electric.c index bd527d244c..635aa550e7 100644 --- a/src/battle_anim_electric.c +++ b/src/battle_anim_electric.c @@ -509,7 +509,7 @@ static void AnimUnusedCirclingShock(struct Sprite *sprite) sprite->data[2] = gBattleAnimArgs[3]; sprite->data[3] = gBattleAnimArgs[4]; StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); - sprite->callback = TranslateSpriteInCircleOverDuration; + sprite->callback = TranslateSpriteInCircle; } static void AnimSparkElectricity(struct Sprite *sprite) diff --git a/src/battle_anim_fight.c b/src/battle_anim_fight.c index 76cefcd2cc..ca4668e023 100644 --- a/src/battle_anim_fight.c +++ b/src/battle_anim_fight.c @@ -827,7 +827,7 @@ static void AnimSuperpowerOrb_Step(struct Sprite *sprite) InitAnimLinearTranslation(sprite); StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); - sprite->callback = AnimTranslateLinear_WaitEnd; + sprite->callback = AnimTranslateLinear_WithFollowup; } } @@ -923,7 +923,7 @@ static void AnimSuperpowerFireball(struct Sprite *sprite) InitAnimLinearTranslation(sprite); StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); - sprite->callback = AnimTranslateLinear_WaitEnd; + sprite->callback = AnimTranslateLinear_WithFollowup; } static void AnimArmThrustHit_Step(struct Sprite *sprite) diff --git a/src/battle_anim_fire.c b/src/battle_anim_fire.c index e06ebca7b2..8ecb607132 100644 --- a/src/battle_anim_fire.c +++ b/src/battle_anim_fire.c @@ -472,7 +472,7 @@ static void AnimFireSpiralInward(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); - sprite->callback = TranslateSpriteInGrowingCircleOverDuration; + sprite->callback = TranslateSpriteInGrowingCircle; sprite->callback(sprite); } diff --git a/src/battle_anim_ice.c b/src/battle_anim_ice.c index 1d65d9570c..0b89c1f593 100644 --- a/src/battle_anim_ice.c +++ b/src/battle_anim_ice.c @@ -592,7 +592,7 @@ static void AnimIcePunchSwirlingParticle(struct Sprite *sprite) sprite->data[3] = 30; sprite->data[4] = -512; StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); - sprite->callback = TranslateSpriteInGrowingCircleOverDuration; + sprite->callback = TranslateSpriteInGrowingCircle; sprite->callback(sprite); } diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 75e1dadf7e..ae0db0b874 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -20,7 +20,7 @@ extern const struct OamData gOamData_AffineNormal_ObjNormal_64x64; -static void sub_80A6FB4(struct Sprite *sprite); +static void AnimTranslateLinear_WithFollowup_SetCornerVecX(struct Sprite *sprite); static void AnimFastTranslateLinearWaitEnd(struct Sprite *sprite); static void AnimThrowProjectile_Step(struct Sprite *sprite); static void AnimBattlerTrace(struct Sprite *sprite); @@ -383,7 +383,7 @@ u8 GetAnimBattlerSpriteId(u8 animBattler) } else { - return 0xff; + return SPRITE_NONE; } } else if (animBattler == ANIM_TARGET) @@ -395,13 +395,13 @@ u8 GetAnimBattlerSpriteId(u8 animBattler) } else { - return 0xff; + return SPRITE_NONE; } } else if (animBattler == ANIM_ATK_PARTNER) { if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) - return 0xff; + return SPRITE_NONE; else return gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]; } @@ -410,7 +410,7 @@ u8 GetAnimBattlerSpriteId(u8 animBattler) if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget))) return gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimTarget)]; else - return 0xff; + return SPRITE_NONE; } } @@ -426,18 +426,38 @@ void SetCallbackToStoredInData6(struct Sprite *sprite) sprite->callback = (void (*)(struct Sprite *))callback; } -void TranslateSpriteInCircleOverDuration(struct Sprite *sprite) +// Sprite data for TranslateSpriteInCircle/Ellipse and related +#define sCirclePos data[0] +#define sAmplitude data[1] +#define sCircleSpeed data[2] +#define sDuration data[3] + +// TranslateSpriteInGrowingCircle +#define sAmplitudeSpeed data[4] +#define sAmplitudeChange data[5] + +// TranslateSpriteInEllipse +#define sAmplitudeX sAmplitude +#define sAmplitudeY data[4] + +// TranslateSpriteInWavePattern +#define sCirclePosX sCirclePos +#define sCircleSpeedX sCircleSpeed +#define sCirclePosY data[4] +#define sCircleSpeedY data[5] + +void TranslateSpriteInCircle(struct Sprite *sprite) { - if (sprite->data[3]) + if (sprite->sDuration) { - sprite->x2 = Sin(sprite->data[0], sprite->data[1]); - sprite->y2 = Cos(sprite->data[0], sprite->data[1]); - sprite->data[0] += sprite->data[2]; - if (sprite->data[0] >= 0x100) - sprite->data[0] -= 0x100; - else if (sprite->data[0] < 0) - sprite->data[0] += 0x100; - sprite->data[3]--; + sprite->x2 = Sin(sprite->sCirclePos, sprite->sAmplitude); + sprite->y2 = Cos(sprite->sCirclePos, sprite->sAmplitude); + sprite->sCirclePos += sprite->sCircleSpeed; + if (sprite->sCirclePos >= 0x100) + sprite->sCirclePos -= 0x100; + else if (sprite->sCirclePos < 0) + sprite->sCirclePos += 0x100; + sprite->sDuration--; } else { @@ -445,19 +465,19 @@ void TranslateSpriteInCircleOverDuration(struct Sprite *sprite) } } -void TranslateSpriteInGrowingCircleOverDuration(struct Sprite *sprite) +void TranslateSpriteInGrowingCircle(struct Sprite *sprite) { - if (sprite->data[3]) + if (sprite->sDuration) { - sprite->x2 = Sin(sprite->data[0], (sprite->data[5] >> 8) + sprite->data[1]); - sprite->y2 = Cos(sprite->data[0], (sprite->data[5] >> 8) + sprite->data[1]); - sprite->data[0] += sprite->data[2]; - sprite->data[5] += sprite->data[4]; - if (sprite->data[0] >= 0x100) - sprite->data[0] -= 0x100; - else if (sprite->data[0] < 0) - sprite->data[0] += 0x100; - sprite->data[3]--; + sprite->x2 = Sin(sprite->sCirclePos, (sprite->sAmplitudeChange >> 8) + sprite->sAmplitude); + sprite->y2 = Cos(sprite->sCirclePos, (sprite->sAmplitudeChange >> 8) + sprite->sAmplitude); + sprite->sCirclePos += sprite->sCircleSpeed; + sprite->sAmplitudeChange += sprite->sAmplitudeSpeed; + if (sprite->sCirclePos >= 0x100) + sprite->sCirclePos -= 0x100; + else if (sprite->sCirclePos < 0) + sprite->sCirclePos += 0x100; + sprite->sDuration--; } else { @@ -466,23 +486,27 @@ void TranslateSpriteInGrowingCircleOverDuration(struct Sprite *sprite) } // Unused -static void sub_80A63C8(struct Sprite *sprite) +// Exact shape depends on arguments. Can move in a figure-8-like pattern, or circular, etc. +static void TranslateSpriteInWavePattern(struct Sprite *sprite) { - if (sprite->data[3]) + if (sprite->sDuration) { - sprite->x2 = Sin(sprite->data[0], sprite->data[1]); - sprite->y2 = Cos(sprite->data[4], sprite->data[1]); - sprite->data[0] += sprite->data[2]; - sprite->data[4] += sprite->data[5]; - if (sprite->data[0] >= 0x100) - sprite->data[0] -= 0x100; - else if (sprite->data[0] < 0) - sprite->data[0] += 0x100; - if (sprite->data[4] >= 0x100) - sprite->data[4] -= 0x100; - else if (sprite->data[4] < 0) - sprite->data[4] += 0x100; - sprite->data[3]--; + sprite->x2 = Sin(sprite->sCirclePosX, sprite->sAmplitude); + sprite->y2 = Cos(sprite->sCirclePosY, sprite->sAmplitude); + sprite->sCirclePosX += sprite->sCircleSpeedX; + sprite->sCirclePosY += sprite->sCircleSpeedY; + + if (sprite->sCirclePosX >= 0x100) + sprite->sCirclePosX -= 0x100; + else if (sprite->sCirclePosX < 0) + sprite->sCirclePosX += 0x100; + + if (sprite->sCirclePosY >= 0x100) + sprite->sCirclePosY -= 0x100; + else if (sprite->sCirclePosY < 0) + sprite->sCirclePosY += 0x100; + + sprite->sDuration--; } else { @@ -490,18 +514,18 @@ static void sub_80A63C8(struct Sprite *sprite) } } -void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite) +void TranslateSpriteInEllipse(struct Sprite *sprite) { - if (sprite->data[3]) + if (sprite->sDuration) { - sprite->x2 = Sin(sprite->data[0], sprite->data[1]); - sprite->y2 = Cos(sprite->data[0], sprite->data[4]); - sprite->data[0] += sprite->data[2]; - if (sprite->data[0] >= 0x100) - sprite->data[0] -= 0x100; - else if (sprite->data[0] < 0) - sprite->data[0] += 0x100; - sprite->data[3]--; + sprite->x2 = Sin(sprite->sCirclePos, sprite->sAmplitudeX); + sprite->y2 = Cos(sprite->sCirclePos, sprite->sAmplitudeY); + sprite->sCirclePos += sprite->sCircleSpeed; + if (sprite->sCirclePos >= 0x100) + sprite->sCirclePos -= 0x100; + else if (sprite->sCirclePos < 0) + sprite->sCirclePos += 0x100; + sprite->sDuration--; } else { @@ -509,6 +533,19 @@ void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite) } } +#undef sCirclePos +#undef sAmplitude +#undef sCircleSpeed +#undef sDuration +#undef sAmplitudeSpeed +#undef sAmplitudeChange +#undef sAmplitudeX +#undef sAmplitudeY +#undef sCirclePosX +#undef sCircleSpeedX +#undef sCirclePosY +#undef sCircleSpeedY + // Simply waits until the sprite's data[0] hits zero. // This is used to let sprite anims or affine anims to run for a designated // duration. @@ -521,7 +558,7 @@ void WaitAnimForDuration(struct Sprite *sprite) } // Sprite data for ConvertPosDataToTranslateLinearData -#define sStepsX data[0] +#define sStepsX data[0] #define sStartX data[1] #define sTargetX data[2] #define sStartY data[3] @@ -680,6 +717,12 @@ static void TranslateSpriteToBattleAttackerPos(struct Sprite *sprite) sprite->callback = AnimPosToTranslateLinear; } +#undef sStepsX +#undef sStartX +#undef sTargetX +#undef sStartY +#undef sTargetY + // Unused static void sub_80A67A4(struct Sprite *sprite) { @@ -913,7 +956,7 @@ void GetBattleAnimBgData(struct BattleAnimBgData *out, u32 bgId) } } -void sub_80A6BFC(struct BattleAnimBgData *out, u8 unused) +void GetBgDataForTransform(struct BattleAnimBgData *out, u8 battlerId) { out->bgTiles = gBattleAnimBgTileBuffer; out->bgTilemap = (u16 *)gBattleAnimBgTilemapBuffer; @@ -1052,17 +1095,17 @@ void StartAnimLinearTranslation(struct Sprite *sprite) sprite->data[1] = sprite->x; sprite->data[3] = sprite->y; InitAnimLinearTranslation(sprite); - sprite->callback = AnimTranslateLinear_WaitEnd; + sprite->callback = AnimTranslateLinear_WithFollowup; sprite->callback(sprite); } // Unused -static void sub_80A6F14(struct Sprite *sprite) +static void StartAnimLinearTranslation_SetCornerVecX(struct Sprite *sprite) { sprite->data[1] = sprite->x; sprite->data[3] = sprite->y; InitAnimLinearTranslation(sprite); - sprite->callback = sub_80A6FB4; + sprite->callback = AnimTranslateLinear_WithFollowup_SetCornerVecX; sprite->callback(sprite); } @@ -1096,16 +1139,16 @@ bool8 AnimTranslateLinear(struct Sprite *sprite) return FALSE; } -void AnimTranslateLinear_WaitEnd(struct Sprite *sprite) +void AnimTranslateLinear_WithFollowup(struct Sprite *sprite) { if (AnimTranslateLinear(sprite)) SetCallbackToStoredInData6(sprite); } // Functionally unused -static void sub_80A6FB4(struct Sprite *sprite) +static void AnimTranslateLinear_WithFollowup_SetCornerVecX(struct Sprite *sprite) { - sub_8039E9C(sprite); + AnimSetCenterToCornerVecX(sprite); if (AnimTranslateLinear(sprite)) SetCallbackToStoredInData6(sprite); } @@ -1122,7 +1165,7 @@ void InitAnimLinearTranslationWithSpeedAndPos(struct Sprite *sprite) sprite->data[1] = sprite->x; sprite->data[3] = sprite->y; InitAnimLinearTranslationWithSpeed(sprite); - sprite->callback = AnimTranslateLinear_WaitEnd; + sprite->callback = AnimTranslateLinear_WithFollowup; sprite->callback(sprite); } diff --git a/src/battle_anim_normal.c b/src/battle_anim_normal.c index d79f344edf..ebf9a588f6 100644 --- a/src/battle_anim_normal.c +++ b/src/battle_anim_normal.c @@ -409,7 +409,7 @@ static void AnimCirclingSparkle(struct Sprite *sprite) sprite->data[4] = 112; sprite->data[5] = 0; StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); - sprite->callback = TranslateSpriteInGrowingCircleOverDuration; + sprite->callback = TranslateSpriteInGrowingCircle; sprite->callback(sprite); } diff --git a/src/battle_anim_rock.c b/src/battle_anim_rock.c index f1dc4b734b..5aa8f28c30 100644 --- a/src/battle_anim_rock.c +++ b/src/battle_anim_rock.c @@ -313,7 +313,7 @@ static void AnimFallingRock(struct Sprite *sprite) sprite->data[5] = gBattleAnimArgs[2]; StoreSpriteCallbackInData6(sprite, AnimFallingRock_Step); - sprite->callback = TranslateSpriteInEllipseOverDuration; + sprite->callback = TranslateSpriteInEllipse; sprite->callback(sprite); } @@ -328,7 +328,7 @@ static void AnimFallingRock_Step(struct Sprite *sprite) sprite->data[4] = -24; StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); - sprite->callback = TranslateSpriteInEllipseOverDuration; + sprite->callback = TranslateSpriteInEllipse; sprite->callback(sprite); } diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 1660f6ec18..6def518702 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -1127,7 +1127,7 @@ static void LinkOpponentHandleLoadMonSprite(void) SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(gActiveBattler, 2), + GetBattlerSpriteCoord(gActiveBattler, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(gActiveBattler), GetBattlerSpriteSubpriority(gActiveBattler)); @@ -1161,7 +1161,7 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) gBattlerSpriteIds[battlerId] = CreateSprite( &gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(battlerId), GetBattlerSpriteSubpriority(battlerId)); diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index a9240b0ac7..a8cbd7dfdc 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -1017,7 +1017,7 @@ static void LinkPartnerHandleLoadMonSprite(void) SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(gActiveBattler, 2), + GetBattlerSpriteCoord(gActiveBattler, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(gActiveBattler), GetBattlerSpriteSubpriority(gActiveBattler)); gSprites[gBattlerSpriteIds[gActiveBattler]].x2 = -DISPLAY_WIDTH; @@ -1048,7 +1048,7 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) gBattlerSpriteIds[battlerId] = CreateSprite( &gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(battlerId), GetBattlerSpriteSubpriority(battlerId)); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index ac330be76a..9aeb3e81bb 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -1136,7 +1136,7 @@ static void OpponentHandleLoadMonSprite(void) SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(gActiveBattler, 2), + GetBattlerSpriteCoord(gActiveBattler, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(gActiveBattler), GetBattlerSpriteSubpriority(gActiveBattler)); @@ -1171,7 +1171,7 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId)); gBattlerSpriteIds[battlerId] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(battlerId), GetBattlerSpriteSubpriority(battlerId)); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index f4e47b4347..20ef730bd0 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -2205,7 +2205,7 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) gBattlerSpriteIds[battlerId] = CreateSprite( &gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(battlerId), GetBattlerSpriteSubpriority(battlerId)); diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 91fea6cde2..b2fd4520fe 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -1201,7 +1201,7 @@ static void PlayerPartnerHandleLoadMonSprite(void) SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(gActiveBattler, 2), + GetBattlerSpriteCoord(gActiveBattler, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(gActiveBattler), GetBattlerSpriteSubpriority(gActiveBattler)); gSprites[gBattlerSpriteIds[gActiveBattler]].x2 = -DISPLAY_WIDTH; @@ -1232,7 +1232,7 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) gBattlerSpriteIds[battlerId] = CreateSprite( &gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(battlerId), GetBattlerSpriteSubpriority(battlerId)); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index c6e649508f..a8c159563a 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1110,7 +1110,7 @@ static void RecordedOpponentHandleLoadMonSprite(void) SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(gActiveBattler, 2), + GetBattlerSpriteCoord(gActiveBattler, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(gActiveBattler), GetBattlerSpriteSubpriority(gActiveBattler)); @@ -1143,7 +1143,7 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId)); gBattlerSpriteIds[battlerId] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(battlerId), GetBattlerSpriteSubpriority(battlerId)); diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index 93d059fe99..c7015dd0ba 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -1092,7 +1092,7 @@ static void RecordedPlayerHandleLoadMonSprite(void) SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(gActiveBattler)); gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(gActiveBattler, 2), + GetBattlerSpriteCoord(gActiveBattler, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(gActiveBattler), GetBattlerSpriteSubpriority(gActiveBattler)); gSprites[gBattlerSpriteIds[gActiveBattler]].x2 = -DISPLAY_WIDTH; @@ -1123,7 +1123,7 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit) gBattlerSpriteIds[battlerId] = CreateSprite( &gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(battlerId), GetBattlerSpriteSubpriority(battlerId)); diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index d018fe1c01..376f76ab68 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -1466,7 +1466,7 @@ static void StartSendOutAnim(u8 battlerId) gBattleControllerData[battlerId] = CreateInvisibleSpriteWithCallback(SpriteCB_WaitForBattlerBallReleaseAnim); SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId)); gBattlerSpriteIds[battlerId] = CreateSprite(&gMultiuseSpriteTemplate, - GetBattlerSpriteCoord(battlerId, 2), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2), GetBattlerSpriteDefault_Y(battlerId), GetBattlerSpriteSubpriority(battlerId)); diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index f36524f370..2a690d129d 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -1147,13 +1147,19 @@ void LoadAndCreateEnemyShadowSprites(void) LoadCompressedSpriteSheet(&gSpriteSheet_EnemyShadow); battlerId = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); - gBattleSpritesDataPtr->healthBoxesData[battlerId].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, GetBattlerSpriteCoord(battlerId, 0), GetBattlerSpriteCoord(battlerId, 1) + 29, 0xC8); + gBattleSpritesDataPtr->healthBoxesData[battlerId].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y) + 29, + 0xC8); gSprites[gBattleSpritesDataPtr->healthBoxesData[battlerId].shadowSpriteId].data[0] = battlerId; if (IsDoubleBattle()) { battlerId = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); - gBattleSpritesDataPtr->healthBoxesData[battlerId].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, GetBattlerSpriteCoord(battlerId, 0), GetBattlerSpriteCoord(battlerId, 1) + 29, 0xC8); + gBattleSpritesDataPtr->healthBoxesData[battlerId].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X), + GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y) + 29, + 0xC8); gSprites[gBattleSpritesDataPtr->healthBoxesData[battlerId].shadowSpriteId].data[0] = battlerId; } } diff --git a/src/battle_main.c b/src/battle_main.c index ec093ecc7b..2b849aaf93 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -307,7 +307,7 @@ static const u16 *const sUnused1Ptr = sUnused1; static const u16 sUnused2[] = {0xfff0, 0, 0x0400, 0, 0, 0, 0x3c00, 0, 0x7ffe, 1, 0, 0}; static const u16 *const sUnused2Ptr = sUnused2; -static const s8 gUnknown_0831ACE0[] ={-32, -16, -16, -32, -32, 0, 0, 0}; +static const s8 sCenterToCornerVecXs[8] ={-32, -16, -16, -32, -32}; // format: attacking type, defending type, damage multiplier // the multiplier is a (decimal) fixed-point number: @@ -2983,7 +2983,7 @@ void SpriteCB_PlayerMonFromBall(struct Sprite *sprite) static void SpriteCB_TrainerThrowObject_Main(struct Sprite *sprite) { - sub_8039E9C(sprite); + AnimSetCenterToCornerVecX(sprite); if (sprite->animEnded) sprite->callback = SpriteCB_Idle; } @@ -2996,10 +2996,10 @@ void SpriteCB_TrainerThrowObject(struct Sprite *sprite) sprite->callback = SpriteCB_TrainerThrowObject_Main; } -void sub_8039E9C(struct Sprite *sprite) +void AnimSetCenterToCornerVecX(struct Sprite *sprite) { if (sprite->animDelayCounter == 0) - sprite->centerToCornerVecX = gUnknown_0831ACE0[sprite->animCmdIndex]; + sprite->centerToCornerVecX = sCenterToCornerVecXs[sprite->animCmdIndex]; } void BeginBattleIntroDummy(void) diff --git a/src/pokeball.c b/src/pokeball.c index 11f03eefed..bf485c0f09 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -894,8 +894,8 @@ static void SpriteCB_BallThrow_CaptureMon(struct Sprite *sprite) static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite) { sprite->data[0] = 25; - sprite->data[2] = GetBattlerSpriteCoord(sprite->sBattler, 2); - sprite->data[4] = GetBattlerSpriteCoord(sprite->sBattler, 3) + 24; + sprite->data[2] = GetBattlerSpriteCoord(sprite->sBattler, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(sprite->sBattler, BATTLER_COORD_Y_PIC_OFFSET) + 24; sprite->data[5] = -30; sprite->oam.affineParam = sprite->sBattler; InitAnimArcTranslation(sprite); diff --git a/src/reshow_battle_screen.c b/src/reshow_battle_screen.c index c8c03ede29..1b49a374c8 100644 --- a/src/reshow_battle_screen.c +++ b/src/reshow_battle_screen.c @@ -222,7 +222,7 @@ static void CreateBattlerSprite(u8 battler) return; SetMultiuseSpriteTemplateToPokemon(GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_SPECIES), GetBattlerPosition(battler)); - gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, 2), posY, GetBattlerSpriteSubpriority(battler)); + gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2), posY, GetBattlerSpriteSubpriority(battler)); gSprites[gBattlerSpriteIds[battler]].oam.paletteNum = battler; gSprites[gBattlerSpriteIds[battler]].callback = SpriteCallbackDummy; gSprites[gBattlerSpriteIds[battler]].data[0] = battler; @@ -258,7 +258,7 @@ static void CreateBattlerSprite(u8 battler) return; SetMultiuseSpriteTemplateToPokemon(GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_SPECIES), GetBattlerPosition(battler)); - gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, 2), posY, GetBattlerSpriteSubpriority(battler)); + gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2), posY, GetBattlerSpriteSubpriority(battler)); gSprites[gBattlerSpriteIds[battler]].oam.paletteNum = battler; gSprites[gBattlerSpriteIds[battler]].callback = SpriteCallbackDummy; gSprites[gBattlerSpriteIds[battler]].data[0] = battler; From 684f599a4420c65635aa5e764ae06c2147968dfe Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 6 Nov 2021 11:41:47 -0400 Subject: [PATCH 157/417] Label remaining battle_interface symbols --- include/constants/battle.h | 3 + include/strings.h | 4 + src/battle_interface.c | 288 +++++++++++++++++++------------------ src/battle_main.c | 6 +- src/strings.c | 8 +- 5 files changed, 163 insertions(+), 146 deletions(-) diff --git a/include/constants/battle.h b/include/constants/battle.h index 2534ade4b3..d87a800e2b 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -358,4 +358,7 @@ // Flag for BattlePutTextOnWindow. Never set #define B_WIN_COPYTOVRAM (1 << 7) +// Indicator for the party summary bar to display an empty slot. +#define HP_EMPTY_SLOT 0xFFFF + #endif // GUARD_CONSTANTS_BATTLE_H diff --git a/include/strings.h b/include/strings.h index 7317f8aac8..845e96a8c7 100644 --- a/include/strings.h +++ b/include/strings.h @@ -611,6 +611,10 @@ extern const u8 gText_PlayersBattleResults[]; extern const u8 gText_WinLoseDraw[]; extern const u8 gText_ColorTransparent[]; extern const u8 gText_Slash[]; +extern const u8 gText_HealthboxNickname[]; +extern const u8 gText_HealthboxGender_None[]; +extern const u8 gText_HealthboxGender_Male[]; +extern const u8 gText_HealthboxGender_Female[]; extern const u8 gText_99TimesPlus[]; extern const u8 gText_1MinutePlus[]; diff --git a/src/battle_interface.c b/src/battle_interface.c index 17497cb2f5..c1307da760 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -9,7 +9,6 @@ #include "string_util.h" #include "text.h" #include "sound.h" -#include "constants/songs.h" #include "decompress.h" #include "task.h" #include "util.h" @@ -20,10 +19,12 @@ #include "international_string_util.h" #include "safari_zone.h" #include "battle_anim.h" -#include "constants/battle_anim.h" -#include "constants/rgb.h" #include "data.h" #include "pokemon_summary_screen.h" +#include "strings.h" +#include "constants/battle_anim.h" +#include "constants/rgb.h" +#include "constants/songs.h" struct TestingBar { @@ -157,15 +158,6 @@ enum HEALTHBOX_GFX_FRAME_END_BAR, }; -// strings -extern const u8 gText_Slash[]; -extern const u8 gText_HighlightDarkGray[]; -extern const u8 gText_DynColor2[]; -extern const u8 gText_DynColor2Male[]; -extern const u8 gText_DynColor1Female[]; - -// this file's functions - static const u8 *GetHealthboxElementGfxPtr(u8 elementId); static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 bgColor, u32 *windowId); @@ -178,27 +170,26 @@ static void SafariTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 wi static void HpTextIntoHealthboxObject(void *dest, u8 *windowTileData, u32 windowWidth); static void FillHealthboxObject(void *dest, u32 arg1, u32 arg2); -static void sub_8073E08(u8 taskId); -static void sub_8073F98(u8 taskId); -static void sub_8073E64(u8 taskId); +static void Task_HidePartyStatusSummary_BattleStart_1(u8 taskId); +static void Task_HidePartyStatusSummary_BattleStart_2(u8 taskId); +static void Task_HidePartyStatusSummary_DuringBattle(u8 taskId); static void SpriteCB_HealthBoxOther(struct Sprite *sprite); static void SpriteCB_HealthBar(struct Sprite *sprite); -static void sub_8074158(struct Sprite *sprite); -static void sub_8074090(struct Sprite *sprite); -static void SpriteCB_StatusSummaryBar(struct Sprite *sprite); -static void SpriteCB_StatusSummaryBallsOnBattleStart(struct Sprite *sprite); -static void SpriteCB_StatusSummaryBallsOnSwitchout(struct Sprite *sprite); +static void SpriteCB_StatusSummaryBar_Enter(struct Sprite *sprite); +static void SpriteCB_StatusSummaryBar_Exit(struct Sprite *sprite); +static void SpriteCB_StatusSummaryBalls_Enter(struct Sprite *sprite); +static void SpriteCB_StatusSummaryBalls_Exit(struct Sprite *sprite); +static void SpriteCB_StatusSummaryBalls_OnSwitchout(struct Sprite *sprite); static u8 GetStatusIconForBattlerId(u8 statusElementId, u8 battlerId); static s32 CalcNewBarValue(s32 maxValue, s32 currValue, s32 receivedValue, s32 *arg3, u8 arg4, u16 arg5); static u8 GetScaledExpFraction(s32 currValue, s32 receivedValue, s32 maxValue, u8 scale); static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar); static u8 CalcBarFilledPixels(s32 maxValue, s32 oldValue, s32 receivedValue, s32 *currValue, u8 *arg4, u8 scale); -static void sub_8074F88(struct TestingBar *barInfo, s32 *arg1, u16 *arg2); +static void Debug_TestHealthBar_Helper(struct TestingBar *barInfo, s32 *arg1, u16 *arg2); -// const rom data -static const struct OamData sUnknown_0832C138 = +static const struct OamData sOamData_64x32 = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -220,7 +211,7 @@ static const struct SpriteTemplate sHealthboxPlayerSpriteTemplates[2] = { .tileTag = TAG_HEALTHBOX_PLAYER1_TILE, .paletteTag = TAG_HEALTHBOX_PAL, - .oam = &sUnknown_0832C138, + .oam = &sOamData_64x32, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, @@ -229,7 +220,7 @@ static const struct SpriteTemplate sHealthboxPlayerSpriteTemplates[2] = { .tileTag = TAG_HEALTHBOX_PLAYER2_TILE, .paletteTag = TAG_HEALTHBOX_PAL, - .oam = &sUnknown_0832C138, + .oam = &sOamData_64x32, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, @@ -242,7 +233,7 @@ static const struct SpriteTemplate sHealthboxOpponentSpriteTemplates[2] = { .tileTag = TAG_HEALTHBOX_OPPONENT1_TILE, .paletteTag = TAG_HEALTHBOX_PAL, - .oam = &sUnknown_0832C138, + .oam = &sOamData_64x32, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, @@ -251,7 +242,7 @@ static const struct SpriteTemplate sHealthboxOpponentSpriteTemplates[2] = { .tileTag = TAG_HEALTHBOX_OPPONENT2_TILE, .paletteTag = TAG_HEALTHBOX_PAL, - .oam = &sUnknown_0832C138, + .oam = &sOamData_64x32, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, @@ -263,7 +254,7 @@ static const struct SpriteTemplate sHealthboxSafariSpriteTemplate = { .tileTag = TAG_HEALTHBOX_SAFARI_TILE, .paletteTag = TAG_HEALTHBOX_PAL, - .oam = &sUnknown_0832C138, + .oam = &sOamData_64x32, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, @@ -327,7 +318,7 @@ static const struct SpriteTemplate sHealthbarSpriteTemplates[MAX_BATTLERS_COUNT] } }; -static const struct Subsprite sUnknown_0832C220[] = +static const struct Subsprite sUnused_Subsprites_0[] = { { .x = DISPLAY_WIDTH, @@ -371,7 +362,7 @@ static const struct Subsprite sUnknown_0832C220[] = } }; -static const struct Subsprite sUnknown_0832C234[] = +static const struct Subsprite sUnused_Subsprites_2[] = { { .x = DISPLAY_WIDTH, @@ -415,7 +406,7 @@ static const struct Subsprite sUnknown_0832C234[] = } }; -static const struct Subsprite sUnknown_0832C248[] = +static const struct Subsprite sUnused_Subsprites_1[] = { { .x = DISPLAY_WIDTH, @@ -435,7 +426,7 @@ static const struct Subsprite sUnknown_0832C248[] = } }; -static const struct Subsprite sUnknown_0832C250[] = +static const struct Subsprite sUnused_Subsprites_3[] = { { .x = DISPLAY_WIDTH, @@ -455,7 +446,7 @@ static const struct Subsprite sUnknown_0832C250[] = } }; -static const struct Subsprite sUnknown_0832C258[] = +static const struct Subsprite sHealthBar_Subsprites_Player[] = { { .x = DISPLAY_WIDTH, @@ -475,7 +466,7 @@ static const struct Subsprite sUnknown_0832C258[] = } }; -static const struct Subsprite sUnknown_0832C260[] = +static const struct Subsprite sHealthBar_Subsprites_Opponent[] = { { .x = DISPLAY_WIDTH, @@ -503,25 +494,24 @@ static const struct Subsprite sUnknown_0832C260[] = } }; -// unused subsprite table -static const struct SubspriteTable sUnknown_0832C26C[] = +static const struct SubspriteTable sUnused_SubspriteTable[] = { - {ARRAY_COUNT(sUnknown_0832C220), sUnknown_0832C220}, - {ARRAY_COUNT(sUnknown_0832C248), sUnknown_0832C248}, - {ARRAY_COUNT(sUnknown_0832C234), sUnknown_0832C234}, - {ARRAY_COUNT(sUnknown_0832C250), sUnknown_0832C250} + {ARRAY_COUNT(sUnused_Subsprites_0), sUnused_Subsprites_0}, + {ARRAY_COUNT(sUnused_Subsprites_1), sUnused_Subsprites_1}, + {ARRAY_COUNT(sUnused_Subsprites_2), sUnused_Subsprites_2}, + {ARRAY_COUNT(sUnused_Subsprites_3), sUnused_Subsprites_3} }; -static const struct SubspriteTable sUnknown_0832C28C[] = +static const struct SubspriteTable sHealthBar_SubspriteTables[] = { - {ARRAY_COUNT(sUnknown_0832C258), sUnknown_0832C258}, - {ARRAY_COUNT(sUnknown_0832C260), sUnknown_0832C260} + [B_SIDE_PLAYER] = {ARRAY_COUNT(sHealthBar_Subsprites_Player), sHealthBar_Subsprites_Player}, + [B_SIDE_OPPONENT] = {ARRAY_COUNT(sHealthBar_Subsprites_Opponent), sHealthBar_Subsprites_Opponent} }; -static const struct Subsprite sStatusSummaryBar_Subsprites_0[] = +static const struct Subsprite sStatusSummaryBar_Subsprites_Enter[] = { { - .x = 160, + .x = 32 * 5, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -529,7 +519,7 @@ static const struct Subsprite sStatusSummaryBar_Subsprites_0[] = .priority = 1 }, { - .x = 192, + .x = 32 * 6, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -537,7 +527,7 @@ static const struct Subsprite sStatusSummaryBar_Subsprites_0[] = .priority = 1 }, { - .x = 224, + .x = 32 * 7, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -554,10 +544,10 @@ static const struct Subsprite sStatusSummaryBar_Subsprites_0[] = } }; -static const struct Subsprite sUnknown_0832C2AC[] = +static const struct Subsprite sStatusSummaryBar_Subsprites_Exit[] = { { - .x = 160, + .x = 32 * 5, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -565,7 +555,7 @@ static const struct Subsprite sUnknown_0832C2AC[] = .priority = 1 }, { - .x = 192, + .x = 32 * 6, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -573,7 +563,7 @@ static const struct Subsprite sUnknown_0832C2AC[] = .priority = 1 }, { - .x = 224, + .x = 32 * 7, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -581,7 +571,7 @@ static const struct Subsprite sUnknown_0832C2AC[] = .priority = 1 }, { - .x = 0, + .x = 32 * 0, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -589,7 +579,7 @@ static const struct Subsprite sUnknown_0832C2AC[] = .priority = 1 }, { - .x = 32, + .x = 32 * 1, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -597,7 +587,7 @@ static const struct Subsprite sUnknown_0832C2AC[] = .priority = 1 }, { - .x = 64, + .x = 32 * 2, .y = 0, .shape = SPRITE_SHAPE(32x8), .size = SPRITE_SIZE(32x8), @@ -606,14 +596,14 @@ static const struct Subsprite sUnknown_0832C2AC[] = } }; -static const struct SubspriteTable sStatusSummaryBar_SubspriteTable[] = +static const struct SubspriteTable sStatusSummaryBar_SubspriteTable_Enter[] = { - {ARRAY_COUNT(sStatusSummaryBar_Subsprites_0), sStatusSummaryBar_Subsprites_0} + {ARRAY_COUNT(sStatusSummaryBar_Subsprites_Enter), sStatusSummaryBar_Subsprites_Enter} }; -static const struct SubspriteTable sUnknown_0832C2CC[] = +static const struct SubspriteTable sStatusSummaryBar_SubspriteTable_Exit[] = { - {ARRAY_COUNT(sUnknown_0832C2AC), sUnknown_0832C2AC} + {ARRAY_COUNT(sStatusSummaryBar_Subsprites_Exit), sStatusSummaryBar_Subsprites_Exit} }; // unused unknown image @@ -676,23 +666,23 @@ static const struct OamData sOamData_StatusSummaryBalls = static const struct SpriteTemplate sStatusSummaryBarSpriteTemplates[2] = { - { + { // Player .tileTag = TAG_STATUS_SUMMARY_BAR_TILE, .paletteTag = TAG_STATUS_SUMMARY_BAR_PAL, - .oam = &sUnknown_0832C138, + .oam = &sOamData_64x32, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCB_StatusSummaryBar + .callback = SpriteCB_StatusSummaryBar_Enter }, - { + { // Opponent .tileTag = TAG_STATUS_SUMMARY_BAR_TILE, .paletteTag = TAG_STATUS_SUMMARY_BAR_PAL, - .oam = &sUnknown_0832C138, + .oam = &sOamData_64x32, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCB_StatusSummaryBar + .callback = SpriteCB_StatusSummaryBar_Enter } }; @@ -705,7 +695,7 @@ static const struct SpriteTemplate sStatusSummaryBallsSpriteTemplates[2] = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCB_StatusSummaryBallsOnBattleStart + .callback = SpriteCB_StatusSummaryBalls_Enter }, { .tileTag = TAG_STATUS_SUMMARY_BALLS_TILE, @@ -714,7 +704,7 @@ static const struct SpriteTemplate sStatusSummaryBallsSpriteTemplates[2] = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCB_StatusSummaryBallsOnBattleStart + .callback = SpriteCB_StatusSummaryBalls_Enter } }; @@ -739,23 +729,28 @@ static const u16 sStatusIconColors[] = [PAL_STATUS_BRN] = RGB(28, 14, 10), }; -static const struct WindowTemplate sHealthboxWindowTemplate = {0, 0, 0, 8, 2, 0, 0}; // width = 8, height = 2 - -// code +static const struct WindowTemplate sHealthboxWindowTemplate = { + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 8, + .height = 2, + .paletteNum = 0, + .baseBlock = 0 +}; static s32 DummiedOutFunction(s16 unused1, s16 unused2, s32 unused3) { return 9; } -void sub_8072308(s16 number, u16 *dest, bool8 unk) + +static void Debug_DrawNumber(s16 number, u16 *dest, bool8 unk) { s8 i, j; u8 buff[4]; for (i = 0; i < 4; i++) - { buff[i] = 0; - } for (i = 3; ; i--) { @@ -767,9 +762,8 @@ void sub_8072308(s16 number, u16 *dest, bool8 unk) else { for (; i > -1; i--) - { buff[i] = 0xFF; - } + if (buff[3] == 0xFF) buff[3] = 0; break; @@ -819,12 +813,12 @@ void sub_8072308(s16 number, u16 *dest, bool8 unk) } } - -void sub_80724A8(s16 arg0, s16 arg1, u16 *arg2) +// Unused +static void Debug_DrawNumberPair(s16 number1, s16 number2, u16 *arg2) { arg2[4] = 0x1E; - sub_8072308(arg1, arg2, 0); - sub_8072308(arg0, arg2 + 5, 1); + Debug_DrawNumber(number2, arg2, 0); + Debug_DrawNumber(number1, arg2 + 5, 1); } // Because the healthbox is too large to fit into one sprite, it is divided into two sprites. @@ -910,7 +904,7 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId) healthbarSpriteId = CreateSpriteAtEnd(&sHealthbarSpriteTemplates[gBattlerPositions[battlerId]], 140, 60, 0); healthBarSpritePtr = &gSprites[healthbarSpriteId]; - SetSubspriteTables(healthBarSpritePtr, &sUnknown_0832C28C[GetBattlerSide(battlerId)]); + SetSubspriteTables(healthBarSpritePtr, &sHealthBar_SubspriteTables[GetBattlerSide(battlerId)]); healthBarSpritePtr->subspriteMode = SUBSPRITES_IGNORE_PRIORITY; healthBarSpritePtr->oam.priority = 1; @@ -1299,7 +1293,7 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon) barFontGfx = &gMonSpritesGfxPtr->barFontGfx[0x520 + (GetBattlerPosition(gSprites[healthboxSpriteId].hMain_Battler) * 384)]; var = 5; nature = GetNature(mon); - StringCopy(text + 6, gNatureNamePointers[nature]); + StringCopy(&text[6], gNatureNamePointers[nature]); RenderTextHandleBold(barFontGfx, FONT_BOLD, text); for (j = 6, i = 0; i < var; i++, j++) @@ -1328,8 +1322,8 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon) } healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId; - ConvertIntToDecimalStringN(text + 6, gBattleStruct->safariCatchFactor, STR_CONV_MODE_RIGHT_ALIGN, 2); - ConvertIntToDecimalStringN(text + 9, gBattleStruct->safariEscapeFactor, STR_CONV_MODE_RIGHT_ALIGN, 2); + ConvertIntToDecimalStringN(&text[6], gBattleStruct->safariCatchFactor, STR_CONV_MODE_RIGHT_ALIGN, 2); + ConvertIntToDecimalStringN(&text[9], gBattleStruct->safariEscapeFactor, STR_CONV_MODE_RIGHT_ALIGN, 2); text[5] = CHAR_SPACE; text[8] = CHAR_SLASH; RenderTextHandleBold(gMonSpritesGfxPtr->barFontGfx, FONT_BOLD, text); @@ -1424,7 +1418,7 @@ void SwapHpBarsWithHpText(void) #define tSummaryBarSpriteId data[1] #define tBallIconSpriteId(n) data[3 + n] #define tIsBattleStart data[10] -#define tData15 data[15] +#define tBlend data[15] u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, u8 arg2, bool8 isBattleStart) { @@ -1471,7 +1465,7 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, LoadSpritePalette(&sStatusSummaryBallsSpritePal); summaryBarSpriteId = CreateSprite(&sStatusSummaryBarSpriteTemplates[isOpponent], bar_X, bar_Y, 10); - SetSubspriteTables(&gSprites[summaryBarSpriteId], sStatusSummaryBar_SubspriteTable); + SetSubspriteTables(&gSprites[summaryBarSpriteId], sStatusSummaryBar_SubspriteTable_Enter); gSprites[summaryBarSpriteId].x2 = bar_pos2_X; gSprites[summaryBarSpriteId].data[0] = bar_data0; @@ -1490,7 +1484,7 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, ballIconSpritesIds[i] = CreateSpriteAtEnd(&sStatusSummaryBallsSpriteTemplates[isOpponent], bar_X, bar_Y - 4, 9); if (!isBattleStart) - gSprites[ballIconSpritesIds[i]].callback = SpriteCB_StatusSummaryBallsOnSwitchout; + gSprites[ballIconSpritesIds[i]].callback = SpriteCB_StatusSummaryBalls_OnSwitchout; if (!isOpponent) { @@ -1522,42 +1516,49 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, { for (i = 0; i < PARTY_SIZE; i++) { - if (partyInfo[i].hp == 0xFFFF) // empty slot or an egg + if (partyInfo[i].hp == HP_EMPTY_SLOT) { + // empty slot or an egg gSprites[ballIconSpritesIds[i]].oam.tileNum += 1; gSprites[ballIconSpritesIds[i]].data[7] = 1; } - else if (partyInfo[i].hp == 0) // fainted mon + else if (partyInfo[i].hp == 0) { + // fainted mon gSprites[ballIconSpritesIds[i]].oam.tileNum += 3; } - else if (partyInfo[i].status != 0) // mon with major status + else if (partyInfo[i].status != 0) { + // mon with major status gSprites[ballIconSpritesIds[i]].oam.tileNum += 2; } } } else { - for (i = 0, var = 5, j = 0; j < PARTY_SIZE; j++) + for (i = 0, var = PARTY_SIZE - 1, j = 0; j < PARTY_SIZE; j++) { - if (partyInfo[j].hp == 0xFFFF) // empty slot or an egg + if (partyInfo[j].hp == HP_EMPTY_SLOT) { + // empty slot or an egg gSprites[ballIconSpritesIds[var]].oam.tileNum += 1; gSprites[ballIconSpritesIds[var]].data[7] = 1; var--; continue; } - else if (partyInfo[j].hp == 0) // fainted mon + else if (partyInfo[j].hp == 0) { + // fainted mon gSprites[ballIconSpritesIds[i]].oam.tileNum += 3; } else if (gBattleTypeFlags & BATTLE_TYPE_ARENA && gBattleStruct->arenaLostPlayerMons & gBitTable[j]) { + // fainted arena mon gSprites[ballIconSpritesIds[i]].oam.tileNum += 3; } - else if (partyInfo[j].status != 0) // mon with major status + else if (partyInfo[j].status != 0) { + // mon with primary status gSprites[ballIconSpritesIds[i]].oam.tileNum += 2; } i++; @@ -1568,19 +1569,22 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, { if (gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_TWO_OPPONENTS)) { - for (var = 5, i = 0; i < PARTY_SIZE; i++) + for (var = PARTY_SIZE - 1, i = 0; i < PARTY_SIZE; i++) { - if (partyInfo[i].hp == 0xFFFF) // empty slot or an egg + if (partyInfo[i].hp == HP_EMPTY_SLOT) { + // empty slot or an egg gSprites[ballIconSpritesIds[var]].oam.tileNum += 1; gSprites[ballIconSpritesIds[var]].data[7] = 1; } - else if (partyInfo[i].hp == 0) // fainted mon + else if (partyInfo[i].hp == 0) { + // fainted mon gSprites[ballIconSpritesIds[var]].oam.tileNum += 3; } - else if (partyInfo[i].status != 0) // mon with major status + else if (partyInfo[i].status != 0) { + // mon with primary status gSprites[ballIconSpritesIds[var]].oam.tileNum += 2; } var--; @@ -1590,24 +1594,28 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, { for (var = 0, i = 0, j = 0; j < PARTY_SIZE; j++) { - if (partyInfo[j].hp == 0xFFFF) // empty slot or an egg + if (partyInfo[j].hp == HP_EMPTY_SLOT) { + // empty slot or an egg gSprites[ballIconSpritesIds[i]].oam.tileNum += 1; gSprites[ballIconSpritesIds[i]].data[7] = 1; i++; continue; } - else if (partyInfo[j].hp == 0) // fainted mon + else if (partyInfo[j].hp == 0) { - gSprites[ballIconSpritesIds[5 - var]].oam.tileNum += 3; + // fainted mon + gSprites[ballIconSpritesIds[PARTY_SIZE - 1 - var]].oam.tileNum += 3; } - else if (gBattleTypeFlags & BATTLE_TYPE_ARENA && gBattleStruct->arenaLostOpponentMons & gBitTable[j]) // hmm...? + else if (gBattleTypeFlags & BATTLE_TYPE_ARENA && gBattleStruct->arenaLostOpponentMons & gBitTable[j]) { - gSprites[ballIconSpritesIds[5 - var]].oam.tileNum += 3; + // fainted arena mon + gSprites[ballIconSpritesIds[PARTY_SIZE - 1 - var]].oam.tileNum += 3; } - else if (partyInfo[j].status != 0) // mon with major status + else if (partyInfo[j].status != 0) { - gSprites[ballIconSpritesIds[5 - var]].oam.tileNum += 2; + // mon with primary status + gSprites[ballIconSpritesIds[PARTY_SIZE - 1 - var]].oam.tileNum += 2; } var++; } @@ -1632,6 +1640,7 @@ u8 CreatePartyStatusSummarySprites(u8 battlerId, struct HpAndStatus *partyInfo, return taskId; } +// Slide the party summary tray back offscreen void Task_HidePartyStatusSummary(u8 taskId) { u8 ballIconSpriteIds[PARTY_SIZE]; @@ -1650,7 +1659,7 @@ void Task_HidePartyStatusSummary(u8 taskId) SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); - gTasks[taskId].tData15 = 16; + gTasks[taskId].tBlend = 16; for (i = 0; i < PARTY_SIZE; i++) gSprites[ballIconSpriteIds[i]].oam.objMode = ST_OAM_OBJ_BLEND; @@ -1663,51 +1672,51 @@ void Task_HidePartyStatusSummary(u8 taskId) { if (GetBattlerSide(battlerId) != B_SIDE_PLAYER) { - gSprites[ballIconSpriteIds[5 - i]].data[1] = 7 * i; - gSprites[ballIconSpriteIds[5 - i]].data[3] = 0; - gSprites[ballIconSpriteIds[5 - i]].data[4] = 0; - gSprites[ballIconSpriteIds[5 - i]].callback = sub_8074158; + gSprites[ballIconSpriteIds[PARTY_SIZE - 1 - i]].data[1] = 7 * i; + gSprites[ballIconSpriteIds[PARTY_SIZE - 1 - i]].data[3] = 0; + gSprites[ballIconSpriteIds[PARTY_SIZE - 1 - i]].data[4] = 0; + gSprites[ballIconSpriteIds[PARTY_SIZE - 1 - i]].callback = SpriteCB_StatusSummaryBalls_Exit; } else { gSprites[ballIconSpriteIds[i]].data[1] = 7 * i; gSprites[ballIconSpriteIds[i]].data[3] = 0; gSprites[ballIconSpriteIds[i]].data[4] = 0; - gSprites[ballIconSpriteIds[i]].callback = sub_8074158; + gSprites[ballIconSpriteIds[i]].callback = SpriteCB_StatusSummaryBalls_Exit; } } gSprites[summaryBarSpriteId].data[0] /= 2; gSprites[summaryBarSpriteId].data[1] = 0; - gSprites[summaryBarSpriteId].callback = sub_8074090; - SetSubspriteTables(&gSprites[summaryBarSpriteId], sUnknown_0832C2CC); - gTasks[taskId].func = sub_8073E08; + gSprites[summaryBarSpriteId].callback = SpriteCB_StatusSummaryBar_Exit; + SetSubspriteTables(&gSprites[summaryBarSpriteId], sStatusSummaryBar_SubspriteTable_Exit); + gTasks[taskId].func = Task_HidePartyStatusSummary_BattleStart_1; } else { - gTasks[taskId].func = sub_8073F98; + gTasks[taskId].func = Task_HidePartyStatusSummary_DuringBattle; } } -static void sub_8073E08(u8 taskId) +static void Task_HidePartyStatusSummary_BattleStart_1(u8 taskId) { if ((gTasks[taskId].data[11]++ % 2) == 0) { - if (--gTasks[taskId].tData15 < 0) + if (--gTasks[taskId].tBlend < 0) return; - SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[15], 16 - gTasks[taskId].data[15])); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].tBlend, 16 - gTasks[taskId].tBlend)); } - if (gTasks[taskId].tData15 == 0) - gTasks[taskId].func = sub_8073E64; + if (gTasks[taskId].tBlend == 0) + gTasks[taskId].func = Task_HidePartyStatusSummary_BattleStart_2; } -static void sub_8073E64(u8 taskId) +static void Task_HidePartyStatusSummary_BattleStart_2(u8 taskId) { u8 ballIconSpriteIds[PARTY_SIZE]; s32 i; u8 battlerId = gTasks[taskId].tBattler; - if (--gTasks[taskId].tData15 == -1) + if (--gTasks[taskId].tBlend == -1) { u8 summaryBarSpriteId = gTasks[taskId].tSummaryBarSpriteId; @@ -1731,7 +1740,7 @@ static void sub_8073E64(u8 taskId) for (i = 1; i < PARTY_SIZE; i++) DestroySprite(&gSprites[ballIconSpriteIds[i]]); } - else if (gTasks[taskId].tData15 == -3) + else if (gTasks[taskId].tBlend == -3) { gBattleSpritesDataPtr->healthBoxesData[battlerId].partyStatusSummaryShown = 0; SetGpuReg(REG_OFFSET_BLDCNT, 0); @@ -1740,17 +1749,17 @@ static void sub_8073E64(u8 taskId) } } -static void sub_8073F98(u8 taskId) +static void Task_HidePartyStatusSummary_DuringBattle(u8 taskId) { u8 ballIconSpriteIds[PARTY_SIZE]; s32 i; u8 battlerId = gTasks[taskId].tBattler; - if (--gTasks[taskId].tData15 >= 0) + if (--gTasks[taskId].tBlend >= 0) { - SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[15], 16 - gTasks[taskId].data[15])); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].tBlend, 16 - gTasks[taskId].tBlend)); } - else if (gTasks[taskId].tData15 == -1) + else if (gTasks[taskId].tBlend == -1) { u8 summaryBarSpriteId = gTasks[taskId].tSummaryBarSpriteId; @@ -1763,7 +1772,7 @@ static void sub_8073F98(u8 taskId) for (i = 1; i < PARTY_SIZE; i++) DestroySprite(&gSprites[ballIconSpriteIds[i]]); } - else if (gTasks[taskId].tData15 == -3) + else if (gTasks[taskId].tBlend == -3) { gBattleSpritesDataPtr->healthBoxesData[battlerId].partyStatusSummaryShown = 0; SetGpuReg(REG_OFFSET_BLDCNT, 0); @@ -1776,15 +1785,15 @@ static void sub_8073F98(u8 taskId) #undef tSummaryBarSpriteId #undef tBallIconSpriteId #undef tIsBattleStart -#undef tData15 +#undef tBlend -static void SpriteCB_StatusSummaryBar(struct Sprite *sprite) +static void SpriteCB_StatusSummaryBar_Enter(struct Sprite *sprite) { if (sprite->x2 != 0) sprite->x2 += sprite->data[0]; } -static void sub_8074090(struct Sprite *sprite) +static void SpriteCB_StatusSummaryBar_Exit(struct Sprite *sprite) { sprite->data[1] += 32; if (sprite->data[0] > 0) @@ -1794,7 +1803,7 @@ static void sub_8074090(struct Sprite *sprite) sprite->data[1] &= 0xF; } -static void SpriteCB_StatusSummaryBallsOnBattleStart(struct Sprite *sprite) +static void SpriteCB_StatusSummaryBalls_Enter(struct Sprite *sprite) { u8 var1; u16 var2; @@ -1839,7 +1848,7 @@ static void SpriteCB_StatusSummaryBallsOnBattleStart(struct Sprite *sprite) } } -static void sub_8074158(struct Sprite *sprite) +static void SpriteCB_StatusSummaryBalls_Exit(struct Sprite *sprite) { u8 var1; u16 var2; @@ -1865,7 +1874,7 @@ static void sub_8074158(struct Sprite *sprite) } } -static void SpriteCB_StatusSummaryBallsOnSwitchout(struct Sprite *sprite) +static void SpriteCB_StatusSummaryBalls_OnSwitchout(struct Sprite *sprite) { u8 barSpriteId = sprite->data[0]; @@ -1882,7 +1891,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon) u16 species; u8 gender; - StringCopy(gDisplayedStringBattle, gText_HighlightDarkGray); + StringCopy(gDisplayedStringBattle, gText_HealthboxNickname); GetMonData(mon, MON_DATA_NICKNAME, nickname); StringGetEnd10(nickname); ptr = StringAppend(gDisplayedStringBattle, nickname); @@ -1898,15 +1907,15 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon) switch (gender) { default: - StringCopy(ptr, gText_DynColor2); + StringCopy(ptr, gText_HealthboxGender_None); windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(gDisplayedStringBattle, 0, 3, 2, &windowId); break; case MON_MALE: - StringCopy(ptr, gText_DynColor2Male); + StringCopy(ptr, gText_HealthboxGender_Male); windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(gDisplayedStringBattle, 0, 3, 2, &windowId); break; case MON_FEMALE: - StringCopy(ptr, gText_DynColor1Female); + StringCopy(ptr, gText_HealthboxGender_Female); windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(gDisplayedStringBattle, 0, 3, 2, &windowId); break; } @@ -2422,8 +2431,9 @@ static u8 CalcBarFilledPixels(s32 maxValue, s32 oldValue, s32 receivedValue, s32 return filledPixels; } +// Unused // These two functions seem as if they were made for testing the health bar. -static s16 sub_8074F28(struct TestingBar *barInfo, s32 *currValue, u16 *arg2, s32 arg3) +static s16 Debug_TestHealthBar(struct TestingBar *barInfo, s32 *currValue, u16 *arg2, s32 arg3) { s16 ret, var; @@ -2431,7 +2441,7 @@ static s16 sub_8074F28(struct TestingBar *barInfo, s32 *currValue, u16 *arg2, s3 barInfo->oldValue, barInfo->receivedValue, currValue, B_HEALTHBAR_PIXELS / 8, 1); - sub_8074F88(barInfo, currValue, arg2); + Debug_TestHealthBar_Helper(barInfo, currValue, arg2); if (barInfo->maxValue < B_HEALTHBAR_PIXELS) var = *currValue >> 8; @@ -2443,7 +2453,7 @@ static s16 sub_8074F28(struct TestingBar *barInfo, s32 *currValue, u16 *arg2, s3 return ret; } -static void sub_8074F88(struct TestingBar *barInfo, s32 *currValue, u16 *arg2) +static void Debug_TestHealthBar_Helper(struct TestingBar *barInfo, s32 *currValue, u16 *arg2) { u8 sp8[6]; u16 sp10[6]; diff --git a/src/battle_main.c b/src/battle_main.c index ec093ecc7b..cca992b436 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3492,7 +3492,7 @@ static void BattleIntroDrawPartySummaryScreens(void) if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) { - hpStatus[i].hp = 0xFFFF; + hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; } else @@ -3510,7 +3510,7 @@ static void BattleIntroDrawPartySummaryScreens(void) if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) { - hpStatus[i].hp = 0xFFFF; + hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; } else @@ -3536,7 +3536,7 @@ static void BattleIntroDrawPartySummaryScreens(void) if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) { - hpStatus[i].hp = 0xFFFF; + hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; } else diff --git a/src/strings.c b/src/strings.c index 3785766ce9..a77e67a847 100644 --- a/src/strings.c +++ b/src/strings.c @@ -1242,11 +1242,11 @@ const u8 gText_ContestantsMonWon[] = _("{STR_VAR_1}'s {STR_VAR_2} won!"); const u8 gText_CommunicationStandby[] = _("Communication standby…"); const u8 gText_ColorDarkGray[] = _("{COLOR DARK_GRAY}"); const u8 gText_ColorDynamic6WhiteDynamic5[] = _("{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR6 WHITE DYNAMIC_COLOR5}"); // Unused -const u8 gText_HighlightDarkGray[] = _("{HIGHLIGHT DARK_GRAY}"); +const u8 gText_HealthboxNickname[] = _("{HIGHLIGHT DARK_GRAY}"); const u8 gText_EmptySpace2[] = _(" "); // Unused -const u8 gText_DynColor2Male[] = _("{COLOR DYNAMIC_COLOR2}♂"); -const u8 gText_DynColor1Female[] = _("{COLOR DYNAMIC_COLOR1}♀"); -const u8 gText_DynColor2[] = _("{COLOR DYNAMIC_COLOR2}"); +const u8 gText_HealthboxGender_Male[] = _("{COLOR DYNAMIC_COLOR2}♂"); +const u8 gText_HealthboxGender_Female[] = _("{COLOR DYNAMIC_COLOR1}♀"); +const u8 gText_HealthboxGender_None[] = _("{COLOR DYNAMIC_COLOR2}"); const u8 gText_Upper[] = _("UPPER"); const u8 gText_Lower[] = _("lower"); const u8 gText_Others[] = _("OTHERS"); From ab1074e629da97a7a68cc1babc0f4840858adb1b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 1 Nov 2021 12:01:51 -0400 Subject: [PATCH 158/417] Label unknown palette functions --- include/palette.h | 8 +- src/battle_anim_mons.c | 5 +- src/palette.c | 244 +++++++++++++++++++++-------------------- 3 files changed, 127 insertions(+), 130 deletions(-) diff --git a/include/palette.h b/include/palette.h index be2a0dd487..81a1e1caec 100644 --- a/include/palette.h +++ b/include/palette.h @@ -58,15 +58,9 @@ void FillPalette(u16, u16, u16); void TransferPlttBuffer(void); u8 UpdatePaletteFade(void); void ResetPaletteFade(void); -void ReadPlttIntoBuffers(void); bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16); -bool8 unref_sub_8073D3C(u32, u8, u8, u8, u16); -void unref_sub_8073D84(u8, u32 *); -void ResetPaletteStructByUid(u16); -void ResetPaletteStruct(u8); +void PaletteStruct_ResetById(u16); void ResetPaletteFadeControl(void); -void unref_sub_8074168(u16); -void unref_sub_8074194(u16); void InvertPlttBuffer(u32); void TintPlttBuffer(u32, s8, s8, s8); void UnfadePlttBuffer(u32); diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index d0ddfdd771..6471c67d53 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -665,9 +665,10 @@ void sub_80A6760(struct Sprite *sprite) sprite->callback = sub_80A64D0; } -void sub_80A67A4(struct Sprite *sprite) +// Unused +static void EndUnkPaletteAnim(struct Sprite *sprite) { - ResetPaletteStructByUid(sprite->data[5]); + PaletteStruct_ResetById(sprite->data[5]); DestroySpriteAndMatrix(sprite); } diff --git a/src/palette.c b/src/palette.c index e106ce6858..9fec449bc4 100644 --- a/src/palette.c +++ b/src/palette.c @@ -16,36 +16,38 @@ enum // These are structs for some unused palette system. // The full functionality of this system is unknown. +#define NUM_PALETTE_STRUCTS 16 + struct PaletteStructTemplate { - u16 uid; + u16 id; u16 *src; - u16 pst_field_8_0:1; - u16 pst_field_8_1:9; + bool16 pst_field_8_0:1; + u16 unused:9; u16 size:5; - u16 pst_field_9_7:1; - u8 pst_field_A; + u8 time1; u8 srcCount:5; - u8 pst_field_B_5:3; - u8 pst_field_C; + u8 state:3; + u8 time2; }; struct PaletteStruct { - const struct PaletteStructTemplate *base; - u32 ps_field_4_0:1; - u16 ps_field_4_1:1; + const struct PaletteStructTemplate *template; + bool32 active:1; + bool32 flag:1; u32 baseDestOffset:9; - u16 destOffset:10; - u16 srcIndex:7; - u8 ps_field_8; - u8 ps_field_9; + u32 destOffset:10; + u32 srcIndex:7; + u8 countdown1; + u8 countdown2; }; -static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); -static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); -static void unused_sub_80A1F00(struct PaletteStruct *); -static u8 GetPaletteNumByUid(u16); +static void PaletteStruct_Copy(struct PaletteStruct *, u32 *); +static void PaletteStruct_Blend(struct PaletteStruct *, u32 *); +static void PaletteStruct_TryEnd(struct PaletteStruct *); +static void PaletteStruct_Reset(u8); +static u8 PaletteStruct_GetPalNum(u16); static u8 UpdateNormalPaletteFade(void); static void BeginFastPaletteFadeInternal(u8); static u8 UpdateFastPaletteFade(void); @@ -58,15 +60,15 @@ static void Task_BlendPalettesGradually(u8 taskId); // unaligned word reads are issued in BlendPalette otherwise ALIGNED(4) EWRAM_DATA u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE] = {0}; ALIGNED(4) EWRAM_DATA u16 gPlttBufferFaded[PLTT_BUFFER_SIZE] = {0}; -EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; +EWRAM_DATA struct PaletteStruct sPaletteStructs[NUM_PALETTE_STRUCTS] = {0}; EWRAM_DATA struct PaletteFadeControl gPaletteFade = {0}; static EWRAM_DATA u32 sFiller = 0; static EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[PLTT_DECOMP_BUFFER_SIZE] = {0}; static const struct PaletteStructTemplate gDummyPaletteStructTemplate = { - .uid = 0xFFFF, - .pst_field_B_5 = 1 + .id = 0xFFFF, + .state = 1 }; static const u8 sRoundedDownGrayscaleMap[] = { @@ -82,20 +84,20 @@ static const u8 sRoundedDownGrayscaleMap[] = { void LoadCompressedPalette(const u32 *src, u16 offset, u16 size) { LZDecompressWram(src, gPaletteDecompressionBuffer); - CpuCopy16(gPaletteDecompressionBuffer, gPlttBufferUnfaded + offset, size); - CpuCopy16(gPaletteDecompressionBuffer, gPlttBufferFaded + offset, size); + CpuCopy16(gPaletteDecompressionBuffer, &gPlttBufferUnfaded[offset], size); + CpuCopy16(gPaletteDecompressionBuffer, &gPlttBufferFaded[offset], size); } void LoadPalette(const void *src, u16 offset, u16 size) { - CpuCopy16(src, gPlttBufferUnfaded + offset, size); - CpuCopy16(src, gPlttBufferFaded + offset, size); + CpuCopy16(src, &gPlttBufferUnfaded[offset], size); + CpuCopy16(src, &gPlttBufferFaded[offset], size); } void FillPalette(u16 value, u16 offset, u16 size) { - CpuFill16(value, gPlttBufferUnfaded + offset, size); - CpuFill16(value, gPlttBufferFaded + offset, size); + CpuFill16(value, &gPlttBufferUnfaded[offset], size); + CpuFill16(value, &gPlttBufferFaded[offset], size); } void TransferPlttBuffer(void) @@ -105,7 +107,7 @@ void TransferPlttBuffer(void) void *src = gPlttBufferFaded; void *dest = (void *)PLTT; DmaCopy16(3, src, dest, PLTT_SIZE); - sPlttBufferTransferPending = 0; + sPlttBufferTransferPending = FALSE; if (gPaletteFade.mode == HARDWARE_FADE && gPaletteFade.active) UpdateBlendRegisters(); } @@ -135,13 +137,13 @@ void ResetPaletteFade(void) { u8 i; - for (i = 0; i < 16; i++) - ResetPaletteStruct(i); + for (i = 0; i < NUM_PALETTE_STRUCTS; i++) + PaletteStruct_Reset(i); ResetPaletteFadeControl(); } -void ReadPlttIntoBuffers(void) +static void ReadPlttIntoBuffers(void) { u16 i; u16 *pltt = (u16 *)PLTT; @@ -178,7 +180,7 @@ bool8 BeginNormalPaletteFade(u32 selectedPalettes, s8 delay, u8 startY, u8 targe gPaletteFade.y = startY; gPaletteFade.targetY = targetY; gPaletteFade.blendColor = color; - gPaletteFade.active = 1; + gPaletteFade.active = TRUE; gPaletteFade.mode = NORMAL_FADE; if (startY < targetY) @@ -189,9 +191,9 @@ bool8 BeginNormalPaletteFade(u32 selectedPalettes, s8 delay, u8 startY, u8 targe UpdatePaletteFade(); temp = gPaletteFade.bufferTransferDisabled; - gPaletteFade.bufferTransferDisabled = 0; + gPaletteFade.bufferTransferDisabled = FALSE; CpuCopy32(gPlttBufferFaded, (void *)PLTT, PLTT_SIZE); - sPlttBufferTransferPending = 0; + sPlttBufferTransferPending = FALSE; if (gPaletteFade.mode == HARDWARE_FADE && gPaletteFade.active) UpdateBlendRegisters(); gPaletteFade.bufferTransferDisabled = temp; @@ -199,55 +201,55 @@ bool8 BeginNormalPaletteFade(u32 selectedPalettes, s8 delay, u8 startY, u8 targe } } -bool8 unref_sub_80A1C1C(u32 a1, u8 a2, u8 a3, u8 a4, u16 a5) +// Unused +static bool8 BeginPlttFade(u32 selectedPalettes, u8 delay, u8 startY, u8 targetY, u16 blendColor) { ReadPlttIntoBuffers(); - return BeginNormalPaletteFade(a1, a2, a3, a4, a5); + return BeginNormalPaletteFade(selectedPalettes, delay, startY, targetY, blendColor); } -void unref_sub_80A1C64(u8 a1, u32 *a2) +// Unused +static void PaletteStruct_Run(u8 a1, u32 *unkFlags) { u8 i; - for (i = 0; i < 16; i++) + for (i = 0; i < NUM_PALETTE_STRUCTS; i++) { struct PaletteStruct *palstruct = &sPaletteStructs[i]; - if (palstruct->ps_field_4_0) + if (palstruct->active) { - if (palstruct->base->pst_field_8_0 == a1) + if (palstruct->template->pst_field_8_0 == a1) { - u8 val1 = palstruct->srcIndex; - u8 val2 = palstruct->base->srcCount; - if (val1 == val2) + if (palstruct->srcIndex == palstruct->template->srcCount) { - unused_sub_80A1F00(palstruct); - if (!palstruct->ps_field_4_0) + PaletteStruct_TryEnd(palstruct); + if (!palstruct->active) continue; } - if (palstruct->ps_field_8 == 0) - unused_sub_80A1CDC(palstruct, a2); + if (palstruct->countdown1 == 0) + PaletteStruct_Copy(palstruct, unkFlags); else - palstruct->ps_field_8--; + palstruct->countdown1--; - unused_sub_80A1E40(palstruct, a2); + PaletteStruct_Blend(palstruct, unkFlags); } } } } -static void unused_sub_80A1CDC(struct PaletteStruct *a1, u32 *a2) +static void PaletteStruct_Copy(struct PaletteStruct *a1, u32 *unkFlags) { s32 srcIndex; s32 srcCount; u8 i = 0; - u16 srcOffset = a1->srcIndex * a1->base->size; + u16 srcOffset = a1->srcIndex * a1->template->size; - if (!a1->base->pst_field_8_0) + if (!a1->template->pst_field_8_0) { - while (i < a1->base->size) + while (i < a1->template->size) { - gPlttBufferUnfaded[a1->destOffset] = a1->base->src[srcOffset]; - gPlttBufferFaded[a1->destOffset] = a1->base->src[srcOffset]; + gPlttBufferUnfaded[a1->destOffset] = a1->template->src[srcOffset]; + gPlttBufferFaded[a1->destOffset] = a1->template->src[srcOffset]; i++; a1->destOffset++; srcOffset++; @@ -255,9 +257,9 @@ static void unused_sub_80A1CDC(struct PaletteStruct *a1, u32 *a2) } else { - while (i < a1->base->size) + while (i < a1->template->size) { - gPlttBufferFaded[a1->destOffset] = a1->base->src[srcOffset]; + gPlttBufferFaded[a1->destOffset] = a1->template->src[srcOffset]; i++; a1->destOffset++; srcOffset++; @@ -265,33 +267,33 @@ static void unused_sub_80A1CDC(struct PaletteStruct *a1, u32 *a2) } a1->destOffset = a1->baseDestOffset; - a1->ps_field_8 = a1->base->pst_field_A; + a1->countdown1 = a1->template->time1; a1->srcIndex++; srcIndex = a1->srcIndex; - srcCount = a1->base->srcCount; + srcCount = a1->template->srcCount; if (srcIndex >= srcCount) { - if (a1->ps_field_9) - a1->ps_field_9--; + if (a1->countdown2) + a1->countdown2--; a1->srcIndex = 0; } - *a2 |= 1 << (a1->baseDestOffset >> 4); + *unkFlags |= 1 << (a1->baseDestOffset >> 4); } -static void unused_sub_80A1E40(struct PaletteStruct *a1, u32 *a2) +static void PaletteStruct_Blend(struct PaletteStruct *a1, u32 *unkFlags) { if (gPaletteFade.active && ((1 << (a1->baseDestOffset >> 4)) & gPaletteFade_selectedPalettes)) { - if (!a1->base->pst_field_8_0) + if (!a1->template->pst_field_8_0) { if (gPaletteFade.delayCounter != gPaletteFade_delay) { BlendPalette( a1->baseDestOffset, - a1->base->size, + a1->template->size, gPaletteFade.y, gPaletteFade.blendColor); } @@ -300,64 +302,64 @@ static void unused_sub_80A1E40(struct PaletteStruct *a1, u32 *a2) { if (!gPaletteFade.delayCounter) { - if (a1->ps_field_8 != a1->base->pst_field_A) + if (a1->countdown1 != a1->template->time1) { - u32 srcOffset = a1->srcIndex * a1->base->size; + u32 srcOffset = a1->srcIndex * a1->template->size; u8 i; - for (i = 0; i < a1->base->size; i++) - gPlttBufferFaded[a1->baseDestOffset + i] = a1->base->src[srcOffset + i]; + for (i = 0; i < a1->template->size; i++) + gPlttBufferFaded[a1->baseDestOffset + i] = a1->template->src[srcOffset + i]; } } } } } -static void unused_sub_80A1F00(struct PaletteStruct *a1) +static void PaletteStruct_TryEnd(struct PaletteStruct *pal) { - if (!a1->ps_field_9) + if (pal->countdown2 == 0) { - s32 val = a1->base->pst_field_B_5; + s32 state = pal->template->state; - if (!val) + if (state == 0) { - a1->srcIndex = 0; - a1->ps_field_8 = a1->base->pst_field_A; - a1->ps_field_9 = a1->base->pst_field_C; - a1->destOffset = a1->baseDestOffset; + pal->srcIndex = 0; + pal->countdown1 = pal->template->time1; + pal->countdown2 = pal->template->time2; + pal->destOffset = pal->baseDestOffset; } else { - if (val < 0) + if (state < 0) return; - if (val > 2) + if (state > 2) return; - ResetPaletteStructByUid(a1->base->uid); + PaletteStruct_ResetById(pal->template->id); } } else { - a1->ps_field_9--; + pal->countdown2--; } } -void ResetPaletteStructByUid(u16 a1) +void PaletteStruct_ResetById(u16 id) { - u8 paletteNum = GetPaletteNumByUid(a1); - if (paletteNum != 16) - ResetPaletteStruct(paletteNum); + u8 paletteNum = PaletteStruct_GetPalNum(id); + if (paletteNum != NUM_PALETTE_STRUCTS) + PaletteStruct_Reset(paletteNum); } -void ResetPaletteStruct(u8 paletteNum) +static void PaletteStruct_Reset(u8 paletteNum) { - sPaletteStructs[paletteNum].base = &gDummyPaletteStructTemplate; - sPaletteStructs[paletteNum].ps_field_4_0 = 0; + sPaletteStructs[paletteNum].template = &gDummyPaletteStructTemplate; + sPaletteStructs[paletteNum].active = FALSE; sPaletteStructs[paletteNum].baseDestOffset = 0; sPaletteStructs[paletteNum].destOffset = 0; sPaletteStructs[paletteNum].srcIndex = 0; - sPaletteStructs[paletteNum].ps_field_4_1 = 0; - sPaletteStructs[paletteNum].ps_field_8 = 0; - sPaletteStructs[paletteNum].ps_field_9 = 0; + sPaletteStructs[paletteNum].flag = 0; + sPaletteStructs[paletteNum].countdown1 = 0; + sPaletteStructs[paletteNum].countdown2 = 0; } void ResetPaletteFadeControl(void) @@ -368,41 +370,41 @@ void ResetPaletteFadeControl(void) gPaletteFade.y = 0; gPaletteFade.targetY = 0; gPaletteFade.blendColor = 0; - gPaletteFade.active = 0; + gPaletteFade.active = FALSE; gPaletteFade.multipurpose2 = 0; // assign same value twice gPaletteFade.yDec = 0; - gPaletteFade.bufferTransferDisabled = 0; - gPaletteFade.shouldResetBlendRegisters = 0; - gPaletteFade.hardwareFadeFinishing = 0; - gPaletteFade.softwareFadeFinishing = 0; + gPaletteFade.bufferTransferDisabled = FALSE; + gPaletteFade.shouldResetBlendRegisters = FALSE; + gPaletteFade.hardwareFadeFinishing = FALSE; + gPaletteFade.softwareFadeFinishing = FALSE; gPaletteFade.softwareFadeFinishingCounter = 0; gPaletteFade.objPaletteToggle = 0; gPaletteFade.deltaY = 2; } -void unref_sub_80A2048(u16 uid) +static void PaletteStruct_SetUnusedFlag(u16 id) { - u8 paletteNum = GetPaletteNumByUid(uid); - if (paletteNum != 16) - sPaletteStructs[paletteNum].ps_field_4_1 = 1; + u8 paletteNum = PaletteStruct_GetPalNum(id); + if (paletteNum != NUM_PALETTE_STRUCTS) + sPaletteStructs[paletteNum].flag = TRUE; } -void unref_sub_80A2074(u16 uid) +static void PaletteStruct_ClearUnusedFlag(u16 id) { - u8 paletteNum = GetPaletteNumByUid(uid); - if (paletteNum != 16) - sPaletteStructs[paletteNum].ps_field_4_1 = 0; + u8 paletteNum = PaletteStruct_GetPalNum(id); + if (paletteNum != NUM_PALETTE_STRUCTS) + sPaletteStructs[paletteNum].flag = FALSE; } -static u8 GetPaletteNumByUid(u16 uid) +static u8 PaletteStruct_GetPalNum(u16 id) { u8 i; - for (i = 0; i < 16; i++) - if (sPaletteStructs[i].base->uid == uid) + for (i = 0; i < NUM_PALETTE_STRUCTS; i++) + if (sPaletteStructs[i].template->id == id) return i; - return 16; + return NUM_PALETTE_STRUCTS; } static u8 UpdateNormalPaletteFade(void) @@ -460,7 +462,7 @@ static u8 UpdateNormalPaletteFade(void) if (gPaletteFade.y == gPaletteFade.targetY) { gPaletteFade_selectedPalettes = 0; - gPaletteFade.softwareFadeFinishing = 1; + gPaletteFade.softwareFadeFinishing = TRUE; } else { @@ -557,7 +559,7 @@ static void BeginFastPaletteFadeInternal(u8 submode) { gPaletteFade.y = 31; gPaletteFade_submode = submode & 0x3F; - gPaletteFade.active = 1; + gPaletteFade.active = TRUE; gPaletteFade.mode = FAST_FADE; if (submode == FAST_FADE_IN_FROM_BLACK) @@ -719,7 +721,7 @@ static u8 UpdateFastPaletteFade(void) } gPaletteFade.mode = NORMAL_FADE; - gPaletteFade.softwareFadeFinishing = 1; + gPaletteFade.softwareFadeFinishing = TRUE; } // gPaletteFade.active cannot change since the last time it was checked. So this @@ -734,10 +736,10 @@ void BeginHardwarePaletteFade(u8 blendCnt, u8 delay, u8 y, u8 targetY, u8 should gPaletteFade_delay = delay; gPaletteFade.y = y; gPaletteFade.targetY = targetY; - gPaletteFade.active = 1; + gPaletteFade.active = TRUE; gPaletteFade.mode = HARDWARE_FADE; gPaletteFade.shouldResetBlendRegisters = shouldResetBlendRegisters & 1; - gPaletteFade.hardwareFadeFinishing = 0; + gPaletteFade.hardwareFadeFinishing = FALSE; if (y < targetY) gPaletteFade.yDec = 0; @@ -784,7 +786,7 @@ static u8 UpdateHardwarePaletteFade(void) gPaletteFade_blendCnt = 0; gPaletteFade.y = 0; } - gPaletteFade.shouldResetBlendRegisters = 0; + gPaletteFade.shouldResetBlendRegisters = FALSE; } // gPaletteFade.active cannot change since the last time it was checked. So this @@ -798,11 +800,11 @@ static void UpdateBlendRegisters(void) SetGpuReg(REG_OFFSET_BLDY, gPaletteFade.y); if (gPaletteFade.hardwareFadeFinishing) { - gPaletteFade.hardwareFadeFinishing = 0; + gPaletteFade.hardwareFadeFinishing = FALSE; gPaletteFade.mode = 0; gPaletteFade_blendCnt = 0; gPaletteFade.y = 0; - gPaletteFade.active = 0; + gPaletteFade.active = FALSE; } } @@ -812,8 +814,8 @@ static bool8 IsSoftwarePaletteFadeFinishing(void) { if (gPaletteFade.softwareFadeFinishingCounter == 4) { - gPaletteFade.active = 0; - gPaletteFade.softwareFadeFinishing = 0; + gPaletteFade.active = FALSE; + gPaletteFade.softwareFadeFinishing = FALSE; gPaletteFade.softwareFadeFinishingCounter = 0; } else @@ -950,7 +952,7 @@ void TintPalette_CustomTone(u16 *palette, u16 count, u16 rTone, u16 gTone, u16 b #define tId data[8] // Blend the selected palettes in a series of steps toward or away from the color. -// Only used by the Groudon/Kyogre fight scene to flash the screen for lightning +// Only used by the Groudon/Kyogre fight scene to flash the screen for lightning. // One call is used to fade the bg from white, while another fades the duo from black void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTarget, u16 color, u8 priority, u8 id) { @@ -987,8 +989,8 @@ static bool32 IsBlendPalettesGraduallyTaskActive(u8 id) for (i = 0; i < NUM_TASKS; i++) if ((gTasks[i].isActive == TRUE) - && (gTasks[i].func == Task_BlendPalettesGradually) - && (gTasks[i].tId == id)) + && (gTasks[i].func == Task_BlendPalettesGradually) + && (gTasks[i].tId == id)) return TRUE; return FALSE; From adf773f1ed272f31ae34e2613d20ec796b651bf8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 28 Oct 2021 22:54:41 -0400 Subject: [PATCH 159/417] Document remainder of save.c --- common_syms/save.txt | 6 +- include/load_save.h | 4 +- include/save.h | 129 ++++----- src/berry_blender.c | 4 +- src/berry_crush.c | 4 +- src/dodrio_berry_picking.c | 4 +- src/ereader_helpers.c | 4 +- src/hall_of_fame.c | 12 +- src/intro.c | 2 +- src/load_save.c | 4 +- src/pokemon_jump.c | 4 +- src/record_mixing.c | 10 +- src/recorded_battle.c | 16 +- src/reload_save.c | 2 +- src/save.c | 544 +++++++++++++++++++++---------------- src/save_failed_screen.c | 6 +- src/start_menu.c | 18 +- src/trade.c | 19 +- 18 files changed, 428 insertions(+), 364 deletions(-) diff --git a/common_syms/save.txt b/common_syms/save.txt index 190a658406..131031d506 100644 --- a/common_syms/save.txt +++ b/common_syms/save.txt @@ -3,11 +3,11 @@ gLastSaveCounter gLastKnownGoodSector gDamagedSaveSectors gSaveCounter -gFastSaveSection -gUnknown_03006208 +gReadWriteSector +gIncrementalSectorId gSaveUnusedVar gSaveFileStatus gGameContinueCallback -gRamSaveSectionLocations +gRamSaveSectorLocations gSaveUnusedVar2 gSaveAttemptStatus diff --git a/include/load_save.h b/include/load_save.h index 2f4a9ace6b..14a979b453 100644 --- a/include/load_save.h +++ b/include/load_save.h @@ -24,8 +24,8 @@ void SavePlayerParty(void); void LoadPlayerParty(void); void SaveObjectEvents(void); void LoadObjectEvents(void); -void SaveSerializedGame(void); -void LoadSerializedGame(void); +void CopyPartyAndObjectsToSave(void); +void CopyPartyAndObjectsFromSave(void); void LoadPlayerBag(void); void SavePlayerBag(void); void ApplyNewEncryptionKeyToHword(u16 *hWord, u32 newKey); diff --git a/include/save.h b/include/save.h index 406e2e492e..be7961136e 100644 --- a/include/save.h +++ b/include/save.h @@ -1,43 +1,43 @@ #ifndef GUARD_SAVE_H #define GUARD_SAVE_H -struct SaveSectionLocation -{ - void *data; - u16 size; -}; - -struct SaveSection -{ - u8 data[0xFF4]; - u16 id; - u16 checksum; - u32 security; - u32 counter; -}; // size is 0x1000 - -// headless save section? -struct UnkSaveSection -{ - u8 data[0xFF4]; - u32 security; -}; // size is 0xFF8 - -struct SaveSectionOffsets -{ - u16 toAdd; - u16 size; -}; - -// Each 4 KiB flash sector contains 3968 bytes of actual data followed by a 128 byte footer +// Each 4 KiB flash sector contains 3968 bytes of actual data followed by a 128 byte footer. +// Only 12 bytes of the footer are used. #define SECTOR_DATA_SIZE 3968 #define SECTOR_FOOTER_SIZE 128 #define SECTOR_SIZE (SECTOR_DATA_SIZE + SECTOR_FOOTER_SIZE) #define NUM_SAVE_SLOTS 2 -#define UNKNOWN_CHECK_VALUE 0x8012025 -#define SPECIAL_SECTION_SENTINEL 0xB39D +// If the sector's security field is not this value then the sector is either invalid or empty. +#define SECTOR_SECURITY_NUM 0x8012025 + +#define SPECIAL_SECTOR_SENTINEL 0xB39D + +#define SECTOR_ID_SAVEBLOCK2 0 +#define SECTOR_ID_SAVEBLOCK1_START 1 +#define SECTOR_ID_SAVEBLOCK1_END 4 +#define SECTOR_ID_PKMN_STORAGE_START 5 +#define SECTOR_ID_PKMN_STORAGE_END 13 +#define NUM_SECTORS_PER_SLOT 14 +// Save Slot 1: 0-13; Save Slot 2: 14-27 +#define SECTOR_ID_HOF_1 28 +#define SECTOR_ID_HOF_2 29 +#define SECTOR_ID_TRAINER_HILL 30 +#define SECTOR_ID_RECORDED_BATTLE 31 +#define SECTORS_COUNT 32 + +#define NUM_HOF_SECTORS 2 + +#define SAVE_STATUS_EMPTY 0 +#define SAVE_STATUS_OK 1 +#define SAVE_STATUS_CORRUPT 2 +#define SAVE_STATUS_NO_FLASH 4 +#define SAVE_STATUS_ERROR 0xFF + +// Special sector id value for certain save functions to +// indicate that no specific sector should be used. +#define FULL_SAVE_SLOT 0xFFFF // SetDamagedSectorBits states enum @@ -51,7 +51,7 @@ enum enum { SAVE_NORMAL, - SAVE_LINK, + SAVE_LINK, // Link / Battle Frontier //EREADER_SAVE, // deprecated in Emerald SAVE_LINK2, // unknown 2nd link save SAVE_HALL_OF_FAME, @@ -59,54 +59,55 @@ enum SAVE_HALL_OF_FAME_ERASE_BEFORE // unused }; -#define SECTOR_ID_SAVEBLOCK2 0 -#define SECTOR_ID_SAVEBLOCK1_START 1 -#define SECTOR_ID_SAVEBLOCK1_END 4 -#define SECTOR_ID_PKMN_STORAGE_START 5 -#define SECTOR_ID_PKMN_STORAGE_END 13 -#define NUM_SECTORS_PER_SLOT 14 -// Save Slot 1: 0-13; Save Slot 2: 14-27 -#define SECTOR_ID_HOF_1 28 -#define SECTOR_ID_HOF_2 29 -#define SECTOR_ID_TRAINER_HILL 30 -#define SECTOR_ID_RECORDED_BATTLE 31 -#define SECTORS_COUNT 32 +// A save sector location holds a pointer to the data for a particular sector +// and the size of that data. Size cannot be greater than SECTOR_DATA_SIZE. +struct SaveSectorLocation +{ + void *data; + u16 size; +}; -#define SAVE_STATUS_EMPTY 0 -#define SAVE_STATUS_OK 1 -#define SAVE_STATUS_CORRUPT 2 -#define SAVE_STATUS_NO_FLASH 4 -#define SAVE_STATUS_ERROR 0xFF +struct SaveSector +{ + u8 data[SECTOR_DATA_SIZE]; + u8 unused[SECTOR_FOOTER_SIZE - 12]; // Unused portion of the footer + u16 id; + u16 checksum; + u32 security; + u32 counter; +}; // size is SECTOR_SIZE (0x1000) + +#define SECTOR_SECURITY_OFFSET offsetof(struct SaveSector, security) +#define SECTOR_COUNTER_OFFSET offsetof(struct SaveSector, counter) extern u16 gLastWrittenSector; extern u32 gLastSaveCounter; extern u16 gLastKnownGoodSector; extern u32 gDamagedSaveSectors; extern u32 gSaveCounter; -extern struct SaveSection *gFastSaveSection; -extern u16 gUnknown_03006208; +extern struct SaveSector *gFastSaveSector; +extern u16 gIncrementalSectorId; extern u16 gSaveFileStatus; extern void (*gGameContinueCallback)(void); -extern struct SaveSectionLocation gRamSaveSectionLocations[]; -extern u16 gUnknown_03006294; +extern struct SaveSectorLocation gRamSaveSectorLocations[]; -extern struct SaveSection gSaveDataBuffer; +extern struct SaveSector gSaveDataBuffer; void ClearSaveData(void); void Save_ResetSaveCounters(void); u8 HandleSavingData(u8 saveType); u8 TrySavingData(u8 saveType); -bool8 sub_8153380(void); -bool8 sub_81533AC(void); -bool8 sub_81533E0(void); -bool8 sub_8153408(void); -bool8 FullSaveGame(void); -bool8 CheckSaveFile(void); -u8 Save_LoadGameData(u8 saveType); +bool8 LinkFullSave_Init(void); +bool8 LinkFullSave_WriteSector(void); +bool8 LinkFullSave_ReplaceLastSector(void); +bool8 LinkFullSave_SetLastSectorSecurity(void); +bool8 WriteSaveBlock2(void); +bool8 WriteSaveBlock1Sector(void); +u8 LoadGameSave(u8 saveType); u16 GetSaveBlocksPointersBaseOffset(void); -u32 TryReadSpecialSaveSection(u8 sector, u8* dst); -u32 TryWriteSpecialSaveSection(u8 sector, u8* src); -void Task_LinkSave(u8 taskId); +u32 TryReadSpecialSaveSector(u8 sector, u8* dst); +u32 TryWriteSpecialSaveSector(u8 sector, u8* src); +void Task_LinkFullSave(u8 taskId); // save_failed_screen.c void DoSaveFailedScreen(u8 saveType); diff --git a/src/berry_blender.c b/src/berry_blender.c index 65008dae07..3ef2c42398 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -2785,7 +2785,7 @@ static bool8 LinkPlayAgainHandleSaving(void) } break; case 2: - FullSaveGame(); + WriteSaveBlock2(); sBerryBlender->linkPlayAgainState++; sBerryBlender->framesToWait = 0; break; @@ -2799,7 +2799,7 @@ static bool8 LinkPlayAgainHandleSaving(void) case 4: if (IsLinkTaskFinished()) { - if (CheckSaveFile()) + if (WriteSaveBlock1Sector()) { sBerryBlender->linkPlayAgainState = 5; } diff --git a/src/berry_crush.c b/src/berry_crush.c index 8ac6bb3123..ca70e05e0e 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -3244,10 +3244,10 @@ static u32 Cmd_SaveGame(struct BerryCrushGame *game, u8 *args) DrawDialogueFrame(0, 0); AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 0, 2, 1, 3); CopyWindowToVram(0, 3); - CreateTask(Task_LinkSave, 0); + CreateTask(Task_LinkFullSave, 0); break; case 3: - if (FuncIsActiveTask(Task_LinkSave)) + if (FuncIsActiveTask(Task_LinkFullSave)) return 0; break; case 4: diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 838e8ed945..8e226312a4 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -5035,12 +5035,12 @@ static void Msg_SavingDontTurnOff(void) case 2: if (!IsDma3ManagerBusyWithBgCopy()) { - CreateTask(Task_LinkSave, 0); + CreateTask(Task_LinkFullSave, 0); sGfx->state++; } break; case 3: - if (!FuncIsActiveTask(Task_LinkSave)) + if (!FuncIsActiveTask(Task_LinkFullSave)) sGfx->state++; break; default: diff --git a/src/ereader_helpers.c b/src/ereader_helpers.c index 9a93707d85..0de87602ee 100755 --- a/src/ereader_helpers.c +++ b/src/ereader_helpers.c @@ -481,7 +481,7 @@ static bool32 TryWriteTrainerHill_Internal(struct EReaderTrainerHillSet * hillSe } hillTag->checksum = CalcByteArraySum((u8 *)hillTag->floors, NUM_TRAINER_HILL_FLOORS * sizeof(struct TrHillFloor)); - if (TryWriteSpecialSaveSection(SECTOR_ID_TRAINER_HILL, (u8 *)hillTag) != SAVE_STATUS_OK) + if (TryWriteSpecialSaveSector(SECTOR_ID_TRAINER_HILL, (u8 *)hillTag) != SAVE_STATUS_OK) return FALSE; return TRUE; @@ -497,7 +497,7 @@ bool32 TryWriteTrainerHill(struct EReaderTrainerHillSet * hillSet) static bool32 TryReadTrainerHill_Internal(struct EReaderTrainerHillSet * dest, u8 * buffer) { - if (TryReadSpecialSaveSection(SECTOR_ID_TRAINER_HILL, buffer) != SAVE_STATUS_OK) + if (TryReadSpecialSaveSector(SECTOR_ID_TRAINER_HILL, buffer) != SAVE_STATUS_OK) return FALSE; memcpy(dest, buffer, sizeof(struct EReaderTrainerHillSet)); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 8d69b03bc9..467cd1588d 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -487,12 +487,12 @@ static void Task_Hof_InitTeamSaveData(u8 taskId) if (!gHasHallOfFameRecords) { - memset(gDecompressionBuffer, 0, 0x2000); + memset(gDecompressionBuffer, 0, SECTOR_SIZE * NUM_HOF_SECTORS); } else { - if (Save_LoadGameData(SAVE_HALL_OF_FAME) != SAVE_STATUS_OK) - memset(gDecompressionBuffer, 0, 0x2000); + if (LoadGameSave(SAVE_HALL_OF_FAME) != SAVE_STATUS_OK) + memset(gDecompressionBuffer, 0, SECTOR_SIZE * NUM_HOF_SECTORS); } for (i = 0; i < HALL_OF_FAME_MAX_TEAMS; i++, lastSavedTeam++) @@ -853,7 +853,7 @@ void CB2_DoHallOfFamePC(void) gTasks[taskId].tMonSpriteId(i) = SPRITE_NONE; } - sHofMonPtr = AllocZeroed(0x2000); + sHofMonPtr = AllocZeroed(SECTOR_SIZE * NUM_HOF_SECTORS); SetMainCallback2(CB2_HallOfFame); } break; @@ -863,7 +863,7 @@ void CB2_DoHallOfFamePC(void) static void Task_HofPC_CopySaveData(u8 taskId) { sub_81980F0(0, 0x1E, 0, 0xC, 0x226); - if (Save_LoadGameData(SAVE_HALL_OF_FAME) != SAVE_STATUS_OK) + if (LoadGameSave(SAVE_HALL_OF_FAME) != SAVE_STATUS_OK) { gTasks[taskId].func = Task_HofPC_PrintDataIsCorrupted; } @@ -872,7 +872,7 @@ static void Task_HofPC_CopySaveData(u8 taskId) u16 i; struct HallofFameTeam* savedTeams; - CpuCopy16(gDecompressionBuffer, sHofMonPtr, 0x2000); + CpuCopy16(gDecompressionBuffer, sHofMonPtr, SECTOR_SIZE * NUM_HOF_SECTORS); savedTeams = sHofMonPtr; for (i = 0; i < HALL_OF_FAME_MAX_TEAMS; i++, savedTeams++) { diff --git a/src/intro.c b/src/intro.c index 5cf99c97e6..0f044c642f 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1145,7 +1145,7 @@ void CB2_InitCopyrightScreenAfterBootup(void) SetSaveBlocksPointers(GetSaveBlocksPointersBaseOffset()); ResetMenuAndMonGlobals(); Save_ResetSaveCounters(); - Save_LoadGameData(SAVE_NORMAL); + LoadGameSave(SAVE_NORMAL); if (gSaveFileStatus == SAVE_STATUS_EMPTY || gSaveFileStatus == SAVE_STATUS_CORRUPT) Sav2_ClearSetDefault(); SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound); diff --git a/src/load_save.c b/src/load_save.c index 1ba5a1600a..4e788859c4 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -198,13 +198,13 @@ void LoadObjectEvents(void) gObjectEvents[i] = gSaveBlock1Ptr->objectEvents[i]; } -void SaveSerializedGame(void) +void CopyPartyAndObjectsToSave(void) { SavePlayerParty(); SaveObjectEvents(); } -void LoadSerializedGame(void) +void CopyPartyAndObjectsFromSave(void) { LoadPlayerParty(); LoadObjectEvents(); diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index fb1505c6c2..ad3f62c568 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -1282,12 +1282,12 @@ static bool32 SavePokeJump(void) case 2: if (AreLinkQueuesEmpty()) { - CreateTask(Task_LinkSave, 6); + CreateTask(Task_LinkFullSave, 6); sPokemonJump->mainState++; } break; case 3: - if (!FuncIsActiveTask(Task_LinkSave)) + if (!FuncIsActiveTask(Task_LinkFullSave)) { ClearMessageWindow(); sPokemonJump->mainState++; diff --git a/src/record_mixing.c b/src/record_mixing.c index 2197d85421..6613b1311c 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -1002,11 +1002,11 @@ static void Task_DoRecordMixing(u8 taskId) case 2: // Mixing Ruby/Sapphire records. SetContinueGameWarpStatusToDynamicWarp(); - FullSaveGame(); + WriteSaveBlock2(); task->tState++; break; case 3: - if (CheckSaveFile()) + if (WriteSaveBlock1Sector()) { ClearContinueGameWarpStatus2(); task->tState = 4; @@ -1030,12 +1030,12 @@ static void Task_DoRecordMixing(u8 taskId) case 6: if (!Rfu_SetLinkRecovery(FALSE)) { - CreateTask(Task_LinkSave, 5); + CreateTask(Task_LinkFullSave, 5); task->tState++; } break; - case 7: // wait for Task_LinkSave to finish. - if (!FuncIsActiveTask(Task_LinkSave)) + case 7: // wait for Task_LinkFullSave to finish. + if (!FuncIsActiveTask(Task_LinkFullSave)) { if (gWirelessCommType) { diff --git a/src/recorded_battle.c b/src/recorded_battle.c index e6d5b165b8..fd2b3a06b3 100644 --- a/src/recorded_battle.c +++ b/src/recorded_battle.c @@ -306,14 +306,14 @@ static bool32 IsRecordedBattleSaveValid(struct RecordedBattleSave *save) return TRUE; } -static bool32 RecordedBattleToSave(struct RecordedBattleSave *battleSave, struct RecordedBattleSave *saveSection) +static bool32 RecordedBattleToSave(struct RecordedBattleSave *battleSave, struct RecordedBattleSave *saveSector) { - memset(saveSection, 0, SECTOR_SIZE); - memcpy(saveSection, battleSave, sizeof(*battleSave)); + memset(saveSector, 0, SECTOR_SIZE); + memcpy(saveSector, battleSave, sizeof(*battleSave)); - saveSection->checksum = CalcByteArraySum((void*)(saveSection), sizeof(*saveSection) - 4); + saveSector->checksum = CalcByteArraySum((void*)(saveSector), sizeof(*saveSector) - 4); - if (TryWriteSpecialSaveSection(SECTOR_ID_RECORDED_BATTLE, (void*)(saveSection)) != SAVE_STATUS_OK) + if (TryWriteSpecialSaveSector(SECTOR_ID_RECORDED_BATTLE, (void*)(saveSector)) != SAVE_STATUS_OK) return FALSE; else return TRUE; @@ -477,9 +477,9 @@ bool32 MoveRecordedBattleToSaveData(void) return ret; } -static bool32 TryCopyRecordedBattleSaveData(struct RecordedBattleSave *dst, struct SaveSection *saveBuffer) +static bool32 TryCopyRecordedBattleSaveData(struct RecordedBattleSave *dst, struct SaveSector *saveBuffer) { - if (TryReadSpecialSaveSection(SECTOR_ID_RECORDED_BATTLE, (void*)(saveBuffer)) != SAVE_STATUS_OK) + if (TryReadSpecialSaveSector(SECTOR_ID_RECORDED_BATTLE, (void*)(saveBuffer)) != SAVE_STATUS_OK) return FALSE; memcpy(dst, saveBuffer, sizeof(struct RecordedBattleSave)); @@ -492,7 +492,7 @@ static bool32 TryCopyRecordedBattleSaveData(struct RecordedBattleSave *dst, stru static bool32 CopyRecordedBattleFromSave(struct RecordedBattleSave *dst) { - struct SaveSection *savBuffer = AllocZeroed(sizeof(struct SaveSection)); + struct SaveSector *savBuffer = AllocZeroed(SECTOR_SIZE); bool32 ret = TryCopyRecordedBattleSaveData(dst, savBuffer); Free(savBuffer); diff --git a/src/reload_save.c b/src/reload_save.c index cdbb2f227d..5425d1c7c4 100644 --- a/src/reload_save.c +++ b/src/reload_save.c @@ -21,7 +21,7 @@ void ReloadSave(void) SetSaveBlocksPointers(GetSaveBlocksPointersBaseOffset()); ResetMenuAndMonGlobals(); Save_ResetSaveCounters(); - Save_LoadGameData(SAVE_NORMAL); + LoadGameSave(SAVE_NORMAL); if (gSaveFileStatus == SAVE_STATUS_EMPTY || gSaveFileStatus == SAVE_STATUS_CORRUPT) Sav2_ClearSetDefault(); SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound); diff --git a/src/save.c b/src/save.c index 3c8f4360dc..cd25977e1c 100644 --- a/src/save.c +++ b/src/save.c @@ -13,13 +13,13 @@ #include "link.h" #include "constants/game_stat.h" -static u16 CalculateChecksum(void *data, u16 size); -static bool8 DoReadFlashWholeSection(u8 sector, struct SaveSection *section); -static u8 GetSaveValidStatus(const struct SaveSectionLocation *location); -static u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location); -static u8 ClearSaveData_2(u16 a1, const struct SaveSectionLocation *location); -static u8 TryWriteSector(u8 sector, u8 *data); -static u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location); +static u16 CalculateChecksum(void *, u16); +static bool8 ReadFlashSector(u8, struct SaveSector *); +static u8 GetSaveValidStatus(const struct SaveSectorLocation *); +static u8 CopySaveSlotData(u16, struct SaveSectorLocation *); +static u8 TryWriteSector(u8, u8 *); +static u8 HandleWriteSector(u16, const struct SaveSectorLocation *); +static u8 HandleReplaceSector(u16, const struct SaveSectorLocation *); // Divide save blocks into individual chunks to be written to flash sectors @@ -38,11 +38,10 @@ static u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location); * so that the same data is not always being written to the same sector. This * might be done to reduce wear on the flash memory, but I'm not sure, since all * 14 sectors get written anyway. + * + * See SECTOR_ID_* constants in save.h */ -// (u8 *)structure was removed from the first statement of the macro in Emerald. -// This is because malloc is used to allocate addresses so storing the raw -// addresses should not be done in the offsets information. #define SAVEBLOCK_CHUNK(structure, chunkNum) \ { \ chunkNum * SECTOR_DATA_SIZE, \ @@ -50,16 +49,20 @@ static u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location); min(sizeof(structure) - chunkNum * SECTOR_DATA_SIZE, SECTOR_DATA_SIZE) : 0 \ } -static const struct SaveSectionOffsets sSaveSectionOffsets[] = +struct { - SAVEBLOCK_CHUNK(gSaveblock2, 0), + u16 offset; + u16 size; +} static const sSaveSlotLayout[NUM_SECTORS_PER_SLOT] = +{ + SAVEBLOCK_CHUNK(gSaveblock2, 0), // SECTOR_ID_SAVEBLOCK2 - SAVEBLOCK_CHUNK(gSaveblock1, 0), + SAVEBLOCK_CHUNK(gSaveblock1, 0), // SECTOR_ID_SAVEBLOCK1_START SAVEBLOCK_CHUNK(gSaveblock1, 1), SAVEBLOCK_CHUNK(gSaveblock1, 2), - SAVEBLOCK_CHUNK(gSaveblock1, 3), + SAVEBLOCK_CHUNK(gSaveblock1, 3), // SECTOR_ID_SAVEBLOCK1_END - SAVEBLOCK_CHUNK(gPokemonStorage, 0), + SAVEBLOCK_CHUNK(gPokemonStorage, 0), // SECTOR_ID_PKMN_STORAGE_START SAVEBLOCK_CHUNK(gPokemonStorage, 1), SAVEBLOCK_CHUNK(gPokemonStorage, 2), SAVEBLOCK_CHUNK(gPokemonStorage, 3), @@ -67,25 +70,24 @@ static const struct SaveSectionOffsets sSaveSectionOffsets[] = SAVEBLOCK_CHUNK(gPokemonStorage, 5), SAVEBLOCK_CHUNK(gPokemonStorage, 6), SAVEBLOCK_CHUNK(gPokemonStorage, 7), - SAVEBLOCK_CHUNK(gPokemonStorage, 8), + SAVEBLOCK_CHUNK(gPokemonStorage, 8), // SECTOR_ID_PKMN_STORAGE_END }; -// iwram common u16 gLastWrittenSector; u32 gLastSaveCounter; u16 gLastKnownGoodSector; u32 gDamagedSaveSectors; u32 gSaveCounter; -struct SaveSection *gFastSaveSection; -u16 gUnknown_03006208; +struct SaveSector *gReadWriteSector; // Pointer to a buffer for reading/writing a sector +u16 gIncrementalSectorId; u16 gSaveUnusedVar; u16 gSaveFileStatus; void (*gGameContinueCallback)(void); -struct SaveSectionLocation gRamSaveSectionLocations[NUM_SECTORS_PER_SLOT]; +struct SaveSectorLocation gRamSaveSectorLocations[NUM_SECTORS_PER_SLOT]; u16 gSaveUnusedVar2; u16 gSaveAttemptStatus; -EWRAM_DATA struct SaveSection gSaveDataBuffer = {0}; +EWRAM_DATA struct SaveSector gSaveDataBuffer = {0}; // Buffer used for reading/writing sectors EWRAM_DATA static u8 sUnusedVar = 0; void ClearSaveData(void) @@ -107,20 +109,20 @@ void Save_ResetSaveCounters(void) gDamagedSaveSectors = 0; } -static bool32 SetDamagedSectorBits(u8 op, u8 bit) +static bool32 SetDamagedSectorBits(u8 op, u8 sectorId) { bool32 retVal = FALSE; switch (op) { case ENABLE: - gDamagedSaveSectors |= (1 << bit); + gDamagedSaveSectors |= (1 << sectorId); break; case DISABLE: - gDamagedSaveSectors &= ~(1 << bit); + gDamagedSaveSectors &= ~(1 << sectorId); break; case CHECK: // unused - if (gDamagedSaveSectors & (1 << bit)) + if (gDamagedSaveSectors & (1 << sectorId)) retVal = TRUE; break; } @@ -128,31 +130,35 @@ static bool32 SetDamagedSectorBits(u8 op, u8 bit) return retVal; } -static u8 SaveWriteToFlash(u16 sectorId, const struct SaveSectionLocation *location) +static u8 WriteSaveSectorOrSlot(u16 sectorId, const struct SaveSectorLocation *locations) { u32 status; u16 i; - gFastSaveSection = &gSaveDataBuffer; + gReadWriteSector = &gSaveDataBuffer; - if (sectorId != 0xFFFF) // for link + if (sectorId != FULL_SAVE_SLOT) { - status = HandleWriteSector(sectorId, location); + // A sector was specified, just write that sector. + // This is never reached, FULL_SAVE_SLOT is always used instead. + status = HandleWriteSector(sectorId, locations); } else { + // No sector was specified, write full save slot. gLastKnownGoodSector = gLastWrittenSector; // backup the current written sector before attempting to write. gLastSaveCounter = gSaveCounter; gLastWrittenSector++; - gLastWrittenSector = gLastWrittenSector % NUM_SECTORS_PER_SLOT; // array count save sector locations + gLastWrittenSector = gLastWrittenSector % NUM_SECTORS_PER_SLOT; gSaveCounter++; status = SAVE_STATUS_OK; for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) - HandleWriteSector(i, location); + HandleWriteSector(i, locations); - if (gDamagedSaveSectors != 0) // skip the damaged sector. + if (gDamagedSaveSectors) { + // At least one sector save failed status = SAVE_STATUS_ERROR; gLastWrittenSector = gLastKnownGoodSector; gSaveCounter = gLastSaveCounter; @@ -162,98 +168,107 @@ static u8 SaveWriteToFlash(u16 sectorId, const struct SaveSectionLocation *locat return status; } -static u8 HandleWriteSector(u16 sectorId, const struct SaveSectionLocation *location) +static u8 HandleWriteSector(u16 sectorId, const struct SaveSectorLocation *locations) { u16 i; u16 sector; u8 *data; u16 size; + // Adjust sector id for current save slot sector = sectorId + gLastWrittenSector; sector %= NUM_SECTORS_PER_SLOT; sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); - data = location[sectorId].data; - size = location[sectorId].size; + // Get current save data + data = locations[sectorId].data; + size = locations[sectorId].size; - // clear save section. - for (i = 0; i < sizeof(struct SaveSection); i++) - ((char *)gFastSaveSection)[i] = 0; + // Clear temp save sector + for (i = 0; i < SECTOR_SIZE; i++) + ((u8 *)gReadWriteSector)[i] = 0; - gFastSaveSection->id = sectorId; - gFastSaveSection->security = UNKNOWN_CHECK_VALUE; - gFastSaveSection->counter = gSaveCounter; + // Set footer data + gReadWriteSector->id = sectorId; + gReadWriteSector->security = SECTOR_SECURITY_NUM; + gReadWriteSector->counter = gSaveCounter; + // Copy current data to temp buffer for writing for (i = 0; i < size; i++) - gFastSaveSection->data[i] = data[i]; + gReadWriteSector->data[i] = data[i]; - gFastSaveSection->checksum = CalculateChecksum(data, size); - return TryWriteSector(sector, gFastSaveSection->data); + gReadWriteSector->checksum = CalculateChecksum(data, size); + + return TryWriteSector(sector, gReadWriteSector->data); } -static u8 HandleWriteSectorNBytes(u8 sector, u8 *data, u16 size) +static u8 HandleWriteSectorNBytes(u8 sectorId, u8 *data, u16 size) { u16 i; - struct SaveSection *section = &gSaveDataBuffer; + struct SaveSector *sector = &gSaveDataBuffer; - for (i = 0; i < sizeof(struct SaveSection); i++) - ((char *)section)[i] = 0; + // Clear temp save sector + for (i = 0; i < SECTOR_SIZE; i++) + ((u8 *)sector)[i] = 0; - section->security = UNKNOWN_CHECK_VALUE; + sector->security = SECTOR_SECURITY_NUM; + // Copy data to temp buffer for writing for (i = 0; i < size; i++) - section->data[i] = data[i]; + sector->data[i] = data[i]; - section->id = CalculateChecksum(data, size); // though this appears to be incorrect, it might be some sector checksum instead of a whole save checksum and only appears to be relevent to HOF data, if used. - return TryWriteSector(sector, section->data); + sector->id = CalculateChecksum(data, size); // though this appears to be incorrect, it might be some sector checksum instead of a whole save checksum and only appears to be relevent to HOF data, if used. + return TryWriteSector(sectorId, sector->data); } static u8 TryWriteSector(u8 sector, u8 *data) { - if (ProgramFlashSectorAndVerify(sector, data) != 0) // is damaged? + if (ProgramFlashSectorAndVerify(sector, data)) // is damaged? { - SetDamagedSectorBits(ENABLE, sector); // set damaged sector bits. + // Failed + SetDamagedSectorBits(ENABLE, sector); return SAVE_STATUS_ERROR; } else { - SetDamagedSectorBits(DISABLE, sector); // unset damaged sector bits. it's safe now. + // Succeeded + SetDamagedSectorBits(DISABLE, sector); return SAVE_STATUS_OK; } } -static u32 RestoreSaveBackupVarsAndIncrement(const struct SaveSectionLocation *location) // location is unused +static u32 RestoreSaveBackupVarsAndIncrement(const struct SaveSectorLocation *locations) { - gFastSaveSection = &gSaveDataBuffer; + gReadWriteSector = &gSaveDataBuffer; gLastKnownGoodSector = gLastWrittenSector; gLastSaveCounter = gSaveCounter; gLastWrittenSector++; gLastWrittenSector %= NUM_SECTORS_PER_SLOT; gSaveCounter++; - gUnknown_03006208 = 0; + gIncrementalSectorId = 0; gDamagedSaveSectors = 0; return 0; } -static u32 RestoreSaveBackupVars(const struct SaveSectionLocation *location) // only ever called once, and gSaveBlock2 is passed to this function. location is unused +static u32 RestoreSaveBackupVars(const struct SaveSectorLocation *locations) { - gFastSaveSection = &gSaveDataBuffer; + gReadWriteSector = &gSaveDataBuffer; gLastKnownGoodSector = gLastWrittenSector; gLastSaveCounter = gSaveCounter; - gUnknown_03006208 = 0; + gIncrementalSectorId = 0; gDamagedSaveSectors = 0; return 0; } -static u8 sub_81529D4(u16 sectorId, const struct SaveSectionLocation *location) +static u8 HandleWriteIncrementalSector(u16 numSectors, const struct SaveSectorLocation *locations) { u8 status; - if (gUnknown_03006208 < sectorId - 1) + if (gIncrementalSectorId < numSectors - 1) { status = SAVE_STATUS_OK; - HandleWriteSector(gUnknown_03006208, location); - gUnknown_03006208++; + HandleWriteSector(gIncrementalSectorId, locations); + gIncrementalSectorId++; if (gDamagedSaveSectors) { status = SAVE_STATUS_ERROR; @@ -269,11 +284,11 @@ static u8 sub_81529D4(u16 sectorId, const struct SaveSectionLocation *location) return status; } -static u8 sub_8152A34(u16 sectorId, const struct SaveSectionLocation *location) +static u8 HandleReplaceSectorAndVerify(u16 sectorId, const struct SaveSectorLocation *locations) { u8 status = SAVE_STATUS_OK; - ClearSaveData_2(sectorId - 1, location); + HandleReplaceSector(sectorId - 1, locations); if (gDamagedSaveSectors) { @@ -284,7 +299,8 @@ static u8 sub_8152A34(u16 sectorId, const struct SaveSectionLocation *location) return status; } -static u8 ClearSaveData_2(u16 sectorId, const struct SaveSectionLocation *location) +// Similar to HandleWriteSector, but fully erases the sector first, and skips writing the first security byte +static u8 HandleReplaceSector(u16 sectorId, const struct SaveSectorLocation *locations) { u16 i; u16 sector; @@ -292,35 +308,39 @@ static u8 ClearSaveData_2(u16 sectorId, const struct SaveSectionLocation *locati u16 size; u8 status; + // Adjust sector id for current save slot sector = sectorId + gLastWrittenSector; sector %= NUM_SECTORS_PER_SLOT; sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); - data = location[sectorId].data; - size = location[sectorId].size; + // Get current save data + data = locations[sectorId].data; + size = locations[sectorId].size; - // clear temp save section. - for (i = 0; i < sizeof(struct SaveSection); i++) - ((char *)gFastSaveSection)[i] = 0; + // Clear temp save sector. + for (i = 0; i < SECTOR_SIZE; i++) + ((u8 *)gReadWriteSector)[i] = 0; - gFastSaveSection->id = sectorId; - gFastSaveSection->security = UNKNOWN_CHECK_VALUE; - gFastSaveSection->counter = gSaveCounter; + // Set footer data + gReadWriteSector->id = sectorId; + gReadWriteSector->security = SECTOR_SECURITY_NUM; + gReadWriteSector->counter = gSaveCounter; - // set temp section's data. + // Copy current data to temp buffer for writing for (i = 0; i < size; i++) - gFastSaveSection->data[i] = data[i]; + gReadWriteSector->data[i] = data[i]; - // calculate checksum. - gFastSaveSection->checksum = CalculateChecksum(data, size); + gReadWriteSector->checksum = CalculateChecksum(data, size); + // Erase old save data EraseFlashSector(sector); status = SAVE_STATUS_OK; - for (i = 0; i < sizeof(struct UnkSaveSection); i++) + // Write new save data up to security field + for (i = 0; i < SECTOR_SECURITY_OFFSET; i++) { - if (ProgramFlashByte(sector, i, ((u8 *)gFastSaveSection)[i])) + if (ProgramFlashByte(sector, i, ((u8 *)gReadWriteSector)[i])) { status = SAVE_STATUS_ERROR; break; @@ -329,16 +349,20 @@ static u8 ClearSaveData_2(u16 sectorId, const struct SaveSectionLocation *locati if (status == SAVE_STATUS_ERROR) { + // Writing save data failed SetDamagedSectorBits(ENABLE, sector); return SAVE_STATUS_ERROR; } else { + // Writing save data succeeded, write security and counter status = SAVE_STATUS_OK; - for (i = 0; i < 7; i++) + // Write security (skipping the first byte) and counter fields. + // The byte of security that is skipped is instead written by WriteSectorSecurityByte or WriteSectorSecurityByte_NoOffset + for (i = 0; i < SECTOR_SIZE - (SECTOR_SECURITY_OFFSET + 1); i++) { - if (ProgramFlashByte(sector, 0xFF9 + i, ((u8 *)gFastSaveSection)[0xFF9 + i])) + if (ProgramFlashByte(sector, SECTOR_SECURITY_OFFSET + 1 + i, ((u8 *)gReadWriteSector)[SECTOR_SECURITY_OFFSET + 1 + i])) { status = SAVE_STATUS_ERROR; break; @@ -347,28 +371,31 @@ static u8 ClearSaveData_2(u16 sectorId, const struct SaveSectionLocation *locati if (status == SAVE_STATUS_ERROR) { + // Writing security/counter failed SetDamagedSectorBits(ENABLE, sector); return SAVE_STATUS_ERROR; } else { + // Succeeded SetDamagedSectorBits(DISABLE, sector); return SAVE_STATUS_OK; } } } -static u8 sav12_xor_get(u16 sectorId, const struct SaveSectionLocation *location) +static u8 WriteSectorSecurityByte_NoOffset(u16 sectorId, const struct SaveSectorLocation *locations) { - u16 sector; - - sector = sectorId + gLastWrittenSector; // no sub 1? + // Adjust sector id for current save slot + // This first line lacking -1 is the only difference from WriteSectorSecurityByte + u16 sector = sectorId + gLastWrittenSector; sector %= NUM_SECTORS_PER_SLOT; sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); - if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25)) + // Write just the first byte of the security field, which was skipped by HandleReplaceSector + if (ProgramFlashByte(sector, SECTOR_SECURITY_OFFSET, SECTOR_SECURITY_NUM & 0xFF)) { - // sector is damaged, so enable the bit in gDamagedSaveSectors and restore the last written sector and save counter. + // Sector is damaged, so enable the bit in gDamagedSaveSectors and restore the last written sector and save counter. SetDamagedSectorBits(ENABLE, sector); gLastWrittenSector = gLastKnownGoodSector; gSaveCounter = gLastSaveCounter; @@ -376,22 +403,23 @@ static u8 sav12_xor_get(u16 sectorId, const struct SaveSectionLocation *location } else { + // Succeeded SetDamagedSectorBits(DISABLE, sector); return SAVE_STATUS_OK; } } -static u8 sub_8152CAC(u16 sectorId, const struct SaveSectionLocation *location) +static u8 CopySectorSecurityByte(u16 sectorId, const struct SaveSectorLocation *locations) { - u16 sector; - - sector = sectorId + gLastWrittenSector - 1; + // Adjust sector id for current save slot + u16 sector = sectorId + gLastWrittenSector - 1; sector %= NUM_SECTORS_PER_SLOT; sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); - if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), ((u8 *)gFastSaveSection)[sizeof(struct UnkSaveSection)])) + // Copy just the first byte of the security field from the read/write buffer + if (ProgramFlashByte(sector, SECTOR_SECURITY_OFFSET, ((u8 *)gReadWriteSector)[SECTOR_SECURITY_OFFSET])) { - // sector is damaged, so enable the bit in gDamagedSaveSectors and restore the last written sector and save counter. + // Sector is damaged, so enable the bit in gDamagedSaveSectors and restore the last written sector and save counter. SetDamagedSectorBits(ENABLE, sector); gLastWrittenSector = gLastKnownGoodSector; gSaveCounter = gLastSaveCounter; @@ -399,22 +427,23 @@ static u8 sub_8152CAC(u16 sectorId, const struct SaveSectionLocation *location) } else { + // Succeded SetDamagedSectorBits(DISABLE, sector); return SAVE_STATUS_OK; } } -static u8 sub_8152D44(u16 sectorId, const struct SaveSectionLocation *location) +static u8 WriteSectorSecurityByte(u16 sectorId, const struct SaveSectorLocation *locations) { - u16 sector; - - sector = sectorId + gLastWrittenSector - 1; // no sub 1? + // Adjust sector id for current save slot + u16 sector = sectorId + gLastWrittenSector - 1; sector %= NUM_SECTORS_PER_SLOT; sector += NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); - if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25)) + // Write just the first byte of the security field, which was skipped by HandleReplaceSector + if (ProgramFlashByte(sector, SECTOR_SECURITY_OFFSET, SECTOR_SECURITY_NUM & 0xFF)) { - // sector is damaged, so enable the bit in gDamagedSaveSectors and restore the last written sector and save counter. + // Sector is damaged, so enable the bit in gDamagedSaveSectors and restore the last written sector and save counter. SetDamagedSectorBits(ENABLE, sector); gLastWrittenSector = gLastKnownGoodSector; gSaveCounter = gLastSaveCounter; @@ -422,29 +451,32 @@ static u8 sub_8152D44(u16 sectorId, const struct SaveSectionLocation *location) } else { + // Succeeded SetDamagedSectorBits(DISABLE, sector); return SAVE_STATUS_OK; } } -static u8 sub_8152DD0(u16 a1, const struct SaveSectionLocation *location) +static u8 TryLoadSaveSlot(u16 sectorId, struct SaveSectorLocation *locations) { u8 status; - gFastSaveSection = &gSaveDataBuffer; - if (a1 != 0xFFFF) + gReadWriteSector = &gSaveDataBuffer; + if (sectorId != FULL_SAVE_SLOT) { + // This function may not be used with a specific sector id status = SAVE_STATUS_ERROR; } else { - status = GetSaveValidStatus(location); - sub_8152E10(0xFFFF, location); + status = GetSaveValidStatus(locations); + CopySaveSlotData(FULL_SAVE_SLOT, locations); } return status; } -static u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location) +// sectorId arg is ignored, this always reads the full save slot +static u8 CopySaveSlotData(u16 sectorId, struct SaveSectorLocation *locations) { u16 i; u16 checksum; @@ -453,96 +485,102 @@ static u8 sub_8152E10(u16 a1, const struct SaveSectionLocation *location) for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) { - DoReadFlashWholeSection(i + slotOffset, gFastSaveSection); - id = gFastSaveSection->id; + ReadFlashSector(i + slotOffset, gReadWriteSector); + + id = gReadWriteSector->id; if (id == 0) gLastWrittenSector = i; - checksum = CalculateChecksum(gFastSaveSection->data, location[id].size); - if (gFastSaveSection->security == UNKNOWN_CHECK_VALUE - && gFastSaveSection->checksum == checksum) + + checksum = CalculateChecksum(gReadWriteSector->data, locations[id].size); + + // Only copy data for sectors whose security and checksum fields are correct + if (gReadWriteSector->security == SECTOR_SECURITY_NUM && gReadWriteSector->checksum == checksum) { u16 j; - for (j = 0; j < location[id].size; j++) - ((u8 *)location[id].data)[j] = gFastSaveSection->data[j]; + for (j = 0; j < locations[id].size; j++) + ((u8 *)locations[id].data)[j] = gReadWriteSector->data[j]; } } return SAVE_STATUS_OK; } -static u8 GetSaveValidStatus(const struct SaveSectionLocation *location) +static u8 GetSaveValidStatus(const struct SaveSectorLocation *locations) { u16 i; u16 checksum; u32 saveSlot1Counter = 0; u32 saveSlot2Counter = 0; - u32 slotCheckField = 0; + u32 validSectorFlags = 0; bool8 securityPassed = FALSE; u8 saveSlot1Status; u8 saveSlot2Status; - // check save slot 1. + // Check save slot 1 for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) { - DoReadFlashWholeSection(i, gFastSaveSection); - if (gFastSaveSection->security == UNKNOWN_CHECK_VALUE) + ReadFlashSector(i, gReadWriteSector); + if (gReadWriteSector->security == SECTOR_SECURITY_NUM) { securityPassed = TRUE; - checksum = CalculateChecksum(gFastSaveSection->data, location[gFastSaveSection->id].size); - if (gFastSaveSection->checksum == checksum) + checksum = CalculateChecksum(gReadWriteSector->data, locations[gReadWriteSector->id].size); + if (gReadWriteSector->checksum == checksum) { - saveSlot1Counter = gFastSaveSection->counter; - slotCheckField |= 1 << gFastSaveSection->id; + saveSlot1Counter = gReadWriteSector->counter; + validSectorFlags |= 1 << gReadWriteSector->id; } } } if (securityPassed) { - if (slotCheckField == 0x3FFF) + if (validSectorFlags == (1 << NUM_SECTORS_PER_SLOT) - 1) saveSlot1Status = SAVE_STATUS_OK; else saveSlot1Status = SAVE_STATUS_ERROR; } else { + // No sectors in slot 1 have the security number, treat it as empty saveSlot1Status = SAVE_STATUS_EMPTY; } - slotCheckField = 0; + validSectorFlags = 0; securityPassed = FALSE; - // check save slot 2. + // Check save slot 2 for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) { - DoReadFlashWholeSection(i + NUM_SECTORS_PER_SLOT, gFastSaveSection); - if (gFastSaveSection->security == UNKNOWN_CHECK_VALUE) + ReadFlashSector(i + NUM_SECTORS_PER_SLOT, gReadWriteSector); + if (gReadWriteSector->security == SECTOR_SECURITY_NUM) { securityPassed = TRUE; - checksum = CalculateChecksum(gFastSaveSection->data, location[gFastSaveSection->id].size); - if (gFastSaveSection->checksum == checksum) + checksum = CalculateChecksum(gReadWriteSector->data, locations[gReadWriteSector->id].size); + if (gReadWriteSector->checksum == checksum) { - saveSlot2Counter = gFastSaveSection->counter; - slotCheckField |= 1 << gFastSaveSection->id; + saveSlot2Counter = gReadWriteSector->counter; + validSectorFlags |= 1 << gReadWriteSector->id; } } } if (securityPassed) { - if (slotCheckField == 0x3FFF) + if (validSectorFlags == (1 << NUM_SECTORS_PER_SLOT) - 1) saveSlot2Status = SAVE_STATUS_OK; else saveSlot2Status = SAVE_STATUS_ERROR; } else { + // No sectors in slot 2 have the security number, treat it as empty. saveSlot2Status = SAVE_STATUS_EMPTY; } if (saveSlot1Status == SAVE_STATUS_OK && saveSlot2Status == SAVE_STATUS_OK) { - if ((saveSlot1Counter == -1 && saveSlot2Counter == 0) || (saveSlot1Counter == 0 && saveSlot2Counter == -1)) + if ((saveSlot1Counter == -1 && saveSlot2Counter == 0) + || (saveSlot1Counter == 0 && saveSlot2Counter == -1)) { if ((unsigned)(saveSlot1Counter + 1) < (unsigned)(saveSlot2Counter + 1)) gSaveCounter = saveSlot2Counter; @@ -559,63 +597,71 @@ static u8 GetSaveValidStatus(const struct SaveSectionLocation *location) return SAVE_STATUS_OK; } + // One or both save slots are not OK + if (saveSlot1Status == SAVE_STATUS_OK) { gSaveCounter = saveSlot1Counter; if (saveSlot2Status == SAVE_STATUS_ERROR) - return SAVE_STATUS_ERROR; - return SAVE_STATUS_OK; + return SAVE_STATUS_ERROR; // Slot 2 errored + return SAVE_STATUS_OK; // Slot 1 is OK, slot 2 is empty } if (saveSlot2Status == SAVE_STATUS_OK) { gSaveCounter = saveSlot2Counter; if (saveSlot1Status == SAVE_STATUS_ERROR) - return SAVE_STATUS_ERROR; - return SAVE_STATUS_OK; + return SAVE_STATUS_ERROR; // Slot 1 errored + return SAVE_STATUS_OK; // Slot 2 is OK, slot 1 is empty } - if (saveSlot1Status == SAVE_STATUS_EMPTY && saveSlot2Status == SAVE_STATUS_EMPTY) + // Neither slot is OK, check if both are empty + if (saveSlot1Status == SAVE_STATUS_EMPTY + && saveSlot2Status == SAVE_STATUS_EMPTY) { gSaveCounter = 0; gLastWrittenSector = 0; return SAVE_STATUS_EMPTY; } + // Both slots errored gSaveCounter = 0; gLastWrittenSector = 0; return SAVE_STATUS_CORRUPT; } -static u8 sub_81530DC(u8 sectorId, u8 *data, u16 size) +static u8 TryLoadSaveSector(u8 sectorId, u8 *data, u16 size) { u16 i; - struct SaveSection *section = &gSaveDataBuffer; - DoReadFlashWholeSection(sectorId, section); - if (section->security == UNKNOWN_CHECK_VALUE) + struct SaveSector *sector = &gSaveDataBuffer; + ReadFlashSector(sectorId, sector); + if (sector->security == SECTOR_SECURITY_NUM) { - u16 checksum = CalculateChecksum(section->data, size); - if (section->id == checksum) + u16 checksum = CalculateChecksum(sector->data, size); + if (sector->id == checksum) { + // Security and checksum are correct, copy data for (i = 0; i < size; i++) - data[i] = section->data[i]; + data[i] = sector->data[i]; return SAVE_STATUS_OK; } else { + // Incorrect checksum return SAVE_STATUS_CORRUPT; } } else { + // Incorrect security value return SAVE_STATUS_EMPTY; } } // Return value always ignored -static bool8 DoReadFlashWholeSection(u8 sector, struct SaveSection *section) +static bool8 ReadFlashSector(u8 sectorId, struct SaveSector *sector) { - ReadFlash(sector, 0, section->data, sizeof(struct SaveSection)); + ReadFlash(sectorId, 0, sector->data, SECTOR_SIZE); return TRUE; } @@ -635,21 +681,20 @@ static u16 CalculateChecksum(void *data, u16 size) static void UpdateSaveAddresses(void) { - int i = 0; - - gRamSaveSectionLocations[i].data = (void*)(gSaveBlock2Ptr) + sSaveSectionOffsets[i].toAdd; - gRamSaveSectionLocations[i].size = sSaveSectionOffsets[i].size; + int i = SECTOR_ID_SAVEBLOCK2; + gRamSaveSectorLocations[i].data = (void*)(gSaveBlock2Ptr) + sSaveSlotLayout[i].offset; + gRamSaveSectorLocations[i].size = sSaveSlotLayout[i].size; for (i = SECTOR_ID_SAVEBLOCK1_START; i <= SECTOR_ID_SAVEBLOCK1_END; i++) { - gRamSaveSectionLocations[i].data = (void*)(gSaveBlock1Ptr) + sSaveSectionOffsets[i].toAdd; - gRamSaveSectionLocations[i].size = sSaveSectionOffsets[i].size; + gRamSaveSectorLocations[i].data = (void*)(gSaveBlock1Ptr) + sSaveSlotLayout[i].offset; + gRamSaveSectorLocations[i].size = sSaveSlotLayout[i].size; } for (; i <= SECTOR_ID_PKMN_STORAGE_END; i++) //setting i to SECTOR_ID_PKMN_STORAGE_START does not match { - gRamSaveSectionLocations[i].data = (void*)(gPokemonStoragePtr) + sSaveSectionOffsets[i].toAdd; - gRamSaveSectionLocations[i].size = sSaveSectionOffsets[i].size; + gRamSaveSectorLocations[i].data = (void*)(gPokemonStoragePtr) + sSaveSlotLayout[i].offset; + gRamSaveSectorLocations[i].size = sSaveSlotLayout[i].size; } } @@ -663,43 +708,48 @@ u8 HandleSavingData(u8 saveType) UpdateSaveAddresses(); switch (saveType) { - case SAVE_HALL_OF_FAME_ERASE_BEFORE: // deletes HOF before overwriting HOF completely. unused + case SAVE_HALL_OF_FAME_ERASE_BEFORE: + // Unused. Erases the special save sectors (HOF, Trainer Hill, Recorded Battle) + // before overwriting HOF. for (i = SECTOR_ID_HOF_1; i < SECTORS_COUNT; i++) EraseFlashSector(i); - case SAVE_HALL_OF_FAME: // hall of fame. + // fallthrough + case SAVE_HALL_OF_FAME: if (GetGameStat(GAME_STAT_ENTERED_HOF) < 999) IncrementGameStat(GAME_STAT_ENTERED_HOF); - SaveSerializedGame(); - SaveWriteToFlash(0xFFFF, gRamSaveSectionLocations); + + // Write the full save slot first + CopyPartyAndObjectsToSave(); + WriteSaveSectorOrSlot(FULL_SAVE_SLOT, gRamSaveSectorLocations); + + // Save the Hall of Fame tempAddr = gDecompressionBuffer; HandleWriteSectorNBytes(SECTOR_ID_HOF_1, tempAddr, SECTOR_DATA_SIZE); HandleWriteSectorNBytes(SECTOR_ID_HOF_2, tempAddr + SECTOR_DATA_SIZE, SECTOR_DATA_SIZE); break; - case SAVE_NORMAL: // normal save. also called by overwriting your own save. + case SAVE_NORMAL: default: - SaveSerializedGame(); - SaveWriteToFlash(0xFFFF, gRamSaveSectionLocations); + CopyPartyAndObjectsToSave(); + WriteSaveSectorOrSlot(FULL_SAVE_SLOT, gRamSaveSectorLocations); break; - case SAVE_LINK: // Link and Battle Frontier - case SAVE_LINK2: // Unused - SaveSerializedGame(); + case SAVE_LINK: + case SAVE_LINK2: + // Used by link / Battle Frontier + // Write only SaveBlocks 1 and 2 (skips the PC) + CopyPartyAndObjectsToSave(); for(i = SECTOR_ID_SAVEBLOCK2; i <= SECTOR_ID_SAVEBLOCK1_END; i++) - ClearSaveData_2(i, gRamSaveSectionLocations); + HandleReplaceSector(i, gRamSaveSectorLocations); for(i = SECTOR_ID_SAVEBLOCK2; i <= SECTOR_ID_SAVEBLOCK1_END; i++) - sav12_xor_get(i, gRamSaveSectionLocations); + WriteSectorSecurityByte_NoOffset(i, gRamSaveSectorLocations); break; - // Support for Ereader was removed in Emerald. - /* - case EREADER_SAVE: // used in mossdeep "game corner" before/after battling old man e-reader trainer - SaveSerializedGame(); - SaveWriteToFlash(0, gRamSaveSectionLocations); - break; - */ case SAVE_OVERWRITE_DIFFERENT_FILE: + // Erase Hall of Fame for (i = SECTOR_ID_HOF_1; i < SECTORS_COUNT; i++) - EraseFlashSector(i); // erase HOF. - SaveSerializedGame(); - SaveWriteToFlash(0xFFFF, gRamSaveSectionLocations); + EraseFlashSector(i); + + // Overwrite save slot + CopyPartyAndObjectsToSave(); + WriteSaveSectorOrSlot(FULL_SAVE_SLOT, gRamSaveSectorLocations); break; } gTrainerHillVBlankCounter = backupVar; @@ -728,19 +778,19 @@ u8 TrySavingData(u8 saveType) } } -bool8 sub_8153380(void) // trade.c +bool8 LinkFullSave_Init(void) { if (gFlashMemoryPresent != TRUE) return TRUE; UpdateSaveAddresses(); - SaveSerializedGame(); - RestoreSaveBackupVarsAndIncrement(gRamSaveSectionLocations); + CopyPartyAndObjectsToSave(); + RestoreSaveBackupVarsAndIncrement(gRamSaveSectorLocations); return FALSE; } -bool8 sub_81533AC(void) // trade.c +bool8 LinkFullSave_WriteSector(void) { - u8 status = sub_81529D4(NUM_SECTORS_PER_SLOT, gRamSaveSectionLocations); + u8 status = HandleWriteIncrementalSector(NUM_SECTORS_PER_SLOT, gRamSaveSectorLocations); if (gDamagedSaveSectors) DoSaveFailedScreen(SAVE_NORMAL); if (status == SAVE_STATUS_ERROR) @@ -749,54 +799,66 @@ bool8 sub_81533AC(void) // trade.c return FALSE; } -bool8 sub_81533E0(void) // trade.c +bool8 LinkFullSave_ReplaceLastSector(void) { - sub_8152A34(NUM_SECTORS_PER_SLOT, gRamSaveSectionLocations); + HandleReplaceSectorAndVerify(NUM_SECTORS_PER_SLOT, gRamSaveSectorLocations); if (gDamagedSaveSectors) DoSaveFailedScreen(SAVE_NORMAL); return FALSE; } -bool8 sub_8153408(void) // trade.c +bool8 LinkFullSave_SetLastSectorSecurity(void) { - sub_8152CAC(NUM_SECTORS_PER_SLOT, gRamSaveSectionLocations); + CopySectorSecurityByte(NUM_SECTORS_PER_SLOT, gRamSaveSectorLocations); if (gDamagedSaveSectors) DoSaveFailedScreen(SAVE_NORMAL); return FALSE; } -u8 FullSaveGame(void) +u8 WriteSaveBlock2(void) { if (gFlashMemoryPresent != TRUE) return TRUE; UpdateSaveAddresses(); - SaveSerializedGame(); - RestoreSaveBackupVars(gRamSaveSectionLocations); - sub_8152A34(gUnknown_03006208 + 1, gRamSaveSectionLocations); + CopyPartyAndObjectsToSave(); + RestoreSaveBackupVars(gRamSaveSectorLocations); + + // Because RestoreSaveBackupVars is called immediately prior, gIncrementalSectorId will always be 0 below, + // so this function only saves the first sector (SECTOR_ID_SAVEBLOCK2) + HandleReplaceSectorAndVerify(gIncrementalSectorId + 1, gRamSaveSectorLocations); return FALSE; } -bool8 CheckSaveFile(void) +// Used in conjunction with WriteSaveBlock2 to write both for certain link saves. +// This will be called repeatedly in a task, writing each sector of SaveBlock1 incrementally. +// It returns TRUE when finished. +bool8 WriteSaveBlock1Sector(void) { - u8 retVal = FALSE; - u16 sectorId = ++gUnknown_03006208; + u8 finished = FALSE; + u16 sectorId = ++gIncrementalSectorId; // Because WriteSaveBlock2 will have been called prior, this will be SECTOR_ID_SAVEBLOCK1_START if (sectorId <= SECTOR_ID_SAVEBLOCK1_END) { - sub_8152A34(gUnknown_03006208 + 1, gRamSaveSectionLocations); - sub_8152D44(sectorId, gRamSaveSectionLocations); + // Write a single sector of SaveBlock1 + HandleReplaceSectorAndVerify(gIncrementalSectorId + 1, gRamSaveSectorLocations); + WriteSectorSecurityByte(sectorId, gRamSaveSectorLocations); } else { - sub_8152D44(sectorId, gRamSaveSectionLocations); - retVal = TRUE; + // Beyond SaveBlock1, don't write the sector. + // Does write 1 byte of the next sector's security field, but as these + // are the same for all valid sectors it doesn't matter. + WriteSectorSecurityByte(sectorId, gRamSaveSectorLocations); + finished = TRUE; } + if (gDamagedSaveSectors) DoSaveFailedScreen(SAVE_LINK); - return retVal; + + return finished; } -u8 Save_LoadGameData(u8 saveType) +u8 LoadGameSave(u8 saveType) { u8 status; @@ -811,15 +873,15 @@ u8 Save_LoadGameData(u8 saveType) { case SAVE_NORMAL: default: - status = sub_8152DD0(0xFFFF, gRamSaveSectionLocations); - LoadSerializedGame(); + status = TryLoadSaveSlot(FULL_SAVE_SLOT, gRamSaveSectorLocations); + CopyPartyAndObjectsFromSave(); gSaveFileStatus = status; gGameContinueCallback = 0; break; case SAVE_HALL_OF_FAME: - status = sub_81530DC(SECTOR_ID_HOF_1, gDecompressionBuffer, SECTOR_DATA_SIZE); + status = TryLoadSaveSector(SECTOR_ID_HOF_1, gDecompressionBuffer, SECTOR_DATA_SIZE); if (status == SAVE_STATUS_OK) - status = sub_81530DC(SECTOR_ID_HOF_2, gDecompressionBuffer + SECTOR_DATA_SIZE, SECTOR_DATA_SIZE); + status = TryLoadSaveSector(SECTOR_ID_HOF_2, &gDecompressionBuffer[SECTOR_DATA_SIZE], SECTOR_DATA_SIZE); break; } @@ -829,29 +891,29 @@ u8 Save_LoadGameData(u8 saveType) u16 GetSaveBlocksPointersBaseOffset(void) { u16 i, slotOffset; - struct SaveSection* savSection; + struct SaveSector* sector; - savSection = gFastSaveSection = &gSaveDataBuffer; + sector = gReadWriteSector = &gSaveDataBuffer; if (gFlashMemoryPresent != TRUE) return 0; UpdateSaveAddresses(); - GetSaveValidStatus(gRamSaveSectionLocations); + GetSaveValidStatus(gRamSaveSectorLocations); slotOffset = NUM_SECTORS_PER_SLOT * (gSaveCounter % NUM_SAVE_SLOTS); for (i = 0; i < NUM_SECTORS_PER_SLOT; i++) { - DoReadFlashWholeSection(i + slotOffset, gFastSaveSection); + ReadFlashSector(i + slotOffset, gReadWriteSector); // Base offset for SaveBlock2 is calculated using the trainer id - if (gFastSaveSection->id == SECTOR_ID_SAVEBLOCK2) - return savSection->data[offsetof(struct SaveBlock2, playerTrainerId[0])] + - savSection->data[offsetof(struct SaveBlock2, playerTrainerId[1])] + - savSection->data[offsetof(struct SaveBlock2, playerTrainerId[2])] + - savSection->data[offsetof(struct SaveBlock2, playerTrainerId[3])]; + if (gReadWriteSector->id == SECTOR_ID_SAVEBLOCK2) + return sector->data[offsetof(struct SaveBlock2, playerTrainerId[0])] + + sector->data[offsetof(struct SaveBlock2, playerTrainerId[1])] + + sector->data[offsetof(struct SaveBlock2, playerTrainerId[2])] + + sector->data[offsetof(struct SaveBlock2, playerTrainerId[3])]; } return 0; } -u32 TryReadSpecialSaveSection(u8 sector, u8* dst) +u32 TryReadSpecialSaveSector(u8 sector, u8* dst) { s32 i; s32 size; @@ -859,19 +921,21 @@ u32 TryReadSpecialSaveSection(u8 sector, u8* dst) if (sector != SECTOR_ID_TRAINER_HILL && sector != SECTOR_ID_RECORDED_BATTLE) return SAVE_STATUS_ERROR; - ReadFlash(sector, 0, (u8 *)&gSaveDataBuffer, sizeof(struct SaveSection)); - if (*(u32*)(&gSaveDataBuffer.data[0]) != SPECIAL_SECTION_SENTINEL) + + ReadFlash(sector, 0, (u8 *)&gSaveDataBuffer, SECTOR_SIZE); + if (*(u32*)(&gSaveDataBuffer.data[0]) != SPECIAL_SECTOR_SENTINEL) return SAVE_STATUS_ERROR; - // copies whole save section except u32 counter + + // Copies whole save sector except u32 counter i = 0; - size = 0xFFB; - savData = &gSaveDataBuffer.data[4]; + size = SECTOR_COUNTER_OFFSET - 1; + savData = &gSaveDataBuffer.data[4]; // data[4] to skip past SPECIAL_SECTOR_SENTINEL for (; i <= size; i++) dst[i] = savData[i]; return SAVE_STATUS_OK; } -u32 TryWriteSpecialSaveSection(u8 sector, u8* src) +u32 TryWriteSpecialSaveSector(u8 sector, u8* src) { s32 i; s32 size; @@ -882,12 +946,12 @@ u32 TryWriteSpecialSaveSection(u8 sector, u8* src) return SAVE_STATUS_ERROR; savDataBuffer = &gSaveDataBuffer; - *(u32*)(savDataBuffer) = SPECIAL_SECTION_SENTINEL; + *(u32*)(savDataBuffer) = SPECIAL_SECTOR_SENTINEL; - // copies whole save section except u32 counter + // Copies whole save sector except u32 counter i = 0; - size = 0xFFB; - savData = &gSaveDataBuffer.data[4]; + size = SECTOR_COUNTER_OFFSET - 1; + savData = &gSaveDataBuffer.data[4]; // data[4] to skip past SPECIAL_SECTOR_SENTINEL for (; i <= size; i++) savData[i] = src[i]; if (ProgramFlashSectorAndVerify(sector, savDataBuffer) != 0) @@ -895,11 +959,13 @@ u32 TryWriteSpecialSaveSection(u8 sector, u8* src) return SAVE_STATUS_OK; } -#define tState data[0] -#define tTimer data[1] -#define tPartialSave data[2] +#define tState data[0] +#define tTimer data[1] +#define tInBattleTower data[2] -void Task_LinkSave(u8 taskId) +// Note that this is very different from TrySavingData(SAVE_LINK). +// Most notably it does save the PC data. +void Task_LinkFullSave(u8 taskId) { s16* data = gTasks[taskId].data; @@ -916,15 +982,15 @@ void Task_LinkSave(u8 taskId) case 2: if (IsLinkTaskFinished()) { - if (!tPartialSave) + if (!tInBattleTower) SaveMapView(); tState = 3; } break; case 3: - if (!tPartialSave) + if (!tInBattleTower) SetContinueGameWarpStatusToDynamicWarp(); - sub_8153380(); + LinkFullSave_Init(); tState = 4; break; case 4: @@ -935,17 +1001,17 @@ void Task_LinkSave(u8 taskId) } break; case 5: - if (sub_81533AC()) + if (LinkFullSave_WriteSector()) tState = 6; else - tState = 4; + tState = 4; // Not finished, delay again break; case 6: - sub_81533E0(); + LinkFullSave_ReplaceLastSector(); tState = 7; break; case 7: - if (!tPartialSave) + if (!tInBattleTower) ClearContinueGameWarpStatus2(); SetLinkStandbyCallback(); tState = 8; @@ -953,7 +1019,7 @@ void Task_LinkSave(u8 taskId) case 8: if (IsLinkTaskFinished()) { - sub_8153408(); + LinkFullSave_SetLastSectorSecurity(); tState = 9; } break; @@ -974,7 +1040,3 @@ void Task_LinkSave(u8 taskId) break; } } - -#undef tState -#undef tTimer -#undef tPartialSave diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 4f03732706..ff8c92b335 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -363,9 +363,10 @@ static bool8 VerifySectorWipe(u16 sector) ReadFlash(sector, 0, (u8 *)ptr, SECTOR_SIZE); - for (i = 0; i < 0x400; i++, ptr++) + // 1/4 because ptr is u32 + for (i = 0; i < SECTOR_SIZE / 4; i++, ptr++) if (*ptr) - return TRUE; + return TRUE; // Sector has nonzero data, failed return FALSE; } @@ -375,6 +376,7 @@ static bool8 WipeSector(u16 sector) u16 i, j; bool8 failed = TRUE; + // Attempt to wipe sector with an arbitrary attempt limit of 130 for (i = 0; failed && i < 130; i++) { for (j = 0; j < SECTOR_SIZE; j++) diff --git a/src/start_menu.c b/src/start_menu.c index dcff75ff60..a46d11e981 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -1269,11 +1269,11 @@ static void Task_SaveAfterLinkBattle(u8 taskId) break; case 1: SetContinueGameWarpStatusToDynamicWarp(); - FullSaveGame(); + WriteSaveBlock2(); *state = 2; break; case 2: - if (CheckSaveFile()) + if (WriteSaveBlock1Sector()) { ClearContinueGameWarpStatus2(); *state = 3; @@ -1290,11 +1290,11 @@ static void Task_SaveAfterLinkBattle(u8 taskId) DestroyTask(taskId); break; case 5: - CreateTask(Task_LinkSave, 5); + CreateTask(Task_LinkFullSave, 5); *state = 6; break; case 6: - if (!FuncIsActiveTask(Task_LinkSave)) + if (!FuncIsActiveTask(Task_LinkFullSave)) { *state = 3; } @@ -1374,23 +1374,23 @@ static void RemoveSaveInfoWindow(void) static void Task_WaitForBattleTowerLinkSave(u8 taskId) { - if (!FuncIsActiveTask(Task_LinkSave)) + if (!FuncIsActiveTask(Task_LinkFullSave)) { DestroyTask(taskId); EnableBothScriptContexts(); } } -#define tPartialSave data[2] +#define tInBattleTower data[2] void SaveForBattleTowerLink(void) { - u8 taskId = CreateTask(Task_LinkSave, 5); - gTasks[taskId].tPartialSave = TRUE; + u8 taskId = CreateTask(Task_LinkFullSave, 5); + gTasks[taskId].tInBattleTower = TRUE; gTasks[CreateTask(Task_WaitForBattleTowerLinkSave, 6)].data[1] = taskId; } -#undef tPartialSave +#undef tInBattleTower static void HideStartMenuWindow(void) { diff --git a/src/trade.c b/src/trade.c index 475b82d5ee..ba4faed283 100644 --- a/src/trade.c +++ b/src/trade.c @@ -4654,30 +4654,29 @@ static void CB2_SaveAndEndTrade(void) MysteryGift_TryIncrementStat(CARD_STAT_NUM_TRADES, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId); SetContinueGameWarpStatusToDynamicWarp(); - sub_8153380(); + LinkFullSave_Init(); gMain.state++; sTradeData->timer = 0; break; case 51: if (++sTradeData->timer == 5) - { gMain.state++; - } break; case 52: - if (sub_81533AC()) + if (LinkFullSave_WriteSector()) { ClearContinueGameWarpStatus2(); gMain.state = 4; } else { + // Save isn't finished, delay again sTradeData->timer = 0; gMain.state = 51; } break; case 4: - sub_81533E0(); + LinkFullSave_ReplaceLastSector(); gMain.state = 40; sTradeData->timer = 0; break; @@ -4709,7 +4708,7 @@ static void CB2_SaveAndEndTrade(void) case 42: if (_IsLinkTaskFinished()) { - sub_8153408(); + LinkFullSave_SetLastSectorSecurity(); gMain.state = 5; } break; @@ -4965,7 +4964,7 @@ static void CB2_SaveAndEndWirelessTrade(void) StringExpandPlaceholders(gStringVar4, gText_SavingDontTurnOffPower); DrawTextOnTradeWindow(0, gStringVar4, 0); IncrementGameStat(GAME_STAT_POKEMON_TRADES); - sub_8153380(); + LinkFullSave_Init(); sTradeData->timer = 0; } break; @@ -4974,7 +4973,7 @@ static void CB2_SaveAndEndWirelessTrade(void) gMain.state = 4; break; case 4: - if (sub_81533AC()) + if (LinkFullSave_WriteSector()) { gMain.state = 5; } @@ -4985,7 +4984,7 @@ static void CB2_SaveAndEndWirelessTrade(void) } break; case 5: - sub_81533E0(); + LinkFullSave_ReplaceLastSector(); gMain.state = 6; sTradeData->timer = 0; break; @@ -5013,7 +5012,7 @@ static void CB2_SaveAndEndWirelessTrade(void) case 8: if (_IsLinkTaskFinished()) { - sub_8153408(); + LinkFullSave_SetLastSectorSecurity(); gMain.state = 9; } break; From 43e942c3af39bf230e37dde9b406e99b12800f63 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Nov 2021 12:50:35 -0500 Subject: [PATCH 160/417] Clean up pokenav ribbons --- include/pokenav.h | 8 +- ld_script.txt | 8 +- src/pokenav.c | 8 +- ...nav_ribbons_1.c => pokenav_ribbons_list.c} | 260 +++++----- ..._ribbons_2.c => pokenav_ribbons_summary.c} | 452 +++++++++--------- sym_bss.txt | 2 +- 6 files changed, 369 insertions(+), 369 deletions(-) rename src/{pokenav_ribbons_1.c => pokenav_ribbons_list.c} (66%) rename src/{pokenav_ribbons_2.c => pokenav_ribbons_summary.c} (67%) diff --git a/include/pokenav.h b/include/pokenav.h index 3fc01ede3d..b1c73056d4 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -459,18 +459,18 @@ void CreateSearchResultsLoopedTask(s32); u32 IsSearchResultLoopedTaskActive(void); void FreeSearchResultSubstruct2(void); -// pokenav_ribbons_1.c +// pokenav_ribbons_list.c u32 PokenavCallback_Init_MonRibbonList(void); u32 PokenavCallback_Init_RibbonsMonListFromSummary(void); u32 GetRibbonsMonListCallback(void); -void FreeRibbonsMonList1(void); +void FreeRibbonsMonList(void); bool32 OpenRibbonsMonList(void); bool32 OpenRibbonsMonListFromRibbonsSummary(void); void CreateRibbonsMonListLoopedTask(s32); u32 IsRibbonsMonListLoopedTaskActive(void); -void FreeRibbonsMonList2(void); +void FreeRibbonsMonMenu(void); -// pokenav_ribbons_2.c +// pokenav_ribbons_summary.c u32 PokenavCallback_Init_RibbonsSummaryMenu(void); u32 GetRibbonsSummaryMenuCallback(void); void FreeRibbonsSummaryScreen1(void); diff --git a/ld_script.txt b/ld_script.txt index e310bf717c..ca0480e0fd 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -319,8 +319,8 @@ SECTIONS { src/pokenav_conditions_1.o(.text); src/pokenav_conditions_2.o(.text); src/pokenav_conditions_3.o(.text); - src/pokenav_ribbons_1.o(.text); - src/pokenav_ribbons_2.o(.text); + src/pokenav_ribbons_list.o(.text); + src/pokenav_ribbons_summary.o(.text); src/pokenav_match_call_data.o(.text); src/menu_specialized.o(.text); src/ereader_helpers.o(.text); @@ -673,8 +673,8 @@ SECTIONS { src/pokenav_region_map.o(.rodata); src/pokenav_conditions_2.o(.rodata); src/pokenav_conditions_3.o(.rodata); - src/pokenav_ribbons_1.o(.rodata); - src/pokenav_ribbons_2.o(.rodata); + src/pokenav_ribbons_list.o(.rodata); + src/pokenav_ribbons_summary.o(.rodata); src/pokenav_match_call_data.o(.rodata); src/menu_specialized.o(.rodata); src/ereader_helpers.o(.rodata); diff --git a/src/pokenav.c b/src/pokenav.c index d30c523f92..4338023dbd 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -179,8 +179,8 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .open = OpenRibbonsMonList, .createLoopTask = CreateRibbonsMonListLoopedTask, .isLoopTaskActive = IsRibbonsMonListLoopedTaskActive, - .free1 = FreeRibbonsMonList1, - .free2 = FreeRibbonsMonList2, + .free1 = FreeRibbonsMonList, + .free2 = FreeRibbonsMonMenu, }, [POKENAV_RIBBONS_SUMMARY_SCREEN - POKENAV_MENU_IDS_START] = { @@ -199,8 +199,8 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .open = OpenRibbonsMonListFromRibbonsSummary, .createLoopTask = CreateRibbonsMonListLoopedTask, .isLoopTaskActive = IsRibbonsMonListLoopedTaskActive, - .free1 = FreeRibbonsMonList1, - .free2 = FreeRibbonsMonList2, + .free1 = FreeRibbonsMonList, + .free2 = FreeRibbonsMonMenu, }, }; diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_list.c similarity index 66% rename from src/pokenav_ribbons_1.c rename to src/pokenav_ribbons_list.c index 862128967c..b5d412e127 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_list.c @@ -20,9 +20,9 @@ enum }; -struct PokenavSub9 +struct Pokenav_RibbonsMonList { - u32 (*callback)(struct PokenavSub9*); + u32 (*callback)(struct Pokenav_RibbonsMonList*); u32 loopedTaskId; u16 winid; s32 boxId; @@ -32,35 +32,35 @@ struct PokenavSub9 struct PokenavSub18 *monList; }; -struct PokenavSub10 +struct Pokenav_RibbonsMonMenu { bool32 (*callback)(void); - u32 ltid; + u32 loopedTaskId; u16 winid; bool32 fromSummary; u8 buff[BG_SCREEN_SIZE]; }; -static u32 HandleRibbonsMonListInput_WaitListInit(struct PokenavSub9 *structPtr); -static u32 HandleRibbonsMonListInput(struct PokenavSub9 *structPtr); -static u32 RibbonsMonMenu_ReturnToMainMenu(struct PokenavSub9 *structPtr); -static u32 RibbonsMonMenu_ToSummaryScreen(struct PokenavSub9 *structPtr); -static u32 BuildPartyMonRibbonList(s32 state); -static u32 InitBoxMonRibbonList(s32 state); -static u32 BuildBoxMonRibbonList(s32 state); -static u32 GetMonRibbonListLoopTaskFunc(s32 state); -static void sub_81CFCEC(struct PokenavSub9 *structPtr, struct PokenavMonList *item); -static u32 LoopedTask_OpenRibbonsMonList(s32 state); +static u32 HandleRibbonsMonListInput_WaitListInit(struct Pokenav_RibbonsMonList *); +static u32 HandleRibbonsMonListInput(struct Pokenav_RibbonsMonList *); +static u32 RibbonsMonMenu_ReturnToMainMenu(struct Pokenav_RibbonsMonList *); +static u32 RibbonsMonMenu_ToSummaryScreen(struct Pokenav_RibbonsMonList *); +static u32 BuildPartyMonRibbonList(s32); +static u32 InitBoxMonRibbonList(s32); +static u32 BuildBoxMonRibbonList(s32); +static u32 GetMonRibbonListLoopTaskFunc(s32); +static void InsertMonListItem(struct Pokenav_RibbonsMonList *, struct PokenavMonList *); +static u32 LoopedTask_OpenRibbonsMonList(s32); static bool32 GetRibbonsMonCurrentLoopedTaskActive(void); -static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state); -static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state); -static u32 LoopedTask_RibbonsListMovePageUp(s32 state); -static u32 LoopedTask_RibbonsListMovePageDown(s32 state); -static u32 LoopedTask_RibbonsListReturnToMainMenu(s32 state); -static u32 LoopedTask_RibbonsListOpenSummary(s32 state); -static void sub_81D02B0(s32 windowId, s32 val1, s32 val2); -static void AddRibbonsMonListWindow(struct PokenavSub10 *ptr); -static void sub_81D0288(struct PokenavSub10 *ptr); +static u32 LoopedTask_RibbonsListMoveCursorUp(s32); +static u32 LoopedTask_RibbonsListMoveCursorDown(s32); +static u32 LoopedTask_RibbonsListMovePageUp(s32); +static u32 LoopedTask_RibbonsListMovePageDown(s32); +static u32 LoopedTask_RibbonsListReturnToMainMenu(s32); +static u32 LoopedTask_RibbonsListOpenSummary(s32); +static void DrawListIndexNumber(s32, s32, s32); +static void AddRibbonsMonListWindow(struct Pokenav_RibbonsMonMenu *); +static void UpdateIndexNumberDisplay(struct Pokenav_RibbonsMonMenu *); static void InitMonRibbonPokenavListMenuTemplate(void); static void BufferRibbonMonInfoText(struct PokenavMonList *, u8 *); @@ -125,54 +125,54 @@ static const u8 sText_NoGenderSymbol[] = _("{UNK_SPACER}"); bool32 PokenavCallback_Init_MonRibbonList(void) { - struct PokenavSub9 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST, sizeof(struct PokenavSub9)); - if (structPtr == NULL) + struct Pokenav_RibbonsMonList *list = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST, sizeof(struct Pokenav_RibbonsMonList)); + if (list == NULL) return FALSE; - structPtr->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18)); - if (structPtr->monList == NULL) + list->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18)); + if (list->monList == NULL) return FALSE; - structPtr->callback = HandleRibbonsMonListInput_WaitListInit; - structPtr->loopedTaskId = CreateLoopedTask(GetMonRibbonListLoopTaskFunc, 1); - structPtr->changeBgs = 0; + list->callback = HandleRibbonsMonListInput_WaitListInit; + list->loopedTaskId = CreateLoopedTask(GetMonRibbonListLoopTaskFunc, 1); + list->changeBgs = 0; return TRUE; } bool32 PokenavCallback_Init_RibbonsMonListFromSummary(void) { - struct PokenavSub9 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST, sizeof(struct PokenavSub9)); - if (structPtr == NULL) + struct Pokenav_RibbonsMonList *list = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST, sizeof(struct Pokenav_RibbonsMonList)); + if (list == NULL) return FALSE; - structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - structPtr->callback = HandleRibbonsMonListInput; - structPtr->changeBgs = 1; + list->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + list->callback = HandleRibbonsMonListInput; + list->changeBgs = 1; return TRUE; } u32 GetRibbonsMonListCallback(void) { - struct PokenavSub9 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - return structPtr->callback(structPtr); + struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + return list->callback(list); } -void FreeRibbonsMonList1(void) +void FreeRibbonsMonList(void) { - struct PokenavSub9 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - if (!structPtr->saveMonList) + struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + if (!list->saveMonList) FreePokenavSubstruct(POKENAV_SUBSTRUCT_MON_LIST); FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); } -static u32 HandleRibbonsMonListInput_WaitListInit(struct PokenavSub9 *structPtr) +static u32 HandleRibbonsMonListInput_WaitListInit(struct Pokenav_RibbonsMonList *list) { - if (!IsLoopedTaskActive(structPtr->loopedTaskId)) - structPtr->callback = HandleRibbonsMonListInput; + if (!IsLoopedTaskActive(list->loopedTaskId)) + list->callback = HandleRibbonsMonListInput; return 0; } -static u32 HandleRibbonsMonListInput(struct PokenavSub9 *structPtr) +static u32 HandleRibbonsMonListInput(struct Pokenav_RibbonsMonList *list) { if (JOY_REPEAT(DPAD_UP)) return RIBBONS_MON_LIST_FUNC_MOVE_UP; @@ -184,60 +184,60 @@ static u32 HandleRibbonsMonListInput(struct PokenavSub9 *structPtr) return RIBBONS_MON_LIST_FUNC_PAGE_DOWN; if (JOY_NEW(B_BUTTON)) { - structPtr->saveMonList = 0; - structPtr->callback = RibbonsMonMenu_ReturnToMainMenu; + list->saveMonList = 0; + list->callback = RibbonsMonMenu_ReturnToMainMenu; return RIBBONS_MON_LIST_FUNC_EXIT; } if (JOY_NEW(A_BUTTON)) { - structPtr->monList->currIndex = GetSelectedPokenavListIndex(); - structPtr->saveMonList = 1; - structPtr->callback = RibbonsMonMenu_ToSummaryScreen; + list->monList->currIndex = GetSelectedPokenavListIndex(); + list->saveMonList = 1; + list->callback = RibbonsMonMenu_ToSummaryScreen; return RIBBONS_MON_LIST_FUNC_OPEN_RIBBONS_SUMMARY; } return RIBBONS_MON_LIST_FUNC_NONE; } -static u32 RibbonsMonMenu_ReturnToMainMenu(struct PokenavSub9 *structPtr) +static u32 RibbonsMonMenu_ReturnToMainMenu(struct Pokenav_RibbonsMonList *list) { return POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS; } -static u32 RibbonsMonMenu_ToSummaryScreen(struct PokenavSub9 *structPtr) +static u32 RibbonsMonMenu_ToSummaryScreen(struct Pokenav_RibbonsMonList *list) { return POKENAV_RIBBONS_SUMMARY_SCREEN; } static u32 UpdateMonListBgs(void) { - struct PokenavSub9 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - return structPtr->changeBgs; + struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + return list->changeBgs; } static struct PokenavMonList *GetMonRibbonMonListData(void) { - struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - return ptr->monList->monData; + struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + return list->monList->monData; } static s32 GetRibbonsMonListCount(void) { - struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - return ptr->monList->listCount; + struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + return list->monList->listCount; } //unused static s32 GetMonRibbonSelectedMonData(void) { - struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); s32 idx = GetSelectedPokenavListIndex(); - return ptr->monList->monData[idx].data; + return list->monList->monData[idx].data; } static s32 GetRibbonListMenuCurrIndex(void) { - struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - return ptr->monList->currIndex; + struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + return list->monList->currIndex; } static u32 GetMonRibbonListLoopTaskFunc(s32 state) @@ -249,10 +249,10 @@ static u32 BuildPartyMonRibbonList(s32 state) { s32 i; struct PokenavMonList item; - struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - ptr->monList->listCount = 0; - ptr->monList->currIndex = 0; + list->monList->listCount = 0; + list->monList->currIndex = 0; item.boxId = TOTAL_BOXES_COUNT; for (i = 0; i < PARTY_SIZE; i++) { @@ -266,7 +266,7 @@ static u32 BuildPartyMonRibbonList(s32 state) { item.monId = i; item.data = ribbonCount; - sub_81CFCEC(ptr, &item); + InsertMonListItem(list, &item); } } } @@ -276,17 +276,17 @@ static u32 BuildPartyMonRibbonList(s32 state) static u32 InitBoxMonRibbonList(s32 state) { - struct PokenavSub9 *ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - ptr->monId = 0; - ptr->boxId = 0; + struct Pokenav_RibbonsMonList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + list->monId = 0; + list->boxId = 0; return LT_INC_AND_CONTINUE; } static u32 BuildBoxMonRibbonList(s32 state) { - struct PokenavSub9 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - s32 boxId = ptr->boxId; - s32 monId = ptr->monId; + struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); + s32 boxId = list->boxId; + s32 monId = list->monId; s32 boxCount = 0; struct PokenavMonList item; @@ -302,15 +302,15 @@ static u32 BuildBoxMonRibbonList(s32 state) item.boxId = boxId; item.monId = monId; item.data = ribbonCount; - sub_81CFCEC(ptr, &item); + InsertMonListItem(list, &item); } } boxCount++; monId++; if (boxCount > TOTAL_BOXES_COUNT) { - ptr->boxId = boxId; - ptr->monId = monId; + list->boxId = boxId; + list->monId = monId; return LT_CONTINUE; } } @@ -318,28 +318,28 @@ static u32 BuildBoxMonRibbonList(s32 state) boxId++; } - ptr->changeBgs = 1; + list->changeBgs = 1; return LT_FINISH; } -static void sub_81CFCEC(struct PokenavSub9 *structPtr, struct PokenavMonList *item) +static void InsertMonListItem(struct Pokenav_RibbonsMonList *list, struct PokenavMonList *item) { u32 left = 0; - u32 right = structPtr->monList->listCount; + u32 right = list->monList->listCount; u32 insertionIdx = left + (right - left) / 2; while (right != insertionIdx) { - if (item->data > structPtr->monList->monData[insertionIdx].data) + if (item->data > list->monList->monData[insertionIdx].data) right = insertionIdx; else left = insertionIdx + 1; insertionIdx = left + (right - left) / 2; } - for (right = structPtr->monList->listCount; right > insertionIdx; right--) - structPtr->monList->monData[right] = structPtr->monList->monData[right - 1]; - structPtr->monList->monData[insertionIdx] = *item; - structPtr->monList->listCount++; + for (right = list->monList->listCount; right > insertionIdx; right--) + list->monList->monData[right] = list->monList->monData[right - 1]; + list->monList->monData[insertionIdx] = *item; + list->monList->listCount++; } // Unused @@ -374,62 +374,62 @@ static bool32 PlayerHasRibbonsMon(void) bool32 OpenRibbonsMonList(void) { - struct PokenavSub10 *ptr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU, sizeof(struct PokenavSub10)); - if (ptr == NULL) + struct Pokenav_RibbonsMonMenu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU, sizeof(struct Pokenav_RibbonsMonMenu)); + if (menu == NULL) return FALSE; - ptr->ltid = CreateLoopedTask(LoopedTask_OpenRibbonsMonList, 1); - ptr->callback = GetRibbonsMonCurrentLoopedTaskActive; - ptr->fromSummary = FALSE; + menu->loopedTaskId = CreateLoopedTask(LoopedTask_OpenRibbonsMonList, 1); + menu->callback = GetRibbonsMonCurrentLoopedTaskActive; + menu->fromSummary = FALSE; return TRUE; } bool32 OpenRibbonsMonListFromRibbonsSummary(void) { - struct PokenavSub10 *monMenu = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU, sizeof(struct PokenavSub10)); - if (monMenu == NULL) + struct Pokenav_RibbonsMonMenu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU, sizeof(struct Pokenav_RibbonsMonMenu)); + if (menu == NULL) return FALSE; - monMenu->ltid = CreateLoopedTask(LoopedTask_OpenRibbonsMonList, 1); - monMenu->callback = GetRibbonsMonCurrentLoopedTaskActive; - monMenu->fromSummary = TRUE; + menu->loopedTaskId = CreateLoopedTask(LoopedTask_OpenRibbonsMonList, 1); + menu->callback = GetRibbonsMonCurrentLoopedTaskActive; + menu->fromSummary = TRUE; return TRUE; } void CreateRibbonsMonListLoopedTask(s32 idx) { - struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); - monMenu->ltid = CreateLoopedTask(sRibbonsMonMenuLoopTaskFuncs[idx], 1); - monMenu->callback = GetRibbonsMonCurrentLoopedTaskActive; + struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + menu->loopedTaskId = CreateLoopedTask(sRibbonsMonMenuLoopTaskFuncs[idx], 1); + menu->callback = GetRibbonsMonCurrentLoopedTaskActive; } bool32 IsRibbonsMonListLoopedTaskActive(void) { - struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); - return monMenu->callback(); + struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + return menu->callback(); } bool32 GetRibbonsMonCurrentLoopedTaskActive(void) { - struct PokenavSub10 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); - return IsLoopedTaskActive(ptr->ltid); + struct Pokenav_RibbonsMonMenu * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + return IsLoopedTaskActive(menu->loopedTaskId); } -void FreeRibbonsMonList2(void) +void FreeRibbonsMonMenu(void) { - struct PokenavSub10 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + struct Pokenav_RibbonsMonMenu * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); sub_81C8234(); - RemoveWindow(ptr->winid); + RemoveWindow(menu->winid); FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); } static u32 LoopedTask_OpenRibbonsMonList(s32 state) { - struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); switch (state) { case 0: InitBgTemplates(sMonRibbonListBgTemplates, ARRAY_COUNT(sMonRibbonListBgTemplates)); DecompressAndCopyTileDataToVram(1, sMonRibbonListFrameTiles, 0, 0, 0); - SetBgTilemapBuffer(1, monMenu->buff); + SetBgTilemapBuffer(1, menu->buff); CopyToBgTilemapBuffer(1, sMonRibbonListFrameTilemap, 0, 0); CopyPaletteIntoBufferUnfaded(sMonRibbonListFramePal, 0x10, 0x20); CopyBgTilemapBufferToVram(1); @@ -452,7 +452,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state) case 3: if (sub_81C8224()) return LT_PAUSE; - AddRibbonsMonListWindow(monMenu); + AddRibbonsMonListWindow(menu); return LT_INC_AND_PAUSE; case 4: if (FreeTempTileDataBuffersIfPossible()) @@ -461,7 +461,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state) HideBg(3); PrintHelpBarText(HELPBAR_RIBBONS_MON_LIST); PokenavFadeScreen(1); - if (!monMenu->fromSummary) + if (!menu->fromSummary) { LoadLeftHeaderGfxForIndex(POKENAV_GFX_RIBBONS_MENU); ShowLeftHeaderGfx(POKENAV_GFX_RIBBONS_MENU, 1, 0); @@ -479,7 +479,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state) static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state) { - struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); switch (state) { case 0: @@ -500,7 +500,7 @@ static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state) return LT_PAUSE; // fallthrough case 2: - sub_81D0288(monMenu); + UpdateIndexNumberDisplay(menu); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -512,7 +512,7 @@ static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state) static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state) { - struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); switch (state) { case 0: @@ -533,7 +533,7 @@ static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state) return LT_PAUSE; // fallthrough case 2: - sub_81D0288(monMenu); + UpdateIndexNumberDisplay(menu); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -545,7 +545,7 @@ static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state) static u32 LoopedTask_RibbonsListMovePageUp(s32 state) { - struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); switch (state) { case 0: @@ -566,7 +566,7 @@ static u32 LoopedTask_RibbonsListMovePageUp(s32 state) return LT_PAUSE; // fallthrough case 2: - sub_81D0288(monMenu); + UpdateIndexNumberDisplay(menu); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -578,7 +578,7 @@ static u32 LoopedTask_RibbonsListMovePageUp(s32 state) static u32 LoopedTask_RibbonsListMovePageDown(s32 state) { - struct PokenavSub10 *monMenu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); + struct Pokenav_RibbonsMonMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); switch (state) { case 0: @@ -599,7 +599,7 @@ static u32 LoopedTask_RibbonsListMovePageDown(s32 state) return LT_PAUSE; // fallthrough case 2: - sub_81D0288(monMenu); + UpdateIndexNumberDisplay(menu); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -645,34 +645,34 @@ static u32 LoopedTask_RibbonsListOpenSummary(s32 state) return LT_FINISH; } -static void AddRibbonsMonListWindow(struct PokenavSub10 *monMenu) +static void AddRibbonsMonListWindow(struct Pokenav_RibbonsMonMenu *menu) { - s32 r2; - monMenu->winid = AddWindow(&sRibbonsMonListWindowTemplate); - PutWindowTilemap(monMenu->winid); - r2 = GetRibbonsMonListCount(); - sub_81D02B0(monMenu->winid, 0, r2); - CopyWindowToVram(monMenu->winid, COPYWIN_MAP); - sub_81D0288(monMenu); + s32 listCount; + menu->winid = AddWindow(&sRibbonsMonListWindowTemplate); + PutWindowTilemap(menu->winid); + listCount = GetRibbonsMonListCount(); + DrawListIndexNumber(menu->winid, 0, listCount); + CopyWindowToVram(menu->winid, COPYWIN_MAP); + UpdateIndexNumberDisplay(menu); } -static void sub_81D0288(struct PokenavSub10 *monMenu) +static void UpdateIndexNumberDisplay(struct Pokenav_RibbonsMonMenu *menu) { - s32 r4 = GetSelectedPokenavListIndex(); - s32 r2 = GetRibbonsMonListCount(); - sub_81D02B0(monMenu->winid, r4 + 1, r2); - CopyWindowToVram(monMenu->winid, COPYWIN_GFX); + s32 listIndex = GetSelectedPokenavListIndex(); + s32 listCount = GetRibbonsMonListCount(); + DrawListIndexNumber(menu->winid, listIndex + 1, listCount); + CopyWindowToVram(menu->winid, COPYWIN_GFX); } -static void sub_81D02B0(s32 windowId, s32 val1, s32 val2) +static void DrawListIndexNumber(s32 windowId, s32 index, s32 max) { u8 strbuf[16]; u32 x; u8 * ptr = strbuf; - ptr = ConvertIntToDecimalStringN(ptr, val1, STR_CONV_MODE_RIGHT_ALIGN, 3); + ptr = ConvertIntToDecimalStringN(ptr, index, STR_CONV_MODE_RIGHT_ALIGN, 3); *ptr++ = CHAR_SLASH; - ConvertIntToDecimalStringN(ptr, val2, STR_CONV_MODE_RIGHT_ALIGN, 3); + ConvertIntToDecimalStringN(ptr, max, STR_CONV_MODE_RIGHT_ALIGN, 3); x = GetStringCenterAlignXOffset(FONT_NORMAL, strbuf, 56); AddTextPrinterParameterized(windowId, FONT_NORMAL, strbuf, x, 1, TEXT_SKIP_DRAW, NULL); } diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_summary.c similarity index 67% rename from src/pokenav_ribbons_2.c rename to src/pokenav_ribbons_summary.c index ef08ba3927..a7a27ee31f 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_summary.c @@ -39,7 +39,7 @@ enum #define MON_SPRITE_X_OFF -32 #define MON_SPRITE_Y 104 -struct PokenavSub13 +struct Pokenav_RibbonsSummaryList { u8 unused1[8]; struct PokenavSub18 *monList; @@ -50,10 +50,10 @@ struct PokenavSub13 u32 ribbonIds[FIRST_GIFT_RIBBON]; u32 giftRibbonIds[NUM_GIFT_RIBBONS]; u32 unused2; - u32 (*callback)(struct PokenavSub13 *); + u32 (*callback)(struct Pokenav_RibbonsSummaryList *); }; -struct PokenavSub14 +struct Pokenav_RibbonsSummaryMenu { u32 (*callback)(void); u32 loopedTaskId; @@ -71,31 +71,31 @@ struct PokenavSub14 static u32 sRibbonDraw_Total; static u32 sRibbonDraw_Current; -static void PrintCurrentMonRibbonCount(struct PokenavSub14 *); -static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *); -static void PrintRibbonsMonListIndex(struct PokenavSub14 *); -static void ZoomOutSelectedRibbon(struct PokenavSub14 *); -static void UpdateAndZoomInSelectedRibbon(struct PokenavSub14 *); -static void PrintRibbonNameAndDescription(struct PokenavSub14 *); -static void ResetSpritesAndDrawMonFrontPic(struct PokenavSub14 *); -static void AddRibbonListIndexWindow(struct PokenavSub14 *); -static void DestroyRibbonsMonFrontPic(struct PokenavSub14 *); -static void SlideMonSpriteOff(struct PokenavSub14 *); -static void SlideMonSpriteOn(struct PokenavSub14 *); -static void AddRibbonCountWindow(struct PokenavSub14 *); -static void CreateBigRibbonSprite(struct PokenavSub14 *); -static void AddRibbonSummaryMonNameWindow(struct PokenavSub14 *); -static void DrawAllRibbonsSmall(struct PokenavSub14 *); -static bool32 IsRibbonAnimating(struct PokenavSub14 *); -static bool32 IsMonSpriteAnimating(struct PokenavSub14 *); -static void GetMonRibbons(struct PokenavSub13 *); -static u32 HandleExpandedRibbonInput(struct PokenavSub13 *); -static u32 RibbonsSummaryHandleInput(struct PokenavSub13 *); -static u32 ReturnToRibbonsListFromSummary(struct PokenavSub13 *); -static bool32 TrySelectRibbonUp(struct PokenavSub13 *); -static bool32 TrySelectRibbonRight(struct PokenavSub13 *); -static bool32 TrySelectRibbonLeft(struct PokenavSub13 *); -static bool32 TrySelectRibbonDown(struct PokenavSub13 *); +static void PrintCurrentMonRibbonCount(struct Pokenav_RibbonsSummaryMenu *); +static void PrintRibbbonsSummaryMonInfo(struct Pokenav_RibbonsSummaryMenu *); +static void PrintRibbonsMonListIndex(struct Pokenav_RibbonsSummaryMenu *); +static void ZoomOutSelectedRibbon(struct Pokenav_RibbonsSummaryMenu *); +static void UpdateAndZoomInSelectedRibbon(struct Pokenav_RibbonsSummaryMenu *); +static void PrintRibbonNameAndDescription(struct Pokenav_RibbonsSummaryMenu *); +static void ResetSpritesAndDrawMonFrontPic(struct Pokenav_RibbonsSummaryMenu *); +static void AddRibbonListIndexWindow(struct Pokenav_RibbonsSummaryMenu *); +static void DestroyRibbonsMonFrontPic(struct Pokenav_RibbonsSummaryMenu *); +static void SlideMonSpriteOff(struct Pokenav_RibbonsSummaryMenu *); +static void SlideMonSpriteOn(struct Pokenav_RibbonsSummaryMenu *); +static void AddRibbonCountWindow(struct Pokenav_RibbonsSummaryMenu *); +static void CreateBigRibbonSprite(struct Pokenav_RibbonsSummaryMenu *); +static void AddRibbonSummaryMonNameWindow(struct Pokenav_RibbonsSummaryMenu *); +static void DrawAllRibbonsSmall(struct Pokenav_RibbonsSummaryMenu *); +static bool32 IsRibbonAnimating(struct Pokenav_RibbonsSummaryMenu *); +static bool32 IsMonSpriteAnimating(struct Pokenav_RibbonsSummaryMenu *); +static void GetMonRibbons(struct Pokenav_RibbonsSummaryList *); +static u32 HandleExpandedRibbonInput(struct Pokenav_RibbonsSummaryList *); +static u32 RibbonsSummaryHandleInput(struct Pokenav_RibbonsSummaryList *); +static u32 ReturnToRibbonsListFromSummary(struct Pokenav_RibbonsSummaryList *); +static bool32 TrySelectRibbonUp(struct Pokenav_RibbonsSummaryList *); +static bool32 TrySelectRibbonRight(struct Pokenav_RibbonsSummaryList *); +static bool32 TrySelectRibbonLeft(struct Pokenav_RibbonsSummaryList *); +static bool32 TrySelectRibbonDown(struct Pokenav_RibbonsSummaryList *); static bool32 GetCurrentLoopedTaskActive(void); static u32 GetRibbonsSummaryCurrentIndex(void); static u32 GetRibbonsSummaryMonListCount(void); @@ -186,16 +186,16 @@ static const LoopedTask sRibbonsSummaryMenuLoopTaskFuncs[] = bool32 PokenavCallback_Init_RibbonsSummaryMenu(void) { - struct PokenavSub13 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST, sizeof(struct PokenavSub13)); - if (structPtr == NULL) + struct Pokenav_RibbonsSummaryList *list = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST, sizeof(struct Pokenav_RibbonsSummaryList)); + if (list == NULL) return FALSE; - structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - if (structPtr->monList == NULL) + list->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + if (list->monList == NULL) return FALSE; - GetMonRibbons(structPtr); - structPtr->callback = RibbonsSummaryHandleInput; + GetMonRibbons(list); + list->callback = RibbonsSummaryHandleInput; gKeyRepeatContinueDelay = 3; gKeyRepeatStartDelay = 10; return TRUE; @@ -203,8 +203,8 @@ bool32 PokenavCallback_Init_RibbonsSummaryMenu(void) u32 GetRibbonsSummaryMenuCallback(void) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - return structPtr->callback(structPtr); + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + return list->callback(list); } void FreeRibbonsSummaryScreen1(void) @@ -213,150 +213,150 @@ void FreeRibbonsSummaryScreen1(void) } // Handles input when a specific ribbon is not currently selected -static u32 RibbonsSummaryHandleInput(struct PokenavSub13 *structPtr) +static u32 RibbonsSummaryHandleInput(struct Pokenav_RibbonsSummaryList *list) { // Handle Up/Down movement to select a new Pokémon to show ribbons for - if (JOY_REPEAT(DPAD_UP) && structPtr->monList->currIndex != 0) + if (JOY_REPEAT(DPAD_UP) && list->monList->currIndex != 0) { - structPtr->monList->currIndex--; - structPtr->selectedPos = 0; - GetMonRibbons(structPtr); + list->monList->currIndex--; + list->selectedPos = 0; + GetMonRibbons(list); return RIBBONS_SUMMARY_FUNC_SWITCH_MONS; } - if (JOY_REPEAT(DPAD_DOWN) && structPtr->monList->currIndex < structPtr->monList->listCount - 1) + if (JOY_REPEAT(DPAD_DOWN) && list->monList->currIndex < list->monList->listCount - 1) { - structPtr->monList->currIndex++; - structPtr->selectedPos = 0; - GetMonRibbons(structPtr); + list->monList->currIndex++; + list->selectedPos = 0; + GetMonRibbons(list); return RIBBONS_SUMMARY_FUNC_SWITCH_MONS; } if (JOY_NEW(A_BUTTON)) { // Enter ribbon selection - structPtr->callback = HandleExpandedRibbonInput; + list->callback = HandleExpandedRibbonInput; return RIBBONS_SUMMARY_FUNC_SELECT_RIBBON; } if (JOY_NEW(B_BUTTON)) { // Exit ribbon summary menu - structPtr->callback = ReturnToRibbonsListFromSummary; + list->callback = ReturnToRibbonsListFromSummary; return RIBBONS_SUMMARY_FUNC_EXIT; } return RIBBONS_SUMMARY_FUNC_NONE; } // Handles input when a ribbon is selected -static u32 HandleExpandedRibbonInput(struct PokenavSub13 *structPtr) +static u32 HandleExpandedRibbonInput(struct Pokenav_RibbonsSummaryList *list) { // Handle movement while a ribbon is selected - if (JOY_REPEAT(DPAD_UP) && TrySelectRibbonUp(structPtr)) + if (JOY_REPEAT(DPAD_UP) && TrySelectRibbonUp(list)) return RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE; - if (JOY_REPEAT(DPAD_DOWN) && TrySelectRibbonDown(structPtr)) + if (JOY_REPEAT(DPAD_DOWN) && TrySelectRibbonDown(list)) return RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE; - if (JOY_REPEAT(DPAD_LEFT) && TrySelectRibbonLeft(structPtr)) + if (JOY_REPEAT(DPAD_LEFT) && TrySelectRibbonLeft(list)) return RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE; - if (JOY_REPEAT(DPAD_RIGHT) && TrySelectRibbonRight(structPtr)) + if (JOY_REPEAT(DPAD_RIGHT) && TrySelectRibbonRight(list)) return RIBBONS_SUMMARY_FUNC_EXPANDED_CURSOR_MOVE; if (JOY_NEW(B_BUTTON)) { // Exit ribbon selection - structPtr->callback = RibbonsSummaryHandleInput; + list->callback = RibbonsSummaryHandleInput; return RIBBONS_SUMMARY_FUNC_EXPANDED_CANCEL; } return RIBBONS_SUMMARY_FUNC_NONE; } -static u32 ReturnToRibbonsListFromSummary(struct PokenavSub13 *structPtr) +static u32 ReturnToRibbonsListFromSummary(struct Pokenav_RibbonsSummaryList *list) { return POKENAV_RIBBONS_RETURN_TO_MON_LIST; } -static bool32 TrySelectRibbonUp(struct PokenavSub13 *structPtr) +static bool32 TrySelectRibbonUp(struct Pokenav_RibbonsSummaryList *list) { - if (structPtr->selectedPos < FIRST_GIFT_RIBBON) + if (list->selectedPos < FIRST_GIFT_RIBBON) { // In normal ribbons, try to move up a row - if (structPtr->selectedPos < RIBBONS_PER_ROW) + if (list->selectedPos < RIBBONS_PER_ROW) return FALSE; - structPtr->selectedPos -= RIBBONS_PER_ROW; + list->selectedPos -= RIBBONS_PER_ROW; return TRUE; } - if (structPtr->numNormalRibbons != 0) + if (list->numNormalRibbons != 0) { // In gift ribbons, try to move up into normal ribbons // If there's > 1 row of gift ribbons (not normally possible) // it's impossible to move up between them - u32 ribbonPos = structPtr->selectedPos - GIFT_RIBBON_START_POS; - structPtr->selectedPos = ribbonPos + structPtr->normalRibbonLastRowStart; - if (structPtr->selectedPos >= structPtr->numNormalRibbons) - structPtr->selectedPos = structPtr->numNormalRibbons - 1; + u32 ribbonPos = list->selectedPos - GIFT_RIBBON_START_POS; + list->selectedPos = ribbonPos + list->normalRibbonLastRowStart; + if (list->selectedPos >= list->numNormalRibbons) + list->selectedPos = list->numNormalRibbons - 1; return TRUE; } return FALSE; } -static bool32 TrySelectRibbonDown(struct PokenavSub13 *structPtr) +static bool32 TrySelectRibbonDown(struct Pokenav_RibbonsSummaryList *list) { - if (structPtr->selectedPos >= FIRST_GIFT_RIBBON) + if (list->selectedPos >= FIRST_GIFT_RIBBON) return FALSE; - if (structPtr->selectedPos < structPtr->normalRibbonLastRowStart) + if (list->selectedPos < list->normalRibbonLastRowStart) { // Not in last row of normal ribbons, advance to next row - structPtr->selectedPos += RIBBONS_PER_ROW; - if (structPtr->selectedPos >= structPtr->numNormalRibbons) - structPtr->selectedPos = structPtr->numNormalRibbons - 1; + list->selectedPos += RIBBONS_PER_ROW; + if (list->selectedPos >= list->numNormalRibbons) + list->selectedPos = list->numNormalRibbons - 1; return TRUE; } - if (structPtr->numGiftRibbons != 0) + if (list->numGiftRibbons != 0) { // In/beyond last of row of normal ribbons and gift ribbons present, move down to gift ribbon row - int ribbonPos = structPtr->selectedPos - structPtr->normalRibbonLastRowStart; - if (ribbonPos >= structPtr->numGiftRibbons) - ribbonPos = structPtr->numGiftRibbons - 1; + int ribbonPos = list->selectedPos - list->normalRibbonLastRowStart; + if (ribbonPos >= list->numGiftRibbons) + ribbonPos = list->numGiftRibbons - 1; - structPtr->selectedPos = ribbonPos + GIFT_RIBBON_START_POS; + list->selectedPos = ribbonPos + GIFT_RIBBON_START_POS; return TRUE; } return FALSE; } -static bool32 TrySelectRibbonLeft(struct PokenavSub13 *structPtr) +static bool32 TrySelectRibbonLeft(struct Pokenav_RibbonsSummaryList *list) { - u16 column = structPtr->selectedPos % RIBBONS_PER_ROW; + u16 column = list->selectedPos % RIBBONS_PER_ROW; if (column != 0) { - structPtr->selectedPos--; + list->selectedPos--; return TRUE; } return FALSE; } -static bool32 TrySelectRibbonRight(struct PokenavSub13 *structPtr) +static bool32 TrySelectRibbonRight(struct Pokenav_RibbonsSummaryList *list) { - int column = structPtr->selectedPos % RIBBONS_PER_ROW; + int column = list->selectedPos % RIBBONS_PER_ROW; if (column >= RIBBONS_PER_ROW - 1) return FALSE; - if (structPtr->selectedPos < GIFT_RIBBON_START_POS) + if (list->selectedPos < GIFT_RIBBON_START_POS) { // Move right in normal ribbon row - if (structPtr->selectedPos < structPtr->numNormalRibbons - 1) + if (list->selectedPos < list->numNormalRibbons - 1) { - structPtr->selectedPos++; + list->selectedPos++; return TRUE; } } else { // Move right in gift ribbon row - if (column < structPtr->numGiftRibbons - 1) + if (column < list->numGiftRibbons - 1) { - structPtr->selectedPos++; + list->selectedPos++; return TRUE; } } @@ -365,20 +365,20 @@ static bool32 TrySelectRibbonRight(struct PokenavSub13 *structPtr) static u32 GetRibbonsSummaryCurrentIndex(void) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - return structPtr->monList->currIndex; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + return list->monList->currIndex; } static u32 GetRibbonsSummaryMonListCount(void) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - return structPtr->monList->listCount; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + return list->monList->listCount; } static void GetMonNicknameLevelGender(u8 *nick, u8 *level, u8 *gender) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - struct PokenavSub18 *mons = structPtr->monList; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + struct PokenavSub18 *mons = list->monList; struct PokenavMonList *monInfo = &mons->monData[mons->currIndex]; if (monInfo->boxId == TOTAL_BOXES_COUNT) @@ -402,8 +402,8 @@ static void GetMonNicknameLevelGender(u8 *nick, u8 *level, u8 *gender) static void GetMonSpeciesPersonalityOtId(u16 *species, u32 *personality, u32 *otId) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - struct PokenavSub18 *mons = structPtr->monList; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + struct PokenavSub18 *mons = list->monList; struct PokenavMonList *monInfo = &mons->monData[mons->currIndex]; if (monInfo->boxId == TOTAL_BOXES_COUNT) @@ -426,8 +426,8 @@ static void GetMonSpeciesPersonalityOtId(u16 *species, u32 *personality, u32 *ot static u32 GetCurrMonRibbonCount(void) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - struct PokenavSub18 *mons = structPtr->monList; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + struct PokenavSub18 *mons = list->monList; struct PokenavMonList *monInfo = &mons->monData[mons->currIndex]; if (monInfo->boxId == TOTAL_BOXES_COUNT) @@ -436,11 +436,11 @@ static u32 GetCurrMonRibbonCount(void) return GetBoxMonDataAt(monInfo->boxId, monInfo->monId, MON_DATA_RIBBON_COUNT); } -static void GetMonRibbons(struct PokenavSub13 *structPtr) +static void GetMonRibbons(struct Pokenav_RibbonsSummaryList *list) { u32 ribbonFlags; s32 i, j; - struct PokenavSub18 *mons = structPtr->monList; + struct PokenavSub18 *mons = list->monList; struct PokenavMonList *monInfo = &mons->monData[mons->currIndex]; if (monInfo->boxId == TOTAL_BOXES_COUNT) @@ -448,8 +448,8 @@ static void GetMonRibbons(struct PokenavSub13 *structPtr) else ribbonFlags = GetBoxMonDataAt(monInfo->boxId, monInfo->monId, MON_DATA_RIBBONS); - structPtr->numNormalRibbons = 0; - structPtr->numGiftRibbons = 0; + list->numNormalRibbons = 0; + list->numGiftRibbons = 0; for (i = 0; i < ARRAY_COUNT(sRibbonData); i++) { // For all non-contest ribbons, numRibbons will be 1 if they have it, 0 if they don't @@ -458,119 +458,119 @@ static void GetMonRibbons(struct PokenavSub13 *structPtr) if (!sRibbonData[i].isGiftRibbon) { for (j = 0; j < numRibbons; j++) - structPtr->ribbonIds[structPtr->numNormalRibbons++] = sRibbonData[i].ribbonId + j; + list->ribbonIds[list->numNormalRibbons++] = sRibbonData[i].ribbonId + j; } else { for (j = 0; j < numRibbons; j++) - structPtr->giftRibbonIds[structPtr->numGiftRibbons++] = sRibbonData[i].ribbonId + j; + list->giftRibbonIds[list->numGiftRibbons++] = sRibbonData[i].ribbonId + j; } ribbonFlags >>= sRibbonData[i].numBits; } - if (structPtr->numNormalRibbons != 0) + if (list->numNormalRibbons != 0) { - structPtr->normalRibbonLastRowStart = ((structPtr->numNormalRibbons - 1) / RIBBONS_PER_ROW) * RIBBONS_PER_ROW; - structPtr->selectedPos = 0; + list->normalRibbonLastRowStart = ((list->numNormalRibbons - 1) / RIBBONS_PER_ROW) * RIBBONS_PER_ROW; + list->selectedPos = 0; } else { // There are no normal ribbons, move cursor to first gift ribbon - structPtr->normalRibbonLastRowStart = 0; - structPtr->selectedPos = GIFT_RIBBON_START_POS; + list->normalRibbonLastRowStart = 0; + list->selectedPos = GIFT_RIBBON_START_POS; } } static u32 *GetNormalRibbonIds(u32 *size) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - *size = structPtr->numNormalRibbons; - return structPtr->ribbonIds; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + *size = list->numNormalRibbons; + return list->ribbonIds; } static u32 *GetGiftRibbonIds(u32 *size) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - *size = structPtr->numGiftRibbons; - return structPtr->giftRibbonIds; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + *size = list->numGiftRibbons; + return list->giftRibbonIds; } static u16 GetSelectedPosition(void) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - return structPtr->selectedPos; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + return list->selectedPos; } static u32 GetRibbonId(void) { - struct PokenavSub13 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - int ribbonPos = structPtr->selectedPos; + struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); + int ribbonPos = list->selectedPos; if (ribbonPos < FIRST_GIFT_RIBBON) - return structPtr->ribbonIds[ribbonPos]; + return list->ribbonIds[ribbonPos]; else - return structPtr->giftRibbonIds[ribbonPos - GIFT_RIBBON_START_POS]; + return list->giftRibbonIds[ribbonPos - GIFT_RIBBON_START_POS]; } bool32 OpenRibbonsSummaryMenu(void) { - struct PokenavSub14 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU, sizeof(struct PokenavSub14)); - if (structPtr == NULL) + struct Pokenav_RibbonsSummaryMenu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU, sizeof(struct Pokenav_RibbonsSummaryMenu)); + if (menu == NULL) return FALSE; - structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_OpenRibbonsSummaryMenu, 1); - structPtr->callback = GetCurrentLoopedTaskActive; + menu->loopedTaskId = CreateLoopedTask(LoopedTask_OpenRibbonsSummaryMenu, 1); + menu->callback = GetCurrentLoopedTaskActive; return TRUE; } void CreateRibbonsSummaryLoopedTask(s32 id) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); - structPtr->loopedTaskId = CreateLoopedTask(sRibbonsSummaryMenuLoopTaskFuncs[id], 1); - structPtr->callback = GetCurrentLoopedTaskActive; + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + menu->loopedTaskId = CreateLoopedTask(sRibbonsSummaryMenuLoopTaskFuncs[id], 1); + menu->callback = GetCurrentLoopedTaskActive; } u32 IsRibbonsSummaryLoopedTaskActive(void) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); - return structPtr->callback(); + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + return menu->callback(); } void FreeRibbonsSummaryScreen2(void) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); - RemoveWindow(structPtr->ribbonCountWindowId); - RemoveWindow(structPtr->nameWindowId); - RemoveWindow(structPtr->listIdxWindowId); + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + RemoveWindow(menu->ribbonCountWindowId); + RemoveWindow(menu->nameWindowId); + RemoveWindow(menu->listIdxWindowId); #ifndef BUGFIX - RemoveWindow(structPtr->unusedWindowId); // Removing window, but window id is never set + RemoveWindow(menu->unusedWindowId); // Removing window, but window id is never set #endif - DestroyRibbonsMonFrontPic(structPtr); + DestroyRibbonsMonFrontPic(menu); FreeSpriteTilesByTag(GFXTAG_RIBBON_ICONS_BIG); FreeSpritePaletteByTag(PALTAG_RIBBON_ICONS_1); FreeSpritePaletteByTag(PALTAG_RIBBON_ICONS_2); FreeSpritePaletteByTag(PALTAG_RIBBON_ICONS_3); FreeSpritePaletteByTag(PALTAG_RIBBON_ICONS_4); FreeSpritePaletteByTag(PALTAG_RIBBON_ICONS_5); - FreeSpriteOamMatrix(structPtr->bigRibbonSprite); - DestroySprite(structPtr->bigRibbonSprite); + FreeSpriteOamMatrix(menu->bigRibbonSprite); + DestroySprite(menu->bigRibbonSprite); FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); } static bool32 GetCurrentLoopedTaskActive(void) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); - return IsLoopedTaskActive(structPtr->loopedTaskId); + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + return IsLoopedTaskActive(menu->loopedTaskId); } static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); switch (state) { case 0: InitBgTemplates(sBgTemplates, ARRAY_COUNT(sBgTemplates)); DecompressAndCopyTileDataToVram(2, gPokenavRibbonsSummaryBg_Gfx, 0, 0, 0); - SetBgTilemapBuffer(2, structPtr->tilemapBuffers[0]); + SetBgTilemapBuffer(2, menu->tilemapBuffers[0]); CopyToBgTilemapBuffer(2, gPokenavRibbonsSummaryBg_Tilemap, 0, 0); CopyPaletteIntoBufferUnfaded(gPokenavRibbonsSummaryBg_Pal, 0x10, 0x20); CopyBgTilemapBufferToVram(2); @@ -580,7 +580,7 @@ static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state) { BgDmaFill(1, 0, 0, 1); DecompressAndCopyTileDataToVram(1, sRibbonIconsSmall_Gfx, 0, 1, 0); - SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]); + SetBgTilemapBuffer(1, menu->tilemapBuffers[1]); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); CopyPaletteIntoBufferUnfaded(sRibbonIcons1_Pal, 0x20, 0xA0); CopyPaletteIntoBufferUnfaded(sMonInfo_Pal, 0xA0, 0x20); @@ -591,21 +591,21 @@ static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state) case 2: if (!FreeTempTileDataBuffersIfPossible()) { - AddRibbonCountWindow(structPtr); + AddRibbonCountWindow(menu); return LT_INC_AND_PAUSE; } return LT_PAUSE; case 3: if (!FreeTempTileDataBuffersIfPossible()) { - AddRibbonSummaryMonNameWindow(structPtr); + AddRibbonSummaryMonNameWindow(menu); return LT_INC_AND_PAUSE; } return LT_PAUSE; case 4: if (!FreeTempTileDataBuffersIfPossible()) { - AddRibbonListIndexWindow(structPtr); + AddRibbonListIndexWindow(menu); return LT_INC_AND_PAUSE; } return LT_PAUSE; @@ -619,18 +619,18 @@ static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state) case 6: if (!IsDma3ManagerBusyWithBgCopy()) { - ResetSpritesAndDrawMonFrontPic(structPtr); + ResetSpritesAndDrawMonFrontPic(menu); return LT_INC_AND_CONTINUE; } return LT_PAUSE; case 7: - DrawAllRibbonsSmall(structPtr); + DrawAllRibbonsSmall(menu); PrintHelpBarText(HELPBAR_RIBBONS_LIST); return LT_INC_AND_PAUSE; case 8: if (!IsDma3ManagerBusyWithBgCopy()) { - CreateBigRibbonSprite(structPtr); + CreateBigRibbonSprite(menu); ChangeBgX(1, 0, BG_COORD_SET); ChangeBgY(1, 0, BG_COORD_SET); ChangeBgX(2, 0, BG_COORD_SET); @@ -667,38 +667,38 @@ static u32 LoopedTask_ExitRibbonsSummaryMenu(s32 state) static u32 LoopedTask_SwitchRibbonsSummaryMon(s32 state) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); switch (state) { case 0: PlaySE(SE_SELECT); - SlideMonSpriteOff(structPtr); + SlideMonSpriteOff(menu); return LT_INC_AND_PAUSE; case 1: - if (!IsMonSpriteAnimating(structPtr)) + if (!IsMonSpriteAnimating(menu)) { - PrintRibbbonsSummaryMonInfo(structPtr); + PrintRibbbonsSummaryMonInfo(menu); return LT_INC_AND_CONTINUE; } return LT_PAUSE; case 2: - DrawAllRibbonsSmall(structPtr); + DrawAllRibbonsSmall(menu); return LT_INC_AND_CONTINUE; case 3: - PrintRibbonsMonListIndex(structPtr); + PrintRibbonsMonListIndex(menu); return LT_INC_AND_CONTINUE; case 4: - PrintCurrentMonRibbonCount(structPtr); + PrintCurrentMonRibbonCount(menu); return LT_INC_AND_CONTINUE; case 5: if (!IsDma3ManagerBusyWithBgCopy()) { - SlideMonSpriteOn(structPtr); + SlideMonSpriteOn(menu); return LT_INC_AND_PAUSE; } return LT_PAUSE; case 6: - if (IsMonSpriteAnimating(structPtr)) + if (IsMonSpriteAnimating(menu)) return LT_PAUSE; } return LT_FINISH; @@ -706,17 +706,17 @@ static u32 LoopedTask_SwitchRibbonsSummaryMon(s32 state) static u32 LoopedTask_ExpandSelectedRibbon(s32 state) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); switch (state) { case 0: PlaySE(SE_SELECT); - UpdateAndZoomInSelectedRibbon(structPtr); + UpdateAndZoomInSelectedRibbon(menu); return LT_INC_AND_PAUSE; case 1: - if (!IsRibbonAnimating(structPtr)) + if (!IsRibbonAnimating(menu)) { - PrintRibbonNameAndDescription(structPtr); + PrintRibbonNameAndDescription(menu); PrintHelpBarText(HELPBAR_RIBBONS_CHECK); return LT_INC_AND_PAUSE; } @@ -730,24 +730,24 @@ static u32 LoopedTask_ExpandSelectedRibbon(s32 state) static u32 LoopedTask_MoveRibbonsCursorExpanded(s32 state) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); switch (state) { case 0: PlaySE(SE_SELECT); - ZoomOutSelectedRibbon(structPtr); + ZoomOutSelectedRibbon(menu); return LT_INC_AND_PAUSE; case 1: - if (!IsRibbonAnimating(structPtr)) + if (!IsRibbonAnimating(menu)) { - UpdateAndZoomInSelectedRibbon(structPtr); + UpdateAndZoomInSelectedRibbon(menu); return LT_INC_AND_PAUSE; } return LT_PAUSE; case 2: - if (!IsRibbonAnimating(structPtr)) + if (!IsRibbonAnimating(menu)) { - PrintRibbonNameAndDescription(structPtr); + PrintRibbonNameAndDescription(menu); return LT_INC_AND_PAUSE; } return LT_PAUSE; @@ -760,17 +760,17 @@ static u32 LoopedTask_MoveRibbonsCursorExpanded(s32 state) static u32 LoopedTask_ShrinkExpandedRibbon(s32 state) { - struct PokenavSub14 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); + struct Pokenav_RibbonsSummaryMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU); switch (state) { case 0: PlaySE(SE_SELECT); - ZoomOutSelectedRibbon(structPtr); + ZoomOutSelectedRibbon(menu); return LT_INC_AND_PAUSE; case 1: - if (!IsRibbonAnimating(structPtr)) + if (!IsRibbonAnimating(menu)) { - PrintCurrentMonRibbonCount(structPtr); + PrintCurrentMonRibbonCount(menu); PrintHelpBarText(HELPBAR_RIBBONS_LIST); return LT_INC_AND_PAUSE; } @@ -793,14 +793,14 @@ static const struct WindowTemplate sRibbonCountWindowTemplate = .baseBlock = 0x14, }; -static void AddRibbonCountWindow(struct PokenavSub14 *structPtr) +static void AddRibbonCountWindow(struct Pokenav_RibbonsSummaryMenu *menu) { - structPtr->ribbonCountWindowId = AddWindow(&sRibbonCountWindowTemplate); - PutWindowTilemap(structPtr->ribbonCountWindowId); - PrintCurrentMonRibbonCount(structPtr); + menu->ribbonCountWindowId = AddWindow(&sRibbonCountWindowTemplate); + PutWindowTilemap(menu->ribbonCountWindowId); + PrintCurrentMonRibbonCount(menu); } -static void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr) +static void PrintCurrentMonRibbonCount(struct Pokenav_RibbonsSummaryMenu *menu) { u8 color[] = {TEXT_COLOR_RED, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}; @@ -808,23 +808,23 @@ static void PrintCurrentMonRibbonCount(struct PokenavSub14 *structPtr) DynamicPlaceholderTextUtil_Reset(); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gText_RibbonsF700); - FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4)); - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, TEXT_SKIP_DRAW, gStringVar4); - CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX); + FillWindowPixelBuffer(menu->ribbonCountWindowId, PIXEL_FILL(4)); + AddTextPrinterParameterized3(menu->ribbonCountWindowId, FONT_NORMAL, 0, 1, color, TEXT_SKIP_DRAW, gStringVar4); + CopyWindowToVram(menu->ribbonCountWindowId, COPYWIN_GFX); } -static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) +static void PrintRibbonNameAndDescription(struct Pokenav_RibbonsSummaryMenu *menu) { s32 i; u32 ribbonId = GetRibbonId(); u8 color[] = {TEXT_COLOR_RED, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}; - FillWindowPixelBuffer(structPtr->ribbonCountWindowId, PIXEL_FILL(4)); + FillWindowPixelBuffer(menu->ribbonCountWindowId, PIXEL_FILL(4)); if (ribbonId < FIRST_GIFT_RIBBON) { // Print normal ribbon name/description for (i = 0; i < 2; i++) - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, TEXT_SKIP_DRAW, gRibbonDescriptionPointers[ribbonId][i]); + AddTextPrinterParameterized3(menu->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, TEXT_SKIP_DRAW, gRibbonDescriptionPointers[ribbonId][i]); } else { @@ -840,10 +840,10 @@ static void PrintRibbonNameAndDescription(struct PokenavSub14 *structPtr) // Print gift ribbon name/description ribbonId--; for (i = 0; i < 2; i++) - AddTextPrinterParameterized3(structPtr->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, TEXT_SKIP_DRAW, gGiftRibbonDescriptionPointers[ribbonId][i]); + AddTextPrinterParameterized3(menu->ribbonCountWindowId, FONT_NORMAL, 0, (i * 16) + 1, color, TEXT_SKIP_DRAW, gGiftRibbonDescriptionPointers[ribbonId][i]); } - CopyWindowToVram(structPtr->ribbonCountWindowId, COPYWIN_GFX); + CopyWindowToVram(menu->ribbonCountWindowId, COPYWIN_GFX); } static const struct WindowTemplate sRibbonSummaryMonNameWindowTemplate = @@ -857,23 +857,23 @@ static const struct WindowTemplate sRibbonSummaryMonNameWindowTemplate = .baseBlock = 0x54, }; -static void AddRibbonSummaryMonNameWindow(struct PokenavSub14 *structPtr) +static void AddRibbonSummaryMonNameWindow(struct Pokenav_RibbonsSummaryMenu *menu) { - structPtr->nameWindowId = AddWindow(&sRibbonSummaryMonNameWindowTemplate); - PutWindowTilemap(structPtr->nameWindowId); - PrintRibbbonsSummaryMonInfo(structPtr); + menu->nameWindowId = AddWindow(&sRibbonSummaryMonNameWindowTemplate); + PutWindowTilemap(menu->nameWindowId); + PrintRibbbonsSummaryMonInfo(menu); } static const u8 sMaleIconString[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GRAY}{WHITE}{LIGHT_GRAY}"); static const u8 sFemaleIconString[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GRAY}{WHITE}{LIGHT_GRAY}"); static const u8 sGenderlessIconString[] = _("{UNK_SPACER}"); -static void PrintRibbbonsSummaryMonInfo(struct PokenavSub14 *structPtr) +static void PrintRibbbonsSummaryMonInfo(struct Pokenav_RibbonsSummaryMenu *menu) { const u8 *genderTxt; u8 *txtPtr; u8 level, gender; - u16 windowId = structPtr->nameWindowId; + u16 windowId = menu->nameWindowId; FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); GetMonNicknameLevelGender(gStringVar3, &level, &gender); @@ -914,15 +914,15 @@ static const struct WindowTemplate sRibbonMonListIndexWindowTemplate[] = {}, }; -static void AddRibbonListIndexWindow(struct PokenavSub14 *structPtr) +static void AddRibbonListIndexWindow(struct Pokenav_RibbonsSummaryMenu *menu) { - structPtr->listIdxWindowId = AddWindow(sRibbonMonListIndexWindowTemplate); - FillWindowPixelBuffer(structPtr->listIdxWindowId, PIXEL_FILL(1)); - PutWindowTilemap(structPtr->listIdxWindowId); - PrintRibbonsMonListIndex(structPtr); + menu->listIdxWindowId = AddWindow(sRibbonMonListIndexWindowTemplate); + FillWindowPixelBuffer(menu->listIdxWindowId, PIXEL_FILL(1)); + PutWindowTilemap(menu->listIdxWindowId); + PrintRibbonsMonListIndex(menu); } -static void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr) +static void PrintRibbonsMonListIndex(struct Pokenav_RibbonsSummaryMenu *menu) { s32 x; u8 *txtPtr; @@ -933,24 +933,24 @@ static void PrintRibbonsMonListIndex(struct PokenavSub14 *structPtr) *(txtPtr++) = CHAR_SLASH; ConvertIntToDecimalStringN(txtPtr, count, STR_CONV_MODE_RIGHT_ALIGN, 3); x = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar1, 56); - AddTextPrinterParameterized(structPtr->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SKIP_DRAW, NULL); - CopyWindowToVram(structPtr->listIdxWindowId, COPYWIN_GFX); + AddTextPrinterParameterized(menu->listIdxWindowId, FONT_NORMAL, gStringVar1, x, 1, TEXT_SKIP_DRAW, NULL); + CopyWindowToVram(menu->listIdxWindowId, COPYWIN_GFX); } -static void ResetSpritesAndDrawMonFrontPic(struct PokenavSub14 *structPtr) +static void ResetSpritesAndDrawMonFrontPic(struct Pokenav_RibbonsSummaryMenu *menu) { u16 species; u32 personality, otId; GetMonSpeciesPersonalityOtId(&species, &personality, &otId); ResetAllPicSprites(); - structPtr->monSpriteId = DrawRibbonsMonFrontPic(MON_SPRITE_X_ON, MON_SPRITE_Y); + menu->monSpriteId = DrawRibbonsMonFrontPic(MON_SPRITE_X_ON, MON_SPRITE_Y); PokenavFillPalette(15, 0); } -static void DestroyRibbonsMonFrontPic(struct PokenavSub14 *structPtr) +static void DestroyRibbonsMonFrontPic(struct Pokenav_RibbonsSummaryMenu *menu) { - FreeAndDestroyMonPicSprite(structPtr->monSpriteId); + FreeAndDestroyMonPicSprite(menu->monSpriteId); } // x and y arguments are ignored @@ -967,25 +967,25 @@ static u16 DrawRibbonsMonFrontPic(s32 x, s32 y) return spriteId; } -static void SlideMonSpriteOff(struct PokenavSub14 *structPtr) +static void SlideMonSpriteOff(struct Pokenav_RibbonsSummaryMenu *menu) { - StartMonSpriteSlide(&gSprites[structPtr->monSpriteId], MON_SPRITE_X_ON, MON_SPRITE_X_OFF, 6); + StartMonSpriteSlide(&gSprites[menu->monSpriteId], MON_SPRITE_X_ON, MON_SPRITE_X_OFF, 6); } -static void SlideMonSpriteOn(struct PokenavSub14 *structPtr) +static void SlideMonSpriteOn(struct Pokenav_RibbonsSummaryMenu *menu) { // Switch to new mon sprite - FreeAndDestroyMonPicSprite(structPtr->monSpriteId); - structPtr->monSpriteId = DrawRibbonsMonFrontPic(MON_SPRITE_X_OFF, MON_SPRITE_Y); + FreeAndDestroyMonPicSprite(menu->monSpriteId); + menu->monSpriteId = DrawRibbonsMonFrontPic(MON_SPRITE_X_OFF, MON_SPRITE_Y); // Slide on - StartMonSpriteSlide(&gSprites[structPtr->monSpriteId], MON_SPRITE_X_OFF, MON_SPRITE_X_ON, 6); + StartMonSpriteSlide(&gSprites[menu->monSpriteId], MON_SPRITE_X_OFF, MON_SPRITE_X_ON, 6); } // Is Pokémon summary sprite still sliding off/on -static bool32 IsMonSpriteAnimating(struct PokenavSub14 *structPtr) +static bool32 IsMonSpriteAnimating(struct Pokenav_RibbonsSummaryMenu *menu) { - return (gSprites[structPtr->monSpriteId].callback != SpriteCallbackDummy); + return (gSprites[menu->monSpriteId].callback != SpriteCallbackDummy); } #define sCurrX data[0] @@ -1030,7 +1030,7 @@ static void SpriteCB_MonSpriteSlide(struct Sprite *sprite) #undef sTime #undef sDestX -static void DrawAllRibbonsSmall(struct PokenavSub14 *structPtr) +static void DrawAllRibbonsSmall(struct Pokenav_RibbonsSummaryMenu *menu) { u32 *ribbonIds; @@ -1211,7 +1211,7 @@ static const struct SpriteTemplate sSpriteTemplate_RibbonIconBig = }; // Create dummy sprite to be used for the zoomed in version of the selected ribbon -static void CreateBigRibbonSprite(struct PokenavSub14 *structPtr) +static void CreateBigRibbonSprite(struct Pokenav_RibbonsSummaryMenu *menu) { u8 spriteId; @@ -1219,45 +1219,45 @@ static void CreateBigRibbonSprite(struct PokenavSub14 *structPtr) Pokenav_AllocAndLoadPalettes(sSpritePalettes_RibbonIcons); spriteId = CreateSprite(&sSpriteTemplate_RibbonIconBig, 0, 0, 0); - structPtr->bigRibbonSprite = &gSprites[spriteId]; - structPtr->bigRibbonSprite->invisible = TRUE; + menu->bigRibbonSprite = &gSprites[spriteId]; + menu->bigRibbonSprite->invisible = TRUE; } #define sInvisibleWhenDone data[0] -static void UpdateAndZoomInSelectedRibbon(struct PokenavSub14 *structPtr) +static void UpdateAndZoomInSelectedRibbon(struct Pokenav_RibbonsSummaryMenu *menu) { u32 ribbonId; s32 position = GetSelectedPosition(); s32 x = (position % RIBBONS_PER_ROW) * 16 + 96; s32 y = (position / RIBBONS_PER_ROW) * 16 + 40; - structPtr->bigRibbonSprite->x = x; - structPtr->bigRibbonSprite->y = y; + menu->bigRibbonSprite->x = x; + menu->bigRibbonSprite->y = y; // Set new selected ribbon's gfx data ribbonId = GetRibbonId(); - structPtr->bigRibbonSprite->oam.tileNum = (sRibbonGfxData[ribbonId].tileNumOffset * 16) + GetSpriteTileStartByTag(GFXTAG_RIBBON_ICONS_BIG); - structPtr->bigRibbonSprite->oam.paletteNum = IndexOfSpritePaletteTag(sRibbonGfxData[ribbonId].palNumOffset + PALTAG_RIBBON_ICONS_1); + menu->bigRibbonSprite->oam.tileNum = (sRibbonGfxData[ribbonId].tileNumOffset * 16) + GetSpriteTileStartByTag(GFXTAG_RIBBON_ICONS_BIG); + menu->bigRibbonSprite->oam.paletteNum = IndexOfSpritePaletteTag(sRibbonGfxData[ribbonId].palNumOffset + PALTAG_RIBBON_ICONS_1); // Start zoom in animation - StartSpriteAffineAnim(structPtr->bigRibbonSprite, RIBBONANIM_ZOOM_IN); - structPtr->bigRibbonSprite->invisible = FALSE; - structPtr->bigRibbonSprite->sInvisibleWhenDone = FALSE; - structPtr->bigRibbonSprite->callback = SpriteCB_WaitForRibbonAnimation; + StartSpriteAffineAnim(menu->bigRibbonSprite, RIBBONANIM_ZOOM_IN); + menu->bigRibbonSprite->invisible = FALSE; + menu->bigRibbonSprite->sInvisibleWhenDone = FALSE; + menu->bigRibbonSprite->callback = SpriteCB_WaitForRibbonAnimation; } // Start animation to zoom out of selected ribbon -static void ZoomOutSelectedRibbon(struct PokenavSub14 *structPtr) +static void ZoomOutSelectedRibbon(struct Pokenav_RibbonsSummaryMenu *menu) { - structPtr->bigRibbonSprite->sInvisibleWhenDone = TRUE; - StartSpriteAffineAnim(structPtr->bigRibbonSprite, RIBBONANIM_ZOOM_OUT); - structPtr->bigRibbonSprite->callback = SpriteCB_WaitForRibbonAnimation; + menu->bigRibbonSprite->sInvisibleWhenDone = TRUE; + StartSpriteAffineAnim(menu->bigRibbonSprite, RIBBONANIM_ZOOM_OUT); + menu->bigRibbonSprite->callback = SpriteCB_WaitForRibbonAnimation; } -static bool32 IsRibbonAnimating(struct PokenavSub14 *structPtr) +static bool32 IsRibbonAnimating(struct Pokenav_RibbonsSummaryMenu *menu) { - return (structPtr->bigRibbonSprite->callback != SpriteCallbackDummy); + return (menu->bigRibbonSprite->callback != SpriteCallbackDummy); } static void SpriteCB_WaitForRibbonAnimation(struct Sprite *sprite) diff --git a/sym_bss.txt b/sym_bss.txt index 3166aee455..8724f02d7f 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -51,7 +51,7 @@ .include "src/mirage_tower.o" .include "src/berry_fix_program.o" .include "src/pokenav_conditions_2.o" - .include "src/pokenav_ribbons_2.o" + .include "src/pokenav_ribbons_summary.o" .include "src/ereader_helpers.o" .include "src/faraway_island.o" .include "src/m4a_1.o" From 342b7da5d36460bb5780ea60da4b6b5be46ddc38 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 10 Nov 2021 11:59:15 -0500 Subject: [PATCH 161/417] Fix CRY_MODE_ECHO --- include/constants/sound.h | 4 ++-- src/battle_anim_sound_tasks.c | 6 +++--- src/sound.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/constants/sound.h b/include/constants/sound.h index 40c3b7d58f..dc434bcf8a 100644 --- a/include/constants/sound.h +++ b/include/constants/sound.h @@ -24,9 +24,9 @@ #define CRY_MODE_DOUBLES 1 // Shortened cry for double battles #define CRY_MODE_ENCOUNTER 2 // Used when starting a static encounter, or when a Pokémon is "aggressive" #define CRY_MODE_HIGH_PITCH 3 // Highest pitch mode, used exclusively by the move Howl -#define CRY_MODE_ECHO_END 4 // For 2nd cry used by the move Hyper Voice. Played in reverse +#define CRY_MODE_ECHO_START 4 // For 1st half of cry used by the move Hyper Voice. Played in reverse #define CRY_MODE_FAINT 5 // Used when a Pokémon faints -#define CRY_MODE_ECHO_START 6 // For 1st cry used by the move Hyper Voice +#define CRY_MODE_ECHO_END 6 // For 2nd half of cry used by the move Hyper Voice #define CRY_MODE_ROAR_1 7 // For 1st cry used by the move Roar #define CRY_MODE_ROAR_2 8 // For 2nd cry used by the move Roar #define CRY_MODE_GROWL_1 9 // For 1st cry used by the move Growl. Played in reverse diff --git a/src/battle_anim_sound_tasks.c b/src/battle_anim_sound_tasks.c index 7180041b32..6b14d38631 100644 --- a/src/battle_anim_sound_tasks.c +++ b/src/battle_anim_sound_tasks.c @@ -312,7 +312,7 @@ static void SoundTask_PlayCryWithEcho_Step(u8 taskId) switch (gTasks[taskId].tState) { case 2: - PlayCry_DuckNoRestore(species, pan, CRY_MODE_ECHO_END); + PlayCry_DuckNoRestore(species, pan, CRY_MODE_ECHO_START); gTasks[taskId].tState++; break; case 1: @@ -329,9 +329,9 @@ static void SoundTask_PlayCryWithEcho_Step(u8 taskId) break; default: if (!gTasks[taskId].tLastCry) - PlayCry_DuckNoRestore(species, pan, CRY_MODE_ECHO_START); + PlayCry_DuckNoRestore(species, pan, CRY_MODE_ECHO_END); else - PlayCry_ByMode(species, pan, CRY_MODE_ECHO_START); + PlayCry_ByMode(species, pan, CRY_MODE_ECHO_END); DestroyAnimVisualTask(taskId); break; diff --git a/src/sound.c b/src/sound.c index c2a8c9e8c8..ad9993b546 100644 --- a/src/sound.c +++ b/src/sound.c @@ -406,7 +406,7 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) chorus = 20; volume = 90; break; - case CRY_MODE_ECHO_END: + case CRY_MODE_ECHO_START: length = 25; reverse = TRUE; release = 100; @@ -418,7 +418,7 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) release = 200; pitch = 14440; break; - case CRY_MODE_ECHO_START: + case CRY_MODE_ECHO_END: release = 220; pitch = 15555; chorus = 192; From 57be596ce43bed86594412d598d3058c4a3d1d2d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 10 Nov 2021 13:14:11 -0500 Subject: [PATCH 162/417] Fix calcrom partial doc becoming negative --- .github/calcrom/calcrom.pl | 6 +++--- src/dodrio_berry_picking.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/calcrom/calcrom.pl b/.github/calcrom/calcrom.pl index c351c76122..37ebcb4d20 100755 --- a/.github/calcrom/calcrom.pl +++ b/.github/calcrom/calcrom.pl @@ -63,14 +63,14 @@ while (my $line = <$file>) # though. Uniq is pretty fast! my $base_cmd = "nm $elffname | awk '{print \$3}' | grep '^[^_].\\{4\\}' | uniq"; -# This looks for Unknown_, Unknown_, or sub_, followed by just numbers. Note that +# This looks for Unknown_, Unknown_, or sub_, followed by an address. Note that # it matches even if stuff precedes the unknown, like sUnknown/gUnknown. -my $undoc_cmd = "grep '[Uu]nknown_[0-9a-fA-F]*\\|sub_[0-9a-fA-F]*'"; +my $undoc_cmd = "grep '[Uu]nknown_[0-9a-fA-F]\\{5,7\\}\\|sub_[0-9a-fA-F]\\{5,7\\}'"; # This looks for every symbol with an address at the end of it. Some things are # given a name based on their type / location, but still have an unknown purpose. # For example, FooMap_EventScript_FFFFFFF. -my $partial_doc_cmd = "grep '_[0-28][0-9a-fA-F]\\{5,6\\}'"; +my $partial_doc_cmd = "grep '_[0-28][0-9a-fA-F]\\{5,7\\}'"; my $count_cmd = "wc -l"; diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 838e8ed945..d343876fc4 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -3056,16 +3056,16 @@ static const u16 sDebug_BerryResults[MAX_RFU_PLAYERS][4] = }; static const u8 sJPText_Vowels[] = _("あいうえおかき"); -static const u8 sText_ABCDEFG[] = _("ABCDEFG"); -static const u8 sText_0123456[] = _("0123456"); +static const u8 sText_Letters[] = _("ABCDEFG"); +static const u8 sText_Digits[] = _("0123456"); static const u8 *const sDebug_PlayerNames[] = { sJPText_Vowels, sJPText_Vowels, sJPText_Vowels, - sText_ABCDEFG, - sText_0123456 + sText_Letters, + sText_Digits }; static void Debug_UpdateNumPlayers(void) From 343ac990496dd4adb551bb15001f5fb1845666cb Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Nov 2021 20:02:12 -0500 Subject: [PATCH 163/417] Start pokenav conditions doc --- .../{8623228.png => condition/graph_data.png} | Bin include/constants/pokemon.h | 4 +- include/gba/defines.h | 1 - include/menu_specialized.h | 60 +++- include/pokenav.h | 16 +- src/menu_specialized.c | 276 ++++++++---------- src/pokenav_conditions_1.c | 191 ++++++------ src/pokenav_conditions_2.c | 182 ++++++------ src/pokenav_menu_handler_2.c | 8 +- src/use_pokeblock.c | 164 +++++------ 10 files changed, 453 insertions(+), 449 deletions(-) rename graphics/pokenav/{8623228.png => condition/graph_data.png} (100%) diff --git a/graphics/pokenav/8623228.png b/graphics/pokenav/condition/graph_data.png similarity index 100% rename from graphics/pokenav/8623228.png rename to graphics/pokenav/condition/graph_data.png diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 827725fc29..af5d0ea8a5 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -270,7 +270,9 @@ #define FRIENDSHIP_EVENT_FAINT_FIELD_PSN 7 #define FRIENDSHIP_EVENT_FAINT_LARGE 8 // If opponent was >= 30 levels higher. See AdjustFriendshipOnBattleFaint -#define MAX_FRIENDSHIP 0xFF +#define MAX_FRIENDSHIP 255 +#define MAX_SHEEN 255 +#define MAX_CONDITION 255 #define MAX_PER_STAT_IVS 31 #define MAX_IV_MASK 31 diff --git a/include/gba/defines.h b/include/gba/defines.h index ad06aaad2d..c52d7ef4f9 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -6,7 +6,6 @@ #define TRUE 1 #define FALSE 0 -#define BSS_DATA __attribute__((section(".bss"))) #define IWRAM_DATA __attribute__((section("iwram_data"))) #define EWRAM_DATA __attribute__((section("ewram_data"))) #define UNUSED __attribute__((unused)) diff --git a/include/menu_specialized.h b/include/menu_specialized.h index c29110662b..2f212b5d69 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -7,14 +7,24 @@ #include "pokemon.h" #include "constants/berry.h" -#define TAG_CONDITION_MON 100 -#define TAG_CONDITION_BALL 101 -#define TAG_CONDITION_CANCEL 102 -#define TAG_CONDITION_BALL_PLACEHOLDER 103 -#define TAG_CONDITION_SPARKLE 104 +enum { + TAG_CONDITION_MON = 100, + TAG_CONDITION_BALL, + TAG_CONDITION_CANCEL, + TAG_CONDITION_BALL_PLACEHOLDER, + TAG_CONDITION_SPARKLE, + TAG_CONDITION_MON_MARKINGS, + TAG_CONDITION_MARKINGS_MENU, + TAG_CONDITION_MARKINGS_MENU_2, // Used implicitly by CreateMonMarkingsMenuSprites +}; + #define MAX_CONDITION_SPARKLES 10 +// The number of extra sparkles shown on a Pokémon's condition screen. +// All Pokémon start with 1, so the max here is MAX_CONDITION_SPARKLES - 1 +#define GET_NUM_CONDITION_SPARKLES(sheen)((sheen) != MAX_SHEEN) ? (sheen) / ((u32)MAX_SHEEN / (MAX_CONDITION_SPARKLES - 1) + 1) : MAX_CONDITION_SPARKLES - 1; + // Window IDs for the Player PC Mailbox enum { MAILBOXWIN_TITLE, @@ -29,17 +39,35 @@ struct UnknownSubStruct_81D1ED4 u16 unk2; }; +#define CONDITION_GRAPH_CENTER_X 155 +#define CONDITION_GRAPH_TOP_Y 56 +#define CONDITION_GRAPH_BOTTOM_Y 121 +#define CONDITION_GRAPH_HEIGHT (CONDITION_GRAPH_BOTTOM_Y - CONDITION_GRAPH_TOP_Y + 1) +#define CONDITION_GRAPH_UNK_1 10 +#define CONDITION_GRAPH_UNK_2 9 +#define CONDITION_GRAPH_UNK 91 + +// Equivalent to flavor and contest values, but in a different order. +enum { + CONDITION_COOL, + CONDITION_TOUGH, + CONDITION_SMART, + CONDITION_CUTE, + CONDITION_BEAUTY, + CONDITION_COUNT +}; + struct ConditionGraph { - /*0x000*/ u8 stat[4][FLAVOR_COUNT]; - /*0x014*/ struct UnknownSubStruct_81D1ED4 unk14[4][FLAVOR_COUNT]; - /*0x064*/ struct UnknownSubStruct_81D1ED4 unk64[10][FLAVOR_COUNT]; - /*0x12C*/ struct UnknownSubStruct_81D1ED4 unk12C[FLAVOR_COUNT]; - /*0x140*/ u16 unk140[66][2]; - /*0x248*/ u16 unk248[66][2]; + /*0x000*/ u8 conditions[4][CONDITION_COUNT]; + /*0x014*/ struct UnknownSubStruct_81D1ED4 unk14[4][CONDITION_COUNT]; + /*0x064*/ struct UnknownSubStruct_81D1ED4 unk64[CONDITION_GRAPH_UNK_1][CONDITION_COUNT]; + /*0x12C*/ struct UnknownSubStruct_81D1ED4 unk12C[CONDITION_COUNT]; + /*0x140*/ u16 scanlineRight[CONDITION_GRAPH_HEIGHT][2]; + /*0x248*/ u16 scanlineLeft[CONDITION_GRAPH_HEIGHT][2]; /*0x350*/ u16 unk350; /*0x352*/ u16 unk352; - /*0x354*/ u8 unk354; + /*0x354*/ bool8 unk354; /*0x355*/ u8 state; }; @@ -49,13 +77,13 @@ u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page); void MailboxMenu_AddScrollArrows(struct PlayerPCItemPageStruct *page); void MailboxMenu_Free(void); void MailboxMenu_RemoveWindow(u8 windowIdx); -void InitConditionGraphData(struct ConditionGraph *graph); +void ConditionGraph_Init(struct ConditionGraph *graph); void sub_81D2108(struct ConditionGraph *graph); void SetConditionGraphIOWindows(u8 bg); void InitConditionGraphState(struct ConditionGraph *graph); void sub_81D2230(struct ConditionGraph *graph); bool8 SetupConditionGraphScanlineParams(struct ConditionGraph *graph); -bool32 TransitionConditionGraph(struct ConditionGraph *graph); +bool8 TransitionConditionGraph(struct ConditionGraph *graph); void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); void MoveRelearnerPrintText(u8 *str); @@ -69,8 +97,8 @@ void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *sheen, u16 void GetConditionMenuMonGfx(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 partyId, u16 numMons, bool8 excludesCancel); bool8 MoveConditionMonOnscreen(s16 *x); bool8 MoveConditionMonOffscreen(s16 *x); -bool8 TryUpdateConditionMonTransitionOn(struct ConditionGraph *graph, s16 *x); -bool8 TryUpdateConditionMonTransitionOff(struct ConditionGraph *graph, s16 *x); +bool8 ConditionGraph_UpdateMonEnter(struct ConditionGraph *graph, s16 *x); +bool8 ConditionGraph_UpdateMonExit(struct ConditionGraph *graph, s16 *x); void LoadConditionMonPicTemplate(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal); void LoadConditionSelectionIcons(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals); void LoadConditionSparkle(struct SpriteSheet *sheet, struct SpritePalette *pal); diff --git a/include/pokenav.h b/include/pokenav.h index b1c73056d4..445ce752be 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -256,6 +256,14 @@ enum PartyConditionFuncIds PARTY_CONDITION_FUNC_CLOSE_MARKINGS, }; +enum +{ + CONDITION_MON_0, + CONDITION_MON_1, + CONDITION_MON_2, + NUM_CONDITION_MONS +}; + #define POKENAV_MENU_FUNC_EXIT -1 enum @@ -432,11 +440,11 @@ bool32 IsConditionMenuSearchMode(void); struct ConditionGraph *GetConditionGraphDataPtr(void); u16 GetConditionGraphCurrentMonIndex(void); u16 GetMonListCount(void); -u8 GetMonSheen(void); -bool32 SetConditionGraphData(u8 arg0); +u8 GetNumConditionMonSparkles(void); +bool32 SetConditionGraphData(u8 mode); u8 TryGetMonMarkId(void); -u8 *GetConditionMonNameBuffer(u8 id); -u8 *GetConditionMonLocationBuffer(u8 id); +u8 *GetConditionMonNameText(u8 id); +u8 *GetConditionMonLocationText(u8 id); u16 GetConditionMonDataBuffer(void); void *GetConditionMonPicGfx(u8 id); void *GetConditionMonPal(u8 id); diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 3a6a60885d..abeaba2c95 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -31,14 +31,14 @@ extern const struct CompressedSpriteSheet gMonFrontPicTable[]; EWRAM_DATA static u8 sMailboxWindowIds[MAILBOXWIN_COUNT] = {0}; EWRAM_DATA static struct ListMenuItem *sMailboxList = NULL; -static void MailboxMenu_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list); -static void sub_81D24A4(struct ConditionGraph *a0); -static void sub_81D2634(struct ConditionGraph *a0); -static void MoveRelearnerCursorCallback(s32 itemIndex, bool8 onInit, struct ListMenu *list); -static void nullsub_79(void); -static void SetNextConditionSparkle(struct Sprite *sprite); -static void SpriteCB_ConditionSparkle(struct Sprite *sprite); -static void ShowAllConditionSparkles(struct Sprite *sprite); +static void MailboxMenu_MoveCursorFunc(s32, bool8, struct ListMenu *); +static void sub_81D24A4(struct ConditionGraph *); +static void sub_81D2634(struct ConditionGraph *); +static void MoveRelearnerCursorCallback(s32, bool8, struct ListMenu *); +static void MoveRelearnerDummy(void); +static void SetNextConditionSparkle(struct Sprite *); +static void SpriteCB_ConditionSparkle(struct Sprite *); +static void ShowAllConditionSparkles(struct Sprite *); static const struct WindowTemplate sWindowTemplates_MailboxMenu[MAILBOXWIN_COUNT] = { @@ -80,46 +80,29 @@ static const u8 sEmptyItemName[] = _(""); static const struct ScanlineEffectParams sConditionGraphScanline = { - .dmaDest = (void*)REG_ADDR_WIN0H, + .dmaDest = ®_WIN0H, .dmaControl = SCANLINE_EFFECT_DMACNT_32BIT, .initState = 1, }; -static const u8 sUnknown_08625410[] = +static const u8 sUnknown_08625410[MAX_CONDITION + 1] = { - 4, - 5, - 6, - 7, - 8, - 9, 9, - 10, 10, - 0xB, 0xB, - 0xC, 0xC, - 0xD, 0xD, - 0xD, 0xD, - 0xE, 0xE, 0xE, 0xE, - 0xF, 0xF, 0xF, 0xF, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, - 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, - 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, - 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, - 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, - 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, - 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, - 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, - 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, - 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, - 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, - 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x23 + 4, 5, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 13, + 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, + 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, + 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, + 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35 }; @@ -320,29 +303,29 @@ void MailboxMenu_Free(void) Free(sMailboxList); } -void InitConditionGraphData(struct ConditionGraph *graph) +void ConditionGraph_Init(struct ConditionGraph *graph) { u8 i, j; - for (j = 0; j < FLAVOR_COUNT; j++) + for (j = 0; j < CONDITION_COUNT; j++) { - for (i = 0; i < 10; i++) + for (i = 0; i < CONDITION_GRAPH_UNK_1; i++) { graph->unk64[i][j].unk0 = 0; graph->unk64[i][j].unk2 = 0; } for (i = 0; i < 4; i++) { - graph->stat[i][j] = 0; - graph->unk14[i][j].unk0 = 155; - graph->unk14[i][j].unk2 = 91; + graph->conditions[i][j] = 0; + graph->unk14[i][j].unk0 = CONDITION_GRAPH_CENTER_X; + graph->unk14[i][j].unk2 = CONDITION_GRAPH_UNK; } graph->unk12C[j].unk0 = 0; graph->unk12C[j].unk2 = 0; } - graph->unk354 = 0; + graph->unk354 = FALSE; graph->unk352 = 0; } @@ -351,11 +334,11 @@ void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 * u16 i, j; s32 r5, r6; - for (i = 0; i < FLAVOR_COUNT; i++) + for (i = 0; i < CONDITION_COUNT; i++) { r5 = arg1[i].unk0 << 8; - r6 = ((arg2[i].unk0 - arg1[i].unk0) << 8) / 10; - for (j = 0; j < 9; j++) + r6 = ((arg2[i].unk0 - arg1[i].unk0) << 8) / CONDITION_GRAPH_UNK_1; + for (j = 0; j < CONDITION_GRAPH_UNK_2; j++) { graph->unk64[j][i].unk0 = (r5 >> 8) + ((r5 >> 7) & 1); r5 += r6; @@ -363,8 +346,8 @@ void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 * graph->unk64[j][i].unk0 = arg2[i].unk0; r5 = arg1[i].unk2 << 8; - r6 = ((arg2[i].unk2 - arg1[i].unk2) << 8) / 10; - for (j = 0; j < 9; j++) + r6 = ((arg2[i].unk2 - arg1[i].unk2) << 8) / CONDITION_GRAPH_UNK_1; + for (j = 0; j < CONDITION_GRAPH_UNK_2; j++) { graph->unk64[j][i].unk2 = (r5 >> 8) + ((r5 >> 7) & 1); r5 += r6; @@ -375,12 +358,12 @@ void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 * graph->unk352 = 0; } -bool32 TransitionConditionGraph(struct ConditionGraph *graph) +bool8 TransitionConditionGraph(struct ConditionGraph *graph) { - if (graph->unk352 < 10) + if (graph->unk352 < CONDITION_GRAPH_UNK_1) { sub_81D2230(graph); - return (++graph->unk352 != 10); + return (++graph->unk352 != CONDITION_GRAPH_UNK_1); } else { @@ -417,35 +400,36 @@ void sub_81D2108(struct ConditionGraph *graph) { u16 i; - if (graph->unk354 == 0) + if (!graph->unk354) return; sub_81D24A4(graph); sub_81D2634(graph); - for (i = 0; i < 66; i++) + for (i = 0; i < CONDITION_GRAPH_HEIGHT; i++) { - gScanlineEffectRegBuffers[1][(i + 55) * 2] = gScanlineEffectRegBuffers[0][(i + 55) * 2] = (graph->unk140[i][0] << 8) | (graph->unk140[i][1]); - gScanlineEffectRegBuffers[1][(i + 55) * 2 + 1] = gScanlineEffectRegBuffers[0][(i + 55) * 2 + 1] = (graph->unk248[i][0] << 8) | (graph->unk248[i][1]); + gScanlineEffectRegBuffers[1][(i + 55) * 2] = gScanlineEffectRegBuffers[0][(i + 55) * 2] = (graph->scanlineRight[i][0] << 8) | (graph->scanlineRight[i][1]); + gScanlineEffectRegBuffers[1][(i + 55) * 2 + 1] = gScanlineEffectRegBuffers[0][(i + 55) * 2 + 1] = (graph->scanlineLeft[i][0] << 8) | (graph->scanlineLeft[i][1]); } - graph->unk354 = 0; + graph->unk354 = FALSE; } void SetConditionGraphIOWindows(u8 bg) { u32 flags; - if (bg > 3) + if (bg >= NUM_BACKGROUNDS) bg = 0; // Unset the WINOUT flag for the bg. flags = (WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ) & ~(1 << bg); - SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE( 0, DISPLAY_WIDTH)); - SetGpuReg(REG_OFFSET_WIN1H, WIN_RANGE( 0, 155)); - SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(56, 121)); - SetGpuReg(REG_OFFSET_WIN1V, WIN_RANGE(56, 121)); + // Set limits for graph data + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE( 0, DISPLAY_WIDTH)); // Right side horizontal + SetGpuReg(REG_OFFSET_WIN1H, WIN_RANGE( 0, CONDITION_GRAPH_CENTER_X)); // Left side horizontal + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(CONDITION_GRAPH_TOP_Y, CONDITION_GRAPH_BOTTOM_Y)); // Right side vertical + SetGpuReg(REG_OFFSET_WIN1V, WIN_RANGE(CONDITION_GRAPH_TOP_Y, CONDITION_GRAPH_BOTTOM_Y)); // Left side vertical SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); SetGpuReg(REG_OFFSET_WINOUT, flags); } @@ -453,19 +437,18 @@ void SetConditionGraphIOWindows(u8 bg) void sub_81D2230(struct ConditionGraph *graph) { u16 i; - for (i = 0; i < FLAVOR_COUNT; i++) + for (i = 0; i < CONDITION_COUNT; i++) graph->unk12C[i] = graph->unk64[graph->unk352][i]; - graph->unk354 = 1; + graph->unk354 = TRUE; } static void sub_81D2278(struct ConditionGraph *graph, u16 *arg1, struct UnknownSubStruct_81D1ED4 *arg2, struct UnknownSubStruct_81D1ED4 *arg3, u8 arg4, u16 *arg5) { u16 i, r8, r10, r0, var_30; u16 *ptr; - s32 r4, var_2C; + s32 r4, var_2C = 0; - var_2C = 0; if (arg2->unk2 < arg3->unk2) { r10 = arg2->unk2; @@ -490,7 +473,7 @@ static void sub_81D2278(struct ConditionGraph *graph, u16 *arg1, struct UnknownS r8++; if (arg5 == NULL) { - arg1 += (r10 - 56) * 2; + arg1 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; for (i = 0; i < r8; i++) { arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4; @@ -502,16 +485,16 @@ static void sub_81D2278(struct ConditionGraph *graph, u16 *arg1, struct UnknownS } else if (var_2C > 0) { - arg5 += (r10 - 56) * 2; + arg5 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; // Less readable than the other loops, but it has to be written this way to match. for (i = 0; i < r8; arg5[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4, r4 += var_2C, arg5 += 2, i++) { - if (r4 >= (155 << 10)) + if (r4 >= (CONDITION_GRAPH_CENTER_X << 10)) break; } graph->unk350 = r10 + i; - arg1 += (graph->unk350 - 56) * 2; + arg1 += (graph->unk350 - CONDITION_GRAPH_TOP_Y) * 2; for (; i < r8; i++) { arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4; @@ -523,13 +506,13 @@ static void sub_81D2278(struct ConditionGraph *graph, u16 *arg1, struct UnknownS } else if (var_2C < 0) { - arg1 += (r10 - 56) * 2; + arg1 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; for (i = 0; i < r8; i++) { arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4; - if (r4 < (155 << 10)) + if (r4 < (CONDITION_GRAPH_CENTER_X << 10)) { - arg1[arg4] = 155; + arg1[arg4] = CONDITION_GRAPH_CENTER_X; break; } r4 += var_2C; @@ -537,7 +520,7 @@ static void sub_81D2278(struct ConditionGraph *graph, u16 *arg1, struct UnknownS } graph->unk350 = r10 + i; - arg5 += (graph->unk350 - 56) * 2; + arg5 += (graph->unk350 - CONDITION_GRAPH_TOP_Y) * 2; for (; i < r8; i++) { arg5[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4; @@ -550,11 +533,11 @@ static void sub_81D2278(struct ConditionGraph *graph, u16 *arg1, struct UnknownS else { graph->unk350 = r10; - arg1 += (r10 - 56) * 2; - arg5 += (r10 - 56) * 2; + arg1 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; + arg5 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; arg1[1] = arg2->unk0 + 1; arg5[0] = arg3->unk0; - arg5[1] = 155; + arg5[1] = CONDITION_GRAPH_CENTER_X; return; } @@ -568,38 +551,38 @@ static void sub_81D24A4(struct ConditionGraph *graph) if (graph->unk12C[0].unk2 < graph->unk12C[1].unk2) { r6 = graph->unk12C[0].unk2; - sub_81D2278(graph, graph->unk140[0], &graph->unk12C[0], &graph->unk12C[1], 1, NULL); + sub_81D2278(graph, graph->scanlineRight[0], &graph->unk12C[0], &graph->unk12C[1], 1, NULL); } else { r6 = graph->unk12C[1].unk2; - sub_81D2278(graph, graph->unk140[0], &graph->unk12C[1], &graph->unk12C[0], 0, NULL); + sub_81D2278(graph, graph->scanlineRight[0], &graph->unk12C[1], &graph->unk12C[0], 0, NULL); } - sub_81D2278(graph, graph->unk140[0], &graph->unk12C[1], &graph->unk12C[2], 1, NULL); + sub_81D2278(graph, graph->scanlineRight[0], &graph->unk12C[1], &graph->unk12C[2], 1, NULL); i = (graph->unk12C[2].unk2 <= graph->unk12C[3].unk2); - sub_81D2278(graph, graph->unk140[0], &graph->unk12C[2], &graph->unk12C[3], i, graph->unk248[0]); - for (i = 56; i < r6; i++) + sub_81D2278(graph, graph->scanlineRight[0], &graph->unk12C[2], &graph->unk12C[3], i, graph->scanlineLeft[0]); + for (i = CONDITION_GRAPH_TOP_Y; i < r6; i++) { - graph->unk140[i - 56][0] = 0; - graph->unk140[i - 56][1] = 0; + graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] = 0; + graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][1] = 0; } for (i = graph->unk12C[0].unk2; i <= graph->unk350; i++) - graph->unk140[i - 56][0] = 155; + graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] = CONDITION_GRAPH_CENTER_X; varMax = max(graph->unk350, graph->unk12C[2].unk2); - for (i = varMax + 1; i < 122; i++) + for (i = varMax + 1; i <= CONDITION_GRAPH_BOTTOM_Y; i++) { - graph->unk140[i - 56][0] = 0; - graph->unk140[i - 56][1] = 0; + graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] = 0; + graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][1] = 0; } - for (i = 56; i < 122; i++) + for (i = CONDITION_GRAPH_TOP_Y; i <= CONDITION_GRAPH_BOTTOM_Y; i++) { - if (graph->unk140[i - 56][0] == 0 && graph->unk140[i - 56][1] != 0) - graph->unk140[i - 56][0] = 155; + if (graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] == 0 && graph->scanlineRight[i - 56][1] != 0) + graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] = CONDITION_GRAPH_CENTER_X; } } @@ -610,69 +593,69 @@ static void sub_81D2634(struct ConditionGraph *graph) if (graph->unk12C[0].unk2 < graph->unk12C[4].unk2) { r6 = graph->unk12C[0].unk2; - sub_81D2278(graph, graph->unk248[0], &graph->unk12C[0], &graph->unk12C[4], 0, NULL); + sub_81D2278(graph, graph->scanlineLeft[0], &graph->unk12C[0], &graph->unk12C[4], 0, NULL); } else { r6 = graph->unk12C[4].unk2; - sub_81D2278(graph, graph->unk248[0], &graph->unk12C[4], &graph->unk12C[0], 1, NULL); + sub_81D2278(graph, graph->scanlineLeft[0], &graph->unk12C[4], &graph->unk12C[0], 1, NULL); } - sub_81D2278(graph, graph->unk248[0], &graph->unk12C[4], &graph->unk12C[3], 0, NULL); + sub_81D2278(graph, graph->scanlineLeft[0], &graph->unk12C[4], &graph->unk12C[3], 0, NULL); - for (i = 56; i < r6; i++) + for (i = CONDITION_GRAPH_TOP_Y; i < r6; i++) { - graph->unk140[i + 10][0] = 0; - graph->unk140[i + 10][1] = 0; + graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][0] = 0; + graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][1] = 0; } for (i = graph->unk12C[0].unk2; i <= graph->unk350; i++) - graph->unk140[i + 10][1] = 155; + graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][1] = CONDITION_GRAPH_CENTER_X; varMax = max(graph->unk350, graph->unk12C[3].unk2 + 1); - for (i = varMax; i < 122; i++) + for (i = varMax; i <= CONDITION_GRAPH_BOTTOM_Y; i++) { - graph->unk140[i + 10][0] = 0; - graph->unk140[i + 10][1] = 0; + graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][0] = 0; + graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][1] = 0; } - for (i = 0; i < 66; i++) + for (i = 0; i < CONDITION_GRAPH_HEIGHT; i++) { - if (graph->unk248[i][0] >= graph->unk248[i][1]) + if (graph->scanlineLeft[i][0] >= graph->scanlineLeft[i][1]) { - graph->unk248[i][1] = 0; - graph->unk248[i][0] = 0; + graph->scanlineLeft[i][1] = 0; + graph->scanlineLeft[i][0] = 0; } } } -void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1) +void sub_81D2754(u8 *conditions, struct UnknownSubStruct_81D1ED4 *arg1) { - u8 r2, r7; + u8 r2, sinIdx; s8 r12; u16 i; - r2 = sUnknown_08625410[*(arg0++)]; - arg1->unk0 = 155; - arg1->unk2 = 91 - r2; + r2 = sUnknown_08625410[*(conditions++)]; + arg1->unk0 = CONDITION_GRAPH_CENTER_X; + arg1->unk2 = CONDITION_GRAPH_UNK - r2; - r7 = 64; + sinIdx = 64; r12 = 0; - for (i = 1; i < 5; i++) + for (i = 1; i < CONDITION_COUNT; i++) { - r7 += 51; + sinIdx += 51; if (--r12 < 0) r12 = 4; if (r12 == 2) - r7++; + sinIdx++; - r2 = sUnknown_08625410[*(arg0++)]; - arg1[r12].unk0 = 155 + ((r2 * gSineTable[64 + r7]) >> 8); - arg1[r12].unk2 = 91 - ((r2 * gSineTable[r7]) >> 8); + r2 = sUnknown_08625410[*(conditions++)]; + arg1[r12].unk0 = CONDITION_GRAPH_CENTER_X + ((r2 * gSineTable[64 + sinIdx]) >> 8); + arg1[r12].unk2 = CONDITION_GRAPH_UNK - ((r2 * gSineTable[sinIdx]) >> 8); if (r12 < 3 && (r2 != 32 || r12 != 2)) - arg1[r12].unk0 = 156 + ((r2 * gSineTable[64 + r7]) >> 8); + arg1[r12].unk0 = CONDITION_GRAPH_CENTER_X + 1 + ((r2 * gSineTable[64 + sinIdx]) >> 8); } } @@ -685,10 +668,8 @@ void InitMoveRelearnerWindows(bool8 useContextWindow) LoadUserWindowBorderGfx(0, 1, 0xE0); LoadPalette(gStandardMenuPalette, 0xF0, 0x20); - for (i = 0; i < 5; i++) - { + for (i = 0; i < ARRAY_COUNT(sMoveRelearnerWindowTemplates) - 1; i++) FillWindowPixelBuffer(i, PIXEL_FILL(1)); - } if (!useContextWindow) { @@ -704,11 +685,11 @@ void InitMoveRelearnerWindows(bool8 useContextWindow) PutWindowTilemap(3); DrawStdFrameWithCustomTileAndPalette(2, 0, 1, 0xE); DrawStdFrameWithCustomTileAndPalette(3, 0, 1, 0xE); - nullsub_79(); + MoveRelearnerDummy(); ScheduleBgCopyTilemapToVram(1); } -static void nullsub_79(void) +static void MoveRelearnerDummy(void) { } @@ -720,13 +701,10 @@ u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices) gMultiuseListMenuTemplate.items = items; if (numChoices < 6) - { gMultiuseListMenuTemplate.maxShowed = numChoices; - } else - { gMultiuseListMenuTemplate.maxShowed = 6; - } + return gMultiuseListMenuTemplate.maxShowed; } @@ -734,7 +712,7 @@ static void MoveRelearnerLoadBattleMoveDescription(u32 chosenMove) { s32 x; const struct BattleMove *move; - u8 buffer[0x20]; + u8 buffer[32]; const u8 *str; FillWindowPixelBuffer(0, PIXEL_FILL(1)); @@ -1010,7 +988,7 @@ void GetConditionMenuMonNameAndLocString(u8 *locationDst, u8 *nameDst, u16 boxId } } -void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *sheen, u16 boxId, u16 monId, u16 partyId, u16 id, u16 numMons, bool8 excludesCancel) +void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *numSparkles, u16 boxId, u16 monId, u16 partyId, u16 id, u16 numMons, bool8 excludesCancel) { u16 i; @@ -1019,25 +997,23 @@ void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *sheen, u16 if (partyId != numMons) { - graph->stat[id][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); - graph->stat[id][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); - graph->stat[id][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); - graph->stat[id][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); - graph->stat[id][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); + graph->conditions[id][CONDITION_COOL] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); + graph->conditions[id][CONDITION_TOUGH] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); + graph->conditions[id][CONDITION_SMART] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); + graph->conditions[id][CONDITION_CUTE] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); + graph->conditions[id][CONDITION_BEAUTY] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); - sheen[id] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 0xFF) - ? GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) / 29u - : 9; + numSparkles[id] = GET_NUM_CONDITION_SPARKLES(GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL)); - sub_81D2754(graph->stat[id], graph->unk14[id]); + sub_81D2754(graph->conditions[id], graph->unk14[id]); } else { - for (i = 0; i < FLAVOR_COUNT; i++) + for (i = 0; i < CONDITION_COUNT; i++) { - graph->stat[id][i] = 0; - graph->unk14[id][i].unk0 = 155; - graph->unk14[id][i].unk2 = 91; + graph->conditions[id][i] = 0; + graph->unk14[id][i].unk0 = CONDITION_GRAPH_CENTER_X; + graph->unk14[id][i].unk2 = CONDITION_GRAPH_UNK; } } } @@ -1076,7 +1052,7 @@ bool8 MoveConditionMonOffscreen(s16 *x) return (*x != -80); } -bool8 TryUpdateConditionMonTransitionOn(struct ConditionGraph *graph, s16 *x) +bool8 ConditionGraph_UpdateMonEnter(struct ConditionGraph *graph, s16 *x) { bool8 graphUpdating = TransitionConditionGraph(graph); bool8 monUpdating = MoveConditionMonOnscreen(x); @@ -1084,7 +1060,7 @@ bool8 TryUpdateConditionMonTransitionOn(struct ConditionGraph *graph, s16 *x) return (graphUpdating || monUpdating); } -bool8 TryUpdateConditionMonTransitionOff(struct ConditionGraph *graph, s16 *x) +bool8 ConditionGraph_UpdateMonExit(struct ConditionGraph *graph, s16 *x) { bool8 graphUpdating = TransitionConditionGraph(graph); bool8 monUpdating = MoveConditionMonOffscreen(x); diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index a01b93a803..8eacf2e701 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -15,18 +15,18 @@ struct PokenavSub11 { - u32 monPal[3][0x20]; + u32 monPal[NUM_CONDITION_MONS][0x20]; u8 fill[0x180]; - u32 monPicGfx[3][MON_PIC_SIZE]; + u32 monPicGfx[NUM_CONDITION_MONS][MON_PIC_SIZE]; u8 searchMode; s16 monIndex; u32 (*callback)(struct PokenavSub11 *); u8 fill2[0x6320 - 0x6308]; - u8 searchLocBuffer[3][24]; - u8 nameBuffer[3][64]; + u8 locationText[NUM_CONDITION_MONS][24]; + u8 nameText[NUM_CONDITION_MONS][64]; struct ConditionGraph conditionData; - u8 sheen[3]; - u8 monMarks[3]; + u8 numSparkles[NUM_CONDITION_MONS]; + u8 monMarks[NUM_CONDITION_MONS]; s8 mark; s8 unk6787; s8 unk6788; @@ -34,18 +34,17 @@ struct PokenavSub11 u8 state; }; -void InitPartyConditionListParameters(void); -void sub_81CD9F8(void); -u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr); -u32 GetConditionReturnCallback(struct PokenavSub11 *structPtr); -u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr); -u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr); -u8 SwitchConditionSummaryIndex(u8 moveUp); -void CopyMonNameGenderLocation(s16 id, u8 arg1); -void GetMonConditionGraphData(s16 id, u8 arg1); -void ConditionGraphDrawMonPic(s16 id, u8 arg1); +static void InitPartyConditionListParameters(void); +static void InitSearchResultsConditionList(void); +static u32 HandlePartyConditionInput(struct PokenavSub11 *); +static u32 GetConditionReturnCallback(struct PokenavSub11 *); +static u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *); +static u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *); +static u8 SwitchConditionSummaryIndex(bool8); +static void CopyMonNameGenderLocation(s16, u8); +static void GetMonConditionGraphData(s16, u8); +static void ConditionGraphDrawMonPic(s16, u8); -// code bool32 PokenavCallback_Init_PartyCondition(void) { struct PokenavSub11 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH, sizeof(struct PokenavSub11)); @@ -53,7 +52,7 @@ bool32 PokenavCallback_Init_PartyCondition(void) if (structPtr == NULL) return FALSE; - InitConditionGraphData(&structPtr->conditionData); + ConditionGraph_Init(&structPtr->conditionData); InitPartyConditionListParameters(); gKeyRepeatStartDelay = 20; structPtr->callback = HandlePartyConditionInput; @@ -67,8 +66,8 @@ bool32 PokenavCallback_Init_ConditionGraphFromSearch(void) if (structPtr == NULL) return FALSE; - InitConditionGraphData(&structPtr->conditionData); - sub_81CD9F8(); + ConditionGraph_Init(&structPtr->conditionData); + InitSearchResultsConditionList(); gKeyRepeatStartDelay = 20; structPtr->callback = HandlePartyConditionInput; return TRUE; @@ -81,7 +80,7 @@ u32 GetPartyConditionCallback(void) return structPtr->callback(structPtr); } -u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr) +static u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr) { struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); u32 ret = ConditionGraphHandleDpadInput(structPtr); @@ -117,7 +116,7 @@ u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr) return ret; } -u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr) +static u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr) { struct PokenavSub18 *monListPtr; u8 markings; @@ -143,7 +142,7 @@ u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr) return ret; } -u32 GetConditionReturnCallback(struct PokenavSub11 *structPtr) +static u32 GetConditionReturnCallback(struct PokenavSub11 *structPtr) { if (structPtr->searchMode == 0) return POKENAV_CONDITION_MENU; @@ -160,7 +159,7 @@ void FreePartyConditionSubstruct1(void) FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH); } -u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) +static u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) { struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); u8 ret = 0; @@ -170,7 +169,7 @@ u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) if (structPtr->searchMode == 0 || monListPtr->currIndex != 0) { PlaySE(SE_SELECT); - ret = SwitchConditionSummaryIndex(1); + ret = SwitchConditionSummaryIndex(TRUE); } } else if (JOY_HELD(DPAD_DOWN)) @@ -178,14 +177,14 @@ u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) if (structPtr->searchMode == 0 || monListPtr->currIndex < monListPtr->listCount - 1) { PlaySE(SE_SELECT); - ret = SwitchConditionSummaryIndex(0); + ret = SwitchConditionSummaryIndex(FALSE); } } return ret; } -u8 SwitchConditionSummaryIndex(u8 moveUp) +static u8 SwitchConditionSummaryIndex(u8 moveUp) { u16 r7; bool8 wasNotLastMon, isNotLastMon; @@ -235,28 +234,28 @@ bool32 LoadPartyConditionMenuGfx(void) switch (structPtr->state) { case 0: - CopyMonNameGenderLocation(monListPtr->currIndex, 0); + CopyMonNameGenderLocation(monListPtr->currIndex, CONDITION_MON_0); break; case 1: - GetMonConditionGraphData(monListPtr->currIndex, 0); + GetMonConditionGraphData(monListPtr->currIndex, CONDITION_MON_0); break; case 2: - ConditionGraphDrawMonPic(monListPtr->currIndex, 0); + ConditionGraphDrawMonPic(monListPtr->currIndex, CONDITION_MON_0); break; case 3: if (monListPtr->listCount == 1) { - structPtr->mark = 0; - structPtr->unk6787 = 0; - structPtr->unk6788 = 0; + structPtr->mark = CONDITION_MON_0; + structPtr->unk6787 = CONDITION_MON_0; + structPtr->unk6788 = CONDITION_MON_0; structPtr->state = 0; return TRUE; } else { - structPtr->mark = 0; - structPtr->unk6787 = 1; - structPtr->unk6788 = 2; + structPtr->mark = CONDITION_MON_0; + structPtr->unk6787 = CONDITION_MON_1; + structPtr->unk6788 = CONDITION_MON_2; } break; // These were probably ternaries just like cases 7-9, but couldn't match it any other way. @@ -264,28 +263,28 @@ bool32 LoadPartyConditionMenuGfx(void) var = monListPtr->currIndex + 1; if (var >= monListPtr->listCount) var = 0; - CopyMonNameGenderLocation(var, 1); + CopyMonNameGenderLocation(var, CONDITION_MON_1); break; case 5: var = monListPtr->currIndex + 1; if (var >= monListPtr->listCount) var = 0; - GetMonConditionGraphData(var, 1); + GetMonConditionGraphData(var, CONDITION_MON_1); break; case 6: var = monListPtr->currIndex + 1; if (var >= monListPtr->listCount) var = 0; - ConditionGraphDrawMonPic(var, 1); + ConditionGraphDrawMonPic(var, CONDITION_MON_1); break; case 7: - CopyMonNameGenderLocation((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2); + CopyMonNameGenderLocation((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2); break; case 8: - GetMonConditionGraphData((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2); + GetMonConditionGraphData((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2); break; case 9: - ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2); + ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2); structPtr->state = 0; return TRUE; } @@ -326,15 +325,15 @@ u8 *CopyStringLeftAlignedToConditionData(u8 *dst, const u8 *src, s16 n) return dst; } -u8 *CopyMonConditionNameGender(u8 *str, u16 id, bool8 arg3) +static u8 *CopyConditionMonNameGender(u8 *str, u16 listId, bool8 arg3) { u16 boxId, monId, gender, species, level, lvlDigits; struct BoxPokemon *boxMon; u8 *txtPtr, *str_; struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - boxId = monListPtr->monData[id].boxId; - monId = monListPtr->monData[id].monId; + boxId = monListPtr->monData[listId].boxId; + monId = monListPtr->monData[listId].monId; *(str++) = EXT_CTRL_CODE_BEGIN; *(str++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; *(str++) = TEXT_COLOR_BLUE; @@ -417,39 +416,39 @@ u8 *CopyMonConditionNameGender(u8 *str, u16 id, bool8 arg3) return str_; } -void CopyMonNameGenderLocation(s16 id, u8 arg1) +static void CopyMonNameGenderLocation(s16 listId, u8 loadId) { u16 boxId, i; struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - if (id != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) + if (listId != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) { - CopyMonConditionNameGender(structPtr->nameBuffer[arg1], id, FALSE); - boxId = monListPtr->monData[id].boxId; - structPtr->searchLocBuffer[arg1][0] = EXT_CTRL_CODE_BEGIN; - structPtr->searchLocBuffer[arg1][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; - structPtr->searchLocBuffer[arg1][2] = TEXT_COLOR_BLUE; - structPtr->searchLocBuffer[arg1][3] = TEXT_COLOR_TRANSPARENT; - structPtr->searchLocBuffer[arg1][4] = TEXT_COLOR_LIGHT_BLUE; + CopyConditionMonNameGender(structPtr->nameText[loadId], listId, FALSE); + boxId = monListPtr->monData[listId].boxId; + structPtr->locationText[loadId][0] = EXT_CTRL_CODE_BEGIN; + structPtr->locationText[loadId][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + structPtr->locationText[loadId][2] = TEXT_COLOR_BLUE; + structPtr->locationText[loadId][3] = TEXT_COLOR_TRANSPARENT; + structPtr->locationText[loadId][4] = TEXT_COLOR_LIGHT_BLUE; if (boxId == TOTAL_BOXES_COUNT) - CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], gText_InParty, 8); + CopyStringLeftAlignedToConditionData(&structPtr->locationText[loadId][5], gText_InParty, BOX_NAME_LENGTH); else - CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], GetBoxNamePtr(boxId), BOX_NAME_LENGTH); + CopyStringLeftAlignedToConditionData(&structPtr->locationText[loadId][5], GetBoxNamePtr(boxId), BOX_NAME_LENGTH); } else { for (i = 0; i < 12; i++) - structPtr->nameBuffer[arg1][i] = CHAR_SPACE; - structPtr->nameBuffer[arg1][i] = EOS; + structPtr->nameText[loadId][i] = CHAR_SPACE; + structPtr->nameText[loadId][i] = EOS; - for (i = 0; i < 8; i++) - structPtr->searchLocBuffer[arg1][i] = CHAR_SPACE; - structPtr->searchLocBuffer[arg1][i] = EOS; + for (i = 0; i < BOX_NAME_LENGTH; i++) + structPtr->locationText[loadId][i] = CHAR_SPACE; + structPtr->locationText[loadId][i] = EOS; } } -void InitPartyConditionListParameters(void) +static void InitPartyConditionListParameters(void) { u16 i, count; struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); @@ -475,62 +474,60 @@ void InitPartyConditionListParameters(void) structPtr->state = 0; } -void sub_81CD9F8(void) +static void InitSearchResultsConditionList(void) { struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); structPtr->searchMode = 1; structPtr->state = 0; } -void GetMonConditionGraphData(s16 id, u8 arg1) +static void GetMonConditionGraphData(s16 listId, u8 loadId) { u16 boxId, monId, i; struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - if (id != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) + if (listId != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) { - boxId = monListPtr->monData[id].boxId; - monId = monListPtr->monData[id].monId; - structPtr->conditionData.stat[arg1][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); - structPtr->conditionData.stat[arg1][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); - structPtr->conditionData.stat[arg1][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); - structPtr->conditionData.stat[arg1][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); - structPtr->conditionData.stat[arg1][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); - structPtr->sheen[arg1] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 255) - ? GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) / 29u - : 9; - structPtr->monMarks[arg1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL); - sub_81D2754(structPtr->conditionData.stat[arg1], structPtr->conditionData.unk14[arg1]); + boxId = monListPtr->monData[listId].boxId; + monId = monListPtr->monData[listId].monId; + structPtr->conditionData.conditions[loadId][CONDITION_COOL] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); + structPtr->conditionData.conditions[loadId][CONDITION_TOUGH] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); + structPtr->conditionData.conditions[loadId][CONDITION_SMART] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); + structPtr->conditionData.conditions[loadId][CONDITION_CUTE] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); + structPtr->conditionData.conditions[loadId][CONDITION_BEAUTY] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); + structPtr->numSparkles[loadId] = GET_NUM_CONDITION_SPARKLES(GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL)); + structPtr->monMarks[loadId] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL); + sub_81D2754(structPtr->conditionData.conditions[loadId], structPtr->conditionData.unk14[loadId]); } else { - for (i = 0; i < FLAVOR_COUNT; i++) + for (i = 0; i < CONDITION_COUNT; i++) { - structPtr->conditionData.stat[arg1][i] = 0; - structPtr->conditionData.unk14[arg1][i].unk0 = 155; - structPtr->conditionData.unk14[arg1][i].unk2 = 91; + structPtr->conditionData.conditions[loadId][i] = 0; + structPtr->conditionData.unk14[loadId][i].unk0 = CONDITION_GRAPH_CENTER_X; + structPtr->conditionData.unk14[loadId][i].unk2 = CONDITION_GRAPH_UNK; } } } -void ConditionGraphDrawMonPic(s16 index, u8 arg1) +static void ConditionGraphDrawMonPic(s16 listId, u8 loadId) { u16 boxId, monId, species; u32 personality, tid; struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - if (index == (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) + if (listId == (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) return; - boxId = monListPtr->monData[index].boxId; - monId = monListPtr->monData[index].monId; + boxId = monListPtr->monData[listId].boxId; + monId = monListPtr->monData[listId].monId; species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL); tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); - LoadSpecialPokePic(&gMonFrontPicTable[species], structPtr->monPicGfx[arg1], species, personality, TRUE); - LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), structPtr->monPal[arg1]); + LoadSpecialPokePic(&gMonFrontPicTable[species], structPtr->monPicGfx[loadId], species, personality, TRUE); + LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), structPtr->monPal[loadId]); } u16 GetMonListCount(void) @@ -563,16 +560,16 @@ u8 sub_81CDC9C(void) return structPtr->monIndex; } -void *GetConditionMonPicGfx(u8 id) +void *GetConditionMonPicGfx(u8 loadId) { struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->monPicGfx[id]; + return structPtr->monPicGfx[loadId]; } -void *GetConditionMonPal(u8 id) +void *GetConditionMonPal(u8 loadId) { struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->monPal[id]; + return structPtr->monPal[loadId]; } u8 sub_81CDCEC(void) @@ -581,16 +578,16 @@ u8 sub_81CDCEC(void) return structPtr->unk6789; } -u8 *GetConditionMonNameBuffer(u8 id) +u8 *GetConditionMonNameText(u8 loadId) { struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->nameBuffer[id]; + return structPtr->nameText[loadId]; } -u8 *GetConditionMonLocationBuffer(u8 id) +u8 *GetConditionMonLocationText(u8 loadId) { struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->searchLocBuffer[id]; + return structPtr->locationText[loadId]; } u16 GetConditionMonDataBuffer(void) @@ -617,8 +614,8 @@ u8 TryGetMonMarkId(void) return 0; } -u8 GetMonSheen(void) +u8 GetNumConditionMonSparkles(void) { struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->sheen[structPtr->mark]; + return structPtr->numSparkles[structPtr->mark]; } diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index 4799b163c2..ef07c9be62 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -15,22 +15,22 @@ #include "strings.h" #include "text.h" -u32 LoopedTask_TransitionMons(s32); -u32 LoopedTask_ExitPartyConditionMenu(s32); -u32 LoopedTask_MoveCursorNoTransition(s32); -u32 LoopedTask_SlideMonOut(s32); -u32 LoopedTask_OpenMonMarkingsWindow(s32); -u32 LoopedTask_CloseMonMarkingsWindow(s32); +static u32 LoopedTask_TransitionMons(s32); +static u32 LoopedTask_ExitPartyConditionMenu(s32); +static u32 LoopedTask_MoveCursorNoTransition(s32); +static u32 LoopedTask_SlideMonOut(s32); +static u32 LoopedTask_OpenMonMarkingsWindow(s32); +static u32 LoopedTask_CloseMonMarkingsWindow(s32); -BSS_DATA u8 gUnknown_030012BC; +static u8 sUnknown_030012BC; const u16 gConditionGraphData_Pal[] = INCBIN_U16("graphics/pokenav/condition/graph_data.gbapal"); const u16 gConditionText_Pal[] = INCBIN_U16("graphics/pokenav/condition/text.gbapal"); -const u32 gUnknown_08623228[] = INCBIN_U32("graphics/pokenav/8623228.4bpp.lz"); -const u32 sConditionGraph_Tilemap[] = INCBIN_U32("graphics/pokenav/862323C.bin.lz"); -const u16 sConditionGraphMonMarkingsPal[] = INCBIN_U16("graphics/pokenav/8623338.gbapal"); +static const u32 sUnknown_08623228[] = INCBIN_U32("graphics/pokenav/condition/graph_data.4bpp.lz"); +static const u32 sConditionGraph_Tilemap[] = INCBIN_U32("graphics/pokenav/862323C.bin.lz"); +static const u16 sConditionGraphMonMarkingsPal[] = INCBIN_U16("graphics/pokenav/8623338.gbapal"); -const struct BgTemplate sPartyConditionBgTemplates[3] = +static const struct BgTemplate sPartyConditionBgTemplates[3] = { { .bg = 1, @@ -61,7 +61,7 @@ const struct BgTemplate sPartyConditionBgTemplates[3] = } }; -const struct WindowTemplate sMonNameGenderWindowTemplate = +static const struct WindowTemplate sMonNameGenderWindowTemplate = { .bg = 1, .tilemapLeft = 13, @@ -72,7 +72,7 @@ const struct WindowTemplate sMonNameGenderWindowTemplate = .baseBlock = 2 }; -const struct WindowTemplate sConditionGraphListIdWindowTemplate = +static const struct WindowTemplate sConditionGraphListIdWindowTemplate = { .bg = 1, .tilemapLeft = 1, @@ -83,7 +83,7 @@ const struct WindowTemplate sConditionGraphListIdWindowTemplate = .baseBlock = 0x36 }; -const struct WindowTemplate sUnusedWindowTemplate1 = +static const struct WindowTemplate sUnusedWindowTemplate1 = { .bg = 1, .tilemapLeft = 1, @@ -94,7 +94,7 @@ const struct WindowTemplate sUnusedWindowTemplate1 = .baseBlock = 0x44 }; -const struct WindowTemplate sUnusedWindowTemplate2 = +static const struct WindowTemplate sUnusedWindowTemplate2 = { .bg = 1, .tilemapLeft = 13, @@ -105,7 +105,7 @@ const struct WindowTemplate sUnusedWindowTemplate2 = .baseBlock = 0x44 }; -const LoopedTask sPartyConditionLoopedTaskFuncs[] = +static const LoopedTask sPartyConditionLoopedTaskFuncs[] = { [PARTY_CONDITION_FUNC_NONE] = NULL, [PARTY_CONDITION_FUNC_SLIDE_MON_IN] = LoopedTask_TransitionMons, @@ -132,26 +132,26 @@ struct Pokenav7Struct u8 listIndexWindowId; u8 unusedWindowId1; u8 unusedWindowId2; - struct MonMarkingsMenu monMarks; + struct MonMarkingsMenu marksMenu; struct Sprite *monMarksSprite; struct Sprite *conditionSparkleSprites[MAX_CONDITION_SPARKLES]; u8 windowModeState; - u8 filler2[0x38ac - 0x2909]; + u8 filler2[0xFA3]; }; extern s8 GetMonMarkIndex(void); // This function's declaration here is s8 vs. u8 in pokenav_conditions_1.c -u32 LoopedTask_OpenPartyConditionGraph(s32 state); -u32 GetPartyConditionLoopedTaskActive(void); -void CreateConditionMonPic(u8 var); -void CreateMonMarkingsOrPokeballIndicators(void); -void CopyUnusedConditionWindowsToVram(void); -bool32 UpdateConditionGraphWindows(u8 a0, u16 a1, bool8 a2); -void sub_81CEE44(void); -void DoConditionGraphTransition(void); -void sub_81CEEC8(void); -void sub_81CEE68(void); -void ToggleBg2(bool8 showBg); +static u32 LoopedTask_OpenPartyConditionGraph(s32 state); +static u32 GetPartyConditionLoopedTaskActive(void); +static void CreateConditionMonPic(u8 var); +static void CreateMonMarkingsOrPokeballIndicators(void); +static void CopyUnusedConditionWindowsToVram(void); +static bool32 UpdateConditionGraphWindows(u8 a0, u16 a1, bool8 a2); +static void sub_81CEE44(void); +static void DoConditionGraphTransition(void); +static void sub_81CEEC8(void); +static void sub_81CEE68(void); +static void ToggleGraphData(bool8 showBg); // code bool32 OpenPartyConditionMenu(void) @@ -181,13 +181,13 @@ u32 IsPartyConditionLoopedTaskActive(void) return structPtr->callback(); } -u32 GetPartyConditionLoopedTaskActive(void) +static u32 GetPartyConditionLoopedTaskActive(void) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); return IsLoopedTaskActive(structPtr->loopedTaskId); } -u32 LoopedTask_OpenPartyConditionGraph(s32 state) +static u32 LoopedTask_OpenPartyConditionGraph(s32 state) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); @@ -213,7 +213,7 @@ u32 LoopedTask_OpenPartyConditionGraph(s32 state) case 2: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - DecompressAndCopyTileDataToVram(2, gUnknown_08623228, 0, 0, 0); + DecompressAndCopyTileDataToVram(2, sUnknown_08623228, 0, 0, 0); return LT_INC_AND_PAUSE; case 3: if (FreeTempTileDataBuffersIfPossible()) @@ -320,14 +320,14 @@ u32 LoopedTask_OpenPartyConditionGraph(s32 state) return LT_PAUSE; return LT_INC_AND_PAUSE; case 19: - ToggleBg2(TRUE); + ToggleGraphData(TRUE); return LT_INC_AND_PAUSE; case 20: - if (!TryUpdateConditionMonTransitionOn(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) + if (!ConditionGraph_UpdateMonEnter(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) { ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); if (IsConditionMenuSearchMode() == TRUE || GetConditionGraphCurrentMonIndex() != GetMonListCount()) - CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetMonSheen()); + CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetNumConditionMonSparkles()); return LT_FINISH; } @@ -337,7 +337,7 @@ u32 LoopedTask_OpenPartyConditionGraph(s32 state) return LT_FINISH; } -u32 LoopedTask_ExitPartyConditionMenu(s32 state) +static u32 LoopedTask_ExitPartyConditionMenu(s32 state) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); @@ -348,9 +348,9 @@ u32 LoopedTask_ExitPartyConditionMenu(s32 state) DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 1: - if (TryUpdateConditionMonTransitionOff(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) + if (ConditionGraph_UpdateMonExit(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) return 2; - ToggleBg2(FALSE); + ToggleGraphData(FALSE); return LT_INC_AND_CONTINUE; case 2: PokenavFadeScreen(0); @@ -370,10 +370,10 @@ u32 LoopedTask_ExitPartyConditionMenu(s32 state) return LT_FINISH; } -u32 LoopedTask_TransitionMons(s32 state) +static u32 LoopedTask_TransitionMons(s32 state) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); - struct ConditionGraph *unkPtr = GetConditionGraphDataPtr(); + struct ConditionGraph *graph = GetConditionGraphDataPtr(); switch (state) { @@ -388,7 +388,7 @@ u32 LoopedTask_TransitionMons(s32 state) DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 3: - TransitionConditionGraph(unkPtr); + TransitionConditionGraph(graph); return LT_INC_AND_CONTINUE; case 4: if (!MoveConditionMonOffscreen(&structPtr->monTransitionX)) @@ -411,14 +411,14 @@ u32 LoopedTask_TransitionMons(s32 state) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 9: - unkPtr = GetConditionGraphDataPtr(); - if (!TryUpdateConditionMonTransitionOn(unkPtr, &structPtr->monTransitionX)) + graph = GetConditionGraphDataPtr(); + if (!ConditionGraph_UpdateMonEnter(graph, &structPtr->monTransitionX)) { ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); if (IsConditionMenuSearchMode() != TRUE && GetConditionGraphCurrentMonIndex() == GetMonListCount()) return LT_INC_AND_CONTINUE; - CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetMonSheen()); + CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetNumConditionMonSparkles()); return LT_INC_AND_CONTINUE; } return LT_PAUSE; @@ -427,7 +427,7 @@ u32 LoopedTask_TransitionMons(s32 state) return LT_FINISH; } -u32 LoopedTask_MoveCursorNoTransition(s32 state) +static u32 LoopedTask_MoveCursorNoTransition(s32 state) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); @@ -459,10 +459,10 @@ u32 LoopedTask_MoveCursorNoTransition(s32 state) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 8: - if (!TryUpdateConditionMonTransitionOn(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) + if (!ConditionGraph_UpdateMonEnter(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) { ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); - CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetMonSheen()); + CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetNumConditionMonSparkles()); return LT_INC_AND_CONTINUE; } return LT_PAUSE; @@ -471,7 +471,7 @@ u32 LoopedTask_MoveCursorNoTransition(s32 state) return LT_FINISH; } -u32 LoopedTask_SlideMonOut(s32 state) +static u32 LoopedTask_SlideMonOut(s32 state) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); @@ -488,7 +488,7 @@ u32 LoopedTask_SlideMonOut(s32 state) DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 3: - if (!TryUpdateConditionMonTransitionOff(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) + if (!ConditionGraph_UpdateMonExit(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 4: @@ -509,7 +509,7 @@ u32 LoopedTask_SlideMonOut(s32 state) return LT_FINISH; } -u32 LoopedTask_OpenMonMarkingsWindow(s32 state) +static u32 LoopedTask_OpenMonMarkingsWindow(s32 state) { switch (state) { @@ -528,7 +528,7 @@ u32 LoopedTask_OpenMonMarkingsWindow(s32 state) return LT_FINISH; } -u32 LoopedTask_CloseMonMarkingsWindow(s32 state) +static u32 LoopedTask_CloseMonMarkingsWindow(s32 state) { switch (state) { @@ -555,7 +555,7 @@ static u8 *UnusedPrintNumberString(u8 *dst, u16 num) return txtPtr; } -bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode) +static bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode) { u8 text[32]; const u8 *str; @@ -571,23 +571,23 @@ bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode) case 1: if (GetConditionGraphCurrentMonIndex() != GetMonListCount() - 1 || IsConditionMenuSearchMode() == TRUE) { - str = GetConditionMonNameBuffer(bufferIndex); + str = GetConditionMonNameText(bufferIndex); AddTextPrinterParameterized(structPtr->nameGenderWindowId, FONT_NORMAL, str, 0, 1, 0, NULL); } break; case 2: if (IsConditionMenuSearchMode() == TRUE) { - str = GetConditionMonLocationBuffer(bufferIndex); + str = GetConditionMonLocationText(bufferIndex); AddTextPrinterParameterized(structPtr->nameGenderWindowId, FONT_NORMAL, str, 0, 17, 0, NULL); text[0] = EXT_CTRL_CODE_BEGIN; text[1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; text[2] = TEXT_COLOR_BLUE; text[3] = TEXT_COLOR_TRANSPARENT; text[4] = TEXT_COLOR_LIGHT_BLUE; - StringCopy(text + 5, gText_Number2); + StringCopy(&text[5], gText_Number2); AddTextPrinterParameterized(structPtr->listIndexWindowId, FONT_NORMAL, text, 4, 1, 0, NULL); - ConvertIntToDecimalStringN(text + 5, GetConditionMonDataBuffer(), STR_CONV_MODE_RIGHT_ALIGN, 4); + ConvertIntToDecimalStringN(&text[5], GetConditionMonDataBuffer(), STR_CONV_MODE_RIGHT_ALIGN, 4); AddTextPrinterParameterized(structPtr->listIndexWindowId, FONT_NORMAL, text, 28, 1, 0, NULL); } break; @@ -624,7 +624,7 @@ bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode) return FALSE; } -void CopyUnusedConditionWindowsToVram(void) +static void CopyUnusedConditionWindowsToVram(void) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); @@ -643,9 +643,9 @@ void sub_81CE964(struct Sprite *sprite) void HighlightCurrentPartyIndexPokeball(struct Sprite *sprite) { if (GetConditionGraphCurrentMonIndex() == GetMonListCount() - 1) - sprite->oam.paletteNum = IndexOfSpritePaletteTag(0x65); + sprite->oam.paletteNum = IndexOfSpritePaletteTag(TAG_CONDITION_BALL); else - sprite->oam.paletteNum = IndexOfSpritePaletteTag(0x66); + sprite->oam.paletteNum = IndexOfSpritePaletteTag(TAG_CONDITION_CANCEL); } void MonMarkingsCallback(struct Sprite *sprite) @@ -653,7 +653,7 @@ void MonMarkingsCallback(struct Sprite *sprite) StartSpriteAnim(sprite, TryGetMonMarkId()); } -void CreateMonMarkingsOrPokeballIndicators(void) +static void CreateMonMarkingsOrPokeballIndicators(void) { struct SpriteSheet sprSheets[4]; struct SpriteTemplate sprTemplate; @@ -666,17 +666,17 @@ void CreateMonMarkingsOrPokeballIndicators(void) LoadConditionSelectionIcons(sprSheets, &sprTemplate, sprPals); if (IsConditionMenuSearchMode() == TRUE) { - structPtr->monMarks.baseTileTag = 0x6A; - structPtr->monMarks.basePaletteTag = 0x6A; - InitMonMarkingsMenu(&structPtr->monMarks); + structPtr->marksMenu.baseTileTag = TAG_CONDITION_MARKINGS_MENU; + structPtr->marksMenu.basePaletteTag = TAG_CONDITION_MARKINGS_MENU; + InitMonMarkingsMenu(&structPtr->marksMenu); BufferMonMarkingsMenuTiles(); - sprite = CreateMonMarkingAllCombosSprite(0x69, 0x69, sConditionGraphMonMarkingsPal); + sprite = CreateMonMarkingAllCombosSprite(TAG_CONDITION_MON_MARKINGS, TAG_CONDITION_MON_MARKINGS, sConditionGraphMonMarkingsPal); sprite->oam.priority = 3; sprite->x = 192; sprite->y = 32; sprite->callback = MonMarkingsCallback; structPtr->monMarksSprite = sprite; - PokenavFillPalette(IndexOfSpritePaletteTag(0x69), 0); + PokenavFillPalette(IndexOfSpritePaletteTag(TAG_CONDITION_MON_MARKINGS), 0); } else { @@ -698,7 +698,7 @@ void CreateMonMarkingsOrPokeballIndicators(void) } } - sprTemplate.tileTag = 0x67; + sprTemplate.tileTag = TAG_CONDITION_BALL_PLACEHOLDER; sprTemplate.callback = SpriteCallbackDummy; for (; i < 6; i++) { @@ -714,7 +714,7 @@ void CreateMonMarkingsOrPokeballIndicators(void) } } - sprTemplate.tileTag = 0x66; + sprTemplate.tileTag = TAG_CONDITION_CANCEL; sprTemplate.callback = HighlightCurrentPartyIndexPokeball; spriteId = CreateSprite(&sprTemplate, 222, (i * 20) + 8, 0); if (spriteId != MAX_SPRITES) @@ -742,28 +742,28 @@ void sub_81CEBF4(struct Pokenav7Struct *structPtr) if (IsConditionMenuSearchMode() == TRUE) { DestroySprite(structPtr->monMarksSprite); - FreeSpriteTilesByTag(0x6A); - FreeSpriteTilesByTag(0x69); - FreeSpritePaletteByTag(0x6A); - FreeSpritePaletteByTag(0x69); + FreeSpriteTilesByTag(TAG_CONDITION_MARKINGS_MENU); + FreeSpriteTilesByTag(TAG_CONDITION_MON_MARKINGS); + FreeSpritePaletteByTag(TAG_CONDITION_MARKINGS_MENU); + FreeSpritePaletteByTag(TAG_CONDITION_MON_MARKINGS); } else { for (i = 0; i < 7; i++) DestroySprite(&gSprites[structPtr->partyPokeballSpriteIds[i]]); - FreeSpriteTilesByTag(0x65); - FreeSpriteTilesByTag(0x66); - FreeSpriteTilesByTag(0x67); - FreeSpritePaletteByTag(0x65); - FreeSpritePaletteByTag(0x66); + FreeSpriteTilesByTag(TAG_CONDITION_BALL); + FreeSpriteTilesByTag(TAG_CONDITION_CANCEL); + FreeSpriteTilesByTag(TAG_CONDITION_BALL_PLACEHOLDER); + FreeSpritePaletteByTag(TAG_CONDITION_BALL); + FreeSpritePaletteByTag(TAG_CONDITION_CANCEL); } if (structPtr->monPicSpriteId != SPRITE_NONE) { DestroySprite(&gSprites[structPtr->monPicSpriteId]); - FreeSpriteTilesByTag(0x64); - FreeSpritePaletteByTag(0x64); + FreeSpriteTilesByTag(TAG_CONDITION_MON); + FreeSpritePaletteByTag(TAG_CONDITION_MON); } } @@ -795,7 +795,7 @@ void MonPicGfxSpriteCallback(struct Sprite *sprite) sprite->x = structPtr->monTransitionX + 38; } -void CreateConditionMonPic(u8 id) +static void CreateConditionMonPic(u8 id) { struct SpriteTemplate sprTemplate; struct SpriteSheet sprSheet; @@ -814,15 +814,15 @@ void CreateConditionMonPic(u8 id) structPtr->monPicSpriteId = spriteId; if (spriteId == MAX_SPRITES) { - FreeSpriteTilesByTag(0x64); - FreeSpritePaletteByTag(0x64); + FreeSpriteTilesByTag(TAG_CONDITION_MON); + FreeSpritePaletteByTag(TAG_CONDITION_MON); structPtr->monPicSpriteId = SPRITE_NONE; } else { structPtr->monPicSpriteId = spriteId; gSprites[structPtr->monPicSpriteId].callback = MonPicGfxSpriteCallback; - structPtr->unk181C = (void*)(VRAM) + 0x10000 + (structPtr->monGfxTileStart * 32); + structPtr->unk181C = (void*)VRAM + BG_VRAM_SIZE + (structPtr->monGfxTileStart * 32); structPtr->monPalIndex = (structPtr->monPalIndex * 16) + 0x100; } } @@ -833,22 +833,22 @@ void CreateConditionMonPic(u8 id) } } -void sub_81CEE44(void) +static void sub_81CEE44(void) { - struct ConditionGraph *unk = GetConditionGraphDataPtr(); + struct ConditionGraph *graph = GetConditionGraphDataPtr(); LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); - sub_81D2108(unk); + sub_81D2108(graph); ScanlineEffect_InitHBlankDmaTransfer(); } -void sub_81CEE68(void) +static void sub_81CEE68(void) { SetPokenavVBlankCallback(); } -void ToggleBg2(bool8 showBg) +static void ToggleGraphData(bool8 showBg) { if (showBg) ShowBg(2); @@ -856,17 +856,17 @@ void ToggleBg2(bool8 showBg) HideBg(2); } -void DoConditionGraphTransition(void) +static void DoConditionGraphTransition(void) { struct ConditionGraph *conditionPtr = GetConditionGraphDataPtr(); u8 id = GetMonMarkIndex(); - gUnknown_030012BC = id; + sUnknown_030012BC = id; sub_81D1F84(conditionPtr, conditionPtr->unk14[3], conditionPtr->unk14[id]); TransitionConditionGraph(conditionPtr); } -void sub_81CEEC8(void) +static void sub_81CEEC8(void) { struct ConditionGraph *conditionPtr = GetConditionGraphDataPtr(); @@ -879,7 +879,7 @@ u8 GetMonMarkingsData(void) struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); if (IsConditionMenuSearchMode() == 1) - return structPtr->monMarks.markings; + return structPtr->marksMenu.markings; else return 0; } diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index bcfe94cb7a..4724eab0e0 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -314,10 +314,10 @@ static const struct SpriteTemplate sMatchCallBlueLightSpriteTemplate = static const struct ScanlineEffectParams sPokenavMainMenuScanlineEffectParams = { - (void *)REG_ADDR_WIN0H, - ((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1, - 1, - 0 + ®_WIN0H, + ((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1, + 1, + 0 }; static bool32 PlayerHasTrainerRematches(void) diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index 9f8918ba2d..a8b01b8277 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -57,14 +57,14 @@ struct UsePokeblockSession u8 mainState; u8 unused1; u8 timer; - u8 statId; + u8 condition; u8 numEnhancements; u8 unused2; bool8 monInTopHalf; - u8 conditionsBeforeBlock[FLAVOR_COUNT]; - u8 conditionsAfterBlock[FLAVOR_COUNT]; - u8 enhancements[FLAVOR_COUNT]; - s16 pokeblockStatBoosts[FLAVOR_COUNT]; + u8 conditionsBeforeBlock[CONDITION_COUNT]; + u8 conditionsAfterBlock[CONDITION_COUNT]; + u8 enhancements[CONDITION_COUNT]; + s16 pokeblockStatBoosts[CONDITION_COUNT]; u8 numSelections; // num in party + 1 (for Cancel) u8 curSelection; bool8 (*loadNewSelection)(void); @@ -142,7 +142,7 @@ static void LoadAndCreateUpDownSprites(void); static void CalculateNumAdditionalSparkles(u8); static void PrintFirstEnhancement(void); static bool8 TryPrintNextEnhancement(void); -static void BufferEnhancedStatText(u8 *, u8, s16); +static void BufferEnhancedText(u8 *, u8, s16); static void PrintMenuWindowText(const u8 *); static void CalculatePokeblockEffectiveness(struct Pokeblock *, struct Pokemon *); static void SpriteCB_UpDown(struct Sprite *); @@ -178,22 +178,22 @@ static const u32 sGraphData_Tilemap[] = INCBIN_U32("graphics/pokeblock/use_scree // The condition/flavors aren't listed in their normal order in this file, they're listed as shown on the graph going counter-clockwise // Normally they would go Cool/Spicy, Beauty/Dry, Cute/Sweet, Smart/Bitter, Tough/Sour (also graph order, but clockwise) -static const u32 sMonDataConditions[FLAVOR_COUNT] = +static const u32 sConditionToMonData[CONDITION_COUNT] = { - MON_DATA_COOL, - MON_DATA_TOUGH, - MON_DATA_SMART, - MON_DATA_CUTE, - MON_DATA_BEAUTY + [CONDITION_COOL] = MON_DATA_COOL, + [CONDITION_TOUGH] = MON_DATA_TOUGH, + [CONDITION_SMART] = MON_DATA_SMART, + [CONDITION_CUTE] = MON_DATA_CUTE, + [CONDITION_BEAUTY] = MON_DATA_BEAUTY }; -static const u8 sFlavors[FLAVOR_COUNT] = +static const u8 sConditionToFlavor[CONDITION_COUNT] = { - FLAVOR_SPICY, - FLAVOR_SOUR, - FLAVOR_BITTER, - FLAVOR_SWEET, - FLAVOR_DRY + [CONDITION_COOL] = FLAVOR_SPICY, + [CONDITION_TOUGH] = FLAVOR_SOUR, + [CONDITION_SMART] = FLAVOR_BITTER, + [CONDITION_CUTE] = FLAVOR_SWEET, + [CONDITION_BEAUTY] = FLAVOR_DRY }; static const u8 sNatureTextColors[] = @@ -286,13 +286,13 @@ static const struct WindowTemplate sUsePokeblockYesNoWinTemplate = .baseBlock = 0x83 }; -static const u8 *const sContestStatNames[] = +static const u8 *const sConditionNames[CONDITION_COUNT] = { - gText_Coolness, - gText_Toughness, - gText_Smartness, - gText_Cuteness, - gText_Beauty3 + [CONDITION_COOL] = gText_Coolness, + [CONDITION_TOUGH] = gText_Toughness, + [CONDITION_SMART] = gText_Smartness, + [CONDITION_CUTE] = gText_Cuteness, + [CONDITION_BEAUTY] = gText_Beauty3 }; static const struct SpriteSheet sSpriteSheet_UpDown = @@ -305,13 +305,13 @@ static const struct SpritePalette sSpritePalette_UpDown = gUsePokeblockUpDown_Pal, TAG_UP_DOWN }; -static const s16 sUpDownCoordsOnGraph[FLAVOR_COUNT][2] = +static const s16 sUpDownCoordsOnGraph[CONDITION_COUNT][2] = { - {156, 36}, - {117, 59}, - {117, 118}, - {197, 118}, - {197, 59} + [CONDITION_COOL] = {156, 36}, + [CONDITION_TOUGH] = {117, 59}, + [CONDITION_SMART] = {117, 118}, + [CONDITION_CUTE] = {197, 118}, + [CONDITION_BEAUTY] = {197, 59} }; static const struct OamData sOam_UpDown = @@ -487,7 +487,7 @@ static void LoadUsePokeblockMenu(void) { case 0: sMenu->curMonSpriteId = SPRITE_NONE; - InitConditionGraphData(&sMenu->graph); + ConditionGraph_Init(&sMenu->graph); sInfo->mainState++; break; case 1: @@ -537,7 +537,7 @@ static void LoadUsePokeblockMenu(void) sInfo->mainState++; break; case 11: - sub_81D2754(sMenu->graph.stat[0], sMenu->graph.unk14[0]); + sub_81D2754(sMenu->graph.conditions[0], sMenu->graph.unk14[0]); InitConditionGraphState(&sMenu->graph); sInfo->mainState++; break; @@ -767,8 +767,6 @@ static void ShowUsePokeblockMenuForResults(void) static void ShowPokeblockResults(void) { - u8 var; - switch (sInfo->mainState) { case 0: @@ -789,8 +787,7 @@ static void ShowPokeblockResults(void) sInfo->mainState++; break; case 3: - var = TransitionConditionGraph(&sMenu->graph); - if (!var) + if (!TransitionConditionGraph(&sMenu->graph)) { CalculateNumAdditionalSparkles(GetPartyIdFromSelectionId(sMenu->info.curSelection)); if (sMenu->info.curSelection != sMenu->info.numSelections - 1) @@ -906,16 +903,16 @@ static void PrintFirstEnhancement(void) DrawTextBorderOuter(WIN_TEXT, 151, 14); FillWindowPixelBuffer(WIN_TEXT, 17); - for (sInfo->statId = 0; sInfo->statId < FLAVOR_COUNT; sInfo->statId++) + for (sInfo->condition = 0; sInfo->condition < CONDITION_COUNT; sInfo->condition++) { - if (sInfo->enhancements[sInfo->statId] != 0) + if (sInfo->enhancements[sInfo->condition] != 0) break; } - if (sInfo->statId < FLAVOR_COUNT) - BufferEnhancedStatText(gStringVar4, sInfo->statId, sInfo->enhancements[sInfo->statId]); + if (sInfo->condition < CONDITION_COUNT) + BufferEnhancedText(gStringVar4, sInfo->condition, sInfo->enhancements[sInfo->condition]); else - BufferEnhancedStatText(gStringVar4, sInfo->statId, 0); + BufferEnhancedText(gStringVar4, sInfo->condition, 0); PrintMenuWindowText(gStringVar4); PutWindowTilemap(WIN_TEXT); @@ -928,20 +925,20 @@ static bool8 TryPrintNextEnhancement(void) while (1) { - sInfo->statId++; - if (sInfo->statId < FLAVOR_COUNT) + sInfo->condition++; + if (sInfo->condition < CONDITION_COUNT) { - if (sInfo->enhancements[sInfo->statId] != 0) + if (sInfo->enhancements[sInfo->condition] != 0) break; } else { - sInfo->statId = FLAVOR_COUNT; + sInfo->condition = CONDITION_COUNT; return FALSE; } } - BufferEnhancedStatText(gStringVar4, sInfo->statId, sInfo->enhancements[sInfo->statId]); + BufferEnhancedText(gStringVar4, sInfo->condition, sInfo->enhancements[sInfo->condition]); PrintMenuWindowText(gStringVar4); CopyWindowToVram(WIN_TEXT, COPYWIN_GFX); @@ -969,7 +966,7 @@ static void PrintMenuWindowText(const u8 *message) AddTextPrinterParameterized(WIN_TEXT, FONT_NORMAL, gStringVar4, 0, 1, 0, NULL); } -static void BufferEnhancedStatText(u8 *dest, u8 statId, s16 enhancement) +static void BufferEnhancedText(u8 *dest, u8 condition, s16 enhancement) { switch (enhancement) { @@ -979,7 +976,7 @@ static void BufferEnhancedStatText(u8 *dest, u8 statId, s16 enhancement) case -32768 ... -1: // if < 0 if (enhancement) dest[(u16)enhancement] += 0; // something you can't imagine - StringCopy(dest, sContestStatNames[statId]); + StringCopy(dest, sConditionNames[condition]); StringAppend(dest, gText_WasEnhanced); break; case 0: @@ -992,36 +989,36 @@ static void GetMonConditions(struct Pokemon *mon, u8 *data) { u16 i; - for (i = 0; i < FLAVOR_COUNT; i++) - data[i] = GetMonData(mon, sMonDataConditions[i]); + for (i = 0; i < CONDITION_COUNT; i++) + data[i] = GetMonData(mon, sConditionToMonData[i]); } static void AddPokeblockToConditions(struct Pokeblock *pokeblock, struct Pokemon *mon) { u16 i; - s16 cstat; + s16 stat; u8 data; - if (GetMonData(mon, MON_DATA_SHEEN) != 255) + if (GetMonData(mon, MON_DATA_SHEEN) != MAX_SHEEN) { CalculatePokeblockEffectiveness(pokeblock, mon); - for (i = 0; i < FLAVOR_COUNT; i++) + for (i = 0; i < CONDITION_COUNT; i++) { - data = GetMonData(mon, sMonDataConditions[i]); - cstat = data + sInfo->pokeblockStatBoosts[i]; - if (cstat < 0) - cstat = 0; - if (cstat > 255) - cstat = 255; - data = cstat; - SetMonData(mon, sMonDataConditions[i], &data); + data = GetMonData(mon, sConditionToMonData[i]); + stat = data + sInfo->pokeblockStatBoosts[i]; + if (stat < 0) + stat = 0; + if (stat > MAX_CONDITION) + stat = MAX_CONDITION; + data = stat; + SetMonData(mon, sConditionToMonData[i], &data); } - cstat = (u8)(GetMonData(mon, MON_DATA_SHEEN)) + pokeblock->feel; - if (cstat > 255) - cstat = 255; + stat = (u8)(GetMonData(mon, MON_DATA_SHEEN)) + pokeblock->feel; + if (stat > MAX_SHEEN) + stat = MAX_SHEEN; - data = cstat; + data = stat; SetMonData(mon, MON_DATA_SHEEN, &data); } } @@ -1035,19 +1032,19 @@ static void CalculateConditionEnhancements(void) GetMonConditions(mon, sInfo->conditionsBeforeBlock); AddPokeblockToConditions(sInfo->pokeblock, mon); GetMonConditions(mon, sInfo->conditionsAfterBlock); - for (i = 0; i < FLAVOR_COUNT; i++) + for (i = 0; i < CONDITION_COUNT; i++) sInfo->enhancements[i] = sInfo->conditionsAfterBlock[i] - sInfo->conditionsBeforeBlock[i]; } static void CalculatePokeblockEffectiveness(struct Pokeblock *pokeblock, struct Pokemon *mon) { - s8 i, direction, taste; + s8 i, direction, flavor; - sInfo->pokeblockStatBoosts[0] = pokeblock->spicy; - sInfo->pokeblockStatBoosts[1] = pokeblock->sour; - sInfo->pokeblockStatBoosts[2] = pokeblock->bitter; - sInfo->pokeblockStatBoosts[3] = pokeblock->sweet; - sInfo->pokeblockStatBoosts[4] = pokeblock->dry; + sInfo->pokeblockStatBoosts[CONDITION_COOL] = pokeblock->spicy; + sInfo->pokeblockStatBoosts[CONDITION_TOUGH] = pokeblock->sour; + sInfo->pokeblockStatBoosts[CONDITION_SMART] = pokeblock->bitter; + sInfo->pokeblockStatBoosts[CONDITION_CUTE] = pokeblock->sweet; + sInfo->pokeblockStatBoosts[CONDITION_BEAUTY] = pokeblock->dry; if (gPokeblockGain > 0) direction = 1; @@ -1056,7 +1053,7 @@ static void CalculatePokeblockEffectiveness(struct Pokeblock *pokeblock, struct else return; - for (i = 0; i < FLAVOR_COUNT; i++) + for (i = 0; i < CONDITION_COUNT; i++) { s16 amount = sInfo->pokeblockStatBoosts[i]; s8 boost = amount / 10; @@ -1064,9 +1061,9 @@ static void CalculatePokeblockEffectiveness(struct Pokeblock *pokeblock, struct if (amount % 10 >= 5) // round to the nearest boost++; - taste = GetMonFlavorRelation(mon, sFlavors[i]); - if (taste == direction) - sInfo->pokeblockStatBoosts[i] += boost * taste; + flavor = GetMonFlavorRelation(mon, sConditionToFlavor[i]); + if (flavor == direction) + sInfo->pokeblockStatBoosts[i] += boost * flavor; } } @@ -1075,7 +1072,7 @@ static bool8 IsSheenMaxed(void) if (GetBoxOrPartyMonData(sMenu->party[sMenu->info.curSelection].boxId, sMenu->party[sMenu->info.curSelection].monId, MON_DATA_SHEEN, - NULL) == 255) + NULL) == MAX_SHEEN) return TRUE; else return FALSE; @@ -1125,7 +1122,7 @@ static void LoadAndCreateUpDownSprites(void) LoadSpritePalette(&sSpritePalette_UpDown); sInfo->numEnhancements = 0; - for (i = 0; i < FLAVOR_COUNT; i++) + for (i = 0; i < CONDITION_COUNT; i++) { if (sInfo->enhancements[i] != 0) { @@ -1487,7 +1484,7 @@ static bool8 LoadNewSelection_CancelToMon(void) sMenu->info.helperState++; break; case 2: - if (!TryUpdateConditionMonTransitionOn(&sMenu->graph, &sMenu->curMonXOffset)) + if (!ConditionGraph_UpdateMonEnter(&sMenu->graph, &sMenu->curMonXOffset)) { // Load the new adjacent pokemon (not the one being shown) LoadMonInfo(sMenu->toLoadSelection, sMenu->toLoadId); @@ -1514,7 +1511,7 @@ static bool8 LoadNewSelection_MonToCancel(void) switch (sMenu->info.helperState) { case 0: - if (!TryUpdateConditionMonTransitionOff(&sMenu->graph, &sMenu->curMonXOffset)) + if (!ConditionGraph_UpdateMonExit(&sMenu->graph, &sMenu->curMonXOffset)) sMenu->info.helperState++; break; case 1: @@ -1550,7 +1547,7 @@ static bool8 LoadNewSelection_MonToMon(void) sMenu->info.helperState++; break; case 2: - if (!TryUpdateConditionMonTransitionOn(&sMenu->graph, &sMenu->curMonXOffset)) + if (!ConditionGraph_UpdateMonEnter(&sMenu->graph, &sMenu->curMonXOffset)) { // Load the new adjacent pokemon (not the one being shown) LoadMonInfo(sMenu->toLoadSelection, sMenu->toLoadId); @@ -1599,10 +1596,7 @@ static void SpriteCB_SelectionIconCancel(struct Sprite *sprite) static void CalculateNumAdditionalSparkles(u8 monIndex) { u8 sheen = GetMonData(&gPlayerParty[monIndex], MON_DATA_SHEEN); - - sMenu->numSparkles[sMenu->curLoadId] = (sheen != 255) - ? sheen / (255 / (MAX_CONDITION_SPARKLES - 1) + 1) - : MAX_CONDITION_SPARKLES - 1; + sMenu->numSparkles[sMenu->curLoadId] = GET_NUM_CONDITION_SPARKLES(sheen); } static void LoadConditionGfx(void) From 45908873591abb9fcb87a68721690c9a35559139 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 10 Nov 2021 17:01:21 -0500 Subject: [PATCH 164/417] Clean up some register constant use --- include/gba/io_reg.h | 1 + src/battle_anim_effects_2.c | 4 ++-- src/battle_anim_ghost.c | 4 ++-- src/battle_anim_water.c | 2 +- src/battle_dome.c | 2 +- src/battle_main.c | 4 ++-- src/field_screen_effect.c | 2 +- src/intro.c | 4 ++-- src/libisagbprn.c | 10 +++++----- src/librfu_intr.c | 4 ++-- src/multiboot.c | 18 +++++++++--------- src/overworld.c | 2 +- src/rayquaza_scene.c | 2 +- 13 files changed, 30 insertions(+), 29 deletions(-) diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h index 1daa99e1d7..148ce31db4 100644 --- a/include/gba/io_reg.h +++ b/include/gba/io_reg.h @@ -482,6 +482,7 @@ #define REG_SIODATA32 (*(vu32 *)REG_ADDR_SIODATA32) #define REG_SIOMLT_SEND (*(vu16 *)REG_ADDR_SIOMLT_SEND) #define REG_SIOMLT_RECV (*(vu64 *)REG_ADDR_SIOMLT_RECV) +#define REG_SIOMULTI(n) (*(vu16 *)(REG_ADDR_SIOMULTI0 + (n) * 2)) #define REG_SIOMULTI0 (*(vu16 *)REG_ADDR_SIOMULTI0) #define REG_SIOMULTI1 (*(vu16 *)REG_ADDR_SIOMULTI1) #define REG_SIOMULTI2 (*(vu16 *)REG_ADDR_SIOMULTI2) diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 27149873d6..5944bc5119 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -2394,12 +2394,12 @@ void AnimTask_SketchDrawMon(u8 taskId) if (GetBattlerSpriteBGPriorityRank(gBattleAnimTarget) == 1) { task->data[6] = gBattle_BG1_X; - params.dmaDest = (u16 *)REG_ADDR_BG1HOFS; + params.dmaDest = ®_BG1HOFS; } else { task->data[6] = gBattle_BG2_X; - params.dmaDest = (u16 *)REG_ADDR_BG2HOFS; + params.dmaDest = ®_BG2HOFS; } for (i = task->data[0] - 0x40; i <= task->data[0]; i++) diff --git a/src/battle_anim_ghost.c b/src/battle_anim_ghost.c index 03a003c604..60e943adf6 100644 --- a/src/battle_anim_ghost.c +++ b/src/battle_anim_ghost.c @@ -653,9 +653,9 @@ static void AnimTask_SpiteTargetShadow_Step1(u8 taskId) startLine = 0; if (position == 1) - task->data[10] = ScanlineEffect_InitWave(startLine, startLine + 64, 2, 6, 0, 4, 1); + task->data[10] = ScanlineEffect_InitWave(startLine, startLine + 64, 2, 6, 0, SCANLINE_EFFECT_REG_BG1HOFS, 1); else - task->data[10] = ScanlineEffect_InitWave(startLine, startLine + 64, 2, 6, 0, 8, 1); + task->data[10] = ScanlineEffect_InitWave(startLine, startLine + 64, 2, 6, 0, SCANLINE_EFFECT_REG_BG2HOFS, 1); task->data[15]++; break; diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index 50918a24ed..44df784217 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -960,7 +960,7 @@ static void AnimTask_SurfWaveScanlineEffect(u8 taskId) else gScanlineEffectRegBuffers[0][i] = gScanlineEffectRegBuffers[1][i] = task->data[2]; - params.dmaDest = (vu16 *)REG_ADDR_BLDALPHA; + params.dmaDest = ®_BLDALPHA; params.dmaControl = SCANLINE_EFFECT_DMACNT_16BIT; params.initState = 1; params.unused9 = 0; diff --git a/src/battle_dome.c b/src/battle_dome.c index 45df83c7c5..1b067924ff 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -870,7 +870,7 @@ static const struct WindowTemplate sInfoCardWindowTemplates[] = static const struct ScanlineEffectParams sTourneyTreeScanlineEffectParams = { - .dmaDest = (void *)REG_ADDR_BG3CNT, + .dmaDest = ®_BG3CNT, .dmaControl = SCANLINE_EFFECT_DMACNT_16BIT, .initState = 1, }; diff --git a/src/battle_main.c b/src/battle_main.c index 8079546d48..85e1e17969 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -249,13 +249,13 @@ u8 gBattleControllerData[MAX_BATTLERS_COUNT]; // Used by the battle controllers static const struct ScanlineEffectParams sIntroScanlineParams16Bit = { - (void *)REG_ADDR_BG3HOFS, SCANLINE_EFFECT_DMACNT_16BIT, 1 + ®_BG3HOFS, SCANLINE_EFFECT_DMACNT_16BIT, 1 }; // unused static const struct ScanlineEffectParams sIntroScanlineParams32Bit = { - (void *)REG_ADDR_BG3HOFS, SCANLINE_EFFECT_DMACNT_32BIT, 1 + ®_BG3HOFS, SCANLINE_EFFECT_DMACNT_32BIT, 1 }; const struct SpriteTemplate gUnusedBattleInitSprite = diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index c27ec6c4c3..0cf5e41456 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -56,7 +56,7 @@ const s32 gMaxFlashLevel = ARRAY_COUNT(sFlashLevelPixelRadii) - 1; const struct ScanlineEffectParams sFlashEffectParams = { - (void *)REG_ADDR_WIN0H, + ®_WIN0H, ((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1, 1 }; diff --git a/src/intro.c b/src/intro.c index 5cf99c97e6..024706f6c2 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1848,7 +1848,7 @@ static void Task_Scene3_StartGroudon(u8 taskId) { gTasks[taskId].tState = 0; gTasks[taskId].func = Task_Scene3_Groudon; - ScanlineEffect_InitWave(0, 160, 4, 4, 1, 4, 0); + ScanlineEffect_InitWave(0, 160, 4, 4, 1, SCANLINE_EFFECT_REG_BG1HOFS, 0); } #define tScreenX data[1] @@ -2058,7 +2058,7 @@ static void Task_Scene3_LoadKyogre(u8 taskId) gTasks[taskId].tDelay = 16; gTasks[taskId].tZoom = 256; PanFadeAndZoomScreen(gTasks[taskId].tScreenX, gTasks[taskId].tScreenY, gTasks[taskId].tZoom, 0); - ScanlineEffect_InitWave(0, 0xA0, 4, 4, 1, 6, 0); + ScanlineEffect_InitWave(0, 0xA0, 4, 4, 1, SCANLINE_EFFECT_REG_BG1VOFS, 0); } static void Task_Scene3_Kyogre(u8 taskId) diff --git a/src/libisagbprn.c b/src/libisagbprn.c index e0e979e95e..69c6986aef 100644 --- a/src/libisagbprn.c +++ b/src/libisagbprn.c @@ -31,7 +31,7 @@ void AGBPrintFlush1Block(void); void AGBPrintInit(void) { volatile struct AGBPrintStruct *pPrint = (struct AGBPrintStruct *)AGB_PRINT_STRUCT_ADDR; - u16 *pWSCNT = (u16 *)REG_ADDR_WAITCNT; + u16 *pWSCNT = ®_WAITCNT; u16 *pProtect = (u16 *)AGB_PRINT_PROTECT_ADDR; u16 nOldWSCNT = *pWSCNT; *pWSCNT = WSCNT_DATA; @@ -57,7 +57,7 @@ static void AGBPutcInternal(const char cChr) void AGBPutc(const char cChr) { - u16 *pWSCNT = (u16 *)REG_ADDR_WAITCNT; + u16 *pWSCNT = ®_WAITCNT; u16 nOldWSCNT = *pWSCNT; volatile struct AGBPrintStruct *pPrint; *pWSCNT = WSCNT_DATA; @@ -71,7 +71,7 @@ void AGBPutc(const char cChr) void AGBPrint(const char *pBuf) { volatile struct AGBPrintStruct *pPrint = (struct AGBPrintStruct *)AGB_PRINT_STRUCT_ADDR; - u16 *pWSCNT = (u16 *)REG_ADDR_WAITCNT; + u16 *pWSCNT = ®_WAITCNT; u16 nOldWSCNT = *pWSCNT; *pWSCNT = WSCNT_DATA; while (*pBuf) @@ -105,9 +105,9 @@ static void AGBPrintTransferDataInternal(u32 bAllData) pProtect = (u16 *)AGB_PRINT_PROTECT_ADDR; pPrint = (struct AGBPrintStruct *)AGB_PRINT_STRUCT_ADDR; lpfnFuncFlush = (LPFN_PRINT_FLUSH)AGB_PRINT_FLUSH_ADDR; - pIME = (u16 *)REG_ADDR_IME; + pIME = ®_IME; nIME = *pIME; - pWSCNT = (u16 *)REG_ADDR_WAITCNT; + pWSCNT = ®_WAITCNT; nOldWSCNT = *pWSCNT; *pIME = nIME & ~1; *pWSCNT = WSCNT_DATA; diff --git a/src/librfu_intr.c b/src/librfu_intr.c index 19ea60b067..d902b1c45b 100644 --- a/src/librfu_intr.c +++ b/src/librfu_intr.c @@ -336,8 +336,8 @@ static u16 handshake_wait(u16 slot) static void STWI_set_timer_in_RAM(u8 count) { - vu16* regTMCNTL = (vu16*)(REG_ADDR_TMCNT_L + gSTWIStatus->timerSelect * 4); - vu16* regTMCNTH = (vu16*)(REG_ADDR_TMCNT_H + gSTWIStatus->timerSelect * 4); + vu16* regTMCNTL = ®_TMCNT_L(gSTWIStatus->timerSelect); + vu16* regTMCNTH = ®_TMCNT_H(gSTWIStatus->timerSelect); REG_IME = 0; switch (count) { diff --git a/src/multiboot.c b/src/multiboot.c index 19245b5b33..15b062ed65 100644 --- a/src/multiboot.c +++ b/src/multiboot.c @@ -90,7 +90,7 @@ output_burst: k = 0x0e; for (i = MULTIBOOT_NCHILD; i != 0; i--) { - if (*(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2) != 0xffff) + if (REG_SIOMULTI(i) != 0xffff) { break; } @@ -102,7 +102,7 @@ output_burst: for (i = MULTIBOOT_NCHILD; i != 0; i--) { - j = *(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2); + j = REG_SIOMULTI(i); if (mp->client_bit & (1 << i)) { if (j != ((MULTIBOOT_CLIENT_INFO << 8) | (1 << i))) @@ -141,7 +141,7 @@ output_burst: mp->probe_target_bit = 0; for (i = MULTIBOOT_NCHILD; i != 0; i--) { - j = *(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2); + j = REG_SIOMULTI(i); if ((j >> 8) == MULTIBOOT_CLIENT_INFO) { MultiBoot_required_data[i - 1] = j; @@ -166,7 +166,7 @@ output_burst: { if (mp->probe_target_bit & (1 << i)) { - j = *(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2); + j = REG_SIOMULTI(i); if (j != MultiBoot_required_data[i - 1]) { mp->probe_target_bit ^= 1 << i; @@ -179,7 +179,7 @@ output_burst: k = 1; for (i = MULTIBOOT_NCHILD; i != 0; i--) { - j = *(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2); + j = REG_SIOMULTI(i); mp->client_data[i - 1] = j; if (mp->probe_target_bit & (1 << i)) { @@ -214,7 +214,7 @@ output_burst: case 0xd1: for (i = MULTIBOOT_NCHILD; i != 0; i--) { - j = *(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2); + j = REG_SIOMULTI(i); if (mp->probe_target_bit & (1 << i)) { if ((j >> 8) != MULTIBOOT_CLIENT_DLREADY) @@ -242,7 +242,7 @@ output_burst: { if (mp->probe_target_bit & (1 << i)) { - j = *(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2); + j = REG_SIOMULTI(i); if ((j >> 8) != (MULTIBOOT_MASTER_START_PROBE + 1 - (mp->probe_count >> 1)) || ((j & 0xff) != (1 << i))) { @@ -391,7 +391,7 @@ static int MultiBootHandShake(struct MultiBootParam *mp) default: for (i = MULTIBOOT_NCHILD; i != 0; i--) { - j = *(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2); + j = REG_SIOMULTI(i); if ((mp->client_bit & (1 << i)) && j != must_data) { @@ -413,7 +413,7 @@ static int MultiBootHandShake(struct MultiBootParam *mp) case 0xe8: for (i = MULTIBOOT_NCHILD; i != 0; i--) { - j = *(vu16 *)(REG_ADDR_SIOMULTI0 + i * 2); + j = REG_SIOMULTI(i); if ((mp->client_bit & (1 << i)) && j != must_data) { MultiBootInit(mp); diff --git a/src/overworld.c b/src/overworld.c index 9a5c41a7f1..c9aa9ba57f 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -313,7 +313,7 @@ static const struct BgTemplate sOverworldBgTemplates[] = static const struct ScanlineEffectParams sFlashEffectParams = { - (void *)REG_ADDR_WIN0H, + ®_WIN0H, ((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1, 1, 0, diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c index 51498fa1d6..6525daa1e5 100644 --- a/src/rayquaza_scene.c +++ b/src/rayquaza_scene.c @@ -490,7 +490,7 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_KyogreDorsalFin = static const struct ScanlineEffectParams sScanlineParams_DuoFight_Clouds = { - .dmaDest = (vu16 *)REG_ADDR_BG1HOFS, + .dmaDest = ®_BG1HOFS, .dmaControl = SCANLINE_EFFECT_DMACNT_16BIT, .initState = 1 }; From 7efdc0902b5951575560ee44023c6ce8f240a4b5 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 10 Nov 2021 18:52:30 -0500 Subject: [PATCH 165/417] Finish condition graph doc --- include/menu_specialized.h | 115 +++++++----- include/pokenav.h | 2 +- src/menu_specialized.c | 370 +++++++++++++++++++++---------------- src/pokenav_conditions_1.c | 30 +-- src/pokenav_conditions_2.c | 42 ++--- src/use_pokeblock.c | 30 +-- 6 files changed, 324 insertions(+), 265 deletions(-) diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 2f212b5d69..146b930b43 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -7,6 +7,14 @@ #include "pokemon.h" #include "constants/berry.h" +// Window IDs for the Player PC Mailbox +enum { + MAILBOXWIN_TITLE, + MAILBOXWIN_LIST, + MAILBOXWIN_OPTIONS, + MAILBOXWIN_COUNT +}; + enum { TAG_CONDITION_MON = 100, TAG_CONDITION_BALL, @@ -18,34 +26,19 @@ enum { TAG_CONDITION_MARKINGS_MENU_2, // Used implicitly by CreateMonMarkingsMenuSprites }; - #define MAX_CONDITION_SPARKLES 10 // The number of extra sparkles shown on a Pokémon's condition screen. // All Pokémon start with 1, so the max here is MAX_CONDITION_SPARKLES - 1 #define GET_NUM_CONDITION_SPARKLES(sheen)((sheen) != MAX_SHEEN) ? (sheen) / ((u32)MAX_SHEEN / (MAX_CONDITION_SPARKLES - 1) + 1) : MAX_CONDITION_SPARKLES - 1; -// Window IDs for the Player PC Mailbox -enum { - MAILBOXWIN_TITLE, - MAILBOXWIN_LIST, - MAILBOXWIN_OPTIONS, - MAILBOXWIN_COUNT -}; - -struct UnknownSubStruct_81D1ED4 -{ - u16 unk0; - u16 unk2; -}; - -#define CONDITION_GRAPH_CENTER_X 155 -#define CONDITION_GRAPH_TOP_Y 56 +#define CONDITION_GRAPH_TOP_Y 56 #define CONDITION_GRAPH_BOTTOM_Y 121 -#define CONDITION_GRAPH_HEIGHT (CONDITION_GRAPH_BOTTOM_Y - CONDITION_GRAPH_TOP_Y + 1) -#define CONDITION_GRAPH_UNK_1 10 -#define CONDITION_GRAPH_UNK_2 9 -#define CONDITION_GRAPH_UNK 91 +#define CONDITION_GRAPH_HEIGHT (CONDITION_GRAPH_BOTTOM_Y - CONDITION_GRAPH_TOP_Y + 1) +#define CONDITION_GRAPH_CENTER_X 155 +#define CONDITION_GRAPH_CENTER_Y ((CONDITION_GRAPH_BOTTOM_Y + CONDITION_GRAPH_TOP_Y) / 2 + 3) +#define CONDITION_GRAPH_UPDATE_STEPS 10 +#define CONDITION_GRAPH_LOAD_MAX 4 // Equivalent to flavor and contest values, but in a different order. enum { @@ -57,55 +50,75 @@ enum { CONDITION_COUNT }; -struct ConditionGraph -{ - /*0x000*/ u8 conditions[4][CONDITION_COUNT]; - /*0x014*/ struct UnknownSubStruct_81D1ED4 unk14[4][CONDITION_COUNT]; - /*0x064*/ struct UnknownSubStruct_81D1ED4 unk64[CONDITION_GRAPH_UNK_1][CONDITION_COUNT]; - /*0x12C*/ struct UnknownSubStruct_81D1ED4 unk12C[CONDITION_COUNT]; - /*0x140*/ u16 scanlineRight[CONDITION_GRAPH_HEIGHT][2]; - /*0x248*/ u16 scanlineLeft[CONDITION_GRAPH_HEIGHT][2]; - /*0x350*/ u16 unk350; - /*0x352*/ u16 unk352; - /*0x354*/ bool8 unk354; - /*0x355*/ u8 state; +// Yet another order. This one is the same (by coincidence) as the contest categories +enum { + GRAPH_COOL, + GRAPH_BEAUTY, + GRAPH_CUTE, + GRAPH_SMART, + GRAPH_TOUGH, }; +struct ConditionGraph +{ + /*0x000*/ u8 conditions[CONDITION_GRAPH_LOAD_MAX][CONDITION_COUNT]; + /*0x014*/ struct UCoords16 savedPositions[CONDITION_GRAPH_LOAD_MAX][CONDITION_COUNT]; + /*0x064*/ struct UCoords16 newPositions[CONDITION_GRAPH_UPDATE_STEPS][CONDITION_COUNT]; + /*0x12C*/ struct UCoords16 curPositions[CONDITION_COUNT]; + /*0x140*/ u16 scanlineRight[CONDITION_GRAPH_HEIGHT][2]; + /*0x248*/ u16 scanlineLeft[CONDITION_GRAPH_HEIGHT][2]; + /*0x350*/ u16 bottom; + /*0x352*/ u16 updateCounter; + /*0x354*/ bool8 needsDraw; + /*0x355*/ u8 scanlineResetState; +}; + +// Mailbox menu bool8 MailboxMenu_Alloc(u8 count); u8 MailboxMenu_AddWindow(u8 windowIdx); u8 MailboxMenu_CreateList(struct PlayerPCItemPageStruct *page); void MailboxMenu_AddScrollArrows(struct PlayerPCItemPageStruct *page); void MailboxMenu_Free(void); void MailboxMenu_RemoveWindow(u8 windowIdx); + +// Condition graph void ConditionGraph_Init(struct ConditionGraph *graph); -void sub_81D2108(struct ConditionGraph *graph); -void SetConditionGraphIOWindows(u8 bg); -void InitConditionGraphState(struct ConditionGraph *graph); -void sub_81D2230(struct ConditionGraph *graph); -bool8 SetupConditionGraphScanlineParams(struct ConditionGraph *graph); -bool8 TransitionConditionGraph(struct ConditionGraph *graph); -void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); -void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); -void MoveRelearnerPrintText(u8 *str); -bool16 MoveRelearnerRunTextPrinters(void); -void MoveRelearnerCreateYesNoMenu(void); -u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); -void InitMoveRelearnerWindows(bool8 useContextWindow); -s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst); +void ConditionGraph_InitWindow(u8 bg); +void ConditionGraph_InitResetScanline(struct ConditionGraph *graph); +bool8 ConditionGraph_ResetScanline(struct ConditionGraph *graph); +void ConditionGraph_Draw(struct ConditionGraph *graph); +bool8 ConditionGraph_TryUpdate(struct ConditionGraph *graph); +void ConditionGraph_Update(struct ConditionGraph *graph); +void ConditionGraph_CalcPositions(u8 *conditions, struct UCoords16 *positions); +void ConditionGraph_SetNewPositions(struct ConditionGraph *graph, struct UCoords16 *arg1, struct UCoords16 *arg2); + +// Condition menu +bool8 ConditionMenu_UpdateMonEnter(struct ConditionGraph *graph, s16 *x); +bool8 ConditionMenu_UpdateMonExit(struct ConditionGraph *graph, s16 *x); +bool8 MoveConditionMonOnscreen(s16 *x); +bool8 MoveConditionMonOffscreen(s16 *x); void GetConditionMenuMonNameAndLocString(u8 *locationDst, u8 *nameDst, u16 boxId, u16 monId, u16 partyId, u16 numMons, bool8 excludesCancel); void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *sheen, u16 boxId, u16 monId, u16 partyId, u16 id, u16 numMons, bool8 excludesCancel); void GetConditionMenuMonGfx(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 partyId, u16 numMons, bool8 excludesCancel); -bool8 MoveConditionMonOnscreen(s16 *x); -bool8 MoveConditionMonOffscreen(s16 *x); -bool8 ConditionGraph_UpdateMonEnter(struct ConditionGraph *graph, s16 *x); -bool8 ConditionGraph_UpdateMonExit(struct ConditionGraph *graph, s16 *x); void LoadConditionMonPicTemplate(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal); void LoadConditionSelectionIcons(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals); +s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst); + +// Condition sparkles void LoadConditionSparkle(struct SpriteSheet *sheet, struct SpritePalette *pal); void ResetConditionSparkleSprites(struct Sprite **sprites); void CreateConditionSparkleSprites(struct Sprite **sprites, u8 monSpriteId, u8 count); void DestroyConditionSparkleSprites(struct Sprite **sprites); void FreeConditionSparkles(struct Sprite **sprites); + +// Move relearner +void MoveRelearnerPrintText(u8 *str); +bool16 MoveRelearnerRunTextPrinters(void); +void MoveRelearnerCreateYesNoMenu(void); +u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); +void InitMoveRelearnerWindows(bool8 useContextWindow); + +// Level up window void DrawLevelUpWindowPg1(u16 windowId, u16 *statsBefore, u16 *statsAfter, u8 bgClr, u8 fgClr, u8 shadowClr); void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgClr, u8 fgClr, u8 shadowClr); void GetMonLevelUpWindowStats(struct Pokemon *mon, u16 *currStats); diff --git a/include/pokenav.h b/include/pokenav.h index 445ce752be..b8c2178d1b 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -437,7 +437,7 @@ u32 GetPartyConditionCallback(void); void FreePartyConditionSubstruct1(void); bool32 LoadPartyConditionMenuGfx(void); bool32 IsConditionMenuSearchMode(void); -struct ConditionGraph *GetConditionGraphDataPtr(void); +struct ConditionGraph *GetConditionGraphPtr(void); u16 GetConditionGraphCurrentMonIndex(void); u16 GetMonListCount(void); u8 GetNumConditionMonSparkles(void); diff --git a/src/menu_specialized.c b/src/menu_specialized.c index abeaba2c95..074621de4b 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -32,8 +32,8 @@ EWRAM_DATA static u8 sMailboxWindowIds[MAILBOXWIN_COUNT] = {0}; EWRAM_DATA static struct ListMenuItem *sMailboxList = NULL; static void MailboxMenu_MoveCursorFunc(s32, bool8, struct ListMenu *); -static void sub_81D24A4(struct ConditionGraph *); -static void sub_81D2634(struct ConditionGraph *); +static void ConditionGraph_CalcRightHalf(struct ConditionGraph *); +static void ConditionGraph_CalcLeftHalf(struct ConditionGraph *); static void MoveRelearnerCursorCallback(s32, bool8, struct ListMenu *); static void MoveRelearnerDummy(void); static void SetNextConditionSparkle(struct Sprite *); @@ -85,7 +85,7 @@ static const struct ScanlineEffectParams sConditionGraphScanline = .initState = 1, }; -static const u8 sUnknown_08625410[MAX_CONDITION + 1] = +static const u8 sConditionToLineLength[MAX_CONDITION + 1] = { 4, 5, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, @@ -190,6 +190,10 @@ static const struct ListMenuTemplate sMoveRelearnerMovesListTemplate = .cursorKind = 0 }; +//-------------- +// Mailbox menu +//-------------- + bool8 MailboxMenu_Alloc(u8 count) { u8 i; @@ -303,67 +307,83 @@ void MailboxMenu_Free(void) Free(sMailboxList); } +//--------------------------------------- +// Condition graph +// +// This is the graph in the Pokénav and +// Pokéblock case that shows a Pokémon's +// conditions (Beauty, Tough, etc.). +// It works by using scanlines to +// selectively reveal a bg that has been +// filled with the graph color. +//--------------------------------------- + +#define UNK_VAL(n, s)(((n) >> (s)) + (((n) >> ((s) - 1)) & 1)) + void ConditionGraph_Init(struct ConditionGraph *graph) { u8 i, j; for (j = 0; j < CONDITION_COUNT; j++) { - for (i = 0; i < CONDITION_GRAPH_UNK_1; i++) + for (i = 0; i < CONDITION_GRAPH_UPDATE_STEPS; i++) { - graph->unk64[i][j].unk0 = 0; - graph->unk64[i][j].unk2 = 0; + graph->newPositions[i][j].x = 0; + graph->newPositions[i][j].y = 0; } - for (i = 0; i < 4; i++) + + for (i = 0; i < CONDITION_GRAPH_LOAD_MAX; i++) { graph->conditions[i][j] = 0; - graph->unk14[i][j].unk0 = CONDITION_GRAPH_CENTER_X; - graph->unk14[i][j].unk2 = CONDITION_GRAPH_UNK; + graph->savedPositions[i][j].x = CONDITION_GRAPH_CENTER_X; + graph->savedPositions[i][j].y = CONDITION_GRAPH_CENTER_Y; } - graph->unk12C[j].unk0 = 0; - graph->unk12C[j].unk2 = 0; + graph->curPositions[j].x = 0; + graph->curPositions[j].y = 0; } - graph->unk354 = FALSE; - graph->unk352 = 0; + graph->needsDraw = FALSE; + graph->updateCounter = 0; } -void sub_81D1F84(struct ConditionGraph *graph, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2) +// Fills the newPositions array with incremental positions between +// old and new for the graph transition when switching between Pokémon. +void ConditionGraph_SetNewPositions(struct ConditionGraph *graph, struct UCoords16 *old, struct UCoords16 *new) { u16 i, j; - s32 r5, r6; + s32 coord, increment; for (i = 0; i < CONDITION_COUNT; i++) { - r5 = arg1[i].unk0 << 8; - r6 = ((arg2[i].unk0 - arg1[i].unk0) << 8) / CONDITION_GRAPH_UNK_1; - for (j = 0; j < CONDITION_GRAPH_UNK_2; j++) + coord = old[i].x << 8; + increment = ((new[i].x - old[i].x) << 8) / CONDITION_GRAPH_UPDATE_STEPS; + for (j = 0; j < CONDITION_GRAPH_UPDATE_STEPS - 1; j++) { - graph->unk64[j][i].unk0 = (r5 >> 8) + ((r5 >> 7) & 1); - r5 += r6; + graph->newPositions[j][i].x = UNK_VAL(coord, 8); + coord += increment; } - graph->unk64[j][i].unk0 = arg2[i].unk0; + graph->newPositions[j][i].x = new[i].x; - r5 = arg1[i].unk2 << 8; - r6 = ((arg2[i].unk2 - arg1[i].unk2) << 8) / CONDITION_GRAPH_UNK_1; - for (j = 0; j < CONDITION_GRAPH_UNK_2; j++) + coord = old[i].y << 8; + increment = ((new[i].y - old[i].y) << 8) / CONDITION_GRAPH_UPDATE_STEPS; + for (j = 0; j < CONDITION_GRAPH_UPDATE_STEPS - 1; j++) { - graph->unk64[j][i].unk2 = (r5 >> 8) + ((r5 >> 7) & 1); - r5 += r6; + graph->newPositions[j][i].y = UNK_VAL(coord, 8); + coord += increment; } - graph->unk64[j][i].unk2 = arg2[i].unk2; + graph->newPositions[j][i].y = new[i].y; } - graph->unk352 = 0; + graph->updateCounter = 0; } -bool8 TransitionConditionGraph(struct ConditionGraph *graph) +bool8 ConditionGraph_TryUpdate(struct ConditionGraph *graph) { - if (graph->unk352 < CONDITION_GRAPH_UNK_1) + if (graph->updateCounter < CONDITION_GRAPH_UPDATE_STEPS) { - sub_81D2230(graph); - return (++graph->unk352 != CONDITION_GRAPH_UNK_1); + ConditionGraph_Update(graph); + return (++graph->updateCounter != CONDITION_GRAPH_UPDATE_STEPS); } else { @@ -371,51 +391,55 @@ bool8 TransitionConditionGraph(struct ConditionGraph *graph) } } -void InitConditionGraphState(struct ConditionGraph *graph) +void ConditionGraph_InitResetScanline(struct ConditionGraph *graph) { - graph->state = 0; + graph->scanlineResetState = 0; } -bool8 SetupConditionGraphScanlineParams(struct ConditionGraph *graph) +bool8 ConditionGraph_ResetScanline(struct ConditionGraph *graph) { struct ScanlineEffectParams params; - switch (graph->state) + switch (graph->scanlineResetState) { case 0: ScanlineEffect_Clear(); - graph->state++; + graph->scanlineResetState++; return TRUE; case 1: params = sConditionGraphScanline; ScanlineEffect_SetParams(params); - graph->state++; + graph->scanlineResetState++; return FALSE; default: return FALSE; } } -void sub_81D2108(struct ConditionGraph *graph) +void ConditionGraph_Draw(struct ConditionGraph *graph) { u16 i; - if (!graph->unk354) + if (!graph->needsDraw) return; - sub_81D24A4(graph); - sub_81D2634(graph); + ConditionGraph_CalcRightHalf(graph); + ConditionGraph_CalcLeftHalf(graph); for (i = 0; i < CONDITION_GRAPH_HEIGHT; i++) { - gScanlineEffectRegBuffers[1][(i + 55) * 2] = gScanlineEffectRegBuffers[0][(i + 55) * 2] = (graph->scanlineRight[i][0] << 8) | (graph->scanlineRight[i][1]); - gScanlineEffectRegBuffers[1][(i + 55) * 2 + 1] = gScanlineEffectRegBuffers[0][(i + 55) * 2 + 1] = (graph->scanlineLeft[i][0] << 8) | (graph->scanlineLeft[i][1]); + // Draw right half + gScanlineEffectRegBuffers[1][(i + CONDITION_GRAPH_TOP_Y - 1) * 2 + 0] = // double assignment + gScanlineEffectRegBuffers[0][(i + CONDITION_GRAPH_TOP_Y - 1) * 2 + 0] = (graph->scanlineRight[i][0] << 8) | (graph->scanlineRight[i][1]); + // Draw left half + gScanlineEffectRegBuffers[1][(i + CONDITION_GRAPH_TOP_Y - 1) * 2 + 1] = // double assignment + gScanlineEffectRegBuffers[0][(i + CONDITION_GRAPH_TOP_Y - 1) * 2 + 1] = (graph->scanlineLeft[i][0] << 8) | (graph->scanlineLeft[i][1]); } - graph->unk354 = FALSE; + graph->needsDraw = FALSE; } -void SetConditionGraphIOWindows(u8 bg) +void ConditionGraph_InitWindow(u8 bg) { u32 flags; @@ -434,146 +458,153 @@ void SetConditionGraphIOWindows(u8 bg) SetGpuReg(REG_OFFSET_WINOUT, flags); } -void sub_81D2230(struct ConditionGraph *graph) +void ConditionGraph_Update(struct ConditionGraph *graph) { u16 i; for (i = 0; i < CONDITION_COUNT; i++) - graph->unk12C[i] = graph->unk64[graph->unk352][i]; + graph->curPositions[i] = graph->newPositions[graph->updateCounter][i]; - graph->unk354 = TRUE; + graph->needsDraw = TRUE; } -static void sub_81D2278(struct ConditionGraph *graph, u16 *arg1, struct UnknownSubStruct_81D1ED4 *arg2, struct UnknownSubStruct_81D1ED4 *arg3, u8 arg4, u16 *arg5) +static void ConditionGraph_CalcLine(struct ConditionGraph *graph, u16 *scanline, struct UCoords16 *pos1, struct UCoords16 *pos2, bool8 dir, u16 *overflowScanline) { - u16 i, r8, r10, r0, var_30; + u16 i, height, top, bottom, x2; u16 *ptr; - s32 r4, var_2C = 0; + s32 x, xIncrement = 0; - if (arg2->unk2 < arg3->unk2) + if (pos1->y < pos2->y) { - r10 = arg2->unk2; - r0 = arg3->unk2; - r4 = arg2->unk0 << 10; - var_30 = arg3->unk0; - r8 = r0 - r10; - if (r8 != 0) - var_2C = ((var_30 - arg2->unk0) << 10) / r8; + top = pos1->y; + bottom = pos2->y; + x = pos1->x << 10; + x2 = pos2->x; + height = bottom - top; + if (height != 0) + xIncrement = ((x2 - pos1->x) << 10) / height; } else { - r0 = arg2->unk2; - r10 = arg3->unk2; - r4 = arg3->unk0 << 10; - var_30 = arg2->unk0; - r8 = r0 - r10; - if (r8 != 0) - var_2C = ((var_30 - arg3->unk0) << 10) / r8; + bottom = pos1->y; + top = pos2->y; + x = pos2->x << 10; + x2 = pos1->x; + height = bottom - top; + if (height != 0) + xIncrement = ((x2 - pos2->x) << 10) / height; } - r8++; - if (arg5 == NULL) + height++; + if (overflowScanline == NULL) { - arg1 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; - for (i = 0; i < r8; i++) + scanline += (top - CONDITION_GRAPH_TOP_Y) * 2; + for (i = 0; i < height; i++) { - arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4; - r4 += var_2C; - arg1 += 2; + scanline[dir] = UNK_VAL(x, 10) + dir; + x += xIncrement; + scanline += 2; } - ptr = arg1 - 2; + ptr = scanline - 2; } - else if (var_2C > 0) + else if (xIncrement > 0) { - arg5 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; + overflowScanline += (top - CONDITION_GRAPH_TOP_Y) * 2; // Less readable than the other loops, but it has to be written this way to match. - for (i = 0; i < r8; arg5[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4, r4 += var_2C, arg5 += 2, i++) + for (i = 0; i < height; overflowScanline[dir] = UNK_VAL(x, 10) + dir, x += xIncrement, overflowScanline += 2, i++) { - if (r4 >= (CONDITION_GRAPH_CENTER_X << 10)) + if (x >= (CONDITION_GRAPH_CENTER_X << 10)) break; } - graph->unk350 = r10 + i; - arg1 += (graph->unk350 - CONDITION_GRAPH_TOP_Y) * 2; - for (; i < r8; i++) + graph->bottom = top + i; + scanline += (graph->bottom - CONDITION_GRAPH_TOP_Y) * 2; + for (; i < height; i++) { - arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4; - r4 += var_2C; - arg1 += 2; + scanline[dir] = UNK_VAL(x, 10) + dir; + x += xIncrement; + scanline += 2; } - ptr = arg1 - 2; + ptr = scanline - 2; } - else if (var_2C < 0) + else if (xIncrement < 0) { - arg1 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; - for (i = 0; i < r8; i++) + scanline += (top - CONDITION_GRAPH_TOP_Y) * 2; + for (i = 0; i < height; i++) { - arg1[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4; - if (r4 < (CONDITION_GRAPH_CENTER_X << 10)) + scanline[dir] = UNK_VAL(x, 10) + dir; + if (x < (CONDITION_GRAPH_CENTER_X << 10)) { - arg1[arg4] = CONDITION_GRAPH_CENTER_X; + scanline[dir] = CONDITION_GRAPH_CENTER_X; break; } - r4 += var_2C; - arg1 += 2; + x += xIncrement; + scanline += 2; } - graph->unk350 = r10 + i; - arg5 += (graph->unk350 - CONDITION_GRAPH_TOP_Y) * 2; - for (; i < r8; i++) + graph->bottom = top + i; + overflowScanline += (graph->bottom - CONDITION_GRAPH_TOP_Y) * 2; + for (; i < height; i++) { - arg5[arg4] = (r4 >> 10) + ((r4 >> 9) & 1) + arg4; - r4 += var_2C; - arg5 += 2; + overflowScanline[dir] = UNK_VAL(x, 10) + dir; + x += xIncrement; + overflowScanline += 2; } - ptr = arg5 - 2; + ptr = overflowScanline - 2; } else { - graph->unk350 = r10; - arg1 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; - arg5 += (r10 - CONDITION_GRAPH_TOP_Y) * 2; - arg1[1] = arg2->unk0 + 1; - arg5[0] = arg3->unk0; - arg5[1] = CONDITION_GRAPH_CENTER_X; + graph->bottom = top; + scanline += (top - CONDITION_GRAPH_TOP_Y) * 2; + overflowScanline += (top - CONDITION_GRAPH_TOP_Y) * 2; + scanline[1] = pos1->x + 1; + overflowScanline[0] = pos2->x; + overflowScanline[1] = CONDITION_GRAPH_CENTER_X; return; } - ptr[arg4] = arg4 + var_30; + ptr[dir] = dir + x2; } -static void sub_81D24A4(struct ConditionGraph *graph) +static void ConditionGraph_CalcRightHalf(struct ConditionGraph *graph) { - u16 i, r6, varMax; + u16 i, y, bottom; - if (graph->unk12C[0].unk2 < graph->unk12C[1].unk2) + // Calculate Cool -> Beauty line + if (graph->curPositions[GRAPH_COOL].y < graph->curPositions[GRAPH_BEAUTY].y) { - r6 = graph->unk12C[0].unk2; - sub_81D2278(graph, graph->scanlineRight[0], &graph->unk12C[0], &graph->unk12C[1], 1, NULL); + y = graph->curPositions[GRAPH_COOL].y; + ConditionGraph_CalcLine(graph, graph->scanlineRight[0], &graph->curPositions[GRAPH_COOL], &graph->curPositions[GRAPH_BEAUTY], TRUE, NULL); } else { - r6 = graph->unk12C[1].unk2; - sub_81D2278(graph, graph->scanlineRight[0], &graph->unk12C[1], &graph->unk12C[0], 0, NULL); + y = graph->curPositions[GRAPH_BEAUTY].y; + ConditionGraph_CalcLine(graph, graph->scanlineRight[0], &graph->curPositions[GRAPH_BEAUTY], &graph->curPositions[GRAPH_COOL], FALSE, NULL); } - sub_81D2278(graph, graph->scanlineRight[0], &graph->unk12C[1], &graph->unk12C[2], 1, NULL); + // Calculate Beauty -> Cute line + // No need for conditional, positions on the Beauty line are always above the Cute line + ConditionGraph_CalcLine(graph, graph->scanlineRight[0], &graph->curPositions[GRAPH_BEAUTY], &graph->curPositions[GRAPH_CUTE], TRUE, NULL); - i = (graph->unk12C[2].unk2 <= graph->unk12C[3].unk2); - sub_81D2278(graph, graph->scanlineRight[0], &graph->unk12C[2], &graph->unk12C[3], i, graph->scanlineLeft[0]); - for (i = CONDITION_GRAPH_TOP_Y; i < r6; i++) + // Calculate Cute -> Tough line (includes left scanline because this crosses the halfway point) + i = (graph->curPositions[GRAPH_CUTE].y <= graph->curPositions[GRAPH_SMART].y); + ConditionGraph_CalcLine(graph, graph->scanlineRight[0], &graph->curPositions[GRAPH_CUTE], &graph->curPositions[GRAPH_SMART], i, graph->scanlineLeft[0]); + + // Clear down to new top + for (i = CONDITION_GRAPH_TOP_Y; i < y; i++) { graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] = 0; graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][1] = 0; } - for (i = graph->unk12C[0].unk2; i <= graph->unk350; i++) + for (i = graph->curPositions[GRAPH_COOL].y; i <= graph->bottom; i++) graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] = CONDITION_GRAPH_CENTER_X; - varMax = max(graph->unk350, graph->unk12C[2].unk2); - for (i = varMax + 1; i <= CONDITION_GRAPH_BOTTOM_Y; i++) + // Clear after new bottom + bottom = max(graph->bottom, graph->curPositions[GRAPH_CUTE].y); + for (i = bottom + 1; i <= CONDITION_GRAPH_BOTTOM_Y; i++) { graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] = 0; graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][1] = 0; @@ -581,42 +612,48 @@ static void sub_81D24A4(struct ConditionGraph *graph) for (i = CONDITION_GRAPH_TOP_Y; i <= CONDITION_GRAPH_BOTTOM_Y; i++) { - if (graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] == 0 && graph->scanlineRight[i - 56][1] != 0) + if (graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] == 0 + && graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][1] != 0) graph->scanlineRight[i - CONDITION_GRAPH_TOP_Y][0] = CONDITION_GRAPH_CENTER_X; } } -static void sub_81D2634(struct ConditionGraph *graph) +static void ConditionGraph_CalcLeftHalf(struct ConditionGraph *graph) { - s32 i, r6, varMax; + s32 i, y, bottom; - if (graph->unk12C[0].unk2 < graph->unk12C[4].unk2) + // Calculate Cool -> Tough line + if (graph->curPositions[GRAPH_COOL].y < graph->curPositions[GRAPH_TOUGH].y) { - r6 = graph->unk12C[0].unk2; - sub_81D2278(graph, graph->scanlineLeft[0], &graph->unk12C[0], &graph->unk12C[4], 0, NULL); + y = graph->curPositions[GRAPH_COOL].y; + ConditionGraph_CalcLine(graph, graph->scanlineLeft[0], &graph->curPositions[GRAPH_COOL], &graph->curPositions[GRAPH_TOUGH], FALSE, NULL); } else { - r6 = graph->unk12C[4].unk2; - sub_81D2278(graph, graph->scanlineLeft[0], &graph->unk12C[4], &graph->unk12C[0], 1, NULL); + y = graph->curPositions[GRAPH_TOUGH].y; + ConditionGraph_CalcLine(graph, graph->scanlineLeft[0], &graph->curPositions[GRAPH_TOUGH], &graph->curPositions[GRAPH_COOL], TRUE, NULL); } - sub_81D2278(graph, graph->scanlineLeft[0], &graph->unk12C[4], &graph->unk12C[3], 0, NULL); + // Calculate Tough -> Smart line + // No need for conditional, positions on the Tough line are always above the Smart line + ConditionGraph_CalcLine(graph, graph->scanlineLeft[0], &graph->curPositions[GRAPH_TOUGH], &graph->curPositions[GRAPH_SMART], FALSE, NULL); - for (i = CONDITION_GRAPH_TOP_Y; i < r6; i++) + // Clear down to new top + for (i = CONDITION_GRAPH_TOP_Y; i < y; i++) { - graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][0] = 0; - graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][1] = 0; + graph->scanlineLeft[i - CONDITION_GRAPH_TOP_Y][0] = 0; + graph->scanlineLeft[i - CONDITION_GRAPH_TOP_Y][1] = 0; } - for (i = graph->unk12C[0].unk2; i <= graph->unk350; i++) - graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][1] = CONDITION_GRAPH_CENTER_X; + for (i = graph->curPositions[GRAPH_COOL].y; i <= graph->bottom; i++) + graph->scanlineLeft[i - CONDITION_GRAPH_TOP_Y][1] = CONDITION_GRAPH_CENTER_X; - varMax = max(graph->unk350, graph->unk12C[3].unk2 + 1); - for (i = varMax; i <= CONDITION_GRAPH_BOTTOM_Y; i++) + // Clear after new bottom + bottom = max(graph->bottom, graph->curPositions[GRAPH_SMART].y + 1); + for (i = bottom; i <= CONDITION_GRAPH_BOTTOM_Y; i++) { - graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][0] = 0; - graph->scanlineRight[i + CONDITION_GRAPH_UNK_1][1] = 0; + graph->scanlineLeft[i - CONDITION_GRAPH_TOP_Y][0] = 0; + graph->scanlineLeft[i - CONDITION_GRAPH_TOP_Y][1] = 0; } for (i = 0; i < CONDITION_GRAPH_HEIGHT; i++) @@ -629,36 +666,41 @@ static void sub_81D2634(struct ConditionGraph *graph) } } -void sub_81D2754(u8 *conditions, struct UnknownSubStruct_81D1ED4 *arg1) +void ConditionGraph_CalcPositions(u8 *conditions, struct UCoords16 *positions) { - u8 r2, sinIdx; - s8 r12; + u8 lineLength, sinIdx; + s8 posIdx; u16 i; - r2 = sUnknown_08625410[*(conditions++)]; - arg1->unk0 = CONDITION_GRAPH_CENTER_X; - arg1->unk2 = CONDITION_GRAPH_UNK - r2; + // Cool is straight up-and-down (not angled), so no need for Sin + lineLength = sConditionToLineLength[*(conditions++)]; + positions[GRAPH_COOL].x = CONDITION_GRAPH_CENTER_X; + positions[GRAPH_COOL].y = CONDITION_GRAPH_CENTER_Y - lineLength; sinIdx = 64; - r12 = 0; + posIdx = GRAPH_COOL; for (i = 1; i < CONDITION_COUNT; i++) { sinIdx += 51; - if (--r12 < 0) - r12 = 4; + if (--posIdx < 0) + posIdx = CONDITION_COUNT - 1; - if (r12 == 2) + if (posIdx == GRAPH_CUTE) sinIdx++; - r2 = sUnknown_08625410[*(conditions++)]; - arg1[r12].unk0 = CONDITION_GRAPH_CENTER_X + ((r2 * gSineTable[64 + sinIdx]) >> 8); - arg1[r12].unk2 = CONDITION_GRAPH_UNK - ((r2 * gSineTable[sinIdx]) >> 8); + lineLength = sConditionToLineLength[*(conditions++)]; + positions[posIdx].x = CONDITION_GRAPH_CENTER_X + ((lineLength * gSineTable[64 + sinIdx]) >> 8); + positions[posIdx].y = CONDITION_GRAPH_CENTER_Y - ((lineLength * gSineTable[sinIdx]) >> 8); - if (r12 < 3 && (r2 != 32 || r12 != 2)) - arg1[r12].unk0 = CONDITION_GRAPH_CENTER_X + 1 + ((r2 * gSineTable[64 + sinIdx]) >> 8); + if (posIdx <= GRAPH_CUTE && (lineLength != 32 || posIdx != GRAPH_CUTE)) + positions[posIdx].x++; } } +//---------------- +// Move relearner +//---------------- + void InitMoveRelearnerWindows(bool8 useContextWindow) { u8 i; @@ -834,6 +876,10 @@ void MoveRelearnerCreateYesNoMenu(void) CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, 1, 0xE, 0); } +//---------------- +// Condition menu +//---------------- + s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst) { s32 ret; @@ -1005,15 +1051,15 @@ void GetConditionMenuMonConditions(struct ConditionGraph *graph, u8 *numSparkles numSparkles[id] = GET_NUM_CONDITION_SPARKLES(GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL)); - sub_81D2754(graph->conditions[id], graph->unk14[id]); + ConditionGraph_CalcPositions(graph->conditions[id], graph->savedPositions[id]); } else { for (i = 0; i < CONDITION_COUNT; i++) { graph->conditions[id][i] = 0; - graph->unk14[id][i].unk0 = CONDITION_GRAPH_CENTER_X; - graph->unk14[id][i].unk2 = CONDITION_GRAPH_UNK; + graph->savedPositions[id][i].x = CONDITION_GRAPH_CENTER_X; + graph->savedPositions[id][i].y = CONDITION_GRAPH_CENTER_Y; } } } @@ -1052,17 +1098,17 @@ bool8 MoveConditionMonOffscreen(s16 *x) return (*x != -80); } -bool8 ConditionGraph_UpdateMonEnter(struct ConditionGraph *graph, s16 *x) +bool8 ConditionMenu_UpdateMonEnter(struct ConditionGraph *graph, s16 *x) { - bool8 graphUpdating = TransitionConditionGraph(graph); + bool8 graphUpdating = ConditionGraph_TryUpdate(graph); bool8 monUpdating = MoveConditionMonOnscreen(x); return (graphUpdating || monUpdating); } -bool8 ConditionGraph_UpdateMonExit(struct ConditionGraph *graph, s16 *x) +bool8 ConditionMenu_UpdateMonExit(struct ConditionGraph *graph, s16 *x) { - bool8 graphUpdating = TransitionConditionGraph(graph); + bool8 graphUpdating = ConditionGraph_TryUpdate(graph); bool8 monUpdating = MoveConditionMonOffscreen(x); return (graphUpdating || monUpdating); diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index 8eacf2e701..607437c470 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -24,7 +24,7 @@ struct PokenavSub11 u8 fill2[0x6320 - 0x6308]; u8 locationText[NUM_CONDITION_MONS][24]; u8 nameText[NUM_CONDITION_MONS][64]; - struct ConditionGraph conditionData; + struct ConditionGraph graph; u8 numSparkles[NUM_CONDITION_MONS]; u8 monMarks[NUM_CONDITION_MONS]; s8 mark; @@ -52,7 +52,7 @@ bool32 PokenavCallback_Init_PartyCondition(void) if (structPtr == NULL) return FALSE; - ConditionGraph_Init(&structPtr->conditionData); + ConditionGraph_Init(&structPtr->graph); InitPartyConditionListParameters(); gKeyRepeatStartDelay = 20; structPtr->callback = HandlePartyConditionInput; @@ -66,7 +66,7 @@ bool32 PokenavCallback_Init_ConditionGraphFromSearch(void) if (structPtr == NULL) return FALSE; - ConditionGraph_Init(&structPtr->conditionData); + ConditionGraph_Init(&structPtr->graph); InitSearchResultsConditionList(); gKeyRepeatStartDelay = 20; structPtr->callback = HandlePartyConditionInput; @@ -192,7 +192,7 @@ static u8 SwitchConditionSummaryIndex(u8 moveUp) struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); r7 = (moveUp) ? structPtr->unk6788 : structPtr->unk6787; - sub_81D1F84(&structPtr->conditionData, structPtr->conditionData.unk14[structPtr->mark], structPtr->conditionData.unk14[r7]); + ConditionGraph_SetNewPositions(&structPtr->graph, structPtr->graph.savedPositions[structPtr->mark], structPtr->graph.savedPositions[r7]); wasNotLastMon = (monListPtr->currIndex != ((IsConditionMenuSearchMode() != 0) ? monListPtr->listCount : monListPtr->listCount - 1)); if (moveUp) { @@ -491,22 +491,22 @@ static void GetMonConditionGraphData(s16 listId, u8 loadId) { boxId = monListPtr->monData[listId].boxId; monId = monListPtr->monData[listId].monId; - structPtr->conditionData.conditions[loadId][CONDITION_COOL] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); - structPtr->conditionData.conditions[loadId][CONDITION_TOUGH] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); - structPtr->conditionData.conditions[loadId][CONDITION_SMART] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); - structPtr->conditionData.conditions[loadId][CONDITION_CUTE] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); - structPtr->conditionData.conditions[loadId][CONDITION_BEAUTY] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); + structPtr->graph.conditions[loadId][CONDITION_COOL] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); + structPtr->graph.conditions[loadId][CONDITION_TOUGH] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); + structPtr->graph.conditions[loadId][CONDITION_SMART] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); + structPtr->graph.conditions[loadId][CONDITION_CUTE] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); + structPtr->graph.conditions[loadId][CONDITION_BEAUTY] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); structPtr->numSparkles[loadId] = GET_NUM_CONDITION_SPARKLES(GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL)); structPtr->monMarks[loadId] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL); - sub_81D2754(structPtr->conditionData.conditions[loadId], structPtr->conditionData.unk14[loadId]); + ConditionGraph_CalcPositions(structPtr->graph.conditions[loadId], structPtr->graph.savedPositions[loadId]); } else { for (i = 0; i < CONDITION_COUNT; i++) { - structPtr->conditionData.conditions[loadId][i] = 0; - structPtr->conditionData.unk14[loadId][i].unk0 = CONDITION_GRAPH_CENTER_X; - structPtr->conditionData.unk14[loadId][i].unk2 = CONDITION_GRAPH_UNK; + structPtr->graph.conditions[loadId][i] = 0; + structPtr->graph.savedPositions[loadId][i].x = CONDITION_GRAPH_CENTER_X; + structPtr->graph.savedPositions[loadId][i].y = CONDITION_GRAPH_CENTER_Y; } } } @@ -542,10 +542,10 @@ u16 GetConditionGraphCurrentMonIndex(void) return monListPtr->currIndex; } -struct ConditionGraph *GetConditionGraphDataPtr(void) +struct ConditionGraph *GetConditionGraphPtr(void) { struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return &structPtr->conditionData; + return &structPtr->graph; } u8 GetMonMarkIndex(void) diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index ef07c9be62..c2e8cadea0 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -147,7 +147,7 @@ static void CreateConditionMonPic(u8 var); static void CreateMonMarkingsOrPokeballIndicators(void); static void CopyUnusedConditionWindowsToVram(void); static bool32 UpdateConditionGraphWindows(u8 a0, u16 a1, bool8 a2); -static void sub_81CEE44(void); +static void VBlankCB_PokenavConditionGraph(void); static void DoConditionGraphTransition(void); static void sub_81CEEC8(void); static void sub_81CEE68(void); @@ -237,7 +237,7 @@ static u32 LoopedTask_OpenPartyConditionGraph(s32 state) SetBgTilemapBuffer(2, structPtr->tilemapBuffers[2]); CopyBgTilemapBufferToVram(2); CopyPaletteIntoBufferUnfaded(gConditionGraphData_Pal, 0x30, 0x20); - SetConditionGraphIOWindows(2); + ConditionGraph_InitWindow(2); return LT_INC_AND_PAUSE; case 5: BgDmaFill(1, 0, 0, 1); @@ -309,21 +309,21 @@ static u32 LoopedTask_OpenPartyConditionGraph(s32 state) return LT_PAUSE; if (!IsConditionMenuSearchMode() && AreLeftHeaderSpritesMoving()) return LT_PAUSE; - SetVBlankCallback_(sub_81CEE44); + SetVBlankCallback_(VBlankCB_PokenavConditionGraph); return LT_INC_AND_PAUSE; case 17: DoConditionGraphTransition(); - InitConditionGraphState(GetConditionGraphDataPtr()); + ConditionGraph_InitResetScanline(GetConditionGraphPtr()); return LT_INC_AND_PAUSE; case 18: - if (SetupConditionGraphScanlineParams(GetConditionGraphDataPtr())) + if (ConditionGraph_ResetScanline(GetConditionGraphPtr())) return LT_PAUSE; return LT_INC_AND_PAUSE; case 19: ToggleGraphData(TRUE); return LT_INC_AND_PAUSE; case 20: - if (!ConditionGraph_UpdateMonEnter(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) + if (!ConditionMenu_UpdateMonEnter(GetConditionGraphPtr(), &structPtr->monTransitionX)) { ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); if (IsConditionMenuSearchMode() == TRUE || GetConditionGraphCurrentMonIndex() != GetMonListCount()) @@ -348,7 +348,7 @@ static u32 LoopedTask_ExitPartyConditionMenu(s32 state) DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 1: - if (ConditionGraph_UpdateMonExit(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) + if (ConditionMenu_UpdateMonExit(GetConditionGraphPtr(), &structPtr->monTransitionX)) return 2; ToggleGraphData(FALSE); return LT_INC_AND_CONTINUE; @@ -373,7 +373,7 @@ static u32 LoopedTask_ExitPartyConditionMenu(s32 state) static u32 LoopedTask_TransitionMons(s32 state) { struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); - struct ConditionGraph *graph = GetConditionGraphDataPtr(); + struct ConditionGraph *graph = GetConditionGraphPtr(); switch (state) { @@ -388,7 +388,7 @@ static u32 LoopedTask_TransitionMons(s32 state) DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 3: - TransitionConditionGraph(graph); + ConditionGraph_TryUpdate(graph); return LT_INC_AND_CONTINUE; case 4: if (!MoveConditionMonOffscreen(&structPtr->monTransitionX)) @@ -411,8 +411,8 @@ static u32 LoopedTask_TransitionMons(s32 state) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 9: - graph = GetConditionGraphDataPtr(); - if (!ConditionGraph_UpdateMonEnter(graph, &structPtr->monTransitionX)) + graph = GetConditionGraphPtr(); + if (!ConditionMenu_UpdateMonEnter(graph, &structPtr->monTransitionX)) { ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); if (IsConditionMenuSearchMode() != TRUE && GetConditionGraphCurrentMonIndex() == GetMonListCount()) @@ -459,7 +459,7 @@ static u32 LoopedTask_MoveCursorNoTransition(s32 state) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 8: - if (!ConditionGraph_UpdateMonEnter(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) + if (!ConditionMenu_UpdateMonEnter(GetConditionGraphPtr(), &structPtr->monTransitionX)) { ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetNumConditionMonSparkles()); @@ -488,7 +488,7 @@ static u32 LoopedTask_SlideMonOut(s32 state) DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 3: - if (!ConditionGraph_UpdateMonExit(GetConditionGraphDataPtr(), &structPtr->monTransitionX)) + if (!ConditionMenu_UpdateMonExit(GetConditionGraphPtr(), &structPtr->monTransitionX)) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 4: @@ -833,13 +833,13 @@ static void CreateConditionMonPic(u8 id) } } -static void sub_81CEE44(void) +static void VBlankCB_PokenavConditionGraph(void) { - struct ConditionGraph *graph = GetConditionGraphDataPtr(); + struct ConditionGraph *graph = GetConditionGraphPtr(); LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); - sub_81D2108(graph); + ConditionGraph_Draw(graph); ScanlineEffect_InitHBlankDmaTransfer(); } @@ -858,20 +858,20 @@ static void ToggleGraphData(bool8 showBg) static void DoConditionGraphTransition(void) { - struct ConditionGraph *conditionPtr = GetConditionGraphDataPtr(); + struct ConditionGraph *graph = GetConditionGraphPtr(); u8 id = GetMonMarkIndex(); sUnknown_030012BC = id; - sub_81D1F84(conditionPtr, conditionPtr->unk14[3], conditionPtr->unk14[id]); - TransitionConditionGraph(conditionPtr); + ConditionGraph_SetNewPositions(graph, graph->savedPositions[CONDITION_GRAPH_LOAD_MAX - 1], graph->savedPositions[id]); + ConditionGraph_TryUpdate(graph); } static void sub_81CEEC8(void) { - struct ConditionGraph *conditionPtr = GetConditionGraphDataPtr(); + struct ConditionGraph *graph = GetConditionGraphPtr(); if (IsConditionMenuSearchMode() || GetConditionGraphCurrentMonIndex() != GetMonListCount() - 1) - sub_81D1F84(conditionPtr, conditionPtr->unk14[GetMonMarkIndex()], conditionPtr->unk14[3]); + ConditionGraph_SetNewPositions(graph, graph->savedPositions[GetMonMarkIndex()], graph->savedPositions[CONDITION_GRAPH_LOAD_MAX - 1]); } u8 GetMonMarkingsData(void) diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index a8b01b8277..8cf8480ccd 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -471,7 +471,7 @@ static void VBlankCB_UsePokeblockMenu(void) LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); - sub_81D2108(&sMenu->graph); + ConditionGraph_Draw(&sMenu->graph); ScanlineEffect_InitHBlankDmaTransfer(); } @@ -537,19 +537,19 @@ static void LoadUsePokeblockMenu(void) sInfo->mainState++; break; case 11: - sub_81D2754(sMenu->graph.conditions[0], sMenu->graph.unk14[0]); - InitConditionGraphState(&sMenu->graph); + ConditionGraph_CalcPositions(sMenu->graph.conditions[0], sMenu->graph.savedPositions[0]); + ConditionGraph_InitResetScanline(&sMenu->graph); sInfo->mainState++; break; case 12: - if (!SetupConditionGraphScanlineParams(&sMenu->graph)) + if (!ConditionGraph_ResetScanline(&sMenu->graph)) { - sub_81D1F84(&sMenu->graph, sMenu->graph.unk14[0], sMenu->graph.unk14[0]); + ConditionGraph_SetNewPositions(&sMenu->graph, sMenu->graph.savedPositions[0], sMenu->graph.savedPositions[0]); sInfo->mainState++; } break; case 13: - sub_81D2230(&sMenu->graph); + ConditionGraph_Update(&sMenu->graph); sInfo->mainState++; break; case 14: @@ -781,13 +781,13 @@ static void ShowPokeblockResults(void) break; case 2: CalculateConditionEnhancements(); - sub_81D2754(sInfo->conditionsAfterBlock, sMenu->graph.unk14[3]); - sub_81D1F84(&sMenu->graph, sMenu->graph.unk14[sMenu->curLoadId], sMenu->graph.unk14[3]); + ConditionGraph_CalcPositions(sInfo->conditionsAfterBlock, sMenu->graph.savedPositions[CONDITION_GRAPH_LOAD_MAX - 1]); + ConditionGraph_SetNewPositions(&sMenu->graph, sMenu->graph.savedPositions[sMenu->curLoadId], sMenu->graph.savedPositions[CONDITION_GRAPH_LOAD_MAX - 1]); LoadAndCreateUpDownSprites(); sInfo->mainState++; break; case 3: - if (!TransitionConditionGraph(&sMenu->graph)) + if (!ConditionGraph_TryUpdate(&sMenu->graph)) { CalculateNumAdditionalSparkles(GetPartyIdFromSelectionId(sMenu->info.curSelection)); if (sMenu->info.curSelection != sMenu->info.numSelections - 1) @@ -1365,7 +1365,7 @@ static bool8 LoadUsePokeblockMenuGfx(void) LoadBgTilemap(2, sMenu->tilemapBuffer, 1280, 0); LoadPalette(gConditionGraphData_Pal, 48, 32); LoadPalette(gConditionText_Pal, 240, 32); - SetConditionGraphIOWindows(2); + ConditionGraph_InitWindow(2); break; default: sMenu->info.helperState = 0; @@ -1416,7 +1416,7 @@ static void UpdateSelection(bool8 up) else newLoadId = sMenu->nextLoadId; - sub_81D1F84(&sMenu->graph, sMenu->graph.unk14[sMenu->curLoadId], sMenu->graph.unk14[newLoadId]); + ConditionGraph_SetNewPositions(&sMenu->graph, sMenu->graph.savedPositions[sMenu->curLoadId], sMenu->graph.savedPositions[newLoadId]); if (sMenu->info.curSelection == sMenu->info.numSelections - 1) startedOnMon = FALSE; // moving off of Cancel @@ -1484,7 +1484,7 @@ static bool8 LoadNewSelection_CancelToMon(void) sMenu->info.helperState++; break; case 2: - if (!ConditionGraph_UpdateMonEnter(&sMenu->graph, &sMenu->curMonXOffset)) + if (!ConditionMenu_UpdateMonEnter(&sMenu->graph, &sMenu->curMonXOffset)) { // Load the new adjacent pokemon (not the one being shown) LoadMonInfo(sMenu->toLoadSelection, sMenu->toLoadId); @@ -1511,7 +1511,7 @@ static bool8 LoadNewSelection_MonToCancel(void) switch (sMenu->info.helperState) { case 0: - if (!ConditionGraph_UpdateMonExit(&sMenu->graph, &sMenu->curMonXOffset)) + if (!ConditionMenu_UpdateMonExit(&sMenu->graph, &sMenu->curMonXOffset)) sMenu->info.helperState++; break; case 1: @@ -1535,7 +1535,7 @@ static bool8 LoadNewSelection_MonToMon(void) switch (sMenu->info.helperState) { case 0: - TransitionConditionGraph(&sMenu->graph); + ConditionGraph_TryUpdate(&sMenu->graph); if (!MoveConditionMonOffscreen(&sMenu->curMonXOffset)) { UpdateMonPic(sMenu->curLoadId); @@ -1547,7 +1547,7 @@ static bool8 LoadNewSelection_MonToMon(void) sMenu->info.helperState++; break; case 2: - if (!ConditionGraph_UpdateMonEnter(&sMenu->graph, &sMenu->curMonXOffset)) + if (!ConditionMenu_UpdateMonEnter(&sMenu->graph, &sMenu->curMonXOffset)) { // Load the new adjacent pokemon (not the one being shown) LoadMonInfo(sMenu->toLoadSelection, sMenu->toLoadId); From f5152094a9521222e64f003785662295ad8931e7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 11 Nov 2021 16:50:36 -0500 Subject: [PATCH 166/417] Finish pokenav conditions doc --- .../{862323C.bin => condition/graph_data.bin} | 0 .../mon_markings.pal} | 0 .../search_results.bin} | Bin .../search_results.png} | Bin .../search_results_list.pal} | 0 include/menu_specialized.h | 5 + include/pokenav.h | 74 ++-- include/strings.h | 4 +- src/menu_specialized.c | 20 +- src/pokenav.c | 32 +- src/pokenav_conditions_1.c | 317 +++++++------- src/pokenav_conditions_2.c | 397 +++++++++--------- src/pokenav_conditions_3.c | 317 +++++++------- src/pokenav_menu_handler_1.c | 2 +- src/pokenav_menu_handler_2.c | 2 +- src/strings.c | 2 +- src/use_pokeblock.c | 4 +- 17 files changed, 604 insertions(+), 572 deletions(-) rename graphics/pokenav/{862323C.bin => condition/graph_data.bin} (100%) rename graphics/pokenav/{8623338.pal => condition/mon_markings.pal} (100%) rename graphics/pokenav/{condition_search2.bin => condition/search_results.bin} (100%) rename graphics/pokenav/{condition_search2.png => condition/search_results.png} (100%) rename graphics/pokenav/{8623570.pal => condition/search_results_list.pal} (100%) diff --git a/graphics/pokenav/862323C.bin b/graphics/pokenav/condition/graph_data.bin similarity index 100% rename from graphics/pokenav/862323C.bin rename to graphics/pokenav/condition/graph_data.bin diff --git a/graphics/pokenav/8623338.pal b/graphics/pokenav/condition/mon_markings.pal similarity index 100% rename from graphics/pokenav/8623338.pal rename to graphics/pokenav/condition/mon_markings.pal diff --git a/graphics/pokenav/condition_search2.bin b/graphics/pokenav/condition/search_results.bin similarity index 100% rename from graphics/pokenav/condition_search2.bin rename to graphics/pokenav/condition/search_results.bin diff --git a/graphics/pokenav/condition_search2.png b/graphics/pokenav/condition/search_results.png similarity index 100% rename from graphics/pokenav/condition_search2.png rename to graphics/pokenav/condition/search_results.png diff --git a/graphics/pokenav/8623570.pal b/graphics/pokenav/condition/search_results_list.pal similarity index 100% rename from graphics/pokenav/8623570.pal rename to graphics/pokenav/condition/search_results_list.pal diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 146b930b43..d1e30d4d6b 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -26,6 +26,11 @@ enum { TAG_CONDITION_MARKINGS_MENU_2, // Used implicitly by CreateMonMarkingsMenuSprites }; +enum { + CONDITION_ICON_SELECTED, + CONDITION_ICON_UNSELECTED, +}; + #define MAX_CONDITION_SPARKLES 10 // The number of extra sparkles shown on a Pokémon's condition screen. diff --git a/include/pokenav.h b/include/pokenav.h index b8c2178d1b..847d4b7e76 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -65,8 +65,7 @@ enum POKENAV_MODE_FORCE_CALL_EXIT, // Pokenav tutorial after calling Mr. Stone }; -// TODO - refine these names -enum Substructures +enum { POKENAV_SUBSTRUCT_MAIN_MENU, POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, @@ -76,11 +75,11 @@ enum Substructures POKENAV_SUBSTRUCT_MATCH_CALL_MAIN, POKENAV_SUBSTRUCT_MATCH_CALL_OPEN, POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS, - POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST, + POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX, POKENAV_SUBSTRUCT_RIBBONS_MON_LIST, POKENAV_SUBSTRUCT_RIBBONS_MON_MENU, - POKENAV_SUBSTRUCT_CONDITION_GRAPH, - POKENAV_SUBSTRUCT_MON_MARK_MENU, + POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU, + POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX, POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST, POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU, POKENAV_SUBSTRUCT_15, //unused @@ -113,21 +112,21 @@ enum #define POKENAV_MENU_IDS_START 100000 enum { - POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START, + POKENAV_MAIN_MENU = POKENAV_MENU_IDS_START, // The main menu where the player selects Hoenn Map/Condition/Match Call/Ribbons POKENAV_MAIN_MENU_CURSOR_ON_MAP, - POKENAV_CONDITION_MENU, - POKENAV_CONDITION_SEARCH_MENU, + POKENAV_CONDITION_MENU, // The first Condition screen where the player selects Party or Search + POKENAV_CONDITION_SEARCH_MENU, // The Condition search menu where the player selects a search parameter POKENAV_MAIN_MENU_CURSOR_ON_MATCH_CALL, POKENAV_MAIN_MENU_CURSOR_ON_RIBBONS, POKENAV_REGION_MAP, - POKENAV_CONDITION_PARTY, - POKENAV_CONDITION_SEARCH_RESULTS, - POKENAV_CONDITION_GRAPH_FROM_SEARCH, // opening condition graph from search list - POKENAV_RETURN_CONDITION_SEARCH, //return to search list from condition graph + POKENAV_CONDITION_GRAPH_PARTY, // The Condition graph screen when Party has been selected + POKENAV_CONDITION_SEARCH_RESULTS, // The list of results from a Condition search + POKENAV_CONDITION_GRAPH_SEARCH, // The Condition graph screen when a search result has been selected + POKENAV_RETURN_CONDITION_SEARCH, // Exited the graph screen back to the list of Condition search results POKENAV_MATCH_CALL, - POKENAV_RIBBONS_MON_LIST, - POKENAV_RIBBONS_SUMMARY_SCREEN, - POKENAV_RIBBONS_RETURN_TO_MON_LIST, + POKENAV_RIBBONS_MON_LIST, // The list of Pokémon with ribbons + POKENAV_RIBBONS_SUMMARY_SCREEN, // The ribbon summary screen shown when a Pokémon has been selected + POKENAV_RIBBONS_RETURN_TO_MON_LIST, // Exited the summary screen back to the ribbon list }; enum @@ -245,15 +244,15 @@ enum RegionMapFuncIds POKENAV_MENU_FUNC_OPEN_FEATURE, }; -enum PartyConditionFuncIds +enum { - PARTY_CONDITION_FUNC_NONE, - PARTY_CONDITION_FUNC_SLIDE_MON_IN, - PARTY_CONDITION_FUNC_RETURN, - PARTY_CONDITION_FUNC_NO_TRANSITION, - PARTY_CONDITION_FUNC_SLIDE_MON_OUT, - PARTY_CONDITION_FUNC_ADD_MARKINGS, - PARTY_CONDITION_FUNC_CLOSE_MARKINGS, + CONDITION_FUNC_NONE, + CONDITION_FUNC_SLIDE_MON_IN, + CONDITION_FUNC_RETURN, + CONDITION_FUNC_NO_TRANSITION, + CONDITION_FUNC_SLIDE_MON_OUT, + CONDITION_FUNC_ADD_MARKINGS, + CONDITION_FUNC_CLOSE_MARKINGS, }; enum @@ -264,6 +263,13 @@ enum NUM_CONDITION_MONS }; +enum +{ + CONDITION_LOAD_MON_INFO, + CONDITION_LOAD_GRAPH, + CONDITION_LOAD_MON_PIC, +}; + #define POKENAV_MENU_FUNC_EXIT -1 enum @@ -431,17 +437,17 @@ void FreeRegionMapSubstruct1(void); void FreeRegionMapSubstruct2(void); // pokenav_conditions_1.c -u32 PokenavCallback_Init_PartyCondition(void); -u32 PokenavCallback_Init_ConditionGraphFromSearch(void); -u32 GetPartyConditionCallback(void); -void FreePartyConditionSubstruct1(void); -bool32 LoadPartyConditionMenuGfx(void); +u32 PokenavCallback_Init_ConditionGraph_Party(void); +u32 PokenavCallback_Init_ConditionGraph_Search(void); +u32 GetConditionGraphMenuCallback(void); +void FreeConditionGraphMenuSubstruct1(void); +bool32 LoadConditionGraphMenuGfx(void); bool32 IsConditionMenuSearchMode(void); struct ConditionGraph *GetConditionGraphPtr(void); -u16 GetConditionGraphCurrentMonIndex(void); +u16 GetConditionGraphCurrentListIndex(void); u16 GetMonListCount(void); u8 GetNumConditionMonSparkles(void); -bool32 SetConditionGraphData(u8 mode); +bool32 LoadNextConditionMenuMonData(u8 mode); u8 TryGetMonMarkId(void); u8 *GetConditionMonNameText(u8 id); u8 *GetConditionMonLocationText(u8 id); @@ -450,10 +456,10 @@ void *GetConditionMonPicGfx(u8 id); void *GetConditionMonPal(u8 id); // pokenav_conditions_2.c -bool32 OpenPartyConditionMenu(void); -void CreatePartyConditionLoopedTask(s32); -u32 IsPartyConditionLoopedTaskActive(void); -void FreePartyConditionSubstruct2(void); +bool32 OpenConditionGraphMenu(void); +void CreateConditionGraphMenuLoopedTask(s32); +u32 IsConditionGraphMenuLoopedTaskActive(void); +void FreeConditionGraphMenuSubstruct2(void); u8 GetMonMarkingsData(void); // pokenav_conditions_3.c diff --git a/include/strings.h b/include/strings.h index 7317f8aac8..48a2eccd75 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2974,8 +2974,8 @@ extern const u8 gText_FindToughPokemon[]; extern const u8 gText_ReturnToConditionMenu[]; extern const u8 gText_NoRibbonWinners[]; -// Pokenav Ribbons -extern const u8 gText_NumberF700[]; +// Pokenav +extern const u8 gText_NumberIndex[]; extern const u8 gText_RibbonsF700[]; // use_pokeblock diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 074621de4b..d1cc3ff58f 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -318,7 +318,7 @@ void MailboxMenu_Free(void) // filled with the graph color. //--------------------------------------- -#define UNK_VAL(n, s)(((n) >> (s)) + (((n) >> ((s) - 1)) & 1)) +#define SHIFT_RIGHT_ADJUSTED(n, s)(((n) >> (s)) + (((n) >> ((s) - 1)) & 1)) void ConditionGraph_Init(struct ConditionGraph *graph) { @@ -360,7 +360,7 @@ void ConditionGraph_SetNewPositions(struct ConditionGraph *graph, struct UCoords increment = ((new[i].x - old[i].x) << 8) / CONDITION_GRAPH_UPDATE_STEPS; for (j = 0; j < CONDITION_GRAPH_UPDATE_STEPS - 1; j++) { - graph->newPositions[j][i].x = UNK_VAL(coord, 8); + graph->newPositions[j][i].x = SHIFT_RIGHT_ADJUSTED(coord, 8); coord += increment; } graph->newPositions[j][i].x = new[i].x; @@ -369,7 +369,7 @@ void ConditionGraph_SetNewPositions(struct ConditionGraph *graph, struct UCoords increment = ((new[i].y - old[i].y) << 8) / CONDITION_GRAPH_UPDATE_STEPS; for (j = 0; j < CONDITION_GRAPH_UPDATE_STEPS - 1; j++) { - graph->newPositions[j][i].y = UNK_VAL(coord, 8); + graph->newPositions[j][i].y = SHIFT_RIGHT_ADJUSTED(coord, 8); coord += increment; } graph->newPositions[j][i].y = new[i].y; @@ -500,7 +500,7 @@ static void ConditionGraph_CalcLine(struct ConditionGraph *graph, u16 *scanline, scanline += (top - CONDITION_GRAPH_TOP_Y) * 2; for (i = 0; i < height; i++) { - scanline[dir] = UNK_VAL(x, 10) + dir; + scanline[dir] = SHIFT_RIGHT_ADJUSTED(x, 10) + dir; x += xIncrement; scanline += 2; } @@ -511,7 +511,7 @@ static void ConditionGraph_CalcLine(struct ConditionGraph *graph, u16 *scanline, { overflowScanline += (top - CONDITION_GRAPH_TOP_Y) * 2; // Less readable than the other loops, but it has to be written this way to match. - for (i = 0; i < height; overflowScanline[dir] = UNK_VAL(x, 10) + dir, x += xIncrement, overflowScanline += 2, i++) + for (i = 0; i < height; overflowScanline[dir] = SHIFT_RIGHT_ADJUSTED(x, 10) + dir, x += xIncrement, overflowScanline += 2, i++) { if (x >= (CONDITION_GRAPH_CENTER_X << 10)) break; @@ -521,7 +521,7 @@ static void ConditionGraph_CalcLine(struct ConditionGraph *graph, u16 *scanline, scanline += (graph->bottom - CONDITION_GRAPH_TOP_Y) * 2; for (; i < height; i++) { - scanline[dir] = UNK_VAL(x, 10) + dir; + scanline[dir] = SHIFT_RIGHT_ADJUSTED(x, 10) + dir; x += xIncrement; scanline += 2; } @@ -533,7 +533,7 @@ static void ConditionGraph_CalcLine(struct ConditionGraph *graph, u16 *scanline, scanline += (top - CONDITION_GRAPH_TOP_Y) * 2; for (i = 0; i < height; i++) { - scanline[dir] = UNK_VAL(x, 10) + dir; + scanline[dir] = SHIFT_RIGHT_ADJUSTED(x, 10) + dir; if (x < (CONDITION_GRAPH_CENTER_X << 10)) { scanline[dir] = CONDITION_GRAPH_CENTER_X; @@ -547,7 +547,7 @@ static void ConditionGraph_CalcLine(struct ConditionGraph *graph, u16 *scanline, overflowScanline += (graph->bottom - CONDITION_GRAPH_TOP_Y) * 2; for (; i < height; i++) { - overflowScanline[dir] = UNK_VAL(x, 10) + dir; + overflowScanline[dir] = SHIFT_RIGHT_ADJUSTED(x, 10) + dir; x += xIncrement; overflowScanline += 2; } @@ -1167,8 +1167,8 @@ static const union AnimCmd sAnim_ConditionSelectionIcon_Unselected[] = static const union AnimCmd *const sAnims_ConditionSelectionIcon[] = { - sAnim_ConditionSelectionIcon_Selected, - sAnim_ConditionSelectionIcon_Unselected + [CONDITION_ICON_SELECTED] = sAnim_ConditionSelectionIcon_Selected, + [CONDITION_ICON_UNSELECTED] = sAnim_ConditionSelectionIcon_Unselected }; // Just loads the generic data, up to the caller to load the actual sheet/pal for the specific mon diff --git a/src/pokenav.c b/src/pokenav.c index 4338023dbd..b09fc9da09 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -122,15 +122,15 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeRegionMapSubstruct1, .free2 = FreeRegionMapSubstruct2, }, - [POKENAV_CONDITION_PARTY - POKENAV_MENU_IDS_START] = + [POKENAV_CONDITION_GRAPH_PARTY - POKENAV_MENU_IDS_START] = { - .init = PokenavCallback_Init_PartyCondition, - .callback = GetPartyConditionCallback, - .open = OpenPartyConditionMenu, - .createLoopTask = CreatePartyConditionLoopedTask, - .isLoopTaskActive = IsPartyConditionLoopedTaskActive, - .free1 = FreePartyConditionSubstruct1, - .free2 = FreePartyConditionSubstruct2, + .init = PokenavCallback_Init_ConditionGraph_Party, + .callback = GetConditionGraphMenuCallback, + .open = OpenConditionGraphMenu, + .createLoopTask = CreateConditionGraphMenuLoopedTask, + .isLoopTaskActive = IsConditionGraphMenuLoopedTaskActive, + .free1 = FreeConditionGraphMenuSubstruct1, + .free2 = FreeConditionGraphMenuSubstruct2, }, [POKENAV_CONDITION_SEARCH_RESULTS - POKENAV_MENU_IDS_START] = { @@ -142,15 +142,15 @@ const struct PokenavCallbacks PokenavMenuCallbacks[15] = .free1 = FreeSearchResultSubstruct1, .free2 = FreeSearchResultSubstruct2, }, - [POKENAV_CONDITION_GRAPH_FROM_SEARCH - POKENAV_MENU_IDS_START] = + [POKENAV_CONDITION_GRAPH_SEARCH - POKENAV_MENU_IDS_START] = { - .init = PokenavCallback_Init_ConditionGraphFromSearch, - .callback = GetPartyConditionCallback, - .open = OpenPartyConditionMenu, - .createLoopTask = CreatePartyConditionLoopedTask, - .isLoopTaskActive = IsPartyConditionLoopedTaskActive, - .free1 = FreePartyConditionSubstruct1, - .free2 = FreePartyConditionSubstruct2, + .init = PokenavCallback_Init_ConditionGraph_Search, + .callback = GetConditionGraphMenuCallback, + .open = OpenConditionGraphMenu, + .createLoopTask = CreateConditionGraphMenuLoopedTask, + .isLoopTaskActive = IsConditionGraphMenuLoopedTaskActive, + .free1 = FreeConditionGraphMenuSubstruct1, + .free2 = FreeConditionGraphMenuSubstruct2, }, [POKENAV_RETURN_CONDITION_SEARCH - POKENAV_MENU_IDS_START] = { diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index 607437c470..fc188db715 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -13,102 +13,105 @@ #include "text.h" #include "constants/songs.h" -struct PokenavSub11 +struct Pokenav_ConditionMenu { u32 monPal[NUM_CONDITION_MONS][0x20]; u8 fill[0x180]; u32 monPicGfx[NUM_CONDITION_MONS][MON_PIC_SIZE]; - u8 searchMode; - s16 monIndex; - u32 (*callback)(struct PokenavSub11 *); - u8 fill2[0x6320 - 0x6308]; + bool8 inSearchMode; + s16 toLoadListIndex; + u32 (*callback)(struct Pokenav_ConditionMenu *); + u8 fill2[0x18]; u8 locationText[NUM_CONDITION_MONS][24]; u8 nameText[NUM_CONDITION_MONS][64]; struct ConditionGraph graph; u8 numSparkles[NUM_CONDITION_MONS]; u8 monMarks[NUM_CONDITION_MONS]; - s8 mark; - s8 unk6787; - s8 unk6788; - s8 unk6789; + s8 loadId; + s8 nextLoadIdDown; + s8 nextLoadIdUp; + s8 toLoadId; u8 state; }; static void InitPartyConditionListParameters(void); static void InitSearchResultsConditionList(void); -static u32 HandlePartyConditionInput(struct PokenavSub11 *); -static u32 GetConditionReturnCallback(struct PokenavSub11 *); -static u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *); -static u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *); +static u32 HandleConditionMenuInput(struct Pokenav_ConditionMenu *); +static u32 GetConditionReturnCallback(struct Pokenav_ConditionMenu *); +static u32 OpenMarkingsMenu(struct Pokenav_ConditionMenu *); +static u8 ConditionGraphHandleDpadInput(struct Pokenav_ConditionMenu *); static u8 SwitchConditionSummaryIndex(bool8); static void CopyMonNameGenderLocation(s16, u8); static void GetMonConditionGraphData(s16, u8); static void ConditionGraphDrawMonPic(s16, u8); -bool32 PokenavCallback_Init_PartyCondition(void) +bool32 PokenavCallback_Init_ConditionGraph_Party(void) { - struct PokenavSub11 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH, sizeof(struct PokenavSub11)); + struct Pokenav_ConditionMenu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU, sizeof(struct Pokenav_ConditionMenu)); - if (structPtr == NULL) + if (menu == NULL) return FALSE; - ConditionGraph_Init(&structPtr->graph); + ConditionGraph_Init(&menu->graph); InitPartyConditionListParameters(); gKeyRepeatStartDelay = 20; - structPtr->callback = HandlePartyConditionInput; + menu->callback = HandleConditionMenuInput; return TRUE; } -bool32 PokenavCallback_Init_ConditionGraphFromSearch(void) +bool32 PokenavCallback_Init_ConditionGraph_Search(void) { - struct PokenavSub11 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH, sizeof(struct PokenavSub11)); + struct Pokenav_ConditionMenu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU, sizeof(struct Pokenav_ConditionMenu)); - if (structPtr == NULL) + if (menu == NULL) return FALSE; - ConditionGraph_Init(&structPtr->graph); + ConditionGraph_Init(&menu->graph); InitSearchResultsConditionList(); gKeyRepeatStartDelay = 20; - structPtr->callback = HandlePartyConditionInput; + menu->callback = HandleConditionMenuInput; return TRUE; } -u32 GetPartyConditionCallback(void) +u32 GetConditionGraphMenuCallback(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); - return structPtr->callback(structPtr); + return menu->callback(menu); } -static u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr) +static u32 HandleConditionMenuInput(struct Pokenav_ConditionMenu *menu) { struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - u32 ret = ConditionGraphHandleDpadInput(structPtr); + u32 ret = ConditionGraphHandleDpadInput(menu); - if (ret == PARTY_CONDITION_FUNC_NONE) + if (ret == CONDITION_FUNC_NONE) { if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); - structPtr->callback = GetConditionReturnCallback; - ret = PARTY_CONDITION_FUNC_RETURN; + menu->callback = GetConditionReturnCallback; + ret = CONDITION_FUNC_RETURN; } else if (JOY_NEW(A_BUTTON)) { - if (structPtr->searchMode == 0) + if (!menu->inSearchMode) { + // In Party mode, pressing A only applies to the Cancel button if (monListPtr->currIndex == monListPtr->listCount - 1) { + // Cancel PlaySE(SE_SELECT); - structPtr->callback = GetConditionReturnCallback; - ret = PARTY_CONDITION_FUNC_RETURN; + menu->callback = GetConditionReturnCallback; + ret = CONDITION_FUNC_RETURN; } } else { + // In Search mode pressing A brings up the markings menu PlaySE(SE_SELECT); - ret = PARTY_CONDITION_FUNC_ADD_MARKINGS; - structPtr->callback = ConditionMenu_OpenMarkingsMenu; + ret = CONDITION_FUNC_ADD_MARKINGS; + menu->callback = OpenMarkingsMenu; } } } @@ -116,57 +119,58 @@ static u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr) return ret; } -static u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr) +static u32 OpenMarkingsMenu(struct Pokenav_ConditionMenu *menu) { struct PokenavSub18 *monListPtr; u8 markings; - u32 ret = PARTY_CONDITION_FUNC_NONE, boxId, monId; + u32 ret = CONDITION_FUNC_NONE, boxId, monId; if (!HandleMonMarkingsMenuInput()) { - structPtr->monMarks[structPtr->mark] = GetMonMarkingsData(); + menu->monMarks[menu->loadId] = GetMonMarkingsData(); monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); boxId = monListPtr->monData[monListPtr->currIndex].boxId; monId = monListPtr->monData[monListPtr->currIndex].monId; - markings = structPtr->monMarks[structPtr->mark]; + markings = menu->monMarks[menu->loadId]; if (boxId == TOTAL_BOXES_COUNT) SetMonData(&gPlayerParty[monId], MON_DATA_MARKINGS, &markings); else SetBoxMonDataAt(boxId, monId, MON_DATA_MARKINGS, &markings); - structPtr->callback = HandlePartyConditionInput; - ret = PARTY_CONDITION_FUNC_CLOSE_MARKINGS; + menu->callback = HandleConditionMenuInput; + ret = CONDITION_FUNC_CLOSE_MARKINGS; } return ret; } -static u32 GetConditionReturnCallback(struct PokenavSub11 *structPtr) +static u32 GetConditionReturnCallback(struct Pokenav_ConditionMenu *menu) { - if (structPtr->searchMode == 0) + if (!menu->inSearchMode) return POKENAV_CONDITION_MENU; else return POKENAV_RETURN_CONDITION_SEARCH; } -void FreePartyConditionSubstruct1(void) +void FreeConditionGraphMenuSubstruct1(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - if (structPtr->searchMode == 0) + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + if (!menu->inSearchMode) FreePokenavSubstruct(POKENAV_SUBSTRUCT_MON_LIST); - FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); } -static u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) +static u8 ConditionGraphHandleDpadInput(struct Pokenav_ConditionMenu *menu) { struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - u8 ret = 0; + u8 ret = CONDITION_FUNC_NONE; if (JOY_HELD(DPAD_UP)) { - if (structPtr->searchMode == 0 || monListPtr->currIndex != 0) + // Prevent input wrapping in search mode + if (!menu->inSearchMode || monListPtr->currIndex != 0) { PlaySE(SE_SELECT); ret = SwitchConditionSummaryIndex(TRUE); @@ -174,7 +178,8 @@ static u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) } else if (JOY_HELD(DPAD_DOWN)) { - if (structPtr->searchMode == 0 || monListPtr->currIndex < monListPtr->listCount - 1) + // Prevent input wrapping in search mode + if (!menu->inSearchMode || monListPtr->currIndex < monListPtr->listCount - 1) { PlaySE(SE_SELECT); ret = SwitchConditionSummaryIndex(FALSE); @@ -186,52 +191,52 @@ static u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr) static u8 SwitchConditionSummaryIndex(u8 moveUp) { - u16 r7; + u16 newLoadId; bool8 wasNotLastMon, isNotLastMon; - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - r7 = (moveUp) ? structPtr->unk6788 : structPtr->unk6787; - ConditionGraph_SetNewPositions(&structPtr->graph, structPtr->graph.savedPositions[structPtr->mark], structPtr->graph.savedPositions[r7]); - wasNotLastMon = (monListPtr->currIndex != ((IsConditionMenuSearchMode() != 0) ? monListPtr->listCount : monListPtr->listCount - 1)); + newLoadId = (moveUp) ? menu->nextLoadIdUp : menu->nextLoadIdDown; + ConditionGraph_SetNewPositions(&menu->graph, menu->graph.savedPositions[menu->loadId], menu->graph.savedPositions[newLoadId]); + wasNotLastMon = (monListPtr->currIndex != (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1)); if (moveUp) { - structPtr->unk6788 = structPtr->unk6787; - structPtr->unk6787 = structPtr->mark; - structPtr->mark = r7; - structPtr->unk6789 = structPtr->unk6788; + menu->nextLoadIdUp = menu->nextLoadIdDown; + menu->nextLoadIdDown = menu->loadId; + menu->loadId = newLoadId; + menu->toLoadId = menu->nextLoadIdUp; monListPtr->currIndex = (monListPtr->currIndex == 0) ? monListPtr->listCount - 1 : monListPtr->currIndex - 1; - structPtr->monIndex = (monListPtr->currIndex != 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1; + menu->toLoadListIndex = (monListPtr->currIndex != 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1; } else { - structPtr->unk6787 = structPtr->unk6788; - structPtr->unk6788 = structPtr->mark; - structPtr->mark = r7; - structPtr->unk6789 = structPtr->unk6787; + menu->nextLoadIdDown = menu->nextLoadIdUp; + menu->nextLoadIdUp = menu->loadId; + menu->loadId = newLoadId; + menu->toLoadId = menu->nextLoadIdDown; monListPtr->currIndex = (monListPtr->currIndex < monListPtr->listCount - 1) ? monListPtr->currIndex + 1 : 0; - structPtr->monIndex = (monListPtr->currIndex < monListPtr->listCount - 1) ? monListPtr->currIndex + 1 : 0; + menu->toLoadListIndex = (monListPtr->currIndex < monListPtr->listCount - 1) ? monListPtr->currIndex + 1 : 0; } - isNotLastMon = (monListPtr->currIndex != ((IsConditionMenuSearchMode() != 0) ? monListPtr->listCount : monListPtr->listCount - 1)); + isNotLastMon = (monListPtr->currIndex != (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1)); if (!wasNotLastMon) - return PARTY_CONDITION_FUNC_NO_TRANSITION; + return CONDITION_FUNC_NO_TRANSITION; else if (!isNotLastMon) - return PARTY_CONDITION_FUNC_SLIDE_MON_OUT; + return CONDITION_FUNC_SLIDE_MON_OUT; else - return PARTY_CONDITION_FUNC_SLIDE_MON_IN; + return CONDITION_FUNC_SLIDE_MON_IN; } -bool32 LoadPartyConditionMenuGfx(void) +bool32 LoadConditionGraphMenuGfx(void) { s32 var; - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - switch (structPtr->state) + switch (menu->state) { case 0: CopyMonNameGenderLocation(monListPtr->currIndex, CONDITION_MON_0); @@ -245,17 +250,17 @@ bool32 LoadPartyConditionMenuGfx(void) case 3: if (monListPtr->listCount == 1) { - structPtr->mark = CONDITION_MON_0; - structPtr->unk6787 = CONDITION_MON_0; - structPtr->unk6788 = CONDITION_MON_0; - structPtr->state = 0; + menu->loadId = CONDITION_MON_0; + menu->nextLoadIdDown = CONDITION_MON_0; + menu->nextLoadIdUp = CONDITION_MON_0; + menu->state = 0; return TRUE; } else { - structPtr->mark = CONDITION_MON_0; - structPtr->unk6787 = CONDITION_MON_1; - structPtr->unk6788 = CONDITION_MON_2; + menu->loadId = CONDITION_MON_0; + menu->nextLoadIdDown = CONDITION_MON_1; + menu->nextLoadIdUp = CONDITION_MON_2; } break; // These were probably ternaries just like cases 7-9, but couldn't match it any other way. @@ -285,28 +290,28 @@ bool32 LoadPartyConditionMenuGfx(void) break; case 9: ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2); - structPtr->state = 0; + menu->state = 0; return TRUE; } - structPtr->state++; + menu->state++; return FALSE; } -bool32 SetConditionGraphData(u8 mode) +bool32 LoadNextConditionMenuMonData(u8 mode) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); switch (mode) { - case 0: - CopyMonNameGenderLocation(structPtr->monIndex, structPtr->unk6789); + case CONDITION_LOAD_MON_INFO: + CopyMonNameGenderLocation(menu->toLoadListIndex, menu->toLoadId); break; - case 1: - GetMonConditionGraphData(structPtr->monIndex, structPtr->unk6789); + case CONDITION_LOAD_GRAPH: + GetMonConditionGraphData(menu->toLoadListIndex, menu->toLoadId); break; - case 2: - ConditionGraphDrawMonPic(structPtr->monIndex, structPtr->unk6789); + case CONDITION_LOAD_MON_PIC: + ConditionGraphDrawMonPic(menu->toLoadListIndex, menu->toLoadId); return TRUE; } @@ -419,42 +424,42 @@ static u8 *CopyConditionMonNameGender(u8 *str, u16 listId, bool8 arg3) static void CopyMonNameGenderLocation(s16 listId, u8 loadId) { u16 boxId, i; - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - if (listId != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) + if (listId != (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1)) { - CopyConditionMonNameGender(structPtr->nameText[loadId], listId, FALSE); + CopyConditionMonNameGender(menu->nameText[loadId], listId, FALSE); boxId = monListPtr->monData[listId].boxId; - structPtr->locationText[loadId][0] = EXT_CTRL_CODE_BEGIN; - structPtr->locationText[loadId][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; - structPtr->locationText[loadId][2] = TEXT_COLOR_BLUE; - structPtr->locationText[loadId][3] = TEXT_COLOR_TRANSPARENT; - structPtr->locationText[loadId][4] = TEXT_COLOR_LIGHT_BLUE; + menu->locationText[loadId][0] = EXT_CTRL_CODE_BEGIN; + menu->locationText[loadId][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + menu->locationText[loadId][2] = TEXT_COLOR_BLUE; + menu->locationText[loadId][3] = TEXT_COLOR_TRANSPARENT; + menu->locationText[loadId][4] = TEXT_COLOR_LIGHT_BLUE; if (boxId == TOTAL_BOXES_COUNT) - CopyStringLeftAlignedToConditionData(&structPtr->locationText[loadId][5], gText_InParty, BOX_NAME_LENGTH); + CopyStringLeftAlignedToConditionData(&menu->locationText[loadId][5], gText_InParty, BOX_NAME_LENGTH); else - CopyStringLeftAlignedToConditionData(&structPtr->locationText[loadId][5], GetBoxNamePtr(boxId), BOX_NAME_LENGTH); + CopyStringLeftAlignedToConditionData(&menu->locationText[loadId][5], GetBoxNamePtr(boxId), BOX_NAME_LENGTH); } else { for (i = 0; i < 12; i++) - structPtr->nameText[loadId][i] = CHAR_SPACE; - structPtr->nameText[loadId][i] = EOS; + menu->nameText[loadId][i] = CHAR_SPACE; + menu->nameText[loadId][i] = EOS; for (i = 0; i < BOX_NAME_LENGTH; i++) - structPtr->locationText[loadId][i] = CHAR_SPACE; - structPtr->locationText[loadId][i] = EOS; + menu->locationText[loadId][i] = CHAR_SPACE; + menu->locationText[loadId][i] = EOS; } } static void InitPartyConditionListParameters(void) { u16 i, count; - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); struct PokenavSub18 *monListPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18)); - structPtr->searchMode = 0; + menu->inSearchMode = FALSE; for (i = 0, count = 0; i < CalculatePlayerPartyCount(); i++) { if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) @@ -471,42 +476,43 @@ static void InitPartyConditionListParameters(void) monListPtr->monData[count].data = 0; monListPtr->currIndex = 0; monListPtr->listCount = count + 1; - structPtr->state = 0; + menu->state = 0; } static void InitSearchResultsConditionList(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - structPtr->searchMode = 1; - structPtr->state = 0; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + menu->inSearchMode = TRUE; + menu->state = 0; } static void GetMonConditionGraphData(s16 listId, u8 loadId) { u16 boxId, monId, i; - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - if (listId != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) + if (listId != (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1)) { boxId = monListPtr->monData[listId].boxId; monId = monListPtr->monData[listId].monId; - structPtr->graph.conditions[loadId][CONDITION_COOL] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); - structPtr->graph.conditions[loadId][CONDITION_TOUGH] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); - structPtr->graph.conditions[loadId][CONDITION_SMART] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); - structPtr->graph.conditions[loadId][CONDITION_CUTE] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); - structPtr->graph.conditions[loadId][CONDITION_BEAUTY] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); - structPtr->numSparkles[loadId] = GET_NUM_CONDITION_SPARKLES(GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL)); - structPtr->monMarks[loadId] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL); - ConditionGraph_CalcPositions(structPtr->graph.conditions[loadId], structPtr->graph.savedPositions[loadId]); + menu->graph.conditions[loadId][CONDITION_COOL] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL); + menu->graph.conditions[loadId][CONDITION_TOUGH] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL); + menu->graph.conditions[loadId][CONDITION_SMART] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL); + menu->graph.conditions[loadId][CONDITION_CUTE] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL); + menu->graph.conditions[loadId][CONDITION_BEAUTY] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL); + menu->numSparkles[loadId] = GET_NUM_CONDITION_SPARKLES(GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL)); + menu->monMarks[loadId] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL); + ConditionGraph_CalcPositions(menu->graph.conditions[loadId], menu->graph.savedPositions[loadId]); } else { + // Set empty graph point for (i = 0; i < CONDITION_COUNT; i++) { - structPtr->graph.conditions[loadId][i] = 0; - structPtr->graph.savedPositions[loadId][i].x = CONDITION_GRAPH_CENTER_X; - structPtr->graph.savedPositions[loadId][i].y = CONDITION_GRAPH_CENTER_Y; + menu->graph.conditions[loadId][i] = 0; + menu->graph.savedPositions[loadId][i].x = CONDITION_GRAPH_CENTER_X; + menu->graph.savedPositions[loadId][i].y = CONDITION_GRAPH_CENTER_Y; } } } @@ -515,10 +521,10 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId) { u16 boxId, monId, species; u32 personality, tid; - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - if (listId == (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1)) + if (listId == (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1)) return; boxId = monListPtr->monData[listId].boxId; @@ -526,8 +532,8 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId) species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL); tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL); personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL); - LoadSpecialPokePic(&gMonFrontPicTable[species], structPtr->monPicGfx[loadId], species, personality, TRUE); - LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), structPtr->monPal[loadId]); + LoadSpecialPokePic(&gMonFrontPicTable[species], menu->monPicGfx[loadId], species, personality, TRUE); + LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), menu->monPal[loadId]); } u16 GetMonListCount(void) @@ -536,7 +542,7 @@ u16 GetMonListCount(void) return monListPtr->listCount; } -u16 GetConditionGraphCurrentMonIndex(void) +u16 GetConditionGraphCurrentListIndex(void) { struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); return monListPtr->currIndex; @@ -544,50 +550,50 @@ u16 GetConditionGraphCurrentMonIndex(void) struct ConditionGraph *GetConditionGraphPtr(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return &structPtr->graph; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return &menu->graph; } -u8 GetMonMarkIndex(void) +u8 GetConditionGraphMenuCurrentLoadIndex(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->mark; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return menu->loadId; } -u8 sub_81CDC9C(void) +u8 GetConditionGraphMenuToLoadListIndex(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->monIndex; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return menu->toLoadListIndex; } void *GetConditionMonPicGfx(u8 loadId) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->monPicGfx[loadId]; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return menu->monPicGfx[loadId]; } void *GetConditionMonPal(u8 loadId) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->monPal[loadId]; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return menu->monPal[loadId]; } -u8 sub_81CDCEC(void) +u8 GetConditionGraphMenuToLoadId(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->unk6789; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return menu->toLoadId; } u8 *GetConditionMonNameText(u8 loadId) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->nameText[loadId]; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return menu->nameText[loadId]; } u8 *GetConditionMonLocationText(u8 loadId) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->locationText[loadId]; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return menu->locationText[loadId]; } u16 GetConditionMonDataBuffer(void) @@ -598,24 +604,25 @@ u16 GetConditionMonDataBuffer(void) bool32 IsConditionMenuSearchMode(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - if (structPtr->searchMode == 1) + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + if (menu->inSearchMode == TRUE) return TRUE; else return FALSE; } +// Markings are only shown in search mode u8 TryGetMonMarkId(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - if (structPtr->searchMode == 1) - return structPtr->monMarks[structPtr->mark]; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + if (menu->inSearchMode == TRUE) + return menu->monMarks[menu->loadId]; else return 0; } u8 GetNumConditionMonSparkles(void) { - struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH); - return structPtr->numSparkles[structPtr->mark]; + struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); + return menu->numSparkles[menu->loadId]; } diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index c2e8cadea0..cecba800ca 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -16,21 +16,21 @@ #include "text.h" static u32 LoopedTask_TransitionMons(s32); -static u32 LoopedTask_ExitPartyConditionMenu(s32); +static u32 LoopedTask_ExitConditionGraphMenu(s32); static u32 LoopedTask_MoveCursorNoTransition(s32); static u32 LoopedTask_SlideMonOut(s32); static u32 LoopedTask_OpenMonMarkingsWindow(s32); static u32 LoopedTask_CloseMonMarkingsWindow(s32); -static u8 sUnknown_030012BC; +static u8 sInitialLoadId; // Never read const u16 gConditionGraphData_Pal[] = INCBIN_U16("graphics/pokenav/condition/graph_data.gbapal"); const u16 gConditionText_Pal[] = INCBIN_U16("graphics/pokenav/condition/text.gbapal"); -static const u32 sUnknown_08623228[] = INCBIN_U32("graphics/pokenav/condition/graph_data.4bpp.lz"); -static const u32 sConditionGraph_Tilemap[] = INCBIN_U32("graphics/pokenav/862323C.bin.lz"); -static const u16 sConditionGraphMonMarkingsPal[] = INCBIN_U16("graphics/pokenav/8623338.gbapal"); +static const u32 sConditionGraphData_Gfx[] = INCBIN_U32("graphics/pokenav/condition/graph_data.4bpp.lz"); +static const u32 sConditionGraphData_Tilemap[] = INCBIN_U32("graphics/pokenav/condition/graph_data.bin.lz"); +static const u16 sMonMarkings_Pal[] = INCBIN_U16("graphics/pokenav/condition/mon_markings.gbapal"); -static const struct BgTemplate sPartyConditionBgTemplates[3] = +static const struct BgTemplate sMenuBgTemplates[3] = { { .bg = 1, @@ -72,7 +72,7 @@ static const struct WindowTemplate sMonNameGenderWindowTemplate = .baseBlock = 2 }; -static const struct WindowTemplate sConditionGraphListIdWindowTemplate = +static const struct WindowTemplate sListIndexWindowTemplate = { .bg = 1, .tilemapLeft = 1, @@ -105,29 +105,29 @@ static const struct WindowTemplate sUnusedWindowTemplate2 = .baseBlock = 0x44 }; -static const LoopedTask sPartyConditionLoopedTaskFuncs[] = +static const LoopedTask sLoopedTaskFuncs[] = { - [PARTY_CONDITION_FUNC_NONE] = NULL, - [PARTY_CONDITION_FUNC_SLIDE_MON_IN] = LoopedTask_TransitionMons, - [PARTY_CONDITION_FUNC_RETURN] = LoopedTask_ExitPartyConditionMenu, - [PARTY_CONDITION_FUNC_NO_TRANSITION] = LoopedTask_MoveCursorNoTransition, - [PARTY_CONDITION_FUNC_SLIDE_MON_OUT] = LoopedTask_SlideMonOut, - [PARTY_CONDITION_FUNC_ADD_MARKINGS] = LoopedTask_OpenMonMarkingsWindow, - [PARTY_CONDITION_FUNC_CLOSE_MARKINGS] = LoopedTask_CloseMonMarkingsWindow + [CONDITION_FUNC_NONE] = NULL, + [CONDITION_FUNC_SLIDE_MON_IN] = LoopedTask_TransitionMons, + [CONDITION_FUNC_RETURN] = LoopedTask_ExitConditionGraphMenu, + [CONDITION_FUNC_NO_TRANSITION] = LoopedTask_MoveCursorNoTransition, + [CONDITION_FUNC_SLIDE_MON_OUT] = LoopedTask_SlideMonOut, + [CONDITION_FUNC_ADD_MARKINGS] = LoopedTask_OpenMonMarkingsWindow, + [CONDITION_FUNC_CLOSE_MARKINGS] = LoopedTask_CloseMonMarkingsWindow }; -struct Pokenav7Struct +struct Pokenav_ConditionMenuGfx { u32 loopedTaskId; u8 tilemapBuffers[3][BG_SCREEN_SIZE]; u8 filler[2]; - u8 partyPokeballSpriteIds[10]; + u8 partyPokeballSpriteIds[PARTY_SIZE + 1]; u32 (*callback)(void); s16 monTransitionX; u8 monPicSpriteId; u16 monPalIndex; u16 monGfxTileStart; - void *unk181C; + void *monGfxPtr; u8 nameGenderWindowId; u8 listIndexWindowId; u8 unusedWindowId1; @@ -139,66 +139,65 @@ struct Pokenav7Struct u8 filler2[0xFA3]; }; -extern s8 GetMonMarkIndex(void); // This function's declaration here is s8 vs. u8 in pokenav_conditions_1.c +extern s8 GetConditionGraphMenuCurrentLoadIndex(void); // This function's declaration here is s8 vs. u8 in pokenav_conditions_1.c -static u32 LoopedTask_OpenPartyConditionGraph(s32 state); -static u32 GetPartyConditionLoopedTaskActive(void); -static void CreateConditionMonPic(u8 var); +static u32 LoopedTask_OpenConditionGraphMenu(s32); +static u32 GetConditionGraphMenuLoopedTaskActive(void); +static void CreateConditionMonPic(u8); static void CreateMonMarkingsOrPokeballIndicators(void); static void CopyUnusedConditionWindowsToVram(void); -static bool32 UpdateConditionGraphWindows(u8 a0, u16 a1, bool8 a2); +static bool32 UpdateConditionGraphMenuWindows(u8, u16, bool8); static void VBlankCB_PokenavConditionGraph(void); -static void DoConditionGraphTransition(void); -static void sub_81CEEC8(void); -static void sub_81CEE68(void); -static void ToggleGraphData(bool8 showBg); +static void DoConditionGraphEnterTransition(void); +static void DoConditionGraphExitTransition(void); +static void SetExitVBlank(void); +static void ToggleGraphData(bool8); -// code -bool32 OpenPartyConditionMenu(void) +bool32 OpenConditionGraphMenu(void) { - struct Pokenav7Struct *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MON_MARK_MENU, sizeof(struct Pokenav7Struct)); + struct Pokenav_ConditionMenuGfx *menu = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX, sizeof(struct Pokenav_ConditionMenuGfx)); - if (structPtr == NULL) + if (menu == NULL) return FALSE; - structPtr->monPicSpriteId = SPRITE_NONE; - structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_OpenPartyConditionGraph, 1); - structPtr->callback = GetPartyConditionLoopedTaskActive; - structPtr->windowModeState = 0; + menu->monPicSpriteId = SPRITE_NONE; + menu->loopedTaskId = CreateLoopedTask(LoopedTask_OpenConditionGraphMenu, 1); + menu->callback = GetConditionGraphMenuLoopedTaskActive; + menu->windowModeState = 0; return TRUE; } -void CreatePartyConditionLoopedTask(s32 id) +void CreateConditionGraphMenuLoopedTask(s32 id) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); - structPtr->loopedTaskId = CreateLoopedTask(sPartyConditionLoopedTaskFuncs[id], 1); - structPtr->callback = GetPartyConditionLoopedTaskActive; + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); + menu->loopedTaskId = CreateLoopedTask(sLoopedTaskFuncs[id], 1); + menu->callback = GetConditionGraphMenuLoopedTaskActive; } -u32 IsPartyConditionLoopedTaskActive(void) +u32 IsConditionGraphMenuLoopedTaskActive(void) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); - return structPtr->callback(); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); + return menu->callback(); } -static u32 GetPartyConditionLoopedTaskActive(void) +static u32 GetConditionGraphMenuLoopedTaskActive(void) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); - return IsLoopedTaskActive(structPtr->loopedTaskId); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); + return IsLoopedTaskActive(menu->loopedTaskId); } -static u32 LoopedTask_OpenPartyConditionGraph(s32 state) +static u32 LoopedTask_OpenConditionGraphMenu(s32 state) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); switch (state) { case 0: - if (LoadPartyConditionMenuGfx() != TRUE) + if (LoadConditionGraphMenuGfx() != TRUE) return LT_PAUSE; return LT_INC_AND_PAUSE; case 1: - InitBgTemplates(sPartyConditionBgTemplates, ARRAY_COUNT(sPartyConditionBgTemplates)); + InitBgTemplates(sMenuBgTemplates, ARRAY_COUNT(sMenuBgTemplates)); ChangeBgX(1, 0, BG_COORD_SET); ChangeBgY(1, 0, BG_COORD_SET); ChangeBgX(2, 0, BG_COORD_SET); @@ -213,28 +212,28 @@ static u32 LoopedTask_OpenPartyConditionGraph(s32 state) case 2: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - DecompressAndCopyTileDataToVram(2, sUnknown_08623228, 0, 0, 0); + DecompressAndCopyTileDataToVram(2, sConditionGraphData_Gfx, 0, 0, 0); return LT_INC_AND_PAUSE; case 3: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - LZ77UnCompVram(gPokenavCondition_Tilemap, structPtr->tilemapBuffers[0]); - SetBgTilemapBuffer(3, structPtr->tilemapBuffers[0]); + LZ77UnCompVram(gPokenavCondition_Tilemap, menu->tilemapBuffers[0]); + SetBgTilemapBuffer(3, menu->tilemapBuffers[0]); if (IsConditionMenuSearchMode() == TRUE) CopyToBgTilemapBufferRect(3, gPokenavOptions_Tilemap, 0, 5, 9, 4); CopyBgTilemapBufferToVram(3); CopyPaletteIntoBufferUnfaded(gPokenavCondition_Pal, 0x10, 0x20); CopyPaletteIntoBufferUnfaded(gConditionText_Pal, 0xF0, 0x20); - structPtr->monTransitionX = -80; + menu->monTransitionX = -80; return LT_INC_AND_PAUSE; case 4: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - LZ77UnCompVram(sConditionGraph_Tilemap, structPtr->tilemapBuffers[2]); - SetBgTilemapBuffer(2, structPtr->tilemapBuffers[2]); + LZ77UnCompVram(sConditionGraphData_Tilemap, menu->tilemapBuffers[2]); + SetBgTilemapBuffer(2, menu->tilemapBuffers[2]); CopyBgTilemapBufferToVram(2); CopyPaletteIntoBufferUnfaded(gConditionGraphData_Pal, 0x30, 0x20); ConditionGraph_InitWindow(2); @@ -242,19 +241,19 @@ static u32 LoopedTask_OpenPartyConditionGraph(s32 state) case 5: BgDmaFill(1, 0, 0, 1); BgDmaFill(1, 17, 1, 1); - CpuFill32(0, structPtr->tilemapBuffers[1], BG_SCREEN_SIZE); - SetBgTilemapBuffer(1, structPtr->tilemapBuffers[1]); + CpuFill32(0, menu->tilemapBuffers[1], BG_SCREEN_SIZE); + SetBgTilemapBuffer(1, menu->tilemapBuffers[1]); return LT_INC_AND_PAUSE; case 6: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - structPtr->nameGenderWindowId = AddWindow(&sMonNameGenderWindowTemplate); + menu->nameGenderWindowId = AddWindow(&sMonNameGenderWindowTemplate); if (IsConditionMenuSearchMode() == TRUE) { - structPtr->listIndexWindowId = AddWindow(&sConditionGraphListIdWindowTemplate); - structPtr->unusedWindowId1 = AddWindow(&sUnusedWindowTemplate1); - structPtr->unusedWindowId2 = AddWindow(&sUnusedWindowTemplate2); + menu->listIndexWindowId = AddWindow(&sListIndexWindowTemplate); + menu->unusedWindowId1 = AddWindow(&sUnusedWindowTemplate1); + menu->unusedWindowId2 = AddWindow(&sUnusedWindowTemplate2); } DeactivateAllTextPrinters(); return LT_INC_AND_PAUSE; @@ -269,23 +268,23 @@ static u32 LoopedTask_OpenPartyConditionGraph(s32 state) CopyUnusedConditionWindowsToVram(); return LT_INC_AND_PAUSE; case 10: - UpdateConditionGraphWindows(0, GetMonMarkIndex(), TRUE); + UpdateConditionGraphMenuWindows(0, GetConditionGraphMenuCurrentLoadIndex(), TRUE); return LT_INC_AND_PAUSE; case 11: - UpdateConditionGraphWindows(1, GetMonMarkIndex(), TRUE); + UpdateConditionGraphMenuWindows(1, GetConditionGraphMenuCurrentLoadIndex(), TRUE); return LT_INC_AND_PAUSE; case 12: - UpdateConditionGraphWindows(2, GetMonMarkIndex(), TRUE); + UpdateConditionGraphMenuWindows(2, GetConditionGraphMenuCurrentLoadIndex(), TRUE); return LT_INC_AND_PAUSE; case 13: - if (UpdateConditionGraphWindows(3, GetMonMarkIndex(), TRUE) != TRUE) + if (UpdateConditionGraphMenuWindows(3, GetConditionGraphMenuCurrentLoadIndex(), TRUE) != TRUE) return LT_PAUSE; - PutWindowTilemap(structPtr->nameGenderWindowId); + PutWindowTilemap(menu->nameGenderWindowId); if (IsConditionMenuSearchMode() == TRUE) { - PutWindowTilemap(structPtr->listIndexWindowId); - PutWindowTilemap(structPtr->unusedWindowId1); - PutWindowTilemap(structPtr->unusedWindowId2); + PutWindowTilemap(menu->listIndexWindowId); + PutWindowTilemap(menu->unusedWindowId1); + PutWindowTilemap(menu->unusedWindowId2); } return LT_INC_AND_PAUSE; case 14: @@ -312,7 +311,7 @@ static u32 LoopedTask_OpenPartyConditionGraph(s32 state) SetVBlankCallback_(VBlankCB_PokenavConditionGraph); return LT_INC_AND_PAUSE; case 17: - DoConditionGraphTransition(); + DoConditionGraphEnterTransition(); ConditionGraph_InitResetScanline(GetConditionGraphPtr()); return LT_INC_AND_PAUSE; case 18: @@ -323,11 +322,11 @@ static u32 LoopedTask_OpenPartyConditionGraph(s32 state) ToggleGraphData(TRUE); return LT_INC_AND_PAUSE; case 20: - if (!ConditionMenu_UpdateMonEnter(GetConditionGraphPtr(), &structPtr->monTransitionX)) + if (!ConditionMenu_UpdateMonEnter(GetConditionGraphPtr(), &menu->monTransitionX)) { - ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); - if (IsConditionMenuSearchMode() == TRUE || GetConditionGraphCurrentMonIndex() != GetMonListCount()) - CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetNumConditionMonSparkles()); + ResetConditionSparkleSprites(menu->conditionSparkleSprites); + if (IsConditionMenuSearchMode() == TRUE || GetConditionGraphCurrentListIndex() != GetMonListCount()) + CreateConditionSparkleSprites(menu->conditionSparkleSprites, menu->monPicSpriteId, GetNumConditionMonSparkles()); return LT_FINISH; } @@ -337,18 +336,18 @@ static u32 LoopedTask_OpenPartyConditionGraph(s32 state) return LT_FINISH; } -static u32 LoopedTask_ExitPartyConditionMenu(s32 state) +static u32 LoopedTask_ExitConditionGraphMenu(s32 state) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); switch (state) { case 0: - sub_81CEEC8(); - DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); + DoConditionGraphExitTransition(); + DestroyConditionSparkleSprites(menu->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 1: - if (ConditionMenu_UpdateMonExit(GetConditionGraphPtr(), &structPtr->monTransitionX)) + if (ConditionMenu_UpdateMonExit(GetConditionGraphPtr(), &menu->monTransitionX)) return 2; ToggleGraphData(FALSE); return LT_INC_AND_CONTINUE; @@ -360,7 +359,7 @@ static u32 LoopedTask_ExitPartyConditionMenu(s32 state) case 3: if (IsPaletteFadeActive() || MainMenuLoopedTaskIsBusy()) return LT_PAUSE; - FreeConditionSparkles(structPtr->conditionSparkleSprites); + FreeConditionSparkles(menu->conditionSparkleSprites); HideBg(1); HideBg(2); HideBg(3); @@ -372,53 +371,53 @@ static u32 LoopedTask_ExitPartyConditionMenu(s32 state) static u32 LoopedTask_TransitionMons(s32 state) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); struct ConditionGraph *graph = GetConditionGraphPtr(); switch (state) { case 0: - SetConditionGraphData(0); + LoadNextConditionMenuMonData(CONDITION_LOAD_MON_INFO); return LT_INC_AND_CONTINUE; case 1: - SetConditionGraphData(1); + LoadNextConditionMenuMonData(CONDITION_LOAD_GRAPH); return LT_INC_AND_CONTINUE; case 2: - SetConditionGraphData(2); - DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); + LoadNextConditionMenuMonData(CONDITION_LOAD_MON_PIC); + DestroyConditionSparkleSprites(menu->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 3: ConditionGraph_TryUpdate(graph); return LT_INC_AND_CONTINUE; case 4: - if (!MoveConditionMonOffscreen(&structPtr->monTransitionX)) + if (!MoveConditionMonOffscreen(&menu->monTransitionX)) { - CreateConditionMonPic(GetMonMarkIndex()); + CreateConditionMonPic(GetConditionGraphMenuCurrentLoadIndex()); return LT_INC_AND_CONTINUE; } return LT_PAUSE; case 5: - UpdateConditionGraphWindows(0, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(0, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 6: - UpdateConditionGraphWindows(1, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(1, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 7: - UpdateConditionGraphWindows(2, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(2, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 8: - if (UpdateConditionGraphWindows(3, GetMonMarkIndex(), FALSE) == TRUE) + if (UpdateConditionGraphMenuWindows(3, GetConditionGraphMenuCurrentLoadIndex(), FALSE) == TRUE) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 9: graph = GetConditionGraphPtr(); - if (!ConditionMenu_UpdateMonEnter(graph, &structPtr->monTransitionX)) + if (!ConditionMenu_UpdateMonEnter(graph, &menu->monTransitionX)) { - ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); - if (IsConditionMenuSearchMode() != TRUE && GetConditionGraphCurrentMonIndex() == GetMonListCount()) + ResetConditionSparkleSprites(menu->conditionSparkleSprites); + if (IsConditionMenuSearchMode() != TRUE && GetConditionGraphCurrentListIndex() == GetMonListCount()) return LT_INC_AND_CONTINUE; - CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetNumConditionMonSparkles()); + CreateConditionSparkleSprites(menu->conditionSparkleSprites, menu->monPicSpriteId, GetNumConditionMonSparkles()); return LT_INC_AND_CONTINUE; } return LT_PAUSE; @@ -429,40 +428,40 @@ static u32 LoopedTask_TransitionMons(s32 state) static u32 LoopedTask_MoveCursorNoTransition(s32 state) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); switch (state) { case 0: - SetConditionGraphData(0); + LoadNextConditionMenuMonData(CONDITION_LOAD_MON_INFO); return LT_INC_AND_CONTINUE; case 1: - SetConditionGraphData(1); + LoadNextConditionMenuMonData(CONDITION_LOAD_GRAPH); return LT_INC_AND_CONTINUE; case 2: - SetConditionGraphData(2); + LoadNextConditionMenuMonData(CONDITION_LOAD_MON_PIC); return LT_INC_AND_CONTINUE; case 3: - CreateConditionMonPic(GetMonMarkIndex()); + CreateConditionMonPic(GetConditionGraphMenuCurrentLoadIndex()); return LT_INC_AND_CONTINUE; case 4: - UpdateConditionGraphWindows(0, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(0, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 5: - UpdateConditionGraphWindows(1, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(1, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 6: - UpdateConditionGraphWindows(2, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(2, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 7: - if (UpdateConditionGraphWindows(3, GetMonMarkIndex(), FALSE) == TRUE) + if (UpdateConditionGraphMenuWindows(3, GetConditionGraphMenuCurrentLoadIndex(), FALSE) == TRUE) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 8: - if (!ConditionMenu_UpdateMonEnter(GetConditionGraphPtr(), &structPtr->monTransitionX)) + if (!ConditionMenu_UpdateMonEnter(GetConditionGraphPtr(), &menu->monTransitionX)) { - ResetConditionSparkleSprites(structPtr->conditionSparkleSprites); - CreateConditionSparkleSprites(structPtr->conditionSparkleSprites, structPtr->monPicSpriteId, GetNumConditionMonSparkles()); + ResetConditionSparkleSprites(menu->conditionSparkleSprites); + CreateConditionSparkleSprites(menu->conditionSparkleSprites, menu->monPicSpriteId, GetNumConditionMonSparkles()); return LT_INC_AND_CONTINUE; } return LT_PAUSE; @@ -473,35 +472,35 @@ static u32 LoopedTask_MoveCursorNoTransition(s32 state) static u32 LoopedTask_SlideMonOut(s32 state) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); switch (state) { case 0: - SetConditionGraphData(0); + LoadNextConditionMenuMonData(CONDITION_LOAD_MON_INFO); return LT_INC_AND_CONTINUE; case 1: - SetConditionGraphData(1); + LoadNextConditionMenuMonData(CONDITION_LOAD_GRAPH); return LT_INC_AND_CONTINUE; case 2: - SetConditionGraphData(2); - DestroyConditionSparkleSprites(structPtr->conditionSparkleSprites); + LoadNextConditionMenuMonData(CONDITION_LOAD_MON_PIC); + DestroyConditionSparkleSprites(menu->conditionSparkleSprites); return LT_INC_AND_CONTINUE; case 3: - if (!ConditionMenu_UpdateMonExit(GetConditionGraphPtr(), &structPtr->monTransitionX)) + if (!ConditionMenu_UpdateMonExit(GetConditionGraphPtr(), &menu->monTransitionX)) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 4: - UpdateConditionGraphWindows(0, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(0, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 5: - UpdateConditionGraphWindows(1, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(1, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 6: - UpdateConditionGraphWindows(2, GetMonMarkIndex(), FALSE); + UpdateConditionGraphMenuWindows(2, GetConditionGraphMenuCurrentLoadIndex(), FALSE); return LT_INC_AND_CONTINUE; case 7: - if (UpdateConditionGraphWindows(3, GetMonMarkIndex(), FALSE) == TRUE) + if (UpdateConditionGraphMenuWindows(3, GetConditionGraphMenuCurrentLoadIndex(), FALSE) == TRUE) return LT_INC_AND_CONTINUE; return LT_PAUSE; } @@ -555,68 +554,68 @@ static u8 *UnusedPrintNumberString(u8 *dst, u16 num) return txtPtr; } -static bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMode) +static bool32 UpdateConditionGraphMenuWindows(u8 mode, u16 bufferIndex, bool8 winMode) { u8 text[32]; const u8 *str; - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); switch (mode) { case 0: - FillWindowPixelBuffer(structPtr->nameGenderWindowId, 0); + FillWindowPixelBuffer(menu->nameGenderWindowId, 0); if (IsConditionMenuSearchMode() == TRUE) - FillWindowPixelBuffer(structPtr->listIndexWindowId, 0); + FillWindowPixelBuffer(menu->listIndexWindowId, 0); break; case 1: - if (GetConditionGraphCurrentMonIndex() != GetMonListCount() - 1 || IsConditionMenuSearchMode() == TRUE) + if (GetConditionGraphCurrentListIndex() != GetMonListCount() - 1 || IsConditionMenuSearchMode() == TRUE) { str = GetConditionMonNameText(bufferIndex); - AddTextPrinterParameterized(structPtr->nameGenderWindowId, FONT_NORMAL, str, 0, 1, 0, NULL); + AddTextPrinterParameterized(menu->nameGenderWindowId, FONT_NORMAL, str, 0, 1, 0, NULL); } break; case 2: if (IsConditionMenuSearchMode() == TRUE) { str = GetConditionMonLocationText(bufferIndex); - AddTextPrinterParameterized(structPtr->nameGenderWindowId, FONT_NORMAL, str, 0, 17, 0, NULL); + AddTextPrinterParameterized(menu->nameGenderWindowId, FONT_NORMAL, str, 0, 17, 0, NULL); text[0] = EXT_CTRL_CODE_BEGIN; text[1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; text[2] = TEXT_COLOR_BLUE; text[3] = TEXT_COLOR_TRANSPARENT; text[4] = TEXT_COLOR_LIGHT_BLUE; StringCopy(&text[5], gText_Number2); - AddTextPrinterParameterized(structPtr->listIndexWindowId, FONT_NORMAL, text, 4, 1, 0, NULL); + AddTextPrinterParameterized(menu->listIndexWindowId, FONT_NORMAL, text, 4, 1, 0, NULL); ConvertIntToDecimalStringN(&text[5], GetConditionMonDataBuffer(), STR_CONV_MODE_RIGHT_ALIGN, 4); - AddTextPrinterParameterized(structPtr->listIndexWindowId, FONT_NORMAL, text, 28, 1, 0, NULL); + AddTextPrinterParameterized(menu->listIndexWindowId, FONT_NORMAL, text, 28, 1, 0, NULL); } break; case 3: - switch (structPtr->windowModeState) + switch (menu->windowModeState) { case 0: if (winMode) - CopyWindowToVram(structPtr->nameGenderWindowId, COPYWIN_FULL); + CopyWindowToVram(menu->nameGenderWindowId, COPYWIN_FULL); else - CopyWindowToVram(structPtr->nameGenderWindowId, COPYWIN_GFX); + CopyWindowToVram(menu->nameGenderWindowId, COPYWIN_GFX); if (IsConditionMenuSearchMode() == TRUE) { - structPtr->windowModeState++; + menu->windowModeState++; return FALSE; } else { - structPtr->windowModeState = 0; + menu->windowModeState = 0; return TRUE; } case 1: if (winMode) - CopyWindowToVram(structPtr->listIndexWindowId, COPYWIN_FULL); + CopyWindowToVram(menu->listIndexWindowId, COPYWIN_FULL); else - CopyWindowToVram(structPtr->listIndexWindowId, COPYWIN_GFX); + CopyWindowToVram(menu->listIndexWindowId, COPYWIN_GFX); - structPtr->windowModeState = 0; + menu->windowModeState = 0; return TRUE; } } @@ -626,23 +625,23 @@ static bool32 UpdateConditionGraphWindows(u8 mode, u16 bufferIndex, bool8 winMod static void CopyUnusedConditionWindowsToVram(void) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); - CopyWindowToVram(structPtr->unusedWindowId1, COPYWIN_FULL); - CopyWindowToVram(structPtr->unusedWindowId2, COPYWIN_FULL); + CopyWindowToVram(menu->unusedWindowId1, COPYWIN_FULL); + CopyWindowToVram(menu->unusedWindowId2, COPYWIN_FULL); } -void sub_81CE964(struct Sprite *sprite) +static void SpriteCB_PartyPokeball(struct Sprite *sprite) { - if (sprite->data[0] == GetConditionGraphCurrentMonIndex()) - StartSpriteAnim(sprite, 0); + if (sprite->data[0] == GetConditionGraphCurrentListIndex()) + StartSpriteAnim(sprite, CONDITION_ICON_SELECTED); else - StartSpriteAnim(sprite, 1); + StartSpriteAnim(sprite, CONDITION_ICON_UNSELECTED); } void HighlightCurrentPartyIndexPokeball(struct Sprite *sprite) { - if (GetConditionGraphCurrentMonIndex() == GetMonListCount() - 1) + if (GetConditionGraphCurrentListIndex() == GetMonListCount() - 1) sprite->oam.paletteNum = IndexOfSpritePaletteTag(TAG_CONDITION_BALL); else sprite->oam.paletteNum = IndexOfSpritePaletteTag(TAG_CONDITION_CANCEL); @@ -661,71 +660,76 @@ static void CreateMonMarkingsOrPokeballIndicators(void) struct SpriteSheet sprSheet; struct Sprite *sprite; u16 i, spriteId; - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); LoadConditionSelectionIcons(sprSheets, &sprTemplate, sprPals); if (IsConditionMenuSearchMode() == TRUE) { - structPtr->marksMenu.baseTileTag = TAG_CONDITION_MARKINGS_MENU; - structPtr->marksMenu.basePaletteTag = TAG_CONDITION_MARKINGS_MENU; - InitMonMarkingsMenu(&structPtr->marksMenu); + // Search Mode, load markings menu + menu->marksMenu.baseTileTag = TAG_CONDITION_MARKINGS_MENU; + menu->marksMenu.basePaletteTag = TAG_CONDITION_MARKINGS_MENU; + InitMonMarkingsMenu(&menu->marksMenu); BufferMonMarkingsMenuTiles(); - sprite = CreateMonMarkingAllCombosSprite(TAG_CONDITION_MON_MARKINGS, TAG_CONDITION_MON_MARKINGS, sConditionGraphMonMarkingsPal); + sprite = CreateMonMarkingAllCombosSprite(TAG_CONDITION_MON_MARKINGS, TAG_CONDITION_MON_MARKINGS, sMonMarkings_Pal); sprite->oam.priority = 3; sprite->x = 192; sprite->y = 32; sprite->callback = MonMarkingsCallback; - structPtr->monMarksSprite = sprite; + menu->monMarksSprite = sprite; PokenavFillPalette(IndexOfSpritePaletteTag(TAG_CONDITION_MON_MARKINGS), 0); } else { - // party mode -> add pokeballs on right hand side + // Party Mode, load Pokéball selection icons LoadSpriteSheets(sprSheets); Pokenav_AllocAndLoadPalettes(sprPals); + + // Add icons for occupied slots for (i = 0; i < GetMonListCount() - 1; i++) { spriteId = CreateSprite(&sprTemplate, 226, (i * 20) + 8, 0); if (spriteId != MAX_SPRITES) { - structPtr->partyPokeballSpriteIds[i] = spriteId; + menu->partyPokeballSpriteIds[i] = spriteId; gSprites[spriteId].data[0] = i; - gSprites[spriteId].callback = sub_81CE964; + gSprites[spriteId].callback = SpriteCB_PartyPokeball; } else { - structPtr->partyPokeballSpriteIds[i] = SPRITE_NONE; + menu->partyPokeballSpriteIds[i] = SPRITE_NONE; } } + // Add icons for empty slots sprTemplate.tileTag = TAG_CONDITION_BALL_PLACEHOLDER; sprTemplate.callback = SpriteCallbackDummy; - for (; i < 6; i++) + for (; i < PARTY_SIZE; i++) { spriteId = CreateSprite(&sprTemplate, 230, (i * 20) + 8, 0); if (spriteId != MAX_SPRITES) { - structPtr->partyPokeballSpriteIds[i] = spriteId; + menu->partyPokeballSpriteIds[i] = spriteId; gSprites[spriteId].oam.size = 0; } else { - structPtr->partyPokeballSpriteIds[i] = SPRITE_NONE; + menu->partyPokeballSpriteIds[i] = SPRITE_NONE; } } + // Add cancel icon sprTemplate.tileTag = TAG_CONDITION_CANCEL; sprTemplate.callback = HighlightCurrentPartyIndexPokeball; spriteId = CreateSprite(&sprTemplate, 222, (i * 20) + 8, 0); if (spriteId != MAX_SPRITES) { - structPtr->partyPokeballSpriteIds[i] = spriteId; + menu->partyPokeballSpriteIds[i] = spriteId; gSprites[spriteId].oam.shape = SPRITE_SHAPE(32x16); gSprites[spriteId].oam.size = SPRITE_SIZE(32x16); } else { - structPtr->partyPokeballSpriteIds[i] = SPRITE_NONE; + menu->partyPokeballSpriteIds[i] = SPRITE_NONE; } } @@ -735,13 +739,13 @@ static void CreateMonMarkingsOrPokeballIndicators(void) Pokenav_AllocAndLoadPalettes(sprPals); } -void sub_81CEBF4(struct Pokenav7Struct *structPtr) +static void FreeConditionMenuGfx(struct Pokenav_ConditionMenuGfx *menu) { u8 i; if (IsConditionMenuSearchMode() == TRUE) { - DestroySprite(structPtr->monMarksSprite); + DestroySprite(menu->monMarksSprite); FreeSpriteTilesByTag(TAG_CONDITION_MARKINGS_MENU); FreeSpriteTilesByTag(TAG_CONDITION_MON_MARKINGS); FreeSpritePaletteByTag(TAG_CONDITION_MARKINGS_MENU); @@ -749,8 +753,8 @@ void sub_81CEBF4(struct Pokenav7Struct *structPtr) } else { - for (i = 0; i < 7; i++) - DestroySprite(&gSprites[structPtr->partyPokeballSpriteIds[i]]); + for (i = 0; i < PARTY_SIZE + 1; i++) + DestroySprite(&gSprites[menu->partyPokeballSpriteIds[i]]); FreeSpriteTilesByTag(TAG_CONDITION_BALL); FreeSpriteTilesByTag(TAG_CONDITION_CANCEL); @@ -759,24 +763,24 @@ void sub_81CEBF4(struct Pokenav7Struct *structPtr) FreeSpritePaletteByTag(TAG_CONDITION_CANCEL); } - if (structPtr->monPicSpriteId != SPRITE_NONE) + if (menu->monPicSpriteId != SPRITE_NONE) { - DestroySprite(&gSprites[structPtr->monPicSpriteId]); + DestroySprite(&gSprites[menu->monPicSpriteId]); FreeSpriteTilesByTag(TAG_CONDITION_MON); FreeSpritePaletteByTag(TAG_CONDITION_MON); } } -void FreePartyConditionSubstruct2(void) +void FreeConditionGraphMenuSubstruct2(void) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); - RemoveWindow(structPtr->nameGenderWindowId); + RemoveWindow(menu->nameGenderWindowId); if (IsConditionMenuSearchMode() == TRUE) { - RemoveWindow(structPtr->listIndexWindowId); - RemoveWindow(structPtr->unusedWindowId1); - RemoveWindow(structPtr->unusedWindowId2); + RemoveWindow(menu->listIndexWindowId); + RemoveWindow(menu->unusedWindowId1); + RemoveWindow(menu->unusedWindowId2); } else { @@ -784,15 +788,15 @@ void FreePartyConditionSubstruct2(void) } SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG0_ON | DISPCNT_OBJ_1D_MAP); - sub_81CEBF4(structPtr); - sub_81CEE68(); - FreePokenavSubstruct(POKENAV_SUBSTRUCT_MON_MARK_MENU); + FreeConditionMenuGfx(menu); + SetExitVBlank(); + FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); } void MonPicGfxSpriteCallback(struct Sprite *sprite) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); - sprite->x = structPtr->monTransitionX + 38; + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); + sprite->x = menu->monTransitionX + 38; } static void CreateConditionMonPic(u8 id) @@ -801,35 +805,35 @@ static void CreateConditionMonPic(u8 id) struct SpriteSheet sprSheet; struct SpritePalette sprPal; u8 spriteId; - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); - if (structPtr->monPicSpriteId == SPRITE_NONE) + if (menu->monPicSpriteId == SPRITE_NONE) { LoadConditionMonPicTemplate(&sprSheet, &sprTemplate, &sprPal); sprSheet.data = GetConditionMonPicGfx(id); sprPal.data = GetConditionMonPal(id); - structPtr->monPalIndex = LoadSpritePalette(&sprPal); - structPtr->monGfxTileStart = LoadSpriteSheet(&sprSheet); + menu->monPalIndex = LoadSpritePalette(&sprPal); + menu->monGfxTileStart = LoadSpriteSheet(&sprSheet); spriteId = CreateSprite(&sprTemplate, 38, 104, 0); - structPtr->monPicSpriteId = spriteId; + menu->monPicSpriteId = spriteId; if (spriteId == MAX_SPRITES) { FreeSpriteTilesByTag(TAG_CONDITION_MON); FreeSpritePaletteByTag(TAG_CONDITION_MON); - structPtr->monPicSpriteId = SPRITE_NONE; + menu->monPicSpriteId = SPRITE_NONE; } else { - structPtr->monPicSpriteId = spriteId; - gSprites[structPtr->monPicSpriteId].callback = MonPicGfxSpriteCallback; - structPtr->unk181C = (void*)VRAM + BG_VRAM_SIZE + (structPtr->monGfxTileStart * 32); - structPtr->monPalIndex = (structPtr->monPalIndex * 16) + 0x100; + menu->monPicSpriteId = spriteId; + gSprites[menu->monPicSpriteId].callback = MonPicGfxSpriteCallback; + menu->monGfxPtr = (void*)VRAM + BG_VRAM_SIZE + (menu->monGfxTileStart * 32); + menu->monPalIndex = (menu->monPalIndex * 16) + 0x100; } } else { - DmaCopy16Defvars(3, GetConditionMonPicGfx(id), structPtr->unk181C, MON_PIC_SIZE); - LoadPalette(GetConditionMonPal(id), structPtr->monPalIndex, 0x20); + DmaCopy16Defvars(3, GetConditionMonPicGfx(id), menu->monGfxPtr, MON_PIC_SIZE); + LoadPalette(GetConditionMonPal(id), menu->monPalIndex, 0x20); } } @@ -843,7 +847,7 @@ static void VBlankCB_PokenavConditionGraph(void) ScanlineEffect_InitHBlankDmaTransfer(); } -static void sub_81CEE68(void) +static void SetExitVBlank(void) { SetPokenavVBlankCallback(); } @@ -856,30 +860,33 @@ static void ToggleGraphData(bool8 showBg) HideBg(2); } -static void DoConditionGraphTransition(void) +static void DoConditionGraphEnterTransition(void) { struct ConditionGraph *graph = GetConditionGraphPtr(); - u8 id = GetMonMarkIndex(); + u8 id = GetConditionGraphMenuCurrentLoadIndex(); - sUnknown_030012BC = id; + sInitialLoadId = id; ConditionGraph_SetNewPositions(graph, graph->savedPositions[CONDITION_GRAPH_LOAD_MAX - 1], graph->savedPositions[id]); ConditionGraph_TryUpdate(graph); } -static void sub_81CEEC8(void) +// Transition the graph back to empty before exiting. +// This is skipped if the player is in party mode and the cursor +// is on Cancel, in which case the graph is already empty. +static void DoConditionGraphExitTransition(void) { struct ConditionGraph *graph = GetConditionGraphPtr(); - if (IsConditionMenuSearchMode() || GetConditionGraphCurrentMonIndex() != GetMonListCount() - 1) - ConditionGraph_SetNewPositions(graph, graph->savedPositions[GetMonMarkIndex()], graph->savedPositions[CONDITION_GRAPH_LOAD_MAX - 1]); + if (IsConditionMenuSearchMode() || GetConditionGraphCurrentListIndex() != GetMonListCount() - 1) + ConditionGraph_SetNewPositions(graph, graph->savedPositions[GetConditionGraphMenuCurrentLoadIndex()], graph->savedPositions[CONDITION_GRAPH_LOAD_MAX - 1]); } u8 GetMonMarkingsData(void) { - struct Pokenav7Struct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_MARK_MENU); + struct Pokenav_ConditionMenuGfx *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX); if (IsConditionMenuSearchMode() == 1) - return structPtr->marksMenu.markings; + return menu->marksMenu.markings; else return 0; } diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 1172774d79..d9bd2273f6 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -21,48 +21,48 @@ enum CONDITION_SEARCH_FUNC_SELECT_MON, }; -struct PokenavSub7 +struct Pokenav_SearchResults { - u32 (*callback)(struct PokenavSub7 *); + u32 (*callback)(struct Pokenav_SearchResults *); u32 loopedTaskId; u8 fill1[4]; s32 boxId; s32 monId; u32 conditionDataId; - u32 returnFromGraph; - u32 isPartyCondition; + bool32 returnFromGraph; + bool32 saveResultsList; struct PokenavSub18 *monList; }; -struct PokenavSub8 +struct Pokenav_SearchResultsGfx { bool32 (*callback)(void); - u32 ltid; //looped task Id + u32 loopedTaskId; u16 winid; bool32 fromGraph; u8 buff[BG_SCREEN_SIZE]; }; // size: 0x810 -static u32 HandleConditionSearchInput_WaitSetup(struct PokenavSub7 *structPtr); -static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr); -static u32 OpenConditionGraphFromSearchList(struct PokenavSub7 *structPtr); -static u32 ReturnToConditionSearchList(struct PokenavSub7 *structPtr); -static u32 GetConditionSearchLoopedTask(s32 state); -static u32 BuildPartyMonSearchResults(s32 state); -static u32 InitBoxMonSearchResults(s32 state); -static u32 BuildBoxMonSearchResults(s32 state); -static u32 sub_81CF278(s32 state); -static u32 LoopedTask_MoveSearchListCursorUp(s32 state); -static u32 LoopedTask_MoveSearchListCursorDown(s32 state); -static u32 LoopedTask_MoveSearchListPageUp(s32 state); -static u32 LoopedTask_MoveSearchListPageDown(s32 state); -static u32 LoopedTask_ExitConditionSearchMenu(s32 state); -static u32 LoopedTask_SelectSearchResult(s32 state); -static void sub_81CF2C4(struct PokenavSub7 *structPtr, struct PokenavMonList *item); +static u32 HandleConditionSearchInput_WaitSetup(struct Pokenav_SearchResults *); +static u32 HandleConditionSearchInput(struct Pokenav_SearchResults *); +static u32 OpenConditionGraphFromSearchList(struct Pokenav_SearchResults *); +static u32 ReturnToConditionSearchList(struct Pokenav_SearchResults *); +static u32 GetConditionSearchLoopedTask(s32); +static u32 BuildPartyMonSearchResults(s32); +static u32 InitBoxMonSearchResults(s32); +static u32 BuildBoxMonSearchResults(s32); +static u32 ConvertConditionsToListRanks(s32); +static u32 LoopedTask_MoveSearchListCursorUp(s32); +static u32 LoopedTask_MoveSearchListCursorDown(s32); +static u32 LoopedTask_MoveSearchListPageUp(s32); +static u32 LoopedTask_MoveSearchListPageDown(s32); +static u32 LoopedTask_ExitConditionSearchMenu(s32); +static u32 LoopedTask_SelectSearchResult(s32); +static void InsertMonListItem(struct Pokenav_SearchResults *, struct PokenavMonList *); static bool32 GetSearchResultCurrentLoopedTaskActive(void); -static u32 LoopedTask_OpenConditionSearchResults(s32 state); -static void AddSearchResultListMenuWindow(struct PokenavSub8 *); -static void PrintSearchResultListMenuItems(struct PokenavSub8 *); +static u32 LoopedTask_OpenConditionSearchResults(s32); +static void AddSearchResultListMenuWindow(struct Pokenav_SearchResultsGfx *); +static void PrintSearchResultListMenuItems(struct Pokenav_SearchResultsGfx *); static void InitConditionSearchListMenuTemplate(void); static void PrintSearchMonListItem(struct PokenavMonList *, u8 *); @@ -73,13 +73,13 @@ static const LoopedTask sConditionSearchLoopedTaskFuncs[] = BuildPartyMonSearchResults, InitBoxMonSearchResults, BuildBoxMonSearchResults, - sub_81CF278 + ConvertConditionsToListRanks }; -static const u16 sConditionSearchResultFramePal[] = INCBIN_U16("graphics/pokenav/condition_search2.gbapal"); -static const u32 sConditionSearchResultTiles[] = INCBIN_U32("graphics/pokenav/condition_search2.4bpp.lz"); -static const u32 sConditionSearchResultTilemap[] = INCBIN_U32("graphics/pokenav/condition_search2.bin.lz"); -static const u16 gUnknown_08623570[] = INCBIN_U16("graphics/pokenav/8623570.gbapal"); +static const u16 sConditionSearchResultFramePal[] = INCBIN_U16("graphics/pokenav/condition/search_results.gbapal"); +static const u32 sConditionSearchResultTiles[] = INCBIN_U32("graphics/pokenav/condition/search_results.4bpp.lz"); +static const u32 sConditionSearchResultTilemap[] = INCBIN_U32("graphics/pokenav/condition/search_results.bin.lz"); +static const u16 sListBg_Pal[] = INCBIN_U16("graphics/pokenav/condition/search_results_list.gbapal"); static const struct BgTemplate sConditionSearchResultBgTemplates[] = { @@ -130,57 +130,57 @@ static const u8 sText_NoGenderSymbol[] = _("{UNK_SPACER}"); bool32 PokenavCallback_Init_ConditionSearch(void) { - struct PokenavSub7 *structPtr = AllocSubstruct(7, sizeof(struct PokenavSub7)); - if (structPtr == NULL) + struct Pokenav_SearchResults *menu = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS, sizeof(struct Pokenav_SearchResults)); + if (menu == NULL) return FALSE; - structPtr->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18)); - if (structPtr->monList == NULL) + menu->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18)); + if (menu->monList == NULL) return FALSE; - structPtr->callback = HandleConditionSearchInput_WaitSetup; - structPtr->loopedTaskId = CreateLoopedTask(GetConditionSearchLoopedTask, 1); - structPtr->returnFromGraph = 0; - structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()]; + menu->callback = HandleConditionSearchInput_WaitSetup; + menu->loopedTaskId = CreateLoopedTask(GetConditionSearchLoopedTask, 1); + menu->returnFromGraph = FALSE; + menu->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()]; return TRUE; } // return to search results from condition graph bool32 PokenavCallback_Init_ReturnToMonSearchList(void) { - struct PokenavSub7 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS, sizeof(struct PokenavSub7)); - if (structPtr == NULL) + struct Pokenav_SearchResults *menu = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS, sizeof(struct Pokenav_SearchResults)); + if (menu == NULL) return FALSE; - structPtr->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); - structPtr->callback = HandleConditionSearchInput; - structPtr->returnFromGraph = 1; - structPtr->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()]; + menu->monList = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + menu->callback = HandleConditionSearchInput; + menu->returnFromGraph = TRUE; + menu->conditionDataId = sSearchMonDataIds[GetSelectedConditionSearch()]; return TRUE; } u32 GetConditionSearchResultsCallback(void) { - struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - return structPtr->callback(structPtr); + struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + return menu->callback(menu); } void FreeSearchResultSubstruct1(void) { - struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - if (structPtr->isPartyCondition == 0) + struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + if (!menu->saveResultsList) FreePokenavSubstruct(POKENAV_SUBSTRUCT_MON_LIST); FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); } -static bool32 HandleConditionSearchInput_WaitSetup(struct PokenavSub7 *structPtr) +static bool32 HandleConditionSearchInput_WaitSetup(struct Pokenav_SearchResults *menu) { - if (!IsLoopedTaskActive(structPtr->loopedTaskId)) - structPtr->callback = HandleConditionSearchInput; + if (!IsLoopedTaskActive(menu->loopedTaskId)) + menu->callback = HandleConditionSearchInput; return FALSE; } -static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr) +static u32 HandleConditionSearchInput(struct Pokenav_SearchResults *menu) { if (JOY_REPEAT(DPAD_UP)) return CONDITION_SEARCH_FUNC_MOVE_UP; @@ -192,60 +192,63 @@ static u32 HandleConditionSearchInput(struct PokenavSub7 *structPtr) return CONDITION_SEARCH_FUNC_PAGE_DOWN; else if (JOY_NEW(B_BUTTON)) { - structPtr->isPartyCondition = 0; - structPtr->callback = ReturnToConditionSearchList; + // Exiting back to main search menu + menu->saveResultsList = FALSE; + menu->callback = ReturnToConditionSearchList; return CONDITION_SEARCH_FUNC_EXIT; } else if (JOY_NEW(A_BUTTON)) { - structPtr->monList->currIndex = GetSelectedPokenavListIndex(); - structPtr->isPartyCondition = 1; - structPtr->callback = OpenConditionGraphFromSearchList; + // Entering graph menu + menu->monList->currIndex = GetSelectedPokenavListIndex(); + menu->saveResultsList = TRUE; + menu->callback = OpenConditionGraphFromSearchList; return CONDITION_SEARCH_FUNC_SELECT_MON; } else return CONDITION_SEARCH_FUNC_NONE; } -static u32 ReturnToConditionSearchList(struct PokenavSub7 *structPtr) +static u32 ReturnToConditionSearchList(struct Pokenav_SearchResults *menu) { return POKENAV_CONDITION_SEARCH_MENU; } -static u32 OpenConditionGraphFromSearchList(struct PokenavSub7 *structPtr) +static u32 OpenConditionGraphFromSearchList(struct Pokenav_SearchResults *menu) { - return POKENAV_CONDITION_GRAPH_FROM_SEARCH; + return POKENAV_CONDITION_GRAPH_SEARCH; } -static u32 sub_81CF0C0(void) +static u32 GetReturningFromGraph(void) { - struct PokenavSub7 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - return structPtr->returnFromGraph; + struct Pokenav_SearchResults *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + return menu->returnFromGraph; } static struct PokenavMonList * GetSearchResultsMonDataList(void) { - struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - return ptr->monList->monData; + struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + return menu->monList->monData; } static u16 GetSearchResultsMonListCount(void) { - struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - return ptr->monList->listCount; + struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + return menu->monList->listCount; } -static s32 GetSearchResultsSelectedMonData(void) +// data below has been set by ConvertConditionsToListRanks +static s32 GetSearchResultsSelectedMonRank(void) { - struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); s32 i = GetSelectedPokenavListIndex(); - return ptr->monList->monData[i].data; + return menu->monList->monData[i].data; } -static u16 sub_81CF10C(void) +static u16 GetSearchResultsCurrentListIndex(void) { - struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - return ptr->monList->currIndex; + struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + return menu->monList->currIndex; } static u32 GetConditionSearchLoopedTask(s32 state) @@ -257,11 +260,11 @@ static u32 BuildPartyMonSearchResults(s32 state) { s32 i; struct PokenavMonList item; - struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - ptr->monList->listCount = 0; - ptr->monList->currIndex = 0; - item.boxId = 14; + menu->monList->listCount = 0; + menu->monList->currIndex = 0; + item.boxId = TOTAL_BOXES_COUNT; for (i = 0; i < PARTY_SIZE; i++) { struct Pokemon * pokemon = &gPlayerParty[i]; @@ -270,8 +273,8 @@ static u32 BuildPartyMonSearchResults(s32 state) if (!GetMonData(pokemon, MON_DATA_SANITY_IS_EGG)) { item.monId = i; - item.data = GetMonData(pokemon, ptr->conditionDataId); - sub_81CF2C4(ptr, &item); + item.data = GetMonData(pokemon, menu->conditionDataId); + InsertMonListItem(menu, &item); } } @@ -280,17 +283,17 @@ static u32 BuildPartyMonSearchResults(s32 state) static u32 InitBoxMonSearchResults(s32 state) { - struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - ptr->monId = 0; - ptr->boxId = 0; + struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + menu->monId = 0; + menu->boxId = 0; return LT_INC_AND_CONTINUE; } static u32 BuildBoxMonSearchResults(s32 state) { - struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - s32 boxId = ptr->boxId; - s32 monId = ptr->monId; + struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + s32 boxId = menu->boxId; + s32 monId = menu->monId; s32 boxCount = 0; struct PokenavMonList item; @@ -302,15 +305,15 @@ static u32 BuildBoxMonSearchResults(s32 state) { item.boxId = boxId; item.monId = monId; - item.data = GetBoxMonDataAt(boxId, monId, ptr->conditionDataId); - sub_81CF2C4(ptr, &item); + item.data = GetBoxMonDataAt(boxId, monId, menu->conditionDataId); + InsertMonListItem(menu, &item); } boxCount++; monId++; - if (boxCount > 14) + if (boxCount > TOTAL_BOXES_COUNT) { - ptr->boxId = boxId; - ptr->monId = monId; + menu->boxId = boxId; + menu->monId = monId; return LT_CONTINUE; } } @@ -321,107 +324,111 @@ static u32 BuildBoxMonSearchResults(s32 state) return LT_INC_AND_CONTINUE; } -static u32 sub_81CF278(s32 state) +// Data below is initially set by BuildPartyMonSearchResults / BuildBoxMonSearchResults, and +// is the Pokémon's condition value for the condition they are sorted by. +// The condition value in data is then overwritten with their ranking. +static u32 ConvertConditionsToListRanks(s32 state) { - struct PokenavSub7 * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - s32 r6 = ptr->monList->listCount; - s32 r4 = ptr->monList->monData[0].data; + struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); + s32 listCount = menu->monList->listCount; + s32 prevCondition = menu->monList->monData[0].data; s32 i; - ptr->monList->monData[0].data = 1; - for (i = 1; i < r6; i++) + menu->monList->monData[0].data = 1; + for (i = 1; i < listCount; i++) { - if (ptr->monList->monData[i].data == r4) + if (menu->monList->monData[i].data == prevCondition) { - ptr->monList->monData[i].data = ptr->monList->monData[i - 1].data; + // Same condition value as prev, share rank + menu->monList->monData[i].data = menu->monList->monData[i - 1].data; } else { - r4 = ptr->monList->monData[i].data; - ptr->monList->monData[i].data = i + 1; + prevCondition = menu->monList->monData[i].data; + menu->monList->monData[i].data = i + 1; } } - ptr->returnFromGraph = 1; + menu->returnFromGraph = TRUE; return LT_FINISH; } -static void sub_81CF2C4(struct PokenavSub7 *structPtr, struct PokenavMonList *item) +static void InsertMonListItem(struct Pokenav_SearchResults *menu, struct PokenavMonList *item) { u32 left = 0; - u32 right = structPtr->monList->listCount; + u32 right = menu->monList->listCount; u32 insertionIdx = left + (right - left) / 2; while (right != insertionIdx) { - if (item->data > structPtr->monList->monData[insertionIdx].data) + if (item->data > menu->monList->monData[insertionIdx].data) right = insertionIdx; else left = insertionIdx + 1; insertionIdx = left + (right - left) / 2; } - for (right = structPtr->monList->listCount; right > insertionIdx; right--) - structPtr->monList->monData[right] = structPtr->monList->monData[right - 1]; - structPtr->monList->monData[insertionIdx] = *item; - structPtr->monList->listCount++; + for (right = menu->monList->listCount; right > insertionIdx; right--) + menu->monList->monData[right] = menu->monList->monData[right - 1]; + menu->monList->monData[insertionIdx] = *item; + menu->monList->listCount++; } bool32 OpenConditionSearchResults(void) { - struct PokenavSub8 *searchList = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST, sizeof(struct PokenavSub8)); - if (searchList == NULL) + struct Pokenav_SearchResultsGfx *gfx = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX, sizeof(struct Pokenav_SearchResultsGfx)); + if (gfx == NULL) return FALSE; - searchList->ltid = CreateLoopedTask(LoopedTask_OpenConditionSearchResults, 1); - searchList->callback = GetSearchResultCurrentLoopedTaskActive; - searchList->fromGraph = FALSE; + gfx->loopedTaskId = CreateLoopedTask(LoopedTask_OpenConditionSearchResults, 1); + gfx->callback = GetSearchResultCurrentLoopedTaskActive; + gfx->fromGraph = FALSE; return TRUE; } bool32 OpenConditionSearchListFromGraph(void) { - struct PokenavSub8 *searchList = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST, sizeof(struct PokenavSub8)); - if (searchList == NULL) + struct Pokenav_SearchResultsGfx *gfx = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX, sizeof(struct Pokenav_SearchResultsGfx)); + if (gfx == NULL) return FALSE; - searchList->ltid = CreateLoopedTask(LoopedTask_OpenConditionSearchResults, 1); - searchList->callback = GetSearchResultCurrentLoopedTaskActive; - searchList->fromGraph = TRUE; + gfx->loopedTaskId = CreateLoopedTask(LoopedTask_OpenConditionSearchResults, 1); + gfx->callback = GetSearchResultCurrentLoopedTaskActive; + gfx->fromGraph = TRUE; return TRUE; } void CreateSearchResultsLoopedTask(s32 idx) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); - searchList->ltid = CreateLoopedTask(sSearchResultLoopTaskFuncs[idx], 1); - searchList->callback = GetSearchResultCurrentLoopedTaskActive; + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); + gfx->loopedTaskId = CreateLoopedTask(sSearchResultLoopTaskFuncs[idx], 1); + gfx->callback = GetSearchResultCurrentLoopedTaskActive; } bool32 IsSearchResultLoopedTaskActive(void) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); - return searchList->callback(); + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); + return gfx->callback(); } bool32 GetSearchResultCurrentLoopedTaskActive(void) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); - return IsLoopedTaskActive(searchList->ltid); + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); + return IsLoopedTaskActive(gfx->loopedTaskId); } void FreeSearchResultSubstruct2(void) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); sub_81C8234(); - RemoveWindow(searchList->winid); - FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); + RemoveWindow(gfx->winid); + FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); } static u32 LoopedTask_OpenConditionSearchResults(s32 state) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); switch (state) { case 0: InitBgTemplates(sConditionSearchResultBgTemplates, ARRAY_COUNT(sConditionSearchResultBgTemplates)); DecompressAndCopyTileDataToVram(1, sConditionSearchResultTiles, 0, 0, 0); - SetBgTilemapBuffer(1, searchList->buff); + SetBgTilemapBuffer(1, gfx->buff); CopyToBgTilemapBuffer(1, sConditionSearchResultTilemap, 0, 0); CopyBgTilemapBufferToVram(1); CopyPaletteIntoBufferUnfaded(sConditionSearchResultFramePal, 0x10, 0x20); @@ -430,19 +437,19 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state) case 1: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - if (!sub_81CF0C0()) + if (!GetReturningFromGraph()) return LT_PAUSE; return LT_INC_AND_PAUSE; case 2: if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - CopyPaletteIntoBufferUnfaded(gUnknown_08623570, 0x20, 32); + CopyPaletteIntoBufferUnfaded(sListBg_Pal, 0x20, 32); InitConditionSearchListMenuTemplate(); return LT_INC_AND_PAUSE; case 3: if (sub_81C8224()) return LT_PAUSE; - AddSearchResultListMenuWindow(searchList); + AddSearchResultListMenuWindow(gfx); PrintHelpBarText(HELPBAR_CONDITION_MON_LIST); return LT_INC_AND_PAUSE; case 4: @@ -453,7 +460,7 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state) ShowBg(1); ShowBg(2); HideBg(3); - if (!searchList->fromGraph) + if (!gfx->fromGraph) { u8 searchGfxId = GetSelectedConditionSearch() + POKENAV_MENUITEM_CONDITION_SEARCH_COOL; LoadLeftHeaderGfxForIndex(searchGfxId); @@ -474,7 +481,7 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state) static u32 LoopedTask_MoveSearchListCursorUp(s32 state) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); switch (state) { case 0: @@ -495,7 +502,7 @@ static u32 LoopedTask_MoveSearchListCursorUp(s32 state) return LT_PAUSE; // fallthrough case 2: - PrintSearchResultListMenuItems(searchList); + PrintSearchResultListMenuItems(gfx); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -507,7 +514,7 @@ static u32 LoopedTask_MoveSearchListCursorUp(s32 state) static u32 LoopedTask_MoveSearchListCursorDown(s32 state) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); switch (state) { case 0: @@ -528,7 +535,7 @@ static u32 LoopedTask_MoveSearchListCursorDown(s32 state) return LT_PAUSE; // fallthrough case 2: - PrintSearchResultListMenuItems(searchList); + PrintSearchResultListMenuItems(gfx); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -540,7 +547,7 @@ static u32 LoopedTask_MoveSearchListCursorDown(s32 state) static u32 LoopedTask_MoveSearchListPageUp(s32 state) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); switch (state) { case 0: @@ -561,7 +568,7 @@ static u32 LoopedTask_MoveSearchListPageUp(s32 state) return LT_PAUSE; // fallthrough case 2: - PrintSearchResultListMenuItems(searchList); + PrintSearchResultListMenuItems(gfx); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -573,7 +580,7 @@ static u32 LoopedTask_MoveSearchListPageUp(s32 state) static u32 LoopedTask_MoveSearchListPageDown(s32 state) { - struct PokenavSub8 *searchList = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULT_LIST); + struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); switch (state) { case 0: @@ -594,7 +601,7 @@ static u32 LoopedTask_MoveSearchListPageDown(s32 state) return LT_PAUSE; // fallthrough case 2: - PrintSearchResultListMenuItems(searchList); + PrintSearchResultListMenuItems(gfx); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -640,25 +647,25 @@ static u32 LoopedTask_SelectSearchResult(s32 state) return LT_FINISH; } -static void AddSearchResultListMenuWindow(struct PokenavSub8 *searchList) +static void AddSearchResultListMenuWindow(struct Pokenav_SearchResultsGfx *gfx) { - searchList->winid = AddWindow(&sSearchResultListMenuWindowTemplate); - PutWindowTilemap(searchList->winid); - CopyWindowToVram(searchList->winid, COPYWIN_MAP); - PrintSearchResultListMenuItems(searchList); + gfx->winid = AddWindow(&sSearchResultListMenuWindowTemplate); + PutWindowTilemap(gfx->winid); + CopyWindowToVram(gfx->winid, COPYWIN_MAP); + PrintSearchResultListMenuItems(gfx); } -static void PrintSearchResultListMenuItems(struct PokenavSub8 *searchList) +static void PrintSearchResultListMenuItems(struct Pokenav_SearchResultsGfx *gfx) { - s32 r7 = GetSearchResultsSelectedMonData(); + s32 rank = GetSearchResultsSelectedMonRank(); DynamicPlaceholderTextUtil_Reset(); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gStringVar1); *gStringVar1 = EOS; - DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar2, gText_NumberF700); - AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar2, 4, 1, TEXT_SKIP_DRAW, NULL); - ConvertIntToDecimalStringN(gStringVar1, r7, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized(searchList->winid, FONT_NORMAL, gStringVar1, 34, 1, TEXT_SKIP_DRAW, NULL); - CopyWindowToVram(searchList->winid, COPYWIN_GFX); + DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar2, gText_NumberIndex); + AddTextPrinterParameterized(gfx->winid, FONT_NORMAL, gStringVar2, 4, 1, TEXT_SKIP_DRAW, NULL); + ConvertIntToDecimalStringN(gStringVar1, rank, STR_CONV_MODE_RIGHT_ALIGN, 3); + AddTextPrinterParameterized(gfx->winid, FONT_NORMAL, gStringVar1, 34, 1, TEXT_SKIP_DRAW, NULL); + CopyWindowToVram(gfx->winid, COPYWIN_GFX); } static void InitConditionSearchListMenuTemplate(void) @@ -668,7 +675,7 @@ static void InitConditionSearchListMenuTemplate(void) template.list.monList = GetSearchResultsMonDataList(); template.count = GetSearchResultsMonListCount(); template.unk8 = 4; - template.unk6 = sub_81CF10C(); + template.unk6 = GetSearchResultsCurrentListIndex(); template.item_X = 13; template.windowWidth = 17; template.listTop = 1; diff --git a/src/pokenav_menu_handler_1.c b/src/pokenav_menu_handler_1.c index 4792756c18..a500e7c18d 100644 --- a/src/pokenav_menu_handler_1.c +++ b/src/pokenav_menu_handler_1.c @@ -355,7 +355,7 @@ static u32 HandleConditionMenuInput(struct Pokenav1Struct *state) return POKENAV_MENU_FUNC_OPEN_CONDITION_SEARCH; case POKENAV_MENUITEM_CONDITION_PARTY: state->helpBarIndex = 0; - SetMenuIdAndCB(state, POKENAV_CONDITION_PARTY); + SetMenuIdAndCB(state, POKENAV_CONDITION_GRAPH_PARTY); return POKENAV_MENU_FUNC_OPEN_FEATURE; case POKENAV_MENUITEM_CONDITION_CANCEL: PlaySE(SE_SELECT); diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index 4724eab0e0..a50f451066 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -359,7 +359,7 @@ bool32 OpenPokenavMenuNotInitial(void) static struct Pokenav2Struct * OpenPokenavMenu(void) { - struct Pokenav2Struct * state = AllocSubstruct(2, sizeof(struct Pokenav2Struct)); + struct Pokenav2Struct * state = AllocSubstruct(POKENAV_SUBSTRUCT_MENU_ICONS, sizeof(struct Pokenav2Struct)); if (state != NULL) { diff --git a/src/strings.c b/src/strings.c index 3785766ce9..eebf367d74 100644 --- a/src/strings.c +++ b/src/strings.c @@ -990,7 +990,7 @@ const u8 gText_Unknown[] = _("UNKNOWN"); const u8 gText_Call[] = _("CALL"); const u8 gText_Check[] = _("CHECK"); const u8 gText_Cancel6[] = _("CANCEL"); -const u8 gText_NumberF700[] = _("No. {DYNAMIC 0}"); +const u8 gText_NumberIndex[] = _("No. {DYNAMIC 0}"); const u8 gText_RibbonsF700[] = _("RIBBONS {DYNAMIC 0}"); const u8 gText_PokemonMaleLv2[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GRAY WHITE LIGHT_GRAY}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused const u8 gText_PokemonFemaleLv2[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GRAY WHITE LIGHT_GRAY}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index 8cf8480ccd..ef5fdfaf5e 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -1577,9 +1577,9 @@ static void SpriteCB_MonPic(struct Sprite *sprite) static void SpriteCB_SelectionIconPokeball(struct Sprite *sprite) { if (sprite->data[0] == sMenu->info.curSelection) - StartSpriteAnim(sprite, 0); + StartSpriteAnim(sprite, CONDITION_ICON_SELECTED); else - StartSpriteAnim(sprite, 1); + StartSpriteAnim(sprite, CONDITION_ICON_UNSELECTED); } static void SpriteCB_SelectionIconCancel(struct Sprite *sprite) From 35aeff1b6df8efc4e088bd20c71e4243b95c6599 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 12 Nov 2021 11:07:52 -0500 Subject: [PATCH 167/417] Rename pokenav conditions files --- include/pokenav.h | 6 +++--- ld_script.txt | 10 +++++----- src/{pokenav_conditions_1.c => pokenav_conditions.c} | 0 ...pokenav_conditions_2.c => pokenav_conditions_gfx.c} | 2 +- ...ditions_3.c => pokenav_conditions_search_results.c} | 0 sym_bss.txt | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) rename src/{pokenav_conditions_1.c => pokenav_conditions.c} (100%) rename src/{pokenav_conditions_2.c => pokenav_conditions_gfx.c} (99%) rename src/{pokenav_conditions_3.c => pokenav_conditions_search_results.c} (100%) diff --git a/include/pokenav.h b/include/pokenav.h index 847d4b7e76..9713546335 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -436,7 +436,7 @@ bool32 IsRegionMapLoopedTaskActive(void); void FreeRegionMapSubstruct1(void); void FreeRegionMapSubstruct2(void); -// pokenav_conditions_1.c +// pokenav_conditions.c u32 PokenavCallback_Init_ConditionGraph_Party(void); u32 PokenavCallback_Init_ConditionGraph_Search(void); u32 GetConditionGraphMenuCallback(void); @@ -455,14 +455,14 @@ u16 GetConditionMonDataBuffer(void); void *GetConditionMonPicGfx(u8 id); void *GetConditionMonPal(u8 id); -// pokenav_conditions_2.c +// pokenav_conditions_gfx.c bool32 OpenConditionGraphMenu(void); void CreateConditionGraphMenuLoopedTask(s32); u32 IsConditionGraphMenuLoopedTaskActive(void); void FreeConditionGraphMenuSubstruct2(void); u8 GetMonMarkingsData(void); -// pokenav_conditions_3.c +// pokenav_conditions_search_results.c u32 PokenavCallback_Init_ConditionSearch(void); u32 PokenavCallback_Init_ReturnToMonSearchList(void); u32 GetConditionSearchResultsCallback(void); diff --git a/ld_script.txt b/ld_script.txt index ca0480e0fd..c4283265d8 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -316,9 +316,9 @@ SECTIONS { src/pokenav_match_call_1.o(.text); src/pokenav_match_call_2.o(.text); src/pokenav_region_map.o(.text); - src/pokenav_conditions_1.o(.text); - src/pokenav_conditions_2.o(.text); - src/pokenav_conditions_3.o(.text); + src/pokenav_conditions.o(.text); + src/pokenav_conditions_gfx.o(.text); + src/pokenav_conditions_search_results.o(.text); src/pokenav_ribbons_list.o(.text); src/pokenav_ribbons_summary.o(.text); src/pokenav_match_call_data.o(.text); @@ -671,8 +671,8 @@ SECTIONS { src/pokenav_match_call_1.o(.rodata); src/pokenav_match_call_2.o(.rodata); src/pokenav_region_map.o(.rodata); - src/pokenav_conditions_2.o(.rodata); - src/pokenav_conditions_3.o(.rodata); + src/pokenav_conditions_gfx.o(.rodata); + src/pokenav_conditions_search_results.o(.rodata); src/pokenav_ribbons_list.o(.rodata); src/pokenav_ribbons_summary.o(.rodata); src/pokenav_match_call_data.o(.rodata); diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions.c similarity index 100% rename from src/pokenav_conditions_1.c rename to src/pokenav_conditions.c diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_gfx.c similarity index 99% rename from src/pokenav_conditions_2.c rename to src/pokenav_conditions_gfx.c index cecba800ca..a1593983d2 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_gfx.c @@ -139,7 +139,7 @@ struct Pokenav_ConditionMenuGfx u8 filler2[0xFA3]; }; -extern s8 GetConditionGraphMenuCurrentLoadIndex(void); // This function's declaration here is s8 vs. u8 in pokenav_conditions_1.c +extern s8 GetConditionGraphMenuCurrentLoadIndex(void); // This function's declaration here is s8 vs. u8 in pokenav_conditions.c static u32 LoopedTask_OpenConditionGraphMenu(s32); static u32 GetConditionGraphMenuLoopedTaskActive(void); diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_search_results.c similarity index 100% rename from src/pokenav_conditions_3.c rename to src/pokenav_conditions_search_results.c diff --git a/sym_bss.txt b/sym_bss.txt index 8724f02d7f..75da960bf9 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -50,7 +50,7 @@ .include "src/multiboot.o" .include "src/mirage_tower.o" .include "src/berry_fix_program.o" - .include "src/pokenav_conditions_2.o" + .include "src/pokenav_conditions_gfx.o" .include "src/pokenav_ribbons_summary.o" .include "src/ereader_helpers.o" .include "src/faraway_island.o" From 004d1cab3fd7eb7b67fd32b457848604836b3c1a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 12 Nov 2021 11:13:49 -0500 Subject: [PATCH 168/417] Clean up pokenav conditions doc --- include/pokenav.h | 8 -------- src/menu_specialized.c | 2 +- src/pokenav_conditions.c | 44 +++++++++++++++++++++------------------- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/include/pokenav.h b/include/pokenav.h index 9713546335..a0e2934535 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -255,14 +255,6 @@ enum CONDITION_FUNC_CLOSE_MARKINGS, }; -enum -{ - CONDITION_MON_0, - CONDITION_MON_1, - CONDITION_MON_2, - NUM_CONDITION_MONS -}; - enum { CONDITION_LOAD_MON_INFO, diff --git a/src/menu_specialized.c b/src/menu_specialized.c index d1cc3ff58f..20d67ca7f9 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -591,7 +591,7 @@ static void ConditionGraph_CalcRightHalf(struct ConditionGraph *graph) // Calculate Cute -> Tough line (includes left scanline because this crosses the halfway point) i = (graph->curPositions[GRAPH_CUTE].y <= graph->curPositions[GRAPH_SMART].y); ConditionGraph_CalcLine(graph, graph->scanlineRight[0], &graph->curPositions[GRAPH_CUTE], &graph->curPositions[GRAPH_SMART], i, graph->scanlineLeft[0]); - + // Clear down to new top for (i = CONDITION_GRAPH_TOP_Y; i < y; i++) { diff --git a/src/pokenav_conditions.c b/src/pokenav_conditions.c index fc188db715..6007acc2bb 100644 --- a/src/pokenav_conditions.c +++ b/src/pokenav_conditions.c @@ -13,20 +13,22 @@ #include "text.h" #include "constants/songs.h" +#define CONDITION_MONS_LOADED 3 + struct Pokenav_ConditionMenu { - u32 monPal[NUM_CONDITION_MONS][0x20]; + u32 monPal[CONDITION_MONS_LOADED][0x20]; u8 fill[0x180]; - u32 monPicGfx[NUM_CONDITION_MONS][MON_PIC_SIZE]; + u32 monPicGfx[CONDITION_MONS_LOADED][MON_PIC_SIZE]; bool8 inSearchMode; s16 toLoadListIndex; u32 (*callback)(struct Pokenav_ConditionMenu *); u8 fill2[0x18]; - u8 locationText[NUM_CONDITION_MONS][24]; - u8 nameText[NUM_CONDITION_MONS][64]; + u8 locationText[CONDITION_MONS_LOADED][24]; + u8 nameText[CONDITION_MONS_LOADED][64]; struct ConditionGraph graph; - u8 numSparkles[NUM_CONDITION_MONS]; - u8 monMarks[NUM_CONDITION_MONS]; + u8 numSparkles[CONDITION_MONS_LOADED]; + u8 monMarks[CONDITION_MONS_LOADED]; s8 loadId; s8 nextLoadIdDown; s8 nextLoadIdUp; @@ -239,28 +241,28 @@ bool32 LoadConditionGraphMenuGfx(void) switch (menu->state) { case 0: - CopyMonNameGenderLocation(monListPtr->currIndex, CONDITION_MON_0); + CopyMonNameGenderLocation(monListPtr->currIndex, 0); break; case 1: - GetMonConditionGraphData(monListPtr->currIndex, CONDITION_MON_0); + GetMonConditionGraphData(monListPtr->currIndex, 0); break; case 2: - ConditionGraphDrawMonPic(monListPtr->currIndex, CONDITION_MON_0); + ConditionGraphDrawMonPic(monListPtr->currIndex, 0); break; case 3: if (monListPtr->listCount == 1) { - menu->loadId = CONDITION_MON_0; - menu->nextLoadIdDown = CONDITION_MON_0; - menu->nextLoadIdUp = CONDITION_MON_0; + menu->loadId = 0; + menu->nextLoadIdDown = 0; + menu->nextLoadIdUp = 0; menu->state = 0; return TRUE; } else { - menu->loadId = CONDITION_MON_0; - menu->nextLoadIdDown = CONDITION_MON_1; - menu->nextLoadIdUp = CONDITION_MON_2; + menu->loadId = 0; + menu->nextLoadIdDown = 1; + menu->nextLoadIdUp = 2; } break; // These were probably ternaries just like cases 7-9, but couldn't match it any other way. @@ -268,28 +270,28 @@ bool32 LoadConditionGraphMenuGfx(void) var = monListPtr->currIndex + 1; if (var >= monListPtr->listCount) var = 0; - CopyMonNameGenderLocation(var, CONDITION_MON_1); + CopyMonNameGenderLocation(var, 1); break; case 5: var = monListPtr->currIndex + 1; if (var >= monListPtr->listCount) var = 0; - GetMonConditionGraphData(var, CONDITION_MON_1); + GetMonConditionGraphData(var, 1); break; case 6: var = monListPtr->currIndex + 1; if (var >= monListPtr->listCount) var = 0; - ConditionGraphDrawMonPic(var, CONDITION_MON_1); + ConditionGraphDrawMonPic(var, 1); break; case 7: - CopyMonNameGenderLocation((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2); + CopyMonNameGenderLocation((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2); break; case 8: - GetMonConditionGraphData((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2); + GetMonConditionGraphData((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2); break; case 9: - ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, CONDITION_MON_2); + ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2); menu->state = 0; return TRUE; } From baeacbe2f10ef69468d3bdb223d8ca74c963e9d6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 12 Nov 2021 12:40:36 -0500 Subject: [PATCH 169/417] Clean up pokenav general menus, organize pokenav graphics --- graphics/pokenav/icon2_unused.png | Bin 194 -> 0 bytes .../{arrows_matchcall.png => list_arrows.png} | Bin graphics/pokenav/{ => match_call}/86226E0.pal | 0 graphics/pokenav/{ => match_call}/8622700.pal | 0 .../{arrow2.png => match_call/arrow.png} | Bin .../{icon.png => match_call/nav_icon.png} | Bin .../{8622720.pal => match_call/pokeball.pal} | 0 .../pokeball.png} | Bin .../{ui_matchcall.bin => match_call/ui.bin} | Bin .../{ui_matchcall.png => match_call/ui.png} | Bin .../window.png} | Bin graphics/pokenav/{icon2.png => nav_icon.png} | Bin graphics/pokenav/pokeball_matchcall.pal | 35 - .../pokenav/{ => region_map}/brendan_icon.png | Bin graphics/pokenav/{ => region_map}/cursor.pal | 0 .../pokenav/{ => region_map}/cursor_large.png | Bin .../pokenav/{ => region_map}/cursor_small.png | Bin .../{ => region_map}/fly_target_icons.png | Bin .../{map_frame.bin => region_map/frame.bin} | Bin .../{map_frame.png => region_map/frame.png} | Bin .../info_window.pal} | 0 .../pokenav/{ => region_map}/may_icon.png | Bin graphics_file_rules.mk | 2 +- include/pokenav.h | 6 +- src/match_call.c | 8 +- src/pokenav.c | 1 - src/pokenav_main_menu.c | 271 ++++---- src/pokenav_match_call_2.c | 20 +- src/pokenav_match_call_ui.c | 4 +- src/pokenav_menu_handler_1.c | 302 ++++----- src/pokenav_menu_handler_2.c | 636 ++++++++++-------- src/pokenav_region_map.c | 4 +- src/region_map.c | 33 +- 33 files changed, 687 insertions(+), 635 deletions(-) delete mode 100644 graphics/pokenav/icon2_unused.png rename graphics/pokenav/{arrows_matchcall.png => list_arrows.png} (100%) rename graphics/pokenav/{ => match_call}/86226E0.pal (100%) rename graphics/pokenav/{ => match_call}/8622700.pal (100%) rename graphics/pokenav/{arrow2.png => match_call/arrow.png} (100%) rename graphics/pokenav/{icon.png => match_call/nav_icon.png} (100%) rename graphics/pokenav/{8622720.pal => match_call/pokeball.pal} (100%) rename graphics/pokenav/{pokeball_matchcall.png => match_call/pokeball.png} (100%) rename graphics/pokenav/{ui_matchcall.bin => match_call/ui.bin} (100%) rename graphics/pokenav/{ui_matchcall.png => match_call/ui.png} (100%) rename graphics/pokenav/{match_call_window.png => match_call/window.png} (100%) rename graphics/pokenav/{icon2.png => nav_icon.png} (100%) delete mode 100644 graphics/pokenav/pokeball_matchcall.pal rename graphics/pokenav/{ => region_map}/brendan_icon.png (100%) rename graphics/pokenav/{ => region_map}/cursor.pal (100%) rename graphics/pokenav/{ => region_map}/cursor_large.png (100%) rename graphics/pokenav/{ => region_map}/cursor_small.png (100%) rename graphics/pokenav/{ => region_map}/fly_target_icons.png (100%) rename graphics/pokenav/{map_frame.bin => region_map/frame.bin} (100%) rename graphics/pokenav/{map_frame.png => region_map/frame.png} (100%) rename graphics/pokenav/{region_map_info_window.pal => region_map/info_window.pal} (100%) rename graphics/pokenav/{ => region_map}/may_icon.png (100%) diff --git a/graphics/pokenav/icon2_unused.png b/graphics/pokenav/icon2_unused.png deleted file mode 100644 index c32a9b9be9f17feb7585d641a220838974e2e0dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Et!VDx^^%AmxltF+`i0l9V|JNjGu9-4r%bGR+ zj~0KcPFk|$Y*NxUpg6~t|3Fo6aQ5ugHEZ@NEI8W&6!P_SaSV}|y0zbsiNTPCWpBgx z)t^l57x*5QeK%``v1qUkx0cB4%GQO>LKCWImHWsvcMIqyZi&`eEVO8UK?~o*{=OZ` i$8LVSQBga^`n7%Z*Gfgh6Q@3c?DBN=b6Mw<&;$ULGfE%; diff --git a/graphics/pokenav/arrows_matchcall.png b/graphics/pokenav/list_arrows.png similarity index 100% rename from graphics/pokenav/arrows_matchcall.png rename to graphics/pokenav/list_arrows.png diff --git a/graphics/pokenav/86226E0.pal b/graphics/pokenav/match_call/86226E0.pal similarity index 100% rename from graphics/pokenav/86226E0.pal rename to graphics/pokenav/match_call/86226E0.pal diff --git a/graphics/pokenav/8622700.pal b/graphics/pokenav/match_call/8622700.pal similarity index 100% rename from graphics/pokenav/8622700.pal rename to graphics/pokenav/match_call/8622700.pal diff --git a/graphics/pokenav/arrow2.png b/graphics/pokenav/match_call/arrow.png similarity index 100% rename from graphics/pokenav/arrow2.png rename to graphics/pokenav/match_call/arrow.png diff --git a/graphics/pokenav/icon.png b/graphics/pokenav/match_call/nav_icon.png similarity index 100% rename from graphics/pokenav/icon.png rename to graphics/pokenav/match_call/nav_icon.png diff --git a/graphics/pokenav/8622720.pal b/graphics/pokenav/match_call/pokeball.pal similarity index 100% rename from graphics/pokenav/8622720.pal rename to graphics/pokenav/match_call/pokeball.pal diff --git a/graphics/pokenav/pokeball_matchcall.png b/graphics/pokenav/match_call/pokeball.png similarity index 100% rename from graphics/pokenav/pokeball_matchcall.png rename to graphics/pokenav/match_call/pokeball.png diff --git a/graphics/pokenav/ui_matchcall.bin b/graphics/pokenav/match_call/ui.bin similarity index 100% rename from graphics/pokenav/ui_matchcall.bin rename to graphics/pokenav/match_call/ui.bin diff --git a/graphics/pokenav/ui_matchcall.png b/graphics/pokenav/match_call/ui.png similarity index 100% rename from graphics/pokenav/ui_matchcall.png rename to graphics/pokenav/match_call/ui.png diff --git a/graphics/pokenav/match_call_window.png b/graphics/pokenav/match_call/window.png similarity index 100% rename from graphics/pokenav/match_call_window.png rename to graphics/pokenav/match_call/window.png diff --git a/graphics/pokenav/icon2.png b/graphics/pokenav/nav_icon.png similarity index 100% rename from graphics/pokenav/icon2.png rename to graphics/pokenav/nav_icon.png diff --git a/graphics/pokenav/pokeball_matchcall.pal b/graphics/pokenav/pokeball_matchcall.pal deleted file mode 100644 index 25baec5176..0000000000 --- a/graphics/pokenav/pokeball_matchcall.pal +++ /dev/null @@ -1,35 +0,0 @@ -JASC-PAL -0100 -32 -0 197 0 -246 197 123 -255 255 255 -106 115 123 -0 0 0 -189 106 65 -49 65 74 -255 222 156 -180 131 82 -189 139 106 -197 197 197 -255 255 255 -0 0 0 -0 0 0 -0 0 0 -255 74 16 -0 197 0 -246 197 123 -255 255 255 -106 115 123 -0 0 0 -189 106 65 -49 65 74 -255 222 156 -180 131 82 -189 139 106 -197 197 197 -197 197 197 -0 0 0 -0 0 0 -0 0 0 -189 106 65 diff --git a/graphics/pokenav/brendan_icon.png b/graphics/pokenav/region_map/brendan_icon.png similarity index 100% rename from graphics/pokenav/brendan_icon.png rename to graphics/pokenav/region_map/brendan_icon.png diff --git a/graphics/pokenav/cursor.pal b/graphics/pokenav/region_map/cursor.pal similarity index 100% rename from graphics/pokenav/cursor.pal rename to graphics/pokenav/region_map/cursor.pal diff --git a/graphics/pokenav/cursor_large.png b/graphics/pokenav/region_map/cursor_large.png similarity index 100% rename from graphics/pokenav/cursor_large.png rename to graphics/pokenav/region_map/cursor_large.png diff --git a/graphics/pokenav/cursor_small.png b/graphics/pokenav/region_map/cursor_small.png similarity index 100% rename from graphics/pokenav/cursor_small.png rename to graphics/pokenav/region_map/cursor_small.png diff --git a/graphics/pokenav/fly_target_icons.png b/graphics/pokenav/region_map/fly_target_icons.png similarity index 100% rename from graphics/pokenav/fly_target_icons.png rename to graphics/pokenav/region_map/fly_target_icons.png diff --git a/graphics/pokenav/map_frame.bin b/graphics/pokenav/region_map/frame.bin similarity index 100% rename from graphics/pokenav/map_frame.bin rename to graphics/pokenav/region_map/frame.bin diff --git a/graphics/pokenav/map_frame.png b/graphics/pokenav/region_map/frame.png similarity index 100% rename from graphics/pokenav/map_frame.png rename to graphics/pokenav/region_map/frame.png diff --git a/graphics/pokenav/region_map_info_window.pal b/graphics/pokenav/region_map/info_window.pal similarity index 100% rename from graphics/pokenav/region_map_info_window.pal rename to graphics/pokenav/region_map/info_window.pal diff --git a/graphics/pokenav/may_icon.png b/graphics/pokenav/region_map/may_icon.png similarity index 100% rename from graphics/pokenav/may_icon.png rename to graphics/pokenav/region_map/may_icon.png diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index bc503eec25..eb36d4255f 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -697,7 +697,7 @@ $(PKNAVGFXDIR)/header.4bpp: %.4bpp: %.png $(PKNAVGFXDIR)/device_outline.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 53 -$(PKNAVGFXDIR)/ui_matchcall.4bpp: %.4bpp: %.png +$(PKNAVGFXDIR)/match_call/ui.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 13 $(INTERFACEGFXDIR)/region_map.8bpp: %.8bpp: %.png diff --git a/include/pokenav.h b/include/pokenav.h index a0e2934535..6dc88cab79 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -69,7 +69,7 @@ enum { POKENAV_SUBSTRUCT_MAIN_MENU, POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, - POKENAV_SUBSTRUCT_MENU_ICONS, + POKENAV_SUBSTRUCT_MENU_GFX, POKENAV_SUBSTRUCT_REGION_MAP_STATE, POKENAV_SUBSTRUCT_REGION_MAP_ZOOM, POKENAV_SUBSTRUCT_MATCH_CALL_MAIN, @@ -82,7 +82,7 @@ enum POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU_GFX, POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST, POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU, - POKENAV_SUBSTRUCT_15, //unused + POKENAV_SUBSTRUCT_UNUSED, POKENAV_SUBSTRUCT_REGION_MAP, POKENAV_SUBSTRUCT_MATCH_CALL_LIST, POKENAV_SUBSTRUCT_MON_LIST, @@ -358,7 +358,7 @@ void SlideMenuHeaderDown(void); bool32 MainMenuLoopedTaskIsBusy(void); void SetLeftHeaderSpritesInvisibility(void); void PokenavCopyPalette(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *palette); -void sub_81C7B40(void); +void FadeToBlackExceptPrimary(void); struct Sprite *PauseSpinningPokenavSprite(void); void ResumeSpinningPokenavSprite(void); void UpdateRegionMapRightHeaderTiles(u32 arg0); diff --git a/src/match_call.c b/src/match_call.c index 9e4659ee60..0595ad3e33 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1187,10 +1187,10 @@ static void StartMatchCall(void) CreateTask(ExecuteMatchCall, 1); } -static const u16 sMatchCallWindow_Pal[] = INCBIN_U16("graphics/pokenav/match_call_window.gbapal"); -static const u8 sMatchCallWindow_Gfx[] = INCBIN_U8("graphics/pokenav/match_call_window.4bpp"); -static const u16 sPokenavIcon_Pal[] = INCBIN_U16("graphics/pokenav/icon.gbapal"); -static const u32 sPokenavIcon_Gfx[] = INCBIN_U32("graphics/pokenav/icon.4bpp.lz"); +static const u16 sMatchCallWindow_Pal[] = INCBIN_U16("graphics/pokenav/match_call/window.gbapal"); +static const u8 sMatchCallWindow_Gfx[] = INCBIN_U8("graphics/pokenav/match_call/window.4bpp"); +static const u16 sPokenavIcon_Pal[] = INCBIN_U16("graphics/pokenav/match_call/nav_icon.gbapal"); +static const u32 sPokenavIcon_Gfx[] = INCBIN_U32("graphics/pokenav/match_call/nav_icon.4bpp.lz"); static const u8 sText_PokenavCallEllipsis[] = _("………………\p"); diff --git a/src/pokenav.c b/src/pokenav.c index b09fc9da09..f9a6614a89 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -49,7 +49,6 @@ static void Task_RunLoopedTask(u8 taskId); static void Task_Pokenav(u8 taskId); static void CB2_InitPokenavForTutorial(void); -// TODO: Use MENU ids const struct PokenavCallbacks PokenavMenuCallbacks[15] = { [POKENAV_MAIN_MENU - POKENAV_MENU_IDS_START] = diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index 714c8221a3..77faecaa39 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -13,7 +13,7 @@ #include "menu.h" #include "dma3.h" -struct PokenavMainMenuResources +struct Pokenav_MainMenu { void (*loopTask)(u32); u32 (*isLoopTaskActiveFunc)(void); @@ -24,7 +24,7 @@ struct PokenavMainMenuResources struct Sprite *spinningPokenav; struct Sprite *leftHeaderSprites[2]; struct Sprite *submenuLeftHeaderSprites[2]; - u8 tilemapBuffer[0x800]; + u8 tilemapBuffer[BG_SCREEN_SIZE]; }; // This struct uses a 32bit tag, and doesn't have a size field. @@ -36,26 +36,26 @@ struct CompressedSpriteSheetNoSize }; static void CleanupPokenavMainMenuResources(void); -static void LoadLeftHeaderGfxForSubMenu(u32 arg0); -static void LoadLeftHeaderGfxForMenu(u32 index); -static void HideLeftHeaderSubmenuSprites(bool32 isOnRightSide); -static void HideLeftHeaderSprites(bool32 isOnRightSide); -static void ShowLeftHeaderSprites(u32 startY, bool32 isOnRightSide); -static void ShowLeftHeaderSubmenuSprites(u32 startY, bool32 isOnRightSide); -static void MoveLeftHeader(struct Sprite *sprite, s32 startX, s32 endX, s32 duration); -static void SpriteCB_MoveLeftHeader(struct Sprite *sprite); +static void LoadLeftHeaderGfxForSubMenu(u32); +static void LoadLeftHeaderGfxForMenu(u32); +static void HideLeftHeaderSubmenuSprites(bool32); +static void HideLeftHeaderSprites(bool32); +static void ShowLeftHeaderSprites(u32, bool32); +static void ShowLeftHeaderSubmenuSprites(u32, bool32); +static void MoveLeftHeader(struct Sprite *, s32, s32, s32); +static void SpriteCB_MoveLeftHeader(struct Sprite *); static void InitPokenavMainMenuResources(void); -static void InitHoennMapHeaderSprites(void); +static void CreateLeftHeaderSprites(void); static void InitHelpBar(void); -static u32 LoopedTask_SlideMenuHeaderUp(s32 a0); -static u32 LoopedTask_SlideMenuHeaderDown(s32 a0); -static void DrawHelpBar(u32 windowId); -static void SpriteCB_SpinningPokenav(struct Sprite* sprite); -static u32 LoopedTask_InitPokenavMenu(s32 a0); +static u32 LoopedTask_SlideMenuHeaderUp(s32); +static u32 LoopedTask_SlideMenuHeaderDown(s32); +static void DrawHelpBar(u32); +static void SpriteCB_SpinningPokenav(struct Sprite*); +static u32 LoopedTask_InitPokenavMenu(s32); -const u16 gSpinningPokenavPaletteData[] = INCBIN_U16("graphics/pokenav/icon2.gbapal"); -const u32 gSpinningPokenavGfx[] = INCBIN_U32("graphics/pokenav/icon2.4bpp.lz"); -const u32 gUnused_SpinningPokenavGfx2[] = INCBIN_U32("graphics/pokenav/icon2_unused.4bpp.lz"); +static const u16 sSpinningPokenav_Pal[] = INCBIN_U16("graphics/pokenav/nav_icon.gbapal"); +static const u32 sSpinningPokenav_Gfx[] = INCBIN_U32("graphics/pokenav/nav_icon.4bpp.lz"); +static const u32 sBlueLightCopy[] = INCBIN_U32("graphics/pokenav/blue_light.4bpp.lz"); // Unused copy of sMatchCallBlueLightTiles const struct BgTemplate gPokenavMainMenuBgTemplates[] = { @@ -108,7 +108,7 @@ static const u8 sHelpBarTextColors[3] = static const struct CompressedSpriteSheet gSpinningPokenavSpriteSheet[] = { { - .data = gSpinningPokenavGfx, + .data = sSpinningPokenav_Gfx, .size = 0x1000, .tag = 0, } @@ -117,20 +117,20 @@ static const struct CompressedSpriteSheet gSpinningPokenavSpriteSheet[] = static const struct SpritePalette gSpinningNavgearPalettes[] = { { - .data = gSpinningPokenavPaletteData, + .data = sSpinningPokenav_Pal, .tag = 0, }, {} }; -static const struct CompressedSpriteSheet sPokenavHoennMapLeftHeaderSpriteSheet = +static const struct CompressedSpriteSheet sMenuLeftHeaderSpriteSheet = { - .data = gPokenavLeftHeaderHoennMap_Gfx, + .data = gPokenavLeftHeaderHoennMap_Gfx, // Hoenn map is the first of the headers listed .size = 0xC00, .tag = 2 }; -static const struct CompressedSpriteSheet sPokenavMenuLeftHeaderSpriteSheets[] = +static const struct CompressedSpriteSheet sMenuLeftHeaderSpriteSheets[] = { [POKENAV_GFX_MAIN_MENU] = { .data = gPokenavLeftHeaderMainMenu_Gfx, @@ -239,7 +239,7 @@ static const struct SpriteTemplate sSpinningPokenavSpriteTemplate = .callback = SpriteCB_SpinningPokenav }; -static const struct OamData sPokenavLeftHeaderHoennMapSpriteOam = +static const struct OamData sOamData_LeftHeader = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -253,7 +253,7 @@ static const struct OamData sPokenavLeftHeaderHoennMapSpriteOam = .paletteNum = 0, }; -static const struct OamData sUnknown_0861FB24 = +static const struct OamData sOamData_SubmenuLeftHeader = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -268,22 +268,22 @@ static const struct OamData sUnknown_0861FB24 = .paletteNum = 0, }; -static const struct SpriteTemplate sPokenavLeftHeaderHoennMapSpriteTemplate = +static const struct SpriteTemplate sLeftHeaderSpriteTemplate = { .tileTag = 2, .paletteTag = 1, - .oam = &sPokenavLeftHeaderHoennMapSpriteOam, + .oam = &sOamData_LeftHeader, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; -static const struct SpriteTemplate sUnknown_0861FB44 = +static const struct SpriteTemplate sSubmenuLeftHeaderSpriteTemplate = { .tileTag = 2, .paletteTag = 2, - .oam = &sUnknown_0861FB24, + .oam = &sOamData_SubmenuLeftHeader, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, @@ -292,22 +292,22 @@ static const struct SpriteTemplate sUnknown_0861FB44 = bool32 InitPokenavMainMenu(void) { - struct PokenavMainMenuResources *structPtr; + struct Pokenav_MainMenu *menu; - structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU, sizeof(struct PokenavMainMenuResources)); - if (structPtr == NULL) + menu = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU, sizeof(struct Pokenav_MainMenu)); + if (menu == NULL) return FALSE; ResetSpriteData(); FreeAllSpritePalettes(); - structPtr->currentTaskId = CreateLoopedTask(LoopedTask_InitPokenavMenu, 1); + menu->currentTaskId = CreateLoopedTask(LoopedTask_InitPokenavMenu, 1); return TRUE; } u32 PokenavMainMenuLoopedTaskIsActive(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - return IsLoopedTaskActive(structPtr->currentTaskId); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + return IsLoopedTaskActive(menu->currentTaskId); } void ShutdownPokenav(void) @@ -330,11 +330,11 @@ bool32 WaitForPokenavShutdownFade(void) return TRUE; } -static u32 LoopedTask_InitPokenavMenu(s32 a0) +static u32 LoopedTask_InitPokenavMenu(s32 state) { - struct PokenavMainMenuResources *structPtr; + struct Pokenav_MainMenu *menu; - switch (a0) + switch (state) { case 0: SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); @@ -345,9 +345,9 @@ static u32 LoopedTask_InitPokenavMenu(s32 a0) ResetTempTileDataBuffers(); return LT_INC_AND_CONTINUE; case 1: - structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); DecompressAndCopyTileDataToVram(0, &gPokenavHeader_Gfx, 0, 0, 0); - SetBgTilemapBuffer(0, structPtr->tilemapBuffer); + SetBgTilemapBuffer(0, menu->tilemapBuffer); CopyToBgTilemapBuffer(0, &gPokenavHeader_Tilemap, 0, 0); CopyPaletteIntoBufferUnfaded(gPokenavHeader_Pal, 0, 0x20); CopyBgTilemapBufferToVram(0); @@ -363,7 +363,7 @@ static u32 LoopedTask_InitPokenavMenu(s32 a0) return LT_PAUSE; InitPokenavMainMenuResources(); - InitHoennMapHeaderSprites(); + CreateLeftHeaderSprites(); ShowBg(0); return LT_FINISH; default: @@ -373,46 +373,46 @@ static u32 LoopedTask_InitPokenavMenu(s32 a0) void SetActiveMenuLoopTasks(void *createLoopTask, void *isLoopTaskActive) // Fix types later. { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - structPtr->loopTask = createLoopTask; - structPtr->isLoopTaskActiveFunc = isLoopTaskActive; - structPtr->unused = 0; + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + menu->loopTask = createLoopTask; + menu->isLoopTaskActiveFunc = isLoopTaskActive; + menu->unused = 0; } -void RunMainMenuLoopedTask(u32 a0) +void RunMainMenuLoopedTask(u32 state) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - structPtr->unused = 0; - structPtr->loopTask(a0); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + menu->unused = 0; + menu->loopTask(state); } u32 IsActiveMenuLoopTaskActive(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - return structPtr->isLoopTaskActiveFunc(); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + return menu->isLoopTaskActiveFunc(); } void SlideMenuHeaderUp(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - structPtr->currentTaskId = CreateLoopedTask(LoopedTask_SlideMenuHeaderUp, 4); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + menu->currentTaskId = CreateLoopedTask(LoopedTask_SlideMenuHeaderUp, 4); } void SlideMenuHeaderDown(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - structPtr->currentTaskId = CreateLoopedTask(LoopedTask_SlideMenuHeaderDown, 4); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + menu->currentTaskId = CreateLoopedTask(LoopedTask_SlideMenuHeaderDown, 4); } bool32 MainMenuLoopedTaskIsBusy(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - return IsLoopedTaskActive(structPtr->currentTaskId); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + return IsLoopedTaskActive(menu->currentTaskId); } -static u32 LoopedTask_SlideMenuHeaderUp(s32 a0) +static u32 LoopedTask_SlideMenuHeaderUp(s32 state) { - switch (a0) + switch (state) { default: return LT_FINISH; @@ -431,7 +431,7 @@ static u32 LoopedTask_SlideMenuHeaderUp(s32 a0) } } -static u32 LoopedTask_SlideMenuHeaderDown(s32 a0) +static u32 LoopedTask_SlideMenuHeaderDown(s32 state) { if (ChangeBgY(0, 384, BG_COORD_SUB) <= 0) { @@ -510,15 +510,15 @@ void PokenavCopyPalette(const u16 *src, const u16 *dest, int size, int a3, int a void PokenavFadeScreen(s32 fadeType) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); switch (fadeType) { case 0: - BeginNormalPaletteFade(structPtr->palettes, -2, 0, 16, RGB_BLACK); + BeginNormalPaletteFade(menu->palettes, -2, 0, 16, RGB_BLACK); break; case 1: - BeginNormalPaletteFade(structPtr->palettes, -2, 16, 0, RGB_BLACK); + BeginNormalPaletteFade(menu->palettes, -2, 16, 0, RGB_BLACK); break; case 2: BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, RGB_BLACK); @@ -534,9 +534,10 @@ bool32 IsPaletteFadeActive(void) return gPaletteFade.active; } -void sub_81C7B40(void) +// Excludes the first obj and bg palettes +void FadeToBlackExceptPrimary(void) { - BlendPalettes(PALETTES_ALL & ~(0x10000 | 0x1), 16, RGB_BLACK); + BlendPalettes(PALETTES_ALL & ~(1 << 16 | 1), 16, RGB_BLACK); } void InitBgTemplates(const struct BgTemplate *templates, int count) @@ -549,21 +550,21 @@ void InitBgTemplates(const struct BgTemplate *templates, int count) static void InitHelpBar(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); InitWindows(&sHelpBarWindowTemplate[0]); - structPtr->helpBarWindowId = 0; - DrawHelpBar(structPtr->helpBarWindowId); - PutWindowTilemap(structPtr->helpBarWindowId); - CopyWindowToVram(structPtr->helpBarWindowId, COPYWIN_FULL); + menu->helpBarWindowId = 0; + DrawHelpBar(menu->helpBarWindowId); + PutWindowTilemap(menu->helpBarWindowId); + CopyWindowToVram(menu->helpBarWindowId, COPYWIN_FULL); } void PrintHelpBarText(u32 textId) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - DrawHelpBar(structPtr->helpBarWindowId); - AddTextPrinterParameterized3(structPtr->helpBarWindowId, FONT_NORMAL, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[textId]); + DrawHelpBar(menu->helpBarWindowId); + AddTextPrinterParameterized3(menu->helpBarWindowId, FONT_NORMAL, 0, 1, sHelpBarTextColors, 0, sHelpBarTexts[textId]); } bool32 WaitForHelpBar(void) @@ -581,22 +582,22 @@ static void InitPokenavMainMenuResources(void) { s32 i; u8 spriteId; - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); for (i = 0; i < ARRAY_COUNT(gSpinningPokenavSpriteSheet); i++) LoadCompressedSpriteSheet(&gSpinningPokenavSpriteSheet[i]); Pokenav_AllocAndLoadPalettes(gSpinningNavgearPalettes); - structPtr->palettes = ~1 & ~(0x10000 << IndexOfSpritePaletteTag(0)); + menu->palettes = ~1 & ~(0x10000 << IndexOfSpritePaletteTag(0)); spriteId = CreateSprite(&sSpinningPokenavSpriteTemplate, 220, 12, 0); - structPtr->spinningPokenav = &gSprites[spriteId]; + menu->spinningPokenav = &gSprites[spriteId]; } static void CleanupPokenavMainMenuResources(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - DestroySprite(structPtr->spinningPokenav); + DestroySprite(menu->spinningPokenav); FreeSpriteTilesByTag(0); FreeSpritePaletteByTag(0); } @@ -609,45 +610,47 @@ static void SpriteCB_SpinningPokenav(struct Sprite *sprite) struct Sprite *PauseSpinningPokenavSprite(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - structPtr->spinningPokenav->callback = SpriteCallbackDummy; - return structPtr->spinningPokenav; + menu->spinningPokenav->callback = SpriteCallbackDummy; + return menu->spinningPokenav; } void ResumeSpinningPokenavSprite(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - structPtr->spinningPokenav->x = 220; - structPtr->spinningPokenav->y = 12; - structPtr->spinningPokenav->callback = SpriteCB_SpinningPokenav; - structPtr->spinningPokenav->invisible = FALSE; - structPtr->spinningPokenav->oam.priority = 0; - structPtr->spinningPokenav->subpriority = 0; + menu->spinningPokenav->x = 220; + menu->spinningPokenav->y = 12; + menu->spinningPokenav->callback = SpriteCB_SpinningPokenav; + menu->spinningPokenav->invisible = FALSE; + menu->spinningPokenav->oam.priority = 0; + menu->spinningPokenav->subpriority = 0; } -static void InitHoennMapHeaderSprites(void) +static void CreateLeftHeaderSprites(void) { s32 i, spriteId; - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - LoadCompressedSpriteSheet(&sPokenavHoennMapLeftHeaderSpriteSheet); + LoadCompressedSpriteSheet(&sMenuLeftHeaderSpriteSheet); AllocSpritePalette(1); AllocSpritePalette(2); - for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(menu->leftHeaderSprites); i++) { - spriteId = CreateSprite(&sPokenavLeftHeaderHoennMapSpriteTemplate, 0, 0, 1); - structPtr->leftHeaderSprites[i] = &gSprites[spriteId]; - structPtr->leftHeaderSprites[i]->invisible = TRUE; - structPtr->leftHeaderSprites[i]->x2 = i * 64; + // Create main left header + spriteId = CreateSprite(&sLeftHeaderSpriteTemplate, 0, 0, 1); + menu->leftHeaderSprites[i] = &gSprites[spriteId]; + menu->leftHeaderSprites[i]->invisible = TRUE; + menu->leftHeaderSprites[i]->x2 = i * 64; - spriteId = CreateSprite(&sUnknown_0861FB44, 0, 0, 2); - structPtr->submenuLeftHeaderSprites[i] = &gSprites[spriteId]; - structPtr->submenuLeftHeaderSprites[i]->invisible = TRUE; - structPtr->submenuLeftHeaderSprites[i]->x2 = i * 32; - structPtr->submenuLeftHeaderSprites[i]->y2 = 18; - structPtr->submenuLeftHeaderSprites[i]->oam.tileNum += (i * 8) + 64; + // Create submenu left header + spriteId = CreateSprite(&sSubmenuLeftHeaderSpriteTemplate, 0, 0, 2); + menu->submenuLeftHeaderSprites[i] = &gSprites[spriteId]; + menu->submenuLeftHeaderSprites[i]->invisible = TRUE; + menu->submenuLeftHeaderSprites[i]->x2 = i * 32; + menu->submenuLeftHeaderSprites[i]->y2 = 18; + menu->submenuLeftHeaderSprites[i]->oam.tileNum += (i * 8) + 64; } } @@ -661,34 +664,34 @@ void LoadLeftHeaderGfxForIndex(u32 menuGfxId) void UpdateRegionMapRightHeaderTiles(u32 menuGfxId) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); if (menuGfxId == POKENAV_GFX_MAP_MENU_ZOOMED_OUT) - structPtr->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + 32; + menu->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + 32; else - structPtr->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + 64; + menu->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + 64; } static void LoadLeftHeaderGfxForMenu(u32 menuGfxId) { - struct PokenavMainMenuResources *structPtr; + struct Pokenav_MainMenu *menu; u32 size, tag; if (menuGfxId >= POKENAV_GFX_SUBMENUS_START) return; - structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - tag = sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].tag; - size = GetDecompressedDataSize(sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].data); + menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + tag = sMenuLeftHeaderSpriteSheets[menuGfxId].tag; + size = GetDecompressedDataSize(sMenuLeftHeaderSpriteSheets[menuGfxId].data); LoadPalette(&gPokenavLeftHeader_Pal[tag * 16], (IndexOfSpritePaletteTag(1) * 16) + 0x100, 0x20); - LZ77UnCompWram(sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].data, gDecompressionBuffer); + LZ77UnCompWram(sMenuLeftHeaderSpriteSheets[menuGfxId].data, gDecompressionBuffer); RequestDma3Copy(gDecompressionBuffer, (void *)OBJ_VRAM0 + (GetSpriteTileStartByTag(2) * 32), size, 1); - structPtr->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + sPokenavMenuLeftHeaderSpriteSheets[menuGfxId].size; + menu->leftHeaderSprites[1]->oam.tileNum = GetSpriteTileStartByTag(2) + sMenuLeftHeaderSpriteSheets[menuGfxId].size; if (menuGfxId == POKENAV_GFX_MAP_MENU_ZOOMED_OUT || menuGfxId == POKENAV_GFX_MAP_MENU_ZOOMED_IN) - structPtr->leftHeaderSprites[1]->x2 = 56; + menu->leftHeaderSprites[1]->x2 = 56; else - structPtr->leftHeaderSprites[1]->x2 = 64; + menu->leftHeaderSprites[1]->x2 = 64; } static void LoadLeftHeaderGfxForSubMenu(u32 menuGfxId) @@ -731,20 +734,20 @@ void HideMainOrSubMenuLeftHeader(u32 id, bool32 onRightSide) void SetLeftHeaderSpritesInvisibility(void) { s32 i; - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(menu->leftHeaderSprites); i++) { - structPtr->leftHeaderSprites[i]->invisible = TRUE; - structPtr->submenuLeftHeaderSprites[i]->invisible = TRUE; + menu->leftHeaderSprites[i]->invisible = TRUE; + menu->submenuLeftHeaderSprites[i]->invisible = TRUE; } } bool32 AreLeftHeaderSpritesMoving(void) { - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); - if (structPtr->leftHeaderSprites[0]->callback == SpriteCallbackDummy && structPtr->submenuLeftHeaderSprites[0]->callback == SpriteCallbackDummy) + if (menu->leftHeaderSprites[0]->callback == SpriteCallbackDummy && menu->submenuLeftHeaderSprites[0]->callback == SpriteCallbackDummy) return FALSE; else return TRUE; @@ -753,66 +756,66 @@ bool32 AreLeftHeaderSpritesMoving(void) static void ShowLeftHeaderSprites(u32 startY, bool32 isOnRightSide) { s32 start, end, i; - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); if (!isOnRightSide) start = -96, end = 32; else start = 256, end = 160; - for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(menu->leftHeaderSprites); i++) { - structPtr->leftHeaderSprites[i]->y = startY; - MoveLeftHeader(structPtr->leftHeaderSprites[i], start, end, 12); + menu->leftHeaderSprites[i]->y = startY; + MoveLeftHeader(menu->leftHeaderSprites[i], start, end, 12); } } static void ShowLeftHeaderSubmenuSprites(u32 startY, bool32 isOnRightSide) { s32 start, end, i; - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); if (!isOnRightSide) start = -96, end = 16; else start = 256, end = 192; - for (i = 0; i < (s32)ARRAY_COUNT(structPtr->submenuLeftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(menu->submenuLeftHeaderSprites); i++) { - structPtr->submenuLeftHeaderSprites[i]->y = startY; - MoveLeftHeader(structPtr->submenuLeftHeaderSprites[i], start, end, 12); + menu->submenuLeftHeaderSprites[i]->y = startY; + MoveLeftHeader(menu->submenuLeftHeaderSprites[i], start, end, 12); } } static void HideLeftHeaderSprites(bool32 isOnRightSide) { s32 start, end, i; - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); if (!isOnRightSide) start = 32, end = -96; else start = 192, end = 256; - for (i = 0; i < (s32)ARRAY_COUNT(structPtr->leftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(menu->leftHeaderSprites); i++) { - MoveLeftHeader(structPtr->leftHeaderSprites[i], start, end, 12); + MoveLeftHeader(menu->leftHeaderSprites[i], start, end, 12); } } static void HideLeftHeaderSubmenuSprites(bool32 isOnRightSide) { s32 start, end, i; - struct PokenavMainMenuResources *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); if (!isOnRightSide) start = 16, end = -96; else start = 192, end = 256; - for (i = 0; i < (s32)ARRAY_COUNT(structPtr->submenuLeftHeaderSprites); i++) + for (i = 0; i < (s32)ARRAY_COUNT(menu->submenuLeftHeaderSprites); i++) { - MoveLeftHeader(structPtr->submenuLeftHeaderSprites[i], start, end, 12); + MoveLeftHeader(menu->submenuLeftHeaderSprites[i], start, end, 12); } } diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 8f22209579..29cb0a06d9 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -109,15 +109,15 @@ u32 ShowCheckPageDown(s32); u32 ExitCheckPage(s32); u32 ExitMatchCall(s32); -static const u16 sMatchCallUI_Pal[] = INCBIN_U16("graphics/pokenav/ui_matchcall.gbapal"); -static const u32 sMatchCallUI_Gfx[] = INCBIN_U32("graphics/pokenav/ui_matchcall.4bpp.lz"); -static const u32 sMatchCallUI_Tilemap[] = INCBIN_U32("graphics/pokenav/ui_matchcall.bin.lz"); -static const u16 gUnknown_08622698[] = INCBIN_U16("graphics/pokenav/arrow2.gbapal"); -static const u32 gUnknown_086226B8[] = INCBIN_U32("graphics/pokenav/arrow2.4bpp.lz"); -static const u16 gUnknown_086226E0[] = INCBIN_U16("graphics/pokenav/86226E0.gbapal"); -static const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/8622700.gbapal"); -static const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/pokeball_matchcall.gbapal"); -static const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/pokeball_matchcall.4bpp.lz"); +static const u16 sMatchCallUI_Pal[] = INCBIN_U16("graphics/pokenav/match_call/ui.gbapal"); +static const u32 sMatchCallUI_Gfx[] = INCBIN_U32("graphics/pokenav/match_call/ui.4bpp.lz"); +static const u32 sMatchCallUI_Tilemap[] = INCBIN_U32("graphics/pokenav/match_call/ui.bin.lz"); +static const u16 gUnknown_08622698[] = INCBIN_U16("graphics/pokenav/match_call/arrow.gbapal"); +static const u32 gUnknown_086226B8[] = INCBIN_U32("graphics/pokenav/match_call/arrow.4bpp.lz"); +static const u16 gUnknown_086226E0[] = INCBIN_U16("graphics/pokenav/match_call/86226E0.gbapal"); +static const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/match_call/8622700.gbapal"); +static const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/match_call/pokeball.gbapal"); +static const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/match_call/pokeball.4bpp.lz"); const struct BgTemplate sMatchCallBgTemplates[3] = { @@ -1062,7 +1062,7 @@ static void sub_81CC034(struct Pokenav4Struct *state) { state->msgBoxWindowId = AddWindow(&sCallMsgBoxWindowTemplate); LoadMatchCallWindowGfx(state->msgBoxWindowId, 1, 4); - sub_81C7B40(); + FadeToBlackExceptPrimary(); } static void DrawMsgBoxForMatchCallMsg(struct Pokenav4Struct *state) diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 47226ca729..ce3db25c59 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -94,8 +94,8 @@ u32 LoopedTask_sub_81C8870(s32 state); u32 LoopedTask_sub_81C8A28(s32 state); u32 LoopedTask_PrintCheckPageInfo(s32 state); -static const u16 sMatchcallArrowPaletteData[] = INCBIN_U16("graphics/pokenav/arrows_matchcall.gbapal"); -static const u32 sMatchcallArrowSpriteSheetData[] = INCBIN_U32("graphics/pokenav/arrows_matchcall.4bpp.lz"); +static const u16 sMatchcallArrowPaletteData[] = INCBIN_U16("graphics/pokenav/list_arrows.gbapal"); +static const u32 sMatchcallArrowSpriteSheetData[] = INCBIN_U32("graphics/pokenav/list_arrows.4bpp.lz"); EWRAM_DATA u32 gUnknown_0203CF44 = 0; diff --git a/src/pokenav_menu_handler_1.c b/src/pokenav_menu_handler_1.c index a500e7c18d..b72247742c 100644 --- a/src/pokenav_menu_handler_1.c +++ b/src/pokenav_menu_handler_1.c @@ -5,31 +5,31 @@ #include "sound.h" #include "constants/songs.h" -struct Pokenav1Struct +struct Pokenav_Menu { u16 menuType; s16 cursorPos; u16 currMenuItem; u16 helpBarIndex; u32 menuId; - u32 (*callback)(struct Pokenav1Struct*); + u32 (*callback)(struct Pokenav_Menu*); }; -static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state); -static void ReturnToConditionMenu(struct Pokenav1Struct *state); -static void ReturnToMainMenu(struct Pokenav1Struct *state); -static u32 GetMenuId(struct Pokenav1Struct *state); -static void SetMenuIdAndCB(struct Pokenav1Struct *state, u32 a1); -static u32 CB2_ReturnToConditionMenu(struct Pokenav1Struct *state); -static u32 CB2_ReturnToMainMenu(struct Pokenav1Struct *state); -static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state); -static u32 HandleConditionMenuInput(struct Pokenav1Struct *state); -static u32 HandleCantOpenRibbonsInput(struct Pokenav1Struct *state); -static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state); -static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state); -static u32 HandleMainMenuInput(struct Pokenav1Struct *state); -static u32 (*GetMainMenuInputHandler(void))(struct Pokenav1Struct*); -static void SetMenuInputHandler(struct Pokenav1Struct *state); +static bool32 UpdateMenuCursorPos(struct Pokenav_Menu *); +static void ReturnToConditionMenu(struct Pokenav_Menu *); +static void ReturnToMainMenu(struct Pokenav_Menu *); +static u32 GetMenuId(struct Pokenav_Menu *); +static void SetMenuIdAndCB(struct Pokenav_Menu *, u32); +static u32 CB2_ReturnToConditionMenu(struct Pokenav_Menu *); +static u32 CB2_ReturnToMainMenu(struct Pokenav_Menu *); +static u32 HandleConditionSearchMenuInput(struct Pokenav_Menu *); +static u32 HandleConditionMenuInput(struct Pokenav_Menu *); +static u32 HandleCantOpenRibbonsInput(struct Pokenav_Menu *); +static u32 HandleMainMenuInputEndTutorial(struct Pokenav_Menu *); +static u32 HandleMainMenuInputTutorial(struct Pokenav_Menu *); +static u32 HandleMainMenuInput(struct Pokenav_Menu *); +static u32 (*GetMainMenuInputHandler(void))(struct Pokenav_Menu*); +static void SetMenuInputHandler(struct Pokenav_Menu *); // Number of entries - 1 for that menu type static const u8 sLastCursorPositions[] = @@ -41,20 +41,20 @@ static const u8 sLastCursorPositions[] = [POKENAV_MENU_TYPE_CONDITION_SEARCH] = 5 }; -static const u8 sMenuItems[][6] = +static const u8 sMenuItems[][MAX_POKENAV_MENUITEMS] = { [POKENAV_MENU_TYPE_DEFAULT] = { POKENAV_MENUITEM_MAP, POKENAV_MENUITEM_CONDITION, - [2 ... 5] = POKENAV_MENUITEM_SWITCH_OFF + [2 ... MAX_POKENAV_MENUITEMS - 1] = POKENAV_MENUITEM_SWITCH_OFF }, [POKENAV_MENU_TYPE_UNLOCK_MC] = { POKENAV_MENUITEM_MAP, POKENAV_MENUITEM_CONDITION, POKENAV_MENUITEM_MATCH_CALL, - [3 ... 5] = POKENAV_MENUITEM_SWITCH_OFF + [3 ... MAX_POKENAV_MENUITEMS - 1] = POKENAV_MENUITEM_SWITCH_OFF }, [POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] = { @@ -62,14 +62,14 @@ static const u8 sMenuItems[][6] = POKENAV_MENUITEM_CONDITION, POKENAV_MENUITEM_MATCH_CALL, POKENAV_MENUITEM_RIBBONS, - [4 ... 5] = POKENAV_MENUITEM_SWITCH_OFF + [4 ... MAX_POKENAV_MENUITEMS - 1] = POKENAV_MENUITEM_SWITCH_OFF }, [POKENAV_MENU_TYPE_CONDITION] = { POKENAV_MENUITEM_CONDITION_PARTY, POKENAV_MENUITEM_CONDITION_SEARCH, POKENAV_MENUITEM_CONDITION_CANCEL, - [3 ... 5] = POKENAV_MENUITEM_SWITCH_OFF + [3 ... MAX_POKENAV_MENUITEMS - 1] = POKENAV_MENUITEM_SWITCH_OFF }, [POKENAV_MENU_TYPE_CONDITION_SEARCH] = { @@ -99,94 +99,94 @@ static u8 GetPokenavMainMenuType(void) bool32 PokenavCallback_Init_MainMenuCursorOnMap(void) { - struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct)); - if (!state) + struct Pokenav_Menu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav_Menu)); + if (!menu) return FALSE; - state->menuType = GetPokenavMainMenuType(); - state->cursorPos = POKENAV_MENUITEM_MAP; - state->currMenuItem = POKENAV_MENUITEM_MAP; - state->helpBarIndex = HELPBAR_NONE; - SetMenuInputHandler(state); + menu->menuType = GetPokenavMainMenuType(); + menu->cursorPos = POKENAV_MENUITEM_MAP; + menu->currMenuItem = POKENAV_MENUITEM_MAP; + menu->helpBarIndex = HELPBAR_NONE; + SetMenuInputHandler(menu); return TRUE; } bool32 PokenavCallback_Init_MainMenuCursorOnMatchCall(void) { - struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct)); - if (!state) + struct Pokenav_Menu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav_Menu)); + if (!menu) return FALSE; - state->menuType = GetPokenavMainMenuType(); - state->cursorPos = POKENAV_MENUITEM_MATCH_CALL; - state->currMenuItem = POKENAV_MENUITEM_MATCH_CALL; - state->helpBarIndex = HELPBAR_NONE; - SetMenuInputHandler(state); + menu->menuType = GetPokenavMainMenuType(); + menu->cursorPos = POKENAV_MENUITEM_MATCH_CALL; + menu->currMenuItem = POKENAV_MENUITEM_MATCH_CALL; + menu->helpBarIndex = HELPBAR_NONE; + SetMenuInputHandler(menu); return TRUE; } bool32 PokenavCallback_Init_MainMenuCursorOnRibbons(void) { - struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct)); - if (!state) + struct Pokenav_Menu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav_Menu)); + if (!menu) return FALSE; - state->menuType = GetPokenavMainMenuType(); - state->cursorPos = POKENAV_MENUITEM_RIBBONS; - state->currMenuItem = POKENAV_MENUITEM_RIBBONS; - SetMenuInputHandler(state); + menu->menuType = GetPokenavMainMenuType(); + menu->cursorPos = POKENAV_MENUITEM_RIBBONS; + menu->currMenuItem = POKENAV_MENUITEM_RIBBONS; + SetMenuInputHandler(menu); return TRUE; } bool32 PokenavCallback_Init_ConditionMenu(void) { - struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct)); - if (!state) + struct Pokenav_Menu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav_Menu)); + if (!menu) return FALSE; - state->menuType = POKENAV_MENU_TYPE_CONDITION; - state->cursorPos = 0; //party - state->currMenuItem = POKENAV_MENUITEM_CONDITION_PARTY; - state->helpBarIndex = HELPBAR_NONE; - SetMenuInputHandler(state); + menu->menuType = POKENAV_MENU_TYPE_CONDITION; + menu->cursorPos = 0; //party + menu->currMenuItem = POKENAV_MENUITEM_CONDITION_PARTY; + menu->helpBarIndex = HELPBAR_NONE; + SetMenuInputHandler(menu); return TRUE; } bool32 PokenavCallback_Init_ConditionSearchMenu(void) { - struct Pokenav1Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav1Struct)); - if (!state) + struct Pokenav_Menu *menu = AllocSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER, sizeof(struct Pokenav_Menu)); + if (!menu) return FALSE; - state->menuType = POKENAV_MENU_TYPE_CONDITION_SEARCH; - state->cursorPos = GetSelectedConditionSearch(); - state->currMenuItem = state->cursorPos + POKENAV_MENUITEM_CONDITION_SEARCH_COOL; - state->helpBarIndex = HELPBAR_NONE; - SetMenuInputHandler(state); + menu->menuType = POKENAV_MENU_TYPE_CONDITION_SEARCH; + menu->cursorPos = GetSelectedConditionSearch(); + menu->currMenuItem = menu->cursorPos + POKENAV_MENUITEM_CONDITION_SEARCH_COOL; + menu->helpBarIndex = HELPBAR_NONE; + SetMenuInputHandler(menu); return TRUE; } -static void SetMenuInputHandler(struct Pokenav1Struct *state) +static void SetMenuInputHandler(struct Pokenav_Menu *menu) { - switch (state->menuType) + switch (menu->menuType) { case POKENAV_MENU_TYPE_DEFAULT: SetPokenavMode(POKENAV_MODE_NORMAL); // fallthrough case POKENAV_MENU_TYPE_UNLOCK_MC: case POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS: - state->callback = GetMainMenuInputHandler(); + menu->callback = GetMainMenuInputHandler(); break; case POKENAV_MENU_TYPE_CONDITION: - state->callback = HandleConditionMenuInput; + menu->callback = HandleConditionMenuInput; break; case POKENAV_MENU_TYPE_CONDITION_SEARCH: - state->callback = HandleConditionSearchMenuInput; + menu->callback = HandleConditionSearchMenuInput; break; } } -static u32 (*GetMainMenuInputHandler(void))(struct Pokenav1Struct*) +static u32 (*GetMainMenuInputHandler(void))(struct Pokenav_Menu*) { switch (GetPokenavMode()) { @@ -202,8 +202,8 @@ static u32 (*GetMainMenuInputHandler(void))(struct Pokenav1Struct*) u32 GetMenuHandlerCallback(void) { - struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); - return state->callback(state); + struct Pokenav_Menu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); + return menu->callback(menu); } void FreeMenuHandlerSubstruct1(void) @@ -211,39 +211,39 @@ void FreeMenuHandlerSubstruct1(void) FreePokenavSubstruct(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); } -static u32 HandleMainMenuInput(struct Pokenav1Struct *state) +static u32 HandleMainMenuInput(struct Pokenav_Menu *menu) { - if (UpdateMenuCursorPos(state)) + if (UpdateMenuCursorPos(menu)) return POKENAV_MENU_FUNC_MOVE_CURSOR; if (JOY_NEW(A_BUTTON)) { - switch (sMenuItems[state->menuType][state->cursorPos]) + switch (sMenuItems[menu->menuType][menu->cursorPos]) { case POKENAV_MENUITEM_MAP: - state->helpBarIndex = gSaveBlock2Ptr->regionMapZoom ? HELPBAR_MAP_ZOOMED_IN : HELPBAR_MAP_ZOOMED_OUT; - SetMenuIdAndCB(state, POKENAV_REGION_MAP); + menu->helpBarIndex = gSaveBlock2Ptr->regionMapZoom ? HELPBAR_MAP_ZOOMED_IN : HELPBAR_MAP_ZOOMED_OUT; + SetMenuIdAndCB(menu, POKENAV_REGION_MAP); return POKENAV_MENU_FUNC_OPEN_FEATURE; case POKENAV_MENUITEM_CONDITION: - state->menuType = POKENAV_MENU_TYPE_CONDITION; - state->cursorPos = 0; - state->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION][0]; - state->callback = HandleConditionMenuInput; + menu->menuType = POKENAV_MENU_TYPE_CONDITION; + menu->cursorPos = 0; + menu->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION][0]; + menu->callback = HandleConditionMenuInput; return POKENAV_MENU_FUNC_OPEN_CONDITION; case POKENAV_MENUITEM_MATCH_CALL: - state->helpBarIndex = HELPBAR_MC_TRAINER_LIST; - SetMenuIdAndCB(state, POKENAV_MATCH_CALL); + menu->helpBarIndex = HELPBAR_MC_TRAINER_LIST; + SetMenuIdAndCB(menu, POKENAV_MATCH_CALL); return POKENAV_MENU_FUNC_OPEN_FEATURE; case POKENAV_MENUITEM_RIBBONS: if (CanViewRibbonsMenu()) { - state->helpBarIndex = HELPBAR_RIBBONS_MON_LIST; - SetMenuIdAndCB(state, POKENAV_RIBBONS_MON_LIST); + menu->helpBarIndex = HELPBAR_RIBBONS_MON_LIST; + SetMenuIdAndCB(menu, POKENAV_RIBBONS_MON_LIST); return POKENAV_MENU_FUNC_OPEN_FEATURE; } else { - state->callback = HandleCantOpenRibbonsInput; + menu->callback = HandleCantOpenRibbonsInput; return POKENAV_MENU_FUNC_NO_RIBBON_WINNERS; } case POKENAV_MENUITEM_SWITCH_OFF: @@ -258,17 +258,17 @@ static u32 HandleMainMenuInput(struct Pokenav1Struct *state) } // Force the player to select Match Call during the call Mr. Stone pokenav tutorial -static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state) +static u32 HandleMainMenuInputTutorial(struct Pokenav_Menu *menu) { - if (UpdateMenuCursorPos(state)) + if (UpdateMenuCursorPos(menu)) return POKENAV_MENU_FUNC_MOVE_CURSOR; if (JOY_NEW(A_BUTTON)) { - if (sMenuItems[state->menuType][state->cursorPos] == POKENAV_MENUITEM_MATCH_CALL) + if (sMenuItems[menu->menuType][menu->cursorPos] == POKENAV_MENUITEM_MATCH_CALL) { - state->helpBarIndex = HELPBAR_MC_TRAINER_LIST; - SetMenuIdAndCB(state, POKENAV_MATCH_CALL); + menu->helpBarIndex = HELPBAR_MC_TRAINER_LIST; + SetMenuIdAndCB(menu, POKENAV_MATCH_CALL); return POKENAV_MENU_FUNC_OPEN_FEATURE; } else @@ -288,14 +288,14 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state) } // After calling Mr. Stone during the pokenav tutorial, force player to exit or use Match Call again -static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state) +static u32 HandleMainMenuInputEndTutorial(struct Pokenav_Menu *menu) { - if (UpdateMenuCursorPos(state)) + if (UpdateMenuCursorPos(menu)) return POKENAV_MENU_FUNC_MOVE_CURSOR; if (JOY_NEW(A_BUTTON)) { - u32 menuItem = sMenuItems[state->menuType][state->cursorPos]; + u32 menuItem = sMenuItems[menu->menuType][menu->cursorPos]; if (menuItem != POKENAV_MENUITEM_MATCH_CALL && menuItem != POKENAV_MENUITEM_SWITCH_OFF) { PlaySE(SE_FAILURE); @@ -303,8 +303,8 @@ static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state) } else if (menuItem == POKENAV_MENUITEM_MATCH_CALL) { - state->helpBarIndex = HELPBAR_MC_TRAINER_LIST; - SetMenuIdAndCB(state, POKENAV_MATCH_CALL); + menu->helpBarIndex = HELPBAR_MC_TRAINER_LIST; + SetMenuIdAndCB(menu, POKENAV_MATCH_CALL); return POKENAV_MENU_FUNC_OPEN_FEATURE; } else @@ -321,60 +321,60 @@ static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state) // Handles input after selecting Ribbons when there are no ribbon winners left // Selecting it again just reprints the Ribbon description to replace the "No Ribbon winners" message -static u32 HandleCantOpenRibbonsInput(struct Pokenav1Struct *state) +static u32 HandleCantOpenRibbonsInput(struct Pokenav_Menu *menu) { - if (UpdateMenuCursorPos(state)) + if (UpdateMenuCursorPos(menu)) { - state->callback = GetMainMenuInputHandler(); + menu->callback = GetMainMenuInputHandler(); return POKENAV_MENU_FUNC_MOVE_CURSOR; } if (JOY_NEW(A_BUTTON | B_BUTTON)) { - state->callback = GetMainMenuInputHandler(); + menu->callback = GetMainMenuInputHandler(); return POKENAV_MENU_FUNC_RESHOW_DESCRIPTION; } return POKENAV_MENU_FUNC_NONE; } -static u32 HandleConditionMenuInput(struct Pokenav1Struct *state) +static u32 HandleConditionMenuInput(struct Pokenav_Menu *menu) { - if (UpdateMenuCursorPos(state)) + if (UpdateMenuCursorPos(menu)) return POKENAV_MENU_FUNC_MOVE_CURSOR; if (JOY_NEW(A_BUTTON)) { - switch (sMenuItems[state->menuType][state->cursorPos]) + switch (sMenuItems[menu->menuType][menu->cursorPos]) { case POKENAV_MENUITEM_CONDITION_SEARCH: - state->menuType = POKENAV_MENU_TYPE_CONDITION_SEARCH; - state->cursorPos = 0; - state->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION_SEARCH][0]; - state->callback = HandleConditionSearchMenuInput; + menu->menuType = POKENAV_MENU_TYPE_CONDITION_SEARCH; + menu->cursorPos = 0; + menu->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION_SEARCH][0]; + menu->callback = HandleConditionSearchMenuInput; return POKENAV_MENU_FUNC_OPEN_CONDITION_SEARCH; case POKENAV_MENUITEM_CONDITION_PARTY: - state->helpBarIndex = 0; - SetMenuIdAndCB(state, POKENAV_CONDITION_GRAPH_PARTY); + menu->helpBarIndex = 0; + SetMenuIdAndCB(menu, POKENAV_CONDITION_GRAPH_PARTY); return POKENAV_MENU_FUNC_OPEN_FEATURE; case POKENAV_MENUITEM_CONDITION_CANCEL: PlaySE(SE_SELECT); - ReturnToMainMenu(state); + ReturnToMainMenu(menu); return POKENAV_MENU_FUNC_RETURN_TO_MAIN; } } if (JOY_NEW(B_BUTTON)) { - if (state->cursorPos != sLastCursorPositions[state->menuType]) + if (menu->cursorPos != sLastCursorPositions[menu->menuType]) { - state->cursorPos = sLastCursorPositions[state->menuType]; - state->callback = CB2_ReturnToMainMenu; + menu->cursorPos = sLastCursorPositions[menu->menuType]; + menu->callback = CB2_ReturnToMainMenu; return POKENAV_MENU_FUNC_MOVE_CURSOR; } else { PlaySE(SE_SELECT); - ReturnToMainMenu(state); + ReturnToMainMenu(menu); return POKENAV_MENU_FUNC_RETURN_TO_MAIN; } } @@ -382,102 +382,102 @@ static u32 HandleConditionMenuInput(struct Pokenav1Struct *state) return POKENAV_MENU_FUNC_NONE; } -static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state) +static u32 HandleConditionSearchMenuInput(struct Pokenav_Menu *menu) { - if (UpdateMenuCursorPos(state)) + if (UpdateMenuCursorPos(menu)) return POKENAV_MENU_FUNC_MOVE_CURSOR; if (JOY_NEW(A_BUTTON)) { - u8 menuItem = sMenuItems[state->menuType][state->cursorPos]; + u8 menuItem = sMenuItems[menu->menuType][menu->cursorPos]; if (menuItem != POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL) { SetSelectedConditionSearch(menuItem - POKENAV_MENUITEM_CONDITION_SEARCH_COOL); - SetMenuIdAndCB(state, POKENAV_CONDITION_SEARCH_RESULTS); - state->helpBarIndex = HELPBAR_CONDITION_MON_LIST; + SetMenuIdAndCB(menu, POKENAV_CONDITION_SEARCH_RESULTS); + menu->helpBarIndex = HELPBAR_CONDITION_MON_LIST; return POKENAV_MENU_FUNC_OPEN_FEATURE; } else { PlaySE(SE_SELECT); - ReturnToConditionMenu(state); + ReturnToConditionMenu(menu); return POKENAV_MENU_FUNC_RETURN_TO_CONDITION; } } if (JOY_NEW(B_BUTTON)) { - if (state->cursorPos != sLastCursorPositions[state->menuType]) + if (menu->cursorPos != sLastCursorPositions[menu->menuType]) { - state->cursorPos = sLastCursorPositions[state->menuType]; - state->callback = CB2_ReturnToConditionMenu; + menu->cursorPos = sLastCursorPositions[menu->menuType]; + menu->callback = CB2_ReturnToConditionMenu; return POKENAV_MENU_FUNC_MOVE_CURSOR; } else { PlaySE(SE_SELECT); - ReturnToConditionMenu(state); + ReturnToConditionMenu(menu); return POKENAV_MENU_FUNC_RETURN_TO_CONDITION; } } return POKENAV_MENU_FUNC_NONE; } -static u32 CB2_ReturnToMainMenu(struct Pokenav1Struct *state) +static u32 CB2_ReturnToMainMenu(struct Pokenav_Menu *menu) { - ReturnToMainMenu(state); + ReturnToMainMenu(menu); return POKENAV_MENU_FUNC_RETURN_TO_MAIN; } -static u32 CB2_ReturnToConditionMenu(struct Pokenav1Struct *state) +static u32 CB2_ReturnToConditionMenu(struct Pokenav_Menu *menu) { - ReturnToConditionMenu(state); + ReturnToConditionMenu(menu); return POKENAV_MENU_FUNC_RETURN_TO_CONDITION; } -static void SetMenuIdAndCB(struct Pokenav1Struct *state, u32 menuId) +static void SetMenuIdAndCB(struct Pokenav_Menu *menu, u32 menuId) { - state->menuId = menuId; - state->callback = GetMenuId; + menu->menuId = menuId; + menu->callback = GetMenuId; } -static u32 GetMenuId(struct Pokenav1Struct *state) +static u32 GetMenuId(struct Pokenav_Menu *menu) { - return state->menuId; + return menu->menuId; } -static void ReturnToMainMenu(struct Pokenav1Struct *state) +static void ReturnToMainMenu(struct Pokenav_Menu *menu) { - state->menuType = GetPokenavMainMenuType(); - state->cursorPos = 1; - state->currMenuItem = sMenuItems[state->menuType][state->cursorPos]; - state->callback = HandleMainMenuInput; + menu->menuType = GetPokenavMainMenuType(); + menu->cursorPos = 1; + menu->currMenuItem = sMenuItems[menu->menuType][menu->cursorPos]; + menu->callback = HandleMainMenuInput; } -static void ReturnToConditionMenu(struct Pokenav1Struct *state) +static void ReturnToConditionMenu(struct Pokenav_Menu *menu) { - state->menuType = POKENAV_MENU_TYPE_CONDITION; - state->cursorPos = 1; - state->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION][1]; - state->callback = HandleConditionMenuInput; + menu->menuType = POKENAV_MENU_TYPE_CONDITION; + menu->cursorPos = 1; + menu->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION][1]; + menu->callback = HandleConditionMenuInput; } -static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state) +static bool32 UpdateMenuCursorPos(struct Pokenav_Menu *menu) { if (JOY_NEW(DPAD_UP)) { - if (--state->cursorPos < 0) - state->cursorPos = sLastCursorPositions[state->menuType]; + if (--menu->cursorPos < 0) + menu->cursorPos = sLastCursorPositions[menu->menuType]; - state->currMenuItem = sMenuItems[state->menuType][state->cursorPos]; + menu->currMenuItem = sMenuItems[menu->menuType][menu->cursorPos]; return TRUE; } else if (JOY_NEW(DPAD_DOWN)) { - state->cursorPos++; - if (state->cursorPos > sLastCursorPositions[state->menuType]) - state->cursorPos = 0; + menu->cursorPos++; + if (menu->cursorPos > sLastCursorPositions[menu->menuType]) + menu->cursorPos = 0; - state->currMenuItem = sMenuItems[state->menuType][state->cursorPos]; + menu->currMenuItem = sMenuItems[menu->menuType][menu->cursorPos]; return TRUE; } else @@ -488,26 +488,26 @@ static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state) int GetPokenavMenuType(void) { - struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); - return state->menuType; + struct Pokenav_Menu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); + return menu->menuType; } // Position of cursor relative to number of current menu options int GetPokenavCursorPos(void) { - struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); - return state->cursorPos; + struct Pokenav_Menu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); + return menu->cursorPos; } // ID of menu item the cursor is currently on int GetCurrentMenuItemId(void) { - struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); - return state->currMenuItem; + struct Pokenav_Menu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); + return menu->currMenuItem; } u16 GetHelpBarTextId(void) { - struct Pokenav1Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); - return state->helpBarIndex; + struct Pokenav_Menu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU_HANDLER); + return menu->helpBarIndex; } diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_2.c index a50f451066..1738142acf 100644 --- a/src/pokenav_menu_handler_2.c +++ b/src/pokenav_menu_handler_2.c @@ -17,68 +17,86 @@ #include "constants/songs.h" #include "constants/rgb.h" -struct Pokenav2Struct +#define GFXTAG_BLUE_LIGHT 1 +#define GFXTAG_OPTIONS 3 + +#define PALTAG_BLUE_LIGHT 3 +#define PALTAG_OPTIONS_DEFAULT 4 // Includes green for Smart/Region Map and yellow for Tough +#define PALTAG_OPTIONS_BLUE 5 +#define PALTAG_OPTIONS_PINK 6 +#define PALTAG_OPTIONS_BEIGE 7 +#define PALTAG_OPTIONS_RED 8 + +#define PALTAG_OPTIONS_START PALTAG_OPTIONS_DEFAULT + +#define NUM_OPTION_SUBSPRITES 4 + +#define OPTION_DEFAULT_X 140 +#define OPTION_SELECTED_X 130 +#define OPTION_EXIT_X (DISPLAY_WIDTH + 16) + +struct Pokenav_MenuGfx { bool32 (*isTaskActiveCB)(void); u32 loopedTaskId; u16 optionDescWindowId; u8 bg3ScrollTaskId; u8 cursorPos; - bool8 otherIconsInMotion; + u8 numIconsBlending; bool8 pokenavAlreadyOpen; bool32 iconVisible[MAX_POKENAV_MENUITEMS]; - struct Sprite * blueLightSpriteId; - struct Sprite * iconSprites[MAX_POKENAV_MENUITEMS][4]; - u16 bg1TilemapBuffer[0x400]; + struct Sprite * blueLightSprite; + struct Sprite * iconSprites[MAX_POKENAV_MENUITEMS][NUM_OPTION_SUBSPRITES]; + u8 bg1TilemapBuffer[BG_SCREEN_SIZE]; }; -static struct Pokenav2Struct * OpenPokenavMenu(void); +static struct Pokenav_MenuGfx * OpenPokenavMenu(void); static bool32 GetCurrentLoopedTaskActive(void); -static u32 LoopedTask_OpenMenu(s32 state); -static u32 LoopedTask_MoveMenuCursor(s32 state); -static u32 LoopedTask_OpenConditionMenu(s32 state); -static u32 LoopedTask_ReturnToMainMenu(s32 state); -static u32 LoopedTask_OpenConditionSearchMenu(s32 state); -static u32 LoopedTask_ReturnToConditionMenu(s32 state); -static u32 LoopedTask_SelectRibbonsNoWinners(s32 state); -static u32 LoopedTask_ReShowDescription(s32 state); -static u32 LoopedTask_OpenPokenavFeature(s32 state); +static u32 LoopedTask_OpenMenu(s32); +static u32 LoopedTask_MoveMenuCursor(s32); +static u32 LoopedTask_OpenConditionMenu(s32); +static u32 LoopedTask_ReturnToMainMenu(s32); +static u32 LoopedTask_OpenConditionSearchMenu(s32); +static u32 LoopedTask_ReturnToConditionMenu(s32); +static u32 LoopedTask_SelectRibbonsNoWinners(s32); +static u32 LoopedTask_ReShowDescription(s32); +static u32 LoopedTask_OpenPokenavFeature(s32); static void LoadPokenavOptionPalettes(void); static void FreeAndDestroyMainMenuSprites(void); static void CreateMenuOptionSprites(void); static void DestroyMenuOptionSprites(void); -static void sub_81CA0C8(void); -static void DrawOptionLabelGfx(const u16 *const * a0, s32 yPos, s32 a2); -static void SetupCurrentMenuOptionsGfx(void); -static void SetMenuOptionGfxParams_CursorMoved(void); -static void SetMenuOptionGfxParamsInactive(struct Sprite ** sprites, s32 x, s32 a2, s32 a3); -static void SetMenuOptionGfxParamsActive(struct Sprite ** sprites); -static void SetupPokenavMenuOptions(void); +static void DrawCurrentMenuOptionLabels(void); +static void DrawOptionLabelGfx(const u16 *const *, s32, s32); +static void StartOptionAnimations_Enter(void); +static void StartOptionAnimations_CursorMoved(void); +static void StartOptionAnimations_Exit(void); +static void StartOptionSlide(struct Sprite **, s32, s32, s32); +static void StartOptionZoom(struct Sprite **); static bool32 AreMenuOptionSpritesMoving(void); -static void SetMenuOptionGfxInvisibility(struct Sprite ** sprites, bool32 a1); -static void sub_81CA474(struct Sprite * sprite); -static void sub_81CA4AC(struct Sprite * sprite); -static void sub_81CA580(u8 taskId); +static void SetOptionInvisibility(struct Sprite **, bool32); +static void SpriteCB_OptionSlide(struct Sprite *); +static void SpriteCB_OptionZoom(struct Sprite *); +static void Task_OptionBlend(u8); static void CreateMatchCallBlueLightSprite(void); -static void SpriteCB_BlinkingBlueLight(struct Sprite * sprite); -static void DestroyRematchBlueLightSpriteId(void); +static void SpriteCB_BlinkingBlueLight(struct Sprite *); +static void DestroyRematchBlueLightSprite(void); static void AddOptionDescriptionWindow(void); static void PrintCurrentOptionDescription(void); static void PrintNoRibbonWinners(void); static bool32 IsDma3ManagerBusyWithBgCopy_(void); static void CreateMovingBgDotsTask(void); static void DestroyMovingDotsBgTask(void); -static void Task_MoveBgDots(u8 taskId); +static void Task_MoveBgDots(u8); static void CreateBgDotPurplePalTask(void); static void ChangeBgDotsColorToPurple(void); static void CreateBgDotLightBluePalTask(void); static bool32 IsTaskActive_UpdateBgDotsPalette(void); -static void Task_UpdateBgDotsPalette(u8 taskId); +static void Task_UpdateBgDotsPalette(u8); static void SetupPokenavMenuScanlineEffects(void); static void DestroyMenuOptionGlowTask(void); static void ResetBldCnt(void); static void InitMenuOptionGlow(void); -static void Task_CurrentMenuOptionGlow(u8 taskId); +static void Task_CurrentMenuOptionGlow(u8); static void SetMenuOptionGlow(void); static const u16 sPokenavBgDotsPal[] = INCBIN_U16("graphics/pokenav/bg_dots.gbapal"); @@ -136,78 +154,103 @@ static const struct CompressedSpriteSheet sPokenavOptionsSpriteSheets[] = { .data = gPokenavOptions_Gfx, .size = 0x3400, - .tag = 0x0003 + .tag = GFXTAG_OPTIONS }, { .data = sMatchCallBlueLightTiles, .size = 0x0100, - .tag = 0x0001 + .tag = GFXTAG_BLUE_LIGHT } }; static const struct SpritePalette sPokenavOptionsSpritePalettes[] = { - {gPokenavOptions_Pal + 0x00, 4}, - {gPokenavOptions_Pal + 0x10, 5}, - {gPokenavOptions_Pal + 0x20, 6}, - {gPokenavOptions_Pal + 0x30, 7}, - {gPokenavOptions_Pal + 0x40, 8}, - {sMatchCallBlueLightPal, 3}, + {&gPokenavOptions_Pal[0x00], PALTAG_OPTIONS_DEFAULT}, + {&gPokenavOptions_Pal[0x10], PALTAG_OPTIONS_BLUE}, + {&gPokenavOptions_Pal[0x20], PALTAG_OPTIONS_PINK}, + {&gPokenavOptions_Pal[0x30], PALTAG_OPTIONS_BEIGE}, + {&gPokenavOptions_Pal[0x40], PALTAG_OPTIONS_RED}, + {sMatchCallBlueLightPal, PALTAG_BLUE_LIGHT}, {} }; -static const u16 sOptionsLabelGfx_RegionMap[] = {0, 0}; -static const u16 sOptionsLabelGfx_Condition[] = {0x20, 1}; -static const u16 sOptionsLabelGfx_MatchCall[] = {0x40, 4}; -static const u16 sOptionsLabelGfx_Ribbons[] = {0x60, 2}; -static const u16 sOptionsLabelGfx_SwitchOff[] = {0x80, 3}; -static const u16 sOptionsLabelGfx_Party[] = {0xA0, 1}; -static const u16 sOptionsLabelGfx_Search[] = {0xC0, 1}; -static const u16 sOptionsLabelGfx_Cool[] = {0xE0, 4}; -static const u16 sOptionsLabelGfx_Beauty[] = {0x100, 1}; -static const u16 sOptionsLabelGfx_Cute[] = {0x120, 2}; -static const u16 sOptionsLabelGfx_Smart[] = {0x140, 0}; -static const u16 sOptionsLabelGfx_Tough[] = {0x160, 0}; -static const u16 sOptionsLabelGfx_Cancel[] = {0x180, 3}; +// Tile number, palette tag offset +static const u16 sOptionsLabelGfx_RegionMap[] = {0x000, PALTAG_OPTIONS_DEFAULT - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Condition[] = {0x020, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_MatchCall[] = {0x040, PALTAG_OPTIONS_RED - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Ribbons[] = {0x060, PALTAG_OPTIONS_PINK - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_SwitchOff[] = {0x080, PALTAG_OPTIONS_BEIGE - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Party[] = {0x0A0, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Search[] = {0x0C0, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Cool[] = {0x0E0, PALTAG_OPTIONS_RED - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Beauty[] = {0x100, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Cute[] = {0x120, PALTAG_OPTIONS_PINK - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Smart[] = {0x140, PALTAG_OPTIONS_DEFAULT - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Tough[] = {0x160, PALTAG_OPTIONS_DEFAULT - PALTAG_OPTIONS_START}; +static const u16 sOptionsLabelGfx_Cancel[] = {0x180, PALTAG_OPTIONS_BEIGE - PALTAG_OPTIONS_START}; -struct OptionsLabelGfx +struct { u16 yStart; u16 deltaY; - const u16 *tiles[MAX_POKENAV_MENUITEMS]; -}; - -static const struct OptionsLabelGfx sPokenavMenuOptionLabelGfx[POKENAV_MENU_TYPE_COUNT] = + const u16 *gfx[MAX_POKENAV_MENUITEMS]; +} static const sPokenavMenuOptionLabelGfx[POKENAV_MENU_TYPE_COUNT] = { [POKENAV_MENU_TYPE_DEFAULT] = { .yStart = 42, .deltaY = 20, - {sOptionsLabelGfx_RegionMap, sOptionsLabelGfx_Condition, sOptionsLabelGfx_SwitchOff} + .gfx = { + sOptionsLabelGfx_RegionMap, + sOptionsLabelGfx_Condition, + sOptionsLabelGfx_SwitchOff + } }, [POKENAV_MENU_TYPE_UNLOCK_MC] = { .yStart = 42, .deltaY = 20, - {sOptionsLabelGfx_RegionMap, sOptionsLabelGfx_Condition, sOptionsLabelGfx_MatchCall, sOptionsLabelGfx_SwitchOff} + .gfx = { + sOptionsLabelGfx_RegionMap, + sOptionsLabelGfx_Condition, + sOptionsLabelGfx_MatchCall, + sOptionsLabelGfx_SwitchOff + } }, [POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] = { .yStart = 42, .deltaY = 20, - {sOptionsLabelGfx_RegionMap, sOptionsLabelGfx_Condition, sOptionsLabelGfx_MatchCall, sOptionsLabelGfx_Ribbons, sOptionsLabelGfx_SwitchOff} + .gfx = { + sOptionsLabelGfx_RegionMap, + sOptionsLabelGfx_Condition, + sOptionsLabelGfx_MatchCall, + sOptionsLabelGfx_Ribbons, + sOptionsLabelGfx_SwitchOff + } }, [POKENAV_MENU_TYPE_CONDITION] = { .yStart = 56, .deltaY = 20, - {sOptionsLabelGfx_Party, sOptionsLabelGfx_Search, sOptionsLabelGfx_Cancel} + .gfx = { + sOptionsLabelGfx_Party, + sOptionsLabelGfx_Search, + sOptionsLabelGfx_Cancel + } }, [POKENAV_MENU_TYPE_CONDITION_SEARCH] = { .yStart = 40, .deltaY = 16, - {sOptionsLabelGfx_Cool, sOptionsLabelGfx_Beauty, sOptionsLabelGfx_Cute, sOptionsLabelGfx_Smart, sOptionsLabelGfx_Tough, sOptionsLabelGfx_Cancel} + .gfx = { + sOptionsLabelGfx_Cool, + sOptionsLabelGfx_Beauty, + sOptionsLabelGfx_Cute, + sOptionsLabelGfx_Smart, + sOptionsLabelGfx_Tough, + sOptionsLabelGfx_Cancel + } }, }; @@ -216,8 +259,8 @@ static const struct WindowTemplate sOptionDescWindowTemplate = .bg = 1, .tilemapLeft = 3, .tilemapTop = 17, - .width = 0x18, - .height = 0x2, + .width = 24, + .height = 2, .paletteNum = 1, .baseBlock = 8 }; @@ -257,33 +300,33 @@ static const struct OamData sOamData_MenuOption = .paletteNum = 0, }; -static const union AffineAnimCmd gUnknown_0862031C[] = +static const union AffineAnimCmd sAffineAnim_MenuOption_Normal[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_0862032C[] = +static const union AffineAnimCmd sAffineAnim_MenuOption_Zoom[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0x12), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd *const sSpriteAnims_MenuOption[] = +static const union AffineAnimCmd *const sAffineAnims_MenuOption[] = { - gUnknown_0862031C, - gUnknown_0862032C + sAffineAnim_MenuOption_Normal, + sAffineAnim_MenuOption_Zoom }; static const struct SpriteTemplate sMenuOptionSpriteTemplate = { - .tileTag = 3, - .paletteTag = 4, + .tileTag = GFXTAG_OPTIONS, + .paletteTag = PALTAG_OPTIONS_START, .oam = &sOamData_MenuOption, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = sSpriteAnims_MenuOption, + .affineAnims = sAffineAnims_MenuOption, .callback = SpriteCallbackDummy, }; @@ -303,8 +346,8 @@ static const struct OamData sBlueLightOamData = static const struct SpriteTemplate sMatchCallBlueLightSpriteTemplate = { - .tileTag = 1, - .paletteTag = 3, + .tileTag = GFXTAG_BLUE_LIGHT, + .paletteTag = PALTAG_BLUE_LIGHT, .oam = &sBlueLightOamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -320,7 +363,7 @@ static const struct ScanlineEffectParams sPokenavMainMenuScanlineEffectParams = 0 }; -static bool32 PlayerHasTrainerRematches(void) +static bool32 AreAnyTrainerRematchesNearby(void) { s32 i; @@ -337,81 +380,81 @@ static bool32 PlayerHasTrainerRematches(void) bool32 OpenPokenavMenuInitial(void) { - struct Pokenav2Struct * state = OpenPokenavMenu(); + struct Pokenav_MenuGfx * gfx = OpenPokenavMenu(); - if (state == NULL) + if (gfx == NULL) return FALSE; - state->pokenavAlreadyOpen = FALSE; + gfx->pokenavAlreadyOpen = FALSE; return TRUE; } bool32 OpenPokenavMenuNotInitial(void) { - struct Pokenav2Struct * state = OpenPokenavMenu(); + struct Pokenav_MenuGfx * gfx = OpenPokenavMenu(); - if (state == NULL) + if (gfx == NULL) return FALSE; - state->pokenavAlreadyOpen = TRUE; + gfx->pokenavAlreadyOpen = TRUE; return TRUE; } -static struct Pokenav2Struct * OpenPokenavMenu(void) +static struct Pokenav_MenuGfx * OpenPokenavMenu(void) { - struct Pokenav2Struct * state = AllocSubstruct(POKENAV_SUBSTRUCT_MENU_ICONS, sizeof(struct Pokenav2Struct)); + struct Pokenav_MenuGfx * gfx = AllocSubstruct(POKENAV_SUBSTRUCT_MENU_GFX, sizeof(struct Pokenav_MenuGfx)); - if (state != NULL) + if (gfx != NULL) { - state->otherIconsInMotion = FALSE; - state->loopedTaskId = CreateLoopedTask(LoopedTask_OpenMenu, 1); - state->isTaskActiveCB = GetCurrentLoopedTaskActive; + gfx->numIconsBlending = 0; + gfx->loopedTaskId = CreateLoopedTask(LoopedTask_OpenMenu, 1); + gfx->isTaskActiveCB = GetCurrentLoopedTaskActive; } - return state; + return gfx; } void CreateMenuHandlerLoopedTask(s32 ltIdx) { - struct Pokenav2Struct * state = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); - state->loopedTaskId = CreateLoopedTask(sMenuHandlerLoopTaskFuncs[ltIdx], 1); - state->isTaskActiveCB = GetCurrentLoopedTaskActive; + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); + gfx->loopedTaskId = CreateLoopedTask(sMenuHandlerLoopTaskFuncs[ltIdx], 1); + gfx->isTaskActiveCB = GetCurrentLoopedTaskActive; } bool32 IsMenuHandlerLoopedTaskActive(void) { - struct Pokenav2Struct * state = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); - return state->isTaskActiveCB(); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); + return gfx->isTaskActiveCB(); } void FreeMenuHandlerSubstruct2(void) { - struct Pokenav2Struct * unk = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); DestroyMovingDotsBgTask(); - RemoveWindow(unk->optionDescWindowId); + RemoveWindow(gfx->optionDescWindowId); FreeAndDestroyMainMenuSprites(); DestroyMenuOptionGlowTask(); - FreePokenavSubstruct(POKENAV_SUBSTRUCT_MENU_ICONS); + FreePokenavSubstruct(POKENAV_SUBSTRUCT_MENU_GFX); } static bool32 GetCurrentLoopedTaskActive(void) { - struct Pokenav2Struct * unk = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); - return IsLoopedTaskActive(unk->loopedTaskId); + return IsLoopedTaskActive(gfx->loopedTaskId); } static u32 LoopedTask_OpenMenu(s32 state) { - struct Pokenav2Struct * unk = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); switch (state) { case 0: InitBgTemplates(sPokenavMainMenuBgTemplates, ARRAY_COUNT(sPokenavMainMenuBgTemplates)); DecompressAndCopyTileDataToVram(1, gPokenavMessageBox_Gfx, 0, 0, 0); - SetBgTilemapBuffer(1, unk->bg1TilemapBuffer); + SetBgTilemapBuffer(1, gfx->bg1TilemapBuffer); CopyToBgTilemapBuffer(1, gPokenavMessageBox_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); CopyPaletteIntoBufferUnfaded(gPokenavMessageBox_Pal, 0x10, 0x20); @@ -451,7 +494,7 @@ static u32 LoopedTask_OpenMenu(s32 state) PrintCurrentOptionDescription(); CreateMenuOptionSprites(); CreateMatchCallBlueLightSprite(); - sub_81CA0C8(); + DrawCurrentMenuOptionLabels(); return LT_INC_AND_PAUSE; case 6: if (IsDma3ManagerBusyWithBgCopy_()) @@ -461,7 +504,7 @@ static u32 LoopedTask_OpenMenu(s32 state) ShowBg(1); ShowBg(2); ShowBg(3); - if (unk->pokenavAlreadyOpen) + if (gfx->pokenavAlreadyOpen) PokenavFadeScreen(1); else { @@ -496,7 +539,7 @@ static u32 LoopedTask_OpenMenu(s32 state) ShowLeftHeaderGfx(0, FALSE, FALSE); break; } - SetupCurrentMenuOptionsGfx(); + StartOptionAnimations_Enter(); SetupPokenavMenuScanlineEffects(); return LT_INC_AND_CONTINUE; case 9: @@ -515,7 +558,7 @@ static u32 LoopedTask_MoveMenuCursor(s32 state) { case 0: SetMenuOptionGlow(); - SetMenuOptionGfxParams_CursorMoved(); + StartOptionAnimations_CursorMoved(); PrintCurrentOptionDescription(); PlaySE(SE_SELECT); return LT_INC_AND_PAUSE; @@ -535,7 +578,7 @@ static u32 LoopedTask_OpenConditionMenu(s32 state) { case 0: ResetBldCnt(); - SetupPokenavMenuOptions(); + StartOptionAnimations_Exit(); HideMainOrSubMenuLeftHeader(POKENAV_GFX_MAIN_MENU, 0); PlaySE(SE_SELECT); return LT_INC_AND_PAUSE; @@ -544,11 +587,11 @@ static u32 LoopedTask_OpenConditionMenu(s32 state) return LT_PAUSE; if (AreLeftHeaderSpritesMoving()) return LT_PAUSE; - sub_81CA0C8(); + DrawCurrentMenuOptionLabels(); LoadLeftHeaderGfxForIndex(1); return LT_INC_AND_PAUSE; case 2: - SetupCurrentMenuOptionsGfx(); + StartOptionAnimations_Enter(); ShowLeftHeaderGfx(1, FALSE, FALSE); CreateBgDotPurplePalTask(); PrintCurrentOptionDescription(); @@ -574,7 +617,7 @@ static u32 LoopedTask_ReturnToMainMenu(s32 state) { case 0: ResetBldCnt(); - SetupPokenavMenuOptions(); + StartOptionAnimations_Exit(); HideMainOrSubMenuLeftHeader(POKENAV_GFX_CONDITION_MENU, 0); return LT_INC_AND_PAUSE; case 1: @@ -582,11 +625,11 @@ static u32 LoopedTask_ReturnToMainMenu(s32 state) return LT_PAUSE; if (AreLeftHeaderSpritesMoving()) return LT_PAUSE; - sub_81CA0C8(); + DrawCurrentMenuOptionLabels(); LoadLeftHeaderGfxForIndex(0); return LT_INC_AND_PAUSE; case 2: - SetupCurrentMenuOptionsGfx(); + StartOptionAnimations_Enter(); ShowLeftHeaderGfx(0, FALSE, FALSE); CreateBgDotLightBluePalTask(); PrintCurrentOptionDescription(); @@ -612,17 +655,17 @@ static u32 LoopedTask_OpenConditionSearchMenu(s32 state) { case 0: ResetBldCnt(); - SetupPokenavMenuOptions(); + StartOptionAnimations_Exit(); PlaySE(SE_SELECT); return LT_INC_AND_PAUSE; case 1: if (AreMenuOptionSpritesMoving()) return LT_PAUSE; LoadLeftHeaderGfxForIndex(7); - sub_81CA0C8(); + DrawCurrentMenuOptionLabels(); return LT_INC_AND_PAUSE; case 2: - SetupCurrentMenuOptionsGfx(); + StartOptionAnimations_Enter(); ShowLeftHeaderGfx(7, FALSE, FALSE); PrintCurrentOptionDescription(); return LT_INC_AND_PAUSE; @@ -645,7 +688,7 @@ static u32 LoopedTask_ReturnToConditionMenu(s32 state) { case 0: ResetBldCnt(); - SetupPokenavMenuOptions(); + StartOptionAnimations_Exit(); HideMainOrSubMenuLeftHeader(POKENAV_GFX_SEARCH_MENU, 0); return LT_INC_AND_PAUSE; case 1: @@ -653,10 +696,10 @@ static u32 LoopedTask_ReturnToConditionMenu(s32 state) return LT_PAUSE; if (AreLeftHeaderSpritesMoving()) return LT_PAUSE; - sub_81CA0C8(); + DrawCurrentMenuOptionLabels(); return LT_INC_AND_PAUSE; case 2: - SetupCurrentMenuOptionsGfx(); + StartOptionAnimations_Enter(); PrintCurrentOptionDescription(); return LT_INC_AND_PAUSE; case 3: @@ -716,7 +759,7 @@ static u32 LoopedTask_OpenPokenavFeature(s32 state) return LT_PAUSE; SlideMenuHeaderUp(); ResetBldCnt(); - SetupPokenavMenuOptions(); + StartOptionAnimations_Exit(); switch (GetPokenavMenuType()) { case POKENAV_MENU_TYPE_CONDITION_SEARCH: @@ -757,30 +800,29 @@ static void LoadPokenavOptionPalettes(void) static void FreeAndDestroyMainMenuSprites(void) { - FreeSpriteTilesByTag(3); - FreeSpriteTilesByTag(1); - FreeSpritePaletteByTag(4); - FreeSpritePaletteByTag(5); - FreeSpritePaletteByTag(6); - FreeSpritePaletteByTag(7); - FreeSpritePaletteByTag(8); - FreeSpritePaletteByTag(3); + FreeSpriteTilesByTag(GFXTAG_OPTIONS); + FreeSpriteTilesByTag(GFXTAG_BLUE_LIGHT); + FreeSpritePaletteByTag(PALTAG_OPTIONS_DEFAULT); + FreeSpritePaletteByTag(PALTAG_OPTIONS_BLUE); + FreeSpritePaletteByTag(PALTAG_OPTIONS_PINK); + FreeSpritePaletteByTag(PALTAG_OPTIONS_BEIGE); + FreeSpritePaletteByTag(PALTAG_OPTIONS_RED); + FreeSpritePaletteByTag(PALTAG_BLUE_LIGHT); DestroyMenuOptionSprites(); - DestroyRematchBlueLightSpriteId(); + DestroyRematchBlueLightSprite(); } static void CreateMenuOptionSprites(void) { s32 i, j; - struct Pokenav2Struct * unk = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); for (i = 0; i < MAX_POKENAV_MENUITEMS; i++) { - // Each menu option is 4 subsprites - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_OPTION_SUBSPRITES; j++) { u8 spriteId = CreateSprite(&sMenuOptionSpriteTemplate, 0x8c, 20 * i + 40, 3); - unk->iconSprites[i][j] = &gSprites[spriteId]; + gfx->iconSprites[i][j] = &gSprites[spriteId]; gSprites[spriteId].x2 = 32 * j; } } @@ -789,97 +831,102 @@ static void CreateMenuOptionSprites(void) static void DestroyMenuOptionSprites(void) { s32 i, j; - struct Pokenav2Struct * unk = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); for (i = 0; i < MAX_POKENAV_MENUITEMS; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_OPTION_SUBSPRITES; j++) { - FreeSpriteOamMatrix(unk->iconSprites[i][j]); - DestroySprite(unk->iconSprites[i][j]); + FreeSpriteOamMatrix(gfx->iconSprites[i][j]); + DestroySprite(gfx->iconSprites[i][j]); } } } -static void sub_81CA0C8(void) +static void DrawCurrentMenuOptionLabels(void) { s32 menuType = GetPokenavMenuType(); - DrawOptionLabelGfx(sPokenavMenuOptionLabelGfx[menuType].tiles, sPokenavMenuOptionLabelGfx[menuType].yStart, sPokenavMenuOptionLabelGfx[menuType].deltaY); + DrawOptionLabelGfx(sPokenavMenuOptionLabelGfx[menuType].gfx, sPokenavMenuOptionLabelGfx[menuType].yStart, sPokenavMenuOptionLabelGfx[menuType].deltaY); } -static void DrawOptionLabelGfx(const u16 *const *tiles, s32 yPos, s32 deltaY) +static void DrawOptionLabelGfx(const u16 *const *optionGfx, s32 yPos, s32 deltaY) { s32 i, j; - struct Pokenav2Struct * unk = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); - s32 sp04 = GetSpriteTileStartByTag(3); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); + s32 baseTile = GetSpriteTileStartByTag(GFXTAG_OPTIONS); for (i = 0; i < MAX_POKENAV_MENUITEMS; i++) { - if (*tiles != NULL) + if (*optionGfx != NULL) { - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_OPTION_SUBSPRITES; j++) { - unk->iconSprites[i][j]->oam.tileNum = (*tiles)[0] + sp04 + 8 * j; - unk->iconSprites[i][j]->oam.paletteNum = IndexOfSpritePaletteTag((*tiles)[1] + 4); - unk->iconSprites[i][j]->invisible = TRUE; - unk->iconSprites[i][j]->y = yPos; - unk->iconSprites[i][j]->x = 0x8c; - unk->iconSprites[i][j]->x2 = 32 * j; + gfx->iconSprites[i][j]->oam.tileNum = (*optionGfx)[0] + baseTile + 8 * j; + gfx->iconSprites[i][j]->oam.paletteNum = IndexOfSpritePaletteTag((*optionGfx)[1] + PALTAG_OPTIONS_START); + gfx->iconSprites[i][j]->invisible = TRUE; + gfx->iconSprites[i][j]->y = yPos; + gfx->iconSprites[i][j]->x = OPTION_DEFAULT_X; + gfx->iconSprites[i][j]->x2 = 32 * j; } - unk->iconVisible[i] = TRUE; + gfx->iconVisible[i] = TRUE; } else { - for (j = 0; j < 4; j++) - { - unk->iconSprites[i][j]->invisible = TRUE; - } - unk->iconVisible[i] = FALSE; + for (j = 0; j < NUM_OPTION_SUBSPRITES; j++) + gfx->iconSprites[i][j]->invisible = TRUE; + + gfx->iconVisible[i] = FALSE; } - tiles++; + optionGfx++; yPos += deltaY; } } -static void SetupCurrentMenuOptionsGfx(void) +static void StartOptionAnimations_Enter(void) { s32 i; - struct Pokenav2Struct *icons = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); - s32 r8 = GetPokenavCursorPos(); - s32 r7 = 0; - s32 r2; + struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); + s32 cursorPos = GetPokenavCursorPos(); + s32 iconCount = 0; + s32 x; for (i = 0; i < MAX_POKENAV_MENUITEMS; i++) { - if (icons->iconVisible[i]) + if (gfx->iconVisible[i]) { - if (r7++ == r8) + if (iconCount++ == cursorPos) { - r2 = 0x82; - icons->cursorPos = i; + x = OPTION_SELECTED_X; + gfx->cursorPos = i; } else - r2 = 0x8c; - SetMenuOptionGfxParamsInactive(icons->iconSprites[i], 0x100, r2, 0xC); - SetMenuOptionGfxInvisibility(icons->iconSprites[i], FALSE); + { + // Not selected, set default position + x = OPTION_DEFAULT_X; + } + + // Slide new options in + StartOptionSlide(gfx->iconSprites[i], OPTION_EXIT_X, x, 12); + SetOptionInvisibility(gfx->iconSprites[i], FALSE); } else { - SetMenuOptionGfxInvisibility(icons->iconSprites[i], TRUE); + SetOptionInvisibility(gfx->iconSprites[i], TRUE); } } } -static void SetMenuOptionGfxParams_CursorMoved(void) +static void StartOptionAnimations_CursorMoved(void) { s32 i; - struct Pokenav2Struct *icons = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); s32 prevPos = GetPokenavCursorPos(); s32 newPos; + // Get the index of the next visible option for (i = 0, newPos = 0; i < MAX_POKENAV_MENUITEMS; i++) { - if (icons->iconVisible[i]) + if (gfx->iconVisible[i]) { if (newPos == prevPos) { @@ -890,24 +937,28 @@ static void SetMenuOptionGfxParams_CursorMoved(void) } } - SetMenuOptionGfxParamsInactive(icons->iconSprites[icons->cursorPos], 0x82, 0x8c, 0x4); - SetMenuOptionGfxParamsInactive(icons->iconSprites[newPos], 0x8c, 0x82, 0x4); - icons->cursorPos = newPos; + // The selected option slides out a bit and the previously + // selected option slides back to its original position. + StartOptionSlide(gfx->iconSprites[gfx->cursorPos], OPTION_SELECTED_X, OPTION_DEFAULT_X, 4); + StartOptionSlide(gfx->iconSprites[newPos], OPTION_DEFAULT_X, OPTION_SELECTED_X, 4); + gfx->cursorPos = newPos; } -static void SetupPokenavMenuOptions(void) +static void StartOptionAnimations_Exit(void) { s32 i; - struct Pokenav2Struct *optionIcons = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); for (i = 0; i < MAX_POKENAV_MENUITEMS; i++) { - if (optionIcons->iconVisible[i]) + if (gfx->iconVisible[i]) { - if (optionIcons->cursorPos != i) - SetMenuOptionGfxParamsInactive(optionIcons->iconSprites[i], 0x8C, 0x100, 0x8); + // Unselected options slide out, + // selected option zooms in + if (gfx->cursorPos != i) + StartOptionSlide(gfx->iconSprites[i], OPTION_DEFAULT_X, OPTION_EXIT_X, 8); else - SetMenuOptionGfxParamsActive(optionIcons->iconSprites[i]); + StartOptionZoom(gfx->iconSprites[i]); } } } @@ -915,120 +966,145 @@ static void SetupPokenavMenuOptions(void) static bool32 AreMenuOptionSpritesMoving(void) { s32 i; - struct Pokenav2Struct *icons = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); for (i = 0; i < MAX_POKENAV_MENUITEMS; i++) { - if (icons->iconSprites[i][0]->callback != SpriteCallbackDummy) + if (gfx->iconSprites[i][0]->callback != SpriteCallbackDummy) return TRUE; } - if (icons->otherIconsInMotion) + if (gfx->numIconsBlending != 0) return TRUE; return FALSE; } -static void SetMenuOptionGfxParamsInactive(struct Sprite ** sprites, s32 x, s32 a2, s32 a3) +#define sSlideTime data[0] +#define sSlideAccel data[1] +#define sSlideSpeed data[2] +#define sSlideEndX data[7] + +static void StartOptionSlide(struct Sprite ** sprites, s32 startX, s32 endX, s32 time) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_OPTION_SUBSPRITES; i++) { - (*sprites)->x = x; - (*sprites)->data[0] = a3; - (*sprites)->data[1] = 16 * (a2 - x) / a3; - (*sprites)->data[2] = 16 * x; - (*sprites)->data[7] = a2; - (*sprites)->callback = sub_81CA474; + (*sprites)->x = startX; + (*sprites)->sSlideTime = time; + (*sprites)->sSlideAccel = 16 * (endX - startX) / time; + (*sprites)->sSlideSpeed = 16 * startX; + (*sprites)->sSlideEndX = endX; + (*sprites)->callback = SpriteCB_OptionSlide; sprites++; } } -static void SetMenuOptionGfxParamsActive(struct Sprite ** sprites) +#define sZoomDelay data[0] +#define sZoomSetAffine data[1] +#define sZoomSpeed data[2] +#define sZoomSubspriteId data[7] + +#define tBlendDelay data[0] +#define tBlendState data[1] +#define tBlendTarget1 data[2] +#define tBlendTarget2 data[3] +#define tBlendCounter data[4] + +// When an option is selected it zooms in and blends away as part +// of the transition to the next screen. +static void StartOptionZoom(struct Sprite ** sprites) { s32 i; - struct Pokenav2Struct * unk = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); u8 taskId; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_OPTION_SUBSPRITES; i++) { (*sprites)->oam.objMode = ST_OAM_OBJ_BLEND; (*sprites)->oam.affineMode = ST_OAM_AFFINE_DOUBLE; - (*sprites)->callback = sub_81CA4AC; - (*sprites)->data[0] = 8; - (*sprites)->data[1] = 0; - (*sprites)->data[7] = i; + (*sprites)->callback = SpriteCB_OptionZoom; + (*sprites)->sZoomDelay = 8; + (*sprites)->sZoomSetAffine = FALSE; + (*sprites)->sZoomSubspriteId = i; InitSpriteAffineAnim(sprites[0]); StartSpriteAffineAnim(sprites[0], 0); sprites++; } - SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0x10, 0x00)); - taskId = CreateTask(sub_81CA580, 3); - gTasks[taskId].data[0] = 8; - unk->otherIconsInMotion++; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); + taskId = CreateTask(Task_OptionBlend, 3); + gTasks[taskId].tBlendDelay = 8; + gfx->numIconsBlending++; } -static void SetMenuOptionGfxInvisibility(struct Sprite ** sprites, bool32 invisible) +static void SetOptionInvisibility(struct Sprite ** sprites, bool32 invisible) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_OPTION_SUBSPRITES; i++) { (*sprites)->invisible = invisible; sprites++; } } -static void sub_81CA474(struct Sprite * sprite) +static void SpriteCB_OptionSlide(struct Sprite * sprite) { - sprite->data[0]--; - if (sprite->data[0] != -1) + sprite->sSlideTime--; + if (sprite->sSlideTime != -1) { - sprite->data[2] += sprite->data[1]; - sprite->x = sprite->data[2] >> 4; + sprite->sSlideSpeed += sprite->sSlideAccel; + sprite->x = sprite->sSlideSpeed >> 4; } else { - sprite->x = sprite->data[7]; + sprite->x = sprite->sSlideEndX; sprite->callback = SpriteCallbackDummy; } } -static void sub_81CA4AC(struct Sprite * sprite) +#undef sSlideTime +#undef sSlideAccel +#undef sSlideSpeed +#undef sSlideEndX + +static void SpriteCB_OptionZoom(struct Sprite * sprite) { - s32 r0; - s32 r1; - if (sprite->data[0] == 0) + s32 temp; + s32 x; + if (sprite->sZoomDelay == 0) { - if (sprite->data[1] == 0) + if (!sprite->sZoomSetAffine) { StartSpriteAffineAnim(sprite, 1); - sprite->data[1]++; - sprite->data[2] = 0x100; + sprite->sZoomSetAffine++; + sprite->sZoomSpeed = 0x100; sprite->x += sprite->x2; sprite->x2 = 0; } else { - sprite->data[2] += 16; - r0 = sprite->data[2]; - r1 = r0 >> 3; - r1 = (r1 - 32) / 2; - switch (sprite->data[7]) + sprite->sZoomSpeed += 16; + temp = sprite->sZoomSpeed; + x = temp >> 3; + x = (x - 32) / 2; + + // Each subsprite needs to zoom to a different degree/direction + switch (sprite->sZoomSubspriteId) { case 0: - sprite->x2 = -r1 * 3; + sprite->x2 = -x * 3; break; case 1: - sprite->x2 = -r1; + sprite->x2 = -x; break; case 2: - sprite->x2 = r1; + sprite->x2 = x; break; case 3: - sprite->x2 = r1 * 3; + sprite->x2 = x * 3; break; } if (sprite->affineAnimEnded) @@ -1044,68 +1120,82 @@ static void sub_81CA4AC(struct Sprite * sprite) } else { - sprite->data[0]--; + sprite->sZoomDelay--; } } -static void sub_81CA580(u8 taskId) +#undef sZoomDelay +#undef sZoomSetAffine +#undef sZoomSpeed +#undef sZoomSubspriteId + +static void Task_OptionBlend(u8 taskId) { s16 * data = gTasks[taskId].data; - if (data[0] == 0) + if (tBlendDelay == 0) { - switch (data[1]) + switch (tBlendState) { case 0: - data[2] = 16; - data[3] = 0; + tBlendTarget1 = 16; + tBlendTarget2 = 0; SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_NONE | BLDCNT_TGT2_ALL); - SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0x10, 0x00)); - data[1]++; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); + tBlendState++; break; case 1: - if (data[4] & 1) + if (tBlendCounter & 1) { - data[2] -= 3; - if (data[2] < 0) - data[2] = 0; + tBlendTarget1 -= 3; + if (tBlendTarget1 < 0) + tBlendTarget1 = 0; } else { - data[3] += 3; - if (data[3] > 16) - data[3] = 16; + tBlendTarget2 += 3; + if (tBlendTarget2 > 16) + tBlendTarget2 = 16; } - SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(data[2], data[3])); - data[4]++; - if (data[4] == 12) + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(tBlendTarget1, tBlendTarget2)); + tBlendCounter++; + if (tBlendCounter == 12) { - ((struct Pokenav2Struct *)GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS))->otherIconsInMotion--; - SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0x00, 0x10)); + ((struct Pokenav_MenuGfx *)GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX))->numIconsBlending--; + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); DestroyTask(taskId); } break; } } else - data[0]--; + { + tBlendDelay--; + } } +#undef tBlendDelay +#undef tBlendState +#undef tBlendTarget1 +#undef tBlendTarget2 +#undef tBlendCounter + +// Blue light that blinks if there are available rematches nearby static void CreateMatchCallBlueLightSprite(void) { - struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); u8 spriteId = CreateSprite(&sMatchCallBlueLightSpriteTemplate, 0x10, 0x60, 4); - ptr->blueLightSpriteId = &gSprites[spriteId]; - if (PlayerHasTrainerRematches()) - ptr->blueLightSpriteId->callback = SpriteCB_BlinkingBlueLight; + gfx->blueLightSprite = &gSprites[spriteId]; + if (AreAnyTrainerRematchesNearby()) + gfx->blueLightSprite->callback = SpriteCB_BlinkingBlueLight; else - ptr->blueLightSpriteId->invisible = TRUE; + gfx->blueLightSprite->invisible = TRUE; } -static void DestroyRematchBlueLightSpriteId(void) +static void DestroyRematchBlueLightSprite(void) { - struct Pokenav2Struct *ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); - DestroySprite(ptr->blueLightSpriteId); + struct Pokenav_MenuGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); + DestroySprite(gfx->blueLightSprite); } static void SpriteCB_BlinkingBlueLight(struct Sprite * sprite) @@ -1120,33 +1210,33 @@ static void SpriteCB_BlinkingBlueLight(struct Sprite * sprite) static void AddOptionDescriptionWindow(void) { - struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); - ptr->optionDescWindowId = AddWindow(&sOptionDescWindowTemplate); - PutWindowTilemap(ptr->optionDescWindowId); - FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6)); - CopyWindowToVram(ptr->optionDescWindowId, COPYWIN_FULL); + gfx->optionDescWindowId = AddWindow(&sOptionDescWindowTemplate); + PutWindowTilemap(gfx->optionDescWindowId); + FillWindowPixelBuffer(gfx->optionDescWindowId, PIXEL_FILL(6)); + CopyWindowToVram(gfx->optionDescWindowId, COPYWIN_FULL); } static void PrintCurrentOptionDescription(void) { - struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); int menuItem = GetCurrentMenuItemId(); - const u8 * s = sPageDescriptions[menuItem]; - u32 width = GetStringWidth(FONT_NORMAL, s, -1); - FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6)); - AddTextPrinterParameterized3(ptr->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors, 0, s); + const u8 * desc = sPageDescriptions[menuItem]; + u32 width = GetStringWidth(FONT_NORMAL, desc, -1); + FillWindowPixelBuffer(gfx->optionDescWindowId, PIXEL_FILL(6)); + AddTextPrinterParameterized3(gfx->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors, 0, desc); } // Printed when Ribbons is selected if no PC/party mons have ribbons // Can occur by obtaining a mon with a ribbon and then releasing all ribbon winners static void PrintNoRibbonWinners(void) { - struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); const u8 * s = gText_NoRibbonWinners; u32 width = GetStringWidth(FONT_NORMAL, s, -1); - FillWindowPixelBuffer(ptr->optionDescWindowId, PIXEL_FILL(6)); - AddTextPrinterParameterized3(ptr->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s); + FillWindowPixelBuffer(gfx->optionDescWindowId, PIXEL_FILL(6)); + AddTextPrinterParameterized3(gfx->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s); } static bool32 IsDma3ManagerBusyWithBgCopy_(void) @@ -1156,14 +1246,14 @@ static bool32 IsDma3ManagerBusyWithBgCopy_(void) static void CreateMovingBgDotsTask(void) { - struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); - ptr->bg3ScrollTaskId = CreateTask(Task_MoveBgDots, 2); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); + gfx->bg3ScrollTaskId = CreateTask(Task_MoveBgDots, 2); } static void DestroyMovingDotsBgTask(void) { - struct Pokenav2Struct * ptr = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_ICONS); - DestroyTask(ptr->bg3ScrollTaskId); + struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX); + DestroyTask(gfx->bg3ScrollTaskId); } static void Task_MoveBgDots(u8 taskId) @@ -1269,8 +1359,8 @@ static void SetMenuOptionGlow(void) int menuType = GetPokenavMenuType(); int cursorPos = GetPokenavCursorPos(); int r4 = sPokenavMenuOptionLabelGfx[menuType].deltaY * cursorPos + sPokenavMenuOptionLabelGfx[menuType].yStart - 8; - CpuFill16(0, gScanlineEffectRegBuffers[0], 0x140); - CpuFill16(0, gScanlineEffectRegBuffers[1], 0x140); + CpuFill16(0, gScanlineEffectRegBuffers[0], DISPLAY_HEIGHT * 2); + CpuFill16(0, gScanlineEffectRegBuffers[1], DISPLAY_HEIGHT * 2); CpuFill16(RGB(16, 23, 28), &gScanlineEffectRegBuffers[0][r4], 0x20); CpuFill16(RGB(16, 23, 28), &gScanlineEffectRegBuffers[1][r4], 0x20); } diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 89bd2f7c75..4ea3b3b193 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -74,7 +74,7 @@ static u32 LoopedTask_ExitRegionMap(s32); extern const u16 gRegionMapCityZoomTiles_Pal[]; extern const u32 gRegionMapCityZoomText_Gfx[]; -static const u16 sMapSecInfoWindow_Pal[] = INCBIN_U16("graphics/pokenav/region_map_info_window.gbapal"); +static const u16 sMapSecInfoWindow_Pal[] = INCBIN_U16("graphics/pokenav/region_map/info_window.gbapal"); static const u32 sRegionMapCityZoomTiles_Gfx[] = INCBIN_U32("graphics/pokenav/zoom_tiles.4bpp.lz"); #include "data/region_map/city_map_tilemaps.h" @@ -346,7 +346,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState) return LT_PAUSE; UpdateMapSecInfoWindow(state); - sub_81C7B40(); + FadeToBlackExceptPrimary(); return LT_INC_AND_PAUSE; case 5: if (IsDma3ManagerBusyWithBgCopy_(state)) diff --git a/src/region_map.c b/src/region_map.c index 021ef7c710..759a26e84a 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -116,19 +116,18 @@ static void CB_FadeInFlyMap(void); static void CB_HandleFlyMapInput(void); static void CB_ExitFlyMap(void); -// .rodata - -static const u16 sRegionMapCursorPal[] = INCBIN_U16("graphics/pokenav/cursor.gbapal"); -static const u32 sRegionMapCursorSmallGfxLZ[] = INCBIN_U32("graphics/pokenav/cursor_small.4bpp.lz"); -static const u32 sRegionMapCursorLargeGfxLZ[] = INCBIN_U32("graphics/pokenav/cursor_large.4bpp.lz"); +// NOTE: Some of the below graphics are not in graphics/pokenav/region_map +// because porymap expects them to be in their current location. +static const u16 sRegionMapCursorPal[] = INCBIN_U16("graphics/pokenav/region_map/cursor.gbapal"); +static const u32 sRegionMapCursorSmallGfxLZ[] = INCBIN_U32("graphics/pokenav/region_map/cursor_small.4bpp.lz"); +static const u32 sRegionMapCursorLargeGfxLZ[] = INCBIN_U32("graphics/pokenav/region_map/cursor_large.4bpp.lz"); static const u16 sRegionMapBg_Pal[] = INCBIN_U16("graphics/pokenav/region_map.gbapal"); static const u32 sRegionMapBg_GfxLZ[] = INCBIN_U32("graphics/pokenav/region_map.8bpp.lz"); static const u32 sRegionMapBg_TilemapLZ[] = INCBIN_U32("graphics/pokenav/region_map_map.bin.lz"); -static const u16 sRegionMapPlayerIcon_BrendanPal[] = INCBIN_U16("graphics/pokenav/brendan_icon.gbapal"); -static const u8 sRegionMapPlayerIcon_BrendanGfx[] = INCBIN_U8("graphics/pokenav/brendan_icon.4bpp"); -static const u16 sRegionMapPlayerIcon_MayPal[] = INCBIN_U16("graphics/pokenav/may_icon.gbapal"); -static const u8 sRegionMapPlayerIcon_MayGfx[] = INCBIN_U8("graphics/pokenav/may_icon.4bpp"); - +static const u16 sRegionMapPlayerIcon_BrendanPal[] = INCBIN_U16("graphics/pokenav/region_map/brendan_icon.gbapal"); +static const u8 sRegionMapPlayerIcon_BrendanGfx[] = INCBIN_U8("graphics/pokenav/region_map/brendan_icon.4bpp"); +static const u16 sRegionMapPlayerIcon_MayPal[] = INCBIN_U16("graphics/pokenav/region_map/may_icon.gbapal"); +static const u8 sRegionMapPlayerIcon_MayGfx[] = INCBIN_U8("graphics/pokenav/region_map/may_icon.4bpp"); static const u8 sRegionMap_MapSectionLayout[] = INCBIN_U8("graphics/pokenav/region_map_section_layout.bin"); #include "data/region_map/region_map_entries.h" @@ -283,15 +282,11 @@ static const u8 sMapSecIdsOffMap[] = MAPSEC_NAVEL_ROCK }; -static const u16 sRegionMapFramePal[] = INCBIN_U16("graphics/pokenav/map_frame.gbapal"); - -static const u32 sRegionMapFrameGfxLZ[] = INCBIN_U32("graphics/pokenav/map_frame.4bpp.lz"); - -static const u32 sRegionMapFrameTilemapLZ[] = INCBIN_U32("graphics/pokenav/map_frame.bin.lz"); - -static const u16 sFlyTargetIcons_Pal[] = INCBIN_U16("graphics/pokenav/fly_target_icons.gbapal"); - -static const u32 sFlyTargetIcons_Gfx[] = INCBIN_U32("graphics/pokenav/fly_target_icons.4bpp.lz"); +static const u16 sRegionMapFramePal[] = INCBIN_U16("graphics/pokenav/region_map/frame.gbapal"); +static const u32 sRegionMapFrameGfxLZ[] = INCBIN_U32("graphics/pokenav/region_map/frame.4bpp.lz"); +static const u32 sRegionMapFrameTilemapLZ[] = INCBIN_U32("graphics/pokenav/region_map/frame.bin.lz"); +static const u16 sFlyTargetIcons_Pal[] = INCBIN_U16("graphics/pokenav/region_map/fly_target_icons.gbapal"); +static const u32 sFlyTargetIcons_Gfx[] = INCBIN_U32("graphics/pokenav/region_map/fly_target_icons.4bpp.lz"); static const u8 sMapHealLocations[][3] = { From ffe2970e30f64f46a7539ac69d61ab4ea353a92c Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 12 Nov 2021 17:13:50 -0500 Subject: [PATCH 170/417] Rename pokenav menu handler files --- include/pokenav.h | 4 ++-- ld_script.txt | 8 ++++---- src/{pokenav_menu_handler_1.c => pokenav_menu_handler.c} | 0 ...okenav_menu_handler_2.c => pokenav_menu_handler_gfx.c} | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename src/{pokenav_menu_handler_1.c => pokenav_menu_handler.c} (100%) rename src/{pokenav_menu_handler_2.c => pokenav_menu_handler_gfx.c} (100%) diff --git a/include/pokenav.h b/include/pokenav.h index 6dc88cab79..59f6700896 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -370,7 +370,7 @@ bool32 WaitForPokenavShutdownFade(void); void SetActiveMenuLoopTasks(void *func1, void *func2); void ShutdownPokenav(void); -// pokenav_menu_handler_1.c +// pokenav_menu_handler.c bool32 PokenavCallback_Init_MainMenuCursorOnMap(void); bool32 PokenavCallback_Init_MainMenuCursorOnMatchCall(void); bool32 PokenavCallback_Init_MainMenuCursorOnRibbons(void); @@ -383,7 +383,7 @@ int GetPokenavCursorPos(void); int GetCurrentMenuItemId(void); u16 GetHelpBarTextId(void); -// pokenav_menu_handler_2.c +// pokenav_menu_handler_gfx.c bool32 OpenPokenavMenuInitial(void); bool32 OpenPokenavMenuNotInitial(void); void CreateMenuHandlerLoopedTask(s32 ltIdx); diff --git a/ld_script.txt b/ld_script.txt index c4283265d8..257fb3c6e2 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -311,8 +311,8 @@ SECTIONS { src/pokenav.o(.text); src/pokenav_main_menu.o(.text); src/pokenav_match_call_ui.o(.text); - src/pokenav_menu_handler_1.o(.text); - src/pokenav_menu_handler_2.o(.text); + src/pokenav_menu_handler.o(.text); + src/pokenav_menu_handler_gfx.o(.text); src/pokenav_match_call_1.o(.text); src/pokenav_match_call_2.o(.text); src/pokenav_region_map.o(.text); @@ -666,8 +666,8 @@ SECTIONS { src/pokenav.o(.rodata); src/pokenav_main_menu.o(.rodata); src/pokenav_match_call_ui.o(.rodata); - src/pokenav_menu_handler_1.o(.rodata); - src/pokenav_menu_handler_2.o(.rodata); + src/pokenav_menu_handler.o(.rodata); + src/pokenav_menu_handler_gfx.o(.rodata); src/pokenav_match_call_1.o(.rodata); src/pokenav_match_call_2.o(.rodata); src/pokenav_region_map.o(.rodata); diff --git a/src/pokenav_menu_handler_1.c b/src/pokenav_menu_handler.c similarity index 100% rename from src/pokenav_menu_handler_1.c rename to src/pokenav_menu_handler.c diff --git a/src/pokenav_menu_handler_2.c b/src/pokenav_menu_handler_gfx.c similarity index 100% rename from src/pokenav_menu_handler_2.c rename to src/pokenav_menu_handler_gfx.c From da5752fd0d94a1b7fdef354b7fe4bfb055b4a545 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 12 Nov 2021 17:28:06 -0500 Subject: [PATCH 171/417] Start match call menu doc --- .../{arrow.png => options_cursor.png} | Bin include/pokenav.h | 14 +- src/pokenav_conditions_gfx.c | 4 +- src/pokenav_conditions_search_results.c | 6 +- src/pokenav_main_menu.c | 22 +- src/pokenav_match_call_1.c | 14 +- src/pokenav_match_call_2.c | 791 +++++++++--------- src/pokenav_match_call_ui.c | 4 +- src/pokenav_menu_handler_gfx.c | 6 +- src/pokenav_region_map.c | 4 +- src/pokenav_ribbons_list.c | 6 +- src/pokenav_ribbons_summary.c | 4 +- 12 files changed, 452 insertions(+), 423 deletions(-) rename graphics/pokenav/match_call/{arrow.png => options_cursor.png} (100%) diff --git a/graphics/pokenav/match_call/arrow.png b/graphics/pokenav/match_call/options_cursor.png similarity index 100% rename from graphics/pokenav/match_call/arrow.png rename to graphics/pokenav/match_call/options_cursor.png diff --git a/include/pokenav.h b/include/pokenav.h index 59f6700896..ba9f1cbe95 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -276,7 +276,7 @@ enum POKENAV_MC_FUNC_CANCEL, POKENAV_MC_FUNC_CALL_MSG, POKENAV_MC_FUNC_NEARBY_MSG, - POKENAV_MC_FUNC_10, + POKENAV_MC_FUNC_EXIT_CALL, POKENAV_MC_FUNC_SHOW_CHECK_PAGE, POKENAV_MC_FUNC_CHECK_PAGE_UP, POKENAV_MC_FUNC_CHECK_PAGE_DOWN, @@ -293,6 +293,14 @@ enum POKENAV_MAP_FUNC_EXIT, }; +// Modes for PokenavFadeScreen +enum { + POKENAV_FADE_TO_BLACK, + POKENAV_FADE_FROM_BLACK, + POKENAV_FADE_TO_BLACK_ALL, + POKENAV_FADE_FROM_BLACK_ALL, +}; + // pokenav.c void SetSelectedConditionSearch(u32); u32 GetSelectedConditionSearch(void); @@ -359,8 +367,8 @@ bool32 MainMenuLoopedTaskIsBusy(void); void SetLeftHeaderSpritesInvisibility(void); void PokenavCopyPalette(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *palette); void FadeToBlackExceptPrimary(void); -struct Sprite *PauseSpinningPokenavSprite(void); -void ResumeSpinningPokenavSprite(void); +struct Sprite *GetSpinningPokenavSprite(void); +void HideSpinningPokenavSprite(void); void UpdateRegionMapRightHeaderTiles(u32 arg0); void HideMainOrSubMenuLeftHeader(u32 id, bool32 onRightSide); void SlideMenuHeaderUp(void); diff --git a/src/pokenav_conditions_gfx.c b/src/pokenav_conditions_gfx.c index a1593983d2..d2fb715ab8 100644 --- a/src/pokenav_conditions_gfx.c +++ b/src/pokenav_conditions_gfx.c @@ -295,7 +295,7 @@ static u32 LoopedTask_OpenConditionGraphMenu(s32 state) PrintHelpBarText(HELPBAR_CONDITION_MON_STATUS); return LT_INC_AND_PAUSE; case 15: - PokenavFadeScreen(1); + PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); if (!IsConditionMenuSearchMode()) { LoadLeftHeaderGfxForIndex(POKENAV_GFX_PARTY_MENU); @@ -352,7 +352,7 @@ static u32 LoopedTask_ExitConditionGraphMenu(s32 state) ToggleGraphData(FALSE); return LT_INC_AND_CONTINUE; case 2: - PokenavFadeScreen(0); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); if (!IsConditionMenuSearchMode()) SlideMenuHeaderDown(); return LT_INC_AND_PAUSE; diff --git a/src/pokenav_conditions_search_results.c b/src/pokenav_conditions_search_results.c index d9bd2273f6..770d0d01ab 100644 --- a/src/pokenav_conditions_search_results.c +++ b/src/pokenav_conditions_search_results.c @@ -467,7 +467,7 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state) ShowLeftHeaderGfx(searchGfxId, 1, 0); ShowLeftHeaderGfx(POKENAV_GFX_CONDITION_MENU, 1, 0); } - PokenavFadeScreen(1); + PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); return LT_INC_AND_PAUSE; case 5: if (IsPaletteFadeActive()) @@ -617,7 +617,7 @@ static u32 LoopedTask_ExitConditionSearchMenu(s32 state) { case 0: PlaySE(SE_SELECT); - PokenavFadeScreen(0); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); SlideMenuHeaderDown(); return LT_INC_AND_PAUSE; case 1: @@ -637,7 +637,7 @@ static u32 LoopedTask_SelectSearchResult(s32 state) { case 0: PlaySE(SE_SELECT); - PokenavFadeScreen(0); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive()) diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c index 77faecaa39..318ed520d8 100644 --- a/src/pokenav_main_menu.c +++ b/src/pokenav_main_menu.c @@ -473,7 +473,6 @@ void PokenavFillPalette(u32 palIndex, u16 fillValue) void PokenavCopyPalette(const u16 *src, const u16 *dest, int size, int a3, int a4, u16 *palette) { - if (a4 == 0) { CpuCopy16(src, palette, size * 2); @@ -496,11 +495,11 @@ void PokenavCopyPalette(const u16 *src, const u16 *dest, int size, int a3, int a g1 = ((((GET_G(*dest) << 8) - (g << 8)) / a3) * a4) >> 8; b1 = ((((GET_B(*dest) << 8) - (b << 8)) / a3) * a4) >> 8; - r = (r + r1) & 0x1F; //_RGB(r + r1, g + g1, b + b1); doesn't match; I have to assign the value of ((r + r1) & 0x1F) to r - g = (g + g1) & 0x1F; //See above - b = (b + b1) & 0x1F; //See above + r = (r + r1) & 0x1F; //_RGB(r + r1, g + g1, b + b1); doesn't match + g = (g + g1) & 0x1F; + b = (b + b1) & 0x1F; - *palette = RGB2(r, g, b); //See above comment + *palette = RGB2(r, g, b); src++, dest++; palette++; @@ -514,16 +513,16 @@ void PokenavFadeScreen(s32 fadeType) switch (fadeType) { - case 0: + case POKENAV_FADE_TO_BLACK: BeginNormalPaletteFade(menu->palettes, -2, 0, 16, RGB_BLACK); break; - case 1: + case POKENAV_FADE_FROM_BLACK: BeginNormalPaletteFade(menu->palettes, -2, 16, 0, RGB_BLACK); break; - case 2: + case POKENAV_FADE_TO_BLACK_ALL: BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, RGB_BLACK); break; - case 3: + case POKENAV_FADE_FROM_BLACK_ALL: BeginNormalPaletteFade(PALETTES_ALL, -2, 16, 0, RGB_BLACK); break; } @@ -608,7 +607,7 @@ static void SpriteCB_SpinningPokenav(struct Sprite *sprite) sprite->y2 = (GetBgY(0) / 256u) * -1; } -struct Sprite *PauseSpinningPokenavSprite(void) +struct Sprite *GetSpinningPokenavSprite(void) { struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); @@ -616,10 +615,11 @@ struct Sprite *PauseSpinningPokenavSprite(void) return menu->spinningPokenav; } -void ResumeSpinningPokenavSprite(void) +void HideSpinningPokenavSprite(void) { struct Pokenav_MainMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_MAIN_MENU); + // Move sprite so it's no longer visible menu->spinningPokenav->x = 220; menu->spinningPokenav->y = 12; menu->spinningPokenav->callback = SpriteCB_SpinningPokenav; diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index 5612ba6cb4..63b8fcbf53 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -32,9 +32,9 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *); static u32 GetExitMatchCallMenuId(struct Pokenav3Struct *); static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *); static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *); -static u32 CB2_HandleCallInput(struct Pokenav3Struct *); +static u32 CB2_HandleCallExitInput(struct Pokenav3Struct *); static u32 sub_81CAD20(s32); -static bool32 sub_81CB1D0(void); +static bool32 ShouldDoNearbyMessage(void); #include "data/text/match_call_messages.h" @@ -155,8 +155,8 @@ static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state) if (GetPokenavMode() == POKENAV_MODE_FORCE_CALL_READY) SetPokenavMode(POKENAV_MODE_FORCE_CALL_EXIT); - state->callback = CB2_HandleCallInput; - if (sub_81CB1D0()) + state->callback = CB2_HandleCallExitInput; + if (ShouldDoNearbyMessage()) return POKENAV_MC_FUNC_NEARBY_MSG; return POKENAV_MC_FUNC_CALL_MSG; @@ -191,12 +191,12 @@ static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *state) return POKENAV_MC_FUNC_NONE; } -static u32 CB2_HandleCallInput(struct Pokenav3Struct *state) +static u32 CB2_HandleCallExitInput(struct Pokenav3Struct *state) { if (JOY_NEW(A_BUTTON | B_BUTTON)) { state->callback = CB2_HandleMatchCallInput; - return POKENAV_MC_FUNC_10; + return POKENAV_MC_FUNC_EXIT_CALL; } return POKENAV_MC_FUNC_NONE; @@ -486,7 +486,7 @@ bool32 unref_sub_81CB16C(void) return FALSE; } -static bool32 sub_81CB1D0(void) +static bool32 ShouldDoNearbyMessage(void) { struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); int selection = GetSelectedPokenavListIndex(); diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 29cb0a06d9..e91257d14a 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -24,100 +24,105 @@ #include "constants/region_map_sections.h" #include "constants/songs.h" -struct Pokenav4Struct +#define GFXTAG_CURSOR 7 +#define GFXTAG_TRAINER_PIC 8 +#define PALTAG_CURSOR 12 +#define PALTAG_TRAINER_PIC 13 + +struct Pokenav_MatchCallGfx { bool32 (*isTaskActiveCB)(void); u32 loopTaskId; - u8 filler8[0x6]; - u8 unkE; + u8 filler8[6]; + bool8 unkE; u8 unkF; u16 locWindowId; u16 infoBoxWindowId; u16 msgBoxWindowId; - s16 unk16; + s16 pageDelta; u8 unused18; u8 unused19; - u16 unk1A; + u16 trainerPicPalOffset; struct Sprite *optionsCursorSprite; struct Sprite *trainerPicSprite; - u8 unk24[0x800]; - u8 unk824[0x800]; - u8 unk1024[0x800]; - u8 *unk1824; - u8 unk1828[0x800]; - u8 unk2028[0x20]; + u8 bgTilemapBuffer1[BG_SCREEN_SIZE]; + u8 unusedTilemapBuffer[BG_SCREEN_SIZE]; + u8 bgTilemapBuffer2[BG_SCREEN_SIZE]; + u8 *trainerPicGfxPtr; + u8 trainerPicGfx[0x800]; + u8 trainerPicPal[0x20]; }; static bool32 GetCurrentLoopedTaskActive(void); static u32 LoopedTask_OpenMatchCall(s32); static void InitMatchCallPokenavListMenuTemplate(void); static void sub_81CBC1C(void); -static void RemoveMatchCallSprites(void); -static void sub_81CC034(struct Pokenav4Struct *); -static void DrawMatchCallLeftColumnWindows(struct Pokenav4Struct *); -static void UpdateMatchCallInfoBox(struct Pokenav4Struct *); -static void PrintMatchCallLocation(struct Pokenav4Struct *, int); -static void sub_81CC214(void); -static void sub_81CBC38(int); -static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *); -static bool32 sub_81CBFC4(struct Pokenav4Struct *); -static void UpdateCursorGfxPos(struct Pokenav4Struct *, int); -static bool32 IsDma3ManagerBusyWithBgCopy1(struct Pokenav4Struct *); -static void UpdateWindowsReturnToTrainerList(struct Pokenav4Struct *); -static void DrawMsgBoxForMatchCallMsg(struct Pokenav4Struct *); -static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav4Struct *); -static void PrintCallingDots(struct Pokenav4Struct *); -static bool32 WaitForCallingDotsText(struct Pokenav4Struct *); -static void PrintMatchCallMessage(struct Pokenav4Struct *); -static bool32 WaitForMatchCallMessageText(struct Pokenav4Struct *); -static void DrawMsgBoxForCloseByMsg(struct Pokenav4Struct *); -static void PrintTrainerIsCloseBy(struct Pokenav4Struct *); -static bool32 WaitForTrainerIsCloseByText(struct Pokenav4Struct *); -static void DrawSpinningPokenavForCall(struct Pokenav4Struct *); -static bool32 WaitForSpinningPokenav(struct Pokenav4Struct *); -static void UpdateWindowsToShowCheckPage(struct Pokenav4Struct *); -static void LoadCheckPageTrainerPic(struct Pokenav4Struct *); -static bool32 WaitForTrainerPic(struct Pokenav4Struct *); -static void TrainerPicSlideOffscreen(struct Pokenav4Struct *); -static void sub_81CBC64(u8 taskId); -static void TryDrawRematchPokeballIcon(u16 windowId, u32, u32); -static void PrintNumberRegisteredLabel(u16 windowId); -static void PrintNumberRegistered(u16 windowId); -static void PrintNumberOfBattlesLabel(u16 windowId); -static void PrintNumberOfBattles(u16 windowId); -static void PrintMatchCallInfoLabel(u16 windowId, const u8 *str, int top); -static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top); -static void sub_81CC2F0(struct Pokenav4Struct *, int); -static void CloseMatchCallSelectOptionsWindow(struct Pokenav4Struct *); +static void FreeMatchCallSprites(void); +static void LoadCallWindowAndFade(struct Pokenav_MatchCallGfx *); +static void DrawMatchCallLeftColumnWindows(struct Pokenav_MatchCallGfx *); +static void UpdateMatchCallInfoBox(struct Pokenav_MatchCallGfx *); +static void PrintMatchCallLocation(struct Pokenav_MatchCallGfx *, int); +static void AllocMatchCallSprites(void); +static void SetPokeballIconsFlashing(bool32); +static void PrintMatchCallSelectionOptions(struct Pokenav_MatchCallGfx *); +static bool32 ShowOptionsCursor(struct Pokenav_MatchCallGfx *); +static void UpdateCursorGfxPos(struct Pokenav_MatchCallGfx *, int); +static bool32 IsDma3ManagerBusyWithBgCopy1(struct Pokenav_MatchCallGfx *); +static void UpdateWindowsReturnToTrainerList(struct Pokenav_MatchCallGfx *); +static void DrawMsgBoxForMatchCallMsg(struct Pokenav_MatchCallGfx *); +static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav_MatchCallGfx *); +static void PrintCallingDots(struct Pokenav_MatchCallGfx *); +static bool32 WaitForCallingDotsText(struct Pokenav_MatchCallGfx *); +static void PrintMatchCallMessage(struct Pokenav_MatchCallGfx *); +static bool32 WaitForMatchCallMessageText(struct Pokenav_MatchCallGfx *); +static void DrawMsgBoxForCloseByMsg(struct Pokenav_MatchCallGfx *); +static void PrintTrainerIsCloseBy(struct Pokenav_MatchCallGfx *); +static bool32 WaitForTrainerIsCloseByText(struct Pokenav_MatchCallGfx *); +static void EraseCallMessageBox(struct Pokenav_MatchCallGfx *); +static bool32 WaitForCallMessageBoxErase(struct Pokenav_MatchCallGfx *); +static void UpdateWindowsToShowCheckPage(struct Pokenav_MatchCallGfx *); +static void LoadCheckPageTrainerPic(struct Pokenav_MatchCallGfx *); +static bool32 WaitForTrainerPic(struct Pokenav_MatchCallGfx *); +static void TrainerPicSlideOffscreen(struct Pokenav_MatchCallGfx *); +static void Task_FlashPokeballIcons(u8); +static void TryDrawRematchPokeballIcon(u16, u32, u32); +static void PrintNumberRegisteredLabel(u16); +static void PrintNumberRegistered(u16); +static void PrintNumberOfBattlesLabel(u16); +static void PrintNumberOfBattles(u16); +static void PrintMatchCallInfoLabel(u16, const u8 *, int); +static void PrintMatchCallInfoNumber(u16, const u8 *, int); +static void CreateOptionsCursorSprite(struct Pokenav_MatchCallGfx *, int); +static void CloseMatchCallSelectOptionsWindow(struct Pokenav_MatchCallGfx *); static struct Sprite *CreateTrainerPicSprite(void); -static void SpriteCB_TrainerPicSlideOnscreen(struct Sprite *sprite); -static void SpriteCB_TrainerPicSlideOffscreen(struct Sprite *sprite); -void SpriteCB_OptionsCursor(struct Sprite *sprite); -u32 MatchCallListCursorDown(s32); -u32 MatchCallListCursorUp(s32); -u32 MatchCallListPageDown(s32); -u32 MatchCallListPageUp(s32); -u32 SelectMatchCallEntry(s32); -u32 MoveMatchCallOptionsCursor(s32); +static void SpriteCB_TrainerPicSlideOnscreen(struct Sprite *); +static void SpriteCB_TrainerPicSlideOffscreen(struct Sprite *); +static void SpriteCB_OptionsCursor(struct Sprite *); +static u32 MatchCallListCursorDown(s32); +static u32 MatchCallListCursorUp(s32); +static u32 MatchCallListPageDown(s32); +static u32 MatchCallListPageUp(s32); +static u32 SelectMatchCallEntry(s32); +static u32 MoveMatchCallOptionsCursor(s32); static u32 CancelMatchCallSelection(s32); -u32 DoMatchCallMessage(s32); -u32 DoTrainerCloseByMessage(s32); -u32 sub_81CB888(s32); -u32 ShowCheckPage(s32); -u32 ShowCheckPageUp(s32); -u32 ShowCheckPageDown(s32); -u32 ExitCheckPage(s32); -u32 ExitMatchCall(s32); +static u32 DoMatchCallMessage(s32); +static u32 DoTrainerCloseByMessage(s32); +static u32 CloseMatchCallMessage(s32); +static u32 ShowCheckPage(s32); +static u32 ShowCheckPageUp(s32); +static u32 ShowCheckPageDown(s32); +static u32 ExitCheckPage(s32); +static u32 ExitMatchCall(s32); static const u16 sMatchCallUI_Pal[] = INCBIN_U16("graphics/pokenav/match_call/ui.gbapal"); static const u32 sMatchCallUI_Gfx[] = INCBIN_U32("graphics/pokenav/match_call/ui.4bpp.lz"); static const u32 sMatchCallUI_Tilemap[] = INCBIN_U32("graphics/pokenav/match_call/ui.bin.lz"); -static const u16 gUnknown_08622698[] = INCBIN_U16("graphics/pokenav/match_call/arrow.gbapal"); -static const u32 gUnknown_086226B8[] = INCBIN_U32("graphics/pokenav/match_call/arrow.4bpp.lz"); +static const u16 sOptionsCursor_Pal[] = INCBIN_U16("graphics/pokenav/match_call/options_cursor.gbapal"); +static const u32 sOptionsCursor_Gfx[] = INCBIN_U32("graphics/pokenav/match_call/options_cursor.4bpp.lz"); static const u16 gUnknown_086226E0[] = INCBIN_U16("graphics/pokenav/match_call/86226E0.gbapal"); static const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/match_call/8622700.gbapal"); -static const u16 gUnknown_08622720[] = INCBIN_U16("graphics/pokenav/match_call/pokeball.gbapal"); -static const u32 gUnknown_08622760[] = INCBIN_U32("graphics/pokenav/match_call/pokeball.4bpp.lz"); +static const u16 sPokeball_Pal[] = INCBIN_U16("graphics/pokenav/match_call/pokeball.gbapal"); +static const u32 sPokeball_Gfx[] = INCBIN_U32("graphics/pokenav/match_call/pokeball.4bpp.lz"); const struct BgTemplate sMatchCallBgTemplates[3] = { @@ -162,7 +167,7 @@ static const LoopedTask sMatchCallLoopTaskFuncs[] = [POKENAV_MC_FUNC_CANCEL] = CancelMatchCallSelection, [POKENAV_MC_FUNC_CALL_MSG] = DoMatchCallMessage, [POKENAV_MC_FUNC_NEARBY_MSG] = DoTrainerCloseByMessage, - [POKENAV_MC_FUNC_10] = sub_81CB888, + [POKENAV_MC_FUNC_EXIT_CALL] = CloseMatchCallMessage, [POKENAV_MC_FUNC_SHOW_CHECK_PAGE] = ShowCheckPage, [POKENAV_MC_FUNC_CHECK_PAGE_UP] = ShowCheckPageUp, [POKENAV_MC_FUNC_CHECK_PAGE_DOWN] = ShowCheckPageDown, @@ -200,27 +205,27 @@ static const u8 *const sMatchCallOptionTexts[MATCH_CALL_OPTION_COUNT] = }; // The series of 5 dots that appear when someone is called with Match Call -static const u8 sText_CallingDots[] = _("·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·{PAUSE 0x04}·\p"); +static const u8 sText_CallingDots[] = _("·{PAUSE 4}·{PAUSE 4}·{PAUSE 4}·{PAUSE 4}·\p"); static const struct WindowTemplate sCallMsgBoxWindowTemplate = { .bg = 1, .tilemapLeft = 1, .tilemapTop = 12, - .width = 0x1C, - .height = 0x04, + .width = 28, + .height = 4, .paletteNum = 1, .baseBlock = 10 }; -const struct CompressedSpriteSheet gUnknown_08622810[1] = +static const struct CompressedSpriteSheet sOptionsCursorSpriteSheets[1] = { - {gUnknown_086226B8, 0x40, 7} + {sOptionsCursor_Gfx, 0x40, GFXTAG_CURSOR} }; -const struct SpritePalette gUnknown_08622818[2] = +const struct SpritePalette sOptionsCursorSpritePalettes[2] = { - {gUnknown_08622698, 12} + {sOptionsCursor_Pal, PALTAG_CURSOR} }; static const struct OamData sOptionsCursorOamData = @@ -239,8 +244,8 @@ static const struct OamData sOptionsCursorOamData = static const struct SpriteTemplate sOptionsCursorSpriteTemplate = { - .tileTag = 7, - .paletteTag = 12, + .tileTag = GFXTAG_CURSOR, + .paletteTag = PALTAG_CURSOR, .oam = &sOptionsCursorOamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -264,8 +269,8 @@ static const struct OamData sTrainerPicOamData = static const struct SpriteTemplate sTrainerPicSpriteTemplate = { - .tileTag = 8, - .paletteTag = 13, + .tileTag = GFXTAG_TRAINER_PIC, + .paletteTag = PALTAG_TRAINER_PIC, .oam = &sTrainerPicOamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -275,57 +280,57 @@ static const struct SpriteTemplate sTrainerPicSpriteTemplate = bool32 OpenMatchCall(void) { - struct Pokenav4Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN, sizeof(struct Pokenav4Struct)); - if (!state) + struct Pokenav_MatchCallGfx *gfx = AllocSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN, sizeof(struct Pokenav_MatchCallGfx)); + if (!gfx) return FALSE; - state->unused19 = 0; - state->loopTaskId = CreateLoopedTask(LoopedTask_OpenMatchCall, 1); - state->isTaskActiveCB = GetCurrentLoopedTaskActive; + gfx->unused19 = 0; + gfx->loopTaskId = CreateLoopedTask(LoopedTask_OpenMatchCall, 1); + gfx->isTaskActiveCB = GetCurrentLoopedTaskActive; return TRUE; } void CreateMatchCallLoopedTask(s32 index) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - state->loopTaskId = CreateLoopedTask(sMatchCallLoopTaskFuncs[index], 1); - state->isTaskActiveCB = GetCurrentLoopedTaskActive; + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + gfx->loopTaskId = CreateLoopedTask(sMatchCallLoopTaskFuncs[index], 1); + gfx->isTaskActiveCB = GetCurrentLoopedTaskActive; } bool32 IsMatchCallLoopedTaskActive(void) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - return state->isTaskActiveCB(); + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + return gfx->isTaskActiveCB(); } void FreeMatchCallSubstruct2(void) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - RemoveMatchCallSprites(); + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + FreeMatchCallSprites(); sub_81CBC1C(); - RemoveWindow(state->infoBoxWindowId); - RemoveWindow(state->locWindowId); - RemoveWindow(state->msgBoxWindowId); - FreePokenavSubstruct(6); + RemoveWindow(gfx->infoBoxWindowId); + RemoveWindow(gfx->locWindowId); + RemoveWindow(gfx->msgBoxWindowId); + FreePokenavSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); } static bool32 GetCurrentLoopedTaskActive(void) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - return IsLoopedTaskActive(state->loopTaskId); + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + return IsLoopedTaskActive(gfx->loopTaskId); } -static u32 LoopedTask_OpenMatchCall(s32 taskState) +static u32 LoopedTask_OpenMatchCall(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: InitBgTemplates(sMatchCallBgTemplates, ARRAY_COUNT(sMatchCallBgTemplates)); ChangeBgX(2, 0, BG_COORD_SET); ChangeBgY(2, 0, BG_COORD_SET); DecompressAndCopyTileDataToVram(2, sMatchCallUI_Gfx, 0, 0, 0); - SetBgTilemapBuffer(2, state->unk1024); + SetBgTilemapBuffer(2, gfx->bgTilemapBuffer2); CopyToBgTilemapBuffer(2, sMatchCallUI_Tilemap, 0, 0); CopyBgTilemapBufferToVram(2); CopyPaletteIntoBufferUnfaded(sMatchCallUI_Pal, 0x20, 0x20); @@ -336,7 +341,7 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState) return LT_PAUSE; BgDmaFill(1, 0, 0, 1); - SetBgTilemapBuffer(1, state->unk24); + SetBgTilemapBuffer(1, gfx->bgTilemapBuffer1); FillBgTilemapBufferRect_Palette0(1, 0x1000, 0, 0, 32, 20); CopyPaletteIntoBufferUnfaded(gUnknown_086226E0, 0x10, 0x20); CopyBgTilemapBufferToVram(1); @@ -345,10 +350,10 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState) if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; - sub_81CC034(state); - DecompressAndCopyTileDataToVram(3, gUnknown_08622760, 0, 0, 0); + LoadCallWindowAndFade(gfx); + DecompressAndCopyTileDataToVram(3, sPokeball_Gfx, 0, 0, 0); CopyPaletteIntoBufferUnfaded(gUnknown_08622700, 0x30, 0x20); - CopyPaletteIntoBufferUnfaded(gUnknown_08622720, 0x50, 0x20); + CopyPaletteIntoBufferUnfaded(sPokeball_Pal, 0x50, 0x20); return LT_INC_AND_PAUSE; case 3: if (FreeTempTileDataBuffersIfPossible() || !sub_81CAE28()) @@ -360,11 +365,11 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState) if (sub_81C8224()) return LT_PAUSE; - DrawMatchCallLeftColumnWindows(state); + DrawMatchCallLeftColumnWindows(gfx); return LT_INC_AND_PAUSE; case 5: - UpdateMatchCallInfoBox(state); - PrintMatchCallLocation(state, 0); + UpdateMatchCallInfoBox(gfx); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 6: ChangeBgX(1, 0, BG_COORD_SET); @@ -372,50 +377,50 @@ static u32 LoopedTask_OpenMatchCall(s32 taskState) ShowBg(2); ShowBg(3); ShowBg(1); - sub_81CC214(); + AllocMatchCallSprites(); LoadLeftHeaderGfxForIndex(3); ShowLeftHeaderGfx(POKENAV_GFX_MATCH_CALL_MENU, 1, 0); - PokenavFadeScreen(1); + PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); return LT_INC_AND_PAUSE; case 7: if (IsPaletteFadeActive() || AreLeftHeaderSpritesMoving()) return LT_PAUSE; - sub_81CBC38(1); + SetPokeballIconsFlashing(TRUE); return LT_FINISH; default: return LT_FINISH; } } -u32 MatchCallListCursorDown(s32 taskState) +static u32 MatchCallListCursorDown(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: switch (MatchCall_MoveCursorDown()) { - case 0: - break; - case 1: - PlaySE(SE_SELECT); - return 7; - case 2: - PlaySE(SE_SELECT); - // fall through - default: - return LT_INC_AND_PAUSE; + case 0: + break; + case 1: + PlaySE(SE_SELECT); + return LT_SET_STATE(2); + case 2: + PlaySE(SE_SELECT); + // fall through + default: + return LT_INC_AND_PAUSE; } break; case 1: if (IsMonListLoopedTaskActive()) return LT_PAUSE; - PrintMatchCallLocation(state, 0); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 2: - PrintMatchCallLocation(state, 0); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -425,34 +430,34 @@ u32 MatchCallListCursorDown(s32 taskState) return LT_FINISH; } -u32 MatchCallListCursorUp(s32 taskState) +static u32 MatchCallListCursorUp(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: switch (MatchCall_MoveCursorUp()) { - case 0: - break; - case 1: - PlaySE(SE_SELECT); - return 7; - case 2: - PlaySE(SE_SELECT); - // fall through - default: - return LT_INC_AND_PAUSE; + case 0: + break; + case 1: + PlaySE(SE_SELECT); + return LT_SET_STATE(2); + case 2: + PlaySE(SE_SELECT); + // fall through + default: + return LT_INC_AND_PAUSE; } break; case 1: if (IsMonListLoopedTaskActive()) return LT_PAUSE; - PrintMatchCallLocation(state, 0); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 2: - PrintMatchCallLocation(state, 0); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -462,34 +467,34 @@ u32 MatchCallListCursorUp(s32 taskState) return LT_FINISH; } -u32 MatchCallListPageDown(s32 taskState) +static u32 MatchCallListPageDown(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: switch (MatchCall_PageDown()) { - case 0: - break; - case 1: - PlaySE(SE_SELECT); - return 7; - case 2: - PlaySE(SE_SELECT); - // fall through - default: - return LT_INC_AND_PAUSE; + case 0: + break; + case 1: + PlaySE(SE_SELECT); + return LT_SET_STATE(2); + case 2: + PlaySE(SE_SELECT); + // fall through + default: + return LT_INC_AND_PAUSE; } break; case 1: if (IsMonListLoopedTaskActive()) return LT_PAUSE; - PrintMatchCallLocation(state, 0); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 2: - PrintMatchCallLocation(state, 0); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -499,34 +504,34 @@ u32 MatchCallListPageDown(s32 taskState) return LT_FINISH; } -u32 MatchCallListPageUp(s32 taskState) +static u32 MatchCallListPageUp(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: switch (MatchCall_PageUp()) { - case 0: - break; - case 1: - PlaySE(SE_SELECT); - return 7; - case 2: - PlaySE(SE_SELECT); - // fall through - default: - return LT_INC_AND_PAUSE; + case 0: + break; + case 1: + PlaySE(SE_SELECT); + return LT_SET_STATE(2); + case 2: + PlaySE(SE_SELECT); + // fall through + default: + return LT_INC_AND_PAUSE; } break; case 1: if (IsMonListLoopedTaskActive()) return LT_PAUSE; - PrintMatchCallLocation(state, 0); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 2: - PrintMatchCallLocation(state, 0); + PrintMatchCallLocation(gfx, 0); return LT_INC_AND_PAUSE; case 3: if (IsDma3ManagerBusyWithBgCopy()) @@ -536,18 +541,18 @@ u32 MatchCallListPageUp(s32 taskState) return LT_FINISH; } -u32 SelectMatchCallEntry(s32 taskState) +static u32 SelectMatchCallEntry(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: PlaySE(SE_SELECT); - PrintMatchCallSelectionOptions(state); + PrintMatchCallSelectionOptions(gfx); PrintHelpBarText(HELPBAR_MC_CALL_MENU); return LT_INC_AND_PAUSE; case 1: - if (sub_81CBFC4(state)) + if (ShowOptionsCursor(gfx)) return LT_PAUSE; break; } @@ -555,30 +560,30 @@ u32 SelectMatchCallEntry(s32 taskState) return LT_FINISH; } -u32 MoveMatchCallOptionsCursor(s32 taskState) +static u32 MoveMatchCallOptionsCursor(s32 state) { - struct Pokenav4Struct *state; + struct Pokenav_MatchCallGfx *gfx; u16 cursorPos; PlaySE(SE_SELECT); - state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); cursorPos = GetMatchCallOptionCursorPos(); - UpdateCursorGfxPos(state, cursorPos); + UpdateCursorGfxPos(gfx, cursorPos); return LT_FINISH; } -u32 CancelMatchCallSelection(s32 taskState) +static u32 CancelMatchCallSelection(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: PlaySE(SE_SELECT); - UpdateWindowsReturnToTrainerList(state); + UpdateWindowsReturnToTrainerList(gfx); PrintHelpBarText(HELPBAR_MC_TRAINER_LIST); return LT_INC_AND_PAUSE; case 1: - if (IsDma3ManagerBusyWithBgCopy1(state)) + if (IsDma3ManagerBusyWithBgCopy1(gfx)) return LT_PAUSE; break; } @@ -586,31 +591,31 @@ u32 CancelMatchCallSelection(s32 taskState) return LT_FINISH; } -u32 DoMatchCallMessage(s32 taskState) +static u32 DoMatchCallMessage(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: ToggleMatchCallVerticalArrows(TRUE); - DrawMsgBoxForMatchCallMsg(state); + DrawMsgBoxForMatchCallMsg(gfx); return LT_INC_AND_PAUSE; case 1: - if (IsDma3ManagerBusyWithBgCopy2(state)) + if (IsDma3ManagerBusyWithBgCopy2(gfx)) return LT_PAUSE; - PrintCallingDots(state); + PrintCallingDots(gfx); PlaySE(SE_POKENAV_CALL); - state->unkE = 0; + gfx->unkE = 0; return LT_INC_AND_PAUSE; case 2: - if (WaitForCallingDotsText(state)) + if (WaitForCallingDotsText(gfx)) return LT_PAUSE; - PrintMatchCallMessage(state); + PrintMatchCallMessage(gfx); return LT_INC_AND_PAUSE; case 3: - if (WaitForMatchCallMessageText(state)) + if (WaitForMatchCallMessageText(gfx)) return LT_PAUSE; break; } @@ -618,25 +623,25 @@ u32 DoMatchCallMessage(s32 taskState) return LT_FINISH; } -u32 DoTrainerCloseByMessage(s32 taskState) +static u32 DoTrainerCloseByMessage(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: PlaySE(SE_SELECT); - DrawMsgBoxForCloseByMsg(state); + DrawMsgBoxForCloseByMsg(gfx); ToggleMatchCallVerticalArrows(TRUE); - state->unkE = 1; + gfx->unkE = 1; return LT_INC_AND_PAUSE; case 1: - if (IsDma3ManagerBusyWithBgCopy2(state)) + if (IsDma3ManagerBusyWithBgCopy2(gfx)) return LT_PAUSE; - PrintTrainerIsCloseBy(state); + PrintTrainerIsCloseBy(gfx); return LT_INC_AND_PAUSE; case 2: - if (WaitForTrainerIsCloseByText(state)) + if (WaitForTrainerIsCloseByText(gfx)) return LT_PAUSE; break; } @@ -644,31 +649,31 @@ u32 DoTrainerCloseByMessage(s32 taskState) return LT_FINISH; } -u32 sub_81CB888(s32 taskState) +static u32 CloseMatchCallMessage(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); u32 result = LT_INC_AND_PAUSE; - switch (taskState) + switch (state) { case 0: - if (!state->unkE) + if (!gfx->unkE) PlaySE(SE_POKENAV_HANG_UP); PlaySE(SE_SELECT); break; case 1: - DrawSpinningPokenavForCall(state); + EraseCallMessageBox(gfx); break; case 2: - if (WaitForSpinningPokenav(state)) + if (WaitForCallMessageBoxErase(gfx)) result = LT_PAUSE; break; case 3: - UpdateWindowsReturnToTrainerList(state); + UpdateWindowsReturnToTrainerList(gfx); break; case 4: - if (IsDma3ManagerBusyWithBgCopy1(state)) + if (IsDma3ManagerBusyWithBgCopy1(gfx)) result = LT_PAUSE; PrintHelpBarText(HELPBAR_MC_TRAINER_LIST); @@ -680,7 +685,7 @@ u32 sub_81CB888(s32 taskState) } else { - if (state->unkF) + if (gfx->unkF) { sub_81C8838(); result = LT_INC_AND_CONTINUE; @@ -708,28 +713,28 @@ u32 sub_81CB888(s32 taskState) return result; } -u32 ShowCheckPage(s32 taskState) +static u32 ShowCheckPage(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: PlaySE(SE_SELECT); sub_81C877C(); - UpdateWindowsToShowCheckPage(state); + UpdateWindowsToShowCheckPage(gfx); return LT_INC_AND_PAUSE; case 1: - if (IsMatchCallListTaskActive() || IsDma3ManagerBusyWithBgCopy1(state)) + if (IsMatchCallListTaskActive() || IsDma3ManagerBusyWithBgCopy1(gfx)) return LT_PAUSE; PrintHelpBarText(HELPBAR_MC_CHECK_PAGE); return LT_INC_AND_PAUSE; case 2: PrintCheckPageInfo(0); - LoadCheckPageTrainerPic(state); + LoadCheckPageTrainerPic(gfx); return LT_INC_AND_PAUSE; case 3: - if (IsMatchCallListTaskActive() || WaitForTrainerPic(state) || WaitForHelpBar()) + if (IsMatchCallListTaskActive() || WaitForTrainerPic(gfx) || WaitForHelpBar()) return LT_PAUSE; break; } @@ -737,12 +742,12 @@ u32 ShowCheckPage(s32 taskState) return LT_FINISH; } -u32 ShowCheckPageDown(s32 taskState) +static u32 ShowCheckPageDown(s32 state) { int topId; int delta; - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: topId = GetMatchCallListTopIndex(); @@ -750,25 +755,25 @@ u32 ShowCheckPageDown(s32 taskState) if (delta) { PlaySE(SE_SELECT); - state->unk16 = delta; - TrainerPicSlideOffscreen(state); + gfx->pageDelta = delta; + TrainerPicSlideOffscreen(gfx); return LT_INC_AND_PAUSE; } break; case 1: - if (WaitForTrainerPic(state)) + if (WaitForTrainerPic(gfx)) return LT_PAUSE; - PrintMatchCallLocation(state, state->unk16); + PrintMatchCallLocation(gfx, gfx->pageDelta); return LT_INC_AND_PAUSE; case 2: - PrintCheckPageInfo(state->unk16); + PrintCheckPageInfo(gfx->pageDelta); return LT_INC_AND_PAUSE; case 3: - LoadCheckPageTrainerPic(state); + LoadCheckPageTrainerPic(gfx); return LT_INC_AND_PAUSE; case 4: - if (IsMatchCallListTaskActive() || WaitForTrainerPic(state)) + if (IsMatchCallListTaskActive() || WaitForTrainerPic(gfx)) return LT_PAUSE; break; } @@ -776,22 +781,22 @@ u32 ShowCheckPageDown(s32 taskState) return LT_FINISH; } -u32 ExitCheckPage(s32 taskState) +static u32 ExitCheckPage(s32 state) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: PlaySE(SE_SELECT); - TrainerPicSlideOffscreen(state); + TrainerPicSlideOffscreen(gfx); sub_81C87F0(); return LT_INC_AND_PAUSE; case 1: - if (IsMatchCallListTaskActive() || WaitForTrainerPic(state)) + if (IsMatchCallListTaskActive() || WaitForTrainerPic(gfx)) return LT_PAUSE; PrintHelpBarText(HELPBAR_MC_TRAINER_LIST); - UpdateMatchCallInfoBox(state); + UpdateMatchCallInfoBox(gfx); return LT_INC_AND_PAUSE; case 2: if (IsDma3ManagerBusyWithBgCopy()) @@ -802,12 +807,12 @@ u32 ExitCheckPage(s32 taskState) return LT_FINISH; } -u32 ShowCheckPageUp(s32 taskState) +static u32 ShowCheckPageUp(s32 state) { int topId; int delta; - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - switch (taskState) + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + switch (state) { case 0: topId = GetMatchCallListTopIndex(); @@ -815,25 +820,25 @@ u32 ShowCheckPageUp(s32 taskState) if (delta) { PlaySE(SE_SELECT); - state->unk16 = delta; - TrainerPicSlideOffscreen(state); + gfx->pageDelta = delta; + TrainerPicSlideOffscreen(gfx); return LT_INC_AND_PAUSE; } break; case 1: - if (WaitForTrainerPic(state)) + if (WaitForTrainerPic(gfx)) return LT_PAUSE; - PrintMatchCallLocation(state, state->unk16); + PrintMatchCallLocation(gfx, gfx->pageDelta); return LT_INC_AND_PAUSE; case 2: - PrintCheckPageInfo(state->unk16); + PrintCheckPageInfo(gfx->pageDelta); return LT_INC_AND_PAUSE; case 3: - LoadCheckPageTrainerPic(state); + LoadCheckPageTrainerPic(gfx); return LT_INC_AND_PAUSE; case 4: - if (IsMatchCallListTaskActive() || WaitForTrainerPic(state)) + if (IsMatchCallListTaskActive() || WaitForTrainerPic(gfx)) return LT_PAUSE; break; } @@ -841,14 +846,14 @@ u32 ShowCheckPageUp(s32 taskState) return LT_FINISH; } -u32 ExitMatchCall(s32 taskState) +static u32 ExitMatchCall(s32 state) { - switch (taskState) + switch (state) { case 0: PlaySE(SE_SELECT); - sub_81CBC38(0); - PokenavFadeScreen(0); + SetPokeballIconsFlashing(FALSE); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); SlideMenuHeaderDown(); return LT_INC_AND_PAUSE; case 1: @@ -878,36 +883,50 @@ static void InitMatchCallPokenavListMenuTemplate(void) template.listFunc.unk10_2 = BufferMatchCallNameAndDesc; template.unk14 = TryDrawRematchPokeballIcon; sub_81C81D4(&sMatchCallBgTemplates[2], &template, 2); - CreateTask(sub_81CBC64, 7); + CreateTask(Task_FlashPokeballIcons, 7); } static void sub_81CBC1C(void) { sub_81C8234(); - DestroyTask(FindTaskIdByFunc(sub_81CBC64)); + DestroyTask(FindTaskIdByFunc(Task_FlashPokeballIcons)); } -static void sub_81CBC38(int arg0) +#define tSinIdx data[0] +#define tSinVal data[1] +#define tActive data[15] + +static void SetPokeballIconsFlashing(bool32 active) { - u8 taskId = FindTaskIdByFunc(sub_81CBC64); + u8 taskId = FindTaskIdByFunc(Task_FlashPokeballIcons); if (taskId != TASK_NONE) - gTasks[taskId].data[15] = arg0; + gTasks[taskId].tActive = active; } -static void sub_81CBC64(u8 taskId) +static void Task_FlashPokeballIcons(u8 taskId) { - s16 *taskData = gTasks[taskId].data; - if (taskData[15]) + s16 *data = gTasks[taskId].data; + if (tActive) { - taskData[0] += 4; - taskData[0] &= 0x7F; - taskData[1] = gSineTable[taskData[0]] >> 4; - PokenavCopyPalette(gUnknown_08622720, gUnknown_08622720 + 0x10, 0x10, 0x10, taskData[1], gPlttBufferUnfaded + 0x50); + tSinIdx += 4; + tSinIdx &= 0x7F; + tSinVal = gSineTable[tSinIdx] >> 4; + PokenavCopyPalette(sPokeball_Pal, &sPokeball_Pal[0x10], 0x10, 0x10, tSinVal, &gPlttBufferUnfaded[0x50]); if (!gPaletteFade.active) - CpuCopy32(gPlttBufferUnfaded + 0x50, gPlttBufferFaded + 0x50, 0x20); + CpuCopy32(&gPlttBufferUnfaded[0x50], &gPlttBufferFaded[0x50], 0x20); } } +#undef tSinIdx +#undef tSinVal +#undef tActive + +enum { + POKEBALL_ICON_TOP = 0x5000, + POKEBALL_ICON_BOTTOM, + POKEBALL_ICON_EMPTY, +}; + static void TryDrawRematchPokeballIcon(u16 windowId, u32 rematchId, u32 arg2) { u8 bg = GetWindowAttribute(windowId, WINDOW_BG); @@ -915,13 +934,13 @@ static void TryDrawRematchPokeballIcon(u16 windowId, u32 rematchId, u32 arg2) tilemap += arg2 * 0x40 + 0x1D; if (ShouldDrawRematchPokeballIcon(rematchId)) { - tilemap[0] = 0x5000; - tilemap[0x20] = 0x5001; + tilemap[0] = POKEBALL_ICON_TOP; + tilemap[0x20] = POKEBALL_ICON_BOTTOM; } else { - tilemap[0] = 0x5002; - tilemap[0x20] = 0x5002; + tilemap[0] = POKEBALL_ICON_EMPTY; + tilemap[0x20] = POKEBALL_ICON_EMPTY; } } @@ -930,29 +949,29 @@ void ClearRematchPokeballIcon(u16 windowId, u32 arg0) u8 bg = GetWindowAttribute(windowId, WINDOW_BG); u16 *tilemap = GetBgTilemapBuffer(bg); tilemap += arg0 * 0x40 + 0x1D; - tilemap[0] = 0x5002; - tilemap[0x20] = 0x5002; + tilemap[0] = POKEBALL_ICON_EMPTY; + tilemap[0x20] = POKEBALL_ICON_EMPTY; } -static void DrawMatchCallLeftColumnWindows(struct Pokenav4Struct *state) +static void DrawMatchCallLeftColumnWindows(struct Pokenav_MatchCallGfx *gfx) { - state->locWindowId = AddWindow(&sMatchCallLocationWindowTemplate); - state->infoBoxWindowId = AddWindow(&sMatchCallInfoBoxWindowTemplate); - FillWindowPixelBuffer(state->locWindowId, PIXEL_FILL(1)); - PutWindowTilemap(state->locWindowId); - FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); - PutWindowTilemap(state->infoBoxWindowId); - CopyWindowToVram(state->locWindowId, COPYWIN_MAP); + gfx->locWindowId = AddWindow(&sMatchCallLocationWindowTemplate); + gfx->infoBoxWindowId = AddWindow(&sMatchCallInfoBoxWindowTemplate); + FillWindowPixelBuffer(gfx->locWindowId, PIXEL_FILL(1)); + PutWindowTilemap(gfx->locWindowId); + FillWindowPixelBuffer(gfx->infoBoxWindowId, PIXEL_FILL(1)); + PutWindowTilemap(gfx->infoBoxWindowId); + CopyWindowToVram(gfx->locWindowId, COPYWIN_MAP); } -static void UpdateMatchCallInfoBox(struct Pokenav4Struct *state) +static void UpdateMatchCallInfoBox(struct Pokenav_MatchCallGfx *gfx) { - FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); - PrintNumberRegisteredLabel(state->infoBoxWindowId); - PrintNumberRegistered(state->infoBoxWindowId); - PrintNumberOfBattlesLabel(state->infoBoxWindowId); - PrintNumberOfBattles(state->infoBoxWindowId); - CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX); + FillWindowPixelBuffer(gfx->infoBoxWindowId, PIXEL_FILL(1)); + PrintNumberRegisteredLabel(gfx->infoBoxWindowId); + PrintNumberRegistered(gfx->infoBoxWindowId); + PrintNumberOfBattlesLabel(gfx->infoBoxWindowId); + PrintNumberOfBattles(gfx->infoBoxWindowId); + CopyWindowToVram(gfx->infoBoxWindowId, COPYWIN_GFX); } static void PrintNumberRegisteredLabel(u16 windowId) @@ -996,11 +1015,11 @@ static void PrintMatchCallInfoNumber(u16 windowId, const u8 *str, int top) AddTextPrinterParameterized(windowId, FONT_NARROW, str, x, y, TEXT_SKIP_DRAW, NULL); } -static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1) +static void PrintMatchCallLocation(struct Pokenav_MatchCallGfx *gfx, int delta) { u8 mapName[32]; int x; - int index = GetSelectedPokenavListIndex() + arg1; + int index = GetSelectedPokenavListIndex() + delta; int mapSec = GetMatchCallMapSec(index); if (mapSec != MAPSEC_NONE) GetMapName(mapName, mapSec, 0); @@ -1008,207 +1027,209 @@ static void PrintMatchCallLocation(struct Pokenav4Struct *state, int arg1) StringCopy(mapName, gText_Unknown); x = GetStringCenterAlignXOffset(FONT_NARROW, mapName, 88); - FillWindowPixelBuffer(state->locWindowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(state->locWindowId, FONT_NARROW, mapName, x, 1, 0, NULL); + FillWindowPixelBuffer(gfx->locWindowId, PIXEL_FILL(1)); + AddTextPrinterParameterized(gfx->locWindowId, FONT_NARROW, mapName, x, 1, 0, NULL); } -static void PrintMatchCallSelectionOptions(struct Pokenav4Struct *state) +static void PrintMatchCallSelectionOptions(struct Pokenav_MatchCallGfx *gfx) { u32 i; - FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); + FillWindowPixelBuffer(gfx->infoBoxWindowId, PIXEL_FILL(1)); for (i = 0; i < MATCH_CALL_OPTION_COUNT; i++) { int optionText = GetMatchCallOptionId(i); if (optionText == MATCH_CALL_OPTION_COUNT) break; - AddTextPrinterParameterized(state->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gfx->infoBoxWindowId, FONT_NARROW, sMatchCallOptionTexts[optionText], 16, i * 16 + 1, TEXT_SKIP_DRAW, NULL); } - CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX); + CopyWindowToVram(gfx->infoBoxWindowId, COPYWIN_GFX); } -static bool32 sub_81CBFC4(struct Pokenav4Struct *state) +static bool32 ShowOptionsCursor(struct Pokenav_MatchCallGfx *gfx) { if (!IsDma3ManagerBusyWithBgCopy()) { - sub_81CC2F0(state, GetMatchCallOptionCursorPos()); + CreateOptionsCursorSprite(gfx, GetMatchCallOptionCursorPos()); return FALSE; } return TRUE; } -static void UpdateWindowsReturnToTrainerList(struct Pokenav4Struct *state) +static void UpdateWindowsReturnToTrainerList(struct Pokenav_MatchCallGfx *gfx) { - CloseMatchCallSelectOptionsWindow(state); - UpdateMatchCallInfoBox(state); + CloseMatchCallSelectOptionsWindow(gfx); + UpdateMatchCallInfoBox(gfx); } -static bool32 IsDma3ManagerBusyWithBgCopy1(struct Pokenav4Struct *state) +static bool32 IsDma3ManagerBusyWithBgCopy1(struct Pokenav_MatchCallGfx *gfx) { return IsDma3ManagerBusyWithBgCopy(); } -static void UpdateWindowsToShowCheckPage(struct Pokenav4Struct *state) +static void UpdateWindowsToShowCheckPage(struct Pokenav_MatchCallGfx *gfx) { - CloseMatchCallSelectOptionsWindow(state); - FillWindowPixelBuffer(state->infoBoxWindowId, PIXEL_FILL(1)); - CopyWindowToVram(state->infoBoxWindowId, COPYWIN_GFX); + CloseMatchCallSelectOptionsWindow(gfx); + FillWindowPixelBuffer(gfx->infoBoxWindowId, PIXEL_FILL(1)); + CopyWindowToVram(gfx->infoBoxWindowId, COPYWIN_GFX); } -static void sub_81CC034(struct Pokenav4Struct *state) +static void LoadCallWindowAndFade(struct Pokenav_MatchCallGfx *gfx) { - state->msgBoxWindowId = AddWindow(&sCallMsgBoxWindowTemplate); - LoadMatchCallWindowGfx(state->msgBoxWindowId, 1, 4); + gfx->msgBoxWindowId = AddWindow(&sCallMsgBoxWindowTemplate); + LoadMatchCallWindowGfx(gfx->msgBoxWindowId, 1, 4); FadeToBlackExceptPrimary(); } -static void DrawMsgBoxForMatchCallMsg(struct Pokenav4Struct *state) +static void DrawMsgBoxForMatchCallMsg(struct Pokenav_MatchCallGfx *gfx) { struct Sprite *sprite; - LoadMatchCallWindowGfx(state->msgBoxWindowId, 1, 4); - DrawMatchCallTextBoxBorder(state->msgBoxWindowId, 1, 4); - FillWindowPixelBuffer(state->msgBoxWindowId, PIXEL_FILL(1)); - PutWindowTilemap(state->msgBoxWindowId); - CopyWindowToVram(state->msgBoxWindowId, COPYWIN_FULL); - sprite = PauseSpinningPokenavSprite(); + LoadMatchCallWindowGfx(gfx->msgBoxWindowId, 1, 4); + DrawMatchCallTextBoxBorder(gfx->msgBoxWindowId, 1, 4); + FillWindowPixelBuffer(gfx->msgBoxWindowId, PIXEL_FILL(1)); + PutWindowTilemap(gfx->msgBoxWindowId); + CopyWindowToVram(gfx->msgBoxWindowId, COPYWIN_FULL); + sprite = GetSpinningPokenavSprite(); sprite->x = 24; sprite->y = 112; sprite->y2 = 0; } -static void DrawMsgBoxForCloseByMsg(struct Pokenav4Struct *state) +static void DrawMsgBoxForCloseByMsg(struct Pokenav_MatchCallGfx *gfx) { - LoadUserWindowBorderGfx(state->msgBoxWindowId, 1, 0x40); - DrawTextBorderOuter(state->msgBoxWindowId, 1, 4); - FillWindowPixelBuffer(state->msgBoxWindowId, PIXEL_FILL(1)); - PutWindowTilemap(state->msgBoxWindowId); - CopyWindowToVram(state->msgBoxWindowId, COPYWIN_FULL); + LoadUserWindowBorderGfx(gfx->msgBoxWindowId, 1, 0x40); + DrawTextBorderOuter(gfx->msgBoxWindowId, 1, 4); + FillWindowPixelBuffer(gfx->msgBoxWindowId, PIXEL_FILL(1)); + PutWindowTilemap(gfx->msgBoxWindowId); + CopyWindowToVram(gfx->msgBoxWindowId, COPYWIN_FULL); } -static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav4Struct *state) +static bool32 IsDma3ManagerBusyWithBgCopy2(struct Pokenav_MatchCallGfx *gfx) { return IsDma3ManagerBusyWithBgCopy(); } -static void PrintCallingDots(struct Pokenav4Struct *state) +static void PrintCallingDots(struct Pokenav_MatchCallGfx *gfx) { - AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, sText_CallingDots, 32, 1, 1, NULL); + AddTextPrinterParameterized(gfx->msgBoxWindowId, FONT_NORMAL, sText_CallingDots, 32, 1, 1, NULL); } -static bool32 WaitForCallingDotsText(struct Pokenav4Struct *state) +static bool32 WaitForCallingDotsText(struct Pokenav_MatchCallGfx *gfx) { RunTextPrinters(); - return IsTextPrinterActive(state->msgBoxWindowId); + return IsTextPrinterActive(gfx->msgBoxWindowId); } -static void PrintTrainerIsCloseBy(struct Pokenav4Struct *state) +static void PrintTrainerIsCloseBy(struct Pokenav_MatchCallGfx *gfx) { - AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, gText_TrainerCloseBy, 0, 1, 1, NULL); + AddTextPrinterParameterized(gfx->msgBoxWindowId, FONT_NORMAL, gText_TrainerCloseBy, 0, 1, 1, NULL); } -static bool32 WaitForTrainerIsCloseByText(struct Pokenav4Struct *state) +static bool32 WaitForTrainerIsCloseByText(struct Pokenav_MatchCallGfx *gfx) { RunTextPrinters(); - return IsTextPrinterActive(state->msgBoxWindowId); + return IsTextPrinterActive(gfx->msgBoxWindowId); } -static void PrintMatchCallMessage(struct Pokenav4Struct *state) +static void PrintMatchCallMessage(struct Pokenav_MatchCallGfx *gfx) { int index = GetSelectedPokenavListIndex(); - const u8 *str = GetMatchCallMessageText(index, &state->unkF); + const u8 *str = GetMatchCallMessageText(index, &gfx->unkF); u8 speed = GetPlayerTextSpeedDelay(); - AddTextPrinterParameterized(state->msgBoxWindowId, FONT_NORMAL, str, 32, 1, speed, NULL); + AddTextPrinterParameterized(gfx->msgBoxWindowId, FONT_NORMAL, str, 32, 1, speed, NULL); } -static bool32 WaitForMatchCallMessageText(struct Pokenav4Struct *state) +static bool32 WaitForMatchCallMessageText(struct Pokenav_MatchCallGfx *gfx) { if (JOY_HELD(A_BUTTON)) - gTextFlags.canABSpeedUpPrint = 1; + gTextFlags.canABSpeedUpPrint = TRUE; else - gTextFlags.canABSpeedUpPrint = 0; + gTextFlags.canABSpeedUpPrint = FALSE; RunTextPrinters(); - return IsTextPrinterActive(state->msgBoxWindowId); + return IsTextPrinterActive(gfx->msgBoxWindowId); } -static void DrawSpinningPokenavForCall(struct Pokenav4Struct *state) +static void EraseCallMessageBox(struct Pokenav_MatchCallGfx *gfx) { - ResumeSpinningPokenavSprite(); + HideSpinningPokenavSprite(); FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 20); CopyBgTilemapBufferToVram(1); } -static bool32 WaitForSpinningPokenav(struct Pokenav4Struct *state) +static bool32 WaitForCallMessageBoxErase(struct Pokenav_MatchCallGfx *gfx) { return IsDma3ManagerBusyWithBgCopy(); } -static void sub_81CC214(void) +static void AllocMatchCallSprites(void) { int i; u8 paletteNum; struct SpriteSheet spriteSheet; - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - for (i = 0; i < ARRAY_COUNT(gUnknown_08622810); i++) - LoadCompressedSpriteSheet(&gUnknown_08622810[i]); + // Load options cursor gfx + for (i = 0; i < ARRAY_COUNT(sOptionsCursorSpriteSheets); i++) + LoadCompressedSpriteSheet(&sOptionsCursorSpriteSheets[i]); + Pokenav_AllocAndLoadPalettes(sOptionsCursorSpritePalettes); + gfx->optionsCursorSprite = NULL; - Pokenav_AllocAndLoadPalettes(gUnknown_08622818); - state->optionsCursorSprite = NULL; - spriteSheet.data = state->unk1828; - spriteSheet.size = 0x800; - spriteSheet.tag = 8; - state->unk1824 = (u8 *)OBJ_VRAM0 + LoadSpriteSheet(&spriteSheet) * 0x20; - paletteNum = AllocSpritePalette(13); - state->unk1A = 0x100 + paletteNum * 0x10; - state->trainerPicSprite = CreateTrainerPicSprite(); - state->trainerPicSprite->invisible = TRUE; + // Load trainer pic gfx + spriteSheet.data = gfx->trainerPicGfx; + spriteSheet.size = sizeof(gfx->trainerPicGfx); + spriteSheet.tag = GFXTAG_TRAINER_PIC; + gfx->trainerPicGfxPtr = (u8 *)OBJ_VRAM0 + LoadSpriteSheet(&spriteSheet) * 0x20; + paletteNum = AllocSpritePalette(PALTAG_TRAINER_PIC); + gfx->trainerPicPalOffset = 0x100 + paletteNum * 0x10; + gfx->trainerPicSprite = CreateTrainerPicSprite(); + gfx->trainerPicSprite->invisible = TRUE; } -static void RemoveMatchCallSprites(void) +static void FreeMatchCallSprites(void) { - struct Pokenav4Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); - if (state->optionsCursorSprite) - DestroySprite(state->optionsCursorSprite); - if (state->trainerPicSprite) - DestroySprite(state->trainerPicSprite); + struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); + if (gfx->optionsCursorSprite) + DestroySprite(gfx->optionsCursorSprite); + if (gfx->trainerPicSprite) + DestroySprite(gfx->trainerPicSprite); - FreeSpriteTilesByTag(8); - FreeSpriteTilesByTag(7); - FreeSpritePaletteByTag(12); - FreeSpritePaletteByTag(13); + FreeSpriteTilesByTag(GFXTAG_TRAINER_PIC); + FreeSpriteTilesByTag(GFXTAG_CURSOR); + FreeSpritePaletteByTag(PALTAG_CURSOR); + FreeSpritePaletteByTag(PALTAG_TRAINER_PIC); } -static void sub_81CC2F0(struct Pokenav4Struct *state, int top) +static void CreateOptionsCursorSprite(struct Pokenav_MatchCallGfx *gfx, int top) { - if (!state->optionsCursorSprite) + if (!gfx->optionsCursorSprite) { u8 spriteId = CreateSprite(&sOptionsCursorSpriteTemplate, 4, 80, 5); - state->optionsCursorSprite = &gSprites[spriteId]; - UpdateCursorGfxPos(state, top); + gfx->optionsCursorSprite = &gSprites[spriteId]; + UpdateCursorGfxPos(gfx, top); } } -static void CloseMatchCallSelectOptionsWindow(struct Pokenav4Struct *state) +static void CloseMatchCallSelectOptionsWindow(struct Pokenav_MatchCallGfx *gfx) { - DestroySprite(state->optionsCursorSprite); - state->optionsCursorSprite = NULL; + DestroySprite(gfx->optionsCursorSprite); + gfx->optionsCursorSprite = NULL; } -static void UpdateCursorGfxPos(struct Pokenav4Struct *state, int top) +static void UpdateCursorGfxPos(struct Pokenav_MatchCallGfx *gfx, int top) { - state->optionsCursorSprite->y2 = top * 16; + gfx->optionsCursorSprite->y2 = top * 16; } -void SpriteCB_OptionsCursor(struct Sprite *sprite) +static void SpriteCB_OptionsCursor(struct Sprite *sprite) { if (++sprite->data[0] > 3) { sprite->data[0] = 0; - sprite->x2 = (sprite->x2 + 1) & 0x7; + sprite->x2 = (sprite->x2 + 1) & 7; } } @@ -1218,30 +1239,30 @@ static struct Sprite *CreateTrainerPicSprite(void) return &gSprites[spriteId]; } -static void LoadCheckPageTrainerPic(struct Pokenav4Struct *state) +static void LoadCheckPageTrainerPic(struct Pokenav_MatchCallGfx *gfx) { u16 cursor; int trainerPic = GetMatchCallTrainerPic(GetSelectedPokenavListIndex()); if (trainerPic >= 0) { - DecompressPicFromTable(&gTrainerFrontPicTable[trainerPic], state->unk1828, SPECIES_NONE); - LZ77UnCompWram(gTrainerFrontPicPaletteTable[trainerPic].data, state->unk2028); - cursor = RequestDma3Copy(state->unk1828, state->unk1824, 0x800, 1); - LoadPalette(state->unk2028, state->unk1A, 0x20); - state->trainerPicSprite->data[0] = 0; - state->trainerPicSprite->data[7] = cursor; - state->trainerPicSprite->callback = SpriteCB_TrainerPicSlideOnscreen; + DecompressPicFromTable(&gTrainerFrontPicTable[trainerPic], gfx->trainerPicGfx, SPECIES_NONE); + LZ77UnCompWram(gTrainerFrontPicPaletteTable[trainerPic].data, gfx->trainerPicPal); + cursor = RequestDma3Copy(gfx->trainerPicGfx, gfx->trainerPicGfxPtr, sizeof(gfx->trainerPicGfx), 1); + LoadPalette(gfx->trainerPicPal, gfx->trainerPicPalOffset, sizeof(gfx->trainerPicPal)); + gfx->trainerPicSprite->data[0] = 0; + gfx->trainerPicSprite->data[7] = cursor; + gfx->trainerPicSprite->callback = SpriteCB_TrainerPicSlideOnscreen; } } -static void TrainerPicSlideOffscreen(struct Pokenav4Struct *state) +static void TrainerPicSlideOffscreen(struct Pokenav_MatchCallGfx *gfx) { - state->trainerPicSprite->callback = SpriteCB_TrainerPicSlideOffscreen; + gfx->trainerPicSprite->callback = SpriteCB_TrainerPicSlideOffscreen; } -static bool32 WaitForTrainerPic(struct Pokenav4Struct *state) +static bool32 WaitForTrainerPic(struct Pokenav_MatchCallGfx *gfx) { - return state->trainerPicSprite->callback != SpriteCallbackDummy; + return gfx->trainerPicSprite->callback != SpriteCallbackDummy; } static void SpriteCB_TrainerPicSlideOnscreen(struct Sprite *sprite) diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index ce3db25c59..83720f4cf4 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -468,10 +468,10 @@ void sub_81C877C(void) structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C8870, 6); } -void PrintCheckPageInfo(s16 a0) +void PrintCheckPageInfo(s16 delta) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - structPtr->unk888.windowTopIndex += a0; + structPtr->unk888.windowTopIndex += delta; structPtr->unk89C = 0; structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_PrintCheckPageInfo, 6); } diff --git a/src/pokenav_menu_handler_gfx.c b/src/pokenav_menu_handler_gfx.c index 1738142acf..b9dd130468 100644 --- a/src/pokenav_menu_handler_gfx.c +++ b/src/pokenav_menu_handler_gfx.c @@ -505,11 +505,11 @@ static u32 LoopedTask_OpenMenu(s32 state) ShowBg(2); ShowBg(3); if (gfx->pokenavAlreadyOpen) - PokenavFadeScreen(1); + PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); else { PlaySE(SE_POKENAV_ON); - PokenavFadeScreen(3); + PokenavFadeScreen(POKENAV_FADE_FROM_BLACK_ALL); } switch (GetPokenavMenuType()) { @@ -779,7 +779,7 @@ static u32 LoopedTask_OpenPokenavFeature(s32 state) return LT_PAUSE; if (AreLeftHeaderSpritesMoving()) return LT_PAUSE; - PokenavFadeScreen(0); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); return LT_INC_AND_PAUSE; case 3: if (IsPaletteFadeActive()) diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 4ea3b3b193..4b9ff9f10e 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -364,7 +364,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState) LoadLeftHeaderGfxForIndex(menuGfxId); ShowLeftHeaderGfx(menuGfxId, 1, 1); - PokenavFadeScreen(1); + PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); return LT_INC_AND_PAUSE; case 7: if (IsPaletteFadeActive() || AreLeftHeaderSpritesMoving()) @@ -457,7 +457,7 @@ static u32 LoopedTask_ExitRegionMap(s32 taskState) { case 0: PlaySE(SE_SELECT); - PokenavFadeScreen(0); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive()) diff --git a/src/pokenav_ribbons_list.c b/src/pokenav_ribbons_list.c index b5d412e127..9f4ea5d4ad 100644 --- a/src/pokenav_ribbons_list.c +++ b/src/pokenav_ribbons_list.c @@ -460,7 +460,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state) ShowBg(2); HideBg(3); PrintHelpBarText(HELPBAR_RIBBONS_MON_LIST); - PokenavFadeScreen(1); + PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); if (!menu->fromSummary) { LoadLeftHeaderGfxForIndex(POKENAV_GFX_RIBBONS_MENU); @@ -615,7 +615,7 @@ static u32 LoopedTask_RibbonsListReturnToMainMenu(s32 state) { case 0: PlaySE(SE_SELECT); - PokenavFadeScreen(0); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); SlideMenuHeaderDown(); return LT_INC_AND_PAUSE; case 1: @@ -635,7 +635,7 @@ static u32 LoopedTask_RibbonsListOpenSummary(s32 state) { case 0: PlaySE(SE_SELECT); - PokenavFadeScreen(0); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive()) diff --git a/src/pokenav_ribbons_summary.c b/src/pokenav_ribbons_summary.c index a7a27ee31f..c12f78ef50 100644 --- a/src/pokenav_ribbons_summary.c +++ b/src/pokenav_ribbons_summary.c @@ -638,7 +638,7 @@ static u32 LoopedTask_OpenRibbonsSummaryMenu(s32 state) ShowBg(1); ShowBg(2); HideBg(3); - PokenavFadeScreen(1); + PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); return LT_INC_AND_PAUSE; } return LT_PAUSE; @@ -655,7 +655,7 @@ static u32 LoopedTask_ExitRibbonsSummaryMenu(s32 state) { case 0: PlaySE(SE_SELECT); - PokenavFadeScreen(0); + PokenavFadeScreen(POKENAV_FADE_TO_BLACK); return LT_INC_AND_PAUSE; case 1: if (IsPaletteFadeActive()) From 3b91d8fdaf2a1e13c4af938dfb867d407ccb280f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 12 Nov 2021 20:24:14 -0500 Subject: [PATCH 172/417] Start pokenav list ui doc --- include/pokenav.h | 20 +++++++++---------- src/pokenav_conditions.c | 26 ++++++++++++------------- src/pokenav_conditions_search_results.c | 20 +++++++++---------- src/pokenav_match_call_1.c | 6 +++--- src/pokenav_match_call_2.c | 2 +- src/pokenav_match_call_ui.c | 9 ++++----- src/pokenav_ribbons_list.c | 22 ++++++++++----------- src/pokenav_ribbons_summary.c | 18 ++++++++--------- src/use_pokeblock.c | 2 +- 9 files changed, 62 insertions(+), 63 deletions(-) diff --git a/include/pokenav.h b/include/pokenav.h index ba9f1cbe95..254f9c7f7b 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -7,14 +7,14 @@ typedef u32 (*LoopedTask)(s32 state); -struct PokenavMonList +struct PokenavMonListItem { u8 boxId; u8 monId; u16 data; }; -struct PokenavMatchCallEntries +struct PokenavMatchCallEntry { bool8 isSpecialTrainer; u8 mapSec; @@ -24,8 +24,8 @@ struct PokenavMatchCallEntries struct PokenavListTemplate { union { - struct PokenavMonList *monList; - struct PokenavMatchCallEntries *matchCallEntries; + struct PokenavMonListItem *monList; + struct PokenavMatchCallEntry *matchCallEntries; } list; u16 count; u16 unk6; @@ -37,17 +37,17 @@ struct PokenavListTemplate u8 fillValue; u8 fontId; union { - void (*printMonFunc)(struct PokenavMonList *item, u8 *dest); - void (*unk10_2)(struct PokenavMatchCallEntries *, u8 *a1); + void (*bufferMonItemFunc)(struct PokenavMonListItem *, u8 *); + void (*bufferMatchCallItemFunc)(struct PokenavMatchCallEntry *, u8 *); } listFunc; void (*unk14)(u16 a0, u32 a1, u32 a2); }; -struct PokenavSub18 +struct PokenavMonList { u16 listCount; u16 currIndex; - struct PokenavMonList monData[TOTAL_BOXES_COUNT * IN_BOX_COUNT + PARTY_SIZE]; + struct PokenavMonListItem monData[TOTAL_BOXES_COUNT * IN_BOX_COUNT + PARTY_SIZE]; }; // Return values of LoopedTask functions. @@ -406,7 +406,7 @@ void FreeMatchCallSubstruct1(void); int sub_81CAE28(void); int GetNumberRegistered(void); int sub_81CAE48(void); -struct PokenavMatchCallEntries *sub_81CAE94(void); +struct PokenavMatchCallEntry *sub_81CAE94(void); u16 GetMatchCallMapSec(int); bool32 ShouldDrawRematchPokeballIcon(int index); void ClearRematchPokeballIcon(u16 windowId, u32 a1); @@ -415,7 +415,7 @@ const u8 *GetMatchCallFlavorText(int index, int textType); const u8 *GetMatchCallMessageText(int index, u8 *arg1); u16 GetMatchCallOptionCursorPos(void); u16 GetMatchCallOptionId(int arg0); -void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries * arg0, u8 *str); +void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntry * arg0, u8 *str); u8 GetMatchTableMapSectionId(int rematchIndex); int GetIndexDeltaOfNextCheckPageDown(int index); int GetIndexDeltaOfNextCheckPageUp(int index); diff --git a/src/pokenav_conditions.c b/src/pokenav_conditions.c index 6007acc2bb..e61b115686 100644 --- a/src/pokenav_conditions.c +++ b/src/pokenav_conditions.c @@ -84,7 +84,7 @@ u32 GetConditionGraphMenuCallback(void) static u32 HandleConditionMenuInput(struct Pokenav_ConditionMenu *menu) { - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); u32 ret = ConditionGraphHandleDpadInput(menu); if (ret == CONDITION_FUNC_NONE) @@ -123,7 +123,7 @@ static u32 HandleConditionMenuInput(struct Pokenav_ConditionMenu *menu) static u32 OpenMarkingsMenu(struct Pokenav_ConditionMenu *menu) { - struct PokenavSub18 *monListPtr; + struct PokenavMonList *monListPtr; u8 markings; u32 ret = CONDITION_FUNC_NONE, boxId, monId; @@ -166,7 +166,7 @@ void FreeConditionGraphMenuSubstruct1(void) static u8 ConditionGraphHandleDpadInput(struct Pokenav_ConditionMenu *menu) { - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); u8 ret = CONDITION_FUNC_NONE; if (JOY_HELD(DPAD_UP)) @@ -196,7 +196,7 @@ static u8 SwitchConditionSummaryIndex(u8 moveUp) u16 newLoadId; bool8 wasNotLastMon, isNotLastMon; struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); newLoadId = (moveUp) ? menu->nextLoadIdUp : menu->nextLoadIdDown; ConditionGraph_SetNewPositions(&menu->graph, menu->graph.savedPositions[menu->loadId], menu->graph.savedPositions[newLoadId]); @@ -236,7 +236,7 @@ bool32 LoadConditionGraphMenuGfx(void) { s32 var; struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); switch (menu->state) { @@ -337,7 +337,7 @@ static u8 *CopyConditionMonNameGender(u8 *str, u16 listId, bool8 arg3) u16 boxId, monId, gender, species, level, lvlDigits; struct BoxPokemon *boxMon; u8 *txtPtr, *str_; - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); boxId = monListPtr->monData[listId].boxId; monId = monListPtr->monData[listId].monId; @@ -427,7 +427,7 @@ static void CopyMonNameGenderLocation(s16 listId, u8 loadId) { u16 boxId, i; struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); if (listId != (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1)) { @@ -459,7 +459,7 @@ static void InitPartyConditionListParameters(void) { u16 i, count; struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); - struct PokenavSub18 *monListPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18)); + struct PokenavMonList *monListPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavMonList)); menu->inSearchMode = FALSE; for (i = 0, count = 0; i < CalculatePlayerPartyCount(); i++) @@ -492,7 +492,7 @@ static void GetMonConditionGraphData(s16 listId, u8 loadId) { u16 boxId, monId, i; struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); if (listId != (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1)) { @@ -524,7 +524,7 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId) u16 boxId, monId, species; u32 personality, tid; struct Pokenav_ConditionMenu *menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH_MENU); - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); if (listId == (IsConditionMenuSearchMode() ? monListPtr->listCount : monListPtr->listCount - 1)) return; @@ -540,13 +540,13 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId) u16 GetMonListCount(void) { - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); return monListPtr->listCount; } u16 GetConditionGraphCurrentListIndex(void) { - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); return monListPtr->currIndex; } @@ -600,7 +600,7 @@ u8 *GetConditionMonLocationText(u8 loadId) u16 GetConditionMonDataBuffer(void) { - struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); + struct PokenavMonList *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST); return monListPtr->monData[monListPtr->currIndex].data; } diff --git a/src/pokenav_conditions_search_results.c b/src/pokenav_conditions_search_results.c index 770d0d01ab..2151fdc42b 100644 --- a/src/pokenav_conditions_search_results.c +++ b/src/pokenav_conditions_search_results.c @@ -31,7 +31,7 @@ struct Pokenav_SearchResults u32 conditionDataId; bool32 returnFromGraph; bool32 saveResultsList; - struct PokenavSub18 *monList; + struct PokenavMonList *monList; }; struct Pokenav_SearchResultsGfx @@ -58,13 +58,13 @@ static u32 LoopedTask_MoveSearchListPageUp(s32); static u32 LoopedTask_MoveSearchListPageDown(s32); static u32 LoopedTask_ExitConditionSearchMenu(s32); static u32 LoopedTask_SelectSearchResult(s32); -static void InsertMonListItem(struct Pokenav_SearchResults *, struct PokenavMonList *); +static void InsertMonListItem(struct Pokenav_SearchResults *, struct PokenavMonListItem *); static bool32 GetSearchResultCurrentLoopedTaskActive(void); static u32 LoopedTask_OpenConditionSearchResults(s32); static void AddSearchResultListMenuWindow(struct Pokenav_SearchResultsGfx *); static void PrintSearchResultListMenuItems(struct Pokenav_SearchResultsGfx *); static void InitConditionSearchListMenuTemplate(void); -static void PrintSearchMonListItem(struct PokenavMonList *, u8 *); +static void BufferSearchMonListItem(struct PokenavMonListItem *, u8 *); static const u32 sSearchMonDataIds[] = {MON_DATA_COOL, MON_DATA_BEAUTY, MON_DATA_CUTE, MON_DATA_SMART, MON_DATA_TOUGH}; @@ -134,7 +134,7 @@ bool32 PokenavCallback_Init_ConditionSearch(void) if (menu == NULL) return FALSE; - menu->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18)); + menu->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavMonList)); if (menu->monList == NULL) return FALSE; @@ -225,7 +225,7 @@ static u32 GetReturningFromGraph(void) return menu->returnFromGraph; } -static struct PokenavMonList * GetSearchResultsMonDataList(void) +static struct PokenavMonListItem * GetSearchResultsMonDataList(void) { struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); return menu->monList->monData; @@ -259,7 +259,7 @@ static u32 GetConditionSearchLoopedTask(s32 state) static u32 BuildPartyMonSearchResults(s32 state) { s32 i; - struct PokenavMonList item; + struct PokenavMonListItem item; struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); menu->monList->listCount = 0; @@ -295,7 +295,7 @@ static u32 BuildBoxMonSearchResults(s32 state) s32 boxId = menu->boxId; s32 monId = menu->monId; s32 boxCount = 0; - struct PokenavMonList item; + struct PokenavMonListItem item; while (boxId < TOTAL_BOXES_COUNT) { @@ -351,7 +351,7 @@ static u32 ConvertConditionsToListRanks(s32 state) return LT_FINISH; } -static void InsertMonListItem(struct Pokenav_SearchResults *menu, struct PokenavMonList *item) +static void InsertMonListItem(struct Pokenav_SearchResults *menu, struct PokenavMonListItem *item) { u32 left = 0; u32 right = menu->monList->listCount; @@ -682,12 +682,12 @@ static void InitConditionSearchListMenuTemplate(void) template.maxShowed = 8; template.fillValue = 2; template.fontId = FONT_NORMAL; - template.listFunc.printMonFunc = PrintSearchMonListItem; + template.listFunc.bufferMonItemFunc = BufferSearchMonListItem; template.unk14 = NULL; sub_81C81D4(&sConditionSearchResultBgTemplates[1], &template, 0); } -static void PrintSearchMonListItem(struct PokenavMonList * item, u8 * dest) +static void BufferSearchMonListItem(struct PokenavMonListItem * item, u8 * dest) { u8 gender; u8 level; diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index 63b8fcbf53..65698c344e 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -25,7 +25,7 @@ struct Pokenav3Struct u32 unk10; u32 unk14; u32 (*callback)(struct Pokenav3Struct*); - struct PokenavMatchCallEntries matchCallEntries[MAX_REMATCH_ENTRIES - 1]; + struct PokenavMatchCallEntry matchCallEntries[MAX_REMATCH_ENTRIES - 1]; }; static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *); @@ -298,7 +298,7 @@ int unref_sub_81CAE6C(int arg0) return state->matchCallEntries[arg0].headerId; } -struct PokenavMatchCallEntries *sub_81CAE94(void) +struct PokenavMatchCallEntry *sub_81CAE94(void) { struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); return state->matchCallEntries; @@ -394,7 +394,7 @@ u16 GetMatchCallOptionId(int optionId) return state->matchCallOptions[optionId]; } -void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntries *matchCallEntry, u8 *str) +void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntry *matchCallEntry, u8 *str) { const u8 *trainerName; const u8 *className; diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index e91257d14a..ae900c61d2 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -880,7 +880,7 @@ static void InitMatchCallPokenavListMenuTemplate(void) template.maxShowed = 8; template.fillValue = 3; template.fontId = FONT_NARROW; - template.listFunc.unk10_2 = BufferMatchCallNameAndDesc; + template.listFunc.bufferMatchCallItemFunc = BufferMatchCallNameAndDesc; template.unk14 = TryDrawRematchPokeballIcon; sub_81C81D4(&sMatchCallBgTemplates[2], &template, 2); CreateTask(Task_FlashPokeballIcons, 7); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 83720f4cf4..2cf6bf24e2 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -49,7 +49,7 @@ struct PokenavSub17Substruct u32 loopedTaskId; s32 unk2C; u32 unk30; - void (*unk34)(struct PokenavMatchCallEntries *, u8*); + void (*unk34)(struct PokenavMatchCallEntry *, u8*); void (*unk38)(u16, u32, u32); struct Sprite *rightArrow; struct Sprite *upArrow; @@ -57,7 +57,6 @@ struct PokenavSub17Substruct u8 unkTextBuffer[0x40]; }; -// Generally at index 0x11 (17) struct PokenavSub17 { struct PokenavSub17Substruct list; @@ -68,7 +67,7 @@ struct PokenavSub17 }; void sub_81C82E4(struct PokenavSub17 *matchCall); -bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3); +static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3); void InitMatchCallWindowState(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1); void SpriteCB_MatchCallUpArrow(struct Sprite *sprite); void SpriteCB_MatchCallDownArrow(struct Sprite *sprite); @@ -963,13 +962,13 @@ void InitMatchCallWindowState(struct MatchCallWindowState *dst, struct PokenavLi } } -bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 a3) +static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 a3) { struct WindowTemplate window; dest->listWindow.bg = bgTemplate->bg; dest->listWindow.unk6 = a3; - dest->unk34 = template->listFunc.unk10_2; + dest->unk34 = template->listFunc.bufferMatchCallItemFunc; dest->unk38 = template->unk14; dest->listWindow.unk1 = template->fillValue; dest->listWindow.unk2 = template->item_X; diff --git a/src/pokenav_ribbons_list.c b/src/pokenav_ribbons_list.c index 9f4ea5d4ad..c07460beef 100644 --- a/src/pokenav_ribbons_list.c +++ b/src/pokenav_ribbons_list.c @@ -29,7 +29,7 @@ struct Pokenav_RibbonsMonList s32 monId; u32 changeBgs; u32 saveMonList; - struct PokenavSub18 *monList; + struct PokenavMonList *monList; }; struct Pokenav_RibbonsMonMenu @@ -49,7 +49,7 @@ static u32 BuildPartyMonRibbonList(s32); static u32 InitBoxMonRibbonList(s32); static u32 BuildBoxMonRibbonList(s32); static u32 GetMonRibbonListLoopTaskFunc(s32); -static void InsertMonListItem(struct Pokenav_RibbonsMonList *, struct PokenavMonList *); +static void InsertMonListItem(struct Pokenav_RibbonsMonList *, struct PokenavMonListItem *); static u32 LoopedTask_OpenRibbonsMonList(s32); static bool32 GetRibbonsMonCurrentLoopedTaskActive(void); static u32 LoopedTask_RibbonsListMoveCursorUp(s32); @@ -62,7 +62,7 @@ static void DrawListIndexNumber(s32, s32, s32); static void AddRibbonsMonListWindow(struct Pokenav_RibbonsMonMenu *); static void UpdateIndexNumberDisplay(struct Pokenav_RibbonsMonMenu *); static void InitMonRibbonPokenavListMenuTemplate(void); -static void BufferRibbonMonInfoText(struct PokenavMonList *, u8 *); +static void BufferRibbonMonInfoText(struct PokenavMonListItem *, u8 *); static const LoopedTask sMonRibbonListLoopTaskFuncs[] = { @@ -129,7 +129,7 @@ bool32 PokenavCallback_Init_MonRibbonList(void) if (list == NULL) return FALSE; - list->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18)); + list->monList = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavMonList)); if (list->monList == NULL) return FALSE; @@ -214,7 +214,7 @@ static u32 UpdateMonListBgs(void) return list->changeBgs; } -static struct PokenavMonList *GetMonRibbonMonListData(void) +static struct PokenavMonListItem *GetMonRibbonMonListData(void) { struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); return list->monList->monData; @@ -248,7 +248,7 @@ static u32 GetMonRibbonListLoopTaskFunc(s32 state) static u32 BuildPartyMonRibbonList(s32 state) { s32 i; - struct PokenavMonList item; + struct PokenavMonListItem item; struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); list->monList->listCount = 0; @@ -288,7 +288,7 @@ static u32 BuildBoxMonRibbonList(s32 state) s32 boxId = list->boxId; s32 monId = list->monId; s32 boxCount = 0; - struct PokenavMonList item; + struct PokenavMonListItem item; while (boxId < TOTAL_BOXES_COUNT) { @@ -322,7 +322,7 @@ static u32 BuildBoxMonRibbonList(s32 state) return LT_FINISH; } -static void InsertMonListItem(struct Pokenav_RibbonsMonList *list, struct PokenavMonList *item) +static void InsertMonListItem(struct Pokenav_RibbonsMonList *list, struct PokenavMonListItem *item) { u32 left = 0; u32 right = list->monList->listCount; @@ -690,19 +690,19 @@ static void InitMonRibbonPokenavListMenuTemplate(void) template.maxShowed = 8; template.fillValue = 2; template.fontId = FONT_NORMAL; - template.listFunc.printMonFunc = BufferRibbonMonInfoText; + template.listFunc.bufferMonItemFunc = BufferRibbonMonInfoText; template.unk14 = NULL; sub_81C81D4(&sMonRibbonListBgTemplates[1], &template, 0); } // Buffers the "Nickname gender/level" text for the ribbon mon list -static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest) +static void BufferRibbonMonInfoText(struct PokenavMonListItem * item0, u8 * dest) { u8 gender; u8 level; u8 * s; const u8 * genderStr; - struct PokenavMonList * item = item0; + struct PokenavMonListItem * item = item0; // Mon is in party if (item->boxId == TOTAL_BOXES_COUNT) diff --git a/src/pokenav_ribbons_summary.c b/src/pokenav_ribbons_summary.c index c12f78ef50..81d5b900bd 100644 --- a/src/pokenav_ribbons_summary.c +++ b/src/pokenav_ribbons_summary.c @@ -42,7 +42,7 @@ enum struct Pokenav_RibbonsSummaryList { u8 unused1[8]; - struct PokenavSub18 *monList; + struct PokenavMonList *monList; u16 selectedPos; u16 normalRibbonLastRowStart; u16 numNormalRibbons; @@ -378,8 +378,8 @@ static u32 GetRibbonsSummaryMonListCount(void) static void GetMonNicknameLevelGender(u8 *nick, u8 *level, u8 *gender) { struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - struct PokenavSub18 *mons = list->monList; - struct PokenavMonList *monInfo = &mons->monData[mons->currIndex]; + struct PokenavMonList *mons = list->monList; + struct PokenavMonListItem *monInfo = &mons->monData[mons->currIndex]; if (monInfo->boxId == TOTAL_BOXES_COUNT) { @@ -403,8 +403,8 @@ static void GetMonNicknameLevelGender(u8 *nick, u8 *level, u8 *gender) static void GetMonSpeciesPersonalityOtId(u16 *species, u32 *personality, u32 *otId) { struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - struct PokenavSub18 *mons = list->monList; - struct PokenavMonList *monInfo = &mons->monData[mons->currIndex]; + struct PokenavMonList *mons = list->monList; + struct PokenavMonListItem *monInfo = &mons->monData[mons->currIndex]; if (monInfo->boxId == TOTAL_BOXES_COUNT) { @@ -427,8 +427,8 @@ static void GetMonSpeciesPersonalityOtId(u16 *species, u32 *personality, u32 *ot static u32 GetCurrMonRibbonCount(void) { struct Pokenav_RibbonsSummaryList *list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_LIST); - struct PokenavSub18 *mons = list->monList; - struct PokenavMonList *monInfo = &mons->monData[mons->currIndex]; + struct PokenavMonList *mons = list->monList; + struct PokenavMonListItem *monInfo = &mons->monData[mons->currIndex]; if (monInfo->boxId == TOTAL_BOXES_COUNT) return GetMonData(&gPlayerParty[monInfo->monId], MON_DATA_RIBBON_COUNT); @@ -440,8 +440,8 @@ static void GetMonRibbons(struct Pokenav_RibbonsSummaryList *list) { u32 ribbonFlags; s32 i, j; - struct PokenavSub18 *mons = list->monList; - struct PokenavMonList *monInfo = &mons->monData[mons->currIndex]; + struct PokenavMonList *mons = list->monList; + struct PokenavMonListItem *monInfo = &mons->monData[mons->currIndex]; if (monInfo->boxId == TOTAL_BOXES_COUNT) ribbonFlags = GetMonData(&gPlayerParty[monInfo->monId], MON_DATA_RIBBONS); diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index ef5fdfaf5e..312e2107e8 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -73,7 +73,7 @@ struct UsePokeblockSession u8 natureText[34]; }; -// This struct is identical to PokenavMonList, the struct used for managing lists of pokemon in the pokenav +// This struct is identical to PokenavMonListItem, the struct used for managing lists of pokemon in the pokenav // Given that this screen is essentially duplicated in the poknav, this struct was probably the same one with // a more general name/purpose // TODO: Once the pokenav conditions screens are documented, resolve the above From ec051575683a781d912ded5837936f409057539e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 13 Nov 2021 11:27:11 -0500 Subject: [PATCH 173/417] Move pokenav list item union out of list struct --- include/pokenav.h | 19 +++++++++++-------- src/pokenav_conditions_search_results.c | 4 ++-- src/pokenav_match_call_2.c | 4 ++-- src/pokenav_match_call_ui.c | 6 +++--- src/pokenav_ribbons_list.c | 4 ++-- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/include/pokenav.h b/include/pokenav.h index 254f9c7f7b..68c33bf7c8 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -6,6 +6,7 @@ #include "pokemon_storage_system.h" typedef u32 (*LoopedTask)(s32 state); +typedef void (*PokenavListItemBufferFunc)(struct PokenavListItem *, u8 *); struct PokenavMonListItem { @@ -21,12 +22,17 @@ struct PokenavMatchCallEntry u16 headerId; }; -struct PokenavListTemplate +struct PokenavListItem { union { - struct PokenavMonListItem *monList; - struct PokenavMatchCallEntry *matchCallEntries; - } list; + struct PokenavMonListItem mon; + struct PokenavMatchCallEntry call; + } item; +}; + +struct PokenavListTemplate +{ + struct PokenavListItem * list; u16 count; u16 unk6; u8 unk8; @@ -36,10 +42,7 @@ struct PokenavListTemplate u8 maxShowed; u8 fillValue; u8 fontId; - union { - void (*bufferMonItemFunc)(struct PokenavMonListItem *, u8 *); - void (*bufferMatchCallItemFunc)(struct PokenavMatchCallEntry *, u8 *); - } listFunc; + PokenavListItemBufferFunc bufferItemFunc; void (*unk14)(u16 a0, u32 a1, u32 a2); }; diff --git a/src/pokenav_conditions_search_results.c b/src/pokenav_conditions_search_results.c index 2151fdc42b..c58b22ecf7 100644 --- a/src/pokenav_conditions_search_results.c +++ b/src/pokenav_conditions_search_results.c @@ -672,7 +672,7 @@ static void InitConditionSearchListMenuTemplate(void) { struct PokenavListTemplate template; - template.list.monList = GetSearchResultsMonDataList(); + template.list = (struct PokenavListItem *)GetSearchResultsMonDataList(); template.count = GetSearchResultsMonListCount(); template.unk8 = 4; template.unk6 = GetSearchResultsCurrentListIndex(); @@ -682,7 +682,7 @@ static void InitConditionSearchListMenuTemplate(void) template.maxShowed = 8; template.fillValue = 2; template.fontId = FONT_NORMAL; - template.listFunc.bufferMonItemFunc = BufferSearchMonListItem; + template.bufferItemFunc = (PokenavListItemBufferFunc)BufferSearchMonListItem; template.unk14 = NULL; sub_81C81D4(&sConditionSearchResultBgTemplates[1], &template, 0); } diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index ae900c61d2..5f57925044 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -870,7 +870,7 @@ static u32 ExitMatchCall(s32 state) static void InitMatchCallPokenavListMenuTemplate(void) { struct PokenavListTemplate template; - template.list.matchCallEntries = sub_81CAE94(); + template.list = (struct PokenavListItem *)sub_81CAE94(); template.count = GetNumberRegistered(); template.unk8 = 4; template.unk6 = 0; @@ -880,7 +880,7 @@ static void InitMatchCallPokenavListMenuTemplate(void) template.maxShowed = 8; template.fillValue = 3; template.fontId = FONT_NARROW; - template.listFunc.bufferMatchCallItemFunc = BufferMatchCallNameAndDesc; + template.bufferItemFunc = (PokenavListItemBufferFunc)BufferMatchCallNameAndDesc; template.unk14 = TryDrawRematchPokeballIcon; sub_81C81D4(&sMatchCallBgTemplates[2], &template, 2); CreateTask(Task_FlashPokeballIcons, 7); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 2cf6bf24e2..8392b613cd 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -49,7 +49,7 @@ struct PokenavSub17Substruct u32 loopedTaskId; s32 unk2C; u32 unk30; - void (*unk34)(struct PokenavMatchCallEntry *, u8*); + PokenavListItemBufferFunc unk34; void (*unk38)(u16, u32, u32); struct Sprite *rightArrow; struct Sprite *upArrow; @@ -936,7 +936,7 @@ void ToggleMatchCallVerticalArrows(bool32 shouldHide) void InitMatchCallWindowState(struct MatchCallWindowState *dst, struct PokenavListTemplate *template) { - dst->unk10 = template->list.matchCallEntries; + dst->unk10 = template->list; dst->windowTopIndex = template->unk6; dst->listLength = template->count; dst->unkC = template->unk8; @@ -968,7 +968,7 @@ static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, co dest->listWindow.bg = bgTemplate->bg; dest->listWindow.unk6 = a3; - dest->unk34 = template->listFunc.bufferMatchCallItemFunc; + dest->unk34 = template->bufferItemFunc; dest->unk38 = template->unk14; dest->listWindow.unk1 = template->fillValue; dest->listWindow.unk2 = template->item_X; diff --git a/src/pokenav_ribbons_list.c b/src/pokenav_ribbons_list.c index c07460beef..4233819a38 100644 --- a/src/pokenav_ribbons_list.c +++ b/src/pokenav_ribbons_list.c @@ -680,7 +680,7 @@ static void DrawListIndexNumber(s32 windowId, s32 index, s32 max) static void InitMonRibbonPokenavListMenuTemplate(void) { struct PokenavListTemplate template; - template.list.monList = GetMonRibbonMonListData(); + template.list = (struct PokenavListItem *)GetMonRibbonMonListData(); template.count = GetRibbonsMonListCount(); template.unk8 = 4; template.unk6 = GetRibbonListMenuCurrIndex(); @@ -690,7 +690,7 @@ static void InitMonRibbonPokenavListMenuTemplate(void) template.maxShowed = 8; template.fillValue = 2; template.fontId = FONT_NORMAL; - template.listFunc.bufferMonItemFunc = BufferRibbonMonInfoText; + template.bufferItemFunc = (PokenavListItemBufferFunc)BufferRibbonMonInfoText; template.unk14 = NULL; sub_81C81D4(&sMonRibbonListBgTemplates[1], &template, 0); } From b3e593dff5cf8f062afe5b03bb38937f5c23f4ec Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 13 Nov 2021 12:52:41 -0500 Subject: [PATCH 174/417] Continue pokenav list ui doc --- include/pokenav.h | 35 +- src/match_call.c | 6 +- src/pokenav_conditions_search_results.c | 36 +- src/pokenav_match_call_1.c | 6 +- src/pokenav_match_call_2.c | 54 +- src/pokenav_match_call_ui.c | 642 ++++++++++++------------ src/pokenav_ribbons_list.c | 42 +- 7 files changed, 419 insertions(+), 402 deletions(-) diff --git a/include/pokenav.h b/include/pokenav.h index 68c33bf7c8..9c530e11ef 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -6,7 +6,6 @@ #include "pokemon_storage_system.h" typedef u32 (*LoopedTask)(s32 state); -typedef void (*PokenavListItemBufferFunc)(struct PokenavListItem *, u8 *); struct PokenavMonListItem { @@ -30,20 +29,22 @@ struct PokenavListItem } item; }; +typedef void (*PokenavListBufferItemFunc)(struct PokenavListItem *, u8 *); + struct PokenavListTemplate { struct PokenavListItem * list; u16 count; - u16 unk6; - u8 unk8; + u16 startIndex; + u8 itemSize; u8 item_X; u8 windowWidth; u8 listTop; u8 maxShowed; u8 fillValue; u8 fontId; - PokenavListItemBufferFunc bufferItemFunc; - void (*unk14)(u16 a0, u32 a1, u32 a2); + PokenavListBufferItemFunc bufferItemFunc; + void (*iconDrawFunc)(u16 windowId, u32 listItemId, u32 baseTile); }; struct PokenavMonList @@ -87,7 +88,7 @@ enum POKENAV_SUBSTRUCT_RIBBONS_SUMMARY_MENU, POKENAV_SUBSTRUCT_UNUSED, POKENAV_SUBSTRUCT_REGION_MAP, - POKENAV_SUBSTRUCT_MATCH_CALL_LIST, + POKENAV_SUBSTRUCT_LIST, POKENAV_SUBSTRUCT_MON_LIST, POKENAV_SUBSTRUCT_COUNT, }; @@ -323,22 +324,22 @@ void SetPokenavVBlankCallback(void); void SetVBlankCallback_(IntrCallback callback); // pokenav_match_call_ui.c +bool32 CreatePokenavList(const struct BgTemplate *bgTemplate, struct PokenavListTemplate *listTemplate, s32 tileOffset); +bool32 IsCreatePokenavListTaskActive(void); +void DestroyPokenavList(void); u32 GetSelectedPokenavListIndex(void); -bool32 sub_81C8224(void); -int MatchCall_MoveCursorUp(void); -int MatchCall_MoveCursorDown(void); -int MatchCall_PageDown(void); -int MatchCall_PageUp(void); -bool32 IsMonListLoopedTaskActive(void); -void ToggleMatchCallVerticalArrows(bool32 shouldHide); -void sub_81C8838(void); +int PokenavList_MoveCursorUp(void); +int PokenavList_MoveCursorDown(void); +int PokenavList_PageDown(void); +int PokenavList_PageUp(void); +bool32 IsMovePokenavListWindowTaskActive(void); +void PokenavList_ToggleVerticalArrows(bool32 shouldHide); +void PokenavList_DrawCurrentItemIcon(void); void sub_81C877C(void); bool32 IsMatchCallListTaskActive(void); void PrintCheckPageInfo(s16 a0); u32 GetMatchCallListTopIndex(void); void sub_81C87F0(void); -bool32 sub_81C81D4(const struct BgTemplate *arg0, struct PokenavListTemplate *arg1, s32 arg2); -void sub_81C8234(void); // pokenav_match_call_data.c bool32 MatchCall_HasCheckPage(u32 idx); @@ -415,7 +416,7 @@ bool32 ShouldDrawRematchPokeballIcon(int index); void ClearRematchPokeballIcon(u16 windowId, u32 a1); int GetMatchCallTrainerPic(int index); const u8 *GetMatchCallFlavorText(int index, int textType); -const u8 *GetMatchCallMessageText(int index, u8 *arg1); +const u8 *GetMatchCallMessageText(int index, bool8 *newRematchRequest); u16 GetMatchCallOptionCursorPos(void); u16 GetMatchCallOptionId(int arg0); void BufferMatchCallNameAndDesc(struct PokenavMatchCallEntry * arg0, u8 *str); diff --git a/src/match_call.c b/src/match_call.c index 0595ad3e33..85df5822d2 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1499,7 +1499,7 @@ bool32 SelectMatchCallMessage(int trainerId, u8 *str) { u32 matchCallId; const struct MatchCallText *matchCallText; - bool32 retVal = FALSE; + bool32 newRematchRequest = FALSE; matchCallId = GetTrainerMatchCallId(trainerId); sBattleFrontierStreakInfo.facilityId = 0; @@ -1517,7 +1517,7 @@ bool32 SelectMatchCallMessage(int trainerId, u8 *str) else if (ShouldTrainerRequestBattle(matchCallId)) { matchCallText = GetDifferentRouteMatchCallText(matchCallId, str); - retVal = TRUE; + newRematchRequest = TRUE; UpdateRematchIfDefeated(matchCallId); } else if (Random() % 3) @@ -1532,7 +1532,7 @@ bool32 SelectMatchCallMessage(int trainerId, u8 *str) } BuildMatchCallString(matchCallId, matchCallText, str); - return retVal; + return newRematchRequest; } static int GetTrainerMatchCallId(int trainerId) diff --git a/src/pokenav_conditions_search_results.c b/src/pokenav_conditions_search_results.c index c58b22ecf7..09bb7c9ac5 100644 --- a/src/pokenav_conditions_search_results.c +++ b/src/pokenav_conditions_search_results.c @@ -63,7 +63,7 @@ static bool32 GetSearchResultCurrentLoopedTaskActive(void); static u32 LoopedTask_OpenConditionSearchResults(s32); static void AddSearchResultListMenuWindow(struct Pokenav_SearchResultsGfx *); static void PrintSearchResultListMenuItems(struct Pokenav_SearchResultsGfx *); -static void InitConditionSearchListMenuTemplate(void); +static void CreateSearchResultsList(void); static void BufferSearchMonListItem(struct PokenavMonListItem *, u8 *); static const u32 sSearchMonDataIds[] = {MON_DATA_COOL, MON_DATA_BEAUTY, MON_DATA_CUTE, MON_DATA_SMART, MON_DATA_TOUGH}; @@ -415,7 +415,7 @@ bool32 GetSearchResultCurrentLoopedTaskActive(void) void FreeSearchResultSubstruct2(void) { struct Pokenav_SearchResultsGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); - sub_81C8234(); + DestroyPokenavList(); RemoveWindow(gfx->winid); FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS_GFX); } @@ -444,10 +444,10 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state) if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; CopyPaletteIntoBufferUnfaded(sListBg_Pal, 0x20, 32); - InitConditionSearchListMenuTemplate(); + CreateSearchResultsList(); return LT_INC_AND_PAUSE; case 3: - if (sub_81C8224()) + if (IsCreatePokenavListTaskActive()) return LT_PAUSE; AddSearchResultListMenuWindow(gfx); PrintHelpBarText(HELPBAR_CONDITION_MON_LIST); @@ -485,7 +485,7 @@ static u32 LoopedTask_MoveSearchListCursorUp(s32 state) switch (state) { case 0: - switch (MatchCall_MoveCursorUp()) + switch (PokenavList_MoveCursorUp()) { case 0: return LT_FINISH; @@ -498,7 +498,7 @@ static u32 LoopedTask_MoveSearchListCursorUp(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -518,7 +518,7 @@ static u32 LoopedTask_MoveSearchListCursorDown(s32 state) switch (state) { case 0: - switch (MatchCall_MoveCursorDown()) + switch (PokenavList_MoveCursorDown()) { case 0: return LT_FINISH; @@ -531,7 +531,7 @@ static u32 LoopedTask_MoveSearchListCursorDown(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -551,7 +551,7 @@ static u32 LoopedTask_MoveSearchListPageUp(s32 state) switch (state) { case 0: - switch (MatchCall_PageUp()) + switch (PokenavList_PageUp()) { case 0: return LT_FINISH; @@ -564,7 +564,7 @@ static u32 LoopedTask_MoveSearchListPageUp(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -584,7 +584,7 @@ static u32 LoopedTask_MoveSearchListPageDown(s32 state) switch (state) { case 0: - switch (MatchCall_PageDown()) + switch (PokenavList_PageDown()) { case 0: return LT_FINISH; @@ -597,7 +597,7 @@ static u32 LoopedTask_MoveSearchListPageDown(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -668,23 +668,23 @@ static void PrintSearchResultListMenuItems(struct Pokenav_SearchResultsGfx *gfx) CopyWindowToVram(gfx->winid, COPYWIN_GFX); } -static void InitConditionSearchListMenuTemplate(void) +static void CreateSearchResultsList(void) { struct PokenavListTemplate template; template.list = (struct PokenavListItem *)GetSearchResultsMonDataList(); template.count = GetSearchResultsMonListCount(); - template.unk8 = 4; - template.unk6 = GetSearchResultsCurrentListIndex(); + template.itemSize = sizeof(struct PokenavListItem); + template.startIndex = GetSearchResultsCurrentListIndex(); template.item_X = 13; template.windowWidth = 17; template.listTop = 1; template.maxShowed = 8; template.fillValue = 2; template.fontId = FONT_NORMAL; - template.bufferItemFunc = (PokenavListItemBufferFunc)BufferSearchMonListItem; - template.unk14 = NULL; - sub_81C81D4(&sConditionSearchResultBgTemplates[1], &template, 0); + template.bufferItemFunc = (PokenavListBufferItemFunc)BufferSearchMonListItem; + template.iconDrawFunc = NULL; + CreatePokenavList(&sConditionSearchResultBgTemplates[1], &template, 0); } static void BufferSearchMonListItem(struct PokenavMonListItem * item, u8 * dest) diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index 65698c344e..b2b9179c36 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -346,15 +346,15 @@ int GetMatchCallTrainerPic(int index) return gFacilityClassToPicIndex[index]; } -const u8 *GetMatchCallMessageText(int index, u8 *arg1) +const u8 *GetMatchCallMessageText(int index, bool8 *newRematchRequest) { struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); - *arg1 = 0; + *newRematchRequest = FALSE; if (!Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType)) return gText_CallCantBeMadeHere; if (!state->matchCallEntries[index].isSpecialTrainer) - *arg1 = SelectMatchCallMessage(GetTrainerIdxByRematchIdx(state->matchCallEntries[index].headerId), gStringVar4); + *newRematchRequest = SelectMatchCallMessage(GetTrainerIdxByRematchIdx(state->matchCallEntries[index].headerId), gStringVar4); else MatchCall_GetMessage(state->matchCallEntries[index].headerId, gStringVar4); diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 5f57925044..420dac5f88 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -35,7 +35,7 @@ struct Pokenav_MatchCallGfx u32 loopTaskId; u8 filler8[6]; bool8 unkE; - u8 unkF; + bool8 newRematchRequest; u16 locWindowId; u16 infoBoxWindowId; u16 msgBoxWindowId; @@ -55,7 +55,7 @@ struct Pokenav_MatchCallGfx static bool32 GetCurrentLoopedTaskActive(void); static u32 LoopedTask_OpenMatchCall(s32); -static void InitMatchCallPokenavListMenuTemplate(void); +static void CreateMatchCallList(void); static void sub_81CBC1C(void); static void FreeMatchCallSprites(void); static void LoadCallWindowAndFade(struct Pokenav_MatchCallGfx *); @@ -359,10 +359,10 @@ static u32 LoopedTask_OpenMatchCall(s32 state) if (FreeTempTileDataBuffersIfPossible() || !sub_81CAE28()) return LT_PAUSE; - InitMatchCallPokenavListMenuTemplate(); + CreateMatchCallList(); return LT_INC_AND_PAUSE; case 4: - if (sub_81C8224()) + if (IsCreatePokenavListTaskActive()) return LT_PAUSE; DrawMatchCallLeftColumnWindows(gfx); @@ -399,7 +399,7 @@ static u32 MatchCallListCursorDown(s32 state) switch (state) { case 0: - switch (MatchCall_MoveCursorDown()) + switch (PokenavList_MoveCursorDown()) { case 0: break; @@ -414,7 +414,7 @@ static u32 MatchCallListCursorDown(s32 state) } break; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; PrintMatchCallLocation(gfx, 0); @@ -436,7 +436,7 @@ static u32 MatchCallListCursorUp(s32 state) switch (state) { case 0: - switch (MatchCall_MoveCursorUp()) + switch (PokenavList_MoveCursorUp()) { case 0: break; @@ -451,7 +451,7 @@ static u32 MatchCallListCursorUp(s32 state) } break; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; PrintMatchCallLocation(gfx, 0); @@ -473,7 +473,7 @@ static u32 MatchCallListPageDown(s32 state) switch (state) { case 0: - switch (MatchCall_PageDown()) + switch (PokenavList_PageDown()) { case 0: break; @@ -488,7 +488,7 @@ static u32 MatchCallListPageDown(s32 state) } break; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; PrintMatchCallLocation(gfx, 0); @@ -510,7 +510,7 @@ static u32 MatchCallListPageUp(s32 state) switch (state) { case 0: - switch (MatchCall_PageUp()) + switch (PokenavList_PageUp()) { case 0: break; @@ -525,7 +525,7 @@ static u32 MatchCallListPageUp(s32 state) } break; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; PrintMatchCallLocation(gfx, 0); @@ -597,7 +597,7 @@ static u32 DoMatchCallMessage(s32 state) switch (state) { case 0: - ToggleMatchCallVerticalArrows(TRUE); + PokenavList_ToggleVerticalArrows(TRUE); DrawMsgBoxForMatchCallMsg(gfx); return LT_INC_AND_PAUSE; case 1: @@ -631,7 +631,7 @@ static u32 DoTrainerCloseByMessage(s32 state) case 0: PlaySE(SE_SELECT); DrawMsgBoxForCloseByMsg(gfx); - ToggleMatchCallVerticalArrows(TRUE); + PokenavList_ToggleVerticalArrows(TRUE); gfx->unkE = 1; return LT_INC_AND_PAUSE; case 1: @@ -685,14 +685,16 @@ static u32 CloseMatchCallMessage(s32 state) } else { - if (gfx->unkF) + if (gfx->newRematchRequest) { - sub_81C8838(); + // This call was a new rematch request, + // add the Pokéball icon to their entry + PokenavList_DrawCurrentItemIcon(); result = LT_INC_AND_CONTINUE; } else { - ToggleMatchCallVerticalArrows(FALSE); + PokenavList_ToggleVerticalArrows(FALSE); result = LT_FINISH; } } @@ -704,7 +706,7 @@ static u32 CloseMatchCallMessage(s32 state) } else { - ToggleMatchCallVerticalArrows(FALSE); + PokenavList_ToggleVerticalArrows(FALSE); result = LT_FINISH; } break; @@ -867,28 +869,28 @@ static u32 ExitMatchCall(s32 state) return LT_FINISH; } -static void InitMatchCallPokenavListMenuTemplate(void) +static void CreateMatchCallList(void) { struct PokenavListTemplate template; template.list = (struct PokenavListItem *)sub_81CAE94(); template.count = GetNumberRegistered(); - template.unk8 = 4; - template.unk6 = 0; + template.itemSize = sizeof(struct PokenavListItem); + template.startIndex = 0; template.item_X = 13; template.windowWidth = 16; template.listTop = 1; template.maxShowed = 8; template.fillValue = 3; template.fontId = FONT_NARROW; - template.bufferItemFunc = (PokenavListItemBufferFunc)BufferMatchCallNameAndDesc; - template.unk14 = TryDrawRematchPokeballIcon; - sub_81C81D4(&sMatchCallBgTemplates[2], &template, 2); + template.bufferItemFunc = (PokenavListBufferItemFunc)BufferMatchCallNameAndDesc; + template.iconDrawFunc = TryDrawRematchPokeballIcon; + CreatePokenavList(&sMatchCallBgTemplates[2], &template, 2); CreateTask(Task_FlashPokeballIcons, 7); } static void sub_81CBC1C(void) { - sub_81C8234(); + DestroyPokenavList(); DestroyTask(FindTaskIdByFunc(Task_FlashPokeballIcons)); } @@ -1137,7 +1139,7 @@ static bool32 WaitForTrainerIsCloseByText(struct Pokenav_MatchCallGfx *gfx) static void PrintMatchCallMessage(struct Pokenav_MatchCallGfx *gfx) { int index = GetSelectedPokenavListIndex(); - const u8 *str = GetMatchCallMessageText(index, &gfx->unkF); + const u8 *str = GetMatchCallMessageText(index, &gfx->newRematchRequest); u8 speed = GetPlayerTextSpeedDelay(); AddTextPrinterParameterized(gfx->msgBoxWindowId, FONT_NORMAL, str, 32, 1, speed, NULL); } diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 8392b613cd..70e541b55b 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -8,23 +8,24 @@ #include "decompress.h" #include "international_string_util.h" -// TODO: This UI isnt just for match call, seems to be the general pokenav list UI +#define GFXTAG_ARROW 10 +#define PALTAG_ARROW 20 struct PokenavListMenuWindow { u8 bg; - u8 unk1; - u8 unk2; - u8 unk3; - u8 unk4; + u8 fillValue; + u8 x; + u8 y; + u8 width; u8 fontId; - u16 unk6; + u16 tileOffset; u16 windowId; u16 unkA; - u16 unkC; - u16 unkE; + u16 numPrinted; + u16 numToPrint; }; -struct MatchCallWindowState { +struct PokenavListWindowState { // The index of the element at the top of the window. u16 windowTopIndex; u16 listLength; @@ -33,203 +34,203 @@ struct MatchCallWindowState { u16 selectedIndexOffset; u16 visibleEntries; u16 unkA; - u32 unkC; - void * unk10; + u32 listItemSize; + void * listPtr; }; struct PokenavSub17Substruct { struct PokenavListMenuWindow listWindow; u32 unk10; - u32 unk14; - u32 unk18; - void * unk1C; - s32 unk20; - s32 unk24; + u32 printIndex; + u32 itemSize; + void * listPtr; + s32 startBgY; + s32 endBgY; u32 loopedTaskId; - s32 unk2C; - u32 unk30; - PokenavListItemBufferFunc unk34; - void (*unk38)(u16, u32, u32); + s32 moveDelta; + u32 bgMoveType; + PokenavListBufferItemFunc bufferItemFunc; + void (*iconDrawFunc)(u16, u32, u32); struct Sprite *rightArrow; struct Sprite *upArrow; struct Sprite *downArrow; - u8 unkTextBuffer[0x40]; + u8 itemTextBuffer[64]; }; struct PokenavSub17 { struct PokenavSub17Substruct list; - u8 tilemapBuffer[0x800]; - struct MatchCallWindowState unk888; + u8 tilemapBuffer[BG_SCREEN_SIZE]; + struct PokenavListWindowState windowState; s32 unk89C; u32 loopedTaskId; }; -void sub_81C82E4(struct PokenavSub17 *matchCall); -static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *a0, const struct BgTemplate *a1, struct PokenavListTemplate *a2, s32 a3); -void InitMatchCallWindowState(struct MatchCallWindowState *a0, struct PokenavListTemplate *a1); -void SpriteCB_MatchCallUpArrow(struct Sprite *sprite); -void SpriteCB_MatchCallDownArrow(struct Sprite *sprite); -void SpriteCB_MatchCallRightArrow(struct Sprite *sprite); -void ToggleMatchCallArrows(struct PokenavSub17Substruct *a0, u32 a1); -void DestroyMatchCallListArrows(struct PokenavSub17Substruct *a0); -void CreateMatchCallArrowSprites(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1); -void sub_81C8ED0(void); -static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1, u32 a2); -void PrintMatchCallFieldNames(struct PokenavSub17Substruct *a0, u32 a1); -void sub_81C8D4C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1); -void sub_81C8CB4(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1); -void sub_81C8B70(struct PokenavListMenuWindow *a0, s32 a1, s32 a2); -void sub_81C8568(s32 a0, struct PokenavSub17Substruct *a1); -void sub_81C83AC(void * a0, u32 a1, u32 a2, u32 a3, u32 a4, struct PokenavSub17Substruct *a5); -void sub_81C837C(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *a1); -void sub_81C835C(struct PokenavListMenuWindow *a0); -u32 LoopedTask_sub_81C8254(s32 state); -bool32 sub_81C83E0(void); -u32 LoopedTask_sub_81C83F0(s32 state); -u32 LoopedTask_sub_81C85A0(s32 state); -u32 LoopedTask_sub_81C8870(s32 state); -u32 LoopedTask_sub_81C8A28(s32 state); -u32 LoopedTask_PrintCheckPageInfo(s32 state); +static void InitPokenavListBg(struct PokenavSub17 *); +static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *, const struct BgTemplate *, struct PokenavListTemplate *, s32); +static void InitPokenavListWindowState(struct PokenavListWindowState *, struct PokenavListTemplate *); +static void SpriteCB_UpArrow(struct Sprite *); +static void SpriteCB_DownArrow(struct Sprite *); +static void SpriteCB_RightArrow(struct Sprite *); +static void ToggleListArrows(struct PokenavSub17Substruct *, u32); +static void DestroyListArrows(struct PokenavSub17Substruct *); +static void CreateListArrowSprites(struct PokenavListWindowState *, struct PokenavSub17Substruct *); +static void LoadListArrowGfx(void); +static void PrintMatchCallFlavorText(struct PokenavListWindowState *, struct PokenavSub17Substruct *, u32); +static void PrintMatchCallFieldNames(struct PokenavSub17Substruct *, u32); +static void PrintMatchCallListTrainerName(struct PokenavListWindowState *, struct PokenavSub17Substruct *); +static void PrintCheckPageTrainerName(struct PokenavListWindowState *, struct PokenavSub17Substruct *); +static void sub_81C8B70(struct PokenavListMenuWindow *, s32, s32); +static void CreateMoveListWindowTask(s32, struct PokenavSub17Substruct *); +static void PrintListItems(void *, u32, u32, u32, u32, struct PokenavSub17Substruct *); +static void InitListItems(struct PokenavListWindowState *, struct PokenavSub17Substruct *); +static void InitPokenavListWindow(struct PokenavListMenuWindow *); +static u32 LoopedTask_CreatePokenavList(s32); +static bool32 IsPrintListItemsTaskActive(void); +static u32 LoopedTask_PrintListItems(s32); +static u32 LoopedTask_MoveListWindow(s32); +static u32 LoopedTask_sub_81C8870(s32); +static u32 LoopedTask_sub_81C8A28(s32); +static u32 LoopedTask_PrintCheckPageInfo(s32); -static const u16 sMatchcallArrowPaletteData[] = INCBIN_U16("graphics/pokenav/list_arrows.gbapal"); -static const u32 sMatchcallArrowSpriteSheetData[] = INCBIN_U32("graphics/pokenav/list_arrows.4bpp.lz"); +static const u16 sListArrow_Pal[] = INCBIN_U16("graphics/pokenav/list_arrows.gbapal"); +static const u32 sListArrow_Gfx[] = INCBIN_U32("graphics/pokenav/list_arrows.4bpp.lz"); -EWRAM_DATA u32 gUnknown_0203CF44 = 0; +static EWRAM_DATA u32 gUnknown_0203CF44 = 0; -bool32 sub_81C81D4(const struct BgTemplate *arg0, struct PokenavListTemplate *arg1, s32 arg2) +bool32 CreatePokenavList(const struct BgTemplate *bgTemplate, struct PokenavListTemplate *listTemplate, s32 tileOffset) { - struct PokenavSub17 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_LIST, sizeof(struct PokenavSub17)); + struct PokenavSub17 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_LIST, sizeof(struct PokenavSub17)); if (structPtr == NULL) return FALSE; - InitMatchCallWindowState(&structPtr->unk888, arg1); - if (!CopyPokenavListMenuTemplate(&structPtr->list, arg0, arg1, arg2)) + InitPokenavListWindowState(&structPtr->windowState, listTemplate); + if (!CopyPokenavListMenuTemplate(&structPtr->list, bgTemplate, listTemplate, tileOffset)) return FALSE; - CreateLoopedTask(LoopedTask_sub_81C8254, 6); + CreateLoopedTask(LoopedTask_CreatePokenavList, 6); return TRUE; } -bool32 sub_81C8224(void) +bool32 IsCreatePokenavListTaskActive(void) { - return FuncIsActiveLoopedTask(LoopedTask_sub_81C8254); + return FuncIsActiveLoopedTask(LoopedTask_CreatePokenavList); } -void sub_81C8234(void) +void DestroyPokenavList(void) { - struct PokenavSub17 *structPtr; - - structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - DestroyMatchCallListArrows(&structPtr->list); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + DestroyListArrows(&structPtr->list); RemoveWindow(structPtr->list.listWindow.windowId); - FreePokenavSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + FreePokenavSubstruct(POKENAV_SUBSTRUCT_LIST); } -u32 LoopedTask_sub_81C8254(s32 state) +static u32 LoopedTask_CreatePokenavList(s32 state) { struct PokenavSub17 *structPtr; if (IsDma3ManagerBusyWithBgCopy()) return LT_PAUSE; - structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); switch (state) { case 0: - sub_81C82E4(structPtr); + InitPokenavListBg(structPtr); return LT_INC_AND_PAUSE; case 1: - sub_81C835C(&structPtr->list.listWindow); + InitPokenavListWindow(&structPtr->list.listWindow); return LT_INC_AND_PAUSE; case 2: - sub_81C837C(&structPtr->unk888, &structPtr->list); + InitListItems(&structPtr->windowState, &structPtr->list); return LT_INC_AND_PAUSE; case 3: - if (sub_81C83E0()) + if (IsPrintListItemsTaskActive()) { return LT_PAUSE; } else { - sub_81C8ED0(); + LoadListArrowGfx(); return LT_INC_AND_CONTINUE; } case 4: - CreateMatchCallArrowSprites(&structPtr->unk888, &structPtr->list); + CreateListArrowSprites(&structPtr->windowState, &structPtr->list); return LT_FINISH; default: return LT_FINISH; } } -void sub_81C82E4(struct PokenavSub17 *matchCall) +static void InitPokenavListBg(struct PokenavSub17 *a0) { - u16 tileNum = (matchCall->list.listWindow.unk1 << 12) | matchCall->list.listWindow.unk6; - BgDmaFill(matchCall->list.listWindow.bg, PIXEL_FILL(1), matchCall->list.listWindow.unk6, 1); - BgDmaFill(matchCall->list.listWindow.bg, PIXEL_FILL(4), matchCall->list.listWindow.unk6 + 1, 1); - SetBgTilemapBuffer(matchCall->list.listWindow.bg, matchCall->tilemapBuffer); - FillBgTilemapBufferRect_Palette0(matchCall->list.listWindow.bg, tileNum, 0, 0, 32, 32); - ChangeBgY(matchCall->list.listWindow.bg, 0, BG_COORD_SET); - ChangeBgX(matchCall->list.listWindow.bg, 0, BG_COORD_SET); - ChangeBgY(matchCall->list.listWindow.bg, matchCall->list.listWindow.unk3 << 11, BG_COORD_SUB); - CopyBgTilemapBufferToVram(matchCall->list.listWindow.bg); + u16 tileNum = (a0->list.listWindow.fillValue << 12) | a0->list.listWindow.tileOffset; + BgDmaFill(a0->list.listWindow.bg, PIXEL_FILL(1), a0->list.listWindow.tileOffset, 1); + BgDmaFill(a0->list.listWindow.bg, PIXEL_FILL(4), a0->list.listWindow.tileOffset + 1, 1); + SetBgTilemapBuffer(a0->list.listWindow.bg, a0->tilemapBuffer); + FillBgTilemapBufferRect_Palette0(a0->list.listWindow.bg, tileNum, 0, 0, 32, 32); + ChangeBgY(a0->list.listWindow.bg, 0, BG_COORD_SET); + ChangeBgX(a0->list.listWindow.bg, 0, BG_COORD_SET); + ChangeBgY(a0->list.listWindow.bg, a0->list.listWindow.y << 11, BG_COORD_SUB); + CopyBgTilemapBufferToVram(a0->list.listWindow.bg); } -void sub_81C835C(struct PokenavListMenuWindow *listWindow) +static void InitPokenavListWindow(struct PokenavListMenuWindow *listWindow) { FillWindowPixelBuffer(listWindow->windowId, PIXEL_FILL(1)); PutWindowTilemap(listWindow->windowId); CopyWindowToVram(listWindow->windowId, COPYWIN_MAP); } -void sub_81C837C(struct MatchCallWindowState *state, struct PokenavSub17Substruct *a1) +static void InitListItems(struct PokenavListWindowState *windowState, struct PokenavSub17Substruct *a1) { - s32 arg2 = state->listLength - state->windowTopIndex; - if (arg2 > state->visibleEntries) - arg2 = state->visibleEntries; + s32 numToPrint = windowState->listLength - windowState->windowTopIndex; + if (numToPrint > windowState->visibleEntries) + numToPrint = windowState->visibleEntries; - sub_81C83AC(state->unk10, state->windowTopIndex, arg2, state->unkC, 0, a1); + PrintListItems(windowState->listPtr, windowState->windowTopIndex, numToPrint, windowState->listItemSize, 0, a1); } -void sub_81C83AC(void * a0, u32 a1, u32 a2, u32 a3, u32 a4, struct PokenavSub17Substruct *list) +static void PrintListItems(void * listPtr, u32 topIndex, u32 numItems, u32 itemSize, u32 a4, struct PokenavSub17Substruct *list) { - if (a2 == 0) + if (numItems == 0) return; - list->unk1C = a0 + a1 * a3; - list->unk18 = a3; - list->listWindow.unkC = 0; - list->listWindow.unkE = a2; - list->unk14 = a1; + list->listPtr = listPtr + topIndex * itemSize; + list->itemSize = itemSize; + list->listWindow.numPrinted = 0; + list->listWindow.numToPrint = numItems; + list->printIndex = topIndex; list->unk10 = a4; - CreateLoopedTask(LoopedTask_sub_81C83F0, 5); + CreateLoopedTask(LoopedTask_PrintListItems, 5); } -bool32 sub_81C83E0(void) +static bool32 IsPrintListItemsTaskActive(void) { - return FuncIsActiveLoopedTask(LoopedTask_sub_81C83F0); + return FuncIsActiveLoopedTask(LoopedTask_PrintListItems); } -u32 LoopedTask_sub_81C83F0(s32 state) +static u32 LoopedTask_PrintListItems(s32 state) { u32 v1; - struct PokenavSub17Substruct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + struct PokenavSub17Substruct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); switch (state) { case 0: - v1 = (structPtr->listWindow.unkA + structPtr->listWindow.unkC + structPtr->unk10) & 0xF; - structPtr->unk34(structPtr->unk1C, structPtr->unkTextBuffer); - if (structPtr->unk38 != NULL) - structPtr->unk38(structPtr->listWindow.windowId, structPtr->unk14, v1); + v1 = (structPtr->listWindow.unkA + structPtr->listWindow.numPrinted + structPtr->unk10) & 0xF; + structPtr->bufferItemFunc(structPtr->listPtr, structPtr->itemTextBuffer); + if (structPtr->iconDrawFunc != NULL) + structPtr->iconDrawFunc(structPtr->listWindow.windowId, structPtr->printIndex, v1); - AddTextPrinterParameterized(structPtr->listWindow.windowId, structPtr->listWindow.fontId, structPtr->unkTextBuffer, 8, (v1 << 4) + 1, 255, NULL); - if (++structPtr->listWindow.unkC >= structPtr->listWindow.unkE) + AddTextPrinterParameterized(structPtr->listWindow.windowId, structPtr->listWindow.fontId, structPtr->itemTextBuffer, 8, (v1 << 4) + 1, 255, NULL); + if (++structPtr->listWindow.numPrinted >= structPtr->listWindow.numToPrint) { - if (structPtr->unk38 != NULL) + // Finished printing items. If icons were being drawn, draw the + // window tilemap and graphics. Otherwise just do the graphics + if (structPtr->iconDrawFunc != NULL) CopyWindowToVram(structPtr->listWindow.windowId, COPYWIN_FULL); else CopyWindowToVram(structPtr->listWindow.windowId, COPYWIN_GFX); @@ -237,8 +238,8 @@ u32 LoopedTask_sub_81C83F0(s32 state) } else { - structPtr->unk1C += structPtr->unk18; - structPtr->unk14++; + structPtr->listPtr += structPtr->itemSize; + structPtr->printIndex++; return LT_CONTINUE; } case 1: @@ -251,88 +252,88 @@ u32 LoopedTask_sub_81C83F0(s32 state) bool32 ShouldShowUpArrow(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); - return (structPtr->unk888.windowTopIndex != 0); + return (structPtr->windowState.windowTopIndex != 0); } bool32 ShouldShowDownArrow(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - struct MatchCallWindowState *subPtr = &structPtr->unk888; + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavListWindowState *subPtr = &structPtr->windowState; return (subPtr->windowTopIndex + subPtr->visibleEntries < subPtr->listLength); } -void MatchCall_MoveWindow(s32 a0, bool32 a1) +static void MoveListWindow(s32 delta, bool32 a1) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - struct MatchCallWindowState *subPtr = &structPtr->unk888; + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavListWindowState *subPtr = &structPtr->windowState; - if (a0 < 0) + if (delta < 0) { - if (subPtr->windowTopIndex + a0 < 0) - a0 = -1 * subPtr->windowTopIndex; + if (subPtr->windowTopIndex + delta < 0) + delta = -1 * subPtr->windowTopIndex; if (a1) - sub_81C83AC(subPtr->unk10, subPtr->windowTopIndex + a0, a0 * -1, subPtr->unkC, a0, &structPtr->list); + PrintListItems(subPtr->listPtr, subPtr->windowTopIndex + delta, delta * -1, subPtr->listItemSize, delta, &structPtr->list); } else if (a1) { s32 temp = gUnknown_0203CF44 = subPtr->windowTopIndex + subPtr->visibleEntries; - if (temp + a0 >= subPtr->listLength) - a0 = subPtr->listLength - temp; + if (temp + delta >= subPtr->listLength) + delta = subPtr->listLength - temp; - sub_81C83AC(subPtr->unk10, gUnknown_0203CF44, a0, subPtr->unkC, subPtr->visibleEntries, &structPtr->list); + PrintListItems(subPtr->listPtr, gUnknown_0203CF44, delta, subPtr->listItemSize, subPtr->visibleEntries, &structPtr->list); } - sub_81C8568(a0, &structPtr->list); - subPtr->windowTopIndex += a0; + CreateMoveListWindowTask(delta, &structPtr->list); + subPtr->windowTopIndex += delta; } -void sub_81C8568(s32 a0, struct PokenavSub17Substruct *list) +static void CreateMoveListWindowTask(s32 delta, struct PokenavSub17Substruct *list) { - list->unk20 = GetBgY(list->listWindow.bg); - list->unk24 = list->unk20 + (a0 << 12); - if (a0 > 0) - list->unk30 = BG_COORD_ADD; + list->startBgY = GetBgY(list->listWindow.bg); + list->endBgY = list->startBgY + (delta << 12); + if (delta > 0) + list->bgMoveType = BG_COORD_ADD; else - list->unk30 = BG_COORD_SUB; - list->unk2C = a0; - list->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C85A0, 6); + list->bgMoveType = BG_COORD_SUB; + list->moveDelta = delta; + list->loopedTaskId = CreateLoopedTask(LoopedTask_MoveListWindow, 6); } -u32 LoopedTask_sub_81C85A0(s32 state) +static u32 LoopedTask_MoveListWindow(s32 state) { - s32 y, v1; - bool32 flag; - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + s32 oldY, newY; + bool32 finished; + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); struct PokenavSub17Substruct *subPtr = &structPtr->list; switch (state) { case 0: - if (!sub_81C83E0()) + if (!IsPrintListItemsTaskActive()) return LT_INC_AND_CONTINUE; return LT_PAUSE; case 1: - flag = FALSE; - y = GetBgY(subPtr->listWindow.bg); - v1 = ChangeBgY(subPtr->listWindow.bg, 0x1000, subPtr->unk30); - if (subPtr->unk30 == BG_COORD_SUB) + finished = FALSE; + oldY = GetBgY(subPtr->listWindow.bg); + newY = ChangeBgY(subPtr->listWindow.bg, 0x1000, subPtr->bgMoveType); + if (subPtr->bgMoveType == BG_COORD_SUB) { - if ((y > subPtr->unk24 || y <= subPtr->unk20) && v1 <= subPtr->unk24) - flag = TRUE; + if ((oldY > subPtr->endBgY || oldY <= subPtr->startBgY) && newY <= subPtr->endBgY) + finished = TRUE; } else // BG_COORD_ADD { - if ((y < subPtr->unk24 || y >= subPtr->unk20) && v1 >= subPtr->unk24) - flag = TRUE; + if ((oldY < subPtr->endBgY || oldY >= subPtr->startBgY) && newY >= subPtr->endBgY) + finished = TRUE; } - if (flag) + if (finished) { - subPtr->listWindow.unkA = (subPtr->listWindow.unkA + subPtr->unk2C) & 0xF; - ChangeBgY(subPtr->listWindow.bg, subPtr->unk24, BG_COORD_SET); + subPtr->listWindow.unkA = (subPtr->listWindow.unkA + subPtr->moveDelta) & 0xF; + ChangeBgY(subPtr->listWindow.bg, subPtr->endBgY, BG_COORD_SET); return LT_FINISH; } return LT_PAUSE; @@ -340,21 +341,21 @@ u32 LoopedTask_sub_81C85A0(s32 state) return LT_FINISH; } -bool32 IsMonListLoopedTaskActive(void) +bool32 IsMovePokenavListWindowTaskActive(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return IsLoopedTaskActive(structPtr->list.loopedTaskId); } -struct MatchCallWindowState *GetMatchCallWindowStruct(void) +static struct PokenavListWindowState *GetPokenavListWindowState(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - return &structPtr->unk888; + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + return &structPtr->windowState; } -int MatchCall_MoveCursorUp(void) +int PokenavList_MoveCursorUp(void) { - struct MatchCallWindowState *structPtr = GetMatchCallWindowStruct(); + struct PokenavListWindowState *structPtr = GetPokenavListWindowState(); if (structPtr->selectedIndexOffset != 0) { @@ -363,15 +364,15 @@ int MatchCall_MoveCursorUp(void) } if (ShouldShowUpArrow()) { - MatchCall_MoveWindow(-1, TRUE); + MoveListWindow(-1, TRUE); return 2; } return 0; } -int MatchCall_MoveCursorDown(void) +int PokenavList_MoveCursorDown(void) { - struct MatchCallWindowState *structPtr = GetMatchCallWindowStruct(); + struct PokenavListWindowState *structPtr = GetPokenavListWindowState(); if (structPtr->windowTopIndex + structPtr->selectedIndexOffset >= structPtr->listLength - 1) return 0; @@ -382,16 +383,16 @@ int MatchCall_MoveCursorDown(void) } if (ShouldShowDownArrow()) { - MatchCall_MoveWindow(1, TRUE); + MoveListWindow(1, TRUE); return 2; } return 0; } -int MatchCall_PageUp(void) +int PokenavList_PageUp(void) { s32 scroll; - struct MatchCallWindowState *structPtr = GetMatchCallWindowStruct(); + struct PokenavListWindowState *structPtr = GetPokenavListWindowState(); if (ShouldShowUpArrow()) { @@ -399,7 +400,7 @@ int MatchCall_PageUp(void) scroll = structPtr->visibleEntries; else scroll = structPtr->windowTopIndex; - MatchCall_MoveWindow(scroll * -1, TRUE); + MoveListWindow(scroll * -1, TRUE); return 2; } else if (structPtr->selectedIndexOffset != 0) @@ -410,9 +411,9 @@ int MatchCall_PageUp(void) return 0; } -int MatchCall_PageDown(void) +int PokenavList_PageDown(void) { - struct MatchCallWindowState *structPtr = GetMatchCallWindowStruct(); + struct PokenavListWindowState *structPtr = GetPokenavListWindowState(); if (ShouldShowDownArrow()) { @@ -421,7 +422,7 @@ int MatchCall_PageDown(void) if (windowBottomIndex <= structPtr->unk4) scroll = structPtr->visibleEntries; - MatchCall_MoveWindow(scroll, TRUE); + MoveListWindow(scroll, TRUE); return 2; } else @@ -448,66 +449,65 @@ int MatchCall_PageDown(void) u32 GetSelectedPokenavListIndex(void) { - struct MatchCallWindowState *structPtr = GetMatchCallWindowStruct(); + struct PokenavListWindowState *structPtr = GetPokenavListWindowState(); return structPtr->windowTopIndex + structPtr->selectedIndexOffset; } u32 GetMatchCallListTopIndex(void) { - struct MatchCallWindowState *structPtr = GetMatchCallWindowStruct(); + struct PokenavListWindowState *structPtr = GetPokenavListWindowState(); return structPtr->windowTopIndex; } void sub_81C877C(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); structPtr->unk89C = 0; structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C8870, 6); } void PrintCheckPageInfo(s16 delta) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - structPtr->unk888.windowTopIndex += delta; + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + structPtr->windowState.windowTopIndex += delta; structPtr->unk89C = 0; structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_PrintCheckPageInfo, 6); } void sub_81C87F0(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); structPtr->unk89C = 0; structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C8A28, 6); } bool32 IsMatchCallListTaskActive(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return IsLoopedTaskActive(structPtr->loopedTaskId); } -void sub_81C8838(void) +void PokenavList_DrawCurrentItemIcon(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - struct MatchCallWindowState *subPtr = &structPtr->unk888; - structPtr->list.unk38(structPtr->list.listWindow.windowId, subPtr->windowTopIndex + subPtr->selectedIndexOffset, (structPtr->list.listWindow.unkA + subPtr->selectedIndexOffset) & 0xF); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavListWindowState *subPtr = &structPtr->windowState; + structPtr->list.iconDrawFunc(structPtr->list.listWindow.windowId, subPtr->windowTopIndex + subPtr->selectedIndexOffset, (structPtr->list.listWindow.unkA + subPtr->selectedIndexOffset) & 0xF); CopyWindowToVram(structPtr->list.listWindow.windowId, COPYWIN_MAP); } -// TODO: -u32 LoopedTask_sub_81C8870(s32 state) +static u32 LoopedTask_sub_81C8870(s32 state) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); switch (state) { case 0: - ToggleMatchCallArrows(&structPtr->list, 1); + ToggleListArrows(&structPtr->list, 1); // fall-through case 1: - if (structPtr->unk89C != structPtr->unk888.selectedIndexOffset) + if (structPtr->unk89C != structPtr->windowState.selectedIndexOffset) sub_81C8B70(&structPtr->list.listWindow, structPtr->unk89C, 1); structPtr->unk89C++; @@ -515,10 +515,10 @@ u32 LoopedTask_sub_81C8870(s32 state) case 2: if (!IsDma3ManagerBusyWithBgCopy()) { - if (structPtr->unk89C != structPtr->unk888.visibleEntries) + if (structPtr->unk89C != structPtr->windowState.visibleEntries) return 6; - if (structPtr->unk888.selectedIndexOffset != 0) - sub_81C8B70(&structPtr->list.listWindow, structPtr->unk89C, structPtr->unk888.selectedIndexOffset); + if (structPtr->windowState.selectedIndexOffset != 0) + sub_81C8B70(&structPtr->list.listWindow, structPtr->unk89C, structPtr->windowState.selectedIndexOffset); return LT_INC_AND_PAUSE; } @@ -526,55 +526,55 @@ u32 LoopedTask_sub_81C8870(s32 state) case 3: if (!IsDma3ManagerBusyWithBgCopy()) { - if (structPtr->unk888.selectedIndexOffset != 0) + if (structPtr->windowState.selectedIndexOffset != 0) { - MatchCall_MoveWindow(structPtr->unk888.selectedIndexOffset, FALSE); + MoveListWindow(structPtr->windowState.selectedIndexOffset, FALSE); return LT_INC_AND_PAUSE; } return LT_FINISH; } return LT_PAUSE; case 4: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; - structPtr->unk888.selectedIndexOffset = 0; + structPtr->windowState.selectedIndexOffset = 0; return LT_FINISH; } return LT_FINISH; } -u32 LoopedTask_PrintCheckPageInfo(s32 state) +static u32 LoopedTask_PrintCheckPageInfo(s32 state) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); if (IsDma3ManagerBusyWithBgCopy()) return LT_PAUSE; switch (state) { case 0: - sub_81C8CB4(&structPtr->unk888, &structPtr->list); + PrintCheckPageTrainerName(&structPtr->windowState, &structPtr->list); break; case 1: PrintMatchCallFieldNames(&structPtr->list, 0); break; case 2: - PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->list, CHECK_PAGE_STRATEGY); + PrintMatchCallFlavorText(&structPtr->windowState, &structPtr->list, CHECK_PAGE_STRATEGY); break; case 3: PrintMatchCallFieldNames(&structPtr->list, 1); break; case 4: - PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->list, CHECK_PAGE_POKEMON); + PrintMatchCallFlavorText(&structPtr->windowState, &structPtr->list, CHECK_PAGE_POKEMON); break; case 5: PrintMatchCallFieldNames(&structPtr->list, 2); break; case 6: - PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->list, CHECK_PAGE_INTRO_1); + PrintMatchCallFlavorText(&structPtr->windowState, &structPtr->list, CHECK_PAGE_INTRO_1); break; case 7: - PrintMatchCallFlavorText(&structPtr->unk888, &structPtr->list, CHECK_PAGE_INTRO_2); + PrintMatchCallFlavorText(&structPtr->windowState, &structPtr->list, CHECK_PAGE_INTRO_2); break; default: return LT_FINISH; @@ -582,95 +582,95 @@ u32 LoopedTask_PrintCheckPageInfo(s32 state) return LT_INC_AND_PAUSE; } -u32 LoopedTask_sub_81C8A28(s32 state) +static u32 LoopedTask_sub_81C8A28(s32 state) { struct PokenavSub17 *structPtr; - struct MatchCallWindowState *subPtr888; + struct PokenavListWindowState *windowState; struct PokenavSub17Substruct *subPtr0; s32 r5, *ptr; if (IsDma3ManagerBusyWithBgCopy()) return LT_PAUSE; - structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - subPtr888 = &structPtr->unk888; + structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + windowState = &structPtr->windowState; subPtr0 = &structPtr->list; switch (state) { case 0: - sub_81C8D4C(subPtr888, subPtr0); + PrintMatchCallListTrainerName(windowState, subPtr0); return LT_INC_AND_PAUSE; case 1: ptr = &structPtr->unk89C; - if (++(*ptr) < structPtr->unk888.visibleEntries) + if (++(*ptr) < structPtr->windowState.visibleEntries) { sub_81C8B70(&subPtr0->listWindow, *ptr, 1); return LT_PAUSE; } *ptr = 0; - if (subPtr888->listLength <= subPtr888->visibleEntries) + if (windowState->listLength <= windowState->visibleEntries) { - if (subPtr888->windowTopIndex != 0) + if (windowState->windowTopIndex != 0) { - s32 r4 = subPtr888->windowTopIndex; + s32 r4 = windowState->windowTopIndex; r5 = -r4; sub_81C8B70(&subPtr0->listWindow, r5, r4); - subPtr888->selectedIndexOffset = r4; + windowState->selectedIndexOffset = r4; *ptr = r5; return LT_INC_AND_PAUSE; } } else { - if (subPtr888->windowTopIndex + subPtr888->visibleEntries > subPtr888->listLength) + if (windowState->windowTopIndex + windowState->visibleEntries > windowState->listLength) { - s32 r4 = subPtr888->windowTopIndex + subPtr888->visibleEntries - subPtr888->listLength; + s32 r4 = windowState->windowTopIndex + windowState->visibleEntries - windowState->listLength; r5 = -r4; sub_81C8B70(&subPtr0->listWindow, r5, r4); - subPtr888->selectedIndexOffset = r4; + windowState->selectedIndexOffset = r4; *ptr = r5; return LT_INC_AND_PAUSE; } } return 9; case 2: - MatchCall_MoveWindow(structPtr->unk89C, FALSE); + MoveListWindow(structPtr->unk89C, FALSE); return LT_INC_AND_PAUSE; case 3: - if (!IsMonListLoopedTaskActive()) + if (!IsMovePokenavListWindowTaskActive()) { structPtr->unk89C = 0; return 1; } return 2; case 4: - sub_81C83AC(subPtr888->unk10, subPtr888->windowTopIndex + structPtr->unk89C, 1, subPtr888->unkC, structPtr->unk89C, &structPtr->list); + PrintListItems(windowState->listPtr, windowState->windowTopIndex + structPtr->unk89C, 1, windowState->listItemSize, structPtr->unk89C, &structPtr->list); return LT_INC_AND_PAUSE; case 5: - if (sub_81C83E0()) + if (IsPrintListItemsTaskActive()) return LT_PAUSE; - if (++structPtr->unk89C >= subPtr888->listLength || structPtr->unk89C >= subPtr888->visibleEntries) + if (++structPtr->unk89C >= windowState->listLength || structPtr->unk89C >= windowState->visibleEntries) return LT_INC_AND_CONTINUE; return 9; case 6: - ToggleMatchCallArrows(subPtr0, 0); + ToggleListArrows(subPtr0, 0); return LT_FINISH; } return LT_FINISH; } -void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2) +static void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2) { - u8 *v1 = (u8*)GetWindowAttribute(listWindow->windowId, WINDOW_TILE_DATA); - u32 v2 = listWindow->unk4 * 64; + u8 *tileData = (u8*)GetWindowAttribute(listWindow->windowId, WINDOW_TILE_DATA); + u32 v2 = listWindow->width * 64; a1 = (listWindow->unkA + a1) & 0xF; if (a1 + a2 <= 16) { - CpuFastFill8(PIXEL_FILL(1), v1 + a1 * v2, a2 * v2); + CpuFastFill8(PIXEL_FILL(1), tileData + a1 * v2, a2 * v2); CopyWindowToVram(listWindow->windowId, COPYWIN_GFX); } else @@ -678,8 +678,8 @@ void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2) u32 v3 = 16 - a1; u32 v4 = a2 - v3; - CpuFastFill8(PIXEL_FILL(1), v1 + a1 * v2, v3 * v2); - CpuFastFill8(PIXEL_FILL(1), v1, v4 * v2); + CpuFastFill8(PIXEL_FILL(1), tileData + a1 * v2, v3 * v2); + CpuFastFill8(PIXEL_FILL(1), tileData, v4 * v2); CopyWindowToVram(listWindow->windowId, COPYWIN_GFX); } @@ -693,50 +693,56 @@ void sub_81C8C64(struct PokenavListMenuWindow *listWindow, u32 a1) { u16 var; u16 *v1 = (u16*)GetBgTilemapBuffer(GetWindowAttribute(listWindow->windowId, WINDOW_BG)); - v1 += ((listWindow->unkA << 6) + listWindow->unk2) - 1; + v1 += ((listWindow->unkA << 6) + listWindow->x) - 1; if (a1 != 0) - var = (listWindow->unk1 << 12) | (listWindow->unk6 + 1); + var = (listWindow->fillValue << 12) | (listWindow->tileOffset + 1); else - var = (listWindow->unk1 << 12) | (listWindow->unk6); + var = (listWindow->fillValue << 12) | (listWindow->tileOffset); v1[0] = var; v1[0x20] = var; } -void sub_81C8CB4(struct MatchCallWindowState *state, struct PokenavSub17Substruct *list) +// Print the trainer's name and title at the top of their check page +static void PrintCheckPageTrainerName(struct PokenavListWindowState *state, struct PokenavSub17Substruct *list) { u8 colors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_RED}; - list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer); - list->unk38(list->listWindow.windowId, state->windowTopIndex, list->listWindow.unkA); - FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(4), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16); - AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SKIP_DRAW, list->unkTextBuffer); + list->bufferItemFunc(state->listPtr + state->listItemSize * state->windowTopIndex, list->itemTextBuffer); + list->iconDrawFunc(list->listWindow.windowId, state->windowTopIndex, list->listWindow.unkA); + FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(4), 0, list->listWindow.unkA * 16, list->listWindow.width * 8, 16); + AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SKIP_DRAW, list->itemTextBuffer); sub_81C8C64(&list->listWindow, 1); - CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_FULL, 0, list->listWindow.unkA * 2, list->listWindow.unk4, 2); + CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_FULL, 0, list->listWindow.unkA * 2, list->listWindow.width, 2); } -void sub_81C8D4C(struct MatchCallWindowState *state, struct PokenavSub17Substruct *list) +// Print the trainer's name and title for the list (to replace the check page name and title, which has a red background) +static void PrintMatchCallListTrainerName(struct PokenavListWindowState *state, struct PokenavSub17Substruct *list) { - list->unk34(state->unk10 + state->unkC * state->windowTopIndex, list->unkTextBuffer); - FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.unk4 * 8, 16); - AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->unkTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SKIP_DRAW, NULL); + list->bufferItemFunc(state->listPtr + state->listItemSize * state->windowTopIndex, list->itemTextBuffer); + FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.width * 8, 16); + AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->itemTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SKIP_DRAW, NULL); sub_81C8C64(&list->listWindow, 0); CopyWindowToVram(list->listWindow.windowId, COPYWIN_FULL); } -void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId) +static void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId) { - const u8 *fieldNames[] = {gText_PokenavMatchCall_Strategy, gText_PokenavMatchCall_TrainerPokemon, gText_PokenavMatchCall_SelfIntroduction}; + const u8 *fieldNames[] = { + gText_PokenavMatchCall_Strategy, + gText_PokenavMatchCall_TrainerPokemon, + gText_PokenavMatchCall_SelfIntroduction + }; u8 colors[3] = {TEXT_COLOR_WHITE, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED}; u32 top = (list->listWindow.unkA + 1 + (fieldId * 2)) & 0xF; - FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.unk4, 16); + FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, top << 4, list->listWindow.width, 16); AddTextPrinterParameterized3(list->listWindow.windowId, FONT_NARROW, 2, (top << 4) + 1, colors, TEXT_SKIP_DRAW, fieldNames[fieldId]); - CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, top << 1, list->listWindow.unk4, 2); + CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, top << 1, list->listWindow.width, 2); } -static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct PokenavSub17Substruct *list, u32 checkPageEntry) +static void PrintMatchCallFlavorText(struct PokenavListWindowState *a0, struct PokenavSub17Substruct *list, u32 checkPageEntry) { // lines 1, 3, and 5 are the field names printed by PrintMatchCallFieldNames static const u8 lineOffsets[CHECK_PAGE_ENTRY_COUNT] = @@ -752,31 +758,31 @@ static void PrintMatchCallFlavorText(struct MatchCallWindowState *a0, struct Pok if (str != NULL) { - FillWindowTilesByRow(list->listWindow.windowId, 1, r6 * 2, list->listWindow.unk4 - 1, 2); + FillWindowTilesByRow(list->listWindow.windowId, 1, r6 * 2, list->listWindow.width - 1, 2); AddTextPrinterParameterized(list->listWindow.windowId, FONT_NARROW, str, 2, (r6 << 4) + 1, TEXT_SKIP_DRAW, NULL); - CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, r6 * 2, list->listWindow.unk4, 2); + CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, r6 * 2, list->listWindow.width, 2); } } -static const struct CompressedSpriteSheet sMatchcallArrowSpriteSheets[] = +static const struct CompressedSpriteSheet sListArrowSpriteSheets[] = { { - .data = sMatchcallArrowSpriteSheetData, + .data = sListArrow_Gfx, .size = 192, - .tag = 0xA + .tag = GFXTAG_ARROW } }; -static const struct SpritePalette sMatchcallArrowPalettes[] = +static const struct SpritePalette sListArrowPalettes[] = { { - .data = sMatchcallArrowPaletteData, - .tag = 0x14 + .data = sListArrow_Pal, + .tag = PALTAG_ARROW }, {} }; -static const struct OamData sMatchCallRightArrowSpriteOam = +static const struct OamData sOamData_RightArrow = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -790,18 +796,18 @@ static const struct OamData sMatchCallRightArrowSpriteOam = .paletteNum = 0 }; -static const struct SpriteTemplate sMatchCallRightArrowSprite = +static const struct SpriteTemplate sSpriteTemplate_RightArrow = { - .tileTag = 0xA, - .paletteTag = 0x14, - .oam = &sMatchCallRightArrowSpriteOam, + .tileTag = GFXTAG_ARROW, + .paletteTag = PALTAG_ARROW, + .oam = &sOamData_RightArrow, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = SpriteCB_MatchCallRightArrow + .callback = SpriteCB_RightArrow }; -static const struct OamData sMatchCallUpDownArrowSpriteOam = +static const struct OamData sOamData_UpDownArrow = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -815,60 +821,60 @@ static const struct OamData sMatchCallUpDownArrowSpriteOam = .paletteNum = 0 }; -static const struct SpriteTemplate sMatchCallUpDownArrowSprite = +static const struct SpriteTemplate sSpriteTemplate_UpDownArrow = { - .tileTag = 0xA, - .paletteTag = 0x14, - .oam = &sMatchCallUpDownArrowSpriteOam, + .tileTag = GFXTAG_ARROW, + .paletteTag = PALTAG_ARROW, + .oam = &sOamData_UpDownArrow, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; -void sub_81C8ED0(void) +static void LoadListArrowGfx(void) { u32 i; const struct CompressedSpriteSheet *ptr; - for (i = 0, ptr = sMatchcallArrowSpriteSheets; i < ARRAY_COUNT(sMatchcallArrowSpriteSheets); ptr++, i++) + for (i = 0, ptr = sListArrowSpriteSheets; i < ARRAY_COUNT(sListArrowSpriteSheets); ptr++, i++) LoadCompressedSpriteSheet(ptr); - Pokenav_AllocAndLoadPalettes(sMatchcallArrowPalettes); + Pokenav_AllocAndLoadPalettes(sListArrowPalettes); } -void CreateMatchCallArrowSprites(struct MatchCallWindowState *windowState, struct PokenavSub17Substruct *list) +static void CreateListArrowSprites(struct PokenavListWindowState *windowState, struct PokenavSub17Substruct *list) { u32 spriteId; s16 x; - spriteId = CreateSprite(&sMatchCallRightArrowSprite, list->listWindow.unk2 * 8 + 3, (list->listWindow.unk3 + 1) * 8, 7); + spriteId = CreateSprite(&sSpriteTemplate_RightArrow, list->listWindow.x * 8 + 3, (list->listWindow.y + 1) * 8, 7); list->rightArrow = &gSprites[spriteId]; - x = list->listWindow.unk2 * 8 + (list->listWindow.unk4 - 1) * 4; - spriteId = CreateSprite(&sMatchCallUpDownArrowSprite, x, list->listWindow.unk3 * 8 + windowState->visibleEntries * 16, 7); + x = list->listWindow.x * 8 + (list->listWindow.width - 1) * 4; + spriteId = CreateSprite(&sSpriteTemplate_UpDownArrow, x, list->listWindow.y * 8 + windowState->visibleEntries * 16, 7); list->downArrow = &gSprites[spriteId]; list->downArrow->oam.tileNum += 2; - list->downArrow->callback = SpriteCB_MatchCallDownArrow; + list->downArrow->callback = SpriteCB_DownArrow; - spriteId = CreateSprite(&sMatchCallUpDownArrowSprite, x, list->listWindow.unk3 * 8, 7); + spriteId = CreateSprite(&sSpriteTemplate_UpDownArrow, x, list->listWindow.y * 8, 7); list->upArrow = &gSprites[spriteId]; list->upArrow->oam.tileNum += 4; - list->upArrow->callback = SpriteCB_MatchCallUpArrow; + list->upArrow->callback = SpriteCB_UpArrow; } -void DestroyMatchCallListArrows(struct PokenavSub17Substruct *list) +static void DestroyListArrows(struct PokenavSub17Substruct *list) { DestroySprite(list->rightArrow); DestroySprite(list->upArrow); DestroySprite(list->downArrow); - FreeSpriteTilesByTag(0xA); - FreeSpritePaletteByTag(0x14); + FreeSpriteTilesByTag(GFXTAG_ARROW); + FreeSpritePaletteByTag(PALTAG_ARROW); } -void ToggleMatchCallArrows(struct PokenavSub17Substruct *list, bool32 shouldHide) +static void ToggleListArrows(struct PokenavSub17Substruct *list, bool32 invisible) { - if (shouldHide) + if (invisible) { list->rightArrow->callback = SpriteCallbackDummy; list->upArrow->callback = SpriteCallbackDummy; @@ -876,76 +882,84 @@ void ToggleMatchCallArrows(struct PokenavSub17Substruct *list, bool32 shouldHide } else { - list->rightArrow->callback = SpriteCB_MatchCallRightArrow; - list->upArrow->callback = SpriteCB_MatchCallUpArrow; - list->downArrow->callback = SpriteCB_MatchCallDownArrow; + list->rightArrow->callback = SpriteCB_RightArrow; + list->upArrow->callback = SpriteCB_UpArrow; + list->downArrow->callback = SpriteCB_DownArrow; } - list->rightArrow->invisible = shouldHide; - list->upArrow->invisible = shouldHide; - list->downArrow->invisible = shouldHide; + list->rightArrow->invisible = invisible; + list->upArrow->invisible = invisible; + list->downArrow->invisible = invisible; } -void SpriteCB_MatchCallRightArrow(struct Sprite *sprite) +static void SpriteCB_RightArrow(struct Sprite *sprite) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - sprite->y2 = structPtr->unk888.selectedIndexOffset << 4; + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + sprite->y2 = structPtr->windowState.selectedIndexOffset << 4; } -void SpriteCB_MatchCallDownArrow(struct Sprite *sprite) +#define sTimer data[0] +#define sOffset data[1] +#define sInvisible data[7] + +static void SpriteCB_DownArrow(struct Sprite *sprite) { - if (sprite->data[7] == 0 && ShouldShowDownArrow()) + if (!sprite->sInvisible && ShouldShowDownArrow()) sprite->invisible = FALSE; else sprite->invisible = TRUE; - if (++sprite->data[0] > 3) + if (++sprite->sTimer > 3) { s16 offset; - sprite->data[0] = 0; - offset = (sprite->data[1] + 1) & 7; - sprite->data[1] = offset; + sprite->sTimer = 0; + offset = (sprite->sOffset + 1) & 7; + sprite->sOffset = offset; sprite->y2 = offset; } } -void SpriteCB_MatchCallUpArrow(struct Sprite *sprite) +static void SpriteCB_UpArrow(struct Sprite *sprite) { - if (sprite->data[7] == 0 && ShouldShowUpArrow()) + if (!sprite->sInvisible && ShouldShowUpArrow()) sprite->invisible = FALSE; else sprite->invisible = TRUE; - if (++sprite->data[0] > 3) + if (++sprite->sTimer > 3) { s16 offset; - sprite->data[0] = 0; - offset = (sprite->data[1] + 1) & 7; - sprite->data[1] = offset; + sprite->sTimer = 0; + offset = (sprite->sOffset + 1) & 7; + sprite->sOffset = offset; sprite->y2 = -1 * offset; } } -void ToggleMatchCallVerticalArrows(bool32 shouldHide) +void PokenavList_ToggleVerticalArrows(bool32 invisible) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_LIST); - structPtr->list.upArrow->data[7] = shouldHide; - structPtr->list.downArrow->data[7] = shouldHide; + struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + structPtr->list.upArrow->sInvisible = invisible; + structPtr->list.downArrow->sInvisible = invisible; } -void InitMatchCallWindowState(struct MatchCallWindowState *dst, struct PokenavListTemplate *template) +#undef sTimer +#undef sOffset +#undef sInvisible + +static void InitPokenavListWindowState(struct PokenavListWindowState *dst, struct PokenavListTemplate *template) { - dst->unk10 = template->list; - dst->windowTopIndex = template->unk6; + dst->listPtr = template->list; + dst->windowTopIndex = template->startIndex; dst->listLength = template->count; - dst->unkC = template->unk8; + dst->listItemSize = template->itemSize; dst->visibleEntries = template->maxShowed; if (dst->visibleEntries >= dst->listLength) { dst->windowTopIndex = 0; dst->unk4 = 0; - dst->selectedIndexOffset = template->unk6; + dst->selectedIndexOffset = template->startIndex; } else { @@ -953,7 +967,7 @@ void InitMatchCallWindowState(struct MatchCallWindowState *dst, struct PokenavLi if (dst->windowTopIndex + dst->visibleEntries > dst->listLength) { dst->selectedIndexOffset = dst->windowTopIndex + dst->visibleEntries - dst->listLength; - dst->windowTopIndex = template->unk6 - dst->selectedIndexOffset; + dst->windowTopIndex = template->startIndex - dst->selectedIndexOffset; } else { @@ -962,18 +976,18 @@ void InitMatchCallWindowState(struct MatchCallWindowState *dst, struct PokenavLi } } -static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 a3) +static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 tileOffset) { struct WindowTemplate window; dest->listWindow.bg = bgTemplate->bg; - dest->listWindow.unk6 = a3; - dest->unk34 = template->bufferItemFunc; - dest->unk38 = template->unk14; - dest->listWindow.unk1 = template->fillValue; - dest->listWindow.unk2 = template->item_X; - dest->listWindow.unk3 = template->listTop; - dest->listWindow.unk4 = template->windowWidth; + dest->listWindow.tileOffset = tileOffset; + dest->bufferItemFunc = template->bufferItemFunc; + dest->iconDrawFunc = template->iconDrawFunc; + dest->listWindow.fillValue = template->fillValue; + dest->listWindow.x = template->item_X; + dest->listWindow.y = template->listTop; + dest->listWindow.width = template->windowWidth; dest->listWindow.fontId = template->fontId; window.bg = bgTemplate->bg; @@ -982,7 +996,7 @@ static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, co window.width = template->windowWidth; window.height = 32; window.paletteNum = template->fillValue; - window.baseBlock = a3 + 2; + window.baseBlock = tileOffset + 2; dest->listWindow.windowId = AddWindow(&window); if (dest->listWindow.windowId == WINDOW_NONE) diff --git a/src/pokenav_ribbons_list.c b/src/pokenav_ribbons_list.c index 4233819a38..c70554eb0e 100644 --- a/src/pokenav_ribbons_list.c +++ b/src/pokenav_ribbons_list.c @@ -61,8 +61,8 @@ static u32 LoopedTask_RibbonsListOpenSummary(s32); static void DrawListIndexNumber(s32, s32, s32); static void AddRibbonsMonListWindow(struct Pokenav_RibbonsMonMenu *); static void UpdateIndexNumberDisplay(struct Pokenav_RibbonsMonMenu *); -static void InitMonRibbonPokenavListMenuTemplate(void); -static void BufferRibbonMonInfoText(struct PokenavMonListItem *, u8 *); +static void CreateRibbonMonsList(void); +static void BufferRibbonMonInfoText(struct PokenavListItem *, u8 *); static const LoopedTask sMonRibbonListLoopTaskFuncs[] = { @@ -416,7 +416,7 @@ bool32 GetRibbonsMonCurrentLoopedTaskActive(void) void FreeRibbonsMonMenu(void) { struct Pokenav_RibbonsMonMenu * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); - sub_81C8234(); + DestroyPokenavList(); RemoveWindow(menu->winid); FreePokenavSubstruct(POKENAV_SUBSTRUCT_RIBBONS_MON_MENU); } @@ -447,10 +447,10 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state) if (FreeTempTileDataBuffersIfPossible()) return LT_PAUSE; CopyPaletteIntoBufferUnfaded(sMonRibbonListUi_Pal, 0x20, 0x20); - InitMonRibbonPokenavListMenuTemplate(); + CreateRibbonMonsList(); return LT_INC_AND_PAUSE; case 3: - if (sub_81C8224()) + if (IsCreatePokenavListTaskActive()) return LT_PAUSE; AddRibbonsMonListWindow(menu); return LT_INC_AND_PAUSE; @@ -483,7 +483,7 @@ static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state) switch (state) { case 0: - switch (MatchCall_MoveCursorUp()) + switch (PokenavList_MoveCursorUp()) { case 0: return LT_FINISH; @@ -496,7 +496,7 @@ static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -516,7 +516,7 @@ static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state) switch (state) { case 0: - switch (MatchCall_MoveCursorDown()) + switch (PokenavList_MoveCursorDown()) { case 0: return LT_FINISH; @@ -529,7 +529,7 @@ static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -549,7 +549,7 @@ static u32 LoopedTask_RibbonsListMovePageUp(s32 state) switch (state) { case 0: - switch (MatchCall_PageUp()) + switch (PokenavList_PageUp()) { case 0: return LT_FINISH; @@ -562,7 +562,7 @@ static u32 LoopedTask_RibbonsListMovePageUp(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -582,7 +582,7 @@ static u32 LoopedTask_RibbonsListMovePageDown(s32 state) switch (state) { case 0: - switch (MatchCall_PageDown()) + switch (PokenavList_PageDown()) { case 0: return LT_FINISH; @@ -595,7 +595,7 @@ static u32 LoopedTask_RibbonsListMovePageDown(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMonListLoopedTaskActive()) + if (IsMovePokenavListWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -677,32 +677,32 @@ static void DrawListIndexNumber(s32 windowId, s32 index, s32 max) AddTextPrinterParameterized(windowId, FONT_NORMAL, strbuf, x, 1, TEXT_SKIP_DRAW, NULL); } -static void InitMonRibbonPokenavListMenuTemplate(void) +static void CreateRibbonMonsList(void) { struct PokenavListTemplate template; template.list = (struct PokenavListItem *)GetMonRibbonMonListData(); template.count = GetRibbonsMonListCount(); - template.unk8 = 4; - template.unk6 = GetRibbonListMenuCurrIndex(); + template.itemSize = sizeof(struct PokenavListItem); + template.startIndex = GetRibbonListMenuCurrIndex(); template.item_X = 13; template.windowWidth = 17; template.listTop = 1; template.maxShowed = 8; template.fillValue = 2; template.fontId = FONT_NORMAL; - template.bufferItemFunc = (PokenavListItemBufferFunc)BufferRibbonMonInfoText; - template.unk14 = NULL; - sub_81C81D4(&sMonRibbonListBgTemplates[1], &template, 0); + template.bufferItemFunc = BufferRibbonMonInfoText; + template.iconDrawFunc = NULL; + CreatePokenavList(&sMonRibbonListBgTemplates[1], &template, 0); } // Buffers the "Nickname gender/level" text for the ribbon mon list -static void BufferRibbonMonInfoText(struct PokenavMonListItem * item0, u8 * dest) +static void BufferRibbonMonInfoText(struct PokenavListItem * listItem, u8 * dest) { u8 gender; u8 level; u8 * s; const u8 * genderStr; - struct PokenavMonListItem * item = item0; + struct PokenavMonListItem * item = (struct PokenavMonListItem *)listItem; // Mon is in party if (item->boxId == TOTAL_BOXES_COUNT) From 4c4fa1f25e55e41f469604a984a820f5a7f30e90 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 13 Nov 2021 16:56:45 -0500 Subject: [PATCH 175/417] Typo fix --- src/data/pokemon_graphics/back_pic_coordinates.h | 4 ++-- src/data/pokemon_graphics/front_pic_coordinates.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/pokemon_graphics/back_pic_coordinates.h b/src/data/pokemon_graphics/back_pic_coordinates.h index ea81706080..addb482851 100644 --- a/src/data/pokemon_graphics/back_pic_coordinates.h +++ b/src/data/pokemon_graphics/back_pic_coordinates.h @@ -1,5 +1,5 @@ -// All Pokémon pics are 64x64, but this data table defines where in this 64x64 the -// non-trasparent area of pixels the sprite actually occupies are. +// All Pokémon pics are 64x64, but this data table defines where in this 64x64 frame +// the sprite's non-transparent pixels actually are. // .size is the dimensions of this drawn pixel area. // .y_offset is the number of pixels between the drawn pixel area and the bottom edge. const struct MonCoords gMonBackPicCoords[] = diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index f0cebf1f51..6022f9cc18 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -1,5 +1,5 @@ -// All Pokémon pics are 64x64, but this data table defines where in this 64x64 the -// non-trasparent area of pixels the sprite actually occupies are. +// All Pokémon pics are 64x64, but this data table defines where in this 64x64 frame +// the sprite's non-transparent pixels actually are. // .size is the dimensions of this drawn pixel area. // .y_offset is the number of pixels between the drawn pixel area and the bottom edge. const struct MonCoords gMonFrontPicCoords[] = From 8e8b70c15c1e34074d27acaa07f8e28d0d3d9e89 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 13 Nov 2021 17:22:01 -0500 Subject: [PATCH 176/417] Add clarifying comment to LinkFullSave_WriteSector --- src/save.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/save.c b/src/save.c index cd25977e1c..4cd2982a1b 100644 --- a/src/save.c +++ b/src/save.c @@ -278,6 +278,7 @@ static u8 HandleWriteIncrementalSector(u16 numSectors, const struct SaveSectorLo } else { + // Exceeded max sector, finished status = SAVE_STATUS_ERROR; } @@ -793,6 +794,10 @@ bool8 LinkFullSave_WriteSector(void) u8 status = HandleWriteIncrementalSector(NUM_SECTORS_PER_SLOT, gRamSaveSectorLocations); if (gDamagedSaveSectors) DoSaveFailedScreen(SAVE_NORMAL); + + // In this case "error" either means that an actual error was encountered + // or that the given max sector has been reached (meaning it has finished successfully). + // If there was an actual error the save failed screen above will also be shown. if (status == SAVE_STATUS_ERROR) return TRUE; else From 9d3345a6d69c38bf31014df69c52583c877eed24 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 13 Nov 2021 21:41:16 -0500 Subject: [PATCH 177/417] Enforce structs to enforce save block order for modern toolchains. --- include/load_save.h | 30 +++++++++++++++++++++++++++--- src/load_save.c | 15 +++++---------- src/main.c | 4 ++-- src/save.c | 28 ++++++++++++++-------------- 4 files changed, 48 insertions(+), 29 deletions(-) diff --git a/include/load_save.h b/include/load_save.h index 2f4a9ace6b..9e7b1bc92a 100644 --- a/include/load_save.h +++ b/include/load_save.h @@ -1,9 +1,33 @@ #ifndef GUARD_LOAD_SAVE_H #define GUARD_LOAD_SAVE_H -extern struct SaveBlock1 gSaveblock1; -extern struct SaveBlock2 gSaveblock2; -extern struct PokemonStorage gPokemonStorage; +#include "pokemon_storage_system.h" + +#define SAVEBLOCK_MOVE_RANGE 128 + +/** + * These structs are to prevent them from being reordered on newer or modern + * toolchains. If this is not done, the ClearSav functions will end up erasing + * the wrong memory leading to various glitches. + */ +struct SaveBlock2DMA { + struct SaveBlock2 block; + u8 dma[SAVEBLOCK_MOVE_RANGE]; +}; + +struct SaveBlock1DMA { + struct SaveBlock1 block; + u8 dma[SAVEBLOCK_MOVE_RANGE]; +}; + +struct PokemonStorageDMA { + struct PokemonStorage block; + u8 dma[SAVEBLOCK_MOVE_RANGE]; +}; + +extern struct SaveBlock1DMA gSaveblock1; +extern struct SaveBlock2DMA gSaveblock2; +extern struct PokemonStorageDMA gPokemonStorage; extern bool32 gFlashMemoryPresent; extern struct SaveBlock1 *gSaveBlock1Ptr; diff --git a/src/load_save.c b/src/load_save.c index 1ba5a1600a..889f42b14c 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -29,14 +29,9 @@ struct LoadedSaveData }; // EWRAM DATA -EWRAM_DATA struct SaveBlock2 gSaveblock2 = {0}; -EWRAM_DATA u8 gSaveblock2_DMA[SAVEBLOCK_MOVE_RANGE] = {0}; - -EWRAM_DATA struct SaveBlock1 gSaveblock1 = {0}; -EWRAM_DATA u8 gSaveblock1_DMA[SAVEBLOCK_MOVE_RANGE] = {0}; - -EWRAM_DATA struct PokemonStorage gPokemonStorage = {0}; -EWRAM_DATA u8 gSaveblock3_DMA[SAVEBLOCK_MOVE_RANGE] = {0}; +EWRAM_DATA struct SaveBlock2DMA gSaveblock2 = {0}; +EWRAM_DATA struct SaveBlock1DMA gSaveblock1 = {0}; +EWRAM_DATA struct PokemonStorageDMA gPokemonStorage = {0}; EWRAM_DATA struct LoadedSaveData gLoadedSaveData = {0}; EWRAM_DATA u32 gLastEncryptionKey = 0; @@ -63,12 +58,12 @@ void CheckForFlashMemory(void) void ClearSav2(void) { - CpuFill16(0, &gSaveblock2, sizeof(struct SaveBlock2) + sizeof(gSaveblock2_DMA)); + CpuFill16(0, &gSaveblock2, sizeof(struct SaveBlock2DMA)); } void ClearSav1(void) { - CpuFill16(0, &gSaveblock1, sizeof(struct SaveBlock1) + sizeof(gSaveblock1_DMA)); + CpuFill16(0, &gSaveblock1, sizeof(struct SaveBlock1DMA)); } // Offset is the sum of the trainer id bytes diff --git a/src/main.c b/src/main.c index 215f85c468..2b96a8698c 100644 --- a/src/main.c +++ b/src/main.c @@ -172,8 +172,8 @@ static void InitMainCallbacks(void) gMain.vblankCounter2 = 0; gMain.callback1 = NULL; SetMainCallback2(CB2_InitCopyrightScreenAfterBootup); - gSaveBlock2Ptr = &gSaveblock2; - gPokemonStoragePtr = &gPokemonStorage; + gSaveBlock2Ptr = &gSaveblock2.block; + gPokemonStoragePtr = &gPokemonStorage.block; } static void CallCallbacks(void) diff --git a/src/save.c b/src/save.c index 3c8f4360dc..253e7763d9 100644 --- a/src/save.c +++ b/src/save.c @@ -52,22 +52,22 @@ static u8 HandleWriteSector(u16 a1, const struct SaveSectionLocation *location); static const struct SaveSectionOffsets sSaveSectionOffsets[] = { - SAVEBLOCK_CHUNK(gSaveblock2, 0), + SAVEBLOCK_CHUNK(struct SaveBlock2, 0), - SAVEBLOCK_CHUNK(gSaveblock1, 0), - SAVEBLOCK_CHUNK(gSaveblock1, 1), - SAVEBLOCK_CHUNK(gSaveblock1, 2), - SAVEBLOCK_CHUNK(gSaveblock1, 3), + SAVEBLOCK_CHUNK(struct SaveBlock1, 0), + SAVEBLOCK_CHUNK(struct SaveBlock1, 1), + SAVEBLOCK_CHUNK(struct SaveBlock1, 2), + SAVEBLOCK_CHUNK(struct SaveBlock1, 3), - SAVEBLOCK_CHUNK(gPokemonStorage, 0), - SAVEBLOCK_CHUNK(gPokemonStorage, 1), - SAVEBLOCK_CHUNK(gPokemonStorage, 2), - SAVEBLOCK_CHUNK(gPokemonStorage, 3), - SAVEBLOCK_CHUNK(gPokemonStorage, 4), - SAVEBLOCK_CHUNK(gPokemonStorage, 5), - SAVEBLOCK_CHUNK(gPokemonStorage, 6), - SAVEBLOCK_CHUNK(gPokemonStorage, 7), - SAVEBLOCK_CHUNK(gPokemonStorage, 8), + SAVEBLOCK_CHUNK(struct PokemonStorage, 0), + SAVEBLOCK_CHUNK(struct PokemonStorage, 1), + SAVEBLOCK_CHUNK(struct PokemonStorage, 2), + SAVEBLOCK_CHUNK(struct PokemonStorage, 3), + SAVEBLOCK_CHUNK(struct PokemonStorage, 4), + SAVEBLOCK_CHUNK(struct PokemonStorage, 5), + SAVEBLOCK_CHUNK(struct PokemonStorage, 6), + SAVEBLOCK_CHUNK(struct PokemonStorage, 7), + SAVEBLOCK_CHUNK(struct PokemonStorage, 8), }; // iwram common From 927f9d27dfcbf8ff169475e3d32e8e27a8591d1e Mon Sep 17 00:00:00 2001 From: Wiz <94323898+GBAWiz420@users.noreply.github.com> Date: Sun, 14 Nov 2021 16:51:56 -0500 Subject: [PATCH 178/417] Designate gBattleAnimBgImage_Attract and related as arrays --- include/graphics.h | 6 +++--- src/battle_anim_effects_2.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/graphics.h b/include/graphics.h index eeb8f65a30..e2fe5cf778 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4637,9 +4637,9 @@ extern const u32 gBattleAnimSpritePal_RedHeart[]; extern const u32 gBattleAnimSpritePal_RedOrb[]; extern const u32 gBattleAnimSpritePal_EyeSparkle[]; extern const u32 gBattleAnimSpritePal_PinkHeart[]; -extern const u32 gBattleAnimBgImage_Attract; -extern const u32 gBattleAnimBgPalette_Attract; -extern const u32 gBattleAnimBgTilemap_Attract; +extern const u32 gBattleAnimBgImage_Attract[]; +extern const u32 gBattleAnimBgPalette_Attract[]; +extern const u32 gBattleAnimBgTilemap_Attract[]; extern const u32 gBattleAnimSpritePal_Angel[]; extern const u32 gBattleAnimSpritePal_Devil[]; extern const u32 gBattleAnimSpritePal_Swipe[]; diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index c2a89ed4ba..36e959ca0b 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -3259,9 +3259,9 @@ void AnimTask_HeartsBackground(u8 taskId) SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X); SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); GetBattleAnimBg1Data(&animBg); - AnimLoadCompressedBgGfx(animBg.bgId, &gBattleAnimBgImage_Attract, animBg.tilesOffset); - AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_Attract, FALSE); - LoadCompressedPalette(&gBattleAnimBgPalette_Attract, animBg.paletteId * 16, 32); + AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Attract, animBg.tilesOffset); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Attract, FALSE); + LoadCompressedPalette(gBattleAnimBgPalette_Attract, animBg.paletteId * 16, 32); gTasks[taskId].func = AnimTask_HeartsBackground_Step; } From 7e27a0746de931a99d78e5db584e8fbdb84c8edd Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 14 Nov 2021 09:55:30 -0500 Subject: [PATCH 179/417] Misc text clean-up --- gflib/text.c | 248 +++++++++--------- gflib/text.h | 8 - .../{down_arrow_RS.png => down_arrow_alt.png} | Bin src/braille.c | 6 +- 4 files changed, 129 insertions(+), 133 deletions(-) rename graphics/fonts/{down_arrow_RS.png => down_arrow_alt.png} (100%) diff --git a/gflib/text.c b/gflib/text.c index bf5b01e486..557c11704b 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -13,8 +13,8 @@ #include "dynamic_placeholder_text_util.h" #include "fonts.h" -static u16 RenderText(struct TextPrinter *textPrinter); -static u32 RenderFont(struct TextPrinter *textPrinter); +static u16 RenderText(struct TextPrinter *); +static u32 RenderFont(struct TextPrinter *); static u16 FontFunc_Small(struct TextPrinter *); static u16 FontFunc_Normal(struct TextPrinter *); static u16 FontFunc_Short(struct TextPrinter *); @@ -23,32 +23,32 @@ static u16 FontFunc_ShortCopy2(struct TextPrinter *); static u16 FontFunc_ShortCopy3(struct TextPrinter *); static u16 FontFunc_Narrow(struct TextPrinter *); static u16 FontFunc_SmallNarrow(struct TextPrinter *); -static void DecompressGlyph_Small(u16 glyphId, bool32 isJapanese); -static void DecompressGlyph_Normal(u16 glyphId, bool32 isJapanese); -static void DecompressGlyph_Short(u16 glyphId, bool32 isJapanese); -static void DecompressGlyph_Narrow(u16 glyphId, bool32 isJapanese); -static void DecompressGlyph_SmallNarrow(u16 glyphId, bool32 isJapanese); -static void DecompressGlyph_Bold(u16 glyphId); -static u32 GetGlyphWidth_Small(u16 glyphId, bool32 isJapanese); -static u32 GetGlyphWidth_Normal(u16 glyphId, bool32 isJapanese); -static u32 GetGlyphWidth_Short(u16 glyphId, bool32 isJapanese); -static u32 GetGlyphWidth_Narrow(u16 glyphId, bool32 isJapanese); -static u32 GetGlyphWidth_SmallNarrow(u16 glyphId, bool32 isJapanese); +static void DecompressGlyph_Small(u16, bool32); +static void DecompressGlyph_Normal(u16, bool32); +static void DecompressGlyph_Short(u16, bool32); +static void DecompressGlyph_Narrow(u16, bool32); +static void DecompressGlyph_SmallNarrow(u16, bool32); +static void DecompressGlyph_Bold(u16); +static u32 GetGlyphWidth_Small(u16, bool32); +static u32 GetGlyphWidth_Normal(u16, bool32); +static u32 GetGlyphWidth_Short(u16, bool32); +static u32 GetGlyphWidth_Narrow(u16, bool32); +static u32 GetGlyphWidth_SmallNarrow(u16, bool32); -EWRAM_DATA struct TextPrinter gTempTextPrinter = {0}; -EWRAM_DATA struct TextPrinter gTextPrinters[NUM_TEXT_PRINTERS] = {0}; +static EWRAM_DATA struct TextPrinter sTempTextPrinter = {0}; +static EWRAM_DATA struct TextPrinter sTextPrinters[NUM_TEXT_PRINTERS] = {0}; -static u16 gFontHalfRowLookupTable[0x51]; -static u16 gLastTextBgColor; -static u16 gLastTextFgColor; -static u16 gLastTextShadowColor; +static u16 sFontHalfRowLookupTable[0x51]; +static u16 sLastTextBgColor; +static u16 sLastTextFgColor; +static u16 sLastTextShadowColor; const struct FontInfo *gFonts; bool8 gDisableTextPrinters; struct TextGlyph gCurGlyph; TextFlags gTextFlags; -const u8 gFontHalfRowOffsets[] = +static const u8 sFontHalfRowOffsets[] = { 0x00, 0x01, 0x02, 0x00, 0x03, 0x04, 0x05, 0x03, 0x06, 0x07, 0x08, 0x06, 0x00, 0x01, 0x02, 0x00, 0x09, 0x0A, 0x0B, 0x09, 0x0C, 0x0D, 0x0E, 0x0C, 0x0F, 0x10, 0x11, 0x0F, 0x09, 0x0A, 0x0B, 0x09, @@ -68,12 +68,16 @@ const u8 gFontHalfRowOffsets[] = 0x00, 0x01, 0x02, 0x00, 0x03, 0x04, 0x05, 0x03, 0x06, 0x07, 0x08, 0x06, 0x00, 0x01, 0x02, 0x00 }; -const u8 gDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow.4bpp"); -const u8 gDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_RS.4bpp"); -const u8 gUnusedFRLGBlankedDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_blanked_down_arrow.4bpp"); -const u8 gUnusedFRLGDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_down_arrow.4bpp"); -const u8 gDownArrowYCoords[] = { 0, 1, 2, 1 }; -const u8 gWindowVerticalScrollSpeeds[] = { 1, 2, 4, 0x0 }; +static const u8 sDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow.4bpp"); +static const u8 sDarkDownArrowTiles[] = INCBIN_U8("graphics/fonts/down_arrow_alt.4bpp"); +static const u8 sUnusedFRLGBlankedDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_blanked_down_arrow.4bpp"); +static const u8 sUnusedFRLGDownArrow[] = INCBIN_U8("graphics/fonts/unused_frlg_down_arrow.4bpp"); +static const u8 sDownArrowYCoords[] = { 0, 1, 2, 1 }; +static const u8 sWindowVerticalScrollSpeeds[] = { + [OPTIONS_TEXT_SPEED_SLOW] = 1, + [OPTIONS_TEXT_SPEED_MID] = 2, + [OPTIONS_TEXT_SPEED_FAST] = 4, +}; static const struct GlyphWidthFunc sGlyphWidthFuncs[] = { @@ -88,24 +92,29 @@ static const struct GlyphWidthFunc sGlyphWidthFuncs[] = { FONT_SMALL_NARROW, GetGlyphWidth_SmallNarrow } }; -const struct KeypadIcon gKeypadIcons[] = +struct { - [CHAR_A_BUTTON] = { 0x0, 0x8, 0xC }, - [CHAR_B_BUTTON] = { 0x1, 0x8, 0xC }, - [CHAR_L_BUTTON] = { 0x2, 0x10, 0xC }, - [CHAR_R_BUTTON] = { 0x4, 0x10, 0xC }, - [CHAR_START_BUTTON] = { 0x6, 0x18, 0xC }, - [CHAR_SELECT_BUTTON] = { 0x9, 0x18, 0xC }, - [CHAR_DPAD_UP] = { 0xC, 0x8, 0xC }, - [CHAR_DPAD_DOWN] = { 0xD, 0x8, 0xC }, - [CHAR_DPAD_LEFT] = { 0xE, 0x8, 0xC }, - [CHAR_DPAD_RIGHT] = { 0xF, 0x8, 0xC }, - [CHAR_DPAD_UPDOWN] = { 0x20, 0x8, 0xC }, - [CHAR_DPAD_LEFTRIGHT] = { 0x21, 0x8, 0xC }, - [CHAR_DPAD_NONE] = { 0x22, 0x8, 0xC } + u16 tileOffset; + u8 width; + u8 height; +} static const sKeypadIcons[] = +{ + [CHAR_A_BUTTON] = { 0x00, 8, 12 }, + [CHAR_B_BUTTON] = { 0x01, 8, 12 }, + [CHAR_L_BUTTON] = { 0x02, 16, 12 }, + [CHAR_R_BUTTON] = { 0x04, 16, 12 }, + [CHAR_START_BUTTON] = { 0x06, 24, 12 }, + [CHAR_SELECT_BUTTON] = { 0x09, 24, 12 }, + [CHAR_DPAD_UP] = { 0x0C, 8, 12 }, + [CHAR_DPAD_DOWN] = { 0x0D, 8, 12 }, + [CHAR_DPAD_LEFT] = { 0x0E, 8, 12 }, + [CHAR_DPAD_RIGHT] = { 0x0F, 8, 12 }, + [CHAR_DPAD_UPDOWN] = { 0x20, 8, 12 }, + [CHAR_DPAD_LEFTRIGHT] = { 0x21, 8, 12 }, + [CHAR_DPAD_NONE] = { 0x22, 8, 12 } }; -const u8 gKeypadIconTiles[] = INCBIN_U8("graphics/fonts/keypad_icons.4bpp"); +static const u8 sKeypadIconTiles[] = INCBIN_U8("graphics/fonts/keypad_icons.4bpp"); static const struct FontInfo sFontInfos[] = { @@ -225,7 +234,7 @@ static const u8 sMenuCursorDimensions[][2] = [FONT_BOLD] = {} }; -const u16 gFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold.hwjpnfont"); +static const u16 sFontBoldJapaneseGlyphs[] = INCBIN_U16("graphics/fonts/bold.hwjpnfont"); static void SetFontsPointer(const struct FontInfo *fonts) { @@ -236,7 +245,7 @@ void DeactivateAllTextPrinters(void) { int printer; for (printer = 0; printer < NUM_TEXT_PRINTERS; ++printer) - gTextPrinters[printer].active = FALSE; + sTextPrinters[printer].active = FALSE; } u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)) @@ -267,41 +276,41 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi if (!gFonts) return FALSE; - gTempTextPrinter.active = TRUE; - gTempTextPrinter.state = RENDER_STATE_HANDLE_CHAR; - gTempTextPrinter.textSpeed = speed; - gTempTextPrinter.delayCounter = 0; - gTempTextPrinter.scrollDistance = 0; + sTempTextPrinter.active = TRUE; + sTempTextPrinter.state = RENDER_STATE_HANDLE_CHAR; + sTempTextPrinter.textSpeed = speed; + sTempTextPrinter.delayCounter = 0; + sTempTextPrinter.scrollDistance = 0; - for (i = 0; i < (int)ARRAY_COUNT(gTempTextPrinter.subStructFields); i++) - gTempTextPrinter.subStructFields[i] = 0; + for (i = 0; i < (int)ARRAY_COUNT(sTempTextPrinter.subStructFields); i++) + sTempTextPrinter.subStructFields[i] = 0; - gTempTextPrinter.printerTemplate = *printerTemplate; - gTempTextPrinter.callback = callback; - gTempTextPrinter.minLetterSpacing = 0; - gTempTextPrinter.japanese = 0; + sTempTextPrinter.printerTemplate = *printerTemplate; + sTempTextPrinter.callback = callback; + sTempTextPrinter.minLetterSpacing = 0; + sTempTextPrinter.japanese = 0; GenerateFontHalfRowLookupTable(printerTemplate->fgColor, printerTemplate->bgColor, printerTemplate->shadowColor); if (speed != TEXT_SKIP_DRAW && speed != 0) { - --gTempTextPrinter.textSpeed; - gTextPrinters[printerTemplate->windowId] = gTempTextPrinter; + --sTempTextPrinter.textSpeed; + sTextPrinters[printerTemplate->windowId] = sTempTextPrinter; } else { - gTempTextPrinter.textSpeed = 0; + sTempTextPrinter.textSpeed = 0; // Render all text (up to limit) at once for (j = 0; j < 0x400; ++j) { - if (RenderFont(&gTempTextPrinter) == RENDER_FINISH) + if (RenderFont(&sTempTextPrinter) == RENDER_FINISH) break; } // All the text is rendered to the window but don't draw it yet. if (speed != TEXT_SKIP_DRAW) - CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, COPYWIN_GFX); - gTextPrinters[printerTemplate->windowId].active = FALSE; + CopyWindowToVram(sTempTextPrinter.printerTemplate.windowId, COPYWIN_GFX); + sTextPrinters[printerTemplate->windowId].active = FALSE; } gDisableTextPrinters = FALSE; return TRUE; @@ -315,19 +324,19 @@ void RunTextPrinters(void) { for (i = 0; i < NUM_TEXT_PRINTERS; ++i) { - if (gTextPrinters[i].active) + if (sTextPrinters[i].active) { - u16 temp = RenderFont(&gTextPrinters[i]); + u16 temp = RenderFont(&sTextPrinters[i]); switch (temp) { case RENDER_PRINT: - CopyWindowToVram(gTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX); + CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX); case RENDER_UPDATE: - if (gTextPrinters[i].callback != 0) - gTextPrinters[i].callback(&gTextPrinters[i].printerTemplate, temp); + if (sTextPrinters[i].callback != 0) + sTextPrinters[i].callback(&sTextPrinters[i].printerTemplate, temp); break; case RENDER_FINISH: - gTextPrinters[i].active = FALSE; + sTextPrinters[i].active = FALSE; break; } } @@ -337,7 +346,7 @@ void RunTextPrinters(void) bool16 IsTextPrinterActive(u8 id) { - return gTextPrinters[id].active; + return sTextPrinters[id].active; } static u32 RenderFont(struct TextPrinter *textPrinter) @@ -356,11 +365,11 @@ void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor) u32 fg12, bg12, shadow12; u32 temp; - u16 *current = gFontHalfRowLookupTable; + u16 *current = sFontHalfRowLookupTable; - gLastTextBgColor = bgColor; - gLastTextFgColor = fgColor; - gLastTextShadowColor = shadowColor; + sLastTextBgColor = bgColor; + sLastTextFgColor = fgColor; + sLastTextShadowColor = shadowColor; bg12 = bgColor << 12; fg12 = fgColor << 12; @@ -504,9 +513,9 @@ void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor) void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor) { - *bgColor = gLastTextBgColor; - *fgColor = gLastTextFgColor; - *shadowColor = gLastTextShadowColor; + *bgColor = sLastTextBgColor; + *fgColor = sLastTextFgColor; + *shadowColor = sLastTextShadowColor; } void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor) @@ -521,40 +530,41 @@ void DecompressGlyphTile(const void *src_, void *dest_) u32 *dest = dest_; temp = *(src++); - *(dest)++ = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]); + *(dest)++ = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); temp = *(src++); - *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]); + *(dest++) = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); temp = *(src++); - *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]); + *(dest++) = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); temp = *(src++); - *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]); + *(dest++) = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); temp = *(src++); - *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]); + *(dest++) = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); temp = *(src++); - *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]); + *(dest++) = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); temp = *(src++); - *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]); + *(dest++) = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); temp = *(src++); - *(dest++) = ((gFontHalfRowLookupTable[gFontHalfRowOffsets[temp & 0xFF]]) << 16) | (gFontHalfRowLookupTable[gFontHalfRowOffsets[temp >> 8]]); + *(dest++) = ((sFontHalfRowLookupTable[sFontHalfRowOffsets[temp & 0xFF]]) << 16) | (sFontHalfRowLookupTable[sFontHalfRowOffsets[temp >> 8]]); } -u8 GetLastTextColor(u8 colorType) +// Unused +static u8 GetLastTextColor(u8 colorType) { switch (colorType) { case 0: - return gLastTextFgColor; + return sLastTextFgColor; case 2: - return gLastTextBgColor; + return sLastTextBgColor; case 1: - return gLastTextShadowColor; + return sLastTextShadowColor; default: return 0; } @@ -644,7 +654,7 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width) struct TextGlyph *glyph; u8* glyphHeight; - if (gLastTextBgColor != 0) + if (sLastTextBgColor != TEXT_COLOR_TRANSPARENT) { window = &gWindows[textPrinter->printerTemplate.windowId]; pixels_data.pixels = window->tileData; @@ -660,7 +670,7 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width) textPrinter->printerTemplate.currentY, width, *glyphHeight, - gLastTextBgColor); + sLastTextBgColor); } } @@ -798,20 +808,20 @@ void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter) switch (gTextFlags.useAlternateDownArrow) { - case FALSE: - default: - arrowTiles = gDownArrowTiles; - break; - case TRUE: - arrowTiles = gDarkDownArrowTiles; - break; + case FALSE: + default: + arrowTiles = sDownArrowTiles; + break; + case TRUE: + arrowTiles = sDarkDownArrowTiles; + break; } BlitBitmapRectToWindow( textPrinter->printerTemplate.windowId, arrowTiles, 0, - gDownArrowYCoords[subStruct->downArrowYPosIdx], + sDownArrowYCoords[subStruct->downArrowYPosIdx], 8, 16, textPrinter->printerTemplate.currentX, @@ -905,26 +915,16 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c { switch (gTextFlags.useAlternateDownArrow) { - case 0: - default: - arrowTiles = gDownArrowTiles; - break; - case 1: - arrowTiles = gDarkDownArrowTiles; - break; + case FALSE: + default: + arrowTiles = sDownArrowTiles; + break; + case TRUE: + arrowTiles = sDarkDownArrowTiles; + break; } - BlitBitmapRectToWindow( - windowId, - arrowTiles, - 0, - gDownArrowYCoords[*yCoordIndex & 3], - 0x8, - 0x10, - x, - y - 2, - 0x8, - 0x10); + BlitBitmapRectToWindow(windowId, arrowTiles, 0, sDownArrowYCoords[*yCoordIndex & 3], 8, 16, x, y - 2, 8, 16); CopyWindowToVram(windowId, COPYWIN_GFX); *counter = 8; ++*yCoordIndex; @@ -942,7 +942,7 @@ static u16 RenderText(struct TextPrinter *textPrinter) switch (textPrinter->state) { case RENDER_STATE_HANDLE_CHAR: - if ((JOY_HELD(A_BUTTON | B_BUTTON)) && subStruct->hasPrintBeenSpedUp) + if (JOY_HELD(A_BUTTON | B_BUTTON) && subStruct->hasPrintBeenSpedUp) textPrinter->delayCounter = 0; if (textPrinter->delayCounter && textPrinter->textSpeed) @@ -1191,7 +1191,7 @@ static u16 RenderText(struct TextPrinter *textPrinter) if (textPrinter->scrollDistance) { int scrollSpeed = GetPlayerTextSpeed(); - int speed = gWindowVerticalScrollSpeeds[scrollSpeed]; + int speed = sWindowVerticalScrollSpeeds[scrollSpeed]; if (textPrinter->scrollDistance < speed) { ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); @@ -1612,31 +1612,31 @@ u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y) { BlitBitmapRectToWindow( windowId, - gKeypadIconTiles + (gKeypadIcons[keypadIconId].tileOffset * 0x20), + sKeypadIconTiles + (sKeypadIcons[keypadIconId].tileOffset * 0x20), 0, 0, 0x80, 0x80, x, y, - gKeypadIcons[keypadIconId].width, - gKeypadIcons[keypadIconId].height); - return gKeypadIcons[keypadIconId].width; + sKeypadIcons[keypadIconId].width, + sKeypadIcons[keypadIconId].height); + return sKeypadIcons[keypadIconId].width; } u8 GetKeypadIconTileOffset(u8 keypadIconId) { - return gKeypadIcons[keypadIconId].tileOffset; + return sKeypadIcons[keypadIconId].tileOffset; } u8 GetKeypadIconWidth(u8 keypadIconId) { - return gKeypadIcons[keypadIconId].width; + return sKeypadIcons[keypadIconId].width; } u8 GetKeypadIconHeight(u8 keypadIconId) { - return gKeypadIcons[keypadIconId].height; + return sKeypadIcons[keypadIconId].height; } void SetDefaultFontsPointer(void) @@ -1898,7 +1898,7 @@ static void DecompressGlyph_Bold(u16 glyphId) { const u16* glyphs; - glyphs = gFontBoldJapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF)); + glyphs = sFontBoldJapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF)); DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop); DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); gCurGlyph.width = 8; diff --git a/gflib/text.h b/gflib/text.h index 110df8b87f..2f660354fc 100644 --- a/gflib/text.h +++ b/gflib/text.h @@ -117,13 +117,6 @@ struct GlyphWidthFunc u32 (*func)(u16 glyphId, bool32 isJapanese); }; -struct KeypadIcon -{ - u16 tileOffset; - u8 width; - u8 height; -}; - typedef struct { bool8 canABSpeedUpPrint:1; bool8 useAlternateDownArrow:1; @@ -153,7 +146,6 @@ void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor); void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor); void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor); void DecompressGlyphTile(const void *src_, void *dest_); -u8 GetLastTextColor(u8 colorType); void CopyGlyphToWindow(struct TextPrinter *x); void ClearTextSpan(struct TextPrinter *textPrinter, u32 width); u8 GetMenuCursorDimensionByFont(u8, u8); diff --git a/graphics/fonts/down_arrow_RS.png b/graphics/fonts/down_arrow_alt.png similarity index 100% rename from graphics/fonts/down_arrow_RS.png rename to graphics/fonts/down_arrow_alt.png diff --git a/src/braille.c b/src/braille.c index b4ee43ad02..704f50760b 100644 --- a/src/braille.c +++ b/src/braille.c @@ -8,7 +8,11 @@ // For printing braille messages, see ScrCmd_braillemessage ALIGNED(4) -static const u8 sScrollDistances[] = {1, 2, 4}; +static const u8 sScrollDistances[] = { + [OPTIONS_TEXT_SPEED_SLOW] = 1, + [OPTIONS_TEXT_SPEED_MID] = 2, + [OPTIONS_TEXT_SPEED_FAST] = 4, +}; static const u16 sFont_Braille[] = INCBIN_U16("graphics/fonts/braille.fwjpnfont"); static void DecompressGlyph_Braille(u16); From d4d42342839719389596f26cc291b89e77f69813 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 14 Nov 2021 22:21:50 -0500 Subject: [PATCH 180/417] Finish pokenav list ui doc --- include/pokenav.h | 12 +- src/pokenav_conditions_search_results.c | 12 +- src/pokenav_match_call_1.c | 4 +- src/pokenav_match_call_2.c | 40 ++--- src/pokenav_match_call_ui.c | 187 ++++++++++++------------ src/pokenav_ribbons_list.c | 14 +- 6 files changed, 135 insertions(+), 134 deletions(-) diff --git a/include/pokenav.h b/include/pokenav.h index 9c530e11ef..b5eb20a7fc 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -327,19 +327,19 @@ void SetVBlankCallback_(IntrCallback callback); bool32 CreatePokenavList(const struct BgTemplate *bgTemplate, struct PokenavListTemplate *listTemplate, s32 tileOffset); bool32 IsCreatePokenavListTaskActive(void); void DestroyPokenavList(void); -u32 GetSelectedPokenavListIndex(void); +u32 PokenavList_GetSelectedIndex(void); int PokenavList_MoveCursorUp(void); int PokenavList_MoveCursorDown(void); int PokenavList_PageDown(void); int PokenavList_PageUp(void); -bool32 IsMovePokenavListWindowTaskActive(void); +bool32 PokenavList_IsMoveWindowTaskActive(void); void PokenavList_ToggleVerticalArrows(bool32 shouldHide); void PokenavList_DrawCurrentItemIcon(void); -void sub_81C877C(void); -bool32 IsMatchCallListTaskActive(void); +void PokenavList_EraseListForCheckPage(void); +bool32 PokenavList_IsTaskActive(void); void PrintCheckPageInfo(s16 a0); -u32 GetMatchCallListTopIndex(void); -void sub_81C87F0(void); +u32 PokenavList_GetTopIndex(void); +void PokenavList_ReshowListFromCheckPage(void); // pokenav_match_call_data.c bool32 MatchCall_HasCheckPage(u32 idx); diff --git a/src/pokenav_conditions_search_results.c b/src/pokenav_conditions_search_results.c index 09bb7c9ac5..c8790e3598 100644 --- a/src/pokenav_conditions_search_results.c +++ b/src/pokenav_conditions_search_results.c @@ -200,7 +200,7 @@ static u32 HandleConditionSearchInput(struct Pokenav_SearchResults *menu) else if (JOY_NEW(A_BUTTON)) { // Entering graph menu - menu->monList->currIndex = GetSelectedPokenavListIndex(); + menu->monList->currIndex = PokenavList_GetSelectedIndex(); menu->saveResultsList = TRUE; menu->callback = OpenConditionGraphFromSearchList; return CONDITION_SEARCH_FUNC_SELECT_MON; @@ -241,7 +241,7 @@ static u16 GetSearchResultsMonListCount(void) static s32 GetSearchResultsSelectedMonRank(void) { struct Pokenav_SearchResults * menu = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_SEARCH_RESULTS); - s32 i = GetSelectedPokenavListIndex(); + s32 i = PokenavList_GetSelectedIndex(); return menu->monList->monData[i].data; } @@ -498,7 +498,7 @@ static u32 LoopedTask_MoveSearchListCursorUp(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -531,7 +531,7 @@ static u32 LoopedTask_MoveSearchListCursorDown(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -564,7 +564,7 @@ static u32 LoopedTask_MoveSearchListPageUp(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -597,7 +597,7 @@ static u32 LoopedTask_MoveSearchListPageDown(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index b2b9179c36..e0e5306e19 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -92,7 +92,7 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) { state->callback = CB2_HandleMatchCallOptionsInput; state->optionCursorPos = 0; - selection = GetSelectedPokenavListIndex(); + selection = PokenavList_GetSelectedIndex(); if (!state->matchCallEntries[selection].isSpecialTrainer || MatchCall_HasCheckPage(state->matchCallEntries[selection].headerId)) { @@ -489,7 +489,7 @@ bool32 unref_sub_81CB16C(void) static bool32 ShouldDoNearbyMessage(void) { struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); - int selection = GetSelectedPokenavListIndex(); + int selection = PokenavList_GetSelectedIndex(); if (!state->matchCallEntries[selection].isSpecialTrainer) { if (GetMatchCallMapSec(selection) == gMapHeader.regionMapSectionId) diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index 420dac5f88..d8704919f5 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -414,7 +414,7 @@ static u32 MatchCallListCursorDown(s32 state) } break; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; PrintMatchCallLocation(gfx, 0); @@ -451,7 +451,7 @@ static u32 MatchCallListCursorUp(s32 state) } break; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; PrintMatchCallLocation(gfx, 0); @@ -488,7 +488,7 @@ static u32 MatchCallListPageDown(s32 state) } break; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; PrintMatchCallLocation(gfx, 0); @@ -525,7 +525,7 @@ static u32 MatchCallListPageUp(s32 state) } break; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; PrintMatchCallLocation(gfx, 0); @@ -722,11 +722,11 @@ static u32 ShowCheckPage(s32 state) { case 0: PlaySE(SE_SELECT); - sub_81C877C(); + PokenavList_EraseListForCheckPage(); UpdateWindowsToShowCheckPage(gfx); return LT_INC_AND_PAUSE; case 1: - if (IsMatchCallListTaskActive() || IsDma3ManagerBusyWithBgCopy1(gfx)) + if (PokenavList_IsTaskActive() || IsDma3ManagerBusyWithBgCopy1(gfx)) return LT_PAUSE; PrintHelpBarText(HELPBAR_MC_CHECK_PAGE); @@ -736,7 +736,7 @@ static u32 ShowCheckPage(s32 state) LoadCheckPageTrainerPic(gfx); return LT_INC_AND_PAUSE; case 3: - if (IsMatchCallListTaskActive() || WaitForTrainerPic(gfx) || WaitForHelpBar()) + if (PokenavList_IsTaskActive() || WaitForTrainerPic(gfx) || WaitForHelpBar()) return LT_PAUSE; break; } @@ -752,7 +752,7 @@ static u32 ShowCheckPageDown(s32 state) switch (state) { case 0: - topId = GetMatchCallListTopIndex(); + topId = PokenavList_GetTopIndex(); delta = GetIndexDeltaOfNextCheckPageDown(topId); if (delta) { @@ -775,7 +775,7 @@ static u32 ShowCheckPageDown(s32 state) LoadCheckPageTrainerPic(gfx); return LT_INC_AND_PAUSE; case 4: - if (IsMatchCallListTaskActive() || WaitForTrainerPic(gfx)) + if (PokenavList_IsTaskActive() || WaitForTrainerPic(gfx)) return LT_PAUSE; break; } @@ -791,10 +791,10 @@ static u32 ExitCheckPage(s32 state) case 0: PlaySE(SE_SELECT); TrainerPicSlideOffscreen(gfx); - sub_81C87F0(); + PokenavList_ReshowListFromCheckPage(); return LT_INC_AND_PAUSE; case 1: - if (IsMatchCallListTaskActive() || WaitForTrainerPic(gfx)) + if (PokenavList_IsTaskActive() || WaitForTrainerPic(gfx)) return LT_PAUSE; PrintHelpBarText(HELPBAR_MC_TRAINER_LIST); @@ -817,7 +817,7 @@ static u32 ShowCheckPageUp(s32 state) switch (state) { case 0: - topId = GetMatchCallListTopIndex(); + topId = PokenavList_GetTopIndex(); delta = GetIndexDeltaOfNextCheckPageUp(topId); if (delta) { @@ -840,7 +840,7 @@ static u32 ShowCheckPageUp(s32 state) LoadCheckPageTrainerPic(gfx); return LT_INC_AND_PAUSE; case 4: - if (IsMatchCallListTaskActive() || WaitForTrainerPic(gfx)) + if (PokenavList_IsTaskActive() || WaitForTrainerPic(gfx)) return LT_PAUSE; break; } @@ -929,11 +929,11 @@ enum { POKEBALL_ICON_EMPTY, }; -static void TryDrawRematchPokeballIcon(u16 windowId, u32 rematchId, u32 arg2) +static void TryDrawRematchPokeballIcon(u16 windowId, u32 rematchId, u32 tileOffset) { u8 bg = GetWindowAttribute(windowId, WINDOW_BG); u16 *tilemap = GetBgTilemapBuffer(bg); - tilemap += arg2 * 0x40 + 0x1D; + tilemap += tileOffset * 64 + 0x1D; if (ShouldDrawRematchPokeballIcon(rematchId)) { tilemap[0] = POKEBALL_ICON_TOP; @@ -946,11 +946,11 @@ static void TryDrawRematchPokeballIcon(u16 windowId, u32 rematchId, u32 arg2) } } -void ClearRematchPokeballIcon(u16 windowId, u32 arg0) +void ClearRematchPokeballIcon(u16 windowId, u32 tileOffset) { u8 bg = GetWindowAttribute(windowId, WINDOW_BG); u16 *tilemap = GetBgTilemapBuffer(bg); - tilemap += arg0 * 0x40 + 0x1D; + tilemap += tileOffset * 64 + 0x1D; tilemap[0] = POKEBALL_ICON_EMPTY; tilemap[0x20] = POKEBALL_ICON_EMPTY; } @@ -1021,7 +1021,7 @@ static void PrintMatchCallLocation(struct Pokenav_MatchCallGfx *gfx, int delta) { u8 mapName[32]; int x; - int index = GetSelectedPokenavListIndex() + delta; + int index = PokenavList_GetSelectedIndex() + delta; int mapSec = GetMatchCallMapSec(index); if (mapSec != MAPSEC_NONE) GetMapName(mapName, mapSec, 0); @@ -1138,7 +1138,7 @@ static bool32 WaitForTrainerIsCloseByText(struct Pokenav_MatchCallGfx *gfx) static void PrintMatchCallMessage(struct Pokenav_MatchCallGfx *gfx) { - int index = GetSelectedPokenavListIndex(); + int index = PokenavList_GetSelectedIndex(); const u8 *str = GetMatchCallMessageText(index, &gfx->newRematchRequest); u8 speed = GetPlayerTextSpeedDelay(); AddTextPrinterParameterized(gfx->msgBoxWindowId, FONT_NORMAL, str, 32, 1, speed, NULL); @@ -1244,7 +1244,7 @@ static struct Sprite *CreateTrainerPicSprite(void) static void LoadCheckPageTrainerPic(struct Pokenav_MatchCallGfx *gfx) { u16 cursor; - int trainerPic = GetMatchCallTrainerPic(GetSelectedPokenavListIndex()); + int trainerPic = GetMatchCallTrainerPic(PokenavList_GetSelectedIndex()); if (trainerPic >= 0) { DecompressPicFromTable(&gTrainerFrontPicTable[trainerPic], gfx->trainerPicGfx, SPECIES_NONE); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_match_call_ui.c index 70e541b55b..97437e3cdf 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_match_call_ui.c @@ -29,11 +29,10 @@ struct PokenavListWindowState { // The index of the element at the top of the window. u16 windowTopIndex; u16 listLength; - u16 unk4; + u16 entriesOffscreen; // The index of the cursor, relative to the top of the window. u16 selectedIndexOffset; - u16 visibleEntries; - u16 unkA; + u16 entriesOnscreen; u32 listItemSize; void * listPtr; }; @@ -63,7 +62,7 @@ struct PokenavSub17 struct PokenavSub17Substruct list; u8 tilemapBuffer[BG_SCREEN_SIZE]; struct PokenavListWindowState windowState; - s32 unk89C; + s32 eraseIndex; u32 loopedTaskId; }; @@ -81,7 +80,7 @@ static void PrintMatchCallFlavorText(struct PokenavListWindowState *, struct Pok static void PrintMatchCallFieldNames(struct PokenavSub17Substruct *, u32); static void PrintMatchCallListTrainerName(struct PokenavListWindowState *, struct PokenavSub17Substruct *); static void PrintCheckPageTrainerName(struct PokenavListWindowState *, struct PokenavSub17Substruct *); -static void sub_81C8B70(struct PokenavListMenuWindow *, s32, s32); +static void EraseListEntry(struct PokenavListMenuWindow *, s32, s32); static void CreateMoveListWindowTask(s32, struct PokenavSub17Substruct *); static void PrintListItems(void *, u32, u32, u32, u32, struct PokenavSub17Substruct *); static void InitListItems(struct PokenavListWindowState *, struct PokenavSub17Substruct *); @@ -90,14 +89,14 @@ static u32 LoopedTask_CreatePokenavList(s32); static bool32 IsPrintListItemsTaskActive(void); static u32 LoopedTask_PrintListItems(s32); static u32 LoopedTask_MoveListWindow(s32); -static u32 LoopedTask_sub_81C8870(s32); -static u32 LoopedTask_sub_81C8A28(s32); +static u32 LoopedTask_EraseListForCheckPage(s32); +static u32 LoopedTask_ReshowListFromCheckPage(s32); static u32 LoopedTask_PrintCheckPageInfo(s32); static const u16 sListArrow_Pal[] = INCBIN_U16("graphics/pokenav/list_arrows.gbapal"); static const u32 sListArrow_Gfx[] = INCBIN_U32("graphics/pokenav/list_arrows.4bpp.lz"); -static EWRAM_DATA u32 gUnknown_0203CF44 = 0; +static EWRAM_DATA u32 sMoveWindowDownIndex = 0; // Read, but pointlessly bool32 CreatePokenavList(const struct BgTemplate *bgTemplate, struct PokenavListTemplate *listTemplate, s32 tileOffset) { @@ -187,8 +186,8 @@ static void InitPokenavListWindow(struct PokenavListMenuWindow *listWindow) static void InitListItems(struct PokenavListWindowState *windowState, struct PokenavSub17Substruct *a1) { s32 numToPrint = windowState->listLength - windowState->windowTopIndex; - if (numToPrint > windowState->visibleEntries) - numToPrint = windowState->visibleEntries; + if (numToPrint > windowState->entriesOnscreen) + numToPrint = windowState->entriesOnscreen; PrintListItems(windowState->listPtr, windowState->windowTopIndex, numToPrint, windowState->listItemSize, 0, a1); } @@ -214,18 +213,18 @@ static bool32 IsPrintListItemsTaskActive(void) static u32 LoopedTask_PrintListItems(s32 state) { - u32 v1; + u32 row; struct PokenavSub17Substruct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); switch (state) { case 0: - v1 = (structPtr->listWindow.unkA + structPtr->listWindow.numPrinted + structPtr->unk10) & 0xF; + row = (structPtr->listWindow.unkA + structPtr->listWindow.numPrinted + structPtr->unk10) & 0xF; structPtr->bufferItemFunc(structPtr->listPtr, structPtr->itemTextBuffer); if (structPtr->iconDrawFunc != NULL) - structPtr->iconDrawFunc(structPtr->listWindow.windowId, structPtr->printIndex, v1); + structPtr->iconDrawFunc(structPtr->listWindow.windowId, structPtr->printIndex, row); - AddTextPrinterParameterized(structPtr->listWindow.windowId, structPtr->listWindow.fontId, structPtr->itemTextBuffer, 8, (v1 << 4) + 1, 255, NULL); + AddTextPrinterParameterized(structPtr->listWindow.windowId, structPtr->listWindow.fontId, structPtr->itemTextBuffer, 8, (row << 4) + 1, TEXT_SKIP_DRAW, NULL); if (++structPtr->listWindow.numPrinted >= structPtr->listWindow.numToPrint) { // Finished printing items. If icons were being drawn, draw the @@ -250,22 +249,22 @@ static u32 LoopedTask_PrintListItems(s32 state) return LT_FINISH; } -bool32 ShouldShowUpArrow(void) +static bool32 ShouldShowUpArrow(void) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return (structPtr->windowState.windowTopIndex != 0); } -bool32 ShouldShowDownArrow(void) +static bool32 ShouldShowDownArrow(void) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); struct PokenavListWindowState *subPtr = &structPtr->windowState; - return (subPtr->windowTopIndex + subPtr->visibleEntries < subPtr->listLength); + return (subPtr->windowTopIndex + subPtr->entriesOnscreen < subPtr->listLength); } -static void MoveListWindow(s32 delta, bool32 a1) +static void MoveListWindow(s32 delta, bool32 printItems) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); struct PokenavListWindowState *subPtr = &structPtr->windowState; @@ -274,16 +273,16 @@ static void MoveListWindow(s32 delta, bool32 a1) { if (subPtr->windowTopIndex + delta < 0) delta = -1 * subPtr->windowTopIndex; - if (a1) + if (printItems) PrintListItems(subPtr->listPtr, subPtr->windowTopIndex + delta, delta * -1, subPtr->listItemSize, delta, &structPtr->list); } - else if (a1) + else if (printItems) { - s32 temp = gUnknown_0203CF44 = subPtr->windowTopIndex + subPtr->visibleEntries; - if (temp + delta >= subPtr->listLength) - delta = subPtr->listLength - temp; + s32 index = sMoveWindowDownIndex = subPtr->windowTopIndex + subPtr->entriesOnscreen; + if (index + delta >= subPtr->listLength) + delta = subPtr->listLength - index; - PrintListItems(subPtr->listPtr, gUnknown_0203CF44, delta, subPtr->listItemSize, subPtr->visibleEntries, &structPtr->list); + PrintListItems(subPtr->listPtr, index, delta, subPtr->listItemSize, subPtr->entriesOnscreen, &structPtr->list); } CreateMoveListWindowTask(delta, &structPtr->list); @@ -341,7 +340,7 @@ static u32 LoopedTask_MoveListWindow(s32 state) return LT_FINISH; } -bool32 IsMovePokenavListWindowTaskActive(void) +bool32 PokenavList_IsMoveWindowTaskActive(void) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return IsLoopedTaskActive(structPtr->list.loopedTaskId); @@ -376,7 +375,7 @@ int PokenavList_MoveCursorDown(void) if (structPtr->windowTopIndex + structPtr->selectedIndexOffset >= structPtr->listLength - 1) return 0; - if (structPtr->selectedIndexOffset < structPtr->visibleEntries - 1) + if (structPtr->selectedIndexOffset < structPtr->entriesOnscreen - 1) { structPtr->selectedIndexOffset++; return 1; @@ -396,8 +395,8 @@ int PokenavList_PageUp(void) if (ShouldShowUpArrow()) { - if (structPtr->windowTopIndex >= structPtr->visibleEntries) - scroll = structPtr->visibleEntries; + if (structPtr->windowTopIndex >= structPtr->entriesOnscreen) + scroll = structPtr->entriesOnscreen; else scroll = structPtr->windowTopIndex; MoveListWindow(scroll * -1, TRUE); @@ -417,21 +416,21 @@ int PokenavList_PageDown(void) if (ShouldShowDownArrow()) { - s32 windowBottomIndex = structPtr->windowTopIndex + structPtr->visibleEntries; - s32 scroll = structPtr->unk4 - structPtr->windowTopIndex; + s32 windowBottomIndex = structPtr->windowTopIndex + structPtr->entriesOnscreen; + s32 scroll = structPtr->entriesOffscreen - structPtr->windowTopIndex; - if (windowBottomIndex <= structPtr->unk4) - scroll = structPtr->visibleEntries; + if (windowBottomIndex <= structPtr->entriesOffscreen) + scroll = structPtr->entriesOnscreen; MoveListWindow(scroll, TRUE); return 2; } else { s32 cursor, lastVisibleIndex; - if (structPtr->listLength >= structPtr->visibleEntries) + if (structPtr->listLength >= structPtr->entriesOnscreen) { cursor = structPtr->selectedIndexOffset; - lastVisibleIndex = structPtr->visibleEntries; + lastVisibleIndex = structPtr->entriesOnscreen; } else { @@ -447,43 +446,43 @@ int PokenavList_PageDown(void) } } -u32 GetSelectedPokenavListIndex(void) +u32 PokenavList_GetSelectedIndex(void) { struct PokenavListWindowState *structPtr = GetPokenavListWindowState(); return structPtr->windowTopIndex + structPtr->selectedIndexOffset; } -u32 GetMatchCallListTopIndex(void) +u32 PokenavList_GetTopIndex(void) { struct PokenavListWindowState *structPtr = GetPokenavListWindowState(); return structPtr->windowTopIndex; } -void sub_81C877C(void) +void PokenavList_EraseListForCheckPage(void) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); - structPtr->unk89C = 0; - structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C8870, 6); + structPtr->eraseIndex = 0; + structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_EraseListForCheckPage, 6); } void PrintCheckPageInfo(s16 delta) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); structPtr->windowState.windowTopIndex += delta; - structPtr->unk89C = 0; + structPtr->eraseIndex = 0; structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_PrintCheckPageInfo, 6); } -void sub_81C87F0(void) +void PokenavList_ReshowListFromCheckPage(void) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); - structPtr->unk89C = 0; - structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_sub_81C8A28, 6); + structPtr->eraseIndex = 0; + structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_ReshowListFromCheckPage, 6); } -bool32 IsMatchCallListTaskActive(void) +bool32 PokenavList_IsTaskActive(void) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return IsLoopedTaskActive(structPtr->loopedTaskId); @@ -497,7 +496,7 @@ void PokenavList_DrawCurrentItemIcon(void) CopyWindowToVram(structPtr->list.listWindow.windowId, COPYWIN_MAP); } -static u32 LoopedTask_sub_81C8870(s32 state) +static u32 LoopedTask_EraseListForCheckPage(s32 state) { struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); @@ -507,18 +506,18 @@ static u32 LoopedTask_sub_81C8870(s32 state) ToggleListArrows(&structPtr->list, 1); // fall-through case 1: - if (structPtr->unk89C != structPtr->windowState.selectedIndexOffset) - sub_81C8B70(&structPtr->list.listWindow, structPtr->unk89C, 1); + if (structPtr->eraseIndex != structPtr->windowState.selectedIndexOffset) + EraseListEntry(&structPtr->list.listWindow, structPtr->eraseIndex, 1); - structPtr->unk89C++; + structPtr->eraseIndex++; return LT_INC_AND_PAUSE; case 2: if (!IsDma3ManagerBusyWithBgCopy()) { - if (structPtr->unk89C != structPtr->windowState.visibleEntries) - return 6; + if (structPtr->eraseIndex != structPtr->windowState.entriesOnscreen) + return LT_SET_STATE(1); if (structPtr->windowState.selectedIndexOffset != 0) - sub_81C8B70(&structPtr->list.listWindow, structPtr->unk89C, structPtr->windowState.selectedIndexOffset); + EraseListEntry(&structPtr->list.listWindow, structPtr->eraseIndex, structPtr->windowState.selectedIndexOffset); return LT_INC_AND_PAUSE; } @@ -535,7 +534,7 @@ static u32 LoopedTask_sub_81C8870(s32 state) } return LT_PAUSE; case 4: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; structPtr->windowState.selectedIndexOffset = 0; @@ -582,7 +581,7 @@ static u32 LoopedTask_PrintCheckPageInfo(s32 state) return LT_INC_AND_PAUSE; } -static u32 LoopedTask_sub_81C8A28(s32 state) +static u32 LoopedTask_ReshowListFromCheckPage(s32 state) { struct PokenavSub17 *structPtr; struct PokenavListWindowState *windowState; @@ -599,24 +598,26 @@ static u32 LoopedTask_sub_81C8A28(s32 state) switch (state) { case 0: + // Rewrite the name of the trainer whose check page was just being viewed. + // This is done to erase the red background it had. PrintMatchCallListTrainerName(windowState, subPtr0); return LT_INC_AND_PAUSE; case 1: - ptr = &structPtr->unk89C; - if (++(*ptr) < structPtr->windowState.visibleEntries) + ptr = &structPtr->eraseIndex; + if (++(*ptr) < structPtr->windowState.entriesOnscreen) { - sub_81C8B70(&subPtr0->listWindow, *ptr, 1); + EraseListEntry(&subPtr0->listWindow, *ptr, 1); return LT_PAUSE; } *ptr = 0; - if (windowState->listLength <= windowState->visibleEntries) + if (windowState->listLength <= windowState->entriesOnscreen) { if (windowState->windowTopIndex != 0) { s32 r4 = windowState->windowTopIndex; r5 = -r4; - sub_81C8B70(&subPtr0->listWindow, r5, r4); + EraseListEntry(&subPtr0->listWindow, r5, r4); windowState->selectedIndexOffset = r4; *ptr = r5; return LT_INC_AND_PAUSE; @@ -624,36 +625,36 @@ static u32 LoopedTask_sub_81C8A28(s32 state) } else { - if (windowState->windowTopIndex + windowState->visibleEntries > windowState->listLength) + if (windowState->windowTopIndex + windowState->entriesOnscreen > windowState->listLength) { - s32 r4 = windowState->windowTopIndex + windowState->visibleEntries - windowState->listLength; + s32 r4 = windowState->windowTopIndex + windowState->entriesOnscreen - windowState->listLength; r5 = -r4; - sub_81C8B70(&subPtr0->listWindow, r5, r4); + EraseListEntry(&subPtr0->listWindow, r5, r4); windowState->selectedIndexOffset = r4; *ptr = r5; return LT_INC_AND_PAUSE; } } - return 9; + return LT_SET_STATE(4); case 2: - MoveListWindow(structPtr->unk89C, FALSE); + MoveListWindow(structPtr->eraseIndex, FALSE); return LT_INC_AND_PAUSE; case 3: - if (!IsMovePokenavListWindowTaskActive()) + if (!PokenavList_IsMoveWindowTaskActive()) { - structPtr->unk89C = 0; - return 1; + structPtr->eraseIndex = 0; + return LT_INC_AND_CONTINUE; } - return 2; + return LT_PAUSE; case 4: - PrintListItems(windowState->listPtr, windowState->windowTopIndex + structPtr->unk89C, 1, windowState->listItemSize, structPtr->unk89C, &structPtr->list); + PrintListItems(windowState->listPtr, windowState->windowTopIndex + structPtr->eraseIndex, 1, windowState->listItemSize, structPtr->eraseIndex, &structPtr->list); return LT_INC_AND_PAUSE; case 5: if (IsPrintListItemsTaskActive()) return LT_PAUSE; - if (++structPtr->unk89C >= windowState->listLength || structPtr->unk89C >= windowState->visibleEntries) + if (++structPtr->eraseIndex >= windowState->listLength || structPtr->eraseIndex >= windowState->entriesOnscreen) return LT_INC_AND_CONTINUE; - return 9; + return LT_SET_STATE(4); case 6: ToggleListArrows(subPtr0, 0); return LT_FINISH; @@ -662,15 +663,15 @@ static u32 LoopedTask_sub_81C8A28(s32 state) return LT_FINISH; } -static void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2) +static void EraseListEntry(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2) { u8 *tileData = (u8*)GetWindowAttribute(listWindow->windowId, WINDOW_TILE_DATA); - u32 v2 = listWindow->width * 64; + u32 width = listWindow->width * 64; a1 = (listWindow->unkA + a1) & 0xF; if (a1 + a2 <= 16) { - CpuFastFill8(PIXEL_FILL(1), tileData + a1 * v2, a2 * v2); + CpuFastFill8(PIXEL_FILL(1), tileData + a1 * width, a2 * width); CopyWindowToVram(listWindow->windowId, COPYWIN_GFX); } else @@ -678,8 +679,8 @@ static void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2 u32 v3 = 16 - a1; u32 v4 = a2 - v3; - CpuFastFill8(PIXEL_FILL(1), tileData + a1 * v2, v3 * v2); - CpuFastFill8(PIXEL_FILL(1), tileData, v4 * v2); + CpuFastFill8(PIXEL_FILL(1), tileData + a1 * width, v3 * width); + CpuFastFill8(PIXEL_FILL(1), tileData, v4 * width); CopyWindowToVram(listWindow->windowId, COPYWIN_GFX); } @@ -689,19 +690,20 @@ static void sub_81C8B70(struct PokenavListMenuWindow *listWindow, s32 a1, s32 a2 CopyWindowToVram(listWindow->windowId, COPYWIN_MAP); } -void sub_81C8C64(struct PokenavListMenuWindow *listWindow, u32 a1) +// Pointless +static void SetListMarginTile(struct PokenavListMenuWindow *listWindow, bool32 draw) { u16 var; - u16 *v1 = (u16*)GetBgTilemapBuffer(GetWindowAttribute(listWindow->windowId, WINDOW_BG)); - v1 += ((listWindow->unkA << 6) + listWindow->x) - 1; + u16 *tilemapBuffer = (u16*)GetBgTilemapBuffer(GetWindowAttribute(listWindow->windowId, WINDOW_BG)); + tilemapBuffer += (listWindow->unkA << 6) + listWindow->x - 1; - if (a1 != 0) + if (draw) var = (listWindow->fillValue << 12) | (listWindow->tileOffset + 1); else var = (listWindow->fillValue << 12) | (listWindow->tileOffset); - v1[0] = var; - v1[0x20] = var; + tilemapBuffer[0] = var; + tilemapBuffer[0x20] = var; } // Print the trainer's name and title at the top of their check page @@ -713,7 +715,7 @@ static void PrintCheckPageTrainerName(struct PokenavListWindowState *state, stru list->iconDrawFunc(list->listWindow.windowId, state->windowTopIndex, list->listWindow.unkA); FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(4), 0, list->listWindow.unkA * 16, list->listWindow.width * 8, 16); AddTextPrinterParameterized3(list->listWindow.windowId, list->listWindow.fontId, 8, (list->listWindow.unkA * 16) + 1, colors, TEXT_SKIP_DRAW, list->itemTextBuffer); - sub_81C8C64(&list->listWindow, 1); + SetListMarginTile(&list->listWindow, TRUE); CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_FULL, 0, list->listWindow.unkA * 2, list->listWindow.width, 2); } @@ -723,7 +725,7 @@ static void PrintMatchCallListTrainerName(struct PokenavListWindowState *state, list->bufferItemFunc(state->listPtr + state->listItemSize * state->windowTopIndex, list->itemTextBuffer); FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.width * 8, 16); AddTextPrinterParameterized(list->listWindow.windowId, list->listWindow.fontId, list->itemTextBuffer, 8, list->listWindow.unkA * 16 + 1, TEXT_SKIP_DRAW, NULL); - sub_81C8C64(&list->listWindow, 0); + SetListMarginTile(&list->listWindow, FALSE); CopyWindowToVram(list->listWindow.windowId, COPYWIN_FULL); } @@ -745,8 +747,7 @@ static void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fie static void PrintMatchCallFlavorText(struct PokenavListWindowState *a0, struct PokenavSub17Substruct *list, u32 checkPageEntry) { // lines 1, 3, and 5 are the field names printed by PrintMatchCallFieldNames - static const u8 lineOffsets[CHECK_PAGE_ENTRY_COUNT] = - { + static const u8 lineOffsets[CHECK_PAGE_ENTRY_COUNT] = { [CHECK_PAGE_STRATEGY] = 2, [CHECK_PAGE_POKEMON] = 4, [CHECK_PAGE_INTRO_1] = 6, @@ -768,7 +769,7 @@ static const struct CompressedSpriteSheet sListArrowSpriteSheets[] = { { .data = sListArrow_Gfx, - .size = 192, + .size = 0xC0, .tag = GFXTAG_ARROW } }; @@ -852,7 +853,7 @@ static void CreateListArrowSprites(struct PokenavListWindowState *windowState, s list->rightArrow = &gSprites[spriteId]; x = list->listWindow.x * 8 + (list->listWindow.width - 1) * 4; - spriteId = CreateSprite(&sSpriteTemplate_UpDownArrow, x, list->listWindow.y * 8 + windowState->visibleEntries * 16, 7); + spriteId = CreateSprite(&sSpriteTemplate_UpDownArrow, x, list->listWindow.y * 8 + windowState->entriesOnscreen * 16, 7); list->downArrow = &gSprites[spriteId]; list->downArrow->oam.tileNum += 2; list->downArrow->callback = SpriteCB_DownArrow; @@ -954,19 +955,19 @@ static void InitPokenavListWindowState(struct PokenavListWindowState *dst, struc dst->windowTopIndex = template->startIndex; dst->listLength = template->count; dst->listItemSize = template->itemSize; - dst->visibleEntries = template->maxShowed; - if (dst->visibleEntries >= dst->listLength) + dst->entriesOnscreen = template->maxShowed; + if (dst->entriesOnscreen >= dst->listLength) { dst->windowTopIndex = 0; - dst->unk4 = 0; + dst->entriesOffscreen = 0; dst->selectedIndexOffset = template->startIndex; } else { - dst->unk4 = dst->listLength - dst->visibleEntries; - if (dst->windowTopIndex + dst->visibleEntries > dst->listLength) + dst->entriesOffscreen = dst->listLength - dst->entriesOnscreen; + if (dst->windowTopIndex + dst->entriesOnscreen > dst->listLength) { - dst->selectedIndexOffset = dst->windowTopIndex + dst->visibleEntries - dst->listLength; + dst->selectedIndexOffset = dst->windowTopIndex + dst->entriesOnscreen - dst->listLength; dst->windowTopIndex = template->startIndex - dst->selectedIndexOffset; } else diff --git a/src/pokenav_ribbons_list.c b/src/pokenav_ribbons_list.c index c70554eb0e..1d72f6a980 100644 --- a/src/pokenav_ribbons_list.c +++ b/src/pokenav_ribbons_list.c @@ -190,7 +190,7 @@ static u32 HandleRibbonsMonListInput(struct Pokenav_RibbonsMonList *list) } if (JOY_NEW(A_BUTTON)) { - list->monList->currIndex = GetSelectedPokenavListIndex(); + list->monList->currIndex = PokenavList_GetSelectedIndex(); list->saveMonList = 1; list->callback = RibbonsMonMenu_ToSummaryScreen; return RIBBONS_MON_LIST_FUNC_OPEN_RIBBONS_SUMMARY; @@ -230,7 +230,7 @@ static s32 GetRibbonsMonListCount(void) static s32 GetMonRibbonSelectedMonData(void) { struct Pokenav_RibbonsMonList * list = GetSubstructPtr(POKENAV_SUBSTRUCT_RIBBONS_MON_LIST); - s32 idx = GetSelectedPokenavListIndex(); + s32 idx = PokenavList_GetSelectedIndex(); return list->monList->monData[idx].data; } @@ -496,7 +496,7 @@ static u32 LoopedTask_RibbonsListMoveCursorUp(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -529,7 +529,7 @@ static u32 LoopedTask_RibbonsListMoveCursorDown(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -562,7 +562,7 @@ static u32 LoopedTask_RibbonsListMovePageUp(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -595,7 +595,7 @@ static u32 LoopedTask_RibbonsListMovePageDown(s32 state) } return LT_INC_AND_PAUSE; case 1: - if (IsMovePokenavListWindowTaskActive()) + if (PokenavList_IsMoveWindowTaskActive()) return LT_PAUSE; // fallthrough case 2: @@ -658,7 +658,7 @@ static void AddRibbonsMonListWindow(struct Pokenav_RibbonsMonMenu *menu) static void UpdateIndexNumberDisplay(struct Pokenav_RibbonsMonMenu *menu) { - s32 listIndex = GetSelectedPokenavListIndex(); + s32 listIndex = PokenavList_GetSelectedIndex(); s32 listCount = GetRibbonsMonListCount(); DrawListIndexNumber(menu->winid, listIndex + 1, listCount); CopyWindowToVram(menu->winid, COPYWIN_GFX); From c779d03b3e9032254bbd7a08f4c9203e14373933 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 15 Nov 2021 00:21:40 -0500 Subject: [PATCH 181/417] Rename pokenav_match_call_ui --- include/pokenav.h | 4 +- ld_script.txt | 4 +- ...pokenav_match_call_ui.c => pokenav_list.c} | 98 +++++++++---------- sym_ewram.txt | 2 +- 4 files changed, 54 insertions(+), 54 deletions(-) rename src/{pokenav_match_call_ui.c => pokenav_list.c} (90%) diff --git a/include/pokenav.h b/include/pokenav.h index b5eb20a7fc..34206d3ae6 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -323,7 +323,7 @@ bool32 CanViewRibbonsMenu(void); void SetPokenavVBlankCallback(void); void SetVBlankCallback_(IntrCallback callback); -// pokenav_match_call_ui.c +// pokenav_list.c bool32 CreatePokenavList(const struct BgTemplate *bgTemplate, struct PokenavListTemplate *listTemplate, s32 tileOffset); bool32 IsCreatePokenavListTaskActive(void); void DestroyPokenavList(void); @@ -337,7 +337,7 @@ void PokenavList_ToggleVerticalArrows(bool32 shouldHide); void PokenavList_DrawCurrentItemIcon(void); void PokenavList_EraseListForCheckPage(void); bool32 PokenavList_IsTaskActive(void); -void PrintCheckPageInfo(s16 a0); +void PrintCheckPageInfo(s16 delta); u32 PokenavList_GetTopIndex(void); void PokenavList_ReshowListFromCheckPage(void); diff --git a/ld_script.txt b/ld_script.txt index 257fb3c6e2..5a312cba27 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -310,7 +310,7 @@ SECTIONS { src/battle_pyramid_bag.o(.text); src/pokenav.o(.text); src/pokenav_main_menu.o(.text); - src/pokenav_match_call_ui.o(.text); + src/pokenav_list.o(.text); src/pokenav_menu_handler.o(.text); src/pokenav_menu_handler_gfx.o(.text); src/pokenav_match_call_1.o(.text); @@ -665,7 +665,7 @@ SECTIONS { src/battle_pyramid_bag.o(.rodata); src/pokenav.o(.rodata); src/pokenav_main_menu.o(.rodata); - src/pokenav_match_call_ui.o(.rodata); + src/pokenav_list.o(.rodata); src/pokenav_menu_handler.o(.rodata); src/pokenav_menu_handler_gfx.o(.rodata); src/pokenav_match_call_1.o(.rodata); diff --git a/src/pokenav_match_call_ui.c b/src/pokenav_list.c similarity index 90% rename from src/pokenav_match_call_ui.c rename to src/pokenav_list.c index 97437e3cdf..bdba1d2c09 100644 --- a/src/pokenav_match_call_ui.c +++ b/src/pokenav_list.c @@ -37,7 +37,7 @@ struct PokenavListWindowState { void * listPtr; }; -struct PokenavSub17Substruct +struct PokenavListSub { struct PokenavListMenuWindow listWindow; u32 unk10; @@ -57,33 +57,33 @@ struct PokenavSub17Substruct u8 itemTextBuffer[64]; }; -struct PokenavSub17 +struct PokenavList { - struct PokenavSub17Substruct list; + struct PokenavListSub list; u8 tilemapBuffer[BG_SCREEN_SIZE]; struct PokenavListWindowState windowState; s32 eraseIndex; u32 loopedTaskId; }; -static void InitPokenavListBg(struct PokenavSub17 *); -static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *, const struct BgTemplate *, struct PokenavListTemplate *, s32); +static void InitPokenavListBg(struct PokenavList *); +static bool32 CopyPokenavListMenuTemplate(struct PokenavListSub *, const struct BgTemplate *, struct PokenavListTemplate *, s32); static void InitPokenavListWindowState(struct PokenavListWindowState *, struct PokenavListTemplate *); static void SpriteCB_UpArrow(struct Sprite *); static void SpriteCB_DownArrow(struct Sprite *); static void SpriteCB_RightArrow(struct Sprite *); -static void ToggleListArrows(struct PokenavSub17Substruct *, u32); -static void DestroyListArrows(struct PokenavSub17Substruct *); -static void CreateListArrowSprites(struct PokenavListWindowState *, struct PokenavSub17Substruct *); +static void ToggleListArrows(struct PokenavListSub *, u32); +static void DestroyListArrows(struct PokenavListSub *); +static void CreateListArrowSprites(struct PokenavListWindowState *, struct PokenavListSub *); static void LoadListArrowGfx(void); -static void PrintMatchCallFlavorText(struct PokenavListWindowState *, struct PokenavSub17Substruct *, u32); -static void PrintMatchCallFieldNames(struct PokenavSub17Substruct *, u32); -static void PrintMatchCallListTrainerName(struct PokenavListWindowState *, struct PokenavSub17Substruct *); -static void PrintCheckPageTrainerName(struct PokenavListWindowState *, struct PokenavSub17Substruct *); +static void PrintMatchCallFlavorText(struct PokenavListWindowState *, struct PokenavListSub *, u32); +static void PrintMatchCallFieldNames(struct PokenavListSub *, u32); +static void PrintMatchCallListTrainerName(struct PokenavListWindowState *, struct PokenavListSub *); +static void PrintCheckPageTrainerName(struct PokenavListWindowState *, struct PokenavListSub *); static void EraseListEntry(struct PokenavListMenuWindow *, s32, s32); -static void CreateMoveListWindowTask(s32, struct PokenavSub17Substruct *); -static void PrintListItems(void *, u32, u32, u32, u32, struct PokenavSub17Substruct *); -static void InitListItems(struct PokenavListWindowState *, struct PokenavSub17Substruct *); +static void CreateMoveListWindowTask(s32, struct PokenavListSub *); +static void PrintListItems(void *, u32, u32, u32, u32, struct PokenavListSub *); +static void InitListItems(struct PokenavListWindowState *, struct PokenavListSub *); static void InitPokenavListWindow(struct PokenavListMenuWindow *); static u32 LoopedTask_CreatePokenavList(s32); static bool32 IsPrintListItemsTaskActive(void); @@ -100,7 +100,7 @@ static EWRAM_DATA u32 sMoveWindowDownIndex = 0; // Read, but pointlessly bool32 CreatePokenavList(const struct BgTemplate *bgTemplate, struct PokenavListTemplate *listTemplate, s32 tileOffset) { - struct PokenavSub17 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_LIST, sizeof(struct PokenavSub17)); + struct PokenavList *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_LIST, sizeof(struct PokenavList)); if (structPtr == NULL) return FALSE; @@ -119,7 +119,7 @@ bool32 IsCreatePokenavListTaskActive(void) void DestroyPokenavList(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); DestroyListArrows(&structPtr->list); RemoveWindow(structPtr->list.listWindow.windowId); FreePokenavSubstruct(POKENAV_SUBSTRUCT_LIST); @@ -127,7 +127,7 @@ void DestroyPokenavList(void) static u32 LoopedTask_CreatePokenavList(s32 state) { - struct PokenavSub17 *structPtr; + struct PokenavList *structPtr; if (IsDma3ManagerBusyWithBgCopy()) return LT_PAUSE; @@ -163,7 +163,7 @@ static u32 LoopedTask_CreatePokenavList(s32 state) } } -static void InitPokenavListBg(struct PokenavSub17 *a0) +static void InitPokenavListBg(struct PokenavList *a0) { u16 tileNum = (a0->list.listWindow.fillValue << 12) | a0->list.listWindow.tileOffset; BgDmaFill(a0->list.listWindow.bg, PIXEL_FILL(1), a0->list.listWindow.tileOffset, 1); @@ -183,7 +183,7 @@ static void InitPokenavListWindow(struct PokenavListMenuWindow *listWindow) CopyWindowToVram(listWindow->windowId, COPYWIN_MAP); } -static void InitListItems(struct PokenavListWindowState *windowState, struct PokenavSub17Substruct *a1) +static void InitListItems(struct PokenavListWindowState *windowState, struct PokenavListSub *a1) { s32 numToPrint = windowState->listLength - windowState->windowTopIndex; if (numToPrint > windowState->entriesOnscreen) @@ -192,7 +192,7 @@ static void InitListItems(struct PokenavListWindowState *windowState, struct Pok PrintListItems(windowState->listPtr, windowState->windowTopIndex, numToPrint, windowState->listItemSize, 0, a1); } -static void PrintListItems(void * listPtr, u32 topIndex, u32 numItems, u32 itemSize, u32 a4, struct PokenavSub17Substruct *list) +static void PrintListItems(void * listPtr, u32 topIndex, u32 numItems, u32 itemSize, u32 a4, struct PokenavListSub *list) { if (numItems == 0) return; @@ -214,7 +214,7 @@ static bool32 IsPrintListItemsTaskActive(void) static u32 LoopedTask_PrintListItems(s32 state) { u32 row; - struct PokenavSub17Substruct *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavListSub *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); switch (state) { @@ -251,14 +251,14 @@ static u32 LoopedTask_PrintListItems(s32 state) static bool32 ShouldShowUpArrow(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return (structPtr->windowState.windowTopIndex != 0); } static bool32 ShouldShowDownArrow(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); struct PokenavListWindowState *subPtr = &structPtr->windowState; return (subPtr->windowTopIndex + subPtr->entriesOnscreen < subPtr->listLength); @@ -266,7 +266,7 @@ static bool32 ShouldShowDownArrow(void) static void MoveListWindow(s32 delta, bool32 printItems) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); struct PokenavListWindowState *subPtr = &structPtr->windowState; if (delta < 0) @@ -289,7 +289,7 @@ static void MoveListWindow(s32 delta, bool32 printItems) subPtr->windowTopIndex += delta; } -static void CreateMoveListWindowTask(s32 delta, struct PokenavSub17Substruct *list) +static void CreateMoveListWindowTask(s32 delta, struct PokenavListSub *list) { list->startBgY = GetBgY(list->listWindow.bg); list->endBgY = list->startBgY + (delta << 12); @@ -305,8 +305,8 @@ static u32 LoopedTask_MoveListWindow(s32 state) { s32 oldY, newY; bool32 finished; - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); - struct PokenavSub17Substruct *subPtr = &structPtr->list; + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavListSub *subPtr = &structPtr->list; switch (state) { @@ -342,13 +342,13 @@ static u32 LoopedTask_MoveListWindow(s32 state) bool32 PokenavList_IsMoveWindowTaskActive(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return IsLoopedTaskActive(structPtr->list.loopedTaskId); } static struct PokenavListWindowState *GetPokenavListWindowState(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return &structPtr->windowState; } @@ -462,14 +462,14 @@ u32 PokenavList_GetTopIndex(void) void PokenavList_EraseListForCheckPage(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); structPtr->eraseIndex = 0; structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_EraseListForCheckPage, 6); } void PrintCheckPageInfo(s16 delta) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); structPtr->windowState.windowTopIndex += delta; structPtr->eraseIndex = 0; structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_PrintCheckPageInfo, 6); @@ -477,20 +477,20 @@ void PrintCheckPageInfo(s16 delta) void PokenavList_ReshowListFromCheckPage(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); structPtr->eraseIndex = 0; structPtr->loopedTaskId = CreateLoopedTask(LoopedTask_ReshowListFromCheckPage, 6); } bool32 PokenavList_IsTaskActive(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); return IsLoopedTaskActive(structPtr->loopedTaskId); } void PokenavList_DrawCurrentItemIcon(void) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); struct PokenavListWindowState *subPtr = &structPtr->windowState; structPtr->list.iconDrawFunc(structPtr->list.listWindow.windowId, subPtr->windowTopIndex + subPtr->selectedIndexOffset, (structPtr->list.listWindow.unkA + subPtr->selectedIndexOffset) & 0xF); CopyWindowToVram(structPtr->list.listWindow.windowId, COPYWIN_MAP); @@ -498,7 +498,7 @@ void PokenavList_DrawCurrentItemIcon(void) static u32 LoopedTask_EraseListForCheckPage(s32 state) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); switch (state) { @@ -545,7 +545,7 @@ static u32 LoopedTask_EraseListForCheckPage(s32 state) static u32 LoopedTask_PrintCheckPageInfo(s32 state) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); if (IsDma3ManagerBusyWithBgCopy()) return LT_PAUSE; @@ -583,9 +583,9 @@ static u32 LoopedTask_PrintCheckPageInfo(s32 state) static u32 LoopedTask_ReshowListFromCheckPage(s32 state) { - struct PokenavSub17 *structPtr; + struct PokenavList *structPtr; struct PokenavListWindowState *windowState; - struct PokenavSub17Substruct *subPtr0; + struct PokenavListSub *subPtr0; s32 r5, *ptr; if (IsDma3ManagerBusyWithBgCopy()) @@ -707,7 +707,7 @@ static void SetListMarginTile(struct PokenavListMenuWindow *listWindow, bool32 d } // Print the trainer's name and title at the top of their check page -static void PrintCheckPageTrainerName(struct PokenavListWindowState *state, struct PokenavSub17Substruct *list) +static void PrintCheckPageTrainerName(struct PokenavListWindowState *state, struct PokenavListSub *list) { u8 colors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_RED}; @@ -720,7 +720,7 @@ static void PrintCheckPageTrainerName(struct PokenavListWindowState *state, stru } // Print the trainer's name and title for the list (to replace the check page name and title, which has a red background) -static void PrintMatchCallListTrainerName(struct PokenavListWindowState *state, struct PokenavSub17Substruct *list) +static void PrintMatchCallListTrainerName(struct PokenavListWindowState *state, struct PokenavListSub *list) { list->bufferItemFunc(state->listPtr + state->listItemSize * state->windowTopIndex, list->itemTextBuffer); FillWindowPixelRect(list->listWindow.windowId, PIXEL_FILL(1), 0, list->listWindow.unkA * 16, list->listWindow.width * 8, 16); @@ -729,7 +729,7 @@ static void PrintMatchCallListTrainerName(struct PokenavListWindowState *state, CopyWindowToVram(list->listWindow.windowId, COPYWIN_FULL); } -static void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fieldId) +static void PrintMatchCallFieldNames(struct PokenavListSub *list, u32 fieldId) { const u8 *fieldNames[] = { gText_PokenavMatchCall_Strategy, @@ -744,7 +744,7 @@ static void PrintMatchCallFieldNames(struct PokenavSub17Substruct *list, u32 fie CopyWindowRectToVram(list->listWindow.windowId, COPYWIN_GFX, 0, top << 1, list->listWindow.width, 2); } -static void PrintMatchCallFlavorText(struct PokenavListWindowState *a0, struct PokenavSub17Substruct *list, u32 checkPageEntry) +static void PrintMatchCallFlavorText(struct PokenavListWindowState *a0, struct PokenavListSub *list, u32 checkPageEntry) { // lines 1, 3, and 5 are the field names printed by PrintMatchCallFieldNames static const u8 lineOffsets[CHECK_PAGE_ENTRY_COUNT] = { @@ -844,7 +844,7 @@ static void LoadListArrowGfx(void) Pokenav_AllocAndLoadPalettes(sListArrowPalettes); } -static void CreateListArrowSprites(struct PokenavListWindowState *windowState, struct PokenavSub17Substruct *list) +static void CreateListArrowSprites(struct PokenavListWindowState *windowState, struct PokenavListSub *list) { u32 spriteId; s16 x; @@ -864,7 +864,7 @@ static void CreateListArrowSprites(struct PokenavListWindowState *windowState, s list->upArrow->callback = SpriteCB_UpArrow; } -static void DestroyListArrows(struct PokenavSub17Substruct *list) +static void DestroyListArrows(struct PokenavListSub *list) { DestroySprite(list->rightArrow); DestroySprite(list->upArrow); @@ -873,7 +873,7 @@ static void DestroyListArrows(struct PokenavSub17Substruct *list) FreeSpritePaletteByTag(PALTAG_ARROW); } -static void ToggleListArrows(struct PokenavSub17Substruct *list, bool32 invisible) +static void ToggleListArrows(struct PokenavListSub *list, bool32 invisible) { if (invisible) { @@ -894,7 +894,7 @@ static void ToggleListArrows(struct PokenavSub17Substruct *list, bool32 invisibl static void SpriteCB_RightArrow(struct Sprite *sprite) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); sprite->y2 = structPtr->windowState.selectedIndexOffset << 4; } @@ -940,7 +940,7 @@ static void SpriteCB_UpArrow(struct Sprite *sprite) void PokenavList_ToggleVerticalArrows(bool32 invisible) { - struct PokenavSub17 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); + struct PokenavList *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_LIST); structPtr->list.upArrow->sInvisible = invisible; structPtr->list.downArrow->sInvisible = invisible; } @@ -977,7 +977,7 @@ static void InitPokenavListWindowState(struct PokenavListWindowState *dst, struc } } -static bool32 CopyPokenavListMenuTemplate(struct PokenavSub17Substruct *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 tileOffset) +static bool32 CopyPokenavListMenuTemplate(struct PokenavListSub *dest, const struct BgTemplate *bgTemplate, struct PokenavListTemplate *template, s32 tileOffset) { struct WindowTemplate window; diff --git a/sym_ewram.txt b/sym_ewram.txt index a9ec00e3b9..414b7a3b23 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -143,7 +143,7 @@ .include "src/pokedex_area_region_map.o" .include "src/battle_pyramid_bag.o" .include "src/pokenav.o" - .include "src/pokenav_match_call_ui.o" + .include "src/pokenav_list.o" .include "src/menu_specialized.o" .include "src/faraway_island.o" .include "src/trainer_hill.o" From 14d78d76332a99f0942f1ad5c05f439ce27d789f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 15 Nov 2021 00:42:23 -0500 Subject: [PATCH 182/417] Finish match call menu doc --- .../{86226E0.pal => call_window.pal} | 0 .../{8622700.pal => list_window.pal} | 0 include/pokenav.h | 5 +- src/pokenav_match_call_1.c | 114 +++++++++--------- src/pokenav_match_call_2.c | 22 ++-- 5 files changed, 73 insertions(+), 68 deletions(-) rename graphics/pokenav/match_call/{86226E0.pal => call_window.pal} (100%) rename graphics/pokenav/match_call/{8622700.pal => list_window.pal} (100%) diff --git a/graphics/pokenav/match_call/86226E0.pal b/graphics/pokenav/match_call/call_window.pal similarity index 100% rename from graphics/pokenav/match_call/86226E0.pal rename to graphics/pokenav/match_call/call_window.pal diff --git a/graphics/pokenav/match_call/8622700.pal b/graphics/pokenav/match_call/list_window.pal similarity index 100% rename from graphics/pokenav/match_call/8622700.pal rename to graphics/pokenav/match_call/list_window.pal diff --git a/include/pokenav.h b/include/pokenav.h index 34206d3ae6..5951981365 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -407,10 +407,9 @@ void ResetBldCnt_(void); bool32 PokenavCallback_Init_MatchCall(void); u32 GetMatchCallCallback(void); void FreeMatchCallSubstruct1(void); -int sub_81CAE28(void); +int IsMatchCallListInitFinished(void); int GetNumberRegistered(void); -int sub_81CAE48(void); -struct PokenavMatchCallEntry *sub_81CAE94(void); +struct PokenavMatchCallEntry *GetMatchCallList(void); u16 GetMatchCallMapSec(int); bool32 ShouldDrawRematchPokeballIcon(int index); void ClearRematchPokeballIcon(u16 windowId, u32 a1); diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c index e0e5306e19..d56cfdb62e 100755 --- a/src/pokenav_match_call_1.c +++ b/src/pokenav_match_call_1.c @@ -14,26 +14,26 @@ #include "strings.h" #include "constants/songs.h" -struct Pokenav3Struct +struct Pokenav_MatchCallMenu { u16 optionCursorPos; u16 maxOptionId; const u8 *matchCallOptions; u16 headerId; u16 numRegistered; - u16 unkC; - u32 unk10; - u32 unk14; - u32 (*callback)(struct Pokenav3Struct*); + u16 numSpecialTrainers; + bool32 initFinished; + u32 loopedTaskId; + u32 (*callback)(struct Pokenav_MatchCallMenu*); struct PokenavMatchCallEntry matchCallEntries[MAX_REMATCH_ENTRIES - 1]; }; -static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *); -static u32 GetExitMatchCallMenuId(struct Pokenav3Struct *); -static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *); -static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *); -static u32 CB2_HandleCallExitInput(struct Pokenav3Struct *); -static u32 sub_81CAD20(s32); +static u32 CB2_HandleMatchCallInput(struct Pokenav_MatchCallMenu *); +static u32 GetExitMatchCallMenuId(struct Pokenav_MatchCallMenu *); +static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav_MatchCallMenu *); +static u32 CB2_HandleCheckPageInput(struct Pokenav_MatchCallMenu *); +static u32 CB2_HandleCallExitInput(struct Pokenav_MatchCallMenu *); +static u32 LoopedTask_BuildMatchCallList(s32); static bool32 ShouldDoNearbyMessage(void); #include "data/text/match_call_messages.h" @@ -53,20 +53,20 @@ static const u8 sMatchCallOptionsHasCheckPage[] = bool32 PokenavCallback_Init_MatchCall(void) { - struct Pokenav3Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN, sizeof(struct Pokenav3Struct)); + struct Pokenav_MatchCallMenu *state = AllocSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN, sizeof(struct Pokenav_MatchCallMenu)); if (!state) return FALSE; state->callback = CB2_HandleMatchCallInput; state->headerId = 0; - state->unk10 = 0; - state->unk14 = CreateLoopedTask(sub_81CAD20, 1); + state->initFinished = FALSE; + state->loopedTaskId = CreateLoopedTask(LoopedTask_BuildMatchCallList, 1); return TRUE; } u32 GetMatchCallCallback(void) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); return state->callback(state); } @@ -75,7 +75,7 @@ void FreeMatchCallSubstruct1(void) FreePokenavSubstruct(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); } -static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) +static u32 CB2_HandleMatchCallInput(struct Pokenav_MatchCallMenu *state) { int selection; @@ -125,20 +125,20 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state) return POKENAV_MC_FUNC_NONE; } -static u32 GetExitMatchCallMenuId(struct Pokenav3Struct *state) +static u32 GetExitMatchCallMenuId(struct Pokenav_MatchCallMenu *state) { return POKENAV_MAIN_MENU_CURSOR_ON_MATCH_CALL; } -static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state) +static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav_MatchCallMenu *state) { - if ((JOY_NEW(DPAD_UP)) && state->optionCursorPos) + if (JOY_NEW(DPAD_UP) && state->optionCursorPos) { state->optionCursorPos--; return POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR; } - if ((JOY_NEW(DPAD_DOWN)) && state->optionCursorPos < state->maxOptionId) + if (JOY_NEW(DPAD_DOWN) && state->optionCursorPos < state->maxOptionId) { state->optionCursorPos++; return POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR; @@ -175,7 +175,7 @@ static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state) return POKENAV_MC_FUNC_NONE; } -static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *state) +static u32 CB2_HandleCheckPageInput(struct Pokenav_MatchCallMenu *state) { if (JOY_REPEAT(DPAD_UP)) return POKENAV_MC_FUNC_CHECK_PAGE_UP; @@ -191,7 +191,7 @@ static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *state) return POKENAV_MC_FUNC_NONE; } -static u32 CB2_HandleCallExitInput(struct Pokenav3Struct *state) +static u32 CB2_HandleCallExitInput(struct Pokenav_MatchCallMenu *state) { if (JOY_NEW(A_BUTTON | B_BUTTON)) { @@ -202,10 +202,10 @@ static u32 CB2_HandleCallExitInput(struct Pokenav3Struct *state) return POKENAV_MC_FUNC_NONE; } -static u32 sub_81CAD20(s32 taskState) +static u32 LoopedTask_BuildMatchCallList(s32 taskState) { int i, j; - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); switch (taskState) { case 0: @@ -213,6 +213,7 @@ static u32 sub_81CAD20(s32 taskState) state->numRegistered = 0; return LT_INC_AND_CONTINUE; case 1: + // Load special trainers (e.g. Rival, gym leaders) for (i = 0, j = state->headerId; i < 30; i++, j++) { if (MatchCall_GetEnabled(j)) @@ -225,7 +226,7 @@ static u32 sub_81CAD20(s32 taskState) if (++state->headerId >= MC_HEADER_COUNT) { - state->unkC = state->headerId; + state->numSpecialTrainers = state->headerId; state->headerId = 0; return LT_INC_AND_CONTINUE; } @@ -233,6 +234,7 @@ static u32 sub_81CAD20(s32 taskState) return LT_CONTINUE; case 2: + // Load normal trainers for (i = 0, j = state->headerId; i < 30; i++, j++) { if (!MatchCall_HasRematchId(state->headerId) && IsRematchEntryRegistered(state->headerId)) @@ -249,7 +251,7 @@ static u32 sub_81CAD20(s32 taskState) return LT_CONTINUE; case 3: - state->unk10 = 1; + state->initFinished = TRUE; break; } @@ -264,55 +266,58 @@ bool32 IsRematchEntryRegistered(int rematchIndex) return FALSE; } -int sub_81CAE28(void) +int IsMatchCallListInitFinished(void) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); - return state->unk10; + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + return state->initFinished; } int GetNumberRegistered(void) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); return state->numRegistered; } -int sub_81CAE48(void) +// Unused +static int GetNumSpecialTrainers(void) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); - return state->unkC; + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + return state->numSpecialTrainers; } -int unref_sub_81CAE58(void) +// Unused +static int GetNumNormalTrainers(void) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); - return state->numRegistered - state->unkC; + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + return state->numRegistered - state->numSpecialTrainers; } -int unref_sub_81CAE6C(int arg0) +// Unused +static int GetNormalTrainerHeaderId(int index) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); - arg0 += state->unkC; - if (arg0 >= state->numRegistered) + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + index += state->numSpecialTrainers; + if (index >= state->numRegistered) return REMATCH_TABLE_ENTRIES; - return state->matchCallEntries[arg0].headerId; + return state->matchCallEntries[index].headerId; } -struct PokenavMatchCallEntry *sub_81CAE94(void) +struct PokenavMatchCallEntry *GetMatchCallList(void) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); return state->matchCallEntries; } u16 GetMatchCallMapSec(int index) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); return state->matchCallEntries[index].mapSec; } bool32 ShouldDrawRematchPokeballIcon(int index) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); if (!state->matchCallEntries[index].isSpecialTrainer) index = state->matchCallEntries[index].headerId; else @@ -327,7 +332,7 @@ bool32 ShouldDrawRematchPokeballIcon(int index) int GetMatchCallTrainerPic(int index) { int headerId; - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); if (!state->matchCallEntries[index].isSpecialTrainer) { index = GetTrainerIdxByRematchIdx(state->matchCallEntries[index].headerId); @@ -348,7 +353,7 @@ int GetMatchCallTrainerPic(int index) const u8 *GetMatchCallMessageText(int index, bool8 *newRematchRequest) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); *newRematchRequest = FALSE; if (!Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType)) return gText_CallCantBeMadeHere; @@ -364,7 +369,7 @@ const u8 *GetMatchCallMessageText(int index, bool8 *newRematchRequest) const u8 *GetMatchCallFlavorText(int index, int checkPageEntry) { int rematchId; - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); if (state->matchCallEntries[index].isSpecialTrainer) { rematchId = MatchCall_GetRematchTableIdx(state->matchCallEntries[index].headerId); @@ -381,13 +386,13 @@ const u8 *GetMatchCallFlavorText(int index, int checkPageEntry) u16 GetMatchCallOptionCursorPos(void) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); return state->optionCursorPos; } u16 GetMatchCallOptionId(int optionId) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); if (state->maxOptionId < optionId) return MATCH_CALL_OPTION_COUNT; @@ -431,7 +436,7 @@ u8 GetMatchTableMapSectionId(int rematchIndex) int GetIndexDeltaOfNextCheckPageDown(int index) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); int count = 1; while (++index < state->numRegistered) { @@ -448,7 +453,7 @@ int GetIndexDeltaOfNextCheckPageDown(int index) int GetIndexDeltaOfNextCheckPageUp(int index) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); int count = -1; while (--index >= 0) { @@ -463,7 +468,8 @@ int GetIndexDeltaOfNextCheckPageUp(int index) return 0; } -bool32 unref_sub_81CB16C(void) +// Unused +static bool32 HasRematchEntry(void) { int i; @@ -488,7 +494,7 @@ bool32 unref_sub_81CB16C(void) static bool32 ShouldDoNearbyMessage(void) { - struct Pokenav3Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); + struct Pokenav_MatchCallMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_MAIN); int selection = PokenavList_GetSelectedIndex(); if (!state->matchCallEntries[selection].isSpecialTrainer) { diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_2.c index d8704919f5..d7e9476f98 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_2.c @@ -56,7 +56,7 @@ struct Pokenav_MatchCallGfx static bool32 GetCurrentLoopedTaskActive(void); static u32 LoopedTask_OpenMatchCall(s32); static void CreateMatchCallList(void); -static void sub_81CBC1C(void); +static void DestroyMatchCallList(void); static void FreeMatchCallSprites(void); static void LoadCallWindowAndFade(struct Pokenav_MatchCallGfx *); static void DrawMatchCallLeftColumnWindows(struct Pokenav_MatchCallGfx *); @@ -119,12 +119,12 @@ static const u32 sMatchCallUI_Gfx[] = INCBIN_U32("graphics/pokenav/match_call/ui static const u32 sMatchCallUI_Tilemap[] = INCBIN_U32("graphics/pokenav/match_call/ui.bin.lz"); static const u16 sOptionsCursor_Pal[] = INCBIN_U16("graphics/pokenav/match_call/options_cursor.gbapal"); static const u32 sOptionsCursor_Gfx[] = INCBIN_U32("graphics/pokenav/match_call/options_cursor.4bpp.lz"); -static const u16 gUnknown_086226E0[] = INCBIN_U16("graphics/pokenav/match_call/86226E0.gbapal"); -static const u16 gUnknown_08622700[] = INCBIN_U16("graphics/pokenav/match_call/8622700.gbapal"); +static const u16 sCallWindow_Pal[] = INCBIN_U16("graphics/pokenav/match_call/call_window.gbapal"); +static const u16 sListWindow_Pal[] = INCBIN_U16("graphics/pokenav/match_call/list_window.gbapal"); static const u16 sPokeball_Pal[] = INCBIN_U16("graphics/pokenav/match_call/pokeball.gbapal"); static const u32 sPokeball_Gfx[] = INCBIN_U32("graphics/pokenav/match_call/pokeball.4bpp.lz"); -const struct BgTemplate sMatchCallBgTemplates[3] = +static const struct BgTemplate sMatchCallBgTemplates[3] = { { .bg = 1, @@ -223,7 +223,7 @@ static const struct CompressedSpriteSheet sOptionsCursorSpriteSheets[1] = {sOptionsCursor_Gfx, 0x40, GFXTAG_CURSOR} }; -const struct SpritePalette sOptionsCursorSpritePalettes[2] = +static const struct SpritePalette sOptionsCursorSpritePalettes[2] = { {sOptionsCursor_Pal, PALTAG_CURSOR} }; @@ -307,7 +307,7 @@ void FreeMatchCallSubstruct2(void) { struct Pokenav_MatchCallGfx *gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MATCH_CALL_OPEN); FreeMatchCallSprites(); - sub_81CBC1C(); + DestroyMatchCallList(); RemoveWindow(gfx->infoBoxWindowId); RemoveWindow(gfx->locWindowId); RemoveWindow(gfx->msgBoxWindowId); @@ -343,7 +343,7 @@ static u32 LoopedTask_OpenMatchCall(s32 state) BgDmaFill(1, 0, 0, 1); SetBgTilemapBuffer(1, gfx->bgTilemapBuffer1); FillBgTilemapBufferRect_Palette0(1, 0x1000, 0, 0, 32, 20); - CopyPaletteIntoBufferUnfaded(gUnknown_086226E0, 0x10, 0x20); + CopyPaletteIntoBufferUnfaded(sCallWindow_Pal, 0x10, 0x20); CopyBgTilemapBufferToVram(1); return LT_INC_AND_PAUSE; case 2: @@ -352,11 +352,11 @@ static u32 LoopedTask_OpenMatchCall(s32 state) LoadCallWindowAndFade(gfx); DecompressAndCopyTileDataToVram(3, sPokeball_Gfx, 0, 0, 0); - CopyPaletteIntoBufferUnfaded(gUnknown_08622700, 0x30, 0x20); + CopyPaletteIntoBufferUnfaded(sListWindow_Pal, 0x30, 0x20); CopyPaletteIntoBufferUnfaded(sPokeball_Pal, 0x50, 0x20); return LT_INC_AND_PAUSE; case 3: - if (FreeTempTileDataBuffersIfPossible() || !sub_81CAE28()) + if (FreeTempTileDataBuffersIfPossible() || !IsMatchCallListInitFinished()) return LT_PAUSE; CreateMatchCallList(); @@ -872,7 +872,7 @@ static u32 ExitMatchCall(s32 state) static void CreateMatchCallList(void) { struct PokenavListTemplate template; - template.list = (struct PokenavListItem *)sub_81CAE94(); + template.list = (struct PokenavListItem *)GetMatchCallList(); template.count = GetNumberRegistered(); template.itemSize = sizeof(struct PokenavListItem); template.startIndex = 0; @@ -888,7 +888,7 @@ static void CreateMatchCallList(void) CreateTask(Task_FlashPokeballIcons, 7); } -static void sub_81CBC1C(void) +static void DestroyMatchCallList(void) { DestroyPokenavList(); DestroyTask(FindTaskIdByFunc(Task_FlashPokeballIcons)); From 4275cf4b9033c6a4350057169af49fdcfa4a097a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 15 Nov 2021 01:23:27 -0500 Subject: [PATCH 183/417] Rename pokenav match call files --- include/pokenav.h | 4 ++-- ld_script.txt | 8 ++++---- src/{pokenav_match_call_2.c => pokenav_match_call_gfx.c} | 8 ++++---- src/{pokenav_match_call_1.c => pokenav_match_call_list.c} | 0 4 files changed, 10 insertions(+), 10 deletions(-) rename src/{pokenav_match_call_2.c => pokenav_match_call_gfx.c} (99%) rename src/{pokenav_match_call_1.c => pokenav_match_call_list.c} (100%) diff --git a/include/pokenav.h b/include/pokenav.h index 5951981365..d3edb14223 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -403,7 +403,7 @@ bool32 IsMenuHandlerLoopedTaskActive(void); void FreeMenuHandlerSubstruct2(void); void ResetBldCnt_(void); -// pokenav_match_call_1.c +// pokenav_match_call_list.c bool32 PokenavCallback_Init_MatchCall(void); u32 GetMatchCallCallback(void); void FreeMatchCallSubstruct1(void); @@ -424,7 +424,7 @@ int GetIndexDeltaOfNextCheckPageDown(int index); int GetIndexDeltaOfNextCheckPageUp(int index); bool32 IsRematchEntryRegistered(int index); -// pokenav_match_call_2.c +// pokenav_match_call_gfx.c bool32 OpenMatchCall(void); void CreateMatchCallLoopedTask(s32 index); bool32 IsMatchCallLoopedTaskActive(void); diff --git a/ld_script.txt b/ld_script.txt index 5a312cba27..b9302e47bf 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -313,8 +313,8 @@ SECTIONS { src/pokenav_list.o(.text); src/pokenav_menu_handler.o(.text); src/pokenav_menu_handler_gfx.o(.text); - src/pokenav_match_call_1.o(.text); - src/pokenav_match_call_2.o(.text); + src/pokenav_match_call_list.o(.text); + src/pokenav_match_call_gfx.o(.text); src/pokenav_region_map.o(.text); src/pokenav_conditions.o(.text); src/pokenav_conditions_gfx.o(.text); @@ -668,8 +668,8 @@ SECTIONS { src/pokenav_list.o(.rodata); src/pokenav_menu_handler.o(.rodata); src/pokenav_menu_handler_gfx.o(.rodata); - src/pokenav_match_call_1.o(.rodata); - src/pokenav_match_call_2.o(.rodata); + src/pokenav_match_call_list.o(.rodata); + src/pokenav_match_call_gfx.o(.rodata); src/pokenav_region_map.o(.rodata); src/pokenav_conditions_gfx.o(.rodata); src/pokenav_conditions_search_results.o(.rodata); diff --git a/src/pokenav_match_call_2.c b/src/pokenav_match_call_gfx.c similarity index 99% rename from src/pokenav_match_call_2.c rename to src/pokenav_match_call_gfx.c index d7e9476f98..056ab2f1d2 100755 --- a/src/pokenav_match_call_2.c +++ b/src/pokenav_match_call_gfx.c @@ -34,7 +34,7 @@ struct Pokenav_MatchCallGfx bool32 (*isTaskActiveCB)(void); u32 loopTaskId; u8 filler8[6]; - bool8 unkE; + bool8 skipHangUpSE; bool8 newRematchRequest; u16 locWindowId; u16 infoBoxWindowId; @@ -606,7 +606,7 @@ static u32 DoMatchCallMessage(s32 state) PrintCallingDots(gfx); PlaySE(SE_POKENAV_CALL); - gfx->unkE = 0; + gfx->skipHangUpSE = FALSE; return LT_INC_AND_PAUSE; case 2: if (WaitForCallingDotsText(gfx)) @@ -632,7 +632,7 @@ static u32 DoTrainerCloseByMessage(s32 state) PlaySE(SE_SELECT); DrawMsgBoxForCloseByMsg(gfx); PokenavList_ToggleVerticalArrows(TRUE); - gfx->unkE = 1; + gfx->skipHangUpSE = TRUE; return LT_INC_AND_PAUSE; case 1: if (IsDma3ManagerBusyWithBgCopy2(gfx)) @@ -657,7 +657,7 @@ static u32 CloseMatchCallMessage(s32 state) switch (state) { case 0: - if (!gfx->unkE) + if (!gfx->skipHangUpSE) PlaySE(SE_POKENAV_HANG_UP); PlaySE(SE_SELECT); diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_list.c similarity index 100% rename from src/pokenav_match_call_1.c rename to src/pokenav_match_call_list.c From d98bd4dba70eed415d36cb67e12c79d851b1964a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 15 Nov 2021 01:37:17 -0500 Subject: [PATCH 184/417] Name pokenav region map structs --- src/pokenav_region_map.c | 89 +++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/src/pokenav_region_map.c b/src/pokenav_region_map.c index 4b9ff9f10e..16ba480703 100755 --- a/src/pokenav_region_map.c +++ b/src/pokenav_region_map.c @@ -17,22 +17,25 @@ #include "constants/songs.h" #include "constants/region_map_sections.h" +#define GFXTAG_CITY_ZOOM 6 +#define PALTAG_CITY_ZOOM 11 + #define NUM_CITY_MAPS 22 -struct Pokenav5Struct +struct Pokenav_RegionMapMenu { - u8 filler0[0xC]; + u8 unused[12]; bool32 zoomDisabled; - u32 (*callback)(struct Pokenav5Struct *); + u32 (*callback)(struct Pokenav_RegionMapMenu *); }; -struct Pokenav5Struct_2 +struct Pokenav_RegionMapGfx { bool32 (*isTaskActiveCB)(void); u32 loopTaskId; u16 infoWindowId; struct Sprite *cityZoomTextSprites[3]; - u8 tilemapBuffer[0x800]; + u8 tilemapBuffer[BG_SCREEN_SIZE]; u8 cityZoomPics[NUM_CITY_MAPS][200]; }; @@ -43,9 +46,9 @@ struct CityMapEntry const u32 *tilemap; }; -static u32 HandleRegionMapInput(struct Pokenav5Struct *); -static u32 HandleRegionMapInputZoomDisabled(struct Pokenav5Struct *); -static u32 GetExitRegionMapMenuId(struct Pokenav5Struct *); +static u32 HandleRegionMapInput(struct Pokenav_RegionMapMenu *); +static u32 HandleRegionMapInputZoomDisabled(struct Pokenav_RegionMapMenu *); +static u32 GetExitRegionMapMenuId(struct Pokenav_RegionMapMenu *); static u32 LoopedTask_OpenRegionMap(s32); static u32 LoopedTask_DecompressCityMaps(s32); static bool32 GetCurrentLoopedTaskActive(void); @@ -53,15 +56,15 @@ static void FreeCityZoomViewGfx(void); static void LoadCityZoomViewGfx(void); static void DecompressCityMaps(void); static bool32 IsDecompressCityMapsActive(void); -static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *); +static void LoadPokenavRegionMapGfx(struct Pokenav_RegionMapGfx *); static bool32 TryFreeTempTileDataBuffers(void); -static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *); -static bool32 IsDma3ManagerBusyWithBgCopy_(struct Pokenav5Struct_2 *); +static void UpdateMapSecInfoWindow(struct Pokenav_RegionMapGfx *); +static bool32 IsDma3ManagerBusyWithBgCopy_(struct Pokenav_RegionMapGfx *); static void ChangeBgYForZoom(bool32); static bool32 IsChangeBgYForZoomActive(void); static void CreateCityZoomTextSprites(void); -static void DrawCityMap(struct Pokenav5Struct_2 *, int, int); -static void PrintLandmarkNames(struct Pokenav5Struct_2 *, int, int); +static void DrawCityMap(struct Pokenav_RegionMapGfx *, int, int); +static void PrintLandmarkNames(struct Pokenav_RegionMapGfx *, int, int); static void SetCityZoomTextInvisibility(bool32); static void Task_ChangeBgYForZoom(u8 taskId); static void UpdateCityZoomTextPosition(void); @@ -121,12 +124,12 @@ static const LoopedTask sRegionMapLoopTaskFuncs[] = static const struct CompressedSpriteSheet sCityZoomTextSpriteSheet[1] = { - {gRegionMapCityZoomText_Gfx, 0x800, 6} + {gRegionMapCityZoomText_Gfx, 0x800, GFXTAG_CITY_ZOOM} }; static const struct SpritePalette sCityZoomTilesSpritePalette[] = { - {gRegionMapCityZoomTiles_Pal, 11}, + {gRegionMapCityZoomTiles_Pal, PALTAG_CITY_ZOOM}, {} }; @@ -159,8 +162,8 @@ const struct OamData sCityZoomTextSprite_OamData = static const struct SpriteTemplate sCityZoomTextSpriteTemplate = { - .tileTag = 6, - .paletteTag = 11, + .tileTag = GFXTAG_CITY_ZOOM, + .paletteTag = PALTAG_CITY_ZOOM, .oam = &sCityZoomTextSprite_OamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -170,7 +173,7 @@ static const struct SpriteTemplate sCityZoomTextSpriteTemplate = u32 PokenavCallback_Init_RegionMap(void) { - struct Pokenav5Struct *state = AllocSubstruct(POKENAV_SUBSTRUCT_REGION_MAP_STATE, sizeof(struct Pokenav5Struct)); + struct Pokenav_RegionMapMenu *state = AllocSubstruct(POKENAV_SUBSTRUCT_REGION_MAP_STATE, sizeof(struct Pokenav_RegionMapMenu)); if (!state) return FALSE; @@ -195,11 +198,11 @@ void FreeRegionMapSubstruct1(void) u32 GetRegionMapCallback(void) { - struct Pokenav5Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_STATE); + struct Pokenav_RegionMapMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_STATE); return state->callback(state); } -static u32 HandleRegionMapInput(struct Pokenav5Struct *state) +static u32 HandleRegionMapInput(struct Pokenav_RegionMapMenu *state) { switch (DoRegionMapInputCallback()) { @@ -217,7 +220,7 @@ static u32 HandleRegionMapInput(struct Pokenav5Struct *state) return POKENAV_MAP_FUNC_NONE; } -static u32 HandleRegionMapInputZoomDisabled(struct Pokenav5Struct *state) +static u32 HandleRegionMapInputZoomDisabled(struct Pokenav_RegionMapMenu *state) { if (JOY_NEW(B_BUTTON)) { @@ -228,20 +231,20 @@ static u32 HandleRegionMapInputZoomDisabled(struct Pokenav5Struct *state) return POKENAV_MAP_FUNC_NONE; } -static u32 GetExitRegionMapMenuId(struct Pokenav5Struct *state) +static u32 GetExitRegionMapMenuId(struct Pokenav_RegionMapMenu *state) { return POKENAV_MAIN_MENU_CURSOR_ON_MAP; } bool32 GetZoomDisabled(void) { - struct Pokenav5Struct *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_STATE); + struct Pokenav_RegionMapMenu *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_STATE); return state->zoomDisabled; } bool32 OpenPokenavRegionMap(void) { - struct Pokenav5Struct_2 *state = AllocSubstruct(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM, sizeof(struct Pokenav5Struct_2)); + struct Pokenav_RegionMapGfx *state = AllocSubstruct(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM, sizeof(struct Pokenav_RegionMapGfx)); if (!state) return FALSE; @@ -252,20 +255,20 @@ bool32 OpenPokenavRegionMap(void) void CreateRegionMapLoopedTask(s32 index) { - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); state->loopTaskId = CreateLoopedTask(sRegionMapLoopTaskFuncs[index], 1); state->isTaskActiveCB = GetCurrentLoopedTaskActive; } bool32 IsRegionMapLoopedTaskActive(void) { - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); return state->isTaskActiveCB(); } void FreeRegionMapSubstruct2(void) { - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); FreeRegionMapIconResources(); FreeCityZoomViewGfx(); RemoveWindow(state->infoWindowId); @@ -285,7 +288,7 @@ static void VBlankCB_RegionMap(void) static bool32 GetCurrentLoopedTaskActive(void) { - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); return IsLoopedTaskActive(state->loopTaskId); } @@ -301,7 +304,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState) { int menuGfxId; struct RegionMap *regionMap; - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); switch (taskState) { case 0: @@ -377,7 +380,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState) static u32 LoopedTask_UpdateInfoAfterCursorMove(s32 taskState) { - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); switch (taskState) { case 0: @@ -420,7 +423,7 @@ static u32 LoopedTask_RegionMapZoomOut(s32 taskState) static u32 LoopedTask_RegionMapZoomIn(s32 taskState) { - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); switch (taskState) { case 0: @@ -492,14 +495,14 @@ static void LoadCityZoomViewGfx(void) static void FreeCityZoomViewGfx(void) { int i; - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); - FreeSpriteTilesByTag(6); - FreeSpritePaletteByTag(11); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + FreeSpriteTilesByTag(GFXTAG_CITY_ZOOM); + FreeSpritePaletteByTag(PALTAG_CITY_ZOOM); for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++) DestroySprite(state->cityZoomTextSprites[i]); } -static void LoadPokenavRegionMapGfx(struct Pokenav5Struct_2 *state) +static void LoadPokenavRegionMapGfx(struct Pokenav_RegionMapGfx *state) { BgDmaFill(1, PIXEL_FILL(0), 0x40, 1); BgDmaFill(1, PIXEL_FILL(1), 0x41, 1); @@ -527,7 +530,7 @@ static bool32 TryFreeTempTileDataBuffers(void) return FreeTempTileDataBuffersIfPossible(); } -static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) +static void UpdateMapSecInfoWindow(struct Pokenav_RegionMapGfx *state) { struct RegionMap *regionMap = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP); switch (regionMap->mapSecType) @@ -565,7 +568,7 @@ static void UpdateMapSecInfoWindow(struct Pokenav5Struct_2 *state) } } -static bool32 IsDma3ManagerBusyWithBgCopy_(struct Pokenav5Struct_2 *state) +static bool32 IsDma3ManagerBusyWithBgCopy_(struct Pokenav_RegionMapGfx *state) { return IsDma3ManagerBusyWithBgCopy(); } @@ -621,7 +624,7 @@ static bool32 IsDecompressCityMapsActive(void) static u32 LoopedTask_DecompressCityMaps(s32 taskState) { - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); if (taskState < NUM_CITY_MAPS) { LZ77UnCompWram(sPokenavCityMaps[taskState].tilemap, state->cityZoomPics[taskState]); @@ -631,7 +634,7 @@ static u32 LoopedTask_DecompressCityMaps(s32 taskState) return LT_FINISH; } -static void DrawCityMap(struct Pokenav5Struct_2 *state, int mapSecId, int pos) +static void DrawCityMap(struct Pokenav_RegionMapGfx *state, int mapSecId, int pos) { int i; for (i = 0; i < NUM_CITY_MAPS && (sPokenavCityMaps[i].mapSecId != mapSecId || sPokenavCityMaps[i].index != pos); i++) @@ -644,7 +647,7 @@ static void DrawCityMap(struct Pokenav5Struct_2 *state, int mapSecId, int pos) CopyToBgTilemapBufferRect(1, state->cityZoomPics[i], 18, 6, 10, 10); } -static void PrintLandmarkNames(struct Pokenav5Struct_2 *state, int mapSecId, int pos) +static void PrintLandmarkNames(struct Pokenav_RegionMapGfx *state, int mapSecId, int pos) { int i = 0; while (1) @@ -664,7 +667,7 @@ static void CreateCityZoomTextSprites(void) int i; int y; struct Sprite *sprite; - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); // When not zoomed in the text is still created but its pushed off screen if (!IsRegionMapZoomed()) @@ -724,7 +727,7 @@ static void SpriteCB_CityZoomText(struct Sprite *sprite) static void UpdateCityZoomTextPosition(void) { int i; - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); int y = 132 - (GetBgY(1) >> 8); for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++) state->cityZoomTextSprites[i]->y = y; @@ -733,7 +736,7 @@ static void UpdateCityZoomTextPosition(void) static void SetCityZoomTextInvisibility(bool32 invisible) { int i; - struct Pokenav5Struct_2 *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); + struct Pokenav_RegionMapGfx *state = GetSubstructPtr(POKENAV_SUBSTRUCT_REGION_MAP_ZOOM); for (i = 0; i < (int)ARRAY_COUNT(state->cityZoomTextSprites); i++) state->cityZoomTextSprites[i]->invisible = invisible; } From f85de6eca57ee9497bf81f023bd7784b3115f2ce Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 5 Aug 2021 12:46:11 -0400 Subject: [PATCH 185/417] Start event macro comment updates --- asm/macros/event.inc | 343 +++++++++--------- data/event_scripts.s | 2 +- .../AbandonedShip_CaptainsOffice/scripts.inc | 2 +- .../AbandonedShip_Corridors_B1F/scripts.inc | 2 +- .../scripts.inc | 8 +- .../scripts.inc | 2 +- .../BattleFrontier_OutsideWest/scripts.inc | 2 +- .../FallarborTown_CozmosHouse/scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/FortreeCity/scripts.inc | 2 +- data/maps/JaggedPass/scripts.inc | 2 +- .../scripts.inc | 22 +- data/maps/LilycoveCity_Harbor/scripts.inc | 8 +- data/maps/MauvilleCity_BikeShop/scripts.inc | 4 +- data/maps/MauvilleCity_GameCorner/scripts.inc | 56 +-- data/maps/MauvilleCity_House2/scripts.inc | 2 +- data/maps/MtChimney/scripts.inc | 10 +- data/maps/NewMauville_Entrance/scripts.inc | 2 +- data/maps/PetalburgCity_Gym/scripts.inc | 4 +- data/maps/Route109_SeashoreHouse/scripts.inc | 10 +- data/maps/Route111/scripts.inc | 2 +- data/maps/Route113_GlassWorkshop/scripts.inc | 2 +- .../Route114_FossilManiacsTunnel/scripts.inc | 4 +- data/maps/Route116/scripts.inc | 2 +- .../Route121_SafariZoneEntrance/scripts.inc | 10 +- .../scripts.inc | 10 +- .../RustboroCity_DevonCorp_2F/scripts.inc | 8 +- .../ShoalCave_LowTideEntranceRoom/scripts.inc | 6 +- data/maps/SlateportCity_Harbor/scripts.inc | 2 +- .../scripts.inc | 8 +- .../SlateportCity_PokemonFanClub/scripts.inc | 10 +- data/scripts/berry_blender.inc | 12 +- data/scripts/berry_tree.inc | 4 +- data/scripts/cable_club.inc | 16 +- data/scripts/gift_aurora_ticket.inc | 4 +- data/scripts/gift_mystic_ticket.inc | 4 +- data/scripts/gift_old_sea_map.inc | 4 +- data/scripts/kecleon.inc | 4 +- data/scripts/lilycove_lady.inc | 2 +- data/scripts/obtain_item.inc | 77 ++-- data/scripts/roulette.inc | 4 +- data/scripts/std_msgbox.inc | 3 +- 42 files changed, 352 insertions(+), 333 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 27a4397258..01a7889fec 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -56,20 +56,20 @@ STD_OBTAIN_DECORATION = 7 STD_REGISTER_MATCH_CALL = 8 - @ Calls the standard function at index function. + @ Executes the script in gStdScripts at index function. .macro callstd function:req .byte 0x09 .byte \function .endm - @ If the result of the last comparison matches condition (see Comparison operators), jumps to the standard function at index function. + @ If the result of the last comparison matches condition (see Comparison operators), jumps to the script in gStdScripts at index function. .macro gotostd_if condition:req, function:req .byte 0x0a .byte \condition .byte \function .endm - @ If the result of the last comparison matches condition (see Comparison operators), calls the standard function at index function. + @ If the result of the last comparison matches condition (see Comparison operators), calls the script in gStdScripts at index function. .macro callstd_if condition:req, function:req .byte 0x0b .byte \condition @@ -120,6 +120,7 @@ .4byte \source .endm + @ TODO @ Not sure. Judging from XSE's description I think it takes the least-significant byte in bank source and writes it to destination. .macro setptrbyte source:req, destination:req .byte 0x13 @@ -233,7 +234,7 @@ .endm @ Generic compare macro which attempts to deduce argument types based on their values - @ Any values between 0x4000 to 0x40FF and 0x8000 to 0x8015 are considered event variable identifiers + @ Any values between VARS_START to VARS_END and SPECIAL_VARS_START to SPECIAL_VARS_END are considered event variable identifiers .macro compare var:req, arg:req .if ((\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END)) compare_var_to_var \var, \arg @@ -242,39 +243,33 @@ .endif .endm - @ Calls the native C function stored at `func`. + @ Calls the native C function stored at func. .macro callnative func:req .byte 0x23 .4byte \func .endm - @ Replaces the script with the function stored at `func`. Execution returns to the bytecode script when func returns TRUE. + @ Replaces the script with the function stored at func. Execution returns to the bytecode script when func returns TRUE. .macro gotonative func:req .byte 0x24 .4byte \func .endm - @ Calls a special function; that is, a function designed for use by scripts and listed in a table of pointers. + @ Calls a function listed in the table in data/specials.inc. .macro special function:req .byte 0x25 .2byte SPECIAL_\function .endm - @ Calls a special function. That function's output (if any) will be written to the variable you specify. + @ Calls a function listed in the table in data/specials.inc. + @ That function's output (if any) will be written to the variable specified by 'output'. .macro specialvar output:req, function:req .byte 0x26 .2byte \output .2byte SPECIAL_\function .endm - @ temporary solution - .macro specialvar_ output:req, functionId:req - .byte 0x26 - .2byte \output - .2byte \functionId - .endm - - @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific + @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific @ commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock @ state, the script will remain blocked indefinitely (essentially a hang). .macro waitstate @@ -287,46 +282,46 @@ .2byte \frames .endm - @ Sets a to 1. - .macro setflag a:req + @ Sets flag to TRUE. + .macro setflag flag:req .byte 0x29 - .2byte \a + .2byte \flag .endm - @ Sets a to 0. - .macro clearflag a:req + @ Sets flag to FALSE. + .macro clearflag flag:req .byte 0x2a - .2byte \a + .2byte \flag .endm - @ Compares a to 1. - .macro checkflag a:req + @ Compares flag to TRUE and stores the result in comparisonResult to be used by goto_if, etc + @ See additional _if_unset and _if_set macros + .macro checkflag flag:req .byte 0x2b - .2byte \a + .2byte \flag .endm - @ Initializes the RTC`s local time offset to the given hour and minute. In FireRed, this command is a nop. + @ Initializes the RTC`s local time offset to the given hour and minute. .macro initclock hour:req, minute:req .byte 0x2c .2byte \hour .2byte \minute .endm - @ Runs time based events. In FireRed, this command is a nop. + @ Runs time based events. .macro dotimebasedevents .byte 0x2d .endm - @ Sets the values of variables 0x8000, 0x8001, and 0x8002 to the current hour, minute, and second. In FRLG, - @ this command sets those variables to zero. + @ Sets the values of variables VAR_0x8000, VAR_0x8001, and VAR_0x8002 to the current hour, minute, and second. .macro gettime .byte 0x2e .endm - @ Plays the specified (sound_number) sound. Only one sound may play at a time, with newer ones interrupting older ones. - .macro playse sound_number:req + @ Plays the specified (song) sound. Only one sound may play at a time, with newer ones interrupting older ones. + .macro playse song:req .byte 0x2f - .2byte \sound_number + .2byte \song .endm @ Blocks script execution until the currently-playing sound (triggered by playse) finishes playing. @@ -335,9 +330,9 @@ .endm @ Plays the fanfare specified by the song number. If the specified song is not a fanfare it will instead play the first song in sFanfares. - .macro playfanfare songNumber:req + .macro playfanfare song:req .byte 0x31 - .2byte \songNumber + .2byte \song .endm @ Blocks script execution until all currently-playing fanfares finish. @@ -345,18 +340,18 @@ .byte 0x32 .endm - @ Plays the specified (song_number) song. If save_song is TRUE, the - @ specified (song_number) will be saved as if savebgm was called with it. - .macro playbgm song_number:req, save_song:req + @ Plays the specified song. If save_song is TRUE, the + @ specified song will be saved as if savebgm was called with it. + .macro playbgm song:req, save_song:req .byte 0x33 - .2byte \song_number + .2byte \song .byte \save_song .endm - @ Saves the specified (song_number) song to be played later. - .macro savebgm song_number:req + @ Saves the specified song to be played later. + .macro savebgm song:req .byte 0x34 - .2byte \song_number + .2byte \song .endm @ Crossfades the currently-playing song into the map's default song. @@ -364,10 +359,10 @@ .byte 0x35 .endm - @ Crossfades the currently-playng song into the specified (song_number) song. - .macro fadenewbgm song_number:req + @ Crossfades the currently-playng song into the specified song. + .macro fadenewbgm song:req .byte 0x36 - .2byte \song_number + .2byte \song .endm @ Fades out the currently-playing song. @@ -382,32 +377,37 @@ .byte \speed .endm - @ Sends the player to Warp warp on Map bank.map. If the specified warp is 0xFF, - @ then the player will instead be sent to (X, Y) on the map. - .macro warp map:req, warp:req, X:req, Y:req + @ Warps the player to the specified map. + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro warp map:req, warp:req, x=0, y=0 .byte 0x39 map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Clone of warp that does not play a sound effect. - .macro warpsilent map:req, warp:req, X:req, Y:req + @ Warps the player to the specified map without playing a sound effect. + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro warpsilent map:req, warp:req, x=0, y=0 .byte 0x3a map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Clone of warp that plays a door opening animation before stepping upwards into it. - .macro warpdoor map:req, warp:req, X:req, Y:req + @ Warps the player to the specified map and plays a door opening animation before stepping upwards into it. + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro warpdoor map:req, warp:req, x=0, y=0 .byte 0x3b map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm @ Warps the player to another map using a hole animation. @@ -416,57 +416,62 @@ map \map .endm - @ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E. - .macro warpteleport map:req, warp:req, X:req, Y:req + @ Warps the player to the specified map using a teleport effect. + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro warpteleport map:req, warp:req, x=0, y=0 .byte 0x3d map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm @ Sets the warp destination to be used later. - .macro setwarp map:req, warp:req, X:req, Y:req + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro setwarp map:req, warp:req, x=0, y=0 .byte 0x3e map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm + @ TODO @ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to. @ Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). - .macro setdynamicwarp map:req, warp:req, X:req, Y:req + .macro setdynamicwarp map:req, warp:req, x:req, y:req .byte 0x3f map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm @ Sets the destination that diving or emerging from a dive will take the player to. - .macro setdivewarp map:req, warp:req, X:req, Y:req + .macro setdivewarp map:req, warp:req, x:req, y:req .byte 0x40 map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm @ Sets the destination that falling into a hole will take the player to. - .macro setholewarp map:req, warp:req, X:req, Y:req + .macro setholewarp map:req, warp:req, x:req, y:req .byte 0x41 map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Retrieves the player's zero-indexed X- and Y-coordinates in the map, and stores them in the specified variables. - .macro getplayerxy X:req, Y:req + @ Retrieves the player's zero-indexed x- and y-coordinates in the map, and stores them in the specified variables. + .macro getplayerxy x:req, y:req .byte 0x42 - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm @ Retrieves the number of Pokemon in the player's party, and stores that number in VAR_RESULT. @@ -482,7 +487,8 @@ .2byte \quantity .endm - @ Removes quantity of item index from the player's Bag. + @ Removes quantity of item index from the player's Bag. If the player has fewer than 'quantity' in their bag + @ then none will be removed and VAR_RESULT will be set to FALSE. Otherwise it will be set to TRUE. .macro removeitem index:req, quantity=1 .byte 0x45 .2byte \index @@ -491,7 +497,7 @@ @ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to @ TRUE if there is room, or FALSE is there is no room. - .macro checkitemspace index:req, quantity:req + .macro checkitemspace index:req, quantity=1 .byte 0x46 .2byte \index .2byte \quantity @@ -499,53 +505,53 @@ @ Checks if the player has quantity or more of item index in their Bag. Sets VAR_RESULT to TRUE if the player has @ enough of the item, or FALSE if they have fewer than quantity of the item. - .macro checkitem index:req, quantity:req + .macro checkitem index:req, quantity=1 .byte 0x47 .2byte \index .2byte \quantity .endm @ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. - @ This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE). + @ This is used to show the name of the proper Bag pocket when the player receives an item via callstd. .macro checkitemtype index:req .byte 0x48 .2byte \index .endm - @ Adds a quantity amount of item index to the player's PC. Both arguments can be variables. - .macro addpcitem index:req, quantity:req + @ Adds a quantity amount of item index to the player's PC. + .macro addpcitem index:req, quantity=1 .byte 0x49 .2byte \index .2byte \quantity .endm - @ Checks for quantity amount of item index in the player's PC. Both arguments can be variables. - .macro checkpcitem index:req, quantity:req + @ Checks for quantity amount of item index in the player's PC. + .macro checkpcitem index:req, quantity=1 .byte 0x4a .2byte \index .2byte \quantity .endm - @ Adds decoration to the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + @ Adds decoration to the player's PC. .macro adddecoration decoration:req .byte 0x4b .2byte \decoration .endm - @ Removes a decoration from the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + @ Removes a decoration from the player's PC. .macro removedecoration decoration:req .byte 0x4c .2byte \decoration .endm - @ Checks for decoration in the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + @ Checks for decoration in the player's PC. .macro checkdecor decoration:req .byte 0x4d .2byte \decoration .endm - @ Checks if the player has enough space in their PC to hold decoration. Sets VAR_RESULT to TRUE if there is room, or - @ FALSE is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + @ Checks if the player has enough space in their PC to hold decoration. + @ Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room. .macro checkdecorspace decoration:req .byte 0x4e .2byte \decoration @@ -568,7 +574,7 @@ .endm @ Blocks script execution until the movements being applied to the specified (index) Object finish. - @ If the specified Object is 0x0000, then the command will block script execution until all Objects + @ If the specified Object is 0, then the command will block script execution until all Objects @ affected by applymovement finish their movements. If the specified Object is not currently being @ manipulated with applymovement, then this command does nothing. @ If no map is specified, then the current map is used. @@ -583,9 +589,8 @@ .endif .endm - @ Attempts to hide the specified (index) Object on the specified (map_group, map_num) map, - @ by setting its visibility flag if it has a valid one. If the Object does not have a valid - @ visibility flag, this command does nothing. + @ Attempts to despawn the specified (index) Object on the specified (map_group, map_num) map. + @ It also sets the object's visibility flag if it has one. @ If no map is specified, then the current map is used. .macro removeobject index:req, map .ifb \map @@ -598,8 +603,8 @@ .endif .endm - @ Unsets the specified (index) Object's visibility flag on the specified (map_group, map_num) map if it has a valid one. - @ If the Object does not have a valid visibility flag, this command does nothing. + @ Attempts to spawn the specified (index) Object the specified (map_group, map_num) map. + @ Note that unlike removeobject this does not modify the OObject's flag. @ If no map is specified, then the current map is used. .macro addobject index:req, map .ifb \map @@ -632,7 +637,7 @@ map \map .endm - @ If the script was called by an Object, then that Object will turn to face toward the metatile that the player is standing on. + @ If the script was called by an Object, then that Object will turn to face toward the player. .macro faceplayer .byte 0x5a .endm @@ -643,7 +648,7 @@ .byte \direction .endm - @ If the Trainer flag for Trainer index is not set, this command does absolutely nothing. + @ TODO .macro trainerbattle type:req, trainer:req, local_id:req, pointer1:req, pointer2, pointer3, pointer4 .byte 0x5c .byte \type @@ -996,15 +1001,15 @@ .2byte \slot .endm - @ Writes the name of the item at index item to the specified buffer. If the specified index is larger than - @ the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. + @ Writes the name of the item at index item to the specified buffer. If the specified index is >= ITEMS_COUNT, + @ then the name of ITEM_NONE ("????????") is buffered instead. .macro bufferitemname out:req, item:req .byte 0x80 .byte \out .2byte \item .endm - @ Writes the name of the decoration at index decoration to the specified buffer. In FireRed, this command is a nop. + @ Writes the name of the decoration at index 'decoration' to the specified buffer. .macro bufferdecorationname out:req, decoration:req .byte 0x81 .byte \out @@ -1052,7 +1057,7 @@ .4byte \products .endm - @ Apparent clone of pokemartdecoration. + @ Identical to pokemartdecoration, but with slight changes to the clerk dialogue. See uses of MART_TYPE_DECOR2. .macro pokemartdecoration2 products:req .byte 0x88 .4byte \products @@ -1064,7 +1069,7 @@ .2byte \word .endm - @ Sets a berry tree's specific berry and growth stage. In FireRed, this command is a nop. + @ Sets a berry tree's specific berry and growth stage. .macro setberrytree tree_id:req, berry:req, growth_stage:req .byte 0x8a .byte \tree_id @@ -1072,60 +1077,63 @@ .byte \growth_stage .endm - @ This allows you to choose a Pokemon to use in a contest. In FireRed, this command sets the byte at 0x03000EA8 to 0x01. + @ This allows you to choose a Pokemon to use in a contest .macro choosecontestmon .byte 0x8b .endm - @ Starts a contest. In FireRed, this command is a nop. + @ Starts a contest. .macro startcontest .byte 0x8c .endm - @ Shows the results of a contest. In FireRed, this command is a nop. + @ Shows the results of a contest. .macro showcontestresults .byte 0x8d .endm - @ Starts a contest over a link connection. In FireRed, this command is a nop. + @ Starts a contest over a link connection. .macro contestlinktransfer .byte 0x8e .endm - @ Stores a random integer between 0 and limit in VAR_RESULT. + @ Stores a random integer between 0 and limit (exclusive of limit) in VAR_RESULT. .macro random limit:req .byte 0x8f .2byte \limit .endm - @ If check is 0x00, this command adds value to the player's money. - .macro addmoney value:req, check:req + @ Adds value to the player's money. If adding 'value' money would exceed MAX_MONEY, the player's money is set to MAX_MONEY. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro addmoney value:req, disable=0 .byte 0x90 .4byte \value - .byte \check + .byte \disable .endm - @ If check is 0x00, this command subtracts value from the player's money. - .macro removemoney value:req, check:req + @ Subtracts value from the player's money. If the player has less than 'value' money, their money is set to 0. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro removemoney value:req, disable=0 .byte 0x91 .4byte \value - .byte \check + .byte \disable .endm - @ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player - @ has enough money, or FALSE if they do not. - .macro checkmoney value:req, check:req + @ Checks if the player has money >= value. VAR_RESULT is set to TRUE if the player has enough money, or FALSE if they do not. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro checkmoney value:req, disable=0 .byte 0x92 .4byte \value - .byte \check + .byte \disable .endm @ Spawns a secondary box showing how much money the player has. - .macro showmoneybox x:req, y:req, check:req + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro showmoneybox x:req, y:req, disable=0 .byte 0x93 .byte \x .byte \y - .byte \check + .byte \disable .endm @ Hides the secondary box spawned by showmoney. Consumption of the x and y arguments was dummied out. @@ -1135,15 +1143,16 @@ .byte 0 @ \y .endm - @ Updates the secondary box spawned by showmoney. Consumes but does not use arguments. - .macro updatemoneybox x:req, y:req + @ Updates the secondary box spawned by showmoney. Consumption of the x and y arguments was dummied out. + @ If 'disable' is set to anything but 0 then this command does nothing. + .macro updatemoneybox disable=0 .byte 0x95 - .byte \x - .byte \y - .byte 0 @ 1 = don't perform this command. Always 0 in vanilla. Why this is a thing is beyond me. + .byte 0 @ \x + .byte 0 @ \y + .byte \disable .endm - @ Gets the price reduction for the index given. In FireRed, this command is a nop. + @ Gets the price reduction for the index given. .macro getpricereduction index:req .byte 0x96 .2byte \index @@ -1177,7 +1186,7 @@ .4byte \pointer .endm - @ Executes the specified field move animation. + @ Executes the specified field effect animation. .macro dofieldeffect animation:req .byte 0x9c .2byte \animation @@ -1202,12 +1211,12 @@ .2byte \heallocation .endm - @ Checks the player's gender. If male, then MALE (0) is stored in VAR_RESULT. If female, then FEMALE (1) is stored in VAR_RESULT. + @ Checks the player's gender. Stores the result (MALE (0) or FEMALE (1)) in VAR_RESULT. .macro checkplayergender .byte 0xa0 .endm - @ Plays the specified (species) Pokemon's cry. You can use waitcry to block script execution until the sound finishes. + @ Plays the specified (species) Pokemon's cry. You can use waitmoncry to block script execution until the sound finishes. .macro playmoncry species:req, mode:req .byte 0xa1 .2byte \species @@ -1279,14 +1288,14 @@ .byte \direction .endm - @ Opens the door metatile at (X, Y) with an animation. + @ Opens the door metatile at (x, y) with an animation. .macro opendoor x:req, y:req .byte 0xac .2byte \x .2byte \y .endm - @ Closes the door metatile at (X, Y) with an animation. + @ Closes the door metatile at (x, y) with an animation. .macro closedoor x:req, y:req .byte 0xad .2byte \x @@ -1312,7 +1321,7 @@ .2byte \y .endm - @ In Emerald, this command consumes its parameters and does nothing. In FireRed, this command is a nop. + @ Consumes its parameters and does nothing. It is implemented but unused in Ruby/Sapphire. .macro addelevmenuitem a:req, b:req, c:req, d:req .byte 0xb1 .byte \a @@ -1321,27 +1330,33 @@ .2byte \d .endm - @ In FireRed and Emerald, this command is a nop. + @ Does nothing. It is implemented but unused in Ruby/Sapphire. .macro showelevmenu .byte 0xb2 .endm + @ Gets the number of coins the player has and stores it in the variable 'out'. .macro checkcoins out:req .byte 0xb3 .2byte \out .endm + @ Gives 'count' coins to the player, up to a total of MAX_COINS. + @ If the player already has MAX_COINS then VAR_RESULT is set to TRUE, otherwise it is set to FALSE. .macro addcoins count:req .byte 0xb4 .2byte \count .endm + @ Takes 'count' coins from the player. + @ If the player has fewer than 'count' coins then no coins are taken and VAR_RESULT is set to TRUE. + @ Otherwise VAR_RESULT is set to FALSE. .macro removecoins count:req .byte 0xb5 .2byte \count .endm - @ Prepares to start a wild battle against a species at Level level holding item. Running this command will not affect + @ Prepares to start a wild battle against a 'species' at 'level' holding 'item'. Running this command will not affect @ normal wild battles. You start the prepared battle with dowildbattle. .macro setwildbattle species:req, level:req, item:req .byte 0xb6 @@ -1419,14 +1434,16 @@ .byte \y .endm - @ Increases the value of the specified game stat by 1. The stat's value will not be allowed to exceed 0x00FFFFFF. + @ Increases the value of the specified game stat by 1. The maximum value of a stat is 0xFFFFFF. See include/constants/game_stat.h .macro incrementgamestat stat:req .byte 0xc3 .byte \stat .endm @ Sets the destination that using an Escape Rope or Dig will take the player to. - .macro setescapewarp map:req, warp:req, x:req, y:req + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro setescapewarp map:req, warp:req, x=0, y=0 .byte 0xc4 map \map .byte \warp @@ -1446,42 +1463,33 @@ .2byte \box .endm - @ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text, - @ 0xFF resets the color to the default for the current OW's gender, and all other values produce black text. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro textcolor color:req .byte 0xc7 .byte \color .endm - @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom - @ of the screen when the Main Menu is opened. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro loadhelp pointer:req .byte 0xc8 .4byte \pointer .endm - @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of - @ the screen when the Main Menu is opened. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro unloadhelp .byte 0xc9 .endm - @ After using this command, all standard message boxes will use the signpost frame. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro signmsg .byte 0xca .endm - @ Ends the effects of signmsg, returning message box frames to normal. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro normalmsg .byte 0xcb .endm - @ Compares the value of a hidden variable to a dword. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro comparehiddenvar a:req, value:req .byte 0xcc @@ -1489,26 +1497,25 @@ .4byte \value .endm - @ Sets the Pokemon in the specified slot of the player party's eventLegal bit. + @ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party. .macro setmoneventlegal slot:req .byte 0xcd .2byte \slot .endm - @ Checks if the Pokemon in the specified slot of the player's party has its eventLegal bit set. If it isn't set, + @ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set, @ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE. .macro checkmoneventlegal slot:req .byte 0xce .2byte \slot .endm - @ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the - @ offset specified by the pointer at 0x020375C0. - .macro gotoram + @ Jumps to the ram script saved from a Wonder Card. If there is no valid saved Wonder Card or if the + @ ram script is invalid then this does nothing. + .macro gotowondercardscript .byte 0xcf .endm - @ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot. @ Used only in FireRed/LeafGreen, does nothing in Emerald. .macro setworldmapflag worldmapflag:req .byte 0xd0 @@ -1516,7 +1523,9 @@ .endm @ Clone of warpteleport? It is apparently only used in FR/LG, and only with specials.[source] - .macro warpteleport2 map:req, warp:req, x:req, y:req + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro warpteleport2 map:req, warp:req, x=0, y=0 .byte 0xd1 map \map .byte \warp @@ -1545,7 +1554,7 @@ @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects. @ isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset - @ the puzzle tiles start. In FireRed, this command is a nop. + @ the puzzle tiles start. .macro initrotatingtilepuzzle isTrickHouse:req .byte 0xd5 .2byte \isTrickHouse @@ -1556,10 +1565,12 @@ .byte 0xd6 .endm - .macro warpmossdeepgym map:req, warpId:req, x:req, y:req + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro warpmossdeepgym map:req, warp:req, x=0, y=0 .byte 0xd7 map \map - .byte \warpId + .byte \warp .2byte \x .2byte \y .endm @@ -1603,12 +1614,14 @@ .4byte \pointer .endm - .macro warpsootopolislegend map:req, byte:req, word1:req, word2:req + @ The player will warp to the coordinates of the given 'warp'. + @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. + .macro warpsootopolislegend map:req, warp:req, x=0, y=0 .byte 0xe0 map \map - .byte \byte - .2byte \word1 - .2byte \word2 + .byte \warp + .2byte \x + .2byte \y .endm .macro buffercontesttypestring out:req, word:req @@ -1617,10 +1630,9 @@ .2byte \word .endm - @ Writes the name of the specified (item) item to the specified buffer. If the specified item is a Berry (0x85 - 0xAE) or - @ Poke Ball (0x4) and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). - @ If the specified item is the Enigma Berry, I have no idea what this command does (but testing showed no pluralization). - @ If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. + @ Writes the name of the specified (item) item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL + @ and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). + @ If the specified item is >= ITEMS_COUNT then the name of ITEM_NONE ("????????") is buffered instead. .macro bufferitemnameplural out:req, item:req, quantity:req .byte 0xe2 .byte \out @@ -1753,6 +1765,7 @@ MSGBOX_YESNO = 5 MSGBOX_AUTOCLOSE = 6 MSGBOX_GETPOINTS = 9 + MSGBOX_POKENAV = 10 YES = 1 NO = 0 @@ -1762,6 +1775,10 @@ callstd \type .endm + @ Gives 'amount' of the specified 'item' to the player and prints a message with fanfare. + @ If the player doesn't have space for all the items then as many are added as possible, the + @ message indicates there is no room, and VAR_RESULT is set to FALSE. + @ Otherwise VAR_RESULT is set to TRUE, and the message indicates they have received the item(s). .macro giveitem item:req, amount=1 setorcopyvar VAR_0x8000, \item setorcopyvar VAR_0x8001, \amount diff --git a/data/event_scripts.s b/data/event_scripts.s index c33932a530..5c7db08d62 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -99,7 +99,7 @@ gStdScripts:: .4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION .4byte Std_RegisteredInMatchCall @ STD_REGISTER_MATCH_CALL .4byte Std_MsgboxGetPoints @ MSGBOX_GETPOINTS - .4byte Std_10 + .4byte Std_MsgboxPokenav @ MSGBOX_POKENAV gStdScripts_End:: .include "data/maps/PetalburgCity/scripts.inc" diff --git a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc index 99dfa7bd80..6bb3352ab7 100644 --- a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc +++ b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc @@ -5,7 +5,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide:: lock faceplayer goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus - checkitem ITEM_SCANNER, 1 + checkitem ITEM_SCANNER compare VAR_RESULT, TRUE goto_if_eq AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc index dd70c9dd32..a2fab1bb93 100644 --- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc @@ -27,7 +27,7 @@ AbandonedShip_Corridors_B1F_EventScript_TuberM:: AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor:: lockall goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked - checkitem ITEM_STORAGE_KEY, 1 + checkitem ITEM_STORAGE_KEY compare VAR_RESULT, FALSE goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked msgbox AbandonedShip_Corridors_B1F_Text_InsertedStorageKey, MSGBOX_DEFAULT diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc index 4ec63a7e10..a30c448d37 100644 --- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc @@ -53,7 +53,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom6:: AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: lockall goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen - checkitem ITEM_ROOM_1_KEY, 1 + checkitem ITEM_ROOM_1_KEY compare VAR_RESULT, FALSE goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT @@ -68,7 +68,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door:: lockall goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen - checkitem ITEM_ROOM_2_KEY, 1 + checkitem ITEM_ROOM_2_KEY compare VAR_RESULT, FALSE goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT @@ -83,7 +83,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door:: lockall goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen - checkitem ITEM_ROOM_4_KEY, 1 + checkitem ITEM_ROOM_4_KEY compare VAR_RESULT, FALSE goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT @@ -98,7 +98,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door:: AbandonedShip_HiddenFloorCorridors_EventScript_Room6Door:: lockall goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen - checkitem ITEM_ROOM_6_KEY, 1 + checkitem ITEM_ROOM_6_KEY compare VAR_RESULT, FALSE goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc index 360b8162cf..bba92ebe40 100644 --- a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc +++ b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc @@ -56,7 +56,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor:: end BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem:: - checkitemspace VAR_0x8009, 1 + checkitemspace VAR_0x8009 compare VAR_RESULT, FALSE goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_BagFull copyvar VAR_0x8004, VAR_0x8008 diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc index d359ee89ad..635b27c2cb 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -20,7 +20,7 @@ BattleFrontier_OutsideWest_EventScript_FerryAttendant:: lock faceplayer msgbox BattleFrontier_OutsideWest_Text_MayISeeYourTicket, MSGBOX_DEFAULT - checkitem ITEM_SS_TICKET, 1 + checkitem ITEM_SS_TICKET compare VAR_RESULT, FALSE goto_if_eq BattleFrontier_OutsideWest_EventScript_NoSSTicket message BattleFrontier_OutsideWest_Text_WhereWouldYouLikeToGo diff --git a/data/maps/FallarborTown_CozmosHouse/scripts.inc b/data/maps/FallarborTown_CozmosHouse/scripts.inc index 43a9dca7f3..3e5d02f2d3 100644 --- a/data/maps/FallarborTown_CozmosHouse/scripts.inc +++ b/data/maps/FallarborTown_CozmosHouse/scripts.inc @@ -5,7 +5,7 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo:: lock faceplayer goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite - checkitem ITEM_METEORITE, 1 + checkitem ITEM_METEORITE compare VAR_RESULT, TRUE goto_if_eq FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc index 1bd54b4b8d..945d616467 100644 --- a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc +++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc @@ -14,7 +14,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_MoveRelearner:: end FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove:: - checkitem ITEM_HEART_SCALE, 1 + checkitem ITEM_HEART_SCALE compare VAR_RESULT, FALSE goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale msgbox FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove, MSGBOX_YESNO diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc index 6371d5b0cd..a9fe64ade3 100644 --- a/data/maps/FortreeCity/scripts.inc +++ b/data/maps/FortreeCity/scripts.inc @@ -55,7 +55,7 @@ FortreeCity_EventScript_GymSign:: FortreeCity_EventScript_Kecleon:: lock faceplayer - checkitem ITEM_DEVON_SCOPE, 1 + checkitem ITEM_DEVON_SCOPE compare VAR_RESULT, TRUE goto_if_eq FortreeCity_EventScript_AskUseDevonScope msgbox FortreeCity_Text_SomethingUnseeable, MSGBOX_DEFAULT diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index 754ee00cf5..3ab8969135 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -13,7 +13,7 @@ JaggedPass_OnResume: end JaggedPass_EventScript_CheckHasMagmaEmblem:: - checkitem ITEM_MAGMA_EMBLEM, 1 + checkitem ITEM_MAGMA_EMBLEM compare VAR_RESULT, TRUE goto_if_eq JaggedPass_EventScript_SetReadyToOpenHideout return diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc index e91ca7745c..65f7adc67e 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -71,7 +71,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_VendingMachine:: lockall message LilycoveCity_DepartmentStoreRooftop_Text_WhichDrinkWouldYouLike waitmessage - showmoneybox 0, 0, 0 + showmoneybox 0, 0 goto LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseDrink end @@ -102,27 +102,27 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_Lemonade:: end LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater:: - checkmoney 200, 0 + checkmoney 200 return LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop:: - checkmoney 300, 0 + checkmoney 300 return LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade:: - checkmoney 350, 0 + checkmoney 350 return LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater:: - removemoney 200, 0 + removemoney 200 return LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop:: - removemoney 300, 0 + removemoney 300 return LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade:: - removemoney 350, 0 + removemoney 350 return LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: @@ -134,7 +134,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade compare VAR_RESULT, FALSE goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink - checkitemspace VAR_TEMP_0, 1 + checkitemspace VAR_TEMP_0 compare VAR_RESULT, FALSE goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink compare VAR_TEMP_1, 0 @@ -143,7 +143,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop compare VAR_TEMP_1, 2 call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade - updatemoneybox 0, 0 + updatemoneybox bufferitemname 0, VAR_TEMP_0 playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_CanOfDrinkDroppedDown, MSGBOX_DEFAULT @@ -154,7 +154,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: random 64 @ 1/64 chance of an additional drink dropping compare VAR_RESULT, 0 goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink - checkitemspace VAR_TEMP_0, 1 + checkitemspace VAR_TEMP_0 compare VAR_RESULT, FALSE goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink playse SE_VEND @@ -166,7 +166,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: random 64 @ 1/64 * the prev 1/64 chance of a third additional drink dropping, ~ 0.02% chance compare VAR_RESULT, 0 goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink - checkitemspace VAR_TEMP_0, 1 + checkitemspace VAR_TEMP_0 compare VAR_RESULT, 0 goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink playse SE_VEND diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index 216a6ff033..a22e830293 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -114,7 +114,7 @@ LilycoveCity_Harbor_EventScript_GoToBattleFrontier:: LilycoveCity_Harbor_EventScript_GetEonTicketState:: setvar VAR_TEMP_E, 0 goto_if_unset FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, Common_EventScript_NopReturn - checkitem ITEM_EON_TICKET, 1 + checkitem ITEM_EON_TICKET compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_NopReturn setvar VAR_TEMP_E, 1 @@ -125,7 +125,7 @@ LilycoveCity_Harbor_EventScript_GetEonTicketState:: LilycoveCity_Harbor_EventScript_GetAuroraTicketState:: setvar VAR_TEMP_D, 0 goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn - checkitem ITEM_AURORA_TICKET, 1 + checkitem ITEM_AURORA_TICKET compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_NopReturn setvar VAR_TEMP_D, 1 @@ -136,7 +136,7 @@ LilycoveCity_Harbor_EventScript_GetAuroraTicketState:: LilycoveCity_Harbor_EventScript_GetOldSeaMapState:: setvar VAR_TEMP_C, 0 goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, Common_EventScript_NopReturn - checkitem ITEM_OLD_SEA_MAP, 1 + checkitem ITEM_OLD_SEA_MAP compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_NopReturn setvar VAR_TEMP_C, 1 @@ -147,7 +147,7 @@ LilycoveCity_Harbor_EventScript_GetOldSeaMapState:: LilycoveCity_Harbor_EventScript_GetMysticTicketState:: setvar VAR_TEMP_9, 0 goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn - checkitem ITEM_MYSTIC_TICKET, 1 + checkitem ITEM_MYSTIC_TICKET compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_NopReturn setvar VAR_TEMP_9, 1 diff --git a/data/maps/MauvilleCity_BikeShop/scripts.inc b/data/maps/MauvilleCity_BikeShop/scripts.inc index 45efbe8f3b..5ce43c1baa 100644 --- a/data/maps/MauvilleCity_BikeShop/scripts.inc +++ b/data/maps/MauvilleCity_BikeShop/scripts.inc @@ -71,10 +71,10 @@ MauvilleCity_BikeShop_EventScript_AskSwitchBikes:: @ If the player does not have a bike on them Rydel assumes its stored in the PC MauvilleCity_BikeShop_EventScript_SwitchBikes:: msgbox MauvilleCity_BikeShop_Text_IllSwitchBikes, MSGBOX_DEFAULT - checkitem ITEM_ACRO_BIKE, 1 + checkitem ITEM_ACRO_BIKE compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchAcroForMach - checkitem ITEM_MACH_BIKE, 1 + checkitem ITEM_MACH_BIKE compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchMachForAcro msgbox MauvilleCity_BikeShop_Text_OhYourBikeIsInPC, MSGBOX_DEFAULT diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc index 896dfa6807..ab1c248e08 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -16,12 +16,12 @@ MauvilleCity_GameCorner_EventScript_CoinsClerk:: lock faceplayer msgbox MauvilleCity_GameCorner_Text_ThisIsMauvilleGameCorner, MSGBOX_DEFAULT - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NeedCoinCase message MauvilleCity_GameCorner_Text_WereYouLookingForCoins waitmessage - showmoneybox 0, 0, 0 + showmoneybox 0, 0 showcoinsbox 1, 6 goto MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault50 @@ -46,12 +46,12 @@ MauvilleCity_GameCorner_EventScript_Buy50Coins:: checkcoins VAR_TEMP_1 compare VAR_TEMP_1, (MAX_COINS + 1 - 50) goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins - checkmoney COINS_PRICE_50, 0 + checkmoney COINS_PRICE_50 compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney addcoins 50 - removemoney COINS_PRICE_50, 0 - updatemoneybox 0, 0 + removemoney COINS_PRICE_50 + updatemoneybox updatecoinsbox 1, 6 playse SE_SHOP msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT @@ -64,12 +64,12 @@ MauvilleCity_GameCorner_EventScript_Buy500Coins:: checkcoins VAR_TEMP_1 compare VAR_TEMP_1, (MAX_COINS + 1 - 500) goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins - checkmoney COINS_PRICE_500, 0 + checkmoney COINS_PRICE_500 compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney addcoins 500 - removemoney COINS_PRICE_500, 0 - updatemoneybox 0, 0 + removemoney COINS_PRICE_500 + updatemoneybox updatecoinsbox 1, 6 playse SE_SHOP msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT @@ -108,7 +108,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerDolls:: lock faceplayer msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage release @@ -229,7 +229,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerTMs:: lock faceplayer msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage release @@ -306,7 +306,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM32:: checkcoins VAR_TEMP_2 compare VAR_TEMP_2, TM32_COINS goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM - checkitemspace ITEM_TM32, 1 + checkitemspace ITEM_TM32 compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM32_COINS @@ -321,7 +321,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM29:: checkcoins VAR_TEMP_2 compare VAR_TEMP_2, TM29_COINS goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM - checkitemspace ITEM_TM29, 1 + checkitemspace ITEM_TM29 compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM29_COINS @@ -336,7 +336,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM35:: checkcoins VAR_TEMP_2 compare VAR_TEMP_2, TM35_COINS goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM - checkitemspace ITEM_TM35, 1 + checkitemspace ITEM_TM35 compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM35_COINS @@ -351,7 +351,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM24:: checkcoins VAR_TEMP_2 compare VAR_TEMP_2, TM24_COINS goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM - checkitemspace ITEM_TM24, 1 + checkitemspace ITEM_TM24 compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM24_COINS @@ -366,7 +366,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM13:: checkcoins VAR_TEMP_2 compare VAR_TEMP_2, TM13_COINS goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM - checkitemspace ITEM_TM13, 1 + checkitemspace ITEM_TM13 compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM13_COINS @@ -466,7 +466,7 @@ MauvilleCity_GameCorner_EventScript_ReceivedStarterDoll:: MauvilleCity_GameCorner_EventScript_PokefanM:: lock faceplayer - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_GameCorner_EventScript_TryGive20Coins msgbox MauvilleCity_GameCorner_Text_NeedCoinCaseGoNextDoor, MSGBOX_DEFAULT @@ -534,7 +534,7 @@ MauvilleCity_GameCorner_EventScript_Woman:: MauvilleCity_GameCorner_EventScript_SlotMachine0:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 0 @@ -545,7 +545,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine0:: MauvilleCity_GameCorner_EventScript_SlotMachine1:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 1 @@ -556,7 +556,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine1:: MauvilleCity_GameCorner_EventScript_SlotMachine2:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 2 @@ -567,7 +567,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine2:: MauvilleCity_GameCorner_EventScript_SlotMachine3:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 3 @@ -578,7 +578,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine3:: MauvilleCity_GameCorner_EventScript_SlotMachine4:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 4 @@ -589,7 +589,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine4:: MauvilleCity_GameCorner_EventScript_SlotMachine5:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 5 @@ -600,7 +600,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine5:: MauvilleCity_GameCorner_EventScript_SlotMachine6:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 6 @@ -611,7 +611,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine6:: MauvilleCity_GameCorner_EventScript_SlotMachine7:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 7 @@ -622,7 +622,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine7:: MauvilleCity_GameCorner_EventScript_SlotMachine8:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 8 @@ -633,7 +633,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine8:: MauvilleCity_GameCorner_EventScript_SlotMachine9:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 9 @@ -644,7 +644,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine9:: MauvilleCity_GameCorner_EventScript_SlotMachine10:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 10 @@ -655,7 +655,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine10:: MauvilleCity_GameCorner_EventScript_SlotMachine11:: lockall - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 11 diff --git a/data/maps/MauvilleCity_House2/scripts.inc b/data/maps/MauvilleCity_House2/scripts.inc index 178b79f9b4..441a4f1658 100644 --- a/data/maps/MauvilleCity_House2/scripts.inc +++ b/data/maps/MauvilleCity_House2/scripts.inc @@ -6,7 +6,7 @@ MauvilleCity_House2_EventScript_Woman:: faceplayer goto_if_set FLAG_RECEIVED_COIN_CASE, MauvilleCity_House2_EventScript_ReceivedCoinCase msgbox MauvilleCity_House2_Text_BuyHarborMailAtSlateport, MSGBOX_DEFAULT - checkitem ITEM_HARBOR_MAIL, 1 + checkitem ITEM_HARBOR_MAIL compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_House2_EventScript_AskToTradeForHarborMail release diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index 320e2dc194..7081e54de6 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -107,15 +107,15 @@ MtChimney_EventScript_ArchieExitNorth:: MtChimney_EventScript_LavaCookieLady:: lock faceplayer - showmoneybox 0, 0, 0 + showmoneybox 0, 0 msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MtChimney_EventScript_DeclineLavaCookie - checkmoney 200, 0 + checkmoney 200 compare VAR_RESULT, FALSE goto_if_eq MtChimney_EventScript_NotEnoughMoney msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT - checkitemspace ITEM_LAVA_COOKIE, 1 + checkitemspace ITEM_LAVA_COOKIE compare VAR_RESULT, TRUE call_if_eq MtChimney_EventScript_RemoveMoney giveitem ITEM_LAVA_COOKIE @@ -132,8 +132,8 @@ MtChimney_EventScript_BagIsFull:: end MtChimney_EventScript_RemoveMoney:: - removemoney 200, 0 - updatemoneybox 0, 0 + removemoney 200 + updatemoneybox return MtChimney_EventScript_DeclineLavaCookie:: diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 0a98d4ba62..1304db3374 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -26,7 +26,7 @@ NewMauville_Entrance_EventScript_Door:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT - checkitem ITEM_BASEMENT_KEY, 1 + checkitem ITEM_BASEMENT_KEY compare VAR_RESULT, FALSE goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor msgbox NewMauville_Entrance_Text_UseBasementKey, MSGBOX_YESNO diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index cae696a50a..bbb3294627 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -383,10 +383,10 @@ PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry:: specialvar VAR_RESULT, IsEnigmaBerryValid compare VAR_RESULT, FALSE goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry - checkitem ITEM_ENIGMA_BERRY, 1 + checkitem ITEM_ENIGMA_BERRY compare VAR_RESULT, TRUE goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry - checkpcitem ITEM_ENIGMA_BERRY, 1 + checkpcitem ITEM_ENIGMA_BERRY compare VAR_RESULT, TRUE goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry compare VAR_ENIGMA_BERRY_AVAILABLE, 0 diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc index c4cfd1576e..d1a892b7c0 100644 --- a/data/maps/Route109_SeashoreHouse/scripts.inc +++ b/data/maps/Route109_SeashoreHouse/scripts.inc @@ -37,7 +37,7 @@ Route109_SeashoreHouse_EventScript_BagFull:: end Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: - showmoneybox 0, 0, 0 + showmoneybox 0, 0 msgbox Route109_SeashoreHouse_Text_WantToBuySodaPop, MSGBOX_YESNO compare VAR_RESULT, YES goto_if_eq Route109_SeashoreHouse_EventScript_BuySodaPop @@ -47,15 +47,15 @@ Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: end Route109_SeashoreHouse_EventScript_BuySodaPop:: - checkmoney 300, 0 + checkmoney 300 compare VAR_RESULT, FALSE goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughMoney - checkitemspace ITEM_SODA_POP, 1 + checkitemspace ITEM_SODA_POP compare VAR_RESULT, FALSE goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT - removemoney 300, 0 - updatemoneybox 0, 0 + removemoney 300 + updatemoneybox giveitem ITEM_SODA_POP hidemoneybox release diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 72e30958a5..8b0ee51c42 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -210,7 +210,7 @@ Route111_EventScript_ViciousSandstormTriggerRight:: end Route111_EventScript_ViciousSandstormTrigger:: - checkitem ITEM_GO_GOGGLES, 1 + checkitem ITEM_GO_GOGGLES compare VAR_RESULT, FALSE goto_if_eq Route111_EventScript_PreventRouteAccess setvar VAR_TEMP_3, 1 diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc index bad739806f..31fad1ceaa 100644 --- a/data/maps/Route113_GlassWorkshop/scripts.inc +++ b/data/maps/Route113_GlassWorkshop/scripts.inc @@ -43,7 +43,7 @@ Route113_GlassWorkshop_EventScript_ExplainSootSack:: end Route113_GlassWorkshop_EventScript_CheckCollectedAsh:: - checkitem ITEM_SOOT_SACK, 1 + checkitem ITEM_SOOT_SACK compare VAR_RESULT, FALSE goto_if_eq Route113_GlassWorkshop_EventScript_SootSackNotInBag msgbox Route113_GlassWorkshop_Text_LetsSeeCollectedAshes, MSGBOX_DEFAULT diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc index 3a6dd785cc..a9bfc39b85 100644 --- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc +++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc @@ -37,10 +37,10 @@ Route114_FossilManiacsTunnel_EventScript_FossilManiac:: lock faceplayer goto_if_set FLAG_RECEIVED_REVIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_PlayerRevivedFossil - checkitem ITEM_ROOT_FOSSIL, 1 + checkitem ITEM_ROOT_FOSSIL compare VAR_RESULT, TRUE goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil - checkitem ITEM_CLAW_FOSSIL, 1 + checkitem ITEM_CLAW_FOSSIL compare VAR_RESULT, TRUE goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil msgbox Route114_FossilManiacsTunnel_Text_LookInDesertForFossils, MSGBOX_DEFAULT diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc index 0ef6a05e1a..7657e2061e 100644 --- a/data/maps/Route116/scripts.inc +++ b/data/maps/Route116/scripts.inc @@ -165,7 +165,7 @@ Route116_EventScript_BrineyTrigger:: Route116_EventScript_GlassesMan:: lock faceplayer - checkitem ITEM_BLACK_GLASSES, 1 + checkitem ITEM_BLACK_GLASSES compare VAR_RESULT, TRUE goto_if_eq Route116_EventScript_PlayerHasGlasses specialvar VAR_RESULT, FoundBlackGlasses diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 8bd5dac04f..1a0102cf4e 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -48,7 +48,7 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: lockall applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - showmoneybox 0, 0, 0 + showmoneybox 0, 0 msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO compare VAR_RESULT, YES goto_if_eq Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone @@ -57,17 +57,17 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: end Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: - checkitem ITEM_POKEBLOCK_CASE, 1 + checkitem ITEM_POKEBLOCK_CASE compare VAR_RESULT, 0 goto_if_eq Route121_SafariZoneEntrance_EventScript_NoPokeblockCase call Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon - checkmoney 500, 0 + checkmoney 500 compare VAR_RESULT, 0 goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney playse SE_SHOP msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT - removemoney 500, 0 - updatemoneybox 0, 0 + removemoney 500 + updatemoneybox msgbox Route121_SafariZoneEntrance_Text_HereAreYourSafariBalls, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_ITEM message Route121_SafariZoneEntrance_Text_Received30SafariBalls diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc index 63bee6ed5b..54304e03e3 100644 --- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc +++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc @@ -29,16 +29,16 @@ Route124_DivingTreasureHuntersHouse_EventScript_CheckPlayerHasShard:: Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards:: setvar VAR_TEMP_1, 0 - checkitem ITEM_RED_SHARD, 1 + checkitem ITEM_RED_SHARD compare VAR_RESULT, TRUE call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard - checkitem ITEM_YELLOW_SHARD, 1 + checkitem ITEM_YELLOW_SHARD compare VAR_RESULT, TRUE call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard - checkitem ITEM_BLUE_SHARD, 1 + checkitem ITEM_BLUE_SHARD compare VAR_RESULT, TRUE call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard - checkitem ITEM_GREEN_SHARD, 1 + checkitem ITEM_GREEN_SHARD compare VAR_RESULT, TRUE call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard return @@ -248,7 +248,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard:: msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade - checkitemspace VAR_0x8009, 1 + checkitemspace VAR_0x8009 compare VAR_RESULT, TRUE goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard checkitem VAR_0x8008, 2 diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index 326cd946e6..7db701c40e 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -69,10 +69,10 @@ RustboroCity_DevonCorp_2F_EventScript_FossilScientist:: compare VAR_FOSSIL_RESURRECTION_STATE, 1 goto_if_eq RustboroCity_DevonCorp_2F_EventScript_StillRegenerating msgbox RustboroCity_DevonCorp_2F_Text_DevelopDeviceToResurrectFossils, MSGBOX_DEFAULT - checkitem ITEM_ROOT_FOSSIL, 1 + checkitem ITEM_ROOT_FOSSIL compare VAR_RESULT, TRUE goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil - checkitem ITEM_CLAW_FOSSIL, 1 + checkitem ITEM_CLAW_FOSSIL compare VAR_RESULT, TRUE goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil release @@ -89,7 +89,7 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil:: msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil - checkitem ITEM_CLAW_FOSSIL, 1 + checkitem ITEM_CLAW_FOSSIL compare VAR_RESULT, TRUE goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil @@ -114,7 +114,7 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil:: msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil - checkitem ITEM_ROOT_FOSSIL, 1 + checkitem ITEM_ROOT_FOSSIL compare VAR_RESULT, TRUE goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil diff --git a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc index a1206dfb47..74f24c8598 100644 --- a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc @@ -29,7 +29,7 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert:: msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell - checkitemspace ITEM_SHELL_BELL, 1 + checkitemspace ITEM_SHELL_BELL compare VAR_RESULT, FALSE call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed compare VAR_RESULT, 2 @@ -68,10 +68,10 @@ ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell:: end ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells:: - checkitem ITEM_SHOAL_SALT, 1 + checkitem ITEM_SHOAL_SALT compare VAR_RESULT, TRUE goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell - checkitem ITEM_SHOAL_SHELL, 1 + checkitem ITEM_SHOAL_SHELL compare VAR_RESULT, TRUE goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index 58e5978cf0..0cc07b73f3 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -332,7 +332,7 @@ SlateportCity_Harbor_EventScript_NeedDive:: SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment:: compare VAR_TEMP_1, 1 goto_if_eq SlateportCity_Harbor_EventScript_TradedScanner - checkitem ITEM_SCANNER, 1 + checkitem ITEM_SCANNER compare VAR_RESULT, TRUE goto_if_eq SlateportCity_Harbor_EventScript_AskToTradeScanner goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_FerryFinished diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index cfe547de56..901b05e2a5 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -22,7 +22,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight:: end SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: - showmoneybox 0, 0, 0 + showmoneybox 0, 0 msgbox SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter, MSGBOX_YESNO compare VAR_RESULT, YES goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee @@ -34,12 +34,12 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: end SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee:: - checkmoney 50, 0 + checkmoney 50 compare VAR_RESULT, FALSE goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney playse SE_SHOP - removemoney 50, 0 - updatemoneybox 0, 0 + removemoney 50 + updatemoneybox msgbox SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1 hidemoneybox diff --git a/data/maps/SlateportCity_PokemonFanClub/scripts.inc b/data/maps/SlateportCity_PokemonFanClub/scripts.inc index 96e1a7633d..b974ebed17 100644 --- a/data/maps/SlateportCity_PokemonFanClub/scripts.inc +++ b/data/maps/SlateportCity_PokemonFanClub/scripts.inc @@ -72,7 +72,7 @@ SlateportCity_PokemonFanClub_EventScript_NoHighConditions:: end SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: - checkitemspace ITEM_RED_SCARF, 1 + checkitemspace ITEM_RED_SCARF compare VAR_RESULT, FALSE goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT @@ -83,7 +83,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: end SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: - checkitemspace ITEM_BLUE_SCARF, 1 + checkitemspace ITEM_BLUE_SCARF compare VAR_RESULT, FALSE goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT @@ -94,7 +94,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: end SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: - checkitemspace ITEM_PINK_SCARF, 1 + checkitemspace ITEM_PINK_SCARF compare VAR_RESULT, FALSE goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT @@ -105,7 +105,7 @@ SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: end SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: - checkitemspace ITEM_GREEN_SCARF, 1 + checkitemspace ITEM_GREEN_SCARF compare VAR_RESULT, FALSE goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT @@ -116,7 +116,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: end SlateportCity_PokemonFanClub_EventScript_GiveYellowScarf:: - checkitemspace ITEM_YELLOW_SCARF, 1 + checkitemspace ITEM_YELLOW_SCARF compare VAR_RESULT, FALSE goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc index 1d833f470c..71f3a12760 100644 --- a/data/scripts/berry_blender.inc +++ b/data/scripts/berry_blender.inc @@ -296,7 +296,7 @@ BerryBlender_EventScript_ExplainBlending1: end BerryBlender_EventScript_TryUseBerryBlender1: - checkitem ITEM_POKEBLOCK_CASE, 1 + checkitem ITEM_POKEBLOCK_CASE compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_Blender1NoCase specialvar VAR_RESULT, GetFirstFreePokeblockSlot @@ -370,7 +370,7 @@ BerryBlender_EventScript_TryUseBerryBlender2: specialvar VAR_RESULT, PlayerHasBerries compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_Blender2NoBerries - checkitem ITEM_POKEBLOCK_CASE, 1 + checkitem ITEM_POKEBLOCK_CASE compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_Blender2NoCase msgbox BerryBlender_Text_Okay, MSGBOX_DEFAULT @@ -436,7 +436,7 @@ BerryBlender_EventScript_TryUseBlender3: specialvar VAR_RESULT, PlayerHasBerries compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_Blender3NoBerries - checkitem ITEM_POKEBLOCK_CASE, 1 + checkitem ITEM_POKEBLOCK_CASE compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_Blender3NoCase msgbox BerryBlender_Text_OhDear, MSGBOX_DEFAULT @@ -473,7 +473,7 @@ BerryBlender_EventScript_BlendMasterNoBerries: end BerryBlender_EventScript_TryBlendWithBlendMaster: - checkitem ITEM_POKEBLOCK_CASE, 1 + checkitem ITEM_POKEBLOCK_CASE compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_BlendMasterNoCase specialvar VAR_RESULT, PlayerHasBerries @@ -542,7 +542,7 @@ BerryBlender_EventScript_ExpertMPlayerHasBerries: end BerryBlender_EventScript_ExpertMNoBerries: - checkitem ITEM_POKEBLOCK_CASE, 1 + checkitem ITEM_POKEBLOCK_CASE compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_ExpertMNoSpareBerries specialvar VAR_RESULT, GetFirstFreePokeblockSlot @@ -575,7 +575,7 @@ BerryBlender_EventScript_BerryBlenderLink:: specialvar VAR_RESULT, PlayerHasBerries compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_LinkBlenderNoBerries - checkitem ITEM_POKEBLOCK_CASE, 1 + checkitem ITEM_POKEBLOCK_CASE compare VAR_RESULT, FALSE goto_if_eq BerryBlender_EventScript_LinkBlenderNoCase specialvar VAR_RESULT, GetFirstFreePokeblockSlot diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc index e415d0c657..9602d3b77f 100644 --- a/data/scripts/berry_tree.inc +++ b/data/scripts/berry_tree.inc @@ -154,8 +154,8 @@ BerryTree_EventScript_ItemUsePlantBerry:: end BerryTree_EventScript_WantToWater:: - checkitem ITEM_WAILMER_PAIL, 1 - compare VAR_RESULT, 0 + checkitem ITEM_WAILMER_PAIL + compare VAR_RESULT, FALSE goto_if_eq BerryTree_EventScript_DontWater special ObjectEventInteractionGetBerryName msgbox BerryTree_Text_WantToWater, MSGBOX_YESNO diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index d6ea1a707e..ea9a2b4e3f 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -24,22 +24,20 @@ CableClub_EventScript_MysteryGiftMan:: specialvar VAR_RESULT, ShouldDistributeEonTicket compare VAR_RESULT, TRUE goto_if_eq CableClub_EventScript_DistributeEonTicket - goto CableClub_EventScript_AlreadyGotEonTicket + goto CableClub_EventScript_TryWonderCardScript end -CableClub_EventScript_AlreadyGotEonTicket:: - gotoram - -@ Unused? +CableClub_EventScript_TryWonderCardScript:: + gotowondercardscript CableClub_EventScript_MysteryGiftThankYou:: msgbox gText_ThankYouForAccessingMysteryGift, MSGBOX_NPC end CableClub_EventScript_DistributeEonTicket:: - checkitem ITEM_EON_TICKET, 1 + checkitem ITEM_EON_TICKET compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AlreadyGotEonTicket - goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_AlreadyGotEonTicket + goto_if_eq CableClub_EventScript_TryWonderCardScript + goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_TryWonderCardScript msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT giveitem ITEM_EON_TICKET setflag FLAG_ENABLE_SHIP_SOUTHERN_ISLAND @@ -1035,7 +1033,7 @@ CableClub_EventScript_DirectCornerAttendant:: end CableClub_EventScript_DirectCornerSelectService:: - checkitem ITEM_POWDER_JAR, 1 + checkitem ITEM_POWDER_JAR compare VAR_RESULT, FALSE goto_if_eq CableClub_EventScript_DirectCornerNoBerry goto_if_set FLAG_VISITED_MAUVILLE_CITY, CableClub_EventScript_DirectCornerSelectAllServices diff --git a/data/scripts/gift_aurora_ticket.inc b/data/scripts/gift_aurora_ticket.inc index c9250b9f93..760bea9393 100644 --- a/data/scripts/gift_aurora_ticket.inc +++ b/data/scripts/gift_aurora_ticket.inc @@ -4,13 +4,13 @@ MysteryGiftScript_AuroraTicket:: faceplayer vgoto_if_set FLAG_RECEIVED_AURORA_TICKET, AuroraTicket_Obtained vgoto_if_set FLAG_BATTLED_DEOXYS, AuroraTicket_Obtained - checkitem ITEM_AURORA_TICKET, 1 + checkitem ITEM_AURORA_TICKET compare VAR_RESULT, TRUE vgoto_if_eq AuroraTicket_Obtained vmessage sText_AuroraTicketForYou waitmessage waitbuttonpress - checkitemspace ITEM_AURORA_TICKET, 1 + checkitemspace ITEM_AURORA_TICKET compare VAR_RESULT, FALSE vgoto_if_eq AuroraTicket_NoBagSpace giveitem ITEM_AURORA_TICKET diff --git a/data/scripts/gift_mystic_ticket.inc b/data/scripts/gift_mystic_ticket.inc index 29c325f72d..1a28dd4ce0 100644 --- a/data/scripts/gift_mystic_ticket.inc +++ b/data/scripts/gift_mystic_ticket.inc @@ -5,13 +5,13 @@ MysteryGiftScript_MysticTicket:: vgoto_if_set FLAG_RECEIVED_MYSTIC_TICKET, MysticTicket_Obtained vgoto_if_set FLAG_CAUGHT_LUGIA, MysticTicket_Obtained vgoto_if_set FLAG_CAUGHT_HO_OH, MysticTicket_Obtained - checkitem ITEM_MYSTIC_TICKET, 1 + checkitem ITEM_MYSTIC_TICKET compare VAR_RESULT, TRUE vgoto_if_eq MysticTicket_Obtained vmessage sText_MysticTicketForYou waitmessage waitbuttonpress - checkitemspace ITEM_MYSTIC_TICKET, 1 + checkitemspace ITEM_MYSTIC_TICKET compare VAR_RESULT, FALSE vgoto_if_eq MysticTicket_NoBagSpace giveitem ITEM_MYSTIC_TICKET diff --git a/data/scripts/gift_old_sea_map.inc b/data/scripts/gift_old_sea_map.inc index 5e47a10df1..b0f258807e 100644 --- a/data/scripts/gift_old_sea_map.inc +++ b/data/scripts/gift_old_sea_map.inc @@ -4,13 +4,13 @@ MysteryGiftScript_OldSeaMap:: faceplayer vgoto_if_set FLAG_RECEIVED_OLD_SEA_MAP, OldSeaMap_Obtained vgoto_if_set FLAG_CAUGHT_MEW, OldSeaMap_Obtained - checkitem ITEM_OLD_SEA_MAP, 1 + checkitem ITEM_OLD_SEA_MAP compare VAR_RESULT, TRUE vgoto_if_eq OldSeaMap_Obtained vmessage sText_MysteryGiftOldSeaMapForYou waitmessage waitbuttonpress - checkitemspace ITEM_OLD_SEA_MAP, 1 + checkitemspace ITEM_OLD_SEA_MAP compare VAR_RESULT, FALSE vgoto_if_eq OldSeaMap_NoBagSpace giveitem ITEM_OLD_SEA_MAP diff --git a/data/scripts/kecleon.inc b/data/scripts/kecleon.inc index 82eca777d5..355e9ad4a7 100644 --- a/data/scripts/kecleon.inc +++ b/data/scripts/kecleon.inc @@ -48,8 +48,8 @@ Route119_EventScript_Kecleon2:: end EventScript_Kecleon:: - checkitem ITEM_DEVON_SCOPE, 1 - compare VAR_RESULT, 1 + checkitem ITEM_DEVON_SCOPE + compare VAR_RESULT, TRUE goto_if_eq EventScript_AskUseDevonScope msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_DEFAULT release diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index 576fa28ade..6c11da105a 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -405,7 +405,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock:: LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock:: special Script_BufferContestLadyCategoryAndMonName msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT - checkitem ITEM_POKEBLOCK_CASE, 1 + checkitem ITEM_POKEBLOCK_CASE compare VAR_RESULT, FALSE goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index 382f5ce320..8e24d47099 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -1,55 +1,58 @@ +.set ITEMID, VAR_0x8000 +.set AMOUNT, VAR_0x8001 + Std_ObtainItem:: - additem VAR_0x8000, VAR_0x8001 + additem ITEMID, AMOUNT copyvar VAR_0x8007, VAR_RESULT call EventScript_ObtainItemMessage return EventScript_ObtainItemMessage:: - bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 - checkitemtype VAR_0x8000 + bufferitemnameplural 1, ITEMID, AMOUNT + checkitemtype ITEMID call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, 1 + compare VAR_0x8007, TRUE call_if_eq EventScript_ObtainedItem - compare VAR_0x8007, 0 + compare VAR_0x8007, FALSE call_if_eq EventScript_NoRoomForItem return EventScript_BufferPocketNameAndTryFanfare:: switch VAR_RESULT - case POCKET_ITEMS, EventScript_BufferItemsPocket - case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket + case POCKET_ITEMS, EventScript_BufferItemsPocket + case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket case POCKET_POKE_BALLS, EventScript_BufferPokeballsPocket - case POCKET_TM_HM, EventScript_BufferTMHMsPocket - case POCKET_BERRIES, EventScript_BufferBerriesPocket + case POCKET_TM_HM, EventScript_BufferTMHMsPocket + case POCKET_BERRIES, EventScript_BufferBerriesPocket end EventScript_BufferItemsPocket:: bufferstdstring 2, STDSTRING_ITEMS - compare VAR_0x8007, 1 + compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferKeyItemsPocket:: bufferstdstring 2, STDSTRING_KEYITEMS - compare VAR_0x8007, 1 + compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferPokeballsPocket:: bufferstdstring 2, STDSTRING_POKEBALLS - compare VAR_0x8007, 1 + compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferTMHMsPocket:: bufferstdstring 2, STDSTRING_TMHMS - compare VAR_0x8007, 1 + compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedTMHM return EventScript_BufferBerriesPocket:: bufferstdstring 2, STDSTRING_BERRIES - compare VAR_0x8007, 1 + compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return @@ -57,11 +60,11 @@ EventScript_ObtainedItem:: message gText_ObtainedTheItem waitfanfare msgbox gText_PutItemInPocket, MSGBOX_DEFAULT - setvar VAR_RESULT, 1 + setvar VAR_RESULT, TRUE return EventScript_NoRoomForItem:: - setvar VAR_RESULT, 0 + setvar VAR_RESULT, FALSE return EventScript_PlayFanfareObtainedItem:: @@ -73,16 +76,16 @@ EventScript_PlayFanfareObtainedTMHM:: return Std_ObtainDecoration:: - adddecoration VAR_0x8000 + adddecoration ITEMID copyvar VAR_0x8007, VAR_RESULT call EventScript_ObtainDecorationMessage return EventScript_ObtainDecorationMessage:: - bufferdecorationname 1, VAR_0x8000 - compare VAR_0x8007, 1 + bufferdecorationname 1, ITEMID + compare VAR_0x8007, TRUE call_if_eq EventScript_ObtainedDecor - compare VAR_0x8007, 0 + compare VAR_0x8007, FALSE call_if_eq EventScript_NoRoomForDecor return @@ -91,27 +94,27 @@ EventScript_ObtainedDecor:: message gText_ObtainedTheDecor waitfanfare msgbox gText_TheDecorWasTransferredToThePC, MSGBOX_DEFAULT - setvar VAR_RESULT, 1 + setvar VAR_RESULT, TRUE return EventScript_NoRoomForDecor:: - setvar VAR_RESULT, 0 + setvar VAR_RESULT, FALSE return Std_FindItem:: lock faceplayer waitse - copyvar VAR_0x8004, VAR_0x8000 - copyvar VAR_0x8005, VAR_0x8001 - checkitemspace VAR_0x8000, VAR_0x8001 + copyvar VAR_0x8004, ITEMID + copyvar VAR_0x8005, AMOUNT + checkitemspace ITEMID, AMOUNT copyvar VAR_0x8007, VAR_RESULT - bufferitemnameplural 1, VAR_0x8000, VAR_0x8001 - checkitemtype VAR_0x8000 + bufferitemnameplural 1, ITEMID, AMOUNT + checkitemtype ITEMID call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, 1 + compare VAR_0x8007, TRUE call_if_eq EventScript_PickUpItem - compare VAR_0x8007, 0 + compare VAR_0x8007, FALSE call_if_eq EventScript_NoRoomToPickUpItem release return @@ -121,15 +124,15 @@ EventScript_PickUpItem:: additem VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 1 + compare VAR_0x8008, TRUE call_if_eq EventScript_FoundTMHM - compare VAR_0x8008, 0 + compare VAR_0x8008, FALSE call_if_eq EventScript_FoundItem waitfanfare waitmessage bufferitemnameplural 1, VAR_0x8004, VAR_0x8005 pyramid_inchallenge - compare VAR_RESULT, 1 + compare VAR_RESULT, TRUE goto_if_eq EventScript_PutBattlePyramidItemInBag msgbox gText_PutItemInPocket, MSGBOX_DEFAULT return @@ -150,7 +153,7 @@ EventScript_FoundItem:: EventScript_NoRoomToPickUpItem:: msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT - setvar VAR_RESULT, 0 + setvar VAR_RESULT, FALSE return EventScript_HiddenItemScript:: @@ -161,9 +164,9 @@ EventScript_HiddenItemScript:: bufferitemnameplural 1, VAR_0x8005, 1 checkitemtype VAR_0x8005 call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, 1 + compare VAR_0x8007, TRUE goto_if_eq EventScript_PickUpHiddenItem - compare VAR_0x8007, 0 + compare VAR_0x8007, FALSE goto_if_eq EventScript_NoRoomForHiddenItem end @@ -171,9 +174,9 @@ EventScript_PickUpHiddenItem:: copyvar VAR_0x8008, VAR_0x8004 copyvar VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName - compare VAR_RESULT, 1 + compare VAR_RESULT, TRUE goto_if_eq EventScript_FoundHiddenTMHM - compare VAR_RESULT, 0 + compare VAR_RESULT, FALSE goto_if_eq EventScript_FoundHiddenItem end diff --git a/data/scripts/roulette.inc b/data/scripts/roulette.inc index 1167a765bd..241b0d31c2 100644 --- a/data/scripts/roulette.inc +++ b/data/scripts/roulette.inc @@ -1,5 +1,5 @@ Roulette_EventScript_Table1:: - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 0 @@ -11,7 +11,7 @@ Roulette_EventScript_Table1:: end Roulette_EventScript_Table2:: - checkitem ITEM_COIN_CASE, 1 + checkitem ITEM_COIN_CASE compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 1 diff --git a/data/scripts/std_msgbox.inc b/data/scripts/std_msgbox.inc index 941cc0e961..f94d28ba0e 100644 --- a/data/scripts/std_msgbox.inc +++ b/data/scripts/std_msgbox.inc @@ -34,7 +34,8 @@ Std_MsgboxGetPoints: waitmessage return -Std_10: +@ Never used, pokenavcall is always used directly instead +Std_MsgboxPokenav: pokenavcall 0x0 waitmessage return From 65d3b583748bf1a8e03bc55baa31760bd5bdc384 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 15 Nov 2021 10:57:06 -0500 Subject: [PATCH 186/417] Add PARTY_NOTHING_CHOSEN --- data/maps/BattleFrontier_Lounge1/scripts.inc | 4 ++-- data/maps/BattleFrontier_Lounge5/scripts.inc | 2 +- data/maps/BattleFrontier_Lounge6/scripts.inc | 2 +- data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc | 2 +- data/maps/FortreeCity_House1/scripts.inc | 2 +- data/maps/LilycoveCity_ContestLobby/scripts.inc | 2 +- data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc | 2 +- data/maps/PacifidlogTown_House3/scripts.inc | 2 +- data/maps/RustboroCity_House1/scripts.inc | 2 +- data/maps/SlateportCity_NameRatersHouse/scripts.inc | 4 ++-- data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc | 4 ++-- data/script_cmd_table.inc | 2 +- data/scripts/contest_hall.inc | 2 +- data/scripts/day_care.inc | 2 +- include/constants/party_menu.h | 2 ++ include/mail.h | 2 +- src/mail_data.c | 3 ++- src/party_menu.c | 8 ++++---- 18 files changed, 26 insertions(+), 23 deletions(-) diff --git a/data/maps/BattleFrontier_Lounge1/scripts.inc b/data/maps/BattleFrontier_Lounge1/scripts.inc index 0455d577ce..4447e1032e 100644 --- a/data/maps/BattleFrontier_Lounge1/scripts.inc +++ b/data/maps/BattleFrontier_Lounge1/scripts.inc @@ -14,9 +14,9 @@ BattleFrontier_Lounge1_EventScript_Breeder:: BattleFrontier_Lounge1_EventScript_ChooseMonToShowBreeder:: special ChoosePartyMon waitstate - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_ne BattleFrontier_Lounge1_EventScript_ShowMonToBreeder - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq BattleFrontier_Lounge1_EventScript_CancelMonSelect end diff --git a/data/maps/BattleFrontier_Lounge5/scripts.inc b/data/maps/BattleFrontier_Lounge5/scripts.inc index 61ac0cb9e2..d680156f33 100644 --- a/data/maps/BattleFrontier_Lounge5/scripts.inc +++ b/data/maps/BattleFrontier_Lounge5/scripts.inc @@ -11,7 +11,7 @@ BattleFrontier_Lounge5_EventScript_NatureGirl:: waitstate lock faceplayer - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown specialvar VAR_RESULT, ScriptGetPartyMonSpecies compare VAR_RESULT, SPECIES_EGG diff --git a/data/maps/BattleFrontier_Lounge6/scripts.inc b/data/maps/BattleFrontier_Lounge6/scripts.inc index f88c69324d..678ea6e330 100644 --- a/data/maps/BattleFrontier_Lounge6/scripts.inc +++ b/data/maps/BattleFrontier_Lounge6/scripts.inc @@ -15,7 +15,7 @@ BattleFrontier_Lounge6_EventScript_Trader:: special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc index 945d616467..096f138771 100644 --- a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc +++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc @@ -27,7 +27,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon:: msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT special ChooseMonForMoveRelearner waitstate - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale special IsSelectedMonEgg compare VAR_RESULT, TRUE diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc index e25334ee9a..111a1b7c86 100644 --- a/data/maps/FortreeCity_House1/scripts.inc +++ b/data/maps/FortreeCity_House1/scripts.inc @@ -15,7 +15,7 @@ FortreeCity_House1_EventScript_Trader:: special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq FortreeCity_House1_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 7bfa1419ad..c572fdc02b 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -724,7 +724,7 @@ LilycoveCity_ContestLobby_EventScript_ChooseLinkContestMon:: msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon3, MSGBOX_DEFAULT setvar VAR_CONTEST_RANK, 0 choosecontestmon - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest special TryEnterContestMon compare VAR_RESULT, CANT_ENTER_CONTEST diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc index ff340c9f33..eead1f675f 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc +++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc @@ -18,7 +18,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget:: msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget, MSGBOX_DEFAULT special ChoosePartyMon waitstate - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain special IsSelectedMonEgg compare VAR_RESULT, TRUE diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc index c53ef05196..a2f70e2cc6 100644 --- a/data/maps/PacifidlogTown_House3/scripts.inc +++ b/data/maps/PacifidlogTown_House3/scripts.inc @@ -15,7 +15,7 @@ PacifidlogTown_House3_EventScript_Trader:: special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies diff --git a/data/maps/RustboroCity_House1/scripts.inc b/data/maps/RustboroCity_House1/scripts.inc index 0b7de48bc5..3d64f72a76 100644 --- a/data/maps/RustboroCity_House1/scripts.inc +++ b/data/maps/RustboroCity_House1/scripts.inc @@ -15,7 +15,7 @@ RustboroCity_House1_EventScript_Trader:: special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq RustboroCity_House1_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies diff --git a/data/maps/SlateportCity_NameRatersHouse/scripts.inc b/data/maps/SlateportCity_NameRatersHouse/scripts.inc index 87ed2d07f8..3242050e77 100644 --- a/data/maps/SlateportCity_NameRatersHouse/scripts.inc +++ b/data/maps/SlateportCity_NameRatersHouse/scripts.inc @@ -15,9 +15,9 @@ SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate:: msgbox SlateportCity_NameRatersHouse_Text_CritiqueWhichMonNickname, MSGBOX_DEFAULT special ChoosePartyMon waitstate - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_ne SlateportCity_NameRatersHouse_EventScript_RateMonNickname - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate end diff --git a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc index ab087696e8..5620bb3e46 100644 --- a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc +++ b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc @@ -9,7 +9,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SeedotBrother:: special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 - compare VAR_RESULT, 255 + compare VAR_RESULT, PARTY_NOTHING_CHOSEN goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot special CompareSeedotSize compare VAR_RESULT, 1 @@ -58,7 +58,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_LotadBrother:: special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 - compare VAR_RESULT, 255 + compare VAR_RESULT, PARTY_NOTHING_CHOSEN goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad special CompareLotadSize compare VAR_RESULT, 1 diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index dcc0da9f7f..566ac3b368 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -207,7 +207,7 @@ gScriptCmdTable:: .4byte ScrCmd_nop1 @ 0xcc .4byte ScrCmd_setmoneventlegal @ 0xcd .4byte ScrCmd_checkmoneventlegal @ 0xce - .4byte ScrCmd_gotoram @ 0xcf + .4byte ScrCmd_gotowondercardscript @ 0xcf .4byte ScrCmd_nop1 @ 0xd0 .4byte ScrCmd_warpspinenter @ 0xd1 .4byte ScrCmd_setmonmetlocation @ 0xd2 diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 17364559bb..13f31e9bd7 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -103,7 +103,7 @@ LilycoveCity_ContestLobby_EventScript_CancelEnterContest:: LilycoveCity_ContestLobby_EventScript_ChooseContestMon:: msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon1, MSGBOX_DEFAULT choosecontestmon - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelEnterContest special TryEnterContestMon compare VAR_RESULT, CANT_ENTER_CONTEST diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index 8d529d5e10..ba61fb0047 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -107,7 +107,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise:: fadescreen FADE_TO_BLACK special ChooseSendDaycareMon waitstate - compare VAR_0x8004, 255 + compare VAR_0x8004, PARTY_NOTHING_CHOSEN goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot compare VAR_RESULT, 0 diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h index e31debb49b..f95bfa90ff 100644 --- a/include/constants/party_menu.h +++ b/include/constants/party_menu.h @@ -1,6 +1,8 @@ #ifndef GUARD_CONSTANTS_PARTY_MENU_H #define GUARD_CONSTANTS_PARTY_MENU_H +#define PARTY_NOTHING_CHOSEN 0xFF + #define AILMENT_NONE 0 #define AILMENT_PSN 1 #define AILMENT_PRZ 2 diff --git a/include/mail.h b/include/mail.h index 8236811cbd..68c532b310 100644 --- a/include/mail.h +++ b/include/mail.h @@ -27,7 +27,7 @@ u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer); u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail); void TakeMailFromMon(struct Pokemon *mon); void ClearMailItemId(u8 mailId); -u8 TakeMailFromMon2(struct Pokemon *mon); +u8 TakeMailFromMonAndSave(struct Pokemon *mon); bool8 ItemIsMail(u16 itemId); #endif // GUARD_MAIL_H diff --git a/src/mail_data.c b/src/mail_data.c index 683bd854ea..ca50a687e7 100644 --- a/src/mail_data.c +++ b/src/mail_data.c @@ -157,7 +157,7 @@ void ClearMailItemId(u8 mailId) gSaveBlock1Ptr->mail[mailId].itemId = ITEM_NONE; } -u8 TakeMailFromMon2(struct Pokemon *mon) +u8 TakeMailFromMonAndSave(struct Pokemon *mon) { u8 i; u8 newHeldItem[2]; @@ -179,6 +179,7 @@ u8 TakeMailFromMon2(struct Pokemon *mon) } } + // No space to save mail return MAIL_NONE; } diff --git a/src/party_menu.c b/src/party_menu.c index 43f5220346..ad8d78ad31 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -3343,7 +3343,7 @@ static void Task_HandleSendMailToPCYesNoInput(u8 taskId) switch (Menu_ProcessInputNoWrapClearOnChoose()) { case 0: // Yes, send to PC - if (TakeMailFromMon2(&gPlayerParty[gPartyMenu.slotId]) != 0xFF) + if (TakeMailFromMonAndSave(&gPlayerParty[gPartyMenu.slotId]) != MAIL_NONE) { DisplayPartyMenuMessage(gText_MailSentToPC, FALSE); gTasks[taskId].func = Task_UpdateHeldItemSprite; @@ -6133,7 +6133,7 @@ static void BufferMonSelection(void) { gSpecialVar_0x8004 = GetCursorSelectionMonId(); if (gSpecialVar_0x8004 >= PARTY_SIZE) - gSpecialVar_0x8004 = 0xFF; + gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN; gFieldCallback2 = CB2_FadeFromPartyMenu; SetMainCallback2(CB2_ReturnToField); } @@ -6176,7 +6176,7 @@ static void CB2_ChooseContestMon(void) { gContestMonPartyIndex = GetCursorSelectionMonId(); if (gContestMonPartyIndex >= PARTY_SIZE) - gContestMonPartyIndex = 0xFF; + gContestMonPartyIndex = PARTY_NOTHING_CHOSEN; gSpecialVar_0x8004 = gContestMonPartyIndex; gFieldCallback2 = CB2_FadeFromPartyMenu; SetMainCallback2(CB2_ReturnToField); @@ -6221,7 +6221,7 @@ static void CB2_ChooseMonForMoveRelearner(void) { gSpecialVar_0x8004 = GetCursorSelectionMonId(); if (gSpecialVar_0x8004 >= PARTY_SIZE) - gSpecialVar_0x8004 = 0xFF; + gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN; else gSpecialVar_0x8005 = GetNumberOfRelearnableMoves(&gPlayerParty[gSpecialVar_0x8004]); gFieldCallback2 = CB2_FadeFromPartyMenu; From c1130592faa26f4e555142c48bdc02c1378ff1ee Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 15 Nov 2021 10:57:22 -0500 Subject: [PATCH 187/417] Drop some overworld prefixes --- include/overworld.h | 8 ++--- src/battle_setup.c | 2 +- src/event_object_movement.c | 2 +- src/field_screen_effect.c | 2 +- src/field_specials.c | 22 ++++++------ src/overworld.c | 22 +++++------- src/scrcmd.c | 67 +++++++++++++++++-------------------- src/script.c | 9 +++-- 8 files changed, 64 insertions(+), 70 deletions(-) diff --git a/include/overworld.h b/include/overworld.h index e1cf100db5..04b61f7fd7 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -67,8 +67,8 @@ void SetGameStat(u8 index, u32 value); void ApplyNewEncryptionKeyToGameStats(u32 newKey); void LoadObjEventTemplatesFromHeader(void); void LoadSaveblockObjEventScripts(void); -void Overworld_SetObjEventTemplateCoords(u8 localId, s16 x, s16 y); -void Overworld_SetObjEventTemplateMovementType(u8 localId, u8 movementType); +void SetObjEventTemplateCoords(u8 localId, s16 x, s16 y); +void SetObjEventTemplateMovementType(u8 localId, u8 movementType); const struct MapLayout *GetMapLayout(void); void ApplyCurrentWarp(void); struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum); @@ -98,8 +98,8 @@ void ResetInitialPlayerAvatarState(void); void StoreInitialPlayerAvatarState(void); bool32 Overworld_IsBikingAllowed(void); void SetDefaultFlashLevel(void); -void Overworld_SetFlashLevel(s32 flashLevel); -u8 Overworld_GetFlashLevel(void); +void SetFlashLevel(s32 flashLevel); +u8 GetFlashLevel(void); void SetCurrentMapLayout(u16 mapLayoutId); void SetObjectEventLoadFlag(u8 var); u16 GetLocationMusic(struct WarpData *warp); diff --git a/src/battle_setup.c b/src/battle_setup.c index a9d4eeddf5..d94034cff6 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -700,7 +700,7 @@ static u8 GetBattleTransitionTypeByMap(void) PlayerGetDestCoords(&x, &y); tileBehavior = MapGridGetMetatileBehaviorAt(x, y); - if (Overworld_GetFlashLevel()) + if (GetFlashLevel()) return TRANSITION_TYPE_FLASH; if (!MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehavior)) { diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 107ee47abe..9a5ae07b14 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1141,7 +1141,7 @@ static const u8 sPlayerDirectionToCopyDirection[][4] = { static void ClearObjectEvent(struct ObjectEvent *objectEvent) { *objectEvent = (struct ObjectEvent){}; - objectEvent->localId = 0xFF; + objectEvent->localId = OBJ_EVENT_ID_PLAYER; objectEvent->mapNum = MAP_NUM(UNDEFINED); objectEvent->mapGroup = MAP_GROUP(UNDEFINED); objectEvent->movementActionId = MOVEMENT_ACTION_NONE; diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index c27ec6c4c3..b17617eff9 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -974,7 +974,7 @@ static u8 StartUpdateOrbFlashEffect(s32 centerX, s32 centerY, s32 initialFlashRa // A higher flashLevel value is a smaller flash radius (more darkness). 0 is full brightness void AnimateFlash(u8 flashLevel) { - u8 curFlashLevel = Overworld_GetFlashLevel(); + u8 curFlashLevel = GetFlashLevel(); bool8 fullBrightness = FALSE; if (!flashLevel) fullBrightness = TRUE; diff --git a/src/field_specials.c b/src/field_specials.c index ef569ca006..e3a259999e 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3029,6 +3029,8 @@ void CloseFrontierExchangeCornerItemIconWindow(void) RemoveWindow(sFrontierExchangeCorner_ItemIconWindowId); } +#define TAG_ITEM_ICON 5500 + static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) { #include "data/battle_frontier/battle_frontier_exchange_corner.h" @@ -3046,9 +3048,9 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) } else { - FreeSpriteTilesByTag(5500); - FreeSpritePaletteByTag(5500); - sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor1[selection], 33, 88, 0, 5500, 5500); + FreeSpriteTilesByTag(TAG_ITEM_ICON); + FreeSpritePaletteByTag(TAG_ITEM_ICON); + sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor1[selection], 33, 88, 0, TAG_ITEM_ICON, TAG_ITEM_ICON); } break; case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: @@ -3059,9 +3061,9 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) } else { - FreeSpriteTilesByTag(5500); - FreeSpritePaletteByTag(5500); - sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor2[selection], 33, 88, 0, 5500, 5500); + FreeSpriteTilesByTag(TAG_ITEM_ICON); + FreeSpritePaletteByTag(TAG_ITEM_ICON); + sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor2[selection], 33, 88, 0, TAG_ITEM_ICON, TAG_ITEM_ICON); } break; case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: @@ -3078,9 +3080,9 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) static void ShowFrontierExchangeCornerItemIcon(u16 item) { - FreeSpriteTilesByTag(5500); - FreeSpritePaletteByTag(5500); - sScrollableMultichoice_ItemSpriteId = AddItemIconSprite(5500, 5500, item); + FreeSpriteTilesByTag(TAG_ITEM_ICON); + FreeSpritePaletteByTag(TAG_ITEM_ICON); + sScrollableMultichoice_ItemSpriteId = AddItemIconSprite(TAG_ITEM_ICON, TAG_ITEM_ICON, item); if (sScrollableMultichoice_ItemSpriteId != MAX_SPRITES) { @@ -3416,7 +3418,7 @@ static void ChangeDeoxysRockLevel(u8 rockLevel) gFieldEffectArguments[5] = 5; FieldEffectStart(FLDEFF_MOVE_DEOXYS_ROCK); - Overworld_SetObjEventTemplateCoords(1, sDeoxysRockCoords[rockLevel][0], sDeoxysRockCoords[rockLevel][1]); + SetObjEventTemplateCoords(LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK, sDeoxysRockCoords[rockLevel][0], sDeoxysRockCoords[rockLevel][1]); } static void WaitForDeoxysRockMovement(u8 taskId) diff --git a/src/overworld.c b/src/overworld.c index a44d3c050e..6d2b8ae4b3 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -175,7 +175,6 @@ static u8 GetAdjustedInitialTransitionFlags(struct InitialPlayerAvatarState *, u static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *, u8, u16, u8); static u16 GetCenterScreenMetatileBehavior(void); -// IWRAM bss vars static void *sUnusedOverworldCallback; static u8 sPlayerLinkStates[MAX_LINK_PLAYERS]; // This callback is called with a player's key code. It then returns an @@ -185,7 +184,6 @@ static u16 (*sPlayerKeyInterceptCallback)(u32); static bool8 sReceivingFromLink; static u8 sRfuKeepAliveTimer; -// IWRAM common u16 *gBGTilemapBuffers1; u16 *gBGTilemapBuffers2; u16 *gBGTilemapBuffers3; @@ -195,7 +193,6 @@ bool8 (*gFieldCallback2)(void); u8 gLocalLinkPlayerId; // This is our player id in a multiplayer mode. u8 gFieldLinkPlayerCount; -// EWRAM vars EWRAM_DATA static u8 sObjectEventLoadFlag = 0; EWRAM_DATA struct WarpData gLastUsedWarp = {0}; EWRAM_DATA static struct WarpData sWarpDestination = {0}; // new warp position @@ -207,11 +204,10 @@ EWRAM_DATA static u16 sAmbientCrySpecies = 0; EWRAM_DATA static bool8 sIsAmbientCryWaterMon = FALSE; EWRAM_DATA struct LinkPlayerObjectEvent gLinkPlayerObjectEvents[4] = {0}; -// const rom data static const struct WarpData sDummyWarpData = { - .mapGroup = -1, - .mapNum = -1, + .mapGroup = MAP_GROUP(UNDEFINED), + .mapNum = MAP_NUM(UNDEFINED), .warpId = -1, .x = -1, .y = -1, @@ -495,7 +491,7 @@ void LoadSaveblockObjEventScripts(void) savObjTemplates[i].script = mapHeaderObjTemplates[i].script; } -void Overworld_SetObjEventTemplateCoords(u8 localId, s16 x, s16 y) +void SetObjEventTemplateCoords(u8 localId, s16 x, s16 y) { s32 i; struct ObjectEventTemplate *savObjTemplates = gSaveBlock1Ptr->objectEventTemplates; @@ -512,7 +508,7 @@ void Overworld_SetObjEventTemplateCoords(u8 localId, s16 x, s16 y) } } -void Overworld_SetObjEventTemplateMovementType(u8 localId, u8 movementType) +void SetObjEventTemplateMovementType(u8 localId, u8 movementType) { s32 i; @@ -570,9 +566,9 @@ static void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId static bool32 IsDummyWarp(struct WarpData *warp) { - if (warp->mapGroup != -1) + if (warp->mapGroup != (s8)MAP_GROUP(UNDEFINED)) return FALSE; - else if (warp->mapNum != -1) + else if (warp->mapNum != (s8)MAP_NUM(UNDEFINED)) return FALSE; else if (warp->warpId != -1) return FALSE; @@ -978,14 +974,14 @@ void SetDefaultFlashLevel(void) gSaveBlock1Ptr->flashLevel = gMaxFlashLevel - 1; } -void Overworld_SetFlashLevel(s32 flashLevel) +void SetFlashLevel(s32 flashLevel) { if (flashLevel < 0 || flashLevel > gMaxFlashLevel) flashLevel = 0; gSaveBlock1Ptr->flashLevel = flashLevel; } -u8 Overworld_GetFlashLevel(void) +u8 GetFlashLevel(void) { return gSaveBlock1Ptr->flashLevel; } @@ -1790,7 +1786,7 @@ static void InitCurrentFlashLevelScanlineEffect(void) WriteBattlePyramidViewScanlineEffectBuffer(); ScanlineEffect_SetParams(sFlashEffectParams); } - else if ((flashLevel = Overworld_GetFlashLevel())) + else if ((flashLevel = GetFlashLevel())) { WriteFlashScanlineEffectBuffer(flashLevel); ScanlineEffect_SetParams(sFlashEffectParams); diff --git a/src/scrcmd.c b/src/scrcmd.c index 6007fb4931..1c13d46c98 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -58,11 +58,11 @@ EWRAM_DATA const u8 *gRamScriptRetAddr = NULL; static EWRAM_DATA u32 sAddressOffset = 0; // For relative addressing in vgoto etc., used by saved scripts (e.g. Mystery Event) static EWRAM_DATA u16 sPauseCounter = 0; static EWRAM_DATA u16 sMovingNpcId = 0; -static EWRAM_DATA u16 sMovingNpcMapBank = 0; -static EWRAM_DATA u16 sMovingNpcMapId = 0; +static EWRAM_DATA u16 sMovingNpcMapGroup = 0; +static EWRAM_DATA u16 sMovingNpcMapNum = 0; static EWRAM_DATA u16 sFieldEffectScriptId = 0; -static u8 gBrailleWindowId; +static u8 sBrailleWindowId; extern const SpecialFunc gSpecials[]; extern const u8 *gStdScripts[]; @@ -612,9 +612,7 @@ bool8 ScrCmd_animateflash(struct ScriptContext *ctx) bool8 ScrCmd_setflashradius(struct ScriptContext *ctx) { - u16 flashLevel = VarGet(ScriptReadHalfword(ctx)); - - Overworld_SetFlashLevel(flashLevel); + SetFlashLevel(VarGet(ScriptReadHalfword(ctx))); return FALSE; } @@ -668,9 +666,7 @@ bool8 ScrCmd_fadescreenswapbuffers(struct ScriptContext *ctx) static bool8 RunPauseTimer(void) { - sPauseCounter--; - - if (sPauseCounter == 0) + if (--sPauseCounter == 0) return TRUE; else return FALSE; @@ -945,9 +941,9 @@ bool8 ScrCmd_waitfanfare(struct ScriptContext *ctx) bool8 ScrCmd_playbgm(struct ScriptContext *ctx) { u16 songId = ScriptReadHalfword(ctx); - bool8 val = ScriptReadByte(ctx); + bool8 save = ScriptReadByte(ctx); - if (val == TRUE) + if (save == TRUE) Overworld_SetSavedMusic(songId); PlayNewMapMusic(songId); return FALSE; @@ -1018,7 +1014,7 @@ bool8 ScrCmd_applymovement_at(struct ScriptContext *ctx) static bool8 WaitForMovementFinish(void) { - return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapId, sMovingNpcMapBank); + return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapNum, sMovingNpcMapGroup); } bool8 ScrCmd_waitmovement(struct ScriptContext *ctx) @@ -1027,8 +1023,8 @@ bool8 ScrCmd_waitmovement(struct ScriptContext *ctx) if (localId != 0) sMovingNpcId = localId; - sMovingNpcMapBank = gSaveBlock1Ptr->location.mapGroup; - sMovingNpcMapId = gSaveBlock1Ptr->location.mapNum; + sMovingNpcMapGroup = gSaveBlock1Ptr->location.mapGroup; + sMovingNpcMapNum = gSaveBlock1Ptr->location.mapNum; SetupNativeScript(ctx, WaitForMovementFinish); return TRUE; } @@ -1036,15 +1032,15 @@ bool8 ScrCmd_waitmovement(struct ScriptContext *ctx) bool8 ScrCmd_waitmovement_at(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); - u8 mapBank; - u8 mapId; + u8 mapGroup; + u8 mapNum; if (localId != 0) sMovingNpcId = localId; - mapBank = ScriptReadByte(ctx); - mapId = ScriptReadByte(ctx); - sMovingNpcMapBank = mapBank; - sMovingNpcMapId = mapId; + mapGroup = ScriptReadByte(ctx); + mapNum = ScriptReadByte(ctx); + sMovingNpcMapGroup = mapGroup; + sMovingNpcMapNum = mapNum; SetupNativeScript(ctx, WaitForMovementFinish); return TRUE; } @@ -1101,7 +1097,7 @@ bool8 ScrCmd_setobjectxyperm(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); - Overworld_SetObjEventTemplateCoords(localId, x, y); + SetObjEventTemplateCoords(localId, x, y); return FALSE; } @@ -1178,7 +1174,7 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext *ctx) u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 movementType = ScriptReadByte(ctx); - Overworld_SetObjEventTemplateMovementType(localId, movementType); + SetObjEventTemplateMovementType(localId, movementType); return FALSE; } @@ -1311,7 +1307,7 @@ bool8 ScrCmd_messageinstant(struct ScriptContext *ctx) msg = (const u8 *)ctx->data[0]; LoadMessageBoxAndBorderGfx(); DrawDialogueFrame(0, 1); - AddTextPrinterParameterized(0, FONT_NORMAL, msg, 0, 1, 0, 0); + AddTextPrinterParameterized(0, FONT_NORMAL, msg, 0, 1, 0, NULL); return FALSE; } @@ -1528,13 +1524,13 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) yText = (yText - yWindow - 1) * 8; winTemplate = CreateWindowTemplate(0, xWindow, yWindow + 1, width, height, 0xF, 0x1); - gBrailleWindowId = AddWindow(&winTemplate); - LoadUserWindowBorderGfx(gBrailleWindowId, 0x214, 0xE0); - DrawStdWindowFrame(gBrailleWindowId, 0); - PutWindowTilemap(gBrailleWindowId); - FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, TEXT_SKIP_DRAW, NULL); - CopyWindowToVram(gBrailleWindowId, COPYWIN_FULL); + sBrailleWindowId = AddWindow(&winTemplate); + LoadUserWindowBorderGfx(sBrailleWindowId, 0x214, 0xE0); + DrawStdWindowFrame(sBrailleWindowId, 0); + PutWindowTilemap(sBrailleWindowId); + FillWindowPixelBuffer(sBrailleWindowId, PIXEL_FILL(1)); + AddTextPrinterParameterized(sBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, TEXT_SKIP_DRAW, NULL); + CopyWindowToVram(sBrailleWindowId, COPYWIN_FULL); return FALSE; } @@ -1933,7 +1929,7 @@ bool8 ScrCmd_setberrytree(struct ScriptContext *ctx) u8 growthStage = ScriptReadByte(ctx); if (berry == 0) - PlantBerryTree(treeId, 0, growthStage, FALSE); + PlantBerryTree(treeId, berry, growthStage, FALSE); else PlantBerryTree(treeId, berry, growthStage, FALSE); return FALSE; @@ -2230,9 +2226,7 @@ bool8 ScrCmd_checkmoneventlegal(struct ScriptContext *ctx) return FALSE; } -// TODO: Should be renamed. Name implies general usage, but its specifically for Wonder Card -// See GetSavedRamScriptIfValid, which is NULL if ValidateSavedWonderCard returns FALSE -bool8 ScrCmd_gotoram(struct ScriptContext *ctx) +bool8 ScrCmd_gotowondercardscript(struct ScriptContext *ctx) { const u8* script = GetSavedRamScriptIfValid(); @@ -2244,7 +2238,6 @@ bool8 ScrCmd_gotoram(struct ScriptContext *ctx) return FALSE; } -// Unused // For the warp used by the Aqua Hideout, see DoTeleportTileWarp bool8 ScrCmd_warpspinenter(struct ScriptContext *ctx) { @@ -2273,8 +2266,8 @@ bool8 ScrCmd_setmonmetlocation(struct ScriptContext *ctx) static void CloseBrailleWindow(void) { - ClearStdWindowAndFrame(gBrailleWindowId, 1); - RemoveWindow(gBrailleWindowId); + ClearStdWindowAndFrame(sBrailleWindowId, 1); + RemoveWindow(sBrailleWindowId); } bool8 ScrCmd_buffertrainerclassname(struct ScriptContext *ctx) diff --git a/src/script.c b/src/script.c index b10e0db49d..468989fb51 100644 --- a/src/script.c +++ b/src/script.c @@ -3,6 +3,7 @@ #include "event_data.h" #include "mystery_gift.h" #include "util.h" +#include "constants/event_objects.h" #include "constants/maps.h" #include "constants/map_scripts.h" @@ -399,6 +400,8 @@ const u8 *GetRamScript(u8 objectId, const u8 *script) } } +#define NO_OBJECT OBJ_EVENT_ID_PLAYER + bool32 ValidateSavedRamScript(void) { struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data; @@ -408,7 +411,7 @@ bool32 ValidateSavedRamScript(void) return FALSE; if (scriptData->mapNum != MAP_NUM(UNDEFINED)) return FALSE; - if (scriptData->objectId != 0xFF) + if (scriptData->objectId != NO_OBJECT) return FALSE; if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum) return FALSE; @@ -426,7 +429,7 @@ u8 *GetSavedRamScriptIfValid(void) return NULL; if (scriptData->mapNum != MAP_NUM(UNDEFINED)) return NULL; - if (scriptData->objectId != 0xFF) + if (scriptData->objectId != NO_OBJECT) return NULL; if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum) { @@ -443,5 +446,5 @@ void InitRamScript_NoObjectEvent(u8 *script, u16 scriptSize) { if (scriptSize > sizeof(gSaveBlock1Ptr->ramScript.data.script)) scriptSize = sizeof(gSaveBlock1Ptr->ramScript.data.script); - InitRamScript(script, scriptSize, MAP_GROUP(UNDEFINED), MAP_NUM(UNDEFINED), 0xFF); + InitRamScript(script, scriptSize, MAP_GROUP(UNDEFINED), MAP_NUM(UNDEFINED), NO_OBJECT); } From 04cc923d6c17edae778f14cb431991867a05cf65 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 15 Nov 2021 12:04:54 -0500 Subject: [PATCH 188/417] Handle optional arguments for warp commands, add WARP_ID_NONE --- asm/macros/event.inc | 175 +++++++++--------- .../AbandonedShip_Corridors_B1F/scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/AbandonedShip_Rooms_B1F/scripts.inc | 2 +- .../AbandonedShip_Underwater1/scripts.inc | 2 +- .../AbandonedShip_Underwater2/scripts.inc | 2 +- .../scripts.inc | 4 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 6 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 6 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 4 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 6 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- .../scripts.inc | 8 +- .../scripts.inc | 2 +- .../scripts.inc | 8 +- .../scripts.inc | 2 +- .../scripts.inc | 6 +- .../scripts.inc | 4 +- .../BattleFrontier_OutsideWest/scripts.inc | 4 +- data/maps/BirthIsland_Harbor/scripts.inc | 2 +- data/maps/CaveOfOrigin_Entrance/scripts.inc | 2 +- data/maps/ContestHall/scripts.inc | 10 +- data/maps/DewfordTown/scripts.inc | 2 +- .../EverGrandeCity_ChampionsRoom/scripts.inc | 2 +- .../scripts.inc | 4 +- .../scripts.inc | 2 +- .../FallarborTown_BattleTentLobby/scripts.inc | 2 +- data/maps/FarawayIsland_Entrance/scripts.inc | 2 +- data/maps/GraniteCave_B1F/scripts.inc | 2 +- data/maps/InsideOfTruck/scripts.inc | 4 +- .../LilycoveCity_ContestLobby/scripts.inc | 10 +- .../scripts.inc | 10 +- data/maps/LilycoveCity_Harbor/scripts.inc | 28 +-- .../scripts.inc | 6 +- data/maps/LittlerootTown/scripts.inc | 6 +- .../scripts.inc | 2 +- .../LittlerootTown_MaysHouse_1F/scripts.inc | 2 +- data/maps/MarineCave_Entrance/scripts.inc | 2 +- data/maps/MirageTower_2F/scripts.inc | 2 +- data/maps/MirageTower_3F/scripts.inc | 2 +- data/maps/MirageTower_4F/scripts.inc | 2 +- data/maps/MossdeepCity_Gym/scripts.inc | 2 +- .../MossdeepCity_SpaceCenter_2F/scripts.inc | 2 +- data/maps/MtPyre_2F/scripts.inc | 2 +- data/maps/NavelRock_Harbor/scripts.inc | 2 +- data/maps/PetalburgCity/scripts.inc | 4 +- data/maps/PetalburgCity_Gym/scripts.inc | 6 +- data/maps/Route101/scripts.inc | 2 +- data/maps/Route104_MrBrineysHouse/scripts.inc | 2 +- .../Route110_TrickHouseEntrance/scripts.inc | 18 +- .../Route110_TrickHousePuzzle5/scripts.inc | 2 +- .../Route110_TrickHousePuzzle7/scripts.inc | 2 +- .../maps/Route112_CableCarStation/scripts.inc | 2 +- .../Route121_SafariZoneEntrance/scripts.inc | 2 +- data/maps/Route134/scripts.inc | 2 +- data/maps/RustboroCity/scripts.inc | 2 +- data/maps/SSTidalCorridor/scripts.inc | 4 +- data/maps/SafariZone_South/scripts.inc | 2 +- data/maps/SeafloorCavern_Entrance/scripts.inc | 4 +- data/maps/SeafloorCavern_Room9/scripts.inc | 2 +- data/maps/SealedChamber_OuterRoom/scripts.inc | 4 +- data/maps/SkyPillar_2F/scripts.inc | 2 +- data/maps/SkyPillar_4F/scripts.inc | 2 +- data/maps/SlateportCity/scripts.inc | 2 +- .../scripts.inc | 6 +- .../scripts.inc | 2 +- .../SlateportCity_BattleTentLobby/scripts.inc | 2 +- data/maps/SlateportCity_Harbor/scripts.inc | 6 +- data/maps/SootopolisCity/scripts.inc | 10 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/SouthernIsland_Exterior/scripts.inc | 2 +- data/maps/TrainerHill_Elevator/scripts.inc | 4 +- data/maps/Underwater_MarineCave/scripts.inc | 2 +- data/maps/Underwater_Route134/scripts.inc | 2 +- .../Underwater_SeafloorCavern/scripts.inc | 2 +- .../maps/Underwater_SealedChamber/scripts.inc | 4 +- .../Underwater_SootopolisCity/scripts.inc | 2 +- .../scripts.inc | 4 +- .../scripts.inc | 2 +- .../scripts.inc | 2 +- data/scripts/abnormal_weather.inc | 16 +- data/scripts/battle_pike.inc | 10 +- data/scripts/cable_club.inc | 10 +- data/scripts/safari_zone.inc | 4 +- data/scripts/trainer_hill.inc | 4 +- include/constants/maps.h | 12 ++ include/global.h | 1 + src/battle_arena.c | 2 +- src/battle_dome.c | 2 +- src/battle_factory.c | 2 +- src/battle_palace.c | 2 +- src/battle_pyramid.c | 1 - src/battle_setup.c | 1 - src/battle_tent.c | 6 +- src/battle_tower.c | 2 +- src/braille_puzzles.c | 1 - src/cable_club.c | 2 +- src/contest_util.c | 2 +- src/decoration.c | 2 +- src/event_object_movement.c | 1 - src/faraway_island.c | 1 - src/field_control_avatar.c | 9 +- src/field_door.c | 1 - src/field_player_avatar.c | 1 - src/field_special_scene.c | 2 +- src/field_specials.c | 9 +- src/frontier_pass.c | 1 - src/heal_location.c | 1 - src/link.c | 5 +- src/match_call.c | 1 - src/menu_helpers.c | 1 - src/mirage_tower.c | 1 - src/new_game.c | 3 +- src/overworld.c | 29 +-- src/party_menu.c | 1 - src/pokedex_area_screen.c | 1 - src/pokemon_storage_system.c | 1 - src/region_map.c | 3 +- src/roamer.c | 1 - src/rotating_gate.c | 1 - src/save_location.c | 1 - src/scrcmd.c | 4 +- src/script.c | 1 - src/secret_base.c | 7 +- src/trainer_hill.c | 1 - src/tv.c | 1 - src/union_room.c | 7 +- src/wild_encounter.c | 1 - 145 files changed, 342 insertions(+), 352 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 01a7889fec..c5fc6e2052 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -377,37 +377,64 @@ .byte \speed .endm - @ Warps the player to the specified map. - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro warp map:req, warp:req, x=0, y=0 - .byte 0x39 + @ Helper macro for warp commands. It formats the arguments for a warp command. + @ It allows warp macros to either provide 1. a valid id for which warp location to use, + @ or 2. a pair of x/y coordinates to use. Both may be provided but at least one will be + @ ignored by SetPlayerCoordsFromWard. If none are provided it will use dummy arguments, + @ and the warp will send the player to the center of the map. + @ Examples of valid inputs for a warp command: + @ - warp MAP, x, y + @ - warp MAP, warpId + @ - warp MAP + @ - warp MAP, warpId, x, y + .macro formatwarp map:req, a, b, c map \map - .byte \warp - .2byte \x - .2byte \y + .ifb \a @ No arguments provided, use dummy warpId and coords. + .byte WARP_ID_NONE + .2byte -1 @ x + .2byte -1 @ y + .else + .ifb \b @ Only one argument provided, treat it as a warpId and use dummy coords. + .byte \a @ warpId + .2byte -1 @ x + .2byte -1 @ y + .else + .ifb \c @ Only two arguments provided, treat them as a coord pair and use dummy warpId. + .byte WARP_ID_NONE + .2byte \a @ x + .2byte \b @ y + .else @ All three arguments provided. Output them and let the warp sort out which to use. + .byte \a @ warpId + .2byte \b @ x + .2byte \c @ y + .endif + .endif + .endif + .endm + + + @ Warps the player to the specified map. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warp map:req, a, b, c + .byte 0x39 + formatwarp \map, \a, \b, \c .endm @ Warps the player to the specified map without playing a sound effect. - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro warpsilent map:req, warp:req, x=0, y=0 + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpsilent map:req, a, b, c .byte 0x3a - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Warps the player to the specified map and plays a door opening animation before stepping upwards into it. - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro warpdoor map:req, warp:req, x=0, y=0 + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpdoor map:req, a, b, c .byte 0x3b - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Warps the player to another map using a hole animation. @@ -416,55 +443,48 @@ map \map .endm - @ Warps the player to the specified map using a teleport effect. - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro warpteleport map:req, warp:req, x=0, y=0 + @ Warps the player to the specified map using a teleport effect. Effect is similar to warpspinenter but + @ this warp has a fade out first and doesn't maintain the original facing direction. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpteleport map:req, a, b, c .byte 0x3d - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Sets the warp destination to be used later. - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro setwarp map:req, warp:req, x=0, y=0 + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setwarp map:req, a, b, c .byte 0x3e - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm - @ TODO - @ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to. - @ Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). - .macro setdynamicwarp map:req, warp:req, x:req, y:req + @ Sets the dynamic warp destination. Warps with a destination map of MAP_NONE will target this destination. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setdynamicwarp map:req, a, b, c .byte 0x3f - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Sets the destination that diving or emerging from a dive will take the player to. - .macro setdivewarp map:req, warp:req, x:req, y:req + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setdivewarp map:req, a, b, c .byte 0x40 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Sets the destination that falling into a hole will take the player to. - .macro setholewarp map:req, warp:req, x:req, y:req + @ While it does accept and set the x/y coordinates and warpId, they are ultimately ignored. + @ This is only used to set the map the player should fall to. The exact location on the + @ map to fall to is determined by warphole. + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setholewarp map:req, a=0, b=0, c .byte 0x41 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Retrieves the player's zero-indexed x- and y-coordinates in the map, and stores them in the specified variables. @@ -1441,14 +1461,11 @@ .endm @ Sets the destination that using an Escape Rope or Dig will take the player to. - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro setescapewarp map:req, warp:req, x=0, y=0 + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro setescapewarp map:req, a, b, c .byte 0xc4 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Blocks script execution until cry finishes. @@ -1522,15 +1539,11 @@ .2byte \worldmapflag .endm - @ Clone of warpteleport? It is apparently only used in FR/LG, and only with specials.[source] - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro warpteleport2 map:req, warp:req, x=0, y=0 + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpspinenter map:req, a, b, c .byte 0xd1 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm @ Changes the location where the player caught the Pokemon in the specified slot of their party. @@ -1565,14 +1578,11 @@ .byte 0xd6 .endm - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro warpmossdeepgym map:req, warp:req, x=0, y=0 + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpmossdeepgym map:req, a, b, c .byte 0xd7 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm .macro selectapproachingtrainer @@ -1614,14 +1624,11 @@ .4byte \pointer .endm - @ The player will warp to the coordinates of the given 'warp'. - @ If 'warp' is set to an invalid id (e.g. 255) then the coordinates x/y will be used instead. - .macro warpsootopolislegend map:req, warp:req, x=0, y=0 + @ Warp commands can be given either the id of which warp location to go to on the destination map + @ or a pair of x/y coordinates to go to directly on the destination map. + .macro warpsootopolislegend map:req, a, b, c .byte 0xe0 - map \map - .byte \warp - .2byte \x - .2byte \y + formatwarp \map, \a, \b, \c .endm .macro buffercontesttypestring out:req, word:req diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc index a2fab1bb93..7f0288e0c1 100644 --- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc @@ -4,7 +4,7 @@ AbandonedShip_Corridors_B1F_MapScripts:: .byte 0 AbandonedShip_Corridors_B1F_OnResume: - setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 255, 5, 4 + setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 5, 4 end AbandonedShip_Corridors_B1F_OnLoad: diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc index a30c448d37..cdc350f3e9 100644 --- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc @@ -4,7 +4,7 @@ AbandonedShip_HiddenFloorCorridors_MapScripts:: .byte 0 AbandonedShip_HiddenFloorCorridors_OnResume: - setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 255, 5, 4 + setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 5, 4 end AbandonedShip_HiddenFloorCorridors_OnLoad: diff --git a/data/maps/AbandonedShip_Rooms_B1F/scripts.inc b/data/maps/AbandonedShip_Rooms_B1F/scripts.inc index a716972ff4..484f15ba12 100644 --- a/data/maps/AbandonedShip_Rooms_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Rooms_B1F/scripts.inc @@ -3,7 +3,7 @@ AbandonedShip_Rooms_B1F_MapScripts:: .byte 0 AbandonedShip_Rooms_B1F_OnResume: - setdivewarp MAP_ABANDONED_SHIP_UNDERWATER2, 255, 17, 4 + setdivewarp MAP_ABANDONED_SHIP_UNDERWATER2, 17, 4 end AbandonedShip_Rooms_B1F_EventScript_FatMan:: diff --git a/data/maps/AbandonedShip_Underwater1/scripts.inc b/data/maps/AbandonedShip_Underwater1/scripts.inc index 9b3528b779..0f47704d1a 100644 --- a/data/maps/AbandonedShip_Underwater1/scripts.inc +++ b/data/maps/AbandonedShip_Underwater1/scripts.inc @@ -3,6 +3,6 @@ AbandonedShip_Underwater1_MapScripts:: .byte 0 AbandonedShip_Underwater1_OnResume: - setdivewarp MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS, 255, 0, 10 + setdivewarp MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS, 0, 10 end diff --git a/data/maps/AbandonedShip_Underwater2/scripts.inc b/data/maps/AbandonedShip_Underwater2/scripts.inc index bb139bd510..6258b50c18 100644 --- a/data/maps/AbandonedShip_Underwater2/scripts.inc +++ b/data/maps/AbandonedShip_Underwater2/scripts.inc @@ -3,6 +3,6 @@ AbandonedShip_Underwater2_MapScripts:: .byte 0 AbandonedShip_Underwater2_OnResume: - setdivewarp MAP_ABANDONED_SHIP_ROOMS_B1F, 255, 13, 7 + setdivewarp MAP_ABANDONED_SHIP_ROOMS_B1F, 13, 7 end diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index adea508ae6..36e7a8d11a 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -110,7 +110,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DeclareOpponentWinner:: msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsOpponent, MSGBOX_DEFAULT BattleFrontier_BattleArenaBattleRoom_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST - warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 255, 7, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 7, 8 waitstate BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedOpponent:: @@ -210,7 +210,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_ContinueChallenge:: BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon:: delay 60 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON - warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 255, 7, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 7, 8 waitstate BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor2ndOpponent:: diff --git a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc index 1752b93421..7086819569 100644 --- a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc @@ -22,7 +22,7 @@ BattleFrontier_BattleArenaCorridor_EventScript_WalkToBattleRoom:: applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaCorridor_Movement_PlayerEnterDoor waitmovement 0 setvar VAR_0x8006, 0 - warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM, 255, 7, 5 + warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM, 7, 5 waitstate end diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index 12b600f69b..e6394d2a80 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -173,7 +173,7 @@ BattleFrontier_BattleArenaLobby_EventScript_EnterChallenge:: call_if_eq BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLv50 compare VAR_RESULT, FRONTIER_LVL_OPEN call_if_eq BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLvOpen - warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR, 255, 9, 13 + warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR, 9, 13 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index 76088f54d1..809be00f38 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -164,7 +164,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent:: switch VAR_RESULT case DOME_ROUNDS_COUNT, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney setvar VAR_0x8006, 1 - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 255, 5, 3 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 5, 3 waitstate BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney:: @@ -885,12 +885,12 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE compare VAR_RESULT, FRONTIER_MODE_DOUBLES goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 255, 5, 11 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 5, 11 waitstate end BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles:: - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 255, 17, 11 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 17, 11 waitstate end diff --git a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc index 32f3c82ba3..2466944390 100644 --- a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc @@ -40,7 +40,7 @@ BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen:: BattleFrontier_BattleDomeCorridor_EventScript_WarpToPreBattleRoom:: waitmovement 0 setvar VAR_0x8006, 0 - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 255, 5, 7 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 5, 7 waitstate end diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index 04df6f38c6..ae82a55588 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -202,7 +202,7 @@ BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge:: closemessage call BattleFrontier_BattleDomeLobby_EventScript_WalkToDoor special HealPlayerParty - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR, 255, 23, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR, 23, 6 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc index ca441cf1f8..da5b4371ad 100644 --- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc @@ -163,7 +163,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_ContinueChallenge:: waitmovement 0 closedoor 5, 1 waitdooranim - warp MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM, 255, 9, 5 + warp MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM, 9, 5 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index 24f5ebe103..b0529153e3 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc @@ -119,7 +119,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum:: switch VAR_RESULT case 7, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon setvar VAR_0x8006, 1 - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 255, 8, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 8 waitstate BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON @@ -247,12 +247,12 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE compare VAR_RESULT, FRONTIER_MODE_DOUBLES goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 4, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 4, 8 waitstate end BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles:: - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 14, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 14, 8 waitstate end diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index 3b11392947..da36d96e25 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc @@ -181,7 +181,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge:: applymovement VAR_LAST_TALKED, BattleFrontier_BattleFactoryLobby_Movement_AttendantEnterDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor waitmovement 0 - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 255, 8, 13 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 13 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc index ce3cb357c2..f83b77fbbf 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc @@ -54,7 +54,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom:: compare VAR_RESULT, FRONTIER_LVL_OPEN call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen waitmovement 0 - warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 255, 6, 11 + warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 6, 11 waitstate end diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 13015dd3e1..1d46ea0440 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -419,12 +419,12 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE compare VAR_RESULT, FRONTIER_MODE_DOUBLES goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles - warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 5, 7 + warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 5, 7 waitstate end BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles:: - warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 19, 7 + warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 19, 7 waitstate end diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc index 011170bae8..68de944c09 100644 --- a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc @@ -53,7 +53,7 @@ BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom:: closedoor 10, 3 waitdooranim BattleFrontier_BattlePalaceCorridor_EventScript_WarpToBattleRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM, 255, 7, 4 + warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM, 7, 4 waitstate end diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index a51fa48fde..0bd08ae44b 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -192,7 +192,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge:: msgbox BattleFrontier_BattlePalaceLobby_Text_FollowMe, MSGBOX_DEFAULT closemessage call BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor - warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR, 255, 8, 13 + warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR, 8, 13 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc index 44539747b8..fe2c6ed00f 100644 --- a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc @@ -25,7 +25,7 @@ BattleFrontier_BattlePikeCorridor_EventScript_EnterCorridor:: waitmovement 0 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 99 call BattleFrontier_BattlePike_EventScript_CloseCurtain - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 6, 10 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index ecbbafef24..4bb6e23275 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -159,7 +159,7 @@ BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge:: call BattleFrontier_BattlePikeLobby_EventScript_WalkToCorridor special HealPlayerParty call BattleFrontier_BattlePike_EventScript_CloseCurtain - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR, 255, 6, 7 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR, 6, 7 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc index 15ebbeb3fd..e0246ed57d 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc @@ -18,7 +18,7 @@ BattleFrontier_BattlePikeRoomFinal_EventScript_EnterRoom:: msgbox BattleFrontier_BattlePikeRoomFinal_Text_CongratsThisWayPlease, MSGBOX_DEFAULT closemessage releaseall - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 5bd04bfb40..2023d44f59 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -44,7 +44,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterSingleBattleRoom:: case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_WonSingleBattle BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc index ee9e548f6e..0c055f6315 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc @@ -16,7 +16,7 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_SetInWildMonRoom:: BattleFrontier_BattlePikeRoomWildMons_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc index 37737554f5..301a8f4766 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -28,7 +28,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_GetChallengeStatus:: end BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpToLobby:: - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc index 8993418ee8..ebc3a8d3e3 100644 --- a/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc @@ -70,7 +70,7 @@ BattleFrontier_BattlePyramid_EventScript_WarpToLobby:: pyramid_updatelight 0, PYRAMID_LIGHT_SET_RADIUS pyramid_clearhelditems special HealPlayerParty - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 7, 13 waitstate end @@ -102,12 +102,12 @@ BattlePyramid_WarpToNextFloor:: pyramid_seedfloor frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_RESULT, 0 - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 255, 1, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 1, 1 waitstate end BattlePyramid_WarpToTop:: - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP, 255, 17, 17 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP, 17, 17 waitstate end diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index c93deee3ec..761f5f6635 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -173,7 +173,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_RESULT, 0 special HealPlayerParty - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 255, 1, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 1, 1 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc index 0c1db1eea8..f7054d2025 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc @@ -93,7 +93,7 @@ BattleFrontier_BattlePyramidTop_EventScript_Attendant:: closemessage BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON - warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13 + warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 7, 13 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc index c909239bea..ab25442a26 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc @@ -428,23 +428,23 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobby:: goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis compare VAR_RESULT, FRONTIER_MODE_LINK_MULTIS goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 6, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 6, 6 waitstate end BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyDoubles:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 10, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 10, 6 waitstate end BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 14, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 14, 6 waitstate end BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis:: tower_closelink - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 18, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 18, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc index c09c897e98..13abf70278 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc @@ -37,7 +37,7 @@ BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor:: BattleFrontier_BattleTowerCorridor_EventScript_WarpToBattleRoom:: setvar VAR_TEMP_0, 0 - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 255, 4, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 4, 8 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc index 0021b9e842..1f7e05ca5f 100644 --- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc @@ -37,23 +37,23 @@ BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoom:: return BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR, 255, 8, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR, 8, 1 waitstate return BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoomMulti:: goto_if_unset FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerElevator_EventScript_WarpToPartnerRoom - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 255, 7, 2 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 7, 2 waitstate return BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridorMulti:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 255, 7, 2 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 7, 2 waitstate return BattleFrontier_BattleTowerElevator_EventScript_WarpToPartnerRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 255, 10, 1 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 10, 1 waitstate return diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index ab2a620436..4d4438ae6c 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -615,7 +615,7 @@ BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad:: goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad call BattleFrontier_BattleTowerLobby_EventScript_ShowYouToBattleRoom clearflag FLAG_CANCEL_BATTLE_ROOM_CHALLENGE - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 255, 1, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc index 70922d473c..c977ecb5f6 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc @@ -106,18 +106,18 @@ BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToBattleRoom:: return BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 255, 4, 8 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 4, 8 waitstate return BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToMultiBattleRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 255, 4, 5 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 4, 5 waitstate return @ Unnecessary duplicate of the above BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToLinkMultiBattleRoom:: - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 255, 4, 5 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 4, 5 waitstate return diff --git a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc index 06038b43cd..3beaa38c71 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc @@ -108,7 +108,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_EnterElevator:: call BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_MoveToElevator closedoor 10, 1 waitdooranim - warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 255, 1, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6 waitstate releaseall end @@ -189,7 +189,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_TalkToPotentialPartner:: call_if_eq BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExitSouth removeobject VAR_LAST_TALKED setflag FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER - warpsilent MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 255, 10, 3 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 10, 3 waitstate release end diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc index 635b27c2cb..f3af2b0581 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -48,7 +48,7 @@ BattleFrontier_OutsideWest_EventScript_FerryToSlateport:: goto_if_eq BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination msgbox BattleFrontier_OutsideWest_Text_PleaseBoardFerry, MSGBOX_DEFAULT call BattleFrontier_OutsideWest_EventScript_BoardFerry - warp MAP_SLATEPORT_CITY_HARBOR, 255, 8, 11 + warp MAP_SLATEPORT_CITY_HARBOR, 8, 11 waitstate release end @@ -59,7 +59,7 @@ BattleFrontier_OutsideWest_EventScript_FerryToLilycove:: goto_if_eq BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination msgbox BattleFrontier_OutsideWest_Text_PleaseBoardFerry, MSGBOX_DEFAULT call BattleFrontier_OutsideWest_EventScript_BoardFerry - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index 06c5b08e9d..8d3fa5b5e4 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -18,7 +18,7 @@ BirthIsland_Harbor_EventScript_Sailor:: hideobjectat LOCALID_SAILOR, MAP_BIRTH_ISLAND_HARBOR setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepartIsland - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end diff --git a/data/maps/CaveOfOrigin_Entrance/scripts.inc b/data/maps/CaveOfOrigin_Entrance/scripts.inc index 091246ae0d..40ca7a654d 100644 --- a/data/maps/CaveOfOrigin_Entrance/scripts.inc +++ b/data/maps/CaveOfOrigin_Entrance/scripts.inc @@ -3,6 +3,6 @@ CaveOfOrigin_Entrance_MapScripts:: .byte 0 CaveOfOrigin_Entrance_OnResume: - setescapewarp MAP_SOOTOPOLIS_CITY, 255, 31, 17 + setescapewarp MAP_SOOTOPOLIS_CITY, 31, 17 end diff --git a/data/maps/ContestHall/scripts.inc b/data/maps/ContestHall/scripts.inc index 535e28b789..3dd633f8f7 100644 --- a/data/maps/ContestHall/scripts.inc +++ b/data/maps/ContestHall/scripts.inc @@ -418,27 +418,27 @@ ContestHall_EventScript_SetExitWarp:: return ContestHall_EventScript_SetExitWarpNormalContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4 waitstate end ContestHall_EventScript_SetExitWarpSuperContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4 waitstate end ContestHall_EventScript_SetExitWarpHyperContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4 waitstate end ContestHall_EventScript_SetExitWarpMasterContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4 waitstate end ContestHall_EventScript_SetExitWarpLinkContest:: - warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 15, 4 + warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 15, 4 waitstate end diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index 281648aeb6..a21ebd0baf 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -152,7 +152,7 @@ DewfordTown_EventScript_SailToPetalburg:: hideobjectat LOCALID_BOAT_DEWFORD, MAP_DEWFORD_TOWN setvar VAR_BOARD_BRINEY_BOAT_STATE, 2 resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN - warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 255, 5, 4 + warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 5, 4 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 waitstate release diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index 6b9281ae6d..d169371517 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -141,7 +141,7 @@ EverGrandeCity_ChampionsRoom_EventScript_BirchArrivesExitForHoF:: applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExit waitmovement 0 setflag FLAG_HIDE_PETALBURG_GYM_GREETER - warp MAP_EVER_GRANDE_CITY_HALL_OF_FAME, 255, 7, 16 + warp MAP_EVER_GRANDE_CITY_HALL_OF_FAME, 7, 16 waitstate releaseall end diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index 3f51ba3935..7fc90e4e16 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -71,7 +71,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty - warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 6, 6 waitstate FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @@ -142,7 +142,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: delay 60 frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty - warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 6, 6 waitstate @ Unreachable code block? The flow into the next block also doesnt make sense diff --git a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc index 077cdfe798..023dc919f8 100644 --- a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc +++ b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc @@ -22,7 +22,7 @@ FallarborTown_BattleTentCorridor_EventScript_EnterCorridor:: closedoor 2, 1 waitdooranim setvar VAR_0x8006, 0 - warp MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM, 255, 4, 4 + warp MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM, 4, 4 waitstate releaseall end diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index 6a2c8713fa..d6826f037f 100644 --- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc +++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc @@ -161,7 +161,7 @@ FallarborTown_BattleTentLobby_EventScript_EnterChallenge:: msgbox FallarborTown_BattleTentLobby_Text_GuideYouToBattleTent, MSGBOX_DEFAULT closemessage call FallarborTown_BattleTentLobby_EventScript_WalkToDoor - warp MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR, 255, 2, 7 + warp MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR, 2, 7 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc index 15deb95e6f..2f4db2651c 100644 --- a/data/maps/FarawayIsland_Entrance/scripts.inc +++ b/data/maps/FarawayIsland_Entrance/scripts.inc @@ -33,7 +33,7 @@ FarawayIsland_Entrance_EventScript_Sailor:: hideobjectat LOCALID_SAILOR, MAP_FARAWAY_ISLAND_ENTRANCE setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepartIsland - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end diff --git a/data/maps/GraniteCave_B1F/scripts.inc b/data/maps/GraniteCave_B1F/scripts.inc index f1b52ce662..24519aef65 100644 --- a/data/maps/GraniteCave_B1F/scripts.inc +++ b/data/maps/GraniteCave_B1F/scripts.inc @@ -6,6 +6,6 @@ GraniteCave_B1F_MapScripts:: GraniteCave_B1F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_GRANITE_CAVE_B2F, 255, 0, 0 + setholewarp MAP_GRANITE_CAVE_B2F end diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc index 3068b11841..472e27e36f 100644 --- a/data/maps/InsideOfTruck/scripts.inc +++ b/data/maps/InsideOfTruck/scripts.inc @@ -32,7 +32,7 @@ InsideOfTruck_EventScript_SetIntroFlagsMale:: setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_SIBLING setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL setvar VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 1 - setdynamicwarp MAP_LITTLEROOT_TOWN, 255, 3, 10 + setdynamicwarp MAP_LITTLEROOT_TOWN, 3, 10 releaseall end @@ -45,7 +45,7 @@ InsideOfTruck_EventScript_SetIntroFlagsFemale:: setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_SIBLING setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL setvar VAR_LITTLEROOT_HOUSES_STATE_MAY, 1 - setdynamicwarp MAP_LITTLEROOT_TOWN, 255, 12, 10 + setdynamicwarp MAP_LITTLEROOT_TOWN, 12, 10 releaseall end diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index c572fdc02b..94ccc21bd4 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -384,31 +384,31 @@ LilycoveCity_ContestLobby_EventScript_WarpToContestHall:: return LilycoveCity_ContestLobby_EventScript_WarpToCoolContestHall:: - setwarp MAP_CONTEST_HALL_COOL, 255, 7, 5 + setwarp MAP_CONTEST_HALL_COOL, 7, 5 special DoContestHallWarp waitstate return LilycoveCity_ContestLobby_EventScript_WarpToBeautyContestHall:: - setwarp MAP_CONTEST_HALL_BEAUTY, 255, 7, 5 + setwarp MAP_CONTEST_HALL_BEAUTY, 7, 5 special DoContestHallWarp waitstate return LilycoveCity_ContestLobby_EventScript_WarpToCuteContestHall:: - setwarp MAP_CONTEST_HALL_CUTE, 255, 7, 5 + setwarp MAP_CONTEST_HALL_CUTE, 7, 5 special DoContestHallWarp waitstate return LilycoveCity_ContestLobby_EventScript_WarpToSmartContestHall:: - setwarp MAP_CONTEST_HALL_SMART, 255, 7, 5 + setwarp MAP_CONTEST_HALL_SMART, 7, 5 special DoContestHallWarp waitstate return LilycoveCity_ContestLobby_EventScript_WarpToToughContestHall:: - setwarp MAP_CONTEST_HALL_TOUGH, 255, 7, 5 + setwarp MAP_CONTEST_HALL_TOUGH, 7, 5 special DoContestHallWarp waitstate return diff --git a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc index b6ad2e4e6f..3e7c4c4f66 100644 --- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc @@ -59,7 +59,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_1F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 255, 2, 1 + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 2, 1 compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator @@ -69,7 +69,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_2F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 255, 2, 1 + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 2, 1 compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator @@ -79,7 +79,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_3F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 255, 2, 1 + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 2, 1 compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator @@ -89,7 +89,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_4F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 255, 2, 1 + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 2, 1 compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator @@ -99,7 +99,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_5thFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_5F - setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 255, 2, 1 + setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 2, 1 compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index a22e830293..d8dfa0f218 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -8,7 +8,7 @@ LilycoveCity_Harbor_MapScripts:: .byte 0 LilycoveCity_Harbor_OnTransition: - setescapewarp MAP_LILYCOVE_CITY, 255, 12, 33 + setescapewarp MAP_LILYCOVE_CITY, 12, 33 end LilycoveCity_Harbor_EventScript_FerryAttendant:: @@ -64,28 +64,28 @@ LilycoveCity_Harbor_EventScript_FerryRegularLocationSelect:: LilycoveCity_Harbor_EventScript_GoToSouthernIsland:: call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22 + warp MAP_SOUTHERN_ISLAND_EXTERIOR, 13, 22 waitstate release end LilycoveCity_Harbor_EventScript_GoToNavelRock:: call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_NAVEL_ROCK_HARBOR, 255, 8, 4 + warp MAP_NAVEL_ROCK_HARBOR, 8, 4 waitstate release end LilycoveCity_Harbor_EventScript_GoToBirthIsland:: call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_BIRTH_ISLAND_HARBOR, 255, 8, 4 + warp MAP_BIRTH_ISLAND_HARBOR, 8, 4 waitstate release end LilycoveCity_Harbor_EventScript_GoToFarawayIsland:: call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38 + warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 waitstate release end @@ -96,7 +96,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateport:: goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10 + warp MAP_SS_TIDAL_CORRIDOR, 1, 10 waitstate release end @@ -106,7 +106,7 @@ LilycoveCity_Harbor_EventScript_GoToBattleFrontier:: compare VAR_RESULT, NO goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67 + warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate release end @@ -223,7 +223,7 @@ LilycoveCity_Harbor_EventScript_EonTicketFirstTime:: LilycoveCity_Harbor_EventScript_GoToSouthernIslandFirstTime:: closemessage call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor - warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22 + warp MAP_SOUTHERN_ISLAND_EXTERIOR, 13, 22 waitstate release end @@ -240,7 +240,7 @@ LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime:: LilycoveCity_Harbor_EventScript_GoToBirthIslandFirstTime:: closemessage call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor - warp MAP_BIRTH_ISLAND_HARBOR, 255, 8, 4 + warp MAP_BIRTH_ISLAND_HARBOR, 8, 4 waitstate release end @@ -281,7 +281,7 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: call_if_eq LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepart - warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38 + warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 waitstate release end @@ -289,7 +289,7 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: LilycoveCity_Harbor_EventScript_GoToFarawayIslandFirstTime:: closemessage call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor - warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38 + warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 waitstate release end @@ -306,7 +306,7 @@ LilycoveCity_Harbor_EventScript_MysticTicketFirstTime:: LilycoveCity_Harbor_EventScript_GoToNavelRockFirstTime:: closemessage call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor - warp MAP_NAVEL_ROCK_HARBOR, 255, 8, 4 + warp MAP_NAVEL_ROCK_HARBOR, 8, 4 waitstate release end @@ -399,7 +399,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateportUnused:: goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10 + warp MAP_SS_TIDAL_CORRIDOR, 1, 10 waitstate release end @@ -410,7 +410,7 @@ LilycoveCity_Harbor_EventScript_GoToBattleFrontierUnused:: compare VAR_RESULT, NO goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind call LilycoveCity_Harbor_EventScript_BoardFerry - warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67 + warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate release end diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc index e5d855633e..12c4ead3ee 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc @@ -52,7 +52,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorNorth:: lockall applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorNorth waitmovement 0 - warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8 + warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate end @@ -60,7 +60,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorWest:: lockall applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorWest waitmovement 0 - warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8 + warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate end @@ -68,7 +68,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorEast:: lockall applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorEast waitmovement 0 - warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8 + warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8 waitstate end diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc index 1936b5ad83..f8a7244bf6 100644 --- a/data/maps/LittlerootTown/scripts.inc +++ b/data/maps/LittlerootTown/scripts.inc @@ -129,7 +129,7 @@ LittlerootTown_EventScript_StepOffTruckMale:: setvar VAR_0x8005, 8 call LittlerootTown_EventScript_GoInsideWithMom setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_TRUCK - warpsilent MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F, 255, 8, 8 + warpsilent MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F, 8, 8 waitstate releaseall end @@ -140,7 +140,7 @@ LittlerootTown_EventScript_StepOffTruckFemale:: setvar VAR_0x8005, 8 call LittlerootTown_EventScript_GoInsideWithMom setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_TRUCK - warpsilent MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F, 255, 2, 8 + warpsilent MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F, 2, 8 waitstate releaseall end @@ -230,7 +230,7 @@ LittlerootTown_EventScript_BeginDexUpgradeScene:: clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCH delay 20 clearflag FLAG_HIDE_MAP_NAME_POPUP - warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 255, 6, 5 + warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5 waitstate releaseall end diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index 2e4ff739d1..95399eaeaa 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -70,7 +70,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_GoUpstairsToSetClock:: applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs applymovement LOCALID_MOM, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs waitmovement 0 - warp MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 255, 7, 1 + warp MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 7, 1 waitstate releaseall end diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index 5fcec19512..2a73a94c8f 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -69,7 +69,7 @@ LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock:: applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs applymovement LOCALID_MOM, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs waitmovement 0 - warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 255, 1, 1 + warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 1, 1 waitstate releaseall end diff --git a/data/maps/MarineCave_Entrance/scripts.inc b/data/maps/MarineCave_Entrance/scripts.inc index a075d2c30d..172a19d26c 100644 --- a/data/maps/MarineCave_Entrance/scripts.inc +++ b/data/maps/MarineCave_Entrance/scripts.inc @@ -3,6 +3,6 @@ MarineCave_Entrance_MapScripts:: .byte 0 MarineCave_Entrance_OnResume: - setdivewarp MAP_UNDERWATER_MARINE_CAVE, 255, 9, 6 + setdivewarp MAP_UNDERWATER_MARINE_CAVE, 9, 6 end diff --git a/data/maps/MirageTower_2F/scripts.inc b/data/maps/MirageTower_2F/scripts.inc index 3d53359d4c..39d2be7f43 100644 --- a/data/maps/MirageTower_2F/scripts.inc +++ b/data/maps/MirageTower_2F/scripts.inc @@ -6,6 +6,6 @@ MirageTower_2F_MapScripts:: MirageTower_2F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_MIRAGE_TOWER_1F, 255, 0, 0 + setholewarp MAP_MIRAGE_TOWER_1F end diff --git a/data/maps/MirageTower_3F/scripts.inc b/data/maps/MirageTower_3F/scripts.inc index 02b0864008..1b2f04aeee 100644 --- a/data/maps/MirageTower_3F/scripts.inc +++ b/data/maps/MirageTower_3F/scripts.inc @@ -6,6 +6,6 @@ MirageTower_3F_MapScripts:: MirageTower_3F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_MIRAGE_TOWER_2F, 255, 0, 0 + setholewarp MAP_MIRAGE_TOWER_2F end diff --git a/data/maps/MirageTower_4F/scripts.inc b/data/maps/MirageTower_4F/scripts.inc index 2c96710d13..8d88c69904 100644 --- a/data/maps/MirageTower_4F/scripts.inc +++ b/data/maps/MirageTower_4F/scripts.inc @@ -57,7 +57,7 @@ MirageTower_4F_EventScript_CollapseMirageTower:: waitstate setvar VAR_MIRAGE_TOWER_STATE, 1 clearflag FLAG_LANDMARK_MIRAGE_TOWER - warp MAP_ROUTE111, 255, 19, 59 + warp MAP_ROUTE111, 19, 59 waitstate release end diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index 22c2e17ab9..d6df2b3807 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -201,7 +201,7 @@ MossdeepCity_Gym_EventScript_ClearSwitch4:: MossdeepCity_Gym_EventScript_WarpToEntrance:: lockall - warpmossdeepgym MAP_MOSSDEEP_CITY_GYM, 255, 7, 30 + warpmossdeepgym MAP_MOSSDEEP_CITY_GYM, 7, 30 waitstate releaseall end diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index 044979c123..02278a13b9 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -54,7 +54,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ThreeMagmaGrunts:: closemessage applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_PlayerExit waitmovement 0 - warp MAP_MOSSDEEP_CITY_SPACE_CENTER_1F, 255, 13, 1 + warp MAP_MOSSDEEP_CITY_SPACE_CENTER_1F, 13, 1 waitstate releaseall end diff --git a/data/maps/MtPyre_2F/scripts.inc b/data/maps/MtPyre_2F/scripts.inc index 9fe7bf9d2f..381d034596 100644 --- a/data/maps/MtPyre_2F/scripts.inc +++ b/data/maps/MtPyre_2F/scripts.inc @@ -6,7 +6,7 @@ MtPyre_2F_MapScripts:: MtPyre_2F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_MT_PYRE_1F, 255, 0, 0 + setholewarp MAP_MT_PYRE_1F end MtPyre_2F_EventScript_Woman:: diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index b12e62248f..759434cde3 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -18,7 +18,7 @@ NavelRock_Harbor_EventScript_Sailor:: hideobjectat LOCALID_SAILOR, MAP_NAVEL_ROCK_HARBOR setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepartIsland - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc index a77939c4de..25b39a3eb0 100644 --- a/data/maps/PetalburgCity/scripts.inc +++ b/data/maps/PetalburgCity/scripts.inc @@ -60,7 +60,7 @@ PetalburgCity_EventScript_WallyTutorial:: clearflag FLAG_DONT_TRANSITION_MUSIC special LoadPlayerParty setvar VAR_PETALBURG_GYM_STATE, 1 - warp MAP_PETALBURG_CITY_GYM, 255, 4, 108 + warp MAP_PETALBURG_CITY_GYM, 4, 108 waitstate releaseall end @@ -85,7 +85,7 @@ PetalburgCity_EventScript_WalkToWallyHouse:: clearflag FLAG_HIDE_MAP_NAME_POPUP fadedefaultbgm clearflag FLAG_DONT_TRANSITION_MUSIC - warp MAP_PETALBURG_CITY_WALLYS_HOUSE, 255, 2, 4 + warp MAP_PETALBURG_CITY_WALLYS_HOUSE, 2, 4 waitstate releaseall end diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index bbb3294627..6c8da5847a 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -220,7 +220,7 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorial:: clearflag FLAG_HIDE_PETALBURG_GYM_WALLY setflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL special InitBirchState - warp MAP_PETALBURG_CITY, 255, 15, 8 + warp MAP_PETALBURG_CITY, 15, 8 waitstate release end @@ -497,7 +497,7 @@ PetalburgCity_Gym_EventScript_WallysDadArrives:: removeobject LOCALID_WALLYS_DAD setvar VAR_PETALBURG_CITY_STATE, 4 clearflag FLAG_HIDE_PETALBURG_CITY_WALLYS_DAD - warp MAP_PETALBURG_CITY, 255, 15, 8 + warp MAP_PETALBURG_CITY, 15, 8 waitstate release end @@ -796,7 +796,7 @@ PetalburgCity_Gym_EventScript_SpeedRoomDoor:: PetalburgCity_Gym_EventScript_EnterRoom:: closemessage delay 30 - warpdoor MAP_PETALBURG_CITY_GYM, 255, VAR_0x8008, VAR_0x8009 + warpdoor MAP_PETALBURG_CITY_GYM, VAR_0x8008, VAR_0x8009 waitstate releaseall end diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index a41bc2fcbc..02071aad11 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -245,7 +245,7 @@ Route101_EventScript_BirchsBag:: call_if_eq Route101_EventScript_HideMayInBedroom compare VAR_RESULT, FEMALE call_if_eq Route101_EventScript_HideBrendanInBedroom - warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 255, 6, 5 + warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5 waitstate release end diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc index f2e169d105..ed2a5d7174 100644 --- a/data/maps/Route104_MrBrineysHouse/scripts.inc +++ b/data/maps/Route104_MrBrineysHouse/scripts.inc @@ -86,7 +86,7 @@ Route104_MrBrineysHouse_EventScript_SailToDewford:: setvar VAR_ROUTE104_STATE, 2 setflag FLAG_HIDE_RUSTBORO_CITY_RIVAL setflag FLAG_HIDE_ROUTE_104_RIVAL - warp MAP_ROUTE104, 255, 13, 51 + warp MAP_ROUTE104, 13, 51 waitstate releaseall end diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index e756feadca..ef8e45b45e 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -269,7 +269,7 @@ Route110_TrickHouseEntrance_EventScript_FoundTrickMaster:: call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBeneathCushion closemessage setvar VAR_TRICK_HOUSE_FOUND_TRICK_MASTER, 1 - warpsilent MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 255, 6, 2 + warpsilent MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 6, 2 waitstate releaseall end @@ -535,49 +535,49 @@ Route110_TrickHouseEntrance_Movement_EnterRoom: step_end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom1:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE1, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE1, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom2:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE2, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE2, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom3:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE3, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE3, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom4:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE4, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE4, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom5:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom6:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE6, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE6, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom7:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 0, 21 waitstate releaseall end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom8:: - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE8, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE8, 0, 21 waitstate releaseall end diff --git a/data/maps/Route110_TrickHousePuzzle5/scripts.inc b/data/maps/Route110_TrickHousePuzzle5/scripts.inc index 3c574441ec..c15c4ee730 100644 --- a/data/maps/Route110_TrickHousePuzzle5/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle5/scripts.inc @@ -465,7 +465,7 @@ Route110_TrickHousePuzzle5_EventScript_IncorrectAnswer:: waitmovement 0 msgbox Route110_TrickHousePuzzle5_Text_WaitForNextChallenge, MSGBOX_DEFAULT closemessage - warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 255, 0, 21 + warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 0, 21 waitstate releaseall end diff --git a/data/maps/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc index b0f1cbea12..1890eb2c48 100644 --- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc @@ -113,7 +113,7 @@ Route110_TrickHousePuzzle7_EventScript_FoundScroll:: Route110_TrickHousePuzzle7_EventScript_TeleportPad:: lockall setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1 - warpteleport MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 255, 3, 19 + warpteleport MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 3, 19 waitstate releaseall end diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc index 86fe61a05b..0fcbc0a34f 100644 --- a/data/maps/Route112_CableCarStation/scripts.inc +++ b/data/maps/Route112_CableCarStation/scripts.inc @@ -6,7 +6,7 @@ Route112_CableCarStation_MapScripts:: .byte 0 Route112_CableCarStation_OnTransition: - setescapewarp MAP_ROUTE112, 255, 28, 28 + setescapewarp MAP_ROUTE112, 28, 28 compare VAR_CABLE_CAR_STATION_STATE, 2 call_if_eq Route112_CableCarStation_EventScript_MoveAttendantAside end diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 1a0102cf4e..5050612f74 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -80,7 +80,7 @@ Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: special EnterSafariMode setvar VAR_SAFARI_ZONE_STATE, 2 clearflag FLAG_GOOD_LUCK_SAFARI_ZONE - warp MAP_SAFARI_ZONE_SOUTH, 255, 32, 33 + warp MAP_SAFARI_ZONE_SOUTH, 32, 33 waitstate end diff --git a/data/maps/Route134/scripts.inc b/data/maps/Route134/scripts.inc index 043835373e..226135c1d5 100644 --- a/data/maps/Route134/scripts.inc +++ b/data/maps/Route134/scripts.inc @@ -3,7 +3,7 @@ Route134_MapScripts:: .byte 0 Route134_OnResume: - setdivewarp MAP_UNDERWATER_ROUTE134, 255, 8, 6 + setdivewarp MAP_UNDERWATER_ROUTE134, 8, 6 end Route134_EventScript_Jack:: diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index 8d286d5de2..48c413b042 100644 --- a/data/maps/RustboroCity/scripts.inc +++ b/data/maps/RustboroCity/scripts.inc @@ -621,7 +621,7 @@ RustboroCity_EventScript_ReturnGoods:: setflag FLAG_HIDE_RUSTBORO_CITY_DEVON_EMPLOYEE_1 setvar VAR_RUSTBORO_CITY_STATE, 5 delay 30 - warp MAP_RUSTBORO_CITY_DEVON_CORP_3F, 255, 2, 2 + warp MAP_RUSTBORO_CITY_DEVON_CORP_3F, 2, 2 waitstate releaseall end diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc index 4aa94de237..c99d3ad033 100644 --- a/data/maps/SSTidalCorridor/scripts.inc +++ b/data/maps/SSTidalCorridor/scripts.inc @@ -129,7 +129,7 @@ SSTidalCorridor_EventScript_ExitLilycove:: setrespawn HEAL_LOCATION_LILYCOVE_CITY msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end @@ -138,7 +138,7 @@ SSTidalCorridor_EventScript_ExitSlateport:: setrespawn HEAL_LOCATION_SLATEPORT_CITY msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver - warp MAP_SLATEPORT_CITY_HARBOR, 255, 8, 11 + warp MAP_SLATEPORT_CITY_HARBOR, 8, 11 waitstate release end diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc index 791572fe0c..c361d9f2eb 100644 --- a/data/maps/SafariZone_South/scripts.inc +++ b/data/maps/SafariZone_South/scripts.inc @@ -94,7 +94,7 @@ SafariZone_South_EventScript_ExitEarlyEast:: SafariZone_South_EventScript_Exit:: setvar VAR_SAFARI_ZONE_STATE, 1 special ExitSafariMode - warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5 + warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 2, 5 waitstate end diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc index a4c621e3e0..a999c4a152 100644 --- a/data/maps/SeafloorCavern_Entrance/scripts.inc +++ b/data/maps/SeafloorCavern_Entrance/scripts.inc @@ -5,8 +5,8 @@ SeafloorCavern_Entrance_MapScripts:: .byte 0 SeafloorCavern_Entrance_OnResume: - setdivewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5 - setescapewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5 + setdivewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 6, 5 + setescapewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 6, 5 end SeafloorCavern_Entrance_EventScript_Grunt:: diff --git a/data/maps/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc index 3db2348a4a..63e6baf3c7 100644 --- a/data/maps/SeafloorCavern_Room9/scripts.inc +++ b/data/maps/SeafloorCavern_Room9/scripts.inc @@ -145,7 +145,7 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre:: setflag FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_KYOGRE setflag FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS setflag FLAG_HIDE_MAP_NAME_POPUP - warp MAP_ROUTE128, 255, 38, 22 + warp MAP_ROUTE128, 38, 22 waitstate releaseall end diff --git a/data/maps/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc index 7d57ea5449..0a8c3aa4af 100644 --- a/data/maps/SealedChamber_OuterRoom/scripts.inc +++ b/data/maps/SealedChamber_OuterRoom/scripts.inc @@ -5,8 +5,8 @@ SealedChamber_OuterRoom_MapScripts:: .byte 0 SealedChamber_OuterRoom_OnResume: - setdivewarp MAP_UNDERWATER_SEALED_CHAMBER, 255, 12, 44 - setescapewarp MAP_UNDERWATER_SEALED_CHAMBER, 255, 12, 44 + setdivewarp MAP_UNDERWATER_SEALED_CHAMBER, 12, 44 + setescapewarp MAP_UNDERWATER_SEALED_CHAMBER, 12, 44 end SealedChamber_OuterRoom_OnTransition: diff --git a/data/maps/SkyPillar_2F/scripts.inc b/data/maps/SkyPillar_2F/scripts.inc index 9990ebba96..ba2fe889be 100644 --- a/data/maps/SkyPillar_2F/scripts.inc +++ b/data/maps/SkyPillar_2F/scripts.inc @@ -16,6 +16,6 @@ SkyPillar_2F_EventScript_CleanFloor:: SkyPillar_2F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_SKY_PILLAR_1F, 255, 0, 0 + setholewarp MAP_SKY_PILLAR_1F end diff --git a/data/maps/SkyPillar_4F/scripts.inc b/data/maps/SkyPillar_4F/scripts.inc index bed91a1751..b3ff931ad4 100644 --- a/data/maps/SkyPillar_4F/scripts.inc +++ b/data/maps/SkyPillar_4F/scripts.inc @@ -16,6 +16,6 @@ SkyPillar_4F_EventScript_CleanFloor:: SkyPillar_4F_SetHoleWarp: setstepcallback STEP_CB_CRACKED_FLOOR - setholewarp MAP_SKY_PILLAR_3F, 255, 0, 0 + setholewarp MAP_SKY_PILLAR_3F end diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index 3e8648531f..693a99e49a 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -635,7 +635,7 @@ SlateportCity_EventScript_CaptStern:: clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_AQUA_GRUNT clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_ARCHIE setvar VAR_SLATEPORT_CITY_STATE, 2 - warp MAP_SLATEPORT_CITY_HARBOR, 255, 11, 14 + warp MAP_SLATEPORT_CITY_HARBOR, 11, 14 waitstate releaseall end diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc index 06052e1451..285c567ec3 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc +++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc @@ -68,7 +68,7 @@ SlateportCity_BattleTentBattleRoom_EventScript_EnterRoom:: SlateportCity_BattleTent_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty - warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 6, 6 waitstate @ forced stop @@ -79,14 +79,14 @@ SlateportCity_BattleTentBattleRoom_EventScript_DefeatedOpponent:: switch VAR_RESULT case 3, SlateportCity_BattleTentBattleRoom_EventScript_WarpToLobbyWon setvar VAR_0x8006, 1 - warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 255, 2, 3 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 2, 3 waitstate @ forced stop SlateportCity_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty - warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 6, 6 waitstate @ forced stop diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 37b0f6fc88..309b709d1a 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -52,7 +52,7 @@ SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom:: waitmovement 0 closedoor 2, 1 waitdooranim - warp MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM, 255, 4, 4 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM, 4, 4 waitstate end diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc index 8361cdfcc3..7ed9420b0e 100644 --- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc +++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc @@ -134,7 +134,7 @@ SlateportCity_BattleTentLobby_EventScript_EnterChallenge:: msgbox SlateportCity_BattleTentLobby_Text_StepThisWay, MSGBOX_DEFAULT closemessage call SlateportCity_BattleTentLobby_EventScript_WalkToDoor - warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 255, 2, 7 + warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 2, 7 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index 0cc07b73f3..ff1315923e 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -9,7 +9,7 @@ SlateportCity_Harbor_MapScripts:: .byte 0 SlateportCity_Harbor_OnTransition: - setescapewarp MAP_SLATEPORT_CITY, 255, 28, 13 + setescapewarp MAP_SLATEPORT_CITY, 28, 13 setvar VAR_TEMP_1, 0 compare VAR_SLATEPORT_HARBOR_STATE, 1 call_if_eq SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene @@ -210,7 +210,7 @@ SlateportCity_Harbor_EventScript_Lilycove:: goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_SLATEPORT call SlateportCity_Harbor_EventScript_BoardFerry - warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10 + warp MAP_SS_TIDAL_CORRIDOR, 1, 10 waitstate release end @@ -220,7 +220,7 @@ SlateportCity_Harbor_EventScript_BattleFrontier:: compare VAR_RESULT, NO goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination call SlateportCity_Harbor_EventScript_BoardFerry - warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67 + warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate release end diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index f3f8ea024a..0a2d4b4475 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -206,7 +206,7 @@ SootopolisCity_EventScript_PlayerFaceLegendaries2:: return SootopolisCity_OnResume: - setdivewarp MAP_UNDERWATER_SOOTOPOLIS_CITY, 255, 9, 6 + setdivewarp MAP_UNDERWATER_SOOTOPOLIS_CITY, 9, 6 end SootopolisCity_OnFrame: @@ -565,7 +565,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: fadenewbgm MUS_SOOTOPOLIS delay 120 clearflag FLAG_HIDE_MAP_NAME_POPUP - warpsootopolislegend MAP_SOOTOPOLIS_CITY, 255, 43, 32 + warpsootopolislegend MAP_SOOTOPOLIS_CITY, 43, 32 waitstate end @@ -618,7 +618,7 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: fadenewbgm MUS_SURF delay 120 clearflag FLAG_HIDE_MAP_NAME_POPUP - warpsootopolislegend MAP_SOOTOPOLIS_CITY, 255, 29, 53 + warpsootopolislegend MAP_SOOTOPOLIS_CITY, 29, 53 waitstate end @@ -1003,7 +1003,7 @@ SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin:: setflag FLAG_STEVEN_GUIDES_TO_CAVE_OF_ORIGIN applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerEnterCaveOfOrigin waitmovement 0 - warp MAP_CAVE_OF_ORIGIN_ENTRANCE, 255, 9, 20 + warp MAP_CAVE_OF_ORIGIN_ENTRANCE, 9, 20 waitstate end @@ -1460,7 +1460,7 @@ SootopolisCity_EventScript_MaxieArchieLeave:: clearflag FLAG_HIDE_MT_PYRE_SUMMIT_MAXIE clearflag FLAG_HIDE_MT_PYRE_SUMMIT_ARCHIE setvar VAR_MT_PYRE_STATE, 2 - warpsilent MAP_SOOTOPOLIS_CITY, 255, 31, 34 + warpsilent MAP_SOOTOPOLIS_CITY, 31, 34 waitstate releaseall end diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc index 1fb8a8f723..70dbc98aa5 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc @@ -115,7 +115,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting:: call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast compare VAR_FACING, DIR_WEST call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest - warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 255, 3, 1 + warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 3, 1 waitstate release end diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc index f0ebbf516f..93f0089251 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc @@ -34,7 +34,7 @@ SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleVisitingTrainer:: waitmovement 0 special LoadPlayerParty setvar VAR_TEMP_1, 1 - warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F, 255, 3, 1 + warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F, 3, 1 waitstate releaseall end diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc index b491c2f6c5..e40c7819ed 100644 --- a/data/maps/SouthernIsland_Exterior/scripts.inc +++ b/data/maps/SouthernIsland_Exterior/scripts.inc @@ -23,7 +23,7 @@ SouthernIsland_Exterior_EventScript_Sailor:: hideobjectat LOCALID_SAILOR, MAP_SOUTHERN_ISLAND_EXTERIOR setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepartIsland - warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11 + warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 waitstate release end diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc index f4ebc7ea91..05878fe856 100644 --- a/data/maps/TrainerHill_Elevator/scripts.inc +++ b/data/maps/TrainerHill_Elevator/scripts.inc @@ -15,7 +15,7 @@ TrainerHill_Elevator_EventScript_ExitToRoof:: applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevatorToRoof waitmovement 0 releaseall - warp MAP_TRAINER_HILL_ROOF, 255, 15, 5 + warp MAP_TRAINER_HILL_ROOF, 15, 5 waitstate end @@ -37,7 +37,7 @@ TrainerHill_Elevator_EventScript_EnterElevator:: delay 25 applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevator waitmovement 0 - warp MAP_TRAINER_HILL_ENTRANCE, 255, 17, 8 + warp MAP_TRAINER_HILL_ENTRANCE, 17, 8 waitstate end diff --git a/data/maps/Underwater_MarineCave/scripts.inc b/data/maps/Underwater_MarineCave/scripts.inc index cbd158e273..6c87628351 100644 --- a/data/maps/Underwater_MarineCave/scripts.inc +++ b/data/maps/Underwater_MarineCave/scripts.inc @@ -8,6 +8,6 @@ Underwater_MarineCave_OnTransition: end Underwater_MarineCave_OnResume: - setdivewarp MAP_MARINE_CAVE_ENTRANCE, 255, 10, 17 + setdivewarp MAP_MARINE_CAVE_ENTRANCE, 10, 17 end diff --git a/data/maps/Underwater_Route134/scripts.inc b/data/maps/Underwater_Route134/scripts.inc index 909b2f8b10..b5ab48e26a 100644 --- a/data/maps/Underwater_Route134/scripts.inc +++ b/data/maps/Underwater_Route134/scripts.inc @@ -3,6 +3,6 @@ Underwater_Route134_MapScripts:: .byte 0 Underwater_Route134_OnResume: - setdivewarp MAP_ROUTE134, 255, 60, 31 + setdivewarp MAP_ROUTE134, 60, 31 end diff --git a/data/maps/Underwater_SeafloorCavern/scripts.inc b/data/maps/Underwater_SeafloorCavern/scripts.inc index 2e0613c04c..c4931c1ad0 100644 --- a/data/maps/Underwater_SeafloorCavern/scripts.inc +++ b/data/maps/Underwater_SeafloorCavern/scripts.inc @@ -33,7 +33,7 @@ Underwater_SeafloorCavern_EventScript_SetSubmarineGoneMetatiles:: return Underwater_SeafloorCavern_OnResume: - setdivewarp MAP_SEAFLOOR_CAVERN_ENTRANCE, 255, 10, 17 + setdivewarp MAP_SEAFLOOR_CAVERN_ENTRANCE, 10, 17 end Underwater_SeafloorCavern_EventScript_CheckStolenSub:: diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc index 2b3fe5e0de..f670cce0b8 100644 --- a/data/maps/Underwater_SealedChamber/scripts.inc +++ b/data/maps/Underwater_SealedChamber/scripts.inc @@ -11,11 +11,11 @@ Underwater_SealedChamber_OnDive: goto Underwater_SealedChamber_EventScript_SurfaceSealedChamber Underwater_SealedChamber_EventScript_SurfaceRoute134:: - setdivewarp MAP_ROUTE134, 255, 60, 31 + setdivewarp MAP_ROUTE134, 60, 31 end Underwater_SealedChamber_EventScript_SurfaceSealedChamber:: - setdivewarp MAP_SEALED_CHAMBER_OUTER_ROOM, 255, 10, 19 + setdivewarp MAP_SEALED_CHAMBER_OUTER_ROOM, 10, 19 end Underwater_SealedChamber_EventScript_Braille:: diff --git a/data/maps/Underwater_SootopolisCity/scripts.inc b/data/maps/Underwater_SootopolisCity/scripts.inc index 4346c284fa..8bf30560ca 100644 --- a/data/maps/Underwater_SootopolisCity/scripts.inc +++ b/data/maps/Underwater_SootopolisCity/scripts.inc @@ -3,6 +3,6 @@ Underwater_SootopolisCity_MapScripts:: .byte 0 Underwater_SootopolisCity_OnResume: - setdivewarp MAP_SOOTOPOLIS_CITY, 255, 29, 53 + setdivewarp MAP_SOOTOPOLIS_CITY, 29, 53 end diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index b349a395cf..badbe18490 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -59,7 +59,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST special LoadPlayerParty - warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 6, 6 waitstate VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @@ -120,7 +120,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON special LoadPlayerParty - warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6 + warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 6, 6 waitstate VerdanturfTown_BattleTentBattleRoom_EventScript_PauseChallenge:: diff --git a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc index c2e9dbd6a7..debf1b177f 100644 --- a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc @@ -22,7 +22,7 @@ VerdanturfTown_BattleTentCorridor_EventScript_EnterCorridor:: closedoor 2, 1 waitdooranim setvar VAR_0x8006, 0 - warp MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM, 255, 6, 5 + warp MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM, 6, 5 waitstate releaseall end diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index dd8f0eaa45..4f863f1719 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -162,7 +162,7 @@ VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge:: msgbox VerdanturfTown_BattleTentLobby_Text_NowFollowMe, MSGBOX_DEFAULT closemessage call VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor - warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 255, 2, 7 + warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 2, 7 setvar VAR_TEMP_0, 0 waitstate end diff --git a/data/scripts/abnormal_weather.inc b/data/scripts/abnormal_weather.inc index 9af24c45d5..bc4a867e33 100644 --- a/data/scripts/abnormal_weather.inc +++ b/data/scripts/abnormal_weather.inc @@ -394,33 +394,33 @@ AbnormalWeather_Underwater_SetupEscapeWarp:: return AbnormalWeather_Underwater_SetupEscapeWarpRoute105North:: - setescapewarp MAP_ROUTE105, 255, 11, 29 + setescapewarp MAP_ROUTE105, 11, 29 return AbnormalWeather_Underwater_SetupEscapeWarpRoute105South:: - setescapewarp MAP_ROUTE105, 255, 21, 54 + setescapewarp MAP_ROUTE105, 21, 54 return AbnormalWeather_Underwater_SetupEscapeWarpRoute125West:: - setescapewarp MAP_ROUTE125, 255, 9, 17 + setescapewarp MAP_ROUTE125, 9, 17 return AbnormalWeather_Underwater_SetupEscapeWarpRoute125East:: - setescapewarp MAP_ROUTE125, 255, 54, 19 + setescapewarp MAP_ROUTE125, 54, 19 return AbnormalWeather_Underwater_SetupEscapeWarpRoute127North:: - setescapewarp MAP_ROUTE127, 255, 58, 10 + setescapewarp MAP_ROUTE127, 58, 10 return AbnormalWeather_Underwater_SetupEscapeWarpRoute127South:: - setescapewarp MAP_ROUTE127, 255, 62, 31 + setescapewarp MAP_ROUTE127, 62, 31 return AbnormalWeather_Underwater_SetupEscapeWarpRoute129West:: - setescapewarp MAP_ROUTE129, 255, 17, 15 + setescapewarp MAP_ROUTE129, 17, 15 return AbnormalWeather_Underwater_SetupEscapeWarpRoute129East:: - setescapewarp MAP_ROUTE129, 255, 43, 20 + setescapewarp MAP_ROUTE129, 43, 20 return diff --git a/data/scripts/battle_pike.inc b/data/scripts/battle_pike.inc index 3260bcfd82..e11f997626 100644 --- a/data/scripts/battle_pike.inc +++ b/data/scripts/battle_pike.inc @@ -114,7 +114,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom:: applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer waitmovement 0 call BattleFrontier_BattlePike_EventScript_CloseCurtain - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL, 255, 4, 7 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL, 4, 7 waitstate end @@ -122,7 +122,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpWildMonRoom:: applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer waitmovement 0 call BattleFrontier_BattlePike_EventScript_CloseCurtain - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS, 255, 4, 19 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS, 4, 19 waitstate end @@ -184,14 +184,14 @@ BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom:: applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer waitmovement 0 call BattleFrontier_BattlePike_EventScript_CloseCurtain - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL, 255, 2, 7 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL, 2, 7 return BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom:: applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer waitmovement 0 call BattleFrontier_BattlePike_EventScript_CloseCurtain - warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10 + warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 6, 10 return BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit:: @@ -230,7 +230,7 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack:: BattleFrontier_BattlePike_EventScript_Retire:: frontier_set FRONTIER_DATA_CHALLENGE_STATUS CHALLENGE_STATUS_LOST - warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6 + warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6 waitstate end diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index ea9a2b4e3f..714792fc69 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -388,7 +388,7 @@ CableClub_EventScript_EnterColosseum:: compare VAR_0x8004, USING_MULTI_BATTLE goto_if_eq CableClub_EventScript_WarpTo4PColosseum special SetCableClubWarp - warp MAP_BATTLE_COLOSSEUM_2P, 255, 6, 8 + warp MAP_BATTLE_COLOSSEUM_2P, 6, 8 special DoCableClubWarp waitstate end @@ -401,7 +401,7 @@ CableClub_EventScript_PlayerApproachLinkRoomRight:: CableClub_EventScript_WarpTo4PColosseum:: special SetCableClubWarp - warp MAP_BATTLE_COLOSSEUM_4P, 255, 5, 8 + warp MAP_BATTLE_COLOSSEUM_4P, 5, 8 special DoCableClubWarp waitstate end @@ -491,7 +491,7 @@ CableClub_EventScript_EnterTradeCenter:: waitdooranim release special SetCableClubWarp - setwarp MAP_TRADE_CENTER, 255, 5, 8 + setwarp MAP_TRADE_CENTER, 5, 8 special DoCableClubWarp waitstate end @@ -566,7 +566,7 @@ CableClub_EventScript_EnterRecordCorner:: waitdooranim release special SetCableClubWarp - setwarp MAP_RECORD_CORNER, 255, 8, 9 + setwarp MAP_RECORD_CORNER, 8, 9 special DoCableClubWarp waitstate end @@ -968,7 +968,7 @@ CableClub_EventScript_EnterUnionRoom:: waitdooranim special Script_ResetUnionRoomTrade special SetCableClubWarp - warpteleport2 MAP_UNION_ROOM, 255, 7, 11 + warpspinenter MAP_UNION_ROOM, 7, 11 waitstate special RunUnionRoom waitstate diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 6dd0767f0c..3b7d85a674 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -1,13 +1,13 @@ SafariZone_EventScript_OutOfBallsMidBattle:: setvar VAR_SAFARI_ZONE_STATE, 1 special ExitSafariMode - setwarp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5 + setwarp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 2, 5 end SafariZone_EventScript_Exit:: setvar VAR_SAFARI_ZONE_STATE, 1 special ExitSafariMode - warp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5 + warp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 2, 5 waitstate end diff --git a/data/scripts/trainer_hill.inc b/data/scripts/trainer_hill.inc index f3ba5f035a..8804b71b0a 100644 --- a/data/scripts/trainer_hill.inc +++ b/data/scripts/trainer_hill.inc @@ -41,7 +41,7 @@ TrainerHill_1F_EventScript_DummyWarpToEntranceCounter:: @ Never reached TrainerHill_1F_EventScript_WarpSilentToEntranceCounter:: - warpsilent MAP_TRAINER_HILL_ENTRANCE, 255, 9, 6 + warpsilent MAP_TRAINER_HILL_ENTRANCE, 9, 6 waitstate end @@ -53,7 +53,7 @@ TrainerHill_1F_EventScript_Lost:: TrainerHill_EventScript_WarpToEntranceCounter:: setvar VAR_TEMP_1, 0 - warp MAP_TRAINER_HILL_ENTRANCE, 255, 9, 6 + warp MAP_TRAINER_HILL_ENTRANCE, 9, 6 waitstate end diff --git a/include/constants/maps.h b/include/constants/maps.h index b849749a95..6524f8c14a 100644 --- a/include/constants/maps.h +++ b/include/constants/maps.h @@ -15,4 +15,16 @@ #define MAP_GROUP_SPECIAL_MONS_1 MAP_GROUP(METEOR_FALLS_1F_1R) #define MAP_GROUP_SPECIAL_MONS_2 MAP_GROUP(SAFARI_ZONE_NORTHWEST) +// IDs for dynamic warps. Both are used in the dest_warp_id field for warp events, but they +// are never read in practice. A dest_map of MAP_NONE is used to indicate that a +// dynamic warp should be used, at which point the warp id is ignored. It can be passed to +// SetDynamicWarp/SetDynamicWarpWithCoords as the first argument, but this argument is unused. +// As only one dynamic warp is saved at a time there's no need to distinguish between them. +#define WARP_ID_SECRET_BASE 0x7E +#define WARP_ID_DYNAMIC 0x7F + +// Used to indicate an invalid warp id, for dummy warps or when a warp should +// use the given coordinates rather than the coordinates of a target warp. +#define WARP_ID_NONE (-1) + #endif // GUARD_CONSTANTS_MAPS_H diff --git a/include/global.h b/include/global.h index 53e9ba1341..9aac66fda0 100644 --- a/include/global.h +++ b/include/global.h @@ -10,6 +10,7 @@ #include "constants/vars.h" #include "constants/species.h" #include "constants/berry.h" +#include "constants/maps.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); diff --git a/src/battle_arena.c b/src/battle_arena.c index 8a993f770f..f744a3b2b5 100644 --- a/src/battle_arena.c +++ b/src/battle_arena.c @@ -798,7 +798,7 @@ static void InitArenaChallenge(void) if (!isCurrent) gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode] = 0; - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); gTrainerBattleOpponent_A = 0; } diff --git a/src/battle_dome.c b/src/battle_dome.c index 45df83c7c5..acdf2e49f7 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -2099,7 +2099,7 @@ static void InitDomeChallenge(void) if (!(gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode])) gSaveBlock2Ptr->frontier.domeWinStreaks[battleMode][lvlMode] = 0; - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); gTrainerBattleOpponent_A = 0; } diff --git a/src/battle_factory.c b/src/battle_factory.c index 8f1001e9ca..23fa664f33 100644 --- a/src/battle_factory.c +++ b/src/battle_factory.c @@ -217,7 +217,7 @@ static void InitFactoryChallenge(void) for (i = 0; i < FRONTIER_PARTY_SIZE; i++) gFrontierTempParty[i] = 0xFFFF; - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); gTrainerBattleOpponent_A = 0; } diff --git a/src/battle_palace.c b/src/battle_palace.c index c4e48a4b2b..0fa65200a6 100644 --- a/src/battle_palace.c +++ b/src/battle_palace.c @@ -93,7 +93,7 @@ static void InitPalaceChallenge(void) if (!(gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode])) gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] = 0; - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); gTrainerBattleOpponent_A = 0; } diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 48155c8339..b10690ce45 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -34,7 +34,6 @@ #include "constants/frontier_util.h" #include "constants/items.h" #include "constants/layouts.h" -#include "constants/maps.h" #include "constants/metatile_labels.h" #include "constants/moves.h" #include "constants/trainers.h" diff --git a/src/battle_setup.c b/src/battle_setup.c index d94034cff6..0e8d697ba2 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -43,7 +43,6 @@ #include "constants/items.h" #include "constants/songs.h" #include "constants/map_types.h" -#include "constants/maps.h" #include "constants/trainers.h" #include "constants/trainer_hill.h" #include "constants/weather.h" diff --git a/src/battle_tent.c b/src/battle_tent.c index 26b2e8bb11..53c91c8713 100644 --- a/src/battle_tent.c +++ b/src/battle_tent.c @@ -114,7 +114,7 @@ static void InitVerdanturfTentChallenge(void) gSaveBlock2Ptr->frontier.challengeStatus = 0; gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0; gSaveBlock2Ptr->frontier.challengePaused = FALSE; - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); } static void GetVerdanturfTentPrize(void) @@ -176,7 +176,7 @@ static void InitFallarborTentChallenge(void) gSaveBlock2Ptr->frontier.challengeStatus = 0; gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0; gSaveBlock2Ptr->frontier.challengePaused = FALSE; - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); } static void GetFallarborTentPrize(void) @@ -231,7 +231,7 @@ static void InitSlateportTentChallenge(void) gSaveBlock2Ptr->frontier.challengeStatus = 0; gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0; gSaveBlock2Ptr->frontier.challengePaused = FALSE; - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); } static void GetSlateportTentPrize(void) diff --git a/src/battle_tower.c b/src/battle_tower.c index d9bd18bf73..accdca3b4e 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -918,7 +918,7 @@ static void InitTowerChallenge(void) gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode] = 0; ValidateBattleTowerRecordChecksums(); - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); gTrainerBattleOpponent_A = 0; } diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 61fab39e28..26caa830d3 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -6,7 +6,6 @@ #include "sound.h" #include "task.h" #include "constants/field_effects.h" -#include "constants/maps.h" #include "constants/songs.h" #include "constants/metatile_labels.h" #include "fieldmap.h" diff --git a/src/cable_club.c b/src/cable_club.c index 1f943b03ab..4ee2797f4d 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -1031,7 +1031,7 @@ void CleanupLinkRoomState(void) LoadPlayerParty(); SavePlayerBag(); } - SetWarpDestinationToDynamicWarp(0x7F); + SetWarpDestinationToDynamicWarp(WARP_ID_DYNAMIC); } void ExitLinkRoom(void) diff --git a/src/contest_util.c b/src/contest_util.c index 6fd74a68aa..7533d4349a 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -2256,7 +2256,7 @@ void Task_LinkContest_FinalizeConnection(u8 taskId) StringGetEnd10(gContestMons[i].nickname); DestroyTask(taskId); - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); ScriptContext2_Disable(); EnableBothScriptContexts(); } diff --git a/src/decoration.c b/src/decoration.c index bb2dea7f97..9aa4bdf4d8 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -1175,7 +1175,7 @@ static void SetInitialPositions(u8 taskId) static void WarpToInitialPosition(u8 taskId) { DrawWholeMapView(); - SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, gTasks[taskId].tInitialX, gTasks[taskId].tInitialY); + SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE, gTasks[taskId].tInitialX, gTasks[taskId].tInitialY); WarpIntoMap(); } diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 9a5ae07b14..c29f8466b7 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -26,7 +26,6 @@ #include "constants/event_objects.h" #include "constants/field_effects.h" #include "constants/items.h" -#include "constants/maps.h" #include "constants/mauville_old_man.h" #include "constants/trainer_types.h" #include "constants/union_room.h" diff --git a/src/faraway_island.c b/src/faraway_island.c index 3927d9ad54..9ddb66de5c 100755 --- a/src/faraway_island.c +++ b/src/faraway_island.c @@ -7,7 +7,6 @@ #include "sprite.h" #include "constants/event_objects.h" #include "constants/field_effects.h" -#include "constants/maps.h" #include "constants/metatile_behaviors.h" static u8 GetValidMewMoveDirection(u8); diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 6d338c06d7..8d6b564d25 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -32,7 +32,6 @@ #include "constants/event_objects.h" #include "constants/field_poison.h" #include "constants/map_types.h" -#include "constants/maps.h" #include "constants/songs.h" #include "constants/trainer_hill.h" @@ -691,7 +690,7 @@ static bool8 TryArrowWarp(struct MapPosition *position, u16 metatileBehavior, u8 { s8 warpEventId = GetWarpEventAtMapPosition(&gMapHeader, position); - if (IsArrowWarpMetatileBehavior(metatileBehavior, direction) == TRUE && warpEventId != -1) + if (IsArrowWarpMetatileBehavior(metatileBehavior, direction) == TRUE && warpEventId != WARP_ID_NONE) { StoreInitialPlayerAvatarState(); SetupWarp(&gMapHeader, warpEventId, position); @@ -705,7 +704,7 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB { s8 warpEventId = GetWarpEventAtMapPosition(&gMapHeader, position); - if (warpEventId != -1 && IsWarpMetatileBehavior(metatileBehavior) == TRUE) + if (warpEventId != WARP_ID_NONE && IsWarpMetatileBehavior(metatileBehavior) == TRUE) { StoreInitialPlayerAvatarState(); SetupWarp(&gMapHeader, warpEventId, position); @@ -847,7 +846,7 @@ static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, u8 if (MetatileBehavior_IsWarpDoor(metatileBehavior) == TRUE) { warpEventId = GetWarpEventAtMapPosition(&gMapHeader, position); - if (warpEventId != -1 && IsWarpMetatileBehavior(metatileBehavior) == TRUE) + if (warpEventId != WARP_ID_NONE && IsWarpMetatileBehavior(metatileBehavior) == TRUE) { StoreInitialPlayerAvatarState(); SetupWarp(&gMapHeader, warpEventId, position); @@ -873,7 +872,7 @@ static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 e return i; } } - return -1; + return WARP_ID_NONE; } static u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent) diff --git a/src/field_door.c b/src/field_door.c index f53e83d7a6..988ea615d0 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -5,7 +5,6 @@ #include "fieldmap.h" #include "metatile_behavior.h" #include "task.h" -#include "constants/maps.h" #include "constants/songs.h" #include "constants/metatile_labels.h" diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 9e54823a63..6cf468b3e0 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -26,7 +26,6 @@ #include "constants/event_object_movement.h" #include "constants/field_effects.h" #include "constants/items.h" -#include "constants/maps.h" #include "constants/moves.h" #include "constants/songs.h" #include "constants/trainer_types.h" diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 39e5d66980..b7c93e510e 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -349,7 +349,7 @@ void LookThroughPorthole(void) FlagSet(FLAG_SYS_CRUISE_MODE); FlagSet(FLAG_DONT_TRANSITION_MUSIC); FlagSet(FLAG_HIDE_MAP_NAME_POPUP); - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); TrySetPortholeWarpDestination(); DoPortholeWarp(); } diff --git a/src/field_specials.c b/src/field_specials.c index e3a259999e..dce9d8efaf 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -55,7 +55,6 @@ #include "constants/items.h" #include "constants/heal_locations.h" #include "constants/map_types.h" -#include "constants/maps.h" #include "constants/mystery_gift.h" #include "constants/script_menu.h" #include "constants/slot_machine.h" @@ -960,13 +959,9 @@ u8 GetBattleOutcome(void) void CableCarWarp(void) { if (gSpecialVar_0x8004 != 0) - { - SetWarpDestination(MAP_GROUP(ROUTE112_CABLE_CAR_STATION), MAP_NUM(ROUTE112_CABLE_CAR_STATION), -1, 6, 4); - } + SetWarpDestination(MAP_GROUP(ROUTE112_CABLE_CAR_STATION), MAP_NUM(ROUTE112_CABLE_CAR_STATION), WARP_ID_NONE, 6, 4); else - { - SetWarpDestination(MAP_GROUP(MT_CHIMNEY_CABLE_CAR_STATION), MAP_NUM(MT_CHIMNEY_CABLE_CAR_STATION), -1, 6, 4); - } + SetWarpDestination(MAP_GROUP(MT_CHIMNEY_CABLE_CAR_STATION), MAP_NUM(MT_CHIMNEY_CABLE_CAR_STATION), WARP_ID_NONE, 6, 4); } void SetHiddenItemFlag(void) diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 8ce1e14dc4..07dd8f2289 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -26,7 +26,6 @@ #include "overworld.h" #include "math_util.h" #include "constants/battle_frontier.h" -#include "constants/maps.h" #include "constants/rgb.h" #include "constants/region_map_sections.h" #include "constants/songs.h" diff --git a/src/heal_location.c b/src/heal_location.c index 5eda24d67a..ab8dc52650 100644 --- a/src/heal_location.c +++ b/src/heal_location.c @@ -1,6 +1,5 @@ #include "global.h" #include "heal_location.h" -#include "constants/maps.h" #include "constants/heal_locations.h" #include "data/heal_locations.h" diff --git a/src/link.c b/src/link.c index 01cc06e7c0..1084d4a6de 100644 --- a/src/link.c +++ b/src/link.c @@ -292,10 +292,9 @@ static void LinkTestScreen(void) gLinkType = LINKTYPE_TRADE; OpenLink(); SeedRng(gMain.vblankCounter2); - for (i = 0; i < MAX_LINK_PLAYERS; i++) - { + for (i = 0; i < TRAINER_ID_LENGTH; i++) gSaveBlock2Ptr->playerTrainerId[i] = Random() % 256; - } + InitLinkTestBG(0, 2, 4, 0, 0); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | DISPCNT_BG2_ON | DISPCNT_OBJ_ON); CreateTask(Task_DestroySelf, 0); diff --git a/src/match_call.c b/src/match_call.c index 9e4659ee60..aaae06b12e 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -29,7 +29,6 @@ #include "constants/abilities.h" #include "constants/battle_frontier.h" #include "constants/event_objects.h" -#include "constants/maps.h" #include "constants/region_map_sections.h" #include "constants/songs.h" #include "constants/trainers.h" diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 5bc197010b..d5cf83bd24 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -16,7 +16,6 @@ #include "decompress.h" #include "constants/songs.h" #include "constants/items.h" -#include "constants/maps.h" #define TAG_SWAP_LINE 109 diff --git a/src/mirage_tower.c b/src/mirage_tower.c index 9473b0f82e..7300262988 100644 --- a/src/mirage_tower.c +++ b/src/mirage_tower.c @@ -15,7 +15,6 @@ #include "task.h" #include "window.h" #include "constants/event_objects.h" -#include "constants/maps.h" #include "constants/rgb.h" #include "constants/songs.h" #include "constants/metatile_labels.h" diff --git a/src/new_game.c b/src/new_game.c index 4bd3d37041..077b86775c 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -29,7 +29,6 @@ #include "pokedex.h" #include "apprentice.h" #include "frontier_util.h" -#include "constants/maps.h" #include "pokedex.h" #include "save.h" #include "link_rfu.h" @@ -126,7 +125,7 @@ static void ClearFrontierRecord(void) static void WarpToTruck(void) { - SetWarpDestination(MAP_GROUP(INSIDE_OF_TRUCK), MAP_NUM(INSIDE_OF_TRUCK), -1, -1, -1); + SetWarpDestination(MAP_GROUP(INSIDE_OF_TRUCK), MAP_NUM(INSIDE_OF_TRUCK), WARP_ID_NONE, -1, -1); WarpIntoMap(); } diff --git a/src/overworld.c b/src/overworld.c index 6d2b8ae4b3..b53de3ebc9 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -62,7 +62,6 @@ #include "constants/abilities.h" #include "constants/layouts.h" #include "constants/map_types.h" -#include "constants/maps.h" #include "constants/region_map_sections.h" #include "constants/songs.h" #include "constants/trainer_hill.h" @@ -208,7 +207,7 @@ static const struct WarpData sDummyWarpData = { .mapGroup = MAP_GROUP(UNDEFINED), .mapNum = MAP_NUM(UNDEFINED), - .warpId = -1, + .warpId = WARP_ID_NONE, .x = -1, .y = -1, }; @@ -570,7 +569,7 @@ static bool32 IsDummyWarp(struct WarpData *warp) return FALSE; else if (warp->mapNum != (s8)MAP_NUM(UNDEFINED)) return FALSE; - else if (warp->warpId != -1) + else if (warp->warpId != WARP_ID_NONE) return FALSE; else if (warp->x != -1) return FALSE; @@ -608,16 +607,20 @@ static void SetPlayerCoordsFromWarp(void) { if (gSaveBlock1Ptr->location.warpId >= 0 && gSaveBlock1Ptr->location.warpId < gMapHeader.events->warpCount) { + // warpId is a valid warp for this map, use the coords of that warp. gSaveBlock1Ptr->pos.x = gMapHeader.events->warps[gSaveBlock1Ptr->location.warpId].x; gSaveBlock1Ptr->pos.y = gMapHeader.events->warps[gSaveBlock1Ptr->location.warpId].y; } else if (gSaveBlock1Ptr->location.x >= 0 && gSaveBlock1Ptr->location.y >= 0) { + // Invalid warpId given. The given coords are valid, use those instead. + // WARP_ID_NONE is used to reach this intentionally. gSaveBlock1Ptr->pos.x = gSaveBlock1Ptr->location.x; gSaveBlock1Ptr->pos.y = gSaveBlock1Ptr->location.y; } else { + // Invalid warpId and coords given. Put player in center of map. gSaveBlock1Ptr->pos.x = gMapHeader.mapLayout->width / 2; gSaveBlock1Ptr->pos.y = gMapHeader.mapLayout->height / 2; } @@ -659,7 +662,7 @@ void SetWarpDestinationToHealLocation(u8 healLocationId) { const struct HealLocation *warp = GetHealLocation(healLocationId); if (warp) - SetWarpDestination(warp->group, warp->map, -1, warp->x, warp->y); + SetWarpDestination(warp->group, warp->map, WARP_ID_NONE, warp->x, warp->y); } void SetWarpDestinationToLastHealLocation(void) @@ -671,7 +674,7 @@ void SetLastHealLocationWarp(u8 healLocationId) { const struct HealLocation *healLocation = GetHealLocation(healLocationId); if (healLocation) - SetWarpData(&gSaveBlock1Ptr->lastHealLocation, healLocation->group, healLocation->map, -1, healLocation->x, healLocation->y); + SetWarpData(&gSaveBlock1Ptr->lastHealLocation, healLocation->group, healLocation->map, WARP_ID_NONE, healLocation->x, healLocation->y); } void UpdateEscapeWarp(s16 x, s16 y) @@ -679,7 +682,7 @@ void UpdateEscapeWarp(s16 x, s16 y) u8 currMapType = GetCurrentMapType(); u8 destMapType = GetMapTypeByGroupAndId(sWarpDestination.mapGroup, sWarpDestination.mapNum); if (IsMapTypeOutdoors(currMapType) && IsMapTypeOutdoors(destMapType) != TRUE) - SetEscapeWarp(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET + 1); + SetEscapeWarp(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE, x - MAP_OFFSET, y - MAP_OFFSET + 1); } void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) @@ -712,7 +715,7 @@ void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y) if (IsDummyWarp(&sFixedHoleWarp) == TRUE) sWarpDestination = gLastUsedWarp; else - SetWarpDestination(sFixedHoleWarp.mapGroup, sFixedHoleWarp.mapNum, -1, x, y); + SetWarpDestination(sFixedHoleWarp.mapGroup, sFixedHoleWarp.mapNum, WARP_ID_NONE, x, y); } static void SetWarpDestinationToContinueGameWarp(void) @@ -729,7 +732,7 @@ void SetContinueGameWarpToHealLocation(u8 healLocationId) { const struct HealLocation *warp = GetHealLocation(healLocationId); if (warp) - SetWarpData(&gSaveBlock1Ptr->continueGameWarp, warp->group, warp->map, -1, warp->x, warp->y); + SetWarpData(&gSaveBlock1Ptr->continueGameWarp, warp->group, warp->map, WARP_ID_NONE, warp->x, warp->y); } void SetContinueGameWarpToDynamicWarp(int unused) @@ -759,7 +762,7 @@ static bool8 SetDiveWarp(u8 dir, u16 x, u16 y) if (connection != NULL) { - SetWarpDestination(connection->mapGroup, connection->mapNum, -1, x, y); + SetWarpDestination(connection->mapGroup, connection->mapNum, WARP_ID_NONE, x, y); } else { @@ -785,7 +788,7 @@ void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum) { s32 paletteIndex; - SetWarpDestination(mapGroup, mapNum, -1, -1, -1); + SetWarpDestination(mapGroup, mapNum, WARP_ID_NONE, -1, -1); // Dont transition map music between BF Outside West/East if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER) @@ -3143,17 +3146,17 @@ static u8 FlipVerticalAndClearForced(u8 newFacing, u8 oldFacing) return oldFacing; } -static u8 LinkPlayerDetectCollision(u8 selfObjEventId, u8 a2, s16 x, s16 y) +static bool8 LinkPlayerDetectCollision(u8 selfObjEventId, u8 direction, s16 x, s16 y) { u8 i; - for (i = 0; i < 16; i++) + for (i = 0; i < OBJECT_EVENTS_COUNT; i++) { if (i != selfObjEventId) { if ((gObjectEvents[i].currentCoords.x == x && gObjectEvents[i].currentCoords.y == y) || (gObjectEvents[i].previousCoords.x == x && gObjectEvents[i].previousCoords.y == y)) { - return 1; + return TRUE; } } } diff --git a/src/party_menu.c b/src/party_menu.c index ad8d78ad31..d654afa337 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -69,7 +69,6 @@ #include "constants/field_effects.h" #include "constants/item_effects.h" #include "constants/items.h" -#include "constants/maps.h" #include "constants/moves.h" #include "constants/party_menu.h" #include "constants/rgb.h" diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index e2973dcab3..141041f4f1 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -16,7 +16,6 @@ #include "trig.h" #include "pokedex_area_region_map.h" #include "wild_encounter.h" -#include "constants/maps.h" #include "constants/region_map_sections.h" #include "constants/rgb.h" #include "constants/songs.h" diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index f18dc68d13..727cc5538d 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -37,7 +37,6 @@ #include "walda_phrase.h" #include "window.h" #include "constants/items.h" -#include "constants/maps.h" #include "constants/moves.h" #include "constants/rgb.h" #include "constants/songs.h" diff --git a/src/region_map.c b/src/region_map.c index 021ef7c710..7a44efd104 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -7,7 +7,6 @@ #include "palette.h" #include "party_menu.h" #include "trig.h" -#include "constants/maps.h" #include "overworld.h" #include "event_data.h" #include "secret_base.h" @@ -2018,7 +2017,7 @@ static void CB_ExitFlyMap(void) if (sMapHealLocations[sFlyMap->regionMap.mapSecId][2] != 0) SetWarpDestinationToHealLocation(sMapHealLocations[sFlyMap->regionMap.mapSecId][2]); else - SetWarpDestinationToMapWarp(sMapHealLocations[sFlyMap->regionMap.mapSecId][0], sMapHealLocations[sFlyMap->regionMap.mapSecId][1], -1); + SetWarpDestinationToMapWarp(sMapHealLocations[sFlyMap->regionMap.mapSecId][0], sMapHealLocations[sFlyMap->regionMap.mapSecId][1], WARP_ID_NONE); break; } ReturnToFieldFromFlyMapSelect(); diff --git a/src/roamer.c b/src/roamer.c index b8d1009674..4811ac3b22 100644 --- a/src/roamer.c +++ b/src/roamer.c @@ -3,7 +3,6 @@ #include "pokemon.h" #include "random.h" #include "roamer.h" -#include "constants/maps.h" // Despite having a variable to track it, the roamer is // hard-coded to only ever be in map group 0 diff --git a/src/rotating_gate.c b/src/rotating_gate.c index ea2eec1261..23fbb3e1d6 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -5,7 +5,6 @@ #include "fieldmap.h" #include "sound.h" #include "sprite.h" -#include "constants/maps.h" #include "constants/songs.h" #define ROTATING_GATE_TILE_TAG 0x1300 diff --git a/src/save_location.c b/src/save_location.c index b201ca1c0d..74d2f2c44d 100644 --- a/src/save_location.c +++ b/src/save_location.c @@ -1,6 +1,5 @@ #include "global.h" #include "save_location.h" -#include "constants/maps.h" #define LIST_END 0xFFFF diff --git a/src/scrcmd.c b/src/scrcmd.c index 1c13d46c98..563ff2222a 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -49,7 +49,6 @@ #include "tv.h" #include "window.h" #include "constants/event_objects.h" -#include "constants/maps.h" typedef u16 (*SpecialFunc)(void); typedef void (*NativeFunc)(void); @@ -790,7 +789,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx) if (mapGroup == MAP_GROUP(UNDEFINED) && mapNum == MAP_NUM(UNDEFINED)) SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET); else - SetWarpDestination(mapGroup, mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET); + SetWarpDestination(mapGroup, mapNum, WARP_ID_NONE, x - MAP_OFFSET, y - MAP_OFFSET); DoFallWarp(); ResetInitialPlayerAvatarState(); return TRUE; @@ -2238,6 +2237,7 @@ bool8 ScrCmd_gotowondercardscript(struct ScriptContext *ctx) return FALSE; } +// This warp is only used by the Union Room. // For the warp used by the Aqua Hideout, see DoTeleportTileWarp bool8 ScrCmd_warpspinenter(struct ScriptContext *ctx) { diff --git a/src/script.c b/src/script.c index 468989fb51..4728e739cd 100644 --- a/src/script.c +++ b/src/script.c @@ -4,7 +4,6 @@ #include "mystery_gift.h" #include "util.h" #include "constants/event_objects.h" -#include "constants/maps.h" #include "constants/map_scripts.h" #define RAM_SCRIPT_MAGIC 51 diff --git a/src/secret_base.c b/src/secret_base.c index 72560ee23b..f971e24f67 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -39,7 +39,6 @@ #include "constants/event_objects.h" #include "constants/field_specials.h" #include "constants/items.h" -#include "constants/maps.h" #include "constants/map_types.h" #include "constants/metatile_behaviors.h" #include "constants/metatile_labels.h" @@ -446,7 +445,7 @@ void EnterSecretBase(void) { CreateTask(Task_EnterSecretBase, 0); FadeScreen(FADE_TO_BLACK, 0); - SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); } bool8 SecretBaseMapPopupEnabled(void) @@ -490,7 +489,7 @@ static void Task_EnterNewlyCreatedSecretBase(u8 taskId) SetWarpDestination( gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, - -1, + WARP_ID_NONE, GET_BASE_COMPUTER_X(secretBaseGroup), GET_BASE_COMPUTER_Y(secretBaseGroup)); WarpIntoMap(); @@ -700,7 +699,7 @@ static void Task_WarpOutOfSecretBase(u8 taskId) gTasks[taskId].data[0] = 2; break; case 2: - SetWarpDestinationToDynamicWarp(0x7e); + SetWarpDestinationToDynamicWarp(WARP_ID_SECRET_BASE); WarpIntoMap(); gFieldCallback = FieldCB_DefaultWarpExit; SetMainCallback2(CB2_LoadMap); diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 2c34f196e5..04312a2dd1 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -28,7 +28,6 @@ #include "constants/items.h" #include "constants/layouts.h" #include "constants/moves.h" -#include "constants/maps.h" #include "constants/trainers.h" #include "constants/easy_chat.h" #include "constants/trainer_hill.h" diff --git a/src/tv.c b/src/tv.c index 310163e94d..4638fc6217 100644 --- a/src/tv.c +++ b/src/tv.c @@ -40,7 +40,6 @@ #include "constants/items.h" #include "constants/layouts.h" #include "constants/lilycove_lady.h" -#include "constants/maps.h" #include "constants/metatile_behaviors.h" #include "constants/metatile_labels.h" #include "constants/moves.h" diff --git a/src/union_room.c b/src/union_room.c index 1400a0b1d4..c624a97841 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -49,7 +49,6 @@ #include "constants/battle_frontier.h" #include "constants/cable_club.h" #include "constants/game_stat.h" -#include "constants/maps.h" #include "constants/party_menu.h" #include "constants/rgb.h" #include "constants/songs.h" @@ -1593,8 +1592,8 @@ void StartUnionRoomBattle(u16 battleFlags) static void WarpForWirelessMinigame(u16 linkService, u16 x, u16 y) { VarSet(VAR_CABLE_CLUB_STATE, linkService); - SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x, y); - SetDynamicWarpWithCoords(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x, y); + SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE, x, y); + SetDynamicWarpWithCoords(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE, x, y); WarpIntoMap(); } @@ -1605,7 +1604,7 @@ static void WarpForCableClubActivity(s8 mapGroup, s8 mapNum, s32 x, s32 y, u16 l gFieldLinkPlayerCount = GetLinkPlayerCount(); gLocalLinkPlayerId = GetMultiplayerId(); SetCableClubWarp(); - SetWarpDestination(mapGroup, mapNum, -1, x, y); + SetWarpDestination(mapGroup, mapNum, WARP_ID_NONE, x, y); WarpIntoMap(); } diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 65d8c86d09..5960692a20 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -20,7 +20,6 @@ #include "constants/game_stat.h" #include "constants/items.h" #include "constants/layouts.h" -#include "constants/maps.h" #include "constants/weather.h" extern const u8 EventScript_RepelWoreOff[]; From 63c5905914b40d33e45a6a3101ab5a7da4375918 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 16 Nov 2021 10:53:18 -0500 Subject: [PATCH 189/417] Continue updating event macro comments --- asm/macros/event.inc | 238 ++++++++++++++++++-------------- data/scripts/std_msgbox.inc | 12 +- data/scripts/trainer_battle.inc | 2 +- include/script_menu.h | 2 +- src/scrcmd.c | 4 +- src/script_menu.c | 3 +- src/script_pokemon_util.c | 5 + 7 files changed, 149 insertions(+), 117 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index c5fc6e2052..9c735f6661 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -44,7 +44,7 @@ .4byte \destination .endm - @ Jumps to the standard function at index function. + @ Jumps to the script in gStdScripts at index function. .macro gotostd function:req .byte 0x08 .byte \function @@ -56,7 +56,7 @@ STD_OBTAIN_DECORATION = 7 STD_REGISTER_MATCH_CALL = 8 - @ Executes the script in gStdScripts at index function. + @ Calls the script in gStdScripts at index function. .macro callstd function:req .byte 0x09 .byte \function @@ -318,7 +318,7 @@ .byte 0x2e .endm - @ Plays the specified (song) sound. Only one sound may play at a time, with newer ones interrupting older ones. + @ Plays the specified sound. Only one sound may play at a time, with newer ones interrupting older ones. .macro playse song:req .byte 0x2f .2byte \song @@ -348,7 +348,8 @@ .byte \save_song .endm - @ Saves the specified song to be played later. + @ Saves the specified song to be played later. Saved music may be played when Overworld_PlaySpecialMapMusic is called. This occurs on + @ exiting most warps. .macro savebgm song:req .byte 0x34 .2byte \song @@ -359,7 +360,7 @@ .byte 0x35 .endm - @ Crossfades the currently-playng song into the specified song. + @ Crossfades the currently-playing song into the specified song. .macro fadenewbgm song:req .byte 0x36 .2byte \song @@ -377,10 +378,10 @@ .byte \speed .endm - @ Helper macro for warp commands. It formats the arguments for a warp command. + @ Helper macro for warp commands that formats their arguments. @ It allows warp macros to either provide 1. a valid id for which warp location to use, @ or 2. a pair of x/y coordinates to use. Both may be provided but at least one will be - @ ignored by SetPlayerCoordsFromWard. If none are provided it will use dummy arguments, + @ ignored by SetPlayerCoordsFromWarp. If none are provided it will use dummy arguments, @ and the warp will send the player to the center of the map. @ Examples of valid inputs for a warp command: @ - warp MAP, x, y @@ -437,7 +438,9 @@ formatwarp \map, \a, \b, \c .endm - @ Warps the player to another map using a hole animation. + @ Warps the player to another map using a hole animation. If the specified map is MAP_UNDEFINED it will instead + @ use the map set by setholewarp. In either case the target coordinates on the destination map will be the + @ player's current position. .macro warphole map:req .byte 0x3c map \map @@ -468,7 +471,9 @@ formatwarp \map, \a, \b, \c .endm - @ Sets the destination that diving or emerging from a dive will take the player to. + @ Sets the destination that diving or emerging from a dive will take the player to. Note that this only + @ applies if the current map does not have a dive/emerge connection. If it does have a corresponding + @ map connection then that map and the player's current coordinates will be used as the destination instead. @ Warp commands can be given either the id of which warp location to go to on the destination map @ or a pair of x/y coordinates to go to directly on the destination map. .macro setdivewarp map:req, a, b, c @@ -499,60 +504,60 @@ .byte 0x43 .endm - @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and - @ VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE. - .macro additem index:req, quantity=1 + @ Attempts to add quantity of the specified item to the player's Bag. If the player has enough room, the item will + @ be added and VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE. + .macro additem itemId:req, quantity=1 .byte 0x44 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Removes quantity of item index from the player's Bag. If the player has fewer than 'quantity' in their bag + @ Removes quantity of the specified item from the player's Bag. If the player has fewer than 'quantity' in their bag @ then none will be removed and VAR_RESULT will be set to FALSE. Otherwise it will be set to TRUE. - .macro removeitem index:req, quantity=1 + .macro removeitem itemId:req, quantity=1 .byte 0x45 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to + @ Checks if the player has enough space in their Bag to hold quantity more of the specified item. Sets VAR_RESULT to @ TRUE if there is room, or FALSE is there is no room. - .macro checkitemspace index:req, quantity=1 + .macro checkitemspace itemId:req, quantity=1 .byte 0x46 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Checks if the player has quantity or more of item index in their Bag. Sets VAR_RESULT to TRUE if the player has + @ Checks if the player has quantity or more of the specified item in their Bag. Sets VAR_RESULT to TRUE if the player has @ enough of the item, or FALSE if they have fewer than quantity of the item. - .macro checkitem index:req, quantity=1 + .macro checkitem itemId:req, quantity=1 .byte 0x47 - .2byte \index + .2byte \itemId .2byte \quantity .endm @ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT. @ This is used to show the name of the proper Bag pocket when the player receives an item via callstd. - .macro checkitemtype index:req + .macro checkitemtype itemId:req .byte 0x48 - .2byte \index + .2byte \itemId .endm - @ Adds a quantity amount of item index to the player's PC. - .macro addpcitem index:req, quantity=1 + @ Adds quantity of the specified item to the player's PC. + .macro addpcitem itemId:req, quantity=1 .byte 0x49 - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Checks for quantity amount of item index in the player's PC. - .macro checkpcitem index:req, quantity=1 + @ Checks for quantity of the specified item in the player's PC. + .macro checkpcitem itemId:req, quantity=1 .byte 0x4a - .2byte \index + .2byte \itemId .2byte \quantity .endm - @ Adds decoration to the player's PC. + @ Adds a decoration to the player's PC. .macro adddecoration decoration:req .byte 0x4b .2byte \decoration @@ -570,101 +575,101 @@ .2byte \decoration .endm - @ Checks if the player has enough space in their PC to hold decoration. + @ Checks if the player has enough space in their PC to hold the decoration. @ Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room. .macro checkdecorspace decoration:req .byte 0x4e .2byte \decoration .endm - @ Applies the movement data at movements to the specified (index) Object. Also closes any standard message boxes that are still open. - @ If no map is specified, then the current map is used. - .macro applymovement index:req, movements:req, map + @ Applies the movement data at movements to the specified (localId) Object. If no map is specified, then the current map is used. + .macro applymovement localId:req, movements:req, map .ifb \map .byte 0x4f - .2byte \index + .2byte \localId .4byte \movements .else @ Really only useful if the object has followed from one map to another (e.g. Wally during the catching event). .byte 0x50 - .2byte \index + .2byte \localId .4byte \movements map \map .endif .endm - @ Blocks script execution until the movements being applied to the specified (index) Object finish. + @ Blocks script execution until the movements being applied to the specified (localId) Object finish. @ If the specified Object is 0, then the command will block script execution until all Objects @ affected by applymovement finish their movements. If the specified Object is not currently being @ manipulated with applymovement, then this command does nothing. @ If no map is specified, then the current map is used. - .macro waitmovement index:req, map + .macro waitmovement localId:req, map .ifb \map .byte 0x51 - .2byte \index + .2byte \localId .else .byte 0x52 - .2byte \index + .2byte \localId map \map .endif .endm - @ Attempts to despawn the specified (index) Object on the specified (map_group, map_num) map. + @ Attempts to despawn the specified (localId) Object on the specified (map_group, map_num) map. @ It also sets the object's visibility flag if it has one. @ If no map is specified, then the current map is used. - .macro removeobject index:req, map + .macro removeobject localId:req, map .ifb \map .byte 0x53 - .2byte \index + .2byte \localId .else .byte 0x54 - .2byte \index + .2byte \localId map \map .endif .endm - @ Attempts to spawn the specified (index) Object the specified (map_group, map_num) map. + @ Attempts to spawn the specified (localId) Object the specified (map_group, map_num) map. @ Note that unlike removeobject this does not modify the OObject's flag. @ If no map is specified, then the current map is used. - .macro addobject index:req, map + .macro addobject localId:req, map .ifb \map .byte 0x55 - .2byte \index + .2byte \localId .else .byte 0x56 - .2byte \index + .2byte \localId map \map .endif .endm - @ Sets the specified (index) Object's position on the current map. - .macro setobjectxy index:req, x:req, y:req + @ Sets the specified (localId) Object's position on the current map. + .macro setobjectxy localId:req, x:req, y:req .byte 0x57 - .2byte \index + .2byte \localId .2byte \x .2byte \y .endm - .macro showobjectat index:req, map:req + .macro showobjectat localId:req, map:req .byte 0x58 - .2byte \index + .2byte \localId map \map .endm - .macro hideobjectat index:req, map:req + .macro hideobjectat localId:req, map:req .byte 0x59 - .2byte \index + .2byte \localId map \map .endm - @ If the script was called by an Object, then that Object will turn to face toward the player. + @ Turns the currently selected object (if there is one) to face the player. .macro faceplayer .byte 0x5a .endm - .macro turnobject index:req, direction:req + @ Turns the specified object in the specified direction. + .macro turnobject localId:req, direction:req .byte 0x5b - .2byte \index + .2byte \localId .byte \direction .endm @@ -725,8 +730,8 @@ NO_MUSIC = FALSE - @ Starts a single trainer battle, takes a trainer, intro text, loss text, and an optional event script - @ when used with an event script, you can also pass in an optional flag to disable music + @ Starts a single trainer battle. Takes a trainer, intro text, loss text, and an optional event script. + @ When used with an event script, you can also pass in an optional flag to disable music .macro trainerbattle_single trainer:req, intro_text:req, lose_text:req, event_script=FALSE, music=TRUE .if \event_script == FALSE trainerbattle TRAINER_BATTLE_SINGLE, \trainer, 0, \intro_text, \lose_text @@ -737,8 +742,8 @@ .endif .endm - @ Starts a double trainer battle, takes a trainer, intro text, loss text, text for when you have too few pokemon - @ and an optional event script, when used with an event script you can pass in an optional flag to disable music + @ Starts a double trainer battle. Takes a trainer, intro text, loss text, text for when you have too few pokemon + @ and an optional event script. When used with an event script you can pass in an optional flag to disable music .macro trainerbattle_double trainer:req, intro_text:req, lose_text:req, not_enough_pkmn_text:req, event_script=FALSE, music=TRUE .if \event_script == FALSE trainerbattle TRAINER_BATTLE_DOUBLE, \trainer, 0, \intro_text, \lose_text, \not_enough_pkmn_text @@ -749,17 +754,17 @@ .endif .endm - @ Starts a rematch battle, takes a trainer, intro text and loss text + @ Starts a rematch battle. Takes a trainer, intro text and loss text .macro trainerbattle_rematch trainer:req, intro_text:req, lose_text:req trainerbattle TRAINER_BATTLE_REMATCH, \trainer, 0, \intro_text, \lose_text .endm - @ Starts a rematch double battle, takes a trainer, intro text, loss text, and text for when you have too few pokemon + @ Starts a rematch double battle. Takes a trainer, intro text, loss text, and text for when you have too few pokemon .macro trainerbattle_rematch_double trainer:req, intro_text:req, lose_text:req, not_enough_pkmn_text:req trainerbattle TRAINER_BATTLE_REMATCH_DOUBLE, \trainer, 0, \intro_text, \lose_text, \not_enough_pkmn_text .endm - @ Starts a trainer battle, skipping intro text, takes a trainer and loss text + @ Starts a trainer battle, skipping intro text. Takes a trainer and loss text .macro trainerbattle_no_intro trainer:req, lose_text:req trainerbattle TRAINER_BATTLE_SINGLE_NO_INTRO_TEXT, \trainer, 0, \lose_text .endm @@ -781,38 +786,41 @@ .byte 0x5f .endm - @ Compares Flag (trainer + 0x500) to 1. (If the flag is set, then the trainer has been defeated by the player.) + @ Checks if the trainer has been defeated by the player (by comparing the flag 'trainer + TRAINER_FLAGS_START' to TRUE). .macro checktrainerflag trainer:req .byte 0x60 .2byte \trainer .endm - @ Sets Flag (trainer + 0x500). + @ Sets the trainer flag (trainer + TRAINER_FLAGS_START) to TRUE (defeated). .macro settrainerflag trainer:req .byte 0x61 .2byte \trainer .endm - @ Clears Flag (trainer + 0x500). + @ Sets the trainer flag (trainer + TRAINER_FLAGS_START) to FALSE (not defeated). .macro cleartrainerflag trainer:req .byte 0x62 .2byte \trainer .endm - .macro setobjectxyperm index:req, x:req, y:req + @ Sets the coordinates of an object's template, so that if the sprite goes off screen + @ it'll still be there when it comes back on screen. + .macro setobjectxyperm localId:req, x:req, y:req .byte 0x63 - .2byte \index + .2byte \localId .2byte \x .2byte \y .endm - @ Copies a live object event's xy position to its template, so that if the sprite goes off screen, + @ Copies a live object event's xy position to its template, so that if the sprite goes off screen @ it'll still be there when it comes back on screen. - .macro copyobjectxytoperm index:req + .macro copyobjectxytoperm localId:req .byte 0x64 - .2byte \index + .2byte \localId .endm + @ Sets the movement type (MOVEMENT_TYPE_*) for an object's template. .macro setobjectmovementtype word:req, byte:req .byte 0x65 .2byte \word @@ -826,8 +834,8 @@ .endm @ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at - @ that offset will be loaded and used. If text is script bank 0, then the value of script bank 0 will be treated as - @ a pointer to the text. (You can use loadpointer to place a string pointer in a script bank.) + @ that offset will be loaded and used. If text is NULL, then the value of script data 0 will be treated as + @ a pointer to the text. The 'loadword 0' in msgbox sets this value, for instance. .macro message text:req .byte 0x67 .4byte \text @@ -848,17 +856,17 @@ .byte 0x6a .endm - @ Resumes normal movement for all Objects on-screen, and closes any standard message boxes that are still open. + @ Resumes normal movement for all objects on-screen, and closes any standard message boxes that are still open. .macro releaseall .byte 0x6b .endm - @ If the script was called by an Object, then that Object's movement will resume. This command also closes any standard message boxes that are still open. + @ Resumes normal movement for the selected object (if there is one) and the player. Also closes any standard message boxes that are still open. .macro release .byte 0x6c .endm - @ Blocks script execution until the player presses any key. + @ Blocks script execution until the player presses the A or B button. .macro waitbuttonpress .byte 0x6d .endm @@ -884,7 +892,7 @@ @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. @ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId. - @ The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. + @ The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0. @ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. .macro multichoicedefault x:req, y:req, multichoiceId:req, default:req, ignoreBPress:req .byte 0x70 @@ -931,7 +939,7 @@ .byte \ignoreBPress .endm - @ Displays a box containing the front sprite for the specified (species) Pokemon species. + @ Displays a box containing the front sprite for the specified Pokemon species. .macro showmonpic species:req, x:req, y:req .byte 0x75 .2byte \species @@ -939,7 +947,7 @@ .byte \y .endm - @ Hides all boxes displayed with showmonpic. + @ Hides the box displayed by showmonpic. .macro hidemonpic .byte 0x76 .endm @@ -950,9 +958,9 @@ .byte \winnerId .endm - @ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille - @ characters and needs to provide six extra starting characters that are skipped (in RS, these characters determined the - @ box's size and position, but in Emerald these are calculated automatically). + @ Displays the given string as braille text in a standard message box. The string should use the .braille directive + @ to convert text to braille, and be preceded by brailleformat. The brailleformat data is skipped over (in RS, these + @ bytes determined the box's size and position, but in Emerald these are calculated automatically). .macro braillemessage text:req .byte 0x78 .4byte \text @@ -969,38 +977,45 @@ .byte \textTop .endm - @ Gives the player one of the specified (species) Pokemon at level level holding item. The trailing 0s are unused parameters + @ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters. + @ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome. .macro givemon species:req, level:req, item:req .byte 0x79 .2byte \species .byte \level .2byte \item - .4byte 0x0 - .4byte 0x0 + .4byte 0 + .4byte 0 .byte 0 .endm + @ Gives the player an Egg of the specified species. + @ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome. .macro giveegg species:req .byte 0x7a .2byte \species .endm - .macro setmonmove index:req, slot:req, move:req + @ Replaces the move at 'slot' of the Pokémon in the player's party at 'partyIndex' with the specified move. + @ If a value greater than PARTY_SIZE is given for partyIndex it will use the last Pokémon in the party instead. + @ Note that this means in vanilla a value equal to PARTY_SIZE for partyIndex will go out of bounds. + .macro setmonmove partyIndex:req, slot:req, move:req .byte 0x7b - .byte \index + .byte \partyIndex .byte \slot .2byte \move .endm - @ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, VAR_RESULT is set to the + @ Checks if at least one Pokemon in the player's party knows the specified move. If so, VAR_RESULT is set to the @ (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE. @ VAR_0x8004 is also set to this Pokemon's species. - .macro checkpartymove index:req + .macro checkpartymove move:req .byte 0x7c - .2byte \index + .2byte \move .endm - @ Writes the name of the Pokemon at index species to the specified buffer. + @ Writes the name of the given Pokemon species to the specified buffer. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferspeciesname out:req, species:req .byte 0x7d .byte \out @@ -1008,35 +1023,40 @@ .endm @ Writes the name of the species of the first Pokemon in the player's party to the specified buffer. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferleadmonspeciesname out:req .byte 0x7e .byte \out .endm - @ Writes the nickname of the Pokemon in slot slot (zero-indexed) of the player's party to the specified buffer. + @ Writes the nickname of the Pokemon in 'slot' (zero-indexed) of the player's party to the specified buffer. @ If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferpartymonnick out:req, slot:req .byte 0x7f .byte \out .2byte \slot .endm - @ Writes the name of the item at index item to the specified buffer. If the specified index is >= ITEMS_COUNT, + @ Writes the name of the specified item to the specified buffer. If itemId is >= ITEMS_COUNT, @ then the name of ITEM_NONE ("????????") is buffered instead. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferitemname out:req, item:req .byte 0x80 .byte \out .2byte \item .endm - @ Writes the name of the decoration at index 'decoration' to the specified buffer. + @ Writes the name of the specified decoration to the specified buffer. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferdecorationname out:req, decoration:req .byte 0x81 .byte \out .2byte \decoration .endm - @ Writes the name of the move at index move to the specified buffer. + @ Writes the name of the specified move to the specified buffer. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro buffermovename out:req, move:req .byte 0x82 .byte \out @@ -1044,34 +1064,38 @@ .endm @ Converts the value of input to a decimal string, and writes that string to the specified buffer. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro buffernumberstring out:req, input:req .byte 0x83 .byte \out .2byte \input .endm - @ Writes the standard string identified by index to the specified buffer. This command has no protections in place at all, - @ so specifying an invalid standard string (e.x. 0x2B) can and usually will cause crashes or garbage characters. + @ Writes the given standard string (STDSTRING_*) to the specified buffer. Invalid std string ids are not handled. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferstdstring out:req, index:req .byte 0x84 .byte \out .2byte \index .endm - @ Copies the string at offset to the specified buffer. - .macro bufferstring out:req, offset:req + @ Copies the string at the given pointer to the specified buffer. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 + .macro bufferstring out:req, text:req .byte 0x85 .byte \out - .4byte \offset + .4byte \text .endm @ Opens the Pokemart system, offering the specified products for sale. + @ Products should be a list of .2byte item values preceded by an .align 2 .macro pokemart products:req .byte 0x86 .4byte \products .endm @ Opens the Pokemart system and treats the list of items as decorations. + @ Products should be a list of .2byte decoration values preceded by an .align 2 .macro pokemartdecoration products:req .byte 0x87 .4byte \products @@ -1279,16 +1303,16 @@ .2byte \index .endm - .macro setobjectpriority index:req, map:req, priority:req + .macro setobjectpriority localId:req, map:req, priority:req .byte 0xa8 - .2byte \index + .2byte \localId map \map .byte \priority .endm - .macro resetobjectpriority index:req, map:req + .macro resetobjectpriority localId:req, map:req .byte 0xa9 - .2byte \index + .2byte \localId map \map .endm diff --git a/data/scripts/std_msgbox.inc b/data/scripts/std_msgbox.inc index f94d28ba0e..c46da56cbf 100644 --- a/data/scripts/std_msgbox.inc +++ b/data/scripts/std_msgbox.inc @@ -1,7 +1,7 @@ Std_MsgboxNPC: lock faceplayer - message 0x0 + message NULL waitmessage waitbuttonpress release @@ -9,26 +9,26 @@ Std_MsgboxNPC: Std_MsgboxSign: lockall - message 0x0 + message NULL waitmessage waitbuttonpress releaseall return Std_MsgboxDefault: - message 0x0 + message NULL waitmessage waitbuttonpress return Std_MsgboxYesNo: - message 0x0 + message NULL waitmessage yesnobox 20, 8 return Std_MsgboxGetPoints: - message 0x0 + message NULL playfanfare MUS_OBTAIN_B_POINTS waitfanfare waitmessage @@ -36,7 +36,7 @@ Std_MsgboxGetPoints: @ Never used, pokenavcall is always used directly instead Std_MsgboxPokenav: - pokenavcall 0x0 + pokenavcall NULL waitmessage return diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc index a59b58a6f7..0528c815c6 100644 --- a/data/scripts/trainer_battle.inc +++ b/data/scripts/trainer_battle.inc @@ -136,7 +136,7 @@ EventScript_EndTrainerBattle:: end Std_MsgboxAutoclose:: - message 0x0 + message NULL waitmessage waitbuttonpress release diff --git a/include/script_menu.h b/include/script_menu.h index 086ad147f0..a690ef8b8b 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -8,7 +8,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8 bool8 ScriptMenu_YesNo(u8 left, u8 top); bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 columnCount); bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y); -bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void); +bool8 (*ScriptMenu_HidePokemonPic(void))(void); int ConvertPixelWidthToTileWidth(int width); u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height); void ClearToTransparentAndRemoveWindow(u8 windowId); diff --git a/src/scrcmd.c b/src/scrcmd.c index 563ff2222a..98eaaf12ce 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1458,7 +1458,9 @@ bool8 ScrCmd_showmonpic(struct ScriptContext *ctx) bool8 ScrCmd_hidemonpic(struct ScriptContext *ctx) { - bool8 (*func)(void) = ScriptMenu_GetPicboxWaitFunc(); + // The hide function returns a pointer to a function + // that returns true once the pic is hidden + bool8 (*func)(void) = ScriptMenu_HidePokemonPic(); if (func == NULL) return FALSE; diff --git a/src/script_menu.c b/src/script_menu.c index ae0fe91e67..1680758f21 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -563,6 +563,7 @@ static void Task_PokemonPicWindow(u8 taskId) task->tState++; break; case 1: + // Wait until state is advanced by ScriptMenu_HidePokemonPic break; case 2: FreeResourcesAndDestroySprite(&gSprites[task->tMonSpriteId], task->tMonSpriteId); @@ -600,7 +601,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) } } -bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void) +bool8 (*ScriptMenu_HidePokemonPic(void))(void) { u8 taskId = FindTaskIdByFunc(Task_PokemonPicWindow); diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 07e86656e0..ae7aa92dc8 100755 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -150,7 +150,12 @@ void CreateScriptedWildMon(u16 species, u8 level, u16 item) void ScriptSetMonMoveSlot(u8 monIndex, u16 move, u8 slot) { +// Allows monIndex to go out of bounds of gPlayerParty. Doesn't occur in vanilla +#ifdef BUGFIX + if (monIndex >= PARTY_SIZE) +#else if (monIndex > PARTY_SIZE) +#endif monIndex = gPlayerPartyCount - 1; SetMonMoveSlot(&gPlayerParty[monIndex], move, slot); From 5d9c31a610d8a6680a44b772fc1b88135d3884c3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 16 Nov 2021 13:55:02 -0500 Subject: [PATCH 190/417] Label slot machine ids, fix GetPriceReduction --- asm/macros/event.inc | 8 +- .../LilycoveCity_ContestLobby/scripts.inc | 2 +- .../scripts.inc | 4 +- data/script_cmd_table.inc | 2 +- data/scripts/roulette.inc | 4 +- include/constants/slot_machine.h | 9 ++ include/tv.h | 2 +- src/field_specials.c | 37 +++++- src/scrcmd.c | 4 +- src/shop.c | 6 +- src/slot_machine.c | 120 +++++++++++++----- src/tv.c | 14 +- 12 files changed, 151 insertions(+), 61 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 9c735f6661..58b3b83292 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1107,10 +1107,10 @@ .4byte \products .endm - @ Starts up the slot machine minigame. - .macro playslotmachine word:req + @ Starts up the slot machine minigame. id is a SLOT_MACHINE_* value that influences probabilities of certain reel outcomes. + .macro playslotmachine id:req .byte 0x89 - .2byte \word + .2byte \id .endm @ Sets a berry tree's specific berry and growth stage. @@ -1197,7 +1197,7 @@ .endm @ Gets the price reduction for the index given. - .macro getpricereduction index:req + .macro getpokenewsactive index:req .byte 0x96 .2byte \index .endm diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 94ccc21bd4..6dbd1eb842 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -17,7 +17,7 @@ LilycoveCity_ContestLobby_OnTransition: end LilycoveCity_ContestLobby_EventScript_TryShowBlendMaster:: - getpricereduction POKENEWS_BLENDMASTER + getpokenewsactive POKENEWS_BLENDMASTER compare VAR_RESULT, TRUE goto_if_eq LilycoveCity_ContestLobby_EventScript_ShowBlendMaster clearflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER_REPLACEMENT diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc index 65f7adc67e..b0fda2731f 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -3,7 +3,7 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts:: .byte 0 LilycoveCity_DepartmentStoreRooftop_OnTransition: - getpricereduction POKENEWS_LILYCOVE + getpokenewsactive POKENEWS_LILYCOVE compare VAR_RESULT, TRUE call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman compare VAR_RESULT, FALSE @@ -51,7 +51,7 @@ LilycoveCity_DepartmentStoreRooftop_PokemartDecor_ClearOutSale: LilycoveCity_DepartmentStoreRooftop_EventScript_Man:: lock faceplayer - getpricereduction POKENEWS_LILYCOVE + getpokenewsactive POKENEWS_LILYCOVE compare VAR_RESULT, TRUE call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale msgbox LilycoveCity_DepartmentStoreRooftop_Text_SetDatesForClearOutSales, MSGBOX_DEFAULT diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 566ac3b368..322ac0bac1 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -150,7 +150,7 @@ gScriptCmdTable:: .4byte ScrCmd_showmoneybox @ 0x93 .4byte ScrCmd_hidemoneybox @ 0x94 .4byte ScrCmd_updatemoneybox @ 0x95 - .4byte ScrCmd_getpricereduction @ 0x96 + .4byte ScrCmd_getpokenewsactive @ 0x96 .4byte ScrCmd_fadescreen @ 0x97 .4byte ScrCmd_fadescreenspeed @ 0x98 .4byte ScrCmd_setflashradius @ 0x99 diff --git a/data/scripts/roulette.inc b/data/scripts/roulette.inc index 241b0d31c2..96f5809d7b 100644 --- a/data/scripts/roulette.inc +++ b/data/scripts/roulette.inc @@ -3,7 +3,7 @@ Roulette_EventScript_Table1:: compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 0 - getpricereduction POKENEWS_GAME_CORNER + getpokenewsactive POKENEWS_GAME_CORNER compare VAR_RESULT, FALSE goto_if_eq Roulette_EventScript_Play addvar VAR_0x8004, ROULETTE_SPECIAL_RATE @@ -15,7 +15,7 @@ Roulette_EventScript_Table2:: compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 1 - getpricereduction POKENEWS_GAME_CORNER + getpokenewsactive POKENEWS_GAME_CORNER compare VAR_RESULT, FALSE goto_if_eq Roulette_EventScript_Play addvar VAR_0x8004, ROULETTE_SPECIAL_RATE diff --git a/include/constants/slot_machine.h b/include/constants/slot_machine.h index 81848f2084..865d7e5d0b 100644 --- a/include/constants/slot_machine.h +++ b/include/constants/slot_machine.h @@ -3,4 +3,13 @@ #define SLOT_MACHINE_COUNT 12 +// Slot machine IDs +#define SLOT_MACHINE_UNLUCKIEST 0 +#define SLOT_MACHINE_UNLUCKIER 1 +#define SLOT_MACHINE_UNLUCKY 2 +#define SLOT_MACHINE_LUCKY 3 +#define SLOT_MACHINE_LUCKIER 4 +#define SLOT_MACHINE_LUCKIEST 5 +#define NUM_SLOT_MACHINE_IDS 6 + #endif // GUARD_CONSTANTS_SLOT_MACHINE_H diff --git a/include/tv.h b/include/tv.h index 30cd133265..31c8fcc50f 100644 --- a/include/tv.h +++ b/include/tv.h @@ -19,7 +19,7 @@ void HideBattleTowerReporter(void); void ReceiveTvShowsData(void *src, u32 size, u8 masterIdx); void TryPutSpotTheCutiesOnAir(struct Pokemon *pokemon, u8 ribbonMonDataIdx); u32 GetPlayerIDAsU32(void); -bool8 GetPriceReduction(u8 newsKind); +bool8 IsPokeNewsActive(u8 newsKind); void SanitizeTVShowLocationsForRuby(TVShow *shows); size_t CountDigits(int value); u8 GetRibbonCount(struct Pokemon *pokemon); diff --git a/src/field_specials.c b/src/field_specials.c index dce9d8efaf..22467cfeef 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1330,15 +1330,40 @@ void BufferEReaderTrainerName(void) u16 GetSlotMachineId(void) { - static const u8 sSlotMachineRandomSeeds[] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6}; - static const u8 sSlotMachineIds[] = {0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5}; - static const u8 sSlotMachineServiceDayIds[] = {3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5}; + static const u8 sSlotMachineRandomSeeds[SLOT_MACHINE_COUNT] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6}; + static const u8 sSlotMachineIds[SLOT_MACHINE_COUNT] = { + SLOT_MACHINE_UNLUCKIEST, + SLOT_MACHINE_UNLUCKIER, + SLOT_MACHINE_UNLUCKIER, + SLOT_MACHINE_UNLUCKY, + SLOT_MACHINE_UNLUCKY, + SLOT_MACHINE_UNLUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIEST + }; + static const u8 sSlotMachineServiceDayIds[SLOT_MACHINE_COUNT] = { + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIEST, + SLOT_MACHINE_LUCKIEST + }; u32 rnd = gSaveBlock1Ptr->dewfordTrends[0].trendiness + gSaveBlock1Ptr->dewfordTrends[0].rand + sSlotMachineRandomSeeds[gSpecialVar_0x8004]; - if (GetPriceReduction(POKENEWS_GAME_CORNER)) - { + if (IsPokeNewsActive(POKENEWS_GAME_CORNER)) return sSlotMachineServiceDayIds[rnd % SLOT_MACHINE_COUNT]; - } + return sSlotMachineIds[rnd % SLOT_MACHINE_COUNT]; } diff --git a/src/scrcmd.c b/src/scrcmd.c index 98eaaf12ce..04dff470b2 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1936,11 +1936,11 @@ bool8 ScrCmd_setberrytree(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_getpricereduction(struct ScriptContext *ctx) +bool8 ScrCmd_getpokenewsactive(struct ScriptContext *ctx) { u16 newsKind = VarGet(ScriptReadHalfword(ctx)); - gSpecialVar_Result = GetPriceReduction(newsKind); + gSpecialVar_Result = IsPokeNewsActive(newsKind); return FALSE; } diff --git a/src/shop.c b/src/shop.c index fa4a73bbbd..f6fb2b9a03 100755 --- a/src/shop.c +++ b/src/shop.c @@ -562,7 +562,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y) { ConvertIntToDecimalStringN( gStringVar1, - ItemId_GetPrice(itemId) >> GetPriceReduction(POKENEWS_SLATEPORT), + ItemId_GetPrice(itemId) >> IsPokeNewsActive(POKENEWS_SLATEPORT), STR_CONV_MODE_LEFT_ALIGN, 5); } @@ -934,7 +934,7 @@ static void Task_BuyMenu(u8 taskId) if (sMartInfo.martType == MART_TYPE_NORMAL) { - sShopData->totalCost = (ItemId_GetPrice(itemId) >> GetPriceReduction(POKENEWS_SLATEPORT)); + sShopData->totalCost = (ItemId_GetPrice(itemId) >> IsPokeNewsActive(POKENEWS_SLATEPORT)); } else { @@ -1014,7 +1014,7 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&tItemCount, sShopData->maxQuantity) == TRUE) { - sShopData->totalCost = (ItemId_GetPrice(tItemId) >> GetPriceReduction(POKENEWS_SLATEPORT)) * tItemCount; + sShopData->totalCost = (ItemId_GetPrice(tItemId) >> IsPokeNewsActive(POKENEWS_SLATEPORT)) * tItemCount; BuyMenuPrintItemQuantityAndPrice(taskId); } else diff --git a/src/slot_machine.c b/src/slot_machine.c index 1c21f230d3..6cbcd76fdf 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -557,10 +557,10 @@ static struct SpriteFrameImage *sImageTables_DigitalDisplay[NUM_DIG_DISPLAY_SPRI // Const rom data. static const struct DigitalDisplaySprite *const sDigitalDisplayScenes[]; static const u16 sUnkPalette[]; -static const u8 sLuckyRoundProbabilities[][3]; +static const u8 sLuckyRoundProbabilities[NUM_SLOT_MACHINE_IDS][MAX_BET]; static const u8 sBiasTags[]; -static const u16 sLuckyFlagSettings_Top3[]; -static const u16 sLuckyFlagSettings_NotTop3[]; +static const u16 sLuckyFlagSettings_Top3[3]; +static const u16 sLuckyFlagSettings_NotTop3[5]; static const s16 sDigitalDisplay_SpriteCoords[][2]; static const SpriteCallback sDigitalDisplay_SpriteCallbacks[]; static const struct SpriteTemplate *const sSpriteTemplates_DigitalDisplay[NUM_DIG_DISPLAY_SPRITES]; @@ -582,8 +582,8 @@ static const struct SpriteSheet sSlotMachineSpriteSheets[22]; static const struct SpritePalette sSlotMachineSpritePalettes[]; static const u16 *const sDigitalDisplay_Pal; static const s16 sInitialReelPositions[NUM_REELS][2]; -static const u8 sLuckyFlagProbabilities_Top3[][6]; -static const u8 sLuckyFlagProbabilities_NotTop3[][6]; +static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS]; +static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS]; static const u8 sReeltimeProbabilities_UnluckyGame[][17]; static const u8 sReelTimeProbabilities_LuckyGame[][17]; static const u8 sSymToMatch[]; @@ -1651,22 +1651,18 @@ static void DrawLuckyFlags(void) if (IsThisRoundLucky()) { attempts = AttemptsAtLuckyFlags_Top3(); - if (attempts != 3) // if you found a lucky number + if (attempts != ARRAY_COUNT(sLuckyFlagSettings_Top3)) // if you found a lucky number { // attempts == 1: reelTime flag set sSlotMachine->luckyFlags |= sLuckyFlagSettings_Top3[attempts]; if (attempts != 1) - { return; - } } } // if it's not a lucky round or you got reel time, roll for the lower lucky flags attempts = AttemptsAtLuckyFlags_NotTop3(); - if (attempts != 5) // if you found a lucky number - { + if (attempts != ARRAY_COUNT(sLuckyFlagSettings_NotTop3)) // if you found a lucky number sSlotMachine->luckyFlags |= sLuckyFlagSettings_NotTop3[attempts]; - } } } } @@ -1704,7 +1700,7 @@ static u8 AttemptsAtLuckyFlags_Top3(void) { s16 count; - for (count = 0; count < 3; count++) + for (count = 0; count < (int)ARRAY_COUNT(sLuckyFlagSettings_Top3); count++) { s16 rval = Random() & 0xff; s16 value = sLuckyFlagProbabilities_Top3[count][sSlotMachine->machineId]; @@ -1718,7 +1714,7 @@ static u8 AttemptsAtLuckyFlags_NotTop3(void) { s16 count; - for (count = 0; count < 5; count++) + for (count = 0; count < (int)ARRAY_COUNT(sLuckyFlagSettings_NotTop3); count++) { s16 rval = Random() & 0xff; // random byte s16 value = sLuckyFlagProbabilities_NotTop3[count][sSlotMachine->machineId]; @@ -4807,27 +4803,83 @@ static const s16 sInitialReelPositions[NUM_REELS][2] = { [RIGHT_REEL] = {0, 2} }; -static const u8 sLuckyRoundProbabilities[][3] = { - {1, 1, 12}, - {1, 1, 14}, - {2, 2, 14}, - {2, 2, 14}, - {2, 3, 16}, - {3, 3, 16} +static const u8 sLuckyRoundProbabilities[NUM_SLOT_MACHINE_IDS][MAX_BET] = { + [SLOT_MACHINE_UNLUCKIEST] = {1, 1, 12}, + [SLOT_MACHINE_UNLUCKIER] = {1, 1, 14}, + [SLOT_MACHINE_UNLUCKY] = {2, 2, 14}, + [SLOT_MACHINE_LUCKY] = {2, 2, 14}, + [SLOT_MACHINE_LUCKIER] = {2, 3, 16}, + [SLOT_MACHINE_LUCKIEST] = {3, 3, 16} }; -static const u8 sLuckyFlagProbabilities_Top3[][6] = { - {25, 25, 30, 40, 40, 50}, - {25, 25, 30, 30, 35, 35}, - {25, 25, 30, 25, 25, 30} +static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS] = { + { // Probabilities for LUCKY_BIAS_777 + [SLOT_MACHINE_UNLUCKIEST] = 25, + [SLOT_MACHINE_UNLUCKIER] = 25, + [SLOT_MACHINE_UNLUCKY] = 30, + [SLOT_MACHINE_LUCKY] = 40, + [SLOT_MACHINE_LUCKIER] = 40, + [SLOT_MACHINE_LUCKIEST] = 50 + }, + { // Probabilities for LUCKY_BIAS_REELTIME + [SLOT_MACHINE_UNLUCKIEST] = 25, + [SLOT_MACHINE_UNLUCKIER] = 25, + [SLOT_MACHINE_UNLUCKY] = 30, + [SLOT_MACHINE_LUCKY] = 30, + [SLOT_MACHINE_LUCKIER] = 35, + [SLOT_MACHINE_LUCKIEST] = 35 + }, + { // Probabilities for LUCKY_BIAS_MIXED_777 + [SLOT_MACHINE_UNLUCKIEST] = 25, + [SLOT_MACHINE_UNLUCKIER] = 25, + [SLOT_MACHINE_UNLUCKY] = 30, + [SLOT_MACHINE_LUCKY] = 25, + [SLOT_MACHINE_LUCKIER] = 25, + [SLOT_MACHINE_LUCKIEST] = 30 + } }; -static const u8 sLuckyFlagProbabilities_NotTop3[][6] = { - {20, 25, 25, 20, 25, 25}, - {12, 15, 15, 18, 19, 22}, - {25, 25, 25, 30, 30, 40}, - {25, 25, 20, 20, 15, 15}, - {40, 40, 35, 35, 40, 40} +static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS] = { + { // Probabilities for LUCKY_BIAS_POWER + [SLOT_MACHINE_UNLUCKIEST] = 20, + [SLOT_MACHINE_UNLUCKIER] = 25, + [SLOT_MACHINE_UNLUCKY] = 25, + [SLOT_MACHINE_LUCKY] = 20, + [SLOT_MACHINE_LUCKIER] = 25, + [SLOT_MACHINE_LUCKIEST] = 25 + }, + { // Probabilities for LUCKY_BIAS_AZURILL + [SLOT_MACHINE_UNLUCKIEST] = 12, + [SLOT_MACHINE_UNLUCKIER] = 15, + [SLOT_MACHINE_UNLUCKY] = 15, + [SLOT_MACHINE_LUCKY] = 18, + [SLOT_MACHINE_LUCKIER] = 19, + [SLOT_MACHINE_LUCKIEST] = 22 + }, + { // Probabilities for LUCKY_BIAS_LOTAD + [SLOT_MACHINE_UNLUCKIEST] = 25, + [SLOT_MACHINE_UNLUCKIER] = 25, + [SLOT_MACHINE_UNLUCKY] = 25, + [SLOT_MACHINE_LUCKY] = 30, + [SLOT_MACHINE_LUCKIER] = 30, + [SLOT_MACHINE_LUCKIEST] = 40 + }, + { // Probabilities for LUCKY_BIAS_CHERRY + [SLOT_MACHINE_UNLUCKIEST] = 25, + [SLOT_MACHINE_UNLUCKIER] = 25, + [SLOT_MACHINE_UNLUCKY] = 20, + [SLOT_MACHINE_LUCKY] = 20, + [SLOT_MACHINE_LUCKIER] = 15, + [SLOT_MACHINE_LUCKIEST] = 15 + }, + { // Probabilities for LUCKY_BIAS_REPLAY + [SLOT_MACHINE_UNLUCKIEST] = 40, + [SLOT_MACHINE_UNLUCKIER] = 40, + [SLOT_MACHINE_UNLUCKY] = 35, + [SLOT_MACHINE_LUCKY] = 35, + [SLOT_MACHINE_LUCKIER] = 40, + [SLOT_MACHINE_LUCKIEST] = 40 + } }; static const u8 sReeltimeProbabilities_UnluckyGame[][17] = { @@ -5708,7 +5760,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Insert = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Stop = { - .tileTag = 18, + .tileTag = GFXTAG_STOP, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, @@ -5741,7 +5793,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Lose = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Bonus = { - .tileTag = 19, + .tileTag = GFXTAG_BONUS, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, @@ -5752,7 +5804,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Bonus = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Big = { - .tileTag = 20, + .tileTag = GFXTAG_BIG, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, @@ -5763,7 +5815,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Big = static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Reg = { - .tileTag = 21, + .tileTag = GFXTAG_REG, .paletteTag = PALTAG_DIG_DISPLAY, .oam = &sOam_8x8, .anims = sAnims_SingleFrame, diff --git a/src/tv.c b/src/tv.c index 4638fc6217..64c3eb7837 100644 --- a/src/tv.c +++ b/src/tv.c @@ -145,7 +145,7 @@ static void ResolveNumberOneShow(u16); static void TryPutFishingAdviceOnAir(void); static u8 MonDataIdxToRibbon(u8); static void TryPutNumberOneOnAir(u8); -static bool8 IsPriceDiscounted(u8); +static bool8 ShouldApplyPokeNewsEffect(u8); static void TryPutWorldOfMastersOnAir(void); static void InterviewBefore_FanClubLetter(void); static void InterviewBefore_RecentHappenings(void); @@ -1525,7 +1525,7 @@ void TryPutSmartShopperOnAir(void) show->smartshopperShow.itemIds[i] = gMartPurchaseHistory[i].itemId; show->smartshopperShow.itemAmounts[i] = gMartPurchaseHistory[i].quantity; } - show->smartshopperShow.priceReduced = GetPriceReduction(POKENEWS_SLATEPORT); + show->smartshopperShow.priceReduced = IsPokeNewsActive(POKENEWS_SLATEPORT); StringCopy(show->smartshopperShow.playerName, gSaveBlock2Ptr->playerName); StorePlayerIdInRecordMixShow(show); show->smartshopperShow.language = gGameLanguage; @@ -2641,7 +2641,7 @@ void DoPokeNews(void) } } -bool8 GetPriceReduction(u8 newsKind) +bool8 IsPokeNewsActive(u8 newsKind) { u8 i; @@ -2652,7 +2652,7 @@ bool8 GetPriceReduction(u8 newsKind) { if (gSaveBlock1Ptr->pokeNews[i].kind == newsKind) { - if (gSaveBlock1Ptr->pokeNews[i].state == 2 && IsPriceDiscounted(newsKind)) + if (gSaveBlock1Ptr->pokeNews[i].state == 2 && ShouldApplyPokeNewsEffect(newsKind)) return TRUE; return FALSE; @@ -2661,7 +2661,11 @@ bool8 GetPriceReduction(u8 newsKind) return FALSE; } -static bool8 IsPriceDiscounted(u8 newsKind) +// Returns TRUE if the effects of the given PokeNews should be applied. +// For POKENEWS_SLATEPORT / POKENEWS_LILYCOVE, only apply the effect (price reduction) +// if the player is talking to the Energy Guru / at the Dept Store Rooftop. +// For any other type of PokeNews this is always TRUE. +static bool8 ShouldApplyPokeNewsEffect(u8 newsKind) { switch (newsKind) { From d4147879320c563254059a92eb7a07b5cfcc2143 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 16 Nov 2021 16:13:52 -0500 Subject: [PATCH 191/417] Some TV clean-up --- data/maps/SlateportCity/scripts.inc | 2 + data/scripts/tv.inc | 4 +- include/constants/event_objects.h | 1 + include/constants/tv.h | 8 + include/global.h | 6 +- include/global.tv.h | 22 +- src/tv.c | 334 ++++++++++++++-------------- 7 files changed, 198 insertions(+), 179 deletions(-) diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index 693a99e49a..be2f3f3e51 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -19,6 +19,8 @@ .set LOCALID_GRUNT_11, 33 .set LOCALID_SCOTT, 35 +@ Note: LOCALID_SLATEPORT_ENERGY_GURU is a local id for this map used elsewhere. It's defined in event_objects.h + SlateportCity_MapScripts:: map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_OnTransition map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_OnFrame diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index 14f3ade48d..f8832a3abd 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -52,11 +52,13 @@ EventScript_PlayersHouseLatiNewsFlash:: releaseall end +@ The following is a loop for the TV show messages +@ VAR_RESULT is set to TRUE when the show has printed its final message EventScript_DoTVShow:: special DoTVShow waitmessage waitbuttonpress - compare VAR_RESULT, 1 + compare VAR_RESULT, TRUE goto_if_ne EventScript_DoTVShow goto EventScript_TurnOffTV end diff --git a/include/constants/event_objects.h b/include/constants/event_objects.h index 1958c792e1..6b99f19bd4 100644 --- a/include/constants/event_objects.h +++ b/include/constants/event_objects.h @@ -311,5 +311,6 @@ #define LOCALID_MOSSDEEP_MART_CLERK 1 #define LOCALID_SOOTOPOLIS_MART_CLERK 1 #define LOCALID_BATTLE_FRONTIER_MART_CLERK 1 +#define LOCALID_SLATEPORT_ENERGY_GURU 25 #endif // GUARD_CONSTANTS_EVENT_OBJECTS_H diff --git a/include/constants/tv.h b/include/constants/tv.h index 3fe6c57b24..4c8dd4fa83 100644 --- a/include/constants/tv.h +++ b/include/constants/tv.h @@ -8,6 +8,14 @@ #define POKENEWS_BLENDMASTER 4 #define NUM_POKENEWS_TYPES 4 // Excludes NONE +#define POKENEWS_STATE_INACTIVE 0 +#define POKENEWS_STATE_UPCOMING 1 +#define POKENEWS_STATE_ACTIVE 2 + +// Number of days to count down until the news event occurs. +// Nothing is aired on TV the first day +#define POKENEWS_COUNTDOWN 4 + // TV shows are categorized as being in one of 3 groups // - TVGROUP_NORMAL, TV shows that can appear without Record Mixing // - TVGROUP_RECORD_MIX, TV shows that can only appear via Record Mixing diff --git a/include/global.h b/include/global.h index 9aac66fda0..024280f986 100644 --- a/include/global.h +++ b/include/global.h @@ -972,10 +972,10 @@ struct SaveBlock1 /*0x2B92*/ u8 outbreakLocationMapNum; /*0x2B93*/ u8 outbreakLocationMapGroup; /*0x2B94*/ u8 outbreakPokemonLevel; - /*0x2B95*/ u8 outbreakUnk1; - /*0x2B96*/ u16 outbreakUnk2; + /*0x2B95*/ u8 outbreakUnused1; + /*0x2B96*/ u16 outbreakUnused2; /*0x2B98*/ u16 outbreakPokemonMoves[MAX_MON_MOVES]; - /*0x2BA0*/ u8 outbreakUnk4; + /*0x2BA0*/ u8 outbreakUnused3; /*0x2BA1*/ u8 outbreakPokemonProbability; /*0x2BA2*/ u16 outbreakDaysLeft; /*0x2BA4*/ struct GabbyAndTyData gabbyAndTyData; diff --git a/include/global.tv.h b/include/global.tv.h index 2bc7dda998..e24ead3f21 100644 --- a/include/global.tv.h +++ b/include/global.tv.h @@ -61,7 +61,7 @@ typedef union // size = 0x24 /*0x0F*/ u8 filler_0F[1]; /*0x10*/ u8 nickname[PLAYER_NAME_LENGTH + 1]; /*0x18*/ u16 words18[2]; - /*0x1C*/ u16 words[4]; + /*0x1C*/ u16 words[2]; } fanclubOpinions; // TVSHOW_DUMMY @@ -334,7 +334,7 @@ typedef union // size = 0x24 /*0x00*/ u8 kind; /*0x01*/ bool8 active; /*0x02*/ u8 avgLevel; - /*0x03*/ u8 nDecorations; + /*0x03*/ u8 numDecorations; /*0x04*/ u8 decorations[4]; /*0x08*/ u16 species; /*0x0a*/ u16 move; @@ -437,8 +437,8 @@ typedef union // size = 0x24 struct { /*0x00*/ u8 kind; /*0x01*/ bool8 active; - /*0x02*/ u8 nMonsCaught; - /*0x03*/ u8 nPkblkUsed; + /*0x02*/ u8 monsCaught; + /*0x03*/ u8 pokeblocksUsed; /*0x04*/ u8 language; /*0x05*/ u8 filler_05[14]; /*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; @@ -449,27 +449,27 @@ typedef union // size = 0x24 struct { /*0x00*/ u8 kind; /*0x01*/ bool8 active; - /*0x02*/ u8 var02; - /*0x03*/ u8 var03; + /*0x02*/ u8 unused1; + /*0x03*/ u8 unused3; /*0x04*/ u16 moves[MAX_MON_MOVES]; /*0x0C*/ u16 species; - /*0x0E*/ u16 var0E; + /*0x0E*/ u16 unused2; /*0x10*/ u8 locationMapNum; /*0x11*/ u8 locationMapGroup; - /*0x12*/ u8 var12; + /*0x12*/ u8 unused4; /*0x13*/ u8 probability; /*0x14*/ u8 level; - /*0x15*/ u8 var15; + /*0x15*/ u8 unused5; /*0x16*/ u16 daysLeft; /*0x18*/ u8 language; } massOutbreak; } TVShow; -typedef struct // 2b50 +typedef struct { u8 kind; u8 state; - u16 days; + u16 dayCountdown; } PokeNews; struct GabbyAndTyData diff --git a/src/tv.c b/src/tv.c index 64c3eb7837..de16578137 100644 --- a/src/tv.c +++ b/src/tv.c @@ -36,6 +36,7 @@ #include "data.h" #include "constants/battle_frontier.h" #include "constants/contest.h" +#include "constants/decorations.h" #include "constants/event_objects.h" #include "constants/items.h" #include "constants/layouts.h" @@ -139,7 +140,7 @@ static void TryPutRandomPokeNewsOnAir(void); static void SortPurchasesByQuantity(void); static void UpdateMassOutbreakTimeLeft(u16); static void TryEndMassOutbreak(u16); -static void UpdatePokeNewsTimeLeft(u16); +static void UpdatePokeNewsCountdown(u16); static void ResolveWorldOfMastersShow(u16); static void ResolveNumberOneShow(u16); static void TryPutFishingAdviceOnAir(void); @@ -227,24 +228,24 @@ static const struct { } }; -static const u16 sGoldSymbolFlags[] = { - FLAG_SYS_TOWER_GOLD, - FLAG_SYS_DOME_GOLD, - FLAG_SYS_PALACE_GOLD, - FLAG_SYS_ARENA_GOLD, - FLAG_SYS_FACTORY_GOLD, - FLAG_SYS_PIKE_GOLD, - FLAG_SYS_PYRAMID_GOLD +static const u16 sGoldSymbolFlags[NUM_FRONTIER_FACILITIES] = { + [FRONTIER_FACILITY_TOWER] = FLAG_SYS_TOWER_GOLD, + [FRONTIER_FACILITY_DOME] = FLAG_SYS_DOME_GOLD, + [FRONTIER_FACILITY_PALACE] = FLAG_SYS_PALACE_GOLD, + [FRONTIER_FACILITY_ARENA] = FLAG_SYS_ARENA_GOLD, + [FRONTIER_FACILITY_FACTORY] = FLAG_SYS_FACTORY_GOLD, + [FRONTIER_FACILITY_PIKE] = FLAG_SYS_PIKE_GOLD, + [FRONTIER_FACILITY_PYRAMID] = FLAG_SYS_PYRAMID_GOLD }; -static const u16 sSilverSymbolFlags[] = { - FLAG_SYS_TOWER_SILVER, - FLAG_SYS_DOME_SILVER, - FLAG_SYS_PALACE_SILVER, - FLAG_SYS_ARENA_SILVER, - FLAG_SYS_FACTORY_SILVER, - FLAG_SYS_PIKE_SILVER, - FLAG_SYS_PYRAMID_SILVER +static const u16 sSilverSymbolFlags[NUM_FRONTIER_FACILITIES] = { + [FRONTIER_FACILITY_TOWER] = FLAG_SYS_TOWER_SILVER, + [FRONTIER_FACILITY_DOME] = FLAG_SYS_DOME_SILVER, + [FRONTIER_FACILITY_PALACE] = FLAG_SYS_PALACE_SILVER, + [FRONTIER_FACILITY_ARENA] = FLAG_SYS_ARENA_SILVER, + [FRONTIER_FACILITY_FACTORY] = FLAG_SYS_FACTORY_SILVER, + [FRONTIER_FACILITY_PIKE] = FLAG_SYS_PIKE_SILVER, + [FRONTIER_FACILITY_PYRAMID] = FLAG_SYS_PYRAMID_SILVER }; static const u16 sNumberOneVarsAndThresholds[][2] = { @@ -257,28 +258,28 @@ static const u16 sNumberOneVarsAndThresholds[][2] = { {VAR_DAILY_BP, 30} }; -static const u8 *const sPokeNewsTextGroup_Upcoming[] = { - NULL, - gPokeNewsTextSlateport_Upcoming, - gPokeNewsTextGameCorner_Upcoming, - gPokeNewsTextLilycove_Upcoming, - gPokeNewsTextBlendMaster_Upcoming +static const u8 *const sPokeNewsTextGroup_Upcoming[NUM_POKENEWS_TYPES + 1] = { + [POKENEWS_NONE] = NULL, + [POKENEWS_SLATEPORT] = gPokeNewsTextSlateport_Upcoming, + [POKENEWS_GAME_CORNER] = gPokeNewsTextGameCorner_Upcoming, + [POKENEWS_LILYCOVE] = gPokeNewsTextLilycove_Upcoming, + [POKENEWS_BLENDMASTER] = gPokeNewsTextBlendMaster_Upcoming }; -static const u8 *const sPokeNewsTextGroup_Ongoing[] = { - NULL, - gPokeNewsTextSlateport_Ongoing, - gPokeNewsTextGameCorner_Ongoing, - gPokeNewsTextLilycove_Ongoing, - gPokeNewsTextBlendMaster_Ongoing +static const u8 *const sPokeNewsTextGroup_Ongoing[NUM_POKENEWS_TYPES + 1] = { + [POKENEWS_NONE] = NULL, + [POKENEWS_SLATEPORT] = gPokeNewsTextSlateport_Ongoing, + [POKENEWS_GAME_CORNER] = gPokeNewsTextGameCorner_Ongoing, + [POKENEWS_LILYCOVE] = gPokeNewsTextLilycove_Ongoing, + [POKENEWS_BLENDMASTER] = gPokeNewsTextBlendMaster_Ongoing }; -static const u8 *const sPokeNewsTextGroup_Ending[] = { - NULL, - gPokeNewsTextSlateport_Ending, - gPokeNewsTextGameCorner_Ending, - gPokeNewsTextLilycove_Ending, - gPokeNewsTextBlendMaster_Ending +static const u8 *const sPokeNewsTextGroup_Ending[NUM_POKENEWS_TYPES + 1] = { + [POKENEWS_NONE] = NULL, + [POKENEWS_SLATEPORT] = gPokeNewsTextSlateport_Ending, + [POKENEWS_GAME_CORNER] = gPokeNewsTextGameCorner_Ending, + [POKENEWS_LILYCOVE] = gPokeNewsTextLilycove_Ending, + [POKENEWS_BLENDMASTER] = gPokeNewsTextBlendMaster_Ending }; u8 *const gTVStringVarPtrs[] = { @@ -1568,13 +1569,13 @@ void StartMassOutbreak(void) gSaveBlock1Ptr->outbreakLocationMapNum = show->massOutbreak.locationMapNum; gSaveBlock1Ptr->outbreakLocationMapGroup = show->massOutbreak.locationMapGroup; gSaveBlock1Ptr->outbreakPokemonLevel = show->massOutbreak.level; - gSaveBlock1Ptr->outbreakUnk1 = show->massOutbreak.var02; - gSaveBlock1Ptr->outbreakUnk2 = show->massOutbreak.var0E; + gSaveBlock1Ptr->outbreakUnused1 = show->massOutbreak.unused1; + gSaveBlock1Ptr->outbreakUnused2 = show->massOutbreak.unused2; gSaveBlock1Ptr->outbreakPokemonMoves[0] = show->massOutbreak.moves[0]; gSaveBlock1Ptr->outbreakPokemonMoves[1] = show->massOutbreak.moves[1]; gSaveBlock1Ptr->outbreakPokemonMoves[2] = show->massOutbreak.moves[2]; gSaveBlock1Ptr->outbreakPokemonMoves[3] = show->massOutbreak.moves[3]; - gSaveBlock1Ptr->outbreakUnk4 = show->massOutbreak.var03; + gSaveBlock1Ptr->outbreakUnused3 = show->massOutbreak.unused3; gSaveBlock1Ptr->outbreakPokemonProbability = show->massOutbreak.probability; gSaveBlock1Ptr->outbreakDaysLeft = 2; } @@ -1667,19 +1668,19 @@ static void TryStartRandomMassOutbreak(void) show->massOutbreak.kind = TVSHOW_MASS_OUTBREAK; show->massOutbreak.active = TRUE; show->massOutbreak.level = sPokeOutbreakSpeciesList[outbreakIdx].level; - show->massOutbreak.var02 = 0; - show->massOutbreak.var03 = 0; + show->massOutbreak.unused1 = 0; + show->massOutbreak.unused3 = 0; show->massOutbreak.species = sPokeOutbreakSpeciesList[outbreakIdx].species; - show->massOutbreak.var0E = 0; + show->massOutbreak.unused2 = 0; show->massOutbreak.moves[0] = sPokeOutbreakSpeciesList[outbreakIdx].moves[0]; show->massOutbreak.moves[1] = sPokeOutbreakSpeciesList[outbreakIdx].moves[1]; show->massOutbreak.moves[2] = sPokeOutbreakSpeciesList[outbreakIdx].moves[2]; show->massOutbreak.moves[3] = sPokeOutbreakSpeciesList[outbreakIdx].moves[3]; show->massOutbreak.locationMapNum = sPokeOutbreakSpeciesList[outbreakIdx].location; show->massOutbreak.locationMapGroup = 0; - show->massOutbreak.var12 = 0; + show->massOutbreak.unused4 = 0; show->massOutbreak.probability = 50; - show->massOutbreak.var15 = 0; + show->massOutbreak.unused5 = 0; show->massOutbreak.daysLeft = 1; StorePlayerIdInNormalShow(show); show->massOutbreak.language = gGameLanguage; @@ -1694,13 +1695,13 @@ void EndMassOutbreak(void) gSaveBlock1Ptr->outbreakLocationMapNum = 0; gSaveBlock1Ptr->outbreakLocationMapGroup = 0; gSaveBlock1Ptr->outbreakPokemonLevel = 0; - gSaveBlock1Ptr->outbreakUnk1 = 0; - gSaveBlock1Ptr->outbreakUnk2 = 0; + gSaveBlock1Ptr->outbreakUnused1 = 0; + gSaveBlock1Ptr->outbreakUnused2 = 0; gSaveBlock1Ptr->outbreakPokemonMoves[0] = MOVE_NONE; gSaveBlock1Ptr->outbreakPokemonMoves[1] = MOVE_NONE; gSaveBlock1Ptr->outbreakPokemonMoves[2] = MOVE_NONE; gSaveBlock1Ptr->outbreakPokemonMoves[3] = MOVE_NONE; - gSaveBlock1Ptr->outbreakUnk4 = 0; + gSaveBlock1Ptr->outbreakUnused3 = 0; gSaveBlock1Ptr->outbreakPokemonProbability = 0; gSaveBlock1Ptr->outbreakDaysLeft = 0; } @@ -1709,7 +1710,7 @@ void UpdateTVShowsPerDay(u16 days) { UpdateMassOutbreakTimeLeft(days); TryEndMassOutbreak(days); - UpdatePokeNewsTimeLeft(days); + UpdatePokeNewsCountdown(days); ResolveWorldOfMastersShow(days); ResolveNumberOneShow(days); } @@ -1797,9 +1798,7 @@ void SetPokemonAnglerSpecies(u16 species) // Either way the temporary version of the show in the last slot is deleted. static void ResolveWorldOfMastersShow(u16 days) { - TVShow *show; - - show = &gSaveBlock1Ptr->tvShows[LAST_TVSHOW_IDX]; + TVShow *show = &gSaveBlock1Ptr->tvShows[LAST_TVSHOW_IDX]; if (show->worldOfMasters.kind == TVSHOW_WORLD_OF_MASTERS) { if (show->worldOfMasters.numPokeCaught >= 20) @@ -1863,7 +1862,7 @@ void TryPutTodaysRivalTrainerOnAir(void) show->rivalTrainer.mapLayoutId = gMapHeader.mapLayoutId; show->rivalTrainer.nSilverSymbols = 0; show->rivalTrainer.nGoldSymbols = 0; - for (i = 0; i < 7; i++) + for (i = 0; i < NUM_FRONTIER_FACILITIES; i++) { if (FlagGet(sSilverSymbolFlags[i]) == TRUE) show->rivalTrainer.nSilverSymbols++; @@ -1989,33 +1988,39 @@ static void SecretBaseVisit_CalculateDecorationData(TVShow *show) u8 decoration; for (i = 0; i < DECOR_MAX_SECRET_BASE; i++) - sTV_DecorationsBuffer[i] = 0; + sTV_DecorationsBuffer[i] = DECOR_NONE; + // Count (and save) the unique decorations in the base for (i = 0, n = 0; i < DECOR_MAX_SECRET_BASE; i++) { decoration = gSaveBlock1Ptr->secretBases[0].decorations[i]; - if (decoration) + if (decoration != DECOR_NONE) { + // Search for an empty spot to save decoration for (j = 0; j < DECOR_MAX_SECRET_BASE; j++) { - if (sTV_DecorationsBuffer[j] == 0) + if (sTV_DecorationsBuffer[j] == DECOR_NONE) { + // Save and count new unique decoration sTV_DecorationsBuffer[j] = decoration; n++; break; } + + // Decoration has already been saved, skip and move on to the next base decoration if (sTV_DecorationsBuffer[j] == decoration) break; } } } - if (n > 4) - show->secretBaseVisit.nDecorations = 4; + // Cap the number of unique decorations to the number the TV show will talk about + if (n > ARRAY_COUNT(show->secretBaseVisit.decorations)) + show->secretBaseVisit.numDecorations = ARRAY_COUNT(show->secretBaseVisit.decorations); else - show->secretBaseVisit.nDecorations = n; + show->secretBaseVisit.numDecorations = n; - switch (show->secretBaseVisit.nDecorations) + switch (show->secretBaseVisit.numDecorations) { case 0: break; @@ -2023,16 +2028,16 @@ static void SecretBaseVisit_CalculateDecorationData(TVShow *show) show->secretBaseVisit.decorations[0] = sTV_DecorationsBuffer[0]; break; default: + // More than 1 decoration, randomize the full list for (k = 0; k < n * n; k++) { decoration = Random() % n; j = Random() % n; - i = sTV_DecorationsBuffer[decoration]; - sTV_DecorationsBuffer[decoration] = sTV_DecorationsBuffer[j]; - sTV_DecorationsBuffer[j] = i; + SWAP(sTV_DecorationsBuffer[decoration], sTV_DecorationsBuffer[j], i); } - for (i = 0; i < show->secretBaseVisit.nDecorations; i++) + // Pick the first decorations in the randomized list to talk about on the show + for (i = 0; i < show->secretBaseVisit.numDecorations; i++) show->secretBaseVisit.decorations[i] = sTV_DecorationsBuffer[i]; break; } @@ -2043,50 +2048,55 @@ static void SecretBaseVisit_CalculatePartyData(TVShow *show) u8 i; u16 move; u16 j; - u8 nMoves; - u8 nPokemon; + u8 numMoves; + u8 numPokemon; u16 sum; - for (i = 0, nPokemon = 0; i < PARTY_SIZE; i++) + for (i = 0, numPokemon = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) { - sTV_SecretBaseVisitMonsTemp[nPokemon].level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); - sTV_SecretBaseVisitMonsTemp[nPokemon].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES); - nMoves = 0; + sTV_SecretBaseVisitMonsTemp[numPokemon].level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); + sTV_SecretBaseVisitMonsTemp[numPokemon].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES); + + // Check all the Pokémon's moves, then randomly select one to save + numMoves = 0; move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE1); if (move != MOVE_NONE) { - sTV_SecretBaseVisitMovesTemp[nMoves] = move; - nMoves++; + sTV_SecretBaseVisitMovesTemp[numMoves] = move; + numMoves++; } move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE2); if (move != MOVE_NONE) { - sTV_SecretBaseVisitMovesTemp[nMoves] = move; - nMoves++; + sTV_SecretBaseVisitMovesTemp[numMoves] = move; + numMoves++; } move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE3); if (move != MOVE_NONE) { - sTV_SecretBaseVisitMovesTemp[nMoves] = move; - nMoves++; + sTV_SecretBaseVisitMovesTemp[numMoves] = move; + numMoves++; } move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE4); if (move != MOVE_NONE) { - sTV_SecretBaseVisitMovesTemp[nMoves] = move; - nMoves++; + sTV_SecretBaseVisitMovesTemp[numMoves] = move; + numMoves++; } - sTV_SecretBaseVisitMonsTemp[nPokemon].move = sTV_SecretBaseVisitMovesTemp[Random() % nMoves]; - nPokemon++; + sTV_SecretBaseVisitMonsTemp[numPokemon].move = sTV_SecretBaseVisitMovesTemp[Random() % numMoves]; + numPokemon++; } } - for (i = 0, sum = 0; i < nPokemon; i++) + + for (i = 0, sum = 0; i < numPokemon; i++) sum += sTV_SecretBaseVisitMonsTemp[i].level; - show->secretBaseVisit.avgLevel = sum / nPokemon; - j = Random() % nPokemon; + // Using the data calculated above, save the data to talk about on the show + // (average level, and one randomly selected species / move) + show->secretBaseVisit.avgLevel = sum / numPokemon; + j = Random() % numPokemon; show->secretBaseVisit.species = sTV_SecretBaseVisitMonsTemp[j].species; show->secretBaseVisit.move = sTV_SecretBaseVisitMonsTemp[j].move; } @@ -2224,7 +2234,7 @@ void TryPutBattleSeminarOnAir(u16 foeSpecies, u16 species, u8 moveIdx, const u16 } } -void TryPutSafariFanClubOnAir(u8 nMonsCaught, u8 nPkblkUsed) +void TryPutSafariFanClubOnAir(u8 monsCaught, u8 pokeblocksUsed) { TVShow *show; @@ -2235,8 +2245,8 @@ void TryPutSafariFanClubOnAir(u8 nMonsCaught, u8 nPkblkUsed) show->safariFanClub.kind = TVSHOW_SAFARI_FAN_CLUB; show->safariFanClub.active = FALSE; // NOTE: Show is not active until passed via Record Mix. StringCopy(show->safariFanClub.playerName, gSaveBlock2Ptr->playerName); - show->safariFanClub.nMonsCaught = nMonsCaught; - show->safariFanClub.nPkblkUsed = nPkblkUsed; + show->safariFanClub.monsCaught = monsCaught; + show->safariFanClub.pokeblocksUsed = pokeblocksUsed; StorePlayerIdInRecordMixShow(show); show->safariFanClub.language = gGameLanguage; } @@ -2536,12 +2546,12 @@ static void TryPutRandomPokeNewsOnAir(void) sCurTVShowSlot = GetFirstEmptyPokeNewsSlot(gSaveBlock1Ptr->pokeNews); if (sCurTVShowSlot != -1 && rbernoulli(1, 100) != TRUE) { - u8 newsKind = (Random() % NUM_POKENEWS_TYPES) + POKENEWS_SLATEPORT; + u8 newsKind = (Random() % NUM_POKENEWS_TYPES) + 1; // +1 to skip over POKENEWS_NONE if (IsAddingPokeNewsDisallowed(newsKind) != TRUE) { gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].kind = newsKind; - gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].days = 4; - gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].state = 1; + gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].dayCountdown = POKENEWS_COUNTDOWN; + gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].state = POKENEWS_STATE_UPCOMING; } } } @@ -2570,8 +2580,8 @@ static void ClearPokeNews(void) static void ClearPokeNewsBySlot(u8 i) { gSaveBlock1Ptr->pokeNews[i].kind = POKENEWS_NONE; - gSaveBlock1Ptr->pokeNews[i].state = FALSE; - gSaveBlock1Ptr->pokeNews[i].days = 0; + gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_INACTIVE; + gSaveBlock1Ptr->pokeNews[i].dayCountdown = 0; } static void CompactPokeNews(void) @@ -2603,8 +2613,8 @@ static u8 FindAnyPokeNewsOnTheAir(void) for (i = 0; i < POKE_NEWS_COUNT; i++) { if (gSaveBlock1Ptr->pokeNews[i].kind != POKENEWS_NONE - && gSaveBlock1Ptr->pokeNews[i].state == 1 - && gSaveBlock1Ptr->pokeNews[i].days < 3) + && gSaveBlock1Ptr->pokeNews[i].state == POKENEWS_STATE_UPCOMING + && gSaveBlock1Ptr->pokeNews[i].dayCountdown < POKENEWS_COUNTDOWN - 1) return i; } return 0xFF; @@ -2612,19 +2622,17 @@ static u8 FindAnyPokeNewsOnTheAir(void) void DoPokeNews(void) { - u8 i; - u16 n; - - i = FindAnyPokeNewsOnTheAir(); + u8 i = FindAnyPokeNewsOnTheAir(); if (i == 0xFF) { gSpecialVar_Result = FALSE; } else { - if (gSaveBlock1Ptr->pokeNews[i].days == 0) + if (gSaveBlock1Ptr->pokeNews[i].dayCountdown == 0) { - gSaveBlock1Ptr->pokeNews[i].state = 2; + // News event is occurring, make comment depending on how much time is left + gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_ACTIVE; if (gLocalTime.hours < 20) ShowFieldMessage(sPokeNewsTextGroup_Ongoing[gSaveBlock1Ptr->pokeNews[i].kind]); else @@ -2632,9 +2640,13 @@ void DoPokeNews(void) } else { - n = gSaveBlock1Ptr->pokeNews[i].days; - ConvertIntToDecimalStringN(gStringVar1, n, STR_CONV_MODE_LEFT_ALIGN, 1); - gSaveBlock1Ptr->pokeNews[i].state = 0; + // News event is upcoming, make comment about countdown to event + u16 dayCountdown = gSaveBlock1Ptr->pokeNews[i].dayCountdown; + ConvertIntToDecimalStringN(gStringVar1, dayCountdown, STR_CONV_MODE_LEFT_ALIGN, 1); + + // Mark as inactive so the countdown TV airing doesn't repeat + // Will be flagged as "upcoming" again by UpdatePokeNewsCountdown + gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_INACTIVE; ShowFieldMessage(sPokeNewsTextGroup_Upcoming[gSaveBlock1Ptr->pokeNews[i].kind]); } gSpecialVar_Result = TRUE; @@ -2652,7 +2664,7 @@ bool8 IsPokeNewsActive(u8 newsKind) { if (gSaveBlock1Ptr->pokeNews[i].kind == newsKind) { - if (gSaveBlock1Ptr->pokeNews[i].state == 2 && ShouldApplyPokeNewsEffect(newsKind)) + if (gSaveBlock1Ptr->pokeNews[i].state == POKENEWS_STATE_ACTIVE && ShouldApplyPokeNewsEffect(newsKind)) return TRUE; return FALSE; @@ -2662,19 +2674,22 @@ bool8 IsPokeNewsActive(u8 newsKind) } // Returns TRUE if the effects of the given PokeNews should be applied. -// For POKENEWS_SLATEPORT / POKENEWS_LILYCOVE, only apply the effect (price reduction) -// if the player is talking to the Energy Guru / at the Dept Store Rooftop. +// For POKENEWS_SLATEPORT / POKENEWS_LILYCOVE, only apply the effect if +// the player is talking to the Energy Guru / at the Dept Store Rooftop. // For any other type of PokeNews this is always TRUE. static bool8 ShouldApplyPokeNewsEffect(u8 newsKind) { switch (newsKind) { case POKENEWS_SLATEPORT: - if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(SLATEPORT_CITY) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(SLATEPORT_CITY) && gSpecialVar_LastTalked == 25) + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(SLATEPORT_CITY) + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(SLATEPORT_CITY) + && gSpecialVar_LastTalked == LOCALID_SLATEPORT_ENERGY_GURU) return TRUE; return FALSE; case POKENEWS_LILYCOVE: - if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP)) + if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP) + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP)) return TRUE; return FALSE; } @@ -2696,7 +2711,7 @@ static bool8 IsAddingPokeNewsDisallowed(u8 newsKind) return FALSE; } -static void UpdatePokeNewsTimeLeft(u16 days) +static void UpdatePokeNewsCountdown(u16 days) { u8 i; @@ -2704,16 +2719,18 @@ static void UpdatePokeNewsTimeLeft(u16 days) { if (gSaveBlock1Ptr->pokeNews[i].kind != POKENEWS_NONE) { - if (gSaveBlock1Ptr->pokeNews[i].days < days) + if (gSaveBlock1Ptr->pokeNews[i].dayCountdown < days) { + // News event has elapsed, clear it from list ClearPokeNewsBySlot(i); } else { - if (gSaveBlock1Ptr->pokeNews[i].state == 0 && FlagGet(FLAG_SYS_GAME_CLEAR) == TRUE) - gSaveBlock1Ptr->pokeNews[i].state = 1; + // Progress countdown to news event + if (gSaveBlock1Ptr->pokeNews[i].state == POKENEWS_STATE_INACTIVE && FlagGet(FLAG_SYS_GAME_CLEAR) == TRUE) + gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_UPCOMING; - gSaveBlock1Ptr->pokeNews[i].days -= days; + gSaveBlock1Ptr->pokeNews[i].dayCountdown -= days; } } } @@ -2763,9 +2780,7 @@ void CopyContestCategoryToStringVar(u8 varIdx, u8 category) void SetContestCategoryStringVarForInterview(void) { - TVShow *show; - - show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004]; + TVShow *show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004]; CopyContestCategoryToStringVar(1, show->bravoTrainer.contestCategory); } @@ -2792,9 +2807,7 @@ size_t CountDigits(int value) static void SmartShopper_BufferPurchaseTotal(u8 varIdx, TVShow *show) { u8 i; - int price; - - price = 0; + int price = 0; for (i = 0; i < SMARTSHOPPER_NUM_ITEMS; i++) { if (show->smartshopperShow.itemIds[i] != ITEM_NONE) @@ -2835,21 +2848,19 @@ static bool8 IsRecordMixShowAlreadySpawned(u8 kind, bool8 delete) static void SortPurchasesByQuantity(void) { u8 i, j; - u16 tmpId; - u16 tmpQn; - + for (i = 0; i < SMARTSHOPPER_NUM_ITEMS - 1; i++) { for (j = i + 1; j < SMARTSHOPPER_NUM_ITEMS; j++) { if (gMartPurchaseHistory[i].quantity < gMartPurchaseHistory[j].quantity) { - tmpId = gMartPurchaseHistory[i].itemId; - tmpQn = gMartPurchaseHistory[i].quantity; + u16 tempItemId = gMartPurchaseHistory[i].itemId; + u16 tempQuantity = gMartPurchaseHistory[i].quantity; gMartPurchaseHistory[i].itemId = gMartPurchaseHistory[j].itemId; gMartPurchaseHistory[i].quantity = gMartPurchaseHistory[j].quantity; - gMartPurchaseHistory[j].itemId = tmpId; - gMartPurchaseHistory[j].quantity = tmpQn; + gMartPurchaseHistory[j].itemId = tempItemId; + gMartPurchaseHistory[j].quantity = tempQuantity; } } } @@ -2926,7 +2937,8 @@ static void InterviewBefore_FanClubLetter(void) if (!gSpecialVar_Result) { StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]); - InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words, 6); + InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words, + ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words)); } } @@ -2935,7 +2947,8 @@ static void InterviewBefore_RecentHappenings(void) TryReplaceOldTVShowOfKind(TVSHOW_RECENT_HAPPENINGS); if (!gSpecialVar_Result) { - InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].recentHappenings.words, 6); + InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].recentHappenings.words, + ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].recentHappenings.words)); } } @@ -2947,7 +2960,8 @@ static void InterviewBefore_PkmnFanClubOpinions(void) StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]); GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_NICKNAME, gStringVar2); StringGetEnd10(gStringVar2); - InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words, 2); + InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words, + ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words)); } } @@ -2965,7 +2979,8 @@ static void InterviewBefore_BravoTrainerPkmnProfile(void) { TryReplaceOldTVShowOfKind(TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE); if (!gSpecialVar_Result) - InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainer.words, 2); + InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainer.words, + ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainer.words)); } static void InterviewBefore_ContestLiveUpdates(void) @@ -2982,14 +2997,16 @@ static void InterviewBefore_BravoTrainerBTProfile(void) { TryReplaceOldTVShowOfKind(TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE); if (!gSpecialVar_Result) - InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainerTower.words, 1); + InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainerTower.words, + ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainerTower.words)); } static void InterviewBefore_FanClubSpecial(void) { TryReplaceOldTVShowOfKind(TVSHOW_FAN_CLUB_SPECIAL); if (!gSpecialVar_Result) - InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanClubSpecial.words, 1); + InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanClubSpecial.words, + ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanClubSpecial.words)); } static bool8 IsPartyMonNicknamedOrNotEnglish(u8 monIdx) @@ -3061,23 +3078,19 @@ static void CompactTVShowArray(TVShow *shows) } } -static u16 GetRandomDifferentSpeciesAndNameSeenByPlayer(u8 varIdx, u16 passedSpecies) +static u16 GetRandomDifferentSpeciesAndNameSeenByPlayer(u8 varIdx, u16 excludedSpecies) { - u16 species; - - species = GetRandomDifferentSpeciesSeenByPlayer(passedSpecies); + u16 species = GetRandomDifferentSpeciesSeenByPlayer(excludedSpecies); StringCopy(gTVStringVarPtrs[varIdx], gSpeciesNames[species]); return species; } -static u16 GetRandomDifferentSpeciesSeenByPlayer(u16 passedSpecies) +static u16 GetRandomDifferentSpeciesSeenByPlayer(u16 excludedSpecies) { - u16 species; - u16 initSpecies; + u16 species = Random() % (NUM_SPECIES - 1) + 1; + u16 initSpecies = species; - species = (Random() % (NUM_SPECIES - 1)) + 1; - initSpecies = species; - while (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_SEEN) != TRUE || species == passedSpecies) + while (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_SEEN) != TRUE || species == excludedSpecies) { if (species == SPECIES_NONE + 1) species = NUM_SPECIES - 1; @@ -3086,7 +3099,8 @@ static u16 GetRandomDifferentSpeciesSeenByPlayer(u16 passedSpecies) if (species == initSpecies) { - species = passedSpecies; + // Looped back to initial species (only Pokémon seen), must choose excluded species + species = excludedSpecies; return species; } }; @@ -3801,7 +3815,7 @@ void DeactivateAllNormalTVShows(void) } } -// Ensures a minimum of 5 empty mixed show slots +// Ensures a minimum of 5 empty record mixed show slots static void DeleteExcessMixedShows(void) { s8 i; @@ -3900,8 +3914,8 @@ static bool8 TryMixPokeNewsShow(PokeNews *dest, PokeNews *src, s8 slot) return FALSE; } dest[slot].kind = src->kind; - dest[slot].state = 1; - dest[slot].days = src->days; + dest[slot].state = POKENEWS_STATE_UPCOMING; + dest[slot].dayCountdown = src->dayCountdown; return TRUE; } @@ -3932,7 +3946,7 @@ static void ClearPokeNewsIfGameNotComplete(void) if (FlagGet(FLAG_SYS_GAME_CLEAR) != TRUE) { for (i = 0; i < POKE_NEWS_COUNT; i++) - gSaveBlock1Ptr->pokeNews[i].state = 0; + gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_INACTIVE; } } @@ -5910,21 +5924,21 @@ static void DoTVShowSecretBaseVisit(void) { case 0: TVShowConvertInternationalString(gStringVar1, show->secretBaseVisit.playerName, show->secretBaseVisit.language); - if (show->secretBaseVisit.nDecorations == 0) + if (show->secretBaseVisit.numDecorations == 0) sTVShowState = 2; else sTVShowState = 1; break; case 1: StringCopy(gStringVar2, gDecorations[show->secretBaseVisit.decorations[0]].name); - if (show->secretBaseVisit.nDecorations == 1) + if (show->secretBaseVisit.numDecorations == 1) sTVShowState = 4; else sTVShowState = 3; break; case 3: StringCopy(gStringVar2, gDecorations[show->secretBaseVisit.decorations[1]].name); - switch (show->secretBaseVisit.nDecorations) + switch (show->secretBaseVisit.numDecorations) { case 2: sTVShowState = 7; @@ -5988,21 +6002,13 @@ static void DoTVShowPokemonLotteryWinnerFlashReport(void) state = sTVShowState; TVShowConvertInternationalString(gStringVar1, show->lottoWinner.playerName, show->lottoWinner.language); if (show->lottoWinner.whichPrize == 0) - { StringCopy(gStringVar2, gText_Jackpot); - } else if (show->lottoWinner.whichPrize == 1) - { StringCopy(gStringVar2, gText_First); - } else if (show->lottoWinner.whichPrize == 2) - { StringCopy(gStringVar2, gText_Second); - } else - { StringCopy(gStringVar2, gText_Third); - } StringCopy(gStringVar3, ItemId_GetName(show->lottoWinner.item)); TVShowDone(); ShowFieldMessage(sTVPokemonLotteryWinnerFlashReportTextGroup[state]); @@ -6715,23 +6721,23 @@ static void DoTVShowSafariFanClub(void) switch (state) { case 0: - if (show->safariFanClub.nMonsCaught == 0) + if (show->safariFanClub.monsCaught == 0) sTVShowState = 6; - else if (show->safariFanClub.nMonsCaught < 4) + else if (show->safariFanClub.monsCaught < 4) sTVShowState = 5; else sTVShowState = 1; break; case 1: TVShowConvertInternationalString(gStringVar1, show->safariFanClub.playerName, show->safariFanClub.language); - ConvertIntToDecimalString(1, show->safariFanClub.nMonsCaught); - if (show->safariFanClub.nPkblkUsed == 0) + ConvertIntToDecimalString(1, show->safariFanClub.monsCaught); + if (show->safariFanClub.pokeblocksUsed == 0) sTVShowState = 3; else sTVShowState = 2; break; case 2: - ConvertIntToDecimalString(1, show->safariFanClub.nPkblkUsed); + ConvertIntToDecimalString(1, show->safariFanClub.pokeblocksUsed); sTVShowState = 4; break; case 3: @@ -6743,21 +6749,21 @@ static void DoTVShowSafariFanClub(void) break; case 5: TVShowConvertInternationalString(gStringVar1, show->safariFanClub.playerName, show->safariFanClub.language); - ConvertIntToDecimalString(1, show->safariFanClub.nMonsCaught); - if (show->safariFanClub.nPkblkUsed == 0) + ConvertIntToDecimalString(1, show->safariFanClub.monsCaught); + if (show->safariFanClub.pokeblocksUsed == 0) sTVShowState = 8; else sTVShowState = 7; break; case 6: TVShowConvertInternationalString(gStringVar1, show->safariFanClub.playerName, show->safariFanClub.language); - if (show->safariFanClub.nPkblkUsed == 0) + if (show->safariFanClub.pokeblocksUsed == 0) sTVShowState = 8; else sTVShowState = 7; break; case 7: - ConvertIntToDecimalString(1, show->safariFanClub.nPkblkUsed); + ConvertIntToDecimalString(1, show->safariFanClub.pokeblocksUsed); sTVShowState = 9; break; case 8: From 61aa9c3ba983462ab3420920ce8b5de5601f54f8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 16 Nov 2021 17:12:16 -0500 Subject: [PATCH 192/417] More updating event macro comments --- asm/macros/event.inc | 64 +-- .../AbandonedShip_Corridors_B1F/scripts.inc | 4 +- .../scripts.inc | 16 +- data/maps/AncientTomb/scripts.inc | 12 +- .../scripts.inc | 56 +-- .../scripts.inc | 8 +- data/maps/DesertRuins/scripts.inc | 12 +- data/maps/DewfordTown_Gym/scripts.inc | 64 +-- .../EverGrandeCity_ChampionsRoom/scripts.inc | 4 +- data/maps/InsideOfTruck/scripts.inc | 6 +- data/maps/IslandCave/scripts.inc | 24 +- data/maps/JaggedPass/scripts.inc | 8 +- data/maps/LilycoveCity/scripts.inc | 24 +- .../LilycoveCity_ContestLobby/scripts.inc | 16 +- .../scripts.inc | 20 +- .../scripts.inc | 6 +- .../LittlerootTown_MaysHouse_1F/scripts.inc | 6 +- data/maps/MauvilleCity_Gym/scripts.inc | 52 +- data/maps/MeteorFalls_1F_1R/scripts.inc | 8 +- data/maps/MossdeepCity_Gym/scripts.inc | 48 +- .../MossdeepCity_SpaceCenter_1F/scripts.inc | 2 +- .../MossdeepCity_StevensHouse/scripts.inc | 2 +- data/maps/NewMauville_Entrance/scripts.inc | 24 +- data/maps/NewMauville_Inside/scripts.inc | 166 +++---- data/maps/PetalburgCity_Gym/scripts.inc | 48 +- data/maps/Route103/scripts.inc | 4 +- data/maps/Route105/scripts.inc | 4 +- data/maps/Route110_TrickHouseEnd/scripts.inc | 2 +- .../Route110_TrickHouseEntrance/scripts.inc | 18 +- .../Route110_TrickHousePuzzle1/scripts.inc | 2 +- .../Route110_TrickHousePuzzle2/scripts.inc | 16 +- .../Route110_TrickHousePuzzle3/scripts.inc | 312 ++++++------ .../Route110_TrickHousePuzzle7/scripts.inc | 40 +- data/maps/Route111/scripts.inc | 40 +- .../Route114_FossilManiacsTunnel/scripts.inc | 4 +- data/maps/Route120/scripts.inc | 20 +- data/maps/SealedChamber_OuterRoom/scripts.inc | 12 +- .../ShoalCave_LowTideInnerRoom/scripts.inc | 24 +- .../ShoalCave_LowTideLowerRoom/scripts.inc | 4 +- .../ShoalCave_LowTideStairsRoom/scripts.inc | 4 +- data/maps/SkyPillar_Outside/scripts.inc | 4 +- data/maps/SootopolisCity/scripts.inc | 68 +-- data/maps/SootopolisCity_Gym_1F/scripts.inc | 12 +- data/maps/TrainerHill_Entrance/scripts.inc | 4 +- .../Underwater_SeafloorCavern/scripts.inc | 24 +- data/script_cmd_table.inc | 4 +- data/scripts/abnormal_weather.inc | 448 +++++++++--------- data/scripts/cable_club.inc | 24 +- data/scripts/elite_four.inc | 84 ++-- data/scripts/flash.inc | 2 +- include/field_screen_effect.h | 2 +- include/field_weather.h | 6 +- src/battle_setup.c | 2 +- src/field_screen_effect.c | 17 +- src/field_specials.c | 8 +- src/field_weather_effect.c | 18 +- src/overworld.c | 10 +- src/scrcmd.c | 8 +- 58 files changed, 979 insertions(+), 972 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 58b3b83292..d077103dcd 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1113,12 +1113,13 @@ .2byte \id .endm - @ Sets a berry tree's specific berry and growth stage. - .macro setberrytree tree_id:req, berry:req, growth_stage:req + @ Sets a berry tree's berry and growth stage. treeId is any BERRY_TREE_* constant (an index into berryTrees in SaveBlock1), + @ berry is any ITEM_TO_BERRY(ITEM_BERRY_NAME) value, and growthStage is any BERRY_STAGE_* constant. + .macro setberrytree treeId:req, berry:req, growthStage:req .byte 0x8a - .byte \tree_id + .byte \treeId .byte \berry - .byte \growth_stage + .byte \growthStage .endm @ This allows you to choose a Pokemon to use in a contest @@ -1126,17 +1127,17 @@ .byte 0x8b .endm - @ Starts a contest. + @ Starts the appeals round of a contest. .macro startcontest .byte 0x8c .endm - @ Shows the results of a contest. + @ Shows the results screen of a contest. .macro showcontestresults .byte 0x8d .endm - @ Starts a contest over a link connection. + @ Starts communication to initialize a link contest. .macro contestlinktransfer .byte 0x8e .endm @@ -1171,7 +1172,7 @@ .byte \disable .endm - @ Spawns a secondary box showing how much money the player has. + @ Creates a window showing how much money the player has. @ If 'disable' is set to anything but 0 then this command does nothing. .macro showmoneybox x:req, y:req, disable=0 .byte 0x93 @@ -1180,14 +1181,14 @@ .byte \disable .endm - @ Hides the secondary box spawned by showmoney. Consumption of the x and y arguments was dummied out. + @ Destroys the window created by showmoneybox. Consumption of the x and y arguments was dummied out. .macro hidemoneybox .byte 0x94 .byte 0 @ \x .byte 0 @ \y .endm - @ Updates the secondary box spawned by showmoney. Consumption of the x and y arguments was dummied out. + @ Updates the window created by showmoneybox. Consumption of the x and y arguments was dummied out. @ If 'disable' is set to anything but 0 then this command does nothing. .macro updatemoneybox disable=0 .byte 0x95 @@ -1196,10 +1197,10 @@ .byte \disable .endm - @ Gets the price reduction for the index given. - .macro getpokenewsactive index:req + @ Gets whether the effects of the specified PokeNews program are active. newsKind is a POKENEWS_* constant. + .macro getpokenewsactive newsKind:req .byte 0x96 - .2byte \index + .2byte \newsKind .endm @ Fades the screen to and from black and white. Modes are FADE_(TO/FROM)_(WHITE/BLACK) @@ -1215,14 +1216,18 @@ .byte \speed .endm - .macro setflashradius word:req + @ Sets the flash level. A level of 0 is fully bright, a level of 1 is the largest flash radius, a level + @ of 7 is the smallest flash radius, a level of 8 is fully black. + .macro setflashlevel level:req .byte 0x99 - .2byte \word + .2byte \level .endm - .macro animateflash byte:req + @ Animates the flash radius from its current size to the size it would be at the specified level. + @ Note that this does not actually change the current flash level. It's typically used just before a setflashlevel. + .macro animateflash level:req .byte 0x9a - .byte \byte + .byte \level .endm .macro messageautoscroll pointer:req @@ -1230,20 +1235,20 @@ .4byte \pointer .endm - @ Executes the specified field effect animation. + @ Executes the specified field effect animation (FLDEFF_*). .macro dofieldeffect animation:req .byte 0x9c .2byte \animation .endm - @ Sets up the field effect argument argument with the value value. - .macro setfieldeffectargument argument:req, param:req + @ Sets the field effect argument at index 'argNum' to 'value.' + .macro setfieldeffectargument argNum:req, value:req .byte 0x9d - .byte \argument - .2byte \param + .byte \argNum + .2byte \value .endm - @ Blocks script execution until all playing field move animations complete. + @ Blocks script execution until all playing field effect animations complete. .macro waitfieldeffect animation:req .byte 0x9e .2byte \animation @@ -1260,20 +1265,21 @@ .byte 0xa0 .endm - @ Plays the specified (species) Pokemon's cry. You can use waitmoncry to block script execution until the sound finishes. + @ Plays the cry of the given species. Mode is any CRY_MODE_* constant. + @ You can use waitmoncry to block script execution until the cry finishes. .macro playmoncry species:req, mode:req .byte 0xa1 .2byte \species .2byte \mode .endm - @ Changes the metatile at (x, y) on the current map. - .macro setmetatile x:req, y:req, metatile_number:req, has_collision:req + @ Set the metatile at (x, y) on the current map to the given metatile and impassability. + .macro setmetatile x:req, y:req, metatileId:req, impassable:req .byte 0xa2 .2byte \x .2byte \y - .2byte \metatile_number - .2byte \has_collision + .2byte \metatileId + .2byte \impassable .endm @ Queues a weather change to the default weather for the map. @@ -1292,7 +1298,7 @@ .byte 0xa5 .endm - @ This command manages cases in which maps have tiles that change state when stepped on (specifically, cracked/breakable floors). + @ Enables a function that gets called every step by Task_RunPerStepCallback. .macro setstepcallback subroutine:req .byte 0xa6 .byte \subroutine diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc index 7f0288e0c1..09d7584959 100644 --- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc @@ -13,11 +13,11 @@ AbandonedShip_Corridors_B1F_OnLoad: end AbandonedShip_Corridors_B1F_EventScript_LockStorageRoom:: - setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1 + setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE return AbandonedShip_Corridors_B1F_EventScript_UnlockStorageRoom:: - setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1 + setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE return AbandonedShip_Corridors_B1F_EventScript_TuberM:: diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc index cdc350f3e9..3a7bc77318 100644 --- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc @@ -19,35 +19,35 @@ AbandonedShip_HiddenFloorCorridors_OnLoad: end AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom1:: - setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1 + setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE return AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom2:: - setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1 + setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE return AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom4:: - setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Unlocked, 0 + setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Unlocked, FALSE return AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom6:: - setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Unlocked, 0 + setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Unlocked, FALSE return AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom1:: - setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1 + setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE return AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom2:: - setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1 + setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE return AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom4:: - setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Locked, 0 + setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Locked, FALSE return AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom6:: - setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Locked, 0 + setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Locked, FALSE return AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index f2e242bbd6..03070a731e 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -29,12 +29,12 @@ AncientTomb_OnLoad: end AncientTomb_EventScript_HideRegiEntrance:: - setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE return AncientTomb_EventScript_CaveEntranceMiddle:: diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 2023d44f59..5888c140d6 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -608,46 +608,46 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_StatusMon:: end BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesMostlyClosed:: - setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage1_Tile0, 1 - setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage1_Tile1, 1 - setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage1_Tile2, 1 - setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage1_Tile3, 1 - setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage1_Tile4, 1 - setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage1_Tile5, 0 - setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage1_Tile6, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage1_Tile0, TRUE + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage1_Tile1, TRUE + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage1_Tile2, TRUE + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage1_Tile3, TRUE + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage1_Tile4, TRUE + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage1_Tile5, FALSE + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage1_Tile6, TRUE special DrawWholeMapView return BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesLittleClosed:: - setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage2_Tile0, 1 - setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage2_Tile1, 1 - setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage2_Tile2, 1 - setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage2_Tile3, 1 - setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage2_Tile4, 1 - setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage2_Tile5, 0 - setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage2_Tile6, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage2_Tile0, TRUE + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage2_Tile1, TRUE + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage2_Tile2, TRUE + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage2_Tile3, TRUE + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage2_Tile4, TRUE + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage2_Tile5, FALSE + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage2_Tile6, TRUE special DrawWholeMapView return BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesOpen:: - setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage3_Tile0, 1 - setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage3_Tile1, 1 - setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage3_Tile2, 1 - setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage3_Tile3, 1 - setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage3_Tile4, 1 - setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage3_Tile5, 0 - setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage3_Tile6, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage3_Tile0, TRUE + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage3_Tile1, TRUE + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage3_Tile2, TRUE + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage3_Tile3, TRUE + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage3_Tile4, TRUE + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage3_Tile5, FALSE + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage3_Tile6, TRUE special DrawWholeMapView return BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesClosed:: - setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage0_Tile0, 1 - setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage0_Tile1, 1 - setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage0_Tile2, 1 - setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage0_Tile3, 1 - setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage0_Tile4, 1 - setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage0_Tile5, 0 - setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage0_Tile6, 1 + setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage0_Tile0, TRUE + setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage0_Tile1, TRUE + setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage0_Tile2, TRUE + setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage0_Tile3, TRUE + setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage0_Tile4, TRUE + setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage0_Tile5, FALSE + setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage0_Tile6, TRUE special DrawWholeMapView return diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc index 13abf70278..b4ddb0788b 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc @@ -8,13 +8,13 @@ BattleFrontier_BattleTowerCorridor_MapScripts:: BattleFrontier_BattleTowerCorridor_OnLoad: compare VAR_0x8006, 1 goto_if_eq BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor - setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, 0 - setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, 0 + setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE + setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE end BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor:: - setmetatile 15, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, 0 - setmetatile 15, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, 0 + setmetatile 15, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE + setmetatile 15, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE end BattleFrontier_BattleTowerCorridor_OnFrame: diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index 443915d7e2..0e7a3c2814 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -20,12 +20,12 @@ DesertRuins_OnLoad: end DesertRuins_EventScript_HideRegiEntrance:: - setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE return DesertRuins_OnTransition: diff --git a/data/maps/DewfordTown_Gym/scripts.inc b/data/maps/DewfordTown_Gym/scripts.inc index d2b51766af..355ca15f4d 100644 --- a/data/maps/DewfordTown_Gym/scripts.inc +++ b/data/maps/DewfordTown_Gym/scripts.inc @@ -3,57 +3,59 @@ DewfordTown_Gym_MapScripts:: .byte 0 DewfordTown_Gym_OnTransition: - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel end -DewfordTown_Gym_EventScript_SetFlashRadius:: +DewfordTown_Gym_EventScript_SetFlashLevel:: goto_if_defeated TRAINER_BRAWLY_1, DewfordTown_Gym_EventScript_SetLightsOn call DewfordTown_Gym_EventScript_CountTrainersDefeated copyvar VAR_0x8001, VAR_0x8000 compare VAR_0x8000, 0 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius7 + goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel7 compare VAR_0x8000, 1 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius6 + goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel6 compare VAR_0x8000, 2 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius5 + goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel5 compare VAR_0x8000, 3 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius4 + goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel4 compare VAR_0x8000, 4 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius3 + goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel3 compare VAR_0x8000, 5 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius2 - goto DewfordTown_Gym_EventScript_SetFlashRadius1 + goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel2 + goto DewfordTown_Gym_EventScript_SetFlashLevel1 DewfordTown_Gym_EventScript_SetLightsOn:: - setflashradius 0 + setflashlevel 0 return -DewfordTown_Gym_EventScript_SetFlashRadius1:: - setflashradius 1 +@ Brightest +DewfordTown_Gym_EventScript_SetFlashLevel1:: + setflashlevel 1 return -DewfordTown_Gym_EventScript_SetFlashRadius2:: - setflashradius 2 +DewfordTown_Gym_EventScript_SetFlashLevel2:: + setflashlevel 2 return -DewfordTown_Gym_EventScript_SetFlashRadius3:: - setflashradius 3 +DewfordTown_Gym_EventScript_SetFlashLevel3:: + setflashlevel 3 return -DewfordTown_Gym_EventScript_SetFlashRadius4:: - setflashradius 4 +DewfordTown_Gym_EventScript_SetFlashLevel4:: + setflashlevel 4 return -DewfordTown_Gym_EventScript_SetFlashRadius5:: - setflashradius 5 +DewfordTown_Gym_EventScript_SetFlashLevel5:: + setflashlevel 5 return -DewfordTown_Gym_EventScript_SetFlashRadius6:: - setflashradius 6 +DewfordTown_Gym_EventScript_SetFlashLevel6:: + setflashlevel 6 return -DewfordTown_Gym_EventScript_SetFlashRadius7:: - setflashradius 7 +@ Darkest +DewfordTown_Gym_EventScript_SetFlashLevel7:: + setflashlevel 7 return DewfordTown_Gym_EventScript_BrightenRoom:: @@ -82,43 +84,43 @@ DewfordTown_Gym_EventScript_NoLightChange:: DewfordTown_Gym_EventScript_AnimateFlash1Trainer:: playse SE_SWITCH animateflash 6 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash2Trainers:: playse SE_SWITCH animateflash 5 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash3Trainers:: playse SE_SWITCH animateflash 4 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash4Trainers:: playse SE_SWITCH animateflash 3 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash5Trainers:: playse SE_SWITCH animateflash 2 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlash6Trainers:: playse SE_SWITCH animateflash 1 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_AnimateFlashFullBrightness:: playse SE_SWITCH animateflash 0 - call DewfordTown_Gym_EventScript_SetFlashRadius + call DewfordTown_Gym_EventScript_SetFlashLevel return DewfordTown_Gym_EventScript_CountTrainersDefeated:: diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index d169371517..d33c57df86 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -50,8 +50,8 @@ EverGrandeCity_ChampionsRoom_EventScript_Wallace:: EverGrandeCity_ChampionsRoom_EventScript_Defeated:: playse SE_DOOR - setmetatile 6, 1, METATILE_EliteFour_OpenDoorChampion_Frame, 0 - setmetatile 6, 2, METATILE_EliteFour_OpenDoorChampion_Opening, 0 + setmetatile 6, 1, METATILE_EliteFour_OpenDoorChampion_Frame, FALSE + setmetatile 6, 2, METATILE_EliteFour_OpenDoorChampion_Opening, FALSE special DrawWholeMapView msgbox EverGrandeCity_ChampionsRoom_Text_PostBattleSpeech, MSGBOX_DEFAULT closemessage diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc index 472e27e36f..5152794498 100644 --- a/data/maps/InsideOfTruck/scripts.inc +++ b/data/maps/InsideOfTruck/scripts.inc @@ -4,9 +4,9 @@ InsideOfTruck_MapScripts:: .byte 0 InsideOfTruck_OnLoad: - setmetatile 4, 1, METATILE_InsideOfTruck_ExitLight_Top, 0 - setmetatile 4, 2, METATILE_InsideOfTruck_ExitLight_Mid, 0 - setmetatile 4, 3, METATILE_InsideOfTruck_ExitLight_Bottom, 0 + setmetatile 4, 1, METATILE_InsideOfTruck_ExitLight_Top, FALSE + setmetatile 4, 2, METATILE_InsideOfTruck_ExitLight_Mid, FALSE + setmetatile 4, 3, METATILE_InsideOfTruck_ExitLight_Bottom, FALSE end InsideOfTruck_OnResume: diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index d660aadf06..83e4d015a6 100644 --- a/data/maps/IslandCave/scripts.inc +++ b/data/maps/IslandCave/scripts.inc @@ -20,12 +20,12 @@ IslandCave_OnLoad: end IslandCave_EventScript_HideRegiEntrance:: - setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 - setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE return IslandCave_OnTransition: @@ -39,12 +39,12 @@ IslandCave_EventScript_ShowRegice:: return IslandCave_EventScript_OpenRegiEntrance:: - setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, 1 - setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, 1 - setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, 1 - setmetatile 7, 20, METATILE_Cave_SealedChamberEntrance_BottomLeft, 1 - setmetatile 8, 20, METATILE_Cave_SealedChamberEntrance_BottomMid, 0 - setmetatile 9, 20, METATILE_Cave_SealedChamberEntrance_BottomRight, 1 + setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, TRUE + setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, TRUE + setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, TRUE + setmetatile 7, 20, METATILE_Cave_SealedChamberEntrance_BottomLeft, TRUE + setmetatile 8, 20, METATILE_Cave_SealedChamberEntrance_BottomMid, FALSE + setmetatile 9, 20, METATILE_Cave_SealedChamberEntrance_BottomRight, TRUE special DrawWholeMapView playse SE_BANG setflag FLAG_SYS_BRAILLE_REGICE_COMPLETED diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index 3ab8969135..18a8c29994 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -38,8 +38,8 @@ JaggedPass_OnLoad: end JaggedPass_EventScript_ConcealHideoutEntrance:: - setmetatile 16, 17, METATILE_Lavaridge_RockWall, 1 - setmetatile 16, 18, METATILE_Lavaridge_RockWall, 1 + setmetatile 16, 17, METATILE_Lavaridge_RockWall, TRUE + setmetatile 16, 18, METATILE_Lavaridge_RockWall, TRUE end JaggedPass_EventScript_OpenMagmaHideout:: @@ -59,8 +59,8 @@ JaggedPass_EventScript_OpenMagmaHideout:: special ShakeCamera waitstate playse SE_EFFECTIVE - setmetatile 16, 17, METATILE_Lavaridge_CaveEntrance_Top, 1 - setmetatile 16, 18, METATILE_Lavaridge_CaveEntrance_Bottom, 0 + setmetatile 16, 17, METATILE_Lavaridge_CaveEntrance_Top, TRUE + setmetatile 16, 18, METATILE_Lavaridge_CaveEntrance_Bottom, FALSE special DrawWholeMapView delay 30 setvar VAR_JAGGED_PASS_STATE, 2 diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index eb3f140a86..648aae5642 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -19,18 +19,18 @@ LilycoveCity_OnLoad: end LilycoveCity_EventScript_SetWailmerMetatiles:: - setmetatile 76, 12, METATILE_Lilycove_Wailmer0, 1 - setmetatile 77, 12, METATILE_Lilycove_Wailmer1, 1 - setmetatile 76, 13, METATILE_Lilycove_Wailmer2, 1 - setmetatile 77, 13, METATILE_Lilycove_Wailmer3, 1 - setmetatile 76, 14, METATILE_Lilycove_Wailmer0_Alt, 1 - setmetatile 77, 14, METATILE_Lilycove_Wailmer1_Alt, 1 - setmetatile 76, 15, METATILE_Lilycove_Wailmer2, 1 - setmetatile 77, 15, METATILE_Lilycove_Wailmer3, 1 - setmetatile 77, 16, METATILE_Lilycove_Wailmer0_Alt, 1 - setmetatile 78, 16, METATILE_Lilycove_Wailmer1_Alt, 1 - setmetatile 77, 17, METATILE_Lilycove_Wailmer2, 1 - setmetatile 78, 17, METATILE_Lilycove_Wailmer3, 1 + setmetatile 76, 12, METATILE_Lilycove_Wailmer0, TRUE + setmetatile 77, 12, METATILE_Lilycove_Wailmer1, TRUE + setmetatile 76, 13, METATILE_Lilycove_Wailmer2, TRUE + setmetatile 77, 13, METATILE_Lilycove_Wailmer3, TRUE + setmetatile 76, 14, METATILE_Lilycove_Wailmer0_Alt, TRUE + setmetatile 77, 14, METATILE_Lilycove_Wailmer1_Alt, TRUE + setmetatile 76, 15, METATILE_Lilycove_Wailmer2, TRUE + setmetatile 77, 15, METATILE_Lilycove_Wailmer3, TRUE + setmetatile 77, 16, METATILE_Lilycove_Wailmer0_Alt, TRUE + setmetatile 78, 16, METATILE_Lilycove_Wailmer1_Alt, TRUE + setmetatile 77, 17, METATILE_Lilycove_Wailmer2, TRUE + setmetatile 78, 17, METATILE_Lilycove_Wailmer3, TRUE return LilycoveCity_EventScript_BerryGentleman:: diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 6dbd1eb842..fc5ea1d7a8 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -418,14 +418,14 @@ LilycoveCity_ContestLobby_EventScript_LeadToContestHall:: applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistApproachCounter waitmovement 0 playse SE_BRIDGE_WALK - setmetatile 12, 2, METATILE_Contest_WallShadow, 1 - setmetatile 12, 3, METATILE_Contest_FloorShadow, 1 + setmetatile 12, 2, METATILE_Contest_WallShadow, TRUE + setmetatile 12, 3, METATILE_Contest_FloorShadow, TRUE special DrawWholeMapView applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistExitCounter waitmovement 0 playse SE_BRIDGE_WALK - setmetatile 12, 2, METATILE_Contest_CounterFlap_Top, 1 - setmetatile 12, 3, METATILE_Contest_CounterFlap_Bottom, 1 + setmetatile 12, 2, METATILE_Contest_CounterFlap_Top, TRUE + setmetatile 12, 3, METATILE_Contest_CounterFlap_Bottom, TRUE special DrawWholeMapView delay 20 applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistFacePlayer @@ -939,14 +939,14 @@ LilycoveCity_ContestLobby_EventScript_LeadToLinkContestHall:: applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistApproachCounter waitmovement 0 playse SE_BRIDGE_WALK - setmetatile 17, 2, METATILE_Contest_WallShadow, 1 - setmetatile 17, 3, METATILE_Contest_FloorShadow, 1 + setmetatile 17, 2, METATILE_Contest_WallShadow, TRUE + setmetatile 17, 3, METATILE_Contest_FloorShadow, TRUE special DrawWholeMapView applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistExitCounter waitmovement 0 playse SE_BRIDGE_WALK - setmetatile 17, 2, METATILE_Contest_CounterFlap_Top, 1 - setmetatile 17, 3, METATILE_Contest_CounterFlap_Bottom, 1 + setmetatile 17, 2, METATILE_Contest_CounterFlap_Top, TRUE + setmetatile 17, 3, METATILE_Contest_CounterFlap_Bottom, TRUE special DrawWholeMapView delay 20 applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistFacePlayer diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index 929bba3e17..bf220b04f9 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -30,32 +30,32 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_CheckToughPainting:: end LilycoveCity_LilycoveMuseum_2F_EventScript_SetCoolPainting:: - setmetatile 10, 6, METATILE_LilycoveMuseum_Painting2_Left, 1 - setmetatile 11, 6, METATILE_LilycoveMuseum_Painting2_Right, 1 + setmetatile 10, 6, METATILE_LilycoveMuseum_Painting2_Left, TRUE + setmetatile 11, 6, METATILE_LilycoveMuseum_Painting2_Right, TRUE goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckBeautyPainting end LilycoveCity_LilycoveMuseum_2F_EventScript_SetBeautyPainting:: - setmetatile 18, 6, METATILE_LilycoveMuseum_Painting1_Left, 1 - setmetatile 19, 6, METATILE_LilycoveMuseum_Painting1_Right, 1 + setmetatile 18, 6, METATILE_LilycoveMuseum_Painting1_Left, TRUE + setmetatile 19, 6, METATILE_LilycoveMuseum_Painting1_Right, TRUE goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckCutePainting end LilycoveCity_LilycoveMuseum_2F_EventScript_SetCutePainting:: - setmetatile 14, 10, METATILE_LilycoveMuseum_Painting3_Left, 1 - setmetatile 15, 10, METATILE_LilycoveMuseum_Painting3_Right, 1 + setmetatile 14, 10, METATILE_LilycoveMuseum_Painting3_Left, TRUE + setmetatile 15, 10, METATILE_LilycoveMuseum_Painting3_Right, TRUE goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckSmartPainting end LilycoveCity_LilycoveMuseum_2F_EventScript_SetSmartPainting:: - setmetatile 6, 10, METATILE_LilycoveMuseum_Painting0_Left, 1 - setmetatile 7, 10, METATILE_LilycoveMuseum_Painting0_Right, 1 + setmetatile 6, 10, METATILE_LilycoveMuseum_Painting0_Left, TRUE + setmetatile 7, 10, METATILE_LilycoveMuseum_Painting0_Right, TRUE goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckToughPainting end LilycoveCity_LilycoveMuseum_2F_EventScript_SetToughPainting:: - setmetatile 2, 6, METATILE_LilycoveMuseum_Painting4_Left, 1 - setmetatile 3, 6, METATILE_LilycoveMuseum_Painting4_Right, 1 + setmetatile 2, 6, METATILE_LilycoveMuseum_Painting4_Left, TRUE + setmetatile 3, 6, METATILE_LilycoveMuseum_Painting4_Right, TRUE end LilycoveCity_LilycoveMuseum_2F_OnFrame: diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index 95399eaeaa..15bd96f253 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -15,8 +15,8 @@ LittlerootTown_BrendansHouse_1F_OnLoad: end LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes:: - setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 - setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 + setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, TRUE + setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, TRUE return LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual:: @@ -26,7 +26,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual:: return LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual:: - setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 + setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, TRUE return LittlerootTown_BrendansHouse_1F_OnTransition: diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index 2a73a94c8f..b022402d05 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -15,8 +15,8 @@ LittlerootTown_MaysHouse_1F_OnLoad: end LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes:: - setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 - setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 + setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, TRUE + setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, TRUE return LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual:: @@ -26,7 +26,7 @@ LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual:: return LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual:: - setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 + setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, TRUE return LittlerootTown_MaysHouse_1F_OnTransition: diff --git a/data/maps/MauvilleCity_Gym/scripts.inc b/data/maps/MauvilleCity_Gym/scripts.inc index 3c09ecfa20..d446e44b9a 100644 --- a/data/maps/MauvilleCity_Gym/scripts.inc +++ b/data/maps/MauvilleCity_Gym/scripts.inc @@ -17,32 +17,32 @@ MauvilleCity_Gym_EventScript_UpdateBarriers:: end MauvilleCity_Gym_EventScript_SetAltBarriers:: - setmetatile 3, 11, METATILE_MauvilleGym_RedBeamV1_On, 1 - setmetatile 3, 12, METATILE_MauvilleGym_RedBeamV2_On, 1 - setmetatile 3, 13, METATILE_MauvilleGym_PoleTop_On, 1 - setmetatile 4, 10, METATILE_MauvilleGym_RedBeamH1_On, 0 - setmetatile 5, 10, METATILE_MauvilleGym_RedBeamH2_On, 0 - setmetatile 4, 11, METATILE_MauvilleGym_RedBeamH3_On, 1 - setmetatile 5, 11, METATILE_MauvilleGym_RedBeamH4_On, 1 - setmetatile 7, 10, METATILE_MauvilleGym_RedBeamH1_On, 0 - setmetatile 8, 10, METATILE_MauvilleGym_RedBeamH2_On, 0 - setmetatile 7, 11, METATILE_MauvilleGym_RedBeamH3_On, 1 - setmetatile 8, 11, METATILE_MauvilleGym_RedBeamH4_On, 1 - setmetatile 4, 13, METATILE_MauvilleGym_GreenBeamH1_Off, 0 - setmetatile 5, 13, METATILE_MauvilleGym_GreenBeamH2_Off, 0 - setmetatile 4, 14, METATILE_MauvilleGym_GreenBeamH3_Off, 0 - setmetatile 5, 14, METATILE_MauvilleGym_GreenBeamH4_Off, 0 - setmetatile 1, 10, METATILE_MauvilleGym_GreenBeamH1_Off, 0 - setmetatile 2, 10, METATILE_MauvilleGym_GreenBeamH2_Off, 0 - setmetatile 1, 11, METATILE_MauvilleGym_GreenBeamH3_Off, 0 - setmetatile 2, 11, METATILE_MauvilleGym_GreenBeamH4_Off, 0 - setmetatile 6, 8, METATILE_MauvilleGym_PoleBottom_On, 1 - setmetatile 6, 9, METATILE_MauvilleGym_FloorTile, 0 - setmetatile 6, 10, METATILE_MauvilleGym_PoleTop_Off, 0 - setmetatile 4, 6, METATILE_MauvilleGym_GreenBeamH1_Off, 0 - setmetatile 5, 6, METATILE_MauvilleGym_GreenBeamH2_Off, 0 - setmetatile 4, 7, METATILE_MauvilleGym_GreenBeamH3_Off, 0 - setmetatile 5, 7, METATILE_MauvilleGym_GreenBeamH4_Off, 0 + setmetatile 3, 11, METATILE_MauvilleGym_RedBeamV1_On, TRUE + setmetatile 3, 12, METATILE_MauvilleGym_RedBeamV2_On, TRUE + setmetatile 3, 13, METATILE_MauvilleGym_PoleTop_On, TRUE + setmetatile 4, 10, METATILE_MauvilleGym_RedBeamH1_On, FALSE + setmetatile 5, 10, METATILE_MauvilleGym_RedBeamH2_On, FALSE + setmetatile 4, 11, METATILE_MauvilleGym_RedBeamH3_On, TRUE + setmetatile 5, 11, METATILE_MauvilleGym_RedBeamH4_On, TRUE + setmetatile 7, 10, METATILE_MauvilleGym_RedBeamH1_On, FALSE + setmetatile 8, 10, METATILE_MauvilleGym_RedBeamH2_On, FALSE + setmetatile 7, 11, METATILE_MauvilleGym_RedBeamH3_On, TRUE + setmetatile 8, 11, METATILE_MauvilleGym_RedBeamH4_On, TRUE + setmetatile 4, 13, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE + setmetatile 5, 13, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE + setmetatile 4, 14, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE + setmetatile 5, 14, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE + setmetatile 1, 10, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE + setmetatile 2, 10, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE + setmetatile 1, 11, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE + setmetatile 2, 11, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE + setmetatile 6, 8, METATILE_MauvilleGym_PoleBottom_On, TRUE + setmetatile 6, 9, METATILE_MauvilleGym_FloorTile, FALSE + setmetatile 6, 10, METATILE_MauvilleGym_PoleTop_Off, FALSE + setmetatile 4, 6, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE + setmetatile 5, 6, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE + setmetatile 4, 7, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE + setmetatile 5, 7, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE end MauvilleCity_Gym_EventScript_Switch1Pressed:: diff --git a/data/maps/MeteorFalls_1F_1R/scripts.inc b/data/maps/MeteorFalls_1F_1R/scripts.inc index 23ae9728de..b81f5de267 100644 --- a/data/maps/MeteorFalls_1F_1R/scripts.inc +++ b/data/maps/MeteorFalls_1F_1R/scripts.inc @@ -13,10 +13,10 @@ MeteorFalls_1F_1R_OnLoad: end MeteorFalls_1F_1R_EventScript_OpenStevensCave:: - setmetatile 4, 1, METATILE_MeteorFalls_CaveEntrance_Top, 1 - setmetatile 3, 2, METATILE_MeteorFalls_CaveEntrance_Left, 1 - setmetatile 4, 2, METATILE_MeteorFalls_CaveEntrance_Bottom, 0 - setmetatile 5, 2, METATILE_MeteorFalls_CaveEntrance_Right, 1 + setmetatile 4, 1, METATILE_MeteorFalls_CaveEntrance_Top, TRUE + setmetatile 3, 2, METATILE_MeteorFalls_CaveEntrance_Left, TRUE + setmetatile 4, 2, METATILE_MeteorFalls_CaveEntrance_Bottom, FALSE + setmetatile 5, 2, METATILE_MeteorFalls_CaveEntrance_Right, TRUE return MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene:: diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index d6df2b3807..7b63de2e73 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -26,26 +26,26 @@ MossdeepCity_Gym_EventScript_CheckSwitch4:: @ All the below set metatile scripts are leftover from RS and are functionally unused MossdeepCity_Gym_EventScript_SetSwitch1Metatiles:: - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch2 end MossdeepCity_Gym_EventScript_SetSwitch2Metatiles:: - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch3 end MossdeepCity_Gym_EventScript_SetSwitch3Metatiles:: - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0 - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE + setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_CheckSwitch4 end MossdeepCity_Gym_EventScript_SetSwitch4Metatiles:: - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0 - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE + setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE end MossdeepCity_Gym_EventScript_TateAndLiza:: @@ -119,8 +119,8 @@ MossdeepCity_Gym_EventScript_Switch1:: setflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -134,8 +134,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch1:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, 0 - setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, 1 + setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE + setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -145,8 +145,8 @@ MossdeepCity_Gym_EventScript_Switch2:: setflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -154,8 +154,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch2:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, 0 - setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, 1 + setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, FALSE + setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -165,8 +165,8 @@ MossdeepCity_Gym_EventScript_Switch3:: setflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0 - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE + setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -174,8 +174,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch3:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, 1 + setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -185,8 +185,8 @@ MossdeepCity_Gym_EventScript_Switch4:: setflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0 - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1 + setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE + setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end @@ -194,8 +194,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch4:: clearflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse waitmovement 0 - setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, 0 - setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, 1 + setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE + setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, TRUE goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed end diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index b44b343a65..b7c08839e3 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -52,7 +52,7 @@ MossdeepCity_SpaceCenter_1F_OnLoad: end MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote:: - setmetatile 2, 5, METATILE_Facility_DataPad, 1 + setmetatile 2, 5, METATILE_Facility_DataPad, TRUE return MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounter:: diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index 22b26f3927..af7c601e00 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -12,7 +12,7 @@ MossdeepCity_StevensHouse_OnLoad: end MossdeepCity_StevensHouse_EventScript_HideStevensNote:: - setmetatile 6, 4, METATILE_GenericBuilding_TableEdge, 1 + setmetatile 6, 4, METATILE_GenericBuilding_TableEdge, TRUE return MossdeepCity_StevensHouse_OnTransition: diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 1304db3374..50582ce380 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -9,12 +9,12 @@ NewMauville_Entrance_OnLoad: end NewMauville_Entrance_EventScript_CloseDoor:: - setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, 1 - setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, 1 - setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, 1 - setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile3, 1 - setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile4, 1 - setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile5, 1 + setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, TRUE + setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, TRUE + setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, TRUE + setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile3, TRUE + setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile4, TRUE + setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile5, TRUE return NewMauville_Entrance_OnTransition: @@ -33,12 +33,12 @@ NewMauville_Entrance_EventScript_Door:: compare VAR_RESULT, NO goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor msgbox NewMauville_Entrance_Text_UsedBasementKey, MSGBOX_DEFAULT - setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, 0 - setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, 0 - setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, 0 - setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile3, 1 - setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile4, 0 - setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile5, 1 + setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, FALSE + setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, FALSE + setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, FALSE + setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile3, TRUE + setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile4, FALSE + setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile5, TRUE special DrawWholeMapView playse SE_BANG setvar VAR_NEW_MAUVILLE_STATE, 1 diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc index d924651cef..543b030e14 100644 --- a/data/maps/NewMauville_Inside/scripts.inc +++ b/data/maps/NewMauville_Inside/scripts.inc @@ -65,83 +65,83 @@ NewMauville_Inside_EventScript_GreenButton:: end NewMauville_Inside_EventScript_SetBarrierStateBlueButton:: - setmetatile 23, 34, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 23, 35, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 23, 36, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 23, 37, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 10, 16, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 10, 17, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 10, 18, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 10, 19, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 10, 0, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 10, 1, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 10, 2, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 10, 3, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 37, 33, METATILE_BikeShop_Barrier_Green_Top, 1 - setmetatile 37, 34, METATILE_BikeShop_Barrier_Green_TopMid, 1 - setmetatile 37, 35, METATILE_BikeShop_Barrier_Green_BottomMid, 1 - setmetatile 37, 36, METATILE_BikeShop_Barrier_Green_Bottom, 1 - setmetatile 28, 22, METATILE_BikeShop_Barrier_Green_Top, 1 - setmetatile 28, 23, METATILE_BikeShop_Barrier_Green_TopMid, 1 - setmetatile 28, 24, METATILE_BikeShop_Barrier_Green_BottomMid, 1 - setmetatile 28, 25, METATILE_BikeShop_Barrier_Green_Bottom, 1 - setmetatile 10, 24, METATILE_BikeShop_Barrier_Green_Top, 1 - setmetatile 10, 25, METATILE_BikeShop_Barrier_Green_TopMid, 1 - setmetatile 10, 26, METATILE_BikeShop_Barrier_Green_BottomMid, 1 - setmetatile 10, 27, METATILE_BikeShop_Barrier_Green_Bottom, 1 - setmetatile 21, 2, METATILE_BikeShop_Barrier_Green_Top, 1 - setmetatile 21, 3, METATILE_BikeShop_Barrier_Green_TopMid, 1 - setmetatile 21, 4, METATILE_BikeShop_Barrier_Green_BottomMid, 1 - setmetatile 21, 5, METATILE_BikeShop_Barrier_Green_Bottom, 1 - setmetatile 6, 11, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 13, 10, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 16, 22, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 4, 26, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 30, 38, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 2, 11, METATILE_BikeShop_Button_Green, 0 - setmetatile 17, 10, METATILE_BikeShop_Button_Green, 0 - setmetatile 25, 18, METATILE_BikeShop_Button_Green, 0 - setmetatile 18, 36, METATILE_BikeShop_Button_Green, 0 + setmetatile 23, 34, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 23, 35, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 23, 36, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 23, 37, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 10, 16, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 10, 17, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 10, 18, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 10, 19, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 10, 0, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 10, 1, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 10, 2, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 10, 3, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 37, 33, METATILE_BikeShop_Barrier_Green_Top, TRUE + setmetatile 37, 34, METATILE_BikeShop_Barrier_Green_TopMid, TRUE + setmetatile 37, 35, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE + setmetatile 37, 36, METATILE_BikeShop_Barrier_Green_Bottom, TRUE + setmetatile 28, 22, METATILE_BikeShop_Barrier_Green_Top, TRUE + setmetatile 28, 23, METATILE_BikeShop_Barrier_Green_TopMid, TRUE + setmetatile 28, 24, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE + setmetatile 28, 25, METATILE_BikeShop_Barrier_Green_Bottom, TRUE + setmetatile 10, 24, METATILE_BikeShop_Barrier_Green_Top, TRUE + setmetatile 10, 25, METATILE_BikeShop_Barrier_Green_TopMid, TRUE + setmetatile 10, 26, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE + setmetatile 10, 27, METATILE_BikeShop_Barrier_Green_Bottom, TRUE + setmetatile 21, 2, METATILE_BikeShop_Barrier_Green_Top, TRUE + setmetatile 21, 3, METATILE_BikeShop_Barrier_Green_TopMid, TRUE + setmetatile 21, 4, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE + setmetatile 21, 5, METATILE_BikeShop_Barrier_Green_Bottom, TRUE + setmetatile 6, 11, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 13, 10, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 16, 22, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 4, 26, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 30, 38, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 2, 11, METATILE_BikeShop_Button_Green, FALSE + setmetatile 17, 10, METATILE_BikeShop_Button_Green, FALSE + setmetatile 25, 18, METATILE_BikeShop_Button_Green, FALSE + setmetatile 18, 36, METATILE_BikeShop_Button_Green, FALSE return NewMauville_Inside_EventScript_SetBarrierStateGreenButton:: - setmetatile 23, 34, METATILE_BikeShop_Barrier_Blue_Top, 1 - setmetatile 23, 35, METATILE_BikeShop_Barrier_Blue_TopMid, 1 - setmetatile 23, 36, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 - setmetatile 23, 37, METATILE_BikeShop_Barrier_Blue_Bottom, 1 - setmetatile 10, 16, METATILE_BikeShop_Barrier_Blue_Top, 1 - setmetatile 10, 17, METATILE_BikeShop_Barrier_Blue_TopMid, 1 - setmetatile 10, 18, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 - setmetatile 10, 19, METATILE_BikeShop_Barrier_Blue_Bottom, 1 - setmetatile 10, 0, METATILE_BikeShop_Barrier_Blue_Top, 1 - setmetatile 10, 1, METATILE_BikeShop_Barrier_Blue_TopMid, 1 - setmetatile 10, 2, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 - setmetatile 10, 3, METATILE_BikeShop_Barrier_Blue_Bottom, 1 - setmetatile 37, 33, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 37, 34, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 37, 35, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 37, 36, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 28, 22, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 28, 23, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 28, 24, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 28, 25, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 10, 24, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 10, 25, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 10, 26, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 10, 27, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 21, 2, METATILE_BikeShop_Barrier_Hidden_Top, 1 - setmetatile 21, 3, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 - setmetatile 21, 4, METATILE_BikeShop_Floor_Shadow_Top, 0 - setmetatile 21, 5, METATILE_BikeShop_Wall_Edge_Top, 0 - setmetatile 2, 11, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 17, 10, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 25, 18, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 18, 36, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 6, 11, METATILE_BikeShop_Button_Blue, 0 - setmetatile 13, 10, METATILE_BikeShop_Button_Blue, 0 - setmetatile 16, 22, METATILE_BikeShop_Button_Blue, 0 - setmetatile 4, 26, METATILE_BikeShop_Button_Blue, 0 - setmetatile 30, 38, METATILE_BikeShop_Button_Blue, 0 + setmetatile 23, 34, METATILE_BikeShop_Barrier_Blue_Top, TRUE + setmetatile 23, 35, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE + setmetatile 23, 36, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE + setmetatile 23, 37, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE + setmetatile 10, 16, METATILE_BikeShop_Barrier_Blue_Top, TRUE + setmetatile 10, 17, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE + setmetatile 10, 18, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE + setmetatile 10, 19, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE + setmetatile 10, 0, METATILE_BikeShop_Barrier_Blue_Top, TRUE + setmetatile 10, 1, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE + setmetatile 10, 2, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE + setmetatile 10, 3, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE + setmetatile 37, 33, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 37, 34, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 37, 35, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 37, 36, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 28, 22, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 28, 23, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 28, 24, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 28, 25, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 10, 24, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 10, 25, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 10, 26, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 10, 27, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 21, 2, METATILE_BikeShop_Barrier_Hidden_Top, TRUE + setmetatile 21, 3, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE + setmetatile 21, 4, METATILE_BikeShop_Floor_Shadow_Top, FALSE + setmetatile 21, 5, METATILE_BikeShop_Wall_Edge_Top, FALSE + setmetatile 2, 11, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 17, 10, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 25, 18, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 18, 36, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 6, 11, METATILE_BikeShop_Button_Blue, FALSE + setmetatile 13, 10, METATILE_BikeShop_Button_Blue, FALSE + setmetatile 16, 22, METATILE_BikeShop_Button_Blue, FALSE + setmetatile 4, 26, METATILE_BikeShop_Button_Blue, FALSE + setmetatile 30, 38, METATILE_BikeShop_Button_Blue, FALSE return NewMauville_Inside_EventScript_RedButton:: @@ -153,15 +153,15 @@ NewMauville_Inside_EventScript_RedButton:: end NewMauville_Inside_EventScript_SetGeneratorOffMetatiles:: - setmetatile 33, 6, METATILE_BikeShop_Button_Pressed, 0 - setmetatile 32, 2, METATILE_BikeShop_Generator_Off_Tile0, 1 - setmetatile 33, 2, METATILE_BikeShop_Generator_Off_Tile1, 1 - setmetatile 34, 2, METATILE_BikeShop_Generator_Off_Tile2, 1 - setmetatile 35, 2, METATILE_BikeShop_Generator_Off_Tile3, 1 - setmetatile 32, 3, METATILE_BikeShop_Generator_Off_Tile4, 1 - setmetatile 33, 3, METATILE_BikeShop_Generator_Off_Tile5, 1 - setmetatile 34, 3, METATILE_BikeShop_Generator_Off_Tile6, 1 - setmetatile 35, 3, METATILE_BikeShop_Generator_Off_Tile7, 1 + setmetatile 33, 6, METATILE_BikeShop_Button_Pressed, FALSE + setmetatile 32, 2, METATILE_BikeShop_Generator_Off_Tile0, TRUE + setmetatile 33, 2, METATILE_BikeShop_Generator_Off_Tile1, TRUE + setmetatile 34, 2, METATILE_BikeShop_Generator_Off_Tile2, TRUE + setmetatile 35, 2, METATILE_BikeShop_Generator_Off_Tile3, TRUE + setmetatile 32, 3, METATILE_BikeShop_Generator_Off_Tile4, TRUE + setmetatile 33, 3, METATILE_BikeShop_Generator_Off_Tile5, TRUE + setmetatile 34, 3, METATILE_BikeShop_Generator_Off_Tile6, TRUE + setmetatile 35, 3, METATILE_BikeShop_Generator_Off_Tile7, TRUE special DrawWholeMapView return diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index 6c8da5847a..251f24aa6c 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -1138,51 +1138,51 @@ PetalburgCity_Gym_EventScript_OpenOHKORoomDoors:: return PetalburgCity_Gym_EventScript_SetEntranceRoomDoorMetatiles:: - setmetatile 6, 85, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 85, METATILE_PetalburgGym_RoomEntrance_Right, 0 - setmetatile 1, 98, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 98, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 85, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 85, METATILE_PetalburgGym_RoomEntrance_Right, FALSE + setmetatile 1, 98, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 98, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetSpeedRoomDoorMetatiles:: - setmetatile 6, 46, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 46, METATILE_PetalburgGym_RoomEntrance_Right, 0 - setmetatile 1, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 46, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 46, METATILE_PetalburgGym_RoomEntrance_Right, FALSE + setmetatile 1, 59, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 59, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetAccuracyRoomDoorMetatiles:: - setmetatile 6, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0 - setmetatile 1, 72, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 72, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 59, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 59, METATILE_PetalburgGym_RoomEntrance_Right, FALSE + setmetatile 1, 72, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 72, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetConfusionRoomDoorMetatiles:: - setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetDefenseRoomDoorMetatiles:: - setmetatile 6, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0 - setmetatile 1, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 20, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 20, METATILE_PetalburgGym_RoomEntrance_Right, FALSE + setmetatile 1, 33, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 33, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetRecoveryRoomDoorMetatiles:: - setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetStrengthRoomDoorMetatiles:: - setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SetOHKORoomDoorMetatiles:: - setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0 - setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, FALSE + setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, FALSE return PetalburgCity_Gym_EventScript_SlideOpenRoomDoors:: diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index 4553f431c0..cf7bc72b51 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -15,8 +15,8 @@ Route103_OnLoad: end Route103_EventScript_OpenAlteringCave:: - setmetatile 45, 5, METATILE_General_CaveEntrance_Top, 1 - setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, 0 + setmetatile 45, 5, METATILE_General_CaveEntrance_Top, TRUE + setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, FALSE return Route103_EventScript_Rival:: diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc index b60cd181fa..2184edf5ad 100644 --- a/data/maps/Route105/scripts.inc +++ b/data/maps/Route105/scripts.inc @@ -13,8 +13,8 @@ Route105_OnLoad: end Route105_CloseRegiEntrance:: - setmetatile 9, 19, METATILE_General_RockWall_RockBase, 1 - setmetatile 9, 20, METATILE_General_RockWall_SandBase, 1 + setmetatile 9, 19, METATILE_General_RockWall_RockBase, TRUE + setmetatile 9, 20, METATILE_General_RockWall_SandBase, TRUE return Route105_OnTransition: diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc index f30d74f01c..116c3a4feb 100644 --- a/data/maps/Route110_TrickHouseEnd/scripts.inc +++ b/data/maps/Route110_TrickHouseEnd/scripts.inc @@ -39,7 +39,7 @@ Route110_TrickHouseEnd_EventScript_CloseDoor:: end Route110_TrickHouseEnd_EventScript_SetDoorClosedMetatile:: - setmetatile 10, 1, METATILE_GenericBuilding_TrickHouse_Door_Closed, 1 + setmetatile 10, 1, METATILE_GenericBuilding_TrickHouse_Door_Closed, TRUE return Route110_TrickHouseEnd_EventScript_TrickMaster:: diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index ef8e45b45e..a0250c44ce 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -512,7 +512,7 @@ Route110_TrickHouseEntrance_EventScript_GoInHolePrompt:: end Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom:: - setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, 0 + setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, FALSE special DrawWholeMapView delay 20 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkUp @@ -618,7 +618,7 @@ Route110_TrickHousePuzzle1_EventScript_Door:: msgbox Route110_TrickHousePuzzle1_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end @@ -629,7 +629,7 @@ Route110_TrickHousePuzzle2_EventScript_Door:: msgbox Route110_TrickHousePuzzle2_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_2_STATE, 2 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end @@ -640,7 +640,7 @@ Route110_TrickHousePuzzle3_EventScript_Door:: msgbox Route110_TrickHousePuzzle3_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_3_STATE, 2 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end @@ -651,7 +651,7 @@ Route110_TrickHousePuzzle4_EventScript_Door:: msgbox Route110_TrickHousePuzzle4_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_4_STATE, 2 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end @@ -662,7 +662,7 @@ Route110_TrickHousePuzzle5_EventScript_Door:: msgbox Route110_TrickHousePuzzle5_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_5_STATE, 2 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end @@ -673,7 +673,7 @@ Route110_TrickHousePuzzle6_EventScript_Door:: msgbox Route110_TrickHousePuzzle6_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_6_STATE, 2 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end @@ -684,7 +684,7 @@ Route110_TrickHousePuzzle7_EventScript_Door:: msgbox Route110_TrickHousePuzzle7_EventScript_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 2 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end @@ -695,7 +695,7 @@ Route110_TrickHousePuzzle8_EventScript_Door:: msgbox Route110_TrickHousePuzzle8_EventScript_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_8_STATE, 2 - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE special DrawWholeMapView releaseall end diff --git a/data/maps/Route110_TrickHousePuzzle1/scripts.inc b/data/maps/Route110_TrickHousePuzzle1/scripts.inc index 6fc6adcd56..920a43819f 100644 --- a/data/maps/Route110_TrickHousePuzzle1/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle1/scripts.inc @@ -8,7 +8,7 @@ Route110_TrickHousePuzzle1_OnLoad: end Route110_TrickHousePuzzle1_EventScript_OpenDoor:: - setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE end Route110_TrickHousePuzzle1_EventScript_Scroll:: diff --git a/data/maps/Route110_TrickHousePuzzle2/scripts.inc b/data/maps/Route110_TrickHousePuzzle2/scripts.inc index a0222733a9..4e8c52cf4a 100644 --- a/data/maps/Route110_TrickHousePuzzle2/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle2/scripts.inc @@ -70,23 +70,23 @@ Route110_TrickHousePuzzle2_EventScript_Button4:: end Route110_TrickHousePuzzle2_EventScript_PressButton1:: - setmetatile 11, 12, METATILE_TrickHousePuzzle_Button_Pressed, 0 - setmetatile 1, 13, METATILE_TrickHousePuzzle_Door_Shuttered, 0 + setmetatile 11, 12, METATILE_TrickHousePuzzle_Button_Pressed, FALSE + setmetatile 1, 13, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE return Route110_TrickHousePuzzle2_EventScript_PressButton2:: - setmetatile 0, 4, METATILE_TrickHousePuzzle_Button_Pressed, 0 - setmetatile 5, 6, METATILE_TrickHousePuzzle_Door_Shuttered, 0 + setmetatile 0, 4, METATILE_TrickHousePuzzle_Button_Pressed, FALSE + setmetatile 5, 6, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE return Route110_TrickHousePuzzle2_EventScript_PressButton3:: - setmetatile 14, 5, METATILE_TrickHousePuzzle_Button_Pressed, 0 - setmetatile 7, 15, METATILE_TrickHousePuzzle_Door_Shuttered, 0 + setmetatile 14, 5, METATILE_TrickHousePuzzle_Button_Pressed, FALSE + setmetatile 7, 15, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE return Route110_TrickHousePuzzle2_EventScript_PressButton4:: - setmetatile 7, 11, METATILE_TrickHousePuzzle_Button_Pressed, 0 - setmetatile 14, 12, METATILE_TrickHousePuzzle_Door_Shuttered, 0 + setmetatile 7, 11, METATILE_TrickHousePuzzle_Button_Pressed, FALSE + setmetatile 14, 12, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE return Route110_TrickHousePuzzle2_EventScript_Ted:: diff --git a/data/maps/Route110_TrickHousePuzzle3/scripts.inc b/data/maps/Route110_TrickHousePuzzle3/scripts.inc index 4e706268c0..2b732124fb 100644 --- a/data/maps/Route110_TrickHousePuzzle3/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle3/scripts.inc @@ -21,10 +21,10 @@ Route110_TrickHousePuzzle3_OnTransition: end Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles:: - setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Up, 0 - setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, 0 - setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, 0 - setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Up, FALSE + setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, FALSE + setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, FALSE + setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, FALSE compare VAR_TEMP_8, 1 call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile compare VAR_TEMP_8, 2 @@ -36,173 +36,173 @@ Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles:: return Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile:: - setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Pressed, FALSE return Route110_TrickHousePuzzle3_EventScript_PressedButton2Metatile:: - setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Pressed, FALSE return Route110_TrickHousePuzzle3_EventScript_PressedButton3Metatile:: - setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Pressed, FALSE return Route110_TrickHousePuzzle3_EventScript_PressedButton4Metatile:: - setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Pressed, FALSE return Route110_TrickHousePuzzle3_EventScript_SetDoorsState0:: - setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 - setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 - setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 - setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 - setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 3, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 3, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 6, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 9, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 - setmetatile 12, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 - setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 - setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 - setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 - setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 - setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 - setmetatile 3, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 - setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 - setmetatile 9, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE + setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE + setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE + setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE + setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 3, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 3, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 6, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 9, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE + setmetatile 12, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE + setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE + setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE + setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE + setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE + setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, TRUE + setmetatile 3, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, TRUE + setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, TRUE + setmetatile 9, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, TRUE return Route110_TrickHousePuzzle3_EventScript_SetDoorsState1:: - setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 - setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 - setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 - setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 - setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 3, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 3, 14, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 6, 5, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 9, 17, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 - setmetatile 12, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 - setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 - setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 - setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 - setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 - setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 - setmetatile 3, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 - setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 - setmetatile 9, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE + setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE + setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE + setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE + setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 3, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 3, 14, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 6, 5, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 9, 17, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE + setmetatile 12, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE + setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE + setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE + setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE + setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE + setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, TRUE + setmetatile 3, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, FALSE + setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Retracted, TRUE + setmetatile 9, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, FALSE return Route110_TrickHousePuzzle3_EventScript_Button1:: diff --git a/data/maps/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc index 1890eb2c48..473c39992a 100644 --- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc @@ -22,53 +22,53 @@ Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles:: @ Leftover from R/S, none of the below metatile scripts are ever called Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOn:: - setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 - setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE + setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOn:: - setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 - setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE + setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOn:: - setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 - setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE + setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOn:: - setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, 0 - setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, FALSE + setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOn:: - setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0 - setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, FALSE + setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOff:: - setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0 - setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, FALSE + setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOff:: - setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0 - setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, FALSE + setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOff:: - setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0 - setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, FALSE + setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOff:: - setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, 0 - setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, FALSE + setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOff:: - setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, 0 - setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, FALSE + setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, TRUE return Route110_TrickHousePuzzle7_OnTransition: diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 8b0ee51c42..2007c89f6c 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -20,30 +20,30 @@ Route111_OnLoad: end Route111_EventScript_CloseDesertRuins:: - setmetatile 29, 86, METATILE_General_RockWall_RockBase, 1 - setmetatile 29, 87, METATILE_General_RockWall_SandBase, 1 + setmetatile 29, 86, METATILE_General_RockWall_RockBase, TRUE + setmetatile 29, 87, METATILE_General_RockWall_SandBase, TRUE return @ Show Mirage Tower just prior to disintegration. Mirage Tower is otherwise handled by the map layout Route111_EventScript_ShowTemporaryMirageTower:: - setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, 0 - setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, 0 - setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, 0 - setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, 0 - setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, 0 - setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, 0 - setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, 0 - setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, 0 - setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, 0 - setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, 0 - setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, 0 - setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, 0 - setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, 0 - setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, 0 - setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, 0 - setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, 0 - setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, 0 - setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, 0 + setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, FALSE + setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, FALSE + setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, FALSE + setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, FALSE + setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, FALSE + setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, FALSE + setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, FALSE + setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, FALSE + setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, FALSE + setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, FALSE + setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, FALSE + setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, FALSE + setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, FALSE + setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, FALSE + setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, FALSE + setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, FALSE + setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, FALSE + setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, FALSE return Route111_OnTransition: diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc index a9bfc39b85..500e12beed 100644 --- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc +++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc @@ -19,8 +19,8 @@ Route114_FossilManiacsTunnel_OnLoad: end Route114_FossilManiacsTunnel_EventScript_CloseDesertUnderpass:: - setmetatile 6, 1, METATILE_Fallarbor_RedRockWall, 1 - setmetatile 6, 2, METATILE_Fallarbor_RedRockWall, 1 + setmetatile 6, 1, METATILE_Fallarbor_RedRockWall, TRUE + setmetatile 6, 2, METATILE_Fallarbor_RedRockWall, TRUE return Route114_FossilManiacsTunnel_EventScript_ManiacMentionCaveIn:: diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index 588fa17a0a..e286375921 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -49,15 +49,15 @@ Route120_OnLoad: end Route120_EventScript_CloseAncientTomb:: - setmetatile 7, 54, METATILE_General_RockWall_RockBase, 1 - setmetatile 7, 55, METATILE_General_RockWall_SandBase, 1 + setmetatile 7, 54, METATILE_General_RockWall_RockBase, TRUE + setmetatile 7, 55, METATILE_General_RockWall_SandBase, TRUE return Route120_EventScript_SetBridgeClearMetatiles:: - setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, 0 - setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, 0 - setmetatile 12, 17, METATILE_General_ReflectiveWater, 0 - setmetatile 13, 17, METATILE_General_ReflectiveWater, 0 + setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, FALSE + setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, FALSE + setmetatile 12, 17, METATILE_General_ReflectiveWater, FALSE + setmetatile 13, 17, METATILE_General_ReflectiveWater, FALSE return Route120_EventScript_SetBridgeKecleonMovement:: @@ -253,10 +253,10 @@ Route120_EventScript_StevenGiveDeconScope:: delay 15 removeobject LOCALID_STEVEN waitfieldeffect FLDEFF_NPCFLY_OUT - setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, 0 - setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, 0 - setmetatile 12, 17, METATILE_General_ReflectiveWater, 0 - setmetatile 13, 17, METATILE_General_ReflectiveWater, 0 + setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, FALSE + setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, FALSE + setmetatile 12, 17, METATILE_General_ReflectiveWater, FALSE + setmetatile 13, 17, METATILE_General_ReflectiveWater, FALSE special DrawWholeMapView release end diff --git a/data/maps/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc index 0a8c3aa4af..bf02c7fe37 100644 --- a/data/maps/SealedChamber_OuterRoom/scripts.inc +++ b/data/maps/SealedChamber_OuterRoom/scripts.inc @@ -18,12 +18,12 @@ SealedChamber_OuterRoom_OnLoad: end SealedChamber_OuterRoom_EventScript_CloseInnerRoomEntrance:: - setmetatile 9, 1, METATILE_Cave_EntranceCover, 1 - setmetatile 10, 1, METATILE_Cave_EntranceCover, 1 - setmetatile 11, 1, METATILE_Cave_EntranceCover, 1 - setmetatile 9, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 10, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 - setmetatile 11, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 9, 1, METATILE_Cave_EntranceCover, TRUE + setmetatile 10, 1, METATILE_Cave_EntranceCover, TRUE + setmetatile 11, 1, METATILE_Cave_EntranceCover, TRUE + setmetatile 9, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 10, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE + setmetatile 11, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE return SealedChamber_OuterRoom_EventScript_BrailleABC:: diff --git a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc index 9692d2f694..37b7beb041 100644 --- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc @@ -22,38 +22,38 @@ ShoalCave_LowTideInnerRoom_OnLoad: ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles:: goto_if_set FLAG_RECEIVED_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2 goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2 - setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Large, 1 + setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2:: goto_if_set FLAG_RECEIVED_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3 goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3 - setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Large, 1 + setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3:: goto_if_set FLAG_RECEIVED_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4 - setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Large, 1 + setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4:: goto_if_set FLAG_RECEIVED_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5 - setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Large, 1 + setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5:: goto_if_set FLAG_RECEIVED_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6 - setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Large, 1 + setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6 end ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6:: goto_if_set FLAG_RECEIVED_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatilesEnd - setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Large, 1 + setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE return ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatilesEnd:: @@ -65,7 +65,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell1:: giveitem ITEM_SHOAL_SHELL compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, 0 + setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_1 releaseall @@ -82,7 +82,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell2:: giveitem ITEM_SHOAL_SHELL compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, 0 + setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_2 releaseall @@ -94,7 +94,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell3:: giveitem ITEM_SHOAL_SHELL compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, 0 + setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_3 releaseall @@ -106,7 +106,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell4:: giveitem ITEM_SHOAL_SHELL compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, 0 + setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_4 releaseall @@ -118,7 +118,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalSalt1:: giveitem ITEM_SHOAL_SALT compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, 0 + setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_1 releaseall @@ -135,7 +135,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalSalt2:: giveitem ITEM_SHOAL_SALT compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, 0 + setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_2 releaseall diff --git a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc index d7937998ee..15dcd326db 100644 --- a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc @@ -8,7 +8,7 @@ ShoalCave_LowTideLowerRoom_OnLoad: ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatiles:: goto_if_set FLAG_RECEIVED_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatilesEnd - setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Large, 1 + setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE return ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatilesEnd:: @@ -20,7 +20,7 @@ ShoalCave_LowTideLowerRoom_EventScript_ShoalSalt4:: giveitem ITEM_SHOAL_SALT compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Small, 0 + setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_4 releaseall diff --git a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc index a778a18e11..f1a5b030b3 100644 --- a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc @@ -8,7 +8,7 @@ ShoalCave_LowTideStairsRoom_OnLoad: ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatiles:: goto_if_set FLAG_RECEIVED_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatilesEnd - setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Large, 1 + setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE return ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatilesEnd:: @@ -20,7 +20,7 @@ ShoalCave_LowTideStairsRoom_EventScript_ShoalSalt3:: giveitem ITEM_SHOAL_SALT compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull - setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, 0 + setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_3 releaseall diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc index 9ffcd2de73..89e71a1ce9 100644 --- a/data/maps/SkyPillar_Outside/scripts.inc +++ b/data/maps/SkyPillar_Outside/scripts.inc @@ -26,8 +26,8 @@ SkyPillar_Outside_OnLoad: end SkyPillar_Outside_EventScript_OpenDoor:: - setmetatile 14, 4, METATILE_Pacifidlog_SkyPillar_DoorOpen_Top, 0 - setmetatile 14, 5, METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom, 0 + setmetatile 14, 4, METATILE_Pacifidlog_SkyPillar_DoorOpen_Top, FALSE + setmetatile 14, 5, METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom, FALSE return SkyPillar_Outside_OnFrame: diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 0a2d4b4475..6ef5b7790e 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -34,19 +34,19 @@ SootopolisCity_EventScript_LegendariesNotArrived:: end SootopolisCity_EventScript_LockHouseDoors:: - setmetatile 9, 6, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 9, 17, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 9, 26, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 44, 17, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 8, 35, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 53, 28, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 45, 6, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 48, 25, METATILE_Sootopolis_Door_Closed, 1 - setmetatile 51, 36, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 9, 6, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 9, 17, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 9, 26, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 44, 17, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 8, 35, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 53, 28, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 45, 6, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 48, 25, METATILE_Sootopolis_Door_Closed, TRUE + setmetatile 51, 36, METATILE_Sootopolis_Door_Closed, TRUE return SootopolisCity_EventScript_LockGymDoor:: - setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, 1 + setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, TRUE return SootopolisCity_OnTransition: @@ -623,30 +623,30 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: end SootopolisCity_EventScript_SetRoughWater:: - setmetatile 27, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 28, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 29, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 30, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 27, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 28, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 29, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 30, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 27, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 28, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 29, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 30, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 32, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 33, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 34, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 35, 43, METATILE_Sootopolis_RoughWater, 0 - setmetatile 32, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 33, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 34, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 35, 44, METATILE_Sootopolis_RoughWater, 0 - setmetatile 32, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 33, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 34, 45, METATILE_Sootopolis_RoughWater, 0 - setmetatile 35, 45, METATILE_Sootopolis_RoughWater, 0 + setmetatile 27, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 28, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 29, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 30, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 27, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 28, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 29, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 30, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 27, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 28, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 29, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 30, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 32, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 33, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 34, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 35, 43, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 32, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 33, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 34, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 35, 44, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 32, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 33, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 34, 45, METATILE_Sootopolis_RoughWater, FALSE + setmetatile 35, 45, METATILE_Sootopolis_RoughWater, FALSE return SootopolisCity_Movement_RayquazaFlyOff: diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc index b20cf78887..4a21dcdcdb 100644 --- a/data/maps/SootopolisCity_Gym_1F/scripts.inc +++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc @@ -25,14 +25,14 @@ SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles:: goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstStairs compare VAR_ICE_STEP_COUNT, 67 goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs - setmetatile 8, 4, METATILE_SootopolisGym_Stairs, 0 - setmetatile 8, 5, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 4, METATILE_SootopolisGym_Stairs, FALSE + setmetatile 8, 5, METATILE_SootopolisGym_Stairs, FALSE SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs:: - setmetatile 8, 10, METATILE_SootopolisGym_Stairs, 0 - setmetatile 8, 11, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 10, METATILE_SootopolisGym_Stairs, FALSE + setmetatile 8, 11, METATILE_SootopolisGym_Stairs, FALSE SootopolisCity_Gym_1F_EventScript_OpenFirstStairs:: - setmetatile 8, 15, METATILE_SootopolisGym_Stairs, 0 - setmetatile 8, 16, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 15, METATILE_SootopolisGym_Stairs, FALSE + setmetatile 8, 16, METATILE_SootopolisGym_Stairs, FALSE SootopolisCity_Gym_1F_EventScript_StopCheckingStairs:: return diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index af4a4c1235..4c76ccb526 100644 --- a/data/maps/TrainerHill_Entrance/scripts.inc +++ b/data/maps/TrainerHill_Entrance/scripts.inc @@ -53,7 +53,7 @@ TrainerHill_Entrance_OnLoad: end TrainerHill_Entrance_EventScript_OpenCounterDoor:: - setmetatile 17, 10, METATILE_TrainerHill_GreenFloorTile, 0 + setmetatile 17, 10, METATILE_TrainerHill_GreenFloorTile, FALSE return TrainerHill_Entrance_OnFrame: @@ -67,7 +67,7 @@ TrainerHill_Entrance_EventScript_ExitElevator:: lockall applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerExitElevator waitmovement 0 - setmetatile 17, 10, METATILE_TrainerHill_CounterDoor, 1 + setmetatile 17, 10, METATILE_TrainerHill_CounterDoor, TRUE special DrawWholeMapView playse SE_CLICK waitse diff --git a/data/maps/Underwater_SeafloorCavern/scripts.inc b/data/maps/Underwater_SeafloorCavern/scripts.inc index c4931c1ad0..7f1231feff 100644 --- a/data/maps/Underwater_SeafloorCavern/scripts.inc +++ b/data/maps/Underwater_SeafloorCavern/scripts.inc @@ -18,18 +18,18 @@ Underwater_SeafloorCavern_OnLoad: end Underwater_SeafloorCavern_EventScript_SetSubmarineGoneMetatiles:: - setmetatile 5, 3, METATILE_Underwater_RockWall, 1 - setmetatile 6, 3, METATILE_Underwater_RockWall, 1 - setmetatile 7, 3, METATILE_Underwater_RockWall, 1 - setmetatile 8, 3, METATILE_Underwater_RockWall, 1 - setmetatile 5, 4, METATILE_Underwater_FloorShadow, 0 - setmetatile 6, 4, METATILE_Underwater_FloorShadow, 0 - setmetatile 7, 4, METATILE_Underwater_FloorShadow, 0 - setmetatile 8, 4, METATILE_Underwater_FloorShadow, 0 - setmetatile 5, 5, METATILE_Underwater_FloorShadow, 0 - setmetatile 6, 5, METATILE_Underwater_FloorShadow, 0 - setmetatile 7, 5, METATILE_Underwater_FloorShadow, 0 - setmetatile 8, 5, METATILE_Underwater_FloorShadow, 0 + setmetatile 5, 3, METATILE_Underwater_RockWall, TRUE + setmetatile 6, 3, METATILE_Underwater_RockWall, TRUE + setmetatile 7, 3, METATILE_Underwater_RockWall, TRUE + setmetatile 8, 3, METATILE_Underwater_RockWall, TRUE + setmetatile 5, 4, METATILE_Underwater_FloorShadow, FALSE + setmetatile 6, 4, METATILE_Underwater_FloorShadow, FALSE + setmetatile 7, 4, METATILE_Underwater_FloorShadow, FALSE + setmetatile 8, 4, METATILE_Underwater_FloorShadow, FALSE + setmetatile 5, 5, METATILE_Underwater_FloorShadow, FALSE + setmetatile 6, 5, METATILE_Underwater_FloorShadow, FALSE + setmetatile 7, 5, METATILE_Underwater_FloorShadow, FALSE + setmetatile 8, 5, METATILE_Underwater_FloorShadow, FALSE return Underwater_SeafloorCavern_OnResume: diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 322ac0bac1..f3afb2e431 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -153,11 +153,11 @@ gScriptCmdTable:: .4byte ScrCmd_getpokenewsactive @ 0x96 .4byte ScrCmd_fadescreen @ 0x97 .4byte ScrCmd_fadescreenspeed @ 0x98 - .4byte ScrCmd_setflashradius @ 0x99 + .4byte ScrCmd_setflashlevel @ 0x99 .4byte ScrCmd_animateflash @ 0x9a .4byte ScrCmd_messageautoscroll @ 0x9b .4byte ScrCmd_dofieldeffect @ 0x9c - .4byte ScrCmd_setfieldeffectarg @ 0x9d + .4byte ScrCmd_setfieldeffectargument @ 0x9d .4byte ScrCmd_waitfieldeffect @ 0x9e .4byte ScrCmd_setrespawn @ 0x9f .4byte ScrCmd_checkplayergender @ 0xa0 diff --git a/data/scripts/abnormal_weather.inc b/data/scripts/abnormal_weather.inc index bc4a867e33..c38982da8f 100644 --- a/data/scripts/abnormal_weather.inc +++ b/data/scripts/abnormal_weather.inc @@ -1,161 +1,161 @@ AbnormalWeather_EventScript_PlaceTilesRoute114North:: - setmetatile 7, 3, METATILE_Fallarbor_RedCaveEntrance_Top, 1 - setmetatile 7, 4, METATILE_Fallarbor_RedCaveEntrance_Bottom, 0 + setmetatile 7, 3, METATILE_Fallarbor_RedCaveEntrance_Top, TRUE + setmetatile 7, 4, METATILE_Fallarbor_RedCaveEntrance_Bottom, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute114South:: - setmetatile 6, 45, METATILE_Fallarbor_BrownCaveEntrance_Top, 1 - setmetatile 6, 46, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0 + setmetatile 6, 45, METATILE_Fallarbor_BrownCaveEntrance_Top, TRUE + setmetatile 6, 46, METATILE_Fallarbor_BrownCaveEntrance_Bottom, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute115West:: - setmetatile 21, 5, METATILE_Fallarbor_BrownCaveEntrance_Top, 1 - setmetatile 21, 6, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0 + setmetatile 21, 5, METATILE_Fallarbor_BrownCaveEntrance_Top, TRUE + setmetatile 21, 6, METATILE_Fallarbor_BrownCaveEntrance_Bottom, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute115East:: - setmetatile 36, 9, METATILE_Fallarbor_BrownCaveEntrance_Top, 1 - setmetatile 36, 10, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0 + setmetatile 36, 9, METATILE_Fallarbor_BrownCaveEntrance_Top, TRUE + setmetatile 36, 10, METATILE_Fallarbor_BrownCaveEntrance_Bottom, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute116North:: - setmetatile 59, 12, METATILE_General_CaveEntrance_Top, 1 - setmetatile 59, 13, METATILE_General_CaveEntrance_Bottom, 0 + setmetatile 59, 12, METATILE_General_CaveEntrance_Top, TRUE + setmetatile 59, 13, METATILE_General_CaveEntrance_Bottom, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute116South:: - setmetatile 79, 5, METATILE_General_CaveEntrance_Top, 1 - setmetatile 79, 6, METATILE_General_CaveEntrance_Bottom, 0 + setmetatile 79, 5, METATILE_General_CaveEntrance_Top, TRUE + setmetatile 79, 6, METATILE_General_CaveEntrance_Bottom, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute118East:: - setmetatile 42, 5, METATILE_General_CaveEntrance_Top, 1 - setmetatile 42, 6, METATILE_General_CaveEntrance_Bottom, 0 + setmetatile 42, 5, METATILE_General_CaveEntrance_Top, TRUE + setmetatile 42, 6, METATILE_General_CaveEntrance_Bottom, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute118West:: - setmetatile 9, 5, METATILE_General_CaveEntrance_Top, 1 - setmetatile 9, 6, METATILE_General_CaveEntrance_Bottom, 0 + setmetatile 9, 5, METATILE_General_CaveEntrance_Top, TRUE + setmetatile 9, 6, METATILE_General_CaveEntrance_Bottom, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute105North:: - setmetatile 10, 28, METATILE_General_RoughWater, 0 - setmetatile 11, 28, METATILE_General_RoughWater, 0 - setmetatile 9, 29, METATILE_General_RoughWater, 0 - setmetatile 10, 29, METATILE_General_RoughDeepWater, 0 - setmetatile 11, 29, METATILE_General_RoughDeepWater, 0 - setmetatile 12, 29, METATILE_General_RoughWater, 0 - setmetatile 9, 30, METATILE_General_RoughWater, 0 - setmetatile 10, 30, METATILE_General_RoughDeepWater, 0 - setmetatile 11, 30, METATILE_General_RoughDeepWater, 0 - setmetatile 12, 30, METATILE_General_RoughWater, 0 - setmetatile 10, 31, METATILE_General_RoughWater, 0 - setmetatile 11, 31, METATILE_General_RoughWater, 0 + setmetatile 10, 28, METATILE_General_RoughWater, FALSE + setmetatile 11, 28, METATILE_General_RoughWater, FALSE + setmetatile 9, 29, METATILE_General_RoughWater, FALSE + setmetatile 10, 29, METATILE_General_RoughDeepWater, FALSE + setmetatile 11, 29, METATILE_General_RoughDeepWater, FALSE + setmetatile 12, 29, METATILE_General_RoughWater, FALSE + setmetatile 9, 30, METATILE_General_RoughWater, FALSE + setmetatile 10, 30, METATILE_General_RoughDeepWater, FALSE + setmetatile 11, 30, METATILE_General_RoughDeepWater, FALSE + setmetatile 12, 30, METATILE_General_RoughWater, FALSE + setmetatile 10, 31, METATILE_General_RoughWater, FALSE + setmetatile 11, 31, METATILE_General_RoughWater, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute105South:: - setmetatile 20, 53, METATILE_General_RoughWater, 0 - setmetatile 21, 53, METATILE_General_RoughWater, 0 - setmetatile 19, 54, METATILE_General_RoughWater, 0 - setmetatile 20, 54, METATILE_General_RoughDeepWater, 0 - setmetatile 21, 54, METATILE_General_RoughDeepWater, 0 - setmetatile 22, 54, METATILE_General_RoughWater, 0 - setmetatile 19, 55, METATILE_General_RoughWater, 0 - setmetatile 20, 55, METATILE_General_RoughDeepWater, 0 - setmetatile 21, 55, METATILE_General_RoughDeepWater, 0 - setmetatile 22, 55, METATILE_General_RoughWater, 0 - setmetatile 20, 56, METATILE_General_RoughWater, 0 - setmetatile 21, 56, METATILE_General_RoughWater, 0 + setmetatile 20, 53, METATILE_General_RoughWater, FALSE + setmetatile 21, 53, METATILE_General_RoughWater, FALSE + setmetatile 19, 54, METATILE_General_RoughWater, FALSE + setmetatile 20, 54, METATILE_General_RoughDeepWater, FALSE + setmetatile 21, 54, METATILE_General_RoughDeepWater, FALSE + setmetatile 22, 54, METATILE_General_RoughWater, FALSE + setmetatile 19, 55, METATILE_General_RoughWater, FALSE + setmetatile 20, 55, METATILE_General_RoughDeepWater, FALSE + setmetatile 21, 55, METATILE_General_RoughDeepWater, FALSE + setmetatile 22, 55, METATILE_General_RoughWater, FALSE + setmetatile 20, 56, METATILE_General_RoughWater, FALSE + setmetatile 21, 56, METATILE_General_RoughWater, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute125West:: - setmetatile 8, 16, METATILE_General_RoughWater, 0 - setmetatile 9, 16, METATILE_General_RoughWater, 0 - setmetatile 7, 17, METATILE_General_RoughWater, 0 - setmetatile 8, 17, METATILE_General_RoughDeepWater, 0 - setmetatile 9, 17, METATILE_General_RoughDeepWater, 0 - setmetatile 10, 17, METATILE_General_RoughWater, 0 - setmetatile 7, 18, METATILE_General_RoughWater, 0 - setmetatile 8, 18, METATILE_General_RoughDeepWater, 0 - setmetatile 9, 18, METATILE_General_RoughDeepWater, 0 - setmetatile 10, 18, METATILE_General_RoughWater, 0 - setmetatile 8, 19, METATILE_General_RoughWater, 0 - setmetatile 9, 19, METATILE_General_RoughWater, 0 + setmetatile 8, 16, METATILE_General_RoughWater, FALSE + setmetatile 9, 16, METATILE_General_RoughWater, FALSE + setmetatile 7, 17, METATILE_General_RoughWater, FALSE + setmetatile 8, 17, METATILE_General_RoughDeepWater, FALSE + setmetatile 9, 17, METATILE_General_RoughDeepWater, FALSE + setmetatile 10, 17, METATILE_General_RoughWater, FALSE + setmetatile 7, 18, METATILE_General_RoughWater, FALSE + setmetatile 8, 18, METATILE_General_RoughDeepWater, FALSE + setmetatile 9, 18, METATILE_General_RoughDeepWater, FALSE + setmetatile 10, 18, METATILE_General_RoughWater, FALSE + setmetatile 8, 19, METATILE_General_RoughWater, FALSE + setmetatile 9, 19, METATILE_General_RoughWater, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute125East:: - setmetatile 53, 18, METATILE_General_RoughWater, 0 - setmetatile 54, 18, METATILE_General_RoughWater, 0 - setmetatile 52, 19, METATILE_General_RoughWater, 0 - setmetatile 53, 19, METATILE_General_RoughDeepWater, 0 - setmetatile 54, 19, METATILE_General_RoughDeepWater, 0 - setmetatile 55, 19, METATILE_General_RoughWater, 0 - setmetatile 52, 20, METATILE_General_RoughWater, 0 - setmetatile 53, 20, METATILE_General_RoughDeepWater, 0 - setmetatile 54, 20, METATILE_General_RoughDeepWater, 0 - setmetatile 55, 20, METATILE_General_RoughWater, 0 - setmetatile 53, 21, METATILE_General_RoughWater, 0 - setmetatile 54, 21, METATILE_General_RoughWater, 0 + setmetatile 53, 18, METATILE_General_RoughWater, FALSE + setmetatile 54, 18, METATILE_General_RoughWater, FALSE + setmetatile 52, 19, METATILE_General_RoughWater, FALSE + setmetatile 53, 19, METATILE_General_RoughDeepWater, FALSE + setmetatile 54, 19, METATILE_General_RoughDeepWater, FALSE + setmetatile 55, 19, METATILE_General_RoughWater, FALSE + setmetatile 52, 20, METATILE_General_RoughWater, FALSE + setmetatile 53, 20, METATILE_General_RoughDeepWater, FALSE + setmetatile 54, 20, METATILE_General_RoughDeepWater, FALSE + setmetatile 55, 20, METATILE_General_RoughWater, FALSE + setmetatile 53, 21, METATILE_General_RoughWater, FALSE + setmetatile 54, 21, METATILE_General_RoughWater, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute127North:: - setmetatile 57, 9, METATILE_General_RoughWater, 0 - setmetatile 58, 9, METATILE_General_RoughWater, 0 - setmetatile 56, 10, METATILE_General_RoughWater, 0 - setmetatile 57, 10, METATILE_General_RoughDeepWater, 0 - setmetatile 58, 10, METATILE_General_RoughDeepWater, 0 - setmetatile 59, 10, METATILE_General_RoughWater, 0 - setmetatile 56, 11, METATILE_General_RoughWater, 0 - setmetatile 57, 11, METATILE_General_RoughDeepWater, 0 - setmetatile 58, 11, METATILE_General_RoughDeepWater, 0 - setmetatile 59, 11, METATILE_General_RoughWater, 0 - setmetatile 57, 12, METATILE_General_RoughWater, 0 - setmetatile 58, 12, METATILE_General_RoughWater, 0 + setmetatile 57, 9, METATILE_General_RoughWater, FALSE + setmetatile 58, 9, METATILE_General_RoughWater, FALSE + setmetatile 56, 10, METATILE_General_RoughWater, FALSE + setmetatile 57, 10, METATILE_General_RoughDeepWater, FALSE + setmetatile 58, 10, METATILE_General_RoughDeepWater, FALSE + setmetatile 59, 10, METATILE_General_RoughWater, FALSE + setmetatile 56, 11, METATILE_General_RoughWater, FALSE + setmetatile 57, 11, METATILE_General_RoughDeepWater, FALSE + setmetatile 58, 11, METATILE_General_RoughDeepWater, FALSE + setmetatile 59, 11, METATILE_General_RoughWater, FALSE + setmetatile 57, 12, METATILE_General_RoughWater, FALSE + setmetatile 58, 12, METATILE_General_RoughWater, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute127South:: - setmetatile 61, 30, METATILE_General_RoughWater, 0 - setmetatile 62, 30, METATILE_General_RoughWater, 0 - setmetatile 60, 31, METATILE_General_RoughWater, 0 - setmetatile 61, 31, METATILE_General_RoughDeepWater, 0 - setmetatile 62, 31, METATILE_General_RoughDeepWater, 0 - setmetatile 63, 31, METATILE_General_RoughWater, 0 - setmetatile 60, 32, METATILE_General_RoughWater, 0 - setmetatile 61, 32, METATILE_General_RoughDeepWater, 0 - setmetatile 62, 32, METATILE_General_RoughDeepWater, 0 - setmetatile 63, 32, METATILE_General_RoughWater, 0 - setmetatile 61, 33, METATILE_General_RoughWater, 0 - setmetatile 62, 33, METATILE_General_RoughWater, 0 + setmetatile 61, 30, METATILE_General_RoughWater, FALSE + setmetatile 62, 30, METATILE_General_RoughWater, FALSE + setmetatile 60, 31, METATILE_General_RoughWater, FALSE + setmetatile 61, 31, METATILE_General_RoughDeepWater, FALSE + setmetatile 62, 31, METATILE_General_RoughDeepWater, FALSE + setmetatile 63, 31, METATILE_General_RoughWater, FALSE + setmetatile 60, 32, METATILE_General_RoughWater, FALSE + setmetatile 61, 32, METATILE_General_RoughDeepWater, FALSE + setmetatile 62, 32, METATILE_General_RoughDeepWater, FALSE + setmetatile 63, 32, METATILE_General_RoughWater, FALSE + setmetatile 61, 33, METATILE_General_RoughWater, FALSE + setmetatile 62, 33, METATILE_General_RoughWater, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute129West:: - setmetatile 16, 14, METATILE_General_RoughWater, 0 - setmetatile 17, 14, METATILE_General_RoughWater, 0 - setmetatile 15, 15, METATILE_General_RoughWater, 0 - setmetatile 16, 15, METATILE_General_RoughDeepWater, 0 - setmetatile 17, 15, METATILE_General_RoughDeepWater, 0 - setmetatile 18, 15, METATILE_General_RoughWater, 0 - setmetatile 15, 16, METATILE_General_RoughWater, 0 - setmetatile 16, 16, METATILE_General_RoughDeepWater, 0 - setmetatile 17, 16, METATILE_General_RoughDeepWater, 0 - setmetatile 18, 16, METATILE_General_RoughWater, 0 - setmetatile 16, 17, METATILE_General_RoughWater, 0 - setmetatile 17, 17, METATILE_General_RoughWater, 0 + setmetatile 16, 14, METATILE_General_RoughWater, FALSE + setmetatile 17, 14, METATILE_General_RoughWater, FALSE + setmetatile 15, 15, METATILE_General_RoughWater, FALSE + setmetatile 16, 15, METATILE_General_RoughDeepWater, FALSE + setmetatile 17, 15, METATILE_General_RoughDeepWater, FALSE + setmetatile 18, 15, METATILE_General_RoughWater, FALSE + setmetatile 15, 16, METATILE_General_RoughWater, FALSE + setmetatile 16, 16, METATILE_General_RoughDeepWater, FALSE + setmetatile 17, 16, METATILE_General_RoughDeepWater, FALSE + setmetatile 18, 16, METATILE_General_RoughWater, FALSE + setmetatile 16, 17, METATILE_General_RoughWater, FALSE + setmetatile 17, 17, METATILE_General_RoughWater, FALSE return AbnormalWeather_EventScript_PlaceTilesRoute129East:: - setmetatile 42, 19, METATILE_General_RoughWater, 0 - setmetatile 43, 19, METATILE_General_RoughWater, 0 - setmetatile 41, 20, METATILE_General_RoughWater, 0 - setmetatile 42, 20, METATILE_General_RoughDeepWater, 0 - setmetatile 43, 20, METATILE_General_RoughDeepWater, 0 - setmetatile 44, 20, METATILE_General_RoughWater, 0 - setmetatile 41, 21, METATILE_General_RoughWater, 0 - setmetatile 42, 21, METATILE_General_RoughDeepWater, 0 - setmetatile 43, 21, METATILE_General_RoughDeepWater, 0 - setmetatile 44, 21, METATILE_General_RoughWater, 0 - setmetatile 42, 22, METATILE_General_RoughWater, 0 - setmetatile 43, 22, METATILE_General_RoughWater, 0 + setmetatile 42, 19, METATILE_General_RoughWater, FALSE + setmetatile 43, 19, METATILE_General_RoughWater, FALSE + setmetatile 41, 20, METATILE_General_RoughWater, FALSE + setmetatile 42, 20, METATILE_General_RoughDeepWater, FALSE + setmetatile 43, 20, METATILE_General_RoughDeepWater, FALSE + setmetatile 44, 20, METATILE_General_RoughWater, FALSE + setmetatile 41, 21, METATILE_General_RoughWater, FALSE + setmetatile 42, 21, METATILE_General_RoughDeepWater, FALSE + setmetatile 43, 21, METATILE_General_RoughDeepWater, FALSE + setmetatile 44, 21, METATILE_General_RoughWater, FALSE + setmetatile 42, 22, METATILE_General_RoughWater, FALSE + setmetatile 43, 22, METATILE_General_RoughWater, FALSE return AbnormalWeather_EventScript_HideMapNamePopup:: @@ -222,163 +222,163 @@ AbnormalWeather_EventScript_CleanupMapTiles:: return AbnormalWeather_EventScript_CleanupRoute114North:: - setmetatile 7, 3, METATILE_Fallarbor_RedRockWall, 1 - setmetatile 7, 4, METATILE_Fallarbor_RedRockWall, 1 + setmetatile 7, 3, METATILE_Fallarbor_RedRockWall, TRUE + setmetatile 7, 4, METATILE_Fallarbor_RedRockWall, TRUE return AbnormalWeather_EventScript_CleanupRoute114South:: - setmetatile 6, 45, METATILE_Fallarbor_BrownRockWall, 1 - setmetatile 6, 46, METATILE_Fallarbor_BrownRockWall, 1 + setmetatile 6, 45, METATILE_Fallarbor_BrownRockWall, TRUE + setmetatile 6, 46, METATILE_Fallarbor_BrownRockWall, TRUE return AbnormalWeather_EventScript_CleanupRoute115West:: - setmetatile 21, 5, METATILE_Fallarbor_BrownRockWall, 1 - setmetatile 21, 6, METATILE_Fallarbor_BrownRockWall, 1 + setmetatile 21, 5, METATILE_Fallarbor_BrownRockWall, TRUE + setmetatile 21, 6, METATILE_Fallarbor_BrownRockWall, TRUE return AbnormalWeather_EventScript_CleanupRoute115East:: - setmetatile 36, 9, METATILE_Fallarbor_BrownRockWall, 1 - setmetatile 36, 10, METATILE_Fallarbor_BrownRockWall, 1 + setmetatile 36, 9, METATILE_Fallarbor_BrownRockWall, TRUE + setmetatile 36, 10, METATILE_Fallarbor_BrownRockWall, TRUE return AbnormalWeather_EventScript_CleanupRoute116North:: - setmetatile 59, 12, METATILE_General_RockWall_RockBase, 1 - setmetatile 59, 13, METATILE_General_RockWall_RockBase, 1 + setmetatile 59, 12, METATILE_General_RockWall_RockBase, TRUE + setmetatile 59, 13, METATILE_General_RockWall_RockBase, TRUE return AbnormalWeather_EventScript_CleanupRoute116South:: - setmetatile 79, 5, METATILE_General_RockWall_RockBase, 1 - setmetatile 79, 6, METATILE_General_RockWall_RockBase, 1 + setmetatile 79, 5, METATILE_General_RockWall_RockBase, TRUE + setmetatile 79, 6, METATILE_General_RockWall_RockBase, TRUE return AbnormalWeather_EventScript_CleanupRoute118East:: - setmetatile 42, 5, METATILE_General_RockWall_RockBase, 1 - setmetatile 42, 6, METATILE_General_RockWall_GrassBase, 1 + setmetatile 42, 5, METATILE_General_RockWall_RockBase, TRUE + setmetatile 42, 6, METATILE_General_RockWall_GrassBase, TRUE return AbnormalWeather_EventScript_CleanupRoute118West:: - setmetatile 9, 5, METATILE_General_RockWall_RockBase, 1 - setmetatile 9, 6, METATILE_General_RockWall_GrassBase, 1 + setmetatile 9, 5, METATILE_General_RockWall_RockBase, TRUE + setmetatile 9, 6, METATILE_General_RockWall_GrassBase, TRUE return AbnormalWeather_EventScript_CleanupRoute105North:: - setmetatile 10, 28, METATILE_General_CalmWater, 0 - setmetatile 11, 28, METATILE_General_CalmWater, 0 - setmetatile 9, 29, METATILE_General_CalmWater, 0 - setmetatile 10, 29, METATILE_General_CalmWater, 0 - setmetatile 11, 29, METATILE_General_CalmWater, 0 - setmetatile 12, 29, METATILE_General_CalmWater, 0 - setmetatile 9, 30, METATILE_General_CalmWater, 0 - setmetatile 10, 30, METATILE_General_CalmWater, 0 - setmetatile 11, 30, METATILE_General_CalmWater, 0 - setmetatile 12, 30, METATILE_General_CalmWater, 0 - setmetatile 10, 31, METATILE_General_CalmWater, 0 - setmetatile 11, 31, METATILE_General_CalmWater, 0 + setmetatile 10, 28, METATILE_General_CalmWater, FALSE + setmetatile 11, 28, METATILE_General_CalmWater, FALSE + setmetatile 9, 29, METATILE_General_CalmWater, FALSE + setmetatile 10, 29, METATILE_General_CalmWater, FALSE + setmetatile 11, 29, METATILE_General_CalmWater, FALSE + setmetatile 12, 29, METATILE_General_CalmWater, FALSE + setmetatile 9, 30, METATILE_General_CalmWater, FALSE + setmetatile 10, 30, METATILE_General_CalmWater, FALSE + setmetatile 11, 30, METATILE_General_CalmWater, FALSE + setmetatile 12, 30, METATILE_General_CalmWater, FALSE + setmetatile 10, 31, METATILE_General_CalmWater, FALSE + setmetatile 11, 31, METATILE_General_CalmWater, FALSE return AbnormalWeather_EventScript_CleanupRoute105South:: - setmetatile 20, 53, METATILE_General_CalmWater, 0 - setmetatile 21, 53, METATILE_General_CalmWater, 0 - setmetatile 19, 54, METATILE_General_CalmWater, 0 - setmetatile 20, 54, METATILE_General_CalmWater, 0 - setmetatile 21, 54, METATILE_General_CalmWater, 0 - setmetatile 22, 54, METATILE_General_CalmWater, 0 - setmetatile 19, 55, METATILE_General_CalmWater, 0 - setmetatile 20, 55, METATILE_General_CalmWater, 0 - setmetatile 21, 55, METATILE_General_CalmWater, 0 - setmetatile 22, 55, METATILE_General_CalmWater, 0 - setmetatile 20, 56, METATILE_General_CalmWater, 0 - setmetatile 21, 56, METATILE_General_CalmWater, 0 + setmetatile 20, 53, METATILE_General_CalmWater, FALSE + setmetatile 21, 53, METATILE_General_CalmWater, FALSE + setmetatile 19, 54, METATILE_General_CalmWater, FALSE + setmetatile 20, 54, METATILE_General_CalmWater, FALSE + setmetatile 21, 54, METATILE_General_CalmWater, FALSE + setmetatile 22, 54, METATILE_General_CalmWater, FALSE + setmetatile 19, 55, METATILE_General_CalmWater, FALSE + setmetatile 20, 55, METATILE_General_CalmWater, FALSE + setmetatile 21, 55, METATILE_General_CalmWater, FALSE + setmetatile 22, 55, METATILE_General_CalmWater, FALSE + setmetatile 20, 56, METATILE_General_CalmWater, FALSE + setmetatile 21, 56, METATILE_General_CalmWater, FALSE return AbnormalWeather_EventScript_CleanupRoute125West:: - setmetatile 8, 16, METATILE_General_CalmWater, 0 - setmetatile 9, 16, METATILE_General_CalmWater, 0 - setmetatile 7, 17, METATILE_General_CalmWater, 0 - setmetatile 8, 17, METATILE_General_CalmWater, 0 - setmetatile 9, 17, METATILE_General_CalmWater, 0 - setmetatile 10, 17, METATILE_General_CalmWater, 0 - setmetatile 7, 18, METATILE_General_CalmWater, 0 - setmetatile 8, 18, METATILE_General_CalmWater, 0 - setmetatile 9, 18, METATILE_General_CalmWater, 0 - setmetatile 10, 18, METATILE_General_CalmWater, 0 - setmetatile 8, 19, METATILE_General_CalmWater, 0 - setmetatile 9, 19, METATILE_General_CalmWater, 0 + setmetatile 8, 16, METATILE_General_CalmWater, FALSE + setmetatile 9, 16, METATILE_General_CalmWater, FALSE + setmetatile 7, 17, METATILE_General_CalmWater, FALSE + setmetatile 8, 17, METATILE_General_CalmWater, FALSE + setmetatile 9, 17, METATILE_General_CalmWater, FALSE + setmetatile 10, 17, METATILE_General_CalmWater, FALSE + setmetatile 7, 18, METATILE_General_CalmWater, FALSE + setmetatile 8, 18, METATILE_General_CalmWater, FALSE + setmetatile 9, 18, METATILE_General_CalmWater, FALSE + setmetatile 10, 18, METATILE_General_CalmWater, FALSE + setmetatile 8, 19, METATILE_General_CalmWater, FALSE + setmetatile 9, 19, METATILE_General_CalmWater, FALSE return AbnormalWeather_EventScript_CleanupRoute125East:: - setmetatile 53, 18, METATILE_General_CalmWater, 0 - setmetatile 54, 18, METATILE_General_CalmWater, 0 - setmetatile 52, 19, METATILE_General_CalmWater, 0 - setmetatile 53, 19, METATILE_General_CalmWater, 0 - setmetatile 54, 19, METATILE_General_CalmWater, 0 - setmetatile 55, 19, METATILE_General_CalmWater, 0 - setmetatile 52, 20, METATILE_General_CalmWater, 0 - setmetatile 53, 20, METATILE_General_CalmWater, 0 - setmetatile 54, 20, METATILE_General_CalmWater, 0 - setmetatile 55, 20, METATILE_General_CalmWater, 0 - setmetatile 53, 21, METATILE_General_CalmWater, 0 - setmetatile 54, 21, METATILE_General_CalmWater, 0 + setmetatile 53, 18, METATILE_General_CalmWater, FALSE + setmetatile 54, 18, METATILE_General_CalmWater, FALSE + setmetatile 52, 19, METATILE_General_CalmWater, FALSE + setmetatile 53, 19, METATILE_General_CalmWater, FALSE + setmetatile 54, 19, METATILE_General_CalmWater, FALSE + setmetatile 55, 19, METATILE_General_CalmWater, FALSE + setmetatile 52, 20, METATILE_General_CalmWater, FALSE + setmetatile 53, 20, METATILE_General_CalmWater, FALSE + setmetatile 54, 20, METATILE_General_CalmWater, FALSE + setmetatile 55, 20, METATILE_General_CalmWater, FALSE + setmetatile 53, 21, METATILE_General_CalmWater, FALSE + setmetatile 54, 21, METATILE_General_CalmWater, FALSE return AbnormalWeather_EventScript_CleanupRoute127North:: - setmetatile 57, 9, METATILE_General_CalmWater, 0 - setmetatile 58, 9, METATILE_General_CalmWater, 0 - setmetatile 56, 10, METATILE_General_CalmWater, 0 - setmetatile 57, 10, METATILE_General_CalmWater, 0 - setmetatile 58, 10, METATILE_General_CalmWater, 0 - setmetatile 59, 10, METATILE_General_CalmWater, 0 - setmetatile 56, 11, METATILE_General_CalmWater, 0 - setmetatile 57, 11, METATILE_General_CalmWater, 0 - setmetatile 58, 11, METATILE_General_CalmWater, 0 - setmetatile 59, 11, METATILE_General_CalmWater, 0 - setmetatile 57, 12, METATILE_General_CalmWater, 0 - setmetatile 58, 12, METATILE_General_CalmWater, 0 + setmetatile 57, 9, METATILE_General_CalmWater, FALSE + setmetatile 58, 9, METATILE_General_CalmWater, FALSE + setmetatile 56, 10, METATILE_General_CalmWater, FALSE + setmetatile 57, 10, METATILE_General_CalmWater, FALSE + setmetatile 58, 10, METATILE_General_CalmWater, FALSE + setmetatile 59, 10, METATILE_General_CalmWater, FALSE + setmetatile 56, 11, METATILE_General_CalmWater, FALSE + setmetatile 57, 11, METATILE_General_CalmWater, FALSE + setmetatile 58, 11, METATILE_General_CalmWater, FALSE + setmetatile 59, 11, METATILE_General_CalmWater, FALSE + setmetatile 57, 12, METATILE_General_CalmWater, FALSE + setmetatile 58, 12, METATILE_General_CalmWater, FALSE return AbnormalWeather_EventScript_CleanupRoute127South:: - setmetatile 61, 30, METATILE_General_CalmWater, 0 - setmetatile 62, 30, METATILE_General_CalmWater, 0 - setmetatile 60, 31, METATILE_General_CalmWater, 0 - setmetatile 61, 31, METATILE_General_CalmWater, 0 - setmetatile 62, 31, METATILE_General_CalmWater, 0 - setmetatile 63, 31, METATILE_General_CalmWater, 0 - setmetatile 60, 32, METATILE_General_CalmWater, 0 - setmetatile 61, 32, METATILE_General_CalmWater, 0 - setmetatile 62, 32, METATILE_General_CalmWater, 0 - setmetatile 63, 32, METATILE_General_CalmWater, 0 - setmetatile 61, 33, METATILE_General_CalmWater, 0 - setmetatile 62, 33, METATILE_General_CalmWater, 0 + setmetatile 61, 30, METATILE_General_CalmWater, FALSE + setmetatile 62, 30, METATILE_General_CalmWater, FALSE + setmetatile 60, 31, METATILE_General_CalmWater, FALSE + setmetatile 61, 31, METATILE_General_CalmWater, FALSE + setmetatile 62, 31, METATILE_General_CalmWater, FALSE + setmetatile 63, 31, METATILE_General_CalmWater, FALSE + setmetatile 60, 32, METATILE_General_CalmWater, FALSE + setmetatile 61, 32, METATILE_General_CalmWater, FALSE + setmetatile 62, 32, METATILE_General_CalmWater, FALSE + setmetatile 63, 32, METATILE_General_CalmWater, FALSE + setmetatile 61, 33, METATILE_General_CalmWater, FALSE + setmetatile 62, 33, METATILE_General_CalmWater, FALSE return AbnormalWeather_EventScript_CleanupRoute129West:: - setmetatile 16, 14, METATILE_General_CalmWater, 0 - setmetatile 17, 14, METATILE_General_CalmWater, 0 - setmetatile 15, 15, METATILE_General_CalmWater, 0 - setmetatile 16, 15, METATILE_General_CalmWater, 0 - setmetatile 17, 15, METATILE_General_CalmWater, 0 - setmetatile 18, 15, METATILE_General_CalmWater, 0 - setmetatile 15, 16, METATILE_General_CalmWater, 0 - setmetatile 16, 16, METATILE_General_CalmWater, 0 - setmetatile 17, 16, METATILE_General_CalmWater, 0 - setmetatile 18, 16, METATILE_General_CalmWater, 0 - setmetatile 16, 17, METATILE_General_CalmWater, 0 - setmetatile 17, 17, METATILE_General_CalmWater, 0 + setmetatile 16, 14, METATILE_General_CalmWater, FALSE + setmetatile 17, 14, METATILE_General_CalmWater, FALSE + setmetatile 15, 15, METATILE_General_CalmWater, FALSE + setmetatile 16, 15, METATILE_General_CalmWater, FALSE + setmetatile 17, 15, METATILE_General_CalmWater, FALSE + setmetatile 18, 15, METATILE_General_CalmWater, FALSE + setmetatile 15, 16, METATILE_General_CalmWater, FALSE + setmetatile 16, 16, METATILE_General_CalmWater, FALSE + setmetatile 17, 16, METATILE_General_CalmWater, FALSE + setmetatile 18, 16, METATILE_General_CalmWater, FALSE + setmetatile 16, 17, METATILE_General_CalmWater, FALSE + setmetatile 17, 17, METATILE_General_CalmWater, FALSE return AbnormalWeather_EventScript_CleanupRoute129East:: - setmetatile 42, 19, METATILE_General_CalmWater, 0 - setmetatile 43, 19, METATILE_General_CalmWater, 0 - setmetatile 41, 20, METATILE_General_CalmWater, 0 - setmetatile 42, 20, METATILE_General_CalmWater, 0 - setmetatile 43, 20, METATILE_General_CalmWater, 0 - setmetatile 44, 20, METATILE_General_CalmWater, 0 - setmetatile 41, 21, METATILE_General_CalmWater, 0 - setmetatile 42, 21, METATILE_General_CalmWater, 0 - setmetatile 43, 21, METATILE_General_CalmWater, 0 - setmetatile 44, 21, METATILE_General_CalmWater, 0 - setmetatile 42, 22, METATILE_General_CalmWater, 0 - setmetatile 43, 22, METATILE_General_CalmWater, 0 + setmetatile 42, 19, METATILE_General_CalmWater, FALSE + setmetatile 43, 19, METATILE_General_CalmWater, FALSE + setmetatile 41, 20, METATILE_General_CalmWater, FALSE + setmetatile 42, 20, METATILE_General_CalmWater, FALSE + setmetatile 43, 20, METATILE_General_CalmWater, FALSE + setmetatile 44, 20, METATILE_General_CalmWater, FALSE + setmetatile 41, 21, METATILE_General_CalmWater, FALSE + setmetatile 42, 21, METATILE_General_CalmWater, FALSE + setmetatile 43, 21, METATILE_General_CalmWater, FALSE + setmetatile 44, 21, METATILE_General_CalmWater, FALSE + setmetatile 42, 22, METATILE_General_CalmWater, FALSE + setmetatile 43, 22, METATILE_General_CalmWater, FALSE return AbnormalWeather_Underwater_SetupEscapeWarp:: diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 714792fc69..2022c5c8fa 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -1320,33 +1320,33 @@ CableClub_EventScript_AdapterNotConnected:: end CableClub_EventScript_OpenUnionRoomBarrier:: - setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, 0 - setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 + setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, FALSE + setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, FALSE return CableClub_EventScript_CloseUnionRoomBarrier:: - setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop, 1 - setmetatile 5, 3, METATILE_PokemonCenter_CounterBarrier, 1 + setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop, TRUE + setmetatile 5, 3, METATILE_PokemonCenter_CounterBarrier, TRUE return CableClub_EventScript_OpenDirectCornerBarrier:: - setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, 0 - setmetatile 9, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 + setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, FALSE + setmetatile 9, 3, METATILE_PokemonCenter_Floor_Plain_Alt, FALSE return CableClub_EventScript_CloseDirectCornerBarrier:: - setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop, 1 - setmetatile 9, 3, METATILE_PokemonCenter_CounterBarrier, 1 + setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop, TRUE + setmetatile 9, 3, METATILE_PokemonCenter_CounterBarrier, TRUE return EventScript_OpenMossdeepGameCornerBarrier:: - setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterOpen_Top, 0 - setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterOpen_Bottom, 0 + setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterOpen_Top, FALSE + setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterOpen_Bottom, FALSE return EventScript_CloseMossdeepGameCornerBarrier:: - setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterClosed_Top, 1 - setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterClosed_Bottom, 1 + setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterClosed_Top, TRUE + setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterClosed_Bottom, TRUE return CableClub_OnResume: diff --git a/data/scripts/elite_four.inc b/data/scripts/elite_four.inc index 0ae319061a..97d7f41314 100644 --- a/data/scripts/elite_four.inc +++ b/data/scripts/elite_four.inc @@ -2,18 +2,18 @@ PokemonLeague_EliteFour_SetAdvanceToNextRoomMetatiles:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay32 waitmovement 0 playse SE_DOOR - setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, 0 - setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, 0 - setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, 1 - setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, 1 - setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, 1 - setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, 1 - setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, FALSE + setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, FALSE + setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE + setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE + setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE + setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE + setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE special DrawWholeMapView return @@ -21,42 +21,42 @@ PokemonLeague_EliteFour_EventScript_WalkInCloseDoor:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkUp6 waitmovement 0 playse SE_TRUCK_DOOR - setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 - setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 - setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE special DrawWholeMapView return @ Essentially unused, only necessary when re-entering an Elite Four room after defeating the member, which isnt normally possible PokemonLeague_EliteFour_EventScript_ResetAdvanceToNextRoom:: - setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, 0 - setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, 0 - setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 - setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 - setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 - setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, 1 - setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, 1 - setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, 1 - setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, 1 - setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, 1 - setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, FALSE + setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, FALSE + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE + setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE + setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE + setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE + setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE + setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, TRUE + setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE return PokemonLeague_EliteFour_EventScript_CloseDoor:: - setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 - setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 - setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 - setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE return diff --git a/data/scripts/flash.inc b/data/scripts/flash.inc index a69975a165..dbfec2314d 100644 --- a/data/scripts/flash.inc +++ b/data/scripts/flash.inc @@ -1,4 +1,4 @@ EventScript_UseFlash:: animateflash 1 - setflashradius 1 + setflashlevel 1 end diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index 4e4725041a..5a2e424785 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -33,7 +33,7 @@ void DoMossdeepGymWarp(void); void DoPortholeWarp(void); void DoCableClubWarp(void); void DoContestHallWarp(void); -void AnimateFlash(u8 flashLevel); +void AnimateFlash(u8 newFlashLevel); void WriteBattlePyramidViewScanlineEffectBuffer(void); void DoSpinEnterWarp(void); void DoSpinExitWarp(void); diff --git a/include/field_weather.h b/include/field_weather.h index 72a56ab6ec..1d8cfe4220 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -221,9 +221,9 @@ void Bubbles_Main(void); void Bubbles_InitAll(void); bool8 Bubbles_Finish(void); -u8 GetSav1Weather(void); -void SetSav1Weather(u32 weather); -void SetSav1WeatherFromCurrMapHeader(void); +u8 GetSavedWeather(void); +void SetSavedWeather(u32 weather); +void SetSavedWeatherFromCurrMapHeader(void); void SetWeather(u32 weather); void DoCurrentWeather(void); void UpdateWeatherPerDay(u16 increment); diff --git a/src/battle_setup.c b/src/battle_setup.c index 0e8d697ba2..f928cf3f94 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -686,7 +686,7 @@ u8 BattleSetup_GetTerrainId(void) } if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE113) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE113)) return BATTLE_TERRAIN_SAND; - if (GetSav1Weather() == WEATHER_SANDSTORM) + if (GetSavedWeather() == WEATHER_SANDSTORM) return BATTLE_TERRAIN_SAND; return BATTLE_TERRAIN_PLAIN; diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index b17617eff9..5a7351bf25 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -35,7 +35,6 @@ #include "trainer_hill.h" #include "fldeff.h" -// This file's functions. static void Task_ExitNonAnimDoor(u8); static void Task_ExitNonDoor(u8); static void Task_DoContestHallWarp(u8); @@ -50,9 +49,9 @@ static void Task_EnableScriptAfterMusicFade(u8 taskId); // data[0] is used universally by tasks in this file as a state for switches #define tState data[0] -// const -static const u16 sFlashLevelPixelRadii[] = { 200, 72, 64, 56, 48, 40, 32, 24, 0 }; -const s32 gMaxFlashLevel = ARRAY_COUNT(sFlashLevelPixelRadii) - 1; +// Smaller flash level -> larger flash radius +static const u16 sFlashLevelToRadius[] = { 200, 72, 64, 56, 48, 40, 32, 24, 0 }; +const s32 gMaxFlashLevel = ARRAY_COUNT(sFlashLevelToRadius) - 1; const struct ScanlineEffectParams sFlashEffectParams = { @@ -971,14 +970,14 @@ static u8 StartUpdateOrbFlashEffect(s32 centerX, s32 centerY, s32 initialFlashRa #undef tFlashRadiusDelta #undef tClearScanlineEffect -// A higher flashLevel value is a smaller flash radius (more darkness). 0 is full brightness -void AnimateFlash(u8 flashLevel) +// A higher flash level is a smaller flash radius (more darkness). 0 is full brightness +void AnimateFlash(u8 newFlashLevel) { u8 curFlashLevel = GetFlashLevel(); bool8 fullBrightness = FALSE; - if (!flashLevel) + if (newFlashLevel == 0) fullBrightness = TRUE; - StartUpdateFlashLevelEffect(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelPixelRadii[curFlashLevel], sFlashLevelPixelRadii[flashLevel], fullBrightness, 1); + StartUpdateFlashLevelEffect(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelToRadius[curFlashLevel], sFlashLevelToRadius[newFlashLevel], fullBrightness, 1); StartWaitForFlashUpdate(); ScriptContext2_Enable(); } @@ -987,7 +986,7 @@ void WriteFlashScanlineEffectBuffer(u8 flashLevel) { if (flashLevel) { - SetFlashScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelPixelRadii[flashLevel]); + SetFlashScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelToRadius[flashLevel]); CpuFastSet(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 480); } } diff --git a/src/field_specials.c b/src/field_specials.c index 22467cfeef..96eb949e55 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1570,17 +1570,13 @@ bool8 FoundBlackGlasses(void) void SetRoute119Weather(void) { if (IsMapTypeOutdoors(GetLastUsedWarpMapType()) != TRUE) - { - SetSav1Weather(WEATHER_ROUTE119_CYCLE); - } + SetSavedWeather(WEATHER_ROUTE119_CYCLE); } void SetRoute123Weather(void) { if (IsMapTypeOutdoors(GetLastUsedWarpMapType()) != TRUE) - { - SetSav1Weather(WEATHER_ROUTE123_CYCLE); - } + SetSavedWeather(WEATHER_ROUTE123_CYCLE); } u8 GetLeadMonIndex(void) diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c index 5720363c21..2b87557c21 100644 --- a/src/field_weather_effect.c +++ b/src/field_weather_effect.c @@ -2487,19 +2487,19 @@ static void CreateAbnormalWeatherTask(void) static u8 TranslateWeatherNum(u8); static void UpdateRainCounter(u8, u8); -void SetSav1Weather(u32 weather) +void SetSavedWeather(u32 weather) { u8 oldWeather = gSaveBlock1Ptr->weather; gSaveBlock1Ptr->weather = TranslateWeatherNum(weather); UpdateRainCounter(gSaveBlock1Ptr->weather, oldWeather); } -u8 GetSav1Weather(void) +u8 GetSavedWeather(void) { return gSaveBlock1Ptr->weather; } -void SetSav1WeatherFromCurrMapHeader(void) +void SetSavedWeatherFromCurrMapHeader(void) { u8 oldWeather = gSaveBlock1Ptr->weather; gSaveBlock1Ptr->weather = TranslateWeatherNum(gMapHeader.weather); @@ -2508,19 +2508,19 @@ void SetSav1WeatherFromCurrMapHeader(void) void SetWeather(u32 weather) { - SetSav1Weather(weather); - SetNextWeather(GetSav1Weather()); + SetSavedWeather(weather); + SetNextWeather(GetSavedWeather()); } void SetWeather_Unused(u32 weather) { - SetSav1Weather(weather); - SetCurrentAndNextWeather(GetSav1Weather()); + SetSavedWeather(weather); + SetCurrentAndNextWeather(GetSavedWeather()); } void DoCurrentWeather(void) { - u8 weather = GetSav1Weather(); + u8 weather = GetSavedWeather(); if (weather == WEATHER_ABNORMAL) { @@ -2539,7 +2539,7 @@ void DoCurrentWeather(void) void ResumePausedWeather(void) { - u8 weather = GetSav1Weather(); + u8 weather = GetSavedWeather(); if (weather == WEATHER_ABNORMAL) { diff --git a/src/overworld.c b/src/overworld.c index b53de3ebc9..a0fd7dbb30 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -803,7 +803,7 @@ void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum) RestartWildEncounterImmunitySteps(); TryUpdateRandomTrainerRematches(mapGroup, mapNum); DoTimeBasedEvents(); - SetSav1WeatherFromCurrMapHeader(); + SetSavedWeatherFromCurrMapHeader(); ChooseAmbientCrySpecies(); SetDefaultFlashLevel(); Overworld_ClearSavedMusic(); @@ -854,7 +854,7 @@ static void LoadMapFromWarp(bool32 a1) TryUpdateRandomTrainerRematches(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum); if (a1 != TRUE) DoTimeBasedEvents(); - SetSav1WeatherFromCurrMapHeader(); + SetSavedWeatherFromCurrMapHeader(); ChooseAmbientCrySpecies(); if (isOutdoors) FlagClear(FLAG_SYS_USE_FLASH); @@ -967,6 +967,10 @@ bool32 Overworld_IsBikingAllowed(void) return TRUE; } +// Flash level of 0 is fully bright +// Flash level of 1 is the largest flash radius +// Flash level of 7 is the smallest flash radius +// Flash level of 8 is fully black void SetDefaultFlashLevel(void) { if (!gMapHeader.cave) @@ -1099,7 +1103,7 @@ u16 GetCurrLocationDefaultMusic(void) // Play the desert music only when the sandstorm is active on Route 111. if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE111) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE111) - && GetSav1Weather() == WEATHER_SANDSTORM) + && GetSavedWeather() == WEATHER_SANDSTORM) return MUS_ROUTE111; music = GetLocationMusic(&gSaveBlock1Ptr->location); diff --git a/src/scrcmd.c b/src/scrcmd.c index 04dff470b2..1dad3575c7 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -609,7 +609,7 @@ bool8 ScrCmd_animateflash(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_setflashradius(struct ScriptContext *ctx) +bool8 ScrCmd_setflashlevel(struct ScriptContext *ctx) { SetFlashLevel(VarGet(ScriptReadHalfword(ctx))); return FALSE; @@ -706,13 +706,13 @@ bool8 ScrCmd_setweather(struct ScriptContext *ctx) { u16 weather = VarGet(ScriptReadHalfword(ctx)); - SetSav1Weather(weather); + SetSavedWeather(weather); return FALSE; } bool8 ScrCmd_resetweather(struct ScriptContext *ctx) { - SetSav1WeatherFromCurrMapHeader(); + SetSavedWeatherFromCurrMapHeader(); return FALSE; } @@ -1982,7 +1982,7 @@ bool8 ScrCmd_dofieldeffect(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_setfieldeffectarg(struct ScriptContext *ctx) +bool8 ScrCmd_setfieldeffectargument(struct ScriptContext *ctx) { u8 argNum = ScriptReadByte(ctx); From f23d9ff30e0109e4ca4a5a4d63fa94f5e6c75bc4 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Thu, 18 Nov 2021 02:43:39 +0800 Subject: [PATCH 193/417] Use movement action constant values over enum --- asm/macros/movement.inc | 287 ++++++++++++++++++++++------------------ 1 file changed, 161 insertions(+), 126 deletions(-) diff --git a/asm/macros/movement.inc b/asm/macros/movement.inc index 0220c11a96..2e52ba11d3 100644 --- a/asm/macros/movement.inc +++ b/asm/macros/movement.inc @@ -1,131 +1,166 @@ - .macro create_movement_action name - enum _\name + .macro create_movement_action name, value .macro \name - .byte _\name + .byte \value .endm .endm - enum_start - create_movement_action face_down - create_movement_action face_up - create_movement_action face_left - create_movement_action face_right - create_movement_action walk_slow_down - create_movement_action walk_slow_up - create_movement_action walk_slow_left - create_movement_action walk_slow_right - create_movement_action walk_down - create_movement_action walk_up - create_movement_action walk_left - create_movement_action walk_right - create_movement_action jump_2_down - create_movement_action jump_2_up - create_movement_action jump_2_left - create_movement_action jump_2_right - create_movement_action delay_1 - create_movement_action delay_2 - create_movement_action delay_4 - create_movement_action delay_8 - create_movement_action delay_16 - create_movement_action walk_fast_down - create_movement_action walk_fast_up - create_movement_action walk_fast_left - create_movement_action walk_fast_right - create_movement_action walk_in_place_slow_down - create_movement_action walk_in_place_slow_up - create_movement_action walk_in_place_slow_left - create_movement_action walk_in_place_slow_right - create_movement_action walk_in_place_down - create_movement_action walk_in_place_up - create_movement_action walk_in_place_left - create_movement_action walk_in_place_right - create_movement_action walk_in_place_fast_down - create_movement_action walk_in_place_fast_up - create_movement_action walk_in_place_fast_left - create_movement_action walk_in_place_fast_right - create_movement_action walk_in_place_faster_down - create_movement_action walk_in_place_faster_up - create_movement_action walk_in_place_faster_left - create_movement_action walk_in_place_faster_right - create_movement_action ride_water_current_down - create_movement_action ride_water_current_up - create_movement_action ride_water_current_left - create_movement_action ride_water_current_right - create_movement_action walk_faster_down - create_movement_action walk_faster_up - create_movement_action walk_faster_left - create_movement_action walk_faster_right - create_movement_action slide_down - create_movement_action slide_up - create_movement_action slide_left - create_movement_action slide_right - create_movement_action player_run_down - create_movement_action player_run_up - create_movement_action player_run_left - create_movement_action player_run_right - create_movement_action start_anim_in_direction - create_movement_action jump_special_down - create_movement_action jump_special_up - create_movement_action jump_special_left - create_movement_action jump_special_right - create_movement_action face_player - create_movement_action face_away_player - create_movement_action lock_facing_direction - create_movement_action unlock_facing_direction - create_movement_action jump_down - create_movement_action jump_up - create_movement_action jump_left - create_movement_action jump_right - create_movement_action jump_in_place_down - create_movement_action jump_in_place_up - create_movement_action jump_in_place_left - create_movement_action jump_in_place_right - create_movement_action jump_in_place_down_up - create_movement_action jump_in_place_up_down - create_movement_action jump_in_place_left_right - create_movement_action jump_in_place_right_left - create_movement_action face_original_direction - create_movement_action nurse_joy_bow - create_movement_action enable_jump_landing_ground_effect - create_movement_action disable_jump_landing_ground_effect - create_movement_action disable_anim - create_movement_action restore_anim - create_movement_action set_invisible - create_movement_action set_visible - create_movement_action emote_exclamation_mark - create_movement_action emote_question_mark - create_movement_action emote_heart - create_movement_action reveal_trainer - create_movement_action rock_smash_break - create_movement_action cut_tree - create_movement_action set_fixed_priority - create_movement_action clear_fixed_priority - create_movement_action init_affine_anim - create_movement_action clear_affine_anim - create_movement_action hide_reflection - create_movement_action show_reflection - create_movement_action walk_down_start_affine - create_movement_action walk_down_affine + create_movement_action face_down, MOVEMENT_ACTION_FACE_DOWN + create_movement_action face_up, MOVEMENT_ACTION_FACE_UP + create_movement_action face_left, MOVEMENT_ACTION_FACE_LEFT + create_movement_action face_right, MOVEMENT_ACTION_FACE_RIGHT + create_movement_action walk_slow_down, MOVEMENT_ACTION_WALK_SLOW_DOWN + create_movement_action walk_slow_up, MOVEMENT_ACTION_WALK_SLOW_UP + create_movement_action walk_slow_left, MOVEMENT_ACTION_WALK_SLOW_LEFT + create_movement_action walk_slow_right, MOVEMENT_ACTION_WALK_SLOW_RIGHT + create_movement_action walk_down, MOVEMENT_ACTION_WALK_NORMAL_DOWN + create_movement_action walk_up, MOVEMENT_ACTION_WALK_NORMAL_UP + create_movement_action walk_left, MOVEMENT_ACTION_WALK_NORMAL_LEFT + create_movement_action walk_right, MOVEMENT_ACTION_WALK_NORMAL_RIGHT + create_movement_action jump_2_down, MOVEMENT_ACTION_JUMP_2_DOWN + create_movement_action jump_2_up, MOVEMENT_ACTION_JUMP_2_UP + create_movement_action jump_2_left, MOVEMENT_ACTION_JUMP_2_LEFT + create_movement_action jump_2_right, MOVEMENT_ACTION_JUMP_2_RIGHT + create_movement_action delay_1, MOVEMENT_ACTION_DELAY_1 + create_movement_action delay_2, MOVEMENT_ACTION_DELAY_2 + create_movement_action delay_4, MOVEMENT_ACTION_DELAY_4 + create_movement_action delay_8, MOVEMENT_ACTION_DELAY_8 + create_movement_action delay_16, MOVEMENT_ACTION_DELAY_16 + create_movement_action walk_fast_down, MOVEMENT_ACTION_WALK_FAST_DOWN + create_movement_action walk_fast_up, MOVEMENT_ACTION_WALK_FAST_UP + create_movement_action walk_fast_left, MOVEMENT_ACTION_WALK_FAST_LEFT + create_movement_action walk_fast_right, MOVEMENT_ACTION_WALK_FAST_RIGHT + create_movement_action walk_in_place_slow_down, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_DOWN + create_movement_action walk_in_place_slow_up, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_UP + create_movement_action walk_in_place_slow_left, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_LEFT + create_movement_action walk_in_place_slow_right, MOVEMENT_ACTION_WALK_IN_PLACE_SLOW_RIGHT + create_movement_action walk_in_place_down, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_DOWN + create_movement_action walk_in_place_up, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_UP + create_movement_action walk_in_place_left, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_LEFT + create_movement_action walk_in_place_right, MOVEMENT_ACTION_WALK_IN_PLACE_NORMAL_RIGHT + create_movement_action walk_in_place_fast_down, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_DOWN + create_movement_action walk_in_place_fast_up, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_UP + create_movement_action walk_in_place_fast_left, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_LEFT + create_movement_action walk_in_place_fast_right, MOVEMENT_ACTION_WALK_IN_PLACE_FAST_RIGHT + create_movement_action walk_in_place_faster_down, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_DOWN + create_movement_action walk_in_place_faster_up, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_UP + create_movement_action walk_in_place_faster_left, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_LEFT + create_movement_action walk_in_place_faster_right, MOVEMENT_ACTION_WALK_IN_PLACE_FASTER_RIGHT + create_movement_action ride_water_current_down, MOVEMENT_ACTION_RIDE_WATER_CURRENT_DOWN + create_movement_action ride_water_current_up, MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP + create_movement_action ride_water_current_left, MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT + create_movement_action ride_water_current_right, MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT + create_movement_action walk_faster_down, MOVEMENT_ACTION_WALK_FASTER_DOWN + create_movement_action walk_faster_up, MOVEMENT_ACTION_WALK_FASTER_UP + create_movement_action walk_faster_left, MOVEMENT_ACTION_WALK_FASTER_LEFT + create_movement_action walk_faster_right, MOVEMENT_ACTION_WALK_FASTER_RIGHT + create_movement_action slide_down, MOVEMENT_ACTION_SLIDE_DOWN + create_movement_action slide_up, MOVEMENT_ACTION_SLIDE_UP + create_movement_action slide_left, MOVEMENT_ACTION_SLIDE_LEFT + create_movement_action slide_right, MOVEMENT_ACTION_SLIDE_RIGHT + create_movement_action player_run_down, MOVEMENT_ACTION_PLAYER_RUN_DOWN + create_movement_action player_run_up, MOVEMENT_ACTION_PLAYER_RUN_UP + create_movement_action player_run_left, MOVEMENT_ACTION_PLAYER_RUN_LEFT + create_movement_action player_run_right, MOVEMENT_ACTION_PLAYER_RUN_RIGHT + create_movement_action start_anim_in_direction, MOVEMENT_ACTION_START_ANIM_IN_DIRECTION + create_movement_action jump_special_down, MOVEMENT_ACTION_JUMP_SPECIAL_DOWN + create_movement_action jump_special_up, MOVEMENT_ACTION_JUMP_SPECIAL_UP + create_movement_action jump_special_left, MOVEMENT_ACTION_JUMP_SPECIAL_LEFT + create_movement_action jump_special_right, MOVEMENT_ACTION_JUMP_SPECIAL_RIGHT + create_movement_action face_player, MOVEMENT_ACTION_FACE_PLAYER + create_movement_action face_away_player, MOVEMENT_ACTION_FACE_AWAY_PLAYER + create_movement_action lock_facing_direction, MOVEMENT_ACTION_LOCK_FACING_DIRECTION + create_movement_action unlock_facing_direction, MOVEMENT_ACTION_UNLOCK_FACING_DIRECTION + create_movement_action jump_down, MOVEMENT_ACTION_JUMP_DOWN + create_movement_action jump_up, MOVEMENT_ACTION_JUMP_UP + create_movement_action jump_left, MOVEMENT_ACTION_JUMP_LEFT + create_movement_action jump_right, MOVEMENT_ACTION_JUMP_RIGHT + create_movement_action jump_in_place_down, MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN + create_movement_action jump_in_place_up, MOVEMENT_ACTION_JUMP_IN_PLACE_UP + create_movement_action jump_in_place_left, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT + create_movement_action jump_in_place_right, MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT + create_movement_action jump_in_place_down_up, MOVEMENT_ACTION_JUMP_IN_PLACE_DOWN_UP + create_movement_action jump_in_place_up_down, MOVEMENT_ACTION_JUMP_IN_PLACE_UP_DOWN + create_movement_action jump_in_place_left_right, MOVEMENT_ACTION_JUMP_IN_PLACE_LEFT_RIGHT + create_movement_action jump_in_place_right_left, MOVEMENT_ACTION_JUMP_IN_PLACE_RIGHT_LEFT + create_movement_action face_original_direction, MOVEMENT_ACTION_FACE_ORIGINAL_DIRECTION + create_movement_action nurse_joy_bow, MOVEMENT_ACTION_NURSE_JOY_BOW_DOWN + create_movement_action enable_jump_landing_ground_effect, MOVEMENT_ACTION_ENABLE_JUMP_LANDING_GROUND_EFFECT + create_movement_action disable_jump_landing_ground_effect, MOVEMENT_ACTION_DISABLE_JUMP_LANDING_GROUND_EFFECT + create_movement_action disable_anim, MOVEMENT_ACTION_DISABLE_ANIMATION + create_movement_action restore_anim, MOVEMENT_ACTION_RESTORE_ANIMATION + create_movement_action set_invisible, MOVEMENT_ACTION_SET_INVISIBLE + create_movement_action set_visible, MOVEMENT_ACTION_SET_VISIBLE + create_movement_action emote_exclamation_mark, MOVEMENT_ACTION_EMOTE_EXCLAMATION_MARK + create_movement_action emote_question_mark, MOVEMENT_ACTION_EMOTE_QUESTION_MARK + create_movement_action emote_heart, MOVEMENT_ACTION_EMOTE_HEART + create_movement_action reveal_trainer, MOVEMENT_ACTION_REVEAL_TRAINER + create_movement_action rock_smash_break, MOVEMENT_ACTION_ROCK_SMASH_BREAK + create_movement_action cut_tree, MOVEMENT_ACTION_CUT_TREE + create_movement_action set_fixed_priority, MOVEMENT_ACTION_SET_FIXED_PRIORITY + create_movement_action clear_fixed_priority, MOVEMENT_ACTION_CLEAR_FIXED_PRIORITY + create_movement_action init_affine_anim, MOVEMENT_ACTION_INIT_AFFINE_ANIM + create_movement_action clear_affine_anim, MOVEMENT_ACTION_CLEAR_AFFINE_ANIM + create_movement_action hide_reflection, MOVEMENT_ACTION_HIDE_REFLECTION + create_movement_action show_reflection, MOVEMENT_ACTION_SHOW_REFLECTION + create_movement_action walk_down_start_affine, MOVEMENT_ACTION_WALK_DOWN_START_AFFINE + create_movement_action walk_down_affine, MOVEMENT_ACTION_WALK_DOWN_AFFINE + create_movement_action acro_wheelie_face_down, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_DOWN + create_movement_action acro_wheelie_face_up, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_UP + create_movement_action acro_wheelie_face_left, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_LEFT + create_movement_action acro_wheelie_face_right, MOVEMENT_ACTION_ACRO_WHEELIE_FACE_RIGHT + create_movement_action acro_pop_wheelie_down, MOVEMENT_ACTION_ACRO_POP_WHEELIE_DOWN + create_movement_action acro_pop_wheelie_up, MOVEMENT_ACTION_ACRO_POP_WHEELIE_UP + create_movement_action acro_pop_wheelie_left, MOVEMENT_ACTION_ACRO_POP_WHEELIE_LEFT + create_movement_action acro_pop_wheelie_right, MOVEMENT_ACTION_ACRO_POP_WHEELIE_RIGHT + create_movement_action acro_end_wheelie_face_down, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_DOWN + create_movement_action acro_end_wheelie_face_up, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_UP + create_movement_action acro_end_wheelie_face_left, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_LEFT + create_movement_action acro_end_wheelie_face_right, MOVEMENT_ACTION_ACRO_END_WHEELIE_FACE_RIGHT + create_movement_action acro_wheelie_hop_face_down, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_DOWN + create_movement_action acro_wheelie_hop_face_up, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_UP + create_movement_action acro_wheelie_hop_face_left, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_LEFT + create_movement_action acro_wheelie_hop_face_right, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_FACE_RIGHT + create_movement_action acro_wheelie_hop_down, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_DOWN + create_movement_action acro_wheelie_hop_up, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_UP + create_movement_action acro_wheelie_hop_left, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_LEFT + create_movement_action acro_wheelie_hop_right, MOVEMENT_ACTION_ACRO_WHEELIE_HOP_RIGHT + create_movement_action acro_wheelie_jump_down, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_DOWN + create_movement_action acro_wheelie_jump_up, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_UP + create_movement_action acro_wheelie_jump_left, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_LEFT + create_movement_action acro_wheelie_jump_right, MOVEMENT_ACTION_ACRO_WHEELIE_JUMP_RIGHT + create_movement_action acro_wheelie_in_place_down, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_DOWN + create_movement_action acro_wheelie_in_place_up, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_UP + create_movement_action acro_wheelie_in_place_left, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_LEFT + create_movement_action acro_wheelie_in_place_right, MOVEMENT_ACTION_ACRO_WHEELIE_IN_PLACE_RIGHT + create_movement_action acro_pop_wheelie_move_down, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_DOWN + create_movement_action acro_pop_wheelie_move_up, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_UP + create_movement_action acro_pop_wheelie_move_left, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_LEFT + create_movement_action acro_pop_wheelie_move_right, MOVEMENT_ACTION_ACRO_POP_WHEELIE_MOVE_RIGHT + create_movement_action acro_wheelie_move_down, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_DOWN + create_movement_action acro_wheelie_move_up, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_UP + create_movement_action acro_wheelie_move_left, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_LEFT + create_movement_action acro_wheelie_move_right, MOVEMENT_ACTION_ACRO_WHEELIE_MOVE_RIGHT + create_movement_action acro_end_wheelie_move_down, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_DOWN + create_movement_action acro_end_wheelie_move_up, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_UP + create_movement_action acro_end_wheelie_move_left, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_LEFT + create_movement_action acro_end_wheelie_move_right, MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_RIGHT + create_movement_action walk_diag_northwest, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_LEFT + create_movement_action walk_diag_northeast, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_UP_RIGHT + create_movement_action walk_diag_southwest, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_LEFT + create_movement_action walk_diag_southeast, MOVEMENT_ACTION_WALK_NORMAL_DIAGONAL_DOWN_RIGHT + create_movement_action walk_slow_diag_northwest, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_LEFT + create_movement_action walk_slow_diag_northeast, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_UP_RIGHT + create_movement_action walk_slow_diag_southwest, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_LEFT + create_movement_action walk_slow_diag_southeast, MOVEMENT_ACTION_WALK_SLOW_DIAGONAL_DOWN_RIGHT + create_movement_action store_lock_anim, MOVEMENT_ACTION_STORE_AND_LOCK_ANIM + create_movement_action free_unlock_anim, MOVEMENT_ACTION_FREE_AND_UNLOCK_ANIM + create_movement_action walk_left_affine, MOVEMENT_ACTION_WALK_LEFT_AFFINE + create_movement_action walk_right_affine, MOVEMENT_ACTION_WALK_RIGHT_AFFINE + create_movement_action levitate, MOVEMENT_ACTION_LEVITATE + create_movement_action stop_levitate, MOVEMENT_ACTION_STOP_LEVITATE + create_movement_action destroy_extra_task, MOVEMENT_ACTION_STOP_LEVITATE_AT_TOP + create_movement_action figure_8, MOVEMENT_ACTION_FIGURE_8 + create_movement_action fly_up, MOVEMENT_ACTION_FLY_UP + create_movement_action fly_down, MOVEMENT_ACTION_FLY_DOWN - enum_start 0x8C - create_movement_action walk_diag_northwest - create_movement_action walk_diag_northeast - create_movement_action walk_diag_southwest - create_movement_action walk_diag_southeast - create_movement_action walk_slow_diag_northwest - create_movement_action walk_slow_diag_northeast - create_movement_action walk_slow_diag_southwest - create_movement_action walk_slow_diag_southeast - create_movement_action store_lock_anim - create_movement_action free_unlock_anim - create_movement_action walk_left_affine - create_movement_action walk_right_affine - create_movement_action levitate - create_movement_action stop_levitate - create_movement_action destroy_extra_task - create_movement_action figure_8 - create_movement_action fly_up - create_movement_action fly_down - - enum_start 0xfe - create_movement_action step_end + create_movement_action step_end, MOVEMENT_ACTION_STEP_END From 9d18ad0b5a01f17163dd6cb4228a1f7bb72e43a1 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Thu, 18 Nov 2021 03:07:09 +0800 Subject: [PATCH 194/417] Make arguments for create_movement_action required --- asm/macros/movement.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asm/macros/movement.inc b/asm/macros/movement.inc index 2e52ba11d3..62618379b6 100644 --- a/asm/macros/movement.inc +++ b/asm/macros/movement.inc @@ -1,4 +1,4 @@ - .macro create_movement_action name, value + .macro create_movement_action name:req, value:req .macro \name .byte \value .endm From eb95ac0b9ce342a39955679bbd7df32e54675d70 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 16 Nov 2021 21:34:47 -0500 Subject: [PATCH 195/417] Document field_tasks --- asm/macros/event.inc | 2 +- include/constants/metatile_behaviors.h | 8 +- include/constants/metatile_labels.h | 32 +- include/metatile_behavior.h | 8 +- src/field_tasks.c | 969 +++++++++++++++---------- src/metatile_behavior.c | 32 +- src/secret_base.c | 191 +++-- 7 files changed, 716 insertions(+), 526 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index d077103dcd..4c0bc2922a 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1298,7 +1298,7 @@ .byte 0xa5 .endm - @ Enables a function that gets called every step by Task_RunPerStepCallback. + @ .macro setstepcallback subroutine:req .byte 0xa6 .byte \subroutine diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h index dde8213587..5f37713f30 100755 --- a/include/constants/metatile_behaviors.h +++ b/include/constants/metatile_behaviors.h @@ -117,10 +117,10 @@ #define MB_BRIDGE_OVER_POND_LOW 0x71 #define MB_BRIDGE_OVER_POND_MED 0x72 #define MB_BRIDGE_OVER_POND_HIGH 0x73 -#define MB_PACIFIDLOG_VERTICAL_LOG_1 0x74 -#define MB_PACIFIDLOG_VERTICAL_LOG_2 0x75 -#define MB_PACIFIDLOG_HORIZONTAL_LOG_1 0x76 -#define MB_PACIFIDLOG_HORIZONTAL_LOG_2 0x77 +#define MB_PACIFIDLOG_VERTICAL_LOG_TOP 0x74 +#define MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM 0x75 +#define MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT 0x76 +#define MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT 0x77 #define MB_FORTREE_BRIDGE 0x78 #define MB_UNUSED_79 0x79 #define MB_BRIDGE_OVER_POND_MED_EDGE_1 0x7A diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index 5191200828..3c484e39a2 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -182,22 +182,22 @@ #define METATILE_Cave_ShoalCave_BlueStone_Small 0x35B // gTileset_Pacifidlog -#define METATILE_Pacifidlog_Door 0x21A -#define METATILE_Pacifidlog_FloatingLogs_Horizontal0 0x250 -#define METATILE_Pacifidlog_FloatingLogs_Horizontal1 0x251 -#define METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal0 0x252 -#define METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal1 0x253 -#define METATILE_Pacifidlog_SubmergedLogs_Horizontal0 0x254 -#define METATILE_Pacifidlog_SubmergedLogs_Horizontal1 0x255 -#define METATILE_Pacifidlog_FloatingLogs_Vertical0 0x258 -#define METATILE_Pacifidlog_FloatingLogs_Vertical1 0x260 -#define METATILE_Pacifidlog_HalfSubmergedLogs_Vertical0 0x259 -#define METATILE_Pacifidlog_HalfSubmergedLogs_Vertical1 0x261 -#define METATILE_Pacifidlog_SubmergedLogs_Vertical0 0x25A -#define METATILE_Pacifidlog_SubmergedLogs_Vertical1 0x262 -#define METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole 0x237 -#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Top 0x2AA -#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom 0x2B2 +#define METATILE_Pacifidlog_Door 0x21A +#define METATILE_Pacifidlog_FloatingLogs_HorizontalLeft 0x250 +#define METATILE_Pacifidlog_FloatingLogs_HorizontalRight 0x251 +#define METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalLeft 0x252 +#define METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalRight 0x253 +#define METATILE_Pacifidlog_SubmergedLogs_HorizontalLeft 0x254 +#define METATILE_Pacifidlog_SubmergedLogs_HorizontalRight 0x255 +#define METATILE_Pacifidlog_FloatingLogs_VerticalTop 0x258 +#define METATILE_Pacifidlog_FloatingLogs_VerticalBottom 0x260 +#define METATILE_Pacifidlog_HalfSubmergedLogs_VerticalTop 0x259 +#define METATILE_Pacifidlog_HalfSubmergedLogs_VerticalBottom 0x261 +#define METATILE_Pacifidlog_SubmergedLogs_VerticalTop 0x25A +#define METATILE_Pacifidlog_SubmergedLogs_VerticalBottom 0x262 +#define METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole 0x237 +#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Top 0x2AA +#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom 0x2B2 // gTileset_Fortree #define METATILE_Fortree_LongGrass_Root 0x208 diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index 23c84dffb1..5895426cf0 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -102,10 +102,10 @@ bool8 MetatileBehavior_IsShortGrass(u8); bool8 MetatileBehavior_IsHotSprings(u8); bool8 MetatileBehavior_IsWaterfall(u8); bool8 MetatileBehavior_IsFortreeBridge(u8); -bool8 MetatileBehavior_IsPacifidlogVerticalLog1(u8); -bool8 MetatileBehavior_IsPacifidlogVerticalLog2(u8); -bool8 MetatileBehavior_IsPacifidlogHorizontalLog1(u8); -bool8 MetatileBehavior_IsPacifidlogHorizontalLog2(u8); +bool8 MetatileBehavior_IsPacifidlogVerticalLogTop(u8); +bool8 MetatileBehavior_IsPacifidlogVerticalLogBottom(u8); +bool8 MetatileBehavior_IsPacifidlogHorizontalLogLeft(u8); +bool8 MetatileBehavior_IsPacifidlogHorizontalLogRight(u8); bool8 MetatileBehavior_IsPacifidlogLog(u8); bool8 MetatileBehavior_IsTrickHousePuzzleDoor(u8); bool8 MetatileBehavior_IsRegionMap(u8); diff --git a/src/field_tasks.c b/src/field_tasks.c index 187270f7a8..760d853693 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -21,20 +21,40 @@ #include "constants/songs.h" #include "constants/metatile_labels.h" +/* This file handles some persistent tasks that run in the overworld. + * - Task_RunTimeBasedEvents: Periodically updates local time and RTC events. Also triggers ambient cries. + * - Task_MuddySlope: Handles the metatile animation when the player steps on muddy slopes. + * - Task_RunPerStepCallback: Calls one of the functions in sPerStepCallbacks, listed below... + * . DummyPerStepCallback: Default, does nothing + * . AshGrassPerStepCallback: Removes the ash from ash-covered grass that the player steps on. + * . FortreeBridgePerStepCallback: Depresses Fortree log bridges that the player steps on. + * . PacifidlogBridgePerStepCallback: Submerges Pacifidlog log bridges that the player steps on. + * . SootopolisGymIcePerStepCallback: Cracks/breaks ice in Sootopolis Gym that the player steps on. + * . EndTruckSequence: Sets the moving truck boxes to their final position when the truck sequence ends. + * . SecretBasePerStepCallback: Records the decorations in a friend's secret base that the player steps on. + * . CrackedFloorPerStepCallback: Breaks cracked floors that the player steps on. + * + * NOTE: "PerStep" is perhaps misleading. One function in sPerStepCallbacks is called + * every frame while in the overworld by Task_RunPerStepCallback regardless of + * whether or not steps are being taken. However, nearly all of the functions in + * the table check if the player has moved from their previous position before + * doing anything else. + */ + struct PacifidlogMetatileOffsets { s8 x; s8 y; - u16 tileId; + u16 metatileId; }; -static void DummyPerStepCallback(u8 taskId); -static void AshGrassPerStepCallback(u8 taskId); -static void FortreeBridgePerStepCallback(u8 taskId); -static void PacifidlogBridgePerStepCallback(u8 taskId); -static void SootopolisGymIcePerStepCallback(u8 taskId); -static void CrackedFloorPerStepCallback(u8 taskId); -static void Task_MuddySlope(u8 taskId); +static void DummyPerStepCallback(u8); +static void AshGrassPerStepCallback(u8); +static void FortreeBridgePerStepCallback(u8); +static void PacifidlogBridgePerStepCallback(u8); +static void SootopolisGymIcePerStepCallback(u8); +static void CrackedFloorPerStepCallback(u8); +static void Task_MuddySlope(u8); static const TaskFunc sPerStepCallbacks[] = { @@ -48,29 +68,35 @@ static const TaskFunc sPerStepCallbacks[] = [STEP_CB_CRACKED_FLOOR] = CrackedFloorPerStepCallback }; -// they are in pairs but declared as 1D array +// Each array has 4 pairs of data, each pair representing two metatiles of a log and their relative position. +// The 4 pairs are for: +// 0: If the player is standing on the top of a vertical log +// 1: If the player is standing on the bottom of a vertical log +// 2: If the player is standing on the left of a horizontal log +// 3: If the player is standing on the right of a horizontal log +// i.e. the element with an offset of 0,0 is the one the player is standing on. static const struct PacifidlogMetatileOffsets sHalfSubmergedBridgeMetatileOffsets[] = { - { 0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Vertical0}, {0, 1, METATILE_Pacifidlog_HalfSubmergedLogs_Vertical1}, - { 0, -1, METATILE_Pacifidlog_HalfSubmergedLogs_Vertical0}, {0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Vertical1}, - { 0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal0}, {1, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal1}, - {-1, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal0}, {0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal1} + { 0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_VerticalTop}, {0, 1, METATILE_Pacifidlog_HalfSubmergedLogs_VerticalBottom}, + { 0, -1, METATILE_Pacifidlog_HalfSubmergedLogs_VerticalTop}, {0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_VerticalBottom}, + { 0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalLeft}, {1, 0, METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalRight}, + {-1, 0, METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalLeft}, {0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalRight} }; static const struct PacifidlogMetatileOffsets sFullySubmergedBridgeMetatileOffsets[] = { - { 0, 0, METATILE_Pacifidlog_SubmergedLogs_Vertical0}, {0, 1, METATILE_Pacifidlog_SubmergedLogs_Vertical1}, - { 0, -1, METATILE_Pacifidlog_SubmergedLogs_Vertical0}, {0, 0, METATILE_Pacifidlog_SubmergedLogs_Vertical1}, - { 0, 0, METATILE_Pacifidlog_SubmergedLogs_Horizontal0}, {1, 0, METATILE_Pacifidlog_SubmergedLogs_Horizontal1}, - {-1, 0, METATILE_Pacifidlog_SubmergedLogs_Horizontal0}, {0, 0, METATILE_Pacifidlog_SubmergedLogs_Horizontal1} + { 0, 0, METATILE_Pacifidlog_SubmergedLogs_VerticalTop}, {0, 1, METATILE_Pacifidlog_SubmergedLogs_VerticalBottom}, + { 0, -1, METATILE_Pacifidlog_SubmergedLogs_VerticalTop}, {0, 0, METATILE_Pacifidlog_SubmergedLogs_VerticalBottom}, + { 0, 0, METATILE_Pacifidlog_SubmergedLogs_HorizontalLeft}, {1, 0, METATILE_Pacifidlog_SubmergedLogs_HorizontalRight}, + {-1, 0, METATILE_Pacifidlog_SubmergedLogs_HorizontalLeft}, {0, 0, METATILE_Pacifidlog_SubmergedLogs_HorizontalRight} }; static const struct PacifidlogMetatileOffsets sFloatingBridgeMetatileOffsets[] = { - { 0, 0, METATILE_Pacifidlog_FloatingLogs_Vertical0}, {0, 1, METATILE_Pacifidlog_FloatingLogs_Vertical1}, - { 0, -1, METATILE_Pacifidlog_FloatingLogs_Vertical0}, {0, 0, METATILE_Pacifidlog_FloatingLogs_Vertical1}, - { 0, 0, METATILE_Pacifidlog_FloatingLogs_Horizontal0}, {1, 0, METATILE_Pacifidlog_FloatingLogs_Horizontal1}, - {-1, 0, METATILE_Pacifidlog_FloatingLogs_Horizontal0}, {0, 0, METATILE_Pacifidlog_FloatingLogs_Horizontal1} + { 0, 0, METATILE_Pacifidlog_FloatingLogs_VerticalTop}, {0, 1, METATILE_Pacifidlog_FloatingLogs_VerticalBottom}, + { 0, -1, METATILE_Pacifidlog_FloatingLogs_VerticalTop}, {0, 0, METATILE_Pacifidlog_FloatingLogs_VerticalBottom}, + { 0, 0, METATILE_Pacifidlog_FloatingLogs_HorizontalLeft}, {1, 0, METATILE_Pacifidlog_FloatingLogs_HorizontalRight}, + {-1, 0, METATILE_Pacifidlog_FloatingLogs_HorizontalLeft}, {0, 0, METATILE_Pacifidlog_FloatingLogs_HorizontalRight} }; // Each element corresponds to a y coordinate row in the sootopolis gym 1F map. @@ -104,16 +130,11 @@ static const u16 sSootopolisGymIceRowVars[] = 0 }; -static const u16 sMuddySlopeMetatiles[] = { - METATILE_General_MuddySlope_Frame0, - METATILE_General_MuddySlope_Frame3, - METATILE_General_MuddySlope_Frame2, - METATILE_General_MuddySlope_Frame1 -}; +#define tCallbackId data[0] static void Task_RunPerStepCallback(u8 taskId) { - int idx = gTasks[taskId].data[0]; + int idx = gTasks[taskId].tCallbackId; sPerStepCallbacks[idx](taskId); } @@ -121,23 +142,23 @@ static void Task_RunPerStepCallback(u8 taskId) #define tAmbientCryState data[1] #define tAmbientCryDelay data[2] +#define TIME_UPDATE_INTERVAL (1 << 12) + static void RunTimeBasedEvents(s16 *data) { switch (tState) { - case 0: - if (gMain.vblankCounter1 & 0x1000) - { - DoTimeBasedEvents(); - tState++; - } - break; - case 1: - if (!(gMain.vblankCounter1 & 0x1000)) - { - tState--; - } - break; + case 0: + if (gMain.vblankCounter1 & TIME_UPDATE_INTERVAL) + { + DoTimeBasedEvents(); + tState++; + } + break; + case 1: + if (!(gMain.vblankCounter1 & TIME_UPDATE_INTERVAL)) + tState--; + break; } } @@ -153,22 +174,20 @@ static void Task_RunTimeBasedEvents(u8 taskId) } #undef tState -#undef tAmbientCryState -#undef tAmbientCryDelay void SetUpFieldTasks(void) { if (!FuncIsActiveTask(Task_RunPerStepCallback)) { - u8 taskId = CreateTask(Task_RunPerStepCallback, 0x50); - gTasks[taskId].data[0] = 0; + u8 taskId = CreateTask(Task_RunPerStepCallback, 80); + gTasks[taskId].tCallbackId = STEP_CB_DUMMY; } if (!FuncIsActiveTask(Task_MuddySlope)) - CreateTask(Task_MuddySlope, 0x50); + CreateTask(Task_MuddySlope, 80); if (!FuncIsActiveTask(Task_RunTimeBasedEvents)) - CreateTask(Task_RunTimeBasedEvents, 0x50); + CreateTask(Task_RunTimeBasedEvents, 80); } void ActivatePerStepCallback(u8 callbackId) @@ -179,17 +198,13 @@ void ActivatePerStepCallback(u8 callbackId) s32 i; s16 *data = gTasks[taskId].data; - for (i = 0; i < 16; i++) + for (i = 0; i < NUM_TASK_DATA; i++) data[i] = 0; if (callbackId >= ARRAY_COUNT(sPerStepCallbacks)) - { - data[0] = 0; - } + tCallbackId = STEP_CB_DUMMY; else - { - data[0] = callbackId; - } + tCallbackId = callbackId; } } @@ -200,18 +215,20 @@ void ResetFieldTasksArgs(void) taskId = FindTaskIdByFunc(Task_RunPerStepCallback); if (taskId != TASK_NONE) - { data = gTasks[taskId].data; - } + taskId = FindTaskIdByFunc(Task_RunTimeBasedEvents); if (taskId != TASK_NONE) { data = gTasks[taskId].data; - data[1] = 0; - data[2] = 0; + tAmbientCryState = 0; + tAmbientCryDelay = 0; } } +#undef tAmbientCryState +#undef tAmbientCryDelay + static void DummyPerStepCallback(u8 taskId) { @@ -219,101 +236,129 @@ static void DummyPerStepCallback(u8 taskId) static const struct PacifidlogMetatileOffsets *GetPacifidlogBridgeMetatileOffsets(const struct PacifidlogMetatileOffsets *offsets, u16 metatileBehavior) { - if (MetatileBehavior_IsPacifidlogVerticalLog1(metatileBehavior)) + if (MetatileBehavior_IsPacifidlogVerticalLogTop(metatileBehavior)) return &offsets[0 * 2]; - else if (MetatileBehavior_IsPacifidlogVerticalLog2(metatileBehavior)) + else if (MetatileBehavior_IsPacifidlogVerticalLogBottom(metatileBehavior)) return &offsets[1 * 2]; - else if (MetatileBehavior_IsPacifidlogHorizontalLog1(metatileBehavior)) + else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(metatileBehavior)) return &offsets[2 * 2]; - else if (MetatileBehavior_IsPacifidlogHorizontalLog2(metatileBehavior)) + else if (MetatileBehavior_IsPacifidlogHorizontalLogRight(metatileBehavior)) return &offsets[3 * 2]; else return NULL; } -static void SetPacifidlogBridgeMetatiles(const struct PacifidlogMetatileOffsets *offsets, s16 x, s16 y, bool32 redrawMap) +static void TrySetPacifidlogBridgeMetatiles(const struct PacifidlogMetatileOffsets *offsets, s16 x, s16 y, bool32 redrawMap) { offsets = GetPacifidlogBridgeMetatileOffsets(offsets, MapGridGetMetatileBehaviorAt(x, y)); + + // If offsets is NULL, position is not a log (don't set it) if (offsets) { - MapGridSetMetatileIdAt(x + offsets[0].x, y + offsets[0].y, offsets[0].tileId); + // Set both metatiles of the log + MapGridSetMetatileIdAt(x + offsets[0].x, y + offsets[0].y, offsets[0].metatileId); if (redrawMap) CurrentMapDrawMetatileAt(x + offsets[0].x, y + offsets[0].y); - MapGridSetMetatileIdAt(x + offsets[1].x, y + offsets[1].y, offsets[1].tileId); + MapGridSetMetatileIdAt(x + offsets[1].x, y + offsets[1].y, offsets[1].metatileId); if (redrawMap) CurrentMapDrawMetatileAt(x + offsets[1].x, y + offsets[1].y); } } -static void UpdateHalfSubmergedBridgeMetatiles(s16 x, s16 y, bool32 redrawMap) +static void TrySetLogBridgeHalfSubmerged(s16 x, s16 y, bool32 redrawMap) { - SetPacifidlogBridgeMetatiles(sHalfSubmergedBridgeMetatileOffsets, x, y, redrawMap); + TrySetPacifidlogBridgeMetatiles(sHalfSubmergedBridgeMetatileOffsets, x, y, redrawMap); } -static void UpdateFullySubmergedBridgeMetatiles(s16 x, s16 y, bool32 redrawMap) +static void TrySetLogBridgeFullySubmerged(s16 x, s16 y, bool32 redrawMap) { - SetPacifidlogBridgeMetatiles(sFullySubmergedBridgeMetatileOffsets, x, y, redrawMap); + TrySetPacifidlogBridgeMetatiles(sFullySubmergedBridgeMetatileOffsets, x, y, redrawMap); } -static void UpdateFloatingBridgeMetatiles(s16 x, s16 y, bool32 redrawMap) +static void TrySetLogBridgeFloating(s16 x, s16 y, bool32 redrawMap) { - SetPacifidlogBridgeMetatiles(sFloatingBridgeMetatileOffsets, x, y, redrawMap); + TrySetPacifidlogBridgeMetatiles(sFloatingBridgeMetatileOffsets, x, y, redrawMap); } -static bool32 StandingOnNewPacifidlogBridge(s16 x1, s16 y1, s16 x2, s16 y2) +// Returns FALSE if player has moved from one end of a log to the other (log should remain submerged). +// Otherwise it returns TRUE. +static bool32 ShouldRaisePacifidlogLogs(s16 newX, s16 newY, s16 oldX, s16 oldY) { - u16 metatileBehavior = MapGridGetMetatileBehaviorAt(x2, y2); + u16 oldBehavior = MapGridGetMetatileBehaviorAt(oldX, oldY); - if (MetatileBehavior_IsPacifidlogVerticalLog1(metatileBehavior)) + if (MetatileBehavior_IsPacifidlogVerticalLogTop(oldBehavior)) { - if (y1 > y2) + // Still on same one if moved from top to bottom + if (newY > oldY) return FALSE; } - else if (MetatileBehavior_IsPacifidlogVerticalLog2(metatileBehavior)) + else if (MetatileBehavior_IsPacifidlogVerticalLogBottom(oldBehavior)) { - if (y1 < y2) + // Still on same one if moved from bottom to top + if (newY < oldY) return FALSE; } - else if (MetatileBehavior_IsPacifidlogHorizontalLog1(metatileBehavior)) + else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(oldBehavior)) { - if (x1 > x2) + // Still on same one if moved from left to right + if (newX > oldX) return FALSE; } - else if (MetatileBehavior_IsPacifidlogHorizontalLog2(metatileBehavior)) + else if (MetatileBehavior_IsPacifidlogHorizontalLogRight(oldBehavior)) { - if (x1 < x2) + // Still on same one if moved from right to left + if (newX < oldX) + return FALSE; + } + + // Player is either on a different log or no log at all + return TRUE; +} + +// Returns FALSE if player has moved from one end of a log to the other (log should remain submerged). +// Otherwise it returns TRUE. +// This is the effectively the same as ShouldRaisePacifidlogLogs, as it swaps both the conditions and which position's behavior to check. +// In effect the previous function asks "was the player's previous position not the other end of a log they're standing on?" +// while this function asks "is the player's current position not the other end of a log they were previously standing on?" +// and with the same positions both questions always have the same answer. +static bool32 ShouldSinkPacifidlogLogs(s16 newX, s16 newY, s16 oldX, s16 oldY) +{ + u16 newBehavior = MapGridGetMetatileBehaviorAt(newX, newY); + + if (MetatileBehavior_IsPacifidlogVerticalLogTop(newBehavior)) + { + // Still on same one if moved from bottom to top + if (newY < oldY) + return FALSE; + } + else if (MetatileBehavior_IsPacifidlogVerticalLogBottom(newBehavior)) + { + // Still on same one if moved from top to bottom + if (newY > oldY) + return FALSE; + } + else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(newBehavior)) + { + // Still on same one if moved from right to left + if (newX < oldX) + return FALSE; + } + else if (MetatileBehavior_IsPacifidlogHorizontalLogRight(newBehavior)) + { + // Still on same one if moved from left to right + if (newX > oldX) return FALSE; } return TRUE; } -static bool32 StandingOnSamePacifidlogBridge(s16 x1, s16 y1, s16 x2, s16 y2) -{ - u16 metatileBehavior = MapGridGetMetatileBehaviorAt(x1, y1); - - if (MetatileBehavior_IsPacifidlogVerticalLog1(metatileBehavior)) - { - if (y1 < y2) - return FALSE; - } - else if (MetatileBehavior_IsPacifidlogVerticalLog2(metatileBehavior)) - { - if (y1 > y2) - return FALSE; - } - else if (MetatileBehavior_IsPacifidlogHorizontalLog1(metatileBehavior)) - { - if (x1 < x2) - return FALSE; - } - else if (MetatileBehavior_IsPacifidlogHorizontalLog2(metatileBehavior)) - { - if (x1 > x2) - return FALSE; - } - return TRUE; -} +#define tState data[1] +#define tPrevX data[2] +#define tPrevY data[3] +#define tToRaiseX data[4] +#define tToRaiseY data[5] +#define tDelay data[6] static void PacifidlogBridgePerStepCallback(u8 taskId) { @@ -321,180 +366,247 @@ static void PacifidlogBridgePerStepCallback(u8 taskId) s16 x, y; data = gTasks[taskId].data; PlayerGetDestCoords(&x, &y); - switch (data[1]) + switch (tState) { - case 0: - data[2] = x; - data[3] = y; - UpdateFullySubmergedBridgeMetatiles(x, y, TRUE); - data[1] = 1; - break; - case 1: - if (x != data[2] || y != data[3]) - { - if (StandingOnNewPacifidlogBridge(x, y, data[2], data[3])) - { - UpdateHalfSubmergedBridgeMetatiles(data[2], data[3], TRUE); - UpdateFloatingBridgeMetatiles(data[2], data[3], FALSE); - data[4] = data[2]; - data[5] = data[3]; - data[1] = 2; - data[6] = 8; - } - else - { - data[4] = -1; - data[5] = -1; - } + case 0: + tPrevX = x; + tPrevY = y; + + // If player is already standing on a log when the callback + // is set then immediately set it to submerged + TrySetLogBridgeFullySubmerged(x, y, TRUE); + tState = 1; + break; + case 1: + // Skip if player hasn't moved + if (x == tPrevX && y == tPrevY) + return; - if (StandingOnSamePacifidlogBridge(x, y, data[2], data[3])) - { - UpdateHalfSubmergedBridgeMetatiles(x, y, TRUE); - data[1] = 2; - data[6] = 8; - } + if (ShouldRaisePacifidlogLogs(x, y, tPrevX, tPrevY)) + { + // Player's previous position is not the other end of a log + // they're standing on, try and set it half-submerged (rising to surface). + // The floating metatile is queued up by setting it but not drawing it, + // but this is pointless as state 2 will handle it in full anyway. + TrySetLogBridgeHalfSubmerged(tPrevX, tPrevY, TRUE); + TrySetLogBridgeFloating(tPrevX, tPrevY, FALSE); + tToRaiseX = tPrevX; + tToRaiseY = tPrevY; + tState = 2; + tDelay = 8; + } + else + { + // Player has moved but is still on the same log bridge section. + // Keep it submerged. + tToRaiseX = -1; + tToRaiseY = -1; + } - data[2] = x; - data[3] = y; - if (MetatileBehavior_IsPacifidlogLog(MapGridGetMetatileBehaviorAt(x, y))) - PlaySE(SE_PUDDLE); - } - break; - case 2: - if ((--data[6]) == 0) - { - UpdateFullySubmergedBridgeMetatiles(x, y, TRUE); - if (data[4] != -1 && data[5] != -1) - UpdateFloatingBridgeMetatiles(data[4], data[5], TRUE); + if (ShouldSinkPacifidlogLogs(x, y, tPrevX, tPrevY)) + { + // Player's current position is not the other end of a log + // they were previously standing on, try and set it half-submerged (sinking) + TrySetLogBridgeHalfSubmerged(x, y, TRUE); + tState = 2; + tDelay = 8; + } - data[1] = 1; - } - break; + tPrevX = x; + tPrevY = y; + + // If player's new position is a log play the puddle SE + if (MetatileBehavior_IsPacifidlogLog(MapGridGetMetatileBehaviorAt(x, y))) + PlaySE(SE_PUDDLE); + break; + case 2: + if (--tDelay == 0) + { + // If player's current position is a log submerge it fully. + TrySetLogBridgeFullySubmerged(x, y, TRUE); + + // Player's previous position is not the other end of a log + // they're standing on, try to raise their previous position. + if (tToRaiseX != -1 && tToRaiseY != -1) + TrySetLogBridgeFloating(tToRaiseX, tToRaiseY, TRUE); + + tState = 1; + } + break; } } -static void SetLoweredForetreeBridgeMetatile(s16 x, s16 y) +#undef tState +#undef tPrevX +#undef tPrevY +#undef tToRaiseX +#undef tToRaiseY +#undef tDelay + +static void TryLowerFortreeBridge(s16 x, s16 y) { u8 z = PlayerGetZCoord(); if (!(z & 1)) { switch (MapGridGetMetatileIdAt(x, y)) { - case METATILE_Fortree_BridgeOverGrass_Raised: - MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverGrass_Lowered); - break; - case METATILE_Fortree_BridgeOverTrees_Raised: - MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverTrees_Lowered); - break; + case METATILE_Fortree_BridgeOverGrass_Raised: + MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverGrass_Lowered); + break; + case METATILE_Fortree_BridgeOverTrees_Raised: + MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverTrees_Lowered); + break; } } } -static void SetNormalFortreeBridgeMetatile(s16 x, s16 y) +static void TryRaiseFortreeBridge(s16 x, s16 y) { u8 z = PlayerGetZCoord(); if (!(z & 1)) { switch (MapGridGetMetatileIdAt(x, y)) { - case METATILE_Fortree_BridgeOverGrass_Lowered: - MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverGrass_Raised); - break; - case METATILE_Fortree_BridgeOverTrees_Lowered: - MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverTrees_Raised); - break; + case METATILE_Fortree_BridgeOverGrass_Lowered: + MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverGrass_Raised); + break; + case METATILE_Fortree_BridgeOverTrees_Lowered: + MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverTrees_Raised); + break; } } } +#define tState data[1] +#define tPrevX data[2] +#define tPrevY data[3] +#define tOldBridgeX data[4] +#define tOldBridgeY data[5] +#define tBounceTime data[6] + static void FortreeBridgePerStepCallback(u8 taskId) { bool8 isFortreeBridgeCur; bool8 isFortreeBridgePrev; - u8 z, flag; - s16 x, y, x2, y2; + u8 z, onBridgeElevation; + s16 x, y, prevX, prevY; s16 *data = gTasks[taskId].data; PlayerGetDestCoords(&x, &y); - switch (data[1]) + switch (tState) { - default: + default: + break; + case 0: + tPrevX = x; + tPrevY = y; + + // If player is already on bridge when callback is set then lower it immediately. + if (MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y))) + { + TryLowerFortreeBridge(x, y); + CurrentMapDrawMetatileAt(x, y); + } + tState = 1; + break; + case 1: + prevX = tPrevX; + prevY = tPrevY; + + // Skip if player hasn't moved + if (x == prevX && y == prevY) break; + + isFortreeBridgeCur = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y)); + isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(prevX, prevY)); + + // Make sure player isn't below bridge + z = PlayerGetZCoord(); + onBridgeElevation = FALSE; + if ((u8)(z & 1) == 0) + onBridgeElevation = TRUE; + + if (onBridgeElevation && (isFortreeBridgeCur == TRUE || isFortreeBridgePrev == TRUE)) + PlaySE(SE_BRIDGE_WALK); + + // Because this doesn't check for isFortreeBridgeCur, bridge sections aren't + // lowered when first stepping onto them from anything other than another bridge. + #ifdef BUGFIX + if (isFortreeBridgePrev || isFortreeBridgeCur) + #else + if (isFortreeBridgePrev) + #endif + { + // Raise old bridge + TryRaiseFortreeBridge(prevX, prevY); + CurrentMapDrawMetatileAt(prevX, prevY); + + // Lower new bridge + TryLowerFortreeBridge(x, y); + CurrentMapDrawMetatileAt(x, y); + } + + // These should really be set below the !isFortreeBridgePrev conditional, + // but it doesn't matter because it's not read until case 2 anyway. + tOldBridgeX = prevX; + tOldBridgeY = prevY; + + tPrevX = x; + tPrevY = y; + if (!isFortreeBridgePrev) + break; + + tBounceTime = 16; + tState = 2; + // fallthrough + case 2: + tBounceTime--; + prevX = tOldBridgeX; + prevY = tOldBridgeY; + switch (tBounceTime % 7) + { case 0: - data[2] = x; - data[3] = y; - if (MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y))) - { - SetLoweredForetreeBridgeMetatile(x, y); - CurrentMapDrawMetatileAt(x, y); - } - data[1] = 1; - break; + CurrentMapDrawMetatileAt(prevX, prevY); case 1: - x2 = data[2]; - y2 = data[3]; - if (x == x2 && y == y2) - break; - - isFortreeBridgeCur = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y)); - isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x2, y2)); - z = PlayerGetZCoord(); - flag = 0; - if ((u8)(z & 1) == 0) - flag = 1; - - if (flag && (isFortreeBridgeCur == 1 || isFortreeBridgePrev == 1)) - PlaySE(SE_BRIDGE_WALK); - - if (isFortreeBridgePrev) - { - SetNormalFortreeBridgeMetatile(x2, y2); - CurrentMapDrawMetatileAt(x2, y2); - SetLoweredForetreeBridgeMetatile(x, y); - CurrentMapDrawMetatileAt(x, y); - } - - data[4] = x2; - data[5] = y2; - data[2] = x; - data[3] = y; - if (!isFortreeBridgePrev) - break; - - data[6] = 16; - data[1] = 2; - // fallthrough case 2: - data[6]--; - x2 = data[4]; - y2 = data[5]; - switch (data[6] % 7) - { - case 0: - CurrentMapDrawMetatileAt(x2, y2); - case 1: - case 2: - case 3: - break; - case 4: - SetLoweredForetreeBridgeMetatile(x2, y2); - CurrentMapDrawMetatileAt(x2, y2); - SetNormalFortreeBridgeMetatile(x2, y2); - case 5: - case 6: - case 7: - break; - } - if (data[6] == 0) - { - data[1] = 1; - } + case 3: break; + case 4: + // Bounce bridge section that player has stepped off of + TryLowerFortreeBridge(prevX, prevY); + CurrentMapDrawMetatileAt(prevX, prevY); + TryRaiseFortreeBridge(prevX, prevY); + case 5: + case 6: + case 7: // Not possible with % 7 + break; + } + if (tBounceTime == 0) + tState = 1; + break; } } +#undef tState +#undef tPrevX +#undef tPrevY +#undef tOldBridgeX +#undef tOldBridgeY +#undef tBounceTime + +// Boundaries of the ice puzzle in Sootopolis Gym +#define ICE_PUZZLE_L 3 +#define ICE_PUZZLE_R 13 +#define ICE_PUZZLE_T 6 +#define ICE_PUZZLE_B 19 + +#define ICE_PUZZLE_WIDTH (ICE_PUZZLE_R - ICE_PUZZLE_L + 1) +#define ICE_PUZZLE_HEIGHT (ICE_PUZZLE_B - ICE_PUZZLE_T + 1) + static bool32 CoordInIcePuzzleRegion(s16 x, s16 y) { - if ((u16)(x - 3) < 11 && (u16)(y - 6) < 14 && sSootopolisGymIceRowVars[y]) + if ((u16)(x - ICE_PUZZLE_L) < ICE_PUZZLE_WIDTH + && (u16)(y - ICE_PUZZLE_T) < ICE_PUZZLE_HEIGHT + && sSootopolisGymIceRowVars[y]) return TRUE; else return FALSE; @@ -503,17 +615,17 @@ static bool32 CoordInIcePuzzleRegion(s16 x, s16 y) static void MarkIcePuzzleCoordVisited(s16 x, s16 y) { if (CoordInIcePuzzleRegion(x, y)) - *GetVarPointer(sSootopolisGymIceRowVars[y]) |= (1 << (x - 3)); + *GetVarPointer(sSootopolisGymIceRowVars[y]) |= (1 << (x - ICE_PUZZLE_L)); } static bool32 IsIcePuzzleCoordVisited(s16 x, s16 y) { - u32 var; + u16 var; if (!CoordInIcePuzzleRegion(x, y)) return FALSE; - var = VarGet(sSootopolisGymIceRowVars[y]) << 16; - if ((0x10000 << (x - 3)) & var) // TODO: fix that if + var = VarGet(sSootopolisGymIceRowVars[y]); + if (var &= (1 << (x - ICE_PUZZLE_L))) return TRUE; else return FALSE; @@ -534,116 +646,155 @@ void SetSootopolisGymCrackedIceMetatiles(void) } } +#define tState data[1] +#define tPrevX data[2] +#define tPrevY data[3] +#define tIceX data[4] +#define tIceY data[5] +#define tDelay data[6] + static void SootopolisGymIcePerStepCallback(u8 taskId) { s16 x, y; u16 tileBehavior; u16 *iceStepCount; s16 *data = gTasks[taskId].data; - switch (data[1]) + switch (tState) { - case 0: - PlayerGetDestCoords(&x, &y); - data[2] = x; - data[3] = y; - data[1] = 1; - break; - case 1: - PlayerGetDestCoords(&x, &y); - if (x != data[2] || y != data[3]) - { - data[2] = x; - data[3] = y; - tileBehavior = MapGridGetMetatileBehaviorAt(x, y); - iceStepCount = GetVarPointer(VAR_ICE_STEP_COUNT); - if (MetatileBehavior_IsThinIce(tileBehavior) == TRUE) - { - (*iceStepCount)++; - data[6] = 4; - data[1] = 2; - data[4] = x; - data[5] = y; - } - else if (MetatileBehavior_IsCrackedIce(tileBehavior) == TRUE) - { - *iceStepCount = 0; - data[6] = 4; - data[1] = 3; - data[4] = x; - data[5] = y; - } - } - break; - case 2: - if (data[6] != 0) - { - data[6]--; - } - else - { - x = data[4]; - y = data[5]; - PlaySE(SE_ICE_CRACK); - MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Cracked); - CurrentMapDrawMetatileAt(x, y); - MarkIcePuzzleCoordVisited(x - MAP_OFFSET, y - MAP_OFFSET); - data[1] = 1; - } - break; - case 3: - if (data[6] != 0) - { - data[6]--; - } - else - { - x = data[4]; - y = data[5]; - PlaySE(SE_ICE_BREAK); - MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Broken); - CurrentMapDrawMetatileAt(x, y); - data[1] = 1; - } - break; + case 0: + PlayerGetDestCoords(&x, &y); + tPrevX = x; + tPrevY = y; + tState = 1; + break; + case 1: + PlayerGetDestCoords(&x, &y); + // End if player hasn't moved + if (x == tPrevX && y == tPrevY) + return; + + tPrevX = x; + tPrevY = y; + tileBehavior = MapGridGetMetatileBehaviorAt(x, y); + iceStepCount = GetVarPointer(VAR_ICE_STEP_COUNT); + if (MetatileBehavior_IsThinIce(tileBehavior) == TRUE) + { + // Thin ice, set it to cracked ice + (*iceStepCount)++; + tDelay = 4; + tState = 2; + tIceX = x; + tIceY = y; + } + else if (MetatileBehavior_IsCrackedIce(tileBehavior) == TRUE) + { + // Cracked ice, set it to broken ice + *iceStepCount = 0; + tDelay = 4; + tState = 3; + tIceX = x; + tIceY = y; + } + break; + case 2: + if (tDelay != 0) + { + tDelay--; + } + else + { + // Crack ice + x = tIceX; + y = tIceY; + PlaySE(SE_ICE_CRACK); + MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Cracked); + CurrentMapDrawMetatileAt(x, y); + MarkIcePuzzleCoordVisited(x - MAP_OFFSET, y - MAP_OFFSET); + tState = 1; + } + break; + case 3: + if (tDelay != 0) + { + tDelay--; + } + else + { + // Break ice + x = tIceX; + y = tIceY; + PlaySE(SE_ICE_BREAK); + MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Broken); + CurrentMapDrawMetatileAt(x, y); + tState = 1; + } + break; } } +#undef tState +#undef tPrevX +#undef tPrevY +#undef tIceX +#undef tIceY +#undef tDelay + +#define tPrevX data[1] +#define tPrevY data[2] + static void AshGrassPerStepCallback(u8 taskId) { s16 x, y; u16 *ashGatherCount; s16 *data = gTasks[taskId].data; PlayerGetDestCoords(&x, &y); - if (x != data[1] || y != data[2]) - { - data[1] = x; - data[2] = y; - if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y))) - { - if (MapGridGetMetatileIdAt(x, y) == METATILE_Fallarbor_AshGrass) - StartAshFieldEffect(x, y, METATILE_Fallarbor_NormalGrass, 4); - else - StartAshFieldEffect(x, y, METATILE_Lavaridge_NormalGrass, 4); - if (CheckBagHasItem(ITEM_SOOT_SACK, 1)) - { - ashGatherCount = GetVarPointer(VAR_ASH_GATHER_COUNT); - if (*ashGatherCount < 9999) - (*ashGatherCount)++; - } + // End if player hasn't moved + if (x == tPrevX && y == tPrevY) + return; + + tPrevX = x; + tPrevY = y; + if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y))) + { + // Remove ash from grass + if (MapGridGetMetatileIdAt(x, y) == METATILE_Fallarbor_AshGrass) + StartAshFieldEffect(x, y, METATILE_Fallarbor_NormalGrass, 4); + else + StartAshFieldEffect(x, y, METATILE_Lavaridge_NormalGrass, 4); + + // Try to gather ash + if (CheckBagHasItem(ITEM_SOOT_SACK, 1)) + { + ashGatherCount = GetVarPointer(VAR_ASH_GATHER_COUNT); + if (*ashGatherCount < 9999) + (*ashGatherCount)++; } } } +#undef tPrevX +#undef tPrevY + // This function uses the constants for gTileset_Cave's metatile labels, but other tilesets with // the CrackedFloorPerStepCallback callback use the same metatile numbers for the cracked floor // and hole metatiles, such as gTileset_MirageTower. static void SetCrackedFloorHoleMetatile(s16 x, s16 y) { - MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == METATILE_Cave_CrackedFloor ? METATILE_Cave_CrackedFloor_Hole : METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole); + u16 metatileId = MapGridGetMetatileIdAt(x, y) == METATILE_Cave_CrackedFloor ? METATILE_Cave_CrackedFloor_Hole : METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole; + MapGridSetMetatileIdAt(x, y, metatileId); CurrentMapDrawMetatileAt(x, y); } +#define tPrevX data[2] +#define tPrevY data[3] +#define tFloor1Delay data[4] +#define tFloor1X data[5] +#define tFloor1Y data[6] +#define tFloor2Delay data[7] +#define tFloor2X data[8] +#define tFloor2Y data[9] + static void CrackedFloorPerStepCallback(u8 taskId) { s16 x, y; @@ -651,113 +802,153 @@ static void CrackedFloorPerStepCallback(u8 taskId) s16 *data = gTasks[taskId].data; PlayerGetDestCoords(&x, &y); behavior = MapGridGetMetatileBehaviorAt(x, y); - if (data[4] != 0 && (--data[4]) == 0) - SetCrackedFloorHoleMetatile(data[5], data[6]); - if (data[7] != 0 && (--data[7]) == 0) - SetCrackedFloorHoleMetatile(data[8], data[9]); + // Update up to 2 previous cracked floor spaces + if (tFloor1Delay != 0 && (--tFloor1Delay) == 0) + SetCrackedFloorHoleMetatile(tFloor1X, tFloor1Y); + if (tFloor2Delay != 0 && (--tFloor2Delay) == 0) + SetCrackedFloorHoleMetatile(tFloor2X, tFloor2Y); if (MetatileBehavior_IsCrackedFloorHole(behavior)) VarSet(VAR_ICE_STEP_COUNT, 0); // this var does double duty - if ((x != data[2] || y != data[3])) - { - data[2] = x; - data[3] = y; - if (MetatileBehavior_IsCrackedFloor(behavior)) - { - if (GetPlayerSpeed() != 4) - VarSet(VAR_ICE_STEP_COUNT, 0); // this var does double duty + // End if player hasn't moved + if (x == tPrevX && y == tPrevY) + return; - if (data[4] == 0) - { - data[4] = 3; - data[5] = x; - data[6] = y; - } - else if (data[7] == 0) - { - data[7] = 3; - data[8] = x; - data[9] = y; - } + tPrevX = x; + tPrevY = y; + if (MetatileBehavior_IsCrackedFloor(behavior)) + { + if (GetPlayerSpeed() != BIKE_SPEED_FASTEST) + VarSet(VAR_ICE_STEP_COUNT, 0); // this var does double duty + + if (tFloor1Delay == 0) + { + tFloor1Delay = 3; + tFloor1X = x; + tFloor1Y = y; + } + else if (tFloor2Delay == 0) + { + tFloor2Delay = 3; + tFloor2X = x; + tFloor2Y = y; } } } +#undef tPrevX +#undef tPrevY +#undef tFloor1Delay +#undef tFloor1X +#undef tFloor1Y +#undef tFloor2Delay +#undef tFloor2X +#undef tFloor2Y + +#define tMapId data[0] +#define tState data[1] +#define tPrevX data[2] +#define tPrevY data[3] +// data[4] - data[15] are data about up to 4 individual animating muddy slope metatiles +// They're divided into groups of 3, i.e data[4]-[6] track one metatile, data[7]-[9] another, and so on. +// For each data triplet, the 1sst is the animation time, and the 2nd/3rd are the x/y coordinates. +#define SLOPE_DATA_START 4 +#define SLOPE_DATA_END (3 * SLOPE_DATA_SIZE + SLOPE_DATA_START) // 13, which is the last slope data start point +enum { + SLOPE_TIME, + SLOPE_X, + SLOPE_Y, + SLOPE_DATA_SIZE +}; +#define tSlopeAnimTime(i) data[(i) * SLOPE_DATA_SIZE + SLOPE_DATA_START + SLOPE_TIME] + +static const u16 sMuddySlopeMetatiles[] = { + METATILE_General_MuddySlope_Frame0, + METATILE_General_MuddySlope_Frame3, + METATILE_General_MuddySlope_Frame2, + METATILE_General_MuddySlope_Frame1 +}; + +#define SLOPE_ANIM_TIME 32 +#define SLOPE_ANIM_STEP_TIME (SLOPE_ANIM_TIME / (int)ARRAY_COUNT(sMuddySlopeMetatiles)) + static void SetMuddySlopeMetatile(s16 *data, s16 x, s16 y) { - u16 tile; - if ((--data[0]) == 0) - tile = METATILE_General_MuddySlope_Frame0; + u16 metatileId; + if ((--data[SLOPE_TIME]) == 0) + metatileId = METATILE_General_MuddySlope_Frame0; else - tile = sMuddySlopeMetatiles[data[0] / 8]; + metatileId = sMuddySlopeMetatiles[data[SLOPE_TIME] / SLOPE_ANIM_STEP_TIME]; - MapGridSetMetatileIdAt(x, y, tile); + MapGridSetMetatileIdAt(x, y, metatileId); CurrentMapDrawMetatileAt(x, y); MapGridSetMetatileIdAt(x, y, METATILE_General_MuddySlope_Frame0); } static void Task_MuddySlope(u8 taskId) { - s16 x, y, x2, y2; + s16 x, y, cameraOffsetX, cameraOffsetY; int i; u16 mapId; s16 *data = gTasks[taskId].data; PlayerGetDestCoords(&x, &y); mapId = (gSaveBlock1Ptr->location.mapGroup << 8) | gSaveBlock1Ptr->location.mapNum; - switch (data[1]) + switch (tState) { - case 0: - data[0] = mapId; - data[2] = x; - data[3] = y; - data[1] = 1; - data[4] = 0; - data[7] = 0; - data[10] = 0; - data[13] = 0; + case 0: + tMapId = mapId; + tPrevX = x; + tPrevY = y; + tState = 1; + tSlopeAnimTime(0) = 0; + tSlopeAnimTime(1) = 0; + tSlopeAnimTime(2) = 0; + tSlopeAnimTime(3) = 0; + break; + case 1: + // Skip if player hasn't moved + if (tPrevX == x && tPrevY == y) break; - case 1: - if (data[2] != x || data[3] != y) + + tPrevX = x; + tPrevY = y; + if (MetatileBehavior_IsMuddySlope(MapGridGetMetatileBehaviorAt(x, y))) + { + for (i = SLOPE_DATA_START; i <= SLOPE_DATA_END; i += SLOPE_DATA_SIZE) { - data[2] = x; - data[3] = y; - if (MetatileBehavior_IsMuddySlope(MapGridGetMetatileBehaviorAt(x, y))) + if (data[i] == 0) { - for (i = 4; i < 14; i += 3) - { - if (data[i] == 0) - { - data[i] = 32; - data[i + 1] = x; - data[i + 2] = y; - break; - } - } + data[i + SLOPE_TIME] = SLOPE_ANIM_TIME; + data[i + SLOPE_X] = x; + data[i + SLOPE_Y] = y; + break; } } - break; + } + break; } - if (gCamera.active && mapId != data[0]) + + if (gCamera.active && mapId != tMapId) { - data[0] = mapId; - x2 = gCamera.x; - y2 = gCamera.y; + tMapId = mapId; + cameraOffsetX = gCamera.x; + cameraOffsetY = gCamera.y; } else { - x2 = 0; - y2 = 0; + cameraOffsetX = 0; + cameraOffsetY = 0; } - for (i = 4; i < 14; i += 3) + for (i = SLOPE_DATA_START; i <= SLOPE_DATA_END; i += SLOPE_DATA_SIZE) { - if (data[i]) + if (data[i + SLOPE_TIME]) { - data[i + 1] -= x2; - data[i + 2] -= y2; - SetMuddySlopeMetatile(&data[i], data[i + 1], data[i + 2]); + data[i + SLOPE_X] -= cameraOffsetX; + data[i + SLOPE_Y] -= cameraOffsetY; + SetMuddySlopeMetatile(&data[i + SLOPE_TIME], data[i + SLOPE_X], data[i + SLOPE_Y]); } } } diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index ad5eb42ccd..6b58e3f05b 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -126,10 +126,10 @@ static const u8 sTileBitAttributes[] = [MB_BRIDGE_OVER_POND_LOW] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_BRIDGE_OVER_POND_MED] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_BRIDGE_OVER_POND_HIGH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PACIFIDLOG_VERTICAL_LOG_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PACIFIDLOG_VERTICAL_LOG_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PACIFIDLOG_HORIZONTAL_LOG_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PACIFIDLOG_HORIZONTAL_LOG_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_PACIFIDLOG_VERTICAL_LOG_TOP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_FORTREE_BRIDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_UNUSED_79] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_BRIDGE_OVER_POND_MED_EDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), @@ -1131,33 +1131,33 @@ bool8 MetatileBehavior_IsFortreeBridge(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsPacifidlogVerticalLog1(u8 metatileBehavior) +bool8 MetatileBehavior_IsPacifidlogVerticalLogTop(u8 metatileBehavior) { - if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_1) + if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_TOP) return TRUE; else return FALSE; } -bool8 MetatileBehavior_IsPacifidlogVerticalLog2(u8 metatileBehavior) +bool8 MetatileBehavior_IsPacifidlogVerticalLogBottom(u8 metatileBehavior) { - if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_2) + if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM) return TRUE; else return FALSE; } -bool8 MetatileBehavior_IsPacifidlogHorizontalLog1(u8 metatileBehavior) +bool8 MetatileBehavior_IsPacifidlogHorizontalLogLeft(u8 metatileBehavior) { - if (metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_1) + if (metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT) return TRUE; else return FALSE; } -bool8 MetatileBehavior_IsPacifidlogHorizontalLog2(u8 metatileBehavior) +bool8 MetatileBehavior_IsPacifidlogHorizontalLogRight(u8 metatileBehavior) { - if (metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_2) + if (metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT) return TRUE; else return FALSE; @@ -1165,10 +1165,10 @@ bool8 MetatileBehavior_IsPacifidlogHorizontalLog2(u8 metatileBehavior) bool8 MetatileBehavior_IsPacifidlogLog(u8 metatileBehavior) { - if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_1 - || metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_2 - || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_1 - || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_2) + if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_TOP + || metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM + || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT + || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT) return TRUE; else return FALSE; diff --git a/src/secret_base.c b/src/secret_base.c index f971e24f67..8fc97141fc 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -1214,109 +1214,108 @@ void SecretBasePerStepCallback(u8 taskId) tState = 1; break; case 1: + // End if player hasn't moved PlayerGetDestCoords(&x, &y); - if (x != tPlayerX || y != tPlayerY) - { - tPlayerX = x; - tPlayerY = y; - VarSet(VAR_SECRET_BASE_STEP_COUNTER, VarGet(VAR_SECRET_BASE_STEP_COUNTER) + 1); - behavior = MapGridGetMetatileBehaviorAt(x, y); - tileId = MapGridGetMetatileIdAt(x, y); - if (tileId == METATILE_SecretBase_SolidBoard_Top || tileId == METATILE_SecretBase_SolidBoard_Bottom) - { - if (sInFriendSecretBase == TRUE) - { - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SOLID_BOARD); - } - } - else if (tileId == METATILE_SecretBase_SmallChair - || tileId == METATILE_SecretBase_PokemonChair - || tileId == METATILE_SecretBase_HeavyChair - || tileId == METATILE_SecretBase_PrettyChair - || tileId == METATILE_SecretBase_ComfortChair - || tileId == METATILE_SecretBase_RaggedChair - || tileId == METATILE_SecretBase_BrickChair - || tileId == METATILE_SecretBase_CampChair - || tileId == METATILE_SecretBase_HardChair) - { - if (sInFriendSecretBase == TRUE) - VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_CHAIR); - } - else if (tileId == METATILE_SecretBase_RedTent_DoorTop - || tileId == METATILE_SecretBase_RedTent_Door - || tileId == METATILE_SecretBase_BlueTent_DoorTop - || tileId == METATILE_SecretBase_BlueTent_Door) - { - if (sInFriendSecretBase == TRUE) - VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_TENT); - } - else if ((behavior == MB_IMPASSABLE_NORTHEAST && tileId == METATILE_SecretBase_Stand_CornerRight) - || (behavior == MB_IMPASSABLE_NORTHWEST && MapGridGetMetatileIdAt(x, y) == METATILE_SecretBase_Stand_CornerLeft)) - { - if (sInFriendSecretBase == TRUE) - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_STAND); - } - else if (behavior == MB_IMPASSABLE_WEST_AND_EAST && tileId == METATILE_SecretBase_Slide_StairLanding) - { - if (sInFriendSecretBase == TRUE) - { - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) ^ SECRET_BASE_USED_SLIDE); - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_DECLINED_SLIDE); - } - } - else if (behavior == MB_SLIDE_SOUTH && tileId == METATILE_SecretBase_Slide_SlideTop) - { - if (sInFriendSecretBase == TRUE) - { - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SLIDE); - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) ^ SECRET_BASE_DECLINED_SLIDE); - } - } - else if (MetatileBehavior_IsSecretBaseGlitterMat(behavior) == TRUE) - { - if (sInFriendSecretBase == TRUE) - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_GLITTER_MAT); - } - else if (MetatileBehavior_IsSecretBaseBalloon(behavior) == TRUE) - { - PopSecretBaseBalloon(MapGridGetMetatileIdAt(x, y), x, y); - if (sInFriendSecretBase == TRUE) - { - switch ((int)MapGridGetMetatileIdAt(x, y)) - { - case METATILE_SecretBase_RedBalloon: - case METATILE_SecretBase_BlueBalloon: - case METATILE_SecretBase_YellowBalloon: - VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_BALLOON); - break; - case METATILE_SecretBase_MudBall: - VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_MUD_BALL); - break; - } - } - } - else if (MetatileBehavior_IsSecretBaseBreakableDoor(behavior) == TRUE) - { - if (sInFriendSecretBase == TRUE) - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_BREAKABLE_DOOR); + if (x == tPlayerX && y == tPlayerY) + return; - ShatterSecretBaseBreakableDoor(x, y); - } - else if (MetatileBehavior_IsSecretBaseSoundMat(behavior) == TRUE){ - if (sInFriendSecretBase == TRUE) - VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_NOTE_MAT); - } - else if (MetatileBehavior_IsSecretBaseJumpMat(behavior) == TRUE) + tPlayerX = x; + tPlayerY = y; + VarSet(VAR_SECRET_BASE_STEP_COUNTER, VarGet(VAR_SECRET_BASE_STEP_COUNTER) + 1); + behavior = MapGridGetMetatileBehaviorAt(x, y); + tileId = MapGridGetMetatileIdAt(x, y); + if (tileId == METATILE_SecretBase_SolidBoard_Top || tileId == METATILE_SecretBase_SolidBoard_Bottom) + { + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SOLID_BOARD); + } + else if (tileId == METATILE_SecretBase_SmallChair + || tileId == METATILE_SecretBase_PokemonChair + || tileId == METATILE_SecretBase_HeavyChair + || tileId == METATILE_SecretBase_PrettyChair + || tileId == METATILE_SecretBase_ComfortChair + || tileId == METATILE_SecretBase_RaggedChair + || tileId == METATILE_SecretBase_BrickChair + || tileId == METATILE_SecretBase_CampChair + || tileId == METATILE_SecretBase_HardChair) + { + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_CHAIR); + } + else if (tileId == METATILE_SecretBase_RedTent_DoorTop + || tileId == METATILE_SecretBase_RedTent_Door + || tileId == METATILE_SecretBase_BlueTent_DoorTop + || tileId == METATILE_SecretBase_BlueTent_Door) + { + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_TENT); + } + else if ((behavior == MB_IMPASSABLE_NORTHEAST && tileId == METATILE_SecretBase_Stand_CornerRight) + || (behavior == MB_IMPASSABLE_NORTHWEST && MapGridGetMetatileIdAt(x, y) == METATILE_SecretBase_Stand_CornerLeft)) + { + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_STAND); + } + else if (behavior == MB_IMPASSABLE_WEST_AND_EAST && tileId == METATILE_SecretBase_Slide_StairLanding) + { + if (sInFriendSecretBase == TRUE) { - if (sInFriendSecretBase == TRUE) - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_JUMP_MAT); + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) ^ SECRET_BASE_USED_SLIDE); + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_DECLINED_SLIDE); } - else if (MetatileBehavior_IsSecretBaseSpinMat(behavior) == TRUE) + } + else if (behavior == MB_SLIDE_SOUTH && tileId == METATILE_SecretBase_Slide_SlideTop) + { + if (sInFriendSecretBase == TRUE) { - if (sInFriendSecretBase == TRUE) - VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SPIN_MAT); + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SLIDE); + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) ^ SECRET_BASE_DECLINED_SLIDE); } } + else if (MetatileBehavior_IsSecretBaseGlitterMat(behavior) == TRUE) + { + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_GLITTER_MAT); + } + else if (MetatileBehavior_IsSecretBaseBalloon(behavior) == TRUE) + { + PopSecretBaseBalloon(MapGridGetMetatileIdAt(x, y), x, y); + if (sInFriendSecretBase == TRUE) + { + switch ((int)MapGridGetMetatileIdAt(x, y)) + { + case METATILE_SecretBase_RedBalloon: + case METATILE_SecretBase_BlueBalloon: + case METATILE_SecretBase_YellowBalloon: + VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_BALLOON); + break; + case METATILE_SecretBase_MudBall: + VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_MUD_BALL); + break; + } + } + } + else if (MetatileBehavior_IsSecretBaseBreakableDoor(behavior) == TRUE) + { + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_BREAKABLE_DOOR); + + ShatterSecretBaseBreakableDoor(x, y); + } + else if (MetatileBehavior_IsSecretBaseSoundMat(behavior) == TRUE){ + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_NOTE_MAT); + } + else if (MetatileBehavior_IsSecretBaseJumpMat(behavior) == TRUE) + { + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_JUMP_MAT); + } + else if (MetatileBehavior_IsSecretBaseSpinMat(behavior) == TRUE) + { + if (sInFriendSecretBase == TRUE) + VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SPIN_MAT); + } break; case 2: // This state is never reached, and tFldEff is never set From ec97a21f95c82f3ec8c6c42de5e71dbdf80f4049 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 17 Nov 2021 15:04:42 -0500 Subject: [PATCH 196/417] Fix calcrom's handling of 0s --- .github/calcrom/calcrom.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/calcrom/calcrom.pl b/.github/calcrom/calcrom.pl index 37ebcb4d20..9fbd959945 100755 --- a/.github/calcrom/calcrom.pl +++ b/.github/calcrom/calcrom.pl @@ -104,16 +104,19 @@ my $partial_documented_as_string; # Performing addition on a string converts it to a number. Any string that fails # to convert to a number becomes 0. So if our converted number is 0, but our string # is nonzero, then the conversion was an error. +$undocumented_as_string =~ s/^\s+|\s+$//g; my $undocumented = $undocumented_as_string + 0; -(($undocumented != 0) and ($undocumented_as_string ne "0")) +(($undocumented != 0) or (($undocumented == 0) and ($undocumented_as_string eq "0"))) or die "ERROR: Cannot convert string to num: '$undocumented_as_string'"; +$partial_documented_as_string =~ s/^\s+|\s+$//g; my $partial_documented = $partial_documented_as_string + 0; -(($partial_documented != 0) and ($partial_documented_as_string ne "0")) +(($partial_documented != 0) or (($partial_documented == 0) and ($partial_documented_as_string eq "0"))) or die "ERROR: Cannot convert string to num: '$partial_documented_as_string'"; +$total_syms_as_string =~ s/^\s+|\s+$//g; my $total_syms = $total_syms_as_string + 0; -(($total_syms != 0) and ($total_syms_as_string ne "0")) +(($total_syms != 0) or (($total_syms == 0) and ($total_syms_as_string eq "0"))) or die "ERROR: Cannot convert string to num: '$total_syms_as_string'"; ($total_syms != 0) From c1970a4bc827cffbaccdd8af11ecd054f6a5728f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 17 Nov 2021 15:47:47 -0500 Subject: [PATCH 197/417] Remove dead sub references --- asm/macros/battle_ai_script.inc | 20 ++++++++++---------- gflib/sprite.h | 1 - include/battle_anim.h | 2 -- include/field_control_avatar.h | 6 ------ include/field_screen_effect.h | 1 - include/field_special_scene.h | 1 - include/mauville_old_man.h | 2 -- src/pokeball.c | 2 +- 8 files changed, 11 insertions(+), 24 deletions(-) diff --git a/asm/macros/battle_ai_script.inc b/asm/macros/battle_ai_script.inc index 4c7646d6f6..5341e5a431 100644 --- a/asm/macros/battle_ai_script.inc +++ b/asm/macros/battle_ai_script.inc @@ -251,11 +251,11 @@ .4byte \param1 .endm - .macro nullsub_2A + .macro nop_2A .byte 0x2a .endm - .macro nullsub_2B + .macro nop_2B .byte 0x2b .endm @@ -287,11 +287,11 @@ .4byte \param1 .endm - .macro nullsub_32 + .macro nop_32 .byte 0x32 .endm - .macro nullsub_33 + .macro nop_33 .byte 0x33 .endm @@ -467,27 +467,27 @@ .byte \battler .endm - .macro nullsub_52 + .macro nop_52 .byte 0x52 .endm - .macro nullsub_53 + .macro nop_53 .byte 0x53 .endm - .macro nullsub_54 + .macro nop_54 .byte 0x54 .endm - .macro nullsub_55 + .macro nop_55 .byte 0x55 .endm - .macro nullsub_56 + .macro nop_56 .byte 0x56 .endm - .macro nullsub_57 + .macro nop_57 .byte 0x57 .endm diff --git a/gflib/sprite.h b/gflib/sprite.h index 595ecd7dbd..e53737981b 100644 --- a/gflib/sprite.h +++ b/gflib/sprite.h @@ -281,7 +281,6 @@ void FreeSpriteTiles(struct Sprite *sprite); void FreeSpritePalette(struct Sprite *sprite); void FreeSpriteOamMatrix(struct Sprite *sprite); void DestroySpriteAndFreeResources(struct Sprite *sprite); -void sub_800142C(u32 a1, u32 a2, u16 *a3, u16 a4, u32 a5); void AnimateSprite(struct Sprite *sprite); void SetSpriteMatrixAnchor(struct Sprite* sprite, s16 x, s16 y); void StartSpriteAnim(struct Sprite *sprite, u8 animNum); diff --git a/include/battle_anim.h b/include/battle_anim.h index 8745b0d264..d8b2cd4dbc 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -112,7 +112,6 @@ void GetBattleAnimBg1Data(struct BattleAnimBgData*); void GetBattleAnimBgData(struct BattleAnimBgData*, u32 arg1); u8 GetBattlerSpriteSubpriority(u8 battlerId); bool8 TranslateAnimHorizontalArc(struct Sprite *sprite); -void sub_80A6630(struct Sprite *sprite); void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite); void ResetSpriteRotScale(u8 spriteId); void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation); @@ -129,7 +128,6 @@ void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const vo void AnimLoadCompressedBgGfx(u32, const u32*, u32); void UpdateAnimBg3ScreenSize(bool8); void TranslateSpriteInGrowingCircle(struct Sprite *); -void sub_80A653C(struct Sprite *); void SetBattlerSpriteYOffsetFromYScale(u8 spriteId); void PrepareEruptAnimTaskData(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a7); u8 UpdateEruptAnimTask(struct Task *task); diff --git a/include/field_control_avatar.h b/include/field_control_avatar.h index 17e5afb63e..e02fcd5afe 100644 --- a/include/field_control_avatar.h +++ b/include/field_control_avatar.h @@ -25,15 +25,9 @@ struct FieldInput void FieldClearPlayerInput(struct FieldInput *pStruct); void FieldGetPlayerInput(struct FieldInput *pStruct, u16 keys, u16 heldKeys); int ProcessPlayerFieldInput(struct FieldInput *pStruct); -u8 *sub_80682A8(struct MapPosition *, u8, u8); void overworld_poison_timer_set(void); void RestartWildEncounterImmunitySteps(void); -u8 *sub_8068E24(struct MapPosition *); const u8 *GetObjectEventScriptPointerPlayerFacing(void); -bool8 sub_8068870(u16 a); -bool8 sub_8068894(void); -bool8 sub_8068A64(struct MapPosition *, u16); -u8 sub_8068F18(void); bool8 TryDoDiveWarp(struct MapPosition *position, u16 b); int SetCableClubWarp(void); u8 TrySetDiveWarp(void); diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index 5a2e424785..973e06ef30 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -39,7 +39,6 @@ void DoSpinEnterWarp(void); void DoSpinExitWarp(void); void DoOrbEffect(void); void FadeOutOrbEffect(void); -void sub_80B05B4(void); void WriteFlashScanlineEffectBuffer(u8 flashLevel); bool8 IsPlayerStandingStill(void); diff --git a/include/field_special_scene.h b/include/field_special_scene.h index a54b344d9b..3f701f41bf 100644 --- a/include/field_special_scene.h +++ b/include/field_special_scene.h @@ -9,7 +9,6 @@ void Task_Truck3(u8 taskId); void Task_HandleTruckSequence(u8 taskId); void ExecuteTruckSequence(void); void EndTruckSequence(u8); -void sub_80C791C(void); void FieldCB_ShowPortholeView(void); #endif // GUARD_FIELD_SPECIAL_SCENE_H diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h index 23a3cabfb4..b22294f1be 100644 --- a/include/mauville_old_man.h +++ b/include/mauville_old_man.h @@ -6,9 +6,7 @@ extern struct BardSong gBardSong; void SetMauvilleOldMan(void); u8 GetCurrentMauvilleOldMan(void); void SetMauvilleOldManObjEventGfx(void); -u8 sub_81201C8(void); void SanitizeMauvilleOldManForRuby(OldMan *dest); -void sub_8120670(void); void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 r1, u32 r6); void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 unused, u32 a2); void ResetMauvilleOldManFlag(void); diff --git a/src/pokeball.c b/src/pokeball.c index 501d86ca35..cb68d68833 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -1138,7 +1138,7 @@ static void SpriteCB_TradePokeball(struct Sprite *sprite) sprite->callback = SpriteCB_TradePokeballSendOff; #ifdef BUGFIX // FIX: If this is used on a sprite that has previously had an affine animation, it will not - // play the shrink anim properly due to being paused. Works together with the fix to `sub_817F77C`. + // play the shrink anim properly due to being paused. Works together with the fix to ResetSpriteAfterAnim. gSprites[monSpriteId].affineAnimPaused = FALSE; #endif // BUGFIX StartSpriteAffineAnim(&gSprites[monSpriteId], BATTLER_AFFINE_RETURN); From 700425ef5fcdd5114fb76e362f745f558084638b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 17 Nov 2021 15:52:04 -0500 Subject: [PATCH 198/417] Index sMapHealLocations --- src/region_map.c | 100 +++++++++++++++++++++++------------------------ 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/src/region_map.c b/src/region_map.c index 7a44efd104..dd63b1d83d 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -294,56 +294,56 @@ static const u32 sFlyTargetIcons_Gfx[] = INCBIN_U32("graphics/pokenav/fly_target static const u8 sMapHealLocations[][3] = { - {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F}, - {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), HEAL_LOCATION_OLDALE_TOWN}, - {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), HEAL_LOCATION_DEWFORD_TOWN}, - {MAP_GROUP(LAVARIDGE_TOWN), MAP_NUM(LAVARIDGE_TOWN), HEAL_LOCATION_LAVARIDGE_TOWN}, - {MAP_GROUP(FALLARBOR_TOWN), MAP_NUM(FALLARBOR_TOWN), HEAL_LOCATION_FALLARBOR_TOWN}, - {MAP_GROUP(VERDANTURF_TOWN), MAP_NUM(VERDANTURF_TOWN), HEAL_LOCATION_VERDANTURF_TOWN}, - {MAP_GROUP(PACIFIDLOG_TOWN), MAP_NUM(PACIFIDLOG_TOWN), HEAL_LOCATION_PACIFIDLOG_TOWN}, - {MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), HEAL_LOCATION_PETALBURG_CITY}, - {MAP_GROUP(SLATEPORT_CITY), MAP_NUM(SLATEPORT_CITY), HEAL_LOCATION_SLATEPORT_CITY}, - {MAP_GROUP(MAUVILLE_CITY), MAP_NUM(MAUVILLE_CITY), HEAL_LOCATION_MAUVILLE_CITY}, - {MAP_GROUP(RUSTBORO_CITY), MAP_NUM(RUSTBORO_CITY), HEAL_LOCATION_RUSTBORO_CITY}, - {MAP_GROUP(FORTREE_CITY), MAP_NUM(FORTREE_CITY), HEAL_LOCATION_FORTREE_CITY}, - {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), HEAL_LOCATION_LILYCOVE_CITY}, - {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), HEAL_LOCATION_MOSSDEEP_CITY}, - {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), HEAL_LOCATION_SOOTOPOLIS_CITY}, - {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), HEAL_LOCATION_EVER_GRANDE_CITY}, - {MAP_GROUP(ROUTE101), MAP_NUM(ROUTE101), 0}, - {MAP_GROUP(ROUTE102), MAP_NUM(ROUTE102), 0}, - {MAP_GROUP(ROUTE103), MAP_NUM(ROUTE103), 0}, - {MAP_GROUP(ROUTE104), MAP_NUM(ROUTE104), 0}, - {MAP_GROUP(ROUTE105), MAP_NUM(ROUTE105), 0}, - {MAP_GROUP(ROUTE106), MAP_NUM(ROUTE106), 0}, - {MAP_GROUP(ROUTE107), MAP_NUM(ROUTE107), 0}, - {MAP_GROUP(ROUTE108), MAP_NUM(ROUTE108), 0}, - {MAP_GROUP(ROUTE109), MAP_NUM(ROUTE109), 0}, - {MAP_GROUP(ROUTE110), MAP_NUM(ROUTE110), 0}, - {MAP_GROUP(ROUTE111), MAP_NUM(ROUTE111), 0}, - {MAP_GROUP(ROUTE112), MAP_NUM(ROUTE112), 0}, - {MAP_GROUP(ROUTE113), MAP_NUM(ROUTE113), 0}, - {MAP_GROUP(ROUTE114), MAP_NUM(ROUTE114), 0}, - {MAP_GROUP(ROUTE115), MAP_NUM(ROUTE115), 0}, - {MAP_GROUP(ROUTE116), MAP_NUM(ROUTE116), 0}, - {MAP_GROUP(ROUTE117), MAP_NUM(ROUTE117), 0}, - {MAP_GROUP(ROUTE118), MAP_NUM(ROUTE118), 0}, - {MAP_GROUP(ROUTE119), MAP_NUM(ROUTE119), 0}, - {MAP_GROUP(ROUTE120), MAP_NUM(ROUTE120), 0}, - {MAP_GROUP(ROUTE121), MAP_NUM(ROUTE121), 0}, - {MAP_GROUP(ROUTE122), MAP_NUM(ROUTE122), 0}, - {MAP_GROUP(ROUTE123), MAP_NUM(ROUTE123), 0}, - {MAP_GROUP(ROUTE124), MAP_NUM(ROUTE124), 0}, - {MAP_GROUP(ROUTE125), MAP_NUM(ROUTE125), 0}, - {MAP_GROUP(ROUTE126), MAP_NUM(ROUTE126), 0}, - {MAP_GROUP(ROUTE127), MAP_NUM(ROUTE127), 0}, - {MAP_GROUP(ROUTE128), MAP_NUM(ROUTE128), 0}, - {MAP_GROUP(ROUTE129), MAP_NUM(ROUTE129), 0}, - {MAP_GROUP(ROUTE130), MAP_NUM(ROUTE130), 0}, - {MAP_GROUP(ROUTE131), MAP_NUM(ROUTE131), 0}, - {MAP_GROUP(ROUTE132), MAP_NUM(ROUTE132), 0}, - {MAP_GROUP(ROUTE133), MAP_NUM(ROUTE133), 0}, - {MAP_GROUP(ROUTE134), MAP_NUM(ROUTE134), 0} + [MAPSEC_LITTLEROOT_TOWN] = {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F}, + [MAPSEC_OLDALE_TOWN] = {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), HEAL_LOCATION_OLDALE_TOWN}, + [MAPSEC_DEWFORD_TOWN] = {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), HEAL_LOCATION_DEWFORD_TOWN}, + [MAPSEC_LAVARIDGE_TOWN] = {MAP_GROUP(LAVARIDGE_TOWN), MAP_NUM(LAVARIDGE_TOWN), HEAL_LOCATION_LAVARIDGE_TOWN}, + [MAPSEC_FALLARBOR_TOWN] = {MAP_GROUP(FALLARBOR_TOWN), MAP_NUM(FALLARBOR_TOWN), HEAL_LOCATION_FALLARBOR_TOWN}, + [MAPSEC_VERDANTURF_TOWN] = {MAP_GROUP(VERDANTURF_TOWN), MAP_NUM(VERDANTURF_TOWN), HEAL_LOCATION_VERDANTURF_TOWN}, + [MAPSEC_PACIFIDLOG_TOWN] = {MAP_GROUP(PACIFIDLOG_TOWN), MAP_NUM(PACIFIDLOG_TOWN), HEAL_LOCATION_PACIFIDLOG_TOWN}, + [MAPSEC_PETALBURG_CITY] = {MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), HEAL_LOCATION_PETALBURG_CITY}, + [MAPSEC_SLATEPORT_CITY] = {MAP_GROUP(SLATEPORT_CITY), MAP_NUM(SLATEPORT_CITY), HEAL_LOCATION_SLATEPORT_CITY}, + [MAPSEC_MAUVILLE_CITY] = {MAP_GROUP(MAUVILLE_CITY), MAP_NUM(MAUVILLE_CITY), HEAL_LOCATION_MAUVILLE_CITY}, + [MAPSEC_RUSTBORO_CITY] = {MAP_GROUP(RUSTBORO_CITY), MAP_NUM(RUSTBORO_CITY), HEAL_LOCATION_RUSTBORO_CITY}, + [MAPSEC_FORTREE_CITY] = {MAP_GROUP(FORTREE_CITY), MAP_NUM(FORTREE_CITY), HEAL_LOCATION_FORTREE_CITY}, + [MAPSEC_LILYCOVE_CITY] = {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), HEAL_LOCATION_LILYCOVE_CITY}, + [MAPSEC_MOSSDEEP_CITY] = {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), HEAL_LOCATION_MOSSDEEP_CITY}, + [MAPSEC_SOOTOPOLIS_CITY] = {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), HEAL_LOCATION_SOOTOPOLIS_CITY}, + [MAPSEC_EVER_GRANDE_CITY] = {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), HEAL_LOCATION_EVER_GRANDE_CITY}, + [MAPSEC_ROUTE_101] = {MAP_GROUP(ROUTE101), MAP_NUM(ROUTE101), 0}, + [MAPSEC_ROUTE_102] = {MAP_GROUP(ROUTE102), MAP_NUM(ROUTE102), 0}, + [MAPSEC_ROUTE_103] = {MAP_GROUP(ROUTE103), MAP_NUM(ROUTE103), 0}, + [MAPSEC_ROUTE_104] = {MAP_GROUP(ROUTE104), MAP_NUM(ROUTE104), 0}, + [MAPSEC_ROUTE_105] = {MAP_GROUP(ROUTE105), MAP_NUM(ROUTE105), 0}, + [MAPSEC_ROUTE_106] = {MAP_GROUP(ROUTE106), MAP_NUM(ROUTE106), 0}, + [MAPSEC_ROUTE_107] = {MAP_GROUP(ROUTE107), MAP_NUM(ROUTE107), 0}, + [MAPSEC_ROUTE_108] = {MAP_GROUP(ROUTE108), MAP_NUM(ROUTE108), 0}, + [MAPSEC_ROUTE_109] = {MAP_GROUP(ROUTE109), MAP_NUM(ROUTE109), 0}, + [MAPSEC_ROUTE_110] = {MAP_GROUP(ROUTE110), MAP_NUM(ROUTE110), 0}, + [MAPSEC_ROUTE_111] = {MAP_GROUP(ROUTE111), MAP_NUM(ROUTE111), 0}, + [MAPSEC_ROUTE_112] = {MAP_GROUP(ROUTE112), MAP_NUM(ROUTE112), 0}, + [MAPSEC_ROUTE_113] = {MAP_GROUP(ROUTE113), MAP_NUM(ROUTE113), 0}, + [MAPSEC_ROUTE_114] = {MAP_GROUP(ROUTE114), MAP_NUM(ROUTE114), 0}, + [MAPSEC_ROUTE_115] = {MAP_GROUP(ROUTE115), MAP_NUM(ROUTE115), 0}, + [MAPSEC_ROUTE_116] = {MAP_GROUP(ROUTE116), MAP_NUM(ROUTE116), 0}, + [MAPSEC_ROUTE_117] = {MAP_GROUP(ROUTE117), MAP_NUM(ROUTE117), 0}, + [MAPSEC_ROUTE_118] = {MAP_GROUP(ROUTE118), MAP_NUM(ROUTE118), 0}, + [MAPSEC_ROUTE_119] = {MAP_GROUP(ROUTE119), MAP_NUM(ROUTE119), 0}, + [MAPSEC_ROUTE_120] = {MAP_GROUP(ROUTE120), MAP_NUM(ROUTE120), 0}, + [MAPSEC_ROUTE_121] = {MAP_GROUP(ROUTE121), MAP_NUM(ROUTE121), 0}, + [MAPSEC_ROUTE_122] = {MAP_GROUP(ROUTE122), MAP_NUM(ROUTE122), 0}, + [MAPSEC_ROUTE_123] = {MAP_GROUP(ROUTE123), MAP_NUM(ROUTE123), 0}, + [MAPSEC_ROUTE_124] = {MAP_GROUP(ROUTE124), MAP_NUM(ROUTE124), 0}, + [MAPSEC_ROUTE_125] = {MAP_GROUP(ROUTE125), MAP_NUM(ROUTE125), 0}, + [MAPSEC_ROUTE_126] = {MAP_GROUP(ROUTE126), MAP_NUM(ROUTE126), 0}, + [MAPSEC_ROUTE_127] = {MAP_GROUP(ROUTE127), MAP_NUM(ROUTE127), 0}, + [MAPSEC_ROUTE_128] = {MAP_GROUP(ROUTE128), MAP_NUM(ROUTE128), 0}, + [MAPSEC_ROUTE_129] = {MAP_GROUP(ROUTE129), MAP_NUM(ROUTE129), 0}, + [MAPSEC_ROUTE_130] = {MAP_GROUP(ROUTE130), MAP_NUM(ROUTE130), 0}, + [MAPSEC_ROUTE_131] = {MAP_GROUP(ROUTE131), MAP_NUM(ROUTE131), 0}, + [MAPSEC_ROUTE_132] = {MAP_GROUP(ROUTE132), MAP_NUM(ROUTE132), 0}, + [MAPSEC_ROUTE_133] = {MAP_GROUP(ROUTE133), MAP_NUM(ROUTE133), 0}, + [MAPSEC_ROUTE_134] = {MAP_GROUP(ROUTE134), MAP_NUM(ROUTE134), 0} }; static const u8 *const sEverGrandeCityNames[] = From c940b6771687f7f303e2380a1994939a60e8a139 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 17 Nov 2021 17:15:45 -0500 Subject: [PATCH 199/417] Continue macro comment updating --- asm/macros/event.inc | 116 +++++++++++++++++------------- data/maps/DewfordTown/scripts.inc | 16 ++--- data/maps/Route104/scripts.inc | 10 +-- data/maps/Route109/scripts.inc | 10 +-- data/script_cmd_table.inc | 6 +- data/scripts/contest_hall.inc | 2 +- include/event_object_movement.h | 4 +- src/data/lilycove_lady.h | 50 ++++++------- src/event_object_movement.c | 4 +- src/scrcmd.c | 14 ++-- 10 files changed, 124 insertions(+), 108 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 4c0bc2922a..057ebe3922 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1016,74 +1016,74 @@ @ Writes the name of the given Pokemon species to the specified buffer. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro bufferspeciesname out:req, species:req + .macro bufferspeciesname stringVarId:req, species:req .byte 0x7d - .byte \out + .byte \stringVarId .2byte \species .endm @ Writes the name of the species of the first Pokemon in the player's party to the specified buffer. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro bufferleadmonspeciesname out:req + .macro bufferleadmonspeciesname stringVarId:req .byte 0x7e - .byte \out + .byte \stringVarId .endm @ Writes the nickname of the Pokemon in 'slot' (zero-indexed) of the player's party to the specified buffer. @ If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro bufferpartymonnick out:req, slot:req + .macro bufferpartymonnick stringVarId:req, slot:req .byte 0x7f - .byte \out + .byte \stringVarId .2byte \slot .endm @ Writes the name of the specified item to the specified buffer. If itemId is >= ITEMS_COUNT, @ then the name of ITEM_NONE ("????????") is buffered instead. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro bufferitemname out:req, item:req + .macro bufferitemname stringVarId:req, item:req .byte 0x80 - .byte \out + .byte \stringVarId .2byte \item .endm @ Writes the name of the specified decoration to the specified buffer. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro bufferdecorationname out:req, decoration:req + .macro bufferdecorationname stringVarId:req, decoration:req .byte 0x81 - .byte \out + .byte \stringVarId .2byte \decoration .endm @ Writes the name of the specified move to the specified buffer. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro buffermovename out:req, move:req + .macro buffermovename stringVarId:req, move:req .byte 0x82 - .byte \out + .byte \stringVarId .2byte \move .endm @ Converts the value of input to a decimal string, and writes that string to the specified buffer. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro buffernumberstring out:req, input:req + .macro buffernumberstring stringVarId:req, input:req .byte 0x83 - .byte \out + .byte \stringVarId .2byte \input .endm @ Writes the given standard string (STDSTRING_*) to the specified buffer. Invalid std string ids are not handled. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro bufferstdstring out:req, index:req + .macro bufferstdstring stringVarId:req, index:req .byte 0x84 - .byte \out + .byte \stringVarId .2byte \index .endm @ Copies the string at the given pointer to the specified buffer. @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 - .macro bufferstring out:req, text:req + .macro bufferstring stringVarId:req, text:req .byte 0x85 - .byte \out + .byte \stringVarId .4byte \text .endm @@ -1298,25 +1298,30 @@ .byte 0xa5 .endm - @ - .macro setstepcallback subroutine:req + @ Enables the overworld task specified by stepCbId (STEP_CB_*). Only 1 can be active at a time. See src/field_tasks.c for more. + .macro setstepcallback stepCbId:req .byte 0xa6 - .byte \subroutine + .byte \stepCbId .endm + @ Sets the current map layout to the one specified by index (LAYOUT_*). + @ This should be done before the layout is loaded, typically in the ON_TRANSITION map script. .macro setmaplayoutindex index:req .byte 0xa7 .2byte \index .endm - .macro setobjectpriority localId:req, map:req, priority:req + @ Sets the specified object's sprite's subpriority, and sets fixedPriority to TRUE. + @ Only used to hide the player and Briney behind the boat. + .macro setobjectsubpriority localId:req, map:req, subpriority:req .byte 0xa8 .2byte \localId map \map - .byte \priority + .byte \subpriority .endm - .macro resetobjectpriority localId:req, map:req + @ Sets the specified object's fixedPriority to FALSE. Does not change the subpriority field. + .macro resetobjectsubpriority localId:req, map:req .byte 0xa9 .2byte \localId map \map @@ -1357,14 +1362,14 @@ .byte 0xae .endm - @ Sets the door tile at (x, y) to be open without an animation. + @ Sets the door metatile at (x, y) to be open without an animation. .macro setdooropen x:req, y:req .byte 0xaf .2byte \x .2byte \y .endm - @ Sets the door tile at (x, y) to be closed without an animation. + @ Sets the door metatile at (x, y) to be closed without an animation. .macro setdoorclosed x:req, y:req .byte 0xb0 .2byte \x @@ -1463,21 +1468,21 @@ .4byte \pointer .endm - @ Spawns a secondary box showing how many Coins the player has. + @ Create a window showing how many Coins the player has. .macro showcoinsbox x:req, y:req .byte 0xc0 .byte \x .byte \y .endm - @ Hides the secondary box spawned by showcoins. It consumes its arguments but doesn't use them. + @ Destroys the window created by showcoins. It consumes its arguments but doesn't use them. .macro hidecoinsbox x:req, y:req .byte 0xc1 .byte \x .byte \y .endm - @ Updates the secondary box spawned by showcoins. It consumes its arguments but doesn't use them. + @ Updates the window created by showcoins. It consumes its arguments but doesn't use them. .macro updatecoinsbox x:req, y:req .byte 0xc2 .byte \x @@ -1504,9 +1509,10 @@ .endm @ Writes the name of the specified (box) PC box to the specified buffer. - .macro bufferboxname out:req, box:req + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 + .macro bufferboxname stringVarId:req, box:req .byte 0xc6 - .byte \out + .byte \stringVarId .2byte \box .endm @@ -1583,27 +1589,27 @@ .byte \location .endm - @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Moves the objects on the colored puzzle - @ specified by puzzleNumber one rotation + @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Moves the objects one rotation + @ on the colored puzzle specified by puzzleNumber. .macro moverotatingtileobjects puzzleNumber:req .byte 0xd3 .2byte \puzzleNumber .endm - @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Updates the facing direction of all objects on the puzzle tiles + @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Updates the facing direction of all objects on the puzzle tiles .macro turnrotatingtileobjects .byte 0xd4 .endm - @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects. + @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Allocates memory for the puzzle objects. @ isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset - @ the puzzle tiles start. + @ the puzzle tiles start (TRUE for Trick House Room, FALSE for Mossdeep Gym). .macro initrotatingtilepuzzle isTrickHouse:req .byte 0xd5 .2byte \isTrickHouse .endm - @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Frees the memory allocated for the puzzle objects. + @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Frees the memory allocated for the puzzle objects. .macro freerotatingtilepuzzle .byte 0xd6 .endm @@ -1623,6 +1629,7 @@ .byte 0xd9 .endm + @ Destroys the window created by braillemessage. .macro closebraillemessage .byte 0xda .endm @@ -1637,21 +1644,26 @@ .byte \mode .endm - .macro buffertrainerclassname out:req, class:req + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 + .macro buffertrainerclassname stringVarId:req, class:req .byte 0xdd - .byte \out + .byte \stringVarId .2byte \class .endm - .macro buffertrainername out:req, trainer:req + @ Buffers the specified trainer's name to the given string var. + @ If the trainer id is >= TRAINERS_COUNT it will be treated as TRAINER_NONE. + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 + .macro buffertrainername stringVarId:req, trainerId:req .byte 0xde - .byte \out - .2byte \trainer + .byte \stringVarId + .2byte \trainerId .endm - .macro pokenavcall pointer:req + @ Starts a Pokenav call with the given text. + .macro pokenavcall text:req .byte 0xdf - .4byte \pointer + .4byte \text .endm @ Warp commands can be given either the id of which warp location to go to on the destination map @@ -1661,18 +1673,21 @@ formatwarp \map, \a, \b, \c .endm - .macro buffercontesttypestring out:req, word:req + @ Buffers the name of the contest category to the buffer. + @ For example a category of CONTEST_CATEGORY_COOL will buffer the string "COOLNESS CONTEST". + .macro buffercontestname stringVarId:req, category:req .byte 0xe1 - .byte \out - .2byte \word + .byte \stringVarId + .2byte \category .endm - @ Writes the name of the specified (item) item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL + @ Writes the name of the specified item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL @ and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). @ If the specified item is >= ITEMS_COUNT then the name of ITEM_NONE ("????????") is buffered instead. - .macro bufferitemnameplural out:req, item:req, quantity:req + @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 + .macro bufferitemnameplural stringVarId:req, item:req, quantity:req .byte 0xe2 - .byte \out + .byte \stringVarId .2byte \item .2byte \quantity .endm @@ -1847,6 +1862,7 @@ dofieldeffect FLDEFF_SPARKLE .endm + @ Prints a braille message, waits for an A or B press, then closes the message. .macro braillemsgbox text:req braillemessage \text waitbuttonpress diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index a21ebd0baf..ca6e822507 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -128,8 +128,8 @@ DewfordTown_EventScript_FishingNotSoGood:: DewfordTown_EventScript_SailToPetalburg:: call EventScript_BackupMrBrineyLocation - setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 - setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0 applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat waitmovement 0 removeobject LOCALID_BRINEY_DEWFORD @@ -151,7 +151,7 @@ DewfordTown_EventScript_SailToPetalburg:: setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN hideobjectat LOCALID_BOAT_DEWFORD, MAP_DEWFORD_TOWN setvar VAR_BOARD_BRINEY_BOAT_STATE, 2 - resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN + resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 5, 4 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 waitstate @@ -160,8 +160,8 @@ DewfordTown_EventScript_SailToPetalburg:: DewfordTown_EventScript_SailToSlateport:: call EventScript_BackupMrBrineyLocation - setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 - setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1 + setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1 applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat waitmovement 0 removeobject LOCALID_BRINEY_DEWFORD @@ -178,7 +178,7 @@ DewfordTown_EventScript_SailToSlateport:: waitmovement 0 setobjectxyperm LOCALID_BRINEY_R109, 21, 26 addobject LOCALID_BRINEY_R109 - setobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 + setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 applymovement LOCALID_BRINEY_R109, DewfordTown_Movement_BrineyExitBoat waitmovement 0 clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY @@ -190,8 +190,8 @@ DewfordTown_EventScript_SailToSlateport:: call_if_set FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_LandedSlateport closemessage copyvar VAR_BRINEY_LOCATION, VAR_0x8008 - resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN - resetobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109 + resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN + resetobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109 copyobjectxytoperm LOCALID_BRINEY_R109 release end diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index d58bc50600..4cbe5c0454 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -361,8 +361,8 @@ Route104_EventScript_Girl2:: end Route104_EventScript_SailToDewford:: - setobjectpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0 - setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0 + setobjectsubpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0 + setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0 applymovement LOCALID_BRINEY_R104, Route104_Movement_BrineyBoardBoat waitmovement 0 removeobject LOCALID_BRINEY_R104 @@ -409,7 +409,7 @@ Route104_EventScript_ArriveInDewford:: waitmovement 0 setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8 addobject LOCALID_BRINEY_DEWFORD - setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN applymovement LOCALID_BRINEY_DEWFORD, Route104_Movement_BrineyExitBoat waitmovement 0 @@ -419,8 +419,8 @@ Route104_EventScript_ArriveInDewford:: setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT hideobjectat LOCALID_BOAT_R104, MAP_ROUTE104 copyvar VAR_BRINEY_LOCATION, VAR_0x8008 - resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104 - resetobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN + resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104 + resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN copyobjectxytoperm LOCALID_BRINEY_DEWFORD setvar VAR_BOARD_BRINEY_BOAT_STATE, 0 goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_DeliverLetterReminder diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index 37852c873f..08f0a1701f 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -6,8 +6,8 @@ Route109_MapScripts:: Route109_EventScript_StartDepartForDewford:: call EventScript_BackupMrBrineyLocation - setobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 - setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0 + setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0 + setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0 applymovement LOCALID_BRINEY_R109, Route109_Movement_BrineyEnterBoat waitmovement 0 removeobject LOCALID_BRINEY_R109 @@ -50,7 +50,7 @@ Route109_EventScript_DoSailToDewford:: clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8 addobject LOCALID_BRINEY_DEWFORD - setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 + setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0 applymovement LOCALID_BRINEY_DEWFORD, Route109_Movement_BrineyExitBoat waitmovement 0 clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN @@ -59,8 +59,8 @@ Route109_EventScript_DoSailToDewford:: msgbox DewfordTown_Text_BrineyLandedInDewford, MSGBOX_DEFAULT closemessage copyvar VAR_BRINEY_LOCATION, VAR_0x8008 - resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109 - resetobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN + resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109 + resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN copyobjectxytoperm LOCALID_BRINEY_DEWFORD release end diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index f3afb2e431..3d2ab82a9e 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -168,8 +168,8 @@ gScriptCmdTable:: .4byte ScrCmd_doweather @ 0xa5 .4byte ScrCmd_setstepcallback @ 0xa6 .4byte ScrCmd_setmaplayoutindex @ 0xa7 - .4byte ScrCmd_setobjectpriority @ 0xa8 - .4byte ScrCmd_resetobjectpriority @ 0xa9 + .4byte ScrCmd_setobjectsubpriority @ 0xa8 + .4byte ScrCmd_resetobjectsubpriority @ 0xa9 .4byte ScrCmd_createvobject @ 0xaa .4byte ScrCmd_turnvobject @ 0xab .4byte ScrCmd_opendoor @ 0xac @@ -225,7 +225,7 @@ gScriptCmdTable:: .4byte ScrCmd_buffertrainername @ 0xde .4byte ScrCmd_pokenavcall @ 0xdf .4byte ScrCmd_warpsootopolislegend @ 0xe0 - .4byte ScrCmd_buffercontesttype @ 0xe1 + .4byte ScrCmd_buffercontestname @ 0xe1 .4byte ScrCmd_bufferitemnameplural @ 0xe2 gScriptCmdTableEnd:: diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 13f31e9bd7..696903e2f5 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -283,7 +283,7 @@ ContestHall_EventScript_GetCategoryTough:: return ContestHall_EventScript_ContestGettingStarted:: - buffercontesttypestring 1, VAR_0x8008 + buffercontestname 1, VAR_0x8008 bufferstdstring 2, VAR_0x8009 call ContestHall_EventScript_GettingStarted lockall diff --git a/include/event_object_movement.h b/include/event_object_movement.h index 6ad4b55e4f..8ceea4d298 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -110,8 +110,8 @@ const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId); void SetObjectInvisibility(u8, u8, u8, bool8); void FreeAndReserveObjectSpritePalettes(void); void SetObjectEventSpritePosByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y); -void ResetObjectPriority(u8, u8, u8); -void SetObjectPriority(u8, u8, u8, u8); +void ResetObjectSubpriority(u8, u8, u8); +void SetObjectSubpriority(u8, u8, u8, u8); void AllowObjectAtPosTriggerGroundEffects(s16, s16); void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup); void ShiftObjectEventCoords(struct ObjectEvent *, s16, s16); diff --git a/src/data/lilycove_lady.h b/src/data/lilycove_lady.h index 1f1caa35f3..dd0885ff82 100644 --- a/src/data/lilycove_lady.h +++ b/src/data/lilycove_lady.h @@ -5,11 +5,11 @@ static const u16 sContestLadyMonGfxId[] = { - OBJ_EVENT_GFX_ZIGZAGOON_1, - OBJ_EVENT_GFX_SKITTY, - OBJ_EVENT_GFX_POOCHYENA, - OBJ_EVENT_GFX_KECLEON, - OBJ_EVENT_GFX_PIKACHU + [CONTEST_CATEGORY_COOL] = OBJ_EVENT_GFX_ZIGZAGOON_1, + [CONTEST_CATEGORY_BEAUTY] = OBJ_EVENT_GFX_SKITTY, + [CONTEST_CATEGORY_CUTE] = OBJ_EVENT_GFX_POOCHYENA, + [CONTEST_CATEGORY_SMART] = OBJ_EVENT_GFX_KECLEON, + [CONTEST_CATEGORY_TOUGH] = OBJ_EVENT_GFX_PIKACHU }; static const u16 sLilycoveLadyGfxId[] = @@ -434,36 +434,36 @@ static const u16 sFavorLadyPrizes[] = static const u8 *const sContestLadyMonNames[] = { - gText_ContestLady_Handsome, - gText_ContestLady_Vinny, - gText_ContestLady_Moreme, - gText_ContestLady_Ironhard, - gText_ContestLady_Muscle + [CONTEST_CATEGORY_COOL] = gText_ContestLady_Handsome, + [CONTEST_CATEGORY_BEAUTY] = gText_ContestLady_Vinny, + [CONTEST_CATEGORY_CUTE] = gText_ContestLady_Moreme, + [CONTEST_CATEGORY_SMART] = gText_ContestLady_Ironhard, + [CONTEST_CATEGORY_TOUGH] = gText_ContestLady_Muscle }; static const u8 *const sContestLadyCategoryNames[] = { - gText_ContestLady_Coolness, - gText_ContestLady_Beauty, - gText_ContestLady_Cuteness, - gText_ContestLady_Smartness, - gText_ContestLady_Toughness + [CONTEST_CATEGORY_COOL] = gText_ContestLady_Coolness, + [CONTEST_CATEGORY_BEAUTY] = gText_ContestLady_Beauty, + [CONTEST_CATEGORY_CUTE] = gText_ContestLady_Cuteness, + [CONTEST_CATEGORY_SMART] = gText_ContestLady_Smartness, + [CONTEST_CATEGORY_TOUGH] = gText_ContestLady_Toughness }; static const u8 *const sContestNames[] = { - gText_CoolnessContest, - gText_BeautyContest, - gText_CutenessContest, - gText_SmartnessContest, - gText_ToughnessContest + [CONTEST_CATEGORY_COOL] = gText_CoolnessContest, + [CONTEST_CATEGORY_BEAUTY] = gText_BeautyContest, + [CONTEST_CATEGORY_CUTE] = gText_CutenessContest, + [CONTEST_CATEGORY_SMART] = gText_SmartnessContest, + [CONTEST_CATEGORY_TOUGH] = gText_ToughnessContest }; static const u16 sContestLadyMonSpecies[] = { - SPECIES_ZIGZAGOON, - SPECIES_SKITTY, - SPECIES_POOCHYENA, - SPECIES_KECLEON, - SPECIES_PIKACHU + [CONTEST_CATEGORY_COOL] = SPECIES_ZIGZAGOON, + [CONTEST_CATEGORY_BEAUTY] = SPECIES_SKITTY, + [CONTEST_CATEGORY_CUTE] = SPECIES_POOCHYENA, + [CONTEST_CATEGORY_SMART] = SPECIES_KECLEON, + [CONTEST_CATEGORY_TOUGH] = SPECIES_PIKACHU }; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index c29f8466b7..b9a8fe3a71 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1915,7 +1915,7 @@ void AllowObjectAtPosTriggerGroundEffects(s16 x, s16 y) } } -void SetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority) +void SetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority) { u8 objectEventId; struct ObjectEvent *objectEvent; @@ -1930,7 +1930,7 @@ void SetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority) } } -void ResetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup) +void ResetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup) { u8 objectEventId; struct ObjectEvent *objectEvent; diff --git a/src/scrcmd.c b/src/scrcmd.c index 1dad3575c7..5b7c95e8e0 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1128,24 +1128,24 @@ bool8 ScrCmd_hideobject_at(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_setobjectpriority(struct ScriptContext *ctx) +bool8 ScrCmd_setobjectsubpriority(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); u8 priority = ScriptReadByte(ctx); - SetObjectPriority(localId, mapNum, mapGroup, priority + 83); + SetObjectSubpriority(localId, mapNum, mapGroup, priority + 83); return FALSE; } -bool8 ScrCmd_resetobjectpriority(struct ScriptContext *ctx) +bool8 ScrCmd_resetobjectsubpriority(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); - ResetObjectPriority(localId, mapNum, mapGroup); + ResetObjectSubpriority(localId, mapNum, mapGroup); return FALSE; } @@ -1635,12 +1635,12 @@ bool8 ScrCmd_bufferstdstring(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_buffercontesttype(struct ScriptContext *ctx) +bool8 ScrCmd_buffercontestname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); - u16 index = VarGet(ScriptReadHalfword(ctx)); + u16 category = VarGet(ScriptReadHalfword(ctx)); - BufferContestName(sScriptStringVars[stringVarIndex], index); + BufferContestName(sScriptStringVars[stringVarIndex], category); return FALSE; } From c4f8f4d11aeb2255fb0e7ccaa1256be7a2a0f63b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 17 Nov 2021 22:00:44 -0500 Subject: [PATCH 200/417] Add STR_VAR_# ids to string buffer macros --- asm/macros/event.inc | 61 ++++++++++--------- data/event_scripts.s | 4 +- .../scripts.inc | 8 +-- data/maps/BattleFrontier_Lounge2/scripts.inc | 20 +++--- data/maps/BattleFrontier_Lounge3/scripts.inc | 6 +- data/maps/BattleFrontier_Lounge6/scripts.inc | 2 +- data/maps/BattleFrontier_Lounge7/scripts.inc | 2 +- .../BattleFrontier_ScottsHouse/scripts.inc | 8 +-- data/maps/FortreeCity_House1/scripts.inc | 4 +- .../LilycoveCity_ContestLobby/scripts.inc | 2 +- .../scripts.inc | 14 ++--- .../scripts.inc | 2 +- .../scripts.inc | 8 +-- data/maps/MauvilleCity_GameCorner/scripts.inc | 28 ++++----- data/maps/MossdeepCity_House1/scripts.inc | 2 +- .../MossdeepCity_SpaceCenter_1F/scripts.inc | 4 +- .../MossdeepCity_StevensHouse/scripts.inc | 4 +- data/maps/PacifidlogTown_House2/scripts.inc | 2 +- data/maps/PacifidlogTown_House3/scripts.inc | 4 +- data/maps/Route113_GlassWorkshop/scripts.inc | 32 +++++----- .../Route119_WeatherInstitute_2F/scripts.inc | 2 +- .../scripts.inc | 4 +- .../RustboroCity_DevonCorp_2F/scripts.inc | 16 ++--- data/maps/RustboroCity_House1/scripts.inc | 2 +- data/maps/SkyPillar_Top/scripts.inc | 2 +- data/maps/SlateportCity/scripts.inc | 24 ++++---- .../SlateportCity_PokemonFanClub/scripts.inc | 2 +- data/maps/SootopolisCity_House6/scripts.inc | 2 +- data/scripts/berry_tree.inc | 8 +-- data/scripts/cable_club.inc | 2 +- data/scripts/contest_hall.inc | 8 +-- data/scripts/field_move_scripts.inc | 14 ++--- data/scripts/gift_stamp_card.inc | 2 +- data/scripts/obtain_item.inc | 26 ++++---- data/scripts/pc_transfer.inc | 10 +-- data/scripts/prof_birch.inc | 8 +-- data/scripts/secret_base.inc | 12 ++-- data/scripts/surf.inc | 2 +- data/scripts/trainer_script.inc | 6 +- 39 files changed, 186 insertions(+), 183 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 057ebe3922..38a53f1e28 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1014,76 +1014,83 @@ .2byte \move .endm + @ Converts STR_VAR_1, STR_VAR_2, or STR_VAR_3 to its corresponding index into sScriptStringVars (0, 1, or 2). + @ If given anything else it will output it directly. + @ Note: because the STR_VAR_# arguments given to this macro are not part of a processed string they are not + @ replaced with their charmap values, they are just passed as the literal characters "STR_VAR_#". + .macro stringvar id:req + .if \id == STR_VAR_1 + .byte 0 + .elseif \id == STR_VAR_2 + .byte 1 + .elseif \id == STR_VAR_3 + .byte 2 + .else + .byte \id + .endif + .endm + @ Writes the name of the given Pokemon species to the specified buffer. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferspeciesname stringVarId:req, species:req .byte 0x7d - .byte \stringVarId + stringvar \stringVarId .2byte \species .endm @ Writes the name of the species of the first Pokemon in the player's party to the specified buffer. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferleadmonspeciesname stringVarId:req .byte 0x7e - .byte \stringVarId + stringvar \stringVarId .endm @ Writes the nickname of the Pokemon in 'slot' (zero-indexed) of the player's party to the specified buffer. @ If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferpartymonnick stringVarId:req, slot:req .byte 0x7f - .byte \stringVarId + stringvar \stringVarId .2byte \slot .endm @ Writes the name of the specified item to the specified buffer. If itemId is >= ITEMS_COUNT, @ then the name of ITEM_NONE ("????????") is buffered instead. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferitemname stringVarId:req, item:req .byte 0x80 - .byte \stringVarId + stringvar \stringVarId .2byte \item .endm @ Writes the name of the specified decoration to the specified buffer. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferdecorationname stringVarId:req, decoration:req .byte 0x81 - .byte \stringVarId + stringvar \stringVarId .2byte \decoration .endm @ Writes the name of the specified move to the specified buffer. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro buffermovename stringVarId:req, move:req .byte 0x82 - .byte \stringVarId + stringvar \stringVarId .2byte \move .endm @ Converts the value of input to a decimal string, and writes that string to the specified buffer. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro buffernumberstring stringVarId:req, input:req .byte 0x83 - .byte \stringVarId + stringvar \stringVarId .2byte \input .endm @ Writes the given standard string (STDSTRING_*) to the specified buffer. Invalid std string ids are not handled. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferstdstring stringVarId:req, index:req .byte 0x84 - .byte \stringVarId + stringvar \stringVarId .2byte \index .endm @ Copies the string at the given pointer to the specified buffer. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferstring stringVarId:req, text:req .byte 0x85 - .byte \stringVarId + stringvar \stringVarId .4byte \text .endm @@ -1462,9 +1469,9 @@ .4byte \pointer .endm - .macro vbufferstring byte:req, pointer:req + .macro vbufferstring stringVarIndex:req, pointer:req .byte 0xbf - .byte \byte + stringvar \stringVarIndex .4byte \pointer .endm @@ -1509,10 +1516,9 @@ .endm @ Writes the name of the specified (box) PC box to the specified buffer. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferboxname stringVarId:req, box:req .byte 0xc6 - .byte \stringVarId + stringvar \stringVarId .2byte \box .endm @@ -1644,19 +1650,17 @@ .byte \mode .endm - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro buffertrainerclassname stringVarId:req, class:req .byte 0xdd - .byte \stringVarId + stringvar \stringVarId .2byte \class .endm @ Buffers the specified trainer's name to the given string var. @ If the trainer id is >= TRAINERS_COUNT it will be treated as TRAINER_NONE. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro buffertrainername stringVarId:req, trainerId:req .byte 0xde - .byte \stringVarId + stringvar \stringVarId .2byte \trainerId .endm @@ -1677,17 +1681,16 @@ @ For example a category of CONTEST_CATEGORY_COOL will buffer the string "COOLNESS CONTEST". .macro buffercontestname stringVarId:req, category:req .byte 0xe1 - .byte \stringVarId + stringvar \stringVarId .2byte \category .endm @ Writes the name of the specified item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL @ and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). @ If the specified item is >= ITEMS_COUNT then the name of ITEM_NONE ("????????") is buffered instead. - @ 0: STR_VAR_1, 1: STR_VAR_2, 2: STR_VAR_3 .macro bufferitemnameplural stringVarId:req, item:req, quantity:req .byte 0xe2 - .byte \stringVarId + stringvar \stringVarId .2byte \item .2byte \quantity .endm diff --git a/data/event_scripts.s b/data/event_scripts.s index 5c7db08d62..c6d6a5fa29 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -820,7 +820,7 @@ Common_EventScript_NameReceivedPartyMon:: return Common_EventScript_PlayerHandedOverTheItem:: - bufferitemname 0, VAR_0x8004 + bufferitemname STR_VAR_1, VAR_0x8004 playfanfare MUS_OBTAIN_TMHM message gText_PlayerHandedOverTheItem waitmessage @@ -1001,7 +1001,7 @@ Common_EventScript_LegendaryFlewAway:: fadescreenswapbuffers FADE_TO_BLACK removeobject VAR_LAST_TALKED fadescreenswapbuffers FADE_FROM_BLACK - bufferspeciesname 0, VAR_0x8004 + bufferspeciesname STR_VAR_1, VAR_0x8004 msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT release end diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index 4d4438ae6c..3d10a08a02 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -686,19 +686,19 @@ BattleFrontier_BattleTowerLobby_EventScript_BufferModeText:: return BattleFrontier_BattleTowerLobby_EventScript_BufferTextSingle:: - bufferstdstring 0, STDSTRING_SINGLE + bufferstdstring STR_VAR_1, STDSTRING_SINGLE return BattleFrontier_BattleTowerLobby_EventScript_BufferTextDouble:: - bufferstdstring 0, STDSTRING_DOUBLE + bufferstdstring STR_VAR_1, STDSTRING_DOUBLE return BattleFrontier_BattleTowerLobby_EventScript_BufferTextMulti:: - bufferstdstring 0, STDSTRING_MULTI + bufferstdstring STR_VAR_1, STDSTRING_MULTI return BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti:: - bufferstdstring 0, STDSTRING_MULTI_LINK + bufferstdstring STR_VAR_1, STDSTRING_MULTI_LINK return BattleFrontier_BattleTowerLobby_EventScript_SetAttendantTalkedTo:: diff --git a/data/maps/BattleFrontier_Lounge2/scripts.inc b/data/maps/BattleFrontier_Lounge2/scripts.inc index d98a9f64e1..e3a7fc1721 100644 --- a/data/maps/BattleFrontier_Lounge2/scripts.inc +++ b/data/maps/BattleFrontier_Lounge2/scripts.inc @@ -61,43 +61,43 @@ BattleFrontier_Lounge2_EventScript_FacilityNews:: return BattleFrontier_Lounge2_EventScript_BufferSingle:: - bufferstdstring 0, STDSTRING_SINGLE + bufferstdstring STR_VAR_1, STDSTRING_SINGLE return BattleFrontier_Lounge2_EventScript_BufferDouble:: - bufferstdstring 0, STDSTRING_DOUBLE + bufferstdstring STR_VAR_1, STDSTRING_DOUBLE return BattleFrontier_Lounge2_EventScript_BufferMulti:: - bufferstdstring 0, STDSTRING_MULTI + bufferstdstring STR_VAR_1, STDSTRING_MULTI return BattleFrontier_Lounge2_EventScript_BufferMultiLink:: - bufferstdstring 0, STDSTRING_MULTI_LINK + bufferstdstring STR_VAR_1, STDSTRING_MULTI_LINK return BattleFrontier_Lounge2_EventScript_BufferBattleDome:: - bufferstdstring 0, STDSTRING_BATTLE_DOME + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_DOME return BattleFrontier_Lounge2_EventScript_BufferBattleFactory:: - bufferstdstring 0, STDSTRING_BATTLE_FACTORY + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_FACTORY return BattleFrontier_Lounge2_EventScript_BufferBattlePalace:: - bufferstdstring 0, STDSTRING_BATTLE_PALACE + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PALACE return BattleFrontier_Lounge2_EventScript_BufferBattleArena:: - bufferstdstring 0, STDSTRING_BATTLE_ARENA + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_ARENA return BattleFrontier_Lounge2_EventScript_BufferBattlePike:: - bufferstdstring 0, STDSTRING_BATTLE_PIKE + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PIKE return BattleFrontier_Lounge2_EventScript_BufferBattlePyramid:: - bufferstdstring 0, STDSTRING_BATTLE_PYRAMID + bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PYRAMID return BattleFrontier_Lounge2_EventScript_Maniac1:: diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc index c0a9417385..1c9c5bc3b2 100644 --- a/data/maps/BattleFrontier_Lounge3/scripts.inc +++ b/data/maps/BattleFrontier_Lounge3/scripts.inc @@ -144,17 +144,17 @@ BattleFrontier_Lounge3_EventScript_LostChallenge:: end BattleFrontier_Lounge3_EventScript_RewardBet5:: - buffernumberstring 0, (BET_AMOUNT_5 * 2) + buffernumberstring STR_VAR_1, (BET_AMOUNT_5 * 2) setvar VAR_0x8004, (BET_AMOUNT_5 * 2) return BattleFrontier_Lounge3_EventScript_RewardBet10:: - buffernumberstring 0, (BET_AMOUNT_10 * 2) + buffernumberstring STR_VAR_1, (BET_AMOUNT_10 * 2) setvar VAR_0x8004, (BET_AMOUNT_10 * 2) return BattleFrontier_Lounge3_EventScript_RewardBet15:: - buffernumberstring 0, (BET_AMOUNT_15 * 2) + buffernumberstring STR_VAR_1, (BET_AMOUNT_15 * 2) setvar VAR_0x8004, (BET_AMOUNT_15 * 2) return diff --git a/data/maps/BattleFrontier_Lounge6/scripts.inc b/data/maps/BattleFrontier_Lounge6/scripts.inc index 678ea6e330..65fd940c1a 100644 --- a/data/maps/BattleFrontier_Lounge6/scripts.inc +++ b/data/maps/BattleFrontier_Lounge6/scripts.inc @@ -38,7 +38,7 @@ BattleFrontier_Lounge6_EventScript_DeclineTrade:: end BattleFrontier_Lounge6_EventScript_NotRequestedMon:: - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox BattleFrontier_Lounge6_Text_DontTradeForAnythingButMon, MSGBOX_DEFAULT release end diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index 2878444706..7953ec8201 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -249,7 +249,7 @@ BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection:: copyvar VAR_0x8004, VAR_TEMP_D copyvar VAR_0x8005, VAR_TEMP_E special BufferBattleFrontierTutorMoveName - buffernumberstring 1, VAR_0x8008 + buffernumberstring STR_VAR_2, VAR_0x8008 copyvar VAR_0x8004, VAR_TEMP_C msgbox BattleFrontier_Lounge7_Text_MoveWillBeXBattlePoints, MSGBOX_YESNO compare VAR_RESULT, NO diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc index edb4bdf411..9d2bc59474 100644 --- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc +++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc @@ -176,25 +176,25 @@ BattleFrontier_ScottsHouse_EventScript_WelcomeToFrontier:: end BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints:: - buffernumberstring 0, 4 + buffernumberstring STR_VAR_1, 4 setvar VAR_0x8004, 4 goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints:: - buffernumberstring 0, 3 + buffernumberstring STR_VAR_1, 3 setvar VAR_0x8004, 3 goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints:: - buffernumberstring 0, 2 + buffernumberstring STR_VAR_1, 2 setvar VAR_0x8004, 2 goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end BattleFrontier_ScottsHouse_EventScript_Give1BattlePoint:: - buffernumberstring 0, 1 + buffernumberstring STR_VAR_1, 1 setvar VAR_0x8004, 1 goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints end diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc index 111a1b7c86..a16c261128 100644 --- a/data/maps/FortreeCity_House1/scripts.inc +++ b/data/maps/FortreeCity_House1/scripts.inc @@ -27,7 +27,7 @@ FortreeCity_House1_EventScript_Trader:: special CreateInGameTradePokemon special DoInGameTradeScene waitstate - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox FortreeCity_House1_Text_MonYouTakeCare, MSGBOX_DEFAULT setflag FLAG_FORTREE_NPC_TRADE_COMPLETED release @@ -39,7 +39,7 @@ FortreeCity_House1_EventScript_DeclineTrade:: end FortreeCity_House1_EventScript_NotRequestedMon:: - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox FortreeCity_House1_Text_ThisIsntAMon, MSGBOX_DEFAULT release end diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index fc5ea1d7a8..84a790aede 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -836,7 +836,7 @@ LilycoveCity_ContestLobby_EventScript_CancelLinkTransmissionError:: LilycoveCity_ContestLobby_EventScript_StartLinkContest:: special GetContestPlayerId addvar VAR_0x8004, 1 - buffernumberstring 1, VAR_0x8004 + buffernumberstring STR_VAR_2, VAR_0x8004 messageautoscroll LilycoveCity_ContestLobby_Text_YourMonIsEntryNumX waitmessage subvar VAR_0x8004, 1 diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc index b0fda2731f..224d3c778a 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -144,12 +144,12 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: compare VAR_TEMP_1, 2 call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade updatemoneybox - bufferitemname 0, VAR_TEMP_0 + bufferitemname STR_VAR_1, VAR_TEMP_0 playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_CanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 - bufferitemname 1, VAR_TEMP_0 - bufferstdstring 2, STDSTRING_ITEMS + bufferitemname STR_VAR_2, VAR_TEMP_0 + bufferstdstring STR_VAR_3, STDSTRING_ITEMS msgbox gText_PutItemInPocket, MSGBOX_DEFAULT random 64 @ 1/64 chance of an additional drink dropping compare VAR_RESULT, 0 @@ -160,8 +160,8 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 - bufferitemname 1, VAR_TEMP_0 - bufferstdstring 2, STDSTRING_ITEMS + bufferitemname STR_VAR_2, VAR_TEMP_0 + bufferstdstring STR_VAR_3, STDSTRING_ITEMS msgbox gText_PutItemInPocket, MSGBOX_DEFAULT random 64 @ 1/64 * the prev 1/64 chance of a third additional drink dropping, ~ 0.02% chance compare VAR_RESULT, 0 @@ -172,8 +172,8 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 - bufferitemname 1, VAR_TEMP_0 - bufferstdstring 2, STDSTRING_ITEMS + bufferitemname STR_VAR_2, VAR_TEMP_0 + bufferstdstring STR_VAR_3, STDSTRING_ITEMS msgbox gText_PutItemInPocket, MSGBOX_DEFAULT goto LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink end diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc index fb82ba47a6..45a0a844e6 100644 --- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc @@ -41,7 +41,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_LotteryClerk:: call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPartyMon compare VAR_0x8006, 1 call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPCMon - bufferitemname 0, VAR_0x8005 + bufferitemname STR_VAR_1, VAR_0x8005 compare VAR_0x8004, 1 call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TwoDigitMatch compare VAR_0x8004, 2 diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 0a828c426b..857099f26d 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -117,7 +117,7 @@ LittlerootTown_ProfessorBirchsLab_OnFrame: @ This is just where the game tells you its yours and lets you nickname it LittlerootTown_ProfessorBirchsLab_EventScript_GiveStarterEvent:: lockall - bufferleadmonspeciesname 0 + bufferleadmonspeciesname STR_VAR_1 message LittlerootTown_ProfessorBirchsLab_Text_LikeYouToHavePokemon waitmessage playfanfare MUS_OBTAIN_ITEM @@ -357,7 +357,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime:: end LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil:: - bufferspeciesname 0, SPECIES_CYNDAQUIL + bufferspeciesname STR_VAR_1, SPECIES_CYNDAQUIL setvar VAR_TEMP_1, SPECIES_CYNDAQUIL givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE compare VAR_RESULT, 0 @@ -402,7 +402,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil:: end LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile:: - bufferspeciesname 0, SPECIES_TOTODILE + bufferspeciesname STR_VAR_1, SPECIES_TOTODILE setvar VAR_TEMP_1, SPECIES_TOTODILE givemon SPECIES_TOTODILE, 5, ITEM_NONE compare VAR_RESULT, 0 @@ -447,7 +447,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile:: end LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita:: - bufferspeciesname 0, SPECIES_CHIKORITA + bufferspeciesname STR_VAR_1, SPECIES_CHIKORITA setvar VAR_TEMP_1, SPECIES_CHIKORITA givemon SPECIES_CHIKORITA, 5, ITEM_NONE compare VAR_RESULT, 0 diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc index ab1c248e08..451e8acb5a 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -138,17 +138,17 @@ MauvilleCity_GameCorner_EventScript_ChooseDollPrize:: MauvilleCity_GameCorner_EventScript_TreeckoDoll:: setvar VAR_TEMP_1, 1 - bufferdecorationname 0, DECOR_TREECKO_DOLL + bufferdecorationname STR_VAR_1, DECOR_TREECKO_DOLL goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize MauvilleCity_GameCorner_EventScript_TorchicDoll:: setvar VAR_TEMP_1, 2 - bufferdecorationname 0, DECOR_TORCHIC_DOLL + bufferdecorationname STR_VAR_1, DECOR_TORCHIC_DOLL goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize MauvilleCity_GameCorner_EventScript_MudkipDoll:: setvar VAR_TEMP_1, 3 - bufferdecorationname 0, DECOR_MUDKIP_DOLL + bufferdecorationname STR_VAR_1, DECOR_MUDKIP_DOLL goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize MauvilleCity_GameCorner_EventScript_ConfirmDollPrize:: @@ -165,7 +165,7 @@ MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll:: checkcoins VAR_TEMP_2 compare VAR_TEMP_2, DOLL_COINS goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll - bufferdecorationname 1, DECOR_TREECKO_DOLL + bufferdecorationname STR_VAR_2, DECOR_TREECKO_DOLL checkdecorspace DECOR_TREECKO_DOLL compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll @@ -181,7 +181,7 @@ MauvilleCity_GameCorner_EventScript_BuyTorchicDoll:: checkcoins VAR_TEMP_2 compare VAR_TEMP_2, DOLL_COINS goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll - bufferdecorationname 1, DECOR_TORCHIC_DOLL + bufferdecorationname STR_VAR_2, DECOR_TORCHIC_DOLL checkdecorspace DECOR_TORCHIC_DOLL compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll @@ -197,7 +197,7 @@ MauvilleCity_GameCorner_EventScript_BuyMudkipDoll:: checkcoins VAR_TEMP_2 compare VAR_TEMP_2, DOLL_COINS goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll - bufferdecorationname 1, DECOR_MUDKIP_DOLL + bufferdecorationname STR_VAR_2, DECOR_MUDKIP_DOLL checkdecorspace DECOR_MUDKIP_DOLL compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll @@ -261,31 +261,31 @@ MauvilleCity_GameCorner_EventScript_ChooseTMPrize:: MauvilleCity_GameCorner_EventScript_TM32:: setvar VAR_TEMP_1, 1 - bufferitemname 0, ITEM_TM32 + bufferitemname STR_VAR_1, ITEM_TM32 setvar VAR_0x8004, ITEM_TM32 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize MauvilleCity_GameCorner_EventScript_TM29:: setvar VAR_TEMP_1, 2 - bufferitemname 0, ITEM_TM29 + bufferitemname STR_VAR_1, ITEM_TM29 setvar VAR_0x8004, ITEM_TM29 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize MauvilleCity_GameCorner_EventScript_TM35:: setvar VAR_TEMP_1, 3 - bufferitemname 0, ITEM_TM35 + bufferitemname STR_VAR_1, ITEM_TM35 setvar VAR_0x8004, ITEM_TM35 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize MauvilleCity_GameCorner_EventScript_TM24:: setvar VAR_TEMP_1, 4 - bufferitemname 0, ITEM_TM24 + bufferitemname STR_VAR_1, ITEM_TM24 setvar VAR_0x8004, ITEM_TM24 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize MauvilleCity_GameCorner_EventScript_TM13:: setvar VAR_TEMP_1, 5 - bufferitemname 0, ITEM_TM13 + bufferitemname STR_VAR_1, ITEM_TM13 setvar VAR_0x8004, ITEM_TM13 goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize @@ -415,7 +415,7 @@ MauvilleCity_GameCorner_EventScript_Girl:: end MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll:: - bufferdecorationname 1, DECOR_TREECKO_DOLL + bufferdecorationname STR_VAR_2, DECOR_TREECKO_DOLL checkdecorspace DECOR_TREECKO_DOLL compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll @@ -426,7 +426,7 @@ MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll:: end MauvilleCity_GameCorner_EventScript_GiveTorchicDoll:: - bufferdecorationname 1, DECOR_TORCHIC_DOLL + bufferdecorationname STR_VAR_2, DECOR_TORCHIC_DOLL checkdecorspace DECOR_TORCHIC_DOLL compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll @@ -437,7 +437,7 @@ MauvilleCity_GameCorner_EventScript_GiveTorchicDoll:: end MauvilleCity_GameCorner_EventScript_GiveMudkipDoll:: - bufferdecorationname 1, DECOR_MUDKIP_DOLL + bufferdecorationname STR_VAR_2, DECOR_MUDKIP_DOLL checkdecorspace DECOR_MUDKIP_DOLL compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll diff --git a/data/maps/MossdeepCity_House1/scripts.inc b/data/maps/MossdeepCity_House1/scripts.inc index 99224a795e..1bb1dede6f 100644 --- a/data/maps/MossdeepCity_House1/scripts.inc +++ b/data/maps/MossdeepCity_House1/scripts.inc @@ -4,7 +4,7 @@ MossdeepCity_House1_MapScripts:: MossdeepCity_House1_EventScript_BlackBelt:: lock faceplayer - bufferleadmonspeciesname 0 + bufferleadmonspeciesname STR_VAR_1 msgbox MossdeepCity_House1_Text_HmmYourPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, GetPokeblockNameByMonNature compare VAR_RESULT, 0 diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index b7c08839e3..4177c73ac1 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -62,7 +62,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounter:: goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma dotimebasedevents specialvar VAR_RESULT, GetWeekCount - buffernumberstring 0, VAR_RESULT + buffernumberstring STR_VAR_1, VAR_RESULT compare VAR_RESULT, 0 call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYet compare VAR_RESULT, 1 @@ -84,7 +84,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber:: MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma:: dotimebasedevents specialvar VAR_RESULT, GetWeekCount - buffernumberstring 0, VAR_RESULT + buffernumberstring STR_VAR_1, VAR_RESULT compare VAR_RESULT, 0 call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYetMagma compare VAR_RESULT, 1 diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index af7c601e00..a5a3d09804 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -121,13 +121,13 @@ MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC:: end MossdeepCity_StevensHouse_EventScript_ReceivedBeldumFanfare:: - bufferspeciesname 1, SPECIES_BELDUM + bufferspeciesname STR_VAR_2, SPECIES_BELDUM removeobject LOCALID_BELDUM_BALL playfanfare MUS_OBTAIN_ITEM message MossdeepCity_StevensHouse_Text_ObtainedBeldum waitmessage waitfanfare - bufferspeciesname 0, SPECIES_BELDUM + bufferspeciesname STR_VAR_1, SPECIES_BELDUM return MossdeepCity_StevensHouse_EventScript_ReceivedBeldum:: diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc index 27f966e961..ea0710c3d6 100644 --- a/data/maps/PacifidlogTown_House2/scripts.inc +++ b/data/maps/PacifidlogTown_House2/scripts.inc @@ -68,7 +68,7 @@ PacifidlogTown_House2_EventScript_GiveFrustration:: PacifidlogTown_House2_EventScript_ComeBackInXDays:: specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable - buffernumberstring 0, VAR_RESULT + buffernumberstring STR_VAR_1, VAR_RESULT msgbox PacifidlogTown_House2_Text_GetGoodTMInXDays, MSGBOX_DEFAULT release end diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc index a2f70e2cc6..fbdeb74a5f 100644 --- a/data/maps/PacifidlogTown_House3/scripts.inc +++ b/data/maps/PacifidlogTown_House3/scripts.inc @@ -27,7 +27,7 @@ PacifidlogTown_House3_EventScript_Trader:: special CreateInGameTradePokemon special DoInGameTradeScene waitstate - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox PacifidlogTown_House3_Text_ItsSubtlyDifferentThankYou, MSGBOX_DEFAULT setflag FLAG_PACIFIDLOG_NPC_TRADE_COMPLETED release @@ -39,7 +39,7 @@ PacifidlogTown_House3_EventScript_DeclineTrade:: end PacifidlogTown_House3_EventScript_NotRequestedMon:: - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox PacifidlogTown_House3_Text_WontAcceptAnyLessThanRealMon, MSGBOX_DEFAULT release end diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc index 31fad1ceaa..fd980bf843 100644 --- a/data/maps/Route113_GlassWorkshop/scripts.inc +++ b/data/maps/Route113_GlassWorkshop/scripts.inc @@ -78,7 +78,7 @@ Route113_GlassWorkshop_EventScript_ChooseGlassItem:: Route113_GlassWorkshop_EventScript_BlueFlute:: setvar VAR_0x8008, ITEM_BLUE_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, BLUE_FLUTE_PRICE compare VAR_ASH_GATHER_COUNT, BLUE_FLUTE_PRICE goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem @@ -92,7 +92,7 @@ Route113_GlassWorkshop_EventScript_BlueFlute:: Route113_GlassWorkshop_EventScript_YellowFlute:: setvar VAR_0x8008, ITEM_YELLOW_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, YELLOW_FLUTE_PRICE compare VAR_ASH_GATHER_COUNT, YELLOW_FLUTE_PRICE goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem @@ -106,7 +106,7 @@ Route113_GlassWorkshop_EventScript_YellowFlute:: Route113_GlassWorkshop_EventScript_RedFlute:: setvar VAR_0x8008, ITEM_RED_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, RED_FLUTE_PRICE compare VAR_ASH_GATHER_COUNT, RED_FLUTE_PRICE goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem @@ -120,7 +120,7 @@ Route113_GlassWorkshop_EventScript_RedFlute:: Route113_GlassWorkshop_EventScript_WhiteFlute:: setvar VAR_0x8008, ITEM_WHITE_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, WHITE_FLUTE_PRICE compare VAR_ASH_GATHER_COUNT, WHITE_FLUTE_PRICE goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem @@ -134,7 +134,7 @@ Route113_GlassWorkshop_EventScript_WhiteFlute:: Route113_GlassWorkshop_EventScript_BlackFlute:: setvar VAR_0x8008, ITEM_BLACK_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, BLACK_FLUTE_PRICE compare VAR_ASH_GATHER_COUNT, BLACK_FLUTE_PRICE goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem @@ -149,7 +149,7 @@ Route113_GlassWorkshop_EventScript_BlackFlute:: Route113_GlassWorkshop_EventScript_PrettyChair:: setvar VAR_0x8009, 1 setvar VAR_0x8008, DECOR_PRETTY_CHAIR - bufferdecorationname 0, VAR_0x8008 + bufferdecorationname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, PRETTY_CHAIR_PRICE compare VAR_ASH_GATHER_COUNT, PRETTY_CHAIR_PRICE goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem @@ -164,7 +164,7 @@ Route113_GlassWorkshop_EventScript_PrettyChair:: Route113_GlassWorkshop_EventScript_PrettyDesk:: setvar VAR_0x8009, 1 setvar VAR_0x8008, DECOR_PRETTY_DESK - bufferdecorationname 0, VAR_0x8008 + bufferdecorationname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, PRETTY_DESK_PRICE compare VAR_ASH_GATHER_COUNT, PRETTY_DESK_PRICE goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem @@ -184,14 +184,14 @@ Route113_GlassWorkshop_EventScript_CancelGlassItemSelect:: Route113_GlassWorkshop_EventScript_NotEnoughAsh:: setvar VAR_0x800A, LOWEST_ASH_PRICE subvar VAR_0x800A, VAR_ASH_GATHER_COUNT - buffernumberstring 0, VAR_0x800A + buffernumberstring STR_VAR_1, VAR_0x800A msgbox Route113_GlassWorkshop_Text_NotEnoughAshNeedX, MSGBOX_DEFAULT release end Route113_GlassWorkshop_EventScript_NotEnoughAshForItem:: subvar VAR_0x800A, VAR_ASH_GATHER_COUNT - buffernumberstring 1, VAR_0x800A + buffernumberstring STR_VAR_2, VAR_0x800A message Route113_GlassWorkshop_Text_NotEnoughAshToMakeItem waitmessage goto Route113_GlassWorkshop_EventScript_ChooseGlassItem @@ -257,49 +257,49 @@ Route113_GlassWorkshop_EventScript_GiveItemAfterNoRoom:: Route113_GlassWorkshop_EventScript_GiveBlueFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_BLUE_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GiveYellowFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_YELLOW_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GiveRedFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_RED_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GiveWhiteFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_WHITE_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GiveBlackFlute:: setvar VAR_0x8009, 0 setvar VAR_0x8008, ITEM_BLACK_FLUTE - bufferitemname 0, VAR_0x8008 + bufferitemname STR_VAR_1, VAR_0x8008 goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GivePrettyChair:: setvar VAR_0x8009, 1 setvar VAR_0x8008, DECOR_PRETTY_CHAIR - bufferdecorationname 0, DECOR_PRETTY_CHAIR + bufferdecorationname STR_VAR_1, DECOR_PRETTY_CHAIR goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end Route113_GlassWorkshop_EventScript_GivePrettyDesk:: setvar VAR_0x8009, 1 setvar VAR_0x8008, DECOR_PRETTY_DESK - bufferdecorationname 0, DECOR_PRETTY_DESK + bufferdecorationname STR_VAR_1, DECOR_PRETTY_DESK goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain end diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 3b94d5cc14..3a2957d5ee 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -128,7 +128,7 @@ Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare:: message Route119_WeatherInstitute_2F_Text_PlayerReceivedCastform waitmessage waitfanfare - bufferspeciesname 0, SPECIES_CASTFORM + bufferspeciesname STR_VAR_1, SPECIES_CASTFORM return Route119_WeatherInstitute_2F_EventScript_ExplainCastform:: diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc index 54304e03e3..06e16be353 100644 --- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc +++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc @@ -243,8 +243,8 @@ Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard:: goto Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard:: - bufferitemname 0, VAR_0x8008 - bufferitemname 1, VAR_0x8009 + bufferitemname STR_VAR_1, VAR_0x8008 + bufferitemname STR_VAR_2, VAR_0x8009 msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index 7db701c40e..1f2f1ea804 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -96,7 +96,7 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil:: end RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil:: - bufferitemname 0, ITEM_ROOT_FOSSIL + bufferitemname STR_VAR_1, ITEM_ROOT_FOSSIL msgbox RustboroCity_DevonCorp_2F_Text_HandedFossilToResearcher, MSGBOX_DEFAULT removeitem ITEM_ROOT_FOSSIL setvar VAR_FOSSIL_RESURRECTION_STATE, 1 @@ -121,7 +121,7 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil:: end RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil:: - bufferitemname 0, ITEM_CLAW_FOSSIL + bufferitemname STR_VAR_1, ITEM_CLAW_FOSSIL msgbox RustboroCity_DevonCorp_2F_Text_HandedFossilToResearcher, MSGBOX_DEFAULT removeitem ITEM_CLAW_FOSSIL setvar VAR_FOSSIL_RESURRECTION_STATE, 1 @@ -147,13 +147,13 @@ RustboroCity_DevonCorp_2F_EventScript_FossilMonReady:: end RustboroCity_DevonCorp_2F_EventScript_LileepReady:: - bufferspeciesname 1, SPECIES_LILEEP + bufferspeciesname STR_VAR_2, SPECIES_LILEEP msgbox RustboroCity_DevonCorp_2F_Text_FossilizedMonBroughtBackToLife, MSGBOX_DEFAULT goto RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep end RustboroCity_DevonCorp_2F_EventScript_AnorithReady:: - bufferspeciesname 1, SPECIES_ANORITH + bufferspeciesname STR_VAR_2, SPECIES_ANORITH msgbox RustboroCity_DevonCorp_2F_Text_FossilizedMonBroughtBackToLife, MSGBOX_DEFAULT goto RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith end @@ -193,12 +193,12 @@ RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC:: end RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare:: - bufferspeciesname 1, SPECIES_LILEEP + bufferspeciesname STR_VAR_2, SPECIES_LILEEP playfanfare MUS_OBTAIN_ITEM message RustboroCity_DevonCorp_2F_Text_ReceivedMonFromResearcher waitmessage waitfanfare - bufferspeciesname 0, SPECIES_LILEEP + bufferspeciesname STR_VAR_1, SPECIES_LILEEP return RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep:: @@ -242,12 +242,12 @@ RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC:: end RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare:: - bufferspeciesname 1, SPECIES_ANORITH + bufferspeciesname STR_VAR_2, SPECIES_ANORITH playfanfare MUS_OBTAIN_ITEM message RustboroCity_DevonCorp_2F_Text_ReceivedMonFromResearcher waitmessage waitfanfare - bufferspeciesname 0, SPECIES_ANORITH + bufferspeciesname STR_VAR_1, SPECIES_ANORITH return RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith:: diff --git a/data/maps/RustboroCity_House1/scripts.inc b/data/maps/RustboroCity_House1/scripts.inc index 3d64f72a76..20e93506bc 100644 --- a/data/maps/RustboroCity_House1/scripts.inc +++ b/data/maps/RustboroCity_House1/scripts.inc @@ -38,7 +38,7 @@ RustboroCity_House1_EventScript_DeclineTrade:: end RustboroCity_House1_EventScript_NotRequestedMon:: - bufferspeciesname 0, VAR_0x8009 + bufferspeciesname STR_VAR_1, VAR_0x8009 msgbox RustboroCity_House1_Text_DoesntLookLikeMonToMe, MSGBOX_DEFAULT release end diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index 2b3c021200..c59707e146 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -88,7 +88,7 @@ SkyPillar_Top_EventScript_RanFromRayquaza2:: fadescreenswapbuffers FADE_TO_BLACK removeobject VAR_LAST_TALKED fadescreenswapbuffers FADE_FROM_BLACK - bufferspeciesname 0, VAR_0x8004 + bufferspeciesname STR_VAR_1, VAR_0x8004 msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT releaseall end diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index be2f3f3e51..2e7ed6cbec 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -164,7 +164,7 @@ SlateportCity_Pokemart_EnergyGuru: SlateportCity_EventScript_EffortRibbonWoman:: lock faceplayer - bufferleadmonspeciesname 0 + bufferleadmonspeciesname STR_VAR_1 msgbox SlateportCity_Text_OhYourPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, LeadMonHasEffortRibbon compare VAR_RESULT, TRUE @@ -795,77 +795,77 @@ SlateportCity_EventScript_ChooseBerryPowderItem:: end SlateportCity_EventScript_EnergyPowder:: - bufferitemname 0, ITEM_ENERGY_POWDER + bufferitemname STR_VAR_1, ITEM_ENERGY_POWDER setvar VAR_0x8008, ITEM_ENERGY_POWDER setvar VAR_0x8009, 50 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_EnergyRoot:: - bufferitemname 0, ITEM_ENERGY_ROOT + bufferitemname STR_VAR_1, ITEM_ENERGY_ROOT setvar VAR_0x8008, ITEM_ENERGY_ROOT setvar VAR_0x8009, 80 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_HealPowder:: - bufferitemname 0, ITEM_HEAL_POWDER + bufferitemname STR_VAR_1, ITEM_HEAL_POWDER setvar VAR_0x8008, ITEM_HEAL_POWDER setvar VAR_0x8009, 50 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_RevivalHerb:: - bufferitemname 0, ITEM_REVIVAL_HERB + bufferitemname STR_VAR_1, ITEM_REVIVAL_HERB setvar VAR_0x8008, ITEM_REVIVAL_HERB setvar VAR_0x8009, 300 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Protein:: - bufferitemname 0, ITEM_PROTEIN + bufferitemname STR_VAR_1, ITEM_PROTEIN setvar VAR_0x8008, ITEM_PROTEIN setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Iron:: - bufferitemname 0, ITEM_IRON + bufferitemname STR_VAR_1, ITEM_IRON setvar VAR_0x8008, ITEM_IRON setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Carbos:: - bufferitemname 0, ITEM_CARBOS + bufferitemname STR_VAR_1, ITEM_CARBOS setvar VAR_0x8008, ITEM_CARBOS setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Calcium:: - bufferitemname 0, ITEM_CALCIUM + bufferitemname STR_VAR_1, ITEM_CALCIUM setvar VAR_0x8008, ITEM_CALCIUM setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_Zinc:: - bufferitemname 0, ITEM_ZINC + bufferitemname STR_VAR_1, ITEM_ZINC setvar VAR_0x8008, ITEM_ZINC setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_HPUp:: - bufferitemname 0, ITEM_HP_UP + bufferitemname STR_VAR_1, ITEM_HP_UP setvar VAR_0x8008, ITEM_HP_UP setvar VAR_0x8009, 1000 goto SlateportCity_EventScript_TryBuyBerryPowderItem end SlateportCity_EventScript_PPUp:: - bufferitemname 0, ITEM_PP_UP + bufferitemname STR_VAR_1, ITEM_PP_UP setvar VAR_0x8008, ITEM_PP_UP setvar VAR_0x8009, 3000 goto SlateportCity_EventScript_TryBuyBerryPowderItem diff --git a/data/maps/SlateportCity_PokemonFanClub/scripts.inc b/data/maps/SlateportCity_PokemonFanClub/scripts.inc index b974ebed17..4599548b53 100644 --- a/data/maps/SlateportCity_PokemonFanClub/scripts.inc +++ b/data/maps/SlateportCity_PokemonFanClub/scripts.inc @@ -47,7 +47,7 @@ SlateportCity_PokemonFanClub_EventScript_ChairmanAssessLeadMon:: call_if_unset FLAG_RECEIVED_PINK_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonCute call_if_unset FLAG_RECEIVED_BLUE_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonBeauty call_if_unset FLAG_RECEIVED_RED_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonCool - bufferleadmonspeciesname 0 + bufferleadmonspeciesname STR_VAR_1 switch VAR_TEMP_1 case 0, SlateportCity_PokemonFanClub_EventScript_NoHighConditions case 1, SlateportCity_PokemonFanClub_EventScript_GiveRedScarf diff --git a/data/maps/SootopolisCity_House6/scripts.inc b/data/maps/SootopolisCity_House6/scripts.inc index be2dad11f2..fd570fc683 100644 --- a/data/maps/SootopolisCity_House6/scripts.inc +++ b/data/maps/SootopolisCity_House6/scripts.inc @@ -27,7 +27,7 @@ SootopolisCity_House6_EventScript_ReceivedWailmerDoll:: end SootopolisCity_House6_EventScript_NoRoomForWailmerDoll:: - bufferdecorationname 1, DECOR_WAILMER_DOLL + bufferdecorationname STR_VAR_2, DECOR_WAILMER_DOLL msgbox gText_NoRoomLeftForAnother, MSGBOX_DEFAULT msgbox SootopolisCity_House6_Text_IllHoldItForYou, MSGBOX_DEFAULT release diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc index 9602d3b77f..a1f743681c 100644 --- a/data/scripts/berry_tree.inc +++ b/data/scripts/berry_tree.inc @@ -92,20 +92,20 @@ BerryTree_EventScript_GetCareAdverb:: goto_if_eq BerryTree_EventScript_SetAdverbPoor compare VAR_0x8005, 4 goto_if_eq BerryTree_EventScript_SetAdverbGreat - bufferstring 1, BerryTree_Text_CareAdverbGood + bufferstring STR_VAR_2, BerryTree_Text_CareAdverbGood return BerryTree_EventScript_SetAdverbGreat:: - bufferstring 1, BerryTree_Text_CareAdverbGreat + bufferstring STR_VAR_2, BerryTree_Text_CareAdverbGreat return BerryTree_EventScript_SetAdverbPoor:: - bufferstring 1, BerryTree_Text_CareAdverbPoor + bufferstring STR_VAR_2, BerryTree_Text_CareAdverbPoor return @ VAR_0x8006 here is the number of berries BerryTree_EventScript_CheckBerryFullyGrown:: - buffernumberstring 1, VAR_0x8006 + buffernumberstring STR_VAR_2, VAR_0x8006 lock faceplayer special ObjectEventInteractionGetBerryCountString diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 2022c5c8fa..790871d140 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -827,7 +827,7 @@ EventScript_RecordCenter_Spot3:: end RecordCorner_EventScript_ReceivedGiftItem:: - bufferitemname 1, VAR_TEMP_1 + bufferitemname STR_VAR_2, VAR_TEMP_1 message RecordCorner_Text_PlayerSentOverOneX waitmessage waitbuttonpress diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 696903e2f5..5ff2abe0c4 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -283,8 +283,8 @@ ContestHall_EventScript_GetCategoryTough:: return ContestHall_EventScript_ContestGettingStarted:: - buffercontestname 1, VAR_0x8008 - bufferstdstring 2, VAR_0x8009 + buffercontestname STR_VAR_2, VAR_0x8008 + bufferstdstring STR_VAR_3, VAR_0x8009 call ContestHall_EventScript_GettingStarted lockall applymovement LOCALID_MC, ContestHall_Movement_MCBackUp @@ -393,7 +393,7 @@ ContestHall_EventScript_Player4WalkToCenter:: ContestHall_EventScript_ShowContestMonPic:: special BufferContestTrainerAndMonNames addvar VAR_0x8006, 1 - buffernumberstring 1, VAR_0x8006 + buffernumberstring STR_VAR_2, VAR_0x8006 lockall applymovement VAR_0x800B, ContestHall_Movement_ContestantDelay32 waitmovement 0 @@ -1000,7 +1000,7 @@ ContestHall_EventScript_CongratulateWinner:: special BufferContestWinnerTrainerName special BufferContestWinnerMonName addvar VAR_0x8005, 1 - buffernumberstring 1, VAR_0x8005 + buffernumberstring STR_VAR_2, VAR_0x8005 addvar VAR_0x8005, -1 call ContestHall_EventScript_CongratsWinner applymovement VAR_TEMP_3, ContestHall_Movement_WinningPlayerWalkUp diff --git a/data/scripts/field_move_scripts.inc b/data/scripts/field_move_scripts.inc index b81ca21dd1..39a04ae1a1 100644 --- a/data/scripts/field_move_scripts.inc +++ b/data/scripts/field_move_scripts.inc @@ -6,8 +6,8 @@ EventScript_CutTree:: compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CheckTreeCantCut setfieldeffectargument 0, VAR_RESULT - bufferpartymonnick 0, VAR_RESULT - buffermovename 1, MOVE_CUT + bufferpartymonnick STR_VAR_1, VAR_RESULT + buffermovename STR_VAR_2, MOVE_CUT msgbox Text_WantToCut, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_CancelCut @@ -67,8 +67,8 @@ EventScript_RockSmash:: compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CantSmashRock setfieldeffectargument 0, VAR_RESULT - bufferpartymonnick 0, VAR_RESULT - buffermovename 1, MOVE_ROCK_SMASH + bufferpartymonnick STR_VAR_1, VAR_RESULT + buffermovename STR_VAR_2, MOVE_ROCK_SMASH msgbox Text_WantToSmash, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq EventScript_CancelSmash @@ -195,7 +195,7 @@ EventScript_UseWaterfall:: checkpartymove MOVE_WATERFALL compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CantWaterfall - bufferpartymonnick 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToWaterfall, MSGBOX_YESNO compare VAR_RESULT, NO @@ -230,7 +230,7 @@ EventScript_UseDive:: checkpartymove MOVE_DIVE compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CantDive - bufferpartymonnick 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToDive, MSGBOX_YESNO @@ -255,7 +255,7 @@ EventScript_UseDiveUnderwater:: checkpartymove MOVE_DIVE compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_CantSurface - bufferpartymonnick 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToSurface, MSGBOX_YESNO diff --git a/data/scripts/gift_stamp_card.inc b/data/scripts/gift_stamp_card.inc index f6e1eb7c7c..4ac399bec5 100644 --- a/data/scripts/gift_stamp_card.inc +++ b/data/scripts/gift_stamp_card.inc @@ -5,7 +5,7 @@ MysteryGiftScript_StampCard:: setorcopyvar VAR_RESULT, GET_NUM_STAMPS specialvar VAR_0x8009, GetMysteryGiftCardStat subvar VAR_0x8008, VAR_0x8009 - buffernumberstring 0, VAR_0x8008 + buffernumberstring STR_VAR_1, VAR_0x8008 lock faceplayer vmessage sText_MysteryGiftStampCard diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index 8e24d47099..8fa6a68a7e 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -8,7 +8,7 @@ Std_ObtainItem:: return EventScript_ObtainItemMessage:: - bufferitemnameplural 1, ITEMID, AMOUNT + bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT checkitemtype ITEMID call EventScript_BufferPocketNameAndTryFanfare compare VAR_0x8007, TRUE @@ -27,31 +27,31 @@ EventScript_BufferPocketNameAndTryFanfare:: end EventScript_BufferItemsPocket:: - bufferstdstring 2, STDSTRING_ITEMS + bufferstdstring STR_VAR_3, STDSTRING_ITEMS compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferKeyItemsPocket:: - bufferstdstring 2, STDSTRING_KEYITEMS + bufferstdstring STR_VAR_3, STDSTRING_KEYITEMS compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferPokeballsPocket:: - bufferstdstring 2, STDSTRING_POKEBALLS + bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return EventScript_BufferTMHMsPocket:: - bufferstdstring 2, STDSTRING_TMHMS + bufferstdstring STR_VAR_3, STDSTRING_TMHMS compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedTMHM return EventScript_BufferBerriesPocket:: - bufferstdstring 2, STDSTRING_BERRIES + bufferstdstring STR_VAR_3, STDSTRING_BERRIES compare VAR_0x8007, TRUE call_if_eq EventScript_PlayFanfareObtainedItem return @@ -82,7 +82,7 @@ Std_ObtainDecoration:: return EventScript_ObtainDecorationMessage:: - bufferdecorationname 1, ITEMID + bufferdecorationname STR_VAR_2, ITEMID compare VAR_0x8007, TRUE call_if_eq EventScript_ObtainedDecor compare VAR_0x8007, FALSE @@ -109,7 +109,7 @@ Std_FindItem:: copyvar VAR_0x8005, AMOUNT checkitemspace ITEMID, AMOUNT copyvar VAR_0x8007, VAR_RESULT - bufferitemnameplural 1, ITEMID, AMOUNT + bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT checkitemtype ITEMID call EventScript_BufferPocketNameAndTryFanfare compare VAR_0x8007, TRUE @@ -130,7 +130,7 @@ EventScript_PickUpItem:: call_if_eq EventScript_FoundItem waitfanfare waitmessage - bufferitemnameplural 1, VAR_0x8004, VAR_0x8005 + bufferitemnameplural STR_VAR_2, VAR_0x8004, VAR_0x8005 pyramid_inchallenge compare VAR_RESULT, TRUE goto_if_eq EventScript_PutBattlePyramidItemInBag @@ -142,7 +142,7 @@ EventScript_PutBattlePyramidItemInBag:: return EventScript_FoundTMHM:: - bufferitemnameplural 0, VAR_0x8004, VAR_0x8005 + bufferitemnameplural STR_VAR_1, VAR_0x8004, VAR_0x8005 message gText_PlayerFoundOneTMHM return @@ -161,7 +161,7 @@ EventScript_HiddenItemScript:: waitse additem VAR_0x8005 copyvar VAR_0x8007, VAR_RESULT - bufferitemnameplural 1, VAR_0x8005, 1 + bufferitemnameplural STR_VAR_2, VAR_0x8005, 1 checkitemtype VAR_0x8005 call EventScript_BufferPocketNameAndTryFanfare compare VAR_0x8007, TRUE @@ -181,7 +181,7 @@ EventScript_PickUpHiddenItem:: end EventScript_FoundHiddenTMHM:: - bufferitemnameplural 0, VAR_0x8004, 1 + bufferitemnameplural STR_VAR_1, VAR_0x8004, 1 message gText_PlayerFoundOneTMHM goto EventScript_PutHiddenItemInPocket end @@ -194,7 +194,7 @@ EventScript_FoundHiddenItem:: EventScript_PutHiddenItemInPocket:: waitmessage waitfanfare - bufferitemnameplural 1, VAR_0x8004, 1 + bufferitemnameplural STR_VAR_2, VAR_0x8004, 1 copyvar VAR_0x8004, VAR_0x8008 msgbox gText_PutItemInPocket, MSGBOX_DEFAULT special TryPutTreasureInvestigatorsOnAir diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc index 1fe575d551..da92ef1d52 100644 --- a/data/scripts/pc_transfer.inc +++ b/data/scripts/pc_transfer.inc @@ -14,22 +14,22 @@ Common_EventScript_NameReceivedBoxMon:: return Common_EventScript_TransferredToPC:: - bufferboxname 0, VAR_PC_BOX_TO_SEND_MON - bufferspeciesname 1, VAR_TEMP_1 + bufferboxname STR_VAR_1, VAR_PC_BOX_TO_SEND_MON + bufferspeciesname STR_VAR_2, VAR_TEMP_1 call_if_unset FLAG_SYS_PC_LANETTE, EventScript_TransferredSomeonesPC call_if_set FLAG_SYS_PC_LANETTE, EventScript_TransferredLanettesPC return EventScript_TransferredSomeonesPC:: specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, 1 + compare VAR_RESULT, TRUE goto_if_eq EventScript_SomeonesPCBoxFull msgbox gText_PkmnTransferredSomeonesPC, MSGBOX_DEFAULT return EventScript_SomeonesPCBoxFull:: specialvar VAR_RESULT, GetPCBoxToSendMon - bufferboxname 2, VAR_RESULT + bufferboxname STR_VAR_3, VAR_RESULT msgbox gText_PkmnTransferredSomeonesPCBoxFull, MSGBOX_DEFAULT return @@ -42,7 +42,7 @@ EventScript_TransferredLanettesPC:: EventScript_LanettesPCBoxFull:: specialvar VAR_RESULT, GetPCBoxToSendMon - bufferboxname 2, VAR_RESULT + bufferboxname STR_VAR_3, VAR_RESULT msgbox gText_PkmnTransferredLanettesPCBoxFull, MSGBOX_DEFAULT return diff --git a/data/scripts/prof_birch.inc b/data/scripts/prof_birch.inc index 7eb1730fcd..97a967138f 100644 --- a/data/scripts/prof_birch.inc +++ b/data/scripts/prof_birch.inc @@ -73,8 +73,8 @@ ProfBirch_EventScript_RatePokedex:: copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8009, VAR_0x8006 copyvar VAR_0x800A, VAR_RESULT - buffernumberstring 0, VAR_0x8008 @ Num Hoenn seen - buffernumberstring 1, VAR_0x8009 @ Num Hoenn caught + buffernumberstring STR_VAR_1, VAR_0x8008 @ Num Hoenn seen + buffernumberstring STR_VAR_2, VAR_0x8009 @ Num Hoenn caught msgbox gBirchDexRatingText_SoYouveSeenAndCaught, MSGBOX_DEFAULT call ProfBirch_EventScript_ShowRatingMessage compare VAR_0x800A, 0 @@ -83,7 +83,7 @@ ProfBirch_EventScript_RatePokedex:: specialvar VAR_RESULT, ScriptGetPokedexInfo copyvar VAR_0x8008, VAR_0x8005 copyvar VAR_0x8009, VAR_0x8006 - buffernumberstring 0, VAR_0x8008 @ Num National seen - buffernumberstring 1, VAR_0x8009 @ Num National caught + buffernumberstring STR_VAR_1, VAR_0x8008 @ Num National seen + buffernumberstring STR_VAR_2, VAR_0x8009 @ Num National caught msgbox gBirchDexRatingText_OnANationwideBasis, MSGBOX_DEFAULT return diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index ae802cdfd2..f024f09014 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -31,7 +31,7 @@ SecretBase_EventScript_CheckEntrance:: goto_if_eq SecretBase_EventScript_AlreadyHasSecretBase checkpartymove MOVE_SECRET_POWER setfieldeffectargument 0, VAR_RESULT - buffermovename 1, MOVE_SECRET_POWER + buffermovename STR_VAR_2, MOVE_SECRET_POWER compare VAR_0x8007, SECRET_BASE_RED_CAVE goto_if_eq SecretBase_EventScript_Cave compare VAR_0x8007, SECRET_BASE_BROWN_CAVE @@ -50,7 +50,7 @@ SecretBase_EventScript_Cave:: lockall compare VAR_RESULT, PARTY_SIZE goto_if_eq SecretBase_EventScript_CaveNoSecretPower - bufferpartymonnick 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_IndentUseSecretPower, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance @@ -82,7 +82,7 @@ SecretBase_EventScript_Tree:: lockall compare VAR_RESULT, PARTY_SIZE goto_if_eq SecretBase_EventScript_TreeNoSecretPower - bufferpartymonnick 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_TreeUseSecretPower, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance @@ -114,7 +114,7 @@ SecretBase_EventScript_Shrub:: lockall compare VAR_RESULT, PARTY_SIZE goto_if_eq SecretBase_EventScript_ShrubNoSecretPower - bufferpartymonnick 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_ClumpUseSecretPower, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance @@ -221,8 +221,8 @@ SecretBase_EventScript_AlreadyHasSecretBase:: msgbox SecretBase_Text_MovingCompletedUseSecretPower, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq SecretBase_EventScript_CancelOnEntrance - bufferpartymonnick 0, VAR_0x8004 - buffermovename 1, MOVE_SECRET_POWER + bufferpartymonnick STR_VAR_1, VAR_0x8004 + buffermovename STR_VAR_2, MOVE_SECRET_POWER msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage closemessage diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc index 91580422e1..c2bc35d5a0 100644 --- a/data/scripts/surf.inc +++ b/data/scripts/surf.inc @@ -2,7 +2,7 @@ EventScript_UseSurf:: checkpartymove MOVE_SURF compare VAR_RESULT, PARTY_SIZE goto_if_eq EventScript_EndUseSurf - bufferpartymonnick 0, VAR_RESULT + bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT lockall msgbox gText_WantToUseSurf, MSGBOX_YESNO diff --git a/data/scripts/trainer_script.inc b/data/scripts/trainer_script.inc index 2a2384c667..5c63030821 100644 --- a/data/scripts/trainer_script.inc +++ b/data/scripts/trainer_script.inc @@ -1,6 +1,6 @@ Std_RegisteredInMatchCall:: - buffertrainerclassname 0, VAR_0x8000 - buffertrainername 1, VAR_0x8000 + buffertrainerclassname STR_VAR_1, VAR_0x8000 + buffertrainername STR_VAR_2, VAR_0x8000 closemessage delay 30 playfanfare MUS_REGISTER_MATCH_CALL @@ -12,7 +12,7 @@ Std_RegisteredInMatchCall:: EventScript_TryGetTrainerScript:: special ShouldTryGetTrainerScript - compare VAR_RESULT, 1 + compare VAR_RESULT, TRUE goto_if_eq EventScript_GotoTrainerScript releaseall end From 1b35f9adad4f7471cb8a95ab78b9512d2c239156 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 17 Nov 2021 22:11:03 -0500 Subject: [PATCH 201/417] Use specific name limits for string limit functions --- gflib/string_util.c | 12 ++++++------ gflib/string_util.h | 6 +++--- src/apprentice.c | 2 +- src/battle_controller_link_opponent.c | 2 +- src/battle_controller_link_partner.c | 2 +- src/battle_controller_opponent.c | 2 +- src/battle_controller_player.c | 2 +- src/battle_controller_player_partner.c | 2 +- src/battle_controller_recorded_opponent.c | 2 +- src/battle_controller_recorded_player.c | 2 +- src/battle_controller_wally.c | 2 +- src/battle_interface.c | 2 +- src/battle_message.c | 24 +++++++++++------------ src/battle_tower.c | 4 ++-- src/contest.c | 2 +- src/contest_util.c | 2 +- src/daycare.c | 4 ++-- src/evolution_scene.c | 8 ++++---- src/field_poison.c | 2 +- src/lilycove_lady.c | 12 ++++++------ src/lottery_corner.c | 2 +- src/menu_specialized.c | 2 +- src/move_relearner.c | 2 +- src/party_menu.c | 4 ++-- src/pokemon.c | 2 +- src/pokemon_storage_system.c | 4 ++-- src/pokenav_conditions.c | 2 +- src/pokenav_conditions_search_results.c | 2 +- src/pokenav_ribbons_list.c | 2 +- src/pokenav_ribbons_summary.c | 2 +- src/scrcmd.c | 2 +- src/trade.c | 14 ++++++------- src/tv.c | 4 ++-- src/union_room.c | 2 +- src/use_pokeblock.c | 2 +- 35 files changed, 72 insertions(+), 72 deletions(-) diff --git a/gflib/string_util.c b/gflib/string_util.c index 9463b4a7b4..bc6f976c71 100644 --- a/gflib/string_util.c +++ b/gflib/string_util.c @@ -25,10 +25,10 @@ static const s32 sPowersOfTen[] = 1000000000, }; -u8 *StringCopy10(u8 *dest, const u8 *src) +u8 *StringCopy_Nickname(u8 *dest, const u8 *src) { u8 i; - u32 limit = 10; + u32 limit = POKEMON_NAME_LENGTH; for (i = 0; i < limit; i++) { @@ -42,10 +42,10 @@ u8 *StringCopy10(u8 *dest, const u8 *src) return &dest[i]; } -u8 *StringGetEnd10(u8 *str) +u8 *StringGet_Nickname(u8 *str) { u8 i; - u32 limit = 10; + u32 limit = POKEMON_NAME_LENGTH; for (i = 0; i < limit; i++) if (str[i] == EOS) @@ -55,10 +55,10 @@ u8 *StringGetEnd10(u8 *str) return &str[i]; } -u8 *StringCopy7(u8 *dest, const u8 *src) +u8 *StringCopy_PlayerName(u8 *dest, const u8 *src) { s32 i; - s32 limit = 7; + s32 limit = PLAYER_NAME_LENGTH; for (i = 0; i < limit; i++) { diff --git a/gflib/string_util.h b/gflib/string_util.h index 7f3b64add8..0a8a99fb98 100644 --- a/gflib/string_util.h +++ b/gflib/string_util.h @@ -13,9 +13,9 @@ enum StringConvertMode STR_CONV_MODE_LEADING_ZEROS }; -u8 *StringCopy10(u8 *dest, const u8 *src); -u8 *StringGetEnd10(u8 *str); -u8 *StringCopy7(u8 *dest, const u8 *src); +u8 *StringCopy_Nickname(u8 *dest, const u8 *src); +u8 *StringGet_Nickname(u8 *str); +u8 *StringCopy_PlayerName(u8 *dest, const u8 *src); u8 *StringCopy(u8 *dest, const u8 *src); u8 *StringAppend(u8 *dest, const u8 *src); u8 *StringCopyN(u8 *dest, const u8 *src, u8 n); diff --git a/src/apprentice.c b/src/apprentice.c index 6255b9215a..2ab2f0e5a1 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -127,7 +127,7 @@ void BufferApprenticeChallengeText(u8 saveApprenticeId) for (i = 0; num != 0 && i < APPRENTICE_COUNT; num /= 10, i++) ; - StringCopy7(gStringVar1, gSaveBlock2Ptr->apprentices[saveApprenticeId].playerName); + StringCopy_PlayerName(gStringVar1, gSaveBlock2Ptr->apprentices[saveApprenticeId].playerName); ConvertInternationalString(gStringVar1, gSaveBlock2Ptr->apprentices[saveApprenticeId].language); ConvertIntToDecimalStringN(gStringVar2, gSaveBlock2Ptr->apprentices[saveApprenticeId].number, STR_CONV_MODE_RIGHT_ALIGN, i); challengeText = sApprenticeChallengeTexts[gSaveBlock2Ptr->apprentices[saveApprenticeId].id]; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 2ec2e61dc0..668dd01b42 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -602,7 +602,7 @@ static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst) battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); - StringCopy10(battleMon.nickname, nickname); + StringCopy_Nickname(battleMon.nickname, nickname); GetMonData(&gEnemyParty[monId], MON_DATA_OT_NAME, battleMon.otName); src = (u8 *)&battleMon; for (size = 0; size < sizeof(battleMon); size++) diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 0fa156a437..14d806576a 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -489,7 +489,7 @@ static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst) battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); - StringCopy10(battleMon.nickname, nickname); + StringCopy_Nickname(battleMon.nickname, nickname); GetMonData(&gPlayerParty[monId], MON_DATA_OT_NAME, battleMon.otName); src = (u8 *)&battleMon; for (size = 0; size < sizeof(battleMon); size++) diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 8e1a8327a0..c3830780b3 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -602,7 +602,7 @@ static u32 GetOpponentMonData(u8 monId, u8 *dst) battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); - StringCopy10(battleMon.nickname, nickname); + StringCopy_Nickname(battleMon.nickname, nickname); GetMonData(&gEnemyParty[monId], MON_DATA_OT_NAME, battleMon.otName); src = (u8 *)&battleMon; for (size = 0; size < sizeof(battleMon); size++) diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index ff5591e55b..2133d5b6f4 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1647,7 +1647,7 @@ static u32 CopyPlayerMonData(u8 monId, u8 *dst) battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); - StringCopy10(battleMon.nickname, nickname); + StringCopy_Nickname(battleMon.nickname, nickname); GetMonData(&gPlayerParty[monId], MON_DATA_OT_NAME, battleMon.otName); src = (u8 *)&battleMon; for (size = 0; size < sizeof(battleMon); size++) diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 2c90982713..c2ff08a239 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -673,7 +673,7 @@ static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst) battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); - StringCopy10(battleMon.nickname, nickname); + StringCopy_Nickname(battleMon.nickname, nickname); GetMonData(&gPlayerParty[monId], MON_DATA_OT_NAME, battleMon.otName); src = (u8 *)&battleMon; for (size = 0; size < sizeof(battleMon); size++) diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 54156da35b..4a35ef723d 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -585,7 +585,7 @@ static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst) battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); - StringCopy10(battleMon.nickname, nickname); + StringCopy_Nickname(battleMon.nickname, nickname); GetMonData(&gEnemyParty[monId], MON_DATA_OT_NAME, battleMon.otName); src = (u8 *)&battleMon; for (size = 0; size < sizeof(battleMon); size++) diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index a28e87a423..e25482fb57 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -564,7 +564,7 @@ static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst) battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); - StringCopy10(battleMon.nickname, nickname); + StringCopy_Nickname(battleMon.nickname, nickname); GetMonData(&gPlayerParty[monId], MON_DATA_OT_NAME, battleMon.otName); src = (u8 *)&battleMon; for (size = 0; size < sizeof(battleMon); size++) diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index f7c3312577..c4c0c11a9e 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -491,7 +491,7 @@ static u32 CopyWallyMonData(u8 monId, u8 *dst) battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); - StringCopy10(battleMon.nickname, nickname); + StringCopy_Nickname(battleMon.nickname, nickname); GetMonData(&gPlayerParty[monId], MON_DATA_OT_NAME, battleMon.otName); src = (u8 *)&battleMon; for (size = 0; size < sizeof(battleMon); size++) diff --git a/src/battle_interface.c b/src/battle_interface.c index 96bab7f90b..26209fe2d7 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1893,7 +1893,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon) StringCopy(gDisplayedStringBattle, gText_HealthboxNickname); GetMonData(mon, MON_DATA_NICKNAME, nickname); - StringGetEnd10(nickname); + StringGet_Nickname(nickname); ptr = StringAppend(gDisplayedStringBattle, nickname); gender = GetMonGender(mon); diff --git a/src/battle_message.c b/src/battle_message.c index b88eedfb37..1df9356945 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2400,7 +2400,7 @@ static const u8* TryGetStatusString(u8 *src) { \ GetMonData(&gPlayerParty[monIndex], MON_DATA_NICKNAME, text); \ } \ - StringGetEnd10(text); \ + StringGet_Nickname(text); \ toCpy = text; u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) @@ -2466,49 +2466,49 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) case B_TXT_PLAYER_MON1_NAME: // first player poke name GetMonData(&gPlayerParty[gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_OPPONENT_MON1_NAME: // first enemy poke name GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_PLAYER_MON2_NAME: // second player poke name GetMonData(&gPlayerParty[gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT)]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_OPPONENT_MON2_NAME: // second enemy poke name GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT)]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_LINK_PLAYER_MON1_NAME: // link first player poke name GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerId].id]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_LINK_OPPONENT_MON1_NAME: // link first opponent poke name GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerId].id ^ 1]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_LINK_PLAYER_MON2_NAME: // link second player poke name GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerId].id ^ 2]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_LINK_OPPONENT_MON2_NAME: // link second opponent poke name GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerId].id ^ 3]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_ATK_NAME_WITH_PREFIX_MON1: // attacker name with prefix, only battlerId 0/1 @@ -2521,7 +2521,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) else GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetBattlerAtPosition(GET_BATTLER_SIDE(gBattlerAttacker)) + 2]], MON_DATA_NICKNAME, text); - StringGetEnd10(text); + StringGet_Nickname(text); toCpy = text; break; case B_TXT_ATK_NAME_WITH_PREFIX: // attacker name with prefix @@ -2903,7 +2903,7 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst) GetMonData(&gEnemyParty[src[srcID + 2]], MON_DATA_NICKNAME, text); } - StringGetEnd10(text); + StringGet_Nickname(text); StringAppend(dst, text); srcID += 3; break; @@ -2920,7 +2920,7 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst) GetMonData(&gPlayerParty[src[srcID + 2]], MON_DATA_NICKNAME, dst); else GetMonData(&gEnemyParty[src[srcID + 2]], MON_DATA_NICKNAME, dst); - StringGetEnd10(dst); + StringGet_Nickname(dst); srcID += 3; break; case B_BUFF_NEGATIVE_FLAVOR: // flavor table diff --git a/src/battle_tower.c b/src/battle_tower.c index accdca3b4e..7ed15d1e65 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -2160,7 +2160,7 @@ static void SaveBattleTowerRecord(void) playerRecord->lvlMode = lvlMode; playerRecord->facilityClass = class; CopyTrainerId(playerRecord->trainerId, gSaveBlock2Ptr->playerTrainerId); - StringCopy7(playerRecord->name, gSaveBlock2Ptr->playerName); + StringCopy_PlayerName(playerRecord->name, gSaveBlock2Ptr->playerName); playerRecord->winStreak = GetCurrentBattleTowerWinStreak(lvlMode, battleMode); for (i = 0; i < EASY_CHAT_BATTLE_WORDS_COUNT; i++) @@ -2831,7 +2831,7 @@ static void FillEReaderTrainerWithPlayerData(void) } CopyTrainerId(ereaderTrainer->trainerId, gSaveBlock2Ptr->playerTrainerId); - StringCopy7(ereaderTrainer->name, gSaveBlock2Ptr->playerName); + StringCopy_PlayerName(ereaderTrainer->name, gSaveBlock2Ptr->playerName); ereaderTrainer->winStreak = 1; diff --git a/src/contest.c b/src/contest.c index b5a035ff85..ced9f90cde 100644 --- a/src/contest.c +++ b/src/contest.c @@ -2794,7 +2794,7 @@ void CreateContestMonFromParty(u8 partyIndex) gContestMons[gContestPlayerMonIndex].highestRank = 0; gContestMons[gContestPlayerMonIndex].species = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES); GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, name); - StringGetEnd10(name); + StringGet_Nickname(name); if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) { StripMonNameForLinkContest(name, GetMonData(&gPlayerParty[partyIndex], MON_DATA_LANGUAGE)); diff --git a/src/contest_util.c b/src/contest_util.c index 7533d4349a..1ca2175265 100644 --- a/src/contest_util.c +++ b/src/contest_util.c @@ -2253,7 +2253,7 @@ void Task_LinkContest_FinalizeConnection(u8 taskId) { // Succesfully connected for (i = 0; i < CONTESTANT_COUNT; i++) - StringGetEnd10(gContestMons[i].nickname); + StringGet_Nickname(gContestMons[i].nickname); DestroyTask(taskId); SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE); diff --git a/src/daycare.c b/src/daycare.c index c900e34933..ebbab762ad 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -96,7 +96,7 @@ u8 *GetMonNickname2(struct Pokemon *mon, u8 *dest) u8 nickname[POKEMON_NAME_LENGTH * 2]; GetMonData(mon, MON_DATA_NICKNAME, nickname); - return StringCopy10(dest, nickname); + return StringCopy_Nickname(dest, nickname); } u8 *GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest) @@ -104,7 +104,7 @@ u8 *GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest) u8 nickname[POKEMON_NAME_LENGTH * 2]; GetBoxMonData(mon, MON_DATA_NICKNAME, nickname); - return StringCopy10(dest, nickname); + return StringCopy_Nickname(dest, nickname); } u8 CountPokemonInDaycare(struct DayCare *daycare) diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 99ff268213..327e48d195 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -252,7 +252,7 @@ void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u AllocateMonSpritesGfx(); GetMonData(mon, MON_DATA_NICKNAME, name); - StringCopy10(gStringVar1, name); + StringCopy_Nickname(gStringVar1, name); StringCopy(gStringVar2, gSpeciesNames[postEvoSpecies]); // preEvo sprite @@ -474,7 +474,7 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, u8 preEvoSprit u8 ID; GetMonData(mon, MON_DATA_NICKNAME, name); - StringCopy10(gStringVar1, name); + StringCopy_Nickname(gStringVar1, name); StringCopy(gStringVar2, gSpeciesNames[postEvoSpecies]); gAffineAnimsDisabled = TRUE; @@ -787,7 +787,7 @@ static void Task_EvolutionScene(u8 taskId) gTasks[taskId].tLearnsFirstMove = FALSE; gTasks[taskId].tLearnMoveState = MVSTATE_INTRO_MSG_1; GetMonData(mon, MON_DATA_NICKNAME, text); - StringCopy10(gBattleTextBuff1, text); + StringCopy_Nickname(gBattleTextBuff1, text); if (var == MON_HAS_MAX_MOVES) gTasks[taskId].tState = EVOSTATE_REPLACE_MOVE; @@ -1202,7 +1202,7 @@ static void Task_TradeEvolutionScene(u8 taskId) gTasks[taskId].tLearnsFirstMove = FALSE; gTasks[taskId].tLearnMoveState = 0; GetMonData(mon, MON_DATA_NICKNAME, text); - StringCopy10(gBattleTextBuff1, text); + StringCopy_Nickname(gBattleTextBuff1, text); if (var == MON_HAS_MAX_MOVES) gTasks[taskId].tState = T_EVOSTATE_REPLACE_MOVE; diff --git a/src/field_poison.c b/src/field_poison.c index 132ce571e1..90013243cd 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -50,7 +50,7 @@ static void FaintFromFieldPoison(u8 partyIdx) AdjustFriendship(pokemon, FRIENDSHIP_EVENT_FAINT_FIELD_PSN); SetMonData(pokemon, MON_DATA_STATUS, &status); GetMonData(pokemon, MON_DATA_NICKNAME, gStringVar1); - StringGetEnd10(gStringVar1); + StringGet_Nickname(gStringVar1); } static bool32 MonFaintedFromPoison(u8 partyIdx) diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 0b2be39b5d..85340ed96e 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -183,7 +183,7 @@ bool8 HasAnotherPlayerGivenFavorLadyItem(void) sFavorLadyPtr = &gSaveBlock1Ptr->lilycoveLady.favor; if (sFavorLadyPtr->playerName[0] != EOS) { - StringCopy7(gStringVar3, sFavorLadyPtr->playerName); + StringCopy_PlayerName(gStringVar3, sFavorLadyPtr->playerName); ConvertInternationalString(gStringVar3, sFavorLadyPtr->language); return TRUE; } @@ -204,7 +204,7 @@ void BufferFavorLadyItemName(void) static void SetFavorLadyPlayerName(const u8 *src, u8 *dest) { memset(dest, EOS, PLAYER_NAME_LENGTH + 1); - StringCopy7(dest, src); + StringCopy_PlayerName(dest, src); } void BufferFavorLadyPlayerName(void) @@ -396,12 +396,12 @@ static u8 BufferQuizAuthorName(void) sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; if (sQuizLadyPtr->playerName[0] == EOS) { - StringCopy7(gStringVar1, gText_QuizLady_Lady); + StringCopy_PlayerName(gStringVar1, gText_QuizLady_Lady); authorNameId = QUIZ_AUTHOR_NAME_LADY; } else { - StringCopy7(gStringVar1, sQuizLadyPtr->playerName); + StringCopy_PlayerName(gStringVar1, sQuizLadyPtr->playerName); ConvertInternationalString(gStringVar1, sQuizLadyPtr->language); nameLen = GetPlayerNameLength(sQuizLadyPtr->playerName); if (nameLen == GetPlayerNameLength(gSaveBlock2Ptr->playerName)) @@ -552,7 +552,7 @@ void QuizLadyRecordCustomQuizData(void) sQuizLadyPtr->prize = gSpecialVar_ItemId; for (i = 0; i < TRAINER_ID_LENGTH; i++) sQuizLadyPtr->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; - StringCopy7(sQuizLadyPtr->playerName, gSaveBlock2Ptr->playerName); + StringCopy_PlayerName(sQuizLadyPtr->playerName, gSaveBlock2Ptr->playerName); sQuizLadyPtr->language = gGameLanguage; } @@ -696,7 +696,7 @@ static void BufferContestLadyCategoryAndMonName(u8 *category, u8 *nickname) { sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; StringCopy(category, sContestLadyCategoryNames[sContestLadyPtr->category]); - StringCopy10(nickname, sContestLadyMonNames[sContestLadyPtr->category]); + StringCopy_Nickname(nickname, sContestLadyMonNames[sContestLadyPtr->category]); } void BufferContestLadyMonName(u8 *category, u8 *nickname) diff --git a/src/lottery_corner.c b/src/lottery_corner.c index 2cbf0a8089..f19e9f7b7b 100644 --- a/src/lottery_corner.c +++ b/src/lottery_corner.c @@ -113,7 +113,7 @@ void PickLotteryCornerTicket(void) gSpecialVar_0x8006 = 1; GetBoxMonData(&gPokemonStoragePtr->boxes[box][slot], MON_DATA_NICKNAME, gStringVar1); } - StringGetEnd10(gStringVar1); + StringGet_Nickname(gStringVar1); } } diff --git a/src/menu_specialized.c b/src/menu_specialized.c index 20d67ca7f9..cd77f4a59c 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -919,7 +919,7 @@ static u8 *GetConditionMenuMonString(u8 *dst, u16 boxId, u16 monId) if (GetBoxOrPartyMonData(box, mon, MON_DATA_IS_EGG, NULL)) return StringCopyPadded(dst, gText_EggNickname, 0, 12); GetBoxOrPartyMonData(box, mon, MON_DATA_NICKNAME, dst); - StringGetEnd10(dst); + StringGet_Nickname(dst); species = GetBoxOrPartyMonData(box, mon, MON_DATA_SPECIES, NULL); if (box == TOTAL_BOXES_COUNT) // Party mon. { diff --git a/src/move_relearner.c b/src/move_relearner.c index 92d2306167..2b925135f0 100644 --- a/src/move_relearner.c +++ b/src/move_relearner.c @@ -912,7 +912,7 @@ static void CreateLearnableMovesList(void) } GetMonData(&gPlayerParty[sMoveRelearnerStruct->partyMon], MON_DATA_NICKNAME, nickname); - StringCopy10(gStringVar1, nickname); + StringCopy_Nickname(gStringVar1, nickname); sMoveRelearnerStruct->menuItems[sMoveRelearnerStruct->numMenuChoices].name = gText_Cancel; sMoveRelearnerStruct->menuItems[sMoveRelearnerStruct->numMenuChoices].id = LIST_CANCEL; sMoveRelearnerStruct->numMenuChoices++; diff --git a/src/party_menu.c b/src/party_menu.c index d654afa337..34aff619fe 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -953,7 +953,7 @@ static void DisplayPartyPokemonDataForMultiBattle(u8 slot) { menuBox->infoRects->blitFunc(menuBox->windowId, 0, 0, 0, 0, FALSE); StringCopy(gStringVar1, gMultiPartnerParty[actualSlot].nickname); - StringGetEnd10(gStringVar1); + StringGet_Nickname(gStringVar1); ConvertInternationalPlayerName(gStringVar1); DisplayPartyPokemonBarDetail(menuBox->windowId, gStringVar1, 0, menuBox->infoRects->dimensions); DisplayPartyPokemonLevel(gMultiPartnerParty[actualSlot].level, menuBox); @@ -1621,7 +1621,7 @@ static s8 GetNewSlotDoubleLayout(s8 slotId, s8 movementDir) u8* GetMonNickname(struct Pokemon *mon, u8 *dest) { GetMonData(mon, MON_DATA_NICKNAME, dest); - return StringGetEnd10(dest); + return StringGet_Nickname(dest); } #define tKeepOpen data[0] diff --git a/src/pokemon.c b/src/pokemon.c index 1607e1a40f..939c2429da 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4647,7 +4647,7 @@ void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) gBattleMons[battlerId].type2 = gBaseStats[gBattleMons[battlerId].species].type2; gBattleMons[battlerId].ability = GetAbilityBySpecies(gBattleMons[battlerId].species, gBattleMons[battlerId].abilityNum); GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, nickname); - StringCopy10(gBattleMons[battlerId].nickname, nickname); + StringCopy_Nickname(gBattleMons[battlerId].nickname, nickname); GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_NAME, gBattleMons[battlerId].otName); hpSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(battlerId)]; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 727cc5538d..755cc7de07 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -6888,7 +6888,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) sStorage->displayMonIsEgg = GetMonData(mon, MON_DATA_IS_EGG); GetMonData(mon, MON_DATA_NICKNAME, sStorage->displayMonName); - StringGetEnd10(sStorage->displayMonName); + StringGet_Nickname(sStorage->displayMonName); sStorage->displayMonLevel = GetMonData(mon, MON_DATA_LEVEL); sStorage->displayMonMarkings = GetMonData(mon, MON_DATA_MARKINGS); sStorage->displayMonPersonality = GetMonData(mon, MON_DATA_PERSONALITY); @@ -6913,7 +6913,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) GetBoxMonData(boxMon, MON_DATA_NICKNAME, sStorage->displayMonName); - StringGetEnd10(sStorage->displayMonName); + StringGet_Nickname(sStorage->displayMonName); sStorage->displayMonLevel = GetLevelFromBoxMonExp(boxMon); sStorage->displayMonMarkings = GetBoxMonData(boxMon, MON_DATA_MARKINGS); sStorage->displayMonPersonality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY); diff --git a/src/pokenav_conditions.c b/src/pokenav_conditions.c index e61b115686..94ed4e8d8c 100644 --- a/src/pokenav_conditions.c +++ b/src/pokenav_conditions.c @@ -351,7 +351,7 @@ static u8 *CopyConditionMonNameGender(u8 *str, u16 listId, bool8 arg3) return StringCopyPadded(str, gText_EggNickname, CHAR_SPACE, 12); GetBoxOrPartyMonData(boxId, monId, MON_DATA_NICKNAME, str); - StringGetEnd10(str); + StringGet_Nickname(str); species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES, NULL); if (boxId == TOTAL_BOXES_COUNT) { diff --git a/src/pokenav_conditions_search_results.c b/src/pokenav_conditions_search_results.c index c8790e3598..bbc07df2c3 100644 --- a/src/pokenav_conditions_search_results.c +++ b/src/pokenav_conditions_search_results.c @@ -711,7 +711,7 @@ static void BufferSearchMonListItem(struct PokenavMonListItem * item, u8 * dest) GetBoxMonData(mon, MON_DATA_NICKNAME, gStringVar3); } - StringGetEnd10(gStringVar3); + StringGet_Nickname(gStringVar3); dest = GetStringClearToWidth(dest, FONT_NORMAL, gStringVar3, 60); switch (gender) { diff --git a/src/pokenav_ribbons_list.c b/src/pokenav_ribbons_list.c index 1d72f6a980..724ced507e 100644 --- a/src/pokenav_ribbons_list.c +++ b/src/pokenav_ribbons_list.c @@ -721,7 +721,7 @@ static void BufferRibbonMonInfoText(struct PokenavListItem * listItem, u8 * dest GetBoxMonData(mon, MON_DATA_NICKNAME, gStringVar3); } - StringGetEnd10(gStringVar3); + StringGet_Nickname(gStringVar3); dest = GetStringClearToWidth(dest, FONT_NORMAL, gStringVar3, 60); switch (gender) { diff --git a/src/pokenav_ribbons_summary.c b/src/pokenav_ribbons_summary.c index 81d5b900bd..581228ff41 100644 --- a/src/pokenav_ribbons_summary.c +++ b/src/pokenav_ribbons_summary.c @@ -397,7 +397,7 @@ static void GetMonNicknameLevelGender(u8 *nick, u8 *level, u8 *gender) *level = GetLevelFromBoxMonExp(boxMon); GetBoxMonData(boxMon, MON_DATA_NICKNAME, nick); } - StringGetEnd10(nick); + StringGet_Nickname(nick); } static void GetMonSpeciesPersonalityOtId(u16 *species, u32 *personality, u32 *otId) diff --git a/src/scrcmd.c b/src/scrcmd.c index 5b7c95e8e0..37550abb7f 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1575,7 +1575,7 @@ bool8 ScrCmd_bufferpartymonnick(struct ScriptContext *ctx) u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, sScriptStringVars[stringVarIndex]); - StringGetEnd10(sScriptStringVars[stringVarIndex]); + StringGet_Nickname(sScriptStringVars[stringVarIndex]); return FALSE; } diff --git a/src/trade.c b/src/trade.c index a1e4f7094e..3e9f033b52 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1880,7 +1880,7 @@ static u8 GetMonNicknameWidth(u8 *str, u8 whichParty, u8 monIdx) else GetMonData(&gEnemyParty[monIdx], MON_DATA_NICKNAME, nickname); - StringCopy10(str, nickname); + StringCopy_Nickname(str, nickname); return GetStringWidth(FONT_SMALL, str, GetFontAttribute(FONT_SMALL, FONTATTR_LETTER_SPACING)); } @@ -1942,7 +1942,7 @@ static void PrintPartyNicknamesForTradeMenu(u8 whichParty) for (i = 0; i < sTradeMenuData->partyCounts[whichParty]; i++) { GetMonData(&party[i], MON_DATA_NICKNAME, nickname); - StringCopy10(str, nickname); + StringCopy_Nickname(str, nickname); PrintMonNicknameForTradeMenu(whichParty, i, str); } } @@ -3266,17 +3266,17 @@ static void BufferTradeSceneStrings(void) mpId = GetMultiplayerId(); StringCopy(gStringVar1, gLinkPlayers[mpId ^ 1].name); GetMonData(&gEnemyParty[gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE], MON_DATA_NICKNAME, name); - StringCopy10(gStringVar3, name); + StringCopy_Nickname(gStringVar3, name); GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], MON_DATA_NICKNAME, name); - StringCopy10(gStringVar2, name); + StringCopy_Nickname(gStringVar2, name); } else { ingameTrade = &sIngameTrades[gSpecialVar_0x8004]; StringCopy(gStringVar1, ingameTrade->otName); - StringCopy10(gStringVar3, ingameTrade->nickname); + StringCopy_Nickname(gStringVar3, ingameTrade->nickname); GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_NICKNAME, name); - StringCopy10(gStringVar2, name); + StringCopy_Nickname(gStringVar2, name); } } @@ -4479,7 +4479,7 @@ static void BufferInGameTradeMonName(void) u8 nickname[32]; const struct InGameTrade *inGameTrade = &sIngameTrades[gSpecialVar_0x8004]; GetMonData(&gPlayerParty[gSpecialVar_0x8005], MON_DATA_NICKNAME, nickname); - StringCopy10(gStringVar1, nickname); + StringCopy_Nickname(gStringVar1, nickname); StringCopy(gStringVar2, gSpeciesNames[inGameTrade->species]); } diff --git a/src/tv.c b/src/tv.c index de16578137..710b989681 100644 --- a/src/tv.c +++ b/src/tv.c @@ -2959,7 +2959,7 @@ static void InterviewBefore_PkmnFanClubOpinions(void) { StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]); GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_NICKNAME, gStringVar2); - StringGetEnd10(gStringVar2); + StringGet_Nickname(gStringVar2); InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words, ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words)); } @@ -3325,7 +3325,7 @@ static void ChangeBoxPokemonNickname_CB(void) void BufferMonNickname(void) { GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar1); - StringGetEnd10(gStringVar1); + StringGet_Nickname(gStringVar1); } void IsMonOTIDNotPlayers(void) diff --git a/src/union_room.c b/src/union_room.c index c624a97841..9a743dbab9 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -4502,6 +4502,6 @@ static void ViewURoomPartnerTrainerCard(u8 *unused, struct WirelessLink_URoom *d static void CopyAndTranslatePlayerName(u8 *dest, struct RfuPlayer *player) { - StringCopy7(dest, player->rfu.name); + StringCopy_PlayerName(dest, player->rfu.name); ConvertInternationalString(dest, player->rfu.data.compatibility.language); } diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index 312e2107e8..8f041a6ff2 100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c @@ -868,7 +868,7 @@ static void AskUsePokeblock(void) u8 stringBuffer[0x40]; GetMonData(&gPlayerParty[GetPartyIdFromSelectionId(sMenu->info.curSelection)], MON_DATA_NICKNAME, stringBuffer); - StringGetEnd10(stringBuffer); + StringGet_Nickname(stringBuffer); StringAppend(stringBuffer, gText_GetsAPokeBlockQuestion); StringCopy(gStringVar4, stringBuffer); FillWindowPixelBuffer(WIN_TEXT, 17); From b5b5d95de64a00d3d9dce395100808406f50b0ed Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 17 Nov 2021 23:28:43 -0500 Subject: [PATCH 202/417] Distinguish 'virtual object' names from object events --- asm/macros/event.inc | 32 ++-- .../scripts.inc | 128 +++++++-------- include/event_object_movement.h | 17 +- src/cable_car.c | 6 +- src/decoration.c | 12 +- src/easy_chat.c | 4 +- src/event_object_movement.c | 147 +++++++++--------- src/field_special_scene.c | 2 +- src/naming_screen.c | 4 +- src/overworld.c | 6 +- src/scrcmd.c | 8 +- src/shop.c | 2 +- src/union_room_player_avatar.c | 24 +-- 13 files changed, 205 insertions(+), 187 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 38a53f1e28..90d27495af 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1016,7 +1016,7 @@ @ Converts STR_VAR_1, STR_VAR_2, or STR_VAR_3 to its corresponding index into sScriptStringVars (0, 1, or 2). @ If given anything else it will output it directly. - @ Note: because the STR_VAR_# arguments given to this macro are not part of a processed string they are not + @ Note: Because the STR_VAR_# arguments given to this macro are not part of a processed string they are not @ replaced with their charmap values, they are just passed as the literal characters "STR_VAR_#". .macro stringvar id:req .if \id == STR_VAR_1 @@ -1237,9 +1237,10 @@ .byte \level .endm - .macro messageautoscroll pointer:req + @ Automatically scrolls through the message without player input and at a fixed speed. + .macro messageautoscroll text:req .byte 0x9b - .4byte \pointer + .4byte \text .endm @ Executes the specified field effect animation (FLDEFF_*). @@ -1334,19 +1335,23 @@ map \map .endm - .macro createvobject sprite:req, byte2:req, x:req, y:req, elevation, direction + @ Creates a sprite with object graphics. Used when creating large groups of static NPCs that exceed + @ the object event limit (e.g. Contest / Battle Dome audiences and Union Room group members). + @ The specified id can be used to refer to the sprite again later with turnvobject. + .macro createvobject graphicsId:req, id:req, x:req, y:req, elevation=3, direction=DIR_SOUTH .byte 0xaa - .byte \sprite - .byte \byte2 + .byte \graphicsId + .byte \id .2byte \x .2byte \y .byte \elevation .byte \direction .endm - .macro turnvobject index:req, direction:req + @ Turns a sprite created with createvobject. + .macro turnvobject id:req, direction:req .byte 0xab - .byte \index + .byte \id .byte \direction .endm @@ -1515,7 +1520,7 @@ .byte 0xc5 .endm - @ Writes the name of the specified (box) PC box to the specified buffer. + @ Writes the name of the specified PC box to the specified buffer. .macro bufferboxname stringVarId:req, box:req .byte 0xc6 stringvar \stringVarId @@ -1627,10 +1632,13 @@ formatwarp \map, \a, \b, \c .endm + @ Sets the selected object to the id of the currently approaching trainer. .macro selectapproachingtrainer .byte 0xd8 .endm + @ Freezes all objects immediately except the player and the approaching trainers. + @ The player and trainers are frozen once their movement is finished. .macro lockfortrainer .byte 0xd9 .endm @@ -1640,9 +1648,11 @@ .byte 0xda .endm - .macro messageinstant pointer:req + @ Prints and draws the message all at once rather than character by character. + @ Does not wait for player input to continue. + .macro messageinstant text:req .byte 0xdb - .4byte \pointer + .4byte \text .endm .macro fadescreenswapbuffers mode:req diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index 809be00f38..8fc07f59ab 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -529,76 +529,76 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound1Audience:: return BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound2Audience:: - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1, 3, DIR_SOUTH + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0 + createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0 + createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0 + createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 0 + createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1 + createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1 + createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1 + createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2 + createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1 return BattleFrontier_BattleDomeBattleRoom_EventScript_AddSemifinalAudience:: - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_2, 7, 9, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LASS, 10, 12, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_GENTLEMAN, 15, 2, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 16, 3, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_2, 17, 4, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 20, 9, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 23, 13, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2, 3, DIR_SOUTH + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0 + createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0 + createvobject OBJ_EVENT_GFX_WOMAN_2, 7, 9, 0 + createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0 + createvobject OBJ_EVENT_GFX_LASS, 10, 12, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0 + createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 0 + createvobject OBJ_EVENT_GFX_GENTLEMAN, 15, 2, 1 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 16, 3, 1 + createvobject OBJ_EVENT_GFX_WOMAN_2, 17, 4, 1 + createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1 + createvobject OBJ_EVENT_GFX_EXPERT_F, 20, 9, 1 + createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 23, 13, 1 + createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1 + createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2 + createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2 + createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1 + createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2 + createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2 return BattleFrontier_BattleDomeBattleRoom_EventScript_AddFinalAudience:: - createvobject OBJ_EVENT_GFX_NINJA_BOY, 0, 2, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 2, 15, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_5, 3, 5, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 5, 7, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_2, 7, 9, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_3, 8, 10, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LASS, 10, 12, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 12, 14, 0, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_HIKER, 14, 12, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_GENTLEMAN, 15, 2, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_NINJA_BOY, 16, 3, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_2, 17, 4, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_3, 18, 6, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_EXPERT_F, 20, 9, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MAN_2, 21, 10, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCIENTIST_1, 23, 13, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_GENTLEMAN, 24, 14, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_FAT_MAN, 27, 3, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2, 3, DIR_SOUTH - createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2, 3, DIR_SOUTH + createvobject OBJ_EVENT_GFX_NINJA_BOY, 0, 2, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 1, 3, 0 + createvobject OBJ_EVENT_GFX_BEAUTY, 2, 15, 0 + createvobject OBJ_EVENT_GFX_MAN_5, 3, 5, 0 + createvobject OBJ_EVENT_GFX_EXPERT_F, 4, 6, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 5, 7, 0 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 6, 8, 0 + createvobject OBJ_EVENT_GFX_WOMAN_2, 7, 9, 0 + createvobject OBJ_EVENT_GFX_WOMAN_3, 8, 10, 0 + createvobject OBJ_EVENT_GFX_LITTLE_GIRL, 9, 11, 0 + createvobject OBJ_EVENT_GFX_LASS, 10, 12, 0 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 11, 13, 0 + createvobject OBJ_EVENT_GFX_BEAUTY, 12, 14, 0 + createvobject OBJ_EVENT_GFX_MAN_5, 13, 15, 2 + createvobject OBJ_EVENT_GFX_HIKER, 14, 12, 2 + createvobject OBJ_EVENT_GFX_GENTLEMAN, 15, 2, 1 + createvobject OBJ_EVENT_GFX_NINJA_BOY, 16, 3, 1 + createvobject OBJ_EVENT_GFX_WOMAN_2, 17, 4, 1 + createvobject OBJ_EVENT_GFX_WOMAN_3, 18, 6, 1 + createvobject OBJ_EVENT_GFX_BEAUTY, 19, 7, 1 + createvobject OBJ_EVENT_GFX_EXPERT_F, 20, 9, 1 + createvobject OBJ_EVENT_GFX_MAN_2, 21, 10, 1 + createvobject OBJ_EVENT_GFX_WOMAN_5, 22, 11, 1 + createvobject OBJ_EVENT_GFX_SCIENTIST_1, 23, 13, 1 + createvobject OBJ_EVENT_GFX_GENTLEMAN, 24, 14, 1 + createvobject OBJ_EVENT_GFX_LITTLE_BOY, 25, 15, 1 + createvobject OBJ_EVENT_GFX_YOUNGSTER, 26, 2, 2 + createvobject OBJ_EVENT_GFX_FAT_MAN, 27, 3, 2 + createvobject OBJ_EVENT_GFX_HEX_MANIAC, 28, 5, 2 + createvobject OBJ_EVENT_GFX_SCHOOL_KID_M, 29, 5, 1 + createvobject OBJ_EVENT_GFX_MART_EMPLOYEE, 30, 6, 2 + createvobject OBJ_EVENT_GFX_WOMAN_5, 31, 8, 2 return BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisible: diff --git a/include/event_object_movement.h b/include/event_object_movement.h index 8ceea4d298..bd82320271 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -96,8 +96,7 @@ void SetSpritePosToOffsetMapCoords(s16 *, s16 *, s16, s16); void ObjectEventClearHeldMovement(struct ObjectEvent *); void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *); void TrySpawnObjectEvents(s16, s16); -u8 CreateObjectSprite(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction); -u8 AddPseudoObjectEvent(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority); +u8 CreateObjectGraphicsSprite(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority); u8 TrySpawnObjectEvent(u8, u8, u8); u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z); u8 SpawnSpecialObjectEvent(struct ObjectEventTemplate *); @@ -180,7 +179,6 @@ void SetAndStartSpriteAnim(struct Sprite *, u8, u8); bool8 SpriteAnimEnded(struct Sprite *); void UnfreezeObjectEvents(void); void FreezeObjectEventsExceptOne(u8 objectEventId); -void TurnObjectEventSprite(u8, u8); void FreezeObjectEventsExceptTwo(u8 objectEventId1, u8 objectEventId2); void FreezeObjectEvents(void); bool8 FreezeObjectEvent(struct ObjectEvent *objectEvent); @@ -414,10 +412,13 @@ u8 MovementType_RunInPlace_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementType_Invisible_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementType_Invisible_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementType_Invisible_Step2(struct ObjectEvent *, struct Sprite *); -void SetObjectEventSpriteInvisibility(u8 objectEventId, bool32 invisible); -bool32 IsObjectEventSpriteInvisible(u8 objectEventId); -void SetObjectEventSpriteGraphics(u8 objectEventId, u8 graphicsId); -void SetObjectEventSpriteAnim(u8 objectEventId, u8 animNum); -bool32 IsObjectEventSpriteAnimating(u8 objectEventId); + +u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 z, u8 direction); +void TurnVirtualObject(u8 virtualObjId, u8 direction); +void SetVirtualObjectGraphics(u8 virtualObjId, u8 graphicsId); +void SetVirtualObjectInvisibility(u8 virtualObjId, bool32 invisible); +bool32 IsVirtualObjectInvisible(u8 virtualObjId); +void SetVirtualObjectSpriteAnim(u8 virtualObjId, u8 animNum); +bool32 IsVirtualObjectAnimating(u8 virtualObjId); #endif //GUARD_EVENT_OBJECT_MOVEMENT_H diff --git a/src/cable_car.c b/src/cable_car.c index c3e6564f8d..c81764728b 100644 --- a/src/cable_car.c +++ b/src/cable_car.c @@ -826,7 +826,7 @@ static void CreateCableCarSprites(void) case FALSE: default: // Create player sprite - spriteId = AddPseudoObjectEvent(playerGraphicsIds[gSaveBlock2Ptr->playerGender], SpriteCB_Player, 200, 73, 102); + spriteId = CreateObjectGraphicsSprite(playerGraphicsIds[gSaveBlock2Ptr->playerGender], SpriteCB_Player, 200, 73, 102); if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.priority = 2; @@ -854,7 +854,7 @@ static void CreateCableCarSprites(void) case TRUE: CopyToBgTilemapBufferRect_ChangePalette(0, sCableCar->groundTilemap + 0x24, 24, 26, 12, 3, 17); // Create player sprite - spriteId = AddPseudoObjectEvent(playerGraphicsIds[gSaveBlock2Ptr->playerGender], SpriteCB_Player, 128, 39, 102); + spriteId = CreateObjectGraphicsSprite(playerGraphicsIds[gSaveBlock2Ptr->playerGender], SpriteCB_Player, 128, 39, 102); if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.priority = 2; @@ -891,7 +891,7 @@ static void CreateCableCarSprites(void) if ((rval % 64) == 0) { // Unclear if this was intentional, but the - 1 in the below ARRAY_COUNT means the Zigzagoon is never used - spriteId = AddPseudoObjectEvent(hikerGraphicsIds[rval % (ARRAY_COUNT(hikerGraphicsIds) - 1)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106); + spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % (ARRAY_COUNT(hikerGraphicsIds) - 1)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106); if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.priority = 2; diff --git a/src/decoration.c b/src/decoration.c index 9aa4bdf4d8..118b4918e6 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -1395,9 +1395,9 @@ static void SetUpPlacingDecorationPlayerAvatar(u8 taskId, struct PlaceDecoration x -= 8; if (gSaveBlock2Ptr->playerGender == MALE) - sDecor_CameraSpriteObjectIdx2 = AddPseudoObjectEvent(OBJ_EVENT_GFX_BRENDAN_DECORATING, SpriteCallbackDummy, x, 72, 0); + sDecor_CameraSpriteObjectIdx2 = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_BRENDAN_DECORATING, SpriteCallbackDummy, x, 72, 0); else - sDecor_CameraSpriteObjectIdx2 = AddPseudoObjectEvent(OBJ_EVENT_GFX_MAY_DECORATING, SpriteCallbackDummy, x, 72, 0); + sDecor_CameraSpriteObjectIdx2 = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_MAY_DECORATING, SpriteCallbackDummy, x, 72, 0); gSprites[sDecor_CameraSpriteObjectIdx2].oam.priority = 1; DestroySprite(&gSprites[sDecor_CameraSpriteObjectIdx1]); @@ -2027,7 +2027,7 @@ static u8 gpu_pal_decompress_alloc_tag_and_upload(struct PlaceDecorationGraphics ClearPlaceDecorationGraphicsDataBuffer(data); data->decoration = &gDecorations[decor]; if (data->decoration->permission == DECORPERM_SPRITE) - return AddPseudoObjectEvent(data->decoration->tiles[0], SpriteCallbackDummy, 0, 0, 1); + return CreateObjectGraphicsSprite(data->decoration->tiles[0], SpriteCallbackDummy, 0, 0, 1); FreeSpritePaletteByTag(PLACE_DECORATION_SELECTOR_TAG); SetDecorSelectionMetatiles(data); @@ -2106,7 +2106,7 @@ static u8 AddDecorationIconObjectFromObjectEvent(u16 tilesTag, u16 paletteTag, u } else { - spriteId = AddPseudoObjectEvent(sPlaceDecorationGraphicsDataBuffer.decoration->tiles[0], SpriteCallbackDummy, 0, 0, 1); + spriteId = CreateObjectGraphicsSprite(sPlaceDecorationGraphicsDataBuffer.decoration->tiles[0], SpriteCallbackDummy, 0, 0, 1); } return spriteId; } @@ -2285,9 +2285,9 @@ static void SetUpPuttingAwayDecorationPlayerAvatar(void) LoadPlayerSpritePalette(); gFieldCamera.spriteId = CreateSprite(&sPuttingAwayCursorSpriteTemplate, 120, 80, 0); if (gSaveBlock2Ptr->playerGender == MALE) - sDecor_CameraSpriteObjectIdx2 = AddPseudoObjectEvent(OBJ_EVENT_GFX_BRENDAN_DECORATING, SpriteCallbackDummy, 136, 72, 0); + sDecor_CameraSpriteObjectIdx2 = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_BRENDAN_DECORATING, SpriteCallbackDummy, 136, 72, 0); else - sDecor_CameraSpriteObjectIdx2 = AddPseudoObjectEvent(OBJ_EVENT_GFX_MAY_DECORATING, SpriteCallbackDummy, 136, 72, 0); + sDecor_CameraSpriteObjectIdx2 = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_MAY_DECORATING, SpriteCallbackDummy, 136, 72, 0); gSprites[sDecor_CameraSpriteObjectIdx2].oam.priority = 1; DestroySprite(&gSprites[sDecor_CameraSpriteObjectIdx1]); diff --git a/src/easy_chat.c b/src/easy_chat.c index 1b992caf2d..f9ba44ba79 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -5011,7 +5011,7 @@ static void TryAddInterviewObjectEvents(void) return; // Add object for reporter/interviewing fan (facing left) - spriteId = AddPseudoObjectEvent(graphicsId, SpriteCallbackDummy, 76, 40, 0); + spriteId = CreateObjectGraphicsSprite(graphicsId, SpriteCallbackDummy, 76, 40, 0); if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.priority = 0; @@ -5019,7 +5019,7 @@ static void TryAddInterviewObjectEvents(void) } // Add object for player (facing right) - spriteId = AddPseudoObjectEvent( + spriteId = CreateObjectGraphicsSprite( gSaveBlock2Ptr->playerGender == MALE ? OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL : OBJ_EVENT_GFX_RIVAL_MAY_NORMAL, SpriteCallbackDummy, 52, diff --git a/src/event_object_movement.c b/src/event_object_movement.c index b9a8fe3a71..d92569d328 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -114,7 +114,7 @@ static void DoRippleFieldEffect(struct ObjectEvent*, struct Sprite*); static void DoGroundEffects_OnSpawn(struct ObjectEvent*, struct Sprite*); static void DoGroundEffects_OnBeginStep(struct ObjectEvent*, struct Sprite*); static void DoGroundEffects_OnFinishStep(struct ObjectEvent*, struct Sprite*); -static void UpdateObjectEventSpritePosition(struct Sprite*); +static void VirtualObject_UpdateAnim(struct Sprite*); static void ApplyLevitateMovement(u8); static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *); static bool8 MovementType_Buried_Callback(struct ObjectEvent *, struct Sprite *); @@ -126,7 +126,7 @@ static void SetObjectEventDynamicGraphicsId(struct ObjectEvent *); static void RemoveObjectEventInternal(struct ObjectEvent *); static u16 GetObjectEventFlagIdByObjectEventId(u8); static void UpdateObjectEventVisibility(struct ObjectEvent *, struct Sprite *); -static void MakeObjectTemplateFromObjectEventTemplate(struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); +static void MakeSpriteTemplateFromObjectEventTemplate(struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); static void GetObjectEventMovingCameraOffset(s16 *, s16 *); static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8); static void LoadObjectEventPalette(u16); @@ -148,7 +148,7 @@ static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, static void SetSpriteDataForNormalStep(struct Sprite *, u8, u8); static void InitSpriteForFigure8Anim(struct Sprite *sprite); static bool8 AnimateSpriteInFigure8(struct Sprite *sprite); -static void UpdateObjectEventSprite(struct Sprite *); +static void SpriteCB_VirtualObject(struct Sprite *); static void DoShadowFieldEffect(struct ObjectEvent *); static void SetJumpSpriteData(struct Sprite *, u8, u8, u8); static void SetWalkSlowSpriteData(struct Sprite *sprite, u8 direction); @@ -1442,7 +1442,7 @@ static u8 TrySpawnObjectEventTemplate(struct ObjectEventTemplate *objectEventTem const struct SubspriteTable *subspriteTables = NULL; graphicsInfo = GetObjectEventGraphicsInfo(objectEventTemplate->graphicsId); - MakeObjectTemplateFromObjectEventTemplate(objectEventTemplate, &spriteTemplate, &subspriteTables); + MakeSpriteTemplateFromObjectEventTemplate(objectEventTemplate, &spriteTemplate, &subspriteTables); spriteFrameImage.size = graphicsInfo->size; spriteTemplate.images = &spriteFrameImage; objectEventId = TrySetupObjectEventSprite(objectEventTemplate, &spriteTemplate, mapNum, mapGroup, cameraX, cameraY); @@ -1498,7 +1498,7 @@ u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup) return TrySpawnObjectEventTemplate(objectEventTemplate, mapNum, mapGroup, cameraX, cameraY); } -static void MakeObjectTemplateFromObjectEventGraphicsInfo(u16 graphicsId, void (*callback)(struct Sprite *), struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) +static void CopyObjectGraphicsInfoToSpriteTemplate(u16 graphicsId, void (*callback)(struct Sprite *), struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) { const struct ObjectEventGraphicsInfo *graphicsInfo = GetObjectEventGraphicsInfo(graphicsId); @@ -1512,17 +1512,18 @@ static void MakeObjectTemplateFromObjectEventGraphicsInfo(u16 graphicsId, void ( *subspriteTables = graphicsInfo->subspriteTables; } -static void MakeObjectTemplateFromObjectEventGraphicsInfoWithCallbackIndex(u16 graphicsId, u16 callbackIndex, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) +static void CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(u16 graphicsId, u16 movementType, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) { - MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, sMovementTypeCallbacks[callbackIndex], spriteTemplate, subspriteTables); + CopyObjectGraphicsInfoToSpriteTemplate(graphicsId, sMovementTypeCallbacks[movementType], spriteTemplate, subspriteTables); } -static void MakeObjectTemplateFromObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) +static void MakeSpriteTemplateFromObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) { - MakeObjectTemplateFromObjectEventGraphicsInfoWithCallbackIndex(objectEventTemplate->graphicsId, objectEventTemplate->movementType, spriteTemplate, subspriteTables); + CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(objectEventTemplate->graphicsId, objectEventTemplate->movementType, spriteTemplate, subspriteTables); } -u8 AddPseudoObjectEvent(u16 graphicsId, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority) +// Used to create a sprite using a graphicsId associated with object events. +u8 CreateObjectGraphicsSprite(u16 graphicsId, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority) { struct SpriteTemplate *spriteTemplate; const struct SubspriteTable *subspriteTables; @@ -1530,7 +1531,7 @@ u8 AddPseudoObjectEvent(u16 graphicsId, void (*callback)(struct Sprite *), s16 x u8 spriteId; spriteTemplate = malloc(sizeof(struct SpriteTemplate)); - MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, callback, spriteTemplate, &subspriteTables); + CopyObjectGraphicsInfoToSpriteTemplate(graphicsId, callback, spriteTemplate, &subspriteTables); if (spriteTemplate->paletteTag != TAG_NONE) LoadObjectEventPalette(spriteTemplate->paletteTag); @@ -1546,9 +1547,15 @@ u8 AddPseudoObjectEvent(u16 graphicsId, void (*callback)(struct Sprite *), s16 x return spriteId; } -// Used to create sprite object events instead of a full object event -// Used when resources are limiting, e.g. for the audience in contests or group members in Union Room -u8 CreateObjectSprite(u8 graphicsId, u8 objectEventId, s16 x, s16 y, u8 z, u8 direction) +#define sVirtualObjId data[0] +#define sVirtualObjElev data[1] + +// "Virtual Objects" are a class of sprites used instead of a full object event. +// Used when more objects are needed than the object event limit (for Contest / Battle Dome audiences and group members in Union Room). +// A unique id is given as an argument and stored in the sprite data to allow referring back to the same virtual object. +// They can be turned (and, in the case of the Union Room, animated teleporting in and out) but do not have movement types +// or any of the other data normally associated with object events. +u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 z, u8 direction) { u8 spriteId; struct Sprite *sprite; @@ -1557,7 +1564,7 @@ u8 CreateObjectSprite(u8 graphicsId, u8 objectEventId, s16 x, s16 y, u8 z, u8 di const struct ObjectEventGraphicsInfo *graphicsInfo; graphicsInfo = GetObjectEventGraphicsInfo(graphicsId); - MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, UpdateObjectEventSprite, &spriteTemplate, &subspriteTables); + CopyObjectGraphicsInfoToSpriteTemplate(graphicsId, SpriteCB_VirtualObject, &spriteTemplate, &subspriteTables); *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; x += MAP_OFFSET; y += MAP_OFFSET; @@ -1574,8 +1581,8 @@ u8 CreateObjectSprite(u8 graphicsId, u8 objectEventId, s16 x, s16 y, u8 z, u8 di sprite->oam.paletteNum -= 16; sprite->coordOffsetEnabled = TRUE; - sprite->sObjEventId = objectEventId; - sprite->data[1] = z; + sprite->sVirtualObjId = virtualObjId; + sprite->sVirtualObjElev = z; if (graphicsInfo->paletteSlot == 10) LoadSpecialObjectReflectionPalette(graphicsInfo->paletteTag, graphicsInfo->paletteSlot); else if (graphicsInfo->paletteSlot >= 16) @@ -1697,7 +1704,7 @@ static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y) subspriteTables = NULL; graphicsInfo = GetObjectEventGraphicsInfo(objectEvent->graphicsId); spriteFrameImage.size = graphicsInfo->size; - MakeObjectTemplateFromObjectEventGraphicsInfoWithCallbackIndex(objectEvent->graphicsId, objectEvent->movementType, &spriteTemplate, &subspriteTables); + CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(objectEvent->graphicsId, objectEvent->movementType, &spriteTemplate, &subspriteTables); spriteTemplate.images = &spriteFrameImage; *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; @@ -8510,50 +8517,50 @@ void UpdateObjectEventSpriteInvisibility(struct Sprite *sprite, bool8 invisible) #define sAnimNum data[3] #define sAnimState data[4] -static void UpdateObjectEventSprite(struct Sprite *sprite) +static void SpriteCB_VirtualObject(struct Sprite *sprite) { - UpdateObjectEventSpritePosition(sprite); - SetObjectSubpriorityByZCoord(sprite->data[1], sprite, 1); + VirtualObject_UpdateAnim(sprite); + SetObjectSubpriorityByZCoord(sprite->sVirtualObjElev, sprite, 1); UpdateObjectEventSpriteInvisibility(sprite, sprite->sInvisible); } // Unused -static void DestroyObjectEventSprites(void) +static void DestroyVirtualObjects(void) { int i; for (i = 0; i < MAX_SPRITES; i++) { struct Sprite *sprite = &gSprites[i]; - if(sprite->inUse && sprite->callback == UpdateObjectEventSprite) + if(sprite->inUse && sprite->callback == SpriteCB_VirtualObject) DestroySprite(sprite); } } -static int GetObjectEventSpriteId(u8 objectEventId) // this should return a u8, because all that call this shifts to u8, but it wont match because it doesnt shift u8 at the end. +static int GetVirtualObjectSpriteId(u8 virtualObjId) { int i; for (i = 0; i < MAX_SPRITES; i++) { struct Sprite *sprite = &gSprites[i]; - if (sprite->inUse && sprite->callback == UpdateObjectEventSprite && (u8)sprite->sObjEventId == objectEventId) + if (sprite->inUse && sprite->callback == SpriteCB_VirtualObject && (u8)sprite->sVirtualObjId == virtualObjId) return i; } return MAX_SPRITES; } -void TurnObjectEventSprite(u8 objectEventId, u8 direction) +void TurnVirtualObject(u8 virtualObjId, u8 direction) { - u8 spriteId = GetObjectEventSpriteId(objectEventId); + u8 spriteId = GetVirtualObjectSpriteId(virtualObjId); if (spriteId != MAX_SPRITES) StartSpriteAnim(&gSprites[spriteId], GetFaceDirectionAnimNum(direction)); } -void SetObjectEventSpriteGraphics(u8 objectEventId, u8 graphicsId) +void SetVirtualObjectGraphics(u8 virtualObjId, u8 graphicsId) { - int spriteId = GetObjectEventSpriteId(objectEventId); + int spriteId = GetVirtualObjectSpriteId(virtualObjId); if (spriteId != MAX_SPRITES) { @@ -8581,9 +8588,9 @@ void SetObjectEventSpriteGraphics(u8 objectEventId, u8 graphicsId) } } -void SetObjectEventSpriteInvisibility(u8 objectEventId, bool32 invisible) +void SetVirtualObjectInvisibility(u8 virtualObjId, bool32 invisible) { - u8 spriteId = GetObjectEventSpriteId(objectEventId); + u8 spriteId = GetVirtualObjectSpriteId(virtualObjId); if (spriteId == MAX_SPRITES) return; @@ -8594,9 +8601,9 @@ void SetObjectEventSpriteInvisibility(u8 objectEventId, bool32 invisible) gSprites[spriteId].sInvisible = FALSE; } -bool32 IsObjectEventSpriteInvisible(u8 objectEventId) +bool32 IsVirtualObjectInvisible(u8 virtualObjId) { - u8 spriteId = GetObjectEventSpriteId(objectEventId); + u8 spriteId = GetVirtualObjectSpriteId(virtualObjId); if (spriteId == MAX_SPRITES) return FALSE; @@ -8604,9 +8611,9 @@ bool32 IsObjectEventSpriteInvisible(u8 objectEventId) return (gSprites[spriteId].sInvisible == TRUE); } -void SetObjectEventSpriteAnim(u8 objectEventId, u8 animNum) +void SetVirtualObjectSpriteAnim(u8 virtualObjId, u8 animNum) { - u8 spriteId = GetObjectEventSpriteId(objectEventId); + u8 spriteId = GetVirtualObjectSpriteId(virtualObjId); if (spriteId != MAX_SPRITES) { @@ -8619,18 +8626,18 @@ static void MoveUnionRoomObjectUp(struct Sprite *sprite) { switch(sprite->sAnimState) { - case 0: + case 0: + sprite->y2 = 0; + sprite->sAnimState++; + case 1: + sprite->y2 -= 8; + if (sprite->y2 == -DISPLAY_HEIGHT) + { sprite->y2 = 0; - sprite->sAnimState++; - case 1: - sprite->y2 -= 8; - if (sprite->y2 == -DISPLAY_HEIGHT) - { - sprite->y2 = 0; - sprite->sInvisible = TRUE; - sprite->sAnimNum = 0; - sprite->sAnimState = 0; - } + sprite->sInvisible = TRUE; + sprite->sAnimNum = 0; + sprite->sAnimState = 0; + } } } @@ -8638,40 +8645,40 @@ static void MoveUnionRoomObjectDown(struct Sprite *sprite) { switch(sprite->sAnimState) { - case 0: - sprite->y2 = -DISPLAY_HEIGHT; - sprite->sAnimState++; - case 1: - sprite->y2 += 8; - if(sprite->y2 == 0) - { - sprite->sAnimNum = 0; - sprite->sAnimState = 0; - } + case 0: + sprite->y2 = -DISPLAY_HEIGHT; + sprite->sAnimState++; + case 1: + sprite->y2 += 8; + if(sprite->y2 == 0) + { + sprite->sAnimNum = 0; + sprite->sAnimState = 0; + } } } -static void UpdateObjectEventSpritePosition(struct Sprite *sprite) +static void VirtualObject_UpdateAnim(struct Sprite *sprite) { switch(sprite->sAnimNum) { - case UNION_ROOM_SPAWN_IN: - MoveUnionRoomObjectDown(sprite); - break; - case UNION_ROOM_SPAWN_OUT: - MoveUnionRoomObjectUp(sprite); - break; - case 0: - break; - default: - sprite->sAnimNum = 0; - break; + case UNION_ROOM_SPAWN_IN: + MoveUnionRoomObjectDown(sprite); + break; + case UNION_ROOM_SPAWN_OUT: + MoveUnionRoomObjectUp(sprite); + break; + case 0: + break; + default: + sprite->sAnimNum = 0; + break; } } -bool32 IsObjectEventSpriteAnimating(u8 objectEventId) +bool32 IsVirtualObjectAnimating(u8 virtualObjId) { - u8 spriteId = GetObjectEventSpriteId(objectEventId); + u8 spriteId = GetVirtualObjectSpriteId(virtualObjId); if (spriteId == MAX_SPRITES) return FALSE; diff --git a/src/field_special_scene.c b/src/field_special_scene.c index b7c93e510e..d8b9eb05d1 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -325,7 +325,7 @@ void Task_HandlePorthole(u8 taskId) static void ShowSSTidalWhileSailing(void) { - u8 spriteId = AddPseudoObjectEvent(OBJ_EVENT_GFX_SS_TIDAL, SpriteCallbackDummy, 112, 80, 0); + u8 spriteId = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_SS_TIDAL, SpriteCallbackDummy, 112, 80, 0); gSprites[spriteId].coordOffsetEnabled = FALSE; diff --git a/src/naming_screen.c b/src/naming_screen.c index dcd60259b7..5aef44f149 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1409,7 +1409,7 @@ static void NamingScreen_CreatePlayerIcon(void) u8 spriteId; rivalGfxId = GetRivalAvatarGraphicsIdByStateIdAndGender(0, sNamingScreen->monSpecies); - spriteId = AddPseudoObjectEvent(rivalGfxId, SpriteCallbackDummy, 56, 37, 0); + spriteId = CreateObjectGraphicsSprite(rivalGfxId, SpriteCallbackDummy, 56, 37, 0); gSprites[spriteId].oam.priority = 3; StartSpriteAnim(&gSprites[spriteId], 4); } @@ -1436,7 +1436,7 @@ static void NamingScreen_CreateWaldaDadIcon(void) { u8 spriteId; - spriteId = AddPseudoObjectEvent(OBJ_EVENT_GFX_MAN_1, SpriteCallbackDummy, 56, 37, 0); + spriteId = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_MAN_1, SpriteCallbackDummy, 56, 37, 0); gSprites[spriteId].oam.priority = 3; StartSpriteAnim(&gSprites[spriteId], 4); } diff --git a/src/overworld.c b/src/overworld.c index f6c4c0f3dd..4aa579fdd2 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -3180,14 +3180,14 @@ static void CreateLinkPlayerSprite(u8 linkPlayerId, u8 gameVersion) { case VERSION_FIRE_RED: case VERSION_LEAF_GREEN: - objEvent->spriteId = AddPseudoObjectEvent(GetFRLGAvatarGraphicsIdByGender(linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0); + objEvent->spriteId = CreateObjectGraphicsSprite(GetFRLGAvatarGraphicsIdByGender(linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0); break; case VERSION_RUBY: case VERSION_SAPPHIRE: - objEvent->spriteId = AddPseudoObjectEvent(GetRSAvatarGraphicsIdByGender(linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0); + objEvent->spriteId = CreateObjectGraphicsSprite(GetRSAvatarGraphicsIdByGender(linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0); break; case VERSION_EMERALD: - objEvent->spriteId = AddPseudoObjectEvent(GetRivalAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0); + objEvent->spriteId = CreateObjectGraphicsSprite(GetRivalAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0); break; } diff --git a/src/scrcmd.c b/src/scrcmd.c index 37550abb7f..028b714d06 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1180,22 +1180,22 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext *ctx) bool8 ScrCmd_createvobject(struct ScriptContext *ctx) { u8 graphicsId = ScriptReadByte(ctx); - u8 objectEventId = ScriptReadByte(ctx); + u8 virtualObjId = ScriptReadByte(ctx); u16 x = VarGet(ScriptReadHalfword(ctx)); u32 y = VarGet(ScriptReadHalfword(ctx)); u8 elevation = ScriptReadByte(ctx); u8 direction = ScriptReadByte(ctx); - CreateObjectSprite(graphicsId, objectEventId, x, y, elevation, direction); + CreateVirtualObject(graphicsId, virtualObjId, x, y, elevation, direction); return FALSE; } bool8 ScrCmd_turnvobject(struct ScriptContext *ctx) { - u8 objectEventId = ScriptReadByte(ctx); + u8 virtualObjId = ScriptReadByte(ctx); u8 direction = ScriptReadByte(ctx); - TurnObjectEventSprite(objectEventId, direction); + TurnVirtualObject(virtualObjId, direction); return FALSE; } diff --git a/src/shop.c b/src/shop.c index f6fb2b9a03..f41ae315f1 100755 --- a/src/shop.c +++ b/src/shop.c @@ -847,7 +847,7 @@ static void BuyMenuDrawObjectEvents(void) graphicsInfo = GetObjectEventGraphicsInfo(gObjectEvents[sShopData->viewportObjects[i][OBJ_EVENT_ID]].graphicsId); - spriteId = AddPseudoObjectEvent( + spriteId = CreateObjectGraphicsSprite( gObjectEvents[sShopData->viewportObjects[i][OBJ_EVENT_ID]].graphicsId, SpriteCallbackDummy, (u16)sShopData->viewportObjects[i][X_COORD] * 16 + 8, diff --git a/src/union_room_player_avatar.c b/src/union_room_player_avatar.c index 2253861659..908eb8f21f 100644 --- a/src/union_room_player_avatar.c +++ b/src/union_room_player_avatar.c @@ -400,12 +400,12 @@ void CreateUnionRoomPlayerSprites(u8 * spriteIds, s32 leaderId) for (memberId = 0; memberId < MAX_RFU_PLAYERS; memberId++) { s32 id = UR_PLAYER_SPRITE_ID(leaderId, memberId); - spriteIds[id] = CreateObjectSprite(OBJ_EVENT_GFX_MAN_4, + spriteIds[id] = CreateVirtualObject(OBJ_EVENT_GFX_MAN_4, id - UR_SPRITE_START_ID, sUnionRoomPlayerCoords[leaderId][0] + sUnionRoomGroupOffsets[memberId][0], sUnionRoomPlayerCoords[leaderId][1] + sUnionRoomGroupOffsets[memberId][1], 3, 1); - SetObjectEventSpriteInvisibility(id - UR_SPRITE_START_ID, TRUE); + SetVirtualObjectInvisibility(id - UR_SPRITE_START_ID, TRUE); } } @@ -443,7 +443,7 @@ static u8 GetNewFacingDirectionForUnionRoomPlayer(u32 memberId, u32 leaderId, st static bool32 IsUnionRoomPlayerInvisible(u32 leaderId, u32 memberId) { - return IsObjectEventSpriteInvisible(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID); + return IsVirtualObjectInvisible(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID); } static void SpawnGroupMember(u32 leaderId, u32 memberId, u8 graphicsId, struct RfuGameData * gameData) @@ -452,10 +452,10 @@ static void SpawnGroupMember(u32 leaderId, u32 memberId, u8 graphicsId, struct R s32 id = UR_PLAYER_SPRITE_ID(leaderId, memberId); if (IsUnionRoomPlayerInvisible(leaderId, memberId) == TRUE) { - SetObjectEventSpriteInvisibility(id - UR_SPRITE_START_ID, FALSE); - SetObjectEventSpriteAnim(id - UR_SPRITE_START_ID, UNION_ROOM_SPAWN_IN); + SetVirtualObjectInvisibility(id - UR_SPRITE_START_ID, FALSE); + SetVirtualObjectSpriteAnim(id - UR_SPRITE_START_ID, UNION_ROOM_SPAWN_IN); } - SetObjectEventSpriteGraphics(id - UR_SPRITE_START_ID, graphicsId); + SetVirtualObjectGraphics(id - UR_SPRITE_START_ID, graphicsId); SetUnionRoomObjectFacingDirection(memberId, leaderId, GetNewFacingDirectionForUnionRoomPlayer(memberId, leaderId, gameData)); GetUnionRoomPlayerCoords(leaderId, memberId, &x, &y); MapGridSetMetatileImpassabilityAt(x, y, TRUE); @@ -464,7 +464,7 @@ static void SpawnGroupMember(u32 leaderId, u32 memberId, u8 graphicsId, struct R static void DespawnGroupMember(u32 leaderId, u32 memberId) { s32 x, y; - SetObjectEventSpriteAnim(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID, UNION_ROOM_SPAWN_OUT); + SetVirtualObjectSpriteAnim(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID, UNION_ROOM_SPAWN_OUT); GetUnionRoomPlayerCoords(leaderId, memberId, &x, &y); MapGridSetMetatileImpassabilityAt(x, y, FALSE); } @@ -476,7 +476,7 @@ static void AssembleGroup(u32 leaderId, struct RfuGameData * gameData) PlayerGetDestCoords(&x, &y); player_get_pos_including_state_based_drift(&x2, &y2); - if (IsObjectEventSpriteInvisible(UR_PLAYER_SPRITE_ID(leaderId, 0) - UR_SPRITE_START_ID) == TRUE) + if (IsVirtualObjectInvisible(UR_PLAYER_SPRITE_ID(leaderId, 0) - UR_SPRITE_START_ID) == TRUE) { if (IsUnionRoomPlayerAt(leaderId, 0, x, y) == TRUE || IsUnionRoomPlayerAt(leaderId, 0, x2, y2) == TRUE) return; @@ -576,9 +576,9 @@ bool32 TryInteractWithUnionRoomMember(struct RfuPlayerList *list, s16 *memberIdP continue; // Has a group member spawned at this position? - if (IsObjectEventSpriteInvisible(id - UR_SPRITE_START_ID)) + if (IsVirtualObjectInvisible(id - UR_SPRITE_START_ID)) continue; - if (IsObjectEventSpriteAnimating(id - UR_SPRITE_START_ID)) + if (IsVirtualObjectAnimating(id - UR_SPRITE_START_ID)) continue; if (leaders[i].groupScheduledAnim != UNION_ROOM_SPAWN_IN) continue; @@ -595,9 +595,9 @@ bool32 TryInteractWithUnionRoomMember(struct RfuPlayerList *list, s16 *memberIdP static void SetUnionRoomObjectFacingDirection(s32 memberId, s32 leaderId, u8 newDirection) { - TurnObjectEventSprite(MAX_RFU_PLAYERS * leaderId - UR_SPRITE_START_ID + memberId, newDirection); + TurnVirtualObject(MAX_RFU_PLAYERS * leaderId - UR_SPRITE_START_ID + memberId, newDirection); // should be line below, but order is swapped here - // TurnObjectEventSprite(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID, newDirection); + // TurnVirtualObject(UR_PLAYER_SPRITE_ID(leaderId, memberId) - UR_SPRITE_START_ID, newDirection); } void UpdateUnionRoomMemberFacing(u32 memberId, u32 leaderId, struct RfuPlayerList *list) From c89dfd9f5618eef74f2d39d7c1ea3a5a5448ed8e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 18 Nov 2021 00:32:28 -0500 Subject: [PATCH 203/417] Finish updating macro comments --- asm/macros/event.inc | 163 ++++++++++++++++----------- data/maps/SootopolisCity/scripts.inc | 4 +- data/script_cmd_table.inc | 20 ++-- data/scripts/cable_club.inc | 2 +- data/scripts/trainer_battle.inc | 4 +- include/field_screen_effect.h | 2 +- include/mystery_event_script.h | 10 +- src/field_screen_effect.c | 2 +- src/mystery_event_menu.c | 18 +-- src/mystery_event_script.c | 87 +++++++------- src/scrcmd.c | 48 ++++---- 11 files changed, 202 insertions(+), 158 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 90d27495af..14634ec1e5 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -76,63 +76,62 @@ .byte \function .endm - @ Executes a script stored in a default RAM location. + @ Equivalent to the 'return' command for a RAM script. .macro returnram .byte 0x0c .endm - @ Terminates script execution and "resets the script RAM". - .macro killscript + @ Equivalent to the 'end' command for a RAM script. + .macro endram .byte 0x0d .endm - @ Sets some status related to Mystery Event. + @ Sets the Mystery Event script status (MEVENT_STATUS_*). .macro setmysteryeventstatus value:req .byte 0x0e .byte \value .endm - @ Sets the specified script bank to value. - .macro loadword destination:req, value:req + @ Sets the value at the specified script data index to a fixed 4-byte value. + .macro loadword destIndex:req, value:req .byte 0x0f - .byte \destination + .byte \destIndex .4byte \value .endm - @ Sets the specified script bank to value. - .macro loadbyte destination:req, value:req + @ Sets the value at the specified script data index to a fixed byte value. + .macro loadbyte destIndex:req, value:req .byte 0x10 - .byte \destination + .byte \destIndex .byte \value .endm - @ Sets the byte at offset to value. - .macro writebytetoaddr value:req, offset:req + @ Sets the value at the specified pointer. + .macro setptr value:req, ptr:req .byte 0x11 .byte \value - .4byte \offset + .4byte \ptr .endm - @ Copies the byte value at source into the specified script bank. - .macro loadbytefromaddr destination:req, source:req + @ Sets the value at the specified script data index to the value at pointer 'source'. + .macro loadbytefromptr destIndex:req, source:req .byte 0x12 - .byte \destination + .byte \destIndex .4byte \source .endm - @ TODO - @ Not sure. Judging from XSE's description I think it takes the least-significant byte in bank source and writes it to destination. - .macro setptrbyte source:req, destination:req + @ Sets the value at pointer 'destination' to the contents of the script data at 'srcIndex'. + .macro setptrbyte srcIndex:req, destination:req .byte 0x13 - .byte \source + .byte \srcIndex .4byte \destination .endm - @ Copies the contents of bank source into bank destination. - .macro copylocal destination:req, source:req + @ Copies the contents of the script data from one index to another. + .macro copylocal destIndex:req, srcIndex:req .byte 0x14 - .byte \destination - .byte \source + .byte \destIndex + .byte \srcIndex .endm @ Copies the byte at source to destination, replacing whatever byte was previously there. @@ -177,56 +176,64 @@ .2byte \source .endm - @ Compares the values of script banks a and b, after forcing the values to bytes. - .macro compare_local_to_local byte1:req, byte2:req + @ Compares the values of the script data at indexes 'local1' and 'local2'. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_local_to_local local1:req, local2:req .byte 0x1b - .byte \byte1 - .byte \byte2 + .byte \local1 + .byte \local2 .endm - @ Compares the least-significant byte of the value of script bank a to a fixed byte value (b). - .macro compare_local_to_value a:req, b:req + @ Compares the value of the script data at index 'local' to a fixed value. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_local_to_value local:req, value:req .byte 0x1c - .byte \a - .byte \b + .byte \local + .byte \value .endm - @ Compares the least-significant byte of the value of script bank a to the byte located at offset b. - .macro compare_local_to_addr a:req, b:req + @ Compares the value of the script data at index 'local' to the value at 'ptr' + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_local_to_ptr local:req, ptr:req .byte 0x1d - .byte \a - .4byte \b + .byte \local + .4byte \ptr .endm - @ Compares the byte located at offset a to the least-significant byte of the value of script bank b. - .macro compare_addr_to_local a:req, b:req + @ Compares the value at 'ptr' to the value of the script data at index 'local'. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_ptr_to_local ptr:req, local:req .byte 0x1e - .4byte \a - .byte \b + .4byte \ptr + .byte \local .endm - @ Compares the byte located at offset a to a fixed byte value (b). - .macro compare_addr_to_value a:req, b:req + @ Compares the value at 'ptr' to a fixed value. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_ptr_to_value ptr:req, value:req .byte 0x1f - .4byte \a - .byte \b + .4byte \ptr + .byte \value .endm - @ Compares the byte located at offset a to the byte located at offset b. - .macro compare_addr_to_addr a:req, b:req + @ Compares the value at 'ptr1' to the value at 'ptr2'. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if + .macro compare_ptr_to_ptr ptr1:req, ptr2:req .byte 0x20 - .4byte \a - .4byte \b + .4byte \ptr1 + .4byte \ptr2 .endm - @ Compares the value of `var` to a fixed word value (b). + @ Compares the value of 'var' to a fixed value. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if .macro compare_var_to_value var:req, value:req .byte 0x21 .2byte \var .2byte \value .endm - @ Compares the value of `var1` to the value of `var2`. + @ Compares the value of 'var1' to the value of 'var2'. + @ The result is stored in comparisonResult to be acted on by goto_if / call_if .macro compare_var_to_var var1:req, var2:req .byte 0x22 .2byte \var1 @@ -269,9 +276,8 @@ .2byte SPECIAL_\function .endm - @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific - @ commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock - @ state, the script will remain blocked indefinitely (essentially a hang). + @ Blocks script execution until a command or C code manually unblocks it. Generally used with specific + @ commands and specials. Calling EnableBothScriptContexts for instance will allow execution to continue. .macro waitstate .byte 0x27 .endm @@ -308,7 +314,7 @@ .2byte \minute .endm - @ Runs time based events. + @ Updates local time using the RTC and runs time based events. .macro dotimebasedevents .byte 0x2d .endm @@ -649,12 +655,14 @@ .2byte \y .endm + @ Sets the specified object's invisibility to FALSE. .macro showobjectat localId:req, map:req .byte 0x58 .2byte \localId map \map .endm + @ Sets the specified object's invisibility to TRUE. .macro hideobjectat localId:req, map:req .byte 0x59 .2byte \localId @@ -673,7 +681,7 @@ .byte \direction .endm - @ TODO + @ Configures the arguments for a trainer battle, then jumps to the appropriate script in scripts/trainer_battle.inc .macro trainerbattle type:req, trainer:req, local_id:req, pointer1:req, pointer2, pointer3, pointer4 .byte 0x5c .byte \type @@ -770,9 +778,9 @@ .endm - @ Starts a trainer battle using the battle information stored in RAM (usually by trainerbattle, which actually calls this - @ command behind-the-scenes), and blocks script execution until the battle finishes. - .macro trainerbattlebegin + @ Starts a trainer battle using the battle information stored in RAM (usually by the scripts in trainer_battle.inc, which + @ are run by trainerbattle), and blocks script execution until the battle finishes. + .macro dotrainerbattle .byte 0x5d .endm @@ -1129,7 +1137,7 @@ .byte \growthStage .endm - @ This allows you to choose a Pokemon to use in a contest + @ Opens the party menu to select a Pokemon for a contest. .macro choosecontestmon .byte 0x8b .endm @@ -1262,7 +1270,7 @@ .2byte \animation .endm - @ Sets which healing place the player will return to if all of the Pokemon in their party faint. + @ Sets which healing location (HEAL_LOCATION_*) the player will return to if all of the Pokemon in their party faint. .macro setrespawn heallocation:req .byte 0x9f .2byte \heallocation @@ -1437,43 +1445,51 @@ .byte 0xb7 .endm + @ Sets a relative address to be used by the other vcommands as part of a Mystery Gift script. .macro setvaddress pointer:req .byte 0xb8 .4byte \pointer .endm + @ Equivalent to goto using the relative address set by setvaddress. .macro vgoto pointer:req .byte 0xb9 .4byte \pointer .endm + @ Equivalent to call using the relative address set by setvaddress. .macro vcall pointer:req .byte 0xba .4byte \pointer .endm + @ Equivalent to goto_if using the relative address set by setvaddress. .macro vgoto_if byte:req, pointer:req .byte 0xbb .byte \byte .4byte \pointer .endm + @ Equivalent to call_if using the relative address set by setvaddress. .macro vcall_if byte:req, pointer:req .byte 0xbc .byte \byte .4byte \pointer .endm + @ Equivalent to message using the relative address set by setvaddress. .macro vmessage pointer:req .byte 0xbd .4byte \pointer .endm - .macro vloadptr pointer:req + @ Expands the given text at the pointer (- the relative address set by setvaddress) into gStringVar4 + .macro vbuffermessage ptr:req .byte 0xbe - .4byte \pointer + .4byte \ptr .endm + @ Equivalent to bufferstring using the relative address set by setvaddress. .macro vbufferstring stringVarIndex:req, pointer:req .byte 0xbf stringvar \stringVarIndex @@ -1576,7 +1592,7 @@ @ Jumps to the ram script saved from a Wonder Card. If there is no valid saved Wonder Card or if the @ ram script is invalid then this does nothing. - .macro gotowondercardscript + .macro trywondercardscript .byte 0xcf .endm @@ -1586,6 +1602,8 @@ .2byte \worldmapflag .endm + @ Warps the player to the specified map using a teleport effect. Effect is similar to warpteleport, but + @ this warp has no fade out and maintains the original facing direction. @ Warp commands can be given either the id of which warp location to go to on the destination map @ or a pair of x/y coordinates to go to directly on the destination map. .macro warpspinenter map:req, a, b, c @@ -1625,6 +1643,8 @@ .byte 0xd6 .endm + @ Warp used by the teleport tiles in the Mossdeep Gym. Plays SE_WARP_IN and does a simple fade transition. + @ Also skips reloading object events by setting SKIP_OBJECT_EVENT_LOAD. @ Warp commands can be given either the id of which warp location to go to on the destination map @ or a pair of x/y coordinates to go to directly on the destination map. .macro warpmossdeepgym map:req, a, b, c @@ -1655,15 +1675,19 @@ .4byte \text .endm + @ Equivalent to fadescreen but copies gPlttBufferUnfaded to gPaletteDecompressionBuffer on the fade out + @ and the reverse on the fade in, in effect saving gPlttBufferUnfaded to restore it. .macro fadescreenswapbuffers mode:req .byte 0xdc .byte \mode .endm - .macro buffertrainerclassname stringVarId:req, class:req + @ Buffers the specified trainer's class name to the given string var. + @ If the trainer id is >= TRAINERS_COUNT it will be treated as TRAINER_NONE. + .macro buffertrainerclassname stringVarId:req, trainerId:req .byte 0xdd stringvar \stringVarId - .2byte \class + .2byte \trainerId .endm @ Buffers the specified trainer's name to the given string var. @@ -1680,9 +1704,10 @@ .4byte \text .endm + @ Warp with a fade to white. Used during the Sootopolis legendary fight. @ Warp commands can be given either the id of which warp location to go to on the destination map @ or a pair of x/y coordinates to go to directly on the destination map. - .macro warpsootopolislegend map:req, a, b, c + .macro warpwhitefade map:req, a, b, c .byte 0xe0 formatwarp \map, \a, \b, \c .endm @@ -1835,6 +1860,7 @@ YES = 1 NO = 0 + @ Buffers the given text and calls the relevant standard message script (see gStdScripts). .macro msgbox text:req, type=MSGBOX_DEFAULT loadword 0, \text callstd \type @@ -1850,17 +1876,21 @@ callstd STD_OBTAIN_ITEM .endm + @ For picking up items in the overworld. Similar to giveitem, but with different language and + @ sets the flag of the last-talked to object (the item the player picked up). .macro finditem item:req, amount=1 setorcopyvar VAR_0x8000, \item setorcopyvar VAR_0x8001, \amount callstd STD_FIND_ITEM .endm + @ Equivalent to giveitem but for a single decoration. .macro givedecoration decoration:req setorcopyvar VAR_0x8000, \decoration callstd STD_OBTAIN_DECORATION .endm + @ Registers the specified trainer in Match Call and plays a fanfare with a notification message. .macro register_matchcall trainer:req setvar VAR_0x8004, \trainer special SetMatchCallRegisteredFlag @@ -1868,6 +1898,7 @@ callstd STD_REGISTER_MATCH_CALL .endm + @ Does a sparkle field effect (e.g. when the Trick Master is hiding) at the given coordinates. .macro dofieldeffectsparkle x:req, y:req, priority:req setfieldeffectargument 0, \x setfieldeffectargument 1, \y diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 6ef5b7790e..92a97ac4c4 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -565,7 +565,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter:: fadenewbgm MUS_SOOTOPOLIS delay 120 clearflag FLAG_HIDE_MAP_NAME_POPUP - warpsootopolislegend MAP_SOOTOPOLIS_CITY, 43, 32 + warpwhitefade MAP_SOOTOPOLIS_CITY, 43, 32 waitstate end @@ -618,7 +618,7 @@ SootopolisCity_EventScript_RayquazaSceneFromDive:: fadenewbgm MUS_SURF delay 120 clearflag FLAG_HIDE_MAP_NAME_POPUP - warpsootopolislegend MAP_SOOTOPOLIS_CITY, 29, 53 + warpwhitefade MAP_SOOTOPOLIS_CITY, 29, 53 waitstate end diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 3d2ab82a9e..48ec7918a4 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -13,12 +13,12 @@ gScriptCmdTable:: .4byte ScrCmd_gotostd_if @ 0x0a .4byte ScrCmd_callstd_if @ 0x0b .4byte ScrCmd_returnram @ 0x0c - .4byte ScrCmd_killscript @ 0x0d + .4byte ScrCmd_endram @ 0x0d .4byte ScrCmd_setmysteryeventstatus @ 0x0e .4byte ScrCmd_loadword @ 0x0f .4byte ScrCmd_loadbyte @ 0x10 - .4byte ScrCmd_writebytetoaddr @ 0x11 - .4byte ScrCmd_loadbytefromaddr @ 0x12 + .4byte ScrCmd_setptr @ 0x11 + .4byte ScrCmd_loadbytefromptr @ 0x12 .4byte ScrCmd_setptrbyte @ 0x13 .4byte ScrCmd_copylocal @ 0x14 .4byte ScrCmd_copybyte @ 0x15 @@ -29,10 +29,10 @@ gScriptCmdTable:: .4byte ScrCmd_setorcopyvar @ 0x1a .4byte ScrCmd_compare_local_to_local @ 0x1b .4byte ScrCmd_compare_local_to_value @ 0x1c - .4byte ScrCmd_compare_local_to_addr @ 0x1d - .4byte ScrCmd_compare_addr_to_local @ 0x1e - .4byte ScrCmd_compare_addr_to_value @ 0x1f - .4byte ScrCmd_compare_addr_to_addr @ 0x20 + .4byte ScrCmd_compare_local_to_ptr @ 0x1d + .4byte ScrCmd_compare_ptr_to_local @ 0x1e + .4byte ScrCmd_compare_ptr_to_value @ 0x1f + .4byte ScrCmd_compare_ptr_to_ptr @ 0x20 .4byte ScrCmd_compare_var_to_value @ 0x21 .4byte ScrCmd_compare_var_to_var @ 0x22 .4byte ScrCmd_callnative @ 0x23 @@ -190,7 +190,7 @@ gScriptCmdTable:: .4byte ScrCmd_vgoto_if @ 0xbb .4byte ScrCmd_vcall_if @ 0xbc .4byte ScrCmd_vmessage @ 0xbd - .4byte ScrCmd_vloadword @ 0xbe + .4byte ScrCmd_vbuffermessage @ 0xbe .4byte ScrCmd_vbufferstring @ 0xbf .4byte ScrCmd_showcoinsbox @ 0xc0 .4byte ScrCmd_hidecoinsbox @ 0xc1 @@ -207,7 +207,7 @@ gScriptCmdTable:: .4byte ScrCmd_nop1 @ 0xcc .4byte ScrCmd_setmoneventlegal @ 0xcd .4byte ScrCmd_checkmoneventlegal @ 0xce - .4byte ScrCmd_gotowondercardscript @ 0xcf + .4byte ScrCmd_trywondercardscript @ 0xcf .4byte ScrCmd_nop1 @ 0xd0 .4byte ScrCmd_warpspinenter @ 0xd1 .4byte ScrCmd_setmonmetlocation @ 0xd2 @@ -224,7 +224,7 @@ gScriptCmdTable:: .4byte ScrCmd_buffertrainerclassname @ 0xdd .4byte ScrCmd_buffertrainername @ 0xde .4byte ScrCmd_pokenavcall @ 0xdf - .4byte ScrCmd_warpsootopolislegend @ 0xe0 + .4byte ScrCmd_warpwhitefade @ 0xe0 .4byte ScrCmd_buffercontestname @ 0xe1 .4byte ScrCmd_bufferitemnameplural @ 0xe2 diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 790871d140..fa4d67da7f 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -28,7 +28,7 @@ CableClub_EventScript_MysteryGiftMan:: end CableClub_EventScript_TryWonderCardScript:: - gotowondercardscript + trywondercardscript CableClub_EventScript_MysteryGiftThankYou:: msgbox gText_ThankYouForAccessingMysteryGift, MSGBOX_NPC end diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc index 0528c815c6..38cf632810 100644 --- a/data/scripts/trainer_battle.inc +++ b/data/scripts/trainer_battle.inc @@ -50,7 +50,7 @@ EventScript_DoNoIntroTrainerBattle:: applymovement VAR_LAST_TALKED, Movement_RevealTrainer waitmovement 0 special PlayTrainerEncounterMusic - trainerbattlebegin + dotrainerbattle gotopostbattlescript EventScript_TryDoRematchBattle:: @@ -117,7 +117,7 @@ EventScript_ShowTrainerIntroMsg:: goto EventScript_DoTrainerBattle EventScript_DoTrainerBattle:: - trainerbattlebegin + dotrainerbattle @ Below battle mode check only needed in FRLG specialvar VAR_RESULT, GetTrainerBattleMode compare VAR_RESULT, TRAINER_BATTLE_SINGLE diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index 973e06ef30..6dc9b077d2 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -22,7 +22,7 @@ void FieldCB_ReturnToFieldNoScript(void); void FieldCB_ReturnToFieldNoScriptCheckMusic(void); void DoWarp(void); void DoDiveWarp(void); -void DoSootopolisLegendWarp(void); +void DoWhiteFadeWarp(void); void DoDoorWarp(void); void DoFallWarp(void); void DoEscalatorWarp(u8 metatileBehavior); diff --git a/include/mystery_event_script.h b/include/mystery_event_script.h index 32b9f009f6..198a07e857 100644 --- a/include/mystery_event_script.h +++ b/include/mystery_event_script.h @@ -1,8 +1,16 @@ #ifndef GUARD_MYSTERY_EVENT_SCRIPT_H #define GUARD_MYSTERY_EVENT_SCRIPT_H +enum { + MEVENT_STATUS_LOAD_OK, + MEVENT_STATUS_LOAD_ERROR, + MEVENT_STATUS_SUCCESS, + MEVENT_STATUS_FAILURE, + MEVENT_STATUS_FF = 0xFF +}; + void InitMysteryEventScriptContext(u8 *script); -bool32 RunMysteryEventScriptContextCommand(u32 *script); +bool32 RunMysteryEventScriptContextCommand(u32 *status); u32 RunMysteryEventScript(u8 *script); void SetMysteryEventScriptStatus(u32 val); u16 GetRecordMixingGift(void); diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 9155903af1..eda1467258 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -502,7 +502,7 @@ void DoDiveWarp(void) CreateTask(Task_WarpAndLoadMap, 10); } -void DoSootopolisLegendWarp(void) +void DoWhiteFadeWarp(void) { ScriptContext2_Enable(); TryFadeOutOldMapMusic(); diff --git a/src/mystery_event_menu.c b/src/mystery_event_menu.c index 717931268a..0007664ba1 100644 --- a/src/mystery_event_menu.c +++ b/src/mystery_event_menu.c @@ -111,16 +111,16 @@ static bool8 GetEventLoadMessage(u8 *dest, u32 status) { bool8 retVal = TRUE; - if (status == 0) + if (status == MEVENT_STATUS_LOAD_OK) { StringCopy(dest, gText_EventSafelyLoaded); retVal = FALSE; } - if (status == 2) + if (status == MEVENT_STATUS_SUCCESS) retVal = FALSE; - if (status == 1) + if (status == MEVENT_STATUS_LOAD_ERROR) StringCopy(dest, gText_LoadErrorEndingSession); return retVal; @@ -193,7 +193,7 @@ static void CB2_MysteryEventMenu(void) } else { - GetEventLoadMessage(gStringVar4, 1); + GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR); PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); gMain.state = 13; } @@ -206,7 +206,7 @@ static void CB2_MysteryEventMenu(void) if (GetLinkPlayerDataExchangeStatusTimed(2, 2) == EXCHANGE_DIFF_SELECTIONS) { SetCloseLinkCallback(); - GetEventLoadMessage(gStringVar4, 1); + GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR); PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); gMain.state = 13; } @@ -218,7 +218,7 @@ static void CB2_MysteryEventMenu(void) else { CloseLink(); - GetEventLoadMessage(gStringVar4, 1); + GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR); PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); gMain.state = 13; } @@ -252,9 +252,9 @@ static void CB2_MysteryEventMenu(void) case 11: if (gReceivedRemoteLinkPlayers == 0) { - u16 unkVal = RunMysteryEventScript(gDecompressionBuffer); + u16 status = RunMysteryEventScript(gDecompressionBuffer); CpuFill32(0, gDecompressionBuffer, 0x7D4); - if (!GetEventLoadMessage(gStringVar4, unkVal)) + if (!GetEventLoadMessage(gStringVar4, status)) TrySavingData(SAVE_NORMAL); gMain.state++; } @@ -290,7 +290,7 @@ static void CB2_MysteryEventMenu(void) if (gLinkStatus & 0x40 && !IsLinkMaster()) { CloseLink(); - GetEventLoadMessage(gStringVar4, 1); + GetEventLoadMessage(gStringVar4, MEVENT_STATUS_LOAD_ERROR); PrintMysteryMenuText(0, gStringVar4, 1, 2, 1); gMain.state = 13; } diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index 18a1a0d07c..5f08c62948 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -22,6 +22,11 @@ extern ScrCmdFunc gMysteryEventScriptCmdTableEnd[]; #define LANGUAGE_MASK 0x1 #define VERSION_MASK 0x200 +#define mScriptBase data[0] +#define mOffset data[1] +#define mStatus data[2] +#define mValid data[3] + EWRAM_DATA static struct ScriptContext sMysteryEventScriptContext = {0}; static bool32 CheckCompatibility(u16 a1, u32 a2, u16 a3, u32 a4) @@ -44,22 +49,22 @@ static bool32 CheckCompatibility(u16 a1, u32 a2, u16 a3, u32 a4) static void SetIncompatible(void) { StringExpandPlaceholders(gStringVar4, gText_MysteryEventCantBeUsed); - SetMysteryEventScriptStatus(3); + SetMysteryEventScriptStatus(MEVENT_STATUS_FAILURE); } static void InitMysteryEventScript(struct ScriptContext *ctx, u8 *script) { InitScriptContext(ctx, gMysteryEventScriptCmdTable, gMysteryEventScriptCmdTableEnd); SetupBytecodeScript(ctx, script); - ctx->data[0] = (u32)script; - ctx->data[1] = 0; - ctx->data[2] = 0; - ctx->data[3] = 0; + ctx->mScriptBase = (u32)script; + ctx->mOffset = 0; + ctx->mStatus = MEVENT_STATUS_LOAD_OK; + ctx->mValid = FALSE; } static bool32 RunMysteryEventScriptCommand(struct ScriptContext *ctx) { - if (RunScriptCommand(ctx) && ctx->data[3]) + if (RunScriptCommand(ctx) && ctx->mValid) return TRUE; else return FALSE; @@ -70,10 +75,10 @@ void InitMysteryEventScriptContext(u8 *script) InitMysteryEventScript(&sMysteryEventScriptContext, script); } -bool32 RunMysteryEventScriptContextCommand(u32 *script) +bool32 RunMysteryEventScriptContextCommand(u32 *status) { bool32 ret = RunMysteryEventScriptCommand(&sMysteryEventScriptContext); - *script = sMysteryEventScriptContext.data[2]; + *status = sMysteryEventScriptContext.mStatus; return ret; } @@ -84,12 +89,12 @@ u32 RunMysteryEventScript(u8 *script) InitMysteryEventScript(ctx, script); while (RunMysteryEventScriptCommand(ctx)); - return ctx->data[2]; + return ctx->mStatus; } -void SetMysteryEventScriptStatus(u32 val) +void SetMysteryEventScriptStatus(u32 status) { - sMysteryEventScriptContext.data[2] = val; + sMysteryEventScriptContext.mStatus = status; } static int CalcRecordMixingGiftChecksum(void) @@ -174,14 +179,14 @@ bool8 MEScrCmd_checkcompat(struct ScriptContext *ctx) u16 v3; u32 v4; - ctx->data[1] = ScriptReadWord(ctx); + ctx->mOffset = ScriptReadWord(ctx); v1 = ScriptReadHalfword(ctx); v2 = ScriptReadWord(ctx); v3 = ScriptReadHalfword(ctx); v4 = ScriptReadWord(ctx); if (CheckCompatibility(v1, v2, v3, v4) == TRUE) - ctx->data[3] = 1; + ctx->mValid = TRUE; else SetIncompatible(); @@ -195,23 +200,23 @@ bool8 MEScrCmd_nop(struct ScriptContext *ctx) bool8 MEScrCmd_setstatus(struct ScriptContext *ctx) { - u8 value = ScriptReadByte(ctx); - ctx->data[2] = value; + u8 status = ScriptReadByte(ctx); + ctx->mStatus = status; return FALSE; } bool8 MEScrCmd_setmsg(struct ScriptContext *ctx) { - u8 value = ScriptReadByte(ctx); - u8 *str = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); - if (value == 0xFF || value == ctx->data[2]) + u8 status = ScriptReadByte(ctx); + u8 *str = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); + if (status == MEVENT_STATUS_FF || status == ctx->mStatus) StringExpandPlaceholders(gStringVar4, str); return FALSE; } bool8 MEScrCmd_runscript(struct ScriptContext *ctx) { - u8 *script = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); + u8 *script = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); ScriptContext2_RunNewScript(script); return FALSE; } @@ -221,7 +226,7 @@ bool8 MEScrCmd_setenigmaberry(struct ScriptContext *ctx) u8 *str; const u8 *message; bool32 haveBerry = IsEnigmaBerryValid(); - u8 *berry = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); + u8 *berry = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); StringCopyN(gStringVar1, gSaveBlock1Ptr->enigmaBerry.berry.name, BERRY_NAME_LENGTH + 1); SetEnigmaBerry(berry); StringCopyN(gStringVar2, gSaveBlock1Ptr->enigmaBerry.berry.name, BERRY_NAME_LENGTH + 1); @@ -244,12 +249,12 @@ bool8 MEScrCmd_setenigmaberry(struct ScriptContext *ctx) StringExpandPlaceholders(str, message); - ctx->data[2] = 2; + ctx->mStatus = MEVENT_STATUS_SUCCESS; if (IsEnigmaBerryValid() == TRUE) VarSet(VAR_ENIGMA_BERRY_AVAILABLE, 1); else - ctx->data[2] = 1; + ctx->mStatus = MEVENT_STATUS_LOAD_ERROR; return FALSE; } @@ -260,7 +265,7 @@ bool8 MEScrCmd_giveribbon(struct ScriptContext *ctx) u8 ribbonId = ScriptReadByte(ctx); GiveGiftRibbonToParty(index, ribbonId); StringExpandPlaceholders(gStringVar4, gText_MysteryEventSpecialRibbon); - ctx->data[2] = 2; + ctx->mStatus = MEVENT_STATUS_SUCCESS; return FALSE; } @@ -269,8 +274,8 @@ bool8 MEScrCmd_initramscript(struct ScriptContext *ctx) u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); u8 objectId = ScriptReadByte(ctx); - u8 *script = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); - u8 *scriptEnd = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); + u8 *script = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); + u8 *scriptEnd = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); InitRamScript(script, scriptEnd - script, mapGroup, mapNum, objectId); return FALSE; } @@ -279,7 +284,7 @@ bool8 MEScrCmd_givenationaldex(struct ScriptContext *ctx) { EnableNationalPokedex(); StringExpandPlaceholders(gStringVar4, gText_MysteryEventNationalDex); - ctx->data[2] = 2; + ctx->mStatus = MEVENT_STATUS_SUCCESS; return FALSE; } @@ -287,7 +292,7 @@ bool8 MEScrCmd_addrareword(struct ScriptContext *ctx) { UnlockAdditionalPhrase(ScriptReadByte(ctx)); StringExpandPlaceholders(gStringVar4, gText_MysteryEventRareWord); - ctx->data[2] = 2; + ctx->mStatus = MEVENT_STATUS_SUCCESS; return FALSE; } @@ -306,7 +311,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) struct Pokemon pokemon; u16 species; u16 heldItem; - u32 data = ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]; + u32 data = ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase; void *pokemonPtr = (void *)data; void *mailPtr = (void *)(data + sizeof(struct Pokemon)); @@ -321,7 +326,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) if (gPlayerPartyCount == PARTY_SIZE) { StringExpandPlaceholders(gStringVar4, gText_MysteryEventFullParty); - ctx->data[2] = 3; + ctx->mStatus = MEVENT_STATUS_FAILURE; } else { @@ -341,7 +346,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) CompactPartySlots(); CalculatePlayerPartyCount(); StringExpandPlaceholders(gStringVar4, gText_MysteryEventSentOver); - ctx->data[2] = 2; + ctx->mStatus = MEVENT_STATUS_SUCCESS; } return FALSE; @@ -349,11 +354,11 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) bool8 MEScrCmd_addtrainer(struct ScriptContext *ctx) { - u32 data = ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]; + u32 data = ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase; memcpy(&gSaveBlock2Ptr->frontier.ereaderTrainer, (void *)data, sizeof(gSaveBlock2Ptr->frontier.ereaderTrainer)); ValidateEReaderTrainer(); StringExpandPlaceholders(gStringVar4, gText_MysteryEventNewTrainer); - ctx->data[2] = 2; + ctx->mStatus = MEVENT_STATUS_SUCCESS; return FALSE; } @@ -361,19 +366,19 @@ bool8 MEScrCmd_enableresetrtc(struct ScriptContext *ctx) { EnableResetRTC(); StringExpandPlaceholders(gStringVar4, gText_InGameClockUsable); - ctx->data[2] = 2; + ctx->mStatus = MEVENT_STATUS_SUCCESS; return FALSE; } bool8 MEScrCmd_checksum(struct ScriptContext *ctx) { int checksum = ScriptReadWord(ctx); - u8 *data = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); - u8 *dataEnd = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); + u8 *data = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); + u8 *dataEnd = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); if (checksum != CalcByteArraySum(data, dataEnd - data)) { - ctx->data[3] = 0; - ctx->data[2] = 1; + ctx->mValid = FALSE; + ctx->mStatus = MEVENT_STATUS_LOAD_ERROR; } return TRUE; } @@ -381,12 +386,12 @@ bool8 MEScrCmd_checksum(struct ScriptContext *ctx) bool8 MEScrCmd_crc(struct ScriptContext *ctx) { int crc = ScriptReadWord(ctx); - u8 *data = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); - u8 *dataEnd = (u8 *)(ScriptReadWord(ctx) - ctx->data[1] + ctx->data[0]); + u8 *data = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); + u8 *dataEnd = (u8 *)(ScriptReadWord(ctx) - ctx->mOffset + ctx->mScriptBase); if (crc != CalcCRC16(data, dataEnd - data)) { - ctx->data[3] = 0; - ctx->data[2] = 1; + ctx->mValid = FALSE; + ctx->mStatus = MEVENT_STATUS_LOAD_ERROR; } return TRUE; } diff --git a/src/scrcmd.c b/src/scrcmd.c index 028b714d06..2c18cb565e 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -286,7 +286,7 @@ bool8 ScrCmd_returnram(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_killscript(struct ScriptContext *ctx) +bool8 ScrCmd_endram(struct ScriptContext *ctx) { ClearRamScript(); StopScript(ctx); @@ -295,9 +295,9 @@ bool8 ScrCmd_killscript(struct ScriptContext *ctx) bool8 ScrCmd_setmysteryeventstatus(struct ScriptContext *ctx) { - u8 value = ScriptReadByte(ctx); + u8 status = ScriptReadByte(ctx); - SetMysteryEventScriptStatus(value); + SetMysteryEventScriptStatus(status); return FALSE; } @@ -309,7 +309,7 @@ bool8 ScrCmd_loadword(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_loadbytefromaddr(struct ScriptContext *ctx) +bool8 ScrCmd_loadbytefromptr(struct ScriptContext *ctx) { u8 index = ScriptReadByte(ctx); @@ -317,7 +317,7 @@ bool8 ScrCmd_loadbytefromaddr(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_writebytetoaddr(struct ScriptContext *ctx) +bool8 ScrCmd_setptr(struct ScriptContext *ctx) { u8 value = ScriptReadByte(ctx); @@ -405,7 +405,7 @@ bool8 ScrCmd_compare_local_to_value(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_compare_local_to_addr(struct ScriptContext *ctx) +bool8 ScrCmd_compare_local_to_ptr(struct ScriptContext *ctx) { const u8 value1 = ctx->data[ScriptReadByte(ctx)]; const u8 value2 = *(const u8 *)ScriptReadWord(ctx); @@ -414,7 +414,7 @@ bool8 ScrCmd_compare_local_to_addr(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_compare_addr_to_local(struct ScriptContext *ctx) +bool8 ScrCmd_compare_ptr_to_local(struct ScriptContext *ctx) { const u8 value1 = *(const u8 *)ScriptReadWord(ctx); const u8 value2 = ctx->data[ScriptReadByte(ctx)]; @@ -423,7 +423,7 @@ bool8 ScrCmd_compare_addr_to_local(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_compare_addr_to_value(struct ScriptContext *ctx) +bool8 ScrCmd_compare_ptr_to_value(struct ScriptContext *ctx) { const u8 value1 = *(const u8 *)ScriptReadWord(ctx); const u8 value2 = ScriptReadByte(ctx); @@ -432,7 +432,7 @@ bool8 ScrCmd_compare_addr_to_value(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_compare_addr_to_addr(struct ScriptContext *ctx) +bool8 ScrCmd_compare_ptr_to_ptr(struct ScriptContext *ctx) { const u8 value1 = *(const u8 *)ScriptReadWord(ctx); const u8 value2 = *(const u8 *)ScriptReadWord(ctx); @@ -646,17 +646,17 @@ bool8 ScrCmd_fadescreenswapbuffers(struct ScriptContext *ctx) switch (mode) { - case FADE_TO_BLACK: - case FADE_TO_WHITE: - default: - CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_DECOMP_BUFFER_SIZE); - FadeScreen(mode, 0); - break; - case FADE_FROM_BLACK: - case FADE_FROM_WHITE: - CpuCopy32(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_DECOMP_BUFFER_SIZE); - FadeScreen(mode, 0); - break; + case FADE_TO_BLACK: + case FADE_TO_WHITE: + default: + CpuCopy32(gPlttBufferUnfaded, gPaletteDecompressionBuffer, PLTT_DECOMP_BUFFER_SIZE); + FadeScreen(mode, 0); + break; + case FADE_FROM_BLACK: + case FADE_FROM_WHITE: + CpuCopy32(gPaletteDecompressionBuffer, gPlttBufferUnfaded, PLTT_DECOMP_BUFFER_SIZE); + FadeScreen(mode, 0); + break; } SetupNativeScript(ctx, IsPaletteNotActive); @@ -1653,7 +1653,7 @@ bool8 ScrCmd_bufferstring(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_vloadword(struct ScriptContext *ctx) +bool8 ScrCmd_vbuffermessage(struct ScriptContext *ctx) { const u8 *ptr = (u8 *)(ScriptReadWord(ctx) - sAddressOffset); @@ -2227,7 +2227,7 @@ bool8 ScrCmd_checkmoneventlegal(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_gotowondercardscript(struct ScriptContext *ctx) +bool8 ScrCmd_trywondercardscript(struct ScriptContext *ctx) { const u8* script = GetSavedRamScriptIfValid(); @@ -2295,7 +2295,7 @@ void SetMovingNpcId(u16 npcId) sMovingNpcId = npcId; } -bool8 ScrCmd_warpsootopolislegend(struct ScriptContext *ctx) +bool8 ScrCmd_warpwhitefade(struct ScriptContext *ctx) { u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); @@ -2304,7 +2304,7 @@ bool8 ScrCmd_warpsootopolislegend(struct ScriptContext *ctx) u16 y = VarGet(ScriptReadHalfword(ctx)); SetWarpDestination(mapGroup, mapNum, warpId, x, y); - DoSootopolisLegendWarp(); + DoWhiteFadeWarp(); ResetInitialPlayerAvatarState(); return TRUE; } From 591ab7241f04fc40114cb2c81c3fc87f85365eda Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 18 Nov 2021 17:24:43 -0500 Subject: [PATCH 204/417] Macro comment typo fix, Object->object --- asm/macros/event.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 14634ec1e5..7d34a00f35 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -588,7 +588,7 @@ .2byte \decoration .endm - @ Applies the movement data at movements to the specified (localId) Object. If no map is specified, then the current map is used. + @ Applies the movement data at movements to the specified (localId) object. If no map is specified, then the current map is used. .macro applymovement localId:req, movements:req, map .ifb \map .byte 0x4f @@ -603,9 +603,9 @@ .endif .endm - @ Blocks script execution until the movements being applied to the specified (localId) Object finish. - @ If the specified Object is 0, then the command will block script execution until all Objects - @ affected by applymovement finish their movements. If the specified Object is not currently being + @ Blocks script execution until the movements being applied to the specified (localId) object finish. + @ If the specified object is 0, then the command will block script execution until all objects + @ affected by applymovement finish their movements. If the specified object is not currently being @ manipulated with applymovement, then this command does nothing. @ If no map is specified, then the current map is used. .macro waitmovement localId:req, map @@ -619,7 +619,7 @@ .endif .endm - @ Attempts to despawn the specified (localId) Object on the specified (map_group, map_num) map. + @ Attempts to despawn the specified (localId) object on the specified map. @ It also sets the object's visibility flag if it has one. @ If no map is specified, then the current map is used. .macro removeobject localId:req, map @@ -633,8 +633,8 @@ .endif .endm - @ Attempts to spawn the specified (localId) Object the specified (map_group, map_num) map. - @ Note that unlike removeobject this does not modify the OObject's flag. + @ Attempts to spawn the specified (localId) object the specified map. + @ Note that unlike removeobject this does not modify the object's flag. @ If no map is specified, then the current map is used. .macro addobject localId:req, map .ifb \map @@ -647,7 +647,7 @@ .endif .endm - @ Sets the specified (localId) Object's position on the current map. + @ Sets the specified (localId) object's position on the current map. .macro setobjectxy localId:req, x:req, y:req .byte 0x57 .2byte \localId From 6c6487dd7af6f59061314bcffd17b31ad120885d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 18 Nov 2021 21:02:22 -0500 Subject: [PATCH 205/417] Missing spaces to tabs in scripts files --- data/scripts/lilycove_lady.inc | 1186 +++++++++++++-------------- data/scripts/pkmn_center_nurse.inc | 204 ++--- data/scripts/shared_secret_base.inc | 302 +++---- 3 files changed, 846 insertions(+), 846 deletions(-) diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index 6c11da105a..c6192b7723 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -2,858 +2,858 @@ .set LOCALID_LADYS_MON, 5 LilycoveCity_PokemonCenter_1F_EventScript_LilycoveLady:: - special Script_GetLilycoveLadyId - switch VAR_RESULT - case LILYCOVE_LADY_QUIZ, LilycoveCity_PokemonCenter_1F_EventScript_QuizLady - case LILYCOVE_LADY_FAVOR, LilycoveCity_PokemonCenter_1F_EventScript_FavorLady - case LILYCOVE_LADY_CONTEST, LilycoveCity_PokemonCenter_1F_EventScript_ContestLady - end + special Script_GetLilycoveLadyId + switch VAR_RESULT + case LILYCOVE_LADY_QUIZ, LilycoveCity_PokemonCenter_1F_EventScript_QuizLady + case LILYCOVE_LADY_FAVOR, LilycoveCity_PokemonCenter_1F_EventScript_FavorLady + case LILYCOVE_LADY_CONTEST, LilycoveCity_PokemonCenter_1F_EventScript_ContestLady + end LilycoveCity_PokemonCenter_1F_EventScript_FavorLady:: - lock - faceplayer - msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheFavorLady, MSGBOX_DEFAULT - specialvar VAR_RESULT, GetFavorLadyState - compare VAR_RESULT, LILYCOVE_LADY_STATE_READY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady - compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted - compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize - end + lock + faceplayer + msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheFavorLady, MSGBOX_DEFAULT + specialvar VAR_RESULT, GetFavorLadyState + compare VAR_RESULT, LILYCOVE_LADY_STATE_READY + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady + compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted + compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize + end LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted:: - msgbox LilycoveCity_PokemonCenter_1F_Text_ThankYouForLastTime, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_ThankYouForLastTime, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady:: - special BufferFavorLadyRequest - msgbox LilycoveCity_PokemonCenter_1F_Text_ObsessedWithThing, MSGBOX_DEFAULT - specialvar VAR_RESULT, HasAnotherPlayerGivenFavorLadyItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_RequestItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem - end + special BufferFavorLadyRequest + msgbox LilycoveCity_PokemonCenter_1F_Text_ObsessedWithThing, MSGBOX_DEFAULT + specialvar VAR_RESULT, HasAnotherPlayerGivenFavorLadyItem + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_RequestItem + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem + end LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem:: - special BufferFavorLadyItemName - special BufferFavorLadyPlayerName - specialvar VAR_RESULT, DidFavorLadyLikeItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing - end + special BufferFavorLadyItemName + special BufferFavorLadyPlayerName + specialvar VAR_RESULT, DidFavorLadyLikeItem + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing + end LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing:: - msgbox LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeBadThing, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_RequestItem - end + msgbox LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeBadThing, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_RequestItem + end LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing:: - msgbox LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeGreatThing, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_RequestItem - end + msgbox LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeGreatThing, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_RequestItem + end LilycoveCity_PokemonCenter_1F_EventScript_RequestItem:: - msgbox LilycoveCity_PokemonCenter_1F_Text_WillYouShareThing, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor - end + msgbox LilycoveCity_PokemonCenter_1F_Text_WillYouShareThing, MSGBOX_YESNO + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor + end LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor:: - msgbox LilycoveCity_PokemonCenter_1F_Text_IsThatSoGoodbye, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_IsThatSoGoodbye, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor:: - msgbox LilycoveCity_PokemonCenter_1F_Text_WhatWillYouGiveMe, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem - end + msgbox LilycoveCity_PokemonCenter_1F_Text_WhatWillYouGiveMe, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem + end LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem:: - fadescreen FADE_TO_BLACK - setvar VAR_RESULT, 0 - special Script_FavorLadyOpenBagMenu - waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem - end + fadescreen FADE_TO_BLACK + setvar VAR_RESULT, 0 + special Script_FavorLadyOpenBagMenu + waitstate + compare VAR_RESULT, 0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem + compare VAR_RESULT, 1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem + end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem:: - msgbox LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem - end + msgbox LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem + end LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem:: - specialvar VAR_RESULT, Script_DoesFavorLadyLikeItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem - end + specialvar VAR_RESULT, Script_DoesFavorLadyLikeItem + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem + end LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem:: - special BufferFavorLadyRequest - msgbox LilycoveCity_PokemonCenter_1F_Text_IllTryToCherishIt, MSGBOX_DEFAULT - release - end + special BufferFavorLadyRequest + msgbox LilycoveCity_PokemonCenter_1F_Text_IllTryToCherishIt, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem:: - specialvar VAR_RESULT, IsFavorLadyThresholdMet - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem - end + specialvar VAR_RESULT, IsFavorLadyThresholdMet + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem + end LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem:: - special BufferFavorLadyRequest - msgbox LilycoveCity_PokemonCenter_1F_Text_IWillCherishThis, MSGBOX_DEFAULT - release - end + special BufferFavorLadyRequest + msgbox LilycoveCity_PokemonCenter_1F_Text_IWillCherishThis, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem:: - special BufferFavorLadyRequest - msgbox LilycoveCity_PokemonCenter_1F_Text_IWillTreasureThis, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize - end + special BufferFavorLadyRequest + msgbox LilycoveCity_PokemonCenter_1F_Text_IWillTreasureThis, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize + end LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize:: - setvar VAR_0x8004, 0 - specialvar VAR_0x8004, FavorLadyGetPrize - msgbox LilycoveCity_PokemonCenter_1F_Text_IllGiveYouThisInReturn, MSGBOX_DEFAULT - giveitem VAR_0x8004 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize - end + setvar VAR_0x8004, 0 + specialvar VAR_0x8004, FavorLadyGetPrize + msgbox LilycoveCity_PokemonCenter_1F_Text_IllGiveYouThisInReturn, MSGBOX_DEFAULT + giveitem VAR_0x8004 + compare VAR_RESULT, 0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize + compare VAR_RESULT, 1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize + end LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize:: - msgbox LilycoveCity_PokemonCenter_1F_Text_YouDontHaveSpaceForIt, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_YouDontHaveSpaceForIt, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize:: - special SetFavorLadyState_Complete - release - end + special SetFavorLadyState_Complete + release + end LilycoveCity_PokemonCenter_1F_EventScript_QuizLady:: - lock - faceplayer - msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheQuizLady, MSGBOX_DEFAULT - specialvar VAR_RESULT, GetQuizLadyState - compare VAR_RESULT, LILYCOVE_LADY_STATE_READY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz - compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz - compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize - end + lock + faceplayer + msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheQuizLady, MSGBOX_DEFAULT + specialvar VAR_RESULT, GetQuizLadyState + compare VAR_RESULT, LILYCOVE_LADY_STATE_READY + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz + compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz + compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize + end LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz:: - specialvar VAR_RESULT, GetQuizAuthor - compare VAR_RESULT, QUIZ_AUTHOR_PLAYER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz - compare VAR_RESULT, QUIZ_AUTHOR_OTHER_PLAYER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady - compare VAR_RESULT, QUIZ_AUTHOR_LADY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady - end + specialvar VAR_RESULT, GetQuizAuthor + compare VAR_RESULT, QUIZ_AUTHOR_PLAYER + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz + compare VAR_RESULT, QUIZ_AUTHOR_OTHER_PLAYER + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady + compare VAR_RESULT, QUIZ_AUTHOR_LADY + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady + end LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz:: - specialvar VAR_RESULT, IsQuizLadyWaitingForChallenger - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz - end + specialvar VAR_RESULT, IsQuizLadyWaitingForChallenger + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz:: - msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingToTakeYourQuiz, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingToTakeYourQuiz, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady:: - msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingForChallenger, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz - end + msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingForChallenger, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady:: - msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingForChallenger, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz - end + msgbox LilycoveCity_PokemonCenter_1F_Text_WaitingForChallenger, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz:: - setvar VAR_0x8004, 0 - msgbox LilycoveCity_PokemonCenter_1F_Text_TakeQuizChallenge, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz - end + setvar VAR_0x8004, 0 + msgbox LilycoveCity_PokemonCenter_1F_Text_TakeQuizChallenge, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz:: - msgbox LilycoveCity_PokemonCenter_1F_Text_HowBoringBye, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_HowBoringBye, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz:: - special ClearQuizLadyPlayerAnswer - compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion - compare VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer + special ClearQuizLadyPlayerAnswer + compare VAR_0x8004, 0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion + compare VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState:: - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse - end + compare VAR_RESULT, 0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz + compare VAR_RESULT, 1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse + end LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion:: - special QuizLadyShowQuizQuestion - waitstate - goto LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState - end + special QuizLadyShowQuizQuestion + waitstate + goto LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState + end LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer:: - special QuizLadyGetPlayerAnswer - waitstate - goto LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState - end + special QuizLadyGetPlayerAnswer + waitstate + goto LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState + end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz:: - msgbox LilycoveCity_PokemonCenter_1F_Text_YoureGoingToQuit, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz - end + msgbox LilycoveCity_PokemonCenter_1F_Text_YoureGoingToQuit, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz:: - msgbox LilycoveCity_PokemonCenter_1F_Text_TakeTheQuizAnotherTime, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_TakeTheQuizAnotherTime, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse:: - special SetQuizLadyState_Complete - msgbox LilycoveCity_PokemonCenter_1F_Text_WaitForAnswer, MSGBOX_DEFAULT - specialvar VAR_RESULT, IsQuizAnswerCorrect - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse - end + special SetQuizLadyState_Complete + msgbox LilycoveCity_PokemonCenter_1F_Text_WaitForAnswer, MSGBOX_DEFAULT + specialvar VAR_RESULT, IsQuizAnswerCorrect + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse + end LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse:: - playse SE_SUCCESS - delay 10 - playse SE_SUCCESS - msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRight, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize - end + playse SE_SUCCESS + delay 10 + playse SE_SUCCESS + msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRight, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize + end LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse:: - special BufferQuizCorrectAnswer - special BufferQuizPrizeName - playse SE_FAILURE - delay 10 - playse SE_FAILURE - msgbox LilycoveCity_PokemonCenter_1F_Text_WrongTheCorrectAnswerIs, MSGBOX_DEFAULT - msgbox LilycoveCity_PokemonCenter_1F_Text_IGetToKeepPrize, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz - end + special BufferQuizCorrectAnswer + special BufferQuizPrizeName + playse SE_FAILURE + delay 10 + playse SE_FAILURE + msgbox LilycoveCity_PokemonCenter_1F_Text_WrongTheCorrectAnswerIs, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_IGetToKeepPrize, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz + end @ VAR_RESULT is essentially ignored, both jumps are identical LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize:: - specialvar VAR_RESULT, BufferQuizAuthorNameAndCheckIfLady - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0 - end + specialvar VAR_RESULT, BufferQuizAuthorNameAndCheckIfLady + compare VAR_RESULT, 1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1 + compare VAR_RESULT, 0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0 + end LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1:: - msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRightYouveWonPersonsPrize, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_GivePrize - end + msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRightYouveWonPersonsPrize, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_GivePrize + end LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0:: - msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRightYouveWonPersonsPrize, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_GivePrize - end + msgbox LilycoveCity_PokemonCenter_1F_Text_YouGotItRightYouveWonPersonsPrize, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_GivePrize + end LilycoveCity_PokemonCenter_1F_EventScript_GivePrize:: - setvar VAR_0x8005, 0 - special BufferQuizPrizeItem - special SetQuizLadyState_Complete - giveitem VAR_0x8005 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize - goto LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz - end + setvar VAR_0x8005, 0 + special BufferQuizPrizeItem + special SetQuizLadyState_Complete + giveitem VAR_0x8005 + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize + goto LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize:: - msgbox LilycoveCity_PokemonCenter_1F_Text_YourBagIsFilledUp, MSGBOX_DEFAULT - special SetQuizLadyState_GivePrize - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_YourBagIsFilledUp, MSGBOX_DEFAULT + special SetQuizLadyState_GivePrize + release + end LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz:: - msgbox LilycoveCity_PokemonCenter_1F_Text_MakeYourOwnQuiz, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - end + msgbox LilycoveCity_PokemonCenter_1F_Text_MakeYourOwnQuiz, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz:: - special QuizLadyPickNewQuestion - msgbox LilycoveCity_PokemonCenter_1F_Text_MaybeNextTime, MSGBOX_DEFAULT - release - end + special QuizLadyPickNewQuestion + msgbox LilycoveCity_PokemonCenter_1F_Text_MaybeNextTime, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz:: - msgbox LilycoveCity_PokemonCenter_1F_Text_PickYourPrize, MSGBOX_DEFAULT + msgbox LilycoveCity_PokemonCenter_1F_Text_PickYourPrize, MSGBOX_DEFAULT LilycoveCity_PokemonCenter_1F_EventScript_PickPrize:: - fadescreen FADE_TO_BLACK - setvar VAR_RESULT, 0 - special Script_QuizLadyOpenBagMenu - waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz - end + fadescreen FADE_TO_BLACK + setvar VAR_RESULT, 0 + special Script_QuizLadyOpenBagMenu + waitstate + compare VAR_RESULT, 0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize + compare VAR_RESULT, 1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize:: - msgbox LilycoveCity_PokemonCenter_1F_Text_QuitChoosingPrize, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PickPrize - end + msgbox LilycoveCity_PokemonCenter_1F_Text_QuitChoosingPrize, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PickPrize + end LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz:: - msgbox LilycoveCity_PokemonCenter_1F_Text_WriteYourQuiz, MSGBOX_DEFAULT - special ClearQuizLadyQuestionAndAnswer - special ClearQuizLadyPlayerAnswer - setvar VAR_0x8004, EASY_CHAT_TYPE_QUIZ_QUESTION + msgbox LilycoveCity_PokemonCenter_1F_Text_WriteYourQuiz, MSGBOX_DEFAULT + special ClearQuizLadyQuestionAndAnswer + special ClearQuizLadyPlayerAnswer + setvar VAR_0x8004, EASY_CHAT_TYPE_QUIZ_QUESTION LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion:: - fadescreen FADE_TO_BLACK - special QuizLadySetCustomQuestion - waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion - goto LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz - end + fadescreen FADE_TO_BLACK + special QuizLadySetCustomQuestion + waitstate + compare VAR_RESULT, 0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion + goto LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz + end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion:: - msgbox LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizQuestion, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion - end + msgbox LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizQuestion, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion + end LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz:: - special QuizLadyTakePrizeForCustomQuiz - special QuizLadyRecordCustomQuizData - special QuizLadySetWaitingForChallenger - msgbox LilycoveCity_PokemonCenter_1F_Text_IllLookForAChallenger, MSGBOX_DEFAULT - release - end + special QuizLadyTakePrizeForCustomQuiz + special QuizLadyRecordCustomQuizData + special QuizLadySetWaitingForChallenger + msgbox LilycoveCity_PokemonCenter_1F_Text_IllLookForAChallenger, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_ContestLady:: - lock - faceplayer - msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheContestLady, MSGBOX_DEFAULT - specialvar VAR_RESULT, HasPlayerGivenContestLadyPokeblock - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock - end + lock + faceplayer + msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheContestLady, MSGBOX_DEFAULT + specialvar VAR_RESULT, HasPlayerGivenContestLadyPokeblock + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock + end @ Redundant with above script, VAR_RESULT will always be FALSE here LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock:: - specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock - end + specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock + compare VAR_RESULT, TRUE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock + end LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock:: - msgbox LilycoveCity_PokemonCenter_1F_Text_ThankForPokeblock, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_ThankForPokeblock, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock:: - special Script_BufferContestLadyCategoryAndMonName - msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT - checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase - msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock - end + special Script_BufferContestLadyCategoryAndMonName + msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT + checkitem ITEM_POKEBLOCK_CASE + compare VAR_RESULT, FALSE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase + msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock + end LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock:: - msgbox LilycoveCity_PokemonCenter_1F_Text_WhatACheapskate, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_WhatACheapskate, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock:: - fadescreen FADE_TO_BLACK - special OpenPokeblockCaseForContestLady - waitstate - compare VAR_RESULT, 0xFFFF - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock - compare VAR_RESULT, 0xFFFF - goto_if_ne LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock - end + fadescreen FADE_TO_BLACK + special OpenPokeblockCaseForContestLady + waitstate + compare VAR_RESULT, 0xFFFF + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock + compare VAR_RESULT, 0xFFFF + goto_if_ne LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock + end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock:: - msgbox LilycoveCity_PokemonCenter_1F_Text_ICantHaveOnePokeblock, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock - end + msgbox LilycoveCity_PokemonCenter_1F_Text_ICantHaveOnePokeblock, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock + compare VAR_RESULT, NO + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock + end LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock:: - msgbox LilycoveCity_PokemonCenter_1F_Text_IllUseYourPokeblock, MSGBOX_DEFAULT - special SetContestLadyGivenPokeblock - special GetContestLadyMonSpecies - goto LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock - end + msgbox LilycoveCity_PokemonCenter_1F_Text_IllUseYourPokeblock, MSGBOX_DEFAULT + special SetContestLadyGivenPokeblock + special GetContestLadyMonSpecies + goto LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock + end @ VAR_0x8004 here is the return value from GivePokeblockToContestLady LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: - applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFaceMon - waitmovement 0 - delay 60 - applymovement LOCALID_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady - waitmovement 0 - delay 60 - waitse - playmoncry VAR_0x8005, CRY_MODE_NORMAL - delay 120 - waitmoncry - compare VAR_0x8004, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock - goto LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock - end + applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFaceMon + waitmovement 0 + delay 60 + applymovement LOCALID_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady + waitmovement 0 + delay 60 + waitse + playmoncry VAR_0x8005, CRY_MODE_NORMAL + delay 120 + waitmoncry + compare VAR_0x8004, 1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock + goto LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock + end @ VAR_0x8004 here is the return value from GivePokeblockToContestLady LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock:: - applymovement LOCALID_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonJump - waitmovement 0 - delay 60 + applymovement LOCALID_LADYS_MON, LilycoveCity_PokemonCenter_1F_Movement_MonJump + waitmovement 0 + delay 60 LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock:: - applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer - waitmovement 0 - delay 60 - compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock - compare VAR_0x8004, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock - end + applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer + waitmovement 0 + delay 60 + compare VAR_0x8004, 0 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock + compare VAR_0x8004, 1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock + end LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock:: - msgbox LilycoveCity_PokemonCenter_1F_Text_NoChangeThanks, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow - end + msgbox LilycoveCity_PokemonCenter_1F_Text_NoChangeThanks, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow + end LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock:: - special Script_BufferContestLadyCategoryAndMonName - msgbox LilycoveCity_PokemonCenter_1F_Text_ReallyImprovedThanks, MSGBOX_DEFAULT - goto LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow - end + special Script_BufferContestLadyCategoryAndMonName + msgbox LilycoveCity_PokemonCenter_1F_Text_ReallyImprovedThanks, MSGBOX_DEFAULT + goto LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow + end LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow:: - specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow - release - end + specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir + compare VAR_RESULT, 1 + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow + release + end LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow:: - msgbox LilycoveCity_PokemonCenter_1F_Text_ReadyToEnterContests, MSGBOX_DEFAULT - special PutLilycoveContestLadyShowOnTheAir - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_ReadyToEnterContests, MSGBOX_DEFAULT + special PutLilycoveContestLadyShowOnTheAir + release + end LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase:: - msgbox LilycoveCity_PokemonCenter_1F_Text_DontHaveAPokeblockCase, MSGBOX_DEFAULT - release - end + msgbox LilycoveCity_PokemonCenter_1F_Text_DontHaveAPokeblockCase, MSGBOX_DEFAULT + release + end LilycoveCity_PokemonCenter_1F_Movement_LadyFaceMon: - face_right - delay_8 - step_end + face_right + delay_8 + step_end LilycoveCity_PokemonCenter_1F_Movement_MonFaceLady: - face_left - delay_8 - step_end + face_left + delay_8 + step_end @ Unused LilycoveCity_PokemonCenter_1F_Movement_MonFaceDown: - face_down - step_end + face_down + step_end LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer: - face_player - step_end + face_player + step_end LilycoveCity_PokemonCenter_1F_Movement_MonJump: - disable_jump_landing_ground_effect - jump_in_place_left - disable_jump_landing_ground_effect - jump_in_place_left - step_end + disable_jump_landing_ground_effect + jump_in_place_left + disable_jump_landing_ground_effect + jump_in_place_left + step_end LilycoveCity_PokemonCenter_1F_EventScript_ContestLadyMon:: - specialvar VAR_RESULT, GetContestLadyCategory - special Script_BufferContestLadyCategoryAndMonName - special GetContestLadyMonSpecies - compare VAR_RESULT, CONTEST_CATEGORY_COOL - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon - compare VAR_RESULT, CONTEST_CATEGORY_BEAUTY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Skitty - compare VAR_RESULT, CONTEST_CATEGORY_CUTE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Poochyena - compare VAR_RESULT, CONTEST_CATEGORY_SMART - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Kecleon - compare VAR_RESULT, CONTEST_CATEGORY_TOUGH - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Pikachu - end + specialvar VAR_RESULT, GetContestLadyCategory + special Script_BufferContestLadyCategoryAndMonName + special GetContestLadyMonSpecies + compare VAR_RESULT, CONTEST_CATEGORY_COOL + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon + compare VAR_RESULT, CONTEST_CATEGORY_BEAUTY + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Skitty + compare VAR_RESULT, CONTEST_CATEGORY_CUTE + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Poochyena + compare VAR_RESULT, CONTEST_CATEGORY_SMART + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Kecleon + compare VAR_RESULT, CONTEST_CATEGORY_TOUGH + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Pikachu + end LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon:: - lock - faceplayer - waitse - playmoncry VAR_0x8005, CRY_MODE_NORMAL - msgbox LilycoveCity_PokemonCenter_1F_Text_Zigzagoon, MSGBOX_DEFAULT - waitmoncry - release - end + lock + faceplayer + waitse + playmoncry VAR_0x8005, CRY_MODE_NORMAL + msgbox LilycoveCity_PokemonCenter_1F_Text_Zigzagoon, MSGBOX_DEFAULT + waitmoncry + release + end LilycoveCity_PokemonCenter_1F_EventScript_Skitty:: - lock - faceplayer - waitse - playmoncry VAR_0x8005, CRY_MODE_NORMAL - msgbox LilycoveCity_PokemonCenter_1F_Text_Skitty, MSGBOX_DEFAULT - waitmoncry - release - end + lock + faceplayer + waitse + playmoncry VAR_0x8005, CRY_MODE_NORMAL + msgbox LilycoveCity_PokemonCenter_1F_Text_Skitty, MSGBOX_DEFAULT + waitmoncry + release + end LilycoveCity_PokemonCenter_1F_EventScript_Poochyena:: - lock - faceplayer - waitse - playmoncry VAR_0x8005, CRY_MODE_NORMAL - msgbox LilycoveCity_PokemonCenter_1F_Text_Poochyena, MSGBOX_DEFAULT - waitmoncry - release - end + lock + faceplayer + waitse + playmoncry VAR_0x8005, CRY_MODE_NORMAL + msgbox LilycoveCity_PokemonCenter_1F_Text_Poochyena, MSGBOX_DEFAULT + waitmoncry + release + end LilycoveCity_PokemonCenter_1F_EventScript_Kecleon:: - lock - faceplayer - waitse - playmoncry VAR_0x8005, CRY_MODE_NORMAL - msgbox LilycoveCity_PokemonCenter_1F_Text_Kecleon, MSGBOX_DEFAULT - waitmoncry - release - end + lock + faceplayer + waitse + playmoncry VAR_0x8005, CRY_MODE_NORMAL + msgbox LilycoveCity_PokemonCenter_1F_Text_Kecleon, MSGBOX_DEFAULT + waitmoncry + release + end LilycoveCity_PokemonCenter_1F_EventScript_Pikachu:: - lock - faceplayer - waitse - playmoncry VAR_0x8005, CRY_MODE_NORMAL - msgbox LilycoveCity_PokemonCenter_1F_Text_Pikachu, MSGBOX_DEFAULT - waitmoncry - release - end + lock + faceplayer + waitse + playmoncry VAR_0x8005, CRY_MODE_NORMAL + msgbox LilycoveCity_PokemonCenter_1F_Text_Pikachu, MSGBOX_DEFAULT + waitmoncry + release + end LilycoveCity_PokemonCenter_1F_Text_ImTheFavorLady: - .string "I'm the FAVOR LADY…$" + .string "I'm the FAVOR LADY…$" LilycoveCity_PokemonCenter_1F_Text_ObsessedWithThing: - .string "I've recently developed an obsession\n" - .string "for {STR_VAR_1} things…$" + .string "I've recently developed an obsession\n" + .string "for {STR_VAR_1} things…$" LilycoveCity_PokemonCenter_1F_Text_ThankYouForLastTime: - .string "Oh…\n" - .string "Thank you for last time…$" + .string "Oh…\n" + .string "Thank you for last time…$" LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeBadThing: - .string "Before, I think it was {STR_VAR_3}…\p" - .string "{STR_VAR_3} gave me one {STR_VAR_2},\n" - .string "saying it was {STR_VAR_1}.\p" - .string "But it wasn't {STR_VAR_1}.\n" - .string "Not in the least bit.$" + .string "Before, I think it was {STR_VAR_3}…\p" + .string "{STR_VAR_3} gave me one {STR_VAR_2},\n" + .string "saying it was {STR_VAR_1}.\p" + .string "But it wasn't {STR_VAR_1}.\n" + .string "Not in the least bit.$" LilycoveCity_PokemonCenter_1F_Text_PlayerGaveMeGreatThing: - .string "Before, {STR_VAR_3} gave me a very\n" - .string "{STR_VAR_1} {STR_VAR_2}.\p" - .string "I cherish it now.$" + .string "Before, {STR_VAR_3} gave me a very\n" + .string "{STR_VAR_1} {STR_VAR_2}.\p" + .string "I cherish it now.$" LilycoveCity_PokemonCenter_1F_Text_WillYouShareThing: - .string "Listen, if you have anything that\n" - .string "is {STR_VAR_1}, will you share it\l" - .string "with me?$" + .string "Listen, if you have anything that\n" + .string "is {STR_VAR_1}, will you share it\l" + .string "with me?$" LilycoveCity_PokemonCenter_1F_Text_WhatWillYouGiveMe: - .string "…Really?\n" - .string "What will you give me?$" + .string "…Really?\n" + .string "What will you give me?$" LilycoveCity_PokemonCenter_1F_Text_IsThatSoGoodbye: - .string "Is that so?\n" - .string "Then, it's good-bye…$" + .string "Is that so?\n" + .string "Then, it's good-bye…$" LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare: - .string "Oh…\n" - .string "You're not willing to share?$" + .string "Oh…\n" + .string "You're not willing to share?$" LilycoveCity_PokemonCenter_1F_Text_IllTryToCherishIt: - .string "Oh?\n" - .string "That {STR_VAR_2} is {STR_VAR_1}?\p" - .string "…Oh, is that right?\p" - .string "Well, I owe you a thanks anyway.\n" - .string "I'll try to cherish it…$" + .string "Oh?\n" + .string "That {STR_VAR_2} is {STR_VAR_1}?\p" + .string "…Oh, is that right?\p" + .string "Well, I owe you a thanks anyway.\n" + .string "I'll try to cherish it…$" LilycoveCity_PokemonCenter_1F_Text_IWillCherishThis: - .string "Oh…\p" - .string "That's a quite {STR_VAR_1}\n" - .string "{STR_VAR_2}…\p" - .string "Isn't it nice?\n" - .string "It's so dreamy…\p" - .string "Thank you…\n" - .string "I will cherish this…$" + .string "Oh…\p" + .string "That's a quite {STR_VAR_1}\n" + .string "{STR_VAR_2}…\p" + .string "Isn't it nice?\n" + .string "It's so dreamy…\p" + .string "Thank you…\n" + .string "I will cherish this…$" LilycoveCity_PokemonCenter_1F_Text_IWillTreasureThis: - .string "…Oh, oh, oh…\p" - .string "This is amazing!\n" - .string "This really is {STR_VAR_1}!\p" - .string "I never knew that one {STR_VAR_2}\n" - .string "could be this {STR_VAR_1}!\p" - .string "Thank you!\p" - .string "I will treasure this for the rest\n" - .string "of my life!$" + .string "…Oh, oh, oh…\p" + .string "This is amazing!\n" + .string "This really is {STR_VAR_1}!\p" + .string "I never knew that one {STR_VAR_2}\n" + .string "could be this {STR_VAR_1}!\p" + .string "Thank you!\p" + .string "I will treasure this for the rest\n" + .string "of my life!$" LilycoveCity_PokemonCenter_1F_Text_IllGiveYouThisInReturn: - .string "I'll give you this wonderful item in\n" - .string "return for your fabulous gift.\p" - .string "I hope you will cherish it…$" + .string "I'll give you this wonderful item in\n" + .string "return for your fabulous gift.\p" + .string "I hope you will cherish it…$" LilycoveCity_PokemonCenter_1F_Text_YouDontHaveSpaceForIt: - .string "Oh, you can't have it if you don't have\n" - .string "the space for it.\p" - .string "Please come see me when you get\n" - .string "your BAG organized…$" + .string "Oh, you can't have it if you don't have\n" + .string "the space for it.\p" + .string "Please come see me when you get\n" + .string "your BAG organized…$" LilycoveCity_PokemonCenter_1F_Text_ImTheQuizLady: - .string "I'm the QUIZ LADY!\n" - .string "I love quizzes!$" + .string "I'm the QUIZ LADY!\n" + .string "I love quizzes!$" LilycoveCity_PokemonCenter_1F_Text_WaitingToTakeYourQuiz: - .string "Oh?\p" - .string "I'm waiting for a challenger to answer\n" - .string "the quiz you made.\p" - .string "We can chat another time, okay?$" + .string "Oh?\p" + .string "I'm waiting for a challenger to answer\n" + .string "the quiz you made.\p" + .string "We can chat another time, okay?$" LilycoveCity_PokemonCenter_1F_Text_WaitingForChallenger: - .string "I'm waiting for someone to challenge\n" - .string "a quiz this {STR_VAR_1} thought up!$" + .string "I'm waiting for someone to challenge\n" + .string "a quiz this {STR_VAR_1} thought up!$" LilycoveCity_PokemonCenter_1F_Text_TakeQuizChallenge: - .string "If you answer correctly, you can win\n" - .string "fabulous prizes!\p" - .string "Would you like to take the quiz\n" - .string "challenge?$" + .string "If you answer correctly, you can win\n" + .string "fabulous prizes!\p" + .string "Would you like to take the quiz\n" + .string "challenge?$" LilycoveCity_PokemonCenter_1F_Text_WaitForAnswer: - .string "… … … … … …\n" - .string "… … … … … …$" + .string "… … … … … …\n" + .string "… … … … … …$" LilycoveCity_PokemonCenter_1F_Text_HowBoringBye: - .string "Oh, how boring!\n" - .string "Bye-bye!$" + .string "Oh, how boring!\n" + .string "Bye-bye!$" LilycoveCity_PokemonCenter_1F_Text_YoureGoingToQuit: - .string "Awww!\n" - .string "You're going to quit?$" + .string "Awww!\n" + .string "You're going to quit?$" LilycoveCity_PokemonCenter_1F_Text_TakeTheQuizAnotherTime: - .string "Please take the quiz challenge\n" - .string "another time!$" + .string "Please take the quiz challenge\n" + .string "another time!$" LilycoveCity_PokemonCenter_1F_Text_YouGotItRight: - .string "You're amazing! You've got it right!\n" - .string "You're one sharp customer!$" + .string "You're amazing! You've got it right!\n" + .string "You're one sharp customer!$" LilycoveCity_PokemonCenter_1F_Text_YouGotItRightYouveWonPersonsPrize: - .string "Congratulations!\n" - .string "You've got the quiz right!\p" - .string "You've won a prize provided by\n" - .string "{STR_VAR_1}!$" + .string "Congratulations!\n" + .string "You've got the quiz right!\p" + .string "You've won a prize provided by\n" + .string "{STR_VAR_1}!$" @ Unused LilycoveCity_PokemonCenter_1F_Text_XReceivedOneY: - .string "{STR_VAR_1} received\n" - .string "one {STR_VAR_2}!$" + .string "{STR_VAR_1} received\n" + .string "one {STR_VAR_2}!$" LilycoveCity_PokemonCenter_1F_Text_YourBagIsFilledUp: - .string "Oh? Your BAG is filled up!\n" - .string "Come see me when you have room.$" + .string "Oh? Your BAG is filled up!\n" + .string "Come see me when you have room.$" LilycoveCity_PokemonCenter_1F_Text_WrongTheCorrectAnswerIs: - .string "Hmm… Wrong!\n" - .string "The correct answer is “{STR_VAR_3}”!$" + .string "Hmm… Wrong!\n" + .string "The correct answer is “{STR_VAR_3}”!$" LilycoveCity_PokemonCenter_1F_Text_IGetToKeepPrize: - .string "Too bad!\p" - .string "I get to keep the quiz prize\n" - .string "{STR_VAR_1} now!$" + .string "Too bad!\p" + .string "I get to keep the quiz prize\n" + .string "{STR_VAR_1} now!$" LilycoveCity_PokemonCenter_1F_Text_MakeYourOwnQuiz: - .string "Listen, listen!\n" - .string "Would you like to make your own quiz?$" + .string "Listen, listen!\n" + .string "Would you like to make your own quiz?$" LilycoveCity_PokemonCenter_1F_Text_MaybeNextTime: - .string "Oh, I see…\n" - .string "Well, maybe next time!$" + .string "Oh, I see…\n" + .string "Well, maybe next time!$" LilycoveCity_PokemonCenter_1F_Text_PickYourPrize: - .string "Okay, the first thing you have to do\n" - .string "is pick the prize for the person that\l" - .string "answers your quiz correctly.\p" - .string "But beware, if the person taking\n" - .string "the quiz can't get it right, I get to\l" - .string "keep the prize!$" + .string "Okay, the first thing you have to do\n" + .string "is pick the prize for the person that\l" + .string "answers your quiz correctly.\p" + .string "But beware, if the person taking\n" + .string "the quiz can't get it right, I get to\l" + .string "keep the prize!$" LilycoveCity_PokemonCenter_1F_Text_QuitChoosingPrize: - .string "If you don't choose a prize,\n" - .string "your quiz can't be made.\p" - .string "Are you going to quit making\n" - .string "your quiz?$" + .string "If you don't choose a prize,\n" + .string "your quiz can't be made.\p" + .string "Are you going to quit making\n" + .string "your quiz?$" LilycoveCity_PokemonCenter_1F_Text_WriteYourQuiz: - .string "Oh, how nice!\n" - .string "That's a wonderful prize!\p" - .string "Next, you need to write your quiz\n" - .string "question and its answer.$" + .string "Oh, how nice!\n" + .string "That's a wonderful prize!\p" + .string "Next, you need to write your quiz\n" + .string "question and its answer.$" LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizQuestion: - .string "Are you going to quit writing\n" - .string "your quiz question?$" + .string "Are you going to quit writing\n" + .string "your quiz question?$" @ Unused LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizAnswer: - .string "Are you going to quit choosing\n" - .string "your quiz answer?$" + .string "Are you going to quit choosing\n" + .string "your quiz answer?$" LilycoveCity_PokemonCenter_1F_Text_IllLookForAChallenger: - .string "Thank you!\n" - .string "You've put together a nice quiz.\p" - .string "I'll go look for someone who'll take\n" - .string "your quiz challenge right away.$" + .string "Thank you!\n" + .string "You've put together a nice quiz.\p" + .string "I'll go look for someone who'll take\n" + .string "your quiz challenge right away.$" LilycoveCity_PokemonCenter_1F_Text_ImTheContestLady: - .string "I'm the CONTEST LADY!\n" - .string "I sure do love CONTESTS!$" + .string "I'm the CONTEST LADY!\n" + .string "I sure do love CONTESTS!$" LilycoveCity_PokemonCenter_1F_Text_ThankForPokeblock: - .string "Thanks for your {POKEBLOCK} before!$" + .string "Thanks for your {POKEBLOCK} before!$" LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality: - .string "This is my friend {STR_VAR_1}!\n" - .string "It's the epitome of {STR_VAR_2}!\p" - .string "But I think that it will display\n" - .string "even more {STR_VAR_2}!$" + .string "This is my friend {STR_VAR_1}!\n" + .string "It's the epitome of {STR_VAR_2}!\p" + .string "But I think that it will display\n" + .string "even more {STR_VAR_2}!$" LilycoveCity_PokemonCenter_1F_Text_DontHaveAPokeblockCase: - .string "So, I need your help!\p" - .string "Please, may I have one {POKEBLOCK}?\n" - .string "All I'm asking for is one!\p" - .string "…Oh, but…\n" - .string "Don't you have a {POKEBLOCK} CASE?\l" - .string "That's no good. Next time, then!$" + .string "So, I need your help!\p" + .string "Please, may I have one {POKEBLOCK}?\n" + .string "All I'm asking for is one!\p" + .string "…Oh, but…\n" + .string "Don't you have a {POKEBLOCK} CASE?\l" + .string "That's no good. Next time, then!$" LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock: - .string "So, I need your help!\p" - .string "Please, may I have one {POKEBLOCK}?\n" - .string "All I'm asking for is one!$" + .string "So, I need your help!\p" + .string "Please, may I have one {POKEBLOCK}?\n" + .string "All I'm asking for is one!$" LilycoveCity_PokemonCenter_1F_Text_ICantHaveOnePokeblock: - .string "Awww!\n" - .string "I can't have one {POKEBLOCK}?!$" + .string "Awww!\n" + .string "I can't have one {POKEBLOCK}?!$" LilycoveCity_PokemonCenter_1F_Text_WhatACheapskate: - .string "Sheesh!\n" - .string "What a cheapskate!$" + .string "Sheesh!\n" + .string "What a cheapskate!$" LilycoveCity_PokemonCenter_1F_Text_IllUseYourPokeblock: - .string "Yay!\n" - .string "Thank you!\p" - .string "I'll feed my POKéMON your {POKEBLOCK}\n" - .string "right away.$" + .string "Yay!\n" + .string "Thank you!\p" + .string "I'll feed my POKéMON your {POKEBLOCK}\n" + .string "right away.$" LilycoveCity_PokemonCenter_1F_Text_NoChangeThanks: - .string "…It doesn't seem to have changed\n" - .string "in any way at all…\p" - .string "Hmm…\p" - .string "Oh, well!\n" - .string "Thank you very much!$" + .string "…It doesn't seem to have changed\n" + .string "in any way at all…\p" + .string "Hmm…\p" + .string "Oh, well!\n" + .string "Thank you very much!$" LilycoveCity_PokemonCenter_1F_Text_ReallyImprovedThanks: - .string "Oh, yay!\n" - .string "It's really delighted!\p" - .string "I think it really improved {STR_VAR_1}'s\n" - .string "{STR_VAR_2} quality, too.\p" - .string "Thank you so much!$" + .string "Oh, yay!\n" + .string "It's really delighted!\p" + .string "I think it really improved {STR_VAR_1}'s\n" + .string "{STR_VAR_2} quality, too.\p" + .string "Thank you so much!$" LilycoveCity_PokemonCenter_1F_Text_ReadyToEnterContests: - .string "Hmm…\p" - .string "I think we may be ready to enter\n" - .string "some CONTESTS.\p" - .string "If you see us in one somewhere,\n" - .string "I hope you'll cheer for us.$" + .string "Hmm…\p" + .string "I think we may be ready to enter\n" + .string "some CONTESTS.\p" + .string "If you see us in one somewhere,\n" + .string "I hope you'll cheer for us.$" LilycoveCity_PokemonCenter_1F_Text_Zigzagoon: - .string "{STR_VAR_1}: Guguuh!$" + .string "{STR_VAR_1}: Guguuh!$" LilycoveCity_PokemonCenter_1F_Text_Kecleon: - .string "{STR_VAR_1}: Igigigiiih!$" + .string "{STR_VAR_1}: Igigigiiih!$" LilycoveCity_PokemonCenter_1F_Text_Poochyena: - .string "{STR_VAR_1}: Baaarun…$" + .string "{STR_VAR_1}: Baaarun…$" LilycoveCity_PokemonCenter_1F_Text_Pikachu: - .string "{STR_VAR_1}: Pikka!$" + .string "{STR_VAR_1}: Pikka!$" LilycoveCity_PokemonCenter_1F_Text_Skitty: - .string "{STR_VAR_1}: Umyaaaan!$" + .string "{STR_VAR_1}: Umyaaaan!$" diff --git a/data/scripts/pkmn_center_nurse.inc b/data/scripts/pkmn_center_nurse.inc index 21f2abe0a2..310f4d304c 100644 --- a/data/scripts/pkmn_center_nurse.inc +++ b/data/scripts/pkmn_center_nurse.inc @@ -1,135 +1,135 @@ Common_EventScript_PkmnCenterNurse:: - lock - faceplayer - setvar VAR_0x8004, 0 - specialvar VAR_RESULT, CountPlayerTrainerStars - compare VAR_RESULT, 4 - goto_if_eq EventScript_PkmnCenterNurse_GoldCard - msgbox gText_WouldYouLikeToRestYourPkmn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_HealPkmn - compare VAR_RESULT, NO - goto_if_eq EventScript_PkmnCenterNurse_Goodbye - end + lock + faceplayer + setvar VAR_0x8004, 0 + specialvar VAR_RESULT, CountPlayerTrainerStars + compare VAR_RESULT, 4 + goto_if_eq EventScript_PkmnCenterNurse_GoldCard + msgbox gText_WouldYouLikeToRestYourPkmn, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq EventScript_PkmnCenterNurse_HealPkmn + compare VAR_RESULT, NO + goto_if_eq EventScript_PkmnCenterNurse_Goodbye + end EventScript_PkmnCenterNurse_Goodbye:: - message gText_WeHopeToSeeYouAgain - return + message gText_WeHopeToSeeYouAgain + return @ VAR_0x8004 is 1 when player has Gold Card; jumps are identical EventScript_PkmnCenterNurse_HealPkmn:: - incrementgamestat GAME_STAT_USED_POKECENTER - compare VAR_0x8004, 0 - call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn - compare VAR_0x8004, 1 - call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn2 - waitmessage - call EventScript_PkmnCenterNurse_TakeAndHealPkmn - goto_if_unset FLAG_POKERUS_EXPLAINED, EventScript_PkmnCenterNurse_CheckPokerus - goto EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom - end + incrementgamestat GAME_STAT_USED_POKECENTER + compare VAR_0x8004, 0 + call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn + compare VAR_0x8004, 1 + call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn2 + waitmessage + call EventScript_PkmnCenterNurse_TakeAndHealPkmn + goto_if_unset FLAG_POKERUS_EXPLAINED, EventScript_PkmnCenterNurse_CheckPokerus + goto EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom + end EventScript_PkmnCenterNurse_IllTakeYourPkmn:: - message gText_IllTakeYourPkmn - return + message gText_IllTakeYourPkmn + return EventScript_PkmnCenterNurse_IllTakeYourPkmn2:: - message gText_IllTakeYourPkmn2 - return + message gText_IllTakeYourPkmn2 + return EventScript_PkmnCenterNurse_TakeAndHealPkmn:: - applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterLeft - waitmovement 0 - dofieldeffect FLDEFF_POKECENTER_HEAL - waitfieldeffect FLDEFF_POKECENTER_HEAL - applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterDown - waitmovement 0 - special HealPlayerParty - return + applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterLeft + waitmovement 0 + dofieldeffect FLDEFF_POKECENTER_HEAL + waitfieldeffect FLDEFF_POKECENTER_HEAL + applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterDown + waitmovement 0 + special HealPlayerParty + return EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom:: - specialvar VAR_RESULT, PlayerNotAtTrainerHillEntrance - compare VAR_RESULT, 0 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn - specialvar VAR_RESULT, BufferUnionRoomPlayerName - copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 0 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn - compare VAR_0x8008, 1 - goto_if_eq EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom - end + specialvar VAR_RESULT, PlayerNotAtTrainerHillEntrance + compare VAR_RESULT, 0 + goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn + specialvar VAR_RESULT, BufferUnionRoomPlayerName + copyvar VAR_0x8008, VAR_RESULT + compare VAR_0x8008, 0 + goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn + compare VAR_0x8008, 1 + goto_if_eq EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom + end @ VAR_0x8004 is 1 when player has Gold Card EventScript_PkmnCenterNurse_ReturnPkmn:: - compare VAR_0x8004, 1 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn2 - message gText_RestoredPkmnToFullHealth - waitmessage - applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow - waitmovement 0 - message gText_WeHopeToSeeYouAgain - return + compare VAR_0x8004, 1 + goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn2 + message gText_RestoredPkmnToFullHealth + waitmessage + applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow + waitmovement 0 + message gText_WeHopeToSeeYouAgain + return EventScript_PkmnCenterNurse_ReturnPkmn2:: - message gText_ThankYouForWaiting - waitmessage - applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow - waitmovement 0 - message gText_WeHopeToSeeYouAgain2 - return + message gText_ThankYouForWaiting + waitmessage + applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow + waitmovement 0 + message gText_WeHopeToSeeYouAgain2 + return EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom:: - goto_if_set FLAG_NURSE_UNION_ROOM_REMINDER, EventScript_PkmnCenterNurse_ReturnPkmn - msgbox gText_RestoredPkmnToFullHealth, MSGBOX_DEFAULT - setflag FLAG_NURSE_UNION_ROOM_REMINDER - message CableClub_Text_PlayerIsWaiting - waitmessage - applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow - waitmovement 0 - message gText_WeHopeToSeeYouAgain - return + goto_if_set FLAG_NURSE_UNION_ROOM_REMINDER, EventScript_PkmnCenterNurse_ReturnPkmn + msgbox gText_RestoredPkmnToFullHealth, MSGBOX_DEFAULT + setflag FLAG_NURSE_UNION_ROOM_REMINDER + message CableClub_Text_PlayerIsWaiting + waitmessage + applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow + waitmovement 0 + message gText_WeHopeToSeeYouAgain + return EventScript_PkmnCenterNurse_CheckPokerus:: - specialvar VAR_RESULT, IsPokerusInParty - compare VAR_RESULT, TRUE - goto_if_eq EventScript_PkmnCenterNurse_ExplainPokerus - compare VAR_RESULT, FALSE - goto_if_eq EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom - end + specialvar VAR_RESULT, IsPokerusInParty + compare VAR_RESULT, TRUE + goto_if_eq EventScript_PkmnCenterNurse_ExplainPokerus + compare VAR_RESULT, FALSE + goto_if_eq EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom + end EventScript_PkmnCenterNurse_ExplainPokerus:: - message gText_PokerusExplanation - setflag FLAG_POKERUS_EXPLAINED - return + message gText_PokerusExplanation + setflag FLAG_POKERUS_EXPLAINED + return EventScript_PkmnCenterNurse_GoldCard:: - goto_if_set FLAG_NURSE_MENTIONS_GOLD_CARD, EventScript_PkmnCenterNurse_AskForUsual - setflag FLAG_NURSE_MENTIONS_GOLD_CARD - msgbox gText_WelcomeCutShort, MSGBOX_DEFAULT - playse SE_PIN - applymovement VAR_0x800B, Common_Movement_ExclamationMark - waitmovement 0 - applymovement VAR_0x800B, Common_Movement_Delay48 - waitmovement 0 - msgbox gText_NoticesGoldCard, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn - message gText_WeHopeToSeeYouAgain2 - return + goto_if_set FLAG_NURSE_MENTIONS_GOLD_CARD, EventScript_PkmnCenterNurse_AskForUsual + setflag FLAG_NURSE_MENTIONS_GOLD_CARD + msgbox gText_WelcomeCutShort, MSGBOX_DEFAULT + playse SE_PIN + applymovement VAR_0x800B, Common_Movement_ExclamationMark + waitmovement 0 + applymovement VAR_0x800B, Common_Movement_Delay48 + waitmovement 0 + msgbox gText_NoticesGoldCard, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn + message gText_WeHopeToSeeYouAgain2 + return EventScript_PkmnCenterNurse_AskForUsual:: - msgbox gText_YouWantTheUsual, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn - message gText_WeHopeToSeeYouAgain2 - return + msgbox gText_YouWantTheUsual, MSGBOX_YESNO + compare VAR_RESULT, YES + goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn + message gText_WeHopeToSeeYouAgain2 + return EventScript_PkmnCenterNurse_GoldCardHealPkmn:: - setvar VAR_0x8004, 1 - goto EventScript_PkmnCenterNurse_HealPkmn - end + setvar VAR_0x8004, 1 + goto EventScript_PkmnCenterNurse_HealPkmn + end Movement_PkmnCenterNurse_Bow: - nurse_joy_bow - delay_4 - step_end + nurse_joy_bow + delay_4 + step_end diff --git a/data/scripts/shared_secret_base.inc b/data/scripts/shared_secret_base.inc index ef389d3fce..aca7fc81a5 100644 --- a/data/scripts/shared_secret_base.inc +++ b/data/scripts/shared_secret_base.inc @@ -1,224 +1,224 @@ SecretBase_MapScripts:: - map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SecretBase_OnWarp - map_script MAP_SCRIPT_ON_TRANSITION, SecretBase_OnTransition - map_script MAP_SCRIPT_ON_FRAME_TABLE, SecretBase_OnFrame - map_script MAP_SCRIPT_ON_RESUME, SecretBase_OnResume - .byte 0 + map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, SecretBase_OnWarp + map_script MAP_SCRIPT_ON_TRANSITION, SecretBase_OnTransition + map_script MAP_SCRIPT_ON_FRAME_TABLE, SecretBase_OnFrame + map_script MAP_SCRIPT_ON_RESUME, SecretBase_OnResume + .byte 0 SecretBase_OnWarp: - map_script_2 VAR_SECRET_BASE_INITIALIZED, 0, SecretBase_EventScript_InitDecorations - .2byte 0 + map_script_2 VAR_SECRET_BASE_INITIALIZED, 0, SecretBase_EventScript_InitDecorations + .2byte 0 SecretBase_OnTransition: - call SecretBase_EventScript_SetDecorationFlags - special SetSecretBaseOwnerGfxId - special InitSecretBaseVars - end + call SecretBase_EventScript_SetDecorationFlags + special SetSecretBaseOwnerGfxId + special InitSecretBaseVars + end SecretBase_OnFrame: - map_script_2 VAR_INIT_SECRET_BASE, 0, SecretBase_EventScript_FirstEntrance - .2byte 0 + map_script_2 VAR_INIT_SECRET_BASE, 0, SecretBase_EventScript_FirstEntrance + .2byte 0 SecretBase_OnResume: - setstepcallback STEP_CB_SECRET_BASE - end + setstepcallback STEP_CB_SECRET_BASE + end SecretBase_EventScript_PC:: - lockall - playse SE_PC_LOGIN - message SecretBase_Text_BootUpPC - dofieldeffect FLDEFF_PCTURN_ON - waitstate - waitmessage - waitbuttonpress - playse SE_SELECT - goto SecretBase_EventScript_PCShowMainMenu - end + lockall + playse SE_PC_LOGIN + message SecretBase_Text_BootUpPC + dofieldeffect FLDEFF_PCTURN_ON + waitstate + waitmessage + waitbuttonpress + playse SE_SELECT + goto SecretBase_EventScript_PCShowMainMenu + end SecretBase_EventScript_PCShowMainMenu:: - message SecretBase_Text_WhatWouldYouLikeToDo - waitmessage - goto_if_set FLAG_SECRET_BASE_REGISTRY_ENABLED, SecretBase_EventScript_PCMainMenuWithRegister - goto SecretBase_EventScript_PCMainMenuWithoutRegister - end + message SecretBase_Text_WhatWouldYouLikeToDo + waitmessage + goto_if_set FLAG_SECRET_BASE_REGISTRY_ENABLED, SecretBase_EventScript_PCMainMenuWithRegister + goto SecretBase_EventScript_PCMainMenuWithoutRegister + end SecretBase_EventScript_PCCancel:: - lockall - goto SecretBase_EventScript_PCShowMainMenu - end + lockall + goto SecretBase_EventScript_PCShowMainMenu + end SecretBase_EventScript_PCMainMenuWithRegister:: - multichoice 0, 0, MULTI_BASE_PC_WITH_REGISTRY, FALSE - switch VAR_RESULT - case 0, SecretBase_EventScript_PCDecorationMenu - case 1, SecretBase_EventScript_PCPackUp - case 2, SecretBase_EventScript_PCRegistryMenu - case 3, SecretBase_EventScript_PCTurnOff - case MULTI_B_PRESSED, SecretBase_EventScript_PCTurnOff - end + multichoice 0, 0, MULTI_BASE_PC_WITH_REGISTRY, FALSE + switch VAR_RESULT + case 0, SecretBase_EventScript_PCDecorationMenu + case 1, SecretBase_EventScript_PCPackUp + case 2, SecretBase_EventScript_PCRegistryMenu + case 3, SecretBase_EventScript_PCTurnOff + case MULTI_B_PRESSED, SecretBase_EventScript_PCTurnOff + end SecretBase_EventScript_PCMainMenuWithoutRegister:: - multichoice 0, 0, MULTI_BASE_PC_NO_REGISTRY, FALSE - switch VAR_RESULT - case 0, SecretBase_EventScript_PCDecorationMenu - case 1, SecretBase_EventScript_PCPackUp - case 2, SecretBase_EventScript_PCTurnOff - case MULTI_B_PRESSED, SecretBase_EventScript_PCTurnOff - end + multichoice 0, 0, MULTI_BASE_PC_NO_REGISTRY, FALSE + switch VAR_RESULT + case 0, SecretBase_EventScript_PCDecorationMenu + case 1, SecretBase_EventScript_PCPackUp + case 2, SecretBase_EventScript_PCTurnOff + case MULTI_B_PRESSED, SecretBase_EventScript_PCTurnOff + end SecretBase_EventScript_PCPackUp:: - msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCShowMainMenu - closemessage - special MoveOutOfSecretBase - releaseall - end + msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO + compare VAR_RESULT, NO + goto_if_eq SecretBase_EventScript_PCShowMainMenu + closemessage + special MoveOutOfSecretBase + releaseall + end SecretBase_EventScript_PCDecorationMenu:: - special ShowSecretBaseDecorationMenu - end + special ShowSecretBaseDecorationMenu + end SecretBase_EventScript_PCRegistryMenu:: - special ShowSecretBaseRegistryMenu - end + special ShowSecretBaseRegistryMenu + end SecretBase_EventScript_RecordMixingPC:: - lockall - message SecretBase_Text_BootUpPC - playse SE_PC_LOGIN - dofieldeffect FLDEFF_PCTURN_ON - waitstate - waitmessage - waitbuttonpress - playse SE_SELECT - goto SecretBase_EventScript_PCRegisterMenu - end + lockall + message SecretBase_Text_BootUpPC + playse SE_PC_LOGIN + dofieldeffect FLDEFF_PCTURN_ON + waitstate + waitmessage + waitbuttonpress + playse SE_SELECT + goto SecretBase_EventScript_PCRegisterMenu + end SecretBase_EventScript_PCRegisterMenu:: - message SecretBase_Text_WhatWouldYouLikeToDo - waitmessage - multichoice 0, 0, MULTI_REGISTER_MENU, FALSE - switch VAR_RESULT - case 0, SecretBase_EventScript_PCRegister - case 1, SecretBase_EventScript_PCRegistryMenu - case 2, SecretBase_EventScript_PCRegistryInfo - case 3, SecretBase_EventScript_PCTurnOff - case MULTI_B_PRESSED, SecretBase_EventScript_PCTurnOff - end + message SecretBase_Text_WhatWouldYouLikeToDo + waitmessage + multichoice 0, 0, MULTI_REGISTER_MENU, FALSE + switch VAR_RESULT + case 0, SecretBase_EventScript_PCRegister + case 1, SecretBase_EventScript_PCRegistryMenu + case 2, SecretBase_EventScript_PCRegistryInfo + case 3, SecretBase_EventScript_PCTurnOff + case MULTI_B_PRESSED, SecretBase_EventScript_PCTurnOff + end SecretBase_EventScript_ShowRegisterMenu:: - lockall - goto SecretBase_EventScript_PCRegisterMenu - end + lockall + goto SecretBase_EventScript_PCRegisterMenu + end SecretBase_EventScript_PCRegister:: - special GetCurSecretBaseRegistrationValidity - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_AlreadyRegistered - compare VAR_RESULT, 2 - goto_if_eq SecretBase_EventScript_CantRegisterTooManyBases - special CopyCurSecretBaseOwnerName_StrVar1 - msgbox SecretBase_Text_WantToRegisterSecretBase, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCRegisterMenu - msgbox SecretBase_Text_RegistrationCompleted, MSGBOX_SIGN - special ToggleCurSecretBaseRegistry - special DoSecretBasePCTurnOffEffect - releaseall - end + special GetCurSecretBaseRegistrationValidity + compare VAR_RESULT, 1 + goto_if_eq SecretBase_EventScript_AlreadyRegistered + compare VAR_RESULT, 2 + goto_if_eq SecretBase_EventScript_CantRegisterTooManyBases + special CopyCurSecretBaseOwnerName_StrVar1 + msgbox SecretBase_Text_WantToRegisterSecretBase, MSGBOX_YESNO + compare VAR_RESULT, NO + goto_if_eq SecretBase_EventScript_PCRegisterMenu + msgbox SecretBase_Text_RegistrationCompleted, MSGBOX_SIGN + special ToggleCurSecretBaseRegistry + special DoSecretBasePCTurnOffEffect + releaseall + end SecretBase_EventScript_AlreadyRegistered:: - msgbox SecretBase_Text_AlreadyRegisteredDelete, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCRegisterMenu - msgbox SecretBase_Text_DataUnregistered, MSGBOX_SIGN - special ToggleCurSecretBaseRegistry - special DoSecretBasePCTurnOffEffect - releaseall - end + msgbox SecretBase_Text_AlreadyRegisteredDelete, MSGBOX_YESNO + compare VAR_RESULT, NO + goto_if_eq SecretBase_EventScript_PCRegisterMenu + msgbox SecretBase_Text_DataUnregistered, MSGBOX_SIGN + special ToggleCurSecretBaseRegistry + special DoSecretBasePCTurnOffEffect + releaseall + end SecretBase_EventScript_CantRegisterTooManyBases:: - msgbox SecretBase_Text_TooManyBasesDeleteSome, MSGBOX_SIGN - special DoSecretBasePCTurnOffEffect - closemessage - releaseall - end + msgbox SecretBase_Text_TooManyBasesDeleteSome, MSGBOX_SIGN + special DoSecretBasePCTurnOffEffect + closemessage + releaseall + end SecretBase_EventScript_PCRegistryInfo:: - msgbox SecretBase_Text_RegistryInfo, MSGBOX_DEFAULT - goto SecretBase_EventScript_PCRegisterMenu - end + msgbox SecretBase_Text_RegistryInfo, MSGBOX_DEFAULT + goto SecretBase_EventScript_PCRegisterMenu + end SecretBase_EventScript_PCTurnOff:: - special DoSecretBasePCTurnOffEffect - closemessage - releaseall - end + special DoSecretBasePCTurnOffEffect + closemessage + releaseall + end @ Unused SecretBase_EventScript_Poster:: - special CheckInteractedWithFriendsPosterDecor - end + special CheckInteractedWithFriendsPosterDecor + end @ Unused SecretBase_EventScript_FurnitureBottom:: - special CheckInteractedWithFriendsFurnitureBottom - end + special CheckInteractedWithFriendsFurnitureBottom + end @ Unused SecretBase_EventScript_FurnitureMiddle:: - special CheckInteractedWithFriendsFurnitureMiddle - end + special CheckInteractedWithFriendsFurnitureMiddle + end @ Unused SecretBase_EventScript_FurnitureTop:: - special CheckInteractedWithFriendsFurnitureTop - end + special CheckInteractedWithFriendsFurnitureTop + end SecretBase_EventScript_SandOrnament:: - special CheckInteractedWithFriendsSandOrnament - dofieldeffect FLDEFF_SAND_PILLAR - waitstate - end + special CheckInteractedWithFriendsSandOrnament + dofieldeffect FLDEFF_SAND_PILLAR + waitstate + end SecretBase_EventScript_ShieldOrToyTV:: - special InteractWithShieldOrTVDecoration - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_BattleTowerShield - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_ToyTV - compare VAR_RESULT, 2 - goto_if_eq SecretBase_EventScript_SeedotTV - compare VAR_RESULT, 3 - goto_if_eq SecretBase_EventScript_SkittyTV - end + special InteractWithShieldOrTVDecoration + compare VAR_RESULT, 0 + goto_if_eq SecretBase_EventScript_BattleTowerShield + compare VAR_RESULT, 1 + goto_if_eq SecretBase_EventScript_ToyTV + compare VAR_RESULT, 2 + goto_if_eq SecretBase_EventScript_SeedotTV + compare VAR_RESULT, 3 + goto_if_eq SecretBase_EventScript_SkittyTV + end SecretBase_EventScript_BattleTowerShield:: - msgbox SecretBase_Text_BattleTowerShield, MSGBOX_SIGN - end + msgbox SecretBase_Text_BattleTowerShield, MSGBOX_SIGN + end SecretBase_EventScript_ToyTV:: - msgbox SecretBase_Text_ToyTV, MSGBOX_SIGN - end + msgbox SecretBase_Text_ToyTV, MSGBOX_SIGN + end SecretBase_EventScript_SeedotTV:: - msgbox SecretBase_Text_SeedotTV, MSGBOX_SIGN - end + msgbox SecretBase_Text_SeedotTV, MSGBOX_SIGN + end SecretBase_EventScript_SkittyTV:: - msgbox SecretBase_Text_SkittyTV, MSGBOX_SIGN - end + msgbox SecretBase_Text_SkittyTV, MSGBOX_SIGN + end SecretBase_Text_SmallIndentInWall:: - .string "There's a small indent in the wall.$" + .string "There's a small indent in the wall.$" SecretBase_Text_IndentUseSecretPower:: - .string "There's a small indent in the wall.\p" - .string "Use the SECRET POWER?$" + .string "There's a small indent in the wall.\p" + .string "Use the SECRET POWER?$" SecretBase_Text_DiscoveredSmallCavern:: - .string "Discovered a small cavern!$" + .string "Discovered a small cavern!$" SecretBase_Text_WantToMakeYourSecretBaseHere: - .string "Want to make your SECRET BASE here?$" + .string "Want to make your SECRET BASE here?$" From c57efdba5d3cc475f75c5909c31f96bbce6190b8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 18 Nov 2021 22:05:37 -0500 Subject: [PATCH 206/417] Allow compare + goto_if/call_if as a single statement --- asm/macros/event.inc | 84 +++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 7d34a00f35..28f010ef28 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1028,13 +1028,13 @@ @ replaced with their charmap values, they are just passed as the literal characters "STR_VAR_#". .macro stringvar id:req .if \id == STR_VAR_1 - .byte 0 + .byte 0 .elseif \id == STR_VAR_2 - .byte 1 + .byte 1 .elseif \id == STR_VAR_3 - .byte 2 + .byte 2 .else - .byte \id + .byte \id .endif .endm @@ -1743,28 +1743,48 @@ goto_if TRUE, \dest .endm - .macro goto_if_lt dest:req @ LESS THAN - goto_if 0, \dest + @ Allows 'compare' followed by a conditional goto/call to be combined into a single statement. + @ The following are examples of the two acceptable formats this facilitates: + @ compare VAR_RESULT, TRUE + @ goto_if_eq MyScript + @ - or - + @ goto_if_eq VAR_RESULT, TRUE, MyScript + @ + @ The first two arguments to this macro are the base command, e.g. 'goto_if 1' for goto_if_eq. + @ The remaining arguments 'a, b, c' depend on the format: + @ For a single statement, 'a' and 'b' are the values to compare and 'c' is the destination pointer. + @ For a statement preceded by a compare, 'a' is the destination pointer and 'b/c' are not provided. + .macro trycompare jump:req, condition:req, a:req, b, c + .ifnb \c + compare \a, \b + \jump \condition, \c + .else + \jump \condition, \a + .endif .endm - .macro goto_if_eq dest:req @ EQUAL - goto_if 1, \dest + .macro goto_if_lt a:req, b, c @ LESS THAN + trycompare goto_if, 0, \a, \b, \c .endm - .macro goto_if_gt dest:req @ GREATER THAN - goto_if 2, \dest + .macro goto_if_eq a:req, b, c @ EQUAL + trycompare goto_if, 1, \a, \b, \c .endm - .macro goto_if_le dest:req @ LESS THAN OR EQUAL - goto_if 3, \dest + .macro goto_if_gt a:req, b, c @ GREATER THAN + trycompare goto_if, 2, \a, \b, \c .endm - .macro goto_if_ge dest:req @ GREATER THAN OR EQUAL - goto_if 4, \dest + .macro goto_if_le a:req, b, c @ LESS THAN OR EQUAL + trycompare goto_if, 3, \a, \b, \c .endm - .macro goto_if_ne dest:req @ NOT EQUAL - goto_if 5, \dest + .macro goto_if_ge a:req, b, c @ GREATER THAN OR EQUAL + trycompare goto_if, 4, \a, \b, \c + .endm + + .macro goto_if_ne a:req, b, c @ NOT EQUAL + trycompare goto_if, 5, \a, \b, \c .endm .macro call_if_unset flag:req, dest:req @@ -1777,36 +1797,36 @@ call_if TRUE, \dest .endm - .macro call_if_lt dest:req @ LESS THAN - call_if 0, \dest + .macro call_if_lt a:req, b, c @ LESS THAN + trycompare call_if, 0, \a, \b, \c .endm - .macro call_if_eq dest:req @ EQUAL - call_if 1, \dest + .macro call_if_eq a:req, b, c @ EQUAL + trycompare call_if, 1, \a, \b, \c .endm - .macro call_if_gt dest:req @ GREATER THAN - call_if 2, \dest + .macro call_if_gt a:req, b, c @ GREATER THAN + trycompare call_if, 2, \a, \b, \c .endm - .macro call_if_le dest:req @ LESS THAN OR EQUAL - call_if 3, \dest + .macro call_if_le a:req, b, c @ LESS THAN OR EQUAL + trycompare call_if, 3, \a, \b, \c .endm - .macro call_if_ge dest:req @ GREATER THAN OR EQUAL - call_if 4, \dest + .macro call_if_ge a:req, b, c @ GREATER THAN OR EQUAL + trycompare call_if, 4, \a, \b, \c .endm - .macro call_if_ne dest:req @ NOT EQUAL - call_if 5, \dest + .macro call_if_ne a:req, b, c @ NOT EQUAL + trycompare call_if, 5, \a, \b, \c .endm - .macro vgoto_if_eq dest:req - vgoto_if TRUE, \dest + .macro vgoto_if_eq a:req, b, c + trycompare vgoto_if, TRUE, \a, \b, \c .endm - .macro vgoto_if_ne dest:req - vgoto_if FALSE, \dest + .macro vgoto_if_ne a:req, b, c + trycompare vgoto_if, FALSE, \a, \b, \c .endm .macro vgoto_if_unset flag:req, dest:req From e66ea0cb996c70093fe3f250cafb7f1f87e84d4d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 18 Nov 2021 23:06:30 -0500 Subject: [PATCH 207/417] Reformat compare + goto_if/call_if to single statements --- data/event_scripts.s | 15 +- .../AbandonedShip_CaptainsOffice/scripts.inc | 3 +- .../AbandonedShip_Corridors_B1F/scripts.inc | 3 +- .../scripts.inc | 12 +- .../scripts.inc | 24 +- data/maps/AbandonedShip_Rooms2_1F/scripts.inc | 6 +- data/maps/AbandonedShip_Rooms_1F/scripts.inc | 3 +- data/maps/AncientTomb/scripts.inc | 12 +- data/maps/AquaHideout_B1F/scripts.inc | 21 +- .../scripts.inc | 57 +-- .../scripts.inc | 21 +- .../scripts.inc | 96 ++---- .../scripts.inc | 3 +- .../scripts.inc | 69 ++-- .../scripts.inc | 9 +- .../scripts.inc | 48 +-- .../scripts.inc | 33 +- .../scripts.inc | 129 +++---- .../scripts.inc | 60 ++-- .../scripts.inc | 18 +- .../scripts.inc | 51 +-- .../scripts.inc | 12 +- .../scripts.inc | 48 +-- .../scripts.inc | 6 +- .../scripts.inc | 6 +- .../scripts.inc | 27 +- .../scripts.inc | 30 +- .../scripts.inc | 39 +-- .../scripts.inc | 48 +-- .../scripts.inc | 6 +- .../scripts.inc | 12 +- .../scripts.inc | 183 ++++------ .../scripts.inc | 36 +- .../scripts.inc | 21 +- .../scripts.inc | 9 +- .../scripts.inc | 120 +++---- data/maps/BattleFrontier_Lounge1/scripts.inc | 51 +-- data/maps/BattleFrontier_Lounge2/scripts.inc | 36 +- data/maps/BattleFrontier_Lounge3/scripts.inc | 30 +- data/maps/BattleFrontier_Lounge5/scripts.inc | 9 +- data/maps/BattleFrontier_Lounge6/scripts.inc | 9 +- data/maps/BattleFrontier_Lounge7/scripts.inc | 12 +- .../BattleFrontier_OutsideEast/scripts.inc | 12 +- .../BattleFrontier_OutsideWest/scripts.inc | 36 +- .../BattleFrontier_RankingHall/scripts.inc | 3 +- .../BattleFrontier_ScottsHouse/scripts.inc | 51 +-- data/maps/BirthIsland_Exterior/scripts.inc | 12 +- data/maps/BirthIsland_Harbor/scripts.inc | 3 +- data/maps/ContestHall/scripts.inc | 30 +- data/maps/DesertRuins/scripts.inc | 12 +- data/maps/DewfordTown/scripts.inc | 30 +- data/maps/DewfordTown_Gym/scripts.inc | 51 +-- data/maps/DewfordTown_Hall/scripts.inc | 36 +- data/maps/DewfordTown_House2/scripts.inc | 3 +- .../EverGrandeCity_ChampionsRoom/scripts.inc | 18 +- .../EverGrandeCity_DrakesRoom/scripts.inc | 3 +- .../EverGrandeCity_GlaciasRoom/scripts.inc | 3 +- .../EverGrandeCity_HallOfFame/scripts.inc | 6 +- .../EverGrandeCity_PhoebesRoom/scripts.inc | 3 +- .../scripts.inc | 9 +- .../scripts.inc | 6 +- .../EverGrandeCity_SidneysRoom/scripts.inc | 3 +- .../scripts.inc | 18 +- .../FallarborTown_BattleTentLobby/scripts.inc | 12 +- .../FallarborTown_CozmosHouse/scripts.inc | 9 +- .../scripts.inc | 15 +- data/maps/FarawayIsland_Entrance/scripts.inc | 3 +- data/maps/FarawayIsland_Interior/scripts.inc | 39 +-- data/maps/FortreeCity/scripts.inc | 6 +- data/maps/FortreeCity_Gym/scripts.inc | 9 +- data/maps/FortreeCity_House1/scripts.inc | 9 +- data/maps/FortreeCity_House2/scripts.inc | 3 +- data/maps/FortreeCity_House4/scripts.inc | 3 +- data/maps/GraniteCave_StevensRoom/scripts.inc | 15 +- data/maps/InsideOfTruck/scripts.inc | 6 +- data/maps/IslandCave/scripts.inc | 12 +- data/maps/JaggedPass/scripts.inc | 18 +- data/maps/LavaridgeTown/scripts.inc | 48 +-- data/maps/LavaridgeTown_Gym_1F/scripts.inc | 15 +- data/maps/LavaridgeTown_HerbShop/scripts.inc | 3 +- data/maps/LilycoveCity/scripts.inc | 33 +- .../LilycoveCity_ContestLobby/scripts.inc | 120 +++---- .../LilycoveCity_CoveLilyMotel_2F/scripts.inc | 3 +- .../scripts.inc | 15 +- .../scripts.inc | 45 +-- .../scripts.inc | 33 +- .../scripts.inc | 6 +- data/maps/LilycoveCity_Harbor/scripts.inc | 105 ++---- data/maps/LilycoveCity_House2/scripts.inc | 3 +- data/maps/LilycoveCity_House3/scripts.inc | 3 +- .../scripts.inc | 12 +- .../scripts.inc | 3 +- .../scripts.inc | 15 +- .../LilycoveCity_PokemonCenter_1F/scripts.inc | 6 +- .../scripts.inc | 171 +++------ data/maps/LittlerootTown/scripts.inc | 153 +++------ .../scripts.inc | 36 +- .../scripts.inc | 46 +-- .../LittlerootTown_MaysHouse_1F/scripts.inc | 39 +-- .../LittlerootTown_MaysHouse_2F/scripts.inc | 57 +-- .../scripts.inc | 153 +++------ data/maps/MarineCave_End/scripts.inc | 12 +- data/maps/MauvilleCity/scripts.inc | 24 +- data/maps/MauvilleCity_BikeShop/scripts.inc | 24 +- data/maps/MauvilleCity_GameCorner/scripts.inc | 129 +++---- data/maps/MauvilleCity_Gym/scripts.inc | 27 +- data/maps/MauvilleCity_House2/scripts.inc | 9 +- data/maps/MeteorFalls_1F_2R/scripts.inc | 9 +- data/maps/MirageTower_4F/scripts.inc | 6 +- data/maps/MossdeepCity/scripts.inc | 12 +- data/maps/MossdeepCity_Gym/scripts.inc | 9 +- data/maps/MossdeepCity_House1/scripts.inc | 3 +- data/maps/MossdeepCity_House2/scripts.inc | 6 +- data/maps/MossdeepCity_House3/scripts.inc | 3 +- data/maps/MossdeepCity_House4/scripts.inc | 3 +- .../MossdeepCity_SpaceCenter_1F/scripts.inc | 54 +-- .../MossdeepCity_SpaceCenter_2F/scripts.inc | 39 +-- .../MossdeepCity_StevensHouse/scripts.inc | 18 +- data/maps/MtChimney/scripts.inc | 33 +- .../MtChimney_CableCarStation/scripts.inc | 9 +- data/maps/MtPyre_1F/scripts.inc | 3 +- data/maps/MtPyre_3F/scripts.inc | 3 +- data/maps/MtPyre_6F/scripts.inc | 3 +- data/maps/MtPyre_Exterior/scripts.inc | 3 +- data/maps/MtPyre_Summit/scripts.inc | 63 ++-- data/maps/NavelRock_Bottom/scripts.inc | 12 +- data/maps/NavelRock_Harbor/scripts.inc | 3 +- data/maps/NavelRock_Top/scripts.inc | 12 +- data/maps/NewMauville_Entrance/scripts.inc | 9 +- data/maps/NewMauville_Inside/scripts.inc | 42 +-- data/maps/OldaleTown/scripts.inc | 18 +- data/maps/PacifidlogTown_House2/scripts.inc | 15 +- data/maps/PacifidlogTown_House3/scripts.inc | 9 +- data/maps/PacifidlogTown_House4/scripts.inc | 6 +- data/maps/PacifidlogTown_House5/scripts.inc | 3 +- data/maps/PetalburgCity/scripts.inc | 48 +-- data/maps/PetalburgCity_Gym/scripts.inc | 264 +++++--------- .../scripts.inc | 12 +- data/maps/PetalburgWoods/scripts.inc | 12 +- data/maps/Route101/scripts.inc | 6 +- data/maps/Route102/scripts.inc | 6 +- data/maps/Route103/scripts.inc | 15 +- data/maps/Route104/scripts.inc | 60 ++-- data/maps/Route104_MrBrineysHouse/scripts.inc | 12 +- .../scripts.inc | 15 +- data/maps/Route105/scripts.inc | 18 +- data/maps/Route106/scripts.inc | 3 +- data/maps/Route107/scripts.inc | 3 +- data/maps/Route108/scripts.inc | 3 +- data/maps/Route109/scripts.inc | 12 +- data/maps/Route109_SeashoreHouse/scripts.inc | 12 +- data/maps/Route110/scripts.inc | 87 ++--- .../scripts.inc | 3 +- .../scripts.inc | 12 +- data/maps/Route110_TrickHouseEnd/scripts.inc | 39 +-- .../Route110_TrickHouseEntrance/scripts.inc | 180 ++++------ .../Route110_TrickHousePuzzle1/scripts.inc | 6 +- .../Route110_TrickHousePuzzle2/scripts.inc | 15 +- .../Route110_TrickHousePuzzle3/scripts.inc | 45 +-- .../Route110_TrickHousePuzzle4/scripts.inc | 3 +- .../Route110_TrickHousePuzzle5/scripts.inc | 219 ++++-------- .../Route110_TrickHousePuzzle6/scripts.inc | 3 +- .../Route110_TrickHousePuzzle7/scripts.inc | 9 +- .../Route110_TrickHousePuzzle8/scripts.inc | 3 +- data/maps/Route111/scripts.inc | 66 ++-- .../Route111_OldLadysRestStop/scripts.inc | 12 +- .../scripts.inc | 3 +- data/maps/Route112/scripts.inc | 3 +- .../maps/Route112_CableCarStation/scripts.inc | 9 +- data/maps/Route113/scripts.inc | 12 +- data/maps/Route113_GlassWorkshop/scripts.inc | 78 ++--- data/maps/Route114/scripts.inc | 27 +- .../Route114_FossilManiacsHouse/scripts.inc | 3 +- .../Route114_FossilManiacsTunnel/scripts.inc | 6 +- data/maps/Route114_LanettesHouse/scripts.inc | 9 +- data/maps/Route115/scripts.inc | 24 +- data/maps/Route116/scripts.inc | 63 ++-- data/maps/Route117/scripts.inc | 18 +- data/maps/Route118/scripts.inc | 36 +- data/maps/Route119/scripts.inc | 60 ++-- .../Route119_WeatherInstitute_1F/scripts.inc | 9 +- .../Route119_WeatherInstitute_2F/scripts.inc | 24 +- data/maps/Route120/scripts.inc | 75 ++-- data/maps/Route121/scripts.inc | 9 +- .../Route121_SafariZoneEntrance/scripts.inc | 18 +- data/maps/Route123/scripts.inc | 15 +- .../Route123_BerryMastersHouse/scripts.inc | 48 +-- data/maps/Route124/scripts.inc | 9 +- .../scripts.inc | 30 +- data/maps/Route125/scripts.inc | 18 +- data/maps/Route126/scripts.inc | 3 +- data/maps/Route127/scripts.inc | 18 +- data/maps/Route128/scripts.inc | 6 +- data/maps/Route129/scripts.inc | 18 +- data/maps/Route130/scripts.inc | 6 +- data/maps/Route131/scripts.inc | 3 +- data/maps/RustboroCity/scripts.inc | 69 ++-- .../RustboroCity_DevonCorp_2F/scripts.inc | 75 ++-- .../RustboroCity_DevonCorp_3F/scripts.inc | 6 +- data/maps/RustboroCity_Flat1_2F/scripts.inc | 24 +- data/maps/RustboroCity_Flat2_2F/scripts.inc | 3 +- data/maps/RustboroCity_Gym/scripts.inc | 9 +- data/maps/RustboroCity_House1/scripts.inc | 9 +- .../RustboroCity_PokemonSchool/scripts.inc | 9 +- data/maps/RusturfTunnel/scripts.inc | 36 +- data/maps/SSTidalCorridor/scripts.inc | 18 +- data/maps/SSTidalRooms/scripts.inc | 3 +- data/maps/SafariZone_South/scripts.inc | 6 +- data/maps/SeafloorCavern_Entrance/scripts.inc | 21 +- data/maps/SealedChamber_InnerRoom/scripts.inc | 3 +- .../ShoalCave_LowTideEntranceRoom/scripts.inc | 30 +- .../ShoalCave_LowTideInnerRoom/scripts.inc | 18 +- .../ShoalCave_LowTideLowerRoom/scripts.inc | 6 +- .../ShoalCave_LowTideStairsRoom/scripts.inc | 3 +- data/maps/SkyPillar_1F/scripts.inc | 3 +- data/maps/SkyPillar_2F/scripts.inc | 3 +- data/maps/SkyPillar_3F/scripts.inc | 3 +- data/maps/SkyPillar_4F/scripts.inc | 3 +- data/maps/SkyPillar_5F/scripts.inc | 3 +- data/maps/SkyPillar_Outside/scripts.inc | 6 +- data/maps/SkyPillar_Top/scripts.inc | 18 +- data/maps/SlateportCity/scripts.inc | 51 +-- .../scripts.inc | 6 +- .../scripts.inc | 18 +- .../SlateportCity_BattleTentLobby/scripts.inc | 9 +- data/maps/SlateportCity_Harbor/scripts.inc | 51 +-- .../SlateportCity_NameRatersHouse/scripts.inc | 30 +- .../scripts.inc | 21 +- .../scripts.inc | 18 +- .../SlateportCity_PokemonFanClub/scripts.inc | 42 +-- data/maps/SootopolisCity/scripts.inc | 213 ++++-------- data/maps/SootopolisCity_Gym_1F/scripts.inc | 18 +- data/maps/SootopolisCity_House1/scripts.inc | 3 +- data/maps/SootopolisCity_House2/scripts.inc | 6 +- data/maps/SootopolisCity_House3/scripts.inc | 3 +- data/maps/SootopolisCity_House6/scripts.inc | 6 +- .../scripts.inc | 30 +- data/maps/SootopolisCity_Mart/scripts.inc | 6 +- .../scripts.inc | 42 +-- .../scripts.inc | 9 +- .../scripts.inc | 6 +- data/maps/SouthernIsland_Exterior/scripts.inc | 3 +- data/maps/SouthernIsland_Interior/scripts.inc | 30 +- data/maps/TerraCave_End/scripts.inc | 12 +- data/maps/TrainerHill_Elevator/scripts.inc | 3 +- data/maps/TrainerHill_Entrance/scripts.inc | 21 +- .../maps/Underwater_SealedChamber/scripts.inc | 6 +- .../scripts.inc | 15 +- .../scripts.inc | 15 +- data/maps/VictoryRoad_1F/scripts.inc | 9 +- data/scripts/abnormal_weather.inc | 3 +- data/scripts/apprentice.inc | 57 +-- data/scripts/battle_pike.inc | 42 +-- data/scripts/berry_blender.inc | 138 +++----- data/scripts/berry_tree.inc | 36 +- data/scripts/cable_club.inc | 324 ++++++------------ data/scripts/contest_hall.inc | 318 ++++++----------- data/scripts/day_care.inc | 87 ++--- data/scripts/field_move_scripts.inc | 42 +-- data/scripts/field_poison.inc | 18 +- data/scripts/gabby_and_ty.inc | 27 +- data/scripts/gift_altering_cave.inc | 3 +- data/scripts/gift_aurora_ticket.inc | 6 +- data/scripts/gift_battle_card.inc | 3 +- data/scripts/gift_mystic_ticket.inc | 6 +- data/scripts/gift_old_sea_map.inc | 6 +- data/scripts/gift_pichu.inc | 18 +- data/scripts/gift_trainer.inc | 3 +- data/scripts/hall_of_fame.inc | 6 +- data/scripts/interview.inc | 111 ++---- data/scripts/kecleon.inc | 15 +- data/scripts/lilycove_lady.inc | 207 ++++------- data/scripts/mauville_man.inc | 102 ++---- data/scripts/move_tutors.inc | 90 ++--- data/scripts/obtain_item.inc | 54 +-- data/scripts/pc_transfer.inc | 6 +- data/scripts/pkmn_center_nurse.inc | 39 +-- data/scripts/players_house.inc | 81 ++--- data/scripts/prof_birch.inc | 33 +- data/scripts/profile_man.inc | 12 +- data/scripts/questionnaire.inc | 15 +- data/scripts/record_mix.inc | 6 +- data/scripts/rival_graphics.inc | 18 +- data/scripts/roulette.inc | 12 +- data/scripts/safari_zone.inc | 12 +- data/scripts/secret_base.inc | 228 ++++-------- data/scripts/secret_power_tm.inc | 15 +- data/scripts/shared_secret_base.inc | 27 +- data/scripts/surf.inc | 6 +- data/scripts/trainer_battle.inc | 36 +- data/scripts/trainer_hill.inc | 12 +- data/scripts/trainer_script.inc | 3 +- data/scripts/tv.inc | 27 +- 293 files changed, 2990 insertions(+), 5978 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index c6d6a5fa29..edab4987fa 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -583,12 +583,9 @@ EventScript_WhiteOut:: end EventScript_ResetMrBriney:: - compare VAR_BRINEY_LOCATION, 1 - goto_if_eq EventScript_MoveMrBrineyToHouse - compare VAR_BRINEY_LOCATION, 2 - goto_if_eq EventScript_MoveMrBrineyToDewford - compare VAR_BRINEY_LOCATION, 3 - goto_if_eq EventScript_MoveMrBrineyToRoute109 + goto_if_eq VAR_BRINEY_LOCATION, 1, EventScript_MoveMrBrineyToHouse + goto_if_eq VAR_BRINEY_LOCATION, 2, EventScript_MoveMrBrineyToDewford + goto_if_eq VAR_BRINEY_LOCATION, 3, EventScript_MoveMrBrineyToRoute109 end EventScript_MoveMrBrineyToHouse:: @@ -801,10 +798,8 @@ Movement_UnusedBoardFerry: step_end Common_EventScript_FerryDepartIsland:: - compare VAR_FACING, DIR_SOUTH - call_if_eq Ferry_EventScript_DepartIslandSouth - compare VAR_FACING, DIR_WEST - call_if_eq Ferry_EventScript_DepartIslandWest + call_if_eq VAR_FACING, DIR_SOUTH, Ferry_EventScript_DepartIslandSouth + call_if_eq VAR_FACING, DIR_WEST, Ferry_EventScript_DepartIslandWest delay 30 hideobjectat OBJ_EVENT_ID_PLAYER, 0 call Common_EventScript_FerryDepart diff --git a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc index 6bb3352ab7..7c59fec967 100644 --- a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc +++ b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc @@ -6,8 +6,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide:: faceplayer goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus checkitem ITEM_SCANNER - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus msgbox AbandonedShip_CaptainsOffice_Text_NoSuccessFindingScanner, MSGBOX_DEFAULT release diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc index 09d7584959..19f103362e 100644 --- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc @@ -28,8 +28,7 @@ AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor:: lockall goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked checkitem ITEM_STORAGE_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked msgbox AbandonedShip_Corridors_B1F_Text_InsertedStorageKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_STORAGE_KEY diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc index 3a7bc77318..dade6a516e 100644 --- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc @@ -54,8 +54,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door:: lockall goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen checkitem ITEM_ROOM_1_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_ROOM_1_KEY @@ -69,8 +68,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door:: lockall goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen checkitem ITEM_ROOM_2_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_ROOM_2_KEY @@ -84,8 +82,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door:: lockall goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen checkitem ITEM_ROOM_4_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_ROOM_4_KEY @@ -99,8 +96,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room6Door:: lockall goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen checkitem ITEM_ROOM_6_KEY - compare VAR_RESULT, FALSE - goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked + goto_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT playse SE_PIN removeitem ITEM_ROOM_6_KEY diff --git a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc index cdeb225de2..e9b14b7b0b 100644 --- a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc @@ -17,12 +17,9 @@ AbandonedShip_HiddenFloorRooms_EventScript_DoHiddenItemSparkle:: setvar VAR_TEMP_1, 1 getplayerxy VAR_TEMP_2, VAR_TEMP_3 setvar VAR_TEMP_4, 1 - compare VAR_TEMP_2, 21 - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InMiddleRoomColumn - compare VAR_TEMP_2, 36 - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InRightRoomColumn - compare VAR_TEMP_3, 2 - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InUpperRoomRow + call_if_eq VAR_TEMP_2, 21, AbandonedShip_HiddenFloorRooms_EventScript_InMiddleRoomColumn + call_if_eq VAR_TEMP_2, 36, AbandonedShip_HiddenFloorRooms_EventScript_InRightRoomColumn + call_if_eq VAR_TEMP_3, 2, AbandonedShip_HiddenFloorRooms_EventScript_InUpperRoomRow switch VAR_TEMP_4 case 1, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm1 case 2, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm2 @@ -48,8 +45,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_EnterRm1:: delay 20 dofieldeffectsparkle 10, 10, 0 specialvar VAR_RESULT, FoundAbandonedShipRoom4Key - compare VAR_RESULT, FALSE - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm4KeySparkle + call_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorRooms_EventScript_Rm4KeySparkle waitfieldeffect FLDEFF_SPARKLE delay 10 end @@ -59,11 +55,9 @@ AbandonedShip_HiddenFloorRooms_EventScript_EnterRm2:: AbandonedShip_HiddenFloorRooms_EventScript_EnterRm3:: specialvar VAR_RESULT, FoundAbandonedShipRoom1Key - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm3NoSparkle + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_HiddenFloorRooms_EventScript_Rm3NoSparkle delay 20 - compare VAR_RESULT, FALSE - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm1KeySparkle + call_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorRooms_EventScript_Rm1KeySparkle waitfieldeffect FLDEFF_SPARKLE delay 10 end @@ -76,8 +70,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_EnterRm4:: dofieldeffectsparkle 8, 5, 0 dofieldeffectsparkle 11, 3, 0 specialvar VAR_RESULT, FoundAbandonedShipRoom6Key - compare VAR_RESULT, FALSE - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm6KeySparkle + call_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorRooms_EventScript_Rm6KeySparkle waitfieldeffect FLDEFF_SPARKLE delay 10 end @@ -88,8 +81,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_EnterRm5:: dofieldeffectsparkle 25, 2, 0 dofieldeffectsparkle 24, 6, 0 specialvar VAR_RESULT, FoundAbandonedShipRoom2Key - compare VAR_RESULT, FALSE - call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm2KeySparkle + call_if_eq VAR_RESULT, FALSE, AbandonedShip_HiddenFloorRooms_EventScript_Rm2KeySparkle waitfieldeffect FLDEFF_SPARKLE delay 10 end diff --git a/data/maps/AbandonedShip_Rooms2_1F/scripts.inc b/data/maps/AbandonedShip_Rooms2_1F/scripts.inc index e02d109b7b..b0f317ef28 100644 --- a/data/maps/AbandonedShip_Rooms2_1F/scripts.inc +++ b/data/maps/AbandonedShip_Rooms2_1F/scripts.inc @@ -4,8 +4,7 @@ AbandonedShip_Rooms2_1F_MapScripts:: AbandonedShip_Rooms2_1F_EventScript_Dan:: trainerbattle_double TRAINER_KIRA_AND_DAN_1, AbandonedShip_Rooms2_1F_Text_DanIntro, AbandonedShip_Rooms2_1F_Text_DanDefeat, AbandonedShip_Rooms2_1F_Text_DanNotEnoughMons, AbandonedShip_Rooms2_1F_EventScript_RegisterDan specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_Rooms2_1F_EventScript_DanRematch + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_Rooms2_1F_EventScript_DanRematch msgbox AbandonedShip_Rooms2_1F_Text_DanPostBattle, MSGBOX_DEFAULT release end @@ -24,8 +23,7 @@ AbandonedShip_Rooms2_1F_EventScript_DanRematch:: AbandonedShip_Rooms2_1F_EventScript_Kira:: trainerbattle_double TRAINER_KIRA_AND_DAN_1, AbandonedShip_Rooms2_1F_Text_KiraIntro, AbandonedShip_Rooms2_1F_Text_KiraDefeat, AbandonedShip_Rooms2_1F_Text_KiraNotEnoughMons, AbandonedShip_Rooms2_1F_EventScript_RegisterKira specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_Rooms2_1F_EventScript_KiraRematch + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_Rooms2_1F_EventScript_KiraRematch msgbox AbandonedShip_Rooms2_1F_Text_KiraPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/AbandonedShip_Rooms_1F/scripts.inc b/data/maps/AbandonedShip_Rooms_1F/scripts.inc index 41b4eb3b67..c8ea849640 100644 --- a/data/maps/AbandonedShip_Rooms_1F/scripts.inc +++ b/data/maps/AbandonedShip_Rooms_1F/scripts.inc @@ -13,8 +13,7 @@ AbandonedShip_Rooms_1F_EventScript_Demetrius:: AbandonedShip_Rooms_1F_EventScript_Thalia:: trainerbattle_single TRAINER_THALIA_1, AbandonedShip_Rooms_1F_Text_ThaliaIntro, AbandonedShip_Rooms_1F_Text_ThaliaDefeat, AbandonedShip_Rooms_1F_EventScript_RegisterThalia specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq AbandonedShip_Rooms_1F_EventScript_ThaliaRematch + goto_if_eq VAR_RESULT, TRUE, AbandonedShip_Rooms_1F_EventScript_ThaliaRematch msgbox AbandonedShip_Rooms_1F_Text_ThaliaPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index 03070a731e..d28ac7bc35 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -10,8 +10,7 @@ AncientTomb_OnResume: AncientTomb_EventScript_TryRemoveRegisteel:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -68,12 +67,9 @@ AncientTomb_EventScript_Registeel:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AncientTomb_EventScript_DefeatedRegisteel - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AncientTomb_EventScript_RanFromRegisteel - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AncientTomb_EventScript_RanFromRegisteel + goto_if_eq VAR_RESULT, B_OUTCOME_WON, AncientTomb_EventScript_DefeatedRegisteel + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, AncientTomb_EventScript_RanFromRegisteel + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, AncientTomb_EventScript_RanFromRegisteel setflag FLAG_DEFEATED_REGISTEEL release end diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc index 2a6f156e5c..4f2eb836f5 100644 --- a/data/maps/AquaHideout_B1F/scripts.inc +++ b/data/maps/AquaHideout_B1F/scripts.inc @@ -9,8 +9,7 @@ AquaHideout_B1F_OnResume: AquaHideout_B1F_EventScript_TryRemoveElectrode:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -39,12 +38,9 @@ AquaHideout_B1F_EventScript_Electrode1:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, AquaHideout_B1F_EventScript_DefeatedElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, AquaHideout_B1F_EventScript_DefeatedElectrode1 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, AquaHideout_B1F_EventScript_DefeatedElectrode1 setflag FLAG_DEFEATED_ELECTRODE_1_AQUA_HIDEOUT release end @@ -66,12 +62,9 @@ AquaHideout_B1F_EventScript_Electrode2:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq AquaHideout_B1F_EventScript_DefeatedElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, AquaHideout_B1F_EventScript_DefeatedElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, AquaHideout_B1F_EventScript_DefeatedElectrode2 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, AquaHideout_B1F_EventScript_DefeatedElectrode2 setflag FLAG_DEFEATED_ELECTRODE_2_AQUA_HIDEOUT release end diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc index 36e7a8d11a..844ec070a6 100644 --- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc @@ -28,10 +28,8 @@ BattleFrontier_BattleArenaBattleRoom_OnTransition: BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxFemale return BattleFrontier_BattleArenaBattleRoom_EventScript_SetPlayerGfxMale:: @@ -52,8 +50,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleArenaBattleRoom_EventScript_AnnounceTrainers applymovement LOCALID_ATTENDANT, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceDown applymovement LOCALID_PLAYER, BattleFrontier_BattleArenaBattleRoom_Movement_WalkInPlaceLeft setvar VAR_TEMP_2, 1 @@ -137,24 +134,16 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedOpponent:: BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponent:: frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleArenaBattleRoom_EventScript_TycoonUpNext + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleArenaBattleRoom_EventScript_TycoonUpNext frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor3rdOpponent - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor4thOpponent - compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor5thOpponent - compare VAR_RESULT, 5 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor6thOpponent - compare VAR_RESULT, 6 - call_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor7thOpponent + call_if_eq VAR_RESULT, 1, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 3, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor4thOpponent + call_if_eq VAR_RESULT, 4, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor5thOpponent + call_if_eq VAR_RESULT, 5, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor6thOpponent + call_if_eq VAR_RESULT, 6, BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponentNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_ContinueChallenge @@ -254,16 +243,14 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_PauseChallenge:: end BattleFrontier_BattleArenaBattleRoom_EventScript_TycoonUpNext:: - compare VAR_TEMP_2, 1 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon + goto_if_eq VAR_TEMP_2, 1, BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon msgbox BattleFrontier_BattleArenaBattleRoom_Text_NowFaceTycoon, MSGBOX_DEFAULT setvar VAR_TEMP_2, 1 BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoon:: message BattleFrontier_BattleArenaBattleRoom_Text_PreparedForTycoon waitmessage call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoonNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleArenaBattleRoom_EventScript_AskReadyForTycoonNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta @@ -309,8 +296,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaYoureChallenger, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH @@ -324,15 +310,13 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGreta:: BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaSilver:: msgbox BattleFrontier_BattleArenaBattleRoom_Text_IgniteMyPassionForBattle, MSGBOX_DEFAULT call BattleFrontier_BattleArenaBattleRoom_EventScript_StartArenaBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver goto BattleFrontier_BattleArenaBattleRoom_EventScript_DeclareOpponentWinner BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver:: call BattleFrontier_BattleArenaBattleRoom_EventScript_DeclarePlayerWinner frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForwardLong waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaYoureToughAfterAll, MSGBOX_DEFAULT @@ -346,8 +330,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaSilver:: BattleFrontier_BattleArenaBattleRoom_EventScript_IntroGretaGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaLookingForwardToSeeingAgain, MSGBOX_DEFAULT closemessage frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH @@ -361,15 +344,13 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_IntroGretaGold:: BattleFrontier_BattleArenaBattleRoom_EventScript_BattleGretaGold:: msgbox BattleFrontier_BattleArenaBattleRoom_Text_LetsGetThisStarted, MSGBOX_DEFAULT call BattleFrontier_BattleArenaBattleRoom_EventScript_StartArenaBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaGold goto BattleFrontier_BattleArenaBattleRoom_EventScript_DeclareOpponentWinner BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedGretaGold:: call BattleFrontier_BattleArenaBattleRoom_EventScript_DeclarePlayerWinner frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon applymovement LOCALID_OPPONENT, BattleFrontier_BattleArenaBattleRoom_Movement_OpponentStepForwardLong waitmovement 0 msgbox BattleFrontier_BattleArenaBattleRoom_Text_GretaBlownAway, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc index e6394d2a80..9467f34197 100644 --- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc @@ -40,8 +40,7 @@ BattleFrontier_BattleArenaLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattleArenaLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_DefeatedTycoon + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleArenaLobby_EventScript_DefeatedTycoon msgbox BattleFrontier_BattleArenaLobby_Text_CongratsOnSevenWins, MSGBOX_DEFAULT goto BattleFrontier_BattleArenaLobby_EventScript_GiveBattlePoints @@ -80,8 +79,7 @@ BattleFrontier_BattleArenaLobby_EventScript_SaveAfterChallenge:: playse SE_SAVE waitse call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_EndSaveAfterChallenge + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleArenaLobby_EventScript_EndSaveAfterChallenge message BattleFrontier_BattleArenaLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -131,8 +129,7 @@ BattleFrontier_BattleArenaLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleArenaLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleArenaLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleArenaLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleArenaLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -141,8 +138,7 @@ BattleFrontier_BattleArenaLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge msgbox BattleFrontier_BattleArenaLobby_Text_OkayToSave, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge @@ -161,18 +157,15 @@ BattleFrontier_BattleArenaLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleArenaLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleArenaLobby_EventScript_CancelChallengeSaveFailed BattleFrontier_BattleArenaLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE msgbox BattleFrontier_BattleArenaLobby_Text_GuideYouToArena, MSGBOX_DEFAULT closemessage frontier_get FRONTIER_DATA_LVL_MODE - compare VAR_RESULT, FRONTIER_LVL_50 - call_if_eq BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLv50 - compare VAR_RESULT, FRONTIER_LVL_OPEN - call_if_eq BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLvOpen + call_if_eq VAR_RESULT, FRONTIER_LVL_50, BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLv50 + call_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLvOpen warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR, 9, 13 setvar VAR_TEMP_0, 0 waitstate diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index 8fc07f59ab..888f116eea 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -20,17 +20,14 @@ BattleFrontier_BattleDomeBattleRoom_OnTransition: dome_setopponentgfx frontier_get FRONTIER_DATA_BATTLE_NUM copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, DOME_ROUND1 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_SetWalkingAudienceMemberPos + call_if_eq VAR_RESULT, DOME_ROUND1, BattleFrontier_BattleDomeBattleRoom_EventScript_SetWalkingAudienceMemberPos call BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfx end BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxFemale return BattleFrontier_BattleDomeBattleRoom_EventScript_SetPlayerGfxMale:: @@ -48,18 +45,15 @@ BattleFrontier_BattleDomeBattleRoom_OnFrame: BattleFrontier_BattleDomeBattleRoom_EventScript_EnterRoom:: lockall call BattleFrontier_BattleDomeBattleRoom_EventScript_GetRoundNum - compare VAR_RESULT, DOME_ROUND1 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_TryDoAudienceMemberWalkToSeat + call_if_eq VAR_RESULT, DOME_ROUND1, BattleFrontier_BattleDomeBattleRoom_EventScript_TryDoAudienceMemberWalkToSeat applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 call BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayer msgbox BattleFrontier_BattleDomeBattleRoom_Text_PlayerHasEnteredDome, MSGBOX_DEFAULT closemessage showobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM - compare VAR_TEMP_F, DOME_FINAL - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnter - compare VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnterForTucker + goto_if_ne VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnter + goto_if_ne VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnterForTucker BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerEnter:: applymovement LOCALID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_PlayerEnter goto BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceReactToPlayer @@ -70,10 +64,8 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceReactToPlayer:: playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround waitmovement 0 - compare VAR_TEMP_F, DOME_FINAL - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_BattleOpponent - compare VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_AnnounceTucker + goto_if_ne VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleOpponent + goto_if_ne VAR_TEMP_E, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnounceTucker BattleFrontier_BattleDomeBattleRoom_EventScript_BattleOpponent:: dome_getopponentname msgbox BattleFrontier_BattleDomeBattleRoom_Text_PlayerVersusTrainer, MSGBOX_DEFAULT @@ -105,8 +97,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_Draw:: delay 180 applymovement LOCALID_REFEREE, BattleFrontier_BattleDomeBattleRoom_Movement_RefereeExit waitmovement 0 - compare VAR_TEMP_2, DRAW_TUCKER @ Tucker always wins on a draw - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_LostToOpponent + goto_if_eq VAR_TEMP_2, DRAW_TUCKER, BattleFrontier_BattleDomeBattleRoom_EventScript_LostToOpponent @ Tucker always wins on a draw dome_compareseeds switch VAR_RESULT case 1, BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent @@ -114,12 +105,9 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_LostToOpponent:: applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 dome_getopponentname - compare VAR_TEMP_2, NO_DRAW - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWon - compare VAR_TEMP_2, DRAW_TRAINER - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWonDraw - compare VAR_TEMP_2, DRAW_TUCKER - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerWonDraw + call_if_eq VAR_TEMP_2, NO_DRAW, BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWon + call_if_eq VAR_TEMP_2, DRAW_TRAINER, BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWonDraw + call_if_eq VAR_TEMP_2, DRAW_TUCKER, BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerWonDraw playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround delay 60 @@ -149,10 +137,8 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerWonDraw:: BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent:: applymovement LOCALID_ANNOUNCER, Common_Movement_WalkInPlaceDown waitmovement 0 - compare VAR_TEMP_2, NO_DRAW - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWon - compare VAR_TEMP_2, DRAW_TRAINER - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWonDraw + call_if_eq VAR_TEMP_2, NO_DRAW, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWon + call_if_eq VAR_TEMP_2, DRAW_TRAINER, BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWonDraw playse SE_M_ENCORE2 call BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround delay 60 @@ -196,14 +182,11 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_PlayerWonDraw:: BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayer:: dome_get DOME_DATA_ATTEMPTED_CHALLENGE - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerFirstAttempt + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerFirstAttempt dome_get DOME_DATA_HAS_WON_CHALLENGE - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerNeverWon + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerNeverWon dome_get DOME_DATA_WIN_STREAK_ACTIVE - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerBrokenStreak + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerBrokenStreak goto BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerChampion return @@ -266,8 +249,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerNeverWonFinal:: return BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerChampion:: - compare VAR_TEMP_F, DOME_FINAL - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerChampionNoTucker + goto_if_ne VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerChampionNoTucker switch VAR_TEMP_E case FRONTIER_BRAIN_SILVER, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerPreTuckerSilver case FRONTIER_BRAIN_GOLD, BattleFrontier_BattleDomeBattleRoom_EventScript_AnnouncePlayerPreTuckerGold @@ -387,8 +369,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerEnter:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver msgbox BattleFrontier_BattleDomeBattleRoom_Text_TuckerSilverIntro, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver:: @@ -401,8 +382,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver:: msgbox BattleFrontier_BattleDomeBattleRoom_Text_IncredibleVictorIsPlayer, MSGBOX_DEFAULT dome_resolvewinners DOME_PLAYER_WON_MATCH frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney closemessage applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerApproachPlayer waitmovement 0 @@ -417,8 +397,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerSilver:: BattleFrontier_BattleDomeBattleRoom_EventScript_TuckerGoldIntro:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold msgbox BattleFrontier_BattleDomeBattleRoom_Text_TuckerGoldIntro, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold:: @@ -431,8 +410,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_BattleTuckerGold:: msgbox BattleFrontier_BattleDomeBattleRoom_Text_IncredibleVictorIsPlayer, MSGBOX_DEFAULT dome_resolvewinners DOME_PLAYER_WON_MATCH frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney closemessage applymovement LOCALID_OPPONENT, BattleFrontier_BattleDomeBattleRoom_Movement_TuckerApproachPlayer waitmovement 0 @@ -490,12 +468,10 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeBattleRoom_Movement_SetInvisible frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, DOME_FINAL - goto_if_ne BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects + goto_if_ne VAR_RESULT, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects frontier_getbrainstatus copyvar VAR_TEMP_E, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects + goto_if_eq VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects call BattleFrontier_EventScript_SetBrainObjectGfx setobjectxyperm LOCALID_OPPONENT, 13, 9 removeobject LOCALID_OPPONENT @@ -505,8 +481,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_EndSetUpObjects:: end BattleFrontier_BattleDomeBattleRoom_OnResume: - compare VAR_TEMP_9, 1 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_CallAddAudience + call_if_eq VAR_TEMP_9, 1, BattleFrontier_BattleDomeBattleRoom_EventScript_CallAddAudience end BattleFrontier_BattleDomeBattleRoom_EventScript_CallAddAudience:: @@ -515,14 +490,10 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_CallAddAudience:: @ Add audience members to supplement the permanent object event audience BattleFrontier_BattleDomeBattleRoom_EventScript_AddAudience:: - compare VAR_TEMP_F, DOME_ROUND1 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound1Audience - compare VAR_TEMP_F, DOME_ROUND2 - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound2Audience - compare VAR_TEMP_F, DOME_SEMIFINAL - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AddSemifinalAudience - compare VAR_TEMP_F, DOME_FINAL - call_if_eq BattleFrontier_BattleDomeBattleRoom_EventScript_AddFinalAudience + call_if_eq VAR_TEMP_F, DOME_ROUND1, BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound1Audience + call_if_eq VAR_TEMP_F, DOME_ROUND2, BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound2Audience + call_if_eq VAR_TEMP_F, DOME_SEMIFINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_AddSemifinalAudience + call_if_eq VAR_TEMP_F, DOME_FINAL, BattleFrontier_BattleDomeBattleRoom_EventScript_AddFinalAudience return BattleFrontier_BattleDomeBattleRoom_EventScript_AddRound1Audience:: @@ -883,8 +854,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_AudienceLookAround:: BattleFrontier_BattleDomeBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE - compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 5, 11 waitstate end @@ -898,15 +868,13 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles:: BattleFrontier_BattleDomeBattleRoom_EventScript_SetWalkingAudienceMemberPos:: random 2 copyvar VAR_TEMP_D, VAR_RESULT - compare VAR_TEMP_D, 0 - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_TEMP_D, 0, Common_EventScript_NopReturn setobjectxyperm LOCALID_AUDIENCE_WALKING, 2, 0 setobjectmovementtype LOCALID_AUDIENCE_WALKING, MOVEMENT_TYPE_FACE_RIGHT return BattleFrontier_BattleDomeBattleRoom_EventScript_TryDoAudienceMemberWalkToSeat:: - compare VAR_TEMP_D, 0 - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_TEMP_D, 0, Common_EventScript_NopReturn applymovement LOCALID_AUDIENCE_WALKING, BattleFrontier_BattleDomeBattleRoom_Movement_AudienceMemberWalkToSeat return diff --git a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc index 2466944390..d286dc8681 100644 --- a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc @@ -12,8 +12,7 @@ BattleFrontier_BattleDomeCorridor_EventScript_EnterCorridor:: delay 16 setvar VAR_TEMP_0, 1 frontier_get FRONTIER_DATA_LVL_MODE - compare VAR_RESULT, FRONTIER_LVL_OPEN - goto_if_eq BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen + goto_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen applymovement LOCALID_ATTENDANT, BattleFrontier_BattleDomeCorridor_Movement_AttendantWalkToDoorLv50 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeCorridor_Movement_PlayerWalkToDoorLv50 waitmovement 0 diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc index ae82a55588..b972a0814c 100644 --- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc @@ -48,8 +48,7 @@ BattleFrontier_BattleDomeLobby_EventScript_WonChallenge:: call BattleFrontier_EventScript_IncrementWinStreak lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_DefeatedAce + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleDomeLobby_EventScript_DefeatedAce msgbox BattleFrontier_BattleDomeLobby_Text_CongratsForWinningTourney, MSGBOX_DEFAULT goto BattleFrontier_BattleDomeLobby_EventScript_GiveBattlePoints @@ -88,8 +87,7 @@ BattleFrontier_BattleDomeLobby_EventScript_AskRecordBattle:: playse SE_SAVE waitse call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_EndChallenge + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleDomeLobby_EventScript_EndChallenge message BattleFrontier_BattleDomeLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -137,15 +135,11 @@ BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendant:: BattleFrontier_BattleDomeLobby_EventScript_AttendantWelcome:: special SavePlayerParty - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_WelcomeSingles - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_WelcomeDoubles + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_WelcomeSingles + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_WelcomeDoubles BattleFrontier_BattleDomeLobby_EventScript_AskTakeChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_TakeSinglesChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_TakeDoublesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_TakeSinglesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_TakeDoublesChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, FALSE switch VAR_RESULT @@ -162,8 +156,7 @@ BattleFrontier_BattleDomeLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleDomeLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleDomeLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleDomeLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -172,8 +165,7 @@ BattleFrontier_BattleDomeLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleDomeLobby_Text_OkayToSaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge @@ -191,8 +183,7 @@ BattleFrontier_BattleDomeLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleDomeLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomeLobby_EventScript_CancelChallengeSaveFailed dome_inittrainers BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge:: special SavePlayerParty @@ -208,10 +199,8 @@ BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge:: end BattleFrontier_BattleDomeLobby_EventScript_ExplainChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_ExplainSinglesChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_ExplainDoublesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_ExplainSinglesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_ExplainDoublesChallenge goto BattleFrontier_BattleDomeLobby_EventScript_AskTakeChallenge BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMons:: @@ -240,27 +229,19 @@ BattleFrontier_BattleDomeLobby_EventScript_EndCancelChallenge:: end BattleFrontier_BattleDomeLobby_EventScript_WalkToDoor:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantWalkToDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantWalkToDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantWalkToDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantWalkToDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeLobby_Movement_WalkToDoor waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_OpenSinglesDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_OpenDoublesDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_OpenSinglesDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_OpenDoublesDoor waitdooranim - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantEnterDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantEnterDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendantEnterDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_DoublesAttendantEnterDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomeLobby_Movement_PlayerEnterDoor waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_CloseSinglesDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_CloseDoublesDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleDomeLobby_EventScript_CloseSinglesDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleDomeLobby_EventScript_CloseDoublesDoor waitdooranim return @@ -357,14 +338,10 @@ BattleFrontier_BattleDomeLobby_EventScript_ShowDoublesResults:: BattleFrontier_BattleDomeLobby_EventScript_ShowPrevTourneyTree:: dome_get DOME_DATA_PREV_TOURNEY_TYPE - compare VAR_RESULT, 0 - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsSinglesLv50 - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsDoublesLv50 - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsSinglesLvOpen - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsDoublesLvOpen + call_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsSinglesLv50 + call_if_eq VAR_RESULT, 1, BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsDoublesLv50 + call_if_eq VAR_RESULT, 2, BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsSinglesLvOpen + call_if_eq VAR_RESULT, 3, BattleFrontier_BattleDomeLobby_EventScript_PrevTourneyResultsDoublesLvOpen fadescreen FADE_TO_BLACK dome_showprevtourneytree waitstate diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc index da5b4371ad..6ca4296cc0 100644 --- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc @@ -19,8 +19,7 @@ BattleFrontier_BattleDomePreBattleRoom_OnFrame: .2byte 0 BattleFrontier_BattleDomePreBattleRoom_EventScript_EnterRoom:: - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_ReturnFromBattle + goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleDomePreBattleRoom_EventScript_ReturnFromBattle frontier_set FRONTIER_DATA_RECORD_DISABLED, TRUE setvar VAR_TEMP_0, 1 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleDomePreBattleRoom_Movement_PlayerEnter @@ -31,8 +30,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRound:: waitmessage switch VAR_RESULT @ No case? call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRoundNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRoundNoRecord multichoice 16, 0, MULTI_TOURNEY_WITH_RECORD, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_ShowOpponentInfo @@ -146,8 +144,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_ContinueChallenge:: special ChoosePartyForBattleFrontier waitstate frontier_resetsketch - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRound + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomePreBattleRoom_EventScript_AskReadyForNextRound dome_set DOME_DATA_SELECTED_MONS dome_reduceparty dome_setopponent diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc index b0529153e3..cf44e3118e 100644 --- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc @@ -19,14 +19,11 @@ BattleFrontier_BattleFactoryBattleRoom_MapScripts:: BattleFrontier_BattleFactoryBattleRoom_OnTransition: frontier_settrainers checkplayergender - compare VAR_RESULT, MALE - call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale + call_if_eq VAR_RESULT, MALE, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale + call_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj end BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj:: @@ -41,8 +38,7 @@ BattleFrontier_BattleFactoryBattleRoom_OnWarp: BattleFrontier_BattleFactoryBattleRoom_EventScript_HideObjects:: setvar VAR_TEMP_1, 1 hideobjectat OBJ_EVENT_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM - compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects + goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects hideobjectat LOCALID_OPPONENT, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects:: end @@ -71,8 +67,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle:: end BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom:: - compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle + goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom waitmovement 0 @@ -84,8 +79,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter waitmovement 0 BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent:: - compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland + goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland palace_getopponentintro lockall msgbox gStringVar4, MSGBOX_DEFAULT @@ -105,8 +99,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost:: BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedOpponent:: factory_get FACTORY_DATA_WIN_STREAK_SWAPS - compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak + goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak addvar VAR_RESULT, 1 setorcopyvar VAR_0x8006, VAR_RESULT factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above @@ -131,21 +124,18 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandImFactoryHead, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver:: msgbox BattleFrontier_BattleFactoryBattleRoom_Text_ShakeOutKnowledgeBringItOn, MSGBOX_DEFAULT call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver:: frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandLetsSeeFrontierPass, MSGBOX_DEFAULT closemessage applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland @@ -160,21 +150,18 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver:: BattleFrontier_BattleFactoryBattleRoom_EventScript_IntroNolandGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold msgbox BattleFrontier_BattleFactoryBattleRoom_Text_HarderLookThanLastTime, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold:: msgbox BattleFrontier_BattleFactoryBattleRoom_Text_AllRightBringItOn, MSGBOX_DEFAULT call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold:: frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland msgbox BattleFrontier_BattleFactoryBattleRoom_Text_OutOfMyLeagueLetsSeePass, MSGBOX_DEFAULT waitmessage applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland @@ -199,14 +186,12 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle:: BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland:: factory_get FACTORY_DATA_WIN_STREAK_SWAPS - compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak + goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak addvar VAR_RESULT, 1 setorcopyvar VAR_0x8006, VAR_RESULT factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above factory_get FACTORY_DATA_WIN_STREAK - compare VAR_RESULT, MAX_STREAK - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum + goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum addvar VAR_RESULT, 1 factory_set FACTORY_DATA_WIN_STREAK, VAR_RESULT frontier_get FRONTIER_DATA_BATTLE_NUM @@ -245,8 +230,7 @@ BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle: BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE - compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 4, 8 waitstate end diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc index da36d96e25..682b2c91d1 100644 --- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc @@ -43,8 +43,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattleFactoryLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_DefeatedFactoryHead + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryLobby_EventScript_DefeatedFactoryHead msgbox BattleFrontier_BattleFactoryLobby_Text_CongratsSevenWins, MSGBOX_DEFAULT waitmessage goto BattleFrontier_BattleFactoryLobby_EventScript_GiveBattlePoints @@ -79,8 +78,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_LostChallenge:: BattleFrontier_BattleFactoryLobby_EventScript_AskRecordBattle:: call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle message BattleFrontier_BattleFactoryLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -126,15 +124,11 @@ BattleFrontier_BattleFactoryLobby_EventScript_DoublesAttendant:: BattleFrontier_BattleFactoryLobby_EventScript_Attendant:: special SavePlayerParty - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForSingleBattle - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForDoubleBattle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForSingleBattle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_WelcomeForDoubleBattle BattleFrontier_BattleFactoryLobby_EventScript_AskTakeChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TakeSinglesChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TakeDoublesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_TakeSinglesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_TakeDoublesChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, FALSE switch VAR_RESULT @@ -167,17 +161,14 @@ BattleFrontier_BattleFactoryLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed setvar VAR_0x8006, 0 BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge:: special SavePlayerParty msgbox BattleFrontier_BattleFactoryLobby_Text_StepThisWay, MSGBOX_DEFAULT closemessage - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TalkedToSinglesAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_TalkedToSinglesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant applymovement VAR_LAST_TALKED, BattleFrontier_BattleFactoryLobby_Movement_AttendantEnterDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor waitmovement 0 @@ -195,10 +186,8 @@ BattleFrontier_BattleFactoryLobby_EventScript_TalkedToDoublesAttendant:: return BattleFrontier_BattleFactoryLobby_EventScript_ExplainChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_ExplainSinglesChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleFactoryLobby_EventScript_ExplainDoublesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleFactoryLobby_EventScript_ExplainSinglesChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryLobby_EventScript_ExplainDoublesChallenge goto BattleFrontier_BattleFactoryLobby_EventScript_AskTakeChallenge BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed:: diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc index f83b77fbbf..d54cf83570 100644 --- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc @@ -11,8 +11,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_OnWarp: BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 - compare VAR_0x8006, 1 - goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth + goto_if_ne VAR_0x8006, 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth setobjectxy LOCALID_ATTENDANT, 8, 7 turnobject LOCALID_ATTENDANT, DIR_SOUTH BattleFrontier_BattleFactoryPreBattleRoom_EventScript_TurnPlayerNorth:: @@ -24,14 +23,12 @@ BattleFrontier_BattleFactoryPreBattleRoom_OnFrame: .2byte 0 BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterRoom:: - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle + goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle setvar VAR_TEMP_0, 1 applymovement LOCALID_ATTENDANT, BattleFrontier_BattleFactoryPreBattleRoom_Movement_AttendantEnterRoom applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryPreBattleRoom_Movement_PlayerEnterRoom waitmovement 0 - compare VAR_0x8006, 2 - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge + goto_if_eq VAR_0x8006, 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge factory_generaterentalmons factory_generateopponentmons factory_getopponentmontype @@ -49,10 +46,8 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom:: msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_RightThisWay, MSGBOX_DEFAULT closemessage call BattleFrontier_EventScript_GetLvlMode - compare VAR_RESULT, FRONTIER_LVL_50 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLv50 - compare VAR_RESULT, FRONTIER_LVL_OPEN - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen + call_if_eq VAR_RESULT, FRONTIER_LVL_50, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLv50 + call_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen waitmovement 0 warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 6, 11 waitstate @@ -66,8 +61,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle:: waitfanfare special HealPlayerParty frontier_getbrainstatus - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForRegularOpponent + goto_if_eq VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForRegularOpponent playse SE_POKENAV_CALL waitse msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_WaitFewMoments, MSGBOX_DEFAULT @@ -86,25 +80,17 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReturnToRoomFromBattle:: BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponent:: frontier_getbrainstatus - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForRegularOpponent:: frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor3rdOpponent - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor4thOpponent - compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor5thOpponent - compare VAR_RESULT, 5 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor6thOpponent - compare VAR_RESULT, 6 - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor7thOpponent + call_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 3, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor4thOpponent + call_if_eq VAR_RESULT, 4, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor5thOpponent + call_if_eq VAR_RESULT, 5, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor6thOpponent + call_if_eq VAR_RESULT, 6, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponentNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapMon @@ -168,8 +154,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons:: fadescreen FADE_TO_BLACK factory_swapmons waitstate - compare VAR_RESULT, TRUE @ Did player keep current pokemon - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom @ Did player keep current pokemon factory_setswapped msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT goto BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom @@ -223,42 +208,24 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_ResumeChallenge:: BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentType:: msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_InvestigatedUpcomingOpponent, MSGBOX_DEFAULT - compare VAR_0x8005, TYPE_NORMAL - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesNormal - compare VAR_0x8005, TYPE_FIGHTING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFighting - compare VAR_0x8005, TYPE_FLYING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFlying - compare VAR_0x8005, TYPE_POISON - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPoison - compare VAR_0x8005, TYPE_GROUND - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGround - compare VAR_0x8005, TYPE_ROCK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesRock - compare VAR_0x8005, TYPE_BUG - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesBug - compare VAR_0x8005, TYPE_GHOST - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGhost - compare VAR_0x8005, TYPE_STEEL - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesSteel - compare VAR_0x8005, TYPE_FIRE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFire - compare VAR_0x8005, TYPE_WATER - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesWater - compare VAR_0x8005, TYPE_GRASS - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGrass - compare VAR_0x8005, TYPE_ELECTRIC - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesElectric - compare VAR_0x8005, TYPE_PSYCHIC - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPsychic - compare VAR_0x8005, TYPE_ICE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesIce - compare VAR_0x8005, TYPE_DRAGON - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDragon - compare VAR_0x8005, TYPE_DARK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDark - compare VAR_0x8005, NUMBER_OF_MON_TYPES - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonType + call_if_eq VAR_0x8005, TYPE_NORMAL, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesNormal + call_if_eq VAR_0x8005, TYPE_FIGHTING, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFighting + call_if_eq VAR_0x8005, TYPE_FLYING, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFlying + call_if_eq VAR_0x8005, TYPE_POISON, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPoison + call_if_eq VAR_0x8005, TYPE_GROUND, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGround + call_if_eq VAR_0x8005, TYPE_ROCK, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesRock + call_if_eq VAR_0x8005, TYPE_BUG, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesBug + call_if_eq VAR_0x8005, TYPE_GHOST, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGhost + call_if_eq VAR_0x8005, TYPE_STEEL, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesSteel + call_if_eq VAR_0x8005, TYPE_FIRE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesFire + call_if_eq VAR_0x8005, TYPE_WATER, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesWater + call_if_eq VAR_0x8005, TYPE_GRASS, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesGrass + call_if_eq VAR_0x8005, TYPE_ELECTRIC, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesElectric + call_if_eq VAR_0x8005, TYPE_PSYCHIC, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesPsychic + call_if_eq VAR_0x8005, TYPE_ICE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesIce + call_if_eq VAR_0x8005, TYPE_DRAGON, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDragon + call_if_eq VAR_0x8005, TYPE_DARK, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesDark + call_if_eq VAR_0x8005, NUMBER_OF_MON_TYPES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonType return BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentUsesNormal:: @@ -334,24 +301,15 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_OpponentHasNoMostCommonTyp return BattleFrontier_BattleFactoryPreBattleRoom_EventScript_CommentOnOpponentStyle:: - compare VAR_0x8006, FACTORY_STYLE_NONE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleUnrestrained - compare VAR_0x8006, FACTORY_STYLE_PREPARATION - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleTotalPreparation - compare VAR_0x8006, FACTORY_STYLE_SLOW_STEADY - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleSlowAndSteady - compare VAR_0x8006, FACTORY_STYLE_ENDURANCE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleEndurance - compare VAR_0x8006, FACTORY_STYLE_HIGH_RISK - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleHighRisk - compare VAR_0x8006, FACTORY_STYLE_WEAKENING - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleWeakenFoe - compare VAR_0x8006, FACTORY_STYLE_UNPREDICTABLE - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleImpossibleToPredict - compare VAR_0x8006, FACTORY_STYLE_WEATHER - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleDependsOnFlow - compare VAR_0x8006, FACTORY_NUM_STYLES - call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleFlexible + call_if_eq VAR_0x8006, FACTORY_STYLE_NONE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleUnrestrained + call_if_eq VAR_0x8006, FACTORY_STYLE_PREPARATION, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleTotalPreparation + call_if_eq VAR_0x8006, FACTORY_STYLE_SLOW_STEADY, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleSlowAndSteady + call_if_eq VAR_0x8006, FACTORY_STYLE_ENDURANCE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleEndurance + call_if_eq VAR_0x8006, FACTORY_STYLE_HIGH_RISK, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleHighRisk + call_if_eq VAR_0x8006, FACTORY_STYLE_WEAKENING, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleWeakenFoe + call_if_eq VAR_0x8006, FACTORY_STYLE_UNPREDICTABLE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleImpossibleToPredict + call_if_eq VAR_0x8006, FACTORY_STYLE_WEATHER, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleDependsOnFlow + call_if_eq VAR_0x8006, FACTORY_NUM_STYLES, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleFlexible return BattleFrontier_BattleFactoryPreBattleRoom_EventScript_StyleUnrestrained:: @@ -394,8 +352,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHead:: message BattleFrontier_BattleFactoryPreBattleRoom_Text_PreparedToFaceHead waitmessage call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHeadNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskReadyForHeadNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleFactoryPreBattleRoom_EventScript_AskSwapBeforeHead diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc index 1d46ea0440..2e9366d44b 100644 --- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc @@ -21,10 +21,8 @@ BattleFrontier_BattlePalaceBattleRoom_OnTransition: BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattlePalaceBattleRoom_EventScript_SetPlayerGfxFemale return @ The opponent's gfx are set to the players by default @@ -45,8 +43,7 @@ BattleFrontier_BattlePalaceBattleRoom_OnFrame: BattleFrontier_BattlePalaceBattleRoom_EventScript_EnterRoom:: showobjectat LOCALID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_BeginChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_BeginChallenge applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_PlayerReturnToChallenge waitmovement 0 applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown @@ -95,24 +92,16 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedOpponent:: BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponent:: frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_MavenUpNext + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattlePalaceBattleRoom_EventScript_MavenUpNext frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor3rdOpponent - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor4thOpponent - compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor5thOpponent - compare VAR_RESULT, 5 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor6thOpponent - compare VAR_RESULT, 6 - call_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor7thOpponent + call_if_eq VAR_RESULT, 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 3, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor4thOpponent + call_if_eq VAR_RESULT, 4, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor5thOpponent + call_if_eq VAR_RESULT, 5, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor6thOpponent + call_if_eq VAR_RESULT, 6, BattleFrontier_BattlePalaceBattleRoom_EventScript_ReadyFor7thOpponent call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponentNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_ContinueChallenge @@ -179,16 +168,14 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_PauseChallenge:: end BattleFrontier_BattlePalaceBattleRoom_EventScript_MavenUpNext:: - compare VAR_TEMP_2, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven + goto_if_eq VAR_TEMP_2, 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven msgbox BattleFrontier_BattlePalaceBattleRoom_Text_ChallengingPalaceMaven, MSGBOX_DEFAULT setvar VAR_TEMP_2, 1 BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMaven:: message BattleFrontier_BattlePalaceBattleRoom_Text_ReadyForPalaceMaven waitmessage call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMavenNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePalaceBattleRoom_EventScript_AskReadyForMavenNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenser @@ -225,22 +212,19 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenser:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserFirstIntro, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserSilver:: msgbox BattleFrontier_BattlePalaceBattleRoom_Text_ProveYourBondWithMons, MSGBOX_DEFAULT call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver:: palace_incrementstreak frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserPostSilverBattle, MSGBOX_DEFAULT applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown @@ -260,22 +244,19 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserSilver:: BattleFrontier_BattlePalaceBattleRoom_EventScript_IntroSpenserGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserThisTimeWontHoldBack, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattlePalaceBattleRoom_EventScript_BattleSpenserGold:: msgbox BattleFrontier_BattlePalaceBattleRoom_Text_Kaaah, MSGBOX_DEFAULT call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold goto BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyLost BattleFrontier_BattlePalaceBattleRoom_EventScript_DefeatedSpenserGold:: palace_incrementstreak frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SpenserYourTeamIsAdmirable, MSGBOX_DEFAULT applymovement LOCALID_PLAYER, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceUp applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceBattleRoom_Movement_FaceDown @@ -417,8 +398,7 @@ BattleFrontier_BattlePalaceBattleRoom_Movement_UnusedOpponentEnter3: BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE - compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 5, 7 waitstate end diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc index 68de944c09..ad2a2ee9f5 100644 --- a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc @@ -15,20 +15,14 @@ BattleFrontier_BattlePalaceCorridor_EventScript_WalkThroughCorridor:: waitmovement 0 lockall palace_getcomment - compare VAR_RESULT, 0 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment1 - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment2 - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment3 - compare VAR_RESULT, 3 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_StreakComment - compare VAR_RESULT, 4 - call_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_LongStreakComment + call_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment1 + call_if_eq VAR_RESULT, 1, BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment2 + call_if_eq VAR_RESULT, 2, BattleFrontier_BattlePalaceCorridor_EventScript_RandomComment3 + call_if_eq VAR_RESULT, 3, BattleFrontier_BattlePalaceCorridor_EventScript_StreakComment + call_if_eq VAR_RESULT, 4, BattleFrontier_BattlePalaceCorridor_EventScript_LongStreakComment closemessage frontier_get FRONTIER_DATA_LVL_MODE - compare VAR_RESULT, FRONTIER_LVL_OPEN - goto_if_eq BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom + goto_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePalaceCorridor_Movement_AttendantWalkTo50BattleRoom applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceCorridor_Movement_PlayerWalkTo50BattleRoom waitmovement 0 diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc index 0bd08ae44b..481f7000db 100644 --- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc @@ -41,8 +41,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_DefeatedMaven + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePalaceLobby_EventScript_DefeatedMaven msgbox BattleFrontier_BattlePalaceLobby_Text_FirmTrueBondsFor7WinStreak, MSGBOX_DEFAULT goto BattleFrontier_BattlePalaceLobby_EventScript_GiveBattlePoints @@ -81,8 +80,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge:: playse SE_SAVE waitse call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_EndSaveAfterChallenge + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePalaceLobby_EventScript_EndSaveAfterChallenge message BattleFrontier_BattlePalaceLobby_Text_LikeToRecordMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -126,18 +124,13 @@ BattleFrontier_BattlePalaceLobby_EventScript_DoublesAttendant:: BattleFrontier_BattlePalaceLobby_EventScript_Attendant:: palace_get PALACE_DATA_PRIZE - compare VAR_RESULT, ITEM_NONE - goto_if_ne BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge + goto_if_ne VAR_RESULT, ITEM_NONE, BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge special SavePlayerParty - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForSingleBattle - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForDoubleBattle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForSingleBattle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_WelcomeForDoubleBattle BattleFrontier_BattlePalaceLobby_EventScript_AskTakeChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_AskTakeSingleBattleChallenge - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_AskTakeDoubleBattleChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_AskTakeSingleBattleChallenge + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_AskTakeDoubleBattleChallenge waitmessage multichoice 17, 6, MULTI_CHALLENGEINFO, FALSE switch VAR_RESULT @@ -154,8 +147,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -164,8 +156,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge msgbox BattleFrontier_BattlePalaceLobby_Text_MustSaveBeforeChallenge2, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge @@ -184,8 +175,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE @@ -198,8 +188,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge:: end BattleFrontier_BattlePalaceLobby_EventScript_ExplainChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattlePalaceLobby_EventScript_ExplainDoublesChallenge + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_ExplainDoublesChallenge msgbox BattleFrontier_BattlePalaceLobby_Text_ExplainSingleBattleChallenge, MSGBOX_DEFAULT goto BattleFrontier_BattlePalaceLobby_EventScript_AskTakeChallenge @@ -249,25 +238,19 @@ BattleFrontier_BattlePalaceLobby_EventScript_AskTakeDoubleBattleChallenge:: return BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_TalkedToSinglesAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_TalkedToDoublesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_TalkedToSinglesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_TalkedToDoublesAttendant applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_WalkToDoor waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_OpenSinglesHallDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_OpenDoublesHallDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_OpenSinglesHallDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_OpenDoublesHallDoor waitdooranim applymovement VAR_LAST_TALKED, BattleFrontier_BattlePalaceLobby_Movement_AttendantEnterDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePalaceLobby_Movement_PlayerEnterDoor waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CloseSinglesHallDoor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattlePalaceLobby_EventScript_CloseDoublesHallDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattlePalaceLobby_EventScript_CloseSinglesHallDoor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattlePalaceLobby_EventScript_CloseDoublesHallDoor waitdooranim return diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index 4bb6e23275..fb91ee752a 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -41,8 +41,7 @@ BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattlePikeLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_DefeatedQueen + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeLobby_EventScript_DefeatedQueen msgbox BattleFrontier_BattlePikeLobby_Text_PossessLuckInAbundance, MSGBOX_DEFAULT waitmessage goto BattleFrontier_BattlePikeLobby_EventScript_GiveBattlePoints @@ -116,8 +115,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -126,8 +124,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge msgbox BattleFrontier_BattlePikeLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge @@ -149,8 +146,7 @@ BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge:: call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 pike_savehelditems - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE msgbox BattleFrontier_BattlePikeLobby_Text_StepThisWay, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 5888c140d6..9d060214de 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -137,21 +137,18 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_LucyEnter:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver msgbox BattleFrontier_BattlePikeRoomNormal_Text_ImThePikeQueen, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucySilver:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_HopeYouDidntUseUpLuck, MSGBOX_DEFAULT call BattleFrontier_BattlePikeRoomNormal_EventScript_DoPikeQueenBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver goto BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver:: frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyShowMeFrontierPass, MSGBOX_DEFAULT waitmessage playfanfare MUS_OBTAIN_SYMBOL @@ -165,21 +162,18 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucySilver:: BattleFrontier_BattlePikeRoomNormal_EventScript_IntroLucyGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyYouAgain, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattlePikeRoomNormal_EventScript_BattleLucyGold:: msgbox BattleFrontier_BattlePikeRoomNormal_Text_NowComeOn, MSGBOX_DEFAULT call BattleFrontier_BattlePikeRoomNormal_EventScript_DoPikeQueenBattle - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold goto BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucyGold:: frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy msgbox BattleFrontier_BattlePikeRoomNormal_Text_LucyFrontierPass, MSGBOX_DEFAULT waitmessage playfanfare MUS_OBTAIN_SYMBOL @@ -290,10 +284,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterStatusRoom:: waitmovement 0 pike_getstatusmon copyvar VAR_0x8004, VAR_RESULT - compare VAR_0x8004, PIKE_STATUSMON_KIRLIA - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack - compare VAR_0x8004, PIKE_STATUSMON_DUSCLOPS - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack + call_if_eq VAR_0x8004, PIKE_STATUSMON_KIRLIA, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack + call_if_eq VAR_0x8004, PIKE_STATUSMON_DUSCLOPS, BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack msgbox BattleFrontier_BattlePikeRoomNormal_Text_AttacksWhenStartled, MSGBOX_DEFAULT closemessage releaseall @@ -306,14 +298,10 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaAttack:: playmoncry SPECIES_KIRLIA, CRY_MODE_NORMAL waitmoncry pike_getstatus - compare VAR_RESULT, PIKE_STATUS_TOXIC - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedToxic - compare VAR_RESULT, PIKE_STATUS_BURN - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedWillOWisp - compare VAR_RESULT, PIKE_STATUS_PARALYSIS - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedThunderWave - compare VAR_RESULT, PIKE_STATUS_SLEEP - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedHypnosis + call_if_eq VAR_RESULT, PIKE_STATUS_TOXIC, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedToxic + call_if_eq VAR_RESULT, PIKE_STATUS_BURN, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedWillOWisp + call_if_eq VAR_RESULT, PIKE_STATUS_PARALYSIS, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedThunderWave + call_if_eq VAR_RESULT, PIKE_STATUS_SLEEP, BattleFrontier_BattlePikeRoomNormal_EventScript_KirliaUsedHypnosis pike_flashscreen waitstate applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon @@ -341,10 +329,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsAttack:: playmoncry SPECIES_DUSCLOPS, CRY_MODE_NORMAL waitmoncry pike_getstatus - compare VAR_RESULT, PIKE_STATUS_FREEZE - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedIceBeam - compare VAR_RESULT, PIKE_STATUS_BURN - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedWillOWisp + call_if_eq VAR_RESULT, PIKE_STATUS_FREEZE, BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedIceBeam + call_if_eq VAR_RESULT, PIKE_STATUS_BURN, BattleFrontier_BattlePikeRoomNormal_EventScript_DusclopsUsedWillOWisp pike_flashscreen waitstate applymovement LOCALID_OBJ_0, BattleFrontier_BattlePikeRoomNormal_Movement_NPCApproachMon @@ -569,10 +555,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_StatusNPC:: BattleFrontier_BattlePikeRoomNormal_EventScript_HealNPC:: pike_healonetwomons - compare VAR_RESULT, 2 - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreTwoMons - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreOneMon + call_if_eq VAR_RESULT, 2, BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreTwoMons + call_if_eq VAR_RESULT, 1, BattleFrontier_BattlePikeRoomNormal_EventScript_WillRestoreOneMon playfanfare MUS_HEAL waitfanfare msgbox BattleFrontier_BattlePikeRoomNormal_Text_BestOfLuckFarewell, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc index 0c055f6315..19926b9675 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc @@ -32,10 +32,8 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_TurnPlayerNorth:: BattleFrontier_BattlePikeRoomWildMons_OnResume: call BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves frontier_get FRONTIER_DATA_BATTLE_OUTCOME - compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost - compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost + goto_if_eq VAR_RESULT, B_OUTCOME_LOST, BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost + goto_if_eq VAR_RESULT, B_OUTCOME_DREW, BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost end BattleFrontier_BattlePikeRoomWildMons_EventScript_SetLost:: diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc index 301a8f4766..e95ca9dcea 100644 --- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc @@ -151,8 +151,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_AskRetireChallenge:: BattleFrontier_BattlePikeThreePathRoom_EventScript_SetHintRoom:: pike_sethintroom - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_SetPikeQueenHint + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeThreePathRoom_EventScript_SetPikeQueenHint setvar VAR_TEMP_5, 255 end @@ -173,8 +172,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_GivePikeQueenHint:: BattleFrontier_BattlePikeThreePathRoom_EventScript_HintGiver:: pike_gethint - compare VAR_RESULT, PIKE_HINT_BRAIN - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveBrainHint + goto_if_eq VAR_RESULT, PIKE_HINT_BRAIN, BattleFrontier_BattlePikeThreePathRoom_EventScript_GiveBrainHint lock faceplayer msgbox BattleFrontier_BattlePikeThreePathRoom_Text_FindingItDifficultToChoose, MSGBOX_YESNO diff --git a/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc index ebc3a8d3e3..a6b3f63c8e 100644 --- a/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc @@ -21,8 +21,7 @@ BattleFrontier_BattlePyramidFloor_EventScript_UpdateLight:: BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop:: special CallBattlePyramidFunction delay 2 - compare VAR_RESULT, 2 - goto_if_ne BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop + goto_if_ne VAR_RESULT, 2, BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop setvar VAR_TEMP_D, 0 releaseall end @@ -45,18 +44,12 @@ BattleFrontier_BattlePyramidFloor_OnResume: case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge frontier_get FRONTIER_DATA_BATTLE_OUTCOME - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty - compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, B_OUTCOME_FORFEITED - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty + goto_if_eq VAR_RESULT, B_OUTCOME_LOST, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_DREW, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost frontier_isbattletype BATTLE_TYPE_TRAINER @ VAR_RESULT seems to be ignored here setvar VAR_TEMP_D, 1 BattleFrontier_BattlePyramidFloor_EventScript_ResetParty:: @@ -97,8 +90,7 @@ BattlePyramid_WarpToNextFloor:: frontier_get FRONTIER_DATA_BATTLE_NUM @ Floor number addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT - compare VAR_RESULT, 7 - goto_if_eq BattlePyramid_WarpToTop + goto_if_eq VAR_RESULT, 7, BattlePyramid_WarpToTop pyramid_seedfloor frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_RESULT, 0 @@ -124,8 +116,7 @@ BattlePyramid_TrainerBattle:: BattlePyramid_FindItemBall:: pyramid_setitem callstd STD_FIND_ITEM - compare VAR_0x8007, 0 - goto_if_eq BattlePyramid_FindItemBallEnd + goto_if_eq VAR_0x8007, 0, BattlePyramid_FindItemBallEnd pyramid_hideitem BattlePyramid_FindItemBallEnd:: end diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc index 761f5f6635..550644511b 100644 --- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc @@ -45,8 +45,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_QuitWithoutSaving:: BattleFrontier_BattlePyramidLobby_EventScript_WonChallenge:: lockall frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_DefeatedKing + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePyramidLobby_EventScript_DefeatedKing msgbox BattleFrontier_BattlePyramidLobby_Text_YouveConqueredPyramid, MSGBOX_DEFAULT goto BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints @@ -54,8 +53,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_DefeatedKing:: msgbox BattleFrontier_BattlePyramidLobby_Text_YouveDefeatedPyramidKing, MSGBOX_DEFAULT BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints:: special DoBattlePyramidMonsHaveHeldItem - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePyramidLobby_EventScript_StoreHeldItemsInPyramidBag + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePyramidLobby_EventScript_StoreHeldItemsInPyramidBag clearflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG frontier_checkairshow special LoadPlayerParty @@ -130,8 +128,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattlePyramidLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -140,8 +137,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge msgbox BattleFrontier_BattlePyramidLobby_Text_OkayToSaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge @@ -162,8 +158,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE @@ -233,8 +228,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_NoHint:: BattleFrontier_BattlePyramidLobby_EventScript_GiveHintLv50:: msgbox BattleFrontier_BattlePyramidLobby_Text_Aah, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_50 - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLv50Streak + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLv50Streak setvar VAR_RESULT, 0 goto BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment return @@ -247,8 +241,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLv50Streak:: BattleFrontier_BattlePyramidLobby_EventScript_GiveHintLvOpen:: msgbox BattleFrontier_BattlePyramidLobby_Text_Aah, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK_ACTIVE_OPEN - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLvOpenStreak + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidLobby_EventScript_GiveHintGetLvOpenStreak setvar VAR_RESULT, 0 goto BattleFrontier_BattlePyramidLobby_EventScript_DoHintComment return @@ -378,8 +371,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_WalkToPanelAndReceiveBag:: waitmovement 0 msgbox BattleFrontier_BattlePyramidLobby_Text_WeWillHoldBagForSafekeeping, MSGBOX_DEFAULT pyramid_get PYRAMID_DATA_WIN_STREAK - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_ReceiveNewBattleBag + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_ReceiveNewBattleBag msgbox BattleFrontier_BattlePyramidLobby_Text_PleaseTakePreviousBattleBag, MSGBOX_DEFAULT goto BattleFrontier_BattlePyramidLobby_EventScript_ReceiveBattleBag @@ -433,8 +425,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_StoreHeldItemsInPyramidBag:: msgbox BattleFrontier_BattlePyramidLobby_Text_MonHoldingItemCannotTake, MSGBOX_DEFAULT setflag FLAG_STORING_ITEMS_IN_PYRAMID_BAG special TryStoreHeldItemsInPyramidBag - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_HeldItemsStoredInPyramidBag + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_HeldItemsStoredInPyramidBag message BattleFrontier_BattlePyramidLobby_Text_BagCannotHoldPickItemsToKeep waitmessage goto BattleFrontier_BattlePyramidLobby_EventScript_PickItemsToKeep @@ -472,8 +463,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_PickItemsFromParty:: BattleFrontier_BattlePyramidLobby_EventScript_ExitPickItems:: special DoBattlePyramidMonsHaveHeldItem - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePyramidLobby_EventScript_PartyStillHasHeldItems + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePyramidLobby_EventScript_PartyStillHasHeldItems return BattleFrontier_BattlePyramidLobby_EventScript_PartyStillHasHeldItems:: diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc index f7054d2025..385356c4ba 100644 --- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc +++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc @@ -20,16 +20,14 @@ BattleFrontier_BattlePyramidTop_OnWarp: BattleFrontier_BattlePyramidTop_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH - compare VAR_TEMP_C, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects + goto_if_ne VAR_TEMP_C, 0, BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects setobjectxyperm LOCALID_BRANDON, 0, 0 BattleFrontier_BattlePyramidTop_EventScript_EndSetUpObjects:: end BattleFrontier_BattlePyramidTop_OnResume: frontier_getbrainstatus - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus + goto_if_eq VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus call BattleFrontier_EventScript_SetBrainObjectGfx BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus:: copyvar VAR_TEMP_C, VAR_RESULT @@ -39,12 +37,9 @@ BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus:: case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge frontier_get FRONTIER_DATA_BATTLE_OUTCOME - compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, B_OUTCOME_FORFEITED - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_LOST, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_DREW, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost end BattleFrontier_BattlePyramidTop_OnFrame: @@ -74,10 +69,8 @@ BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge:: BattleFrontier_BattlePyramidTop_EventScript_Attendant:: lock faceplayer - compare VAR_TEMP_D, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_StepForwardWhenReady - compare VAR_TEMP_C, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHereMoveAside + goto_if_ne VAR_TEMP_D, 0, BattleFrontier_BattlePyramidTop_EventScript_StepForwardWhenReady + goto_if_ne VAR_TEMP_C, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattlePyramidTop_EventScript_BrandonHereMoveAside msgbox BattleFrontier_BattlePyramidTop_Text_ReachedSummitUpYouGo, MSGBOX_DEFAULT closemessage applymovement LOCALID_ATTENDANT, BattleFrontier_BattlePyramidTop_Movement_AttendantMoveAside @@ -116,8 +109,7 @@ BattleFrontier_BattlePyramidTop_EventScript_BattleBrandon:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardSilverSpeech special SpawnCameraObject applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp waitmovement 0 @@ -137,14 +129,12 @@ BattleFrontier_BattlePyramidTop_EventScript_BattleBrandonSilver:: msgbox BattleFrontier_BattlePyramidTop_Text_BringCourageToOurBattle, MSGBOX_DEFAULT call BattleFrontier_BattlePyramidTop_EventScript_DoBrandonBattle playbgm MUS_B_PYRAMID_TOP, FALSE - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver goto BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver:: frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePyramidTop_Text_BrandonFrontierPassPlease, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattlePyramidTop_Text_ReceivedBraveSymbol @@ -156,8 +146,7 @@ BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonSilver:: BattleFrontier_BattlePyramidTop_EventScript_BrandonIntroGold:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattlePyramidTop_EventScript_BrandonHeardGoldSpeech special SpawnCameraObject applymovement OBJ_EVENT_ID_CAMERA, BattleFrontier_BattlePyramidTop_Movement_CameraPanUp waitmovement 0 @@ -177,14 +166,12 @@ BattleFrontier_BattlePyramidTop_EventScript_BattleBrandonGold:: msgbox BattleFrontier_BattlePyramidTop_Text_EverythingYouHave, MSGBOX_DEFAULT call BattleFrontier_BattlePyramidTop_EventScript_DoBrandonBattle playbgm MUS_B_PYRAMID_TOP, FALSE - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonGold + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonGold goto BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost BattleFrontier_BattlePyramidTop_EventScript_DefeatedBrandonGold:: frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattlePyramidTop_Text_BrandonRemarkableHaveThis, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattlePyramidTop_Text_BraveSymbolTookGoldenShine diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc index ab25442a26..9b466af3bc 100644 --- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc @@ -25,8 +25,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_EnterRoom:: applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_OpponentEnter + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerBattleRoom_EventScript_OpponentEnter applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceAttendant @@ -62,8 +61,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedOpponent:: waitmovement 0 removeobject LOCALID_OPPONENT frontier_getbrainstatus - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - call_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_SecondAttendantEnter + call_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleTowerBattleRoom_EventScript_SecondAttendantEnter applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerBattleRoom_Movement_PlayerFaceAttendant @@ -75,13 +73,11 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedOpponent:: BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForOpponent:: frontier_getbrainstatus copyvar VAR_TEMP_F, VAR_RESULT - compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY - goto_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_MaidenUpNext + goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleTowerBattleRoom_EventScript_MaidenUpNext frontier_get FRONTIER_DATA_BATTLE_NUM call BattleFrontier_BattleTowerBattleRoom_EventScript_ReadyForOpponent call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForOpponentNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForOpponentNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_ContinueChallenge @@ -214,16 +210,14 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_SecondAttendantEnter:: return BattleFrontier_BattleTowerBattleRoom_EventScript_MaidenUpNext:: - compare VAR_TEMP_2, 1 - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaiden + goto_if_eq VAR_TEMP_2, 1, BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaiden msgbox BattleFrontier_BattleTowerBattleRoom_Text_SalonMaidenOnHerWay, MSGBOX_DEFAULT setvar VAR_TEMP_2, 1 BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaiden:: message BattleFrontier_BattleTowerBattleRoom_Text_ReadyForSalonMaiden waitmessage call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaidenNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerBattleRoom_EventScript_AskReadyForMaidenNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabel @@ -255,22 +249,19 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabel:: case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelSilver case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelGold frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelSilver + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelSilver msgbox BattleFrontier_BattleTowerBattleRoom_Text_GreetingsImAnabel, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelSilver:: msgbox BattleFrontier_BattleTowerBattleRoom_Text_LetMeSeeYourTalent, MSGBOX_DEFAULT call BattleFrontier_BattleTowerBattleRoom_EventScript_DoTowerBattle - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelSilver + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelSilver goto BattleFrontier_BattleTower_EventScript_WarpToLobbyLost BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelSilver:: call BattleFrontier_EventScript_IncrementWinStreak frontier_getsymbols - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattleTowerBattleRoom_Text_AnabelTalentShallBeRecognized, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattleTowerBattleRoom_Text_ReceivedAbilitySymbol @@ -282,22 +273,19 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelSilver:: BattleFrontier_BattleTowerBattleRoom_EventScript_AnabelGoldIntro:: frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH - compare VAR_RESULT, FALSE - goto_if_ne BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelGold + goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelGold msgbox BattleFrontier_BattleTowerBattleRoom_Text_AnabelYouCameBack, MSGBOX_DEFAULT frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH BattleFrontier_BattleTowerBattleRoom_EventScript_BattleAnabelGold:: msgbox BattleFrontier_BattleTowerBattleRoom_Text_LetsBeginShallWe, MSGBOX_DEFAULT call BattleFrontier_BattleTowerBattleRoom_EventScript_DoTowerBattle - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelGold + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelGold goto BattleFrontier_BattleTower_EventScript_WarpToLobbyLost BattleFrontier_BattleTowerBattleRoom_EventScript_DefeatedAnabelGold:: call BattleFrontier_EventScript_IncrementWinStreak frontier_getsymbols - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyWon msgbox BattleFrontier_BattleTowerBattleRoom_Text_AnabelCongratsYourPassPlease, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_SYMBOL message BattleFrontier_BattleTowerBattleRoom_Text_AbilitySymbolTookGoldenShine @@ -317,8 +305,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_DoTowerBattle:: special DoSpecialTrainerBattle waitstate copyvar VAR_0x8004, VAR_FRONTIER_BATTLE_MODE - compare VAR_0x8004, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_EndTowerBattle + goto_if_eq VAR_0x8004, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerBattleRoom_EventScript_EndTowerBattle frontier_restorehelditems special HealPlayerParty frontier_resetsketch @@ -422,12 +409,9 @@ BattleFrontier_BattleTowerBattleRoom_Movement_AnabelEnter: BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobby:: copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE - compare VAR_RESULT, FRONTIER_MODE_DOUBLES - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyDoubles - compare VAR_RESULT, FRONTIER_MODE_MULTIS - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis - compare VAR_RESULT, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis + goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyDoubles + goto_if_eq VAR_RESULT, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis + goto_if_eq VAR_RESULT, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 6, 6 waitstate end diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc index b4ddb0788b..d0f3d487a8 100644 --- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc @@ -6,8 +6,7 @@ BattleFrontier_BattleTowerCorridor_MapScripts:: .byte 0 BattleFrontier_BattleTowerCorridor_OnLoad: - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor + goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE end @@ -23,8 +22,7 @@ BattleFrontier_BattleTowerCorridor_OnFrame: BattleFrontier_BattleTowerCorridor_EventScript_EnterCorridor:: setvar VAR_TEMP_0, 1 - compare VAR_0x8006, 1 - goto_if_eq BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor + goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToDoor applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToDoor waitmovement 0 diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc index 1f7e05ca5f..06f4ff0a70 100644 --- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc @@ -26,14 +26,10 @@ BattleFrontier_BattleTowerElevator_EventScript_EnterElevator:: end BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoom:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoomMulti - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridorMulti + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoomMulti + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridorMulti return BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor:: diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index 3d10a08a02..40936936a7 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -19,8 +19,7 @@ BattleFrontier_BattleTowerLobby_OnResume: BattleFrontier_BattleTowerLobby_OnTransition: call BattleFrontier_BattleTowerLobby_EventScript_ShowOrHideReporter apprentice_shouldcheckgone - compare VAR_0x8004, FALSE @ Always TRUE here - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ShowApprentice + goto_if_eq VAR_0x8004, FALSE, BattleFrontier_BattleTowerLobby_EventScript_ShowApprentice @ VAR_0x8004 always TRUE here goto_if_set FLAG_DAILY_APPRENTICE_LEAVES, BattleFrontier_BattleTowerLobby_EventScript_HideApprentice BattleFrontier_BattleTowerLobby_EventScript_ShowApprentice:: clearflag FLAG_HIDE_APPRENTICE @@ -69,8 +68,7 @@ BattleFrontier_BattleTowerLobby_EventScript_WonChallenge:: lock faceplayer frontier_isbrain - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_DefeatedMaiden + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_DefeatedMaiden message BattleFrontier_BattleTowerLobby_Text_CongratsBeatenSeven waitmessage goto BattleFrontier_BattleTowerLobby_EventScript_GiveRibbons @@ -79,8 +77,7 @@ BattleFrontier_BattleTowerLobby_EventScript_DefeatedMaiden:: msgbox BattleFrontier_BattleTowerLobby_Text_CongratsDefeatedMaiden, MSGBOX_DEFAULT BattleFrontier_BattleTowerLobby_EventScript_GiveRibbons:: tower_giveribbons - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_GiveBattlePoints + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_BattleTowerLobby_EventScript_GiveBattlePoints message BattleFrontier_BattleTowerLobby_Text_HereAreSomeRibbons waitmessage playfanfare MUS_OBTAIN_ITEM @@ -92,8 +89,7 @@ BattleFrontier_BattleTowerLobby_EventScript_GiveBattlePoints:: msgbox BattleFrontier_Text_ObtainedXBattlePoints, MSGBOX_GETPOINTS call BattleFrontier_BattleTowerLobby_EventScript_AskSaveBattle tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 49 - goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge + goto_if_ne VAR_RESULT, 49, BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge msgbox BattleFrontier_BattleTowerLobby_Text_AboutToFace50thTrainer, MSGBOX_DEFAULT BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge:: msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT @@ -103,12 +99,10 @@ BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge:: end BattleFrontier_BattleTowerLobby_EventScript_LostChallenge:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_CancelWinStreak + goto_if_ne VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_CancelWinStreak goto_if_set FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerLobby_EventScript_CancelWinStreak tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 0 - goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying + goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying BattleFrontier_BattleTowerLobby_EventScript_CancelWinStreak:: tower_set TOWER_DATA_WIN_STREAK_ACTIVE, FALSE BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying:: @@ -133,8 +127,7 @@ BattleFrontier_BattleTowerLobby_EventScript_AskSaveBattle:: playse SE_SAVE waitse call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_EndSaveBattle + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_EndSaveBattle message BattleFrontier_BattleTowerLobby_Text_RecordLastMatch waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE @@ -145,8 +138,7 @@ BattleFrontier_BattleTowerLobby_EventScript_AskSaveBattle:: BattleFrontier_EventScript_SaveBattle:: frontier_savebattle - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_EventScript_BattleSaveFailed + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_EventScript_BattleSaveFailed playse SE_SAVE msgbox BattleFrontier_BattleTowerLobby_Text_BattleRecordedOnPass, MSGBOX_DEFAULT goto BattleFrontier_BattleTowerLobby_EventScript_EndSaveBattle @@ -163,8 +155,7 @@ BattleFrontier_EventScript_GetCantRecordBattle:: BattleFrontier_BattleTowerLobby_EventScript_ResumeChallenge:: lock faceplayer - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_SetBravoTrainerOn + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_SetBravoTrainerOn message BattleFrontier_BattleTowerLobby_Text_WeveBeenWaitingForYou waitmessage message BattleFrontier_BattleTowerLobby_Text_ProgressWillBeSaved @@ -205,8 +196,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterSinglesChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -215,8 +205,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterSinglesChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleTowerLobby_Text_OkayToSaveBeforeEntering, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge @@ -234,8 +223,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeSinglesChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, TRUE goto BattleFrontier_BattleTowerLobby_EventScript_EnterElevator @@ -271,8 +259,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterDoublesChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectFourMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -281,8 +268,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterDoublesChallenge:: setvar VAR_0x8005, FRONTIER_DOUBLES_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleTowerLobby_Text_OkayToSaveBeforeEntering, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge @@ -300,8 +286,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeDoublesChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, FALSE goto BattleFrontier_BattleTowerLobby_EventScript_EnterElevator @@ -338,8 +323,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterMultisChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -348,8 +332,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterMultisChallenge:: setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleTowerLobby_Text_OkayToSaveBeforeEntering, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge @@ -367,8 +350,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeMultisChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, FALSE goto BattleFrontier_BattleTowerLobby_EventScript_EnterElevator @@ -404,8 +386,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterLinkMultisChallenge:: case FRONTIER_LVL_TENT, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge case MULTI_B_PRESSED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons2, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -414,8 +395,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterLinkMultisChallenge:: setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge msgbox BattleFrontier_BattleTowerLobby_Text_OkayToSaveBeforeEntering, MSGBOX_YESNO switch VAR_RESULT case NO, BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge @@ -434,12 +414,10 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge:: tower_save 0 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryWirelessLink + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_TryWirelessLink goto BattleFrontier_BattleTowerLobby_EventScript_TryCableLink end @@ -491,10 +469,8 @@ BattleFrontier_BattleTowerLobby_EventScript_FeelingsWontTell:: end BattleFrontier_BattleTowerLobby_EventScript_CheckFeelings:: - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CanceledEasyChat - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_SubmittedFeelings + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CanceledEasyChat + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleTowerLobby_EventScript_SubmittedFeelings end BattleFrontier_BattleTowerLobby_EventScript_CanceledEasyChat:: @@ -611,8 +587,7 @@ BattleFrontier_BattleTowerLobby_EventScript_EnterElevator:: BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad:: tower_loadlinkopponents delay 1 - compare VAR_RESULT, 6 - goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad + goto_if_ne VAR_RESULT, 6, BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad call BattleFrontier_BattleTowerLobby_EventScript_ShowYouToBattleRoom clearflag FLAG_CANCEL_BATTLE_ROOM_CHALLENGE warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6 @@ -622,8 +597,7 @@ BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad:: BattleFrontier_BattleTowerLobby_EventScript_ShowYouToBattleRoom:: call BattleFrontier_BattleTowerLobby_EventScript_BufferModeText - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ShowYouToLinkMultiBattleRoom + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_ShowYouToLinkMultiBattleRoom msgbox BattleFrontier_BattleTowerLobby_Text_ShowYouToBattleRoom, MSGBOX_DEFAULT goto BattleFrontier_BattleTowerLobby_EventScript_WalkToElevator @@ -675,14 +649,10 @@ BattleFrontier_BattleTowerLobby_Movement_UnusedEnterElevator: step_end BattleFrontier_BattleTowerLobby_EventScript_BufferModeText:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_BufferTextSingle - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_BufferTextDouble - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_BufferTextMulti - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_BufferTextSingle + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_BufferTextDouble + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_BufferTextMulti + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti return BattleFrontier_BattleTowerLobby_EventScript_BufferTextSingle:: @@ -702,14 +672,10 @@ BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti:: return BattleFrontier_BattleTowerLobby_EventScript_SetAttendantTalkedTo:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_TalkedToSinglesAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_TalkedToDoublesAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_TalkedToMultisAttendant - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_TalkedToLinkMultisAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_TalkedToSinglesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_TalkedToDoublesAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_TalkedToMultisAttendant + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_TalkedToLinkMultisAttendant return BattleFrontier_BattleTowerLobby_EventScript_TalkedToSinglesAttendant:: @@ -729,14 +695,10 @@ BattleFrontier_BattleTowerLobby_EventScript_TalkedToLinkMultisAttendant:: return BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoord:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordSingles - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordDoubles - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordMultis - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordLinkMultis + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordSingles + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordDoubles + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordMultis + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordLinkMultis return BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordSingles:: @@ -756,14 +718,10 @@ BattleFrontier_BattleTowerLobby_EventScript_GetDoorXCoordLinkMultis:: return BattleFrontier_BattleTowerLobby_EventScript_GetPartySize:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetSinglesPartySize - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetDoublesPartySize - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetMultisPartySize - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_GetLinkMultisPartySize + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_GetSinglesPartySize + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_GetDoublesPartySize + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_GetMultisPartySize + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerLobby_EventScript_GetLinkMultisPartySize return BattleFrontier_BattleTowerLobby_EventScript_GetSinglesPartySize:: @@ -793,26 +751,18 @@ BattleFrontier_BattleTowerLobby_EventScript_TryCableLink:: setvar VAR_0x8005, 0 special TryBattleLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLinkIncorrectNumberOfPlayers - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError - compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, BattleFrontier_BattleTowerLobby_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, BattleFrontier_BattleTowerLobby_EventScript_AbortLinkIncorrectNumberOfPlayers + goto_if_eq VAR_RESULT, LINKUP_FAILED, BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER, BattleFrontier_BattleTowerLobby_EventScript_AbortLink end BattleFrontier_BattleTowerLobby_EventScript_AbortLinkDifferentSelections:: special CloseLink - compare VAR_0x8005, 3 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_FriendDifferentSelection + goto_if_eq VAR_0x8005, 3, BattleFrontier_BattleTowerLobby_EventScript_FriendDifferentSelection msgbox Text_PlayersMadeDifferentSelections, MSGBOX_DEFAULT release end @@ -832,12 +782,9 @@ BattleFrontier_BattleTowerLobby_EventScript_AbortLinkIncorrectNumberOfPlayers:: BattleFrontier_BattleTowerLobby_EventScript_AbortLink:: special CloseLink - compare VAR_0x8005, 0 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_FriendChoseDifferentLvlMode - compare VAR_0x8005, 1 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_FriendAlsoSelectedMon - compare VAR_0x8005, 2 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_FriendAlsoSelectedMons + call_if_eq VAR_0x8005, 0, BattleFrontier_BattleTowerLobby_EventScript_FriendChoseDifferentLvlMode + call_if_eq VAR_0x8005, 1, BattleFrontier_BattleTowerLobby_EventScript_FriendAlsoSelectedMon + call_if_eq VAR_0x8005, 2, BattleFrontier_BattleTowerLobby_EventScript_FriendAlsoSelectedMons msgbox BattleFrontier_BattleTowerLobby_Text_ChooseDifferentMonsMatchLvlMode, MSGBOX_DEFAULT release end @@ -891,27 +838,19 @@ BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader:: BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader - compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful + goto_if_eq VAR_RESULT, LINKUP_FAILED, BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader + goto_if_eq VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER, BattleFrontier_BattleTowerLobby_EventScript_AbortLink release return BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup - compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful + goto_if_eq VAR_RESULT, LINKUP_FAILED, BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup + goto_if_eq VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER, BattleFrontier_BattleTowerLobby_EventScript_AbortLink release return diff --git a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc index 9bfcfddc2f..e1cb64dda0 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiBattleRoom/scripts.inc @@ -16,17 +16,14 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScripts:: @ The multi partner is represented by LOCALID_PARTNER, which has the gfx id VAR_OBJ_GFX_ID_E BattleFrontier_BattleTowerMultiBattleRoom_OnTransition: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetLinkPlayerGfx + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetLinkPlayerGfx end BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx:: tower_setpartnergfx checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetPlayerGfxFemale setvar VAR_OBJ_GFX_ID_F, OBJ_EVENT_GFX_BRENDAN_NORMAL return @@ -56,8 +53,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_PartnerEnterRoom waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer waitmovement 0 @@ -74,8 +70,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter:: applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent1Enter applymovement LOCALID_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent2Enter waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink tower_getopponentintro 0 delay 15 applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft @@ -130,8 +125,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DefeatedOpponents:: applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant waitmovement 0 - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink msgbox BattleFrontier_BattleTowerBattleRoom_Text_RestoreMonsToFullHealth, MSGBOX_DEFAULT goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RestoreParty @@ -142,19 +136,16 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink:: BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RestoreParty:: special LoadPlayerParty frontier_setpartyorder FRONTIER_MULTI_PARTY_SIZE - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReconnectLink + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReconnectLink playfanfare MUS_HEAL waitfanfare special HealPlayerParty BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponents:: frontier_get FRONTIER_DATA_BATTLE_NUM call BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSet - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge call BattleFrontier_EventScript_GetCantRecordBattle - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponentsNoRecord + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponentsNoRecord multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE switch VAR_RESULT case 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge @@ -230,8 +221,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_PauseChallenge:: end BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSet:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSetLink + goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSetLink copyvar VAR_TEMP_F, VAR_RESULT switch VAR_TEMP_F case 1, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyFor2ndOpponentSet @@ -347,8 +337,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallengeLink:: waitmessage special LinkRetireStatusWithBattleTowerPartner waitstate - compare VAR_RESULT, BATTLE_TOWER_LINKSTAT_CONTINUE - goto_if_ne BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyLost + goto_if_ne VAR_RESULT, BATTLE_TOWER_LINKSTAT_CONTINUE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyLost goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_LinkDelayForMsg end @@ -368,8 +357,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskRetireChallengeLink:: message BattleFrontier_BattleTowerBattleRoom_Text_CancelYourChallenge waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetireChallengeLink + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetireChallengeLink goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponents end diff --git a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc index c977ecb5f6..b36d2e6fd3 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc @@ -14,17 +14,14 @@ BattleFrontier_BattleTowerMultiCorridor_MapScripts:: @ The multi partner is represented by LOCALID_PARTNER, and has the gfx id VAR_OBJ_GFX_ID_E BattleFrontier_BattleTowerMultiCorridor_OnTransition: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_SetObjGfx - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_SetLinkPlayerGfx + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_SetObjGfx + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_SetLinkPlayerGfx end BattleFrontier_BattleTowerMultiCorridor_EventScript_SetObjGfx:: tower_setpartnergfx checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleTowerMultiCorridor_EventScript_SetPlayerGfxFemale setvar VAR_OBJ_GFX_ID_F, OBJ_EVENT_GFX_BRENDAN_NORMAL return @@ -95,14 +92,10 @@ BattleFrontier_BattleTowerMultiCorridor_EventScript_EnterCorridor:: end BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToBattleRoom:: - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToMultiBattleRoom - compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS - call_if_eq BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToLinkMultiBattleRoom + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToMultiBattleRoom + call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToLinkMultiBattleRoom return BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom:: diff --git a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc index 3beaa38c71..b9fc7d5543 100644 --- a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc @@ -87,8 +87,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_Attendant:: message BattleFrontier_BattleTowerMultiPartnerRoom_Text_QuitLookingForPartner waitmessage multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_QuitChallenge + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_QuitChallenge msgbox BattleFrontier_BattleTowerMultiPartnerRoom_Text_PleaseFindPartner2, MSGBOX_DEFAULT release end @@ -183,10 +182,8 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_TalkToPotentialPartner:: waitmessage waitbuttonpress closemessage - compare VAR_FACING, DIR_SOUTH - call_if_ne BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExit - compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExitSouth + call_if_ne VAR_FACING, DIR_SOUTH, BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExit + call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExitSouth removeobject VAR_LAST_TALKED setflag FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER warpsilent MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 10, 3 diff --git a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc index bba92ebe40..703b1ec900 100644 --- a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc +++ b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc @@ -14,38 +14,30 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ClerkGoodbye:: BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize:: specialvar VAR_TEMP_1, GetFrontierBattlePoints - compare VAR_TEMP_1, VAR_0x8008 - goto_if_ge BattleFrontier_ExchangeServiceCorner_EventScript_TryGivePrize + goto_if_ge VAR_TEMP_1, VAR_0x8008, BattleFrontier_ExchangeServiceCorner_EventScript_TryGivePrize msgbox BattleFrontier_ExchangeServiceCorner_Text_DontHaveEnoughPoints, MSGBOX_DEFAULT - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR2_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 - compare VAR_TEMP_2, EXCHANGE_CORNER_VITAMIN_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR2_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_VITAMIN_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin goto BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem end BattleFrontier_ExchangeServiceCorner_EventScript_TryGivePrize:: - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR2_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR2_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor goto BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem end BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveDecor:: checkdecorspace VAR_0x8009 - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor copyvar VAR_0x8004, VAR_0x8008 special TakeFrontierBattlePoints adddecoration VAR_0x8009 special UpdateBattlePointsWindow playse SE_SHOP msgbox BattleFrontier_ExchangeServiceCorner_Text_WellSendItToPC, MSGBOX_DEFAULT - compare VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_DECOR1_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 goto BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 end @@ -57,16 +49,14 @@ BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor:: BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem:: checkitemspace VAR_0x8009 - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_BagFull + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ExchangeServiceCorner_EventScript_BagFull copyvar VAR_0x8004, VAR_0x8008 special TakeFrontierBattlePoints additem VAR_0x8009 special UpdateBattlePointsWindow playse SE_SHOP msgbox BattleFrontier_ExchangeServiceCorner_Text_HereIsYourPrize, MSGBOX_DEFAULT - compare VAR_TEMP_2, EXCHANGE_CORNER_VITAMIN_CLERK - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_TEMP_2, EXCHANGE_CORNER_VITAMIN_CLERK, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin goto BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem end @@ -107,8 +97,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1:: BattleFrontier_ExchangeServiceCorner_EventScript_KissPoster:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmKissPoster, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 16 setvar VAR_0x8009, DECOR_KISS_POSTER goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -116,8 +105,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_KissPoster:: BattleFrontier_ExchangeServiceCorner_EventScript_KissCushion:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmKissCushion, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 32 setvar VAR_0x8009, DECOR_KISS_CUSHION goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -125,8 +113,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_KissCushion:: BattleFrontier_ExchangeServiceCorner_EventScript_SmoochumDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmSmoochumDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 32 setvar VAR_0x8009, DECOR_SMOOCHUM_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -134,8 +121,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_SmoochumDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_TogepiDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmTogepiDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_TOGEPI_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -143,8 +129,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_TogepiDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_MeowthDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmMeowthDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_MEOWTH_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -152,8 +137,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_MeowthDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_ClefairyDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmClefairyDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_CLEFAIRY_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -161,8 +145,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ClefairyDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_DittoDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmDittoDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 48 setvar VAR_0x8009, DECOR_DITTO_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -170,8 +153,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_DittoDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_CyndaquilDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmCyndaquilDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_CYNDAQUIL_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -179,8 +161,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_CyndaquilDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_ChikoritaDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmChikoritaDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_CHIKORITA_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -188,8 +169,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChikoritaDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_TotodileDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmTotodileDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor1 setvar VAR_0x8008, 80 setvar VAR_0x8009, DECOR_TOTODILE_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -221,8 +201,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2:: BattleFrontier_ExchangeServiceCorner_EventScript_LaprasDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmLaprasDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 128 setvar VAR_0x8009, DECOR_LAPRAS_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -230,8 +209,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_LaprasDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_SnorlaxDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmSnorlaxDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 128 setvar VAR_0x8009, DECOR_SNORLAX_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -239,8 +217,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_SnorlaxDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_VenusaurDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmVenusaurDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_VENUSAUR_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -248,8 +225,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_VenusaurDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_CharizardDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmCharizardDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_CHARIZARD_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -257,8 +233,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_CharizardDoll:: BattleFrontier_ExchangeServiceCorner_EventScript_BlastoiseDoll:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmBlastoiseDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseDecor2 setvar VAR_0x8008, 256 setvar VAR_0x8009, DECOR_BLASTOISE_DOLL goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -291,8 +266,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin:: BattleFrontier_ExchangeServiceCorner_EventScript_Protein:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmProtein, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_PROTEIN goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -300,8 +274,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Protein:: BattleFrontier_ExchangeServiceCorner_EventScript_Calcium:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmCalcium, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_CALCIUM goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -309,8 +282,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Calcium:: BattleFrontier_ExchangeServiceCorner_EventScript_Iron:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmIron, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_IRON goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -318,8 +290,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Iron:: BattleFrontier_ExchangeServiceCorner_EventScript_Zinc:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmZinc, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_ZINC goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -327,8 +298,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Zinc:: BattleFrontier_ExchangeServiceCorner_EventScript_Carbos:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmCarbos, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_CARBOS goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -336,8 +306,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Carbos:: BattleFrontier_ExchangeServiceCorner_EventScript_HPUp:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmHPUp, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseVitamin setvar VAR_0x8008, 1 setvar VAR_0x8009, ITEM_HP_UP goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -373,8 +342,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem:: BattleFrontier_ExchangeServiceCorner_EventScript_Leftovers:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmLeftovers, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_LEFTOVERS goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -382,8 +350,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Leftovers:: BattleFrontier_ExchangeServiceCorner_EventScript_WhiteHerb:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmWhiteHerb, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_WHITE_HERB goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -391,8 +358,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_WhiteHerb:: BattleFrontier_ExchangeServiceCorner_EventScript_QuickClaw:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmQuickClaw, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_QUICK_CLAW goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -400,8 +366,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_QuickClaw:: BattleFrontier_ExchangeServiceCorner_EventScript_MentalHerb:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmMentalHerb, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 48 setvar VAR_0x8009, ITEM_MENTAL_HERB goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -409,8 +374,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_MentalHerb:: BattleFrontier_ExchangeServiceCorner_EventScript_Brightpowder:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmBrightpowder, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_BRIGHT_POWDER goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -418,8 +382,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_Brightpowder:: BattleFrontier_ExchangeServiceCorner_EventScript_ChoiceBand:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmChoiceBand, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_CHOICE_BAND goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -427,8 +390,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_ChoiceBand:: BattleFrontier_ExchangeServiceCorner_EventScript_KingsRock:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmKingsRock, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_KINGS_ROCK goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -436,8 +398,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_KingsRock:: BattleFrontier_ExchangeServiceCorner_EventScript_FocusBand:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmFocusBand, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_FOCUS_BAND goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize @@ -445,8 +406,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_FocusBand:: BattleFrontier_ExchangeServiceCorner_EventScript_ScopeLens:: msgbox BattleFrontier_ExchangeServiceCorner_Text_ConfirmScopeLens, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, NO, BattleFrontier_ExchangeServiceCorner_EventScript_ChooseHoldItem setvar VAR_0x8008, 64 setvar VAR_0x8009, ITEM_SCOPE_LENS goto BattleFrontier_ExchangeServiceCorner_EventScript_TryPurchasePrize diff --git a/data/maps/BattleFrontier_Lounge1/scripts.inc b/data/maps/BattleFrontier_Lounge1/scripts.inc index 4447e1032e..6aca2b4ced 100644 --- a/data/maps/BattleFrontier_Lounge1/scripts.inc +++ b/data/maps/BattleFrontier_Lounge1/scripts.inc @@ -14,10 +14,8 @@ BattleFrontier_Lounge1_EventScript_Breeder:: BattleFrontier_Lounge1_EventScript_ChooseMonToShowBreeder:: special ChoosePartyMon waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_ne BattleFrontier_Lounge1_EventScript_ShowMonToBreeder - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq BattleFrontier_Lounge1_EventScript_CancelMonSelect + goto_if_ne VAR_0x8004, PARTY_NOTHING_CHOSEN, BattleFrontier_Lounge1_EventScript_ShowMonToBreeder + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, BattleFrontier_Lounge1_EventScript_CancelMonSelect end BattleFrontier_Lounge1_EventScript_BreederIntro:: @@ -34,17 +32,12 @@ BattleFrontier_Lounge1_EventScript_AlreadyMetBreeder:: @ VAR_0x8007: IV of the highest IV stat BattleFrontier_Lounge1_EventScript_ShowMonToBreeder:: specialvar VAR_RESULT, ScriptGetPartyMonSpecies - compare VAR_RESULT, SPECIES_EGG - goto_if_eq BattleFrontier_Lounge1_EventScript_ShowEggToBreeder + goto_if_eq VAR_RESULT, SPECIES_EGG, BattleFrontier_Lounge1_EventScript_ShowEggToBreeder special BufferVarsForIVRater - compare VAR_0x8005, 90 @ Average of 15 - goto_if_le BattleFrontier_Lounge1_EventScript_AverageTotalIVs - compare VAR_0x8005, 120 @ Average of 20 - goto_if_le BattleFrontier_Lounge1_EventScript_AboveAverageTotalIVs - compare VAR_0x8005, 150 @ Average of 25 - goto_if_le BattleFrontier_Lounge1_EventScript_HighTotalIVs - compare VAR_0x8005, 151 @ Average of > 25 - goto_if_ge BattleFrontier_Lounge1_EventScript_VeryHighTotalIVs + goto_if_le VAR_0x8005, 90, BattleFrontier_Lounge1_EventScript_AverageTotalIVs @ Average of 15 + goto_if_le VAR_0x8005, 120, BattleFrontier_Lounge1_EventScript_AboveAverageTotalIVs @ Average of 20 + goto_if_le VAR_0x8005, 150, BattleFrontier_Lounge1_EventScript_HighTotalIVs @ Average of 25 + goto_if_ge VAR_0x8005, 151, BattleFrontier_Lounge1_EventScript_VeryHighTotalIVs @ Average of > 25 end BattleFrontier_Lounge1_EventScript_ShowEggToBreeder:: @@ -54,30 +47,20 @@ BattleFrontier_Lounge1_EventScript_ShowEggToBreeder:: @ Comment on the highest IV stat BattleFrontier_Lounge1_EventScript_HighestIVStat:: - compare VAR_0x8006, STAT_HP - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVHP - compare VAR_0x8006, STAT_ATK - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVAtk - compare VAR_0x8006, STAT_DEF - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVDef - compare VAR_0x8006, STAT_SPEED - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVSpeed - compare VAR_0x8006, STAT_SPATK - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVSpAtk - compare VAR_0x8006, STAT_SPDEF - goto_if_eq BattleFrontier_Lounge1_EventScript_HighestIVSpDef + goto_if_eq VAR_0x8006, STAT_HP, BattleFrontier_Lounge1_EventScript_HighestIVHP + goto_if_eq VAR_0x8006, STAT_ATK, BattleFrontier_Lounge1_EventScript_HighestIVAtk + goto_if_eq VAR_0x8006, STAT_DEF, BattleFrontier_Lounge1_EventScript_HighestIVDef + goto_if_eq VAR_0x8006, STAT_SPEED, BattleFrontier_Lounge1_EventScript_HighestIVSpeed + goto_if_eq VAR_0x8006, STAT_SPATK, BattleFrontier_Lounge1_EventScript_HighestIVSpAtk + goto_if_eq VAR_0x8006, STAT_SPDEF, BattleFrontier_Lounge1_EventScript_HighestIVSpDef end @ Comment on the highest IV value BattleFrontier_Lounge1_EventScript_HighestIVValue:: - compare VAR_0x8007, 15 - goto_if_le BattleFrontier_Lounge1_EventScript_HighestIVLow - compare VAR_0x8007, 25 - goto_if_le BattleFrontier_Lounge1_EventScript_HighestIVMid - compare VAR_0x8007, 30 - goto_if_le BattleFrontier_Lounge1_EventScript_HighestIVHigh - compare VAR_0x8007, 31 - goto_if_ge BattleFrontier_Lounge1_EventScript_HighestIVMax + goto_if_le VAR_0x8007, 15, BattleFrontier_Lounge1_EventScript_HighestIVLow + goto_if_le VAR_0x8007, 25, BattleFrontier_Lounge1_EventScript_HighestIVMid + goto_if_le VAR_0x8007, 30, BattleFrontier_Lounge1_EventScript_HighestIVHigh + goto_if_ge VAR_0x8007, 31, BattleFrontier_Lounge1_EventScript_HighestIVMax end BattleFrontier_Lounge1_EventScript_EndBreederComments:: diff --git a/data/maps/BattleFrontier_Lounge2/scripts.inc b/data/maps/BattleFrontier_Lounge2/scripts.inc index e3a7fc1721..8efc172936 100644 --- a/data/maps/BattleFrontier_Lounge2/scripts.inc +++ b/data/maps/BattleFrontier_Lounge2/scripts.inc @@ -22,30 +22,18 @@ BattleFrontier_Lounge2_EventScript_AlreadyMetManiac:: end BattleFrontier_Lounge2_EventScript_GiveAdvice:: - compare VAR_FRONTIER_MANIAC_FACILITY, 0 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferSingle - compare VAR_FRONTIER_MANIAC_FACILITY, 1 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferDouble - compare VAR_FRONTIER_MANIAC_FACILITY, 2 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferMulti - compare VAR_FRONTIER_MANIAC_FACILITY, 3 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferMultiLink - compare VAR_FRONTIER_MANIAC_FACILITY, 4 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattleDome - compare VAR_FRONTIER_MANIAC_FACILITY, 5 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattleFactory - compare VAR_FRONTIER_MANIAC_FACILITY, 6 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattlePalace - compare VAR_FRONTIER_MANIAC_FACILITY, 7 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattleArena - compare VAR_FRONTIER_MANIAC_FACILITY, 8 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattlePike - compare VAR_FRONTIER_MANIAC_FACILITY, 9 - call_if_eq BattleFrontier_Lounge2_EventScript_BufferBattlePyramid - compare VAR_FRONTIER_MANIAC_FACILITY, 3 - call_if_le BattleFrontier_Lounge2_EventScript_BattleTowerNews - compare VAR_FRONTIER_MANIAC_FACILITY, 4 - call_if_ge BattleFrontier_Lounge2_EventScript_FacilityNews + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 0, BattleFrontier_Lounge2_EventScript_BufferSingle + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 1, BattleFrontier_Lounge2_EventScript_BufferDouble + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 2, BattleFrontier_Lounge2_EventScript_BufferMulti + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 3, BattleFrontier_Lounge2_EventScript_BufferMultiLink + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 4, BattleFrontier_Lounge2_EventScript_BufferBattleDome + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 5, BattleFrontier_Lounge2_EventScript_BufferBattleFactory + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 6, BattleFrontier_Lounge2_EventScript_BufferBattlePalace + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 7, BattleFrontier_Lounge2_EventScript_BufferBattleArena + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 8, BattleFrontier_Lounge2_EventScript_BufferBattlePike + call_if_eq VAR_FRONTIER_MANIAC_FACILITY, 9, BattleFrontier_Lounge2_EventScript_BufferBattlePyramid + call_if_le VAR_FRONTIER_MANIAC_FACILITY, 3, BattleFrontier_Lounge2_EventScript_BattleTowerNews + call_if_ge VAR_FRONTIER_MANIAC_FACILITY, 4, BattleFrontier_Lounge2_EventScript_FacilityNews special ShowFrontierManiacMessage waitmessage waitbuttonpress diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc index 1c9c5bc3b2..7d9befafb1 100644 --- a/data/maps/BattleFrontier_Lounge3/scripts.inc +++ b/data/maps/BattleFrontier_Lounge3/scripts.inc @@ -10,8 +10,7 @@ BattleFrontier_Lounge3_EventScript_Gambler:: faceplayer goto_if_set FLAG_MET_BATTLE_FRONTIER_GAMBLER, BattleFrontier_Lounge3_EventScript_AlreadyMetGambler call BattleFrontier_Lounge3_EventScript_CountSilverSymbols - compare VAR_0x8004, 2 - goto_if_le BattleFrontier_Lounge3_EventScript_NotEnoughSilverSymbols + goto_if_le VAR_0x8004, 2, BattleFrontier_Lounge3_EventScript_NotEnoughSilverSymbols setflag FLAG_MET_BATTLE_FRONTIER_GAMBLER msgbox BattleFrontier_Lounge3_Text_YouLookToughExplainGambling, MSGBOX_DEFAULT goto BattleFrontier_Lounge3_EventScript_AskToEnterChallenge @@ -22,11 +21,9 @@ BattleFrontier_Lounge3_EventScript_AskToEnterChallenge:: waitmessage waitbuttonpress msgbox BattleFrontier_Lounge3_Text_HowAboutEnteringEventForMe, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge3_EventScript_DeclineChallenge + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge3_EventScript_DeclineChallenge msgbox BattleFrontier_Lounge3_Text_SpotMeSomeBattlePoints, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge3_EventScript_DeclineChallenge + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge3_EventScript_DeclineChallenge message BattleFrontier_Lounge3_Text_HowMuchCanYouSpot waitmessage special ShowBattlePointsWindow @@ -61,8 +58,7 @@ BattleFrontier_Lounge3_EventScript_Bet15:: BattleFrontier_Lounge3_EventScript_TryPlaceBet:: specialvar VAR_TEMP_1, GetFrontierBattlePoints - compare VAR_TEMP_1, VAR_0x8008 - goto_if_ge BattleFrontier_Lounge3_EventScript_PlaceBet + goto_if_ge VAR_TEMP_1, VAR_0x8008, BattleFrontier_Lounge3_EventScript_PlaceBet msgbox BattleFrontier_Lounge3_Text_YouDontHaveEnoughPoints, MSGBOX_DEFAULT message BattleFrontier_Lounge3_Text_HowMuchCanYouSpot waitmessage @@ -109,27 +105,21 @@ BattleFrontier_Lounge3_EventScript_NotEnoughSilverSymbols:: BattleFrontier_Lounge3_EventScript_AlreadyMetGambler:: msgbox BattleFrontier_Lounge3_Text_Oh, MSGBOX_DEFAULT - compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET - goto_if_ge BattleFrontier_Lounge3_EventScript_CheckBetResults + goto_if_ge VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET, BattleFrontier_Lounge3_EventScript_CheckBetResults goto BattleFrontier_Lounge3_EventScript_AskToEnterChallenge end BattleFrontier_Lounge3_EventScript_CheckBetResults:: - compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET - goto_if_eq BattleFrontier_Lounge3_EventScript_ChallengeNotAttempted - compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON - goto_if_eq BattleFrontier_Lounge3_EventScript_WonChallenge + goto_if_eq VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET, BattleFrontier_Lounge3_EventScript_ChallengeNotAttempted + goto_if_eq VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON, BattleFrontier_Lounge3_EventScript_WonChallenge goto BattleFrontier_Lounge3_EventScript_LostChallenge end BattleFrontier_Lounge3_EventScript_WonChallenge:: msgbox BattleFrontier_Lounge3_Text_HelloChampHeresYourPoints, MSGBOX_DEFAULT - compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_5 - call_if_eq BattleFrontier_Lounge3_EventScript_RewardBet5 - compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_10 - call_if_eq BattleFrontier_Lounge3_EventScript_RewardBet10 - compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_15 - call_if_eq BattleFrontier_Lounge3_EventScript_RewardBet15 + call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_5, BattleFrontier_Lounge3_EventScript_RewardBet5 + call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_10, BattleFrontier_Lounge3_EventScript_RewardBet10 + call_if_eq VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_15, BattleFrontier_Lounge3_EventScript_RewardBet15 msgbox BattleFrontier_Lounge3_Text_ObtainedBattlePoints, MSGBOX_GETPOINTS special GiveFrontierBattlePoints msgbox BattleFrontier_Lounge3_Text_ThinkOfMeForAnotherChallenge, MSGBOX_DEFAULT diff --git a/data/maps/BattleFrontier_Lounge5/scripts.inc b/data/maps/BattleFrontier_Lounge5/scripts.inc index d680156f33..b81c748e5d 100644 --- a/data/maps/BattleFrontier_Lounge5/scripts.inc +++ b/data/maps/BattleFrontier_Lounge5/scripts.inc @@ -5,17 +5,14 @@ BattleFrontier_Lounge5_EventScript_NatureGirl:: lock faceplayer msgbox BattleFrontier_Lounge5_Text_NatureGirlGreeting, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown special ChoosePartyMon waitstate lock faceplayer - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown specialvar VAR_RESULT, ScriptGetPartyMonSpecies - compare VAR_RESULT, SPECIES_EGG - goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlEgg + goto_if_eq VAR_RESULT, SPECIES_EGG, BattleFrontier_Lounge5_EventScript_NatureGirlEgg special ShowNatureGirlMessage waitmessage waitbuttonpress diff --git a/data/maps/BattleFrontier_Lounge6/scripts.inc b/data/maps/BattleFrontier_Lounge6/scripts.inc index 65fd940c1a..0b01b32e3e 100644 --- a/data/maps/BattleFrontier_Lounge6/scripts.inc +++ b/data/maps/BattleFrontier_Lounge6/scripts.inc @@ -10,18 +10,15 @@ BattleFrontier_Lounge6_EventScript_Trader:: specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox BattleFrontier_Lounge6_Text_WouldYouLikeToTrade, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge6_EventScript_DeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, BattleFrontier_Lounge6_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne BattleFrontier_Lounge6_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, BattleFrontier_Lounge6_EventScript_NotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc index 7953ec8201..c52df3cafb 100644 --- a/data/maps/BattleFrontier_Lounge7/scripts.inc +++ b/data/maps/BattleFrontier_Lounge7/scripts.inc @@ -252,11 +252,9 @@ BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection:: buffernumberstring STR_VAR_2, VAR_0x8008 copyvar VAR_0x8004, VAR_TEMP_C msgbox BattleFrontier_Lounge7_Text_MoveWillBeXBattlePoints, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_Lounge7_EventScript_ChooseNewMove + goto_if_eq VAR_RESULT, NO, BattleFrontier_Lounge7_EventScript_ChooseNewMove specialvar VAR_TEMP_1, GetFrontierBattlePoints - compare VAR_TEMP_1, VAR_0x8008 - goto_if_ge BattleFrontier_Lounge7_EventScript_TeachTutorMove + goto_if_ge VAR_TEMP_1, VAR_0x8008, BattleFrontier_Lounge7_EventScript_TeachTutorMove msgbox BattleFrontier_Lounge7_Text_HaventGotEnoughPoints, MSGBOX_DEFAULT goto BattleFrontier_Lounge7_EventScript_ChooseNewMove end @@ -269,8 +267,7 @@ BattleFrontier_Lounge7_EventScript_TeachTutorMove:: special CloseBattleFrontierTutorWindow special ChooseMonForMoveTutor waitstate - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_Lounge7_EventScript_CancelChooseMon + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_Lounge7_EventScript_CancelChooseMon msgbox BattleFrontier_Lounge7_Text_IllTakeBattlePoints, MSGBOX_DEFAULT copyvar VAR_0x8004, VAR_0x8008 special TakeFrontierBattlePoints @@ -278,8 +275,7 @@ BattleFrontier_Lounge7_EventScript_TeachTutorMove:: end BattleFrontier_Lounge7_EventScript_ChooseNewMove:: - compare VAR_TEMP_E, 0 - goto_if_eq BattleFrontier_Lounge7_EventScript_ChooseNewLeftTutorMove + goto_if_eq VAR_TEMP_E, 0, BattleFrontier_Lounge7_EventScript_ChooseNewLeftTutorMove goto BattleFrontier_Lounge7_EventScript_ChooseNewRightTutorMove end diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc index 9157f0befe..f343734806 100644 --- a/data/maps/BattleFrontier_OutsideEast/scripts.inc +++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc @@ -11,8 +11,7 @@ BattleFrontier_OutsideEast_OnResume: BattleFrontier_OutsideEast_EventScript_TryRemoveSudowoodo:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -135,12 +134,9 @@ BattleFrontier_OutsideEast_EventScript_WaterSudowoodo:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BattleFrontier_OutsideEast_EventScript_DefeatedSudowoodo setflag FLAG_DEFEATED_SUDOWOODO release end diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc index f3af2b0581..5ca5cb9fbb 100644 --- a/data/maps/BattleFrontier_OutsideWest/scripts.inc +++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc @@ -21,8 +21,7 @@ BattleFrontier_OutsideWest_EventScript_FerryAttendant:: faceplayer msgbox BattleFrontier_OutsideWest_Text_MayISeeYourTicket, MSGBOX_DEFAULT checkitem ITEM_SS_TICKET - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_OutsideWest_EventScript_NoSSTicket + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_OutsideWest_EventScript_NoSSTicket message BattleFrontier_OutsideWest_Text_WhereWouldYouLikeToGo waitmessage goto BattleFrontier_OutsideWest_EventScript_ChooseFerryDestination @@ -44,8 +43,7 @@ BattleFrontier_OutsideWest_EventScript_NoSSTicket:: BattleFrontier_OutsideWest_EventScript_FerryToSlateport:: msgbox BattleFrontier_OutsideWest_Text_SlateportItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination + goto_if_eq VAR_RESULT, NO, BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination msgbox BattleFrontier_OutsideWest_Text_PleaseBoardFerry, MSGBOX_DEFAULT call BattleFrontier_OutsideWest_EventScript_BoardFerry warp MAP_SLATEPORT_CITY_HARBOR, 8, 11 @@ -55,8 +53,7 @@ BattleFrontier_OutsideWest_EventScript_FerryToSlateport:: BattleFrontier_OutsideWest_EventScript_FerryToLilycove:: msgbox BattleFrontier_OutsideWest_Text_LilycoveItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination + goto_if_eq VAR_RESULT, NO, BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination msgbox BattleFrontier_OutsideWest_Text_PleaseBoardFerry, MSGBOX_DEFAULT call BattleFrontier_OutsideWest_EventScript_BoardFerry warp MAP_LILYCOVE_CITY_HARBOR, 8, 11 @@ -155,14 +152,10 @@ BattleFrontier_OutsideWest_EventScript_Camper:: lock faceplayer delay 20 - compare VAR_FACING, DIR_NORTH - call_if_eq BattleFrontier_OutsideWest_EventScript_CamperFaceFactory - compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_OutsideWest_EventScript_CamperAlreadyFacingFactory - compare VAR_FACING, DIR_WEST - call_if_eq BattleFrontier_OutsideWest_EventScript_CamperFaceFactory - compare VAR_FACING, DIR_EAST - call_if_eq BattleFrontier_OutsideWest_EventScript_CamperFaceFactory + call_if_eq VAR_FACING, DIR_NORTH, BattleFrontier_OutsideWest_EventScript_CamperFaceFactory + call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_OutsideWest_EventScript_CamperAlreadyFacingFactory + call_if_eq VAR_FACING, DIR_WEST, BattleFrontier_OutsideWest_EventScript_CamperFaceFactory + call_if_eq VAR_FACING, DIR_EAST, BattleFrontier_OutsideWest_EventScript_CamperFaceFactory msgbox BattleFrontier_OutsideWest_Text_WhosRaisingThoseRentalMons, MSGBOX_DEFAULT release end @@ -180,14 +173,10 @@ BattleFrontier_OutsideWest_EventScript_Girl:: faceplayer message BattleFrontier_OutsideWest_Text_ScaredOfPikeBecauseSeviper waitmessage - compare VAR_FACING, DIR_NORTH - call_if_eq BattleFrontier_OutsideWest_EventScript_GirlShudderNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_OutsideWest_EventScript_GirlShudderSouth - compare VAR_FACING, DIR_WEST - call_if_eq BattleFrontier_OutsideWest_EventScript_GirlShudderWest - compare VAR_FACING, DIR_EAST - call_if_eq BattleFrontier_OutsideWest_EventScript_GirlShudderEast + call_if_eq VAR_FACING, DIR_NORTH, BattleFrontier_OutsideWest_EventScript_GirlShudderNorth + call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_OutsideWest_EventScript_GirlShudderSouth + call_if_eq VAR_FACING, DIR_WEST, BattleFrontier_OutsideWest_EventScript_GirlShudderWest + call_if_eq VAR_FACING, DIR_EAST, BattleFrontier_OutsideWest_EventScript_GirlShudderEast waitbuttonpress release end @@ -237,8 +226,7 @@ BattleFrontier_OutsideWest_EventScript_Woman2:: faceplayer msgbox BattleFrontier_OutsideWest_Text_LetsPlayRockPaperScissors, MSGBOX_DEFAULT random 2 - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_OutsideWest_EventScript_WomanWonRockPaperScissors + goto_if_eq VAR_RESULT, 1, BattleFrontier_OutsideWest_EventScript_WomanWonRockPaperScissors goto BattleFrontier_OutsideWest_EventScript_WomanLostRockPaperScissors end diff --git a/data/maps/BattleFrontier_RankingHall/scripts.inc b/data/maps/BattleFrontier_RankingHall/scripts.inc index a6c62cf862..915ed98d9f 100644 --- a/data/maps/BattleFrontier_RankingHall/scripts.inc +++ b/data/maps/BattleFrontier_RankingHall/scripts.inc @@ -86,8 +86,7 @@ BattleFrontier_RankingHall_EventScript_NinjaBoy:: lock faceplayer msgbox BattleFrontier_RankingHall_Text_IsYourNameOnThisList, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BattleFrontier_RankingHall_EventScript_NinjaBoyNameOnList + goto_if_eq VAR_RESULT, YES, BattleFrontier_RankingHall_EventScript_NinjaBoyNameOnList msgbox BattleFrontier_RankingHall_Text_WorkHarderIfYouSawFriendsName, MSGBOX_DEFAULT release end diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc index 9d2bc59474..affd05d349 100644 --- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc +++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc @@ -35,8 +35,7 @@ BattleFrontier_ScottsHouse_EventScript_CheckSilverSymbols:: goto_if_unset FLAG_SYS_PYRAMID_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield msgbox BattleFrontier_ScottsHouse_Text_YouveCollectedAllSilverSymbols, MSGBOX_DEFAULT giveitem ITEM_LANSAT_BERRY - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ScottsHouse_EventScript_BerryPocketFull + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_BerryPocketFull setflag FLAG_COLLECTED_ALL_SILVER_SYMBOLS setflag FLAG_TEMP_4 release @@ -52,8 +51,7 @@ BattleFrontier_ScottsHouse_EventScript_CheckGoldSymbols:: goto_if_unset FLAG_SYS_PYRAMID_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield msgbox BattleFrontier_ScottsHouse_Text_YouveCollectedAllGoldSymbols, MSGBOX_DEFAULT giveitem ITEM_STARF_BERRY - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ScottsHouse_EventScript_BerryPocketFull + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_BerryPocketFull setflag FLAG_COLLECTED_ALL_GOLD_SYMBOLS setflag FLAG_TEMP_4 release @@ -71,10 +69,8 @@ BattleFrontier_ScottsHouse_EventScript_GivenBerry:: BattleFrontier_ScottsHouse_EventScript_RandomComment:: random 3 - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_FrontierBrainComment - compare VAR_RESULT, 2 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment + goto_if_eq VAR_RESULT, 1, BattleFrontier_ScottsHouse_EventScript_FrontierBrainComment + goto_if_eq VAR_RESULT, 2, BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment msgbox BattleFrontier_ScottsHouse_Text_WhyIGoSeekingTrainers, MSGBOX_DEFAULT release end @@ -93,20 +89,17 @@ BattleFrontier_ScottsHouse_EventScript_CheckGiveSilverShield:: setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 50 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield + goto_if_ge VAR_RESULT, 50, BattleFrontier_ScottsHouse_EventScript_GiveSilverShield frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 50 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield + goto_if_ge VAR_RESULT, 50, BattleFrontier_ScottsHouse_EventScript_GiveSilverShield goto BattleFrontier_ScottsHouse_EventScript_RandomComment end BattleFrontier_ScottsHouse_EventScript_GiveSilverShield:: msgbox BattleFrontier_ScottsHouse_Text_Beat50TrainersInARow, MSGBOX_DEFAULT givedecoration DECOR_SILVER_SHIELD - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ScottsHouse_EventScript_NoRoomForShield + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_NoRoomForShield setflag FLAG_RECEIVED_SILVER_SHIELD setflag FLAG_TEMP_3 goto BattleFrontier_ScottsHouse_EventScript_GivenShield @@ -126,20 +119,17 @@ BattleFrontier_ScottsHouse_EventScript_CheckGiveGoldShield:: setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50 tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 100 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield + goto_if_ge VAR_RESULT, 100, BattleFrontier_ScottsHouse_EventScript_GiveGoldShield frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN tower_get TOWER_DATA_WIN_STREAK - compare VAR_RESULT, 100 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield + goto_if_ge VAR_RESULT, 100, BattleFrontier_ScottsHouse_EventScript_GiveGoldShield goto BattleFrontier_ScottsHouse_EventScript_RandomComment end BattleFrontier_ScottsHouse_EventScript_GiveGoldShield:: msgbox BattleFrontier_ScottsHouse_Text_Beat100TrainersInARow, MSGBOX_DEFAULT givedecoration DECOR_GOLD_SHIELD - compare VAR_RESULT, FALSE - goto_if_eq BattleFrontier_ScottsHouse_EventScript_NoRoomForShield + goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_NoRoomForShield setflag FLAG_RECEIVED_GOLD_SHIELD setflag FLAG_TEMP_3 goto BattleFrontier_ScottsHouse_EventScript_GivenShield @@ -154,24 +144,17 @@ BattleFrontier_ScottsHouse_EventScript_WelcomeToFrontier:: msgbox BattleFrontier_ScottsHouse_Text_WelcomeToBattleFrontier, MSGBOX_DEFAULT closemessage delay 30 - compare VAR_FACING, DIR_NORTH - call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth - compare VAR_FACING, DIR_EAST - call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast - compare VAR_FACING, DIR_WEST - call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest + call_if_eq VAR_FACING, DIR_NORTH, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth + call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth + call_if_eq VAR_FACING, DIR_EAST, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast + call_if_eq VAR_FACING, DIR_WEST, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest msgbox BattleFrontier_ScottsHouse_Text_HowMuchEffortItTookToMakeReal, MSGBOX_DEFAULT applymovement LOCALID_SCOTT, Common_Movement_FacePlayer waitmovement 0 msgbox BattleFrontier_ScottsHouse_Text_HaveThisAsMementoOfOurPathsCrossing, MSGBOX_DEFAULT - compare VAR_SCOTT_STATE, 13 - goto_if_eq BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints - compare VAR_SCOTT_STATE, 9 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints - compare VAR_SCOTT_STATE, 6 - goto_if_ge BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints + goto_if_eq VAR_SCOTT_STATE, 13, BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints + goto_if_ge VAR_SCOTT_STATE, 9, BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints + goto_if_ge VAR_SCOTT_STATE, 6, BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints goto BattleFrontier_ScottsHouse_EventScript_Give1BattlePoint end diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index cd1583b420..57d54d6fdc 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -38,8 +38,7 @@ BirthIsland_Exterior_OnResume: BirthIsland_Exterior_EventScript_TryRemoveDeoxys:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_DEOXYS return @@ -92,12 +91,9 @@ BirthIsland_Exterior_EventScript_Deoxys:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq BirthIsland_Exterior_EventScript_DefeatedDeoxys - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq BirthIsland_Exterior_EventScript_RanFromDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_WON, BirthIsland_Exterior_EventScript_DefeatedDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BirthIsland_Exterior_EventScript_RanFromDeoxys + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BirthIsland_Exterior_EventScript_RanFromDeoxys setflag FLAG_BATTLED_DEOXYS release end diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc index 8d3fa5b5e4..e91238cbdc 100644 --- a/data/maps/BirthIsland_Harbor/scripts.inc +++ b/data/maps/BirthIsland_Harbor/scripts.inc @@ -8,8 +8,7 @@ BirthIsland_Harbor_EventScript_Sailor:: lock faceplayer msgbox BirthIsland_Harbor_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq BirthIsland_Harbor_EventScript_AsYouLike + goto_if_eq VAR_RESULT, NO, BirthIsland_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown diff --git a/data/maps/ContestHall/scripts.inc b/data/maps/ContestHall/scripts.inc index 3dd633f8f7..7ca6a57f69 100644 --- a/data/maps/ContestHall/scripts.inc +++ b/data/maps/ContestHall/scripts.inc @@ -19,16 +19,11 @@ ContestHall_OnTransition: ContestHall_EventScript_ReadyContestMusic:: call ContestHall_EventScript_TryWaitForLink special GetContestMultiplayerId - compare VAR_RESULT, 0 - call_if_eq ContestHall_EventScript_SaveContestMusicPlayer1 - compare VAR_RESULT, 1 - call_if_eq ContestHall_EventScript_SaveContestMusicPlayer2 - compare VAR_RESULT, 2 - call_if_eq ContestHall_EventScript_SaveContestMusicPlayer3 - compare VAR_RESULT, 3 - call_if_eq ContestHall_EventScript_SaveContestMusicPlayer4 - compare VAR_RESULT, 4 - call_if_eq ContestHall_EventScript_SaveContestMusic + call_if_eq VAR_RESULT, 0, ContestHall_EventScript_SaveContestMusicPlayer1 + call_if_eq VAR_RESULT, 1, ContestHall_EventScript_SaveContestMusicPlayer2 + call_if_eq VAR_RESULT, 2, ContestHall_EventScript_SaveContestMusicPlayer3 + call_if_eq VAR_RESULT, 3, ContestHall_EventScript_SaveContestMusicPlayer4 + call_if_eq VAR_RESULT, 4, ContestHall_EventScript_SaveContestMusic return ContestHall_EventScript_SaveContestMusicPlayer1:: @@ -52,8 +47,7 @@ ContestHall_EventScript_SaveContestMusic:: return ContestHall_OnResume: - compare VAR_TEMP_9, 1 - call_if_eq ContestHall_EventScript_ReShowAudience + call_if_eq VAR_TEMP_9, 1, ContestHall_EventScript_ReShowAudience end ContestHall_EventScript_ReShowAudience:: @@ -84,8 +78,7 @@ ContestHall_EventScript_SetContestObjects:: ContestHall_EventScript_AddRandomAudienceMembers:: call ContestHall_EventScript_GetRandomAudienceGfxId call ContestHall_EventScript_SetRandomAudienceGfx - compare VAR_TEMP_0, 8 - goto_if_lt ContestHall_EventScript_AddRandomAudienceMembers + goto_if_lt VAR_TEMP_0, 8, ContestHall_EventScript_AddRandomAudienceMembers return ContestHall_EventScript_SetRandomAudienceGfx:: @@ -303,8 +296,7 @@ ContestHall_EventScript_RandomAudienceScientist1:: ContestHall_EventScript_CreateAudience:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_CreateWirelessContestAudience + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_CreateWirelessContestAudience switch VAR_CONTEST_TYPE case CONTEST_TYPE_NPC_NORMAL, ContestHall_EventScript_CreateNormalContestAudience case CONTEST_TYPE_NPC_SUPER, ContestHall_EventScript_CreateSuperContestAudience @@ -444,10 +436,8 @@ ContestHall_EventScript_SetExitWarpLinkContest:: LilycoveCity_ContestLobby_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LilycoveCity_ContestLobby_EventScript_SetPlayerGfxBrendan - compare VAR_RESULT, FEMALE - goto_if_eq LilycoveCity_ContestLobby_EventScript_SetPlayerGfxMay + goto_if_eq VAR_RESULT, MALE, LilycoveCity_ContestLobby_EventScript_SetPlayerGfxBrendan + goto_if_eq VAR_RESULT, FEMALE, LilycoveCity_ContestLobby_EventScript_SetPlayerGfxMay return LilycoveCity_ContestLobby_EventScript_SetPlayerGfxBrendan:: diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index 0e7a3c2814..2aaa61ebb9 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -10,8 +10,7 @@ DesertRuins_OnResume: DesertRuins_EventScript_TryRemoveRegirock:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -68,12 +67,9 @@ DesertRuins_EventScript_Regirock:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq DesertRuins_EventScript_DefeatedRegirock - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq DesertRuins_EventScript_RanFromRegirock - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq DesertRuins_EventScript_RanFromRegirock + goto_if_eq VAR_RESULT, B_OUTCOME_WON, DesertRuins_EventScript_DefeatedRegirock + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, DesertRuins_EventScript_RanFromRegirock + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, DesertRuins_EventScript_RanFromRegirock setflag FLAG_DEFEATED_REGIROCK release end diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc index ca6e822507..1250c2d767 100644 --- a/data/maps/DewfordTown/scripts.inc +++ b/data/maps/DewfordTown/scripts.inc @@ -54,8 +54,7 @@ DewfordTown_EventScript_CancelSailSelect:: DewfordTown_EventScript_ReturnToPetalburgPrompt:: msgbox DewfordTown_Text_SetSailBackToPetalburg, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq DewfordTown_EventScript_SailBackToPetalburg + goto_if_eq VAR_RESULT, YES, DewfordTown_EventScript_SailBackToPetalburg msgbox DewfordTown_Text_GoDeliverIllBeWaiting, MSGBOX_DEFAULT release end @@ -87,10 +86,8 @@ DewfordTown_EventScript_OldRodFisherman:: faceplayer goto_if_set FLAG_RECEIVED_OLD_ROD, DewfordTown_EventScript_HowsFishing msgbox DewfordTown_Text_GettingItchToFish, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq DewfordTown_EventScript_GiveOldRod - compare VAR_RESULT, NO - goto_if_eq DewfordTown_EventScript_NotGettingItchToFish + goto_if_eq VAR_RESULT, YES, DewfordTown_EventScript_GiveOldRod + goto_if_eq VAR_RESULT, NO, DewfordTown_EventScript_NotGettingItchToFish end DewfordTown_EventScript_GiveOldRod:: @@ -110,10 +107,8 @@ DewfordTown_EventScript_HowsFishing:: message DewfordTown_Text_HowsYourFishing waitmessage multichoice 20, 8, MULTI_HOWS_FISHING, TRUE - compare VAR_RESULT, 0 - goto_if_eq DewfordTown_EventScript_FishingExcellent - compare VAR_RESULT, 1 - goto_if_eq DewfordTown_EventScript_FishingNotSoGood + goto_if_eq VAR_RESULT, 0, DewfordTown_EventScript_FishingExcellent + goto_if_eq VAR_RESULT, 1, DewfordTown_EventScript_FishingNotSoGood end DewfordTown_EventScript_FishingExcellent:: @@ -607,10 +602,8 @@ DewfordTown_EventScript_TrendyPhraseBoy:: faceplayer call Common_EventScript_BufferTrendyPhrase msgbox DewfordTown_Text_XIsTheBiggestHappeningThingRight, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq DewfordTown_EventScript_ConfirmTrendyPhrase - compare VAR_RESULT, NO - goto_if_eq DewfordTown_EventScript_RejectTrendyPhrase + goto_if_eq VAR_RESULT, YES, DewfordTown_EventScript_ConfirmTrendyPhrase + goto_if_eq VAR_RESULT, NO, DewfordTown_EventScript_RejectTrendyPhrase end DewfordTown_EventScript_ConfirmTrendyPhrase:: @@ -624,16 +617,13 @@ DewfordTown_EventScript_RejectTrendyPhrase:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, TRUE - goto_if_eq DewfordTown_EventScript_GiveNewTrendyPhrase - compare VAR_RESULT, FALSE - goto_if_eq DewfordTown_EventScript_CancelNewTrendyPhrase + goto_if_eq VAR_RESULT, TRUE, DewfordTown_EventScript_GiveNewTrendyPhrase + goto_if_eq VAR_RESULT, FALSE, DewfordTown_EventScript_CancelNewTrendyPhrase end DewfordTown_EventScript_GiveNewTrendyPhrase:: incrementgamestat GAME_STAT_STARTED_TRENDS - compare VAR_0x8004, FALSE - goto_if_eq DewfordTown_EventScript_PhraseNotTrendyEnough + goto_if_eq VAR_0x8004, FALSE, DewfordTown_EventScript_PhraseNotTrendyEnough msgbox DewfordTown_Text_OfCourseIKnowAboutThat, MSGBOX_DEFAULT release end diff --git a/data/maps/DewfordTown_Gym/scripts.inc b/data/maps/DewfordTown_Gym/scripts.inc index 355ca15f4d..81474af726 100644 --- a/data/maps/DewfordTown_Gym/scripts.inc +++ b/data/maps/DewfordTown_Gym/scripts.inc @@ -10,18 +10,12 @@ DewfordTown_Gym_EventScript_SetFlashLevel:: goto_if_defeated TRAINER_BRAWLY_1, DewfordTown_Gym_EventScript_SetLightsOn call DewfordTown_Gym_EventScript_CountTrainersDefeated copyvar VAR_0x8001, VAR_0x8000 - compare VAR_0x8000, 0 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel7 - compare VAR_0x8000, 1 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel6 - compare VAR_0x8000, 2 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel5 - compare VAR_0x8000, 3 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel4 - compare VAR_0x8000, 4 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel3 - compare VAR_0x8000, 5 - goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel2 + goto_if_eq VAR_0x8000, 0, DewfordTown_Gym_EventScript_SetFlashLevel7 + goto_if_eq VAR_0x8000, 1, DewfordTown_Gym_EventScript_SetFlashLevel6 + goto_if_eq VAR_0x8000, 2, DewfordTown_Gym_EventScript_SetFlashLevel5 + goto_if_eq VAR_0x8000, 3, DewfordTown_Gym_EventScript_SetFlashLevel4 + goto_if_eq VAR_0x8000, 4, DewfordTown_Gym_EventScript_SetFlashLevel3 + goto_if_eq VAR_0x8000, 5, DewfordTown_Gym_EventScript_SetFlashLevel2 goto DewfordTown_Gym_EventScript_SetFlashLevel1 DewfordTown_Gym_EventScript_SetLightsOn:: @@ -61,21 +55,14 @@ DewfordTown_Gym_EventScript_SetFlashLevel7:: DewfordTown_Gym_EventScript_BrightenRoom:: call DewfordTown_Gym_EventScript_CountTrainersDefeated nop1 - compare VAR_0x8000, VAR_0x8001 - goto_if_eq DewfordTown_Gym_EventScript_NoLightChange + goto_if_eq VAR_0x8000, VAR_0x8001, DewfordTown_Gym_EventScript_NoLightChange copyvar VAR_0x8001, VAR_0x8000 - compare VAR_0x8000, 1 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash1Trainer - compare VAR_0x8000, 2 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash2Trainers - compare VAR_0x8000, 3 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash3Trainers - compare VAR_0x8000, 4 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash4Trainers - compare VAR_0x8000, 5 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash5Trainers - compare VAR_0x8000, 6 - goto_if_eq DewfordTown_Gym_EventScript_AnimateFlash6Trainers + goto_if_eq VAR_0x8000, 1, DewfordTown_Gym_EventScript_AnimateFlash1Trainer + goto_if_eq VAR_0x8000, 2, DewfordTown_Gym_EventScript_AnimateFlash2Trainers + goto_if_eq VAR_0x8000, 3, DewfordTown_Gym_EventScript_AnimateFlash3Trainers + goto_if_eq VAR_0x8000, 4, DewfordTown_Gym_EventScript_AnimateFlash4Trainers + goto_if_eq VAR_0x8000, 5, DewfordTown_Gym_EventScript_AnimateFlash5Trainers + goto_if_eq VAR_0x8000, 6, DewfordTown_Gym_EventScript_AnimateFlash6Trainers DewfordTown_Gym_EventScript_NoLightChange:: return @@ -148,8 +135,7 @@ DewfordTown_Gym_EventScript_StopCountingTrainers:: DewfordTown_Gym_EventScript_Brawly:: trainerbattle_single TRAINER_BRAWLY_1, DewfordTown_Gym_Text_BrawlyIntro, DewfordTown_Gym_Text_BrawlyDefeat, DewfordTown_Gym_EventScript_BrawlyDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq DewfordTown_Gym_EventScript_BrawlyRematch + goto_if_eq VAR_RESULT, TRUE, DewfordTown_Gym_EventScript_BrawlyRematch goto_if_unset FLAG_RECEIVED_TM08, DewfordTown_Gym_EventScript_GiveBulkUp2 msgbox DewfordTown_Gym_Text_BrawlyPostBattle, MSGBOX_DEFAULT release @@ -164,8 +150,7 @@ DewfordTown_Gym_EventScript_BrawlyDefeated:: setflag FLAG_DEFEATED_DEWFORD_GYM setflag FLAG_BADGE02_GET addvar VAR_PETALBURG_GYM_STATE, 1 - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_eq Common_EventScript_ReadyPetalburgGymForBattle + call_if_eq VAR_PETALBURG_GYM_STATE, 6, Common_EventScript_ReadyPetalburgGymForBattle setvar VAR_0x8008, 2 call Common_EventScript_SetGymTrainers call DewfordTown_Gym_EventScript_GiveBulkUp @@ -184,16 +169,14 @@ DewfordTown_Gym_EventScript_BrawlyDefeated:: DewfordTown_Gym_EventScript_GiveBulkUp:: giveitem ITEM_TM08 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_BagIsFull msgbox DewfordTown_Gym_Text_ExplainBulkUp, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM08 return DewfordTown_Gym_EventScript_GiveBulkUp2: giveitem ITEM_TM08 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull msgbox DewfordTown_Gym_Text_ExplainBulkUp, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM08 release diff --git a/data/maps/DewfordTown_Hall/scripts.inc b/data/maps/DewfordTown_Hall/scripts.inc index 9d8392ff16..6249a7fac5 100644 --- a/data/maps/DewfordTown_Hall/scripts.inc +++ b/data/maps/DewfordTown_Hall/scripts.inc @@ -11,8 +11,7 @@ DewfordTown_Hall_EventScript_Girl:: faceplayer call Common_EventScript_BufferTrendyPhrase special IsTrendyPhraseBoring - compare VAR_RESULT, TRUE - goto_if_eq DewfordTown_Hall_EventScript_GirlBoredOfTrend + goto_if_eq VAR_RESULT, TRUE, DewfordTown_Hall_EventScript_GirlBoredOfTrend msgbox DewfordTown_Hall_Text_CantImagineLifeWithoutTrend, MSGBOX_DEFAULT release end @@ -36,10 +35,8 @@ DewfordTown_Hall_EventScript_Man:: call Common_EventScript_BufferTrendyPhrase special BufferDeepLinkPhrase msgbox DewfordTown_Hall_Text_DeepLinkBetweenXAndY, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq DewfordTown_Hall_EventScript_ConfirmTrendLink - compare VAR_RESULT, NO - goto_if_eq DewfordTown_Hall_EventScript_RejectTrendLink + goto_if_eq VAR_RESULT, YES, DewfordTown_Hall_EventScript_ConfirmTrendLink + goto_if_eq VAR_RESULT, NO, DewfordTown_Hall_EventScript_RejectTrendLink end DewfordTown_Hall_EventScript_ConfirmTrendLink:: @@ -196,15 +193,12 @@ DewfordTown_Hall_EventScript_DontMovePlayer1:: DewfordTown_Hall_EventScript_DebateReact1:: applymovement LOCALID_PSYCHIC_M, DewfordTown_Hall_Movement_PsychicWalkInPlaceLeft waitmovement 0 - compare VAR_0x8008, 0 - goto_if_eq DewfordTown_Hall_EventScript_PlayerReactWest - compare VAR_0x8008, 1 - goto_if_eq DewfordTown_Hall_EventScript_DontMovePlayer2 + goto_if_eq VAR_0x8008, 0, DewfordTown_Hall_EventScript_PlayerReactWest + goto_if_eq VAR_0x8008, 1, DewfordTown_Hall_EventScript_DontMovePlayer2 end DewfordTown_Hall_EventScript_PlayerReactWest:: - compare VAR_FACING, DIR_EAST - goto_if_eq DewfordTown_Hall_EventScript_DontMovePlayer1 + goto_if_eq VAR_FACING, DIR_EAST, DewfordTown_Hall_EventScript_DontMovePlayer1 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 return @@ -215,17 +209,13 @@ DewfordTown_Hall_EventScript_DontMovePlayer2:: DewfordTown_Hall_EventScript_DebateReact2:: applymovement LOCALID_SCHOOL_KID_M, DewfordTown_Hall_Movement_SchoolKidWalkInPlaceRight waitmovement 0 - compare VAR_0x8008, 0 - goto_if_eq DewfordTown_Hall_EventScript_PlayerReactNorthSouth - compare VAR_0x8008, 1 - goto_if_eq DewfordTown_Hall_EventScript_PlayerReactEast + goto_if_eq VAR_0x8008, 0, DewfordTown_Hall_EventScript_PlayerReactNorthSouth + goto_if_eq VAR_0x8008, 1, DewfordTown_Hall_EventScript_PlayerReactEast end DewfordTown_Hall_EventScript_PlayerReactNorthSouth:: - compare VAR_FACING, DIR_NORTH - call_if_eq DewfordTown_Hall_EventScript_PlayerWalkInPlaceUp - compare VAR_FACING, DIR_SOUTH - call_if_eq DewfordTown_Hall_EventScript_PlayerWalkInPlaceDown + call_if_eq VAR_FACING, DIR_NORTH, DewfordTown_Hall_EventScript_PlayerWalkInPlaceUp + call_if_eq VAR_FACING, DIR_SOUTH, DewfordTown_Hall_EventScript_PlayerWalkInPlaceDown return DewfordTown_Hall_EventScript_PlayerWalkInPlaceUp:: @@ -239,8 +229,7 @@ DewfordTown_Hall_EventScript_PlayerWalkInPlaceDown:: return DewfordTown_Hall_EventScript_PlayerReactEast:: - compare VAR_FACING, DIR_WEST - goto_if_eq DewfordTown_Hall_EventScript_DontMovePlayer1 + goto_if_eq VAR_FACING, DIR_WEST, DewfordTown_Hall_EventScript_DontMovePlayer1 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 return @@ -260,8 +249,7 @@ DewfordTown_Hall_EventScript_SludgeBombMan:: goto_if_set FLAG_RECEIVED_TM36, DewfordTown_Hall_EventScript_ReceivedSludgeBomb msgbox DewfordTown_Hall_Text_GiveYouSludgeBomb, MSGBOX_DEFAULT giveitem ITEM_TM36 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM36 release end diff --git a/data/maps/DewfordTown_House2/scripts.inc b/data/maps/DewfordTown_House2/scripts.inc index ae173f151c..cb68664aaf 100644 --- a/data/maps/DewfordTown_House2/scripts.inc +++ b/data/maps/DewfordTown_House2/scripts.inc @@ -7,8 +7,7 @@ DewfordTown_House2_EventScript_Man:: goto_if_set FLAG_RECEIVED_SILK_SCARF, DewfordTown_House2_EventScript_ExplainSilkScarf msgbox DewfordTown_House2_Text_WantYouToHaveSilkScarf, MSGBOX_DEFAULT giveitem ITEM_SILK_SCARF - compare VAR_RESULT, FALSE - goto_if_eq DewfordTown_House2_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, DewfordTown_House2_EventScript_NoRoomForScarf setflag FLAG_RECEIVED_SILK_SCARF release end diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index d33c57df86..1039422808 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -57,17 +57,13 @@ EverGrandeCity_ChampionsRoom_EventScript_Defeated:: closemessage playse SE_DOOR checkplayergender - compare VAR_RESULT, MALE - call_if_eq EverGrandeCity_ChampionsRoom_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - call_if_eq EverGrandeCity_ChampionsRoom_EventScript_PlayBrendanMusic + call_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_PlayMayMusic + call_if_eq VAR_RESULT, FEMALE, EverGrandeCity_ChampionsRoom_EventScript_PlayBrendanMusic addobject LOCALID_RIVAL call EverGrandeCity_ChampionsRoom_EventScript_RivalApproachPlayer checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_MayAdvice - compare VAR_RESULT, FEMALE - goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_BrendanAdvice + goto_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_MayAdvice + goto_if_eq VAR_RESULT, FEMALE, EverGrandeCity_ChampionsRoom_EventScript_BrendanAdvice end EverGrandeCity_ChampionsRoom_EventScript_PlayMayMusic:: @@ -132,10 +128,8 @@ EverGrandeCity_ChampionsRoom_EventScript_BirchArrivesExitForHoF:: waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_WallaceWaitOutside, MSGBOX_DEFAULT checkplayergender - compare VAR_RESULT, MALE - call_if_eq EverGrandeCity_ChampionsRoom_EventScript_MayCongratulations - compare VAR_RESULT, FEMALE - call_if_eq EverGrandeCity_ChampionsRoom_EventScript_BrendanCongratulations + call_if_eq VAR_RESULT, MALE, EverGrandeCity_ChampionsRoom_EventScript_MayCongratulations + call_if_eq VAR_RESULT, FEMALE, EverGrandeCity_ChampionsRoom_EventScript_BrendanCongratulations closemessage applymovement LOCALID_WALLACE, EverGrandeCity_ChampionsRoom_Movement_WallaceExit applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExit diff --git a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc index 75b16e7750..80b1f568c8 100644 --- a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc +++ b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc @@ -26,8 +26,7 @@ EverGrandeCity_DrakesRoom_EventScript_WalkInCloseDoor:: EverGrandeCity_DrakesRoom_OnLoad: call_if_set FLAG_DEFEATED_ELITE_4_DRAKE, EverGrandeCity_DrakesRoom_EventScript_ResetAdvanceToNextRoom - compare VAR_ELITE_4_STATE, 4 - call_if_eq EverGrandeCity_DrakesRoom_EventScript_CloseDoor + call_if_eq VAR_ELITE_4_STATE, 4, EverGrandeCity_DrakesRoom_EventScript_CloseDoor end EverGrandeCity_DrakesRoom_EventScript_ResetAdvanceToNextRoom:: diff --git a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc index 59f4440c45..b2d556448c 100644 --- a/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc +++ b/data/maps/EverGrandeCity_GlaciasRoom/scripts.inc @@ -25,8 +25,7 @@ EverGrandeCity_GlaciasRoom_EventScript_WalkInCloseDoor:: EverGrandeCity_GlaciasRoom_OnLoad: call_if_set FLAG_DEFEATED_ELITE_4_GLACIA, EverGrandeCity_GlaciasRoom_EventScript_ResetAdvanceToNextRoom - compare VAR_ELITE_4_STATE, 3 - call_if_eq EverGrandeCity_GlaciasRoom_EventScript_CloseDoor + call_if_eq VAR_ELITE_4_STATE, 3, EverGrandeCity_GlaciasRoom_EventScript_CloseDoor end EverGrandeCity_GlaciasRoom_EventScript_ResetAdvanceToNextRoom:: diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc index b494408f13..92b01af970 100644 --- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc +++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc @@ -46,10 +46,8 @@ EverGrandeCity_HallOfFame_EventScript_EnterHallOfFame:: setvar VAR_TEMP_1, 1 call EverGrandeCity_HallOfFame_EventScript_SetGameClearFlags checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EverGrandeCity_HallOfFame_EventScript_GameClearMale - compare VAR_RESULT, FEMALE - goto_if_eq EverGrandeCity_HallOfFame_EventScript_GameClearFemale + goto_if_eq VAR_RESULT, MALE, EverGrandeCity_HallOfFame_EventScript_GameClearMale + goto_if_eq VAR_RESULT, FEMALE, EverGrandeCity_HallOfFame_EventScript_GameClearFemale end EverGrandeCity_HallOfFame_EventScript_GameClearMale:: diff --git a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc index b64f5145a0..ed272eb901 100644 --- a/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc +++ b/data/maps/EverGrandeCity_PhoebesRoom/scripts.inc @@ -25,8 +25,7 @@ EverGrandeCity_PhoebesRoom_EventScript_WalkInCloseDoor:: EverGrandeCity_PhoebesRoom_OnLoad: call_if_set FLAG_DEFEATED_ELITE_4_PHOEBE, EverGrandeCity_PhoebesRoom_EventScript_ResetAdvanceToNextRoom - compare VAR_ELITE_4_STATE, 2 - call_if_eq EverGrandeCity_PhoebesRoom_EventScript_CloseDoor + call_if_eq VAR_ELITE_4_STATE, 2, EverGrandeCity_PhoebesRoom_EventScript_CloseDoor end EverGrandeCity_PhoebesRoom_EventScript_ResetAdvanceToNextRoom:: diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc index 1244b82fd2..ec45732e8c 100644 --- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc @@ -37,12 +37,9 @@ EverGrandeCity_PokemonCenter_1F_EventScript_Scott:: faceplayer msgbox EverGrandeCity_PokemonCenter_1F_Text_ScottHappyForYou, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq EverGrandeCity_PokemonCenter_1F_EventScript_ScottExitNorth - compare VAR_FACING, DIR_EAST - call_if_eq EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit - compare VAR_FACING, DIR_WEST - call_if_eq EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit + call_if_eq VAR_FACING, DIR_NORTH, EverGrandeCity_PokemonCenter_1F_EventScript_ScottExitNorth + call_if_eq VAR_FACING, DIR_EAST, EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit + call_if_eq VAR_FACING, DIR_WEST, EverGrandeCity_PokemonCenter_1F_EventScript_ScottExit addvar VAR_SCOTT_STATE, 1 setflag FLAG_MET_SCOTT_IN_EVERGRANDE playse SE_EXIT diff --git a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc index ac7d4f9b45..c13e716975 100644 --- a/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc +++ b/data/maps/EverGrandeCity_PokemonLeague_1F/scripts.inc @@ -55,10 +55,8 @@ EverGrandeCity_PokemonLeague_1F_EventScript_DoorGuard:: lockall goto_if_set FLAG_ENTERED_ELITE_FOUR, EverGrandeCity_PokemonLeague_1F_EventScript_GoForth getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_0, 11 - call_if_ge EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromRight - compare VAR_TEMP_0, 8 - call_if_le EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromLeft + call_if_ge VAR_TEMP_0, 11, EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromRight + call_if_le VAR_TEMP_0, 8, EverGrandeCity_PokemonLeague_1F_EventScript_PlayerMoveToFrontFromLeft message EverGrandeCity_PokemonLeague_1F_Text_MustHaveAllGymBadges waitmessage delay 120 diff --git a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc index 3444d078b1..03b4a4e03b 100644 --- a/data/maps/EverGrandeCity_SidneysRoom/scripts.inc +++ b/data/maps/EverGrandeCity_SidneysRoom/scripts.inc @@ -12,8 +12,7 @@ EverGrandeCity_SidneysRoom_OnTransition: EverGrandeCity_SidneysRoom_OnLoad: call_if_set FLAG_DEFEATED_ELITE_4_SIDNEY, EverGrandeCity_SidneysRoom_EventScript_ResetAdvanceToNextRoom - compare VAR_ELITE_4_STATE, 1 - call_if_eq EverGrandeCity_SidneysRoom_EventScript_CloseDoor + call_if_eq VAR_ELITE_4_STATE, 1, EverGrandeCity_SidneysRoom_EventScript_CloseDoor end EverGrandeCity_SidneysRoom_EventScript_ResetAdvanceToNextRoom:: diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc index 7fc90e4e16..707995daeb 100644 --- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc @@ -18,10 +18,8 @@ FallarborTown_BattleTentBattleRoom_OnTransition: FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @@ -44,8 +42,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_PLAYER, FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge + goto_if_ne VAR_RESULT, 0, FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: tower_setopponent addobject LOCALID_OPPONENT @@ -103,10 +100,8 @@ FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum:: special HealPlayerParty FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge:: frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 1, FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, TRUE switch VAR_RESULT case 0, FallarborTown_BattleTentBattleRoom_EventScript_ContinueChallenge @@ -147,8 +142,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: @ Unreachable code block? The flow into the next block also doesnt make sense arena_get ARENA_DATA_WIN_STREAK - compare VAR_RESULT, MAX_STREAK - goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum + goto_if_eq VAR_RESULT, MAX_STREAK, FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum addvar VAR_RESULT, 1 arena_set ARENA_DATA_WIN_STREAK, VAR_RESULT @ See above diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc index d6826f037f..1bcd04559c 100644 --- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc +++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc @@ -106,8 +106,7 @@ FallarborTown_BattleTentLobby_EventScript_Attendant:: lock faceplayer fallarbortent_getprize - compare VAR_RESULT, ITEM_NONE - goto_if_ne FallarborTown_BattleTentLobby_EventScript_PrizeWaiting + goto_if_ne VAR_RESULT, ITEM_NONE, FallarborTown_BattleTentLobby_EventScript_PrizeWaiting special SavePlayerParty msgbox FallarborTown_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT FallarborTown_BattleTentLobby_EventScript_AskEnterChallenge:: @@ -125,8 +124,7 @@ FallarborTown_BattleTentLobby_EventScript_TryEnterChallenge:: setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES setvar VAR_RESULT, 2 frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, FallarborTown_BattleTentLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT msgbox FallarborTown_BattleTentLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -134,8 +132,7 @@ FallarborTown_BattleTentLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge msgbox FallarborTown_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge @@ -153,8 +150,7 @@ FallarborTown_BattleTentLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq FallarborTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, FallarborTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed FallarborTown_BattleTentLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE diff --git a/data/maps/FallarborTown_CozmosHouse/scripts.inc b/data/maps/FallarborTown_CozmosHouse/scripts.inc index 3e5d02f2d3..61f297e69d 100644 --- a/data/maps/FallarborTown_CozmosHouse/scripts.inc +++ b/data/maps/FallarborTown_CozmosHouse/scripts.inc @@ -6,8 +6,7 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo:: faceplayer goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite checkitem ITEM_METEORITE - compare VAR_RESULT, TRUE - goto_if_eq FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite + goto_if_eq VAR_RESULT, TRUE, FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT release end @@ -15,12 +14,10 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo:: FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite:: call_if_unset FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_NoticeMeteorite call_if_set FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_AskForMeteorite - compare VAR_RESULT, NO - goto_if_eq FallarborTown_CozmosHouse_EventScript_DeclineGiveMeteorite + goto_if_eq VAR_RESULT, NO, FallarborTown_CozmosHouse_EventScript_DeclineGiveMeteorite msgbox FallarborTown_CozmosHouse_Text_PleaseUseThisTM, MSGBOX_DEFAULT giveitem ITEM_TM27 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setvar VAR_0x8004, ITEM_METEORITE call Common_EventScript_PlayerHandedOverTheItem setflag FLAG_RECEIVED_TM27 diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc index 096f138771..f17754328d 100644 --- a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc +++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc @@ -15,8 +15,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_MoveRelearner:: FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove:: checkitem ITEM_HEART_SCALE - compare VAR_RESULT, FALSE - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + goto_if_eq VAR_RESULT, FALSE, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale msgbox FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove, MSGBOX_YESNO switch VAR_RESULT case NO, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale @@ -27,13 +26,10 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon:: msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT special ChooseMonForMoveRelearner waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale special IsSelectedMonEgg - compare VAR_RESULT, TRUE - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_CantTeachEgg - compare VAR_0x8005, 0 - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_NoMoveToTeachMon + goto_if_eq VAR_RESULT, TRUE, FallarborTown_MoveRelearnersHouse_EventScript_CantTeachEgg + goto_if_eq VAR_0x8005, 0, FallarborTown_MoveRelearnersHouse_EventScript_NoMoveToTeachMon goto FallarborTown_MoveRelearnersHouse_EventScript_ChooseMove end @@ -41,8 +37,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMove:: msgbox FallarborTown_MoveRelearnersHouse_Text_TeachWhichMove, MSGBOX_DEFAULT special TeachMoveRelearnerMove waitstate - compare VAR_0x8004, 0 - goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon + goto_if_eq VAR_0x8004, 0, FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon msgbox FallarborTown_MoveRelearnersHouse_Text_HandedOverHeartScale, MSGBOX_DEFAULT removeitem ITEM_HEART_SCALE goto FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc index 2f4db2651c..504b0dc6a6 100644 --- a/data/maps/FarawayIsland_Entrance/scripts.inc +++ b/data/maps/FarawayIsland_Entrance/scripts.inc @@ -23,8 +23,7 @@ FarawayIsland_Entrance_EventScript_Sailor:: lock faceplayer msgbox FarawayIsland_Entrance_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq FarawayIsland_Entrance_EventScript_AsYouLike + goto_if_eq VAR_RESULT, NO, FarawayIsland_Entrance_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index e35825be73..983b4709a2 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -13,14 +13,10 @@ FarawayIsland_Interior_OnReturnToField: FarawayIsland_Interior_EventScript_TrySetMewAboveGrass:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq FarawayIsland_Interior_EventScript_SetMewAboveGrass - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq FarawayIsland_Interior_EventScript_SetMewAboveGrass - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_SetMewAboveGrass - compare VAR_RESULT, B_OUTCOME_MON_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_SetMewAboveGrass + goto_if_eq VAR_RESULT, B_OUTCOME_WON, FarawayIsland_Interior_EventScript_SetMewAboveGrass + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, FarawayIsland_Interior_EventScript_SetMewAboveGrass + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, FarawayIsland_Interior_EventScript_SetMewAboveGrass + goto_if_eq VAR_RESULT, B_OUTCOME_MON_TELEPORTED, FarawayIsland_Interior_EventScript_SetMewAboveGrass return FarawayIsland_Interior_EventScript_SetMewAboveGrass:: @@ -34,8 +30,7 @@ FarawayIsland_Interior_OnResume: FarawayIsland_Interior_EventScript_TryRemoveMew:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -127,14 +122,10 @@ FarawayIsland_Interior_EventScript_Mew:: message FarawayIsland_Interior_Text_Mew waitse playmoncry SPECIES_MEW, CRY_MODE_ENCOUNTER - compare VAR_FACING, DIR_NORTH - call_if_eq FarawayIsland_Interior_EventScript_FoundMewNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq FarawayIsland_Interior_EventScript_FoundMewSouth - compare VAR_FACING, DIR_WEST - call_if_eq FarawayIsland_Interior_EventScript_FoundMewWest - compare VAR_FACING, DIR_EAST - call_if_eq FarawayIsland_Interior_EventScript_FoundMewEast + call_if_eq VAR_FACING, DIR_NORTH, FarawayIsland_Interior_EventScript_FoundMewNorth + call_if_eq VAR_FACING, DIR_SOUTH, FarawayIsland_Interior_EventScript_FoundMewSouth + call_if_eq VAR_FACING, DIR_WEST, FarawayIsland_Interior_EventScript_FoundMewWest + call_if_eq VAR_FACING, DIR_EAST, FarawayIsland_Interior_EventScript_FoundMewEast special DestroyMewEmergingGrassSprite delay 40 waitmoncry @@ -147,14 +138,10 @@ FarawayIsland_Interior_EventScript_Mew:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq FarawayIsland_Interior_EventScript_MewDefeated - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan - compare VAR_RESULT, B_OUTCOME_MON_TELEPORTED - goto_if_eq FarawayIsland_Interior_EventScript_PlayerOrMewRan + goto_if_eq VAR_RESULT, B_OUTCOME_WON, FarawayIsland_Interior_EventScript_MewDefeated + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, FarawayIsland_Interior_EventScript_PlayerOrMewRan + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, FarawayIsland_Interior_EventScript_PlayerOrMewRan + goto_if_eq VAR_RESULT, B_OUTCOME_MON_TELEPORTED, FarawayIsland_Interior_EventScript_PlayerOrMewRan setflag FLAG_CAUGHT_MEW release end diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc index a9fe64ade3..f1694aaa84 100644 --- a/data/maps/FortreeCity/scripts.inc +++ b/data/maps/FortreeCity/scripts.inc @@ -56,16 +56,14 @@ FortreeCity_EventScript_Kecleon:: lock faceplayer checkitem ITEM_DEVON_SCOPE - compare VAR_RESULT, TRUE - goto_if_eq FortreeCity_EventScript_AskUseDevonScope + goto_if_eq VAR_RESULT, TRUE, FortreeCity_EventScript_AskUseDevonScope msgbox FortreeCity_Text_SomethingUnseeable, MSGBOX_DEFAULT release end FortreeCity_EventScript_AskUseDevonScope:: msgbox FortreeCity_Text_UnseeableUseDevonScope, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq FortreeCity_EventScript_UseDevonScope + goto_if_eq VAR_RESULT, YES, FortreeCity_EventScript_UseDevonScope release end diff --git a/data/maps/FortreeCity_Gym/scripts.inc b/data/maps/FortreeCity_Gym/scripts.inc index caac724738..1c729bc44e 100644 --- a/data/maps/FortreeCity_Gym/scripts.inc +++ b/data/maps/FortreeCity_Gym/scripts.inc @@ -18,8 +18,7 @@ FortreeCity_Gym_EventScript_InitRotatingGates:: FortreeCity_Gym_EventScript_Winona:: trainerbattle_single TRAINER_WINONA_1, FortreeCity_Gym_Text_WinonaIntro, FortreeCity_Gym_Text_WinonaDefeat, FortreeCity_Gym_EventScript_WinonaDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq FortreeCity_Gym_EventScript_WinonaRematch + goto_if_eq VAR_RESULT, TRUE, FortreeCity_Gym_EventScript_WinonaRematch goto_if_unset FLAG_RECEIVED_TM40, FortreeCity_Gym_EventScript_GiveAerialAce2 msgbox FortreeCity_Gym_Text_WinonaPostBattle, MSGBOX_DEFAULT release @@ -50,8 +49,7 @@ FortreeCity_Gym_EventScript_WinonaDefeated:: FortreeCity_Gym_EventScript_GiveAerialAce2:: giveitem ITEM_TM40 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox FortreeCity_Gym_Text_ExplainAerialAce, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM40 release @@ -59,8 +57,7 @@ FortreeCity_Gym_EventScript_GiveAerialAce2:: FortreeCity_Gym_EventScript_GiveAerialAce:: giveitem ITEM_TM40 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox FortreeCity_Gym_Text_ExplainAerialAce, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM40 return diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc index a16c261128..a072f56106 100644 --- a/data/maps/FortreeCity_House1/scripts.inc +++ b/data/maps/FortreeCity_House1/scripts.inc @@ -10,18 +10,15 @@ FortreeCity_House1_EventScript_Trader:: specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox FortreeCity_House1_Text_YouWillTradeWontYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq FortreeCity_House1_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, FortreeCity_House1_EventScript_DeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq FortreeCity_House1_EventScript_DeclineTrade + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, FortreeCity_House1_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne FortreeCity_House1_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, FortreeCity_House1_EventScript_NotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/FortreeCity_House2/scripts.inc b/data/maps/FortreeCity_House2/scripts.inc index 29e9ea93cf..cdd0fc99f7 100644 --- a/data/maps/FortreeCity_House2/scripts.inc +++ b/data/maps/FortreeCity_House2/scripts.inc @@ -20,8 +20,7 @@ FortreeCity_House2_EventScript_HiddenPowerGiver:: case 0, FortreeCity_House2_EventScript_WrongGuess msgbox FortreeCity_House2_Text_YourHiddenPowerHasAwoken, MSGBOX_DEFAULT giveitem ITEM_TM10 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM10 msgbox FortreeCity_House2_Text_ExplainHiddenPower, MSGBOX_DEFAULT release diff --git a/data/maps/FortreeCity_House4/scripts.inc b/data/maps/FortreeCity_House4/scripts.inc index c416cf1475..ed91674173 100644 --- a/data/maps/FortreeCity_House4/scripts.inc +++ b/data/maps/FortreeCity_House4/scripts.inc @@ -34,8 +34,7 @@ FortreeCity_House4_EventScript_WingullReturned:: waitmovement 0 msgbox FortreeCity_House4_Text_WelcomeWingullTakeMentalHerb, MSGBOX_DEFAULT giveitem ITEM_MENTAL_HERB - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_MENTAL_HERB releaseall end diff --git a/data/maps/GraniteCave_StevensRoom/scripts.inc b/data/maps/GraniteCave_StevensRoom/scripts.inc index b57eb0de6d..384e648ee2 100644 --- a/data/maps/GraniteCave_StevensRoom/scripts.inc +++ b/data/maps/GraniteCave_StevensRoom/scripts.inc @@ -12,8 +12,7 @@ GraniteCave_StevensRoom_EventScript_Steven:: setflag FLAG_DELIVERED_STEVEN_LETTER msgbox GraniteCave_StevensRoom_Text_ThankYouTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM47 - compare VAR_RESULT, FALSE - call_if_eq GraniteCave_StevensRoom_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, GraniteCave_StevensRoom_EventScript_BagFull msgbox GraniteCave_StevensRoom_Text_CouldBecomeChampionLetsRegister, MSGBOX_DEFAULT closemessage delay 30 @@ -25,14 +24,10 @@ GraniteCave_StevensRoom_EventScript_Steven:: setflag FLAG_REGISTERED_STEVEN_POKENAV msgbox GraniteCave_StevensRoom_Text_IveGotToHurryAlong, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq GraniteCave_StevensRoom_EventScript_StevenExitNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq GraniteCave_StevensRoom_EventScript_StevenExitSouth - compare VAR_FACING, DIR_WEST - call_if_eq GraniteCave_StevensRoom_EventScript_StevenExitWestEast - compare VAR_FACING, DIR_EAST - call_if_eq GraniteCave_StevensRoom_EventScript_StevenExitWestEast + call_if_eq VAR_FACING, DIR_NORTH, GraniteCave_StevensRoom_EventScript_StevenExitNorth + call_if_eq VAR_FACING, DIR_SOUTH, GraniteCave_StevensRoom_EventScript_StevenExitSouth + call_if_eq VAR_FACING, DIR_WEST, GraniteCave_StevensRoom_EventScript_StevenExitWestEast + call_if_eq VAR_FACING, DIR_EAST, GraniteCave_StevensRoom_EventScript_StevenExitWestEast playse SE_EXIT removeobject LOCALID_STEVEN release diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc index 5152794498..c59d5a97be 100644 --- a/data/maps/InsideOfTruck/scripts.inc +++ b/data/maps/InsideOfTruck/scripts.inc @@ -17,10 +17,8 @@ InsideOfTruck_EventScript_SetIntroFlags:: lockall setflag FLAG_HIDE_MAP_NAME_POPUP checkplayergender - compare VAR_RESULT, MALE - goto_if_eq InsideOfTruck_EventScript_SetIntroFlagsMale - compare VAR_RESULT, FEMALE - goto_if_eq InsideOfTruck_EventScript_SetIntroFlagsFemale + goto_if_eq VAR_RESULT, MALE, InsideOfTruck_EventScript_SetIntroFlagsMale + goto_if_eq VAR_RESULT, FEMALE, InsideOfTruck_EventScript_SetIntroFlagsFemale end InsideOfTruck_EventScript_SetIntroFlagsMale:: diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index 83e4d015a6..8f8236a5c0 100644 --- a/data/maps/IslandCave/scripts.inc +++ b/data/maps/IslandCave/scripts.inc @@ -10,8 +10,7 @@ IslandCave_OnResume: IslandCave_EventScript_TryRemoveRegice:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -101,12 +100,9 @@ IslandCave_EventScript_Regice:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq IslandCave_EventScript_DefeatedRegice - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq IslandCave_EventScript_RanFromRegice - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq IslandCave_EventScript_RanFromRegice + goto_if_eq VAR_RESULT, B_OUTCOME_WON, IslandCave_EventScript_DefeatedRegice + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, IslandCave_EventScript_RanFromRegice + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, IslandCave_EventScript_RanFromRegice setflag FLAG_DEFEATED_REGICE release end diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc index 18a8c29994..f969a4dec6 100644 --- a/data/maps/JaggedPass/scripts.inc +++ b/data/maps/JaggedPass/scripts.inc @@ -8,14 +8,12 @@ JaggedPass_MapScripts:: JaggedPass_OnResume: setstepcallback STEP_CB_ASH - compare VAR_JAGGED_PASS_STATE, 0 - call_if_eq JaggedPass_EventScript_CheckHasMagmaEmblem + call_if_eq VAR_JAGGED_PASS_STATE, 0, JaggedPass_EventScript_CheckHasMagmaEmblem end JaggedPass_EventScript_CheckHasMagmaEmblem:: checkitem ITEM_MAGMA_EMBLEM - compare VAR_RESULT, TRUE - goto_if_eq JaggedPass_EventScript_SetReadyToOpenHideout + goto_if_eq VAR_RESULT, TRUE, JaggedPass_EventScript_SetReadyToOpenHideout return JaggedPass_EventScript_SetReadyToOpenHideout:: @@ -23,8 +21,7 @@ JaggedPass_EventScript_SetReadyToOpenHideout:: return JaggedPass_OnTransition: - compare VAR_JAGGED_PASS_ASH_WEATHER, 1 - call_if_eq JaggedPass_EventScript_SetWeatherAsh + call_if_eq VAR_JAGGED_PASS_ASH_WEATHER, 1, JaggedPass_EventScript_SetWeatherAsh end JaggedPass_EventScript_SetWeatherAsh:: @@ -33,8 +30,7 @@ JaggedPass_EventScript_SetWeatherAsh:: return JaggedPass_OnLoad: - compare VAR_JAGGED_PASS_STATE, 1 - goto_if_le JaggedPass_EventScript_ConcealHideoutEntrance + goto_if_le VAR_JAGGED_PASS_STATE, 1, JaggedPass_EventScript_ConcealHideoutEntrance end JaggedPass_EventScript_ConcealHideoutEntrance:: @@ -106,8 +102,7 @@ JaggedPass_EventScript_Eric:: JaggedPass_EventScript_Diana:: trainerbattle_single TRAINER_DIANA_1, JaggedPass_Text_DianaIntro, JaggedPass_Text_DianaDefeat, JaggedPass_EventScript_RegisterDiana specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq JaggedPass_EventScript_DianaRematch + goto_if_eq VAR_RESULT, TRUE, JaggedPass_EventScript_DianaRematch msgbox JaggedPass_Text_DianaPostBattle, MSGBOX_DEFAULT release end @@ -127,8 +122,7 @@ JaggedPass_EventScript_DianaRematch:: JaggedPass_EventScript_Ethan:: trainerbattle_single TRAINER_ETHAN_1, JaggedPass_Text_EthanIntro, JaggedPass_Text_EthanDefeat, JaggedPass_EventScript_RegisterEthan specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq JaggedPass_EventScript_EthanRematch + goto_if_eq VAR_RESULT, TRUE, JaggedPass_EventScript_EthanRematch msgbox JaggedPass_Text_EthanPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/LavaridgeTown/scripts.inc b/data/maps/LavaridgeTown/scripts.inc index 2b7f8f331f..3ce226c4c1 100644 --- a/data/maps/LavaridgeTown/scripts.inc +++ b/data/maps/LavaridgeTown/scripts.inc @@ -12,10 +12,8 @@ LavaridgeTown_OnTransition: call_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, LavaridgeTown_EventScript_ShowMtChimneyTrainers call Common_EventScript_SetupRivalGfxId call Common_EventScript_SetupRivalOnBikeGfxId - compare VAR_LAVARIDGE_TOWN_STATE, 1 - call_if_eq LavaridgeTown_EventScript_CheckSetRivalPos - compare VAR_LAVARIDGE_TOWN_STATE, 1 - call_if_eq LavaridgeTown_EventScript_HideMapNamePopup + call_if_eq VAR_LAVARIDGE_TOWN_STATE, 1, LavaridgeTown_EventScript_CheckSetRivalPos + call_if_eq VAR_LAVARIDGE_TOWN_STATE, 1, LavaridgeTown_EventScript_HideMapNamePopup end LavaridgeTown_EventScript_ClearLavaridgeWhiteOut:: @@ -24,8 +22,7 @@ LavaridgeTown_EventScript_ClearLavaridgeWhiteOut:: LavaridgeTown_EventScript_CheckSetRivalPos:: getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 9 - goto_if_eq LavaridgeTown_EventScript_SetRivalPos + goto_if_eq VAR_0x8004, 9, LavaridgeTown_EventScript_SetRivalPos return LavaridgeTown_EventScript_SetRivalPos:: @@ -50,25 +47,17 @@ LavaridgeTown_OnFrame: LavaridgeTown_EventScript_RivalGiveGoGoggles:: lockall getplayerxy VAR_0x8008, VAR_0x8009 - compare VAR_0x8008, 9 - call_if_eq LavaridgeTown_EventScript_RivalNoticePlayer - compare VAR_0x8008, 9 - call_if_ne LavaridgeTown_EventScript_RivalExitHerbShop + call_if_eq VAR_0x8008, 9, LavaridgeTown_EventScript_RivalNoticePlayer + call_if_ne VAR_0x8008, 9, LavaridgeTown_EventScript_RivalExitHerbShop delay 20 checkplayergender - compare VAR_RESULT, MALE - call_if_eq LavaridgeTown_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - call_if_eq LavaridgeTown_EventScript_PlayBrendanMusic - compare VAR_0x8008, 9 - call_if_eq LavaridgeTown_EventScript_RivalApproachPlayer1 - compare VAR_0x8008, 9 - call_if_ne LavaridgeTown_EventScript_RivalApproachPlayer2 + call_if_eq VAR_RESULT, MALE, LavaridgeTown_EventScript_PlayMayMusic + call_if_eq VAR_RESULT, FEMALE, LavaridgeTown_EventScript_PlayBrendanMusic + call_if_eq VAR_0x8008, 9, LavaridgeTown_EventScript_RivalApproachPlayer1 + call_if_ne VAR_0x8008, 9, LavaridgeTown_EventScript_RivalApproachPlayer2 checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LavaridgeTown_EventScript_MayGiveGoGoggles - compare VAR_RESULT, FEMALE - goto_if_eq LavaridgeTown_EventScript_BrendanGiveGoGoggles + goto_if_eq VAR_RESULT, MALE, LavaridgeTown_EventScript_MayGiveGoGoggles + goto_if_eq VAR_RESULT, FEMALE, LavaridgeTown_EventScript_BrendanGiveGoGoggles end LavaridgeTown_EventScript_MayGiveGoGoggles:: @@ -92,10 +81,8 @@ LavaridgeTown_EventScript_RivalExit:: removeobject LOCALID_RIVAL addobject LOCALID_RIVAL_ON_BIKE delay 30 - compare VAR_0x8008, 9 - call_if_eq LavaridgeTown_EventScript_RivalExit1 - compare VAR_0x8008, 9 - call_if_ne LavaridgeTown_EventScript_RivalExit2 + call_if_eq VAR_0x8008, 9, LavaridgeTown_EventScript_RivalExit1 + call_if_ne VAR_0x8008, 9, LavaridgeTown_EventScript_RivalExit2 removeobject LOCALID_RIVAL_ON_BIKE setvar VAR_LAVARIDGE_TOWN_STATE, 2 clearflag FLAG_HIDE_MAP_NAME_POPUP @@ -214,8 +201,7 @@ LavaridgeTown_Movement_RivalExitHerbShop: LavaridgeTown_EventScript_HotSpringsTrigger:: specialvar VAR_RESULT, GetPlayerFacingDirection - compare VAR_RESULT, DIR_SOUTH - goto_if_eq LavaridgeTown_EventScript_EnteredHotSprings + goto_if_eq VAR_RESULT, DIR_SOUTH, LavaridgeTown_EventScript_EnteredHotSprings end LavaridgeTown_EventScript_EnteredHotSprings:: @@ -251,11 +237,9 @@ LavaridgeTown_EventScript_EggWoman:: faceplayer goto_if_set FLAG_RECEIVED_LAVARIDGE_EGG, LavaridgeTown_EventScript_ReceivedEgg msgbox LavaridgeTown_Text_HaveEggWillYouTakeIt, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LavaridgeTown_EventScript_DeclineEgg + goto_if_eq VAR_RESULT, NO, LavaridgeTown_EventScript_DeclineEgg getpartysize - compare VAR_RESULT, PARTY_SIZE - goto_if_eq LavaridgeTown_EventScript_NoRoomForEgg + goto_if_eq VAR_RESULT, PARTY_SIZE, LavaridgeTown_EventScript_NoRoomForEgg msgbox LavaridgeTown_Text_HopeYoullWalkPlentyWithEgg, MSGBOX_DEFAULT setflag FLAG_RECEIVED_LAVARIDGE_EGG playfanfare MUS_OBTAIN_ITEM diff --git a/data/maps/LavaridgeTown_Gym_1F/scripts.inc b/data/maps/LavaridgeTown_Gym_1F/scripts.inc index 608f32e24c..6628360c15 100644 --- a/data/maps/LavaridgeTown_Gym_1F/scripts.inc +++ b/data/maps/LavaridgeTown_Gym_1F/scripts.inc @@ -51,8 +51,7 @@ LavaridgeTown_Gym_1F_EventScript_EndCheckBuryTrainers:: LavaridgeTown_Gym_1F_EventScript_Flannery:: trainerbattle_single TRAINER_FLANNERY_1, LavaridgeTown_Gym_1F_Text_FlanneryIntro, LavaridgeTown_Gym_1F_Text_FlanneryDefeat, LavaridgeTown_Gym_1F_EventScript_FlanneryDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq LavaridgeTown_Gym_1F_EventScript_FlanneryRematch + goto_if_eq VAR_RESULT, TRUE, LavaridgeTown_Gym_1F_EventScript_FlanneryRematch goto_if_unset FLAG_RECEIVED_TM50, LavaridgeTown_Gym_1F_EventScript_GiveOverheat2 msgbox LavaridgeTown_Gym_1F_Text_FlanneryPostBattle, MSGBOX_DEFAULT release @@ -67,8 +66,7 @@ LavaridgeTown_Gym_1F_EventScript_FlanneryDefeated:: setflag FLAG_DEFEATED_LAVARIDGE_GYM setflag FLAG_BADGE04_GET addvar VAR_PETALBURG_GYM_STATE, 1 - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_eq Common_EventScript_ReadyPetalburgGymForBattle + call_if_eq VAR_PETALBURG_GYM_STATE, 6, Common_EventScript_ReadyPetalburgGymForBattle setvar VAR_0x8008, 4 call Common_EventScript_SetGymTrainers setflag FLAG_HIDE_VERDANTURF_TOWN_WANDAS_HOUSE_WALLY @@ -87,8 +85,7 @@ LavaridgeTown_Gym_1F_EventScript_FlanneryDefeated:: LavaridgeTown_Gym_1F_EventScript_GiveOverheat2:: giveitem ITEM_TM50 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox LavaridgeTown_Gym_1F_Text_ExplainOverheat, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM50 release @@ -96,8 +93,7 @@ LavaridgeTown_Gym_1F_EventScript_GiveOverheat2:: LavaridgeTown_Gym_1F_EventScript_GiveOverheat:: giveitem ITEM_TM50 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox LavaridgeTown_Gym_1F_Text_ExplainOverheat, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM50 return @@ -116,8 +112,7 @@ LavaridgeTown_Gym_EventScript_CheckTrainerScript:: call LavaridgeTown_Gym_1F_EventScript_SetTrainerTempVars release special ShouldTryGetTrainerScript - compare VAR_RESULT, 1 - goto_if_eq EventScript_GotoTrainerScript + goto_if_eq VAR_RESULT, 1, EventScript_GotoTrainerScript end LavaridgeTown_Gym_1F_EventScript_Axle:: diff --git a/data/maps/LavaridgeTown_HerbShop/scripts.inc b/data/maps/LavaridgeTown_HerbShop/scripts.inc index 2637f5c09d..dbe1b564ac 100644 --- a/data/maps/LavaridgeTown_HerbShop/scripts.inc +++ b/data/maps/LavaridgeTown_HerbShop/scripts.inc @@ -31,8 +31,7 @@ LavaridgeTown_HerbShop_EventScript_OldMan:: goto_if_set FLAG_RECEIVED_CHARCOAL, LavaridgeTown_HerbShop_EventScript_ExplainCharcoal msgbox LavaridgeTown_HerbShop_Text_YouveComeToLookAtHerbalMedicine, MSGBOX_DEFAULT giveitem ITEM_CHARCOAL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_CHARCOAL release end diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index 648aae5642..094592d646 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -42,8 +42,7 @@ LilycoveCity_EventScript_BerryGentleman:: random 10 addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_LILYCOVE_RECEIVED_BERRY msgbox LilycoveCity_Text_BecauseYoureTrainer, MSGBOX_DEFAULT release @@ -234,18 +233,15 @@ LilycoveCity_EventScript_Rival:: lock faceplayer checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LilycoveCity_EventScript_May - compare VAR_RESULT, FEMALE - goto_if_eq LilycoveCity_EventScript_Brendan + goto_if_eq VAR_RESULT, MALE, LilycoveCity_EventScript_May + goto_if_eq VAR_RESULT, FEMALE, LilycoveCity_EventScript_Brendan end LilycoveCity_EventScript_May:: playbgm MUS_ENCOUNTER_MAY, TRUE call_if_set FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_MayAskToBattleAgain call_if_unset FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_MayAskToBattle - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_EventScript_DeclineMayBattle + goto_if_eq VAR_RESULT, NO, LilycoveCity_EventScript_DeclineMayBattle msgbox LilycoveCity_Text_MayWontBeBeaten, MSGBOX_DEFAULT switch VAR_STARTER_MON case 0, LilycoveCity_EventScript_BattleMayTreecko @@ -273,8 +269,7 @@ LilycoveCity_EventScript_Brendan:: playbgm MUS_ENCOUNTER_BRENDAN, TRUE call_if_set FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_BrendanAskToBattleAgain call_if_unset FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_BrendanAskToBattle - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_EventScript_DeclineBrendanBattle + goto_if_eq VAR_RESULT, NO, LilycoveCity_EventScript_DeclineBrendanBattle msgbox LilycoveCity_Text_BrendanWontBeBeaten, MSGBOX_DEFAULT switch VAR_STARTER_MON case 0, LilycoveCity_EventScript_BattleBrendanTreecko @@ -332,10 +327,8 @@ LilycoveCity_EventScript_DefeatedMay:: msgbox LilycoveCity_Text_MayGoingBackToLittleroot, MSGBOX_DEFAULT setvar VAR_RESULT, FALSE call_if_set FLAG_BADGE06_GET, LilycoveCity_EventScript_CheckFinalBadge - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_EventScript_MayCollectBadges - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_EventScript_MayPokemonLeague + call_if_eq VAR_RESULT, FALSE, LilycoveCity_EventScript_MayCollectBadges + call_if_eq VAR_RESULT, TRUE, LilycoveCity_EventScript_MayPokemonLeague clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_PICHU_DOLL goto LilycoveCity_EventScript_RivalFlyAway @@ -366,10 +359,8 @@ LilycoveCity_EventScript_DefeatedBrendan:: msgbox LilycoveCity_Text_BrendanGoingBackToLittleroot, MSGBOX_DEFAULT setvar VAR_RESULT, FALSE call_if_set FLAG_BADGE06_GET, LilycoveCity_EventScript_CheckFinalBadge - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_EventScript_BrendanCollectBadges - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_EventScript_BrendanPokemonLeague + call_if_eq VAR_RESULT, FALSE, LilycoveCity_EventScript_BrendanCollectBadges + call_if_eq VAR_RESULT, TRUE, LilycoveCity_EventScript_BrendanPokemonLeague clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_SWABLU_DOLL goto LilycoveCity_EventScript_RivalFlyAway @@ -408,10 +399,8 @@ LilycoveCity_EventScript_SchoolKidM:: lock faceplayer msgbox LilycoveCity_Text_DoYouKnowAboutBerryBlender, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq LilycoveCity_EventScript_KnowAboutBerryBlender - compare VAR_RESULT, NO - call_if_eq LilycoveCity_EventScript_DontKnowAboutBerryBlender + call_if_eq VAR_RESULT, YES, LilycoveCity_EventScript_KnowAboutBerryBlender + call_if_eq VAR_RESULT, NO, LilycoveCity_EventScript_DontKnowAboutBerryBlender release end diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 84a790aede..fa884a0966 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -18,8 +18,7 @@ LilycoveCity_ContestLobby_OnTransition: LilycoveCity_ContestLobby_EventScript_TryShowBlendMaster:: getpokenewsactive POKENEWS_BLENDMASTER - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_ShowBlendMaster + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_ShowBlendMaster clearflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER_REPLACEMENT setflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER return @@ -52,10 +51,8 @@ LilycoveCity_ContestLobby_EventScript_ContestArtist:: showcontestpainting CONTEST_WINNER_ARTIST lockall msgbox LilycoveCity_ContestLobby_Text_ShouldITakePaintingToMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePainting + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum + goto_if_eq VAR_RESULT, NO, LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePainting releaseall end @@ -65,8 +62,7 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum:: special SaveMuseumContestPainting setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0 specialvar VAR_RESULT, GiveMonArtistRibbon - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_ContestLobby_EventScript_ReceivedArtistRibbon + call_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_ReceivedArtistRibbon applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistExit waitmovement 0 removeobject LOCALID_ARTIST @@ -77,8 +73,7 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum:: LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePainting:: msgbox LilycoveCity_ContestLobby_Text_TakeHomeButIdLikeToTakeToMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseum msgbox LilycoveCity_ContestLobby_Text_FineThatsTheWayItIs, MSGBOX_DEFAULT closemessage applymovement LOCALID_ARTIST, LilycoveCity_ContestLobby_Movement_ArtistExit @@ -225,10 +220,8 @@ LilycoveCity_ContestLobby_EventScript_LinkContestArtist:: fadescreen FADE_TO_BLACK showcontestpainting CONTEST_WINNER_ARTIST msgbox LilycoveCity_ContestLobby_Text_ShouldITakePaintingToMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePaintingLink + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink + goto_if_eq VAR_RESULT, NO, LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePaintingLink end LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink:: @@ -237,8 +230,7 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink:: special SaveMuseumContestPainting setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0 specialvar VAR_RESULT, GiveMonArtistRibbon - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_ContestLobby_EventScript_ReceivedLinkArtistRibbon + call_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_ReceivedLinkArtistRibbon applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistExit waitmovement 0 removeobject LOCALID_ARTIST_LINK @@ -249,8 +241,7 @@ LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink:: LilycoveCity_ContestLobby_EventScript_ConfirmDontTakePaintingLink:: msgbox LilycoveCity_ContestLobby_Text_TakeHomeButIdLikeToTakeToMuseum, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_TakePaintingToMuseumLink msgbox LilycoveCity_ContestLobby_Text_FineThatsTheWayItIs, MSGBOX_DEFAULT closemessage applymovement LOCALID_ARTIST_LINK, LilycoveCity_ContestLobby_Movement_LinkArtistExit @@ -327,8 +318,7 @@ LilycoveCity_ContestLobby_Movement_LinkArtistReturnToPlayer: LilycoveCity_ContestLobby_EventScript_ContestReceptionist:: special ClearLinkContestFlags specialvar VAR_RESULT, IsContestDebugActive @ Always FALSE - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_SetDebug + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_SetDebug call LilycoveCity_ContestLobby_EventScript_SpeakToContestReceptionist call LilycoveCity_ContestLobby_EventScript_LeadToContestHall special SetContestTrainerGfxIds @@ -648,11 +638,9 @@ LilycoveCity_ContestLobby_EventScript_AskEnterLinkContest:: LilycoveCity_ContestLobby_EventScript_TryEnterLinkContest:: msgbox LilycoveCity_ContestLobby_Text_ProgressWillBeSaved, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_RESULT, NO, LilycoveCity_ContestLobby_EventScript_CancelLinkContest call Common_EventScript_SaveGame - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_ContestLobby_EventScript_CancelLinkContest message LilycoveCity_ContestLobby_Text_WhichContestMode waitmessage specialvar VAR_TEMP_D, IsWirelessAdapterConnected @@ -671,8 +659,7 @@ LilycoveCity_ContestLobby_EventScript_EmeraldMode:: LilycoveCity_ContestLobby_EventScript_GlobalMode:: setvar VAR_TEMP_C, 1 - compare VAR_TEMP_D, 1 - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkNoWirelessGMode + goto_if_eq VAR_TEMP_D, 1, LilycoveCity_ContestLobby_EventScript_CancelLinkNoWirelessGMode goto LilycoveCity_ContestLobby_EventScript_ChooseLinkContestType end @@ -724,19 +711,13 @@ LilycoveCity_ContestLobby_EventScript_ChooseLinkContestMon:: msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon3, MSGBOX_DEFAULT setvar VAR_CONTEST_RANK, 0 choosecontestmon - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, LilycoveCity_ContestLobby_EventScript_CancelLinkContest special TryEnterContestMon - compare VAR_RESULT, CANT_ENTER_CONTEST - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkCantEnterLowRank - compare VAR_RESULT, CAN_ENTER_CONTEST_EQUAL_RANK - goto_if_eq LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest - compare VAR_RESULT, CAN_ENTER_CONTEST_HIGH_RANK - goto_if_eq LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest - compare VAR_RESULT, CANT_ENTER_CONTEST_EGG - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkCantEnterEgg - compare VAR_RESULT, CANT_ENTER_CONTEST_FAINTED - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkCantEnterFainted + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST, LilycoveCity_ContestLobby_EventScript_LinkCantEnterLowRank + goto_if_eq VAR_RESULT, CAN_ENTER_CONTEST_EQUAL_RANK, LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest + goto_if_eq VAR_RESULT, CAN_ENTER_CONTEST_HIGH_RANK, LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST_EGG, LilycoveCity_ContestLobby_EventScript_LinkCantEnterEgg + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST_FAINTED, LilycoveCity_ContestLobby_EventScript_LinkCantEnterFainted end LilycoveCity_ContestLobby_EventScript_LinkCantEnterLowRank:: @@ -760,29 +741,19 @@ LilycoveCity_ContestLobby_EventScript_EnterMonForLinkContest:: end LilycoveCity_ContestLobby_EventScript_TrySetUpLinkContest:: - compare VAR_TEMP_D, 1 - goto_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupType - compare VAR_TEMP_D, 2 - goto_if_ge LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_TEMP_D, 1, LilycoveCity_ContestLobby_EventScript_SetLinkGroupType + goto_if_ge VAR_TEMP_D, 2, LilycoveCity_ContestLobby_EventScript_CancelLinkContest message LilycoveCity_ContestLobby_Text_PleaseWaitBButtonCancel waitmessage copyvar VAR_0x8004, VAR_RESULT - compare VAR_TEMP_C, 0 - call_if_eq LilycoveCity_ContestLobby_EventScript_TryLinkEMode - compare VAR_TEMP_C, 1 - call_if_eq LilycoveCity_ContestLobby_EventScript_TryLinkGMode - compare VAR_TEMP_C, 2 - goto_if_ge LilycoveCity_ContestLobby_EventScript_CancelLinkContest - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkError - compare VAR_RESULT, LINKUP_FAILED_CONTEST_GMODE - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkModeDifference + call_if_eq VAR_TEMP_C, 0, LilycoveCity_ContestLobby_EventScript_TryLinkEMode + call_if_eq VAR_TEMP_C, 1, LilycoveCity_ContestLobby_EventScript_TryLinkGMode + goto_if_ge VAR_TEMP_C, 2, LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, LilycoveCity_ContestLobby_EventScript_CancelLinkDifferentChoices + goto_if_eq VAR_RESULT, LINKUP_FAILED, LilycoveCity_ContestLobby_EventScript_CancelLinkContest + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, LilycoveCity_ContestLobby_EventScript_CancelLinkError + goto_if_eq VAR_RESULT, LINKUP_FAILED_CONTEST_GMODE, LilycoveCity_ContestLobby_EventScript_CancelLinkModeDifference messageinstant LilycoveCity_ContestLobby_Text_Transmitting contestlinktransfer switch VAR_0x8004 @@ -849,16 +820,11 @@ LilycoveCity_ContestLobby_EventScript_StartLinkContest:: end LilycoveCity_ContestLobby_EventScript_SetLinkGroupType:: - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_COOL - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupCoolContest - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_BEAUTY - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupBeautyContest - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_CUTE - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupCuteContest - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_SMART - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupSmartContest - compare VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_TOUGH - call_if_eq LilycoveCity_ContestLobby_EventScript_SetLinkGroupToughContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_COOL, LilycoveCity_ContestLobby_EventScript_SetLinkGroupCoolContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_BEAUTY, LilycoveCity_ContestLobby_EventScript_SetLinkGroupBeautyContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_CUTE, LilycoveCity_ContestLobby_EventScript_SetLinkGroupCuteContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_SMART, LilycoveCity_ContestLobby_EventScript_SetLinkGroupSmartContest + call_if_eq VAR_CONTEST_CATEGORY, CONTEST_CATEGORY_TOUGH, LilycoveCity_ContestLobby_EventScript_SetLinkGroupToughContest goto LilycoveCity_ContestLobby_EventScript_DecideLinkLeader end @@ -895,23 +861,17 @@ LilycoveCity_ContestLobby_EventScript_DecideLinkLeader:: LilycoveCity_ContestLobby_EventScript_TryLeadGroup:: call LilycoveCity_ContestLobby_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq LilycoveCity_ContestLobby_EventScript_DecideLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq LilycoveCity_ContestLobby_EventScript_TryLeadGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided + goto_if_eq VAR_RESULT, LINKUP_FAILED, LilycoveCity_ContestLobby_EventScript_DecideLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, LilycoveCity_ContestLobby_EventScript_TryLeadGroup release end LilycoveCity_ContestLobby_EventScript_TryJoinGroup:: call LilycoveCity_ContestLobby_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq LilycoveCity_ContestLobby_EventScript_DecideLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq LilycoveCity_ContestLobby_EventScript_TryJoinGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided + goto_if_eq VAR_RESULT, LINKUP_FAILED, LilycoveCity_ContestLobby_EventScript_DecideLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, LilycoveCity_ContestLobby_EventScript_TryJoinGroup release end diff --git a/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc b/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc index a5e8b40cf6..ca7481b533 100644 --- a/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc +++ b/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc @@ -7,8 +7,7 @@ LilycoveCity_CoveLilyMotel_2F_EventScript_GameDesigner:: call_if_unset FLAG_TEMP_2, LilycoveCity_CoveLilyMotel_2F_EventScript_ShowMeCompletedDex call_if_set FLAG_TEMP_2, LilycoveCity_CoveLilyMotel_2F_EventScript_ShowDiploma specialvar VAR_RESULT, HasAllHoennMons - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_CoveLilyMotel_2F_EventScript_AllHoennMonsFanfare + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_CoveLilyMotel_2F_EventScript_AllHoennMonsFanfare release end diff --git a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc index 3e7c4c4f66..d7d152408d 100644 --- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc @@ -60,8 +60,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_1F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect @@ -70,8 +69,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_2F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect @@ -80,8 +78,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_3F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect @@ -90,8 +87,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_4F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect @@ -100,8 +96,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor:: LilycoveCity_DepartmentStoreElevator_EventScript_5thFloor:: setvar VAR_0x8006, DEPT_STORE_FLOORNUM_5F setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 2, 1 - compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F - goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect + goto_if_eq VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F, LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator setvar VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F goto LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc index 224d3c778a..8c67ee1496 100644 --- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc @@ -4,10 +4,8 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts:: LilycoveCity_DepartmentStoreRooftop_OnTransition: getpokenewsactive POKENEWS_LILYCOVE - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_HideSaleWoman + call_if_eq VAR_RESULT, TRUE, LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman + call_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_HideSaleWoman end LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman:: @@ -52,8 +50,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_Man:: lock faceplayer getpokenewsactive POKENEWS_LILYCOVE - compare VAR_RESULT, TRUE - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale + call_if_eq VAR_RESULT, TRUE, LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale msgbox LilycoveCity_DepartmentStoreRooftop_Text_SetDatesForClearOutSales, MSGBOX_DEFAULT release end @@ -126,23 +123,15 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade:: return LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: - compare VAR_TEMP_1, 0 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater - compare VAR_TEMP_1, 1 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop - compare VAR_TEMP_1, 2 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink + call_if_eq VAR_TEMP_1, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater + call_if_eq VAR_TEMP_1, 1, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop + call_if_eq VAR_TEMP_1, 2, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink checkitemspace VAR_TEMP_0 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink - compare VAR_TEMP_1, 0 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater - compare VAR_TEMP_1, 1 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop - compare VAR_TEMP_1, 2 - call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink + call_if_eq VAR_TEMP_1, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater + call_if_eq VAR_TEMP_1, 1, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop + call_if_eq VAR_TEMP_1, 2, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade updatemoneybox bufferitemname STR_VAR_1, VAR_TEMP_0 playse SE_VEND @@ -152,11 +141,9 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: bufferstdstring STR_VAR_3, STDSTRING_ITEMS msgbox gText_PutItemInPocket, MSGBOX_DEFAULT random 64 @ 1/64 chance of an additional drink dropping - compare VAR_RESULT, 0 - goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink + goto_if_ne VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink checkitemspace VAR_TEMP_0 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 @@ -164,11 +151,9 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink:: bufferstdstring STR_VAR_3, STDSTRING_ITEMS msgbox gText_PutItemInPocket, MSGBOX_DEFAULT random 64 @ 1/64 * the prev 1/64 chance of a third additional drink dropping, ~ 0.02% chance - compare VAR_RESULT, 0 - goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink + goto_if_ne VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink checkitemspace VAR_TEMP_0 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink + goto_if_eq VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink playse SE_VEND msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT additem VAR_TEMP_0 diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc index 45a0a844e6..b0656cfd4a 100644 --- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc @@ -11,12 +11,10 @@ LilycoveCity_DepartmentStore_1F_EventScript_LotteryClerk:: lock faceplayer dotimebasedevents - compare VAR_POKELOT_PRIZE_ITEM, ITEM_NONE - goto_if_ne LilycoveCity_DepartmentStore_1F_EventScript_GivePrizeFromEarlier + goto_if_ne VAR_POKELOT_PRIZE_ITEM, ITEM_NONE, LilycoveCity_DepartmentStore_1F_EventScript_GivePrizeFromEarlier goto_if_set FLAG_DAILY_PICKED_LOTO_TICKET, LilycoveCity_DepartmentStore_1F_EventScript_ComeBackTomorrow msgbox LilycoveCity_DepartmentStore_1F_Text_LotteryCornerDrawTicket, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_PleaseVisitAgain + goto_if_eq VAR_RESULT, NO, LilycoveCity_DepartmentStore_1F_EventScript_PleaseVisitAgain setflag FLAG_DAILY_PICKED_LOTO_TICKET message LilycoveCity_DepartmentStore_1F_Text_PleasePickTicket waitmessage @@ -34,25 +32,17 @@ LilycoveCity_DepartmentStore_1F_EventScript_LotteryClerk:: delay 10 applymovement LOCALID_LOTTERY_CLERK, Common_Movement_FacePlayer waitmovement 0 - compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_NoMatch + goto_if_eq VAR_0x8004, 0, LilycoveCity_DepartmentStore_1F_EventScript_NoMatch incrementgamestat GAME_STAT_WON_POKEMON_LOTTERY - compare VAR_0x8006, 0 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPartyMon - compare VAR_0x8006, 1 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPCMon + call_if_eq VAR_0x8006, 0, LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPartyMon + call_if_eq VAR_0x8006, 1, LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPCMon bufferitemname STR_VAR_1, VAR_0x8005 - compare VAR_0x8004, 1 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TwoDigitMatch - compare VAR_0x8004, 2 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_ThreeDigitMatch - compare VAR_0x8004, 3 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_FourDigitMatch - compare VAR_0x8004, 4 - call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_FullMatch + call_if_eq VAR_0x8004, 1, LilycoveCity_DepartmentStore_1F_EventScript_TwoDigitMatch + call_if_eq VAR_0x8004, 2, LilycoveCity_DepartmentStore_1F_EventScript_ThreeDigitMatch + call_if_eq VAR_0x8004, 3, LilycoveCity_DepartmentStore_1F_EventScript_FourDigitMatch + call_if_eq VAR_0x8004, 4, LilycoveCity_DepartmentStore_1F_EventScript_FullMatch giveitem VAR_0x8005 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_RecordPrizeNoRoom + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStore_1F_EventScript_RecordPrizeNoRoom special TryPutLotteryWinnerReportOnAir goto LilycoveCity_DepartmentStore_1F_EventScript_PleaseVisitAgain2 end @@ -115,8 +105,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_NoRoomForPrize:: LilycoveCity_DepartmentStore_1F_EventScript_GivePrizeFromEarlier:: msgbox LilycoveCity_DepartmentStore_1F_Text_PrizeWeveBeenHolding, MSGBOX_DEFAULT giveitem VAR_POKELOT_PRIZE_ITEM - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_NoRoomForPrize + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStore_1F_EventScript_NoRoomForPrize copyvar VAR_0x8004, VAR_POKELOT_PRIZE_PLACE copyvar VAR_0x8005, VAR_POKELOT_PRIZE_ITEM special TryPutLotteryWinnerReportOnAir diff --git a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc index d1d074c8ce..a9683d13c9 100644 --- a/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc +++ b/data/maps/LilycoveCity_DepartmentStore_5F/scripts.inc @@ -129,10 +129,8 @@ LilycoveCity_DepartmentStore_5F_EventScript_Woman:: lockall applymovement LOCALID_WOMAN, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 0 - goto_if_eq LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - goto_if_ge LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 0, LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, LilycoveCity_DepartmentStore_5F_EventScript_WomanNormal goto LilycoveCity_DepartmentStore_5F_EventScript_WomanLegendaryWeather end diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc index d8dfa0f218..63010dc4c7 100644 --- a/data/maps/LilycoveCity_Harbor/scripts.inc +++ b/data/maps/LilycoveCity_Harbor/scripts.inc @@ -21,25 +21,18 @@ LilycoveCity_Harbor_EventScript_FerryAttendant:: call LilycoveCity_Harbor_EventScript_GetMysticTicketState call LilycoveCity_Harbor_EventScript_GetFirstTimeShowingTicket call LilycoveCity_Harbor_EventScript_GetHasTicketsState - compare VAR_TEMP_C, 2 - goto_if_eq LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime - compare VAR_TEMP_B, 1 - goto_if_eq LilycoveCity_Harbor_EventScript_EonTicketFirstTime - compare VAR_TEMP_B, 2 - goto_if_eq LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime - compare VAR_TEMP_B, 4 - goto_if_eq LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime - compare VAR_TEMP_B, 8 - goto_if_eq LilycoveCity_Harbor_EventScript_MysticTicketFirstTime - compare VAR_TEMP_B, 0 - goto_if_ne LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime + goto_if_eq VAR_TEMP_C, 2, LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime + goto_if_eq VAR_TEMP_B, 1, LilycoveCity_Harbor_EventScript_EonTicketFirstTime + goto_if_eq VAR_TEMP_B, 2, LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime + goto_if_eq VAR_TEMP_B, 4, LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime + goto_if_eq VAR_TEMP_B, 8, LilycoveCity_Harbor_EventScript_MysticTicketFirstTime + goto_if_ne VAR_TEMP_B, 0, LilycoveCity_Harbor_EventScript_MultipleEventTicketsFirstTime goto LilycoveCity_Harbor_EventScript_NoFirstTimeEventTickets end @ First goto_if_eq is unnecessary; identical scripts LilycoveCity_Harbor_EventScript_NoFirstTimeEventTickets:: - compare VAR_TEMP_A, 0 - goto_if_eq LilycoveCity_Harbor_EventScript_NoEventTickets + goto_if_eq VAR_TEMP_A, 0, LilycoveCity_Harbor_EventScript_NoEventTickets msgbox LilycoveCity_Harbor_Text_MayISeeYourTicket, MSGBOX_DEFAULT message LilycoveCity_Harbor_Text_FlashTicketWhereTo waitmessage @@ -92,8 +85,7 @@ LilycoveCity_Harbor_EventScript_GoToFarawayIsland:: LilycoveCity_Harbor_EventScript_GoToSlateport:: msgbox LilycoveCity_Harbor_Text_SlateportItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind + goto_if_eq VAR_RESULT, NO, LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_SS_TIDAL_CORRIDOR, 1, 10 @@ -103,8 +95,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateport:: LilycoveCity_Harbor_EventScript_GoToBattleFrontier:: msgbox LilycoveCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind + goto_if_eq VAR_RESULT, NO, LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate @@ -115,8 +106,7 @@ LilycoveCity_Harbor_EventScript_GetEonTicketState:: setvar VAR_TEMP_E, 0 goto_if_unset FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, Common_EventScript_NopReturn checkitem ITEM_EON_TICKET - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_NopReturn setvar VAR_TEMP_E, 1 goto_if_set FLAG_SHOWN_EON_TICKET, Common_EventScript_NopReturn setvar VAR_TEMP_E, 2 @@ -126,8 +116,7 @@ LilycoveCity_Harbor_EventScript_GetAuroraTicketState:: setvar VAR_TEMP_D, 0 goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn checkitem ITEM_AURORA_TICKET - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_NopReturn setvar VAR_TEMP_D, 1 goto_if_set FLAG_SHOWN_AURORA_TICKET, Common_EventScript_NopReturn setvar VAR_TEMP_D, 2 @@ -137,8 +126,7 @@ LilycoveCity_Harbor_EventScript_GetOldSeaMapState:: setvar VAR_TEMP_C, 0 goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, Common_EventScript_NopReturn checkitem ITEM_OLD_SEA_MAP - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_NopReturn setvar VAR_TEMP_C, 1 goto_if_set FLAG_SHOWN_OLD_SEA_MAP, Common_EventScript_NopReturn setvar VAR_TEMP_C, 2 @@ -148,8 +136,7 @@ LilycoveCity_Harbor_EventScript_GetMysticTicketState:: setvar VAR_TEMP_9, 0 goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn checkitem ITEM_MYSTIC_TICKET - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_NopReturn setvar VAR_TEMP_9, 1 goto_if_set FLAG_SHOWN_MYSTIC_TICKET, Common_EventScript_NopReturn setvar VAR_TEMP_9, 2 @@ -157,14 +144,10 @@ LilycoveCity_Harbor_EventScript_GetMysticTicketState:: LilycoveCity_Harbor_EventScript_GetFirstTimeShowingTicket:: setvar VAR_TEMP_B, 0 - compare VAR_TEMP_E, 2 - call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingEonTicket - compare VAR_TEMP_D, 2 - call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingAuroraTicket - compare VAR_TEMP_C, 2 - call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingOldSeaMap - compare VAR_TEMP_9, 2 - call_if_eq LilycoveCity_Harbor_EventScript_SetFirstTimeShowingMysticTicket + call_if_eq VAR_TEMP_E, 2, LilycoveCity_Harbor_EventScript_SetFirstTimeShowingEonTicket + call_if_eq VAR_TEMP_D, 2, LilycoveCity_Harbor_EventScript_SetFirstTimeShowingAuroraTicket + call_if_eq VAR_TEMP_C, 2, LilycoveCity_Harbor_EventScript_SetFirstTimeShowingOldSeaMap + call_if_eq VAR_TEMP_9, 2, LilycoveCity_Harbor_EventScript_SetFirstTimeShowingMysticTicket return LilycoveCity_Harbor_EventScript_SetFirstTimeShowingEonTicket:: @@ -185,14 +168,10 @@ LilycoveCity_Harbor_EventScript_SetFirstTimeShowingMysticTicket:: LilycoveCity_Harbor_EventScript_GetHasTicketsState:: setvar VAR_TEMP_A, 0 - compare VAR_TEMP_E, 1 - call_if_eq LilycoveCity_Harbor_EventScript_SetHasEonTicket - compare VAR_TEMP_D, 1 - call_if_eq LilycoveCity_Harbor_EventScript_SetHasAuroraTicket - compare VAR_TEMP_C, 1 - call_if_eq LilycoveCity_Harbor_EventScript_SetHasOldSeaMap - compare VAR_TEMP_9, 1 - call_if_eq LilycoveCity_Harbor_EventScript_SetHasMysticTicket + call_if_eq VAR_TEMP_E, 1, LilycoveCity_Harbor_EventScript_SetHasEonTicket + call_if_eq VAR_TEMP_D, 1, LilycoveCity_Harbor_EventScript_SetHasAuroraTicket + call_if_eq VAR_TEMP_C, 1, LilycoveCity_Harbor_EventScript_SetHasOldSeaMap + call_if_eq VAR_TEMP_9, 1, LilycoveCity_Harbor_EventScript_SetHasMysticTicket return LilycoveCity_Harbor_EventScript_SetHasEonTicket:: @@ -259,26 +238,18 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime:: waitmovement 0 applymovement LOCALID_FERRY_SAILOR, Common_Movement_Delay48 waitmovement 0 - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_MoveSailorOutOfWayEast addobject LOCALID_BRINEY - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_BrineyFaceSailorNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_BrineyFaceSailorEast msgbox EventTicket_Text_BrineyHoldOnASecond, MSGBOX_DEFAULT - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_BrineyFacePlayerNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_BrineyFacePlayerEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_BrineyFacePlayerNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_BrineyFacePlayerEast msgbox EventTicket_Text_BrineyLetsSail, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast setvar VAR_0x8004, LOCALID_SS_TIDAL call Common_EventScript_FerryDepart warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38 @@ -364,10 +335,8 @@ LilycoveCity_Harbor_EventScript_BoardFerryWithSailor:: waitmovement 0 delay 30 removeobject LOCALID_FERRY_SAILOR - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast delay 30 hideobjectat OBJ_EVENT_ID_PLAYER, 0 setvar VAR_0x8004, LOCALID_SS_TIDAL @@ -395,8 +364,7 @@ LilycoveCity_Harbor_EventScript_NoTicket:: @ Unused LilycoveCity_Harbor_EventScript_GoToSlateportUnused:: msgbox LilycoveCity_Harbor_Text_SlateportItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind + goto_if_eq VAR_RESULT, NO, LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_SS_TIDAL_CORRIDOR, 1, 10 @@ -407,8 +375,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateportUnused:: @ Unused LilycoveCity_Harbor_EventScript_GoToBattleFrontierUnused:: msgbox LilycoveCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind + goto_if_eq VAR_RESULT, NO, LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind call LilycoveCity_Harbor_EventScript_BoardFerry warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate @@ -428,10 +395,8 @@ LilycoveCity_Harbor_EventScript_BoardFerry:: waitmovement 0 delay 30 hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR - compare VAR_FACING, DIR_NORTH - call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth - compare VAR_FACING, DIR_EAST - call_if_eq LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast + call_if_eq VAR_FACING, DIR_NORTH, LilycoveCity_Harbor_EventScript_PlayerBoardFerryNorth + call_if_eq VAR_FACING, DIR_EAST, LilycoveCity_Harbor_EventScript_PlayerBoardFerryEast delay 30 hideobjectat OBJ_EVENT_ID_PLAYER, 0 setvar VAR_0x8004, LOCALID_SS_TIDAL diff --git a/data/maps/LilycoveCity_House2/scripts.inc b/data/maps/LilycoveCity_House2/scripts.inc index c7664c641f..965d82acfb 100644 --- a/data/maps/LilycoveCity_House2/scripts.inc +++ b/data/maps/LilycoveCity_House2/scripts.inc @@ -7,8 +7,7 @@ LilycoveCity_House2_EventScript_FatMan:: goto_if_set FLAG_RECEIVED_TM44, LilycoveCity_House2_EventScript_ReceivedRest msgbox LilycoveCity_House2_Text_NotAwakeYetHaveThis, MSGBOX_DEFAULT giveitem ITEM_TM44 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM44 msgbox LilycoveCity_House2_Text_SleepIsEssential, MSGBOX_DEFAULT release diff --git a/data/maps/LilycoveCity_House3/scripts.inc b/data/maps/LilycoveCity_House3/scripts.inc index de76c58b6b..57e6804732 100644 --- a/data/maps/LilycoveCity_House3/scripts.inc +++ b/data/maps/LilycoveCity_House3/scripts.inc @@ -11,8 +11,7 @@ LilycoveCity_House3_EventScript_PokefanF:: lock faceplayer msgbox LilycoveCity_House3_Text_LearnFromMasterOfPokeblocks, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_House3_EventScript_DeclinePokeblockLearn + goto_if_eq VAR_RESULT, NO, LilycoveCity_House3_EventScript_DeclinePokeblockLearn msgbox LilycoveCity_House3_Text_ExplainPokeblocks, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc index 12c4ead3ee..2d9d446f9d 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc @@ -14,10 +14,8 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_Curator:: message LilycoveCity_LilycoveMuseum_1F_Text_ImCuratorHaveYouViewedOurPaintings waitmessage multichoice 20, 8, MULTI_VIEWED_PAINTINGS, TRUE - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_SawPaintings - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_NotYet + goto_if_eq VAR_RESULT, 0, LilycoveCity_LilycoveMuseum_1F_EventScript_SawPaintings + goto_if_eq VAR_RESULT, 1, LilycoveCity_LilycoveMuseum_1F_EventScript_NotYet end LilycoveCity_LilycoveMuseum_1F_EventScript_NotYet:: @@ -26,10 +24,8 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_NotYet:: LilycoveCity_LilycoveMuseum_1F_EventScript_SawPaintings:: msgbox LilycoveCity_LilycoveMuseum_1F_Text_HaveYouAnInterestInPaintings, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_NotInterested - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_InterestedInPaintings + goto_if_eq VAR_RESULT, NO, LilycoveCity_LilycoveMuseum_1F_EventScript_NotInterested + goto_if_eq VAR_RESULT, YES, LilycoveCity_LilycoveMuseum_1F_EventScript_InterestedInPaintings end LilycoveCity_LilycoveMuseum_1F_EventScript_NotInterested:: diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index bf220b04f9..9212ca67df 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -121,8 +121,7 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_GiveGlassOrnament:: applymovement LOCALID_CURATOR, Common_Movement_FacePlayer msgbox LilycoveCity_LilycoveMuseum_2F_Text_TokenOfGratitude, MSGBOX_DEFAULT givedecoration DECOR_GLASS_ORNAMENT - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_NoRoomForGlassOrnament + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_LilycoveMuseum_2F_EventScript_NoRoomForGlassOrnament setflag FLAG_RECEIVED_GLASS_ORNAMENT closemessage releaseall diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc index eead1f675f..db042653e1 100644 --- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc +++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc @@ -18,20 +18,16 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget:: msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget, MSGBOX_DEFAULT special ChoosePartyMon waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain special IsSelectedMonEgg - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_EggCantForgetMoves + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_MoveDeletersHouse_EventScript_EggCantForgetMoves special GetNumMovesSelectedMonHas - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_MonOnlyKnowsOneMove + goto_if_eq VAR_RESULT, 1, LilycoveCity_MoveDeletersHouse_EventScript_MonOnlyKnowsOneMove msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMoveShouldBeForgotten, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK special MoveDeleterChooseMoveToForget fadescreen FADE_FROM_BLACK - compare VAR_0x8005, MAX_MON_MOVES - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget + goto_if_eq VAR_0x8005, MAX_MON_MOVES, LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget special BufferMoveDeleterNicknameAndMove msgbox LilycoveCity_MoveDeletersHouse_Text_MonsMoveShouldBeForgotten, MSGBOX_YESNO switch VAR_RESULT @@ -42,8 +38,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget:: LilycoveCity_MoveDeletersHouse_EventScript_TryForgetMove:: special IsLastMonThatKnowsSurf - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_LastMonWithSurf + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_MoveDeletersHouse_EventScript_LastMonWithSurf special MoveDeleterForgetMove playfanfare MUS_MOVE_DELETED waitfanfare diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc index 03f2657e71..a7f853afad 100644 --- a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc @@ -13,10 +13,8 @@ LilycoveCity_PokemonCenter_1F_OnTransition: @ SetLilycoveLadyGfx returns TRUE if its the Contest Lady LilycoveCity_PokemonCenter_1F_EventScript_SetLilycoveLadyGfx:: special SetLilycoveLadyGfx - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_HideContestLadyMon - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ShowContestLadyMon + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_HideContestLadyMon + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_ShowContestLadyMon end LilycoveCity_PokemonCenter_1F_EventScript_HideContestLadyMon:: diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc index 63e7084880..ba8001324a 100644 --- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc +++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc @@ -73,10 +73,8 @@ LilycoveCity_PokemonTrainerFanClub_Movement_LittleGirlHideFromPlayer: LilycoveCity_PokemonTrainerFanClub_OnTransition: call LilycoveCity_PokemonTrainerFanClub_EventScript_HideOrShowInterviewer - compare VAR_LILYCOVE_FAN_CLUB_STATE, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_SetFanMemberPositionsForFirstFanMeeting - compare VAR_LILYCOVE_FAN_CLUB_STATE, 2 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_SetFanMemberPositionsForFirstFanMeeting + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 2, LilycoveCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions end LilycoveCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions:: @@ -84,42 +82,33 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_UpdateFanMemberPositions:: call LilycoveCity_PokemonTrainerFanClub_EventScript_CheckSetUpTVShow setvar VAR_0x8004, FANCLUB_MEMBER1 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember1ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember1ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER2 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember2ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember2ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER3 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember3ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember3ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER4 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember4ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember4ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER5 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember5ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember5ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER6 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember6ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember6ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER7 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember7ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember7ToFarTable setvar VAR_0x8004, FANCLUB_MEMBER8 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember8ToFarTable + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_MoveMember8ToFarTable end LilycoveCity_PokemonTrainerFanClub_EventScript_HideOrShowInterviewer:: specialvar VAR_RESULT, ShouldHideFanClubInterviewer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_HideInterviewer + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_HideInterviewer clearflag FLAG_HIDE_LILYCOVE_FAN_CLUB_INTERVIEWER clearflag FLAG_FAN_CLUB_STRENGTH_SHARED return @@ -134,38 +123,29 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_CheckSetUpTVShow:: setvar VAR_0x8005, NUM_TRAINER_FAN_CLUB_MEMBERS setvar VAR_0x8004, FANCLUB_MEMBER1 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER2 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER3 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER4 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER5 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER6 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER7 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan setvar VAR_0x8004, FANCLUB_MEMBER8 specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, FALSE - call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan - compare VAR_0x8005, 5 - goto_if_ge LilycoveCity_PokemonTrainerFanClub_EventScript_TrySetUpTVShow + call_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan + goto_if_ge VAR_0x8005, 5, LilycoveCity_PokemonTrainerFanClub_EventScript_TrySetUpTVShow return LilycoveCity_PokemonTrainerFanClub_EventScript_CountNotPlayersFan:: @@ -222,22 +202,18 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Man:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER6 special BufferFanClubTrainerName - compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayerNotChampion + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayerNotChampion specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ManOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_ManOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_TrainersPowerIsOutOfTheOrdinary, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_ManPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ManOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_ManOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YoureOneWeWantToWin, MSGBOX_DEFAULT release end @@ -262,22 +238,18 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Lass:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER1 special BufferFanClubTrainerName - compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayerNotChampion + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayerNotChampion specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LassOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_LassOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_ICantHelpLikingBrawly, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_LassPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LassOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_LassOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_ImPullingForYou, MSGBOX_DEFAULT release end @@ -302,22 +274,18 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanM:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER2 special BufferFanClubTrainerName - compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayerNotChampion + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayerNotChampion specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_LongWayToGoComparedToNorman, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_PokefanMOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YouveSurpassedYourFather, MSGBOX_DEFAULT release end @@ -342,22 +310,18 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirl:: faceplayer setvar VAR_0x8004, FANCLUB_MEMBER3 special BufferFanClubTrainerName - compare VAR_LILYCOVE_FAN_CLUB_STATE, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayerNotChampion + goto_if_eq VAR_LILYCOVE_FAN_CLUB_STATE, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayerNotChampion specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_EveryoneThinksTrainerIsCool, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_LittleGirlOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_OhWoweeItsPlayer, MSGBOX_DEFAULT release end @@ -383,19 +347,16 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoy:: setvar VAR_0x8004, FANCLUB_MEMBER4 special BufferFanClubTrainerName specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_TrainerIsWickedlyCool, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_NinjaBoyOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_WantToBeStrongLikeYou, MSGBOX_DEFAULT release end @@ -416,19 +377,16 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Boy:: setvar VAR_0x8004, FANCLUB_MEMBER5 special BufferFanClubTrainerName specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_BoyPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_BoyPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_BoyOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_BoyOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_ThinkTrainerIsNumberOne, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_BoyPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_BoyOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_BoyOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YoureAmazingAfterAll, MSGBOX_DEFAULT release end @@ -449,19 +407,16 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Woman:: setvar VAR_0x8004, FANCLUB_MEMBER7 special BufferFanClubTrainerName specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_WomanOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_WomanOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_TrainerIsStandout, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_WomanPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_WomanOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_WomanOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YouChangedMyMind, MSGBOX_DEFAULT release end @@ -482,19 +437,16 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertF:: setvar VAR_0x8004, FANCLUB_MEMBER8 special BufferFanClubTrainerName specialvar VAR_RESULT, IsFanClubMemberFanOfPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFPlayersFan + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFPlayersFan specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1) - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFOnlyNonFan + goto_if_eq VAR_RESULT, (NUM_TRAINER_FAN_CLUB_MEMBERS - 1), LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFOnlyNonFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_HaventRealizedPotential, MSGBOX_DEFAULT release end LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFPlayersFan:: specialvar VAR_RESULT, GetNumFansOfPlayerInTrainerFanClub - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFOnlyFan + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_ExpertFOnlyFan msgbox LilycoveCity_PokemonTrainerFanClub_Text_YouImpressive, MSGBOX_DEFAULT release end @@ -521,8 +473,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Interviewer:: LilycoveCity_PokemonTrainerFanClub_EventScript_Interview:: setvar VAR_0x8005, TVSHOW_FAN_CLUB_SPECIAL special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_AlreadyInterviewed2 + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonTrainerFanClub_EventScript_AlreadyInterviewed2 copyvar VAR_0x800A, VAR_0x8006 setvar VAR_0x8004, FANCLUB_MEMBER1 special BufferFanClubTrainerName @@ -532,10 +483,8 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_Interview:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion end LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion:: @@ -547,10 +496,8 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion:: setvar VAR_0x8004, FANCLUB_MEMBER1 special BufferFanClubTrainerName msgbox LilycoveCity_PokemonTrainerFanClub_Text_HaveYouForgottenTrainer, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_AskForOpinion + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonTrainerFanClub_EventScript_AskForOpinion end LilycoveCity_PokemonTrainerFanClub_EventScript_AskForOpinion:: @@ -562,10 +509,8 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_AskForOpinion:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonTrainerFanClub_EventScript_SubmitOpinion + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonTrainerFanClub_EventScript_CancelGiveOpinion end LilycoveCity_PokemonTrainerFanClub_EventScript_RateTrainer:: @@ -592,10 +537,8 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_CancelRateTrainer:: setvar VAR_0x8004, FANCLUB_MEMBER1 special BufferFanClubTrainerName msgbox LilycoveCity_PokemonTrainerFanClub_Text_HaveYouForgottenTrainer2, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_RateTrainer + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonTrainerFanClub_EventScript_RateTrainer end LilycoveCity_PokemonTrainerFanClub_EventScript_ForgetTrainer:: diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc index f8a7244bf6..69961bf362 100644 --- a/data/maps/LittlerootTown/scripts.inc +++ b/data/maps/LittlerootTown/scripts.inc @@ -42,23 +42,15 @@ LittlerootTown_MapScripts:: LittlerootTown_OnTransition: setflag FLAG_VISITED_LITTLEROOT_TOWN call Common_EventScript_SetupRivalGfxId - compare VAR_LITTLEROOT_INTRO_STATE, 2 - call_if_eq LittlerootTown_EventScript_MoveMomToMaysDoor + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 2, LittlerootTown_EventScript_MoveMomToMaysDoor call_if_unset FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_SetTwinPos - compare VAR_LITTLEROOT_TOWN_STATE, 3 - call_if_eq LittlerootTown_EventScript_SetMomStandingInFrontOfDoorPos - compare VAR_LITTLEROOT_HOUSES_STATE_MAY, 4 - call_if_eq LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent - compare VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 4 - call_if_eq LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent - compare VAR_OLDALE_RIVAL_STATE, 1 - call_if_eq LittlerootTown_EventScript_MoveRivalFromOldale - compare VAR_LITTLEROOT_RIVAL_STATE, 3 - call_if_eq LittlerootTown_EventScript_SetRivalLeftForRoute103 - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 1 - call_if_eq LittlerootTown_EventScript_HideMapNamePopup - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - call_if_eq LittlerootTown_EventScript_LeftLabAfterDexUpgrade + call_if_eq VAR_LITTLEROOT_TOWN_STATE, 3, LittlerootTown_EventScript_SetMomStandingInFrontOfDoorPos + call_if_eq VAR_LITTLEROOT_HOUSES_STATE_MAY, 4, LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent + call_if_eq VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 4, LittlerootTown_EventScript_SetExitedHouseAfterLatiSSTicketEvent + call_if_eq VAR_OLDALE_RIVAL_STATE, 1, LittlerootTown_EventScript_MoveRivalFromOldale + call_if_eq VAR_LITTLEROOT_RIVAL_STATE, 3, LittlerootTown_EventScript_SetRivalLeftForRoute103 + call_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 1, LittlerootTown_EventScript_HideMapNamePopup + call_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_EventScript_LeftLabAfterDexUpgrade end LittlerootTown_EventScript_LeftLabAfterDexUpgrade:: @@ -88,8 +80,7 @@ LittlerootTown_EventScript_MoveMomToMaysDoor:: return LittlerootTown_EventScript_SetTwinPos:: - compare VAR_LITTLEROOT_TOWN_STATE, 0 - goto_if_eq LittlerootTown_EventScript_SetTwinGuardingRoutePos + goto_if_eq VAR_LITTLEROOT_TOWN_STATE, 0, LittlerootTown_EventScript_SetTwinGuardingRoutePos setobjectxyperm LOCALID_TWIN, 10, 1 setobjectmovementtype LOCALID_TWIN, MOVEMENT_TYPE_FACE_UP return @@ -103,10 +94,8 @@ LittlerootTown_EventScript_SetMomStandingInFrontOfDoorPos:: clearflag FLAG_HIDE_LITTLEROOT_TOWN_MOM_OUTSIDE setobjectmovementtype LOCALID_MOM, MOVEMENT_TYPE_FACE_DOWN checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_SetMomInFrontOfDoorMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_SetMomInFrontOfDoorFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetMomInFrontOfDoorMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_SetMomInFrontOfDoorFemale return LittlerootTown_EventScript_SetMomInFrontOfDoorMale:: @@ -243,8 +232,7 @@ LittlerootTown_EventScript_SetRivalBirchPosForDexUpgrade:: addobject LOCALID_BIRCH addobject LOCALID_RIVAL checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeMale + goto_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeMale goto LittlerootTown_EventScript_SetRivalBirchPosForDexUpgradeFemale end @@ -271,8 +259,7 @@ LittlerootTown_EventScript_Twin:: faceplayer goto_if_set FLAG_ADVENTURE_STARTED, LittlerootTown_EventScript_GoodLuck goto_if_set FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_YouSavedBirch - compare VAR_LITTLEROOT_TOWN_STATE, 0 - goto_if_ne LittlerootTown_EventScript_GoSaveBirch + goto_if_ne VAR_LITTLEROOT_TOWN_STATE, 0, LittlerootTown_EventScript_GoSaveBirch msgbox LittlerootTown_Text_IfYouGoInGrassPokemonWillJumpOut, MSGBOX_DEFAULT release end @@ -416,10 +403,8 @@ LittlerootTown_EventScript_BirchsLabSign:: LittlerootTown_EventScript_BrendansHouseSign:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_PlayersHouseSignMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_BirchsHouseSignFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_PlayersHouseSignMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_BirchsHouseSignFemale releaseall end @@ -434,10 +419,8 @@ LittlerootTown_EventScript_BirchsHouseSignFemale:: LittlerootTown_EventScript_MaysHouseSign:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_BirchsHouseSignMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_PlayersHouseSignFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_BirchsHouseSignMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_PlayersHouseSignFemale releaseall end @@ -489,28 +472,20 @@ LittlerootTown_EventScript_GiveRunningShoesTrigger5:: LittlerootTown_EventScript_GiveRunningShoesTrigger:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_MomNoticePlayerMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_MomNoticePlayerFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_MomNoticePlayerMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_MomNoticePlayerFemale checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetHomeDoorCoordsMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_SetHomeDoorCoordsFemale msgbox LittlerootTown_Text_WaitPlayer, MSGBOX_DEFAULT closemessage checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_MomApproachPlayerMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_MomApproachPlayerFemale call LittlerootTown_EventScript_GiveRunningShoes checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_MomReturnHomeMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_MomReturnHomeFemale goto LittlerootTown_EventScript_SetReceivedRunningShoes end @@ -535,33 +510,21 @@ LittlerootTown_EventScript_MomNoticePlayerFemale:: return LittlerootTown_EventScript_MomApproachPlayerMale:: - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_EventScript_MomApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_EventScript_MomApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale2 - compare VAR_0x8008, 3 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale3 - compare VAR_0x8008, 4 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale4 - compare VAR_0x8008, 5 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerMale5 + call_if_eq VAR_0x8008, 0, LittlerootTown_EventScript_MomApproachPlayer0 + call_if_eq VAR_0x8008, 1, LittlerootTown_EventScript_MomApproachPlayer1 + call_if_eq VAR_0x8008, 2, LittlerootTown_EventScript_MomApproachPlayerMale2 + call_if_eq VAR_0x8008, 3, LittlerootTown_EventScript_MomApproachPlayerMale3 + call_if_eq VAR_0x8008, 4, LittlerootTown_EventScript_MomApproachPlayerMale4 + call_if_eq VAR_0x8008, 5, LittlerootTown_EventScript_MomApproachPlayerMale5 return LittlerootTown_EventScript_MomApproachPlayerFemale:: - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_EventScript_MomApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_EventScript_MomApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale2 - compare VAR_0x8008, 3 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale3 - compare VAR_0x8008, 4 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale4 - compare VAR_0x8008, 5 - call_if_eq LittlerootTown_EventScript_MomApproachPlayerFemale5 + call_if_eq VAR_0x8008, 0, LittlerootTown_EventScript_MomApproachPlayer0 + call_if_eq VAR_0x8008, 1, LittlerootTown_EventScript_MomApproachPlayer1 + call_if_eq VAR_0x8008, 2, LittlerootTown_EventScript_MomApproachPlayerFemale2 + call_if_eq VAR_0x8008, 3, LittlerootTown_EventScript_MomApproachPlayerFemale3 + call_if_eq VAR_0x8008, 4, LittlerootTown_EventScript_MomApproachPlayerFemale4 + call_if_eq VAR_0x8008, 5, LittlerootTown_EventScript_MomApproachPlayerFemale5 return LittlerootTown_EventScript_MomApproachPlayer0:: @@ -635,33 +598,21 @@ LittlerootTown_EventScript_MomApproachPlayerFemale5:: return LittlerootTown_EventScript_MomReturnHomeMale:: - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_EventScript_MomReturnHome0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_EventScript_MomReturnHome1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale2 - compare VAR_0x8008, 3 - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale3 - compare VAR_0x8008, 4 - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale4 - compare VAR_0x8008, 5 - call_if_eq LittlerootTown_EventScript_MomReturnHomeMale5 + call_if_eq VAR_0x8008, 0, LittlerootTown_EventScript_MomReturnHome0 + call_if_eq VAR_0x8008, 1, LittlerootTown_EventScript_MomReturnHome1 + call_if_eq VAR_0x8008, 2, LittlerootTown_EventScript_MomReturnHomeMale2 + call_if_eq VAR_0x8008, 3, LittlerootTown_EventScript_MomReturnHomeMale3 + call_if_eq VAR_0x8008, 4, LittlerootTown_EventScript_MomReturnHomeMale4 + call_if_eq VAR_0x8008, 5, LittlerootTown_EventScript_MomReturnHomeMale5 return LittlerootTown_EventScript_MomReturnHomeFemale:: - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_EventScript_MomReturnHome0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_EventScript_MomReturnHome1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale2 - compare VAR_0x8008, 3 - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale3 - compare VAR_0x8008, 4 - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale4 - compare VAR_0x8008, 5 - call_if_eq LittlerootTown_EventScript_MomReturnHomeFemale5 + call_if_eq VAR_0x8008, 0, LittlerootTown_EventScript_MomReturnHome0 + call_if_eq VAR_0x8008, 1, LittlerootTown_EventScript_MomReturnHome1 + call_if_eq VAR_0x8008, 2, LittlerootTown_EventScript_MomReturnHomeFemale2 + call_if_eq VAR_0x8008, 3, LittlerootTown_EventScript_MomReturnHomeFemale3 + call_if_eq VAR_0x8008, 4, LittlerootTown_EventScript_MomReturnHomeFemale4 + call_if_eq VAR_0x8008, 5, LittlerootTown_EventScript_MomReturnHomeFemale5 return LittlerootTown_EventScript_MomReturnHome0:: @@ -924,10 +875,8 @@ LittlerootTown_EventScript_Mom:: lock faceplayer checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsMale - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_EventScript_SetHomeDoorCoordsFemale + call_if_eq VAR_RESULT, MALE, LittlerootTown_EventScript_SetHomeDoorCoordsMale + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_EventScript_SetHomeDoorCoordsFemale call LittlerootTown_EventScript_GiveRunningShoes applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterUp waitmovement 0 diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index 15bd96f253..cce8cd59b9 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -9,8 +9,7 @@ LittlerootTown_BrendansHouse_1F_MapScripts:: .byte 0 LittlerootTown_BrendansHouse_1F_OnLoad: - compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_lt LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes + call_if_lt VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual end @@ -21,8 +20,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes:: LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual + goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual return LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual:: @@ -30,12 +28,9 @@ LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual:: return LittlerootTown_BrendansHouse_1F_OnTransition: - compare VAR_LITTLEROOT_INTRO_STATE, 3 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToDoor - compare VAR_LITTLEROOT_INTRO_STATE, 5 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs - compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToTV + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToDoor + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToTV end LittlerootTown_BrendansHouse_1F_EventScript_MoveMomToStairs:: @@ -156,23 +151,16 @@ LittlerootTown_BrendansHouse_1F_EventScript_MeetRival:: waitmovement 0 applymovement LOCALID_RIVAL, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 1 - call_if_ne LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan + call_if_ne VAR_0x8008, 1, LittlerootTown_BrendansHouse_1F_EventScript_PlayerFaceBrendan playbgm MUS_ENCOUNTER_BRENDAN, TRUE - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer2 + call_if_eq VAR_0x8008, 0, LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer0 + call_if_eq VAR_0x8008, 1, LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer1 + call_if_eq VAR_0x8008, 2, LittlerootTown_BrendansHouse_1F_EventScript_BrendanApproachPlayer2 msgbox RivalsHouse_1F_Text_BrendanWhoAreYou, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2 + call_if_eq VAR_0x8008, 0, LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs0 + call_if_eq VAR_0x8008, 1, LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs1 + call_if_eq VAR_0x8008, 2, LittlerootTown_BrendansHouse_1F_EventScript_BrendanGoUpstairs2 playse SE_EXIT removeobject LOCALID_RIVAL setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_BRENDAN diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index b4db71e290..9931726833 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -6,28 +6,23 @@ LittlerootTown_BrendansHouse_2F_MapScripts:: .byte 0 LittlerootTown_BrendansHouse_2F_OnTransition: - compare VAR_LITTLEROOT_RIVAL_STATE, 2 - call_if_lt LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan - compare VAR_LITTLEROOT_RIVAL_STATE, 3 - call_if_ge LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos - compare VAR_LITTLEROOT_INTRO_STATE, 4 - call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet + call_if_lt VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan + call_if_ge VAR_LITTLEROOT_RIVAL_STATE, 3, LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 4, PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet call SecretBase_EventScript_SetDecorationFlags setvar VAR_SECRET_BASE_INITIALIZED, 0 end LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos:: goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos - compare VAR_BIRCH_LAB_STATE, 2 - goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_Ret + goto_if_ge VAR_BIRCH_LAB_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_Ret goto LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_Ret - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret @ Odd that the MaysHouse equivalent was used here instead + goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_2F_EventScript_Ret + @ Odd that the MaysHouse equivalent was used below instead + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 LittlerootTown_MaysHouse_2F_EventScript_Ret setobjectxyperm LOCALID_RIVAL, 0, 2 setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP return @@ -37,8 +32,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_Ret:: LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan:: checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan return LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan:: @@ -51,14 +45,12 @@ LittlerootTown_BrendansHouse_2F_OnWarp: LittlerootTown_BrendansHouse_2F_EventScript_CheckInitDecor:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq SecretBase_EventScript_InitDecorations + goto_if_eq VAR_RESULT, MALE, SecretBase_EventScript_InitDecorations end LittlerootTown_BrendansHouse_2F_EventScript_RivalsPokeBall:: lockall - compare VAR_LITTLEROOT_RIVAL_STATE, 2 - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan + goto_if_eq VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT releaseall end @@ -75,14 +67,10 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan:: waitmovement 0 delay 10 playbgm MUS_ENCOUNTER_BRENDAN, TRUE - compare VAR_FACING, DIR_NORTH - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth - compare VAR_FACING, DIR_WEST - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest - compare VAR_FACING, DIR_EAST - call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast + call_if_eq VAR_FACING, DIR_NORTH, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth + call_if_eq VAR_FACING, DIR_SOUTH, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth + call_if_eq VAR_FACING, DIR_WEST, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest + call_if_eq VAR_FACING, DIR_EAST, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast setvar VAR_LITTLEROOT_RIVAL_STATE, 3 setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM @@ -250,10 +238,8 @@ LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanEast: LittlerootTown_BrendansHouse_2F_EventScript_PC:: lockall checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC + goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC end LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC:: diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index b022402d05..b4c4775c33 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -9,8 +9,7 @@ LittlerootTown_MaysHouse_1F_MapScripts:: .byte 0 LittlerootTown_MaysHouse_1F_OnLoad: - compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_lt LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes + call_if_lt VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual end @@ -21,8 +20,7 @@ LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes:: LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual:: checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual return LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual:: @@ -30,12 +28,9 @@ LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual:: return LittlerootTown_MaysHouse_1F_OnTransition: - compare VAR_LITTLEROOT_INTRO_STATE, 3 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor - compare VAR_LITTLEROOT_INTRO_STATE, 5 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs - compare VAR_LITTLEROOT_INTRO_STATE, 6 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 3, LittlerootTown_MaysHouse_1F_EventScript_MoveMomToDoor + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 5, LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 6, LittlerootTown_MaysHouse_1F_EventScript_MoveMomToTV end LittlerootTown_MaysHouse_1F_EventScript_MoveMomToStairs:: @@ -123,8 +118,7 @@ RivalsHouse_1F_EventScript_RivalMom:: faceplayer goto_if_set FLAG_DEFEATED_RIVAL_ROUTE103, RivalsHouse_1F_EventScript_GoHomeEverySoOften goto_if_set FLAG_SYS_POKEMON_GET, RivalsHouse_1F_EventScript_RivalIsOnRoute103 - compare VAR_LITTLEROOT_RIVAL_STATE, 3 - goto_if_eq RivalsHouse_1F_EventScript_RivalTooBusy + goto_if_eq VAR_LITTLEROOT_RIVAL_STATE, 3, RivalsHouse_1F_EventScript_RivalTooBusy special GetRivalSonDaughterString msgbox RivalsHouse_1F_Text_LikeChildLikeFather, MSGBOX_DEFAULT release @@ -190,23 +184,16 @@ LittlerootTown_MaysHouse_1F_EventScript_MeetRival:: waitmovement 0 applymovement LOCALID_RIVAL, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 1 - call_if_ne LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay + call_if_ne VAR_0x8008, 1, LittlerootTown_MaysHouse_1F_EventScript_PlayerFaceMay playbgm MUS_ENCOUNTER_MAY, TRUE - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2 + call_if_eq VAR_0x8008, 0, LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer0 + call_if_eq VAR_0x8008, 1, LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer1 + call_if_eq VAR_0x8008, 2, LittlerootTown_MaysHouse_1F_EventScript_MayApproachPlayer2 msgbox RivalsHouse_1F_Text_MayWhoAreYou, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0 - compare VAR_0x8008, 1 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1 - compare VAR_0x8008, 2 - call_if_eq LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2 + call_if_eq VAR_0x8008, 0, LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs0 + call_if_eq VAR_0x8008, 1, LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs1 + call_if_eq VAR_0x8008, 2, LittlerootTown_MaysHouse_1F_EventScript_MayGoUpstairs2 playse SE_EXIT removeobject LOCALID_RIVAL setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_MAY diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index af6877a887..7403f3fcf6 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -6,28 +6,22 @@ LittlerootTown_MaysHouse_2F_MapScripts:: .byte 0 LittlerootTown_MaysHouse_2F_OnTransition: - compare VAR_LITTLEROOT_RIVAL_STATE, 2 - call_if_lt LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay - compare VAR_LITTLEROOT_RIVAL_STATE, 3 - call_if_ge LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos - compare VAR_LITTLEROOT_INTRO_STATE, 4 - call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet + call_if_lt VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay + call_if_ge VAR_LITTLEROOT_RIVAL_STATE, 3, LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos + call_if_eq VAR_LITTLEROOT_INTRO_STATE, 4, PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet call SecretBase_EventScript_SetDecorationFlags setvar VAR_SECRET_BASE_INITIALIZED, 0 end LittlerootTown_MaysHouse_2F_EventScript_CheckShouldUpdateMayPos:: goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos - compare VAR_BIRCH_LAB_STATE, 2 - goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret + goto_if_ge VAR_BIRCH_LAB_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret goto LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos LittlerootTown_MaysHouse_2F_EventScript_TryUpdateMayPos:: checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_Ret - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_2F_EventScript_Ret + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret setobjectxyperm LOCALID_RIVAL, 8, 2 setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP return @@ -37,8 +31,7 @@ LittlerootTown_MaysHouse_2F_EventScript_Ret:: LittlerootTown_MaysHouse_2F_EventScript_CheckSetReadyToMeetMay:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay + goto_if_eq VAR_RESULT, MALE, LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay return LittlerootTown_MaysHouse_2F_EventScript_SetReadyToMeetMay:: @@ -51,14 +44,12 @@ LittlerootTown_MaysHouse_2F_OnWarp: LittlerootTown_MaysHouse_2F_EventScript_CheckInitDecor:: checkplayergender - compare VAR_RESULT, FEMALE - goto_if_eq SecretBase_EventScript_InitDecorations + goto_if_eq VAR_RESULT, FEMALE, SecretBase_EventScript_InitDecorations end LittlerootTown_MaysHouse_2F_EventScript_RivalsPokeBall:: lockall - compare VAR_LITTLEROOT_RIVAL_STATE, 2 - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMay + goto_if_eq VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_MeetMay msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT releaseall end @@ -75,14 +66,10 @@ LittlerootTown_MaysHouse_2F_EventScript_MeetMay:: waitmovement 0 delay 10 playbgm MUS_ENCOUNTER_MAY, TRUE - compare VAR_FACING, DIR_NORTH - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth - compare VAR_FACING, DIR_WEST - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest - compare VAR_FACING, DIR_EAST - call_if_eq LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast + call_if_eq VAR_FACING, DIR_NORTH, LittlerootTown_MaysHouse_2F_EventScript_MeetMayNorth + call_if_eq VAR_FACING, DIR_SOUTH, LittlerootTown_MaysHouse_2F_EventScript_MeetMaySouth + call_if_eq VAR_FACING, DIR_WEST, LittlerootTown_MaysHouse_2F_EventScript_MeetMayWest + call_if_eq VAR_FACING, DIR_EAST, LittlerootTown_MaysHouse_2F_EventScript_MeetMayEast setvar VAR_LITTLEROOT_RIVAL_STATE, 3 setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL clearflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM @@ -252,10 +239,8 @@ RivalsHouse_2F_EventScript_Rival:: lockall goto_if_set FLAG_MET_RIVAL_LILYCOVE, RivalsHouse_2F_EventScript_RivalPostLilycove checkplayergender - compare VAR_RESULT, MALE - goto_if_eq RivalsHouse_2F_EventScript_May - compare VAR_RESULT, FEMALE - goto_if_eq RivalsHouse_2F_EventScript_Brendan + goto_if_eq VAR_RESULT, MALE, RivalsHouse_2F_EventScript_May + goto_if_eq VAR_RESULT, FEMALE, RivalsHouse_2F_EventScript_Brendan end RivalsHouse_2F_EventScript_May:: @@ -272,10 +257,8 @@ RivalsHouse_2F_EventScript_RivalPostLilycove:: applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer waitmovement 0 checkplayergender - compare VAR_RESULT, MALE - call_if_eq RivalsHouse_2F_EventScript_MayPostLilycove - compare VAR_RESULT, FEMALE - call_if_eq RivalsHouse_2F_EventScript_BrendanPostLilycove + call_if_eq VAR_RESULT, MALE, RivalsHouse_2F_EventScript_MayPostLilycove + call_if_eq VAR_RESULT, FEMALE, RivalsHouse_2F_EventScript_BrendanPostLilycove setflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE releaseall end @@ -301,10 +284,8 @@ RivalsHouse_2F_EventScript_BrendanWhereShouldIGoNext:: LittlerootTown_MaysHouse_2F_EventScript_PC:: lockall checkplayergender - compare VAR_RESULT, MALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC - compare VAR_RESULT, FEMALE - goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC + goto_if_eq VAR_RESULT, MALE, LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC + goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC end LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC:: diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 857099f26d..7c7f47d2ee 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -29,18 +29,14 @@ LittlerootTown_ProfessorBirchsLab_MapScripts:: LittlerootTown_ProfessorBirchsLab_OnTransition: call Common_EventScript_SetupRivalGfxId call ProfBirch_EventScript_UpdateLocation - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_SetAfterJohtoStarterLayout - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 4 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_SetJohtoStarterLayout - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 3 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_CheckReadyForJohtoStarter + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_SetAfterJohtoStarterLayout + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 4, LittlerootTown_ProfessorBirchsLab_EventScript_SetJohtoStarterLayout + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 3, LittlerootTown_ProfessorBirchsLab_EventScript_CheckReadyForJohtoStarter end LittlerootTown_ProfessorBirchsLab_EventScript_CheckReadyForJohtoStarter:: specialvar VAR_RESULT, HasAllHoennMons - compare VAR_RESULT, TRUE - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SetReadyForJohtoStarter + goto_if_eq VAR_RESULT, TRUE, LittlerootTown_ProfessorBirchsLab_EventScript_SetReadyForJohtoStarter setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_WANDER_UP_AND_DOWN setobjectxyperm LOCALID_RIVAL, 5, 10 end @@ -123,10 +119,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveStarterEvent:: playfanfare MUS_OBTAIN_ITEM waitfanfare msgbox LittlerootTown_ProfessorBirchsLab_Text_WhyNotGiveNicknameToMon, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_NicknameStarter - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_GoSeeRival + goto_if_eq VAR_RESULT, YES, LittlerootTown_ProfessorBirchsLab_EventScript_NicknameStarter + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_GoSeeRival end LittlerootTown_ProfessorBirchsLab_EventScript_NicknameStarter:: @@ -137,10 +131,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_NicknameStarter:: LittlerootTown_ProfessorBirchsLab_EventScript_GoSeeRival:: msgbox LittlerootTown_ProfessorBirchsLab_Text_MightBeGoodIdeaToGoSeeRival, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival + goto_if_eq VAR_RESULT, YES, LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival end LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival:: @@ -152,10 +144,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival:: LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival:: msgbox LittlerootTown_ProfessorBirchsLab_Text_DontBeThatWay, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival + goto_if_eq VAR_RESULT, YES, LittlerootTown_ProfessorBirchsLab_EventScript_AgreeToSeeRival + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_DeclineSeeingRival end LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedexEvent:: @@ -195,10 +185,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_UpgradeToNationalDex:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayUpgradeComment - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanUpgradeComment + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayUpgradeComment + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanUpgradeComment playse SE_PC_ON waitse delay 20 @@ -288,8 +276,7 @@ LittlerootTown_ProfessorBirchsLab_Movement_PlayerEnterLabForJohtoStarter: LittlerootTown_ProfessorBirchsLab_EventScript_Aide:: lock faceplayer - compare VAR_BIRCH_LAB_STATE, 3 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AideReceivedStarter + goto_if_ge VAR_BIRCH_LAB_STATE, 3, LittlerootTown_ProfessorBirchsLab_EventScript_AideReceivedStarter goto_if_set FLAG_BIRCH_AIDE_MET, LittlerootTown_ProfessorBirchsLab_EventScript_AideAlreadyMet msgbox LittlerootTown_ProfessorBirchsLab_Text_BirchAwayOnFieldwork, MSGBOX_DEFAULT setflag FLAG_BIRCH_AIDE_MET @@ -308,40 +295,34 @@ LittlerootTown_ProfessorBirchsLab_EventScript_AideReceivedStarter:: LittlerootTown_ProfessorBirchsLab_EventScript_Cyndaquil:: release - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_CYNDAQUIL, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeCyndaquil, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime goto LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil end LittlerootTown_ProfessorBirchsLab_EventScript_Totodile:: release - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_TOTODILE, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeTotodile, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime goto LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile end LittlerootTown_ProfessorBirchsLab_EventScript_Chikorita:: release - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_AlreadyChoseJohtoStarter applymovement LOCALID_BIRCH, Common_Movement_WalkInPlaceFasterRight waitmovement 0 showmonpic SPECIES_CHIKORITA, 10, 3 msgbox LittlerootTown_ProfessorBirchsLab_Text_YoullTakeChikorita, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime goto LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita end @@ -360,10 +341,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil:: bufferspeciesname STR_VAR_1, SPECIES_CYNDAQUIL setvar VAR_TEMP_1, SPECIES_CYNDAQUIL givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty - compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC + goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty + goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end @@ -372,8 +351,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_CYNDAQUIL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil @@ -383,8 +361,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_CYNDAQUIL msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_CyndaquilTransferredToPC + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_CyndaquilTransferredToPC call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_CyndaquilTransferredToPC end @@ -405,10 +382,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile:: bufferspeciesname STR_VAR_1, SPECIES_TOTODILE setvar VAR_TEMP_1, SPECIES_TOTODILE givemon SPECIES_TOTODILE, 5, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty - compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC + goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty + goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end @@ -417,8 +392,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_TOTODILE msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile @@ -428,8 +402,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_TOTODILE msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_TotodileTransferredToPC + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_TotodileTransferredToPC call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_TotodileTransferredToPC end @@ -450,10 +423,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita:: bufferspeciesname STR_VAR_1, SPECIES_CHIKORITA setvar VAR_TEMP_1, SPECIES_CHIKORITA givemon SPECIES_CHIKORITA, 5, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty - compare VAR_RESULT, 1 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC + goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty + goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end @@ -462,8 +433,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_CHIKORITA msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedChikorita + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedChikorita call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedChikorita @@ -473,8 +443,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC:: call LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter removeobject LOCALID_BALL_CHIKORITA msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_ChikoritaTransferredToPC + goto_if_eq VAR_RESULT, NO, LittlerootTown_ProfessorBirchsLab_EventScript_ChikoritaTransferredToPC call Common_EventScript_NameReceivedBoxMon goto LittlerootTown_ProfessorBirchsLab_EventScript_ChikoritaTransferredToPC end @@ -501,10 +470,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedJohtoStarter:: LittlerootTown_ProfessorBirchsLab_EventScript_Birch:: lock faceplayer - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_CanHaveAnyOneOfRarePokemon - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_GrassyPatchWaiting + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5, LittlerootTown_ProfessorBirchsLab_EventScript_CanHaveAnyOneOfRarePokemon + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_ProfessorBirchsLab_EventScript_GrassyPatchWaiting goto_if_unset FLAG_HAS_MATCH_CALL, LittlerootTown_ProfessorBirchsLab_EventScript_TryRatePokedexOrRegister goto_if_unset FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, EventScript_RegisterProfBirch goto LittlerootTown_ProfessorBirchsLab_EventScript_TryRatePokedexOrRegister @@ -522,12 +489,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GrassyPatchWaiting:: LittlerootTown_ProfessorBirchsLab_EventScript_TryRatePokedexOrRegister:: goto_if_unset FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_UNKNOWN_0x380, ProfBirch_EventScript_RatePokedexOrRegister - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 3 - goto_if_eq ProfBirch_EventScript_RatePokedexOrRegister - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge ProfBirch_EventScript_RatePokedexOrRegister - compare VAR_BIRCH_LAB_STATE, 5 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_PokemonAwait + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 3, ProfBirch_EventScript_RatePokedexOrRegister + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, ProfBirch_EventScript_RatePokedexOrRegister + goto_if_eq VAR_BIRCH_LAB_STATE, 5, LittlerootTown_ProfessorBirchsLab_EventScript_PokemonAwait msgbox LittlerootTown_ProfessorBirchsLab_Text_BirchRivalGoneHome, MSGBOX_DEFAULT release end @@ -556,10 +520,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedex:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight waitmovement 0 checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanGivePokeBalls + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanGivePokeBalls setvar VAR_BIRCH_LAB_STATE, 5 setflag FLAG_ADVENTURE_STARTED setvar VAR_OLDALE_TOWN_STATE, 1 @@ -571,8 +533,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GivePokedex:: LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls:: msgbox LittlerootTown_ProfessorBirchsLab_Text_MayGotPokedexTooTakeThese, MSGBOX_DEFAULT giveitem ITEM_POKE_BALL, 5 - compare VAR_RESULT, FALSE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayNoRoomForPokeBalls + call_if_eq VAR_RESULT, FALSE, LittlerootTown_ProfessorBirchsLab_EventScript_MayNoRoomForPokeBalls msgbox LittlerootTown_ProfessorBirchsLab_Text_CatchCutePokemonWithPokeBalls, MSGBOX_DEFAULT setvar VAR_RESULT, 0 return @@ -580,8 +541,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_MayGivePokeBalls:: LittlerootTown_ProfessorBirchsLab_EventScript_BrendanGivePokeBalls:: msgbox LittlerootTown_ProfessorBirchsLab_Text_BrendanGotPokedexTooTakeThese, MSGBOX_DEFAULT giveitem ITEM_POKE_BALL, 5 - compare VAR_RESULT, FALSE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanNoRoomForPokeBalls + call_if_eq VAR_RESULT, FALSE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanNoRoomForPokeBalls msgbox LittlerootTown_ProfessorBirchsLab_Text_CatchCoolPokemonWithPokeBalls, MSGBOX_DEFAULT setvar VAR_RESULT, 1 return @@ -621,17 +581,12 @@ LittlerootTown_ProfessorBirchsLab_EventScript_Machine:: LittlerootTown_ProfessorBirchsLab_EventScript_Rival:: lock faceplayer - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5 - goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_RivalFuturePlans - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_RivalHaveYouGoneToBattleFrontier - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 - goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_RivalTakeBreakFromFieldwork + goto_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 5, LittlerootTown_ProfessorBirchsLab_EventScript_RivalFuturePlans + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6, LittlerootTown_ProfessorBirchsLab_EventScript_RivalHaveYouGoneToBattleFrontier + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_ProfessorBirchsLab_EventScript_RivalTakeBreakFromFieldwork checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayWhereShouldIGoNext - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanWhereShouldIGoNext + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayWhereShouldIGoNext + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanWhereShouldIGoNext release end @@ -645,10 +600,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_BrendanWhereShouldIGoNext:: LittlerootTown_ProfessorBirchsLab_EventScript_RivalFuturePlans:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayWhatNextImStayingHere - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanPreferCollectingSlowly + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayWhatNextImStayingHere + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanPreferCollectingSlowly release end @@ -662,10 +615,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_BrendanPreferCollectingSlowly: LittlerootTown_ProfessorBirchsLab_EventScript_RivalHaveYouGoneToBattleFrontier:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayHaveYouGoneToBattleFrontier - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanHaveYouGoneToBattleFrontier + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayHaveYouGoneToBattleFrontier + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanHaveYouGoneToBattleFrontier release end @@ -679,10 +630,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_BrendanHaveYouGoneToBattleFrontier LittlerootTown_ProfessorBirchsLab_EventScript_RivalTakeBreakFromFieldwork:: checkplayergender - compare VAR_RESULT, MALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_MayTakeBreakFromFieldwork - compare VAR_RESULT, FEMALE - call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_BrendanTakeBreakFromFieldwork + call_if_eq VAR_RESULT, MALE, LittlerootTown_ProfessorBirchsLab_EventScript_MayTakeBreakFromFieldwork + call_if_eq VAR_RESULT, FEMALE, LittlerootTown_ProfessorBirchsLab_EventScript_BrendanTakeBreakFromFieldwork release end diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc index 296ef02f82..1d988a4448 100644 --- a/data/maps/MarineCave_End/scripts.inc +++ b/data/maps/MarineCave_End/scripts.inc @@ -11,8 +11,7 @@ MarineCave_End_OnResume: MarineCave_End_EventScript_TryRemoveKyogre:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_KYOGRE return @@ -43,12 +42,9 @@ MarineCave_End_EventScript_Kyogre:: clearflag FLAG_SYS_CTRL_OBJ_DELETE setvar VAR_TEMP_1, 0 specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq MarineCave_End_EventScript_DefeatedKyogre - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq MarineCave_End_EventScript_RanFromKyogre - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq MarineCave_End_EventScript_RanFromKyogre + goto_if_eq VAR_RESULT, B_OUTCOME_WON, MarineCave_End_EventScript_DefeatedKyogre + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, MarineCave_End_EventScript_RanFromKyogre + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, MarineCave_End_EventScript_RanFromKyogre setvar VAR_SHOULD_END_ABNORMAL_WEATHER, 1 setflag FLAG_DEFEATED_KYOGRE releaseall diff --git a/data/maps/MauvilleCity/scripts.inc b/data/maps/MauvilleCity/scripts.inc index eb243ec593..2ad39aec1c 100644 --- a/data/maps/MauvilleCity/scripts.inc +++ b/data/maps/MauvilleCity/scripts.inc @@ -107,10 +107,8 @@ MauvilleCity_EventScript_Wally:: end MauvilleCity_EventScript_BattleWallyPrompt:: - compare VAR_RESULT, YES - call_if_eq MauvilleCity_EventScript_BattleWally - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_EventScript_DeclineWallyBattle + call_if_eq VAR_RESULT, YES, MauvilleCity_EventScript_BattleWally + goto_if_eq VAR_RESULT, NO, MauvilleCity_EventScript_DeclineWallyBattle closemessage switch VAR_FACING case DIR_NORTH, MauvilleCity_EventScript_WallyAndUncleExitNorth @@ -164,19 +162,15 @@ MauvilleCity_EventScript_DefeatedWally:: setflag FLAG_DEFEATED_WALLY_MAUVILLE setvar VAR_WALLY_CALL_STEP_COUNTER, 0 setflag FLAG_ENABLE_FIRST_WALLY_POKENAV_CALL - compare VAR_FACING, DIR_NORTH - call_if_eq MauvilleCity_EventScript_ScottApproachPlayerNorth - compare VAR_FACING, DIR_EAST - call_if_eq MauvilleCity_EventScript_ScottApproachPlayerEast + call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottApproachPlayerNorth + call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottApproachPlayerEast applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 msgbox MauvilleCity_Text_ScottYouDidntHoldBack, MSGBOX_DEFAULT closemessage addvar VAR_SCOTT_STATE, 1 - compare VAR_FACING, DIR_NORTH - call_if_eq MauvilleCity_EventScript_ScottExitNorth - compare VAR_FACING, DIR_EAST - call_if_eq MauvilleCity_EventScript_ScottExitEast + call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottExitNorth + call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottExitEast removeobject LOCALID_SCOTT releaseall end @@ -425,8 +419,7 @@ MauvilleCity_EventScript_Wattson:: lock faceplayer goto_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_ReceivedThunderbolt - compare VAR_NEW_MAUVILLE_STATE, 2 - goto_if_eq MauvilleCity_EventScript_CompletedNewMauville + goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, MauvilleCity_EventScript_CompletedNewMauville goto_if_set FLAG_GOT_BASEMENT_KEY_FROM_WATTSON, MauvilleCity_EventScript_BegunNewMauville msgbox MauvilleCity_Text_WattsonNeedFavorTakeKey, MSGBOX_DEFAULT giveitem ITEM_BASEMENT_KEY @@ -443,8 +436,7 @@ MauvilleCity_EventScript_BegunNewMauville:: MauvilleCity_EventScript_CompletedNewMauville:: msgbox MauvilleCity_Text_WattsonThanksTakeTM, MSGBOX_DEFAULT giveitem ITEM_TM24 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_GOT_TM24_FROM_WATTSON msgbox MauvilleCity_Text_WattsonYoungTakeCharge, MSGBOX_DEFAULT release diff --git a/data/maps/MauvilleCity_BikeShop/scripts.inc b/data/maps/MauvilleCity_BikeShop/scripts.inc index 5ce43c1baa..0893384101 100644 --- a/data/maps/MauvilleCity_BikeShop/scripts.inc +++ b/data/maps/MauvilleCity_BikeShop/scripts.inc @@ -8,18 +8,14 @@ MauvilleCity_BikeShop_EventScript_Rydel:: goto_if_set FLAG_DECLINED_BIKE, MauvilleCity_BikeShop_EventScript_SkipGreeting msgbox MauvilleCity_BikeShop_Text_RydelGreeting, MSGBOX_DEFAULT msgbox MauvilleCity_BikeShop_Text_DidYouComeFromFarAway, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_BikeShop_EventScript_YesFar - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_BikeShop_EventScript_NotFar + goto_if_eq VAR_RESULT, YES, MauvilleCity_BikeShop_EventScript_YesFar + goto_if_eq VAR_RESULT, NO, MauvilleCity_BikeShop_EventScript_NotFar end MauvilleCity_BikeShop_EventScript_SkipGreeting:: msgbox MauvilleCity_BikeShop_Text_DidYouComeFromFarAway, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_BikeShop_EventScript_YesFar - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_BikeShop_EventScript_NotFar + goto_if_eq VAR_RESULT, YES, MauvilleCity_BikeShop_EventScript_YesFar + goto_if_eq VAR_RESULT, NO, MauvilleCity_BikeShop_EventScript_NotFar end MauvilleCity_BikeShop_EventScript_ChooseBike:: @@ -62,21 +58,17 @@ MauvilleCity_BikeShop_EventScript_ComeBackToSwitchBikes:: MauvilleCity_BikeShop_EventScript_AskSwitchBikes:: msgbox MauvilleCity_BikeShop_Text_WantToSwitchBikes, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchBikes - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_BikeShop_EventScript_KeepBike + goto_if_eq VAR_RESULT, YES, MauvilleCity_BikeShop_EventScript_SwitchBikes + goto_if_eq VAR_RESULT, NO, MauvilleCity_BikeShop_EventScript_KeepBike end @ If the player does not have a bike on them Rydel assumes its stored in the PC MauvilleCity_BikeShop_EventScript_SwitchBikes:: msgbox MauvilleCity_BikeShop_Text_IllSwitchBikes, MSGBOX_DEFAULT checkitem ITEM_ACRO_BIKE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchAcroForMach + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_BikeShop_EventScript_SwitchAcroForMach checkitem ITEM_MACH_BIKE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchMachForAcro + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_BikeShop_EventScript_SwitchMachForAcro msgbox MauvilleCity_BikeShop_Text_OhYourBikeIsInPC, MSGBOX_DEFAULT release end diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc index 451e8acb5a..b7c8603a33 100644 --- a/data/maps/MauvilleCity_GameCorner/scripts.inc +++ b/data/maps/MauvilleCity_GameCorner/scripts.inc @@ -17,8 +17,7 @@ MauvilleCity_GameCorner_EventScript_CoinsClerk:: faceplayer msgbox MauvilleCity_GameCorner_Text_ThisIsMauvilleGameCorner, MSGBOX_DEFAULT checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NeedCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NeedCoinCase message MauvilleCity_GameCorner_Text_WereYouLookingForCoins waitmessage showmoneybox 0, 0 @@ -44,11 +43,9 @@ MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault500:: MauvilleCity_GameCorner_EventScript_Buy50Coins:: checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1 - 50) - goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1 - 50), MauvilleCity_GameCorner_EventScript_NoRoomForCoins checkmoney COINS_PRICE_50 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NotEnoughMoney addcoins 50 removemoney COINS_PRICE_50 updatemoneybox @@ -62,11 +59,9 @@ MauvilleCity_GameCorner_EventScript_Buy50Coins:: MauvilleCity_GameCorner_EventScript_Buy500Coins:: checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, (MAX_COINS + 1 - 500) - goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins + goto_if_ge VAR_TEMP_1, (MAX_COINS + 1 - 500), MauvilleCity_GameCorner_EventScript_NoRoomForCoins checkmoney COINS_PRICE_500 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NotEnoughMoney addcoins 500 removemoney COINS_PRICE_500 updatemoneybox @@ -109,8 +104,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerDolls:: faceplayer msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT checkitem ITEM_COIN_CASE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage release end @@ -153,8 +147,7 @@ MauvilleCity_GameCorner_EventScript_MudkipDoll:: MauvilleCity_GameCorner_EventScript_ConfirmDollPrize:: msgbox MauvilleCity_GameCorner_Text_SoYourChoiceIsX, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_GameCorner_EventScript_CancelDollSelect + goto_if_eq VAR_RESULT, NO, MauvilleCity_GameCorner_EventScript_CancelDollSelect switch VAR_TEMP_1 case 1, MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll case 2, MauvilleCity_GameCorner_EventScript_BuyTorchicDoll @@ -163,12 +156,10 @@ MauvilleCity_GameCorner_EventScript_ConfirmDollPrize:: MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, DOLL_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll + goto_if_lt VAR_TEMP_2, DOLL_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll bufferdecorationname STR_VAR_2, DECOR_TREECKO_DOLL checkdecorspace DECOR_TREECKO_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForDoll removecoins DOLL_COINS adddecoration DECOR_TREECKO_DOLL updatecoinsbox 1, 1 @@ -179,12 +170,10 @@ MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll:: MauvilleCity_GameCorner_EventScript_BuyTorchicDoll:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, DOLL_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll + goto_if_lt VAR_TEMP_2, DOLL_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll bufferdecorationname STR_VAR_2, DECOR_TORCHIC_DOLL checkdecorspace DECOR_TORCHIC_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForDoll removecoins DOLL_COINS adddecoration DECOR_TORCHIC_DOLL updatecoinsbox 1, 1 @@ -195,12 +184,10 @@ MauvilleCity_GameCorner_EventScript_BuyTorchicDoll:: MauvilleCity_GameCorner_EventScript_BuyMudkipDoll:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, DOLL_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll + goto_if_lt VAR_TEMP_2, DOLL_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll bufferdecorationname STR_VAR_2, DECOR_MUDKIP_DOLL checkdecorspace DECOR_MUDKIP_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForDoll removecoins DOLL_COINS adddecoration DECOR_MUDKIP_DOLL updatecoinsbox 1, 1 @@ -230,8 +217,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerTMs:: faceplayer msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT checkitem ITEM_COIN_CASE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage release end @@ -292,8 +278,7 @@ MauvilleCity_GameCorner_EventScript_TM13:: MauvilleCity_GameCorner_EventScript_ConfirmTMPrize:: special BufferTMHMMoveName msgbox MauvilleCity_GameCorner_Text_SoYourChoiceIsTheTMX, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_GameCorner_EventScript_CancelTMSelect + goto_if_eq VAR_RESULT, NO, MauvilleCity_GameCorner_EventScript_CancelTMSelect switch VAR_TEMP_1 case 1, MauvilleCity_GameCorner_EventScript_BuyTM32 case 2, MauvilleCity_GameCorner_EventScript_BuyTM29 @@ -304,11 +289,9 @@ MauvilleCity_GameCorner_EventScript_ConfirmTMPrize:: MauvilleCity_GameCorner_EventScript_BuyTM32:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM32_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM32_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM32 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM32_COINS additem ITEM_TM32 updatecoinsbox 1, 1 @@ -319,11 +302,9 @@ MauvilleCity_GameCorner_EventScript_BuyTM32:: MauvilleCity_GameCorner_EventScript_BuyTM29:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM29_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM29_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM29 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM29_COINS additem ITEM_TM29 updatecoinsbox 1, 1 @@ -334,11 +315,9 @@ MauvilleCity_GameCorner_EventScript_BuyTM29:: MauvilleCity_GameCorner_EventScript_BuyTM35:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM35_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM35_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM35 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM35_COINS additem ITEM_TM35 updatecoinsbox 1, 1 @@ -349,11 +328,9 @@ MauvilleCity_GameCorner_EventScript_BuyTM35:: MauvilleCity_GameCorner_EventScript_BuyTM24:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM24_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM24_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM24 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM24_COINS additem ITEM_TM24 updatecoinsbox 1, 1 @@ -364,11 +341,9 @@ MauvilleCity_GameCorner_EventScript_BuyTM24:: MauvilleCity_GameCorner_EventScript_BuyTM13:: checkcoins VAR_TEMP_2 - compare VAR_TEMP_2, TM13_COINS - goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM + goto_if_lt VAR_TEMP_2, TM13_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM checkitemspace ITEM_TM13 - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM removecoins TM13_COINS additem ITEM_TM13 updatecoinsbox 1, 1 @@ -406,8 +381,7 @@ MauvilleCity_GameCorner_EventScript_Girl:: faceplayer goto_if_set FLAG_RECEIVED_STARTER_DOLL, MauvilleCity_GameCorner_EventScript_ReceivedStarterDoll msgbox MauvilleCity_GameCorner_Text_GotTwoOfSameDollWantOne, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_GameCorner_EventScript_DeclineStarterDoll + goto_if_eq VAR_RESULT, NO, MauvilleCity_GameCorner_EventScript_DeclineStarterDoll switch VAR_STARTER_MON case 0, MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll case 1, MauvilleCity_GameCorner_EventScript_GiveTorchicDoll @@ -417,8 +391,7 @@ MauvilleCity_GameCorner_EventScript_Girl:: MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll:: bufferdecorationname STR_VAR_2, DECOR_TREECKO_DOLL checkdecorspace DECOR_TREECKO_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll msgbox MauvilleCity_GameCorner_Text_HereYouGo2, MSGBOX_DEFAULT givedecoration DECOR_TREECKO_DOLL setflag FLAG_RECEIVED_STARTER_DOLL @@ -428,8 +401,7 @@ MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll:: MauvilleCity_GameCorner_EventScript_GiveTorchicDoll:: bufferdecorationname STR_VAR_2, DECOR_TORCHIC_DOLL checkdecorspace DECOR_TORCHIC_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll msgbox MauvilleCity_GameCorner_Text_HereYouGo2, MSGBOX_DEFAULT givedecoration DECOR_TORCHIC_DOLL setflag FLAG_RECEIVED_STARTER_DOLL @@ -439,8 +411,7 @@ MauvilleCity_GameCorner_EventScript_GiveTorchicDoll:: MauvilleCity_GameCorner_EventScript_GiveMudkipDoll:: bufferdecorationname STR_VAR_2, DECOR_MUDKIP_DOLL checkdecorspace DECOR_MUDKIP_DOLL - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll msgbox MauvilleCity_GameCorner_Text_HereYouGo2, MSGBOX_DEFAULT givedecoration DECOR_MUDKIP_DOLL setflag FLAG_RECEIVED_STARTER_DOLL @@ -467,8 +438,7 @@ MauvilleCity_GameCorner_EventScript_PokefanM:: lock faceplayer checkitem ITEM_COIN_CASE - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_GameCorner_EventScript_TryGive20Coins + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_GameCorner_EventScript_TryGive20Coins msgbox MauvilleCity_GameCorner_Text_NeedCoinCaseGoNextDoor, MSGBOX_DEFAULT goto MauvilleCity_GameCorner_EventScript_NPCReturnToSlots end @@ -476,8 +446,7 @@ MauvilleCity_GameCorner_EventScript_PokefanM:: MauvilleCity_GameCorner_EventScript_TryGive20Coins:: goto_if_set FLAG_RECEIVED_20_COINS, MauvilleCity_GameCorner_EventScript_PokefanMNormal checkcoins VAR_TEMP_1 - compare VAR_TEMP_1, 1 @ Only give 20 coins if player has no coins - goto_if_ge MauvilleCity_GameCorner_EventScript_PokefanMNormal + goto_if_ge VAR_TEMP_1, 1, MauvilleCity_GameCorner_EventScript_PokefanMNormal @ Only give 20 coins if player has no coins setflag FLAG_RECEIVED_20_COINS addcoins 20 msgbox MauvilleCity_GameCorner_Text_LuckOnlyLastSoLongTakeCoins, MSGBOX_DEFAULT @@ -535,8 +504,7 @@ MauvilleCity_GameCorner_EventScript_Woman:: MauvilleCity_GameCorner_EventScript_SlotMachine0:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 0 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -546,8 +514,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine0:: MauvilleCity_GameCorner_EventScript_SlotMachine1:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 1 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -557,8 +524,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine1:: MauvilleCity_GameCorner_EventScript_SlotMachine2:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 2 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -568,8 +534,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine2:: MauvilleCity_GameCorner_EventScript_SlotMachine3:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 3 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -579,8 +544,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine3:: MauvilleCity_GameCorner_EventScript_SlotMachine4:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 4 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -590,8 +554,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine4:: MauvilleCity_GameCorner_EventScript_SlotMachine5:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 5 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -601,8 +564,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine5:: MauvilleCity_GameCorner_EventScript_SlotMachine6:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 6 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -612,8 +574,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine6:: MauvilleCity_GameCorner_EventScript_SlotMachine7:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 7 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -623,8 +584,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine7:: MauvilleCity_GameCorner_EventScript_SlotMachine8:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 8 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -634,8 +594,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine8:: MauvilleCity_GameCorner_EventScript_SlotMachine9:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 9 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -645,8 +604,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine9:: MauvilleCity_GameCorner_EventScript_SlotMachine10:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 10 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT @@ -656,8 +614,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine10:: MauvilleCity_GameCorner_EventScript_SlotMachine11:: lockall checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 11 specialvar VAR_RESULT, GetSlotMachineId playslotmachine VAR_RESULT diff --git a/data/maps/MauvilleCity_Gym/scripts.inc b/data/maps/MauvilleCity_Gym/scripts.inc index d446e44b9a..de924d7d93 100644 --- a/data/maps/MauvilleCity_Gym/scripts.inc +++ b/data/maps/MauvilleCity_Gym/scripts.inc @@ -76,11 +76,9 @@ MauvilleCity_Gym_EventScript_DeactivatePuzzle:: MauvilleCity_Gym_EventScript_Wattson:: trainerbattle_single TRAINER_WATTSON_1, MauvilleCity_Gym_Text_WattsonIntro, MauvilleCity_Gym_Text_WattsonDefeat, MauvilleCity_Gym_EventScript_WattsonDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_Gym_EventScript_WattsonRematch + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_Gym_EventScript_WattsonRematch goto_if_unset FLAG_RECEIVED_TM34, MauvilleCity_Gym_EventScript_GiveShockWave2 - compare VAR_NEW_MAUVILLE_STATE, 2 - goto_if_eq MauvilleCity_Gym_EventScript_CompletedNewMauville + goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, MauvilleCity_Gym_EventScript_CompletedNewMauville msgbox MauvilleCity_Gym_Text_WattsonPostBattle, MSGBOX_DEFAULT release end @@ -95,8 +93,7 @@ MauvilleCity_Gym_EventScript_WattsonDefeated:: setflag FLAG_DEFEATED_MAUVILLE_GYM setflag FLAG_BADGE03_GET addvar VAR_PETALBURG_GYM_STATE, 1 - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_eq Common_EventScript_ReadyPetalburgGymForBattle + call_if_eq VAR_PETALBURG_GYM_STATE, 6, Common_EventScript_ReadyPetalburgGymForBattle setvar VAR_0x8008, 3 call Common_EventScript_SetGymTrainers special MauvilleGymDeactivatePuzzle @@ -116,8 +113,7 @@ MauvilleCity_Gym_EventScript_WattsonDefeated:: MauvilleCity_Gym_EventScript_GiveShockWave2:: giveitem ITEM_TM34 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox MauvilleCity_Gym_Text_ExplainShockWave, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM34 release @@ -125,8 +121,7 @@ MauvilleCity_Gym_EventScript_GiveShockWave2:: MauvilleCity_Gym_EventScript_GiveShockWave:: giveitem ITEM_TM34 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox MauvilleCity_Gym_Text_ExplainShockWave, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM34 return @@ -144,8 +139,7 @@ MauvilleCity_Gym_EventScript_WattsonRematch:: MauvilleCity_Gym_EventScript_Switch1:: lockall goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_SwitchDoNothing - compare VAR_MAUVILLE_GYM_STATE, 1 - goto_if_eq MauvilleCity_Gym_EventScript_SwitchDoNothing + goto_if_eq VAR_MAUVILLE_GYM_STATE, 1, MauvilleCity_Gym_EventScript_SwitchDoNothing setvar VAR_MAUVILLE_GYM_STATE, 1 setvar VAR_0x8004, 0 goto MauvilleCity_Gym_EventScript_PressFloorSwitch @@ -154,8 +148,7 @@ MauvilleCity_Gym_EventScript_Switch1:: MauvilleCity_Gym_EventScript_Switch2:: lockall goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_SwitchDoNothing - compare VAR_MAUVILLE_GYM_STATE, 2 - goto_if_eq MauvilleCity_Gym_EventScript_SwitchDoNothing + goto_if_eq VAR_MAUVILLE_GYM_STATE, 2, MauvilleCity_Gym_EventScript_SwitchDoNothing setvar VAR_MAUVILLE_GYM_STATE, 2 setvar VAR_0x8004, 1 goto MauvilleCity_Gym_EventScript_PressFloorSwitch @@ -164,8 +157,7 @@ MauvilleCity_Gym_EventScript_Switch2:: MauvilleCity_Gym_EventScript_Switch3:: lockall goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_SwitchDoNothing - compare VAR_MAUVILLE_GYM_STATE, 3 - goto_if_eq MauvilleCity_Gym_EventScript_SwitchDoNothing + goto_if_eq VAR_MAUVILLE_GYM_STATE, 3, MauvilleCity_Gym_EventScript_SwitchDoNothing setvar VAR_MAUVILLE_GYM_STATE, 3 setvar VAR_0x8004, 2 goto MauvilleCity_Gym_EventScript_PressFloorSwitch @@ -174,8 +166,7 @@ MauvilleCity_Gym_EventScript_Switch3:: MauvilleCity_Gym_EventScript_Switch4:: lockall goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_SwitchDoNothing - compare VAR_MAUVILLE_GYM_STATE, 4 - goto_if_eq MauvilleCity_Gym_EventScript_SwitchDoNothing + goto_if_eq VAR_MAUVILLE_GYM_STATE, 4, MauvilleCity_Gym_EventScript_SwitchDoNothing setvar VAR_MAUVILLE_GYM_STATE, 4 setvar VAR_0x8004, 3 goto MauvilleCity_Gym_EventScript_PressFloorSwitch diff --git a/data/maps/MauvilleCity_House2/scripts.inc b/data/maps/MauvilleCity_House2/scripts.inc index 441a4f1658..193e0c04ce 100644 --- a/data/maps/MauvilleCity_House2/scripts.inc +++ b/data/maps/MauvilleCity_House2/scripts.inc @@ -7,8 +7,7 @@ MauvilleCity_House2_EventScript_Woman:: goto_if_set FLAG_RECEIVED_COIN_CASE, MauvilleCity_House2_EventScript_ReceivedCoinCase msgbox MauvilleCity_House2_Text_BuyHarborMailAtSlateport, MSGBOX_DEFAULT checkitem ITEM_HARBOR_MAIL - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_House2_EventScript_AskToTradeForHarborMail + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_House2_EventScript_AskToTradeForHarborMail release end @@ -19,10 +18,8 @@ MauvilleCity_House2_EventScript_AskToTradeForHarborMail:: applymovement VAR_LAST_TALKED, Common_Movement_Delay48 waitmovement 0 msgbox MauvilleCity_House2_Text_TradeHarborMailForCoinCase, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_House2_EventScript_AcceptTrade - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_House2_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, YES, MauvilleCity_House2_EventScript_AcceptTrade + goto_if_eq VAR_RESULT, NO, MauvilleCity_House2_EventScript_DeclineTrade end MauvilleCity_House2_EventScript_AcceptTrade:: diff --git a/data/maps/MeteorFalls_1F_2R/scripts.inc b/data/maps/MeteorFalls_1F_2R/scripts.inc index 706d362bed..4e3e9b321b 100644 --- a/data/maps/MeteorFalls_1F_2R/scripts.inc +++ b/data/maps/MeteorFalls_1F_2R/scripts.inc @@ -4,8 +4,7 @@ MeteorFalls_1F_2R_MapScripts:: MeteorFalls_1F_2R_EventScript_Nicolas:: trainerbattle_single TRAINER_NICOLAS_1, MeteorFalls_1F_2R_Text_NicolasIntro, MeteorFalls_1F_2R_Text_NicolasDefeat, MeteorFalls_1F_2R_EventScript_RegisterNicolas specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MeteorFalls_1F_2R_EventScript_RematchNicolas + goto_if_eq VAR_RESULT, TRUE, MeteorFalls_1F_2R_EventScript_RematchNicolas msgbox MeteorFalls_1F_2R_Text_NicolasPostBattle, MSGBOX_DEFAULT release end @@ -26,8 +25,7 @@ MeteorFalls_1F_2R_EventScript_RematchNicolas:: MeteorFalls_1F_2R_EventScript_John:: trainerbattle_double TRAINER_JOHN_AND_JAY_1, MeteorFalls_1F_2R_Text_JohnIntro, MeteorFalls_1F_2R_Text_JohnDefeat, MeteorFalls_1F_2R_Text_JohnNotEnoughMons, MeteorFalls_1F_2R_EventScript_RegisterJohn specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MeteorFalls_1F_2R_EventScript_RematchJohn + goto_if_eq VAR_RESULT, TRUE, MeteorFalls_1F_2R_EventScript_RematchJohn msgbox MeteorFalls_1F_2R_Text_JohnPostBattle, MSGBOX_DEFAULT release end @@ -46,8 +44,7 @@ MeteorFalls_1F_2R_EventScript_RematchJohn:: MeteorFalls_1F_2R_EventScript_Jay:: trainerbattle_double TRAINER_JOHN_AND_JAY_1, MeteorFalls_1F_2R_Text_JayIntro, MeteorFalls_1F_2R_Text_JayDefeat, MeteorFalls_1F_2R_Text_JayNotEnoughMons, MeteorFalls_1F_2R_EventScript_RegisterJay specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MeteorFalls_1F_2R_EventScript_RematchJay + goto_if_eq VAR_RESULT, TRUE, MeteorFalls_1F_2R_EventScript_RematchJay msgbox MeteorFalls_1F_2R_Text_JayPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/MirageTower_4F/scripts.inc b/data/maps/MirageTower_4F/scripts.inc index 8d88c69904..61bde877c5 100644 --- a/data/maps/MirageTower_4F/scripts.inc +++ b/data/maps/MirageTower_4F/scripts.inc @@ -8,8 +8,7 @@ MirageTower_4F_EventScript_RootFossil:: lock faceplayer msgbox MirageTower_4F_Text_TakeRootFossil, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MirageTower_4F_EventScript_LeaveRootFossil + goto_if_eq VAR_RESULT, NO, MirageTower_4F_EventScript_LeaveRootFossil giveitem ITEM_ROOT_FOSSIL closemessage setflag FLAG_HIDE_MIRAGE_TOWER_ROOT_FOSSIL @@ -29,8 +28,7 @@ MirageTower_4F_EventScript_ClawFossil:: lock faceplayer msgbox MirageTower_4F_Text_TakeClawFossil, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MirageTower_4F_EventScript_LeaveClawFossil + goto_if_eq VAR_RESULT, NO, MirageTower_4F_EventScript_LeaveClawFossil giveitem ITEM_CLAW_FOSSIL closemessage setflag FLAG_HIDE_MIRAGE_TOWER_CLAW_FOSSIL diff --git a/data/maps/MossdeepCity/scripts.inc b/data/maps/MossdeepCity/scripts.inc index f5af3a391b..836490cbdd 100644 --- a/data/maps/MossdeepCity/scripts.inc +++ b/data/maps/MossdeepCity/scripts.inc @@ -233,12 +233,10 @@ MossdeepCity_EventScript_KingsRockBoy:: faceplayer goto_if_set FLAG_RECEIVED_KINGS_ROCK, MossdeepCity_EventScript_ReceivedKingsRock msgbox MossdeepCity_Text_WantKingsRockStevenGaveMe, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_EventScript_DeclineKingsRock + goto_if_eq VAR_RESULT, NO, MossdeepCity_EventScript_DeclineKingsRock msgbox MossdeepCity_Text_YouCanKeepIt, MSGBOX_DEFAULT giveitem ITEM_KINGS_ROCK - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_KINGS_ROCK release end @@ -262,10 +260,8 @@ MossdeepCity_EventScript_Scott:: faceplayer msgbox MossdeepCity_Text_ScottSomethingWrongWithTown, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq MossdeepCity_EventScript_ScottExitNorth - compare VAR_FACING, DIR_EAST - call_if_eq MossdeepCity_EventScript_ScottExitEast + call_if_eq VAR_FACING, DIR_NORTH, MossdeepCity_EventScript_ScottExitNorth + call_if_eq VAR_FACING, DIR_EAST, MossdeepCity_EventScript_ScottExitEast addvar VAR_SCOTT_STATE, 1 removeobject LOCALID_SCOTT release diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index 7b63de2e73..b47011d680 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -51,8 +51,7 @@ MossdeepCity_Gym_EventScript_SetSwitch4Metatiles:: MossdeepCity_Gym_EventScript_TateAndLiza:: trainerbattle_double TRAINER_TATE_AND_LIZA_1, MossdeepCity_Gym_Text_TateAndLizaIntro, MossdeepCity_Gym_Text_TateAndLizaDefeat, MossdeepCity_Gym_Text_TateAndLizaNeedTwoMons, MossdeepCity_Gym_EventScript_TateAndLizaDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MossdeepCity_Gym_EventScript_TateAndLizaRematch + goto_if_eq VAR_RESULT, TRUE, MossdeepCity_Gym_EventScript_TateAndLizaRematch goto_if_unset FLAG_RECEIVED_TM04, MossdeepCity_Gym_EventScript_GiveCalmMind2 msgbox MossdeepCity_Gym_Text_TateAndLizaPostBattle, MSGBOX_DEFAULT release @@ -92,8 +91,7 @@ MossdeepCity_Gym_EventScript_TateAndLizaDefeated:: MossdeepCity_Gym_EventScript_GiveCalmMind2:: giveitem ITEM_TM04 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM04 release @@ -101,8 +99,7 @@ MossdeepCity_Gym_EventScript_GiveCalmMind2:: MossdeepCity_Gym_EventScript_GiveCalmMind:: giveitem ITEM_TM04 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM04 return diff --git a/data/maps/MossdeepCity_House1/scripts.inc b/data/maps/MossdeepCity_House1/scripts.inc index 1bb1dede6f..433defa666 100644 --- a/data/maps/MossdeepCity_House1/scripts.inc +++ b/data/maps/MossdeepCity_House1/scripts.inc @@ -7,8 +7,7 @@ MossdeepCity_House1_EventScript_BlackBelt:: bufferleadmonspeciesname STR_VAR_1 msgbox MossdeepCity_House1_Text_HmmYourPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, GetPokeblockNameByMonNature - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_House1_EventScript_NeutralNature + goto_if_eq VAR_RESULT, 0, MossdeepCity_House1_EventScript_NeutralNature msgbox MossdeepCity_House1_Text_ItLikesXPokeblocks, MSGBOX_DEFAULT release end diff --git a/data/maps/MossdeepCity_House2/scripts.inc b/data/maps/MossdeepCity_House2/scripts.inc index 5f568ac772..56a8381963 100644 --- a/data/maps/MossdeepCity_House2/scripts.inc +++ b/data/maps/MossdeepCity_House2/scripts.inc @@ -21,10 +21,8 @@ MossdeepCity_House2_EventScript_Wingull:: closemessage setflag FLAG_WINGULL_DELIVERED_MAIL clearflag FLAG_HIDE_FORTREE_CITY_HOUSE_4_WINGULL - compare VAR_FACING, DIR_NORTH - call_if_eq MossdeepCity_House2_EventScript_WingullExitNorth - compare VAR_FACING, DIR_WEST - call_if_eq MossdeepCity_House2_EventScript_WingullExitWest + call_if_eq VAR_FACING, DIR_NORTH, MossdeepCity_House2_EventScript_WingullExitNorth + call_if_eq VAR_FACING, DIR_WEST, MossdeepCity_House2_EventScript_WingullExitWest removeobject LOCALID_WINGULL release end diff --git a/data/maps/MossdeepCity_House3/scripts.inc b/data/maps/MossdeepCity_House3/scripts.inc index 51df05fe04..73b0cc26e9 100644 --- a/data/maps/MossdeepCity_House3/scripts.inc +++ b/data/maps/MossdeepCity_House3/scripts.inc @@ -6,8 +6,7 @@ MossdeepCity_House3_EventScript_SuperRodFisherman:: faceplayer goto_if_set FLAG_RECEIVED_SUPER_ROD, MossdeepCity_House3_EventScript_ReceivedSuperRod msgbox MossdeepCity_House3_Text_YouWantSuperRod, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_House3_EventScript_DeclineSuperRod + goto_if_eq VAR_RESULT, NO, MossdeepCity_House3_EventScript_DeclineSuperRod msgbox MossdeepCity_House3_Text_SuperRodIsSuper, MSGBOX_DEFAULT giveitem ITEM_SUPER_ROD setflag FLAG_RECEIVED_SUPER_ROD diff --git a/data/maps/MossdeepCity_House4/scripts.inc b/data/maps/MossdeepCity_House4/scripts.inc index 7b7348f4e6..8d0046857a 100644 --- a/data/maps/MossdeepCity_House4/scripts.inc +++ b/data/maps/MossdeepCity_House4/scripts.inc @@ -18,8 +18,7 @@ MossdeepCity_House4_EventScript_NinjaBoy:: lock faceplayer special CheckPlayerHasSecretBase - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_House4_EventScript_NoSecretBase + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_House4_EventScript_NoSecretBase special GetSecretBaseNearbyMapName msgbox MossdeepCity_House4_Text_YouMadeSecretBaseNearX, MSGBOX_DEFAULT release diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc index 4177c73ac1..263b071056 100644 --- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc @@ -11,8 +11,7 @@ MossdeepCity_SpaceCenter_1F_MapScripts:: .byte 0 MossdeepCity_SpaceCenter_1F_OnTransition: - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma end MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma:: @@ -25,12 +24,9 @@ MossdeepCity_SpaceCenter_1F_EventScript_MoveObjectsForTeamMagma:: setobjectxyperm LOCALID_SCIENTIST_1, 3, 4 setobjectmovementtype LOCALID_SCIENTIST_1, MOVEMENT_TYPE_FACE_RIGHT setobjectmovementtype LOCALID_SCIENTIST_2, MOVEMENT_TYPE_FACE_RIGHT - compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 1 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft - compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardDown - compare VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 3 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight + goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 1, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft + goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardDown + goto_if_eq VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 3, MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight end MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardLeft:: @@ -47,8 +43,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_MoveStairGuardRight:: end MossdeepCity_SpaceCenter_1F_OnLoad: - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_le MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote + goto_if_le VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote end MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote:: @@ -58,15 +53,12 @@ MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote:: MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounter:: lock faceplayer - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma dotimebasedevents specialvar VAR_RESULT, GetWeekCount buffernumberstring STR_VAR_1, VAR_RESULT - compare VAR_RESULT, 0 - call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYet - compare VAR_RESULT, 1 - call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber + call_if_eq VAR_RESULT, 0, MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYet + call_if_ge VAR_RESULT, 1, MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 @@ -85,10 +77,8 @@ MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma:: dotimebasedevents specialvar VAR_RESULT, GetWeekCount buffernumberstring STR_VAR_1, VAR_RESULT - compare VAR_RESULT, 0 - call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYetMagma - compare VAR_RESULT, 1 - call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma + call_if_eq VAR_RESULT, 0, MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYetMagma + call_if_ge VAR_RESULT, 1, MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterRight waitmovement 0 @@ -106,8 +96,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumberMagma:: MossdeepCity_SpaceCenter_1F_EventScript_Scientist:: lock faceplayer - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma msgbox MossdeepCity_SpaceCenter_1F_Text_RocketLaunchDemandsPerfection, MSGBOX_DEFAULT release end @@ -122,13 +111,11 @@ MossdeepCity_SpaceCenter_1F_EventScript_ScientistMagma:: MossdeepCity_SpaceCenter_1F_EventScript_SunStoneMan:: lock faceplayer - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStone msgbox MossdeepCity_SpaceCenter_1F_Text_FoundThisYouCanHaveIt, MSGBOX_DEFAULT giveitem ITEM_SUN_STONE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP msgbox MossdeepCity_SpaceCenter_1F_Text_HoennFamousForMeteorShowers, MSGBOX_DEFAULT release @@ -143,8 +130,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_SunStoneManMagma:: goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_GaveSunStoneMagma msgbox MossdeepCity_SpaceCenter_1F_Text_MagmaCantStealFuelTakeThis, MSGBOX_DEFAULT giveitem ITEM_SUN_STONE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP msgbox MossdeepCity_SpaceCenter_1F_Text_CantStrollOnBeachWithMagma, MSGBOX_DEFAULT applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterRight @@ -163,10 +149,8 @@ MossdeepCity_SpaceCenter_1F_EventScript_Woman:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_WomanNormal goto MossdeepCity_SpaceCenter_1F_EventScript_WomanMagma end @@ -184,10 +168,8 @@ MossdeepCity_SpaceCenter_1F_EventScript_OldMan:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_1F_EventScript_OldManNormal goto MossdeepCity_SpaceCenter_1F_EventScript_OldManMagma end diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc index 02278a13b9..4a22bf8eea 100644 --- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc +++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc @@ -15,10 +15,8 @@ MossdeepCity_SpaceCenter_2F_MapScripts:: .byte 0 MossdeepCity_SpaceCenter_2F_OnTransition: - compare VAR_MOSSDEEP_CITY_STATE, 2 - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MoveCivilians - compare VAR_MOSSDEEP_SPACE_CENTER_STATE, 2 - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MoveDefeatedGrunts + call_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_MoveCivilians + call_if_eq VAR_MOSSDEEP_SPACE_CENTER_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_MoveDefeatedGrunts end MossdeepCity_SpaceCenter_2F_EventScript_MoveCivilians:: @@ -48,8 +46,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ThreeMagmaGrunts:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay48 waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_YoureOutnumberedTakeUsOn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts + goto_if_eq VAR_RESULT, YES, MossdeepCity_SpaceCenter_2F_EventScript_BattleThreeMagmaGrunts msgbox MossdeepCity_SpaceCenter_2F_Text_GoodAnswer, MSGBOX_DEFAULT closemessage applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_PlayerExit @@ -109,10 +106,8 @@ MossdeepCity_SpaceCenter_2F_EventScript_Scientist:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_ScientistNormal goto MossdeepCity_SpaceCenter_2F_EventScript_ScientistMagma end @@ -130,10 +125,8 @@ MossdeepCity_SpaceCenter_2F_EventScript_Gentleman:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_GentlemanNormal goto MossdeepCity_SpaceCenter_2F_EventScript_GentlemanMagma end @@ -151,10 +144,8 @@ MossdeepCity_SpaceCenter_2F_EventScript_RichBoy:: lock faceplayer goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma - compare VAR_MOSSDEEP_CITY_STATE, 2 - goto_if_lt MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal + goto_if_eq VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma + goto_if_lt VAR_MOSSDEEP_CITY_STATE, 2, MossdeepCity_SpaceCenter_2F_EventScript_RichBoyNormal goto MossdeepCity_SpaceCenter_2F_EventScript_RichBoyMagma end @@ -246,8 +237,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt:: applymovement VAR_LAST_TALKED, Common_Movement_FacePlayer waitmovement 0 msgbox MossdeepCity_SpaceCenter_2F_Text_StevenAreYouReadyToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle + goto_if_eq VAR_RESULT, YES, MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle msgbox MossdeepCity_SpaceCenter_2F_Text_StevenHurryGetReadyQuickly, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown @@ -262,8 +252,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_ne MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle + goto_if_ne VAR_RESULT, 0, MossdeepCity_SpaceCenter_2F_EventScript_DoStevenMultiBattle special LoadPlayerParty goto MossdeepCity_SpaceCenter_2F_EventScript_ReadyForBattlePrompt @@ -358,10 +347,8 @@ MossdeepCity_SpaceCenter_2F_EventScript_TabithaTrainer:: MossdeepCity_SpaceCenter_2F_EventScript_RivalRayquazaCall:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_MayRayquazaCall - compare VAR_RESULT, FEMALE - call_if_eq MossdeepCity_SpaceCenter_2F_EventScript_BrendanRayquazaCall + call_if_eq VAR_RESULT, MALE, MossdeepCity_SpaceCenter_2F_EventScript_MayRayquazaCall + call_if_eq VAR_RESULT, FEMALE, MossdeepCity_SpaceCenter_2F_EventScript_BrendanRayquazaCall closemessage clearflag FLAG_DEFEATED_MAGMA_SPACE_CENTER releaseall diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index a5a3d09804..aac12ec2af 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -16,8 +16,7 @@ MossdeepCity_StevensHouse_EventScript_HideStevensNote:: return MossdeepCity_StevensHouse_OnTransition: - compare VAR_STEVENS_HOUSE_STATE, 2 - call_if_eq MossdeepCity_StevensHouse_EventScript_SetStevenPos + call_if_eq VAR_STEVENS_HOUSE_STATE, 2, MossdeepCity_StevensHouse_EventScript_SetStevenPos end MossdeepCity_StevensHouse_EventScript_SetStevenPos:: @@ -76,8 +75,7 @@ MossdeepCity_StevensHouse_Movement_StevenReturn: MossdeepCity_StevensHouse_EventScript_BeldumPokeball:: lockall msgbox MossdeepCity_StevensHouse_Text_TakeBallContainingBeldum, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_StevensHouse_EventScript_LeaveBeldum + goto_if_eq VAR_RESULT, NO, MossdeepCity_StevensHouse_EventScript_LeaveBeldum goto MossdeepCity_StevensHouse_EventScript_GiveBeldum end @@ -89,18 +87,15 @@ MossdeepCity_StevensHouse_EventScript_LeaveBeldum:: MossdeepCity_StevensHouse_EventScript_GiveBeldum:: setvar VAR_TEMP_1, SPECIES_BELDUM givemon SPECIES_BELDUM, 5, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_StevensHouse_EventScript_SendBeldumParty - compare VAR_RESULT, 1 - goto_if_eq MossdeepCity_StevensHouse_EventScript_SendBeldumPC + goto_if_eq VAR_RESULT, 0, MossdeepCity_StevensHouse_EventScript_SendBeldumParty + goto_if_eq VAR_RESULT, 1, MossdeepCity_StevensHouse_EventScript_SendBeldumPC goto Common_EventScript_NoMoreRoomForPokemon end MossdeepCity_StevensHouse_EventScript_SendBeldumParty:: call MossdeepCity_StevensHouse_EventScript_ReceivedBeldumFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_StevensHouse_EventScript_ReceivedBeldum + goto_if_eq VAR_RESULT, NO, MossdeepCity_StevensHouse_EventScript_ReceivedBeldum call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto MossdeepCity_StevensHouse_EventScript_ReceivedBeldum @@ -109,8 +104,7 @@ MossdeepCity_StevensHouse_EventScript_SendBeldumParty:: MossdeepCity_StevensHouse_EventScript_SendBeldumPC:: call MossdeepCity_StevensHouse_EventScript_ReceivedBeldumFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC + goto_if_eq VAR_RESULT, NO, MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC call Common_EventScript_NameReceivedBoxMon goto MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC end diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc index 7081e54de6..1931633258 100644 --- a/data/maps/MtChimney/scripts.inc +++ b/data/maps/MtChimney/scripts.inc @@ -63,18 +63,14 @@ MtChimney_EventScript_Maxie:: fadescreen FADE_FROM_BLACK setobjectxyperm LOCALID_ARCHIE, 10, 12 addobject LOCALID_ARCHIE - compare VAR_FACING, DIR_EAST - call_if_eq MtChimney_EventScript_ArchieApproachPlayerEast - compare VAR_FACING, DIR_NORTH - call_if_eq MtChimney_EventScript_ArchieApproachPlayerNorth + call_if_eq VAR_FACING, DIR_EAST, MtChimney_EventScript_ArchieApproachPlayerEast + call_if_eq VAR_FACING, DIR_NORTH, MtChimney_EventScript_ArchieApproachPlayerNorth applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 msgbox MtChimney_Text_ArchieThankYou, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_EAST - call_if_eq MtChimney_EventScript_ArchieExitEast - compare VAR_FACING, DIR_NORTH - call_if_eq MtChimney_EventScript_ArchieExitNorth + call_if_eq VAR_FACING, DIR_EAST, MtChimney_EventScript_ArchieExitEast + call_if_eq VAR_FACING, DIR_NORTH, MtChimney_EventScript_ArchieExitNorth removeobject LOCALID_ARCHIE setflag FLAG_HIDE_MT_CHIMNEY_TEAM_AQUA setflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY @@ -109,18 +105,14 @@ MtChimney_EventScript_LavaCookieLady:: faceplayer showmoneybox 0, 0 msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MtChimney_EventScript_DeclineLavaCookie + goto_if_eq VAR_RESULT, NO, MtChimney_EventScript_DeclineLavaCookie checkmoney 200 - compare VAR_RESULT, FALSE - goto_if_eq MtChimney_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, MtChimney_EventScript_NotEnoughMoney msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT checkitemspace ITEM_LAVA_COOKIE - compare VAR_RESULT, TRUE - call_if_eq MtChimney_EventScript_RemoveMoney + call_if_eq VAR_RESULT, TRUE, MtChimney_EventScript_RemoveMoney giveitem ITEM_LAVA_COOKIE - compare VAR_RESULT, FALSE - goto_if_eq MtChimney_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, MtChimney_EventScript_BagIsFull hidemoneybox release end @@ -453,8 +445,7 @@ MtChimney_EventScript_MeteoriteMachine:: goto_if_unset FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, MtChimney_EventScript_MachineOn goto_if_set FLAG_RECEIVED_METEORITE, MtChimney_EventScript_MachineOff msgbox MtChimney_Text_RemoveTheMeteorite, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MtChimney_EventScript_LeaveMeteoriteAlone + goto_if_eq VAR_RESULT, NO, MtChimney_EventScript_LeaveMeteoriteAlone msgbox MtChimney_Text_PlayerRemovedMeteorite, MSGBOX_DEFAULT giveitem ITEM_METEORITE setflag FLAG_RECEIVED_METEORITE @@ -483,8 +474,7 @@ MtChimney_EventScript_RouteSign:: MtChimney_EventScript_Shelby:: trainerbattle_single TRAINER_SHELBY_1, MtChimney_Text_ShelbyIntro, MtChimney_Text_ShelbyDefeat, MtChimney_EventScript_DefeatedShelby specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MtChimney_EventScript_RematchShelby + goto_if_eq VAR_RESULT, TRUE, MtChimney_EventScript_RematchShelby msgbox MtChimney_Text_ShelbyPostBattle, MSGBOX_DEFAULT release end @@ -525,8 +515,7 @@ MtChimney_EventScript_Grunt1:: MtChimney_EventScript_Sawyer:: trainerbattle_single TRAINER_SAWYER_1, MtChimney_Text_SawyerIntro, MtChimney_Text_SawyerDefeat, MtChimney_EventScript_SawyerDefeated specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MtChimney_EventScript_SawyerRematch + goto_if_eq VAR_RESULT, TRUE, MtChimney_EventScript_SawyerRematch msgbox MtChimney_Text_SawyerPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/MtChimney_CableCarStation/scripts.inc b/data/maps/MtChimney_CableCarStation/scripts.inc index a3a2b360e0..b3e36a496a 100644 --- a/data/maps/MtChimney_CableCarStation/scripts.inc +++ b/data/maps/MtChimney_CableCarStation/scripts.inc @@ -6,8 +6,7 @@ MtChimney_CableCarStation_MapScripts:: .byte 0 MtChimney_CableCarStation_OnTransition: - compare VAR_CABLE_CAR_STATION_STATE, 1 - call_if_eq MtChimney_CableCarStation_EventScript_MoveAttendantAside + call_if_eq VAR_CABLE_CAR_STATION_STATE, 1, MtChimney_CableCarStation_EventScript_MoveAttendantAside end MtChimney_CableCarStation_EventScript_MoveAttendantAside:: @@ -34,10 +33,8 @@ MtChimney_CableCarStation_EventScript_Attendant:: lock faceplayer msgbox MtChimney_CableCarStation_Text_CableCarReadyGetOn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MtChimney_CableCarStation_EventScript_RideCableCar - compare VAR_RESULT, NO - goto_if_eq MtChimney_CableCarStation_EventScript_DeclineRide + goto_if_eq VAR_RESULT, YES, MtChimney_CableCarStation_EventScript_RideCableCar + goto_if_eq VAR_RESULT, NO, MtChimney_CableCarStation_EventScript_DeclineRide end MtChimney_CableCarStation_EventScript_RideCableCar:: diff --git a/data/maps/MtPyre_1F/scripts.inc b/data/maps/MtPyre_1F/scripts.inc index 1354b2ac1b..f97149b050 100644 --- a/data/maps/MtPyre_1F/scripts.inc +++ b/data/maps/MtPyre_1F/scripts.inc @@ -7,8 +7,7 @@ MtPyre_1F_EventScript_CleanseTagWoman:: goto_if_set FLAG_RECEIVED_CLEANSE_TAG, MtPyre_1F_EventScript_ReceivedCleanseTag msgbox MtPyre_1F_Text_TakeThisForYourOwnGood, MSGBOX_DEFAULT giveitem ITEM_CLEANSE_TAG - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_CLEANSE_TAG release end diff --git a/data/maps/MtPyre_3F/scripts.inc b/data/maps/MtPyre_3F/scripts.inc index b91a589bc0..ff15f99393 100644 --- a/data/maps/MtPyre_3F/scripts.inc +++ b/data/maps/MtPyre_3F/scripts.inc @@ -14,8 +14,7 @@ MtPyre_3F_EventScript_Kayla:: MtPyre_3F_EventScript_Gabrielle:: trainerbattle_single TRAINER_GABRIELLE_1, MtPyre_3F_Text_GabrielleIntro, MtPyre_3F_Text_GabrielleDefeat, MtPyre_3F_EventScript_RegisterGabrielle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MtPyre_3F_EventScript_RematchGabrielle + goto_if_eq VAR_RESULT, TRUE, MtPyre_3F_EventScript_RematchGabrielle msgbox MtPyre_3F_Text_GabriellePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/MtPyre_6F/scripts.inc b/data/maps/MtPyre_6F/scripts.inc index 4b7df8e7cf..4de3f6e8b1 100644 --- a/data/maps/MtPyre_6F/scripts.inc +++ b/data/maps/MtPyre_6F/scripts.inc @@ -4,8 +4,7 @@ MtPyre_6F_MapScripts:: MtPyre_6F_EventScript_Valerie:: trainerbattle_single TRAINER_VALERIE_1, MtPyre_6F_Text_ValerieIntro, MtPyre_6F_Text_ValerieDefeat, MtPyre_6F_EventScript_RegisterValerie specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq MtPyre_6F_EventScript_RematchValerie + goto_if_eq VAR_RESULT, TRUE, MtPyre_6F_EventScript_RematchValerie msgbox MtPyre_6F_Text_ValeriePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/MtPyre_Exterior/scripts.inc b/data/maps/MtPyre_Exterior/scripts.inc index 01279d645c..83bced7359 100644 --- a/data/maps/MtPyre_Exterior/scripts.inc +++ b/data/maps/MtPyre_Exterior/scripts.inc @@ -8,8 +8,7 @@ MtPyre_Exterior_OnTransition: MtPyre_Exterior_EventScript_CheckEnterFromSummit:: getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_1, 12 - goto_if_lt MtPyre_Exterior_EventScript_EnterFromSummit + goto_if_lt VAR_TEMP_1, 12, MtPyre_Exterior_EventScript_EnterFromSummit return MtPyre_Exterior_EventScript_EnterFromSummit:: diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc index cd58627aff..3de60df3f2 100644 --- a/data/maps/MtPyre_Summit/scripts.inc +++ b/data/maps/MtPyre_Summit/scripts.inc @@ -11,8 +11,7 @@ MtPyre_Summit_MapScripts:: .byte 0 MtPyre_Summit_OnTransition: - compare VAR_MT_PYRE_STATE, 2 - call_if_eq MtPyre_Summit_EventScript_SetArchieMaxiePositions + call_if_eq VAR_MT_PYRE_STATE, 2, MtPyre_Summit_EventScript_SetArchieMaxiePositions end MtPyre_Summit_EventScript_SetArchieMaxiePositions:: @@ -45,12 +44,9 @@ MtPyre_Summit_EventScript_TeamAquaExits:: applymovement LOCALID_ARCHIE, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 50 - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_ArchieFacePlayer2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_ArchieFacePlayer0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_ArchieFacePlayer1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_ArchieFacePlayer2 msgbox MtPyre_Summit_Text_ArchieWeGotTheOrbLetsGo, MSGBOX_DEFAULT closemessage fadescreen FADE_TO_BLACK @@ -65,12 +61,9 @@ MtPyre_Summit_EventScript_TeamAquaExits:: fadescreen FADE_FROM_BLACK delay 20 setvar VAR_MT_PYRE_STATE, 1 - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_OldLadyApproachPlayer2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_OldLadyApproachPlayer0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_OldLadyApproachPlayer1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_OldLadyApproachPlayer2 msgbox MtPyre_Summit_Text_BothOrbsTakenMagmaLeftThis, MSGBOX_DEFAULT giveitem ITEM_MAGMA_EMBLEM setflag FLAG_RECEIVED_RED_OR_BLUE_ORB @@ -142,19 +135,15 @@ MtPyre_Summit_EventScript_OldMan:: faceplayer goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, MtPyre_Summit_EventScript_OldManAfterRayquaza msgbox MtPyre_Summit_Text_WillYouHearOutMyTale, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq MtPyre_Summit_EventScript_OldManTale - compare VAR_RESULT, NO - call_if_eq MtPyre_Summit_EventScript_DeclineOldManTale + call_if_eq VAR_RESULT, YES, MtPyre_Summit_EventScript_OldManTale + call_if_eq VAR_RESULT, NO, MtPyre_Summit_EventScript_DeclineOldManTale release end MtPyre_Summit_EventScript_OldManAfterRayquaza:: msgbox MtPyre_Summit_Text_HearTheNewLegendOfHoenn, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq MtPyre_Summit_EventScript_OldManNewTale - compare VAR_RESULT, NO - call_if_eq MtPyre_Summit_EventScript_DeclineOldManTale + call_if_eq VAR_RESULT, YES, MtPyre_Summit_EventScript_OldManNewTale + call_if_eq VAR_RESULT, NO, MtPyre_Summit_EventScript_DeclineOldManTale release end @@ -174,8 +163,7 @@ MtPyre_Summit_EventScript_OldLady:: lock faceplayer goto_if_set FLAG_RETURNED_RED_OR_BLUE_ORB, MtPyre_Summit_EventScript_OldLadyAfterOrbsReturned - compare VAR_MT_PYRE_STATE, 3 - call_if_ge MtPyre_Summit_EventScript_OldLadyOrbsReturned + call_if_ge VAR_MT_PYRE_STATE, 3, MtPyre_Summit_EventScript_OldLadyOrbsReturned goto_if_set FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, MtPyre_Summit_EventScript_OldLadyLegendariesAwake msgbox MtPyre_Summit_Text_OrbsHaveBeenTaken, MSGBOX_DEFAULT release @@ -219,32 +207,23 @@ MtPyre_Summit_EventScript_ArchieMaxieReturnOrbs:: applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 delay 60 - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_ArchieMaxieBeginExit2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_ArchieMaxieBeginExit0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_ArchieMaxieBeginExit1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_ArchieMaxieBeginExit2 playse SE_PIN applymovement LOCALID_MAXIE, Common_Movement_ExclamationMark waitmovement 0 applymovement LOCALID_MAXIE, Common_Movement_Delay48 waitmovement 0 delay 30 - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachPlayer2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_MaxieApproachPlayer0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_MaxieApproachPlayer1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_MaxieApproachPlayer2 msgbox MtPyre_Summit_Text_MaxieSilence, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie0 - compare VAR_0x8008, 1 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie1 - compare VAR_0x8008, 2 - call_if_eq MtPyre_Summit_EventScript_MaxieApproachArchie2 + call_if_eq VAR_0x8008, 0, MtPyre_Summit_EventScript_MaxieApproachArchie0 + call_if_eq VAR_0x8008, 1, MtPyre_Summit_EventScript_MaxieApproachArchie1 + call_if_eq VAR_0x8008, 2, MtPyre_Summit_EventScript_MaxieApproachArchie2 delay 30 applymovement LOCALID_ARCHIE, MtPyre_Summit_Movement_ArchieExit applymovement LOCALID_MAXIE, MtPyre_Summit_Movement_MaxieExit diff --git a/data/maps/NavelRock_Bottom/scripts.inc b/data/maps/NavelRock_Bottom/scripts.inc index d79c00c687..f6687a36f5 100644 --- a/data/maps/NavelRock_Bottom/scripts.inc +++ b/data/maps/NavelRock_Bottom/scripts.inc @@ -25,8 +25,7 @@ NavelRock_Bottom_OnResume: NavelRock_Bottom_EventScript_TryRemoveLugia:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_LUGIA return @@ -63,12 +62,9 @@ NavelRock_Bottom_EventScript_Lugia:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NavelRock_Bottom_EventScript_DefeatedLugia - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NavelRock_Bottom_EventScript_RanFromLugia - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NavelRock_Bottom_EventScript_RanFromLugia + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NavelRock_Bottom_EventScript_DefeatedLugia + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NavelRock_Bottom_EventScript_RanFromLugia + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NavelRock_Bottom_EventScript_RanFromLugia setflag FLAG_CAUGHT_LUGIA release end diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc index 759434cde3..a981759175 100644 --- a/data/maps/NavelRock_Harbor/scripts.inc +++ b/data/maps/NavelRock_Harbor/scripts.inc @@ -8,8 +8,7 @@ NavelRock_Harbor_EventScript_Sailor:: lock faceplayer msgbox NavelRock_Harbor_Text_SailorReturn, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq NavelRock_Harbor_EventScript_AsYouLike + goto_if_eq VAR_RESULT, NO, NavelRock_Harbor_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc index e8b3e7e296..2805f56771 100644 --- a/data/maps/NavelRock_Top/scripts.inc +++ b/data/maps/NavelRock_Top/scripts.inc @@ -28,8 +28,7 @@ NavelRock_Top_OnResume: NavelRock_Top_EventScript_TryRemoveHoOh:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_HO_OH return @@ -68,12 +67,9 @@ NavelRock_Top_EventScript_HoOh:: clearflag FLAG_SYS_CTRL_OBJ_DELETE setvar VAR_LAST_TALKED, LOCALID_HO_OH specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NavelRock_Top_EventScript_DefeatedHoOh - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NavelRock_Top_EventScript_RanFromHoOh - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NavelRock_Top_EventScript_RanFromHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NavelRock_Top_EventScript_DefeatedHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NavelRock_Top_EventScript_RanFromHoOh + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NavelRock_Top_EventScript_RanFromHoOh setflag FLAG_CAUGHT_HO_OH releaseall end diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 50582ce380..4c498190e0 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -4,8 +4,7 @@ NewMauville_Entrance_MapScripts:: .byte 0 NewMauville_Entrance_OnLoad: - compare VAR_NEW_MAUVILLE_STATE, 0 - call_if_eq NewMauville_Entrance_EventScript_CloseDoor + call_if_eq VAR_NEW_MAUVILLE_STATE, 0, NewMauville_Entrance_EventScript_CloseDoor end NewMauville_Entrance_EventScript_CloseDoor:: @@ -27,11 +26,9 @@ NewMauville_Entrance_EventScript_Door:: waitmovement 0 msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT checkitem ITEM_BASEMENT_KEY - compare VAR_RESULT, FALSE - goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor + goto_if_eq VAR_RESULT, FALSE, NewMauville_Entrance_EventScript_DontOpenDoor msgbox NewMauville_Entrance_Text_UseBasementKey, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor + goto_if_eq VAR_RESULT, NO, NewMauville_Entrance_EventScript_DontOpenDoor msgbox NewMauville_Entrance_Text_UsedBasementKey, MSGBOX_DEFAULT setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, FALSE setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, FALSE diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc index 543b030e14..51748380ad 100644 --- a/data/maps/NewMauville_Inside/scripts.inc +++ b/data/maps/NewMauville_Inside/scripts.inc @@ -5,17 +5,14 @@ NewMauville_Inside_MapScripts:: .byte 0 NewMauville_Inside_OnResume: - compare VAR_TEMP_1, 1 - call_if_eq NewMauville_Inside_EventScript_SetBarrierStateBlueButton - compare VAR_TEMP_2, 1 - call_if_eq NewMauville_Inside_EventScript_SetBarrierStateGreenButton + call_if_eq VAR_TEMP_1, 1, NewMauville_Inside_EventScript_SetBarrierStateBlueButton + call_if_eq VAR_TEMP_2, 1, NewMauville_Inside_EventScript_SetBarrierStateGreenButton call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NewMauville_Inside_EventScript_TryRemoveVoltorb end NewMauville_Inside_EventScript_TryRemoveVoltorb:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -40,8 +37,7 @@ NewMauville_Inside_EventScript_ShowVoltorb3:: return NewMauville_Inside_OnLoad: - compare VAR_NEW_MAUVILLE_STATE, 2 - call_if_eq NewMauville_Inside_EventScript_SetGeneratorOffMetatiles + call_if_eq VAR_NEW_MAUVILLE_STATE, 2, NewMauville_Inside_EventScript_SetGeneratorOffMetatiles end NewMauville_Inside_EventScript_BlueButton:: @@ -167,8 +163,7 @@ NewMauville_Inside_EventScript_SetGeneratorOffMetatiles:: NewMauville_Inside_EventScript_Generator:: lockall - compare VAR_NEW_MAUVILLE_STATE, 2 - goto_if_eq NewMauville_Inside_EventScript_GeneratorOff + goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, NewMauville_Inside_EventScript_GeneratorOff msgbox NewMauville_Inside_Text_GeneratorRadiatingHeat, MSGBOX_DEFAULT releaseall end @@ -190,12 +185,9 @@ NewMauville_Inside_EventScript_Voltorb1:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NewMauville_Inside_EventScript_DefeatedVoltorb1 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NewMauville_Inside_EventScript_DefeatedVoltorb1 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NewMauville_Inside_EventScript_DefeatedVoltorb1 setflag FLAG_DEFEATED_VOLTORB_1_NEW_MAUVILLE release end @@ -217,12 +209,9 @@ NewMauville_Inside_EventScript_Voltorb2:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NewMauville_Inside_EventScript_DefeatedVoltorb2 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NewMauville_Inside_EventScript_DefeatedVoltorb2 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NewMauville_Inside_EventScript_DefeatedVoltorb2 setflag FLAG_DEFEATED_VOLTORB_2_NEW_MAUVILLE release end @@ -244,12 +233,9 @@ NewMauville_Inside_EventScript_Voltorb3:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3 - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3 - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3 + goto_if_eq VAR_RESULT, B_OUTCOME_WON, NewMauville_Inside_EventScript_DefeatedVoltorb3 + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, NewMauville_Inside_EventScript_DefeatedVoltorb3 + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, NewMauville_Inside_EventScript_DefeatedVoltorb3 setflag FLAG_DEFEATED_VOLTORB_3_NEW_MAUVILLE release end diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc index 7d4ce4389e..3f43386cb3 100644 --- a/data/maps/OldaleTown/scripts.inc +++ b/data/maps/OldaleTown/scripts.inc @@ -76,8 +76,7 @@ OldaleTown_EventScript_GoToMartEast:: OldaleTown_EventScript_ExplainPokemonMart:: msgbox OldaleTown_Text_ThisIsAPokemonMart, MSGBOX_DEFAULT giveitem ITEM_POTION - compare VAR_RESULT, FALSE - goto_if_eq OldaleTown_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, OldaleTown_EventScript_BagIsFull msgbox OldaleTown_Text_PotionExplanation, MSGBOX_DEFAULT setflag FLAG_RECEIVED_POTION_OLDALE fadedefaultbgm @@ -260,10 +259,8 @@ OldaleTown_EventScript_RivalTrigger3:: OldaleTown_EventScript_ShowRivalMessage:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq OldaleTown_EventScript_ShowMayMessage - compare VAR_RESULT, FEMALE - goto_if_eq OldaleTown_EventScript_ShowBrendanMessage + goto_if_eq VAR_RESULT, MALE, OldaleTown_EventScript_ShowMayMessage + goto_if_eq VAR_RESULT, FEMALE, OldaleTown_EventScript_ShowBrendanMessage end OldaleTown_EventScript_ShowMayMessage:: @@ -278,10 +275,8 @@ OldaleTown_EventScript_ShowBrendanMessage:: OldaleTown_EventScript_RivalFinish:: closemessage - compare VAR_0x8009, 0 - call_if_eq OldaleTown_EventScript_DoExitMovement1 - compare VAR_0x8009, 1 - call_if_eq OldaleTown_EventScript_DoExitMovement2 + call_if_eq VAR_0x8009, 0, OldaleTown_EventScript_DoExitMovement1 + call_if_eq VAR_0x8009, 1, OldaleTown_EventScript_DoExitMovement2 applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalExit waitmovement 0 removeobject LOCALID_RIVAL @@ -291,8 +286,7 @@ OldaleTown_EventScript_RivalFinish:: end OldaleTown_EventScript_DoExitMovement1:: - compare VAR_FACING, DIR_SOUTH - goto_if_ne OldaleTown_EventScript_DoExitMovement2 + goto_if_ne VAR_FACING, DIR_SOUTH, OldaleTown_EventScript_DoExitMovement2 applymovement LOCALID_RIVAL, OldaleTown_Movement_RivalExit waitmovement 0 return diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc index ea0710c3d6..3dedcec30f 100644 --- a/data/maps/PacifidlogTown_House2/scripts.inc +++ b/data/maps/PacifidlogTown_House2/scripts.inc @@ -11,19 +11,16 @@ PacifidlogTown_House2_EventScript_FanClubYoungerBrother:: call_if_unset FLAG_MET_FANCLUB_YOUNGER_BROTHER, PacifidlogTown_House2_EventScript_FirstMonAssessment setflag FLAG_MET_FANCLUB_YOUNGER_BROTHER specialvar VAR_RESULT, GetLeadMonFriendshipScore - compare VAR_RESULT, 4 - goto_if_ge PacifidlogTown_House2_EventScript_GiveReturn + goto_if_ge VAR_RESULT, 4, PacifidlogTown_House2_EventScript_GiveReturn specialvar VAR_RESULT, GetLeadMonFriendshipScore - compare VAR_RESULT, 2 - goto_if_ge PacifidlogTown_House2_EventScript_PutInEffort + goto_if_ge VAR_RESULT, 2, PacifidlogTown_House2_EventScript_PutInEffort goto PacifidlogTown_House2_EventScript_GiveFrustration end PacifidlogTown_House2_EventScript_UpdateFanClubTMFlag:: goto_if_unset FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, Common_EventScript_NopReturn specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable - compare VAR_RESULT, 0 - call_if_eq PacifidlogTown_House2_EventScript_ClearReceivedFanClubTM + call_if_eq VAR_RESULT, 0, PacifidlogTown_House2_EventScript_ClearReceivedFanClubTM return PacifidlogTown_House2_EventScript_MonAssessment:: @@ -42,8 +39,7 @@ PacifidlogTown_House2_EventScript_ClearReceivedFanClubTM:: PacifidlogTown_House2_EventScript_GiveReturn:: msgbox PacifidlogTown_House2_Text_AdoringPokemonTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM27 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK special SetPacifidlogTMReceivedDay msgbox PacifidlogTown_House2_Text_ExplainReturnFrustration, MSGBOX_DEFAULT @@ -58,8 +54,7 @@ PacifidlogTown_House2_EventScript_PutInEffort:: PacifidlogTown_House2_EventScript_GiveFrustration:: msgbox PacifidlogTown_House2_Text_ViciousPokemonTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM21 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK special SetPacifidlogTMReceivedDay msgbox PacifidlogTown_House2_Text_ExplainReturnFrustration, MSGBOX_DEFAULT diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc index fbdeb74a5f..5582f3b6b9 100644 --- a/data/maps/PacifidlogTown_House3/scripts.inc +++ b/data/maps/PacifidlogTown_House3/scripts.inc @@ -10,18 +10,15 @@ PacifidlogTown_House3_EventScript_Trader:: specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox PacifidlogTown_House3_Text_WillingToTradeIt, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, PacifidlogTown_House3_EventScript_DeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, PacifidlogTown_House3_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne PacifidlogTown_House3_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, PacifidlogTown_House3_EventScript_NotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/PacifidlogTown_House4/scripts.inc b/data/maps/PacifidlogTown_House4/scripts.inc index 12d7197bd1..f17abcd30e 100644 --- a/data/maps/PacifidlogTown_House4/scripts.inc +++ b/data/maps/PacifidlogTown_House4/scripts.inc @@ -13,10 +13,8 @@ PacifidlogTown_House4_EventScript_Boy:: lock faceplayer msgbox PacifidlogTown_House4_Text_WhereDidYouComeFrom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PacifidlogTown_House4_EventScript_Yes - compare VAR_RESULT, NO - goto_if_eq PacifidlogTown_House4_EventScript_No + goto_if_eq VAR_RESULT, YES, PacifidlogTown_House4_EventScript_Yes + goto_if_eq VAR_RESULT, NO, PacifidlogTown_House4_EventScript_No end PacifidlogTown_House4_EventScript_Yes:: diff --git a/data/maps/PacifidlogTown_House5/scripts.inc b/data/maps/PacifidlogTown_House5/scripts.inc index 5da4fb9022..474a2663ec 100644 --- a/data/maps/PacifidlogTown_House5/scripts.inc +++ b/data/maps/PacifidlogTown_House5/scripts.inc @@ -5,8 +5,7 @@ PacifidlogTown_House5_EventScript_MirageIslandWatcher:: lock faceplayer specialvar VAR_RESULT, IsMirageIslandPresent - compare VAR_RESULT, TRUE - goto_if_eq PacifidlogTown_House5_EventScript_MirageIslandPresent + goto_if_eq VAR_RESULT, TRUE, PacifidlogTown_House5_EventScript_MirageIslandPresent msgbox PacifidlogTown_House5_Text_CantSeeMirageIslandToday, MSGBOX_DEFAULT release end diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc index 25b39a3eb0..3609b26226 100644 --- a/data/maps/PetalburgCity/scripts.inc +++ b/data/maps/PetalburgCity/scripts.inc @@ -11,14 +11,10 @@ PetalburgCity_MapScripts:: PetalburgCity_OnTransition: setflag FLAG_VISITED_PETALBURG_CITY - compare VAR_PETALBURG_CITY_STATE, 0 - call_if_eq PetalburgCity_EventScript_MoveGymBoyToWestEntrance - compare VAR_PETALBURG_CITY_STATE, 2 - call_if_eq PetalburgCity_EventScript_DisableMapNameAndMusic - compare VAR_PETALBURG_CITY_STATE, 4 - call_if_eq PetalburgCity_EventScript_DisableMapNameAndMusic - compare VAR_PETALBURG_GYM_STATE, 8 - call_if_eq PetalburgCity_EventScript_SetGymDoorsUnlocked + call_if_eq VAR_PETALBURG_CITY_STATE, 0, PetalburgCity_EventScript_MoveGymBoyToWestEntrance + call_if_eq VAR_PETALBURG_CITY_STATE, 2, PetalburgCity_EventScript_DisableMapNameAndMusic + call_if_eq VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_EventScript_DisableMapNameAndMusic + call_if_eq VAR_PETALBURG_GYM_STATE, 8, PetalburgCity_EventScript_SetGymDoorsUnlocked end PetalburgCity_EventScript_MoveGymBoyToWestEntrance:: @@ -277,24 +273,16 @@ PetalburgCity_EventScript_ShowGymToPlayer:: waitmovement 0 applymovement LOCALID_GYM_BOY, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_BoyApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_BoyApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_BoyApproachPlayer2 - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_BoyApproachPlayer3 + call_if_eq VAR_0x8008, 0, PetalburgCity_EventScript_BoyApproachPlayer0 + call_if_eq VAR_0x8008, 1, PetalburgCity_EventScript_BoyApproachPlayer1 + call_if_eq VAR_0x8008, 2, PetalburgCity_EventScript_BoyApproachPlayer2 + call_if_eq VAR_0x8008, 3, PetalburgCity_EventScript_BoyApproachPlayer3 msgbox PetalburgCity_Text_AreYouRookieTrainer, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_LeadPlayerToGym0 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_LeadPlayerToGym1 - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_LeadPlayerToGym2 - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_LeadPlayerToGym3 + call_if_eq VAR_0x8008, 0, PetalburgCity_EventScript_LeadPlayerToGym0 + call_if_eq VAR_0x8008, 1, PetalburgCity_EventScript_LeadPlayerToGym1 + call_if_eq VAR_0x8008, 2, PetalburgCity_EventScript_LeadPlayerToGym2 + call_if_eq VAR_0x8008, 3, PetalburgCity_EventScript_LeadPlayerToGym3 msgbox PetalburgCity_Text_ThisIsPetalburgGym, MSGBOX_DEFAULT applymovement LOCALID_GYM_BOY, Common_Movement_WalkInPlaceFasterRight applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterRight @@ -571,14 +559,10 @@ PetalburgCity_EventScript_Scott:: delay 30 msgbox PetalburgCity_Text_ImLookingForTalentedTrainers, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_EventScript_ScottExit0 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_EventScript_ScottExit1 - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_EventScript_ScottExit2 - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_EventScript_ScottExit3 + call_if_eq VAR_0x8008, 0, PetalburgCity_EventScript_ScottExit0 + call_if_eq VAR_0x8008, 1, PetalburgCity_EventScript_ScottExit1 + call_if_eq VAR_0x8008, 2, PetalburgCity_EventScript_ScottExit2 + call_if_eq VAR_0x8008, 3, PetalburgCity_EventScript_ScottExit3 setvar VAR_SCOTT_PETALBURG_ENCOUNTER, 1 removeobject LOCALID_SCOTT releaseall diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index 251f24aa6c..836da26bfb 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -10,10 +10,8 @@ PetalburgCity_Gym_MapScripts:: .byte 0 PetalburgCity_Gym_OnLoad: - compare VAR_PETALBURG_GYM_STATE, 6 - goto_if_eq PetalburgCity_Gym_EventScript_OpenUnlockedDoors - compare VAR_PETALBURG_GYM_STATE, 7 - call_if_ge PetalburgCity_Gym_EventScript_UnlockAllDoors + goto_if_eq VAR_PETALBURG_GYM_STATE, 6, PetalburgCity_Gym_EventScript_OpenUnlockedDoors + call_if_ge VAR_PETALBURG_GYM_STATE, 7, PetalburgCity_Gym_EventScript_UnlockAllDoors end @ NOTE: Strength and OHKO rooms are misleading. Both are more accurately Critical-Hit @@ -42,10 +40,8 @@ PetalburgCity_Gym_EventScript_UnlockAllDoors:: return PetalburgCity_Gym_OnTransition: - compare VAR_PETALBURG_GYM_STATE, 1 - call_if_eq PetalburgCity_Gym_EventScript_MoveWallyToEntrance - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_lt PetalburgCity_Gym_EventScript_MoveNormanToEntrance + call_if_eq VAR_PETALBURG_GYM_STATE, 1, PetalburgCity_Gym_EventScript_MoveWallyToEntrance + call_if_lt VAR_PETALBURG_GYM_STATE, 6, PetalburgCity_Gym_EventScript_MoveNormanToEntrance call_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_CheckNormanForRematch end @@ -60,10 +56,8 @@ PetalburgCity_Gym_EventScript_MoveNormanToEntrance:: PetalburgCity_Gym_EventScript_CheckNormanForRematch:: setorcopyvar VAR_TRAINER_BATTLE_OPPONENT_A, TRAINER_NORMAN_1 specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_DontMoveNormanToFront - compare VAR_PETALBURG_GYM_STATE, 8 - goto_if_eq PetalburgCity_Gym_EventScript_DontMoveNormanToFront + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontMoveNormanToFront + goto_if_eq VAR_PETALBURG_GYM_STATE, 8, PetalburgCity_Gym_EventScript_DontMoveNormanToFront setobjectxyperm LOCALID_NORMAN, 4, 107 return @@ -152,66 +146,42 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorialEast:: PetalburgCity_Gym_EventScript_BeginWallyTutorial:: addobject LOCALID_WALLY playse SE_DOOR - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_WallyArriveSouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_WallyArriveNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_WallyArriveWestEast - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_WallyArriveWestEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_WallyArriveSouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallyArriveNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_WallyArriveWestEast + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_WallyArriveWestEast msgbox PetalburgCity_Gym_Text_WallyIdLikeAPokemon, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_DadOhYoureWallyRight, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_WallyIveNeverCaughtAPokemon, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_DadHmISee, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerSouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerWest - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressPlayerEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_NormanAddressPlayerSouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_NormanAddressPlayerNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_NormanAddressPlayerWest + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_NormanAddressPlayerEast msgbox PetalburgCity_Gym_Text_DadPlayerGoWithWally, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallySouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyWest - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_NormanAddressWallyEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_NormanAddressWallySouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_NormanAddressWallyNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_NormanAddressWallyWest + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_NormanAddressWallyEast msgbox PetalburgCity_Gym_Text_IllLoanYouMyZigzagoon, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_WallyThankYouAndDadGivesPokeBall, MSGBOX_DEFAULT msgbox PetalburgCity_Gym_Text_WallyOhWowThankYou, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorSouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorWest - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_NormanFaceDoorEast - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_WallyFaceDown - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_WallyFacePlayer + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_NormanFaceDoorSouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_NormanFaceDoorNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_NormanFaceDoorWest + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_NormanFaceDoorEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_WallyFacePlayer + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallyFaceDown + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_WallyFacePlayer + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_WallyFacePlayer msgbox PetalburgCity_Gym_Text_WouldYouReallyComeWithMe, MSGBOX_DEFAULT closemessage setflag FLAG_DONT_TRANSITION_MUSIC playbgm MUS_FOLLOW_ME, FALSE - compare VAR_0x8008, 0 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallySouth - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyWest - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallyEast + call_if_eq VAR_0x8008, 0, PetalburgCity_Gym_EventScript_ExitGymWithWallySouth + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_ExitGymWithWallyNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_ExitGymWithWallyWest + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_ExitGymWithWallyEast removeobject LOCALID_WALLY setflag FLAG_HIDE_PETALBURG_CITY_WALLYS_MOM setvar VAR_PETALBURG_GYM_STATE, 1 @@ -361,8 +331,7 @@ PetalburgCity_Gym_EventScript_NormanFaceDoorEast:: PetalburgCity_Gym_EventScript_NormanPostBattle:: call PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_GiveEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_GiveEnigmaBerry goto_if_unset FLAG_RECEIVED_TM42, PetalburgCity_Gym_EventScript_GiveFacade2 goto_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_NoAmountOfTrainingIsEnough msgbox PetalburgCity_Gym_Text_DadGoingToKeepTraining, MSGBOX_DEFAULT @@ -381,16 +350,12 @@ PetalburgCity_Gym_EventScript_NormanRematch:: PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry:: specialvar VAR_RESULT, IsEnigmaBerryValid - compare VAR_RESULT, FALSE - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + goto_if_eq VAR_RESULT, FALSE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry checkitem ITEM_ENIGMA_BERRY - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry checkpcitem ITEM_ENIGMA_BERRY - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry - compare VAR_ENIGMA_BERRY_AVAILABLE, 0 - goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry + goto_if_eq VAR_ENIGMA_BERRY_AVAILABLE, 0, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry msgbox PetalburgCity_Gym_Text_GiveEnigmaBerry, MSGBOX_DEFAULT setvar VAR_RESULT, TRUE return @@ -401,8 +366,7 @@ PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry:: PetalburgCity_Gym_EventScript_GiveEnigmaBerry:: giveitem ITEM_ENIGMA_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setvar VAR_ENIGMA_BERRY_AVAILABLE, 0 release end @@ -442,8 +406,7 @@ PetalburgCity_Gym_EventScript_NormanBattle:: PetalburgCity_Gym_EventScript_GiveFacade:: giveitem ITEM_TM42 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull setflag FLAG_RECEIVED_TM42 msgbox PetalburgCity_Gym_Text_ExplainFacade, MSGBOX_DEFAULT return @@ -469,31 +432,22 @@ PetalburgCity_Gym_EventScript_WallysDadArrives:: applymovement LOCALID_WALLYS_DAD, Common_Movement_Delay48 waitmovement 0 delay 10 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadApproachPlayerNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadApproachPlayerEast - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadApproachPlayerWest + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallysDadApproachPlayerNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_WallysDadApproachPlayerEast + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_WallysDadApproachPlayerWest msgbox PetalburgCity_Gym_Text_PleaseComeWithMe, MSGBOX_DEFAULT closemessage delay 20 - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadFaceNormanNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadFaceNormanEast - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_WallysDadFaceNormanWest + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_WallysDadFaceNormanNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_WallysDadFaceNormanEast + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_WallysDadFaceNormanWest msgbox PetalburgCity_Gym_Text_LetMeBorrowPlayer, MSGBOX_DEFAULT closemessage setflag FLAG_DONT_TRANSITION_MUSIC playbgm MUS_FOLLOW_ME, FALSE - compare VAR_0x8008, 1 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysDadNorth - compare VAR_0x8008, 2 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysDadEast - compare VAR_0x8008, 3 - call_if_eq PetalburgCity_Gym_EventScript_ExitGymWithWallysDadWest + call_if_eq VAR_0x8008, 1, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadNorth + call_if_eq VAR_0x8008, 2, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadEast + call_if_eq VAR_0x8008, 3, PetalburgCity_Gym_EventScript_ExitGymWithWallysDadWest removeobject LOCALID_WALLYS_DAD setvar VAR_PETALBURG_CITY_STATE, 4 clearflag FLAG_HIDE_PETALBURG_CITY_WALLYS_DAD @@ -782,15 +736,12 @@ PetalburgCity_Gym_EventScript_NoAmountOfTrainingIsEnough:: PetalburgCity_Gym_EventScript_SpeedRoomDoor:: lockall - compare VAR_PETALBURG_GYM_STATE, 6 - goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked + goto_if_lt VAR_PETALBURG_GYM_STATE, 6, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 7 setvar VAR_0x8009, 85 msgbox PetalburgCity_Gym_Text_EnterSpeedRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_EnterRoom:: @@ -813,15 +764,12 @@ PetalburgCity_Gym_EventScript_DoorLocked:: @ VAR_0x8008 and VAR_0x8009 below are the x and y coordinates of the warp PetalburgCity_Gym_EventScript_AccuracyRoomDoor:: lockall - compare VAR_PETALBURG_GYM_STATE, 6 - goto_if_lt PetalburgCity_Gym_EventScript_DoorLocked + goto_if_lt VAR_PETALBURG_GYM_STATE, 6, PetalburgCity_Gym_EventScript_DoorLocked setvar VAR_0x8008, 1 setvar VAR_0x8009, 98 msgbox PetalburgCity_Gym_Text_EnterAccuracyRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_ConfusionRoomDoor:: @@ -830,10 +778,8 @@ PetalburgCity_Gym_EventScript_ConfusionRoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 46 msgbox PetalburgCity_Gym_Text_EnterConfusionRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor:: @@ -842,10 +788,8 @@ PetalburgCity_Gym_EventScript_LeftDefenseRoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 59 msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RightDefenseRoomDoor:: @@ -854,10 +798,8 @@ PetalburgCity_Gym_EventScript_RightDefenseRoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 59 msgbox PetalburgCity_Gym_Text_EnterDefenseRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RecoveryRoomDoor:: @@ -866,10 +808,8 @@ PetalburgCity_Gym_EventScript_RecoveryRoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 72 msgbox PetalburgCity_Gym_Text_EnterRecoveryRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor:: @@ -878,10 +818,8 @@ PetalburgCity_Gym_EventScript_LeftStrengthRoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 20 msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RightStrengthRoomDoor:: @@ -890,10 +828,8 @@ PetalburgCity_Gym_EventScript_RightStrengthRoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 20 msgbox PetalburgCity_Gym_Text_EnterStrengthRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_LeftOHKORoomDoor:: @@ -902,10 +838,8 @@ PetalburgCity_Gym_EventScript_LeftOHKORoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 33 msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RightOHKORoomDoor:: @@ -914,10 +848,8 @@ PetalburgCity_Gym_EventScript_RightOHKORoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 33 msgbox PetalburgCity_Gym_Text_EnterOHKORoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor:: @@ -926,10 +858,8 @@ PetalburgCity_Gym_EventScript_LeftGymLeadersRoomDoor:: setvar VAR_0x8008, 1 setvar VAR_0x8009, 7 msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_RightGymLeadersRoomDoor:: @@ -938,10 +868,8 @@ PetalburgCity_Gym_EventScript_RightGymLeadersRoomDoor:: setvar VAR_0x8008, 7 setvar VAR_0x8009, 7 msgbox PetalburgCity_Gym_Text_EnterGymLeadersRoom, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq PetalburgCity_Gym_EventScript_EnterRoom - compare VAR_RESULT, NO - goto_if_eq PetalburgCity_Gym_EventScript_DontEnterRoom + goto_if_eq VAR_RESULT, YES, PetalburgCity_Gym_EventScript_EnterRoom + goto_if_eq VAR_RESULT, NO, PetalburgCity_Gym_EventScript_DontEnterRoom end PetalburgCity_Gym_EventScript_Randall:: @@ -1067,73 +995,57 @@ PetalburgCity_Gym_EventScript_JodyPostBadge:: @ VAR_0x8005 below is 0 when the door should be slid open and 1 when it should be unlocked immediately PetalburgCity_Gym_EventScript_OpenGymEntranceDoors:: setvar VAR_0x8004, 1 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetEntranceRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenSpeedRoomDoors:: setvar VAR_0x8004, 2 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetSpeedRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenAccuracyRoomDoors:: setvar VAR_0x8004, 3 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetAccuracyRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenConfusionRoomDoors:: setvar VAR_0x8004, 4 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetConfusionRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenDefenseRoomDoors:: setvar VAR_0x8004, 5 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetDefenseRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenRecoveryRoomDoors:: setvar VAR_0x8004, 6 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetRecoveryRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenStrengthRoomDoors:: setvar VAR_0x8004, 7 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetStrengthRoomDoorMetatiles return PetalburgCity_Gym_EventScript_OpenOHKORoomDoors:: setvar VAR_0x8004, 8 - compare VAR_0x8005, 0 - call_if_eq PetalburgCity_Gym_EventScript_SlideOpenRoomDoors - compare VAR_0x8005, 1 - call_if_eq PetalburgCity_Gym_EventScript_UnlockRoomDoors + call_if_eq VAR_0x8005, 0, PetalburgCity_Gym_EventScript_SlideOpenRoomDoors + call_if_eq VAR_0x8005, 1, PetalburgCity_Gym_EventScript_UnlockRoomDoors call PetalburgCity_Gym_EventScript_SetOHKORoomDoorMetatiles return diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc index 58b58054f2..3dadd3184b 100644 --- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc @@ -31,18 +31,14 @@ PetalburgCity_PokemonCenter_1F_EventScript_Woman:: faceplayer msgbox PetalburgCity_PokemonCenter_1F_Text_ManyTypesOfPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, IsStarterInParty - compare VAR_RESULT, TRUE - goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayStarterTypeInfo + goto_if_eq VAR_RESULT, TRUE, PetalburgCity_PokemonCenter_1F_EventScript_SayStarterTypeInfo release end PetalburgCity_PokemonCenter_1F_EventScript_SayStarterTypeInfo:: - compare VAR_STARTER_MON, 0 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayTreeckoType - compare VAR_STARTER_MON, 1 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayTorchicType - compare VAR_STARTER_MON, 2 - call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_SayMudkipType + call_if_eq VAR_STARTER_MON, 0, PetalburgCity_PokemonCenter_1F_EventScript_SayTreeckoType + call_if_eq VAR_STARTER_MON, 1, PetalburgCity_PokemonCenter_1F_EventScript_SayTorchicType + call_if_eq VAR_STARTER_MON, 2, PetalburgCity_PokemonCenter_1F_EventScript_SayMudkipType release end diff --git a/data/maps/PetalburgWoods/scripts.inc b/data/maps/PetalburgWoods/scripts.inc index dd2d9273f5..94bd390148 100644 --- a/data/maps/PetalburgWoods/scripts.inc +++ b/data/maps/PetalburgWoods/scripts.inc @@ -92,8 +92,7 @@ PetalburgWoods_EventScript_DevonResearcherPostBattle:: waitmovement 0 msgbox PetalburgWoods_Text_ThatWasAwfullyClose, MSGBOX_DEFAULT giveitem ITEM_GREAT_BALL - compare VAR_RESULT, FALSE - goto_if_eq PetalburgWoods_EventScript_BagFull + goto_if_eq VAR_RESULT, FALSE, PetalburgWoods_EventScript_BagFull goto PetalburgWoods_EventScript_DevonResearcherFinish end @@ -255,8 +254,7 @@ PetalburgWoods_EventScript_Girl:: goto_if_set FLAG_RECEIVED_MIRACLE_SEED, PetalburgWoods_EventScript_ExplainMiracleSeed msgbox PetalburgWoods_Text_TryUsingThisItem, MSGBOX_DEFAULT giveitem ITEM_MIRACLE_SEED - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_MIRACLE_SEED release end @@ -282,12 +280,10 @@ PetalburgWoods_EventScript_Lyle:: PetalburgWoods_EventScript_James:: trainerbattle_single TRAINER_JAMES_1, PetalburgWoods_Text_InstantlyPopularWithBugPokemon, PetalburgWoods_Text_CantBePopularIfILose, PetalburgWoods_EventScript_TryRegisterJames specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq PetalburgWoods_EventScript_JamesRematch + goto_if_eq VAR_RESULT, TRUE, PetalburgWoods_EventScript_JamesRematch setvar VAR_0x8004, TRAINER_JAMES_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq PetalburgWoods_EventScript_TryRegisterJames2 + goto_if_eq VAR_RESULT, FALSE, PetalburgWoods_EventScript_TryRegisterJames2 msgbox PetalburgWoods_Text_PeopleRespectYou, MSGBOX_DEFAULT release end diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc index 02071aad11..dd0ef5dcec 100644 --- a/data/maps/Route101/scripts.inc +++ b/data/maps/Route101/scripts.inc @@ -241,10 +241,8 @@ Route101_EventScript_BirchsBag:: setvar VAR_ROUTE101_STATE, 3 clearflag FLAG_HIDE_MAP_NAME_POPUP checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route101_EventScript_HideMayInBedroom - compare VAR_RESULT, FEMALE - call_if_eq Route101_EventScript_HideBrendanInBedroom + call_if_eq VAR_RESULT, MALE, Route101_EventScript_HideMayInBedroom + call_if_eq VAR_RESULT, FEMALE, Route101_EventScript_HideBrendanInBedroom warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5 waitstate release diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc index cc1eaa4bb7..6131ef9e01 100644 --- a/data/maps/Route102/scripts.inc +++ b/data/maps/Route102/scripts.inc @@ -20,12 +20,10 @@ Route102_EventScript_Boy:: Route102_EventScript_Calvin:: trainerbattle_single TRAINER_CALVIN_1, Route102_Text_CalvinIntro, Route102_Text_CalvinDefeated, Route102_EventScript_CalvinRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route102_EventScript_CalvinRematch + goto_if_eq VAR_RESULT, TRUE, Route102_EventScript_CalvinRematch setvar VAR_0x8004, TRAINER_CALVIN_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route102_EventScript_CalvinTryRegister + goto_if_eq VAR_RESULT, FALSE, Route102_EventScript_CalvinTryRegister msgbox Route102_Text_CalvinPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc index cf7bc72b51..e2b75e0c3d 100644 --- a/data/maps/Route103/scripts.inc +++ b/data/maps/Route103/scripts.inc @@ -22,10 +22,8 @@ Route103_EventScript_OpenAlteringCave:: Route103_EventScript_Rival:: lockall checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route103_EventScript_RivalMay - compare VAR_RESULT, FEMALE - goto_if_eq Route103_EventScript_RivalBrendan + goto_if_eq VAR_RESULT, MALE, Route103_EventScript_RivalMay + goto_if_eq VAR_RESULT, FEMALE, Route103_EventScript_RivalBrendan end Route103_EventScript_RivalMay:: @@ -211,8 +209,7 @@ Route103_EventScript_Daisy:: Route103_EventScript_Amy:: trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_AmyIntro, Route103_Text_AmyDefeated, Route103_Text_AmyNotEnoughPokemon, Route102_EventScript_AmyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route102_EventScript_AmyRematch + goto_if_eq VAR_RESULT, TRUE, Route102_EventScript_AmyRematch msgbox Route103_Text_AmyPostBattle, MSGBOX_AUTOCLOSE end @@ -230,8 +227,7 @@ Route102_EventScript_AmyRematch:: Route103_EventScript_Liv:: trainerbattle_double TRAINER_AMY_AND_LIV_1, Route103_Text_LivIntro, Route103_Text_LivDefeated, Route103_Text_LivNotEnoughPokemon, Route102_EventScript_LivRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route102_EventScript_LivRematch + goto_if_eq VAR_RESULT, TRUE, Route102_EventScript_LivRematch msgbox Route103_Text_LivPostBattle, MSGBOX_AUTOCLOSE end @@ -254,8 +250,7 @@ Route103_EventScript_Andrew:: Route103_EventScript_Miguel:: trainerbattle_single TRAINER_MIGUEL_1, Route103_Text_MiguelIntro, Route103_Text_MiguelDefeated, Route102_EventScript_MiguelRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route103_EventScript_MiguelRematch + goto_if_eq VAR_RESULT, TRUE, Route103_EventScript_MiguelRematch msgbox Route103_Text_MiguelPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc index 4cbe5c0454..68aeb0a212 100644 --- a/data/maps/Route104/scripts.inc +++ b/data/maps/Route104/scripts.inc @@ -33,8 +33,7 @@ Route104_EventScript_HideWhiteHerbFlorist:: return Route104_EventScript_TrySetRivalPos:: - compare VAR_BOARD_BRINEY_BOAT_STATE, 1 - goto_if_ge Route104_EventScript_DontSetRivalPos + goto_if_ge VAR_BOARD_BRINEY_BOAT_STATE, 1, Route104_EventScript_DontSetRivalPos goto_if_set FLAG_MET_RIVAL_RUSTBORO, Route104_EventScript_DontSetRivalPos goto_if_unset FLAG_REGISTER_RIVAL_POKENAV, Route104_EventScript_DontSetRivalPos setobjectxyperm LOCALID_RIVAL, 17, 52 @@ -77,10 +76,8 @@ Route104_EventScript_RivalTrigger:: @ Unused, shares script with Rustboro encounter instead Route104_EventScript_PlayRivalMusic:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route104_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - goto_if_eq Route104_EventScript_PlayBrendanMusic + goto_if_eq VAR_RESULT, MALE, Route104_EventScript_PlayMayMusic + goto_if_eq VAR_RESULT, FEMALE, Route104_EventScript_PlayBrendanMusic return Route104_EventScript_PlayMayMusic:: @@ -93,10 +90,8 @@ Route104_EventScript_PlayBrendanMusic:: Route104_EventScript_RivalEncounter:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route104_EventScript_MayEncounter - compare VAR_RESULT, FEMALE - goto_if_eq Route104_EventScript_BrendanEncounter + goto_if_eq VAR_RESULT, MALE, Route104_EventScript_MayEncounter + goto_if_eq VAR_RESULT, FEMALE, Route104_EventScript_BrendanEncounter end Route104_EventScript_MayEncounter:: @@ -121,8 +116,7 @@ Route104_EventScript_MayEncounter:: waitmovement 0 copyobjectxytoperm LOCALID_RIVAL msgbox Route104_Text_MayMinesDecentLetsBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route104_EventScript_BattleMay + goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleMay msgbox Route104_Text_MayHaventRaisedPokemon, MSGBOX_DEFAULT call Route104_EventScript_RestoreMusic releaseall @@ -144,8 +138,7 @@ Route104_Movement_PlayerFaceRival: Route104_EventScript_MayAskToBattle:: msgbox Route104_Text_MayLetsBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route104_EventScript_BattleMay + goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleMay msgbox Route104_Text_MayHaventRaisedPokemon, MSGBOX_DEFAULT releaseall end @@ -160,8 +153,7 @@ Route104_EventScript_BattleMay:: Route104_EventScript_MayDefeated:: msgbox Route104_Text_MayPostBattle, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq Route104_EventScript_RestoreMusic + call_if_eq VAR_0x8008, 0, Route104_EventScript_RestoreMusic releaseall end @@ -210,8 +202,7 @@ Route104_EventScript_BrendanEncounter:: waitmovement 0 copyobjectxytoperm LOCALID_RIVAL msgbox Route104_Text_BrendanDoingGreatLetsBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route104_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleBrendan msgbox Route104_Text_BrendanNoConfidence, MSGBOX_DEFAULT call Route104_EventScript_RestoreMusic releaseall @@ -219,8 +210,7 @@ Route104_EventScript_BrendanEncounter:: Route104_EventScript_BrendanAskToBattle:: msgbox Route104_Text_BrendanLetsBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route104_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, YES, Route104_EventScript_BattleBrendan msgbox Route104_Text_BrendanNoConfidence, MSGBOX_DEFAULT releaseall end @@ -235,8 +225,7 @@ Route104_EventScript_BattleBrendan:: Route104_EventScript_BrendanDefeated:: msgbox Route104_Text_BrendanPostBattle, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq Route104_EventScript_RestoreMusic + call_if_eq VAR_0x8008, 0, Route104_EventScript_RestoreMusic releaseall end @@ -274,8 +263,7 @@ Route104_EventScript_ExpertF:: goto_if_set FLAG_RECEIVED_CHESTO_BERRY_ROUTE_104, Route104_EventScript_ReceivedBerry msgbox Route104_Text_PlantBerriesInSoilTakeThis, MSGBOX_DEFAULT giveitem ITEM_CHESTO_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_CHESTO_BERRY_ROUTE_104 msgbox Route104_Text_TrainersOftenMakeMonHoldBerries, MSGBOX_DEFAULT release @@ -292,8 +280,7 @@ Route104_EventScript_WhiteHerbFlorist:: goto_if_set FLAG_RECEIVED_WHITE_HERB, Route104_EventScript_ReceivedWhiteHerb msgbox Route104_Text_DontNeedThisTakeIt, MSGBOX_DEFAULT giveitem ITEM_WHITE_HERB - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_WHITE_HERB release end @@ -345,8 +332,7 @@ Route104_EventScript_Boy2:: goto_if_set FLAG_RECEIVED_TM09, Route104_EventScript_ReceivedBulletSeed msgbox Route104_Text_LikeFillingMouthWithSeedsTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM09 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM09 release end @@ -873,12 +859,10 @@ Route104_EventScript_Billy:: Route104_EventScript_Haley:: trainerbattle_single TRAINER_HALEY_1, Route104_Text_HaleyIntro, Route104_Text_HaleyDefeat, Route104_EventScript_TryRegisterHaleyAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route104_EventScript_RematchHaley + goto_if_eq VAR_RESULT, TRUE, Route104_EventScript_RematchHaley setvar VAR_0x8004, TRAINER_HALEY_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route104_EventScript_TryRegisterHaley + goto_if_eq VAR_RESULT, FALSE, Route104_EventScript_TryRegisterHaley msgbox Route104_Text_HaleyPostBattle, MSGBOX_DEFAULT release end @@ -916,12 +900,10 @@ Route104_EventScript_RematchHaley:: Route104_EventScript_Winston:: trainerbattle_single TRAINER_WINSTON_1, Route104_Text_WinstonIntro, Route104_Text_WinstonDefeat, Route104_EventScript_TryRegisterWinstonAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route104_EventScript_RematchWinston + goto_if_eq VAR_RESULT, TRUE, Route104_EventScript_RematchWinston setvar VAR_0x8004, TRAINER_WINSTON_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route104_EventScript_TryRegisterWinston + goto_if_eq VAR_RESULT, FALSE, Route104_EventScript_TryRegisterWinston msgbox Route104_Text_WinstonPostBattle, MSGBOX_DEFAULT release end @@ -959,12 +941,10 @@ Route104_EventScript_RematchWinston:: Route104_EventScript_Cindy:: trainerbattle_single TRAINER_CINDY_1, Route104_Text_CindyIntro, Route104_Text_CindyDefeat, Route104_EventScript_TryRegisterCindyAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route104_EventScript_RematchCindy + goto_if_eq VAR_RESULT, TRUE, Route104_EventScript_RematchCindy setvar VAR_0x8004, TRAINER_CINDY_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route104_EventScript_TryRegisterCindy + goto_if_eq VAR_RESULT, FALSE, Route104_EventScript_TryRegisterCindy msgbox Route104_Text_CindyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc index ed2a5d7174..4c693cb4fa 100644 --- a/data/maps/Route104_MrBrineysHouse/scripts.inc +++ b/data/maps/Route104_MrBrineysHouse/scripts.inc @@ -7,8 +7,7 @@ Route104_MrBrineysHouse_MapScripts:: Route104_MrBrineysHouse_OnTransition: setflag FLAG_LANDMARK_MR_BRINEY_HOUSE - compare VAR_BRINEY_HOUSE_STATE, 1 - call_if_eq Route104_MrBrineysHouse_EventScript_SetBrineyPeekoPos + call_if_eq VAR_BRINEY_HOUSE_STATE, 1, Route104_MrBrineysHouse_EventScript_SetBrineyPeekoPos call_if_set FLAG_RECEIVED_POKENAV, Route104_MrBrineysHouse_EventScript_HideRustboroRival end @@ -36,8 +35,7 @@ Route104_MrBrineysHouse_EventScript_SailingIntro:: setflag FLAG_MR_BRINEY_SAILING_INTRO msgbox Route104_MrBrineysHouse_Text_WaitUpPeeko, MSGBOX_DEFAULT msgbox Route104_MrBrineysHouse_Text_ItsYouLetsSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto_if_eq VAR_RESULT, NO, Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end @@ -53,15 +51,13 @@ Route104_MrBrineysHouse_EventScript_WhereAreWeBound:: Route104_MrBrineysHouse_EventScript_SailBothDeliveries:: msgbox Route104_MrBrineysHouse_Text_NeedToMakeDeliveriesSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto_if_eq VAR_RESULT, NO, Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end Route104_MrBrineysHouse_EventScript_SailDeliverPackage:: msgbox Route104_MrBrineysHouse_Text_NeedToDeliverPackageSailToDewford, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing + goto_if_eq VAR_RESULT, NO, Route104_MrBrineysHouse_EventScript_DeclineDeliverySailing goto Route104_MrBrineysHouse_EventScript_SailToDewford end diff --git a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc index 34f5ba42c4..5f0ec28fa5 100644 --- a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc +++ b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc @@ -23,19 +23,15 @@ Route104_PrettyPetalFlowerShop_EventScript_ShopOwner:: goto_if_set FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_AlreadyMet setflag FLAG_MET_PRETTY_PETAL_SHOP_OWNER msgbox Route104_PrettyPetalFlowerShop_Text_IntroLearnAboutBerries, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries - compare VAR_RESULT, NO - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries + call_if_eq VAR_RESULT, YES, Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries + call_if_eq VAR_RESULT, NO, Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries release end Route104_PrettyPetalFlowerShop_EventScript_AlreadyMet:: msgbox Route104_PrettyPetalFlowerShop_Text_LearnAboutBerries, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries - compare VAR_RESULT, NO - call_if_eq Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries + call_if_eq VAR_RESULT, YES, Route104_PrettyPetalFlowerShop_EventScript_ExplainBerries + call_if_eq VAR_RESULT, NO, Route104_PrettyPetalFlowerShop_EventScript_DontExplainBerries release end @@ -92,8 +88,7 @@ Route104_PrettyPetalFlowerShop_EventScript_RandomBerryGirl:: random 8 addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_FLOWER_SHOP_RECEIVED_BERRY msgbox Route104_PrettyPetalFlowerShop_Text_MachineMixesBerries, MSGBOX_DEFAULT release diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc index 2184edf5ad..bfad0daaae 100644 --- a/data/maps/Route105/scripts.inc +++ b/data/maps/Route105/scripts.inc @@ -6,10 +6,8 @@ Route105_MapScripts:: Route105_OnLoad: call_if_unset FLAG_REGI_DOORS_OPENED, Route105_CloseRegiEntrance - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_NORTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute105North - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_SOUTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute105South + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute105North + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute105South end Route105_CloseRegiEntrance:: @@ -18,12 +16,9 @@ Route105_CloseRegiEntrance:: return Route105_OnTransition: - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_NORTH - call_if_eq AbnormalWeather_StartKyogreWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_SOUTH - call_if_eq AbnormalWeather_StartKyogreWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_NORTH, AbnormalWeather_StartKyogreWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_105_SOUTH, AbnormalWeather_StartKyogreWeather end Route105_OnFrame: @@ -63,8 +58,7 @@ Route105_EventScript_Josue:: Route105_EventScript_Andres:: trainerbattle_single TRAINER_ANDRES_1, Route105_Text_AndresIntro, Route105_Text_AndresDefeated, Route105_EventScript_AndresRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route105_EventScript_AndresRematch + goto_if_eq VAR_RESULT, TRUE, Route105_EventScript_AndresRematch msgbox Route105_Text_AndresPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route106/scripts.inc b/data/maps/Route106/scripts.inc index 2107ce1c3b..0202f57f01 100644 --- a/data/maps/Route106/scripts.inc +++ b/data/maps/Route106/scripts.inc @@ -18,8 +18,7 @@ Route106_EventScript_Kyla:: Route106_EventScript_Elliot:: trainerbattle_single TRAINER_ELLIOT_1, Route106_Text_ElliotIntro, Route106_Text_ElliotDefeated, Route106_EventScript_ElliotRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route106_EventScript_ElliotRematch + goto_if_eq VAR_RESULT, TRUE, Route106_EventScript_ElliotRematch msgbox Route106_Text_ElliotPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route107/scripts.inc b/data/maps/Route107/scripts.inc index cffeafb08f..b61e3e705e 100644 --- a/data/maps/Route107/scripts.inc +++ b/data/maps/Route107/scripts.inc @@ -9,8 +9,7 @@ Route107_EventScript_Darrin:: Route107_EventScript_Tony:: trainerbattle_single TRAINER_TONY_1, Route107_Text_TonyIntro, Route107_Text_TonyDefeated, Route107_EventScript_TonyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route107_EventScript_TonyRematch + goto_if_eq VAR_RESULT, TRUE, Route107_EventScript_TonyRematch msgbox Route107_Text_TonyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route108/scripts.inc b/data/maps/Route108/scripts.inc index 8663915545..cc2a3e9c3d 100644 --- a/data/maps/Route108/scripts.inc +++ b/data/maps/Route108/scripts.inc @@ -29,8 +29,7 @@ Route108_EventScript_Carolina:: Route108_EventScript_Cory:: trainerbattle_single TRAINER_CORY_1, Route108_Text_CoryIntro, Route108_Text_CoryDefeated, Route108_EventScript_CoryRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route108_EventScript_CoryRematch + goto_if_eq VAR_RESULT, TRUE, Route108_EventScript_CoryRematch msgbox Route108_Text_CoryPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc index 08f0a1701f..f0353fef4d 100644 --- a/data/maps/Route109/scripts.inc +++ b/data/maps/Route109/scripts.inc @@ -282,8 +282,7 @@ Route109_EventScript_MrBriney:: Route109_EventScript_HaveNotDeliveredDevonGood:: message Route109_Text_BrineySailToDewfordQuestion msgbox Route109_Text_BrineySailToDewfordQuestion, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route109_EventScript_StayHere + goto_if_eq VAR_RESULT, NO, Route109_EventScript_StayHere goto Route109_EventScript_SailToDewford end @@ -334,8 +333,7 @@ Route109_EventScript_SoftSandGirl:: goto_if_set FLAG_RECEIVED_SOFT_SAND, Route109_EventScript_AlreadyReceivedSoftSand msgbox Route109_Text_YouCanHaveThis, MSGBOX_DEFAULT giveitem ITEM_SOFT_SAND - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection waitmovement 0 @@ -399,8 +397,7 @@ Route109_EventScript_Edmond:: Route109_EventScript_Ricky:: trainerbattle_single TRAINER_RICKY_1, Route109_Text_RickyIntro, Route109_Text_RickyDefeated, Route109_EventScript_RickyRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route109_EventScript_RickyRematch + goto_if_eq VAR_RESULT, TRUE, Route109_EventScript_RickyRematch msgbox Route109_Text_RickyPostBattle, MSGBOX_DEFAULT release end @@ -421,8 +418,7 @@ Route109_EventScript_RickyRematch:: Route109_EventScript_Lola:: trainerbattle_single TRAINER_LOLA_1, Route109_Text_LolaIntro, Route109_Text_LolaDefeated, Route109_EventScript_LolaRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route109_EventScript_LolaRematch + goto_if_eq VAR_RESULT, TRUE, Route109_EventScript_LolaRematch msgbox Route109_Text_LolaPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc index d1a892b7c0..afb2a4aa0d 100644 --- a/data/maps/Route109_SeashoreHouse/scripts.inc +++ b/data/maps/Route109_SeashoreHouse/scripts.inc @@ -25,8 +25,7 @@ Route109_SeashoreHouse_EventScript_AlreadyGaveIntroduction:: Route109_SeashoreHouse_EventScript_DefeatedTrainers:: msgbox Route109_SeashoreHouse_Text_TakeTheseSodaPopBottles, MSGBOX_DEFAULT giveitem ITEM_SODA_POP, 6 - compare VAR_RESULT, FALSE - goto_if_eq Route109_SeashoreHouse_EventScript_BagFull + goto_if_eq VAR_RESULT, FALSE, Route109_SeashoreHouse_EventScript_BagFull setflag FLAG_RECEIVED_6_SODA_POP release end @@ -39,8 +38,7 @@ Route109_SeashoreHouse_EventScript_BagFull:: Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: showmoneybox 0, 0 msgbox Route109_SeashoreHouse_Text_WantToBuySodaPop, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route109_SeashoreHouse_EventScript_BuySodaPop + goto_if_eq VAR_RESULT, YES, Route109_SeashoreHouse_EventScript_BuySodaPop msgbox Route109_SeashoreHouse_Text_ThatsTooBad, MSGBOX_DEFAULT hidemoneybox release @@ -48,11 +46,9 @@ Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop:: Route109_SeashoreHouse_EventScript_BuySodaPop:: checkmoney 300 - compare VAR_RESULT, FALSE - goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, Route109_SeashoreHouse_EventScript_NotEnoughMoney checkitemspace ITEM_SODA_POP - compare VAR_RESULT, FALSE - goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace + goto_if_eq VAR_RESULT, FALSE, Route109_SeashoreHouse_EventScript_NotEnoughSpace msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT removemoney 300 updatemoneybox diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc index abb42cc127..7d16c8b10c 100644 --- a/data/maps/Route110/scripts.inc +++ b/data/maps/Route110/scripts.inc @@ -16,8 +16,7 @@ Route110_OnResume: Route110_OnTransition: call Common_EventScript_SetupRivalGfxId call Common_EventScript_SetupRivalOnBikeGfxId - compare VAR_CYCLING_CHALLENGE_STATE, 1 - call_if_eq Route110_EventScript_SaveCyclingMusic + call_if_eq VAR_CYCLING_CHALLENGE_STATE, 1, Route110_EventScript_SaveCyclingMusic end Route110_EventScript_SaveCyclingMusic:: @@ -136,8 +135,7 @@ Route110_EventScript_TrickHouseSign:: Route110_EventScript_CyclingRoadResultsSign:: lockall specialvar VAR_RESULT, GetRecordedCyclingRoadResults - compare VAR_RESULT, FALSE - goto_if_eq Route110_EventScript_NoRecordSet + goto_if_eq VAR_RESULT, FALSE, Route110_EventScript_NoRecordSet msgbox Route110_Text_BestRecord, MSGBOX_DEFAULT releaseall end @@ -151,10 +149,8 @@ Route110_EventScript_ChallengeGuy:: lock faceplayer specialvar VAR_RESULT, GetPlayerAvatarBike - compare VAR_RESULT, 1 - goto_if_eq Route110_EventScript_PlayerRidingAcroBike - compare VAR_CYCLING_CHALLENGE_STATE, 0 - goto_if_eq Route110_EventScript_PlayerNotRidingBike + goto_if_eq VAR_RESULT, 1, Route110_EventScript_PlayerRidingAcroBike + goto_if_eq VAR_CYCLING_CHALLENGE_STATE, 0, Route110_EventScript_PlayerNotRidingBike msgbox Route110_Text_AlwaysAimHigher, MSGBOX_DEFAULT release end @@ -182,8 +178,7 @@ Route110_EventScript_Jaclyn:: Route110_EventScript_Edwin:: trainerbattle_single TRAINER_EDWIN_1, Route110_Text_EdwinIntro, Route110_Text_EdwinDefeated, Route110_EventScript_EdwinRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route110_EventScript_EdwinRematch + goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_EdwinRematch msgbox Route110_Text_EdwinPostBattle, MSGBOX_DEFAULT release end @@ -219,8 +214,7 @@ Route110_EventScript_Anthony:: Route110_EventScript_Benjamin:: trainerbattle_single TRAINER_BENJAMIN_1, Route110_Text_BenjaminIntro, Route110_Text_BenjaminDefeated, Route110_EventScript_BenjaminRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route110_EventScript_BenjaminRematch + goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_BenjaminRematch msgbox Route110_Text_BenjaminPostBattle, MSGBOX_DEFAULT release end @@ -246,8 +240,7 @@ Route110_EventScript_Jasmine:: Route110_EventScript_Abigail:: trainerbattle_single TRAINER_ABIGAIL_1, Route110_Text_AbigailIntro, Route110_Text_AbigailDefeated, Route110_EventScript_AbigailRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route110_EventScript_AbigailRematch + goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_AbigailRematch msgbox Route110_Text_AbigailPostBattle, MSGBOX_DEFAULT release end @@ -268,8 +261,7 @@ Route110_EventScript_AbigailRematch:: Route110_EventScript_Isabel:: trainerbattle_single TRAINER_ISABEL_1, Route110_Text_IsabelIntro, Route110_Text_IsabelDefeated, Route110_EventScript_IsabelRegisterMatchCallAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route110_EventScript_IsabelRematch + goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_IsabelRematch msgbox Route110_Text_IsabelPostBattle, MSGBOX_DEFAULT release end @@ -384,10 +376,8 @@ Route110_EventScript_RivalTrigger3:: Route110_EventScript_RivalScene:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route110_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - call_if_eq Route110_EventScript_PlayBrendanMusic + call_if_eq VAR_RESULT, MALE, Route110_EventScript_PlayMayMusic + call_if_eq VAR_RESULT, FEMALE, Route110_EventScript_PlayBrendanMusic applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown waitmovement 0 applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark @@ -395,17 +385,12 @@ Route110_EventScript_RivalScene:: applymovement LOCALID_RIVAL, Common_Movement_Delay48 waitmovement 0 delay 30 - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_RivalApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_RivalApproachPlayer2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_RivalApproachPlayer3 + call_if_eq VAR_0x8008, 1, Route110_EventScript_RivalApproachPlayer1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_RivalApproachPlayer2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_RivalApproachPlayer3 checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route110_EventScript_MayBattle - compare VAR_RESULT, FEMALE - goto_if_eq Route110_EventScript_BrendanBattle + goto_if_eq VAR_RESULT, MALE, Route110_EventScript_MayBattle + goto_if_eq VAR_RESULT, FEMALE, Route110_EventScript_BrendanBattle releaseall end @@ -483,23 +468,17 @@ Route110_EventScript_GiveItemfinder:: Route110_EventScript_RivalExit:: closemessage - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_MoveRival1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_MoveRival2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_MoveRival3 + call_if_eq VAR_0x8008, 1, Route110_EventScript_MoveRival1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_MoveRival2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_MoveRival3 setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_RIGHT setobjectmovementtype LOCALID_RIVAL_ON_BIKE, MOVEMENT_TYPE_FACE_RIGHT removeobject LOCALID_RIVAL addobject LOCALID_RIVAL_ON_BIKE delay 45 - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_RivalExit1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_RivalExit2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_RivalExit3 + call_if_eq VAR_0x8008, 1, Route110_EventScript_RivalExit1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_RivalExit2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_RivalExit3 removeobject LOCALID_RIVAL_ON_BIKE setvar VAR_ROUTE110_STATE, 1 savebgm MUS_DUMMY @@ -625,14 +604,10 @@ Route110_EventScript_BirchScene:: waitmovement 0 applymovement LOCALID_BIRCH, Common_Movement_Delay48 waitmovement 0 - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_BirchApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_BirchApproachPlayer2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_BirchApproachPlayer3 - compare VAR_0x8008, 4 - call_if_eq Route110_EventScript_BirchApproachPlayer4 + call_if_eq VAR_0x8008, 1, Route110_EventScript_BirchApproachPlayer1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_BirchApproachPlayer2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_BirchApproachPlayer3 + call_if_eq VAR_0x8008, 4, Route110_EventScript_BirchApproachPlayer4 msgbox Route110_Text_ImagineSeeingYouHere, MSGBOX_DEFAULT closemessage delay 20 @@ -656,14 +631,10 @@ Route110_EventScript_BirchScene:: setflag FLAG_ENABLE_PROF_BIRCH_MATCH_CALL msgbox Route110_Text_KeepAnEyeOutForRival, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 1 - call_if_eq Route110_EventScript_BirchExit1 - compare VAR_0x8008, 2 - call_if_eq Route110_EventScript_BirchExit2 - compare VAR_0x8008, 3 - call_if_eq Route110_EventScript_BirchExit3 - compare VAR_0x8008, 4 - call_if_eq Route110_EventScript_BirchExit4 + call_if_eq VAR_0x8008, 1, Route110_EventScript_BirchExit1 + call_if_eq VAR_0x8008, 2, Route110_EventScript_BirchExit2 + call_if_eq VAR_0x8008, 3, Route110_EventScript_BirchExit3 + call_if_eq VAR_0x8008, 4, Route110_EventScript_BirchExit4 removeobject LOCALID_BIRCH setvar VAR_REGISTER_BIRCH_STATE, 2 releaseall diff --git a/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc index 4bad754c4d..5eb1f3dea2 100644 --- a/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc +++ b/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc @@ -11,8 +11,7 @@ Route110_SeasideCyclingRoadNorthEntrance_EventScript_Clerk:: Route110_SeasideCyclingRoadNorthEntrance_EventScript_BikeCheck:: lockall specialvar VAR_RESULT, GetPlayerAvatarBike - compare VAR_RESULT, 0 - goto_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_NoBike + goto_if_eq VAR_RESULT, 0, Route110_SeasideCyclingRoadNorthEntrance_EventScript_NoBike setflag FLAG_SYS_CYCLING_ROAD setvar VAR_TEMP_1, 1 releaseall diff --git a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc index 92b4b3e44c..df53f55ccf 100644 --- a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc +++ b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc @@ -3,10 +3,8 @@ Route110_SeasideCyclingRoadSouthEntrance_MapScripts:: .byte 0 Route110_SeasideCyclingRoadSouthEntrance_OnTransition: - compare VAR_CYCLING_CHALLENGE_STATE, 3 - call_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge - compare VAR_CYCLING_CHALLENGE_STATE, 2 - call_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge + call_if_eq VAR_CYCLING_CHALLENGE_STATE, 3, Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge + call_if_eq VAR_CYCLING_CHALLENGE_STATE, 2, Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge end Route110_SeasideCyclingRoadSouthEntrance_EventScript_RestartChallenge:: @@ -23,10 +21,8 @@ Route110_SeasideCyclingRoadSouthEntrance_EventScript_Clerk:: Route110_SeasideCyclingRoadSouthEntrance_EventScript_BikeCheck:: lockall specialvar VAR_RESULT, GetPlayerAvatarBike - compare VAR_RESULT, 2 - call_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_OnMachBike - compare VAR_RESULT, 0 - goto_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_NoBike + call_if_eq VAR_RESULT, 2, Route110_SeasideCyclingRoadSouthEntrance_EventScript_OnMachBike + goto_if_eq VAR_RESULT, 0, Route110_SeasideCyclingRoadSouthEntrance_EventScript_NoBike setflag FLAG_SYS_CYCLING_ROAD setvar VAR_TEMP_1, 1 releaseall diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc index 116c3a4feb..be8f75e961 100644 --- a/data/maps/Route110_TrickHouseEnd/scripts.inc +++ b/data/maps/Route110_TrickHouseEnd/scripts.inc @@ -8,8 +8,7 @@ Route110_TrickHouseEnd_MapScripts:: .byte 0 Route110_TrickHouseEnd_OnResume: - compare VAR_TEMP_1, 1 - call_if_eq Route110_TrickHouseEnd_EventScript_SetDoorClosedMetatile + call_if_eq VAR_TEMP_1, 1, Route110_TrickHouseEnd_EventScript_SetDoorClosedMetatile end Route110_TrickHouseEnd_OnTransition: @@ -63,8 +62,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle1:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_RARE_CANDY - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -76,8 +74,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle2:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_TIMER_BALL - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -89,8 +86,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle3:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_HARD_STONE - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -102,8 +98,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle4:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_SMOKE_BALL - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -115,8 +110,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle5:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_TM12 - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -128,8 +122,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle6:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_MAGNET - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -141,8 +134,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle7:: msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 giveitem ITEM_PP_MAX - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT closemessage call Route110_TrickHouseEnd_EventScript_TrickMasterExit @@ -152,14 +144,10 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle7:: Route110_TrickHouseEnd_EventScript_CompletedPuzzle8:: msgbox Route110_TrickHouseEnd_Text_AllNightPolishingFloors, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_SOUTH - call_if_eq Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwaySouth - compare VAR_FACING, DIR_NORTH - call_if_eq Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayNorth - compare VAR_FACING, DIR_WEST - call_if_eq Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayWest - compare VAR_FACING, DIR_EAST - call_if_eq Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayEast + call_if_eq VAR_FACING, DIR_SOUTH, Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwaySouth + call_if_eq VAR_FACING, DIR_NORTH, Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayNorth + call_if_eq VAR_FACING, DIR_WEST, Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayWest + call_if_eq VAR_FACING, DIR_EAST, Route110_TrickHouseEnd_EventScript_TrickMasterFaceAwayEast delay 30 msgbox Route110_TrickHouseEnd_Text_FountainOfIdeasRunDry, MSGBOX_DEFAULT closemessage @@ -169,8 +157,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle8:: msgbox Route110_TrickHouseEnd_Text_DefeatedMePreferWhichTent, MSGBOX_DEFAULT setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0 call Route110_TrickHouseEnd_EventScript_ChooseTent - compare VAR_RESULT, FALSE - call_if_eq Route110_TrickHouseEnd_EventScript_NoRoomForTent + call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_NoRoomForTent msgbox Route110_TrickHouseEnd_Text_LeavingOnJourney, MSGBOX_DEFAULT call Route110_TrickHouseEnd_EventScript_TrickMasterExit special ResetTrickHouseNuggetFlag diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index a0250c44ce..44dda8c5c1 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -17,18 +17,12 @@ Route110_TrickHouseEntrance_MapScripts:: Route110_TrickHouseEntrance_OnTransition: setflag FLAG_LANDMARK_TRICK_HOUSE - compare VAR_TRICK_HOUSE_ENTER_FROM_CORRIDOR, 1 - goto_if_eq Route110_TrickHouseEntrance_EventScript_EnterFromCorridor - compare VAR_TRICK_HOUSE_PRIZE_PICKUP, 1 - goto_if_eq Route110_TrickHouseEntrance_EventScript_SetReadyToGiveReward - compare VAR_TRICK_HOUSE_FOUND_TRICK_MASTER, 1 - goto_if_eq Route110_TrickHouseEntrance_EventScript_MoveTrickMasterToDoor - compare VAR_TRICK_HOUSE_ENTRANCE_STATE, 5 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle - compare VAR_TRICK_HOUSE_ENTRANCE_STATE, 3 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle - compare VAR_TRICK_HOUSE_ENTRANCE_STATE, 0 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle + goto_if_eq VAR_TRICK_HOUSE_ENTER_FROM_CORRIDOR, 1, Route110_TrickHouseEntrance_EventScript_EnterFromCorridor + goto_if_eq VAR_TRICK_HOUSE_PRIZE_PICKUP, 1, Route110_TrickHouseEntrance_EventScript_SetReadyToGiveReward + goto_if_eq VAR_TRICK_HOUSE_FOUND_TRICK_MASTER, 1, Route110_TrickHouseEntrance_EventScript_MoveTrickMasterToDoor + call_if_eq VAR_TRICK_HOUSE_ENTRANCE_STATE, 5, Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle + call_if_eq VAR_TRICK_HOUSE_ENTRANCE_STATE, 3, Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle + call_if_eq VAR_TRICK_HOUSE_ENTRANCE_STATE, 0, Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle switch VAR_TRICK_HOUSE_ENTRANCE_STATE case 0, Route110_TrickHouseEntrance_EventScript_ReadyBeingWatchedTrigger case 1, Route110_TrickHouseEntrance_EventScript_SetNotBeingWatched1 @@ -38,8 +32,7 @@ Route110_TrickHouseEntrance_OnTransition: Route110_TrickHouseEntrance_EventScript_SetReadyToGiveReward:: setvar VAR_TRICK_HOUSE_BEING_WATCHED_STATE, 1 - compare VAR_TRICK_HOUSE_LEVEL, 8 - goto_if_eq Route110_TrickHouseEntrance_EventScript_ReadyToGiveTentReward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 8, Route110_TrickHouseEntrance_EventScript_ReadyToGiveTentReward setvar VAR_TRICK_HOUSE_ENTRANCE_STATE, 2 end @@ -55,22 +48,14 @@ Route110_TrickHouseEntrance_EventScript_EnterFromCorridor:: Route110_TrickHouseEntrance_EventScript_CheckReadyForNextPuzzle:: setvar VAR_TRICK_HOUSE_ENTRANCE_STATE, 0 - compare VAR_TRICK_HOUSE_LEVEL, 1 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle2 - compare VAR_TRICK_HOUSE_LEVEL, 2 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle3 - compare VAR_TRICK_HOUSE_LEVEL, 3 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle4 - compare VAR_TRICK_HOUSE_LEVEL, 4 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle5 - compare VAR_TRICK_HOUSE_LEVEL, 5 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle6 - compare VAR_TRICK_HOUSE_LEVEL, 6 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle7 - compare VAR_TRICK_HOUSE_LEVEL, 7 - call_if_eq Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle8 - compare VAR_TRICK_HOUSE_LEVEL, 8 - call_if_eq Route110_TrickHouseEntrance_EventScript_FinishedPuzzles + call_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle2 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 2, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle3 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 3, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle4 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 4, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle5 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 5, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle6 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 6, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle7 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 7, Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle8 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 8, Route110_TrickHouseEntrance_EventScript_FinishedPuzzles return Route110_TrickHouseEntrance_EventScript_CheckReadyForPuzzle2:: @@ -216,8 +201,7 @@ Route110_TrickHouseEntrance_OnFrame: Route110_TrickHouseEntrance_EventScript_BeginChallenge:: lockall delay 20 - compare VAR_TRICK_HOUSE_LEVEL, 0 - call_if_eq Route110_TrickHouseEntrance_EventScript_MeetTrickMaster + call_if_eq VAR_TRICK_HOUSE_LEVEL, 0, Route110_TrickHouseEntrance_EventScript_MeetTrickMaster msgbox Route110_TrickHouseEntrance_Text_ComeToChallengeTrickHouse, MSGBOX_DEFAULT closemessage delay 20 @@ -251,22 +235,14 @@ Route110_TrickHouseEntrance_EventScript_FoundTrickMaster:: waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay48 waitmovement 0 - compare VAR_TRICK_HOUSE_LEVEL, 0 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBeneathDesk - compare VAR_TRICK_HOUSE_LEVEL, 1 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBehindTree - compare VAR_TRICK_HOUSE_LEVEL, 2 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundInDresser - compare VAR_TRICK_HOUSE_LEVEL, 3 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBeyondWindow - compare VAR_TRICK_HOUSE_LEVEL, 4 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundInPlanter - compare VAR_TRICK_HOUSE_LEVEL, 5 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundInCupboard - compare VAR_TRICK_HOUSE_LEVEL, 6 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBehindWindow - compare VAR_TRICK_HOUSE_LEVEL, 7 - call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBeneathCushion + call_if_eq VAR_TRICK_HOUSE_LEVEL, 0, Route110_TrickHouseEntrance_EventScript_FoundBeneathDesk + call_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_FoundBehindTree + call_if_eq VAR_TRICK_HOUSE_LEVEL, 2, Route110_TrickHouseEntrance_EventScript_FoundInDresser + call_if_eq VAR_TRICK_HOUSE_LEVEL, 3, Route110_TrickHouseEntrance_EventScript_FoundBeyondWindow + call_if_eq VAR_TRICK_HOUSE_LEVEL, 4, Route110_TrickHouseEntrance_EventScript_FoundInPlanter + call_if_eq VAR_TRICK_HOUSE_LEVEL, 5, Route110_TrickHouseEntrance_EventScript_FoundInCupboard + call_if_eq VAR_TRICK_HOUSE_LEVEL, 6, Route110_TrickHouseEntrance_EventScript_FoundBehindWindow + call_if_eq VAR_TRICK_HOUSE_LEVEL, 7, Route110_TrickHouseEntrance_EventScript_FoundBeneathCushion closemessage setvar VAR_TRICK_HOUSE_FOUND_TRICK_MASTER, 1 warpsilent MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 6, 2 @@ -352,88 +328,67 @@ Route110_TrickHouseEntrance_EventScript_GiveReward:: applymovement LOCALID_TRICK_MASTER, Common_Movement_FacePlayer waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_YoureHereToAcceptReward, MSGBOX_DEFAULT - compare VAR_TRICK_HOUSE_LEVEL, 1 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle1Reward - compare VAR_TRICK_HOUSE_LEVEL, 2 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle2Reward - compare VAR_TRICK_HOUSE_LEVEL, 3 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle3Reward - compare VAR_TRICK_HOUSE_LEVEL, 4 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle4Reward - compare VAR_TRICK_HOUSE_LEVEL, 5 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle5Reward - compare VAR_TRICK_HOUSE_LEVEL, 6 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle6Reward - compare VAR_TRICK_HOUSE_LEVEL, 7 - goto_if_eq Route110_TrickHouseEntrance_EventScript_GivePuzzle7Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_GivePuzzle1Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 2, Route110_TrickHouseEntrance_EventScript_GivePuzzle2Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 3, Route110_TrickHouseEntrance_EventScript_GivePuzzle3Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 4, Route110_TrickHouseEntrance_EventScript_GivePuzzle4Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 5, Route110_TrickHouseEntrance_EventScript_GivePuzzle5Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 6, Route110_TrickHouseEntrance_EventScript_GivePuzzle6Reward + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 7, Route110_TrickHouseEntrance_EventScript_GivePuzzle7Reward end Route110_TrickHouseEntrance_EventScript_GivePuzzle1Reward:: giveitem ITEM_RARE_CANDY - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle2Reward:: giveitem ITEM_TIMER_BALL - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle3Reward:: giveitem ITEM_HARD_STONE - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle4Reward:: giveitem ITEM_SMOKE_BALL - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle5Reward:: giveitem ITEM_TM12 - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle6Reward:: giveitem ITEM_MAGNET - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end Route110_TrickHouseEntrance_EventScript_GivePuzzle7Reward:: giveitem ITEM_PP_MAX - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_GotReward - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward + call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT releaseall end @@ -451,10 +406,8 @@ Route110_TrickHouseEntrance_EventScript_MechadollReward:: waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_MechadollWhichTent, MSGBOX_DEFAULT call Route110_TrickHouseEntrance_EventScript_ChooseTent - compare VAR_RESULT, TRUE - goto_if_eq Route110_TrickHouseEntrance_EventScript_ReceivedTent - compare VAR_RESULT, FALSE - call_if_eq Common_EventScript_NoRoomForDecor + goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_ReceivedTent + call_if_eq VAR_RESULT, FALSE, Common_EventScript_NoRoomForDecor msgbox Route110_TrickHouseEntrance_Text_PCFullAgain, MSGBOX_DEFAULT releaseall end @@ -506,8 +459,7 @@ Route110_TrickHouseEntrance_EventScript_ItsAScroll:: Route110_TrickHouseEntrance_EventScript_GoInHolePrompt:: msgbox Route110_TrickHouseEntrance_Text_GoInHoleBehindScroll, MSGBOX_YESNO closemessage - compare VAR_RESULT, YES - goto_if_eq Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom + goto_if_eq VAR_RESULT, YES, Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom releaseall end @@ -588,8 +540,7 @@ Route110_TrickHouseEntrance_EventScript_LeftOnJourneyNote:: end Route110_TrickHouseEntrance_EventScript_CheckLevelForMessage:: - compare VAR_TRICK_HOUSE_LEVEL, 8 - goto_if_eq Route110_TrickHouseEntrance_EventScript_LeftOnJourneyNote2 + goto_if_eq VAR_TRICK_HOUSE_LEVEL, 8, Route110_TrickHouseEntrance_EventScript_LeftOnJourneyNote2 msgbox Route110_TrickHouseEntrance_Text_ItsAScroll, MSGBOX_DEFAULT releaseall end @@ -613,8 +564,7 @@ Route110_TrickHousePuzzle_EventScript_Door:: end Route110_TrickHousePuzzle1_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle1_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2 @@ -624,8 +574,7 @@ Route110_TrickHousePuzzle1_EventScript_Door:: end Route110_TrickHousePuzzle2_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle2_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_2_STATE, 2 @@ -635,8 +584,7 @@ Route110_TrickHousePuzzle2_EventScript_Door:: end Route110_TrickHousePuzzle3_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle3_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_3_STATE, 2 @@ -646,8 +594,7 @@ Route110_TrickHousePuzzle3_EventScript_Door:: end Route110_TrickHousePuzzle4_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle4_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_4_STATE, 2 @@ -657,8 +604,7 @@ Route110_TrickHousePuzzle4_EventScript_Door:: end Route110_TrickHousePuzzle5_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle5_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_5_STATE, 2 @@ -668,8 +614,7 @@ Route110_TrickHousePuzzle5_EventScript_Door:: end Route110_TrickHousePuzzle6_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle6_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_6_STATE, 2 @@ -679,8 +624,7 @@ Route110_TrickHousePuzzle6_EventScript_Door:: end Route110_TrickHousePuzzle7_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle7_EventScript_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 2 @@ -690,8 +634,7 @@ Route110_TrickHousePuzzle7_EventScript_Door:: end Route110_TrickHousePuzzle8_EventScript_Door:: - compare VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle_EventScript_DoorLocked + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0, Route110_TrickHousePuzzle_EventScript_DoorLocked msgbox Route110_TrickHousePuzzle8_EventScript_WroteSecretCodeLockOpened, MSGBOX_DEFAULT playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_8_STATE, 2 @@ -722,12 +665,9 @@ Route110_TrickHouseEntrance_EventScript_TrickMasterHiding:: lockall msgbox Route110_TrickHouseEntrance_Text_YoureBeingWatched, MSGBOX_DEFAULT releaseall - compare VAR_TRICK_HOUSE_LEVEL, 0 - call_if_eq Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle1 - compare VAR_TRICK_HOUSE_LEVEL, 1 - call_if_eq Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle2 - compare VAR_TRICK_HOUSE_LEVEL, 2 - call_if_eq Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle3 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 0, Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle1 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 1, Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle2 + call_if_eq VAR_TRICK_HOUSE_LEVEL, 2, Route110_TrickHouseEntrance_EventScript_DoHidingSpotSparkle3 setvar VAR_TRICK_HOUSE_BEING_WATCHED_STATE, 1 end diff --git a/data/maps/Route110_TrickHousePuzzle1/scripts.inc b/data/maps/Route110_TrickHousePuzzle1/scripts.inc index 920a43819f..2ed769167a 100644 --- a/data/maps/Route110_TrickHousePuzzle1/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle1/scripts.inc @@ -3,8 +3,7 @@ Route110_TrickHousePuzzle1_MapScripts:: .byte 0 Route110_TrickHousePuzzle1_OnLoad: - compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2 - goto_if_eq Route110_TrickHousePuzzle1_EventScript_OpenDoor + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2, Route110_TrickHousePuzzle1_EventScript_OpenDoor end Route110_TrickHousePuzzle1_EventScript_OpenDoor:: @@ -13,8 +12,7 @@ Route110_TrickHousePuzzle1_EventScript_OpenDoor:: Route110_TrickHousePuzzle1_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle1_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_1_STATE, 0, Route110_TrickHousePuzzle1_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle2/scripts.inc b/data/maps/Route110_TrickHousePuzzle2/scripts.inc index 4e8c52cf4a..012a62d93d 100644 --- a/data/maps/Route110_TrickHousePuzzle2/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle2/scripts.inc @@ -4,14 +4,10 @@ Route110_TrickHousePuzzle2_MapScripts:: .byte 0 Route110_TrickHousePuzzle2_OnResume: - compare VAR_TEMP_1, 1 - call_if_eq Route110_TrickHousePuzzle2_EventScript_PressButton1 - compare VAR_TEMP_2, 1 - call_if_eq Route110_TrickHousePuzzle2_EventScript_PressButton2 - compare VAR_TEMP_3, 1 - call_if_eq Route110_TrickHousePuzzle2_EventScript_PressButton3 - compare VAR_TEMP_4, 1 - call_if_eq Route110_TrickHousePuzzle2_EventScript_PressButton4 + call_if_eq VAR_TEMP_1, 1, Route110_TrickHousePuzzle2_EventScript_PressButton1 + call_if_eq VAR_TEMP_2, 1, Route110_TrickHousePuzzle2_EventScript_PressButton2 + call_if_eq VAR_TEMP_3, 1, Route110_TrickHousePuzzle2_EventScript_PressButton3 + call_if_eq VAR_TEMP_4, 1, Route110_TrickHousePuzzle2_EventScript_PressButton4 end Route110_TrickHousePuzzle2_OnTransition: @@ -23,8 +19,7 @@ Route110_TrickHousePuzzle2_OnTransition: Route110_TrickHousePuzzle2_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle2_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_2_STATE, 0, Route110_TrickHousePuzzle2_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle3/scripts.inc b/data/maps/Route110_TrickHousePuzzle3/scripts.inc index 2b732124fb..1831639b18 100644 --- a/data/maps/Route110_TrickHousePuzzle3/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle3/scripts.inc @@ -5,10 +5,8 @@ Route110_TrickHousePuzzle3_MapScripts:: Route110_TrickHousePuzzle3_OnResume: call Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles - compare VAR_TEMP_9, 0 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetDoorsState0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetDoorsState1 + call_if_eq VAR_TEMP_9, 0, Route110_TrickHousePuzzle3_EventScript_SetDoorsState0 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle3_EventScript_SetDoorsState1 end Route110_TrickHousePuzzle3_OnTransition: @@ -25,14 +23,10 @@ Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles:: setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, FALSE setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, FALSE setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, FALSE - compare VAR_TEMP_8, 1 - call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile - compare VAR_TEMP_8, 2 - call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton2Metatile - compare VAR_TEMP_8, 3 - call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton3Metatile - compare VAR_TEMP_8, 4 - call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton4Metatile + call_if_eq VAR_TEMP_8, 1, Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile + call_if_eq VAR_TEMP_8, 2, Route110_TrickHousePuzzle3_EventScript_PressedButton2Metatile + call_if_eq VAR_TEMP_8, 3, Route110_TrickHousePuzzle3_EventScript_PressedButton3Metatile + call_if_eq VAR_TEMP_8, 4, Route110_TrickHousePuzzle3_EventScript_PressedButton4Metatile return Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile:: @@ -241,14 +235,10 @@ Route110_TrickHousePuzzle3_EventScript_SetButton:: setvar VAR_TEMP_2, 0 setvar VAR_TEMP_3, 0 setvar VAR_TEMP_4, 0 - compare VAR_TEMP_8, 1 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetButton1 - compare VAR_TEMP_8, 2 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetButton2 - compare VAR_TEMP_8, 3 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetButton3 - compare VAR_TEMP_8, 4 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetButton4 + call_if_eq VAR_TEMP_8, 1, Route110_TrickHousePuzzle3_EventScript_SetButton1 + call_if_eq VAR_TEMP_8, 2, Route110_TrickHousePuzzle3_EventScript_SetButton2 + call_if_eq VAR_TEMP_8, 3, Route110_TrickHousePuzzle3_EventScript_SetButton3 + call_if_eq VAR_TEMP_8, 4, Route110_TrickHousePuzzle3_EventScript_SetButton4 return Route110_TrickHousePuzzle3_EventScript_SetButton1:: @@ -268,15 +258,11 @@ Route110_TrickHousePuzzle3_EventScript_SetButton4:: return Route110_TrickHousePuzzle3_EventScript_AlternateDoors:: - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetDoorsState0 - compare VAR_TEMP_9, 0 - call_if_eq Route110_TrickHousePuzzle3_EventScript_SetDoorsState1 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle3_EventScript_SetDoorsState0 + call_if_eq VAR_TEMP_9, 0, Route110_TrickHousePuzzle3_EventScript_SetDoorsState1 special DrawWholeMapView - compare VAR_TEMP_9, 1 - goto_if_eq Route110_TrickHousePuzzle3_EventScript_ClearAltDoorState - compare VAR_TEMP_9, 0 - goto_if_eq Route110_TrickHousePuzzle3_EventScript_SetAltDoorState + goto_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle3_EventScript_ClearAltDoorState + goto_if_eq VAR_TEMP_9, 0, Route110_TrickHousePuzzle3_EventScript_SetAltDoorState end Route110_TrickHousePuzzle3_EventScript_ClearAltDoorState:: @@ -291,8 +277,7 @@ Route110_TrickHousePuzzle3_EventScript_SetAltDoorState:: Route110_TrickHousePuzzle3_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle3_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_3_STATE, 0, Route110_TrickHousePuzzle3_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle4/scripts.inc b/data/maps/Route110_TrickHousePuzzle4/scripts.inc index 10f49adb50..2350d4ceb2 100644 --- a/data/maps/Route110_TrickHousePuzzle4/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle4/scripts.inc @@ -3,8 +3,7 @@ Route110_TrickHousePuzzle4_MapScripts:: Route110_TrickHousePuzzle4_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle4_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_4_STATE, 0, Route110_TrickHousePuzzle4_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle5/scripts.inc b/data/maps/Route110_TrickHousePuzzle5/scripts.inc index c15c4ee730..e0fa432bd2 100644 --- a/data/maps/Route110_TrickHousePuzzle5/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle5/scripts.inc @@ -19,8 +19,7 @@ Route110_TrickHousePuzzle5_OnTransition: Route110_TrickHousePuzzle5_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_5_STATE, 0, Route110_TrickHousePuzzle5_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end @@ -33,8 +32,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll1:: lockall applymovement LOCALID_MECHADOLL_1, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_1, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_1, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll1Activate end @@ -43,8 +41,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll2:: lockall applymovement LOCALID_MECHADOLL_2, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_2, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_2, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll2Activate end @@ -53,8 +50,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll3:: lockall applymovement LOCALID_MECHADOLL_3, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_3, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_3, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll3Activate end @@ -63,8 +59,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll4:: lockall applymovement LOCALID_MECHADOLL_4, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_4, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_4, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll4Activate end @@ -73,8 +68,7 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll5:: lockall applymovement LOCALID_MECHADOLL_5, Common_Movement_FacePlayer waitmovement 0 - compare VAR_TEMP_5, 1 - goto_if_eq Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough + goto_if_eq VAR_TEMP_5, 1, Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough setvar VAR_TEMP_9, 0 goto Route110_TrickHousePuzzle5_EventScript_Mechadoll5Activate end @@ -226,14 +220,10 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll1Activate:: waitmovement 0 applymovement LOCALID_MECHADOLL_1, Common_Movement_Delay48 waitmovement 0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 - compare VAR_TEMP_9, 2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 - compare VAR_TEMP_9, 3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 - compare VAR_TEMP_9, 4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 + call_if_eq VAR_TEMP_9, 2, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 + call_if_eq VAR_TEMP_9, 3, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 + call_if_eq VAR_TEMP_9, 4, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 msgbox Route110_TrickHousePuzzle5_Text_Mechadoll1Intro, MSGBOX_DEFAULT random 3 switch VAR_RESULT @@ -250,16 +240,11 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll2Activate:: waitmovement 0 applymovement LOCALID_MECHADOLL_2, Common_Movement_Delay48 waitmovement 0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight1 - compare VAR_TEMP_9, 2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight2 - compare VAR_TEMP_9, 3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight3 - compare VAR_TEMP_9, 4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight4 - compare VAR_TEMP_9, 5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight5 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight1 + call_if_eq VAR_TEMP_9, 2, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight2 + call_if_eq VAR_TEMP_9, 3, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight3 + call_if_eq VAR_TEMP_9, 4, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight4 + call_if_eq VAR_TEMP_9, 5, Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight5 msgbox Route110_TrickHousePuzzle5_Text_Mechadoll2Intro, MSGBOX_DEFAULT random 3 switch VAR_RESULT @@ -276,14 +261,10 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll3Activate:: waitmovement 0 applymovement LOCALID_MECHADOLL_3, Common_Movement_Delay48 waitmovement 0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 - compare VAR_TEMP_9, 2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 - compare VAR_TEMP_9, 3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 - compare VAR_TEMP_9, 4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 + call_if_eq VAR_TEMP_9, 2, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 + call_if_eq VAR_TEMP_9, 3, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 + call_if_eq VAR_TEMP_9, 4, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 msgbox Route110_TrickHousePuzzle5_Text_Mechadoll3Intro, MSGBOX_DEFAULT random 3 switch VAR_RESULT @@ -300,14 +281,10 @@ Route110_TrickHousePuzzle5_EventScript_Mechadoll4Activate:: waitmovement 0 applymovement LOCALID_MECHADOLL_4, Common_Movement_Delay48 waitmovement 0 - compare VAR_TEMP_9, 1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 - compare VAR_TEMP_9, 2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 - compare VAR_TEMP_9, 3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 - compare VAR_TEMP_9, 4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 + call_if_eq VAR_TEMP_9, 1, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1 + call_if_eq VAR_TEMP_9, 2, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2 + call_if_eq VAR_TEMP_9, 3, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3 + call_if_eq VAR_TEMP_9, 4, Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4 msgbox Route110_TrickHousePuzzle5_Text_Mechadoll4Intro, MSGBOX_DEFAULT random 3 switch VAR_RESULT @@ -487,133 +464,83 @@ Route110_TrickHousePuzzle5_EventScript_CorrectGoThrough:: @ Mechadoll 5 never walks, all the Mechadoll5Walk scripts are unused @ No mechadoll walks left 5 paces, all the WalkLeft5 scripts are unused Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft1:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft1 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft2:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft2 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft3:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft3 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft4:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft4 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkLeft5:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkLeft5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkLeft5 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight1:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight1 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight1 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight1 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight2:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight2 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight2 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight2 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight3:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight3 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight3 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight3 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight4:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight4 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight4 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight4 return Route110_TrickHousePuzzle5_EventScript_MechadollWalkRight5:: - compare VAR_TEMP_8, LOCALID_MECHADOLL_1 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_2 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_3 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_4 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight5 - compare VAR_TEMP_8, LOCALID_MECHADOLL_5 - call_if_eq Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_1, Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_2, Route110_TrickHousePuzzle5_EventScript_Mechadoll2WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_3, Route110_TrickHousePuzzle5_EventScript_Mechadoll3WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_4, Route110_TrickHousePuzzle5_EventScript_Mechadoll4WalkRight5 + call_if_eq VAR_TEMP_8, LOCALID_MECHADOLL_5, Route110_TrickHousePuzzle5_EventScript_Mechadoll5WalkRight5 return Route110_TrickHousePuzzle5_EventScript_Mechadoll1WalkLeft1:: diff --git a/data/maps/Route110_TrickHousePuzzle6/scripts.inc b/data/maps/Route110_TrickHousePuzzle6/scripts.inc index 35d657acc3..e442d094d5 100644 --- a/data/maps/Route110_TrickHousePuzzle6/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle6/scripts.inc @@ -17,8 +17,7 @@ Route110_TrickHousePuzzle6_EventScript_InitPuzzle:: Route110_TrickHousePuzzle6_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle6_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_6_STATE, 0, Route110_TrickHousePuzzle6_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc index 473c39992a..a47df82cac 100644 --- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc @@ -72,8 +72,7 @@ Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOff:: return Route110_TrickHousePuzzle7_OnTransition: - compare VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1 - goto_if_eq Route110_TrickHousePuzzle7_EventScript_TeleportedTransition + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1, Route110_TrickHousePuzzle7_EventScript_TeleportedTransition clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1 clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2 clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3 @@ -85,8 +84,7 @@ Route110_TrickHousePuzzle7_EventScript_TeleportedTransition:: end Route110_TrickHousePuzzle7_OnLoad: - compare VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1 - call_if_eq Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles + call_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1, Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles end Route110_TrickHousePuzzle7_OnFrame: @@ -99,8 +97,7 @@ Route110_TrickHousePuzzle7_EventScript_ClearState2:: Route110_TrickHousePuzzle7_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle7_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0, Route110_TrickHousePuzzle7_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route110_TrickHousePuzzle8/scripts.inc b/data/maps/Route110_TrickHousePuzzle8/scripts.inc index 310751e5df..371f610004 100644 --- a/data/maps/Route110_TrickHousePuzzle8/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle8/scripts.inc @@ -3,8 +3,7 @@ Route110_TrickHousePuzzle8_MapScripts:: Route110_TrickHousePuzzle8_EventScript_Scroll:: lockall - compare VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0 - goto_if_eq Route110_TrickHousePuzzle8_EventScript_FoundScroll + goto_if_eq VAR_TRICK_HOUSE_PUZZLE_8_STATE, 0, Route110_TrickHousePuzzle8_EventScript_FoundScroll goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain end diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 2007c89f6c..6cb83b4528 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -15,8 +15,7 @@ Route111_MapScripts:: Route111_OnLoad: call_if_unset FLAG_REGI_DOORS_OPENED, Route111_EventScript_CloseDesertRuins - compare VAR_MIRAGE_TOWER_STATE, 1 - call_if_eq Route111_EventScript_ShowTemporaryMirageTower + call_if_eq VAR_MIRAGE_TOWER_STATE, 1, Route111_EventScript_ShowTemporaryMirageTower end Route111_EventScript_CloseDesertRuins:: @@ -50,10 +49,8 @@ Route111_OnTransition: setvar VAR_TRAINER_HILL_IS_ACTIVE, 0 special SetMirageTowerVisibility call_if_unset FLAG_MIRAGE_TOWER_VISIBLE, Route111_EventScript_SetLayoutNoMirageTower - compare VAR_MIRAGE_TOWER_STATE, 1 - call_if_eq Route111_EventScript_SetFallingPlayerGfx - compare VAR_MIRAGE_TOWER_STATE, 2 - call_if_eq Route111_EventScript_SetMirageTowerGone + call_if_eq VAR_MIRAGE_TOWER_STATE, 1, Route111_EventScript_SetFallingPlayerGfx + call_if_eq VAR_MIRAGE_TOWER_STATE, 2, Route111_EventScript_SetMirageTowerGone call Route111_EventScript_CheckSetSandstorm call GabbyAndTy_EventScript_UpdateLocation goto_if_not_defeated TRAINER_VICKY, Route111_EventScript_SetWinstratesNotDefeated @@ -61,10 +58,8 @@ Route111_OnTransition: Route111_EventScript_SetFallingPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route111_EventScript_SetFallingPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq Route111_EventScript_SetFallingPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, Route111_EventScript_SetFallingPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, Route111_EventScript_SetFallingPlayerGfxFemale return Route111_EventScript_SetFallingPlayerGfxMale:: @@ -77,16 +72,11 @@ Route111_EventScript_SetFallingPlayerGfxFemale:: Route111_EventScript_CheckSetSandstorm:: getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_1, 34 - goto_if_lt Route111_EventScript_EndCheckSetSandstorm - compare VAR_TEMP_1, 107 - goto_if_gt Route111_EventScript_EndCheckSetSandstorm - compare VAR_TEMP_1, 72 - goto_if_gt Route111_EventScript_SetSandstorm - compare VAR_TEMP_0, 2000 - goto_if_gt Route111_EventScript_EndCheckSetSandstorm - compare VAR_TEMP_0, 8 - goto_if_lt Route111_EventScript_EndCheckSetSandstorm + goto_if_lt VAR_TEMP_1, 34, Route111_EventScript_EndCheckSetSandstorm + goto_if_gt VAR_TEMP_1, 107, Route111_EventScript_EndCheckSetSandstorm + goto_if_gt VAR_TEMP_1, 72, Route111_EventScript_SetSandstorm + goto_if_gt VAR_TEMP_0, 2000, Route111_EventScript_EndCheckSetSandstorm + goto_if_lt VAR_TEMP_0, 8, Route111_EventScript_EndCheckSetSandstorm Route111_EventScript_SetSandstorm:: setweather WEATHER_SANDSTORM Route111_EventScript_EndCheckSetSandstorm:: @@ -170,8 +160,7 @@ Route111_EventScript_Girl:: goto_if_set FLAG_DAILY_ROUTE_111_RECEIVED_BERRY, Route111_EventScript_ReceivedBerry msgbox Route111_Text_WateredPlantsEveryDayTakeBerry, MSGBOX_DEFAULT giveitem ITEM_RAZZ_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_ROUTE_111_RECEIVED_BERRY special GetPlayerBigGuyGirlString msgbox Route111_Text_GoingToTryToMakeDifferentColorBerries, MSGBOX_DEFAULT @@ -211,8 +200,7 @@ Route111_EventScript_ViciousSandstormTriggerRight:: Route111_EventScript_ViciousSandstormTrigger:: checkitem ITEM_GO_GOGGLES - compare VAR_RESULT, FALSE - goto_if_eq Route111_EventScript_PreventRouteAccess + goto_if_eq VAR_RESULT, FALSE, Route111_EventScript_PreventRouteAccess setvar VAR_TEMP_3, 1 releaseall end @@ -220,14 +208,10 @@ Route111_EventScript_ViciousSandstormTrigger:: Route111_EventScript_PreventRouteAccess:: msgbox gText_SandstormIsVicious, MSGBOX_DEFAULT closemessage - compare VAR_0x8004, 0 - call_if_eq Route111_EventScript_PushUpFromRoute - compare VAR_0x8004, 1 - call_if_eq Route111_EventScript_PushDownFromRoute - compare VAR_0x8004, 2 - call_if_eq Route111_EventScript_PushLeftFromRoute - compare VAR_0x8004, 3 - call_if_eq Route111_EventScript_PushRightFromRoute + call_if_eq VAR_0x8004, 0, Route111_EventScript_PushUpFromRoute + call_if_eq VAR_0x8004, 1, Route111_EventScript_PushDownFromRoute + call_if_eq VAR_0x8004, 2, Route111_EventScript_PushLeftFromRoute + call_if_eq VAR_0x8004, 3, Route111_EventScript_PushRightFromRoute releaseall end @@ -285,8 +269,7 @@ Route111_EventScript_Victor:: faceplayer setflag FLAG_LANDMARK_WINSTRATE_FAMILY msgbox Route111_Text_BattleOurFamily, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route111_EventScript_BattleWinstrates + goto_if_eq VAR_RESULT, YES, Route111_EventScript_BattleWinstrates msgbox Route111_Text_IsThatSo, MSGBOX_DEFAULT release end @@ -420,10 +403,8 @@ Route111_EventScript_Man2:: Route111_EventScript_Hiker:: lock faceplayer - compare VAR_MIRAGE_TOWER_STATE, 3 - goto_if_eq Route111_EventScript_HikerMirageTowerGone - compare VAR_MIRAGE_TOWER_STATE, 2 - goto_if_eq Route111_EventScript_HikerMirageTowerDisintegrated + goto_if_eq VAR_MIRAGE_TOWER_STATE, 3, Route111_EventScript_HikerMirageTowerGone + goto_if_eq VAR_MIRAGE_TOWER_STATE, 2, Route111_EventScript_HikerMirageTowerDisintegrated goto_if_set FLAG_MIRAGE_TOWER_VISIBLE, Route111_EventScript_HikerMirageTowerVisible msgbox Route111_Text_ShouldBeMirageTowerAroundHere, MSGBOX_DEFAULT release @@ -478,8 +459,7 @@ Route111_EventScript_Becky:: Route111_EventScript_Dusty:: trainerbattle_single TRAINER_DUSTY_1, Route111_Text_DustyIntro, Route111_Text_DustyDefeat, Route111_EventScript_RegisterDusty specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route111_EventScript_RematchDusty + goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchDusty msgbox Route111_Text_DustyPostBattle, MSGBOX_DEFAULT release end @@ -515,8 +495,7 @@ Route111_EventScript_Daisuke:: Route111_EventScript_Wilton:: trainerbattle_single TRAINER_WILTON_1, Route111_Text_WiltonIntro, Route111_Text_WiltonDefeat, Route111_EventScript_RegisterWilton specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route111_EventScript_RematchWilton + goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchWilton msgbox Route111_Text_WiltonPostBattle, MSGBOX_DEFAULT release end @@ -537,8 +516,7 @@ Route111_EventScript_RematchWilton:: Route111_EventScript_Brooke:: trainerbattle_single TRAINER_BROOKE_1, Route111_Text_BrookeIntro, Route111_Text_BrookeDefeat, Route111_EventScript_RegisterBrooke specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route111_EventScript_RematchBrooke + goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchBrooke msgbox Route111_Text_BrookePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route111_OldLadysRestStop/scripts.inc b/data/maps/Route111_OldLadysRestStop/scripts.inc index 645ce4de41..6b7b5a8abc 100644 --- a/data/maps/Route111_OldLadysRestStop/scripts.inc +++ b/data/maps/Route111_OldLadysRestStop/scripts.inc @@ -10,10 +10,8 @@ Route111_OldLadysRestStop_EventScript_OldLady:: lock faceplayer msgbox Route111_OldLadysRestStop_Text_RestUpHere, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route111_OldLadysRestStop_EventScript_Rest - compare VAR_RESULT, NO - goto_if_eq Route111_OldLadysRestStop_EventScript_DeclineRest + goto_if_eq VAR_RESULT, YES, Route111_OldLadysRestStop_EventScript_Rest + goto_if_eq VAR_RESULT, NO, Route111_OldLadysRestStop_EventScript_DeclineRest end Route111_OldLadysRestStop_EventScript_Rest:: @@ -21,10 +19,8 @@ Route111_OldLadysRestStop_EventScript_Rest:: closemessage call Common_EventScript_OutOfCenterPartyHeal msgbox Route111_OldLadysRestStop_Text_StillTiredTakeAnotherRest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route111_OldLadysRestStop_EventScript_Rest - compare VAR_RESULT, NO - goto_if_eq Route111_OldLadysRestStop_EventScript_DeclineRest + goto_if_eq VAR_RESULT, YES, Route111_OldLadysRestStop_EventScript_Rest + goto_if_eq VAR_RESULT, NO, Route111_OldLadysRestStop_EventScript_DeclineRest end Route111_OldLadysRestStop_EventScript_DeclineRest:: diff --git a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc index eedd83f068..a163c7b4f2 100644 --- a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc +++ b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc @@ -21,8 +21,7 @@ Route111_WinstrateFamilysHouse_EventScript_Victoria:: goto_if_set FLAG_RECEIVED_MACHO_BRACE, Route111_WinstrateFamilysHouse_EventScript_ReceivedMachoBrace msgbox Route111_WinstrateFamilysHouse_Text_LikeYouToHaveMachoBrace, MSGBOX_DEFAULT giveitem ITEM_MACHO_BRACE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_MACHO_BRACE goto Route111_WinstrateFamilysHouse_EventScript_FaceOriginalDirection end diff --git a/data/maps/Route112/scripts.inc b/data/maps/Route112/scripts.inc index abea230be1..a6c248e1f6 100644 --- a/data/maps/Route112/scripts.inc +++ b/data/maps/Route112/scripts.inc @@ -71,8 +71,7 @@ Route112_EventScript_Brice:: Route112_EventScript_Trent:: trainerbattle_single TRAINER_TRENT_1, Route112_Text_TrentIntro, Route112_Text_TrentDefeat, Route112_EventScript_RegisterTrent specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route112_EventScript_RematchTrent + goto_if_eq VAR_RESULT, TRUE, Route112_EventScript_RematchTrent msgbox Route112_Text_TrentPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc index 0fcbc0a34f..3ce4f62e2a 100644 --- a/data/maps/Route112_CableCarStation/scripts.inc +++ b/data/maps/Route112_CableCarStation/scripts.inc @@ -7,8 +7,7 @@ Route112_CableCarStation_MapScripts:: Route112_CableCarStation_OnTransition: setescapewarp MAP_ROUTE112, 28, 28 - compare VAR_CABLE_CAR_STATION_STATE, 2 - call_if_eq Route112_CableCarStation_EventScript_MoveAttendantAside + call_if_eq VAR_CABLE_CAR_STATION_STATE, 2, Route112_CableCarStation_EventScript_MoveAttendantAside end Route112_CableCarStation_EventScript_MoveAttendantAside:: @@ -35,10 +34,8 @@ Route112_CableCarStation_EventScript_Attendant:: lock faceplayer msgbox Route112_CableCarStation_Text_CableCarReadyGetOn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route112_CableCarStation_EventScript_RideCableCar - compare VAR_RESULT, NO - goto_if_eq Route112_CableCarStation_EventScript_DeclineRide + goto_if_eq VAR_RESULT, YES, Route112_CableCarStation_EventScript_RideCableCar + goto_if_eq VAR_RESULT, NO, Route112_CableCarStation_EventScript_DeclineRide end Route112_CableCarStation_EventScript_RideCableCar:: diff --git a/data/maps/Route113/scripts.inc b/data/maps/Route113/scripts.inc index 0a8bb092c3..4f02e74b64 100644 --- a/data/maps/Route113/scripts.inc +++ b/data/maps/Route113/scripts.inc @@ -14,10 +14,8 @@ Route113_OnTransition: Route113_EventScript_CheckSetAshWeather:: getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_0, 19 - goto_if_lt Route113_EventScript_DontSetAshWeather - compare VAR_TEMP_0, 84 - goto_if_gt Route113_EventScript_DontSetAshWeather + goto_if_lt VAR_TEMP_0, 19, Route113_EventScript_DontSetAshWeather + goto_if_gt VAR_TEMP_0, 84, Route113_EventScript_DontSetAshWeather setweather WEATHER_VOLCANIC_ASH return @@ -61,8 +59,7 @@ Route113_EventScript_Dillon:: Route113_EventScript_Madeline:: trainerbattle_single TRAINER_MADELINE_1, Route113_Text_MadelineIntro, Route113_Text_MadelineDefeat, Route113_EventScript_RegisterMadeline specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route113_EventScript_RematchMadeline + goto_if_eq VAR_RESULT, TRUE, Route113_EventScript_RematchMadeline msgbox Route113_Text_MadelinePostBattle, MSGBOX_DEFAULT release end @@ -83,8 +80,7 @@ Route113_EventScript_RematchMadeline:: Route113_EventScript_Lao:: trainerbattle_single TRAINER_LAO_1, Route113_Text_LaoIntro, Route113_Text_LaoDefeat, Route113_EventScript_RegisterLao specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route113_EventScript_RematchLao + goto_if_eq VAR_RESULT, TRUE, Route113_EventScript_RematchLao msgbox Route113_Text_LaoPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc index fd980bf843..41182b2ae5 100644 --- a/data/maps/Route113_GlassWorkshop/scripts.inc +++ b/data/maps/Route113_GlassWorkshop/scripts.inc @@ -13,8 +13,7 @@ Route113_GlassWorkshop_MapScripts:: Route113_GlassWorkshop_OnTransition: setflag FLAG_LANDMARK_GLASS_WORKSHOP - compare VAR_GLASS_WORKSHOP_STATE, 1 - call_if_eq Route113_GlassWorkshop_EventScript_ReenterWorkshopAfterSootSack + call_if_eq VAR_GLASS_WORKSHOP_STATE, 1, Route113_GlassWorkshop_EventScript_ReenterWorkshopAfterSootSack end Route113_GlassWorkshop_EventScript_ReenterWorkshopAfterSootSack:: @@ -24,12 +23,9 @@ Route113_GlassWorkshop_EventScript_ReenterWorkshopAfterSootSack:: Route113_GlassWorkshop_EventScript_GlassWorker:: lock faceplayer - compare VAR_GLASS_WORKSHOP_STATE, 10 - goto_if_ge Route113_GlassWorkshop_EventScript_GiveItemAfterNoRoom - compare VAR_GLASS_WORKSHOP_STATE, 2 - goto_if_eq Route113_GlassWorkshop_EventScript_CheckCollectedAsh - compare VAR_GLASS_WORKSHOP_STATE, 1 - goto_if_eq Route113_GlassWorkshop_EventScript_ExplainSootSack + goto_if_ge VAR_GLASS_WORKSHOP_STATE, 10, Route113_GlassWorkshop_EventScript_GiveItemAfterNoRoom + goto_if_eq VAR_GLASS_WORKSHOP_STATE, 2, Route113_GlassWorkshop_EventScript_CheckCollectedAsh + goto_if_eq VAR_GLASS_WORKSHOP_STATE, 1, Route113_GlassWorkshop_EventScript_ExplainSootSack msgbox Route113_GlassWorkshop_Text_GoCollectAshWithThis, MSGBOX_DEFAULT giveitem ITEM_SOOT_SACK setvar VAR_GLASS_WORKSHOP_STATE, 1 @@ -44,11 +40,9 @@ Route113_GlassWorkshop_EventScript_ExplainSootSack:: Route113_GlassWorkshop_EventScript_CheckCollectedAsh:: checkitem ITEM_SOOT_SACK - compare VAR_RESULT, FALSE - goto_if_eq Route113_GlassWorkshop_EventScript_SootSackNotInBag + goto_if_eq VAR_RESULT, FALSE, Route113_GlassWorkshop_EventScript_SootSackNotInBag msgbox Route113_GlassWorkshop_Text_LetsSeeCollectedAshes, MSGBOX_DEFAULT - compare VAR_ASH_GATHER_COUNT, LOWEST_ASH_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAsh + goto_if_lt VAR_ASH_GATHER_COUNT, LOWEST_ASH_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAsh message Route113_GlassWorkshop_Text_WhichGlassItemWoudYouLike waitmessage goto Route113_GlassWorkshop_EventScript_ChooseGlassItem @@ -80,11 +74,9 @@ Route113_GlassWorkshop_EventScript_BlueFlute:: setvar VAR_0x8008, ITEM_BLUE_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, BLUE_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, BLUE_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, BLUE_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 10 subvar VAR_ASH_GATHER_COUNT, BLUE_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -94,11 +86,9 @@ Route113_GlassWorkshop_EventScript_YellowFlute:: setvar VAR_0x8008, ITEM_YELLOW_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, YELLOW_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, YELLOW_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, YELLOW_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 11 subvar VAR_ASH_GATHER_COUNT, YELLOW_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -108,11 +98,9 @@ Route113_GlassWorkshop_EventScript_RedFlute:: setvar VAR_0x8008, ITEM_RED_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, RED_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, RED_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, RED_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 12 subvar VAR_ASH_GATHER_COUNT, RED_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -122,11 +110,9 @@ Route113_GlassWorkshop_EventScript_WhiteFlute:: setvar VAR_0x8008, ITEM_WHITE_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, WHITE_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, WHITE_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, WHITE_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 13 subvar VAR_ASH_GATHER_COUNT, WHITE_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -136,11 +122,9 @@ Route113_GlassWorkshop_EventScript_BlackFlute:: setvar VAR_0x8008, ITEM_BLACK_FLUTE bufferitemname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, BLACK_FLUTE_PRICE - compare VAR_ASH_GATHER_COUNT, BLACK_FLUTE_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, BLACK_FLUTE_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 14 subvar VAR_ASH_GATHER_COUNT, BLACK_FLUTE_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -151,11 +135,9 @@ Route113_GlassWorkshop_EventScript_PrettyChair:: setvar VAR_0x8008, DECOR_PRETTY_CHAIR bufferdecorationname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, PRETTY_CHAIR_PRICE - compare VAR_ASH_GATHER_COUNT, PRETTY_CHAIR_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, PRETTY_CHAIR_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 15 subvar VAR_ASH_GATHER_COUNT, PRETTY_CHAIR_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -166,11 +148,9 @@ Route113_GlassWorkshop_EventScript_PrettyDesk:: setvar VAR_0x8008, DECOR_PRETTY_DESK bufferdecorationname STR_VAR_1, VAR_0x8008 setvar VAR_0x800A, PRETTY_DESK_PRICE - compare VAR_ASH_GATHER_COUNT, PRETTY_DESK_PRICE - goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem + goto_if_lt VAR_ASH_GATHER_COUNT, PRETTY_DESK_PRICE, Route113_GlassWorkshop_EventScript_NotEnoughAshForItem msgbox Route113_GlassWorkshop_Text_IsThatTheItemForYou, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route113_GlassWorkshop_EventScript_ChooseDifferentItem + goto_if_eq VAR_RESULT, NO, Route113_GlassWorkshop_EventScript_ChooseDifferentItem setvar VAR_GLASS_WORKSHOP_STATE, 16 subvar VAR_ASH_GATHER_COUNT, PRETTY_DESK_PRICE goto Route113_GlassWorkshop_EventScript_MakeGlassItem @@ -211,24 +191,20 @@ Route113_GlassWorkshop_EventScript_MakeGlassItem:: delay 30 fadescreen FADE_FROM_BLACK msgbox Route113_GlassWorkshop_Text_IveFinishedGlassItem, MSGBOX_DEFAULT - compare VAR_0x8009, 0 - call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassFlute - compare VAR_0x8009, 1 - call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassDecor + call_if_eq VAR_0x8009, 0, Route113_GlassWorkshop_EventScript_GiveGlassFlute + call_if_eq VAR_0x8009, 1, Route113_GlassWorkshop_EventScript_GiveGlassDecor setvar VAR_GLASS_WORKSHOP_STATE, 2 release end Route113_GlassWorkshop_EventScript_GiveGlassFlute:: giveitem VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq Route113_GlassWorkshop_EventScript_NoRoomForFlute + goto_if_eq VAR_RESULT, FALSE, Route113_GlassWorkshop_EventScript_NoRoomForFlute return Route113_GlassWorkshop_EventScript_GiveGlassDecor:: givedecoration VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq Route113_GlassWorkshop_EventScript_NoRoomForDecor + goto_if_eq VAR_RESULT, FALSE, Route113_GlassWorkshop_EventScript_NoRoomForDecor return Route113_GlassWorkshop_EventScript_NoRoomForFlute:: @@ -305,10 +281,8 @@ Route113_GlassWorkshop_EventScript_GivePrettyDesk:: Route113_GlassWorkshop_EventScript_TryGiveItemAgain:: msgbox Route113_GlassWorkshop_Text_IveFinishedGlassItem, MSGBOX_DEFAULT - compare VAR_0x8009, 0 - call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassFlute - compare VAR_0x8009, 1 - call_if_eq Route113_GlassWorkshop_EventScript_GiveGlassDecor + call_if_eq VAR_0x8009, 0, Route113_GlassWorkshop_EventScript_GiveGlassFlute + call_if_eq VAR_0x8009, 1, Route113_GlassWorkshop_EventScript_GiveGlassDecor setvar VAR_GLASS_WORKSHOP_STATE, 2 release end diff --git a/data/maps/Route114/scripts.inc b/data/maps/Route114/scripts.inc index c0420fbf61..abf70ea081 100644 --- a/data/maps/Route114/scripts.inc +++ b/data/maps/Route114/scripts.inc @@ -5,19 +5,14 @@ Route114_MapScripts:: .byte 0 Route114_OnTransition: - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH - call_if_eq AbnormalWeather_StartGroudonWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH - call_if_eq AbnormalWeather_StartGroudonWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH, AbnormalWeather_StartGroudonWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH, AbnormalWeather_StartGroudonWeather end Route114_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute114North - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute114South + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute114North + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute114South end Route114_OnFrame: @@ -34,8 +29,7 @@ Route114_EventScript_Man:: addvar VAR_RESULT, NUM_ROUTE_114_MAN_BERRIES_SKIPPED addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_ROUTE_114_RECEIVED_BERRY msgbox Route114_Text_TryBerryCrushWithFriends, MSGBOX_DEFAULT release @@ -52,8 +46,7 @@ Route114_EventScript_RoarGentleman:: goto_if_set FLAG_RECEIVED_TM05, Route114_EventScript_ReceivedRoar msgbox Route114_Text_AllMyMonDoesIsRoarTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM05 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM05 msgbox Route114_Text_ExplainRoar, MSGBOX_DEFAULT release @@ -109,8 +102,7 @@ Route114_EventScript_Nancy:: Route114_EventScript_Steve:: trainerbattle_single TRAINER_STEVE_1, Route114_Text_SteveIntro, Route114_Text_SteveDefeat, Route114_EventScript_RegisterSteve specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route114_EventScript_RematchSteve + goto_if_eq VAR_RESULT, TRUE, Route114_EventScript_RematchSteve msgbox Route114_Text_StevePostBattle, MSGBOX_DEFAULT release end @@ -131,8 +123,7 @@ Route114_EventScript_RematchSteve:: Route114_EventScript_Bernie:: trainerbattle_single TRAINER_BERNIE_1, Route114_Text_BernieIntro, Route114_Text_BernieDefeat, Route114_EventScript_RegisterBernie specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route114_EventScript_RematchBernie + goto_if_eq VAR_RESULT, TRUE, Route114_EventScript_RematchBernie msgbox Route114_Text_BerniePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route114_FossilManiacsHouse/scripts.inc b/data/maps/Route114_FossilManiacsHouse/scripts.inc index f291cd5ee4..ba3c0c60e5 100644 --- a/data/maps/Route114_FossilManiacsHouse/scripts.inc +++ b/data/maps/Route114_FossilManiacsHouse/scripts.inc @@ -12,8 +12,7 @@ Route114_FossilManiacsHouse_EventScript_FossilManiacsBrother:: goto_if_set FLAG_RECEIVED_TM28, Route114_FossilManiacsHouse_EventScript_ReceivedDig msgbox Route114_FossilManiacsHouse_Text_HaveThisToDigLikeMyBrother, MSGBOX_DEFAULT giveitem ITEM_TM28 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM28 release end diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc index 500e12beed..72138bbe40 100644 --- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc +++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc @@ -38,11 +38,9 @@ Route114_FossilManiacsTunnel_EventScript_FossilManiac:: faceplayer goto_if_set FLAG_RECEIVED_REVIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_PlayerRevivedFossil checkitem ITEM_ROOT_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil + goto_if_eq VAR_RESULT, TRUE, Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil checkitem ITEM_CLAW_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil + goto_if_eq VAR_RESULT, TRUE, Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil msgbox Route114_FossilManiacsTunnel_Text_LookInDesertForFossils, MSGBOX_DEFAULT release end diff --git a/data/maps/Route114_LanettesHouse/scripts.inc b/data/maps/Route114_LanettesHouse/scripts.inc index 5a7ccb3415..9143b27954 100644 --- a/data/maps/Route114_LanettesHouse/scripts.inc +++ b/data/maps/Route114_LanettesHouse/scripts.inc @@ -13,8 +13,7 @@ Route114_LanettesHouse_EventScript_Lanette:: setflag FLAG_SYS_PC_LANETTE msgbox Route114_LanettesHouse_Text_EverythingClutteredKeepThis, MSGBOX_DEFAULT givedecoration DECOR_LOTAD_DOLL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowNoRoomForDecor + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowNoRoomForDecor setflag FLAG_RECEIVED_DOLL_LANETTE release end @@ -27,16 +26,14 @@ Route114_LanettesHouse_EventScript_OfferAdvice:: Route114_LanettesHouse_EventScript_Notebook:: lockall msgbox Route114_LanettesHouse_Text_ResearchNotesPage1, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route114_LanettesHouse_EventScript_NotebookPage2 + goto_if_eq VAR_RESULT, YES, Route114_LanettesHouse_EventScript_NotebookPage2 msgbox Route114_LanettesHouse_Text_ClosedTheNotebook, MSGBOX_DEFAULT releaseall end Route114_LanettesHouse_EventScript_NotebookPage2:: msgbox Route114_LanettesHouse_Text_ResearchNotesPage2, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq Route114_LanettesHouse_EventScript_NotebookPage3 + call_if_eq VAR_RESULT, YES, Route114_LanettesHouse_EventScript_NotebookPage3 releaseall end diff --git a/data/maps/Route115/scripts.inc b/data/maps/Route115/scripts.inc index 600e6751f2..e00fdb27dc 100644 --- a/data/maps/Route115/scripts.inc +++ b/data/maps/Route115/scripts.inc @@ -5,19 +5,14 @@ Route115_MapScripts:: .byte 0 Route115_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_WEST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute115West - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_EAST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute115East + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_WEST, AbnormalWeather_EventScript_PlaceTilesRoute115West + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_EAST, AbnormalWeather_EventScript_PlaceTilesRoute115East end Route115_OnTransition: - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_WEST - call_if_eq AbnormalWeather_StartGroudonWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_EAST - call_if_eq AbnormalWeather_StartGroudonWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_WEST, AbnormalWeather_StartGroudonWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_115_EAST, AbnormalWeather_StartGroudonWeather end Route115_OnFrame: @@ -39,8 +34,7 @@ Route115_EventScript_MeteorFallsSign:: Route115_EventScript_Timothy:: trainerbattle_single TRAINER_TIMOTHY_1, Route115_Text_TimothyIntro, Route115_Text_TimothyDefeat, Route115_EventScript_RegisterTimothy specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route115_EventScript_RematchTimothy + goto_if_eq VAR_RESULT, TRUE, Route115_EventScript_RematchTimothy msgbox Route115_Text_TimothyPostBattle, MSGBOX_DEFAULT release end @@ -66,8 +60,7 @@ Route115_EventScript_Koichi:: Route115_EventScript_Nob:: trainerbattle_single TRAINER_NOB_1, Route115_Text_NobIntro, Route115_Text_NobDefeat, Route115_EventScript_RegisterNob specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route115_EventScript_RematchNob + goto_if_eq VAR_RESULT, TRUE, Route115_EventScript_RematchNob msgbox Route115_Text_NobPostBattle, MSGBOX_DEFAULT release end @@ -88,8 +81,7 @@ Route115_EventScript_RematchNob:: Route115_EventScript_Cyndy:: trainerbattle_single TRAINER_CYNDY_1, Route115_Text_CyndyIntro, Route115_Text_CyndyDefeat, Route115_EventScript_RegisterCyndy specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route115_EventScript_RematchCyndy + goto_if_eq VAR_RESULT, TRUE, Route115_EventScript_RematchCyndy msgbox Route115_Text_CyndyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc index 7657e2061e..2a464d1996 100644 --- a/data/maps/Route116/scripts.inc +++ b/data/maps/Route116/scripts.inc @@ -9,12 +9,9 @@ Route116_MapScripts:: Route116_OnTransition: call_if_set FLAG_RECOVERED_DEVON_GOODS, Route116_EventScript_SetWandasBoyfriendPos - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_NORTH - call_if_eq AbnormalWeather_StartGroudonWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_SOUTH - call_if_eq AbnormalWeather_StartGroudonWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_NORTH, AbnormalWeather_StartGroudonWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_SOUTH, AbnormalWeather_StartGroudonWeather end Route116_EventScript_SetWandasBoyfriendPos:: @@ -22,10 +19,8 @@ Route116_EventScript_SetWandasBoyfriendPos:: return Route116_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_NORTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute116North - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_SOUTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute116South + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute116North + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_116_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute116South end Route116_OnFrame: @@ -62,18 +57,13 @@ Route116_EventScript_DevonEmployee:: Route116_EventScript_GiveRepeatBall:: setflag FLAG_MET_DEVON_EMPLOYEE giveitem ITEM_REPEAT_BALL - compare VAR_RESULT, FALSE - goto_if_eq Route116_EventScript_NoRoomForRepeatBall + goto_if_eq VAR_RESULT, FALSE, Route116_EventScript_NoRoomForRepeatBall msgbox Route116_Text_NewBallAvailableAtMart, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq Route116_EventScript_DevonEmployeeExit - compare VAR_FACING, DIR_SOUTH - call_if_eq Route116_EventScript_DevonEmployeeExit - compare VAR_FACING, DIR_WEST - call_if_eq Route116_EventScript_DevonEmployeeExit - compare VAR_FACING, DIR_EAST - call_if_eq Route116_EventScript_DevonEmployeeExitEast + call_if_eq VAR_FACING, DIR_NORTH, Route116_EventScript_DevonEmployeeExit + call_if_eq VAR_FACING, DIR_SOUTH, Route116_EventScript_DevonEmployeeExit + call_if_eq VAR_FACING, DIR_WEST, Route116_EventScript_DevonEmployeeExit + call_if_eq VAR_FACING, DIR_EAST, Route116_EventScript_DevonEmployeeExitEast removeobject VAR_LAST_TALKED clearflag FLAG_HIDE_RUSTBORO_CITY_DEVON_CORP_3F_EMPLOYEE setflag FLAG_RECEIVED_REPEAT_BALL @@ -166,11 +156,9 @@ Route116_EventScript_GlassesMan:: lock faceplayer checkitem ITEM_BLACK_GLASSES - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_PlayerHasGlasses + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_PlayerHasGlasses specialvar VAR_RESULT, FoundBlackGlasses - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_FoundGlassesNotOnPlayer + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_FoundGlassesNotOnPlayer msgbox Route116_Text_CanYouHelpMeFindGlasses, MSGBOX_DEFAULT release end @@ -185,8 +173,7 @@ Route116_EventScript_PlayerHasGlasses:: msgbox Route116_Text_CanYouHelpMeFindGlasses, MSGBOX_DEFAULT msgbox Route116_Text_MayISeeThoseGlasses, MSGBOX_DEFAULT specialvar VAR_RESULT, FoundBlackGlasses - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_FoundGlassesOnPlayer + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_FoundGlassesOnPlayer msgbox Route116_Text_NotWhatImLookingFor, MSGBOX_DEFAULT release end @@ -199,14 +186,10 @@ Route116_EventScript_FoundGlassesOnPlayer:: Route116_EventScript_GlassesManExit:: delay 20 - compare VAR_FACING, DIR_NORTH - call_if_eq Route116_EventScript_GlassesManExitNormal - compare VAR_FACING, DIR_SOUTH - call_if_eq Route116_EventScript_GlassesManExitNormal - compare VAR_FACING, DIR_WEST - call_if_eq Route116_EventScript_GlassesManExitNormal - compare VAR_FACING, DIR_EAST - call_if_eq Route116_EventScript_GlassesManExitEast + call_if_eq VAR_FACING, DIR_NORTH, Route116_EventScript_GlassesManExitNormal + call_if_eq VAR_FACING, DIR_SOUTH, Route116_EventScript_GlassesManExitNormal + call_if_eq VAR_FACING, DIR_WEST, Route116_EventScript_GlassesManExitNormal + call_if_eq VAR_FACING, DIR_EAST, Route116_EventScript_GlassesManExitEast removeobject VAR_LAST_TALKED release end @@ -259,12 +242,10 @@ Route116_EventScript_Jose:: Route116_EventScript_Jerry:: trainerbattle_single TRAINER_JERRY_1, Route116_Text_JerryIntro, Route116_Text_JerryDefeat, Route116_EventScript_TryRegisterJerryAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_RematchJerry + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_RematchJerry setvar VAR_0x8004, TRAINER_JERRY_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route116_EventScript_TryRegisterJerry + goto_if_eq VAR_RESULT, FALSE, Route116_EventScript_TryRegisterJerry msgbox Route116_Text_JerryPostBattle, MSGBOX_DEFAULT release end @@ -312,12 +293,10 @@ Route116_EventScript_Janice:: Route116_EventScript_Karen:: trainerbattle_single TRAINER_KAREN_1, Route116_Text_KarenIntro, Route116_Text_KarenDefeat, Route116_EventScript_TryRegisterKarenAfterBattle specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route116_EventScript_RematchKaren + goto_if_eq VAR_RESULT, TRUE, Route116_EventScript_RematchKaren setvar VAR_0x8004, TRAINER_KAREN_1 specialvar VAR_RESULT, IsTrainerRegistered - compare VAR_RESULT, FALSE - goto_if_eq Route116_EventScript_TryRegisterKaren + goto_if_eq VAR_RESULT, FALSE, Route116_EventScript_TryRegisterKaren msgbox Route116_Text_KarenPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route117/scripts.inc b/data/maps/Route117/scripts.inc index f6ab885917..37d589ce31 100644 --- a/data/maps/Route117/scripts.inc +++ b/data/maps/Route117/scripts.inc @@ -41,8 +41,7 @@ Route117_EventScript_DayCareSign:: Route117_EventScript_Isaac:: trainerbattle_single TRAINER_ISAAC_1, Route117_Text_IsaacIntro, Route117_Text_IsaacDefeat, Route117_EventScript_RegisterIsaac specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchIsaac + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchIsaac msgbox Route117_Text_IsaacPostBattle, MSGBOX_DEFAULT release end @@ -63,8 +62,7 @@ Route117_EventScript_RematchIsaac:: Route117_EventScript_Lydia:: trainerbattle_single TRAINER_LYDIA_1, Route117_Text_LydiaIntro, Route117_Text_LydiaDefeat, Route117_EventScript_RegisterLydia specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchLydia + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchLydia msgbox Route117_Text_LydiaPostBattle, MSGBOX_DEFAULT release end @@ -85,8 +83,7 @@ Route117_EventScript_RematchLydia:: Route117_EventScript_Dylan:: trainerbattle_single TRAINER_DYLAN_1, Route117_Text_DylanIntro, Route117_Text_DylanDefeat, Route117_EventScript_RegisterDylan specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchDylan + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchDylan msgbox Route117_Text_DylanPostBattle, MSGBOX_DEFAULT release end @@ -107,8 +104,7 @@ Route117_EventScript_RematchDylan:: Route117_EventScript_Maria:: trainerbattle_single TRAINER_MARIA_1, Route117_Text_MariaIntro, Route117_Text_MariaDefeat, Route117_EventScript_RegisterMaria specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchMaria + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchMaria msgbox Route117_Text_MariaPostBattle, MSGBOX_DEFAULT release end @@ -134,8 +130,7 @@ Route117_EventScript_Derek:: Route117_EventScript_Anna:: trainerbattle_double TRAINER_ANNA_AND_MEG_1, Route117_Text_AnnaIntro, Route117_Text_AnnaDefeat, Route117_Text_AnnaNotEnoughMons, Route117_EventScript_RegisterAnna specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchAnna + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchAnna msgbox Route117_Text_AnnaPostBattle, MSGBOX_DEFAULT release end @@ -154,8 +149,7 @@ Route117_EventScript_RematchAnna:: Route117_EventScript_Meg:: trainerbattle_double TRAINER_ANNA_AND_MEG_1, Route117_Text_MegIntro, Route117_Text_MegDefeat, Route117_Text_MegNotEnoughMons, Route117_EventScript_RegisterMeg specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route117_EventScript_RematchMeg + goto_if_eq VAR_RESULT, TRUE, Route117_EventScript_RematchMeg msgbox Route117_Text_MegPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc index 5b68804b5b..92dd8847d4 100644 --- a/data/maps/Route118/scripts.inc +++ b/data/maps/Route118/scripts.inc @@ -8,19 +8,14 @@ Route118_MapScripts:: Route118_OnTransition: call GabbyAndTy_EventScript_UpdateLocation - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_EAST - call_if_eq AbnormalWeather_StartGroudonWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_WEST - call_if_eq AbnormalWeather_StartGroudonWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_EAST, AbnormalWeather_StartGroudonWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_WEST, AbnormalWeather_StartGroudonWeather end Route118_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_EAST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute118East - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_WEST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute118West + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_EAST, AbnormalWeather_EventScript_PlaceTilesRoute118East + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_118_WEST, AbnormalWeather_EventScript_PlaceTilesRoute118West end Route118_OnFrame: @@ -32,10 +27,8 @@ Route118_EventScript_GoodRodFisherman:: faceplayer goto_if_set FLAG_RECEIVED_GOOD_ROD, Route118_EventScript_ReceivedGoodRod msgbox Route118_Text_YouAgreeGoodRodIsGood, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route118_EventScript_ReceiveGoodRod - compare VAR_RESULT, NO - goto_if_eq Route118_EventScript_DeclineGoodRod + goto_if_eq VAR_RESULT, YES, Route118_EventScript_ReceiveGoodRod + goto_if_eq VAR_RESULT, NO, Route118_EventScript_DeclineGoodRod end Route118_EventScript_ReceiveGoodRod:: @@ -103,12 +96,9 @@ Route118_EventScript_StevenTrigger:: delay 30 msgbox Route118_Text_StevenQuestions, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, 0 - call_if_eq Route118_EventScript_StevenExit0 - compare VAR_0x8008, 1 - call_if_eq Route118_EventScript_StevenExit1 - compare VAR_0x8008, 2 - call_if_eq Route118_EventScript_StevenExit2 + call_if_eq VAR_0x8008, 0, Route118_EventScript_StevenExit0 + call_if_eq VAR_0x8008, 1, Route118_EventScript_StevenExit1 + call_if_eq VAR_0x8008, 2, Route118_EventScript_StevenExit2 setvar VAR_ROUTE118_STATE, 1 removeobject LOCALID_STEVEN releaseall @@ -190,8 +180,7 @@ Route118_Movement_StevenExit2: Route118_EventScript_Rose:: trainerbattle_single TRAINER_ROSE_1, Route118_Text_RoseIntro, Route118_Text_RoseDefeat, Route118_EventScript_RegisterRose specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route118_EventScript_RematchRose + goto_if_eq VAR_RESULT, TRUE, Route118_EventScript_RematchRose msgbox Route118_Text_RosePostBattle, MSGBOX_DEFAULT release end @@ -222,8 +211,7 @@ Route118_EventScript_Wade:: Route118_EventScript_Dalton:: trainerbattle_single TRAINER_DALTON_1, Route118_Text_DaltonIntro, Route118_Text_DaltonDefeat, Route118_EventScript_RegisterDalton specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route118_EventScript_RematchDalton + goto_if_eq VAR_RESULT, TRUE, Route118_EventScript_RematchDalton msgbox Route118_Text_DaltonPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc index 839f4101ba..94094206c7 100644 --- a/data/maps/Route119/scripts.inc +++ b/data/maps/Route119/scripts.inc @@ -13,16 +13,14 @@ Route119_OnResume: Route119_EventScript_TryRemoveKecleon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return Route119_OnTransition: call Common_EventScript_SetupRivalGfxId call Common_EventScript_SetupRivalOnBikeGfxId - compare VAR_WEATHER_INSTITUTE_STATE, 1 - call_if_eq Route119_EventScript_MoveInstituteWorkersDownstairs + call_if_eq VAR_WEATHER_INSTITUTE_STATE, 1, Route119_EventScript_MoveInstituteWorkersDownstairs special SetRoute119Weather end @@ -46,30 +44,22 @@ Route119_EventScript_RivalEncounter:: lockall addobject LOCALID_RIVAL_ON_BIKE checkplayergender - compare VAR_RESULT, MALE - call_if_eq Route119_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - call_if_eq Route119_EventScript_PlayBrendanMusic + call_if_eq VAR_RESULT, MALE, Route119_EventScript_PlayMayMusic + call_if_eq VAR_RESULT, FEMALE, Route119_EventScript_PlayBrendanMusic delay 65 - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_RivalEnter1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_RivalEnter2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_RivalEnter1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_RivalEnter2 applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown waitmovement 0 delay 30 - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_SetRivalPos1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_SetRivalPos2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetRivalPos1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetRivalPos2 removeobject LOCALID_RIVAL_ON_BIKE addobject LOCALID_RIVAL delay 30 checkplayergender - compare VAR_RESULT, MALE - goto_if_eq Route119_EventScript_BattleMay - compare VAR_RESULT, FEMALE - goto_if_eq Route119_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, MALE, Route119_EventScript_BattleMay + goto_if_eq VAR_RESULT, FEMALE, Route119_EventScript_BattleBrendan releaseall end @@ -148,36 +138,28 @@ Route119_EventScript_GiveFlyHM:: Route119_EventScript_RivalExitScottArrive:: closemessage - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_SetRivalPos1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_SetRivalPos2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetRivalPos1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetRivalPos2 removeobject LOCALID_RIVAL addobject LOCALID_RIVAL_ON_BIKE delay 30 - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_RivalExit1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_RivalExit2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_RivalExit1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_RivalExit2 removeobject LOCALID_RIVAL_ON_BIKE setvar VAR_ROUTE119_STATE, 1 savebgm MUS_DUMMY fadedefaultbgm delay 60 - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_SetScottPos1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_SetScottPos2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_SetScottPos1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_SetScottPos2 addobject LOCALID_SCOTT applymovement LOCALID_SCOTT, Route119_Movement_ScottEnter waitmovement 0 addvar VAR_SCOTT_STATE, 1 msgbox Route119_Text_ScottWayToGoBeSeeingYou, MSGBOX_DEFAULT closemessage - compare VAR_TEMP_1, 1 - call_if_eq Route119_EventScript_ScottExit1 - compare VAR_TEMP_1, 2 - call_if_eq Route119_EventScript_ScottExit2 + call_if_eq VAR_TEMP_1, 1, Route119_EventScript_ScottExit1 + call_if_eq VAR_TEMP_1, 2, Route119_EventScript_ScottExit2 removeobject LOCALID_SCOTT releaseall end @@ -372,8 +354,7 @@ Route119_EventScript_Kent:: Route119_EventScript_Jackson:: trainerbattle_single TRAINER_JACKSON_1, Route119_Text_JacksonIntro, Route119_Text_JacksonDefeat, Route119_EventScript_RegisterJackson specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route119_EventScript_RematchJackson + goto_if_eq VAR_RESULT, TRUE, Route119_EventScript_RematchJackson msgbox Route119_Text_JacksonPostBattle, MSGBOX_DEFAULT release end @@ -394,8 +375,7 @@ Route119_EventScript_RematchJackson:: Route119_EventScript_Catherine:: trainerbattle_single TRAINER_CATHERINE_1, Route119_Text_CatherineIntro, Route119_Text_CatherineDefeat, Route119_EventScript_RegisterCatherine specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route119_EventScript_RematchCatherine + goto_if_eq VAR_RESULT, TRUE, Route119_EventScript_RematchCatherine msgbox Route119_Text_CatherinePostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route119_WeatherInstitute_1F/scripts.inc b/data/maps/Route119_WeatherInstitute_1F/scripts.inc index 33ba0b025d..cce41bfb5f 100644 --- a/data/maps/Route119_WeatherInstitute_1F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_1F/scripts.inc @@ -5,8 +5,7 @@ Route119_WeatherInstitute_1F_MapScripts:: .byte 0 Route119_WeatherInstitute_1F_OnTransition: - compare VAR_WEATHER_INSTITUTE_STATE, 0 - call_if_eq Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos + call_if_eq VAR_WEATHER_INSTITUTE_STATE, 0, Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos end Route119_WeatherInstitute_1F_EventScript_SetLittleBoyPos:: @@ -18,8 +17,7 @@ Route119_WeatherInstitute_1F_EventScript_LittleBoy:: lock faceplayer special GetPlayerBigGuyGirlString - compare VAR_WEATHER_INSTITUTE_STATE, 0 - goto_if_eq Route119_WeatherInstitute_1F_EventScript_LittleBoyTeamAquaHere + goto_if_eq VAR_WEATHER_INSTITUTE_STATE, 0, Route119_WeatherInstitute_1F_EventScript_LittleBoyTeamAquaHere msgbox Route119_WeatherInstitute_1F_Text_WowYoureStrong, MSGBOX_DEFAULT release end @@ -36,8 +34,7 @@ Route119_WeatherInstitute_1F_EventScript_InstituteWorker1:: setvar VAR_0x8004, 0 call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_1F_EventScript_LegendaryDefeated call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_1F_EventScript_LegendaryDefeated - compare VAR_0x8004, 2 @ Both defeated - goto_if_eq Route119_WeatherInstitute_1F_EventScript_StudyingRain + goto_if_eq VAR_0x8004, 2, Route119_WeatherInstitute_1F_EventScript_StudyingRain @ Both defeated msgbox Route119_WeatherInstitute_1F_Text_NoticingAbnormalWeather, MSGBOX_DEFAULT release end diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 3a2957d5ee..0b2227e8ba 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -10,10 +10,8 @@ Route119_WeatherInstitute_2F_MapScripts:: .byte 0 Route119_WeatherInstitute_2F_OnTransition: - compare VAR_WEATHER_INSTITUTE_STATE, 0 - call_if_eq Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere - compare VAR_WEATHER_INSTITUTE_STATE, 1 - call_if_eq Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone + call_if_eq VAR_WEATHER_INSTITUTE_STATE, 0, Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere + call_if_eq VAR_WEATHER_INSTITUTE_STATE, 1, Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone call_if_set FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_2F_EventScript_SetScientistPosGameClear end @@ -92,18 +90,15 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastform:: msgbox Route119_WeatherInstitute_2F_Text_ThanksPleaseTakePokemon, MSGBOX_DEFAULT setvar VAR_TEMP_1, SPECIES_CASTFORM givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER - compare VAR_RESULT, 0 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty - compare VAR_RESULT, 1 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC + goto_if_eq VAR_RESULT, 0, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty + goto_if_eq VAR_RESULT, 1, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC goto Common_EventScript_NoMoreRoomForPokemon end Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty:: call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route119_WeatherInstitute_2F_EventScript_ExplainCastform + goto_if_eq VAR_RESULT, NO, Route119_WeatherInstitute_2F_EventScript_ExplainCastform call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto Route119_WeatherInstitute_2F_EventScript_ExplainCastform @@ -112,8 +107,7 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty:: Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC:: call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route119_WeatherInstitute_2F_EventScript_SendCastformToPC + goto_if_eq VAR_RESULT, NO, Route119_WeatherInstitute_2F_EventScript_SendCastformToPC call Common_EventScript_NameReceivedBoxMon goto Route119_WeatherInstitute_2F_EventScript_SendCastformToPC end @@ -147,12 +141,10 @@ Route119_WeatherInstitute_2F_EventScript_TryStartAbnormalWeather:: setvar VAR_0x8004, 0 call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated - compare VAR_0x8004, 2 @ Both defeated - goto_if_eq Route119_WeatherInstitute_2F_EventScript_NoAbnormalWeather + goto_if_eq VAR_0x8004, 2, Route119_WeatherInstitute_2F_EventScript_NoAbnormalWeather @ Both defeated call_if_unset FLAG_TEMP_2, Route119_WeatherInstitute_2F_EventScript_CreateAbnormalWeather specialvar VAR_RESULT, GetAbnormalWeatherMapNameAndType - compare VAR_RESULT, 1 - goto_if_eq Route119_WeatherInstitute_2F_EventScript_KyogreWeather + goto_if_eq VAR_RESULT, 1, Route119_WeatherInstitute_2F_EventScript_KyogreWeather msgbox Route119_WeatherInstitute_2F_Text_GroudonWeather, MSGBOX_DEFAULT release end diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index e286375921..baf721a5ca 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -13,32 +13,24 @@ Route120_OnResume: end Route120_EventScript_RemoveKecleonObject:: - compare VAR_0x8009, 0 - call_if_eq Route120_EventScript_RemoveBridgeKecleon - compare VAR_0x8009, 1 - call_if_eq Route120_EventScript_RemoveKecleon - compare VAR_0x8009, 2 - call_if_eq Route120_EventScript_RemoveKecleon - compare VAR_0x8009, 3 - call_if_eq Route120_EventScript_RemoveKecleon - compare VAR_0x8009, 4 - call_if_eq Route120_EventScript_RemoveKecleon - compare VAR_0x8009, 5 - call_if_eq Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 0, Route120_EventScript_RemoveBridgeKecleon + call_if_eq VAR_0x8009, 1, Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 2, Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 3, Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 4, Route120_EventScript_RemoveKecleon + call_if_eq VAR_0x8009, 5, Route120_EventScript_RemoveKecleon return Route120_EventScript_RemoveBridgeKecleon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_BRIDGE_KECLEON removeobject LOCALID_BRIDGE_KECLEON_SHADOW return Route120_EventScript_RemoveKecleon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return @@ -71,12 +63,9 @@ Route120_OnTransition: Route120_EventScript_SetWeather:: getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_TEMP_1, 14 - goto_if_le Route120_EventScript_SetSunnyWeather - compare VAR_TEMP_1, 60 - goto_if_le Route120_EventScript_TrySetRainyWeather - compare VAR_TEMP_1, 61 - goto_if_ge Route120_EventScript_SetCloudyWeather + goto_if_le VAR_TEMP_1, 14, Route120_EventScript_SetSunnyWeather + goto_if_le VAR_TEMP_1, 60, Route120_EventScript_TrySetRainyWeather + goto_if_ge VAR_TEMP_1, 61, Route120_EventScript_SetCloudyWeather return Route120_EventScript_SetCloudyWeather:: @@ -88,10 +77,8 @@ Route120_EventScript_SetSunnyWeather:: return Route120_EventScript_TrySetRainyWeather:: - compare VAR_TEMP_0, 7 - goto_if_le Route120_EventScript_SetRainyWeather - compare VAR_TEMP_0, 19 - goto_if_le Route120_EventScript_SetSunnyWeather + goto_if_le VAR_TEMP_0, 7, Route120_EventScript_SetRainyWeather + goto_if_le VAR_TEMP_0, 19, Route120_EventScript_SetSunnyWeather goto Route120_EventScript_SetRainyWeather end @@ -105,10 +92,8 @@ Route120_EventScript_BerryBeauty:: dotimebasedevents goto_if_set FLAG_DAILY_ROUTE_120_RECEIVED_BERRY, Route120_EventScript_ReceivedBerry msgbox Route120_Text_BerriesExpressionOfLoveIsntIt, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq Route120_EventScript_BerryLove - compare VAR_RESULT, NO - call_if_eq Route120_EventScript_BerryNotLove + call_if_eq VAR_RESULT, YES, Route120_EventScript_BerryLove + call_if_eq VAR_RESULT, NO, Route120_EventScript_BerryNotLove specialvar VAR_RESULT, GetPlayerTrainerIdOnesDigit switch VAR_RESULT case 0, Route120_EventScript_GiveFigyBerry @@ -150,8 +135,7 @@ Route120_EventScript_GiveIapapaBerry:: Route120_EventScript_GiveBerry:: giveitem VAR_0x8004 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_ROUTE_120_RECEIVED_BERRY msgbox Route120_Text_BerryIsRareRaiseItWithCare, MSGBOX_DEFAULT release @@ -175,8 +159,7 @@ Route120_EventScript_Steven:: faceplayer goto_if_set FLAG_NOT_READY_FOR_BATTLE_ROUTE_120, Route120_EventScript_StevenAskReadyForBattle msgbox Route120_Text_StevenGreeting, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route120_EventScript_StevenNotReady + goto_if_eq VAR_RESULT, NO, Route120_EventScript_StevenNotReady goto Route120_EventScript_StevenBattleKecleon end @@ -188,18 +171,15 @@ Route120_EventScript_StevenNotReady:: Route120_EventScript_StevenAskReadyForBattle:: msgbox Route120_Text_StevenReadyForBattle, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route120_EventScript_StevenNotReady + goto_if_eq VAR_RESULT, NO, Route120_EventScript_StevenNotReady goto Route120_EventScript_StevenBattleKecleon end Route120_EventScript_StevenBattleKecleon:: msgbox Route120_Text_StevenShowMeYourPower, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq Route120_EventScript_PlayerApproachKecleonNorth - compare VAR_FACING, DIR_WEST - call_if_eq Route120_EventScript_PlayerApproachKecleonWest + call_if_eq VAR_FACING, DIR_NORTH, Route120_EventScript_PlayerApproachKecleonNorth + call_if_eq VAR_FACING, DIR_WEST, Route120_EventScript_PlayerApproachKecleonWest applymovement LOCALID_STEVEN, Common_Movement_WalkInPlaceFasterLeft waitmovement 0 delay 20 @@ -219,12 +199,9 @@ Route120_EventScript_StevenBattleKecleon:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq Route120_EventScript_RemoveBridgeKecleonPostBattle - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq Route120_EventScript_RemoveBridgeKecleonPostBattle - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq Route120_EventScript_RemoveBridgeKecleonPostBattle + goto_if_eq VAR_RESULT, B_OUTCOME_WON, Route120_EventScript_RemoveBridgeKecleonPostBattle + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, Route120_EventScript_RemoveBridgeKecleonPostBattle + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, Route120_EventScript_RemoveBridgeKecleonPostBattle goto Route120_EventScript_StevenGiveDeconScope end @@ -296,8 +273,7 @@ Route120_EventScript_Colin:: Route120_EventScript_Robert:: trainerbattle_single TRAINER_ROBERT_1, Route120_Text_RobertIntro, Route120_Text_RobertDefeat, Route120_EventScript_RegisterRobert specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route120_EventScript_RematchRobert + goto_if_eq VAR_RESULT, TRUE, Route120_EventScript_RematchRobert msgbox Route120_Text_RobertPostBattle, MSGBOX_DEFAULT release end @@ -328,8 +304,7 @@ Route120_EventScript_Jenna:: Route120_EventScript_Jeffrey:: trainerbattle_single TRAINER_JEFFREY_1, Route120_Text_JeffreyIntro, Route120_Text_JeffreyDefeat, Route120_EventScript_RegisterJeffrey specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route120_EventScript_RematchJeffrey + goto_if_eq VAR_RESULT, TRUE, Route120_EventScript_RematchJeffrey msgbox Route120_Text_JeffreyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route121/scripts.inc b/data/maps/Route121/scripts.inc index 3bd0a42ee1..317328825c 100644 --- a/data/maps/Route121/scripts.inc +++ b/data/maps/Route121/scripts.inc @@ -77,8 +77,7 @@ Route121_EventScript_Vanessa:: Route121_EventScript_Walter:: trainerbattle_single TRAINER_WALTER_1, Route121_Text_WalterIntro, Route121_Text_WalterDefeat, Route121_EventScript_RegisterWalter specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route121_EventScript_RematchWalter + goto_if_eq VAR_RESULT, TRUE, Route121_EventScript_RematchWalter msgbox Route121_Text_WalterPostBattle, MSGBOX_DEFAULT release end @@ -114,8 +113,7 @@ Route121_EventScript_Joy:: Route121_EventScript_Jessica:: trainerbattle_single TRAINER_JESSICA_1, Route121_Text_JessicaIntro, Route121_Text_JessicaDefeat, Route121_EventScript_RegisterJessica specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route121_EventScript_RematchJessica + goto_if_eq VAR_RESULT, TRUE, Route121_EventScript_RematchJessica msgbox Route121_Text_JessicaPostBattle, MSGBOX_DEFAULT release end @@ -156,8 +154,7 @@ Route121_EventScript_Marcel:: Route121_EventScript_Cristin:: trainerbattle_single TRAINER_CRISTIN_1, Route121_Text_CristinIntro, Route121_Text_CristinDefeat, Route121_EventScript_RegisterCristin specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route121_EventScript_RematchCristin + goto_if_eq VAR_RESULT, TRUE, Route121_EventScript_RematchCristin msgbox Route121_Text_CristinPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc index 5050612f74..92fdc2d0bd 100644 --- a/data/maps/Route121_SafariZoneEntrance/scripts.inc +++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc @@ -33,8 +33,7 @@ Route121_SafariZoneEntrance_EventScript_InfoAttendant:: lock faceplayer msgbox Route121_SafariZoneEntrance_Text_WelcomeFirstTime, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route121_SafariZoneEntrance_EventScript_FirstTimeInfo + goto_if_eq VAR_RESULT, YES, Route121_SafariZoneEntrance_EventScript_FirstTimeInfo msgbox Route121_SafariZoneEntrance_Text_ComeInAndEnjoy, MSGBOX_DEFAULT release end @@ -50,20 +49,17 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger:: waitmovement 0 showmoneybox 0, 0 msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone + goto_if_eq VAR_RESULT, YES, Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone msgbox Route121_SafariZoneEntrance_Text_PlayAnotherTime, MSGBOX_DEFAULT goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter end Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, 0 - goto_if_eq Route121_SafariZoneEntrance_EventScript_NoPokeblockCase + goto_if_eq VAR_RESULT, 0, Route121_SafariZoneEntrance_EventScript_NoPokeblockCase call Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon checkmoney 500 - compare VAR_RESULT, 0 - goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, 0, Route121_SafariZoneEntrance_EventScript_NotEnoughMoney playse SE_SHOP msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT removemoney 500 @@ -86,11 +82,9 @@ Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone:: Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon:: getpartysize - compare VAR_RESULT, PARTY_SIZE - goto_if_ne Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon + goto_if_ne VAR_RESULT, PARTY_SIZE, Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon specialvar VAR_RESULT, ScriptCheckFreePokemonStorageSpace - compare VAR_RESULT, 1 - goto_if_eq Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon + goto_if_eq VAR_RESULT, 1, Route121_SafariZoneEntrance_EventScript_HasRoomForPokemon msgbox Route121_SafariZoneEntrance_Text_PCIsFull, MSGBOX_DEFAULT goto Route121_SafariZoneEntrance_EventScript_MovePlayerBackFromCounter end diff --git a/data/maps/Route123/scripts.inc b/data/maps/Route123/scripts.inc index 6ce0de6544..fe63661261 100644 --- a/data/maps/Route123/scripts.inc +++ b/data/maps/Route123/scripts.inc @@ -12,12 +12,10 @@ Route123_EventScript_GigaDrainGirl:: goto_if_set FLAG_RECEIVED_TM19, Route123_EventScript_ReceivedGigaDrain msgbox Route123_Text_LoveGrassMonsHaveAny, MSGBOX_DEFAULT special IsGrassTypeInParty - compare VAR_RESULT, FALSE - goto_if_eq Route123_EventScript_NoGrassMons + goto_if_eq VAR_RESULT, FALSE, Route123_EventScript_NoGrassMons msgbox Route123_Text_YouLikeGrassMonsTooHaveThis, MSGBOX_DEFAULT giveitem ITEM_TM19 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM19 msgbox Route123_Text_CheckTreesWithMyGrassMon, MSGBOX_DEFAULT release @@ -62,8 +60,7 @@ Route123_EventScript_Violet:: Route123_EventScript_Cameron:: trainerbattle_single TRAINER_CAMERON_1, Route123_Text_CameronIntro, Route123_Text_CameronDefeat, Route123_EventScript_RegisterCameron specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route123_EventScript_RematchCameron + goto_if_eq VAR_RESULT, TRUE, Route123_EventScript_RematchCameron msgbox Route123_Text_CameronPostBattle, MSGBOX_DEFAULT release end @@ -84,8 +81,7 @@ Route123_EventScript_RematchCameron:: Route123_EventScript_Jacki:: trainerbattle_single TRAINER_JACKI_1, Route123_Text_JackiIntro, Route123_Text_JackiDefeat, Route123_EventScript_RegisterJacki specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route123_EventScript_RematchJacki + goto_if_eq VAR_RESULT, TRUE, Route123_EventScript_RematchJacki msgbox Route123_Text_JackiPostBattle, MSGBOX_DEFAULT release end @@ -156,8 +152,7 @@ Route123_EventScript_Davis:: Route123_EventScript_Fernando:: trainerbattle_single TRAINER_FERNANDO_1, Route123_Text_FernandoIntro, Route123_Text_FernandoDefeat, Route123_EventScript_RegisterFernando specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route123_EventScript_RematchFernando + goto_if_eq VAR_RESULT, TRUE, Route123_EventScript_RematchFernando msgbox Route123_Text_FernandoPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route123_BerryMastersHouse/scripts.inc b/data/maps/Route123_BerryMastersHouse/scripts.inc index a9fbfd9d0a..bdc0b0456b 100644 --- a/data/maps/Route123_BerryMastersHouse/scripts.inc +++ b/data/maps/Route123_BerryMastersHouse/scripts.inc @@ -16,16 +16,14 @@ Route123_BerryMastersHouse_EventScript_BerryMaster:: addvar VAR_RESULT, NUM_BERRY_MASTER_BERRIES_SKIPPED addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_BERRY_MASTER_RECEIVED_BERRY msgbox Route123_BerryMastersHouse_Text_WhyBeStingyTakeAnother, MSGBOX_DEFAULT random NUM_BERRY_MASTER_BERRIES addvar VAR_RESULT, NUM_BERRY_MASTER_BERRIES_SKIPPED addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox Route123_BerryMastersHouse_Text_VisitPrettyPetalFlowerShop, MSGBOX_DEFAULT release end @@ -45,10 +43,8 @@ Route123_BerryMastersHouse_EventScript_BerryMastersWife:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, TRUE - goto_if_eq Route123_BerryMastersHouse_EventScript_GavePhrase - compare VAR_RESULT, FALSE - goto_if_eq Route123_BerryMastersHouse_EventScript_CancelPhrase + goto_if_eq VAR_RESULT, TRUE, Route123_BerryMastersHouse_EventScript_GavePhrase + goto_if_eq VAR_RESULT, FALSE, Route123_BerryMastersHouse_EventScript_CancelPhrase end Route123_BerryMastersHouse_EventScript_CancelPhrase:: @@ -58,18 +54,12 @@ Route123_BerryMastersHouse_EventScript_CancelPhrase:: end Route123_BerryMastersHouse_EventScript_GavePhrase:: - compare VAR_0x8004, NOT_SPECIAL_PHRASE - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveNormalBerry - compare VAR_0x8004, PHRASE_GREAT_BATTLE - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveSpelonBerry - compare VAR_0x8004, PHRASE_CHALLENGE_CONTEST - goto_if_eq Route123_BerryMastersHouse_EventScript_GivePamtreBerry - compare VAR_0x8004, PHRASE_OVERWHELMING_LATIAS - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveWatmelBerry - compare VAR_0x8004, PHRASE_COOL_LATIOS - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveDurinBerry - compare VAR_0x8004, PHRASE_SUPER_HUSTLE - goto_if_eq Route123_BerryMastersHouse_EventScript_GiveBelueBerry + goto_if_eq VAR_0x8004, NOT_SPECIAL_PHRASE, Route123_BerryMastersHouse_EventScript_GiveNormalBerry + goto_if_eq VAR_0x8004, PHRASE_GREAT_BATTLE, Route123_BerryMastersHouse_EventScript_GiveSpelonBerry + goto_if_eq VAR_0x8004, PHRASE_CHALLENGE_CONTEST, Route123_BerryMastersHouse_EventScript_GivePamtreBerry + goto_if_eq VAR_0x8004, PHRASE_OVERWHELMING_LATIAS, Route123_BerryMastersHouse_EventScript_GiveWatmelBerry + goto_if_eq VAR_0x8004, PHRASE_COOL_LATIOS, Route123_BerryMastersHouse_EventScript_GiveDurinBerry + goto_if_eq VAR_0x8004, PHRASE_SUPER_HUSTLE, Route123_BerryMastersHouse_EventScript_GiveBelueBerry end Route123_BerryMastersHouse_EventScript_GiveNormalBerry:: @@ -77,8 +67,7 @@ Route123_BerryMastersHouse_EventScript_GiveNormalBerry:: random NUM_BERRY_MASTER_WIFE_BERRIES addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull goto Route123_BerryMastersHouse_EventScript_GaveBerry release end @@ -87,8 +76,7 @@ Route123_BerryMastersHouse_EventScript_GiveSpelonBerry:: goto_if_set FLAG_RECEIVED_SPELON_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_SPELON_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SPELON_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end @@ -97,8 +85,7 @@ Route123_BerryMastersHouse_EventScript_GivePamtreBerry:: goto_if_set FLAG_RECEIVED_PAMTRE_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_PAMTRE_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_PAMTRE_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end @@ -107,8 +94,7 @@ Route123_BerryMastersHouse_EventScript_GiveWatmelBerry:: goto_if_set FLAG_RECEIVED_WATMEL_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_WATMEL_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_WATMEL_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end @@ -117,8 +103,7 @@ Route123_BerryMastersHouse_EventScript_GiveDurinBerry:: goto_if_set FLAG_RECEIVED_DURIN_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_DURIN_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_DURIN_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end @@ -127,8 +112,7 @@ Route123_BerryMastersHouse_EventScript_GiveBelueBerry:: goto_if_set FLAG_RECEIVED_BELUE_BERRY, Route123_BerryMastersHouse_EventScript_GiveNormalBerry msgbox Route123_BerryMastersHouse_Text_InspirationalTakeThis, MSGBOX_DEFAULT giveitem ITEM_BELUE_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_BELUE_BERRY goto Route123_BerryMastersHouse_EventScript_GaveBerry end diff --git a/data/maps/Route124/scripts.inc b/data/maps/Route124/scripts.inc index d1cd8ef8c2..108b915da2 100644 --- a/data/maps/Route124/scripts.inc +++ b/data/maps/Route124/scripts.inc @@ -23,8 +23,7 @@ Route124_EventScript_Roland:: Route124_EventScript_Jenny:: trainerbattle_single TRAINER_JENNY_1, Route124_Text_JennyIntro, Route124_Text_JennyDefeat, Route124_EventScript_RegisterJenny specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route124_EventScript_RematchJenny + goto_if_eq VAR_RESULT, TRUE, Route124_EventScript_RematchJenny msgbox Route124_Text_JennyPostBattle, MSGBOX_DEFAULT release end @@ -55,8 +54,7 @@ Route124_EventScript_Chad:: Route124_EventScript_Lila:: trainerbattle_double TRAINER_LILA_AND_ROY_1, Route124_Text_LilaIntro, Route124_Text_LilaDefeat, Route124_Text_LilaNotEnoughMons, Route124_EventScript_RegisterLila specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route124_EventScript_RematchLila + goto_if_eq VAR_RESULT, TRUE, Route124_EventScript_RematchLila msgbox Route124_Text_LilaPostBattle, MSGBOX_DEFAULT release end @@ -75,8 +73,7 @@ Route124_EventScript_RematchLila:: Route124_EventScript_Roy:: trainerbattle_double TRAINER_LILA_AND_ROY_1, Route124_Text_RoyIntro, Route124_Text_RoyDefeat, Route124_Text_RoyNotEnoughMons, Route124_EventScript_RegisterRoy specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route124_EventScript_RematchRoy + goto_if_eq VAR_RESULT, TRUE, Route124_EventScript_RematchRoy msgbox Route124_Text_RoyPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc index 06e16be353..b100438f55 100644 --- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc +++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc @@ -22,25 +22,20 @@ Route124_DivingTreasureHuntersHouse_EventScript_SkipGreeting:: Route124_DivingTreasureHuntersHouse_EventScript_CheckPlayerHasShard:: call Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards - compare VAR_TEMP_1, 0 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_NoShards + goto_if_eq VAR_TEMP_1, 0, Route124_DivingTreasureHuntersHouse_EventScript_NoShards goto Route124_DivingTreasureHuntersHouse_EventScript_HasShard end Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards:: setvar VAR_TEMP_1, 0 checkitem ITEM_RED_SHARD - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard checkitem ITEM_YELLOW_SHARD - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard checkitem ITEM_BLUE_SHARD - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard checkitem ITEM_GREEN_SHARD - compare VAR_RESULT, TRUE - call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard + call_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard return Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard:: @@ -246,14 +241,11 @@ Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard:: bufferitemname STR_VAR_1, VAR_0x8008 bufferitemname STR_VAR_2, VAR_0x8009 msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade checkitemspace VAR_0x8009 - compare VAR_RESULT, TRUE - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard + goto_if_eq VAR_RESULT, TRUE, Route124_DivingTreasureHuntersHouse_EventScript_TradeShard checkitem VAR_0x8008, 2 - compare VAR_RESULT, FALSE - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard + goto_if_eq VAR_RESULT, FALSE, Route124_DivingTreasureHuntersHouse_EventScript_TradeShard goto Route124_DivingTreasureHuntersHouse_EventScript_BagFull end @@ -262,11 +254,9 @@ Route124_DivingTreasureHuntersHouse_EventScript_TradeShard:: giveitem VAR_0x8009 msgbox Route124_DivingTreasureHuntersHouse_Text_ItsADeal, MSGBOX_DEFAULT call Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards - compare VAR_TEMP_1, 0 - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_EndTrade + goto_if_eq VAR_TEMP_1, 0, Route124_DivingTreasureHuntersHouse_EventScript_EndTrade msgbox Route124_DivingTreasureHuntersHouse_Text_TradeSomethingElse, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_ShowTradeOptions + goto_if_eq VAR_RESULT, YES, Route124_DivingTreasureHuntersHouse_EventScript_ShowTradeOptions goto Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade end diff --git a/data/maps/Route125/scripts.inc b/data/maps/Route125/scripts.inc index 7a2d3f15fa..cafdf8fbbf 100644 --- a/data/maps/Route125/scripts.inc +++ b/data/maps/Route125/scripts.inc @@ -6,19 +6,14 @@ Route125_MapScripts:: Route125_OnTransition: call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetAbnormalWeather - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_WEST - call_if_eq AbnormalWeather_StartKyogreWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_EAST - call_if_eq AbnormalWeather_StartKyogreWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_WEST, AbnormalWeather_StartKyogreWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_EAST, AbnormalWeather_StartKyogreWeather end Route125_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_WEST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute125West - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_EAST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute125East + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_WEST, AbnormalWeather_EventScript_PlaceTilesRoute125West + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_125_EAST, AbnormalWeather_EventScript_PlaceTilesRoute125East end Route125_OnFrame: @@ -48,8 +43,7 @@ Route125_EventScript_Sharon:: Route125_EventScript_Ernest:: trainerbattle_single TRAINER_ERNEST_1, Route125_Text_ErnestIntro, Route125_Text_ErnestDefeat, Route125_EventScript_RegisterErnest specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route125_EventScript_RematchErnest + goto_if_eq VAR_RESULT, TRUE, Route125_EventScript_RematchErnest msgbox Route125_Text_ErnestPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route126/scripts.inc b/data/maps/Route126/scripts.inc index 79f5bb11be..752cd2d4d5 100644 --- a/data/maps/Route126/scripts.inc +++ b/data/maps/Route126/scripts.inc @@ -44,8 +44,7 @@ Route126_EventScript_Sienna:: Route126_EventScript_Pablo:: trainerbattle_single TRAINER_PABLO_1, Route126_Text_PabloIntro, Route126_Text_PabloDefeat, Route126_EventScript_RegisterPablo specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route126_EventScript_RematchPablo + goto_if_eq VAR_RESULT, TRUE, Route126_EventScript_RematchPablo msgbox Route126_Text_PabloPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route127/scripts.inc b/data/maps/Route127/scripts.inc index 426e814702..05bfb14ffe 100644 --- a/data/maps/Route127/scripts.inc +++ b/data/maps/Route127/scripts.inc @@ -6,19 +6,14 @@ Route127_MapScripts:: Route127_OnTransition: call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetAbnormalWeather - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_NORTH - call_if_eq AbnormalWeather_StartKyogreWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_SOUTH - call_if_eq AbnormalWeather_StartKyogreWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_NORTH, AbnormalWeather_StartKyogreWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_SOUTH, AbnormalWeather_StartKyogreWeather end Route127_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_NORTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute127North - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_SOUTH - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute127South + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute127North + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_127_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute127South end Route127_OnFrame: @@ -63,8 +58,7 @@ Route127_EventScript_Athena:: Route127_EventScript_Koji:: trainerbattle_single TRAINER_KOJI_1, Route127_Text_KojiIntro, Route127_Text_KojiDefeat, Route127_EventScript_RegisterKoji specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route127_EventScript_RematchKoji + goto_if_eq VAR_RESULT, TRUE, Route127_EventScript_RematchKoji msgbox Route127_Text_KojiPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route128/scripts.inc b/data/maps/Route128/scripts.inc index e550f2bd12..d08605128a 100644 --- a/data/maps/Route128/scripts.inc +++ b/data/maps/Route128/scripts.inc @@ -181,8 +181,7 @@ Route128_Movement_MaxieApproachPlayer: Route128_EventScript_Isaiah:: trainerbattle_single TRAINER_ISAIAH_1, Route128_Text_IsaiahIntro, Route128_Text_IsaiahDefeat, Route128_EventScript_RegisterIsaiah specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route128_EventScript_RematchIsaiah + goto_if_eq VAR_RESULT, TRUE, Route128_EventScript_RematchIsaiah msgbox Route128_Text_IsaiahPostBattle, MSGBOX_DEFAULT release end @@ -203,8 +202,7 @@ Route128_EventScript_RematchIsaiah:: Route128_EventScript_Katelyn:: trainerbattle_single TRAINER_KATELYN_1, Route128_Text_KatelynIntro, Route128_Text_KatelynDefeat, Route128_EventScript_RegisterKatelyn specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq Route128_EventScript_RematchKatelyn + goto_if_eq VAR_RESULT, TRUE, Route128_EventScript_RematchKatelyn msgbox Route128_Text_KatelynPostBattle, MSGBOX_DEFAULT release end diff --git a/data/maps/Route129/scripts.inc b/data/maps/Route129/scripts.inc index e996722cc9..7055675a0e 100644 --- a/data/maps/Route129/scripts.inc +++ b/data/maps/Route129/scripts.inc @@ -5,21 +5,15 @@ Route129_MapScripts:: .byte 0 Route129_OnLoad: - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_WEST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute129West - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_EAST - call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute129East + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_WEST, AbnormalWeather_EventScript_PlaceTilesRoute129West + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_EAST, AbnormalWeather_EventScript_PlaceTilesRoute129East end Route129_OnTransition: - compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1 - call_if_eq AbnormalWeather_EventScript_HideMapNamePopup - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_ge Route129_EventScript_CheckSetAbnormalWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_WEST - call_if_eq AbnormalWeather_StartKyogreWeather - compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_EAST - call_if_eq AbnormalWeather_StartKyogreWeather + call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup + call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, Route129_EventScript_CheckSetAbnormalWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_WEST, AbnormalWeather_StartKyogreWeather + call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_129_EAST, AbnormalWeather_StartKyogreWeather end Route129_EventScript_CheckSetAbnormalWeather:: diff --git a/data/maps/Route130/scripts.inc b/data/maps/Route130/scripts.inc index fe360a36bb..7e0ecc8bd1 100644 --- a/data/maps/Route130/scripts.inc +++ b/data/maps/Route130/scripts.inc @@ -3,11 +3,9 @@ Route130_MapScripts:: .byte 0 Route130_OnTransition: - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_ge Route130_EventScript_CheckSetAbnormalWeather + call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, Route130_EventScript_CheckSetAbnormalWeather specialvar VAR_RESULT, IsMirageIslandPresent - compare VAR_RESULT, TRUE - goto_if_eq Route130_EventScript_SetMirageIslandLayout + goto_if_eq VAR_RESULT, TRUE, Route130_EventScript_SetMirageIslandLayout setflag FLAG_TEMP_11 setflag FLAG_TEMP_12 setflag FLAG_TEMP_13 diff --git a/data/maps/Route131/scripts.inc b/data/maps/Route131/scripts.inc index 846998bfe9..17060c183b 100644 --- a/data/maps/Route131/scripts.inc +++ b/data/maps/Route131/scripts.inc @@ -3,8 +3,7 @@ Route131_MapScripts:: .byte 0 Route131_OnTransition: - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_ge Route131_EventScript_CheckSetAbnormalWeather + call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, Route131_EventScript_CheckSetAbnormalWeather call Route131_EventScript_SetLayout end diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc index 48c413b042..28fd389210 100644 --- a/data/maps/RustboroCity/scripts.inc +++ b/data/maps/RustboroCity/scripts.inc @@ -13,16 +13,13 @@ RustboroCity_MapScripts:: RustboroCity_OnTransition: setflag FLAG_VISITED_RUSTBORO_CITY call Common_EventScript_SetupRivalGfxId - compare VAR_RUSTBORO_CITY_STATE, 6 - call_if_eq RustboroCity_EventScript_HideMapNamePopup + call_if_eq VAR_RUSTBORO_CITY_STATE, 6, RustboroCity_EventScript_HideMapNamePopup getplayerxy VAR_TEMP_0, VAR_TEMP_1 - compare VAR_RUSTBORO_CITY_STATE, 6 - goto_if_eq RustboroCity_EventScript_PositionScientistForExit + goto_if_eq VAR_RUSTBORO_CITY_STATE, 6, RustboroCity_EventScript_PositionScientistForExit end RustboroCity_EventScript_PositionScientistForExit:: - compare VAR_TEMP_0, 11 - goto_if_eq RustboroCity_EventScript_PositionScientistLeftExit + goto_if_eq VAR_TEMP_0, 11, RustboroCity_EventScript_PositionScientistLeftExit setobjectxyperm LOCALID_SCIENTIST, 12, 15 end @@ -506,14 +503,10 @@ RustboroCity_EventScript_HelpGetGoodsTrigger3:: end RustboroCity_EventScript_EmployeeAskToGetGoods:: - compare VAR_TEMP_1, 0 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerUp1 - compare VAR_TEMP_1, 1 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerLeft1 - compare VAR_TEMP_1, 2 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerDown1 - compare VAR_TEMP_1, 3 - call_if_eq RustboroCity_EventScript_EmployeeApproachPlayerDown1 + call_if_eq VAR_TEMP_1, 0, RustboroCity_EventScript_EmployeeFacePlayerUp1 + call_if_eq VAR_TEMP_1, 1, RustboroCity_EventScript_EmployeeFacePlayerLeft1 + call_if_eq VAR_TEMP_1, 2, RustboroCity_EventScript_EmployeeFacePlayerDown1 + call_if_eq VAR_TEMP_1, 3, RustboroCity_EventScript_EmployeeApproachPlayerDown1 setflag FLAG_INTERACTED_WITH_DEVON_EMPLOYEE_GOODS_STOLEN setvar VAR_RUSTBORO_CITY_STATE, 3 copyobjectxytoperm LOCALID_DEVON_EMPLOYEE @@ -601,20 +594,14 @@ RustboroCity_EventScript_ReturnGoodsTrigger3:: end RustboroCity_EventScript_ReturnGoods:: - compare VAR_TEMP_1, 0 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerUp2 - compare VAR_TEMP_1, 1 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerLeft2 - compare VAR_TEMP_1, 2 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerDown2 - compare VAR_TEMP_1, 3 - call_if_eq RustboroCity_EventScript_EmployeeApproachPlayerDown2 - compare VAR_TEMP_1, 4 - call_if_eq RustboroCity_EventScript_EmployeeFacePlayerRight + call_if_eq VAR_TEMP_1, 0, RustboroCity_EventScript_EmployeeFacePlayerUp2 + call_if_eq VAR_TEMP_1, 1, RustboroCity_EventScript_EmployeeFacePlayerLeft2 + call_if_eq VAR_TEMP_1, 2, RustboroCity_EventScript_EmployeeFacePlayerDown2 + call_if_eq VAR_TEMP_1, 3, RustboroCity_EventScript_EmployeeApproachPlayerDown2 + call_if_eq VAR_TEMP_1, 4, RustboroCity_EventScript_EmployeeFacePlayerRight msgbox RustboroCity_Text_YouGotItThankYou, MSGBOX_DEFAULT giveitem ITEM_GREAT_BALL - compare VAR_RESULT, FALSE - call_if_eq RustboroCity_EventScript_BagFull + call_if_eq VAR_RESULT, FALSE, RustboroCity_EventScript_BagFull msgbox RustboroCity_Text_PleaseComeWithMe, MSGBOX_DEFAULT closemessage setflag FLAG_RETURNED_DEVON_GOODS @@ -699,10 +686,8 @@ RustboroCity_EventScript_Rival:: RustboroCity_EventScript_PlayRivalMusic:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq RustboroCity_EventScript_PlayMayMusic - compare VAR_RESULT, FEMALE - goto_if_eq RustboroCity_EventScript_PlayBrendanMusic + goto_if_eq VAR_RESULT, MALE, RustboroCity_EventScript_PlayMayMusic + goto_if_eq VAR_RESULT, FEMALE, RustboroCity_EventScript_PlayBrendanMusic return RustboroCity_EventScript_PlayMayMusic:: @@ -843,10 +828,8 @@ RustboroCity_EventScript_RivalTrigger7:: RustboroCity_EventScript_RivalEncounter:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq RustboroCity_EventScript_MayEncounter - compare VAR_RESULT, FEMALE - goto_if_eq RustboroCity_EventScript_BrendanEncounter + goto_if_eq VAR_RESULT, MALE, RustboroCity_EventScript_MayEncounter + goto_if_eq VAR_RESULT, FEMALE, RustboroCity_EventScript_BrendanEncounter end RustboroCity_EventScript_MayEncounter:: @@ -866,8 +849,7 @@ RustboroCity_EventScript_MayEncounter:: setvar VAR_ROUTE104_STATE, 2 setvar VAR_0x8008, 0 msgbox RustboroCity_Text_MayPassedBrineyWantToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq RustboroCity_EventScript_BattleMay + goto_if_eq VAR_RESULT, YES, RustboroCity_EventScript_BattleMay msgbox RustboroCity_Text_MayOhHaventRaisedPokemonEnough, MSGBOX_DEFAULT call RustboroCity_EventScript_RestoreBgm releaseall @@ -876,8 +858,7 @@ RustboroCity_EventScript_MayEncounter:: RustboroCity_EventScript_MayAskToBattle:: setvar VAR_0x8008, 1 msgbox RustboroCity_Text_MayWantToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq RustboroCity_EventScript_BattleMay + goto_if_eq VAR_RESULT, YES, RustboroCity_EventScript_BattleMay msgbox RustboroCity_Text_MayOhHaventRaisedPokemonEnough, MSGBOX_DEFAULT releaseall end @@ -892,8 +873,7 @@ RustboroCity_EventScript_BattleMay:: RustboroCity_EventScript_MayBrineyHint:: msgbox RustboroCity_Text_MayMrBrineyHint, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq RustboroCity_EventScript_RestoreBgm + call_if_eq VAR_0x8008, 0, RustboroCity_EventScript_RestoreBgm releaseall end @@ -936,8 +916,7 @@ RustboroCity_EventScript_BrendanEncounter:: setvar VAR_RUSTBORO_CITY_STATE, 8 setvar VAR_ROUTE104_STATE, 2 msgbox RustboroCity_Text_BrendanPassedBrineyWantToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq RustboroCity_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, YES, RustboroCity_EventScript_BattleBrendan msgbox RustboroCity_Text_BrendanNoConfidenceInPokemon, MSGBOX_DEFAULT call RustboroCity_EventScript_RestoreBgm releaseall @@ -945,8 +924,7 @@ RustboroCity_EventScript_BrendanEncounter:: RustboroCity_EventScript_BrendanAskToBattle:: msgbox RustboroCity_Text_BrendanWantToBattle, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq RustboroCity_EventScript_BattleBrendan + goto_if_eq VAR_RESULT, YES, RustboroCity_EventScript_BattleBrendan msgbox RustboroCity_Text_BrendanNoConfidenceInPokemon, MSGBOX_DEFAULT releaseall end @@ -961,8 +939,7 @@ RustboroCity_EventScript_BattleBrendan:: RustboroCity_EventScript_BrendanBrineyHint:: msgbox RustboroCity_Text_BrendanMrBrineyHint, MSGBOX_DEFAULT - compare VAR_0x8008, 0 - call_if_eq RustboroCity_EventScript_RestoreBgm + call_if_eq VAR_0x8008, 0, RustboroCity_EventScript_RestoreBgm releaseall end diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index 1f2f1ea804..987828a295 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -5,8 +5,7 @@ RustboroCity_DevonCorp_2F_MapScripts:: .byte 0 RustboroCity_DevonCorp_2F_OnTransition: - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady end RustboroCity_DevonCorp_2F_EventScript_SetFossilReady:: @@ -16,8 +15,7 @@ RustboroCity_DevonCorp_2F_EventScript_SetFossilReady:: RustboroCity_DevonCorp_2F_EventScript_TalkToPokemonScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady msgbox RustboroCity_DevonCorp_2F_Text_DeviceForTalkingToPokemon, MSGBOX_DEFAULT release end @@ -25,8 +23,7 @@ RustboroCity_DevonCorp_2F_EventScript_TalkToPokemonScientist:: RustboroCity_DevonCorp_2F_EventScript_BallScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady goto_if_set FLAG_MET_DEVON_EMPLOYEE, RustboroCity_DevonCorp_2F_EventScript_DevelopedBalls msgbox RustboroCity_DevonCorp_2F_Text_DevelopingNewBalls, MSGBOX_DEFAULT release @@ -40,8 +37,7 @@ RustboroCity_DevonCorp_2F_EventScript_DevelopedBalls:: RustboroCity_DevonCorp_2F_EventScript_PokenavScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady goto_if_set FLAG_RECEIVED_POKENAV, RustboroCity_DevonCorp_2F_EventScript_HasPokenav msgbox RustboroCity_DevonCorp_2F_Text_IMadePokenav, MSGBOX_DEFAULT release @@ -55,8 +51,7 @@ RustboroCity_DevonCorp_2F_EventScript_HasPokenav:: RustboroCity_DevonCorp_2F_EventScript_PokemonDreamsScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady msgbox RustboroCity_DevonCorp_2F_Text_DeviceToVisualizePokemonDreams, MSGBOX_DEFAULT release end @@ -64,17 +59,13 @@ RustboroCity_DevonCorp_2F_EventScript_PokemonDreamsScientist:: RustboroCity_DevonCorp_2F_EventScript_FossilScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 2 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FossilMonReady - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_StillRegenerating + goto_if_eq VAR_FOSSIL_RESURRECTION_STATE, 2, RustboroCity_DevonCorp_2F_EventScript_FossilMonReady + goto_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_StillRegenerating msgbox RustboroCity_DevonCorp_2F_Text_DevelopDeviceToResurrectFossils, MSGBOX_DEFAULT checkitem ITEM_ROOT_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil checkitem ITEM_CLAW_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil release end @@ -87,11 +78,9 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil:: applymovement LOCALID_FOSSIL_SCIENTIST, Common_Movement_Delay48 waitmovement 0 msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil checkitem ITEM_CLAW_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil end @@ -112,11 +101,9 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil:: applymovement LOCALID_FOSSIL_SCIENTIST, Common_Movement_Delay48 waitmovement 0 msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil checkitem ITEM_ROOT_FOSSIL - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil + goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_ChooseFossil goto RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil end @@ -140,10 +127,8 @@ RustboroCity_DevonCorp_2F_EventScript_StillRegenerating:: end RustboroCity_DevonCorp_2F_EventScript_FossilMonReady:: - compare VAR_WHICH_FOSSIL_REVIVED, 1 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_LileepReady - compare VAR_WHICH_FOSSIL_REVIVED, 2 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_AnorithReady + goto_if_eq VAR_WHICH_FOSSIL_REVIVED, 1, RustboroCity_DevonCorp_2F_EventScript_LileepReady + goto_if_eq VAR_WHICH_FOSSIL_REVIVED, 2, RustboroCity_DevonCorp_2F_EventScript_AnorithReady end RustboroCity_DevonCorp_2F_EventScript_LileepReady:: @@ -161,18 +146,15 @@ RustboroCity_DevonCorp_2F_EventScript_AnorithReady:: RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep:: setvar VAR_TEMP_1, SPECIES_LILEEP givemon SPECIES_LILEEP, 20, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty - compare VAR_RESULT, 1 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC + goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty + goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC goto Common_EventScript_NoMoreRoomForPokemon end RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty:: call RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep @@ -181,8 +163,7 @@ RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty:: RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC:: call RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC call Common_EventScript_NameReceivedBoxMon goto RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC end @@ -210,18 +191,15 @@ RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep:: RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith:: setvar VAR_TEMP_1, SPECIES_ANORITH givemon SPECIES_ANORITH, 20, ITEM_NONE - compare VAR_RESULT, 0 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty - compare VAR_RESULT, 1 - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC + goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty + goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC goto Common_EventScript_NoMoreRoomForPokemon end RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty:: call RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith call Common_EventScript_GetGiftMonPartySlot call Common_EventScript_NameReceivedPartyMon goto RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith @@ -230,8 +208,7 @@ RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty:: RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC:: call RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare msgbox gText_NicknameThisPokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC + goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC call Common_EventScript_NameReceivedBoxMon goto RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC end @@ -282,10 +259,8 @@ RustboroCity_DevonCorp_2F_EventScript_CancelFossilSelect:: RustboroCity_DevonCorp_2F_EventScript_MatchCallScientist:: lock faceplayer - compare VAR_FOSSIL_RESURRECTION_STATE, 1 - call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady - compare VAR_RUSTBORO_CITY_STATE, 6 - goto_if_ge RustboroCity_DevonCorp_2F_EventScript_WorkOnNext + call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady + goto_if_ge VAR_RUSTBORO_CITY_STATE, 6, RustboroCity_DevonCorp_2F_EventScript_WorkOnNext msgbox RustboroCity_DevonCorp_2F_Text_DevelopNewPokenavFeature, MSGBOX_DEFAULT release end diff --git a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc index d249cc51f6..ebf9044c54 100644 --- a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc @@ -7,8 +7,7 @@ RustboroCity_DevonCorp_3F_MapScripts:: .byte 0 RustboroCity_DevonCorp_3F_OnTransition: - compare VAR_DEVON_CORP_3F_STATE, 0 - call_if_eq RustboroCity_DevonCorp_3F_EventScript_SetEmployeePos + call_if_eq VAR_DEVON_CORP_3F_STATE, 0, RustboroCity_DevonCorp_3F_EventScript_SetEmployeePos end RustboroCity_DevonCorp_3F_EventScript_SetEmployeePos:: @@ -164,8 +163,7 @@ RustboroCity_DevonCorp_3F_EventScript_MrStone:: RustboroCity_DevonCorp_3F_EventScript_GiveExpShare:: msgbox RustboroCity_DevonCorp_3F_Text_ThankYouForDeliveringLetter, MSGBOX_DEFAULT giveitem ITEM_EXP_SHARE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_EXP_SHARE msgbox RustboroCity_DevonCorp_3F_Text_ExplainExpShare, MSGBOX_DEFAULT closemessage diff --git a/data/maps/RustboroCity_Flat1_2F/scripts.inc b/data/maps/RustboroCity_Flat1_2F/scripts.inc index a9d24092f8..8e972182c1 100644 --- a/data/maps/RustboroCity_Flat1_2F/scripts.inc +++ b/data/maps/RustboroCity_Flat1_2F/scripts.inc @@ -7,36 +7,28 @@ RustboroCity_Flat1_2F_EventScript_WaldasDad:: lock faceplayer specialvar VAR_RESULT, TryBufferWaldaPhrase - compare VAR_RESULT, FALSE - goto_if_eq RustboroCity_Flat1_2F_EventScript_WaldasDadFirstPhrase - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_Flat1_2F_EventScript_WaldasDadNewPhrase + goto_if_eq VAR_RESULT, FALSE, RustboroCity_Flat1_2F_EventScript_WaldasDadFirstPhrase + goto_if_eq VAR_RESULT, TRUE, RustboroCity_Flat1_2F_EventScript_WaldasDadNewPhrase RustboroCity_Flat1_2F_EventScript_GivePhrase:: special DoWaldaNamingScreen waitstate - compare VAR_0x8004, 1 - goto_if_eq RustboroCity_Flat1_2F_EventScript_CancelGivePhrase - compare VAR_0x8004, 2 - goto_if_eq RustboroCity_Flat1_2F_EventScript_CancelGiveFirstPhrase + goto_if_eq VAR_0x8004, 1, RustboroCity_Flat1_2F_EventScript_CancelGivePhrase + goto_if_eq VAR_0x8004, 2, RustboroCity_Flat1_2F_EventScript_CancelGiveFirstPhrase specialvar VAR_RESULT, TryGetWallpaperWithWaldaPhrase - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_Flat1_2F_EventScript_WaldaLikesPhrase - compare VAR_RESULT, FALSE - goto_if_eq RustboroCity_Flat1_2F_EventScript_WaldaDoesntLikePhrase + goto_if_eq VAR_RESULT, TRUE, RustboroCity_Flat1_2F_EventScript_WaldaLikesPhrase + goto_if_eq VAR_RESULT, FALSE, RustboroCity_Flat1_2F_EventScript_WaldaDoesntLikePhrase end RustboroCity_Flat1_2F_EventScript_WaldasDadFirstPhrase:: msgbox RustboroCity_Flat1_2F_Text_HelloDoYouKnowFunnyPhrase, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_Flat1_2F_EventScript_DeclineGivePhrase + goto_if_eq VAR_RESULT, NO, RustboroCity_Flat1_2F_EventScript_DeclineGivePhrase msgbox RustboroCity_Flat1_2F_Text_WonderfulLetsHearSuggestion, MSGBOX_DEFAULT goto RustboroCity_Flat1_2F_EventScript_GivePhrase RustboroCity_Flat1_2F_EventScript_WaldasDadNewPhrase:: msgbox RustboroCity_Flat1_2F_Text_BeenSayingXDoYouKnowBetterPhrase, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_Flat1_2F_EventScript_DeclineGivePhrase + goto_if_eq VAR_RESULT, NO, RustboroCity_Flat1_2F_EventScript_DeclineGivePhrase msgbox RustboroCity_Flat1_2F_Text_WonderfulLetsHearSuggestion, MSGBOX_DEFAULT goto RustboroCity_Flat1_2F_EventScript_GivePhrase diff --git a/data/maps/RustboroCity_Flat2_2F/scripts.inc b/data/maps/RustboroCity_Flat2_2F/scripts.inc index 29edb7b586..97145ce8f2 100644 --- a/data/maps/RustboroCity_Flat2_2F/scripts.inc +++ b/data/maps/RustboroCity_Flat2_2F/scripts.inc @@ -11,8 +11,7 @@ RustboroCity_Flat2_2F_EventScript_NinjaBoy:: goto_if_set FLAG_RECEIVED_PREMIER_BALL_RUSTBORO, RustboroCity_Flat2_2F_EventScript_GavePremierBall msgbox RustboroCity_Flat2_2F_Text_MyDaddyMadeThisYouCanHaveIt, MSGBOX_DEFAULT giveitem ITEM_PREMIER_BALL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_PREMIER_BALL_RUSTBORO release end diff --git a/data/maps/RustboroCity_Gym/scripts.inc b/data/maps/RustboroCity_Gym/scripts.inc index 11354fac0a..e1596a9730 100644 --- a/data/maps/RustboroCity_Gym/scripts.inc +++ b/data/maps/RustboroCity_Gym/scripts.inc @@ -4,8 +4,7 @@ RustboroCity_Gym_MapScripts:: RustboroCity_Gym_EventScript_Roxanne:: trainerbattle_single TRAINER_ROXANNE_1, RustboroCity_Gym_Text_RoxanneIntro, RustboroCity_Gym_Text_RoxanneDefeat, RustboroCity_Gym_EventScript_RoxanneDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq RustboroCity_Gym_EventScript_RoxanneRematch + goto_if_eq VAR_RESULT, TRUE, RustboroCity_Gym_EventScript_RoxanneRematch goto_if_unset FLAG_RECEIVED_TM39, RustboroCity_Gym_EventScript_GiveRockTomb msgbox RustboroCity_Gym_Text_RoxannePostBattle, MSGBOX_DEFAULT release @@ -22,15 +21,13 @@ RustboroCity_Gym_EventScript_RoxanneDefeated:: addvar VAR_PETALBURG_GYM_STATE, 1 setvar VAR_0x8008, 1 call Common_EventScript_SetGymTrainers - compare VAR_PETALBURG_GYM_STATE, 6 - call_if_eq Common_EventScript_ReadyPetalburgGymForBattle + call_if_eq VAR_PETALBURG_GYM_STATE, 6, Common_EventScript_ReadyPetalburgGymForBattle goto RustboroCity_Gym_EventScript_GiveRockTomb end RustboroCity_Gym_EventScript_GiveRockTomb:: giveitem ITEM_TM39 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM39 msgbox RustboroCity_Gym_Text_ExplainRockTomb, MSGBOX_DEFAULT release diff --git a/data/maps/RustboroCity_House1/scripts.inc b/data/maps/RustboroCity_House1/scripts.inc index 20e93506bc..88a33786c0 100644 --- a/data/maps/RustboroCity_House1/scripts.inc +++ b/data/maps/RustboroCity_House1/scripts.inc @@ -10,18 +10,15 @@ RustboroCity_House1_EventScript_Trader:: specialvar VAR_RESULT, GetInGameTradeSpeciesInfo copyvar VAR_0x8009, VAR_RESULT msgbox RustboroCity_House1_Text_IllTradeIfYouWant, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq RustboroCity_House1_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, RustboroCity_House1_EventScript_DeclineTrade special ChoosePartyMon waitstate copyvar VAR_0x800A, VAR_0x8004 - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq RustboroCity_House1_EventScript_DeclineTrade + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, RustboroCity_House1_EventScript_DeclineTrade copyvar VAR_0x8005, VAR_0x800A specialvar VAR_RESULT, GetTradeSpecies copyvar VAR_0x800B, VAR_RESULT - compare VAR_RESULT, VAR_0x8009 - goto_if_ne RustboroCity_House1_EventScript_NotRequestedMon + goto_if_ne VAR_RESULT, VAR_0x8009, RustboroCity_House1_EventScript_NotRequestedMon copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8005, VAR_0x800A special CreateInGameTradePokemon diff --git a/data/maps/RustboroCity_PokemonSchool/scripts.inc b/data/maps/RustboroCity_PokemonSchool/scripts.inc index fcc374ddc7..8a409d49b3 100644 --- a/data/maps/RustboroCity_PokemonSchool/scripts.inc +++ b/data/maps/RustboroCity_PokemonSchool/scripts.inc @@ -78,14 +78,11 @@ RustboroCity_PokemonSchool_EventScript_Teacher:: lock faceplayer goto_if_set FLAG_RECEIVED_QUICK_CLAW, RustboroCity_PokemonSchool_EventScript_GaveQuickClaw - compare VAR_FACING, DIR_EAST - call_if_eq RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsEast - compare VAR_FACING, DIR_WEST - call_if_eq RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsWest + call_if_eq VAR_FACING, DIR_EAST, RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsEast + call_if_eq VAR_FACING, DIR_WEST, RustboroCity_PokemonSchool_EventScript_TeacherCheckOnStudentsWest msgbox RustboroCity_PokemonSchool_Text_StudentsWhoDontStudyGetQuickClaw, MSGBOX_DEFAULT giveitem ITEM_QUICK_CLAW - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown waitmovement 0 diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc index 97a158f22d..e7eee5817a 100644 --- a/data/maps/RusturfTunnel/scripts.inc +++ b/data/maps/RusturfTunnel/scripts.inc @@ -15,8 +15,7 @@ RusturfTunnel_OnFrame: .2byte 0 RusturfTunnel_OnTransition: - compare VAR_RUSTURF_TUNNEL_STATE, 2 - call_if_eq RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos + call_if_eq VAR_RUSTURF_TUNNEL_STATE, 2, RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos end RusturfTunnel_EventScript_SetAquaGruntAndPeekoPos:: @@ -56,36 +55,25 @@ RusturfTunnel_EventScript_AlreadySpokenTo:: RusturfTunnel_EventScript_ClearTunnelScene:: lockall - compare VAR_TEMP_1, 1 - call_if_eq RusturfTunnel_EventScript_FaceWandasBoyfriend1 - compare VAR_TEMP_1, 2 - call_if_eq RusturfTunnel_EventScript_FaceWandasBoyfriend2 - compare VAR_TEMP_1, 3 - call_if_eq RusturfTunnel_EventScript_FaceWandasBoyfriend3 + call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_FaceWandasBoyfriend1 + call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_FaceWandasBoyfriend2 + call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_FaceWandasBoyfriend3 call RusturfTunnel_EventScript_WandasBoyfriendNotice msgbox RusturfTunnel_Text_YouShatteredBoulderTakeHM, MSGBOX_DEFAULT - compare VAR_TEMP_1, 2 - call_if_eq RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer - compare VAR_TEMP_1, 3 - call_if_eq RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer + call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer + call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer giveitem ITEM_HM04 setflag FLAG_RECEIVED_HM04 msgbox RusturfTunnel_Text_ExplainStrength, MSGBOX_DEFAULT closemessage - compare VAR_TEMP_1, 1 - call_if_eq RusturfTunnel_EventScript_BoyfriendApproachWanda1 - compare VAR_TEMP_1, 2 - call_if_eq RusturfTunnel_EventScript_BoyfriendApproachWanda2 - compare VAR_TEMP_1, 3 - call_if_eq RusturfTunnel_EventScript_BoyfriendApproachWanda3 + call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_BoyfriendApproachWanda1 + call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_BoyfriendApproachWanda2 + call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_BoyfriendApproachWanda3 msgbox RusturfTunnel_Text_WandaReunion, MSGBOX_DEFAULT closemessage - compare VAR_TEMP_1, 1 - call_if_eq RusturfTunnel_EventScript_WandaAndBoyfriendExit1 - compare VAR_TEMP_1, 2 - call_if_eq RusturfTunnel_EventScript_WandaAndBoyfriendExit - compare VAR_TEMP_1, 3 - call_if_eq RusturfTunnel_EventScript_WandaAndBoyfriendExit + call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_WandaAndBoyfriendExit1 + call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_WandaAndBoyfriendExit + call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_WandaAndBoyfriendExit call RusturfTunnel_EventScript_SetRusturfTunnelOpen releaseall end diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc index c99d3ad033..b39b9a4336 100644 --- a/data/maps/SSTidalCorridor/scripts.inc +++ b/data/maps/SSTidalCorridor/scripts.inc @@ -45,10 +45,8 @@ SSTidalRooms_EventScript_ArrivedInLilycove:: return SSTidalCorridor_EventScript_ReachedStepCount:: - compare VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_HalfwayToLilycove - compare VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_ArrivedInSlateport + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT, SSTidalCorridor_EventScript_HalfwayToLilycove + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT, SSTidalCorridor_EventScript_ArrivedInSlateport end SSTidalCorridor_EventScript_HalfwayToLilycove:: @@ -117,10 +115,8 @@ SSTidalCorridor_EventScript_Cabin4Sign:: SSTidalCorridor_EventScript_ExitSailor:: lock faceplayer - compare VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_LILYCOVE - goto_if_eq SSTidalCorridor_EventScript_ExitLilycove - compare VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_ExitSlateport + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_LILYCOVE, SSTidalCorridor_EventScript_ExitLilycove + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_LAND_SLATEPORT, SSTidalCorridor_EventScript_ExitSlateport msgbox SSTidalCorridor_Text_CanRestInCabin2, MSGBOX_DEFAULT release end @@ -149,10 +145,8 @@ SSTidalCorridor_EventScript_HideSnatchGiver:: SSTidalCorridor_EventScript_Porthole:: lockall - compare VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_LookThroughPorthole - compare VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT - goto_if_eq SSTidalCorridor_EventScript_LookThroughPorthole + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_DEPART_SLATEPORT, SSTidalCorridor_EventScript_LookThroughPorthole + goto_if_eq VAR_SS_TIDAL_STATE, SS_TIDAL_HALFWAY_SLATEPORT, SSTidalCorridor_EventScript_LookThroughPorthole msgbox SSTidalCorridor_Text_HorizonSpreadsBeyondPorthole, MSGBOX_DEFAULT releaseall end diff --git a/data/maps/SSTidalRooms/scripts.inc b/data/maps/SSTidalRooms/scripts.inc index c5cade489e..c3aa8ff8ab 100644 --- a/data/maps/SSTidalRooms/scripts.inc +++ b/data/maps/SSTidalRooms/scripts.inc @@ -7,8 +7,7 @@ SSTidalRooms_EventScript_SnatchGiver:: goto_if_set FLAG_RECEIVED_TM49, SSTidalRooms_EventScript_ExplainSnatch msgbox SSTidalRooms_Text_NotSuspiciousTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM49 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM49 msgbox SSTidalRooms_Text_ExplainSnatch, MSGBOX_DEFAULT release diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc index c361d9f2eb..6b4c774c2b 100644 --- a/data/maps/SafariZone_South/scripts.inc +++ b/data/maps/SafariZone_South/scripts.inc @@ -21,8 +21,7 @@ SafariZone_South_EventScript_EnterSafariZone:: end SafariZone_South_OnTransition: - compare VAR_SAFARI_ZONE_STATE, 2 - call_if_eq SafariZone_South_EventScript_SetExitAttendantAside + call_if_eq VAR_SAFARI_ZONE_STATE, 2, SafariZone_South_EventScript_SetExitAttendantAside end SafariZone_South_EventScript_SetExitAttendantAside:: @@ -55,8 +54,7 @@ SafariZone_South_EventScript_ExitAttendant:: faceplayer goto_if_unset FLAG_GOOD_LUCK_SAFARI_ZONE, SafariZone_South_EventScript_GoodLuck msgbox SafariZone_South_Text_StillHaveTimeExit, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SafariZone_South_EventScript_ExitEarly + goto_if_eq VAR_RESULT, YES, SafariZone_South_EventScript_ExitEarly msgbox SafariZone_South_Text_EnjoyTheRestOfYourAdventure, MSGBOX_DEFAULT release end diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc index a999c4a152..eec69e6f80 100644 --- a/data/maps/SeafloorCavern_Entrance/scripts.inc +++ b/data/maps/SeafloorCavern_Entrance/scripts.inc @@ -11,8 +11,7 @@ SeafloorCavern_Entrance_OnResume: SeafloorCavern_Entrance_EventScript_Grunt:: lockall - compare VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1 - goto_if_eq SeafloorCavern_Entrance_EventScript_GruntSpeechShort + goto_if_eq VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1, SeafloorCavern_Entrance_EventScript_GruntSpeechShort waitse playse SE_PIN applymovement LOCALID_GRUNT, Common_Movement_ExclamationMark @@ -20,12 +19,9 @@ SeafloorCavern_Entrance_EventScript_Grunt:: applymovement LOCALID_GRUNT, Common_Movement_Delay48 waitmovement 0 delay 20 - compare VAR_FACING, DIR_WEST - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest - compare VAR_FACING, DIR_EAST - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast - compare VAR_FACING, DIR_NORTH - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth + call_if_eq VAR_FACING, DIR_WEST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest + call_if_eq VAR_FACING, DIR_EAST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast + call_if_eq VAR_FACING, DIR_NORTH, SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth delay 30 setvar VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT, 1 copyobjectxytoperm LOCALID_GRUNT @@ -37,12 +33,9 @@ SeafloorCavern_Entrance_EventScript_Grunt:: end SeafloorCavern_Entrance_EventScript_GruntSpeechShort:: - compare VAR_FACING, DIR_WEST - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest - compare VAR_FACING, DIR_EAST - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast - compare VAR_FACING, DIR_NORTH - call_if_eq SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth + call_if_eq VAR_FACING, DIR_WEST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerWest + call_if_eq VAR_FACING, DIR_EAST, SeafloorCavern_Entrance_EventScript_GruntFacePlayerEast + call_if_eq VAR_FACING, DIR_NORTH, SeafloorCavern_Entrance_EventScript_GruntFacePlayerNorth msgbox SeafloorCavern_Entrance_Text_HearMagmaNearMossdeepShort, MSGBOX_DEFAULT closemessage applymovement LOCALID_GRUNT, Common_Movement_WalkInPlaceFasterUp diff --git a/data/maps/SealedChamber_InnerRoom/scripts.inc b/data/maps/SealedChamber_InnerRoom/scripts.inc index 7d240535ca..036ab4fb80 100644 --- a/data/maps/SealedChamber_InnerRoom/scripts.inc +++ b/data/maps/SealedChamber_InnerRoom/scripts.inc @@ -6,8 +6,7 @@ SealedChamber_InnerRoom_EventScript_BrailleBackWall:: braillemsgbox SealedChamber_InnerRoom_Braille_FirstWailordLastRelicanth goto_if_set FLAG_REGI_DOORS_OPENED, SealedChamber_InnerRoom_EventScript_NoEffect specialvar VAR_RESULT, CheckRelicanthWailord - compare VAR_RESULT, FALSE - goto_if_eq SealedChamber_InnerRoom_EventScript_NoEffect + goto_if_eq VAR_RESULT, FALSE, SealedChamber_InnerRoom_EventScript_NoEffect fadeoutbgm 0 playse SE_TRUCK_MOVE special DoSealedChamberShakingEffect_Long diff --git a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc index 74f24c8598..905a9a77a7 100644 --- a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc @@ -21,25 +21,19 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert:: dotimebasedevents call_if_set FLAG_SYS_SHOAL_ITEM, ShoalCave_LowTideEntranceRoom_EventScript_ResetShoalItems checkitem ITEM_SHOAL_SALT, 4 - compare VAR_RESULT, FALSE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells + goto_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells checkitem ITEM_SHOAL_SHELL, 4 - compare VAR_RESULT, FALSE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells + goto_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell + goto_if_eq VAR_RESULT, NO, ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell checkitemspace ITEM_SHELL_BELL - compare VAR_RESULT, FALSE - call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed - compare VAR_RESULT, 2 - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell + call_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed + goto_if_eq VAR_RESULT, 2, ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell msgbox ShoalCave_LowTideEntranceRoom_Text_MakeShellBellRightAway, MSGBOX_DEFAULT removeitem ITEM_SHOAL_SALT, 4 removeitem ITEM_SHOAL_SHELL, 4 giveitem ITEM_SHELL_BELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox ShoalCave_LowTideEntranceRoom_Text_ExplainShellBell, MSGBOX_DEFAULT setflag FLAG_TEMP_2 release @@ -48,14 +42,12 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert:: @ If the bag is full, check if a slot will be freed when 4 Shoal Salt or Shells are given ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed:: checkitem ITEM_SHOAL_SALT, 5 - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells return ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells:: checkitem ITEM_SHOAL_SHELL, 5 - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed return ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed:: @@ -69,11 +61,9 @@ ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell:: ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells:: checkitem ITEM_SHOAL_SALT - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell checkitem ITEM_SHOAL_SHELL - compare VAR_RESULT, TRUE - goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell + goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT release end diff --git a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc index 37b7beb041..17f6a7ca6b 100644 --- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc @@ -63,8 +63,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell1:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalShell giveitem ITEM_SHOAL_SHELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_1 @@ -80,8 +79,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell2:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalShell giveitem ITEM_SHOAL_SHELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_2 @@ -92,8 +90,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell3:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalShell giveitem ITEM_SHOAL_SHELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_3 @@ -104,8 +101,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell4:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalShell giveitem ITEM_SHOAL_SHELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SHELL_4 @@ -116,8 +112,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalSalt1:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalSalt giveitem ITEM_SHOAL_SALT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_1 @@ -133,8 +128,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalSalt2:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_ReceivedShoalSalt giveitem ITEM_SHOAL_SALT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_2 diff --git a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc index 15dcd326db..a06d46cc2a 100644 --- a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc @@ -18,8 +18,7 @@ ShoalCave_LowTideLowerRoom_EventScript_ShoalSalt4:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_ReceivedShoalSalt giveitem ITEM_SHOAL_SALT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_4 @@ -37,8 +36,7 @@ ShoalCave_LowTideLowerRoom_EventScript_BlackBelt:: goto_if_set FLAG_RECEIVED_FOCUS_BAND, ShoalCave_LowTideLowerRoom_EventScript_ReceivedFocusBand msgbox ShoalCave_LowTideLowerRoom_Text_CanOvercomeColdWithFocus, MSGBOX_DEFAULT giveitem ITEM_FOCUS_BAND - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_FOCUS_BAND release end diff --git a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc index f1a5b030b3..655711e9c6 100644 --- a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc @@ -18,8 +18,7 @@ ShoalCave_LowTideStairsRoom_EventScript_ShoalSalt3:: lockall goto_if_set FLAG_RECEIVED_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_ReceivedShoalSalt giveitem ITEM_SHOAL_SALT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE special DrawWholeMapView setflag FLAG_RECEIVED_SHOAL_SALT_3 diff --git a/data/maps/SkyPillar_1F/scripts.inc b/data/maps/SkyPillar_1F/scripts.inc index 3ef94b261c..b521b541c1 100644 --- a/data/maps/SkyPillar_1F/scripts.inc +++ b/data/maps/SkyPillar_1F/scripts.inc @@ -3,8 +3,7 @@ SkyPillar_1F_MapScripts:: .byte 0 SkyPillar_1F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_1F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_1F_EventScript_CleanFloor end SkyPillar_1F_EventScript_CleanFloor:: diff --git a/data/maps/SkyPillar_2F/scripts.inc b/data/maps/SkyPillar_2F/scripts.inc index ba2fe889be..bad2488f0b 100644 --- a/data/maps/SkyPillar_2F/scripts.inc +++ b/data/maps/SkyPillar_2F/scripts.inc @@ -5,8 +5,7 @@ SkyPillar_2F_MapScripts:: .byte 0 SkyPillar_2F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_2F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_2F_EventScript_CleanFloor copyvar VAR_ICE_STEP_COUNT, 1 end diff --git a/data/maps/SkyPillar_3F/scripts.inc b/data/maps/SkyPillar_3F/scripts.inc index 681137df08..07ef3bb449 100644 --- a/data/maps/SkyPillar_3F/scripts.inc +++ b/data/maps/SkyPillar_3F/scripts.inc @@ -3,8 +3,7 @@ SkyPillar_3F_MapScripts:: .byte 0 SkyPillar_3F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_3F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_3F_EventScript_CleanFloor end SkyPillar_3F_EventScript_CleanFloor:: diff --git a/data/maps/SkyPillar_4F/scripts.inc b/data/maps/SkyPillar_4F/scripts.inc index b3ff931ad4..9e8f1e80ea 100644 --- a/data/maps/SkyPillar_4F/scripts.inc +++ b/data/maps/SkyPillar_4F/scripts.inc @@ -5,8 +5,7 @@ SkyPillar_4F_MapScripts:: .byte 0 SkyPillar_4F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_4F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_4F_EventScript_CleanFloor copyvar VAR_ICE_STEP_COUNT, 1 end diff --git a/data/maps/SkyPillar_5F/scripts.inc b/data/maps/SkyPillar_5F/scripts.inc index 12fc72f493..47d02fb61b 100644 --- a/data/maps/SkyPillar_5F/scripts.inc +++ b/data/maps/SkyPillar_5F/scripts.inc @@ -3,8 +3,7 @@ SkyPillar_5F_MapScripts:: .byte 0 SkyPillar_5F_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_5F_EventScript_CleanFloor + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_5F_EventScript_CleanFloor return SkyPillar_5F_EventScript_CleanFloor:: diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc index 89e71a1ce9..f25c82df65 100644 --- a/data/maps/SkyPillar_Outside/scripts.inc +++ b/data/maps/SkyPillar_Outside/scripts.inc @@ -7,10 +7,8 @@ SkyPillar_Outside_MapScripts:: .byte 0 SkyPillar_Outside_OnTransition: - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - call_if_eq SkyPillar_Outside_EventScript_HideMapNamePopup - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_ge SkyPillar_Outside_EventScript_CheckSetAbnormalWeather + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SkyPillar_Outside_EventScript_HideMapNamePopup + call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, SkyPillar_Outside_EventScript_CheckSetAbnormalWeather end SkyPillar_Outside_EventScript_HideMapNamePopup:: diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index c59707e146..5c71bbe4bf 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -12,16 +12,13 @@ SkyPillar_Top_OnResume: SkyPillar_Top_EventScript_TryRemoveRayquaza:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject VAR_LAST_TALKED return SkyPillar_Top_OnTransition: - compare VAR_SKY_PILLAR_STATE, 2 - call_if_lt SkyPillar_Top_EventScript_SetCleanLayout - compare VAR_SKY_PILLAR_STATE, 2 - call_if_ge SkyPillar_Top_EventScript_TryShowRayquaza + call_if_lt VAR_SKY_PILLAR_STATE, 2, SkyPillar_Top_EventScript_SetCleanLayout + call_if_ge VAR_SKY_PILLAR_STATE, 2, SkyPillar_Top_EventScript_TryShowRayquaza end SkyPillar_Top_EventScript_SetCleanLayout:: @@ -57,12 +54,9 @@ SkyPillar_Top_EventScript_Rayquaza:: waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq SkyPillar_Top_EventScript_DefeatedRayquaza - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq SkyPillar_Top_EventScript_RanFromRayquaza - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq SkyPillar_Top_EventScript_RanFromRayquaza + goto_if_eq VAR_RESULT, B_OUTCOME_WON, SkyPillar_Top_EventScript_DefeatedRayquaza + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, SkyPillar_Top_EventScript_RanFromRayquaza + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, SkyPillar_Top_EventScript_RanFromRayquaza setflag FLAG_DEFEATED_RAYQUAZA releaseall end diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc index 2e7ed6cbec..653f405c45 100644 --- a/data/maps/SlateportCity/scripts.inc +++ b/data/maps/SlateportCity/scripts.inc @@ -29,10 +29,8 @@ SlateportCity_MapScripts:: SlateportCity_OnTransition: setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 0 call SlateportCity_EventScript_EnterSlateport - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_MovePeopleForSternInterview - compare VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE, 1 - call_if_eq SlateportCity_EventScript_SetReadyForScottScene + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_MovePeopleForSternInterview + call_if_eq VAR_SLATEPORT_OUTSIDE_MUSEUM_STATE, 1, SlateportCity_EventScript_SetReadyForScottScene end SlateportCity_EventScript_EnterSlateport:: @@ -61,8 +59,7 @@ SlateportCity_EventScript_MovePeopleForSternInterview:: SlateportCity_EventScript_SetReadyForScottScene:: setflag FLAG_HIDE_MAP_NAME_POPUP getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 30 - goto_if_eq SlateportCity_EventScript_MoveScottLeft + goto_if_eq VAR_0x8004, 30, SlateportCity_EventScript_MoveScottLeft setobjectxyperm LOCALID_SCOTT, 23, 27 setobjectmovementtype LOCALID_SCOTT, MOVEMENT_TYPE_FACE_RIGHT return @@ -167,11 +164,9 @@ SlateportCity_EventScript_EffortRibbonWoman:: bufferleadmonspeciesname STR_VAR_1 msgbox SlateportCity_Text_OhYourPokemon, MSGBOX_DEFAULT specialvar VAR_RESULT, LeadMonHasEffortRibbon - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_EventScript_MonHasEffortRibbon + call_if_eq VAR_RESULT, TRUE, SlateportCity_EventScript_MonHasEffortRibbon specialvar VAR_RESULT, Special_AreLeadMonEVsMaxedOut - compare VAR_RESULT, FALSE - call_if_eq SlateportCity_EventScript_MonEVsNotMaxed + call_if_eq VAR_RESULT, FALSE, SlateportCity_EventScript_MonEVsNotMaxed msgbox SlateportCity_Text_PleaseGiveItThisEffortRibbon, MSGBOX_DEFAULT playfanfare MUS_OBTAIN_ITEM message SlateportCity_Text_ReceivedEffortRibbon @@ -194,8 +189,7 @@ SlateportCity_EventScript_MonHasEffortRibbon:: SlateportCity_EventScript_Cook:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_CookSternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_CookSternInterview msgbox SlateportCity_Text_SeaweedFullOfLife, MSGBOX_DEFAULT release end @@ -208,8 +202,7 @@ SlateportCity_EventScript_CookSternInterview:: SlateportCity_EventScript_OldWoman:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_OldWomanSternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_OldWomanSternInterview msgbox SlateportCity_Text_HowTownIsBornAndGrows, MSGBOX_DEFAULT release end @@ -222,8 +215,7 @@ SlateportCity_EventScript_OldWomanSternInterview:: SlateportCity_EventScript_Girl:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_GirlSternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_GirlSternInterview goto_if_set FLAG_RECEIVED_SECRET_POWER, SlateportCity_EventScript_GirlSecretBase msgbox SlateportCity_Text_SlateportWonderfulPlace, MSGBOX_DEFAULT release @@ -242,8 +234,7 @@ SlateportCity_EventScript_GirlSecretBase:: SlateportCity_EventScript_RichBoy:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_RichBoySternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_RichBoySternInterview msgbox SlateportCity_Text_GoingToCompeteInBattleTent, MSGBOX_DEFAULT release end @@ -254,8 +245,7 @@ SlateportCity_EventScript_RichBoySternInterview:: end SlateportCity_EventScript_FatMan:: - compare VAR_SLATEPORT_CITY_STATE, 1 - goto_if_eq SlateportCity_EventScript_FatManSternInterview + goto_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_FatManSternInterview msgbox SlateportCity_Text_BushedHikingFromMauville, MSGBOX_NPC end @@ -266,8 +256,7 @@ SlateportCity_EventScript_FatManSternInterview:: SlateportCity_EventScript_Man1:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_Man1SternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_Man1SternInterview msgbox SlateportCity_Text_EveryoneCallsHimCaptStern, MSGBOX_DEFAULT release end @@ -347,8 +336,7 @@ SlateportCity_EventScript_NameRatersHouseSign:: SlateportCity_EventScript_Maniac:: lock faceplayer - compare VAR_SLATEPORT_CITY_STATE, 1 - call_if_eq SlateportCity_EventScript_ManiacSternInterview + call_if_eq VAR_SLATEPORT_CITY_STATE, 1, SlateportCity_EventScript_ManiacSternInterview msgbox SlateportCity_Text_GetNameRaterToHelpYou, MSGBOX_DEFAULT release end @@ -760,8 +748,7 @@ SlateportCity_EventScript_BerryPowderClerk:: SlateportCity_EventScript_ReceivedPowderJar:: setvar VAR_0x8004, 1 specialvar VAR_RESULT, HasEnoughBerryPowder - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_EventScript_ExplainBerryPowder + goto_if_eq VAR_RESULT, FALSE, SlateportCity_EventScript_ExplainBerryPowder msgbox SlateportCity_Text_BroughtMeSomeBerryPowder, MSGBOX_DEFAULT special DisplayBerryPowderVendorMenu goto SlateportCity_EventScript_ChooseBerryPowderItem @@ -879,21 +866,17 @@ SlateportCity_EventScript_CancelPowderItemSelect:: SlateportCity_EventScript_TryBuyBerryPowderItem:: msgbox SlateportCity_Text_ExchangeBerryPowderForItem, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_EventScript_ChooseBerryPowderItem + goto_if_eq VAR_RESULT, NO, SlateportCity_EventScript_ChooseBerryPowderItem copyvar VAR_0x8004, VAR_0x8009 specialvar VAR_RESULT, HasEnoughBerryPowder - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_EventScript_NotEnoughBerryPowder + goto_if_eq VAR_RESULT, FALSE, SlateportCity_EventScript_NotEnoughBerryPowder giveitem VAR_0x8008 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_EventScript_NoRoomForBerryPowderItem + goto_if_eq VAR_RESULT, FALSE, SlateportCity_EventScript_NoRoomForBerryPowderItem copyvar VAR_0x8004, VAR_0x8009 special TakeBerryPowder special PrintPlayerBerryPowderAmount msgbox SlateportCity_Text_FineBerryPowderTradeSomethingElse, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_EventScript_ChooseBerryPowderItem + goto_if_eq VAR_RESULT, YES, SlateportCity_EventScript_ChooseBerryPowderItem msgbox SlateportCity_Text_WhenYouGetMoreBringItToMe, MSGBOX_DEFAULT special RemoveBerryPowderVendorMenu release diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc index 285c567ec3..53514bb5e9 100644 --- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc +++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc @@ -16,10 +16,8 @@ SlateportCity_BattleTentBattleRoom_OnTransition: SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc index 309b709d1a..75156f68f0 100644 --- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc +++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc @@ -13,8 +13,7 @@ SlateportCity_BattleTentCorridor_OnWarp: SlateportCity_BattleTentCorridor_EventScript_SetUpObjects:: setvar VAR_TEMP_1, 1 - compare VAR_0x8006, 1 - goto_if_ne SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth + goto_if_ne VAR_0x8006, 1, SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth setobjectxy LOCALID_ATTENDANT, 2, 2 turnobject LOCALID_ATTENDANT, DIR_SOUTH SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth:: @@ -26,14 +25,12 @@ SlateportCity_BattleTentCorridor_OnFrame: .2byte 0 SlateportCity_BattleTentCorridor_EventScript_EnterCorridor:: - compare VAR_0x8006, 1 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle + goto_if_eq VAR_0x8006, 1, SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle setvar VAR_TEMP_0, 1 applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentCorridor_Movement_AttendantEnter applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerEnter waitmovement 0 - compare VAR_0x8006, 2 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge + goto_if_eq VAR_0x8006, 2, SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge slateporttent_generaterentalmons slateporttent_generateopponentmons msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection, MSGBOX_DEFAULT @@ -65,10 +62,8 @@ SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle:: special HealPlayerParty SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent:: frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq SlateportCity_BattleTentCorridor_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq SlateportCity_BattleTentCorridor_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 1, SlateportCity_BattleTentCorridor_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, SlateportCity_BattleTentCorridor_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, TRUE switch VAR_RESULT case 0, SlateportCity_BattleTentCorridor_EventScript_AskSwapMon @@ -103,8 +98,7 @@ SlateportCity_BattleTentCorridor_EventScript_SwapMons:: fadescreen FADE_TO_BLACK slateporttent_swapmons waitstate - compare VAR_RESULT, 1 - goto_if_eq SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom + goto_if_eq VAR_RESULT, 1, SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT goto SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc index 7ed9420b0e..0d3fae875f 100644 --- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc +++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc @@ -93,8 +93,7 @@ SlateportCity_BattleTentLobby_EventScript_Attendant:: lock faceplayer slateporttent_getprize - compare VAR_RESULT, ITEM_NONE - goto_if_ne SlateportCity_BattleTentLobby_EventScript_GivePrize + goto_if_ne VAR_RESULT, ITEM_NONE, SlateportCity_BattleTentLobby_EventScript_GivePrize special SavePlayerParty msgbox SlateportCity_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT SlateportCity_BattleTentLobby_EventScript_AskEnterChallenge:: @@ -127,8 +126,7 @@ SlateportCity_BattleTentLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed setvar VAR_0x8006, 0 SlateportCity_BattleTentLobby_EventScript_EnterChallenge:: msgbox SlateportCity_BattleTentLobby_Text_StepThisWay, MSGBOX_DEFAULT @@ -204,8 +202,7 @@ SlateportCity_BattleTentLobby_EventScript_TormentGiver:: goto_if_set FLAG_RECEIVED_TM41, SlateportCity_BattleTentLobby_EventScript_ReceivedTorment msgbox SlateportCity_BattleTentLobby_Text_CouldntFindMonForMe, MSGBOX_DEFAULT giveitem ITEM_TM41 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM41 msgbox SlateportCity_BattleTentLobby_Text_ExplainTorment, MSGBOX_DEFAULT release diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc index ff1315923e..b2a71f2b7c 100644 --- a/data/maps/SlateportCity_Harbor/scripts.inc +++ b/data/maps/SlateportCity_Harbor/scripts.inc @@ -11,8 +11,7 @@ SlateportCity_Harbor_MapScripts:: SlateportCity_Harbor_OnTransition: setescapewarp MAP_SLATEPORT_CITY, 28, 13 setvar VAR_TEMP_1, 0 - compare VAR_SLATEPORT_HARBOR_STATE, 1 - call_if_eq SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene + call_if_eq VAR_SLATEPORT_HARBOR_STATE, 1, SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene call_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_ShowSSTidal end @@ -71,14 +70,10 @@ SlateportCity_Harbor_EventScript_AquaEscapeScene:: setvar VAR_SLATEPORT_HARBOR_STATE, 2 setflag FLAG_MET_TEAM_AQUA_HARBOR setflag FLAG_HIDE_LILYCOVE_MOTEL_SCOTT - compare VAR_0x8008, 0 - call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer0 - compare VAR_0x8008, 1 - call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer1 - compare VAR_0x8008, 2 - call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer - compare VAR_0x8008, 3 - call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer + call_if_eq VAR_0x8008, 0, SlateportCity_Harbor_EventScript_SternApproachPlayer0 + call_if_eq VAR_0x8008, 1, SlateportCity_Harbor_EventScript_SternApproachPlayer1 + call_if_eq VAR_0x8008, 2, SlateportCity_Harbor_EventScript_SternApproachPlayer + call_if_eq VAR_0x8008, 3, SlateportCity_Harbor_EventScript_SternApproachPlayer msgbox SlateportCity_Harbor_Text_CaptSternWhyStealMySubmarine, MSGBOX_DEFAULT closemessage setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_1_BLOCKING_ENTRANCE @@ -206,8 +201,7 @@ SlateportCity_Harbor_EventScript_NoTicket:: SlateportCity_Harbor_EventScript_Lilycove:: msgbox SlateportCity_Harbor_Text_LilycoveItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination + goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseNewDestination setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_SLATEPORT call SlateportCity_Harbor_EventScript_BoardFerry warp MAP_SS_TIDAL_CORRIDOR, 1, 10 @@ -217,8 +211,7 @@ SlateportCity_Harbor_EventScript_Lilycove:: SlateportCity_Harbor_EventScript_BattleFrontier:: msgbox SlateportCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination + goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseNewDestination call SlateportCity_Harbor_EventScript_BoardFerry warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67 waitstate @@ -238,10 +231,8 @@ SlateportCity_Harbor_EventScript_BoardFerry:: waitmovement 0 delay 30 hideobjectat VAR_LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR - compare VAR_FACING, DIR_NORTH - call_if_eq SlateportCity_Harbor_EventScript_BoardFerryNorth - compare VAR_FACING, DIR_EAST - call_if_eq SlateportCity_Harbor_EventScript_BoardFerryEast + call_if_eq VAR_FACING, DIR_NORTH, SlateportCity_Harbor_EventScript_BoardFerryNorth + call_if_eq VAR_FACING, DIR_EAST, SlateportCity_Harbor_EventScript_BoardFerryEast delay 30 hideobjectat OBJ_EVENT_ID_PLAYER, 0 setvar VAR_0x8004, LOCALID_SS_TIDAL @@ -279,8 +270,7 @@ SlateportCity_Harbor_EventScript_Sailor:: setvar VAR_0x8004, 0 call_if_set FLAG_DEFEATED_KYOGRE, SlateportCity_Harbor_EventScript_CountDefeatedLegendary call_if_set FLAG_DEFEATED_GROUDON, SlateportCity_Harbor_EventScript_CountDefeatedLegendary - compare VAR_0x8004, 2 @ Defeated both - goto_if_eq SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather + goto_if_eq VAR_0x8004, 2, SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather @ Defeated both msgbox SlateportCity_Harbor_Text_AbnormalWeather, MSGBOX_DEFAULT release end @@ -304,8 +294,7 @@ SlateportCity_Harbor_EventScript_CaptStern:: goto_if_set FLAG_BADGE07_GET, SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment goto_if_set FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE, SlateportCity_Harbor_EventScript_NeedDive goto_if_set FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, SlateportCity_Harbor_EventScript_TeamAquaLeftNeedDive - compare VAR_SLATEPORT_HARBOR_STATE, 2 - goto_if_eq SlateportCity_Harbor_EventScript_WhyStealSubmarine + goto_if_eq VAR_SLATEPORT_HARBOR_STATE, 2, SlateportCity_Harbor_EventScript_WhyStealSubmarine msgbox SlateportCity_Harbor_Text_SameThugsTriedToRobAtMuseum, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection @@ -330,11 +319,9 @@ SlateportCity_Harbor_EventScript_NeedDive:: end SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment:: - compare VAR_TEMP_1, 1 - goto_if_eq SlateportCity_Harbor_EventScript_TradedScanner + goto_if_eq VAR_TEMP_1, 1, SlateportCity_Harbor_EventScript_TradedScanner checkitem ITEM_SCANNER - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_Harbor_EventScript_AskToTradeScanner + goto_if_eq VAR_RESULT, TRUE, SlateportCity_Harbor_EventScript_AskToTradeScanner goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_FerryFinished msgbox SlateportCity_Harbor_Text_WontBeLongBeforeWeFinishFerry, MSGBOX_DEFAULT release @@ -362,11 +349,9 @@ SlateportCity_Harbor_EventScript_ChooseScannerTrade:: SlateportCity_Harbor_EventScript_DeepSeaTooth:: msgbox SlateportCity_Harbor_Text_TradeForDeepSeaTooth, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_Harbor_EventScript_ChooseDifferentTrade + goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseDifferentTrade giveitem ITEM_DEEP_SEA_TOOTH - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull removeitem ITEM_SCANNER msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT setflag FLAG_EXCHANGED_SCANNER @@ -375,11 +360,9 @@ SlateportCity_Harbor_EventScript_DeepSeaTooth:: SlateportCity_Harbor_EventScript_DeepSeaScale:: msgbox SlateportCity_Harbor_Text_TradeForDeepSeaScale, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SlateportCity_Harbor_EventScript_ChooseDifferentTrade + goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseDifferentTrade giveitem ITEM_DEEP_SEA_SCALE - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull removeitem ITEM_SCANNER msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT setflag FLAG_EXCHANGED_SCANNER diff --git a/data/maps/SlateportCity_NameRatersHouse/scripts.inc b/data/maps/SlateportCity_NameRatersHouse/scripts.inc index 3242050e77..34d788a6aa 100644 --- a/data/maps/SlateportCity_NameRatersHouse/scripts.inc +++ b/data/maps/SlateportCity_NameRatersHouse/scripts.inc @@ -5,20 +5,16 @@ SlateportCity_NameRatersHouse_EventScript_NameRater:: lock faceplayer msgbox SlateportCity_NameRatersHouse_Text_PleasedToRateMonNickname, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate - compare VAR_RESULT, NO - goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate + goto_if_eq VAR_RESULT, YES, SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate + goto_if_eq VAR_RESULT, NO, SlateportCity_NameRatersHouse_EventScript_DeclineNameRate end SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate:: msgbox SlateportCity_NameRatersHouse_Text_CritiqueWhichMonNickname, MSGBOX_DEFAULT special ChoosePartyMon waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_ne SlateportCity_NameRatersHouse_EventScript_RateMonNickname - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate + goto_if_ne VAR_0x8004, PARTY_NOTHING_CHOSEN, SlateportCity_NameRatersHouse_EventScript_RateMonNickname + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, SlateportCity_NameRatersHouse_EventScript_DeclineNameRate end SlateportCity_NameRatersHouse_EventScript_DeclineNameRate:: @@ -28,21 +24,16 @@ SlateportCity_NameRatersHouse_EventScript_DeclineNameRate:: SlateportCity_NameRatersHouse_EventScript_RateMonNickname:: specialvar VAR_RESULT, ScriptGetPartyMonSpecies - compare VAR_RESULT, SPECIES_EGG - goto_if_eq SlateportCity_NameRatersHouse_EventScript_CantRateEgg + goto_if_eq VAR_RESULT, SPECIES_EGG, SlateportCity_NameRatersHouse_EventScript_CantRateEgg special BufferMonNickname special IsMonOTIDNotPlayers - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_NameRatersHouse_EventScript_PlayerNotMonsOT + goto_if_eq VAR_RESULT, TRUE, SlateportCity_NameRatersHouse_EventScript_PlayerNotMonsOT specialvar VAR_RESULT, MonOTNameNotPlayer special BufferMonNickname - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_NameRatersHouse_EventScript_PlayerNotMonsOT + goto_if_eq VAR_RESULT, TRUE, SlateportCity_NameRatersHouse_EventScript_PlayerNotMonsOT msgbox SlateportCity_NameRatersHouse_Text_FineNameSuggestBetterOne, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_NameRatersHouse_EventScript_ChangeNickname - compare VAR_RESULT, NO - goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate + goto_if_eq VAR_RESULT, YES, SlateportCity_NameRatersHouse_EventScript_ChangeNickname + goto_if_eq VAR_RESULT, NO, SlateportCity_NameRatersHouse_EventScript_DeclineNameRate end SlateportCity_NameRatersHouse_EventScript_CantRateEgg:: @@ -60,8 +51,7 @@ SlateportCity_NameRatersHouse_EventScript_ChangeNickname:: call Common_EventScript_NameReceivedPartyMon specialvar VAR_RESULT, TryPutNameRaterShowOnTheAir special BufferMonNickname - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_NameRatersHouse_EventScript_NewNameDifferent + goto_if_eq VAR_RESULT, TRUE, SlateportCity_NameRatersHouse_EventScript_NewNameDifferent msgbox SlateportCity_NameRatersHouse_Text_NameNoDifferentYetSuperior, MSGBOX_DEFAULT release end diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc index 901b05e2a5..96892f948d 100644 --- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc @@ -24,8 +24,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight:: SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: showmoneybox 0, 0 msgbox SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee + goto_if_eq VAR_RESULT, YES, SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee closemessage hidemoneybox applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_OceanicMuseum_1F_Movement_PushPlayerBackFromCounter @@ -35,8 +34,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee:: SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee:: checkmoney 50 - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney + goto_if_eq VAR_RESULT, FALSE, SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney playse SE_SHOP removemoney 50 updatemoneybox @@ -154,19 +152,14 @@ SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGrunt:: waitmovement 0 msgbox SlateportCity_OceanicMuseum_1F_Text_RememberMeTakeThis, MSGBOX_DEFAULT giveitem ITEM_TM46 - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NoRoomForThief + goto_if_eq VAR_RESULT, 0, SlateportCity_OceanicMuseum_1F_EventScript_NoRoomForThief setflag FLAG_RECEIVED_TM46 msgbox SlateportCity_OceanicMuseum_1F_Text_HopeINeverSeeYouAgain, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth - compare VAR_FACING, DIR_SOUTH - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitSouth - compare VAR_FACING, DIR_WEST - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast - compare VAR_FACING, DIR_EAST - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast + goto_if_eq VAR_FACING, DIR_NORTH, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth + goto_if_eq VAR_FACING, DIR_SOUTH, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitSouth + goto_if_eq VAR_FACING, DIR_WEST, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast + goto_if_eq VAR_FACING, DIR_EAST, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitWestEast end SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth:: diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc index b993c9fab1..59131fd7ee 100644 --- a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc +++ b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc @@ -21,22 +21,17 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: applymovement LOCALID_GRUNT_1, SlateportCity_OceanicMuseum_2F_Movement_FirstGruntApproach applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_SecondGruntApproach waitmovement 0 - compare VAR_FACING, DIR_SOUTH - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts - compare VAR_FACING, DIR_EAST - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts + call_if_eq VAR_FACING, DIR_SOUTH, SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts + call_if_eq VAR_FACING, DIR_EAST, SlateportCity_OceanicMuseum_2F_EventScript_PlayerFaceGrunts msgbox SlateportCity_OceanicMuseum_2F_Text_WellTakeThoseParts, MSGBOX_DEFAULT - compare VAR_FACING, DIR_EAST - call_if_ne SlateportCity_OceanicMuseum_2F_EventScript_SternFaceGrunts + call_if_ne VAR_FACING, DIR_EAST, SlateportCity_OceanicMuseum_2F_EventScript_SternFaceGrunts msgbox SlateportCity_OceanicMuseum_2F_Text_SternWhoAreYou, MSGBOX_DEFAULT msgbox SlateportCity_OceanicMuseum_2F_Text_WereTeamAqua, MSGBOX_DEFAULT closemessage applymovement LOCALID_GRUNT_2, SlateportCity_OceanicMuseum_2F_Movement_GruntApproachToBattle waitmovement 0 - compare VAR_FACING, DIR_SOUTH - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntSouth - compare VAR_FACING, DIR_WEST - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest + call_if_eq VAR_FACING, DIR_SOUTH, SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntSouth + call_if_eq VAR_FACING, DIR_WEST, SlateportCity_OceanicMuseum_2F_EventScript_PlayerApproachGruntWest trainerbattle_no_intro TRAINER_GRUNT_MUSEUM_1, SlateportCity_OceanicMuseum_2F_Text_Grunt1Defeat msgbox SlateportCity_OceanicMuseum_2F_Text_BossGoingToBeFurious, MSGBOX_DEFAULT closemessage @@ -86,8 +81,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern:: special HealPlayerParty removeobject LOCALID_CAPT_STERN setflag FLAG_HIDE_ROUTE_110_TEAM_AQUA - compare VAR_REGISTER_BIRCH_STATE, 0 - call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch + call_if_eq VAR_REGISTER_BIRCH_STATE, 0, SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch setflag FLAG_DELIVERED_DEVON_GOODS clearflag FLAG_HIDE_ROUTE_116_DEVON_EMPLOYEE setflag FLAG_HIDE_RUSTBORO_CITY_DEVON_CORP_3F_EMPLOYEE diff --git a/data/maps/SlateportCity_PokemonFanClub/scripts.inc b/data/maps/SlateportCity_PokemonFanClub/scripts.inc index 4599548b53..b97e29a028 100644 --- a/data/maps/SlateportCity_PokemonFanClub/scripts.inc +++ b/data/maps/SlateportCity_PokemonFanClub/scripts.inc @@ -26,10 +26,8 @@ SlateportCity_PokemonFanClub_EventScript_ChairmanTryAssessPokemon:: call_if_set FLAG_RECEIVED_PINK_SCARF, SlateportCity_PokemonFanClub_EventScript_CountReceivedScarf call_if_set FLAG_RECEIVED_BLUE_SCARF, SlateportCity_PokemonFanClub_EventScript_CountReceivedScarf call_if_set FLAG_RECEIVED_RED_SCARF, SlateportCity_PokemonFanClub_EventScript_CountReceivedScarf - compare VAR_TEMP_2, CONTEST_CATEGORIES_COUNT - call_if_eq SlateportCity_PokemonFanClub_EventScript_ReceivedAllScarves - compare VAR_SLATEPORT_FAN_CLUB_STATE, 2 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoMoreScarves + call_if_eq VAR_TEMP_2, CONTEST_CATEGORIES_COUNT, SlateportCity_PokemonFanClub_EventScript_ReceivedAllScarves + goto_if_eq VAR_SLATEPORT_FAN_CLUB_STATE, 2, SlateportCity_PokemonFanClub_EventScript_NoMoreScarves msgbox SlateportCity_PokemonFanClub_Text_HowIsYourPokemonGrowing, MSGBOX_DEFAULT goto SlateportCity_PokemonFanClub_EventScript_ChairmanAssessLeadMon end @@ -73,8 +71,7 @@ SlateportCity_PokemonFanClub_EventScript_NoHighConditions:: SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: checkitemspace ITEM_RED_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_RED_SCARF giveitem ITEM_RED_SCARF @@ -84,8 +81,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveRedScarf:: SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: checkitemspace ITEM_BLUE_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_BLUE_SCARF giveitem ITEM_BLUE_SCARF @@ -95,8 +91,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf:: SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: checkitemspace ITEM_PINK_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_PINK_SCARF giveitem ITEM_PINK_SCARF @@ -106,8 +101,7 @@ SlateportCity_PokemonFanClub_EventScript_GivePinkScarf:: SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: checkitemspace ITEM_GREEN_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_GREEN_SCARF giveitem ITEM_GREEN_SCARF @@ -117,8 +111,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf:: SlateportCity_PokemonFanClub_EventScript_GiveYellowScarf:: checkitemspace ITEM_YELLOW_SCARF - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT setflag FLAG_RECEIVED_YELLOW_SCARF giveitem ITEM_YELLOW_SCARF @@ -133,8 +126,7 @@ SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf:: SlateportCity_PokemonFanClub_EventScript_CheckMonCool:: specialvar VAR_RESULT, CheckLeadMonCool - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonCool + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonCool return SlateportCity_PokemonFanClub_EventScript_SetMonCool:: @@ -143,8 +135,7 @@ SlateportCity_PokemonFanClub_EventScript_SetMonCool:: SlateportCity_PokemonFanClub_EventScript_CheckMonBeauty:: specialvar VAR_RESULT, CheckLeadMonBeauty - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonBeauty + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonBeauty return SlateportCity_PokemonFanClub_EventScript_SetMonBeauty:: @@ -153,8 +144,7 @@ SlateportCity_PokemonFanClub_EventScript_SetMonBeauty:: SlateportCity_PokemonFanClub_EventScript_CheckMonCute:: specialvar VAR_RESULT, CheckLeadMonCute - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonCute + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonCute return SlateportCity_PokemonFanClub_EventScript_SetMonCute:: @@ -163,8 +153,7 @@ SlateportCity_PokemonFanClub_EventScript_SetMonCute:: SlateportCity_PokemonFanClub_EventScript_CheckMonSmart:: specialvar VAR_RESULT, CheckLeadMonSmart - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonSmart + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonSmart return SlateportCity_PokemonFanClub_EventScript_SetMonSmart:: @@ -173,8 +162,7 @@ SlateportCity_PokemonFanClub_EventScript_SetMonSmart:: SlateportCity_PokemonFanClub_EventScript_CheckMonTough:: specialvar VAR_RESULT, CheckLeadMonTough - compare VAR_RESULT, TRUE - call_if_eq SlateportCity_PokemonFanClub_EventScript_SetMonTough + call_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_SetMonTough return SlateportCity_PokemonFanClub_EventScript_SetMonTough:: @@ -204,8 +192,7 @@ SlateportCity_PokemonFanClub_EventScript_SootheBellWoman:: goto_if_set FLAG_RECEIVED_SOOTHE_BELL, SlateportCity_PokemonFanClub_EventScript_ReceivedSootheBell msgbox SlateportCity_PokemonFanClub_Text_ShowMePokemonThatLoveYou, MSGBOX_DEFAULT specialvar VAR_RESULT, GetLeadMonFriendshipScore - compare VAR_RESULT, 4 - goto_if_ge SlateportCity_PokemonFanClub_EventScript_GiveSootheBell + goto_if_ge VAR_RESULT, 4, SlateportCity_PokemonFanClub_EventScript_GiveSootheBell release end @@ -217,8 +204,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveSootheBell:: waitmovement 0 msgbox SlateportCity_PokemonFanClub_Text_PokemonAdoresYou, MSGBOX_DEFAULT giveitem ITEM_SOOTHE_BELL - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_SOOTHE_BELL release end diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index 92a97ac4c4..69f74880ec 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -51,32 +51,20 @@ SootopolisCity_EventScript_LockGymDoor:: SootopolisCity_OnTransition: setflag FLAG_VISITED_SOOTOPOLIS_CITY - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - call_if_eq SootopolisCity_EventScript_HideMapNamePopup - compare VAR_SKY_PILLAR_STATE, 1 - call_if_eq SootopolisCity_EventScript_HideMapNamePopup + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_HideMapNamePopup + call_if_eq VAR_SKY_PILLAR_STATE, 1, SootopolisCity_EventScript_HideMapNamePopup call SootopolisCity_EventScript_SetWeather call SootopolisCity_EventScript_SetLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - call_if_eq SootopolisCity_EventScript_SetBattleSpectators - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - call_if_eq SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - call_if_eq SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - call_if_eq SootopolisCity_EventScript_SetExitCaveOfOriginObjPos - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - call_if_eq SootopolisCity_EventScript_SetOutsideGymObjPos - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - call_if_eq SootopolisCity_EventScript_SetExpertBlockCaveEntrance + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_SetBattleSpectators + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SootopolisCity_EventScript_CheckSetEnterCaveOfOriginObjPos + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_SetExitCaveOfOriginObjPos + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_SetOutsideGymObjPos + call_if_eq VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_SetExpertBlockCaveEntrance end SootopolisCity_EventScript_HideMapNamePopup:: @@ -95,20 +83,13 @@ SootopolisCity_EventScript_SetBattleSpectators:: return SootopolisCity_EventScript_SetLayout:: - compare VAR_SOOTOPOLIS_CITY_STATE, 0 - goto_if_eq SootopolisCity_EventScript_SetNormalLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_SetNormalLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_eq SootopolisCity_EventScript_SetLegendariesLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - goto_if_eq SootopolisCity_EventScript_SetLegendariesLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - goto_if_eq SootopolisCity_EventScript_SetLegendariesLayout - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - goto_if_eq SootopolisCity_EventScript_SetLegendariesLayout - compare VAR_SKY_PILLAR_STATE, 1 - goto_if_le SootopolisCity_EventScript_SetLegendariesLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 0, SootopolisCity_EventScript_SetNormalLayout + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_SetNormalLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_SetLegendariesLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_SetLegendariesLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SootopolisCity_EventScript_SetLegendariesLayout + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_SetLegendariesLayout + goto_if_le VAR_SKY_PILLAR_STATE, 1, SootopolisCity_EventScript_SetLegendariesLayout return SootopolisCity_EventScript_SetNormalLayout:: @@ -119,16 +100,11 @@ SootopolisCity_EventScript_SetLegendariesLayout:: return SootopolisCity_EventScript_SetWeather:: - compare VAR_SOOTOPOLIS_CITY_STATE, 0 - goto_if_eq SootopolisCity_EventScript_SetNormalWeather - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_SetNormalWeather - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_eq SootopolisCity_EventScript_SetDownpour - compare VAR_SKY_PILLAR_STATE, 1 - goto_if_eq SootopolisCity_EventScript_SetDownpour - compare VAR_SKY_PILLAR_STATE, 1 - goto_if_le Common_EventScript_SetAbnormalWeather + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 0, SootopolisCity_EventScript_SetNormalWeather + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_SetNormalWeather + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_SetDownpour + goto_if_eq VAR_SKY_PILLAR_STATE, 1, SootopolisCity_EventScript_SetDownpour + goto_if_le VAR_SKY_PILLAR_STATE, 1, Common_EventScript_SetAbnormalWeather return SootopolisCity_EventScript_SetNormalWeather:: @@ -158,12 +134,9 @@ SootopolisCity_EventScript_SetOutsideGymObjPos:: setobjectxyperm LOCALID_STEVEN, 29, 33 setobjectxyperm LOCALID_MAXIE, 33, 35 setobjectxyperm LOCALID_ARCHIE, 34, 35 - compare VAR_SOOTOPOLIS_WALLACE_STATE, 0 - call_if_eq SootopolisCity_EventScript_SetWallaceMiddle - compare VAR_SOOTOPOLIS_WALLACE_STATE, 1 - call_if_eq SootopolisCity_EventScript_SetWallaceRight - compare VAR_SOOTOPOLIS_WALLACE_STATE, 2 - call_if_eq SootopolisCity_EventScript_SetWallaceLeft + call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 0, SootopolisCity_EventScript_SetWallaceMiddle + call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 1, SootopolisCity_EventScript_SetWallaceRight + call_if_eq VAR_SOOTOPOLIS_WALLACE_STATE, 2, SootopolisCity_EventScript_SetWallaceLeft return SootopolisCity_EventScript_SetWallaceMiddle:: @@ -190,10 +163,8 @@ SootopolisCity_OnWarp: .2byte 0 SootopolisCity_EventScript_PlayerFaceLegendaries:: - compare VAR_SKY_PILLAR_STATE, 1 - call_if_eq SootopolisCity_EventScript_PlayerFaceLegendaries1 - compare VAR_SKY_PILLAR_STATE, 2 - call_if_eq SootopolisCity_EventScript_PlayerFaceLegendaries2 + call_if_eq VAR_SKY_PILLAR_STATE, 1, SootopolisCity_EventScript_PlayerFaceLegendaries1 + call_if_eq VAR_SKY_PILLAR_STATE, 2, SootopolisCity_EventScript_PlayerFaceLegendaries2 end SootopolisCity_EventScript_PlayerFaceLegendaries1:: @@ -218,10 +189,8 @@ SootopolisCity_OnFrame: SootopolisCity_EventScript_StartLegendariesScene:: lockall special StorePlayerCoordsInVars - compare VAR_0x8004, 43 - goto_if_ne SootopolisCity_EventScript_LegendariesSceneFromDive - compare VAR_0x8005, 32 - goto_if_ne SootopolisCity_EventScript_LegendariesSceneFromDive + goto_if_ne VAR_0x8004, 43, SootopolisCity_EventScript_LegendariesSceneFromDive + goto_if_ne VAR_0x8005, 32, SootopolisCity_EventScript_LegendariesSceneFromDive goto SootopolisCity_EventScript_LegendariesSceneFromPokeCenter end @@ -509,10 +478,8 @@ SootopolisCity_Movement_GroudonIdle: SootopolisCity_EventScript_StartRayquazaScene:: lockall special StorePlayerCoordsInVars - compare VAR_0x8004, 43 - goto_if_ne SootopolisCity_EventScript_RayquazaSceneFromDive - compare VAR_0x8005, 32 - goto_if_ne SootopolisCity_EventScript_RayquazaSceneFromDive + goto_if_ne VAR_0x8004, 43, SootopolisCity_EventScript_RayquazaSceneFromDive + goto_if_ne VAR_0x8005, 32, SootopolisCity_EventScript_RayquazaSceneFromDive goto SootopolisCity_EventScript_RayquazaSceneFromPokeCenter end @@ -717,12 +684,9 @@ SootopolisCity_Movement_UnusedPanBack: SootopolisCity_EventScript_CaveOfOriginExpert:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_ExpertPostLegendaries - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_ExpertLegendaries - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - goto_if_ge SootopolisCity_EventScript_ExpertLeadToCave + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_ExpertPostLegendaries + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_ExpertLegendaries + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_ExpertLeadToCave msgbox SootopolisCity_Text_CaveOfOriginPleaseLeave, MSGBOX_DEFAULT release end @@ -745,12 +709,9 @@ SootopolisCity_EventScript_ExpertLegendaries:: SootopolisCity_EventScript_Kiri:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_le SootopolisCity_EventScript_KiriGiveBerry - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_KiriGiveBerry - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_KiriRayquaza + goto_if_le VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_KiriGiveBerry + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_KiriGiveBerry + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_KiriRayquaza msgbox SootopolisCity_Text_BigPokemonFighting, MSGBOX_DEFAULT closemessage applymovement LOCALID_KIRI, Common_Movement_FaceOriginalDirection @@ -774,37 +735,31 @@ SootopolisCity_EventScript_KiriGiveBerry:: addvar VAR_RESULT, NUM_KIRI_BERRIES_SKIPPED addvar VAR_RESULT, FIRST_BERRY_INDEX giveitem VAR_RESULT - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_DAILY_SOOTOPOLIS_RECEIVED_BERRY msgbox SootopolisCity_Text_GiveYouThisBerryToo, MSGBOX_DEFAULT random 2 - compare VAR_RESULT, 0 - goto_if_eq SootopolisCity_EventScript_GiveFigyBerry - compare VAR_RESULT, 1 - goto_if_eq SootopolisCity_EventScript_GiveIapapaBerry + goto_if_eq VAR_RESULT, 0, SootopolisCity_EventScript_GiveFigyBerry + goto_if_eq VAR_RESULT, 1, SootopolisCity_EventScript_GiveIapapaBerry end SootopolisCity_EventScript_GiveFigyBerry:: giveitem ITEM_FIGY_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox SootopolisCity_Text_WhatKindOfWishInYourName, MSGBOX_DEFAULT release end SootopolisCity_EventScript_GiveIapapaBerry:: giveitem ITEM_IAPAPA_BERRY - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox SootopolisCity_Text_WhatKindOfWishInYourName, MSGBOX_DEFAULT release end SootopolisCity_EventScript_KiriReceivedBerry:: msgbox SootopolisCity_Text_LikeSeasonBornIn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SootopolisCity_EventScript_KiriLikeSeasonBornIn + goto_if_eq VAR_RESULT, YES, SootopolisCity_EventScript_KiriLikeSeasonBornIn msgbox SootopolisCity_Text_OhDoesntMatter, MSGBOX_DEFAULT release end @@ -818,8 +773,7 @@ SootopolisCity_EventScript_Woman2:: lockall applymovement LOCALID_WOMAN_2, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_Woman2Rayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Woman2Rayquaza msgbox SootopolisCity_Text_WeatherWentWild, MSGBOX_DEFAULT closemessage applymovement LOCALID_WOMAN_2, Common_Movement_FaceOriginalDirection @@ -835,8 +789,7 @@ SootopolisCity_EventScript_Woman2Rayquaza:: SootopolisCity_EventScript_Man:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_ManPostLegendaries + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_ManPostLegendaries msgbox SootopolisCity_Text_NoOrdinaryTourist, MSGBOX_DEFAULT release end @@ -849,12 +802,9 @@ SootopolisCity_EventScript_ManPostLegendaries:: SootopolisCity_EventScript_Woman1:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_Woman1PostLegendaries - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_Woman1Rayquaza - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - goto_if_ge SootopolisCity_EventScript_Woman1Legendaries + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_Woman1PostLegendaries + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Woman1Rayquaza + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_Woman1Legendaries msgbox SootopolisCity_Text_SootopolisSkyBeautiful, MSGBOX_DEFAULT release end @@ -881,12 +831,9 @@ SootopolisCity_EventScript_NinjaBoy:: lockall applymovement LOCALID_NINJA_BOY, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_NinjaBoyRayquaza - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_NinjaBoyNormal - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_le SootopolisCity_EventScript_NinjaBoyNormal + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_NinjaBoyRayquaza + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_NinjaBoyNormal + goto_if_le VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_NinjaBoyNormal msgbox SootopolisCity_Text_ThisIsWicked, MSGBOX_DEFAULT closemessage applymovement LOCALID_NINJA_BOY, Common_Movement_FaceOriginalDirection @@ -908,13 +855,10 @@ SootopolisCity_EventScript_Boy1:: lockall applymovement LOCALID_BOY_1, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_Boy1Rayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Boy1Rayquaza goto_if_set FLAG_SYS_GAME_CLEAR, SootopolisCity_EventScript_Boy1GameClear - compare VAR_SOOTOPOLIS_CITY_STATE, 6 - goto_if_ge SootopolisCity_EventScript_Boy1Normal - compare VAR_SOOTOPOLIS_CITY_STATE, 1 - goto_if_le SootopolisCity_EventScript_Boy1Normal + goto_if_ge VAR_SOOTOPOLIS_CITY_STATE, 6, SootopolisCity_EventScript_Boy1Normal + goto_if_le VAR_SOOTOPOLIS_CITY_STATE, 1, SootopolisCity_EventScript_Boy1Normal msgbox SootopolisCity_Text_GiantPokemonSuddenlyAppeared, MSGBOX_DEFAULT closemessage applymovement LOCALID_BOY_1, Common_Movement_FaceOriginalDirection @@ -954,12 +898,9 @@ SootopolisCity_EventScript_Steven:: applymovement LOCALID_STEVEN, Common_Movement_FacePlayer waitmovement 0 call_if_unset FLAG_STEVEN_GUIDES_TO_CAVE_OF_ORIGIN, SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin - compare VAR_SOOTOPOLIS_CITY_STATE, 2 - goto_if_eq SootopolisCity_EventScript_StevenHelpWallace - compare VAR_SOOTOPOLIS_CITY_STATE, 3 - goto_if_eq SootopolisCity_EventScript_StevenHelpedWallace - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - goto_if_eq SootopolisCity_EventScript_StevenHelpedWallace + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 2, SootopolisCity_EventScript_StevenHelpWallace + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 3, SootopolisCity_EventScript_StevenHelpedWallace + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_StevenHelpedWallace goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, SootopolisCity_EventScript_StevenMaxieArchieLeft msgbox SootopolisCity_Text_SoThatsRayquaza, MSGBOX_DEFAULT releaseall @@ -983,10 +924,8 @@ SootopolisCity_EventScript_StevenHelpedWallace:: SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin:: msgbox SootopolisCity_Text_InvolvedWithCrisisComeWithMe, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_WEST - call_if_eq SootopolisCity_EventScript_StartWalkToCaveOfOriginWest - compare VAR_FACING, DIR_NORTH - call_if_eq SootopolisCity_EventScript_StartWalkToCaveOfOriginNorth + call_if_eq VAR_FACING, DIR_WEST, SootopolisCity_EventScript_StartWalkToCaveOfOriginWest + call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_EventScript_StartWalkToCaveOfOriginNorth msgbox SootopolisCity_Text_DoesThisMakeYourFearPokemon, MSGBOX_DEFAULT closemessage applymovement LOCALID_STEVEN, SootopolisCity_Movement_StevenWalkToCaveOfOrigin @@ -1287,8 +1226,7 @@ SootopolisCity_EventScript_Boy2:: lockall applymovement LOCALID_BOY_2, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_Boy2Rayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_Boy2Rayquaza msgbox SootopolisCity_Text_TwoPokemonArentAngry, MSGBOX_DEFAULT closemessage applymovement LOCALID_BOY_2, Common_Movement_FaceOriginalDirection @@ -1304,8 +1242,7 @@ SootopolisCity_EventScript_Boy2Rayquaza:: SootopolisCity_EventScript_BlackBelt:: lockall - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_BlackBeltRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_BlackBeltRayquaza msgbox SootopolisCity_Text_GoRedAndBlueMon, MSGBOX_DEFAULT closemessage applymovement LOCALID_BLACK_BELT, Common_Movement_FacePlayer @@ -1328,8 +1265,7 @@ SootopolisCity_EventScript_Girl:: lockall applymovement LOCALID_GIRL, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_GirlRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_GirlRayquaza msgbox SootopolisCity_Text_SootopolisWillBeWrecked, MSGBOX_DEFAULT closemessage applymovement LOCALID_GIRL, Common_Movement_FaceOriginalDirection @@ -1347,8 +1283,7 @@ SootopolisCity_EventScript_Maniac:: lockall applymovement LOCALID_MANIAC, Common_Movement_FacePlayer waitmovement 0 - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_ManiacRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_ManiacRayquaza msgbox SootopolisCity_Text_SeeingLegendWithOwnEyes, MSGBOX_DEFAULT closemessage applymovement LOCALID_MANIAC, Common_Movement_FaceOriginalDirection @@ -1364,8 +1299,7 @@ SootopolisCity_EventScript_ManiacRayquaza:: SootopolisCity_EventScript_Wallace:: lock faceplayer - compare VAR_SOOTOPOLIS_CITY_STATE, 4 - goto_if_eq SootopolisCity_EventScript_GoToSkyPillar + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_GoToSkyPillar goto_if_set FLAG_RECEIVED_HM07, SootopolisCity_EventScript_GoToGym goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, SootopolisCity_EventScript_GiveWaterfall msgbox SootopolisCity_Text_AquaMagmaDidntMeanHarm, MSGBOX_DEFAULT @@ -1378,12 +1312,9 @@ SootopolisCity_EventScript_GiveWaterfall:: setflag FLAG_RECEIVED_HM07 msgbox SootopolisCity_Text_ExplainWaterfallGoToGym, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq SootopolisCity_EventScript_WallaceMoveFromGym - compare VAR_FACING, DIR_EAST - call_if_eq SootopolisCity_EventScript_WallaceMoveFromGym - compare VAR_FACING, DIR_WEST - call_if_eq SootopolisCity_EventScript_WallaceMoveFromGymWest + call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_EventScript_WallaceMoveFromGym + call_if_eq VAR_FACING, DIR_EAST, SootopolisCity_EventScript_WallaceMoveFromGym + call_if_eq VAR_FACING, DIR_WEST, SootopolisCity_EventScript_WallaceMoveFromGymWest release end @@ -1423,8 +1354,7 @@ SootopolisCity_Movement_WallaceMoveFromGymWest: SootopolisCity_EventScript_Maxie:: lockall - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_MaxieRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_MaxieRayquaza msgbox SootopolisCity_Text_GroudonPleaseStop, MSGBOX_DEFAULT closemessage releaseall @@ -1439,8 +1369,7 @@ SootopolisCity_EventScript_MaxieRayquaza:: SootopolisCity_EventScript_Archie:: lockall - compare VAR_SOOTOPOLIS_CITY_STATE, 5 - goto_if_eq SootopolisCity_EventScript_ArchieRayquaza + goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 5, SootopolisCity_EventScript_ArchieRayquaza msgbox SootopolisCity_Text_KyogreCalmDown, MSGBOX_DEFAULT closemessage releaseall diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc index 4a21dcdcdb..7f739935b1 100644 --- a/data/maps/SootopolisCity_Gym_1F/scripts.inc +++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc @@ -19,12 +19,9 @@ SootopolisCity_Gym_1F_OnLoad: end SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles:: - compare VAR_ICE_STEP_COUNT, 8 - goto_if_lt SootopolisCity_Gym_1F_EventScript_StopCheckingStairs @ All stairs ice - compare VAR_ICE_STEP_COUNT, 28 - goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstStairs - compare VAR_ICE_STEP_COUNT, 67 - goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs + goto_if_lt VAR_ICE_STEP_COUNT, 8, SootopolisCity_Gym_1F_EventScript_StopCheckingStairs @ All stairs ice + goto_if_lt VAR_ICE_STEP_COUNT, 28, SootopolisCity_Gym_1F_EventScript_OpenFirstStairs + goto_if_lt VAR_ICE_STEP_COUNT, 67, SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs setmetatile 8, 4, METATILE_SootopolisGym_Stairs, FALSE setmetatile 8, 5, METATILE_SootopolisGym_Stairs, FALSE SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs:: @@ -85,8 +82,7 @@ SootopolisCity_Gym_1F_Movement_FallThroughIce: SootopolisCity_Gym_1F_EventScript_Juan:: trainerbattle_single TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_JuanIntro, SootopolisCity_Gym_1F_Text_JuanDefeat, SootopolisCity_Gym_1F_EventScript_JuanDefeated, NO_MUSIC specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq SootopolisCity_Gym_1F_EventScript_JuanRematch + goto_if_eq VAR_RESULT, TRUE, SootopolisCity_Gym_1F_EventScript_JuanRematch goto_if_unset FLAG_RECEIVED_TM03, SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2 goto_if_unset FLAG_BADGE06_GET, SootopolisCity_Gym_1F_EventScript_GoGetFortreeBadge msgbox SootopolisCity_Gym_1F_Text_JuanPostBattle, MSGBOX_DEFAULT @@ -121,16 +117,14 @@ SootopolisCity_Gym_1F_EventScript_JuanDefeated:: SootopolisCity_Gym_1F_EventScript_GiveWaterPulse:: giveitem ITEM_TM03 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_BagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM03 return SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2:: giveitem ITEM_TM03 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT setflag FLAG_RECEIVED_TM03 release diff --git a/data/maps/SootopolisCity_House1/scripts.inc b/data/maps/SootopolisCity_House1/scripts.inc index 65df8587f3..40f22a9c1f 100644 --- a/data/maps/SootopolisCity_House1/scripts.inc +++ b/data/maps/SootopolisCity_House1/scripts.inc @@ -7,8 +7,7 @@ SootopolisCity_House1_EventScript_BrickBreakBlackBelt:: goto_if_set FLAG_RECEIVED_TM31, SootopolisCity_House1_EventScript_ReceivedBrickBreak msgbox SootopolisCity_House1_Text_DevelopedThisTM, MSGBOX_DEFAULT giveitem ITEM_TM31 - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM31 msgbox SootopolisCity_House1_Text_ExplainBrickBreak, MSGBOX_DEFAULT release diff --git a/data/maps/SootopolisCity_House2/scripts.inc b/data/maps/SootopolisCity_House2/scripts.inc index a9c2ed255d..68cf96a906 100644 --- a/data/maps/SootopolisCity_House2/scripts.inc +++ b/data/maps/SootopolisCity_House2/scripts.inc @@ -5,10 +5,8 @@ SootopolisCity_House2_EventScript_ExpertF:: lock faceplayer msgbox SootopolisCity_House2_Text_DidYouKnowAboutMtPyreOrbs, MSGBOX_YESNO - compare VAR_RESULT, YES - call_if_eq SootopolisCity_House2_EventScript_KnowAboutOrbs - compare VAR_RESULT, NO - call_if_eq SootopolisCity_House2_EventScript_DontKnowAboutOrbs + call_if_eq VAR_RESULT, YES, SootopolisCity_House2_EventScript_KnowAboutOrbs + call_if_eq VAR_RESULT, NO, SootopolisCity_House2_EventScript_DontKnowAboutOrbs release end diff --git a/data/maps/SootopolisCity_House3/scripts.inc b/data/maps/SootopolisCity_House3/scripts.inc index 02546968b5..621738c4f1 100644 --- a/data/maps/SootopolisCity_House3/scripts.inc +++ b/data/maps/SootopolisCity_House3/scripts.inc @@ -5,8 +5,7 @@ SootopolisCity_House3_EventScript_Woman:: lock faceplayer msgbox SootopolisCity_House3_Text_JuanHasManyFansDoYou, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SootopolisCity_House3_EventScript_HaveFans + goto_if_eq VAR_RESULT, YES, SootopolisCity_House3_EventScript_HaveFans msgbox SootopolisCity_House3_Text_LonesomeTryWorkingHarder, MSGBOX_DEFAULT release end diff --git a/data/maps/SootopolisCity_House6/scripts.inc b/data/maps/SootopolisCity_House6/scripts.inc index fd570fc683..35f7acc7b5 100644 --- a/data/maps/SootopolisCity_House6/scripts.inc +++ b/data/maps/SootopolisCity_House6/scripts.inc @@ -6,12 +6,10 @@ SootopolisCity_House6_EventScript_Woman:: faceplayer goto_if_set FLAG_RECEIVED_WAILMER_DOLL, SootopolisCity_House6_EventScript_ReceivedWailmerDoll msgbox SootopolisCity_House6_Text_FirstGuestInWhileTakeDoll, MSGBOX_YESNO - compare VAR_RESULT, NO - call_if_eq SootopolisCity_House6_EventScript_DeclineWailmerDoll + call_if_eq VAR_RESULT, NO, SootopolisCity_House6_EventScript_DeclineWailmerDoll msgbox SootopolisCity_House6_Text_TakeGoodCareOfIt, MSGBOX_DEFAULT givedecoration DECOR_WAILMER_DOLL - compare VAR_RESULT, FALSE - goto_if_eq SootopolisCity_House6_EventScript_NoRoomForWailmerDoll + goto_if_eq VAR_RESULT, FALSE, SootopolisCity_House6_EventScript_NoRoomForWailmerDoll setflag FLAG_RECEIVED_WAILMER_DOLL release end diff --git a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc index 5620bb3e46..52bdf3acee 100644 --- a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc +++ b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc @@ -9,15 +9,11 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SeedotBrother:: special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 - compare VAR_RESULT, PARTY_NOTHING_CHOSEN - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot + goto_if_eq VAR_RESULT, PARTY_NOTHING_CHOSEN, SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot special CompareSeedotSize - compare VAR_RESULT, 1 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_NotSeedot - compare VAR_RESULT, 2 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_SmallSeedot - compare VAR_RESULT, 3 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_BigSeedot + goto_if_eq VAR_RESULT, 1, SootopolisCity_LotadAndSeedotHouse_EventScript_NotSeedot + goto_if_eq VAR_RESULT, 2, SootopolisCity_LotadAndSeedotHouse_EventScript_SmallSeedot + goto_if_eq VAR_RESULT, 3, SootopolisCity_LotadAndSeedotHouse_EventScript_BigSeedot release end @@ -39,8 +35,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SmallSeedot:: SootopolisCity_LotadAndSeedotHouse_EventScript_BigSeedot:: msgbox SootopolisCity_LotadAndSeedotHouse_Text_GoshMightBeBiggerThanLotad, MSGBOX_DEFAULT giveitem ITEM_ELIXIR - compare VAR_RESULT, FALSE - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_NoRoomForElixir1 + goto_if_eq VAR_RESULT, FALSE, SootopolisCity_LotadAndSeedotHouse_EventScript_NoRoomForElixir1 closemessage release end @@ -58,15 +53,11 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_LotadBrother:: special ChoosePartyMon waitstate copyvar VAR_RESULT, VAR_0x8004 - compare VAR_RESULT, PARTY_NOTHING_CHOSEN - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad + goto_if_eq VAR_RESULT, PARTY_NOTHING_CHOSEN, SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad special CompareLotadSize - compare VAR_RESULT, 1 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_NotLotad - compare VAR_RESULT, 2 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_SmallLotad - compare VAR_RESULT, 3 - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_BigLotad + goto_if_eq VAR_RESULT, 1, SootopolisCity_LotadAndSeedotHouse_EventScript_NotLotad + goto_if_eq VAR_RESULT, 2, SootopolisCity_LotadAndSeedotHouse_EventScript_SmallLotad + goto_if_eq VAR_RESULT, 3, SootopolisCity_LotadAndSeedotHouse_EventScript_BigLotad release end @@ -88,8 +79,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SmallLotad:: SootopolisCity_LotadAndSeedotHouse_EventScript_BigLotad:: msgbox SootopolisCity_LotadAndSeedotHouse_Text_WowMightBeBiggerThanSeedot, MSGBOX_DEFAULT giveitem ITEM_ELIXIR - compare VAR_RESULT, FALSE - goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_NoRoomForElixir2 + goto_if_eq VAR_RESULT, FALSE, SootopolisCity_LotadAndSeedotHouse_EventScript_NoRoomForElixir2 closemessage release end diff --git a/data/maps/SootopolisCity_Mart/scripts.inc b/data/maps/SootopolisCity_Mart/scripts.inc index 0975abd2b0..3cade5fbc4 100644 --- a/data/maps/SootopolisCity_Mart/scripts.inc +++ b/data/maps/SootopolisCity_Mart/scripts.inc @@ -29,8 +29,7 @@ SootopolisCity_Mart_Pokemart: SootopolisCity_Mart_EventScript_FatMan:: lock faceplayer - compare VAR_SKY_PILLAR_STATE, 2 - goto_if_ge SootopolisCity_Mart_EventScript_FatManNoLegendaries + goto_if_ge VAR_SKY_PILLAR_STATE, 2, SootopolisCity_Mart_EventScript_FatManNoLegendaries goto_if_unset FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_Mart_EventScript_FatManNoLegendaries msgbox SootopolisCity_Mart_Text_TooScaryOutside, MSGBOX_DEFAULT release @@ -44,8 +43,7 @@ SootopolisCity_Mart_EventScript_FatManNoLegendaries:: SootopolisCity_Mart_EventScript_Gentleman:: lock faceplayer - compare VAR_SKY_PILLAR_STATE, 2 - goto_if_ge SootopolisCity_Mart_EventScript_GentlemanNoLegendaries + goto_if_ge VAR_SKY_PILLAR_STATE, 2, SootopolisCity_Mart_EventScript_GentlemanNoLegendaries goto_if_unset FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_Mart_EventScript_GentlemanNoLegendaries msgbox SootopolisCity_Mart_Text_DidSomethingAwaken, MSGBOX_DEFAULT release diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc index 70dbc98aa5..374adbfc66 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc @@ -7,10 +7,8 @@ SootopolisCity_MysteryEventsHouse_1F_MapScripts:: SootopolisCity_MysteryEventsHouse_1F_OnTransition: frontier_checkvisittrainer - compare VAR_RESULT, 0 - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout - compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0 - call_if_ne SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor + call_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout + call_if_ne VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor end SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout:: @@ -40,12 +38,9 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle:: copyobjectxytoperm LOCALID_OLD_MAN applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp waitmovement 0 - compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1 - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment - compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2 - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment - compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3 - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment + call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment + call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment + call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment special LoadPlayerParty setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0 releaseall @@ -76,10 +71,8 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_OldMan:: lock faceplayer frontier_checkvisittrainer - compare VAR_RESULT, 1 - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer - compare VAR_TEMP_1, 1 - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting + goto_if_eq VAR_RESULT, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer + goto_if_eq VAR_TEMP_1, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting msgbox SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles, MSGBOX_DEFAULT release end @@ -93,28 +86,21 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting:: special SavePlayerParty special BufferEReaderTrainerName msgbox SootopolisCity_MysteryEventsHouse_1F_Text_ChallengeVisitingTrainer, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle call SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty - compare VAR_RESULT, 0 - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle msgbox SootopolisCity_MysteryEventsHouse_1F_Text_SaveProgressBeforeBattle, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle special LoadPlayerParty call Common_EventScript_SaveGame - compare VAR_RESULT, FALSE - goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle + goto_if_eq VAR_RESULT, FALSE, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle special SavePlayerParty special ReducePlayerPartyToSelectedMons msgbox SootopolisCity_MysteryEventsHouse_1F_Text_HopeToSeeGoodMatch, MSGBOX_DEFAULT closemessage - compare VAR_FACING, DIR_NORTH - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth - compare VAR_FACING, DIR_EAST - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast - compare VAR_FACING, DIR_WEST - call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest + call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth + call_if_eq VAR_FACING, DIR_EAST, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast + call_if_eq VAR_FACING, DIR_WEST, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 3, 1 waitstate release diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc index 93f0089251..533eb7cfa5 100644 --- a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc +++ b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc @@ -22,12 +22,9 @@ SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleVisitingTrainer:: setvar VAR_0x8005, 0 special DoSpecialTrainerBattle waitstate - compare VAR_RESULT, B_OUTCOME_DREW - call_if_eq SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleTie - compare VAR_RESULT, B_OUTCOME_WON - call_if_eq SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleWon - compare VAR_RESULT, B_OUTCOME_LOST - call_if_eq SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleLost + call_if_eq VAR_RESULT, B_OUTCOME_DREW, SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleTie + call_if_eq VAR_RESULT, B_OUTCOME_WON, SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleWon + call_if_eq VAR_RESULT, B_OUTCOME_LOST, SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleLost closemessage special HealPlayerParty applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_MysteryEventsHouse_B1F_Movement_PlayerExitBasement diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc index 9e017861b7..e1e13b35c8 100644 --- a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc @@ -20,8 +20,7 @@ SootopolisCity_PokemonCenter_1F_EventScript_Nurse:: SootopolisCity_PokemonCenter_1F_EventScript_Gentleman:: lock faceplayer - compare VAR_SKY_PILLAR_STATE, 2 - goto_if_ge SootopolisCity_PokemonCenter_1F_EventScript_GentlemanNoLegendaries + goto_if_ge VAR_SKY_PILLAR_STATE, 2, SootopolisCity_PokemonCenter_1F_EventScript_GentlemanNoLegendaries goto_if_unset FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_PokemonCenter_1F_EventScript_GentlemanNoLegendaries msgbox SootopolisCity_PokemonCenter_1F_Text_EveryoneTakenRefuge, MSGBOX_DEFAULT release @@ -35,8 +34,7 @@ SootopolisCity_PokemonCenter_1F_EventScript_GentlemanNoLegendaries:: SootopolisCity_PokemonCenter_1F_EventScript_Woman:: lock faceplayer - compare VAR_SKY_PILLAR_STATE, 2 - goto_if_ge SootopolisCity_PokemonCenter_1F_EventScript_WomanNoLegendaries + goto_if_ge VAR_SKY_PILLAR_STATE, 2, SootopolisCity_PokemonCenter_1F_EventScript_WomanNoLegendaries goto_if_unset FLAG_KYOGRE_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_PokemonCenter_1F_EventScript_WomanNoLegendaries msgbox SootopolisCity_PokemonCenter_1F_Text_ArentPokemonOurFriends, MSGBOX_DEFAULT release diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc index e40c7819ed..b393413fe3 100644 --- a/data/maps/SouthernIsland_Exterior/scripts.inc +++ b/data/maps/SouthernIsland_Exterior/scripts.inc @@ -13,8 +13,7 @@ SouthernIsland_Exterior_EventScript_Sailor:: lock faceplayer msgbox EventTicket_Text_SouthernIslandSailBack, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SouthernIsland_Exterior_EventScript_AsYouLike + goto_if_eq VAR_RESULT, NO, SouthernIsland_Exterior_EventScript_AsYouLike msgbox EventTicket_Text_SailHome, MSGBOX_DEFAULT closemessage applymovement VAR_LAST_TALKED, Common_Movement_WalkInPlaceFasterDown diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 4ce90e249f..c46cefefc6 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -11,16 +11,13 @@ SouthernIsland_Interior_OnResume: SouthernIsland_Interior_EventScript_TryRemoveLati:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_LATI return SouthernIsland_Interior_OnTransition: - compare VAR_ROAMER_POKEMON, 0 - call_if_eq SouthernIsland_Interior_EventScript_SetUpLatios - compare VAR_ROAMER_POKEMON, 0 - call_if_ne SouthernIsland_Interior_EventScript_SetUpLatias + call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetUpLatios + call_if_ne VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetUpLatias call SouthernIsland_Interior_EventScript_SetUpPlayerGfx end @@ -36,10 +33,8 @@ SouthernIsland_Interior_EventScript_SetUpLatias:: SouthernIsland_Interior_EventScript_SetUpPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq SouthernIsland_Interior_EventScript_SetBrendanGfx - compare VAR_RESULT, FEMALE - goto_if_eq SouthernIsland_Interior_EventScript_SetMayGfx + goto_if_eq VAR_RESULT, MALE, SouthernIsland_Interior_EventScript_SetBrendanGfx + goto_if_eq VAR_RESULT, FEMALE, SouthernIsland_Interior_EventScript_SetMayGfx end SouthernIsland_Interior_EventScript_SetBrendanGfx:: @@ -79,21 +74,16 @@ SouthernIsland_Interior_EventScript_Lati:: delay 50 special RemoveCameraObject setvar VAR_LAST_TALKED, LOCALID_LATI - compare VAR_ROAMER_POKEMON, 0 - call_if_eq SouthernIsland_Interior_EventScript_SetLatiosBattleVars - compare VAR_ROAMER_POKEMON, 0 - call_if_ne SouthernIsland_Interior_EventScript_SetLatiasBattleVars + call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiosBattleVars + call_if_ne VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiasBattleVars setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLatiBattle waitstate clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq SouthernIsland_Interior_EventScript_LatiDefeated - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati + goto_if_eq VAR_RESULT, B_OUTCOME_WON, SouthernIsland_Interior_EventScript_LatiDefeated + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, SouthernIsland_Interior_EventScript_RanFromLati + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, SouthernIsland_Interior_EventScript_RanFromLati setflag FLAG_CAUGHT_LATIAS_OR_LATIOS releaseall end diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc index 0036f33b5a..5f0051becf 100644 --- a/data/maps/TerraCave_End/scripts.inc +++ b/data/maps/TerraCave_End/scripts.inc @@ -11,8 +11,7 @@ TerraCave_End_OnResume: TerraCave_End_EventScript_TryRemoveGroudon:: specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_CAUGHT - goto_if_ne Common_EventScript_NopReturn + goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn removeobject LOCALID_GROUDON return @@ -43,12 +42,9 @@ TerraCave_End_EventScript_Groudon:: clearflag FLAG_SYS_CTRL_OBJ_DELETE setvar VAR_TEMP_1, 0 specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq TerraCave_End_EventScript_DefeatedGroudon - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq TerraCave_End_EventScript_RanFromGroudon - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq TerraCave_End_EventScript_RanFromGroudon + goto_if_eq VAR_RESULT, B_OUTCOME_WON, TerraCave_End_EventScript_DefeatedGroudon + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, TerraCave_End_EventScript_RanFromGroudon + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, TerraCave_End_EventScript_RanFromGroudon setvar VAR_SHOULD_END_ABNORMAL_WEATHER, 1 setflag FLAG_DEFEATED_GROUDON releaseall diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc index 05878fe856..bec1ffbff1 100644 --- a/data/maps/TrainerHill_Elevator/scripts.inc +++ b/data/maps/TrainerHill_Elevator/scripts.inc @@ -26,8 +26,7 @@ TrainerHill_Elevator_EventScript_EnterElevator:: waitmovement 0 lockall msgbox TrainerHill_Elevator_Text_ReturnToReception, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq TrainerHill_Elevator_EventScript_ExitToRoof + goto_if_eq VAR_RESULT, NO, TrainerHill_Elevator_EventScript_ExitToRoof releaseall applymovement LOCALID_ATTENDANT, TrainerHill_Elevator_Movement_AttendantFaceDown waitmovement 0 diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc index 4c76ccb526..8989883e47 100644 --- a/data/maps/TrainerHill_Entrance/scripts.inc +++ b/data/maps/TrainerHill_Entrance/scripts.inc @@ -24,16 +24,14 @@ TrainerHill_Entrance_OnResume: trainerhill_resumetimer setvar VAR_TEMP_0, 0 trainerhill_getusingereader - compare VAR_RESULT, FALSE @ VAR_RESULT always FALSE here - goto_if_eq TrainerHill_Entrance_EventScript_TryFaceAttendant + goto_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_TryFaceAttendant @ VAR_RESULT always FALSE here setobjectxy OBJ_EVENT_ID_PLAYER, 9, 6 applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant end TrainerHill_Entrance_EventScript_TryFaceAttendant:: trainerhill_getwon - compare VAR_RESULT, TRUE - goto_if_eq TrainerHill_Entrance_EventScript_PlayerDontFaceAttendant + goto_if_eq VAR_RESULT, TRUE, TrainerHill_Entrance_EventScript_PlayerDontFaceAttendant applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerFaceAttendant end @@ -48,8 +46,7 @@ TrainerHill_Entrance_OnReturn: end TrainerHill_Entrance_OnLoad: - compare VAR_TEMP_D, 17 - call_if_eq TrainerHill_Entrance_EventScript_OpenCounterDoor + call_if_eq VAR_TEMP_D, 17, TrainerHill_Entrance_EventScript_OpenCounterDoor end TrainerHill_Entrance_EventScript_OpenCounterDoor:: @@ -115,8 +112,7 @@ TrainerHill_Entrance_EventScript_Attendant:: lock faceplayer trainerhill_inchallenge - compare VAR_RESULT, FALSE - goto_if_eq TrainerHill_Entrance_EventScript_ThanksForPlaying + goto_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_ThanksForPlaying msgbox TrainerHill_Entrance_Text_HopeYouGiveItYourBest, MSGBOX_DEFAULT goto TrainerHill_Entrance_EventScript_AttendantEnd @@ -132,11 +128,9 @@ TrainerHill_Entrance_EventScript_EntryTrigger:: goto_if_unset FLAG_SYS_GAME_CLEAR, TrainerHill_Entrance_EventScript_Closed msgbox TrainerHill_Entrance_Text_WelcomeToTrainerHill, MSGBOX_DEFAULT trainerhill_getsaved - compare VAR_RESULT, FALSE - call_if_eq TrainerHill_Entrance_EventScript_SaveGame + call_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_SaveGame trainerhill_allfloorsused - compare VAR_RESULT, TRUE - goto_if_eq TrainerHill_Entrance_EventScript_AllFloorsUsed + goto_if_eq VAR_RESULT, TRUE, TrainerHill_Entrance_EventScript_AllFloorsUsed msgbox TrainerHill_Entrance_Text_TrainersUpToFloorX, MSGBOX_DEFAULT goto TrainerHill_Entrance_EventScript_AskChallengeTrainers @@ -186,8 +180,7 @@ TrainerHill_Entrance_EventScript_SaveGame:: trainerhill_setsaved setvar VAR_TEMP_5, 1 call Common_EventScript_SaveGame - compare VAR_RESULT, FALSE - goto_if_eq TrainerHill_Entrance_EventScript_SaveFailed + goto_if_eq VAR_RESULT, FALSE, TrainerHill_Entrance_EventScript_SaveFailed trainerhill_setsaved return diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc index f670cce0b8..f4f8d8ccb7 100644 --- a/data/maps/Underwater_SealedChamber/scripts.inc +++ b/data/maps/Underwater_SealedChamber/scripts.inc @@ -4,10 +4,8 @@ Underwater_SealedChamber_MapScripts:: Underwater_SealedChamber_OnDive: getplayerxy VAR_0x8004, VAR_0x8005 - compare VAR_0x8004, 12 - goto_if_ne Underwater_SealedChamber_EventScript_SurfaceRoute134 - compare VAR_0x8005, 44 - goto_if_ne Underwater_SealedChamber_EventScript_SurfaceRoute134 + goto_if_ne VAR_0x8004, 12, Underwater_SealedChamber_EventScript_SurfaceRoute134 + goto_if_ne VAR_0x8005, 44, Underwater_SealedChamber_EventScript_SurfaceRoute134 goto Underwater_SealedChamber_EventScript_SurfaceSealedChamber Underwater_SealedChamber_EventScript_SurfaceRoute134:: diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc index badbe18490..29008b7c0f 100644 --- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc @@ -18,10 +18,8 @@ VerdanturfTown_BattleTentBattleRoom_OnTransition: VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale - compare VAR_RESULT, FEMALE - goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale + goto_if_eq VAR_RESULT, MALE, VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale + goto_if_eq VAR_RESULT, FEMALE, VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale return VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @@ -43,8 +41,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_EnterRoom:: applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter waitmovement 0 frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 0 - goto_if_ne VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge + goto_if_ne VAR_RESULT, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: tower_setopponent addobject LOCALID_OPPONENT @@ -84,10 +81,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge:: frontier_get FRONTIER_DATA_BATTLE_NUM - compare VAR_RESULT, 1 - call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent - compare VAR_RESULT, 2 - call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent + call_if_eq VAR_RESULT, 1, VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent + call_if_eq VAR_RESULT, 2, VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, TRUE switch VAR_RESULT case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc index 4f863f1719..a78a6a78ed 100644 --- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc +++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc @@ -107,8 +107,7 @@ VerdanturfTown_BattleTentLobby_EventScript_Attendant:: lock faceplayer verdanturftent_getprize - compare VAR_RESULT, ITEM_NONE - goto_if_ne VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting + goto_if_ne VAR_RESULT, ITEM_NONE, VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting special SavePlayerParty msgbox VerdanturfTown_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT VerdanturfTown_BattleTentLobby_EventScript_AskEnterChallenge:: @@ -126,8 +125,7 @@ VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge:: setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES setvar VAR_RESULT, 2 frontier_checkineligible - compare VAR_0x8004, TRUE - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons + goto_if_eq VAR_0x8004, TRUE, VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT msgbox VerdanturfTown_BattleTentLobby_Text_SelectThreeMons, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK @@ -135,8 +133,7 @@ VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge:: setvar VAR_0x8005, FRONTIER_PARTY_SIZE special ChoosePartyForBattleFrontier waitstate - compare VAR_RESULT, 0 - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge + goto_if_eq VAR_RESULT, 0, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge msgbox VerdanturfTown_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO switch VAR_RESULT case NO, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge @@ -154,8 +151,7 @@ VerdanturfTown_BattleTentLobby_EventScript_SaveBeforeChallenge:: delay 2 call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 - compare VAR_RESULT, 0 - goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed + goto_if_eq VAR_RESULT, 0, VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge:: special SavePlayerParty frontier_setpartyorder FRONTIER_PARTY_SIZE @@ -232,8 +228,7 @@ VerdanturfTown_BattleTentLobby_EventScript_AttractGiver:: goto_if_set FLAG_RECEIVED_TM45, VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract msgbox VerdanturfTown_BattleTentLobby_Text_AttractionRunsDeep, MSGBOX_DEFAULT giveitem ITEM_TM45 - compare VAR_RESULT, 0 - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull setflag FLAG_RECEIVED_TM45 msgbox VerdanturfTown_BattleTentLobby_Text_AttractionMutual, MSGBOX_DEFAULT release diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc index e07da7e60d..4bce6b4c1d 100644 --- a/data/maps/VictoryRoad_1F/scripts.inc +++ b/data/maps/VictoryRoad_1F/scripts.inc @@ -5,10 +5,8 @@ VictoryRoad_1F_MapScripts:: .byte 0 VictoryRoad_1F_OnTransition: - compare VAR_VICTORY_ROAD_1F_STATE, 1 - call_if_eq VictoryRoad_1F_EventScript_SetEntranceWallyPos1 - compare VAR_VICTORY_ROAD_1F_STATE, 2 - call_if_eq VictoryRoad_1F_EventScript_SetEntranceWallyPos2 + call_if_eq VAR_VICTORY_ROAD_1F_STATE, 1, VictoryRoad_1F_EventScript_SetEntranceWallyPos1 + call_if_eq VAR_VICTORY_ROAD_1F_STATE, 2, VictoryRoad_1F_EventScript_SetEntranceWallyPos2 end VictoryRoad_1F_EventScript_SetEntranceWallyPos1:: @@ -88,8 +86,7 @@ VictoryRoad_1F_EventScript_EntranceWally:: VictoryRoad_1F_EventScript_ExitWally:: trainerbattle_single TRAINER_WALLY_VR_2, VictoryRoad_1F_Text_WallyIntro, VictoryRoad_1F_Text_WallyDefeat specialvar VAR_RESULT, ShouldTryRematchBattle - compare VAR_RESULT, TRUE - goto_if_eq VictoryRoad_1F_EventScript_RematchWally + goto_if_eq VAR_RESULT, TRUE, VictoryRoad_1F_EventScript_RematchWally msgbox VictoryRoad_1F_Text_WallyPostBattle, MSGBOX_AUTOCLOSE end diff --git a/data/scripts/abnormal_weather.inc b/data/scripts/abnormal_weather.inc index c38982da8f..c5b03a9704 100644 --- a/data/scripts/abnormal_weather.inc +++ b/data/scripts/abnormal_weather.inc @@ -172,8 +172,7 @@ AbnormalWeather_StartGroudonWeather:: AbnormalWeather_EventScript_EndEventAndCleanup_1:: lockall - compare VAR_ABNORMAL_WEATHER_LOCATION, MARINE_CAVE_LOCATIONS_START - goto_if_ge AbnormalWeather_EventScript_ShowRainEndedMessage + goto_if_ge VAR_ABNORMAL_WEATHER_LOCATION, MARINE_CAVE_LOCATIONS_START, AbnormalWeather_EventScript_ShowRainEndedMessage goto AbnormalWeather_EventScript_ShowSunEndedMessage end diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc index 2a6772a5dc..ea8345a9ec 100644 --- a/data/scripts/apprentice.inc +++ b/data/scripts/apprentice.inc @@ -4,24 +4,17 @@ BattleFrontier_BattleTowerLobby_EventScript_Apprentice:: lock faceplayer apprentice_gavelvlmode - compare VAR_RESULT, FALSE - goto_if_eq Apprentice_EventScript_FirstMeeting + goto_if_eq VAR_RESULT, FALSE, Apprentice_EventScript_FirstMeeting apprentice_shouldcheckgone - compare VAR_0x8004, FALSE @ Always TRUE here - goto_if_eq Apprentice_EventScript_AskQuestion + goto_if_eq VAR_0x8004, FALSE, Apprentice_EventScript_AskQuestion @ VAR_0x8004 always TRUE here goto_if_set FLAG_DAILY_APPRENTICE_LEAVES, Apprentice_EventScript_Gone Apprentice_EventScript_AskQuestion: apprentice_getquestion - compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_MON - goto_if_eq Apprentice_EventScript_UseWhichMon - compare VAR_RESULT, APPRENTICE_QUESTION_WHAT_ITEM - goto_if_eq Apprentice_EventScript_UseWhatHeldItem - compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_MOVE - goto_if_eq Apprentice_EventScript_UseWhichMove - compare VAR_RESULT, APPRENTICE_QUESTION_WHICH_FIRST - goto_if_eq Apprentice_EventScript_PutWhichMonFirst - compare VAR_RESULT, APPRENTICE_QUESTION_WIN_SPEECH - goto_if_eq Apprentice_EventScript_PickWinSpeech + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WHICH_MON, Apprentice_EventScript_UseWhichMon + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WHAT_ITEM, Apprentice_EventScript_UseWhatHeldItem + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WHICH_MOVE, Apprentice_EventScript_UseWhichMove + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WHICH_FIRST, Apprentice_EventScript_PutWhichMonFirst + goto_if_eq VAR_RESULT, APPRENTICE_QUESTION_WIN_SPEECH, Apprentice_EventScript_PickWinSpeech release releaseall end @@ -31,8 +24,7 @@ Apprentice_EventScript_FirstMeeting: apprentice_msg FALSE, APPRENTICE_MSG_PLEASE_TEACH Apprentice_EventScript_WhichLvlMode: apprentice_menu APPRENTICE_ASK_YES_NO - compare VAR_RESULT, 1 - goto_if_eq Apprentice_EventScript_RejectTeach + goto_if_eq VAR_RESULT, 1, Apprentice_EventScript_RejectTeach apprentice_msg FALSE, APPRENTICE_MSG_WHICH_LVL_MODE apprentice_menu APPRENTICE_ASK_WHICH_LEVEL apprentice_setlvlmode VAR_RESULT @@ -59,16 +51,13 @@ Apprentice_EventScript_UseWhichMon: apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MON apprentice_menu APPRENTICE_ASK_2SPECIES copyvar VAR_0x8005, VAR_RESULT - compare VAR_0x8005, 0 - call_if_eq Apprentice_EventScript_ChoseFirstMon - compare VAR_0x8005, 1 - call_if_eq Apprentice_EventScript_ChoseSecondMon + call_if_eq VAR_0x8005, 0, Apprentice_EventScript_ChoseFirstMon + call_if_eq VAR_0x8005, 1, Apprentice_EventScript_ChoseSecondMon apprentice_getnumpartymons apprentice_setpartymon VAR_RESULT apprentice_answeredquestion apprentice_getnumpartymons - compare VAR_RESULT, MULTI_PARTY_SIZE - call_if_eq Apprentice_EventScript_LastMonSelected + call_if_eq VAR_RESULT, MULTI_PARTY_SIZE, Apprentice_EventScript_LastMonSelected apprentice_buff 0, VAR_0x8007 apprentice_freequestion apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MON @@ -101,11 +90,9 @@ Apprentice_EventScript_ChooseHoldItem: fadescreen FADE_TO_BLACK setvar VAR_RESULT, 0 apprentice_openbag - compare VAR_RESULT, FALSE - goto_if_eq Apprentice_EventScript_ConfirmHoldNothing + goto_if_eq VAR_RESULT, FALSE, Apprentice_EventScript_ConfirmHoldNothing apprentice_trysetitem - compare VAR_RESULT, FALSE - goto_if_eq Apprentice_EventScript_AlreadySuggestedItem + goto_if_eq VAR_RESULT, FALSE, Apprentice_EventScript_AlreadySuggestedItem apprentice_buff 0, APPRENTICE_BUFF_ITEM apprentice_msg TRUE, APPRENTICE_MSG_THANKS_HELD_ITEM apprentice_answeredquestion @@ -123,8 +110,7 @@ Apprentice_EventScript_ConfirmHoldNothing: apprentice_msg FALSE, APPRENTICE_MSG_HOLD_NOTHING apprentice_menu APPRENTICE_ASK_GIVE apprentice_freequestion - compare VAR_RESULT, 0 - goto_if_eq Apprentice_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, 0, Apprentice_EventScript_ChooseHoldItem Apprentice_EventScript_HoldNothing: apprentice_msg TRUE, APPRENTICE_MSG_THANKS_NO_HELD_ITEM apprentice_answeredquestion @@ -145,8 +131,7 @@ Apprentice_EventScript_AlreadySuggestedItem: apprentice_msg FALSE, APPRENTICE_MSG_ITEM_ALREADY_SUGGESTED apprentice_menu APPRENTICE_ASK_GIVE apprentice_freequestion - compare VAR_RESULT, 0 - goto_if_eq Apprentice_EventScript_ChooseHoldItem + goto_if_eq VAR_RESULT, 0, Apprentice_EventScript_ChooseHoldItem goto Apprentice_EventScript_HoldNothing end @@ -158,10 +143,8 @@ Apprentice_EventScript_UseWhichMove: apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MOVE apprentice_menu APPRENTICE_ASK_MOVES copyvar VAR_0x8005, VAR_RESULT - compare VAR_0x8005, 0 - call_if_eq Apprentice_EventScript_ChoseMove1 - compare VAR_0x8005, 1 - call_if_eq Apprentice_EventScript_ChoseMove2 + call_if_eq VAR_0x8005, 0, Apprentice_EventScript_ChoseMove1 + call_if_eq VAR_0x8005, 1, Apprentice_EventScript_ChoseMove2 apprentice_setmove apprentice_answeredquestion apprentice_buff 0, VAR_0x8007 @@ -225,16 +208,14 @@ Apprentice_EventScript_SetHideFlags: Apprentice_EventScript_LeaveNorth: apprentice_shouldleave - compare VAR_0x8004, FALSE @ Always TRUE here - goto_if_eq Apprentice_EventScript_DontMove + goto_if_eq VAR_0x8004, FALSE, Apprentice_EventScript_DontMove @ VAR_0x8004 always TRUE here applymovement LOCALID_APPRENTICE, Apprentice_Movement_LeaveNorth waitmovement 0 end Apprentice_EventScript_Leave: apprentice_shouldleave - compare VAR_0x8004, FALSE @ Always TRUE here - goto_if_eq Apprentice_EventScript_DontMove + goto_if_eq VAR_0x8004, FALSE, Apprentice_EventScript_DontMove @ VAR_0x8004 always TRUE here applymovement LOCALID_APPRENTICE, Apprentice_Movement_Leave waitmovement 0 end diff --git a/data/scripts/battle_pike.inc b/data/scripts/battle_pike.inc index e11f997626..8ca7f5b1af 100644 --- a/data/scripts/battle_pike.inc +++ b/data/scripts/battle_pike.inc @@ -50,14 +50,10 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_InitRoomObjects:: setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LINK_RECEPTIONIST setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_LINK_RECEPTIONIST pike_getroomtype - compare VAR_RESULT, PIKE_ROOM_STATUS - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom - compare VAR_RESULT, PIKE_ROOM_HARD_BATTLE - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom - compare VAR_RESULT, PIKE_ROOM_DOUBLE_BATTLE - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom - compare VAR_RESULT, PIKE_ROOM_BRAIN - goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects + goto_if_eq VAR_RESULT, PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom + goto_if_eq VAR_RESULT, PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom + goto_if_eq VAR_RESULT, PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom + goto_if_eq VAR_RESULT, PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects hideobjectat LOCALID_OBJ_1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL setvar VAR_TEMP_4, 1 turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH @@ -154,10 +150,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack:: BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: pike_ispartyfullhealth - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing - compare VAR_RESULT, TRUE - call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_DisableHealing + call_if_ne VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_EnableHealing pike_get PIKE_DATA_WIN_STREAK addvar VAR_RESULT, 1 pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT @@ -165,10 +159,8 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT pike_isfinalroom - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom - compare VAR_RESULT, FALSE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom + call_if_eq VAR_RESULT, FALSE, BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom waitstate end @@ -197,10 +189,8 @@ BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom:: BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit:: pike_exitwildmonroom pike_ispartyfullhealth - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing - compare VAR_RESULT, TRUE - call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_DisableHealing + call_if_ne VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_EnableHealing pike_get PIKE_DATA_WIN_STREAK addvar VAR_RESULT, 1 pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT @@ -208,10 +198,8 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit:: addvar VAR_RESULT, 1 frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT pike_isfinalroom - compare VAR_RESULT, TRUE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom - compare VAR_RESULT, FALSE - call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom + call_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom + call_if_eq VAR_RESULT, FALSE, BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom waitstate end @@ -237,10 +225,8 @@ BattleFrontier_BattlePike_EventScript_Retire:: BattleFrontier_BattlePikeRoom_OnResume: setorcopyvar VAR_0x8006, VAR_RESULT @ Save VAR_RESULT from being overwritten frontier_get FRONTIER_DATA_CHALLENGE_STATUS - compare VAR_RESULT, CHALLENGE_STATUS_PAUSED - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume - compare VAR_RESULT, CHALLENGE_STATUS_SAVING - goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume + goto_if_eq VAR_RESULT, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume + goto_if_eq VAR_RESULT, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume call BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume:: setorcopyvar VAR_RESULT, VAR_0x8006 diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc index 71f3a12760..f860ef066c 100644 --- a/data/scripts/berry_blender.inc +++ b/data/scripts/berry_blender.inc @@ -249,8 +249,7 @@ BerryBlender_EventScript_BerryBlender1:: applymovement LOCALID_EXPERT_M, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_WantToMakePokeblocks, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryUseBerryBlender1 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryUseBerryBlender1 goto BerryBlender_EventScript_DeclineBlender1 end @@ -280,8 +279,7 @@ BerryBlender_EventScript_Blender1GiveSpareBerry: BerryBlender_EventScript_UseBerryBlender1: msgbox BerryBlender_Text_KnowHowToMakePokeblocks, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_StartBlender1 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_StartBlender1 goto BerryBlender_EventScript_ExplainBlending1 end @@ -297,14 +295,11 @@ BerryBlender_EventScript_ExplainBlending1: BerryBlender_EventScript_TryUseBerryBlender1: checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender1NoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender1NoCase specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_Blender1CaseFull + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_Blender1CaseFull specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender1NoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender1NoBerries msgbox BerryBlender_Text_Excellent, MSGBOX_DEFAULT goto BerryBlender_EventScript_UseBerryBlender1 end @@ -334,8 +329,7 @@ BerryBlender_EventScript_BerryBlender2:: applymovement LOCALID_MAN, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_WantToBlendPokeblocksWithUs, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryUseBerryBlender2 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryUseBerryBlender2 goto BerryBlender_EventScript_DeclineBlender2 end @@ -351,8 +345,7 @@ BerryBlender_EventScript_Blender2NoBerries: BerryBlender_EventScript_UseBerryBlender2: msgbox BerryBlender_Text_KnowHowToMakePokeblocks2, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_StartBlender2 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_StartBlender2 goto BerryBlender_EventScript_ExplainBlending2 end @@ -368,17 +361,13 @@ BerryBlender_EventScript_ExplainBlending2: BerryBlender_EventScript_TryUseBerryBlender2: specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender2NoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender2NoBerries checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender2NoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender2NoCase msgbox BerryBlender_Text_Okay, MSGBOX_DEFAULT specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_ne BerryBlender_EventScript_UseBerryBlender2 - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_Blender2CaseFull + goto_if_ne VAR_RESULT, 65535, BerryBlender_EventScript_UseBerryBlender2 + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_Blender2CaseFull end BerryBlender_EventScript_Blender2CaseFull: @@ -400,8 +389,7 @@ BerryBlender_EventScript_BerryBlender3:: applymovement VAR_0x8008, BerryBlender_Movement_BlendLeaderWalkInPlace waitmovement 0 msgbox BerryBlender_Text_LookGoodAtBlendingJoinUs, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryUseBlender3 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryUseBlender3 goto BerryBlender_EventScript_DeclineBlender3 end @@ -417,8 +405,7 @@ BerryBlender_EventScript_Blender3NoBerries: BerryBlender_EventScript_UseBerryBlender3: msgbox BerryBlender_Text_KnowHowToMakePokeblocks3, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_StartBlender3 + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_StartBlender3 goto BerryBlender_EventScript_ExplainBlending3 end @@ -434,17 +421,13 @@ BerryBlender_EventScript_ExplainBlending3: BerryBlender_EventScript_TryUseBlender3: specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender3NoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender3NoBerries checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_Blender3NoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_Blender3NoCase msgbox BerryBlender_Text_OhDear, MSGBOX_DEFAULT specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_ne BerryBlender_EventScript_UseBerryBlender3 - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_Blender3CaseFull + goto_if_ne VAR_RESULT, 65535, BerryBlender_EventScript_UseBerryBlender3 + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_Blender3CaseFull end BerryBlender_EventScript_Blender3CaseFull: @@ -461,8 +444,7 @@ BerryBlender_EventScript_BlendMasterPresent: lockall setvar NUM_OPPONENTS, 1 msgbox BerryBlender_Text_SeeMyMasteryInAction, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryBlendWithBlendMaster + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryBlendWithBlendMaster msgbox BerryBlender_Text_TooBusyNowIsee, MSGBOX_DEFAULT releaseall end @@ -474,22 +456,17 @@ BerryBlender_EventScript_BlendMasterNoBerries: BerryBlender_EventScript_TryBlendWithBlendMaster: checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_BlendMasterNoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_BlendMasterNoCase specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_BlendMasterNoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_BlendMasterNoBerries specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_ne BerryBlender_EventScript_BlendWithBlendMaster - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_BlendMasterCaseFull + goto_if_ne VAR_RESULT, 65535, BerryBlender_EventScript_BlendWithBlendMaster + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_BlendMasterCaseFull end BerryBlender_EventScript_BlendWithBlendMaster: msgbox BerryBlender_Text_BlendMasterKnowHowToMakePokeblocks, MSGBOX_YESNO - compare VAR_RESULT, NO - call_if_eq BerryBlender_EventScript_BlendMasterExplainBlending + call_if_eq VAR_RESULT, NO, BerryBlender_EventScript_BlendMasterExplainBlending msgbox BerryBlender_Text_BlendMasterLetsBerryBlender, MSGBOX_DEFAULT goto BerryBlender_EventScript_DoBerryBlending end @@ -530,10 +507,8 @@ BerryBlender_EventScript_ExpertMCheckGiveBerry: faceplayer msgbox BerryBlender_Text_LoveMakingPokeblocks, MSGBOX_DEFAULT specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, TRUE - goto_if_eq BerryBlender_EventScript_ExpertMPlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_ExpertMNoBerries + goto_if_eq VAR_RESULT, TRUE, BerryBlender_EventScript_ExpertMPlayerHasBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_ExpertMNoBerries end BerryBlender_EventScript_ExpertMPlayerHasBerries: @@ -543,11 +518,9 @@ BerryBlender_EventScript_ExpertMPlayerHasBerries: BerryBlender_EventScript_ExpertMNoBerries: checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_ExpertMNoSpareBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_ExpertMNoSpareBerries specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_ExpertMNoSpareBerries + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_ExpertMNoSpareBerries dotimebasedevents goto_if_set FLAG_DAILY_CONTEST_LOBBY_RECEIVED_BERRY, BerryBlender_EventScript_ExpertMNoSpareBerries goto BerryBlender_EventScript_ExpertMGiveBerry @@ -573,24 +546,18 @@ BerryBlender_Movement_BlendLeaderWalkInPlace: BerryBlender_EventScript_BerryBlenderLink:: lockall specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_LinkBlenderNoBerries + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_LinkBlenderNoBerries checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_LinkBlenderNoCase + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_LinkBlenderNoCase specialvar VAR_RESULT, GetFirstFreePokeblockSlot - compare VAR_RESULT, 65535 - goto_if_ne BerryBlender_EventScript_LinkBlenderSaveGame - compare VAR_RESULT, 65535 - goto_if_eq BerryBlender_EventScript_LinkBlenderCaseFull + goto_if_ne VAR_RESULT, 65535, BerryBlender_EventScript_LinkBlenderSaveGame + goto_if_eq VAR_RESULT, 65535, BerryBlender_EventScript_LinkBlenderCaseFull end BerryBlender_EventScript_LinkBlenderSaveGame: msgbox BerryBlender_Text_SaveGameBeforeBerryBlenderLink, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryBlender_EventScript_TryDoLinkBlender - compare VAR_RESULT, NO - goto_if_eq BerryBlender_EventScript_CancelLinkBlender + goto_if_eq VAR_RESULT, YES, BerryBlender_EventScript_TryDoLinkBlender + goto_if_eq VAR_RESULT, NO, BerryBlender_EventScript_CancelLinkBlender end BerryBlender_EventScript_LinkBlenderNoBerries: @@ -600,25 +567,18 @@ BerryBlender_EventScript_LinkBlenderNoBerries: BerryBlender_EventScript_TryDoLinkBlender: call Common_EventScript_SaveGame - compare VAR_RESULT, FALSE - goto_if_eq BerryBlender_EventScript_CancelLinkBlender + goto_if_eq VAR_RESULT, FALSE, BerryBlender_EventScript_CancelLinkBlender specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, TRUE - goto_if_eq BerryBlender_EventScript_StartDecideLinkLeader + goto_if_eq VAR_RESULT, TRUE, BerryBlender_EventScript_StartDecideLinkLeader message BerryBlender_Text_SearchingForFriends waitmessage special TryBerryBlenderLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BerryBlender_EventScript_SpawnLinkPartners - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq BerryBlender_EventScript_CloseLinkNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq BerryBlender_EventScript_CloseLinkDifferentSelections - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BerryBlender_EventScript_CloseLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq BerryBlender_EventScript_LinkError + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BerryBlender_EventScript_SpawnLinkPartners + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, BerryBlender_EventScript_CloseLinkNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, BerryBlender_EventScript_CloseLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_FAILED, BerryBlender_EventScript_CloseLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, BerryBlender_EventScript_LinkError end BerryBlender_EventScript_TwoPlayerLink: @@ -721,23 +681,17 @@ BerryBlender_EventScript_DecideLinkLeader: BerryBlender_EventScript_TryLeadGroup: call BerryBlender_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BerryBlender_EventScript_LinkLeaderDecided - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BerryBlender_EventScript_DecideLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq BerryBlender_EventScript_TryLeadGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BerryBlender_EventScript_LinkLeaderDecided + goto_if_eq VAR_RESULT, LINKUP_FAILED, BerryBlender_EventScript_DecideLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, BerryBlender_EventScript_TryLeadGroup release end BerryBlender_EventScript_TryJoinGroup: call BerryBlender_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq BerryBlender_EventScript_LinkLeaderDecided - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq BerryBlender_EventScript_DecideLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq BerryBlender_EventScript_TryJoinGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, BerryBlender_EventScript_LinkLeaderDecided + goto_if_eq VAR_RESULT, LINKUP_FAILED, BerryBlender_EventScript_DecideLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, BerryBlender_EventScript_TryJoinGroup release end diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc index a1f743681c..8ad300df52 100644 --- a/data/scripts/berry_tree.inc +++ b/data/scripts/berry_tree.inc @@ -22,8 +22,7 @@ BerryTree_EventScript_CheckSoil:: lock faceplayer specialvar VAR_RESULT, PlayerHasBerries - compare VAR_RESULT, TRUE - goto_if_eq BerryTree_EventScript_WantToPlant + goto_if_eq VAR_RESULT, TRUE, BerryTree_EventScript_WantToPlant message BerryTree_Text_ItsSoftLoamySoil waitmessage waitbuttonpress @@ -32,10 +31,8 @@ BerryTree_EventScript_CheckSoil:: BerryTree_EventScript_WantToPlant:: msgbox BerryTree_Text_WantToPlant, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryTree_EventScript_ChooseBerryToPlant - compare VAR_RESULT, NO - goto_if_eq BerryTree_EventScript_CancelPlanting + goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_ChooseBerryToPlant + goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPlanting end BerryTree_EventScript_ChooseBerryToPlant:: @@ -43,8 +40,7 @@ BerryTree_EventScript_ChooseBerryToPlant:: closemessage special Bag_ChooseBerry waitstate - compare VAR_ITEM_ID, 0 - goto_if_eq BerryTree_EventScript_CancelPlanting + goto_if_eq VAR_ITEM_ID, 0, BerryTree_EventScript_CancelPlanting removeitem VAR_ITEM_ID call BerryTree_EventScript_PlantBerry @@ -88,10 +84,8 @@ BerryTree_EventScript_CheckBerryStage4:: @ VAR_0x8005 here is the number of times watered @ Buffered by ObjectEventInteractionGetBerryTreeData BerryTree_EventScript_GetCareAdverb:: - compare VAR_0x8005, 0 - goto_if_eq BerryTree_EventScript_SetAdverbPoor - compare VAR_0x8005, 4 - goto_if_eq BerryTree_EventScript_SetAdverbGreat + goto_if_eq VAR_0x8005, 0, BerryTree_EventScript_SetAdverbPoor + goto_if_eq VAR_0x8005, 4, BerryTree_EventScript_SetAdverbGreat bufferstring STR_VAR_2, BerryTree_Text_CareAdverbGood return @@ -110,15 +104,12 @@ BerryTree_EventScript_CheckBerryFullyGrown:: faceplayer special ObjectEventInteractionGetBerryCountString msgbox BerryTree_Text_WantToPick, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryTree_EventScript_PickBerry - compare VAR_RESULT, NO - goto_if_eq BerryTree_EventScript_CancelPickingBerry + goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_PickBerry + goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPickingBerry BerryTree_EventScript_PickBerry:: special ObjectEventInteractionPickBerryTree - compare VAR_0x8004, 0 - goto_if_eq BerryTree_EventScript_BerryPocketFull + goto_if_eq VAR_0x8004, 0, BerryTree_EventScript_BerryPocketFull special IncrementDailyPickedBerries special ObjectEventInteractionRemoveBerryTree message BerryTree_Text_PickedTheBerry @@ -155,14 +146,11 @@ BerryTree_EventScript_ItemUsePlantBerry:: BerryTree_EventScript_WantToWater:: checkitem ITEM_WAILMER_PAIL - compare VAR_RESULT, FALSE - goto_if_eq BerryTree_EventScript_DontWater + goto_if_eq VAR_RESULT, FALSE, BerryTree_EventScript_DontWater special ObjectEventInteractionGetBerryName msgbox BerryTree_Text_WantToWater, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BerryTree_EventScript_WaterBerry - compare VAR_RESULT, NO - goto_if_eq BerryTree_EventScript_DontWater + goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_WaterBerry + goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_DontWater BerryTree_EventScript_DontWater:: releaseall diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index fa4d67da7f..0ab93c4037 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -4,11 +4,9 @@ CableClub_OnTransition: CableClub_EventScript_HideOrShowMysteryGiftMan:: specialvar VAR_RESULT, ShouldDistributeEonTicket - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_ShowMysteryGiftMan + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_ShowMysteryGiftMan specialvar VAR_RESULT, ValidateSavedWonderCard - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_HideMysteryGiftMan + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_HideMysteryGiftMan goto CableClub_EventScript_ShowMysteryGiftMan end @@ -22,8 +20,7 @@ CableClub_EventScript_HideMysteryGiftMan:: CableClub_EventScript_MysteryGiftMan:: specialvar VAR_RESULT, ShouldDistributeEonTicket - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_DistributeEonTicket + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_DistributeEonTicket goto CableClub_EventScript_TryWonderCardScript end @@ -35,8 +32,7 @@ CableClub_EventScript_MysteryGiftThankYou:: CableClub_EventScript_DistributeEonTicket:: checkitem ITEM_EON_TICKET - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_TryWonderCardScript + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_TryWonderCardScript goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_TryWonderCardScript msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT giveitem ITEM_EON_TICKET @@ -64,29 +60,20 @@ CableClub_OnWarp: .2byte 0 CableClub_EventScript_CheckTurnAttendant:: - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_DontTurnAttendant + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_DontTurnAttendant turnobject VAR_0x8007, DIR_WEST CableClub_EventScript_DontTurnAttendant:: end CableClub_OnLoad: - compare VAR_CABLE_CLUB_STATE, USING_SINGLE_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_DOUBLE_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_MULTI_BATTLE - goto_if_eq CableClub_EventScript_OnLoadFromColosseum - compare VAR_CABLE_CLUB_STATE, USING_TRADE_CENTER - goto_if_eq CableClub_EventScript_OnLoadFromTradeCenter - compare VAR_CABLE_CLUB_STATE, USING_RECORD_CORNER - goto_if_eq CableClub_EventScript_OnLoadFromRecordCorner - compare VAR_CABLE_CLUB_STATE, USING_UNION_ROOM - goto_if_eq CableClub_EventScript_OnLoadFromUnionRoom - compare VAR_CABLE_CLUB_STATE, USING_BERRY_CRUSH - goto_if_eq CableClub_EventScript_OnLoadFromBerryCrush - compare VAR_CABLE_CLUB_STATE, USING_MINIGAME - goto_if_eq CableClub_EventScript_OnLoadFromGameCorner + goto_if_eq VAR_CABLE_CLUB_STATE, USING_SINGLE_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_DOUBLE_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_MULTI_BATTLE, CableClub_EventScript_OnLoadFromColosseum + goto_if_eq VAR_CABLE_CLUB_STATE, USING_TRADE_CENTER, CableClub_EventScript_OnLoadFromTradeCenter + goto_if_eq VAR_CABLE_CLUB_STATE, USING_RECORD_CORNER, CableClub_EventScript_OnLoadFromRecordCorner + goto_if_eq VAR_CABLE_CLUB_STATE, USING_UNION_ROOM, CableClub_EventScript_OnLoadFromUnionRoom + goto_if_eq VAR_CABLE_CLUB_STATE, USING_BERRY_CRUSH, CableClub_EventScript_OnLoadFromBerryCrush + goto_if_eq VAR_CABLE_CLUB_STATE, USING_MINIGAME, CableClub_EventScript_OnLoadFromGameCorner end CableClub_EventScript_OnLoadFromColosseum:: @@ -148,8 +135,7 @@ CableClub_EventScript_ExitMinigameRoom:: CableClub_EventScript_CloseLinkAndExitLinkRoom:: special CloseLink setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement VAR_0x8007, Movement_AttendantFaceLeft waitmovement 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom @@ -171,8 +157,7 @@ CableClub_EventScript_ExitTradeCenter:: CableClub_EventScript_PlayerExitTradeCenter:: special CloseLink setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -195,8 +180,7 @@ CableClub_EventScript_PlayerExitRecordCorner:: setvar VAR_CABLE_CLUB_STATE, 0 applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerExitLinkRoom waitmovement 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_ExitRecordCornerRet + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_ExitRecordCornerRet applymovement VAR_0x8007, Movement_AttendantFaceDown waitmovement 0 CableClub_EventScript_ExitRecordCornerRet:: @@ -214,8 +198,7 @@ CableClub_EventScript_ExitUnionRoom:: CableClub_EventScript_PlayerExitUnionRoom:: setvar VAR_CABLE_CLUB_STATE, 0 - compare VAR_0x8007, 0 - goto_if_eq CableClub_EventScript_PlayerExitLinkRoom + goto_if_eq VAR_0x8007, 0, CableClub_EventScript_PlayerExitLinkRoom applymovement OBJ_EVENT_ID_PLAYER, Movement_PlayerFaceAttendantRight waitmovement 0 applymovement VAR_0x8007, Movement_AttendantFaceLeft @@ -323,8 +306,7 @@ CableClub_EventScript_SingleBattleMode:: CableClub_EventScript_DoubleBattleMode:: special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne CableClub_EventScript_NeedTwoMonsForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, CableClub_EventScript_NeedTwoMonsForDoubleBattle setvar VAR_0x8004, USING_DOUBLE_BATTLE goto CableClub_EventScript_TryEnterColosseum end @@ -341,24 +323,17 @@ CableClub_EventScript_MultiBattleMode:: CableClub_EventScript_TryEnterColosseum:: call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryBattleLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterColosseum - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterColosseum + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError end CableClub_EventScript_EnterColosseum:: @@ -385,8 +360,7 @@ CableClub_EventScript_EnterColosseum:: closedoor 9, 1 waitdooranim release - compare VAR_0x8004, USING_MULTI_BATTLE - goto_if_eq CableClub_EventScript_WarpTo4PColosseum + goto_if_eq VAR_0x8004, USING_MULTI_BATTLE, CableClub_EventScript_WarpTo4PColosseum special SetCableClubWarp warp MAP_BATTLE_COLOSSEUM_2P, 6, 8 special DoCableClubWarp @@ -441,31 +415,21 @@ CableClub_EventScript_ConfirmNumberAndRestart:: CableClub_EventScript_TradeCenter:: copyvar VAR_0x8007, VAR_LAST_TALKED call CableClub_EventScript_CheckPartyTradeRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryTradeLinkup waitstate - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterTradeCenter - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError - compare VAR_RESULT, LINKUP_PLAYER_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkPlayerNotReady - compare VAR_RESULT, LINKUP_PARTNER_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkOtherTrainerNotReady + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterTradeCenter + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_PLAYER_NOT_READY, CableClub_EventScript_AbortLinkPlayerNotReady + goto_if_eq VAR_RESULT, LINKUP_PARTNER_NOT_READY, CableClub_EventScript_AbortLinkOtherTrainerNotReady end CableClub_EventScript_EnterTradeCenter:: @@ -498,11 +462,9 @@ CableClub_EventScript_EnterTradeCenter:: CableClub_EventScript_CheckPartyTradeRequirements:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, 2 - goto_if_lt CableClub_EventScript_NeedTwoMonsToTrade + goto_if_lt VAR_RESULT, 2, CableClub_EventScript_NeedTwoMonsToTrade specialvar VAR_RESULT, DoesPartyHaveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_CantTradeEnigmaBerry + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_CantTradeEnigmaBerry setvar VAR_RESULT, 1 return @@ -519,28 +481,20 @@ CableClub_EventScript_CantTradeEnigmaBerry:: CableClub_EventScript_RecordCorner:: copyvar VAR_0x8007, VAR_LAST_TALKED call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink message gText_PleaseWaitForLink waitmessage special TryRecordMixLinkup waitstate special ValidateMixingGameLanguage waitstate - compare VAR_RESULT, LINKUP_FOREIGN_GAME - goto_if_eq CableClub_EventScript_AbortLinkForeignGame - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterRecordCorner - compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY - goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady - compare VAR_RESULT, LINKUP_DIFF_SELECTIONS - goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections - compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS - goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_AbortLink - compare VAR_RESULT, LINKUP_CONNECTION_ERROR - goto_if_eq CableClub_EventScript_AbortLinkConnectionError + goto_if_eq VAR_RESULT, LINKUP_FOREIGN_GAME, CableClub_EventScript_AbortLinkForeignGame + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterRecordCorner + goto_if_eq VAR_RESULT, LINKUP_SOMEONE_NOT_READY, CableClub_EventScript_AbortLinkSomeoneNotReady + goto_if_eq VAR_RESULT, LINKUP_DIFF_SELECTIONS, CableClub_EventScript_AbortLinkDifferentSelections + goto_if_eq VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS, CableClub_EventScript_AbortLinkIncorrectNumberOfParticipants + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, LINKUP_CONNECTION_ERROR, CableClub_EventScript_AbortLinkConnectionError end CableClub_EventScript_EnterRecordCorner:: @@ -724,8 +678,7 @@ EventScript_BattleColosseum_4P_PlayerSpot0:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 0 special ColosseumPlayerSpotTriggered waitstate @@ -735,8 +688,7 @@ EventScript_BattleColosseum_4P_PlayerSpot1:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 1 special ColosseumPlayerSpotTriggered waitstate @@ -746,8 +698,7 @@ EventScript_BattleColosseum_4P_PlayerSpot2:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 2 special ColosseumPlayerSpotTriggered waitstate @@ -757,8 +708,7 @@ EventScript_BattleColosseum_4P_PlayerSpot3:: fadescreen FADE_TO_BLACK special ChooseHalfPartyForBattle waitstate - compare VAR_RESULT, 0 - goto_if_eq EventScript_BattleColosseum_4P_CancelSpotTrigger + goto_if_eq VAR_RESULT, 0, EventScript_BattleColosseum_4P_CancelSpotTrigger setvar VAR_0x8005, 3 special ColosseumPlayerSpotTriggered waitstate @@ -798,32 +748,28 @@ EventScript_RecordCenter_Spot0:: setvar VAR_0x8005, 0 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot1:: setvar VAR_0x8005, 1 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot2:: setvar VAR_0x8005, 2 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end EventScript_RecordCenter_Spot3:: setvar VAR_0x8005, 3 special RecordMixingPlayerSpotTriggered waitstate - compare VAR_TEMP_1, ITEM_NONE - goto_if_ne RecordCorner_EventScript_ReceivedGiftItem + goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem end RecordCorner_EventScript_ReceivedGiftItem:: @@ -868,8 +814,7 @@ TradeCenter_EventScript_Attendant:: end RecordCorner_EventScript_Attendant:: - compare VAR_TEMP_0, 0 - goto_if_ne RecordCorner_EventScript_AlreadyMixed + goto_if_ne VAR_TEMP_0, 0, RecordCorner_EventScript_AlreadyMixed special Script_FacePlayer message RecordCorner_Text_TakeSeatAndWait waitmessage @@ -889,8 +834,7 @@ RecordCorner_EventScript_AlreadyMixed:: EventScript_ConfirmLeaveCableClubRoom:: msgbox Text_TerminateLinkConfirmation, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_TerminateLink + goto_if_eq VAR_RESULT, YES, EventScript_TerminateLink erasebox 0, 0, 29, 19 releaseall end @@ -913,12 +857,10 @@ CableClub_EventScript_UnionRoomAttendant:: setvar VAR_FRONTIER_FACILITY, FACILITY_UNION_ROOM goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AbortLinkPlayerHasBadEgg + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_AbortLinkPlayerHasBadEgg copyvar VAR_0x8007, VAR_LAST_TALKED specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_UnionRoomAdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_UnionRoomAdapterNotConnected message CableClub_Text_WelcomeUnionRoomEnter waitmessage goto CableClub_EventScript_UnionRoomSelect @@ -941,11 +883,9 @@ CableClub_EventScript_UnionRoomInfo:: CableClub_EventScript_EnterUnionRoom:: call CableClub_EventScript_CheckPartyUnionRoomRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink msgbox CableClub_Text_EnjoyUnionRoom, MSGBOX_DEFAULT closemessage special HealPlayerParty @@ -976,11 +916,9 @@ CableClub_EventScript_EnterUnionRoom:: CableClub_EventScript_CheckPartyUnionRoomRequirements:: specialvar VAR_RESULT, CountPartyNonEggMons - compare VAR_RESULT, 2 - goto_if_lt CableClub_EventScript_NeedTwoMonsForUnionRoom + goto_if_lt VAR_RESULT, 2, CableClub_EventScript_NeedTwoMonsForUnionRoom specialvar VAR_RESULT, DoesPartyHaveEnigmaBerry - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_NoEnigmaBerryInUnionRoom + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_NoEnigmaBerryInUnionRoom setvar VAR_RESULT, 1 return @@ -1004,8 +942,7 @@ CableClub_EventScript_WirelessClubAttendant:: faceplayer goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements msgbox CableClub_Text_AskAboutLinking, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_DontAskAboutLinking + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_DontAskAboutLinking msgbox CableClub_Text_ExplainWirelessClub, MSGBOX_DEFAULT release return @@ -1021,11 +958,9 @@ CableClub_EventScript_DirectCornerAttendant:: setvar VAR_FRONTIER_FACILITY, FACILITY_MULTI_OR_EREADER @ Set preemptively for multi battles, ignored otherwise goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_WirelessClubAdjustements specialvar VAR_RESULT, IsBadEggInParty - compare VAR_RESULT, TRUE - goto_if_eq CableClub_EventScript_AbortLinkPlayerHasBadEgg + goto_if_eq VAR_RESULT, TRUE, CableClub_EventScript_AbortLinkPlayerHasBadEgg specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_WelcomeToCableClub + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_WelcomeToCableClub message CableClub_Text_WelcomeWhichDirectCornerRoom waitmessage delay 28 @@ -1034,8 +969,7 @@ CableClub_EventScript_DirectCornerAttendant:: CableClub_EventScript_DirectCornerSelectService:: checkitem ITEM_POWDER_JAR - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_DirectCornerNoBerry + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_DirectCornerNoBerry goto_if_set FLAG_VISITED_MAUVILLE_CITY, CableClub_EventScript_DirectCornerSelectAllServices multichoice 0, 0, MULTI_WIRELESS_NO_RECORD, FALSE switch VAR_RESULT @@ -1079,11 +1013,9 @@ CableClub_EventScript_DirectCornerHasRecordMix:: CableClub_EventScript_WirelessTrade:: msgbox CableClub_Text_TradePokemon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink call CableClub_EventScript_CheckPartyTradeRequirements - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink setvar VAR_0x8004, LINK_GROUP_TRADE goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1108,8 +1040,7 @@ CableClub_EventScript_WirelessSingleBattle:: CableClub_EventScript_WirelessDoubleBattle:: special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne CableClub_EventScript_TwoMonsNeededForWirelessDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, CableClub_EventScript_TwoMonsNeededForWirelessDoubleBattle setvar VAR_0x8004, LINK_GROUP_DOUBLE_BATTLE goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1131,19 +1062,16 @@ CableClub_EventScript_WirelessBattleInfo:: CableClub_EventScript_WirelessRecordMix:: msgbox CableClub_Text_AccessRecordCorner, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink setvar VAR_0x8004, LINK_GROUP_RECORD_CORNER goto CableClub_EventScript_SaveAndChooseLinkLeader end CableClub_EventScript_WirelessBerryCrush:: msgbox CableClub_Text_UseBerryCrush, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, NO, CableClub_EventScript_AbortLink special HasAtLeastOneBerry - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_NeedBerryForBerryCrush + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_NeedBerryForBerryCrush setvar VAR_0x8004, LINK_GROUP_BERRY_CRUSH goto CableClub_EventScript_SaveAndChooseLinkLeader end @@ -1155,8 +1083,7 @@ CableClub_EventScript_NeedBerryForBerryCrush:: CableClub_EventScript_SaveAndChooseLinkLeader:: call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq CableClub_EventScript_AbortLink + goto_if_eq VAR_RESULT, 0, CableClub_EventScript_AbortLink switch VAR_0x8004 case LINK_GROUP_TRADE, CableClub_EventScript_ChooseLinkLeaderFrom2 case LINK_GROUP_SINGLE_BATTLE, CableClub_EventScript_ChooseLinkLeaderFrom2 @@ -1179,23 +1106,17 @@ CableClub_EventScript_ChooseLinkLeaderFrom2:: CableClub_EventScript_TryLeadGroup2Players:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroup2Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom2 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroup2Players release return CableClub_EventScript_TryJoinGroup2Players:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroup2Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom2 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroup2Players release return @@ -1212,23 +1133,17 @@ CableClub_EventScript_ChooseLinkLeaderFrom4:: CableClub_EventScript_TryLeadGroup4Players:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroup4Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom4 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroup4Players release return CableClub_EventScript_TryJoinGroup4Players:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4 - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroup4Players + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeaderFrom4 + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroup4Players release return @@ -1245,23 +1160,17 @@ CableClub_EventScript_ChooseLinkLeader:: CableClub_EventScript_TryLeadGroupXPlayers:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryLeadGroupXPlayers + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryLeadGroupXPlayers release return CableClub_EventScript_TryJoinGroupXPlayers:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq CableClub_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq CableClub_EventScript_TryJoinGroupXPlayers + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, CableClub_EventScript_EnterWirelessLinkRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, CableClub_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, CableClub_EventScript_TryJoinGroupXPlayers release return @@ -1305,8 +1214,7 @@ EventScript_WirelessBoxResults:: lockall goto_if_unset FLAG_SYS_POKEDEX_GET, CableClub_EventScript_NotReadyYet specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq CableClub_EventScript_AdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, CableClub_EventScript_AdapterNotConnected fadescreen FADE_TO_BLACK special ShowWirelessCommunicationScreen waitstate @@ -1387,8 +1295,7 @@ MossdeepCity_GameCorner_1F_EventScript_OldMan2:: message MossdeepCity_GameCorner_1F_Text_WelcomeCanYouWait waitmessage specialvar VAR_RESULT, IsWirelessAdapterConnected - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected delay 60 message MossdeepCity_GameCorner_1F_Text_PlayWhichGame waitmessage @@ -1403,18 +1310,15 @@ MossdeepCity_GameCorner_1F_EventScript_OldMan2:: MossdeepCity_GameCorner_1F_EventScript_PlayPokemonJump:: setvar VAR_0x8005, 0 special IsPokemonJumpSpeciesInParty - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon msgbox MossdeepCity_GameCorner_1F_Text_EnterWhichPokemon, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK setvar VAR_0x8005, 0 special ChooseMonForWirelessMinigame waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_ge VAR_0x8004, PARTY_SIZE, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_eq VAR_RESULT, 0, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame setvar VAR_0x8004, LINK_GROUP_POKEMON_JUMP goto MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader end @@ -1422,18 +1326,15 @@ MossdeepCity_GameCorner_1F_EventScript_PlayPokemonJump:: MossdeepCity_GameCorner_1F_EventScript_PlayDodrioBerryPicking:: setvar VAR_0x8005, 1 special IsDodrioInParty - compare VAR_RESULT, FALSE - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon + goto_if_eq VAR_RESULT, FALSE, MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon msgbox MossdeepCity_GameCorner_1F_Text_EnterWhichPokemon, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK setvar VAR_0x8005, 1 special ChooseMonForWirelessMinigame waitstate - compare VAR_0x8004, PARTY_SIZE - goto_if_ge MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_ge VAR_0x8004, PARTY_SIZE, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + goto_if_eq VAR_RESULT, 0, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame setvar VAR_0x8004, LINK_GROUP_BERRY_PICKING goto MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader end @@ -1451,23 +1352,17 @@ MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader:: MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader:: call CableClub_EventScript_TryBecomeLinkLeader - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader release return MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup:: call CableClub_EventScript_TryJoinLinkGroup - compare VAR_RESULT, LINKUP_SUCCESS - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom - compare VAR_RESULT, LINKUP_FAILED - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader - compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup + goto_if_eq VAR_RESULT, LINKUP_SUCCESS, MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom + goto_if_eq VAR_RESULT, LINKUP_FAILED, MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader + goto_if_eq VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN, MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup release return @@ -1499,12 +1394,9 @@ MossdeepCity_GameCorner_1F_EventScript_AdapterNotConnected:: MossdeepCity_GameCorner_1F_EventScript_DontHaveRequiredMon:: msgbox MossdeepCity_GameCorner_1F_Text_ExplainRequiredMon, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MossdeepCity_GameCorner_1F_EventScript_AbortMinigame - compare VAR_0x8005, 0 - call_if_eq MossdeepCity_GameCorner_1F_EventScript_ExplainPokemonJumpRequirements - compare VAR_0x8005, 1 - call_if_eq MossdeepCity_GameCorner_1F_EventScript_ExplainDodrioBerryPickingRequirements + goto_if_eq VAR_RESULT, NO, MossdeepCity_GameCorner_1F_EventScript_AbortMinigame + call_if_eq VAR_0x8005, 0, MossdeepCity_GameCorner_1F_EventScript_ExplainPokemonJumpRequirements + call_if_eq VAR_0x8005, 1, MossdeepCity_GameCorner_1F_EventScript_ExplainDodrioBerryPickingRequirements goto MossdeepCity_GameCorner_1F_EventScript_AbortMinigame end diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 5ff2abe0c4..04c62a6de3 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -18,8 +18,7 @@ LilycoveCity_ContestLobby_EventScript_SpeakToContestReceptionist:: lock faceplayer - compare VAR_CONTEST_PRIZE_PICKUP, 0 - goto_if_ne LilycoveCity_ContestLobby_EventScript_PickUpPrize + goto_if_ne VAR_CONTEST_PRIZE_PICKUP, 0, LilycoveCity_ContestLobby_EventScript_PickUpPrize call_if_set FLAG_RECEIVED_POKEBLOCK_CASE, LilycoveCity_ContestLobby_EventScript_ReceptionWelcome call_if_unset FLAG_RECEIVED_POKEBLOCK_CASE, LilycoveCity_ContestLobby_EventScript_GivePokeblockCase goto LilycoveCity_ContestLobby_EventScript_AskEnterContest @@ -44,8 +43,7 @@ LilycoveCity_ContestLobby_EventScript_PickUpPrize:: LilycoveCity_ContestLobby_EventScript_GiveLuxuryBallAtCounter:: giveitem ITEM_LUXURY_BALL - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_ContestLobby_EventScript_NoRoomForLuxuryBallAtCounter + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_ContestLobby_EventScript_NoRoomForLuxuryBallAtCounter setvar VAR_CONTEST_PRIZE_PICKUP, 0 closemessage release @@ -103,19 +101,13 @@ LilycoveCity_ContestLobby_EventScript_CancelEnterContest:: LilycoveCity_ContestLobby_EventScript_ChooseContestMon:: msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon1, MSGBOX_DEFAULT choosecontestmon - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelEnterContest + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, LilycoveCity_ContestLobby_EventScript_CancelEnterContest special TryEnterContestMon - compare VAR_RESULT, CANT_ENTER_CONTEST - goto_if_eq LilycoveCity_ContestLobby_EventScript_CantEnterLowRank - compare VAR_RESULT, CAN_ENTER_CONTEST_EQUAL_RANK - goto_if_eq LilycoveCity_ContestLobby_EventScript_EnterMon - compare VAR_RESULT, CAN_ENTER_CONTEST_HIGH_RANK - goto_if_eq LilycoveCity_ContestLobby_EventScript_ConfirmEntryAlreadyWon - compare VAR_RESULT, CANT_ENTER_CONTEST_EGG - goto_if_eq LilycoveCity_ContestLobby_EventScript_CantEnterEgg - compare VAR_RESULT, CANT_ENTER_CONTEST_FAINTED - goto_if_eq LilycoveCity_ContestLobby_EventScript_CantEnterFainted + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST, LilycoveCity_ContestLobby_EventScript_CantEnterLowRank + goto_if_eq VAR_RESULT, CAN_ENTER_CONTEST_EQUAL_RANK, LilycoveCity_ContestLobby_EventScript_EnterMon + goto_if_eq VAR_RESULT, CAN_ENTER_CONTEST_HIGH_RANK, LilycoveCity_ContestLobby_EventScript_ConfirmEntryAlreadyWon + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST_EGG, LilycoveCity_ContestLobby_EventScript_CantEnterEgg + goto_if_eq VAR_RESULT, CANT_ENTER_CONTEST_FAINTED, LilycoveCity_ContestLobby_EventScript_CantEnterFainted end LilycoveCity_ContestLobby_EventScript_ChooseContestRank:: @@ -293,8 +285,7 @@ ContestHall_EventScript_ContestGettingStarted:: return ContestHall_EventScript_GettingStarted:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_GettingStartedLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_GettingStartedLink lockall msgbox ContestHall_Text_GettingStartedParticipantsAsFollows, MSGBOX_DEFAULT releaseall @@ -302,8 +293,7 @@ ContestHall_EventScript_GettingStarted:: ContestHall_EventScript_GettingStartedLink:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_GettingStartedWireless + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_GettingStartedWireless messageautoscroll ContestHall_Text_GettingStartedParticipantsAsFollowsLink waitmessage return @@ -326,16 +316,14 @@ ContestHall_EventScript_ShowContestMons:: call ContestHall_EventScript_TryWaitForLink call ContestHall_EventScript_TryWaitForLink addvar VAR_0x8006, 1 - compare VAR_0x8006, CONTESTANT_COUNT - goto_if_ne ContestHall_EventScript_ShowContestMons + goto_if_ne VAR_0x8006, CONTESTANT_COUNT, ContestHall_EventScript_ShowContestMons call ContestHall_EventScript_AudienceVote setvar VAR_TEMP_1, 6 return ContestHall_EventScript_TryWaitForLink:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_WaitForLink + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_WaitForLink return ContestHall_EventScript_WaitForLink:: @@ -344,14 +332,10 @@ ContestHall_EventScript_WaitForLink:: return ContestHall_EventScript_ContestantWalkToCenter:: - compare VAR_0x8006, 0 - goto_if_eq ContestHall_EventScript_Player1WalkToCenter - compare VAR_0x8006, 1 - goto_if_eq ContestHall_EventScript_Player2WalkToCenter - compare VAR_0x8006, 2 - goto_if_eq ContestHall_EventScript_Player3WalkToCenter - compare VAR_0x8006, 3 - goto_if_eq ContestHall_EventScript_Player4WalkToCenter + goto_if_eq VAR_0x8006, 0, ContestHall_EventScript_Player1WalkToCenter + goto_if_eq VAR_0x8006, 1, ContestHall_EventScript_Player2WalkToCenter + goto_if_eq VAR_0x8006, 2, ContestHall_EventScript_Player3WalkToCenter + goto_if_eq VAR_0x8006, 3, ContestHall_EventScript_Player4WalkToCenter return ContestHall_EventScript_Player1WalkToCenter:: @@ -413,8 +397,7 @@ ContestHall_EventScript_ShowContestMonPic:: return ContestHall_EventScript_EntryXTrainersMon:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_EntryXTrainersMonLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_EntryXTrainersMonLink message ContestHall_Text_EntryXTrainersMon waitmessage return @@ -441,15 +424,13 @@ ContestHall_EventScript_AudienceVote:: return ContestHall_EventScript_AudienceWillVote:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_AudienceWillVoteLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_AudienceWillVoteLink msgbox ContestHall_Text_SeenContestantsAudienceWillVote, MSGBOX_DEFAULT return ContestHall_EventScript_AudienceWillVoteLink:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_AudienceWillVoteWireless + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_AudienceWillVoteWireless messageautoscroll ContestHall_Text_SeenContestantsAudienceWillVote waitmessage return @@ -467,8 +448,7 @@ ContestHall_EventScript_AudienceWillVoteWireless:: return ContestHall_EventScript_VotingUnderWay:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_VotingUnderWayLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_VotingUnderWayLink message ContestHall_Text_VotingUnderWay return @@ -510,16 +490,11 @@ ContestHall_EventScript_AudienceReactToContestant:: @ and are set to 9 if they havent displayed a heart yet, and 1 if they have ContestHall_EventScript_AudienceHeartEmotes:: special GetContestMonCondition - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL - call_if_eq ContestHall_EventScript_GetNumberOfHeartsNormal - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_SUPER - call_if_eq ContestHall_EventScript_GetNumberOfHeartsSuper - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_HYPER - call_if_eq ContestHall_EventScript_GetNumberOfHeartsHyper - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_MASTER - call_if_eq ContestHall_EventScript_GetNumberOfHeartsMaster - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - call_if_eq ContestHall_EventScript_GetNumberOfHeartsLink + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL, ContestHall_EventScript_GetNumberOfHeartsNormal + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_SUPER, ContestHall_EventScript_GetNumberOfHeartsSuper + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_HYPER, ContestHall_EventScript_GetNumberOfHeartsHyper + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_MASTER, ContestHall_EventScript_GetNumberOfHeartsMaster + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_GetNumberOfHeartsLink setvar VAR_TEMP_1, 9 setvar VAR_TEMP_2, 9 setvar VAR_TEMP_3, 9 @@ -528,8 +503,7 @@ ContestHall_EventScript_AudienceHeartEmotes:: setvar VAR_TEMP_6, 9 setvar VAR_TEMP_7, 9 setvar VAR_TEMP_8, 9 - compare VAR_TEMP_0, 0 - call_if_gt ContestHall_EventScript_DisplayHearts + call_if_gt VAR_TEMP_0, 0, ContestHall_EventScript_DisplayHearts setvar VAR_TEMP_1, 0 setvar VAR_TEMP_2, 0 setvar VAR_TEMP_3, 0 @@ -543,124 +517,75 @@ ContestHall_EventScript_AudienceHeartEmotes:: ContestHall_EventScript_DisplayHearts:: setvar VAR_RESULT, 8 special GenerateContestRand - compare VAR_RESULT, 0 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember1 - compare VAR_RESULT, 1 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember2 - compare VAR_RESULT, 2 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember3 - compare VAR_RESULT, 3 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember4 - compare VAR_RESULT, 4 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember5 - compare VAR_RESULT, 5 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember6 - compare VAR_RESULT, 6 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember7 - compare VAR_RESULT, 7 - call_if_eq ContestHall_EventScript_TryDisplayHeartAudienceMember8 - compare VAR_TEMP_0, 0 @ Still more hearts to display - goto_if_gt ContestHall_EventScript_DisplayHearts + call_if_eq VAR_RESULT, 0, ContestHall_EventScript_TryDisplayHeartAudienceMember1 + call_if_eq VAR_RESULT, 1, ContestHall_EventScript_TryDisplayHeartAudienceMember2 + call_if_eq VAR_RESULT, 2, ContestHall_EventScript_TryDisplayHeartAudienceMember3 + call_if_eq VAR_RESULT, 3, ContestHall_EventScript_TryDisplayHeartAudienceMember4 + call_if_eq VAR_RESULT, 4, ContestHall_EventScript_TryDisplayHeartAudienceMember5 + call_if_eq VAR_RESULT, 5, ContestHall_EventScript_TryDisplayHeartAudienceMember6 + call_if_eq VAR_RESULT, 6, ContestHall_EventScript_TryDisplayHeartAudienceMember7 + call_if_eq VAR_RESULT, 7, ContestHall_EventScript_TryDisplayHeartAudienceMember8 + goto_if_gt VAR_TEMP_0, 0, ContestHall_EventScript_DisplayHearts @ Still more hearts to display waitmovement 0 return ContestHall_EventScript_GetNumberOfHeartsNormal:: - compare VAR_0x8004, 80 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 70 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 60 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 50 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 40 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 30 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 20 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 10 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 80, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 70, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 60, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 50, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 40, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 30, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 20, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 10, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return ContestHall_EventScript_GetNumberOfHeartsSuper:: - compare VAR_0x8004, 230 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 210 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 190 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 170 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 150 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 130 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 110 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 90 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 230, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 210, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 190, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 170, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 150, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 130, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 110, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 90, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return ContestHall_EventScript_GetNumberOfHeartsHyper:: - compare VAR_0x8004, 380 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 350 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 320 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 290 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 260 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 230 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 200 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 170 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 380, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 350, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 320, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 290, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 260, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 230, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 200, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 170, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return ContestHall_EventScript_GetNumberOfHeartsMaster:: - compare VAR_0x8004, 600 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 560 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 520 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 480 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 440 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 400 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 360 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 320 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 600, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 560, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 520, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 480, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 440, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 400, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 360, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 320, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return ContestHall_EventScript_GetNumberOfHeartsLink:: - compare VAR_0x8004, 600 - goto_if_gt ContestHall_EventScript_Set8Hearts - compare VAR_0x8004, 550 - goto_if_gt ContestHall_EventScript_Set7Hearts - compare VAR_0x8004, 500 - goto_if_gt ContestHall_EventScript_Set6Hearts - compare VAR_0x8004, 450 - goto_if_gt ContestHall_EventScript_Set5Hearts - compare VAR_0x8004, 400 - goto_if_gt ContestHall_EventScript_Set4Hearts - compare VAR_0x8004, 300 - goto_if_gt ContestHall_EventScript_Set3Hearts - compare VAR_0x8004, 200 - goto_if_gt ContestHall_EventScript_Set2Hearts - compare VAR_0x8004, 100 - goto_if_gt ContestHall_EventScript_Set1Heart + goto_if_gt VAR_0x8004, 600, ContestHall_EventScript_Set8Hearts + goto_if_gt VAR_0x8004, 550, ContestHall_EventScript_Set7Hearts + goto_if_gt VAR_0x8004, 500, ContestHall_EventScript_Set6Hearts + goto_if_gt VAR_0x8004, 450, ContestHall_EventScript_Set5Hearts + goto_if_gt VAR_0x8004, 400, ContestHall_EventScript_Set4Hearts + goto_if_gt VAR_0x8004, 300, ContestHall_EventScript_Set3Hearts + goto_if_gt VAR_0x8004, 200, ContestHall_EventScript_Set2Hearts + goto_if_gt VAR_0x8004, 100, ContestHall_EventScript_Set1Heart setvar VAR_TEMP_0, 0 return @@ -697,8 +622,7 @@ ContestHall_EventScript_Set8Hearts:: return ContestHall_EventScript_TryDisplayHeartAudienceMember1:: - compare VAR_TEMP_1, 1 - goto_if_eq ContestHall_EventScript_AudienceMember1AlreadyEmoted + goto_if_eq VAR_TEMP_1, 1, ContestHall_EventScript_AudienceMember1AlreadyEmoted applymovement LOCALID_AUDIENCE_1, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -710,8 +634,7 @@ ContestHall_EventScript_AudienceMember1AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember2:: - compare VAR_TEMP_2, 1 - goto_if_eq ContestHall_EventScript_AudienceMember2AlreadyEmoted + goto_if_eq VAR_TEMP_2, 1, ContestHall_EventScript_AudienceMember2AlreadyEmoted applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -723,8 +646,7 @@ ContestHall_EventScript_AudienceMember2AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember3:: - compare VAR_TEMP_3, 1 - goto_if_eq ContestHall_EventScript_AudienceMember3AlreadyEmoted + goto_if_eq VAR_TEMP_3, 1, ContestHall_EventScript_AudienceMember3AlreadyEmoted applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -736,8 +658,7 @@ ContestHall_EventScript_AudienceMember3AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember4:: - compare VAR_TEMP_4, 1 - goto_if_eq ContestHall_EventScript_Audience4MemberAlreadyEmoted + goto_if_eq VAR_TEMP_4, 1, ContestHall_EventScript_Audience4MemberAlreadyEmoted applymovement LOCALID_AUDIENCE_4, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -749,8 +670,7 @@ ContestHall_EventScript_Audience4MemberAlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember5:: - compare VAR_TEMP_5, 1 - goto_if_eq ContestHall_EventScript_AudienceMember5AlreadyEmoted + goto_if_eq VAR_TEMP_5, 1, ContestHall_EventScript_AudienceMember5AlreadyEmoted applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -762,8 +682,7 @@ ContestHall_EventScript_AudienceMember5AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember6:: - compare VAR_TEMP_6, 1 - goto_if_eq ContestHall_EventScript_AudienceMember6AlreadyEmoted + goto_if_eq VAR_TEMP_6, 1, ContestHall_EventScript_AudienceMember6AlreadyEmoted applymovement LOCALID_AUDIENCE_6, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -775,8 +694,7 @@ ContestHall_EventScript_AudienceMember6AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember7:: - compare VAR_TEMP_7, 1 - goto_if_eq ContestHall_EventScript_AudienceMember7AlreadyEmoted + goto_if_eq VAR_TEMP_7, 1, ContestHall_EventScript_AudienceMember7AlreadyEmoted applymovement LOCALID_AUDIENCE_7, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -788,8 +706,7 @@ ContestHall_EventScript_AudienceMember7AlreadyEmoted:: return ContestHall_EventScript_TryDisplayHeartAudienceMember8:: - compare VAR_TEMP_8, 1 - goto_if_eq ContestHall_EventScript_AudienceMember8AlreadyEmoted + goto_if_eq VAR_TEMP_8, 1, ContestHall_EventScript_AudienceMember8AlreadyEmoted applymovement LOCALID_ARTIST, ContestHall_Movement_Heart playse SE_PIN delay 14 @@ -870,15 +787,13 @@ ContestHall_EventScript_DoContestAppeals:: return ContestHall_EventScript_LetsAppeal:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_LetsAppealLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_LetsAppealLink msgbox ContestHall_Text_VotingCompleteLetsAppeal, MSGBOX_DEFAULT return ContestHall_EventScript_LetsAppealLink:: specialvar VAR_RESULT, IsWirelessContest - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_LetsAppealWireless + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_LetsAppealWireless messageautoscroll ContestHall_Text_VotingCompleteLetsAppeal waitmessage return @@ -920,8 +835,7 @@ ContestHall_EventScript_ContestResults:: return ContestHall_EventScript_ThatsItForJudging:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_ThatsItForJudgingLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_ThatsItForJudgingLink msgbox ContestHall_Text_ThatsItForJudging, MSGBOX_DEFAULT return @@ -933,8 +847,7 @@ ContestHall_EventScript_ThatsItForJudgingLink:: return ContestHall_EventScript_ThankYouForAppeals:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_ThankYouForAppealsLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_ThankYouForAppealsLink msgbox ContestHall_Text_ThankYouForAppeals, MSGBOX_DEFAULT return @@ -946,8 +859,7 @@ ContestHall_EventScript_ThankYouForAppealsLink:: return ContestHall_EventScript_JudgeLooksReady:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_JudgeLooksReadyLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_JudgeLooksReadyLink msgbox ContestHall_Text_JudgeLooksReady, MSGBOX_DEFAULT return @@ -959,8 +871,7 @@ ContestHall_EventScript_JudgeLooksReadyLink:: return ContestHall_EventScript_WeWillDeclareWinner:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_WeWillDeclareWinnerLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_WeWillDeclareWinnerLink msgbox ContestHall_Text_WeWillNowDeclareWinner, MSGBOX_DEFAULT return @@ -1010,8 +921,7 @@ ContestHall_EventScript_CongratulateWinner:: return ContestHall_EventScript_CongratsWinner:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_CongratsWinnerLink + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_CongratsWinnerLink msgbox ContestHall_Text_CongratsTrainerXandMon, MSGBOX_DEFAULT return @@ -1023,8 +933,7 @@ ContestHall_EventScript_CongratsWinnerLink:: ContestHall_EventScript_AudienceLookAround:: addvar VAR_TEMP_1, 1 lockall - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL - call_if_gt ContestHall_EventScript_VObjectAudienceLookAround + call_if_gt VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_NORMAL, ContestHall_EventScript_VObjectAudienceLookAround applymovement LOCALID_AUDIENCE_5, ContestHall_Movement_AudienceMemberLookRight applymovement LOCALID_AUDIENCE_2, ContestHall_Movement_AudienceMemberLookDown applymovement LOCALID_AUDIENCE_3, ContestHall_Movement_AudienceMemberLookRight @@ -1033,8 +942,7 @@ ContestHall_EventScript_AudienceLookAround:: applymovement LOCALID_AUDIENCE_7, ContestHall_Movement_AudienceMemberLookDown applymovement LOCALID_AUDIENCE_1, ContestHall_Movement_AudienceMemberLookUp applymovement LOCALID_AUDIENCE_4, ContestHall_Movement_AudienceMemberLookLeft - compare VAR_TEMP_1, 4 - goto_if_ne ContestHall_EventScript_AudienceLookAround + goto_if_ne VAR_TEMP_1, 4, ContestHall_EventScript_AudienceLookAround delay 30 return @@ -1108,8 +1016,7 @@ ContestHall_EventScript_VObjectAudienceLookAround:: return ContestHall_EventScript_GiveWinnerPrize:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_LINK - goto_if_eq ContestHall_EventScript_EndLinkContest + goto_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_LINK, ContestHall_EventScript_EndLinkContest call ContestHall_EventScript_CheckShouldSkipPrize goto_if_set FLAG_TEMP_2, ContestHall_EventScript_SkipPrize lockall @@ -1122,8 +1029,7 @@ ContestHall_EventScript_GiveWinnerPrize:: call ContestHall_EventScript_AudienceLookAround delay 30 special ShouldReadyContestArtist - compare VAR_0x8004, TRUE - goto_if_eq ContestHall_EventScript_SetReadyForContestArtist + goto_if_eq VAR_0x8004, TRUE, ContestHall_EventScript_SetReadyForContestArtist return ContestHall_EventScript_SkipPrize:: @@ -1132,25 +1038,21 @@ ContestHall_EventScript_SkipPrize:: releaseall delay 90 special ShouldReadyContestArtist - compare VAR_0x8004, TRUE - goto_if_eq ContestHall_EventScript_SetReadyForContestArtist + goto_if_eq VAR_0x8004, TRUE, ContestHall_EventScript_SetReadyForContestArtist return ContestHall_EventScript_CheckShouldSkipPrize:: specialvar VAR_RESULT, HasMonWonThisContestBefore - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_CheckPlayerWon + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_CheckPlayerWon return ContestHall_EventScript_CheckPlayerWon:: special GetContestWinnerId - compare VAR_0x8005, 3 - goto_if_eq ContestHall_EventScript_CheckRankIsMaster + goto_if_eq VAR_0x8005, 3, ContestHall_EventScript_CheckRankIsMaster return ContestHall_EventScript_CheckRankIsMaster:: - compare VAR_CONTEST_RANK, CONTEST_RANK_MASTER - goto_if_eq ContestHall_EventScript_DontSkipPrize + goto_if_eq VAR_CONTEST_RANK, CONTEST_RANK_MASTER, ContestHall_EventScript_DontSkipPrize setflag FLAG_TEMP_2 return @@ -1171,8 +1073,7 @@ ContestHall_EventScript_EndLinkContest:: special GetContestPlayerId special GetContestWinnerId special ShouldReadyContestArtist - compare VAR_0x8004, TRUE - goto_if_eq ContestHall_EventScript_SetReadyForLinkContestArtist + goto_if_eq VAR_0x8004, TRUE, ContestHall_EventScript_SetReadyForLinkContestArtist closemessage return @@ -1223,21 +1124,17 @@ ContestHall_EventScript_Player4ApproachForPrize:: @ In NPC Contests, the player is always entry 4 (id number 3) ContestHall_EventScript_GivePrizeIfWinner:: special GetContestWinnerId - compare VAR_0x8005, 3 - goto_if_eq ContestHall_EventScript_GiveContestPrizes + goto_if_eq VAR_0x8005, 3, ContestHall_EventScript_GiveContestPrizes lockall msgbox ContestHall_Text_CongratsPleaseCompeteAgain, MSGBOX_DEFAULT releaseall return ContestHall_EventScript_GiveContestPrizes:: - compare VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_SUPER - call_if_eq ContestHall_EventScript_SetSketchFlag + call_if_eq VAR_CONTEST_TYPE, CONTEST_TYPE_NPC_SUPER, ContestHall_EventScript_SetSketchFlag specialvar VAR_RESULT, HasMonWonThisContestBefore - compare VAR_RESULT, FALSE - goto_if_eq ContestHall_EventScript_ReceiveContestRibbon - compare VAR_CONTEST_RANK, CONTEST_RANK_MASTER - goto_if_eq ContestHall_EventScript_GiveLuxuryBall + goto_if_eq VAR_RESULT, FALSE, ContestHall_EventScript_ReceiveContestRibbon + goto_if_eq VAR_CONTEST_RANK, CONTEST_RANK_MASTER, ContestHall_EventScript_GiveLuxuryBall lockall msgbox ContestHall_Text_CongratsPleaseCompeteAgain, MSGBOX_DEFAULT releaseall @@ -1253,8 +1150,7 @@ ContestHall_EventScript_NoRoomForLuxuryBall:: ContestHall_EventScript_GiveLuxuryBall:: giveitem ITEM_LUXURY_BALL - compare VAR_RESULT, FALSE - goto_if_eq ContestHall_EventScript_NoRoomForLuxuryBall + goto_if_eq VAR_RESULT, FALSE, ContestHall_EventScript_NoRoomForLuxuryBall lockall msgbox ContestHall_Text_CongratsPleaseCompeteAgain, MSGBOX_DEFAULT releaseall @@ -1460,8 +1356,7 @@ ContestHall_Movement_Player2ApproachForPrize: @ IsContestWithRSPlayer has no side effect, so this is nop ContestHall_EventScript_CheckIfContestWithRSPlayer:: specialvar VAR_RESULT, IsContestWithRSPlayer - compare VAR_RESULT, TRUE - goto_if_eq ContestHall_EventScript_RetRSPlayer + goto_if_eq VAR_RESULT, TRUE, ContestHall_EventScript_RetRSPlayer return ContestHall_EventScript_RetRSPlayer:: @@ -1469,8 +1364,7 @@ ContestHall_EventScript_RetRSPlayer:: LilycoveCity_ContestLobby_EventScript_DelayIfContestWithRSPlayer:: specialvar VAR_RESULT, IsContestWithRSPlayer - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_DelayForRSPlayer + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_DelayForRSPlayer return LilycoveCity_ContestLobby_EventScript_DelayForRSPlayer:: diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index ba61fb0047..cb053f2c40 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -5,23 +5,18 @@ Route117_EventScript_DaycareMan:: faceplayer special GetDaycareMonNicknames specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_EGG_WAITING - goto_if_eq Route117_EventScript_DaycareEggWaiting - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_EventScript_CheckOnOneMon - compare VAR_RESULT, DAYCARE_TWO_MONS - goto_if_eq Route117_EventScript_CheckOnTwoMons + goto_if_eq VAR_RESULT, DAYCARE_EGG_WAITING, Route117_EventScript_DaycareEggWaiting + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_EventScript_CheckOnOneMon + goto_if_eq VAR_RESULT, DAYCARE_TWO_MONS, Route117_EventScript_CheckOnTwoMons msgbox Route117_Text_SeeWifeIfYoudLikeMeToRaiseMon, MSGBOX_DEFAULT release end Route117_EventScript_DaycareEggWaiting:: msgbox Route117_Text_DoYouWantEgg, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_EventScript_DaycareAcceptEgg + goto_if_eq VAR_RESULT, YES, Route117_EventScript_DaycareAcceptEgg msgbox Route117_Text_IWillKeepDoYouWantIt, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_EventScript_DaycareAcceptEgg + goto_if_eq VAR_RESULT, YES, Route117_EventScript_DaycareAcceptEgg msgbox Route117_Text_IllKeepIt, MSGBOX_DEFAULT clearflag FLAG_PENDING_DAYCARE_EGG special RejectEggFromDayCare @@ -30,8 +25,7 @@ Route117_EventScript_DaycareEggWaiting:: Route117_EventScript_DaycareAcceptEgg:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, PARTY_SIZE - goto_if_ne Route117_EventScript_DaycareReceiveEgg + goto_if_ne VAR_RESULT, PARTY_SIZE, Route117_EventScript_DaycareReceiveEgg msgbox Route117_Text_YouHaveNoRoomForIt, MSGBOX_DEFAULT release end @@ -49,8 +43,7 @@ Route117_EventScript_DaycareReceiveEgg:: Route117_EventScript_CheckMonReceivedMail:: specialvar VAR_RESULT, CheckDaycareMonReceivedMail - compare VAR_RESULT, 1 - call_if_eq Route117_EventScript_MonReceivedMail + call_if_eq VAR_RESULT, 1, Route117_EventScript_MonReceivedMail return Route117_EventScript_MonReceivedMail:: @@ -83,35 +76,27 @@ Route117_PokemonDayCare_EventScript_DaycareWoman:: lock faceplayer specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_EGG_WAITING - goto_if_eq Route117_PokemonDayCare_EventScript_EggWaiting - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_PokemonDayCare_EventScript_OneMonInDaycare - compare VAR_RESULT, DAYCARE_TWO_MONS - goto_if_eq Route117_PokemonDayCare_EventScript_TwoMonsInDaycare + goto_if_eq VAR_RESULT, DAYCARE_EGG_WAITING, Route117_PokemonDayCare_EventScript_EggWaiting + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_OneMonInDaycare + goto_if_eq VAR_RESULT, DAYCARE_TWO_MONS, Route117_PokemonDayCare_EventScript_TwoMonsInDaycare msgbox Route117_PokemonDayCare_Text_WouldYouLikeUsToRaiseAMon, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_GiveMonToRaise msgbox Route117_PokemonDayCare_Text_FineThenComeAgain, MSGBOX_DEFAULT release end Route117_PokemonDayCare_EventScript_GiveMonToRaise:: specialvar VAR_RESULT, CountPartyNonEggMons - compare VAR_RESULT, 1 - goto_if_eq Route117_PokemonDayCare_EventScript_OnlyOneMon + goto_if_eq VAR_RESULT, 1, Route117_PokemonDayCare_EventScript_OnlyOneMon specialvar VAR_RESULT, CountPartyAliveNonEggMons - compare VAR_RESULT, 2 - goto_if_eq Route117_PokemonDayCare_EventScript_OnlyTwoAliveMons + goto_if_eq VAR_RESULT, 2, Route117_PokemonDayCare_EventScript_OnlyTwoAliveMons msgbox Route117_PokemonDayCare_Text_WhichMonShouldWeRaise, MSGBOX_DEFAULT fadescreen FADE_TO_BLACK special ChooseSendDaycareMon waitstate - compare VAR_0x8004, PARTY_NOTHING_CHOSEN - goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain + goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, Route117_PokemonDayCare_EventScript_ComeAgain specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot - compare VAR_RESULT, 0 - goto_if_eq Route117_PokemonDayCare_EventScript_OnlyOneAliveMon + goto_if_eq VAR_RESULT, 0, Route117_PokemonDayCare_EventScript_OnlyOneAliveMon specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies waitse playmoncry VAR_0x8005, CRY_MODE_NORMAL @@ -120,8 +105,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise:: special StoreSelectedPokemonInDaycare incrementgamestat GAME_STAT_USED_DAYCARE specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_PokemonDayCare_EventScript_CanRaiseOneMore + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_CanRaiseOneMore release end @@ -132,8 +116,7 @@ Route117_PokemonDayCare_EventScript_ComeAgain:: Route117_PokemonDayCare_EventScript_CanRaiseOneMore:: msgbox Route117_PokemonDayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_GiveMonToRaise goto Route117_PokemonDayCare_EventScript_ComeAgain end @@ -163,8 +146,7 @@ Route117_PokemonDayCare_EventScript_YourMonHasGrownXLevels:: Route117_PokemonDayCare_EventScript_DisplayLevelsGained:: specialvar VAR_RESULT, GetNumLevelsGainedFromDaycare - compare VAR_RESULT, 0 - call_if_ne Route117_PokemonDayCare_EventScript_YourMonHasGrownXLevels + call_if_ne VAR_RESULT, 0, Route117_PokemonDayCare_EventScript_YourMonHasGrownXLevels return Route117_PokemonDayCare_EventScript_OneMonInDaycare:: @@ -172,42 +154,35 @@ Route117_PokemonDayCare_EventScript_OneMonInDaycare:: setvar VAR_0x8004, 0 call Route117_PokemonDayCare_EventScript_DisplayLevelsGained msgbox Route117_PokemonDayCare_Text_WeCanRaiseOneMore, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_GiveMonToRaise + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_GiveMonToRaise msgbox Route117_PokemonDayCare_Text_TakeYourMonBack, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_TryRetrieveMon goto Route117_PokemonDayCare_EventScript_ComeAgain end Route117_PokemonDayCare_EventScript_TryRetrieveMon:: specialvar VAR_RESULT, CalculatePlayerPartyCount - compare VAR_RESULT, PARTY_SIZE - goto_if_eq Route117_PokemonDayCare_EventScript_NoRoom + goto_if_eq VAR_RESULT, PARTY_SIZE, Route117_PokemonDayCare_EventScript_NoRoom specialvar VAR_RESULT, GetDaycareState setvar VAR_0x8004, 0 - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_PokemonDayCare_EventScript_CostPrompt + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_CostPrompt special ShowDaycareLevelMenu waitstate copyvar VAR_0x8004, VAR_RESULT - compare VAR_RESULT, DAYCARE_EXITED_LEVEL_MENU - goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain + goto_if_eq VAR_RESULT, DAYCARE_EXITED_LEVEL_MENU, Route117_PokemonDayCare_EventScript_ComeAgain goto Route117_PokemonDayCare_EventScript_CostPrompt end Route117_PokemonDayCare_EventScript_CostPrompt:: special GetDaycareCost msgbox Route117_PokemonDayCare_Text_ItWillCostX, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_CheckEnoughMoney + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_CheckEnoughMoney goto Route117_PokemonDayCare_EventScript_ComeAgain end Route117_PokemonDayCare_EventScript_CheckEnoughMoney:: specialvar VAR_RESULT, IsEnoughForCostInVar0x8005 - compare VAR_RESULT, 1 - goto_if_eq Route117_PokemonDayCare_EventScript_RetrieveMon + goto_if_eq VAR_RESULT, 1, Route117_PokemonDayCare_EventScript_RetrieveMon msgbox Route117_PokemonDayCare_Text_NotEnoughMoney, MSGBOX_DEFAULT release end @@ -224,15 +199,13 @@ Route117_PokemonDayCare_EventScript_RetrieveMon:: msgbox Route117_PokemonDayCare_Text_TookBackMon, MSGBOX_DEFAULT waitmoncry specialvar VAR_RESULT, GetDaycareState - compare VAR_RESULT, DAYCARE_ONE_MON - goto_if_eq Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon + goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon goto Route117_PokemonDayCare_EventScript_ComeAgain end Route117_PokemonDayCare_EventScript_AskRetrieveOtherMon:: msgbox Route117_PokemonDayCare_Text_TakeOtherOneBackToo, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_TryRetrieveMon goto Route117_PokemonDayCare_EventScript_ComeAgain end @@ -274,8 +247,7 @@ Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: setvar VAR_0x8004, 1 call Route117_PokemonDayCare_EventScript_DisplayLevelsGained msgbox Route117_PokemonDayCare_Text_TakeYourMonBack, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route117_PokemonDayCare_EventScript_TryRetrieveMon + goto_if_eq VAR_RESULT, YES, Route117_PokemonDayCare_EventScript_TryRetrieveMon msgbox Route117_PokemonDayCare_Text_ComeAgain, MSGBOX_DEFAULT release end @@ -284,8 +256,7 @@ Route117_PokemonDayCare_EventScript_TwoMonsInDaycare:: Route117_PokemonDayCare_EventScript_UnusedRetrieveMon:: special ShowDaycareLevelMenu waitstate - compare VAR_RESULT, 2 - goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain + goto_if_eq VAR_RESULT, 2, Route117_PokemonDayCare_EventScript_ComeAgain copyvar VAR_0x8004, VAR_RESULT specialvar VAR_RESULT, TakePokemonFromDaycare msgbox Route117_PokemonDayCare_Text_HeresYourMon, MSGBOX_DEFAULT diff --git a/data/scripts/field_move_scripts.inc b/data/scripts/field_move_scripts.inc index 39a04ae1a1..3e99fc08e2 100644 --- a/data/scripts/field_move_scripts.inc +++ b/data/scripts/field_move_scripts.inc @@ -3,14 +3,12 @@ EventScript_CutTree:: lockall goto_if_unset FLAG_BADGE01_GET, EventScript_CheckTreeCantCut checkpartymove MOVE_CUT - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CheckTreeCantCut + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CheckTreeCantCut setfieldeffectargument 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT buffermovename STR_VAR_2, MOVE_CUT msgbox Text_WantToCut, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelCut + goto_if_eq VAR_RESULT, NO, EventScript_CancelCut msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_CUT_ON_TREE @@ -64,14 +62,12 @@ EventScript_RockSmash:: lockall goto_if_unset FLAG_BADGE03_GET, EventScript_CantSmashRock checkpartymove MOVE_ROCK_SMASH - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantSmashRock + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSmashRock setfieldeffectargument 0, VAR_RESULT bufferpartymonnick STR_VAR_1, VAR_RESULT buffermovename STR_VAR_2, MOVE_ROCK_SMASH msgbox Text_WantToSmash, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelSmash + goto_if_eq VAR_RESULT, NO, EventScript_CancelSmash msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_ROCK_SMASH @@ -92,11 +88,9 @@ EventScript_SmashRock:: waitmovement 0 removeobject VAR_LAST_TALKED specialvar VAR_RESULT, TryUpdateRusturfTunnelState - compare VAR_RESULT, TRUE - goto_if_eq EventScript_EndSmash + goto_if_eq VAR_RESULT, TRUE, EventScript_EndSmash special RockSmashWildEncounter - compare VAR_RESULT, FALSE - goto_if_eq EventScript_EndSmash + goto_if_eq VAR_RESULT, FALSE, EventScript_EndSmash waitstate releaseall end @@ -132,12 +126,10 @@ EventScript_StrengthBoulder:: goto_if_unset FLAG_BADGE04_GET, EventScript_CantStrength goto_if_set FLAG_SYS_USE_STRENGTH, EventScript_CheckActivatedBoulder checkpartymove MOVE_STRENGTH - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantStrength + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantStrength setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToStrength, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_CancelStrength + goto_if_eq VAR_RESULT, NO, EventScript_CancelStrength closemessage dofieldeffect FLDEFF_USE_STRENGTH waitstate @@ -193,13 +185,11 @@ Text_StrengthActivated: EventScript_UseWaterfall:: lockall checkpartymove MOVE_WATERFALL - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantWaterfall + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantWaterfall bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT msgbox Text_WantToWaterfall, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndWaterfall + goto_if_eq VAR_RESULT, NO, EventScript_EndWaterfall msgbox Text_MonUsedWaterfall, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_WATERFALL goto EventScript_EndWaterfall @@ -228,14 +218,12 @@ Text_MonUsedWaterfall: EventScript_UseDive:: lockall checkpartymove MOVE_DIVE - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantDive + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantDive bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToDive, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndDive + goto_if_eq VAR_RESULT, NO, EventScript_EndDive msgbox Text_MonUsedDive, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_DIVE goto EventScript_EndDive @@ -253,14 +241,12 @@ EventScript_EndDive:: EventScript_UseDiveUnderwater:: lockall checkpartymove MOVE_DIVE - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_CantSurface + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSurface bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT setfieldeffectargument 1, 1 msgbox Text_WantToSurface, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_EndSurface + goto_if_eq VAR_RESULT, NO, EventScript_EndSurface msgbox Text_MonUsedDive, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_DIVE goto EventScript_EndSurface diff --git a/data/scripts/field_poison.inc b/data/scripts/field_poison.inc index a4f9b90b6b..ddda34ebaa 100644 --- a/data/scripts/field_poison.inc +++ b/data/scripts/field_poison.inc @@ -2,10 +2,8 @@ EventScript_FieldPoison:: lockall special TryFieldPoisonWhiteOut waitstate - compare VAR_RESULT, FLDPSN_WHITEOUT - goto_if_eq EventScript_FieldWhiteOut - compare VAR_RESULT, FLDPSN_FRONTIER_WHITEOUT - goto_if_eq EventScript_FrontierFieldWhiteOut + goto_if_eq VAR_RESULT, FLDPSN_WHITEOUT, EventScript_FieldWhiteOut + goto_if_eq VAR_RESULT, FLDPSN_FRONTIER_WHITEOUT, EventScript_FrontierFieldWhiteOut releaseall end @@ -30,16 +28,12 @@ EventScript_FrontierFieldWhiteOut:: waitmessage waitbuttonpress pike_inchallenge - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattlePike_EventScript_Retire + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePike_EventScript_Retire pyramid_inchallenge - compare VAR_RESULT, 1 @ On Pyramid floor - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost - compare VAR_RESULT, 2 @ On Pyramid peak - goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost @ On Pyramid floor + goto_if_eq VAR_RESULT, 2, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost @ On Pyramid peak trainerhill_inchallenge - compare VAR_RESULT, TRUE - goto_if_eq TrainerHill_1F_EventScript_Lost + goto_if_eq VAR_RESULT, TRUE, TrainerHill_1F_EventScript_Lost special Script_FadeOutMapMusic waitstate fadescreen FADE_TO_BLACK diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index 68be27a028..e3dbdfd665 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -199,12 +199,9 @@ GabbyAndTy_EventScript_TyBattle6:: GabbyAndTy_EventScript_FirstInterview:: special GabbyAndTyBeforeInterview special GetGabbyAndTyLocalIds - compare VAR_FACING, DIR_NORTH - call_if_eq GabbyAndTy_EventScript_FacePlayerNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq GabbyAndTy_EventScript_FacePlayerSouth - compare VAR_FACING, DIR_EAST - call_if_eq GabbyAndTy_EventScript_FacePlayerEast + call_if_eq VAR_FACING, DIR_NORTH, GabbyAndTy_EventScript_FacePlayerNorth + call_if_eq VAR_FACING, DIR_SOUTH, GabbyAndTy_EventScript_FacePlayerSouth + call_if_eq VAR_FACING, DIR_EAST, GabbyAndTy_EventScript_FacePlayerEast goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou msgbox GabbyAndTy_Text_WhoAreYouInterview, MSGBOX_YESNO goto GabbyAndTy_EventScript_Interview @@ -230,16 +227,12 @@ GabbyAndTy_EventScript_FacePlayerEast:: GabbyAndTy_EventScript_RequestInterview:: special GabbyAndTyBeforeInterview special GetGabbyAndTyLocalIds - compare VAR_FACING, DIR_NORTH - call_if_eq GabbyAndTy_EventScript_FacePlayerNorth - compare VAR_FACING, DIR_SOUTH - call_if_eq GabbyAndTy_EventScript_FacePlayerSouth - compare VAR_FACING, DIR_EAST - call_if_eq GabbyAndTy_EventScript_FacePlayerEast + call_if_eq VAR_FACING, DIR_NORTH, GabbyAndTy_EventScript_FacePlayerNorth + call_if_eq VAR_FACING, DIR_SOUTH, GabbyAndTy_EventScript_FacePlayerSouth + call_if_eq VAR_FACING, DIR_EAST, GabbyAndTy_EventScript_FacePlayerEast goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou specialvar VAR_RESULT, GabbyAndTyGetLastQuote - compare VAR_RESULT, 0 - goto_if_eq GabbyAndTy_EventScript_DidntInterviewLastTime + goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DidntInterviewLastTime msgbox GabbyAndTy_Text_QuoteFromLastInterview, MSGBOX_DEFAULT specialvar VAR_RESULT, GabbyAndTyGetLastBattleTrivia switch VAR_RESULT @@ -293,15 +286,13 @@ GabbyAndTy_EventScript_RequestInterviewLostAMon:: end GabbyAndTy_EventScript_Interview:: - compare VAR_RESULT, NO - goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut + goto_if_eq VAR_RESULT, NO, GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut msgbox GabbyAndTy_Text_DescribeYourFeelings, MSGBOX_DEFAULT setvar VAR_0x8004, EASY_CHAT_TYPE_GABBY_AND_TY call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut + goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut msgbox GabbyAndTy_Text_PerfectWellBeSeeingYou, MSGBOX_DEFAULT special GabbyAndTyAfterInterview setflag FLAG_TEMP_1 diff --git a/data/scripts/gift_altering_cave.inc b/data/scripts/gift_altering_cave.inc index 8761b5fa40..f86432ce28 100644 --- a/data/scripts/gift_altering_cave.inc +++ b/data/scripts/gift_altering_cave.inc @@ -1,8 +1,7 @@ MysteryGiftScript_AlteringCave:: setvaddress MysteryGiftScript_AlteringCave addvar VAR_ALTERING_CAVE_WILD_SET, 1 - compare VAR_ALTERING_CAVE_WILD_SET, 10 - vgoto_if_ne MysteryGiftScript_AlteringCave_ + vgoto_if_ne VAR_ALTERING_CAVE_WILD_SET, 10, MysteryGiftScript_AlteringCave_ setvar VAR_ALTERING_CAVE_WILD_SET, 0 MysteryGiftScript_AlteringCave_: lock diff --git a/data/scripts/gift_aurora_ticket.inc b/data/scripts/gift_aurora_ticket.inc index 760bea9393..0cadf804a7 100644 --- a/data/scripts/gift_aurora_ticket.inc +++ b/data/scripts/gift_aurora_ticket.inc @@ -5,14 +5,12 @@ MysteryGiftScript_AuroraTicket:: vgoto_if_set FLAG_RECEIVED_AURORA_TICKET, AuroraTicket_Obtained vgoto_if_set FLAG_BATTLED_DEOXYS, AuroraTicket_Obtained checkitem ITEM_AURORA_TICKET - compare VAR_RESULT, TRUE - vgoto_if_eq AuroraTicket_Obtained + vgoto_if_eq VAR_RESULT, TRUE, AuroraTicket_Obtained vmessage sText_AuroraTicketForYou waitmessage waitbuttonpress checkitemspace ITEM_AURORA_TICKET - compare VAR_RESULT, FALSE - vgoto_if_eq AuroraTicket_NoBagSpace + vgoto_if_eq VAR_RESULT, FALSE, AuroraTicket_NoBagSpace giveitem ITEM_AURORA_TICKET setflag FLAG_ENABLE_SHIP_BIRTH_ISLAND setflag FLAG_RECEIVED_AURORA_TICKET diff --git a/data/scripts/gift_battle_card.inc b/data/scripts/gift_battle_card.inc index 80b4ba26eb..95e55e1b95 100644 --- a/data/scripts/gift_battle_card.inc +++ b/data/scripts/gift_battle_card.inc @@ -3,8 +3,7 @@ MysteryGiftScript_BattleCard:: vgoto_if_set FLAG_MYSTERY_GIFT_DONE, MysteryGiftScript_BattleCardInfo setorcopyvar VAR_RESULT, GET_CARD_BATTLES_WON specialvar VAR_0x8008, GetMysteryGiftCardStat - compare VAR_0x8008, REQUIRED_CARD_BATTLES - vgoto_if_ne MysteryGiftScript_BattleCardInfo + vgoto_if_ne VAR_0x8008, REQUIRED_CARD_BATTLES, MysteryGiftScript_BattleCardInfo lock faceplayer vmessage sText_MysteryGiftBattleCountCard_WonPrize diff --git a/data/scripts/gift_mystic_ticket.inc b/data/scripts/gift_mystic_ticket.inc index 1a28dd4ce0..3ed8aa6bcf 100644 --- a/data/scripts/gift_mystic_ticket.inc +++ b/data/scripts/gift_mystic_ticket.inc @@ -6,14 +6,12 @@ MysteryGiftScript_MysticTicket:: vgoto_if_set FLAG_CAUGHT_LUGIA, MysticTicket_Obtained vgoto_if_set FLAG_CAUGHT_HO_OH, MysticTicket_Obtained checkitem ITEM_MYSTIC_TICKET - compare VAR_RESULT, TRUE - vgoto_if_eq MysticTicket_Obtained + vgoto_if_eq VAR_RESULT, TRUE, MysticTicket_Obtained vmessage sText_MysticTicketForYou waitmessage waitbuttonpress checkitemspace ITEM_MYSTIC_TICKET - compare VAR_RESULT, FALSE - vgoto_if_eq MysticTicket_NoBagSpace + vgoto_if_eq VAR_RESULT, FALSE, MysticTicket_NoBagSpace giveitem ITEM_MYSTIC_TICKET setflag FLAG_ENABLE_SHIP_NAVEL_ROCK setflag FLAG_RECEIVED_MYSTIC_TICKET diff --git a/data/scripts/gift_old_sea_map.inc b/data/scripts/gift_old_sea_map.inc index b0f258807e..06435492e4 100644 --- a/data/scripts/gift_old_sea_map.inc +++ b/data/scripts/gift_old_sea_map.inc @@ -5,14 +5,12 @@ MysteryGiftScript_OldSeaMap:: vgoto_if_set FLAG_RECEIVED_OLD_SEA_MAP, OldSeaMap_Obtained vgoto_if_set FLAG_CAUGHT_MEW, OldSeaMap_Obtained checkitem ITEM_OLD_SEA_MAP - compare VAR_RESULT, TRUE - vgoto_if_eq OldSeaMap_Obtained + vgoto_if_eq VAR_RESULT, TRUE, OldSeaMap_Obtained vmessage sText_MysteryGiftOldSeaMapForYou waitmessage waitbuttonpress checkitemspace ITEM_OLD_SEA_MAP - compare VAR_RESULT, FALSE - vgoto_if_eq OldSeaMap_NoBagSpace + vgoto_if_eq VAR_RESULT, FALSE, OldSeaMap_NoBagSpace giveitem ITEM_OLD_SEA_MAP setflag FLAG_ENABLE_SHIP_FARAWAY_ISLAND setflag FLAG_RECEIVED_OLD_SEA_MAP diff --git a/data/scripts/gift_pichu.inc b/data/scripts/gift_pichu.inc index e62fc4536e..d2cd381b53 100644 --- a/data/scripts/gift_pichu.inc +++ b/data/scripts/gift_pichu.inc @@ -5,8 +5,7 @@ MysteryGiftScript_SurfPichu:: SurfPichu_GiveIfPossible: specialvar VAR_GIFT_PICHU_SLOT, CalculatePlayerPartyCount - compare VAR_GIFT_PICHU_SLOT, PARTY_SIZE - vgoto_if_eq SurfPichu_FullParty + vgoto_if_eq VAR_GIFT_PICHU_SLOT, PARTY_SIZE, SurfPichu_FullParty setflag FLAG_MYSTERY_GIFT_DONE vcall SurfPichu_GiveEgg lock @@ -32,16 +31,11 @@ SurfPichu_GiveEgg: giveegg SPECIES_PICHU setmoneventlegal VAR_GIFT_PICHU_SLOT setmonmetlocation VAR_GIFT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER - compare VAR_GIFT_PICHU_SLOT, 1 - vgoto_if_eq SurfPichu_Slot1 - compare VAR_GIFT_PICHU_SLOT, 2 - vgoto_if_eq SurfPichu_Slot2 - compare VAR_GIFT_PICHU_SLOT, 3 - vgoto_if_eq SurfPichu_Slot3 - compare VAR_GIFT_PICHU_SLOT, 4 - vgoto_if_eq SurfPichu_Slot4 - compare VAR_GIFT_PICHU_SLOT, 5 - vgoto_if_eq SurfPichu_Slot5 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 1, SurfPichu_Slot1 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 2, SurfPichu_Slot2 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 3, SurfPichu_Slot3 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 4, SurfPichu_Slot4 + vgoto_if_eq VAR_GIFT_PICHU_SLOT, 5, SurfPichu_Slot5 return SurfPichu_Slot1: diff --git a/data/scripts/gift_trainer.inc b/data/scripts/gift_trainer.inc index 2dbc86d53e..b927809058 100644 --- a/data/scripts/gift_trainer.inc +++ b/data/scripts/gift_trainer.inc @@ -1,8 +1,7 @@ MysteryGiftScript_VisitingTrainer:: setvaddress MysteryGiftScript_VisitingTrainer special ValidateEReaderTrainer - compare VAR_RESULT, 0 - vgoto_if_eq MysteryGiftScript_VisitingTrainerArrived + vgoto_if_eq VAR_RESULT, 0, MysteryGiftScript_VisitingTrainerArrived lock faceplayer vmessage sText_MysteryGiftVisitingTrainerInstructions diff --git a/data/scripts/hall_of_fame.inc b/data/scripts/hall_of_fame.inc index 9b730de317..fc082870f7 100644 --- a/data/scripts/hall_of_fame.inc +++ b/data/scripts/hall_of_fame.inc @@ -2,8 +2,7 @@ EverGrandeCity_HallOfFame_EventScript_SetGameClearFlags:: special SetChampionSaveWarp setflag FLAG_IS_CHAMPION call EverGrandeCity_HallOfFame_EventScript_ResetDefeatedEventLegendaries - compare VAR_FOSSIL_MANIAC_STATE, 0 - call_if_eq EverGrandeCity_HallOfFame_EventScript_SetDesertUnderpassCommentReady + call_if_eq VAR_FOSSIL_MANIAC_STATE, 0, EverGrandeCity_HallOfFame_EventScript_SetDesertUnderpassCommentReady clearflag FLAG_HIDE_LILYCOVE_MOTEL_GAME_DESIGNERS call EverGrandeCity_HallOfFame_EventScript_ResetEliteFour setflag FLAG_HIDE_SLATEPORT_CITY_STERNS_SHIPYARD_MR_BRINEY @@ -22,8 +21,7 @@ EverGrandeCity_HallOfFame_EventScript_SetGameClearFlags:: call_if_unset FLAG_RECEIVED_BELDUM, EverGrandeCity_HallOfFame_EventScript_ShowStevensHouseBeldum setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_BEDROOM - compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 0 - call_if_eq EverGrandeCity_HallOfFame_EventScript_ReadyDexUpgradeEvent + call_if_eq VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 0, EverGrandeCity_HallOfFame_EventScript_ReadyDexUpgradeEvent return EverGrandeCity_HallOfFame_EventScript_ResetDefeatedEventLegendaries:: diff --git a/data/scripts/interview.inc b/data/scripts/interview.inc index 90fceb9d18..e102bf889c 100644 --- a/data/scripts/interview.inc +++ b/data/scripts/interview.inc @@ -8,14 +8,11 @@ Interview_EventScript_EndInterview:: SlateportCity_PokemonFanClub_EventScript_ReporterNoNickname:: setvar VAR_0x8005, TVSHOW_FAN_CLUB_LETTER special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_AlreadyInterviewed2 + goto_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_AlreadyInterviewed2 copyvar VAR_0x8009, VAR_0x8006 msgbox SlateportCity_PokemonFanClub_Text_InterviewRequest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_PokemonFanClub_EventScript_AcceptInterview2 - compare VAR_RESULT, NO - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview2 + goto_if_eq VAR_RESULT, YES, SlateportCity_PokemonFanClub_EventScript_AcceptInterview2 + goto_if_eq VAR_RESULT, NO, SlateportCity_PokemonFanClub_EventScript_DeclineInterview2 end SlateportCity_PokemonFanClub_EventScript_AcceptInterview2:: @@ -26,10 +23,8 @@ SlateportCity_PokemonFanClub_EventScript_AcceptInterview2:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_SubmitResponse2 - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview2 + goto_if_eq VAR_RESULT, 1, SlateportCity_PokemonFanClub_EventScript_SubmitResponse2 + goto_if_eq VAR_RESULT, 0, SlateportCity_PokemonFanClub_EventScript_DeclineInterview2 end SlateportCity_PokemonFanClub_EventScript_DeclineInterview2:: @@ -53,24 +48,19 @@ SlateportCity_OceanicMuseum_1F_EventScript_Reporter:: faceplayer setvar VAR_0x8005, TVSHOW_RECENT_HAPPENINGS special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_AlreadyInterviewed + goto_if_eq VAR_RESULT, TRUE, SlateportCity_OceanicMuseum_1F_EventScript_AlreadyInterviewed copyvar VAR_0x8009, VAR_0x8006 goto_if_set FLAG_OCEANIC_MUSEUM_MET_REPORTER, SlateportCity_OceanicMuseum_1F_EventScript_RequestInterviewShort setflag FLAG_OCEANIC_MUSEUM_MET_REPORTER msgbox SlateportCity_OceanicMuseum_1F_Text_InterviewRequest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview end SlateportCity_OceanicMuseum_1F_EventScript_RequestInterviewShort:: msgbox SlateportCity_OceanicMuseum_1F_Text_InterviewRequestShort, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview end SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview:: @@ -81,10 +71,8 @@ SlateportCity_OceanicMuseum_1F_EventScript_AcceptInterview:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_SubmitResponse - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 1, SlateportCity_OceanicMuseum_1F_EventScript_SubmitResponse + goto_if_eq VAR_RESULT, 0, SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview end SlateportCity_OceanicMuseum_1F_EventScript_DeclineInterview:: @@ -107,18 +95,14 @@ SlateportCity_PokemonFanClub_EventScript_Reporter:: lock faceplayer specialvar VAR_RESULT, IsLeadMonNicknamedOrNotEnglish - compare VAR_RESULT, FALSE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_ReporterNoNickname + goto_if_eq VAR_RESULT, FALSE, SlateportCity_PokemonFanClub_EventScript_ReporterNoNickname setvar VAR_0x8005, TVSHOW_PKMN_FAN_CLUB_OPINIONS special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq SlateportCity_PokemonFanClub_EventScript_AlreadyInterviewed + goto_if_eq VAR_RESULT, TRUE, SlateportCity_PokemonFanClub_EventScript_AlreadyInterviewed copyvar VAR_0x8009, VAR_0x8006 msgbox SlateportCity_PokemonFanClub_Text_InterviewRequestHasName, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SlateportCity_PokemonFanClub_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, SlateportCity_PokemonFanClub_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, SlateportCity_PokemonFanClub_EventScript_DeclineInterview end SlateportCity_PokemonFanClub_EventScript_AcceptInterview:: @@ -153,15 +137,13 @@ SlateportCity_PokemonFanClub_EventScript_ContinueInterview:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 0, SlateportCity_PokemonFanClub_EventScript_DeclineInterview msgbox SlateportCity_PokemonFanClub_Text_WhatDoPokemonMeanToYou, MSGBOX_DEFAULT setvar VAR_0x8006, 1 call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq SlateportCity_PokemonFanClub_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 0, SlateportCity_PokemonFanClub_EventScript_DeclineInterview msgbox SlateportCity_PokemonFanClub_Text_ThatsAllForInterview, MSGBOX_DEFAULT copyvar VAR_0x8007, VAR_0x800A setvar VAR_0x8005, TVSHOW_PKMN_FAN_CLUB_OPINIONS @@ -184,14 +166,11 @@ LilycoveCity_ContestLobby_EventScript_Reporter:: goto_if_set FLAG_TEMP_2, LilycoveCity_ContestLobby_EventScript_AlreadyInterviewed setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_AlreadyInterviewed + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_AlreadyInterviewed copyvar VAR_0x8009, VAR_0x8006 msgbox LilycoveCity_ContestLobby_Text_InterviewRequest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_ContestLobby_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_ContestLobby_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, LilycoveCity_ContestLobby_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, LilycoveCity_ContestLobby_EventScript_DeclineInterview end LilycoveCity_ContestLobby_EventScript_AcceptInterview:: @@ -202,10 +181,8 @@ LilycoveCity_ContestLobby_EventScript_AcceptInterview:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_ContestLobby_EventScript_SubmitResponse - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_ContestLobby_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 1, LilycoveCity_ContestLobby_EventScript_SubmitResponse + goto_if_eq VAR_RESULT, 0, LilycoveCity_ContestLobby_EventScript_DeclineInterview end LilycoveCity_ContestLobby_EventScript_DeclineInterview:: @@ -223,8 +200,7 @@ LilycoveCity_ContestLobby_EventScript_SubmitResponse:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_ContestLobby_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, 0, LilycoveCity_ContestLobby_EventScript_DeclineInterview msgbox LilycoveCity_ContestLobby_Text_ThatsAllForInterview, MSGBOX_DEFAULT setflag FLAG_TEMP_2 setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE @@ -237,12 +213,10 @@ LilycoveCity_ContestLobby_EventScript_AlreadyInterviewed:: end LilycoveCity_ContestLobby_EventScript_TryShowContestReporter:: - compare VAR_CONTEST_HALL_STATE, 2 - goto_if_ne LilycoveCity_ContestLobby_EventScript_DontShowContestReporter + goto_if_ne VAR_CONTEST_HALL_STATE, 2, LilycoveCity_ContestLobby_EventScript_DontShowContestReporter setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_ContestLobby_EventScript_DontShowContestReporter + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_ContestLobby_EventScript_DontShowContestReporter switch VAR_CONTEST_TYPE case 0, LilycoveCity_ContestLobby_EventScript_DontShowContestReporter case 2, LilycoveCity_ContestLobby_EventScript_ShowContestReporter @@ -265,14 +239,11 @@ BattleFrontier_BattleTowerLobby_EventScript_Reporter:: goto_if_set FLAG_TEMP_2, BattleFrontier_BattleTowerLobby_EventScript_AlreadyInterviewed setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AlreadyInterviewed + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_AlreadyInterviewed copyvar VAR_0x8009, VAR_0x8006 msgbox BattleFrontier_BattleTowerLobby_Text_InterviewRequest, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AcceptInterview - compare VAR_RESULT, NO - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_DeclineInterview + goto_if_eq VAR_RESULT, YES, BattleFrontier_BattleTowerLobby_EventScript_AcceptInterview + goto_if_eq VAR_RESULT, NO, BattleFrontier_BattleTowerLobby_EventScript_DeclineInterview end BattleFrontier_BattleTowerLobby_EventScript_AcceptInterview:: @@ -280,20 +251,16 @@ BattleFrontier_BattleTowerLobby_EventScript_AcceptInterview:: waitmessage multichoice 20, 8, MULTI_SATISFACTION, TRUE copyvar VAR_0x8008, VAR_RESULT - compare VAR_RESULT, 0 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_Satisfied - compare VAR_RESULT, 1 - call_if_eq BattleFrontier_BattleTowerLobby_EventScript_Dissatisfied + call_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_Satisfied + call_if_eq VAR_RESULT, 1, BattleFrontier_BattleTowerLobby_EventScript_Dissatisfied msgbox BattleFrontier_BattleTowerLobby_Text_DescribeYourBattle, MSGBOX_DEFAULT setvar VAR_0x8004, EASY_CHAT_TYPE_BATTLE_TOWER_INTERVIEW copyvar VAR_0x8005, VAR_0x8009 call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 1 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_SubmitResponse - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelInterview + goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleTowerLobby_EventScript_SubmitResponse + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelInterview end BattleFrontier_BattleTowerLobby_EventScript_DeclineInterview:: @@ -310,8 +277,7 @@ BattleFrontier_BattleTowerLobby_EventScript_Dissatisfied:: return BattleFrontier_BattleTowerLobby_EventScript_SubmitResponse:: - compare VAR_RESULT, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_CancelInterview + goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelInterview msgbox BattleFrontier_BattleTowerLobby_Text_ThatsGreatLine, MSGBOX_DEFAULT setflag FLAG_TEMP_2 copyvar VAR_0x8004, VAR_0x8008 @@ -330,12 +296,10 @@ BattleFrontier_BattleTowerLobby_EventScript_AlreadyInterviewed:: end BattleFrontier_BattleTowerLobby_EventScript_ShowOrHideReporter:: - compare VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0 - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_HideReporter + goto_if_eq VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0, BattleFrontier_BattleTowerLobby_EventScript_HideReporter setvar VAR_0x8005, TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_HideReporter + goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_HideReporter clearflag FLAG_HIDE_BATTLE_TOWER_REPORTER return @@ -347,8 +311,7 @@ BattleFrontier_BattleTowerLobby_EventScript_HideReporter:: EventScript_ContestLiveInterview:: setvar VAR_0x8005, TVSHOW_CONTEST_LIVE_UPDATES special InterviewBefore - compare VAR_RESULT, TRUE - goto_if_eq EventScript_ContestLiveInterviewEnd + goto_if_eq VAR_RESULT, TRUE, EventScript_ContestLiveInterviewEnd setvar VAR_0x8005, TVSHOW_CONTEST_LIVE_UPDATES special InterviewAfter return diff --git a/data/scripts/kecleon.inc b/data/scripts/kecleon.inc index 355e9ad4a7..f51dc2fbd2 100644 --- a/data/scripts/kecleon.inc +++ b/data/scripts/kecleon.inc @@ -49,16 +49,14 @@ Route119_EventScript_Kecleon2:: EventScript_Kecleon:: checkitem ITEM_DEVON_SCOPE - compare VAR_RESULT, TRUE - goto_if_eq EventScript_AskUseDevonScope + goto_if_eq VAR_RESULT, TRUE, EventScript_AskUseDevonScope msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_DEFAULT release end EventScript_AskUseDevonScope:: msgbox Kecleon_Text_WantToUseDevonScope, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_BattleKecleon + goto_if_eq VAR_RESULT, YES, EventScript_BattleKecleon release end @@ -78,12 +76,9 @@ EventScript_BattleKecleon:: dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE specialvar VAR_RESULT, GetBattleOutcome - compare VAR_RESULT, B_OUTCOME_WON - goto_if_eq EventScript_RemoveKecleon - compare VAR_RESULT, B_OUTCOME_RAN - goto_if_eq EventScript_RemoveKecleon - compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED - goto_if_eq EventScript_RemoveKecleon + goto_if_eq VAR_RESULT, B_OUTCOME_WON, EventScript_RemoveKecleon + goto_if_eq VAR_RESULT, B_OUTCOME_RAN, EventScript_RemoveKecleon + goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, EventScript_RemoveKecleon release end diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc index c6192b7723..5519de9791 100644 --- a/data/scripts/lilycove_lady.inc +++ b/data/scripts/lilycove_lady.inc @@ -14,12 +14,9 @@ LilycoveCity_PokemonCenter_1F_EventScript_FavorLady:: faceplayer msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheFavorLady, MSGBOX_DEFAULT specialvar VAR_RESULT, GetFavorLadyState - compare VAR_RESULT, LILYCOVE_LADY_STATE_READY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady - compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted - compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_READY, LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED, LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE, LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize end LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyCompleted:: @@ -31,20 +28,16 @@ LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyReady:: special BufferFavorLadyRequest msgbox LilycoveCity_PokemonCenter_1F_Text_ObsessedWithThing, MSGBOX_DEFAULT specialvar VAR_RESULT, HasAnotherPlayerGivenFavorLadyItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_RequestItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_RequestItem + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem end LilycoveCity_PokemonCenter_1F_EventScript_TellAboutPlayersItem:: special BufferFavorLadyItemName special BufferFavorLadyPlayerName specialvar VAR_RESULT, DidFavorLadyLikeItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing end LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveBadThing:: @@ -59,10 +52,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_PlayerGaveGreatThing:: LilycoveCity_PokemonCenter_1F_EventScript_RequestItem:: msgbox LilycoveCity_PokemonCenter_1F_Text_WillYouShareThing, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_AcceptFavor end LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor:: @@ -80,26 +71,20 @@ LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem:: setvar VAR_RESULT, 0 special Script_FavorLadyOpenBagMenu waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChooseFavorItem:: msgbox LilycoveCity_PokemonCenter_1F_Text_NotWillingToShare, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_DeclineFavor + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_ChooseFavorItem end LilycoveCity_PokemonCenter_1F_EventScript_GiveFavorItem:: specialvar VAR_RESULT, Script_DoesFavorLadyLikeItem - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem end LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem:: @@ -110,10 +95,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_DidntLikeFavorItem:: LilycoveCity_PokemonCenter_1F_EventScript_CheckLovedItem:: specialvar VAR_RESULT, IsFavorLadyThresholdMet - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_LovedFavorItem end LilycoveCity_PokemonCenter_1F_EventScript_LikedFavorItem:: @@ -133,10 +116,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_FavorLadyPrize:: specialvar VAR_0x8004, FavorLadyGetPrize msgbox LilycoveCity_PokemonCenter_1F_Text_IllGiveYouThisInReturn, MSGBOX_DEFAULT giveitem VAR_0x8004 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_ReceivedFavorPrize end LilycoveCity_PokemonCenter_1F_EventScript_NoRoomForFavorPrize:: @@ -154,30 +135,22 @@ LilycoveCity_PokemonCenter_1F_EventScript_QuizLady:: faceplayer msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheQuizLady, MSGBOX_DEFAULT specialvar VAR_RESULT, GetQuizLadyState - compare VAR_RESULT, LILYCOVE_LADY_STATE_READY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz - compare VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz - compare VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_READY, LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_COMPLETED, LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz + goto_if_eq VAR_RESULT, LILYCOVE_LADY_STATE_PRIZE, LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize end LilycoveCity_PokemonCenter_1F_EventScript_HasQuiz:: specialvar VAR_RESULT, GetQuizAuthor - compare VAR_RESULT, QUIZ_AUTHOR_PLAYER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz - compare VAR_RESULT, QUIZ_AUTHOR_OTHER_PLAYER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady - compare VAR_RESULT, QUIZ_AUTHOR_LADY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady + goto_if_eq VAR_RESULT, QUIZ_AUTHOR_PLAYER, LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz + goto_if_eq VAR_RESULT, QUIZ_AUTHOR_OTHER_PLAYER, LilycoveCity_PokemonCenter_1F_EventScript_PlayerQuizReady + goto_if_eq VAR_RESULT, QUIZ_AUTHOR_LADY, LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady end LilycoveCity_PokemonCenter_1F_EventScript_CheckMadeQuiz:: specialvar VAR_RESULT, IsQuizLadyWaitingForChallenger - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz end LilycoveCity_PokemonCenter_1F_EventScript_WaitingToTakeYourQuiz:: @@ -198,10 +171,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_LadyQuizReady:: LilycoveCity_PokemonCenter_1F_EventScript_AskTakeQuiz:: setvar VAR_0x8004, 0 msgbox LilycoveCity_PokemonCenter_1F_Text_TakeQuizChallenge, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz end LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz:: @@ -211,16 +182,12 @@ LilycoveCity_PokemonCenter_1F_EventScript_DeclineQuiz:: LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz:: special ClearQuizLadyPlayerAnswer - compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion - compare VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer + goto_if_eq VAR_0x8004, 0, LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion + goto_if_eq VAR_0x8004, EASY_CHAT_TYPE_QUIZ_ANSWER, LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer LilycoveCity_PokemonCenter_1F_EventScript_CheckQuizTakingState:: - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse end LilycoveCity_PokemonCenter_1F_EventScript_ShowQuestion:: @@ -237,10 +204,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_GetAnswer:: LilycoveCity_PokemonCenter_1F_EventScript_AskQuitQuiz:: msgbox LilycoveCity_PokemonCenter_1F_Text_YoureGoingToQuit, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_TakeQuiz end LilycoveCity_PokemonCenter_1F_EventScript_QuitTakingQuiz:: @@ -252,10 +217,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_SubmitQuizResponse:: special SetQuizLadyState_Complete msgbox LilycoveCity_PokemonCenter_1F_Text_WaitForAnswer, MSGBOX_DEFAULT specialvar VAR_RESULT, IsQuizAnswerCorrect - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse end LilycoveCity_PokemonCenter_1F_EventScript_CorrectResponse:: @@ -280,10 +243,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_IncorrectResponse:: @ VAR_RESULT is essentially ignored, both jumps are identical LilycoveCity_PokemonCenter_1F_EventScript_ReadyGivePrize:: specialvar VAR_RESULT, BufferQuizAuthorNameAndCheckIfLady - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1 - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0 + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1 + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_GivePrize0 end LilycoveCity_PokemonCenter_1F_EventScript_GivePrize1:: @@ -301,8 +262,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_GivePrize:: special BufferQuizPrizeItem special SetQuizLadyState_Complete giveitem VAR_0x8005 - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize goto LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz end @@ -314,10 +274,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_NoSpaceForQuizPrize:: LilycoveCity_PokemonCenter_1F_EventScript_AskMakeQuiz:: msgbox LilycoveCity_PokemonCenter_1F_Text_MakeYourOwnQuiz, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_MakeQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz end LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz:: @@ -333,18 +291,14 @@ LilycoveCity_PokemonCenter_1F_EventScript_PickPrize:: setvar VAR_RESULT, 0 special Script_QuizLadyOpenBagMenu waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitChoosingPrize:: msgbox LilycoveCity_PokemonCenter_1F_Text_QuitChoosingPrize, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_PickPrize + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_PickPrize end LilycoveCity_PokemonCenter_1F_EventScript_WriteQuiz:: @@ -356,17 +310,14 @@ LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion:: fadescreen FADE_TO_BLACK special QuizLadySetCustomQuestion waitstate - compare VAR_RESULT, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion + goto_if_eq VAR_RESULT, 0, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion goto LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitWritingQuizQuestion:: msgbox LilycoveCity_PokemonCenter_1F_Text_QuitWritingQuizQuestion, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_DeclineMakeQuiz + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_WriteQuizQuestion end LilycoveCity_PokemonCenter_1F_EventScript_FinishMakingQuiz:: @@ -382,19 +333,15 @@ LilycoveCity_PokemonCenter_1F_EventScript_ContestLady:: faceplayer msgbox LilycoveCity_PokemonCenter_1F_Text_ImTheContestLady, MSGBOX_DEFAULT specialvar VAR_RESULT, HasPlayerGivenContestLadyPokeblock - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock end @ Redundant with above script, VAR_RESULT will always be FALSE here LilycoveCity_PokemonCenter_1F_EventScript_NotGivenPokeblock:: specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock - compare VAR_RESULT, TRUE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock + goto_if_eq VAR_RESULT, TRUE, LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock end LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock:: @@ -406,13 +353,10 @@ LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock:: special Script_BufferContestLadyCategoryAndMonName msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT checkitem ITEM_POKEBLOCK_CASE - compare VAR_RESULT, FALSE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase + goto_if_eq VAR_RESULT, FALSE, LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock end LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock:: @@ -424,18 +368,14 @@ LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock:: fadescreen FADE_TO_BLACK special OpenPokeblockCaseForContestLady waitstate - compare VAR_RESULT, 0xFFFF - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock - compare VAR_RESULT, 0xFFFF - goto_if_ne LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock + goto_if_eq VAR_RESULT, 0xFFFF, LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock + goto_if_ne VAR_RESULT, 0xFFFF, LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock end LilycoveCity_PokemonCenter_1F_EventScript_AskQuitGivingPokeblock:: msgbox LilycoveCity_PokemonCenter_1F_Text_ICantHaveOnePokeblock, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock - compare VAR_RESULT, NO - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock + goto_if_eq VAR_RESULT, YES, LilycoveCity_PokemonCenter_1F_EventScript_DeclineGivePokeblock + goto_if_eq VAR_RESULT, NO, LilycoveCity_PokemonCenter_1F_EventScript_ChoosePokeblock end LilycoveCity_PokemonCenter_1F_EventScript_GivePokeblock:: @@ -457,8 +397,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_FeedPokeblock:: playmoncry VAR_0x8005, CRY_MODE_NORMAL delay 120 waitmoncry - compare VAR_0x8004, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock + goto_if_eq VAR_0x8004, 1, LilycoveCity_PokemonCenter_1F_EventScript_MonEnjoyPokeblock goto LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock end @@ -471,10 +410,8 @@ LilycoveCity_PokemonCenter_1F_EventScript_FinishFeedPokeblock:: applymovement LOCALID_LILYCOVE_LADY, LilycoveCity_PokemonCenter_1F_Movement_LadyFacePlayer waitmovement 0 delay 60 - compare VAR_0x8004, 0 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock - compare VAR_0x8004, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock + goto_if_eq VAR_0x8004, 0, LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock + goto_if_eq VAR_0x8004, 1, LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock end LilycoveCity_PokemonCenter_1F_EventScript_MonDislikedPokeblock:: @@ -490,8 +427,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_MonLikedPokeblock:: LilycoveCity_PokemonCenter_1F_EventScript_CheckAirContestLadyShow:: specialvar VAR_RESULT, ShouldContestLadyShowGoOnAir - compare VAR_RESULT, 1 - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow + goto_if_eq VAR_RESULT, 1, LilycoveCity_PokemonCenter_1F_EventScript_AirContestLadyShow release end @@ -536,16 +472,11 @@ LilycoveCity_PokemonCenter_1F_EventScript_ContestLadyMon:: specialvar VAR_RESULT, GetContestLadyCategory special Script_BufferContestLadyCategoryAndMonName special GetContestLadyMonSpecies - compare VAR_RESULT, CONTEST_CATEGORY_COOL - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon - compare VAR_RESULT, CONTEST_CATEGORY_BEAUTY - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Skitty - compare VAR_RESULT, CONTEST_CATEGORY_CUTE - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Poochyena - compare VAR_RESULT, CONTEST_CATEGORY_SMART - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Kecleon - compare VAR_RESULT, CONTEST_CATEGORY_TOUGH - goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_Pikachu + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_COOL, LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_BEAUTY, LilycoveCity_PokemonCenter_1F_EventScript_Skitty + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_CUTE, LilycoveCity_PokemonCenter_1F_EventScript_Poochyena + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_SMART, LilycoveCity_PokemonCenter_1F_EventScript_Kecleon + goto_if_eq VAR_RESULT, CONTEST_CATEGORY_TOUGH, LilycoveCity_PokemonCenter_1F_EventScript_Pikachu end LilycoveCity_PokemonCenter_1F_EventScript_Zigzagoon:: diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index b34f84e8e2..e1fa3d1799 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -13,10 +13,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_Bard:: lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToHearMySong, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PlaySong - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong + goto_if_eq VAR_RESULT, YES, MauvilleCity_PokemonCenter_1F_EventScript_PlaySong + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong end MauvilleCity_PokemonCenter_1F_EventScript_PlaySong:: @@ -24,8 +22,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_PlaySong:: special PlayBardSong delay 60 special HasBardSongBeenChanged - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_WishICouldPlaySongForOthers, MSGBOX_DEFAULT release end @@ -37,10 +34,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_DeclineSong:: MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics:: msgbox MauvilleCity_PokemonCenter_1F_Text_WouldYouLikeToWriteSomeLyrics, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics + goto_if_eq VAR_RESULT, YES, MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics end MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics:: @@ -48,15 +43,13 @@ MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics + goto_if_eq VAR_RESULT, 0, MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_LetMeSingItForYou, MSGBOX_DEFAULT setvar VAR_0x8004, 1 special PlayBardSong delay 60 msgbox MauvilleCity_PokemonCenter_1F_Text_ThatHowYouWantedSongToGo, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics special SaveBardSongLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_IllSingThisSongForAWhile, MSGBOX_DEFAULT release @@ -74,16 +67,14 @@ MauvilleCity_PokemonCenter_1F_EventScript_Hipster:: setflag FLAG_SYS_HIPSTER_MEET msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT special GetHipsterSpokenFlag - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT release end MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord:: special HipsterTryTeachWord - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TeachWord + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_TeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach, MSGBOX_DEFAULT release end @@ -158,11 +149,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_Trader:: lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_WantToTradeDecor, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade special GetTraderTradedFlag - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded message MauvilleCity_PokemonCenter_1F_Text_PickADecorItem waitmessage goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive @@ -181,16 +170,12 @@ MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded:: MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive:: special TraderMenuGetDecoration waitstate - compare VAR_0x8004, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelPickDecor - compare VAR_0x8004, 0xFFFF - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_InvalidDecor + goto_if_eq VAR_0x8004, 0, MauvilleCity_PokemonCenter_1F_EventScript_CancelPickDecor + goto_if_eq VAR_0x8004, 0xFFFF, MauvilleCity_PokemonCenter_1F_EventScript_InvalidDecor msgbox MauvilleCity_PokemonCenter_1F_Text_OnceBelongedToPlayerDoYouWantIt, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor special DoesPlayerHaveNoDecorations - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive end @@ -220,16 +205,12 @@ MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive:: msgbox MauvilleCity_PokemonCenter_1F_Text_PickTheDecorToTrade, MSGBOX_DEFAULT special TraderShowDecorationMenu waitstate - compare VAR_0x8006, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelGiveDecor - compare VAR_0x8006, 0xFFFF - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DecorInUse + goto_if_eq VAR_0x8006, 0, MauvilleCity_PokemonCenter_1F_EventScript_CancelGiveDecor + goto_if_eq VAR_0x8006, 0xFFFF, MauvilleCity_PokemonCenter_1F_EventScript_DecorInUse special IsDecorationCategoryFull - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor msgbox MauvilleCity_PokemonCenter_1F_Text_SoWellTradeTheseDecor, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive special TraderDoDecorationTrade msgbox MauvilleCity_PokemonCenter_1F_Text_SendDecorToYourPC, MSGBOX_DEFAULT release @@ -816,24 +797,20 @@ MauvilleCity_PokemonCenter_1F_EventScript_Storyteller:: setvar VAR_0x800A, 0 setvar VAR_0x800B, 0 msgbox MauvilleCity_PokemonCenter_1F_Text_WillYouHearMyTale, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller specialvar VAR_RESULT, StorytellerGetFreeStorySlot - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales + goto_if_eq VAR_RESULT, 0, MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales message MauvilleCity_PokemonCenter_1F_Text_WhichTaleToTell waitmessage special StorytellerStoryListMenu waitstate - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection + goto_if_eq VAR_RESULT, 0, MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection setvar VAR_0x8008, 1 special Script_StorytellerDisplayStory waitmessage waitbuttonpress specialvar VAR_RESULT, StorytellerUpdateStat - compare VAR_RESULT, 0 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales + goto_if_eq VAR_RESULT, 0, MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales goto MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection:: @@ -843,19 +820,16 @@ MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection:: MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_CouldThereBeOtherLegends, MSGBOX_DEFAULT specialvar VAR_RESULT, HasStorytellerAlreadyRecorded - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_StorytellerEnd + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_StorytellerEnd goto MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_IKnowNoTales, MSGBOX_DEFAULT MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouAnyLegendaryTales, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller specialvar VAR_RESULT, Script_StorytellerInitializeRandomStat - compare VAR_RESULT, 1 - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale + goto_if_eq VAR_RESULT, 1, MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale msgbox MauvilleCity_PokemonCenter_1F_Text_NotWorthyOfLegend, MSGBOX_DEFAULT release end @@ -902,26 +876,20 @@ MauvilleCity_PokemonCenter_1F_EventScript_Giddy:: lock faceplayer msgbox MauvilleCity_PokemonCenter_1F_Text_HearMyStory, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy + goto_if_eq VAR_RESULT, YES, MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy end MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale:: special GiddyShouldTellAnotherTale - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales end MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale:: special GiddyShouldTellAnotherTale - compare VAR_RESULT, TRUE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales + goto_if_eq VAR_RESULT, TRUE, MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_PokemonCenter_1F_EventScript_ToldEnoughTales end MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale:: @@ -936,10 +904,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale:: special ShowFieldMessageStringVar4 waitmessage yesnobox 20, 8 - compare VAR_RESULT, YES - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale - compare VAR_RESULT, NO - goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale + goto_if_eq VAR_RESULT, YES, MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale + goto_if_eq VAR_RESULT, NO, MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale end MauvilleCity_PokemonCenter_1F_EventScript_DeclineGiddy:: diff --git a/data/scripts/move_tutors.inc b/data/scripts/move_tutors.inc index cc952749d4..4155969a02 100644 --- a/data/scripts/move_tutors.inc +++ b/data/scripts/move_tutors.inc @@ -3,16 +3,13 @@ SlateportCity_PokemonFanClub_EventScript_SwaggerTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SWAGGER, MoveTutor_EventScript_SwaggerTaught msgbox MoveTutor_Text_SwaggerTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SwaggerDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SwaggerDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SwaggerDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SwaggerDeclined msgbox MoveTutor_Text_SwaggerWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SWAGGER call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_SwaggerDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_SwaggerDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_SWAGGER goto MoveTutor_EventScript_SwaggerTaught end @@ -32,16 +29,13 @@ MauvilleCity_EventScript_RolloutTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_ROLLOUT, MoveTutor_EventScript_RolloutTaught msgbox MoveTutor_Text_RolloutTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_RolloutDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_RolloutDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_RolloutDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_RolloutDeclined msgbox MoveTutor_Text_RolloutWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_ROLLOUT call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_RolloutDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_RolloutDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_ROLLOUT goto MoveTutor_EventScript_RolloutTaught end @@ -61,16 +55,13 @@ VerdanturfTown_PokemonCenter_1F_EventScript_FuryCutterTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_FURY_CUTTER, MoveTutor_EventScript_FuryCutterTaught msgbox MoveTutor_Text_FuryCutterTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_FuryCutterDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_FuryCutterDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_FuryCutterDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_FuryCutterDeclined msgbox MoveTutor_Text_FuryCutterWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_FURY_CUTTER call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_FuryCutterDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_FuryCutterDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_FURY_CUTTER goto MoveTutor_EventScript_FuryCutterTaught end @@ -90,16 +81,13 @@ LavaridgeTown_House_EventScript_MimicTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_MIMIC, MoveTutor_EventScript_MimicTaught msgbox MoveTutor_MimicTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_MimicDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_MimicDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_MimicDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_MimicDeclined msgbox MoveTutor_Text_MimicWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_MIMIC call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_MimicDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_MimicDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_MIMIC goto MoveTutor_EventScript_MimicTaught end @@ -119,16 +107,13 @@ FallarborTown_Mart_EventScript_MetronomeTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_METRONOME, MoveTutor_EventScript_MetronomeTaught msgbox MoveTutor_Text_MetronomeTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_MetronomeDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_MetronomeDeclined msgbox MoveTutor_Text_MetronomeWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_METRONOME call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_MetronomeDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_MetronomeDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_METRONOME goto MoveTutor_EventScript_MetronomeTaught end @@ -148,16 +133,13 @@ FortreeCity_House2_EventScript_SleepTalkTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SLEEP_TALK, MoveTutor_EventScript_SleepTalkTaught msgbox MoveTutor_Text_SleepTalkTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SleepTalkDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SleepTalkDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SleepTalkDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SleepTalkDeclined msgbox MoveTutor_Text_SleepTalkWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SLEEP_TALK call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_SleepTalkDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_SleepTalkDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_SLEEP_TALK goto MoveTutor_EventScript_SleepTalkTaught end @@ -177,16 +159,13 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_SubstituteTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_SUBSTITUTE, MoveTutor_EventScript_SubstituteTaught msgbox MoveTutor_Text_SubstituteTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SubstituteDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_SubstituteDeclined msgbox MoveTutor_Text_SubstituteWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_SUBSTITUTE call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_SubstituteDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_SubstituteDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_SUBSTITUTE goto MoveTutor_EventScript_SubstituteTaught end @@ -206,16 +185,13 @@ MossdeepCity_EventScript_DynamicPunchTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_DYNAMICPUNCH, MoveTutor_EventScript_DynamicPunchTaught msgbox MoveTutor_Text_DynamicPunchTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_DynamicPunchDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_DynamicPunchDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_DynamicPunchDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_DynamicPunchDeclined msgbox MoveTutor_Text_DynamicPunchWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_DYNAMIC_PUNCH call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_DynamicPunchDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_DynamicPunchDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_DYNAMICPUNCH goto MoveTutor_EventScript_DynamicPunchTaught end @@ -235,16 +211,13 @@ SootopolisCity_PokemonCenter_1F_EventScript_DoubleEdgeTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_DOUBLE_EDGE, MoveTutor_EventScript_DoubleEdgeTaught msgbox MoveTutor_Text_DoubleEdgeTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_DoubleEdgeDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_DoubleEdgeDeclined msgbox MoveTutor_Text_DoubleEdgeWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_DOUBLE_EDGE call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_DoubleEdgeDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_DoubleEdgeDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_DOUBLE_EDGE goto MoveTutor_EventScript_DoubleEdgeTaught end @@ -264,16 +237,13 @@ PacifidlogTown_PokemonCenter_1F_EventScript_ExplosionTutor:: faceplayer goto_if_set FLAG_MOVE_TUTOR_TAUGHT_EXPLOSION, MoveTutor_EventScript_ExplosionTaught msgbox MoveTutor_Text_ExplosionTeach, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_ExplosionDeclined call MoveTutor_EventScript_CanOnlyBeLearnedOnce - compare VAR_RESULT, NO - goto_if_eq MoveTutor_EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, NO, MoveTutor_EventScript_ExplosionDeclined msgbox MoveTutor_Text_ExplosionWhichMon, MSGBOX_DEFAULT setvar VAR_0x8005, TUTOR_MOVE_EXPLOSION call MoveTutor_EventScript_OpenPartyMenu - compare VAR_RESULT, 0 - goto_if_eq MoveTutor_EventScript_ExplosionDeclined + goto_if_eq VAR_RESULT, 0, MoveTutor_EventScript_ExplosionDeclined setflag FLAG_MOVE_TUTOR_TAUGHT_EXPLOSION goto MoveTutor_EventScript_ExplosionTaught end diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index 8fa6a68a7e..e982858e7b 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -11,10 +11,8 @@ EventScript_ObtainItemMessage:: bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT checkitemtype ITEMID call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, TRUE - call_if_eq EventScript_ObtainedItem - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomForItem + call_if_eq VAR_0x8007, TRUE, EventScript_ObtainedItem + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForItem return EventScript_BufferPocketNameAndTryFanfare:: @@ -28,32 +26,27 @@ EventScript_BufferPocketNameAndTryFanfare:: EventScript_BufferItemsPocket:: bufferstdstring STR_VAR_3, STDSTRING_ITEMS - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferKeyItemsPocket:: bufferstdstring STR_VAR_3, STDSTRING_KEYITEMS - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferPokeballsPocket:: bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_BufferTMHMsPocket:: bufferstdstring STR_VAR_3, STDSTRING_TMHMS - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedTMHM + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedTMHM return EventScript_BufferBerriesPocket:: bufferstdstring STR_VAR_3, STDSTRING_BERRIES - compare VAR_0x8007, TRUE - call_if_eq EventScript_PlayFanfareObtainedItem + call_if_eq VAR_0x8007, TRUE, EventScript_PlayFanfareObtainedItem return EventScript_ObtainedItem:: @@ -83,10 +76,8 @@ Std_ObtainDecoration:: EventScript_ObtainDecorationMessage:: bufferdecorationname STR_VAR_2, ITEMID - compare VAR_0x8007, TRUE - call_if_eq EventScript_ObtainedDecor - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomForDecor + call_if_eq VAR_0x8007, TRUE, EventScript_ObtainedDecor + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForDecor return EventScript_ObtainedDecor:: @@ -112,10 +103,8 @@ Std_FindItem:: bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT checkitemtype ITEMID call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, TRUE - call_if_eq EventScript_PickUpItem - compare VAR_0x8007, FALSE - call_if_eq EventScript_NoRoomToPickUpItem + call_if_eq VAR_0x8007, TRUE, EventScript_PickUpItem + call_if_eq VAR_0x8007, FALSE, EventScript_NoRoomToPickUpItem release return @@ -124,16 +113,13 @@ EventScript_PickUpItem:: additem VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, TRUE - call_if_eq EventScript_FoundTMHM - compare VAR_0x8008, FALSE - call_if_eq EventScript_FoundItem + call_if_eq VAR_0x8008, TRUE, EventScript_FoundTMHM + call_if_eq VAR_0x8008, FALSE, EventScript_FoundItem waitfanfare waitmessage bufferitemnameplural STR_VAR_2, VAR_0x8004, VAR_0x8005 pyramid_inchallenge - compare VAR_RESULT, TRUE - goto_if_eq EventScript_PutBattlePyramidItemInBag + goto_if_eq VAR_RESULT, TRUE, EventScript_PutBattlePyramidItemInBag msgbox gText_PutItemInPocket, MSGBOX_DEFAULT return @@ -164,20 +150,16 @@ EventScript_HiddenItemScript:: bufferitemnameplural STR_VAR_2, VAR_0x8005, 1 checkitemtype VAR_0x8005 call EventScript_BufferPocketNameAndTryFanfare - compare VAR_0x8007, TRUE - goto_if_eq EventScript_PickUpHiddenItem - compare VAR_0x8007, FALSE - goto_if_eq EventScript_NoRoomForHiddenItem + goto_if_eq VAR_0x8007, TRUE, EventScript_PickUpHiddenItem + goto_if_eq VAR_0x8007, FALSE, EventScript_NoRoomForHiddenItem end EventScript_PickUpHiddenItem:: copyvar VAR_0x8008, VAR_0x8004 copyvar VAR_0x8004, VAR_0x8005 specialvar VAR_RESULT, BufferTMHMMoveName - compare VAR_RESULT, TRUE - goto_if_eq EventScript_FoundHiddenTMHM - compare VAR_RESULT, FALSE - goto_if_eq EventScript_FoundHiddenItem + goto_if_eq VAR_RESULT, TRUE, EventScript_FoundHiddenTMHM + goto_if_eq VAR_RESULT, FALSE, EventScript_FoundHiddenItem end EventScript_FoundHiddenTMHM:: diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc index da92ef1d52..1204bece36 100644 --- a/data/scripts/pc_transfer.inc +++ b/data/scripts/pc_transfer.inc @@ -22,8 +22,7 @@ Common_EventScript_TransferredToPC:: EventScript_TransferredSomeonesPC:: specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, TRUE - goto_if_eq EventScript_SomeonesPCBoxFull + goto_if_eq VAR_RESULT, TRUE, EventScript_SomeonesPCBoxFull msgbox gText_PkmnTransferredSomeonesPC, MSGBOX_DEFAULT return @@ -35,8 +34,7 @@ EventScript_SomeonesPCBoxFull:: EventScript_TransferredLanettesPC:: specialvar VAR_RESULT, ShouldShowBoxWasFullMessage - compare VAR_RESULT, TRUE - goto_if_eq EventScript_LanettesPCBoxFull + goto_if_eq VAR_RESULT, TRUE, EventScript_LanettesPCBoxFull msgbox gText_PkmnTransferredLanettesPC, MSGBOX_DEFAULT return diff --git a/data/scripts/pkmn_center_nurse.inc b/data/scripts/pkmn_center_nurse.inc index 310f4d304c..64ccdfa77e 100644 --- a/data/scripts/pkmn_center_nurse.inc +++ b/data/scripts/pkmn_center_nurse.inc @@ -3,13 +3,10 @@ Common_EventScript_PkmnCenterNurse:: faceplayer setvar VAR_0x8004, 0 specialvar VAR_RESULT, CountPlayerTrainerStars - compare VAR_RESULT, 4 - goto_if_eq EventScript_PkmnCenterNurse_GoldCard + goto_if_eq VAR_RESULT, 4, EventScript_PkmnCenterNurse_GoldCard msgbox gText_WouldYouLikeToRestYourPkmn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_HealPkmn - compare VAR_RESULT, NO - goto_if_eq EventScript_PkmnCenterNurse_Goodbye + goto_if_eq VAR_RESULT, YES, EventScript_PkmnCenterNurse_HealPkmn + goto_if_eq VAR_RESULT, NO, EventScript_PkmnCenterNurse_Goodbye end EventScript_PkmnCenterNurse_Goodbye:: @@ -19,10 +16,8 @@ EventScript_PkmnCenterNurse_Goodbye:: @ VAR_0x8004 is 1 when player has Gold Card; jumps are identical EventScript_PkmnCenterNurse_HealPkmn:: incrementgamestat GAME_STAT_USED_POKECENTER - compare VAR_0x8004, 0 - call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn - compare VAR_0x8004, 1 - call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn2 + call_if_eq VAR_0x8004, 0, EventScript_PkmnCenterNurse_IllTakeYourPkmn + call_if_eq VAR_0x8004, 1, EventScript_PkmnCenterNurse_IllTakeYourPkmn2 waitmessage call EventScript_PkmnCenterNurse_TakeAndHealPkmn goto_if_unset FLAG_POKERUS_EXPLAINED, EventScript_PkmnCenterNurse_CheckPokerus @@ -49,20 +44,16 @@ EventScript_PkmnCenterNurse_TakeAndHealPkmn:: EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom:: specialvar VAR_RESULT, PlayerNotAtTrainerHillEntrance - compare VAR_RESULT, 0 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn + goto_if_eq VAR_RESULT, 0, EventScript_PkmnCenterNurse_ReturnPkmn specialvar VAR_RESULT, BufferUnionRoomPlayerName copyvar VAR_0x8008, VAR_RESULT - compare VAR_0x8008, 0 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn - compare VAR_0x8008, 1 - goto_if_eq EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom + goto_if_eq VAR_0x8008, 0, EventScript_PkmnCenterNurse_ReturnPkmn + goto_if_eq VAR_0x8008, 1, EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom end @ VAR_0x8004 is 1 when player has Gold Card EventScript_PkmnCenterNurse_ReturnPkmn:: - compare VAR_0x8004, 1 - goto_if_eq EventScript_PkmnCenterNurse_ReturnPkmn2 + goto_if_eq VAR_0x8004, 1, EventScript_PkmnCenterNurse_ReturnPkmn2 message gText_RestoredPkmnToFullHealth waitmessage applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow @@ -91,10 +82,8 @@ EventScript_PkmnCenterNurse_PlayerWaitingInUnionRoom:: EventScript_PkmnCenterNurse_CheckPokerus:: specialvar VAR_RESULT, IsPokerusInParty - compare VAR_RESULT, TRUE - goto_if_eq EventScript_PkmnCenterNurse_ExplainPokerus - compare VAR_RESULT, FALSE - goto_if_eq EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom + goto_if_eq VAR_RESULT, TRUE, EventScript_PkmnCenterNurse_ExplainPokerus + goto_if_eq VAR_RESULT, FALSE, EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom end EventScript_PkmnCenterNurse_ExplainPokerus:: @@ -112,15 +101,13 @@ EventScript_PkmnCenterNurse_GoldCard:: applymovement VAR_0x800B, Common_Movement_Delay48 waitmovement 0 msgbox gText_NoticesGoldCard, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn + goto_if_eq VAR_RESULT, YES, EventScript_PkmnCenterNurse_GoldCardHealPkmn message gText_WeHopeToSeeYouAgain2 return EventScript_PkmnCenterNurse_AskForUsual:: msgbox gText_YouWantTheUsual, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_PkmnCenterNurse_GoldCardHealPkmn + goto_if_eq VAR_RESULT, YES, EventScript_PkmnCenterNurse_GoldCardHealPkmn message gText_WeHopeToSeeYouAgain2 return diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index e2e985a7a1..caa4e69551 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -11,10 +11,8 @@ PlayersHouse_1F_EventScript_EnterHouseMovingIn:: msgbox PlayersHouse_1F_Text_IsntItNiceInHere, MSGBOX_DEFAULT applymovement VAR_0x8004, Common_Movement_FacePlayer waitmovement 0 - compare VAR_0x8005, MALE - call_if_eq PlayersHouse_1F_EventScript_MomFacePlayerMovingInMale - compare VAR_0x8005, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomFacePlayerMovingInFemale + call_if_eq VAR_0x8005, MALE, PlayersHouse_1F_EventScript_MomFacePlayerMovingInMale + call_if_eq VAR_0x8005, FEMALE, PlayersHouse_1F_EventScript_MomFacePlayerMovingInFemale msgbox PlayersHouse_1F_Text_MoversPokemonGoSetClock, MSGBOX_DEFAULT closemessage setvar VAR_LITTLEROOT_INTRO_STATE, 4 @@ -69,10 +67,8 @@ PlayersHouse_2F_EventScript_WallClock:: setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_1 setflag FLAG_HIDE_LITTLEROOT_TOWN_PLAYERS_HOUSE_VIGOROTH_2 checkplayergender - compare VAR_RESULT, MALE - call_if_eq PlayersHouse_2F_EventScript_MomComesUpstairsMale - compare VAR_RESULT, FEMALE - call_if_eq PlayersHouse_2F_EventScript_MomComesUpstairsFemale + call_if_eq VAR_RESULT, MALE, PlayersHouse_2F_EventScript_MomComesUpstairsMale + call_if_eq VAR_RESULT, FEMALE, PlayersHouse_2F_EventScript_MomComesUpstairsFemale playse SE_EXIT removeobject VAR_0x8008 releaseall @@ -310,16 +306,12 @@ PlayersHouse_1F_Movement_MomReturnToSeatFemale: PlayersHouse_1F_EventScript_Mom:: lock faceplayer - compare VAR_LITTLEROOT_HOUSES_STATE_MAY, 4 - goto_if_eq PlayersHouse_1F_EventScript_DontPushYourselfTooHard - compare VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 4 - goto_if_eq PlayersHouse_1F_EventScript_DontPushYourselfTooHard + goto_if_eq VAR_LITTLEROOT_HOUSES_STATE_MAY, 4, PlayersHouse_1F_EventScript_DontPushYourselfTooHard + goto_if_eq VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 4, PlayersHouse_1F_EventScript_DontPushYourselfTooHard goto_if_set FLAG_HAS_MATCH_CALL, PlayersHouse_1F_EventScript_TryRegisterMom goto_if_set FLAG_RESCUED_BIRCH, PlayersHouse_1F_EventScript_MomHealsParty - compare VAR_TEMP_1, 1 - goto_if_eq PlayersHouse_1F_EventScript_SeeYouHoney - compare VAR_LITTLEROOT_INTRO_STATE, 7 - goto_if_eq PlayersHouse_1F_EventScript_DidYouMeetProfBirch + goto_if_eq VAR_TEMP_1, 1, PlayersHouse_1F_EventScript_SeeYouHoney + goto_if_eq VAR_LITTLEROOT_INTRO_STATE, 7, PlayersHouse_1F_EventScript_DidYouMeetProfBirch msgbox PlayersHouse_1F_Text_IsntItNiceInHere, MSGBOX_DEFAULT release end @@ -351,8 +343,7 @@ PlayersHouse_1F_EventScript_TryGiveAmuletCoin:: goto_if_set FLAG_RECEIVED_AMULET_COIN, PlayersHouse_1F_EventScript_MomHealsParty msgbox PlayersHouse_1F_Text_GotDadsBadgeHeresSomethingFromMom, MSGBOX_DEFAULT giveitem ITEM_AMULET_COIN - compare VAR_RESULT, FALSE - goto_if_eq Common_EventScript_ShowBagIsFull + goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull msgbox PlayersHouse_1F_Text_DontPushYourselfTooHard, MSGBOX_DEFAULT setflag FLAG_RECEIVED_AMULET_COIN release @@ -432,14 +423,10 @@ PlayersHouse_1F_Movement_MovePlayerAwayFromDoor: PlayersHouse_1F_EventScript_GetSSTicketAndSeeLatiTV:: lockall checkplayergender - compare VAR_RESULT, MALE - call_if_eq PlayersHouse_1F_EventScript_SetUpObjectEventVarsMale - compare VAR_RESULT, FEMALE - call_if_eq PlayersHouse_1F_EventScript_SetUpObjectEventVarsFemale - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_PlayerEnterRoomMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_PlayerEnterRoomFemale + call_if_eq VAR_RESULT, MALE, PlayersHouse_1F_EventScript_SetUpObjectEventVarsMale + call_if_eq VAR_RESULT, FEMALE, PlayersHouse_1F_EventScript_SetUpObjectEventVarsFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_PlayerEnterRoomMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_PlayerEnterRoomFemale applymovement VAR_0x8009, Common_Movement_FacePlayer waitmovement 0 playse SE_PIN @@ -448,58 +435,44 @@ PlayersHouse_1F_EventScript_GetSSTicketAndSeeLatiTV:: applymovement VAR_0x8009, Common_Movement_Delay48 waitmovement 0 delay 20 - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_DadApproachPlayerMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_DadApproachPlayerFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_DadApproachPlayerMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_DadApproachPlayerFemale msgbox PlayersHouse_1F_Text_TicketFromBrineyCameForYou, MSGBOX_DEFAULT giveitem ITEM_SS_TICKET msgbox PlayersHouse_1F_Text_PortsInSlateportLilycove, MSGBOX_DEFAULT closemessage delay 20 - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachDadMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachDadFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_MomApproachDadMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_MomApproachDadFemale msgbox PlayersHouse_1F_Text_BetterGetBackToGym, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_DadExitsMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_DadExitsFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_DadExitsMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_DadExitsFemale playse SE_DOOR removeobject VAR_0x8009 setflag FLAG_RECEIVED_SS_TICKET delay 30 - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_MomApproachPlayerMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_MomApproachPlayerFemale delay 20 msgbox PlayersHouse_1F_Text_DadShouldStayLonger, MSGBOX_DEFAULT closemessage setflag FLAG_SYS_TV_LATIAS_LATIOS special TurnOnTVScreen delay 60 - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_MomNoticesLatiBroadcastFemale msgbox PlayersHouse_1F_Text_IsThatABreakingStory, MSGBOX_DEFAULT closemessage - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_PlayerApproachTVForLatiMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_PlayerApproachTVForLatiMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_PlayerApproachTVForLatiFemale msgbox PlayersHouse_1F_Text_LatiEmergencyNewsFlash, MSGBOX_DEFAULT closemessage clearflag FLAG_SYS_TV_LATIAS_LATIOS setflag FLAG_LATIOS_OR_LATIAS_ROAMING special TurnOffTVScreen - compare VAR_0x8008, MALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVMale - compare VAR_0x8008, FEMALE - call_if_eq PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale + call_if_eq VAR_0x8008, MALE, PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVMale + call_if_eq VAR_0x8008, FEMALE, PlayersHouse_1F_EventScript_MomApproachPlayerAfterTVFemale msgbox PlayersHouse_1F_Text_WhatColorDidTheySay, MSGBOX_DEFAULT multichoice 22, 8, MULTI_TV_LATI, TRUE copyvar VAR_0x8004, VAR_RESULT diff --git a/data/scripts/prof_birch.inc b/data/scripts/prof_birch.inc index 97a967138f..38a5dfec32 100644 --- a/data/scripts/prof_birch.inc +++ b/data/scripts/prof_birch.inc @@ -1,23 +1,14 @@ ProfBirch_EventScript_UpdateLocation:: - compare VAR_PETALBURG_GYM_STATE, 0 - goto_if_eq Common_EventScript_NopReturn + goto_if_eq VAR_PETALBURG_GYM_STATE, 0, Common_EventScript_NopReturn goto_if_set FLAG_SYS_GAME_CLEAR, ProfBirch_EventScript_MoveToLab - compare VAR_BIRCH_STATE, 0 - call_if_eq ProfBirch_EventScript_MoveToLab - compare VAR_BIRCH_STATE, 1 - call_if_eq ProfBirch_EventScript_MoveToLab - compare VAR_BIRCH_STATE, 2 - call_if_eq ProfBirch_EventScript_MoveToRoute101 - compare VAR_BIRCH_STATE, 3 - call_if_eq ProfBirch_EventScript_MoveToRoute101 - compare VAR_BIRCH_STATE, 4 - call_if_eq ProfBirch_EventScript_MoveToRoute103 - compare VAR_BIRCH_STATE, 5 - call_if_eq ProfBirch_EventScript_MoveToRoute103 - compare VAR_BIRCH_STATE, 6 - call_if_eq ProfBirch_EventScript_MoveToLab - compare VAR_BIRCH_STATE, 7 - call_if_eq ProfBirch_EventScript_MoveToLab + call_if_eq VAR_BIRCH_STATE, 0, ProfBirch_EventScript_MoveToLab + call_if_eq VAR_BIRCH_STATE, 1, ProfBirch_EventScript_MoveToLab + call_if_eq VAR_BIRCH_STATE, 2, ProfBirch_EventScript_MoveToRoute101 + call_if_eq VAR_BIRCH_STATE, 3, ProfBirch_EventScript_MoveToRoute101 + call_if_eq VAR_BIRCH_STATE, 4, ProfBirch_EventScript_MoveToRoute103 + call_if_eq VAR_BIRCH_STATE, 5, ProfBirch_EventScript_MoveToRoute103 + call_if_eq VAR_BIRCH_STATE, 6, ProfBirch_EventScript_MoveToLab + call_if_eq VAR_BIRCH_STATE, 7, ProfBirch_EventScript_MoveToLab return ProfBirch_EventScript_MoveToLab:: @@ -49,8 +40,7 @@ ProfBirch_EventScript_RatePokedexOrRegister:: ProfBirch_EventScript_AskRatePokedex:: msgbox gBirchDexRatingText_AreYouCurious, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq ProfBirch_EventScript_DeclineRating + goto_if_eq VAR_RESULT, NO, ProfBirch_EventScript_DeclineRating call ProfBirch_EventScript_RatePokedex release end @@ -77,8 +67,7 @@ ProfBirch_EventScript_RatePokedex:: buffernumberstring STR_VAR_2, VAR_0x8009 @ Num Hoenn caught msgbox gBirchDexRatingText_SoYouveSeenAndCaught, MSGBOX_DEFAULT call ProfBirch_EventScript_ShowRatingMessage - compare VAR_0x800A, 0 - goto_if_eq Common_EventScript_NopReturn @ National dex not enabled + goto_if_eq VAR_0x800A, 0, Common_EventScript_NopReturn @ National dex not enabled setvar VAR_0x8004, 1 specialvar VAR_RESULT, ScriptGetPokedexInfo copyvar VAR_0x8008, VAR_0x8005 diff --git a/data/scripts/profile_man.inc b/data/scripts/profile_man.inc index 2c5b16122c..4acf049bd8 100644 --- a/data/scripts/profile_man.inc +++ b/data/scripts/profile_man.inc @@ -28,10 +28,8 @@ ProfileMan_EventScript_CreateProfile:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq ProfileMan_EventScript_CancelShowProfile - compare VAR_RESULT, 1 - goto_if_eq ProfileMan_EventScript_ShowProfile + goto_if_eq VAR_RESULT, 0, ProfileMan_EventScript_CancelShowProfile + goto_if_eq VAR_RESULT, 1, ProfileMan_EventScript_ShowProfile end ProfileMan_EventScript_CancelShowProfile:: @@ -80,10 +78,8 @@ ProfileMan_EventScript_CreateNewProfile:: call Common_ShowEasyChatScreen lock faceplayer - compare VAR_RESULT, 0 - goto_if_eq ProfileMan_EventScript_CancelShowProfile - compare VAR_RESULT, 1 - goto_if_eq ProfileMan_EventScript_ShowProfile + goto_if_eq VAR_RESULT, 0, ProfileMan_EventScript_CancelShowProfile + goto_if_eq VAR_RESULT, 1, ProfileMan_EventScript_ShowProfile end ProfileMan_EventScript_DeclineNewProfile:: diff --git a/data/scripts/questionnaire.inc b/data/scripts/questionnaire.inc index 62e149bb78..849b25a46a 100644 --- a/data/scripts/questionnaire.inc +++ b/data/scripts/questionnaire.inc @@ -1,21 +1,16 @@ EventScript_Questionnaire:: lockall msgbox Questionnaire_Text_FillOut, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq Questionnaire_EventScript_Release + goto_if_eq VAR_RESULT, NO, Questionnaire_EventScript_Release setvar VAR_0x8004, EASY_CHAT_TYPE_QUESTIONNAIRE call Common_ShowEasyChatScreen lock faceplayer specialvar VAR_0x8008, GetMartEmployeeObjectEventId - compare VAR_0x8004, 1 - goto_if_eq Questionnaire_EventScript_PlayerInputMysteryEventPhrase - compare VAR_0x8004, 2 - goto_if_eq Questionnaire_EventScript_PlayerInputMysteryGiftPhrase - compare VAR_RESULT, 0 - goto_if_eq Questionnaire_EventScript_Release - compare VAR_RESULT, 1 - goto_if_eq Questionnaire_EventScript_ThankYou + goto_if_eq VAR_0x8004, 1, Questionnaire_EventScript_PlayerInputMysteryEventPhrase + goto_if_eq VAR_0x8004, 2, Questionnaire_EventScript_PlayerInputMysteryGiftPhrase + goto_if_eq VAR_RESULT, 0, Questionnaire_EventScript_Release + goto_if_eq VAR_RESULT, 1, Questionnaire_EventScript_ThankYou end Questionnaire_EventScript_PlayerInputMysteryEventPhrase:: diff --git a/data/scripts/record_mix.inc b/data/scripts/record_mix.inc index d1ad84d3a7..109fde2a80 100644 --- a/data/scripts/record_mix.inc +++ b/data/scripts/record_mix.inc @@ -3,10 +3,8 @@ EventScript_MixRecordsPrompt:: lock faceplayer msgbox Text_WouldYouLikeToMixRecords, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq EventScript_MixRecords - compare VAR_RESULT, NO - goto_if_eq EventScript_EndMixRecords + goto_if_eq VAR_RESULT, YES, EventScript_MixRecords + goto_if_eq VAR_RESULT, NO, EventScript_EndMixRecords goto EventScript_EndMixRecords EventScript_MixRecords:: diff --git a/data/scripts/rival_graphics.inc b/data/scripts/rival_graphics.inc index a0fb15f0e4..26a5c8fbcf 100644 --- a/data/scripts/rival_graphics.inc +++ b/data/scripts/rival_graphics.inc @@ -1,9 +1,7 @@ Common_EventScript_SetupRivalGfxId:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalGfxIdFemale - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalGfxIdMale + goto_if_eq VAR_RESULT, MALE, EventScript_SetupRivalGfxIdFemale + goto_if_eq VAR_RESULT, FEMALE, EventScript_SetupRivalGfxIdMale end EventScript_SetupRivalGfxIdFemale:: @@ -16,10 +14,8 @@ EventScript_SetupRivalGfxIdMale:: Common_EventScript_SetupRivalOnBikeGfxId:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalOnBikeGfxIdFemale - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalOnBikeGfxIdMale + goto_if_eq VAR_RESULT, MALE, EventScript_SetupRivalOnBikeGfxIdFemale + goto_if_eq VAR_RESULT, FEMALE, EventScript_SetupRivalOnBikeGfxIdMale end EventScript_SetupRivalOnBikeGfxIdFemale:: @@ -33,10 +29,8 @@ EventScript_SetupRivalOnBikeGfxIdMale:: @ Unused Common_EventScript_SetupRivalGfxIdSameGender:: checkplayergender - compare VAR_RESULT, MALE - goto_if_eq EventScript_SetupRivalGfxIdMale2 - compare VAR_RESULT, FEMALE - goto_if_eq EventScript_SetupRivalGfxIdFemale2 + goto_if_eq VAR_RESULT, MALE, EventScript_SetupRivalGfxIdMale2 + goto_if_eq VAR_RESULT, FEMALE, EventScript_SetupRivalGfxIdFemale2 end EventScript_SetupRivalGfxIdMale2:: diff --git a/data/scripts/roulette.inc b/data/scripts/roulette.inc index 96f5809d7b..7163a449aa 100644 --- a/data/scripts/roulette.inc +++ b/data/scripts/roulette.inc @@ -1,23 +1,19 @@ Roulette_EventScript_Table1:: checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 0 getpokenewsactive POKENEWS_GAME_CORNER - compare VAR_RESULT, FALSE - goto_if_eq Roulette_EventScript_Play + goto_if_eq VAR_RESULT, FALSE, Roulette_EventScript_Play addvar VAR_0x8004, ROULETTE_SPECIAL_RATE goto Roulette_EventScript_Play end Roulette_EventScript_Table2:: checkitem ITEM_COIN_CASE - compare VAR_RESULT, FALSE - goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase + goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoCoinCase setvar VAR_0x8004, 1 getpokenewsactive POKENEWS_GAME_CORNER - compare VAR_RESULT, FALSE - goto_if_eq Roulette_EventScript_Play + goto_if_eq VAR_RESULT, FALSE, Roulette_EventScript_Play addvar VAR_0x8004, ROULETTE_SPECIAL_RATE goto Roulette_EventScript_Play end diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 3b7d85a674..eb6a90abdf 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -14,8 +14,7 @@ SafariZone_EventScript_Exit:: SafariZone_EventScript_RetirePrompt:: lockall msgbox SafariZone_Text_WouldYouLikeToExit, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SafariZone_EventScript_Retire + goto_if_eq VAR_RESULT, YES, SafariZone_EventScript_Retire releaseall end @@ -43,11 +42,9 @@ SafariZone_EventScript_OutOfBalls:: EventScript_PokeBlockFeeder:: lockall special GetPokeblockFeederInFront - compare VAR_RESULT, 0xFFFF - goto_if_ne SafariZone_EventScript_PokeblockPresent + goto_if_ne VAR_RESULT, 0xFFFF, SafariZone_EventScript_PokeblockPresent msgbox SafariZone_Text_PlacePokeblockOnFeeder, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SafariZone_EventScript_ChoosePokeblock + goto_if_eq VAR_RESULT, YES, SafariZone_EventScript_ChoosePokeblock releaseall end @@ -55,8 +52,7 @@ SafariZone_EventScript_ChoosePokeblock:: fadescreen FADE_TO_BLACK special OpenPokeblockCaseOnFeeder waitstate - compare VAR_RESULT, 0xFFFF - goto_if_ne SafariZone_EventScript_PokeblockPlaced + goto_if_ne VAR_RESULT, 0xFFFF, SafariZone_EventScript_PokeblockPlaced end SafariZone_EventScript_PokeblockPlaced:: diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index f024f09014..d21bb9aab5 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -27,33 +27,24 @@ SecretBase_Text_DiscoveredSmallEntrance: SecretBase_EventScript_CheckEntrance:: special GetSecretBaseTypeInFrontOfPlayer special CheckPlayerHasSecretBase - compare VAR_RESULT, TRUE - goto_if_eq SecretBase_EventScript_AlreadyHasSecretBase + goto_if_eq VAR_RESULT, TRUE, SecretBase_EventScript_AlreadyHasSecretBase checkpartymove MOVE_SECRET_POWER setfieldeffectargument 0, VAR_RESULT buffermovename STR_VAR_2, MOVE_SECRET_POWER - compare VAR_0x8007, SECRET_BASE_RED_CAVE - goto_if_eq SecretBase_EventScript_Cave - compare VAR_0x8007, SECRET_BASE_BROWN_CAVE - goto_if_eq SecretBase_EventScript_Cave - compare VAR_0x8007, SECRET_BASE_BLUE_CAVE - goto_if_eq SecretBase_EventScript_Cave - compare VAR_0x8007, SECRET_BASE_YELLOW_CAVE - goto_if_eq SecretBase_EventScript_Cave - compare VAR_0x8007, SECRET_BASE_TREE - goto_if_eq SecretBase_EventScript_Tree - compare VAR_0x8007, SECRET_BASE_SHRUB - goto_if_eq SecretBase_EventScript_Shrub + goto_if_eq VAR_0x8007, SECRET_BASE_RED_CAVE, SecretBase_EventScript_Cave + goto_if_eq VAR_0x8007, SECRET_BASE_BROWN_CAVE, SecretBase_EventScript_Cave + goto_if_eq VAR_0x8007, SECRET_BASE_BLUE_CAVE, SecretBase_EventScript_Cave + goto_if_eq VAR_0x8007, SECRET_BASE_YELLOW_CAVE, SecretBase_EventScript_Cave + goto_if_eq VAR_0x8007, SECRET_BASE_TREE, SecretBase_EventScript_Tree + goto_if_eq VAR_0x8007, SECRET_BASE_SHRUB, SecretBase_EventScript_Shrub end SecretBase_EventScript_Cave:: lockall - compare VAR_RESULT, PARTY_SIZE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_CaveNoSecretPower bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_IndentUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_SECRET_POWER_CAVE @@ -80,12 +71,10 @@ SecretBase_EventScript_CaveEnter:: SecretBase_EventScript_Tree:: lockall - compare VAR_RESULT, PARTY_SIZE - goto_if_eq SecretBase_EventScript_TreeNoSecretPower + goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_TreeNoSecretPower bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_TreeUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_SECRET_POWER_TREE @@ -112,12 +101,10 @@ SecretBase_EventScript_TreeEnter:: SecretBase_EventScript_Shrub:: lockall - compare VAR_RESULT, PARTY_SIZE - goto_if_eq SecretBase_EventScript_ShrubNoSecretPower + goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_ShrubNoSecretPower bufferpartymonnick STR_VAR_1, VAR_RESULT msgbox SecretBase_Text_ClumpUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage dofieldeffect FLDEFF_USE_SECRET_POWER_SHRUB @@ -161,8 +148,7 @@ SecretBase_EventScript_FirstEntrance:: waitmovement 0 setvar VAR_INIT_SECRET_BASE, 1 msgbox SecretBase_Text_WantToMakeYourSecretBaseHere, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq SecretBase_EventScript_SetAsBase + goto_if_eq VAR_RESULT, YES, SecretBase_EventScript_SetAsBase closemessage playse SE_EXIT special ClearAndLeaveSecretBase @@ -185,8 +171,7 @@ SecretBase_EventScript_Enter:: setvar VAR_INIT_SECRET_BASE, 1 playse SE_EXIT special IsCurSecretBaseOwnedByAnotherPlayer - compare VAR_RESULT, FALSE - goto_if_eq SecretBase_EventScript_EnterPlayersBase + goto_if_eq VAR_RESULT, FALSE, SecretBase_EventScript_EnterPlayersBase clearflag FLAG_DECORATION_0 special EnterSecretBase setvar VAR_SECRET_BASE_INITIALIZED, 0 @@ -202,59 +187,43 @@ SecretBase_EventScript_EnterPlayersBase:: SecretBase_EventScript_AlreadyHasSecretBase:: checkpartymove MOVE_SECRET_POWER - compare VAR_RESULT, PARTY_SIZE - goto_if_eq SecretBase_EventScript_NoSecretPower + goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_NoSecretPower setfieldeffectargument 0, VAR_RESULT setorcopyvar VAR_0x8004, VAR_RESULT lockall special GetSecretBaseNearbyMapName msgbox SecretBase_Text_WouldYouLikeToMoveBases, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance fadescreenswapbuffers FADE_TO_BLACK special MoveOutOfSecretBaseFromOutside closemessage fadescreenswapbuffers FADE_FROM_BLACK msgbox SecretBase_Text_MovingCompletedUseSecretPower, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_CancelOnEntrance + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_CancelOnEntrance bufferpartymonnick STR_VAR_1, VAR_0x8004 buffermovename STR_VAR_2, MOVE_SECRET_POWER msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT closemessage closemessage - compare VAR_0x8007, SECRET_BASE_RED_CAVE - goto_if_eq SecretBase_EventScript_CaveUseSecretPower - compare VAR_0x8007, SECRET_BASE_BROWN_CAVE - goto_if_eq SecretBase_EventScript_CaveUseSecretPower - compare VAR_0x8007, SECRET_BASE_BLUE_CAVE - goto_if_eq SecretBase_EventScript_CaveUseSecretPower - compare VAR_0x8007, SECRET_BASE_YELLOW_CAVE - goto_if_eq SecretBase_EventScript_CaveUseSecretPower - compare VAR_0x8007, SECRET_BASE_TREE - goto_if_eq SecretBase_EventScript_TreeUseSecretPower - compare VAR_0x8007, SECRET_BASE_SHRUB - goto_if_eq SecretBase_EventScript_ShrubUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_RED_CAVE, SecretBase_EventScript_CaveUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_BROWN_CAVE, SecretBase_EventScript_CaveUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_BLUE_CAVE, SecretBase_EventScript_CaveUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_YELLOW_CAVE, SecretBase_EventScript_CaveUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_TREE, SecretBase_EventScript_TreeUseSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_SHRUB, SecretBase_EventScript_ShrubUseSecretPower releaseall end SecretBase_EventScript_NoSecretPower:: lockall - compare VAR_0x8007, SECRET_BASE_RED_CAVE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower - compare VAR_0x8007, SECRET_BASE_BROWN_CAVE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower - compare VAR_0x8007, SECRET_BASE_BLUE_CAVE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower - compare VAR_0x8007, SECRET_BASE_YELLOW_CAVE - goto_if_eq SecretBase_EventScript_CaveNoSecretPower - compare VAR_0x8007, SECRET_BASE_TREE - goto_if_eq SecretBase_EventScript_TreeNoSecretPower - compare VAR_0x8007, SECRET_BASE_SHRUB - goto_if_eq SecretBase_EventScript_ShrubNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_RED_CAVE, SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_BROWN_CAVE, SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_BLUE_CAVE, SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_YELLOW_CAVE, SecretBase_EventScript_CaveNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_TREE, SecretBase_EventScript_TreeNoSecretPower + goto_if_eq VAR_0x8007, SECRET_BASE_SHRUB, SecretBase_EventScript_ShrubNoSecretPower end SecretBase_EventScript_CancelOnEntrance:: @@ -302,11 +271,9 @@ SecretBase_EventScript_PutAwayDecoration:: SecretBase_EventScript_PutAwayDecorationLoop:: special PutAwayDecorationIteration - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_PutAwayDecorationEnd + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_PutAwayDecorationEnd addvar VAR_0x8004, 1 - compare VAR_0x8005, 0 - goto_if_eq SecretBase_EventScript_PutAwayDecorationLoop + goto_if_eq VAR_0x8005, 0, SecretBase_EventScript_PutAwayDecorationLoop removeobject VAR_0x8006 setflag VAR_0x8005 @ UB: VAR_0x8005 is set to a flag by PutAwayDecorationIteration, but ScrCmd_setflag doesn't use VarGet goto SecretBase_EventScript_PutAwayDecorationLoop @@ -317,26 +284,16 @@ SecretBase_EventScript_PutAwayDecorationEnd:: SecretBase_EventScript_RecordMixTrainer:: special GetSecretBaseOwnerAndState - compare VAR_0x8004, 0 - goto_if_eq SecretBase_EventScript_Trainer0 - compare VAR_0x8004, 1 - goto_if_eq SecretBase_EventScript_Trainer1 - compare VAR_0x8004, 2 - goto_if_eq SecretBase_EventScript_Trainer2 - compare VAR_0x8004, 3 - goto_if_eq SecretBase_EventScript_Trainer3 - compare VAR_0x8004, 4 - goto_if_eq SecretBase_EventScript_Trainer4 - compare VAR_0x8004, 5 - goto_if_eq SecretBase_EventScript_Trainer5 - compare VAR_0x8004, 6 - goto_if_eq SecretBase_EventScript_Trainer6 - compare VAR_0x8004, 7 - goto_if_eq SecretBase_EventScript_Trainer7 - compare VAR_0x8004, 8 - goto_if_eq SecretBase_EventScript_Trainer8 - compare VAR_0x8004, 9 - goto_if_eq SecretBase_EventScript_Trainer9 + goto_if_eq VAR_0x8004, 0, SecretBase_EventScript_Trainer0 + goto_if_eq VAR_0x8004, 1, SecretBase_EventScript_Trainer1 + goto_if_eq VAR_0x8004, 2, SecretBase_EventScript_Trainer2 + goto_if_eq VAR_0x8004, 3, SecretBase_EventScript_Trainer3 + goto_if_eq VAR_0x8004, 4, SecretBase_EventScript_Trainer4 + goto_if_eq VAR_0x8004, 5, SecretBase_EventScript_Trainer5 + goto_if_eq VAR_0x8004, 6, SecretBase_EventScript_Trainer6 + goto_if_eq VAR_0x8004, 7, SecretBase_EventScript_Trainer7 + goto_if_eq VAR_0x8004, 8, SecretBase_EventScript_Trainer8 + goto_if_eq VAR_0x8004, 9, SecretBase_EventScript_Trainer9 end @ VAR_RESULT is initially set by GetSecretBaseOwnerAndState @@ -344,16 +301,13 @@ SecretBase_EventScript_Trainer0:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer0PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer0PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer0PostBattle msgbox SecretBase_Text_Trainer0Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer0DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer0DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer0DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer0DeclineBattle msgbox SecretBase_Text_Trainer0AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -381,16 +335,13 @@ SecretBase_EventScript_Trainer1:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer1PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer1PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer1PostBattle msgbox SecretBase_Text_Trainer1Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer1DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer1DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer1DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer1DeclineBattle msgbox SecretBase_Text_Trainer1AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -418,16 +369,13 @@ SecretBase_EventScript_Trainer2:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer2PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer2PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer2PostBattle msgbox SecretBase_Text_Trainer2Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer2DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer2DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer2DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer2DeclineBattle msgbox SecretBase_Text_Trainer2AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -455,16 +403,13 @@ SecretBase_EventScript_Trainer3:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer3PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer3PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer3PostBattle msgbox SecretBase_Text_Trainer3Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer3DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer3DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer3DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer3DeclineBattle msgbox SecretBase_Text_Trainer3AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -492,16 +437,13 @@ SecretBase_EventScript_Trainer4:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer4PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer4PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer4PostBattle msgbox SecretBase_Text_Trainer4Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer4DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer4DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer4DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer4DeclineBattle msgbox SecretBase_Text_Trainer4AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -529,16 +471,13 @@ SecretBase_EventScript_Trainer5:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer5PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer5PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer5PostBattle msgbox SecretBase_Text_Trainer5Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer5DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer5DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer5DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer5DeclineBattle msgbox SecretBase_Text_Trainer5AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -566,16 +505,13 @@ SecretBase_EventScript_Trainer6:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer6PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer6PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer6PostBattle msgbox SecretBase_Text_Trainer6Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer6DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer6DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer6DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer6DeclineBattle msgbox SecretBase_Text_Trainer6AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -603,16 +539,13 @@ SecretBase_EventScript_Trainer7:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer7PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer7PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer7PostBattle msgbox SecretBase_Text_Trainer7Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer7DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer7DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer7DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer7DeclineBattle msgbox SecretBase_Text_Trainer7AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -640,16 +573,13 @@ SecretBase_EventScript_Trainer8:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer8PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer8PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer8PostBattle msgbox SecretBase_Text_Trainer8Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer8DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer8DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer8DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer8DeclineBattle msgbox SecretBase_Text_Trainer8AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -677,16 +607,13 @@ SecretBase_EventScript_Trainer9:: lock faceplayer goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_EventScript_Trainer9PreChampion - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_Trainer9PostBattle + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_Trainer9PostBattle msgbox SecretBase_Text_Trainer9Intro, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_Trainer9DeclineBattle + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_Trainer9DeclineBattle setvar VAR_RESULT, 1 special SetBattledOwnerFromResult call Common_EventScript_SaveGame - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_Trainer9DeclineBattle + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_Trainer9DeclineBattle msgbox SecretBase_Text_Trainer9AcceptBattle, MSGBOX_DEFAULT goto SecretBase_EventScript_BattleTrainer end @@ -715,12 +642,9 @@ SecretBase_EventScript_BattleTrainer:: setvar VAR_0x8005, 0 special DoSpecialTrainerBattle waitstate - compare VAR_RESULT, B_OUTCOME_DREW - call_if_eq SecretBase_EventScript_DrewSecretBaseBattle - compare VAR_RESULT, B_OUTCOME_WON - call_if_eq SecretBase_EventScript_WonSecretBaseBattle - compare VAR_RESULT, B_OUTCOME_LOST - call_if_eq SecretBase_EventScript_LostSecretBaseBattle + call_if_eq VAR_RESULT, B_OUTCOME_DREW, SecretBase_EventScript_DrewSecretBaseBattle + call_if_eq VAR_RESULT, B_OUTCOME_WON, SecretBase_EventScript_WonSecretBaseBattle + call_if_eq VAR_RESULT, B_OUTCOME_LOST, SecretBase_EventScript_LostSecretBaseBattle special HealPlayerParty release end diff --git a/data/scripts/secret_power_tm.inc b/data/scripts/secret_power_tm.inc index 41c21e1004..11a5d5b668 100644 --- a/data/scripts/secret_power_tm.inc +++ b/data/scripts/secret_power_tm.inc @@ -37,26 +37,21 @@ Route111_EventScript_SecretPowerMan:: lock faceplayer msgbox Route111_Text_MakingRoomUseTMToMakeYourOwn, MSGBOX_YESNO - compare VAR_RESULT, YES - goto_if_eq Route111_EventScript_GiveSecretPower + goto_if_eq VAR_RESULT, YES, Route111_EventScript_GiveSecretPower msgbox Route111_Text_DontWantThis, MSGBOX_DEFAULT release end Route111_EventScript_GiveSecretPower:: giveitem ITEM_TM43 - compare VAR_RESULT, FALSE - goto_if_eq Route111_EventScript_NoRoomForSecretPower + goto_if_eq VAR_RESULT, FALSE, Route111_EventScript_NoRoomForSecretPower msgbox Route111_Text_ExplainSecretPower, MSGBOX_DEFAULT closemessage setflag FLAG_RECEIVED_SECRET_POWER clearflag FLAG_HIDE_SLATEPORT_CITY_TM_SALESMAN - compare VAR_FACING, DIR_WEST - call_if_eq Route111_EventScript_SecretPowerManExit - compare VAR_FACING, DIR_EAST - call_if_eq Route111_EventScript_SecretPowerManExit - compare VAR_FACING, DIR_NORTH - call_if_eq Route111_EventScript_SecretPowerManExitNorth + call_if_eq VAR_FACING, DIR_WEST, Route111_EventScript_SecretPowerManExit + call_if_eq VAR_FACING, DIR_EAST, Route111_EventScript_SecretPowerManExit + call_if_eq VAR_FACING, DIR_NORTH, Route111_EventScript_SecretPowerManExitNorth removeobject VAR_LAST_TALKED release end diff --git a/data/scripts/shared_secret_base.inc b/data/scripts/shared_secret_base.inc index aca7fc81a5..576e939211 100644 --- a/data/scripts/shared_secret_base.inc +++ b/data/scripts/shared_secret_base.inc @@ -68,8 +68,7 @@ SecretBase_EventScript_PCMainMenuWithoutRegister:: SecretBase_EventScript_PCPackUp:: msgbox SecretBase_Text_AllDecorationsWillBeReturned, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCShowMainMenu + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_PCShowMainMenu closemessage special MoveOutOfSecretBase releaseall @@ -114,14 +113,11 @@ SecretBase_EventScript_ShowRegisterMenu:: SecretBase_EventScript_PCRegister:: special GetCurSecretBaseRegistrationValidity - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_AlreadyRegistered - compare VAR_RESULT, 2 - goto_if_eq SecretBase_EventScript_CantRegisterTooManyBases + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_AlreadyRegistered + goto_if_eq VAR_RESULT, 2, SecretBase_EventScript_CantRegisterTooManyBases special CopyCurSecretBaseOwnerName_StrVar1 msgbox SecretBase_Text_WantToRegisterSecretBase, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCRegisterMenu + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_PCRegisterMenu msgbox SecretBase_Text_RegistrationCompleted, MSGBOX_SIGN special ToggleCurSecretBaseRegistry special DoSecretBasePCTurnOffEffect @@ -130,8 +126,7 @@ SecretBase_EventScript_PCRegister:: SecretBase_EventScript_AlreadyRegistered:: msgbox SecretBase_Text_AlreadyRegisteredDelete, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq SecretBase_EventScript_PCRegisterMenu + goto_if_eq VAR_RESULT, NO, SecretBase_EventScript_PCRegisterMenu msgbox SecretBase_Text_DataUnregistered, MSGBOX_SIGN special ToggleCurSecretBaseRegistry special DoSecretBasePCTurnOffEffect @@ -184,14 +179,10 @@ SecretBase_EventScript_SandOrnament:: SecretBase_EventScript_ShieldOrToyTV:: special InteractWithShieldOrTVDecoration - compare VAR_RESULT, 0 - goto_if_eq SecretBase_EventScript_BattleTowerShield - compare VAR_RESULT, 1 - goto_if_eq SecretBase_EventScript_ToyTV - compare VAR_RESULT, 2 - goto_if_eq SecretBase_EventScript_SeedotTV - compare VAR_RESULT, 3 - goto_if_eq SecretBase_EventScript_SkittyTV + goto_if_eq VAR_RESULT, 0, SecretBase_EventScript_BattleTowerShield + goto_if_eq VAR_RESULT, 1, SecretBase_EventScript_ToyTV + goto_if_eq VAR_RESULT, 2, SecretBase_EventScript_SeedotTV + goto_if_eq VAR_RESULT, 3, SecretBase_EventScript_SkittyTV end SecretBase_EventScript_BattleTowerShield:: diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc index c2bc35d5a0..edb116f991 100644 --- a/data/scripts/surf.inc +++ b/data/scripts/surf.inc @@ -1,13 +1,11 @@ EventScript_UseSurf:: checkpartymove MOVE_SURF - compare VAR_RESULT, PARTY_SIZE - goto_if_eq EventScript_EndUseSurf + goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_EndUseSurf bufferpartymonnick STR_VAR_1, VAR_RESULT setfieldeffectargument 0, VAR_RESULT lockall msgbox gText_WantToUseSurf, MSGBOX_YESNO - compare VAR_RESULT, NO - goto_if_eq EventScript_ReleaseUseSurf + goto_if_eq VAR_RESULT, NO, EventScript_ReleaseUseSurf msgbox gText_PlayerUsedSurf, MSGBOX_DEFAULT dofieldeffect FLDEFF_USE_SURF EventScript_ReleaseUseSurf:: diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc index 38cf632810..bbbcaf3ba3 100644 --- a/data/scripts/trainer_battle.inc +++ b/data/scripts/trainer_battle.inc @@ -13,8 +13,7 @@ EventScript_TryDoNormalTrainerBattle:: applymovement VAR_LAST_TALKED, Movement_RevealTrainer waitmovement 0 specialvar VAR_RESULT, GetTrainerFlag - compare VAR_RESULT, FALSE - goto_if_ne EventScript_NoNormalTrainerBattle + goto_if_ne VAR_RESULT, FALSE, EventScript_NoNormalTrainerBattle special PlayTrainerEncounterMusic special SetTrainerFacingDirection goto EventScript_ShowTrainerIntroMsg @@ -27,11 +26,9 @@ EventScript_TryDoDoubleTrainerBattle:: faceplayer call EventScript_RevealTrainer specialvar VAR_RESULT, GetTrainerFlag - compare VAR_RESULT, FALSE - goto_if_ne EventScript_NoDoubleTrainerBattle + goto_if_ne VAR_RESULT, FALSE, EventScript_NoDoubleTrainerBattle special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne EventScript_NotEnoughMonsForDoubleBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, EventScript_NotEnoughMonsForDoubleBattle special PlayTrainerEncounterMusic special SetTrainerFacingDirection goto EventScript_ShowTrainerIntroMsg @@ -56,8 +53,7 @@ EventScript_DoNoIntroTrainerBattle:: EventScript_TryDoRematchBattle:: call EventScript_RevealTrainer specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, FALSE - goto_if_eq EventScript_NoRematchTrainerBattle + goto_if_eq VAR_RESULT, FALSE, EventScript_NoRematchTrainerBattle special PlayTrainerEncounterMusic special SetTrainerFacingDirection special ShowTrainerIntroSpeech @@ -73,11 +69,9 @@ EventScript_NoRematchTrainerBattle:: EventScript_TryDoDoubleRematchBattle:: specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, FALSE - goto_if_eq EventScript_NoDoubleRematchTrainerBattle + goto_if_eq VAR_RESULT, FALSE, EventScript_NoDoubleRematchTrainerBattle special HasEnoughMonsForDoubleBattle - compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS - goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle + goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, EventScript_NotEnoughMonsForDoubleRematchBattle special PlayTrainerEncounterMusic special SetTrainerFacingDirection special ShowTrainerIntroSpeech @@ -112,24 +106,18 @@ EventScript_ShowTrainerIntroMsg:: waitmessage waitbuttonpress special TryPrepareSecondApproachingTrainer - compare VAR_RESULT, TRUE - goto_if_eq EventScript_TrainerApproach + goto_if_eq VAR_RESULT, TRUE, EventScript_TrainerApproach goto EventScript_DoTrainerBattle EventScript_DoTrainerBattle:: dotrainerbattle @ Below battle mode check only needed in FRLG specialvar VAR_RESULT, GetTrainerBattleMode - compare VAR_RESULT, TRAINER_BATTLE_SINGLE - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE - goto_if_eq EventScript_EndTrainerBattle - compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC - goto_if_eq EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_SINGLE, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE, EventScript_EndTrainerBattle + goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC, EventScript_EndTrainerBattle EventScript_EndTrainerBattle:: gotobeatenscript releaseall diff --git a/data/scripts/trainer_hill.inc b/data/scripts/trainer_hill.inc index 8804b71b0a..b7f8153514 100644 --- a/data/scripts/trainer_hill.inc +++ b/data/scripts/trainer_hill.inc @@ -2,12 +2,9 @@ TrainerHill_OnResume: setvar VAR_TEMP_2, 0 trainerhill_resumetimer frontier_get FRONTIER_DATA_BATTLE_OUTCOME - compare VAR_RESULT, B_OUTCOME_LOST - goto_if_eq TrainerHill_1F_EventScript_Lost - compare VAR_RESULT, B_OUTCOME_DREW - goto_if_eq TrainerHill_1F_EventScript_Lost - compare VAR_RESULT, B_OUTCOME_FORFEITED - goto_if_eq TrainerHill_1F_EventScript_Lost + goto_if_eq VAR_RESULT, B_OUTCOME_LOST, TrainerHill_1F_EventScript_Lost + goto_if_eq VAR_RESULT, B_OUTCOME_DREW, TrainerHill_1F_EventScript_Lost + goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, TrainerHill_1F_EventScript_Lost end TrainerHill_OnWarp: @@ -35,8 +32,7 @@ EventScript_TrainerHillTimer:: TrainerHill_1F_EventScript_DummyWarpToEntranceCounter:: setvar VAR_TEMP_2, 1 trainerhill_getusingereader - compare VAR_RESULT, TRUE @ VAR_RESULT always FALSE here - goto_if_eq TrainerHill_1F_EventScript_WarpSilentToEntranceCounter + goto_if_eq VAR_RESULT, TRUE, TrainerHill_1F_EventScript_WarpSilentToEntranceCounter @ VAR_RESULT always FALSE here end @ Never reached diff --git a/data/scripts/trainer_script.inc b/data/scripts/trainer_script.inc index 5c63030821..c0998aef8e 100644 --- a/data/scripts/trainer_script.inc +++ b/data/scripts/trainer_script.inc @@ -12,8 +12,7 @@ Std_RegisteredInMatchCall:: EventScript_TryGetTrainerScript:: special ShouldTryGetTrainerScript - compare VAR_RESULT, TRUE - goto_if_eq EventScript_GotoTrainerScript + goto_if_eq VAR_RESULT, TRUE, EventScript_GotoTrainerScript releaseall end diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index f8832a3abd..a5a093226f 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -3,29 +3,23 @@ EventScript_TV:: incrementgamestat GAME_STAT_WATCHED_TV special ResetTVShowState specialvar VAR_RESULT, CheckForPlayersHouseNews - compare VAR_RESULT, PLAYERS_HOUSE_TV_MOVIE - goto_if_eq EventScript_PlayersHouseMovie - compare VAR_RESULT, PLAYERS_HOUSE_TV_LATI - goto_if_eq EventScript_PlayersHouseLatiNewsFlash + goto_if_eq VAR_RESULT, PLAYERS_HOUSE_TV_MOVIE, EventScript_PlayersHouseMovie + goto_if_eq VAR_RESULT, PLAYERS_HOUSE_TV_LATI, EventScript_PlayersHouseLatiNewsFlash goto_if_unset FLAG_SYS_TV_START, EventScript_MomDadMightLikeThis1 goto_if_set FLAG_SYS_TV_WATCH, EventScript_MomDadMightLikeThis1 specialvar VAR_RESULT, IsGabbyAndTyShowOnTheAir - compare VAR_RESULT, TRUE - goto_if_eq EventScript_DoInSearchOfTrainers + goto_if_eq VAR_RESULT, TRUE, EventScript_DoInSearchOfTrainers goto EventScript_TryDoPokeNews end EventScript_TryDoTVShow:: specialvar VAR_0x8004, GetRandomActiveShowIdx - compare VAR_0x8004, 255 - goto_if_eq EventScript_MomDadMightLikeThis2 + goto_if_eq VAR_0x8004, 255, EventScript_MomDadMightLikeThis2 specialvar VAR_RESULT, GetNextActiveShowIfMassOutbreak - compare VAR_RESULT, 255 - goto_if_eq EventScript_MomDadMightLikeThis2 + goto_if_eq VAR_RESULT, 255, EventScript_MomDadMightLikeThis2 copyvar VAR_0x8004, VAR_RESULT specialvar VAR_RESULT, GetSelectedTVShow - compare VAR_RESULT, 0 - goto_if_ne EventScript_DoTVShow + goto_if_ne VAR_RESULT, 0, EventScript_DoTVShow end EventScript_MomDadMightLikeThis1:: @@ -58,8 +52,7 @@ EventScript_DoTVShow:: special DoTVShow waitmessage waitbuttonpress - compare VAR_RESULT, TRUE - goto_if_ne EventScript_DoTVShow + goto_if_ne VAR_RESULT, TRUE, EventScript_DoTVShow goto EventScript_TurnOffTV end @@ -77,8 +70,7 @@ EventScript_MomDadMightLikeThis2:: EventScript_TryDoPokeNews:: special DoPokeNews - compare VAR_RESULT, FALSE - goto_if_eq EventScript_TryDoTVShow + goto_if_eq VAR_RESULT, FALSE, EventScript_TryDoTVShow waitmessage waitbuttonpress goto EventScript_TurnOffTV @@ -88,7 +80,6 @@ EventScript_DoInSearchOfTrainers:: special DoTVShowInSearchOfTrainers waitmessage waitbuttonpress - compare VAR_RESULT, 0 - goto_if_eq EventScript_DoInSearchOfTrainers + goto_if_eq VAR_RESULT, 0, EventScript_DoInSearchOfTrainers goto EventScript_TurnOffTV end From 42a83ee50e3364f3f7361dacb3d3616053f4c5bf Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 18 Nov 2021 23:20:05 -0500 Subject: [PATCH 208/417] Use STR_VAR names for apprentice_buff and frontier_gettrainername --- asm/macros/battle_frontier/apprentice.inc | 16 +++++++--- asm/macros/battle_frontier/frontier_util.inc | 8 ++++- .../scripts.inc | 4 +-- data/scripts/apprentice.inc | 32 +++++++++---------- 4 files changed, 37 insertions(+), 23 deletions(-) diff --git a/asm/macros/battle_frontier/apprentice.inc b/asm/macros/battle_frontier/apprentice.inc index 83871880b6..9eb5f9ea8a 100644 --- a/asm/macros/battle_frontier/apprentice.inc +++ b/asm/macros/battle_frontier/apprentice.inc @@ -94,11 +94,19 @@ @ Buffer some APPRENTICE_BUFF_* string to the given stringvar (0 for STR_VAR_1, 1 for STR_VAR_2, 2 for STR_VAR_3) .macro apprentice_buff stringvar:req, tobuff:req setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING - setvar VAR_0x8005, \stringvar - .if \tobuff >= VARS_START - copyvar VAR_0x8006, \tobuff + .if \stringvar == STR_VAR_1 + setvar VAR_0x8005, 0 + .elseif \stringvar == STR_VAR_2 + setvar VAR_0x8005, 1 + .elseif \stringvar == STR_VAR_3 + setvar VAR_0x8005, 2 .else - setvar VAR_0x8006, \tobuff + setvar VAR_0x8005, \stringvar + .endif + .if \tobuff >= VARS_START + copyvar VAR_0x8006, \tobuff + .else + setvar VAR_0x8006, \tobuff .endif special CallApprenticeFunction .endm diff --git a/asm/macros/battle_frontier/frontier_util.inc b/asm/macros/battle_frontier/frontier_util.inc index def5b4d1c7..c875fcdde2 100644 --- a/asm/macros/battle_frontier/frontier_util.inc +++ b/asm/macros/battle_frontier/frontier_util.inc @@ -136,7 +136,13 @@ @ Buffer the name of gTrainerBattleOpponent_A in STR_VAR_1 (0) or STR_VAR_2 (1) .macro frontier_gettrainername stringVar:req setvar VAR_0x8004, FRONTIER_UTIL_FUNC_BUFFER_TRAINER_NAME - setvar VAR_0x8005, \stringVar + .if \stringVar == STR_VAR_1 + setvar VAR_0x8005, 0 + .elseif \stringVar == STR_VAR_2 + setvar VAR_0x8005, 1 + .else + setvar VAR_0x8005, \stringVar + .endif special CallFrontierUtilFunc .endm diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc index 888f116eea..406ab46aec 100644 --- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc +++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc @@ -118,13 +118,13 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_WarpToLobbyLost:: goto BattleFrontier_BattleDomeBattleRoom_EventScript_WarpToLobby BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWon:: - frontier_gettrainername 1 + frontier_gettrainername STR_VAR_2 message BattleFrontier_BattleDomeBattleRoom_Text_TrainerIsWinner waitmessage return BattleFrontier_BattleDomeBattleRoom_EventScript_OpponentWonDraw:: - frontier_gettrainername 0 + frontier_gettrainername STR_VAR_1 message BattleFrontier_BattleDomeBattleRoom_Text_RefereesDecidedWinnerTrainer waitmessage return diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc index ea8345a9ec..6b3a99e728 100644 --- a/data/scripts/apprentice.inc +++ b/data/scripts/apprentice.inc @@ -20,7 +20,7 @@ Apprentice_EventScript_AskQuestion: end Apprentice_EventScript_FirstMeeting: - apprentice_buff 0, APPRENTICE_BUFF_NAME + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_NAME apprentice_msg FALSE, APPRENTICE_MSG_PLEASE_TEACH Apprentice_EventScript_WhichLvlMode: apprentice_menu APPRENTICE_ASK_YES_NO @@ -29,7 +29,7 @@ Apprentice_EventScript_WhichLvlMode: apprentice_menu APPRENTICE_ASK_WHICH_LEVEL apprentice_setlvlmode VAR_RESULT apprentice_shufflespecies - apprentice_buff 0, APPRENTICE_BUFF_LEVEL + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_LEVEL apprentice_msg TRUE, APPRENTICE_MSG_THANKS_LVL_MODE call Apprentice_EventScript_SetHideFlags release @@ -46,8 +46,8 @@ Apprentice_EventScript_RejectTeach: Apprentice_EventScript_UseWhichMon: apprentice_initquestion APPRENTICE_QUESTION_WHICH_MON - apprentice_buff 0, APPRENTICE_BUFF_SPECIES1 - apprentice_buff 1, APPRENTICE_BUFF_SPECIES2 + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_SPECIES1 + apprentice_buff STR_VAR_2, APPRENTICE_BUFF_SPECIES2 apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MON apprentice_menu APPRENTICE_ASK_2SPECIES copyvar VAR_0x8005, VAR_RESULT @@ -58,7 +58,7 @@ Apprentice_EventScript_UseWhichMon: apprentice_answeredquestion apprentice_getnumpartymons call_if_eq VAR_RESULT, MULTI_PARTY_SIZE, Apprentice_EventScript_LastMonSelected - apprentice_buff 0, VAR_0x8007 + apprentice_buff STR_VAR_1, VAR_0x8007 apprentice_freequestion apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MON call Apprentice_EventScript_SetHideFlags @@ -83,7 +83,7 @@ Apprentice_EventScript_LastMonSelected: Apprentice_EventScript_UseWhatHeldItem: apprentice_initquestion APPRENTICE_QUESTION_WHAT_ITEM - apprentice_buff 0, APPRENTICE_BUFF_SPECIES3 + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_SPECIES3 apprentice_msg TRUE, APPRENTICE_MSG_WHAT_HELD_ITEM apprentice_freequestion Apprentice_EventScript_ChooseHoldItem: @@ -93,7 +93,7 @@ Apprentice_EventScript_ChooseHoldItem: goto_if_eq VAR_RESULT, FALSE, Apprentice_EventScript_ConfirmHoldNothing apprentice_trysetitem goto_if_eq VAR_RESULT, FALSE, Apprentice_EventScript_AlreadySuggestedItem - apprentice_buff 0, APPRENTICE_BUFF_ITEM + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_ITEM apprentice_msg TRUE, APPRENTICE_MSG_THANKS_HELD_ITEM apprentice_answeredquestion call Apprentice_EventScript_SetHideFlags @@ -106,7 +106,7 @@ Apprentice_EventScript_ChooseHoldItem: Apprentice_EventScript_ConfirmHoldNothing: apprentice_initquestion APPRENTICE_QUESTION_WHAT_ITEM - apprentice_buff 0, APPRENTICE_BUFF_SPECIES3 + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_SPECIES3 apprentice_msg FALSE, APPRENTICE_MSG_HOLD_NOTHING apprentice_menu APPRENTICE_ASK_GIVE apprentice_freequestion @@ -126,8 +126,8 @@ Apprentice_EventScript_HoldNothing: @ different item if theyve already told the Apprentice to use it for another mon Apprentice_EventScript_AlreadySuggestedItem: apprentice_initquestion APPRENTICE_QUESTION_WHAT_ITEM - apprentice_buff 0, APPRENTICE_BUFF_ITEM - apprentice_buff 1, APPRENTICE_BUFF_SPECIES3 + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_ITEM + apprentice_buff STR_VAR_2, APPRENTICE_BUFF_SPECIES3 apprentice_msg FALSE, APPRENTICE_MSG_ITEM_ALREADY_SUGGESTED apprentice_menu APPRENTICE_ASK_GIVE apprentice_freequestion @@ -137,9 +137,9 @@ Apprentice_EventScript_AlreadySuggestedItem: Apprentice_EventScript_UseWhichMove: apprentice_initquestion APPRENTICE_QUESTION_WHICH_MOVE - apprentice_buff 0, APPRENTICE_BUFF_SPECIES3 - apprentice_buff 1, APPRENTICE_BUFF_MOVE1 - apprentice_buff 2, APPRENTICE_BUFF_MOVE2 + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_SPECIES3 + apprentice_buff STR_VAR_2, APPRENTICE_BUFF_MOVE1 + apprentice_buff STR_VAR_3, APPRENTICE_BUFF_MOVE2 apprentice_msg FALSE, APPRENTICE_MSG_WHICH_MOVE apprentice_menu APPRENTICE_ASK_MOVES copyvar VAR_0x8005, VAR_RESULT @@ -147,7 +147,7 @@ Apprentice_EventScript_UseWhichMove: call_if_eq VAR_0x8005, 1, Apprentice_EventScript_ChoseMove2 apprentice_setmove apprentice_answeredquestion - apprentice_buff 0, VAR_0x8007 + apprentice_buff STR_VAR_1, VAR_0x8007 apprentice_freequestion apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MOVE call Apprentice_EventScript_SetHideFlags @@ -171,7 +171,7 @@ Apprentice_EventScript_PutWhichMonFirst: apprentice_menu APPRENTICE_ASK_3SPECIES apprentice_setleadmon VAR_RESULT apprentice_answeredquestion - apprentice_buff 0, APPRENTICE_BUFF_LEAD_MON_SPECIES + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_LEAD_MON_SPECIES apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MON_FIRST call Apprentice_EventScript_SetHideFlags release @@ -190,7 +190,7 @@ Apprentice_EventScript_PickWinSpeech: lock faceplayer apprentice_save - apprentice_buff 0, APPRENTICE_BUFF_WIN_SPEECH + apprentice_buff STR_VAR_1, APPRENTICE_BUFF_WIN_SPEECH apprentice_msg TRUE, APPRENTICE_MSG_THANKS_WIN_SPEECH apprentice_reset call Apprentice_EventScript_SetHideFlags From 23dd1dad7f268d61c22132f88a2427437ce04d59 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 21 Nov 2021 11:23:03 -0500 Subject: [PATCH 209/417] Fix incorrect palettes in Mauville flower tileset anims --- .../secondary/mauville/anim/flower_1/0.png | Bin 234 -> 234 bytes .../secondary/mauville/anim/flower_1/1.png | Bin 229 -> 229 bytes .../secondary/mauville/anim/flower_1/2.png | Bin 224 -> 224 bytes .../secondary/mauville/anim/flower_1/3.png | Bin 216 -> 216 bytes .../secondary/mauville/anim/flower_1/4.png | Bin 232 -> 232 bytes .../secondary/mauville/anim/flower_2/0.png | Bin 234 -> 234 bytes .../secondary/mauville/anim/flower_2/1.png | Bin 229 -> 229 bytes .../secondary/mauville/anim/flower_2/2.png | Bin 224 -> 224 bytes .../secondary/mauville/anim/flower_2/3.png | Bin 216 -> 216 bytes .../secondary/mauville/anim/flower_2/4.png | Bin 232 -> 232 bytes 10 files changed, 0 insertions(+), 0 deletions(-) diff --git a/data/tilesets/secondary/mauville/anim/flower_1/0.png b/data/tilesets/secondary/mauville/anim/flower_1/0.png index 263dba07005dcc43d5e370683470e641ec9071dc..d17b8ca90699ab2a97bfc659b161ed4434bfb999 100644 GIT binary patch delta 62 zcmV-E0Kxz20qOyeDKvYuy>q?xgT-Pwi!nJ;0RR7D|NsBq=I*`C=KrkT=7Y4=T8pIB U#dF1^L9~Myq-u+Cw9k=Uje>q9kpKVy delta 62 zcmV-E0Kxz20qOyeDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&jjZe*(EtDd diff --git a/data/tilesets/secondary/mauville/anim/flower_1/1.png b/data/tilesets/secondary/mauville/anim/flower_1/1.png index 66179f13ddb7dc36b7aca8f1009bccbaf2d2423a..2a30d578040fb9c07db905f29da25501e650551a 100644 GIT binary patch delta 62 zcmV-E0Kxy|0p$UZDKvYuy>q?xgT-Pwi!nJ;0RR7D|NsBq=I*`C=KrkT=7Y4=T8pIB U#dF1^L9~Myq-u+Cw9k=Uh=3O*f&c&j delta 62 zcmV-E0Kxy|0p$UZDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&h^mDi!Tq?xgT-Pwi!nJ;0RR7D|NsBq=I*`C=KrkT=7Y4=T8pIB U#dF1^L9~Myq-u+Cw9k=UgMF|ia{vGU delta 62 zcmV-E0Kxy@0pJ0UDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&gQy-Jvj6}9 diff --git a/data/tilesets/secondary/mauville/anim/flower_1/3.png b/data/tilesets/secondary/mauville/anim/flower_1/3.png index b1015d370bd22dcb8b04909c86c127c82300ce73..60cf30bb43a22de3f665acfc5db09d299cdc22da 100644 GIT binary patch delta 62 zcmV-E0Kxy*0oVbMDKvYuy>q?xgT-Pwi!nJ;0RR7D|NsBq=I*`C=KrkT=7Y4=T8pIB U#dF1^L9~Myq-u+Cw9k=UdwJL;TL1t6 delta 62 zcmV-E0Kxy*0oVbMDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&d!$Aln*aa+ diff --git a/data/tilesets/secondary/mauville/anim/flower_1/4.png b/data/tilesets/secondary/mauville/anim/flower_1/4.png index 1e8cb84afec50d85cd062fdddf380b8507150bc4..01162ac5c47bb66a48335d459e671b43d797e09e 100644 GIT binary patch delta 62 zcmV-E0Kxz00q6mcDKvYuy>q?xgT-Pwi!nJ;0RR7D|NsBq=I*`C=KrkT=7Y4=T8pIB U#dF1^L9~Myq-u+Cw9k=Ui-CwGivR!s delta 62 zcmV-E0Kxz00q6mcDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&i>vk?%K!iX diff --git a/data/tilesets/secondary/mauville/anim/flower_2/0.png b/data/tilesets/secondary/mauville/anim/flower_2/0.png index 263dba07005dcc43d5e370683470e641ec9071dc..be6b131cf378a38eb74da5244d6c55407faab673 100644 GIT binary patch delta 62 zcmV-E0Kxz20qOyeDKvYuz5oCJgT-Pwi!nJ;0RR7Dti|Swq~25tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&jjZe*(EtDd diff --git a/data/tilesets/secondary/mauville/anim/flower_2/1.png b/data/tilesets/secondary/mauville/anim/flower_2/1.png index 66179f13ddb7dc36b7aca8f1009bccbaf2d2423a..715205f6497159f0b968af6a9124f37fd6a0e64e 100644 GIT binary patch delta 62 zcmV-E0Kxy|0p$UZDKvYuz5oCJgT-Pwi!nJ;0RR7Dti|Swq~25tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&h^mDi!T5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&gQy-Jvj6}9 diff --git a/data/tilesets/secondary/mauville/anim/flower_2/3.png b/data/tilesets/secondary/mauville/anim/flower_2/3.png index b1015d370bd22dcb8b04909c86c127c82300ce73..26a621fe13802cc9ba7df5941107ef89fcf455cb 100644 GIT binary patch delta 62 zcmV-E0Kxy*0oVbMDKvYuz5oCJgT-Pwi!nJ;0RR7Dti|Swq~25tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&d!$Aln*aa+ diff --git a/data/tilesets/secondary/mauville/anim/flower_2/4.png b/data/tilesets/secondary/mauville/anim/flower_2/4.png index 1e8cb84afec50d85cd062fdddf380b8507150bc4..03603068ecf4a604e6283bf994d4691d1ec2f535 100644 GIT binary patch delta 62 zcmV-E0Kxz00q6mcDKvYuz5oCJgT-Pwi!nJ;0RR7Dti|Swq~2pF delta 62 zcmV-E0Kxz00q6mcDKu)$d$j+9gT-Pwi!nJ;0N#{yYFb*PVp>5tG5^Js-fCjaK~kjE U#dF1^L9~Myq-w=MhRl&&i>vk?%K!iX From f81565163e411337ce7484133cfd262562d679c7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 21 Nov 2021 11:48:50 -0500 Subject: [PATCH 210/417] Retire OK bot --- .github/workflows/build.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1dfb5763e0..283e6f8fb5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,14 +52,6 @@ jobs: COMPARE: 0 run: make -j${nproc} all - - name: Webhook - if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }} - env: - CALCROM_DISCORD_WEBHOOK_USERNAME: OK - CALCROM_DISCORD_WEBHOOK_AVATAR_URL: https://i.imgur.com/38BQHdd.png - CALCROM_DISCORD_WEBHOOK_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_URL }} - run: sh .github/calcrom/webhook.sh pokeemerald - - name: Move symfiles if: ${{ github.event_name == 'push' }} run: | From 8373312ed7e7972236f8782a5894b71fbd2f54f5 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 22 Nov 2021 16:25:25 -0300 Subject: [PATCH 211/417] =?UTF-8?q?Add=20gender=20differences=20for=20some?= =?UTF-8?q?=20Gen.=204=20Pok=C3=A9mon=20Namely:=20Bidoof,=20Kricketot,=20S?= =?UTF-8?q?hinx,=20Starly,=20Staravia=20and=20Staraptor=20Credits=20to=20C?= =?UTF-8?q?yanSMP64/Furret=20and=20Jaizu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- graphics/pokemon/bidoof/anim_frontf.png | Bin 0 -> 852 bytes graphics/pokemon/bidoof/backf.png | Bin 0 -> 570 bytes graphics/pokemon/kricketot/anim_frontf.png | Bin 0 -> 1048 bytes graphics/pokemon/kricketot/backf.png | Bin 0 -> 625 bytes graphics/pokemon/shinx/anim_front.png | Bin 986 -> 984 bytes graphics/pokemon/shinx/anim_frontf.png | Bin 0 -> 981 bytes graphics/pokemon/shinx/back.png | Bin 728 -> 729 bytes graphics/pokemon/shinx/backf.png | Bin 0 -> 728 bytes graphics/pokemon/staraptor/anim_frontf.png | Bin 0 -> 1290 bytes graphics/pokemon/staravia/anim_frontf.png | Bin 0 -> 1012 bytes graphics/pokemon/staravia/backf.png | Bin 0 -> 675 bytes graphics/pokemon/starly/anim_frontf.png | Bin 0 -> 993 bytes graphics/pokemon/starly/backf.png | Bin 0 -> 699 bytes include/graphics.h | 11 +++++++++++ src/data.c | 6 ++++++ src/data/graphics/pokemon.h | 11 +++++++++++ src/data/pokemon_graphics/back_pic_table.h | 6 ++++++ src/data/pokemon_graphics/front_pic_table.h | 6 ++++++ src/data/pokemon_graphics/palette_table.h | 6 ++++++ src/data/pokemon_graphics/shiny_palette_table.h | 6 ++++++ src/pokemon_icon.c | 11 +++++++++++ 21 files changed, 63 insertions(+) create mode 100644 graphics/pokemon/bidoof/anim_frontf.png create mode 100644 graphics/pokemon/bidoof/backf.png create mode 100644 graphics/pokemon/kricketot/anim_frontf.png create mode 100644 graphics/pokemon/kricketot/backf.png create mode 100644 graphics/pokemon/shinx/anim_frontf.png create mode 100644 graphics/pokemon/shinx/backf.png create mode 100644 graphics/pokemon/staraptor/anim_frontf.png create mode 100644 graphics/pokemon/staravia/anim_frontf.png create mode 100644 graphics/pokemon/staravia/backf.png create mode 100644 graphics/pokemon/starly/anim_frontf.png create mode 100644 graphics/pokemon/starly/backf.png diff --git a/graphics/pokemon/bidoof/anim_frontf.png b/graphics/pokemon/bidoof/anim_frontf.png new file mode 100644 index 0000000000000000000000000000000000000000..9585a6015c3b703883e8ed77a6a9ea81c569483a GIT binary patch literal 852 zcmV-a1FQUrP)X?ZD000+sMObuGZ)S9NVRB^vM@&RePDdbiWpW@hE;Mn4q~QPn00?w&PDe*f zL^A*Y002sWDIWj;00d`2O+f$vv5yP`J62En0LhVh3@Jd~ zK151v0R6Th;S6Au!U$mOuTNnwZkW9h0_(GBiy?$u1OR7{w;1rn9>$weK){2{T?794 zWHzHJ8FIt(!5O9>EMY_j-atf;;YN$absrIppip%q|+)Qp^-1i$^7bR+Q zU55nahPaq~CBvtCfVeU^zh?*&LxzvufeF|(;ALNAUw(bY zcp2qeZAT7X7tz43 zvcW~ZKQy_h_UVVQ?wZH)u<>i z=E}1_kk)oCR%ply&;CFi%=Vkmr&o66+aD^&d`^hpZjEn$*qiKjZiH`tcoY)6igS$M eq9b^xzt2lJ4m1 z$iT3%pZiZDE0Avx;1l9H2bfDv{_PKV^|t-iI$0+LMyI+Zb^n5}PdM3oKMSREC#+p7#TT7dSUFvt$Hho` zqg-O*y>Hpqc3&>hU#=(T#9s09%z@2J(Iz{Y8#je-R-A6Usg3?k`BCpAZ`{5f z>rwp4wdd8%jaxH!v^g7m*x~WQ$VIjI^TR9AA=AV^GB>C@yk?v7o9pXE)!tuUU%7ZV zIn@T8+&{g=k}2kX?Vq25jq7CU97B literal 0 HcmV?d00001 diff --git a/graphics/pokemon/kricketot/anim_frontf.png b/graphics/pokemon/kricketot/anim_frontf.png new file mode 100644 index 0000000000000000000000000000000000000000..86b2f773a54acc26f841563afbdfe3aaec81f48c GIT binary patch literal 1048 zcmV+z1n2vSP)?Sh;YA{SWM}hRxcfxJb?d5#{(FK5=BD6ngtTJ(FWOXP#W{@*st~=>aBDhXpYNwyvK+u|L)N zSUsOpz=58@Q0rPNvs3jH z4`azZtRBB6fc-C%Yc2p&01W>+G*lB7cqy*}aARly2cTaKVSC${!9xPDUFaMJWtk2p zl%HivzXE8tOQ~qUQ|bxqwcESF9}XZ>PfS^syFMpNU~x97z9BFdAqjXqm{e7}-9~`U zz=O>S?c+!~ZoiC}MBuX;)BXjt^;nIg8UVjUS?gzb_k&tMica10Vu_!mSlP-}_FIfQ zwZq!Q4qNLs9mLvViTNFuHn`Hgc)M^Ti--)+<^KYlRxtie;ai8-T>LHrLL?Du>=AIdZ_KJP!1sd21-30ejP}b6ji_M}!9Io3UMd6O0g%z&0-LeB#A|NeG%KG{@bIs*a^zN2zb6U;Cp0T1VpS-ZlMc=#$MmQ{bcRzxD2)t?K9$Ca%)^D}aq+t(;g|%H zPTFeab7{363B*kcfVNtX?81{r7MN_b`Jmz^-912A^}0`&!6 zZ^zYQ>{5ondrENsSH)IUjX9?^j`hcZloBPi3qbJ^SvBNL5iGQYv&NPEn*9K#1vv0B Sw_VTx0000f4>YfI{LW zt`Q}{`DrEPiAAXl?mjL+V-(6#ixiCYObT0D5Fjy*Qgm>F@ zh(5VhVJ2y$F1JgRi+3h-*f$+n?o2lO)Y46%U;We;CNDIX{POe5{GO>Q|G)m;b-DW` zr`To(Ps6pRYy6f3ojO#yiT@{0#Ir~~xt=Me3=G?k3pt!R&f)N`k?F)Hovg(B+zg-Q zZ1*UX<>EIIkl}dy>NeAD=jpQ7!o)v2tlzaVYHm}2%#zseHaiZfF+^?TS)F7e9v18Ec$hI?uyNsH<2A|!iq$@XQNLBa_{{`= zT&dXOQ6k*#P{0ZzNP6Tqw)pHc-f>(sL14~gjuqMr|J@!swl2s| zF5r;V)ldq!%kp=}aa+DbzXOdgdbuRedg>*85IgYECEx3J-d^K&gCnL7jO6Z5f5NpQ z_wn49@qZkn7o;_KTc-6KY-XRz&dR!#{VU54)z8acbN8yN{88>Z#SV%$Pgg&ebxsLQ E0C+p>0ssI2 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/shinx/anim_front.png b/graphics/pokemon/shinx/anim_front.png index 33a28bf20ff3b1d1b241d3bc7255104443412efc..16221a2a2110af4ebf44ee32c0d65f01fa098449 100644 GIT binary patch delta 786 zcmV+t1MU3U2iOOYDhlNU0~Hb$`=yPhku-}50Eh)0NB{r={E^5df4n5UG9(L-I-OBl zGY3?@11lc^Wx5Qg$W#0k_%6IlQl!{tGlEc_GUflvy?19TzawN9X21bJ;9`bREOzu3Ru$L) z>rUGMZM|6oFoeTie-R+g#MuB0p7*#Y0;lfBbqnCr9!20$xZT6=USa%#ao)P+K7JEj z=Yd-U?q(28-&3E2QF5}~Lw3WLUtv1K{Z6Q;B}pEzK+h1)cqc9d4I6PLDXEDb21oET!5>z zB)4!x0Qa~Qu&L+a3$wq-N=C3L?E{P#St)SZLf}&3Ud+IgI2KWIBgSPw-}A{3I>b&( z02?3Afa4o2e@kXqL5+%VSG(HPKU!7l)>Wl${GTP2>PFkvAJlC!v$hFEpd(7mOi%@Z zh3f8-M835wM z?=}ELabf~Ox2vT$1FdGicn%gF-l3YiR}9wXEiN(qe~e9zJ}@3qLkIki_CEE#z~L)~ zS~4rGuV;W6(557|X$cF!Yv3u-x)h_i0dUd%KV41-=xw7{8xDhK4!VD!)G`&Mc9JLd zI?|)`=>aIUn9pS`e*wYCwA?cZ`$|dtBT{*lNfe>^9>G9(L-I-OBl zcMhoV8CdxUDAQ#?MV{iXz<1%rR^h?Yvn7FoOL-e;FXw)Vc>4JRfjT29E6ynD&_md^Vs6Jn}btxcv(RUd%b~Tyqz{ z2`-DkH3GMD2xjl8OZ*@{+Uz0w{>!g0o8x|`R5aqa2pEvf;Lmv{@^OR{e|A+E(}sLV z8u-|OnB%iZ6afYv0L2`Wu{w*+H(PMvEj(?CxhYbWOy%YZe+H(2x!V?GEY%_?oz+fg zWxuDkFx7Y={9;aw=Ho<8?%E@sF6H-9oYy2xlM#Sgsq(YPOWy6Ra1gbS`kV}h6c^ws zsmKi+5x_pI1Wf8U_`>Wi(~1#HN<)CjGOYxTI|!Uh+>0J~5=A12uf(JZ2pyM^VDlkjNSU<1D_o7te<QV(OMK0Gt+{5^YK`UT6Rt-T%|(bco*8dbMRScxIvdhf1vyK^jLz zVy7n^N}uk5Qp?3cHi{PzoGg=jDq&YCiJ$nid;vhYr$69ODIr%XiR02J@{Xq8G9bY_ zjCx&aa+1m21q7A}X`GLXmmHGY9XIP{<_#i$THdNbEgRq43A(%CM;ZY2{{Rr;N2Qa% zAt(a!-u{6GIHeAF@?PELvn1p!n$BWTqwbK(?AlvhrZgG*gWbb+eZH;#yM6&ca^DcG SZq$PS0000pyLz%cmu`0!w0kT5V%P*^Z9Fq2ql00000001gnt9$?e00Cl4M?{!*(FQ&M00Q|* zL_t(|ob8q|Z`wc<$Il3N>HxOr)DFJGv{JHgFGN&XqF^~4&yY(8SlSYkxk}>Bv`W82 z*M5YG=@_b1p72-bcj-HmRKh;fwXJwU47?xre|K2?j*wmL>hCPCso$#m7UK<4>sA8} zK$lQxR01vxx{=Fzd71&MF+S}wmxI)4h9nCPVg?)l1TJPsve@BU$g67utdlkY+J3VJ zU<3z)GC-WEa}O|hKH#DZoVXv?5x{2yiol~_GsEv+V*3T-ynVxc{3N_80yhZU&LNz= zr#=b7&k)RcI}UJ!(_nU87}M1w_8AQWOd$67JQhWO z;TC{mA3I}p9$#!maNtcmZHj$cWGbD?%@r){0`~ouAY-W(Vd<=Dk)yv)U16*7LIlM= zu^Nw4Ik{_%c(#<^OYOWSS(c6f)Jm0qi@fCB{t5?C3u*3?;gI42T%{F#3r7TSk17G1 zdLBM7d&{h11e?+bV6x0Afs-}@7ZUek2A;&R2$O3up%p;n`D6q=Vtal?1pYijj!(3# zm?4LnTbjGt)vo^4YHsOSsLE~XM%y;f-?>mtX4W>L1l27n%uG-PT?^ISt1>gR0UWLF zUWJ*VlbaoD2z+V)SZCm_0T=jH*~}L0ocvaI=ZYGD@In5Jo*Dq+#P99_2;;;A1a4nT zZw^|`hJRv#nlOCl{_d%)UVj=6r z3kXi8<(^5{Q%d41IV)cPQ100eI8sW;l}eMOG>W{V**6WOc!yE1OCehBJ|M76N&RA6 zyyTGF?zmZBn>UPuX?d#_bzFRIC+O~a5E}s0{{uis5SLB@hoA`HJtR*L4Zs=opeygy zT|P@f&g1DU5nI$9QK_%J)n!YYu|L>7YHjcD>i@1^B*xki#Xl>;00000NkvXXu0mjf DFOjD6 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/shinx/back.png b/graphics/pokemon/shinx/back.png index 24108fbf300a5b1d66fbd4db5da647f33cf12d9c..5d693fca8ae48ec10ee909433ba437a99939c2db 100644 GIT binary patch delta 563 zcmV-30?hr`1=$6VDhlNU6a)qrawg0Kku-~c0Eh)0NB{r<{YgYYRCt{2)WMFMFc1Jx zb8t^RBw6JH7?%$KYwuB&Zm%rV>497qeqdGpE0Ryv1HW+M5zp65cQ4wUO9b|58Xo>IBpZdX77f9HT0FeqwD`dEu%&CXwoqakU zMgaD=ab}AV;B|X^X(y0SK8uNp0W@v5ZpHs?I6h{E$@N= zuisQN?zDhX2nfKbuFN#60*WjP0Cq5c1K>rvVO%Mrn-N5bpND7Lx%oZKl80bV&psRV zeX6hz0PT`hoqwQe1!%^@;~FE`48V`wkfeLL2JYKTcCfdvC%df!NR)7Zo7@L}6KVbz zkhmx2y1oX)4&Wdjl!%AtXLEIHn{Y@-{$? zfLF$nUYne&BF60P$`pP^p$w6#Gpf4SV?KvF!^V*4TW7G=Fvc0cB9+lp$6UOV4ur0Z z50-y0mF}JJUdOP+*?2&t%L*m{*}MsEI^#DX7eMtNgK3G2eIZ5i2y_m>w?z-Sx0BKc z)K~cOwk+UArSYuTkK@Y B0>%IU delta 562 zcmV-20?qx|1=t0UDhlKX8U_ame8pYgku-~c|D^}=#Q*>S{7FPXRCt{2l(BBxFc5~R zftfnkGW-BKMh_qo*^RSNO|i+ydc6P?z$_4ncrAn@_P#|x;0d39 zn~ZOSaDIO6JPQDTCL$CQfst6?eFBJ|s0;IThL6oI09eLQ;v0_DL~cCP@8n^>8vwBX zO}I^F09rNsmu3V~qw~a|tOx3*`4~$a3;+R8RrPKFQsV%8;E2Gjktl|g3sc^O0ciCm z>!H&E4vawn9IH}~vnrtAJOI$a1OP98vK66HYE=(Fl=?b6S?BuqI7=D=Tl4OlmOsV} z+W;_KlCt#|Di;7nXt=H+(p3-m5%;2b9+rSxn`sPNcRa7l0Ho3#Pi!;y0pCQHe*vWK zjlL|`fW!efh&w5g{{2Z`T&I@mJ&06InwAQIV)!bw+E4&6asBfUTny_W$_)aowsL-k0? z5-G_E(6v3okfHzc-G6rk3Hcv?7ty-^vAP2sxKpBRS*J`mCB6g1AcRe^$;f)W02IJ1 z5Q%s#gd_I8ML^&QpPP(tgm8X-?K}$rfF>do6M>Of;C%v!pQsD-b%u}4E&y1@P~sbo z)kJPQ)bHeBzZ(Fs|4q0}W&m0>`wChMWo0uGEp0354QkFzSE;5-1(!2|#=vK66HYE=(Fl=?b6S?Buq zI7=D=Tl4OlmOsV}+W;_KlCt#|Di;7nXt=H+(p3-m5%;2b9+rSxn`sPNcRa7l0Ho3# zPi!;y0pCQHe*vWKjlL|`fW!efh&w5g{{2Z`T&c=<%FiEME z$)nHSrUOEi+6U%$RH-^gc*ikJanc^Z=66(I;Rf)j394J|n-DWVcAo=diL*VBEWHP` z4uI#G2i4h0DFozqczl~DaHCSVEAqO3Spc*J3NvQBRi?nd9e)6@5$-$!1*=T}0000< KMNUMnLSTXg8Y6%J literal 0 HcmV?d00001 diff --git a/graphics/pokemon/staraptor/anim_frontf.png b/graphics/pokemon/staraptor/anim_frontf.png new file mode 100644 index 0000000000000000000000000000000000000000..9bfd99e8074d2ae20738890cd21d318e8ff39f29 GIT binary patch literal 1290 zcmV+l1@-!gP)Px#Fi=cXMVQc_FeoT+U|0|k5Ku@!s5mI-SU^B9IFN9FXjoXdu&D6p=x|Ud_^4RG zcsKw60CVl1Hvj+xh)G02RA_S3($b0`1;8g#TF!b8|E5I=J=LkZ0rAGh~LI}|k2ms@* z_l_t=X8^E%-1X#QOp`5uqA#7JcjzqvFhJ!|TAE%2u*+F*dY8k9SulS@82EFZmo<;jXXm{Qz>g9w zXlv#+c`E^W@0Vqs*FvxZ_;G@KehA@m$0hQh%yX{ISHclN?lvr+_f|t_p2x&+594Y9 z8iERVUOeUHpjSYhP#7V_GNx;S0=$laBgVD_0)A9~9fIHcRzM*{;_xE_FpBFn>hrXv zuW%fC#|H@Br6|9#VRRRxfZlI|pDF+YaH0$Wgn&ta{qAC&QZBmk{x*PaP*|ubB?fxP zh-2VXTulV>Dnlm9LlWQUK#+mdY(%>_^QX7KgeYsJneDKg60?3s%sDrfSnL)mqtBLXlWXBuj&3HJx0(`SP5AV2!uC5BY+v} zO7&v4t3^L=m&X2QPC4`%w-LZ!@i-=|DG|qvgQ}= zvrZn|AfkoV84vKiIyrFT{ZO%Kwns_dVfD z|6?;iUK9E+0j~d!u&=D% z0R-0jVxs&c+}SD;!4v|Qr(&Y~DE(2X+*RJgIN+E(hQKBY0O@R^P^sOo^D^*ZA`}xv ztH(VEBCY*zGfRv23l3Ow<3C7^!*Y76-La#|AcsK!yZ_*%cK5-T;{C=wnE2l`9*v+P zBOj36c$-EPD|j%^<1)7nhLoT#K-2<3@F@nlxT(FX|4>FRS8RdQ+B1|AE^zI7kpc$zJ$+LFH2y;c zT-WZCc3iSIod8ezYCyD8D4#44cxN{t-U|2n$L(||KQg@_#d_Z0H()AWU5oKH~;_u07*qoM6N<$g2Gx} ACjbBd literal 0 HcmV?d00001 diff --git a/graphics/pokemon/staravia/anim_frontf.png b/graphics/pokemon/staravia/anim_frontf.png new file mode 100644 index 0000000000000000000000000000000000000000..1d4359a4d2d483e2ed5876fa50d52644eb99f28f GIT binary patch literal 1012 zcmVdC{3`JcMi$VSW-#e06jMG&C;mn(<$y7U? zdk~8SSI60b~!tt)YbDm9?gC zeU~}le}S8<&%&!ks1p5wo)u65D=#-GfbIb2n6RcV0my9o0x6uFCHj^0R081n)+tBr zd;rV?;6H=9XPAJR7@W%tQ2l%n7=RR1A4vMIdIhY6fRvFO69Nm#QI%&+&r1mwGrFr$ zuFY`Bj06^%^-9Qn=#^kQqj;`+=%TgiZw!~6tc#{8gT6CZkFv508{n%^$|@w@gxRc? zJ)IDmb1*9e2)BJ0LW`hP$lxf z2c7MVEqVN?0M!4ihx9dQ{bb)oU%-d@x4rFcM@evxYSv>ty2APn|jrRu>ELz7SRqkFFaKH0LCAVNT#tO?Q`Py%2Fhf;!Aux|no z^G&7X0<9V$gew0v!$|^#>fY79^AkJAVm{RXPBN_K@a&Wj#J-DnybSz2#aDon`6~XI zh6;j|5GK3240G`Rcff*kX(0^$e<(pn{1ZkAA$NVRAk+Zn=UgT9smnN&AePGg^*(SF z5O64AEFHAjxSPyMNm)@vR>; i#_iKvKX}`JZvOy_LN4Nyv}nix0000b}$2t^CXn#BMA!DSH=T9Vqz^r185q0>6K zM;9cJ`}OsQ0suafBO=hg9yPWJq+Vo{yEDqfd;#J^^w@wy<1(BuMoa26#8$0V=^-U^amA!Az)nCxG9ElLdg){Sp8N z@c>r$bp+I)a;D}P9RTWFPHq??rY5SVdYo>6Aq6FbCNu(3>}wd3;J-V)dguVu&!qt% z84rNyLG;+i&r|JRF z`qB5ivk(DP|6gU03dgG%qeyIU8LK|rM8p~^qd`Ty0FNPrm=UY9`gpfo9loMqwVe;44 z>X3xHZ-d?B>GeBrAW%6&*7=pdtH04N3Gref>532jar=*7i*LNo5;pML(^mih002ov JPDHLkV1nj}8}9%B literal 0 HcmV?d00001 diff --git a/graphics/pokemon/starly/anim_frontf.png b/graphics/pokemon/starly/anim_frontf.png new file mode 100644 index 0000000000000000000000000000000000000000..f604a83871d3ab863c24895ee805abd2c435e9ce GIT binary patch literal 993 zcmV<710MW|P)U|<*+Ah@uo z`1ttX*wA=L81R5NuvjRVfPipVSa4uqkYH#40037(y%GQb00Cl4M??UK1szBL00RX{ zL_t(|ob8r7Z`&{s$0@=?#*j+VL5oQ_endb3g-%ewOO*%ObW2^kb6(7lsR0@fT?)f6 zqKrWYdkr$A*=hypz%SIPpP@%7ZGnoE$3EZ#tmXgr-BBdV(uIzBdww@Hg!cZ{JH;t{DG!Sbcu~sZq8fNf8#-;PVYw@1 zM@ng}!9hHLN84toR;8o|OVH>%+J0s*)at{`5SB~w$Y6-#QJ212l5a_c84cUx@#ui} zdV9oQhi3AttdBpEUa$9#5V`?NDgSQpMgQeZPbVO>dYm_4!Ixj}yn+8i@I#S1nwXOX zl7*V^w&CD8kxwWgj08$e7V+jB8uW=EhW&EV3@0kt0^M{uoUrvp%F{$_5isO+gs5meoU~e^39rIS9U_U+eV$J%Ez)b6#HW|%bT=Q+t?`~~|MtphwVP!Wqyu~c|h?nO^qidTEI}X3f z)s@wdx$Hg8Vix~rSg!T2aQ*_chec?|fcCY51lbqL4sOImF}Se{%q>cRH#Bn#3{h7z zx1dG@U;4HlAhf{%-qIeRzpDobs9^vv<^XO9k7F=!19&lcI+XiW291U#VFE9AZ@Za+ zmc)ik^1I4EUFetcpR406~ zZ9o!R9S=Gg*@Kj3{W6N}beq$J_=bL6ko P00000NkvXXu0mjfsQj?o literal 0 HcmV?d00001 diff --git a/graphics/pokemon/starly/backf.png b/graphics/pokemon/starly/backf.png new file mode 100644 index 0000000000000000000000000000000000000000..c65bf27b0e449bbf7648534112cdbd8f8039df47 GIT binary patch literal 699 zcmV;s0!00ZP)P(`N#mP}-c7Xxv!bSY3UbAT2EG8KJ; zqD%V*LB^3*LiXyJ#ScSkYyQccy<)6R2m2HgRX+7lpTcR*i+ z`+(ec1%%z=7(@sMU3UN|CA&rqKq#f!g;tv~ZNi&n;L^185eO;iTn@~qW`v;;g&V0JorO4buhIYvMd<1Lt} zGh;q0o+OWmNXADDu++n=45+u6z;y1u(=rGh00O8r;(5kOD^}s9`4|CD{?aP6PIiGh zTP__q1x*7c?i|;we8*@5&;^jdRSkI3e^{mj+?MFcR#0uy{fy_!i!3240+qMugFnB3 z39fYxR--ClW7@6*@GM5PAF@y3oN}W=@G4;OF}VG$i^n{w0WZ~?>4TO4=3!o$;Pn8; h=4H`v{!;(F{sF?juo`56%3%Ni002ovPDHLkV1h;TB#r<8 literal 0 HcmV?d00001 diff --git a/include/graphics.h b/include/graphics.h index 8d28bef550..67f07a1b17 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -434,13 +434,19 @@ extern const u32 gMonFrontPic_Piplup[]; extern const u32 gMonFrontPic_Prinplup[]; extern const u32 gMonFrontPic_Empoleon[]; extern const u32 gMonFrontPic_Starly[]; +extern const u32 gMonFrontPic_StarlyF[]; extern const u32 gMonFrontPic_Staravia[]; +extern const u32 gMonFrontPic_StaraviaF[]; extern const u32 gMonFrontPic_Staraptor[]; +extern const u32 gMonFrontPic_StaraptorF[]; extern const u32 gMonFrontPic_Bidoof[]; +extern const u32 gMonFrontPic_BidoofF[]; extern const u32 gMonFrontPic_Bibarel[]; extern const u32 gMonFrontPic_Kricketot[]; +extern const u32 gMonFrontPic_KricketotF[]; extern const u32 gMonFrontPic_Kricketune[]; extern const u32 gMonFrontPic_Shinx[]; +extern const u32 gMonFrontPic_ShinxF[]; extern const u32 gMonFrontPic_Luxio[]; extern const u32 gMonFrontPic_Luxray[]; extern const u32 gMonFrontPic_Budew[]; @@ -1580,13 +1586,18 @@ extern const u32 gMonBackPic_Piplup[]; extern const u32 gMonBackPic_Prinplup[]; extern const u32 gMonBackPic_Empoleon[]; extern const u32 gMonBackPic_Starly[]; +extern const u32 gMonBackPic_StarlyF[]; extern const u32 gMonBackPic_Staravia[]; +extern const u32 gMonBackPic_StaraviaF[]; extern const u32 gMonBackPic_Staraptor[]; extern const u32 gMonBackPic_Bidoof[]; +extern const u32 gMonBackPic_BidoofF[]; extern const u32 gMonBackPic_Bibarel[]; extern const u32 gMonBackPic_Kricketot[]; +extern const u32 gMonBackPic_KricketotF[]; extern const u32 gMonBackPic_Kricketune[]; extern const u32 gMonBackPic_Shinx[]; +extern const u32 gMonBackPic_ShinxF[]; extern const u32 gMonBackPic_Luxio[]; extern const u32 gMonBackPic_Luxray[]; extern const u32 gMonBackPic_Budew[]; diff --git a/src/data.c b/src/data.c index e551ddcce6..586f1e63bd 100644 --- a/src/data.c +++ b/src/data.c @@ -305,6 +305,12 @@ const union AnimCmd *const gAnims_MonPic[] = const bool8 SpeciesHasGenderDifference[NUM_SPECIES] = { [SPECIES_EEVEE] = TRUE, + [SPECIES_STARLY] = TRUE, + [SPECIES_STARAVIA] = TRUE, + [SPECIES_STARAPTOR] = TRUE, + [SPECIES_BIDOOF] = TRUE, + [SPECIES_KRICKETOT] = TRUE, + [SPECIES_SHINX] = TRUE, [SPECIES_COMBEE] = TRUE, [SPECIES_HIPPOPOTAS] = TRUE, [SPECIES_HIPPOWDON] = TRUE, diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index 7d29936ebe..c698e3a786 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -397,13 +397,19 @@ const u32 gMonFrontPic_Piplup[] = INCBIN_U32("graphics/pokemon/piplup/anim_front const u32 gMonFrontPic_Prinplup[] = INCBIN_U32("graphics/pokemon/prinplup/anim_front.4bpp.lz"); const u32 gMonFrontPic_Empoleon[] = INCBIN_U32("graphics/pokemon/empoleon/anim_front.4bpp.lz"); const u32 gMonFrontPic_Starly[] = INCBIN_U32("graphics/pokemon/starly/anim_front.4bpp.lz"); +const u32 gMonFrontPic_StarlyF[] = INCBIN_U32("graphics/pokemon/starly/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Staravia[] = INCBIN_U32("graphics/pokemon/staravia/anim_front.4bpp.lz"); +const u32 gMonFrontPic_StaraviaF[] = INCBIN_U32("graphics/pokemon/staravia/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Staraptor[] = INCBIN_U32("graphics/pokemon/staraptor/anim_front.4bpp.lz"); +const u32 gMonFrontPic_StaraptorF[] = INCBIN_U32("graphics/pokemon/staraptor/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Bidoof[] = INCBIN_U32("graphics/pokemon/bidoof/anim_front.4bpp.lz"); +const u32 gMonFrontPic_BidoofF[] = INCBIN_U32("graphics/pokemon/bidoof/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Bibarel[] = INCBIN_U32("graphics/pokemon/bibarel/anim_front.4bpp.lz"); const u32 gMonFrontPic_Kricketot[] = INCBIN_U32("graphics/pokemon/kricketot/anim_front.4bpp.lz"); +const u32 gMonFrontPic_KricketotF[] = INCBIN_U32("graphics/pokemon/kricketot/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Kricketune[] = INCBIN_U32("graphics/pokemon/kricketune/anim_front.4bpp.lz"); const u32 gMonFrontPic_Shinx[] = INCBIN_U32("graphics/pokemon/shinx/anim_front.4bpp.lz"); +const u32 gMonFrontPic_ShinxF[] = INCBIN_U32("graphics/pokemon/shinx/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Luxio[] = INCBIN_U32("graphics/pokemon/luxio/anim_front.4bpp.lz"); const u32 gMonFrontPic_Luxray[] = INCBIN_U32("graphics/pokemon/luxray/anim_front.4bpp.lz"); const u32 gMonFrontPic_Budew[] = INCBIN_U32("graphics/pokemon/budew/anim_front.4bpp.lz"); @@ -1543,13 +1549,18 @@ const u32 gMonBackPic_Piplup[] = INCBIN_U32("graphics/pokemon/piplup/back.4bpp.l const u32 gMonBackPic_Prinplup[] = INCBIN_U32("graphics/pokemon/prinplup/back.4bpp.lz"); const u32 gMonBackPic_Empoleon[] = INCBIN_U32("graphics/pokemon/empoleon/back.4bpp.lz"); const u32 gMonBackPic_Starly[] = INCBIN_U32("graphics/pokemon/starly/back.4bpp.lz"); +const u32 gMonBackPic_StarlyF[] = INCBIN_U32("graphics/pokemon/starly/backf.4bpp.lz"); const u32 gMonBackPic_Staravia[] = INCBIN_U32("graphics/pokemon/staravia/back.4bpp.lz"); +const u32 gMonBackPic_StaraviaF[] = INCBIN_U32("graphics/pokemon/staravia/back.4bpp.lz"); const u32 gMonBackPic_Staraptor[] = INCBIN_U32("graphics/pokemon/staraptor/back.4bpp.lz"); const u32 gMonBackPic_Bidoof[] = INCBIN_U32("graphics/pokemon/bidoof/back.4bpp.lz"); +const u32 gMonBackPic_BidoofF[] = INCBIN_U32("graphics/pokemon/bidoof/backf.4bpp.lz"); const u32 gMonBackPic_Bibarel[] = INCBIN_U32("graphics/pokemon/bibarel/back.4bpp.lz"); const u32 gMonBackPic_Kricketot[] = INCBIN_U32("graphics/pokemon/kricketot/back.4bpp.lz"); +const u32 gMonBackPic_KricketotF[] = INCBIN_U32("graphics/pokemon/kricketot/backf.4bpp.lz"); const u32 gMonBackPic_Kricketune[] = INCBIN_U32("graphics/pokemon/kricketune/back.4bpp.lz"); const u32 gMonBackPic_Shinx[] = INCBIN_U32("graphics/pokemon/shinx/back.4bpp.lz"); +const u32 gMonBackPic_ShinxF[] = INCBIN_U32("graphics/pokemon/shinx/backf.4bpp.lz"); const u32 gMonBackPic_Luxio[] = INCBIN_U32("graphics/pokemon/luxio/back.4bpp.lz"); const u32 gMonBackPic_Luxray[] = INCBIN_U32("graphics/pokemon/luxray/back.4bpp.lz"); const u32 gMonBackPic_Budew[] = INCBIN_U32("graphics/pokemon/budew/back.4bpp.lz"); diff --git a/src/data/pokemon_graphics/back_pic_table.h b/src/data/pokemon_graphics/back_pic_table.h index 9d108ce836..1e6e2839d1 100644 --- a/src/data/pokemon_graphics/back_pic_table.h +++ b/src/data/pokemon_graphics/back_pic_table.h @@ -1278,6 +1278,12 @@ const struct CompressedSpriteSheet gMonBackPicTable[] = const struct CompressedSpriteSheet gMonBackPicTableFemale[] = { SPECIES_SPRITE(EEVEE, gMonBackPic_EeveeF), + SPECIES_SPRITE(STARLY, gMonBackPic_StarlyF), + SPECIES_SPRITE(STARAVIA, gMonBackPic_StaraviaF), + SPECIES_SPRITE(STARAPTOR, gMonBackPic_Staraptor), + SPECIES_SPRITE(BIDOOF, gMonBackPic_BidoofF), + SPECIES_SPRITE(KRICKETOT, gMonBackPic_KricketotF), + SPECIES_SPRITE(SHINX, gMonBackPic_ShinxF), SPECIES_SPRITE(COMBEE, gMonBackPic_Combee), SPECIES_SPRITE(HIPPOPOTAS, gMonBackPic_HippopotasF), SPECIES_SPRITE(HIPPOWDON, gMonBackPic_HippowdonF), diff --git a/src/data/pokemon_graphics/front_pic_table.h b/src/data/pokemon_graphics/front_pic_table.h index 788afc7447..c925f0a86d 100644 --- a/src/data/pokemon_graphics/front_pic_table.h +++ b/src/data/pokemon_graphics/front_pic_table.h @@ -1278,6 +1278,12 @@ const struct CompressedSpriteSheet gMonFrontPicTable[] = const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = { SPECIES_SPRITE(EEVEE, gMonFrontPic_EeveeF), + SPECIES_SPRITE(STARLY, gMonFrontPic_StarlyF), + SPECIES_SPRITE(STARAVIA, gMonFrontPic_StaraviaF), + SPECIES_SPRITE(STARAPTOR, gMonFrontPic_StaraptorF), + SPECIES_SPRITE(BIDOOF, gMonFrontPic_BidoofF), + SPECIES_SPRITE(KRICKETOT, gMonFrontPic_KricketotF), + SPECIES_SPRITE(SHINX, gMonFrontPic_ShinxF), SPECIES_SPRITE(COMBEE, gMonFrontPic_CombeeF), SPECIES_SPRITE(HIPPOPOTAS, gMonFrontPic_HippopotasF), SPECIES_SPRITE(HIPPOWDON, gMonFrontPic_Hippowdon), diff --git a/src/data/pokemon_graphics/palette_table.h b/src/data/pokemon_graphics/palette_table.h index cc8717e905..d07a58487f 100644 --- a/src/data/pokemon_graphics/palette_table.h +++ b/src/data/pokemon_graphics/palette_table.h @@ -1279,6 +1279,12 @@ const struct CompressedSpritePalette gMonPaletteTableFemale[] = { SPECIES_PAL(EEVEE, gMonPalette_Eevee), SPECIES_PAL(COMBEE, gMonPalette_Combee), + SPECIES_PAL(STARLY, gMonPalette_Starly), + SPECIES_PAL(STARAVIA, gMonPalette_Staravia), + SPECIES_PAL(STARAPTOR, gMonPalette_Staraptor), + SPECIES_PAL(BIDOOF, gMonPalette_Bidoof), + SPECIES_PAL(KRICKETOT, gMonPalette_Kricketot), + SPECIES_PAL(SHINX, gMonPalette_Shinx), SPECIES_PAL(HIPPOPOTAS, gMonPalette_HippopotasF), SPECIES_PAL(HIPPOWDON, gMonPalette_HippowdonF), SPECIES_PAL(UNFEZANT, gMonPalette_UnfezantF), diff --git a/src/data/pokemon_graphics/shiny_palette_table.h b/src/data/pokemon_graphics/shiny_palette_table.h index b8324bdd5f..341aecbabc 100644 --- a/src/data/pokemon_graphics/shiny_palette_table.h +++ b/src/data/pokemon_graphics/shiny_palette_table.h @@ -1278,6 +1278,12 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] = const struct CompressedSpritePalette gMonShinyPaletteTableFemale[] = { SPECIES_SHINY_PAL(EEVEE, gMonShinyPalette_Eevee), + SPECIES_SHINY_PAL(STARLY, gMonShinyPalette_Starly), + SPECIES_SHINY_PAL(STARAVIA, gMonShinyPalette_Staravia), + SPECIES_SHINY_PAL(STARAPTOR, gMonShinyPalette_Staraptor), + SPECIES_SHINY_PAL(BIDOOF, gMonShinyPalette_Bidoof), + SPECIES_SHINY_PAL(KRICKETOT, gMonShinyPalette_Kricketot), + SPECIES_SHINY_PAL(SHINX, gMonShinyPalette_Shinx), SPECIES_SHINY_PAL(COMBEE, gMonShinyPalette_Combee), SPECIES_SHINY_PAL(HIPPOPOTAS, gMonShinyPalette_HippopotasF), SPECIES_SHINY_PAL(HIPPOWDON, gMonShinyPalette_HippowdonF), diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 2a872a9e45..9cda049ce6 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1240,6 +1240,12 @@ const u8 *const gMonIconTable[] = const u8 *const gMonIconTableFemale[] = { [SPECIES_EEVEE] = gMonIcon_Eevee, + [SPECIES_STARLY] = gMonIcon_Starly, + [SPECIES_STARAVIA] = gMonIcon_Staravia, + [SPECIES_STARAPTOR] = gMonIcon_Staraptor, + [SPECIES_BIDOOF] = gMonIcon_Bidoof, + [SPECIES_KRICKETOT] = gMonIcon_Kricketot, + [SPECIES_SHINX] = gMonIcon_Shinx, [SPECIES_COMBEE] = gMonIcon_Combee, [SPECIES_HIPPOPOTAS] = gMonIcon_Hippopotas, [SPECIES_HIPPOWDON] = gMonIcon_Hippowdon, @@ -2428,6 +2434,11 @@ const u8 gMonIconPaletteIndices[] = const u8 gMonIconPaletteIndicesFemale[] = { [SPECIES_EEVEE] = 2, + [SPECIES_STARLY] = 0, + [SPECIES_STARAVIA] = 0, + [SPECIES_BIDOOF] = 2, + [SPECIES_KRICKETOT] = 2, + [SPECIES_SHINX] = 0, [SPECIES_COMBEE] = 0, [SPECIES_HIPPOPOTAS] = 1, [SPECIES_HIPPOWDON] = 1, From b7f4658077ef0f75637708e5e4f9625f21e9bbd4 Mon Sep 17 00:00:00 2001 From: Jaizu Date: Mon, 22 Nov 2021 20:29:53 +0100 Subject: [PATCH 212/417] Added Kricketot line gender difference sprites --- graphics/pokemon/kricketune/anim_frontf.png | Bin 0 -> 1261 bytes graphics/pokemon/kricketune/backf.png | Bin 0 -> 721 bytes include/graphics.h | 2 ++ src/data.c | 1 + src/data/graphics/pokemon.h | 2 ++ src/data/pokemon_graphics/back_pic_table.h | 1 + src/data/pokemon_graphics/front_pic_table.h | 1 + src/data/pokemon_graphics/palette_table.h | 1 + src/data/pokemon_graphics/shiny_palette_table.h | 1 + src/pokemon_icon.c | 2 ++ 10 files changed, 11 insertions(+) create mode 100644 graphics/pokemon/kricketune/anim_frontf.png create mode 100644 graphics/pokemon/kricketune/backf.png diff --git a/graphics/pokemon/kricketune/anim_frontf.png b/graphics/pokemon/kricketune/anim_frontf.png new file mode 100644 index 0000000000000000000000000000000000000000..b05954ee68e758ae877d72dd19303b34343c59d4 GIT binary patch literal 1261 zcmVPx#Fi=cXMVQc_U?33aSU{jSC=d`3C@3&EKtTBT_*htIm^c{l(1>U#5V)9Ncwi_1 z0000000-p}Pyhe~Ye_^wRA_1AJV(&CGhWEHlQ=tMjv%WD1NQO( z8!3dc3$Um&0_;6_J=_^1`(_qnLiQhfI|)A=s})U5A_Hzg0WJ#Qk_1YRgc$TF#n=EK zVWc4gL^=RMP#@H#7)ihrcsj63h%rC_i!bve1`-6I+crd&Sp;4d`78E9peYHY5kQ^_ z3$OQe6~Y350DU67mLMC5aR9`SAM5&H`4BOm$ZkS{I1O{~Y%i8U8}x@DQ%I5N1pp`6 zVWr?Rd9gTe``sSu0a1~H+xbH3-Xpvp&#T`7km&%(DN3KeKgTi!a0|%W;5DJfLNd*= zZm{3T_s^UWn#f7;nJk-k0+0X|W(a-ch5yC={(Bcdh&!EUfd1#Qk;NV%MLaqtknX-> z+}Hyk``|?Cp#Ur)4pIYXMI7JRR0ZfRSc-iDGz5Pjp%GyAi@Pt20hT?14ir>?Ju3hl z2DQ(CjFPs74>3s!|e-Ib>6Ow>Epp|fPBpLP^PMaAloCr%i zmrwvgusg-<0f-t@BT!YsF~A!*N91eH}P(Ygw@@+WbFb$Bf_?rQ3iWsKtlYy3P;m`!n05 zLg#taOMt%)pzeR%O<_#vBOe@4(@rTM$E9-zAjqL+3VaoS;xkLI-wX+D@@LD&37OER zDMbUQZ3jv^Y`uzO&HCqSrxfdut)EzhO$llezidmzKY zn-!4lwepp;%KHkKm;>h-Xz~6~!h8pWYc>MF`gm9gT_!o6gRNz1Jcxa?Y}x# zPp;mz>`3kEsf$|6{|Nh3{)@3PCUf4y@;?Ne%BigTto#pQ?v_3)|CtAEsJ(!${AV+t znZi@~&&>IL@H0+q%75LC^>PtZ99Mm9`OmHygfqH~30?Wmskdw=e5!Qbm;YX;aZvuh z5HMN(p98+-e*rY*|2tomssD3eyxu>!)ovNR4e$lPx#Fi=cXMVQc_csLOFxIoBwC=d`3I4CG+P(b+j_=s>&s7L_#*qDeo0JxAyh-e4^ z0000008BPo_5c6^Pf0{UR9J=8m)UZ|FbGA10oVWk#buFXv|4UoT0LYYp4_7g!k~OU ze|Z7G@ASuU+=%xyI&@K%W2Ef?AP@)xZBy?KTtsL9+$TVii|+&w0`3FMF-j1SbAYBf*9A?zD~96Q|_56~+?K>M<_bumD{GA^;x&b+ton zKw^132SBKgumK2R31|$odLhu70M+Z-84&yztpLsYJ_4KsOF-2x#sHcF+J-X(oHRd3 zXd6~f0I@JlLf`R57H|b*F%8GVaA?S> zr95~?lm+63A4JwP9k`KiMV4;XEzI{+$x zJrn>QXNS1Wh)3-mRP;SydDjpPs|n^DK}FE_(Jmk7gy0i^O_%i{3F1BhW)>8{A0x0~ z?9-;LZmxp|_4+isZKM$-01ZJL$fqJ8srBMQR-$VILhux@odu^*4zH)`=F#g7z^MxS zFcaZEx+MUDz5qDNeQ2)?xV}W-7Mhte1bEuB{*J&1VQkI-R)i4r5fBEq-8V)6GXTYQ z1&DrtRuBP+Fv}q{23kO|FiSyW;4=VR1+Wpp z5Rm@_%m7iJ?l`@LRT)))SqzI8Ayje6YI6=Nz`tGJDlZsPSM=@o00000NkvXXu0mjf DT9zaO literal 0 HcmV?d00001 diff --git a/include/graphics.h b/include/graphics.h index 67f07a1b17..4029f69c2d 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -445,6 +445,7 @@ extern const u32 gMonFrontPic_Bibarel[]; extern const u32 gMonFrontPic_Kricketot[]; extern const u32 gMonFrontPic_KricketotF[]; extern const u32 gMonFrontPic_Kricketune[]; +extern const u32 gMonFrontPic_KricketuneF[]; extern const u32 gMonFrontPic_Shinx[]; extern const u32 gMonFrontPic_ShinxF[]; extern const u32 gMonFrontPic_Luxio[]; @@ -1596,6 +1597,7 @@ extern const u32 gMonBackPic_Bibarel[]; extern const u32 gMonBackPic_Kricketot[]; extern const u32 gMonBackPic_KricketotF[]; extern const u32 gMonBackPic_Kricketune[]; +extern const u32 gMonBackPic_KricketuneF[]; extern const u32 gMonBackPic_Shinx[]; extern const u32 gMonBackPic_ShinxF[]; extern const u32 gMonBackPic_Luxio[]; diff --git a/src/data.c b/src/data.c index 586f1e63bd..2ece62412f 100644 --- a/src/data.c +++ b/src/data.c @@ -310,6 +310,7 @@ const bool8 SpeciesHasGenderDifference[NUM_SPECIES] = [SPECIES_STARAPTOR] = TRUE, [SPECIES_BIDOOF] = TRUE, [SPECIES_KRICKETOT] = TRUE, + [SPECIES_KRICKETUNE] = TRUE, [SPECIES_SHINX] = TRUE, [SPECIES_COMBEE] = TRUE, [SPECIES_HIPPOPOTAS] = TRUE, diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index c698e3a786..6a9ea85ee7 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -408,6 +408,7 @@ const u32 gMonFrontPic_Bibarel[] = INCBIN_U32("graphics/pokemon/bibarel/anim_fro const u32 gMonFrontPic_Kricketot[] = INCBIN_U32("graphics/pokemon/kricketot/anim_front.4bpp.lz"); const u32 gMonFrontPic_KricketotF[] = INCBIN_U32("graphics/pokemon/kricketot/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Kricketune[] = INCBIN_U32("graphics/pokemon/kricketune/anim_front.4bpp.lz"); +const u32 gMonFrontPic_KricketuneF[] = INCBIN_U32("graphics/pokemon/kricketune/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Shinx[] = INCBIN_U32("graphics/pokemon/shinx/anim_front.4bpp.lz"); const u32 gMonFrontPic_ShinxF[] = INCBIN_U32("graphics/pokemon/shinx/anim_frontf.4bpp.lz"); const u32 gMonFrontPic_Luxio[] = INCBIN_U32("graphics/pokemon/luxio/anim_front.4bpp.lz"); @@ -1559,6 +1560,7 @@ const u32 gMonBackPic_Bibarel[] = INCBIN_U32("graphics/pokemon/bibarel/back.4bpp const u32 gMonBackPic_Kricketot[] = INCBIN_U32("graphics/pokemon/kricketot/back.4bpp.lz"); const u32 gMonBackPic_KricketotF[] = INCBIN_U32("graphics/pokemon/kricketot/backf.4bpp.lz"); const u32 gMonBackPic_Kricketune[] = INCBIN_U32("graphics/pokemon/kricketune/back.4bpp.lz"); +const u32 gMonBackPic_KricketuneF[] = INCBIN_U32("graphics/pokemon/kricketune/backf.4bpp.lz"); const u32 gMonBackPic_Shinx[] = INCBIN_U32("graphics/pokemon/shinx/back.4bpp.lz"); const u32 gMonBackPic_ShinxF[] = INCBIN_U32("graphics/pokemon/shinx/backf.4bpp.lz"); const u32 gMonBackPic_Luxio[] = INCBIN_U32("graphics/pokemon/luxio/back.4bpp.lz"); diff --git a/src/data/pokemon_graphics/back_pic_table.h b/src/data/pokemon_graphics/back_pic_table.h index 1e6e2839d1..80f7aab3b3 100644 --- a/src/data/pokemon_graphics/back_pic_table.h +++ b/src/data/pokemon_graphics/back_pic_table.h @@ -1283,6 +1283,7 @@ const struct CompressedSpriteSheet gMonBackPicTableFemale[] = SPECIES_SPRITE(STARAPTOR, gMonBackPic_Staraptor), SPECIES_SPRITE(BIDOOF, gMonBackPic_BidoofF), SPECIES_SPRITE(KRICKETOT, gMonBackPic_KricketotF), + SPECIES_SPRITE(KRICKETUNE, gMonBackPic_KricketuneF), SPECIES_SPRITE(SHINX, gMonBackPic_ShinxF), SPECIES_SPRITE(COMBEE, gMonBackPic_Combee), SPECIES_SPRITE(HIPPOPOTAS, gMonBackPic_HippopotasF), diff --git a/src/data/pokemon_graphics/front_pic_table.h b/src/data/pokemon_graphics/front_pic_table.h index c925f0a86d..7640dc23e4 100644 --- a/src/data/pokemon_graphics/front_pic_table.h +++ b/src/data/pokemon_graphics/front_pic_table.h @@ -1283,6 +1283,7 @@ const struct CompressedSpriteSheet gMonFrontPicTableFemale[] = SPECIES_SPRITE(STARAPTOR, gMonFrontPic_StaraptorF), SPECIES_SPRITE(BIDOOF, gMonFrontPic_BidoofF), SPECIES_SPRITE(KRICKETOT, gMonFrontPic_KricketotF), + SPECIES_SPRITE(KRICKETUNE, gMonFrontPic_KricketuneF), SPECIES_SPRITE(SHINX, gMonFrontPic_ShinxF), SPECIES_SPRITE(COMBEE, gMonFrontPic_CombeeF), SPECIES_SPRITE(HIPPOPOTAS, gMonFrontPic_HippopotasF), diff --git a/src/data/pokemon_graphics/palette_table.h b/src/data/pokemon_graphics/palette_table.h index d07a58487f..3de4107007 100644 --- a/src/data/pokemon_graphics/palette_table.h +++ b/src/data/pokemon_graphics/palette_table.h @@ -1284,6 +1284,7 @@ const struct CompressedSpritePalette gMonPaletteTableFemale[] = SPECIES_PAL(STARAPTOR, gMonPalette_Staraptor), SPECIES_PAL(BIDOOF, gMonPalette_Bidoof), SPECIES_PAL(KRICKETOT, gMonPalette_Kricketot), + SPECIES_PAL(KRICKETUNE, gMonPalette_Kricketune), SPECIES_PAL(SHINX, gMonPalette_Shinx), SPECIES_PAL(HIPPOPOTAS, gMonPalette_HippopotasF), SPECIES_PAL(HIPPOWDON, gMonPalette_HippowdonF), diff --git a/src/data/pokemon_graphics/shiny_palette_table.h b/src/data/pokemon_graphics/shiny_palette_table.h index 341aecbabc..aa7c4153e7 100644 --- a/src/data/pokemon_graphics/shiny_palette_table.h +++ b/src/data/pokemon_graphics/shiny_palette_table.h @@ -1283,6 +1283,7 @@ const struct CompressedSpritePalette gMonShinyPaletteTableFemale[] = SPECIES_SHINY_PAL(STARAPTOR, gMonShinyPalette_Staraptor), SPECIES_SHINY_PAL(BIDOOF, gMonShinyPalette_Bidoof), SPECIES_SHINY_PAL(KRICKETOT, gMonShinyPalette_Kricketot), + SPECIES_SHINY_PAL(KRICKETUNE, gMonShinyPalette_Kricketune), SPECIES_SHINY_PAL(SHINX, gMonShinyPalette_Shinx), SPECIES_SHINY_PAL(COMBEE, gMonShinyPalette_Combee), SPECIES_SHINY_PAL(HIPPOPOTAS, gMonShinyPalette_HippopotasF), diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 9cda049ce6..8c9167159f 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1245,6 +1245,7 @@ const u8 *const gMonIconTableFemale[] = [SPECIES_STARAPTOR] = gMonIcon_Staraptor, [SPECIES_BIDOOF] = gMonIcon_Bidoof, [SPECIES_KRICKETOT] = gMonIcon_Kricketot, + [SPECIES_KRICKETUNE] = gMonIcon_Kricketune, [SPECIES_SHINX] = gMonIcon_Shinx, [SPECIES_COMBEE] = gMonIcon_Combee, [SPECIES_HIPPOPOTAS] = gMonIcon_Hippopotas, @@ -2438,6 +2439,7 @@ const u8 gMonIconPaletteIndicesFemale[] = [SPECIES_STARAVIA] = 0, [SPECIES_BIDOOF] = 2, [SPECIES_KRICKETOT] = 2, + [SPECIES_KRICKETUNE] = 2, [SPECIES_SHINX] = 0, [SPECIES_COMBEE] = 0, [SPECIES_HIPPOPOTAS] = 1, From fa995894b76f4264df48dfa58f425cf12e8a9e7c Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 27 Nov 2021 20:46:19 -0300 Subject: [PATCH 213/417] Added Nature evolution methods --- include/constants/pokemon.h | 2 ++ src/data/pokemon/evolution.h | 4 +-- src/pokemon.c | 50 ++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 9572745175..bfe461c2f1 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -346,6 +346,8 @@ #define EVO_LEVEL_DARK_TYPE_MON_IN_PARTY 30 // Pokémon reaches the specified level with a Dark Type Pokémon in party #define EVO_TRADE_SPECIFIC_MON 31 // Pokémon is traded for a specified Pokémon #define EVO_SPECIFIC_MAP 32 // Pokémon levels up on specified map +#define EVO_LEVEL_NATURE_AMPED 33 // Pokémon reaches the specified level, it has a Hardy, Brave, Adamant, Naughty, Docile, Impish, Lax, Hasty, Jolly, Naive, Rash, Sassy, or Quirky nature. +#define EVO_LEVEL_NATURE_LOW_KEY 34 // Pokémon reaches the specified level, it has a Lonely, Bold, Relaxed, Timid, Serious, Modest, Mild, Quiet, Bashful, Calm, Gentle, or Careful nature. #define EVOS_PER_MON 10 diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index bc7cce52c3..b431b88a3b 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -471,8 +471,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = {EVO_ITEM, ITEM_NONE, SPECIES_APPLETUN}}, [SPECIES_SILICOBRA] = {{EVO_LEVEL, 36, SPECIES_SANDACONDA}}, [SPECIES_ARROKUDA] = {{EVO_LEVEL, 26, SPECIES_BARRASKEWDA}}, - [SPECIES_TOXEL] = {{EVO_LEVEL, 30, SPECIES_TOXTRICITY}, - {EVO_LEVEL, 30, SPECIES_TOXTRICITY_LOW_KEY}}, + [SPECIES_TOXEL] = {{EVO_LEVEL_NATURE_AMPED, 30, SPECIES_TOXTRICITY}, + {EVO_LEVEL_NATURE_LOW_KEY, 30, SPECIES_TOXTRICITY_LOW_KEY}}, [SPECIES_SIZZLIPEDE] = {{EVO_LEVEL, 28, SPECIES_CENTISKORCH}}, [SPECIES_CLOBBOPUS] = {{EVO_MOVE, MOVE_TAUNT, SPECIES_GRAPPLOCT}}, [SPECIES_SINISTEA] = {{EVO_ITEM, ITEM_NONE, SPECIES_POLTEAGEIST}}, diff --git a/src/pokemon.c b/src/pokemon.c index 189fccdea5..bf9e7a04d8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6529,6 +6529,56 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u if (currentMap == gEvolutionTable[species][i].param) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; + case EVO_LEVEL_NATURE_AMPED: + if (gEvolutionTable[species][i].param <= level) + { + u8 nature = GetNature(mon); + #ifdef GBA_PRINTF + mgba_printf(MGBA_LOG_DEBUG, "nat = %d", nature); + #endif + switch (nature) + { + case NATURE_HARDY: + case NATURE_BRAVE: + case NATURE_ADAMANT: + case NATURE_NAUGHTY: + case NATURE_DOCILE: + case NATURE_IMPISH: + case NATURE_LAX: + case NATURE_HASTY: + case NATURE_JOLLY: + case NATURE_NAIVE: + case NATURE_RASH: + case NATURE_SASSY: + case NATURE_QUIRKY: + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; + } + } + break; + case EVO_LEVEL_NATURE_LOW_KEY: + if (gEvolutionTable[species][i].param <= level) + { + u8 nature = GetNature(mon); + switch (nature) + { + case NATURE_LONELY: + case NATURE_BOLD: + case NATURE_RELAXED: + case NATURE_TIMID: + case NATURE_SERIOUS: + case NATURE_MODEST: + case NATURE_MILD: + case NATURE_QUIET: + case NATURE_BASHFUL: + case NATURE_CALM: + case NATURE_GENTLE: + case NATURE_CAREFUL: + targetSpecies = gEvolutionTable[species][i].targetSpecies; + break; + } + } + break; } } break; From b6430098d4f97d37ec994e8483d97be09f8ea9bc Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Sun, 28 Nov 2021 11:35:01 +0800 Subject: [PATCH 214/417] Rename speed parameter to distance in jump functions --- src/event_object_movement.c | 56 ++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index d92569d328..ba13a7a1d9 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -45,7 +45,6 @@ enum { #define sTypeFuncId data[1] // Index into corresponding gMovementTypeFuncs_* table #define sActionFuncId data[2] // Index into corresponding gMovementActionFuncs_* table #define sDirection data[3] -#define sSpeed data[4] #define movement_type_def(setup, table) \ @@ -5386,7 +5385,7 @@ enum { JUMP_TYPE_NORMAL, }; -static void InitJump(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction, u8 speed, u8 type) +static void InitJump(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction, u8 distance, u8 type) { s16 displacements[ARRAY_COUNT(sJumpInitDisplacements)]; s16 x; @@ -5396,22 +5395,24 @@ static void InitJump(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 x = 0; y = 0; SetObjectEventDirection(objectEvent, direction); - MoveCoordsInDirection(direction, &x, &y, displacements[speed], displacements[speed]); + MoveCoordsInDirection(direction, &x, &y, displacements[distance], displacements[distance]); ShiftObjectEventCoords(objectEvent, objectEvent->currentCoords.x + x, objectEvent->currentCoords.y + y); - SetJumpSpriteData(sprite, direction, speed, type); + SetJumpSpriteData(sprite, direction, distance, type); sprite->sActionFuncId = 1; sprite->animPaused = FALSE; objectEvent->triggerGroundEffectsOnMove = TRUE; objectEvent->disableCoveringGroundEffects = TRUE; } -static void InitJumpRegular(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction, u8 speed, u8 type) +static void InitJumpRegular(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction, u8 distance, u8 type) { - InitJump(objectEvent, sprite, direction, speed, type); + InitJump(objectEvent, sprite, direction, distance, type); SetStepAnimHandleAlternation(objectEvent, sprite, GetMoveDirectionAnimNum(objectEvent->facingDirection)); DoShadowFieldEffect(objectEvent); } +#define sDistance data[4] + static u8 UpdateJumpAnim(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 callback(struct Sprite *)) { s16 displacements[ARRAY_COUNT(sJumpDisplacements)]; @@ -5421,11 +5422,11 @@ static u8 UpdateJumpAnim(struct ObjectEvent *objectEvent, struct Sprite *sprite, memcpy(displacements, sJumpDisplacements, sizeof sJumpDisplacements); result = callback(sprite); - if (result == JUMP_HALFWAY && displacements[sprite->sSpeed] != 0) + if (result == JUMP_HALFWAY && displacements[sprite->sDistance] != 0) { x = 0; y = 0; - MoveCoordsInDirection(objectEvent->movementDirection, &x, &y, displacements[sprite->sSpeed], displacements[sprite->sSpeed]); + MoveCoordsInDirection(objectEvent->movementDirection, &x, &y, displacements[sprite->sDistance], displacements[sprite->sDistance]); ShiftObjectEventCoords(objectEvent, objectEvent->currentCoords.x + x, objectEvent->currentCoords.y + y); objectEvent->triggerGroundEffectsOnMove = TRUE; objectEvent->disableCoveringGroundEffects = TRUE; @@ -5440,6 +5441,8 @@ static u8 UpdateJumpAnim(struct ObjectEvent *objectEvent, struct Sprite *sprite, return result; } +#undef sDistance + static u8 DoJumpAnimStep(struct ObjectEvent *objectEvent, struct Sprite *sprite) { return UpdateJumpAnim(objectEvent, sprite, DoJumpSpriteMovement); @@ -6800,9 +6803,9 @@ bool8 MovementAction_Figure8_Step1(struct ObjectEvent *objectEvent, struct Sprit return FALSE; } -static void InitAcroWheelieJump(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction, u8 speed, u8 type) +static void InitAcroWheelieJump(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction, u8 distance, u8 type) { - InitJump(objectEvent, sprite, direction, speed, type); + InitJump(objectEvent, sprite, direction, distance, type); StartSpriteAnimIfDifferent(sprite, GetAcroWheelieDirectionAnimNum(direction)); DoShadowFieldEffect(objectEvent); } @@ -8166,6 +8169,7 @@ static void Step8(struct Sprite *sprite, u8 dir) sprite->y += 8 * (u16) sDirectionToVectors[dir].y; } +#define sSpeed data[4] #define sTimer data[5] static void SetSpriteDataForNormalStep(struct Sprite *sprite, u8 direction, u8 speed) @@ -8259,6 +8263,7 @@ static bool8 NpcTakeStep(struct Sprite *sprite) return TRUE; } +#undef sSpeed #undef sTimer #define sTimer data[4] @@ -8393,34 +8398,35 @@ static s16 GetJumpY(s16 i, u8 type) return sJumpYTable[type][i]; } +#define sDistance data[4] #define sJumpType data[5] #define sTimer data[6] -static void SetJumpSpriteData(struct Sprite *sprite, u8 direction, u8 speed, u8 type) +static void SetJumpSpriteData(struct Sprite *sprite, u8 direction, u8 distance, u8 type) { sprite->sDirection = direction; - sprite->sSpeed = speed; + sprite->sDistance = distance; sprite->sJumpType = type; sprite->sTimer = 0; } static u8 DoJumpSpriteMovement(struct Sprite *sprite) { - s16 speedToTime[] = {16, 16, 32}; - u8 speedToShift[] = {0, 0, 1}; + s16 distanceToTime[] = {16, 16, 32}; + u8 distanceToShift[] = {0, 0, 1}; u8 result = 0; - if (sprite->sSpeed) + if (sprite->sDistance) Step1(sprite, sprite->sDirection); - sprite->y2 = GetJumpY(sprite->sTimer >> speedToShift[sprite->sSpeed], sprite->sJumpType); + sprite->y2 = GetJumpY(sprite->sTimer >> distanceToShift[sprite->sDistance], sprite->sJumpType); sprite->sTimer++; - if (sprite->sTimer == speedToTime[sprite->sSpeed] >> 1) + if (sprite->sTimer == distanceToTime[sprite->sDistance] >> 1) result = JUMP_HALFWAY; - if (sprite->sTimer >= speedToTime[sprite->sSpeed]) + if (sprite->sTimer >= distanceToTime[sprite->sDistance]) { sprite->y2 = 0; result = JUMP_FINISHED; @@ -8431,21 +8437,21 @@ static u8 DoJumpSpriteMovement(struct Sprite *sprite) static u8 DoJumpSpecialSpriteMovement(struct Sprite *sprite) { - s16 speedToTime[] = {32, 32, 64}; - u8 speedToShift[] = {1, 1, 2}; + s16 distanceToTime[] = {32, 32, 64}; + u8 distanceToShift[] = {1, 1, 2}; u8 result = 0; - if (sprite->sSpeed && !(sprite->sTimer & 1)) + if (sprite->sDistance && !(sprite->sTimer & 1)) Step1(sprite, sprite->sDirection); - sprite->y2 = GetJumpY(sprite->sTimer >> speedToShift[sprite->sSpeed], sprite->sJumpType); + sprite->y2 = GetJumpY(sprite->sTimer >> distanceToShift[sprite->sDistance], sprite->sJumpType); sprite->sTimer++; - if (sprite->sTimer == speedToTime[sprite->sSpeed] >> 1) + if (sprite->sTimer == distanceToTime[sprite->sDistance] >> 1) result = JUMP_HALFWAY; - if (sprite->sTimer >= speedToTime[sprite->sSpeed]) + if (sprite->sTimer >= distanceToTime[sprite->sDistance]) { sprite->y2 = 0; result = JUMP_FINISHED; @@ -8454,7 +8460,7 @@ static u8 DoJumpSpecialSpriteMovement(struct Sprite *sprite) return result; } -#undef sSpeed +#undef sDistance #undef sJumpType #undef sTimer From c59c7b0518c17696b656c2fafaac297bee9077f1 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Sun, 28 Nov 2021 11:56:26 +0800 Subject: [PATCH 215/417] Use enums for jump distances --- .../movement_action_func_tables.h | 12 ++- src/event_object_movement.c | 92 ++++++++++++------- 2 files changed, 67 insertions(+), 37 deletions(-) diff --git a/src/data/object_events/movement_action_func_tables.h b/src/data/object_events/movement_action_func_tables.h index f601cf82b6..8070e98774 100755 --- a/src/data/object_events/movement_action_func_tables.h +++ b/src/data/object_events/movement_action_func_tables.h @@ -706,8 +706,16 @@ u8 (*const gMovementActionFuncs_WalkNormalRight[])(struct ObjectEvent *, struct MovementAction_PauseSpriteAnim, }; -static const s16 sJumpInitDisplacements[] = {0, 1, 1}; -static const s16 sJumpDisplacements[] = {0, 0, 1}; +static const s16 sJumpInitDisplacements[] = { + [JUMP_DISTANCE_IN_PLACE] = 0, + [JUMP_DISTANCE_NORMAL] = 1, + [JUMP_DISTANCE_FAR] = 1, +}; +static const s16 sJumpDisplacements[] = { + [JUMP_DISTANCE_IN_PLACE] = 0, + [JUMP_DISTANCE_NORMAL] = 0, + [JUMP_DISTANCE_FAR] = 1, +}; u8 (*const gMovementActionFuncs_Jump2Down[])(struct ObjectEvent *, struct Sprite *) = { MovementAction_Jump2Down_Step0, diff --git a/src/event_object_movement.c b/src/event_object_movement.c index ba13a7a1d9..2c7ceedf4c 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -40,6 +40,12 @@ enum { MOVE_SPEED_FASTEST, }; +enum { + JUMP_DISTANCE_IN_PLACE, + JUMP_DISTANCE_NORMAL, + JUMP_DISTANCE_FAR, +}; + // Sprite data used throughout #define sObjEventId data[0] #define sTypeFuncId data[1] // Index into corresponding gMovementTypeFuncs_* table @@ -5485,7 +5491,7 @@ static bool8 DoJumpInPlaceAnim(struct ObjectEvent *objectEvent, struct Sprite *s bool8 MovementAction_Jump2Down_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, JUMP_DISTANCE_FAR, JUMP_TYPE_HIGH); return MovementAction_Jump2Down_Step1(objectEvent, sprite); } @@ -5502,7 +5508,7 @@ bool8 MovementAction_Jump2Down_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_Jump2Up_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, 2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, JUMP_DISTANCE_FAR, JUMP_TYPE_HIGH); return MovementAction_Jump2Up_Step1(objectEvent, sprite); } @@ -5519,7 +5525,7 @@ bool8 MovementAction_Jump2Up_Step1(struct ObjectEvent *objectEvent, struct Sprit bool8 MovementAction_Jump2Left_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, 2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_WEST, JUMP_DISTANCE_FAR, JUMP_TYPE_HIGH); return MovementAction_Jump2Left_Step1(objectEvent, sprite); } @@ -5536,7 +5542,7 @@ bool8 MovementAction_Jump2Left_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_Jump2Right_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, 2, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_EAST, JUMP_DISTANCE_FAR, JUMP_TYPE_HIGH); return MovementAction_Jump2Right_Step1(objectEvent, sprite); } @@ -6067,7 +6073,7 @@ bool8 MovementAction_WaitSpriteAnim(struct ObjectEvent *objectEvent, struct Spri static void InitJumpSpecial(struct ObjectEvent *objectEvent, struct Sprite *sprite, u8 direction) { - InitJump(objectEvent, sprite, direction, 1, JUMP_TYPE_HIGH); + InitJump(objectEvent, sprite, direction, JUMP_DISTANCE_NORMAL, JUMP_TYPE_HIGH); StartSpriteAnim(sprite, GetJumpSpecialDirectionAnimNum(direction)); } @@ -6181,7 +6187,7 @@ bool8 MovementAction_UnlockFacingDirection_Step0(struct ObjectEvent *objectEvent bool8 MovementAction_JumpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, JUMP_DISTANCE_NORMAL, JUMP_TYPE_NORMAL); return MovementAction_JumpDown_Step1(objectEvent, sprite); } @@ -6198,7 +6204,7 @@ bool8 MovementAction_JumpDown_Step1(struct ObjectEvent *objectEvent, struct Spri bool8 MovementAction_JumpUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, 1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, JUMP_DISTANCE_NORMAL, JUMP_TYPE_NORMAL); return MovementAction_JumpUp_Step1(objectEvent, sprite); } @@ -6215,7 +6221,7 @@ bool8 MovementAction_JumpUp_Step1(struct ObjectEvent *objectEvent, struct Sprite bool8 MovementAction_JumpLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, 1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_WEST, JUMP_DISTANCE_NORMAL, JUMP_TYPE_NORMAL); return MovementAction_JumpLeft_Step1(objectEvent, sprite); } @@ -6232,7 +6238,7 @@ bool8 MovementAction_JumpLeft_Step1(struct ObjectEvent *objectEvent, struct Spri bool8 MovementAction_JumpRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, 1, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_EAST, JUMP_DISTANCE_NORMAL, JUMP_TYPE_NORMAL); return MovementAction_JumpRight_Step1(objectEvent, sprite); } @@ -6249,7 +6255,7 @@ bool8 MovementAction_JumpRight_Step1(struct ObjectEvent *objectEvent, struct Spr bool8 MovementAction_JumpInPlaceDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceDown_Step1(objectEvent, sprite); } @@ -6266,7 +6272,7 @@ bool8 MovementAction_JumpInPlaceDown_Step1(struct ObjectEvent *objectEvent, stru bool8 MovementAction_JumpInPlaceUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceUp_Step1(objectEvent, sprite); } @@ -6283,7 +6289,7 @@ bool8 MovementAction_JumpInPlaceUp_Step1(struct ObjectEvent *objectEvent, struct bool8 MovementAction_JumpInPlaceLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_WEST, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceLeft_Step1(objectEvent, sprite); } @@ -6300,7 +6306,7 @@ bool8 MovementAction_JumpInPlaceLeft_Step1(struct ObjectEvent *objectEvent, stru bool8 MovementAction_JumpInPlaceRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_HIGH); + InitJumpRegular(objectEvent, sprite, DIR_EAST, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_HIGH); return MovementAction_JumpInPlaceRight_Step1(objectEvent, sprite); } @@ -6317,7 +6323,7 @@ bool8 MovementAction_JumpInPlaceRight_Step1(struct ObjectEvent *objectEvent, str bool8 MovementAction_JumpInPlaceDownUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_SOUTH, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceDownUp_Step1(objectEvent, sprite); } @@ -6334,7 +6340,7 @@ bool8 MovementAction_JumpInPlaceDownUp_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_JumpInPlaceUpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_NORTH, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceUpDown_Step1(objectEvent, sprite); } @@ -6351,7 +6357,7 @@ bool8 MovementAction_JumpInPlaceUpDown_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_JumpInPlaceLeftRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_WEST, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceLeftRight_Step1(objectEvent, sprite); } @@ -6368,7 +6374,7 @@ bool8 MovementAction_JumpInPlaceLeftRight_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_JumpInPlaceRightLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitJumpRegular(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_NORMAL); + InitJumpRegular(objectEvent, sprite, DIR_EAST, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_NORMAL); return MovementAction_JumpInPlaceRightLeft_Step1(objectEvent, sprite); } @@ -6812,7 +6818,7 @@ static void InitAcroWheelieJump(struct ObjectEvent *objectEvent, struct Sprite * bool8 MovementAction_AcroWheelieHopFaceDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 0, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceDown_Step1(objectEvent, sprite); } @@ -6829,7 +6835,7 @@ bool8 MovementAction_AcroWheelieHopFaceDown_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroWheelieHopFaceUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 0, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceUp_Step1(objectEvent, sprite); } @@ -6846,7 +6852,7 @@ bool8 MovementAction_AcroWheelieHopFaceUp_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieHopFaceLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 0, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceLeft_Step1(objectEvent, sprite); } @@ -6863,7 +6869,7 @@ bool8 MovementAction_AcroWheelieHopFaceLeft_Step1(struct ObjectEvent *objectEven bool8 MovementAction_AcroWheelieHopFaceRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 0, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, JUMP_DISTANCE_IN_PLACE, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopFaceRight_Step1(objectEvent, sprite); } @@ -6880,7 +6886,7 @@ bool8 MovementAction_AcroWheelieHopFaceRight_Step1(struct ObjectEvent *objectEve bool8 MovementAction_AcroWheelieHopDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, JUMP_DISTANCE_NORMAL, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopDown_Step1(objectEvent, sprite); } @@ -6897,7 +6903,7 @@ bool8 MovementAction_AcroWheelieHopDown_Step1(struct ObjectEvent *objectEvent, s bool8 MovementAction_AcroWheelieHopUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, JUMP_DISTANCE_NORMAL, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopUp_Step1(objectEvent, sprite); } @@ -6914,7 +6920,7 @@ bool8 MovementAction_AcroWheelieHopUp_Step1(struct ObjectEvent *objectEvent, str bool8 MovementAction_AcroWheelieHopLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, JUMP_DISTANCE_NORMAL, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopLeft_Step1(objectEvent, sprite); } @@ -6931,7 +6937,7 @@ bool8 MovementAction_AcroWheelieHopLeft_Step1(struct ObjectEvent *objectEvent, s bool8 MovementAction_AcroWheelieHopRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 1, JUMP_TYPE_LOW); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, JUMP_DISTANCE_NORMAL, JUMP_TYPE_LOW); return MovementAction_AcroWheelieHopRight_Step1(objectEvent, sprite); } @@ -6948,7 +6954,7 @@ bool8 MovementAction_AcroWheelieHopRight_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, 2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_SOUTH, JUMP_DISTANCE_FAR, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpDown_Step1(objectEvent, sprite); } @@ -6965,7 +6971,7 @@ bool8 MovementAction_AcroWheelieJumpDown_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, 2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_NORTH, JUMP_DISTANCE_FAR, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpUp_Step1(objectEvent, sprite); } @@ -6982,7 +6988,7 @@ bool8 MovementAction_AcroWheelieJumpUp_Step1(struct ObjectEvent *objectEvent, st bool8 MovementAction_AcroWheelieJumpLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, 2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_WEST, JUMP_DISTANCE_FAR, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpLeft_Step1(objectEvent, sprite); } @@ -6999,7 +7005,7 @@ bool8 MovementAction_AcroWheelieJumpLeft_Step1(struct ObjectEvent *objectEvent, bool8 MovementAction_AcroWheelieJumpRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite) { - InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, 2, JUMP_TYPE_HIGH); + InitAcroWheelieJump(objectEvent, sprite, DIR_EAST, JUMP_DISTANCE_FAR, JUMP_TYPE_HIGH); return MovementAction_AcroWheelieJumpRight_Step1(objectEvent, sprite); } @@ -8412,11 +8418,19 @@ static void SetJumpSpriteData(struct Sprite *sprite, u8 direction, u8 distance, static u8 DoJumpSpriteMovement(struct Sprite *sprite) { - s16 distanceToTime[] = {16, 16, 32}; - u8 distanceToShift[] = {0, 0, 1}; + s16 distanceToTime[] = { + [JUMP_DISTANCE_IN_PLACE] = 16, + [JUMP_DISTANCE_NORMAL] = 16, + [JUMP_DISTANCE_FAR] = 32, + }; + u8 distanceToShift[] = { + [JUMP_DISTANCE_IN_PLACE] = 0, + [JUMP_DISTANCE_NORMAL] = 0, + [JUMP_DISTANCE_FAR] = 1, + }; u8 result = 0; - if (sprite->sDistance) + if (sprite->sDistance != JUMP_DISTANCE_IN_PLACE) Step1(sprite, sprite->sDirection); sprite->y2 = GetJumpY(sprite->sTimer >> distanceToShift[sprite->sDistance], sprite->sJumpType); @@ -8437,11 +8451,19 @@ static u8 DoJumpSpriteMovement(struct Sprite *sprite) static u8 DoJumpSpecialSpriteMovement(struct Sprite *sprite) { - s16 distanceToTime[] = {32, 32, 64}; - u8 distanceToShift[] = {1, 1, 2}; + s16 distanceToTime[] = { + [JUMP_DISTANCE_IN_PLACE] = 32, + [JUMP_DISTANCE_NORMAL] = 32, + [JUMP_DISTANCE_FAR] = 64, + }; + u8 distanceToShift[] = { + [JUMP_DISTANCE_IN_PLACE] = 1, + [JUMP_DISTANCE_NORMAL] = 1, + [JUMP_DISTANCE_FAR] = 2, + }; u8 result = 0; - if (sprite->sDistance && !(sprite->sTimer & 1)) + if (sprite->sDistance != JUMP_DISTANCE_IN_PLACE && !(sprite->sTimer & 1)) Step1(sprite, sprite->sDirection); sprite->y2 = GetJumpY(sprite->sTimer >> distanceToShift[sprite->sDistance], sprite->sJumpType); From b042eb6436dbc04acd58272d6069516c09ece581 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 28 Nov 2021 01:22:27 -0300 Subject: [PATCH 216/417] gBattleTerrainTable -> sBattleTerrainTable --- src/battle_bg.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/battle_bg.c b/src/battle_bg.c index 0e4370485c..f739a002f6 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -598,7 +598,7 @@ const struct WindowTemplate * const gBattleWindowTemplates[] = [B_WIN_TYPE_ARENA] = gBattleArenaWindowTemplates, }; -static const struct BattleBackground gBattleTerrainTable[] = +static const struct BattleBackground sBattleTerrainTable[] = { [BATTLE_TERRAIN_GRASS] = { @@ -807,9 +807,9 @@ void DrawMainBattleBackground(void) { default: case MAP_BATTLE_SCENE_NORMAL: - LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2))); - LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26))); - LoadCompressedPalette(gBattleTerrainTable[gBattleTerrain].palette, 0x20, 0x60); + LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(sBattleTerrainTable[gBattleTerrain].palette, 0x20, 0x60); break; case MAP_BATTLE_SCENE_GYM: LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2))); @@ -1194,8 +1194,8 @@ void DrawBattleEntryBackground(void) if (GetCurrentMapBattleScene() == MAP_BATTLE_SCENE_NORMAL) { - LZDecompressVram(gBattleTerrainTable[gBattleTerrain].entryTileset, (void*)(BG_CHAR_ADDR(1))); - LZDecompressVram(gBattleTerrainTable[gBattleTerrain].entryTilemap, (void*)(BG_SCREEN_ADDR(28))); + LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTileset, (void*)(BG_CHAR_ADDR(1))); + LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTilemap, (void*)(BG_SCREEN_ADDR(28))); } else { @@ -1251,7 +1251,7 @@ bool8 LoadChosenBattleElement(u8 caseId) { default: case MAP_BATTLE_SCENE_NORMAL: - LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2))); break; case MAP_BATTLE_SCENE_GYM: LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2))); @@ -1313,7 +1313,7 @@ bool8 LoadChosenBattleElement(u8 caseId) { default: case MAP_BATTLE_SCENE_NORMAL: - LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26))); + LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26))); break; case MAP_BATTLE_SCENE_GYM: LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26))); @@ -1375,7 +1375,7 @@ bool8 LoadChosenBattleElement(u8 caseId) { default: case MAP_BATTLE_SCENE_NORMAL: - LoadCompressedPalette(gBattleTerrainTable[gBattleTerrain].palette, 0x20, 0x60); + LoadCompressedPalette(sBattleTerrainTable[gBattleTerrain].palette, 0x20, 0x60); break; case MAP_BATTLE_SCENE_GYM: LoadCompressedPalette(gBattleTerrainPalette_BuildingGym, 0x20, 0x60); From b6b74b16566461fc4c0b5eb919f423af579fcf7b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 28 Nov 2021 11:39:08 -0300 Subject: [PATCH 217/417] Oops Update src/pokemon.c Co-authored-by: LOuroboros --- src/pokemon.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index bf9e7a04d8..c3d7c19f2e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6533,9 +6533,6 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u if (gEvolutionTable[species][i].param <= level) { u8 nature = GetNature(mon); - #ifdef GBA_PRINTF - mgba_printf(MGBA_LOG_DEBUG, "nat = %d", nature); - #endif switch (nature) { case NATURE_HARDY: From 83be1bfc8fc071e26d2a3f8191a9c7ecc7161dce Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 29 Nov 2021 11:19:30 -0500 Subject: [PATCH 218/417] Remove sFiller from malloc.c --- gflib/malloc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gflib/malloc.c b/gflib/malloc.c index 38fc8939e4..d0b9497635 100644 --- a/gflib/malloc.c +++ b/gflib/malloc.c @@ -2,7 +2,6 @@ static void *sHeapStart; static u32 sHeapSize; -static u32 sFiller; // needed to align dma3_manager.o(.bss) #define MALLOC_SYSTEM_ID 0xA3A3 From 1a08d8fcb4bb2aaa1dd36a5f751bb31519545a4b Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 29 Nov 2021 12:56:03 -0500 Subject: [PATCH 219/417] Add BUGFIX for roamer's status --- src/roamer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/roamer.c b/src/roamer.c index 4811ac3b22..c17ec490c8 100644 --- a/src/roamer.c +++ b/src/roamer.c @@ -193,10 +193,18 @@ bool8 IsRoamerAt(u8 mapGroup, u8 mapNum) void CreateRoamerMonInstance(void) { + u32 status; struct Pokemon *mon = &gEnemyParty[0]; ZeroEnemyPartyMons(); CreateMonWithIVsPersonality(mon, ROAMER->species, ROAMER->level, ROAMER->ivs, ROAMER->personality); +// The roamer's status field is u8, but SetMonData expects status to be u32, so will set the roamer's status +// using the status field and the following 3 bytes (cool, beauty, and cute). +#ifdef BUGFIX + status = ROAMER->status; + SetMonData(mon, MON_DATA_STATUS, &status); +#else SetMonData(mon, MON_DATA_STATUS, &ROAMER->status); +#endif SetMonData(mon, MON_DATA_HP, &ROAMER->hp); SetMonData(mon, MON_DATA_COOL, &ROAMER->cool); SetMonData(mon, MON_DATA_BEAUTY, &ROAMER->beauty); From 6c520659aa9c1570a27e36979ca348976f20d1b6 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Mon, 29 Nov 2021 22:52:08 +0100 Subject: [PATCH 220/417] implemented a inital pokemon debug menu based on code from Gamer2020 and AsparagusEduardo --- include/pokemon_debug.h | 9 + include/reset_rtc_screen.h | 3 + ld_script.txt | 2 + src/field_control_avatar.c | 24 ++ src/pokemon_debug.c | 633 +++++++++++++++++++++++++++++++++++++ src/reset_rtc_screen.c | 4 +- 6 files changed, 673 insertions(+), 2 deletions(-) create mode 100644 include/pokemon_debug.h create mode 100644 src/pokemon_debug.c diff --git a/include/pokemon_debug.h b/include/pokemon_debug.h new file mode 100644 index 0000000000..a1aae5e153 --- /dev/null +++ b/include/pokemon_debug.h @@ -0,0 +1,9 @@ +#ifndef GUARD_POKEMON_DEBUG_H +#define GUARD_POKEMON_DEBUG_H + +#define POKEMON_DEBUG + +void CB2_Debug_Pokemon(void); + + +#endif // GUARD_POKEMON_DEBUG_H \ No newline at end of file diff --git a/include/reset_rtc_screen.h b/include/reset_rtc_screen.h index 5807dec992..f8904063b7 100644 --- a/include/reset_rtc_screen.h +++ b/include/reset_rtc_screen.h @@ -1,6 +1,9 @@ #ifndef GUARD_RESET_RTC_SCREEN_H #define GUARD_RESET_RTC_SCREEN_H +extern const struct SpritePalette sSpritePalette_Arrow; +extern const struct SpriteTemplate sSpriteTemplate_Arrow; + void CB2_InitResetRtcScreen(void); #endif // GUARD_RESET_RTC_SCREEN_H diff --git a/ld_script.txt b/ld_script.txt index 886bd8f0ff..bfba214eb4 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -327,6 +327,7 @@ SECTIONS { src/gym_leader_rematch.o(.text); src/battle_transition_frontier.o(.text); src/international_string_util.o(.text); + src/pokemon_debug.o(.text); } =0 script_data : @@ -685,6 +686,7 @@ SECTIONS { data/mystery_event.o(.rodata); src/m4a_tables.o(.rodata); data/sound_data.o(.rodata); + src/pokemon_debug.o(.rodata); } =0 song_data : diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 6ec280fd0d..66065681fc 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -20,6 +20,7 @@ #include "metatile_behavior.h" #include "overworld.h" #include "pokemon.h" +#include "pokemon_debug.h" #include "safari_zone.h" #include "script.h" #include "secret_base.h" @@ -130,6 +131,14 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys) input->dpadDirection = DIR_WEST; else if (heldKeys & DPAD_RIGHT) input->dpadDirection = DIR_EAST; + + #ifdef POKEMON_DEBUG + if ((heldKeys & R_BUTTON) && input->pressedStartButton) + { + input->input_field_1_2 = TRUE; + input->pressedStartButton = FALSE; + } + #endif } int ProcessPlayerFieldInput(struct FieldInput *input) @@ -189,6 +198,21 @@ int ProcessPlayerFieldInput(struct FieldInput *input) if (input->pressedSelectButton && UseRegisteredKeyItemOnField() == TRUE) return TRUE; + + #ifdef POKEMON_DEBUG + if (input->input_field_1_2) + { + //PlaySE(SE_WIN_OPEN); + //Debug_ShowMainMenu(); + + //PlayRainStoppingSoundEffect(); + CleanupOverworldWindowsAndTilemaps(); + SetMainCallback2(CB2_Debug_Pokemon); + + return TRUE; + } + #endif + return FALSE; } diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c new file mode 100644 index 0000000000..3d3213034a --- /dev/null +++ b/src/pokemon_debug.c @@ -0,0 +1,633 @@ +//Credits: Gamer2020, AsparagusEduardo +#include "global.h" +#include "battle.h" +#include "bg.h" +#include "constants/rgb.h" +#include "constants/songs.h" +#include "data.h" +#include "decompress.h" +#include "field_weather.h" +#include "gpu_regs.h" +#include "item.h" +#include "item_icon.h" +#include "list_menu.h" +#include "m4a.h" +#include "main.h" +#include "malloc.h" +#include "menu.h" +#include "overworld.h" +#include "palette.h" +#include "pokemon_animation.h" +#include "pokemon_debug.h" +#include "pokemon_icon.h" +#include "reset_rtc_screen.h" +#include "scanline_effect.h" +#include "script.h" +#include "script_pokemon_util.h" +#include "sound.h" +#include "string_util.h" +#include "strings.h" +#include "task.h" +#include "trainer_pokemon_sprites.h" + +#include "constants/items.h" + +//Defines +#define DEBUG_MON_X 140 +#define DEBUG_MON_Y 14 +#define DEBUG_MON_BACK_X 32 +#define DEBUG_MON_BACK_Y 50 +#define DEBUG_ICON_X 148 +#define DEBUG_ICON_Y 90 +#define DEBUG_MON_SHINY 0 +#define DEBUG_MON_NORMAL 9 + +#define MODIFY_DIGITS_MAX 4 +#define MODIFY_DIGITS_ARROW_X 22 +#define MODIFY_DIGITS_ARROW1_Y 12 +#define MODIFY_DIGITS_ARROW2_Y 36 + +static const u16 sBgColor[] = {RGB_WHITE}; + +//Structs +struct PokemonDebugModifyArrows +{ + u8 arrowSpriteId[2]; + u16 minValue; + u16 maxValue; + int currValue; + u8 currentDigit; + u8 maxDigits; + u8 charDigits[MODIFY_DIGITS_MAX]; + void *modifiedValPtr; + u8 typeOfVal; +}; + +struct PokemonDebugMenu +{ + u16 currentmonId; + u8 currentmonWindowId; + u8 InstructionsWindowId; + u8 frontspriteId; + u8 backspriteId; + u8 iconspriteId; + u8 isshiny; + struct PokemonDebugModifyArrows modifyArrows; + u8 modifyWindowId; +}; + +//WindowTemplates +static const struct WindowTemplate sCurrentTitleTemplate = +{ + .bg = 0, + .tilemapLeft =1, + .tilemapTop = 0, + .width = 14, + .height = 2, + .paletteNum = 0xF, + .baseBlock = 0x200 +}; + +static const struct WindowTemplate sDebugPokemonInstructionsTemplate = +{ + .bg = 0, + .tilemapLeft =1, + .tilemapTop = 207, + .width = 14, + .height = 8, + .paletteNum = 0xF, + .baseBlock = 0x300 +}; + +static const struct WindowTemplate sModifyWindowTemplate = +{ + .bg = 0, + .tilemapLeft = 2, + .tilemapTop = 2, + .width = 14, + .height = 2, + .paletteNum = 0xF, + .baseBlock = 0x200 +}; + +//Function declarations +static void PrintDigitChars(struct PokemonDebugMenu *data); +static void SetUpModifyArrows(struct PokemonDebugMenu *data); +static void UpdateBattlerValue(struct PokemonDebugMenu *data); +static void ValueToCharDigits(u8 *charDigits, u32 newValue, u8 maxDigits); +static bool32 TryMoveDigit(struct PokemonDebugModifyArrows *modArrows, bool32 moveUp); +static void CB2_Debug_Runner(void); +static void ResetBGs_Debug_Menu(u16); +static void Handle_Input_Debug_Pokemon(u8); +static void ReloadPokemonSprites(struct PokemonDebugMenu *data); +static void Exit_Debug_Pokemon(u8); + +static struct PokemonDebugMenu *GetStructPtr(u8 taskId) +{ + u8 *taskDataPtr = (u8*)(&gTasks[taskId].data[0]); + + return (struct PokemonDebugMenu*)(T1_READ_PTR(taskDataPtr)); +} + +//Text handling functions +static void PadString(const u8 *src, u8 *dst) +{ + u32 i; + + for (i = 0; i < 17 && src[i] != EOS; i++) + dst[i] = src[i]; + + for (; i < 17; i++) + dst[i] = CHAR_SPACE; + + dst[i] = EOS; +} + +static void PrintOnCurrentMonWindow(u8 windowId, u16 monId) +{ + u8 text[POKEMON_NAME_LENGTH + 10]; + + text[0] = CHAR_0 + monId / 100; + text[1] = CHAR_0 + (monId % 100) / 10; + text[2] = CHAR_0 + (monId % 100) % 10; + text[3] = CHAR_SPACE; + text[4] = CHAR_HYPHEN; + text[5] = CHAR_SPACE; + + StringCopy(&text[6], gSpeciesNames[monId]); + + FillWindowPixelBuffer(windowId, 0x11); + AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); + CopyWindowToVram(windowId, 3); +} + +static void PrintInstructionsOnWindow(u8 windowId) +{ + u8 text[] = _("A - Shiny START - Cry\nL - Back R - Front$"); + + FillWindowPixelBuffer(windowId, 0x11); + AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); + CopyWindowToVram(windowId, 3); +} + +static void VBlankCB(void) +{ + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); +} + +static void SetStructPtr(u8 taskId, void *ptr) +{ + u32 structPtr = (u32)(ptr); + u8 *taskDataPtr = (u8*)(&gTasks[taskId].data[0]); + + taskDataPtr[0] = structPtr >> 0; + taskDataPtr[1] = structPtr >> 8; + taskDataPtr[2] = structPtr >> 16; + taskDataPtr[3] = structPtr >> 24; +} + +//Digit and arrow functions +#define VAL_U16 0 +static void PrintDigitChars(struct PokemonDebugMenu *data) +{ + s32 i; + u8 text[MODIFY_DIGITS_MAX + POKEMON_NAME_LENGTH + 4]; + + for (i = 0; i < data->modifyArrows.maxDigits; i++) + text[i] = data->modifyArrows.charDigits[i]; + + text[i] = CHAR_SPACE; + text[i + 1] = CHAR_HYPHEN; + text[i + 2] = CHAR_SPACE; + + StringCopy(&text[i + 3], gSpeciesNames[data->modifyArrows.currValue]); + + FillWindowPixelBuffer(data->modifyWindowId, 0x11); + AddTextPrinterParameterized(data->modifyWindowId, 1, text, 3, 0, 0, NULL); +} + +static u32 CharDigitsToValue(u8 *charDigits, u8 maxDigits) +{ + s32 i; + u8 id = 0; + u32 newValue = 0; + u8 valueDigits[MODIFY_DIGITS_MAX]; + + for (i = 0; i < MODIFY_DIGITS_MAX; i++) + valueDigits[i] = charDigits[i] - CHAR_0; + + if (maxDigits >= MODIFY_DIGITS_MAX) + newValue += valueDigits[id++] * 1000; + if (maxDigits >= MODIFY_DIGITS_MAX - 1) + newValue += valueDigits[id++] * 100; + if (maxDigits >= MODIFY_DIGITS_MAX - 2) + newValue += valueDigits[id++] * 10; + if (maxDigits >= MODIFY_DIGITS_MAX - 3) + newValue += valueDigits[id++]; + + return newValue; +} + +static void ValueToCharDigits(u8 *charDigits, u32 newValue, u8 maxDigits) +{ + s32 i; + u8 valueDigits[MODIFY_DIGITS_MAX]; + u8 id = 0; + + if (maxDigits >= MODIFY_DIGITS_MAX) + valueDigits[id++] = newValue / 1000; + if (maxDigits >= MODIFY_DIGITS_MAX - 1) + valueDigits[id++] = (newValue % 1000) / 100; + if (maxDigits >= MODIFY_DIGITS_MAX - 2) + valueDigits[id++] = (newValue % 100) / 10; + if (maxDigits >= MODIFY_DIGITS_MAX - 3) + valueDigits[id++] = newValue % 10; + + for (i = 0; i < MODIFY_DIGITS_MAX; i++) + charDigits[i] = valueDigits[i] + CHAR_0; +} + +static void SetUpModifyArrows(struct PokemonDebugMenu *data) +{ + LoadSpritePalette(&sSpritePalette_Arrow); + data->modifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X, MODIFY_DIGITS_ARROW1_Y, 0); + data->modifyArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X, MODIFY_DIGITS_ARROW2_Y, 0); + gSprites[data->modifyArrows.arrowSpriteId[1]].animNum = 1; + + data->modifyArrows.minValue = 1; + data->modifyArrows.maxValue = NUM_SPECIES - 1; + data->modifyArrows.maxDigits = 4; + data->modifyArrows.modifiedValPtr = &data->currentmonId; + data->modifyArrows.typeOfVal = VAL_U16; + data->modifyArrows.currValue = data->currentmonId; + + data->modifyArrows.currentDigit = 0; + ValueToCharDigits(data->modifyArrows.charDigits, data->modifyArrows.currValue, data->modifyArrows.maxDigits); +} + +static bool32 TryMoveDigit(struct PokemonDebugModifyArrows *modArrows, bool32 moveUp) +{ + s32 i; + u8 charDigits[MODIFY_DIGITS_MAX]; + u32 newValue; + + for (i = 0; i < MODIFY_DIGITS_MAX; i++) + charDigits[i] = modArrows->charDigits[i]; + + if (moveUp) + { + if (charDigits[modArrows->currentDigit] == CHAR_9) + { + charDigits[modArrows->currentDigit] = CHAR_0; + for (i = modArrows->currentDigit - 1; i >= 0; i--) + { + if (charDigits[i] == CHAR_9) + charDigits[i] = CHAR_0; + else + { + charDigits[i]++; + break; + } + } + } + else + charDigits[modArrows->currentDigit]++; + } + else + { + if (charDigits[modArrows->currentDigit] == CHAR_0) + { + charDigits[modArrows->currentDigit] = CHAR_9; + + for (i = modArrows->currentDigit - 1; i >= 0; i--) + { + if (charDigits[i] == CHAR_0) + charDigits[i] = CHAR_9; + else + { + charDigits[i]--; + break; + } + } + } + + else + charDigits[modArrows->currentDigit]--; + } + + newValue = CharDigitsToValue(charDigits, modArrows->maxDigits); + if (newValue > modArrows->maxValue || newValue < modArrows->minValue) + { + return FALSE; + } + else + { + modArrows->currValue = newValue; + for (i = 0; i < MODIFY_DIGITS_MAX; i++) + modArrows->charDigits[i] = charDigits[i]; + return TRUE; + } +} + +static void UpdateBattlerValue(struct PokemonDebugMenu *data) +{ + u32 i; + switch (data->modifyArrows.typeOfVal) + { + case VAL_U16: + *(u16*)(data->modifyArrows.modifiedValPtr) = data->modifyArrows.currValue; + break; + } +} + +// ******************************* +// Main functions +void CB2_Debug_Pokemon(void) +{ + u8 taskId; + const struct CompressedSpritePalette *palette; + struct PokemonDebugMenu *data; + + switch (gMain.state) + { + case 0: + default: + SetVBlankCallback(NULL); + FreeMonSpritesGfx(); + ResetBGs_Debug_Menu(0); + DmaFillLarge16(3, 0, (u8 *)VRAM, VRAM_SIZE, 0x1000) + DmaClear32(3, OAM, OAM_SIZE); + DmaClear16(3, PLTT, PLTT_SIZE); + gMain.state = 1; + break; + case 1: + ScanlineEffect_Stop(); + ResetTasks(); + ResetSpriteData(); + ResetPaletteFade(); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 8; + ResetAllPicSprites(); + gMain.state++; + break; + case 2: + AllocateMonSpritesGfx(); + + LoadPalette(sBgColor, 0, 2); + LoadMonIconPalettes(); + //LoadPalette(GetOverworldTextboxPalettePtr(), 0xf0, 16); + + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); + ShowBg(0); + ShowBg(1); + + //input task handler + taskId = CreateTask(Handle_Input_Debug_Pokemon, 0); + + data = AllocZeroed(sizeof(struct PokemonDebugMenu)); + SetStructPtr(taskId, data); + + data->currentmonId = 1; + //data->currentmonWindowId = AddWindow(&sCurrentTitleTemplate); + PutWindowTilemap(data->currentmonWindowId); + PrintOnCurrentMonWindow(data->currentmonWindowId, data->currentmonId); + + data->InstructionsWindowId = AddWindow(&sDebugPokemonInstructionsTemplate); + PutWindowTilemap(data->InstructionsWindowId); + PrintInstructionsOnWindow(data->InstructionsWindowId); + + HandleLoadSpecialPokePic(&gMonFrontPicTable[data->currentmonId], gMonSpritesGfxPtr->sprites.ptr[1], data->currentmonId, 0); + data->isshiny = DEBUG_MON_NORMAL; + palette = GetMonSpritePalStructFromOtIdPersonality(data->currentmonId, 0, data->isshiny); + LoadCompressedSpritePalette(palette); + SetMultiuseSpriteTemplateToPokemon(data->currentmonId, 1); + gMultiuseSpriteTemplate.paletteTag = palette->tag; + data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X + 32, DEBUG_MON_Y + 40, 0); + gSprites[data->frontspriteId].callback = SpriteCallbackDummy; + gSprites[data->frontspriteId].oam.priority = 0; + + HandleLoadSpecialPokePic(&gMonBackPicTable[data->currentmonId], gMonSpritesGfxPtr->sprites.ptr[2], data->currentmonId, 0); + palette = GetMonSpritePalStructFromOtIdPersonality(data->currentmonId, 0, data->isshiny); + LoadCompressedSpritePalette(palette); + SetMultiuseSpriteTemplateToPokemon(data->currentmonId, 2); + gMultiuseSpriteTemplate.paletteTag = palette->tag; + data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 40, 0); + gSprites[data->backspriteId].callback = SpriteCallbackDummy; + gSprites[data->backspriteId].oam.priority = 0; + + //Icon Sprite + data->iconspriteId = CreateMonIcon(data->currentmonId, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isshiny); + gSprites[data->iconspriteId].oam.priority = 0; + + //Modify Arrows + data->modifyWindowId = AddWindow(&sModifyWindowTemplate); + PutWindowTilemap(data->modifyWindowId); + CopyWindowToVram(data->modifyWindowId, 3); + SetUpModifyArrows(data); + PrintDigitChars(data); + gMain.state++; + break; + case 3: + EnableInterrupts(1); + SetVBlankCallback(VBlankCB); + SetMainCallback2(CB2_Debug_Runner); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x80); + break; + } +} + +static void CB2_Debug_Runner(void) +{ + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} + +static void ResetBGs_Debug_Menu(u16 a) +{ + if (!(a & DISPCNT_BG0_ON)) + { + ClearGpuRegBits(0, DISPCNT_BG0_ON); + SetGpuReg(REG_OFFSET_BG0CNT, 0); + SetGpuReg(REG_OFFSET_BG0HOFS, 0); + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + } + if (!(a & DISPCNT_BG1_ON)) + { + ClearGpuRegBits(0, DISPCNT_BG1_ON); + SetGpuReg(REG_OFFSET_BG1CNT, 0); + SetGpuReg(REG_OFFSET_BG1HOFS, 0); + SetGpuReg(REG_OFFSET_BG1VOFS, 0); + } + if (!(a & DISPCNT_BG2_ON)) + { + ClearGpuRegBits(0, DISPCNT_BG2_ON); + SetGpuReg(REG_OFFSET_BG2CNT, 0); + SetGpuReg(REG_OFFSET_BG2HOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + } + if (!(a & DISPCNT_BG3_ON)) + { + ClearGpuRegBits(0, DISPCNT_BG3_ON); + SetGpuReg(REG_OFFSET_BG3CNT, 0); + SetGpuReg(REG_OFFSET_BG3HOFS, 0); + SetGpuReg(REG_OFFSET_BG3VOFS, 0); + } + if (!(a & DISPCNT_OBJ_ON)) + { + ClearGpuRegBits(0, DISPCNT_OBJ_ON); + ResetSpriteData(); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 8; + } +} + +static void Handle_Input_Debug_Pokemon(u8 taskId) +{ + struct PokemonDebugMenu *data = GetStructPtr(taskId); + struct Sprite *Frontsprite = &gSprites[data->frontspriteId]; + struct Sprite *Backsprite = &gSprites[data->backspriteId]; + + if (JOY_NEW(L_BUTTON)) + { + LaunchAnimationTaskForBackSprite(Backsprite, GetSpeciesBackAnimSet(data->currentmonId)); + } + else if (JOY_NEW(R_BUTTON)) + { + if (HasTwoFramesAnimation(data->currentmonId)) + StartSpriteAnim(Frontsprite, 1); + BattleAnimateFrontSprite(Frontsprite, data->currentmonId, TRUE, 1); + } + else if (JOY_NEW(A_BUTTON)) + { + if( data->isshiny == 9) + { + data->isshiny = DEBUG_MON_SHINY; + PlaySE(SE_SHINY); + } + else + { + data->isshiny = DEBUG_MON_NORMAL; + } + ReloadPokemonSprites(data); + + } + else if (JOY_NEW(B_BUTTON)) + { + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + gTasks[taskId].func = Exit_Debug_Pokemon; + PlaySE(SE_PC_OFF); + } + else if (JOY_NEW(START_BUTTON)) + { + PlayCryInternal(data->currentmonId, 0, 120, 10, 0); + } + else if (JOY_NEW(DPAD_DOWN)) // || gMain.heldKeys & DPAD_DOWN) + { + if (TryMoveDigit(&data->modifyArrows, FALSE)) + { + PrintDigitChars(data); + UpdateBattlerValue(data); + ReloadPokemonSprites(data); + } + + PlaySE(SE_DEX_SCROLL); + + while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); + } + else if (JOY_NEW(DPAD_UP)) // || gMain.heldKeys & DPAD_UP) + { + if (TryMoveDigit(&data->modifyArrows, TRUE)) + { + PrintDigitChars(data); + UpdateBattlerValue(data); + ReloadPokemonSprites(data); + } + + PlaySE(SE_DEX_SCROLL); + + } + else if (JOY_NEW(DPAD_LEFT)) // || gMain.heldKeys & DPAD_LEFT) + { + if (data->modifyArrows.currentDigit != 0) + { + data->modifyArrows.currentDigit--; + gSprites[data->modifyArrows.arrowSpriteId[0]].x2 -= 6; + gSprites[data->modifyArrows.arrowSpriteId[1]].x2 -= 6; + } + } + else if (JOY_NEW(DPAD_RIGHT)) // || gMain.heldKeys & DPAD_RIGHT) + { + if (data->modifyArrows.currentDigit != (data->modifyArrows.maxDigits - 1)) + { + data->modifyArrows.currentDigit++; + gSprites[data->modifyArrows.arrowSpriteId[0]].x2 += 6; + gSprites[data->modifyArrows.arrowSpriteId[1]].x2 += 6; + } + } +} + +static void ReloadPokemonSprites(struct PokemonDebugMenu *data) +{ + const struct CompressedSpritePalette *palette; + + DestroySprite(&gSprites[data->frontspriteId]); + DestroySprite(&gSprites[data->backspriteId]); + DestroySprite(&gSprites[data->iconspriteId]); + + FreeMonSpritesGfx(); + ResetSpriteData(); + ResetPaletteFade(); + FreeAllSpritePalettes(); + ResetAllPicSprites(); + AllocateMonSpritesGfx(); + + FreeAllSpritePalettes(); + FreeMonIconPalettes(); + + LoadMonIconPalettes(); + + HandleLoadSpecialPokePic(&gMonFrontPicTable[data->currentmonId], gMonSpritesGfxPtr->sprites.ptr[1], data->currentmonId, 0); + palette = GetMonSpritePalStructFromOtIdPersonality(data->currentmonId, 0, data->isshiny); + LoadCompressedSpritePalette(palette); + SetMultiuseSpriteTemplateToPokemon(data->currentmonId, 1); + gMultiuseSpriteTemplate.paletteTag = palette->tag; + data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X + 32, DEBUG_MON_Y + 40, 0); + gSprites[data->frontspriteId].callback = SpriteCallbackDummy; + gSprites[data->frontspriteId].oam.priority = 0; + + HandleLoadSpecialPokePic(&gMonBackPicTable[data->currentmonId], gMonSpritesGfxPtr->sprites.ptr[2], data->currentmonId, 0); + palette = GetMonSpritePalStructFromOtIdPersonality(data->currentmonId, 0, data->isshiny); + LoadCompressedSpritePalette(palette); + SetMultiuseSpriteTemplateToPokemon(data->currentmonId, 2); + gMultiuseSpriteTemplate.paletteTag = palette->tag; + data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 40, 0); + gSprites[data->backspriteId].callback = SpriteCallbackDummy; + gSprites[data->backspriteId].oam.priority = 0; + + //Icon Sprite + data->iconspriteId = CreateMonIcon(data->currentmonId, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isshiny); + gSprites[data->iconspriteId].oam.priority = 0; + + //Modify Arrows + LoadSpritePalette(&sSpritePalette_Arrow); + data->modifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW1_Y, 0); + data->modifyArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW2_Y, 0); + gSprites[data->modifyArrows.arrowSpriteId[1]].animNum = 1; +} + +static void Exit_Debug_Pokemon(u8 taskId) +{ + if (!gPaletteFade.active) + { + struct PokemonDebugMenu *data = GetStructPtr(taskId); + Free(data); + FreeMonSpritesGfx(); + DestroyTask(taskId); + SetMainCallback2(CB2_ReturnToField); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + } +} diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index 528a0e52d2..149e93091a 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -181,7 +181,7 @@ static const struct SpriteFrameImage sPicTable_Arrow[] = obj_frame_tiles(sArrowRight_Gfx) }; -static const struct SpritePalette sSpritePalette_Arrow = +const struct SpritePalette sSpritePalette_Arrow = { sArrow_Pal, PALTAG_ARROW }; @@ -217,7 +217,7 @@ static const union AnimCmd *const sAnims_Arrow[] = [ARROW_RIGHT] = sAnim_Arrow_Right, }; -static const struct SpriteTemplate sSpriteTemplate_Arrow = +const struct SpriteTemplate sSpriteTemplate_Arrow = { .tileTag = 0xFFFF, .paletteTag = PALTAG_ARROW, From b0f8408fb6b8689786e6045836232cc8fe63c55e Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 30 Nov 2021 02:29:33 +0100 Subject: [PATCH 221/417] added gender based sprites, added textbox line, adjusted sprite offset to match line --- include/decompress.h | 1 + src/decompress.c | 37 +++++ src/pokemon_debug.c | 333 +++++++++++++++++++++++++++++++++++++++---- 3 files changed, 340 insertions(+), 31 deletions(-) diff --git a/include/decompress.h b/include/decompress.h index 81f1425010..0d5cb3b3d3 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -21,6 +21,7 @@ void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffe void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality); void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); +void HandleLoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFemale); void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic); diff --git a/src/decompress.c b/src/decompress.c index 4d917e8d6a..f2a0884a6c 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -113,6 +113,43 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 DrawSpindaSpots(species, personality, dest, isFrontPic); } +static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic, bool8 isFemale) +{ + if (species == SPECIES_UNOWN) + { + u32 id = GetUnownSpeciesId(personality); + + if (!isFrontPic) + LZ77UnCompWram(gMonBackPicTable[id].data, dest); + else + LZ77UnCompWram(gMonFrontPicTable[id].data, dest); + } + else if (species > NUM_SPECIES) // is species unknown? draw the ? icon + LZ77UnCompWram(gMonFrontPicTable[0].data, dest); + else if (SpeciesHasGenderDifference[species] && isFemale) + { + if (isFrontPic) + LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); + else + LZ77UnCompWram(gMonBackPicTableFemale[species].data, dest); + } + else + LZ77UnCompWram(src->data, dest); + + DrawSpindaSpots(species, personality, dest, isFrontPic); +} +void HandleLoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFemale) +{ + bool8 isFrontPic; + + if (src == &gMonFrontPicTable[species]) + isFrontPic = TRUE; // frontPic + else + isFrontPic = FALSE; // backPic + + LoadSpecialPokePicCustom(src, dest, species, personality, isFrontPic, isFemale); +} + void Unused_LZDecompressWramIndirect(const void **src, void *dest) { LZ77UnCompWram(*src, dest); diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 3d3213034a..d6ca592645 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1,6 +1,7 @@ //Credits: Gamer2020, AsparagusEduardo #include "global.h" #include "battle.h" +#include "battle_anim.h" #include "bg.h" #include "constants/rgb.h" #include "constants/songs.h" @@ -47,6 +48,11 @@ #define MODIFY_DIGITS_ARROW1_Y 12 #define MODIFY_DIGITS_ARROW2_Y 36 +#define GENDER_MALE 0 +#define GENDER_FEMALE 1 +#define MON_PIC_BACK 0 +#define MON_PIC_FRONT 1 + static const u16 sBgColor[] = {RGB_WHITE}; //Structs @@ -71,12 +77,15 @@ struct PokemonDebugMenu u8 frontspriteId; u8 backspriteId; u8 iconspriteId; - u8 isshiny; + bool8 isShiny; + u8 gender; struct PokemonDebugModifyArrows modifyArrows; u8 modifyWindowId; + u8 messageBoxWindowId; }; //WindowTemplates +/* static const struct WindowTemplate sCurrentTitleTemplate = { .bg = 0, @@ -87,6 +96,7 @@ static const struct WindowTemplate sCurrentTitleTemplate = .paletteNum = 0xF, .baseBlock = 0x200 }; +*/ static const struct WindowTemplate sDebugPokemonInstructionsTemplate = { @@ -110,6 +120,17 @@ static const struct WindowTemplate sModifyWindowTemplate = .baseBlock = 0x200 }; +static const struct WindowTemplate sPokemonDebugMsgBoxWindowTemplate = +{ + .bg = 0, + .tilemapLeft = 3, + .tilemapTop = 14, + .width = 11, + .height = 1, + .paletteNum = 0, + .baseBlock = 0x100 +}; + //Function declarations static void PrintDigitChars(struct PokemonDebugMenu *data); static void SetUpModifyArrows(struct PokemonDebugMenu *data); @@ -143,6 +164,7 @@ static void PadString(const u8 *src, u8 *dst) dst[i] = EOS; } +/* static void PrintOnCurrentMonWindow(u8 windowId, u16 monId) { u8 text[POKEMON_NAME_LENGTH + 10]; @@ -160,6 +182,7 @@ static void PrintOnCurrentMonWindow(u8 windowId, u16 monId) AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); CopyWindowToVram(windowId, 3); } +*/ static void PrintInstructionsOnWindow(u8 windowId) { @@ -193,16 +216,26 @@ static void SetStructPtr(u8 taskId, void *ptr) static void PrintDigitChars(struct PokemonDebugMenu *data) { s32 i; + u16 species = data->modifyArrows.currValue; u8 text[MODIFY_DIGITS_MAX + POKEMON_NAME_LENGTH + 4]; for (i = 0; i < data->modifyArrows.maxDigits; i++) text[i] = data->modifyArrows.charDigits[i]; - text[i] = CHAR_SPACE; - text[i + 1] = CHAR_HYPHEN; - text[i + 2] = CHAR_SPACE; + text[i++] = CHAR_SPACE; + text[i++] = CHAR_HYPHEN; - StringCopy(&text[i + 3], gSpeciesNames[data->modifyArrows.currValue]); + if (SpeciesHasGenderDifference[species]) + { + if (data->gender == GENDER_MALE) + text[i++] = CHAR_MALE; + else + text[i++] = CHAR_FEMALE; + text[i++] = CHAR_HYPHEN; + } + + text[i++] = CHAR_SPACE; + StringCopy(&text[i], gSpeciesNames[species]); FillWindowPixelBuffer(data->modifyWindowId, 0x11); AddTextPrinterParameterized(data->modifyWindowId, 1, text, 3, 0, 0, NULL); @@ -342,6 +375,215 @@ static void UpdateBattlerValue(struct PokemonDebugMenu *data) } } +//Sprite functions +static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 species, u8 gender, bool8 isShiny) +{ + if (isShiny) + { + if (SpeciesHasGenderDifference[species] && gender == GENDER_FEMALE) + return &gMonShinyPaletteTableFemale[species]; + else + return &gMonShinyPaletteTable[species]; + } + else + { + if (SpeciesHasGenderDifference[species] && gender == GENDER_FEMALE) + return &gMonPaletteTableFemale[species]; + else + return &gMonPaletteTable[species]; + } +} + +/* +// One entry for each of the four Castform forms. +extern const struct MonCoords gCastformFrontSpriteCoords[]; +static const u8 sCastformElevations[] = +{ + 13, // NORMAL + 14, // SUN + 13, // RAIN + 13, // HAIL +}; +// Const rom data +static const struct UCoords8 sBattlerCoords[][4] = +{ + { + { 72, 80 }, + { 176, 40 }, + { 48, 40 }, + { 112, 80 }, + }, + { + { 32, 80 }, + { 200, 40 }, + { 90, 88 }, + { 152, 32 }, + }, +}; +static u8 GetBattlerYDeltaCustom(u8 pic_type, u16 species) +{ + u32 personality; + u8 ret; + u16 coordSpecies; + + if (pic_type == MON_PIC_BACK) + { + if (species == SPECIES_UNOWN) + { + //coordSpecies = GetUnownSpeciesId(personality); + //ret = gMonBackPicCoords[coordSpecies].y_offset; + } + else if (species == SPECIES_CASTFORM) + ret = 0; //sCastformBackSpriteYCoords[0]]; //all of them are 0??? + else if (species > NUM_SPECIES) + ret = gMonBackPicCoords[0].y_offset; + else + ret = gMonBackPicCoords[species].y_offset; + } + else + { + if (species == SPECIES_UNOWN) + { + //coordSpecies = GetUnownSpeciesId(personality); + //ret = gMonFrontPicCoords[coordSpecies].y_offset; + } + else if (species == SPECIES_CASTFORM) + ret = gCastformFrontSpriteCoords[0].y_offset; + else if (species > NUM_SPECIES) + ret = gMonFrontPicCoords[0].y_offset; + else + ret = gMonFrontPicCoords[species].y_offset; + } + return ret; +} +static u8 GetBattlerElevationCustom(u8 pic_type, u16 species) +{ + u8 ret = 0; + if (pic_type == MON_PIC_FRONT) + { + if (species == SPECIES_CASTFORM) + ret = sCastformElevations[0]; + else if (species > NUM_SPECIES) + ret = gEnemyMonElevation[0]; + else + ret = gEnemyMonElevation[species]; + } + return ret; +} +u8 GetBattlerSpriteFinal_YCustom(u8 pic_type, u16 species, bool8 a3) +{ + u16 offset; + u8 y; + + if (pic_type == MON_PIC_BACK) + offset = GetBattlerYDeltaCustom(pic_type, species); + else + { + offset = GetBattlerYDeltaCustom(pic_type, species); + offset -= GetBattlerElevationCustom(pic_type, species); + } + y = offset + sBattlerCoords[0][pic_type].y; + if (a3) + { + if (pic_type == MON_PIC_BACK) + y += 8; + if (y > 104) + y = 104; + } + return y; +} +static u8 GetBattlerSpriteCoordCustom(u16 species, u8 pic_type, u8 coordType) +{ + u8 retVal; + + switch (coordType) + { + case BATTLER_COORD_X: + case BATTLER_COORD_X_2: + retVal = sBattlerCoords[0][pic_type].x; + break; + case BATTLER_COORD_Y: + retVal = sBattlerCoords[0][pic_type].y; + break; + case BATTLER_COORD_Y_PIC_OFFSET: + retVal = GetBattlerSpriteFinal_YCustom(pic_type, species, TRUE); + break; + case BATTLER_COORD_Y_PIC_OFFSET_DEFAULT: + retVal = GetBattlerSpriteFinal_YCustom(pic_type, species, FALSE); + break; + } + + return retVal; +} +static s16 GetBattlerSpriteCoordAttrCustom(u16 species, u8 pic_type, u8 attr, bool8 transformSpecies) +{ + u32 personality; + int ret = 0; + const struct MonCoords *coords; + + + if (pic_type == MON_PIC_BACK) + { + if (!transformSpecies) + //personality = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PERSONALITY); + else + //personality = gTransformedPersonalities[battlerId]; + + if (species == SPECIES_UNOWN) + { + //species = GetUnownSpeciesId(personality); + coords = &gMonBackPicCoords[species]; + } + else if (species > NUM_SPECIES) + coords = &gMonBackPicCoords[0]; + else + coords = &gMonBackPicCoords[species]; + } + else + { + if (!transformSpecies) + //personality = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PERSONALITY); + else + //personality = gTransformedPersonalities[battlerId]; + + if (species == SPECIES_UNOWN) + { + //species = GetUnownSpeciesId(personality); + coords = &gMonFrontPicCoords[species]; + } + else if (species == SPECIES_CASTFORM) + coords = &gCastformFrontSpriteCoords[0]; + else if (species > NUM_SPECIES) + coords = &gMonFrontPicCoords[0]; + else + coords = &gMonFrontPicCoords[species]; + } + + + switch (attr) + { + case BATTLER_COORD_ATTR_HEIGHT: + return (coords->size & 0xf) * 8; + case BATTLER_COORD_ATTR_WIDTH: + return (coords->size >> 4) * 8; + case BATTLER_COORD_ATTR_LEFT: + return GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_X_2) - ((coords->size >> 4) * 4); + case BATTLER_COORD_ATTR_RIGHT: + return GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_X_2) + ((coords->size >> 4) * 4); + case BATTLER_COORD_ATTR_TOP: + return GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_Y_PIC_OFFSET) - ((coords->size & 0xf) * 4); + case BATTLER_COORD_ATTR_BOTTOM: + return GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_Y_PIC_OFFSET) + ((coords->size & 0xf) * 4); + case BATTLER_COORD_ATTR_RAW_BOTTOM: + ret = GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_Y) + 31; + return ret - coords->y_offset; + default: + return 0; + } + +} +*/ + // ******************************* // Main functions void CB2_Debug_Pokemon(void) @@ -349,6 +591,8 @@ void CB2_Debug_Pokemon(void) u8 taskId; const struct CompressedSpritePalette *palette; struct PokemonDebugMenu *data; + s16 offset_x, offset_y; + u16 species; switch (gMain.state) { @@ -390,35 +634,41 @@ void CB2_Debug_Pokemon(void) SetStructPtr(taskId, data); data->currentmonId = 1; - //data->currentmonWindowId = AddWindow(&sCurrentTitleTemplate); + species = data->currentmonId; + /* + data->currentmonWindowId = AddWindow(&sCurrentTitleTemplate); PutWindowTilemap(data->currentmonWindowId); PrintOnCurrentMonWindow(data->currentmonWindowId, data->currentmonId); + */ data->InstructionsWindowId = AddWindow(&sDebugPokemonInstructionsTemplate); PutWindowTilemap(data->InstructionsWindowId); PrintInstructionsOnWindow(data->InstructionsWindowId); - HandleLoadSpecialPokePic(&gMonFrontPicTable[data->currentmonId], gMonSpritesGfxPtr->sprites.ptr[1], data->currentmonId, 0); - data->isshiny = DEBUG_MON_NORMAL; - palette = GetMonSpritePalStructFromOtIdPersonality(data->currentmonId, 0, data->isshiny); + HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->gender); + data->isShiny = FALSE; + data->gender = GENDER_MALE; + palette = GetMonSpritePalStructCustom(species, data->gender, data->isShiny); LoadCompressedSpritePalette(palette); - SetMultiuseSpriteTemplateToPokemon(data->currentmonId, 1); + SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X + 32, DEBUG_MON_Y + 40, 0); gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; - HandleLoadSpecialPokePic(&gMonBackPicTable[data->currentmonId], gMonSpritesGfxPtr->sprites.ptr[2], data->currentmonId, 0); - palette = GetMonSpritePalStructFromOtIdPersonality(data->currentmonId, 0, data->isshiny); + HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->gender); + palette = GetMonSpritePalStructCustom(species, data->gender, data->isShiny); LoadCompressedSpritePalette(palette); - SetMultiuseSpriteTemplateToPokemon(data->currentmonId, 2); + SetMultiuseSpriteTemplateToPokemon(species, 2); gMultiuseSpriteTemplate.paletteTag = palette->tag; - data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 40, 0); + //offset_y = GetBattlerSpriteCoordAttrCustom(species, MON_PIC_BACK, BATTLER_COORD_ATTR_BOTTOM, FALSE); + offset_y = gMonBackPicCoords[species].y_offset; + data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 30 + offset_y, 0); gSprites[data->backspriteId].callback = SpriteCallbackDummy; gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIcon(data->currentmonId, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isshiny); + data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isShiny); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows @@ -427,6 +677,13 @@ void CB2_Debug_Pokemon(void) CopyWindowToVram(data->modifyWindowId, 3); SetUpModifyArrows(data); PrintDigitChars(data); + + //MessageBox line + data->messageBoxWindowId = AddWindow(&sPokemonDebugMsgBoxWindowTemplate); + PutWindowTilemap(data->messageBoxWindowId); + CopyWindowToVram(data->messageBoxWindowId, 3); + FillWindowPixelRect(data->messageBoxWindowId, PIXEL_FILL(0x1), 0, 0, 90, 4); + gMain.state++; break; case 3: @@ -503,15 +760,11 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) } else if (JOY_NEW(A_BUTTON)) { - if( data->isshiny == 9) - { - data->isshiny = DEBUG_MON_SHINY; + data->isShiny = !data->isShiny; + + if(data->isShiny) PlaySE(SE_SHINY); - } - else - { - data->isshiny = DEBUG_MON_NORMAL; - } + ReloadPokemonSprites(data); } @@ -525,10 +778,22 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) { PlayCryInternal(data->currentmonId, 0, 120, 10, 0); } + else if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifference[data->currentmonId]) + { + if (data->gender == GENDER_MALE) + data->gender = GENDER_FEMALE; + else + data->gender = GENDER_MALE; + PrintDigitChars(data); + UpdateBattlerValue(data); + ReloadPokemonSprites(data); + while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); + } else if (JOY_NEW(DPAD_DOWN)) // || gMain.heldKeys & DPAD_DOWN) { if (TryMoveDigit(&data->modifyArrows, FALSE)) { + data->gender = GENDER_MALE; PrintDigitChars(data); UpdateBattlerValue(data); ReloadPokemonSprites(data); @@ -542,6 +807,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) { if (TryMoveDigit(&data->modifyArrows, TRUE)) { + data->gender = GENDER_MALE; PrintDigitChars(data); UpdateBattlerValue(data); ReloadPokemonSprites(data); @@ -572,6 +838,9 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) static void ReloadPokemonSprites(struct PokemonDebugMenu *data) { + s16 offset_x = 0; + s16 offset_y = 0; + u16 species = data->currentmonId; const struct CompressedSpritePalette *palette; DestroySprite(&gSprites[data->frontspriteId]); @@ -590,26 +859,28 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) LoadMonIconPalettes(); - HandleLoadSpecialPokePic(&gMonFrontPicTable[data->currentmonId], gMonSpritesGfxPtr->sprites.ptr[1], data->currentmonId, 0); - palette = GetMonSpritePalStructFromOtIdPersonality(data->currentmonId, 0, data->isshiny); + HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->gender); + palette = GetMonSpritePalStructCustom(species, data->gender, data->isShiny); LoadCompressedSpritePalette(palette); - SetMultiuseSpriteTemplateToPokemon(data->currentmonId, 1); + SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X + 32, DEBUG_MON_Y + 40, 0); gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; - HandleLoadSpecialPokePic(&gMonBackPicTable[data->currentmonId], gMonSpritesGfxPtr->sprites.ptr[2], data->currentmonId, 0); - palette = GetMonSpritePalStructFromOtIdPersonality(data->currentmonId, 0, data->isshiny); + HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->gender); + palette = GetMonSpritePalStructCustom(species, data->gender, data->isShiny); LoadCompressedSpritePalette(palette); - SetMultiuseSpriteTemplateToPokemon(data->currentmonId, 2); + SetMultiuseSpriteTemplateToPokemon(species, 2); gMultiuseSpriteTemplate.paletteTag = palette->tag; - data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 40, 0); + //offset_y = GetBattlerSpriteCoordAttrCustom(species, MON_PIC_BACK, BATTLER_COORD_ATTR_BOTTOM, FALSE); + offset_y = gMonBackPicCoords[species].y_offset; + data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 30 + offset_y, 0); gSprites[data->backspriteId].callback = SpriteCallbackDummy; gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIcon(data->currentmonId, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isshiny); + data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isShiny); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows From 50e95878e9f580a92af571772f505196066e3d26 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 30 Nov 2021 11:16:30 +0100 Subject: [PATCH 222/417] added Select button text, added gender based icons, imrpoved code --- include/pokemon_icon.h | 1 + src/decompress.c | 3 ++ src/pokemon_debug.c | 67 +++++++++++++++++++++++------------------- src/pokemon_icon.c | 51 ++++++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+), 31 deletions(-) diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 3ca9b741f0..917d0545ff 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -19,6 +19,7 @@ u8 CreateMonIconNoPersonality(u16 species, void (*callback)(struct Sprite *), s1 void FreeMonIconPalette(u16 species); void FreeAndDestroyMonIconSprite(struct Sprite *sprite); u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality); +u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny); u8 UpdateMonIconFrame(struct Sprite *sprite); void LoadMonIconPalette(u16 species); void sub_80D328C(struct Sprite *sprite); diff --git a/src/decompress.c b/src/decompress.c index f2a0884a6c..722e6574a6 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -3,6 +3,7 @@ #include "data.h" #include "decompress.h" #include "pokemon.h" +#include "pokemon_debug.h" #include "text.h" EWRAM_DATA ALIGNED(4) u8 gDecompressionBuffer[0x4000] = {0}; @@ -113,6 +114,7 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 DrawSpindaSpots(species, personality, dest, isFrontPic); } +#ifdef POKEMON_DEBUG static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic, bool8 isFemale) { if (species == SPECIES_UNOWN) @@ -149,6 +151,7 @@ void HandleLoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, voi LoadSpecialPokePicCustom(src, dest, species, personality, isFrontPic, isFemale); } +#endif void Unused_LZDecompressWramIndirect(const void **src, void *dest) { diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index d6ca592645..32793b32f6 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -38,7 +38,7 @@ #define DEBUG_MON_Y 14 #define DEBUG_MON_BACK_X 32 #define DEBUG_MON_BACK_Y 50 -#define DEBUG_ICON_X 148 +#define DEBUG_ICON_X 158 #define DEBUG_ICON_Y 90 #define DEBUG_MON_SHINY 0 #define DEBUG_MON_NORMAL 9 @@ -78,7 +78,7 @@ struct PokemonDebugMenu u8 backspriteId; u8 iconspriteId; bool8 isShiny; - u8 gender; + bool8 isFemale; struct PokemonDebugModifyArrows modifyArrows; u8 modifyWindowId; u8 messageBoxWindowId; @@ -103,7 +103,7 @@ static const struct WindowTemplate sDebugPokemonInstructionsTemplate = .bg = 0, .tilemapLeft =1, .tilemapTop = 207, - .width = 14, + .width = 22, .height = 8, .paletteNum = 0xF, .baseBlock = 0x300 @@ -184,12 +184,18 @@ static void PrintOnCurrentMonWindow(u8 windowId, u16 monId) } */ -static void PrintInstructionsOnWindow(u8 windowId) +static void PrintInstructionsOnWindow(u8 windowId, struct PokemonDebugMenu *data) { - u8 text[] = _("A - Shiny START - Cry\nL - Back R - Front$"); + u8 text[] = _("A - Shiny START - Cry\nL - Back R - Front$"); + u8 textGender[] = _("A - Shiny START - Cry\nL - Back R - Front SEL - Gender$"); + u16 species = data->modifyArrows.currValue; + FillWindowPixelBuffer(windowId, 0x11); - AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); + if (SpeciesHasGenderDifference[species]) + AddTextPrinterParameterized(windowId, 1, textGender, 0, 0, 0, NULL); + else + AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); CopyWindowToVram(windowId, 3); } @@ -217,7 +223,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data) { s32 i; u16 species = data->modifyArrows.currValue; - u8 text[MODIFY_DIGITS_MAX + POKEMON_NAME_LENGTH + 4]; + u8 text[MODIFY_DIGITS_MAX + POKEMON_NAME_LENGTH + 8]; for (i = 0; i < data->modifyArrows.maxDigits; i++) text[i] = data->modifyArrows.charDigits[i]; @@ -227,10 +233,10 @@ static void PrintDigitChars(struct PokemonDebugMenu *data) if (SpeciesHasGenderDifference[species]) { - if (data->gender == GENDER_MALE) - text[i++] = CHAR_MALE; + if (data->isFemale) + text[i++] = CHAR_FEMALE; else - text[i++] = CHAR_FEMALE; + text[i++] = CHAR_MALE; text[i++] = CHAR_HYPHEN; } @@ -376,18 +382,18 @@ static void UpdateBattlerValue(struct PokemonDebugMenu *data) } //Sprite functions -static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 species, u8 gender, bool8 isShiny) +static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 species, bool8 isFemale, bool8 isShiny) { if (isShiny) { - if (SpeciesHasGenderDifference[species] && gender == GENDER_FEMALE) + if (SpeciesHasGenderDifference[species] && isFemale) return &gMonShinyPaletteTableFemale[species]; else return &gMonShinyPaletteTable[species]; } else { - if (SpeciesHasGenderDifference[species] && gender == GENDER_FEMALE) + if (SpeciesHasGenderDifference[species] && isFemale) return &gMonPaletteTableFemale[species]; else return &gMonPaletteTable[species]; @@ -643,12 +649,12 @@ void CB2_Debug_Pokemon(void) data->InstructionsWindowId = AddWindow(&sDebugPokemonInstructionsTemplate); PutWindowTilemap(data->InstructionsWindowId); - PrintInstructionsOnWindow(data->InstructionsWindowId); + PrintInstructionsOnWindow(data->InstructionsWindowId, data); - HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->gender); + HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); data->isShiny = FALSE; - data->gender = GENDER_MALE; - palette = GetMonSpritePalStructCustom(species, data->gender, data->isShiny); + data->isFemale = FALSE; + palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; @@ -656,8 +662,8 @@ void CB2_Debug_Pokemon(void) gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; - HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->gender); - palette = GetMonSpritePalStructCustom(species, data->gender, data->isShiny); + HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); + palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); SetMultiuseSpriteTemplateToPokemon(species, 2); gMultiuseSpriteTemplate.paletteTag = palette->tag; @@ -668,7 +674,7 @@ void CB2_Debug_Pokemon(void) gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isShiny); + data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isShiny, data->isFemale, data->isShiny); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows @@ -780,10 +786,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) } else if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifference[data->currentmonId]) { - if (data->gender == GENDER_MALE) - data->gender = GENDER_FEMALE; - else - data->gender = GENDER_MALE; + data->isFemale = !data->isFemale; PrintDigitChars(data); UpdateBattlerValue(data); ReloadPokemonSprites(data); @@ -793,7 +796,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) { if (TryMoveDigit(&data->modifyArrows, FALSE)) { - data->gender = GENDER_MALE; + data->isFemale = FALSE; PrintDigitChars(data); UpdateBattlerValue(data); ReloadPokemonSprites(data); @@ -807,7 +810,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) { if (TryMoveDigit(&data->modifyArrows, TRUE)) { - data->gender = GENDER_MALE; + data->isFemale = FALSE; PrintDigitChars(data); UpdateBattlerValue(data); ReloadPokemonSprites(data); @@ -859,8 +862,10 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) LoadMonIconPalettes(); - HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->gender); - palette = GetMonSpritePalStructCustom(species, data->gender, data->isShiny); + PrintInstructionsOnWindow(data->InstructionsWindowId, data); + + HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); + palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; @@ -868,8 +873,8 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; - HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->gender); - palette = GetMonSpritePalStructCustom(species, data->gender, data->isShiny); + HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); + palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); SetMultiuseSpriteTemplateToPokemon(species, 2); gMultiuseSpriteTemplate.paletteTag = palette->tag; @@ -880,7 +885,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isShiny); + data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isShiny, data->isFemale, data->isShiny); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 2a872a9e45..ad5820ba13 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -2,6 +2,7 @@ #include "graphics.h" #include "mail.h" #include "palette.h" +#include "pokemon_debug.h" #include "pokemon_icon.h" #include "sprite.h" #include "data.h" @@ -22,6 +23,10 @@ struct MonIconSpriteTemplate // static functions static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *, s16, s16, u8); +#ifdef POKEMON_DEBUG +static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale); +static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale); +#endif // .rodata @@ -2575,6 +2580,33 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u return spriteId; } +#ifdef POKEMON_DEBUG +u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny) +{ + u8 spriteId; + struct MonIconSpriteTemplate iconTemplate = + { + .oam = &sMonIconOamData, + .image = GetMonIconPtrCustom(species, personality, isFemale), + .anims = sMonIconAnims, + .affineAnims = sMonIconAffineAnims, + .callback = callback, + .paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndices[species], + }; + + if (species > NUM_SPECIES) + iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG; + else if (SpeciesHasGenderDifference[species] && isFemale) + iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; + + spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); + + UpdateMonIconFrame(&gSprites[spriteId]); + + return spriteId; +} +#endif + u8 CreateMonIconNoPersonality(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority) { u8 spriteId; @@ -2646,6 +2678,13 @@ const u8 *GetMonIconPtr(u16 species, u32 personality) return GetMonIconTiles(GetIconSpecies(species, personality), personality); } +#ifdef POKEMON_DEBUG +static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale) +{ + return GetMonIconTilesCustom(GetIconSpecies(species, personality), isFemale); +} +#endif + void FreeAndDestroyMonIconSprite(struct Sprite *sprite) { sub_80D328C(sprite); @@ -2715,6 +2754,18 @@ const u8* GetMonIconTiles(u16 species, u32 personality) return iconSprite; } +#ifdef POKEMON_DEBUG +static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale) +{ + const u8* iconSprite = gMonIconTable[species]; + if (SpeciesHasGenderDifference[species] && isFemale) + { + iconSprite = gMonIconTableFemale[species]; + } + return iconSprite; +} +#endif + void sub_80D304C(u16 offset) { s32 i; From c402a840b1f92e88a14bbdd14831eeb5441d30a6 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 30 Nov 2021 11:20:26 +0100 Subject: [PATCH 223/417] changed to P_ENABLE_DEBUG --- include/pokemon_debug.h | 2 +- src/decompress.c | 2 +- src/field_control_avatar.c | 4 ++-- src/pokemon_icon.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/pokemon_debug.h b/include/pokemon_debug.h index a1aae5e153..d70409a6b1 100644 --- a/include/pokemon_debug.h +++ b/include/pokemon_debug.h @@ -1,7 +1,7 @@ #ifndef GUARD_POKEMON_DEBUG_H #define GUARD_POKEMON_DEBUG_H -#define POKEMON_DEBUG +#define P_ENABLE_DEBUG void CB2_Debug_Pokemon(void); diff --git a/src/decompress.c b/src/decompress.c index 722e6574a6..ba5e4b8429 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -114,7 +114,7 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 DrawSpindaSpots(species, personality, dest, isFrontPic); } -#ifdef POKEMON_DEBUG +#ifdef P_ENABLE_DEBUG static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic, bool8 isFemale) { if (species == SPECIES_UNOWN) diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 66065681fc..c3fb5edd9d 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -132,7 +132,7 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys) else if (heldKeys & DPAD_RIGHT) input->dpadDirection = DIR_EAST; - #ifdef POKEMON_DEBUG + #ifdef P_ENABLE_DEBUG if ((heldKeys & R_BUTTON) && input->pressedStartButton) { input->input_field_1_2 = TRUE; @@ -199,7 +199,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input) return TRUE; - #ifdef POKEMON_DEBUG + #ifdef P_ENABLE_DEBUG if (input->input_field_1_2) { //PlaySE(SE_WIN_OPEN); diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index ad5820ba13..0b7c3203cb 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -23,7 +23,7 @@ struct MonIconSpriteTemplate // static functions static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *, s16, s16, u8); -#ifdef POKEMON_DEBUG +#ifdef P_ENABLE_DEBUG static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale); static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale); #endif @@ -2580,7 +2580,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u return spriteId; } -#ifdef POKEMON_DEBUG +#ifdef P_ENABLE_DEBUG u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny) { u8 spriteId; @@ -2678,7 +2678,7 @@ const u8 *GetMonIconPtr(u16 species, u32 personality) return GetMonIconTiles(GetIconSpecies(species, personality), personality); } -#ifdef POKEMON_DEBUG +#ifdef P_ENABLE_DEBUG static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale) { return GetMonIconTilesCustom(GetIconSpecies(species, personality), isFemale); @@ -2754,7 +2754,7 @@ const u8* GetMonIconTiles(u16 species, u32 personality) return iconSprite; } -#ifdef POKEMON_DEBUG +#ifdef P_ENABLE_DEBUG static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale) { const u8* iconSprite = gMonIconTable[species]; From dcf7dd6ce6c393983465c5be1d9b7f31793fa501 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 30 Nov 2021 12:28:13 +0100 Subject: [PATCH 224/417] small fix --- src/pokemon_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 32793b32f6..d99ba34cc1 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -127,7 +127,7 @@ static const struct WindowTemplate sPokemonDebugMsgBoxWindowTemplate = .tilemapTop = 14, .width = 11, .height = 1, - .paletteNum = 0, + .paletteNum = 0xF, .baseBlock = 0x100 }; @@ -688,7 +688,7 @@ void CB2_Debug_Pokemon(void) data->messageBoxWindowId = AddWindow(&sPokemonDebugMsgBoxWindowTemplate); PutWindowTilemap(data->messageBoxWindowId); CopyWindowToVram(data->messageBoxWindowId, 3); - FillWindowPixelRect(data->messageBoxWindowId, PIXEL_FILL(0x1), 0, 0, 90, 4); + FillWindowPixelRect(data->messageBoxWindowId, PIXEL_FILL(0x2), 0, 0, 90, 4); gMain.state++; break; From cb1c753b637b5cdfcd08ef24c7f8c9cb22bb9b2c Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 30 Nov 2021 13:48:11 +0100 Subject: [PATCH 225/417] removed unused code --- src/pokemon_debug.c | 231 -------------------------------------------- 1 file changed, 231 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index d99ba34cc1..5c632ed610 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -85,19 +85,6 @@ struct PokemonDebugMenu }; //WindowTemplates -/* -static const struct WindowTemplate sCurrentTitleTemplate = -{ - .bg = 0, - .tilemapLeft =1, - .tilemapTop = 0, - .width = 14, - .height = 2, - .paletteNum = 0xF, - .baseBlock = 0x200 -}; -*/ - static const struct WindowTemplate sDebugPokemonInstructionsTemplate = { .bg = 0, @@ -164,26 +151,6 @@ static void PadString(const u8 *src, u8 *dst) dst[i] = EOS; } -/* -static void PrintOnCurrentMonWindow(u8 windowId, u16 monId) -{ - u8 text[POKEMON_NAME_LENGTH + 10]; - - text[0] = CHAR_0 + monId / 100; - text[1] = CHAR_0 + (monId % 100) / 10; - text[2] = CHAR_0 + (monId % 100) % 10; - text[3] = CHAR_SPACE; - text[4] = CHAR_HYPHEN; - text[5] = CHAR_SPACE; - - StringCopy(&text[6], gSpeciesNames[monId]); - - FillWindowPixelBuffer(windowId, 0x11); - AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); - CopyWindowToVram(windowId, 3); -} -*/ - static void PrintInstructionsOnWindow(u8 windowId, struct PokemonDebugMenu *data) { u8 text[] = _("A - Shiny START - Cry\nL - Back R - Front$"); @@ -400,196 +367,6 @@ static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 spe } } -/* -// One entry for each of the four Castform forms. -extern const struct MonCoords gCastformFrontSpriteCoords[]; -static const u8 sCastformElevations[] = -{ - 13, // NORMAL - 14, // SUN - 13, // RAIN - 13, // HAIL -}; -// Const rom data -static const struct UCoords8 sBattlerCoords[][4] = -{ - { - { 72, 80 }, - { 176, 40 }, - { 48, 40 }, - { 112, 80 }, - }, - { - { 32, 80 }, - { 200, 40 }, - { 90, 88 }, - { 152, 32 }, - }, -}; -static u8 GetBattlerYDeltaCustom(u8 pic_type, u16 species) -{ - u32 personality; - u8 ret; - u16 coordSpecies; - - if (pic_type == MON_PIC_BACK) - { - if (species == SPECIES_UNOWN) - { - //coordSpecies = GetUnownSpeciesId(personality); - //ret = gMonBackPicCoords[coordSpecies].y_offset; - } - else if (species == SPECIES_CASTFORM) - ret = 0; //sCastformBackSpriteYCoords[0]]; //all of them are 0??? - else if (species > NUM_SPECIES) - ret = gMonBackPicCoords[0].y_offset; - else - ret = gMonBackPicCoords[species].y_offset; - } - else - { - if (species == SPECIES_UNOWN) - { - //coordSpecies = GetUnownSpeciesId(personality); - //ret = gMonFrontPicCoords[coordSpecies].y_offset; - } - else if (species == SPECIES_CASTFORM) - ret = gCastformFrontSpriteCoords[0].y_offset; - else if (species > NUM_SPECIES) - ret = gMonFrontPicCoords[0].y_offset; - else - ret = gMonFrontPicCoords[species].y_offset; - } - return ret; -} -static u8 GetBattlerElevationCustom(u8 pic_type, u16 species) -{ - u8 ret = 0; - if (pic_type == MON_PIC_FRONT) - { - if (species == SPECIES_CASTFORM) - ret = sCastformElevations[0]; - else if (species > NUM_SPECIES) - ret = gEnemyMonElevation[0]; - else - ret = gEnemyMonElevation[species]; - } - return ret; -} -u8 GetBattlerSpriteFinal_YCustom(u8 pic_type, u16 species, bool8 a3) -{ - u16 offset; - u8 y; - - if (pic_type == MON_PIC_BACK) - offset = GetBattlerYDeltaCustom(pic_type, species); - else - { - offset = GetBattlerYDeltaCustom(pic_type, species); - offset -= GetBattlerElevationCustom(pic_type, species); - } - y = offset + sBattlerCoords[0][pic_type].y; - if (a3) - { - if (pic_type == MON_PIC_BACK) - y += 8; - if (y > 104) - y = 104; - } - return y; -} -static u8 GetBattlerSpriteCoordCustom(u16 species, u8 pic_type, u8 coordType) -{ - u8 retVal; - - switch (coordType) - { - case BATTLER_COORD_X: - case BATTLER_COORD_X_2: - retVal = sBattlerCoords[0][pic_type].x; - break; - case BATTLER_COORD_Y: - retVal = sBattlerCoords[0][pic_type].y; - break; - case BATTLER_COORD_Y_PIC_OFFSET: - retVal = GetBattlerSpriteFinal_YCustom(pic_type, species, TRUE); - break; - case BATTLER_COORD_Y_PIC_OFFSET_DEFAULT: - retVal = GetBattlerSpriteFinal_YCustom(pic_type, species, FALSE); - break; - } - - return retVal; -} -static s16 GetBattlerSpriteCoordAttrCustom(u16 species, u8 pic_type, u8 attr, bool8 transformSpecies) -{ - u32 personality; - int ret = 0; - const struct MonCoords *coords; - - - if (pic_type == MON_PIC_BACK) - { - if (!transformSpecies) - //personality = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PERSONALITY); - else - //personality = gTransformedPersonalities[battlerId]; - - if (species == SPECIES_UNOWN) - { - //species = GetUnownSpeciesId(personality); - coords = &gMonBackPicCoords[species]; - } - else if (species > NUM_SPECIES) - coords = &gMonBackPicCoords[0]; - else - coords = &gMonBackPicCoords[species]; - } - else - { - if (!transformSpecies) - //personality = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PERSONALITY); - else - //personality = gTransformedPersonalities[battlerId]; - - if (species == SPECIES_UNOWN) - { - //species = GetUnownSpeciesId(personality); - coords = &gMonFrontPicCoords[species]; - } - else if (species == SPECIES_CASTFORM) - coords = &gCastformFrontSpriteCoords[0]; - else if (species > NUM_SPECIES) - coords = &gMonFrontPicCoords[0]; - else - coords = &gMonFrontPicCoords[species]; - } - - - switch (attr) - { - case BATTLER_COORD_ATTR_HEIGHT: - return (coords->size & 0xf) * 8; - case BATTLER_COORD_ATTR_WIDTH: - return (coords->size >> 4) * 8; - case BATTLER_COORD_ATTR_LEFT: - return GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_X_2) - ((coords->size >> 4) * 4); - case BATTLER_COORD_ATTR_RIGHT: - return GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_X_2) + ((coords->size >> 4) * 4); - case BATTLER_COORD_ATTR_TOP: - return GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_Y_PIC_OFFSET) - ((coords->size & 0xf) * 4); - case BATTLER_COORD_ATTR_BOTTOM: - return GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_Y_PIC_OFFSET) + ((coords->size & 0xf) * 4); - case BATTLER_COORD_ATTR_RAW_BOTTOM: - ret = GetBattlerSpriteCoordCustom(species, pic_type, BATTLER_COORD_Y) + 31; - return ret - coords->y_offset; - default: - return 0; - } - -} -*/ - // ******************************* // Main functions void CB2_Debug_Pokemon(void) @@ -627,7 +404,6 @@ void CB2_Debug_Pokemon(void) LoadPalette(sBgColor, 0, 2); LoadMonIconPalettes(); - //LoadPalette(GetOverworldTextboxPalettePtr(), 0xf0, 16); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); ShowBg(0); @@ -641,11 +417,6 @@ void CB2_Debug_Pokemon(void) data->currentmonId = 1; species = data->currentmonId; - /* - data->currentmonWindowId = AddWindow(&sCurrentTitleTemplate); - PutWindowTilemap(data->currentmonWindowId); - PrintOnCurrentMonWindow(data->currentmonWindowId, data->currentmonId); - */ data->InstructionsWindowId = AddWindow(&sDebugPokemonInstructionsTemplate); PutWindowTilemap(data->InstructionsWindowId); @@ -667,7 +438,6 @@ void CB2_Debug_Pokemon(void) LoadCompressedSpritePalette(palette); SetMultiuseSpriteTemplateToPokemon(species, 2); gMultiuseSpriteTemplate.paletteTag = palette->tag; - //offset_y = GetBattlerSpriteCoordAttrCustom(species, MON_PIC_BACK, BATTLER_COORD_ATTR_BOTTOM, FALSE); offset_y = gMonBackPicCoords[species].y_offset; data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 30 + offset_y, 0); gSprites[data->backspriteId].callback = SpriteCallbackDummy; @@ -878,7 +648,6 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) LoadCompressedSpritePalette(palette); SetMultiuseSpriteTemplateToPokemon(species, 2); gMultiuseSpriteTemplate.paletteTag = palette->tag; - //offset_y = GetBattlerSpriteCoordAttrCustom(species, MON_PIC_BACK, BATTLER_COORD_ATTR_BOTTOM, FALSE); offset_y = gMonBackPicCoords[species].y_offset; data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 30 + offset_y, 0); gSprites[data->backspriteId].callback = SpriteCallbackDummy; From a36445ea11cb889dba82fffe1f91699ac3a9e147 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:16:41 +0100 Subject: [PATCH 226/417] Changed opening to summary screen SELECT --- src/field_control_avatar.c | 24 ------------------------ src/pokemon_summary_screen.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index c3fb5edd9d..6ec280fd0d 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -20,7 +20,6 @@ #include "metatile_behavior.h" #include "overworld.h" #include "pokemon.h" -#include "pokemon_debug.h" #include "safari_zone.h" #include "script.h" #include "secret_base.h" @@ -131,14 +130,6 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys) input->dpadDirection = DIR_WEST; else if (heldKeys & DPAD_RIGHT) input->dpadDirection = DIR_EAST; - - #ifdef P_ENABLE_DEBUG - if ((heldKeys & R_BUTTON) && input->pressedStartButton) - { - input->input_field_1_2 = TRUE; - input->pressedStartButton = FALSE; - } - #endif } int ProcessPlayerFieldInput(struct FieldInput *input) @@ -198,21 +189,6 @@ int ProcessPlayerFieldInput(struct FieldInput *input) if (input->pressedSelectButton && UseRegisteredKeyItemOnField() == TRUE) return TRUE; - - #ifdef P_ENABLE_DEBUG - if (input->input_field_1_2) - { - //PlaySE(SE_WIN_OPEN); - //Debug_ShowMainMenu(); - - //PlayRainStoppingSoundEffect(); - CleanupOverworldWindowsAndTilemaps(); - SetMainCallback2(CB2_Debug_Pokemon); - - return TRUE; - } - #endif - return FALSE; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 3ffd612ac0..5545feab96 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -28,6 +28,7 @@ #include "palette.h" #include "pokeball.h" #include "pokemon.h" +#include "pokemon_debug.h" #include "pokemon_storage_system.h" #include "pokemon_summary_screen.h" #include "region_map.h" @@ -1555,6 +1556,15 @@ static void Task_HandleInput(u8 taskId) PlaySE(SE_SELECT); BeginCloseSummaryScreen(taskId); } + #ifdef P_ENABLE_DEBUG + else if (JOY_NEW(SELECT_BUTTON)) + { + sMonSummaryScreen->callback = CB2_Debug_Pokemon; + StopPokemonAnimations(); + PlaySE(SE_SELECT); + CloseSummaryScreen(taskId); + } + #endif } } From bf0d2b83930d692c6320707a14c520c8b3f0bbef Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Thu, 2 Dec 2021 19:29:04 +0100 Subject: [PATCH 227/417] Changed definition of P_ENABLE_DEBUG to pokemon_config.h --- include/constants/pokemon_config.h | 2 ++ include/pokemon_debug.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 6d45eb9be8..bca1d5fb75 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -18,6 +18,8 @@ #define P_UPDATED_EGG_GROUPS GEN_8 // Since Gen 8, certain Pokémon have gained new egg groups. #define P_SHEDINJA_BALL GEN_8 // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. +#define P_ENABLE_DEBUG // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. + #ifndef ITEM_EXPANSION //Item Definitions for gEvolutionTable diff --git a/include/pokemon_debug.h b/include/pokemon_debug.h index d70409a6b1..c9bfafc10c 100644 --- a/include/pokemon_debug.h +++ b/include/pokemon_debug.h @@ -1,8 +1,6 @@ #ifndef GUARD_POKEMON_DEBUG_H #define GUARD_POKEMON_DEBUG_H -#define P_ENABLE_DEBUG - void CB2_Debug_Pokemon(void); From 40f7247e119e8a2f7b78c004bdf2d46b27ca16aa Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 3 Dec 2021 11:02:22 +0100 Subject: [PATCH 228/417] changed P_ENABLE_DEBUG to TRUE/FALSE --- include/constants/pokemon_config.h | 2 +- src/decompress.c | 2 +- src/pokemon_debug.c | 5 ++++- src/pokemon_icon.c | 8 ++++---- src/pokemon_summary_screen.c | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index bca1d5fb75..597b96f8ec 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -18,7 +18,7 @@ #define P_UPDATED_EGG_GROUPS GEN_8 // Since Gen 8, certain Pokémon have gained new egg groups. #define P_SHEDINJA_BALL GEN_8 // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. -#define P_ENABLE_DEBUG // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. +#define P_ENABLE_DEBUG TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. #ifndef ITEM_EXPANSION //Item Definitions for gEvolutionTable diff --git a/src/decompress.c b/src/decompress.c index ba5e4b8429..e852561067 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -114,7 +114,7 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 DrawSpindaSpots(species, personality, dest, isFrontPic); } -#ifdef P_ENABLE_DEBUG +#if P_ENABLE_DEBUG static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic, bool8 isFemale) { if (species == SPECIES_UNOWN) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 5c632ed610..8543c1c4b9 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1,4 +1,4 @@ -//Credits: Gamer2020, AsparagusEduardo +//Credits: Gamer2020, AsparagusEduardo, TheXaman #include "global.h" #include "battle.h" #include "battle_anim.h" @@ -118,6 +118,7 @@ static const struct WindowTemplate sPokemonDebugMsgBoxWindowTemplate = .baseBlock = 0x100 }; +#if P_ENABLE_DEBUG //Function declarations static void PrintDigitChars(struct PokemonDebugMenu *data); static void SetUpModifyArrows(struct PokemonDebugMenu *data); @@ -676,3 +677,5 @@ static void Exit_Debug_Pokemon(u8 taskId) m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); } } + +#endif diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 0b7c3203cb..678e193675 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -23,7 +23,7 @@ struct MonIconSpriteTemplate // static functions static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *, s16, s16, u8); -#ifdef P_ENABLE_DEBUG +#if P_ENABLE_DEBUG static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale); static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale); #endif @@ -2580,7 +2580,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u return spriteId; } -#ifdef P_ENABLE_DEBUG +#if P_ENABLE_DEBUG u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny) { u8 spriteId; @@ -2678,7 +2678,7 @@ const u8 *GetMonIconPtr(u16 species, u32 personality) return GetMonIconTiles(GetIconSpecies(species, personality), personality); } -#ifdef P_ENABLE_DEBUG +#if P_ENABLE_DEBUG static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale) { return GetMonIconTilesCustom(GetIconSpecies(species, personality), isFemale); @@ -2754,7 +2754,7 @@ const u8* GetMonIconTiles(u16 species, u32 personality) return iconSprite; } -#ifdef P_ENABLE_DEBUG +#if P_ENABLE_DEBUG static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale) { const u8* iconSprite = gMonIconTable[species]; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 5545feab96..11da5ce171 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1556,7 +1556,7 @@ static void Task_HandleInput(u8 taskId) PlaySE(SE_SELECT); BeginCloseSummaryScreen(taskId); } - #ifdef P_ENABLE_DEBUG + #if P_ENABLE_DEBUG else if (JOY_NEW(SELECT_BUTTON)) { sMonSummaryScreen->callback = CB2_Debug_Pokemon; From 378152c1a3f5c67c3eb3288f367230158db3abc2 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 3 Dec 2021 11:41:54 +0100 Subject: [PATCH 229/417] Update src/decompress.c Co-authored-by: LOuroboros --- src/decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decompress.c b/src/decompress.c index e852561067..d0ff81a9ed 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -114,7 +114,7 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 DrawSpindaSpots(species, personality, dest, isFrontPic); } -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic, bool8 isFemale) { if (species == SPECIES_UNOWN) From 5a63cbd527bdeb9b4d312889f19a4541f5f64d0c Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 3 Dec 2021 11:41:58 +0100 Subject: [PATCH 230/417] Update src/pokemon_icon.c Co-authored-by: LOuroboros --- src/pokemon_icon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 678e193675..49b93fd511 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -23,7 +23,7 @@ struct MonIconSpriteTemplate // static functions static u8 CreateMonIconSprite(struct MonIconSpriteTemplate *, s16, s16, u8); -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale); static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale); #endif From 99d03259ff4978eadda3fad2cd98901d1181a2a1 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 3 Dec 2021 11:42:02 +0100 Subject: [PATCH 231/417] Update src/pokemon_icon.c Co-authored-by: LOuroboros --- src/pokemon_icon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 49b93fd511..4754dba512 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -2580,7 +2580,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u return spriteId; } -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality, bool8 isFemale, bool8 isShiny) { u8 spriteId; From 44dab3cc9305521228829f9a8339b12439c0e298 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 3 Dec 2021 11:42:07 +0100 Subject: [PATCH 232/417] Update src/pokemon_icon.c Co-authored-by: LOuroboros --- src/pokemon_icon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 4754dba512..14fe48f730 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -2678,7 +2678,7 @@ const u8 *GetMonIconPtr(u16 species, u32 personality) return GetMonIconTiles(GetIconSpecies(species, personality), personality); } -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE static const u8 *GetMonIconPtrCustom(u16 species, u32 personality, bool8 isFemale) { return GetMonIconTilesCustom(GetIconSpecies(species, personality), isFemale); From 7ff8c1c9ebb021f2b680b846d6af6ed7cff989fb Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 3 Dec 2021 11:42:11 +0100 Subject: [PATCH 233/417] Update src/pokemon_icon.c Co-authored-by: LOuroboros --- src/pokemon_icon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 14fe48f730..c2d1d5043d 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -2754,7 +2754,7 @@ const u8* GetMonIconTiles(u16 species, u32 personality) return iconSprite; } -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale) { const u8* iconSprite = gMonIconTable[species]; From 42ed047bc050d4eca97069048d44edbae120a77a Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 3 Dec 2021 11:42:14 +0100 Subject: [PATCH 234/417] Update src/pokemon_summary_screen.c Co-authored-by: LOuroboros --- src/pokemon_summary_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 11da5ce171..ce1e280bdf 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1556,7 +1556,7 @@ static void Task_HandleInput(u8 taskId) PlaySE(SE_SELECT); BeginCloseSummaryScreen(taskId); } - #if P_ENABLE_DEBUG + #if P_ENABLE_DEBUG == TRUE else if (JOY_NEW(SELECT_BUTTON)) { sMonSummaryScreen->callback = CB2_Debug_Pokemon; From 4ca9005797127625152eb269bb1b7ad2e37a4724 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 3 Dec 2021 18:25:28 -0300 Subject: [PATCH 235/417] Removed weird spaces in 7 dex descriptions --- src/data/pokemon/pokedex_text.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/data/pokemon/pokedex_text.h b/src/data/pokemon/pokedex_text.h index 4403a62927..15d56ee9d5 100644 --- a/src/data/pokemon/pokedex_text.h +++ b/src/data/pokemon/pokedex_text.h @@ -2546,8 +2546,7 @@ const u8 gAmbipomPokedexText[] = _( "They live on large trees. Split into two,\n" "the tails are so adept at handling and\n" "doing things, Ambipom rarely uses\n" - "its hands now.\n" - ""); + "its hands now."); const u8 gDrifloonPokedexText[] = _( "Because of the way it floats aimlessly,\n" @@ -3045,8 +3044,7 @@ const u8 gHerdierPokedexText[] = _( "Its dense black fur grows continuously.\n" "The high cost of keeping its hard fur\n" "properly groomed makes this a\n" - "troublesome Pokémon to train.\n" - ""); + "troublesome Pokémon to train."); const u8 gStoutlandPokedexText[] = _( "Intelligent, good-natured, and valiant,\n" @@ -3190,8 +3188,7 @@ const u8 gAudinoPokedexText[] = _( "Its auditory sense is astounding.\n" "Using the feelers on its ears, it can tell\n" "how someone is feeling or when an egg\n" - "might hatch.\n" - ""); + "might hatch."); const u8 gTimburrPokedexText[] = _( "These Pokémon appear at building\n" @@ -3383,8 +3380,7 @@ const u8 gCofagrigusPokedexText[] = _( "Grave robbers who mistake them for\n" "real coffins and get too close end up\n" "trapped inside their bodies. Their bodies\n" - "are covered in pure gold.\n" - ""); + "are covered in pure gold."); const u8 gTirtougaPokedexText[] = _( "Reputed to be the ancestor of most\n" @@ -4260,15 +4256,13 @@ const u8 gTrevenantPokedexText[] = _( "Through its roots, it exerts control over\n" "other trees. A deadly curse falls upon\n" "anyone cutting down trees in forests\n" - "where Trevenant dwell.\n" - ""); + "where Trevenant dwell."); const u8 gPumpkabooPokedexText[] = _( "It is said to carry wandering spirits to\n" "the place where they belong so they can\n" "move on. As the sun sets, it becomes\n" - "restless and active.\n" - ""); + "restless and active."); const u8 gGourgeistPokedexText[] = _( "Singing in eerie voices, they wander town\n" @@ -4514,8 +4508,7 @@ const u8 gDewpiderPokedexText[] = _( "It crawls onto the land in search of food.\n" "When it comes across enemies or potential\n" "prey, this Pokémon smashes its\n" - "water-bubble-covered head into them.\n" - ""); + "water-bubble-covered head into them."); const u8 gAraquanidPokedexText[] = _( "Despite what its appearance suggests,\n" From d501636730c0aaf83754a9ed71fcdce734d336b4 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 3 Dec 2021 16:36:18 -0500 Subject: [PATCH 236/417] Fix incorrect flag animation palettes --- .gitignore | 1 + .../anim/flag/0.png | Bin 230 -> 230 bytes .../anim/flag/1.png | Bin 227 -> 227 bytes .../anim/flag/2.png | Bin 225 -> 225 bytes .../anim/flag/3.png | Bin 228 -> 228 bytes .../anim/flag/0.png | Bin 230 -> 230 bytes .../anim/flag/1.png | Bin 227 -> 227 bytes .../anim/flag/2.png | Bin 225 -> 225 bytes .../anim/flag/3.png | Bin 228 -> 228 bytes 9 files changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index fd16840c67..23b01d1e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ porymap.project.cfg *.sna *.diff *.sym +*.js diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/0.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/0.png index b5621be76ec6cc1aa1ca7eeda66abbc15fce1a72..1de3fe7c3da5135672c84b9bde57a3250cacd731 100644 GIT binary patch delta 62 zcmV-E0Kxy}0p6Iarip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY$pI_lOxms diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/1.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/1.png index 56a46ce92a8c84bc7a096e7f6338314913887323..b9f80f08dfb3f6942275adc231ec16b3fbb459bf 100644 GIT binary patch delta 62 zcmV-E0Kxy`0pkIXDKuim0Hk7C|NsBJ&E}l6-h+dSVq$wiN@^)FTL0BCoQpB;lyl8N UQpJnStaG$t#Q?IBAH$Jdh6ku1v;Y7A delta 62 zcmaFN_?U5mrip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY#RV&A|uNH diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/2.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/2.png index e51f5b531217847abbdf0e3874d2e698e5edc278..a03c965a878e8b9f7f7064871b525e2e6b983bb8 100644 GIT binary patch delta 62 zcmV-E0Kxy^0pS6VDKuim0Hk7C|NsBJ&E}l6-h+dSVq$wiN@^)FTL0BCoQpB;lyl8N UQpJnStaG$t#Q?IBAH$Jdga)!8t^fc4 delta 62 zcmaFJ_>ggerip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AYzqKnEF;AL diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/3.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/flag/3.png index 3ec6ff703c7eb5017e114b14d4170da2be3dadcc..5bdf19a359b3ac9777b0f30ab4317b1cea399461 100644 GIT binary patch delta 62 zcmV-E0Kxy{0ptOYDKuim0Hk7C|NsBJ&E}l6-h+dSVq$wiN@^)FTL0BCoQpB;lyl8N UQpJnStaG$t#Q?IBAH$JdhX^Aew*UYD delta 62 zcmaFD_=ItSrip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY&!sDog>Zw diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/0.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/0.png index b5621be76ec6cc1aa1ca7eeda66abbc15fce1a72..1de3fe7c3da5135672c84b9bde57a3250cacd731 100644 GIT binary patch delta 62 zcmV-E0Kxy}0p6Iarip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY$pI_lOxms diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/1.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/1.png index 56a46ce92a8c84bc7a096e7f6338314913887323..b9f80f08dfb3f6942275adc231ec16b3fbb459bf 100644 GIT binary patch delta 62 zcmV-E0Kxy`0pkIXDKuim0Hk7C|NsBJ&E}l6-h+dSVq$wiN@^)FTL0BCoQpB;lyl8N UQpJnStaG$t#Q?IBAH$Jdh6ku1v;Y7A delta 62 zcmaFN_?U5mrip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY#RV&A|uNH diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/2.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/2.png index e51f5b531217847abbdf0e3874d2e698e5edc278..a03c965a878e8b9f7f7064871b525e2e6b983bb8 100644 GIT binary patch delta 62 zcmV-E0Kxy^0pS6VDKuim0Hk7C|NsBJ&E}l6-h+dSVq$wiN@^)FTL0BCoQpB;lyl8N UQpJnStaG$t#Q?IBAH$Jdga)!8t^fc4 delta 62 zcmaFJ_>ggerip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AYzqKnEF;AL diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/3.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/flag/3.png index 3ec6ff703c7eb5017e114b14d4170da2be3dadcc..5bdf19a359b3ac9777b0f30ab4317b1cea399461 100644 GIT binary patch delta 62 zcmV-E0Kxy{0ptOYDKuim0Hk7C|NsBJ&E}l6-h+dSVq$wiN@^)FTL0BCoQpB;lyl8N UQpJnStaG$t#Q?IBAH$JdhX^Aew*UYD delta 62 zcmaFD_=ItSrip}R(EtDc?>&3B_w2JdTkbVCcPAxPJ9=gPXZT;d_gm7McOY`fy`b)+ SUd3yQk1k12+_G(AY&!sDog>Zw From 96b8d21b7a9218723c92178980d45951fc903aba Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 3 Dec 2021 19:32:31 -0300 Subject: [PATCH 237/417] Added form switching + Button icons --- include/pokemon.h | 2 ++ src/data/pokemon/form_species_tables.h | 2 -- src/pokemon_debug.c | 48 +++++++++++++++++++++----- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index 6a13f7432d..725665b220 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -8,6 +8,7 @@ #include "constants/map_groups.h" #define GET_BASE_SPECIES_ID(speciesId) (GetFormSpeciesId(speciesId, 0)) +#define FORM_SPECIES_END (0xffff) struct PokemonSubstruct0 { @@ -279,6 +280,7 @@ extern const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2]; extern const u16 gLinkPlayerFacilityClasses[]; extern const struct SpriteTemplate gBattlerSpriteTemplates[]; extern const s8 gNatureStatTable[][5]; +extern const u16 *const gFormSpeciesIdTables[NUM_SPECIES]; void ZeroBoxMonData(struct BoxPokemon *boxMon); void ZeroMonData(struct Pokemon *mon); diff --git a/src/data/pokemon/form_species_tables.h b/src/data/pokemon/form_species_tables.h index 89b3f4eec1..810da64997 100644 --- a/src/data/pokemon/form_species_tables.h +++ b/src/data/pokemon/form_species_tables.h @@ -1,5 +1,3 @@ -#define FORM_SPECIES_END (0xffff) - static const u16 sVenusaurFormSpeciesIdTable[] = { SPECIES_VENUSAUR, SPECIES_VENUSAUR_MEGA, diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 8543c1c4b9..406fe239b2 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1,4 +1,4 @@ -//Credits: Gamer2020, AsparagusEduardo, TheXaman +//Credits: Gamer2020, AsparagusEduardo, TheXaman, ShinyDragonHunter #include "global.h" #include "battle.h" #include "battle_anim.h" @@ -18,6 +18,7 @@ #include "menu.h" #include "overworld.h" #include "palette.h" +#include "pokemon.h" #include "pokemon_animation.h" #include "pokemon_debug.h" #include "pokemon_icon.h" @@ -154,16 +155,28 @@ static void PadString(const u8 *src, u8 *dst) static void PrintInstructionsOnWindow(u8 windowId, struct PokemonDebugMenu *data) { - u8 text[] = _("A - Shiny START - Cry\nL - Back R - Front$"); - u8 textGender[] = _("A - Shiny START - Cry\nL - Back R - Front SEL - Gender$"); + u8 text[] = _("{A_BUTTON} Shiny\n{L_BUTTON} Back {R_BUTTON} Front$"); + u8 textGender[] = _("{A_BUTTON} Shiny\n{L_BUTTON} Back {R_BUTTON} Front {SELECT_BUTTON} Gender$"); + u8 textForms[] = _("{A_BUTTON} Shiny {START_BUTTON} Forms\n{L_BUTTON} Back {R_BUTTON} Front$"); + u8 textGenderForms[] = _("{A_BUTTON} Shiny {START_BUTTON} Forms\n{L_BUTTON} Back {R_BUTTON} Front {SELECT_BUTTON} Gender$"); u16 species = data->modifyArrows.currValue; FillWindowPixelBuffer(windowId, 0x11); if (SpeciesHasGenderDifference[species]) - AddTextPrinterParameterized(windowId, 1, textGender, 0, 0, 0, NULL); + { + if (gFormSpeciesIdTables[data->currentmonId] != NULL) + AddTextPrinterParameterized(windowId, 1, textGenderForms, 0, 0, 0, NULL); + else + AddTextPrinterParameterized(windowId, 1, textGender, 0, 0, 0, NULL); + } else - AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); + { + if (gFormSpeciesIdTables[data->currentmonId] != NULL) + AddTextPrinterParameterized(windowId, 1, textForms, 0, 0, 0, NULL); + else + AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); + } CopyWindowToVram(windowId, 3); } @@ -416,7 +429,7 @@ void CB2_Debug_Pokemon(void) data = AllocZeroed(sizeof(struct PokemonDebugMenu)); SetStructPtr(taskId, data); - data->currentmonId = 1; + data->currentmonId = SPECIES_BULBASAUR; species = data->currentmonId; data->InstructionsWindowId = AddWindow(&sDebugPokemonInstructionsTemplate); @@ -527,10 +540,12 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) if (JOY_NEW(L_BUTTON)) { + PlayCryInternal(data->currentmonId, 0, 120, 10, 0); LaunchAnimationTaskForBackSprite(Backsprite, GetSpeciesBackAnimSet(data->currentmonId)); } else if (JOY_NEW(R_BUTTON)) { + PlayCryInternal(data->currentmonId, 0, 120, 10, 0); if (HasTwoFramesAnimation(data->currentmonId)) StartSpriteAnim(Frontsprite, 1); BattleAnimateFrontSprite(Frontsprite, data->currentmonId, TRUE, 1); @@ -547,13 +562,27 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) } else if (JOY_NEW(B_BUTTON)) { - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); gTasks[taskId].func = Exit_Debug_Pokemon; PlaySE(SE_PC_OFF); } else if (JOY_NEW(START_BUTTON)) { - PlayCryInternal(data->currentmonId, 0, 120, 10, 0); + if (gFormSpeciesIdTables[data->currentmonId] != NULL) + { + struct PokemonDebugModifyArrows *modArrows = &data->modifyArrows; + u8 formId = GetFormIdFromFormSpeciesId(data->currentmonId); + if (gFormSpeciesIdTables[data->currentmonId][formId + 1] != FORM_SPECIES_END) + modArrows->currValue = GetFormSpeciesId(data->currentmonId, formId + 1); + else + modArrows->currValue = gFormSpeciesIdTables[data->currentmonId][0]; + + PrintDigitChars(data); + UpdateBattlerValue(data); + ReloadPokemonSprites(data); + while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); + PlaySE(SE_DEX_SCROLL); + } } else if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifference[data->currentmonId]) { @@ -562,6 +591,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) UpdateBattlerValue(data); ReloadPokemonSprites(data); while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); + PlaySE(SE_DEX_SCROLL); } else if (JOY_NEW(DPAD_DOWN)) // || gMain.heldKeys & DPAD_DOWN) { @@ -673,7 +703,7 @@ static void Exit_Debug_Pokemon(u8 taskId) Free(data); FreeMonSpritesGfx(); DestroyTask(taskId); - SetMainCallback2(CB2_ReturnToField); + SetMainCallback2(CB2_ReturnToFieldWithOpenMenu); m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); } } From faca2fbef623b99596c3a77d94cd89fcb5450146 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 3 Dec 2021 20:24:10 -0300 Subject: [PATCH 238/417] Adjusted Front pic coords so they align to single battle --- src/pokemon_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 406fe239b2..1c5060f920 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -35,8 +35,8 @@ #include "constants/items.h" //Defines -#define DEBUG_MON_X 140 -#define DEBUG_MON_Y 14 +#define DEBUG_MON_X 137 +#define DEBUG_MON_Y 18 #define DEBUG_MON_BACK_X 32 #define DEBUG_MON_BACK_Y 50 #define DEBUG_ICON_X 158 From 1cf482457573789e806fbf749b5ad05138ebe611 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Sat, 4 Dec 2021 10:57:40 +0100 Subject: [PATCH 239/417] Prevents the debug menu beeing opened in battle and breaking the game --- src/pokemon_summary_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index ce1e280bdf..350bfa29cb 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1557,7 +1557,7 @@ static void Task_HandleInput(u8 taskId) BeginCloseSummaryScreen(taskId); } #if P_ENABLE_DEBUG == TRUE - else if (JOY_NEW(SELECT_BUTTON)) + else if (JOY_NEW(SELECT_BUTTON) && !gMain.inBattle) { sMonSummaryScreen->callback = CB2_Debug_Pokemon; StopPokemonAnimations(); From 6a15b938e982c1cd903e736b0e46ab3d07a9f5bb Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Sat, 4 Dec 2021 12:42:22 +0100 Subject: [PATCH 240/417] front and back sprites now used separate palettes --- src/pokemon_debug.c | 55 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 1c5060f920..7a35cad894 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -18,6 +18,7 @@ #include "menu.h" #include "overworld.h" #include "palette.h" +#include "palette_util.h" #include "pokemon.h" #include "pokemon_animation.h" #include "pokemon_debug.h" @@ -381,6 +382,50 @@ static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 spe } } +void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isShiny, u8 battlerId) +{ + u16 paletteOffset; + const void *lzPaletteData; + const struct CompressedSpritePalette *palette; + + paletteOffset = 0x100 + battlerId * 16; + + palette = GetMonSpritePalStructCustom(species, isFemale, isShiny); + + if (isShiny) + { + if (SpeciesHasGenderDifference[species] && isFemale) + lzPaletteData = gMonShinyPaletteTableFemale[species].data; + else + lzPaletteData = gMonShinyPaletteTable[species].data; + } + else + { + if (SpeciesHasGenderDifference[species] && isFemale) + lzPaletteData = gMonPaletteTableFemale[species].data; + else + lzPaletteData = gMonPaletteTable[species].data; + } + + LZDecompressWram(lzPaletteData, gDecompressionBuffer); + LoadPalette(gDecompressionBuffer, paletteOffset, 0x20); + LoadPalette(gDecompressionBuffer, 0x80 + battlerId * 16, 0x20); + + //if (species == SPECIES_CASTFORM) + //{ + // paletteOffset = 0x100 + battlerId * 16; + // LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[0]); + // LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerId]], paletteOffset, 0x20); + //} + + // transform's pink color + //if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != SPECIES_NONE) + //{ + // BlendPalette(paletteOffset, 16, 6, RGB_WHITE); + // CpuCopy32(gPlttBufferFaded + paletteOffset, gPlttBufferUnfaded + paletteOffset, 32); + //} +} + // ******************************* // Main functions void CB2_Debug_Pokemon(void) @@ -439,11 +484,10 @@ void CB2_Debug_Pokemon(void) HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); data->isShiny = FALSE; data->isFemale = FALSE; - palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); - LoadCompressedSpritePalette(palette); + BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); - gMultiuseSpriteTemplate.paletteTag = palette->tag; data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X + 32, DEBUG_MON_Y + 40, 0); + gSprites[data->frontspriteId].oam.paletteNum = 1; gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; @@ -666,11 +710,10 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) PrintInstructionsOnWindow(data->InstructionsWindowId, data); HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); - palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); - LoadCompressedSpritePalette(palette); + BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); - gMultiuseSpriteTemplate.paletteTag = palette->tag; data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X + 32, DEBUG_MON_Y + 40, 0); + gSprites[data->frontspriteId].oam.paletteNum = 1; gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; From fa435b058c40c15247a5a146d5a23e2768f3b2ff Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Sat, 4 Dec 2021 12:51:36 +0100 Subject: [PATCH 241/417] fixed sprite animations overlapping --- src/pokemon_debug.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 7a35cad894..bb3be1ee87 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -410,20 +410,6 @@ void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isS LZDecompressWram(lzPaletteData, gDecompressionBuffer); LoadPalette(gDecompressionBuffer, paletteOffset, 0x20); LoadPalette(gDecompressionBuffer, 0x80 + battlerId * 16, 0x20); - - //if (species == SPECIES_CASTFORM) - //{ - // paletteOffset = 0x100 + battlerId * 16; - // LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[0]); - // LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerId]], paletteOffset, 0x20); - //} - - // transform's pink color - //if (gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != SPECIES_NONE) - //{ - // BlendPalette(paletteOffset, 16, 6, RGB_WHITE); - // CpuCopy32(gPlttBufferFaded + paletteOffset, gPlttBufferUnfaded + paletteOffset, 32); - //} } // ******************************* @@ -582,12 +568,12 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) struct Sprite *Frontsprite = &gSprites[data->frontspriteId]; struct Sprite *Backsprite = &gSprites[data->backspriteId]; - if (JOY_NEW(L_BUTTON)) + if (JOY_NEW(L_BUTTON) && (Backsprite->callback == SpriteCallbackDummy)) { PlayCryInternal(data->currentmonId, 0, 120, 10, 0); LaunchAnimationTaskForBackSprite(Backsprite, GetSpeciesBackAnimSet(data->currentmonId)); } - else if (JOY_NEW(R_BUTTON)) + else if (JOY_NEW(R_BUTTON) && (Frontsprite->callback == SpriteCallbackDummy)) { PlayCryInternal(data->currentmonId, 0, 120, 10, 0); if (HasTwoFramesAnimation(data->currentmonId)) From 9306b19cedb056451c251c01b58afb4e34dfb409 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Sat, 4 Dec 2021 19:36:51 +0100 Subject: [PATCH 242/417] fixed wrong icon palettes on some icons --- src/pokemon_debug.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index bb3be1ee87..e9a920104a 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -448,7 +448,7 @@ void CB2_Debug_Pokemon(void) AllocateMonSpritesGfx(); LoadPalette(sBgColor, 0, 2); - LoadMonIconPalettes(); + LoadMonIconPalette(SPECIES_BULBASAUR); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); ShowBg(0); @@ -686,12 +686,10 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) ResetPaletteFade(); FreeAllSpritePalettes(); ResetAllPicSprites(); - AllocateMonSpritesGfx(); - - FreeAllSpritePalettes(); FreeMonIconPalettes(); - LoadMonIconPalettes(); + AllocateMonSpritesGfx(); + LoadMonIconPalette(species); PrintInstructionsOnWindow(data->InstructionsWindowId, data); From f07f31f401e8d14ee2add8c5e1484f16bbe0578a Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Sat, 4 Dec 2021 19:37:35 +0100 Subject: [PATCH 243/417] Update src/pokemon_debug.c Co-authored-by: Eduardo Quezada D'Ottone --- src/pokemon_debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index e9a920104a..13971410db 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -36,9 +36,9 @@ #include "constants/items.h" //Defines -#define DEBUG_MON_X 137 -#define DEBUG_MON_Y 18 -#define DEBUG_MON_BACK_X 32 +#define DEBUG_MON_X 144 +#define DEBUG_MON_Y 11 +#define DEBUG_MON_BACK_X 40 #define DEBUG_MON_BACK_Y 50 #define DEBUG_ICON_X 158 #define DEBUG_ICON_Y 90 From be05ff2e3b77dd4ad9c67558d502f49c7bd6ef77 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 4 Dec 2021 16:32:53 -0300 Subject: [PATCH 244/417] Fixed the palette of Pikachu Partner Cap's back --- graphics/pokemon/pikachu/partner_cap/back.png | Bin 758 -> 759 bytes graphics/pokemon/pikachu/partner_cap/front.png | Bin 735 -> 735 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/graphics/pokemon/pikachu/partner_cap/back.png b/graphics/pokemon/pikachu/partner_cap/back.png index a06e273efa571e9e59f26660cc542284e0ca9535..961611d28ab7bec46ccaa24e19457dcc3a946d80 100644 GIT binary patch delta 650 zcmV;50(JfN1@{GzDhlNc1QQ)D{S_uXku*|&rha#i8yo-q>dm^k+fqRg5DL;#2d9Y_EG0vkz0K~#90?UO%l zoj?%AS1Bkg4q+iBQe5T;$qnLASW5AfVkIKDOGNUXM5@M@;n{Q@;ke7JI$fGEF`&51($MH?{?SJ`KGLMn_1Y>%A9h-Q+ z&R^W!v04hu!1d({2-vURXC#97rYH(o=F>aB#3+ymWL`!bd%#x)NRX(ovHxIeghyQi zkf@Wx7fXD%03W0~LIH_$^5%*fl^;8Q1KbNm1g#{Js}j035DGDIxoHr9gk~FH8VwLy^3xM=mEg$(`@y0ac<2(#Jen?23k)9c*?tMxED_Fs77%#& zNqnMTEFkb_1{R{6fuVJQndtS>G3Wpu7}*k)0V)LGNL)hOD|xE`#!-%}LN`!y&J~cU zv8+Ol!U_Cv z8%2-3a_Hn6e-Nc=V$OH#MyME|7+^2GoE0vbs~K~#90?UTQ1 z+&~bfbE@;L$55l#wM7gi9En%tcd*J;w{4Gvr^(LISFh2V;Vl`AVC(5Mfb_MtL= zvwx)3%1P@c(`fg;pT7BKSI5}@dcoSPR;xGv(zi*H+^jzRO@Bo?)+Qu`Fwd*R*4Mdy z@$eujG8lpPmop#|KYpH(h?1M4D5%Z5?_rBxArX;Il_UZ1Q2-KbRk+%Ib3Nj{=>bSo z>F$FgzBoX3l#X#g;+(#|=GNu&+5(S%N)u5{M0#C9GY4X&21$z}0+8~20Svt*s7aG< zI5)t?WgGz16rB3Z^qXy<7g4X1gOehqkRbgf3WKg5a{=Iip&9B0NlDSAs;Q`F#-aAPj@UN z+9?78zeZpp$`R;l9~g<&JQ@KFz>{E0;$VRT0)D5aDd$n~+z zijLzXsp>}D=g?M6_)LuNbQpn%qqx@#<#(YDC!K=;%G@he&4JF{wdDG#AaFQASpJ}x zvDFDZ{TLoZsfQT#WVO_dZv?w05hf;CeZO~YY%oz%F%^7%Q}0Pbk+FfhdRro zKjzW^0eP5!W}&l4`WDXs8TWy{S^zm@UXT9#3~=;;VPSzMnN2M~?L#1%U*ysus%JnO j>fV1;ACz1IFIIm5NCOt-(h3hT00000NkvXXu0mjf&mJcw diff --git a/graphics/pokemon/pikachu/partner_cap/front.png b/graphics/pokemon/pikachu/partner_cap/front.png index 10a4b11584084681762f03bc59e6f911d7f77768..6965900761f47faa1913e5deeec6af2618447b7f 100644 GIT binary patch delta 30 mcmcc5dY^TI7S~fA7GYWQnRR`CCz^D#GIX%YdTcx*%>)3bzzSpl delta 30 mcmcc5dY^TI7S|JYaW(~+-OpWOCz^D#{$I-e>FCBI(o6ufF$`S* From cc05b08227ac23d2ef8fd0f7379a2e61492d9283 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 6 Dec 2021 11:17:42 -0500 Subject: [PATCH 245/417] Fix incorrect ever grande flower animation palettes --- .../secondary/ever_grande/anim/flowers/0.png | Bin 257 -> 257 bytes .../secondary/ever_grande/anim/flowers/1.png | Bin 257 -> 257 bytes .../secondary/ever_grande/anim/flowers/2.png | Bin 253 -> 253 bytes .../secondary/ever_grande/anim/flowers/3.png | Bin 255 -> 255 bytes .../secondary/ever_grande/anim/flowers/4.png | Bin 257 -> 257 bytes .../secondary/ever_grande/anim/flowers/5.png | Bin 257 -> 257 bytes .../secondary/ever_grande/anim/flowers/6.png | Bin 254 -> 254 bytes .../secondary/ever_grande/anim/flowers/7.png | Bin 254 -> 254 bytes 8 files changed, 0 insertions(+), 0 deletions(-) diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/0.png b/data/tilesets/secondary/ever_grande/anim/flowers/0.png index 6493e2e8217eaeef04ad9798ef20816610ebe025..ae9198645128c104f9b9f68e5fddf9df59ca602a 100644 GIT binary patch delta 59 zcmV-B0L1@+0)YaMEHTCZq=Us`TBI>SVi02PYWCi0_N*Yya|r*zq+(h@IWhmml-_D$%|TM6)x~qg Rq(QWU7^G^z9Dx~;U8EK_8-xG= diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/1.png b/data/tilesets/secondary/ever_grande/anim/flowers/1.png index 6493e2e8217eaeef04ad9798ef20816610ebe025..ae9198645128c104f9b9f68e5fddf9df59ca602a 100644 GIT binary patch delta 59 zcmV-B0L1@+0)YaMEHTCZq=Us`TBI>SVi02PYWCi0_N*Yya|r*zq+(h@IWhmml-_D$%|TM6)x~qg Rq(QWU7^G^z9Dx~;U8EK_8-xG= diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/2.png b/data/tilesets/secondary/ever_grande/anim/flowers/2.png index 0b1f568cbf46679eaade47d93f5e60dc08494d53..05b97963705e9260be60a95dc581137ca8c04162 100644 GIT binary patch delta 59 zcmV-B0L1_O0sR4xEHTCZq=Us`TBI>SVi02PYWCi0_N*Yya|r*zq+(h@IWhmml-_D$%|TM6)x~qg Rq(QWU7^G^z9Dx~;U7$_z9CiQz diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/3.png b/data/tilesets/secondary/ever_grande/anim/flowers/3.png index edc7220b8fecd4939433a784ddadb90ea7598fba..a4cea04e63e102cf71a7655c1f32f81c49356122 100644 GIT binary patch delta 59 zcmV-B0L1_Q0sjGzEHTCZq=Us`TBI>SVi02PYWCi0_N*Yya|r*zq+(h@IWhmml-_D$%|TM6)x~qg Rq(QWU7^G^z9Dx~;U7}9g9DD!( diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/4.png b/data/tilesets/secondary/ever_grande/anim/flowers/4.png index 6493e2e8217eaeef04ad9798ef20816610ebe025..ae9198645128c104f9b9f68e5fddf9df59ca602a 100644 GIT binary patch delta 59 zcmV-B0L1@+0)YaMEHTCZq=Us`TBI>SVi02PYWCi0_N*Yya|r*zq+(h@IWhmml-_D$%|TM6)x~qg Rq(QWU7^G^z9Dx~;U8EK_8-xG= diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/5.png b/data/tilesets/secondary/ever_grande/anim/flowers/5.png index 6493e2e8217eaeef04ad9798ef20816610ebe025..ae9198645128c104f9b9f68e5fddf9df59ca602a 100644 GIT binary patch delta 59 zcmV-B0L1@+0)YaMEHTCZq=Us`TBI>SVi02PYWCi0_N*Yya|r*zq+(h@IWhmml-_D$%|TM6)x~qg Rq(QWU7^G^z9Dx~;U8EK_8-xG= diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/6.png b/data/tilesets/secondary/ever_grande/anim/flowers/6.png index 4d43dfd0a9d6c1de80dd68476f017fcc0e91ea56..c45b6188cf41fd900b40e02431713bc160ffc040 100644 GIT binary patch delta 59 zcmV-B0L1_P0saAyEHTCZq=Us`TBI>SVi02PYWCi0_N*Yya|r*zq+(h@IWhmml-_D$%|TM6)x~qg Rq(QWU7^G^z9Dx~;U7=299C-i$ diff --git a/data/tilesets/secondary/ever_grande/anim/flowers/7.png b/data/tilesets/secondary/ever_grande/anim/flowers/7.png index 4d43dfd0a9d6c1de80dd68476f017fcc0e91ea56..c45b6188cf41fd900b40e02431713bc160ffc040 100644 GIT binary patch delta 59 zcmV-B0L1_P0saAyEHTCZq=Us`TBI>SVi02PYWCi0_N*Yya|r*zq+(h@IWhmml-_D$%|TM6)x~qg Rq(QWU7^G^z9Dx~;U7=299C-i$ From d99ac2e44a3d99f0871038c53bfc8b6a57990ce0 Mon Sep 17 00:00:00 2001 From: ultima-soul Date: Thu, 9 Dec 2021 09:51:28 -0800 Subject: [PATCH 246/417] Resolved review suggestions for upstream Pokemon Expansion sync. --- include/link_rfu.h | 2 +- src/battle_anim_effects_3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/link_rfu.h b/include/link_rfu.h index 0e5e7b4727..d52c2fef6a 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -102,7 +102,7 @@ struct RfuGameCompatibilityData struct __attribute__((packed, aligned(2))) RfuGameData { struct RfuGameCompatibilityData compatibility; - u8 partnerInfo[RFU_CHILD_MAX]; + u8 partnerInfo[RFU_CHILD_MAX]; u16 tradeSpecies; u8 activity:7; u8 startedActivity:1; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index f3bf7d3e99..5b1f8eb9c2 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -3247,7 +3247,7 @@ void AnimTask_RolePlaySilhouette(u8 taskId) } coord1 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); - coord2 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X); + coord2 = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); spriteId = CreateAdditionalMonSpriteForMoveAnim(species, isBackPic, 0, coord1 + xOffset, coord2, 5, personality, otId, gBattleAnimTarget); gSprites[spriteId].oam.priority = priority; From 5bef2d0fb2443ae4449944ad89f7bfc387be7e25 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 10 Dec 2021 11:14:25 +0100 Subject: [PATCH 247/417] moved pokemon icon to the top left --- src/pokemon_debug.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 13971410db..a557f6d7c8 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -40,13 +40,13 @@ #define DEBUG_MON_Y 11 #define DEBUG_MON_BACK_X 40 #define DEBUG_MON_BACK_Y 50 -#define DEBUG_ICON_X 158 -#define DEBUG_ICON_Y 90 +#define DEBUG_ICON_X 19//158 + 32 +#define DEBUG_ICON_Y 19//90 + 40 #define DEBUG_MON_SHINY 0 #define DEBUG_MON_NORMAL 9 #define MODIFY_DIGITS_MAX 4 -#define MODIFY_DIGITS_ARROW_X 22 +#define MODIFY_DIGITS_ARROW_X 38 #define MODIFY_DIGITS_ARROW1_Y 12 #define MODIFY_DIGITS_ARROW2_Y 36 @@ -101,7 +101,7 @@ static const struct WindowTemplate sDebugPokemonInstructionsTemplate = static const struct WindowTemplate sModifyWindowTemplate = { .bg = 0, - .tilemapLeft = 2, + .tilemapLeft = 4, .tilemapTop = 2, .width = 14, .height = 2, @@ -488,7 +488,7 @@ void CB2_Debug_Pokemon(void) gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isShiny, data->isFemale, data->isShiny); + data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, data->isShiny, data->isFemale, data->isShiny); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows @@ -712,7 +712,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) gSprites[data->backspriteId].oam.priority = 0; //Icon Sprite - data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X + 32, DEBUG_ICON_Y + 40, 4, data->isShiny, data->isFemale, data->isShiny); + data->iconspriteId = CreateMonIconCustom(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, data->isShiny, data->isFemale, data->isShiny); gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows From 31330bef96932d45b8e64602022a413118268f1d Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 10 Dec 2021 12:29:50 +0100 Subject: [PATCH 248/417] proper Window usage --- src/pokemon_debug.c | 120 +++++++++++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 46 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index a557f6d7c8..44a64afae1 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -82,42 +82,53 @@ struct PokemonDebugMenu bool8 isShiny; bool8 isFemale; struct PokemonDebugModifyArrows modifyArrows; - u8 modifyWindowId; - u8 messageBoxWindowId; }; //WindowTemplates -static const struct WindowTemplate sDebugPokemonInstructionsTemplate = +#define WIN_NAME_NUMBERS 0 +#define WIN_INSTRUCTIONS 1 +#define WIN_BACK_SPRITE_LINE 2 +#define WIN_ANIM_INFORMATION 3 +#define WIN_END 4 +static const struct WindowTemplate sPokemonDebugWindowTemplate[] = { - .bg = 0, - .tilemapLeft =1, - .tilemapTop = 207, - .width = 22, - .height = 8, - .paletteNum = 0xF, - .baseBlock = 0x300 -}; - -static const struct WindowTemplate sModifyWindowTemplate = -{ - .bg = 0, - .tilemapLeft = 4, - .tilemapTop = 2, - .width = 14, - .height = 2, - .paletteNum = 0xF, - .baseBlock = 0x200 -}; - -static const struct WindowTemplate sPokemonDebugMsgBoxWindowTemplate = -{ - .bg = 0, - .tilemapLeft = 3, - .tilemapTop = 14, - .width = 11, - .height = 1, - .paletteNum = 0xF, - .baseBlock = 0x100 + [WIN_NAME_NUMBERS] = { + .bg = 0, + .tilemapLeft = 4, + .tilemapTop = 2, + .width = 14, + .height = 2, + .paletteNum = 0xF, + .baseBlock = 1 + 640 + }, + [WIN_INSTRUCTIONS] = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 15, + .width = 15, + .height = 5, + .paletteNum = 0xF, + .baseBlock = 1 + 640 + 28 + }, + [WIN_BACK_SPRITE_LINE] = { + .bg = 0, + .tilemapLeft = 3, + .tilemapTop = 14, + .width = 11, + .height = 1, + .paletteNum = 0xF, + .baseBlock = 1 + 640 + 28 + 75 + }, + [WIN_ANIM_INFORMATION] = { + .bg = 0, + .tilemapLeft = 16, + .tilemapTop = 14, + .width = 11, + .height = 1, + .paletteNum = 0xF, + .baseBlock = 1 + 640 + 28 + 75 + 11 + 30 + }, + DUMMY_WIN_TEMPLATE, }; #if P_ENABLE_DEBUG @@ -225,8 +236,8 @@ static void PrintDigitChars(struct PokemonDebugMenu *data) text[i++] = CHAR_SPACE; StringCopy(&text[i], gSpeciesNames[species]); - FillWindowPixelBuffer(data->modifyWindowId, 0x11); - AddTextPrinterParameterized(data->modifyWindowId, 1, text, 3, 0, 0, NULL); + FillWindowPixelBuffer(WIN_NAME_NUMBERS, 0x11); + AddTextPrinterParameterized(WIN_NAME_NUMBERS, 1, text, 3, 0, 0, NULL); } static u32 CharDigitsToValue(u8 *charDigits, u8 maxDigits) @@ -414,6 +425,20 @@ void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isS // ******************************* // Main functions +static void ResetPokemonDebugWindows(void) +{ + u8 i; + + FreeAllWindowBuffers(); + InitWindows(sPokemonDebugWindowTemplate); + + for (i = 0; i < WIN_END + 1; i++) + { + FillWindowPixelBuffer(i, PIXEL_FILL(0)); + PutWindowTilemap(i); + CopyWindowToVram(i, 2); + } +} void CB2_Debug_Pokemon(void) { u8 taskId; @@ -445,6 +470,11 @@ void CB2_Debug_Pokemon(void) gMain.state++; break; case 2: + FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 15); + ResetPokemonDebugWindows(); + gMain.state++; + break; + case 3: AllocateMonSpritesGfx(); LoadPalette(sBgColor, 0, 2); @@ -463,10 +493,10 @@ void CB2_Debug_Pokemon(void) data->currentmonId = SPECIES_BULBASAUR; species = data->currentmonId; - data->InstructionsWindowId = AddWindow(&sDebugPokemonInstructionsTemplate); - PutWindowTilemap(data->InstructionsWindowId); - PrintInstructionsOnWindow(data->InstructionsWindowId, data); + //Print instructions + PrintInstructionsOnWindow(WIN_INSTRUCTIONS, data); + //Front HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); data->isShiny = FALSE; data->isFemale = FALSE; @@ -477,6 +507,7 @@ void CB2_Debug_Pokemon(void) gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; + //Back HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); @@ -492,21 +523,15 @@ void CB2_Debug_Pokemon(void) gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows - data->modifyWindowId = AddWindow(&sModifyWindowTemplate); - PutWindowTilemap(data->modifyWindowId); - CopyWindowToVram(data->modifyWindowId, 3); SetUpModifyArrows(data); PrintDigitChars(data); //MessageBox line - data->messageBoxWindowId = AddWindow(&sPokemonDebugMsgBoxWindowTemplate); - PutWindowTilemap(data->messageBoxWindowId); - CopyWindowToVram(data->messageBoxWindowId, 3); - FillWindowPixelRect(data->messageBoxWindowId, PIXEL_FILL(0x2), 0, 0, 90, 4); + FillWindowPixelRect(WIN_BACK_SPRITE_LINE, PIXEL_FILL(0x2), 0, 0, 90, 4); gMain.state++; break; - case 3: + case 4: EnableInterrupts(1); SetVBlankCallback(VBlankCB); SetMainCallback2(CB2_Debug_Runner); @@ -691,8 +716,10 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) AllocateMonSpritesGfx(); LoadMonIconPalette(species); - PrintInstructionsOnWindow(data->InstructionsWindowId, data); + //Update instructions + PrintInstructionsOnWindow(WIN_INSTRUCTIONS, data); + //Front HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); @@ -701,6 +728,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; + //Back HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); LoadCompressedSpritePalette(palette); From 963642d3090bc2d0ba529aa5dbee844892f27487 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 10 Dec 2021 16:18:39 +0100 Subject: [PATCH 249/417] added the option to change a sprites animation to check which animation fits the best --- src/pokemon.c | 5 +- src/pokemon_debug.c | 340 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 310 insertions(+), 35 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index 189fccdea5..9c26a8a196 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1854,8 +1854,11 @@ const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = #include "data/pokemon/form_change_table_pointers.h" // SPECIES_NONE are ignored in the following two tables, so decrement before accessing these arrays to get the right result - +#if P_ENABLE_DEBUG +const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = +#else static const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = +#endif { [SPECIES_BULBASAUR - 1] = ANIM_V_JUMPS_H_JUMPS, [SPECIES_IVYSAUR - 1] = ANIM_V_STRETCH, diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 44a64afae1..4ff6b5dc4d 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -38,15 +38,15 @@ //Defines #define DEBUG_MON_X 144 #define DEBUG_MON_Y 11 -#define DEBUG_MON_BACK_X 40 -#define DEBUG_MON_BACK_Y 50 -#define DEBUG_ICON_X 19//158 + 32 -#define DEBUG_ICON_Y 19//90 + 40 +#define DEBUG_MON_BACK_X 62 +#define DEBUG_MON_BACK_Y 80 +#define DEBUG_ICON_X 19 +#define DEBUG_ICON_Y 19 #define DEBUG_MON_SHINY 0 #define DEBUG_MON_NORMAL 9 #define MODIFY_DIGITS_MAX 4 -#define MODIFY_DIGITS_ARROW_X 38 +#define MODIFY_DIGITS_ARROW_X 41 #define MODIFY_DIGITS_ARROW1_Y 12 #define MODIFY_DIGITS_ARROW2_Y 36 @@ -82,14 +82,17 @@ struct PokemonDebugMenu bool8 isShiny; bool8 isFemale; struct PokemonDebugModifyArrows modifyArrows; + u8 animIdBack; + u8 animIdFront; }; //WindowTemplates #define WIN_NAME_NUMBERS 0 #define WIN_INSTRUCTIONS 1 #define WIN_BACK_SPRITE_LINE 2 -#define WIN_ANIM_INFORMATION 3 -#define WIN_END 4 +#define WIN_ANIM_INFORMATION_FRONT 3 +#define WIN_ANIM_INFORMATION_BACK 4 +#define WIN_END 5 static const struct WindowTemplate sPokemonDebugWindowTemplate[] = { [WIN_NAME_NUMBERS] = { @@ -99,7 +102,7 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = .width = 14, .height = 2, .paletteNum = 0xF, - .baseBlock = 1 + 640 + .baseBlock = 1 }, [WIN_INSTRUCTIONS] = { .bg = 0, @@ -108,30 +111,227 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = .width = 15, .height = 5, .paletteNum = 0xF, - .baseBlock = 1 + 640 + 28 + .baseBlock = 1 + 28 }, [WIN_BACK_SPRITE_LINE] = { .bg = 0, - .tilemapLeft = 3, + .tilemapLeft = 2, .tilemapTop = 14, .width = 11, .height = 1, .paletteNum = 0xF, - .baseBlock = 1 + 640 + 28 + 75 + .baseBlock = 1 + 28 + 75 }, - [WIN_ANIM_INFORMATION] = { + [WIN_ANIM_INFORMATION_FRONT] = { .bg = 0, - .tilemapLeft = 16, - .tilemapTop = 14, - .width = 11, - .height = 1, + .tilemapLeft = 14, + .tilemapTop = 12, + .width = 16, + .height = 3, .paletteNum = 0xF, - .baseBlock = 1 + 640 + 28 + 75 + 11 + 30 + .baseBlock = 1 + 28 + 75 + 11 + }, + [WIN_ANIM_INFORMATION_BACK] = { + .bg = 0, + .tilemapLeft = 14, + .tilemapTop = 15, + .width = 16, + .height = 3, + .paletteNum = 0xF, + .baseBlock = 1 + 28 + 75 + 11 + 48 }, DUMMY_WIN_TEMPLATE, }; #if P_ENABLE_DEBUG +extern const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1]; +const u8 gBackAnimNames[][23 + 1] = +{ + [BACK_ANIM_NONE] = _("NONE"), + [BACK_ANIM_H_VIBRATE] = _("H VIBRATE"), + [BACK_ANIM_H_SLIDE] = _("H SLIDE"), + [BACK_ANIM_H_SPRING] = _("H SPRING"), + [BACK_ANIM_H_SPRING_REPEATED] = _("H SPRING REPEATED"), + [BACK_ANIM_SHRINK_GROW] = _("SHRINK GROW"), + [BACK_ANIM_GROW] = _("GROW"), + [BACK_ANIM_CIRCLE_COUNTERCLOCKWISE] = _("CIRCLE COUNTERCLOCKWISE"), + [BACK_ANIM_H_SHAKE] = _("H SHAKE"), + [BACK_ANIM_V_SHAKE] = _("V SHAKE"), + [BACK_ANIM_V_SHAKE_H_SLIDE] = _("V SHAKE H SLIDE"), + [BACK_ANIM_V_STRETCH] = _("V STRETCH"), + [BACK_ANIM_H_STRETCH] = _("H STRETCH"), + [BACK_ANIM_GROW_STUTTER] = _("GROW STUTTER"), + [BACK_ANIM_V_SHAKE_LOW] = _("V SHAKE LOW"), + [BACK_ANIM_TRIANGLE_DOWN] = _("TRIANGLE DOWN"), + [BACK_ANIM_CONCAVE_ARC_LARGE] = _("CONCAVE ARC LARGE"), + [BACK_ANIM_CONVEX_DOUBLE_ARC] = _("CONVEX DOUBLE ARC"), + [BACK_ANIM_CONCAVE_ARC_SMALL] = _("CONCAVE ARC SMALL"), + [BACK_ANIM_DIP_RIGHT_SIDE] = _("DIP RIGHT SIDE"), + [BACK_ANIM_SHRINK_GROW_VIBRATE] = _("SHRINK GROW VIBRATE"), + [BACK_ANIM_JOLT_RIGHT] = _("JOLT RIGHT"), + [BACK_ANIM_SHAKE_FLASH_YELLOW] = _("SHAKE FLASH YELLOW"), + [BACK_ANIM_SHAKE_GLOW_RED] = _("SHAKE GLOW RED"), + [BACK_ANIM_SHAKE_GLOW_GREEN] = _("SHAKE GLOW GREEN"), + [BACK_ANIM_SHAKE_GLOW_BLUE] = _("SHAKE GLOW BLUE"), +}; +const u8 gFrontAnimNames[][34] = +{ + [ANIM_V_SQUISH_AND_BOUNCE] = _("V SQUISH AND BOUNCE"), + [ANIM_CIRCULAR_STRETCH_TWICE] = _("CIRCULAR STRETCH TWICE"), + [ANIM_H_VIBRATE] = _("H VIBRATE"), + [ANIM_H_SLIDE] = _("H SLIDE"), + [ANIM_V_SLIDE] = _("V SLIDE"), + [ANIM_BOUNCE_ROTATE_TO_SIDES] = _("BOUNCE ROTATE TO SIDES"), + [ANIM_V_JUMPS_H_JUMPS] = _("V JUMPS H JUMPS"), + [ANIM_ROTATE_TO_SIDES] = _("ROTATE TO SIDES"), + [ANIM_ROTATE_TO_SIDES_TWICE] = _("ROTATE TO SIDES TWICE"), + [ANIM_GROW_VIBRATE] = _("GROW VIBRATE"), + [ANIM_ZIGZAG_FAST] = _("ZIGZAG FAST"), + [ANIM_SWING_CONCAVE] = _("SWING CONCAVE"), + [ANIM_SWING_CONCAVE_FAST] = _("SWING CONCAVE FAST"), + [ANIM_SWING_CONVEX] = _("SWING CONVEX"), + [ANIM_SWING_CONVEX_FAST] = _("SWING CONVEX FAST"), + [ANIM_H_SHAKE] = _("H SHAKE"), + [ANIM_V_SHAKE] = _("V SHAKE"), + [ANIM_CIRCULAR_VIBRATE] = _("CIRCULAR VIBRATE"), + [ANIM_TWIST] = _("TWIST"), + [ANIM_SHRINK_GROW] = _("SHRINK GROW"), + [ANIM_CIRCLE_C_CLOCKWISE] = _("CIRCLE C CLOCKWISE"), + [ANIM_GLOW_BLACK] = _("GLOW BLACK"), + [ANIM_H_STRETCH] = _("H STRETCH"), + [ANIM_V_STRETCH] = _("V STRETCH"), + [ANIM_RISING_WOBBLE] = _("RISING WOBBLE"), + [ANIM_V_SHAKE_TWICE] = _("V SHAKE TWICE"), + [ANIM_TIP_MOVE_FORWARD] = _("TIP MOVE FORWARD"), + [ANIM_H_PIVOT] = _("H PIVOT"), + [ANIM_V_SLIDE_WOBBLE] = _("V SLIDE WOBBLE"), + [ANIM_H_SLIDE_WOBBLE] = _("H SLIDE WOBBLE"), + [ANIM_V_JUMPS_BIG] = _("V JUMPS BIG"), + [ANIM_SPIN_LONG] = _("SPIN LONG"), + [ANIM_GLOW_ORANGE] = _("GLOW ORANGE"), + [ANIM_GLOW_RED] = _("GLOW RED"), + [ANIM_GLOW_BLUE] = _("GLOW BLUE"), + [ANIM_GLOW_YELLOW] = _("GLOW YELLOW"), + [ANIM_GLOW_PURPLE] = _("GLOW PURPLE"), + [ANIM_BACK_AND_LUNGE] = _("BACK AND LUNGE"), + [ANIM_BACK_FLIP] = _("BACK FLIP"), + [ANIM_FLICKER] = _("FLICKER"), + [ANIM_BACK_FLIP_BIG] = _("BACK FLIP BIG"), + [ANIM_FRONT_FLIP] = _("FRONT FLIP"), + [ANIM_TUMBLING_FRONT_FLIP] = _("TUMBLING FRONT FLIP"), + [ANIM_FIGURE_8] = _("FIGURE 8"), + [ANIM_FLASH_YELLOW] = _("FLASH YELLOW"), + [ANIM_SWING_CONCAVE_FAST_SHORT] = _("SWING CONCAVE FAST SHORT"), + [ANIM_SWING_CONVEX_FAST_SHORT] = _("SWING CONVEX FAST SHORT"), + [ANIM_ROTATE_UP_SLAM_DOWN] = _("ROTATE UP SLAM DOWN"), + [ANIM_DEEP_V_SQUISH_AND_BOUNCE] = _("DEEP V SQUISH AND BOUNCE"), + [ANIM_H_JUMPS] = _("H JUMPS"), + [ANIM_H_JUMPS_V_STRETCH] = _("H JUMPS V STRETCH"), + [ANIM_ROTATE_TO_SIDES_FAST] = _("ROTATE TO SIDES FAST"), + [ANIM_ROTATE_UP_TO_SIDES] = _("ROTATE UP TO SIDES"), + [ANIM_FLICKER_INCREASING] = _("FLICKER INCREASING"), + [ANIM_TIP_HOP_FORWARD] = _("TIP HOP FORWARD"), + [ANIM_PIVOT_SHAKE] = _("PIVOT SHAKE"), + [ANIM_TIP_AND_SHAKE] = _("TIP AND SHAKE"), + [ANIM_VIBRATE_TO_CORNERS] = _("VIBRATE TO CORNERS"), + [ANIM_GROW_IN_STAGES] = _("GROW IN STAGES"), + [ANIM_V_SPRING] = _("V SPRING"), + [ANIM_V_REPEATED_SPRING] = _("V REPEATED SPRING"), + [ANIM_SPRING_RISING] = _("SPRING RISING"), + [ANIM_H_SPRING] = _("H SPRING"), + [ANIM_H_REPEATED_SPRING_SLOW] = _("H REPEATED SPRING SLOW"), + [ANIM_H_SLIDE_SHRINK] = _("H SLIDE SHRINK"), + [ANIM_LUNGE_GROW] = _("LUNGE GROW"), + [ANIM_CIRCLE_INTO_BG] = _("CIRCLE INTO BG"), + [ANIM_RAPID_H_HOPS] = _("RAPID H HOPS"), + [ANIM_FOUR_PETAL] = _("FOUR PETAL"), + [ANIM_V_SQUISH_AND_BOUNCE_SLOW] = _("V SQUISH AND BOUNCE SLOW"), + [ANIM_H_SLIDE_SLOW] = _("H SLIDE SLOW"), + [ANIM_V_SLIDE_SLOW] = _("V SLIDE SLOW"), + [ANIM_BOUNCE_ROTATE_TO_SIDES_SMALL] = _("BOUNCE ROTATE TO SIDES SMALL"), + [ANIM_BOUNCE_ROTATE_TO_SIDES_SLOW] = _("BOUNCE ROTATE TO SIDES SLOW"), + [ANIM_BOUNCE_ROTATE_TO_SIDES_SMALL_SLOW] = _("BOUNCE ROTATE TO SIDES SMALL SLOW"), + [ANIM_ZIGZAG_SLOW] = _("ZIGZAG SLOW"), + [ANIM_H_SHAKE_SLOW] = _("H SHAKE SLOW"), + [ANIM_V_SHAKE_SLOW] = _("V SHAKE SLOW"), + [ANIM_TWIST_TWICE] = _("TWIST TWICE"), + [ANIM_CIRCLE_C_CLOCKWISE_SLOW] = _("CIRCLE C CLOCKWISE SLOW"), + [ANIM_V_SHAKE_TWICE_SLOW] = _("V SHAKE TWICE SLOW"), + [ANIM_V_SLIDE_WOBBLE_SMALL] = _("V SLIDE WOBBLE SMALL"), + [ANIM_V_JUMPS_SMALL] = _("V JUMPS SMALL"), + [ANIM_SPIN] = _("SPIN"), + [ANIM_TUMBLING_FRONT_FLIP_TWICE] = _("TUMBLING FRONT FLIP TWICE"), + [ANIM_DEEP_V_SQUISH_AND_BOUNCE_TWICE] = _("DEEP V SQUISH AND BOUNCE TWICE"), + [ANIM_H_JUMPS_V_STRETCH_TWICE] = _("H JUMPS V STRETCH TWICE"), + [ANIM_V_SHAKE_BACK] = _("V SHAKE BACK"), + [ANIM_V_SHAKE_BACK_SLOW] = _("V SHAKE BACK SLOW"), + [ANIM_V_SHAKE_H_SLIDE_SLOW] = _("V SHAKE H SLIDE SLOW"), + [ANIM_V_STRETCH_BOTH_ENDS_SLOW] = _("V STRETCH BOTH ENDS SLOW"), + [ANIM_H_STRETCH_FAR_SLOW] = _("H STRETCH FAR SLOW"), + [ANIM_V_SHAKE_LOW_TWICE] = _("V SHAKE LOW TWICE"), + [ANIM_H_SHAKE_FAST] = _("H SHAKE FAST"), + [ANIM_H_SLIDE_FAST] = _("H SLIDE FAST"), + [ANIM_H_VIBRATE_FAST] = _("H VIBRATE FAST"), + [ANIM_H_VIBRATE_FASTEST] = _("H VIBRATE FASTEST"), + [ANIM_V_SHAKE_BACK_FAST] = _("V SHAKE BACK FAST"), + [ANIM_V_SHAKE_LOW_TWICE_SLOW] = _("V SHAKE LOW TWICE SLOW"), + [ANIM_V_SHAKE_LOW_TWICE_FAST] = _("V SHAKE LOW TWICE FAST"), + [ANIM_CIRCLE_C_CLOCKWISE_LONG] = _("CIRCLE C CLOCKWISE LONG"), + [ANIM_GROW_STUTTER_SLOW] = _("GROW STUTTER SLOW"), + [ANIM_V_SHAKE_H_SLIDE] = _("V SHAKE H SLIDE"), + [ANIM_V_SHAKE_H_SLIDE_FAST] = _("V SHAKE H SLIDE FAST"), + [ANIM_TRIANGLE_DOWN_SLOW] = _("TRIANGLE DOWN SLOW"), + [ANIM_TRIANGLE_DOWN] = _("TRIANGLE DOWN"), + [ANIM_TRIANGLE_DOWN_TWICE] = _("TRIANGLE DOWN TWICE"), + [ANIM_GROW] = _("GROW"), + [ANIM_GROW_TWICE] = _("GROW TWICE"), + [ANIM_H_SPRING_FAST] = _("H SPRING FAST"), + [ANIM_H_SPRING_SLOW] = _("H SPRING SLOW"), + [ANIM_H_REPEATED_SPRING_FAST] = _("H REPEATED SPRING FAST"), + [ANIM_H_REPEATED_SPRING] = _("H REPEATED SPRING"), + [ANIM_SHRINK_GROW_FAST] = _("SHRINK GROW FAST"), + [ANIM_SHRINK_GROW_SLOW] = _("SHRINK GROW SLOW"), + [ANIM_V_STRETCH_BOTH_ENDS] = _("V STRETCH BOTH ENDS"), + [ANIM_V_STRETCH_BOTH_ENDS_TWICE] = _("V STRETCH BOTH ENDS TWICE"), + [ANIM_H_STRETCH_FAR_TWICE] = _("H STRETCH FAR TWICE"), + [ANIM_H_STRETCH_FAR] = _("H STRETCH FAR"), + [ANIM_GROW_STUTTER_TWICE] = _("GROW STUTTER TWICE"), + [ANIM_GROW_STUTTER] = _("GROW STUTTER"), + [ANIM_CONCAVE_ARC_LARGE_SLOW] = _("CONCAVE ARC LARGE SLOW"), + [ANIM_CONCAVE_ARC_LARGE] = _("CONCAVE ARC LARGE"), + [ANIM_CONCAVE_ARC_LARGE_TWICE] = _("CONCAVE ARC LARGE TWICE"), + [ANIM_CONVEX_DOUBLE_ARC_SLOW] = _("CONVEX DOUBLE ARC SLOW"), + [ANIM_CONVEX_DOUBLE_ARC] = _("CONVEX DOUBLE ARC"), + [ANIM_CONVEX_DOUBLE_ARC_TWICE] = _("CONVEX DOUBLE ARC TWICE"), + [ANIM_CONCAVE_ARC_SMALL_SLOW] = _("CONCAVE ARC SMALL SLOW"), + [ANIM_CONCAVE_ARC_SMALL] = _("CONCAVE ARC SMALL"), + [ANIM_CONCAVE_ARC_SMALL_TWICE] = _("CONCAVE ARC SMALL TWICE"), + [ANIM_H_DIP] = _("H DIP"), + [ANIM_H_DIP_FAST] = _("H DIP FAST"), + [ANIM_H_DIP_TWICE] = _("H DIP TWICE"), + [ANIM_SHRINK_GROW_VIBRATE_FAST] = _("SHRINK GROW VIBRATE FAST"), + [ANIM_SHRINK_GROW_VIBRATE] = _("SHRINK GROW VIBRATE"), + [ANIM_SHRINK_GROW_VIBRATE_SLOW] = _("SHRINK GROW VIBRATE SLOW"), + [ANIM_JOLT_RIGHT_FAST] = _("JOLT RIGHT FAST"), + [ANIM_JOLT_RIGHT] = _("JOLT RIGHT"), + [ANIM_JOLT_RIGHT_SLOW] = _("JOLT RIGHT SLOW"), + [ANIM_SHAKE_FLASH_YELLOW_FAST] = _("SHAKE FLASH YELLOW FAST"), + [ANIM_SHAKE_FLASH_YELLOW] = _("SHAKE FLASH YELLOW"), + [ANIM_SHAKE_FLASH_YELLOW_SLOW] = _("SHAKE FLASH YELLOW SLOW"), + [ANIM_SHAKE_GLOW_RED_FAST] = _("SHAKE GLOW RED FAST"), + [ANIM_SHAKE_GLOW_RED] = _("SHAKE GLOW RED"), + [ANIM_SHAKE_GLOW_RED_SLOW] = _("SHAKE GLOW RED SLOW"), + [ANIM_SHAKE_GLOW_GREEN_FAST] = _("SHAKE GLOW GREEN FAST"), + [ANIM_SHAKE_GLOW_GREEN] = _("SHAKE GLOW GREEN"), + [ANIM_SHAKE_GLOW_GREEN_SLOW] = _("SHAKE GLOW GREEN SLOW"), + [ANIM_SHAKE_GLOW_BLUE_FAST] = _("SHAKE GLOW BLUE FAST"), + [ANIM_SHAKE_GLOW_BLUE] = _("SHAKE GLOW BLUE"), + [ANIM_SHAKE_GLOW_BLUE_SLOW] = _("SHAKE GLOW BLUE SLOW"), + [ANIM_SHAKE_GLOW_BLACK_SLOW] = _("SHAKE GLOW BLACK SLOW"), + [ANIM_SHAKE_GLOW_WHITE_SLOW] = _("SHAKE GLOW WHITE SLOW"), + [ANIM_SHAKE_GLOW_PURPLE_SLOW] = _("SHAKE GLOW PURPLE SLOW"), +}; + //Function declarations static void PrintDigitChars(struct PokemonDebugMenu *data); static void SetUpModifyArrows(struct PokemonDebugMenu *data); @@ -167,10 +367,10 @@ static void PadString(const u8 *src, u8 *dst) static void PrintInstructionsOnWindow(u8 windowId, struct PokemonDebugMenu *data) { - u8 text[] = _("{A_BUTTON} Shiny\n{L_BUTTON} Back {R_BUTTON} Front$"); - u8 textGender[] = _("{A_BUTTON} Shiny\n{L_BUTTON} Back {R_BUTTON} Front {SELECT_BUTTON} Gender$"); - u8 textForms[] = _("{A_BUTTON} Shiny {START_BUTTON} Forms\n{L_BUTTON} Back {R_BUTTON} Front$"); - u8 textGenderForms[] = _("{A_BUTTON} Shiny {START_BUTTON} Forms\n{L_BUTTON} Back {R_BUTTON} Front {SELECT_BUTTON} Gender$"); + u8 text[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny$"); + u8 textGender[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny\n{SELECT_BUTTON} Gender$"); + u8 textForms[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny\n{START_BUTTON} Forms$"); + u8 textGenderForms[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny\n{START_BUTTON} Forms {SELECT_BUTTON} Gender$"); u16 species = data->modifyArrows.currValue; @@ -178,16 +378,16 @@ static void PrintInstructionsOnWindow(u8 windowId, struct PokemonDebugMenu *data if (SpeciesHasGenderDifference[species]) { if (gFormSpeciesIdTables[data->currentmonId] != NULL) - AddTextPrinterParameterized(windowId, 1, textGenderForms, 0, 0, 0, NULL); + AddTextPrinterParameterized(windowId, 0, textGenderForms, 0, 0, 0, NULL); else - AddTextPrinterParameterized(windowId, 1, textGender, 0, 0, 0, NULL); + AddTextPrinterParameterized(windowId, 0, textGender, 0, 0, 0, NULL); } else { if (gFormSpeciesIdTables[data->currentmonId] != NULL) - AddTextPrinterParameterized(windowId, 1, textForms, 0, 0, 0, NULL); + AddTextPrinterParameterized(windowId, 0, textForms, 0, 0, 0, NULL); else - AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL); + AddTextPrinterParameterized(windowId, 0, text, 0, 0, 0, NULL); } CopyWindowToVram(windowId, 3); } @@ -237,7 +437,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data) StringCopy(&text[i], gSpeciesNames[species]); FillWindowPixelBuffer(WIN_NAME_NUMBERS, 0x11); - AddTextPrinterParameterized(WIN_NAME_NUMBERS, 1, text, 3, 0, 0, NULL); + AddTextPrinterParameterized(WIN_NAME_NUMBERS, 1, text, 6, 0, 0, NULL); } static u32 CharDigitsToValue(u8 *charDigits, u8 maxDigits) @@ -425,6 +625,29 @@ void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isS // ******************************* // Main functions +static void UpdateMonAnimNames(u8 taskId) +{ + struct PokemonDebugMenu *data = GetStructPtr(taskId); + u8 frontAnim = data->animIdFront; + u8 backAnim = data->animIdBack; + u8 textFront[] = _("FRONT {R_BUTTON} + {DPAD_LEFTRIGHT}$"); + u8 textBack[] = _("BACK {L_BUTTON} + {DPAD_LEFTRIGHT}$"); + u8 text[34]; + u8 fontId = 0; + + //Front + FillWindowPixelBuffer(WIN_ANIM_INFORMATION_FRONT, PIXEL_FILL(0)); + AddTextPrinterParameterized(WIN_ANIM_INFORMATION_FRONT, fontId, textFront, 0, 0, 0, NULL); + StringCopy(text, gFrontAnimNames[frontAnim]); + AddTextPrinterParameterized(WIN_ANIM_INFORMATION_FRONT, fontId, text, 4, 12, 0, NULL); + + //Back + FillWindowPixelBuffer(WIN_ANIM_INFORMATION_BACK, PIXEL_FILL(0)); + AddTextPrinterParameterized(WIN_ANIM_INFORMATION_BACK, fontId, textBack, 0, 0, 0, NULL); + StringCopy(text, gBackAnimNames[backAnim]); + AddTextPrinterParameterized(WIN_ANIM_INFORMATION_BACK, fontId, text, 4, 12, 0, NULL); +} + static void ResetPokemonDebugWindows(void) { u8 i; @@ -434,9 +657,11 @@ static void ResetPokemonDebugWindows(void) for (i = 0; i < WIN_END + 1; i++) { + if (i == WIN_BACK_SPRITE_LINE) + continue; FillWindowPixelBuffer(i, PIXEL_FILL(0)); PutWindowTilemap(i); - CopyWindowToVram(i, 2); + CopyWindowToVram(i, 3); } } void CB2_Debug_Pokemon(void) @@ -514,7 +739,7 @@ void CB2_Debug_Pokemon(void) SetMultiuseSpriteTemplateToPokemon(species, 2); gMultiuseSpriteTemplate.paletteTag = palette->tag; offset_y = gMonBackPicCoords[species].y_offset; - data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 30 + offset_y, 0); + data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X, DEBUG_MON_BACK_Y + offset_y, 0); gSprites[data->backspriteId].callback = SpriteCallbackDummy; gSprites[data->backspriteId].oam.priority = 0; @@ -527,7 +752,14 @@ void CB2_Debug_Pokemon(void) PrintDigitChars(data); //MessageBox line + PutWindowTilemap(WIN_BACK_SPRITE_LINE); FillWindowPixelRect(WIN_BACK_SPRITE_LINE, PIXEL_FILL(0x2), 0, 0, 90, 4); + CopyWindowToVram(WIN_BACK_SPRITE_LINE, 3); + + //Anim names + data->animIdBack = GetSpeciesBackAnimSet(species) + 1; + data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; + UpdateMonAnimNames(taskId); gMain.state++; break; @@ -592,19 +824,54 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) struct PokemonDebugMenu *data = GetStructPtr(taskId); struct Sprite *Frontsprite = &gSprites[data->frontspriteId]; struct Sprite *Backsprite = &gSprites[data->backspriteId]; - - if (JOY_NEW(L_BUTTON) && (Backsprite->callback == SpriteCallbackDummy)) + + //Back + if (JOY_HELD(L_BUTTON) && JOY_NEW(DPAD_LEFT)) + { + if (data->animIdBack <= 1) + data->animIdBack = BACK_ANIM_SHAKE_GLOW_BLUE; + else + data->animIdBack -= 1; + UpdateMonAnimNames(taskId); + } + else if (JOY_HELD(L_BUTTON) && JOY_NEW(DPAD_RIGHT)) + { + if (data->animIdBack >= BACK_ANIM_SHAKE_GLOW_BLUE) + data->animIdBack = 1; + else + data->animIdBack += 1; + UpdateMonAnimNames(taskId); + } + else if (JOY_NEW(L_BUTTON) && (Backsprite->callback == SpriteCallbackDummy)) { PlayCryInternal(data->currentmonId, 0, 120, 10, 0); - LaunchAnimationTaskForBackSprite(Backsprite, GetSpeciesBackAnimSet(data->currentmonId)); + LaunchAnimationTaskForBackSprite(Backsprite, data->animIdBack-1); + } + //Front + else if (JOY_HELD(R_BUTTON) && JOY_NEW(DPAD_LEFT)) + { + if (data->animIdFront <= 0) + data->animIdFront = ANIM_SHAKE_GLOW_PURPLE_SLOW; + else + data->animIdFront -= 1; + UpdateMonAnimNames(taskId); + } + else if (JOY_HELD(R_BUTTON) && JOY_NEW(DPAD_RIGHT)) + { + if (data->animIdFront >= ANIM_SHAKE_GLOW_PURPLE_SLOW) + data->animIdFront = 0; + else + data->animIdFront += 1; + UpdateMonAnimNames(taskId); } else if (JOY_NEW(R_BUTTON) && (Frontsprite->callback == SpriteCallbackDummy)) { PlayCryInternal(data->currentmonId, 0, 120, 10, 0); if (HasTwoFramesAnimation(data->currentmonId)) StartSpriteAnim(Frontsprite, 1); - BattleAnimateFrontSprite(Frontsprite, data->currentmonId, TRUE, 1); + LaunchAnimationTaskForFrontSprite(Frontsprite, data->animIdFront); } + //Rest else if (JOY_NEW(A_BUTTON)) { data->isShiny = !data->isShiny; @@ -656,6 +923,9 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) PrintDigitChars(data); UpdateBattlerValue(data); ReloadPokemonSprites(data); + data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; + data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; + UpdateMonAnimNames(taskId); } PlaySE(SE_DEX_SCROLL); @@ -670,10 +940,12 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) PrintDigitChars(data); UpdateBattlerValue(data); ReloadPokemonSprites(data); + data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; + data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; + UpdateMonAnimNames(taskId); } PlaySE(SE_DEX_SCROLL); - } else if (JOY_NEW(DPAD_LEFT)) // || gMain.heldKeys & DPAD_LEFT) { @@ -735,7 +1007,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) SetMultiuseSpriteTemplateToPokemon(species, 2); gMultiuseSpriteTemplate.paletteTag = palette->tag; offset_y = gMonBackPicCoords[species].y_offset; - data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X + 32, DEBUG_MON_BACK_Y + 30 + offset_y, 0); + data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X, DEBUG_MON_BACK_Y + offset_y, 0); gSprites[data->backspriteId].callback = SpriteCallbackDummy; gSprites[data->backspriteId].oam.priority = 0; From ef01c401f7abd17ba09c6e5926fdcdf61b2d7fc5 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 10 Dec 2021 17:50:55 +0100 Subject: [PATCH 250/417] another fix for the shared front and back palette --- src/pokemon_debug.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 4ff6b5dc4d..78ab4f8751 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -36,8 +36,8 @@ #include "constants/items.h" //Defines -#define DEBUG_MON_X 144 -#define DEBUG_MON_Y 11 +#define DEBUG_MON_X 144 + 32 +#define DEBUG_MON_Y 11 + 40 #define DEBUG_MON_BACK_X 62 #define DEBUG_MON_BACK_Y 80 #define DEBUG_ICON_X 19 @@ -369,8 +369,8 @@ static void PrintInstructionsOnWindow(u8 windowId, struct PokemonDebugMenu *data { u8 text[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny$"); u8 textGender[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny\n{SELECT_BUTTON} Gender$"); - u8 textForms[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny\n{START_BUTTON} Forms$"); - u8 textGenderForms[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny\n{START_BUTTON} Forms {SELECT_BUTTON} Gender$"); + u8 textForms[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny {START_BUTTON} Forms$"); + u8 textGenderForms[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny {START_BUTTON} Forms\n{SELECT_BUTTON} Gender$"); u16 species = data->modifyArrows.currValue; @@ -721,25 +721,28 @@ void CB2_Debug_Pokemon(void) //Print instructions PrintInstructionsOnWindow(WIN_INSTRUCTIONS, data); + //Palettes + palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); + LoadCompressedSpritePalette(palette); //Front HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); data->isShiny = FALSE; data->isFemale = FALSE; BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); - data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X + 32, DEBUG_MON_Y + 40, 0); + gMultiuseSpriteTemplate.paletteTag = palette->tag; + data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X, DEBUG_MON_Y, 0); gSprites[data->frontspriteId].oam.paletteNum = 1; gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; //Back HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); - palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); - LoadCompressedSpritePalette(palette); + BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 4); SetMultiuseSpriteTemplateToPokemon(species, 2); - gMultiuseSpriteTemplate.paletteTag = palette->tag; offset_y = gMonBackPicCoords[species].y_offset; data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X, DEBUG_MON_BACK_Y + offset_y, 0); + gSprites[data->backspriteId].oam.paletteNum = 4; gSprites[data->backspriteId].callback = SpriteCallbackDummy; gSprites[data->backspriteId].oam.priority = 0; @@ -991,23 +994,26 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) //Update instructions PrintInstructionsOnWindow(WIN_INSTRUCTIONS, data); + //Palettes + palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); + LoadCompressedSpritePalette(palette); //Front HandleLoadSpecialPokePicCustom(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[1], species, 0, data->isFemale); BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); - data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X + 32, DEBUG_MON_Y + 40, 0); + gMultiuseSpriteTemplate.paletteTag = palette->tag; + data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X, DEBUG_MON_Y, 0); gSprites[data->frontspriteId].oam.paletteNum = 1; gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; //Back HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); - palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); - LoadCompressedSpritePalette(palette); + BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 4); SetMultiuseSpriteTemplateToPokemon(species, 2); - gMultiuseSpriteTemplate.paletteTag = palette->tag; offset_y = gMonBackPicCoords[species].y_offset; data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X, DEBUG_MON_BACK_Y + offset_y, 0); + gSprites[data->backspriteId].oam.paletteNum = 4; gSprites[data->backspriteId].callback = SpriteCallbackDummy; gSprites[data->backspriteId].oam.priority = 0; From 44121b041c51cf6892a73295dd0a6051b740b074 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 10 Dec 2021 20:40:34 +0100 Subject: [PATCH 251/417] added battle bg's and platforms and a function LoadBattleBg to change them --- src/battle_bg.c | 4 + src/pokemon_debug.c | 187 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 167 insertions(+), 24 deletions(-) diff --git a/src/battle_bg.c b/src/battle_bg.c index f739a002f6..65f30243e9 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -598,7 +598,11 @@ const struct WindowTemplate * const gBattleWindowTemplates[] = [B_WIN_TYPE_ARENA] = gBattleArenaWindowTemplates, }; +#if P_ENABLE_DEBUG +const struct BattleBackground sBattleTerrainTable[] = +#else static const struct BattleBackground sBattleTerrainTable[] = +#endif { [BATTLE_TERRAIN_GRASS] = { diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 78ab4f8751..7a9804a048 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -9,6 +9,7 @@ #include "decompress.h" #include "field_weather.h" #include "gpu_regs.h" +#include "graphics.h" #include "item.h" #include "item_icon.h" #include "list_menu.h" @@ -84,15 +85,56 @@ struct PokemonDebugMenu struct PokemonDebugModifyArrows modifyArrows; u8 animIdBack; u8 animIdFront; + u8 battleBgType; + u8 battleTerrain; +}; + +static const struct BgTemplate sBgTemplates[] = +{ + { + .bg = 0, + .charBaseIndex = 0, + .mapBaseIndex = 24, + .screenSize = 2, + .paletteMode = 0, + .priority = 0, + .baseTile = 0 + }, + { + .bg = 1, + .charBaseIndex = 1, + .mapBaseIndex = 28, + .screenSize = 2, + .paletteMode = 0, + .priority = 0, + .baseTile = 0 + }, + { + .bg = 2, + .charBaseIndex = 1, + .mapBaseIndex = 30, + .screenSize = 1, + .paletteMode = 0, + .priority = 1, + .baseTile = 0 + }, + { + .bg = 3, + .charBaseIndex = 2, + .mapBaseIndex = 26, + .screenSize = 1, + .paletteMode = 0, + .priority = 3, + .baseTile = 0 + }, }; //WindowTemplates #define WIN_NAME_NUMBERS 0 #define WIN_INSTRUCTIONS 1 -#define WIN_BACK_SPRITE_LINE 2 -#define WIN_ANIM_INFORMATION_FRONT 3 -#define WIN_ANIM_INFORMATION_BACK 4 -#define WIN_END 5 +#define WIN_ANIM_INFORMATION_FRONT 2 +#define WIN_ANIM_INFORMATION_BACK 3 +#define WIN_END 4 static const struct WindowTemplate sPokemonDebugWindowTemplate[] = { [WIN_NAME_NUMBERS] = { @@ -113,15 +155,6 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = .paletteNum = 0xF, .baseBlock = 1 + 28 }, - [WIN_BACK_SPRITE_LINE] = { - .bg = 0, - .tilemapLeft = 2, - .tilemapTop = 14, - .width = 11, - .height = 1, - .paletteNum = 0xF, - .baseBlock = 1 + 28 + 75 - }, [WIN_ANIM_INFORMATION_FRONT] = { .bg = 0, .tilemapLeft = 14, @@ -129,7 +162,7 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = .width = 16, .height = 3, .paletteNum = 0xF, - .baseBlock = 1 + 28 + 75 + 11 + .baseBlock = 1 + 28 + 75 }, [WIN_ANIM_INFORMATION_BACK] = { .bg = 0, @@ -138,7 +171,7 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = .width = 16, .height = 3, .paletteNum = 0xF, - .baseBlock = 1 + 28 + 75 + 11 + 48 + .baseBlock = 1 + 28 + 75 + 48 }, DUMMY_WIN_TEMPLATE, }; @@ -623,6 +656,107 @@ void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isS LoadPalette(gDecompressionBuffer, 0x80 + battlerId * 16, 0x20); } +//Battle background functions +struct BattleBackground +{ + const void *tileset; + const void *tilemap; + const void *entryTileset; + const void *entryTilemap; + const void *palette; +}; +extern const struct BattleBackground sBattleTerrainTable[]; +#define MAP_BATTLE_SCENE_NORMAL 0 +#define MAP_BATTLE_SCENE_GYM 1 +#define MAP_BATTLE_SCENE_MAGMA 2 +#define MAP_BATTLE_SCENE_AQUA 3 +#define MAP_BATTLE_SCENE_SIDNEY 4 +#define MAP_BATTLE_SCENE_PHOEBE 5 +#define MAP_BATTLE_SCENE_GLACIA 6 +#define MAP_BATTLE_SCENE_DRAKE 7 +#define MAP_BATTLE_SCENE_FRONTIER 8 +#define MAP_BATTLE_SCENE_LEADER 9 +#define MAP_BATTLE_SCENE_WALLACE 10 +#define MAP_BATTLE_SCENE_GROUDON 11 +#define MAP_BATTLE_SCENE_KYOGRE 12 +#define MAP_BATTLE_SCENE_RAYQUAZA 13 +static void LoadBattleBg(u8 battleBgType, u8 battleTerrain) +{ + switch (battleBgType) + { + default: + case MAP_BATTLE_SCENE_NORMAL: + LZDecompressVram(sBattleTerrainTable[battleTerrain].tileset, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(sBattleTerrainTable[battleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(sBattleTerrainTable[battleTerrain].palette, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_GYM: + LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_BuildingGym, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_MAGMA: + LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_StadiumMagma, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_AQUA: + LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_StadiumAqua, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_SIDNEY: + LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_StadiumSidney, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_PHOEBE: + LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_StadiumPhoebe, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_GLACIA: + LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_StadiumGlacia, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_DRAKE: + LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_StadiumDrake, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_FRONTIER: + LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_LEADER: + LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_BuildingLeader, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_WALLACE: + LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_StadiumWallace, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_GROUDON: + LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_Groudon, 0x20, 0x60); + case MAP_BATTLE_SCENE_KYOGRE: + LZDecompressVram(gBattleTerrainTiles_Water, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_Kyogre, 0x20, 0x60); + break; + case MAP_BATTLE_SCENE_RAYQUAZA: + LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void*)(BG_CHAR_ADDR(2))); + LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void*)(BG_SCREEN_ADDR(26))); + LoadCompressedPalette(gBattleTerrainPalette_Rayquaza, 0x20, 0x60); + break; + } +} + // ******************************* // Main functions static void UpdateMonAnimNames(u8 taskId) @@ -657,8 +791,6 @@ static void ResetPokemonDebugWindows(void) for (i = 0; i < WIN_END + 1; i++) { - if (i == WIN_BACK_SPRITE_LINE) - continue; FillWindowPixelBuffer(i, PIXEL_FILL(0)); PutWindowTilemap(i); CopyWindowToVram(i, 3); @@ -692,11 +824,18 @@ void CB2_Debug_Pokemon(void) FreeAllSpritePalettes(); gReservedSpritePaletteCount = 8; ResetAllPicSprites(); + //BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); + + FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 15); gMain.state++; break; case 2: - FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 15); - ResetPokemonDebugWindows(); + InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); + data->battleTerrain = 0; + data->battleBgType = 0; + LoadBattleBg(data->battleBgType, data->battleTerrain); + + ResetPokemonDebugWindows(); gMain.state++; break; case 3: @@ -708,6 +847,8 @@ void CB2_Debug_Pokemon(void) SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); ShowBg(0); ShowBg(1); + ShowBg(2); + ShowBg(3); //input task handler taskId = CreateTask(Handle_Input_Debug_Pokemon, 0); @@ -754,11 +895,6 @@ void CB2_Debug_Pokemon(void) SetUpModifyArrows(data); PrintDigitChars(data); - //MessageBox line - PutWindowTilemap(WIN_BACK_SPRITE_LINE); - FillWindowPixelRect(WIN_BACK_SPRITE_LINE, PIXEL_FILL(0x2), 0, 0, 90, 4); - CopyWindowToVram(WIN_BACK_SPRITE_LINE, 3); - //Anim names data->animIdBack = GetSpeciesBackAnimSet(species) + 1; data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; @@ -991,6 +1127,9 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) AllocateMonSpritesGfx(); LoadMonIconPalette(species); + //Battle background + LoadBattleBg(data->battleBgType, data->battleTerrain); + //Update instructions PrintInstructionsOnWindow(WIN_INSTRUCTIONS, data); From 8c23ad34ee21993ff01520f5ac7c40adf5d7ddca Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Fri, 10 Dec 2021 20:59:34 +0100 Subject: [PATCH 252/417] fixed --- src/pokemon_debug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 7a9804a048..b102b1d86f 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -827,14 +827,14 @@ void CB2_Debug_Pokemon(void) //BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 15); + InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); + data->battleBgType = 0; + data->battleTerrain = 0; + LoadBattleBg(data->battleBgType , data->battleTerrain); + gMain.state++; break; case 2: - InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); - data->battleTerrain = 0; - data->battleBgType = 0; - LoadBattleBg(data->battleBgType, data->battleTerrain); - ResetPokemonDebugWindows(); gMain.state++; break; From bbe918941e2c2b367799c3b4d2afd3d8b9e2df0a Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Sat, 11 Dec 2021 12:13:14 +0100 Subject: [PATCH 253/417] added include/constants/pokemon_debug,h for defines, restructured code order --- include/battle_bg.h | 11 ++++ include/constants/pokemon_debug.h | 47 +++++++++++++++ include/pokemon_debug.h | 33 +++++++++++ src/battle_bg.c | 2 + src/pokemon_debug.c | 99 ++++--------------------------- 5 files changed, 106 insertions(+), 86 deletions(-) create mode 100644 include/constants/pokemon_debug.h diff --git a/include/battle_bg.h b/include/battle_bg.h index 167ea5cf74..cfa69a92ac 100644 --- a/include/battle_bg.h +++ b/include/battle_bg.h @@ -1,6 +1,17 @@ #ifndef GUARD_BATTLE_BG_H #define GUARD_BATTLE_BG_H +#if P_ENABLE_DEBUG +struct BattleBackground +{ + const void *tileset; + const void *tilemap; + const void *entryTileset; + const void *entryTilemap; + const void *palette; +}; +#endif + void BattleInitBgsAndWindows(void); void InitBattleBgsVideo(void); void LoadBattleMenuWindowGfx(void); diff --git a/include/constants/pokemon_debug.h b/include/constants/pokemon_debug.h new file mode 100644 index 0000000000..b8ea284bce --- /dev/null +++ b/include/constants/pokemon_debug.h @@ -0,0 +1,47 @@ +#ifndef GUARD_CONSTANTS_POKEMON_DEBUG_H +#define GUARD_CONSTANTS_POKEMON_DEBUG_H + +//Defines +#define DEBUG_MON_X 144 + 32 +#define DEBUG_MON_Y 11 + 40 +#define DEBUG_MON_BACK_X 62 +#define DEBUG_MON_BACK_Y 80 +#define DEBUG_ICON_X 19 +#define DEBUG_ICON_Y 19 +#define DEBUG_MON_SHINY 0 +#define DEBUG_MON_NORMAL 9 + +#define MODIFY_DIGITS_MAX 4 +#define MODIFY_DIGITS_ARROW_X 41 +#define MODIFY_DIGITS_ARROW1_Y 12 +#define MODIFY_DIGITS_ARROW2_Y 36 + +#define GENDER_MALE 0 +#define GENDER_FEMALE 1 +#define MON_PIC_BACK 0 +#define MON_PIC_FRONT 1 + +//Windows +#define WIN_NAME_NUMBERS 0 +#define WIN_INSTRUCTIONS 1 +#define WIN_ANIM_INFORMATION_FRONT 2 +#define WIN_ANIM_INFORMATION_BACK 3 +#define WIN_END 4 + +//Battle backgrounds +#define MAP_BATTLE_SCENE_NORMAL 0 +#define MAP_BATTLE_SCENE_GYM 1 +#define MAP_BATTLE_SCENE_MAGMA 2 +#define MAP_BATTLE_SCENE_AQUA 3 +#define MAP_BATTLE_SCENE_SIDNEY 4 +#define MAP_BATTLE_SCENE_PHOEBE 5 +#define MAP_BATTLE_SCENE_GLACIA 6 +#define MAP_BATTLE_SCENE_DRAKE 7 +#define MAP_BATTLE_SCENE_FRONTIER 8 +#define MAP_BATTLE_SCENE_LEADER 9 +#define MAP_BATTLE_SCENE_WALLACE 10 +#define MAP_BATTLE_SCENE_GROUDON 11 +#define MAP_BATTLE_SCENE_KYOGRE 12 +#define MAP_BATTLE_SCENE_RAYQUAZA 13 + +#endif // GUARD_CONSTANTS_POKEMON_DEBUG_H \ No newline at end of file diff --git a/include/pokemon_debug.h b/include/pokemon_debug.h index c9bfafc10c..7157ffbe19 100644 --- a/include/pokemon_debug.h +++ b/include/pokemon_debug.h @@ -1,6 +1,39 @@ #ifndef GUARD_POKEMON_DEBUG_H #define GUARD_POKEMON_DEBUG_H +#include "constants/pokemon_debug.h" + +//Structs +struct PokemonDebugModifyArrows +{ + u8 arrowSpriteId[2]; + u16 minValue; + u16 maxValue; + int currValue; + u8 currentDigit; + u8 maxDigits; + u8 charDigits[MODIFY_DIGITS_MAX]; + void *modifiedValPtr; + u8 typeOfVal; +}; + +struct PokemonDebugMenu +{ + u16 currentmonId; + u8 currentmonWindowId; + u8 InstructionsWindowId; + u8 frontspriteId; + u8 backspriteId; + u8 iconspriteId; + bool8 isShiny; + bool8 isFemale; + struct PokemonDebugModifyArrows modifyArrows; + u8 animIdBack; + u8 animIdFront; + u8 battleBgType; + u8 battleTerrain; +}; + void CB2_Debug_Pokemon(void); diff --git a/src/battle_bg.c b/src/battle_bg.c index 65f30243e9..298a3565a8 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -24,6 +24,7 @@ #include "constants/songs.h" #include "constants/trainers.h" +#if !P_ENABLE_DEBUG struct BattleBackground { const void *tileset; @@ -32,6 +33,7 @@ struct BattleBackground const void *entryTilemap; const void *palette; }; +#endif // .rodata static const u16 sUnrefArray[] = {0x0300, 0x0000}; //OamData? diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index b102b1d86f..4a391182e3 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -32,63 +32,24 @@ #include "string_util.h" #include "strings.h" #include "task.h" +#include "text_window.h" #include "trainer_pokemon_sprites.h" #include "constants/items.h" -//Defines -#define DEBUG_MON_X 144 + 32 -#define DEBUG_MON_Y 11 + 40 -#define DEBUG_MON_BACK_X 62 -#define DEBUG_MON_BACK_Y 80 -#define DEBUG_ICON_X 19 -#define DEBUG_ICON_Y 19 -#define DEBUG_MON_SHINY 0 -#define DEBUG_MON_NORMAL 9 - -#define MODIFY_DIGITS_MAX 4 -#define MODIFY_DIGITS_ARROW_X 41 -#define MODIFY_DIGITS_ARROW1_Y 12 -#define MODIFY_DIGITS_ARROW2_Y 36 - -#define GENDER_MALE 0 -#define GENDER_FEMALE 1 -#define MON_PIC_BACK 0 -#define MON_PIC_FRONT 1 - +#if P_ENABLE_DEBUG +extern const struct BattleBackground sBattleTerrainTable[]; +extern const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1]; static const u16 sBgColor[] = {RGB_WHITE}; -//Structs -struct PokemonDebugModifyArrows +static struct PokemonDebugMenu *GetStructPtr(u8 taskId) { - u8 arrowSpriteId[2]; - u16 minValue; - u16 maxValue; - int currValue; - u8 currentDigit; - u8 maxDigits; - u8 charDigits[MODIFY_DIGITS_MAX]; - void *modifiedValPtr; - u8 typeOfVal; -}; + u8 *taskDataPtr = (u8*)(&gTasks[taskId].data[0]); -struct PokemonDebugMenu -{ - u16 currentmonId; - u8 currentmonWindowId; - u8 InstructionsWindowId; - u8 frontspriteId; - u8 backspriteId; - u8 iconspriteId; - bool8 isShiny; - bool8 isFemale; - struct PokemonDebugModifyArrows modifyArrows; - u8 animIdBack; - u8 animIdFront; - u8 battleBgType; - u8 battleTerrain; -}; + return (struct PokemonDebugMenu*)(T1_READ_PTR(taskDataPtr)); +} +//BgTemplates static const struct BgTemplate sBgTemplates[] = { { @@ -130,11 +91,6 @@ static const struct BgTemplate sBgTemplates[] = }; //WindowTemplates -#define WIN_NAME_NUMBERS 0 -#define WIN_INSTRUCTIONS 1 -#define WIN_ANIM_INFORMATION_FRONT 2 -#define WIN_ANIM_INFORMATION_BACK 3 -#define WIN_END 4 static const struct WindowTemplate sPokemonDebugWindowTemplate[] = { [WIN_NAME_NUMBERS] = { @@ -176,8 +132,7 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = DUMMY_WIN_TEMPLATE, }; -#if P_ENABLE_DEBUG -extern const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1]; +//Lookup tables const u8 gBackAnimNames[][23 + 1] = { [BACK_ANIM_NONE] = _("NONE"), @@ -377,13 +332,6 @@ static void Handle_Input_Debug_Pokemon(u8); static void ReloadPokemonSprites(struct PokemonDebugMenu *data); static void Exit_Debug_Pokemon(u8); -static struct PokemonDebugMenu *GetStructPtr(u8 taskId) -{ - u8 *taskDataPtr = (u8*)(&gTasks[taskId].data[0]); - - return (struct PokemonDebugMenu*)(T1_READ_PTR(taskDataPtr)); -} - //Text handling functions static void PadString(const u8 *src, u8 *dst) { @@ -657,29 +605,6 @@ void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isS } //Battle background functions -struct BattleBackground -{ - const void *tileset; - const void *tilemap; - const void *entryTileset; - const void *entryTilemap; - const void *palette; -}; -extern const struct BattleBackground sBattleTerrainTable[]; -#define MAP_BATTLE_SCENE_NORMAL 0 -#define MAP_BATTLE_SCENE_GYM 1 -#define MAP_BATTLE_SCENE_MAGMA 2 -#define MAP_BATTLE_SCENE_AQUA 3 -#define MAP_BATTLE_SCENE_SIDNEY 4 -#define MAP_BATTLE_SCENE_PHOEBE 5 -#define MAP_BATTLE_SCENE_GLACIA 6 -#define MAP_BATTLE_SCENE_DRAKE 7 -#define MAP_BATTLE_SCENE_FRONTIER 8 -#define MAP_BATTLE_SCENE_LEADER 9 -#define MAP_BATTLE_SCENE_WALLACE 10 -#define MAP_BATTLE_SCENE_GROUDON 11 -#define MAP_BATTLE_SCENE_KYOGRE 12 -#define MAP_BATTLE_SCENE_RAYQUAZA 13 static void LoadBattleBg(u8 battleBgType, u8 battleTerrain) { switch (battleBgType) @@ -796,6 +721,7 @@ static void ResetPokemonDebugWindows(void) CopyWindowToVram(i, 3); } } + void CB2_Debug_Pokemon(void) { u8 taskId; @@ -824,7 +750,8 @@ void CB2_Debug_Pokemon(void) FreeAllSpritePalettes(); gReservedSpritePaletteCount = 8; ResetAllPicSprites(); - //BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); + BlendPalettes(PALETTES_ALL, 16, RGB_BLACK); + LoadPalette(GetTextWindowPalette(0), 15*16, 0x40); FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 15); InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); From 51371661c2aa4bccdc75e436d54e9f8ae215825b Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Sat, 11 Dec 2021 15:03:56 +0100 Subject: [PATCH 254/417] Added new menu naviagtion, now all options can be changed --- include/constants/pokemon_debug.h | 18 +- include/pokemon_debug.h | 10 + src/pokemon_debug.c | 531 +++++++++++++++++++++--------- 3 files changed, 400 insertions(+), 159 deletions(-) diff --git a/include/constants/pokemon_debug.h b/include/constants/pokemon_debug.h index b8ea284bce..326c5d052b 100644 --- a/include/constants/pokemon_debug.h +++ b/include/constants/pokemon_debug.h @@ -6,15 +6,19 @@ #define DEBUG_MON_Y 11 + 40 #define DEBUG_MON_BACK_X 62 #define DEBUG_MON_BACK_Y 80 -#define DEBUG_ICON_X 19 -#define DEBUG_ICON_Y 19 +#define DEBUG_ICON_X 220 +#define DEBUG_ICON_Y 140 #define DEBUG_MON_SHINY 0 #define DEBUG_MON_NORMAL 9 #define MODIFY_DIGITS_MAX 4 -#define MODIFY_DIGITS_ARROW_X 41 -#define MODIFY_DIGITS_ARROW1_Y 12 -#define MODIFY_DIGITS_ARROW2_Y 36 +#define MODIFY_DIGITS_ARROW_X 129 +#define MODIFY_DIGITS_ARROW1_Y 94 +#define MODIFY_DIGITS_ARROW2_Y 113 + +#define OPTIONS_ARROW_1_X 4 +#define OPTIONS_ARROW_2_X 236 +#define OPTIONS_ARROW_Y 119 #define GENDER_MALE 0 #define GENDER_FEMALE 1 @@ -24,8 +28,8 @@ //Windows #define WIN_NAME_NUMBERS 0 #define WIN_INSTRUCTIONS 1 -#define WIN_ANIM_INFORMATION_FRONT 2 -#define WIN_ANIM_INFORMATION_BACK 3 +#define WIN_BOTTOM_LEFT 2 +#define WIN_BOTTOM_RIGHT 3 #define WIN_END 4 //Battle backgrounds diff --git a/include/pokemon_debug.h b/include/pokemon_debug.h index 7157ffbe19..0d550c79ff 100644 --- a/include/pokemon_debug.h +++ b/include/pokemon_debug.h @@ -17,6 +17,13 @@ struct PokemonDebugModifyArrows u8 typeOfVal; }; +struct PokemonDebugOptionArrows +{ + u8 arrowSpriteId[2]; + u8 currentDigit; + void *modifiedValPtr; +}; + struct PokemonDebugMenu { u16 currentmonId; @@ -28,10 +35,13 @@ struct PokemonDebugMenu bool8 isShiny; bool8 isFemale; struct PokemonDebugModifyArrows modifyArrows; + struct PokemonDebugOptionArrows optionArrows; u8 animIdBack; u8 animIdFront; u8 battleBgType; u8 battleTerrain; + bool8 inSubmenu; + u8 submenuYpos; }; void CB2_Debug_Pokemon(void); diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 4a391182e3..df9ebf4d6f 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -95,39 +95,39 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = { [WIN_NAME_NUMBERS] = { .bg = 0, - .tilemapLeft = 4, - .tilemapTop = 2, - .width = 14, + .tilemapLeft = 15, + .tilemapTop = 12, + .width = 15, .height = 2, .paletteNum = 0xF, .baseBlock = 1 }, [WIN_INSTRUCTIONS] = { .bg = 0, - .tilemapLeft = 1, - .tilemapTop = 15, + .tilemapLeft = 0, + .tilemapTop = 0, .width = 15, - .height = 5, + .height = 4, .paletteNum = 0xF, - .baseBlock = 1 + 28 + .baseBlock = 1 + 30 }, - [WIN_ANIM_INFORMATION_FRONT] = { + [WIN_BOTTOM_LEFT] = { .bg = 0, - .tilemapLeft = 14, - .tilemapTop = 12, - .width = 16, - .height = 3, + .tilemapLeft = 1, + .tilemapTop = 14, + .width = 5, + .height = 6, .paletteNum = 0xF, - .baseBlock = 1 + 28 + 75 + .baseBlock = 1 + 30 + 60 }, - [WIN_ANIM_INFORMATION_BACK] = { + [WIN_BOTTOM_RIGHT] = { .bg = 0, - .tilemapLeft = 14, - .tilemapTop = 15, - .width = 16, - .height = 3, + .tilemapLeft = 6, + .tilemapTop = 14, + .width = 25, + .height = 6, .paletteNum = 0xF, - .baseBlock = 1 + 28 + 75 + 48 + .baseBlock = 1 + 30 + 60 + 30 }, DUMMY_WIN_TEMPLATE, }; @@ -319,7 +319,36 @@ const u8 gFrontAnimNames[][34] = [ANIM_SHAKE_GLOW_WHITE_SLOW] = _("SHAKE GLOW WHITE SLOW"), [ANIM_SHAKE_GLOW_PURPLE_SLOW] = _("SHAKE GLOW PURPLE SLOW"), }; - +const u8 gBattleBackgroundNames[][30] = +{ + [MAP_BATTLE_SCENE_NORMAL] = _("NORMAL "), + [MAP_BATTLE_SCENE_GYM] = _("GYM "), + [MAP_BATTLE_SCENE_MAGMA] = _("MAGMA "), + [MAP_BATTLE_SCENE_AQUA] = _("AQUA "), + [MAP_BATTLE_SCENE_SIDNEY] = _("SIDNEY "), + [MAP_BATTLE_SCENE_PHOEBE] = _("PHOEBE "), + [MAP_BATTLE_SCENE_GLACIA] = _("GLACIA "), + [MAP_BATTLE_SCENE_DRAKE] = _("DRAKE "), + [MAP_BATTLE_SCENE_FRONTIER] = _("FRONTIER "), + [MAP_BATTLE_SCENE_LEADER] = _("LEADER "), + [MAP_BATTLE_SCENE_WALLACE] = _("WALLACE "), + [MAP_BATTLE_SCENE_GROUDON] = _("GROUDON "), + [MAP_BATTLE_SCENE_KYOGRE] = _("KYOGRE "), + [MAP_BATTLE_SCENE_RAYQUAZA] = _("RAYQUAZA "), +}; +const u8 gBattleBackgroundTerrainNames[][26] = +{ + [BATTLE_TERRAIN_GRASS] = _("NORMAL - GRASS "), + [BATTLE_TERRAIN_LONG_GRASS] = _("NORMAL - LONG GRASS "), + [BATTLE_TERRAIN_SAND] = _("NORMAL - SAND "), + [BATTLE_TERRAIN_UNDERWATER] = _("NORMAL - UNDERWATER "), + [BATTLE_TERRAIN_WATER] = _("NORMAL - WATER "), + [BATTLE_TERRAIN_POND] = _("NORMAL - POND "), + [BATTLE_TERRAIN_MOUNTAIN] = _("NORMAL - MOUNTAIN "), + [BATTLE_TERRAIN_CAVE] = _("NORMAL - CAVE "), + [BATTLE_TERRAIN_BUILDING] = _("NORMAL - BUILDING "), + [BATTLE_TERRAIN_PLAIN] = _("NORMAL - PLAIN "), +}; //Function declarations static void PrintDigitChars(struct PokemonDebugMenu *data); static void SetUpModifyArrows(struct PokemonDebugMenu *data); @@ -346,31 +375,45 @@ static void PadString(const u8 *src, u8 *dst) dst[i] = EOS; } -static void PrintInstructionsOnWindow(u8 windowId, struct PokemonDebugMenu *data) +static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data) { - u8 text[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny$"); - u8 textGender[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny\n{SELECT_BUTTON} Gender$"); - u8 textForms[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny {START_BUTTON} Forms$"); - u8 textGenderForms[] = _("{L_BUTTON} Back {R_BUTTON} Front\n{A_BUTTON} Shiny {START_BUTTON} Forms\n{SELECT_BUTTON} Gender$"); + u8 fontId = 0; + u8 x = 2; + u8 textInstructions[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Exit {A_BUTTON} Submenu$"); + u8 textInstructionsGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Exit {A_BUTTON} Submenu$"); + u8 textInstructionsInSubmenu[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back$"); + u8 textInstructionsInSubmenuGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back$"); + + u8 textBottom[] = _("BACK:\nFRONT:\nBG:$"); + u8 textBottomForms[] = _("BACK:\nFRONT:\nBG:\nFORMS:$"); u16 species = data->modifyArrows.currValue; - - FillWindowPixelBuffer(windowId, 0x11); - if (SpeciesHasGenderDifference[species]) + //Instruction window + FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11); + if (data->inSubmenu) { - if (gFormSpeciesIdTables[data->currentmonId] != NULL) - AddTextPrinterParameterized(windowId, 0, textGenderForms, 0, 0, 0, NULL); + if (SpeciesHasGenderDifference[species]) + AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsInSubmenuGender, x, 0, 0, NULL); else - AddTextPrinterParameterized(windowId, 0, textGender, 0, 0, 0, NULL); + AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsInSubmenu, x, 0, 0, NULL); } else { - if (gFormSpeciesIdTables[data->currentmonId] != NULL) - AddTextPrinterParameterized(windowId, 0, textForms, 0, 0, 0, NULL); + if (SpeciesHasGenderDifference[species]) + AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsGender, x, 0, 0, NULL); else - AddTextPrinterParameterized(windowId, 0, text, 0, 0, 0, NULL); + AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructions, x, 0, 0, NULL); + } + CopyWindowToVram(WIN_INSTRUCTIONS, 3); + + //Bottom left text + if (gFormSpeciesIdTables[data->currentmonId] != NULL) + AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottomForms, 0, 0, 0, NULL); + else + { + FillWindowPixelBuffer(WIN_BOTTOM_LEFT, PIXEL_FILL(0)); + AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottom, 0, 0, 0, NULL); } - CopyWindowToVram(windowId, 3); } static void VBlankCB(void) @@ -462,6 +505,15 @@ static void ValueToCharDigits(u8 *charDigits, u32 newValue, u8 maxDigits) charDigits[i] = valueDigits[i] + CHAR_0; } +static void SetArrowInvisibility(struct PokemonDebugMenu *data) +{ + bool8 invisible = data->inSubmenu; + gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = invisible; + gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = invisible; + gSprites[data->optionArrows.arrowSpriteId[0]].invisible = !invisible; + //gSprites[data->optionArrows.arrowSpriteId[1]].invisible = !invisible; +} + static void SetUpModifyArrows(struct PokemonDebugMenu *data) { LoadSpritePalette(&sSpritePalette_Arrow); @@ -480,6 +532,19 @@ static void SetUpModifyArrows(struct PokemonDebugMenu *data) ValueToCharDigits(data->modifyArrows.charDigits, data->modifyArrows.currValue, data->modifyArrows.maxDigits); } +static void SetUpOptionArrows(struct PokemonDebugMenu *data) +{ + LoadSpritePalette(&sSpritePalette_Arrow); + data->optionArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y, 0); + //data->optionArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_2_X, OPTIONS_ARROW_Y, 0); + gSprites[data->optionArrows.arrowSpriteId[0]].animNum = 2; + + data->optionArrows.currentDigit = 0; + + gSprites[data->optionArrows.arrowSpriteId[0]].invisible = TRUE; + //gSprites[data->optionArrows.arrowSpriteId[1]].invisible = TRUE; +} + static bool32 TryMoveDigit(struct PokemonDebugModifyArrows *modArrows, bool32 moveUp) { s32 i; @@ -681,6 +746,71 @@ static void LoadBattleBg(u8 battleBgType, u8 battleTerrain) break; } } +static void PrintBattleBgName(u8 taskId) +{ + struct PokemonDebugMenu *data = GetStructPtr(taskId); + u8 fontId = 0; + u8 text[30+1]; + + if (data->battleBgType == 0) + StringCopy(text, gBattleBackgroundTerrainNames[data->battleTerrain]); + else + StringCopy(text, gBattleBackgroundNames[data->battleBgType]); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 0, 24, 0, NULL); +} +static void UpdateBattleBg(u8 taskId, bool8 increment) +{ + struct PokemonDebugMenu *data = GetStructPtr(taskId); + + if (data->battleBgType == 0) + { + if (increment) + { + if (data->battleTerrain == BATTLE_TERRAIN_PLAIN) + data->battleBgType += 1; + else + data->battleTerrain += 1; + } + else + { + if (data->battleTerrain == BATTLE_TERRAIN_GRASS) + data->battleBgType = MAP_BATTLE_SCENE_RAYQUAZA; + else + data->battleTerrain -= 1; + } + } + else if (data->battleBgType == MAP_BATTLE_SCENE_GYM) + { + if (increment) + data->battleBgType += 1; + else + { + data->battleBgType = MAP_BATTLE_SCENE_NORMAL; + data->battleTerrain = BATTLE_TERRAIN_PLAIN; + } + } + else if (data->battleBgType == MAP_BATTLE_SCENE_RAYQUAZA) + { + if (increment) + { + data->battleBgType = MAP_BATTLE_SCENE_NORMAL; + data->battleTerrain = BATTLE_TERRAIN_GRASS; + } + else + data->battleBgType -= 1; + } + else + { + if (increment) + data->battleBgType += 1; + else + data->battleBgType -= 1; + } + + PrintBattleBgName(taskId); + + LoadBattleBg(data->battleBgType, data->battleTerrain); +} // ******************************* // Main functions @@ -689,22 +819,23 @@ static void UpdateMonAnimNames(u8 taskId) struct PokemonDebugMenu *data = GetStructPtr(taskId); u8 frontAnim = data->animIdFront; u8 backAnim = data->animIdBack; - u8 textFront[] = _("FRONT {R_BUTTON} + {DPAD_LEFTRIGHT}$"); - u8 textBack[] = _("BACK {L_BUTTON} + {DPAD_LEFTRIGHT}$"); u8 text[34]; u8 fontId = 0; + u8 textL[] = _("{L_BUTTON}"); + u8 textR[] = _("{R_BUTTON}"); - //Front - FillWindowPixelBuffer(WIN_ANIM_INFORMATION_FRONT, PIXEL_FILL(0)); - AddTextPrinterParameterized(WIN_ANIM_INFORMATION_FRONT, fontId, textFront, 0, 0, 0, NULL); - StringCopy(text, gFrontAnimNames[frontAnim]); - AddTextPrinterParameterized(WIN_ANIM_INFORMATION_FRONT, fontId, text, 4, 12, 0, NULL); + FillWindowPixelBuffer(WIN_BOTTOM_RIGHT, PIXEL_FILL(0)); //Back - FillWindowPixelBuffer(WIN_ANIM_INFORMATION_BACK, PIXEL_FILL(0)); - AddTextPrinterParameterized(WIN_ANIM_INFORMATION_BACK, fontId, textBack, 0, 0, 0, NULL); StringCopy(text, gBackAnimNames[backAnim]); - AddTextPrinterParameterized(WIN_ANIM_INFORMATION_BACK, fontId, text, 4, 12, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textL, 0, 0, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 20, 0, 0, NULL); + //Front + StringCopy(text, gFrontAnimNames[frontAnim]); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textR, 0, 12, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 20, 12, 0, NULL); + + PrintBattleBgName(taskId); } static void ResetPokemonDebugWindows(void) @@ -762,7 +893,7 @@ void CB2_Debug_Pokemon(void) gMain.state++; break; case 2: - ResetPokemonDebugWindows(); + ResetPokemonDebugWindows(); gMain.state++; break; case 3: @@ -787,7 +918,7 @@ void CB2_Debug_Pokemon(void) species = data->currentmonId; //Print instructions - PrintInstructionsOnWindow(WIN_INSTRUCTIONS, data); + PrintInstructionsOnWindow(data); //Palettes palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); @@ -822,11 +953,17 @@ void CB2_Debug_Pokemon(void) SetUpModifyArrows(data); PrintDigitChars(data); + //Option Arrows + SetUpOptionArrows(data); + //Anim names data->animIdBack = GetSpeciesBackAnimSet(species) + 1; data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; UpdateMonAnimNames(taskId); + //BattleNg Name + PrintBattleBgName(taskId); + gMain.state++; break; case 4: @@ -885,60 +1022,102 @@ static void ResetBGs_Debug_Menu(u16 a) } } +static void UpdateSubmenuOptionValue(u8 taskId, bool8 increment) +{ + struct PokemonDebugMenu *data = GetStructPtr(taskId); + u8 option = data->submenuYpos; + + switch (option) + { + case 0: + if (increment) + { + if (data->animIdBack >= BACK_ANIM_SHAKE_GLOW_BLUE) + data->animIdBack = 1; + else + data->animIdBack += 1; + } + else + { + if (data->animIdBack <= 1) + data->animIdBack = BACK_ANIM_SHAKE_GLOW_BLUE; + else + data->animIdBack -= 1; + } + UpdateMonAnimNames(taskId); + break; + case 1: + if (increment) + { + if (data->animIdFront >= ANIM_SHAKE_GLOW_PURPLE_SLOW) + data->animIdFront = 0; + else + data->animIdFront += 1; + } + else + { + if (data->animIdFront <= 0) + data->animIdFront = ANIM_SHAKE_GLOW_PURPLE_SLOW; + else + data->animIdFront -= 1; + } + UpdateMonAnimNames(taskId); + break; + case 2: + UpdateBattleBg(taskId, increment); + break; + case 3: + if (gFormSpeciesIdTables[data->currentmonId] != NULL) + { + struct PokemonDebugModifyArrows *modArrows = &data->modifyArrows; + u8 formId = GetFormIdFromFormSpeciesId(data->currentmonId); + if (increment) + { + if (gFormSpeciesIdTables[data->currentmonId][formId + 1] != FORM_SPECIES_END) + modArrows->currValue = GetFormSpeciesId(data->currentmonId, formId + 1); + else + modArrows->currValue = gFormSpeciesIdTables[data->currentmonId][0]; + } + else + { + if (gFormSpeciesIdTables[data->currentmonId][formId] == gFormSpeciesIdTables[data->currentmonId][0]) + modArrows->currValue = gFormSpeciesIdTables[data->currentmonId][0]; + else + modArrows->currValue = GetFormSpeciesId(data->currentmonId, formId - 1); + } + + UpdateBattlerValue(data); + ReloadPokemonSprites(data); + while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); + PlaySE(SE_DEX_SCROLL); + } + break; + default: + break; + } +} + + static void Handle_Input_Debug_Pokemon(u8 taskId) { struct PokemonDebugMenu *data = GetStructPtr(taskId); struct Sprite *Frontsprite = &gSprites[data->frontspriteId]; struct Sprite *Backsprite = &gSprites[data->backspriteId]; - - //Back - if (JOY_HELD(L_BUTTON) && JOY_NEW(DPAD_LEFT)) - { - if (data->animIdBack <= 1) - data->animIdBack = BACK_ANIM_SHAKE_GLOW_BLUE; - else - data->animIdBack -= 1; - UpdateMonAnimNames(taskId); - } - else if (JOY_HELD(L_BUTTON) && JOY_NEW(DPAD_RIGHT)) - { - if (data->animIdBack >= BACK_ANIM_SHAKE_GLOW_BLUE) - data->animIdBack = 1; - else - data->animIdBack += 1; - UpdateMonAnimNames(taskId); - } - else if (JOY_NEW(L_BUTTON) && (Backsprite->callback == SpriteCallbackDummy)) + + if (JOY_NEW(L_BUTTON) && (Backsprite->callback == SpriteCallbackDummy)) { PlayCryInternal(data->currentmonId, 0, 120, 10, 0); LaunchAnimationTaskForBackSprite(Backsprite, data->animIdBack-1); } - //Front - else if (JOY_HELD(R_BUTTON) && JOY_NEW(DPAD_LEFT)) - { - if (data->animIdFront <= 0) - data->animIdFront = ANIM_SHAKE_GLOW_PURPLE_SLOW; - else - data->animIdFront -= 1; - UpdateMonAnimNames(taskId); - } - else if (JOY_HELD(R_BUTTON) && JOY_NEW(DPAD_RIGHT)) - { - if (data->animIdFront >= ANIM_SHAKE_GLOW_PURPLE_SLOW) - data->animIdFront = 0; - else - data->animIdFront += 1; - UpdateMonAnimNames(taskId); - } - else if (JOY_NEW(R_BUTTON) && (Frontsprite->callback == SpriteCallbackDummy)) + + if (JOY_NEW(R_BUTTON) && (Frontsprite->callback == SpriteCallbackDummy)) { PlayCryInternal(data->currentmonId, 0, 120, 10, 0); if (HasTwoFramesAnimation(data->currentmonId)) StartSpriteAnim(Frontsprite, 1); LaunchAnimationTaskForFrontSprite(Frontsprite, data->animIdFront); } - //Rest - else if (JOY_NEW(A_BUTTON)) + if (JOY_NEW(START_BUTTON)) { data->isShiny = !data->isShiny; @@ -948,31 +1127,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) ReloadPokemonSprites(data); } - else if (JOY_NEW(B_BUTTON)) - { - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); - gTasks[taskId].func = Exit_Debug_Pokemon; - PlaySE(SE_PC_OFF); - } - else if (JOY_NEW(START_BUTTON)) - { - if (gFormSpeciesIdTables[data->currentmonId] != NULL) - { - struct PokemonDebugModifyArrows *modArrows = &data->modifyArrows; - u8 formId = GetFormIdFromFormSpeciesId(data->currentmonId); - if (gFormSpeciesIdTables[data->currentmonId][formId + 1] != FORM_SPECIES_END) - modArrows->currValue = GetFormSpeciesId(data->currentmonId, formId + 1); - else - modArrows->currValue = gFormSpeciesIdTables[data->currentmonId][0]; - - PrintDigitChars(data); - UpdateBattlerValue(data); - ReloadPokemonSprites(data); - while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); - PlaySE(SE_DEX_SCROLL); - } - } - else if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifference[data->currentmonId]) + if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifference[data->currentmonId]) { data->isFemale = !data->isFemale; PrintDigitChars(data); @@ -981,54 +1136,120 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); PlaySE(SE_DEX_SCROLL); } - else if (JOY_NEW(DPAD_DOWN)) // || gMain.heldKeys & DPAD_DOWN) + + if (!data->inSubmenu) { - if (TryMoveDigit(&data->modifyArrows, FALSE)) + if (JOY_NEW(A_BUTTON)) { - data->isFemale = FALSE; - PrintDigitChars(data); - UpdateBattlerValue(data); - ReloadPokemonSprites(data); - data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; - data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; - UpdateMonAnimNames(taskId); + data->inSubmenu = TRUE; + SetArrowInvisibility(data); + PrintInstructionsOnWindow(data); + } + else if (JOY_NEW(B_BUTTON)) + { + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); + gTasks[taskId].func = Exit_Debug_Pokemon; + PlaySE(SE_PC_OFF); + } + else if (JOY_NEW(DPAD_DOWN)) + { + if (TryMoveDigit(&data->modifyArrows, FALSE)) + { + data->isFemale = FALSE; + PrintDigitChars(data); + UpdateBattlerValue(data); + ReloadPokemonSprites(data); + data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; + data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; + UpdateMonAnimNames(taskId); + } + PlaySE(SE_DEX_SCROLL); + while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); + } + else if (JOY_NEW(DPAD_UP)) + { + if (TryMoveDigit(&data->modifyArrows, TRUE)) + { + data->isFemale = FALSE; + PrintDigitChars(data); + UpdateBattlerValue(data); + ReloadPokemonSprites(data); + data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; + data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; + UpdateMonAnimNames(taskId); + } + + PlaySE(SE_DEX_SCROLL); + } + else if (JOY_NEW(DPAD_LEFT)) + { + if (data->modifyArrows.currentDigit != 0) + { + data->modifyArrows.currentDigit--; + gSprites[data->modifyArrows.arrowSpriteId[0]].x2 -= 6; + gSprites[data->modifyArrows.arrowSpriteId[1]].x2 -= 6; + } + } + else if (JOY_NEW(DPAD_RIGHT)) + { + if (data->modifyArrows.currentDigit != (data->modifyArrows.maxDigits - 1)) + { + data->modifyArrows.currentDigit++; + gSprites[data->modifyArrows.arrowSpriteId[0]].x2 += 6; + gSprites[data->modifyArrows.arrowSpriteId[1]].x2 += 6; + } } - PlaySE(SE_DEX_SCROLL); - - while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); } - else if (JOY_NEW(DPAD_UP)) // || gMain.heldKeys & DPAD_UP) + else //Submenu { - if (TryMoveDigit(&data->modifyArrows, TRUE)) + if (JOY_NEW(B_BUTTON)) { - data->isFemale = FALSE; - PrintDigitChars(data); - UpdateBattlerValue(data); - ReloadPokemonSprites(data); - data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; - data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; - UpdateMonAnimNames(taskId); + data->inSubmenu = FALSE; + if (data->submenuYpos == 3) + { + data->submenuYpos = 2; + data->optionArrows.currentDigit = data->submenuYpos; + gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; + } + SetArrowInvisibility(data); + PrintInstructionsOnWindow(data); } - - PlaySE(SE_DEX_SCROLL); - } - else if (JOY_NEW(DPAD_LEFT)) // || gMain.heldKeys & DPAD_LEFT) - { - if (data->modifyArrows.currentDigit != 0) + else if (JOY_NEW(DPAD_DOWN)) { - data->modifyArrows.currentDigit--; - gSprites[data->modifyArrows.arrowSpriteId[0]].x2 -= 6; - gSprites[data->modifyArrows.arrowSpriteId[1]].x2 -= 6; + data->submenuYpos += 1; + if (data->submenuYpos >= 3) + { + if ((gFormSpeciesIdTables[data->currentmonId] == NULL) || (data->submenuYpos >= 4)) + data->submenuYpos = 0; + } + data->optionArrows.currentDigit = data->submenuYpos; + gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; + //gSprites[data->optionArrows.arrowSpriteId[1]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; } - } - else if (JOY_NEW(DPAD_RIGHT)) // || gMain.heldKeys & DPAD_RIGHT) - { - if (data->modifyArrows.currentDigit != (data->modifyArrows.maxDigits - 1)) + else if (JOY_NEW(DPAD_UP)) { - data->modifyArrows.currentDigit++; - gSprites[data->modifyArrows.arrowSpriteId[0]].x2 += 6; - gSprites[data->modifyArrows.arrowSpriteId[1]].x2 += 6; + if (data->submenuYpos == 0) + { + if (gFormSpeciesIdTables[data->currentmonId] != NULL) + data->submenuYpos = 3; + else + data->submenuYpos = 2; + } + else + data->submenuYpos -= 1; + + data->optionArrows.currentDigit = data->submenuYpos; + gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; + //gSprites[data->optionArrows.arrowSpriteId[1]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; + } + else if (JOY_NEW(DPAD_LEFT)) + { + UpdateSubmenuOptionValue(taskId, FALSE); + } + else if (JOY_NEW(DPAD_RIGHT)) + { + UpdateSubmenuOptionValue(taskId, TRUE); } } } @@ -1054,11 +1275,8 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) AllocateMonSpritesGfx(); LoadMonIconPalette(species); - //Battle background - LoadBattleBg(data->battleBgType, data->battleTerrain); - //Update instructions - PrintInstructionsOnWindow(WIN_INSTRUCTIONS, data); + PrintInstructionsOnWindow(data); //Palettes palette = GetMonSpritePalStructCustom(species, data->isFemale, data->isShiny); @@ -1092,6 +1310,15 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) data->modifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW1_Y, 0); data->modifyArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW2_Y, 0); gSprites[data->modifyArrows.arrowSpriteId[1]].animNum = 1; + + //Option Arrows + LoadSpritePalette(&sSpritePalette_Arrow); + data->optionArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12, 0); + //data->optionArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_2_X, OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12, 0); + gSprites[data->optionArrows.arrowSpriteId[0]].animNum = 2; + + //Arrow invisibility + SetArrowInvisibility(data); } static void Exit_Debug_Pokemon(u8 taskId) From a249737e0ebd84107b5c40ba55a0fd10918e1f7a Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Sat, 11 Dec 2021 15:06:54 +0100 Subject: [PATCH 255/417] removed dead code (arrows dont have a left animation) --- src/pokemon_debug.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index df9ebf4d6f..6acd566dd1 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -511,7 +511,6 @@ static void SetArrowInvisibility(struct PokemonDebugMenu *data) gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = invisible; gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = invisible; gSprites[data->optionArrows.arrowSpriteId[0]].invisible = !invisible; - //gSprites[data->optionArrows.arrowSpriteId[1]].invisible = !invisible; } static void SetUpModifyArrows(struct PokemonDebugMenu *data) @@ -536,13 +535,11 @@ static void SetUpOptionArrows(struct PokemonDebugMenu *data) { LoadSpritePalette(&sSpritePalette_Arrow); data->optionArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y, 0); - //data->optionArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_2_X, OPTIONS_ARROW_Y, 0); gSprites[data->optionArrows.arrowSpriteId[0]].animNum = 2; data->optionArrows.currentDigit = 0; gSprites[data->optionArrows.arrowSpriteId[0]].invisible = TRUE; - //gSprites[data->optionArrows.arrowSpriteId[1]].invisible = TRUE; } static bool32 TryMoveDigit(struct PokemonDebugModifyArrows *modArrows, bool32 moveUp) @@ -1225,7 +1222,6 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) } data->optionArrows.currentDigit = data->submenuYpos; gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; - //gSprites[data->optionArrows.arrowSpriteId[1]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; } else if (JOY_NEW(DPAD_UP)) { @@ -1241,7 +1237,6 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) data->optionArrows.currentDigit = data->submenuYpos; gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; - //gSprites[data->optionArrows.arrowSpriteId[1]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; } else if (JOY_NEW(DPAD_LEFT)) { @@ -1314,7 +1309,6 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) //Option Arrows LoadSpritePalette(&sSpritePalette_Arrow); data->optionArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12, 0); - //data->optionArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_2_X, OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12, 0); gSprites[data->optionArrows.arrowSpriteId[0]].animNum = 2; //Arrow invisibility From 123969f093907507207135ffc69e673ceac569af Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Mon, 13 Dec 2021 15:05:17 +0100 Subject: [PATCH 256/417] fixed front sprite position including elevation and shadow for flying mon's (shadow palette too dark atm) --- include/constants/pokemon_debug.h | 2 - include/pokemon_debug.h | 1 + src/battle_anim_mons.c | 8 +++ src/pokemon_debug.c | 109 +++++++++++++++++++++++++++--- 4 files changed, 110 insertions(+), 10 deletions(-) diff --git a/include/constants/pokemon_debug.h b/include/constants/pokemon_debug.h index 326c5d052b..e9e1a58a34 100644 --- a/include/constants/pokemon_debug.h +++ b/include/constants/pokemon_debug.h @@ -2,8 +2,6 @@ #define GUARD_CONSTANTS_POKEMON_DEBUG_H //Defines -#define DEBUG_MON_X 144 + 32 -#define DEBUG_MON_Y 11 + 40 #define DEBUG_MON_BACK_X 62 #define DEBUG_MON_BACK_Y 80 #define DEBUG_ICON_X 220 diff --git a/include/pokemon_debug.h b/include/pokemon_debug.h index 0d550c79ff..1b8db76c12 100644 --- a/include/pokemon_debug.h +++ b/include/pokemon_debug.h @@ -32,6 +32,7 @@ struct PokemonDebugMenu u8 frontspriteId; u8 backspriteId; u8 iconspriteId; + u8 frontShadowSpriteId; bool8 isShiny; bool8 isFemale; struct PokemonDebugModifyArrows modifyArrows; diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 3b6cc0e918..86479aac5a 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -35,7 +35,11 @@ static void CreateBattlerTrace(struct Task *task, u8 taskId); EWRAM_DATA static union AffineAnimCmd *sAnimTaskAffineAnim = NULL; +#if P_ENABLE_DEBUG +const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = +#else static const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = +#endif { { // Single battle { 72, 80 }, @@ -60,7 +64,11 @@ const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS] = [CASTFORM_ICE] = { .size = MON_COORDS_SIZE(64, 48), .y_offset = 8 }, }; +#if P_ENABLE_DEBUG +const u8 sCastformElevations[NUM_CASTFORM_FORMS] = +#else static const u8 sCastformElevations[NUM_CASTFORM_FORMS] = +#endif { [CASTFORM_NORMAL] = 13, [CASTFORM_FIRE] = 14, diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 6acd566dd1..44e1124fc1 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -2,6 +2,7 @@ #include "global.h" #include "battle.h" #include "battle_anim.h" +#include "battle_gfx_sfx_util.h" #include "bg.h" #include "constants/rgb.h" #include "constants/songs.h" @@ -39,6 +40,11 @@ #if P_ENABLE_DEBUG extern const struct BattleBackground sBattleTerrainTable[]; +extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow; +extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow; +extern const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] ; +extern const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS]; +extern const u8 sCastformElevations[NUM_CASTFORM_FORMS]; extern const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1]; static const u16 sBgColor[] = {RGB_WHITE}; @@ -666,6 +672,84 @@ void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isS LoadPalette(gDecompressionBuffer, 0x80 + battlerId * 16, 0x20); } +static bool8 IsCastformForm(species) +{ + if (species == SPECIES_CASTFORM || species == SPECIES_CASTFORM_SUNNY || species == SPECIES_CASTFORM_RAINY || species == SPECIES_CASTFORM_SNOWY) + return TRUE; + + return FALSE; +} + +static u8 GetCastformYCustom(species) +{ + u8 ret; + switch (species) + { + case SPECIES_CASTFORM: + ret = gCastformFrontSpriteCoords[CASTFORM_NORMAL].y_offset; + break; + case SPECIES_CASTFORM_SUNNY: + ret = gCastformFrontSpriteCoords[CASTFORM_FIRE].y_offset; + break; + case SPECIES_CASTFORM_RAINY: + ret = gCastformFrontSpriteCoords[CASTFORM_WATER].y_offset; + break; + case SPECIES_CASTFORM_SNOWY: + ret = gCastformFrontSpriteCoords[CASTFORM_ICE].y_offset; + break; + } + return ret; +} + +u8 GetBattlerSpriteFinal_YCustom(u16 species) +{ + u16 offset; + u8 y; + + if (IsCastformForm(species)) + offset = GetCastformYCustom(species); + else + offset = gMonFrontPicCoords[species].y_offset; + + + if (IsCastformForm(species)) + offset -= sCastformElevations[species]; + else + offset -= gEnemyMonElevation[species]; + + + y = offset + sBattlerCoords[0][1].y; + + if (y > DISPLAY_HEIGHT - MON_PIC_HEIGHT + 8) + y = DISPLAY_HEIGHT - MON_PIC_HEIGHT + 8; + + return y; +} + +void SpriteCB_EnemyShadowCustom(struct Sprite *shadowSprite) +{ + bool8 invisible = FALSE; + u8 frontSpriteId = shadowSprite->data[0]; + struct Sprite *battlerSprite = &gSprites[frontSpriteId]; + + shadowSprite->x = battlerSprite->x; + shadowSprite->x2 = battlerSprite->x2; + shadowSprite->invisible = invisible; +} +static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data, u8 x, u8 y, u16 species) +{ + if (gEnemyMonElevation[species] == 0) + return; + LoadCompressedSpriteSheet(&gSpriteSheet_EnemyShadow); + + data->frontShadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, x, y + 29, 0xC8); + gSprites[data->frontShadowSpriteId].data[0] = data->frontspriteId; + + gSprites[data->frontShadowSpriteId].callback = SpriteCB_EnemyShadowCustom; + gSprites[data->frontShadowSpriteId].oam.priority = 0; + gSprites[data->frontShadowSpriteId].invisible = FALSE; +} + //Battle background functions static void LoadBattleBg(u8 battleBgType, u8 battleTerrain) { @@ -855,8 +939,10 @@ void CB2_Debug_Pokemon(void) u8 taskId; const struct CompressedSpritePalette *palette; struct PokemonDebugMenu *data; - s16 offset_x, offset_y; u16 species; + s16 offset_y; + u8 front_x = sBattlerCoords[0][1].x; + u8 front_y; switch (gMain.state) { @@ -927,10 +1013,13 @@ void CB2_Debug_Pokemon(void) BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; - data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X, DEBUG_MON_Y, 0); + front_y = GetBattlerSpriteFinal_YCustom(species); + data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, front_x, front_y, 0); gSprites[data->frontspriteId].oam.paletteNum = 1; gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; + //Front Shadow + LoadAndCreateEnemyShadowSpriteCustom(data, front_x, front_y, species); //Back HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); @@ -1251,10 +1340,11 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) static void ReloadPokemonSprites(struct PokemonDebugMenu *data) { - s16 offset_x = 0; - s16 offset_y = 0; - u16 species = data->currentmonId; const struct CompressedSpritePalette *palette; + u16 species = data->currentmonId; + s16 offset_y; + u8 front_x = sBattlerCoords[0][1].x; + u8 front_y; DestroySprite(&gSprites[data->frontspriteId]); DestroySprite(&gSprites[data->backspriteId]); @@ -1281,18 +1371,21 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; - data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_X, DEBUG_MON_Y, 0); + front_y = GetBattlerSpriteFinal_YCustom(species); + data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, front_x, front_y, 0); gSprites[data->frontspriteId].oam.paletteNum = 1; gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; + //Front Shadow + LoadAndCreateEnemyShadowSpriteCustom(data, front_x, front_y, species); //Back HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); - BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 4); + BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 5); SetMultiuseSpriteTemplateToPokemon(species, 2); offset_y = gMonBackPicCoords[species].y_offset; data->backspriteId = CreateSprite(&gMultiuseSpriteTemplate, DEBUG_MON_BACK_X, DEBUG_MON_BACK_Y + offset_y, 0); - gSprites[data->backspriteId].oam.paletteNum = 4; + gSprites[data->backspriteId].oam.paletteNum = 5; gSprites[data->backspriteId].callback = SpriteCallbackDummy; gSprites[data->backspriteId].oam.priority = 0; From e33abe6213678fca7c60fc2c8865110e9c6651c0 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Mon, 13 Dec 2021 15:13:51 +0100 Subject: [PATCH 257/417] fixed castform elevation calculation --- src/pokemon_debug.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 44e1124fc1..ec493a4a54 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -674,7 +674,7 @@ void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isS static bool8 IsCastformForm(species) { - if (species == SPECIES_CASTFORM || species == SPECIES_CASTFORM_SUNNY || species == SPECIES_CASTFORM_RAINY || species == SPECIES_CASTFORM_SNOWY) + if (species == SPECIES_CASTFORM_SUNNY || species == SPECIES_CASTFORM_RAINY || species == SPECIES_CASTFORM_SNOWY) return TRUE; return FALSE; @@ -706,14 +706,12 @@ u8 GetBattlerSpriteFinal_YCustom(u16 species) u16 offset; u8 y; - if (IsCastformForm(species)) - offset = GetCastformYCustom(species); - else - offset = gMonFrontPicCoords[species].y_offset; + offset = gMonFrontPicCoords[species].y_offset; - - if (IsCastformForm(species)) - offset -= sCastformElevations[species]; + if (species == SPECIES_CASTFORM) + offset -= sCastformElevations[0]; + else if (IsCastformForm(species)) + offset -= sCastformElevations[species - SPECIES_CASTFORM_SUNNY + 1]; else offset -= gEnemyMonElevation[species]; @@ -738,7 +736,7 @@ void SpriteCB_EnemyShadowCustom(struct Sprite *shadowSprite) } static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data, u8 x, u8 y, u16 species) { - if (gEnemyMonElevation[species] == 0) + if (gEnemyMonElevation[species] == 0 && !IsCastformForm(species)) return; LoadCompressedSpriteSheet(&gSpriteSheet_EnemyShadow); From d300b8f56c63e9ae7796362bc7278e35925a56a7 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Mon, 13 Dec 2021 15:37:06 +0100 Subject: [PATCH 258/417] fixed front sprite shadow palette --- src/battle_gfx_sfx_util.c | 4 ++++ src/pokemon_debug.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 5667731e9e..508e250c15 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -77,7 +77,11 @@ static const struct CompressedSpriteSheet sSpriteSheets_HealthBar[MAX_BATTLERS_C {gBlankGfxCompressed, 0x0120, TAG_HEALTHBAR_OPPONENT2_TILE} }; +#if P_ENABLE_DEBUG +const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] = +#else static const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] = +#endif { {gBattleInterface_BallStatusBarPal, TAG_HEALTHBOX_PAL}, {gBattleInterface_BallDisplayPal, TAG_HEALTHBAR_PAL} diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index ec493a4a54..fd442386b4 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -42,6 +42,7 @@ extern const struct BattleBackground sBattleTerrainTable[]; extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow; extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow; +extern const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2]; extern const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] ; extern const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS]; extern const u8 sCastformElevations[NUM_CASTFORM_FORMS]; @@ -739,6 +740,7 @@ static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data, if (gEnemyMonElevation[species] == 0 && !IsCastformForm(species)) return; LoadCompressedSpriteSheet(&gSpriteSheet_EnemyShadow); + LoadSpritePalette(&sSpritePalettes_HealthBoxHealthBar[0]); data->frontShadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, x, y + 29, 0xC8); gSprites[data->frontShadowSpriteId].data[0] = data->frontspriteId; From 46977b52fad932c3d1417b60882c49476d617593 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 13 Dec 2021 13:39:12 -0300 Subject: [PATCH 259/417] Added the footprints of all Gen. 7 and 8 species --- include/graphics.h | 177 ++++++++++++++++++++ src/data/graphics/pokemon.h | 177 ++++++++++++++++++++ src/data/pokemon_graphics/footprint_table.h | 177 ++++++++++++++++++++ 3 files changed, 531 insertions(+) diff --git a/include/graphics.h b/include/graphics.h index 8f99b5ecf1..a0e0d6e365 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -6539,6 +6539,183 @@ extern const u8 gMonFootprint_Zygarde[]; extern const u8 gMonFootprint_Diancie[]; extern const u8 gMonFootprint_Hoopa[]; extern const u8 gMonFootprint_Volcanion[]; +extern const u8 gMonFootprint_Rowlet[]; +extern const u8 gMonFootprint_Dartrix[]; +extern const u8 gMonFootprint_Decidueye[]; +extern const u8 gMonFootprint_Litten[]; +extern const u8 gMonFootprint_Torracat[]; +extern const u8 gMonFootprint_Incineroar[]; +extern const u8 gMonFootprint_Popplio[]; +extern const u8 gMonFootprint_Brionne[]; +extern const u8 gMonFootprint_Primarina[]; +extern const u8 gMonFootprint_Pikipek[]; +extern const u8 gMonFootprint_Trumbeak[]; +extern const u8 gMonFootprint_Toucannon[]; +extern const u8 gMonFootprint_Yungoos[]; +extern const u8 gMonFootprint_Gumshoos[]; +extern const u8 gMonFootprint_Grubbin[]; +extern const u8 gMonFootprint_Charjabug[]; +extern const u8 gMonFootprint_Vikavolt[]; +extern const u8 gMonFootprint_Crabrawler[]; +extern const u8 gMonFootprint_Crabominable[]; +extern const u8 gMonFootprint_Oricorio[]; +extern const u8 gMonFootprint_Cutiefly[]; +extern const u8 gMonFootprint_Ribombee[]; +extern const u8 gMonFootprint_Rockruff[]; +extern const u8 gMonFootprint_Lycanroc[]; +extern const u8 gMonFootprint_Wishiwashi[]; +extern const u8 gMonFootprint_Mareanie[]; +extern const u8 gMonFootprint_Toxapex[]; +extern const u8 gMonFootprint_Mudbray[]; +extern const u8 gMonFootprint_Mudsdale[]; +extern const u8 gMonFootprint_Dewpider[]; +extern const u8 gMonFootprint_Araquanid[]; +extern const u8 gMonFootprint_Fomantis[]; +extern const u8 gMonFootprint_Lurantis[]; +extern const u8 gMonFootprint_Morelull[]; +extern const u8 gMonFootprint_Shiinotic[]; +extern const u8 gMonFootprint_Salandit[]; +extern const u8 gMonFootprint_Salazzle[]; +extern const u8 gMonFootprint_Stufful[]; +extern const u8 gMonFootprint_Bewear[]; +extern const u8 gMonFootprint_Bounsweet[]; +extern const u8 gMonFootprint_Steenee[]; +extern const u8 gMonFootprint_Tsareena[]; +extern const u8 gMonFootprint_Comfey[]; +extern const u8 gMonFootprint_Oranguru[]; +extern const u8 gMonFootprint_Passimian[]; +extern const u8 gMonFootprint_Wimpod[]; +extern const u8 gMonFootprint_Golisopod[]; +extern const u8 gMonFootprint_Sandygast[]; +extern const u8 gMonFootprint_Palossand[]; +extern const u8 gMonFootprint_Pyukumuku[]; +extern const u8 gMonFootprint_Type_Null[]; +extern const u8 gMonFootprint_Silvally[]; +extern const u8 gMonFootprint_Minior[]; +extern const u8 gMonFootprint_Komala[]; +extern const u8 gMonFootprint_Turtonator[]; +extern const u8 gMonFootprint_Togedemaru[]; +extern const u8 gMonFootprint_Mimikyu[]; +extern const u8 gMonFootprint_Bruxish[]; +extern const u8 gMonFootprint_Drampa[]; +extern const u8 gMonFootprint_Dhelmise[]; +extern const u8 gMonFootprint_Jangmo_o[]; +extern const u8 gMonFootprint_Hakamo_o[]; +extern const u8 gMonFootprint_Kommo_o[]; +extern const u8 gMonFootprint_Tapu_Koko[]; +extern const u8 gMonFootprint_Tapu_Lele[]; +extern const u8 gMonFootprint_Tapu_Bulu[]; +extern const u8 gMonFootprint_Tapu_Fini[]; +extern const u8 gMonFootprint_Cosmog[]; +extern const u8 gMonFootprint_Cosmoem[]; +extern const u8 gMonFootprint_Solgaleo[]; +extern const u8 gMonFootprint_Lunala[]; +extern const u8 gMonFootprint_Nihilego[]; +extern const u8 gMonFootprint_Buzzwole[]; +extern const u8 gMonFootprint_Pheromosa[]; +extern const u8 gMonFootprint_Xurkitree[]; +extern const u8 gMonFootprint_Celesteela[]; +extern const u8 gMonFootprint_Kartana[]; +extern const u8 gMonFootprint_Guzzlord[]; +extern const u8 gMonFootprint_Necrozma[]; +extern const u8 gMonFootprint_Magearna[]; +extern const u8 gMonFootprint_Marshadow[]; +extern const u8 gMonFootprint_Poipole[]; +extern const u8 gMonFootprint_Naganadel[]; +extern const u8 gMonFootprint_Stakataka[]; +extern const u8 gMonFootprint_Blacephalon[]; +extern const u8 gMonFootprint_Zeraora[]; +extern const u8 gMonFootprint_Meltan[]; +extern const u8 gMonFootprint_Melmetal[]; +extern const u8 gMonFootprint_Grookey[]; +extern const u8 gMonFootprint_Thwackey[]; +extern const u8 gMonFootprint_Rillaboom[]; +extern const u8 gMonFootprint_Scorbunny[]; +extern const u8 gMonFootprint_Raboot[]; +extern const u8 gMonFootprint_Cinderace[]; +extern const u8 gMonFootprint_Sobble[]; +extern const u8 gMonFootprint_Drizzile[]; +extern const u8 gMonFootprint_Inteleon[]; +extern const u8 gMonFootprint_Skwovet[]; +extern const u8 gMonFootprint_Greedent[]; +extern const u8 gMonFootprint_Rookidee[]; +extern const u8 gMonFootprint_Corvisquire[]; +extern const u8 gMonFootprint_Corviknight[]; +extern const u8 gMonFootprint_Blipbug[]; +extern const u8 gMonFootprint_Dottler[]; +extern const u8 gMonFootprint_Orbeetle[]; +extern const u8 gMonFootprint_Nickit[]; +extern const u8 gMonFootprint_Thievul[]; +extern const u8 gMonFootprint_Gossifleur[]; +extern const u8 gMonFootprint_Eldegoss[]; +extern const u8 gMonFootprint_Wooloo[]; +extern const u8 gMonFootprint_Dubwool[]; +extern const u8 gMonFootprint_Chewtle[]; +extern const u8 gMonFootprint_Drednaw[]; +extern const u8 gMonFootprint_Yamper[]; +extern const u8 gMonFootprint_Boltund[]; +extern const u8 gMonFootprint_Rolycoly[]; +extern const u8 gMonFootprint_Carkol[]; +extern const u8 gMonFootprint_Coalossal[]; +extern const u8 gMonFootprint_Applin[]; +extern const u8 gMonFootprint_Flapple[]; +extern const u8 gMonFootprint_Appletun[]; +extern const u8 gMonFootprint_Silicobra[]; +extern const u8 gMonFootprint_Sandaconda[]; +extern const u8 gMonFootprint_Cramorant[]; +extern const u8 gMonFootprint_Arrokuda[]; +extern const u8 gMonFootprint_Barraskewda[]; +extern const u8 gMonFootprint_Toxel[]; +extern const u8 gMonFootprint_Toxtricity[]; +extern const u8 gMonFootprint_Sizzlipede[]; +extern const u8 gMonFootprint_Centiskorch[]; +extern const u8 gMonFootprint_Clobbopus[]; +extern const u8 gMonFootprint_Grapploct[]; +extern const u8 gMonFootprint_Sinistea[]; +extern const u8 gMonFootprint_Polteageist[]; +extern const u8 gMonFootprint_Hatenna[]; +extern const u8 gMonFootprint_Hattrem[]; +extern const u8 gMonFootprint_Hatterene[]; +extern const u8 gMonFootprint_Impidimp[]; +extern const u8 gMonFootprint_Morgrem[]; +extern const u8 gMonFootprint_Grimmsnarl[]; +extern const u8 gMonFootprint_Obstagoon[]; +extern const u8 gMonFootprint_Perrserker[]; +extern const u8 gMonFootprint_Cursola[]; +extern const u8 gMonFootprint_Sirfetchd[]; +extern const u8 gMonFootprint_Mr_Rime[]; +extern const u8 gMonFootprint_Runerigus[]; +extern const u8 gMonFootprint_Milcery[]; +extern const u8 gMonFootprint_Alcremie[]; +extern const u8 gMonFootprint_Falinks[]; +extern const u8 gMonFootprint_Pincurchin[]; +extern const u8 gMonFootprint_Snom[]; +extern const u8 gMonFootprint_Frosmoth[]; +extern const u8 gMonFootprint_Stonjourner[]; +extern const u8 gMonFootprint_Eiscue[]; +extern const u8 gMonFootprint_Indeedee[]; +extern const u8 gMonFootprint_Morpeko[]; +extern const u8 gMonFootprint_Cufant[]; +extern const u8 gMonFootprint_Copperajah[]; +extern const u8 gMonFootprint_Dracozolt[]; +extern const u8 gMonFootprint_Arctozolt[]; +extern const u8 gMonFootprint_Dracovish[]; +extern const u8 gMonFootprint_Arctovish[]; +extern const u8 gMonFootprint_Duraludon[]; +extern const u8 gMonFootprint_Dreepy[]; +extern const u8 gMonFootprint_Drakloak[]; +extern const u8 gMonFootprint_Dragapult[]; +extern const u8 gMonFootprint_Zacian[]; +extern const u8 gMonFootprint_Zamazenta[]; +extern const u8 gMonFootprint_Eternatus[]; +extern const u8 gMonFootprint_Kubfu[]; +extern const u8 gMonFootprint_Urshifu[]; +extern const u8 gMonFootprint_Zarude[]; +extern const u8 gMonFootprint_Regieleki[]; +extern const u8 gMonFootprint_Regidrago[]; +extern const u8 gMonFootprint_Glastrier[]; +extern const u8 gMonFootprint_Spectrier[]; +extern const u8 gMonFootprint_Calyrex[]; // trainer sprites extern const u32 gTrainerFrontPic_Hiker[]; diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index 9ae0ad3669..8cee7fc112 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -6501,3 +6501,180 @@ const u8 gMonFootprint_Zygarde[] = INCBIN_U8("graphics/pokemon/zygarde/footprint const u8 gMonFootprint_Diancie[] = INCBIN_U8("graphics/pokemon/diancie/footprint.1bpp"); const u8 gMonFootprint_Hoopa[] = INCBIN_U8("graphics/pokemon/hoopa/footprint.1bpp"); const u8 gMonFootprint_Volcanion[] = INCBIN_U8("graphics/pokemon/volcanion/footprint.1bpp"); +const u8 gMonFootprint_Rowlet[] = INCBIN_U8("graphics/pokemon/rowlet/footprint.1bpp"); +const u8 gMonFootprint_Dartrix[] = INCBIN_U8("graphics/pokemon/dartrix/footprint.1bpp"); +const u8 gMonFootprint_Decidueye[] = INCBIN_U8("graphics/pokemon/decidueye/footprint.1bpp"); +const u8 gMonFootprint_Litten[] = INCBIN_U8("graphics/pokemon/litten/footprint.1bpp"); +const u8 gMonFootprint_Torracat[] = INCBIN_U8("graphics/pokemon/torracat/footprint.1bpp"); +const u8 gMonFootprint_Incineroar[] = INCBIN_U8("graphics/pokemon/incineroar/footprint.1bpp"); +const u8 gMonFootprint_Popplio[] = INCBIN_U8("graphics/pokemon/popplio/footprint.1bpp"); +const u8 gMonFootprint_Brionne[] = INCBIN_U8("graphics/pokemon/brionne/footprint.1bpp"); +const u8 gMonFootprint_Primarina[] = INCBIN_U8("graphics/pokemon/primarina/footprint.1bpp"); +const u8 gMonFootprint_Pikipek[] = INCBIN_U8("graphics/pokemon/pikipek/footprint.1bpp"); +const u8 gMonFootprint_Trumbeak[] = INCBIN_U8("graphics/pokemon/trumbeak/footprint.1bpp"); +const u8 gMonFootprint_Toucannon[] = INCBIN_U8("graphics/pokemon/toucannon/footprint.1bpp"); +const u8 gMonFootprint_Yungoos[] = INCBIN_U8("graphics/pokemon/yungoos/footprint.1bpp"); +const u8 gMonFootprint_Gumshoos[] = INCBIN_U8("graphics/pokemon/gumshoos/footprint.1bpp"); +const u8 gMonFootprint_Grubbin[] = INCBIN_U8("graphics/pokemon/grubbin/footprint.1bpp"); +const u8 gMonFootprint_Charjabug[] = INCBIN_U8("graphics/pokemon/charjabug/footprint.1bpp"); +const u8 gMonFootprint_Vikavolt[] = INCBIN_U8("graphics/pokemon/vikavolt/footprint.1bpp"); +const u8 gMonFootprint_Crabrawler[] = INCBIN_U8("graphics/pokemon/crabrawler/footprint.1bpp"); +const u8 gMonFootprint_Crabominable[] = INCBIN_U8("graphics/pokemon/crabominable/footprint.1bpp"); +const u8 gMonFootprint_Oricorio[] = INCBIN_U8("graphics/pokemon/oricorio/footprint.1bpp"); +const u8 gMonFootprint_Cutiefly[] = INCBIN_U8("graphics/pokemon/cutiefly/footprint.1bpp"); +const u8 gMonFootprint_Ribombee[] = INCBIN_U8("graphics/pokemon/ribombee/footprint.1bpp"); +const u8 gMonFootprint_Rockruff[] = INCBIN_U8("graphics/pokemon/rockruff/footprint.1bpp"); +const u8 gMonFootprint_Lycanroc[] = INCBIN_U8("graphics/pokemon/lycanroc/footprint.1bpp"); +const u8 gMonFootprint_Wishiwashi[] = INCBIN_U8("graphics/pokemon/wishiwashi/footprint.1bpp"); +const u8 gMonFootprint_Mareanie[] = INCBIN_U8("graphics/pokemon/mareanie/footprint.1bpp"); +const u8 gMonFootprint_Toxapex[] = INCBIN_U8("graphics/pokemon/toxapex/footprint.1bpp"); +const u8 gMonFootprint_Mudbray[] = INCBIN_U8("graphics/pokemon/mudbray/footprint.1bpp"); +const u8 gMonFootprint_Mudsdale[] = INCBIN_U8("graphics/pokemon/mudsdale/footprint.1bpp"); +const u8 gMonFootprint_Dewpider[] = INCBIN_U8("graphics/pokemon/dewpider/footprint.1bpp"); +const u8 gMonFootprint_Araquanid[] = INCBIN_U8("graphics/pokemon/araquanid/footprint.1bpp"); +const u8 gMonFootprint_Fomantis[] = INCBIN_U8("graphics/pokemon/fomantis/footprint.1bpp"); +const u8 gMonFootprint_Lurantis[] = INCBIN_U8("graphics/pokemon/lurantis/footprint.1bpp"); +const u8 gMonFootprint_Morelull[] = INCBIN_U8("graphics/pokemon/morelull/footprint.1bpp"); +const u8 gMonFootprint_Shiinotic[] = INCBIN_U8("graphics/pokemon/shiinotic/footprint.1bpp"); +const u8 gMonFootprint_Salandit[] = INCBIN_U8("graphics/pokemon/salandit/footprint.1bpp"); +const u8 gMonFootprint_Salazzle[] = INCBIN_U8("graphics/pokemon/salazzle/footprint.1bpp"); +const u8 gMonFootprint_Stufful[] = INCBIN_U8("graphics/pokemon/stufful/footprint.1bpp"); +const u8 gMonFootprint_Bewear[] = INCBIN_U8("graphics/pokemon/bewear/footprint.1bpp"); +const u8 gMonFootprint_Bounsweet[] = INCBIN_U8("graphics/pokemon/bounsweet/footprint.1bpp"); +const u8 gMonFootprint_Steenee[] = INCBIN_U8("graphics/pokemon/steenee/footprint.1bpp"); +const u8 gMonFootprint_Tsareena[] = INCBIN_U8("graphics/pokemon/tsareena/footprint.1bpp"); +const u8 gMonFootprint_Comfey[] = INCBIN_U8("graphics/pokemon/comfey/footprint.1bpp"); +const u8 gMonFootprint_Oranguru[] = INCBIN_U8("graphics/pokemon/oranguru/footprint.1bpp"); +const u8 gMonFootprint_Passimian[] = INCBIN_U8("graphics/pokemon/passimian/footprint.1bpp"); +const u8 gMonFootprint_Wimpod[] = INCBIN_U8("graphics/pokemon/wimpod/footprint.1bpp"); +const u8 gMonFootprint_Golisopod[] = INCBIN_U8("graphics/pokemon/golisopod/footprint.1bpp"); +const u8 gMonFootprint_Sandygast[] = INCBIN_U8("graphics/pokemon/sandygast/footprint.1bpp"); +const u8 gMonFootprint_Palossand[] = INCBIN_U8("graphics/pokemon/palossand/footprint.1bpp"); +const u8 gMonFootprint_Pyukumuku[] = INCBIN_U8("graphics/pokemon/pyukumuku/footprint.1bpp"); +const u8 gMonFootprint_Type_Null[] = INCBIN_U8("graphics/pokemon/type_null/footprint.1bpp"); +const u8 gMonFootprint_Silvally[] = INCBIN_U8("graphics/pokemon/silvally/footprint.1bpp"); +const u8 gMonFootprint_Minior[] = INCBIN_U8("graphics/pokemon/minior/footprint.1bpp"); +const u8 gMonFootprint_Komala[] = INCBIN_U8("graphics/pokemon/komala/footprint.1bpp"); +const u8 gMonFootprint_Turtonator[] = INCBIN_U8("graphics/pokemon/turtonator/footprint.1bpp"); +const u8 gMonFootprint_Togedemaru[] = INCBIN_U8("graphics/pokemon/togedemaru/footprint.1bpp"); +const u8 gMonFootprint_Mimikyu[] = INCBIN_U8("graphics/pokemon/mimikyu/footprint.1bpp"); +const u8 gMonFootprint_Bruxish[] = INCBIN_U8("graphics/pokemon/bruxish/footprint.1bpp"); +const u8 gMonFootprint_Drampa[] = INCBIN_U8("graphics/pokemon/drampa/footprint.1bpp"); +const u8 gMonFootprint_Dhelmise[] = INCBIN_U8("graphics/pokemon/dhelmise/footprint.1bpp"); +const u8 gMonFootprint_Jangmo_o[] = INCBIN_U8("graphics/pokemon/jangmo_o/footprint.1bpp"); +const u8 gMonFootprint_Hakamo_o[] = INCBIN_U8("graphics/pokemon/hakamo_o/footprint.1bpp"); +const u8 gMonFootprint_Kommo_o[] = INCBIN_U8("graphics/pokemon/kommo_o/footprint.1bpp"); +const u8 gMonFootprint_Tapu_Koko[] = INCBIN_U8("graphics/pokemon/tapu_koko/footprint.1bpp"); +const u8 gMonFootprint_Tapu_Lele[] = INCBIN_U8("graphics/pokemon/tapu_lele/footprint.1bpp"); +const u8 gMonFootprint_Tapu_Bulu[] = INCBIN_U8("graphics/pokemon/tapu_bulu/footprint.1bpp"); +const u8 gMonFootprint_Tapu_Fini[] = INCBIN_U8("graphics/pokemon/tapu_fini/footprint.1bpp"); +const u8 gMonFootprint_Cosmog[] = INCBIN_U8("graphics/pokemon/cosmog/footprint.1bpp"); +const u8 gMonFootprint_Cosmoem[] = INCBIN_U8("graphics/pokemon/cosmoem/footprint.1bpp"); +const u8 gMonFootprint_Solgaleo[] = INCBIN_U8("graphics/pokemon/solgaleo/footprint.1bpp"); +const u8 gMonFootprint_Lunala[] = INCBIN_U8("graphics/pokemon/lunala/footprint.1bpp"); +const u8 gMonFootprint_Nihilego[] = INCBIN_U8("graphics/pokemon/nihilego/footprint.1bpp"); +const u8 gMonFootprint_Buzzwole[] = INCBIN_U8("graphics/pokemon/buzzwole/footprint.1bpp"); +const u8 gMonFootprint_Pheromosa[] = INCBIN_U8("graphics/pokemon/pheromosa/footprint.1bpp"); +const u8 gMonFootprint_Xurkitree[] = INCBIN_U8("graphics/pokemon/xurkitree/footprint.1bpp"); +const u8 gMonFootprint_Celesteela[] = INCBIN_U8("graphics/pokemon/celesteela/footprint.1bpp"); +const u8 gMonFootprint_Kartana[] = INCBIN_U8("graphics/pokemon/kartana/footprint.1bpp"); +const u8 gMonFootprint_Guzzlord[] = INCBIN_U8("graphics/pokemon/guzzlord/footprint.1bpp"); +const u8 gMonFootprint_Necrozma[] = INCBIN_U8("graphics/pokemon/necrozma/footprint.1bpp"); +const u8 gMonFootprint_Magearna[] = INCBIN_U8("graphics/pokemon/magearna/footprint.1bpp"); +const u8 gMonFootprint_Marshadow[] = INCBIN_U8("graphics/pokemon/marshadow/footprint.1bpp"); +const u8 gMonFootprint_Poipole[] = INCBIN_U8("graphics/pokemon/poipole/footprint.1bpp"); +const u8 gMonFootprint_Naganadel[] = INCBIN_U8("graphics/pokemon/naganadel/footprint.1bpp"); +const u8 gMonFootprint_Stakataka[] = INCBIN_U8("graphics/pokemon/stakataka/footprint.1bpp"); +const u8 gMonFootprint_Blacephalon[] = INCBIN_U8("graphics/pokemon/blacephalon/footprint.1bpp"); +const u8 gMonFootprint_Zeraora[] = INCBIN_U8("graphics/pokemon/zeraora/footprint.1bpp"); +const u8 gMonFootprint_Meltan[] = INCBIN_U8("graphics/pokemon/meltan/footprint.1bpp"); +const u8 gMonFootprint_Melmetal[] = INCBIN_U8("graphics/pokemon/melmetal/footprint.1bpp"); +const u8 gMonFootprint_Grookey[] = INCBIN_U8("graphics/pokemon/grookey/footprint.1bpp"); +const u8 gMonFootprint_Thwackey[] = INCBIN_U8("graphics/pokemon/thwackey/footprint.1bpp"); +const u8 gMonFootprint_Rillaboom[] = INCBIN_U8("graphics/pokemon/rillaboom/footprint.1bpp"); +const u8 gMonFootprint_Scorbunny[] = INCBIN_U8("graphics/pokemon/scorbunny/footprint.1bpp"); +const u8 gMonFootprint_Raboot[] = INCBIN_U8("graphics/pokemon/raboot/footprint.1bpp"); +const u8 gMonFootprint_Cinderace[] = INCBIN_U8("graphics/pokemon/cinderace/footprint.1bpp"); +const u8 gMonFootprint_Sobble[] = INCBIN_U8("graphics/pokemon/sobble/footprint.1bpp"); +const u8 gMonFootprint_Drizzile[] = INCBIN_U8("graphics/pokemon/drizzile/footprint.1bpp"); +const u8 gMonFootprint_Inteleon[] = INCBIN_U8("graphics/pokemon/inteleon/footprint.1bpp"); +const u8 gMonFootprint_Skwovet[] = INCBIN_U8("graphics/pokemon/skwovet/footprint.1bpp"); +const u8 gMonFootprint_Greedent[] = INCBIN_U8("graphics/pokemon/greedent/footprint.1bpp"); +const u8 gMonFootprint_Rookidee[] = INCBIN_U8("graphics/pokemon/rookidee/footprint.1bpp"); +const u8 gMonFootprint_Corvisquire[] = INCBIN_U8("graphics/pokemon/corvisquire/footprint.1bpp"); +const u8 gMonFootprint_Corviknight[] = INCBIN_U8("graphics/pokemon/corviknight/footprint.1bpp"); +const u8 gMonFootprint_Blipbug[] = INCBIN_U8("graphics/pokemon/blipbug/footprint.1bpp"); +const u8 gMonFootprint_Dottler[] = INCBIN_U8("graphics/pokemon/dottler/footprint.1bpp"); +const u8 gMonFootprint_Orbeetle[] = INCBIN_U8("graphics/pokemon/orbeetle/footprint.1bpp"); +const u8 gMonFootprint_Nickit[] = INCBIN_U8("graphics/pokemon/nickit/footprint.1bpp"); +const u8 gMonFootprint_Thievul[] = INCBIN_U8("graphics/pokemon/thievul/footprint.1bpp"); +const u8 gMonFootprint_Gossifleur[] = INCBIN_U8("graphics/pokemon/gossifleur/footprint.1bpp"); +const u8 gMonFootprint_Eldegoss[] = INCBIN_U8("graphics/pokemon/eldegoss/footprint.1bpp"); +const u8 gMonFootprint_Wooloo[] = INCBIN_U8("graphics/pokemon/wooloo/footprint.1bpp"); +const u8 gMonFootprint_Dubwool[] = INCBIN_U8("graphics/pokemon/dubwool/footprint.1bpp"); +const u8 gMonFootprint_Chewtle[] = INCBIN_U8("graphics/pokemon/chewtle/footprint.1bpp"); +const u8 gMonFootprint_Drednaw[] = INCBIN_U8("graphics/pokemon/drednaw/footprint.1bpp"); +const u8 gMonFootprint_Yamper[] = INCBIN_U8("graphics/pokemon/yamper/footprint.1bpp"); +const u8 gMonFootprint_Boltund[] = INCBIN_U8("graphics/pokemon/boltund/footprint.1bpp"); +const u8 gMonFootprint_Rolycoly[] = INCBIN_U8("graphics/pokemon/rolycoly/footprint.1bpp"); +const u8 gMonFootprint_Carkol[] = INCBIN_U8("graphics/pokemon/carkol/footprint.1bpp"); +const u8 gMonFootprint_Coalossal[] = INCBIN_U8("graphics/pokemon/coalossal/footprint.1bpp"); +const u8 gMonFootprint_Applin[] = INCBIN_U8("graphics/pokemon/applin/footprint.1bpp"); +const u8 gMonFootprint_Flapple[] = INCBIN_U8("graphics/pokemon/flapple/footprint.1bpp"); +const u8 gMonFootprint_Appletun[] = INCBIN_U8("graphics/pokemon/appletun/footprint.1bpp"); +const u8 gMonFootprint_Silicobra[] = INCBIN_U8("graphics/pokemon/silicobra/footprint.1bpp"); +const u8 gMonFootprint_Sandaconda[] = INCBIN_U8("graphics/pokemon/sandaconda/footprint.1bpp"); +const u8 gMonFootprint_Cramorant[] = INCBIN_U8("graphics/pokemon/cramorant/footprint.1bpp"); +const u8 gMonFootprint_Arrokuda[] = INCBIN_U8("graphics/pokemon/arrokuda/footprint.1bpp"); +const u8 gMonFootprint_Barraskewda[] = INCBIN_U8("graphics/pokemon/barraskewda/footprint.1bpp"); +const u8 gMonFootprint_Toxel[] = INCBIN_U8("graphics/pokemon/toxel/footprint.1bpp"); +const u8 gMonFootprint_Toxtricity[] = INCBIN_U8("graphics/pokemon/toxtricity/footprint.1bpp"); +const u8 gMonFootprint_Sizzlipede[] = INCBIN_U8("graphics/pokemon/sizzlipede/footprint.1bpp"); +const u8 gMonFootprint_Centiskorch[] = INCBIN_U8("graphics/pokemon/centiskorch/footprint.1bpp"); +const u8 gMonFootprint_Clobbopus[] = INCBIN_U8("graphics/pokemon/clobbopus/footprint.1bpp"); +const u8 gMonFootprint_Grapploct[] = INCBIN_U8("graphics/pokemon/grapploct/footprint.1bpp"); +const u8 gMonFootprint_Sinistea[] = INCBIN_U8("graphics/pokemon/sinistea/footprint.1bpp"); +const u8 gMonFootprint_Polteageist[] = INCBIN_U8("graphics/pokemon/polteageist/footprint.1bpp"); +const u8 gMonFootprint_Hatenna[] = INCBIN_U8("graphics/pokemon/hatenna/footprint.1bpp"); +const u8 gMonFootprint_Hattrem[] = INCBIN_U8("graphics/pokemon/hattrem/footprint.1bpp"); +const u8 gMonFootprint_Hatterene[] = INCBIN_U8("graphics/pokemon/hatterene/footprint.1bpp"); +const u8 gMonFootprint_Impidimp[] = INCBIN_U8("graphics/pokemon/impidimp/footprint.1bpp"); +const u8 gMonFootprint_Morgrem[] = INCBIN_U8("graphics/pokemon/morgrem/footprint.1bpp"); +const u8 gMonFootprint_Grimmsnarl[] = INCBIN_U8("graphics/pokemon/grimmsnarl/footprint.1bpp"); +const u8 gMonFootprint_Obstagoon[] = INCBIN_U8("graphics/pokemon/obstagoon/footprint.1bpp"); +const u8 gMonFootprint_Perrserker[] = INCBIN_U8("graphics/pokemon/perrserker/footprint.1bpp"); +const u8 gMonFootprint_Cursola[] = INCBIN_U8("graphics/pokemon/cursola/footprint.1bpp"); +const u8 gMonFootprint_Sirfetchd[] = INCBIN_U8("graphics/pokemon/sirfetchd/footprint.1bpp"); +const u8 gMonFootprint_Mr_Rime[] = INCBIN_U8("graphics/pokemon/mr_rime/footprint.1bpp"); +const u8 gMonFootprint_Runerigus[] = INCBIN_U8("graphics/pokemon/runerigus/footprint.1bpp"); +const u8 gMonFootprint_Milcery[] = INCBIN_U8("graphics/pokemon/milcery/footprint.1bpp"); +const u8 gMonFootprint_Alcremie[] = INCBIN_U8("graphics/pokemon/alcremie/footprint.1bpp"); +const u8 gMonFootprint_Falinks[] = INCBIN_U8("graphics/pokemon/falinks/footprint.1bpp"); +const u8 gMonFootprint_Pincurchin[] = INCBIN_U8("graphics/pokemon/pincurchin/footprint.1bpp"); +const u8 gMonFootprint_Snom[] = INCBIN_U8("graphics/pokemon/snom/footprint.1bpp"); +const u8 gMonFootprint_Frosmoth[] = INCBIN_U8("graphics/pokemon/frosmoth/footprint.1bpp"); +const u8 gMonFootprint_Stonjourner[] = INCBIN_U8("graphics/pokemon/stonjourner/footprint.1bpp"); +const u8 gMonFootprint_Eiscue[] = INCBIN_U8("graphics/pokemon/eiscue/footprint.1bpp"); +const u8 gMonFootprint_Indeedee[] = INCBIN_U8("graphics/pokemon/indeedee/footprint.1bpp"); +const u8 gMonFootprint_Morpeko[] = INCBIN_U8("graphics/pokemon/morpeko/footprint.1bpp"); +const u8 gMonFootprint_Cufant[] = INCBIN_U8("graphics/pokemon/cufant/footprint.1bpp"); +const u8 gMonFootprint_Copperajah[] = INCBIN_U8("graphics/pokemon/copperajah/footprint.1bpp"); +const u8 gMonFootprint_Dracozolt[] = INCBIN_U8("graphics/pokemon/dracozolt/footprint.1bpp"); +const u8 gMonFootprint_Arctozolt[] = INCBIN_U8("graphics/pokemon/arctozolt/footprint.1bpp"); +const u8 gMonFootprint_Dracovish[] = INCBIN_U8("graphics/pokemon/dracovish/footprint.1bpp"); +const u8 gMonFootprint_Arctovish[] = INCBIN_U8("graphics/pokemon/arctovish/footprint.1bpp"); +const u8 gMonFootprint_Duraludon[] = INCBIN_U8("graphics/pokemon/duraludon/footprint.1bpp"); +const u8 gMonFootprint_Dreepy[] = INCBIN_U8("graphics/pokemon/dreepy/footprint.1bpp"); +const u8 gMonFootprint_Drakloak[] = INCBIN_U8("graphics/pokemon/drakloak/footprint.1bpp"); +const u8 gMonFootprint_Dragapult[] = INCBIN_U8("graphics/pokemon/dragapult/footprint.1bpp"); +const u8 gMonFootprint_Zacian[] = INCBIN_U8("graphics/pokemon/zacian/footprint.1bpp"); +const u8 gMonFootprint_Zamazenta[] = INCBIN_U8("graphics/pokemon/zamazenta/footprint.1bpp"); +const u8 gMonFootprint_Eternatus[] = INCBIN_U8("graphics/pokemon/eternatus/footprint.1bpp"); +const u8 gMonFootprint_Kubfu[] = INCBIN_U8("graphics/pokemon/kubfu/footprint.1bpp"); +const u8 gMonFootprint_Urshifu[] = INCBIN_U8("graphics/pokemon/urshifu/footprint.1bpp"); +const u8 gMonFootprint_Zarude[] = INCBIN_U8("graphics/pokemon/zarude/footprint.1bpp"); +const u8 gMonFootprint_Regieleki[] = INCBIN_U8("graphics/pokemon/regieleki/footprint.1bpp"); +const u8 gMonFootprint_Regidrago[] = INCBIN_U8("graphics/pokemon/regidrago/footprint.1bpp"); +const u8 gMonFootprint_Glastrier[] = INCBIN_U8("graphics/pokemon/glastrier/footprint.1bpp"); +const u8 gMonFootprint_Spectrier[] = INCBIN_U8("graphics/pokemon/spectrier/footprint.1bpp"); +const u8 gMonFootprint_Calyrex[] = INCBIN_U8("graphics/pokemon/calyrex/footprint.1bpp"); diff --git a/src/data/pokemon_graphics/footprint_table.h b/src/data/pokemon_graphics/footprint_table.h index 6ba0e7fccc..babc6b43c5 100644 --- a/src/data/pokemon_graphics/footprint_table.h +++ b/src/data/pokemon_graphics/footprint_table.h @@ -722,5 +722,182 @@ const u8 *const gMonFootprintTable[] = [SPECIES_DIANCIE] = gMonFootprint_Diancie, [SPECIES_HOOPA] = gMonFootprint_Hoopa, [SPECIES_VOLCANION] = gMonFootprint_Volcanion, + [SPECIES_ROWLET] = gMonFootprint_Rowlet, + [SPECIES_DARTRIX] = gMonFootprint_Dartrix, + [SPECIES_DECIDUEYE] = gMonFootprint_Decidueye, + [SPECIES_LITTEN] = gMonFootprint_Litten, + [SPECIES_TORRACAT] = gMonFootprint_Torracat, + [SPECIES_INCINEROAR] = gMonFootprint_Incineroar, + [SPECIES_POPPLIO] = gMonFootprint_Popplio, + [SPECIES_BRIONNE] = gMonFootprint_Brionne, + [SPECIES_PRIMARINA] = gMonFootprint_Primarina, + [SPECIES_PIKIPEK] = gMonFootprint_Pikipek, + [SPECIES_TRUMBEAK] = gMonFootprint_Trumbeak, + [SPECIES_TOUCANNON] = gMonFootprint_Toucannon, + [SPECIES_YUNGOOS] = gMonFootprint_Yungoos, + [SPECIES_GUMSHOOS] = gMonFootprint_Gumshoos, + [SPECIES_GRUBBIN] = gMonFootprint_Grubbin, + [SPECIES_CHARJABUG] = gMonFootprint_Charjabug, + [SPECIES_VIKAVOLT] = gMonFootprint_Vikavolt, + [SPECIES_CRABRAWLER] = gMonFootprint_Crabrawler, + [SPECIES_CRABOMINABLE] = gMonFootprint_Crabominable, + [SPECIES_ORICORIO] = gMonFootprint_Oricorio, + [SPECIES_CUTIEFLY] = gMonFootprint_Cutiefly, + [SPECIES_RIBOMBEE] = gMonFootprint_Ribombee, + [SPECIES_ROCKRUFF] = gMonFootprint_Rockruff, + [SPECIES_LYCANROC] = gMonFootprint_Lycanroc, + [SPECIES_WISHIWASHI] = gMonFootprint_Wishiwashi, + [SPECIES_MAREANIE] = gMonFootprint_Mareanie, + [SPECIES_TOXAPEX] = gMonFootprint_Toxapex, + [SPECIES_MUDBRAY] = gMonFootprint_Mudbray, + [SPECIES_MUDSDALE] = gMonFootprint_Mudsdale, + [SPECIES_DEWPIDER] = gMonFootprint_Dewpider, + [SPECIES_ARAQUANID] = gMonFootprint_Araquanid, + [SPECIES_FOMANTIS] = gMonFootprint_Fomantis, + [SPECIES_LURANTIS] = gMonFootprint_Lurantis, + [SPECIES_MORELULL] = gMonFootprint_Morelull, + [SPECIES_SHIINOTIC] = gMonFootprint_Shiinotic, + [SPECIES_SALANDIT] = gMonFootprint_Salandit, + [SPECIES_SALAZZLE] = gMonFootprint_Salazzle, + [SPECIES_STUFFUL] = gMonFootprint_Stufful, + [SPECIES_BEWEAR] = gMonFootprint_Bewear, + [SPECIES_BOUNSWEET] = gMonFootprint_Bounsweet, + [SPECIES_STEENEE] = gMonFootprint_Steenee, + [SPECIES_TSAREENA] = gMonFootprint_Tsareena, + [SPECIES_COMFEY] = gMonFootprint_Comfey, + [SPECIES_ORANGURU] = gMonFootprint_Oranguru, + [SPECIES_PASSIMIAN] = gMonFootprint_Passimian, + [SPECIES_WIMPOD] = gMonFootprint_Wimpod, + [SPECIES_GOLISOPOD] = gMonFootprint_Golisopod, + [SPECIES_SANDYGAST] = gMonFootprint_Sandygast, + [SPECIES_PALOSSAND] = gMonFootprint_Palossand, + [SPECIES_PYUKUMUKU] = gMonFootprint_Pyukumuku, + [SPECIES_TYPE_NULL] = gMonFootprint_Type_Null, + [SPECIES_SILVALLY] = gMonFootprint_Silvally, + [SPECIES_MINIOR] = gMonFootprint_Minior, + [SPECIES_KOMALA] = gMonFootprint_Komala, + [SPECIES_TURTONATOR] = gMonFootprint_Turtonator, + [SPECIES_TOGEDEMARU] = gMonFootprint_Togedemaru, + [SPECIES_MIMIKYU] = gMonFootprint_Mimikyu, + [SPECIES_BRUXISH] = gMonFootprint_Bruxish, + [SPECIES_DRAMPA] = gMonFootprint_Drampa, + [SPECIES_DHELMISE] = gMonFootprint_Dhelmise, + [SPECIES_JANGMO_O] = gMonFootprint_Jangmo_o, + [SPECIES_HAKAMO_O] = gMonFootprint_Hakamo_o, + [SPECIES_KOMMO_O] = gMonFootprint_Kommo_o, + [SPECIES_TAPU_KOKO] = gMonFootprint_Tapu_Koko, + [SPECIES_TAPU_LELE] = gMonFootprint_Tapu_Lele, + [SPECIES_TAPU_BULU] = gMonFootprint_Tapu_Bulu, + [SPECIES_TAPU_FINI] = gMonFootprint_Tapu_Fini, + [SPECIES_COSMOG] = gMonFootprint_Cosmog, + [SPECIES_COSMOEM] = gMonFootprint_Cosmoem, + [SPECIES_SOLGALEO] = gMonFootprint_Solgaleo, + [SPECIES_LUNALA] = gMonFootprint_Lunala, + [SPECIES_NIHILEGO] = gMonFootprint_Nihilego, + [SPECIES_BUZZWOLE] = gMonFootprint_Buzzwole, + [SPECIES_PHEROMOSA] = gMonFootprint_Pheromosa, + [SPECIES_XURKITREE] = gMonFootprint_Xurkitree, + [SPECIES_CELESTEELA] = gMonFootprint_Celesteela, + [SPECIES_KARTANA] = gMonFootprint_Kartana, + [SPECIES_GUZZLORD] = gMonFootprint_Guzzlord, + [SPECIES_NECROZMA] = gMonFootprint_Necrozma, + [SPECIES_MAGEARNA] = gMonFootprint_Magearna, + [SPECIES_MARSHADOW] = gMonFootprint_Marshadow, + [SPECIES_POIPOLE] = gMonFootprint_Poipole, + [SPECIES_NAGANADEL] = gMonFootprint_Naganadel, + [SPECIES_STAKATAKA] = gMonFootprint_Stakataka, + [SPECIES_BLACEPHALON] = gMonFootprint_Blacephalon, + [SPECIES_ZERAORA] = gMonFootprint_Zeraora, + [SPECIES_MELTAN] = gMonFootprint_Meltan, + [SPECIES_MELMETAL] = gMonFootprint_Melmetal, + [SPECIES_GROOKEY] = gMonFootprint_Grookey, + [SPECIES_THWACKEY] = gMonFootprint_Thwackey, + [SPECIES_RILLABOOM] = gMonFootprint_Rillaboom, + [SPECIES_SCORBUNNY] = gMonFootprint_Scorbunny, + [SPECIES_RABOOT] = gMonFootprint_Raboot, + [SPECIES_CINDERACE] = gMonFootprint_Cinderace, + [SPECIES_SOBBLE] = gMonFootprint_Sobble, + [SPECIES_DRIZZILE] = gMonFootprint_Drizzile, + [SPECIES_INTELEON] = gMonFootprint_Inteleon, + [SPECIES_SKWOVET] = gMonFootprint_Skwovet, + [SPECIES_GREEDENT] = gMonFootprint_Greedent, + [SPECIES_ROOKIDEE] = gMonFootprint_Rookidee, + [SPECIES_CORVISQUIRE] = gMonFootprint_Corvisquire, + [SPECIES_CORVIKNIGHT] = gMonFootprint_Corviknight, + [SPECIES_BLIPBUG] = gMonFootprint_Blipbug, + [SPECIES_DOTTLER] = gMonFootprint_Dottler, + [SPECIES_ORBEETLE] = gMonFootprint_Orbeetle, + [SPECIES_NICKIT] = gMonFootprint_Nickit, + [SPECIES_THIEVUL] = gMonFootprint_Thievul, + [SPECIES_GOSSIFLEUR] = gMonFootprint_Gossifleur, + [SPECIES_ELDEGOSS] = gMonFootprint_Eldegoss, + [SPECIES_WOOLOO] = gMonFootprint_Wooloo, + [SPECIES_DUBWOOL] = gMonFootprint_Dubwool, + [SPECIES_CHEWTLE] = gMonFootprint_Chewtle, + [SPECIES_DREDNAW] = gMonFootprint_Drednaw, + [SPECIES_YAMPER] = gMonFootprint_Yamper, + [SPECIES_BOLTUND] = gMonFootprint_Boltund, + [SPECIES_ROLYCOLY] = gMonFootprint_Rolycoly, + [SPECIES_CARKOL] = gMonFootprint_Carkol, + [SPECIES_COALOSSAL] = gMonFootprint_Coalossal, + [SPECIES_APPLIN] = gMonFootprint_Applin, + [SPECIES_FLAPPLE] = gMonFootprint_Flapple, + [SPECIES_APPLETUN] = gMonFootprint_Appletun, + [SPECIES_SILICOBRA] = gMonFootprint_Silicobra, + [SPECIES_SANDACONDA] = gMonFootprint_Sandaconda, + [SPECIES_CRAMORANT] = gMonFootprint_Cramorant, + [SPECIES_ARROKUDA] = gMonFootprint_Arrokuda, + [SPECIES_BARRASKEWDA] = gMonFootprint_Barraskewda, + [SPECIES_TOXEL] = gMonFootprint_Toxel, + [SPECIES_TOXTRICITY] = gMonFootprint_Toxtricity, + [SPECIES_SIZZLIPEDE] = gMonFootprint_Sizzlipede, + [SPECIES_CENTISKORCH] = gMonFootprint_Centiskorch, + [SPECIES_CLOBBOPUS] = gMonFootprint_Clobbopus, + [SPECIES_GRAPPLOCT] = gMonFootprint_Grapploct, + [SPECIES_SINISTEA] = gMonFootprint_Sinistea, + [SPECIES_POLTEAGEIST] = gMonFootprint_Polteageist, + [SPECIES_HATENNA] = gMonFootprint_Hatenna, + [SPECIES_HATTREM] = gMonFootprint_Hattrem, + [SPECIES_HATTERENE] = gMonFootprint_Hatterene, + [SPECIES_IMPIDIMP] = gMonFootprint_Impidimp, + [SPECIES_MORGREM] = gMonFootprint_Morgrem, + [SPECIES_GRIMMSNARL] = gMonFootprint_Grimmsnarl, + [SPECIES_OBSTAGOON] = gMonFootprint_Obstagoon, + [SPECIES_PERRSERKER] = gMonFootprint_Perrserker, + [SPECIES_CURSOLA] = gMonFootprint_Cursola, + [SPECIES_SIRFETCHD] = gMonFootprint_Sirfetchd, + [SPECIES_MR_RIME] = gMonFootprint_Mr_Rime, + [SPECIES_RUNERIGUS] = gMonFootprint_Runerigus, + [SPECIES_MILCERY] = gMonFootprint_Milcery, + [SPECIES_ALCREMIE] = gMonFootprint_Alcremie, + [SPECIES_FALINKS] = gMonFootprint_Falinks, + [SPECIES_PINCURCHIN] = gMonFootprint_Pincurchin, + [SPECIES_SNOM] = gMonFootprint_Snom, + [SPECIES_FROSMOTH] = gMonFootprint_Frosmoth, + [SPECIES_STONJOURNER] = gMonFootprint_Stonjourner, + [SPECIES_EISCUE] = gMonFootprint_Eiscue, + [SPECIES_INDEEDEE] = gMonFootprint_Indeedee, + [SPECIES_MORPEKO] = gMonFootprint_Morpeko, + [SPECIES_CUFANT] = gMonFootprint_Cufant, + [SPECIES_COPPERAJAH] = gMonFootprint_Copperajah, + [SPECIES_DRACOZOLT] = gMonFootprint_Dracozolt, + [SPECIES_ARCTOZOLT] = gMonFootprint_Arctozolt, + [SPECIES_DRACOVISH] = gMonFootprint_Dracovish, + [SPECIES_ARCTOVISH] = gMonFootprint_Arctovish, + [SPECIES_DURALUDON] = gMonFootprint_Duraludon, + [SPECIES_DREEPY] = gMonFootprint_Dreepy, + [SPECIES_DRAKLOAK] = gMonFootprint_Drakloak, + [SPECIES_DRAGAPULT] = gMonFootprint_Dragapult, + [SPECIES_ZACIAN] = gMonFootprint_Zacian, + [SPECIES_ZAMAZENTA] = gMonFootprint_Zamazenta, + [SPECIES_ETERNATUS] = gMonFootprint_Eternatus, + [SPECIES_KUBFU] = gMonFootprint_Kubfu, + [SPECIES_URSHIFU] = gMonFootprint_Urshifu, + [SPECIES_ZARUDE] = gMonFootprint_Zarude, + [SPECIES_REGIELEKI] = gMonFootprint_Regieleki, + [SPECIES_REGIDRAGO] = gMonFootprint_Regidrago, + [SPECIES_GLASTRIER] = gMonFootprint_Glastrier, + [SPECIES_SPECTRIER] = gMonFootprint_Spectrier, + [SPECIES_CALYREX] = gMonFootprint_Calyrex, [SPECIES_EGG] = gMonFootprint_Bulbasaur, }; From d113d5efd94867c2aec1cdd5197cfa29ccbad230 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Mon, 13 Dec 2021 18:56:50 +0100 Subject: [PATCH 260/417] Update include/battle_bg.h Co-authored-by: LOuroboros --- include/battle_bg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/battle_bg.h b/include/battle_bg.h index cfa69a92ac..075159148d 100644 --- a/include/battle_bg.h +++ b/include/battle_bg.h @@ -1,7 +1,7 @@ #ifndef GUARD_BATTLE_BG_H #define GUARD_BATTLE_BG_H -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE struct BattleBackground { const void *tileset; From a334f7f5e07ccb785e32eaa7b722b709ca093f2a Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Mon, 13 Dec 2021 18:58:13 +0100 Subject: [PATCH 261/417] changed all missed ones to `#if P_ENABLE_DEBUG == TRUE` @LOuroboros --- src/battle_anim_mons.c | 4 ++-- src/battle_bg.c | 2 +- src/battle_gfx_sfx_util.c | 2 +- src/pokemon.c | 2 +- src/pokemon_debug.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 86479aac5a..adc664c3a3 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -35,7 +35,7 @@ static void CreateBattlerTrace(struct Task *task, u8 taskId); EWRAM_DATA static union AffineAnimCmd *sAnimTaskAffineAnim = NULL; -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = #else static const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = @@ -64,7 +64,7 @@ const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS] = [CASTFORM_ICE] = { .size = MON_COORDS_SIZE(64, 48), .y_offset = 8 }, }; -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE const u8 sCastformElevations[NUM_CASTFORM_FORMS] = #else static const u8 sCastformElevations[NUM_CASTFORM_FORMS] = diff --git a/src/battle_bg.c b/src/battle_bg.c index 298a3565a8..9d9b26627d 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -600,7 +600,7 @@ const struct WindowTemplate * const gBattleWindowTemplates[] = [B_WIN_TYPE_ARENA] = gBattleArenaWindowTemplates, }; -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE const struct BattleBackground sBattleTerrainTable[] = #else static const struct BattleBackground sBattleTerrainTable[] = diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 508e250c15..57e5d87630 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -77,7 +77,7 @@ static const struct CompressedSpriteSheet sSpriteSheets_HealthBar[MAX_BATTLERS_C {gBlankGfxCompressed, 0x0120, TAG_HEALTHBAR_OPPONENT2_TILE} }; -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] = #else static const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] = diff --git a/src/pokemon.c b/src/pokemon.c index 59b918f073..3e497cf351 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1856,7 +1856,7 @@ const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = #include "data/pokemon/form_change_table_pointers.h" // SPECIES_NONE are ignored in the following two tables, so decrement before accessing these arrays to get the right result -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = #else static const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index fd442386b4..9f0135be19 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -38,7 +38,7 @@ #include "constants/items.h" -#if P_ENABLE_DEBUG +#if P_ENABLE_DEBUG == TRUE extern const struct BattleBackground sBattleTerrainTable[]; extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow; extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow; From f1f4082f62c53196ac1cdb512fe1dafdbf8946a0 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Mon, 13 Dec 2021 19:24:19 +0100 Subject: [PATCH 262/417] added footprints --- include/constants/pokemon_debug.h | 3 ++- include/pokedex.h | 4 +++ src/pokemon_debug.c | 44 +++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/include/constants/pokemon_debug.h b/include/constants/pokemon_debug.h index e9e1a58a34..26d757fe39 100644 --- a/include/constants/pokemon_debug.h +++ b/include/constants/pokemon_debug.h @@ -28,7 +28,8 @@ #define WIN_INSTRUCTIONS 1 #define WIN_BOTTOM_LEFT 2 #define WIN_BOTTOM_RIGHT 3 -#define WIN_END 4 +#define WIN_FOOTPRINT 4 +#define WIN_END 5 //Battle backgrounds #define MAP_BATTLE_SCENE_NORMAL 0 diff --git a/include/pokedex.h b/include/pokedex.h index 49063f6b13..703b9ab8df 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -4,6 +4,10 @@ extern u8 gUnusedPokedexU8; extern void (*gPokedexVBlankCB)(void); +#if P_ENABLE_DEBUG == TRUE +extern const u8 *const gMonFootprintTable[]; +#endif + enum { DEX_MODE_HOENN, diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 9f0135be19..a2438453fa 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -21,6 +21,7 @@ #include "overworld.h" #include "palette.h" #include "palette_util.h" +#include "pokedex.h" #include "pokemon.h" #include "pokemon_animation.h" #include "pokemon_debug.h" @@ -136,6 +137,16 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = .paletteNum = 0xF, .baseBlock = 1 + 30 + 60 + 30 }, + [WIN_FOOTPRINT] = + { + .bg = 0, + .tilemapLeft = 27, + .tilemapTop = 14, + .width = 2, + .height = 2, + .paletteNum = 0xF, + .baseBlock = 1 + 30 + 60 + 30 + 150, + }, DUMMY_WIN_TEMPLATE, }; @@ -750,6 +761,31 @@ static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data, gSprites[data->frontShadowSpriteId].invisible = FALSE; } +//Tile functions (footprints) +static void DrawFootprintCustom(u8 windowId, u16 species) +{ + u8 footprint[32 * 4] = {0}; + const u8 * footprintGfx = gMonFootprintTable[species]; + u32 i, j, tileIdx = 0; + + if (footprintGfx != NULL) + { + for (i = 0; i < 32; i++) + { + u8 tile = footprintGfx[i]; + for (j = 0; j < 4; j++) + { + u8 value = ((tile >> (2 * j)) & 1 ? 2 : 0); + if (tile & (2 << (2 * j))) + value |= 0x20; + footprint[tileIdx] = value; + tileIdx++; + } + } + } + CopyToWindowPixelBuffer(windowId, footprint, sizeof(footprint), 0); +} + //Battle background functions static void LoadBattleBg(u8 battleBgType, u8 battleTerrain) { @@ -1050,6 +1086,10 @@ void CB2_Debug_Pokemon(void) //BattleNg Name PrintBattleBgName(taskId); + //Footprint + DrawFootprintCustom(WIN_FOOTPRINT, species); + CopyWindowToVram(WIN_FOOTPRINT, COPYWIN_GFX); + gMain.state++; break; case 4: @@ -1406,6 +1446,10 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) //Arrow invisibility SetArrowInvisibility(data); + + //Footprint + DrawFootprintCustom(WIN_FOOTPRINT, species); + CopyWindowToVram(WIN_FOOTPRINT, COPYWIN_GFX); } static void Exit_Debug_Pokemon(u8 taskId) From fe95e88938158cc579d3cba1c64adf9b8fcc09a6 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Mon, 13 Dec 2021 22:31:37 +0100 Subject: [PATCH 263/417] added option to view changes for front/back sprite picCoords and elevation live --- include/constants/pokemon_debug.h | 3 + include/pokemon_debug.h | 30 ++- src/pokemon_debug.c | 383 ++++++++++++++++++++++++------ 3 files changed, 345 insertions(+), 71 deletions(-) diff --git a/include/constants/pokemon_debug.h b/include/constants/pokemon_debug.h index 26d757fe39..c75392bf22 100644 --- a/include/constants/pokemon_debug.h +++ b/include/constants/pokemon_debug.h @@ -23,6 +23,9 @@ #define MON_PIC_BACK 0 #define MON_PIC_FRONT 1 +//Sprite offset +#define MAX_Y_OFFSET 20 + //Windows #define WIN_NAME_NUMBERS 0 #define WIN_INSTRUCTIONS 1 diff --git a/include/pokemon_debug.h b/include/pokemon_debug.h index 1b8db76c12..e69b4a7c6b 100644 --- a/include/pokemon_debug.h +++ b/include/pokemon_debug.h @@ -19,9 +19,28 @@ struct PokemonDebugModifyArrows struct PokemonDebugOptionArrows { - u8 arrowSpriteId[2]; + u8 arrowSpriteId[1]; u8 currentDigit; - void *modifiedValPtr; +}; + +struct PokemonDebugYPosModifiyArrows +{ + u8 arrowSpriteId[1]; + u8 currentDigit; +}; + +struct PokemonSpriteConstValues +{ + u8 backPicCoords; + u8 frontPicCoords; + u8 frontElevation; +}; + +struct PokemonSpriteOffsets +{ + s8 offset_back_picCoords; + s8 offset_front_picCoords; + s8 offset_front_elevation; }; struct PokemonDebugMenu @@ -37,12 +56,15 @@ struct PokemonDebugMenu bool8 isFemale; struct PokemonDebugModifyArrows modifyArrows; struct PokemonDebugOptionArrows optionArrows; + struct PokemonDebugYPosModifiyArrows yPosModifyArrows; + struct PokemonSpriteConstValues constSpriteValues; + struct PokemonSpriteOffsets offsetsSpriteValues; u8 animIdBack; u8 animIdFront; u8 battleBgType; u8 battleTerrain; - bool8 inSubmenu; - u8 submenuYpos; + u8 currentSubmenu; + u8 submenuYpos[3]; }; void CB2_Debug_Pokemon(void); diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index a2438453fa..5090a5db59 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -123,19 +123,19 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = .bg = 0, .tilemapLeft = 1, .tilemapTop = 14, - .width = 5, + .width = 6, .height = 6, .paletteNum = 0xF, .baseBlock = 1 + 30 + 60 }, [WIN_BOTTOM_RIGHT] = { .bg = 0, - .tilemapLeft = 6, + .tilemapLeft = 7, .tilemapTop = 14, - .width = 25, + .width = 24, .height = 6, .paletteNum = 0xF, - .baseBlock = 1 + 30 + 60 + 30 + .baseBlock = 1 + 30 + 60 + 36 }, [WIN_FOOTPRINT] = { @@ -145,7 +145,7 @@ static const struct WindowTemplate sPokemonDebugWindowTemplate[] = .width = 2, .height = 2, .paletteNum = 0xF, - .baseBlock = 1 + 30 + 60 + 30 + 150, + .baseBlock = 1 + 30 + 60 + 36 + 144, }, DUMMY_WIN_TEMPLATE, }; @@ -397,41 +397,55 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data) { u8 fontId = 0; u8 x = 2; - u8 textInstructions[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Exit {A_BUTTON} Submenu$"); - u8 textInstructionsGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Exit {A_BUTTON} Submenu$"); - u8 textInstructionsInSubmenu[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back$"); - u8 textInstructionsInSubmenuGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back$"); + u8 textInstructions[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Exit {A_BUTTON} Submenu 1$"); + u8 textInstructionsGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Exit {A_BUTTON} Submenu 1$"); + u8 textInstructionsSubmenuOne[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back {A_BUTTON} Submenu 2$"); + u8 textInstructionsSubmenuOneGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back {A_BUTTON} Submenu 2$"); + u8 textInstructionsSubmenuTwo[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back$"); + u8 textInstructionsSubmenuTwoGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back$"); + u8 textBottom[] = _("BACK:\nFRONT:\nBG:$"); u8 textBottomForms[] = _("BACK:\nFRONT:\nBG:\nFORMS:$"); + u8 textBottomSubmenuTwo[] = _("B coords:\nF coords:\nF elev:"); u16 species = data->modifyArrows.currValue; //Instruction window FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11); - if (data->inSubmenu) - { - if (SpeciesHasGenderDifference[species]) - AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsInSubmenuGender, x, 0, 0, NULL); - else - AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsInSubmenu, x, 0, 0, NULL); - } - else + if (data->currentSubmenu == 0) { if (SpeciesHasGenderDifference[species]) AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsGender, x, 0, 0, NULL); else AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructions, x, 0, 0, NULL); } + else if (data->currentSubmenu == 1) + { + if (SpeciesHasGenderDifference[species]) + AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOneGender, x, 0, 0, NULL); + else + AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOne, x, 0, 0, NULL); + } + else if (data->currentSubmenu == 2) + { + if (SpeciesHasGenderDifference[species]) + AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwoGender, x, 0, 0, NULL); + else + AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwo, x, 0, 0, NULL); + } CopyWindowToVram(WIN_INSTRUCTIONS, 3); //Bottom left text - if (gFormSpeciesIdTables[data->currentmonId] != NULL) - AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottomForms, 0, 0, 0, NULL); - else + FillWindowPixelBuffer(WIN_BOTTOM_LEFT, PIXEL_FILL(0)); + if (data->currentSubmenu != 2) { - FillWindowPixelBuffer(WIN_BOTTOM_LEFT, PIXEL_FILL(0)); - AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottom, 0, 0, 0, NULL); + if (gFormSpeciesIdTables[data->currentmonId] != NULL) + AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottomForms, 0, 0, 0, NULL); + else + AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottom, 0, 0, 0, NULL); } + else + AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottomSubmenuTwo, 0, 0, 0, NULL); } static void VBlankCB(void) @@ -525,10 +539,28 @@ static void ValueToCharDigits(u8 *charDigits, u32 newValue, u8 maxDigits) static void SetArrowInvisibility(struct PokemonDebugMenu *data) { - bool8 invisible = data->inSubmenu; - gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = invisible; - gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = invisible; - gSprites[data->optionArrows.arrowSpriteId[0]].invisible = !invisible; + bool8 invisible = data->currentSubmenu; + switch (data->currentSubmenu) + { + case 0: + gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = FALSE; + gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = FALSE; + gSprites[data->optionArrows.arrowSpriteId[0]].invisible = TRUE; + gSprites[data->yPosModifyArrows.arrowSpriteId[0]].invisible = TRUE; + break; + case 1: + gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = TRUE; + gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = TRUE; + gSprites[data->optionArrows.arrowSpriteId[0]].invisible = FALSE; + gSprites[data->yPosModifyArrows.arrowSpriteId[0]].invisible = TRUE; + break; + case 2: + gSprites[data->modifyArrows.arrowSpriteId[0]].invisible = TRUE; + gSprites[data->modifyArrows.arrowSpriteId[1]].invisible = TRUE; + gSprites[data->optionArrows.arrowSpriteId[0]].invisible = TRUE; + gSprites[data->yPosModifyArrows.arrowSpriteId[0]].invisible = FALSE; + break; + } } static void SetUpModifyArrows(struct PokemonDebugMenu *data) @@ -560,6 +592,17 @@ static void SetUpOptionArrows(struct PokemonDebugMenu *data) gSprites[data->optionArrows.arrowSpriteId[0]].invisible = TRUE; } +static void SetUpYPosModifyArrows(struct PokemonDebugMenu *data) +{ + LoadSpritePalette(&sSpritePalette_Arrow); + data->yPosModifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y, 0); + gSprites[data->yPosModifyArrows.arrowSpriteId[0]].animNum = 2; + + data->yPosModifyArrows.currentDigit = 0; + + gSprites[data->yPosModifyArrows.arrowSpriteId[0]].invisible = TRUE; +} + static bool32 TryMoveDigit(struct PokemonDebugModifyArrows *modArrows, bool32 moveUp) { s32 i; @@ -654,7 +697,7 @@ static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 spe } } -void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isShiny, u8 battlerId) +static void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bool8 isShiny, u8 battlerId) { u16 paletteOffset; const void *lzPaletteData; @@ -713,21 +756,39 @@ static u8 GetCastformYCustom(species) return ret; } -u8 GetBattlerSpriteFinal_YCustom(u16 species) +static u8 GetElevationValue(u16 species) +{ + u8 val; + if (species == SPECIES_CASTFORM) + val = sCastformElevations[0]; + else if (IsCastformForm(species)) + val = sCastformElevations[species - SPECIES_CASTFORM_SUNNY + 1]; + else + val = gEnemyMonElevation[species]; + + return val; +} + +static void SetConstSpriteValues(struct PokemonDebugMenu *data) +{ + u16 species = data->currentmonId; + data->constSpriteValues.frontPicCoords = gMonFrontPicCoords[species].y_offset; + data->constSpriteValues.frontElevation = GetElevationValue(species); + data->constSpriteValues.backPicCoords = gMonBackPicCoords[species].y_offset; +} + +static u8 GetBattlerSpriteFinal_YCustom(u16 species, s8 offset_picCoords, s8 offset_elevation) { u16 offset; u8 y; - offset = gMonFrontPicCoords[species].y_offset; - - if (species == SPECIES_CASTFORM) - offset -= sCastformElevations[0]; - else if (IsCastformForm(species)) - offset -= sCastformElevations[species - SPECIES_CASTFORM_SUNNY + 1]; - else - offset -= gEnemyMonElevation[species]; - + //FrontPicCoords + offset = gMonFrontPicCoords[species].y_offset + offset_picCoords; + + //Elevation + offset -= GetElevationValue(species) + offset_elevation; + //Main position y = offset + sBattlerCoords[0][1].y; if (y > DISPLAY_HEIGHT - MON_PIC_HEIGHT + 8) @@ -736,7 +797,7 @@ u8 GetBattlerSpriteFinal_YCustom(u16 species) return y; } -void SpriteCB_EnemyShadowCustom(struct Sprite *shadowSprite) +static void SpriteCB_EnemyShadowCustom(struct Sprite *shadowSprite) { bool8 invisible = FALSE; u8 frontSpriteId = shadowSprite->data[0]; @@ -746,12 +807,15 @@ void SpriteCB_EnemyShadowCustom(struct Sprite *shadowSprite) shadowSprite->x2 = battlerSprite->x2; shadowSprite->invisible = invisible; } -static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data, u8 x, u8 y, u16 species) +static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data, u16 species) { + u8 x, y; if (gEnemyMonElevation[species] == 0 && !IsCastformForm(species)) return; LoadCompressedSpriteSheet(&gSpriteSheet_EnemyShadow); LoadSpritePalette(&sSpritePalettes_HealthBoxHealthBar[0]); + x = sBattlerCoords[0][1].x; + y = sBattlerCoords[0][1].y; data->frontShadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, x, y + 29, 0xC8); gSprites[data->frontShadowSpriteId].data[0] = data->frontspriteId; @@ -955,6 +1019,57 @@ static void UpdateMonAnimNames(u8 taskId) PrintBattleBgName(taskId); } +static void UpdateYPosOffsetText(struct PokemonDebugMenu *data) +{ + u8 text[34]; + u8 fontId = 0; + u8 textConst[] = _("const val:"); + u8 textNew[] = _("new val:"); + u8 x_const_val = 50; + u8 x_new_text = 70; + u8 x_new_val = 110; + u8 y = 0; + + u8 backPicCoords = data->constSpriteValues.backPicCoords; + u8 frontPicCoords = data->constSpriteValues.frontPicCoords; + u8 frontElevation = data->constSpriteValues.frontElevation; + + s8 offset_back_picCoords = data->offsetsSpriteValues.offset_back_picCoords; + s8 offset_front_picCoords = data->offsetsSpriteValues.offset_front_picCoords; + s8 offset_front_elevation = data->offsetsSpriteValues.offset_front_elevation; + + u8 newBackPicCoords = backPicCoords + offset_back_picCoords; + u8 newFrontPicCoords = frontPicCoords + offset_front_picCoords; + u8 newFrontElevation = frontElevation + offset_front_elevation; + + FillWindowPixelBuffer(WIN_BOTTOM_RIGHT, PIXEL_FILL(0)); + + //Back + y = 0; + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textConst, 0, y, 0, NULL); + ConvertIntToDecimalStringN(text, backPicCoords , STR_CONV_MODE_LEFT_ALIGN, 2); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, x_const_val, y, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNew, x_new_text, y, 0, NULL); + ConvertIntToDecimalStringN(text, newBackPicCoords , STR_CONV_MODE_LEFT_ALIGN, 2); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, x_new_val, y, 0, NULL); + //Front picCoords + y = 12; + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textConst, 0, y, 0, NULL); + ConvertIntToDecimalStringN(text, frontPicCoords , STR_CONV_MODE_LEFT_ALIGN, 2); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, x_const_val, y, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNew, x_new_text, y, 0, NULL); + ConvertIntToDecimalStringN(text, newFrontPicCoords , STR_CONV_MODE_LEFT_ALIGN, 2); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, x_new_val, y, 0, NULL); + //Front elevation + y = 24; + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textConst, 0, y, 0, NULL); + ConvertIntToDecimalStringN(text, frontElevation , STR_CONV_MODE_LEFT_ALIGN, 2); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, x_const_val, y, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNew, x_new_text, y, 0, NULL); + ConvertIntToDecimalStringN(text, newFrontElevation , STR_CONV_MODE_LEFT_ALIGN, 2); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, x_new_val, y, 0, NULL); +} + static void ResetPokemonDebugWindows(void) { u8 i; @@ -1049,13 +1164,13 @@ void CB2_Debug_Pokemon(void) BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; - front_y = GetBattlerSpriteFinal_YCustom(species); + front_y = GetBattlerSpriteFinal_YCustom(species, 0, 0); data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, front_x, front_y, 0); gSprites[data->frontspriteId].oam.paletteNum = 1; gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; //Front Shadow - LoadAndCreateEnemyShadowSpriteCustom(data, front_x, front_y, species); + LoadAndCreateEnemyShadowSpriteCustom(data, species); //Back HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); @@ -1075,9 +1190,12 @@ void CB2_Debug_Pokemon(void) SetUpModifyArrows(data); PrintDigitChars(data); - //Option Arrows + //Option Arrow SetUpOptionArrows(data); + //Modify Y Pos Arrow + SetUpYPosModifyArrows(data); + //Anim names data->animIdBack = GetSpeciesBackAnimSet(species) + 1; data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; @@ -1148,10 +1266,10 @@ static void ResetBGs_Debug_Menu(u16 a) } } -static void UpdateSubmenuOptionValue(u8 taskId, bool8 increment) +static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment) { struct PokemonDebugMenu *data = GetStructPtr(taskId); - u8 option = data->submenuYpos; + u8 option = data->submenuYpos[1]; switch (option) { @@ -1223,6 +1341,80 @@ static void UpdateSubmenuOptionValue(u8 taskId, bool8 increment) } } +static void UpdateSubmenuTwoOptionValue(u8 taskId, bool8 increment) +{ + struct PokemonDebugMenu *data = GetStructPtr(taskId); + u16 species = data->currentmonId; + u8 option = data->submenuYpos[2]; + s8 offset; + u8 y; + + switch (option) + { + case 0: //Back picCoords + offset = data->offsetsSpriteValues.offset_back_picCoords; + if (increment) + { + if (offset == MAX_Y_OFFSET) + offset = -data->constSpriteValues.backPicCoords; + else + offset += 1; + } + else + { + if (offset == -data->constSpriteValues.backPicCoords) + offset = MAX_Y_OFFSET; + else + offset -= 1; + } + data->offsetsSpriteValues.offset_back_picCoords = offset; + gSprites[data->backspriteId].y = DEBUG_MON_BACK_Y + gMonBackPicCoords[species].y_offset + offset; + break; + case 1: //Front picCoords + offset = data->offsetsSpriteValues.offset_front_picCoords; + if (increment) + { + if (offset == MAX_Y_OFFSET) + offset = -data->constSpriteValues.frontPicCoords; + else + offset += 1; + } + else + { + if (offset == -data->constSpriteValues.frontPicCoords) + offset = MAX_Y_OFFSET; + else + offset -= 1; + } + data->offsetsSpriteValues.offset_front_picCoords = offset; + y = GetBattlerSpriteFinal_YCustom(species, offset, data->offsetsSpriteValues.offset_front_elevation); + gSprites[data->frontspriteId].y = y; + break; + case 2: //Front elevation + offset = data->offsetsSpriteValues.offset_front_elevation; + if (increment) + { + if (offset == MAX_Y_OFFSET) + offset = -data->constSpriteValues.frontElevation; + else + offset += 1; + } + else + { + if (offset == -data->constSpriteValues.frontElevation) + offset = MAX_Y_OFFSET; + else + offset -= 1; + } + data->offsetsSpriteValues.offset_front_elevation = offset; + y = GetBattlerSpriteFinal_YCustom(species, data->offsetsSpriteValues.offset_front_picCoords, offset); + gSprites[data->frontspriteId].y = y; + break; + } + + UpdateYPosOffsetText(data); +} + static void Handle_Input_Debug_Pokemon(u8 taskId) { @@ -1263,11 +1455,11 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) PlaySE(SE_DEX_SCROLL); } - if (!data->inSubmenu) + if (data->currentSubmenu == 0) { if (JOY_NEW(A_BUTTON)) { - data->inSubmenu = TRUE; + data->currentSubmenu = 1; SetArrowInvisibility(data); PrintInstructionsOnWindow(data); } @@ -1288,6 +1480,9 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; UpdateMonAnimNames(taskId); + data->offsetsSpriteValues.offset_back_picCoords = 0; + data->offsetsSpriteValues.offset_front_picCoords = 0; + data->offsetsSpriteValues.offset_front_elevation = 0; } PlaySE(SE_DEX_SCROLL); while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); @@ -1303,6 +1498,9 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; UpdateMonAnimNames(taskId); + data->offsetsSpriteValues.offset_back_picCoords = 0; + data->offsetsSpriteValues.offset_front_picCoords = 0; + data->offsetsSpriteValues.offset_front_elevation = 0; } PlaySE(SE_DEX_SCROLL); @@ -1327,15 +1525,23 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) } } - else //Submenu + else if (data->currentSubmenu == 1) //Submenu 1 { - if (JOY_NEW(B_BUTTON)) + if (JOY_NEW(A_BUTTON)) { - data->inSubmenu = FALSE; - if (data->submenuYpos == 3) + data->currentSubmenu = 2; + SetConstSpriteValues(data); + PrintInstructionsOnWindow(data); + SetArrowInvisibility(data); + UpdateYPosOffsetText(data); + } + else if (JOY_NEW(B_BUTTON)) + { + data->currentSubmenu = 0; + if (data->submenuYpos[1] == 3) { - data->submenuYpos = 2; - data->optionArrows.currentDigit = data->submenuYpos; + data->submenuYpos[1] = 2; + data->optionArrows.currentDigit = data->submenuYpos[1]; gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; } SetArrowInvisibility(data); @@ -1343,37 +1549,75 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) } else if (JOY_NEW(DPAD_DOWN)) { - data->submenuYpos += 1; - if (data->submenuYpos >= 3) + data->submenuYpos[1] += 1; + if (data->submenuYpos[1] >= 3) { - if ((gFormSpeciesIdTables[data->currentmonId] == NULL) || (data->submenuYpos >= 4)) - data->submenuYpos = 0; + if ((gFormSpeciesIdTables[data->currentmonId] == NULL) || (data->submenuYpos[1] >= 4)) + data->submenuYpos[1] = 0; } - data->optionArrows.currentDigit = data->submenuYpos; + data->optionArrows.currentDigit = data->submenuYpos[1]; gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; } else if (JOY_NEW(DPAD_UP)) { - if (data->submenuYpos == 0) + if (data->submenuYpos[1] == 0) { if (gFormSpeciesIdTables[data->currentmonId] != NULL) - data->submenuYpos = 3; + data->submenuYpos[1] = 3; else - data->submenuYpos = 2; + data->submenuYpos[1] = 2; } else - data->submenuYpos -= 1; + data->submenuYpos[1] -= 1; - data->optionArrows.currentDigit = data->submenuYpos; + data->optionArrows.currentDigit = data->submenuYpos[1]; gSprites[data->optionArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12; } else if (JOY_NEW(DPAD_LEFT)) { - UpdateSubmenuOptionValue(taskId, FALSE); + UpdateSubmenuOneOptionValue(taskId, FALSE); } else if (JOY_NEW(DPAD_RIGHT)) { - UpdateSubmenuOptionValue(taskId, TRUE); + UpdateSubmenuOneOptionValue(taskId, TRUE); + } + } + else if (data->currentSubmenu == 2) //Submenu 2 + { + if (JOY_NEW(B_BUTTON)) + { + data->currentSubmenu = 1; + + SetArrowInvisibility(data); + PrintInstructionsOnWindow(data); + UpdateMonAnimNames(taskId); + } + else if (JOY_NEW(DPAD_DOWN)) + { + data->submenuYpos[2] += 1; + if (data->submenuYpos[2] >= 3) + data->submenuYpos[2] = 0; + + data->yPosModifyArrows.currentDigit = data->submenuYpos[2]; + gSprites[data->yPosModifyArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->yPosModifyArrows.currentDigit * 12; + } + else if (JOY_NEW(DPAD_UP)) + { + if (data->submenuYpos[2] == 0) + data->submenuYpos[2] = 2; + else + data->submenuYpos[2] -= 1; + + data->yPosModifyArrows.currentDigit = data->submenuYpos[2]; + gSprites[data->yPosModifyArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->yPosModifyArrows.currentDigit * 12; + } + else if (JOY_NEW(DPAD_LEFT)) + { + UpdateSubmenuTwoOptionValue(taskId, FALSE); + } + else if (JOY_NEW(DPAD_RIGHT)) + { + UpdateSubmenuTwoOptionValue(taskId, TRUE); } } } @@ -1411,13 +1655,13 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 1); SetMultiuseSpriteTemplateToPokemon(species, 1); gMultiuseSpriteTemplate.paletteTag = palette->tag; - front_y = GetBattlerSpriteFinal_YCustom(species); + front_y = GetBattlerSpriteFinal_YCustom(species, 0, 0); data->frontspriteId = CreateSprite(&gMultiuseSpriteTemplate, front_x, front_y, 0); gSprites[data->frontspriteId].oam.paletteNum = 1; gSprites[data->frontspriteId].callback = SpriteCallbackDummy; gSprites[data->frontspriteId].oam.priority = 0; //Front Shadow - LoadAndCreateEnemyShadowSpriteCustom(data, front_x, front_y, species); + LoadAndCreateEnemyShadowSpriteCustom(data, species); //Back HandleLoadSpecialPokePicCustom(&gMonBackPicTable[species], gMonSpritesGfxPtr->sprites.ptr[2], species, 0, data->isFemale); @@ -1439,11 +1683,16 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) data->modifyArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW2_Y, 0); gSprites[data->modifyArrows.arrowSpriteId[1]].animNum = 1; - //Option Arrows + //Option Arrow LoadSpritePalette(&sSpritePalette_Arrow); data->optionArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12, 0); gSprites[data->optionArrows.arrowSpriteId[0]].animNum = 2; + //Y Pos Modify Arrow + LoadSpritePalette(&sSpritePalette_Arrow); + data->yPosModifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y + data->yPosModifyArrows.currentDigit * 12, 0); + gSprites[data->yPosModifyArrows.arrowSpriteId[0]].animNum = 2; + //Arrow invisibility SetArrowInvisibility(data); From e95020c59afaf55a62a81b7e3aaa2995bdfe981c Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 13 Dec 2021 22:01:31 -0300 Subject: [PATCH 264/417] Fixed form wrapping to the left. --- src/pokemon_debug.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 5090a5db59..01d9c1253f 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1325,7 +1325,15 @@ static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment) else { if (gFormSpeciesIdTables[data->currentmonId][formId] == gFormSpeciesIdTables[data->currentmonId][0]) - modArrows->currValue = gFormSpeciesIdTables[data->currentmonId][0]; + { + u8 lastForm; + for (lastForm = 0; gFormSpeciesIdTables[data->currentmonId][lastForm] != FORM_SPECIES_END; lastForm++) + { + if (gFormSpeciesIdTables[data->currentmonId][lastForm + 1] == FORM_SPECIES_END) + break; + } + modArrows->currValue = gFormSpeciesIdTables[data->currentmonId][lastForm]; + } else modArrows->currValue = GetFormSpeciesId(data->currentmonId, formId - 1); } From 5d7ac2171fde4b7e0dad398e09a817b8e9145349 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 13 Dec 2021 22:57:39 -0300 Subject: [PATCH 265/417] Animations reload when switching Forms --- src/pokemon_debug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 01d9c1253f..35db799a99 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -943,7 +943,7 @@ static void UpdateBattleBg(u8 taskId, bool8 increment) { struct PokemonDebugMenu *data = GetStructPtr(taskId); - if (data->battleBgType == 0) + if (data->battleBgType == MAP_BATTLE_SCENE_NORMAL) { if (increment) { @@ -1337,6 +1337,9 @@ static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment) else modArrows->currValue = GetFormSpeciesId(data->currentmonId, formId - 1); } + data->animIdBack = GetSpeciesBackAnimSet(modArrows->currValue) + 1; + data->animIdFront = sMonFrontAnimIdsTable[modArrows->currValue - 1]; + UpdateMonAnimNames(taskId); UpdateBattlerValue(data); ReloadPokemonSprites(data); From 037370fe19f5d84069ee47072ae898806a8f1d52 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 13 Dec 2021 23:33:25 -0300 Subject: [PATCH 266/417] Showing animation number --- src/pokemon_debug.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 35db799a99..00fbe1297c 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1004,17 +1004,22 @@ static void UpdateMonAnimNames(u8 taskId) u8 fontId = 0; u8 textL[] = _("{L_BUTTON}"); u8 textR[] = _("{R_BUTTON}"); + u8 textNum[4]; FillWindowPixelBuffer(WIN_BOTTOM_RIGHT, PIXEL_FILL(0)); //Back StringCopy(text, gBackAnimNames[backAnim]); AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textL, 0, 0, 0, NULL); - AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 20, 0, 0, NULL); + ConvertIntToDecimalStringN(textNum, backAnim, STR_CONV_MODE_LEADING_ZEROS, 3); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNum, 18, 0, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 36, 0, 0, NULL); //Front StringCopy(text, gFrontAnimNames[frontAnim]); AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textR, 0, 12, 0, NULL); - AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 20, 12, 0, NULL); + ConvertIntToDecimalStringN(textNum, frontAnim, STR_CONV_MODE_LEADING_ZEROS, 3); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNum, 18, 12, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 36, 12, 0, NULL); PrintBattleBgName(taskId); } From 7738d67314035ee724c2c010d858c7ff1f4c4f4e Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 13 Dec 2021 23:52:16 -0300 Subject: [PATCH 267/417] Slight documentation --- src/pokemon_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 00fbe1297c..3b843ccda2 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1726,7 +1726,7 @@ static void Exit_Debug_Pokemon(u8 taskId) FreeMonSpritesGfx(); DestroyTask(taskId); SetMainCallback2(CB2_ReturnToFieldWithOpenMenu); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } } From c4fea6a18957175f7328141a5336ee7b718b0eb1 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 14 Dec 2021 09:46:26 +0100 Subject: [PATCH 268/417] fixed Groudon terrain (dont forget your breaks...) --- src/pokemon_debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 3b843ccda2..c9df999e60 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -915,6 +915,7 @@ static void LoadBattleBg(u8 battleBgType, u8 battleTerrain) LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2))); LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(BG_SCREEN_ADDR(26))); LoadCompressedPalette(gBattleTerrainPalette_Groudon, 0x20, 0x60); + break; case MAP_BATTLE_SCENE_KYOGRE: LZDecompressVram(gBattleTerrainTiles_Water, (void*)(BG_CHAR_ADDR(2))); LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(BG_SCREEN_ADDR(26))); From 9ce83b559e06afbb2655bf842269629cbc742911 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 14 Dec 2021 10:01:04 +0100 Subject: [PATCH 269/417] if elevation is changed to != 0 the shadow is shown --- src/pokemon_debug.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index c9df999e60..029ee1447c 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -797,21 +797,29 @@ static u8 GetBattlerSpriteFinal_YCustom(u16 species, s8 offset_picCoords, s8 off return y; } +static void UpdateShadowSpriteInvisible(struct PokemonDebugMenu *data) +{ + if (data->constSpriteValues.frontElevation + data->offsetsSpriteValues.offset_front_elevation == 0) + gSprites[data->frontShadowSpriteId].invisible = TRUE; + else + gSprites[data->frontShadowSpriteId].invisible = FALSE; +} + static void SpriteCB_EnemyShadowCustom(struct Sprite *shadowSprite) { - bool8 invisible = FALSE; u8 frontSpriteId = shadowSprite->data[0]; struct Sprite *battlerSprite = &gSprites[frontSpriteId]; shadowSprite->x = battlerSprite->x; shadowSprite->x2 = battlerSprite->x2; - shadowSprite->invisible = invisible; } + static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data, u16 species) { u8 x, y; + bool8 invisible = FALSE; if (gEnemyMonElevation[species] == 0 && !IsCastformForm(species)) - return; + invisible = TRUE; LoadCompressedSpriteSheet(&gSpriteSheet_EnemyShadow); LoadSpritePalette(&sSpritePalettes_HealthBoxHealthBar[0]); x = sBattlerCoords[0][1].x; @@ -822,7 +830,7 @@ static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data, gSprites[data->frontShadowSpriteId].callback = SpriteCB_EnemyShadowCustom; gSprites[data->frontShadowSpriteId].oam.priority = 0; - gSprites[data->frontShadowSpriteId].invisible = FALSE; + gSprites[data->frontShadowSpriteId].invisible = invisible; } //Tile functions (footprints) @@ -1426,6 +1434,7 @@ static void UpdateSubmenuTwoOptionValue(u8 taskId, bool8 increment) data->offsetsSpriteValues.offset_front_elevation = offset; y = GetBattlerSpriteFinal_YCustom(species, data->offsetsSpriteValues.offset_front_picCoords, offset); gSprites[data->frontspriteId].y = y; + UpdateShadowSpriteInvisible(data); break; } @@ -1478,9 +1487,10 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) { data->currentSubmenu = 1; SetArrowInvisibility(data); + SetConstSpriteValues(data); PrintInstructionsOnWindow(data); } - else if (JOY_NEW(B_BUTTON)) + else if (JOY_HELD(B_BUTTON)) { BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); gTasks[taskId].func = Exit_Debug_Pokemon; @@ -1547,7 +1557,6 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) if (JOY_NEW(A_BUTTON)) { data->currentSubmenu = 2; - SetConstSpriteValues(data); PrintInstructionsOnWindow(data); SetArrowInvisibility(data); UpdateYPosOffsetText(data); From 7a669565ccfed309f515ee6253fe582d19ccb1f1 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 14 Dec 2021 10:04:57 +0100 Subject: [PATCH 270/417] fixed the back button, didnt work as intended --- src/pokemon_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 029ee1447c..8fdf7003e1 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -1490,7 +1490,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) SetConstSpriteValues(data); PrintInstructionsOnWindow(data); } - else if (JOY_HELD(B_BUTTON)) + else if (JOY_NEW(B_BUTTON)) { BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); gTasks[taskId].func = Exit_Debug_Pokemon; From cbd6553c43245929b5f21c21261d9f7e919ba70f Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 14 Dec 2021 10:15:13 +0100 Subject: [PATCH 271/417] changed L/R Button position to account for numbered animations --- src/pokemon_debug.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 8fdf7003e1..ef440611c7 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -410,6 +410,9 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data) u8 textBottomSubmenuTwo[] = _("B coords:\nF coords:\nF elev:"); u16 species = data->modifyArrows.currValue; + u8 textL[] = _("{L_BUTTON}"); + u8 textR[] = _("{R_BUTTON}"); + //Instruction window FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11); if (data->currentSubmenu == 0) @@ -439,6 +442,8 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data) FillWindowPixelBuffer(WIN_BOTTOM_LEFT, PIXEL_FILL(0)); if (data->currentSubmenu != 2) { + AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textL, 30, 0, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textR, 30, 12, 0, NULL); if (gFormSpeciesIdTables[data->currentmonId] != NULL) AddTextPrinterParameterized(WIN_BOTTOM_LEFT, fontId, textBottomForms, 0, 0, 0, NULL); else @@ -1011,24 +1016,20 @@ static void UpdateMonAnimNames(u8 taskId) u8 backAnim = data->animIdBack; u8 text[34]; u8 fontId = 0; - u8 textL[] = _("{L_BUTTON}"); - u8 textR[] = _("{R_BUTTON}"); u8 textNum[4]; FillWindowPixelBuffer(WIN_BOTTOM_RIGHT, PIXEL_FILL(0)); //Back StringCopy(text, gBackAnimNames[backAnim]); - AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textL, 0, 0, 0, NULL); ConvertIntToDecimalStringN(textNum, backAnim, STR_CONV_MODE_LEADING_ZEROS, 3); - AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNum, 18, 0, 0, NULL); - AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 36, 0, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNum, 0, 0, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 18, 0, 0, NULL); //Front StringCopy(text, gFrontAnimNames[frontAnim]); - AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textR, 0, 12, 0, NULL); ConvertIntToDecimalStringN(textNum, frontAnim, STR_CONV_MODE_LEADING_ZEROS, 3); - AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNum, 18, 12, 0, NULL); - AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 36, 12, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, textNum, 0, 12, 0, NULL); + AddTextPrinterParameterized(WIN_BOTTOM_RIGHT, fontId, text, 18, 12, 0, NULL); PrintBattleBgName(taskId); } From 660a3df929cd83365df8e0da7e79be61b52674f5 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 14 Dec 2021 14:47:04 -0300 Subject: [PATCH 272/417] Update trade.c --- src/trade.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trade.c b/src/trade.c index 3e9f033b52..935a89b02f 100644 --- a/src/trade.c +++ b/src/trade.c @@ -4531,7 +4531,8 @@ static void _CreateInGameTradePokemon(u8 whichPlayerMon, u8 whichInGameTrade) CalculateMonStats(&gEnemyParty[0]); } -static void SetInGameTradeMail(struct Mail *mail, const struct InGameTrade *trade) { +static void SetInGameTradeMail(struct Mail *mail, const struct InGameTrade *trade) +{ s32 i; for (i = 0; i < MAIL_WORDS_COUNT; i++) From bb9fb72436ad9615de806f9381d8ad65a42ea9ea Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Tue, 14 Dec 2021 13:56:25 -0500 Subject: [PATCH 273/417] fix evo_level_rain --- src/pokemon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index eb4ec02d52..0767af63f2 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6557,7 +6557,8 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u break; case EVO_LEVEL_RAIN: j = GetCurrentWeather(); - if (j == WEATHER_RAIN || j == WEATHER_RAIN_THUNDERSTORM || j == WEATHER_DOWNPOUR) + if (gEvolutionTable[species][i].param <= level + && (j == WEATHER_RAIN || j == WEATHER_RAIN_THUNDERSTORM || j == WEATHER_DOWNPOUR)) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_MAPSEC: From 961dbee5e3a9e29caac73b090123b7da649cefec Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 4 Dec 2021 10:25:37 -0500 Subject: [PATCH 274/417] Clean up tileset_anims --- src/tileset_anims.c | 234 ++++++++++++++++++++++---------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/src/tileset_anims.c b/src/tileset_anims.c index 71f8044f9f..3676006a6a 100644 --- a/src/tileset_anims.c +++ b/src/tileset_anims.c @@ -632,45 +632,45 @@ void InitTilesetAnim_Building(void) static void TilesetAnim_General(u16 timer) { if (timer % 16 == 0) - QueueAnimTiles_General_Flower(timer >> 4); + QueueAnimTiles_General_Flower(timer / 16); if (timer % 16 == 1) - QueueAnimTiles_General_Water(timer >> 4); + QueueAnimTiles_General_Water(timer / 16); if (timer % 16 == 2) - QueueAnimTiles_General_SandWaterEdge(timer >> 4); + QueueAnimTiles_General_SandWaterEdge(timer / 16); if (timer % 16 == 3) - QueueAnimTiles_General_Waterfall(timer >> 4); + QueueAnimTiles_General_Waterfall(timer / 16); if (timer % 16 == 4) - QueueAnimTiles_General_LandWaterEdge(timer >> 4); + QueueAnimTiles_General_LandWaterEdge(timer / 16); } static void TilesetAnim_Building(u16 timer) { if (timer % 8 == 0) - QueueAnimTiles_Building_TVTurnedOn(timer >> 3); + QueueAnimTiles_Building_TVTurnedOn(timer / 8); } static void QueueAnimTiles_General_Flower(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_General_Flower[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(508)), 0x80); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_General_Flower); + AppendTilesetAnimToBuffer(gTilesetAnims_General_Flower[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(508)), 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_General_Water(u16 timer) { - u8 i = timer % 8; - AppendTilesetAnimToBuffer(gTilesetAnims_General_Water[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(432)), 0x3C0); + u8 i = timer % ARRAY_COUNT(gTilesetAnims_General_Water); + AppendTilesetAnimToBuffer(gTilesetAnims_General_Water[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(432)), 30 * TILE_SIZE_4BPP); } static void QueueAnimTiles_General_SandWaterEdge(u16 timer) { - u16 i = timer % 8; - AppendTilesetAnimToBuffer(gTilesetAnims_General_SandWaterEdge[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(464)), 0x140); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_General_SandWaterEdge); + AppendTilesetAnimToBuffer(gTilesetAnims_General_SandWaterEdge[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(464)), 10 * TILE_SIZE_4BPP); } static void QueueAnimTiles_General_Waterfall(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_General_Waterfall[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(496)), 0xc0); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_General_Waterfall); + AppendTilesetAnimToBuffer(gTilesetAnims_General_Waterfall[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(496)), 6 * TILE_SIZE_4BPP); } void InitTilesetAnim_Petalburg(void) @@ -838,336 +838,336 @@ static void TilesetAnim_Rustboro(u16 timer) { if (timer % 8 == 0) { - QueueAnimTiles_Rustboro_WindyWater(timer >> 3, 0); - QueueAnimTiles_Rustboro_Fountain(timer >> 3); + QueueAnimTiles_Rustboro_WindyWater(timer / 8, 0); + QueueAnimTiles_Rustboro_Fountain(timer / 8); } if (timer % 8 == 1) - QueueAnimTiles_Rustboro_WindyWater(timer >> 3, 1); + QueueAnimTiles_Rustboro_WindyWater(timer / 8, 1); if (timer % 8 == 2) - QueueAnimTiles_Rustboro_WindyWater(timer >> 3, 2); + QueueAnimTiles_Rustboro_WindyWater(timer / 8, 2); if (timer % 8 == 3) - QueueAnimTiles_Rustboro_WindyWater(timer >> 3, 3); + QueueAnimTiles_Rustboro_WindyWater(timer / 8, 3); if (timer % 8 == 4) - QueueAnimTiles_Rustboro_WindyWater(timer >> 3, 4); + QueueAnimTiles_Rustboro_WindyWater(timer / 8, 4); if (timer % 8 == 5) - QueueAnimTiles_Rustboro_WindyWater(timer >> 3, 5); + QueueAnimTiles_Rustboro_WindyWater(timer / 8, 5); if (timer % 8 == 6) - QueueAnimTiles_Rustboro_WindyWater(timer >> 3, 6); + QueueAnimTiles_Rustboro_WindyWater(timer / 8, 6); if (timer % 8 == 7) - QueueAnimTiles_Rustboro_WindyWater(timer >> 3, 7); + QueueAnimTiles_Rustboro_WindyWater(timer / 8, 7); } static void TilesetAnim_Dewford(u16 timer) { if (timer % 8 == 0) - QueueAnimTiles_Dewford_Flag(timer >> 3); + QueueAnimTiles_Dewford_Flag(timer / 8); } static void TilesetAnim_Slateport(u16 timer) { if (timer % 16 == 0) - QueueAnimTiles_Slateport_Balloons(timer >> 4); + QueueAnimTiles_Slateport_Balloons(timer / 16); } static void TilesetAnim_Mauville(u16 timer) { if (timer % 8 == 0) - QueueAnimTiles_Mauville_Flowers(timer >> 3, 0); + QueueAnimTiles_Mauville_Flowers(timer / 8, 0); if (timer % 8 == 1) - QueueAnimTiles_Mauville_Flowers(timer >> 3, 1); + QueueAnimTiles_Mauville_Flowers(timer / 8, 1); if (timer % 8 == 2) - QueueAnimTiles_Mauville_Flowers(timer >> 3, 2); + QueueAnimTiles_Mauville_Flowers(timer / 8, 2); if (timer % 8 == 3) - QueueAnimTiles_Mauville_Flowers(timer >> 3, 3); + QueueAnimTiles_Mauville_Flowers(timer / 8, 3); if (timer % 8 == 4) - QueueAnimTiles_Mauville_Flowers(timer >> 3, 4); + QueueAnimTiles_Mauville_Flowers(timer / 8, 4); if (timer % 8 == 5) - QueueAnimTiles_Mauville_Flowers(timer >> 3, 5); + QueueAnimTiles_Mauville_Flowers(timer / 8, 5); if (timer % 8 == 6) - QueueAnimTiles_Mauville_Flowers(timer >> 3, 6); + QueueAnimTiles_Mauville_Flowers(timer / 8, 6); if (timer % 8 == 7) - QueueAnimTiles_Mauville_Flowers(timer >> 3, 7); + QueueAnimTiles_Mauville_Flowers(timer / 8, 7); } static void TilesetAnim_Lavaridge(u16 timer) { if (timer % 16 == 0) - QueueAnimTiles_Lavaridge_Steam(timer >> 4); + QueueAnimTiles_Lavaridge_Steam(timer / 16); if (timer % 16 == 1) - QueueAnimTiles_Lavaridge_Lava(timer >> 4); + QueueAnimTiles_Lavaridge_Lava(timer / 16); } static void TilesetAnim_EverGrande(u16 timer) { if (timer % 8 == 0) - QueueAnimTiles_EverGrande_Flowers(timer >> 3, 0); + QueueAnimTiles_EverGrande_Flowers(timer / 8, 0); if (timer % 8 == 1) - QueueAnimTiles_EverGrande_Flowers(timer >> 3, 1); + QueueAnimTiles_EverGrande_Flowers(timer / 8, 1); if (timer % 8 == 2) - QueueAnimTiles_EverGrande_Flowers(timer >> 3, 2); + QueueAnimTiles_EverGrande_Flowers(timer / 8, 2); if (timer % 8 == 3) - QueueAnimTiles_EverGrande_Flowers(timer >> 3, 3); + QueueAnimTiles_EverGrande_Flowers(timer / 8, 3); if (timer % 8 == 4) - QueueAnimTiles_EverGrande_Flowers(timer >> 3, 4); + QueueAnimTiles_EverGrande_Flowers(timer / 8, 4); if (timer % 8 == 5) - QueueAnimTiles_EverGrande_Flowers(timer >> 3, 5); + QueueAnimTiles_EverGrande_Flowers(timer / 8, 5); if (timer % 8 == 6) - QueueAnimTiles_EverGrande_Flowers(timer >> 3, 6); + QueueAnimTiles_EverGrande_Flowers(timer / 8, 6); if (timer % 8 == 7) - QueueAnimTiles_EverGrande_Flowers(timer >> 3, 7); + QueueAnimTiles_EverGrande_Flowers(timer / 8, 7); } static void TilesetAnim_Pacifidlog(u16 timer) { if (timer % 16 == 0) - QueueAnimTiles_Pacifidlog_LogBridges(timer >> 4); + QueueAnimTiles_Pacifidlog_LogBridges(timer / 16); if (timer % 16 == 1) - QueueAnimTiles_Pacifidlog_WaterCurrents(timer >> 4); + QueueAnimTiles_Pacifidlog_WaterCurrents(timer / 16); } static void TilesetAnim_Sootopolis(u16 timer) { if (timer % 16 == 0) - QueueAnimTiles_Sootopolis_StormyWater(timer >> 4); + QueueAnimTiles_Sootopolis_StormyWater(timer / 16); } static void TilesetAnim_Underwater(u16 timer) { if (timer % 16 == 0) - QueueAnimTiles_Underwater_Seaweed(timer >> 4); + QueueAnimTiles_Underwater_Seaweed(timer / 16); } static void TilesetAnim_Cave(u16 timer) { if (timer % 16 == 1) - QueueAnimTiles_Cave_Lava(timer >> 4); + QueueAnimTiles_Cave_Lava(timer / 16); } static void TilesetAnim_BattleFrontierOutsideWest(u16 timer) { if (timer % 8 == 0) - QueueAnimTiles_BattleFrontierOutsideWest_Flag(timer >> 3); + QueueAnimTiles_BattleFrontierOutsideWest_Flag(timer / 8); } static void TilesetAnim_BattleFrontierOutsideEast(u16 timer) { if (timer % 8 == 0) - QueueAnimTiles_BattleFrontierOutsideEast_Flag(timer >> 3); + QueueAnimTiles_BattleFrontierOutsideEast_Flag(timer / 8); } static void QueueAnimTiles_General_LandWaterEdge(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_General_LandWaterEdge[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(480)), 0x140); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_General_LandWaterEdge); + AppendTilesetAnimToBuffer(gTilesetAnims_General_LandWaterEdge[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(480)), 10 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Lavaridge_Steam(u8 timer) { - u8 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge_Steam[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 288)), 0x80); + u8 i = timer % ARRAY_COUNT(gTilesetAnims_Lavaridge_Steam); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge_Steam[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 288)), 4 * TILE_SIZE_4BPP); - i = (timer + 2) % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge_Steam[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 292)), 0x80); + i = (timer + 2) % (int)ARRAY_COUNT(gTilesetAnims_Lavaridge_Steam); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge_Steam[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 292)), 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Pacifidlog_LogBridges(u8 timer) { - u8 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog_LogBridges[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 464)), 0x3C0); + u8 i = timer % ARRAY_COUNT(gTilesetAnims_Pacifidlog_LogBridges); + AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog_LogBridges[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 464)), 30 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Underwater_Seaweed(u8 timer) { - u8 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Underwater_Seaweed[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 496)), 0x80); + u8 i = timer % ARRAY_COUNT(gTilesetAnims_Underwater_Seaweed); + AppendTilesetAnimToBuffer(gTilesetAnims_Underwater_Seaweed[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 496)), 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Pacifidlog_WaterCurrents(u8 timer) { - u8 i = timer % 8; - AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog_WaterCurrents[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 496)), 0x100); + u8 i = timer % ARRAY_COUNT(gTilesetAnims_Pacifidlog_WaterCurrents); + AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog_WaterCurrents[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 496)), 8 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Mauville_Flowers(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; - if (timer_div < 12) // almost certainly a typo + if (timer_div < min(ARRAY_COUNT(gTilesetAnims_Mauville_Flower1), ARRAY_COUNT(gTilesetAnims_Mauville_Flower2))) { - timer_div %= 12; - AppendTilesetAnimToBuffer(gTilesetAnims_Mauville_Flower1[timer_div], gTilesetAnims_Mauville_Flower1_VDests[timer_mod], 0x80); - AppendTilesetAnimToBuffer(gTilesetAnims_Mauville_Flower2[timer_div], gTilesetAnims_Mauville_Flower2_VDests[timer_mod], 0x80); + timer_div %= min(ARRAY_COUNT(gTilesetAnims_Mauville_Flower1), ARRAY_COUNT(gTilesetAnims_Mauville_Flower2)); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville_Flower1[timer_div], gTilesetAnims_Mauville_Flower1_VDests[timer_mod], 4 * TILE_SIZE_4BPP); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville_Flower2[timer_div], gTilesetAnims_Mauville_Flower2_VDests[timer_mod], 4 * TILE_SIZE_4BPP); } else { - timer_div %= 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Mauville_Flower1_B[timer_div], gTilesetAnims_Mauville_Flower1_VDests[timer_mod], 0x80); - AppendTilesetAnimToBuffer(gTilesetAnims_Mauville_Flower2_B[timer_div], gTilesetAnims_Mauville_Flower2_VDests[timer_mod], 0x80); + timer_div %= min(ARRAY_COUNT(gTilesetAnims_Mauville_Flower1_B), ARRAY_COUNT(gTilesetAnims_Mauville_Flower2_B)); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville_Flower1_B[timer_div], gTilesetAnims_Mauville_Flower1_VDests[timer_mod], 4 * TILE_SIZE_4BPP); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville_Flower2_B[timer_div], gTilesetAnims_Mauville_Flower2_VDests[timer_mod], 4 * TILE_SIZE_4BPP); } } static void QueueAnimTiles_Rustboro_WindyWater(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; - timer_div %= 8; + timer_div %= ARRAY_COUNT(gTilesetAnims_Rustboro_WindyWater); if (gTilesetAnims_Rustboro_WindyWater[timer_div]) - AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro_WindyWater[timer_div], gTilesetAnims_Rustboro_WindyWater_VDests[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro_WindyWater[timer_div], gTilesetAnims_Rustboro_WindyWater_VDests[timer_mod], 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Rustboro_Fountain(u16 timer) { - u16 i = timer % 2; - AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro_Fountain[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 448)), 0x80); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_Rustboro_Fountain); + AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro_Fountain[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 448)), 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Lavaridge_Lava(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge_Cave_Lava[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 160)), 0x80); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_Lavaridge_Cave_Lava); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge_Cave_Lava[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 160)), 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_EverGrande_Flowers(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; - timer_div %= 8; + timer_div %= ARRAY_COUNT(gTilesetAnims_EverGrande_Flowers); - AppendTilesetAnimToBuffer(gTilesetAnims_EverGrande_Flowers[timer_div], gTilesetAnims_EverGrande_VDests[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_EverGrande_Flowers[timer_div], gTilesetAnims_EverGrande_VDests[timer_mod], 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Cave_Lava(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge_Cave_Lava[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 416)), 0x80); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_Lavaridge_Cave_Lava); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge_Cave_Lava[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 416)), 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Dewford_Flag(u16 timer) { - u16 id = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Dewford_Flag[id], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 170)), 0xC0); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_Dewford_Flag); + AppendTilesetAnimToBuffer(gTilesetAnims_Dewford_Flag[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 170)), 6 * TILE_SIZE_4BPP); } static void QueueAnimTiles_BattleFrontierOutsideWest_Flag(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideWest_Flag[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 218)), 0xC0); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_BattleFrontierOutsideWest_Flag); + AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideWest_Flag[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 218)), 6 * TILE_SIZE_4BPP); } static void QueueAnimTiles_BattleFrontierOutsideEast_Flag(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideEast_Flag[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 218)), 0xC0); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_BattleFrontierOutsideEast_Flag); + AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideEast_Flag[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 218)), 6 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Slateport_Balloons(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_Slateport_Balloons[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 224)), 0x80); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_Slateport_Balloons); + AppendTilesetAnimToBuffer(gTilesetAnims_Slateport_Balloons[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 224)), 4 * TILE_SIZE_4BPP); } static void TilesetAnim_MauvilleGym(u16 timer) { if (timer % 2 == 0) - QueueAnimTiles_MauvilleGym_ElectricGates(timer >> 1); + QueueAnimTiles_MauvilleGym_ElectricGates(timer / 2); } static void TilesetAnim_SootopolisGym(u16 timer) { if (timer % 8 == 0) - QueueAnimTiles_SootopolisGym_Waterfalls(timer >> 3); + QueueAnimTiles_SootopolisGym_Waterfalls(timer / 8); } static void TilesetAnim_EliteFour(u16 timer) { if (timer % 64 == 1) - QueueAnimTiles_EliteFour_GroundLights(timer >> 6); + QueueAnimTiles_EliteFour_GroundLights(timer / 64); if (timer % 8 == 1) - QueueAnimTiles_EliteFour_WallLights(timer >> 3); + QueueAnimTiles_EliteFour_WallLights(timer / 8); } static void TilesetAnim_BikeShop(u16 timer) { if (timer % 4 == 0) - QueueAnimTiles_BikeShop_BlinkingLights(timer >> 2); + QueueAnimTiles_BikeShop_BlinkingLights(timer / 4); } static void TilesetAnim_BattlePyramid(u16 timer) { if (timer % 8 == 0) { - QueueAnimTiles_BattlePyramid_Torch(timer >> 3); - QueueAnimTiles_BattlePyramid_StatueShadow(timer >> 3); + QueueAnimTiles_BattlePyramid_Torch(timer / 8); + QueueAnimTiles_BattlePyramid_StatueShadow(timer / 8); } } static void TilesetAnim_BattleDome(u16 timer) { if (timer % 4 == 0) - BlendAnimPalette_BattleDome_FloorLights(timer >> 2); + BlendAnimPalette_BattleDome_FloorLights(timer / 4); } static void TilesetAnim_BattleDome2(u16 timer) { if (timer % 4 == 0) - BlendAnimPalette_BattleDome_FloorLightsNoBlend(timer >> 2); + BlendAnimPalette_BattleDome_FloorLightsNoBlend(timer / 4); } static void QueueAnimTiles_Building_TVTurnedOn(u16 timer) { - u16 i = timer % 2; - AppendTilesetAnimToBuffer(gTilesetAnims_Building_TvTurnedOn[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(496)), 0x80); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_Building_TvTurnedOn); + AppendTilesetAnimToBuffer(gTilesetAnims_Building_TvTurnedOn[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(496)), 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_SootopolisGym_Waterfalls(u16 timer) { - u16 i = timer % 3; - AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym_SideWaterfall[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 496)), 0x180); - AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym_FrontWaterfall[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 464)), 0x280); + u16 i = timer % min(ARRAY_COUNT(gTilesetAnims_SootopolisGym_SideWaterfall), ARRAY_COUNT(gTilesetAnims_SootopolisGym_FrontWaterfall)); + AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym_SideWaterfall[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 496)), 12 * TILE_SIZE_4BPP); + AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym_FrontWaterfall[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 464)), 20 * TILE_SIZE_4BPP); } static void QueueAnimTiles_EliteFour_WallLights(u16 timer) { - u16 i = timer % 4; - AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour_WallLights[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 504)), 0x20); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_EliteFour_WallLights); + AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour_WallLights[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 504)), 1 * TILE_SIZE_4BPP); } static void QueueAnimTiles_EliteFour_GroundLights(u16 timer) { - u16 i = timer % 2; - AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour_FloorLight[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 480)), 0x80); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_EliteFour_FloorLight); + AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour_FloorLight[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 480)), 4 * TILE_SIZE_4BPP); } static void QueueAnimTiles_MauvilleGym_ElectricGates(u16 timer) { - u16 i = timer % 2; - AppendTilesetAnimToBuffer(gTilesetAnims_MauvilleGym_ElectricGates[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 144)), 0x200); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_MauvilleGym_ElectricGates); + AppendTilesetAnimToBuffer(gTilesetAnims_MauvilleGym_ElectricGates[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 144)), 16 * TILE_SIZE_4BPP); } static void QueueAnimTiles_BikeShop_BlinkingLights(u16 timer) { - u16 i = timer % 2; - AppendTilesetAnimToBuffer(gTilesetAnims_BikeShop_BlinkingLights[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 496)), 0x120); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_BikeShop_BlinkingLights); + AppendTilesetAnimToBuffer(gTilesetAnims_BikeShop_BlinkingLights[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 496)), 9 * TILE_SIZE_4BPP); } static void QueueAnimTiles_Sootopolis_StormyWater(u16 timer) { - u16 i = timer % 8; - AppendTilesetAnimToBuffer(gTilesetAnims_Sootopolis_StormyWater[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 240)), 0xc00); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_Sootopolis_StormyWater); + AppendTilesetAnimToBuffer(gTilesetAnims_Sootopolis_StormyWater[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 240)), 96 * TILE_SIZE_4BPP); } static void QueueAnimTiles_BattlePyramid_Torch(u16 timer) { - u16 i = timer % 3; - AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid_Torch[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 151)), 0x100); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_BattlePyramid_Torch); + AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid_Torch[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 151)), 8 * TILE_SIZE_4BPP); } static void QueueAnimTiles_BattlePyramid_StatueShadow(u16 timer) { - u16 i = timer % 3; - AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid_StatueShadow[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 135)), 0x100); + u16 i = timer % ARRAY_COUNT(gTilesetAnims_BattlePyramid_StatueShadow); + AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid_StatueShadow[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(NUM_TILES_IN_PRIMARY + 135)), 8 * TILE_SIZE_4BPP); } static void BlendAnimPalette_BattleDome_FloorLights(u16 timer) { - CpuCopy16(gTilesetAnims_BattleDomeFloorLightPals[timer % 4], gPlttBufferUnfaded + 0x80, 32); + CpuCopy16(gTilesetAnims_BattleDomeFloorLightPals[timer % ARRAY_COUNT(gTilesetAnims_BattleDomeFloorLightPals)], &gPlttBufferUnfaded[0x80], 32); BlendPalette(0x80, 16, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); if ((u8)FindTaskIdByFunc(Task_BattleTransition_Intro) != TASK_NONE) { @@ -1178,7 +1178,7 @@ static void BlendAnimPalette_BattleDome_FloorLights(u16 timer) static void BlendAnimPalette_BattleDome_FloorLightsNoBlend(u16 timer) { - CpuCopy16(gTilesetAnims_BattleDomeFloorLightPals[timer % 4], gPlttBufferUnfaded + 0x80, 32); + CpuCopy16(gTilesetAnims_BattleDomeFloorLightPals[timer % ARRAY_COUNT(gTilesetAnims_BattleDomeFloorLightPals)], &gPlttBufferUnfaded[0x80], 32); if ((u8)FindTaskIdByFunc(Task_BattleTransition_Intro) == TASK_NONE) { BlendPalette(0x80, 16, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); From f0ffc749e9e7cca978105c3f554e22d7cfc7d537 Mon Sep 17 00:00:00 2001 From: ultima-soul <33333039+ultima-soul@users.noreply.github.com> Date: Thu, 16 Dec 2021 16:05:51 -0800 Subject: [PATCH 275/417] Fix formatting for EVO_LEVEL_RAIN checks. --- src/pokemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index 0767af63f2..0b1b97d151 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6558,7 +6558,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u case EVO_LEVEL_RAIN: j = GetCurrentWeather(); if (gEvolutionTable[species][i].param <= level - && (j == WEATHER_RAIN || j == WEATHER_RAIN_THUNDERSTORM || j == WEATHER_DOWNPOUR)) + && (j == WEATHER_RAIN || j == WEATHER_RAIN_THUNDERSTORM || j == WEATHER_DOWNPOUR)) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; case EVO_MAPSEC: From dbca24aa82bad91f48344d8e7d394e89febc1fd9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 17 Dec 2021 18:18:10 -0300 Subject: [PATCH 276/417] [LEAK INFORMED] Documented the unk19 item field --- include/item.h | 4 ++-- src/data/items.h | 48 ++++++++++++++++++++++++------------------------ src/item.c | 4 ++-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/include/item.h b/include/item.h index ceca83bd5f..c4a26655f0 100644 --- a/include/item.h +++ b/include/item.h @@ -14,7 +14,7 @@ struct Item u8 holdEffectParam; const u8 *description; u8 importance; - u8 unk19; + u8 registrability; u8 pocket; u8 type; ItemUseFunc fieldUseFunc; @@ -68,7 +68,7 @@ u8 ItemId_GetHoldEffect(u16 itemId); u8 ItemId_GetHoldEffectParam(u16 itemId); const u8 *ItemId_GetDescription(u16 itemId); u8 ItemId_GetImportance(u16 itemId); -u8 ItemId_GetUnknownValue(u16 itemId); +u8 ItemId_GetRegistrability(u16 itemId); u8 ItemId_GetPocket(u16 itemId); u8 ItemId_GetType(u16 itemId); ItemUseFunc ItemId_GetFieldFunc(u16 itemId); diff --git a/src/data/items.h b/src/data/items.h index 20ee057da8..47169d33a7 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -3146,7 +3146,7 @@ const struct Item gItems[] = .price = 0, .description = sMachBikeDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Bike, @@ -3172,7 +3172,7 @@ const struct Item gItems[] = .price = 0, .description = sItemfinderDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Itemfinder, @@ -3185,7 +3185,7 @@ const struct Item gItems[] = .price = 0, .description = sOldRodDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Rod, @@ -3199,7 +3199,7 @@ const struct Item gItems[] = .price = 0, .description = sGoodRodDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Rod, @@ -3213,7 +3213,7 @@ const struct Item gItems[] = .price = 0, .description = sSuperRodDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Rod, @@ -3310,7 +3310,7 @@ const struct Item gItems[] = .price = 0, .description = sAcroBikeDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Bike, @@ -3324,7 +3324,7 @@ const struct Item gItems[] = .price = 0, .description = sPokeblockCaseDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_PBLOCK_CASE, .fieldUseFunc = ItemUseOutOfBattle_PokeblockCase, @@ -4322,7 +4322,7 @@ const struct Item gItems[] = .price = 0, .description = sBicycleDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4335,7 +4335,7 @@ const struct Item gItems[] = .price = 0, .description = sTownMapDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4348,7 +4348,7 @@ const struct Item gItems[] = .price = 0, .description = sVSSeekerDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4361,7 +4361,7 @@ const struct Item gItems[] = .price = 0, .description = sFameCheckerDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4374,7 +4374,7 @@ const struct Item gItems[] = .price = 0, .description = sTMCaseDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4387,7 +4387,7 @@ const struct Item gItems[] = .price = 0, .description = sBerryPouchDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4400,7 +4400,7 @@ const struct Item gItems[] = .price = 0, .description = sTeachyTVDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4413,7 +4413,7 @@ const struct Item gItems[] = .price = 0, .description = sTriPassDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4426,7 +4426,7 @@ const struct Item gItems[] = .price = 0, .description = sRainbowPassDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4439,7 +4439,7 @@ const struct Item gItems[] = .price = 0, .description = sTeaDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4452,7 +4452,7 @@ const struct Item gItems[] = .price = 0, .description = sMysticTicketDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4465,7 +4465,7 @@ const struct Item gItems[] = .price = 0, .description = sAuroraTicketDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4478,7 +4478,7 @@ const struct Item gItems[] = .price = 0, .description = sPowderJarDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_PowderJar, @@ -4491,7 +4491,7 @@ const struct Item gItems[] = .price = 0, .description = sRubyDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4504,7 +4504,7 @@ const struct Item gItems[] = .price = 0, .description = sSapphireDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4519,7 +4519,7 @@ const struct Item gItems[] = .price = 0, .description = sMagmaEmblemDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4532,7 +4532,7 @@ const struct Item gItems[] = .price = 0, .description = sOldSeaMapDesc, .importance = 1, - .unk19 = 1, + .registrability = 1, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, diff --git a/src/item.c b/src/item.c index 1560342629..63287693a8 100644 --- a/src/item.c +++ b/src/item.c @@ -913,9 +913,9 @@ u8 ItemId_GetImportance(u16 itemId) } // unused -u8 ItemId_GetUnknownValue(u16 itemId) +u8 ItemId_GetRegistrability(u16 itemId) { - return gItems[SanitizeItemId(itemId)].unk19; + return gItems[SanitizeItemId(itemId)].registrability; } u8 ItemId_GetPocket(u16 itemId) From 4a74d288d4b5123e88f4da7d4d99aa42b3109d46 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 18 Dec 2021 00:01:50 -0300 Subject: [PATCH 277/417] Review corrections --- include/item.h | 2 +- src/data/items.h | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/include/item.h b/include/item.h index c4a26655f0..bcd9178e54 100644 --- a/include/item.h +++ b/include/item.h @@ -14,7 +14,7 @@ struct Item u8 holdEffectParam; const u8 *description; u8 importance; - u8 registrability; + bool8 registrability; // unused u8 pocket; u8 type; ItemUseFunc fieldUseFunc; diff --git a/src/data/items.h b/src/data/items.h index 47169d33a7..072ec1bf5e 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -3146,7 +3146,7 @@ const struct Item gItems[] = .price = 0, .description = sMachBikeDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Bike, @@ -3172,7 +3172,7 @@ const struct Item gItems[] = .price = 0, .description = sItemfinderDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Itemfinder, @@ -3185,7 +3185,7 @@ const struct Item gItems[] = .price = 0, .description = sOldRodDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Rod, @@ -3199,7 +3199,7 @@ const struct Item gItems[] = .price = 0, .description = sGoodRodDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Rod, @@ -3213,7 +3213,7 @@ const struct Item gItems[] = .price = 0, .description = sSuperRodDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Rod, @@ -3310,7 +3310,7 @@ const struct Item gItems[] = .price = 0, .description = sAcroBikeDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_Bike, @@ -3324,7 +3324,7 @@ const struct Item gItems[] = .price = 0, .description = sPokeblockCaseDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_PBLOCK_CASE, .fieldUseFunc = ItemUseOutOfBattle_PokeblockCase, @@ -4322,7 +4322,7 @@ const struct Item gItems[] = .price = 0, .description = sBicycleDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4335,7 +4335,7 @@ const struct Item gItems[] = .price = 0, .description = sTownMapDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4348,7 +4348,7 @@ const struct Item gItems[] = .price = 0, .description = sVSSeekerDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4361,7 +4361,7 @@ const struct Item gItems[] = .price = 0, .description = sFameCheckerDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4374,7 +4374,7 @@ const struct Item gItems[] = .price = 0, .description = sTMCaseDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4387,7 +4387,7 @@ const struct Item gItems[] = .price = 0, .description = sBerryPouchDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4400,7 +4400,7 @@ const struct Item gItems[] = .price = 0, .description = sTeachyTVDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_FIELD, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4413,7 +4413,7 @@ const struct Item gItems[] = .price = 0, .description = sTriPassDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4426,7 +4426,7 @@ const struct Item gItems[] = .price = 0, .description = sRainbowPassDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4439,7 +4439,7 @@ const struct Item gItems[] = .price = 0, .description = sTeaDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4452,7 +4452,7 @@ const struct Item gItems[] = .price = 0, .description = sMysticTicketDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4465,7 +4465,7 @@ const struct Item gItems[] = .price = 0, .description = sAuroraTicketDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4478,7 +4478,7 @@ const struct Item gItems[] = .price = 0, .description = sPowderJarDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_PowderJar, @@ -4491,7 +4491,7 @@ const struct Item gItems[] = .price = 0, .description = sRubyDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4504,7 +4504,7 @@ const struct Item gItems[] = .price = 0, .description = sSapphireDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4519,7 +4519,7 @@ const struct Item gItems[] = .price = 0, .description = sMagmaEmblemDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -4532,7 +4532,7 @@ const struct Item gItems[] = .price = 0, .description = sOldSeaMapDesc, .importance = 1, - .registrability = 1, + .registrability = TRUE, .pocket = POCKET_KEY_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, From 0f6311b47047a23012364d5d253edf886b1c80c6 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Fri, 17 Dec 2021 22:49:45 -0500 Subject: [PATCH 278/417] accept 16-bit aiff files and convert to 8-bit --- tools/aif2pcm/main.c | 70 ++++++++++++++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/tools/aif2pcm/main.c b/tools/aif2pcm/main.c index 3dad6fcf80..a9c150e433 100644 --- a/tools/aif2pcm/main.c +++ b/tools/aif2pcm/main.c @@ -51,8 +51,12 @@ do \ typedef struct { unsigned long num_samples; - uint8_t *samples; + union { + uint8_t *samples8; + uint16_t *samples16; + }; uint8_t midi_note; + uint8_t sample_size; bool has_loop; unsigned long loop_offset; double sample_rate; @@ -208,11 +212,11 @@ void read_aif(struct Bytes *aif, AifData *aif_data) num_sample_frames |= (aif->data[pos++] << 8); num_sample_frames |= (uint8_t)aif->data[pos++]; - short sample_size = (aif->data[pos++] << 8); - sample_size |= (uint8_t)aif->data[pos++]; - if (sample_size != 8) + aif_data->sample_size = (aif->data[pos++] << 8); + aif_data->sample_size |= (uint8_t)aif->data[pos++]; + if (aif_data->sample_size != 8 && aif_data->sample_size != 16) { - FATAL_ERROR("sampleSize (%d) in the COMM Chunk must be 8!\n", sample_size); + FATAL_ERROR("sampleSize (%d) in the COMM Chunk must be 8 or 16!\n", aif_data->sample_size); } double sample_rate = ieee754_read_extended((uint8_t*)(aif->data + pos)); @@ -295,11 +299,28 @@ void read_aif(struct Bytes *aif, AifData *aif_data) pos += 8; unsigned long num_samples = chunk_size - 8; - uint8_t *sample_data = (uint8_t *)malloc(num_samples * sizeof(uint8_t)); - memcpy(sample_data, &aif->data[pos], num_samples); - - aif_data->samples = sample_data; - aif_data->real_num_samples = num_samples; + if (aif_data->sample_size == 8) + { + uint8_t *sample_data = (uint8_t *)malloc(num_samples * sizeof(uint8_t)); + memcpy(sample_data, &aif->data[pos], num_samples); + + aif_data->samples8 = sample_data; + aif_data->real_num_samples = num_samples; + } + else + { + uint16_t *sample_data = (uint16_t *)malloc(num_samples * sizeof(uint16_t)); + uint16_t *sample_data_swapped = (uint16_t *)malloc(num_samples * sizeof(uint16_t)); + memcpy(sample_data, &aif->data[pos], num_samples); + for (long unsigned i = 0; i < num_samples; i++) + { + sample_data_swapped[i] = __builtin_bswap16(sample_data[i]); + } + + aif_data->samples16 = sample_data_swapped; + aif_data->real_num_samples = num_samples; + free(sample_data); + } pos += chunk_size - 8; } else @@ -550,8 +571,21 @@ do { \ void aif2pcm(const char *aif_filename, const char *pcm_filename, bool compress) { struct Bytes *aif = read_bytearray(aif_filename); - AifData aif_data = {0,0,0,0,0,0,0}; + AifData aif_data = {0}; read_aif(aif, &aif_data); + + // Convert 16-bit to 8-bit if necessary + if (aif_data.sample_size == 16) + { + aif_data.real_num_samples /= 2; + uint8_t *converted_samples = malloc(aif_data.real_num_samples * sizeof(uint8_t)); + for (unsigned long i = 0; i < aif_data.real_num_samples; i++) + { + converted_samples[i] = aif_data.samples16[i] >> 8; + } + free(aif_data.samples16); + aif_data.samples8 = converted_samples; + } int header_size = 0x10; struct Bytes *pcm; @@ -560,7 +594,7 @@ void aif2pcm(const char *aif_filename, const char *pcm_filename, bool compress) if (compress) { struct Bytes *input = malloc(sizeof(struct Bytes)); - input->data = aif_data.samples; + input->data = aif_data.samples8; input->length = aif_data.real_num_samples; pcm = delta_compress(input); free(input); @@ -568,7 +602,7 @@ void aif2pcm(const char *aif_filename, const char *pcm_filename, bool compress) else { pcm = malloc(sizeof(struct Bytes)); - pcm->data = aif_data.samples; + pcm->data = aif_data.samples8; pcm->length = aif_data.real_num_samples; } output.length = header_size + pcm->length; @@ -591,7 +625,7 @@ void aif2pcm(const char *aif_filename, const char *pcm_filename, bool compress) free(aif); free(pcm); free(output.data); - free(aif_data.samples); + free(aif_data.samples8); } // Reads a .pcm file containing an array of 8-bit samples and produces an .aif file. @@ -631,8 +665,8 @@ void pcm2aif(const char *pcm_filename, const char *aif_filename, uint32_t base_n pcm->data += 0x10; } - aif_data->samples = malloc(pcm->length); - memcpy(aif_data->samples, pcm->data, pcm->length); + aif_data->samples8 = malloc(pcm->length); + memcpy(aif_data->samples8, pcm->data, pcm->length); struct Bytes *aif = malloc(sizeof(struct Bytes)); aif->length = 54 + 60 + pcm->length; @@ -819,14 +853,14 @@ void pcm2aif(const char *pcm_filename, const char *aif_filename, uint32_t base_n // Sound Data Chunk soundData for (unsigned int i = 0; i < aif_data->loop_offset; i++) { - aif->data[pos++] = aif_data->samples[i]; + aif->data[pos++] = aif_data->samples8[i]; } int j = 0; for (unsigned int i = aif_data->loop_offset; i < pcm->length; i++) { int pcm_index = aif_data->loop_offset + (j++ % (pcm->length - aif_data->loop_offset)); - aif->data[pos++] = aif_data->samples[pcm_index]; + aif->data[pos++] = aif_data->samples8[pcm_index]; } aif->length = pos; From efee1288a0bbacd195a3938ec9ae23766978e758 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Fri, 17 Dec 2021 22:56:20 -0500 Subject: [PATCH 279/417] fix indentation --- tools/aif2pcm/main.c | 114 +++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/tools/aif2pcm/main.c b/tools/aif2pcm/main.c index a9c150e433..f722e9303a 100644 --- a/tools/aif2pcm/main.c +++ b/tools/aif2pcm/main.c @@ -31,32 +31,32 @@ double ieee754_read_extended (uint8_t*); #ifdef _MSC_VER -#define FATAL_ERROR(format, ...) \ -do \ -{ \ +#define FATAL_ERROR(format, ...) \ +do \ +{ \ fprintf(stderr, format, __VA_ARGS__); \ - exit(1); \ + exit(1); \ } while (0) #else -#define FATAL_ERROR(format, ...) \ -do \ -{ \ +#define FATAL_ERROR(format, ...) \ +do \ +{ \ fprintf(stderr, format, ##__VA_ARGS__); \ - exit(1); \ + exit(1); \ } while (0) #endif // _MSC_VER typedef struct { unsigned long num_samples; - union { - uint8_t *samples8; - uint16_t *samples16; - }; + union { + uint8_t *samples8; + uint16_t *samples16; + }; uint8_t midi_note; - uint8_t sample_size; + uint8_t sample_size; bool has_loop; unsigned long loop_offset; double sample_rate; @@ -299,28 +299,28 @@ void read_aif(struct Bytes *aif, AifData *aif_data) pos += 8; unsigned long num_samples = chunk_size - 8; - if (aif_data->sample_size == 8) - { - uint8_t *sample_data = (uint8_t *)malloc(num_samples * sizeof(uint8_t)); - memcpy(sample_data, &aif->data[pos], num_samples); - - aif_data->samples8 = sample_data; - aif_data->real_num_samples = num_samples; - } - else - { - uint16_t *sample_data = (uint16_t *)malloc(num_samples * sizeof(uint16_t)); - uint16_t *sample_data_swapped = (uint16_t *)malloc(num_samples * sizeof(uint16_t)); - memcpy(sample_data, &aif->data[pos], num_samples); - for (long unsigned i = 0; i < num_samples; i++) - { - sample_data_swapped[i] = __builtin_bswap16(sample_data[i]); - } - - aif_data->samples16 = sample_data_swapped; - aif_data->real_num_samples = num_samples; - free(sample_data); - } + if (aif_data->sample_size == 8) + { + uint8_t *sample_data = (uint8_t *)malloc(num_samples * sizeof(uint8_t)); + memcpy(sample_data, &aif->data[pos], num_samples); + + aif_data->samples8 = sample_data; + aif_data->real_num_samples = num_samples; + } + else + { + uint16_t *sample_data = (uint16_t *)malloc(num_samples * sizeof(uint16_t)); + uint16_t *sample_data_swapped = (uint16_t *)malloc(num_samples * sizeof(uint16_t)); + memcpy(sample_data, &aif->data[pos], num_samples); + for (long unsigned i = 0; i < num_samples; i++) + { + sample_data_swapped[i] = __builtin_bswap16(sample_data[i]); + } + + aif_data->samples16 = sample_data_swapped; + aif_data->real_num_samples = num_samples; + free(sample_data); + } pos += chunk_size - 8; } else @@ -457,7 +457,7 @@ int get_delta_index(uint8_t sample, uint8_t prev_sample) int sample_signed = U8_TO_S8(sample); int prev_sample_signed = U8_TO_S8(prev_sample); - // if we're going up (or equal), only choose positive deltas + // if we're going up (or equal), only choose positive deltas if (prev_sample_signed <= sample_signed) { delta_table_start_index = POSITIVE_DELTAS_START; delta_table_end_index = POSITIVE_DELTAS_END; @@ -573,19 +573,19 @@ void aif2pcm(const char *aif_filename, const char *pcm_filename, bool compress) struct Bytes *aif = read_bytearray(aif_filename); AifData aif_data = {0}; read_aif(aif, &aif_data); - - // Convert 16-bit to 8-bit if necessary - if (aif_data.sample_size == 16) - { - aif_data.real_num_samples /= 2; - uint8_t *converted_samples = malloc(aif_data.real_num_samples * sizeof(uint8_t)); - for (unsigned long i = 0; i < aif_data.real_num_samples; i++) - { - converted_samples[i] = aif_data.samples16[i] >> 8; - } - free(aif_data.samples16); - aif_data.samples8 = converted_samples; - } + + // Convert 16-bit to 8-bit if necessary + if (aif_data.sample_size == 16) + { + aif_data.real_num_samples /= 2; + uint8_t *converted_samples = malloc(aif_data.real_num_samples * sizeof(uint8_t)); + for (unsigned long i = 0; i < aif_data.real_num_samples; i++) + { + converted_samples[i] = aif_data.samples16[i] >> 8; + } + free(aif_data.samples16); + aif_data.samples8 = converted_samples; + } int header_size = 0x10; struct Bytes *pcm; @@ -796,13 +796,13 @@ void pcm2aif(const char *pcm_filename, const char *aif_filename, uint32_t base_n aif->data[pos++] = 20; aif->data[pos++] = base_note; // baseNote - aif->data[pos++] = 0; // detune - aif->data[pos++] = 0; // lowNote - aif->data[pos++] = 127; // highNote - aif->data[pos++] = 1; // lowVelocity - aif->data[pos++] = 127; // highVelocity - aif->data[pos++] = 0; // gain (hi) - aif->data[pos++] = 0; // gain (lo) + aif->data[pos++] = 0; // detune + aif->data[pos++] = 0; // lowNote + aif->data[pos++] = 127; // highNote + aif->data[pos++] = 1; // lowVelocity + aif->data[pos++] = 127; // highVelocity + aif->data[pos++] = 0; // gain (hi) + aif->data[pos++] = 0; // gain (lo) // Instrument Chunk sustainLoop aif->data[pos++] = 0; @@ -881,7 +881,7 @@ void pcm2aif(const char *pcm_filename, const char *aif_filename, uint32_t base_n void usage(void) { fprintf(stderr, "Usage: aif2pcm bin_file [aif_file]\n"); - fprintf(stderr, " aif2pcm aif_file [bin_file] [--compress]\n"); + fprintf(stderr, " aif2pcm aif_file [bin_file] [--compress]\n"); } int main(int argc, char **argv) From f336acb3a9e0b70064f78215e897f476dee65830 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Fri, 17 Dec 2021 23:00:03 -0500 Subject: [PATCH 280/417] fix indentation again --- tools/aif2pcm/main.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/aif2pcm/main.c b/tools/aif2pcm/main.c index f722e9303a..e6d91ddfa8 100644 --- a/tools/aif2pcm/main.c +++ b/tools/aif2pcm/main.c @@ -31,20 +31,20 @@ double ieee754_read_extended (uint8_t*); #ifdef _MSC_VER -#define FATAL_ERROR(format, ...) \ -do \ -{ \ - fprintf(stderr, format, __VA_ARGS__); \ - exit(1); \ +#define FATAL_ERROR(format, ...) \ +do \ +{ \ + fprintf(stderr, format, __VA_ARGS__); \ + exit(1); \ } while (0) #else -#define FATAL_ERROR(format, ...) \ -do \ -{ \ - fprintf(stderr, format, ##__VA_ARGS__); \ - exit(1); \ +#define FATAL_ERROR(format, ...) \ +do \ +{ \ + fprintf(stderr, format, ##__VA_ARGS__); \ + exit(1); \ } while (0) #endif // _MSC_VER @@ -457,7 +457,7 @@ int get_delta_index(uint8_t sample, uint8_t prev_sample) int sample_signed = U8_TO_S8(sample); int prev_sample_signed = U8_TO_S8(prev_sample); - // if we're going up (or equal), only choose positive deltas + // if we're going up (or equal), only choose positive deltas if (prev_sample_signed <= sample_signed) { delta_table_start_index = POSITIVE_DELTAS_START; delta_table_end_index = POSITIVE_DELTAS_END; @@ -796,13 +796,13 @@ void pcm2aif(const char *pcm_filename, const char *aif_filename, uint32_t base_n aif->data[pos++] = 20; aif->data[pos++] = base_note; // baseNote - aif->data[pos++] = 0; // detune - aif->data[pos++] = 0; // lowNote - aif->data[pos++] = 127; // highNote - aif->data[pos++] = 1; // lowVelocity - aif->data[pos++] = 127; // highVelocity - aif->data[pos++] = 0; // gain (hi) - aif->data[pos++] = 0; // gain (lo) + aif->data[pos++] = 0; // detune + aif->data[pos++] = 0; // lowNote + aif->data[pos++] = 127; // highNote + aif->data[pos++] = 1; // lowVelocity + aif->data[pos++] = 127; // highVelocity + aif->data[pos++] = 0; // gain (hi) + aif->data[pos++] = 0; // gain (lo) // Instrument Chunk sustainLoop aif->data[pos++] = 0; @@ -881,7 +881,7 @@ void pcm2aif(const char *pcm_filename, const char *aif_filename, uint32_t base_n void usage(void) { fprintf(stderr, "Usage: aif2pcm bin_file [aif_file]\n"); - fprintf(stderr, " aif2pcm aif_file [bin_file] [--compress]\n"); + fprintf(stderr, " aif2pcm aif_file [bin_file] [--compress]\n"); } int main(int argc, char **argv) From 39f493287f61c70e5a21bbbe7a22da73680ea95d Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Fri, 17 Dec 2021 23:03:09 -0500 Subject: [PATCH 281/417] one more lel --- tools/aif2pcm/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/aif2pcm/main.c b/tools/aif2pcm/main.c index e6d91ddfa8..720db1acae 100644 --- a/tools/aif2pcm/main.c +++ b/tools/aif2pcm/main.c @@ -34,8 +34,8 @@ double ieee754_read_extended (uint8_t*); #define FATAL_ERROR(format, ...) \ do \ { \ - fprintf(stderr, format, __VA_ARGS__); \ - exit(1); \ + fprintf(stderr, format, __VA_ARGS__); \ + exit(1); \ } while (0) #else @@ -43,8 +43,8 @@ do \ #define FATAL_ERROR(format, ...) \ do \ { \ - fprintf(stderr, format, ##__VA_ARGS__); \ - exit(1); \ + fprintf(stderr, format, ##__VA_ARGS__); \ + exit(1); \ } while (0) #endif // _MSC_VER From 834ab37b2c57982641ddc3790efe6aeea6cd872b Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 13 Dec 2021 15:05:28 -0300 Subject: [PATCH 282/417] Added Gen. 7 footprint sprites --- graphics/pokemon/araquanid/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/bewear/footprint.png | Bin 0 -> 303 bytes graphics/pokemon/blacephalon/footprint.png | Bin 0 -> 301 bytes graphics/pokemon/bounsweet/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/brionne/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/bruxish/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/buzzwole/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/celesteela/footprint.png | Bin 0 -> 318 bytes graphics/pokemon/charjabug/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/comfey/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/cosmoem/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/cosmog/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/crabominable/footprint.png | Bin 0 -> 298 bytes graphics/pokemon/crabrawler/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/cutiefly/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/dartrix/footprint.png | Bin 0 -> 305 bytes graphics/pokemon/decidueye/footprint.png | Bin 0 -> 303 bytes graphics/pokemon/dewpider/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/dhelmise/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/drampa/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/fomantis/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/golisopod/footprint.png | Bin 0 -> 301 bytes graphics/pokemon/grubbin/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/gumshoos/footprint.png | Bin 0 -> 307 bytes graphics/pokemon/guzzlord/footprint.png | Bin 0 -> 301 bytes graphics/pokemon/hakamo_o/footprint.png | Bin 0 -> 303 bytes graphics/pokemon/incineroar/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/jangmo_o/footprint.png | Bin 0 -> 302 bytes graphics/pokemon/kartana/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/komala/footprint.png | Bin 0 -> 301 bytes graphics/pokemon/kommo_o/footprint.png | Bin 0 -> 303 bytes graphics/pokemon/litten/footprint.png | Bin 0 -> 302 bytes graphics/pokemon/lunala/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/lurantis/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/lycanroc/footprint.png | Bin 0 -> 314 bytes graphics/pokemon/magearna/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/mareanie/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/marshadow/footprint.png | Bin 0 -> 319 bytes graphics/pokemon/melmetal/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/meltan/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/mimikyu/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/minior/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/morelull/footprint.png | Bin 0 -> 301 bytes graphics/pokemon/mudbray/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/mudsdale/footprint.png | Bin 0 -> 307 bytes graphics/pokemon/naganadel/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/necrozma/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/nihilego/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/oranguru/footprint.png | Bin 0 -> 322 bytes graphics/pokemon/oricorio/footprint.png | Bin 0 -> 312 bytes graphics/pokemon/palossand/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/passimian/footprint.png | Bin 0 -> 319 bytes graphics/pokemon/pheromosa/footprint.png | Bin 0 -> 295 bytes graphics/pokemon/pikipek/footprint.png | Bin 0 -> 307 bytes graphics/pokemon/poipole/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/popplio/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/primarina/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/pyukumuku/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/ribombee/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/rockruff/footprint.png | Bin 0 -> 308 bytes graphics/pokemon/rowlet/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/salandit/footprint.png | Bin 0 -> 311 bytes graphics/pokemon/salazzle/footprint.png | Bin 0 -> 313 bytes graphics/pokemon/sandygast/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/shiinotic/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/silvally/footprint.png | Bin 0 -> 309 bytes graphics/pokemon/solgaleo/footprint.png | Bin 0 -> 320 bytes graphics/pokemon/stakataka/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/steenee/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/stufful/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/tapu_bulu/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/tapu_fini/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/tapu_koko/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/tapu_lele/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/togedemaru/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/torracat/footprint.png | Bin 0 -> 303 bytes graphics/pokemon/toucannon/footprint.png | Bin 0 -> 314 bytes graphics/pokemon/toxapex/footprint.png | Bin 0 -> 301 bytes graphics/pokemon/trumbeak/footprint.png | Bin 0 -> 307 bytes graphics/pokemon/tsareena/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/turtonator/footprint.png | Bin 0 -> 300 bytes graphics/pokemon/type_null/footprint.png | Bin 0 -> 309 bytes graphics/pokemon/vikavolt/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/wimpod/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/wishiwashi/footprint.png | Bin 0 -> 262 bytes graphics/pokemon/xurkitree/footprint.png | Bin 0 -> 312 bytes graphics/pokemon/yungoos/footprint.png | Bin 0 -> 300 bytes graphics/pokemon/zeraora/footprint.png | Bin 0 -> 302 bytes 88 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 graphics/pokemon/araquanid/footprint.png create mode 100644 graphics/pokemon/bewear/footprint.png create mode 100644 graphics/pokemon/blacephalon/footprint.png create mode 100644 graphics/pokemon/bounsweet/footprint.png create mode 100644 graphics/pokemon/brionne/footprint.png create mode 100644 graphics/pokemon/bruxish/footprint.png create mode 100644 graphics/pokemon/buzzwole/footprint.png create mode 100644 graphics/pokemon/celesteela/footprint.png create mode 100644 graphics/pokemon/charjabug/footprint.png create mode 100644 graphics/pokemon/comfey/footprint.png create mode 100644 graphics/pokemon/cosmoem/footprint.png create mode 100644 graphics/pokemon/cosmog/footprint.png create mode 100644 graphics/pokemon/crabominable/footprint.png create mode 100644 graphics/pokemon/crabrawler/footprint.png create mode 100644 graphics/pokemon/cutiefly/footprint.png create mode 100644 graphics/pokemon/dartrix/footprint.png create mode 100644 graphics/pokemon/decidueye/footprint.png create mode 100644 graphics/pokemon/dewpider/footprint.png create mode 100644 graphics/pokemon/dhelmise/footprint.png create mode 100644 graphics/pokemon/drampa/footprint.png create mode 100644 graphics/pokemon/fomantis/footprint.png create mode 100644 graphics/pokemon/golisopod/footprint.png create mode 100644 graphics/pokemon/grubbin/footprint.png create mode 100644 graphics/pokemon/gumshoos/footprint.png create mode 100644 graphics/pokemon/guzzlord/footprint.png create mode 100644 graphics/pokemon/hakamo_o/footprint.png create mode 100644 graphics/pokemon/incineroar/footprint.png create mode 100644 graphics/pokemon/jangmo_o/footprint.png create mode 100644 graphics/pokemon/kartana/footprint.png create mode 100644 graphics/pokemon/komala/footprint.png create mode 100644 graphics/pokemon/kommo_o/footprint.png create mode 100644 graphics/pokemon/litten/footprint.png create mode 100644 graphics/pokemon/lunala/footprint.png create mode 100644 graphics/pokemon/lurantis/footprint.png create mode 100644 graphics/pokemon/lycanroc/footprint.png create mode 100644 graphics/pokemon/magearna/footprint.png create mode 100644 graphics/pokemon/mareanie/footprint.png create mode 100644 graphics/pokemon/marshadow/footprint.png create mode 100644 graphics/pokemon/melmetal/footprint.png create mode 100644 graphics/pokemon/meltan/footprint.png create mode 100644 graphics/pokemon/mimikyu/footprint.png create mode 100644 graphics/pokemon/minior/footprint.png create mode 100644 graphics/pokemon/morelull/footprint.png create mode 100644 graphics/pokemon/mudbray/footprint.png create mode 100644 graphics/pokemon/mudsdale/footprint.png create mode 100644 graphics/pokemon/naganadel/footprint.png create mode 100644 graphics/pokemon/necrozma/footprint.png create mode 100644 graphics/pokemon/nihilego/footprint.png create mode 100644 graphics/pokemon/oranguru/footprint.png create mode 100644 graphics/pokemon/oricorio/footprint.png create mode 100644 graphics/pokemon/palossand/footprint.png create mode 100644 graphics/pokemon/passimian/footprint.png create mode 100644 graphics/pokemon/pheromosa/footprint.png create mode 100644 graphics/pokemon/pikipek/footprint.png create mode 100644 graphics/pokemon/poipole/footprint.png create mode 100644 graphics/pokemon/popplio/footprint.png create mode 100644 graphics/pokemon/primarina/footprint.png create mode 100644 graphics/pokemon/pyukumuku/footprint.png create mode 100644 graphics/pokemon/ribombee/footprint.png create mode 100644 graphics/pokemon/rockruff/footprint.png create mode 100644 graphics/pokemon/rowlet/footprint.png create mode 100644 graphics/pokemon/salandit/footprint.png create mode 100644 graphics/pokemon/salazzle/footprint.png create mode 100644 graphics/pokemon/sandygast/footprint.png create mode 100644 graphics/pokemon/shiinotic/footprint.png create mode 100644 graphics/pokemon/silvally/footprint.png create mode 100644 graphics/pokemon/solgaleo/footprint.png create mode 100644 graphics/pokemon/stakataka/footprint.png create mode 100644 graphics/pokemon/steenee/footprint.png create mode 100644 graphics/pokemon/stufful/footprint.png create mode 100644 graphics/pokemon/tapu_bulu/footprint.png create mode 100644 graphics/pokemon/tapu_fini/footprint.png create mode 100644 graphics/pokemon/tapu_koko/footprint.png create mode 100644 graphics/pokemon/tapu_lele/footprint.png create mode 100644 graphics/pokemon/togedemaru/footprint.png create mode 100644 graphics/pokemon/torracat/footprint.png create mode 100644 graphics/pokemon/toucannon/footprint.png create mode 100644 graphics/pokemon/toxapex/footprint.png create mode 100644 graphics/pokemon/trumbeak/footprint.png create mode 100644 graphics/pokemon/tsareena/footprint.png create mode 100644 graphics/pokemon/turtonator/footprint.png create mode 100644 graphics/pokemon/type_null/footprint.png create mode 100644 graphics/pokemon/vikavolt/footprint.png create mode 100644 graphics/pokemon/wimpod/footprint.png create mode 100644 graphics/pokemon/wishiwashi/footprint.png create mode 100644 graphics/pokemon/xurkitree/footprint.png create mode 100644 graphics/pokemon/yungoos/footprint.png create mode 100644 graphics/pokemon/zeraora/footprint.png diff --git a/graphics/pokemon/araquanid/footprint.png b/graphics/pokemon/araquanid/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..4740af4274ca2ec917164d814b2239de61e78aea GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zm0Xkxq!^40j0|-RjdTqyLW~To49%!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4;M|7>$;O751quON%Xk=g(?vI5pYrK4P_=4_YeY#(Vo9o1a#1RfVlXl=GSoFR z(lxXQF*LR^G_^7^(l#)#GBD8Ldh!rOLvDUbW?Cg~4YA=du|N$Bp00i_>zopr0BD6$ A8vp!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4dN=3lviDba4#fxSssu|9r-de^-tF zY-Cri)cD2j{w+Xr!L0xP8D-~+9=ovDKn$o>wZt`|BqgyV)hf9t6-Y4{85kMr8XD;u xT7(!HTN#>K8JTMv7+4t?)ES+2L(!0%pOTqYiCY7Ielf^%44$rjF6*2UngG}dP$2*S literal 0 HcmV?d00001 diff --git a/graphics/pokemon/bounsweet/footprint.png b/graphics/pokemon/bounsweet/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..0ad5a272edd7750eaf33483d0e892d034b2c7eae GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2UngH1ULrMSu literal 0 HcmV?d00001 diff --git a/graphics/pokemon/bruxish/footprint.png b/graphics/pokemon/bruxish/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..9f97b57e6e55f3f50f5615021cc3f87b9fcd75d8 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4V6Hn*h|kl-F@)oK@{j-X8%0z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2UngG%{Lp=Zh literal 0 HcmV?d00001 diff --git a/graphics/pokemon/buzzwole/footprint.png b/graphics/pokemon/buzzwole/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..1e3f7c6775fac43124309084aeb6da2aa855dcd0 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zm0Xkxq!^40j0|-RjdTqyLJWKey=1-so22WQ%mvv4FO#oC!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M?G@tq&U~ zw>@s9nO2Eg!{lEa QmOu>*p00i_>zopr02AU^WdHyG literal 0 HcmV?d00001 diff --git a/graphics/pokemon/charjabug/footprint.png b/graphics/pokemon/charjabug/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..8dea358a430d61992d4acacb471a7c8fa4d03a1c GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4 zRdP`(kYX@0Ff!CNG}1M+2r;y@GBLL@u+TOzure@cU9_wlMMG|WN@iLmZVg}l%b5c; OFnGH9xvX!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4 zRdP`(kYX@0Ff!CNG}1M+2r;y@GBLL@u+TOzure@cU9_wlMMG|WN@iLmZVg}l%b5c; OFnGH9xvX!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2UngA_xL*)Pf literal 0 HcmV?d00001 diff --git a/graphics/pokemon/crabominable/footprint.png b/graphics/pokemon/crabominable/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..d67ceceeeab5e5c26e0875aea0998d2e60373e1f GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4UO_QmvAUQh^kMk%5t+uAz~xp+$(H vv6Z2zm5GtIfq|8Q!K>7_X($?U^HVa@DsgL=Z4r74sDZ)L)z4*}Q$iB}CzwuI literal 0 HcmV?d00001 diff --git a/graphics/pokemon/crabrawler/footprint.png b/graphics/pokemon/crabrawler/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..665b3e97b7e47952d47c3c0ca5c97197a16a99b0 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)FaGBmX^ pG1E3Mure@^(>hs-q9HdwB{QuOw}$-k!jnJ^44$rjF6*2UngE}+N!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e44ES>qMMG|WN@iLmZVd-`U2=gM7(8A5T-G@yGywqo7fS;G literal 0 HcmV?d00001 diff --git a/graphics/pokemon/dartrix/footprint.png b/graphics/pokemon/dartrix/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..8a7eb236dcd7aa05557c3069acddbc32a66f488d GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4bu*}Vx;Tb#Tu=V-e?DVJ-G26k z{l^_&u-l9LotXY3o!|BU>w_=s88S5_l%hAzR0OJ5Epd$~Nl7e8wMs5Z1yT$~21bUu zhDN%E79oblR)(flrY713237_JuJShyp=ij>PsvQH#I3=^DWMLifx*+&&t;ucLK6U; Cg-{3p literal 0 HcmV?d00001 diff --git a/graphics/pokemon/decidueye/footprint.png b/graphics/pokemon/decidueye/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..8061657a7499dd427cf13e91fb11671422b28884 GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!C8<`)MX5lF!N|bKP}k5% z*U%!w(Adh*)XLOC+rYrez@TaWrfn!1a`RI%(<*Um`22_q6f_K;u6{1-oD!M<+X7HF literal 0 HcmV?d00001 diff --git a/graphics/pokemon/dewpider/footprint.png b/graphics/pokemon/dewpider/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..87f972b028215a1fbcb71ee7458c06b214a8a4d4 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)FaGBmR? qFx56Nure@k*q!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4{nV4G{SZEs!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4 zRdP`(kYX@0Ff!CNG}1M+2r;y@GBLL@u+TOzure@cU9_wlMMG|WN@iLmZVg}l%b5c; OFnGH9xvX!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)FaGBmR? qu+%m%ure@cm*+`E(U6;;l9^VCTf;Y}EjNK07(8A5T-G@yGywn}fJ<%w literal 0 HcmV?d00001 diff --git a/graphics/pokemon/golisopod/footprint.png b/graphics/pokemon/golisopod/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..7da39e2aa10ba2c3f38ab4f7e69371cc723906b8 GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qf|E@M) zkgpc_rO5B-?%Dr(hBz(Bgz(?)FK#IZ0z{pV7&`8(N yBE-nC}Q!>*kacj7`;Zh1v1B0ilpUXO@geCy(w^2m^ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/grubbin/footprint.png b/graphics/pokemon/grubbin/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..aeac35bc590620747b14310747b8fbd92d72ce43 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zm0Xkxq!^40j0|-RjdTqyLJWJ pEVK;_tPBj2eHqrEXvob^$xN%ntwBg&2PhC2JYD@<);T3K0RSRqNI3ui literal 0 HcmV?d00001 diff --git a/graphics/pokemon/gumshoos/footprint.png b/graphics/pokemon/gumshoos/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..abc07274b5ab32506be91c46eb49d16bd54d1f50 GIT binary patch literal 307 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qvuO#c9 z8`lJ-|2V+sWdFnQMZe8q`)an9S^pVawIw{xSe{x2)S+798c~vxSdwa$T$Bo=7>o>z z40R2SbPX*+42`V}&8&=#v<(cb3=FuZ$Jd}}$jwj5OsmALq3YE013(Q7p00i_>zopr E08q(Oj{pDw literal 0 HcmV?d00001 diff --git a/graphics/pokemon/guzzlord/footprint.png b/graphics/pokemon/guzzlord/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..9184adb9b9024331afd7e71e0b321b9b5c20940a GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4&edH00)|WTsW(*3j2__%cufgQu&X%Q~loCIJ6qOQrw- literal 0 HcmV?d00001 diff --git a/graphics/pokemon/hakamo_o/footprint.png b/graphics/pokemon/hakamo_o/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..137c8c5d7cb6d06be9dddb1c5b7f22093f21833b GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`q9uN+^@ zwmhs}+Q$Fp#S3=(!}66IHvMN1m@lgST52XUP_=4_YeY#(Vo9o1a#1RfVlXl=GSoFR z(lxXQF*LR^G_x`>)HX1%GB7aM!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4m*V*k$K@8WF}O|_+a4#`s0-3i;u=wsl30>zm0Xkxq!^40j0|-R zjdTqyLJW!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4STv3WCh{RcXMLAAs+q9i4;B-JXpC>2OC7#SED>KYp9 z8d`)H8e18fS(#X98yHv_7%Wxd)JD;eo1c=IR*74~mHLg-ff^V*UHx3vIVCg!0Ohk% A7ytkO literal 0 HcmV?d00001 diff --git a/graphics/pokemon/kartana/footprint.png b/graphics/pokemon/kartana/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..9910a09ec6b39523799697cc84e547415e5a4e60 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4{nV4G{SZEs!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e485nTHXOyC7$jwj5OsmALp_1vsNuUM>Pgg&ebxsLQ0107I A1ONa4 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/litten/footprint.png b/graphics/pokemon/litten/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..8c7c5b067192afdfe28f27859047e29f78bdfe4c GIT binary patch literal 302 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4ZDB%<4eJswJ)wB`Jv|saDBFsX&Us$iT=@*U(7U x&?3ap*vin{%D_O|zyL`8byey>(U6;;l9^VCTSJe;EEAvx22WQ%mvv4FO#qL*PM-h( literal 0 HcmV?d00001 diff --git a/graphics/pokemon/lunala/footprint.png b/graphics/pokemon/lunala/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..d9a4ff1d4d7e0eb73f54a544803f3a41ad4ea338 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4 zRdP`(kYX@0Ff!CNG}1M+2r;y@GBLL@u+TOzure@cU9_wlMMG|WN@iLmZVg}l%b5c; OFnGH9xvX!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4#v^!G=V|F)5S4_<9hOs|MMAn|E^B| zk<9Ppz}BY2aPX9Dq(?yZPM{jq64!{5l*E!$tK_0oAjM#0U}UIkXryas5n^a;WoT|? qV4`hcU}a#y$;CDsMMG|WN@iLmZVeUT`_zFN7(8A5T-G@yGywoQTu8J4 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/lycanroc/footprint.png b/graphics/pokemon/lycanroc/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..7e69bd83eb72e5c61c399633cab1f559f8f1f207 GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4%>Eal|aXtCR|M`q9uO#=) zG_DCs|8d~lhX%>ES(0*cX+JLT3H>>E{=<2>6+#TWjG_{s-t5T$YE&(8jVMV;EJ?LW zE=mPb3`Pb!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2Ung9`mL$Lq= literal 0 HcmV?d00001 diff --git a/graphics/pokemon/marshadow/footprint.png b/graphics/pokemon/marshadow/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..6d82d60bbec441a6c8850c8fcfe6ea161dc98b50 GIT binary patch literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4HHwsq%P!H#eYe)e_f;l9a@f zRIB8oR3OD*WME{dYiOivXc1y)Y-MO}WoW8xU|?lnkbIqYBZ`LH{FKbJO57TRy0-EH PH86O(`njxgN@xNA{|{6b literal 0 HcmV?d00001 diff --git a/graphics/pokemon/melmetal/footprint.png b/graphics/pokemon/melmetal/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..982753a19c5e6ea921672394bc43e40d3d182c9d GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4>Oh z*~b5dhh4&PMI$4tBa6I2v&f(S{0y}-_+DRBZdeJ@P~sX9tqjer3@x<{46F!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4P#CgxTK7TN{|Rt5&GiMdmIdh-} N22WQ%mvv4FO#rZ!Lj3>$ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/mimikyu/footprint.png b/graphics/pokemon/mimikyu/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..00eff81a99a2a9dab214c6cb62effbb5c4776c51 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4{nV4G{SZEs!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2Ung9)=L#zM* literal 0 HcmV?d00001 diff --git a/graphics/pokemon/morelull/footprint.png b/graphics/pokemon/morelull/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..a5658a3197a23c6c30f63b603f86fe9209d7dfa0 GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4)PtS1$@~r*W<8>VN;QGYE}tDJy5M`iEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+ y2r)FaGBmd`GSW6Mure^v_-}FtMMG|WN@iLmZVi!(dJ=#d7(8A5T-G@yGywn)drsy6 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/mudbray/footprint.png b/graphics/pokemon/mudbray/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..c334a7facdc56cf9630fa852bc90a34573cc2bab GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e45dl!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4aV5 z1k)>&c%0ZJE?#6#Ym@)WQ~!)Pl!@WIlF**1ovPeG9jYa+5hW>!C8<`)MX5lF!N|bK zP}k5%*U%!w(Adh*+{(yO+rYrez(DIq0?^?|8glbfGSez?YlvQYV-`>YgQu&X%Q~lo FCIDkTPkR6W literal 0 HcmV?d00001 diff --git a/graphics/pokemon/naganadel/footprint.png b/graphics/pokemon/naganadel/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..78250a3d527aa14f4189b70651c55ecdc1e92241 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2UngGezLoNUS literal 0 HcmV?d00001 diff --git a/graphics/pokemon/necrozma/footprint.png b/graphics/pokemon/necrozma/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..baad92198e3c5b753f1a309bb6416281c8d0797c GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4{nV4G{SZEs!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2UngA)1L)`!X literal 0 HcmV?d00001 diff --git a/graphics/pokemon/oranguru/footprint.png b/graphics/pokemon/oranguru/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..294a56389b239f4339971b098d4b92be55bbb00c GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Y3G(fe) zHKHUXu_VTLb_A literal 0 HcmV?d00001 diff --git a/graphics/pokemon/oricorio/footprint.png b/graphics/pokemon/oricorio/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..bb9cc0114ebf473cd05598b60d8f0ad3118fea73 GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Veu+OI#yLQW8s2t&)pU zffR$0fsvuEp^>hkMTnuXm7%$niHWv>ft7(luLDOSiiX_$l+3hB+#3GKZnz87z~JfX K=d#Wzp$Pyx!dE%~ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/palossand/footprint.png b/graphics/pokemon/palossand/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..f0c03ad35cb1606d2941452c1c18cc2e895237cb GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4{nV4G{SZEs!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e42OC7#SED>KYp98d`)H8e18f rTbUYa8yHv_7zkfdk3i9oo1c=IR*73fQvduXKn)C@u6{1-oD!M!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4QF6ljVMV;EJ?LWE=mPb3`Pb< zhPsAEx`q}ZhQ?Ng=2oUA+6D$z1_q9=IR2w($jwj5OsmAL!C?CaXP^cKPgg&ebxsLQ E0169IVE_OC literal 0 HcmV?d00001 diff --git a/graphics/pokemon/poipole/footprint.png b/graphics/pokemon/poipole/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..249c47e0882392fe031e3e74f77d6d8b9685b74c GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)FaGBmd` pwa_*&ure@c^GfPQ(U6;;l9^VCTf=wpTjoFw44$rjF6*2UngHXfO4|Sc literal 0 HcmV?d00001 diff --git a/graphics/pokemon/popplio/footprint.png b/graphics/pokemon/popplio/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..3f266693266ef8fa93210d9290d7b0da6662cf39 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4{nV4G{SZEs!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2UngG6WLl*!5 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/pyukumuku/footprint.png b/graphics/pokemon/pyukumuku/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..fa1ffd4ac6b4373790dbd5f4ce4951f852bf43e4 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4P#CgxTK7TN{|Rt5&GiMdmIdh-} N22WQ%mvv4FO#pt~LZbix literal 0 HcmV?d00001 diff --git a/graphics/pokemon/ribombee/footprint.png b/graphics/pokemon/ribombee/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..5f908e97456963ff8b49bb5321b9c60ed95695d8 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4(Mj$A literal 0 HcmV?d00001 diff --git a/graphics/pokemon/rockruff/footprint.png b/graphics/pokemon/rockruff/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..486ec06239326a38dc575275f0132cdb52ac8343 GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4jbl(Pag8WRNi0dVN-jzTQVd20 zMuxhEM!JR;A%@0Qh89)^=Gq1ZRt5$qU%GdrXvob^$xN%ntzpNO|K>mq44$rjF6*2U FngC~ZQ?md7 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/rowlet/footprint.png b/graphics/pokemon/rowlet/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..a67af910f46ce4ea48053d12e91ed0eb40621849 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4{mb%t3lviIba4#fxSssu|9r-#y8Y}6 z`;R-mV7KS^J2Cx7I=|EZ*9SS4@Gx}UlDzeM+CgrRh7#9^l9a@fRIB8oR3OD*WME{d zYiOivXc1y)Y-MO+WoV#nU|?lnaNtShY!nT-`6-!cmAEx*+<8zPsDZ)L)z4*}Q$iB} DiS|^H literal 0 HcmV?d00001 diff --git a/graphics/pokemon/salandit/footprint.png b/graphics/pokemon/salandit/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..3490ad768511c73e8b2f35f52b23402f18a96958 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4f7EWCT+x4)8eH|B(E5!g&fKgSw4q{|!$+kjqp{Tq8!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4 zRdP`(kYX@0Ff!CNG}1M+2r;y@GBLL@u+TOzure@cU9_wlMMG|WN@iLmZVg}l%b5c; OFnGH9xvX!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e49tqd)!j7+r+46F!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e48MwZt`| zBqgyV)hf9t6-Y4{85kMr8XD;uT7(!HTNzqd85?RF7+4t?sB9|*c^RQ0H$NpatrE9} U(AQ_*0W~mqy85}Sb4q9e07Q~n$^ZZW literal 0 HcmV?d00001 diff --git a/graphics/pokemon/stakataka/footprint.png b/graphics/pokemon/stakataka/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..70757fc3f098bd416494a21354c8a39265c1ce3c GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2UngHT=Ls!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)FaGPJNV qHqkaPure?x>x=q|q9HdwB{QuOw+8mhk34}I7(8A5T-G@yGywpqkxH@v literal 0 HcmV?d00001 diff --git a/graphics/pokemon/stufful/footprint.png b/graphics/pokemon/stufful/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..1e41dad790b974103afd88ea2e5b2a54f6ec1f3f GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4cq}xep%~3UH<{yEZ&BFlER!kPPQbyIKU&P~sX9tqd)!j4iYc46F!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4z zm0Xkxq!^40j0|-RjdTqyLJTdfOw6qeEVK;_tPBiV7cJ{X(U6;;l9^VCTf>+Ca^^q{ N44$rjF6*2UngG{*Lq-4q literal 0 HcmV?d00001 diff --git a/graphics/pokemon/tapu_fini/footprint.png b/graphics/pokemon/tapu_fini/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..5c9f78a241336ca38948fbee0dc84d222d4637bd GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4|>BlK2I0N5RU7~KmN~e6k%cb>nH!PxO>?epp0sXYeY#(Vo9o1 za#1RfVlXl=GSoFR(lxXQF|@QYF}E_X&^9ozGB9Xew5%INLvDUbW?Cg~4PXAtnFBR2 Nc)I$ztaD0e0sxu5M6Lh; literal 0 HcmV?d00001 diff --git a/graphics/pokemon/tapu_koko/footprint.png b/graphics/pokemon/tapu_koko/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..a3357255cf9b5f1b72fa7177335612f7993666d9 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4h5TB=uV+hCf{nV4G{SZEs!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4 zRdP`(kYX@0Ff!CNG}1M+2r;y@GBLL@u+TOzure@cU9_wlMMG|WN@iLmZVg}l%b5c; OFnGH9xvX!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/torracat/footprint.png b/graphics/pokemon/torracat/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..0849f9a91ee09c32244ac6f2987e2562e1c492e3 GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qvuO#b^ z8rOVE|8bz-!TyQki+)?5v-J#i=Hf+P7TN$!Vo)t{jVMV;EJ?LWE=mPb3`Pb9nO2Eg!>rCzopr093_O Aa{vGU literal 0 HcmV?d00001 diff --git a/graphics/pokemon/toucannon/footprint.png b/graphics/pokemon/toucannon/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..d85988dbc1ebc71c299569ee09825c4483c5f255 GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4rg_Ws+wt<0_fq~1q@!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4?)FK#IZ0z{pV7&`8(N yBE-!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4T=m`pbpg%*NBpo#FA921GbWnfV5Xvv16AvZrIGp!Q01~!?-T_8t!y85}Sb4q9e E0DpQ=r~m)} literal 0 HcmV?d00001 diff --git a/graphics/pokemon/tsareena/footprint.png b/graphics/pokemon/tsareena/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..4a261826275047595be586aa301a5e303bb3c55d GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)FaGPJZZ pFw!!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e45@$GB9X}Q3v@7p&>UvB{QuOw}y|5^Y;QZFnGH9xvX!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4t&i0#0t#t(x;Tb#Tu=V-fBwVo)otg` zJHB{asPXH-xev|qUH?uP|JlsG@c&l_7KY5-;z<#wgTe~ HDWM4fyxdkX literal 0 HcmV?d00001 diff --git a/graphics/pokemon/vikavolt/footprint.png b/graphics/pokemon/vikavolt/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..bc9bf4168499974cde96a68f7657583b82137d5f GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4|xWS0Q>yEh3LkmdKI;Vst03tO^3IG5A literal 0 HcmV?d00001 diff --git a/graphics/pokemon/wimpod/footprint.png b/graphics/pokemon/wimpod/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..9e61a65303906cad006ab3cd12aab977206b56dc GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zm0Xkxq!^40j0|-RjdTqyLJWDfYeAl3@O1TaS?83{1ORsFOD_Nb literal 0 HcmV?d00001 diff --git a/graphics/pokemon/wishiwashi/footprint.png b/graphics/pokemon/wishiwashi/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..2d3e0d13406da7ad893b19512f35c510c6e1e83d GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4{nV4G{SZEscSE=U literal 0 HcmV?d00001 diff --git a/graphics/pokemon/xurkitree/footprint.png b/graphics/pokemon/xurkitree/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..09228b878d65d8a0172786053bf7eb10a342d518 GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zm0Xkx zq!^40j0|-RjdTqyLJW!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4)dzMHm!4T^vI=t|$NaKcBJjmE^t` z#x)PpD-Q6v%HMFjBmb?yl)=MDymYB Date: Sat, 18 Dec 2021 18:24:49 -0300 Subject: [PATCH 283/417] Added Gen. 8 footprint sprites --- graphics/pokemon/alcremie/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/appletun/footprint.png | Bin 0 -> 302 bytes graphics/pokemon/applin/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/arctovish/footprint.png | Bin 0 -> 299 bytes graphics/pokemon/arctozolt/footprint.png | Bin 0 -> 299 bytes graphics/pokemon/arrokuda/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/barraskewda/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/blipbug/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/boltund/footprint.png | Bin 0 -> 315 bytes graphics/pokemon/calyrex/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/carkol/footprint.png | Bin 0 -> 299 bytes graphics/pokemon/centiskorch/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/chewtle/footprint.png | Bin 0 -> 297 bytes graphics/pokemon/cinderace/footprint.png | Bin 0 -> 309 bytes graphics/pokemon/clobbopus/footprint.png | Bin 0 -> 298 bytes graphics/pokemon/coalossal/footprint.png | Bin 0 -> 310 bytes graphics/pokemon/copperajah/footprint.png | Bin 0 -> 308 bytes graphics/pokemon/corviknight/footprint.png | Bin 0 -> 312 bytes graphics/pokemon/corvisquire/footprint.png | Bin 0 -> 305 bytes graphics/pokemon/cramorant/footprint.png | Bin 0 -> 307 bytes graphics/pokemon/cufant/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/cursola/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/dottler/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/dracovish/footprint.png | Bin 0 -> 304 bytes graphics/pokemon/dracozolt/footprint.png | Bin 0 -> 304 bytes graphics/pokemon/dragapult/footprint.png | Bin 0 -> 316 bytes graphics/pokemon/drakloak/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/drednaw/footprint.png | Bin 0 -> 308 bytes graphics/pokemon/dreepy/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/drizzile/footprint.png | Bin 0 -> 303 bytes graphics/pokemon/dubwool/footprint.png | Bin 0 -> 300 bytes graphics/pokemon/duraludon/footprint.png | Bin 0 -> 322 bytes graphics/pokemon/eiscue/footprint.png | Bin 0 -> 309 bytes graphics/pokemon/eldegoss/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/eternatus/footprint.png | Bin 0 -> 328 bytes graphics/pokemon/falinks/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/flapple/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/frosmoth/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/glastrier/footprint.png | Bin 0 -> 305 bytes graphics/pokemon/gossifleur/footprint.png | Bin 0 -> 295 bytes graphics/pokemon/grapploct/footprint.png | Bin 0 -> 313 bytes graphics/pokemon/greedent/footprint.png | Bin 0 -> 304 bytes graphics/pokemon/grimmsnarl/footprint.png | Bin 0 -> 304 bytes graphics/pokemon/grookey/footprint.png | Bin 0 -> 304 bytes graphics/pokemon/hatenna/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/hatterene/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/hattrem/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/impidimp/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/indeedee/footprint.png | Bin 0 -> 302 bytes graphics/pokemon/inteleon/footprint.png | Bin 0 -> 311 bytes graphics/pokemon/kubfu/footprint.png | Bin 0 -> 308 bytes graphics/pokemon/milcery/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/morgrem/footprint.png | Bin 0 -> 307 bytes graphics/pokemon/morpeko/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/mr_rime/footprint.png | Bin 0 -> 309 bytes graphics/pokemon/nickit/footprint.png | Bin 0 -> 301 bytes graphics/pokemon/obstagoon/footprint.png | Bin 0 -> 304 bytes graphics/pokemon/orbeetle/footprint.png | Bin 0 -> 296 bytes graphics/pokemon/perrserker/footprint.png | Bin 0 -> 314 bytes graphics/pokemon/pincurchin/footprint.png | Bin 0 -> 288 bytes graphics/pokemon/polteageist/footprint.png | Bin 0 -> 293 bytes graphics/pokemon/raboot/footprint.png | Bin 0 -> 308 bytes graphics/pokemon/regidrago/footprint.png | Bin 0 -> 299 bytes graphics/pokemon/regieleki/footprint.png | Bin 0 -> 288 bytes graphics/pokemon/rillaboom/footprint.png | Bin 0 -> 322 bytes graphics/pokemon/rolycoly/footprint.png | Bin 0 -> 294 bytes graphics/pokemon/rookidee/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/runerigus/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/sandaconda/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/scorbunny/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/silicobra/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/sinistea/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/sirfetchd/footprint.png | Bin 0 -> 311 bytes graphics/pokemon/sizzlipede/footprint.png | Bin 0 -> 288 bytes graphics/pokemon/skwovet/footprint.png | Bin 0 -> 295 bytes graphics/pokemon/snom/footprint.png | Bin 0 -> 283 bytes graphics/pokemon/sobble/footprint.png | Bin 0 -> 297 bytes graphics/pokemon/spectrier/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/stonjourner/footprint.png | Bin 0 -> 295 bytes graphics/pokemon/thievul/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/thwackey/footprint.png | Bin 0 -> 306 bytes graphics/pokemon/toxel/footprint.png | Bin 0 -> 307 bytes graphics/pokemon/toxtricity/footprint.png | Bin 0 -> 313 bytes graphics/pokemon/urshifu/footprint.png | Bin 0 -> 313 bytes graphics/pokemon/wooloo/footprint.png | Bin 0 -> 299 bytes graphics/pokemon/yamper/footprint.png | Bin 0 -> 308 bytes graphics/pokemon/zacian/footprint.png | Bin 0 -> 314 bytes graphics/pokemon/zamazenta/footprint.png | Bin 0 -> 311 bytes graphics/pokemon/zarude/footprint.png | Bin 0 -> 328 bytes 89 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 graphics/pokemon/alcremie/footprint.png create mode 100644 graphics/pokemon/appletun/footprint.png create mode 100644 graphics/pokemon/applin/footprint.png create mode 100644 graphics/pokemon/arctovish/footprint.png create mode 100644 graphics/pokemon/arctozolt/footprint.png create mode 100644 graphics/pokemon/arrokuda/footprint.png create mode 100644 graphics/pokemon/barraskewda/footprint.png create mode 100644 graphics/pokemon/blipbug/footprint.png create mode 100644 graphics/pokemon/boltund/footprint.png create mode 100644 graphics/pokemon/calyrex/footprint.png create mode 100644 graphics/pokemon/carkol/footprint.png create mode 100644 graphics/pokemon/centiskorch/footprint.png create mode 100644 graphics/pokemon/chewtle/footprint.png create mode 100644 graphics/pokemon/cinderace/footprint.png create mode 100644 graphics/pokemon/clobbopus/footprint.png create mode 100644 graphics/pokemon/coalossal/footprint.png create mode 100644 graphics/pokemon/copperajah/footprint.png create mode 100644 graphics/pokemon/corviknight/footprint.png create mode 100644 graphics/pokemon/corvisquire/footprint.png create mode 100644 graphics/pokemon/cramorant/footprint.png create mode 100644 graphics/pokemon/cufant/footprint.png create mode 100644 graphics/pokemon/cursola/footprint.png create mode 100644 graphics/pokemon/dottler/footprint.png create mode 100644 graphics/pokemon/dracovish/footprint.png create mode 100644 graphics/pokemon/dracozolt/footprint.png create mode 100644 graphics/pokemon/dragapult/footprint.png create mode 100644 graphics/pokemon/drakloak/footprint.png create mode 100644 graphics/pokemon/drednaw/footprint.png create mode 100644 graphics/pokemon/dreepy/footprint.png create mode 100644 graphics/pokemon/drizzile/footprint.png create mode 100644 graphics/pokemon/dubwool/footprint.png create mode 100644 graphics/pokemon/duraludon/footprint.png create mode 100644 graphics/pokemon/eiscue/footprint.png create mode 100644 graphics/pokemon/eldegoss/footprint.png create mode 100644 graphics/pokemon/eternatus/footprint.png create mode 100644 graphics/pokemon/falinks/footprint.png create mode 100644 graphics/pokemon/flapple/footprint.png create mode 100644 graphics/pokemon/frosmoth/footprint.png create mode 100644 graphics/pokemon/glastrier/footprint.png create mode 100644 graphics/pokemon/gossifleur/footprint.png create mode 100644 graphics/pokemon/grapploct/footprint.png create mode 100644 graphics/pokemon/greedent/footprint.png create mode 100644 graphics/pokemon/grimmsnarl/footprint.png create mode 100644 graphics/pokemon/grookey/footprint.png create mode 100644 graphics/pokemon/hatenna/footprint.png create mode 100644 graphics/pokemon/hatterene/footprint.png create mode 100644 graphics/pokemon/hattrem/footprint.png create mode 100644 graphics/pokemon/impidimp/footprint.png create mode 100644 graphics/pokemon/indeedee/footprint.png create mode 100644 graphics/pokemon/inteleon/footprint.png create mode 100644 graphics/pokemon/kubfu/footprint.png create mode 100644 graphics/pokemon/milcery/footprint.png create mode 100644 graphics/pokemon/morgrem/footprint.png create mode 100644 graphics/pokemon/morpeko/footprint.png create mode 100644 graphics/pokemon/mr_rime/footprint.png create mode 100644 graphics/pokemon/nickit/footprint.png create mode 100644 graphics/pokemon/obstagoon/footprint.png create mode 100644 graphics/pokemon/orbeetle/footprint.png create mode 100644 graphics/pokemon/perrserker/footprint.png create mode 100644 graphics/pokemon/pincurchin/footprint.png create mode 100644 graphics/pokemon/polteageist/footprint.png create mode 100644 graphics/pokemon/raboot/footprint.png create mode 100644 graphics/pokemon/regidrago/footprint.png create mode 100644 graphics/pokemon/regieleki/footprint.png create mode 100644 graphics/pokemon/rillaboom/footprint.png create mode 100644 graphics/pokemon/rolycoly/footprint.png create mode 100644 graphics/pokemon/rookidee/footprint.png create mode 100644 graphics/pokemon/runerigus/footprint.png create mode 100644 graphics/pokemon/sandaconda/footprint.png create mode 100644 graphics/pokemon/scorbunny/footprint.png create mode 100644 graphics/pokemon/silicobra/footprint.png create mode 100644 graphics/pokemon/sinistea/footprint.png create mode 100644 graphics/pokemon/sirfetchd/footprint.png create mode 100644 graphics/pokemon/sizzlipede/footprint.png create mode 100644 graphics/pokemon/skwovet/footprint.png create mode 100644 graphics/pokemon/snom/footprint.png create mode 100644 graphics/pokemon/sobble/footprint.png create mode 100644 graphics/pokemon/spectrier/footprint.png create mode 100644 graphics/pokemon/stonjourner/footprint.png create mode 100644 graphics/pokemon/thievul/footprint.png create mode 100644 graphics/pokemon/thwackey/footprint.png create mode 100644 graphics/pokemon/toxel/footprint.png create mode 100644 graphics/pokemon/toxtricity/footprint.png create mode 100644 graphics/pokemon/urshifu/footprint.png create mode 100644 graphics/pokemon/wooloo/footprint.png create mode 100644 graphics/pokemon/yamper/footprint.png create mode 100644 graphics/pokemon/zacian/footprint.png create mode 100644 graphics/pokemon/zamazenta/footprint.png create mode 100644 graphics/pokemon/zarude/footprint.png diff --git a/graphics/pokemon/alcremie/footprint.png b/graphics/pokemon/alcremie/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..aeea2e966e0fc7bef279826c43db57ba95a00009 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*W@Tyu(IEGmWiL!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4ZDB%<4eJswJ)wB`Jv|saDBFsX&Us$iT=@*U(7U z&?3ahz{@`6Pptp| literal 0 HcmV?d00001 diff --git a/graphics/pokemon/applin/footprint.png b/graphics/pokemon/applin/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..915b2fc2ae719819e91f66efe8c297c75bacbbf5 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z oZlh?(%}>cpt3=jdXl!L*Vr2r=u(jl&3Qz-sr>mdKI;Vst0Hi-hjsO4v literal 0 HcmV?d00001 diff --git a/graphics/pokemon/arctovish/footprint.png b/graphics/pokemon/arctovish/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..0ba63e72316e0912a6e22b55be5c0d1a3e7dc445 GIT binary patch literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`p^|85xn znb5w7|BnWT9$(1k|Mm>uCJBG@iLGw~s#Gm;jVMV;EJ?LWE=mPb3`Pb!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`p^|85xn znb5w7|BnWT9$(1k|Mm>uCJBG@iLGw~s#Gm;jVMV;EJ?LWE=mPb3`Pb!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*YGq&s(V(??!DpZb22WQ%mvv4FO#r4#N6`QP literal 0 HcmV?d00001 diff --git a/graphics/pokemon/barraskewda/footprint.png b/graphics/pokemon/barraskewda/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..795e7e445c6ca99f8a33a91b19737ea554afbff2 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*YGr5$(V)C<-eaH!22WQ%mvv4FO#r1iN5237 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/blipbug/footprint.png b/graphics/pokemon/blipbug/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..762f0b03a08388ab68509bcd3a509a6e7f89d7a0 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)9SGO@HW wG}1OOure^zopr0J;20t^fc4 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/boltund/footprint.png b/graphics/pokemon/boltund/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..91e1defe9a9df98b25d03254beeb87ed411daf09 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r4|E?O> zd`kau;QWV%xepVq4?lj)GylAC&71TeiswHZms`ZfQ21KX{`yv(R-jJR64!{5l*E!$ ztK_0oAjM#0U}UIkXryas5n^OuWnyV%XrygmU}a#y;ri@0iiX_$l+3hBWDSPKRt6?k YMg|ZKPg;I<0W~mqy85}Sb4q9e01aVW2><{9 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/calyrex/footprint.png b/graphics/pokemon/calyrex/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..9b96a7a1eb07e1fef6a4125cde4ea6dc1f9ef110 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)9SGO@HW zG}1OOure^!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`rPe^;je zNId_+ao$5ldk#j)6!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)9SGO@HW zG}1OOure^!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qf|E?PU z*~q?7{?iK%4US+o2B&cGwbFAXBY^5uOI#yLQW8s2t&)pUffR$0fsvuEp^>hkMTn7s zm5HU5p^>(Mft7&)hwHQ3C>nC}Q!>*kku?|^TN#*G8JIyd94$P37N~*2)78&qol`;+ E07Iut_5c6? literal 0 HcmV?d00001 diff --git a/graphics/pokemon/cinderace/footprint.png b/graphics/pokemon/cinderace/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..18c62da8bd8551fac780e3c93c84a44fba032513 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M?I5Z4dKT zw(!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e42OC7#SED>KYp98d`)H z8CaQES{WK?8yHv_7;v~gyN#kDH$NpatrA&-p|O>Lsg!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zm0Xkxq!^40 zj0|-RjdTqyLW~ToOf0PojkFC6tPBh|T%X-W(U6;;l9^VCtijOO%D}?Pz!IWClQnu3 PPy>UftDnm{r-UW|cd=4_ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/corviknight/footprint.png b/graphics/pokemon/corviknight/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..3042a0e458b76ba6f32591feb0666c9e020d1433 GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e47U~Gg4tT+?}PLo%I80vm+NXc_3uAB!&@1Vn11KFdZ0Gd64!{5l*E!$tK_0o zAjM#0U}UIkXryas5n^OuWnyV%XrygmU}a#y;ri@0iiX_$l+3hBWDSPKRtAPv1{M$v U#p%^ofEpM)UHx3vIVCg!0BzM*l>h($ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/corvisquire/footprint.png b/graphics/pokemon/corvisquire/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..328be429b3b15a60a282455bfbb6f00da37cdf5a GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e46pYeY#(Vo9o1a#1RfVlXl=GSoFR(lxXQF*2|+ zv9vNY(l#)#GBDt9eRdl~LvDUbW?Ch(218>j0}CqyQ;3FlOAYS!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4bP0l+XkK Dr!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4>!01}axAag8WRNi0dVN-jzTQVd20MuxhE zM!JR;Aw~vPCYDx)M%o4jRt5$fuFr0xXvob^$xN$6)?jFCWnf`t1l5qK&Y=s`z~JfX K=d#Wzp$P!V=uj>I literal 0 HcmV?d00001 diff --git a/graphics/pokemon/dracozolt/footprint.png b/graphics/pokemon/dracozolt/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..61e4db30136f8474f9ccb880f75f8a187bc980e6 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4>!01}axAag8WRNi0dVN-jzTQVd20MuxhE zM!JR;Aw~vPCYDx)M%o4jRt5$fuFr0xXvob^$xN$6)?jFCWnf`tXbjQdc%P*TsDZ)L L)z4*}Q$iB})!!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e47ix49ND-%mALnCbi11kdq4%cV5Q8eV{r(~v8B5N=-wlc7= YGO>VY;I@c+0@T3Z>FVdQ&MBb@08|oJb^rhX literal 0 HcmV?d00001 diff --git a/graphics/pokemon/drakloak/footprint.png b/graphics/pokemon/drakloak/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..a73855356a392e0a4a869c289314fa9bafa18b53 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4UftDnm{r-UW|f$vDv literal 0 HcmV?d00001 diff --git a/graphics/pokemon/drednaw/footprint.png b/graphics/pokemon/drednaw/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..f6da8b76b278eee70a504f40c019358729a3b90f GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4?)FK#IZ0 zz{pV7&`8(NBE-nR%EZ#j&`8_Bz{FVdQ&MBb@09GPZ-T(jq literal 0 HcmV?d00001 diff --git a/graphics/pokemon/dreepy/footprint.png b/graphics/pokemon/dreepy/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..ff7379baa94b6f2063466c12ed21c23e9b4ab062 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4h$Mq$fcSU0#}6BTs#Qx|BT7;dOH!?pi&B9UgOP!ep{}8k zuAxPUk%5(orIn$Pwt<0_fdPl>v)d>da`RI%(<+fQ7#aiBSs7bGG;E2L*$dRb;OXk; Jvd$@?2>@?=PTT+h literal 0 HcmV?d00001 diff --git a/graphics/pokemon/dubwool/footprint.png b/graphics/pokemon/dubwool/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..c302e113bccc882c36dc7a0b2b2fa96503ac9f39 GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e40w;*PQ$V`cOr~d!`092}4;u=wsl30>zm0Xkxq!^40j0|-RjdTqy zLW~ToOf0PojkFC6tPBh|T%X-W(U6;;l9^VCtijOO%D}|Rz!0K=;o4Vcpaup{S3j3^ HP6!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Ni1Q0`HW+|K%ChZW7QtpUc+`G(fe) zHKHUXu_V!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4W6wov^L5C06u7tGcoe;=?fwEyHVm4RWN@a0K;8udUuswJ)wB`Jv|saDBFsX&Us z$iT=@*U(7U&?3ahz{!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4^| zoQptXR7+eVN>UO_QmvAUQh^kMk%5t+uAz~xp+$(1ft87+m7$Tgfq|8Q0f+0e+b9}x l^HVa@Dv>o98e17yS{ax?G%Obg3;}9j@O1TaS?83{1OS&oTb2L- literal 0 HcmV?d00001 diff --git a/graphics/pokemon/falinks/footprint.png b/graphics/pokemon/falinks/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..b8befed87c19251414336fad82fc96ba12ef4be6 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4UftDnm{r-UW|9LGrY literal 0 HcmV?d00001 diff --git a/graphics/pokemon/flapple/footprint.png b/graphics/pokemon/flapple/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..c17ef139ae5ab49a7585fb35630628de03d64352 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4@(AMuz|Z literal 0 HcmV?d00001 diff --git a/graphics/pokemon/frosmoth/footprint.png b/graphics/pokemon/frosmoth/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..4b1ebb9b77d153c591d18a56b41e417f31830122 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Ohbrz_B!PC{xWt~$(699C%M;rhE literal 0 HcmV?d00001 diff --git a/graphics/pokemon/glastrier/footprint.png b/graphics/pokemon/glastrier/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..cf32331ce68dafbbce7075e0951f0034a050ce7d GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4hkMTn7sm5HU5p^>(Mft7&)hwHQ3C>nC}Q!>*kku?|^TN#;I8CpOzu-4xE1k}Lb M>FVdQ&MBb@06^4G3;+NC literal 0 HcmV?d00001 diff --git a/graphics/pokemon/gossifleur/footprint.png b/graphics/pokemon/gossifleur/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..0efe7646a4dd5649a0f2cb92589951a603fa9927 GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zopr07r>b;Q#;t literal 0 HcmV?d00001 diff --git a/graphics/pokemon/greedent/footprint.png b/graphics/pokemon/greedent/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..d2e45203a0676180a3a0315393e5bef94e482ce5 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zm0Xkxq!^40j0|-R zjdTqyLW~ToOf0PojkFC6tPBh|T%X-W(U6;;l9^VCtijM2sLsmN1foIsX$i=G44$rj JF6*2UngBbcQhopc literal 0 HcmV?d00001 diff --git a/graphics/pokemon/grimmsnarl/footprint.png b/graphics/pokemon/grimmsnarl/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..a3776b2382abff93d45b1a13817a967fb164f89a GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4>!01}axAag8WRNi0dVN-jzTQVd20MuxhE zM!JR;Aw~vPCYDx)M%o4jRt5$fuFr0xXvob^$xN$6)?jFCWngAyXb#b^I#S>kPy>Uf LtDnm{r-UW|+E!6n literal 0 HcmV?d00001 diff --git a/graphics/pokemon/grookey/footprint.png b/graphics/pokemon/grookey/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..836738bc0e490e8bea40d4953ba6210853fa407e GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4zm0Xkxq!^40j0|-R zjdTqyLW~ToOf0PojkFC6tPBh|T%X-W(U6;;l9^VCtijO8%GAut)EuIr`BL_Cpaup{ LS3j3^P6!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e49+L literal 0 HcmV?d00001 diff --git a/graphics/pokemon/impidimp/footprint.png b/graphics/pokemon/impidimp/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..8ff5f9113d8e0a9abc1a124af990d1b3eb063a88 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`rPe>bQ9 zP(J^Gxv$|)RSGLZU9gnh<3;wLfXY-$Tq8?Mn ziKUgHk+y+>m4N|=>$BS^8glbfGSe!NH5eLO8JJlaSVAbP0l+XkK D-NQ|n literal 0 HcmV?d00001 diff --git a/graphics/pokemon/indeedee/footprint.png b/graphics/pokemon/indeedee/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..d406d05d9215c4504ddffa01b6baf068efbccaba GIT binary patch literal 302 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`rPe^;mf zcyj(jgKU@Ghvp0Xl@lx?7#Y$<#D92)?+ybhRxNRjC`m~yNwrEYN(E93Mg~TPx`sx& zh87`42397PR)$8}1_o9J1{|)>Zlh?(%}>cpt3=jdXl!L*Ze?l)(U7*RZWT}igQu&X J%Q~loCICt3P~`vs literal 0 HcmV?d00001 diff --git a/graphics/pokemon/inteleon/footprint.png b/graphics/pokemon/inteleon/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..7ea7d445f806cdd9eabd3132910433586acaa66e GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M?H|?GDG+ zw#|Q~@TFO{=ayuhO!|*%xwd!B7woIs{{Lsx`Ye&f`u2!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qf|E?PU znUMbD!1)gw=Rf>dD8OXY5VJrbfNL2KLu#mG{zC!Qxj-$dC9V-ADTyViR>?)FK#IZ0 zz{pV7&`8(NBE-nR%EZ#j&`8_Bz{RR910 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/milcery/footprint.png b/graphics/pokemon/milcery/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..fd3ee498d692c4d035d7599ada1f80ffc22b6f63 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*W@Tys(eP@E!aAS^22WQ%mvv4FO#rkPN96zj literal 0 HcmV?d00001 diff --git a/graphics/pokemon/morgrem/footprint.png b/graphics/pokemon/morgrem/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..241717eade90943d840728630fb4fd72acb26e3d GIT binary patch literal 307 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`q9uO#=) zG_DCs|8aoN)&9rA7yUMe?W@^VZ2Hf@{auWgFRW@GP={)XYeY#(Vo9o1a#1RfVlXl= zGSoFR(lxXQF*2|+v9vNY(l#)#GBDt9eRdl~LvDUbW?Ch(218>j12Zc_V~B=$F_V)( O4Gf;HelF{r5}E)f{!&N) literal 0 HcmV?d00001 diff --git a/graphics/pokemon/morpeko/footprint.png b/graphics/pokemon/morpeko/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..398d437f0cd98b4cab2c171437afb84dcb3c03e8 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`rPe>bQ9 zP(J^Gxv$|)RSGLZU9gnh<3;wLfXY-$Tq8?Mn ziKUgHk+y+>m4N|=>$BS^8glbfGSe!NH5eLO8CX~u7(z5iy%IeO)WG2B>gTe~DWM4f D;h|0N literal 0 HcmV?d00001 diff --git a/graphics/pokemon/mr_rime/footprint.png b/graphics/pokemon/mr_rime/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..5b8cc5c93943bd8dc7f525605f822208f6400e46 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M?I5Z4dKT z3j8|2?<$}t@V6`d$8PzShOB>AjsN`TXLxp7)X*|_>3N_Y)e_f;l9a@fRIB8oR3OD* zWME{dYiOivXc1y$U}a)yWoV>rU|?lnz~TDrHj0Ma{FKbJN@NX&##RPqRwjlJ4Go#v RKz}kYc)I$ztaD0e0sx#vRJs5F literal 0 HcmV?d00001 diff --git a/graphics/pokemon/nickit/footprint.png b/graphics/pokemon/nickit/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..480c8f2674390132466a065c378c254ad91cfea1 GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`r4|E?O> zd`kaufZx^riQ|iYTjohp3<+l>MNgk;<_D@(Epd$~Nl7e8wMs5Z1yT$~21bUuhDN%E z79mCkRwkBKhDO>3237_J9Inr9qiD#@PsvQHMAl$vY-M0mdK II;Vst0M!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M?H=Z4c|$ zw(-AF_|hQRsGub9rCGk^-w9@h17U)y>dTeffXY=%Tq8?MniKUgHk+y+>m4N|=>$BS^8glbfGSe!NH5eLO8JJlaK{b@WvzQ0ez~JfX K=d#Wzp$PyrPEZB_ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/orbeetle/footprint.png b/graphics/pokemon/orbeetle/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..57dc260a97d6b6109fdfbec8ac31d623667dba85 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`rpSB?KL zD^<7IC$OX})?#2-+A1S)yZnj>P?>6pYeY#(Vo9o1a#1RfVlXl=GSoFR(lxXQF*2|+ zv9vNY(l#)#GBDt9eRdl~LvDUbW?Ch(218>j17j;AGl+)Nj_W6Z8W=oX{an^LB{Ts5 DWV%ax literal 0 HcmV?d00001 diff --git a/graphics/pokemon/perrserker/footprint.png b/graphics/pokemon/perrserker/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..c2bce6fde56e60a81ef00b1783ac91bd3be0c1c8 GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`p^c0Zdh zu-CQe|5EtWZo~0+&iN1J_J`%G+v>ma2&Df1&&;59RQ!rxNU$qVqiTt3L`h0wNvc(H zQ7VvPFfuSQ)HO8HHM9sZGO#kSv@$f(HZZU!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~~>Eal|aXtCR|M`r!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~<>Eal|aXtCR|M`r(e^;mf zNalBPU~AK1ICx4n(jy>yCs2)QiEBhjN@7W>RdP`(kYX@0Ff!CNG}1M+2r)9SGO@HW zG}1OOure^!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`p^|85xn znUMbDK)-{-yYoMJ_P=kIaJX6jl_y~;gV1lW`5S_YP64&3mbgZgq$HN4S|t~y0x1R~ z10zFSLnB>7ix49ND-%mALnCbi11kdq4%cV5Q8eV{r(~v8B5N=-2CB0%GJ|O7+n)on Ofx*+&&t;ucLK6Td+g8H> literal 0 HcmV?d00001 diff --git a/graphics/pokemon/regidrago/footprint.png b/graphics/pokemon/regidrago/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..616bef0ded08447f8092b24d2d54475ad0f0e408 GIT binary patch literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~_>Eal|aXtCR|M`qfc0Y}4 z9!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~~>Eal|aXtCR|M`r!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR$N3Kr*SEEQ z<7s~*$@jz9!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~{>Eal|aXtCR|M`r4|E@M) zkgsNG>QGq8$k65{by3qGUmU1NwZt`|BqgyV)hf9t6-Y4{85kMr8XD;uT7(!GSeaN_ z85(ID7+4t?aJW9ZjiMnpKP5A*5?O|m60h#!?r!wbb%TeJYD@<);T3K0RS~~ BOM(CZ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/rookidee/footprint.png b/graphics/pokemon/rookidee/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..82cf54523d40ae68fbeb5d1599409dde10d61ed2 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qfb^F;D z_8)hA!EVp-cVhaFbbhD*uMcu8;bG{yC3)-jw1eCr4JED-B`Jv|saDBFsX&Us$iT=@ z*U(7U&?3ahz{!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*W@Tau(NLnsKOLxn!PC{xWt~$(69A&8M!f(4 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/sandaconda/footprint.png b/graphics/pokemon/sandaconda/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..9de28722635536595453631b196700d457129c1d GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*Vr6Op(QtR&zAr!x44$rjF6*2UngG9}NW1_5 literal 0 HcmV?d00001 diff --git a/graphics/pokemon/scorbunny/footprint.png b/graphics/pokemon/scorbunny/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..03b76efa17f4dca948acc85d27d4deec704f038c GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`p^|E?PU z*_i%AvEQNod$T}*Ku5zSfz<#1nHg;6OO$O)Y<~pOP~sXsDZ)L L)z4*}Q$iB}I(|}B literal 0 HcmV?d00001 diff --git a/graphics/pokemon/silicobra/footprint.png b/graphics/pokemon/silicobra/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..f16726255964989b33e4e39b46bb6ad35f25acc7 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*Vr6Oq(ICZlr2(jc!PC{xWt~$(69A! literal 0 HcmV?d00001 diff --git a/graphics/pokemon/sinistea/footprint.png b/graphics/pokemon/sinistea/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..dcea8100bd0878d168565d1af11d7189cb8d9d8b GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*YGq;u(Xj64I!>Sl22WQ%mvv4FO#rkVN811Z literal 0 HcmV?d00001 diff --git a/graphics/pokemon/sirfetchd/footprint.png b/graphics/pokemon/sirfetchd/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..78a8ecb4f781d53e43cac42f53f9b18927954d3d GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`p^{~9mO zNoo^IZ)1L=@TEb%#qNahpAG3hg87~PJ7_U#go+jX3v_Y<>QXInjVMV;EJ?LWE=mPb z3`Pb!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~~>Eal|aXtCR|M`r!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~@>Eal|aXtCR|M`rPe^;je zV08J$!6M=ablwbkX^W@37gPdOsg}4#l%ynVYka#Z#3I+yGS3j3^P6!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`s~EDV4B z pZlh?(%}>cpt3=jdXl!L*Ze?fy(a>n)ng!Ir;OXk;vd$@?2>_(aM&bYf literal 0 HcmV?d00001 diff --git a/graphics/pokemon/sobble/footprint.png b/graphics/pokemon/sobble/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..7cca4a4c55a457c027d5abf4b199412c14212436 GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~>>Eal|aXtCR|M`r(bAO+| zaQys*b0-Ss%w=>IW0+eky>jaMm6||xswJ)wB`Jv|saDBFsX&Us$iT=@*U(7U&?3ah zz{!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M?I5Z4a~8 zwXwfZC~1&nb!2JWWdGclA@tvWeunwBLgu^IO8x+8C~=J_Nl7e8wMs5Z1yT$~21bUu zhDN%E79mCkRwkBKhDO>3237_J9Inr9qiD#@PsvQHMAl$vY-MC-Wn=--(EaJ2AW#E? Mr>mdKI;Vst0QxymKL7v# literal 0 HcmV?d00001 diff --git a/graphics/pokemon/stonjourner/footprint.png b/graphics/pokemon/stonjourner/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..15adc25514d4bf97dcd7d65370b938a9a58b63e9 GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4~@>Eal|aXtCR|M?FYjGdX4 znd=xr7(%}Nw`Z7phOO0Y!>ji|RjMVf5hW>!C8<`)MX5lF!N|bKP}k5%*U%!w$iT|P z(#p_C+rYrez<|T`*=-aJx%nxXX_d$t42`V}%&m-|8fNGOF92#_@O1TaS?83{1OS(` BOQiq+ literal 0 HcmV?d00001 diff --git a/graphics/pokemon/thievul/footprint.png b/graphics/pokemon/thievul/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..530e57b35ead392c122831ad23af01030df4f81b GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qf|E?O> zd`ho4z~?Ie!|_GC&0+a!wjHzn|7SFD65lqdY365;h7#9^l9a@fRIB8oR3OD*WME{d zYiOivXc1y$U}a)yWoV>rU|?lnz~TDrHj0Ma{FKbJN@NX&##RQ#R>qbP4e?pa_W?C9 Nc)I$ztaD0e0swo6R1p9G literal 0 HcmV?d00001 diff --git a/graphics/pokemon/thwackey/footprint.png b/graphics/pokemon/thwackey/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..a39e31bcf5d5de54b8b72118e37c95a4d3827bc7 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qfb+?S? z1f*LW;B)2wA!&D_`2v46+m2cP|1%1QiETEm*c%GcP~sXUf LtDnm{r-UW|Dt}PU literal 0 HcmV?d00001 diff --git a/graphics/pokemon/toxel/footprint.png b/graphics/pokemon/toxel/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..e89659880a9b941b9bcd5b74396508837c591d1e GIT binary patch literal 307 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Eal|aXtCR|M`qfcJtFK zZtywr-;lKXVEku7`y%^qJpW%wCY)jjF_OsIuCie(P={)XYeY#(Vo9o1a#1RfVlXl= zGSoFR(lxXQF*2|+v9vNY(l#)#GBDt9eRdl~LvDUbW?Ch(218>j15+zQGl+&~k_&Qy P8W=oX{an^LB{Ts5`leEx literal 0 HcmV?d00001 diff --git a/graphics/pokemon/toxtricity/footprint.png b/graphics/pokemon/toxtricity/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..f9824a0885e9641d4b6b861e39260e339cfad670 GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Mv^J1q$hSx;Tb#Tu=V-fBwUG+rz@u zZOpHD*k?GtU^G6=Ue?C{C*X^-T-U!F#()0vGwiVvN|d>oG9Rczopr0KC;x$^ZZW literal 0 HcmV?d00001 diff --git a/graphics/pokemon/urshifu/footprint.png b/graphics/pokemon/urshifu/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..bf4c5a6f6cfe41162c2cc3bb06f02acdad094247 GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Mv^J1q$hSx;Tb#Tu=V-fBwV!^=;-q zdHnxK@@-hWfc+28`SZ;ep8w>Le!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Mv^J1q#V|x;Tb#Tu=V-e?DX1zbnRn zHn1<`{}jNIqOASnzdS?n4k?=xemh-&DpgBdBT7;dOH!?pi&B9UgOP!ep{}8kuAxPU zk%5(orIn$Pwt<0_fdPl>v)d>da`RI%(<+fQ7#dp{7+aZIKs4AFE$szrVDNPHb6Mw< G&;$TYGEMCO literal 0 HcmV?d00001 diff --git a/graphics/pokemon/yamper/footprint.png b/graphics/pokemon/yamper/footprint.png new file mode 100644 index 0000000000000000000000000000000000000000..4324de5e4fb8dc212d79eebf95dd525daa580c00 GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^0wBx?BpA#)4xIr~Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Mv^J1q!Kqx;Tb#Tu=V-e?Ft+-__|q zo}B;CAlo9h&A7(y{D+P6AGX_g$gE*tXwH<}E6vNo1k|Eh;u=wsl30>zm0Xkxq!^40 zj0|-RjdTqyLW~ToOf0PojkFC6tPBh|T%X-W(U6;;l9^VCtijOO%D}|R&=jJ!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Mv^J1q$hUx;Tb#Tu=V-fBr*%+r#|T z0>2dao%nx9&YPcJap(MpK)IF%B?rv~QVUM~|If%8Ao{CNtmPk2qiTt3L`h0wNvc(H zQ7VvPFfuSQ)HO8HHM9sZGO#kSv@$f(HZZU!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Mv^J1qx|-x;Tb#Tu=V-fBr*%+r#|T z0>2dao%nx9%6&JsdD33g$f3a+!W{DRzdgfeH&G+A;$I*~sFt`!l%yn!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4Mv^J1qxYvx;Tb#TxT?3IRBsFKM>h7 ze3NH*B+T$gkl}$M!v#i$4rYc1c7_A|4A0*)d_K?c`#!_Z`3!&Tfr^h#5-~_TwlWQ9 zjB1H%L`h0wNvc(HQ7VvPFfuSQ)HO8HHM9sZGO#kSv@$f(HZZU Date: Sat, 18 Dec 2021 18:35:18 -0300 Subject: [PATCH 284/417] Fixed syntax in footprint_table.h --- src/data/pokemon_graphics/footprint_table.h | 354 ++++++++++---------- 1 file changed, 177 insertions(+), 177 deletions(-) diff --git a/src/data/pokemon_graphics/footprint_table.h b/src/data/pokemon_graphics/footprint_table.h index babc6b43c5..da05b7fff8 100644 --- a/src/data/pokemon_graphics/footprint_table.h +++ b/src/data/pokemon_graphics/footprint_table.h @@ -722,182 +722,182 @@ const u8 *const gMonFootprintTable[] = [SPECIES_DIANCIE] = gMonFootprint_Diancie, [SPECIES_HOOPA] = gMonFootprint_Hoopa, [SPECIES_VOLCANION] = gMonFootprint_Volcanion, - [SPECIES_ROWLET] = gMonFootprint_Rowlet, - [SPECIES_DARTRIX] = gMonFootprint_Dartrix, - [SPECIES_DECIDUEYE] = gMonFootprint_Decidueye, - [SPECIES_LITTEN] = gMonFootprint_Litten, - [SPECIES_TORRACAT] = gMonFootprint_Torracat, - [SPECIES_INCINEROAR] = gMonFootprint_Incineroar, - [SPECIES_POPPLIO] = gMonFootprint_Popplio, - [SPECIES_BRIONNE] = gMonFootprint_Brionne, - [SPECIES_PRIMARINA] = gMonFootprint_Primarina, - [SPECIES_PIKIPEK] = gMonFootprint_Pikipek, - [SPECIES_TRUMBEAK] = gMonFootprint_Trumbeak, - [SPECIES_TOUCANNON] = gMonFootprint_Toucannon, - [SPECIES_YUNGOOS] = gMonFootprint_Yungoos, - [SPECIES_GUMSHOOS] = gMonFootprint_Gumshoos, - [SPECIES_GRUBBIN] = gMonFootprint_Grubbin, - [SPECIES_CHARJABUG] = gMonFootprint_Charjabug, - [SPECIES_VIKAVOLT] = gMonFootprint_Vikavolt, - [SPECIES_CRABRAWLER] = gMonFootprint_Crabrawler, - [SPECIES_CRABOMINABLE] = gMonFootprint_Crabominable, - [SPECIES_ORICORIO] = gMonFootprint_Oricorio, - [SPECIES_CUTIEFLY] = gMonFootprint_Cutiefly, - [SPECIES_RIBOMBEE] = gMonFootprint_Ribombee, - [SPECIES_ROCKRUFF] = gMonFootprint_Rockruff, - [SPECIES_LYCANROC] = gMonFootprint_Lycanroc, - [SPECIES_WISHIWASHI] = gMonFootprint_Wishiwashi, - [SPECIES_MAREANIE] = gMonFootprint_Mareanie, - [SPECIES_TOXAPEX] = gMonFootprint_Toxapex, - [SPECIES_MUDBRAY] = gMonFootprint_Mudbray, - [SPECIES_MUDSDALE] = gMonFootprint_Mudsdale, - [SPECIES_DEWPIDER] = gMonFootprint_Dewpider, - [SPECIES_ARAQUANID] = gMonFootprint_Araquanid, - [SPECIES_FOMANTIS] = gMonFootprint_Fomantis, - [SPECIES_LURANTIS] = gMonFootprint_Lurantis, - [SPECIES_MORELULL] = gMonFootprint_Morelull, - [SPECIES_SHIINOTIC] = gMonFootprint_Shiinotic, - [SPECIES_SALANDIT] = gMonFootprint_Salandit, - [SPECIES_SALAZZLE] = gMonFootprint_Salazzle, - [SPECIES_STUFFUL] = gMonFootprint_Stufful, - [SPECIES_BEWEAR] = gMonFootprint_Bewear, - [SPECIES_BOUNSWEET] = gMonFootprint_Bounsweet, - [SPECIES_STEENEE] = gMonFootprint_Steenee, - [SPECIES_TSAREENA] = gMonFootprint_Tsareena, - [SPECIES_COMFEY] = gMonFootprint_Comfey, - [SPECIES_ORANGURU] = gMonFootprint_Oranguru, - [SPECIES_PASSIMIAN] = gMonFootprint_Passimian, - [SPECIES_WIMPOD] = gMonFootprint_Wimpod, - [SPECIES_GOLISOPOD] = gMonFootprint_Golisopod, - [SPECIES_SANDYGAST] = gMonFootprint_Sandygast, - [SPECIES_PALOSSAND] = gMonFootprint_Palossand, - [SPECIES_PYUKUMUKU] = gMonFootprint_Pyukumuku, - [SPECIES_TYPE_NULL] = gMonFootprint_Type_Null, - [SPECIES_SILVALLY] = gMonFootprint_Silvally, - [SPECIES_MINIOR] = gMonFootprint_Minior, - [SPECIES_KOMALA] = gMonFootprint_Komala, - [SPECIES_TURTONATOR] = gMonFootprint_Turtonator, - [SPECIES_TOGEDEMARU] = gMonFootprint_Togedemaru, - [SPECIES_MIMIKYU] = gMonFootprint_Mimikyu, - [SPECIES_BRUXISH] = gMonFootprint_Bruxish, - [SPECIES_DRAMPA] = gMonFootprint_Drampa, - [SPECIES_DHELMISE] = gMonFootprint_Dhelmise, - [SPECIES_JANGMO_O] = gMonFootprint_Jangmo_o, - [SPECIES_HAKAMO_O] = gMonFootprint_Hakamo_o, - [SPECIES_KOMMO_O] = gMonFootprint_Kommo_o, - [SPECIES_TAPU_KOKO] = gMonFootprint_Tapu_Koko, - [SPECIES_TAPU_LELE] = gMonFootprint_Tapu_Lele, - [SPECIES_TAPU_BULU] = gMonFootprint_Tapu_Bulu, - [SPECIES_TAPU_FINI] = gMonFootprint_Tapu_Fini, - [SPECIES_COSMOG] = gMonFootprint_Cosmog, - [SPECIES_COSMOEM] = gMonFootprint_Cosmoem, - [SPECIES_SOLGALEO] = gMonFootprint_Solgaleo, - [SPECIES_LUNALA] = gMonFootprint_Lunala, - [SPECIES_NIHILEGO] = gMonFootprint_Nihilego, - [SPECIES_BUZZWOLE] = gMonFootprint_Buzzwole, - [SPECIES_PHEROMOSA] = gMonFootprint_Pheromosa, - [SPECIES_XURKITREE] = gMonFootprint_Xurkitree, - [SPECIES_CELESTEELA] = gMonFootprint_Celesteela, - [SPECIES_KARTANA] = gMonFootprint_Kartana, - [SPECIES_GUZZLORD] = gMonFootprint_Guzzlord, - [SPECIES_NECROZMA] = gMonFootprint_Necrozma, - [SPECIES_MAGEARNA] = gMonFootprint_Magearna, - [SPECIES_MARSHADOW] = gMonFootprint_Marshadow, - [SPECIES_POIPOLE] = gMonFootprint_Poipole, - [SPECIES_NAGANADEL] = gMonFootprint_Naganadel, - [SPECIES_STAKATAKA] = gMonFootprint_Stakataka, - [SPECIES_BLACEPHALON] = gMonFootprint_Blacephalon, - [SPECIES_ZERAORA] = gMonFootprint_Zeraora, - [SPECIES_MELTAN] = gMonFootprint_Meltan, - [SPECIES_MELMETAL] = gMonFootprint_Melmetal, - [SPECIES_GROOKEY] = gMonFootprint_Grookey, - [SPECIES_THWACKEY] = gMonFootprint_Thwackey, - [SPECIES_RILLABOOM] = gMonFootprint_Rillaboom, - [SPECIES_SCORBUNNY] = gMonFootprint_Scorbunny, - [SPECIES_RABOOT] = gMonFootprint_Raboot, - [SPECIES_CINDERACE] = gMonFootprint_Cinderace, - [SPECIES_SOBBLE] = gMonFootprint_Sobble, - [SPECIES_DRIZZILE] = gMonFootprint_Drizzile, - [SPECIES_INTELEON] = gMonFootprint_Inteleon, - [SPECIES_SKWOVET] = gMonFootprint_Skwovet, - [SPECIES_GREEDENT] = gMonFootprint_Greedent, - [SPECIES_ROOKIDEE] = gMonFootprint_Rookidee, - [SPECIES_CORVISQUIRE] = gMonFootprint_Corvisquire, - [SPECIES_CORVIKNIGHT] = gMonFootprint_Corviknight, - [SPECIES_BLIPBUG] = gMonFootprint_Blipbug, - [SPECIES_DOTTLER] = gMonFootprint_Dottler, - [SPECIES_ORBEETLE] = gMonFootprint_Orbeetle, - [SPECIES_NICKIT] = gMonFootprint_Nickit, - [SPECIES_THIEVUL] = gMonFootprint_Thievul, - [SPECIES_GOSSIFLEUR] = gMonFootprint_Gossifleur, - [SPECIES_ELDEGOSS] = gMonFootprint_Eldegoss, - [SPECIES_WOOLOO] = gMonFootprint_Wooloo, - [SPECIES_DUBWOOL] = gMonFootprint_Dubwool, - [SPECIES_CHEWTLE] = gMonFootprint_Chewtle, - [SPECIES_DREDNAW] = gMonFootprint_Drednaw, - [SPECIES_YAMPER] = gMonFootprint_Yamper, - [SPECIES_BOLTUND] = gMonFootprint_Boltund, - [SPECIES_ROLYCOLY] = gMonFootprint_Rolycoly, - [SPECIES_CARKOL] = gMonFootprint_Carkol, - [SPECIES_COALOSSAL] = gMonFootprint_Coalossal, - [SPECIES_APPLIN] = gMonFootprint_Applin, - [SPECIES_FLAPPLE] = gMonFootprint_Flapple, - [SPECIES_APPLETUN] = gMonFootprint_Appletun, - [SPECIES_SILICOBRA] = gMonFootprint_Silicobra, - [SPECIES_SANDACONDA] = gMonFootprint_Sandaconda, - [SPECIES_CRAMORANT] = gMonFootprint_Cramorant, - [SPECIES_ARROKUDA] = gMonFootprint_Arrokuda, - [SPECIES_BARRASKEWDA] = gMonFootprint_Barraskewda, - [SPECIES_TOXEL] = gMonFootprint_Toxel, - [SPECIES_TOXTRICITY] = gMonFootprint_Toxtricity, - [SPECIES_SIZZLIPEDE] = gMonFootprint_Sizzlipede, - [SPECIES_CENTISKORCH] = gMonFootprint_Centiskorch, - [SPECIES_CLOBBOPUS] = gMonFootprint_Clobbopus, - [SPECIES_GRAPPLOCT] = gMonFootprint_Grapploct, - [SPECIES_SINISTEA] = gMonFootprint_Sinistea, - [SPECIES_POLTEAGEIST] = gMonFootprint_Polteageist, - [SPECIES_HATENNA] = gMonFootprint_Hatenna, - [SPECIES_HATTREM] = gMonFootprint_Hattrem, - [SPECIES_HATTERENE] = gMonFootprint_Hatterene, - [SPECIES_IMPIDIMP] = gMonFootprint_Impidimp, - [SPECIES_MORGREM] = gMonFootprint_Morgrem, - [SPECIES_GRIMMSNARL] = gMonFootprint_Grimmsnarl, - [SPECIES_OBSTAGOON] = gMonFootprint_Obstagoon, - [SPECIES_PERRSERKER] = gMonFootprint_Perrserker, - [SPECIES_CURSOLA] = gMonFootprint_Cursola, - [SPECIES_SIRFETCHD] = gMonFootprint_Sirfetchd, - [SPECIES_MR_RIME] = gMonFootprint_Mr_Rime, - [SPECIES_RUNERIGUS] = gMonFootprint_Runerigus, - [SPECIES_MILCERY] = gMonFootprint_Milcery, - [SPECIES_ALCREMIE] = gMonFootprint_Alcremie, - [SPECIES_FALINKS] = gMonFootprint_Falinks, - [SPECIES_PINCURCHIN] = gMonFootprint_Pincurchin, - [SPECIES_SNOM] = gMonFootprint_Snom, - [SPECIES_FROSMOTH] = gMonFootprint_Frosmoth, - [SPECIES_STONJOURNER] = gMonFootprint_Stonjourner, - [SPECIES_EISCUE] = gMonFootprint_Eiscue, - [SPECIES_INDEEDEE] = gMonFootprint_Indeedee, - [SPECIES_MORPEKO] = gMonFootprint_Morpeko, - [SPECIES_CUFANT] = gMonFootprint_Cufant, - [SPECIES_COPPERAJAH] = gMonFootprint_Copperajah, - [SPECIES_DRACOZOLT] = gMonFootprint_Dracozolt, - [SPECIES_ARCTOZOLT] = gMonFootprint_Arctozolt, - [SPECIES_DRACOVISH] = gMonFootprint_Dracovish, - [SPECIES_ARCTOVISH] = gMonFootprint_Arctovish, - [SPECIES_DURALUDON] = gMonFootprint_Duraludon, - [SPECIES_DREEPY] = gMonFootprint_Dreepy, - [SPECIES_DRAKLOAK] = gMonFootprint_Drakloak, - [SPECIES_DRAGAPULT] = gMonFootprint_Dragapult, - [SPECIES_ZACIAN] = gMonFootprint_Zacian, - [SPECIES_ZAMAZENTA] = gMonFootprint_Zamazenta, - [SPECIES_ETERNATUS] = gMonFootprint_Eternatus, - [SPECIES_KUBFU] = gMonFootprint_Kubfu, - [SPECIES_URSHIFU] = gMonFootprint_Urshifu, - [SPECIES_ZARUDE] = gMonFootprint_Zarude, - [SPECIES_REGIELEKI] = gMonFootprint_Regieleki, - [SPECIES_REGIDRAGO] = gMonFootprint_Regidrago, - [SPECIES_GLASTRIER] = gMonFootprint_Glastrier, - [SPECIES_SPECTRIER] = gMonFootprint_Spectrier, - [SPECIES_CALYREX] = gMonFootprint_Calyrex, + [SPECIES_ROWLET] = gMonFootprint_Rowlet, + [SPECIES_DARTRIX] = gMonFootprint_Dartrix, + [SPECIES_DECIDUEYE] = gMonFootprint_Decidueye, + [SPECIES_LITTEN] = gMonFootprint_Litten, + [SPECIES_TORRACAT] = gMonFootprint_Torracat, + [SPECIES_INCINEROAR] = gMonFootprint_Incineroar, + [SPECIES_POPPLIO] = gMonFootprint_Popplio, + [SPECIES_BRIONNE] = gMonFootprint_Brionne, + [SPECIES_PRIMARINA] = gMonFootprint_Primarina, + [SPECIES_PIKIPEK] = gMonFootprint_Pikipek, + [SPECIES_TRUMBEAK] = gMonFootprint_Trumbeak, + [SPECIES_TOUCANNON] = gMonFootprint_Toucannon, + [SPECIES_YUNGOOS] = gMonFootprint_Yungoos, + [SPECIES_GUMSHOOS] = gMonFootprint_Gumshoos, + [SPECIES_GRUBBIN] = gMonFootprint_Grubbin, + [SPECIES_CHARJABUG] = gMonFootprint_Charjabug, + [SPECIES_VIKAVOLT] = gMonFootprint_Vikavolt, + [SPECIES_CRABRAWLER] = gMonFootprint_Crabrawler, + [SPECIES_CRABOMINABLE] = gMonFootprint_Crabominable, + [SPECIES_ORICORIO] = gMonFootprint_Oricorio, + [SPECIES_CUTIEFLY] = gMonFootprint_Cutiefly, + [SPECIES_RIBOMBEE] = gMonFootprint_Ribombee, + [SPECIES_ROCKRUFF] = gMonFootprint_Rockruff, + [SPECIES_LYCANROC] = gMonFootprint_Lycanroc, + [SPECIES_WISHIWASHI] = gMonFootprint_Wishiwashi, + [SPECIES_MAREANIE] = gMonFootprint_Mareanie, + [SPECIES_TOXAPEX] = gMonFootprint_Toxapex, + [SPECIES_MUDBRAY] = gMonFootprint_Mudbray, + [SPECIES_MUDSDALE] = gMonFootprint_Mudsdale, + [SPECIES_DEWPIDER] = gMonFootprint_Dewpider, + [SPECIES_ARAQUANID] = gMonFootprint_Araquanid, + [SPECIES_FOMANTIS] = gMonFootprint_Fomantis, + [SPECIES_LURANTIS] = gMonFootprint_Lurantis, + [SPECIES_MORELULL] = gMonFootprint_Morelull, + [SPECIES_SHIINOTIC] = gMonFootprint_Shiinotic, + [SPECIES_SALANDIT] = gMonFootprint_Salandit, + [SPECIES_SALAZZLE] = gMonFootprint_Salazzle, + [SPECIES_STUFFUL] = gMonFootprint_Stufful, + [SPECIES_BEWEAR] = gMonFootprint_Bewear, + [SPECIES_BOUNSWEET] = gMonFootprint_Bounsweet, + [SPECIES_STEENEE] = gMonFootprint_Steenee, + [SPECIES_TSAREENA] = gMonFootprint_Tsareena, + [SPECIES_COMFEY] = gMonFootprint_Comfey, + [SPECIES_ORANGURU] = gMonFootprint_Oranguru, + [SPECIES_PASSIMIAN] = gMonFootprint_Passimian, + [SPECIES_WIMPOD] = gMonFootprint_Wimpod, + [SPECIES_GOLISOPOD] = gMonFootprint_Golisopod, + [SPECIES_SANDYGAST] = gMonFootprint_Sandygast, + [SPECIES_PALOSSAND] = gMonFootprint_Palossand, + [SPECIES_PYUKUMUKU] = gMonFootprint_Pyukumuku, + [SPECIES_TYPE_NULL] = gMonFootprint_Type_Null, + [SPECIES_SILVALLY] = gMonFootprint_Silvally, + [SPECIES_MINIOR] = gMonFootprint_Minior, + [SPECIES_KOMALA] = gMonFootprint_Komala, + [SPECIES_TURTONATOR] = gMonFootprint_Turtonator, + [SPECIES_TOGEDEMARU] = gMonFootprint_Togedemaru, + [SPECIES_MIMIKYU] = gMonFootprint_Mimikyu, + [SPECIES_BRUXISH] = gMonFootprint_Bruxish, + [SPECIES_DRAMPA] = gMonFootprint_Drampa, + [SPECIES_DHELMISE] = gMonFootprint_Dhelmise, + [SPECIES_JANGMO_O] = gMonFootprint_Jangmo_o, + [SPECIES_HAKAMO_O] = gMonFootprint_Hakamo_o, + [SPECIES_KOMMO_O] = gMonFootprint_Kommo_o, + [SPECIES_TAPU_KOKO] = gMonFootprint_Tapu_Koko, + [SPECIES_TAPU_LELE] = gMonFootprint_Tapu_Lele, + [SPECIES_TAPU_BULU] = gMonFootprint_Tapu_Bulu, + [SPECIES_TAPU_FINI] = gMonFootprint_Tapu_Fini, + [SPECIES_COSMOG] = gMonFootprint_Cosmog, + [SPECIES_COSMOEM] = gMonFootprint_Cosmoem, + [SPECIES_SOLGALEO] = gMonFootprint_Solgaleo, + [SPECIES_LUNALA] = gMonFootprint_Lunala, + [SPECIES_NIHILEGO] = gMonFootprint_Nihilego, + [SPECIES_BUZZWOLE] = gMonFootprint_Buzzwole, + [SPECIES_PHEROMOSA] = gMonFootprint_Pheromosa, + [SPECIES_XURKITREE] = gMonFootprint_Xurkitree, + [SPECIES_CELESTEELA] = gMonFootprint_Celesteela, + [SPECIES_KARTANA] = gMonFootprint_Kartana, + [SPECIES_GUZZLORD] = gMonFootprint_Guzzlord, + [SPECIES_NECROZMA] = gMonFootprint_Necrozma, + [SPECIES_MAGEARNA] = gMonFootprint_Magearna, + [SPECIES_MARSHADOW] = gMonFootprint_Marshadow, + [SPECIES_POIPOLE] = gMonFootprint_Poipole, + [SPECIES_NAGANADEL] = gMonFootprint_Naganadel, + [SPECIES_STAKATAKA] = gMonFootprint_Stakataka, + [SPECIES_BLACEPHALON] = gMonFootprint_Blacephalon, + [SPECIES_ZERAORA] = gMonFootprint_Zeraora, + [SPECIES_MELTAN] = gMonFootprint_Meltan, + [SPECIES_MELMETAL] = gMonFootprint_Melmetal, + [SPECIES_GROOKEY] = gMonFootprint_Grookey, + [SPECIES_THWACKEY] = gMonFootprint_Thwackey, + [SPECIES_RILLABOOM] = gMonFootprint_Rillaboom, + [SPECIES_SCORBUNNY] = gMonFootprint_Scorbunny, + [SPECIES_RABOOT] = gMonFootprint_Raboot, + [SPECIES_CINDERACE] = gMonFootprint_Cinderace, + [SPECIES_SOBBLE] = gMonFootprint_Sobble, + [SPECIES_DRIZZILE] = gMonFootprint_Drizzile, + [SPECIES_INTELEON] = gMonFootprint_Inteleon, + [SPECIES_SKWOVET] = gMonFootprint_Skwovet, + [SPECIES_GREEDENT] = gMonFootprint_Greedent, + [SPECIES_ROOKIDEE] = gMonFootprint_Rookidee, + [SPECIES_CORVISQUIRE] = gMonFootprint_Corvisquire, + [SPECIES_CORVIKNIGHT] = gMonFootprint_Corviknight, + [SPECIES_BLIPBUG] = gMonFootprint_Blipbug, + [SPECIES_DOTTLER] = gMonFootprint_Dottler, + [SPECIES_ORBEETLE] = gMonFootprint_Orbeetle, + [SPECIES_NICKIT] = gMonFootprint_Nickit, + [SPECIES_THIEVUL] = gMonFootprint_Thievul, + [SPECIES_GOSSIFLEUR] = gMonFootprint_Gossifleur, + [SPECIES_ELDEGOSS] = gMonFootprint_Eldegoss, + [SPECIES_WOOLOO] = gMonFootprint_Wooloo, + [SPECIES_DUBWOOL] = gMonFootprint_Dubwool, + [SPECIES_CHEWTLE] = gMonFootprint_Chewtle, + [SPECIES_DREDNAW] = gMonFootprint_Drednaw, + [SPECIES_YAMPER] = gMonFootprint_Yamper, + [SPECIES_BOLTUND] = gMonFootprint_Boltund, + [SPECIES_ROLYCOLY] = gMonFootprint_Rolycoly, + [SPECIES_CARKOL] = gMonFootprint_Carkol, + [SPECIES_COALOSSAL] = gMonFootprint_Coalossal, + [SPECIES_APPLIN] = gMonFootprint_Applin, + [SPECIES_FLAPPLE] = gMonFootprint_Flapple, + [SPECIES_APPLETUN] = gMonFootprint_Appletun, + [SPECIES_SILICOBRA] = gMonFootprint_Silicobra, + [SPECIES_SANDACONDA] = gMonFootprint_Sandaconda, + [SPECIES_CRAMORANT] = gMonFootprint_Cramorant, + [SPECIES_ARROKUDA] = gMonFootprint_Arrokuda, + [SPECIES_BARRASKEWDA] = gMonFootprint_Barraskewda, + [SPECIES_TOXEL] = gMonFootprint_Toxel, + [SPECIES_TOXTRICITY] = gMonFootprint_Toxtricity, + [SPECIES_SIZZLIPEDE] = gMonFootprint_Sizzlipede, + [SPECIES_CENTISKORCH] = gMonFootprint_Centiskorch, + [SPECIES_CLOBBOPUS] = gMonFootprint_Clobbopus, + [SPECIES_GRAPPLOCT] = gMonFootprint_Grapploct, + [SPECIES_SINISTEA] = gMonFootprint_Sinistea, + [SPECIES_POLTEAGEIST] = gMonFootprint_Polteageist, + [SPECIES_HATENNA] = gMonFootprint_Hatenna, + [SPECIES_HATTREM] = gMonFootprint_Hattrem, + [SPECIES_HATTERENE] = gMonFootprint_Hatterene, + [SPECIES_IMPIDIMP] = gMonFootprint_Impidimp, + [SPECIES_MORGREM] = gMonFootprint_Morgrem, + [SPECIES_GRIMMSNARL] = gMonFootprint_Grimmsnarl, + [SPECIES_OBSTAGOON] = gMonFootprint_Obstagoon, + [SPECIES_PERRSERKER] = gMonFootprint_Perrserker, + [SPECIES_CURSOLA] = gMonFootprint_Cursola, + [SPECIES_SIRFETCHD] = gMonFootprint_Sirfetchd, + [SPECIES_MR_RIME] = gMonFootprint_Mr_Rime, + [SPECIES_RUNERIGUS] = gMonFootprint_Runerigus, + [SPECIES_MILCERY] = gMonFootprint_Milcery, + [SPECIES_ALCREMIE] = gMonFootprint_Alcremie, + [SPECIES_FALINKS] = gMonFootprint_Falinks, + [SPECIES_PINCURCHIN] = gMonFootprint_Pincurchin, + [SPECIES_SNOM] = gMonFootprint_Snom, + [SPECIES_FROSMOTH] = gMonFootprint_Frosmoth, + [SPECIES_STONJOURNER] = gMonFootprint_Stonjourner, + [SPECIES_EISCUE] = gMonFootprint_Eiscue, + [SPECIES_INDEEDEE] = gMonFootprint_Indeedee, + [SPECIES_MORPEKO] = gMonFootprint_Morpeko, + [SPECIES_CUFANT] = gMonFootprint_Cufant, + [SPECIES_COPPERAJAH] = gMonFootprint_Copperajah, + [SPECIES_DRACOZOLT] = gMonFootprint_Dracozolt, + [SPECIES_ARCTOZOLT] = gMonFootprint_Arctozolt, + [SPECIES_DRACOVISH] = gMonFootprint_Dracovish, + [SPECIES_ARCTOVISH] = gMonFootprint_Arctovish, + [SPECIES_DURALUDON] = gMonFootprint_Duraludon, + [SPECIES_DREEPY] = gMonFootprint_Dreepy, + [SPECIES_DRAKLOAK] = gMonFootprint_Drakloak, + [SPECIES_DRAGAPULT] = gMonFootprint_Dragapult, + [SPECIES_ZACIAN] = gMonFootprint_Zacian, + [SPECIES_ZAMAZENTA] = gMonFootprint_Zamazenta, + [SPECIES_ETERNATUS] = gMonFootprint_Eternatus, + [SPECIES_KUBFU] = gMonFootprint_Kubfu, + [SPECIES_URSHIFU] = gMonFootprint_Urshifu, + [SPECIES_ZARUDE] = gMonFootprint_Zarude, + [SPECIES_REGIELEKI] = gMonFootprint_Regieleki, + [SPECIES_REGIDRAGO] = gMonFootprint_Regidrago, + [SPECIES_GLASTRIER] = gMonFootprint_Glastrier, + [SPECIES_SPECTRIER] = gMonFootprint_Spectrier, + [SPECIES_CALYREX] = gMonFootprint_Calyrex, [SPECIES_EGG] = gMonFootprint_Bulbasaur, }; From 793de700683454343e1b4e18f41681746511386c Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 19 Dec 2021 13:09:01 -0300 Subject: [PATCH 285/417] Fixed reference to PlayCry2 --- src/party_menu.c | 2 +- src/pokemon_storage_system.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index 1e071a081c..7c24eeb7a7 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -5317,7 +5317,7 @@ void TryItemHoldFormChange(struct Pokemon *mon) targetSpecies = GetFormChangeTargetSpecies(mon, FORM_ITEM_HOLD, 0); if (targetSpecies != SPECIES_NONE) { - PlayCry2(targetSpecies, 0, 0x7D, 0xA); + PlayCry_NormalNoDucking(targetSpecies, 0, CRY_VOLUME_RS, CRY_VOLUME_RS); SetMonData(mon, MON_DATA_SPECIES, &targetSpecies); FreeAndDestroyMonIconSprite(&gSprites[sPartyMenuBoxes[gPartyMenu.slotId].monSpriteId]); CreatePartyMonIconSpriteParameterized(targetSpecies, GetMonData(mon, MON_DATA_PERSONALITY, NULL), &sPartyMenuBoxes[gPartyMenu.slotId], 1); diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 639c4f7fc0..1a3e8f0fea 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -6911,7 +6911,6 @@ void SetMonFormPSS(struct BoxPokemon *boxMon) targetSpecies = GetFormChangeTargetSpeciesBoxMon(boxMon, FORM_ITEM_HOLD, 0); if (targetSpecies != SPECIES_NONE) { - //PlayCry2(targetSpecies, 0, 0x7D, 0xA); SetBoxMonData(boxMon, MON_DATA_SPECIES, &targetSpecies); UpdateSpeciesSpritePSS(boxMon); } From e28fa7f91c811fe9edb138ab68d3d62005a89413 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 21 Dec 2021 22:10:54 -0300 Subject: [PATCH 286/417] Update event_scripts.s --- data/event_scripts.s | 1 - 1 file changed, 1 deletion(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index edab4987fa..1f3db6aa2b 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -59,7 +59,6 @@ .section script_data, "aw", %progbits -@ 81DB67C .include "data/script_cmd_table.inc" gSpecialVars:: From d94dae18f7e5b475b8b2ba9d3c838350904a01f3 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 21 Dec 2021 22:46:59 -0300 Subject: [PATCH 287/417] Removed more commented out addresses I like to help. --- berry_fix/payload/asm/libagbsyscall.s | 10 ++++----- src/crt0.s | 4 ++-- src/libgcnmultiboot.s | 30 +++++++++++++-------------- src/rom_header.s | 11 ++++------ 4 files changed, 26 insertions(+), 29 deletions(-) diff --git a/berry_fix/payload/asm/libagbsyscall.s b/berry_fix/payload/asm/libagbsyscall.s index 9548e80d28..f13d08d76f 100644 --- a/berry_fix/payload/asm/libagbsyscall.s +++ b/berry_fix/payload/asm/libagbsyscall.s @@ -6,13 +6,13 @@ .text thumb_func_start CpuSet -CpuSet: @ 81E3B64 +CpuSet: svc 0xB bx lr thumb_func_end CpuSet thumb_func_start Div -Div: @ 81E3B68 +Div: svc 0x6 bx lr thumb_func_end Div @@ -25,19 +25,19 @@ Mod: thumb_func_end Mod thumb_func_start LZ77UnCompVram -LZ77UnCompVram: @ 81E3B6C +LZ77UnCompVram: svc 0x12 bx lr thumb_func_end LZ77UnCompVram thumb_func_start RegisterRamReset -RegisterRamReset: @ 81E3B80 +RegisterRamReset: svc 0x1 bx lr thumb_func_end RegisterRamReset thumb_func_start VBlankIntrWait -VBlankIntrWait: @ 81E3BA0 +VBlankIntrWait: movs r2, 0 svc 0x5 bx lr diff --git a/src/crt0.s b/src/crt0.s index 7c679c13b5..523061f52d 100644 --- a/src/crt0.s +++ b/src/crt0.s @@ -6,7 +6,7 @@ .align 2, 0 .global Init -Init: @ 8000204 +Init: mov r0, #PSR_IRQ_MODE msr cpsr_cf, r0 ldr sp, sp_irq @@ -34,7 +34,7 @@ sp_irq: .word IWRAM_END - 0x60 .arm .align 2, 0 .global IntrMain -IntrMain: @ 8000248 +IntrMain: mov r3, #REG_BASE add r3, r3, #OFFSET_REG_IE ldr r2, [r3] diff --git a/src/libgcnmultiboot.s b/src/libgcnmultiboot.s index 5ecc7d2f90..968a0836ec 100644 --- a/src/libgcnmultiboot.s +++ b/src/libgcnmultiboot.s @@ -40,7 +40,7 @@ .text thumb_func_start GameCubeMultiBoot_Hash -GameCubeMultiBoot_Hash: @ 82DED70 +GameCubeMultiBoot_Hash: push {r4,lr} ldr r4, pool_HashVal eors r3, r1 @@ -61,7 +61,7 @@ GameCubeMultiBoot_Hash_SkipEor: thumb_func_start GameCubeMultiBoot_Main @ void GameCubeMultiBoot_Main(struct GameCubeMultiBoot *mb); -GameCubeMultiBoot_Main: @ 82DED84 +GameCubeMultiBoot_Main: @ If there is no interrupt handler, skip counter manipulation ldr r1, [r0, GCMB_STRUCT_SERIAL_INTR_HANDLER] cmp r1, 0 @@ -246,7 +246,7 @@ pool_NintendoLogo: .4byte RomHeaderNintendoLogo thumb_func_start GameCubeMultiBoot_ExecuteProgram @ void GameCubeMultiBoot_ExecuteProgram(struct GameCubeMultiBoot *mb); -GameCubeMultiBoot_ExecuteProgram: @ 82DEE84 +GameCubeMultiBoot_ExecuteProgram: @ If there's no multiboot image ready, just return to caller ldrb r1, [r0, GCMB_STRUCT_MBPROGRESS] cmp r1, MBPROGRESS_READY_TO_BOOT @@ -265,7 +265,7 @@ GameCubeMultiBoot_ExecuteProgram_Fail: thumb_func_start GameCubeMultiBoot_Init @ void GameCubeMultiBoot_Init(struct GameCubeMultiBoot *mb); -GameCubeMultiBoot_Init: @ 82DEE98 +GameCubeMultiBoot_Init: ldr r3, pool_InterruptRegs @ Save IME register. @@ -336,7 +336,7 @@ GameCubeMultiBoot_Init_ClearStructLoop: non_word_aligned_thumb_func_start GameCubeMultiBoot_HandleSerialInterrupt @ void GameCubeMultiBoot_HandleSerialInterrupt(struct GameCubeMultiBoot *mb); -GameCubeMultiBoot_HandleSerialInterrupt: @ 82DEEE2 +GameCubeMultiBoot_HandleSerialInterrupt: ldr r3, pool_SerialRegs @ Acknowledge reset/receive/send flags. @@ -400,7 +400,7 @@ GameCubeMultiBoot_BeginHandshake: .align 2, 0 -GcMbIntrHandler_CheckGameCodeSent: @ 82DEF24 +GcMbIntrHandler_CheckGameCodeSent: lsls r1, 31 bcc GcMbIntrHandler_Stop @ stop if send failed bmi GameCubeMultiBoot_CheckHandshakeResponse @ branch if receive is complete @@ -412,7 +412,7 @@ GcMbIntrHandler_CheckGameCodeSent: @ 82DEF24 .align 2, 0 -GcMbIntrHandler_CheckHandshakeResponse: @ 82DEF30 +GcMbIntrHandler_CheckHandshakeResponse: lsrs r1, 1 @ is receive complete? bcc GcMbIntrHandler_Stop @ stop if not @@ -429,7 +429,7 @@ GameCubeMultiBoot_CheckHandshakeResponse: .align 2, 0 -GcMbIntrHandler_ReceiveKeyA: @ 82DEF44 +GcMbIntrHandler_ReceiveKeyA: lsrs r1, 1 @ is receive complete? bcc GcMbIntrHandler_Stop @ branch if not ldr r1, [r3, OFFSET_REG_JOY_RECV - 0x120] @@ -473,7 +473,7 @@ GameCubeMultiBoot_KeyBCheckEnd: .align 2, 0 -GcMbIntrHandler_CheckKeyBSent: @ 82DEF84 +GcMbIntrHandler_CheckKeyBSent: lsls r1, 31 bcc GcMbIntrHandler_Stop @ stop if send failed bmi GameCubeMultiBoot_CheckImageSizeResponse @ branch if receive is complete @@ -482,7 +482,7 @@ GcMbIntrHandler_CheckKeyBSent: @ 82DEF84 .align 2, 0 -GcMbIntrHandler_CheckImageSizeResponse: @ 82DEF90 +GcMbIntrHandler_CheckImageSizeResponse: lsrs r1, 1 @ is receive complete? bcc GcMbIntrHandler_Stop @ branch if not GameCubeMultiBoot_CheckImageSizeResponse: @@ -505,7 +505,7 @@ GcMbIntrHandler_StopIfNotEqual: .align 2, 0 -GcMbIntrHandler_CheckImageResponse: @ 82DEFB4 +GcMbIntrHandler_CheckImageResponse: lsrs r1, 1 @ is receive complete? bcc GcMbIntrHandler_Stop @ branch if not ldr r2, [r0, GCMB_STRUCT_CUR_DEST_PTR] @@ -553,7 +553,7 @@ GcMbIntrHandler_StopIfSendFailed: .align 2, 0 -GcMbIntrHandler_CheckKeyCDerivationSent: @ 82DEFF0 +GcMbIntrHandler_CheckKeyCDerivationSent: lsls r1, 31 bcc GcMbIntrHandler_StopIfSendFailed @ branch if send failed bmi GameCubeMultiBoot_CheckBootKeyResponse @ branch if receive is complete @@ -562,7 +562,7 @@ GcMbIntrHandler_CheckKeyCDerivationSent: @ 82DEFF0 .align 2, 0 -GcMbIntrHandler_CheckBootKeyResponse: @ 82DEFFC +GcMbIntrHandler_CheckBootKeyResponse: lsrs r1, 1 @ is receive complete? bcc GcMbIntrHandler_StopIfSendFailed @ branch if not @@ -580,14 +580,14 @@ GameCubeMultiBoot_CheckBootKeyResponse: .align 2, 0 -GcMbIntrHandler_StopUnconditionally: @ 82DF010 +GcMbIntrHandler_StopUnconditionally: b GcMbIntrHandler_Stop thumb_func_end GameCubeMultiBoot_HandleSerialInterrupt non_word_aligned_thumb_func_start GameCubeMultiBoot_Quit @ void GameCubeMultiBoot_Quit(); -GameCubeMultiBoot_Quit: @ 82DF012 +GameCubeMultiBoot_Quit: ldr r3, pool_InterruptRegs @ Save IME register. diff --git a/src/rom_header.s b/src/rom_header.s index 5ed45124de..9ab7240fba 100644 --- a/src/rom_header.s +++ b/src/rom_header.s @@ -2,7 +2,7 @@ @ It's populated by gbafix using data provided in the Makefile. .global Start -Start: @ 8000000 +Start: b Init .global RomHeaderNintendoLogo @@ -41,23 +41,20 @@ RomHeaderChecksum: RomHeaderReserved2: .space 2 -@ 80000C0 .word 0 .global GPIOPortData -GPIOPortData: @ 80000C4 +GPIOPortData: .2byte 0 .global GPIOPortDirection -GPIOPortDirection: @ 80000C6 +GPIOPortDirection: .2byte 0 .global GPIOPortReadEnable -GPIOPortReadEnable: @ 80000C8 +GPIOPortReadEnable: .2byte 0 -@ 80000CA .2byte 0 -@ 80000CC .space 0x34 From d6a78f386f8151136badb2619e5c87ca0ef2302d Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 16 Jul 2020 10:02:06 -0300 Subject: [PATCH 288/417] Implemented evolution moves Thanks to UltimaSoul and Sagiri/Zeturic --- include/pokemon.h | 1 + src/evolution_scene.c | 4 ++-- src/pokemon.c | 26 ++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index af36217739..1dc3ed461b 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -456,5 +456,6 @@ u16 GetFormSpeciesId(u16 speciesId, u8 formId); u8 GetFormIdFromFormSpeciesId(u16 formSpeciesId); u16 GetFormChangeTargetSpecies(struct Pokemon *mon, u16 method, u32 arg); u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg); +u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove); #endif // GUARD_POKEMON_H diff --git a/src/evolution_scene.c b/src/evolution_scene.c index e5d628140e..a0adb4b465 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -780,7 +780,7 @@ static void Task_EvolutionScene(u8 taskId) case EVOSTATE_TRY_LEARN_MOVE: if (!IsTextPrinterActive(0)) { - var = MonTryLearningNewMove(mon, gTasks[taskId].tLearnsFirstMove); + var = MonTryLearningNewMoveEvolution(mon, gTasks[taskId].tLearnsFirstMove); if (var != MOVE_NONE && !gTasks[taskId].tEvoWasStopped) { u8 text[20]; @@ -1201,7 +1201,7 @@ static void Task_TradeEvolutionScene(u8 taskId) case T_EVOSTATE_TRY_LEARN_MOVE: if (!IsTextPrinterActive(0) && IsFanfareTaskInactive() == TRUE) { - var = MonTryLearningNewMove(mon, gTasks[taskId].tLearnsFirstMove); + var = MonTryLearningNewMoveEvolution(mon, gTasks[taskId].tLearnsFirstMove); if (var != MOVE_NONE && !gTasks[taskId].tEvoWasStopped) { u8 text[20]; diff --git a/src/pokemon.c b/src/pokemon.c index 0a0b837eac..7108c3d235 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8259,3 +8259,29 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg return species != targetSpecies ? targetSpecies : SPECIES_NONE; } + +u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove) +{ + u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); + u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); + + // since you can learn more than one move per level + // the game needs to know whether you decided to + // learn it or keep the old set to avoid asking + // you to learn the same move over and over again + if (firstMove) + { + sLearningMoveTableID = 0; + } + while(gLevelUpLearnsets[species][sLearningMoveTableID].move != LEVEL_UP_END) + { + while (!gLevelUpLearnsets[species][sLearningMoveTableID].level || gLevelUpLearnsets[species][sLearningMoveTableID].level == level) + { + gMoveToLearn = gLevelUpLearnsets[species][sLearningMoveTableID].move; + sLearningMoveTableID++; + return GiveMoveToMon(mon, gMoveToLearn); + } + sLearningMoveTableID++; + } + return 0; +} From 03205c995d4bc08a9eb9b753db4be4f54935fdbb Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 24 Dec 2021 01:59:40 -0300 Subject: [PATCH 289/417] Update battle_script_commands.c --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 391e828502..3c8bbfdee4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4009,7 +4009,7 @@ static void Cmd_playanimation(void) } } -// Same as playanimation, expect it takes a pointer to some animation id, instead of taking the value directly +// Same as playanimation, except it takes a pointer to some animation id, instead of taking the value directly static void Cmd_playanimation_var(void) { const u16* argumentPtr; From 599ca580597c158374fe7a598a876eb5a97f9fa2 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 25 Dec 2021 07:04:19 -0300 Subject: [PATCH 290/417] Update main_menu.c --- src/main_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main_menu.c b/src/main_menu.c index 601e66cb9d..e7802b1e7a 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -104,7 +104,7 @@ * printing, and then wait for A or B to be pressed. * - Then advance to Task_HandleMainMenuBPressed. * - * Task_NewGameBirchSpeechInit + * Task_NewGameBirchSpeech_Init * - Load the sprites for the intro speech, start playing music * Task_NewGameBirchSpeech_WaitToShowBirch * - Spawn Task_NewGameBirchSpeech_FadeInTarget1OutTarget2 From 96012ba06581cb3acaa8a06f367f2e2d924e6ea1 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 26 Dec 2021 12:39:45 -0300 Subject: [PATCH 291/417] Update src/pokemon.c Co-authored-by: Eduardo Quezada D'Ottone --- src/pokemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index 7108c3d235..0c41026395 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8265,10 +8265,10 @@ u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove) u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); - // since you can learn more than one move per level + // Since you can learn more than one move per level, // the game needs to know whether you decided to // learn it or keep the old set to avoid asking - // you to learn the same move over and over again + // you to learn the same move over and over again. if (firstMove) { sLearningMoveTableID = 0; From 86ed53997b351817e45e741c03999f6b9981014b Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 26 Dec 2021 12:39:56 -0300 Subject: [PATCH 292/417] Update src/pokemon.c Co-authored-by: Eduardo Quezada D'Ottone --- src/pokemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index 0c41026395..a176db3116 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8275,7 +8275,7 @@ u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove) } while(gLevelUpLearnsets[species][sLearningMoveTableID].move != LEVEL_UP_END) { - while (!gLevelUpLearnsets[species][sLearningMoveTableID].level || gLevelUpLearnsets[species][sLearningMoveTableID].level == level) + while (gLevelUpLearnsets[species][sLearningMoveTableID].level == 0 || gLevelUpLearnsets[species][sLearningMoveTableID].level == level) { gMoveToLearn = gLevelUpLearnsets[species][sLearningMoveTableID].move; sLearningMoveTableID++; From 3f010d9aa8ea40c6481e4e90120db48c2ec8766c Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 26 Dec 2021 17:11:51 -0300 Subject: [PATCH 293/417] =?UTF-8?q?Tweaked=20GiveBoxMonInitialMoveset=20Ot?= =?UTF-8?q?herwise,=20Pok=C3=A9mon=20would=20be=20generated=20with=20their?= =?UTF-8?q?=20evo=20moves=20learned.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pokemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pokemon.c b/src/pokemon.c index a176db3116..96ea4798bb 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -3940,6 +3940,8 @@ void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon) { if (gLevelUpLearnsets[species][i].level > level) break; + if (gLevelUpLearnsets[species][i].level == 0) + continue; if (GiveMoveToBoxMon(boxMon, gLevelUpLearnsets[species][i].move) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToBoxMon(boxMon, gLevelUpLearnsets[species][i].move); } From ee5e65d9edf859290e0e99c5fecbc941f9258041 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 28 Dec 2021 03:57:44 -0500 Subject: [PATCH 294/417] Rename generic title screen tilemaps --- .../title_screen/{title_screen1.bin => clouds.bin} | Bin .../{title_screen2.bin => pokemon_logo.bin} | Bin .../title_screen/{unk_853EF78.pal => unused.pal} | 0 src/graphics.c | 4 ++-- src/title_screen.c | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename graphics/title_screen/{title_screen1.bin => clouds.bin} (100%) rename graphics/title_screen/{title_screen2.bin => pokemon_logo.bin} (100%) rename graphics/title_screen/{unk_853EF78.pal => unused.pal} (100%) diff --git a/graphics/title_screen/title_screen1.bin b/graphics/title_screen/clouds.bin similarity index 100% rename from graphics/title_screen/title_screen1.bin rename to graphics/title_screen/clouds.bin diff --git a/graphics/title_screen/title_screen2.bin b/graphics/title_screen/pokemon_logo.bin similarity index 100% rename from graphics/title_screen/title_screen2.bin rename to graphics/title_screen/pokemon_logo.bin diff --git a/graphics/title_screen/unk_853EF78.pal b/graphics/title_screen/unused.pal similarity index 100% rename from graphics/title_screen/unk_853EF78.pal rename to graphics/title_screen/unused.pal diff --git a/src/graphics.c b/src/graphics.c index 73825aebf3..26eae14e20 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1505,12 +1505,12 @@ const u16 gMonIconPalettes[][16] = const u16 gTitleScreenBgPalettes[] = INCBIN_U16("graphics/title_screen/pokemon_logo.gbapal", "graphics/title_screen/rayquaza_and_clouds.gbapal"); const u16 gTitleScreenEmeraldVersionPal[] = INCBIN_U16("graphics/title_screen/emerald_version.gbapal"); -const u32 gTitleScreenCloudsTilemap[] = INCBIN_U32("graphics/title_screen/title_screen1.bin.lz"); +const u32 gTitleScreenCloudsTilemap[] = INCBIN_U32("graphics/title_screen/clouds.bin.lz"); const u32 gTitleScreenPokemonLogoGfx[] = INCBIN_U32("graphics/title_screen/pokemon_logo.8bpp.lz"); const u32 gTitleScreenEmeraldVersionGfx[] = INCBIN_U32("graphics/title_screen/emerald_version.8bpp.lz"); const u16 gTitleScreenPressStartPal[] = INCBIN_U16("graphics/title_screen/press_start.gbapal"); const u32 gTitleScreenPressStartGfx[] = INCBIN_U32("graphics/title_screen/press_start.4bpp.lz"); -const u32 gTitleScreenPokemonLogoTilemap[] = INCBIN_U32("graphics/title_screen/title_screen2.bin.lz"); +const u32 gTitleScreenPokemonLogoTilemap[] = INCBIN_U32("graphics/title_screen/pokemon_logo.bin.lz"); // size in LoadPalette calls is reported as 0xD0 << 1, which is 0x1A0, but palette is only 0x100 bytes long so it loads garbage as well const u16 gFrontierPassBg_Pal[][16] = INCBIN_U16("graphics/frontier_pass/bg.gbapal"); diff --git a/src/title_screen.c b/src/title_screen.c index 93e01327c2..d64ee6024f 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -52,7 +52,7 @@ static void SpriteCB_PressStartCopyrightBanner(struct Sprite *sprite); static void SpriteCB_PokemonLogoShine(struct Sprite *sprite); // const rom data -static const u16 sUnusedUnknownPal[] = INCBIN_U16("graphics/title_screen/unk_853EF78.gbapal"); +static const u16 sUnusedUnknownPal[] = INCBIN_U16("graphics/title_screen/unused.gbapal"); static const u32 sTitleScreenRayquazaGfx[] = INCBIN_U32("graphics/title_screen/rayquaza.4bpp.lz"); static const u32 sTitleScreenRayquazaTilemap[] = INCBIN_U32("graphics/title_screen/rayquaza.bin.lz"); From 677da7b5e7540b49850a52340ea20ad079d1f1cd Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 28 Dec 2021 14:48:57 -0300 Subject: [PATCH 295/417] Fixed struct names --- include/reset_rtc_screen.h | 4 ++-- src/pokemon_debug.c | 28 ++++++++++++++-------------- src/reset_rtc_screen.c | 12 ++++++------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/include/reset_rtc_screen.h b/include/reset_rtc_screen.h index f8904063b7..5896164005 100644 --- a/include/reset_rtc_screen.h +++ b/include/reset_rtc_screen.h @@ -1,8 +1,8 @@ #ifndef GUARD_RESET_RTC_SCREEN_H #define GUARD_RESET_RTC_SCREEN_H -extern const struct SpritePalette sSpritePalette_Arrow; -extern const struct SpriteTemplate sSpriteTemplate_Arrow; +extern const struct SpritePalette gSpritePalette_Arrow; +extern const struct SpriteTemplate gSpriteTemplate_Arrow; void CB2_InitResetRtcScreen(void); diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index ef440611c7..d43120e6a5 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -570,9 +570,9 @@ static void SetArrowInvisibility(struct PokemonDebugMenu *data) static void SetUpModifyArrows(struct PokemonDebugMenu *data) { - LoadSpritePalette(&sSpritePalette_Arrow); - data->modifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X, MODIFY_DIGITS_ARROW1_Y, 0); - data->modifyArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X, MODIFY_DIGITS_ARROW2_Y, 0); + LoadSpritePalette(&gSpritePalette_Arrow); + data->modifyArrows.arrowSpriteId[0] = CreateSprite(&gSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X, MODIFY_DIGITS_ARROW1_Y, 0); + data->modifyArrows.arrowSpriteId[1] = CreateSprite(&gSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X, MODIFY_DIGITS_ARROW2_Y, 0); gSprites[data->modifyArrows.arrowSpriteId[1]].animNum = 1; data->modifyArrows.minValue = 1; @@ -588,8 +588,8 @@ static void SetUpModifyArrows(struct PokemonDebugMenu *data) static void SetUpOptionArrows(struct PokemonDebugMenu *data) { - LoadSpritePalette(&sSpritePalette_Arrow); - data->optionArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y, 0); + LoadSpritePalette(&gSpritePalette_Arrow); + data->optionArrows.arrowSpriteId[0] = CreateSprite(&gSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y, 0); gSprites[data->optionArrows.arrowSpriteId[0]].animNum = 2; data->optionArrows.currentDigit = 0; @@ -599,8 +599,8 @@ static void SetUpOptionArrows(struct PokemonDebugMenu *data) static void SetUpYPosModifyArrows(struct PokemonDebugMenu *data) { - LoadSpritePalette(&sSpritePalette_Arrow); - data->yPosModifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y, 0); + LoadSpritePalette(&gSpritePalette_Arrow); + data->yPosModifyArrows.arrowSpriteId[0] = CreateSprite(&gSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y, 0); gSprites[data->yPosModifyArrows.arrowSpriteId[0]].animNum = 2; data->yPosModifyArrows.currentDigit = 0; @@ -1705,19 +1705,19 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data) gSprites[data->iconspriteId].oam.priority = 0; //Modify Arrows - LoadSpritePalette(&sSpritePalette_Arrow); - data->modifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW1_Y, 0); - data->modifyArrows.arrowSpriteId[1] = CreateSprite(&sSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW2_Y, 0); + LoadSpritePalette(&gSpritePalette_Arrow); + data->modifyArrows.arrowSpriteId[0] = CreateSprite(&gSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW1_Y, 0); + data->modifyArrows.arrowSpriteId[1] = CreateSprite(&gSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW2_Y, 0); gSprites[data->modifyArrows.arrowSpriteId[1]].animNum = 1; //Option Arrow - LoadSpritePalette(&sSpritePalette_Arrow); - data->optionArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12, 0); + LoadSpritePalette(&gSpritePalette_Arrow); + data->optionArrows.arrowSpriteId[0] = CreateSprite(&gSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y + data->optionArrows.currentDigit * 12, 0); gSprites[data->optionArrows.arrowSpriteId[0]].animNum = 2; //Y Pos Modify Arrow - LoadSpritePalette(&sSpritePalette_Arrow); - data->yPosModifyArrows.arrowSpriteId[0] = CreateSprite(&sSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y + data->yPosModifyArrows.currentDigit * 12, 0); + LoadSpritePalette(&gSpritePalette_Arrow); + data->yPosModifyArrows.arrowSpriteId[0] = CreateSprite(&gSpriteTemplate_Arrow, OPTIONS_ARROW_1_X, OPTIONS_ARROW_Y + data->yPosModifyArrows.currentDigit * 12, 0); gSprites[data->yPosModifyArrows.arrowSpriteId[0]].animNum = 2; //Arrow invisibility diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c index 34c388969d..e817fdd143 100644 --- a/src/reset_rtc_screen.c +++ b/src/reset_rtc_screen.c @@ -181,7 +181,7 @@ static const struct SpriteFrameImage sPicTable_Arrow[] = obj_frame_tiles(sArrowRight_Gfx) }; -const struct SpritePalette sSpritePalette_Arrow = +const struct SpritePalette gSpritePalette_Arrow = { sArrow_Pal, PALTAG_ARROW }; @@ -217,7 +217,7 @@ static const union AnimCmd *const sAnims_Arrow[] = [ARROW_RIGHT] = sAnim_Arrow_Right, }; -const struct SpriteTemplate sSpriteTemplate_Arrow = +const struct SpriteTemplate gSpriteTemplate_Arrow = { .tileTag = TAG_NONE, .paletteTag = PALTAG_ARROW, @@ -333,14 +333,14 @@ static void CreateCursor(u8 taskId) { u32 spriteId; - LoadSpritePalette(&sSpritePalette_Arrow); + LoadSpritePalette(&gSpritePalette_Arrow); - spriteId = CreateSpriteAtEnd(&sSpriteTemplate_Arrow, 53, 68, 0); + spriteId = CreateSpriteAtEnd(&gSpriteTemplate_Arrow, 53, 68, 0); gSprites[spriteId].callback = SpriteCB_Cursor_UpOrRight; gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].sState = -1; - spriteId = CreateSpriteAtEnd(&sSpriteTemplate_Arrow, 53, 68, 0); + spriteId = CreateSpriteAtEnd(&gSpriteTemplate_Arrow, 53, 68, 0); gSprites[spriteId].callback = SpriteCB_Cursor_Down; gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].sState = -1; @@ -348,7 +348,7 @@ static void CreateCursor(u8 taskId) static void FreeCursorPalette(void) { - FreeSpritePaletteByTag(sSpritePalette_Arrow.tag); + FreeSpritePaletteByTag(gSpritePalette_Arrow.tag); } static void HideChooseTimeWindow(u8 windowId) From 3acf002a9c2187ca228e1c7a8b3862e1bc4ab3ea Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 28 Dec 2021 13:16:31 -0500 Subject: [PATCH 296/417] Rename generic jp contest tilemaps --- .../{unused_tilemap_2.bin => japanese/audience.bin} | Bin graphics/contest/japanese/{tilemap_1.bin => bg.bin} | Bin .../interface.bin} | Bin .../contest/japanese/{tilemap_2.bin => windows.bin} | Bin src/graphics.c | 8 ++++---- 5 files changed, 4 insertions(+), 4 deletions(-) rename graphics/contest/{unused_tilemap_2.bin => japanese/audience.bin} (100%) rename graphics/contest/japanese/{tilemap_1.bin => bg.bin} (100%) rename graphics/contest/{unused_tilemap_1.bin => japanese/interface.bin} (100%) rename graphics/contest/japanese/{tilemap_2.bin => windows.bin} (100%) diff --git a/graphics/contest/unused_tilemap_2.bin b/graphics/contest/japanese/audience.bin similarity index 100% rename from graphics/contest/unused_tilemap_2.bin rename to graphics/contest/japanese/audience.bin diff --git a/graphics/contest/japanese/tilemap_1.bin b/graphics/contest/japanese/bg.bin similarity index 100% rename from graphics/contest/japanese/tilemap_1.bin rename to graphics/contest/japanese/bg.bin diff --git a/graphics/contest/unused_tilemap_1.bin b/graphics/contest/japanese/interface.bin similarity index 100% rename from graphics/contest/unused_tilemap_1.bin rename to graphics/contest/japanese/interface.bin diff --git a/graphics/contest/japanese/tilemap_2.bin b/graphics/contest/japanese/windows.bin similarity index 100% rename from graphics/contest/japanese/tilemap_2.bin rename to graphics/contest/japanese/windows.bin diff --git a/src/graphics.c b/src/graphics.c index 26eae14e20..47b82b6b72 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -435,15 +435,15 @@ const u32 gBattleAnimSpriteGfx_BlueFlames2[] = INCBIN_U32("graphics/battle_anims // Contest const u32 gJPContestGfx1[] = INCBIN_U32("graphics/contest/japanese/composite_1.4bpp.lz"); const u32 gJPContestPal[] = INCBIN_U32("graphics/contest/japanese/palette.gbapal.lz"); -const u32 gJPContestTilemap1[] = INCBIN_U32("graphics/contest/japanese/tilemap_1.bin.lz"); -const u32 gJPContestTilemap2[] = INCBIN_U32("graphics/contest/japanese/tilemap_2.bin.lz"); +const u32 gJPContestBgTilemap[] = INCBIN_U32("graphics/contest/japanese/bg.bin.lz"); +const u32 gJPContestWindowsTilemap[] = INCBIN_U32("graphics/contest/japanese/windows.bin.lz"); const u32 gJPContestGfx2[] = INCBIN_U32("graphics/contest/japanese/composite_2.4bpp.lz"); const u32 gContestInterfaceAudiencePalette[] = INCBIN_U32("graphics/contest/interface_audience.gbapal.lz"); const u32 gContestAudienceTilemap[] = INCBIN_U32("graphics/contest/audience.bin.lz"); const u32 gContestInterfaceTilemap[] = INCBIN_U32("graphics/contest/interface.bin.lz"); -const u32 gContestUnusedTilemap1[] = INCBIN_U32("graphics/contest/unused_tilemap_1.bin.lz"); -const u32 gContestUnusedTilemap2[] = INCBIN_U32("graphics/contest/unused_tilemap_2.bin.lz"); +const u32 gJPContestInterfaceTilemap[] = INCBIN_U32("graphics/contest/japanese/interface.bin.lz"); +const u32 gJPContestAudienceTilemap[] = INCBIN_U32("graphics/contest/japanese/audience.bin.lz"); const u32 gContestCurtainTilemap[] = INCBIN_U32("graphics/contest/curtain.bin.lz"); const u32 gContestInterfaceGfx[] = INCBIN_U32("graphics/contest/interface.4bpp.lz"); From 4fc345fff502e3d8c40c6cbe80e73082f2e35588 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 28 Dec 2021 14:54:09 -0500 Subject: [PATCH 297/417] Rename unused frontier pass tilemap --- graphics/frontier_pass/{unused.bin => card_ball_filled.bin} | 0 src/frontier_pass.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename graphics/frontier_pass/{unused.bin => card_ball_filled.bin} (100%) diff --git a/graphics/frontier_pass/unused.bin b/graphics/frontier_pass/card_ball_filled.bin similarity index 100% rename from graphics/frontier_pass/unused.bin rename to graphics/frontier_pass/card_ball_filled.bin diff --git a/src/frontier_pass.c b/src/frontier_pass.c index 07dd8f2289..b143587415 100644 --- a/src/frontier_pass.c +++ b/src/frontier_pass.c @@ -173,7 +173,7 @@ static const u32 sHeads_Gfx[] = INCBIN_U32("graphics/frontier static const u32 sMapCursor_Gfx[] = INCBIN_U32("graphics/frontier_pass/map_cursor.4bpp.lz"); static const u32 sMapScreen_Tilemap[] = INCBIN_U32("graphics/frontier_pass/map_screen.bin.lz"); static const u32 sMapAndCard_ZoomedOut_Tilemap[] = INCBIN_U32("graphics/frontier_pass/small_map_and_card.bin.lz"); -static const u32 sUnusedData[] = INCBIN_U32("graphics/frontier_pass/unused.bin"); +static const u32 sCardBall_Filled_Tilemap[] = INCBIN_U32("graphics/frontier_pass/card_ball_filled.bin"); // Unused static const u32 sBattleRecord_Tilemap[] = INCBIN_U32("graphics/frontier_pass/record_frame.bin.lz"); static const u32 sMapAndCard_Zooming_Tilemap[] = INCBIN_U32("graphics/frontier_pass/small_map_and_card_affine.bin.lz"); From aba5264260d023686a08f406651256de324cdf4d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 28 Dec 2021 17:46:05 -0500 Subject: [PATCH 298/417] RGB macro use in slot_machine --- graphics/slot_machine/85A8524.bin | Bin 32 -> 0 bytes src/slot_machine.c | 27 +++++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) delete mode 100644 graphics/slot_machine/85A8524.bin diff --git a/graphics/slot_machine/85A8524.bin b/graphics/slot_machine/85A8524.bin deleted file mode 100644 index 0325642780da7235dbab817783c8a807c6ba8c47..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32 ScmZQz`2U}QfkTl22LJ#*?gA(P diff --git a/src/slot_machine.c b/src/slot_machine.c index 6cbcd76fdf..c58de415bc 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -7154,18 +7154,18 @@ static const struct SpriteSheet sSlotMachineSpriteSheets[22] = static const u8 *const sReelBackground_Tilemap = gSlotMachineReelBackground_Tilemap; -static const u16 sUnused[] = +static const u16 sUnusedColors[] = { - 0x6F7B, - 0x6968, - 0x36AB, - 0x7FFF, - 0x5750, - 0x7EC0, - 0x02BA, - 0x02BA, - 0x01FD, - 0x01FD, + RGB(27, 27, 27), + RGB(8, 11, 26), + RGB(11, 21, 13), + RGB(31, 31, 31), + RGB(16, 26, 21), + RGB(0, 22, 31), + RGB(26, 21, 0), + RGB(26, 21, 0), + RGB(29, 15, 0), + RGB(29, 15, 0), }; // The Bet 2 and 3 match line palettes are duplicated unnecessarily @@ -7234,7 +7234,10 @@ static const u16 *const sPokeballShiningPalTable[] = }; static const u16 *const sDigitalDisplay_Pal = gSlotMachineDigitalDisplay_Pal; -static const u16 sUnkPalette[] = INCBIN_U16("graphics/slot_machine/85A8524.bin"); +static const u16 sUnkPalette[16] = { + [1] = RGB_WHITEALPHA, + [3] = RGB(8, 8, 8), +}; static const struct SpritePalette sSlotMachineSpritePalettes[] = { From aadab8b0167f1f74a28d4234509faffd8dca7bc2 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 28 Dec 2021 18:07:41 -0500 Subject: [PATCH 299/417] Move pokemon and easy chat constants to global, misc clean-up --- include/battle_script_commands.h | 1 - include/constants/global.h | 21 +++++++++---------- include/constants/pokemon.h | 6 ++++-- include/easy_chat.h | 1 - include/global.h | 5 ++++- include/menu.h | 1 - include/pokeblock.h | 3 --- include/pokemon.h | 1 - include/save.h | 3 +-- src/apprentice.c | 2 -- src/bard_music.c | 1 - src/battle_anim_smokescreen.c | 1 - src/battle_dome.c | 1 - src/battle_pike.c | 1 - src/battle_tower.c | 1 - .../easy_chat/easy_chat_words_by_letter.h | 1 - src/data/lilycove_lady.h | 1 - src/dewford_trend.c | 1 - src/easy_chat.c | 1 - src/ereader_helpers.c | 1 - src/mail_data.c | 1 - src/mauville_old_man.c | 1 - src/party_menu.c | 1 - src/save.c | 4 ++-- src/trade.c | 1 - src/trainer_hill.c | 1 - 26 files changed, 21 insertions(+), 42 deletions(-) diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h index cb81ad8124..ed90d787f0 100644 --- a/include/battle_script_commands.h +++ b/include/battle_script_commands.h @@ -1,7 +1,6 @@ #ifndef GUARD_BATTLE_SCRIPT_COMMANDS_H #define GUARD_BATTLE_SCRIPT_COMMANDS_H -#include "constants/pokemon.h" #include "constants/battle_script_commands.h" // Arguments for 'flags' in HandleBattleWindow diff --git a/include/constants/global.h b/include/constants/global.h index ef7861e9ed..48b03b5ccb 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -29,11 +29,20 @@ #define GAME_VERSION (VERSION_EMERALD) #define GAME_LANGUAGE (LANGUAGE_ENGLISH) +// party sizes +#define PARTY_SIZE 6 +#define MULTI_PARTY_SIZE (PARTY_SIZE / 2) +#define FRONTIER_PARTY_SIZE 3 +#define FRONTIER_DOUBLES_PARTY_SIZE 4 +#define FRONTIER_MULTI_PARTY_SIZE 2 +#define MAX_FRONTIER_PARTY_SIZE FRONTIER_DOUBLES_PARTY_SIZE +#define UNION_ROOM_PARTY_SIZE 2 + // capacities of various saveblock objects #define DAYCARE_MON_COUNT 2 #define POKEBLOCKS_COUNT 40 #define OBJECT_EVENTS_COUNT 16 -#define MAIL_COUNT 16 +#define MAIL_COUNT (10 + PARTY_SIZE) #define SECRET_BASES_COUNT 20 #define TV_SHOWS_COUNT 25 #define POKE_NEWS_COUNT 16 @@ -70,7 +79,6 @@ #define TRAINER_ID_LENGTH 4 #define MAX_MON_MOVES 4 -#define NUM_STATS 6 #define CONTESTANT_COUNT 4 #define CONTEST_CATEGORY_COOL 0 @@ -80,15 +88,6 @@ #define CONTEST_CATEGORY_TOUGH 4 #define CONTEST_CATEGORIES_COUNT 5 -// party sizes -#define PARTY_SIZE 6 -#define MULTI_PARTY_SIZE (PARTY_SIZE / 2) -#define FRONTIER_PARTY_SIZE 3 -#define FRONTIER_DOUBLES_PARTY_SIZE 4 -#define FRONTIER_MULTI_PARTY_SIZE 2 -#define MAX_FRONTIER_PARTY_SIZE FRONTIER_DOUBLES_PARTY_SIZE -#define UNION_ROOM_PARTY_SIZE 2 - // string lengths #define ITEM_NAME_LENGTH 14 #define POKEMON_NAME_LENGTH 10 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 9fa023cd57..0a74e751eb 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -78,11 +78,13 @@ #define STAT_SPEED 3 #define STAT_SPATK 4 #define STAT_SPDEF 5 +#define NUM_STATS 6 + #define STAT_ACC 6 // Only in battles. #define STAT_EVASION 7 // Only in battles. -#define NUM_NATURE_STATS NUM_STATS - 1 // excludes HP -#define NUM_BATTLE_STATS NUM_STATS + 2 // includes Accuracy and Evasion +#define NUM_NATURE_STATS (NUM_STATS - 1) // excludes HP +#define NUM_BATTLE_STATS (NUM_STATS + 2) // includes Accuracy and Evasion #define MIN_STAT_STAGE 0 #define DEFAULT_STAT_STAGE 6 diff --git a/include/easy_chat.h b/include/easy_chat.h index 4d2bc7c983..c9ef4428f7 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -2,7 +2,6 @@ #define GUARD_EASYCHAT_H #include "main.h" -#include "constants/easy_chat.h" struct EasyChatScreenTemplate { diff --git a/include/global.h b/include/global.h index 024280f986..ca5f509165 100644 --- a/include/global.h +++ b/include/global.h @@ -11,6 +11,8 @@ #include "constants/species.h" #include "constants/berry.h" #include "constants/maps.h" +#include "constants/pokemon.h" +#include "constants/easy_chat.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); @@ -127,6 +129,7 @@ #define DEX_FLAGS_NO ROUND_BITS_TO_BYTES(NUM_SPECIES) #define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT) +#define NUM_ADDITIONAL_PHRASE_BYTES ROUND_BITS_TO_BYTES(NUM_ADDITIONAL_PHRASES) struct Coords8 { @@ -984,7 +987,7 @@ struct SaveBlock1 /*0x2BC8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT]; /*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT]; /*0x2BE0*/ struct Mail mail[MAIL_COUNT]; - /*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system + /*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system /*0x2E28*/ OldMan oldMan; /*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT]; /*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_* diff --git a/include/menu.h b/include/menu.h index 69000d4089..bf3f56aeab 100644 --- a/include/menu.h +++ b/include/menu.h @@ -4,7 +4,6 @@ #include "task.h" #include "text.h" #include "window.h" -#include "constants/pokemon.h" #define MENU_NOTHING_CHOSEN -2 #define MENU_B_PRESSED -1 diff --git a/include/pokeblock.h b/include/pokeblock.h index 9e01614951..24e6ea8569 100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h @@ -1,9 +1,6 @@ #ifndef GUARD_POKEBLOCK_H #define GUARD_POKEBLOCK_H -#include "constants/berry.h" -#include "constants/pokemon.h" - #define TAG_POKEBLOCK 14818 enum diff --git a/include/pokemon.h b/include/pokemon.h index 315416c383..28460bbe64 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -1,7 +1,6 @@ #ifndef GUARD_POKEMON_H #define GUARD_POKEMON_H -#include "constants/pokemon.h" #include "sprite.h" struct PokemonSubstruct0 diff --git a/include/save.h b/include/save.h index be7961136e..89fc9ad33e 100644 --- a/include/save.h +++ b/include/save.h @@ -52,8 +52,7 @@ enum { SAVE_NORMAL, SAVE_LINK, // Link / Battle Frontier - //EREADER_SAVE, // deprecated in Emerald - SAVE_LINK2, // unknown 2nd link save + SAVE_EREADER, // deprecated in Emerald SAVE_HALL_OF_FAME, SAVE_OVERWRITE_DIFFERENT_FILE, SAVE_HALL_OF_FAME_ERASE_BEFORE // unused diff --git a/src/apprentice.c b/src/apprentice.c index 2ab2f0e5a1..591ab79e4d 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -23,9 +23,7 @@ #include "task.h" #include "text.h" #include "constants/battle_frontier.h" -#include "constants/easy_chat.h" #include "constants/items.h" -#include "constants/pokemon.h" #include "constants/songs.h" #include "constants/trainers.h" #include "constants/moves.h" diff --git a/src/bard_music.c b/src/bard_music.c index 114f1cf42f..bdc5ac808a 100644 --- a/src/bard_music.c +++ b/src/bard_music.c @@ -1,6 +1,5 @@ #include "global.h" #include "bard_music.h" -#include "constants/easy_chat.h" #include "easy_chat.h" #include "data/bard_music/bard_sounds.h" diff --git a/src/battle_anim_smokescreen.c b/src/battle_anim_smokescreen.c index 9844f50077..0819796d27 100644 --- a/src/battle_anim_smokescreen.c +++ b/src/battle_anim_smokescreen.c @@ -5,7 +5,6 @@ #include "graphics.h" #include "sprite.h" #include "util.h" -#include "constants/pokemon.h" #include "constants/battle_palace.h" static void SmokescreenImpact_Callback(struct Sprite *); diff --git a/src/battle_dome.c b/src/battle_dome.c index 2936629851..2f77491c9e 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -34,7 +34,6 @@ #include "constants/battle_dome.h" #include "constants/frontier_util.h" #include "constants/moves.h" -#include "constants/pokemon.h" #include "constants/trainers.h" #include "constants/abilities.h" #include "constants/songs.h" diff --git a/src/battle_pike.c b/src/battle_pike.c index d889d7cddf..2b0cf64205 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -17,7 +17,6 @@ #include "constants/battle_frontier.h" #include "constants/frontier_util.h" #include "constants/abilities.h" -#include "constants/easy_chat.h" #include "constants/layouts.h" #include "constants/rgb.h" #include "constants/trainers.h" diff --git a/src/battle_tower.c b/src/battle_tower.c index 7ed15d1e65..d1c95285b3 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -35,7 +35,6 @@ #include "constants/trainers.h" #include "constants/event_objects.h" #include "constants/moves.h" -#include "constants/easy_chat.h" extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_MaxieTrainer[]; extern const u8 MossdeepCity_SpaceCenter_2F_EventScript_TabithaTrainer[]; diff --git a/src/data/easy_chat/easy_chat_words_by_letter.h b/src/data/easy_chat/easy_chat_words_by_letter.h index a56e3184f7..235afbb786 100755 --- a/src/data/easy_chat/easy_chat_words_by_letter.h +++ b/src/data/easy_chat/easy_chat_words_by_letter.h @@ -1,5 +1,4 @@ #include "easy_chat.h" -#include "constants/easy_chat.h" #define DOUBLE_SPECIES_NAME EC_EMPTY_WORD, 2, diff --git a/src/data/lilycove_lady.h b/src/data/lilycove_lady.h index dd0885ff82..4a3a7a7194 100644 --- a/src/data/lilycove_lady.h +++ b/src/data/lilycove_lady.h @@ -1,4 +1,3 @@ -#include "constants/easy_chat.h" #include "constants/event_objects.h" #include "constants/items.h" #include "constants/moves.h" diff --git a/src/dewford_trend.c b/src/dewford_trend.c index bba2085e8b..08dd9afe0b 100644 --- a/src/dewford_trend.c +++ b/src/dewford_trend.c @@ -8,7 +8,6 @@ #include "text.h" #include "tv.h" #include "string_util.h" -#include "constants/easy_chat.h" /* ## Overview ## diff --git a/src/easy_chat.c b/src/easy_chat.c index f9ba44ba79..734fd4f18b 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -27,7 +27,6 @@ #include "task.h" #include "text_window.h" #include "window.h" -#include "constants/easy_chat.h" #include "constants/event_objects.h" #include "constants/lilycove_lady.h" #include "constants/mauville_old_man.h" diff --git a/src/ereader_helpers.c b/src/ereader_helpers.c index 0de87602ee..c3f17f234a 100755 --- a/src/ereader_helpers.c +++ b/src/ereader_helpers.c @@ -10,7 +10,6 @@ #include "task.h" #include "util.h" #include "trainer_hill.h" -#include "constants/easy_chat.h" #include "constants/trainers.h" #include "constants/moves.h" #include "constants/items.h" diff --git a/src/mail_data.c b/src/mail_data.c index ca50a687e7..99cf1f9edd 100644 --- a/src/mail_data.c +++ b/src/mail_data.c @@ -5,7 +5,6 @@ #include "pokemon_icon.h" #include "text.h" #include "international_string_util.h" -#include "constants/easy_chat.h" #define UNOWN_OFFSET 30000 diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 06c3b82886..681a3dadfd 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -1,7 +1,6 @@ #include "global.h" #include "main.h" #include "constants/songs.h" -#include "constants/easy_chat.h" #include "constants/event_objects.h" #include "mauville_old_man.h" #include "event_data.h" diff --git a/src/party_menu.c b/src/party_menu.c index 34aff619fe..36e83a168e 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -65,7 +65,6 @@ #include "window.h" #include "constants/battle.h" #include "constants/battle_frontier.h" -#include "constants/easy_chat.h" #include "constants/field_effects.h" #include "constants/item_effects.h" #include "constants/items.h" diff --git a/src/save.c b/src/save.c index b539564383..dafc20868e 100644 --- a/src/save.c +++ b/src/save.c @@ -428,7 +428,7 @@ static u8 CopySectorSecurityByte(u16 sectorId, const struct SaveSectorLocation * } else { - // Succeded + // Succeeded SetDamagedSectorBits(DISABLE, sector); return SAVE_STATUS_OK; } @@ -734,7 +734,7 @@ u8 HandleSavingData(u8 saveType) WriteSaveSectorOrSlot(FULL_SAVE_SLOT, gRamSaveSectorLocations); break; case SAVE_LINK: - case SAVE_LINK2: + case SAVE_EREADER: // Dummied, now duplicate of SAVE_LINK // Used by link / Battle Frontier // Write only SaveBlocks 1 and 2 (skips the PC) CopyPartyAndObjectsToSave(); diff --git a/src/trade.c b/src/trade.c index 935a89b02f..b48d1abf51 100644 --- a/src/trade.c +++ b/src/trade.c @@ -44,7 +44,6 @@ #include "util.h" #include "window.h" #include "constants/contest.h" -#include "constants/easy_chat.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/region_map_sections.h" diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 04312a2dd1..3ada262e56 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -29,7 +29,6 @@ #include "constants/layouts.h" #include "constants/moves.h" #include "constants/trainers.h" -#include "constants/easy_chat.h" #include "constants/trainer_hill.h" #include "constants/trainer_types.h" From 50522fdea49d327361ba19bbc92c9c879343616d Mon Sep 17 00:00:00 2001 From: sphericalice Date: Thu, 30 Dec 2021 12:21:47 +0000 Subject: [PATCH 300/417] Remove some magic numbers from TryPushBoulder --- src/field_player_avatar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 6cf468b3e0..3c0276a27b 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -735,13 +735,13 @@ static bool8 TryPushBoulder(s16 x, s16 y, u8 direction) { u8 objectEventId = GetObjectEventIdByXY(x, y); - if (objectEventId != 16 && gObjectEvents[objectEventId].graphicsId == OBJ_EVENT_GFX_PUSHABLE_BOULDER) + if (objectEventId != OBJECT_EVENTS_COUNT && gObjectEvents[objectEventId].graphicsId == OBJ_EVENT_GFX_PUSHABLE_BOULDER) { x = gObjectEvents[objectEventId].currentCoords.x; y = gObjectEvents[objectEventId].currentCoords.y; MoveCoords(direction, &x, &y); if (GetCollisionAtCoords(&gObjectEvents[objectEventId], x, y, direction) == COLLISION_NONE - && MetatileBehavior_IsNonAnimDoor(MapGridGetMetatileBehaviorAt(x, y)) == 0) + && MetatileBehavior_IsNonAnimDoor(MapGridGetMetatileBehaviorAt(x, y)) == FALSE) { StartStrengthAnim(objectEventId, direction); return TRUE; From 23f5c9fd5c366d986be66df37cf9b72ba077aa6f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 29 Dec 2021 03:23:58 -0500 Subject: [PATCH 301/417] Clean up pokedex_area_screen --- data/mystery_gift.s | 1 + data/scripts/gift_altering_cave.inc | 2 +- .../{interface => pokedex}/region_map.bin | Bin .../{interface => pokedex}/region_map.pal | 0 .../{interface => pokedex}/region_map.png | Bin .../region_map_affine.bin | Bin .../region_map_affine.png | Bin graphics_file_rules.mk | 5 +- include/constants/maps.h | 6 - include/constants/wild_encounter.h | 11 + include/wild_encounter.h | 5 +- src/data/pokedex_area_glow.h | 314 ++++++++++ src/pokedex_area_region_map.c | 12 +- src/pokedex_area_screen.c | 567 ++++++++---------- src/wild_encounter.c | 21 +- 15 files changed, 609 insertions(+), 335 deletions(-) rename graphics/{interface => pokedex}/region_map.bin (100%) rename graphics/{interface => pokedex}/region_map.pal (100%) rename graphics/{interface => pokedex}/region_map.png (100%) rename graphics/{interface => pokedex}/region_map_affine.bin (100%) rename graphics/{interface => pokedex}/region_map_affine.png (100%) create mode 100644 include/constants/wild_encounter.h create mode 100644 src/data/pokedex_area_glow.h diff --git a/data/mystery_gift.s b/data/mystery_gift.s index df0cbd4ac0..86202b95f7 100644 --- a/data/mystery_gift.s +++ b/data/mystery_gift.s @@ -8,6 +8,7 @@ #include "constants/songs.h" #include "constants/species.h" #include "constants/vars.h" +#include "constants/wild_encounter.h" .include "asm/macros.inc" .include "asm/macros/event.inc" .include "constants/constants.inc" diff --git a/data/scripts/gift_altering_cave.inc b/data/scripts/gift_altering_cave.inc index f86432ce28..65ff87068a 100644 --- a/data/scripts/gift_altering_cave.inc +++ b/data/scripts/gift_altering_cave.inc @@ -1,7 +1,7 @@ MysteryGiftScript_AlteringCave:: setvaddress MysteryGiftScript_AlteringCave addvar VAR_ALTERING_CAVE_WILD_SET, 1 - vgoto_if_ne VAR_ALTERING_CAVE_WILD_SET, 10, MysteryGiftScript_AlteringCave_ + vgoto_if_ne VAR_ALTERING_CAVE_WILD_SET, (NUM_ALTERING_CAVE_TABLES + 1), MysteryGiftScript_AlteringCave_ setvar VAR_ALTERING_CAVE_WILD_SET, 0 MysteryGiftScript_AlteringCave_: lock diff --git a/graphics/interface/region_map.bin b/graphics/pokedex/region_map.bin similarity index 100% rename from graphics/interface/region_map.bin rename to graphics/pokedex/region_map.bin diff --git a/graphics/interface/region_map.pal b/graphics/pokedex/region_map.pal similarity index 100% rename from graphics/interface/region_map.pal rename to graphics/pokedex/region_map.pal diff --git a/graphics/interface/region_map.png b/graphics/pokedex/region_map.png similarity index 100% rename from graphics/interface/region_map.png rename to graphics/pokedex/region_map.png diff --git a/graphics/interface/region_map_affine.bin b/graphics/pokedex/region_map_affine.bin similarity index 100% rename from graphics/interface/region_map_affine.bin rename to graphics/pokedex/region_map_affine.bin diff --git a/graphics/interface/region_map_affine.png b/graphics/pokedex/region_map_affine.png similarity index 100% rename from graphics/interface/region_map_affine.png rename to graphics/pokedex/region_map_affine.png diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index eb36d4255f..7a37c5e4f1 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -18,6 +18,7 @@ WALLPAPERGFXDIR := graphics/pokemon_storage/wallpapers OBJEVENTGFXDIR := graphics/object_events MISCGFXDIR := graphics/misc JPCONTESTGFXDIR := graphics/contest/japanese +POKEDEXGFXDIR := graphics/pokedex types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark contest_types := cool beauty cute smart tough @@ -700,10 +701,10 @@ $(PKNAVGFXDIR)/device_outline.4bpp: %.4bpp: %.png $(PKNAVGFXDIR)/match_call/ui.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 13 -$(INTERFACEGFXDIR)/region_map.8bpp: %.8bpp: %.png +$(POKEDEXGFXDIR)/region_map.8bpp: %.8bpp: %.png $(GFX) $< $@ -num_tiles 232 -$(INTERFACEGFXDIR)/region_map_affine.8bpp: %.8bpp: %.png +$(POKEDEXGFXDIR)/region_map_affine.8bpp: %.8bpp: %.png $(GFX) $< $@ -num_tiles 233 $(MISCGFXDIR)/birch_help.4bpp: $(MISCGFXDIR)/birch_bag.4bpp $(MISCGFXDIR)/birch_grass.4bpp diff --git a/include/constants/maps.h b/include/constants/maps.h index 6524f8c14a..2ad4ea8df5 100644 --- a/include/constants/maps.h +++ b/include/constants/maps.h @@ -9,12 +9,6 @@ #define MAP_GROUP(map) (MAP_##map >> 8) #define MAP_NUM(map) (MAP_##map & 0xFF) -// These groups are used by pokedex_area_screen.c to find wild -// pokemon locations. -#define MAP_GROUP_OVERWORLD_MONS MAP_GROUP(PETALBURG_CITY) -#define MAP_GROUP_SPECIAL_MONS_1 MAP_GROUP(METEOR_FALLS_1F_1R) -#define MAP_GROUP_SPECIAL_MONS_2 MAP_GROUP(SAFARI_ZONE_NORTHWEST) - // IDs for dynamic warps. Both are used in the dest_warp_id field for warp events, but they // are never read in practice. A dest_map of MAP_NONE is used to indicate that a // dynamic warp should be used, at which point the warp id is ignored. It can be passed to diff --git a/include/constants/wild_encounter.h b/include/constants/wild_encounter.h new file mode 100644 index 0000000000..a78cd126f3 --- /dev/null +++ b/include/constants/wild_encounter.h @@ -0,0 +1,11 @@ +#ifndef GUARD_CONSTANTS_WILD_ENCOUNTER_H +#define GUARD_CONSTANTS_WILD_ENCOUNTER_H + +#define LAND_WILD_COUNT 12 +#define WATER_WILD_COUNT 5 +#define ROCK_WILD_COUNT 5 +#define FISH_WILD_COUNT 10 + +#define NUM_ALTERING_CAVE_TABLES 9 + +#endif // GUARD_CONSTANTS_WILD_ENCOUNTER_H diff --git a/include/wild_encounter.h b/include/wild_encounter.h index 09525beff9..8608ec5b16 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -1,10 +1,7 @@ #ifndef GUARD_WILD_ENCOUNTER_H #define GUARD_WILD_ENCOUNTER_H -#define LAND_WILD_COUNT 12 -#define WATER_WILD_COUNT 5 -#define ROCK_WILD_COUNT 5 -#define FISH_WILD_COUNT 10 +#include "constants/wild_encounter.h" struct WildPokemon { diff --git a/src/data/pokedex_area_glow.h b/src/data/pokedex_area_glow.h new file mode 100644 index 0000000000..0da4f1dac7 --- /dev/null +++ b/src/data/pokedex_area_glow.h @@ -0,0 +1,314 @@ +// These tile numbers correspond to the 8x8 tiles in graphics/pokedex/area_glow.png +// Left/Right/Top/Bottom are shortened to L/R/T/B +enum { + GLOW_TILE_EMPTY, + GLOW_TILE_EDGE_R, + GLOW_TILE_EDGE_L, + GLOW_TILE_EDGE_L_R, + GLOW_TILE_EDGE_B, + GLOW_TILE_EDGE_B_R, + GLOW_TILE_EDGE_B_L, + GLOW_TILE_EDGE_B_L_R, + GLOW_TILE_EDGE_T, + GLOW_TILE_EDGE_T_R, + GLOW_TILE_EDGE_T_L, + GLOW_TILE_EDGE_T_L_R, + GLOW_TILE_EDGE_T_B, + GLOW_TILE_EDGE_T_B_R, + GLOW_TILE_EDGE_T_B_L, + GLOW_TILE_EDGE_T_B_L_R, // This tile has a misplaced pixel in the top-left corner + GLOW_TILE_FULL, + GLOW_TILE_CORNER_TL, + GLOW_TILE_CORNER_BL, + GLOW_TILE_CORNER_BL_TL, + GLOW_TILE_CORNER_TR, + GLOW_TILE_CORNER_TR_TL, + GLOW_TILE_CORNER_TR_BL, + GLOW_TILE_CORNER_TR_BL_TL, + GLOW_TILE_CORNER_BR, + GLOW_TILE_CORNER_BR_TL, + GLOW_TILE_CORNER_BR_BL, + GLOW_TILE_CORNER_BR_BL_TL, + GLOW_TILE_CORNER_BR_TR, + GLOW_TILE_CORNER_BR_TR_TL, + GLOW_TILE_CORNER_BR_TR_BL, + GLOW_TILE_CORNER_BR_TR_BL_TL, + GLOW_TILE_EDGE_R_CORNER_TL, + GLOW_TILE_EDGE_R_CORNER_BL, + GLOW_TILE_EDGE_R_CORNER_BL_TL, + GLOW_TILE_EDGE_L_CORNER_TR, + GLOW_TILE_EDGE_L_CORNER_BR, + GLOW_TILE_EDGE_L_CORNER_BR_TR, + GLOW_TILE_EDGE_B_CORNER_TR, + GLOW_TILE_EDGE_B_CORNER_TL, + GLOW_TILE_EDGE_B_CORNER_TL_TR, + GLOW_TILE_EDGE_T_CORNER_BR, + GLOW_TILE_EDGE_T_CORNER_BL, + GLOW_TILE_EDGE_T_CORNER_BL_BR, + GLOW_TILE_EDGE_B_L_CORNER_TR, + GLOW_TILE_EDGE_B_R_CORNER_TL, + GLOW_TILE_EDGE_T_R_CORNER_BL, + GLOW_TILE_EDGE_T_L_CORNER_BR +}; + +// This array converts a set of glow position flags to one of the above tile values. +// Only some parts of this array are actually used, because corner flags that overlap +// with edge flags are cancelled out before lookup. For example, GLOW_CORNER_TL | GLOW_EDGE_L +// will never be read, and has the same value as GLOW_EDGE_L. +static const u8 sAreaGlowTilemapMapping[] = { + [GLOW_EDGE_R] = GLOW_TILE_EDGE_R, + [GLOW_EDGE_L] = GLOW_TILE_EDGE_L, + [GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_EDGE_B] = GLOW_TILE_EDGE_B, + [GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R, + [GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L, + [GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_EDGE_T] = GLOW_TILE_EDGE_T, + [GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R, + [GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L, + [GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_TL] = GLOW_TILE_CORNER_TL, + [GLOW_CORNER_TL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_TL, + [GLOW_CORNER_TL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L, + [GLOW_CORNER_TL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_TL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TL, + [GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R_CORNER_TL, + [GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L, + [GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_TL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T, + [GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R, + [GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L, + [GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BL] = GLOW_TILE_CORNER_BL, + [GLOW_CORNER_BL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_BL, + [GLOW_CORNER_BL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L, + [GLOW_CORNER_BL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B, + [GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R, + [GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L, + [GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BL, + [GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R_CORNER_BL, + [GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L, + [GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BL | GLOW_CORNER_TL] = GLOW_TILE_CORNER_BL_TL, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_BL_TL, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TL, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R_CORNER_TL, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BL, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R_CORNER_BL, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_TR] = GLOW_TILE_CORNER_TR, + [GLOW_CORNER_TR | GLOW_EDGE_R] = GLOW_TILE_EDGE_R, + [GLOW_CORNER_TR | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_TR, + [GLOW_CORNER_TR | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_TR | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TR, + [GLOW_CORNER_TR | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R, + [GLOW_CORNER_TR | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L_CORNER_TR, + [GLOW_CORNER_TR | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_TR | GLOW_EDGE_T] = GLOW_TILE_EDGE_T, + [GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R, + [GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L, + [GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_TL] = GLOW_TILE_CORNER_TR_TL, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_TL, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_TR, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TL_TR, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R_CORNER_TL, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L_CORNER_TR, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL] = GLOW_TILE_CORNER_TR_BL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_BL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_TR, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TR, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L_CORNER_TR, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R_CORNER_BL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL] = GLOW_TILE_CORNER_TR_BL_TL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_BL_TL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_TR, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TL_TR, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R_CORNER_TL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L_CORNER_TR, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R_CORNER_BL, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BR] = GLOW_TILE_CORNER_BR, + [GLOW_CORNER_BR | GLOW_EDGE_R] = GLOW_TILE_EDGE_R, + [GLOW_CORNER_BR | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BR | GLOW_EDGE_B] = GLOW_TILE_EDGE_B, + [GLOW_CORNER_BR | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R, + [GLOW_CORNER_BR | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L, + [GLOW_CORNER_BR | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BR | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BR, + [GLOW_CORNER_BR | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R, + [GLOW_CORNER_BR | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BR | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TL] = GLOW_TILE_CORNER_BR_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R_CORNER_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL] = GLOW_TILE_CORNER_BR_BL, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_BL, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BL_BR, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R_CORNER_BL, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL] = GLOW_TILE_CORNER_BR_BL_TL, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_BL_TL, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TL, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R_CORNER_TL, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BL_BR, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R_CORNER_BL, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR] = GLOW_TILE_CORNER_BR_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_R] = GLOW_TILE_EDGE_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_BR_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L_CORNER_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL] = GLOW_TILE_CORNER_BR_TR_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_BR_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TL_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R_CORNER_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L_CORNER_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL] = GLOW_TILE_CORNER_BR_TR_BL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_BL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_BR_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L_CORNER_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BL_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R_CORNER_BL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL] = GLOW_TILE_CORNER_BR_TR_BL_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_R] = GLOW_TILE_EDGE_R_CORNER_BL_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_L] = GLOW_TILE_EDGE_L_CORNER_BR_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B] = GLOW_TILE_EDGE_B_CORNER_TL_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_R_CORNER_TL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_B_L_CORNER_TR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_B_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T] = GLOW_TILE_EDGE_T_CORNER_BL_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_R_CORNER_BL, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_L_CORNER_BR, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_L_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B] = GLOW_TILE_EDGE_T_B, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_R, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L] = GLOW_TILE_EDGE_T_B_L, + [GLOW_CORNER_BR | GLOW_CORNER_TR | GLOW_CORNER_BL | GLOW_CORNER_TL | GLOW_EDGE_T | GLOW_EDGE_B | GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_T_B_L_R, +}; diff --git a/src/pokedex_area_region_map.c b/src/pokedex_area_region_map.c index 2ec2c5c8d7..4926c019dd 100644 --- a/src/pokedex_area_region_map.c +++ b/src/pokedex_area_region_map.c @@ -8,11 +8,11 @@ static EWRAM_DATA u8 *sPokedexAreaMapBgNum = NULL; -static const u16 sPokedexAreaMap_Pal[] = INCBIN_U16("graphics/interface/region_map.gbapal"); -static const u32 sPokedexAreaMap_Gfx[] = INCBIN_U32("graphics/interface/region_map.8bpp.lz"); -static const u32 sPokedexAreaMap_Tilemap[] = INCBIN_U32("graphics/interface/region_map.bin.lz"); -static const u32 sPokedexAreaMapAffine_Gfx[] = INCBIN_U32("graphics/interface/region_map_affine.8bpp.lz"); -static const u32 sPokedexAreaMapAffine_Tilemap[] = INCBIN_U32("graphics/interface/region_map_affine.bin.lz"); +static const u16 sPokedexAreaMap_Pal[] = INCBIN_U16("graphics/pokedex/region_map.gbapal"); +static const u32 sPokedexAreaMap_Gfx[] = INCBIN_U32("graphics/pokedex/region_map.8bpp.lz"); +static const u32 sPokedexAreaMap_Tilemap[] = INCBIN_U32("graphics/pokedex/region_map.bin.lz"); +static const u32 sPokedexAreaMapAffine_Gfx[] = INCBIN_U32("graphics/pokedex/region_map_affine.8bpp.lz"); +static const u32 sPokedexAreaMapAffine_Tilemap[] = INCBIN_U32("graphics/pokedex/region_map_affine.bin.lz"); void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) { @@ -41,7 +41,7 @@ void LoadPokedexAreaMapGfx(const struct PokedexAreaMapTemplate *template) ChangeBgX(template->bg, 0, BG_COORD_SET); ChangeBgY(template->bg, 0, BG_COORD_SET); SetBgAttribute(template->bg, BG_ATTR_PALETTEMODE, 1); - CpuCopy32(sPokedexAreaMap_Pal, &gPlttBufferUnfaded[0x70], 0x60); + CpuCopy32(sPokedexAreaMap_Pal, &gPlttBufferUnfaded[0x70], sizeof(sPokedexAreaMap_Pal)); *sPokedexAreaMapBgNum = template->bg; } diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 141041f4f1..dde86f1557 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -20,65 +20,84 @@ #include "constants/rgb.h" #include "constants/songs.h" +// There are two types of indicators for the area screen to show where a Pokémon can occur: +// - Area glows, which highlight any of the maps in MAP_GROUP_TOWNS_AND_ROUTES that have the species. +// These are a tilemap with colored rectangular areas that blends in and out. The positions of the +// rectangles is determined by the positions of the matching MAPSEC values on the region map layout. +// - Area markers, which highlight any of the maps in MAP_GROUP_DUNGEONS or MAP_GROUP_SPECIAL_AREA that +// have the species. These are circular sprites that flash twice. The positions of the sprites is +// determined by the data for the corresponding MAPSEC in gRegionMapEntries. + +// Only maps in the following map groups have their encounters considered for the area screen +#define MAP_GROUP_TOWNS_AND_ROUTES MAP_GROUP(PETALBURG_CITY) +#define MAP_GROUP_DUNGEONS MAP_GROUP(METEOR_FALLS_1F_1R) +#define MAP_GROUP_SPECIAL_AREA MAP_GROUP(SAFARI_ZONE_NORTHWEST) + #define AREA_SCREEN_WIDTH 32 #define AREA_SCREEN_HEIGHT 20 -#define GLOW_TILE_FULL 0xFFFF -#define GLOW_TILE_LEFT (1 << 0) -#define GLOW_TILE_RIGHT (1 << 1) -#define GLOW_TILE_TOP (1 << 2) -#define GLOW_TILE_BOTTOM (1 << 3) -#define GLOW_TILE_BOTTOM_RIGHT (1 << 4) -#define GLOW_TILE_TOP_RIGHT (1 << 5) -#define GLOW_TILE_BOTTOM_LEFT (1 << 6) -#define GLOW_TILE_TOP_LEFT (1 << 7) +#define GLOW_FULL 0xFFFF +#define GLOW_EDGE_R (1 << 0) +#define GLOW_EDGE_L (1 << 1) +#define GLOW_EDGE_B (1 << 2) +#define GLOW_EDGE_T (1 << 3) +#define GLOW_CORNER_TL (1 << 4) +#define GLOW_CORNER_BL (1 << 5) +#define GLOW_CORNER_TR (1 << 6) +#define GLOW_CORNER_BR (1 << 7) -struct PokeDexAreaScreenMapIdentity +#define GLOW_PALETTE 10 + +#define TAG_AREA_MARKER 2 +#define TAG_AREA_UNKNOWN 3 + +#define MAX_AREA_HIGHLIGHTS 64 // Maximum number of rectangular route highlights +#define MAX_AREA_MARKERS 32 // Maximum number of circular spot highlights + +struct OverworldArea { u8 mapGroup; u8 mapNum; u16 regionMapSectionId; }; -struct PokeDexAreaScreen +struct { /*0x000*/ void (*callback)(void); // unused /*0x004*/ MainCallback prev; // unused /*0x008*/ MainCallback next; // unused /*0x00C*/ u16 state; // unused /*0x00E*/ u16 species; - /*0x010*/ struct PokeDexAreaScreenMapIdentity overworldAreasWithMons[0x40]; + /*0x010*/ struct OverworldArea overworldAreasWithMons[MAX_AREA_HIGHLIGHTS]; /*0x110*/ u16 numOverworldAreas; /*0x112*/ u16 numSpecialAreas; /*0x114*/ u16 drawAreaGlowState; - /*0x116*/ u16 areaGlowTilemap[0x280]; - /*0x616*/ u16 areaShadeOrMarkerFrameCounter; - /*0x618*/ u16 areaShadeFrameCounter; + /*0x116*/ u16 areaGlowTilemap[AREA_SCREEN_WIDTH * AREA_SCREEN_HEIGHT]; + /*0x616*/ u16 markerTimer; + /*0x618*/ u16 glowTimer; /*0x61A*/ u16 areaShadeBldArgLo; /*0x61C*/ u16 areaShadeBldArgHi; - /*0x61E*/ u8 whichMarkersFlashing; - /*0x61F*/ u8 specialMarkerCycleCounter; - /*0x620*/ u16 specialAreaRegionMapSectionIds[0x20]; - /*0x660*/ struct Sprite *areaMarkerSprites[0x20]; + /*0x61E*/ bool8 showingMarkers; + /*0x61F*/ u8 markerFlashCounter; + /*0x620*/ u16 specialAreaRegionMapSectionIds[MAX_AREA_MARKERS]; + /*0x660*/ struct Sprite *areaMarkerSprites[MAX_AREA_MARKERS]; /*0x6E0*/ u16 numAreaMarkerSprites; - /*0x6E2*/ u16 unk6E2; - /*0x6E4*/ u16 unk6E4; + /*0x6E2*/ u16 alteringCaveCounter; + /*0x6E4*/ u16 alteringCaveId; /*0x6E8*/ u8 *screenSwitchState; /*0x6EC*/ struct RegionMap regionMap; - /*0xF70*/ u8 charBuffer[0x40]; + /*0xF70*/ u8 charBuffer[64]; /*0xFB0*/ struct Sprite * areaUnknownSprites[3]; /*0xFBC*/ u8 areaUnknownGraphicsBuffer[0x600]; -}; - -static EWRAM_DATA struct PokeDexAreaScreen *sPokedexAreaScreen = NULL; +} static EWRAM_DATA *sPokedexAreaScreen = NULL; static void FindMapsWithMon(u16); static void BuildAreaGlowTilemap(void); static void SetAreaHasMon(u16, u16); static void SetSpecialMapHasMon(u16, u16); static u16 GetRegionMapSectionId(u8, u8); -static bool8 MapHasMon(const struct WildPokemonHeader *, u16); -static bool8 MonListHasMon(const struct WildPokemonInfo *, u16, u16); +static bool8 MapHasSpecies(const struct WildPokemonHeader *, u16); +static bool8 MonListHasSpecies(const struct WildPokemonInfo *, u16, u16); static void DoAreaGlow(void); static void Task_ShowPokedexAreaScreen(u8); static void CreateAreaMarkerSprites(void); @@ -86,7 +105,7 @@ static void LoadAreaUnknownGraphics(void); static void CreateAreaUnknownSprites(void); static void Task_HandlePokedexAreaScreenInput(u8); static void ResetPokedexAreaMapBg(void); -static void DestroyAreaMarkerSprites(void); +static void DestroyAreaScreenSprites(void); static const u32 sAreaGlow_Pal[] = INCBIN_U32("graphics/pokedex/area_glow.gbapal"); static const u32 sAreaGlow_Gfx[] = INCBIN_U32("graphics/pokedex/area_glow.4bpp.lz"); @@ -117,115 +136,7 @@ static const u16 sLandmarkData[][2] = {MAPSEC_NONE} }; -// Only some parts of this array are acutally used, because corner flags that overlap -// with edge flags are cancelled out before lookup. For example, GLOW_TILE_BOTTOM_RIGHT | GLOW_TILE_RIGHT -// will never be read. -// -// The rest of the bytes seem to be old data from before the cancellation was implemented. -// Most of them line up as you would expect ([BOTTOM_RIGHT | RIGHT] has the same value as [RIGHT]). -// -// Any unreachable entries are simply listed in order, without the fancy "[FLAGS] = 0xXX" notation. -static const u8 sAreaGlowTilemapMapping[] = { - [0] = 0x00, - [GLOW_TILE_LEFT] = 0x01, - [GLOW_TILE_RIGHT] = 0x02, - [GLOW_TILE_RIGHT | GLOW_TILE_LEFT] = 0x03, - [GLOW_TILE_TOP] = 0x04, - [GLOW_TILE_TOP | GLOW_TILE_LEFT] = 0x05, - [GLOW_TILE_TOP | GLOW_TILE_RIGHT] = 0x06, - [GLOW_TILE_TOP | GLOW_TILE_RIGHT | GLOW_TILE_LEFT] = 0x07, - [GLOW_TILE_BOTTOM] = 0x08, - [GLOW_TILE_BOTTOM | GLOW_TILE_LEFT] = 0x09, - [GLOW_TILE_BOTTOM | GLOW_TILE_RIGHT] = 0x0a, - [GLOW_TILE_BOTTOM | GLOW_TILE_RIGHT | GLOW_TILE_LEFT] = 0x0b, - [GLOW_TILE_BOTTOM | GLOW_TILE_TOP] = 0x0c, - [GLOW_TILE_BOTTOM | GLOW_TILE_TOP | GLOW_TILE_LEFT] = 0x0d, - [GLOW_TILE_BOTTOM | GLOW_TILE_TOP | GLOW_TILE_RIGHT] = 0x0e, - [GLOW_TILE_BOTTOM | GLOW_TILE_TOP | GLOW_TILE_RIGHT | GLOW_TILE_LEFT] = 0x0f, - [GLOW_TILE_BOTTOM_RIGHT] = 0x11, - [GLOW_TILE_BOTTOM_RIGHT | GLOW_TILE_LEFT] = 0x20, - 0x02, 0x03, - [GLOW_TILE_BOTTOM_RIGHT | GLOW_TILE_TOP] = 0x27, - [GLOW_TILE_BOTTOM_RIGHT | GLOW_TILE_TOP | GLOW_TILE_LEFT] = 0x2d, - 0x06, 0x07, 0x08, 0x09, 0x0a, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_TOP_RIGHT] = 0x12, - [GLOW_TILE_TOP_RIGHT | GLOW_TILE_LEFT] = 0x21, - 0x02, 0x03, 0x04, 0x05, 0x06, - 0x07, - [GLOW_TILE_TOP_RIGHT | GLOW_TILE_BOTTOM] = 0x2a, - [GLOW_TILE_TOP_RIGHT | GLOW_TILE_BOTTOM | GLOW_TILE_LEFT] = 0x2e, - 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, - 0x0f, - [GLOW_TILE_TOP_RIGHT | GLOW_TILE_BOTTOM_RIGHT] = 0x13, - [GLOW_TILE_TOP_RIGHT | GLOW_TILE_BOTTOM_RIGHT | GLOW_TILE_LEFT] = 0x22, - 0x02, 0x03, 0x27, 0x2d, 0x06, - 0x07, 0x2a, 0x2e, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_BOTTOM_LEFT] = 0x14, - 0x01, - [GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_RIGHT] = 0x23, - 0x03, - [GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_TOP] = 0x26, - 0x05, - [GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_TOP | GLOW_TILE_RIGHT] = 0x2c, - 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_BOTTOM_RIGHT] = 0x15, - 0x20, 0x23, 0x03, - [GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_BOTTOM_RIGHT | GLOW_TILE_TOP] = 0x28, - 0x2d, 0x2c, 0x07, 0x08, 0x09, - 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, - 0x0f, - [GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_TOP_RIGHT] = 0x16, - 0x21, 0x23, 0x03, 0x26, 0x05, - 0x2c, 0x07, 0x2a, 0x2e, 0x0a, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_TOP_RIGHT | GLOW_TILE_BOTTOM_RIGHT] = 0x17, - 0x22, 0x23, 0x03, 0x28, 0x2d, - 0x2c, 0x07, 0x2a, 0x2e, 0x0a, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_TOP_LEFT] = 0x18, - 0x01, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_RIGHT] = 0x24, - 0x03, 0x04, 0x05, 0x06, 0x07, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_BOTTOM] = 0x29, - 0x09, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_BOTTOM | GLOW_TILE_RIGHT] = 0x2f, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_BOTTOM_RIGHT] = 0x19, - 0x20, 0x24, 0x03, 0x27, 0x2d, - 0x06, 0x07, 0x29, 0x09, 0x2f, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_TOP_RIGHT] = 0x1a, - 0x21, 0x24, 0x03, 0x04, 0x05, - 0x06, 0x07, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_TOP_RIGHT | GLOW_TILE_BOTTOM] = 0x2b, - 0x2e, 0x2f, 0x0b, 0x0c, 0x0d, - 0x0e, 0x0f, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_TOP_RIGHT | GLOW_TILE_BOTTOM_RIGHT] = 0x1b, - 0x22, 0x24, 0x03, 0x27, 0x2d, - 0x06, 0x07, 0x2b, 0x2e, 0x2f, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_BOTTOM_LEFT] = 0x1c, - 0x01, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_RIGHT] = 0x25, - 0x03, 0x26, 0x05, 0x2c, 0x07, - 0x29, 0x09, 0x2f, 0x0b, 0x0c, - 0x0d, 0x0e, 0x0f, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_BOTTOM_RIGHT] = 0x1d, - 0x20, 0x25, 0x03, 0x28, 0x2d, - 0x2c, 0x07, 0x29, 0x09, 0x2f, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_TOP_RIGHT] = 0x1e, - 0x21, 0x25, 0x03, 0x26, 0x05, - 0x2c, 0x07, 0x2b, 0x2e, 0x2f, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - [GLOW_TILE_TOP_LEFT | GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_TOP_RIGHT | GLOW_TILE_BOTTOM_RIGHT] = 0x1f, - 0x22, 0x25, 0x03, 0x28, 0x2d, - 0x2c, 0x07, 0x2b, 0x2e, 0x2f, - 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -}; +#include "data/pokedex_area_glow.h" static const struct PokedexAreaMapTemplate sPokedexAreaMapTemplate = { @@ -238,13 +149,13 @@ static const struct PokedexAreaMapTemplate sPokedexAreaMapTemplate = static const u8 sAreaMarkerTiles[]; static const struct SpriteSheet sAreaMarkerSpriteSheet = { - sAreaMarkerTiles, 0x80, 2 + .data = sAreaMarkerTiles, .size = 0x80, .tag = TAG_AREA_MARKER }; static const u16 sAreaMarkerPalette[]; static const struct SpritePalette sAreaMarkerSpritePalette = { - sAreaMarkerPalette, 2 + .data = sAreaMarkerPalette, .tag = TAG_AREA_MARKER }; static const struct OamData sAreaMarkerOamData = @@ -256,13 +167,13 @@ static const struct OamData sAreaMarkerOamData = static const struct SpriteTemplate sAreaMarkerSpriteTemplate = { - 2, - 2, - &sAreaMarkerOamData, - gDummySpriteAnimTable, - NULL, - gDummySpriteAffineAnimTable, - SpriteCallbackDummy + .tileTag = TAG_AREA_MARKER, + .paletteTag = TAG_AREA_MARKER, + .oam = &sAreaMarkerOamData, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy }; static const u16 sAreaMarkerPalette[] = INCBIN_U16("graphics/pokedex/area_marker.gbapal"); @@ -270,7 +181,7 @@ static const u8 sAreaMarkerTiles[] = INCBIN_U8("graphics/pokedex/area_marker.4bp static const struct SpritePalette sAreaUnknownSpritePalette = { - gPokedexAreaScreenAreaUnknown_Pal, 3 + .data = gPokedexAreaScreenAreaUnknown_Pal, .tag = TAG_AREA_UNKNOWN }; static const struct OamData sAreaUnknownOamData = @@ -282,13 +193,13 @@ static const struct OamData sAreaUnknownOamData = static const struct SpriteTemplate sAreaUnknownSpriteTemplate = { - 3, - 3, - &sAreaUnknownOamData, - gDummySpriteAnimTable, - NULL, - gDummySpriteAffineAnimTable, - SpriteCallbackDummy + .tileTag = TAG_AREA_UNKNOWN, + .paletteTag = TAG_AREA_UNKNOWN, + .oam = &sAreaUnknownOamData, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy }; static void ResetDrawAreaGlowState(void) @@ -308,17 +219,17 @@ static bool8 DrawAreaGlow(void) break; case 2: DecompressAndCopyTileDataToVram(2, sAreaGlow_Gfx, 0, 0, 0); - LoadBgTilemap(2, sPokedexAreaScreen->areaGlowTilemap, 0x500, 0); + LoadBgTilemap(2, sPokedexAreaScreen->areaGlowTilemap, sizeof(sPokedexAreaScreen->areaGlowTilemap), 0); break; case 3: if (!FreeTempTileDataBuffersIfPossible()) { - CpuCopy32(sAreaGlow_Pal, gPlttBufferUnfaded + 0xA0, 0x20); + CpuCopy32(sAreaGlow_Pal, &gPlttBufferUnfaded[GLOW_PALETTE * 16], sizeof(sAreaGlow_Pal)); sPokedexAreaScreen->drawAreaGlowState++; } return TRUE; case 4: - ChangeBgY(2, -0x800, BG_COORD_SET); + ChangeBgY(2, -BG_SCREEN_SIZE, BG_COORD_SET); break; default: return FALSE; @@ -333,58 +244,67 @@ static void FindMapsWithMon(u16 species) u16 i; struct Roamer *roamer; - sPokedexAreaScreen->unk6E2 = 0; - sPokedexAreaScreen->unk6E4 = VarGet(VAR_ALTERING_CAVE_WILD_SET); - if (sPokedexAreaScreen->unk6E4 > 8) - sPokedexAreaScreen->unk6E4 = 0; + sPokedexAreaScreen->alteringCaveCounter = 0; + sPokedexAreaScreen->alteringCaveId = VarGet(VAR_ALTERING_CAVE_WILD_SET); + if (sPokedexAreaScreen->alteringCaveId >= NUM_ALTERING_CAVE_TABLES) + sPokedexAreaScreen->alteringCaveId = 0; roamer = &gSaveBlock1Ptr->roamer; if (species != roamer->species) { sPokedexAreaScreen->numOverworldAreas = 0; sPokedexAreaScreen->numSpecialAreas = 0; + + // Check if this species should be hidden from the area map. + // This only applies to Wynaut, to hide the encounters on Mirage Island. for (i = 0; i < ARRAY_COUNT(sSpeciesHiddenFromAreaScreen); i++) { if (sSpeciesHiddenFromAreaScreen[i] == species) return; } + // Add Pokémon with special encounter circumstances (i.e. not listed + // in the regular wild encounter table) to the area map. + // This only applies to Feebas on Route 119, but it was clearly set + // up to allow handling others. for (i = 0; sFeebasData[i][0] != NUM_SPECIES; i++) { if (species == sFeebasData[i][0]) { switch (sFeebasData[i][1]) { - case MAP_GROUP_OVERWORLD_MONS: - SetAreaHasMon(sFeebasData[i][1], sFeebasData[i][2]); - break; - case MAP_GROUP_SPECIAL_MONS_1: - case MAP_GROUP_SPECIAL_MONS_2: - SetSpecialMapHasMon(sFeebasData[i][1], sFeebasData[i][2]); - break; + case MAP_GROUP_TOWNS_AND_ROUTES: + SetAreaHasMon(sFeebasData[i][1], sFeebasData[i][2]); + break; + case MAP_GROUP_DUNGEONS: + case MAP_GROUP_SPECIAL_AREA: + SetSpecialMapHasMon(sFeebasData[i][1], sFeebasData[i][2]); + break; } } } + // Add regular species to the area map for (i = 0; gWildMonHeaders[i].mapGroup != MAP_GROUP(UNDEFINED); i++) { - if (MapHasMon(&gWildMonHeaders[i], species)) + if (MapHasSpecies(&gWildMonHeaders[i], species)) { switch (gWildMonHeaders[i].mapGroup) { - case MAP_GROUP_OVERWORLD_MONS: - SetAreaHasMon(gWildMonHeaders[i].mapGroup, gWildMonHeaders[i].mapNum); - break; - case MAP_GROUP_SPECIAL_MONS_1: - case MAP_GROUP_SPECIAL_MONS_2: - SetSpecialMapHasMon(gWildMonHeaders[i].mapGroup, gWildMonHeaders[i].mapNum); - break; + case MAP_GROUP_TOWNS_AND_ROUTES: + SetAreaHasMon(gWildMonHeaders[i].mapGroup, gWildMonHeaders[i].mapNum); + break; + case MAP_GROUP_DUNGEONS: + case MAP_GROUP_SPECIAL_AREA: + SetSpecialMapHasMon(gWildMonHeaders[i].mapGroup, gWildMonHeaders[i].mapNum); + break; } } } } else { + // This is the roamer's species, show where the roamer is currently sPokedexAreaScreen->numSpecialAreas = 0; if (roamer->active) { @@ -401,7 +321,7 @@ static void FindMapsWithMon(u16 species) static void SetAreaHasMon(u16 mapGroup, u16 mapNum) { - if (sPokedexAreaScreen->numOverworldAreas < 0x40) + if (sPokedexAreaScreen->numOverworldAreas < MAX_AREA_HIGHLIGHTS) { sPokedexAreaScreen->overworldAreasWithMons[sPokedexAreaScreen->numOverworldAreas].mapGroup = mapGroup; sPokedexAreaScreen->overworldAreasWithMons[sPokedexAreaScreen->numOverworldAreas].mapNum = mapNum; @@ -414,23 +334,26 @@ static void SetSpecialMapHasMon(u16 mapGroup, u16 mapNum) { int i; - if (sPokedexAreaScreen->numSpecialAreas < 0x20) + if (sPokedexAreaScreen->numSpecialAreas < MAX_AREA_MARKERS) { u16 regionMapSectionId = GetRegionMapSectionId(mapGroup, mapNum); if (regionMapSectionId < MAPSEC_NONE) { + // Don't highlight the area if it's a moving area (Marine/Terra Cave) for (i = 0; i < ARRAY_COUNT(sMovingRegionMapSections); i++) { if (regionMapSectionId == sMovingRegionMapSections[i]) return; } + // Don't highlight the area if it's an undiscovered landmark (e.g. Sky Pillar) for (i = 0; sLandmarkData[i][0] != MAPSEC_NONE; i++) { if (regionMapSectionId == sLandmarkData[i][0] && !FlagGet(sLandmarkData[i][1])) return; } + // Check if this special area is already being tracked for (i = 0; i < sPokedexAreaScreen->numSpecialAreas; i++) { if (sPokedexAreaScreen->specialAreaRegionMapSectionIds[i] == regionMapSectionId) @@ -439,6 +362,7 @@ static void SetSpecialMapHasMon(u16 mapGroup, u16 mapNum) if (i == sPokedexAreaScreen->numSpecialAreas) { + // New special area sPokedexAreaScreen->specialAreaRegionMapSectionIds[i] = regionMapSectionId; sPokedexAreaScreen->numSpecialAreas++; } @@ -451,27 +375,34 @@ static u16 GetRegionMapSectionId(u8 mapGroup, u8 mapNum) return Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum)->regionMapSectionId; } -static bool8 MapHasMon(const struct WildPokemonHeader *info, u16 species) +static bool8 MapHasSpecies(const struct WildPokemonHeader *info, u16 species) { + // If this is a header for Altering Cave, skip it if it's not the current Altering Cave encounter set if (GetRegionMapSectionId(info->mapGroup, info->mapNum) == MAPSEC_ALTERING_CAVE) { - sPokedexAreaScreen->unk6E2++; - if (sPokedexAreaScreen->unk6E2 != sPokedexAreaScreen->unk6E4 + 1) + sPokedexAreaScreen->alteringCaveCounter++; + if (sPokedexAreaScreen->alteringCaveCounter != sPokedexAreaScreen->alteringCaveId + 1) return FALSE; } - if (MonListHasMon(info->landMonsInfo, species, 12)) + if (MonListHasSpecies(info->landMonsInfo, species, LAND_WILD_COUNT)) return TRUE; - if (MonListHasMon(info->waterMonsInfo, species, 5)) + if (MonListHasSpecies(info->waterMonsInfo, species, WATER_WILD_COUNT)) return TRUE; - if (MonListHasMon(info->fishingMonsInfo, species, 12)) +// When searching the fishing encounters, this incorrectly uses the size of the land encounters. +// As a result it's reading out of bounds of the fishing encounters tables. +#ifdef BUGFIX + if (MonListHasSpecies(info->fishingMonsInfo, species, FISH_WILD_COUNT)) +#else + if (MonListHasSpecies(info->fishingMonsInfo, species, LAND_WILD_COUNT)) +#endif return TRUE; - if (MonListHasMon(info->rockSmashMonsInfo, species, 5)) + if (MonListHasSpecies(info->rockSmashMonsInfo, species, ROCK_WILD_COUNT)) return TRUE; return FALSE; } -static bool8 MonListHasMon(const struct WildPokemonInfo *info, u16 species, u16 size) +static bool8 MonListHasSpecies(const struct WildPokemonInfo *info, u16 species, u16 size) { u16 i; if (info != NULL) @@ -489,9 +420,12 @@ static void BuildAreaGlowTilemap(void) { u16 i, y, x, j; + // Reset tilemap for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaGlowTilemap); i++) sPokedexAreaScreen->areaGlowTilemap[i] = 0; + // For each area with this species, scan the region map layout and find any locations that have a matching mapsec. + // Add a "full glow" indicator for these matching spaces. for (i = 0; i < sPokedexAreaScreen->numOverworldAreas; i++) { j = 0; @@ -500,69 +434,73 @@ static void BuildAreaGlowTilemap(void) for (x = 0; x < AREA_SCREEN_WIDTH; x++) { if (GetRegionMapSecIdAt(x, y) == sPokedexAreaScreen->overworldAreasWithMons[i].regionMapSectionId) - sPokedexAreaScreen->areaGlowTilemap[j] = GLOW_TILE_FULL; - + sPokedexAreaScreen->areaGlowTilemap[j] = GLOW_FULL; j++; } } } + // Scan the tilemap. For every "full glow" indicator added above, fill in its edges and corners. j = 0; for (y = 0; y < AREA_SCREEN_HEIGHT; y++) { for (x = 0; x < AREA_SCREEN_WIDTH; x++) { - if (sPokedexAreaScreen->areaGlowTilemap[j] == GLOW_TILE_FULL) + if (sPokedexAreaScreen->areaGlowTilemap[j] == GLOW_FULL) { - // The "tile != GLOW_TILE_FULL" check is pointless in all of these conditionals, + // The "tile != GLOW_FULL" check is pointless in all of these conditionals, // since there's no harm in OR'ing 0xFFFF with anything else. // Edges - if (x != 0 && sPokedexAreaScreen->areaGlowTilemap[j - 1] != GLOW_TILE_FULL) - sPokedexAreaScreen->areaGlowTilemap[j - 1] |= GLOW_TILE_RIGHT; - if (x != AREA_SCREEN_WIDTH - 1 && sPokedexAreaScreen->areaGlowTilemap[j + 1] != GLOW_TILE_FULL) - sPokedexAreaScreen->areaGlowTilemap[j + 1] |= GLOW_TILE_LEFT; - if (y != 0 && sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH] != GLOW_TILE_FULL) - sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH] |= GLOW_TILE_BOTTOM; - if (y != AREA_SCREEN_HEIGHT - 1 && sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH] != GLOW_TILE_FULL) - sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH] |= GLOW_TILE_TOP; + if (x != 0 && sPokedexAreaScreen->areaGlowTilemap[j - 1] != GLOW_FULL) + sPokedexAreaScreen->areaGlowTilemap[j - 1] |= GLOW_EDGE_L; + if (x != AREA_SCREEN_WIDTH - 1 && sPokedexAreaScreen->areaGlowTilemap[j + 1] != GLOW_FULL) + sPokedexAreaScreen->areaGlowTilemap[j + 1] |= GLOW_EDGE_R; + if (y != 0 && sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH] != GLOW_FULL) + sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH] |= GLOW_EDGE_T; + if (y != AREA_SCREEN_HEIGHT - 1 && sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH] != GLOW_FULL) + sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH] |= GLOW_EDGE_B; - // Diagonals - if (x != 0 && y != 0 && sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH - 1] != GLOW_TILE_FULL) - sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH - 1] |= GLOW_TILE_BOTTOM_RIGHT; - if (x != AREA_SCREEN_WIDTH - 1 && y != 0 && sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH + 1] != GLOW_TILE_FULL) - sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH + 1] |= GLOW_TILE_BOTTOM_LEFT; - if (x != 0 && y != AREA_SCREEN_HEIGHT - 1 && sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH - 1] != GLOW_TILE_FULL) - sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH - 1] |= GLOW_TILE_TOP_RIGHT; - if (x != AREA_SCREEN_WIDTH - 1 && y != AREA_SCREEN_HEIGHT - 1 && sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH + 1] != GLOW_TILE_FULL) - sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH + 1] |= GLOW_TILE_TOP_LEFT; + // Corners + if (x != 0 && y != 0 && sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH - 1] != GLOW_FULL) + sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH - 1] |= GLOW_CORNER_TL; + if (x != AREA_SCREEN_WIDTH - 1 && y != 0 && sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH + 1] != GLOW_FULL) + sPokedexAreaScreen->areaGlowTilemap[j - AREA_SCREEN_WIDTH + 1] |= GLOW_CORNER_TR; + if (x != 0 && y != AREA_SCREEN_HEIGHT - 1 && sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH - 1] != GLOW_FULL) + sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH - 1] |= GLOW_CORNER_BL; + if (x != AREA_SCREEN_WIDTH - 1 && y != AREA_SCREEN_HEIGHT - 1 && sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH + 1] != GLOW_FULL) + sPokedexAreaScreen->areaGlowTilemap[j + AREA_SCREEN_WIDTH + 1] |= GLOW_CORNER_BR; } j++; } } + // Scan the tilemap again. Replace the "full tile" indicators with the actual tile id, + // and remove corner flags when they're overlapped by an edge. for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaGlowTilemap); i++) { - if (sPokedexAreaScreen->areaGlowTilemap[i] == GLOW_TILE_FULL) + if (sPokedexAreaScreen->areaGlowTilemap[i] == GLOW_FULL) { - sPokedexAreaScreen->areaGlowTilemap[i] = 0x10; - sPokedexAreaScreen->areaGlowTilemap[i] |= 0xA000; + sPokedexAreaScreen->areaGlowTilemap[i] = GLOW_TILE_FULL; + sPokedexAreaScreen->areaGlowTilemap[i] |= (GLOW_PALETTE << 12); } else if (sPokedexAreaScreen->areaGlowTilemap[i]) { - // Get rid of overlapping flags - if (sPokedexAreaScreen->areaGlowTilemap[i] & GLOW_TILE_RIGHT) - sPokedexAreaScreen->areaGlowTilemap[i] &= ~(GLOW_TILE_BOTTOM_RIGHT | GLOW_TILE_TOP_RIGHT); - if (sPokedexAreaScreen->areaGlowTilemap[i] & GLOW_TILE_LEFT) - sPokedexAreaScreen->areaGlowTilemap[i] &= ~(GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_TOP_LEFT); - if (sPokedexAreaScreen->areaGlowTilemap[i] & GLOW_TILE_BOTTOM) - sPokedexAreaScreen->areaGlowTilemap[i] &= ~(GLOW_TILE_BOTTOM_LEFT | GLOW_TILE_BOTTOM_RIGHT); - if (sPokedexAreaScreen->areaGlowTilemap[i] & GLOW_TILE_TOP) - sPokedexAreaScreen->areaGlowTilemap[i] &= ~(GLOW_TILE_TOP_LEFT | GLOW_TILE_TOP_RIGHT); + // Get rid of overlapping flags. + // This is pointless, as sAreaGlowTilemapMapping can handle overlaps. + if (sPokedexAreaScreen->areaGlowTilemap[i] & GLOW_EDGE_L) + sPokedexAreaScreen->areaGlowTilemap[i] &= ~(GLOW_CORNER_TL | GLOW_CORNER_BL); + if (sPokedexAreaScreen->areaGlowTilemap[i] & GLOW_EDGE_R) + sPokedexAreaScreen->areaGlowTilemap[i] &= ~(GLOW_CORNER_TR | GLOW_CORNER_BR); + if (sPokedexAreaScreen->areaGlowTilemap[i] & GLOW_EDGE_T) + sPokedexAreaScreen->areaGlowTilemap[i] &= ~(GLOW_CORNER_TR | GLOW_CORNER_TL); + if (sPokedexAreaScreen->areaGlowTilemap[i] & GLOW_EDGE_B) + sPokedexAreaScreen->areaGlowTilemap[i] &= ~(GLOW_CORNER_BR | GLOW_CORNER_BL); + // Assign tile id sPokedexAreaScreen->areaGlowTilemap[i] = sAreaGlowTilemapMapping[sPokedexAreaScreen->areaGlowTilemap[i]]; - sPokedexAreaScreen->areaGlowTilemap[i] |= 0xA000; + sPokedexAreaScreen->areaGlowTilemap[i] |= (GLOW_PALETTE << 12); } } } @@ -570,15 +508,15 @@ static void BuildAreaGlowTilemap(void) static void StartAreaGlow(void) { if (sPokedexAreaScreen->numSpecialAreas && sPokedexAreaScreen->numOverworldAreas == 0) - sPokedexAreaScreen->whichMarkersFlashing = 1; + sPokedexAreaScreen->showingMarkers = TRUE; else - sPokedexAreaScreen->whichMarkersFlashing = 0; + sPokedexAreaScreen->showingMarkers = FALSE; - sPokedexAreaScreen->areaShadeOrMarkerFrameCounter = 0; - sPokedexAreaScreen->areaShadeFrameCounter = 0; + sPokedexAreaScreen->markerTimer = 0; + sPokedexAreaScreen->glowTimer = 0; sPokedexAreaScreen->areaShadeBldArgLo = 0; - sPokedexAreaScreen->areaShadeBldArgHi = 0x40; - sPokedexAreaScreen->specialMarkerCycleCounter = 1; + sPokedexAreaScreen->areaShadeBldArgHi = 64; + sPokedexAreaScreen->markerFlashCounter = 1; SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG2 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); DoAreaGlow(); @@ -589,12 +527,13 @@ static void DoAreaGlow(void) u16 x, y; u16 i; - if (sPokedexAreaScreen->whichMarkersFlashing == 0) + if (!sPokedexAreaScreen->showingMarkers) { - if (sPokedexAreaScreen->areaShadeOrMarkerFrameCounter == 0) + // Showing area glow + if (sPokedexAreaScreen->markerTimer == 0) { - sPokedexAreaScreen->areaShadeFrameCounter++; - if (sPokedexAreaScreen->areaShadeFrameCounter & 1) + sPokedexAreaScreen->glowTimer++; + if (sPokedexAreaScreen->glowTimer & 1) sPokedexAreaScreen->areaShadeBldArgLo = (sPokedexAreaScreen->areaShadeBldArgLo + 4) & 0x7f; else sPokedexAreaScreen->areaShadeBldArgHi = (sPokedexAreaScreen->areaShadeBldArgHi + 4) & 0x7f; @@ -602,32 +541,38 @@ static void DoAreaGlow(void) x = gSineTable[sPokedexAreaScreen->areaShadeBldArgLo] >> 4; y = gSineTable[sPokedexAreaScreen->areaShadeBldArgHi] >> 4; SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(x, y)); - sPokedexAreaScreen->areaShadeOrMarkerFrameCounter = 0; - if (sPokedexAreaScreen->areaShadeFrameCounter == 0x40) + sPokedexAreaScreen->markerTimer = 0; + if (sPokedexAreaScreen->glowTimer == 64) { - sPokedexAreaScreen->areaShadeFrameCounter = 0; + // Done glowing, reset and try to switch to the special area markers + sPokedexAreaScreen->glowTimer = 0; if (sPokedexAreaScreen->numSpecialAreas != 0) - sPokedexAreaScreen->whichMarkersFlashing = 1; + sPokedexAreaScreen->showingMarkers = TRUE; } } else - sPokedexAreaScreen->areaShadeOrMarkerFrameCounter--; + sPokedexAreaScreen->markerTimer--; } else { - sPokedexAreaScreen->areaShadeOrMarkerFrameCounter++; - if (sPokedexAreaScreen->areaShadeOrMarkerFrameCounter > 12) + // Showing special area markers + sPokedexAreaScreen->markerTimer++; + if (sPokedexAreaScreen->markerTimer > 12) { - sPokedexAreaScreen->areaShadeOrMarkerFrameCounter = 0; - sPokedexAreaScreen->specialMarkerCycleCounter++; + sPokedexAreaScreen->markerTimer = 0; + + // Flash the marker + // With a max of 4, the marker will disappear twice + sPokedexAreaScreen->markerFlashCounter++; for (i = 0; i < sPokedexAreaScreen->numSpecialAreas; i++) - sPokedexAreaScreen->areaMarkerSprites[i]->invisible = sPokedexAreaScreen->specialMarkerCycleCounter & 1; + sPokedexAreaScreen->areaMarkerSprites[i]->invisible = sPokedexAreaScreen->markerFlashCounter & 1; - if (sPokedexAreaScreen->specialMarkerCycleCounter > 4) + if (sPokedexAreaScreen->markerFlashCounter > 4) { - sPokedexAreaScreen->specialMarkerCycleCounter = 1; + // Done flashing, reset and try to switch to the area glow + sPokedexAreaScreen->markerFlashCounter = 1; if (sPokedexAreaScreen->numOverworldAreas != 0) - sPokedexAreaScreen->whichMarkersFlashing = 0; + sPokedexAreaScreen->showingMarkers = FALSE; } } } @@ -651,58 +596,58 @@ static void Task_ShowPokedexAreaScreen(u8 taskId) { switch (gTasks[taskId].tState) { - case 0: - ResetSpriteData(); - FreeAllSpritePalettes(); - HideBg(3); - HideBg(2); - HideBg(0); - break; - case 1: - SetBgAttribute(3, BG_ATTR_CHARBASEINDEX, 3); - LoadPokedexAreaMapGfx(&sPokedexAreaMapTemplate); - StringFill(sPokedexAreaScreen->charBuffer, CHAR_SPACE, 16); - break; - case 2: - if (TryShowPokedexAreaMap() == TRUE) - return; - PokedexAreaMapChangeBgY(-8); - break; - case 3: - ResetDrawAreaGlowState(); - break; - case 4: - if (DrawAreaGlow()) - return; - break; - case 5: - ShowRegionMapForPokedexAreaScreen(&sPokedexAreaScreen->regionMap); - CreateRegionMapPlayerIcon(1, 1); - PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs(0, -8); - break; - case 6: - CreateAreaMarkerSprites(); - break; - case 7: - LoadAreaUnknownGraphics(); - break; - case 8: - CreateAreaUnknownSprites(); - break; - case 9: - BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 16, 0, RGB(0, 0, 0)); - break; - case 10: - SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_ALL); - StartAreaGlow(); - ShowBg(2); - ShowBg(3); // TryShowPokedexAreaMap will have done this already - SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON); - break; - case 11: - gTasks[taskId].func = Task_HandlePokedexAreaScreenInput; - gTasks[taskId].tState = 0; + case 0: + ResetSpriteData(); + FreeAllSpritePalettes(); + HideBg(3); + HideBg(2); + HideBg(0); + break; + case 1: + SetBgAttribute(3, BG_ATTR_CHARBASEINDEX, 3); + LoadPokedexAreaMapGfx(&sPokedexAreaMapTemplate); + StringFill(sPokedexAreaScreen->charBuffer, CHAR_SPACE, 16); + break; + case 2: + if (TryShowPokedexAreaMap() == TRUE) return; + PokedexAreaMapChangeBgY(-8); + break; + case 3: + ResetDrawAreaGlowState(); + break; + case 4: + if (DrawAreaGlow()) + return; + break; + case 5: + ShowRegionMapForPokedexAreaScreen(&sPokedexAreaScreen->regionMap); + CreateRegionMapPlayerIcon(1, 1); + PokedexAreaScreen_UpdateRegionMapVariablesAndVideoRegs(0, -8); + break; + case 6: + CreateAreaMarkerSprites(); + break; + case 7: + LoadAreaUnknownGraphics(); + break; + case 8: + CreateAreaUnknownSprites(); + break; + case 9: + BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 16, 0, RGB_BLACK); + break; + case 10: + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_ALL); + StartAreaGlow(); + ShowBg(2); + ShowBg(3); // TryShowPokedexAreaMap will have done this already + SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON); + break; + case 11: + gTasks[taskId].func = Task_HandlePokedexAreaScreenInput; + gTasks[taskId].tState = 0; + return; } gTasks[taskId].tState++; @@ -740,7 +685,7 @@ static void Task_HandlePokedexAreaScreenInput(u8 taskId) case 3: if (gPaletteFade.active) return; - DestroyAreaMarkerSprites(); + DestroyAreaScreenSprites(); sPokedexAreaScreen->screenSwitchState[0] = gTasks[taskId].data[1]; ResetPokedexAreaMapBg(); DestroyTask(taskId); @@ -758,6 +703,7 @@ static void ResetPokedexAreaMapBg(void) SetBgAttribute(3, BG_ATTR_PALETTEMODE, 0); } +// Creates the circular sprites to highlight special areas (like caves) where a Pokémon can be found static void CreateAreaMarkerSprites(void) { u8 spriteId; @@ -788,17 +734,20 @@ static void CreateAreaMarkerSprites(void) sPokedexAreaScreen->numAreaMarkerSprites = numSprites; } -static void DestroyAreaMarkerSprites(void) +static void DestroyAreaScreenSprites(void) { u16 i; - FreeSpriteTilesByTag(2); - FreeSpritePaletteByTag(2); + + // Destroy area marker sprites + FreeSpriteTilesByTag(TAG_AREA_MARKER); + FreeSpritePaletteByTag(TAG_AREA_MARKER); for (i = 0; i < sPokedexAreaScreen->numAreaMarkerSprites; i++) DestroySprite(sPokedexAreaScreen->areaMarkerSprites[i]); - FreeSpriteTilesByTag(3); - FreeSpritePaletteByTag(3); - for (i = 0; i < 3; i++) + // Destroy "Area Unknown" sprites + FreeSpriteTilesByTag(TAG_AREA_UNKNOWN); + FreeSpritePaletteByTag(TAG_AREA_UNKNOWN); + for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaUnknownSprites); i++) { if (sPokedexAreaScreen->areaUnknownSprites[i]) DestroySprite(sPokedexAreaScreen->areaUnknownSprites[i]); @@ -809,8 +758,8 @@ static void LoadAreaUnknownGraphics(void) { struct SpriteSheet spriteSheet = { .data = sPokedexAreaScreen->areaUnknownGraphicsBuffer, - .size = 0x600, - .tag = 3, + .size = sizeof(sPokedexAreaScreen->areaUnknownGraphicsBuffer), + .tag = TAG_AREA_UNKNOWN, }; LZ77UnCompWram(gPokedexAreaScreenAreaUnknown_Gfx, sPokedexAreaScreen->areaUnknownGraphicsBuffer); LoadSpriteSheet(&spriteSheet); @@ -820,25 +769,27 @@ static void LoadAreaUnknownGraphics(void) static void CreateAreaUnknownSprites(void) { u16 i; - u8 spriteId; if (sPokedexAreaScreen->numOverworldAreas || sPokedexAreaScreen->numSpecialAreas) { - for (i = 0; i < 3; i++) + // The current species is present on the map, don't create any "Area Unknown" sprites + for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaUnknownSprites); i++) sPokedexAreaScreen->areaUnknownSprites[i] = NULL; } else { - for (i = 0; i < 3; i++) + // The current species is absent on the map, try to create "Area Unknown" sprites + for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaUnknownSprites); i++) { - spriteId = CreateSprite(&sAreaUnknownSpriteTemplate, i * 32 + 0xa0, 0x8c, 0); + u8 spriteId = CreateSprite(&sAreaUnknownSpriteTemplate, i * 32 + 160, 140, 0); if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.tileNum += i * 16; - sPokedexAreaScreen->areaUnknownSprites[i] = gSprites + spriteId; + sPokedexAreaScreen->areaUnknownSprites[i] = &gSprites[spriteId]; } else { + // Failed to create sprite sPokedexAreaScreen->areaUnknownSprites[i] = NULL; } } diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 5960692a20..4b3402e5ac 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -45,6 +45,8 @@ enum { #define WILD_CHECK_REPEL (1 << 0) #define WILD_CHECK_KEEN_EYE (1 << 1) +#define HEADER_NONE 0xFFFF + static u16 FeebasRandom(void); static void FeebasSeedRng(u16 seed); static bool8 IsWildLevelAllowedByRepel(u8 level); @@ -172,6 +174,7 @@ static void FeebasSeedRng(u16 seed) sFeebasRngValue = seed; } +// LAND_WILD_COUNT static u8 ChooseWildMonIndex_Land(void) { u8 rand = Random() % ENCOUNTER_CHANCE_LAND_MONS_TOTAL; @@ -202,6 +205,7 @@ static u8 ChooseWildMonIndex_Land(void) return 11; } +// ROCK_WILD_COUNT / WATER_WILD_COUNT static u8 ChooseWildMonIndex_WaterRock(void) { u8 rand = Random() % ENCOUNTER_CHANCE_WATER_MONS_TOTAL; @@ -218,6 +222,7 @@ static u8 ChooseWildMonIndex_WaterRock(void) return 4; } +// FISH_WILD_COUNT static u8 ChooseWildMonIndex_Fishing(u8 rod) { u8 wildMonIndex = 0; @@ -310,7 +315,7 @@ static u16 GetCurrentMapWildMonHeaderId(void) gSaveBlock1Ptr->location.mapNum == MAP_NUM(ALTERING_CAVE)) { u16 alteringCaveId = VarGet(VAR_ALTERING_CAVE_WILD_SET); - if (alteringCaveId > 8) + if (alteringCaveId >= NUM_ALTERING_CAVE_TABLES) alteringCaveId = 0; i += alteringCaveId; @@ -320,7 +325,7 @@ static u16 GetCurrentMapWildMonHeaderId(void) } } - return -1; + return HEADER_NONE; } static u8 PickWildMonNature(void) @@ -541,7 +546,7 @@ bool8 StandardWildEncounter(u16 currMetaTileBehavior, u16 previousMetaTileBehavi return FALSE; headerId = GetCurrentMapWildMonHeaderId(); - if (headerId == 0xFFFF) + if (headerId == HEADER_NONE) { if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS) { @@ -652,7 +657,7 @@ void RockSmashWildEncounter(void) { u16 headerId = GetCurrentMapWildMonHeaderId(); - if (headerId != 0xFFFF) + if (headerId != HEADER_NONE) { const struct WildPokemonInfo *wildPokemonInfo = gWildMonHeaders[headerId].rockSmashMonsInfo; @@ -684,7 +689,7 @@ bool8 SweetScentWildEncounter(void) PlayerGetDestCoords(&x, &y); headerId = GetCurrentMapWildMonHeaderId(); - if (headerId == 0xFFFF) + if (headerId == HEADER_NONE) { if (gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS) { @@ -754,7 +759,7 @@ bool8 DoesCurrentMapHaveFishingMons(void) { u16 headerId = GetCurrentMapWildMonHeaderId(); - if (headerId != 0xFFFF && gWildMonHeaders[headerId].fishingMonsInfo != NULL) + if (headerId != HEADER_NONE && gWildMonHeaders[headerId].fishingMonsInfo != NULL) return TRUE; else return FALSE; @@ -788,7 +793,7 @@ u16 GetLocalWildMon(bool8 *isWaterMon) *isWaterMon = FALSE; headerId = GetCurrentMapWildMonHeaderId(); - if (headerId == 0xFFFF) + if (headerId == HEADER_NONE) return SPECIES_NONE; landMonsInfo = gWildMonHeaders[headerId].landMonsInfo; waterMonsInfo = gWildMonHeaders[headerId].waterMonsInfo; @@ -820,7 +825,7 @@ u16 GetLocalWaterMon(void) { u16 headerId = GetCurrentMapWildMonHeaderId(); - if (headerId != 0xFFFF) + if (headerId != HEADER_NONE) { const struct WildPokemonInfo *waterMonsInfo = gWildMonHeaders[headerId].waterMonsInfo; From 4f6323606f083e978968735bec14fa59e9d70663 Mon Sep 17 00:00:00 2001 From: sphericalice Date: Fri, 31 Dec 2021 16:24:44 +0000 Subject: [PATCH 302/417] Update field_specials.c to match the style --- src/field_specials.c | 1544 +++++++++++++++++++----------------------- 1 file changed, 687 insertions(+), 857 deletions(-) diff --git a/src/field_specials.c b/src/field_specials.c index 96eb949e55..27d8c93af7 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -193,59 +193,40 @@ static void DetermineCyclingRoadResults(u32 numFrames, u8 numBikeCollisions) result = 0; if (numBikeCollisions == 0) - { result = 5; - } else if (numBikeCollisions < 4) - { result = 4; - } else if (numBikeCollisions < 10) - { result = 3; - } else if (numBikeCollisions < 20) - { result = 2; - } else if (numBikeCollisions < 100) - { result = 1; - } if (numFrames / 60 <= 10) - { result += 5; - } else if (numFrames / 60 <= 15) - { result += 4; - } else if (numFrames / 60 <= 20) - { result += 3; - } else if (numFrames / 60 <= 40) - { result += 2; - } else if (numFrames / 60 < 60) - { result += 1; - } - gSpecialVar_Result = result; } -void FinishCyclingRoadChallenge(void) { +void FinishCyclingRoadChallenge(void) +{ const u32 numFrames = gMain.vblankCounter1 - sBikeCyclingTimer; DetermineCyclingRoadResults(numFrames, gBikeCollisions); RecordCyclingRoadResults(numFrames, gBikeCollisions); } -static void RecordCyclingRoadResults(u32 numFrames, u8 numBikeCollisions) { +static void RecordCyclingRoadResults(u32 numFrames, u8 numBikeCollisions) +{ u16 low = VarGet(VAR_CYCLING_ROAD_RECORD_TIME_L); u16 high = VarGet(VAR_CYCLING_ROAD_RECORD_TIME_H); u32 framesRecord = low + (high << 16); @@ -258,25 +239,23 @@ static void RecordCyclingRoadResults(u32 numFrames, u8 numBikeCollisions) { } } -u16 GetRecordedCyclingRoadResults(void) { +u16 GetRecordedCyclingRoadResults(void) +{ u16 low = VarGet(VAR_CYCLING_ROAD_RECORD_TIME_L); u16 high = VarGet(VAR_CYCLING_ROAD_RECORD_TIME_H); u32 framesRecord = low + (high << 16); if (framesRecord == 0) - { return FALSE; - } DetermineCyclingRoadResults(framesRecord, VarGet(VAR_CYCLING_ROAD_RECORD_COLLISIONS)); return TRUE; } -void UpdateCyclingRoadState(void) { +void UpdateCyclingRoadState(void) +{ if (gLastUsedWarp.mapNum == MAP_NUM(ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE) && gLastUsedWarp.mapGroup == MAP_GROUP(ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE)) - { return; - } if (VarGet(VAR_CYCLING_CHALLENGE_STATE) == 2 || VarGet(VAR_CYCLING_CHALLENGE_STATE) == 3) { @@ -300,9 +279,8 @@ void ResetSSTidalFlag(void) bool32 CountSSTidalStep(u16 delta) { if (!FlagGet(FLAG_SYS_CRUISE_MODE) || (*GetVarPointer(VAR_CRUISE_STEP_COUNT) += delta) < SS_TIDAL_MAX_STEPS) - { return FALSE; - } + return TRUE; } @@ -311,51 +289,51 @@ u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y) u16 *varCruiseStepCount = GetVarPointer(VAR_CRUISE_STEP_COUNT); switch (*GetVarPointer(VAR_SS_TIDAL_STATE)) { - case SS_TIDAL_BOARD_SLATEPORT: - case SS_TIDAL_LAND_SLATEPORT: - return SS_TIDAL_LOCATION_SLATEPORT; - case SS_TIDAL_HALFWAY_LILYCOVE: - case SS_TIDAL_EXIT_CURRENTS_RIGHT: - return SS_TIDAL_LOCATION_ROUTE131; - case SS_TIDAL_LAND_LILYCOVE: - case SS_TIDAL_BOARD_LILYCOVE: - return SS_TIDAL_LOCATION_LILYCOVE; - case SS_TIDAL_DEPART_LILYCOVE: - case SS_TIDAL_EXIT_CURRENTS_LEFT: - return SS_TIDAL_LOCATION_ROUTE124; - case SS_TIDAL_DEPART_SLATEPORT: - if (*varCruiseStepCount < 60) - { - *mapNum = MAP_NUM(ROUTE134); - *x = *varCruiseStepCount + 19; - } - else if (*varCruiseStepCount < 140) - { - *mapNum = MAP_NUM(ROUTE133); - *x = *varCruiseStepCount - 60; - } - else - { - *mapNum = MAP_NUM(ROUTE132); - *x = *varCruiseStepCount - 140; - } - break; - case SS_TIDAL_HALFWAY_SLATEPORT: - if (*varCruiseStepCount < 66) - { - *mapNum = MAP_NUM(ROUTE132); - *x = 65 - *varCruiseStepCount; - } - else if (*varCruiseStepCount < 146) { - *mapNum = MAP_NUM(ROUTE133); - *x = 145 - *varCruiseStepCount; - } - else - { - *mapNum = MAP_NUM(ROUTE134); - *x = 224 - *varCruiseStepCount; - } - break; + case SS_TIDAL_BOARD_SLATEPORT: + case SS_TIDAL_LAND_SLATEPORT: + return SS_TIDAL_LOCATION_SLATEPORT; + case SS_TIDAL_HALFWAY_LILYCOVE: + case SS_TIDAL_EXIT_CURRENTS_RIGHT: + return SS_TIDAL_LOCATION_ROUTE131; + case SS_TIDAL_LAND_LILYCOVE: + case SS_TIDAL_BOARD_LILYCOVE: + return SS_TIDAL_LOCATION_LILYCOVE; + case SS_TIDAL_DEPART_LILYCOVE: + case SS_TIDAL_EXIT_CURRENTS_LEFT: + return SS_TIDAL_LOCATION_ROUTE124; + case SS_TIDAL_DEPART_SLATEPORT: + if (*varCruiseStepCount < 60) + { + *mapNum = MAP_NUM(ROUTE134); + *x = *varCruiseStepCount + 19; + } + else if (*varCruiseStepCount < 140) + { + *mapNum = MAP_NUM(ROUTE133); + *x = *varCruiseStepCount - 60; + } + else + { + *mapNum = MAP_NUM(ROUTE132); + *x = *varCruiseStepCount - 140; + } + break; + case SS_TIDAL_HALFWAY_SLATEPORT: + if (*varCruiseStepCount < 66) + { + *mapNum = MAP_NUM(ROUTE132); + *x = 65 - *varCruiseStepCount; + } + else if (*varCruiseStepCount < 146) { + *mapNum = MAP_NUM(ROUTE133); + *x = 145 - *varCruiseStepCount; + } + else + { + *mapNum = MAP_NUM(ROUTE134); + *x = 224 - *varCruiseStepCount; + } + break; } *mapGroup = MAP_GROUP(ROUTE132); *y = 20; @@ -368,17 +346,15 @@ bool32 ShouldDoWallyCall(void) { switch (gMapHeader.mapType) { - case MAP_TYPE_TOWN: - case MAP_TYPE_CITY: - case MAP_TYPE_ROUTE: - case MAP_TYPE_OCEAN_ROUTE: - if (++(*GetVarPointer(VAR_WALLY_CALL_STEP_COUNTER)) < 250) - { - return FALSE; - } - break; - default: + case MAP_TYPE_TOWN: + case MAP_TYPE_CITY: + case MAP_TYPE_ROUTE: + case MAP_TYPE_OCEAN_ROUTE: + if (++(*GetVarPointer(VAR_WALLY_CALL_STEP_COUNTER)) < 250) return FALSE; + break; + default: + return FALSE; } } else @@ -395,17 +371,17 @@ bool32 ShouldDoScottFortreeCall(void) { switch (gMapHeader.mapType) { - case MAP_TYPE_TOWN: - case MAP_TYPE_CITY: - case MAP_TYPE_ROUTE: - case MAP_TYPE_OCEAN_ROUTE: - if (++(*GetVarPointer(VAR_SCOTT_FORTREE_CALL_STEP_COUNTER)) < 10) - { - return FALSE; - } - break; - default: + case MAP_TYPE_TOWN: + case MAP_TYPE_CITY: + case MAP_TYPE_ROUTE: + case MAP_TYPE_OCEAN_ROUTE: + if (++(*GetVarPointer(VAR_SCOTT_FORTREE_CALL_STEP_COUNTER)) < 10) + { return FALSE; + } + break; + default: + return FALSE; } } else @@ -422,17 +398,17 @@ bool32 ShouldDoScottBattleFrontierCall(void) { switch (gMapHeader.mapType) { - case MAP_TYPE_TOWN: - case MAP_TYPE_CITY: - case MAP_TYPE_ROUTE: - case MAP_TYPE_OCEAN_ROUTE: - if (++(*GetVarPointer(VAR_SCOTT_BF_CALL_STEP_COUNTER)) < 10) - { - return FALSE; - } - break; - default: + case MAP_TYPE_TOWN: + case MAP_TYPE_CITY: + case MAP_TYPE_ROUTE: + case MAP_TYPE_OCEAN_ROUTE: + if (++(*GetVarPointer(VAR_SCOTT_BF_CALL_STEP_COUNTER)) < 10) + { return FALSE; + } + break; + default: + return FALSE; } } else @@ -449,17 +425,17 @@ bool32 ShouldDoRoxanneCall(void) { switch (gMapHeader.mapType) { - case MAP_TYPE_TOWN: - case MAP_TYPE_CITY: - case MAP_TYPE_ROUTE: - case MAP_TYPE_OCEAN_ROUTE: - if (++(*GetVarPointer(VAR_ROXANNE_CALL_STEP_COUNTER)) < 250) - { - return FALSE; - } - break; - default: + case MAP_TYPE_TOWN: + case MAP_TYPE_CITY: + case MAP_TYPE_ROUTE: + case MAP_TYPE_OCEAN_ROUTE: + if (++(*GetVarPointer(VAR_ROXANNE_CALL_STEP_COUNTER)) < 250) + { return FALSE; + } + break; + default: + return FALSE; } } else @@ -476,17 +452,17 @@ bool32 ShouldDoRivalRayquazaCall(void) { switch (gMapHeader.mapType) { - case MAP_TYPE_TOWN: - case MAP_TYPE_CITY: - case MAP_TYPE_ROUTE: - case MAP_TYPE_OCEAN_ROUTE: - if (++(*GetVarPointer(VAR_RIVAL_RAYQUAZA_CALL_STEP_COUNTER)) < 250) - { - return FALSE; - } - break; - default: + case MAP_TYPE_TOWN: + case MAP_TYPE_CITY: + case MAP_TYPE_ROUTE: + case MAP_TYPE_OCEAN_ROUTE: + if (++(*GetVarPointer(VAR_RIVAL_RAYQUAZA_CALL_STEP_COUNTER)) < 250) + { return FALSE; + } + break; + default: + return FALSE; } } else @@ -540,24 +516,24 @@ void SpawnLinkPartnerObjectEvent(void) playerFacingDirection = GetPlayerFacingDirection(); switch (playerFacingDirection) { - case DIR_WEST: - j = 2; - x = gSaveBlock1Ptr->pos.x - 1; - y = gSaveBlock1Ptr->pos.y; - break; - case DIR_NORTH: - j = 1; - x = gSaveBlock1Ptr->pos.x; - y = gSaveBlock1Ptr->pos.y - 1; - break; - case DIR_EAST: - x = gSaveBlock1Ptr->pos.x + 1; - y = gSaveBlock1Ptr->pos.y; - break; - case DIR_SOUTH: - j = 3; - x = gSaveBlock1Ptr->pos.x; - y = gSaveBlock1Ptr->pos.y + 1; + case DIR_WEST: + j = 2; + x = gSaveBlock1Ptr->pos.x - 1; + y = gSaveBlock1Ptr->pos.y; + break; + case DIR_NORTH: + j = 1; + x = gSaveBlock1Ptr->pos.x; + y = gSaveBlock1Ptr->pos.y - 1; + break; + case DIR_EAST: + x = gSaveBlock1Ptr->pos.x + 1; + y = gSaveBlock1Ptr->pos.y; + break; + case DIR_SOUTH: + j = 3; + x = gSaveBlock1Ptr->pos.x; + y = gSaveBlock1Ptr->pos.y + 1; } for (i = 0; i < gSpecialVar_0x8004; i++) { @@ -565,33 +541,31 @@ void SpawnLinkPartnerObjectEvent(void) { switch ((u8)gLinkPlayers[i].version) { - case VERSION_RUBY: - case VERSION_SAPPHIRE: - if (gLinkPlayers[i].gender == 0) - linkSpriteId = OBJ_EVENT_GFX_LINK_RS_BRENDAN; - else - linkSpriteId = OBJ_EVENT_GFX_LINK_RS_MAY; - break; - case VERSION_EMERALD: - if (gLinkPlayers[i].gender == 0) - linkSpriteId = OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL; - else - linkSpriteId = OBJ_EVENT_GFX_RIVAL_MAY_NORMAL; - break; - default: - if (gLinkPlayers[i].gender == 0) - linkSpriteId = OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL; - else - linkSpriteId = OBJ_EVENT_GFX_RIVAL_MAY_NORMAL; - break; + case VERSION_RUBY: + case VERSION_SAPPHIRE: + if (gLinkPlayers[i].gender == 0) + linkSpriteId = OBJ_EVENT_GFX_LINK_RS_BRENDAN; + else + linkSpriteId = OBJ_EVENT_GFX_LINK_RS_MAY; + break; + case VERSION_EMERALD: + if (gLinkPlayers[i].gender == 0) + linkSpriteId = OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL; + else + linkSpriteId = OBJ_EVENT_GFX_RIVAL_MAY_NORMAL; + break; + default: + if (gLinkPlayers[i].gender == 0) + linkSpriteId = OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL; + else + linkSpriteId = OBJ_EVENT_GFX_RIVAL_MAY_NORMAL; + break; } SpawnSpecialObjectEventParameterized(linkSpriteId, movementTypes[j], 240 - i, coordOffsets[j][0] + x + MAP_OFFSET, coordOffsets[j][1] + y + MAP_OFFSET, 0); LoadLinkPartnerObjectEventSpritePalette(linkSpriteId, 240 - i, i); j++; if (j == MAX_LINK_PLAYERS) - { j = 0; - } } } } @@ -664,84 +638,84 @@ void MauvilleGymSetDefaultBarriers(void) { switch (MapGridGetMetatileIdAt(x, y)) { - case METATILE_MauvilleGym_GreenBeamH1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH1_Off); - break; - case METATILE_MauvilleGym_GreenBeamH2_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH2_Off); - break; - case METATILE_MauvilleGym_GreenBeamH3_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH3_Off); - break; - case METATILE_MauvilleGym_GreenBeamH4_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH4_Off); - break; - case METATILE_MauvilleGym_GreenBeamH1_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH1_On); - break; - case METATILE_MauvilleGym_GreenBeamH2_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH2_On); - break; - case METATILE_MauvilleGym_GreenBeamH3_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH3_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_GreenBeamH4_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH4_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_RedBeamH1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH1_Off); - break; - case METATILE_MauvilleGym_RedBeamH2_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH2_Off); - break; - case METATILE_MauvilleGym_RedBeamH3_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH3_Off); - break; - case METATILE_MauvilleGym_RedBeamH4_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_Off); - break; - case METATILE_MauvilleGym_RedBeamH1_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH1_On); - break; - case METATILE_MauvilleGym_RedBeamH2_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH2_On); - break; - case METATILE_MauvilleGym_RedBeamH3_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH3_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_RedBeamH4_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_GreenBeamV1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_GreenBeamV2_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_FloorTile); - break; - case METATILE_MauvilleGym_RedBeamV1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_Off | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_RedBeamV2_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_FloorTile); - break; - case METATILE_MauvilleGym_PoleBottom_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamV1_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_FloorTile: - if (MapGridGetMetatileIdAt(x, y - 1) == METATILE_MauvilleGym_GreenBeamV1_On) - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamV2_On | METATILE_COLLISION_MASK); - else - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamV2_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_PoleBottom_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamV1_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_PoleTop_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_PoleTop_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_Off); - break; + case METATILE_MauvilleGym_GreenBeamH1_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH1_Off); + break; + case METATILE_MauvilleGym_GreenBeamH2_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH2_Off); + break; + case METATILE_MauvilleGym_GreenBeamH3_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH3_Off); + break; + case METATILE_MauvilleGym_GreenBeamH4_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH4_Off); + break; + case METATILE_MauvilleGym_GreenBeamH1_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH1_On); + break; + case METATILE_MauvilleGym_GreenBeamH2_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH2_On); + break; + case METATILE_MauvilleGym_GreenBeamH3_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH3_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_GreenBeamH4_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH4_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_RedBeamH1_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH1_Off); + break; + case METATILE_MauvilleGym_RedBeamH2_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH2_Off); + break; + case METATILE_MauvilleGym_RedBeamH3_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH3_Off); + break; + case METATILE_MauvilleGym_RedBeamH4_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_Off); + break; + case METATILE_MauvilleGym_RedBeamH1_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH1_On); + break; + case METATILE_MauvilleGym_RedBeamH2_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH2_On); + break; + case METATILE_MauvilleGym_RedBeamH3_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH3_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_RedBeamH4_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_GreenBeamV1_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_GreenBeamV2_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_FloorTile); + break; + case METATILE_MauvilleGym_RedBeamV1_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_Off | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_RedBeamV2_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_FloorTile); + break; + case METATILE_MauvilleGym_PoleBottom_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamV1_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_FloorTile: + if (MapGridGetMetatileIdAt(x, y - 1) == METATILE_MauvilleGym_GreenBeamV1_On) + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamV2_On | METATILE_COLLISION_MASK); + else + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamV2_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_PoleBottom_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamV1_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_PoleTop_Off: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_PoleTop_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_Off); + break; } } } @@ -763,43 +737,43 @@ void MauvilleGymDeactivatePuzzle(void) { switch (MapGridGetMetatileIdAt(x, y)) { - case METATILE_MauvilleGym_GreenBeamH1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH1_Off); - break; - case METATILE_MauvilleGym_GreenBeamH2_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH2_Off); - break; - case METATILE_MauvilleGym_GreenBeamH3_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH3_Off); - break; - case METATILE_MauvilleGym_GreenBeamH4_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH4_Off); - break; - case METATILE_MauvilleGym_RedBeamH1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH1_Off); - break; - case METATILE_MauvilleGym_RedBeamH2_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH2_Off); - break; - case METATILE_MauvilleGym_RedBeamH3_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH3_Off); - break; - case METATILE_MauvilleGym_RedBeamH4_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_Off); - break; - case METATILE_MauvilleGym_GreenBeamV1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_On | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_RedBeamV1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_Off | METATILE_COLLISION_MASK); - break; - case METATILE_MauvilleGym_GreenBeamV2_On: - case METATILE_MauvilleGym_RedBeamV2_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_FloorTile); - break; - case METATILE_MauvilleGym_PoleTop_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_Off); - break; + case METATILE_MauvilleGym_GreenBeamH1_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH1_Off); + break; + case METATILE_MauvilleGym_GreenBeamH2_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH2_Off); + break; + case METATILE_MauvilleGym_GreenBeamH3_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH3_Off); + break; + case METATILE_MauvilleGym_GreenBeamH4_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH4_Off); + break; + case METATILE_MauvilleGym_RedBeamH1_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH1_Off); + break; + case METATILE_MauvilleGym_RedBeamH2_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH2_Off); + break; + case METATILE_MauvilleGym_RedBeamH3_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH3_Off); + break; + case METATILE_MauvilleGym_RedBeamH4_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_Off); + break; + case METATILE_MauvilleGym_GreenBeamV1_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_On | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_RedBeamV1_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_Off | METATILE_COLLISION_MASK); + break; + case METATILE_MauvilleGym_GreenBeamV2_On: + case METATILE_MauvilleGym_RedBeamV2_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_FloorTile); + break; + case METATILE_MauvilleGym_PoleTop_On: + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_Off); + break; } } } @@ -849,54 +823,54 @@ static void PetalburgGymSetDoorMetatiles(u8 roomNumber, u16 metatileId) u8 nDoors = 0; switch (roomNumber) { - case 1: - nDoors = 2; - doorCoordsX[0] = 1; - doorCoordsX[1] = 7; - doorCoordsY[0] = 104; - doorCoordsY[1] = 104; - break; - case 2: - nDoors = 2; - doorCoordsX[0] = 1; - doorCoordsX[1] = 7; - doorCoordsY[0] = 78; - doorCoordsY[1] = 78; - break; - case 3: - nDoors = 2; - doorCoordsX[0] = 1; - doorCoordsX[1] = 7; - doorCoordsY[0] = 91; - doorCoordsY[1] = 91; - break; - case 4: - nDoors = 1; - doorCoordsX[0] = 7; - doorCoordsY[0] = 39; - break; - case 5: - nDoors = 2; - doorCoordsX[0] = 1; - doorCoordsX[1] = 7; - doorCoordsY[0] = 52; - doorCoordsY[1] = 52; - break; - case 6: - nDoors = 1; - doorCoordsX[0] = 1; - doorCoordsY[0] = 65; - break; - case 7: - nDoors = 1; - doorCoordsX[0] = 7; - doorCoordsY[0] = 13; - break; - case 8: - nDoors = 1; - doorCoordsX[0] = 1; - doorCoordsY[0] = 26; - break; + case 1: + nDoors = 2; + doorCoordsX[0] = 1; + doorCoordsX[1] = 7; + doorCoordsY[0] = 104; + doorCoordsY[1] = 104; + break; + case 2: + nDoors = 2; + doorCoordsX[0] = 1; + doorCoordsX[1] = 7; + doorCoordsY[0] = 78; + doorCoordsY[1] = 78; + break; + case 3: + nDoors = 2; + doorCoordsX[0] = 1; + doorCoordsX[1] = 7; + doorCoordsY[0] = 91; + doorCoordsY[1] = 91; + break; + case 4: + nDoors = 1; + doorCoordsX[0] = 7; + doorCoordsY[0] = 39; + break; + case 5: + nDoors = 2; + doorCoordsX[0] = 1; + doorCoordsX[1] = 7; + doorCoordsY[0] = 52; + doorCoordsY[1] = 52; + break; + case 6: + nDoors = 1; + doorCoordsX[0] = 1; + doorCoordsY[0] = 65; + break; + case 7: + nDoors = 1; + doorCoordsX[0] = 7; + doorCoordsY[0] = 13; + break; + case 8: + nDoors = 1; + doorCoordsX[0] = 1; + doorCoordsY[0] = 26; + break; } for (i = 0; i < nDoors; i++) { @@ -930,25 +904,17 @@ u8 GetPlayerTrainerIdOnesDigit(void) void GetPlayerBigGuyGirlString(void) { if (gSaveBlock2Ptr->playerGender == MALE) - { StringCopy(gStringVar1, gText_BigGuy); - } else - { StringCopy(gStringVar1, gText_BigGirl); - } } void GetRivalSonDaughterString(void) { if (gSaveBlock2Ptr->playerGender == MALE) - { StringCopy(gStringVar1, gText_Daughter); - } else - { StringCopy(gStringVar1, gText_Son); - } } u8 GetBattleOutcome(void) @@ -983,29 +949,18 @@ u8 GetLeadMonFriendshipScore(void) { struct Pokemon *pokemon = &gPlayerParty[GetLeadMonIndex()]; if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) == MAX_FRIENDSHIP) - { return 6; - } if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 200) - { return 5; - } if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 150) - { return 4; - } if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 100) - { return 3; - } if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 50) - { return 2; - } if (GetMonData(pokemon, MON_DATA_FRIENDSHIP) >= 1) - { return 1; - } + return 0; } @@ -1036,9 +991,7 @@ static void Task_PCTurnOnEffect(u8 taskId) { struct Task *task = &gTasks[taskId]; if (task->data[0] == 0) - { PCTurnOnEffect_0(task); - } } static void PCTurnOnEffect_0(struct Task *task) @@ -1052,26 +1005,24 @@ static void PCTurnOnEffect_0(struct Task *task) playerDirection = GetPlayerFacingDirection(); switch (playerDirection) { - case DIR_NORTH: - dx = 0; - dy = -1; - break; - case DIR_WEST: - dx = -1; - dy = -1; - break; - case DIR_EAST: - dx = 1; - dy = -1; - break; + case DIR_NORTH: + dx = 0; + dy = -1; + break; + case DIR_WEST: + dx = -1; + dy = -1; + break; + case DIR_EAST: + dx = 1; + dy = -1; + break; } PCTurnOnEffect_1(task->data[4], dx, dy); DrawWholeMapView(); task->data[4] ^= 1; if ((++task->data[2]) == 5) - { DestroyTask(task->data[1]); - } } task->data[3]++; } @@ -1082,32 +1033,20 @@ static void PCTurnOnEffect_1(s16 isPcTurnedOn, s8 dx, s8 dy) if (isPcTurnedOn) { if (gSpecialVar_0x8004 == PC_LOCATION_OTHER) - { tileId = METATILE_Building_PC_Off; - } else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE) - { tileId = METATILE_BrendansMaysHouse_BrendanPC_Off; - } else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE) - { tileId = METATILE_BrendansMaysHouse_MayPC_Off; - } } else { if (gSpecialVar_0x8004 == PC_LOCATION_OTHER) - { tileId = METATILE_Building_PC_On; - } else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE) - { tileId = METATILE_BrendansMaysHouse_BrendanPC_On; - } else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE) - { tileId = METATILE_BrendansMaysHouse_MayPC_On; - } } MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | METATILE_COLLISION_MASK); } @@ -1125,31 +1064,25 @@ static void PCTurnOffEffect(void) u8 playerDirection = GetPlayerFacingDirection(); switch (playerDirection) { - case DIR_NORTH: - dx = 0; - dy = -1; - break; - case DIR_WEST: - dx = -1; - dy = -1; - break; - case DIR_EAST: - dx = 1; - dy = -1; - break; + case DIR_NORTH: + dx = 0; + dy = -1; + break; + case DIR_WEST: + dx = -1; + dy = -1; + break; + case DIR_EAST: + dx = 1; + dy = -1; + break; } if (gSpecialVar_0x8004 == 0) - { tileId = METATILE_Building_PC_Off; - } else if (gSpecialVar_0x8004 == 1) - { tileId = METATILE_BrendansMaysHouse_BrendanPC_Off; - } else if (gSpecialVar_0x8004 == 2) - { tileId = METATILE_BrendansMaysHouse_MayPC_Off; - } MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | METATILE_COLLISION_MASK); DrawWholeMapView(); } @@ -1171,9 +1104,7 @@ static void Task_LotteryCornerComputerEffect(u8 taskId) { struct Task *task = &gTasks[taskId]; if (task->data[0] == 0) - { LotteryCornerComputerEffect(task); - } } static void LotteryCornerComputerEffect(struct Task *task) @@ -1194,9 +1125,7 @@ static void LotteryCornerComputerEffect(struct Task *task) DrawWholeMapView(); task->data[4] ^= 1; if ((++task->data[2]) == 5) - { DestroyTask(task->data[1]); - } } task->data[3]++; } @@ -1227,45 +1156,40 @@ void ResetTrickHouseNuggetFlag(void) bool8 CheckLeadMonCool(void) { if (GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_COOL) < 200) - { return FALSE; - } + return TRUE; } bool8 CheckLeadMonBeauty(void) { if (GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_BEAUTY) < 200) - { return FALSE; - } + return TRUE; } bool8 CheckLeadMonCute(void) { if (GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_CUTE) < 200) - { return FALSE; - } + return TRUE; } bool8 CheckLeadMonSmart(void) { if (GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SMART) < 200) - { return FALSE; - } + return TRUE; } bool8 CheckLeadMonTough(void) { if (GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_TOUGH) < 200) - { return FALSE; - } + return TRUE; } @@ -1373,9 +1297,8 @@ bool8 FoundAbandonedShipRoom1Key(void) u16 flag = FLAG_HIDDEN_ITEM_ABANDONED_SHIP_RM_1_KEY; *specVar = flag; if (!FlagGet(flag)) - { return FALSE; - } + return TRUE; } @@ -1385,9 +1308,8 @@ bool8 FoundAbandonedShipRoom2Key(void) u16 flag = FLAG_HIDDEN_ITEM_ABANDONED_SHIP_RM_2_KEY; *specVar = flag; if (!FlagGet(flag)) - { return FALSE; - } + return TRUE; } @@ -1397,9 +1319,8 @@ bool8 FoundAbandonedShipRoom4Key(void) u16 flag = FLAG_HIDDEN_ITEM_ABANDONED_SHIP_RM_4_KEY; *specVar = flag; if (!FlagGet(flag)) - { return FALSE; - } + return TRUE; } @@ -1409,9 +1330,8 @@ bool8 FoundAbandonedShipRoom6Key(void) u16 flag = FLAG_HIDDEN_ITEM_ABANDONED_SHIP_RM_6_KEY; *specVar = flag; if (!FlagGet(flag)) - { return FALSE; - } + return TRUE; } @@ -1430,17 +1350,14 @@ void GiveLeadMonEffortRibbon(void) leadMon = &gPlayerParty[GetLeadMonIndex()]; SetMonData(leadMon, MON_DATA_EFFORT_RIBBON, &ribbonSet); if (GetRibbonCount(leadMon) > NUM_CUTIES_RIBBONS) - { TryPutSpotTheCutiesOnAir(leadMon, MON_DATA_EFFORT_RIBBON); - } } bool8 Special_AreLeadMonEVsMaxedOut(void) { if (GetMonEVCount(&gPlayerParty[GetLeadMonIndex()]) >= MAX_TOTAL_EVS) - { return TRUE; - } + return FALSE; } @@ -1491,9 +1408,7 @@ bool8 IsStarterInParty(void) for (i = 0; i < partyCount; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == starter) - { return TRUE; - } } return FALSE; } @@ -1506,9 +1421,8 @@ bool8 ScriptCheckFreePokemonStorageSpace(void) bool8 IsPokerusInParty(void) { if (!CheckPartyPokerus(gPlayerParty, 0x3f)) - { return FALSE; - } + return TRUE; } @@ -1586,9 +1500,7 @@ u8 GetLeadMonIndex(void) for (i = 0; i < partyCount; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != 0) - { return i; - } } return 0; } @@ -1608,13 +1520,10 @@ u16 GetDaysUntilPacifidlogTMAvailable(void) { u16 tmReceivedDay = VarGet(VAR_PACIFIDLOG_TM_RECEIVED_DAY); if (gLocalTime.days - tmReceivedDay >= 7) - { return 0; - } else if (gLocalTime.days < 0) - { return 8; - } + return 7 - (gLocalTime.days - tmReceivedDay); } @@ -1675,18 +1584,18 @@ u16 GetMysteryGiftCardStat(void) { switch (gSpecialVar_Result) { - case GET_NUM_STAMPS: - return MysteryGift_GetCardStat(CARD_STAT_NUM_STAMPS); - case GET_MAX_STAMPS: - return MysteryGift_GetCardStat(CARD_STAT_MAX_STAMPS); - case GET_CARD_BATTLES_WON: - return MysteryGift_GetCardStat(CARD_STAT_BATTLES_WON); - case GET_CARD_BATTLES_LOST: // Never occurs - return MysteryGift_GetCardStat(CARD_STAT_BATTLES_LOST); - case GET_CARD_NUM_TRADES: // Never occurs - return MysteryGift_GetCardStat(CARD_STAT_NUM_TRADES); - default: - return 0; + case GET_NUM_STAMPS: + return MysteryGift_GetCardStat(CARD_STAT_NUM_STAMPS); + case GET_MAX_STAMPS: + return MysteryGift_GetCardStat(CARD_STAT_MAX_STAMPS); + case GET_CARD_BATTLES_WON: + return MysteryGift_GetCardStat(CARD_STAT_BATTLES_WON); + case GET_CARD_BATTLES_LOST: // Never occurs + return MysteryGift_GetCardStat(CARD_STAT_BATTLES_LOST); + case GET_CARD_NUM_TRADES: // Never occurs + return MysteryGift_GetCardStat(CARD_STAT_NUM_TRADES); + default: + return 0; } } @@ -1804,27 +1713,27 @@ void SetDeptStoreFloor(void) u8 deptStoreFloor; switch (gSaveBlock1Ptr->dynamicWarp.mapNum) { - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_1F): - deptStoreFloor = DEPT_STORE_FLOORNUM_1F; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_2F): - deptStoreFloor = DEPT_STORE_FLOORNUM_2F; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_3F): - deptStoreFloor = DEPT_STORE_FLOORNUM_3F; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_4F): - deptStoreFloor = DEPT_STORE_FLOORNUM_4F; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_5F): - deptStoreFloor = DEPT_STORE_FLOORNUM_5F; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP): - deptStoreFloor = DEPT_STORE_FLOORNUM_ROOFTOP; - break; - default: - deptStoreFloor = DEPT_STORE_FLOORNUM_1F; - break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_1F): + deptStoreFloor = DEPT_STORE_FLOORNUM_1F; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_2F): + deptStoreFloor = DEPT_STORE_FLOORNUM_2F; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_3F): + deptStoreFloor = DEPT_STORE_FLOORNUM_3F; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_4F): + deptStoreFloor = DEPT_STORE_FLOORNUM_4F; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_5F): + deptStoreFloor = DEPT_STORE_FLOORNUM_5F; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP): + deptStoreFloor = DEPT_STORE_FLOORNUM_ROOFTOP; + break; + default: + deptStoreFloor = DEPT_STORE_FLOORNUM_1F; + break; } VarSet(VAR_DEPT_STORE_FLOOR, deptStoreFloor); } @@ -1838,26 +1747,26 @@ u16 GetDeptStoreDefaultFloorChoice(void) { switch (gSaveBlock1Ptr->dynamicWarp.mapNum) { - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_5F): - sLilycoveDeptStore_NeverRead = 0; - sLilycoveDeptStore_DefaultFloorChoice = 0; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_4F): - sLilycoveDeptStore_NeverRead = 0; - sLilycoveDeptStore_DefaultFloorChoice = 1; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_3F): - sLilycoveDeptStore_NeverRead = 0; - sLilycoveDeptStore_DefaultFloorChoice = 2; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_2F): - sLilycoveDeptStore_NeverRead = 0; - sLilycoveDeptStore_DefaultFloorChoice = 3; - break; - case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_1F): - sLilycoveDeptStore_NeverRead = 0; - sLilycoveDeptStore_DefaultFloorChoice = 4; - break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_5F): + sLilycoveDeptStore_NeverRead = 0; + sLilycoveDeptStore_DefaultFloorChoice = 0; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_4F): + sLilycoveDeptStore_NeverRead = 0; + sLilycoveDeptStore_DefaultFloorChoice = 1; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_3F): + sLilycoveDeptStore_NeverRead = 0; + sLilycoveDeptStore_DefaultFloorChoice = 2; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_2F): + sLilycoveDeptStore_NeverRead = 0; + sLilycoveDeptStore_DefaultFloorChoice = 3; + break; + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_1F): + sLilycoveDeptStore_NeverRead = 0; + sLilycoveDeptStore_DefaultFloorChoice = 4; + break; } } @@ -1969,22 +1878,24 @@ static void Task_MoveElevatorWindowLights(u8 taskId) if (data[2] == FALSE) { for (y = 0; y < 3; y++) + { for (x = 0; x < 3; x++) MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Ascending[y][data[0] % 3] | METATILE_COLLISION_MASK); + } } // descending else { for (y = 0; y < 3; y++) + { for (x = 0; x < 3; x++) MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Descending[y][data[0] % 3] | METATILE_COLLISION_MASK); + } } DrawWholeMapView(); data[1] = 0; if (data[0] == data[3]) - { DestroyTask(taskId); - } } data[1]++; } @@ -2004,9 +1915,7 @@ void BufferVarsForIVRater(void) gSpecialVar_0x8005 = 0; for (i = 0; i < NUM_STATS; i++) - { gSpecialVar_0x8005 += ivStorage[i]; - } gSpecialVar_0x8006 = 0; gSpecialVar_0x8007 = ivStorage[STAT_HP]; @@ -2070,9 +1979,8 @@ bool8 UsedPokemonCenterWarp(void) bool32 PlayerNotAtTrainerHillEntrance(void) { if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRAINER_HILL_ENTRANCE) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRAINER_HILL_ENTRANCE)) - { return FALSE; - } + return TRUE; } @@ -2169,86 +2077,58 @@ void ShowFrontierManiacMessage(void) switch (facility) { - case FRONTIER_MANIAC_TOWER_SINGLES: - case FRONTIER_MANIAC_TOWER_DOUBLES: - case FRONTIER_MANIAC_TOWER_MULTIS: - case FRONTIER_MANIAC_TOWER_LINK: - if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50] - >= gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN]) - { - winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50]; - } - else - { - winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN]; - } - break; - case FRONTIER_MANIAC_DOME: - if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] - >= gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) - { - winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; - } - else - { - winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; - } - break; - case FRONTIER_MANIAC_FACTORY: - if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] - >= gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) - { - winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; - } - else - { - winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; - } - break; - case FRONTIER_MANIAC_PALACE: - if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] - >= gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) - { - winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; - } - else - { - winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; - } - break; - case FRONTIER_MANIAC_ARENA: - if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50] - >= gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]) - { - winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50]; - } - else - { - winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]; - } - break; - case FRONTIER_MANIAC_PIKE: - if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50] - >= gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]) - { - winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50]; - } - else - { - winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]; - } - break; - case FRONTIER_MANIAC_PYRAMID: - if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50] - >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN]) - { - winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50]; - } - else - { - winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN]; - } - break; + case FRONTIER_MANIAC_TOWER_SINGLES: + case FRONTIER_MANIAC_TOWER_DOUBLES: + case FRONTIER_MANIAC_TOWER_MULTIS: + case FRONTIER_MANIAC_TOWER_LINK: + if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50] + >= gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN]) + winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50]; + else + winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN]; + break; + case FRONTIER_MANIAC_DOME: + if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + >= gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) + winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; + else + winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; + break; + case FRONTIER_MANIAC_FACTORY: + if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + >= gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) + winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; + else + winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; + break; + case FRONTIER_MANIAC_PALACE: + if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + >= gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) + winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; + else + winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; + break; + case FRONTIER_MANIAC_ARENA: + if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50] + >= gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]) + winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50]; + else + winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]; + break; + case FRONTIER_MANIAC_PIKE: + if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50] + >= gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]) + winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50]; + else + winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]; + break; + case FRONTIER_MANIAC_PYRAMID: + if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50] + >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN]) + winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50]; + else + winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN]; + break; } for (i = 0; i < FRONTIER_MANIAC_MESSAGE_COUNT - 1 && sFrontierManiacStreakThresholds[facility][i] < winStreak; i++); @@ -2313,131 +2193,131 @@ void ShowScrollableMultichoice(void) switch (gSpecialVar_0x8004) { - case SCROLL_MULTI_NONE: - task->tMaxItemsOnScreen = 1; - task->tNumItems = 1; - task->tLeft = 1; - task->tTop = 1; - task->tWidth = 1; - task->tHeight = 1; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_GLASS_WORKSHOP_VENDOR: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN - 1; - task->tNumItems = 8; - task->tLeft = 1; - task->tTop = 1; - task->tWidth = 9; - task->tHeight = 10; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_POKEMON_FAN_CLUB_RATER: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 12; - task->tLeft = 1; - task->tTop = 1; - task->tWidth = 7; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 11; - task->tLeft = 14; - task->tTop = 1; - task->tWidth = 15; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 6; - task->tLeft = 14; - task->tTop = 1; - task->tWidth = 15; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 7; - task->tLeft = 14; - task->tTop = 1; - task->tWidth = 15; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 10; - task->tLeft = 14; - task->tTop = 1; - task->tWidth = 15; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_BERRY_POWDER_VENDOR: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 12; - task->tLeft = 15; - task->tTop = 1; - task->tWidth = 14; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_BF_RECEPTIONIST: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 10; - task->tLeft = 17; - task->tTop = 1; - task->tWidth = 11; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_BF_MOVE_TUTOR_1: - case SCROLL_MULTI_BF_MOVE_TUTOR_2: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 11; - task->tLeft = 15; - task->tTop = 1; - task->tWidth = 14; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_SS_TIDAL_DESTINATION: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 7; - task->tLeft = 19; - task->tTop = 1; - task->tWidth = 10; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - case SCROLL_MULTI_BATTLE_TENT_RULES: - task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; - task->tNumItems = 7; - task->tLeft = 17; - task->tTop = 1; - task->tWidth = 12; - task->tHeight = 12; - task->tKeepOpenAfterSelect = FALSE; - task->tTaskId = taskId; - break; - default: - gSpecialVar_Result = MULTI_B_PRESSED; - DestroyTask(taskId); - break; + case SCROLL_MULTI_NONE: + task->tMaxItemsOnScreen = 1; + task->tNumItems = 1; + task->tLeft = 1; + task->tTop = 1; + task->tWidth = 1; + task->tHeight = 1; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_GLASS_WORKSHOP_VENDOR: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN - 1; + task->tNumItems = 8; + task->tLeft = 1; + task->tTop = 1; + task->tWidth = 9; + task->tHeight = 10; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_POKEMON_FAN_CLUB_RATER: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 12; + task->tLeft = 1; + task->tTop = 1; + task->tWidth = 7; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 11; + task->tLeft = 14; + task->tTop = 1; + task->tWidth = 15; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 6; + task->tLeft = 14; + task->tTop = 1; + task->tWidth = 15; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 7; + task->tLeft = 14; + task->tTop = 1; + task->tWidth = 15; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 10; + task->tLeft = 14; + task->tTop = 1; + task->tWidth = 15; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_BERRY_POWDER_VENDOR: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 12; + task->tLeft = 15; + task->tTop = 1; + task->tWidth = 14; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_BF_RECEPTIONIST: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 10; + task->tLeft = 17; + task->tTop = 1; + task->tWidth = 11; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_BF_MOVE_TUTOR_1: + case SCROLL_MULTI_BF_MOVE_TUTOR_2: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 11; + task->tLeft = 15; + task->tTop = 1; + task->tWidth = 14; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_SS_TIDAL_DESTINATION: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 7; + task->tLeft = 19; + task->tTop = 1; + task->tWidth = 10; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + case SCROLL_MULTI_BATTLE_TENT_RULES: + task->tMaxItemsOnScreen = MAX_SCROLL_MULTI_ON_SCREEN; + task->tNumItems = 7; + task->tLeft = 17; + task->tTop = 1; + task->tWidth = 12; + task->tHeight = 12; + task->tKeepOpenAfterSelect = FALSE; + task->tTaskId = taskId; + break; + default: + gSpecialVar_Result = MULTI_B_PRESSED; + DestroyTask(taskId); + break; } } @@ -2627,13 +2507,9 @@ static void Task_ShowScrollableMultichoice(u8 taskId) { int adjustedLeft = MAX_MULTICHOICE_WIDTH + 1 - task->tWidth; if (adjustedLeft < 0) - { task->tLeft = 0; - } else - { task->tLeft = adjustedLeft; - } } template = CreateWindowTemplate(0, task->tLeft, task->tTop, task->tWidth, task->tHeight, 0xF, 0x64); @@ -2713,13 +2589,14 @@ static void ScrollableMultichoice_ProcessInput(u8 taskId) { CloseScrollableMultichoice(taskId); } - // if selected option was the last one (Exit) else if (input == task->tNumItems - 1) { + // if selected option was the last one (Exit) CloseScrollableMultichoice(taskId); } - else // Handle selection while keeping the menu open + else { + // Handle selection while keeping the menu open ScrollableMultichoice_RemoveScrollArrows(taskId); task->func = Task_ScrollableMultichoice_WaitReturnToList; EnableBothScriptContexts(); @@ -2828,13 +2705,9 @@ void SetBattleTowerLinkPlayerGfx(void) for (i = 0; i < 2; i++) { if (gLinkPlayers[i].gender == MALE) - { VarSet(VAR_OBJ_GFX_ID_F - i, OBJ_EVENT_GFX_BRENDAN_NORMAL); - } else - { VarSet(VAR_OBJ_GFX_ID_F - i, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL); - } } } @@ -2871,9 +2744,7 @@ void ShowNatureGirlMessage(void) u8 nature; if (gSpecialVar_0x8004 >= PARTY_SIZE) - { gSpecialVar_0x8004 = 0; - } nature = GetNature(&gPlayerParty[gSpecialVar_0x8004]); ShowFieldMessage(sNatureGirlMessages[nature]); @@ -2957,13 +2828,9 @@ void FrontierGamblerSetWonOrLost(bool8 won) if (sFrontierChallenges[challenge] == FRONTIER_CHALLENGE(frontierFacilityId, battleMode)) { if (won) - { VarSet(VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON); - } else - { VarSet(VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_LOST); - } } } } @@ -2979,7 +2846,8 @@ void UpdateBattlePointsWindow(void) void ShowBattlePointsWindow(void) { - static const struct WindowTemplate sBattlePoints_WindowTemplate = { + static const struct WindowTemplate sBattlePoints_WindowTemplate = + { .bg = 0, .tilemapLeft = 1, .tilemapTop = 1, @@ -3024,7 +2892,8 @@ u16 GetFrontierBattlePoints(void) void ShowFrontierExchangeCornerItemIconWindow(void) { - static const struct WindowTemplate sFrontierExchangeCorner_ItemIconWindowTemplate = { + static const struct WindowTemplate sFrontierExchangeCorner_ItemIconWindowTemplate = + { .bg = 0, .tilemapLeft = 2, .tilemapTop = 9, @@ -3056,40 +2925,40 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection) FillWindowPixelRect(0, PIXEL_FILL(1), 0, 0, 216, 32); switch (menu) { - case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1: - AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3); - if (sFrontierExchangeCorner_Decor1[selection] == 0xFFFF) - { - ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor1[selection]); - } - else - { - FreeSpriteTilesByTag(TAG_ITEM_ICON); - FreeSpritePaletteByTag(TAG_ITEM_ICON); - sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor1[selection], 33, 88, 0, TAG_ITEM_ICON, TAG_ITEM_ICON); - } - break; - case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: - AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3); - if (sFrontierExchangeCorner_Decor2[selection] == 0xFFFF) - { - ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor2[selection]); - } - else - { - FreeSpriteTilesByTag(TAG_ITEM_ICON); - FreeSpritePaletteByTag(TAG_ITEM_ICON); - sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor2[selection], 33, 88, 0, TAG_ITEM_ICON, TAG_ITEM_ICON); - } - break; - case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: - AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3); - ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Vitamins[selection]); - break; - case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR: - AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3); - ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_HoldItems[selection]); - break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1: + AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3); + if (sFrontierExchangeCorner_Decor1[selection] == 0xFFFF) + { + ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor1[selection]); + } + else + { + FreeSpriteTilesByTag(TAG_ITEM_ICON); + FreeSpritePaletteByTag(TAG_ITEM_ICON); + sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor1[selection], 33, 88, 0, TAG_ITEM_ICON, TAG_ITEM_ICON); + } + break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: + AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3); + if (sFrontierExchangeCorner_Decor2[selection] == 0xFFFF) + { + ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor2[selection]); + } + else + { + FreeSpriteTilesByTag(TAG_ITEM_ICON); + FreeSpritePaletteByTag(TAG_ITEM_ICON); + sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor2[selection], 33, 88, 0, TAG_ITEM_ICON, TAG_ITEM_ICON); + } + break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: + AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3); + ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Vitamins[selection]); + break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR: + AddTextPrinterParameterized2(0, FONT_NORMAL, sFrontierExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3); + ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_HoldItems[selection]); + break; } } } @@ -3114,12 +2983,12 @@ static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused) { switch (menu) { - case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1: - case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: - case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: - case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR: - DestroySpriteAndFreeResources(&gSprites[sScrollableMultichoice_ItemSpriteId]); - break; + case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1: + case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: + case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: + case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR: + DestroySpriteAndFreeResources(&gSprites[sScrollableMultichoice_ItemSpriteId]); + break; } sScrollableMultichoice_ItemSpriteId = MAX_SPRITES; } @@ -3156,13 +3025,9 @@ static const u16 sBattleFrontier_TutorMoves2[] = void BufferBattleFrontierTutorMoveName(void) { if (gSpecialVar_0x8005 != 0) - { StringCopy(gStringVar1, gMoveNames[sBattleFrontier_TutorMoves2[gSpecialVar_0x8004]]); - } else - { StringCopy(gStringVar1, gMoveNames[sBattleFrontier_TutorMoves1[gSpecialVar_0x8004]]); - } } static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection) @@ -3225,13 +3090,9 @@ static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection) { FillWindowPixelRect(sTutorMoveAndElevatorWindowId, PIXEL_FILL(1), 0, 0, 96, 48); if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_2) - { AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, sBattleFrontier_TutorMoveDescriptions2[selection], 0, 1, 0, NULL); - } else - { AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, sBattleFrontier_TutorMoveDescriptions1[selection], 0, 1, 0, NULL); - } } } @@ -3453,13 +3314,9 @@ void IncrementBirthIslandRockStepCount(void) { var++; if (var > 99) - { VarSet(VAR_DEOXYS_ROCK_STEP_COUNT, 0); - } else - { VarSet(VAR_DEOXYS_ROCK_STEP_COUNT, var); - } } } @@ -3505,18 +3362,14 @@ bool8 IsDestinationBoxFull(void) if (GetBoxMonData(GetBoxedMonPtr(box, i), MON_DATA_SPECIES, 0) == SPECIES_NONE) { if (GetPCBoxToSendMon() != box) - { FlagClear(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE); - } VarSet(VAR_PC_BOX_TO_SEND_MON, box); return ShouldShowBoxWasFullMessage(); } } if (++box == TOTAL_BOXES_COUNT) - { box = 0; - } } while (box != StorageGetCurrentBox()); return FALSE; } @@ -3582,7 +3435,8 @@ bool32 GetAbnormalWeatherMapNameAndType(void) bool8 AbnormalWeatherHasExpired(void) { // Duplicate array. - static const u8 sAbnormalWeatherMapNumbers[] = { + static const u8 sAbnormalWeatherMapNumbers[] = + { MAP_NUM(ROUTE114), MAP_NUM(ROUTE114), MAP_NUM(ROUTE115), @@ -3605,9 +3459,7 @@ bool8 AbnormalWeatherHasExpired(void) u16 abnormalWeather = VarGet(VAR_ABNORMAL_WEATHER_LOCATION); if (abnormalWeather == ABNORMAL_WEATHER_NONE) - { return FALSE; - } if (++steps > 999) { @@ -3616,15 +3468,15 @@ bool8 AbnormalWeatherHasExpired(void) { switch (gSaveBlock1Ptr->location.mapNum) { - case MAP_NUM(UNDERWATER_MARINE_CAVE): - case MAP_NUM(MARINE_CAVE_ENTRANCE): - case MAP_NUM(MARINE_CAVE_END): - case MAP_NUM(TERRA_CAVE_ENTRANCE): - case MAP_NUM(TERRA_CAVE_END): - VarSet(VAR_SHOULD_END_ABNORMAL_WEATHER, 1); - return FALSE; - default: - break; + case MAP_NUM(UNDERWATER_MARINE_CAVE): + case MAP_NUM(MARINE_CAVE_ENTRANCE): + case MAP_NUM(MARINE_CAVE_END): + case MAP_NUM(TERRA_CAVE_ENTRANCE): + case MAP_NUM(TERRA_CAVE_END): + VarSet(VAR_SHOULD_END_ABNORMAL_WEATHER, 1); + return FALSE; + default: + break; } } @@ -3632,14 +3484,14 @@ bool8 AbnormalWeatherHasExpired(void) { switch (gSaveBlock1Ptr->location.mapNum) { - case MAP_NUM(UNDERWATER_ROUTE127): - case MAP_NUM(UNDERWATER_ROUTE129): - case MAP_NUM(UNDERWATER_ROUTE105): - case MAP_NUM(UNDERWATER_ROUTE125): - VarSet(VAR_SHOULD_END_ABNORMAL_WEATHER, 1); - return FALSE; - default: - break; + case MAP_NUM(UNDERWATER_ROUTE127): + case MAP_NUM(UNDERWATER_ROUTE129): + case MAP_NUM(UNDERWATER_ROUTE105): + case MAP_NUM(UNDERWATER_ROUTE125): + VarSet(VAR_SHOULD_END_ABNORMAL_WEATHER, 1); + return FALSE; + default: + break; } } @@ -3691,9 +3543,7 @@ u32 GetMartEmployeeObjectEventId(void) if (gSaveBlock1Ptr->location.mapGroup == sPokeMarts[i][0]) { if (gSaveBlock1Ptr->location.mapNum == sPokeMarts[i][1]) - { return sPokeMarts[i][2]; - } } } return 1; @@ -3748,9 +3598,7 @@ static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId) { case 0: if (!FuncIsActiveTask(Task_ReconnectWithLinkPlayers)) - { gTasks[taskId].tState++; - } break; case 1: if (IsLinkTaskFinished() == TRUE) @@ -3781,23 +3629,15 @@ static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId) if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_RETIRE) - { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_BOTH_RETIRE; - } else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_CONTINUE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_RETIRE) - { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_MEMBER_RETIRE; - } else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_CONTINUE) - { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_LEADER_RETIRE; - } else - { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_CONTINUE; - } } gTasks[taskId].tState++; } @@ -3912,9 +3752,7 @@ static void Task_LoopWingFlapSE(u8 taskId) } if (playCount == gSpecialVar_0x8004 - 1) - { DestroyTask(taskId); - } } #undef playCount @@ -3976,9 +3814,7 @@ void GetBattlePyramidHint(void) void ResetHealLocationFromDewford(void) { if (gSaveBlock1Ptr->lastHealLocation.mapGroup == MAP_GROUP(DEWFORD_TOWN) && gSaveBlock1Ptr->lastHealLocation.mapNum == MAP_NUM(DEWFORD_TOWN)) - { SetLastHealLocationWarp(HEAL_LOCATION_PETALBURG_CITY); - } } bool8 InPokemonCenter(void) @@ -4015,9 +3851,7 @@ bool8 InPokemonCenter(void) for (i = 0; sPokemonCenters[i] != 0xFFFF; i++) { if (sPokemonCenters[i] == map) - { return TRUE; - } } return FALSE; } @@ -4192,9 +4026,7 @@ static u16 PlayerLoseRandomTrainerFan(void) u8 idx = 0; if (GetNumFansOfPlayerInTrainerFanClub() == 1) - { return 0; - } for (i = 0; i < ARRAY_COUNT(sFanClubMemberIds); i++) { @@ -4210,9 +4042,7 @@ static u16 PlayerLoseRandomTrainerFan(void) } if (GET_TRAINER_FAN_CLUB_FLAG(sFanClubMemberIds[idx])) - { FLIP_TRAINER_FAN_CLUB_FLAG(sFanClubMemberIds[idx]); - } return idx; } @@ -4277,32 +4107,32 @@ void BufferFanClubTrainerName(void) u8 whichNPCTrainer = 0; switch (gSpecialVar_0x8004) { - case FANCLUB_MEMBER1: - break; - case FANCLUB_MEMBER2: - break; - case FANCLUB_MEMBER3: - whichLinkTrainer = 0; - whichNPCTrainer = 3; - break; - case FANCLUB_MEMBER4: - whichLinkTrainer = 0; - whichNPCTrainer = 1; - break; - case FANCLUB_MEMBER5: - whichLinkTrainer = 1; - whichNPCTrainer = 0; - break; - case FANCLUB_MEMBER6: - whichLinkTrainer = 0; - whichNPCTrainer = 4; - break; - case FANCLUB_MEMBER7: - whichLinkTrainer = 1; - whichNPCTrainer = 5; - break; - case FANCLUB_MEMBER8: - break; + case FANCLUB_MEMBER1: + break; + case FANCLUB_MEMBER2: + break; + case FANCLUB_MEMBER3: + whichLinkTrainer = 0; + whichNPCTrainer = 3; + break; + case FANCLUB_MEMBER4: + whichLinkTrainer = 0; + whichNPCTrainer = 1; + break; + case FANCLUB_MEMBER5: + whichLinkTrainer = 1; + whichNPCTrainer = 0; + break; + case FANCLUB_MEMBER6: + whichLinkTrainer = 0; + whichNPCTrainer = 4; + break; + case FANCLUB_MEMBER7: + whichLinkTrainer = 1; + whichNPCTrainer = 5; + break; + case FANCLUB_MEMBER8: + break; } BufferFanClubTrainerName_(&gSaveBlock1Ptr->linkBattleRecords, whichLinkTrainer, whichNPCTrainer); } @@ -4314,27 +4144,27 @@ static void BufferFanClubTrainerName_(struct LinkBattleRecords *linkRecords, u8 { switch (whichNPCTrainer) { - case 0: - StringCopy(gStringVar1, gText_Wallace); - break; - case 1: - StringCopy(gStringVar1, gText_Steven); - break; - case 2: - StringCopy(gStringVar1, gText_Brawly); - break; - case 3: - StringCopy(gStringVar1, gText_Winona); - break; - case 4: - StringCopy(gStringVar1, gText_Phoebe); - break; - case 5: - StringCopy(gStringVar1, gText_Glacia); - break; - default: - StringCopy(gStringVar1, gText_Wallace); - break; + case 0: + StringCopy(gStringVar1, gText_Wallace); + break; + case 1: + StringCopy(gStringVar1, gText_Steven); + break; + case 2: + StringCopy(gStringVar1, gText_Brawly); + break; + case 3: + StringCopy(gStringVar1, gText_Winona); + break; + case 4: + StringCopy(gStringVar1, gText_Phoebe); + break; + case 5: + StringCopy(gStringVar1, gText_Glacia); + break; + default: + StringCopy(gStringVar1, gText_Wallace); + break; } } else From 9e660b2cdfe7f8ff7cdd73601aae70f5fe09cf5c Mon Sep 17 00:00:00 2001 From: sphericalice Date: Fri, 31 Dec 2021 16:29:11 +0000 Subject: [PATCH 303/417] Update src/field_specials.c Co-authored-by: LOuroboros --- src/field_specials.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/field_specials.c b/src/field_specials.c index 27d8c93af7..b6d057d9f8 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -324,7 +324,8 @@ u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y) *mapNum = MAP_NUM(ROUTE132); *x = 65 - *varCruiseStepCount; } - else if (*varCruiseStepCount < 146) { + else if (*varCruiseStepCount < 146) + { *mapNum = MAP_NUM(ROUTE133); *x = 145 - *varCruiseStepCount; } From 61a0036c47f67a3cb08dd7ac15375b011fa10f63 Mon Sep 17 00:00:00 2001 From: sphericalice Date: Fri, 31 Dec 2021 17:34:46 +0000 Subject: [PATCH 304/417] Clarify ScrollableMultichoice_ProcessInput comment --- src/field_specials.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field_specials.c b/src/field_specials.c index b6d057d9f8..bd6d53caf1 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -2592,7 +2592,7 @@ static void ScrollableMultichoice_ProcessInput(u8 taskId) } else if (input == task->tNumItems - 1) { - // if selected option was the last one (Exit) + // Selected option was the last one (Exit) CloseScrollableMultichoice(taskId); } else From 3bbaf5a15d0bfaa5a002e834f6da9750a1d494a4 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 1 Jan 2022 19:24:34 -0300 Subject: [PATCH 305/417] Optimized SpeciesHasGenderDifference into Base Stat flag --- include/constants/species.h | 7 ++- include/data.h | 1 - src/data.c | 19 ------ src/data/pokemon/base_stats.h | 113 +++++++++++++++++++--------------- src/decompress.c | 4 +- src/pokemon.c | 8 +-- src/pokemon_icon.c | 4 +- src/pokemon_storage_system.c | 4 +- 8 files changed, 77 insertions(+), 83 deletions(-) diff --git a/include/constants/species.h b/include/constants/species.h index 5a410aa5b0..9f79b83d98 100644 --- a/include/constants/species.h +++ b/include/constants/species.h @@ -2472,8 +2472,9 @@ #define HOENN_DEX_COUNT 212 // species flags -#define F_ULTRA_BEAST (1 << 0) -#define F_ALOLAN_FORM (1 << 1) -#define F_GALARIAN_FORM (1 << 2) +#define FLAG_ULTRA_BEAST (1 << 0) +#define FLAG_ALOLAN_FORM (1 << 1) +#define FLAG_GALARIAN_FORM (1 << 2) +#define FLAG_GENDER_DIFFERENCE (1 << 3) #endif // GUARD_CONSTANTS_SPECIES_H diff --git a/include/data.h b/include/data.h index 14de14bae6..8a6d7cef73 100644 --- a/include/data.h +++ b/include/data.h @@ -124,7 +124,6 @@ extern const u8 gEnemyMonElevation[NUM_SPECIES]; extern const union AnimCmd *const *const gMonFrontAnimsPtrTable[]; extern const struct CompressedSpriteSheet gMonFrontPicTable[]; extern const struct CompressedSpriteSheet gMonFrontPicTableFemale[]; -extern const bool8 SpeciesHasGenderDifference[NUM_SPECIES]; extern const struct Trainer gTrainers[]; extern const u8 gTrainerClassNames[][13]; diff --git a/src/data.c b/src/data.c index 2ece62412f..4b216cfd25 100644 --- a/src/data.c +++ b/src/data.c @@ -302,25 +302,6 @@ const union AnimCmd *const gAnims_MonPic[] = #define SPECIES_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species} #define SPECIES_SHINY_PAL(species, pal) [SPECIES_##species] = {pal, SPECIES_##species + SPECIES_SHINY_TAG} -const bool8 SpeciesHasGenderDifference[NUM_SPECIES] = -{ - [SPECIES_EEVEE] = TRUE, - [SPECIES_STARLY] = TRUE, - [SPECIES_STARAVIA] = TRUE, - [SPECIES_STARAPTOR] = TRUE, - [SPECIES_BIDOOF] = TRUE, - [SPECIES_KRICKETOT] = TRUE, - [SPECIES_KRICKETUNE] = TRUE, - [SPECIES_SHINX] = TRUE, - [SPECIES_COMBEE] = TRUE, - [SPECIES_HIPPOPOTAS] = TRUE, - [SPECIES_HIPPOWDON] = TRUE, - [SPECIES_UNFEZANT] = TRUE, - [SPECIES_FRILLISH] = TRUE, - [SPECIES_JELLICENT] = TRUE, - [SPECIES_PYROAR] = TRUE, -}; - #include "data/pokemon_graphics/front_pic_coordinates.h" #include "data/pokemon_graphics/back_pic_coordinates.h" diff --git a/src/data/pokemon/base_stats.h b/src/data/pokemon/base_stats.h index 15e406ae21..8295f12ee1 100644 --- a/src/data/pokemon/base_stats.h +++ b/src/data/pokemon/base_stats.h @@ -3790,6 +3790,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_VAPOREON] = @@ -11194,6 +11195,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_STARAVIA] = @@ -11222,6 +11224,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_STARAPTOR] = @@ -11282,6 +11285,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_BIBAREL] = @@ -11337,6 +11341,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE, ABILITY_RUN_AWAY}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_KRICKETUNE] = @@ -11368,6 +11373,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_SHINX] = @@ -11396,6 +11402,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_LUXIO] = @@ -11736,6 +11743,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_VESPIQUEN] = @@ -12672,6 +12680,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_HIPPOWDON] = @@ -12700,6 +12709,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_SKORUPI] = @@ -14676,6 +14686,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_BLITZLE] = @@ -16767,6 +16778,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_JELLICENT] = @@ -16795,6 +16807,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_ALOMOMOLA] = @@ -18879,6 +18892,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_GENDER_DIFFERENCE, }, [SPECIES_FLABEBE] = @@ -22437,7 +22451,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_BUZZWOLE] = @@ -22467,7 +22481,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_PHEROMOSA] = @@ -22496,7 +22510,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_XURKITREE] = @@ -22525,7 +22539,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_CELESTEELA] = @@ -22556,7 +22570,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_KARTANA] = @@ -22585,7 +22599,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_GUZZLORD] = @@ -22614,7 +22628,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_NECROZMA] = @@ -22729,7 +22743,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_NAGANADEL] = @@ -22758,7 +22772,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_STAKATAKA] = @@ -22787,7 +22801,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = TRUE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_BLACEPHALON] = @@ -22816,7 +22830,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, - .flags = F_ULTRA_BEAST, + .flags = FLAG_ULTRA_BEAST, }, [SPECIES_ZERAORA] = @@ -26779,7 +26793,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_RATICATE_ALOLAN] = @@ -26809,7 +26823,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_RAICHU_ALOLAN] = @@ -26838,7 +26852,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_SANDSHREW_ALOLAN] = @@ -26870,7 +26884,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_SANDSLASH_ALOLAN] = @@ -26899,7 +26913,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_VULPIX_ALOLAN] = @@ -26931,7 +26945,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_NINETALES_ALOLAN] = @@ -26961,7 +26975,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_DIGLETT_ALOLAN] = @@ -26991,7 +27005,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_DUGTRIO_ALOLAN] = @@ -27021,7 +27035,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_MEOWTH_ALOLAN] = @@ -27051,7 +27065,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_PERSIAN_ALOLAN] = @@ -27081,7 +27095,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_GEODUDE_ALOLAN] = @@ -27113,7 +27127,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_GRAVELER_ALOLAN] = @@ -27145,7 +27159,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_GOLEM_ALOLAN] = @@ -27174,7 +27188,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_GRIMER_ALOLAN] = @@ -27206,7 +27220,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_MUK_ALOLAN] = @@ -27236,7 +27250,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_EXEGGUTOR_ALOLAN] = @@ -27265,7 +27279,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_MAROWAK_ALOLAN] = @@ -27294,7 +27308,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = F_ALOLAN_FORM, + .flags = FLAG_ALOLAN_FORM, }, [SPECIES_MEOWTH_GALARIAN] = @@ -27323,7 +27337,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_PONYTA_GALARIAN] = @@ -27352,7 +27366,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_RAPIDASH_GALARIAN] = @@ -27381,7 +27395,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_SLOWPOKE_GALARIAN] = @@ -27410,10 +27424,9 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, - [SPECIES_SLOWBRO_GALARIAN] = { .baseHP = 95, @@ -27440,7 +27453,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_FARFETCHD_GALARIAN] = @@ -27470,7 +27483,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_WEEZING_GALARIAN] = @@ -27502,7 +27515,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_MR_MIME_GALARIAN] = @@ -27531,7 +27544,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_ARTICUNO_GALARIAN] = @@ -27560,7 +27573,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_ZAPDOS_GALARIAN] = @@ -27589,7 +27602,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_MOLTRES_GALARIAN] = @@ -27618,7 +27631,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_SLOWKING_GALARIAN] = @@ -27647,7 +27660,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_CORSOLA_GALARIAN] = @@ -27676,7 +27689,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_ZIGZAGOON_GALARIAN] = @@ -27705,7 +27718,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_LINOONE_GALARIAN] = @@ -27734,7 +27747,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_DARUMAKA_GALARIAN] = @@ -27759,7 +27772,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_HUSTLE, ABILITY_NONE, ABILITY_INNER_FOCUS}, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_DARMANITAN_GALARIAN] = @@ -27788,7 +27801,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_YAMASK_GALARIAN] = @@ -27817,7 +27830,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_STUNFISK_GALARIAN] = @@ -27846,7 +27859,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_PIKACHU_COSPLAY] = @@ -29976,7 +29989,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, - .flags = F_GALARIAN_FORM, + .flags = FLAG_GALARIAN_FORM, }, [SPECIES_DEERLING_SUMMER] = diff --git a/src/decompress.c b/src/decompress.c index c20b6404cf..028679a5b4 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -70,7 +70,7 @@ void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffe void DecompressPicFromTableGender(void* buffer, s32 species, u32 personality) { - if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) DecompressPicFromTable(&gMonFrontPicTableFemale[species], buffer, species); else DecompressPicFromTable(&gMonFrontPicTable[species], buffer, species); @@ -101,7 +101,7 @@ void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 } else if (species > NUM_SPECIES) // is species unknown? draw the ? icon LZ77UnCompWram(gMonFrontPicTable[0].data, dest); - else if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) { if (isFrontPic) LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); diff --git a/src/pokemon.c b/src/pokemon.c index 96ea4798bb..372c2ac6f9 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -7513,14 +7513,14 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) { - if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) return gMonShinyPaletteTableFemale[species].data; else return gMonShinyPaletteTable[species].data; } else { - if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) return gMonPaletteTableFemale[species].data; else return gMonPaletteTable[species].data; @@ -7542,14 +7542,14 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) { - if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) return &gMonShinyPaletteTableFemale[species]; else return &gMonShinyPaletteTable[species]; } else { - if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) return &gMonPaletteTableFemale[species]; else return &gMonPaletteTable[species]; diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index b4f1d03a26..7161e64ded 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -2581,7 +2581,7 @@ u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u if (species > NUM_SPECIES) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG; - else if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); @@ -2758,7 +2758,7 @@ void SpriteCB_MonIcon(struct Sprite *sprite) const u8* GetMonIconTiles(u16 species, u32 personality) { const u8* iconSprite = gMonIconTable[species]; - if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) { iconSprite = gMonIconTableFemale[species]; } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 1a3e8f0fea..cb64c2254e 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -5120,7 +5120,7 @@ static u16 TryLoadMonIconTiles(u16 species, u32 personality) u16 i, offset; // Treat female mons as a seperate species as they may have a different icon than males - if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) species |= 0x8000; // 1 << 15 // Search icon list for this species @@ -5187,7 +5187,7 @@ static struct Sprite *CreateMonIconSprite(u16 species, u32 personality, s16 x, s struct SpriteTemplate template = sSpriteTemplate_MonIcon; species = GetIconSpecies(species, personality); - if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE) { template.paletteTag = PALTAG_MON_ICON_0 + gMonIconPaletteIndicesFemale[species]; } From d328c2e006d0c31905384173eb48a53eeeb58fd7 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 1 Jan 2022 21:07:49 -0300 Subject: [PATCH 306/417] Fixed references by debug menu. --- src/decompress.c | 2 +- src/pokemon_debug.c | 18 +++++++++--------- src/pokemon_icon.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/decompress.c b/src/decompress.c index 028679a5b4..a1f92da2c1 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -128,7 +128,7 @@ static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, vo } else if (species > NUM_SPECIES) // is species unknown? draw the ? icon LZ77UnCompWram(gMonFrontPicTable[0].data, dest); - else if (SpeciesHasGenderDifference[species] && isFemale) + else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) { if (isFrontPic) LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest); diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index d43120e6a5..5c1cf94908 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -417,21 +417,21 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data) FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11); if (data->currentSubmenu == 0) { - if (SpeciesHasGenderDifference[species]) + if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsGender, x, 0, 0, NULL); else AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructions, x, 0, 0, NULL); } else if (data->currentSubmenu == 1) { - if (SpeciesHasGenderDifference[species]) + if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOneGender, x, 0, 0, NULL); else AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOne, x, 0, 0, NULL); } else if (data->currentSubmenu == 2) { - if (SpeciesHasGenderDifference[species]) + if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwoGender, x, 0, 0, NULL); else AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwo, x, 0, 0, NULL); @@ -485,7 +485,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data) text[i++] = CHAR_SPACE; text[i++] = CHAR_HYPHEN; - if (SpeciesHasGenderDifference[species]) + if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) { if (data->isFemale) text[i++] = CHAR_FEMALE; @@ -688,14 +688,14 @@ static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 spe { if (isShiny) { - if (SpeciesHasGenderDifference[species] && isFemale) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) return &gMonShinyPaletteTableFemale[species]; else return &gMonShinyPaletteTable[species]; } else { - if (SpeciesHasGenderDifference[species] && isFemale) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) return &gMonPaletteTableFemale[species]; else return &gMonPaletteTable[species]; @@ -714,14 +714,14 @@ static void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bo if (isShiny) { - if (SpeciesHasGenderDifference[species] && isFemale) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) lzPaletteData = gMonShinyPaletteTableFemale[species].data; else lzPaletteData = gMonShinyPaletteTable[species].data; } else { - if (SpeciesHasGenderDifference[species] && isFemale) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) lzPaletteData = gMonPaletteTableFemale[species].data; else lzPaletteData = gMonPaletteTable[species].data; @@ -1472,7 +1472,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) ReloadPokemonSprites(data); } - if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifference[data->currentmonId]) + if (JOY_NEW(SELECT_BUTTON) && (gBaseStats[data->currentmonId].flags & FLAG_GENDER_DIFFERENCE)) { data->isFemale = !data->isFemale; PrintDigitChars(data); diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 7161e64ded..666330975e 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -2607,7 +2607,7 @@ u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s1 if (species > NUM_SPECIES) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG; - else if (SpeciesHasGenderDifference[species] && isFemale) + else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species]; spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority); @@ -2768,7 +2768,7 @@ const u8* GetMonIconTiles(u16 species, u32 personality) static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale) { const u8* iconSprite = gMonIconTable[species]; - if (SpeciesHasGenderDifference[species] && isFemale) + if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale) { iconSprite = gMonIconTableFemale[species]; } From 7f34b03309c205a47f5a03b9339f5363486b9d78 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 2 Jan 2022 14:34:57 -0300 Subject: [PATCH 307/417] The cries from Chespin to Calyrex are now inserted as compressed cries --- sound/cry_tables.inc | 1688 ++++++++--------- sound/direct_sound_data.inc | 650 +++---- .../{uncomp_aegislash.aif => aegislash.aif} | Bin .../{uncomp_alcremie.aif => alcremie.aif} | Bin .../cries/{uncomp_amaura.aif => amaura.aif} | Bin .../{uncomp_appletun.aif => appletun.aif} | Bin .../cries/{uncomp_applin.aif => applin.aif} | Bin .../{uncomp_araquanid.aif => araquanid.aif} | Bin .../{uncomp_arctovish.aif => arctovish.aif} | Bin .../{uncomp_arctozolt.aif => arctozolt.aif} | Bin .../{uncomp_aromatisse.aif => aromatisse.aif} | Bin .../{uncomp_arrokuda.aif => arrokuda.aif} | Bin .../cries/{uncomp_aurorus.aif => aurorus.aif} | Bin .../cries/{uncomp_avalugg.aif => avalugg.aif} | Bin .../{uncomp_barbaracle.aif => barbaracle.aif} | Bin ...uncomp_barraskewda.aif => barraskewda.aif} | Bin .../{uncomp_bergmite.aif => bergmite.aif} | Bin .../cries/{uncomp_bewear.aif => bewear.aif} | Bin .../cries/{uncomp_binacle.aif => binacle.aif} | Bin ...uncomp_blacephalon.aif => blacephalon.aif} | Bin .../cries/{uncomp_blipbug.aif => blipbug.aif} | Bin .../cries/{uncomp_boltund.aif => boltund.aif} | Bin .../{uncomp_bounsweet.aif => bounsweet.aif} | Bin .../cries/{uncomp_braixen.aif => braixen.aif} | Bin .../cries/{uncomp_brionne.aif => brionne.aif} | Bin .../cries/{uncomp_bruxish.aif => bruxish.aif} | Bin .../{uncomp_bunnelby.aif => bunnelby.aif} | Bin .../{uncomp_buzzwole.aif => buzzwole.aif} | Bin .../cries/{uncomp_calyrex.aif => calyrex.aif} | Bin ...ex_ice_rider.aif => calyrex_ice_rider.aif} | Bin ...dow_rider.aif => calyrex_shadow_rider.aif} | Bin .../cries/{uncomp_carbink.aif => carbink.aif} | Bin .../cries/{uncomp_carkol.aif => carkol.aif} | Bin .../{uncomp_celesteela.aif => celesteela.aif} | Bin ...uncomp_centiskorch.aif => centiskorch.aif} | Bin .../{uncomp_charjabug.aif => charjabug.aif} | Bin .../{uncomp_chesnaught.aif => chesnaught.aif} | Bin .../cries/{uncomp_chespin.aif => chespin.aif} | Bin .../cries/{uncomp_chewtle.aif => chewtle.aif} | Bin .../{uncomp_cinderace.aif => cinderace.aif} | Bin .../{uncomp_clauncher.aif => clauncher.aif} | Bin .../{uncomp_clawitzer.aif => clawitzer.aif} | Bin .../{uncomp_clobbopus.aif => clobbopus.aif} | Bin .../{uncomp_coalossal.aif => coalossal.aif} | Bin .../cries/{uncomp_comfey.aif => comfey.aif} | Bin .../{uncomp_copperajah.aif => copperajah.aif} | Bin ...uncomp_corviknight.aif => corviknight.aif} | Bin ...uncomp_corvisquire.aif => corvisquire.aif} | Bin .../cries/{uncomp_cosmoem.aif => cosmoem.aif} | Bin .../cries/{uncomp_cosmog.aif => cosmog.aif} | Bin sound/direct_sound_samples/cries/cottonee.aif | Bin 11132 -> 9330 bytes ...comp_crabominable.aif => crabominable.aif} | Bin .../{uncomp_crabrawler.aif => crabrawler.aif} | Bin .../{uncomp_cramorant.aif => cramorant.aif} | Bin .../cries/{uncomp_cufant.aif => cufant.aif} | Bin .../cries/{uncomp_cursola.aif => cursola.aif} | Bin .../{uncomp_cutiefly.aif => cutiefly.aif} | Bin .../cries/{uncomp_dartrix.aif => dartrix.aif} | Bin .../{uncomp_decidueye.aif => decidueye.aif} | Bin .../cries/{uncomp_dedenne.aif => dedenne.aif} | Bin .../cries/{uncomp_delphox.aif => delphox.aif} | Bin .../{uncomp_dewpider.aif => dewpider.aif} | Bin .../{uncomp_dhelmise.aif => dhelmise.aif} | Bin .../cries/{uncomp_diancie.aif => diancie.aif} | Bin .../{uncomp_diggersby.aif => diggersby.aif} | Bin .../cries/{uncomp_dottler.aif => dottler.aif} | Bin .../{uncomp_doublade.aif => doublade.aif} | Bin .../{uncomp_dracovish.aif => dracovish.aif} | Bin .../{uncomp_dracozolt.aif => dracozolt.aif} | Bin .../{uncomp_dragalge.aif => dragalge.aif} | Bin .../{uncomp_dragapult.aif => dragapult.aif} | Bin .../{uncomp_drakloak.aif => drakloak.aif} | Bin .../cries/{uncomp_drampa.aif => drampa.aif} | Bin .../cries/{uncomp_drednaw.aif => drednaw.aif} | Bin .../cries/{uncomp_dreepy.aif => dreepy.aif} | Bin .../{uncomp_drizzile.aif => drizzile.aif} | Bin .../cries/{uncomp_dubwool.aif => dubwool.aif} | Bin .../{uncomp_duraludon.aif => duraludon.aif} | Bin .../cries/{uncomp_eiscue.aif => eiscue.aif} | Bin ...e_noice_face.aif => eiscue_noice_face.aif} | Bin .../{uncomp_eldegoss.aif => eldegoss.aif} | Bin sound/direct_sound_samples/cries/elgyem.aif | Bin 17924 -> 10922 bytes .../cries/{uncomp_espurr.aif => espurr.aif} | Bin .../{uncomp_eternatus.aif => eternatus.aif} | Bin ..._eternamax.aif => eternatus_eternamax.aif} | Bin .../cries/{uncomp_falinks.aif => falinks.aif} | Bin .../{uncomp_fennekin.aif => fennekin.aif} | Bin .../cries/{uncomp_flabebe.aif => flabebe.aif} | Bin .../cries/{uncomp_flapple.aif => flapple.aif} | Bin ...uncomp_fletchinder.aif => fletchinder.aif} | Bin .../{uncomp_fletchling.aif => fletchling.aif} | Bin .../cries/{uncomp_floette.aif => floette.aif} | Bin ..._flower.aif => floette_eternal_flower.aif} | Bin .../cries/{uncomp_florges.aif => florges.aif} | Bin .../{uncomp_fomantis.aif => fomantis.aif} | Bin sound/direct_sound_samples/cries/foongus.aif | Bin 12460 -> 7608 bytes .../cries/{uncomp_froakie.aif => froakie.aif} | Bin .../{uncomp_frogadier.aif => frogadier.aif} | Bin .../{uncomp_frosmoth.aif => frosmoth.aif} | Bin .../cries/{uncomp_furfrou.aif => furfrou.aif} | Bin .../{uncomp_glastrier.aif => glastrier.aif} | Bin .../cries/{uncomp_gogoat.aif => gogoat.aif} | Bin .../{uncomp_golisopod.aif => golisopod.aif} | Bin .../cries/{uncomp_goodra.aif => goodra.aif} | Bin .../cries/{uncomp_goomy.aif => goomy.aif} | Bin .../{uncomp_gossifleur.aif => gossifleur.aif} | Bin .../{uncomp_gourgeist.aif => gourgeist.aif} | Bin ...ourgeist_super.aif => gourgeist_super.aif} | Bin .../{uncomp_grapploct.aif => grapploct.aif} | Bin .../{uncomp_greedent.aif => greedent.aif} | Bin .../{uncomp_greninja.aif => greninja.aif} | Bin .../{uncomp_grimmsnarl.aif => grimmsnarl.aif} | Bin .../cries/{uncomp_grookey.aif => grookey.aif} | Bin .../cries/{uncomp_grubbin.aif => grubbin.aif} | Bin .../{uncomp_gumshoos.aif => gumshoos.aif} | Bin .../{uncomp_guzzlord.aif => guzzlord.aif} | Bin .../{uncomp_hakamo_o.aif => hakamo_o.aif} | Bin .../cries/{uncomp_hatenna.aif => hatenna.aif} | Bin .../{uncomp_hatterene.aif => hatterene.aif} | Bin .../cries/{uncomp_hattrem.aif => hattrem.aif} | Bin .../{uncomp_hawlucha.aif => hawlucha.aif} | Bin .../{uncomp_heliolisk.aif => heliolisk.aif} | Bin .../{uncomp_helioptile.aif => helioptile.aif} | Bin .../cries/{uncomp_honedge.aif => honedge.aif} | Bin .../cries/{uncomp_hoopa.aif => hoopa.aif} | Bin ...mp_hoopa_unbound.aif => hoopa_unbound.aif} | Bin .../{uncomp_impidimp.aif => impidimp.aif} | Bin .../{uncomp_incineroar.aif => incineroar.aif} | Bin .../{uncomp_indeedee.aif => indeedee.aif} | Bin ...ndeedee_female.aif => indeedee_female.aif} | Bin .../cries/{uncomp_inkay.aif => inkay.aif} | Bin .../{uncomp_inteleon.aif => inteleon.aif} | Bin .../{uncomp_jangmo_o.aif => jangmo_o.aif} | Bin .../cries/{uncomp_kartana.aif => kartana.aif} | Bin sound/direct_sound_samples/cries/keldeo.aif | Bin 21584 -> 13144 bytes .../cries/{uncomp_klefki.aif => klefki.aif} | Bin .../cries/{uncomp_komala.aif => komala.aif} | Bin .../cries/{uncomp_kommo_o.aif => kommo_o.aif} | Bin .../cries/{uncomp_kubfu.aif => kubfu.aif} | Bin .../cries/{uncomp_litleo.aif => litleo.aif} | Bin .../cries/{uncomp_litten.aif => litten.aif} | Bin .../cries/{uncomp_lunala.aif => lunala.aif} | Bin .../{uncomp_lurantis.aif => lurantis.aif} | Bin .../{uncomp_lycanroc.aif => lycanroc.aif} | Bin ...mp_lycanroc_dusk.aif => lycanroc_dusk.aif} | Bin ...roc_midnight.aif => lycanroc_midnight.aif} | Bin .../{uncomp_magearna.aif => magearna.aif} | Bin .../cries/{uncomp_malamar.aif => malamar.aif} | Bin .../{uncomp_mareanie.aif => mareanie.aif} | Bin .../{uncomp_marshadow.aif => marshadow.aif} | Bin ..._mega_abomasnow.aif => mega_abomasnow.aif} | Bin .../{uncomp_mega_absol.aif => mega_absol.aif} | Bin ...ega_aerodactyl.aif => mega_aerodactyl.aif} | Bin ...uncomp_mega_aggron.aif => mega_aggron.aif} | Bin ...mp_mega_alakazam.aif => mega_alakazam.aif} | Bin ...comp_mega_altaria.aif => mega_altaria.aif} | Bin ...mp_mega_ampharos.aif => mega_ampharos.aif} | Bin ...uncomp_mega_audino.aif => mega_audino.aif} | Bin ...comp_mega_banette.aif => mega_banette.aif} | Bin ...mp_mega_beedrill.aif => mega_beedrill.aif} | Bin ..._mega_blastoise.aif => mega_blastoise.aif} | Bin ...mp_mega_blaziken.aif => mega_blaziken.aif} | Bin ...mp_mega_camerupt.aif => mega_camerupt.aif} | Bin ...a_charizard_x.aif => mega_charizard_x.aif} | Bin ...a_charizard_y.aif => mega_charizard_y.aif} | Bin ...comp_mega_diancie.aif => mega_diancie.aif} | Bin ...comp_mega_gallade.aif => mega_gallade.aif} | Bin ...mp_mega_garchomp.aif => mega_garchomp.aif} | Bin ..._mega_gardevoir.aif => mega_gardevoir.aif} | Bin ...uncomp_mega_gengar.aif => mega_gengar.aif} | Bin ...uncomp_mega_glalie.aif => mega_glalie.aif} | Bin ...mp_mega_gyarados.aif => mega_gyarados.aif} | Bin ..._mega_heracross.aif => mega_heracross.aif} | Bin ...mp_mega_houndoom.aif => mega_houndoom.aif} | Bin ...ega_kangaskhan.aif => mega_kangaskhan.aif} | Bin ...uncomp_mega_latias.aif => mega_latias.aif} | Bin ...uncomp_mega_latios.aif => mega_latios.aif} | Bin ...comp_mega_lopunny.aif => mega_lopunny.aif} | Bin ...comp_mega_lucario.aif => mega_lucario.aif} | Bin ..._mega_manectric.aif => mega_manectric.aif} | Bin ...uncomp_mega_mawile.aif => mega_mawile.aif} | Bin ...mp_mega_medicham.aif => mega_medicham.aif} | Bin ..._mega_metagross.aif => mega_metagross.aif} | Bin ...mp_mega_mewtwo_x.aif => mega_mewtwo_x.aif} | Bin ...mp_mega_mewtwo_y.aif => mega_mewtwo_y.aif} | Bin ...comp_mega_pidgeot.aif => mega_pidgeot.aif} | Bin ...uncomp_mega_pinsir.aif => mega_pinsir.aif} | Bin ...mp_mega_rayquaza.aif => mega_rayquaza.aif} | Bin ...comp_mega_sableye.aif => mega_sableye.aif} | Bin ..._mega_salamence.aif => mega_salamence.aif} | Bin ...mp_mega_sceptile.aif => mega_sceptile.aif} | Bin ...uncomp_mega_scizor.aif => mega_scizor.aif} | Bin ...mp_mega_sharpedo.aif => mega_sharpedo.aif} | Bin ...comp_mega_slowbro.aif => mega_slowbro.aif} | Bin ...comp_mega_steelix.aif => mega_steelix.aif} | Bin ...mp_mega_swampert.aif => mega_swampert.aif} | Bin ..._mega_tyranitar.aif => mega_tyranitar.aif} | Bin ...mp_mega_venusaur.aif => mega_venusaur.aif} | Bin .../{uncomp_melmetal.aif => melmetal.aif} | Bin .../cries/{uncomp_meltan.aif => meltan.aif} | Bin .../{uncomp_meowstic.aif => meowstic.aif} | Bin .../cries/{uncomp_milcery.aif => milcery.aif} | Bin .../cries/{uncomp_mimikyu.aif => mimikyu.aif} | Bin .../cries/{uncomp_minior.aif => minior.aif} | Bin .../{uncomp_morelull.aif => morelull.aif} | Bin .../cries/{uncomp_morgrem.aif => morgrem.aif} | Bin .../cries/{uncomp_morpeko.aif => morpeko.aif} | Bin ..._morpeko_hangry.aif => morpeko_hangry.aif} | Bin .../cries/{uncomp_mr_rime.aif => mr_rime.aif} | Bin .../cries/{uncomp_mudbray.aif => mudbray.aif} | Bin .../{uncomp_mudsdale.aif => mudsdale.aif} | Bin .../{uncomp_naganadel.aif => naganadel.aif} | Bin .../{uncomp_necrozma.aif => necrozma.aif} | Bin ...dawn_wings.aif => necrozma_dawn_wings.aif} | Bin ...a_dusk_mane.aif => necrozma_dusk_mane.aif} | Bin ..._necrozma_ultra.aif => necrozma_ultra.aif} | Bin .../cries/{uncomp_nickit.aif => nickit.aif} | Bin .../{uncomp_nihilego.aif => nihilego.aif} | Bin .../cries/{uncomp_noibat.aif => noibat.aif} | Bin .../cries/{uncomp_noivern.aif => noivern.aif} | Bin .../{uncomp_obstagoon.aif => obstagoon.aif} | Bin .../{uncomp_oranguru.aif => oranguru.aif} | Bin .../{uncomp_orbeetle.aif => orbeetle.aif} | Bin .../{uncomp_oricorio.aif => oricorio.aif} | Bin ...comp_oricorio_pau.aif => oricorio_pau.aif} | Bin ...corio_pom_pom.aif => oricorio_pom_pom.aif} | Bin ..._oricorio_sensu.aif => oricorio_sensu.aif} | Bin .../{uncomp_palossand.aif => palossand.aif} | Bin .../cries/{uncomp_pancham.aif => pancham.aif} | Bin .../cries/{uncomp_pangoro.aif => pangoro.aif} | Bin .../{uncomp_passimian.aif => passimian.aif} | Bin .../{uncomp_perrserker.aif => perrserker.aif} | Bin .../{uncomp_phantump.aif => phantump.aif} | Bin .../{uncomp_pheromosa.aif => pheromosa.aif} | Bin .../cries/{uncomp_pikipek.aif => pikipek.aif} | Bin .../{uncomp_pincurchin.aif => pincurchin.aif} | Bin .../cries/{uncomp_poipole.aif => poipole.aif} | Bin ...uncomp_polteageist.aif => polteageist.aif} | Bin .../cries/{uncomp_popplio.aif => popplio.aif} | Bin ..._primal_groudon.aif => primal_groudon.aif} | Bin ...mp_primal_kyogre.aif => primal_kyogre.aif} | Bin .../{uncomp_primarina.aif => primarina.aif} | Bin .../{uncomp_pumpkaboo.aif => pumpkaboo.aif} | Bin ...umpkaboo_super.aif => pumpkaboo_super.aif} | Bin .../cries/{uncomp_pyroar.aif => pyroar.aif} | Bin .../{uncomp_pyukumuku.aif => pyukumuku.aif} | Bin .../{uncomp_quilladin.aif => quilladin.aif} | Bin .../cries/{uncomp_raboot.aif => raboot.aif} | Bin .../{uncomp_regidrago.aif => regidrago.aif} | Bin .../{uncomp_regieleki.aif => regieleki.aif} | Bin .../{uncomp_ribombee.aif => ribombee.aif} | Bin .../{uncomp_rillaboom.aif => rillaboom.aif} | Bin .../{uncomp_rockruff.aif => rockruff.aif} | Bin .../{uncomp_rolycoly.aif => rolycoly.aif} | Bin .../{uncomp_rookidee.aif => rookidee.aif} | Bin .../cries/{uncomp_rowlet.aif => rowlet.aif} | Bin .../{uncomp_runerigus.aif => runerigus.aif} | Bin .../{uncomp_salandit.aif => salandit.aif} | Bin .../{uncomp_salazzle.aif => salazzle.aif} | Bin .../{uncomp_sandaconda.aif => sandaconda.aif} | Bin .../{uncomp_sandygast.aif => sandygast.aif} | Bin .../{uncomp_scatterbug.aif => scatterbug.aif} | Bin .../{uncomp_scorbunny.aif => scorbunny.aif} | Bin sound/direct_sound_samples/cries/shelmet.aif | Bin 22812 -> 13888 bytes .../{uncomp_shiinotic.aif => shiinotic.aif} | Bin .../{uncomp_silicobra.aif => silicobra.aif} | Bin .../{uncomp_silvally.aif => silvally.aif} | Bin .../{uncomp_sinistea.aif => sinistea.aif} | Bin .../{uncomp_sirfetchd.aif => sirfetchd.aif} | Bin .../{uncomp_sizzlipede.aif => sizzlipede.aif} | Bin .../cries/{uncomp_skiddo.aif => skiddo.aif} | Bin .../cries/{uncomp_skrelp.aif => skrelp.aif} | Bin .../cries/{uncomp_skwovet.aif => skwovet.aif} | Bin .../cries/{uncomp_sliggoo.aif => sliggoo.aif} | Bin ...oke_galarian.aif => slowpoke_galarian.aif} | Bin .../{uncomp_slurpuff.aif => slurpuff.aif} | Bin .../cries/{uncomp_snom.aif => snom.aif} | Bin .../cries/{uncomp_sobble.aif => sobble.aif} | Bin .../{uncomp_solgaleo.aif => solgaleo.aif} | Bin .../{uncomp_spectrier.aif => spectrier.aif} | Bin .../cries/{uncomp_spewpa.aif => spewpa.aif} | Bin .../{uncomp_spritzee.aif => spritzee.aif} | Bin .../{uncomp_stakataka.aif => stakataka.aif} | Bin .../cries/{uncomp_steenee.aif => steenee.aif} | Bin ...uncomp_stonjourner.aif => stonjourner.aif} | Bin .../cries/{uncomp_stufful.aif => stufful.aif} | Bin .../cries/{uncomp_swirlix.aif => swirlix.aif} | Bin sound/direct_sound_samples/cries/swoobat.aif | Bin 21628 -> 18108 bytes .../cries/{uncomp_sylveon.aif => sylveon.aif} | Bin .../{uncomp_talonflame.aif => talonflame.aif} | Bin .../{uncomp_tapu_bulu.aif => tapu_bulu.aif} | Bin .../{uncomp_tapu_fini.aif => tapu_fini.aif} | Bin .../{uncomp_tapu_koko.aif => tapu_koko.aif} | Bin .../{uncomp_tapu_lele.aif => tapu_lele.aif} | Bin .../cries/{uncomp_thievul.aif => thievul.aif} | Bin .../{uncomp_thwackey.aif => thwackey.aif} | Bin .../{uncomp_togedemaru.aif => togedemaru.aif} | Bin .../{uncomp_torracat.aif => torracat.aif} | Bin .../{uncomp_toucannon.aif => toucannon.aif} | Bin .../cries/{uncomp_toxapex.aif => toxapex.aif} | Bin .../cries/{uncomp_toxel.aif => toxel.aif} | Bin .../{uncomp_toxtricity.aif => toxtricity.aif} | Bin ...ity_low_key.aif => toxtricity_low_key.aif} | Bin .../{uncomp_trevenant.aif => trevenant.aif} | Bin .../{uncomp_trumbeak.aif => trumbeak.aif} | Bin .../{uncomp_tsareena.aif => tsareena.aif} | Bin .../{uncomp_turtonator.aif => turtonator.aif} | Bin .../{uncomp_type_null.aif => type_null.aif} | Bin .../{uncomp_tyrantrum.aif => tyrantrum.aif} | Bin .../cries/{uncomp_tyrunt.aif => tyrunt.aif} | Bin .../cries/uncomp_cottonee.aif | Bin 9330 -> 0 bytes .../cries/uncomp_elgyem.aif | Bin 10922 -> 0 bytes .../cries/uncomp_foongus.aif | Bin 7608 -> 0 bytes .../cries/uncomp_keldeo.aif | Bin 13144 -> 0 bytes .../cries/uncomp_shelmet.aif | Bin 13888 -> 0 bytes .../cries/uncomp_swoobat.aif | Bin 18108 -> 0 bytes .../cries/uncomp_yamask.aif | Bin 13782 -> 0 bytes .../cries/{uncomp_urshifu.aif => urshifu.aif} | Bin ...yle.aif => urshifu_rapid_strike_style.aif} | Bin .../{uncomp_vikavolt.aif => vikavolt.aif} | Bin .../{uncomp_vivillon.aif => vivillon.aif} | Bin .../{uncomp_volcanion.aif => volcanion.aif} | Bin .../cries/{uncomp_wimpod.aif => wimpod.aif} | Bin .../{uncomp_wishiwashi.aif => wishiwashi.aif} | Bin ...washi_school.aif => wishiwashi_school.aif} | Bin .../cries/{uncomp_wooloo.aif => wooloo.aif} | Bin .../cries/{uncomp_xerneas.aif => xerneas.aif} | Bin .../{uncomp_xurkitree.aif => xurkitree.aif} | Bin sound/direct_sound_samples/cries/yamask.aif | Bin 16456 -> 13782 bytes .../cries/{uncomp_yamper.aif => yamper.aif} | Bin .../cries/{uncomp_yungoos.aif => yungoos.aif} | Bin .../cries/{uncomp_yveltal.aif => yveltal.aif} | Bin .../cries/{uncomp_zacian.aif => zacian.aif} | Bin ...ned_sword.aif => zacian_crowned_sword.aif} | Bin .../{uncomp_zamazenta.aif => zamazenta.aif} | Bin ...hield.aif => zamazenta_crowned_shield.aif} | Bin .../cries/{uncomp_zarude.aif => zarude.aif} | Bin .../cries/{uncomp_zeraora.aif => zeraora.aif} | Bin .../cries/{uncomp_zygarde.aif => zygarde.aif} | Bin .../{uncomp_zygarde_10.aif => zygarde_10.aif} | Bin ...arde_complete.aif => zygarde_complete.aif} | Bin 341 files changed, 1169 insertions(+), 1169 deletions(-) rename sound/direct_sound_samples/cries/{uncomp_aegislash.aif => aegislash.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_alcremie.aif => alcremie.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_amaura.aif => amaura.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_appletun.aif => appletun.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_applin.aif => applin.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_araquanid.aif => araquanid.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_arctovish.aif => arctovish.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_arctozolt.aif => arctozolt.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_aromatisse.aif => aromatisse.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_arrokuda.aif => arrokuda.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_aurorus.aif => aurorus.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_avalugg.aif => avalugg.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_barbaracle.aif => barbaracle.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_barraskewda.aif => barraskewda.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_bergmite.aif => bergmite.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_bewear.aif => bewear.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_binacle.aif => binacle.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_blacephalon.aif => blacephalon.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_blipbug.aif => blipbug.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_boltund.aif => boltund.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_bounsweet.aif => bounsweet.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_braixen.aif => braixen.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_brionne.aif => brionne.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_bruxish.aif => bruxish.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_bunnelby.aif => bunnelby.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_buzzwole.aif => buzzwole.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_calyrex.aif => calyrex.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_calyrex_ice_rider.aif => calyrex_ice_rider.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_calyrex_shadow_rider.aif => calyrex_shadow_rider.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_carbink.aif => carbink.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_carkol.aif => carkol.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_celesteela.aif => celesteela.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_centiskorch.aif => centiskorch.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_charjabug.aif => charjabug.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_chesnaught.aif => chesnaught.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_chespin.aif => chespin.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_chewtle.aif => chewtle.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_cinderace.aif => cinderace.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_clauncher.aif => clauncher.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_clawitzer.aif => clawitzer.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_clobbopus.aif => clobbopus.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_coalossal.aif => coalossal.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_comfey.aif => comfey.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_copperajah.aif => copperajah.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_corviknight.aif => corviknight.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_corvisquire.aif => corvisquire.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_cosmoem.aif => cosmoem.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_cosmog.aif => cosmog.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_crabominable.aif => crabominable.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_crabrawler.aif => crabrawler.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_cramorant.aif => cramorant.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_cufant.aif => cufant.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_cursola.aif => cursola.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_cutiefly.aif => cutiefly.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dartrix.aif => dartrix.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_decidueye.aif => decidueye.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dedenne.aif => dedenne.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_delphox.aif => delphox.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dewpider.aif => dewpider.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dhelmise.aif => dhelmise.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_diancie.aif => diancie.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_diggersby.aif => diggersby.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dottler.aif => dottler.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_doublade.aif => doublade.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dracovish.aif => dracovish.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dracozolt.aif => dracozolt.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dragalge.aif => dragalge.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dragapult.aif => dragapult.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_drakloak.aif => drakloak.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_drampa.aif => drampa.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_drednaw.aif => drednaw.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dreepy.aif => dreepy.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_drizzile.aif => drizzile.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_dubwool.aif => dubwool.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_duraludon.aif => duraludon.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_eiscue.aif => eiscue.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_eiscue_noice_face.aif => eiscue_noice_face.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_eldegoss.aif => eldegoss.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_espurr.aif => espurr.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_eternatus.aif => eternatus.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_eternatus_eternamax.aif => eternatus_eternamax.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_falinks.aif => falinks.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_fennekin.aif => fennekin.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_flabebe.aif => flabebe.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_flapple.aif => flapple.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_fletchinder.aif => fletchinder.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_fletchling.aif => fletchling.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_floette.aif => floette.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_floette_eternal_flower.aif => floette_eternal_flower.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_florges.aif => florges.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_fomantis.aif => fomantis.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_froakie.aif => froakie.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_frogadier.aif => frogadier.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_frosmoth.aif => frosmoth.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_furfrou.aif => furfrou.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_glastrier.aif => glastrier.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_gogoat.aif => gogoat.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_golisopod.aif => golisopod.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_goodra.aif => goodra.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_goomy.aif => goomy.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_gossifleur.aif => gossifleur.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_gourgeist.aif => gourgeist.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_gourgeist_super.aif => gourgeist_super.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_grapploct.aif => grapploct.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_greedent.aif => greedent.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_greninja.aif => greninja.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_grimmsnarl.aif => grimmsnarl.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_grookey.aif => grookey.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_grubbin.aif => grubbin.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_gumshoos.aif => gumshoos.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_guzzlord.aif => guzzlord.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_hakamo_o.aif => hakamo_o.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_hatenna.aif => hatenna.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_hatterene.aif => hatterene.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_hattrem.aif => hattrem.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_hawlucha.aif => hawlucha.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_heliolisk.aif => heliolisk.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_helioptile.aif => helioptile.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_honedge.aif => honedge.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_hoopa.aif => hoopa.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_hoopa_unbound.aif => hoopa_unbound.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_impidimp.aif => impidimp.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_incineroar.aif => incineroar.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_indeedee.aif => indeedee.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_indeedee_female.aif => indeedee_female.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_inkay.aif => inkay.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_inteleon.aif => inteleon.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_jangmo_o.aif => jangmo_o.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_kartana.aif => kartana.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_klefki.aif => klefki.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_komala.aif => komala.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_kommo_o.aif => kommo_o.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_kubfu.aif => kubfu.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_litleo.aif => litleo.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_litten.aif => litten.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_lunala.aif => lunala.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_lurantis.aif => lurantis.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_lycanroc.aif => lycanroc.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_lycanroc_dusk.aif => lycanroc_dusk.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_lycanroc_midnight.aif => lycanroc_midnight.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_magearna.aif => magearna.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_malamar.aif => malamar.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mareanie.aif => mareanie.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_marshadow.aif => marshadow.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_abomasnow.aif => mega_abomasnow.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_absol.aif => mega_absol.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_aerodactyl.aif => mega_aerodactyl.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_aggron.aif => mega_aggron.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_alakazam.aif => mega_alakazam.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_altaria.aif => mega_altaria.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_ampharos.aif => mega_ampharos.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_audino.aif => mega_audino.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_banette.aif => mega_banette.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_beedrill.aif => mega_beedrill.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_blastoise.aif => mega_blastoise.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_blaziken.aif => mega_blaziken.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_camerupt.aif => mega_camerupt.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_charizard_x.aif => mega_charizard_x.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_charizard_y.aif => mega_charizard_y.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_diancie.aif => mega_diancie.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_gallade.aif => mega_gallade.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_garchomp.aif => mega_garchomp.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_gardevoir.aif => mega_gardevoir.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_gengar.aif => mega_gengar.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_glalie.aif => mega_glalie.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_gyarados.aif => mega_gyarados.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_heracross.aif => mega_heracross.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_houndoom.aif => mega_houndoom.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_kangaskhan.aif => mega_kangaskhan.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_latias.aif => mega_latias.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_latios.aif => mega_latios.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_lopunny.aif => mega_lopunny.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_lucario.aif => mega_lucario.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_manectric.aif => mega_manectric.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_mawile.aif => mega_mawile.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_medicham.aif => mega_medicham.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_metagross.aif => mega_metagross.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_mewtwo_x.aif => mega_mewtwo_x.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_mewtwo_y.aif => mega_mewtwo_y.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_pidgeot.aif => mega_pidgeot.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_pinsir.aif => mega_pinsir.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_rayquaza.aif => mega_rayquaza.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_sableye.aif => mega_sableye.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_salamence.aif => mega_salamence.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_sceptile.aif => mega_sceptile.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_scizor.aif => mega_scizor.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_sharpedo.aif => mega_sharpedo.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_slowbro.aif => mega_slowbro.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_steelix.aif => mega_steelix.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_swampert.aif => mega_swampert.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_tyranitar.aif => mega_tyranitar.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mega_venusaur.aif => mega_venusaur.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_melmetal.aif => melmetal.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_meltan.aif => meltan.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_meowstic.aif => meowstic.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_milcery.aif => milcery.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mimikyu.aif => mimikyu.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_minior.aif => minior.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_morelull.aif => morelull.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_morgrem.aif => morgrem.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_morpeko.aif => morpeko.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_morpeko_hangry.aif => morpeko_hangry.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mr_rime.aif => mr_rime.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mudbray.aif => mudbray.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_mudsdale.aif => mudsdale.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_naganadel.aif => naganadel.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_necrozma.aif => necrozma.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_necrozma_dawn_wings.aif => necrozma_dawn_wings.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_necrozma_dusk_mane.aif => necrozma_dusk_mane.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_necrozma_ultra.aif => necrozma_ultra.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_nickit.aif => nickit.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_nihilego.aif => nihilego.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_noibat.aif => noibat.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_noivern.aif => noivern.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_obstagoon.aif => obstagoon.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_oranguru.aif => oranguru.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_orbeetle.aif => orbeetle.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_oricorio.aif => oricorio.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_oricorio_pau.aif => oricorio_pau.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_oricorio_pom_pom.aif => oricorio_pom_pom.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_oricorio_sensu.aif => oricorio_sensu.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_palossand.aif => palossand.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pancham.aif => pancham.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pangoro.aif => pangoro.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_passimian.aif => passimian.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_perrserker.aif => perrserker.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_phantump.aif => phantump.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pheromosa.aif => pheromosa.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pikipek.aif => pikipek.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pincurchin.aif => pincurchin.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_poipole.aif => poipole.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_polteageist.aif => polteageist.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_popplio.aif => popplio.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_primal_groudon.aif => primal_groudon.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_primal_kyogre.aif => primal_kyogre.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_primarina.aif => primarina.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pumpkaboo.aif => pumpkaboo.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pumpkaboo_super.aif => pumpkaboo_super.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pyroar.aif => pyroar.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_pyukumuku.aif => pyukumuku.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_quilladin.aif => quilladin.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_raboot.aif => raboot.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_regidrago.aif => regidrago.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_regieleki.aif => regieleki.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_ribombee.aif => ribombee.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_rillaboom.aif => rillaboom.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_rockruff.aif => rockruff.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_rolycoly.aif => rolycoly.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_rookidee.aif => rookidee.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_rowlet.aif => rowlet.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_runerigus.aif => runerigus.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_salandit.aif => salandit.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_salazzle.aif => salazzle.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_sandaconda.aif => sandaconda.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_sandygast.aif => sandygast.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_scatterbug.aif => scatterbug.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_scorbunny.aif => scorbunny.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_shiinotic.aif => shiinotic.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_silicobra.aif => silicobra.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_silvally.aif => silvally.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_sinistea.aif => sinistea.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_sirfetchd.aif => sirfetchd.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_sizzlipede.aif => sizzlipede.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_skiddo.aif => skiddo.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_skrelp.aif => skrelp.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_skwovet.aif => skwovet.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_sliggoo.aif => sliggoo.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_slowpoke_galarian.aif => slowpoke_galarian.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_slurpuff.aif => slurpuff.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_snom.aif => snom.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_sobble.aif => sobble.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_solgaleo.aif => solgaleo.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_spectrier.aif => spectrier.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_spewpa.aif => spewpa.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_spritzee.aif => spritzee.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_stakataka.aif => stakataka.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_steenee.aif => steenee.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_stonjourner.aif => stonjourner.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_stufful.aif => stufful.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_swirlix.aif => swirlix.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_sylveon.aif => sylveon.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_talonflame.aif => talonflame.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_tapu_bulu.aif => tapu_bulu.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_tapu_fini.aif => tapu_fini.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_tapu_koko.aif => tapu_koko.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_tapu_lele.aif => tapu_lele.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_thievul.aif => thievul.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_thwackey.aif => thwackey.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_togedemaru.aif => togedemaru.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_torracat.aif => torracat.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_toucannon.aif => toucannon.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_toxapex.aif => toxapex.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_toxel.aif => toxel.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_toxtricity.aif => toxtricity.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_toxtricity_low_key.aif => toxtricity_low_key.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_trevenant.aif => trevenant.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_trumbeak.aif => trumbeak.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_tsareena.aif => tsareena.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_turtonator.aif => turtonator.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_type_null.aif => type_null.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_tyrantrum.aif => tyrantrum.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_tyrunt.aif => tyrunt.aif} (100%) delete mode 100644 sound/direct_sound_samples/cries/uncomp_cottonee.aif delete mode 100644 sound/direct_sound_samples/cries/uncomp_elgyem.aif delete mode 100644 sound/direct_sound_samples/cries/uncomp_foongus.aif delete mode 100644 sound/direct_sound_samples/cries/uncomp_keldeo.aif delete mode 100644 sound/direct_sound_samples/cries/uncomp_shelmet.aif delete mode 100644 sound/direct_sound_samples/cries/uncomp_swoobat.aif delete mode 100644 sound/direct_sound_samples/cries/uncomp_yamask.aif rename sound/direct_sound_samples/cries/{uncomp_urshifu.aif => urshifu.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_urshifu_rapid_strike_style.aif => urshifu_rapid_strike_style.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_vikavolt.aif => vikavolt.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_vivillon.aif => vivillon.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_volcanion.aif => volcanion.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_wimpod.aif => wimpod.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_wishiwashi.aif => wishiwashi.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_wishiwashi_school.aif => wishiwashi_school.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_wooloo.aif => wooloo.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_xerneas.aif => xerneas.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_xurkitree.aif => xurkitree.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_yamper.aif => yamper.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_yungoos.aif => yungoos.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_yveltal.aif => yveltal.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zacian.aif => zacian.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zacian_crowned_sword.aif => zacian_crowned_sword.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zamazenta.aif => zamazenta.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zamazenta_crowned_shield.aif => zamazenta_crowned_shield.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zarude.aif => zarude.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zeraora.aif => zeraora.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zygarde.aif => zygarde.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zygarde_10.aif => zygarde_10.aif} (100%) rename sound/direct_sound_samples/cries/{uncomp_zygarde_complete.aif => zygarde_complete.aif} (100%) diff --git a/sound/cry_tables.inc b/sound/cry_tables.inc index 4a50d6aa67..de81150f03 100644 --- a/sound/cry_tables.inc +++ b/sound/cry_tables.inc @@ -649,307 +649,307 @@ gCryTable:: cry Cry_Keldeo cry Cry_Meloetta cry Cry_Genesect - cry_uncomp Cry_Chespin - cry_uncomp Cry_Quilladin - cry_uncomp Cry_Chesnaught - cry_uncomp Cry_Fennekin - cry_uncomp Cry_Braixen - cry_uncomp Cry_Delphox - cry_uncomp Cry_Froakie - cry_uncomp Cry_Frogadier - cry_uncomp Cry_Greninja - cry_uncomp Cry_Bunnelby - cry_uncomp Cry_Diggersby - cry_uncomp Cry_Fletchling - cry_uncomp Cry_Fletchinder - cry_uncomp Cry_Talonflame - cry_uncomp Cry_Scatterbug - cry_uncomp Cry_Spewpa - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Litleo - cry_uncomp Cry_Pyroar - cry_uncomp Cry_Flabebe - cry_uncomp Cry_Floette - cry_uncomp Cry_Florges - cry_uncomp Cry_Skiddo - cry_uncomp Cry_Gogoat - cry_uncomp Cry_Pancham - cry_uncomp Cry_Pangoro - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Espurr - cry_uncomp Cry_Meowstic - cry_uncomp Cry_Honedge - cry_uncomp Cry_Doublade - cry_uncomp Cry_Aegislash - cry_uncomp Cry_Spritzee - cry_uncomp Cry_Aromatisse - cry_uncomp Cry_Swirlix - cry_uncomp Cry_Slurpuff - cry_uncomp Cry_Inkay - cry_uncomp Cry_Malamar - cry_uncomp Cry_Binacle - cry_uncomp Cry_Barbaracle - cry_uncomp Cry_Skrelp - cry_uncomp Cry_Dragalge - cry_uncomp Cry_Clauncher - cry_uncomp Cry_Clawitzer - cry_uncomp Cry_Helioptile - cry_uncomp Cry_Heliolisk - cry_uncomp Cry_Tyrunt - cry_uncomp Cry_Tyrantrum - cry_uncomp Cry_Amaura - cry_uncomp Cry_Aurorus - cry_uncomp Cry_Sylveon - cry_uncomp Cry_Hawlucha - cry_uncomp Cry_Dedenne - cry_uncomp Cry_Carbink - cry_uncomp Cry_Goomy - cry_uncomp Cry_Sliggoo - cry_uncomp Cry_Goodra - cry_uncomp Cry_Klefki - cry_uncomp Cry_Phantump - cry_uncomp Cry_Trevenant - cry_uncomp Cry_Pumpkaboo - cry_uncomp Cry_Gourgeist - cry_uncomp Cry_Bergmite - cry_uncomp Cry_Avalugg - cry_uncomp Cry_Noibat - cry_uncomp Cry_Noivern - cry_uncomp Cry_Xerneas - cry_uncomp Cry_Yveltal - cry_uncomp Cry_Zygarde - cry_uncomp Cry_Diancie - cry_uncomp Cry_Hoopa - cry_uncomp Cry_Volcanion - cry_uncomp Cry_Rowlet - cry_uncomp Cry_Dartrix - cry_uncomp Cry_Decidueye - cry_uncomp Cry_Litten - cry_uncomp Cry_Torracat - cry_uncomp Cry_Incineroar - cry_uncomp Cry_Popplio - cry_uncomp Cry_Brionne - cry_uncomp Cry_Primarina - cry_uncomp Cry_Pikipek - cry_uncomp Cry_Trumbeak - cry_uncomp Cry_Toucannon - cry_uncomp Cry_Yungoos - cry_uncomp Cry_Gumshoos - cry_uncomp Cry_Grubbin - cry_uncomp Cry_Charjabug - cry_uncomp Cry_Vikavolt - cry_uncomp Cry_Crabrawler - cry_uncomp Cry_Crabominable - cry_uncomp Cry_Oricorio - cry_uncomp Cry_Cutiefly - cry_uncomp Cry_Ribombee - cry_uncomp Cry_Rockruff - cry_uncomp Cry_Lycanroc - cry_uncomp Cry_Wishiwashi - cry_uncomp Cry_Mareanie - cry_uncomp Cry_Toxapex - cry_uncomp Cry_Mudbray - cry_uncomp Cry_Mudsdale - cry_uncomp Cry_Dewpider - cry_uncomp Cry_Araquanid - cry_uncomp Cry_Fomantis - cry_uncomp Cry_Lurantis - cry_uncomp Cry_Morelull - cry_uncomp Cry_Shiinotic - cry_uncomp Cry_Salandit - cry_uncomp Cry_Salazzle - cry_uncomp Cry_Stufful - cry_uncomp Cry_Bewear - cry_uncomp Cry_Bounsweet - cry_uncomp Cry_Steenee - cry_uncomp Cry_Tsareena - cry_uncomp Cry_Comfey - cry_uncomp Cry_Oranguru - cry_uncomp Cry_Passimian - cry_uncomp Cry_Wimpod - cry_uncomp Cry_Golisopod - cry_uncomp Cry_Sandygast - cry_uncomp Cry_Palossand - cry_uncomp Cry_Pyukumuku - cry_uncomp Cry_TypeNull - cry_uncomp Cry_Silvally - cry_uncomp Cry_Minior - cry_uncomp Cry_Komala - cry_uncomp Cry_Turtonator - cry_uncomp Cry_Togedemaru - cry_uncomp Cry_Mimikyu - cry_uncomp Cry_Bruxish - cry_uncomp Cry_Drampa - cry_uncomp Cry_Dhelmise - cry_uncomp Cry_Jangmoo - cry_uncomp Cry_Hakamoo - cry_uncomp Cry_Kommoo - cry_uncomp Cry_TapuKoko - cry_uncomp Cry_TapuLele - cry_uncomp Cry_TapuBulu - cry_uncomp Cry_TapuFini - cry_uncomp Cry_Cosmog - cry_uncomp Cry_Cosmoem - cry_uncomp Cry_Solgaleo - cry_uncomp Cry_Lunala - cry_uncomp Cry_Nihilego - cry_uncomp Cry_Buzzwole - cry_uncomp Cry_Pheromosa - cry_uncomp Cry_Xurkitree - cry_uncomp Cry_Celesteela - cry_uncomp Cry_Kartana - cry_uncomp Cry_Guzzlord - cry_uncomp Cry_Necrozma - cry_uncomp Cry_Magearna - cry_uncomp Cry_Marshadow - cry_uncomp Cry_Poipole - cry_uncomp Cry_Naganadel - cry_uncomp Cry_Stakataka - cry_uncomp Cry_Blacephalon - cry_uncomp Cry_Zeraora - cry_uncomp Cry_Meltan - cry_uncomp Cry_Melmetal - cry_uncomp Cry_Grookey - cry_uncomp Cry_Thwackey - cry_uncomp Cry_Rillaboom - cry_uncomp Cry_Scorbunny - cry_uncomp Cry_Raboot - cry_uncomp Cry_Cinderace - cry_uncomp Cry_Sobble - cry_uncomp Cry_Drizzile - cry_uncomp Cry_Inteleon - cry_uncomp Cry_Skwovet - cry_uncomp Cry_Greedent - cry_uncomp Cry_Rookidee - cry_uncomp Cry_Corvisquire - cry_uncomp Cry_Corviknight - cry_uncomp Cry_Blipbug - cry_uncomp Cry_Dottler - cry_uncomp Cry_Orbeetle - cry_uncomp Cry_Nickit - cry_uncomp Cry_Thievul - cry_uncomp Cry_Gossifleur - cry_uncomp Cry_Eldegoss - cry_uncomp Cry_Wooloo - cry_uncomp Cry_Dubwool - cry_uncomp Cry_Chewtle - cry_uncomp Cry_Drednaw - cry_uncomp Cry_Yamper - cry_uncomp Cry_Boltund - cry_uncomp Cry_Rolycoly - cry_uncomp Cry_Carkol - cry_uncomp Cry_Coalossal - cry_uncomp Cry_Applin - cry_uncomp Cry_Flapple - cry_uncomp Cry_Appletun - cry_uncomp Cry_Silicobra - cry_uncomp Cry_Sandaconda - cry_uncomp Cry_Cramorant - cry_uncomp Cry_Arrokuda - cry_uncomp Cry_Barraskewda - cry_uncomp Cry_Toxel - cry_uncomp Cry_Toxtricity - cry_uncomp Cry_Sizzlipede - cry_uncomp Cry_Centiskorch - cry_uncomp Cry_Clobbopus - cry_uncomp Cry_Grapploct - cry_uncomp Cry_Sinistea - cry_uncomp Cry_Polteageist - cry_uncomp Cry_Hatenna - cry_uncomp Cry_Hattrem - cry_uncomp Cry_Hatterene - cry_uncomp Cry_Impidimp - cry_uncomp Cry_Morgrem - cry_uncomp Cry_Grimmsnarl - cry_uncomp Cry_Obstagoon - cry_uncomp Cry_Perrserker - cry_uncomp Cry_Cursola - cry_uncomp Cry_Sirfetchd - cry_uncomp Cry_MrRime - cry_uncomp Cry_Runerigus - cry_uncomp Cry_Milcery - cry_uncomp Cry_Alcremie - cry_uncomp Cry_Falinks - cry_uncomp Cry_Pincurchin - cry_uncomp Cry_Snom - cry_uncomp Cry_Frosmoth - cry_uncomp Cry_Stonjourner - cry_uncomp Cry_Eiscue - cry_uncomp Cry_Indeedee - cry_uncomp Cry_Morpeko - cry_uncomp Cry_Cufant - cry_uncomp Cry_Copperajah - cry_uncomp Cry_Dracozolt - cry_uncomp Cry_Arctozolt - cry_uncomp Cry_Dracovish - cry_uncomp Cry_Arctovish - cry_uncomp Cry_Duraludon - cry_uncomp Cry_Dreepy - cry_uncomp Cry_Drakloak - cry_uncomp Cry_Dragapult - cry_uncomp Cry_Zacian - cry_uncomp Cry_Zamazenta - cry_uncomp Cry_Eternatus - cry_uncomp Cry_Kubfu - cry_uncomp Cry_Urshifu - cry_uncomp Cry_Zarude - cry_uncomp Cry_Regieleki - cry_uncomp Cry_Regidrago - cry_uncomp Cry_Glastrier - cry_uncomp Cry_Spectrier - cry_uncomp Cry_Calyrex + cry Cry_Chespin + cry Cry_Quilladin + cry Cry_Chesnaught + cry Cry_Fennekin + cry Cry_Braixen + cry Cry_Delphox + cry Cry_Froakie + cry Cry_Frogadier + cry Cry_Greninja + cry Cry_Bunnelby + cry Cry_Diggersby + cry Cry_Fletchling + cry Cry_Fletchinder + cry Cry_Talonflame + cry Cry_Scatterbug + cry Cry_Spewpa + cry Cry_Vivillon + cry Cry_Litleo + cry Cry_Pyroar + cry Cry_Flabebe + cry Cry_Floette + cry Cry_Florges + cry Cry_Skiddo + cry Cry_Gogoat + cry Cry_Pancham + cry Cry_Pangoro + cry Cry_Furfrou + cry Cry_Espurr + cry Cry_Meowstic + cry Cry_Honedge + cry Cry_Doublade + cry Cry_Aegislash + cry Cry_Spritzee + cry Cry_Aromatisse + cry Cry_Swirlix + cry Cry_Slurpuff + cry Cry_Inkay + cry Cry_Malamar + cry Cry_Binacle + cry Cry_Barbaracle + cry Cry_Skrelp + cry Cry_Dragalge + cry Cry_Clauncher + cry Cry_Clawitzer + cry Cry_Helioptile + cry Cry_Heliolisk + cry Cry_Tyrunt + cry Cry_Tyrantrum + cry Cry_Amaura + cry Cry_Aurorus + cry Cry_Sylveon + cry Cry_Hawlucha + cry Cry_Dedenne + cry Cry_Carbink + cry Cry_Goomy + cry Cry_Sliggoo + cry Cry_Goodra + cry Cry_Klefki + cry Cry_Phantump + cry Cry_Trevenant + cry Cry_Pumpkaboo + cry Cry_Gourgeist + cry Cry_Bergmite + cry Cry_Avalugg + cry Cry_Noibat + cry Cry_Noivern + cry Cry_Xerneas + cry Cry_Yveltal + cry Cry_Zygarde + cry Cry_Diancie + cry Cry_Hoopa + cry Cry_Volcanion + cry Cry_Rowlet + cry Cry_Dartrix + cry Cry_Decidueye + cry Cry_Litten + cry Cry_Torracat + cry Cry_Incineroar + cry Cry_Popplio + cry Cry_Brionne + cry Cry_Primarina + cry Cry_Pikipek + cry Cry_Trumbeak + cry Cry_Toucannon + cry Cry_Yungoos + cry Cry_Gumshoos + cry Cry_Grubbin + cry Cry_Charjabug + cry Cry_Vikavolt + cry Cry_Crabrawler + cry Cry_Crabominable + cry Cry_Oricorio + cry Cry_Cutiefly + cry Cry_Ribombee + cry Cry_Rockruff + cry Cry_Lycanroc + cry Cry_Wishiwashi + cry Cry_Mareanie + cry Cry_Toxapex + cry Cry_Mudbray + cry Cry_Mudsdale + cry Cry_Dewpider + cry Cry_Araquanid + cry Cry_Fomantis + cry Cry_Lurantis + cry Cry_Morelull + cry Cry_Shiinotic + cry Cry_Salandit + cry Cry_Salazzle + cry Cry_Stufful + cry Cry_Bewear + cry Cry_Bounsweet + cry Cry_Steenee + cry Cry_Tsareena + cry Cry_Comfey + cry Cry_Oranguru + cry Cry_Passimian + cry Cry_Wimpod + cry Cry_Golisopod + cry Cry_Sandygast + cry Cry_Palossand + cry Cry_Pyukumuku + cry Cry_TypeNull + cry Cry_Silvally + cry Cry_Minior + cry Cry_Komala + cry Cry_Turtonator + cry Cry_Togedemaru + cry Cry_Mimikyu + cry Cry_Bruxish + cry Cry_Drampa + cry Cry_Dhelmise + cry Cry_Jangmoo + cry Cry_Hakamoo + cry Cry_Kommoo + cry Cry_TapuKoko + cry Cry_TapuLele + cry Cry_TapuBulu + cry Cry_TapuFini + cry Cry_Cosmog + cry Cry_Cosmoem + cry Cry_Solgaleo + cry Cry_Lunala + cry Cry_Nihilego + cry Cry_Buzzwole + cry Cry_Pheromosa + cry Cry_Xurkitree + cry Cry_Celesteela + cry Cry_Kartana + cry Cry_Guzzlord + cry Cry_Necrozma + cry Cry_Magearna + cry Cry_Marshadow + cry Cry_Poipole + cry Cry_Naganadel + cry Cry_Stakataka + cry Cry_Blacephalon + cry Cry_Zeraora + cry Cry_Meltan + cry Cry_Melmetal + cry Cry_Grookey + cry Cry_Thwackey + cry Cry_Rillaboom + cry Cry_Scorbunny + cry Cry_Raboot + cry Cry_Cinderace + cry Cry_Sobble + cry Cry_Drizzile + cry Cry_Inteleon + cry Cry_Skwovet + cry Cry_Greedent + cry Cry_Rookidee + cry Cry_Corvisquire + cry Cry_Corviknight + cry Cry_Blipbug + cry Cry_Dottler + cry Cry_Orbeetle + cry Cry_Nickit + cry Cry_Thievul + cry Cry_Gossifleur + cry Cry_Eldegoss + cry Cry_Wooloo + cry Cry_Dubwool + cry Cry_Chewtle + cry Cry_Drednaw + cry Cry_Yamper + cry Cry_Boltund + cry Cry_Rolycoly + cry Cry_Carkol + cry Cry_Coalossal + cry Cry_Applin + cry Cry_Flapple + cry Cry_Appletun + cry Cry_Silicobra + cry Cry_Sandaconda + cry Cry_Cramorant + cry Cry_Arrokuda + cry Cry_Barraskewda + cry Cry_Toxel + cry Cry_Toxtricity + cry Cry_Sizzlipede + cry Cry_Centiskorch + cry Cry_Clobbopus + cry Cry_Grapploct + cry Cry_Sinistea + cry Cry_Polteageist + cry Cry_Hatenna + cry Cry_Hattrem + cry Cry_Hatterene + cry Cry_Impidimp + cry Cry_Morgrem + cry Cry_Grimmsnarl + cry Cry_Obstagoon + cry Cry_Perrserker + cry Cry_Cursola + cry Cry_Sirfetchd + cry Cry_MrRime + cry Cry_Runerigus + cry Cry_Milcery + cry Cry_Alcremie + cry Cry_Falinks + cry Cry_Pincurchin + cry Cry_Snom + cry Cry_Frosmoth + cry Cry_Stonjourner + cry Cry_Eiscue + cry Cry_Indeedee + cry Cry_Morpeko + cry Cry_Cufant + cry Cry_Copperajah + cry Cry_Dracozolt + cry Cry_Arctozolt + cry Cry_Dracovish + cry Cry_Arctovish + cry Cry_Duraludon + cry Cry_Dreepy + cry Cry_Drakloak + cry Cry_Dragapult + cry Cry_Zacian + cry Cry_Zamazenta + cry Cry_Eternatus + cry Cry_Kubfu + cry Cry_Urshifu + cry Cry_Zarude + cry Cry_Regieleki + cry Cry_Regidrago + cry Cry_Glastrier + cry Cry_Spectrier + cry Cry_Calyrex @ Megas - cry_uncomp Cry_VenusaurMega - cry_uncomp Cry_CharizardMegaX - cry_uncomp Cry_CharizardMegaY - cry_uncomp Cry_BlastoiseMega - cry_uncomp Cry_BeedrillMega - cry_uncomp Cry_PidgeotMega - cry_uncomp Cry_AlakazamMega - cry_uncomp Cry_SlowbroMega - cry_uncomp Cry_GengarMega - cry_uncomp Cry_KangaskhanMega - cry_uncomp Cry_PinsirMega - cry_uncomp Cry_GyaradosMega - cry_uncomp Cry_AerodactylMega - cry_uncomp Cry_MewtwoMegaX - cry_uncomp Cry_MewtwoMegaY - cry_uncomp Cry_AmpharosMega - cry_uncomp Cry_SteelixMega - cry_uncomp Cry_ScizorMega - cry_uncomp Cry_HeracrossMega - cry_uncomp Cry_HoundoomMega - cry_uncomp Cry_TyranitarMega - cry_uncomp Cry_SceptileMega - cry_uncomp Cry_BlazikenMega - cry_uncomp Cry_SwampertMega - cry_uncomp Cry_GardevoirMega - cry_uncomp Cry_SableyeMega - cry_uncomp Cry_MawileMega - cry_uncomp Cry_AggronMega - cry_uncomp Cry_MedichamMega - cry_uncomp Cry_ManectricMega - cry_uncomp Cry_SharpedoMega - cry_uncomp Cry_CameruptMega - cry_uncomp Cry_AltariaMega - cry_uncomp Cry_BanetteMega - cry_uncomp Cry_AbsolMega - cry_uncomp Cry_GlalieMega - cry_uncomp Cry_SalamenceMega - cry_uncomp Cry_MetagrossMega - cry_uncomp Cry_LatiasMega - cry_uncomp Cry_LatiosMega - cry_uncomp Cry_LopunnyMega - cry_uncomp Cry_GarchompMega - cry_uncomp Cry_LucarioMega - cry_uncomp Cry_AbomasnowMega - cry_uncomp Cry_GalladeMega - cry_uncomp Cry_AudinoMega - cry_uncomp Cry_DiancieMega + cry Cry_VenusaurMega + cry Cry_CharizardMegaX + cry Cry_CharizardMegaY + cry Cry_BlastoiseMega + cry Cry_BeedrillMega + cry Cry_PidgeotMega + cry Cry_AlakazamMega + cry Cry_SlowbroMega + cry Cry_GengarMega + cry Cry_KangaskhanMega + cry Cry_PinsirMega + cry Cry_GyaradosMega + cry Cry_AerodactylMega + cry Cry_MewtwoMegaX + cry Cry_MewtwoMegaY + cry Cry_AmpharosMega + cry Cry_SteelixMega + cry Cry_ScizorMega + cry Cry_HeracrossMega + cry Cry_HoundoomMega + cry Cry_TyranitarMega + cry Cry_SceptileMega + cry Cry_BlazikenMega + cry Cry_SwampertMega + cry Cry_GardevoirMega + cry Cry_SableyeMega + cry Cry_MawileMega + cry Cry_AggronMega + cry Cry_MedichamMega + cry Cry_ManectricMega + cry Cry_SharpedoMega + cry Cry_CameruptMega + cry Cry_AltariaMega + cry Cry_BanetteMega + cry Cry_AbsolMega + cry Cry_GlalieMega + cry Cry_SalamenceMega + cry Cry_MetagrossMega + cry Cry_LatiasMega + cry Cry_LatiosMega + cry Cry_LopunnyMega + cry Cry_GarchompMega + cry Cry_LucarioMega + cry Cry_AbomasnowMega + cry Cry_GalladeMega + cry Cry_AudinoMega + cry Cry_DiancieMega @ Special Mega + Primals - cry_uncomp Cry_RayquazaMega - cry_uncomp Cry_KyogrePrimal - cry_uncomp Cry_GroudonPrimal + cry Cry_RayquazaMega + cry Cry_KyogrePrimal + cry Cry_GroudonPrimal @ Alolan Forms cry Cry_Rattata cry Cry_Raticate @@ -973,7 +973,7 @@ gCryTable:: cry Cry_Meowth cry Cry_Ponyta cry Cry_Rapidash - cry_uncomp Cry_SlowpokeGalarian + cry Cry_SlowpokeGalarian cry Cry_Slowbro cry Cry_Farfetchd cry Cry_Weezing @@ -1114,163 +1114,163 @@ gCryTable:: cry Cry_Genesect cry Cry_Genesect @ Greninja - cry_uncomp Cry_Greninja - cry_uncomp Cry_Greninja + cry Cry_Greninja + cry Cry_Greninja @ Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon - cry_uncomp Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon + cry Cry_Vivillon @ Flabébé - cry_uncomp Cry_Flabebe - cry_uncomp Cry_Flabebe - cry_uncomp Cry_Flabebe - cry_uncomp Cry_Flabebe + cry Cry_Flabebe + cry Cry_Flabebe + cry Cry_Flabebe + cry Cry_Flabebe @ Floette - cry_uncomp Cry_Floette - cry_uncomp Cry_Floette - cry_uncomp Cry_Floette - cry_uncomp Cry_Floette - cry_uncomp Cry_FloetteEternalFlower + cry Cry_Floette + cry Cry_Floette + cry Cry_Floette + cry Cry_Floette + cry Cry_FloetteEternalFlower @ Florges - cry_uncomp Cry_Florges - cry_uncomp Cry_Florges - cry_uncomp Cry_Florges - cry_uncomp Cry_Florges + cry Cry_Florges + cry Cry_Florges + cry Cry_Florges + cry Cry_Florges @ Furfrou - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Furfrou - cry_uncomp Cry_Furfrou + cry Cry_Furfrou + cry Cry_Furfrou + cry Cry_Furfrou + cry Cry_Furfrou + cry Cry_Furfrou + cry Cry_Furfrou + cry Cry_Furfrou + cry Cry_Furfrou + cry Cry_Furfrou @ Meowstic - cry_uncomp Cry_Meowstic + cry Cry_Meowstic @ Aegislash - cry_uncomp Cry_Aegislash + cry Cry_Aegislash @ Pumpkaboo - cry_uncomp Cry_Pumpkaboo - cry_uncomp Cry_Pumpkaboo - cry_uncomp Cry_PumpkabooSuper + cry Cry_Pumpkaboo + cry Cry_Pumpkaboo + cry Cry_PumpkabooSuper @ Gourgeist - cry_uncomp Cry_Gourgeist - cry_uncomp Cry_Gourgeist - cry_uncomp Cry_GourgeistSuper + cry Cry_Gourgeist + cry Cry_Gourgeist + cry Cry_GourgeistSuper @ Xerneas - cry_uncomp Cry_Xerneas + cry Cry_Xerneas @ Zygarde - cry_uncomp Cry_Zygarde10 - cry_uncomp Cry_Zygarde10 - cry_uncomp Cry_Zygarde - cry_uncomp Cry_ZygardeComplete + cry Cry_Zygarde10 + cry Cry_Zygarde10 + cry Cry_Zygarde + cry Cry_ZygardeComplete @ Hoopa - cry_uncomp Cry_HoopaUnbound + cry Cry_HoopaUnbound @ Oricorio - cry_uncomp Cry_OricorioPomPom - cry_uncomp Cry_OricorioPau - cry_uncomp Cry_OricorioSensu + cry Cry_OricorioPomPom + cry Cry_OricorioPau + cry Cry_OricorioSensu @ Rockruff - cry_uncomp Cry_Rockruff + cry Cry_Rockruff @ Lycanroc - cry_uncomp Cry_LycanrocMidnight - cry_uncomp Cry_LycanrocDusk + cry Cry_LycanrocMidnight + cry Cry_LycanrocDusk @ Wishiwashi - cry_uncomp Cry_WishiwashiSchool + cry Cry_WishiwashiSchool @ Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally - cry_uncomp Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally + cry Cry_Silvally @ Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior - cry_uncomp Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior + cry Cry_Minior @ Mimikyu - cry_uncomp Cry_Mimikyu + cry Cry_Mimikyu @ Necrozma - cry_uncomp Cry_NecrozmaDuskMane - cry_uncomp Cry_NecrozmaDawnWings - cry_uncomp Cry_NecrozmaUltra + cry Cry_NecrozmaDuskMane + cry Cry_NecrozmaDawnWings + cry Cry_NecrozmaUltra @ Magearna - cry_uncomp Cry_Magearna + cry Cry_Magearna @ Cramorant - cry_uncomp Cry_Cramorant - cry_uncomp Cry_Cramorant + cry Cry_Cramorant + cry Cry_Cramorant @ Toxtricity - cry_uncomp Cry_ToxtricityLowKey + cry Cry_ToxtricityLowKey @ Sinistea - cry_uncomp Cry_Sinistea + cry Cry_Sinistea @ Polteageist - cry_uncomp Cry_Polteageist + cry Cry_Polteageist @ Alcremie - cry_uncomp Cry_Alcremie - cry_uncomp Cry_Alcremie - cry_uncomp Cry_Alcremie - cry_uncomp Cry_Alcremie - cry_uncomp Cry_Alcremie - cry_uncomp Cry_Alcremie - cry_uncomp Cry_Alcremie - cry_uncomp Cry_Alcremie + cry Cry_Alcremie + cry Cry_Alcremie + cry Cry_Alcremie + cry Cry_Alcremie + cry Cry_Alcremie + cry Cry_Alcremie + cry Cry_Alcremie + cry Cry_Alcremie @ Eiscue - cry_uncomp Cry_EiscueNoiceFace + cry Cry_EiscueNoiceFace @ Indeedee - cry_uncomp Cry_IndeedeeFemale + cry Cry_IndeedeeFemale @ Morpeko - cry_uncomp Cry_MorpekoHangry + cry Cry_MorpekoHangry @ Zacian - cry_uncomp Cry_ZacianCrownedSword + cry Cry_ZacianCrownedSword @ Zamazenta - cry_uncomp Cry_ZamazentaCrownedShield + cry Cry_ZamazentaCrownedShield @ Eternatus - cry_uncomp Cry_EternatusEternamax + cry Cry_EternatusEternamax @ Urshifu - cry_uncomp Cry_UrshifuRapidStrikeStyle + cry Cry_UrshifuRapidStrikeStyle @ Zarude - cry_uncomp Cry_Zarude + cry Cry_Zarude @ Calyrex - cry_uncomp Cry_CalyrexIceRider - cry_uncomp Cry_CalyrexShadowRider + cry Cry_CalyrexIceRider + cry Cry_CalyrexShadowRider .align 2 gCryTable_Reverse:: @@ -1923,307 +1923,307 @@ gCryTable_Reverse:: cry_reverse Cry_Keldeo cry_reverse Cry_Meloetta cry_reverse Cry_Genesect - cry_reverse_uncomp Cry_Chespin - cry_reverse_uncomp Cry_Quilladin - cry_reverse_uncomp Cry_Chesnaught - cry_reverse_uncomp Cry_Fennekin - cry_reverse_uncomp Cry_Braixen - cry_reverse_uncomp Cry_Delphox - cry_reverse_uncomp Cry_Froakie - cry_reverse_uncomp Cry_Frogadier - cry_reverse_uncomp Cry_Greninja - cry_reverse_uncomp Cry_Bunnelby - cry_reverse_uncomp Cry_Diggersby - cry_reverse_uncomp Cry_Fletchling - cry_reverse_uncomp Cry_Fletchinder - cry_reverse_uncomp Cry_Talonflame - cry_reverse_uncomp Cry_Scatterbug - cry_reverse_uncomp Cry_Spewpa - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Litleo - cry_reverse_uncomp Cry_Pyroar - cry_reverse_uncomp Cry_Flabebe - cry_reverse_uncomp Cry_Floette - cry_reverse_uncomp Cry_Florges - cry_reverse_uncomp Cry_Skiddo - cry_reverse_uncomp Cry_Gogoat - cry_reverse_uncomp Cry_Pancham - cry_reverse_uncomp Cry_Pangoro - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Espurr - cry_reverse_uncomp Cry_Meowstic - cry_reverse_uncomp Cry_Honedge - cry_reverse_uncomp Cry_Doublade - cry_reverse_uncomp Cry_Aegislash - cry_reverse_uncomp Cry_Spritzee - cry_reverse_uncomp Cry_Aromatisse - cry_reverse_uncomp Cry_Swirlix - cry_reverse_uncomp Cry_Slurpuff - cry_reverse_uncomp Cry_Inkay - cry_reverse_uncomp Cry_Malamar - cry_reverse_uncomp Cry_Binacle - cry_reverse_uncomp Cry_Barbaracle - cry_reverse_uncomp Cry_Skrelp - cry_reverse_uncomp Cry_Dragalge - cry_reverse_uncomp Cry_Clauncher - cry_reverse_uncomp Cry_Clawitzer - cry_reverse_uncomp Cry_Helioptile - cry_reverse_uncomp Cry_Heliolisk - cry_reverse_uncomp Cry_Tyrunt - cry_reverse_uncomp Cry_Tyrantrum - cry_reverse_uncomp Cry_Amaura - cry_reverse_uncomp Cry_Aurorus - cry_reverse_uncomp Cry_Sylveon - cry_reverse_uncomp Cry_Hawlucha - cry_reverse_uncomp Cry_Dedenne - cry_reverse_uncomp Cry_Carbink - cry_reverse_uncomp Cry_Goomy - cry_reverse_uncomp Cry_Sliggoo - cry_reverse_uncomp Cry_Goodra - cry_reverse_uncomp Cry_Klefki - cry_reverse_uncomp Cry_Phantump - cry_reverse_uncomp Cry_Trevenant - cry_reverse_uncomp Cry_Pumpkaboo - cry_reverse_uncomp Cry_Gourgeist - cry_reverse_uncomp Cry_Bergmite - cry_reverse_uncomp Cry_Avalugg - cry_reverse_uncomp Cry_Noibat - cry_reverse_uncomp Cry_Noivern - cry_reverse_uncomp Cry_Xerneas - cry_reverse_uncomp Cry_Yveltal - cry_reverse_uncomp Cry_Zygarde - cry_reverse_uncomp Cry_Diancie - cry_reverse_uncomp Cry_Hoopa - cry_reverse_uncomp Cry_Volcanion - cry_reverse_uncomp Cry_Rowlet - cry_reverse_uncomp Cry_Dartrix - cry_reverse_uncomp Cry_Decidueye - cry_reverse_uncomp Cry_Litten - cry_reverse_uncomp Cry_Torracat - cry_reverse_uncomp Cry_Incineroar - cry_reverse_uncomp Cry_Popplio - cry_reverse_uncomp Cry_Brionne - cry_reverse_uncomp Cry_Primarina - cry_reverse_uncomp Cry_Pikipek - cry_reverse_uncomp Cry_Trumbeak - cry_reverse_uncomp Cry_Toucannon - cry_reverse_uncomp Cry_Yungoos - cry_reverse_uncomp Cry_Gumshoos - cry_reverse_uncomp Cry_Grubbin - cry_reverse_uncomp Cry_Charjabug - cry_reverse_uncomp Cry_Vikavolt - cry_reverse_uncomp Cry_Crabrawler - cry_reverse_uncomp Cry_Crabominable - cry_reverse_uncomp Cry_Oricorio - cry_reverse_uncomp Cry_Cutiefly - cry_reverse_uncomp Cry_Ribombee - cry_reverse_uncomp Cry_Rockruff - cry_reverse_uncomp Cry_Lycanroc - cry_reverse_uncomp Cry_Wishiwashi - cry_reverse_uncomp Cry_Mareanie - cry_reverse_uncomp Cry_Toxapex - cry_reverse_uncomp Cry_Mudbray - cry_reverse_uncomp Cry_Mudsdale - cry_reverse_uncomp Cry_Dewpider - cry_reverse_uncomp Cry_Araquanid - cry_reverse_uncomp Cry_Fomantis - cry_reverse_uncomp Cry_Lurantis - cry_reverse_uncomp Cry_Morelull - cry_reverse_uncomp Cry_Shiinotic - cry_reverse_uncomp Cry_Salandit - cry_reverse_uncomp Cry_Salazzle - cry_reverse_uncomp Cry_Stufful - cry_reverse_uncomp Cry_Bewear - cry_reverse_uncomp Cry_Bounsweet - cry_reverse_uncomp Cry_Steenee - cry_reverse_uncomp Cry_Tsareena - cry_reverse_uncomp Cry_Comfey - cry_reverse_uncomp Cry_Oranguru - cry_reverse_uncomp Cry_Passimian - cry_reverse_uncomp Cry_Wimpod - cry_reverse_uncomp Cry_Golisopod - cry_reverse_uncomp Cry_Sandygast - cry_reverse_uncomp Cry_Palossand - cry_reverse_uncomp Cry_Pyukumuku - cry_reverse_uncomp Cry_TypeNull - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Komala - cry_reverse_uncomp Cry_Turtonator - cry_reverse_uncomp Cry_Togedemaru - cry_reverse_uncomp Cry_Mimikyu - cry_reverse_uncomp Cry_Bruxish - cry_reverse_uncomp Cry_Drampa - cry_reverse_uncomp Cry_Dhelmise - cry_reverse_uncomp Cry_Jangmoo - cry_reverse_uncomp Cry_Hakamoo - cry_reverse_uncomp Cry_Kommoo - cry_reverse_uncomp Cry_TapuKoko - cry_reverse_uncomp Cry_TapuLele - cry_reverse_uncomp Cry_TapuBulu - cry_reverse_uncomp Cry_TapuFini - cry_reverse_uncomp Cry_Cosmog - cry_reverse_uncomp Cry_Cosmoem - cry_reverse_uncomp Cry_Solgaleo - cry_reverse_uncomp Cry_Lunala - cry_reverse_uncomp Cry_Nihilego - cry_reverse_uncomp Cry_Buzzwole - cry_reverse_uncomp Cry_Pheromosa - cry_reverse_uncomp Cry_Xurkitree - cry_reverse_uncomp Cry_Celesteela - cry_reverse_uncomp Cry_Kartana - cry_reverse_uncomp Cry_Guzzlord - cry_reverse_uncomp Cry_Necrozma - cry_reverse_uncomp Cry_Magearna - cry_reverse_uncomp Cry_Marshadow - cry_reverse_uncomp Cry_Poipole - cry_reverse_uncomp Cry_Naganadel - cry_reverse_uncomp Cry_Stakataka - cry_reverse_uncomp Cry_Blacephalon - cry_reverse_uncomp Cry_Zeraora - cry_reverse_uncomp Cry_Meltan - cry_reverse_uncomp Cry_Melmetal - cry_reverse_uncomp Cry_Grookey - cry_reverse_uncomp Cry_Thwackey - cry_reverse_uncomp Cry_Rillaboom - cry_reverse_uncomp Cry_Scorbunny - cry_reverse_uncomp Cry_Raboot - cry_reverse_uncomp Cry_Cinderace - cry_reverse_uncomp Cry_Sobble - cry_reverse_uncomp Cry_Drizzile - cry_reverse_uncomp Cry_Inteleon - cry_reverse_uncomp Cry_Skwovet - cry_reverse_uncomp Cry_Greedent - cry_reverse_uncomp Cry_Rookidee - cry_reverse_uncomp Cry_Corvisquire - cry_reverse_uncomp Cry_Corviknight - cry_reverse_uncomp Cry_Blipbug - cry_reverse_uncomp Cry_Dottler - cry_reverse_uncomp Cry_Orbeetle - cry_reverse_uncomp Cry_Nickit - cry_reverse_uncomp Cry_Thievul - cry_reverse_uncomp Cry_Gossifleur - cry_reverse_uncomp Cry_Eldegoss - cry_reverse_uncomp Cry_Wooloo - cry_reverse_uncomp Cry_Dubwool - cry_reverse_uncomp Cry_Chewtle - cry_reverse_uncomp Cry_Drednaw - cry_reverse_uncomp Cry_Yamper - cry_reverse_uncomp Cry_Boltund - cry_reverse_uncomp Cry_Rolycoly - cry_reverse_uncomp Cry_Carkol - cry_reverse_uncomp Cry_Coalossal - cry_reverse_uncomp Cry_Applin - cry_reverse_uncomp Cry_Flapple - cry_reverse_uncomp Cry_Appletun - cry_reverse_uncomp Cry_Silicobra - cry_reverse_uncomp Cry_Sandaconda - cry_reverse_uncomp Cry_Cramorant - cry_reverse_uncomp Cry_Arrokuda - cry_reverse_uncomp Cry_Barraskewda - cry_reverse_uncomp Cry_Toxel - cry_reverse_uncomp Cry_Toxtricity - cry_reverse_uncomp Cry_Sizzlipede - cry_reverse_uncomp Cry_Centiskorch - cry_reverse_uncomp Cry_Clobbopus - cry_reverse_uncomp Cry_Grapploct - cry_reverse_uncomp Cry_Sinistea - cry_reverse_uncomp Cry_Polteageist - cry_reverse_uncomp Cry_Hatenna - cry_reverse_uncomp Cry_Hattrem - cry_reverse_uncomp Cry_Hatterene - cry_reverse_uncomp Cry_Impidimp - cry_reverse_uncomp Cry_Morgrem - cry_reverse_uncomp Cry_Grimmsnarl - cry_reverse_uncomp Cry_Obstagoon - cry_reverse_uncomp Cry_Perrserker - cry_reverse_uncomp Cry_Cursola - cry_reverse_uncomp Cry_Sirfetchd - cry_reverse_uncomp Cry_MrRime - cry_reverse_uncomp Cry_Runerigus - cry_reverse_uncomp Cry_Milcery - cry_reverse_uncomp Cry_Alcremie - cry_reverse_uncomp Cry_Falinks - cry_reverse_uncomp Cry_Pincurchin - cry_reverse_uncomp Cry_Snom - cry_reverse_uncomp Cry_Frosmoth - cry_reverse_uncomp Cry_Stonjourner - cry_reverse_uncomp Cry_Eiscue - cry_reverse_uncomp Cry_Indeedee - cry_reverse_uncomp Cry_Morpeko - cry_reverse_uncomp Cry_Cufant - cry_reverse_uncomp Cry_Copperajah - cry_reverse_uncomp Cry_Dracozolt - cry_reverse_uncomp Cry_Arctozolt - cry_reverse_uncomp Cry_Dracovish - cry_reverse_uncomp Cry_Arctovish - cry_reverse_uncomp Cry_Duraludon - cry_reverse_uncomp Cry_Dreepy - cry_reverse_uncomp Cry_Drakloak - cry_reverse_uncomp Cry_Dragapult - cry_reverse_uncomp Cry_Zacian - cry_reverse_uncomp Cry_Zamazenta - cry_reverse_uncomp Cry_Eternatus - cry_reverse_uncomp Cry_Kubfu - cry_reverse_uncomp Cry_Urshifu - cry_reverse_uncomp Cry_Zarude - cry_reverse_uncomp Cry_Regieleki - cry_reverse_uncomp Cry_Regidrago - cry_reverse_uncomp Cry_Glastrier - cry_reverse_uncomp Cry_Spectrier - cry_reverse_uncomp Cry_Calyrex + cry_reverse Cry_Chespin + cry_reverse Cry_Quilladin + cry_reverse Cry_Chesnaught + cry_reverse Cry_Fennekin + cry_reverse Cry_Braixen + cry_reverse Cry_Delphox + cry_reverse Cry_Froakie + cry_reverse Cry_Frogadier + cry_reverse Cry_Greninja + cry_reverse Cry_Bunnelby + cry_reverse Cry_Diggersby + cry_reverse Cry_Fletchling + cry_reverse Cry_Fletchinder + cry_reverse Cry_Talonflame + cry_reverse Cry_Scatterbug + cry_reverse Cry_Spewpa + cry_reverse Cry_Vivillon + cry_reverse Cry_Litleo + cry_reverse Cry_Pyroar + cry_reverse Cry_Flabebe + cry_reverse Cry_Floette + cry_reverse Cry_Florges + cry_reverse Cry_Skiddo + cry_reverse Cry_Gogoat + cry_reverse Cry_Pancham + cry_reverse Cry_Pangoro + cry_reverse Cry_Furfrou + cry_reverse Cry_Espurr + cry_reverse Cry_Meowstic + cry_reverse Cry_Honedge + cry_reverse Cry_Doublade + cry_reverse Cry_Aegislash + cry_reverse Cry_Spritzee + cry_reverse Cry_Aromatisse + cry_reverse Cry_Swirlix + cry_reverse Cry_Slurpuff + cry_reverse Cry_Inkay + cry_reverse Cry_Malamar + cry_reverse Cry_Binacle + cry_reverse Cry_Barbaracle + cry_reverse Cry_Skrelp + cry_reverse Cry_Dragalge + cry_reverse Cry_Clauncher + cry_reverse Cry_Clawitzer + cry_reverse Cry_Helioptile + cry_reverse Cry_Heliolisk + cry_reverse Cry_Tyrunt + cry_reverse Cry_Tyrantrum + cry_reverse Cry_Amaura + cry_reverse Cry_Aurorus + cry_reverse Cry_Sylveon + cry_reverse Cry_Hawlucha + cry_reverse Cry_Dedenne + cry_reverse Cry_Carbink + cry_reverse Cry_Goomy + cry_reverse Cry_Sliggoo + cry_reverse Cry_Goodra + cry_reverse Cry_Klefki + cry_reverse Cry_Phantump + cry_reverse Cry_Trevenant + cry_reverse Cry_Pumpkaboo + cry_reverse Cry_Gourgeist + cry_reverse Cry_Bergmite + cry_reverse Cry_Avalugg + cry_reverse Cry_Noibat + cry_reverse Cry_Noivern + cry_reverse Cry_Xerneas + cry_reverse Cry_Yveltal + cry_reverse Cry_Zygarde + cry_reverse Cry_Diancie + cry_reverse Cry_Hoopa + cry_reverse Cry_Volcanion + cry_reverse Cry_Rowlet + cry_reverse Cry_Dartrix + cry_reverse Cry_Decidueye + cry_reverse Cry_Litten + cry_reverse Cry_Torracat + cry_reverse Cry_Incineroar + cry_reverse Cry_Popplio + cry_reverse Cry_Brionne + cry_reverse Cry_Primarina + cry_reverse Cry_Pikipek + cry_reverse Cry_Trumbeak + cry_reverse Cry_Toucannon + cry_reverse Cry_Yungoos + cry_reverse Cry_Gumshoos + cry_reverse Cry_Grubbin + cry_reverse Cry_Charjabug + cry_reverse Cry_Vikavolt + cry_reverse Cry_Crabrawler + cry_reverse Cry_Crabominable + cry_reverse Cry_Oricorio + cry_reverse Cry_Cutiefly + cry_reverse Cry_Ribombee + cry_reverse Cry_Rockruff + cry_reverse Cry_Lycanroc + cry_reverse Cry_Wishiwashi + cry_reverse Cry_Mareanie + cry_reverse Cry_Toxapex + cry_reverse Cry_Mudbray + cry_reverse Cry_Mudsdale + cry_reverse Cry_Dewpider + cry_reverse Cry_Araquanid + cry_reverse Cry_Fomantis + cry_reverse Cry_Lurantis + cry_reverse Cry_Morelull + cry_reverse Cry_Shiinotic + cry_reverse Cry_Salandit + cry_reverse Cry_Salazzle + cry_reverse Cry_Stufful + cry_reverse Cry_Bewear + cry_reverse Cry_Bounsweet + cry_reverse Cry_Steenee + cry_reverse Cry_Tsareena + cry_reverse Cry_Comfey + cry_reverse Cry_Oranguru + cry_reverse Cry_Passimian + cry_reverse Cry_Wimpod + cry_reverse Cry_Golisopod + cry_reverse Cry_Sandygast + cry_reverse Cry_Palossand + cry_reverse Cry_Pyukumuku + cry_reverse Cry_TypeNull + cry_reverse Cry_Silvally + cry_reverse Cry_Minior + cry_reverse Cry_Komala + cry_reverse Cry_Turtonator + cry_reverse Cry_Togedemaru + cry_reverse Cry_Mimikyu + cry_reverse Cry_Bruxish + cry_reverse Cry_Drampa + cry_reverse Cry_Dhelmise + cry_reverse Cry_Jangmoo + cry_reverse Cry_Hakamoo + cry_reverse Cry_Kommoo + cry_reverse Cry_TapuKoko + cry_reverse Cry_TapuLele + cry_reverse Cry_TapuBulu + cry_reverse Cry_TapuFini + cry_reverse Cry_Cosmog + cry_reverse Cry_Cosmoem + cry_reverse Cry_Solgaleo + cry_reverse Cry_Lunala + cry_reverse Cry_Nihilego + cry_reverse Cry_Buzzwole + cry_reverse Cry_Pheromosa + cry_reverse Cry_Xurkitree + cry_reverse Cry_Celesteela + cry_reverse Cry_Kartana + cry_reverse Cry_Guzzlord + cry_reverse Cry_Necrozma + cry_reverse Cry_Magearna + cry_reverse Cry_Marshadow + cry_reverse Cry_Poipole + cry_reverse Cry_Naganadel + cry_reverse Cry_Stakataka + cry_reverse Cry_Blacephalon + cry_reverse Cry_Zeraora + cry_reverse Cry_Meltan + cry_reverse Cry_Melmetal + cry_reverse Cry_Grookey + cry_reverse Cry_Thwackey + cry_reverse Cry_Rillaboom + cry_reverse Cry_Scorbunny + cry_reverse Cry_Raboot + cry_reverse Cry_Cinderace + cry_reverse Cry_Sobble + cry_reverse Cry_Drizzile + cry_reverse Cry_Inteleon + cry_reverse Cry_Skwovet + cry_reverse Cry_Greedent + cry_reverse Cry_Rookidee + cry_reverse Cry_Corvisquire + cry_reverse Cry_Corviknight + cry_reverse Cry_Blipbug + cry_reverse Cry_Dottler + cry_reverse Cry_Orbeetle + cry_reverse Cry_Nickit + cry_reverse Cry_Thievul + cry_reverse Cry_Gossifleur + cry_reverse Cry_Eldegoss + cry_reverse Cry_Wooloo + cry_reverse Cry_Dubwool + cry_reverse Cry_Chewtle + cry_reverse Cry_Drednaw + cry_reverse Cry_Yamper + cry_reverse Cry_Boltund + cry_reverse Cry_Rolycoly + cry_reverse Cry_Carkol + cry_reverse Cry_Coalossal + cry_reverse Cry_Applin + cry_reverse Cry_Flapple + cry_reverse Cry_Appletun + cry_reverse Cry_Silicobra + cry_reverse Cry_Sandaconda + cry_reverse Cry_Cramorant + cry_reverse Cry_Arrokuda + cry_reverse Cry_Barraskewda + cry_reverse Cry_Toxel + cry_reverse Cry_Toxtricity + cry_reverse Cry_Sizzlipede + cry_reverse Cry_Centiskorch + cry_reverse Cry_Clobbopus + cry_reverse Cry_Grapploct + cry_reverse Cry_Sinistea + cry_reverse Cry_Polteageist + cry_reverse Cry_Hatenna + cry_reverse Cry_Hattrem + cry_reverse Cry_Hatterene + cry_reverse Cry_Impidimp + cry_reverse Cry_Morgrem + cry_reverse Cry_Grimmsnarl + cry_reverse Cry_Obstagoon + cry_reverse Cry_Perrserker + cry_reverse Cry_Cursola + cry_reverse Cry_Sirfetchd + cry_reverse Cry_MrRime + cry_reverse Cry_Runerigus + cry_reverse Cry_Milcery + cry_reverse Cry_Alcremie + cry_reverse Cry_Falinks + cry_reverse Cry_Pincurchin + cry_reverse Cry_Snom + cry_reverse Cry_Frosmoth + cry_reverse Cry_Stonjourner + cry_reverse Cry_Eiscue + cry_reverse Cry_Indeedee + cry_reverse Cry_Morpeko + cry_reverse Cry_Cufant + cry_reverse Cry_Copperajah + cry_reverse Cry_Dracozolt + cry_reverse Cry_Arctozolt + cry_reverse Cry_Dracovish + cry_reverse Cry_Arctovish + cry_reverse Cry_Duraludon + cry_reverse Cry_Dreepy + cry_reverse Cry_Drakloak + cry_reverse Cry_Dragapult + cry_reverse Cry_Zacian + cry_reverse Cry_Zamazenta + cry_reverse Cry_Eternatus + cry_reverse Cry_Kubfu + cry_reverse Cry_Urshifu + cry_reverse Cry_Zarude + cry_reverse Cry_Regieleki + cry_reverse Cry_Regidrago + cry_reverse Cry_Glastrier + cry_reverse Cry_Spectrier + cry_reverse Cry_Calyrex @ Megas - cry_reverse_uncomp Cry_VenusaurMega - cry_reverse_uncomp Cry_CharizardMegaX - cry_reverse_uncomp Cry_CharizardMegaY - cry_reverse_uncomp Cry_BlastoiseMega - cry_reverse_uncomp Cry_BeedrillMega - cry_reverse_uncomp Cry_PidgeotMega - cry_reverse_uncomp Cry_AlakazamMega - cry_reverse_uncomp Cry_SlowbroMega - cry_reverse_uncomp Cry_GengarMega - cry_reverse_uncomp Cry_KangaskhanMega - cry_reverse_uncomp Cry_PinsirMega - cry_reverse_uncomp Cry_GyaradosMega - cry_reverse_uncomp Cry_AerodactylMega - cry_reverse_uncomp Cry_MewtwoMegaX - cry_reverse_uncomp Cry_MewtwoMegaY - cry_reverse_uncomp Cry_AmpharosMega - cry_reverse_uncomp Cry_SteelixMega - cry_reverse_uncomp Cry_ScizorMega - cry_reverse_uncomp Cry_HeracrossMega - cry_reverse_uncomp Cry_HoundoomMega - cry_reverse_uncomp Cry_TyranitarMega - cry_reverse_uncomp Cry_SceptileMega - cry_reverse_uncomp Cry_BlazikenMega - cry_reverse_uncomp Cry_SwampertMega - cry_reverse_uncomp Cry_GardevoirMega - cry_reverse_uncomp Cry_SableyeMega - cry_reverse_uncomp Cry_MawileMega - cry_reverse_uncomp Cry_AggronMega - cry_reverse_uncomp Cry_MedichamMega - cry_reverse_uncomp Cry_ManectricMega - cry_reverse_uncomp Cry_SharpedoMega - cry_reverse_uncomp Cry_CameruptMega - cry_reverse_uncomp Cry_AltariaMega - cry_reverse_uncomp Cry_BanetteMega - cry_reverse_uncomp Cry_AbsolMega - cry_reverse_uncomp Cry_GlalieMega - cry_reverse_uncomp Cry_SalamenceMega - cry_reverse_uncomp Cry_MetagrossMega - cry_reverse_uncomp Cry_LatiasMega - cry_reverse_uncomp Cry_LatiosMega - cry_reverse_uncomp Cry_LopunnyMega - cry_reverse_uncomp Cry_GarchompMega - cry_reverse_uncomp Cry_LucarioMega - cry_reverse_uncomp Cry_AbomasnowMega - cry_reverse_uncomp Cry_GalladeMega - cry_reverse_uncomp Cry_AudinoMega - cry_reverse_uncomp Cry_DiancieMega + cry_reverse Cry_VenusaurMega + cry_reverse Cry_CharizardMegaX + cry_reverse Cry_CharizardMegaY + cry_reverse Cry_BlastoiseMega + cry_reverse Cry_BeedrillMega + cry_reverse Cry_PidgeotMega + cry_reverse Cry_AlakazamMega + cry_reverse Cry_SlowbroMega + cry_reverse Cry_GengarMega + cry_reverse Cry_KangaskhanMega + cry_reverse Cry_PinsirMega + cry_reverse Cry_GyaradosMega + cry_reverse Cry_AerodactylMega + cry_reverse Cry_MewtwoMegaX + cry_reverse Cry_MewtwoMegaY + cry_reverse Cry_AmpharosMega + cry_reverse Cry_SteelixMega + cry_reverse Cry_ScizorMega + cry_reverse Cry_HeracrossMega + cry_reverse Cry_HoundoomMega + cry_reverse Cry_TyranitarMega + cry_reverse Cry_SceptileMega + cry_reverse Cry_BlazikenMega + cry_reverse Cry_SwampertMega + cry_reverse Cry_GardevoirMega + cry_reverse Cry_SableyeMega + cry_reverse Cry_MawileMega + cry_reverse Cry_AggronMega + cry_reverse Cry_MedichamMega + cry_reverse Cry_ManectricMega + cry_reverse Cry_SharpedoMega + cry_reverse Cry_CameruptMega + cry_reverse Cry_AltariaMega + cry_reverse Cry_BanetteMega + cry_reverse Cry_AbsolMega + cry_reverse Cry_GlalieMega + cry_reverse Cry_SalamenceMega + cry_reverse Cry_MetagrossMega + cry_reverse Cry_LatiasMega + cry_reverse Cry_LatiosMega + cry_reverse Cry_LopunnyMega + cry_reverse Cry_GarchompMega + cry_reverse Cry_LucarioMega + cry_reverse Cry_AbomasnowMega + cry_reverse Cry_GalladeMega + cry_reverse Cry_AudinoMega + cry_reverse Cry_DiancieMega @ Special Mega + Primals - cry_reverse_uncomp Cry_RayquazaMega - cry_reverse_uncomp Cry_KyogrePrimal - cry_reverse_uncomp Cry_GroudonPrimal + cry_reverse Cry_RayquazaMega + cry_reverse Cry_KyogrePrimal + cry_reverse Cry_GroudonPrimal @ Alolan Forms cry_reverse Cry_Rattata cry_reverse Cry_Raticate @@ -2247,7 +2247,7 @@ gCryTable_Reverse:: cry_reverse Cry_Meowth cry_reverse Cry_Ponyta cry_reverse Cry_Rapidash - cry_reverse_uncomp Cry_SlowpokeGalarian + cry_reverse Cry_SlowpokeGalarian cry_reverse Cry_Slowbro cry_reverse Cry_Farfetchd cry_reverse Cry_Weezing @@ -2388,160 +2388,160 @@ gCryTable_Reverse:: cry_reverse Cry_Genesect cry_reverse Cry_Genesect @ Greninja - cry_reverse_uncomp Cry_Greninja - cry_reverse_uncomp Cry_Greninja + cry_reverse Cry_Greninja + cry_reverse Cry_Greninja @ Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon - cry_reverse_uncomp Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon + cry_reverse Cry_Vivillon @ Flabébé - cry_reverse_uncomp Cry_Flabebe - cry_reverse_uncomp Cry_Flabebe - cry_reverse_uncomp Cry_Flabebe - cry_reverse_uncomp Cry_Flabebe + cry_reverse Cry_Flabebe + cry_reverse Cry_Flabebe + cry_reverse Cry_Flabebe + cry_reverse Cry_Flabebe @ Floette - cry_reverse_uncomp Cry_Floette - cry_reverse_uncomp Cry_Floette - cry_reverse_uncomp Cry_Floette - cry_reverse_uncomp Cry_Floette - cry_reverse_uncomp Cry_FloetteEternalFlower + cry_reverse Cry_Floette + cry_reverse Cry_Floette + cry_reverse Cry_Floette + cry_reverse Cry_Floette + cry_reverse Cry_FloetteEternalFlower @ Florges - cry_reverse_uncomp Cry_Florges - cry_reverse_uncomp Cry_Florges - cry_reverse_uncomp Cry_Florges - cry_reverse_uncomp Cry_Florges + cry_reverse Cry_Florges + cry_reverse Cry_Florges + cry_reverse Cry_Florges + cry_reverse Cry_Florges @ Furfrou - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Furfrou - cry_reverse_uncomp Cry_Furfrou + cry_reverse Cry_Furfrou + cry_reverse Cry_Furfrou + cry_reverse Cry_Furfrou + cry_reverse Cry_Furfrou + cry_reverse Cry_Furfrou + cry_reverse Cry_Furfrou + cry_reverse Cry_Furfrou + cry_reverse Cry_Furfrou + cry_reverse Cry_Furfrou @ Meowstic - cry_reverse_uncomp Cry_Meowstic + cry_reverse Cry_Meowstic @ Aegislash - cry_reverse_uncomp Cry_Aegislash + cry_reverse Cry_Aegislash @ Pumpkaboo - cry_reverse_uncomp Cry_Pumpkaboo - cry_reverse_uncomp Cry_Pumpkaboo - cry_reverse_uncomp Cry_PumpkabooSuper + cry_reverse Cry_Pumpkaboo + cry_reverse Cry_Pumpkaboo + cry_reverse Cry_PumpkabooSuper @ Gourgeist - cry_reverse_uncomp Cry_Gourgeist - cry_reverse_uncomp Cry_Gourgeist - cry_reverse_uncomp Cry_GourgeistSuper + cry_reverse Cry_Gourgeist + cry_reverse Cry_Gourgeist + cry_reverse Cry_GourgeistSuper @ Xerneas - cry_reverse_uncomp Cry_Xerneas + cry_reverse Cry_Xerneas @ Zygarde - cry_reverse_uncomp Cry_Zygarde10 - cry_reverse_uncomp Cry_Zygarde10 - cry_reverse_uncomp Cry_Zygarde - cry_reverse_uncomp Cry_ZygardeComplete + cry_reverse Cry_Zygarde10 + cry_reverse Cry_Zygarde10 + cry_reverse Cry_Zygarde + cry_reverse Cry_ZygardeComplete @ Hoopa - cry_reverse_uncomp Cry_HoopaUnbound + cry_reverse Cry_HoopaUnbound @ Oricorio - cry_reverse_uncomp Cry_OricorioPomPom - cry_reverse_uncomp Cry_OricorioPau - cry_reverse_uncomp Cry_OricorioSensu + cry_reverse Cry_OricorioPomPom + cry_reverse Cry_OricorioPau + cry_reverse Cry_OricorioSensu @ Rockruff - cry_reverse_uncomp Cry_Rockruff + cry_reverse Cry_Rockruff @ Lycanroc - cry_reverse_uncomp Cry_LycanrocMidnight - cry_reverse_uncomp Cry_LycanrocDusk + cry_reverse Cry_LycanrocMidnight + cry_reverse Cry_LycanrocDusk @ Wishiwashi - cry_reverse_uncomp Cry_WishiwashiSchool + cry_reverse Cry_WishiwashiSchool @ Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally - cry_reverse_uncomp Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally + cry_reverse Cry_Silvally @ Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior - cry_reverse_uncomp Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior + cry_reverse Cry_Minior @ Mimikyu - cry_reverse_uncomp Cry_Mimikyu + cry_reverse Cry_Mimikyu @ Necrozma - cry_reverse_uncomp Cry_NecrozmaDuskMane - cry_reverse_uncomp Cry_NecrozmaDawnWings - cry_reverse_uncomp Cry_NecrozmaUltra + cry_reverse Cry_NecrozmaDuskMane + cry_reverse Cry_NecrozmaDawnWings + cry_reverse Cry_NecrozmaUltra @ Magearna - cry_reverse_uncomp Cry_Magearna + cry_reverse Cry_Magearna @ Cramorant - cry_reverse_uncomp Cry_Cramorant - cry_reverse_uncomp Cry_Cramorant + cry_reverse Cry_Cramorant + cry_reverse Cry_Cramorant @ Toxtricity - cry_reverse_uncomp Cry_ToxtricityLowKey + cry_reverse Cry_ToxtricityLowKey @ Sinistea - cry_reverse_uncomp Cry_Sinistea + cry_reverse Cry_Sinistea @ Polteageist - cry_reverse_uncomp Cry_Polteageist + cry_reverse Cry_Polteageist @ Alcremie - cry_reverse_uncomp Cry_Alcremie - cry_reverse_uncomp Cry_Alcremie - cry_reverse_uncomp Cry_Alcremie - cry_reverse_uncomp Cry_Alcremie - cry_reverse_uncomp Cry_Alcremie - cry_reverse_uncomp Cry_Alcremie - cry_reverse_uncomp Cry_Alcremie - cry_reverse_uncomp Cry_Alcremie + cry_reverse Cry_Alcremie + cry_reverse Cry_Alcremie + cry_reverse Cry_Alcremie + cry_reverse Cry_Alcremie + cry_reverse Cry_Alcremie + cry_reverse Cry_Alcremie + cry_reverse Cry_Alcremie + cry_reverse Cry_Alcremie @ Eiscue - cry_reverse_uncomp Cry_EiscueNoiceFace + cry_reverse Cry_EiscueNoiceFace @ Indeedee - cry_reverse_uncomp Cry_IndeedeeFemale + cry_reverse Cry_IndeedeeFemale @ Morpeko - cry_reverse_uncomp Cry_MorpekoHangry + cry_reverse Cry_MorpekoHangry @ Zacian - cry_reverse_uncomp Cry_ZacianCrownedSword + cry_reverse Cry_ZacianCrownedSword @ Zamazenta - cry_reverse_uncomp Cry_ZamazentaCrownedShield + cry_reverse Cry_ZamazentaCrownedShield @ Eternatus - cry_reverse_uncomp Cry_EternatusEternamax + cry_reverse Cry_EternatusEternamax @ Urshifu - cry_reverse_uncomp Cry_UrshifuRapidStrikeStyle + cry_reverse Cry_UrshifuRapidStrikeStyle @ Zarude - cry_reverse_uncomp Cry_Zarude + cry_reverse Cry_Zarude @ Calyrex - cry_reverse_uncomp Cry_CalyrexIceRider - cry_reverse_uncomp Cry_CalyrexShadowRider + cry_reverse Cry_CalyrexIceRider + cry_reverse Cry_CalyrexShadowRider diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index ede43d5c5a..472c6d37bb 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -2984,1203 +2984,1203 @@ Cry_Genesect:: .align 2 Cry_Chespin:: - .incbin "sound/direct_sound_samples/cries/uncomp_chespin.bin" + .incbin "sound/direct_sound_samples/cries/chespin.bin" .align 2 Cry_Quilladin:: - .incbin "sound/direct_sound_samples/cries/uncomp_quilladin.bin" + .incbin "sound/direct_sound_samples/cries/quilladin.bin" .align 2 Cry_Chesnaught:: - .incbin "sound/direct_sound_samples/cries/uncomp_chesnaught.bin" + .incbin "sound/direct_sound_samples/cries/chesnaught.bin" .align 2 Cry_Fennekin:: - .incbin "sound/direct_sound_samples/cries/uncomp_fennekin.bin" + .incbin "sound/direct_sound_samples/cries/fennekin.bin" .align 2 Cry_Braixen:: - .incbin "sound/direct_sound_samples/cries/uncomp_braixen.bin" + .incbin "sound/direct_sound_samples/cries/braixen.bin" .align 2 Cry_Delphox:: - .incbin "sound/direct_sound_samples/cries/uncomp_delphox.bin" + .incbin "sound/direct_sound_samples/cries/delphox.bin" .align 2 Cry_Froakie:: - .incbin "sound/direct_sound_samples/cries/uncomp_froakie.bin" + .incbin "sound/direct_sound_samples/cries/froakie.bin" .align 2 Cry_Frogadier:: - .incbin "sound/direct_sound_samples/cries/uncomp_frogadier.bin" + .incbin "sound/direct_sound_samples/cries/frogadier.bin" .align 2 Cry_Greninja:: - .incbin "sound/direct_sound_samples/cries/uncomp_greninja.bin" + .incbin "sound/direct_sound_samples/cries/greninja.bin" .align 2 Cry_Bunnelby:: - .incbin "sound/direct_sound_samples/cries/uncomp_bunnelby.bin" + .incbin "sound/direct_sound_samples/cries/bunnelby.bin" .align 2 Cry_Diggersby:: - .incbin "sound/direct_sound_samples/cries/uncomp_diggersby.bin" + .incbin "sound/direct_sound_samples/cries/diggersby.bin" .align 2 Cry_Fletchling:: - .incbin "sound/direct_sound_samples/cries/uncomp_fletchling.bin" + .incbin "sound/direct_sound_samples/cries/fletchling.bin" .align 2 Cry_Fletchinder:: - .incbin "sound/direct_sound_samples/cries/uncomp_fletchinder.bin" + .incbin "sound/direct_sound_samples/cries/fletchinder.bin" .align 2 Cry_Talonflame:: - .incbin "sound/direct_sound_samples/cries/uncomp_talonflame.bin" + .incbin "sound/direct_sound_samples/cries/talonflame.bin" .align 2 Cry_Scatterbug:: - .incbin "sound/direct_sound_samples/cries/uncomp_scatterbug.bin" + .incbin "sound/direct_sound_samples/cries/scatterbug.bin" .align 2 Cry_Spewpa:: - .incbin "sound/direct_sound_samples/cries/uncomp_spewpa.bin" + .incbin "sound/direct_sound_samples/cries/spewpa.bin" .align 2 Cry_Vivillon:: - .incbin "sound/direct_sound_samples/cries/uncomp_vivillon.bin" + .incbin "sound/direct_sound_samples/cries/vivillon.bin" .align 2 Cry_Litleo:: - .incbin "sound/direct_sound_samples/cries/uncomp_litleo.bin" + .incbin "sound/direct_sound_samples/cries/litleo.bin" .align 2 Cry_Pyroar:: - .incbin "sound/direct_sound_samples/cries/uncomp_pyroar.bin" + .incbin "sound/direct_sound_samples/cries/pyroar.bin" .align 2 Cry_Flabebe:: - .incbin "sound/direct_sound_samples/cries/uncomp_flabebe.bin" + .incbin "sound/direct_sound_samples/cries/flabebe.bin" .align 2 Cry_Floette:: - .incbin "sound/direct_sound_samples/cries/uncomp_floette.bin" + .incbin "sound/direct_sound_samples/cries/floette.bin" .align 2 Cry_Florges:: - .incbin "sound/direct_sound_samples/cries/uncomp_florges.bin" + .incbin "sound/direct_sound_samples/cries/florges.bin" .align 2 Cry_Skiddo:: - .incbin "sound/direct_sound_samples/cries/uncomp_skiddo.bin" + .incbin "sound/direct_sound_samples/cries/skiddo.bin" .align 2 Cry_Gogoat:: - .incbin "sound/direct_sound_samples/cries/uncomp_gogoat.bin" + .incbin "sound/direct_sound_samples/cries/gogoat.bin" .align 2 Cry_Pancham:: - .incbin "sound/direct_sound_samples/cries/uncomp_pancham.bin" + .incbin "sound/direct_sound_samples/cries/pancham.bin" .align 2 Cry_Pangoro:: - .incbin "sound/direct_sound_samples/cries/uncomp_pangoro.bin" + .incbin "sound/direct_sound_samples/cries/pangoro.bin" .align 2 Cry_Furfrou:: - .incbin "sound/direct_sound_samples/cries/uncomp_furfrou.bin" + .incbin "sound/direct_sound_samples/cries/furfrou.bin" .align 2 Cry_Espurr:: - .incbin "sound/direct_sound_samples/cries/uncomp_espurr.bin" + .incbin "sound/direct_sound_samples/cries/espurr.bin" .align 2 Cry_Meowstic:: - .incbin "sound/direct_sound_samples/cries/uncomp_meowstic.bin" + .incbin "sound/direct_sound_samples/cries/meowstic.bin" .align 2 Cry_Honedge:: - .incbin "sound/direct_sound_samples/cries/uncomp_honedge.bin" + .incbin "sound/direct_sound_samples/cries/honedge.bin" .align 2 Cry_Doublade:: - .incbin "sound/direct_sound_samples/cries/uncomp_doublade.bin" + .incbin "sound/direct_sound_samples/cries/doublade.bin" .align 2 Cry_Aegislash:: - .incbin "sound/direct_sound_samples/cries/uncomp_aegislash.bin" + .incbin "sound/direct_sound_samples/cries/aegislash.bin" .align 2 Cry_Spritzee:: - .incbin "sound/direct_sound_samples/cries/uncomp_spritzee.bin" + .incbin "sound/direct_sound_samples/cries/spritzee.bin" .align 2 Cry_Aromatisse:: - .incbin "sound/direct_sound_samples/cries/uncomp_aromatisse.bin" + .incbin "sound/direct_sound_samples/cries/aromatisse.bin" .align 2 Cry_Swirlix:: - .incbin "sound/direct_sound_samples/cries/uncomp_swirlix.bin" + .incbin "sound/direct_sound_samples/cries/swirlix.bin" .align 2 Cry_Slurpuff:: - .incbin "sound/direct_sound_samples/cries/uncomp_slurpuff.bin" + .incbin "sound/direct_sound_samples/cries/slurpuff.bin" .align 2 Cry_Inkay:: - .incbin "sound/direct_sound_samples/cries/uncomp_inkay.bin" + .incbin "sound/direct_sound_samples/cries/inkay.bin" .align 2 Cry_Malamar:: - .incbin "sound/direct_sound_samples/cries/uncomp_malamar.bin" + .incbin "sound/direct_sound_samples/cries/malamar.bin" .align 2 Cry_Binacle:: - .incbin "sound/direct_sound_samples/cries/uncomp_binacle.bin" + .incbin "sound/direct_sound_samples/cries/binacle.bin" .align 2 Cry_Barbaracle:: - .incbin "sound/direct_sound_samples/cries/uncomp_barbaracle.bin" + .incbin "sound/direct_sound_samples/cries/barbaracle.bin" .align 2 Cry_Skrelp:: - .incbin "sound/direct_sound_samples/cries/uncomp_skrelp.bin" + .incbin "sound/direct_sound_samples/cries/skrelp.bin" .align 2 Cry_Dragalge:: - .incbin "sound/direct_sound_samples/cries/uncomp_dragalge.bin" + .incbin "sound/direct_sound_samples/cries/dragalge.bin" .align 2 Cry_Clauncher:: - .incbin "sound/direct_sound_samples/cries/uncomp_clauncher.bin" + .incbin "sound/direct_sound_samples/cries/clauncher.bin" .align 2 Cry_Clawitzer:: - .incbin "sound/direct_sound_samples/cries/uncomp_clawitzer.bin" + .incbin "sound/direct_sound_samples/cries/clawitzer.bin" .align 2 Cry_Helioptile:: - .incbin "sound/direct_sound_samples/cries/uncomp_helioptile.bin" + .incbin "sound/direct_sound_samples/cries/helioptile.bin" .align 2 Cry_Heliolisk:: - .incbin "sound/direct_sound_samples/cries/uncomp_heliolisk.bin" + .incbin "sound/direct_sound_samples/cries/heliolisk.bin" .align 2 Cry_Tyrunt:: - .incbin "sound/direct_sound_samples/cries/uncomp_tyrunt.bin" + .incbin "sound/direct_sound_samples/cries/tyrunt.bin" .align 2 Cry_Tyrantrum:: - .incbin "sound/direct_sound_samples/cries/uncomp_tyrantrum.bin" + .incbin "sound/direct_sound_samples/cries/tyrantrum.bin" .align 2 Cry_Amaura:: - .incbin "sound/direct_sound_samples/cries/uncomp_amaura.bin" + .incbin "sound/direct_sound_samples/cries/amaura.bin" .align 2 Cry_Aurorus:: - .incbin "sound/direct_sound_samples/cries/uncomp_aurorus.bin" + .incbin "sound/direct_sound_samples/cries/aurorus.bin" .align 2 Cry_Sylveon:: - .incbin "sound/direct_sound_samples/cries/uncomp_sylveon.bin" + .incbin "sound/direct_sound_samples/cries/sylveon.bin" .align 2 Cry_Hawlucha:: - .incbin "sound/direct_sound_samples/cries/uncomp_hawlucha.bin" + .incbin "sound/direct_sound_samples/cries/hawlucha.bin" .align 2 Cry_Dedenne:: - .incbin "sound/direct_sound_samples/cries/uncomp_dedenne.bin" + .incbin "sound/direct_sound_samples/cries/dedenne.bin" .align 2 Cry_Carbink:: - .incbin "sound/direct_sound_samples/cries/uncomp_carbink.bin" + .incbin "sound/direct_sound_samples/cries/carbink.bin" .align 2 Cry_Goomy:: - .incbin "sound/direct_sound_samples/cries/uncomp_goomy.bin" + .incbin "sound/direct_sound_samples/cries/goomy.bin" .align 2 Cry_Sliggoo:: - .incbin "sound/direct_sound_samples/cries/uncomp_sliggoo.bin" + .incbin "sound/direct_sound_samples/cries/sliggoo.bin" .align 2 Cry_Goodra:: - .incbin "sound/direct_sound_samples/cries/uncomp_goodra.bin" + .incbin "sound/direct_sound_samples/cries/goodra.bin" .align 2 Cry_Klefki:: - .incbin "sound/direct_sound_samples/cries/uncomp_klefki.bin" + .incbin "sound/direct_sound_samples/cries/klefki.bin" .align 2 Cry_Phantump:: - .incbin "sound/direct_sound_samples/cries/uncomp_phantump.bin" + .incbin "sound/direct_sound_samples/cries/phantump.bin" .align 2 Cry_Trevenant:: - .incbin "sound/direct_sound_samples/cries/uncomp_trevenant.bin" + .incbin "sound/direct_sound_samples/cries/trevenant.bin" .align 2 Cry_Pumpkaboo:: - .incbin "sound/direct_sound_samples/cries/uncomp_pumpkaboo.bin" + .incbin "sound/direct_sound_samples/cries/pumpkaboo.bin" .align 2 Cry_Gourgeist:: - .incbin "sound/direct_sound_samples/cries/uncomp_gourgeist.bin" + .incbin "sound/direct_sound_samples/cries/gourgeist.bin" .align 2 Cry_Bergmite:: - .incbin "sound/direct_sound_samples/cries/uncomp_bergmite.bin" + .incbin "sound/direct_sound_samples/cries/bergmite.bin" .align 2 Cry_Avalugg:: - .incbin "sound/direct_sound_samples/cries/uncomp_avalugg.bin" + .incbin "sound/direct_sound_samples/cries/avalugg.bin" .align 2 Cry_Noibat:: - .incbin "sound/direct_sound_samples/cries/uncomp_noibat.bin" + .incbin "sound/direct_sound_samples/cries/noibat.bin" .align 2 Cry_Noivern:: - .incbin "sound/direct_sound_samples/cries/uncomp_noivern.bin" + .incbin "sound/direct_sound_samples/cries/noivern.bin" .align 2 Cry_Xerneas:: - .incbin "sound/direct_sound_samples/cries/uncomp_xerneas.bin" + .incbin "sound/direct_sound_samples/cries/xerneas.bin" .align 2 Cry_Yveltal:: - .incbin "sound/direct_sound_samples/cries/uncomp_yveltal.bin" + .incbin "sound/direct_sound_samples/cries/yveltal.bin" .align 2 Cry_Zygarde:: - .incbin "sound/direct_sound_samples/cries/uncomp_zygarde.bin" + .incbin "sound/direct_sound_samples/cries/zygarde.bin" .align 2 Cry_Diancie:: - .incbin "sound/direct_sound_samples/cries/uncomp_diancie.bin" + .incbin "sound/direct_sound_samples/cries/diancie.bin" .align 2 Cry_Hoopa:: - .incbin "sound/direct_sound_samples/cries/uncomp_hoopa.bin" + .incbin "sound/direct_sound_samples/cries/hoopa.bin" .align 2 Cry_Volcanion:: - .incbin "sound/direct_sound_samples/cries/uncomp_volcanion.bin" + .incbin "sound/direct_sound_samples/cries/volcanion.bin" .align 2 Cry_Rowlet:: - .incbin "sound/direct_sound_samples/cries/uncomp_rowlet.bin" + .incbin "sound/direct_sound_samples/cries/rowlet.bin" .align 2 Cry_Dartrix:: - .incbin "sound/direct_sound_samples/cries/uncomp_dartrix.bin" + .incbin "sound/direct_sound_samples/cries/dartrix.bin" .align 2 Cry_Decidueye:: - .incbin "sound/direct_sound_samples/cries/uncomp_decidueye.bin" + .incbin "sound/direct_sound_samples/cries/decidueye.bin" .align 2 Cry_Litten:: - .incbin "sound/direct_sound_samples/cries/uncomp_litten.bin" + .incbin "sound/direct_sound_samples/cries/litten.bin" .align 2 Cry_Torracat:: - .incbin "sound/direct_sound_samples/cries/uncomp_torracat.bin" + .incbin "sound/direct_sound_samples/cries/torracat.bin" .align 2 Cry_Incineroar:: - .incbin "sound/direct_sound_samples/cries/uncomp_incineroar.bin" + .incbin "sound/direct_sound_samples/cries/incineroar.bin" .align 2 Cry_Popplio:: - .incbin "sound/direct_sound_samples/cries/uncomp_popplio.bin" + .incbin "sound/direct_sound_samples/cries/popplio.bin" .align 2 Cry_Brionne:: - .incbin "sound/direct_sound_samples/cries/uncomp_brionne.bin" + .incbin "sound/direct_sound_samples/cries/brionne.bin" .align 2 Cry_Primarina:: - .incbin "sound/direct_sound_samples/cries/uncomp_primarina.bin" + .incbin "sound/direct_sound_samples/cries/primarina.bin" .align 2 Cry_Pikipek:: - .incbin "sound/direct_sound_samples/cries/uncomp_pikipek.bin" + .incbin "sound/direct_sound_samples/cries/pikipek.bin" .align 2 Cry_Trumbeak:: - .incbin "sound/direct_sound_samples/cries/uncomp_trumbeak.bin" + .incbin "sound/direct_sound_samples/cries/trumbeak.bin" .align 2 Cry_Toucannon:: - .incbin "sound/direct_sound_samples/cries/uncomp_toucannon.bin" + .incbin "sound/direct_sound_samples/cries/toucannon.bin" .align 2 Cry_Yungoos:: - .incbin "sound/direct_sound_samples/cries/uncomp_yungoos.bin" + .incbin "sound/direct_sound_samples/cries/yungoos.bin" .align 2 Cry_Gumshoos:: - .incbin "sound/direct_sound_samples/cries/uncomp_gumshoos.bin" + .incbin "sound/direct_sound_samples/cries/gumshoos.bin" .align 2 Cry_Grubbin:: - .incbin "sound/direct_sound_samples/cries/uncomp_grubbin.bin" + .incbin "sound/direct_sound_samples/cries/grubbin.bin" .align 2 Cry_Charjabug:: - .incbin "sound/direct_sound_samples/cries/uncomp_charjabug.bin" + .incbin "sound/direct_sound_samples/cries/charjabug.bin" .align 2 Cry_Vikavolt:: - .incbin "sound/direct_sound_samples/cries/uncomp_vikavolt.bin" + .incbin "sound/direct_sound_samples/cries/vikavolt.bin" .align 2 Cry_Crabrawler:: - .incbin "sound/direct_sound_samples/cries/uncomp_crabrawler.bin" + .incbin "sound/direct_sound_samples/cries/crabrawler.bin" .align 2 Cry_Crabominable:: - .incbin "sound/direct_sound_samples/cries/uncomp_crabominable.bin" + .incbin "sound/direct_sound_samples/cries/crabominable.bin" .align 2 Cry_Oricorio:: - .incbin "sound/direct_sound_samples/cries/uncomp_oricorio.bin" + .incbin "sound/direct_sound_samples/cries/oricorio.bin" .align 2 Cry_Cutiefly:: - .incbin "sound/direct_sound_samples/cries/uncomp_cutiefly.bin" + .incbin "sound/direct_sound_samples/cries/cutiefly.bin" .align 2 Cry_Ribombee:: - .incbin "sound/direct_sound_samples/cries/uncomp_ribombee.bin" + .incbin "sound/direct_sound_samples/cries/ribombee.bin" .align 2 Cry_Rockruff:: - .incbin "sound/direct_sound_samples/cries/uncomp_rockruff.bin" + .incbin "sound/direct_sound_samples/cries/rockruff.bin" .align 2 Cry_Lycanroc:: - .incbin "sound/direct_sound_samples/cries/uncomp_lycanroc.bin" + .incbin "sound/direct_sound_samples/cries/lycanroc.bin" .align 2 Cry_Wishiwashi:: - .incbin "sound/direct_sound_samples/cries/uncomp_wishiwashi.bin" + .incbin "sound/direct_sound_samples/cries/wishiwashi.bin" .align 2 Cry_Mareanie:: - .incbin "sound/direct_sound_samples/cries/uncomp_mareanie.bin" + .incbin "sound/direct_sound_samples/cries/mareanie.bin" .align 2 Cry_Toxapex:: - .incbin "sound/direct_sound_samples/cries/uncomp_toxapex.bin" + .incbin "sound/direct_sound_samples/cries/toxapex.bin" .align 2 Cry_Mudbray:: - .incbin "sound/direct_sound_samples/cries/uncomp_mudbray.bin" + .incbin "sound/direct_sound_samples/cries/mudbray.bin" .align 2 Cry_Mudsdale:: - .incbin "sound/direct_sound_samples/cries/uncomp_mudsdale.bin" + .incbin "sound/direct_sound_samples/cries/mudsdale.bin" .align 2 Cry_Dewpider:: - .incbin "sound/direct_sound_samples/cries/uncomp_dewpider.bin" + .incbin "sound/direct_sound_samples/cries/dewpider.bin" .align 2 Cry_Araquanid:: - .incbin "sound/direct_sound_samples/cries/uncomp_araquanid.bin" + .incbin "sound/direct_sound_samples/cries/araquanid.bin" .align 2 Cry_Fomantis:: - .incbin "sound/direct_sound_samples/cries/uncomp_fomantis.bin" + .incbin "sound/direct_sound_samples/cries/fomantis.bin" .align 2 Cry_Lurantis:: - .incbin "sound/direct_sound_samples/cries/uncomp_lurantis.bin" + .incbin "sound/direct_sound_samples/cries/lurantis.bin" .align 2 Cry_Morelull:: - .incbin "sound/direct_sound_samples/cries/uncomp_morelull.bin" + .incbin "sound/direct_sound_samples/cries/morelull.bin" .align 2 Cry_Shiinotic:: - .incbin "sound/direct_sound_samples/cries/uncomp_shiinotic.bin" + .incbin "sound/direct_sound_samples/cries/shiinotic.bin" .align 2 Cry_Salandit:: - .incbin "sound/direct_sound_samples/cries/uncomp_salandit.bin" + .incbin "sound/direct_sound_samples/cries/salandit.bin" .align 2 Cry_Salazzle:: - .incbin "sound/direct_sound_samples/cries/uncomp_salazzle.bin" + .incbin "sound/direct_sound_samples/cries/salazzle.bin" .align 2 Cry_Stufful:: - .incbin "sound/direct_sound_samples/cries/uncomp_stufful.bin" + .incbin "sound/direct_sound_samples/cries/stufful.bin" .align 2 Cry_Bewear:: - .incbin "sound/direct_sound_samples/cries/uncomp_bewear.bin" + .incbin "sound/direct_sound_samples/cries/bewear.bin" .align 2 Cry_Bounsweet:: - .incbin "sound/direct_sound_samples/cries/uncomp_bounsweet.bin" + .incbin "sound/direct_sound_samples/cries/bounsweet.bin" .align 2 Cry_Steenee:: - .incbin "sound/direct_sound_samples/cries/uncomp_steenee.bin" + .incbin "sound/direct_sound_samples/cries/steenee.bin" .align 2 Cry_Tsareena:: - .incbin "sound/direct_sound_samples/cries/uncomp_tsareena.bin" + .incbin "sound/direct_sound_samples/cries/tsareena.bin" .align 2 Cry_Comfey:: - .incbin "sound/direct_sound_samples/cries/uncomp_comfey.bin" + .incbin "sound/direct_sound_samples/cries/comfey.bin" .align 2 Cry_Oranguru:: - .incbin "sound/direct_sound_samples/cries/uncomp_oranguru.bin" + .incbin "sound/direct_sound_samples/cries/oranguru.bin" .align 2 Cry_Passimian:: - .incbin "sound/direct_sound_samples/cries/uncomp_passimian.bin" + .incbin "sound/direct_sound_samples/cries/passimian.bin" .align 2 Cry_Wimpod:: - .incbin "sound/direct_sound_samples/cries/uncomp_wimpod.bin" + .incbin "sound/direct_sound_samples/cries/wimpod.bin" .align 2 Cry_Golisopod:: - .incbin "sound/direct_sound_samples/cries/uncomp_golisopod.bin" + .incbin "sound/direct_sound_samples/cries/golisopod.bin" .align 2 Cry_Sandygast:: - .incbin "sound/direct_sound_samples/cries/uncomp_sandygast.bin" + .incbin "sound/direct_sound_samples/cries/sandygast.bin" .align 2 Cry_Palossand:: - .incbin "sound/direct_sound_samples/cries/uncomp_palossand.bin" + .incbin "sound/direct_sound_samples/cries/palossand.bin" .align 2 Cry_Pyukumuku:: - .incbin "sound/direct_sound_samples/cries/uncomp_pyukumuku.bin" + .incbin "sound/direct_sound_samples/cries/pyukumuku.bin" .align 2 Cry_TypeNull:: - .incbin "sound/direct_sound_samples/cries/uncomp_type_null.bin" + .incbin "sound/direct_sound_samples/cries/type_null.bin" .align 2 Cry_Silvally:: - .incbin "sound/direct_sound_samples/cries/uncomp_silvally.bin" + .incbin "sound/direct_sound_samples/cries/silvally.bin" .align 2 Cry_Minior:: - .incbin "sound/direct_sound_samples/cries/uncomp_minior.bin" + .incbin "sound/direct_sound_samples/cries/minior.bin" .align 2 Cry_Komala:: - .incbin "sound/direct_sound_samples/cries/uncomp_komala.bin" + .incbin "sound/direct_sound_samples/cries/komala.bin" .align 2 Cry_Turtonator:: - .incbin "sound/direct_sound_samples/cries/uncomp_turtonator.bin" + .incbin "sound/direct_sound_samples/cries/turtonator.bin" .align 2 Cry_Togedemaru:: - .incbin "sound/direct_sound_samples/cries/uncomp_togedemaru.bin" + .incbin "sound/direct_sound_samples/cries/togedemaru.bin" .align 2 Cry_Mimikyu:: - .incbin "sound/direct_sound_samples/cries/uncomp_mimikyu.bin" + .incbin "sound/direct_sound_samples/cries/mimikyu.bin" .align 2 Cry_Bruxish:: - .incbin "sound/direct_sound_samples/cries/uncomp_bruxish.bin" + .incbin "sound/direct_sound_samples/cries/bruxish.bin" .align 2 Cry_Drampa:: - .incbin "sound/direct_sound_samples/cries/uncomp_drampa.bin" + .incbin "sound/direct_sound_samples/cries/drampa.bin" .align 2 Cry_Dhelmise:: - .incbin "sound/direct_sound_samples/cries/uncomp_dhelmise.bin" + .incbin "sound/direct_sound_samples/cries/dhelmise.bin" .align 2 Cry_Jangmoo:: - .incbin "sound/direct_sound_samples/cries/uncomp_jangmo_o.bin" + .incbin "sound/direct_sound_samples/cries/jangmo_o.bin" .align 2 Cry_Hakamoo:: - .incbin "sound/direct_sound_samples/cries/uncomp_hakamo_o.bin" + .incbin "sound/direct_sound_samples/cries/hakamo_o.bin" .align 2 Cry_Kommoo:: - .incbin "sound/direct_sound_samples/cries/uncomp_kommo_o.bin" + .incbin "sound/direct_sound_samples/cries/kommo_o.bin" .align 2 Cry_TapuKoko:: - .incbin "sound/direct_sound_samples/cries/uncomp_tapu_koko.bin" + .incbin "sound/direct_sound_samples/cries/tapu_koko.bin" .align 2 Cry_TapuLele:: - .incbin "sound/direct_sound_samples/cries/uncomp_tapu_lele.bin" + .incbin "sound/direct_sound_samples/cries/tapu_lele.bin" .align 2 Cry_TapuBulu:: - .incbin "sound/direct_sound_samples/cries/uncomp_tapu_bulu.bin" + .incbin "sound/direct_sound_samples/cries/tapu_bulu.bin" .align 2 Cry_TapuFini:: - .incbin "sound/direct_sound_samples/cries/uncomp_tapu_fini.bin" + .incbin "sound/direct_sound_samples/cries/tapu_fini.bin" .align 2 Cry_Cosmog:: - .incbin "sound/direct_sound_samples/cries/uncomp_cosmog.bin" + .incbin "sound/direct_sound_samples/cries/cosmog.bin" .align 2 Cry_Cosmoem:: - .incbin "sound/direct_sound_samples/cries/uncomp_cosmoem.bin" + .incbin "sound/direct_sound_samples/cries/cosmoem.bin" .align 2 Cry_Solgaleo:: - .incbin "sound/direct_sound_samples/cries/uncomp_solgaleo.bin" + .incbin "sound/direct_sound_samples/cries/solgaleo.bin" .align 2 Cry_Lunala:: - .incbin "sound/direct_sound_samples/cries/uncomp_lunala.bin" + .incbin "sound/direct_sound_samples/cries/lunala.bin" .align 2 Cry_Nihilego:: - .incbin "sound/direct_sound_samples/cries/uncomp_nihilego.bin" + .incbin "sound/direct_sound_samples/cries/nihilego.bin" .align 2 Cry_Buzzwole:: - .incbin "sound/direct_sound_samples/cries/uncomp_buzzwole.bin" + .incbin "sound/direct_sound_samples/cries/buzzwole.bin" .align 2 Cry_Pheromosa:: - .incbin "sound/direct_sound_samples/cries/uncomp_pheromosa.bin" + .incbin "sound/direct_sound_samples/cries/pheromosa.bin" .align 2 Cry_Xurkitree:: - .incbin "sound/direct_sound_samples/cries/uncomp_xurkitree.bin" + .incbin "sound/direct_sound_samples/cries/xurkitree.bin" .align 2 Cry_Celesteela:: - .incbin "sound/direct_sound_samples/cries/uncomp_celesteela.bin" + .incbin "sound/direct_sound_samples/cries/celesteela.bin" .align 2 Cry_Kartana:: - .incbin "sound/direct_sound_samples/cries/uncomp_kartana.bin" + .incbin "sound/direct_sound_samples/cries/kartana.bin" .align 2 Cry_Guzzlord:: - .incbin "sound/direct_sound_samples/cries/uncomp_guzzlord.bin" + .incbin "sound/direct_sound_samples/cries/guzzlord.bin" .align 2 Cry_Necrozma:: - .incbin "sound/direct_sound_samples/cries/uncomp_necrozma.bin" + .incbin "sound/direct_sound_samples/cries/necrozma.bin" .align 2 Cry_Magearna:: - .incbin "sound/direct_sound_samples/cries/uncomp_magearna.bin" + .incbin "sound/direct_sound_samples/cries/magearna.bin" .align 2 Cry_Marshadow:: - .incbin "sound/direct_sound_samples/cries/uncomp_marshadow.bin" + .incbin "sound/direct_sound_samples/cries/marshadow.bin" .align 2 Cry_Poipole:: - .incbin "sound/direct_sound_samples/cries/uncomp_poipole.bin" + .incbin "sound/direct_sound_samples/cries/poipole.bin" .align 2 Cry_Naganadel:: - .incbin "sound/direct_sound_samples/cries/uncomp_naganadel.bin" + .incbin "sound/direct_sound_samples/cries/naganadel.bin" .align 2 Cry_Stakataka:: - .incbin "sound/direct_sound_samples/cries/uncomp_stakataka.bin" + .incbin "sound/direct_sound_samples/cries/stakataka.bin" .align 2 Cry_Blacephalon:: - .incbin "sound/direct_sound_samples/cries/uncomp_blacephalon.bin" + .incbin "sound/direct_sound_samples/cries/blacephalon.bin" .align 2 Cry_Zeraora:: - .incbin "sound/direct_sound_samples/cries/uncomp_zeraora.bin" + .incbin "sound/direct_sound_samples/cries/zeraora.bin" .align 2 Cry_Meltan:: - .incbin "sound/direct_sound_samples/cries/uncomp_meltan.bin" + .incbin "sound/direct_sound_samples/cries/meltan.bin" .align 2 Cry_Melmetal:: - .incbin "sound/direct_sound_samples/cries/uncomp_melmetal.bin" + .incbin "sound/direct_sound_samples/cries/melmetal.bin" .align 2 Cry_Grookey:: - .incbin "sound/direct_sound_samples/cries/uncomp_grookey.bin" + .incbin "sound/direct_sound_samples/cries/grookey.bin" .align 2 Cry_Thwackey:: - .incbin "sound/direct_sound_samples/cries/uncomp_thwackey.bin" + .incbin "sound/direct_sound_samples/cries/thwackey.bin" .align 2 Cry_Rillaboom:: - .incbin "sound/direct_sound_samples/cries/uncomp_rillaboom.bin" + .incbin "sound/direct_sound_samples/cries/rillaboom.bin" .align 2 Cry_Scorbunny:: - .incbin "sound/direct_sound_samples/cries/uncomp_scorbunny.bin" + .incbin "sound/direct_sound_samples/cries/scorbunny.bin" .align 2 Cry_Raboot:: - .incbin "sound/direct_sound_samples/cries/uncomp_raboot.bin" + .incbin "sound/direct_sound_samples/cries/raboot.bin" .align 2 Cry_Cinderace:: - .incbin "sound/direct_sound_samples/cries/uncomp_cinderace.bin" + .incbin "sound/direct_sound_samples/cries/cinderace.bin" .align 2 Cry_Sobble:: - .incbin "sound/direct_sound_samples/cries/uncomp_sobble.bin" + .incbin "sound/direct_sound_samples/cries/sobble.bin" .align 2 Cry_Drizzile:: - .incbin "sound/direct_sound_samples/cries/uncomp_drizzile.bin" + .incbin "sound/direct_sound_samples/cries/drizzile.bin" .align 2 Cry_Inteleon:: - .incbin "sound/direct_sound_samples/cries/uncomp_inteleon.bin" + .incbin "sound/direct_sound_samples/cries/inteleon.bin" .align 2 Cry_Skwovet:: - .incbin "sound/direct_sound_samples/cries/uncomp_skwovet.bin" + .incbin "sound/direct_sound_samples/cries/skwovet.bin" .align 2 Cry_Greedent:: - .incbin "sound/direct_sound_samples/cries/uncomp_greedent.bin" + .incbin "sound/direct_sound_samples/cries/greedent.bin" .align 2 Cry_Rookidee:: - .incbin "sound/direct_sound_samples/cries/uncomp_rookidee.bin" + .incbin "sound/direct_sound_samples/cries/rookidee.bin" .align 2 Cry_Corvisquire:: - .incbin "sound/direct_sound_samples/cries/uncomp_corvisquire.bin" + .incbin "sound/direct_sound_samples/cries/corvisquire.bin" .align 2 Cry_Corviknight:: - .incbin "sound/direct_sound_samples/cries/uncomp_corviknight.bin" + .incbin "sound/direct_sound_samples/cries/corviknight.bin" .align 2 Cry_Blipbug:: - .incbin "sound/direct_sound_samples/cries/uncomp_blipbug.bin" + .incbin "sound/direct_sound_samples/cries/blipbug.bin" .align 2 Cry_Dottler:: - .incbin "sound/direct_sound_samples/cries/uncomp_dottler.bin" + .incbin "sound/direct_sound_samples/cries/dottler.bin" .align 2 Cry_Orbeetle:: - .incbin "sound/direct_sound_samples/cries/uncomp_orbeetle.bin" + .incbin "sound/direct_sound_samples/cries/orbeetle.bin" .align 2 Cry_Nickit:: - .incbin "sound/direct_sound_samples/cries/uncomp_nickit.bin" + .incbin "sound/direct_sound_samples/cries/nickit.bin" .align 2 Cry_Thievul:: - .incbin "sound/direct_sound_samples/cries/uncomp_thievul.bin" + .incbin "sound/direct_sound_samples/cries/thievul.bin" .align 2 Cry_Gossifleur:: - .incbin "sound/direct_sound_samples/cries/uncomp_gossifleur.bin" + .incbin "sound/direct_sound_samples/cries/gossifleur.bin" .align 2 Cry_Eldegoss:: - .incbin "sound/direct_sound_samples/cries/uncomp_eldegoss.bin" + .incbin "sound/direct_sound_samples/cries/eldegoss.bin" .align 2 Cry_Wooloo:: - .incbin "sound/direct_sound_samples/cries/uncomp_wooloo.bin" + .incbin "sound/direct_sound_samples/cries/wooloo.bin" .align 2 Cry_Dubwool:: - .incbin "sound/direct_sound_samples/cries/uncomp_dubwool.bin" + .incbin "sound/direct_sound_samples/cries/dubwool.bin" .align 2 Cry_Chewtle:: - .incbin "sound/direct_sound_samples/cries/uncomp_chewtle.bin" + .incbin "sound/direct_sound_samples/cries/chewtle.bin" .align 2 Cry_Drednaw:: - .incbin "sound/direct_sound_samples/cries/uncomp_drednaw.bin" + .incbin "sound/direct_sound_samples/cries/drednaw.bin" .align 2 Cry_Yamper:: - .incbin "sound/direct_sound_samples/cries/uncomp_yamper.bin" + .incbin "sound/direct_sound_samples/cries/yamper.bin" .align 2 Cry_Boltund:: - .incbin "sound/direct_sound_samples/cries/uncomp_boltund.bin" + .incbin "sound/direct_sound_samples/cries/boltund.bin" .align 2 Cry_Rolycoly:: - .incbin "sound/direct_sound_samples/cries/uncomp_rolycoly.bin" + .incbin "sound/direct_sound_samples/cries/rolycoly.bin" .align 2 Cry_Carkol:: - .incbin "sound/direct_sound_samples/cries/uncomp_carkol.bin" + .incbin "sound/direct_sound_samples/cries/carkol.bin" .align 2 Cry_Coalossal:: - .incbin "sound/direct_sound_samples/cries/uncomp_coalossal.bin" + .incbin "sound/direct_sound_samples/cries/coalossal.bin" .align 2 Cry_Applin:: - .incbin "sound/direct_sound_samples/cries/uncomp_applin.bin" + .incbin "sound/direct_sound_samples/cries/applin.bin" .align 2 Cry_Flapple:: - .incbin "sound/direct_sound_samples/cries/uncomp_flapple.bin" + .incbin "sound/direct_sound_samples/cries/flapple.bin" .align 2 Cry_Appletun:: - .incbin "sound/direct_sound_samples/cries/uncomp_appletun.bin" + .incbin "sound/direct_sound_samples/cries/appletun.bin" .align 2 Cry_Silicobra:: - .incbin "sound/direct_sound_samples/cries/uncomp_silicobra.bin" + .incbin "sound/direct_sound_samples/cries/silicobra.bin" .align 2 Cry_Sandaconda:: - .incbin "sound/direct_sound_samples/cries/uncomp_sandaconda.bin" + .incbin "sound/direct_sound_samples/cries/sandaconda.bin" .align 2 Cry_Cramorant:: - .incbin "sound/direct_sound_samples/cries/uncomp_cramorant.bin" + .incbin "sound/direct_sound_samples/cries/cramorant.bin" .align 2 Cry_Arrokuda:: - .incbin "sound/direct_sound_samples/cries/uncomp_arrokuda.bin" + .incbin "sound/direct_sound_samples/cries/arrokuda.bin" .align 2 Cry_Barraskewda:: - .incbin "sound/direct_sound_samples/cries/uncomp_barraskewda.bin" + .incbin "sound/direct_sound_samples/cries/barraskewda.bin" .align 2 Cry_Toxel:: - .incbin "sound/direct_sound_samples/cries/uncomp_toxel.bin" + .incbin "sound/direct_sound_samples/cries/toxel.bin" .align 2 Cry_Toxtricity:: - .incbin "sound/direct_sound_samples/cries/uncomp_toxtricity.bin" + .incbin "sound/direct_sound_samples/cries/toxtricity.bin" .align 2 Cry_Sizzlipede:: - .incbin "sound/direct_sound_samples/cries/uncomp_sizzlipede.bin" + .incbin "sound/direct_sound_samples/cries/sizzlipede.bin" .align 2 Cry_Centiskorch:: - .incbin "sound/direct_sound_samples/cries/uncomp_centiskorch.bin" + .incbin "sound/direct_sound_samples/cries/centiskorch.bin" .align 2 Cry_Clobbopus:: - .incbin "sound/direct_sound_samples/cries/uncomp_clobbopus.bin" + .incbin "sound/direct_sound_samples/cries/clobbopus.bin" .align 2 Cry_Grapploct:: - .incbin "sound/direct_sound_samples/cries/uncomp_grapploct.bin" + .incbin "sound/direct_sound_samples/cries/grapploct.bin" .align 2 Cry_Sinistea:: - .incbin "sound/direct_sound_samples/cries/uncomp_sinistea.bin" + .incbin "sound/direct_sound_samples/cries/sinistea.bin" .align 2 Cry_Polteageist:: - .incbin "sound/direct_sound_samples/cries/uncomp_polteageist.bin" + .incbin "sound/direct_sound_samples/cries/polteageist.bin" .align 2 Cry_Hatenna:: - .incbin "sound/direct_sound_samples/cries/uncomp_hatenna.bin" + .incbin "sound/direct_sound_samples/cries/hatenna.bin" .align 2 Cry_Hattrem:: - .incbin "sound/direct_sound_samples/cries/uncomp_hattrem.bin" + .incbin "sound/direct_sound_samples/cries/hattrem.bin" .align 2 Cry_Hatterene:: - .incbin "sound/direct_sound_samples/cries/uncomp_hatterene.bin" + .incbin "sound/direct_sound_samples/cries/hatterene.bin" .align 2 Cry_Impidimp:: - .incbin "sound/direct_sound_samples/cries/uncomp_impidimp.bin" + .incbin "sound/direct_sound_samples/cries/impidimp.bin" .align 2 Cry_Morgrem:: - .incbin "sound/direct_sound_samples/cries/uncomp_morgrem.bin" + .incbin "sound/direct_sound_samples/cries/morgrem.bin" .align 2 Cry_Grimmsnarl:: - .incbin "sound/direct_sound_samples/cries/uncomp_grimmsnarl.bin" + .incbin "sound/direct_sound_samples/cries/grimmsnarl.bin" .align 2 Cry_Obstagoon:: - .incbin "sound/direct_sound_samples/cries/uncomp_obstagoon.bin" + .incbin "sound/direct_sound_samples/cries/obstagoon.bin" .align 2 Cry_Perrserker:: - .incbin "sound/direct_sound_samples/cries/uncomp_perrserker.bin" + .incbin "sound/direct_sound_samples/cries/perrserker.bin" .align 2 Cry_Cursola:: - .incbin "sound/direct_sound_samples/cries/uncomp_cursola.bin" + .incbin "sound/direct_sound_samples/cries/cursola.bin" .align 2 Cry_Sirfetchd:: - .incbin "sound/direct_sound_samples/cries/uncomp_sirfetchd.bin" + .incbin "sound/direct_sound_samples/cries/sirfetchd.bin" .align 2 Cry_MrRime:: - .incbin "sound/direct_sound_samples/cries/uncomp_mr_rime.bin" + .incbin "sound/direct_sound_samples/cries/mr_rime.bin" .align 2 Cry_Runerigus:: - .incbin "sound/direct_sound_samples/cries/uncomp_runerigus.bin" + .incbin "sound/direct_sound_samples/cries/runerigus.bin" .align 2 Cry_Milcery:: - .incbin "sound/direct_sound_samples/cries/uncomp_milcery.bin" + .incbin "sound/direct_sound_samples/cries/milcery.bin" .align 2 Cry_Alcremie:: - .incbin "sound/direct_sound_samples/cries/uncomp_alcremie.bin" + .incbin "sound/direct_sound_samples/cries/alcremie.bin" .align 2 Cry_Falinks:: - .incbin "sound/direct_sound_samples/cries/uncomp_falinks.bin" + .incbin "sound/direct_sound_samples/cries/falinks.bin" .align 2 Cry_Pincurchin:: - .incbin "sound/direct_sound_samples/cries/uncomp_pincurchin.bin" + .incbin "sound/direct_sound_samples/cries/pincurchin.bin" .align 2 Cry_Snom:: - .incbin "sound/direct_sound_samples/cries/uncomp_snom.bin" + .incbin "sound/direct_sound_samples/cries/snom.bin" .align 2 Cry_Frosmoth:: - .incbin "sound/direct_sound_samples/cries/uncomp_frosmoth.bin" + .incbin "sound/direct_sound_samples/cries/frosmoth.bin" .align 2 Cry_Stonjourner:: - .incbin "sound/direct_sound_samples/cries/uncomp_stonjourner.bin" + .incbin "sound/direct_sound_samples/cries/stonjourner.bin" .align 2 Cry_Eiscue:: - .incbin "sound/direct_sound_samples/cries/uncomp_eiscue.bin" + .incbin "sound/direct_sound_samples/cries/eiscue.bin" .align 2 Cry_Indeedee:: - .incbin "sound/direct_sound_samples/cries/uncomp_indeedee.bin" + .incbin "sound/direct_sound_samples/cries/indeedee.bin" .align 2 Cry_Morpeko:: - .incbin "sound/direct_sound_samples/cries/uncomp_morpeko.bin" + .incbin "sound/direct_sound_samples/cries/morpeko.bin" .align 2 Cry_Cufant:: - .incbin "sound/direct_sound_samples/cries/uncomp_cufant.bin" + .incbin "sound/direct_sound_samples/cries/cufant.bin" .align 2 Cry_Copperajah:: - .incbin "sound/direct_sound_samples/cries/uncomp_copperajah.bin" + .incbin "sound/direct_sound_samples/cries/copperajah.bin" .align 2 Cry_Dracozolt:: - .incbin "sound/direct_sound_samples/cries/uncomp_dracozolt.bin" + .incbin "sound/direct_sound_samples/cries/dracozolt.bin" .align 2 Cry_Arctozolt:: - .incbin "sound/direct_sound_samples/cries/uncomp_arctozolt.bin" + .incbin "sound/direct_sound_samples/cries/arctozolt.bin" .align 2 Cry_Dracovish:: - .incbin "sound/direct_sound_samples/cries/uncomp_dracovish.bin" + .incbin "sound/direct_sound_samples/cries/dracovish.bin" .align 2 Cry_Arctovish:: - .incbin "sound/direct_sound_samples/cries/uncomp_arctovish.bin" + .incbin "sound/direct_sound_samples/cries/arctovish.bin" .align 2 Cry_Duraludon:: - .incbin "sound/direct_sound_samples/cries/uncomp_duraludon.bin" + .incbin "sound/direct_sound_samples/cries/duraludon.bin" .align 2 Cry_Dreepy:: - .incbin "sound/direct_sound_samples/cries/uncomp_dreepy.bin" + .incbin "sound/direct_sound_samples/cries/dreepy.bin" .align 2 Cry_Drakloak:: - .incbin "sound/direct_sound_samples/cries/uncomp_drakloak.bin" + .incbin "sound/direct_sound_samples/cries/drakloak.bin" .align 2 Cry_Dragapult:: - .incbin "sound/direct_sound_samples/cries/uncomp_dragapult.bin" + .incbin "sound/direct_sound_samples/cries/dragapult.bin" .align 2 Cry_Zacian:: - .incbin "sound/direct_sound_samples/cries/uncomp_zacian.bin" + .incbin "sound/direct_sound_samples/cries/zacian.bin" .align 2 Cry_Zamazenta:: - .incbin "sound/direct_sound_samples/cries/uncomp_zamazenta.bin" + .incbin "sound/direct_sound_samples/cries/zamazenta.bin" .align 2 Cry_Eternatus:: - .incbin "sound/direct_sound_samples/cries/uncomp_eternatus.bin" + .incbin "sound/direct_sound_samples/cries/eternatus.bin" .align 2 Cry_Kubfu:: - .incbin "sound/direct_sound_samples/cries/uncomp_kubfu.bin" + .incbin "sound/direct_sound_samples/cries/kubfu.bin" .align 2 Cry_Urshifu:: - .incbin "sound/direct_sound_samples/cries/uncomp_urshifu.bin" + .incbin "sound/direct_sound_samples/cries/urshifu.bin" .align 2 Cry_Zarude:: - .incbin "sound/direct_sound_samples/cries/uncomp_zarude.bin" + .incbin "sound/direct_sound_samples/cries/zarude.bin" .align 2 Cry_Regieleki:: - .incbin "sound/direct_sound_samples/cries/uncomp_regieleki.bin" + .incbin "sound/direct_sound_samples/cries/regieleki.bin" .align 2 Cry_Regidrago:: - .incbin "sound/direct_sound_samples/cries/uncomp_regidrago.bin" + .incbin "sound/direct_sound_samples/cries/regidrago.bin" .align 2 Cry_Glastrier:: - .incbin "sound/direct_sound_samples/cries/uncomp_glastrier.bin" + .incbin "sound/direct_sound_samples/cries/glastrier.bin" .align 2 Cry_Spectrier:: - .incbin "sound/direct_sound_samples/cries/uncomp_spectrier.bin" + .incbin "sound/direct_sound_samples/cries/spectrier.bin" .align 2 Cry_Calyrex:: - .incbin "sound/direct_sound_samples/cries/uncomp_calyrex.bin" + .incbin "sound/direct_sound_samples/cries/calyrex.bin" .align 2 Cry_VenusaurMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_venusaur.bin" + .incbin "sound/direct_sound_samples/cries/mega_venusaur.bin" .align 2 Cry_CharizardMegaX:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_charizard_x.bin" + .incbin "sound/direct_sound_samples/cries/mega_charizard_x.bin" .align 2 Cry_CharizardMegaY:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_charizard_y.bin" + .incbin "sound/direct_sound_samples/cries/mega_charizard_y.bin" .align 2 Cry_BlastoiseMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_blastoise.bin" + .incbin "sound/direct_sound_samples/cries/mega_blastoise.bin" .align 2 Cry_BeedrillMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_beedrill.bin" + .incbin "sound/direct_sound_samples/cries/mega_beedrill.bin" .align 2 Cry_PidgeotMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_pidgeot.bin" + .incbin "sound/direct_sound_samples/cries/mega_pidgeot.bin" .align 2 Cry_AlakazamMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_alakazam.bin" + .incbin "sound/direct_sound_samples/cries/mega_alakazam.bin" .align 2 Cry_SlowbroMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_slowbro.bin" + .incbin "sound/direct_sound_samples/cries/mega_slowbro.bin" .align 2 Cry_GengarMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_gengar.bin" + .incbin "sound/direct_sound_samples/cries/mega_gengar.bin" .align 2 Cry_KangaskhanMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_kangaskhan.bin" + .incbin "sound/direct_sound_samples/cries/mega_kangaskhan.bin" .align 2 Cry_PinsirMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_pinsir.bin" + .incbin "sound/direct_sound_samples/cries/mega_pinsir.bin" .align 2 Cry_GyaradosMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_gyarados.bin" + .incbin "sound/direct_sound_samples/cries/mega_gyarados.bin" .align 2 Cry_AerodactylMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_aerodactyl.bin" + .incbin "sound/direct_sound_samples/cries/mega_aerodactyl.bin" .align 2 Cry_MewtwoMegaX:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_mewtwo_x.bin" + .incbin "sound/direct_sound_samples/cries/mega_mewtwo_x.bin" .align 2 Cry_MewtwoMegaY:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_mewtwo_y.bin" + .incbin "sound/direct_sound_samples/cries/mega_mewtwo_y.bin" .align 2 Cry_AmpharosMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_ampharos.bin" + .incbin "sound/direct_sound_samples/cries/mega_ampharos.bin" .align 2 Cry_SteelixMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_steelix.bin" + .incbin "sound/direct_sound_samples/cries/mega_steelix.bin" .align 2 Cry_ScizorMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_scizor.bin" + .incbin "sound/direct_sound_samples/cries/mega_scizor.bin" .align 2 Cry_HeracrossMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_heracross.bin" + .incbin "sound/direct_sound_samples/cries/mega_heracross.bin" .align 2 Cry_HoundoomMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_houndoom.bin" + .incbin "sound/direct_sound_samples/cries/mega_houndoom.bin" .align 2 Cry_TyranitarMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_tyranitar.bin" + .incbin "sound/direct_sound_samples/cries/mega_tyranitar.bin" .align 2 Cry_SceptileMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_sceptile.bin" + .incbin "sound/direct_sound_samples/cries/mega_sceptile.bin" .align 2 Cry_BlazikenMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_blaziken.bin" + .incbin "sound/direct_sound_samples/cries/mega_blaziken.bin" .align 2 Cry_SwampertMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_swampert.bin" + .incbin "sound/direct_sound_samples/cries/mega_swampert.bin" .align 2 Cry_GardevoirMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_gardevoir.bin" + .incbin "sound/direct_sound_samples/cries/mega_gardevoir.bin" .align 2 Cry_SableyeMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_sableye.bin" + .incbin "sound/direct_sound_samples/cries/mega_sableye.bin" .align 2 Cry_MawileMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_mawile.bin" + .incbin "sound/direct_sound_samples/cries/mega_mawile.bin" .align 2 Cry_AggronMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_aggron.bin" + .incbin "sound/direct_sound_samples/cries/mega_aggron.bin" .align 2 Cry_MedichamMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_medicham.bin" + .incbin "sound/direct_sound_samples/cries/mega_medicham.bin" .align 2 Cry_ManectricMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_manectric.bin" + .incbin "sound/direct_sound_samples/cries/mega_manectric.bin" .align 2 Cry_SharpedoMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_sharpedo.bin" + .incbin "sound/direct_sound_samples/cries/mega_sharpedo.bin" .align 2 Cry_CameruptMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_camerupt.bin" + .incbin "sound/direct_sound_samples/cries/mega_camerupt.bin" .align 2 Cry_AltariaMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_altaria.bin" + .incbin "sound/direct_sound_samples/cries/mega_altaria.bin" .align 2 Cry_BanetteMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_banette.bin" + .incbin "sound/direct_sound_samples/cries/mega_banette.bin" .align 2 Cry_AbsolMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_absol.bin" + .incbin "sound/direct_sound_samples/cries/mega_absol.bin" .align 2 Cry_GlalieMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_glalie.bin" + .incbin "sound/direct_sound_samples/cries/mega_glalie.bin" .align 2 Cry_SalamenceMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_salamence.bin" + .incbin "sound/direct_sound_samples/cries/mega_salamence.bin" .align 2 Cry_MetagrossMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_metagross.bin" + .incbin "sound/direct_sound_samples/cries/mega_metagross.bin" .align 2 Cry_LatiasMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_latias.bin" + .incbin "sound/direct_sound_samples/cries/mega_latias.bin" .align 2 Cry_LatiosMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_latios.bin" + .incbin "sound/direct_sound_samples/cries/mega_latios.bin" .align 2 Cry_LopunnyMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_lopunny.bin" + .incbin "sound/direct_sound_samples/cries/mega_lopunny.bin" .align 2 Cry_GarchompMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_garchomp.bin" + .incbin "sound/direct_sound_samples/cries/mega_garchomp.bin" .align 2 Cry_LucarioMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_lucario.bin" + .incbin "sound/direct_sound_samples/cries/mega_lucario.bin" .align 2 Cry_AbomasnowMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_abomasnow.bin" + .incbin "sound/direct_sound_samples/cries/mega_abomasnow.bin" .align 2 Cry_GalladeMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_gallade.bin" + .incbin "sound/direct_sound_samples/cries/mega_gallade.bin" .align 2 Cry_AudinoMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_audino.bin" + .incbin "sound/direct_sound_samples/cries/mega_audino.bin" .align 2 Cry_DiancieMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_diancie.bin" + .incbin "sound/direct_sound_samples/cries/mega_diancie.bin" .align 2 Cry_RayquazaMega:: - .incbin "sound/direct_sound_samples/cries/uncomp_mega_rayquaza.bin" + .incbin "sound/direct_sound_samples/cries/mega_rayquaza.bin" .align 2 Cry_KyogrePrimal:: - .incbin "sound/direct_sound_samples/cries/uncomp_primal_kyogre.bin" + .incbin "sound/direct_sound_samples/cries/primal_kyogre.bin" .align 2 Cry_GroudonPrimal:: - .incbin "sound/direct_sound_samples/cries/uncomp_primal_groudon.bin" + .incbin "sound/direct_sound_samples/cries/primal_groudon.bin" .align 2 Cry_SlowpokeGalarian:: - .incbin "sound/direct_sound_samples/cries/uncomp_slowpoke_galarian.bin" + .incbin "sound/direct_sound_samples/cries/slowpoke_galarian.bin" .align 2 Cry_ShayminSky:: @@ -4208,103 +4208,103 @@ Cry_KyuremBlack:: .align 2 Cry_FloetteEternalFlower:: - .incbin "sound/direct_sound_samples/cries/uncomp_floette_eternal_flower.bin" + .incbin "sound/direct_sound_samples/cries/floette_eternal_flower.bin" .align 2 Cry_PumpkabooSuper:: - .incbin "sound/direct_sound_samples/cries/uncomp_pumpkaboo_super.bin" + .incbin "sound/direct_sound_samples/cries/pumpkaboo_super.bin" .align 2 Cry_GourgeistSuper:: - .incbin "sound/direct_sound_samples/cries/uncomp_gourgeist_super.bin" + .incbin "sound/direct_sound_samples/cries/gourgeist_super.bin" .align 2 Cry_Zygarde10:: - .incbin "sound/direct_sound_samples/cries/uncomp_zygarde_10.bin" + .incbin "sound/direct_sound_samples/cries/zygarde_10.bin" .align 2 Cry_ZygardeComplete:: - .incbin "sound/direct_sound_samples/cries/uncomp_zygarde_complete.bin" + .incbin "sound/direct_sound_samples/cries/zygarde_complete.bin" .align 2 Cry_HoopaUnbound:: - .incbin "sound/direct_sound_samples/cries/uncomp_hoopa_unbound.bin" + .incbin "sound/direct_sound_samples/cries/hoopa_unbound.bin" .align 2 Cry_OricorioPomPom:: - .incbin "sound/direct_sound_samples/cries/uncomp_oricorio_pom_pom.bin" + .incbin "sound/direct_sound_samples/cries/oricorio_pom_pom.bin" .align 2 Cry_OricorioPau:: - .incbin "sound/direct_sound_samples/cries/uncomp_oricorio_pau.bin" + .incbin "sound/direct_sound_samples/cries/oricorio_pau.bin" .align 2 Cry_OricorioSensu:: - .incbin "sound/direct_sound_samples/cries/uncomp_oricorio_sensu.bin" + .incbin "sound/direct_sound_samples/cries/oricorio_sensu.bin" .align 2 Cry_LycanrocMidnight:: - .incbin "sound/direct_sound_samples/cries/uncomp_lycanroc_midnight.bin" + .incbin "sound/direct_sound_samples/cries/lycanroc_midnight.bin" .align 2 Cry_LycanrocDusk:: - .incbin "sound/direct_sound_samples/cries/uncomp_lycanroc_dusk.bin" + .incbin "sound/direct_sound_samples/cries/lycanroc_dusk.bin" .align 2 Cry_WishiwashiSchool:: - .incbin "sound/direct_sound_samples/cries/uncomp_wishiwashi_school.bin" + .incbin "sound/direct_sound_samples/cries/wishiwashi_school.bin" .align 2 Cry_NecrozmaDuskMane:: - .incbin "sound/direct_sound_samples/cries/uncomp_necrozma_dusk_mane.bin" + .incbin "sound/direct_sound_samples/cries/necrozma_dusk_mane.bin" .align 2 Cry_NecrozmaDawnWings:: - .incbin "sound/direct_sound_samples/cries/uncomp_necrozma_dawn_wings.bin" + .incbin "sound/direct_sound_samples/cries/necrozma_dawn_wings.bin" .align 2 Cry_NecrozmaUltra:: - .incbin "sound/direct_sound_samples/cries/uncomp_necrozma_ultra.bin" + .incbin "sound/direct_sound_samples/cries/necrozma_ultra.bin" .align 2 Cry_ToxtricityLowKey:: - .incbin "sound/direct_sound_samples/cries/uncomp_toxtricity_low_key.bin" + .incbin "sound/direct_sound_samples/cries/toxtricity_low_key.bin" .align 2 Cry_EiscueNoiceFace:: - .incbin "sound/direct_sound_samples/cries/uncomp_eiscue_noice_face.bin" + .incbin "sound/direct_sound_samples/cries/eiscue_noice_face.bin" .align 2 Cry_IndeedeeFemale:: - .incbin "sound/direct_sound_samples/cries/uncomp_indeedee_female.bin" + .incbin "sound/direct_sound_samples/cries/indeedee_female.bin" .align 2 Cry_MorpekoHangry:: - .incbin "sound/direct_sound_samples/cries/uncomp_morpeko_hangry.bin" + .incbin "sound/direct_sound_samples/cries/morpeko_hangry.bin" .align 2 Cry_ZacianCrownedSword:: - .incbin "sound/direct_sound_samples/cries/uncomp_zacian_crowned_sword.bin" + .incbin "sound/direct_sound_samples/cries/zacian_crowned_sword.bin" .align 2 Cry_ZamazentaCrownedShield:: - .incbin "sound/direct_sound_samples/cries/uncomp_zamazenta_crowned_shield.bin" + .incbin "sound/direct_sound_samples/cries/zamazenta_crowned_shield.bin" .align 2 Cry_EternatusEternamax:: - .incbin "sound/direct_sound_samples/cries/uncomp_eternatus_eternamax.bin" + .incbin "sound/direct_sound_samples/cries/eternatus_eternamax.bin" .align 2 Cry_UrshifuRapidStrikeStyle:: - .incbin "sound/direct_sound_samples/cries/uncomp_urshifu_rapid_strike_style.bin" + .incbin "sound/direct_sound_samples/cries/urshifu_rapid_strike_style.bin" .align 2 Cry_CalyrexIceRider:: - .incbin "sound/direct_sound_samples/cries/uncomp_calyrex_ice_rider.bin" + .incbin "sound/direct_sound_samples/cries/calyrex_ice_rider.bin" .align 2 Cry_CalyrexShadowRider:: - .incbin "sound/direct_sound_samples/cries/uncomp_calyrex_shadow_rider.bin" + .incbin "sound/direct_sound_samples/cries/calyrex_shadow_rider.bin" .align 2 DirectSoundWaveData_register_noise:: diff --git a/sound/direct_sound_samples/cries/uncomp_aegislash.aif b/sound/direct_sound_samples/cries/aegislash.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_aegislash.aif rename to sound/direct_sound_samples/cries/aegislash.aif diff --git a/sound/direct_sound_samples/cries/uncomp_alcremie.aif b/sound/direct_sound_samples/cries/alcremie.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_alcremie.aif rename to sound/direct_sound_samples/cries/alcremie.aif diff --git a/sound/direct_sound_samples/cries/uncomp_amaura.aif b/sound/direct_sound_samples/cries/amaura.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_amaura.aif rename to sound/direct_sound_samples/cries/amaura.aif diff --git a/sound/direct_sound_samples/cries/uncomp_appletun.aif b/sound/direct_sound_samples/cries/appletun.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_appletun.aif rename to sound/direct_sound_samples/cries/appletun.aif diff --git a/sound/direct_sound_samples/cries/uncomp_applin.aif b/sound/direct_sound_samples/cries/applin.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_applin.aif rename to sound/direct_sound_samples/cries/applin.aif diff --git a/sound/direct_sound_samples/cries/uncomp_araquanid.aif b/sound/direct_sound_samples/cries/araquanid.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_araquanid.aif rename to sound/direct_sound_samples/cries/araquanid.aif diff --git a/sound/direct_sound_samples/cries/uncomp_arctovish.aif b/sound/direct_sound_samples/cries/arctovish.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_arctovish.aif rename to sound/direct_sound_samples/cries/arctovish.aif diff --git a/sound/direct_sound_samples/cries/uncomp_arctozolt.aif b/sound/direct_sound_samples/cries/arctozolt.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_arctozolt.aif rename to sound/direct_sound_samples/cries/arctozolt.aif diff --git a/sound/direct_sound_samples/cries/uncomp_aromatisse.aif b/sound/direct_sound_samples/cries/aromatisse.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_aromatisse.aif rename to sound/direct_sound_samples/cries/aromatisse.aif diff --git a/sound/direct_sound_samples/cries/uncomp_arrokuda.aif b/sound/direct_sound_samples/cries/arrokuda.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_arrokuda.aif rename to sound/direct_sound_samples/cries/arrokuda.aif diff --git a/sound/direct_sound_samples/cries/uncomp_aurorus.aif b/sound/direct_sound_samples/cries/aurorus.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_aurorus.aif rename to sound/direct_sound_samples/cries/aurorus.aif diff --git a/sound/direct_sound_samples/cries/uncomp_avalugg.aif b/sound/direct_sound_samples/cries/avalugg.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_avalugg.aif rename to sound/direct_sound_samples/cries/avalugg.aif diff --git a/sound/direct_sound_samples/cries/uncomp_barbaracle.aif b/sound/direct_sound_samples/cries/barbaracle.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_barbaracle.aif rename to sound/direct_sound_samples/cries/barbaracle.aif diff --git a/sound/direct_sound_samples/cries/uncomp_barraskewda.aif b/sound/direct_sound_samples/cries/barraskewda.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_barraskewda.aif rename to sound/direct_sound_samples/cries/barraskewda.aif diff --git a/sound/direct_sound_samples/cries/uncomp_bergmite.aif b/sound/direct_sound_samples/cries/bergmite.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_bergmite.aif rename to sound/direct_sound_samples/cries/bergmite.aif diff --git a/sound/direct_sound_samples/cries/uncomp_bewear.aif b/sound/direct_sound_samples/cries/bewear.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_bewear.aif rename to sound/direct_sound_samples/cries/bewear.aif diff --git a/sound/direct_sound_samples/cries/uncomp_binacle.aif b/sound/direct_sound_samples/cries/binacle.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_binacle.aif rename to sound/direct_sound_samples/cries/binacle.aif diff --git a/sound/direct_sound_samples/cries/uncomp_blacephalon.aif b/sound/direct_sound_samples/cries/blacephalon.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_blacephalon.aif rename to sound/direct_sound_samples/cries/blacephalon.aif diff --git a/sound/direct_sound_samples/cries/uncomp_blipbug.aif b/sound/direct_sound_samples/cries/blipbug.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_blipbug.aif rename to sound/direct_sound_samples/cries/blipbug.aif diff --git a/sound/direct_sound_samples/cries/uncomp_boltund.aif b/sound/direct_sound_samples/cries/boltund.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_boltund.aif rename to sound/direct_sound_samples/cries/boltund.aif diff --git a/sound/direct_sound_samples/cries/uncomp_bounsweet.aif b/sound/direct_sound_samples/cries/bounsweet.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_bounsweet.aif rename to sound/direct_sound_samples/cries/bounsweet.aif diff --git a/sound/direct_sound_samples/cries/uncomp_braixen.aif b/sound/direct_sound_samples/cries/braixen.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_braixen.aif rename to sound/direct_sound_samples/cries/braixen.aif diff --git a/sound/direct_sound_samples/cries/uncomp_brionne.aif b/sound/direct_sound_samples/cries/brionne.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_brionne.aif rename to sound/direct_sound_samples/cries/brionne.aif diff --git a/sound/direct_sound_samples/cries/uncomp_bruxish.aif b/sound/direct_sound_samples/cries/bruxish.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_bruxish.aif rename to sound/direct_sound_samples/cries/bruxish.aif diff --git a/sound/direct_sound_samples/cries/uncomp_bunnelby.aif b/sound/direct_sound_samples/cries/bunnelby.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_bunnelby.aif rename to sound/direct_sound_samples/cries/bunnelby.aif diff --git a/sound/direct_sound_samples/cries/uncomp_buzzwole.aif b/sound/direct_sound_samples/cries/buzzwole.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_buzzwole.aif rename to sound/direct_sound_samples/cries/buzzwole.aif diff --git a/sound/direct_sound_samples/cries/uncomp_calyrex.aif b/sound/direct_sound_samples/cries/calyrex.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_calyrex.aif rename to sound/direct_sound_samples/cries/calyrex.aif diff --git a/sound/direct_sound_samples/cries/uncomp_calyrex_ice_rider.aif b/sound/direct_sound_samples/cries/calyrex_ice_rider.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_calyrex_ice_rider.aif rename to sound/direct_sound_samples/cries/calyrex_ice_rider.aif diff --git a/sound/direct_sound_samples/cries/uncomp_calyrex_shadow_rider.aif b/sound/direct_sound_samples/cries/calyrex_shadow_rider.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_calyrex_shadow_rider.aif rename to sound/direct_sound_samples/cries/calyrex_shadow_rider.aif diff --git a/sound/direct_sound_samples/cries/uncomp_carbink.aif b/sound/direct_sound_samples/cries/carbink.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_carbink.aif rename to sound/direct_sound_samples/cries/carbink.aif diff --git a/sound/direct_sound_samples/cries/uncomp_carkol.aif b/sound/direct_sound_samples/cries/carkol.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_carkol.aif rename to sound/direct_sound_samples/cries/carkol.aif diff --git a/sound/direct_sound_samples/cries/uncomp_celesteela.aif b/sound/direct_sound_samples/cries/celesteela.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_celesteela.aif rename to sound/direct_sound_samples/cries/celesteela.aif diff --git a/sound/direct_sound_samples/cries/uncomp_centiskorch.aif b/sound/direct_sound_samples/cries/centiskorch.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_centiskorch.aif rename to sound/direct_sound_samples/cries/centiskorch.aif diff --git a/sound/direct_sound_samples/cries/uncomp_charjabug.aif b/sound/direct_sound_samples/cries/charjabug.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_charjabug.aif rename to sound/direct_sound_samples/cries/charjabug.aif diff --git a/sound/direct_sound_samples/cries/uncomp_chesnaught.aif b/sound/direct_sound_samples/cries/chesnaught.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_chesnaught.aif rename to sound/direct_sound_samples/cries/chesnaught.aif diff --git a/sound/direct_sound_samples/cries/uncomp_chespin.aif b/sound/direct_sound_samples/cries/chespin.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_chespin.aif rename to sound/direct_sound_samples/cries/chespin.aif diff --git a/sound/direct_sound_samples/cries/uncomp_chewtle.aif b/sound/direct_sound_samples/cries/chewtle.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_chewtle.aif rename to sound/direct_sound_samples/cries/chewtle.aif diff --git a/sound/direct_sound_samples/cries/uncomp_cinderace.aif b/sound/direct_sound_samples/cries/cinderace.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_cinderace.aif rename to sound/direct_sound_samples/cries/cinderace.aif diff --git a/sound/direct_sound_samples/cries/uncomp_clauncher.aif b/sound/direct_sound_samples/cries/clauncher.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_clauncher.aif rename to sound/direct_sound_samples/cries/clauncher.aif diff --git a/sound/direct_sound_samples/cries/uncomp_clawitzer.aif b/sound/direct_sound_samples/cries/clawitzer.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_clawitzer.aif rename to sound/direct_sound_samples/cries/clawitzer.aif diff --git a/sound/direct_sound_samples/cries/uncomp_clobbopus.aif b/sound/direct_sound_samples/cries/clobbopus.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_clobbopus.aif rename to sound/direct_sound_samples/cries/clobbopus.aif diff --git a/sound/direct_sound_samples/cries/uncomp_coalossal.aif b/sound/direct_sound_samples/cries/coalossal.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_coalossal.aif rename to sound/direct_sound_samples/cries/coalossal.aif diff --git a/sound/direct_sound_samples/cries/uncomp_comfey.aif b/sound/direct_sound_samples/cries/comfey.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_comfey.aif rename to sound/direct_sound_samples/cries/comfey.aif diff --git a/sound/direct_sound_samples/cries/uncomp_copperajah.aif b/sound/direct_sound_samples/cries/copperajah.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_copperajah.aif rename to sound/direct_sound_samples/cries/copperajah.aif diff --git a/sound/direct_sound_samples/cries/uncomp_corviknight.aif b/sound/direct_sound_samples/cries/corviknight.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_corviknight.aif rename to sound/direct_sound_samples/cries/corviknight.aif diff --git a/sound/direct_sound_samples/cries/uncomp_corvisquire.aif b/sound/direct_sound_samples/cries/corvisquire.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_corvisquire.aif rename to sound/direct_sound_samples/cries/corvisquire.aif diff --git a/sound/direct_sound_samples/cries/uncomp_cosmoem.aif b/sound/direct_sound_samples/cries/cosmoem.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_cosmoem.aif rename to sound/direct_sound_samples/cries/cosmoem.aif diff --git a/sound/direct_sound_samples/cries/uncomp_cosmog.aif b/sound/direct_sound_samples/cries/cosmog.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_cosmog.aif rename to sound/direct_sound_samples/cries/cosmog.aif diff --git a/sound/direct_sound_samples/cries/cottonee.aif b/sound/direct_sound_samples/cries/cottonee.aif index 526dc5f79a242aa821ad353c660616dd97c42349..a459a62f726aacc83689b3ccc89e70a1fd2d8175 100644 GIT binary patch literal 9330 zcmYLvcU&7+zVAq*-X+vPLLelHK!{>G2295>cHCkUm)MD8r)-MTvwQ!0cQ>0&yD4@y z_O9*3E$$TzHa5oe-Vs%RgnI8?qc`5&``(<7=4j^p=G5=`onNbaapzV55WiiyxvsAI z#jWsvfB_)jH%I`ti8M)qpW$m;<z7ttZ7a;Cev_4bvU z&Ch05jUH57T4{CTzL%R0H0`J_$>t(Fn%QUfZ~u1c%(dpWZlx>ANw03)wg2U2H7f`R5B4Z}!eAT#Qs%*|vkn-a7vA=f@82sVkK60Fz?kY4h*DT{`pQiF3DF+6Sf# z5P>VL-TLye4?q9-^W$&7wyiuTof&YcMxR_id;0WG-+cf5=^M=t`jrMZf{~G5vHQRq zZyx{S`)|E*bWdqkp@iVDD0=VTxN_>}lRy1<{?~hLcZSytE>?1ORpY@oKl=RmJ8$gU zxnpCNnC#FRW_s`3{Qb9cCr|%+`nT3+!^S8kKD*+DSKoQ--9Nnb=F#2TO86XF0G{Bx zzn(t%%~${Z!|yFmgNmBx~CS* z5t=Zwa?jqEnvNdX`(i_B8WW`)e0KlN@4uctceQ&#??cl?xka_RUf!{_p{_WSM{%t# z3^$*ogUB`|be5occff7;V6JRY1qup&S?N7$mz4*A~ywakAY)L#RtRLyP_xrh9 zw_8UwBuUkl*FOL3(~l0lkVW&Fr<%|I@Z}djoM|3b24kc(O|QTACXCgZT&8z<`1Xa1 zr@lLJ>DGW78JAnTBq`MIJr5t%{>hXX64 zeGeZ$xpJ+gb9iV%??$B-meg;3Y5(R;B~nRz#4tZL*4y1ZxE@9ls2o0r2!uQ~#Zceq ziqTEvW>uF}loU&_A@$VQldhgcD>|#{z<~oz71flFzI{x~$ zEP{UKN%P%DvpSHQQ(Bx8i`Ng`yKw&8%^n?5()jA9e|-1V1}Sp>;rXAx`T6#+lbW;b zm7^~;Nb%ZdH~;?qPv?7-1liWNKK|43S89@?b8Y8;{N-Znj4Q5i+kt~kHE9^l(6wK_ z|LOAMRYcm>S3mmfgI6mP!ivs|KmUBbb;KN#)7bRN{>_D)z~ZAzCr|w2TF)9FEZcGD z$e}$o*-W2iw6p#GlfgM#n39l|S0GDIV4&=469fGN15+9sK#i4^S8uK?*dU@I^z$?Q z&pICuOfQ@L7*2v%BoJ_!bSx0@1)vauj3+V(SZu&zSecs|9hzR&2XNfv4OLsVHC7j; z@h~pU_+xm3Uhn8yup=1k7^T}MCqV5bDD760}LfQKdG`&<^QJ9@2jz=%H{^PIzb9=(UEoj(Ml*DE6IZV85>hbL^CCCBS z`(`59FVsnJNR}*%W$3%tHmfmMltvGuc*jfmbZUZ3V!idlsdk-L-+6zWy!)dMN>J0i z_JsUc+t7eD@2yXdR>XslQ878%(=*gJsYGPI_USu$-qDAnPSDnKAmyn-~ zS(%H(Wo5JMny4T@lWCc=MVYaV=}9|2F((0LJdS{Wv9J57+(E*lFoc8+(gZF6j0A$1 z)QZ9!E*K`pA@m)mzdqYzHFrH8_ZPkUPAOnUm%aIRne|?aIlX{9^7Ys4n4;Pu)J&f` z`IY0<-qv4Q4YX7t-n66&3dGpi{$(gB3A?^*<?d5#E7g+l1z}`wG$9pOh)jes^XT;N%pr>~aNI+?b!tLCoAd_XM$_ROE&kU(nC5 zE)#nDI_4Y>hOD}g-}&VQb@KKd8MIK}m67O{&yJw(U%uIAqo&psYcHH>4p#3@#xO#Y zV~eDn?-%*!x@LhGFG3nW|LE?laBm3)?eHLi)01f%5i{4CEt!(|iV`6`ys(o0hXm!V zi*o_b0>Gt{Fq5r_9UI67Z*pF=mmIjc`{X}ojR{VvW3{T zFNfK=b$eolmQxc@LM}SI@<@@KL#J?qAxXx}wP9Oo32^h~q&?}#I|=gxt0qC6G&0gU z$|xbPc#?8+h3?jFYGE#P@4p}O%F_9GqbISLVh-U23FZqI97$Q3ar!l4PP}H>!AT8Y z|4S#Up&`|~iYwZP)q=7dbkA?syhS|u03wxVoLcmVHl=utL83n>$mD^b$7FB@X65*N zzGYQ|D%i{Kyam;7wA~m$B&86i`zZ|xk52a>3hISx@@QEVYTle&QyjYW#pBp~no6#x z2|2*3o?4uXQp=~6I1YxCo`Tmb8k|G{7vt2cmga)u{5&C~lB;Nf$o!%uf(VRVS*v`# znq^)lym+)0m>DuBrbLJS@x@cT2(vb=VwP_fJD1FH)s^DFz#}CmbAyzko?45LAl=No z!3S7Io@%*b8Z#p+iOnEJp}3-oT!yCo;%q`=zVFT#CzR6drS6W4gYJxmhGgg9gBjYM zkB`Lp2c*^r`P;6ehfMkre@aFXEVJz51!^5fB1CLg2VakJ`^JC zc6e~Hf+U(t29jby?OVu~~*juC%-`}S1+X^*52$#rw;~GIBYi__QE_0K)Tf3wU9KFe8r2#>27C+K^ic7S77+KFgoD?K<#2 z^WH=H)|B@D?nvKGyLWOne>;6j9#fj(7_$g7@meD}U1*ziB;_z&N@El$yUiVP zugv&TGntx6PgVunWv9ZwosM%P&cY||$9+DMv)gx=1txb}d z6Q?wFZ)J{tea2pYI8Wa`%iR28y1nPoDzmhR*njdSqUp02Eaxw1HtZ<_#-0or2pPG_ zIIkTk%1Q9cr`-&uqxaSjB&{rS&o+q@kO`=uLYwH7)m4 z(s%!mp&eKgzxhV;;*Cd<{KTc-f9nGBCD!)#Wm-WdUbm>lmhUge>+$&;DBdvAJh@Df zMB09ON-JTFTz=rptV$~ILq?)vGcyD<1Z%Ot&6j)3Dz0$FoRQR5c=pctQq+#LCQzbE~Z&gX%Guw989Q zBA@G(F9xX`f_6+p;&U)A8(AWuxilsS0Y-yi5Mj4c(uFv8h|EM=-8eESs8JYP7NyD# z5irpRue_mDNFv10QMQ?9a--d}rqcMRY!ZUVW)YowH$lKdS*#Hx2F8HJ;tqw87%Ucx zK_bZvvTJ(6$dpMFF@5 z10TXD3Xe}k1VdOF*69eMv8WKh5yd!l9ts<8lrI{>cp`~H!GhG-Sgb?2qSR_kUXR-o zL?;#$q{fmUn@ZteiD_E-yd%CK1?AKz)dn*}rcKr|W0Aoz_4Iw2f}{7#+D$Bbn_fk?rdLo zjUmXpq;e(HA1r71Je1_z827~Bus&#=>`_E{aeyO06jyAPGNL$^IEn5y8oVge$dfUJ zFKkyTwU#hFk;^~?u<;^33xg)}nF!me5z8mq6-vF!tk!AQmKWx=Aut$ah($^K_>`>d z(oMOEpw)N@W~&EZH$TI=i+y z)_U*pGA5Q9jgSSRcnTr{g#BTLOh&bt@L8qeu)!2W15SGc?NKQf)~!DC%F?4*9ZvK{cbsq>P_ZlhMN zP|e9ll~|!HJAq11%P-AB>84j~Cgt*kT%iXbJc*si;_^Tok46djLrAyU6$D`(=_JT_ zYz#78CZYy{RH|=cU{Y^hneAv<138(6S=`i(wY4=8ej?WIH@IvIOCvp_qbn=3HjCa4 z@+Hztp_qc=C9#QQqtkDPm>7#MtgsLqR*Oc5c6#u11|bm%Mt!(2mOzL?BznXevW8JX zGSNrLNTx*{L(3YSe@(G89~31}5IFc$!r{0Hq69Vu6VT46EEd=L+?*4~2x~R|17X(^-&7GpjWi6uL+_fNX?3g zMmWWr5+<(R=$#t8{QV`@#>!2b8jrkvCp9dToG25tZ+HrAi!2iBD#PKqlIuxtDfAh-+w!i-I(L>v$tdMHp{)NB)_1oX>_4Y3SEJ6B)yuz}a z43fpPFfcYdw{GzT@Ck)4Y^|@`@ya{1w_H z&odY9J?kBtQ$k!xWrr}=D4t7?NtH>2RP%60S65GGTl@W6ciUzWyzIO9VJb@^<-Wm=zpcK7P#-_KpR)6qS)Vs_Yk$he%M{0x$D zbxA(ad;9G9mS+=s7Z|^xZ0nxA`;UJ5rw^J6xnzuMZSd~J3+K-~FIPk;TFzn!}JWN>!XN#-Ysld~!|*A(aHbP%Gk76F0j(oa_!fXU;X9l6Th6k z@OU{$peLkfW))V}Z*Hio+q|WrT$adTP!XE(zNr<(WOvWx{MfUn!^;-8PGJPu329m7 zdyfC{_|XHq8#gACd^*M4;LRVu_~NT?zx(d{3*D;$GB0D(ORvB8>8I}=-o7bU!~nh8 zsg8R$e!q16Vc+ohqRt7#h$I=(3|XcmU7D4jE8&uuY$;xL(XihS zeC_V2)(xQ%QCeDV^$U62nApVhWZe4n_^dV@v}@!O3J)3=G%U`}!>EQr7L~^6BnXnF zsSFenpSGnwi{iGTMJWQjd0|y!4@RSY!_4rM))RKBS2bQdTa=wH;KlONr11<%y2w$J5Hy6^#Qyiox0IKJ#_n0+k!g~ zB&BUE&Ms=$_ukukstdBDVkXLOUhHqVakuSJ%f0)zZnX_8X&+E`s(o)e2j zA{?`AHy=D{yMFn`!=8cBIkgMI(8W2KX&Jd?l|{1TWT}wgkC3P##h6^Jnta$cX*Nwf zY#y?M9*vDE%@s05HHQvYCnsf><;B9j3RwDIoSjn}*5>Eej6RS+1fv0Gh`?fz5Pm-b zM~F#GNlBogU`w~t=UDDM`@^N)1^Lj>qKlbPkYBdr^>^PoSS4XI`6=w6X=Y$xY-YUo zY5UVj2MP(HV^T`DY^%!6$S=+ob0F2^U|(nR`LF)+kB&8)+Y=z9ZrZ#V?y^WA%0tJ@6=a!QjAK%qe#SHNYFDNF_l;nYlZwl=r6 zx8J+dKCO=OrFnTJH3vTY=x}36RzXP`a%JFYU)TNL&t7;isnY6ARxg6aWY8#dUaCYY zm24<0m8E2DkR}p5rq#i_*Y7l6Kk=6@Pd}VoQaMS&%-oV~Z+!UPtGjm|KDNI`L?%)| z!_fVfzR9kur%v4+m|aw;tN;QcOE>SR$>1_$lO^#q4D5M~ICXlHLA^M?umqnDD>|#k z@A3wabbbPZ%Fn8-E0LvV7L{&DqC;ktQnfVkq`hZiMQ^iP96i^Lh(sWiy#v?*tX`ufM`7MGT+xL7`)K}#vC$QRM6taxz( z(eDl;LBMAL+YCkz zSu9Or!d1jEV`4}sB#6O8eIBR7X)|dx7Pl`5USSlPIS=1PGMn{MopC-$c6_n&VI;%VAcRBnJmP90B5NHgJNJ2%zP!xoD6RZ}af^I(&g8^X=F%lK=c^nRJC=~F! z-4Kz(X0llvE-#+P0A2d^b>+fPXV2K2LZ!7t2y~7hIbE8Tl94SF(IS2b44KweRjQSR zCA~Kgh+>&ME{#GWQ3z-d5%l?jC^7*7p-2n{hs)+L$T&P;QH)Pak9FR^^KeA5uF?na zJZXLrEO!(X7v-ffvC&Y#>oBVoiWRL3fy1JSG!~B+L%@PTyU}1YT3{1gFc?9S=oCB# zc3xvK5xY^VcS2y)1uuum4KIP+V2fagI24I5k;x=U!bCP6fX5Aa>}IPk1mMU-Sbw3j z=s3vdv{_9?y?T9J?*l+ICh89aArKAtZ6;R)M1f&1taic9^eBjgASeV7DDWf(LP!D* zjY8wd6ao%U!T~;yKLSJoHh3%9Lx_mmY71Z}6g(D(skL`PuJj*6{K+l8AX-#b>(@P$vj-Z zyuLg)+SAq5KQytZu?3LSxa7>N4TS~S85wCwJQ@ZG1sz89^767mp;Rf=I+G&=VhNNO z7L&>3iIS59Y!V)a3OS5x^Rv^l%S-ceShw>c2n-g7%@v4}MR9aI3Wq#V0Y8=-%OqogP$=j&tJjojy~(795rQQWNkj^p7ssYkhy)zW z+5=vA1qVoI@JKiwBkZy2*4MRq16-rt9YNy> zWIBr{6bs|nF)?&J5*{ARVU%l1rBbCeJ3KIS@pKM1mdEFDnN$J_3V2*jn;Gu8I}n1+ zI|wwMNWjC;CgKSsJQe{1&FAyDT~4`TLcpNWC=>`|*%t^!B0;a$2g5KN48dc7<42;;w+N0zr88(G0uGA;V5VlX!j}!U z%?2PO8c&U3vX~4yjY@=35%R-K(q@IH!v?eZ5CovGIC#D>D0rnKVR$aXQ6w4zTj+2& zJiO6C015{KexKj#dEP7pAdql#*ngM7aDc+$5L_MzK2M?NIDt12fCN!!3>r4PqG5&u zZ&Wza1tx=22p#|wMZlZ*c_9i!0?$t&xLvpi9@F#B5pWAAxa@g?2@nW)h%gDvUqUb$ zO!u4&f?GkrF$?h2!0n))0~PKH+>_^hfqN7BS5M)JFgPqs0H4G#lHqFL-u@>&?+4u4 zzXNj+@UYt~ zP+woWbu+kz&>&E7hXTP=6N2F9Dm84`u@n4btbsuO7x?@?v}4DXb%3A!KW{=o3y@eW z7LCSYtM{XTzyFeoel z4f#BQKnxlUM572inM@?pIq_^hiVO|d7bYIxK6B#he;oVn%&+G!UVqrDu!PY(aZX9q z#_c&bDEU8^ny0)$?tFWZFIE6*VL!Bn& z#NgxROFtg}?$i%IU;O?0lQEgnO%iA1t=+Qk^`q~8@W~hN9Nf3Ft~4i^5;8B$bU$gj zeD3!Pr~ZBN%#D@@ZT*wW0R)MkUb|`g{x?4S;^WUgd;hJ&FV>aiNV!p;b#dr<(}iDu zK7Hc&H~;?bmm4kjTgTKUM+C#kDqOQ=&%rm|eD8}--+A+mBl{Z)b4oIqVXIX!@bK1+ zi$9$_`NMZ7&!4~cwCUc+qR|44Ps*um*m3C1kN*16`)?oJyJKfVaaIy7WH1<}`X64u zbK&>jemeQiNfj01vMM?z4i9n@4R>Pog=U9*itLuvdAIL-0-v8XHWn5 z?KfZk{hM=l9(GQf{3MQ~tYPo#M~=Sv-ly+;`2L|iwV9GQlyRo(VawH1UmySHKYzM# z<bk}k_PzP){+BjZWX6+XrpeBx-+uVl-@iP0 z_S$oW6D`cE+5XCFufKP6_lC*>A<4fyGt~X~-lNBDBT9Re!cWdCD=#X}Nf$HGLBm-4 zqgxlx-e|tlKB32oO4n~W^4S-ke)hpDn~UR-PRms5)t`@ldF<W1LQO2HsM@e?>z0=e?%!6LE+WCaX6Xt_a1hSPEO4%yF#p- z;<`=iE7xwUt0~Qv#K9b@IhAgHsQX#d?Z<;-QwtiCHAEB_t=sX+>j!slTH8>QmsygD zwd?1)?_Rln`NEkWe?E7)sdq-}XBE`e)irF|(zv0azBVtB26O8cXJ+KGv4P={!J#=_ zFdXG(W@lv=W=T>r5}5=v#H~{=%BJO72s{#t#-K1Pl^RFKh8+fjMy0nq^je)xZ?MO( zB#I!nVoga|c|l%InvhOH`z#A%16}Ri<4f}sgt{_M`2hJjmPJZ5YeE=zC703JGyAJ$7tM~wbhkXWo22^m~Uxvti7$X zcYY--C|$q*m6s1}S(8Nz>pE_q{rc;Fox1gG#z)C$JowSyK7QxG#vGb!arp7wmb?A) zW&|^>ysRvjPYx=&n}5G>_Iyi^2Ei}g@!BVU`|!-T_eXR{N!jL?_wReL zMoO~F+b{j}-M7EoY+nlVDs~PGIJJ$drX&F2$#igfLcy$4>|Qk_on z&9~n?^ZgH}FSkw@kqM=n_8fZcz@AOzsbs%lrmL;BH@OR|Sv2 zNX*PZ4xT&yYxAPRt8Q!QTuI;m$;X?y_MvVYwJ?Kf9_o?f>)-wKovk?xc+{~pH!|G& zd>HI=%5Z$+yPv*Wg;BLX9kN3s>eg#FM^S4({OeoQWZRP7gT^|iZd`gegDTv0XnTnW zy0X~U*7B@lNV#k=IHIh|J@38OC~(h?nTXOHp>we1$s$I;bWh#9-R&0_Wzc=o^Fd}> zUM9t*aZ!>=GI^2t1y_v5$1hJz8ZhLntOT^jYX(OJeScqj+q51*Mxx<(T6&>W#HC;$ zF@F$3EvP8XPb9`7crMAcbpP}>-#1UVR(cU0j?EO61^~*P&FGAwdHq;Q>em&b{$$YVqk0IkUL*sH- zcekKOgB7Ovkb)plAlL>O8M1sT)zK6Rz%axrlXPc*(1)7sQ+ zB~@lQnl20}V3~(LEe@?ZH~gBlNr9>R&zBR+=mr%bHNPO4G}|<|(!8QT5R4KFV{CzYvLiX;{h^>PzhEb%pe`HMl)xG{>S1$%6*!I9 ztOCCF!Ee_z83m}3K3_sAad}c^BIea3g^dmbF5qQJ(;09?&}uTdLyIFuPLar?UNYnI zcURc&+znMV2&S(0`njoM_*AE}a6ReK&n;S3<$9@oQcbL0AE%QA(rVZ86uJ6QMMD;3)SyjVV@THbgcaNG=f=`^F&^`x?j-y(%ONZ5|s^x_yROg~cC+kp#J=se}MBAtRAa zX2lUKQ++Zh3pIPE6JA;zZNI#jb*Rq$=#hWT7FN%1gVMje#UH#iSNPGZxCb}QMVsT> zkNx7P+05)bam`)zLV{+%z+aPxl1=!;*=*Ocjhvc>U6Q%u^Api4YC{O-*J&NmfZJ|! z2ZLt$j3*%{38Nf0^Q(&}W;_3d*UML$nw=E~DviIMm`>Z7ul(`rq5O{z!moVY&D-}9 z;l}^IiQjQJTYtUTyZ*K6m~0WAzE0}u>Cn@%q-3*V(SyQ7f=CK*1f366%nj?sn${*6 zXUndP@W{*(HM2?>9v@e;YxZwo44gR8&e`)u*3#)O?}r=rZ9~iN&7&)Ku9KKXT1IW+ zvI?H=_V-P}n!g^YP+tADomzUZl)lj3(Qko>^KwN5x7R^V%gl^e2jxDjIAng<++`N# zZpdL<=a+rFjH(>2W#HMEn=KU)^`p;Zh~ll)>0!-)94f6zBG2~T8FCPli70Czh^B;N zCPWzPQOr$YL_2F!+zVdZ=4~$v{WEwcN|GAOO02y+#e!lA6Ung-)kNq zto`ChnQwg1oc8KR_1M9i_l%Mfiu}s?n+v3}^yqL?{~SwN$$@F)I#){lt7UAni&tC( zVh2RjHZkpvPxJMDcUhiToUqvPd#5M8x{Qy2#mF>Kd^`c>vs%3_+X{-2EQ}*^vPzSq z@=+BgvpU_pgYlHzF4XfPI0-Z^z)+!Bk0VJg*JL{eCr zEJ5Ky9u!K%XL$5pBAbkk%y&GWM=cP|*77Twaa&V^?%F)%!XO+(uaju=bG zML8^PC=88^g&bC^GaQ6Ku_zD}qhK&BjY@FJh7|#Rc4jg?>WSh7A|W}Vo10!VSgbZ* zAn35zJy4t=Ei*llPYC&8aY>Ry4ookboR|lm3+gj0E*OGHB1ga>Ktn+ok&JdayfF+4 z6%OO#6Bz;hN{G&&c$TK;O@1_vNFbB&2o#;eBZbXNN~KPxv--Rqk1vc8=9T3natR2R zWpT+)ln9aP8QC&AwKx^$x2Ttw%|Y5gGr67G)><4A6K`>3A4z$4)#ES`Z4S)4=)J{p7u{Z5_Hf?~5- zkZ>>>w#@g>xTw-ZlBu_U84{lm&&MP1SQZ6^4#NqwII(~cGP_X>oO5<)#sH^4jRT#_ zP-y`O(9IzoD_5|&TldxRV6Ff?p;&~r z3=Q`zIK!stj)@hFkb`l0B4kPV#wsx-hNSaSh18&7#SliW$e(tPFM7j%qf)Ii`QRKO zmkBlkJYSN)rJ)c+7Jwz3OIjaAfb}UCbb6mfr`H)4m*!>{j8RxLh-M{=lLUNWa&A^h zWp$32;99W|c$~mQ$CJTXg=|`3jX~V1kx{*5$G&pvic06B36j~AsLg0curf>5LP8M0T!q*%d$!v;AW@Mkr)auqa>3XbJ*-A)q>6+^yvZ2;iDv{ z@X?SE6dksk40^4`GnJAY=6F{Q;T7}N! zK@#vpT1sJIq99J3AfQBjTAgBUY-&nr(HiGfCNyvzcnT|?ON#g)EG{wX&@0_o2E=W% zTkNjIDLXGi7@FuGntmA)GGPx_?R9m$jHs)ktw45qRMoFd1*{< zUC}Je4bROl1F#xLqzm~BjsOj3aHvG6Ga5vAG&WxZ>G#>4URt)0$p{nDa#Oe%cNEV+ z>WBI!RCe9`^z*xeZY+R3izV!g^1AxEwTZ$6dN|-WINjQrB>*UlOfIQMEjAFULYXPx z*esUtkr-iu07pUVT>+;D&Oy3tQU9zR6*b#ew3;Z?>c^Afa5Pa20Tw$xfW;6|Q3#HX z@z^6)9}*g1V54Dix`Yl1FAga6%RZYzDWB6blj6xxG>*bcB_OHsf)u_0her9$Gjfx~ z<}xW}=6r}agm1~>5ENu^LL@v9Pe(?feze~TVIs+76v7ro`5nO!1VW+*%x)NwNk^Ji z=4TB?vwFcA3rC>H7z&1_r(|%GvMP!SMcD!@+U=e*Ee{N|-)|ipGdooZ50b`oPE2}n z85`_FHZqu!9ixo;h`i;}`dX<-zp3Q|tp$Vlmx!$LjZ+47N zJUw^(yew&5)!M2Jd)|8E@WGchZ73EqN${Z8V^w$ejcIKzAO|Kab;UyednXkK7HrCLp#@I66~{GE$4px?(~`ScOE@b`0$*R(wgF&lDe%Mvy&6z zNhpYYe(-r)$MDopd)L^kd?}2el+AasT zEZ*?K{!jk)m-pY;mY0Cl%+L4TzVP$+KVE*=H>S|IQS7V@FTJ#FeRWk?hJ+H*$cB5` zdk3CB8&o=DI0iAfx~_gpZ9!g|kd4z1_C9aAa^=yWY+=z6KnV)g6jv0aiG@r$1{Ltw z6k}s@Gc7{`@+X|6)KoFYJ=g#2-fw4bj4lqfjVj&j(!Fo*tIkX-ZP>Z9HW98IYrA#x z>V*gM29pgz;iTo2R@7AH327*+V#;J&c>b`XPp${P(V!3DiLCV6?FYB!2{|NgvJe}B zGx0&4e00(d_p8Up+n)6Te8}Jz2kIXf<#zR)tG*DhLoE=g^xeOF=DTCZ&)#V3?N>x;TuEj@VPQpSj+E>)>nHk$r)TC3R=*#{ zOkUHlwV{5)i?6(UcwMrXV$&>jU;FjfGhZG1*V+4{8l%R}E^pYUJI4x4ot~OF)QvomRC%F+KSBUTa(T@T^jAR4F}-{4HRrchr`YH>@v6 zVnnSL?c&tPVEe<{=T4vfz2$jV|Abr>q>3}Lit8F18@Io-Wo^ZleXs3n$PtiY4x>Td zap&SMC;t7-H{W0GQ|N6Tmk%YX-tqE_TQ~38y{n-tQ$!=+yo%NfKmYW@w_knr!-du{ zrN%)_tKa_O_RX7j9s1<2Z|_=PQ<|5|!&}E5UcPYo>ZPkUZd|$fpx;c+sI0H6ERbdv zZ`e?p05#1H^bPd%fCRv$-_D=E{GfMgP9LHsR{)XrA3A*a(BXZJRYh6x1Qa3`3Hpq( zvB9oxnFqy8OcL^$RC;oDMv8#wnCN)c)!Etg@NsL)?K}6|mr>lz;&dtm0!0vTuF)qg z*M9%~M)Sk&c@K#%PR^}t-2di>AASD$`-gU{%j2^p>4{A6NuB-Y&-hJ-#&eJU*nphERi4%X*F223v=>Wxz_IXBWaw(+}f=hs?x|1msP(w z($;+K^5sisF5GJE0O-95?2!RDE2FriFrDUHUR2DC542wX70g?o!s3C(Wt7xx-L-q~ z{nDdBvX~@n$TZi}bm_wH=K$W;uZD07>bCCMxBtMaufF}^yDwE`h`{m#aZ$&; zyUjPxo%rhSU!A`Jycluq}*F zYg~4tN-keqaeEC4h1x?-&dJLvtauS3-!ffQg~%qF*|Vg^nV`v$3MS0{;%WzzVK{z z1xn$il{W4>`u?Y%fB5DrTWgEbP%Ea+o-X#|q9S z6Wz~RTc7m~4UbN#y$C9ZpsLnw-nMJ+D|=q3%M;PDh^SpHpX_<^=zi1HdqZk_0EUFc zF!31$wT+d@bS6ibDiuOBQ)A`nR{qct%F5kX)?{Rn6B!~lwwjJKTbN7xtM?U}jU^zc()~V!O zmrs0k?CT%TU%q(j@stV0Pm^X8*6%vd0^zxuRq?N4ZvJlBONiK!t;x?Ci2u(R;sjMDI`!JiObXiojet6HJhso5HknprS;Ahs0p8 zuuVBPJ*zb8mt^tWVWnOG^rpg%tnt_;62mTk{oAL~x;f!RGLJLRevG-KGt-W%+3$p-4bSJ5@3e z7ufXk6H`k*B#}s_(S-cu)U1M>bWt*o265XR0h?>Zq|!P4a2N)TAaWAe914lVq?55B zmqyn0 z3u-GYE;%c&q<-(aAHDzjOWR+3?a2Nu`CI~?j0r6CwA}3&0T%Vk$xDxiXXJ}ZdM6Yf z0k*tp`^G{slgUYxCUMDVP$3eHIE^~9*{GS9f%T%Cmnl>r-U@hK{s4@`PTmeHA_L~}gkf+*)N8Ytl(O+*;DTmnXU1n#jxZbnL*wJbDbm!`6lr!rab^OWMI&Nj zF2kaHYGi0|a1QJyCX)@qOvy-QQz>!ryf`|OMnuBl2n-Sy@Oqq1r(?yW(^*{JKnRM$ z5lJMDfKNjN++HvMUb9-JP+Qy)7<*{HYBXrI z2CFLovXTy82#zI!q8$LFfrg1VL^u+GKoBSx_(G$RQLi@$N1;(r2uP?S;32=q1@_@^ zI1u!@Jy8su!(g#kajSjsS%j$5pwTQVX9ofDJ0V|GYmH7Qp33BlQly#Eu>=X_< z?2o~qZi8}3y{uZ8Q|O$*Krn`)aCvMBnMfdkg8>2#61x5XNYvxtQ7D>B11mHxE{;yd zVX!fqYHDO+aS!!b}%6@$T7s}>?*IG#kpz(9c&1cOH- zkw~y5k#JZH@N&?A#}|x2q9KpPXtr6sQCP%lx4Ob;fI9&NF~G`b00qOrqG2DPfX8Js z=*>XVu|%*|le4l?#atejL4b$7 z4xN0sx1+tgzptyaZ(8d`Q(1gTE-30*54>z9z-wS$i)L|dYM`s5qq~1-d~Vt74kO5H zku)nOzofVzD?KAENysLl;E;&lX4Wmv&o3-2D#39SI1{TUiU4RMmBC~(7;yqgk_0#@ zJPw0~g85#ao1LDVQ7p{KW@hI#cCfk7n85Nlg2bd`F_%U_!C^2MBo>K5BH;+Aj$5sZ zgMvFSP)-Di1_HroGz?5P7z&2MQ3w(k6b6An5h(;D6beNmVG*C(4F+gMr&cfPj3zMd z?qCe8X)24&jTZ<-Vv&H$q!0->U;(~WMAqZ9JHQ)WA80!g1K2wXO(0WgOcs+)r4UwY z?~w3Vz-2KQOlGSCD4^1;x?ev4PW>??uxT^~N21Y~tIZ2|91e#?!J}f~P}uJ@YgH;W zKq@UpBN!7jo&bo%;PSaF8kq!z$Qe*K(5EvYuLq1jb`= z;12~|wQxTGi`_1l2ULPU5eOs-3-Dwj0S_2Z&?tB>67blqmKC6aHyD9{=|G_IWGaOS z5E>K`i9mp&#(*F604C52bPPqJkx(cEii}pP9%B#~7Ffft8teA8f6*P=Rf`u6Lxq;8Mt&XA1T2)* zm;Mmo&-&9pRRT(Z&i|x8E>=rZfl{kt18r7i`mcJ`{~7|o{s)0q{$%|h-+=v(($@cR j>;HebrDk&-ctYD|cE8@v*_od1+Uc$? z@1YFdd+&q?fgDC4jPOnZA#We=o%gZt=DA@qGBWc-Mx1jqZX{%8rvm`w3VL!vLTqOG zB@Ms>fR{aC0C+T-g}&r3pA33>{3U_}`vp1VA8 z+zu8XG`GWjqOW|2i!t9`#3cp+bRI$SA&yo$#U!K#!mQGgw2W26MQaa&id~UMQ&-#0 z+;pwOcHv@%j%GGGL5i1m9Ywg0e^Eym>Nxa#^&sq4P;U*EE`Gn1lP}@~|HZR+k`g}t zkDWA^?k@iapz6bGag(2MW%w`CNd@aK4zrw^+Q`NFy1lf3{x8Of%8%Um#J%~zKiKyy zcsaH|)#o}c$jZJ}waLQtzrQgKJ7`0EpS`>2leYVKhD>Pd_PJ|1Z~Rp(v%`db@M0l6 zV5-%!6xX~=r}L@+S-8eIN)-3SezaxBRKx?^&{?8e(+f3K_K_2pw$W{R&8l^j9KG6x zy+v7A4#^SKNz(l0`tWJ6j?Jjp!vR&W=`@QNsu~mfk`H-ks@dEuCd8PzLGn4M9fw

kgZx#8g+X&>JGk#>u5V%1I_Ugh!gUqUFU(Q_8zks@S5GXS&|K+AMc;tNYpgL z=4R-*KAf`fTaV$SY0~SKuhP6Aak;_qAdoRbz%5 zd1rIRp@+Y>nY;4(EFJ_dZ%3x>R0zXxHT9Osigxwg+@qzCuP~L9{=TE-plkMh%cW@*#jPqPdRG-onEB+0la*#Crw@>2A&?L0+n zIL&N&+AI{d42tuZZ<9GIhBiWD&w5VCknUlJBtY+WAZfbC`kM6!*NZ&$R+`~9Ipviq ztKUtfaht*6s?W@XQph~Mggn$|AA9na73|Ar(f-44Zav6*>YY4;G`bLeRoACXwXb`j zr^)O1F*If+=!*5|YTT8B+Ouf*i)RK`&fDX{*saCTyXY2{hh_6qMY7_{tg$9tSXqDwj@X%uF+NeaAcJt}IwRT}}R86qbu8SoNQndBqAXxkOt#R;nGx%ZJ z+Kl&gST!reXY30!pE$^i$vyaVoaQmmW}5?S+DuR4H(|?Mx(3|i_dcKI1dX>?W@}&f zyLnDl0E&HPS^i1F=bSLl=^nd#o=X?`H>52mA&ANvTmobod@KKA(I!Fpx*6lR+>b2@ z-8l%P?|qmh8jlW{Cz)_AA}RcKi6@|E)-@5niYbiVoq+kCzVET6Y1o940L~=Njs0`K zz4h#v^Bpo@mJ!FVI`D-wkB~EVQ8LL$^>4D~~EJ;G8l1%?uPOB^TJwMO}P( zE1{U~WAA-ydt?%%eD(XPl2Iee&$A#D{K0O536*^KdDX>u9a!?6;|YO|seikNV18JQ zPDkle|1D&FlZb8m`!r70yF$C^qVV{NzSb|pPW`(X~Y{G4-;s6X7eKVp`tq2_pVlC|G{zsjo!nu#l7q)mK@{LlG z7Kz>b^pbJ3HYX3u^s@=b@IRSZ+v$B$Cou);g8ooq2Xpm1`Bb|mXsVOa0x|AiedjJV z*h|ZQojMq)*$R%q7VD{D|m?TaO21y7TC%MIe4Wy5IMz36;0Yh@!=#oY5fRX8EL zo=ky7V+YaKz2Sa0LxoHOa{9#}0=>FTxkZIoW`^(dZ0VU#8^A6=Rm6|kuyb=v-+xve z9}dpi=Xx8gvl9&hBX?O-w*tC22Fr>;W1?thogA2?XB6gmF)O16feb+j(4k44YIFch zwca`=2kC?+VJ3{ubK{)_bXMd!59)9_a^h{r?vyxaR}h&o;xVb+1>=D1#P3yy*`LB< zqs~W;9HBES);`)T^P*_607E)%pF?Te>b2o+di<3PH3v?!o*OW@sa8!2V$XSIX|@6p znZ&K%vXQn=5uA31&Vudvn|_5>>^*;8(@crl3qq|Lo3LHqli-=D>~^7gxXcGNOJRDd?9Y2mhDm@JiL(Un9dD!&~nb0X{r+mT1bYjk{&~#oBP8$BahvmPUrzY!m1OFU< zz_%duKVLMJ_bf)=^U!;j1+Os_fcC!*n&G)T|L^E}TuLCPf&-ZQsRrjGUHABxe2~(g zvhkT^uBmS(WV?th?p^~5%t9oe`!U$TFY+kj$_Xt|F$;+{9T+zCKk8Mah3*S|Ga!=+ zy6a>gJ{B}|NDEjQ!9?j=I9}eY216Q&y-SVQY?X#Ut2<16w|b$)aTn5*dw4cDi^^)$ zhZ(xo{DXy^a*EL#z zYZRE|XCU3ZOFGAAh08Rw9ET$fg*4Z30A@XUwyo}~ST#}gbc5`LBbqQz(P7XnFQr3S z2|?tPM`Eozd9Hn8St#o}^rnkdD-N*9HJ?=cHnt?o7?=O=bS*j~`d|*?scvkNNUI;u z1Nd*MWQXJOYriAe-!Q%5f^K2 zoAWRVjtUM0pTR9Iy6TvVZFS7UwU#d&%@JSim*9?YEW94!lks(qy?I2ktypd>>weQY zTlY&PXZroCdA)>t?oBl{qTDJ8kNxIfQyc>F=unBdtE8<>xLfzARWR}Fv$Z zmU&%|Kzly8MFNuZUD)gPq~&TR?4b6{ zeC5!~jWc2tWHda1wq_4N!p#>r#E=UPCeB5;Nur*QOC5n7)q6-z?J^cTIbiUEuc)XI z2$@HbzeGm~)pKQz%DRR#{C+zVp|1aM;D%efh%JDx5(;8Oe8)ViRp^!ElYTW7*2VKl z(v4n(pc=dIQNY3dV2j4LXI|RQB}xFVRTE{mbdvowL13I4y2f9Pi?9c!vKeHU;zhNI^T;m?&hVB_mwZt7X?pzbn00}1{kVI`(%ao| zi9B{WdFJXrl{_no?dx>;zjV2oS^fib$`0I9}2V;O-hMR(Zb5p+HTnzg#>$N09}cz}(>NqpW{(+rpG2?#);ws4IF+ z2z}3lUb^aT8@h_2&!Y+E>@!il%fZy;T5%9|kVU-)9n++T3i*Mh@P=uU!$g%LNb#Ws z>$=>i%?n&)Iwc{v$QyBs&7cIEWl2=D$mKdmoOd3@(GKTuVTKMS(RS>Gz#Y=o2KN^AoTt*y)_w2$ zEFZ*XX(xb5#MVl9guIsH=P_0Ryyh{(4N4QWfxb=`jJcHHMl|;e*K5JqgqE4G_=TSr z!^|6+>=O2#b7O)R`d#nfswU|9(sAqiu5BZ6-=llvSKK?QZ40D7wKzI-J_F>VUpDz( z5!c8{sgnc#4~&~Oi>_`rqDpNV27+^TUkcORo6B+O($}o`u)*JCS@?#T$dr{2+K2I6 zR_wQkPWj!;#U^xu_?OPh`_+FRCYUud!i&$Ul{cspy>8d^RXYVKYop#jlBYz)g@X68 zbdwKNrv3}R3A01SJ6vvCP0ET>m~S-M!~qs9>!i*2#~k4Tr3~4+6&p192@ntcGUT6l zSa*>VG|^}rDS0;@5Y8=^XOWqUN&iY@$coZ;8Fr=k$`SvF)z7j#uff59>)>W#M&e4F zS*dwluYdN@`@`Iju_mjl;18_Kg6+?$e4D1}q`PM?RxAuEy9M!1qM2-*o-$gZVCirwzpi`7Dh5`Z@ zmDpm-`jOC#wQ^a8V|RZ*nYu}HD}mi^nXi30LMAo;bQlA9+wGeoYS)*B&P@6j8LF4! z64$yd%A7{HQ6 zBya{vSAp**f}!1vwsWuS{%H%kjMO_5l(_hKC&jM0 z7M~!gI=O#SG=xr2zw3ALX8g7lZ9g>Pk_{SA-!D7u0H&EVjt5->4FfMPUPBI7wB-yJ zhvvU+`hi-PQtrYgjfz6qb6y3iCru_KPLFY+(-4#PfVhUcPGx*D#39-^l#s;+$emch zk{4b0b~(VVyAB<#YTeDqJ)gC|YTDFg8MgI??~Q6|A>Q}o$a2#6`+zBy9SoNcVW++@ zlD`;MhV0~d`LI5Vd}S}I%`&ia@>rkc8M_iE#)P@k>Hsh`U_%i3(0M~a^%o3b)1V*g z;2|o8F5Po>5T6WdnzY7uS6t9Ay~{}t2z)|W*b0wQAbr~FKpbgBCL`L`QZu*P4XKtb zgP!!2kEe-leSJZU^rKCNtPS=7b!BtBnjv7U;dO&4 zne}!*iqJD3RsC*o)bcPC(h z=StmcILq|suzYSf@B!Bng|ilksMaAnm(h2pG>e{Ai+EApUbOdg9VqgmMi7^LI&O2v zVN{rW^`cRd<=occmTzd;OZ1r;Uex zYw~fO?E00xK4k3q<6e&-L7P5Y@o_#TU&|z3$5af3+&~T~Vo_B?q4%(z8=-`{W`{y_ z!;GIBqs#Ft*PdY)KV~gB%c8EyKKfwD>U%nKGWw4=h9=v;?=?6^^npupAAF|Cg4MD@ zqnF=GbIjW~v8B2$=r=(FW4?LnFYAd8)t}9aEr)k9qGwvnZ+kK(N#>Q0&QqKxCOjkg z?btt+D){7tt*)CBE@MYhe*k}pNr zB5=hvHJefO3wthZ8|y*Y82-7J^XjTkDrR}h(QAF)ImKw8^^7R&hs4;f3?8^5R6O98QEFMTGI&!PN)eMTRWDPhk*1u zzPrmvW8Ru;B6g%*is7%g=Mu**vweH*5-Mr@{f0AW<~%A!#*q5}C&kf8su4NeeEK-` zt{q33KOF=ew!XOQege%UAd}qgbme1GWJ1e#>%wFrS(k_1B63v20LI%$fN}dfB!<`%9D`Xd7(1 zc*qth&62~k3O!f~y-n!p0y#5Z9)*Bj{U%Mdo>Z6S9`)*T{Wi5!LdTmOcTwAAYHhMj z6^m--IvWptSn%bYegU|AfT2%Z&Klh#-LN=(};)OlO>57csPWc5cJljaLsvh>s)m2TANu8}08HDa0yM!|yF2Ney!~cJJ?_}IHrquD8njuIrK!LlZRcUPisZe9RCF_s znjvjGEu^h%gcKp_=K>rW%K>59w{3o@o1N&Z{*(RQIl`BFsWf(j*)>3;_*#zO)k%c( zNxwIZ^;d3+8-t(rJ)w1{H0d&4bI}z&5xE=9*qfB$PLGV$UpOJ8`d>6j>gt1{l9L9+ z9mh5%H9_!nw>Wa18}+Ttg!*9tuL&8id*0|tn|*bW>Nq-0D>-_z8R;@ui%S%J+%L$z zV0nLIJ0dE~S$}s#H?Erq%DiZjm&VL9$i>iiz3%=a&n}X!+xr9W0-K~I3G8}o0qp%G zEqS-e=pl8C8GQ#>$qRRCcyFAdFP};%k~7`D51g6_Dm;F*LbdO$GcPr1-OR{2Zqa69 zpS{BcZoXMf^cm>(`@w~=79YunD(!OQ_0odSi4M|rXazeal3fWYap`3z-vf1s zGX1+hYj$gl9jCuO(xha9gPfB0+}yZY)Z9#{1anI(I{3$?8IX*&x1 zZYDAFv>*B~iN#BK2(4#Qd|H18#2FeVLrbJRxT`j;>;LxE_`UW(`Mt>iBQVayOUJkRe4dF_#>Z2 zo)~k>l-D2LxFMQxx=)^3jffb3vQHdkBi-h*zC$2PNW%bVl{l+kYM*pteW!X&|%!*%l>VNx9Hr7#Ft)#DPq^>#fmd~t!2 zFMrWZj#}?ByJpqLr2qLc{?jhcMIR3+AG5a@sRfnMSX@8aVYl=OeZI{k5;&tMexMyd zrkf9sS<<$jvOP^F$LxyDyEh_(*SqD>7Oex$LAxDCNy$fRk+-cld%;QPy-=E_soyLa zIjM`r_VpS?8Fg?Spp9Qt$$>k^QLz^+WKq^R3yvB8!0}B6En_{Ub7ESN$@qq0{(U!+ zPM8wf8L?OFuZFJAfMIjp$DXd+EQ@F}F*+&LNPzT}H}?Z@oQ9JKw-uIEytRaw>p4FR z57Cb5azc2c_#A(QMN!D;>qA#XJI9GQ@=6qEyNSx9&OOzu_ zZ0ClwwcAqoKi9fZ`Z~Od(Opx4@r)<>c*Cb=hupI^%fF-?9nkNns#Qf^y)~e~tyiLl z`3Ee|JNUZgtaRS{WAEdi8-q(!49lC2os6*S%2ss@pIj!Dg=F*cYu{Y z6479d3)FI@3x8VKhM+(e&+V~Xu0y87_L-CY9-mkk2?03S zY_Tv&?gFL;vr@N04v=y#OfSX{!;^q>`(_aKhEEZ+W^VUtUyeV9&BeU-u zwcMjkrwLkjEHty{iB}*TxrfP`EVT?hC~&lx?#HANr&t!Yygq0maeU6!bLq^VM-Tz#rt9s)V!UBjs$OazJTb+p zVW`9LS+$oJf#?F=+JpyE2v*+aCmT9lRcrv$sT8h)+*0{o}R`~&GEsW%+3W4 z(2BNKk8R0@gWXj=Z=K+WJ`)`r?H}31IH*<9iwlMGl>i_Rq&eF~(tV{{Yn<`kEt35q zpU;^d+V_t}9BlFV%UXJ_6Hp`GJHTY!@das5c!ONq1lt2Xd!l0m8twrUEsZn`K_UZ@ zmua@CdF$H`XhhK2(K`A{QIP4`45O3hoIr-}wl{Tit>~V3$QoBDvP-17*lRYo4^Tlt zrof}c<>d>f5Lf8-43j6Z@wC>gPfRh^?GhqQ4mj&e%U0QiPG=hjTV4A}f6M@`ZS8gU z+m|J3S2hKek43rZ(shu$?zOrkSJ2^DDEY76lz(xYQ5TV$dOWY2@v+%9UwZxHPrJ`E zC?kCV87EC#a`<)~EZ2B&Kmd0MjV*BE3ADR>`{;1^(1O`Ti-H=9?;FG+dQNB=WY!?T ziMbtcC32@nZ8@_TmKAnTvt!5VbI*-e*6^J6nl19K5IV*j^fkKN0;hp?8|&7+)M5&= z0pr=f5OY0dqf$+o?e)ly+k3m|x7ui(p9QJmQT27u>^$?vA#Xy}UP6KEV5gI7`*K*0 z-$I9(_vj2cHE_KH;?EherUxE%o@WYvBHSrcJzB_B|5Z_T2m7QW$?WeN1rJE?tHa%X zoxAc~Q0s?)xX(k0KO~MlwaRJx81Qw@+RxIftfx-j+)(_oSg3de`}$k6*8_>@pAL$@ zajs|xvwgmq_kBo5bwFq>JLCK0nb(Baw${K~$(+B55=Nhz7v)NRSxw#g1y)*O^mH~! z`!{iZG3rTgB={dkIoHi!cgI^i+0FUdqpCK{{}VUqVQ||k$Hb0SpLik?uW3p3cuvm2H%Hqqpz*g zM?Tr!PMCX!NSl36xRJi{43NWri@AOE;H9$Y_${>Ty5z;lHT5&e)iV84Za(gJLF#S7 zn}KAPr(-eqNEMZ#)DI25cf9M~cx81|xO^Qu`o!`k=cU=#S2rFT9!P%E-?^oDym1}z zXe;L?3$*L_k$}}bT5J<6JAI!fz03TY{;L9bRRA{qJqkCM&J3$F00FznU+5xmala z`%30*)9T^WsJh9xuY9_y+~eCC1HMgMX(FZ%{fi`f38 zx_;BDzflKl+RFXPpHnBoPcEnaIq9&PhZnHIen>fa*N<26e7;FM{O@uEVb!W6^62p! zvpBg?tjEr~FSa*Pr%n#asTsF>kd6y`E9ELCRr+E#EEYexU@rNhyKxOuUuk49p-PQ~ zkIi{SPK{bqNe8n4i{_euzg#~#yq4f{5l`&IHmG&(#&mpg1?ALzH*&tfe;w` zG#X@L(k*hZ0-H&{XkN8h?DZ)N+N|78#Wlzi)2-)btbwi2TN#SiEul%XOqXbP{;;t_ zKP#!&ZMp%UC2S|eQI8uADB@{yhTCcjuo(D4lvzUTnIU6))zJZfezpgyV(NlZ-r(!ZLl4~hsqtljhlOXR)Xn}N5yCx=gHtMRYDAGi0zGgI~!kY)z;z}H__{q zLt$4#!}$}A30@oB@QBqO*DQz0PmsIN-!@~jQFX%}xCUWFhQrLT394l~DG}N^8x>Xi z#_h-4r6-a^?Tkqn6~1Dy9&Zo(_sHqTiu+bC#=Ub%10&Y>sS7FvG{kl>shx=~G;3*e zPF|^p#D$4^^}a_lwpl*HPDrAvPMnm1>=ROq`cJ~6v<;j{w}BD!Sn}GqF?M*$F~N>E zMhsf0)TG6VYY&4#Y;8~=Xi7vr?>tS+Gi5N{tmc-TQk_`+c-tj5DlSw$D#Omtnk0vx zHSPzh`!?OvTxP~>F8^MWKJG(oM$oBR>V-BvuXae!j#|@ir}!f zw)ALHn6-d)DAD*b1w<$20wO5WUI=qoQx$pK@UNrwR`(2C<11XpB^er%%QR~1;8Ma zoQpIV3j$z!{aAq@AhmLl6lw$kN+n>ZN_MWsn7}azsYC_F!Ie7w!M@JY%jSIhU|)eX z$7+uCX7JNpu@M0x6YZQDJ3GR+1yV2=0zsGCt3tTCso0*P~{~6or(2Gs7e7qqK&lY zqDw`C8i;@!^ia6|LJ7mbv<3tcq|pFC03ZlrWQ>K$&on3#v=IcL(IYVsxeSZ~tAWNC z;Q5IRVuIBj9_lZl9Ebu*6)L6)B)d zuv(!78W{oQVwnK~GF;X?>a=Q^L~UdYRi4WYK%GjZhd{I!a;OPPD%{gyPP6TBO?R?4g&*$FeK`7APNpN03i@46m|&^h)V$o1cpE_ zHwl3wpg^5Q2fSPYpwV5{ZR&xS&H&JA43{pYS8KFd9S8;kY7{CR2n^6DRr*U^pg}E@ zUiy|ne_0f&Qz;ZmjR6P(Xq9p`0Ax@pGys5FuFyf@Ahk@c*6DNr2o!j!tI=uHY5?^A z&>8~>pwnnB=eV>K(4f<4b(a>qoY9aRM{&3;Aa%XO;7beu5Ob4r11>S-^1UoI&CQNY L{ePUlf586+Ygr;_ literal 17924 zcmbrlXINrcx;6|Z%pxk76ACKH955%$IcKZNva7nfx~F@3rf1IiuIu}A&YW|mr(<>H zDyvG%oO4c~m;gZ$Fpx!2QNe(ss2}J1_x^r2KiGS-H*4)@ul0ocz84`QI}HGcS4Sri z2(cMyntcES0Mwj$1<;Q&X^YbwYqq5HoLtS9Wf%bP|7t$}$Ci_muDL4y`e|DtN*4lM&b#>4gWetRngDw2>KVt@XKh@v|qG`?p ze@SZ-&#O4iV6tWi5SxwUHZ+O+s*7zIy{mTRUj|E?KCL;XhhMh*$A?|-MA!9?A2)rT zRJpJBEf}SiVz*xXIH-jWGni{88RmRf0OK*veM@ug*IEap&cRO7!ETOaObm=av3P}z z#at~;3vCiokY}r0y?|tYAa$6gc17y3ho=vmqeHFsH;-(hlQ3%5veeYwRzBS_C^GkO zxaJG)yo(>im`VjIXFnJDWb3%h4h@r0>F21lcxwrjb%XG+6pjwB>m%I&>x*0Z-Vw-) zRmv^|i!m0_*Ka+-gCH{gAsCH=O6R6luV8lC!WDs@PhuQG=K|mm5M(QxpIkY*Q;Qc! z>$<*a@dzVbhwz+q$p~Ob=*bo$9ZU88GNn2 zO&(sIp)>rt?;6(%OjHv3Y1=V=cpmfY+M(G;$kT6naCU>m+|u=D_Nm zQF{j(ke|i_R=R31ICsd)i!Dj=F zG>fDp3tG$AWk4!c+VW;f4@tS5H>~+##J7bt!>VGgi zc^X)pU^v@6brX{0veh%Gig=J`yGh!Dr52*Md-|oQjCeCf|Lj#js`tsnkkC0L)n$8n z?#MCNQ%#>**T;oA9xg4(YyYhs)c&`L+Y zz$V-u#9rESNze0^lV>E>7zj! zvgdyOrEwi(qs1PdIq@wk57d=i*hj=VZq@%@&s1w|kG0L-hTSXn0bLjd6cl*vPmXLE zdpMqwdgre&p?15|)4R6eK?WQm(;zZ82(U&wc8U(tS!x^FhljZwk|xBC$?0ygCB|Jq zn%@Pfdl?iE3SoB-Y&*sH-%-an;J7@WOB&@In;B!U+&g=Xi*ehZ7?Z#=(;au0xR9jE zSba7{fi5a=-=AaZ1SWay4>T?52Ze&UiOG0p<_tntv@8~8tm*eRXF{0v& zkgJt7-SDD_tFhYg8$Z0^{QG*YOL8b+VPMPs{cU(+q zmIZTy@A>7QBV=v$EW3E0gT^1bwKE>aTuzRi$Nli73%y}nFa1%(e*G(|b5Wl8#P5wK zG1Y|g&YBg^r{DVWS_f{Dze&4n`FX$~t-x{qkN4t`N4W;0H8WPl)ws>NW@+$))Vto7 zqxwmCj+B?L*=}hO*TZ#lRs|13$M^b+0yJN zFShu4eu@5fOWjjPFgGIsi6nDRPOuS8kYu(f3*m4VQxi{|b|4O+1PHTp^fI_03NYKgpz9Z8L}}$ctge#R&+9WEIqUWHYrn5~U+pz%pi z%ByE&;}Bo$+lOAS(8T|{|LGiA;6XP;eRsxvOOS%q7#-2lDUO?6JrYD}oY^{&WgeGYW!MzoD;oLOySxG|>F?WiiS&}S{no7vN=F@x z4j=kID1!^9+17<$C8)={`5uK?u;o?~DDz3u-E=P>S(pu@HILoJ6bJ6N)H2F_NiONY;a}qt>@1y#Sx9!I$l);pIuj?B%Pdr&aE2^{qn3AnVoV z|7btQ1{>3RW0Ha_G~fPHevK@#L7yw=COYsbSzeINMJ? z*t85wO?TYr9z72$PX>`YsFvB40f+sq>yAm$Aadi_ZEP|AY`BGCotkR7@a`kqF4RNT z{c*-5tvu+QOghG9M&1s;YCS*`P=}+vTtrD#$Q6qV&iJ~}YNdBpjR`bas;QwuqN1(% zOJc|3Z?YhQ)f4x4yw>>3j|?MEoBgQ?2_nBN@OD#R5R&YDI`pxB&l;}F9GH+H2$2@s zD-viV!BslZ&o=OIQ!Vw)Ug45Mjdpn|@BCt)3+mh+%-c!Y`?hlr9_gdKwRY)OlJCAt zA|Kmhz$@>6Y&&p9>$64|0MS+X&Iha`WL_Se-`%!qjCDU5ZzgGnX9obdn>zTiJSYC} zu-F1&xYGDx`UV&6aV?g+7JggmE@z4K5y(5zyEoIskYV)wI^O6$76@t0TcFJiR#5fVU#EM7y06o4R>MuF(Ct84)xz8h*aP17e~Bjd(Pk zAuh=NU~y3j_4hX6FS2gELQ#M%mfRsC%0<4yx^@flxLTfOT)W~l`4LHAg7N}wkQR@u zu?XM>g{O}Susfzx_bhN&)16hGHYyxvurE5d4-AG$7w5JOo$W7IXI22Xg-=r-tA0&Zlde^g}Umfz~PVn ztrC4LkQuqy%KCo(sc*+Xe|KS8V3+kc&r2WZNGMC!c&90$w&@x1-OEuWBEbGidf{2| zZ;yj?4=!x|(Ki#n{n)mtI;D5D(#=yJ=AcYXeagPShukNT#M%ZsJwN@kSMK0pe84?N zRsQWh79ay4qXM;OHAYq#s_89tWKdK=4D1Sks{H#S?{nq`z}e|y^w)p&?wgtH&knC! zr9I4q-(5SVKPf}(PECnGkhAgM|EEoA<8CNk*>NcN%R@h{BY;;zl-Y9K2cq2YhTim% z2na~>H$J_B=YRXa?`}tKfy3z18a__!>E3M)^)Ntz$#`pReb3y-CFo18@X8bKTgjEfPs&om83Q1A`zF3zBRlv!u-vC9m(rADuisn2}=t4qfv7(`4wu;6L{_0K1plm%3VKRhYym7efh^{Zj2fr*mKlEZT!7vfCx z>?1QH%{YDC)Wb{B(CgP@3R`#c^F6gk-s5}^_3jzO-A*z7=H-w?8@RnVzvrBJFB4^I z?2&Ol%Wc4TgOwY4U9%YKmQX`pQ%of`|;8lU2-)WZIkFGo-85EfVG zW|3e1P>$0+zJfR!az6j(k3HNo8DosN>zI^-x4Hv)rWVE9$hrH*2-h2Gdk6K*04ScH z6~PGku}*sW@aRO`4Rw$x(FV!p`z9r(aBC%twqp?zgEqPZI7cP>09Qsx+W?*Y`N5eZ zhY(+|Z1cceGv;r$r65$Or<&R`!qqan;nTK2!MUk!XY37?jk7*~cInvO4|zi!nBKQ= zHaS?|vx+GoSc&JB&!F~z^;yOh+|T87VU(_o3v&m^F72b!0(IF$hRWVmXKRk3bnrpw z?22!_3rd5v1)EB!o7Ew?Z(3?(b~shvu>}bVbJJHF`{k7c0XNnzTtWj)w#FxfrbxR> zo?!-_Bi_-mSEL7&-S0N1N%| z#(();p3~vlwxNf+a^lq=ed~(-rLL9*P)vEcJIDZA_P4LY0n9~-A@rL3_Lr9RTRk~r zcGEKFFHfSZK=uh=R7YyjM(G#eTk5-iyrBVLdOS_Of~$Op*OQ*OS`(paaZm1HPQn>A6+qtD~>kYq#Zg%`U7S^x3PfW%Z1OM zS7Aw+UMk_4XXRfjkVmUReK>5V`(?wL4pe)6Wa7~K-WRd3JL7<&%1FJnX~wy}YVq}d zzFjeJfgDh17lB`Voo0UngeRn-kB95}csDA>hyQxB0`@@w1bn@iZ-2@S{;pj>e}_lNO4okjUpd^6>lu&13ZJBc6vVz%b>RB({-I9$EZLfA@kTZIUT83 zW~wpKXeF^{34rzkZ;j7g_+`giN!SW_N-F$dX%*m0z?@F?F-^lFVS;Ij+9%QHYH@;R z85(Rz?;bx!gu5RMbui3hQ`}@!jy^sGtC;LxGxo>bPJQf@I0iUqGCvu*q&!eda*ix| znrg~tUSP8`owmArMfM>cC!`?`7$0db8XMoX^RweMJns^L3?-dE{xYmE*X4AzuYn^7 z?iU=MG2uy-uX_8^GrKGXyf4=BFD}tI!V6UCS9vZ9?g7}_+mP8eyso+x_y6{<#mjtHx6hGs0Eo|uz-=w-58^U8V@Fp@TzzO4` zUK#AAC?UqXq>zX0R)bvsg25vpQIq zmpKwrF&RK9hejEaHDoidGrOr`a%hd%8fJ;tt*{F@iqr@Q|mx$18#rw zgy=>~w%FTCzp{p^cpGQ-_*ie#vm+ofAvMqr>>79fX=#9kmVtX{C|pNzs%-%SZBMm! z5LukLp5}gv;6Os_t8bZ;UMnRVBDEtvAp!x`1cuV8!YFU=n6f7iQ@yO9sJPT{2le5J zwyBPk`1yS+kxFd(_2nLH^x$uQe-Mpu z_DwEG_S8{ag5BK>`6I1EYX^Hv^}jspX7E<~Uj9-?J=Zy7k!UAQp&?Fy6M%bqWxAJ% zMPS)?)sZkQLsV*BfO>^`Y>jq0CAIc2)dnY|x39;fIsooq!;nOS(n!gRCvH)AsABs9 zo>>-Wai+41&55>_i!Yqxlid^ymKq*}yk424D4l#@lBsba7>hL)%u!F>V?#~3)NNQ) zA_l-??L&OA`s*atowGY=V|b7WbhT5E`e=9VXvpr|oCFpYWFlBqz>~8A^tOe!*vu3s zg+PT!O2YxRIC8rX)YZ}$OAqa5y-OTn0-bG+XGYcyeeq7m)P-GGh_60(^~f$F7OC3Y zxO5B0-mT8@^_(597n>Vrjtv3qzK;15Q;2GHbW&uF_0$z_DD1-GeM~Pdq0uFoh#Q&O zF(eXk!&^HrbF~oned^f&TIdQU`xX@@27<0PO)L=7O>T2%fiB1Z??^YP-gb%&yqoVLt1&TXHG54v?wiN{*Ze&wp)eA}BuiYR{X8dnztaf4D`JlfA)%MinCe&^skm( zTMs>IQ@aFRkZiU(v|^S}5_(G|$xwO8W=oBOa?d!Vw5x`w9T==leAgmH=foM(hS@f` z6@f|`%QWZT9;2l5o6yue1i!O`XCH}^xBTPPnz`HE)E_TtutWlw-bK<*co46GT(v2#NH4&_9$N%-O3Hss#yNs$-@cNw4IyMSSt*xVj zT+KI|o_EQd(RxeuO&n-sxY_3Hx;To>^WxMBbW#|8mFJ`EL~g$_{8IGR_7&l5qLAs z$c)lABL>W0L^7gJUt^AJuKecrWWB%;gXOkLf%1MRG^39Q+_F-@b2V*pd~wL$r~ha?_Vm@B z{Np_zlNWi`_H*ZLOp))wV29Ydve25@HEWXfBtbpZx#?B?#7ELMcote7e=}A~GEFP? z*sS}&foH|u4Lxr=4N6CH>uXk=vXk^jfBmqH%L+K|Z)UsXW?3wJ>b^|;t`xd9xs7}D zb)al~`Y!3)QcG$pNhdT8JoD?X6#JBjtL~rb551ERqRut}wxZCQ)-tW1{xJGttZU1? zAjf*Sc?_6Tod8@MKL~#MP2e$^X_@~`>dlbGYH>*r@{2c2>tMK`{@I8@axqrY)4d;X zuh3C6$9FAx7$|9eN3~5&g|Y`{b>oUdl~Y6eq2K*AR<%UaB|JzqSm>rh;#2Kejg4HV zxPZ&inqgpA7WQDIa}%DO>$Kk1DTPOQ?sdN#0R(Fh+m_E9=d?5%{xs93?B6SG)`=3& zvMPTCd0rh+mY_9WGp-$$GY< zEB2PO*KyqPb773;0cB`$n7pfo;#gAcyWQC;Lg&Zcj5X1n?>!9`H@u^}7G;AMTFIu# z`ED!Ef1I>POEwsP+kF*X8Y=ItU9vB(^c3_>X(v2N2hFuEK(g-p2%A1_xTF)b27mm0 z%^?meX?`(nky(!BHP)`9tE)W)!&FG#S8?Y(HS^ZRRTx2g-zmN{N;TZXaDVc*=!4F# zmNJ`uP%VnyU6;n>5j|qK5f90f|WggbSeW0wkx08_IyiH3}))avLAAKOQtFJqHoBfB1B0AN<1`q;h&1z?|e6@jVD;sKh+Do z@{&zxeN>a=iqOm1i33c2vLWe1_c1mZz1#6=$ucR!kvl{N#N1EPnQdDzh)#D|Z){kH z1tBCYziB$3?YrOKwuLAvL2OSh>Lx$QF0c#(KCe z841SoO;fv{~Xi`jR7w=_A2~~;ta~_KeS-*Hm;@r#6HRiyBAoZsts(E%QWkuBnqrXg!y|Xz(Cl4ss)y#q zY`Wzadr4>L21(VapoIapO>(;3>gUgEmI1E9n*aE;?dS_;_l}-NeEGmbx}XVO6%p#i z=>v3brp4^@=VToZXE|wr14}8y?2nDe1FNe2uX%^AdH3-0o)09Q;279O?}!|g;Bz|O zz6{IzGEr}pdX7p8ycn+OKk>rbt~WKVSw#c_7keqj$yG@PYfDPsf;7l-Q@hY19CO_J ze(cHvqbYXUCAiA_xMRB5G521miaa5(CB$lG?$|jd##K5wx{b&$!5+@Dz$w*6tTZO3>NBt7e{ckmuF%oD7+sV8t0CouHEfZ-^~KrHiX_qNa7r zCJc8yH?ZMU`c0~-h!2Xc%C#5Hajnyfu!7oW!`CP;6{%%P<(q^)8Xee1mlZg!_meLD z(tPCoO>`?ljQ&jBfZRJh;B2Uc<55|O{pv5Vss);E#$T&kxg>#WPPQHWLp|Rs zFJ5P+bqSo1jTH6uNW3zmfD<)?N_2?X{BQp~c;_FWJ>N>yjVp-&(B@7;zxm2W522gKF5?z%d~R*#c1=KHqJxQ{cD}rCB#wO)55Tf zjWK5pQ4Jz9aq{6dhIw?9*=o;>+Aj%nIy-sbQ}qBVo99?%Ri~OTi2~agKV|Rl4I&3$ zD^BAlig`p3aK3lhJhd_!xJ=sf$c)ur>YBatjdPO@wK1*Y;w<64U2P<5SM^)k21|Uq%HH{a7#|_(4lu;tO1iKbjYlX zHsEvhVjpH%Zq4${!wGQdKnvZ-4=L+?+o$k|bUzquTriA^HKVtWo#B%FloO34fF|-U zwTxW^781ku-t|mxLE`uV{;JluJ zqu}ZXn7zrFb6lJw>-}$&`XS*ER{!)V3J+atXy$tq7kM7ig!VZl2u^L?CbFd5TQ)-l z1jSg=>sojHs_vtcuA^ zHp_dzuZ3-!kO-yKwn+W*{f~xw#HjL0oOEnXFZ+x=`Yj%#ydQ10#Z>Hzwrx#?) zv?8A)BKaz^BI0bgjpbBuKjd_BSY+p8Nc!c+F}=uCYR!S8cP3y?2{m6SZ;hy@57{RZ5}1Vz8C%l$+~#z`G6m z`mecWv|)~IM!JoFvg<(5FkY=SGX^mPi_JNSV^Rk0j5x$|%F4FenpidP4|S0AH!m85 zhJ(mWV@l5uw@dn*7#0&{wA4-l1SR5bSriE@Chq@da^ec3A^ZF@cuKmHaFl$FjY6Kz z_Rh#1F-Fw7Cca}RRs%0>T*3Vvj~QHWTz-V<&W6+&=Vu|I2rOgL{q#gkp0-zjrI5T1 ziB9%9oA2pc)3!I_P0U|oV|?_uX%S&N*Cd@5Cs$&gqfT z4CP~Ydu*{-ZT!)jsbH?tDxX0m~d{(D(!JO z=4^G#G&&Kw+BSIXl^A8d($co73q2qI(6#TCp6nu{G1Xo^hMdWD%hWF`u;*)>TTh(c za__u;;+IuHw;P)`NFT$MUZOgzqR?}HYGn07?`XE4q8C+`gE*!w9~he*l6q-6foV~e z+Zx2w%;IcmlxY%El;W(|5Zt(UJ6uWRR-s8D<~wwT==5TTN@Cq2g3(5M9PXh?DPCR@ zXv2Lxjpf_>=T}GU86xw<%*o9jY-DO>Yo({UF>`dWx3+agxY_9JEDTR>s`Np(mp3{f zEu~DdExXb)GPZO@qo5a@d5Y*-SIL>0JF@k0yP}Vf_H6x;Y9>=J{^?g?cT9@RH9j0H z6@!9O!yw{?CAoXJ+Yv?VT2LK%L+%(BS$cvN-q-T%f?Nf)|9HLXkQ`;Sx}XZHuEJ=_ z9T_$^&3Z?mg~i*8JKnVLpdK0n(e(TxY__Mm=I(rA?Kxc|3J0YAYG-Xb*Dl;oHQmQ| zj*W1*5N?U}&|&`e7RZ#f^d>GpW zUaSr;X@!=gTCh5rmq5M&=CUK(vGCYUowdE-u|;v!Pk+p>b54ww85RsGG2@VcjM^ z1-_%HWXtAyNQ61j8N^x?pa`D znlr0y^4c%KTQ$`-qf5wk<&Lv$va8b|>r-sYv|LAK*PKpplDEdIkKIOOBg8XXj`?5Z z*$IdgP5$T1Y3)034R)9JJ^#S8^nq@4jVS~3)0}qa=)j1AASH3`CMYM~f-^92jE-{= z49w{f9%MU+rkCzQl3mwZhfc5wzE>0Po45{srqqT}KUlV610?QQ4SMk9m`FUD^%Ar_1euPAoe$p%ZkOsk}l@ayUB zb+>{P-O<+r>d^eiyQx-+bxyYBa_5qH=9g(YV{iMf0|Kx5f2-d|CHm}t{?Gceh-??( z7!{oJm;26~E;6|As~~Al$F5gqlJU&jCPmbP2*ps(o_AT92fw4|IH_#7MWvHkhyUSMQ`3Hfc~E-EctYrdc5RD92Ut+qkn8W(UqUN?4&CqOlc|7pa- zQgFmcYIZiY4S~_;oIVq5p9xX5jpEa67|p|g@VmtkcDz;xRxEFl@X^y+t#X=KpVSlyg?T1BvYv~vTg zF($ih{3bX9C+pGB*@R^Cg-^X|!sA?vwb3<)(uX)v&!952Bmp?_zU$O4&SLJxTRyfd z54PGhrJMdJ{&Ku;7pLj%%&U(=R0^8^@%LGa#1tsKrSCHFPx*%AUJ?3U6^7f~!1c@y zJ!yM3W*DCh-)w2*V#@O@D6R9RiAA`bjt}!@(fF&LA3q-WW(6q*KFvUK9t6nAE0#rn ze_+q*r$90)yhSYye9vr+vw7RD2+j*Q9_SEx<))gFKeQ_XvwcK$&&d`9f+^|cM*$`` z`ev$=>csee_8?OOkueP$U})K)VG&8hI@_0O4Q zeUtsaDh;>lza=QANt%p1{$}9WN1XnRYs&nxxVC(WEkeErCMYnp!GC{j zUO%oV_;l!PvnFk~VK%fMV6vmN=9{~vn4B2xRfa+4-@f)!%uZ~(CIp@K)h)vk)9kr@ z9W2NEGNfdF2U$?=eK^uGXAqMLTl&zp=YTb#z5BWCEHuyWh(tHf_%g>@ND)}2VL(#T&`DsH-|_gA3SW|H$?Bgx^-D!=)qUdFgka8le||P=waqx+F}gn zHBJ+bcan_sQ1s%8f)vAphuDm8AZ2J)fxtWQnwmtI5>1B46oL~g6F~H(JHmHgxNo+6 zCaZ0XR^C3FHi?ciTdZwZvrkR7m8@NdJ$a(Rb{gpxu@Q#UJ_a~03nA?5-w*ocsn5aO zIyCc(R0BFu;+h!?7w>T0P72>H|A(jkXN)aqdb!Wx^y~>THV82G$GcT4Ul@OQ;?OfK)k!olcO8-&a6UcA zwZw;-(d+8jun;GHTRqdE@M)$wm!ZU_`O8N-Sa#XvfxC^*$L=uBdjl=2c7;z9Zl?Q$ zo~2plYvUVsd5_{RI)3jw@${7UzaP4bDvMVSeI!|yf0v}QA%G-3NY){?EL!B=!w5UN z_b~Y>;FUoJH1Bc5If-=Ummhc6_j9cn5pB2p{C@_o5O8_l+kSQI{kYqC;#t^}he&Sk zlsd93=6a%yZXOwBve-O+7xysLkUk-F%`HW5kCJY}iz79ztNR!cY(cMU;<+RQU60oE zT?XfcUe3>{LP`?!CSHEna!m-iA`XaxU+PmdE&$?5wEjKIq`_`JRx>YE8r2h3u5mo2w}zVdf&6> zo}BC?<0ug6N%pdp4c)NHN}p2(M-4OE9;$8Sm`9}J)SE((mnTTH%u;z}m4)8X$$YhX zv;Sk`;w?G`d$l~j4{t zamCv;LZNh5x;m*BmZtmD9mESvEarN3aR(L=>#2RBjn2sOJS2^8n)!O`ug!?i=igjG5>F%~kRB@v5!n?P0+i0|` zr-Sbhj=P?$spt7W%z>=4Eerns7`-EYNJH?RPFA4tchXg&o$T;aqHfXAq1ux9EUu|e+Sp+%@ zn`>Cur+*H+pswi?s#A5RnrIHi6`q?7^=oEWE9R^J>ekJ;k3SAW;=mT!55OnAfg8)_Zd^`>u(p$fG6tsdJ#adW(I5%Da~UJv|0_;oUD8 zGki1O5c}PU0qQx#NIdYdOAPfz>5168AZI5n?gC54KP}Equ8|OVc$)6B1o|NbxqhbC z0H_CCM?l-q@kt7|(9}6Hee+9tcQ?z(H^lLLowX0L1nn#?9>J5+(5f|>SjXD@gh|`8 zOU#R~JUdiF;WjrrJNo#_2jMy!^le>Rh+>(}OcWh2j6>zDRu8|9YJIHsx`b1*~PwM5y;rU#fN5vf?^JW*icX(uNSvrNMX z?y{+=9czF1(MTil);G%ScyZ+#m*}TnoDjI=l?Gj{aSbA}gKn0lBu&+NVc7`g~8GDeR_yD6_(Y2Gmmw|L$YU~r^XDDLt>A?&nGXpaRP#j8+OXI0c zv_&%`^M^Jek#2X#*Oo38@|C$&rAurY-Uejm<_*{0Sr=W~1w>%YfgqTJ;m&OT5bZ$E z!thjbaCvjWnd}>0J~Xhl)VaDdGQHcOkro6%7eAZ>#M%vEeY?9QIJdxs`ZF6x;hZ9udMLT^$l;8DxmhY{6M-b zI?{9YaDtdySsDSZRcG=`u%{o=QeRi=@@Q{Qx~l*=dpQ|v0q<0DshGRDrwhkA0*<7+ zqRovBHdAox;^S_3etayG?j1-a$41_D-*{@z$1RSvsNjzkNW!I2hlY9PbN6T0S|IIU#U}T0|q0Muu0kaq%%IOP!Y{%UDVOo5_xjtaE<&U=GfXXidxBDhF z%omRJ{J(}RAN;Kx&RaOdmS*Y>*JIkdIjnV8k`O-hS}^2Vml5U5Kk5rqwyC3HwEx&YGbh=7cer`Q)J;9zBk|78&kj(MS{Dqw^yk~x5Lv}}p*J&)Q+j^3 ztZu4pdPz}?-eSwRmOq@=H3La2D@`_AZXLMv@ep^703x#U;*A&Unh%i3o$mh2(44|_ z2aWQ19~+_`?>P*}Da>@|cQtYmnq?l%>xi`cEcEVR%Z6K|>6~V@2O%pRcQo0v=@e>4 z>1Dzqk`mF1*#VAq5M*VLZW<6B>2ZX6Ow)Ycb5ibKf~~%I=}*2+RJ8s<_NoY6d);&$|M1Ji)3%o+mjXZ5 z+eT$X#r^1`)|W)b9MsC&7F9&~y~v~1H}h@~Uw!GP(@AQq!-S_{HO> zgZB3;xH2^3ZO2_))x(Ir<`;_|<$f!#8!sZttKt-Ge@r`-1hHSdI|{3)ia%}srQfP3 zeCx$?k#F(+_|ul3dtv2C(wgUjfXc_2z~0}x%qt3&jW0KR?|)MUnS9lzUsj>p@oX7g z@pYxc?3=oa%yNUSU#1*#tBdW(uRkbK?^}=jJ`BxyRPMp3dA}1^Ej=a=p`rlAZF$fX7UKjhZ)jd6SjO9yo49-T!j3v$l3ee_ifccg#XR^jM{nYNpIJ$Uyz$e1)ED1W z*v!{<=@yp)JKwGQmVZ&|NU3YRNY1%!{*4UJEz7Yby?7^%$ON?fIAk85o9#w<|9(3n z2h{z1&L#h0g%_*2=`ik|-Nb96UDo|#SNg}-Y@cGM$)9UgQ6;6m8p+*^OL+wM{ima_ z$}iHirt2nQ#aYUR=S;7>vIJn?FE6))Q|}u8v(J=Jm;sxA^L!()#CGagHz=X9%zLZx zk6G6O%<{9Elkl?22u0uPQD|xMe(ft^Kv{K~9`RGZQDLcm|HlpQ@<#=*#ZOI&_#9Br zOA4awt4g$>f8abW2h{#!pFw0wv=zOz_dM|)oYBp6PRoh2qI`HmvA}7{cozEpw_nDp zX;UJ5@5`3|tUK|FOTel(S%8>IKW<~k9?Z=FNbhXh@VZw3+1xOXP7Z}`*8lu@&npnHPq2W{rD+FO>SqnmOi}~ za=X|zB(pHw7+Z5H`~Is$Q)Xw!hJoqM91B+Xtw!>>So>i~*XD}DgXTXi4^|KV{LkTA zSCd_VNpg9*$4TGMKTbmkc#uptFy7Zp-2LkPDzYNi`rz0arxeUzm~9+H3^ z9bq>Tz5dIKdh1wdr8RCXU)rriE_qt_FE&#$) zEGS(}FfQ1~>X=R0vvk~Rc}YP%`uo!eP0Q~&x;HGUitw~5+Iar`9~0oD2*5H!*AwGz zA!ktq5MS78^MpzE*N+p7R=fJ8Hr7%SRUaQ82-{y6Ux5%J&e~osSw&|h!w;rAS3q_r z6NB=|%0j#Wt*b+b$wIDoEm}lnY7lGo#Il|{h&I6YyLUexLali*=UhxsO-`!3!lHb2 zSejo^Fm~6xbzVgVMn2X$Zw#eDD+Wh<3a3`uW~HsYu@vHGTj9en-FYBkb{Cj z5<~1|J)hT6xdoBN%gvwJ4&ji=U+R=$MfrZR)}LB$A|tgZv!`xBp@HTS21nQ3c>Y7L zZvMAbA&Q<4qedAC*MrU5*wQD(4(qLr0vB)Xb;ez2dZM2`cX`V^1}|@V#l$}ND$97{ z)dxvf1y(djF$_qEciz#gyD|4QV~sGaV^gA>_Q_+LwsU}<-9}{xN zplhRoBLmHkHl$#u>&a#Y=1)HqInv*~reh!Fs9XP-HNoek+w=Md4xHUp49c~4c!0|# zWt^gobKB`^6#5qAhulnj>QO~!+O9N@-(uqvJQNEPJ5Jsv+y$Xaaw;COIX0tGnhLzet?XLLf_J- z*UTb(j)xk^MiE&__T2s+iF=^=4pU^}jSsLrq|;8}9+wNF3{yf;2IfR#Ojw|`WRa@$ zj7#vjp$yaXu}~?Uwr?Gh5CPp=Tsnp7t+}JB9 z5_d}{iOnFQG4hU{S7cIz!BW@cuGa3tnnKSG6A}X9lBg$UXXJ%_pam*25qY?a``lO1VN38Q6OS#YdX+=ji)qo6~F{)CnDxf>EteHg`A^3reU1+$TEF zK(xXUZHx~IjO<)cAwgit3TOXVBlk0Ma72V8`08wPwzjAvt46q>por82yHf#A$R?7N z?t#93(TNycne^y@JufnIb9M2F54XM$ZL#LZnL4iSPKcmTms<&oPV6ThTe&zmq5K_H zJO+b7S-G%rwX;S9;!O4!i%ScOQVS1+Gs4%;`fOvFu|io>n%mgA2ZVV7xD+~fTXJD) zWnqWK`&r0VsBDoyq|`IAL*3nx#_YeIw6^lvoR?PzQ}t&XdJ@ZeeN3&Zpu_dlwa*er)a$7=ec#iY~03 zRFpZ9E<7|L9)2!309mLvSO*|izlazw(1l9R@RY-nLvWFCF&?_-S0JP7ZPA6fXJ|rN zgp>a5mGVF!zJwrr{QW#Ev@VXNd^USm%NmaKa52}uQJo%a@0{z~d3gI`Tp&6Z@*}xY z%gox=%GAinNJqIR7E4dHz*Z1_AOLuGeSV_6)ituPwzedYuCH%&z%Cf9tD%Co#$;^>c8)G}Egj(q4}=p~Ev8IPENmU$8JgR; zdSQ_;z%FxfjB-_#q&-2YmJ_gULJAwQ+a1Gg8Z?0`@Y6Ayh%&9!|!WyPGT~ zi@T==J9{GSjBgbC+q{jf9TnKs)5Z8?i?OmPJ=ZdG@Wdc2uY}8sE8+`%s0$KdrzcyT znO!?JcE#dQu9kpZ+UOu@OKpSl_O#VM7c zue`avR$bo$0C%@QT_aNy-OK%L>50Z-2Ku@{wNiete{^jGg_&uqPUNSmJ1v0f?DSM| zELZ88L9MNf|GyHhrMGP(2=DvFmqb}k?EpR$Xn>-pUJB&s6gj3SdT5UR;ROO1cCAR3 zOp4DXxy$WPor^TP!+Cw*%z*+lzkd7n@2T->y-At3ZTZ$BsRU!8J2$hGVd$Ew@n*A* zbh0w8s=6V_Y%QI2*uOpRDxClL%gEz7z_9g|4n-)-?snkYMXS=p-n|8!H%fXnB z#rKzeG4M1`HATR#)BY98$=|Pqi&UhDEskd&UvHziE-I(enEPQwI!mQH?{}v` zuCF&{;ZNaY67#99N6e5tpWc9elDYbIf9gnjwHE#1c~_Gplf&sylWdcb=5VxXd$ZM3 zc{tXyj0|&KW3kCn;rl+QEE8jSs+=&IOg;RvZjx9t-vRUc0N%qiAz_TbK2Wt>)E4P9 z5y;I<^`nZ|-h0+?MqSBRwwB(^bqI zw1UT3sxXkTvKUHM*m*3p2whp!jzLe*WbHH)u9U!IQ=U7A86zkl_)Cv4dp8YjUE3g& zL?K&M?S$ZU&NRRb5Y7p-vYCJy8Etlt&t-^K3HN5v!rD=SOC2X^mSssK8O9WJtxb{vIEoP_ zqcn}RppZ1x+4hHbc`PX)$tY#gB+I3eN*e=NAq=pC2q8EJ0w@DP z83Cc-0*;^`0a~PC$O)RA^MOc6QPJSsjPTN_aPa|_9*!`FLf~?mz}AB`=$y=>wSx=b zlms`}WsNKm2)G>kw&?~pheg04MzCgV--D44z)FH=H-HLH!&mS#dcemGT?czXD41yQ z(Amk)mvBr#RZEBw!n=8wAb<+&w*LkFasTBrsQK6X Wzdt|R|MmOBpI^Rydid?vkLW)q8<-~fggLJ4J)KnOMEOTPUF`+dnr*buUt@bM+U zl1@liNP*<9cF#TMraSIB zfFPZJ-n;*%n{K@00JM=9fO$x-FM%<58i*F^`Zql z#Q**ito-*{o&Er5c!=vbZVSRcX!}jO)nU7c=h)Bz&_!C^C~~#KS?NGp9jNEp|LAaS z+e2FuQE0j->ilbmnemHmhEAvV_8=r;+PhKqmF5M zEr<}PZJH|(dThf&p~o;0@-t}ZCQ71~W?%rJO+edhwGF>tHxLrDHQfVf0K{!wcS*w0 zHHRc!L$?XSH8qQ%5OZakW}p--p`$eJPow;yE)7t1D9Y6oo2EToHYo-HNHVA{=>&@# zvW9cGDXBO|nv#NYlqJguN7;((akQg|4#&8PWV5WRh!)EtieNGvq6!8R0I0J(sx~wx zh-*!i4iZ{Jr9*^Pm+3I6)g?MYX?2l~(ppuZVvJsG`moj{W2{lF6LHS0*7112tX8o& zZ&oT;GU&rp&?r@ibkHc4$V^Z#RM<>F&e!-XE9M%JEZta;;u*3wuck6sdBMsg+~OkA z5i^&T$j*qiP~f`)(p)*-N!MqEOgmnhHM_FT(k#-K*5~Hw{+KwOj}7qEOO>_(rZ6dV z_u>l|t${A*@+7sUO_`htk0hJt7BeG}(wS2CFuO1&t{%jv&pIQ0_QiATHJ#GfRBAL? zIknKUA+&hBv37*GcoG@yGtQigY-(#9pXuEkng4rj-8$mp$HZv2cJgA|=0x#mX=Ip~ zJjrb75Km5ZkMgrDB1J>lF#AtB-6Mb~Gbb6|D3wP-xvc0c%barSvd+r#u zv#)SCw|*Ob@_6|A-lg}JH*Q6aeVn?!{mKW;O&jgw=dwGJmp?K$ua=I^^={-YoZ&WR z3n!HI1Io#T-VOA*vC!7c+(+t;we|OBhj%e2jzzBPoPAf?u}L{JIdEP0#L?ijJu~lV zTi1(+X4ht6d2_4tADr*n7xTjPfx-}q?g zx!2Y`HuQ&=Qjcyw^sM#h9TQJYfAQhw_mAxRR_I5suKo5kuRI@o;-*7CR35x<^80fK z9#WqUeDHU;m4E65CJxM(Cr!C*<`T5J)uV4G- ze-V$~ar&v{d%s+IdhC`*v1bo%|4!EnFL!?X+Si}OpSbhm|0sO*a>Z{oYHy-?-z=OO0{xkjFThBh%xbNPnr!U|Bu<*?3y^mqfytD1!JAeG^ z-fwOC%?q(7Zany`_tkq&|7Y#q`=+11a_7Uf?~m<$g!u2n+n!ARH{z4+e9gNc_v8hjx2^W&@U3jg~2x?8=#kon{^}uoOV{{E*=yr(O>Nk!{9fC$as2h@=LX(7GO~|-b#~kJ z#W$>N8^_*{T-$N@LdQ1mNWEvx@+7t@^r@K4Rwu)~?3u;Eb?V#AOF2BiLH+=MPY;X4cONkxGiDqJb z^|BjDDhFT zIj#?6W-rDE@e7r%Rn-Z$k2}9OG*JD}+TC;JgT&48ch3y$G5%KByy4R$%yrqrXM6Wp z?<}p`S~}V6@5>dP1X>SxYMJYI&n@(iHr`dQT{Heca&PFJPd9JN9mHL-k}%GAR(f>UDeXz$|BuOE>uz}xqxQfywM(5%%z9q zvHED=mD9x5@TIBf0J0>pl#5eBg;*7sosSQr6U*(L+MFFnG%H}%@HDkhObrQV#r3^2 zXX)+y+4=T0@}#wj&zDp2#xmXJE$SJjQ42-uC92!LB6nt%X1GCgN?4UF%tVKbOJZMk z@p5F)o2>UH%QH+5Jy(jx@rvrQJ?&Sg}s@^z`6O z&hO9dxx4s_#ankyy@zfIUarO2Wn&dHmFr(qId1KWk6-LsTRqPVTNBFq_}R+?n@UH_ z9jWuP?cKH6K$kR44ie{=hq`l@=r!&oqbo39?+h(2rPq|k@N1&uQys(FMKv2}nv_+i zI_#;+Ku_TuIZRE}yW&fW$4o0*`gFKMp2Aks6S;xD<|%J=G`|o`n^lLvG!Abz*t9cO>u!_InXB4_ z%SJS1)s~S|n>#~jb}Xwx!+jw}bG;*!%7UY_7qC+4Qeo=CBzCjw-%sAPJL z^K-qU-Usvj+l^yOUBk+3B@w~u3ho7LOF|h>wP;V%!jw|RI^4x-c9nR+8q6$C1_$X& zl|)v_Q9&DGBXp+R+bx~cM>>|rvED>(nTjGJMwkK~C5sh)6*^su4C*tLc)tc(+h*q* zfjC`})lk@N=BaF`u;g~c%XvG)NOgyyF-f-Kd_Ct4CO`cou_Jc))Zjkit(oDSjiYLR z+u{=2u9ck-RrUx$)+k7h~e1fiNpv!QBJohb3~MA=sYGEAzCUjDK{^sqvAZ4 zVJgK))F?V}s@#Z2v>C5IJa-{J${#!5zYBl&;>d38NN)8S;j)+ts+MbuMAFOGQd!}$ z(-)nci}xer&8~LgQ!LF^1)kPK7D7iafyhmo)eV<7n@E7I*RT}Zs2K5(U91OF)KZ>Z z#piNVC%asx5~w2JB!X+MO0$}*#R9@Ik)aApi7t0)sk7g@P+8TjU69*5~Z!bVdI@Or}x z1=X?@3(HGpCL%4^Z4q(7$%Mqb7w6@Y2X8B8Fs4?dP)c8J#?!`WjiHEZATEMAh~^TQCweStRM9XeR)`o~DYHquUS{HiTK0mxw=6Pk^jv{k!%fab zHd5oW$qm>RFSAq##kUX41ZAGU!tSQqx(Ud3_5mcVjt5%Y26wy^op-6O6l{y+l zHPi7t8WkbbCn{AgftJKT*cEhyB3-TNCAs=MG7!m4QLBSj=GjiJ*hDzmH5(?MHf9^? z)yjCedqg`^XdA|-t}uhi(s^ZINIF^UU#p#2?&(%%Ek_3=DB`+O0R(I3dQk$CRQY@;}Ervoo3s}t4 zmgKsY!}32-ps{FO0@A=sTLzt^s(B~LsS3qN6*nF?s!-;jT7arK5Nd-uuJn)f3iL=2RO&UD5DN*5g4wQ zn*j(6${zSSHxZX+q-fHuIXo`Z+;EswN=>jM4OH69HxvEL+_cvoltnhGF4n@`!A4Hz zLZ0MC_{OZ5?I&|NBu>jJ6Lu;!GS2CuMWBX?MmV)71*1sQ;n3pdzDMl1922mjSLD_XXBnc3w0@-u=h$31w#v z2Ec$dE{fD7B7_MF5rWmR2%*Uy?HLwHS&EK9no4tM%9K@#M-&m^a9u@dOqD#2F$IHS zY{}vnyQx>9itIN z$2m+E?EvRCMJz~5O)p5vO^+iD%|=iZGgXIWCyV^pnz#p!yDOyK1TnV`icY{@e<8)sZW1~(@+Aj{^- ziU$moZJJUI*<_cJjZnaFNLYHLy@-Wp{C{^ z^RkOOCg_p^I}N}wNRo~U`~+4}lp(r2BR5^1loW_0Yf2#E)K!W#A(&xw*&s+rm!gge zvP2<^2&q*FAxzMC$aK=+C3TV~)uzEP4hR{X780V>rWe3f5e-1}Y2pkB&~3emuu{bd z(yEF>Hqj<<$3i{R!htq~G~syTjfO!}7Fd+6L6{EdT-&rr5Q+)3sve0NI+(EwIaWAE z99e@`s>fj>$cRu?lrUA4r=+^g^I*FqIDZ9UV1EY9fGRR@=0RE#6(xklbx4Y$n&L9R zUXVC$s19UL4Fi_9Oayav3#U94w9QjBl657O4mcu21*Yuy+re0H8z@b|vKWnND#8(x zh=r+U1Jo5_p^(>5=pX|6N5bYH|BKnW3;TrJunQSu03a?ut!x1<6Hwcljp7dI7Mzfv zV1B0A&xK=%p|~s%ZZnhydVw}YunbK@U@6E)L#7*~fqQT^QJ$`$z){2Ya1R8AyO1uX ziB>Whv2+KJ>waF@geHj3!9Xu{jPos%rC=)S2?`lTMFoyz%?5@jpdY{nkhSF!xTP30 zi%1gY%i04G0+RzEEtWM!6H*5f09|r8%3qH*C7A5!kR}HadM@at?f9E@F~qbn$XmNO zru)fhNOcoFFI?NjQPc1s<81;T44a@F#b}X2fCB{M0DT3v!N+kCU=iHmG=#!611B8S zCUFavM4&ccTR82>Dgl05Az51jwX{ToWIY8;67}T^96)fyfYlt3i)+9H9~J9?0xAGYsYK=dR?5(i7vYz*oTK$`=)gqn)Yu%Mr`Z~YuNT8kur%^olb3>dS0 zuLNA7XcLaupaofa&i7OV=msd2ha;x1u|U6%1_}@2u6X_{Yo@R zm9qM5>yAAj$hpYje?DUg}{!06D|;ATCi!KE-)TYI{0A_J^D{y_Pl zrDJdr0%L@t5(Xq&u7~<-`eZ=^s3KttxUcgRSffM3q3@7{Z9t!I>ktI{6)iyFSwH8@< za3v!D|0pqJz>B_aDPQqhjR^ zz^jN>2)jDGHT7TT!?@4B{^M%;0J}*d+xgNHfZ_pc5FlbAEUpnivR!s literal 12460 zcmc(F=bK)|k?+az&3WF*qY0W(&JqZO2ohd`2r^!bO>h8=@$R2+?|tm`0uF%fHH#N} zZHyB(UND#pA_!%TG&7nRX*4;#IiDPF^%;r9`|SO6KkVpvbo%Ynr@Okk>Q~iOweP?k zw_w=D7xsQ`-@fY(+yZSZg5l6}4aQyL|I_vG8~#3b>zxPT5!;Pn{|o;8&EK7O-U_2O z-uO42{~teG$FUv9g&ExcY&f=!y3jkXf!^7+3zT{d2g7mKg&r7msS6tTrFUMJ_33cS z_J%t)G+f*pZvE|47`(Io^WDmD%lnS--r3%FHkx5&8F=a91m?nb=p9-ay(3`ul`evC z9SdG!Fbd6XIXHn@rU~OoujNgF!+6tzFG&KmOa~)L=rf_u8)lh?%LS`@Sl-E;_w!W~Q34Tqpn27q6lNQmX5yDxx`k6T ziCMa)+XT&!E^1l$e{HFk`;3*h)a7w31>dTgiP5M9Z@o2u6j%eJSQ@ttRWn?Q0a~EX za43dBEme0ZmL(h$S~khBqzf(0B3ZAcsLCOO+%Iwa_@P#Y11Cp<myO0Mv5VUFdOBHO8P_MN{b4FMZ&0;D;gb) zh=g7%mNh1XTGe7%XG0MI*Q&*e!G%$)QYaf-Br4!)IbSjOXjH(|Qod{os3jM3Wy=?j z@ouA#t2lvVl(TEuYz+^mBCJ)(Wa?C`DNO5yrK~0-Q+`~^E)}d$Iw{)KrNs&nYmTu- zVSY*CQ_Uet$;@SpU~}4!)fVT9c&sJPnZ@~qI-hP0lTv1OSr4@~``ya?Oo2>wBv?H^ zJJ;~HwS|cK;&jG|cccZYFf&sT+PY$tv^Y7hMY}tKPH}oNOEmYSIc0HTMhbOzNAdFH z_@dj~-|07&&R-}BtNPPyed^qlp6Kt5Vwtg#Wu|LQhbT{voUcdw`%_eLd}zjPU)K{h z=ZA*#zSZm7`09nhaW%cZKY=d~4=&KFHmwS(lc$F&@eLcAncUEcNvwOz>aae2>U1u= zep5SN8aX;E<{9+?r=Z(9|po%>|i?Ag{A)h`}9U2EOGE{V;bJhl+pyrq>Xj2yi{uie%u zl+PU>wflDUhvf6e2dk|+H^!}*lP5Cq9ot**+2coM16y}@vr8uqPp})V>J#!OKO7-9 z?p+@$9(((=z3$r0iTbIxj%jPI-;$J0z41|_fB%)O`q?+%D|FwmyUiJU_r0ao>-Kaw z7Y@BYm$>Sx9%kn72h+iAyL$MA;~!7^H*N10GpCPEa|4^Ye1)NtbKL56?LvO&sv`ogJwpHw}c1nW51}^Ok|IJaPJ*(!O(jOddNvEVb`i zA8DLBI-;$*aznH}eE5vkd)4NoboRqRwfm~giQ3?yGkWheTavX?@14^7uG!Ws4ZeR$ z?cK9AT|f2iDXkw~)lb8izTI1z8fQKj(t57gkgT2ka0D2%CRQ0de1TZKb#>Xgn{`$sr)4m(mG2^ejJ{jG+ zZ=*Q=^2<|A`)}SPjQr`v@#Np#u_HM4$3KjQuD@+(Z1RuKp9}&2nFi?2$N3ZF7zHcM&|MiJ?xLd#Zg`SJg{@{J)rmx@LHTKMt9|v!L`1a0oKl=V*-+@PN z?;QP?rw)e>e&g2U@h6`=mAvQC+tMe#|GlG$yP@aAQ%|01y7ybRgb#i9so}P-{=?0I z4<7&VXy*eDT}Qw9*uPD0c;vx7+8@93Lg~s!?%$UG)f2BdH-6);-l3%9M={lqJey->K~8~5$V{OsGWIyZmoi@j%`dir$o@4xmr=G7;DSJ?5;m$xoH z`_J$3w?B9w`SA~)n_c_Wdv_L}f9y5vz@uMiJNAPgoo)NtH};vo{mzTEYya_qbtB(@ z?33s{-#Qq4?K{7i-}vCycP~8i#Cz0j-@H5Z?qko*tiJCnd+X0X{)Y3p2M@L${lPO6 zJ@-GbNB-US{%Y-e_+Z!I4}Uz|e*f2Ra9{e)@2Y#gdGDIBAASFL;!BU-#=r9IpD%8I z^y|A8pMCsY>b6JjO1=Nj&rYxT`a{=N{{5d`v-dr6_o@>={K-iBeGl$4e*c|6G;a9E zudE$@^6}%bFa5)v%%A_yFS9!yeQ4M0)8BrZzw00GNxbteh$v zN*sFP`MK5i-g`y%S3f=`-u&g8#J8S&v9R_2zh683^Jh;7Zo7X!{>oFYDSICJV(;-E z{&YBfFRb$0$6wd4efaK`V%iK zZM^T^Z8N|4*~!2y_ufps`t)n%ZC}2-fArs;KbJW0#l7;M|Mg?*>U(Za9(m@arQU-F zw=BKz+*#jE_w2`C{mI+X_AedmJp0`5rkd`&XLs>8&m1ML|LQ^in@|5ouK%7dZ@Bo2 zUz`iw{N?@TOaJn|vh&_AHXr@jpQq9X?%BTZ`xi&p-JjoQz46(Ar z85{oX>ss&U_H|9a@SCOXn-6X+|K=yh0yjNyBmLK>Usbk!>0tZuXI{#6-FDZOnP2>R zHoot+oz)j#m<;c^X{+?-U!MZMWUCd-30XHXPi4*LC_!zdS>2KX3!_>I=i{u3Pq!Z~f}Dv*~l!iXZ*@n7--e z>x7S9IA*Lrus?M4_eUGuH(nn-{>S4==l=bXkA8L39{9VPlOI0wfw|$ptu04?`j^U@ zzXu6;`VR|TpTBS8_%C0&7`pEBn-~6iXp-H0L(lTzu`JiSB|1NnQG%V_&iI5*McP~C zGZzV8tR-1IJ;%qB31R+pG2EPv*ym2lEqxuK(&3|K&z4?s{+*NLz|KBu=(Tf!4Ob0V z@4dXxy5owD{40N{t-0Zf)aVOu+v{)K9XayvN5x(Hw-WFFdL(?+zV-FjUs+1*xTbgc zl|$vWox575{(3^~*uKes?xRV!V_mm>ZnVm#JA?VL9F=H^8t2a2sh$>U_Q;elu(iWE z@y29m^PU0y-B)J=TlNe{@4ve!uHVs9Jw8$u+IvEo^Hnk&4=NYtnM7+0yLhG)@9T|L zj-Aw7H}*&7UO&OC-Z>x)y)+oyx@Rr+!As{uJFeYmy#4Z|Z|k+|8}EOx$o22)E*u-H z^6l%>OCve(d|J7sMT6!9UdgLMfU@dKa;POu6-Gzxu65n)?4e`sx*h%gsaKEU>#tlb zj=w&{Y}nahpZ#DaxM5RM`NZj3a&2E|?&vhx+|xo_I8zC&>hR@`b|~lX>I_x}hpnzH9rpP{qrPodud06h`gDBHzRt`WZ!M>3TNjuOd;6vL-tmvqsNy6{e6Mr ze9`fXlvH!XC@(L}>yh3La^cJz(YmI^nj9$!9qoK|I*Z3sd}AR?rrLd#scAj6rrn(x zoM!qqrF;rukXqk5nz?&julL{nEtU!1P_TARq) za)F37(beT5m2BZF(=$fPns(#j>1lSu&ZhF26U*T(n*xQQ(Moi6J6l~Wn4CakHe3eO zLQxf(+kC}|3sStlPsoi-sL7sYsx*_wqaoZ-bwXt1l0?Q50cmcw9$MYU&J0cHo!fiO zu@f`QnqAH1vuBHuHT_~{birwA52>)_Xj?$bE@}Se7?z)}38@&?$d}1P3@a^H$tH08 zW*4nQciNafUlzK%g~Ek7EZrTJr!L6Jfi`l0hR=V47Q) zrO_#B^_HgU*`rJ8D>gHeN5|YXTVuuH3wGB)urzkT?%b3vog8emU$xdAK6FvovNN7L zIjXk|#MH@IGuh>@TwEa9dZXph5vgTMhcPvr<$HSg#qk{5)h zr>5xM&CT_}lZE((UNJj5Z^hF-v!dWEp;hZ#Iz{Iurp)$@t@_2mjK8ms&yUYjZJlCy zVxDMOqaGKk&IbIx^G!rd;Gh1*YJ$u6E{`!Hk>E>P5(Z7s_cI{3re|Xwny)oJtKX0`TL`x&%PS@Im4Emnh)Tvz< zuEl%Xu(>n2*t%Zu+9&w6o1=wOgG$HNHtWJ*G1$|||K} z4{qhPvdwc8VJK(}VHgDA*q9CXTf(#q75DK*Ly@p(oT_J*l}J~bDUXh6O{=>?<&pC> zUt3p1Ue1;^e>}ibMsc~Kid{V+Y4Y?%x_^5gIr84H-Lq@6aN(1YdTL`oQ<#~qf`+n~ zRA^9y%?c#MHYAM|DA$w>nkH>c)`c)@HA*ES)y!5G=9OqyJGFFf8f)usai`BL3!S}D z>B58@Xi4$KxjGXTU8$f4lVK+_o)LRjN7d02x$wIFs5CNE4s@)F)Tb9TJ`^G)$%g2M zUX$TUF6i0CI@8n^k)~#=R7-ENK0TXrn^q_F?Chc*?}`$&rHsmlVj-tgmK7rq_v2Q5 zG4F)aDXuiTD6y%Ih`h8^cH=40s+a2~%ds2@p#;Sg6JfWsw5%ukx|r!thTPS=Hn2ml z9>X{9-$oz*%OJLX&qn+7kp-r6AYPf8(*huP*|GsdxrG`=(=0AGs1O6#TNhed#PZmA zIlX2TzkKSP)v>mVnjc!An%bh~+`R6O`Ut70Gk(^n*Ij=Q#Q-E)g^WOulnc@87e0GFAVlYHs0tLP9zvm}X##94WHK@PO1$=t-Eo9<2NlcS|zS9hp9JPvr! z!sW-8@L0<4l(M?uXC0~Ph(5-sm1Hp{x=Ouf`uw=2>lWjqqzXi4f`VPjNq8U?bgPA; zM8{$xCS@}UpGX9q>{Ql`wl%Y*sd?4c+$_|WmSwQCv?9?HbL#R`p6lvOSaX9Hv95I;)Z);Dn&@s7Dzh0~2#J^? zfjDDwMIr*xfRURol1=SVCo{S1CfcHIVXlZpQUNQsBy+JC+gQxHk#y9}Ol9!q?vy=u zZh>rH-Q>&;%~9=rE%^NKESBtSW%HAZh8Tmxs+1&`;spjbWl6Cq!6(?&qU>@=u8R

69jWkEe+We9pZcf1Bi?T13;I-UxgN;N*r<`jL zzEFT_6siUljtOe9SapKngO)QnJ=hWli@&V-o8pX=%K=J7Xte?%u0Q}FP0?JMqafaC z+BgXjR?IYP2#Mkp20>L5D5VGzR~rT+z^GbDVFMw-D&=Gde2GSWxz5C6f>p_uF`$Dm zDg~ML2SirOWo07Rlp->dOIo<6*Pj`=Pz|l!5Y3+*%KHb_Cu-y8vTSEh++3Q;yWvET zQfoCG0;3RcgcFl>QV=){JPDWgiL_p-nXJH*My+NGLEeD?9TrOZj8e9QCELQ<@&!!2pPwp@ldq>qRAuv%%@Tr}yc&CXQV_JNc%KDgx*BCx#dBjt#xS!pSq`=*Eq)+PO1}LT_JGU7Rjbaj=pN z3Fm2DRxLsd(e->Cgu>6-k_vHQm!x?Smx@J+h&Mq7>yL->^; zOx>h722(2~T}UJaW&UD;YVJ-`pfA;6M`yy#PcJr@cvFn1<+2STln4^le8pt_5L#^L zq$ptZQq}UO;&^!}(_orf0#VFW zm~0fvItt;E5aiYr$z($S{*~pN9!RHrdTu^v2AYxrNNULmB_mWlo6-EK2nb}>3OC2d z;^cw>kw~^OGuMEqre7}?>IUT#A;zqukT3&UY)G>0Mb<5cqA{(eV4Pndm2w?o%sgeP zCKyFsHA#Pv(~HYRH`bCMs}Ln+W67WiJaie6cOg6uL3tY}q~z)3L(K7F}R(O8gFLM=dCIM~t}kf$%?=+^FpwSa)U zJ7H#KG8SxsR!g~(!3JXyPRq|Ms*!Gx$f?N^pKkUk*}UP41$0nRz-O+WEva-cNGg&A zOa?>bh!H=SrIG}4DdMK4D29X6EQ3Ruz$HLEZ42iGQms@$#bcr+)fAh6)P@T}LgBnRqj=?+SY=(KMbeOU8ypRUptPgPssZU59MTfmDzb%v-aO>Hu%q9{62ca`fIj|_> z7l9u|8TW@p%+L(TU4gjKKo=q9^9m^je1xuAI0n$J;(>US1SzlJp`;&I>yky&E|^M; z;b_v*6c9Iu^}`qSOh%$&aPqaPOa%qKT&&}Xwggs~o&`++<69|f6b}rm)*U}s9Id!i z(7ABb2WYH8)=gIpA`p)dmHCAl+tlLI^98VhVJkbc?4O>QMCb==0wQN&&$CB5hRjg*qsBl(QNQz%kA!EETb2cPD7y_@WhUiIFlKcQ{Pd z78lAyq7$9lLQbUuLC%(Cn~#LZ>fCgZO!s#9rG=Ti<&XJsrLIFhiZd#p(?TR7U`k!F z2$}>L&|EPbptVxAZ2O}@TB|i&!Os}wLW2kO^qLq68B0UADZl`fgp+g!>>FgwB+y5OgQwz(kq9F#FILG&B1FpN zx=r(dl(J&eg1{0+17s7R8yqt*RX#>9<`pIw7VS#Kv@RDfaTO+Gftv2O%-S6E6)Mr>)3TWc6%27U_{uoIFZd)33prce zggmfCu!2CSW$+t-t#YM-2O_*t%2hFl9m4Mls0I%>uS%Lj!#M%fa21FJk*kIIV*$4W z8O}g7h*t|}>pm9vrf3c$2#gJ=ZHv*cr(hgNgHo)3gA*X6Qq=_W3^xN6(&{c`)@dL| zfy^*um2Jo=gJVD%jfPG@W)}lsuxJ>q*Bd4!0&l>%0V_`$AZvg$j1A@#W5Axm7aGP0 zyeC^2vM@@yq!9i{!1Hn_UjUr%Is~zToLQ^XZ7$>|3|Z2N6=ryzvZjF6K=#`8vgXhL zdxVt3&p0YL6<}T{I9n5WOqN_%UGOX@6GRzf1=dw16+;}5s&xyNry$3z*^u!EOAih> zWcNXd8j{7pH-;o3w+r)}VUT_>2Q+x>;EU)iLBeICak?m(#3nn4Kyh_VXR2slVK32cVr=Y8OAl);IK zi8>Nw@OkwDoFlpdfolOU7>4K~_~)$1lkf%91+b)Tm{8_GxM(Y&dzPwz;Q;4HS74Jg zR0BXE0nNjfkPi@y`rT@_1ex(LB^3bJVi8IL=Ms|_{lm3Ck7WK5)@g3 z+ZqP71b}D|o?*cy(V)3ov=K-V%=3S|)fua&941s$B;5I5$A>go0tpUr!Z3)z( z3V{+4=?B~|MX=yyfE937)G9120>zC6dQz@hmra6R5g8q7E*QH3w@0iq&ToWPzPHFq=%cgwsPh+x`}}$FkJ?m87Kll zqKSd?0+A8|kN}EIpz;N3g+KvJhvqrlQ#hooa5ZH`#%ff-6$uEKCV{I$V+ODT{C`X? zS3Q#i#;|UXo?qBdEQ<5gT}BuSsw*3$AktvX&=fvWN3|f}%7E^ACyOkW;gy}hQ0M^% z77z!73QQ)F5h%d{GiJcm7^K>Sk{ptOOV^56QxNHb5)-ss9cK4)5Ezkd*2g*ul%s$& zS~4gwSVM#YaDWK6WSEhGd$bA~3NVBzRk%(D1C&w%;}s0TwY+A6btRQb&7l2$2BrWj z=GF252f;9tgab7~sDKDVN(NNf=;0M00i!{RL1a)JlSeUfl7+eBneGC~ks~ zFbyw1^`IVezZ3a1r!*< z!6xC2XAQj_5P-X0u^dneAP3unh!hAdAT|O<#4%K~hi-20MD>Fp-AMFN^&Rwr_`q!y z6&hj~Y!u233HTQMgwZYzbO$us0ysh?Y>4@YQ$PpeimK>{GPsa?Hq}#Icm=i{ z9AF*%WyXPRL8?uJ=mDw_gXkS32q^DaQb>rDfFmK}B1Co&hv6jAWf0X9BB?}`lc2L` zd%!zS8!%7{fP9c(jsbjx;yTb=AQ-lV{$S6b{K$8Q<41A`_ht%ADzf$HH^fSSEC#OC zusO6z^bxQP4#)sWArK6ysOS!&X>|xY`a=*-1NRAB2v3vpc9EZ0jPd*UFBkS);w#RLVU7@nW6(sX;0ZI)S zKzDtZY_z=o=j&IN=7IR{S% z2^`pC@94c%QAI3p2Q3e_0;cl-29bdF4Vy$^AkVmv=m{M5IFABA0RP|~gQ9?mhYC?Z zUGE5x(J;|g&|W+e5%nIi-j)#2Q2Prc19U+!!YiEx=|Rj!O!wG;FzfPWS3X9xeaZ*K zZr}ov_Z2*H0rdc7kO&}T1*C)L<=+UfF4g3ECUnJ4AT#I@fd~Z=_V$XV1kNJ{uW%Nq zfHf{JvT~LydqeaiPy$vVCHMAX{wc%-e!>$BKhzvIPeFU;MFK2nOIqMh2<-Az%D#mE^Wk{$LqPwMYPY)E`s{K zKJT-Y?R%1ciPM)j?#=Ek=S}n}eW-zi@jqXA??3bVG6|oKxU|~kRlT7|I97J!k#mXq zPbK~G9G90}nG06EJjrJVtPu16nBucDtStH|U6%;|8`A&lW-hPyw+nmPh_;0&`fvWc z9e;+}|7OT%yDl^6vwi{75=1y;z!JrqS5FkK+U>8ME6iIc-Dz@b&$KE{NWS`CMvzyJ2{hdvA zH;I$All9uNBU_ea$+jvbiei!2K!6|tk^s?x0WgE<_4dAJ;OvtHK@8^JJ6}2HJ@0wX z_kDQmndhHEkdbGPpLy)D6VE&azaxGGMUcH2gn5{|%fWm2diwZNC*g${8{Oafm9ISg zDBQ2?+^GMs|MlPh_v^o2{KFHvO8QJiD(j?dc$^r96lJO*6hb+&prL+GfT3Jo+$a>e zm_O*U+nZG0@-%s^yz1se(H&rwQqgd`5xQwKHu=}TzOvo_;;aAh73S<4;}4pjfBNx9 z{KZc`%v${?S`W61lOLrEt=;{D5p?>s4|6U1+N#xvPrdf#+jDI%Jlk3Lr;j&U$NV(f z>B@X|lWRWOzBNbmh8&ne$~h6Ot=zbuE*J7mPo8!!emS`ya%`kCLaschs#Np9P*2EA z@zvrsy=V7mRJwaBfwudapBj~JTwklX5l@Ums-=7~<7keMmSk2pvL(|Qi<-qE?Jbu@ z4P_c)LA7d$+06{qGdj>>@I-NOPHY+*#I~nX`4WYOI@>!-%QLqnc2`$ZgiPO^n=3Nj zruG(lWA1jMWP3uL@yg2W`$90*+(}8i$fq}XXM1-Okt{K_FR>~#O*Vz`<#mx9>#q{kR9rYK}iK)qi zw&%zRuP$tE+?(f{4|NBb8o#mh;9kks*c=PEtWvI61-p2g+Wd<%CYBXCjy$}(*^^vY zyM69@x=xvGg?i~m`m>N$hw#yxkI+JN0Q%XwHaLk=i>Do#fE5?Qx z!yTkaHb6?Er`b^|2<3drc86KIJ2?OI*KU|y9V4$CWgmRGkhPty!+wLmb!oEHG1~49 z_)8N@x{KRbs+3l*JkU``_t-9U_TBRnYr)ac!8lvHer3EsIOhr*L$EXN@f$&UtHgCHg)uj>~6r)cW>Uvkgi~~@A%=6Tr4Cv6M3Yg zw`H)m0jn&}uC8vA1BXtXY^KX|S3kZyUX1N~?sShUf8n!p7uK-;v4e;EgN$9w7Dd+0 zxWZnW3VU66esVlZ2b)_v2m8o{sp*+jG<5jHz9BrfGI?vM;^;ou=He6Sja;H=S~#b# z))0j8`h9qHb9qxnP;X0<8?9CptB|ru6s3Jmn!{`*n=gvC>2QQw2ntEBudkP7NBgdh zC}t#Q?vF1l*4p>Bg*d`2-ko1dAe!xocJy~zt6P(|*OCI;bNH1PhRwCPb8k#a;e$^+ z_xxdQbMpFUR~LBS*s(nWjb8EYg-@Prsw9@?Z@&5Ngb+Xe)bo!=3imJk{1+e13b6ydO}pC7Qk5@fw0^T_8c3E zIK-Lrzk6>YMGrmuweS4dSG%`9{HOo+!`IHuOWwZ6zxK_?+lv!tfAOPVOh}>D_C1e0 z`QpoC)aIxE^w&Q;pLF*QkM{NSbvJjkyZM=$SH`CkMtI-jFP$6?W5Vo>@rgTkS1M%R z6W{*svqRS8Pkwg!p5|-c)7IMTR?@XnYH4=6hOyE9-TQ}H$zmZ_-A=40^V7oqqtAck)JT7eFm>+BYnN_kTzkIqgJ*Y<#bRk`>h4mikT2CRm%pv6 zz0qSO7ZxW!znk02*zwV0CmugDpk4UkU;pgA38CxsH@^FgCr28@`xoB+>3etbzQLm} zfA_nOxKkHzeDTqTi-Eof7LR&48dHU}`K{FYHbtd3GDK^0$I#*C!tD69skOW$QGF*L z8r~h|mv7x(T&&{3u7QKc2E(XcTfVzqkp+dNFjurQh`LC9W4V$~r7OHj`C^SNF(0EV z>Gh4ZnH51GcO4q-ZRLvTt@Z8PMk?nzc=XW&afeadda#r#8YIEC^n+g_W@6^*g~=^E z)G~Z%IFP-2<+F=lJfJ(SNuccD5tN)?r zUVVAkRhs(f^^b4NW{l|W!%uwUrM*mX;fu4MT)VwdGW@Y!BcuHhDV<7h&EHQ{c+J(^ z(G_!w*|N?$8G^KgicaE~sZ~p&?P=`V-QDU_lS|8+>EzaW!7%aI*b}D@hKoxV-}&`# zucjSAU!eEU{=Qga6It9^y+1WQn~;3HyW<|psA4T6{SAIUvpSb8CleKsw_HvAL&N*_ zcDicGg{eztZ*H4hv?&%1ha*upuB7fwEv70K?Q%F7&Oy0Iv8tkUZ127}&dZfMpT2*4 zZcXq#^yt&iKJoms$C|Z;&wu@+*FT-DFx>|pf9j#*`x}*oiBCUx_tJb0Z9RDOi8FoH z=IYI}7Z=K=iHGCiKtn9%Fw%4LRn{;`4;PGtZC=l%=9jYtPtX-+dWR2pu)=)tgHL83 z_-I#~x3#guD^(U2?#yka(3ZAH+=uIVLCT66FQ`;}IN~t{DZ{7dzr2y7LM^+ycXxUl zX;Vntn|`pmRlr?s@y1xR(MJ;w3aKp2CRR3cb|?}HB9-luyR*aRbLiRCOjcA>y^`Fl z2uwq?y?3y?J0MBhTe(6ijd;Bd5|gTYK9xvImhJCoZHu?YP^}`Qrf2TV&7{yk|K4Lq z`=YcZq-SQAr&m&{BhayDUr(E#)iT@bg%V#<-LdXqYnWhhO3v_>Sg2`)tr@0;k}g&? zEF@RcWtKv8k_>PJ%S0KAU%R)syp*e;CepNvb9$X^QPyV(`I&n+vo+mChCB|J%M}Sb z@ce3Slh-B0sqhlwz#_JRkRGfi*>-kudNrNL4F?y9_H?*iUM07@u$>o6CeE?3-lkYM z=&B~OiKMNoM3rj|(Ayhs4~+>{o13o{TO2|*S+1_nr*gJz$C`o;+{a-x-q^S^SK{+( zQ(LFs)7#(3CsT>d=~>YkXl(86=TsfnF|#aDgvAn06Lkav7-6VI)h1a-fI(H=sT4{D z9m6Vup*uNOAjr50zLYE!3Czw>jb2m|#Y&Zo_8k}i^lF+W;>zao!WQ9j z#hP0HSESphRTCLg=f!F6)PH8eh$AB{CKl zY6yGmN=4I3nN-TsMT~XRjH_|io*qDDq_wl7!9!FN8?u2gzCa-0_IUlAJKPX!Z4Wc$ znR9Rb_^U zbC)JIYa$zJ-hcGafxV5KUMY(>t8Y%7{mpytzBj&Hwmq=}U;X~~{^;uu_j}Fq#`-NZt1@z4!XB-~429X{#X9v9^Jur_Vfj`t&1vqv+PumEZsJH=myW;?`;+uQ4s1 z9r50WPd@*xSH7}8uHX9YuU`8(fg&?)e-9iL_ur@^0I6V02)x zzoj`EipC;NVe`TKT1sYVr#BLdME#+FClHM}%CnQx^Z86gttvGsTOrXvM`!2go}g1t zB>-<6hsn9*rs8hvXp4rM`uoPt?1|#)c4BM0Eb;~08*T^?+1bl)zxDq3e4)x~7U^$p z8$5XC*%x2<{$Kp(AG~n9m5~y2vkw+Gl9}9gA+ue{Y&^KXT4Ovuma#QS+g{6WYfNXn zA%a>(O4nj-qbFZJIXuwU?nO(p6E|+$y)||F^4W9eKe;##){1p>3><#sk&_SgI7_Ry zZcN^py!i3&K6-zAW{c||8#(p#OW%I=*+=&WiW6`DXUUFAY@d3Ju{;;jdZE31$U zL*e-DzP|pR=7uO*s#LO@m2^hPZzb{>(--I(-0gRI^m4IQDX6N-a1^B$3Zg-_GzKFc ze+ZZ?pSbm4Wu;04qD{?|B8wWyk%lB}Z)B3&RS|fZjqg4F+;dNi`qYYqH@5oh(){_4 zKKS_j<-1EsIkxBF=bk<>5)U-B_Qu`v($wYmKbe_NE4t|nH}&n^fAILpv4Oq2sLJxa ziK~}C`1NaVd^)p@dfIyrKJw_vW5*BdiDH(V&#W&_etGfQ%*>WxIDGN0o_(Wj&0&9g z+#j*G=C542z4%}~S2HZ9H{RbB^U)N|cw+%KW9qV4SYBLBm2{MhMx2^d%Bft}u85np zG)a*_MW7gB$hw}%E!>}5m9b#QuAVsfm1S^QC}&HVf*@&(Efh9#x+m)Qx}2148|AId zwe{7_)y-t8qR_rwhfke4I@<0da7-6+%lBt)P0g$&vI-g*IC}KxNPDC{B2wI({rv6s zE{!jwD!S>2#P=ONd9*j`rb$vNE!@6wWomAn*HMmjxZ8J+JalxV)o&Np?%#Otjo*HH zbv9WcLb2AS{)5LJ*}r$7!OpMD-1zc~Ytz#YvTCURp`(W%J~q_Z(HcaR_3NKsxqjjE zD|goA$gZYPOMCyw!-s~N{7&G3<=N}kzF1cSoh|-&=ia`aftChWdFuML3!7^*g~Y^? zqwmB+NA~S$15U&(b#?m6xf?e>y?(cZgds!^9_npxXoPBLX?}73{_<884|v?6hSq_x zJ^PM6yf>mQPhS4)t=E3>=BGE;N&?aU{Hw2i@4Mf6?m(zIf93q!KmGf^`sI6*HG=JY z;(LGor{DbAlRa)zNYCBA^6roR=RaIrw@8(Z?LPd{UwnUbSIn+S;?n)i+~WAMkepr< z5Ts-5@K8rrAnfBLLCfb1Qdxa4b@TSjX3DfmHL7h_b90PiyrBkQe$vU>BA;2gef`#h zjT-B!$9KzMcT;1t55v^$`L*=+%GAvA=2q6(Gu#6pY^5*{BPPpYF14_>HaE4VsTSM5 zcVu_}KzBUa$f=p7xw*NuT&5r)tUKU}boR70H2U3?SgceQ9wbGvX5(Hb>-YHFn8Qh_ zDFM=OMazknBj68(!oh$Gv9)q;`QH7dM7hf2u*}if+T7XG(b?7L4S0l&rHzf%#74;u zHin=TkAp!>DYv?q+*(@LSl`N3ZLV?P$dNAA)px9mpP#y$DDqW_jYb3R){$dJI|HPg zU7DY}b?yA6$$MEABuhj4;Gw5q`RdUaU0a{L@ag*>oV_-)ru$pF`nuYC`??Ol@Z168 z#`({t?tcE}-~497d-R(x9Xo#FRsUmpM6-~Htef4@YAozAW&|M<_ob85K1 zKWb(-S7$!`)obs(|H(Zw-Zu2ezMkC=4Tn1VU75w(7tdatygI(6`i37n_3)Et#(J8A zUJoU0=M&S{zL*6)CA$YlA0CPMf*~JkR_1S9zj14JZYjs^I&kF7Gf$k{w~Nc%I)Cxz z-L4xpx@4!Yb+2 zsf%ZSe|EZrM)sdNxqnYbc!!97_7CseD+p-g;NY&lU17GeG=A>-LIG>ucl@P4{??OY ztz7oXKmX1D_}kaszp{o8zVMw_zxmY{PIZ(&`k(*!&%b@^^^a~>oZ&r>JpRnl4rTK4 ztp|yeKnH>i{d)&{!@~XF{pKuWR6$`HhaP$P)vq22Brm@A`*+`ldVz^`4ts z#*?D$?mzMT$s-4b20A?A!rbcm()8VhjE12&8}96E@Woo18ofRb%@|v^CSc)UA*GVL z_8&TZ;*ouA{_^_5_~qYxGMg9kXn60lU;ozA2X;BOZ(hDOe)Y4-q}enuHr&}2F;=D) zc!w|6vG<`KL28{?5nu)cEjd7rlM^;d?|<{a z>^Skl%U?SjsLsu;Y$UVW>E-FAL{3M1eNTV;J74KkZvX!0|NEC;&Tq?}eJ_6d>3yw! zY2*IXM9RYWRLwx$9#2QBtCpCa8NYb-<_bM@=H>5v=XgJnU%2$)Z!RtrF?UB>$F8;z z=Cd}M@yeCSc`?{GHq;ZuE1C82>E&D|SN87TbL3EK zh^{8qRx;wmM2dF=gJes1%!+C95{8jGeB9w*5uscW_~?oHa2%eS^vODue-RO zDXgz1vW1dDHSX^9=<>=!V)Fg-vtr}O>BpZsbG#RwJ^RrIzrQs8K;>EwpM3J^!@C0J z-FJWT_GChGwVin7TTe6;r{4RUzy9y9U(33hPyOi+zVqq{PigwipT0j=u&KsF4<8=n zmM>kndUJkLcgFWW^XQrJ^TC1H!m+*!C>=1cPttdl1q1% zOTNwnXHJc^#;9s8IX^Q#abIBE{vf0{k1tr+l#&i#@8LcDes4LuGJWy=4?g(dvn;p! z;G<8SIDH^aOO>UmshLD6yOq6mw~7c8-*@Eek9C^qJLk^7{l&Ek7C7|u_g;CX70KPd`rd^b_mWoA z=|4I-=(Ur#-ucIOZlq;**NGRNJ=Ps>C{A9uxluMrr)Te8Kbm>~(zs-}Ld`vG9StpR zQ>~ztLZymQ9;YR3B~qDuRU}+)2a5Un;w04SN=*oLMZ73qrF|;nW(WdmIIfmW=d)?3 z>a*319PAu^Xcu7{hE_^R;zp4osSu-*q#&sxRGK>JqFu0n9PvTzpPRnFk`pmE9qH@k zaJ(=-KYOogDxRU!Pd&1?nJV4?{M?1RYrLcL@Yryas!hND_J^Nb*^CSh9eVM5$HPWt zbMowXu9~6tk9GIdRJG-=S*Y2+;YIL}L z?-PfceDP3uVRmxj&LYCOoJ|2lDHFC*uGoG*>2Gh1!D4PTy_%R=T3MVg(6PZ?LxV&8 zAy&^XEhQ6K8gwE`hngd{n9k)y+!bl;3`c#YT+7ZcuPtVAk0;a|pj|X-)P!n2S@Cx^ zN1FqI2v#gtwkw8>bC`;;M9`1fB0RBO)M#g0@6cd-Z-iBI^GmDu7PoSEsI{XlCglq& z3rpF&;%jK$Jsei6s<5@NoD_<5(9_zwhf?%vc400>N1~B^hlYZLk=vM=n%67>MKFKZ z$CNAS8jXqBBCRr;;n%8>a2+92)?3(My~2>nn@**A0y(q;h(5OGa&Hw6njd zA>J8x)1~xQ;=yJ;>IFroFEZz6K4p5AS$AQJH38Oc2Z(; z`qomhD!JW(&b^2Fq68=(r6S1~fe{)>S)wh8wPInr1Z5i+42Q!#9sX#LP+>u+STz_N z^)yFl+A^ekI<=j%-2O;&OOQbL?YTRN+}1MRG&+Mb$&739QH&F`WZx0jXI zC5m#mqutTMMzvPl=6SwcCb(etNV~h7F3M6y^|OVVArxv7V>_vKU1`j8ZNRBc0*)wwN2?E5$t2qLR)FCT=1g)>2{H53dreTu$e76d`F; zETcZmaCu0%h6O#8)8;qstc#i%j0Z`BYH(^cU)U(7U~j?U2-zBKu?+#g*Dw&-LNVHa z0*SXMrIbZ!5fbGz6w&4w6BV)w0(Bx{ z6VTRWgQr>W}}j9 zFr2|N4!cs-YMCmATeI1@Ba0NGQn)dpGPPDKM z?u5eF78Fe-0W%^bcZB0uCr6+PxZlJiNm03=gCTG&TZ2_C+lG!!()JlLQM{L8RK#!6 zLBtipBsRj9VM$7+9Fb7Kiz}64QI&E$YACWZ9>P#(Zp}h6vcr~Y8fI9gL3#)kv;nDO z3~IQ%wrUxo?(qiuv z?+%kXi4?1diAb8$>*BnyAE(P@K?B3n27;g@#}W0$RN3L8J(#Rmx~^J!Az9Wij%#ao zSU84|q=S+Q5P%4ZQCd|pv@%9ey2&<05RY8VEr~WTE>q0cYMS9}<`|-)psuiorEtAi zDCEju7Sj+&4n<6ifQ3BNpdAFOm@ccPV@Npxu~UMWpisM-6)>A72o%F~Si4pgQ7RQA zlB9izpeP7}Imwzp;7~YnXfl!E)v|($+d0h>j`wzWP+2flO-GEvR!J9ZMlIDUiV4dE zu-t2sG;BlAgleLs6S9z0spZNxrfUj8Ia@mW+T&hKOy;UZ1*aHPw2V@=py34D*6!n2 zySS088mKc8^8=7JQmVft*3uU8QYfm3h^^qTD#{X!u)4Zg)J<2E)lnSMDsJ-z>ks=m zFRj)pz_;EeTF7VlLPo+#0%g2T(rJmNP7oGBsIY6Mny%(14z+oiml54^c>Em0!k(HU z@X6(BEhi9^i*W=w+Tmc(nxGT_VNP1%EBT@zi{+|q$tK}x2>3X|BnSdSv`VRvDX5kO zgoM%_w-e}1QY{QOt;z<}28`1ktkVrj(u@zsP|ShjteLCSs-kJ5nk*Dcyh=IWd?u$Ew$tTiNYv6{{hl>-r;}t6 z5*JH0Qbb9T1a>ks#UM~s#Vk0006s-9OcHGP01VhB8H_SBnQ9eQH))1|ykr;_u2pzZ zwxA;vHalpBb>XO0&MKM!qk;irPC!wJv`Gx3otDe2Rr8pRAeI}$G?P$lgF=fMfng>r z-y4_%p=sSlWoQ>uamtiT2qZu`qJfcs?o8DxmjzXoO%f;+8gL^7#X^pCd4L@R-Vjwu zv!F;tYxw>&t>5 z3_}izf`lLniVpQFq&riDHxh3s8try6EbFu(c*IPqtnoUA!m$5M zoKa3R8Bb3eYKn@^n*>-G^RoU}5Uf|tW-OvsopX6G&|9>mAuwshV0^5f0}khlHA7Y_Wg8(}p&&>d z2gY~_P2iPMMTdN-Vs4)|=)_2zwG}4{ForECw-ci%+y*=tI&^DcU?CmAD+@Z96mftQ z2%*pkWIrD!8aNy-@+z4M>A-`nE={#EHMXKys=>HXkk*tW0kSH9VG=`3$mb-Y2!JD1Q$;Wg&a$vi zh~Nb7iIA#lr~m?SyJ%4e6Y`-l&Y^~rmC6u*8j6X9f>qx>2(u;*n6)e&1clShxd^#b zHV_OYA)^wQTC1r*GA63qlm`-qlQb!vJy%8!n!nSnqHq11IpG74Z{UpE@n$8X<}X%WE2mkTPSW+YpSB4UKe2#jHH2v6*WUr z36``?RfS}%N+K^CHtF#PI7{RKPKs13!-BX4gD|T=^|~x0Rt>gQNHB!X+n{-&bI^nc z3Zf1S1OnR9M4KQTEbDSPow%X`510nvN5_C6oeW<#SWsUc(!w2NRU}cE3?zRxLSr_R z2!amgvms9-a3%&s3JSklDCa>X14(MsAnL*l!3%D71_pUH^+f)N1Zg#9Kx$8BryjlF1ZX_-xQ=L+oqfhX^1AGLm&cHOx!|% zWF$+eJ4vm{Is}t08fq4507OtVQv~`aZP213_(F%WQ3b-mfIAJFCK*H*WL;1&L?+_ATol+FboH(MM=z% zWl@sKRoTJ`l;)s9vlU2=^{fMGjKC481~OTKnvDS6NHVauqr+JrO~Y{-B#cQh1VfWh zJ=#vE(-RKBi31I{Ov{Ezo3xX4I7k!1OTt;F1BWtDvk+a8cuCeUsy=7Jg4nD_9GDWN zoixB2F=a_t6!1L``bE=p6E+YbI5f4+wIHzw6ot_vx~3Zn%$-ER=a4W#*diJTL4Y1i z9z{`G195Mf2;?9g!3Yu(JG5xji&4n*kTw9InhH%|2ILwzyM}^pF?0wO_z66w+ZKS& zGEG^tOxs4_@w)%Ok4W8o6r^X?0k)(t5H7Y2Kfq%kSWIw>VWAe7k%WB;1l9~N5{eGE z3wF`KSQ_+=*85U*m^vIcvvrsVW|N$ggsfyD24EM)tb^gA@!IcNGPkX2aea4kN;Kz!nbJ6AjzqA%4M5 zvZQDz0YIW0aIgSJ8K*5*t2O~#E+7uVrZ5UhIork=907%6;TEJc(*i;VoC9zyND~+Y zwh8G5jQ**D3$@ELOelcAwk&?G$;mOUyyb>D0DD4cm$Lu7}hZB zJ=T3sf+mD#>Nv9zaHXz-z=6@58mMlXW=I5OV2cVQ0YohA;2aD@BWgoZAfb5`RGzE? z3Tr%o32w6hQYhw~m}zK2sm#le?!ZmpDibhh;iv()2BX%)(uACaL0tpt9HbWo86W7+ zR0SvwRTy7gCIb>l$hbIw9^^d&o4j=`0KfxBfW_+C6^3m?lVCegrZCDnj{qPcw4p~p zDOeoh2Dd?AgDK#m0TaWaPpS@g6T(rdyA%aXL2QD9a1y6jkiAg<)ia(c)m;K(h8|2f z?5Nix4>BGCk`E@S*A*cQ39t1l(Z2 z3h;%(H5j*zKt$GM9|n-HQHUB7Mhf8%ZxOsMU+j911Q?fu1wx#FF`>{NK_C=Ja{`_O zs~}L8VPJmPfyPWYmZqyW_r zR3bp*5F&5_-rO0K3Bv<6Qd9}{e2oQ(|+pIGm)F37Vo+?Y=4;URpF$DPzbwaiThl4Fq0%#iOqz=ToMZk8j$PFuW zV0P#eqtJS5;ENr)%rXUfM(slkcj|9(7XnE z78sg>WeWlUc@NQAM-Dh0gf)~#U?n)`hL~^x=mt923B39ba3c^YWPbPo(*bq{Zm4$) za|fLcMys2D=MKa!7!yjQ`ut&~5+Vuc06c~f3@{292g*cX2h{{1A>^g{XX;rR@Bu*x^8)&Ur+4NC=7(RQwfaZE2|yI}WC3(gw*|a_ z|7<`wv<1)ulEmO4coc5KJ9vfGp~X7i!8GbU*5_FNYlnIk0bfJ&5axAwfJxzl^#HG< z8Xy551dswHgX7_$x>M_80Ta}l2A=|N?fl(D9oBUSLNnlJxC7r%t1Ey5Kux_Z;JTgU zT6YYz0q^13&h>hzLL>D)pa7{`0H6aw2U7xw*ITZ42hYMM>YuAK5P%aJsUxo5KMWYY z01D9FAFQ=wf%;{5bZ0_9e|2lYqjesIhwI$7Lu7Rm!QATe*%{Ri(Zc8dFhRHpAE>vz z(=m7#^(K^bZ%Hk@^hkwyj^^`TvJ8Kr=f-t9J$ecE0Q0t9P(-wkEG#{Z@Hoep h!z-W_zTz*Od0{WS)^jWTVayB9pLpV5-VN^?{lE1pISv2- literal 21584 zcmbunXLwy#b|rZ8eK|+qAtxdb06~B`lcGq8%Ar)MDoGV=w`Y1hw!e1I=l(N)X1eW} za<%Ptd0a`Zpelt@rn1DG0{{Xb0+Hjx%Q@V9XI-f6{`|Wi6W)9Go_o$dJFLC-K0Nuv z(~l9vv!{-pK6&!^6OZ9%!b6Y*@yt45I%0qO1m5Fy`tfI;#Xr6S1o403*S~o^^UUM8 z>Y3EP`S5?@jVg+y)ooQPqLR)kl0~mnS(n4a>!eA_WkuZ{41~R2R&#lZ`BH@^18$es z`mKuHH+8&zyI><&#z9a9S?o;mGA$>pFY~M^7*UpT)8`=4LtemV~?Fa*>6$i zF1+^DTt#*4J3iFBeQ&?LxOnNk>zQOWva`N*Z+Csfl%G8NlV9D7EBksocSy+`5e}P) z_{TS{{`$QPwd?tpj_eLc&;RXPmlJx=!48*|SKQkodUouyPnWEbz|rGw_uSPS@7f#U z+?-aS7^1K#Y}(aqYVO*t`wQt*A+=d>?tbiv6aMP-jSIKNr_!q3Vsl428hkc+ad;(O zQB`Ygd;j(w+iOF7aU)eK=CaX*7#!^G9qg-N@)IMsX5vDixz-*y^vFZ4>h#TX_hwTi zt6Sx~^vbsc2P5;Dc(Op4C_dcY z+}Kkut;{T59bGJQj`nSxwe?|-R$3aKnz}!eAvmwEwzau2KqTg8NAJvSWD2~=9jt9{ zb>-G)$8SxosjiwxsI9ez6)MF_Nyx?4SF(~N+`6r`&ZlMKd4Ux2icl>VDPKd2L!ryj zs$#N0sJW`HTfMxHhl*K({*aTaW~-Kfo?1*W0iUuyKDx|w4DR&G^ADC&5~0#`xxhHQ z_1oG44x5@=UYc5nrb^j75w2@(k9bVwg0M1jb1_*Id1uG2pP;|$gA zzPxq$+G3euU7S|i+tpd`cUW9Cj%0piVt9Cdb7O6JGh^xAeQJNVyShFxb8lko>aEE+ z=&rqWU|&yNO^7PR7MF&vT)8+NmBZo2wvMjBp^io;pWT?cee34+HJP%xJi(flfx{>E zHJOxrybxbo-&k19<;``y9ZjuWJG$y!W+AgSb8l|t!D_VNYT32_$fKwBMQo)zGM3I|b&K6; zF}Yk3hn3K6A)m`>W5xLR)f*4eFs(>KQ)6pS@Ad|IV|?W9*!bu|hI2ITefZemo*f}A z6`dcudHeoMqQV8b_6&9StimmsaO*+?-lkh!x8Anx0*ceDmceb~nh;`I+0F{O*mbYoeuf*NG<| zfBMk`X&BHIUc?&xjx zaryZD+ZV3hn4XIlG}>0*+11t>iFgBEo-Ax^Zm!?IdgbnHhVXUt4fOWz7}(KKBW*0r zj9$MzJi1t5n|7aiw6@otJdZ zYO@6bp|DfTrV^R7AewAeZ^&g-m+8doF2UjhmV{6ewI#-o6 zPO3_lP+MEjG0@uPWFyv4ET3G-Y?c?Q1z+o~GpEiRX>n8viBdMcG&Vb(OXOCf8HG31 z)%6Vy4(#sh4g}fk%-Pppf8%$bTwSjOw;g@#(QiERT&pL$GI9BfpZ)VM-v4Z3O|ot~ z(9>Jf+}ankr7MYQp^(XJuICD5RaI13Cu!R1@-+`0-ZuzqVu~v_&VT&Q??1UQnNU3a z$DaA-i!cBCKmFdR4(k57*M9QXfAzQj@XNQajHb%gV8?+oFMRvk-#pRl&Q9F??A>4d z;)k!jF%qThtu-CZz59U#Qi?%J`fr+s@@ zOADN5qmL^sjNH6&`Pz-~iRB9E?$~qe>F1w5wx=gxrG(_nwOco@-5DMppID5SY2WsT zo_P5WUU}j4&X6$u`A>iR%df7D$7y@0rMG8WZBuK=#g`L_Tse_knxDMCp31AV#ag?q zd;5-EdwQC}bT*$zrt+EO;_C9^W-Jkp!z%3qaF4bU0GXA#8;B(3L%od znw>j$_0~7oY)+PBH9{;&3|WFT%}!5@uH^(mR?KFzg%Ya*CDAUY-DNTJ3@PI}SyqH{ zMb1SRm(~?eeeckLeM5bXUKdAKQj5c5x5sbZnORs_mtEb5A3F2Rr=B>uXM1mZow`19 z?$gUxZk)SxYdWokx{g2d@BaAdeeE_mAIs+A^P|IK6Z30pxnwev%}KP~;i_$EYin){ z`z%^vX?A9A?D|)i@5Pd9>v4gr=^i|E{K%;@XO8Xgr|-V?!yo>?|M>cQ=O>c(jzdqq z_}%Zn{KAumcQiVxYr~g6edE=C{@uBIO9gvl@809jyz+zZy>zktdedCT9{0nVHR1(Z$J$x!6jX4Q&f{H1rMa+3V4krbaK{ zzIbnHC6N=#66x*Vf9lxKKwoE=&#X<}y#sriTdR^5cgwb}!TpC0?QC_~6;aKtPE1X# z6!O(-r9e1no@VTU`le<-O*w4@Rau!sfK5d=HWRr*rK0f;PfcC8zNyylgD(}UnYD%0 zwS|Ry`?h9EhXV{4kadw1;K(cc*6gr)hrw=SN$FfyN_+`-`Xo_+gvb@;{A`@@$%|LV(& z7e-ddNP9zTS9^Oy*u^Mip}e_1GkRxi8q?Uw6)0DvfB%7F2X`Gl(C8F4G7EE~H@~=k zV`gDJzM51S&%pMRXP)_^?>v39!A>tvUwh}BSKq&Ub!1_sK-!zP_a8a=^tWDl>PWL$ ziY||y`|{(n=dRrvTTEoiv^x-K>Djq!XMcMQTS#nduE#ePA57d|jOXEHNOx^xYe!3C zz($l~sa#3ttu`~y(LAM;i`go{a5PQol3dDW3V=fPn%dT`?(UZ6h?^|N=I7?;);6Qj z^>xUppeq__solQ+k;fiBJQN|)OA{AAc=LC^`~9akm&z8O$LIDm_3hoir@y@}SYKbu zOYzv!^7Q@NqazcOi<=dbzrDY^HRv^&$a1B~2e%Cjb=3QO9=B6kxIeR*$;US4Cjc%q> zaXd~pdEE{h$J2z6Ef@3Y=*IHerXfhu9ByfDYHF&Bv^2OFNzN6E`Q@?Ev5|XI6ZhuQ zB=7I+*}3P)k-c3_Aq%SsrNrX+$n^5$@Z9`HO5v@(+Lpe7p@G)cI7IKAn zxtz+gR!{x5#z0MDor^RBm+(|Ro`ls@v#DZUCK*~$;MH}7);N>R$xEWDYP1l`RJ4l7 z*f3Q^WqHmXw$f&k$?Ok0bwWmumnDbp3YbEzH9fs{r`ut5Wn#Ih$%XU-DVrh|y=5+- z1kGJ7UE$i=pgZK?avQ0|(lopep$L+-T2kxk!vTvPpNrA8cHTxwLWOQ_G7HsAF6-)W zRI8cQSUg`$t&h(~S2I=QFSNU{HsZHfDU;7-BB*3m7crC*sY;bxM%M|}&RSg_2S=((nX)lLGMh={izK5nrBp?gM2_>=EPiK=%Vc#}v~n&J zUCXA^q}guw)xtcyK960cc(0{gO0BO7VyRdtXL6*js|YR%$vf>ScWb&J-TtR1?L6gc*P8U{YCmE~Hu8P@>2V+w!%NuKnw4ktde_h09p@kA- zLZ(DlHAbg6h9$*PdOeX$CJV)?L@}&IE0xMsg0k2w48yzpJ_k=E<0~1Bp`8JnmE+81 zjVb~zYF0}r5%xfx-$KikqEJnjb480U z)IB)3rz27m^19`st`$UGr?M*xOZVrZ6^p}R3)V-P8f!z5T03WP@Dj4P&E?e+vi5Rb zC=^oZ*k(3Yu8<^aa#|_5l*tR&DT*;Wg2AT2?G1tY#t<+L&yj^#ay1=~rV_DqQ8Wc= z!lA|*pU+{nl45o(wz&x-&y+Pb)YIL!eS4#yXH7a$DQ(P-&8)70!^oyKiW=<>b!_YH z-@R{OduMYU0(pzyV>8pb#vv7IYzc*&7Oj{Q6j76=DhIP42~7&ezJ z6lGORXQJ`7jRHaEMTO-Z*inyyjNODpTkv*QSPufO{9U;O$v?|gP?Vq#)-BUYmQZ98@yIdkUB z)6YHo*s;S0`dd9#5(+sra^vcyFFyF?uYUX5d*_E&L0J$MhdUT)>KfR0_|y}Rojh@% zzpt~ky}qu_DP=Y`V+$h}zIgXHzj^I$ z{$@vI@~d}#@#DYwuYdoO-@O0XmzQqb9iLy%392Pj*WA`OwD+N>o_XP$-}&wzyz-3` zyLQ$)sEvuMAHDwCYj3>s{->DA?OXGk8HqG`y)}(tudgWr+%-6K@XX0m$NJj+K2A@? zhVNdwb@%qj-Kn{ig?vTGmuOFYZEH){j=`bs?(GBHd-w0zH_*}AQs*brsm;Z?u^YE< zT>9+wx3SV&Q_InKLDnc5lv`6v@2lc8 zKy*Sx@%SROzDU^b_xXZOr#k>schSY=vEkeI#vjDfiOq@x4q$GGujui9p_+m7nSbR-w&8_vd{$PD$Uw7AzhfeM5tZ|b{IkvpA zvAUTA3s^~IWZvTq2ScD$(~A=~K6~r8Z@&H6^|9F~n4*d#=`?STM4Fm*^zS=$`st^? z@ys{B`yc<0zx?xm|Kf8ehT3dqF@x35Oia%#&Lx&(sc3pNlZvk)%}J~;&X3=pScd&PRcXvbB zPD|;fJHt1xUAsFvcK6oky=&(_|LD_;XV0I#eBs_yE?Z#&EzK=$y#t4j96x&U#PPiy zHC$<9Y5c~m8+Y&CyL0v2XYarJ;Rk2WULPBsFIXCP4DH%^`1DgxKKuP|{op%~ojSh1 z!zHcW{_591`}t4b_~7F&-+S$?U%m0xZ{GU!%5om`WP1;|o9_L`Pd;+yu~VlWIkL0W zE3C{8-@JA0@~vyvZ(O>5?aIZ^E?m1ay<8wYO|AXA51u&n^y5!I^VHLipBU=$)5TaO zzPLC&F*9}Z;>BzCCm+l%&aKR^q>8d9P8o5#kWItK=40#0 zLMatPgi0h6WsBPrXzA(g>+)IcPCMLcCS5Az(pgCntD4znHE}#qNv2bIK~+sP&2@f% zFyM0fg5ZORN+uDXy*oO&I6u2l(#+mqO>I+ymlnlpr6Q`l*>2J`{Fsd{!?xGgw@6`0 z(KOx}>Dqnp(I=mM`q7g+YpqHlR~ATDePf-E)r--&tDl`c`@x5wesS*n$i&RbTAmDa z?A&wesVAQ}ade$bYU}9Tee~FglP8ZII(~T1 zU~iq1)^xEDPezv)X2z~wzVy|Fk+db~9* zGP5{8cK-79+v9T&CYCniSwWE~v(@Xb>*{H%5BsfVo;CAUi$4^2tO_Wr9c^YdvnOi5ApqS(M7a2{cbq6ksH1YfS?U9A6wC ze=so@6A0E*-_o(IvnAqjdYrt;W@Z=}d2lS1PNm|Be6=iyw270-`Q+MavZ&d7H35&y zZMR|%X_e5bz(#A!OG^tY^UNAT4w3q#dBX? zzjpQf7hhexK0LirAVRI}twDdJp}C{8fA9XIhx&RtobDPq8egB8d@wh8_4=(ZuTLi> zbEu`g-tP-Hb@c4)Z|>>qYOD=AxzhCQYuB%xJHHfNzJFW5jL*;KtR34=9Xoj7z^?us zZ9qgmn~P8>F*i3ceD&Pt7w+8o>hp_tMwg2U@9XN>ePGwYy$1$6+v{t>wLY6lrk3W% z=fN~iOwX^cm*IrnK9kq)kAyqh_6_Xn-n;j}$vyiT0#ssU`1Yl9U%dC)FJArSuYdo^ z`8(6=*?d`dbRK*DyRZDfCkUu^;@!U%qr;`?lsFBNj?xH8DSSejl9Z=>0C*3HFb0})&W&ItR^eC*}7mb z435kIr>s({6jB>=Q@5|(yfZet6fIG9hruGHX)iu78 zwghTvYIbR3Z8a`#^mJeMoJKKC0VD1vZtdN7 z@ZeyxgLj1c5AWM%PArVwf&1G`BhxMjv@;wD20gZ5OW*$eCwF%>xE!QhNG#3F%uJ2k zzJB4$FRtDmo?5Q({zwpW4>iHN9ys&-x4!kq&i?dAfAydL{%4;Kr#N@m!8rrH55MrofBGkX z^wjCyJ>Y*^+)6pRx;Fpd&c(NX^Q&LH{^7eHoV&9@_!}EKcN{qmYN>1I!GpblP-}O$ zPm9mZjodi*=||_T-2wAF8LepUmZ9U1oH}~^^y6pt4|O*+1>8P|(?&|k%~)!6as<)$ z_RLy5l@lw9yLDi2@6iL@^*&HKKCcIiXgRw$a`Wo-8`tlSp>jF5RzU7EaPZ)vr_Ma_ z*uxL)>)%$x<>&5P{0z+Q$i&iWvZV5EZ@8hoZ|~v5hj#DiYj*1S&FMQguH6`(-pu9m z$y6pDi(2ng;5WhvuXQC@} z!&lFL`r-TUesO(11vlKf`^4#oj_>Z@(NgdCqk5KHy7%Q z?(Vjp?q=lBQhaXW+UH+h8<~$47w?F*HU;O&5_kR1EUw`oB*s_Rf zZQH&>51)DRk>kCM{N~+@m#^QOnO)tCR!Flq;PWo-7JvxkVyoO|odw?Dlw`d}`a zu2xm6uc>$U$tS=4y_df6aDPx`KT01*C8-sSbl3aZ-b$@bV?B2-zxt#6;BxmC30NZ*4PTb?@Nu$4(s>=!}GF10I&6 zDKKhOF|js%^RstefA8GnT2@q9dvo9MN1l81*ntCk`UkdmH3vCyee(Y7!s6=O)Y!=V z$(3kT1tK6>i@mm?6V$HP9cgH&10DxLb67YFBd6zwZ`>KacjLyr>Dg#rrkvY`cJDiK z8rpnhXGepdNiQ$W4d1x(*;~K=;@*6+Qc4s^SGf1^(=UAcT;nJ0> zx36FN>dRY;n^k*V_x3%z`n#IjTl{Qsd30oaEyvg$ftvb`zTHQTKXUp|e@hTm5pn&- zd$0cZZ-4yLSAX`Kv*$WweYp8fQz%a^{qGCH-C zWda?0Pd@(aGmo4YY$n%k|Nb9;^iRKfQZP#cw}%tUqicR87jQEli9;rpa_kMVm<- zDl>-;57v_)CP%*b=(oT8Z-4*KpWaU~;en%1JpaP;-#I-{%jOsE-=CddSzU`Iq9AS` zjNhAu%PmS8YmM|Ae*Wc`UwP@Fev3GL?cFzi_LHBz`pMOa#f_X|svmmn8{d2JvBSNs zVUM0)nIFG<=k`QG(@7$;mJl-5D(|&6ITmy05Q6D#fOUKmYvgw?4dde>o+y)^I~teSL3BOH0tIyDT6avlG`odh>U0eSY=& zWKv`!+lNlS@Z$5|ICikV*`sIgU;6ygrAybY4c}iaT5Fqk?;HYr@mbVTax*$}^wGfVRmqcglGfF;|5v;8{c6LDdd5+N1>2x%m(%h~6`%j!awtv@PPra8BR)@d(^8CfC zm(O3hes3-+(%$B_dY?BG2zq?2-CZ4B-P`(`Yt2e2U(RI8B_zIcvlDj^)pFHzqEt=h zsvHUOx~a9NZ%13u?*_1U`a-pKVI6hb4P@MygsiK@_2qQ265m*wo?lo^N>Hd!OV8l3 zhmY@Wuk)B$T`Hs>+#Q*kd$5v9te_Eu2{zU@wMSf5Yk2#P!R;*`CAqQ^%_UYA7Z+CJ ziA*YARn6W;M6()RRw`>V(@QI37tX$Sd1SHbXzD$3^30h>&zw1WxHq7#-u&dlkIugP z{wEi2-JD7iyuV@K=<$aif8voNJ6a<)A~F2IYd`zxdsioxGLpsHI(Yh}Z+`E&V|8p| z>e|_#|LFhvuYdLTZ=4&AQLa$$$?yKz|MG)Ze(;?~d+gQCsV{#0>Z@;Gn~j!8%Hr+X zcla18JP~63&X?!TU%qi`d|^4Q1CngtclyOwo_X}d!-KU%Vs_&0`FDT!_DAQ(Vxlt` zY#-RYYiLhbqqj7F=iEnczH{#8_0bL8g|3xT4?leRsmC84XtGJ`_io-8o|>6oTuqd@ zy2j4_{sxb)p{>r%bJf+mw`Z4Tr9sTyZ0Xv2@{xy647N4ade~|@6>h{R=k=P?b6FuCCB3ei{)0n(1ML7;ax$@rH0AuqAH4tJ2Ooa;;jJj? zZX4Qn_@SpCK7Q)tp{_ayDU>s-_eYFc*J?bQjIG9!RX$h~Y6$4@*xLBbYv(_?v5EvQ zwC}*ssXzY@-~Pk@_{Rr3clPKjbN4^_<*Psc*-wA>`}f|v@L(llYwzyfJG8CFYxh{3 zY98J@no(KK)!esd{}V4hxv$AniLZ`+`T6{=JtT-rE!6$@gsy-~uyBqs!twJITSd~b`Vyl~pOfr_qrxJNS80qQTb!tND4Xb$WC%C90BOt?xhf=wpu_-L<3M%NOF)SHJx9t1oU$ z&8-({d&9u~y}Ng|*O_Q>Y2@>_-hAhyk3YL~FK%t?>)pBQ`13#b?xWiS$cqxI6PG{# z^v+tYkcvw+yAJN`Z13*uf`Lz8Id}f*weueWwz7^Imap61hxV{~qsvQF68A~w$->DPM1SVOd_wGnqOYtC=)hceRKDLQ;+Ox3Hp5X5leRY!T8jT+js6xOcl*$ zhr{BCphiYWxg1&r)k-0k5gA9&W8&>~ElrIzL6^lCJPZ1HaeU&z{Nl_sy1Q6=ZFlds z&Vl~kzJab9kA;@9D7h{zZ!WFoC?~3NW{#vB?z%{WlM>7EO*Bn_tl-@t6ysY%fpEyG zOVwgNxitM?X>o3Ltw>uvPFJX=(T^gM!^992S}ZI1d}?z&DS6TJ5~+za1f2e`$6QIL z^Tl{HT~r8_;hY>>Q5fFBSUj~>mePcBp&;bZLYS?Rtj!kb=BZH}v}_B6ThJTW;*)amY+`YCYHk6A#RB2=has}T-e%D3X|#C8K#?vjB$3#Z zJ&jU_yP>=0ptZu3WGR+hADdiUmHm#oI(u8+{=)P`#tyTj-lVhZuijg6)G z8Bn&H>ncy`v_Q&QrJ$g+Dw~km@vgRAJrM_I)l>P^Od&@pEUbYgEhwGY!}VT{Kv5`P zu9T#TSQ1&r=5l!*YFV~ec@f;($gO)b8`(mxLVKJJU){Ft`wZ^K$x0|NRZ3z$CswNr zPtrU=s5&TDRjd#?QvZAs1-58D5l_L|oGyPb81zP3y5KY;AusB8m2x_v5g#vLBBgxU*8xB@J8~UT6r)!irhK6KDU&!v~Ayqe#Q2l z?(H3@8|9ZrZ_gybR%b!4tc&K5oj3DlAbBTgLaU@!{Raq3Xi5N=YNSQ6Z z#s;4Wz0)dag+eYb^G>szP2@lk+FV}X_y#~ST8CGTMlphj-snU$Sp|9F^o4zPj^ora ziUbSG34zutWeK>|dYB$?SmNBu6-Qs4=oZV^TD3)`&YTFvxYHDm2y--ON6Dc$wBZ*Q3 z6v>1N`VeJ;ae8Q0P%9G4`)pdF!r554kWEHo1@z^Tq>1MVrJSk|PNzju%{D)ep3O>? z@_D=_&SoZrLTqMadZjE#XqhtnkP~HeOO4M~)$v_^J-S-lTv;p>D8{YS@d2%bSxIIz zV|(2pi=(Vix{S_9RyDDFRnMb6I-^$2tj!W+O%w&AOcX?rEuvDEXmpha9GpAo^*Bhq z1m!8_$_0rxF&a2kyT{6C$)ajDnH5;D86{St06aoyWuYoEs9TZ>Nn{gfHeh%srzwo8 zb7VQ46XdE!F)~G#Rf4E!CL0gvpR|($EOK4@!W^<*ohPt-R!qQR+HH%86ln1TJNFw-fjfU#mu=N3}O&1cYIdCZ= zW479PR+Y0#RYkKU32UL?3Sy|stH3g5qp8)((u7`=b(Ymt@ZXh!R<6>fpvPiE!w10% znOI3sNwkbm=mgFi|C?FL}rgOPuK|~sf;~)y!pj~d4KkU%*2^9T{ zWl_$TL>fzFGz$GRR*FU`qO>+Wy^Z{`WF7wNK-5Ez;!(uuOJ z5{T+0k+ZuUF00+`ws9y+DQL!kX2=o{vK671(kMztwFmueq(v9YWjv^&I$bEdfqyBN zRT-=XF4qV&iL9YFgrIB=i@&`+mEmrD}t298T7w9-a= zEv-sLQ8#l+5g--WimIYKgN4#A48Ruo+;r4xx{Rl-hij=F740T+ysQga(C z>uZ&gPB0d~zb@#fDurTcZFMap+5$~=HT8|HupS4?5R4|3(C(s1B4u`?Fz&%|8nnx- zpd_#sLs?emgCVrzBR(=LgGCxP3%1wn@dx}~tJCRVMH#(5lqU#)5{kHqTy-OvE))}+ z*#gb5ED`|T;dG;-X=Bierbz_NGn&rwv|NP-R?3R3+k$n?AqTI~3K~yKMf81WqGqyS zIxZ_`=h4O`S0SBpF}^srQ7OXMtLS<{pB8WSd+k=%YPF!{3Hb>Q=wxDfLE|iF0uxH5 zTm}gT{FPXM$||%fBV@2B?x35}L>V6y za=C72EYmxxKWG2)5duKk|q&pOYk(Jj`iy_o}(0pOCIL)A<(exKX z+Z)y{2(qR?5VAs{XUxh`dc;msij5%5ip9xMq{AeZ@})$YWXmK;YMRXfE?XDinFN{8 zfTgKI1_1}+NBp7~6R#;KsuKuKoGKF(Aqpy?vNR2U$nm-Y>B{AbP7}1@773{;R;m*2 zMN@zQOwfl?!Y;`bsXl!$!Z65fYBa~8BlqCcv*dqW1sSy-O zXdn~`5p5AT+aXGDEwEXRBMoJgWJ!jX*9aYsQ6&xC<)BJtl)%jl@CS~{Q6@V&7fC`u zgBgth8CHW@C}>GWVve{~ESE7|U4{Z%tiW)<>1IYj@Gn)+7YIiLpIep66;$hG>>Er0 zzbmp@70^0{0;a`cg3YiB_JpA;na$0OoFE{{Ga3fq$QVEjD_xbqmnap0By1*2QRPCO zbks(ukfq5^pasKZb+-1jxHV0Me(Ts}gaZvduPW`p4ti>9{0QKr;pWg}X#*l=00T6hqabUXJ|obIPT(V`A@Ug= zXi};w6uR1>$FK}W6Dn0fL|l_$Gf0IUXod2DPtY}~3cewmu85+LO_gAK6p#S7br(!i z5+Na_h&)S2CJFY|%*ZlrHC-cktC{A^Jf+b*bXC=`>Bc>HMp2ZE z&WkcgZD0}!hQdR~+-|IcwLqBvW`?MU{~P!R8Ahurk5wKy65~p_mp9t$}vn zFQFEGr;6(0~q* z_oHb?tZ?WcHo0wXE4UPzgwUZA1i&kLO`!3#6Wx}eFtlPtsZ@&T3<}&hu~b4QmrlYE z0ipdahuvgFcM5}oHlxesVzDA+(*XH6Iff^pk=5&RdOd!-0VvSk%8CN(Kr&>cv6NO7 zS(npHvb?cVdPNX59Sgu70nDO3mII6?#bQ2RtW>M8X`|~G=hdusK%robi&l}hAaYeT zo5#griUd+3g>m~`B%)MV1BM_y;rcq0grgrOqDbW{)?z9#yN(LHEGe`DOs<)6I$h}d zw404o8ukSM&zhlCI<1$BrD6%K)v^o@!R4~^3}6@!UMrhITWbdCqEHp8U2}qD=PYIIEL~1L!71-=n@U(QA{9NH)DC3Hjy;Cj(tvqP{1aus_7OdtLD>Uh0-)l zq~H*X=~NOR(SokOa3E}D0qq!4qevu)qJ}*nNi>+FuhmA%U_c$x+)2u}vclFMb&WktbS9VX7|vUAAh%Im;L(q92R9>_nD2TCAlush%gaNes>uF9H5a$s0M zCz(mZj3xLUtgeD~j!aIV5Ihhm;IDD;SJI7XLITjpYO$zW%$xx>9S&YZj*G(xf~L`w zN>ocaP&YUL!$Ts}5-MUHLEu<&wIUM$YcNur^RYW@cKiSq2m|XRkO108(MAJXMB1vM z1;(b8(*=pPKprXs7G5VP2 z17B$n4-E;xqf$7U>Aau=X<=)e$SD!SGyqbk*JXzP2W$jeLD0Hr zsBt!(&E~5zxGNF6BqIbX=$Q0-?B3dt8?1UYhx3PqrWl7h2vXN@je>J0pi-brh%JDd zjFGRyU*?L143544zTrZO0|v6#%(|q~cC(A;bqZ^jrIJKK$IK-flM=Of#k8T!28ESu^P0 zDnP9$Vw-@rfwx468~BGa*)0^PNQ4}+MCGwcUbTUPtW@Jd*&wPEN=8aaAhE9^Re}!N zIq>L4529SwG)}i#TsFJi!b4Cr;jpkK9svrOMP4UJ)M;!W!#D&uNs5=NDsoqvR^A8-xu0I*4%H6mCZ%&7_W764~#2pkAb-Xh}wAA}1H zvYkP=kt%uP!I?2S zC<;MG`B_%r?hU}o0320d=YYF_-EfcqFgO@sGK2j<_pcdgJPZ?=G;0CC0o>PU{C5Qi z*~nOF3cnZ-Yk*Hc!^p-F7-76ZC7&r4py+r8Nty)TMifYhj~D%$Z<{B50e=e z5HhqCUSE(5pn}8l*c#*PBrH-z5=0=EM5q@5uHoPf6p6XYXhxP54HyOgMF!v}xEl#; z=74vMedUlMl19o0`U#vVV7Vd+#-`#BCIJ_RTO~n)BOsASLSqb_(Ga-^;7ic$h!GV0 zs1YuZsH(;X&<+G<8U(d*${6X9VXZRm(EygJK*1u;@?eTUwOg12aeC{xC(=6XH*F+1 z@FU1Np-uRMz@-6*$Xm;TcQ8;1yo92w$gAKipt}SXWxzSa06Yig1vSNSG^`1SWsSqn z_zihu|Bdm{1&YXnA+RHa@njSquya6r&_C!D^b-q%G&yV&>LkGMz)X;o8N19PU%<*S z2p}iW>3$V*@3g}>mEkQW&m6)RO93%K)*PvF2 zUd6tY^jYw0~#r`AquPw6gO6dR0uE;iU)gO@xl^hgkc36ZTwd!2&$L> zvU>*H68D}sItrCk_ z)XFdh_8Gfpn1GQV7_3tw;dB09XJxRV)hl5noaG07;hNu)q~C z*kcNbDBeLy;8F~R13hdc1PluSZ3x?DX}BZ^QHE5EDhCDf*N_ClfytmZB@z^M+Y_0 zFbPUWSo)f_fSO_Zu@fL>uo%Pma2E!E1|dO3jRgyb42-{U0Yr&fo*`%`5rm>64dYnI z8#9I88Mb5~B6xbJtH}hgj#4AaZ-$n`8nH$gI+kNh3f>bg#*hs(-#GsYQ^)4Bu*00ntrTKLc~dt)n&eE@zyPLGiceKu}4W`YF5@Y+1S zrc4$Sql2`;hz8ul_L~6!EkFQRJZ)q-utumS0yTvSE*v7f9&jz3cd1Z7ScJ-$kgC{_ z5y7OfKDclspcqg_8kEW9aXlbChzUbw@cgYA8q&t)#`FxGfks0G*hY=4A^#dp~Oc{OyWDxYg5FxIC(qRh><5eU8GUIW0BN=`Q^#{zI zhTn(cU@+J@9)W*w5h4>d2Gci`1L?o9FUVbyHiJ;znwVjiP(OG_+ywK-e0gK~2FQi{ z8JMxLkH}!K-IxQWY^(?Qud$3R2TX#tHzse`1D1g~VX8(zfty3(i%S2Nqrx(=5?K{w zSHkKm6E00gN`f)nNwYUaI0OmR91c`Fa%apQ><9~mrDQlnAW5DCCO4QeU~=&O1}8;R zJnYSI9?&us8%QX?>)3LGX2EXYafWH)Ut>6&M8Te-FbRxd_!2}Mgl-rYgaj91L~(;- z){rQpV*pN2XHc}jod{kCenzZ9&;dI@8)AV-utpF#3cf&EhH*d?;oywba3sK6h>2hc z0atKB*N7a3sUfGu)?vxW^1xew_+)t_kJ2SrHIyGP4h$!@PSL=vQs9j^lR-xqMh=8Q zu?Wi&02Qncb;T_M-Fgrd6#>*hHAta&ykJgnS-^iXQg%Z{w}PaB8nAhoDnthSY`_)6 z6&b&wj!-OM6WHdK+G17k1EeNn$FL)yFcEk-niG7(4JM zVmg2xo^7}fWG4o6pti6KNU|+^(BV>`0LJnScVURnkPni4%p4gS7Da-k5`;2Q(FOQ# zmOv2%3IV}`V}QGZ^Tlf58u$o!GI$XX+lIA6osCUX4P>oQ6zVbn(AXOAra-!I z=agbhA56O8t>J+UU*pT5+5h=h_3dW28&oDdqa_p`V zf3P;g#T$z-UKG^809c0k0$+ggLj*CZ6Gnt15M>Ns1_cBX(?AmAwPhK2Bvcsg&JY%K z8LocImq4BfZvgFxs>Wi0t`W|+Jf^WPFnK5_#BBgf{Af6Ls0l_foGIpk@u59XHmuq( zb8HOkA3tFl!0cNg7*}E?g0|ta#hCe81DM(Nf;v;9vJe% zC%77Ff{fQddB)XPxiLvZ1dM~b3@ydwhGcPvF$5w6=7LcSr-_#V`@Rk)n5bcwxN{2< z87g4R4TEjXeM{`P&3NIWudyvQ#(0QvBNmM1V?o#@BOn_-d22X0_$_#9+=>e^0r&$1 zHAott8xu1GgvVhvSd%dssE)BlW9fJqLGx>;fiI0|8?uFmz&>J*#xJ~#OR*Z`BSiix z;F~c611J~iA7y|rS;9oD;uxCSPMtC&jj<;KTvGp^aVMx>1A7l5o;-jH7#vNbZ zX8emM;zDB;TkmiuUWR&X2?DFaAjV^Ghw%lJcWWTyCgaJ*2$-1h-PW6}@s06}1sk{h zn+pwTZprTJZ!jz4^{>Mlqv2&d`fJU=dt=nC)fo@lk{kXu?lA=Z_2Y5<*Q>(UTVH(r z(649p^)$D}HAXk)y7l^c!p4tZuj9Wzd+YiCa?QV9`QM*reEIcf#@}1-wuUi2{g?0X zf$>OV3R|BUpBszbx^L^N|1rY9{`4=O8yElg*S~)EKYrNy=IdpD{o&VZ+xi*b;orxP gKK2m)@qFXx^AEjz^y%X-Kl#`V!Z diff --git a/sound/direct_sound_samples/cries/uncomp_klefki.aif b/sound/direct_sound_samples/cries/klefki.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_klefki.aif rename to sound/direct_sound_samples/cries/klefki.aif diff --git a/sound/direct_sound_samples/cries/uncomp_komala.aif b/sound/direct_sound_samples/cries/komala.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_komala.aif rename to sound/direct_sound_samples/cries/komala.aif diff --git a/sound/direct_sound_samples/cries/uncomp_kommo_o.aif b/sound/direct_sound_samples/cries/kommo_o.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_kommo_o.aif rename to sound/direct_sound_samples/cries/kommo_o.aif diff --git a/sound/direct_sound_samples/cries/uncomp_kubfu.aif b/sound/direct_sound_samples/cries/kubfu.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_kubfu.aif rename to sound/direct_sound_samples/cries/kubfu.aif diff --git a/sound/direct_sound_samples/cries/uncomp_litleo.aif b/sound/direct_sound_samples/cries/litleo.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_litleo.aif rename to sound/direct_sound_samples/cries/litleo.aif diff --git a/sound/direct_sound_samples/cries/uncomp_litten.aif b/sound/direct_sound_samples/cries/litten.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_litten.aif rename to sound/direct_sound_samples/cries/litten.aif diff --git a/sound/direct_sound_samples/cries/uncomp_lunala.aif b/sound/direct_sound_samples/cries/lunala.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_lunala.aif rename to sound/direct_sound_samples/cries/lunala.aif diff --git a/sound/direct_sound_samples/cries/uncomp_lurantis.aif b/sound/direct_sound_samples/cries/lurantis.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_lurantis.aif rename to sound/direct_sound_samples/cries/lurantis.aif diff --git a/sound/direct_sound_samples/cries/uncomp_lycanroc.aif b/sound/direct_sound_samples/cries/lycanroc.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_lycanroc.aif rename to sound/direct_sound_samples/cries/lycanroc.aif diff --git a/sound/direct_sound_samples/cries/uncomp_lycanroc_dusk.aif b/sound/direct_sound_samples/cries/lycanroc_dusk.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_lycanroc_dusk.aif rename to sound/direct_sound_samples/cries/lycanroc_dusk.aif diff --git a/sound/direct_sound_samples/cries/uncomp_lycanroc_midnight.aif b/sound/direct_sound_samples/cries/lycanroc_midnight.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_lycanroc_midnight.aif rename to sound/direct_sound_samples/cries/lycanroc_midnight.aif diff --git a/sound/direct_sound_samples/cries/uncomp_magearna.aif b/sound/direct_sound_samples/cries/magearna.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_magearna.aif rename to sound/direct_sound_samples/cries/magearna.aif diff --git a/sound/direct_sound_samples/cries/uncomp_malamar.aif b/sound/direct_sound_samples/cries/malamar.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_malamar.aif rename to sound/direct_sound_samples/cries/malamar.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mareanie.aif b/sound/direct_sound_samples/cries/mareanie.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mareanie.aif rename to sound/direct_sound_samples/cries/mareanie.aif diff --git a/sound/direct_sound_samples/cries/uncomp_marshadow.aif b/sound/direct_sound_samples/cries/marshadow.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_marshadow.aif rename to sound/direct_sound_samples/cries/marshadow.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_abomasnow.aif b/sound/direct_sound_samples/cries/mega_abomasnow.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_abomasnow.aif rename to sound/direct_sound_samples/cries/mega_abomasnow.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_absol.aif b/sound/direct_sound_samples/cries/mega_absol.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_absol.aif rename to sound/direct_sound_samples/cries/mega_absol.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_aerodactyl.aif b/sound/direct_sound_samples/cries/mega_aerodactyl.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_aerodactyl.aif rename to sound/direct_sound_samples/cries/mega_aerodactyl.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_aggron.aif b/sound/direct_sound_samples/cries/mega_aggron.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_aggron.aif rename to sound/direct_sound_samples/cries/mega_aggron.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_alakazam.aif b/sound/direct_sound_samples/cries/mega_alakazam.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_alakazam.aif rename to sound/direct_sound_samples/cries/mega_alakazam.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_altaria.aif b/sound/direct_sound_samples/cries/mega_altaria.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_altaria.aif rename to sound/direct_sound_samples/cries/mega_altaria.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_ampharos.aif b/sound/direct_sound_samples/cries/mega_ampharos.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_ampharos.aif rename to sound/direct_sound_samples/cries/mega_ampharos.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_audino.aif b/sound/direct_sound_samples/cries/mega_audino.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_audino.aif rename to sound/direct_sound_samples/cries/mega_audino.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_banette.aif b/sound/direct_sound_samples/cries/mega_banette.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_banette.aif rename to sound/direct_sound_samples/cries/mega_banette.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_beedrill.aif b/sound/direct_sound_samples/cries/mega_beedrill.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_beedrill.aif rename to sound/direct_sound_samples/cries/mega_beedrill.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_blastoise.aif b/sound/direct_sound_samples/cries/mega_blastoise.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_blastoise.aif rename to sound/direct_sound_samples/cries/mega_blastoise.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_blaziken.aif b/sound/direct_sound_samples/cries/mega_blaziken.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_blaziken.aif rename to sound/direct_sound_samples/cries/mega_blaziken.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_camerupt.aif b/sound/direct_sound_samples/cries/mega_camerupt.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_camerupt.aif rename to sound/direct_sound_samples/cries/mega_camerupt.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_charizard_x.aif b/sound/direct_sound_samples/cries/mega_charizard_x.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_charizard_x.aif rename to sound/direct_sound_samples/cries/mega_charizard_x.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_charizard_y.aif b/sound/direct_sound_samples/cries/mega_charizard_y.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_charizard_y.aif rename to sound/direct_sound_samples/cries/mega_charizard_y.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_diancie.aif b/sound/direct_sound_samples/cries/mega_diancie.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_diancie.aif rename to sound/direct_sound_samples/cries/mega_diancie.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_gallade.aif b/sound/direct_sound_samples/cries/mega_gallade.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_gallade.aif rename to sound/direct_sound_samples/cries/mega_gallade.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_garchomp.aif b/sound/direct_sound_samples/cries/mega_garchomp.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_garchomp.aif rename to sound/direct_sound_samples/cries/mega_garchomp.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_gardevoir.aif b/sound/direct_sound_samples/cries/mega_gardevoir.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_gardevoir.aif rename to sound/direct_sound_samples/cries/mega_gardevoir.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_gengar.aif b/sound/direct_sound_samples/cries/mega_gengar.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_gengar.aif rename to sound/direct_sound_samples/cries/mega_gengar.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_glalie.aif b/sound/direct_sound_samples/cries/mega_glalie.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_glalie.aif rename to sound/direct_sound_samples/cries/mega_glalie.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_gyarados.aif b/sound/direct_sound_samples/cries/mega_gyarados.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_gyarados.aif rename to sound/direct_sound_samples/cries/mega_gyarados.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_heracross.aif b/sound/direct_sound_samples/cries/mega_heracross.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_heracross.aif rename to sound/direct_sound_samples/cries/mega_heracross.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_houndoom.aif b/sound/direct_sound_samples/cries/mega_houndoom.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_houndoom.aif rename to sound/direct_sound_samples/cries/mega_houndoom.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_kangaskhan.aif b/sound/direct_sound_samples/cries/mega_kangaskhan.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_kangaskhan.aif rename to sound/direct_sound_samples/cries/mega_kangaskhan.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_latias.aif b/sound/direct_sound_samples/cries/mega_latias.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_latias.aif rename to sound/direct_sound_samples/cries/mega_latias.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_latios.aif b/sound/direct_sound_samples/cries/mega_latios.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_latios.aif rename to sound/direct_sound_samples/cries/mega_latios.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_lopunny.aif b/sound/direct_sound_samples/cries/mega_lopunny.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_lopunny.aif rename to sound/direct_sound_samples/cries/mega_lopunny.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_lucario.aif b/sound/direct_sound_samples/cries/mega_lucario.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_lucario.aif rename to sound/direct_sound_samples/cries/mega_lucario.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_manectric.aif b/sound/direct_sound_samples/cries/mega_manectric.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_manectric.aif rename to sound/direct_sound_samples/cries/mega_manectric.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_mawile.aif b/sound/direct_sound_samples/cries/mega_mawile.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_mawile.aif rename to sound/direct_sound_samples/cries/mega_mawile.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_medicham.aif b/sound/direct_sound_samples/cries/mega_medicham.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_medicham.aif rename to sound/direct_sound_samples/cries/mega_medicham.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_metagross.aif b/sound/direct_sound_samples/cries/mega_metagross.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_metagross.aif rename to sound/direct_sound_samples/cries/mega_metagross.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_mewtwo_x.aif b/sound/direct_sound_samples/cries/mega_mewtwo_x.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_mewtwo_x.aif rename to sound/direct_sound_samples/cries/mega_mewtwo_x.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_mewtwo_y.aif b/sound/direct_sound_samples/cries/mega_mewtwo_y.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_mewtwo_y.aif rename to sound/direct_sound_samples/cries/mega_mewtwo_y.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_pidgeot.aif b/sound/direct_sound_samples/cries/mega_pidgeot.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_pidgeot.aif rename to sound/direct_sound_samples/cries/mega_pidgeot.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_pinsir.aif b/sound/direct_sound_samples/cries/mega_pinsir.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_pinsir.aif rename to sound/direct_sound_samples/cries/mega_pinsir.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_rayquaza.aif b/sound/direct_sound_samples/cries/mega_rayquaza.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_rayquaza.aif rename to sound/direct_sound_samples/cries/mega_rayquaza.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_sableye.aif b/sound/direct_sound_samples/cries/mega_sableye.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_sableye.aif rename to sound/direct_sound_samples/cries/mega_sableye.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_salamence.aif b/sound/direct_sound_samples/cries/mega_salamence.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_salamence.aif rename to sound/direct_sound_samples/cries/mega_salamence.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_sceptile.aif b/sound/direct_sound_samples/cries/mega_sceptile.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_sceptile.aif rename to sound/direct_sound_samples/cries/mega_sceptile.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_scizor.aif b/sound/direct_sound_samples/cries/mega_scizor.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_scizor.aif rename to sound/direct_sound_samples/cries/mega_scizor.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_sharpedo.aif b/sound/direct_sound_samples/cries/mega_sharpedo.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_sharpedo.aif rename to sound/direct_sound_samples/cries/mega_sharpedo.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_slowbro.aif b/sound/direct_sound_samples/cries/mega_slowbro.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_slowbro.aif rename to sound/direct_sound_samples/cries/mega_slowbro.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_steelix.aif b/sound/direct_sound_samples/cries/mega_steelix.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_steelix.aif rename to sound/direct_sound_samples/cries/mega_steelix.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_swampert.aif b/sound/direct_sound_samples/cries/mega_swampert.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_swampert.aif rename to sound/direct_sound_samples/cries/mega_swampert.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_tyranitar.aif b/sound/direct_sound_samples/cries/mega_tyranitar.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_tyranitar.aif rename to sound/direct_sound_samples/cries/mega_tyranitar.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mega_venusaur.aif b/sound/direct_sound_samples/cries/mega_venusaur.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mega_venusaur.aif rename to sound/direct_sound_samples/cries/mega_venusaur.aif diff --git a/sound/direct_sound_samples/cries/uncomp_melmetal.aif b/sound/direct_sound_samples/cries/melmetal.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_melmetal.aif rename to sound/direct_sound_samples/cries/melmetal.aif diff --git a/sound/direct_sound_samples/cries/uncomp_meltan.aif b/sound/direct_sound_samples/cries/meltan.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_meltan.aif rename to sound/direct_sound_samples/cries/meltan.aif diff --git a/sound/direct_sound_samples/cries/uncomp_meowstic.aif b/sound/direct_sound_samples/cries/meowstic.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_meowstic.aif rename to sound/direct_sound_samples/cries/meowstic.aif diff --git a/sound/direct_sound_samples/cries/uncomp_milcery.aif b/sound/direct_sound_samples/cries/milcery.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_milcery.aif rename to sound/direct_sound_samples/cries/milcery.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mimikyu.aif b/sound/direct_sound_samples/cries/mimikyu.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mimikyu.aif rename to sound/direct_sound_samples/cries/mimikyu.aif diff --git a/sound/direct_sound_samples/cries/uncomp_minior.aif b/sound/direct_sound_samples/cries/minior.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_minior.aif rename to sound/direct_sound_samples/cries/minior.aif diff --git a/sound/direct_sound_samples/cries/uncomp_morelull.aif b/sound/direct_sound_samples/cries/morelull.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_morelull.aif rename to sound/direct_sound_samples/cries/morelull.aif diff --git a/sound/direct_sound_samples/cries/uncomp_morgrem.aif b/sound/direct_sound_samples/cries/morgrem.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_morgrem.aif rename to sound/direct_sound_samples/cries/morgrem.aif diff --git a/sound/direct_sound_samples/cries/uncomp_morpeko.aif b/sound/direct_sound_samples/cries/morpeko.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_morpeko.aif rename to sound/direct_sound_samples/cries/morpeko.aif diff --git a/sound/direct_sound_samples/cries/uncomp_morpeko_hangry.aif b/sound/direct_sound_samples/cries/morpeko_hangry.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_morpeko_hangry.aif rename to sound/direct_sound_samples/cries/morpeko_hangry.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mr_rime.aif b/sound/direct_sound_samples/cries/mr_rime.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mr_rime.aif rename to sound/direct_sound_samples/cries/mr_rime.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mudbray.aif b/sound/direct_sound_samples/cries/mudbray.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mudbray.aif rename to sound/direct_sound_samples/cries/mudbray.aif diff --git a/sound/direct_sound_samples/cries/uncomp_mudsdale.aif b/sound/direct_sound_samples/cries/mudsdale.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_mudsdale.aif rename to sound/direct_sound_samples/cries/mudsdale.aif diff --git a/sound/direct_sound_samples/cries/uncomp_naganadel.aif b/sound/direct_sound_samples/cries/naganadel.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_naganadel.aif rename to sound/direct_sound_samples/cries/naganadel.aif diff --git a/sound/direct_sound_samples/cries/uncomp_necrozma.aif b/sound/direct_sound_samples/cries/necrozma.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_necrozma.aif rename to sound/direct_sound_samples/cries/necrozma.aif diff --git a/sound/direct_sound_samples/cries/uncomp_necrozma_dawn_wings.aif b/sound/direct_sound_samples/cries/necrozma_dawn_wings.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_necrozma_dawn_wings.aif rename to sound/direct_sound_samples/cries/necrozma_dawn_wings.aif diff --git a/sound/direct_sound_samples/cries/uncomp_necrozma_dusk_mane.aif b/sound/direct_sound_samples/cries/necrozma_dusk_mane.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_necrozma_dusk_mane.aif rename to sound/direct_sound_samples/cries/necrozma_dusk_mane.aif diff --git a/sound/direct_sound_samples/cries/uncomp_necrozma_ultra.aif b/sound/direct_sound_samples/cries/necrozma_ultra.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_necrozma_ultra.aif rename to sound/direct_sound_samples/cries/necrozma_ultra.aif diff --git a/sound/direct_sound_samples/cries/uncomp_nickit.aif b/sound/direct_sound_samples/cries/nickit.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_nickit.aif rename to sound/direct_sound_samples/cries/nickit.aif diff --git a/sound/direct_sound_samples/cries/uncomp_nihilego.aif b/sound/direct_sound_samples/cries/nihilego.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_nihilego.aif rename to sound/direct_sound_samples/cries/nihilego.aif diff --git a/sound/direct_sound_samples/cries/uncomp_noibat.aif b/sound/direct_sound_samples/cries/noibat.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_noibat.aif rename to sound/direct_sound_samples/cries/noibat.aif diff --git a/sound/direct_sound_samples/cries/uncomp_noivern.aif b/sound/direct_sound_samples/cries/noivern.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_noivern.aif rename to sound/direct_sound_samples/cries/noivern.aif diff --git a/sound/direct_sound_samples/cries/uncomp_obstagoon.aif b/sound/direct_sound_samples/cries/obstagoon.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_obstagoon.aif rename to sound/direct_sound_samples/cries/obstagoon.aif diff --git a/sound/direct_sound_samples/cries/uncomp_oranguru.aif b/sound/direct_sound_samples/cries/oranguru.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_oranguru.aif rename to sound/direct_sound_samples/cries/oranguru.aif diff --git a/sound/direct_sound_samples/cries/uncomp_orbeetle.aif b/sound/direct_sound_samples/cries/orbeetle.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_orbeetle.aif rename to sound/direct_sound_samples/cries/orbeetle.aif diff --git a/sound/direct_sound_samples/cries/uncomp_oricorio.aif b/sound/direct_sound_samples/cries/oricorio.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_oricorio.aif rename to sound/direct_sound_samples/cries/oricorio.aif diff --git a/sound/direct_sound_samples/cries/uncomp_oricorio_pau.aif b/sound/direct_sound_samples/cries/oricorio_pau.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_oricorio_pau.aif rename to sound/direct_sound_samples/cries/oricorio_pau.aif diff --git a/sound/direct_sound_samples/cries/uncomp_oricorio_pom_pom.aif b/sound/direct_sound_samples/cries/oricorio_pom_pom.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_oricorio_pom_pom.aif rename to sound/direct_sound_samples/cries/oricorio_pom_pom.aif diff --git a/sound/direct_sound_samples/cries/uncomp_oricorio_sensu.aif b/sound/direct_sound_samples/cries/oricorio_sensu.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_oricorio_sensu.aif rename to sound/direct_sound_samples/cries/oricorio_sensu.aif diff --git a/sound/direct_sound_samples/cries/uncomp_palossand.aif b/sound/direct_sound_samples/cries/palossand.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_palossand.aif rename to sound/direct_sound_samples/cries/palossand.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pancham.aif b/sound/direct_sound_samples/cries/pancham.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pancham.aif rename to sound/direct_sound_samples/cries/pancham.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pangoro.aif b/sound/direct_sound_samples/cries/pangoro.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pangoro.aif rename to sound/direct_sound_samples/cries/pangoro.aif diff --git a/sound/direct_sound_samples/cries/uncomp_passimian.aif b/sound/direct_sound_samples/cries/passimian.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_passimian.aif rename to sound/direct_sound_samples/cries/passimian.aif diff --git a/sound/direct_sound_samples/cries/uncomp_perrserker.aif b/sound/direct_sound_samples/cries/perrserker.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_perrserker.aif rename to sound/direct_sound_samples/cries/perrserker.aif diff --git a/sound/direct_sound_samples/cries/uncomp_phantump.aif b/sound/direct_sound_samples/cries/phantump.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_phantump.aif rename to sound/direct_sound_samples/cries/phantump.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pheromosa.aif b/sound/direct_sound_samples/cries/pheromosa.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pheromosa.aif rename to sound/direct_sound_samples/cries/pheromosa.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pikipek.aif b/sound/direct_sound_samples/cries/pikipek.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pikipek.aif rename to sound/direct_sound_samples/cries/pikipek.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pincurchin.aif b/sound/direct_sound_samples/cries/pincurchin.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pincurchin.aif rename to sound/direct_sound_samples/cries/pincurchin.aif diff --git a/sound/direct_sound_samples/cries/uncomp_poipole.aif b/sound/direct_sound_samples/cries/poipole.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_poipole.aif rename to sound/direct_sound_samples/cries/poipole.aif diff --git a/sound/direct_sound_samples/cries/uncomp_polteageist.aif b/sound/direct_sound_samples/cries/polteageist.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_polteageist.aif rename to sound/direct_sound_samples/cries/polteageist.aif diff --git a/sound/direct_sound_samples/cries/uncomp_popplio.aif b/sound/direct_sound_samples/cries/popplio.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_popplio.aif rename to sound/direct_sound_samples/cries/popplio.aif diff --git a/sound/direct_sound_samples/cries/uncomp_primal_groudon.aif b/sound/direct_sound_samples/cries/primal_groudon.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_primal_groudon.aif rename to sound/direct_sound_samples/cries/primal_groudon.aif diff --git a/sound/direct_sound_samples/cries/uncomp_primal_kyogre.aif b/sound/direct_sound_samples/cries/primal_kyogre.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_primal_kyogre.aif rename to sound/direct_sound_samples/cries/primal_kyogre.aif diff --git a/sound/direct_sound_samples/cries/uncomp_primarina.aif b/sound/direct_sound_samples/cries/primarina.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_primarina.aif rename to sound/direct_sound_samples/cries/primarina.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pumpkaboo.aif b/sound/direct_sound_samples/cries/pumpkaboo.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pumpkaboo.aif rename to sound/direct_sound_samples/cries/pumpkaboo.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pumpkaboo_super.aif b/sound/direct_sound_samples/cries/pumpkaboo_super.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pumpkaboo_super.aif rename to sound/direct_sound_samples/cries/pumpkaboo_super.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pyroar.aif b/sound/direct_sound_samples/cries/pyroar.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pyroar.aif rename to sound/direct_sound_samples/cries/pyroar.aif diff --git a/sound/direct_sound_samples/cries/uncomp_pyukumuku.aif b/sound/direct_sound_samples/cries/pyukumuku.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_pyukumuku.aif rename to sound/direct_sound_samples/cries/pyukumuku.aif diff --git a/sound/direct_sound_samples/cries/uncomp_quilladin.aif b/sound/direct_sound_samples/cries/quilladin.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_quilladin.aif rename to sound/direct_sound_samples/cries/quilladin.aif diff --git a/sound/direct_sound_samples/cries/uncomp_raboot.aif b/sound/direct_sound_samples/cries/raboot.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_raboot.aif rename to sound/direct_sound_samples/cries/raboot.aif diff --git a/sound/direct_sound_samples/cries/uncomp_regidrago.aif b/sound/direct_sound_samples/cries/regidrago.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_regidrago.aif rename to sound/direct_sound_samples/cries/regidrago.aif diff --git a/sound/direct_sound_samples/cries/uncomp_regieleki.aif b/sound/direct_sound_samples/cries/regieleki.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_regieleki.aif rename to sound/direct_sound_samples/cries/regieleki.aif diff --git a/sound/direct_sound_samples/cries/uncomp_ribombee.aif b/sound/direct_sound_samples/cries/ribombee.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_ribombee.aif rename to sound/direct_sound_samples/cries/ribombee.aif diff --git a/sound/direct_sound_samples/cries/uncomp_rillaboom.aif b/sound/direct_sound_samples/cries/rillaboom.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_rillaboom.aif rename to sound/direct_sound_samples/cries/rillaboom.aif diff --git a/sound/direct_sound_samples/cries/uncomp_rockruff.aif b/sound/direct_sound_samples/cries/rockruff.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_rockruff.aif rename to sound/direct_sound_samples/cries/rockruff.aif diff --git a/sound/direct_sound_samples/cries/uncomp_rolycoly.aif b/sound/direct_sound_samples/cries/rolycoly.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_rolycoly.aif rename to sound/direct_sound_samples/cries/rolycoly.aif diff --git a/sound/direct_sound_samples/cries/uncomp_rookidee.aif b/sound/direct_sound_samples/cries/rookidee.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_rookidee.aif rename to sound/direct_sound_samples/cries/rookidee.aif diff --git a/sound/direct_sound_samples/cries/uncomp_rowlet.aif b/sound/direct_sound_samples/cries/rowlet.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_rowlet.aif rename to sound/direct_sound_samples/cries/rowlet.aif diff --git a/sound/direct_sound_samples/cries/uncomp_runerigus.aif b/sound/direct_sound_samples/cries/runerigus.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_runerigus.aif rename to sound/direct_sound_samples/cries/runerigus.aif diff --git a/sound/direct_sound_samples/cries/uncomp_salandit.aif b/sound/direct_sound_samples/cries/salandit.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_salandit.aif rename to sound/direct_sound_samples/cries/salandit.aif diff --git a/sound/direct_sound_samples/cries/uncomp_salazzle.aif b/sound/direct_sound_samples/cries/salazzle.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_salazzle.aif rename to sound/direct_sound_samples/cries/salazzle.aif diff --git a/sound/direct_sound_samples/cries/uncomp_sandaconda.aif b/sound/direct_sound_samples/cries/sandaconda.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_sandaconda.aif rename to sound/direct_sound_samples/cries/sandaconda.aif diff --git a/sound/direct_sound_samples/cries/uncomp_sandygast.aif b/sound/direct_sound_samples/cries/sandygast.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_sandygast.aif rename to sound/direct_sound_samples/cries/sandygast.aif diff --git a/sound/direct_sound_samples/cries/uncomp_scatterbug.aif b/sound/direct_sound_samples/cries/scatterbug.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_scatterbug.aif rename to sound/direct_sound_samples/cries/scatterbug.aif diff --git a/sound/direct_sound_samples/cries/uncomp_scorbunny.aif b/sound/direct_sound_samples/cries/scorbunny.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_scorbunny.aif rename to sound/direct_sound_samples/cries/scorbunny.aif diff --git a/sound/direct_sound_samples/cries/shelmet.aif b/sound/direct_sound_samples/cries/shelmet.aif index 13bf69e3ea135effe80f5a05b09747ed3ae118a4..b65d435f532cac99cb3e9415114cbebbf37a2eb0 100644 GIT binary patch literal 13888 zcmZX5_mgDTb>7RN`*rT=$vbg(HqB!50t6O8SS&<>5J-X)C5n`(WJ@mFvQ@Uq|A2mw zU9w9qmrS{Amn?}C1&YZeNCZ;Aa*17p&1rUW=n37^IlP?wo!7GzWn-rL^}Fxhd(wBl zbKafB#aBM_GQ*sG{JD=`y!iYpFXKCtWmtwebBj@))oyFJ$A7={+{-WEBAh*OcKp>> zf9V3AKa3vWBmB9apZofA!}K)}<8m#Yk#|xffg%USIOF=cm~72ApMG4c+{{;&nIqk; zv%CK%|AohwuXHBED^)u^75m|XXMQ>U&eBBUjrQcy^-pB}v;NY{Yd_}qS=X7Jj}Cp} z>#tq-HTIG%v2#28g9lFz{e^M<1@HR{hq6D~Ot0TRC4MdT^2y?zIwLwD+2mEGM8=gSA#uWo$#v+BZTu~H5D?_L`}_LJA9 z{?+F?-?%oEeNbdvU8vvH&;8yrm;Sds?mpb{)KTlb#S?#U@y@qH$uPH?&Etb_yf^d* zUkHA@>Ij9~i%j1c@!{3$eZTu}M#@3;+V$|M+|3PjsradvN?%*sfA;j_XWKuxnP@pP z+T69ulORNZ$HD87Rtr-=~MN$cVZLg^OfzL`g8wswo+;@U#a}+`ODu=544V) z>ArJk_*b6jo6g?&;nv`3X?e{q$)6i}?}3zh?4^tOyH|F~tz)zEueFDd%yPBTO6v>1 zIa04y|NchymGK{3(z5J{$2P9aIlu7BCltSX^@G-#r)<5`B(RGeIRs5qLA2=!G&t$HAbwNJ%>N5kI zH|}j2dVIos>t1}2NzUdrt}d3cFTFfnz4PwnC42T+=Wnm3hPbH<$)9}V#`egUJ~>i- z|L-3-iaM&idqtR5gQ@Y&?_TPjes=1}*xkSWu-nm|^#AVGzP|O`r)J*&^LMyc{>ka7 z(*OE)i`gALH}_Y&2Q}r%V+-HBw0r#5pBhvb-g>`c6ebof2cx?iXI_%8-&%K{`OJmb zTW>Da?u!>ww`009z6M~`u>NdiB~^;=;6(6Z`VGqtZud3 zQ!jAuU#foY_s_(ttMA@1re`W;=XUjrU*7#rW%RL`6WaX;jM`x(y;{_td3@=eTH?9i z{$%m%cUleh;>_ZWYuyVMg1H-|^S^$!e6zSZC!FnCgQe?xk^KY3<$ziL*;L zr$y^@`tB|Mw|<9vYtF5Im_PmPo7087r#tqi=zD(t_VLlU`n~URpZ$aJ`FB3jodNATwI`3ATl|yFXaB|H?%n@>Ieg-YAHF`G z%dwa1r+(vnXX*0XraW+I{mh}6;(xk&@ZY_fSo-Q)<|haK+t%#Ng}J|2I`PFZ;q9;A zANcg0HxK4cC;#@^*dIQtT>kT)v_9VapGOW&4SxGp_Sc>rSo_9`ey00hJHD{?{)aeD^Dh;~)E*otK=M@_&8*;_sgu{_zjYi;sU* z&l@kSz1Dtyc4+*AH_8{Z|1kE#)WyZWuRr&hl1(Y zY4P>9(z8!|bYp7c=;_xlX}@ssh3!A;4obr2U?DzOTe=mhpn6Q((helZ~k%hSZCePq>=Qs7MJ_C=T|>^dy^Mx58|nC zXnRrE_oYw8Kls{8t7tdWzIHCLQA~aAi9-D=YsS(!|FT+@PR}pzJNJp>bANHq+7X1g z?4)?I^x9VLbDv^v{A8=%9@^SGXqpqH%~tIBNxpPrxg72jw}Nn&@7`<9UVMD)N8c89 z+q1j({N~W1_4#t*H$NU<|H@Bex9xLxN>jU!JylG1i|5nQ+Mkxz-aGdRJ2!rJ;P^W$ zo9&nPn{WK({ulKVANyuE`;*k-QuD@Rm-WGNcvPx~Y^PDdly>Vn-f7)R|ijvsEdsYKl?a z;SWq^))q?YiJ6qSvTlbBUQ?8qGQ@VIqURvHo2zD(FGx3~RK zEo9n(+1%bqD+7n~i*MA1W(%vGK%CloXFhd!zp&gi6;B&t_|B5y3ZvTAM%5Ub$+Swf zq+khhrgW#092)n_v2JYGUELU*j1`w1JuSO@E0InsI_s4~B@xEMJ6dAh8q%6}f5vNA z{GeL2w0ughIAPb3WVzakOR79H(q8EdW&C{d?j1W}Rbz!rygy?&maBz&R%;r~dNpx& z%HLk@CNpA~97@)g3`ynsjBk{C3v#mDYcaT z@$~8)eYUW&*6N=~T4vpec}CzjTY6j+6|>q+4NmZ_(yH%QnRLilO`9K$Rb8jiKep3s zZf8fDbN-0Nr0nJ0t~8#gE_M>JxF*TL_GT+5bvtg%a6;V)lIa-JYBqC|vCY->#fIB= zSZ#W2|3s{L@3t{9&K7T5e7A2iE#wB*0B;9wmi3`otpJmbidI`46y7F z`X_#W-l^J6W_&QySzg-VrzQ((lHFP;rAE>|+uT(%_KKw@MhdcTWTckWkmCu7vp!lM z3arVA{yej?;Pp=?>zhqJGZn$PEH`LFUw>x?~t8|){ttK_WS1R+? z^lZ?L8O4?{+_&9Q8DCap)^L=%H99CXsyeH*np)5fwb)R><(xak_+YXTD}*a|v->SE z)nPL{H1t$0rOJZWSTaOe6BT_kIT6;H!)J_n&ucYp)!lCHLyNXy#QMgw{`#)jF&mj| zXm%uycQ~)w?HgblzTfrQ3d7~3%33{{@!Ps5aYCZY5BT-%x|EE$?YUAs);E!8nntad zcr3|uOVtL`Di;oMdeCxXK`_kJS>E5;*0Tj4-pq^)Wx~aIFP=;VJFeZ%=5#~mSuYGk zx54N19Y-4rDmHI=Nma``c5RhY60Fs1Dls*yb(>6(9Ah@uZ4HlGB~OZVd@a`>bkqGd zV3^49fzx!P+%Ok}w#C(qbb378X|S@yH@HMzTPa(injCOid?p`q&RTIhF`OB2Y`3N4 zrEU;P@~S(^n<8H_Gh;)Qon*n?HU&n`n597I8ypN9t)^v#p{AvSuE(%lrZAka$^m0& zcG+U$zR<@2F5%XOp{1p)STibdcPE((Dwz@0@SR#y>_?g>q-tfm)2*fYhEHbP>Xs9W zclBgwSeu(IyML^2Up^&ne)v$m5>6AA;!?Crj zBj>f|>Xs!ROv~Zo_C9H|*yN>sGx9RHl+6tfly~($sa#uavlD~4y1rac^&*$hMm1-y zv#PX%%04EpsC?UAW80$x=rTXpl?(ikI6v*X`~x z=6H3a$X4TKC0x_iC%7kEVXfu+_ARb-WN^?38Zn_5zbkJR(nkkv^|>(>sXtrof{TpxougMAT~N!5~aq$vKGHqnA;k&9*cE{ ztLc7KE0yN;Qt8mZM0!2xgkzfuzsmb%PBe3QSIbul@|t^NW3;NImiHfE_J^CfYB^Z1 zc+1v=nV;}tnv)Xhm1R9_#l2F3@smzq_bz>pu zG|rz)oy)t^rQ4M&@9?|x86p2vs_$eb8x$+6>!lChe5mxFJ2x}Nk4&<9W4k=}z3)DZ zCz1c9T{0R%|HFi-FF|(F#6MnGQW66IXbcWpnC7}#?7}j^Qq}y%nW^ge^+k4 z*GS!3*WX;p6+0J>WG~JHW8S9Fy}I9w~?-YxIox-+eK=bn&~Vha$e1;IioD{qHK z(%iUQ9~u>m&h3Yi-wow%--Os~@bZ3zrnq7ct}SF_XXJ1~oR*t|iS>rHyincR8P2o^4lCYc zXGAq!yyrOgx7^zcDb*O66{VA>hf@i=)UDpS{L#Zwm@8xpLkCYDn9Vmj`r5m=on9}M`*VgZ?cFJ4oc>3U}<5TGw$@NS3Zp@dK9&Q!mn!NAGz`0LO z=Ot%(@!tEF?rv?>e4&5#z|7$jBYk~L@&3ZiTczT?ouHvlJ#}RCz|`3EP;2?-hu81T zZ&br%I*}h3K9&=5qoUn;c)!#v?QC|+yM2@W!{;Wg{3&UDXYoN*w(j3+vhu(_R-T&d zi;HaNHr7jxj#;`^FQi9jhgCTjGd$H_uY1h}OWf$}%Q?eio;g;~4Uwr;+U*@3m2_gX zFcR}*nQ?Y@ON>%(WQII5(GE|JcAACO+8EA2hV*hiRSNefg@J+4^PSz*YPZyw&Qz1b zR^m)zEj_wiW$)ciYgmrfNrj~(9C2IiXD`wxZMayAo; zO=x2?Ld;*>wLVz1=ga$3@pBpZP|oYiY~L?0EL)q4*1-7q$$b8aiHhg`_#rocg)gq1 zo#I}6(m6P>(9GYuZv6E9oWFbYusnV;l^JtZP4oJOae46oC%&LnFN_z@rhg!1U#lg5 z)R<_*j(9T{*<|5PnO|BBx@BFL(%JoEIZfpF#(Hh5#(8bd&<qRck7d$_Y(rQoZ7p;w%y4@DfmAjOcIM|- zMLQEn$GD@prg*!xvg0j}jT|1-a=vC(Z{1%g=dAen!3)Rw8(a4l)*h_uIpOKt^nPYw zjeC2!)fu*q2KoM2e`9sN+wjv#wJ;Kwn5I=;EV@!^(jWE2f-m1UcNsNg&|xJ)kM-=( z5sbccQ{)0&bQ&#N6brJO3w0)Fa9-%kGHaFnFv*H~7)Ni@Y*Y&e10s8y?>I5?b045V7E#!gL=O&7$;xGuUz$<#YcHseDH zv(elLa*DulkjeB?f|L*dgOcikR-tgluD} z(ohDZs_7eSOiQOlXQ$TmQmMgsz3rP`KJJCP4|l}O&}h;!41ctc=-yv%Hq8ux(cJYC z14sL;jrm3>4NS>*ZdPOY%w)P%uh_Z4snqtu!zwpg2m)i*FC?-@T5NC|y^{Q4F&T)QAFN|xdv$nSD z#YG|R)X>6;d?GJ5>H?>;65F;sj@gysE-NVkn@+daOh)(Peacpu@z9nIsP(p}F!^j_ zc^Ca&E@M}lfy-uxlv>M-rKL=)_`y!#!a&lqm}aS~_Hhg=wQ5`}9#fTY$5mM~p}z!msTJ2X0>6XH-o5mlzcOT6r~thUG5$V$~$ zkU(MEUl*XLc93;2Y< zD_utQY@=z%xfaI&(48{>V?2wlT;6Dr60ye6`CM-L=P z;#kA%y0WS(Dn=a$Et}vuuPz=4IaUI$=`e z*skNVl3|5{#MumQqvVN-1gRb?ajvf$9xug2GYI{d%DUEWR}LjjuvrU-Ba*~)bYBn^ zoK_ePk8_pKlT<#&nN6eX2v)#R=(U*2yJpK08BefWM`sfX8zSWru_V{*1}2l}>Xz^O zs+!KRrfphIU|6gy#8r;71Bq$qW*Be^uY^M2a5CO)kjOk<@LZo2;vvK7x+g0Nf@#<+ zD~Jro2s{^>x*f8TilZ7n6k?(m+SP902PzZ9@Xjw_Z{0Cj-frjtpHHw%C@8Yf^?cJZ zO-B+#k5iKhj_RF20H1e3D~zNnq92L@E3$rIcK{MT=(c$;i1VJvhZ65Gg44mKylfdwsNk^>inQs}_LK6a8>>=KHiZwHQ~F{0uHUc~^?#6Y)sRuVNu_WtY6Wg|(F!V$&M80q_ z4z?Q>rfvE-;9zYt zU>GgVIKE?ZF+m8s9qg#YWyZo`S3)qm9UJ5#dI&!YZ}_f*!lSaG>{`4Rik#zEp1^XF zz}UXPD7@$Dy330aToIt8atvdGibCI0`GEDhmJA_aESHzWpwsTyd{%J+)(sMIg>wzV z@R+#RZi6`DD$m;RD6h&ezlD~72Wmtm6&EDNGTG2${7%>OLwkqO-jvD}> zI)uhm#&aD%a6AML8;NQRR15~>Lz*!a3}~ekmq^6Z90MHdVwr)k`#uV>-rAE zy6_^$i9ClJWHK9ux+|i12(HTr9FG>iV{xoVEeIb3EC6olzyOaF2^k!mF?fpwX~PzT z0itACU<4rmw;Mn&l;I?q18;<^YkHpJhYS)k@E~1^2@FT~ERIk;D8%w2fGaSp$ir@% zgfTu7lR_{izOxME!hDB8q7YcY1B`71AwUVtIxH*2yv22^=4M474M` zL(lY?(DwtDgD3`t08#f%7YQ41F$IdC$72QXnrrz8H@ZEvixSe!aXgM?xX^NJMn-&W zhXKI_uFJ9_@MR%Y1d#)4xtxHrwjkt?a6Ys^I>K+*C*)-0uWMpqh?u#kEMPm1BfF_y z`eY#&GIj_|^2i_h+i{3bRBRtr0Q3o2EUX2VJlMne$ZAOyUCXpNuhmLQ}a=$U1qJMu~8Y*bKI=6&BXkWCB^m01x1baaa) zYD6sxLli)`9dRbyf}A3(ApUSDYPazUC zt$+zd9^L@`Av!Mp`~Wm^KK>Sf+>pStw1N+ej=`!Za%hM+9G1{avB$?1-?q#^R)xUU zEk=y1tY;eNq+kpFioh%A`%qap4!{H*0S*Fk$a5q1gUcWr*hNMHy7=M+c<~|JBU=O& z2UrFWAo4&jVg!R77#0WwR_raKJ_A_+FA*ZZ-bhIl2u_6#mWe-_fj&IsDUm1AB>=V| zAETH^Ne<~A2!!#SkVg^$79cZ}X?V$lD>$r$(9rQfK`c*d(I?|rmWSEM2uN0y$d%N9 zJFpX|#8#Al0W#00T!76yhdf35OtJ$nKm|qSupB2)mcRx0=PW=8k`zz|nE{vR2mxsT z8|?10K8t<>4np$ya9+q@Q!oG+hXt%6QYSG;bJRbi9oa&#f-vZS4Y3uVhs;A;js=K% z$OBbqRmpic?e!oSeGWPk5H)2I?pf$gU$6-}DB1wMjE7wTKV-82!^yiyc@`W_%!u`1 zz=)H9X3Rrl12%y@m&u_NC?7|a3JqW*gb3tSIYMp+@mc!&oG(+5?6|11}E1p`zh z5PvMhP7x|8E1@RLfK{MzT0s%QI4MPSg*++pv!7jb<3&9{W&5M*0d| zfL_NZWr$J*iKPY+iGwBqfk5j*A%r&qAN=Maswf3`CkGCIZnzjIr3MG!B&CqA@DaJz zMT$@Yqt3FFGbrjkBqG&>5af$Oz)`fZnxGe;%@9yiy?{72;&?eGWP1cds@2dQBZN=H2x>;9f>H;?8@f@!1jb+(ff7pK3%wG+AD}A~Cu{~Kh_}(r zk)L}ozy!Dv{Uo|0cqXcKq%*7nUPutuAwLj2XaN;yB&yI*0BO=2r%c5QDJ4!6z-TU3 zQvv{j;3gOb7s61e2&EBo5{!Ng&jA_u5aMVa8X(}1R+8typddu}iBtp60Po0pN*iKY zM1Y8hQjRzPp@?oF0t%2ml*@1ziG*g5NJEsegno3CkxZbKK!68i5G_UJhpuEfqC@e; zI%>#}(!dI|L5>luX*b%M*qd-0)ncMYd_e(3T2KJV@aUH&L<6)B{D_GpGnznN#WR}O zTM_As89*WMicxqSt|DDY3mAv#04|b@0*J(jjG=fU{urmn6fep-OoR&wW5iDI7p#LL z(LhjqF&onm3=&T8BI=4vC5J*O3=pVjKXMD{z32AGR49#IKr+}Ifx)g32}4_|C)l3a z5@IoE9dRuwMRA8ii0-f@nU3}t*^J;)IHN*}=g^00a0&&T(NdC1xC&?uBS+)? z1LTN&0{b~2D6$FMh?m9yNe@#|Dgsm^_$cBI3KY4Y9Ml63lmINF&4{H4oMa&QpA00} zOCnB_(Z*4iYgst$z-a;;fWtG!HEmqcF@ogqhJ~&gouxqC85#+YAebmX?MB;-YCtw% zL)bt_hp`krLVx6M3M{z;2|`{*PWEC*6@}UwVkznu(AByif1I$OS>eDO=;}gL0ldoC zKFNr>UNACZ>r)Y-S6Kj(hz5>`qbNaL5Gt4wfkl;seZ&HY8DW}aMx_aWLOCEHM5R1p9>f~! zi8mk%nMv-410sAP?Z|9=Mu3HEcm}?KOv)Sb2Vs*i3(|^~;67p!>`4g)r7%EB(gT`E z350dju=zV}EAOQJAfr`}3>5bZ!Sfs>vH0?Z>> zm`D#u31~+ip%qaS$Y6Y--i;Q}IB5${fRd=yiMH-7!1LaYkpp^mMZSS@k(LoiDTm3q zd)kqgseaRID4q}`sId2Vj%W{!5k&)#q43Z+r9Cy@xR0JAuOnE}&IC_Pge15N)JivWKV0$5f5h!JF=(WE3>op5PlPMHi~-fCYW*l~PJ0nnokhXRl-uv?y46=|*<- zbVNCTohb7N3a-6PaUZ2A$%5_}M_Wr>SnoO6M!Jzs6oww!$#lYWBt2^UBcD(|5lxDe zB!!_bh8|raO);Uj85UD`N!e&`f*9!>;lCGcj7KscJVHf8*^zNSvm6umkQupV4<(Uu zv|Ud}@>`?@xd!Vgem&))I~v0eee_;)$PUbkgwvHCkn&N+;2ts~p@c*XN6~{(QIsN% zCCAV_{PeD5ThDDarc3*~>L1dZ?AN64e-_7;$1DSDJ1 zk>3dgq;zzT;Yi77pGW&WGLB;OGnecc9J%R{GLh_P*PbwP0F=Bq%1v%ZleVh5mJB_-~q0^nU4nGJOUSPqqUEO&_E<2y5e~>5RLrY4v{Zu z2a@^7RTPgXJUw>qxva;|qy#pict$I*Es2iIB>}XMG$2)a`}IPDS&?GV6^kN6NGwL_ zmp0wgVo&(bHl>OXxsa}rt4O)1pzUQ}sWcyYResrBFhrX!)M5 zk%i>8$RmUtQjS6$ef`;IFPJ~O{f8ORHyZE#!oHr4JyoO4BHjMMgh$W+-|IixoVJaW z=#B2(^hWpkbtd@smoN9M+-lzosKP=3#6p4q34#8_#Dy z_rmYuSL!s!{qOkix1JYX_#8&P_}XuM_z!6C;ZT^bcH({UV6$qBPX^j)KPY?E;6%3J z^WET>>Sv8Y{$~B;V~@_b-s)R&w!OHs89x$}u69oDUH!#5@u{zUZlG}CSC%upFMsK3 zwdKSzQ&IGey?Qwx%s5-CZLToC652bl_0mhV zC;s#+2gQxsTgA0}tI!Aza`SK9&Yaj+d+FON2fpzy{_)=8FJAhO{wZdFX#tvQm@ zTDaa!oczY0JS+Y3uU@N-4Xf3~`G#Z0vP1m#J0CX2zw|HvU~c25KiiILM%Sxs)vG1( z$Z`474?pZ4`jh|d%j4VU-`R9cZ!ooX;dX~hOdp*wmu`M=Zb5$ZPyXT$_nAe*Z{Gdr z;)1p3%wGNam6FP>T<)Iv=F^EA-~ZW8`rwI&j~zYp@Ic|+pM7LSolram9x*iFtGOS#dt;n6UK5PtMiGpZV`Tb8u>Uf?t07Z_gJbiBIpJ3oicXhYQlgD=2FZsrBKsi%*e99jF%|LX1d)6X4{yRm(9^37lT==D`8HG1Im6OSGq zXwBc*%xxFi&4#k)_(bEaAD-{d93AXd1Cx8ll*Lzma&FZe|J3tOojH9#UBCR!n^)^@ z#~XV1%<#?s@PE8&KlsSFDvcaFoY;EpyT4p^qO+fV;hBeqy^SkZZY}2ZPRCD-4H=hS z`=}ZoPD*}!?m)l0dg0>Tt)jT^voAb*C{n+D<^4B)v#{Ps9Dd@Vz{T(Xd`%nAD$4ko zCnoCWfAsPPcXQmK7k~eE9*A{rzyI#L*UGLE)cPhe)%RY#+U=k27o5oSzD(_dmtVbH z$((%Z#Ga`G2LiWW{_dL_ExjYmJUY4gv!C8n=Z5tS^MU7|9^L%OxBljX=J<2}VvFsf^5E&%rSHD7**}{V<-KQ5CYFBw(>JeFQfL41?>#b}iL@8qe*OKW zYR65_4ph#+w;3FZ6&9Ma&pk8Mx_;r>O0F~Z=@*{=^dalQE3aPOtZpxC4}R*A@XGZa zPha@BH2c*T_Zzn^UB0o@oc`iho__d9CU^eawWU(C(i%KIS$zG?op{z>T#A3;kIwiX z{qmhPW%%&PBhz!I=DO!ze!J2?EL3zg)S6%D4h?nYb5k!oJD9t8{?baL@A2o)9((j; zboJ83^+342;||WI3sCAzum=ia*^ocYE#zw%^i<%4S*o!adc^~l*{ z{FQTe3tKlfhQ9jGzObkM-cR1RBc1;0=T99Pc6P44`qr&xbZBI9A};tw;l_on=@(y^ zHLt$&(P}eu_IH2x*<=3IEAtzMQ_FQn9_+8Jtru!-xBrP}=eUJ;-o4U1{-^)qg+p1V zQo8;AxyyNe@X$VfJ!cr}m)FMs=$}7szy8V{A$#!1o_$BBy|pVhT56DM83E1d)(YF( z_P)=bRu*2rRN?zheCZFr{+RjtkKS5pHX5zIC!QIp+`RPhmCfjrUpkQ}&0o8|sGj}W zi%+I^uH4+*T3%eV4<1wVdNR{pE=DFth4tHIG4sgtPtJzhYm4ivS1;a@A3CI;`&gb$ zH@ed&Mw&N1S}+d%@&Ek!*sWi^U$BkhwX5-`#y|RRmtwPniT;sL>DJA%Hu=mSzc}sQ ze(mLV@=?hj-X~u@m(v1XV0I?|^Pg=D9z6ZU=TD4l8}I(`)w>(5y-!cyeRFHiiD5Mv z-~8ME>s@dEm;d4$Q|8UL&V8`qntuOO_pP7R9yoRA!Bg^U|KYohgP;2!|8Q0@ufF`( zKVIcVpL|Ap^{=j^W|P{my7Iww<ot@{uFOpa1BZbn4Ikr=uC`!~go%zq(SLeZKE!->yA+GBthN{PoM%{XJj$ zgA)^dTd)4~YO$R@)Ay^tywbmC>P!Db{qDbdxqaxXUpjI6A?vmO@_J4?bY$hy7Zs^^Tm4hv->W5YxV3|iJ!}U{H0wW)W%SKh1TN1o1J_};tv-0wV;9^bFt`Pr+B+@sI7{^NI3FPN@KDhSN?|)D|IxBS}cYl+YP=|BDQzH9&S zU%%$fJp7qM#f$CP(Pncvv+~QAFBwPw^v^%HxB1Qwe$^eBJ$<74%DM1Zdwco|<2Szd zW+Q#_b5A_|Dd&g(=bQ2IfD-GjyF+6MWw5`yvv})Pj|8;jWdHU@>zwS4|Iwd6=G?vX-WykHvLyKH*X!YI(CQoM+_~EbCm;O! zH_whV-+$>RSK6)Bg4M41i9xZZjYRadrKWcJYfnw}hZg?Z_tvG-b@{Q0<#QVme~mjf z*SRnsnm+X8GiPTiuYBi?HM70lNocu6V|t$&cwnyf>Pz!>^pW5H+97HA{Cih7+m%9i z#GYRZ&&GC|!-MAPTBB|6ed?i1$ljj6HlHsy!s8jfvh8YCsVQ>xJ2zXYN8`bTfuPrZ1+u}9{ln>!DlvEKb4S6b{Id*QHTUH|LvtUUO; z`?}KOUyxsVJ36*=zS`IL&9bokfpz%E+%qqp8Bc`@*Efsr{CIO@(6_p!idetU`SKq` z3ZnJ#1@Xv3Cyz~bZ(V)wwG~+}jDG#gsjAsp-N`Rk#vkC<^MY|J_t4j7!~4e9Z#L>z z=Y^n?eKfN$Z@XIsF1`2E3F*?+X7RfJ)TwyiKH>a@a`9HBZ|K11j~A|4-uai;Gou4z ziTZjsIC9|7l;(T-Mm6l5d$;CVkrW@A2$!V6sF>ncwjH}285tfMv~xRK)pjSnKV;7A zt<^)zA1LXMF3645sZ)~n@I%>%xtLR;A#QoKwRmUr0WCgm`+J4!?Sbl&-d?V8TzE7r z#s`wAbZl(Dd~HWvInPN8+=0gCc;Ko!xg|W)UzwfSHj>v~X-|i^nURK{b+tL}j+Crd z&F!4iD(TwPp}9S3O$t?8Lc35k6Im@}Y^UceVX)bbR^5TM>!Kez9F~X6jeYh~vVA-0 zTu=9xMo*;%2ld?DHAfH5de*3Ijpi=cMpM(>v9Z&S#lw|1@~!#d1GnlEO=WLeo;JGN zR-w`yn3_0{w5ylzv~t?fnIkiH)cBxYy3w!Q)TH7}qC6Vz46EVUZcXV5TW{)4{nUhc zGFm+DFV3$1TwS>RsZ4#gwK3IQic6uR&Wh69N=*+yf#A-s);Cus_w0S%`_Nk67-=ep z^5)pOH@qF36GlVtZ`Ll?l*sYvO1(C}nKysu8wd7s9~Z8@?blmp2dv~$cV_-h;n#M; zK6@~7Lh+`&VD-l}Vc98H2gUI-ic`Dn4#=I=t!laBj~^SKJrHc(xv_S))!(PDZ#RT& z|HMdmk9ISEbA2G+9$9V3%?GB3PBlt_E4S_}sI^YNws$mhpj_r}ZC|)^Qu1bsV{`RM zb4{Bst2b(a;8dUBNYW0+HHEE4{bMEWji@81l6~bj-n-}x4IZCSa(6k?iiY=b?_GX# zGZ;BNotfHLZWLTQptZHpj3Nn!d;6|h;ey7oK0S1P$Ga{lnTPvFg?#sJ)0f68M!b@W zipiTd*H*%bf~h ztpvlNl5gvw9WfJnyuan#trmA=)ES{6S&O%7O=To%n}#Lw!2vB1YgXnr?UL;W_Vs7N z1zY!q`;rcqs`8<{yK%!Pi34gVIymSyI*|nLR!b%?WU{7USR<~!1ngq9nT(_ z?T-moMJyEijJQ`+>zY%uHu;J)TFD4pCT|w1iZm0OnQThMd}&^nxN55-j+u(k4zF8Q zBgG$#SLM55aaGax&RLCRx3yjsCbQAp&7JmereD-Y9IbxQTr+%kU*C|mQTf;vm0>d- zkrQ5&cgl;kbvqdiHI1h3%88Qebps{eu%hl{Kpv=ym4des85y16%vixGFrvebuyNNCLV@JyKqlr3MmrIW zw#rJr*pvPD785jLimvxvHOw1bDw5%8U$XiYj>Z z{B~94!-3S4C>D3Nw-Sl{VQ<17R?Ei6rK&s`9ky_;?30u6mQ}6fis|8fdy=uMmlx{? zk|AFh6(ijauZN2HN^3mRpOB)ixU*8p1w2Pfo|x{}n#NACr6=MEt2n!2bYgE39?-H2Vev0(&`?wjGNwi0TU)@yn@G(BvVw~essdYlvyBNE5g94};* z+S1IxfY#~ctGeTd0@Z3qi1YQXsYHU2%vf46J*~TZeW@EAOlIAj8tac4#rZ4Esi}Ua z9ZicBfls6yyIRiIyL?cKMAIR?m)D!pP$JI}u89 zqFyOpsCMH)Z8&i#BDJb+r&}zp1xAmINlMpS(sKp7p;hYZ@u|s~s^8|jRoCs~JTo#B zH}bA0NnB$yx6_sS#)F)`v$JIfvI8Sy;eNM$=W3yn;**I$y58J&_;$<8q%%#u>n5Cl zE0~_riSVvo;zG$_HCOFw+Vp^KY}>x*H+V0r$ti6>Y}!_Sslo-cgcPvq+(t)~QbHuw z7x#_4!8<}AGoI}fa(5bnoQ#CDNT5*7TOnhJt8uNAmKqJFOL{OkquSM#@>*Al4M`!( zk&0&1iwL8GNwurkoKxpHvz7NUfz)^=x>Kr^1H2aCqt%A!_lGhAwfvo$*9eG_P-@J! zYMq!e(9Z`4v3?YDqNG-LbSXVN zJ}%@o+R;o}EfiYys9+?xbiB~n=_d5dXk>4n%;6qr+j45WZz)nVu4SaIU6UO1?(n3nSF&ir<(8A*pi!B{+4EeNH2FzD2GxUrb5 zZdE6fsfn7QR%L6|Xd9z_u{6i&LMG5D*7948c2h5zld;Hwse`jkN4j3J^YM(UTANZ@ zu-$IWS(+C%D`{c)XfSpxuI=Uh;LVG-uT--kAsSFrkHb}1%Di^z+I&|XJ3bm4n~qtH zs$s0H+IFd4agXok2c`s9+1b<=>)}R2GR$~7=IfC}w4W~&m)9DW7u!D?*Z6SpTFy+& zar4c>4Ix~MP9^poHrDDZt7fU45^zuq#*5b+zB)0vR90>-+uMzy;rPBG-S6z=YU)^| z+AI{czF=T@Jg7NKE7j^wJ;LWKIUhc1l&1T4Vsk6`;ld?8xNh%H#tx@9w;S)h*Qz_C z`z9ua%ImdUuH3cNp?G{xs3OJdJ8o^+P&?famv6@9PG7VUe<0>Y_~oLod2Y!sb&ibs zqx<>tKw_cNSKAzkU#X|^x0Uc}b2`o)dI;oDzR_0eR;+bn-O#I%L*xBf0a?7=O+~kJ zns;j_+}cR))rKA$Y;x)PmD1V`J5;RnOG~wQEY_cl?|mfPjH<8#i73(&oTq|A8|{N2jI&#U0b%nO|9a>y1XZ%bz@@1Rp#g3;Rdh zWP0-qKhg75S3@$so_X0|^R4Mw_arR__XHWshu`C#h!=T6T)d@?3x<>J=*`i+&! z+Hy_{mH6@TJ&!y)hl(;>Xt|qLx4oVBZ+d;fvBwT6>VX+4b~w9L7MhnX)=NufN-G*u zdlJdRBYA6Yw&f+|+(JRG8nM1uBIr9xJm~OI(0@=eEUvK0M?3t`P)6ZHAs1Zdw{}cP zN{x@jYB?>_DfjK=*3=pQ6_tv-@MC z`+}96l(Z^+(_W#Oh;OWWieE1op-{_Cr20iGknV4nlVki=!Ki%vkvAq6&1|Z;oPK01 ztY-InclB5ROzd}-H+84Bm`hA*mNYphTH$a+>_(G*r&8WoE^blaVk?OdIR3&k9YXemBogiUn={;c4^|N z)5Cq!r=~mH=#YN-W^w!DU!H4)D_8SEDr`+Yw!beh_Tc_#WPq#Wa;1%xjl#}_H{QNb zR+EDdeCpWT{;9Z}7~h+9x<<8-&*c}-z4GJNZ+Bu@q@$U=gOiVb{i{=4WM0AOG|eFOCh@ay3sYU;bca`Hf%R zl;fRF;^^r?mmfVg;Ry$y+TUE0hTIFke7{h;^6_?LMp~E`22ug(z}dNwH+FPDF!+Fd z=iNn~MlZkpgkW|(dD`GaVGvDs-v#NSxP^dNf4jf3g%i>skXHA@$^cHS*RIa*M&t@Cf z7rUvHWyB|D_lCX1=tQ7wCr6_B^|EQMFWuf~SORTNgJ&NnA#z5A92H{LqP$2gZ}g7EU?e)XS@v-u>{SD{GrIIg}nsB(rIh zcgG*tv;TonsafvWmDQ!&+o*c4et4s5boG|9|Kx}#&73+k7!2(_ITvbIbwwAtyRhaY@kD%H1VT4Ve# z(@%Z=k?Fy3NNN@D+*!GH>HIq%-P+1;fV_A)KJ>uBslBuN4jh|F_GeQ8JwHFcv~cy~ zTbt#bTer4bj$N#U_nbU+cw%^Fc5-ZLd}=}{ZY^B7bm7X!Hy3ZO7s|RC5BDXs)Ns0g z=HPTx3igeRXr5)%?#|y_Yt+i6+|G8XQ{66lLo>tu*|7&tPV+`|&(TqRbF;9vu&`Pc za9=Qgd8z5}fk<|8NO6M0GczNZh^BG8qe)J9Veqt(3K~ zJwxe{!F14egF!*!yY(Et*l7oYIAXM{>`|nF{S&gU zWQL@|?S<{);;qeYduw^A70gbKjqZPNDjYj-@=&}|5|r(?-`V1<<##T7;>NZ1fyc)A z_+wu>!SmBchYB|eAmVB%{~gSVIOV$}@ACJNDVL2`fAvUB8r9 zoUPkS1`oDq>bj*RqN$;oJp;)^P?ZHy(6=`8)#7T)=A}lP<4vP)ZaNi?XM)|bpHk~( zE-qCz>zrHJXvm5f%nk-S4Nv7PHJ*sdzNvR{DB@gS5}Oq#5^8L^*-)z<7!Fp8d|Js@ zqeDs!o(fi4O1Qn$9!#}XI+G*S+m&ddx#3sZIcSbkhoPXx7vEQ<>H{N*S3}lrt3Pfv4kI-80PHk+(5Gc;=b03+jnwP~=^NrpPE@Ry`Tm3!9?W{K=b3fe$ggj;TiZ=F9g-#v z4ayHzmaLz%?rq3Lv@ zFXFp6q~BehU+OBZ-Ivgv(Ss>r;#jKM4OcI3>6`N z!pi)Xkd$g-zX%D7- zFRuIuxTlbRGOb^!fmUDmqIR=w%~?}>O)Hl$3f z-R51+ueB6ecT~qoge*zU?|8NujtipZwk-*Dc{m>Ps^zxbsv4e+TLm{D3yE|pWvp2t zuu8irD@~KLm4URDNSJlK-Y{BqI}rh_97U+{6B#!W7a~rHliIGmQ}1k-^tu?8hGubG z2t{V%?QWyos%#Z4B_vvwF3KIHpYJM0I}%poAzreZ9bNY#*_6!t4qBd>Z+DjRoR*3S ziY&;%{{B=VB-XbJ4a*nZj+U@}zgXAvbzaE~XrW9<7U~_htLwV0$d;5+w5-pkIK94< zYpvH5B|Vx6t7;eI=i~TNHwMF83^#2K?{=-iPNBjZ?npEg?zo*Dy;<`tG253MjHmX- zU9nzjZRT4QgU7kF-0r#xCq}itq!^7TVUCkH$+nD+P%E^Jkmm$l&uIF#6EKZ{5Dxl% zeW{_a>UlzbWpk(A@REZG4p+vgv`s4Wf@${mNO~Q z_x$G0!g9fjgopb_N5j0?GP@lmGu77@GICd!bG2rph59*>Mpvm`bR*i}*rCawP+VWW zQ?WTAG%&I!*}3)M{JNuLlCi;YB+5#yQqt8-dTeSmTwh&UxRY;6$>DL$_5E(WQb$iP zk?9{)`S#lFn`><;JrZeqs?@D@tTgJQaMZE8zV3ADri5!o&+h7-YNaDZqhUp`ZG{(1 zmshlSzliVd97%S(j?wMZt4(Pzo=D1O-E>SBb_=9Old@}dYo$V^rVS6KxGBq%`XSCnd zcdA`W=2bZy@SEL@%Qtd%ES(t{OiF@dm%CPGYNRg!W38{P6pOYT3W|~z@r+`#jx)ce z2y(nHrAfJZlT#&p1um(QU+;8LOUqulrbL5Ca+(kmI9HA(`K)#-1f@SStQjTT|A>*4rr}1} z+PeJFhVENpWUN0RJDpmiEDubM_4W0|+Z*$@w<}601g&GC`quKwmN_yz7EK@zZ{1#O z8f-0FLIos zn6-i>21DVn7Lmh}moJ+^&`R6oRNE@$w%e}gDw)X#Mq@lzsFgiY5xGz_?v(E?F1xD2 z$U}j$qDoiWP=(nOI&TI-g0yw z_c;k%B34`NP&AWFh9a_6uT~4Ca>tZyUP;KjBZh;?2)^&I{CeGXoQ7=%CC)*-s;;g( zj$;dsBBuJXlGm=AR=|yE8P#dG^;)%P@CgZbABH4Y^{&#FNe!m^6}McgG}~1{YIJGn7#5RtIF!)eV;qX0u`6l|sJl`HJE; zn{D4U>RryY9ZA%p5fpU1(J%vjnHcu27di&-K}uH;EW;Ho59Llsl>-6AZ*>(#78RA( z8y&OVvPIsukrk9s(D$WqLJPo!MqPJ!S>$nz*6DP_pdvaT7E=%;P^%hJM1175ZBO7i z&+9s#*{$J5JeY|^aEIqgqT-2SI3}6xMze|?Vi7>Z!;Ln+(!f2CC@4PH?lhZ@jHpZX ziMT5(>V_Z#{E?W(o6T;$Q|;JFG@^;nzf$iwh&$X6#+*j2Vc3oujNn+>YL@FpARHD| zO$`W~&r5WfC@Z{ax?ZcTTlfI~M9&ukQQYMQ)voRZG|n`wcB^42Vb!YHDv%5@I5`vv z$N{KTuQuwPmd|^ls_>TSh>GjUslKo%DqN@9bfsVzx8t6po4jur-L8o*SX4b$<$;o9)xnyw4bthl zDAZA7aAGJN;4Me=n)R+42?B4j-EQeFhcDX$Dh|A@cGt8eQI-Rmh7=MFYf-?cS+hJ> zcLGta-83xI_dH7tX`w_qE?b6a=@!aW*U>w;3D+b!6a_x9HuT4>F+gtk0>sp0NmG0Q za@ei{hg&w}bvV~i6|%AIIvl=`3Q0b&YqdJ24O9gKg5z;^*DyU%;1pHl;TRr{5Jk>5 z;91mDq6BL3Jm@C+f*K5B1CBFl<+kPft}6#68@7mOvJ8-jBJaRVmH}t_cDvFteP8X% zL=>JAJWnx@De zbQFEivLtwT>~_bOWr0VFN-wa3uLOf04vhE{2QeV=;0A?ra71(j3Gj6RWqi315+JqS zF#SMC_2mF$22tCF?%0;gc}Bb4b?|4Zo}_BHWC&;hO+h{6Dw2c}2Hu20Jm0eom=ge! z1POTbx*bkNc*<%30j0N^)q2+vWg!ql(2Bm}cv3(`+5;atmMJL$XCbm$UEl3;T1Xay zLG&4x2kPTxfYtUrN#=kezhm+$qSNy@&zEqH@l4xuY(ErLIdFnxI|A}V4W}4c(G(PJ zZA(D)1^Pq4-i5p9;PpUzTk8_hU*%@hYvuY z@)3EMQbL3((7}e@9n*Atmy>1J1Xcx(7Xv}~(s3{aQeYrXB&Zx54#gAaaUAcOwtx*( z8Kyy&!t$u8cz71&htJuL2VY`$&(cvwg5hn;lX#dC=|C zDDQ?cwBYS-OScFHB4;6@JP`qgn2JUb50lB3rujX#bZ?u;yQZE5;d?VA^}#l z@TD6iY*%j*#k#2bLf}vzQDTeXXeba6sG#n4b=&9Eh~~5!uz9fb z?V1Qbs+H1B)A$5Kug53XAwW$P0B5+(uO7ItI3IsjfmxL|DQP0hz;U@DU=* zc0{}$L0k=Py-_U5`Z3f z3YOxK<2w%Qg256B65gj&g23kxg{I*kA5v)8mhA#rs0mb57hosE1~Qq)dpO6U5`non z=!u1)5%>ZLMS$*})ukI13#B6#li%(lc%2+n{4M_C;cGhO%_ z!G(dQkBwvmn+ywr;RIF0?KWis6D26jiwFBbddPqlI1K;-xR8#JM`3SpD*2MfKmZv! zfaHB12@OPGP#pv)QwbQtk)Owj3h5bUhnaya!9i+wY!EE=K+=K}VOvzb5R|M;4CPhd=fRPY{M1T~Aa!f^SgZ$2OJnD0-1Sw%MY(${OZUWV0T37|(As+r70%q}% zgSuc91Ti**S+FIjSwbQOpSeWJ#0!W457F#HMxX`aNMs*| zEniYmej%D{mL=g&kQ8p65aR?LHIWP*mj2r+r5xl9U0Ghz?;2ii8 z0EF(~e@fV3BLx))97ic1%Rw)M0Mx~`DN<&y2g{*MqjJx+Dfp0~=*&kZKqTU{hnfYp z09Zv32H}&U7Y-&i1c(4d4-z3U2|gA8n*}um)TcM0Hc>c14#oqIFmdn+ZmvMhBoeU{ z+(_yPkcfPTp`b}(avX=q#t;VTkWC;0{G73c(qj^*|U=&FLwc})phKWuzfibu!W-+5`{7hd?VPf-+ce;lKim zz{eCM2G{}C58!x!(=ciiiVkoh6tGZZBC~}MPd=5>ECXr4jtedaP6Y+j0~3OLOr!#6 zjg4p$ibYL>*O8uarbQ&9R1km^)Ljm2h;oY1fy#u(DThusU6T~>;X)881tEOuB9H@A z$idZc5~yAz{9-rc8kBSrN*D?q)cc5b@D1`eJt$M?YZcC6fq~+mq7LgJ-@+B-8XWp@ zG;$?6i80L(CAcO;Z7Dk4b{on-E|l5CDWD~+M+Z9ula6QtjUo$!4{;YwMKM4IM|Z*5 z05=^dK?A@hRhNh>ha3UjKqeA42HSyI@Dq14up{u?gET`Ud`f&msRsb0SOifZ7O)Z# z3M>NEAU}Yh_U<9#+n+xJF zy7oW>BL$$m!{Rn&62uloIg^5-GeF^qs~-{q8UTL`Sx9k|aS;n5B?Ag6&B!e%v6Tg zRV@Vc(CLD*14RJpS>iEp5S{x8{{R4R2~!d|5&2?s<`I|~v_-WY%hM1H%1}3v09b=U zhE$`Bis*xW9#{rBAAX{f1t|;}kwg%}lr;fGRJ%kfl;z+4=;spc*G9%KVY(}1jkeGm3WJ|0JK)}vWkjg0R0$J!B33F3qBlZbWa0m?rlYq|2 zA0!XK2?-MNkly%3d`6dFw26yw!(oc11Mn~g@h@r3svjDJoB?eh86lbJ4Jn`)k`%d* z5)M)bk^&X7J+ISj5IR($3_@v?2$oC@c_>4`wNw|8x5%KFNVY?hrC|ac`)_gaQ#rK}AFr60R~3%FH_0jYJ{*kl!dUz`jf%Sdq$M*v4Y<0T5tG zDkoqZWIF%_rlLa(fsLXc7-bxd9zfrweW@CO;{h^C7*Gu(usX#eX-Y05_Yr}h3$312 zfJTd*${6wgtsHLMT zxE^;A`l ze2tWV9xCN<^+(ImVGR5B3Ja0XAv8+6{+4N zZ^4ZWvv?)6L;N1NF_;u1OZ8lhRqk;Fg%;U`Re6K~iVLy~^xQQE3mMvwLpKhp!lZxyBES#^h122NERJH(D`B5xvs$y@L(QYb|WIU71aR~8$rkCq~HF_2>b(ggj${ynf@?5^8) ztxVwn7XotZJWghWGawq4qe)~Y!T>~O`_nXLbx4J(&%tq%2@1m#+Tc%0ZNLN~1}gLv zLkHz{#6IDGJtQ|%3w=Z+FgUg(+QmN1*F-p2u;&Q|35;aMVHWFs!t95EPpp0z*E95llrnd>0`!iws9%VH^wx zw9^vMfW;o6m{i8+L`1v0QWsu(%8*}37|4hsj&Mmj(I>rU_l~ZbSz5qC1OSNI+k`BDXBPx)ahk+}l#IsICQ*9EBIhuVuyuFQL@4Y99_FKQpM3xW zTATTeat($N7#Um96yh>MF|#H!4s5%S46gfCzUuWSx^g7OQQka&k#prYM11s9Wz8Kh?cV(K1I(J=UwcA@Qi+At?F+3-etQU^s1 zSr?-S9b{3=Ar=sL&QjEM*&Z)yPHE`LP{$4M4ntw2m%Kj5O3-OS*OL^>lM(9r}`h+{IH zq)=wl?GO#4Q!8Ee;;xWR&>%*#4NIvwKJKnf)e@CD5CY0jML=nzrvh;dMN1ENgbsol zF%`YS9lMH>=gE2ZqKuHmEC3Jm;+yG7o+Zo@dfQB`&SV_SfupG?WOzpHhmEM%VZ|!N4Z|Z#qNLkyuV7A516A*n%o16K$c3NwNa49+Bhzzp2%`iy#d z_@f-PiwBIO^i9c^%*K`@5K(aSbfKN7wM%0dNPOLkFUU(iWSl_Z#@s@#qBjzk^+6lr z59VJcKd}Uhxn2L!cC-jF)^7N-CM8&Oktie>LH?70Br%hc00h-YWM+TR!M&Yn4y{3U z>@hc!YF7xD|2~dLX6mDXOaZ0?y<_nnR2e*bACr3c$BclPJtNROjAabki(ZJux@aIX z3Phpx$sn{d)?f{`0+X3~7-XOeTYpzB8p+bgeT&n`dou5eOnq!%uWuJSv=t;|=3x@k zG$uc-h(=HCp5AObW&>IteeAh6@ScI#*5uG#sh~Jk={0+^nCGDyO#=1qtll`bc+WcIYQP;^5!*BAu{?9yuFlMZZ24VJ_4Hy=u{CyG%1l6t z(!8D#c6VdeA~|}ikd5)6LG(iTofwfdpc;i51g0Y+*_c`^3R!d^Bq`Zpb)wN8!l6MA zkW@E=Hn0Mnr2tM!V+`(WJ$C41K7)kJ&%Fl3=vjyPyk}qNbze2o3z7p?Y#iRnE%$yv z5oRpv-L>AXGng(!B4mE147rff!)_VU6Ou^}15grUw8x_G9#t@9sEbV^L!p6TJ)NmR z%tL%dHY9$bomk|Oz@+GXbU;gj8;f^}EP^SFy9*prvZojMX7^zprx3(w<}@~*1uwJD zecO=@dTJ7*5a^h-c5~vcW<6g}QehG^=48ZAzJ>UtB~@4u|DI-arennqX~raGOVc<~ zb2s(f(`6S@y>Z|;lDrp;qyarlFZxaYb`|Y?${I8T54pRiG`vfyp-nUK)-xBun{}}! zne|@S(T?{`!z6|>6j=;BEFOCel55va41Q=ZJTu$SA?W@jyi=1_}4nDt;aw!}T@c17Kl z;GPy_fZd0!#@^Y&cw>X^b>sKF&v!pU_wK_aBh_~2Fu7QhiE?igHSpXA5q4y-p@m5| zjO)qF;6}h9by&~tIC^KZdT!`V!A5BI9C~ll`)+4@lM$Ka(IN?YqS6~FOP<~5ko5LMVtPo-S2PDMColv1AD$< zq`=;L|M_x^S?x~DlN(i&_# zHi^CO_E9IgcgNyaZ(wh``|mWZXPbMw{q{iG>yri9cD?2&3*Ofn>-2QP>a+pb;O`if zjU!Xt!%I(mEYHTVwMmrUvIm>QMA}{ao{un$*6s<96?*SXm3tPwCpoD=c3=+)Mq;uF z>~pqXPnMpu@lL|fu=^mSR!;$@8X7$U@9DD3^ScQF<9f=_sNG?|72{Z&F*|g*XACkN zo5c3HCjryz6VaGrG=)jl)1apfn?SPkr2IQe(WqUK*&b*x!epxT^d!Y7^zM6R*OtA- zc1Z;dW-~@nlx6R^mUXaQ*#0EIJ&Bo}cY}IYGPeD$nQ7Q3GE>hzB4onsI$(D`nXG4| zp2_IFr`dfAkeamg-|6YS|CRxI#$dw;5WBPQi@e)GE8Sa)reh>qmM!)FwaGnM*p8nx z?pf*Y3)Ztalji;$QjLL*`SX)acNHKRNM`o*#JSh{2mRh%lxg|*_UMW7i7Y*1{C#UM zEZw&n+24EW_s@Ru$>0C{b6zLa1p-% diff --git a/sound/direct_sound_samples/cries/uncomp_shiinotic.aif b/sound/direct_sound_samples/cries/shiinotic.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_shiinotic.aif rename to sound/direct_sound_samples/cries/shiinotic.aif diff --git a/sound/direct_sound_samples/cries/uncomp_silicobra.aif b/sound/direct_sound_samples/cries/silicobra.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_silicobra.aif rename to sound/direct_sound_samples/cries/silicobra.aif diff --git a/sound/direct_sound_samples/cries/uncomp_silvally.aif b/sound/direct_sound_samples/cries/silvally.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_silvally.aif rename to sound/direct_sound_samples/cries/silvally.aif diff --git a/sound/direct_sound_samples/cries/uncomp_sinistea.aif b/sound/direct_sound_samples/cries/sinistea.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_sinistea.aif rename to sound/direct_sound_samples/cries/sinistea.aif diff --git a/sound/direct_sound_samples/cries/uncomp_sirfetchd.aif b/sound/direct_sound_samples/cries/sirfetchd.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_sirfetchd.aif rename to sound/direct_sound_samples/cries/sirfetchd.aif diff --git a/sound/direct_sound_samples/cries/uncomp_sizzlipede.aif b/sound/direct_sound_samples/cries/sizzlipede.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_sizzlipede.aif rename to sound/direct_sound_samples/cries/sizzlipede.aif diff --git a/sound/direct_sound_samples/cries/uncomp_skiddo.aif b/sound/direct_sound_samples/cries/skiddo.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_skiddo.aif rename to sound/direct_sound_samples/cries/skiddo.aif diff --git a/sound/direct_sound_samples/cries/uncomp_skrelp.aif b/sound/direct_sound_samples/cries/skrelp.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_skrelp.aif rename to sound/direct_sound_samples/cries/skrelp.aif diff --git a/sound/direct_sound_samples/cries/uncomp_skwovet.aif b/sound/direct_sound_samples/cries/skwovet.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_skwovet.aif rename to sound/direct_sound_samples/cries/skwovet.aif diff --git a/sound/direct_sound_samples/cries/uncomp_sliggoo.aif b/sound/direct_sound_samples/cries/sliggoo.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_sliggoo.aif rename to sound/direct_sound_samples/cries/sliggoo.aif diff --git a/sound/direct_sound_samples/cries/uncomp_slowpoke_galarian.aif b/sound/direct_sound_samples/cries/slowpoke_galarian.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_slowpoke_galarian.aif rename to sound/direct_sound_samples/cries/slowpoke_galarian.aif diff --git a/sound/direct_sound_samples/cries/uncomp_slurpuff.aif b/sound/direct_sound_samples/cries/slurpuff.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_slurpuff.aif rename to sound/direct_sound_samples/cries/slurpuff.aif diff --git a/sound/direct_sound_samples/cries/uncomp_snom.aif b/sound/direct_sound_samples/cries/snom.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_snom.aif rename to sound/direct_sound_samples/cries/snom.aif diff --git a/sound/direct_sound_samples/cries/uncomp_sobble.aif b/sound/direct_sound_samples/cries/sobble.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_sobble.aif rename to sound/direct_sound_samples/cries/sobble.aif diff --git a/sound/direct_sound_samples/cries/uncomp_solgaleo.aif b/sound/direct_sound_samples/cries/solgaleo.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_solgaleo.aif rename to sound/direct_sound_samples/cries/solgaleo.aif diff --git a/sound/direct_sound_samples/cries/uncomp_spectrier.aif b/sound/direct_sound_samples/cries/spectrier.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_spectrier.aif rename to sound/direct_sound_samples/cries/spectrier.aif diff --git a/sound/direct_sound_samples/cries/uncomp_spewpa.aif b/sound/direct_sound_samples/cries/spewpa.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_spewpa.aif rename to sound/direct_sound_samples/cries/spewpa.aif diff --git a/sound/direct_sound_samples/cries/uncomp_spritzee.aif b/sound/direct_sound_samples/cries/spritzee.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_spritzee.aif rename to sound/direct_sound_samples/cries/spritzee.aif diff --git a/sound/direct_sound_samples/cries/uncomp_stakataka.aif b/sound/direct_sound_samples/cries/stakataka.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_stakataka.aif rename to sound/direct_sound_samples/cries/stakataka.aif diff --git a/sound/direct_sound_samples/cries/uncomp_steenee.aif b/sound/direct_sound_samples/cries/steenee.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_steenee.aif rename to sound/direct_sound_samples/cries/steenee.aif diff --git a/sound/direct_sound_samples/cries/uncomp_stonjourner.aif b/sound/direct_sound_samples/cries/stonjourner.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_stonjourner.aif rename to sound/direct_sound_samples/cries/stonjourner.aif diff --git a/sound/direct_sound_samples/cries/uncomp_stufful.aif b/sound/direct_sound_samples/cries/stufful.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_stufful.aif rename to sound/direct_sound_samples/cries/stufful.aif diff --git a/sound/direct_sound_samples/cries/uncomp_swirlix.aif b/sound/direct_sound_samples/cries/swirlix.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_swirlix.aif rename to sound/direct_sound_samples/cries/swirlix.aif diff --git a/sound/direct_sound_samples/cries/swoobat.aif b/sound/direct_sound_samples/cries/swoobat.aif index 4b15334b5a68b85ba612d90da691bbf966d0f0ff..c5b530b7144e7c9155387276accc5b85f63ba9ef 100644 GIT binary patch literal 18108 zcmW)|b$AV>dCv#&3^uXmKQHB~p~Z|N!Mw=%>)l43F|jNj z?=cN^yZ7&R1%*WvNgSIuH z!7d<7jF3}vyc-m8^T++j$|6H*TXIlT6Nn!%uq2;rbkZ3vH<3-SA$%XYFhcCwVJSZQ zMN3yNlLYd43TJ5$FR+Lza&dNPv~^t&WR!D5VQ)ef+ezd=(^nrX%2jSeF|9!tra_@j z@Zk}>K@zmSC=OO`N@Ru|t710lZ@WOt_>D*FuubiAKBDIFnoem*IvOkHi6};VqGU(w zWB=|cIXLl5C26Ru^Ttq+bMe6bN8fnJW2Wd>X}VZV3ng)-;Cy#mv!eWW6{Ue4)pJve zUj5JxZec4_pd|S+LUK6kf&|OV@QWsV3dI$Ykn_inB#!0!>LHbm&)=Sh{NgU22(_;b zef#Bz-|76>+e-xT>3>$hj;Sxc9+jL49_^S$QcvVcJ!|#fJeWz#o2q#|={oREUXlJIFw?*glc*#_ci?%sxX40)YdWVNZNPVZ6Z&j>Mu0vEDk#3a_J!n}r zz#<>IU!YZ0{FkC|+OiU7GZCnM5rOh+zs}lqItE3j)9ds9u|JwLK8g~(Od63#_0H4} z+So9G0wb1X^6~t{1oPnL=A6#9?c^~wpS)6%XlxnB4eE4z-i{H$D+;$0C-k8~+Rdj| zI+Z&n4!U6>*#duiD#_ntbDOPRhlA};_4L$^>+y6tK*TM&4wVLyO?tP%NTvZGmArHP zr&%>6T*UC<&itIzJ+`pcTVs1^VpMKJ#m45J-T~chR18PAKACHJHy_+2&z|FUfJ@~YC zKKl3Namg!Jt42ctrq&dKqj?e$bL7*Sz<|~Xt-W|}c6OTPi(eq0fhjrt$njMFwHvqU zmF7h|UKRA#={<>l-s!uSU)ovef4Y!PetD~TY|D-(I&`k&%JSS)KjY}tFBkUyrrdvG z%wgY9Y2+reTu%)?d?t=chD_F1_uvx;LPoxNu!MkK29M1KV-A-3S>_gPI1-LZq0-rc z)vI@(H&5tkECJCLe6}!%Yh7BFn_vcqO-IPOyEnTRXXPY{$7uEB{_bd;b!i)7f{5Ge zrWv00>1pu`di3Ag1wvqal0doTCiv|>o=i1tVeBHr z;YkFGs_JszCd?JMv?imCDhR4PAy}HV13Dtbg%F)P1J_?$IetE%eBJ1^Siqw95_Fq- z6i21wy#zL&Pmv{%9{l^>kV@+&`?!_z@mb)&@6&k<5)QHhe4Z$R@0Hiy9WVUzZc*1) z_gY3Zcs!G^v%YQh;DtvoqzXeKxMT|1WQ75g6IUQ@ztO%$l)QB@8c!Vg*H2xu(|vu@ zS`sga=D`O*D+`>n$BPqrHk82+iW4}tmshR+i7{(GKY6X9NYDNzjcn1p{PvgI%~N_0 zNTiTeYKvuYKwt4*#h!e>9V@|$3*eE-f}pTi*~Z|Ec2J5Kv^~#ymPL8Rr;a3$baEALr>kvvomlwp9&i1FUKg346J&ErlY$m+-0s(r z0)*m(?9^nLx_{ZUFwgQQ0>b3H;K{1TecR}f-zQS0f2dXk9?Wt~%p)`gJlr_AuA0=k z^mcM!WIS_jN_6x{7G-I6mB!dH$mi7Qe|Sgy;?`^8Z$1cLzuhA^uqTwL9;+IL2N+h1;o4&-xm%k{6um2t&+;bLgpNE85M^u_ZPPjr4# zfMa!{qhr&?qV_y%2Qn+q7jjm;k-5U@*R$)ylLzsuw&+8NjLC26jOCZ|y(qY(T^(+o z*l}x@7O^~i;BEi8)?eB+k^A$-JTcF`LlpZmoVUN7-Sa=C5#-*xeRG?>XV1ruU4OYL zJ5fTKz4b|>Bu~ciYCE3DQ?jCBVw5!#-h$o9%z>NtC(!&;toqtD8_GX)GHUB#E9Kq4 z9^`6mpv&eabEy+oU#UGPOoC9mQ5|;(C}9*jnv+nXrECx5SOv2|o8Dl?q!31F-_v-cN; zL2d*z_x*TnnMXIQ>3BRQ9+#Ho-~H)UXebMScb<&JWk=v`cxePxKtL`)1WRaqYhfd z^vS-7fzbtb@gL)we;!J_cqEkQ(vif(?(17+g{j`QPI=LX@V%>#C>gZZQ`{4240LFi zQz9~UR2fgbANJ~j>v)BD=E^JAkq@{}Z#gTna1E=w_xLIlgLfN>^hT=cw zAk%Ac$AUEXKJ8CD?Yc9u@1tVV&p*0~B1z5nc6ROA=np!VMpC^tm+ta;`EeCoOzhmw zI~uBJS&hr|UAT7Nk`uEyUUDf?`=VWt6{Gy-mUdtE_;CEuD7@0>9~mV7^1ofgAQC4e zHqO_%v6-B z{#lb(BI^EiE-_}aQIneDe68Abyv(ouN9zH~ee0Oau=7hFM7kMZWY@PHGZFP6}{6jokMg47-Z2mJe zDVFfvE6Tp~n%1D;vX~{SHC}Mw^$T z{jZP&adHzq)=jFJh})G2j129#OZiifA=~{WY}->ln?Ku+K0g|2KhU9?nz~2=UGikb zi@r(8?m+d_Jv6~Bd7>><=5*F2ZJ)%~bDDO=Dka}XBzU6l7~InR%S%)A_z?HRDv)Ou z_H`r}j`R-lX8){l(q>PO^3^rGnpEW|&vu4HMV%5CW81LhQg#@Y%R*d^(fxpoRTHAk zM5>h4g$Zoq4Qc2;iFUp>RKOXXP=%F}6wjGH`9fg2YZp7Nv3tvS7B6hkr)FnwnpXHi z#$5FxB#ArJp9d=_+aYn)R-_YFMY-q7-0Lc z&zXObHD$7^3){z$aEJFEtYz5Lq9wN3S+3c5Px#t6P@f*l(*rU zL6%9I@4=M_)gvuCk_2vN>qhiJsj1f}$xEblKZnYWtksXfZxzvZI(SF(!a8sEL#0d2 z%Z|76LOAMp9+jh9@7Yk#jp$-B6F4NhMHYdo*MNo3+q!lVGE)rRNM5+iNynSlKYuvE zd_NBNdO9&VgQnCw0-)ZSQ8=T-G1g_-m+0$Ugm^qn(}YD*%3Pgt>@O2Cm2Uc~aim=_ zpB!(oZl&c$7J7`p7CiUx)etQ{g=e8keSHaAUhTk8iyl9Z2#PBtQaaxcXH~S^8{)(* z4sTNO_U{i?^wLvVJ)hRFD{@SYec+kX!p$C^e9_FOFQN_=Y1>xyr}v80kH}%cs-GXr zgR>?2(FWoEoZuD>!)ossr9~!l9qU^nem&m}J|1@Wz2&uxIv^xEu+Ian0bH39i2Q?_4CdYsCMM(Cpp()rOvYI!^x9GxUb z8?QWTk9g~FOg};rFqR1e^L4-a#A zVVrl{$`cTlf2a*sZF=m-jj7YruU>hB*Dma*4A4CFHi zy6aaS4cZ}y&Of~yTDKJM2}6xGimUFcmY@%Qi#Bcf(^b<*`TONwl^$7c>w4unle6C3 zpn^DpgrgBgFxY4K+h-%TlxS#kmM%-KEDI&GaQexaMI>hY*RM41pG$6jBs@_eG0HdW zi=Wj>(-)pKDUTkpZo1>L>fPzbG8isr`>p!bT_5K1roa1fp6ChLf3XBN_?VFGm=+~U z=YOi#CdZ2+iezhsjJ^1pv6L)z=fbYc^;uJLk_XI-qP0K9g)TJ<_OLG3ZY6!V|9C1% zHTBcK9~sipf>qT6Hk@Dn?&x6ma`Ptxp%v-V*Bh3xs^y&{sR^3dx;q{EM5&|uHHdT5 z3;$L`+8ST%o#&>;8b$`!3`XDVw@U*(vvpNdg5w38iGh|jgnICgnPT%y-F-EQD9DkH z_6`#&%9COw(97=}0k%zIs<|7Nb(l5an@3+(ODN54M!dY1`sc&)tLpqn8H>Dr{eIVy zGwV;s7`4sYq2)pFRQ01NdTCjxgt>BWDDilPSKIJOr|A6(n7DNRuKK;h0*bujhNdVw zf+cT%rjOa5E1UkYOL8)rBkyVKL=XQim$anXu_woG-*2OA&WZMy;6iKZf#l7`n_L~$6suk zl8DA$H@B~cynUuv`20&{LX=~6ZpxBYd}<%R`X;>y-+Ax$isYkxzRBS}z4u{x>#O$d zn2IA8Vo9Afc-(Z&oLXBN%MynPUcX%LSI5(wyrhiGaQpoq`gO78L5gXp*gq)IFgGs~ z8jY_<@w*ZeBG$iXPEAW^&MjO04Mw0rm9jgNvD&%AG#OL5OUTBs)?!%YrZ5qe4G8zQ z&h;&}%(5)LA08LOj91-M`Md*?q;er?#Jb%%w=%sP^w+mTK%)lQzWsPgckmB|DHDUd zMDVA3!_J%>yhAH0;CSc0nJDkQ2kf$-&GokF6T5xjmt&q3a^Lo#E=8nt z6W0tvpRL6RnGnC)`(WBd$&In*l>-Q4`S!4DbOi?9{vgBONB0nLJ!)P>GT+`G8Z2~* z2rp{~R|E31cL%DFU_#@~HhbAyVbFA~Glf#$y08lQ%VLG&uES9c-;OG&5yAOI#4)G; zz}Xl9$uo*=y44-jyWX< z;w=p?y%~EjZT|fz{QU#WhFdMN1C<4n_j)9!rS_55VM|(3THyS^IypSp_N;CW-u?IE z)TIHXe~6F#(a-%UfA}b3d7c){#3TKWs$VisT}%?ivJfNDc<-mXt;(zq_GkEcOkR5X z$5p+0YW(5+%t+eO;zobZgU7S@^7qeGNOziFS%{;zhTMMVF6JaeE3ekO$#b&^F749s zcqxDKaktSjX(G7uk0wOMm~UKH$k4f&8PVGpvU#Mbhhwf_aBgla=yYKYZ)J95c5`8R zaF&^w8W<4e(ri5+l+O$~GO`YyhB?OR9)k%U1ebfq|wfX>DUA&Ft-yG7LvB6 z30jyO`_&~j6h---+8L3)Y_wgoXBhLMm=$zuqT=PmqZvPj9)h5RbY7gY)p_M*{IuV} zrTnO7nfFyp`?K;*+L2BN?P+v6{si=+o{CEmPWEiL((?6zw)XOX?Toc9pJ&c<#{Id~ z0`%n}(q#O@t#Wl{NF&E)PPSRJ?IT3M6yyz0UGQITPZ;t^dm`=aI?$Wx``{8mRPr?k zz8~Dy$sF}d4o()6d?R$a-d_zJa6(V2XZg@tT=LMK$({49^yP2!=E!^dqTz{P1wjUj z0{CQ(aY6Uoz?WyKooN#(@N`1G?C@IoP;YpDF25tVZA~&2#WshiVW&pB&GAWe8-+7M z?<)7Hd3*W1GAgux*N`&sSq8{E-yf`8D%ju+wYpn*kT~5QI1kx}>4WJZj9tA6-u1v= zh0~)6eOYwrt{K0l4xfqCW?zc=^lFi{8>$c8L8xOPJ&_PMVI*!6luYhYN76Nso#E}$ z9<|#N?4+6WaAD}dReZO7XugMzcvmN6+bCF(y2l!`IB;d18Eczfn$)?{cE3%DAyXII zpOd7AaD>GggE6c!GmPIg@N=LPU2?F2C3C=sx!e$o^-jHuvT1gu!_!DvzCWG`+N^+R zdHUCG8_|=LpT=UEJD(1Q3(4cv%}Ryf;OPQ^=FTT|;JLFz_dwnBcI3r;7PRo7kN2Ak z8Isl7Z+lXXrlvt1H%4~9ohhYueSD8nQJ5Y!e7lPAPK6(?<=+p<=L%Sc&bGOYn4-*J z-QbEs!9SVSe|Ji_EYH}_8-Ncw)skfJ>xEdy>z%VDQvoFr^;Ic>Edw#(ogEHdbn=1S z-s}HuQv@DPTc}^O=Uh51F|GXY+>~%8YNM`2$@%czXu?MGf97(tq36xZ!{oiEcgcWP z|8FAmwEyF;`xJt6M=N~g_5a^g%I@&im!q@NgBOeaww{lz(~5+{_r}HH*(qGx44Lv` zG>pBq94{GV6>nbEUuXT_&KetM7nk3du?J?hR>7F<@rZ)^tDf0II-zPQ@<{< zlM@5Re(h@XoH!NE2-GQpm}5J{Q_J%+fo^un@Q-y0 zeEeH+UMk=dx_S1#1P%z~m1Sqm)vdSnZ3!;rLJYAaXz}Xpxr$5K_J=F+ z!IQn4RzEJ%t3J7B_LKXh^Lt|kex_6e)Yhy=lnS)ZT)!)r{Glo7Vg|K-G$PN|)d#+x zV%z8@hT2;1)86|%cipNBP&^(V3_cVo!Y@rA44!&}C1sH6zDEw6_j^<-AgpU18%nDim#c`pWb^D=T0&S>{P#gsJtmmZ2??3U);fn~K zWT<;`g6}6Q!s%FchP-~>n7xa^fkDsRUtKB3Vh1PajJa0a*#gnExI z#svi_;}6s&X}VEUc)GfAH7(Dn+9XDjr(0GcGBP-urU2iynr@{uPeODNP1F4=P+^R! zWq8*|`fsljj~1(MOlKEw3=Pl^7U`;;yTFD)AaQpi$K%gwatSa4~oJ z>&YXhg|~kU+UGa$vH9Y0?^nIMF4AxRK>U5y;IGqr-}T<8js6X*riFK|Sl2inlIf^k zx$wJ?&ab9(irjNRLYCi)!RuQ z5+6-)-b*sf%o7}{ zk0l$Anqw-0djGF(_d&lKFQN1@Ro^P-i0|gWe0-{pu5CLi9;#{bd+#IK{qKP@Cp}k( z^ADs?eLq6W6w2{sds&lDex9WU$54V|0mM64-?qlc+9Ly(=16wAV#CAY`03^Z#fi^v zj|zXAW`B7LDGu$tttk7SP*+!T$X`q?7M^f4aJU<_|&5SHZG9 zg4Q}+RvFSg5s~NTep=@&cuO?A!i)CPv^`s6N5?~`BwXNVdE7r?i^&Q1VFG5QakFCv z$=c;ln0QSOQ`IcdqW1`l)AjVT{I&;k5hsd*wjVELrgYxj2`>qubLF1=u=anyiaeRg z_3Ok6z4!J5Bc-C-x@$Y`>Td7WH1MqFpLGP^fF1%8k5!bu;C3M!f&h zOZ)-plk3~r7t{T{&F$O^k{fpk#W{3d^xSi8vS4u78CqBnum1c#{kXKF1$xlfV zyy~+{LWrxc$JC`&IJ<#@etY=kLd(NlzaPm;((n)SMGJ(Fy9?PnHt%rk-jK{o_!SweH!H zAdxvZ!^o(JipJGET44H5cG+W&7ANr69zP%TayEN0tYCL0n!mU`!VWd`nsO@k?uLK) zchx8^$|tBOJCetQH+!EvUWqt;B-krR3Fjzpf75A`CdAMIf={Gtv2#RaVi1J9?QvU9 zJoWYWjpXtoMt{qCWCoi)RXYIX7KW+Dr^K;R>C%c#$RcU_l|g?#MAtPgh?3cBL$hG~ z?w|mkYIp+$SWdaz5RsFS2yRXpM7sMA=G?La#c2|2&-e8!a*MKuT$#+KP&XUf>z3jJ z)~4ApNhjYTJb&0ikFyO<@h-mi-u{U%u1}O6u=RBD-#J?%Y5t)DE)Q9lQG-Iiqi@T< z_+_WSe{576do&@6*8Jr0Al;v4bw!q?@bR^m`^G%}fgWpCyd*l%aQnNL+R!jkR+>0A z)n7O9?3Y>vEpA^H(>E?C5V-a4yBmSgi2+Pmysu(q>}ltqH#R95zo4U#e0V)SJVM?% zFP^QM$u9NXx>h&MKVFfxtz^TG8-crlzK;80e zzjD_p#6t+q5~Uz;i8qw^VY#^-%I;oJ^6!LKYUKEZ#j zYB)Hk|ZgPg`4{2#-pvo!<8cCjK)vKTfcdG zhL{p7AkS3K^HWoXer#IEJhPYe{Ifb?@qy@to*^J7DM-`Qu$_JBZ&~XPZh7)Aqzyl) z2G0KJBCYemW?pH`>Wv#q1%LltA#tpE!4(=j|LUbSvgA;RS+NC6!c14b?DY6XX2)=; zBt$p!_@`C_TNIfQKxL6_V=WzR>m)&7NJ6Y6(tqjk;|VW{Fhy}?yL017owc1>c+=(Q z8&tHfD8hFCdMA>^hd^&gR(LSq{_NK#YNb>+KEX~)jtq9+z1hhxW^K%=WjT>zqO#>l zgDcEOrzFY}Vq;^7&%b!GMG%{&XnAEBLE)6`f%~RR zQ8cJpwDA@me*3`p)H`vm)t1eu?BLN)|Jy1#Qy#R_+q@c;8}DtYdCkhpjWu?(Z$}+I z8ozwwrl$DpexUW`X7X<4oP$JQ(g{t$Wb!4m3@T z*mBh0agF!$37zt(NXdb?@f_G4gbE{W90Dhob;lclrYNd{cm2H zSuy_f(7cLtvSM_0VQy}~5|~z28bPy~3=Z?NYj+mX-#MMd)XnWU9Hy5yZ_E_Eb4X%X zn02zbyp@|@ccouE9j_kj)PH)#Dy#QK3JZ z&hl7A38L<+P3rVR33Q7$&>s&dpV!Xna6S1u~LnyZzD6 zPp52Q6_sZS11aw9m)C!2Fvc9(lad}SB$(vuiybcpOj#H9XNIzD8w$6l=d;V3rN2KJ z&4+c^x9pVl`?q>S{`_H#dSrar$rKto>PCG}yq~uAuvQ)zAB9fNDp}=6!?&L{&hZOV zgbbI?DajTtR<&;lvofQDnGUT9&okG*9D<5+qr@x$xH4zK%{0H-AP1+G3_PE5zIyxT3UKLI%bUF=Py-6OM)nK*KW0sYTZckr4LT!hBGFgDT!aZ}-+-Yt@HDKkG_f7mv>fM$RAK_;Kb z_tsqg@nN6SKYG`xgGqc}*Ym62Kk0R5=V$CGOOplQdj9*>lL6eG(@BB(IpG1G_NMl# z4rT1cLQ3GScx;E=@$Grx$i&PbGs! zOIx+kKS78$wy!7T@t0pectS2NOPBa)8nww$i{E|O8~4tMlEO?*0UGeMvo8Ts++`&t4VhOt6?7~3}X#edsv zIF+&By-UZW){UhHUp}8x8{Fw1UBuA5v)*#GW_(SJ$d130CvvLoI}Oz@$2F{+!p!IZ z2^ZFMjr6>jVxHU2^N}Tml2xs0-_gfog1wQV$ix72rClzewAZdkibFiyK*wawc1oe= z{#{LMHc>@}kdcRfZh(Z2jcpZ>QjwCF#vl9a0YT<$ ztYbKV zJTdUlnceB}5~Q{2)}2X@I65{rHzPNn-t>HWbXu-N*(rPT6J_|xX&lsbv)&XPObE=) z4b>}1>@aZA9eFmT!RY{Z=Z>y5v;m~FJ|NDuRB<0KdSUabynMpD{G#S zVMpPGqX{@0iM{>ZcM}FLi7N~*DoPMSmdX1+wJ+)M6!D%*hr=0o-26BHsdET%Xwabx zdlLk%t@^L4x5>5zQ{JE7&*LNZeJ_IAxHKl2Zw|TG_7;EiK{iP z;xoB4s!&4e={4AU>qja1d2FIgOfsmQ?uF{RAi7-|8{ccC$({Z+znG?636w&+%)yg2F|h56&XQv zSNp$O{G5+ki3z!9&LnYB)64&~E(|O|3{TL}Qkkz1==$u+I3yxjDW&gZ@_01ki+|nP zii!6cf{&HSm{dsp^!pxO0<;d4RAva-G<5LuD~mFb0gXAdPl|V&R;#XbAOUPVCn6&= zo~cd!kIg3$9xN9cxDu5)xsv*^sm2aPCgq4 z5YR=$kK+JCbl*MTpWDxvZ(0i7l}IA{A>gW z7A?__*LuSoW38$ap3Iktd}s`?>ADWr_h>$*ASp2=giUY_UAr?lGO1-mWgMzZ_r=?` zuYdV!OTGb!cb`6z7sr9;zx;lQqMWmYp8HLCh%cKq|KD$CXcjFPvb#7d){kMW`uMSx zqS3;s#}DNO5Il2NziwR8IGBdsq&()Q0@s#vP3W#5Qy-fiob*U8@e8ZxG;^$e|@(s7ocnd3N&+Zzs^V}`Vks1CI zqhY&n*M4-CmmnST)bfD(`+nt?Uw+kOr&G3Q1?lA4#>ljuPihEBVt}82AdRvxV6oQU zoFGy?(i4{sg+g9kLv{Dmjze!L`R9d9Ke~_p=g-F|`l(5z^6$qY_&guoPygvhl|yT+ z$_v>NAx~ht^Ktc#cHPV@j-{pEbF z1hg1-My}l)b};#grP+y6o_Bc_S^o9O3^Au7+)a%SW3CRnDT6;XlTREV&EnD$=o@oJ zmb>BRMEvbfzk)N>)3RLrk5Y7Tbc?xotphO3ZJ@#VzkScA=hg6ipAN27UYf9Hw>rHvQvk-8)h59gg;yzk0RPopGXA;I$b@GC#`v*I$nU2^UYKO1!V0 zjN?o9h!9}vsVO@_(Y?5CFdHbb=S~Zr{5(x5EeT+?r=g)fO9%&n6T6MH^ic>#l@Eu0Z5jHZc77kj-uAxYO#*KUIR(KOeK@Tqp_v z4MVq{C`$i&P~vX*VH_6_ieH#Ecu2Cn$Fl{t(XYPkXYMNv^}gx^ghD=p6G+-#o?U@M zBRJ09#yQ^pq6q5Z!=LL`7y*e#3V0;JPTi6iD;Ms(bR7KWQO^3()>Y1-mjePi~F}W+o(u1@T?$kFNKt1NWo}kgZKCNyv0M0G!wAV5OFZ zEPVfM&45~Z`j1B#L-iwDi;nbE*n;!R%;w5x7nK&Z%I&t$Lo!nMv)6A-hZN^#N7@GE z47PJ-4i^!_S#Ijn2~%Pm&%PYa_}gzYeW|v&p4RqNk~knFHP+hRwCNMhk@v0n<{#P> zMb>RB4L+=y12RsWIv6l=^|SkH08tQ|CS!*cq`5%%vvkn+5XcDbwqwrj4zpB zSzeqQ9?^vy*q@UmGW5P^>R2|LND)}Y>}OtC(Hhk1%{7;QbW&=R$UWK6IEU~eb8~%_ zqYD~1Jep@y>NGoQy;EGYTc+=O(y%5fE){K0tJrb=`jKI|PGhlKNl^)6G9FM*zg~cX zk|b_D%4h0^+6Ijgd-8*D7Q1an4^gPFPQI|o-f-(_q59| zh~_q#Aa+2Al)KsV9NQHhbMQnKWp#XVe7J3jUA$M~GNWuskgK=q=@c`2e>{O4%G=&l zEKiQD*+eOkz_tOhDol8`h`P1}i^y&gH#mg2qf{(TZsP<|>ESFqj4t%f%FSf|kht7k zF}kL@*NZw7!gBQ=~ zqT4VCQzHmFN)t$gFpV&sZ zk!dl0WX;OTj2t0g4J?qyq2J!r`R9jQ<~Om<4{T>V!KybpVUCc6Q}nf}Lrde4ZIf5C zvP}x$c%8%mu3}!P*;IQ(S^05fwL(7hYR(7?LX#2$xwxGz)yC-5wwDu}nikHs%QqC; zv$Hy?Z&+do3pH-ZtzHE6Xq0AxG$}1ruro0{v|#YyIf1?mE{}+ZZF8fW+uER#bPemg{bT;>BgA;^q z3m)4&PY0D->aBGLJJ4S!q#j~k3uG44FFn@A;Rx$n{dqF5D~$+v4MRcw}7IU zAlM1QZiB|+v^h~CSK#AAMJ=1F8(IXU3;lz{98|YHzirl7scfN`?8Q^4POWljW{c$K z=O5_HrP<}{>uLltC^c?A_MXqMC{#L&*+piPJTMtgfXypQDm%`DV1UQI@rDdrY8T)# zsckGj4&-!rQ4|LQIMfBXbY^;Z5XGb4F?bNGS#KlIDX1RhiLe!H$t@ILG5*alEE(!O zu+u>#6Ua0QV#m7W=yX(J42WjyXSX4oVP(~X6m!K5%aT?`SQWL6oRI09nBkwJ&m;Y4XP2m(Eb2Y?Ve z0w6ZK9l!&a0f}xi0uc}w9)}}>DC9C~Z7^)!Fp`)ew&x90s5qy|=pj=Ojf2Jjw%2tw zJd21}J!C3_26R|*1(Co@>t;GeiMFPmQqXXzHD%N_jqp^S-K97WAcEo^T zc6kA>+wH_UH3c*;L~?6XW{}9@fHo{#?HZL@r3VO9CJjd*dN3-n?AT$3(2q@_5H+cG%mfC3Os4=Q zy~T^elSw$c6=ZPmcC*#xH0z82m58C+hIk1AUlK;!ZV2|+AWTcU*W++udQ+H05G3RD zJ4Of06B6AX6vPN0WiVi?&PBoYgyZaM^IDpiOTmL~z1|73g$z``Eyp^!XlyE`vCC=m z5J1%Ja6ohx-e$CTARL}b2D~^T;ItTQAl`%E$yh{KEebg<>|Q#X zh+4HKH-Si?QfUOc-iS~cfE!1E0FTpQwqgLJklAAF9n#KxmxhV7m@Qrk z3vaQY1TwY`JL2^MC<>8yY@7>$@h-E?V1)=28WD6m-ENZ(rIYMt7la8ntK>SYigW7i zbRRm3;vu`m0TR6?D@bP&Q4c1`YIC808)RWfbvfM#;s!v}VFT$5B8UORfnt<}I9xCR zbU8g97m9TTy8)O)fE{mwfX1fTbruwp?9v+?9+w-y6RrzH=M7w<33R6f7AFOuvSPW{F%HSc;xIS!*8MiH1TzcJj zHitsQfrw3~G1>tdCIUh%S}Tc3MBFG0qbQMxVhewR3Y*nzK{I1Eq_iAL~%Fyysr4R#PCI*Qls@PdHLj8!Ih2qn-M zEUHtZad^F`2W!uUK!}J(oY+g$ji7)BV+;lrz;v|O-6)O#<4^>^lZbYu#!H4_I*;l! zn7n|^j)4hqBUsepU?SdWbYmd(V(AixLjgRDxKQ_w%7*s|@PS<(Y~fzeVQ}CHIOvUu zK)c?6EttZgL0EbN>;{A04&ppm*drj8LQohnV!+1$4MPyN#~epSbQ&AtcDqofSb%e( zc&wPRn=MX&M90V<1Z+B;-GzP9!85qnZ7`hMW_MaJ|2jcBhlWS&b{FDuxj`)DQ%QIt z4tP_CC~QO;6^}w>oZSI%#O#5EmAqD0Uph7Wsxq zu@-m$yBNZbfnJBnfw&M40%F;OhyobK9oTILJm7R-*I?enDA0*`K^*2hC+1)>9q)3u z-*^iXLW10HiYpj!**w@xc7Q-3;b9C27>}davQZoe;BX)aV%lJIoI+>F8`B>5W?saDNqA!n z@0%ZQfS@-<0WcfmAq4Xfgs}ujAYeOSum^$>#v6lS$FQ-Oh9K}JhH)^aFlGUl1A`4_ zB1|n5!ocIeK!N?n1CB_z@$JJ{4s#JG5Zr>2wN2L z#;lki7d8{-I&2=yo0!c1_34{s{_k%{c-@%C{}&zr3}c~z+0*U8kc+*9Fr#9HB&OXP z|AH|5zfpxj4#N_rD#mmuf}O+^!lb;J1B)KaMQ%(kCgu%<5X?rHMKPOVW3bCGT)r8C zffhs&j62^r`ORDy*fDN>V-8H_|6j!!Bqt2RP&7a|1)HuoK$)I^ZkX;mx&J*nA!*s0$s#m`Ncxvz>xOy2Us!z z4$G21!Y5Ic$^sz`5AMYz$K4~+8YYhQXPf&_xcJ32V3rw+WBFF3GDE##)pijIt{~+S zVjXVVAE>MfxeekTCWbL)UHJ}86VJDMm2r;Vuuosw=rES~p`!pWirH^(G uK>I4AK4~s(@pT@*w)FVCy@7M(eiCrFOpocE`^d%1XQuD_7b9)AkKqqG=9|U< literal 21628 zcmY(qXH*+m_P47np)8?*1V|_mB?O3^b51rk&e`tV)7{fE(=-3~UF+Vp?o9X0bhO)U z=bSJ$7>qGF=PYst0YVZI%Ag!B_uG4`K2+6NwW`)Rb!wlzpZ(j}C5MXufFplN%gfHr zC@DHP2M__kgBCmhk&3n*T>gJsUUAuxg99lM0QkQS_W$2jR#u#OaKG38(Fg=P98ieO z4ue=7aERFs2U#6Zpu-IU09-B**kOmkEDku>1VFmXFsR)D0Xl#nClKm(!+`q$lw%Ky zGTS}zZYb8O(whx-C<2YOsjXlel+A)6Fk11FbhKZxhX_cG4PihO8nYQhhHP%{8MH7C zixH6)0Jb7PbMG667Z6GLUK984cPuD&?V)GN!)VU-A8w6FrK@tKGx_6VasB~;EHc!f z&@ENpYES|^hzvhZpNucA#841uoK-ea@w8=X(~bb3Oa9k|a8D#m{IGgpULuvF%0G(r z@)ZWctN^TADpkAS@>kC{Ar39-+$Yf_G{su+W95>1V|+T`SgIE}RQsZGdSAQan~@iQ zaM&figU-y8e4Elrr8vcdyBevQdn}oZ@(WnJTe$#q%I2l?lCp5<=Jdpz47h8LI&_>5 zbK(%$&=q+E@G%4vy%doZ>iz-^~nXz&N}Ao*ZCNelS*~l zTwWxX$wFpfNdXD*B#@iz4e0vUlZEw}C6G5vD+3Ys7ZyMiqZFN1%(832#C@3-ABa%u zd;|mwI3&{3>hcc8?lwIg>+D|E!;MCp3ul+_?jgYzN_=??MrWcE_P4a$V3-vy@Bsqo z8PTB4eHNnXU-f4F+$K5@zO~^->87_ZbhuY)Ry0Cyg_0pwC)g7O+;>vEh&bO6Ux?C7 zS^V|dga>qI#p&x_TS3y*V{N$4muhkqMKxJ-{+tKXV#ATkEBG+?mOL=fsob?~E_ht}vj}M1e0#TE26n3U z1?QuCo^>g;+j`8gY@rXyn+Q|G`Qh-5eJZTx=SdPXyztW`+gQg~Ma6QUbCK|k;PEf3 z4EdZ<5XR%jQg;FVbT~Nxt{UoZ>6i=p{7O+q#Bz0mM7(SOtxhOmifNa?bJyZaAaPT9 zyIOYS{`&ZERkuBcVFw3BMqK>ISugu`cU9e#O6lQ?Tv;{ycxQinN&wwi8uoa>AdWYI#{dCes*QaDc^$&%9I`!^Rso*Ci7b^%GWBZdNdz zN6~HU=(JWK0%%g}>||C%$(dZXL1y=`$huzCZw6&0vs`U&dS+KuMmN|dUt8DU%m3Hq z1d_{O*fqgWuI&$f*yJPuL)SmPDmOVzTWd1CbYR>!Gb5Y_ci0^Jnti9sjYL6BAe3}W z1|}gaJ6faN?Ez(zB?Ylfv;{k zf%=1Yk$6Eg`J+GD6jseH)Dxi6=~SLq{#F=Dkq<0^Je)`Z5<$X)jROrsY77PpM?(Qt z%_`z>i6}~-A74nkr*t4gR}$9Te#B~!h8sZ6{W-K#ClUOuzkhK zvs(=kjlxQR%VhwVnRw>wyf7c&zTIlvciBw zwC$^07!=5L&|k^DKl)@wLa-0s(+iKz{qk_64{T>@WL5{Xyl?P~@h0v!ydGAXKp3E8 zQi=8n#DLO1%B7ii_mRNb|ED|g%R>>~mipU6CIH;q$J>XX9&Xj2{H`d-Q#&J(zxa3E zmMiX?za9z2j#jr1u7G^~$R18e)K?#6gtG9irS|cj>%Y98LtXqNBQ(xcaj$lUA>5sk zDsd&nVN5U2jeGwU2eHT6luAHmX=-AUNOSY2F(2f}xYQ7E_Gl6p)^+z;?V?4oYKLiU z*_Tfj#QNjR;>v3;=D@_rFTN__gIk`w>s#Em0a3s`tu^G(k*wq>wsW)XmtRLhKRc66 zTN>PP>o*k|g>v60R{=?aV;ADQU?_mzHvh7LQhp*DT=VP8nSCJ8g(nd`(crM+l5n(U zVL|VL!@(%j!M7oL?Nwi|de=O@0l*R{7%MRPV!FTA!AMIsbv6$Io{WLpG3x5OwUf&W z8$b-)YS_2XPknVb8oarxgkj+hhtuhRBgU%6)fSx&>Fn<{#jxlaaj85yG(IfebB9vm&V28lbco5i) zCsHX$T124z=?{0CS5z81n1b6^$QQD+`sl*xr6c?Ae*PWAelWRD_vlUBj=(u(YNJ^(HEPQK;zVviB1fxn!<`^+Z!7{u zVsQka%i%%O6$SsI3YnY2^9u@^F(++TF?JY5pF2 z%iR@oZUoe@Y3C#rP=+e*zgi0Ww47t8{-IJuPCk*%-0P~Jw?vkvQ_V7QZO7CSAtfU< z*pFzC>)~Xy6Kij(8r8r>$#MR8_4-s_n|RlXC#}}i4FDsHE*(q8%9K74Ddd&G$(3#7 zk@Nn#H3zRW+YdJSd&R8RsgE6dDwREPpZ9!=@Z>%m$_7Pzh&iJkmR6ZNl_!SmJ zQpvtlq)v^ZGl*#A{i~f`U;QaFn7mc}dSqb@ko3vP$juio`qX~M%7V-j&whBQiA&&; zA?D4-nk7!UC`1qjZfjl!B^D)yxciXhQL&jd}q>Xe$D9${z8`KJ0e6Z9+pxEKlC zH3JV^2q)5$V5+~>r8w{<;RrC$Zqld&&Lx?a7uQzj)EFO>PeCr%LnA|naNte=p2ffs zupTH3476HXH>S`S7=G(5;~MSi9O+ONbLz+28UfcUEZ)~F*)>~$tmrUg?LQwnOV8z! zCf>D4BQKYb`+luhv4Mh*6$VMF8%Nfdr%tBw%wwwt0E!tvT(6m?#3qZJ@88U-bS8&E zqHy8}frYsN@{a!L{g9+kUl7obtdx3Ymt=|XPKOg{U#+`wZyrqnswBHuF9H?<3{4A1 zH~cV83t?dn9Npo{jnGt~x6J}$2)#k#J~=U~jJ4DCep(ApIhO!w{PD3~B)}r=t;391 zmUFlBS(7I1RI;tFYhs&F{7J&<+j?bqVlbeueUq6GOhw@cp7s{8e{ni=R7Ug#P7F+q zk4&waBR{{0sd>B#Tki%S$j!yJpRSKuSb2ex zDO}kX$MDs+*O@{FX5rTLPM>4RRw?fE*Xf9jDMR8hp>yKe&jWsEW2c`?C;s_l_}cy7 z=fYBX@V>{rxT9IxPGi;?5y~(#j?T*u*t+>cojXOa(yK{2k${?MTjiwj(POtC&$83m z%Y)3%${D+D@6@63g1sldwm=T$?6m8$%EAuprqhqlK{WsKMyHiUhLd@M2*33PNmwpp z_Eq!p;<8b2v^0u>#%{OcL zdD%ki%kO)*nZ)rSjUbw^IOGy?P|CJe*rm?}6L%kPN0;K7-s~SPC-l@VCx3pNz0p#; z5n1RrGY00eb{f>e1fr8hUU*&)D9MH@fdobOJT(xYXU5W|e|P~aFQS`<8vFJ$PBJGp zlP}}}EAGu_{iQ^5A9oyu4dWN)aGS0wOXtlUTn?mjLVwKC{3bL5>?XdL5*dYYcQ>hHS;vM@o_$#XJpt;+*p;D7 zc{|nUa~clzRFLR4oI$#`;nKBl$#xHi?V)FO%MggP0dati75Bb>^9}2m2V>;{CR})w zsF60?`JTj;9=Sdt17mF+_x6g9utC~JGyMEW564t9MF|jck2pLmS0vR-wQLejS>3Hb zu=$itnT3>3Fklo&E|8{b8+o+@-4^=c^C5d)CZ@02xx2C0(y@lZO81fB$1)k zJtN*rh|i4QTBR@;<|kD<@Ulx3i?-&y8XjHD*)_2EG+E`X0pG&(=x~>KZgd#QXK+al z(Bz$`W6bnWvKA(wdCWf-J4K(w!lid!>Y4F@7V)4tIR>B@XuG z1W^o3q0^$7_TidNIVm+8H8;`^E=gbz6cQkrf|zTZ)??G+Agi<6L1&Y^h=v^uSfbf{ zzqq+7NCWR{)QNzo=9Sfz!Iy=v`NFe0LTZFUNePWRNP0Gg5Uo?bU-MT6xQ7jn5Y zq&FRA(Js}z8U#e*$HZGsVg8|F_WsbSzlb=0?b;}-D3dVUGzKdBEDpLj0MF#Zd%k~- zDLNFRXj_(0zsO{Q>V|y%*{*lDTQrQs2&8PN$yu6~>e;qJblUXYeGW!MIMJb4Q)z*8 zIuXMS*{W?9qY`)|(4J-A4K--+A<;bT`(K}E60e-(Di-DNB%xukZ_Kx}fID^n^;-C+ z*<|x%kKCJu+oY}^9VqnVDSj&Tb>FB@-?7yqr)XL)Qv!7CJzP^y7tWDuqP z*85KK`QwM^{RSM2?Oq4q>{{uxYHtDPx7FKJfw^$@FP|~@#IM>7wBjp#w7vfRfI9I? z99{G5mq!hA=)7+~Pxan@b@j0_{>#4vuP$sT*1MX!y{+3OoXC&jrLO+@*@Tmoe(@N~XeD8c6E(wtpbKSahe-+18~_#r zmVl(#rusViw_TXv{0x7BX<>TX;+qr}6zDX=0dR+67eOb&w<_+oY=}NjhfR$;{QL>7 zeY>}Sq8#d(QUMgbm9G>&T%K)Ft8>_G3_orJC$o?lNCJ4HVeYnTcis%BA#McPv*?1q zc|#jhn&4wM8o_AAn_sG&`G3CzY#m21;fi^Az}Zg=V9H&ibFrtZbBJ^y+cfaLYZr{B z(bCGotVR-tGD+k2X)KTh%!^&j4M>>a*D*-*K|Qppo{y96gAB-d`aW8?6>Z-z{>%04QMsO)7(7nAj-*N5c3@s(cAMa(IdvRY3O)Sr0 zgB<4JCsiHBqCXY+1A4CB9B@K_!NnKOaxL9essx^Nkt*UNTkpM>uoC@g!D+FsB}Za0 zZ?bATIvX(6t}V#ipILXu#h{G783FkDCleIzR=qYR2XynBQQ^;3g?rM46u&S~Vy^erXqu3P^jijTN2h;4^7##n4D|n*rhX`DdxV zi1n$em+LS%(mPeK(=jUc$SqA32>lSV*WMxhEDALzT-~GhFDgI|g3|b)d6k!+qH09x zVIFMr{o6V6+o$f-FfJ46vGMfbhw*iX@XOCLEbr@9LFrix#8&gG>Sb8Mkyw8wN!3`P zNH~!}(eAwYzJ4$N%XApn`k~^5`qXCv0!-fb;ypbxB-qEg*ig6amsK3cl01ARk2@Jg zbx!qu=u$_1@lh;lV?(QOMaDw9o{l1QvYl@kA|Uh387=~{EZ&77>?5@+*0p&|?BUYzNJn+ODTpF&Z6DX^!oMiZ6ga0E z#8{zqV63@)(wcbrLSBUS?loy(G-YRTc43X4ntl36==Sv*OeTA|>G88UWa&3aK4B3I z$h%6nt+%VWZ_OvK@XT2eVXLwa1z&Cdppq-&(`iIz08>^sv^luO33NHg!i2aumbvCy z?Yvb~5aC{2f#d{{BK*}0vp^BdXcP}feDfj&QMkT;e+W#8j0P_)DX~`jqzCR0yJy#q+F*Ym~9k+g{YwVTskB8b|UMBByruc5P z%An#zc~hC;AwbZ38ce5<{JC6bpG3d1Nx-gI=_qki?5niHMEk;r6J4%Fy@ULt7;$Lpe7}yW&5ZOte2tw!G{&v>9Yd3 zy0slDVvJW0FR$CYSb;+N@^bi5pZcp!TUt`EUvz$?MXYDoU)L<{x_pBDeb~{E9tEAM znj9aQF$Nw<#09XddbM(^vqLTEf|nE&=Envanpc$-*H+PT*8!wV3TJFTcs4vb&(AZq z+fq{f1A?SXV)RGn!b5FOp6-c)y^xB&h6O>q9|sG-dQ$O9rET`)NrrhOUlj$nlRNnKY8@ z_H`}aXREVEJcm8?(MLxZqrX1Xhq1PMJ~S)^{N?LB5k=C{C01gQI|GgV;QZ4C;eOsI zpzQVS_Gty^fQtA<3R7=n(M=}N`2~~V|k|6)l+U?P?Ai{x zd?`D|=KzKwJbJ#r*D`5B1(p;g#s?Es)7z^<{qLT%Njx$?`RHU0Q`h%?+6|w1StkRr zPk&hu6&|F1{BRKgTbwcguxX#1P3Cd1Q`L>DcFpuI!j3695)~ZEUb}l|g3Qz}&Q0&9 zetss6jPjbLr)S z0ZQq)Ljg{u+JK@2Gk0sBcPzO@#|}pcup4W3Vu11ff2xOf!}8L@d|B)efrq5&+J9P= zTXGPMpM9|~gSA%OIW?hJZ|mDZvQs}Q2no_Z|FAx zYZdc+L|8I)aiFt)iJL^jnwBMgVT|xF&9onUd{JE4%k|hxOTc90uMM!(w^mj6=hCo_ z0zM)m*5Zt^Hi&!Q%v0&+JqXyvO%0$5&2{S4e+~)^%O^u5kwp_LG3quS=#TP3x%LdM z2~K=#E~665Sx;LLFsM+V8ywo+;})@YxsV3z37|3tT5CX8>|Ue+J`1g~2KTI=^z7yW zt^*3Jm~vyACq&{Gs5TkK+N2nO<{*m|8@USidcQ7QR2Z9HYT#W}nd2#MOqMO%2x%S*Xr7K)-Y>KTmT$VDkHOp_AHoL? zZLTzEDKSgLa4zvne=3nsF~=(Lm{?X3b(vNq% zLC{kQc04y<$fVGKBc)ym#-8b`>S!Wp?tpXKXD!6iZ)r^49%$%cmxa8oH2{;*E1T3~ zaU3+*YtL@hv+b)>Pa8I2V3#N*ISApoKiv3Q9qfZqHoxwb?KtC4oJ#j`4PE`Qen0cu zWS4XD-N2HL|8WV&!@2OPSr`B9sU*H*yzSZ^X3uJB_s=IP>X#$*n@^~@}EdK3= zDdSZ1#Pz!qJJ8behYG#4!&iS%#AT*xU-ykoqtnh@N@tn78Wy%7$&t2>7bCa;VM-(k zuqveio7*vbz{aX?ntGm*9EpQKz)SZkbR-~1l;O8M$IkS_0^zcbu12{R%Re|6vfei< z%n$Ikj!w)>5wimrTzU7%6h1xDm$_EGv>#L&E8y=uy3z097ZQ~X`|wO6EXeVKdYs*NKs;_?{4D~TZj^O&uwi4 zetA4AQde8AjbQb>otazZoxhYDs(R8w%<_GIZ(vLBm!FfCfFEBD3m(5)F=j%D&gG$i z7&nm*8+>?w!j4Ql8b)NW_q%s-BQLf>m?$C^g`g0pIxM?&@)VBbAm9ylOuv5GU`#od zg72?~Nl>i;{g^0Z?@t5FQ)h#RuFpl67aD%O4?lkC(7LCPL?N#0spM78zK1?70p9Kh!E5KnJ} zl@X!rnH#n6NP=|A4iLA8GdB*d+T%-@ND>f$=)T$ki#wcWZj~abiq3J`#autK)<%64=?yme*)CX98o_Sv(N zK}xxt9O${()1?u_C4|^E%rt-NP;K81E<@xEH=*n@asTFCSPpfowUho;*}{$ME6L@F z%E!&9vPjAJz;@`-G-vGyC)?K4BlV6c;ECU95_26r{ifg(WtLZ!pfgExl`W=>Z;#m@ zRzQV-;g*$zzkCzYSEoi1Df3Ueq0uD*nlF4~VX0-B9F`Oc(e6%lYa>%Q>XFG^5{o!d zDM`JOrg?G)cJ6fGzz;n!g#ohLH_4xz=GOhXRs4xy`07jYXD9Y*p0DM6AsW2X9Q0A@ zQe{8()G@!g1~Da-weou9@c)#+Yp!+kO8B}3tA9c?vj6$84UA`p2-#F0Q0Kdqja?8u znhOU&aY*}gZI{ZwAelP-Y@U;at$4rYky+*==@~*qLuwi%V1z|H49h;$_ zmidf65Fh#sG5ofJf1V4M*Qts>H3K_-7QZ_?>x62Q%O6%l zGRm_(*uG8wZPw%25F3>e%!lhct9HU85uHD6mX>D6u2fCHl5;e_-d;%lE=^niQj(D$ zwEfEiba8R~&>vHfm}1)C#3uSsoMU-t&M%Eikao{|Mf+Q7YAm_mUBJ}-)+M-f0$=&a zSy-BEdH7-#9~Wd&P>W01J3Y@IO~NRlJOne`(*&}OHZ+fFNeKm!MAQ5N7^2wO-m+rx zUR3oAI5MB{=HY-U?=z8Oppaduc+3)-=nptxGR4T6 zcOwgMh6ff4JYX!q(Yw=u9K5DW#uEgKKrJ7}QStHc{yHf=Gz2XfnWE>$I+`jML(UX~ zYyb6D@bwv9%MXJ=1%=F-Tg!o;ULn5u?X~TrZxiMBULo=eqO~>6a{l4aovul8wt%$% z_RX4i`5DHH*v=Hv&0{sKJEVXZx&_V&_Vw6)SKWUwm@!GgK17t$pj7K8yOzzuq9_V@ zw%fq-U9S}bXbCygeQ8@S`<(w=Wt}YKSVkdCAgbZ}R%cdud;rc z-s@Xj0!Bmz#}z~~fL%{s)M_|9yivzIk{^Vd{PFiee5w#GT>?aeLT%ci?gg(n9&$rG zuAsAhV3H-3usjks|MadjCMuTP+pFY!bcQB=c7HYP)FJNFn<~)xL;kv!cbgH%N*SXM zs*%S_LKUw&wLxhdjMdJK=V6%FAMe{(Id6v{KRZ)dqd~ z<$NC1*x0t8cLs9%;ci4hI0hR5Y-!#P58UcrbowXe#PimFydzCIM(X*n#VW`PgvvW! zHduTx`^)R3+@e?(XmduQQP1~_)ugPCbFg*@%^%rw9PV~fz7?>>&^ z>MAOFH*oZw8BoaKqcNco*w)AISNsdG4Gr4t|M?_?ZESkoZ{UP^E%a-tDTOiqf$G<< zhg}T(ScjIBSC%I7wsyVxFmCb$O^!ICa#N#X*+W-v)T|IfK+~h(^upqz*xftdKkC{f z@@ZainQ;LW9NN6p`?j(lm~^h34+V3hf+&vu>$keK6k$XV#tlRAc$T%{t~KR8#sken zZcWK}=>c%@?Pm+Dk}QU#xla+4?28AD)b*;k*(pK#xp7%gC@a)CEj3f99?*?JDeCCo zQ;>Vzofb|cb!TRH6DBAK^Y$aC#It)q5CN!AY+C|T;u3f^>FfrYBzf^{NCOuh&WR5v zsJm~!nBLkk?GCL+mkT|SXwXzsM`IT}mb^7-2?~ij@k!X^n^&!XQ1A7TS=f;;Kl!v+ zcJ0PXW&Sbzbmy4w`75P~__~`PHu;5&wMn@SL-o%7DyHqHdkZ0{pyA1Fa&dt$h&K7A z_VommK?UvGc-ff&L`eIu@5kmq-fV&fmK?<@MIO-eD~}A}YdTZPSHDP<^&v+} z_Ej2m?9Bl4P&9e#(X(M`;E9~nU{!ywmKPO9SbX0w%Q$r^+BLVO!G!r@kk+N9aawXx z3frm}U8m7W0-u$}F{_3$8<0*8N&Nr(?U5LYx$DLw@g7xZ8(y>s&mB*XB+S=;=mSLi zNt%Z3QJ;KK7#(b`Z=17+d5(x(NOn7UPM`-z{tnWFO* zE$w5*&@*RJnPkbE?qLbsG`(f8Mx09UV-QUXov)t0UE@YkNg=`z4lk6x)A8tsM-o;V z#pcCf@so05VcSd3{#Cv070l#DMRJ4Vxmd`0^{uCGrNQ}UvN1bz8*t76k$!ui7ej|f zGl-zc>OlZ6DQxamO{XE_0F%ld{#Xl5&M#rD^bf9jCr5F?WAEFf5oiALr+|&>J7bKz ziy4ZVmmd(vzxhj!sr}Ums~|0C`{k`#OTpj&Rvu^?X_?ky!)QxgO~Y_uc3C`JE!%ea z1Txou|8LDUhQUva^2MSNF2mNq)B8=^aEgy0-XDv_AuNj>9i3eg2+@ZX5FXCs3dk$9 z6|LJKw;f4g#1!PG#roSi>e}Xj&Mgy_;T4osk`qmnJh|Jv;VZ&{!46DBd=SSQy;bq# zy*#ais+}3t`p1bv+0?~*PugrL(cp~*sYh&F5EE^k{_ytw4#OX#Q~ugUug0Cbk^t9Ewn;fjB2?=SKUeBA&ldRGraRiV{8M5%s^*$btspHq95mk6zZ+D1 zBHw%J;oTwM!{+HCL9#(w?3uH=N%bnov} zh_U{ljZGCg<4k#0Vxa2L&re4nUO@H6E-ow~HYzHH+Wp@jYjiZo=G3Aq?C|+R(Shim zYd=06QGi`K75ROsYWnZVA< z)+JIw8k>a0VO>USNEoW?X4MoT`%pB+VT7@mNT6fsZSADYil83^{Zt+Yr&(B;Z*A;b z2jNIGCOp<10HG-l(``>@c=aTo|{r+rZ z4+}fUPX%20+b2cAIP1XMhCT&!U%stkU;MHpJSdQ|{Pg<6VHm->tD|S9h+@Opw9N;< z+-*@h>_Aj-UPeT4fG=|5mmjMpw|2A|NbJd@SppK+F72&({IGG}NJ~F_;!HNr6J*_J zd-}(derrha;iRZIfe*&1+1^|mX=o7}!_J<{jqxYBl^ZGtVCmt%9`7W7`B^TP4BOjW zlG#!ErbjQw{XY9gnb-D&cwPx4((L1nAC~BcKR-dAs;r)YhlGb9mZw)Wr0kQa__^wa zajP&xL?=KDI)~qZ=xXS7$0}Hu6wl{UAx5VR&p*T(9k! zRNAemtWUnUm>rk*nWxSP5X_7e zFZ<5?vTXA8^Ik~tHzin*9|xly7wcX6;Wy1{c6O-{1Y>yVo0_#Shib7;6^j{=;xOU!h=ErVNL(KJv22owd~|Y=NvtDG?oIK zzx(eOZG+SEG7oOrnNKh0bDg{5TR%RnZJpNQL}$PIvMe0u2J8*q{NaAT289F$o&Eb? zi+w>>yT0}2)q68QD2#XP($O?wfR|I%^uuora)?8&kG}lrl@hjXdvpB$FID1gt=<`N z<*V{ADpbx#a^=#{ZA zmNN;yfsw&D`*gd}M^@Fe=2sX+_X`VWLDi!@2A0=+ZJUCV5sh|vGu)E4MssWyedunj zE;xm!*PYA~K!e-UT=$>r^-DS@ zCGq0rq9|V^+`~0<`)bv=!K|>v{OR+;K!OJxWNiJ?5S^A3mz*A^sjZuu9a}#DlW0zQVM=5W)iAo~Mr~9*X;gDUiEv(0S`=2k zC>#HxOT?pNh%K!3rmy+oq%bxho zjXDVoxUmjDFdM}JPq0hZeC=xWCIAG4Gt$pr$YO#Vy3VWrtsGatsh-|Rr!Eu=(E6pm z&aTGVjzw_9p_649VSZGUeX4y$-ubFc&M7X>5U{vGzVM}%MS%Lv%~pHj=_A1iG}Vux zX&+QM*BhIrz%e;ta3qICbZU03E>-{YS7W&Rq7V{|YL{63i2BV<>3m~9AvY^J%v)YF zhwM30bI(nrzhzKw*-1)6{d2~{PLc2(LD@UZ{F4xo{ogO zQO0FEjRxOC@PKcA9^{=r&NGZOuQ1Xx*bo#QJ9EFnmXyI-(l? zk+rE}Gyfl_89FtX%mUOt*yJ(hU)I47l|{1X2gM9H%ZEGDNNw9|F+DvoTolEpp`qrf z$G02A2LK+x3`;zGB0Go#HffsveXnm@v99yr=AJ&0A0Ofg)xG}y$vV=sAaMqt`r=dq zi|&cFzW>i3lL*kR0m8}5OO50E;34yW{P0?daqQ?Ig0ka9aSRWDzVo-M?`GsW2Z5RX z@x@GkJlMH2`2P8WCW#AA9YF$(=XT5oy zofrlim}2CF&Hj2{lUQ~@Z`OH*X^5&PuKbAE`wtd)nW5lqS5!tQ;Qeb*4*mVVpQ-%A zDF9q#aiP#-V{px_s(aYEhl9I(OFp`k$ALH<^KakwOl}x08bjE(e?1!GgY(4CUjL~B z1eQ)u>*N0NZE-M}OeIKe{<}u!S|3{h#9cWV$D@-eo`zTd`eWFr+|&Yjht6aNv-~JP zec#XjeKji40g#-s&rT$V`XThYil+bk*02RafKaL5eqIns2kaZv(yp5idK7RxH9RXL zM#v^XYLMXXM_$r-gAFu$?ba}`4R^-Dj6fgI+LRp1E*LOyg>^fZMILD$ypzt z_8C5Kin2~{G%_cNE`9iOwe9HN4l@iN-pp)kF*x0(LMB;vW?m``XTV0U9f(b$FBJ(W z(zfmu03B-qN2mD!tp+fIFXX!G{&jagxIERD;27?h+fsuFzNu+mfc?>CZD<6`U4P?) zgn1|{EP(AzRlfM;&9djw%eld{%@=Q{_T9Q2+0x8@;_>XX6d^%;=h5Jfo|uxzW3ZjA z^|M-_2f!V6qMS4E4xSmq^*TWJv#6Z1?93FNd+z3co7R<#QzfB(#;yr`b~0OC_oiVA zDM(CD;UNH;>OUG6WvF-g`^~;I(+?vwTSXc-E0Qbs6^Hto>#yGH z(s4^pBzXaB1|y#1hqre8`}f{`O75q}5&}rF`kJvl!Qm9D1Egtbw8bYN#)non)F!P7 z$3K20)Aa1#uqE(NG80e0$XnW%H#J0I@zHo-`@2P;e`!9hr*dGMnw6iNo-Z)ee*Z_$ z4uF01XgGQ6eXkn9NDMZ%KYl6YCkXk$94ca??t}P1byUi+&OCY0bl_(Dh7}x&p}5p4 zi___{js0{@45VaSI8_v`ueeqx(d};9!;&I6zId27o9>}%zw>5J1rEzEN(u6!0EU|f zC#M|=2`se3Y9&Oah9Bf-Z`DdYs3al^if4On_Khsd!J=q7k>=%CmxCxiWT?gJP;@-6 zllT^%$|H@vX__?%&K{4Wf%n$xAHLs?{N}T?1Np(tw=$0dIih-cN$&)cMP(;a+2Gx- zpMGgl3(GQt&qb?dA1YYtxl2X7PC_bdEL4=AT|>eap1gL)D(wD_

p^k%G^?3>Z$snrc0AXA zyXT+ZY}nzJ=7#tlEcqtGZ1b3f7M2)Fvd;BP=sd#`dB(O!ZGhO4>~LQ!(6HR_+k*u# zfu9k^38HLtE?|=j{FdK5>;Q=3A|m-LCf2guaJza&=aZcgfVFOKYTQ^F-eGne)G?X& zLB5GOg8iCbZoL~^M`Hz}F9zp}8R*wf23PKOap7bHac z>gsPkpYu*jPfiGSPfb~f1lRhc92*kqYZ_`AR^j-uTtofOuUv=!=j&`X31(az>}(y7 zA-ox^;J8r0_=jGNSCFrB?m#FQQ*<~z7_%prEDyb@98_SEkDoq~jvTo2-y1HV((wzI&zJGlojpnn1+(?+MwgkF zU7D91jMgm;^v^F14=tJlj~+j8xe0E|zDDPOS%)4y8?x}zV!{H+9&o#CX=P!2bQKy| zR+<(Yj8hFZG`0?G8VycbL~>eU5L~&srqZi-Rnm1Gju$G52|Fn1oNB5cR6xi<@fjkl zR6Hl!$A$>JL29K|tx~D=PVeM`1W(0aZOxF8o0%WtSe{p*LP9X|@zHhdu4dn|@9+u> zXJBAZ=g$1d#4egE3ii+&!DNzswXbtTK}{)0^h22Utb0ne(*uQu=;d;m5$((3P$6!+ zT4UPXk{RHf*jP5iUG!}mI+w@sRQJ4Vm^9nFTG3;vW;q!ona>-NfMhw#G^DHQGP&ykNPEqwY^-Iy=$$=o1YR_te_^^=L#mPmPgAwNMN$>=l4MvMzu5!TKHXsrU z++I|{y(s{LT5AV7bX#&aH-?WpD2ChvAYdTNK^39F?iu3mp;%tqJW#d;@~LP7h2n|B zV~zbE24!HHC@T`HTiddGAS~-s^J<_cFDg2ajxuhnuguG=V2qa+3JkEDHQQ1-M3@#} zUtLzaU{IIalMFR$^+pGbKqq0G+ruq0Fi}ncabxG>a0oO1fi4 z2Bf5lC?Z%b7f1GilBPnx2}W*=4fpjqE_IW$Z^zx&HA%iut9Vt)Ciqa{JX6D_*SM-EWS0 zp`xGt%@+aoPvCvN%bKokwG*$-Ax!9U{nvNv(?G-3^~+bcXMVGN`~ABt-*wS!b&Gdc zd60O`e)H~6f7%3BH#aX{Ug0h1!i z5(g^lrbJYiQF7WyFZBE{iAdX=a)tt|xj&u%?a##KyLY{( zcW>V8RItL2Uth)f-D5vlvQzCXlJ?=Dzxe9btM(th|6$WdXRBBQ^LZ4|JeS51Ojf(c z-0(2OtF4Jgo4dD#hewb)SS+V;$d!rbX8qmozkg^~zxvgsNBgGdX*_gV_xXo4eewEs z6}H>EZ-2i{UjOpSEuS_`r;^KynUil0wH9KiweORzYC6f{)TIv5YA~Qz(;L#)4dij^ zhH)fh*-_V3lDo|Hm~lvR+Ly$m+55edEUxCH?S_Fxo(2HQi@kPN2a{Odz1x<3I1LOo zz6c{cx2J~t>1v{$e)wTGID=%#*^+L*|Mt;)`T9B>x~3y;n8bc}*gQQx7BooCu2=5q zZd=ur^v-Pz(7{Plvwizv{UDQgq-h-Z1VvD`YfQ5{4auu7SNiyP>=5XZ6e1(Zjbts;ggo zxeB4#`VW7smgh0)ls}sXN_mU3uv*{O%!_&z~x|ITg<2#f5tRM?3?;tpH=e z+4a&L+H9XGJPK)4UzUn{T$5-P={kQ}?l=mgP6;zu8}GvL0Z64^)jy3AD&Ly zUXK?`y4%$XLEJSo3cLsvr_(&V**O#ViHH8Mf5e-oViM}IC~Fnq8|+B#){j{Qwwzt9 zc(vaYPBKe9Y7hxo!{@8jlpDwMi0;dx8w~iQ`nGQPaw(8n$Z4~!s7SD53c`vH_5NwQ z-Q+|B=``YQ$bf>cb_e?m=;mS)C1JC^Kb5D=`rs@tXRIH1GL2l%Q-}4Vxp*-f_Paib z)$ye9t1@{yHB$R$uU@|p`-7ykgZP}LkpQEF%(7BB+zSF%RV_~!k*<&#@uR*&Zuc{w z*!)0hRJi{Gw_pUn`5cGr`@E;=zZ5I&s@PZ;j*d zAO?QSb9Gmpik`b#F{JvTsiCeW?(}SmR3!oj@x0Bn&$^CJX91O`LxFeag&)UpNXp}> z6O+jF5QKdQq^yg&Rc;i7^XuD{bG&~zDMB4bMAMiw#i?jicYHdi=~sXEdLoY*7Vx~N zdH|NB5vvc!ng%A9$#RMQq{h4(?Ax@z|$!l_V}=G+}Q21!dadtSepcC z%4TpqT>yT|(t-K`YpM>Ws3BM^B0h9|KMcL5%*eX;;4#N^McEGC#8ZQ8j1Ww9y+#+u z(OpmQ^1pD^aaUrsoz6vdKy8u4-jE*)2_Ion;R=tnRW}gkBE!g@dO?&%2JY%xeAf|1 zTw3CtU(ceD>k4e8%iGI%K=Ns7pgs&;jb(BYG8)cOr`p`_WHe6#L9{H2PIXP)X)c7H z&L_yVj93L_(>l|HX`=@O&hhTPVqq9e&(9YVp(?y!@U%JgJe;h~7jAy{_P!Vx>Z6{; z%W3Gl4C(v0JC+@bV~(|LsE@}!oZz(~MYu~f^L?u1Kq*nOso}6roLw)Rx@ajUeRae} z5eeSWjeH)Yes}-F2L$>g@Fz2*a=a?fblYl|8)dLM_{KP#nKnD*7%fut!FO?Z(yFSW zk%qg5`bj#Sie|Sh2hczpMk!;=^|`XHqo!AykO7qqHXNY}U#V9h48Ce`ImNQ#`T;#X z?t9;JM7o@^GJ~;wg_WBz-4DzYoO9GmWihxxfK^3e3^T+PwC~N3J?uNNdT~3WXlH$A zm@0B5JnlfagE*^>Sp^5g^NCJ)lKCV+0~TgX z)f-L?f=dX`ft!Y6^Khb35($DZa@t1Ip{ZJpZLbDwOEq7`Mlo*M(+=+hB{94Y5rb+a zbvXfiE@#9LM<6I#g(}BSL(*17ttqYslS#zQ0Abj_1_Z5jfOJKAghtnvl?h{Pe`VPc zMJ`deJ3@?0$$ZZ=MdO4~=*YV1nc&!i3*JOzsJb-_1p|D_gMgDkq5)Tl1_~MljfdY& z_npLw(Ak9NRHv#ZMpk8m_YZw8P-t+iFO~7Kmn^fBu3=fyh8;PAmzY0P^5*&l%doSzHk_RzJM03VIC!xO9tzw(hOms4Y!F) zVsA35Br(`~$m&C|JW&nZJm1w#V>rUMRZKXLiL~F^_@gk6IJU-h;ei%hGe(0MF6#er zMw^+51J^Nx5vpZ8x1oq=JS4*MMlm6R6)5*rjk?engHk7S>;l$7ee@>bVjlCMZF`L= zTjd~dT>(MJV^$CX9;YCILZCmROb1wkSb*bf3lM`%U?Rk$*(I{U&4t5Zt4$ZKM^PFo zU<$(G%msr7ixqL;d9JB#Yswsiixk7-p@*iG|f(fL@jW&-Q_Bz3pHDhCqz?sVhWTh`}8@ z4~Aj{s01afSZlOZ71NDALn;|tV2MS;x)C2}X-C;^R$ZG>Mm&)WpL2^HWw~Op0uZjv zXqW=&V8qj&p@TKgy2Xa^C=CpNQaHp!@QnR$M_3c>A+FeKw$aM6aM+10pA4L!#_6Bc zLI+$Q?Xw1snvZ`ltA*Jb``H9z*XKlK-T6!%WGt9yb-`sA{Sy!t8>@qD#Syw#AjTHk z(>7Tx@p&He@%q^E@z3)J+XEy1$MsRdXd^_8a-WA-*q^)F#_{ZVGCTTtwolUjdjv#` zCsx*TEB-!lh=-Piy2n{U4U*MIuvUw-?$fBfdx|L|+_UtHG< A;{X5v diff --git a/sound/direct_sound_samples/cries/uncomp_sylveon.aif b/sound/direct_sound_samples/cries/sylveon.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_sylveon.aif rename to sound/direct_sound_samples/cries/sylveon.aif diff --git a/sound/direct_sound_samples/cries/uncomp_talonflame.aif b/sound/direct_sound_samples/cries/talonflame.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_talonflame.aif rename to sound/direct_sound_samples/cries/talonflame.aif diff --git a/sound/direct_sound_samples/cries/uncomp_tapu_bulu.aif b/sound/direct_sound_samples/cries/tapu_bulu.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_tapu_bulu.aif rename to sound/direct_sound_samples/cries/tapu_bulu.aif diff --git a/sound/direct_sound_samples/cries/uncomp_tapu_fini.aif b/sound/direct_sound_samples/cries/tapu_fini.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_tapu_fini.aif rename to sound/direct_sound_samples/cries/tapu_fini.aif diff --git a/sound/direct_sound_samples/cries/uncomp_tapu_koko.aif b/sound/direct_sound_samples/cries/tapu_koko.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_tapu_koko.aif rename to sound/direct_sound_samples/cries/tapu_koko.aif diff --git a/sound/direct_sound_samples/cries/uncomp_tapu_lele.aif b/sound/direct_sound_samples/cries/tapu_lele.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_tapu_lele.aif rename to sound/direct_sound_samples/cries/tapu_lele.aif diff --git a/sound/direct_sound_samples/cries/uncomp_thievul.aif b/sound/direct_sound_samples/cries/thievul.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_thievul.aif rename to sound/direct_sound_samples/cries/thievul.aif diff --git a/sound/direct_sound_samples/cries/uncomp_thwackey.aif b/sound/direct_sound_samples/cries/thwackey.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_thwackey.aif rename to sound/direct_sound_samples/cries/thwackey.aif diff --git a/sound/direct_sound_samples/cries/uncomp_togedemaru.aif b/sound/direct_sound_samples/cries/togedemaru.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_togedemaru.aif rename to sound/direct_sound_samples/cries/togedemaru.aif diff --git a/sound/direct_sound_samples/cries/uncomp_torracat.aif b/sound/direct_sound_samples/cries/torracat.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_torracat.aif rename to sound/direct_sound_samples/cries/torracat.aif diff --git a/sound/direct_sound_samples/cries/uncomp_toucannon.aif b/sound/direct_sound_samples/cries/toucannon.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_toucannon.aif rename to sound/direct_sound_samples/cries/toucannon.aif diff --git a/sound/direct_sound_samples/cries/uncomp_toxapex.aif b/sound/direct_sound_samples/cries/toxapex.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_toxapex.aif rename to sound/direct_sound_samples/cries/toxapex.aif diff --git a/sound/direct_sound_samples/cries/uncomp_toxel.aif b/sound/direct_sound_samples/cries/toxel.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_toxel.aif rename to sound/direct_sound_samples/cries/toxel.aif diff --git a/sound/direct_sound_samples/cries/uncomp_toxtricity.aif b/sound/direct_sound_samples/cries/toxtricity.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_toxtricity.aif rename to sound/direct_sound_samples/cries/toxtricity.aif diff --git a/sound/direct_sound_samples/cries/uncomp_toxtricity_low_key.aif b/sound/direct_sound_samples/cries/toxtricity_low_key.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_toxtricity_low_key.aif rename to sound/direct_sound_samples/cries/toxtricity_low_key.aif diff --git a/sound/direct_sound_samples/cries/uncomp_trevenant.aif b/sound/direct_sound_samples/cries/trevenant.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_trevenant.aif rename to sound/direct_sound_samples/cries/trevenant.aif diff --git a/sound/direct_sound_samples/cries/uncomp_trumbeak.aif b/sound/direct_sound_samples/cries/trumbeak.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_trumbeak.aif rename to sound/direct_sound_samples/cries/trumbeak.aif diff --git a/sound/direct_sound_samples/cries/uncomp_tsareena.aif b/sound/direct_sound_samples/cries/tsareena.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_tsareena.aif rename to sound/direct_sound_samples/cries/tsareena.aif diff --git a/sound/direct_sound_samples/cries/uncomp_turtonator.aif b/sound/direct_sound_samples/cries/turtonator.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_turtonator.aif rename to sound/direct_sound_samples/cries/turtonator.aif diff --git a/sound/direct_sound_samples/cries/uncomp_type_null.aif b/sound/direct_sound_samples/cries/type_null.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_type_null.aif rename to sound/direct_sound_samples/cries/type_null.aif diff --git a/sound/direct_sound_samples/cries/uncomp_tyrantrum.aif b/sound/direct_sound_samples/cries/tyrantrum.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_tyrantrum.aif rename to sound/direct_sound_samples/cries/tyrantrum.aif diff --git a/sound/direct_sound_samples/cries/uncomp_tyrunt.aif b/sound/direct_sound_samples/cries/tyrunt.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_tyrunt.aif rename to sound/direct_sound_samples/cries/tyrunt.aif diff --git a/sound/direct_sound_samples/cries/uncomp_cottonee.aif b/sound/direct_sound_samples/cries/uncomp_cottonee.aif deleted file mode 100644 index a459a62f726aacc83689b3ccc89e70a1fd2d8175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9330 zcmYLvcU&7+zVAq*-X+vPLLelHK!{>G2295>cHCkUm)MD8r)-MTvwQ!0cQ>0&yD4@y z_O9*3E$$TzHa5oe-Vs%RgnI8?qc`5&``(<7=4j^p=G5=`onNbaapzV55WiiyxvsAI z#jWsvfB_)jH%I`ti8M)qpW$m;<z7ttZ7a;Cev_4bvU z&Ch05jUH57T4{CTzL%R0H0`J_$>t(Fn%QUfZ~u1c%(dpWZlx>ANw03)wg2U2H7f`R5B4Z}!eAT#Qs%*|vkn-a7vA=f@82sVkK60Fz?kY4h*DT{`pQiF3DF+6Sf# z5P>VL-TLye4?q9-^W$&7wyiuTof&YcMxR_id;0WG-+cf5=^M=t`jrMZf{~G5vHQRq zZyx{S`)|E*bWdqkp@iVDD0=VTxN_>}lRy1<{?~hLcZSytE>?1ORpY@oKl=RmJ8$gU zxnpCNnC#FRW_s`3{Qb9cCr|%+`nT3+!^S8kKD*+DSKoQ--9Nnb=F#2TO86XF0G{Bx zzn(t%%~${Z!|yFmgNmBx~CS* z5t=Zwa?jqEnvNdX`(i_B8WW`)e0KlN@4uctceQ&#??cl?xka_RUf!{_p{_WSM{%t# z3^$*ogUB`|be5occff7;V6JRY1qup&S?N7$mz4*A~ywakAY)L#RtRLyP_xrh9 zw_8UwBuUkl*FOL3(~l0lkVW&Fr<%|I@Z}djoM|3b24kc(O|QTACXCgZT&8z<`1Xa1 zr@lLJ>DGW78JAnTBq`MIJr5t%{>hXX64 zeGeZ$xpJ+gb9iV%??$B-meg;3Y5(R;B~nRz#4tZL*4y1ZxE@9ls2o0r2!uQ~#Zceq ziqTEvW>uF}loU&_A@$VQldhgcD>|#{z<~oz71flFzI{x~$ zEP{UKN%P%DvpSHQQ(Bx8i`Ng`yKw&8%^n?5()jA9e|-1V1}Sp>;rXAx`T6#+lbW;b zm7^~;Nb%ZdH~;?qPv?7-1liWNKK|43S89@?b8Y8;{N-Znj4Q5i+kt~kHE9^l(6wK_ z|LOAMRYcm>S3mmfgI6mP!ivs|KmUBbb;KN#)7bRN{>_D)z~ZAzCr|w2TF)9FEZcGD z$e}$o*-W2iw6p#GlfgM#n39l|S0GDIV4&=469fGN15+9sK#i4^S8uK?*dU@I^z$?Q z&pICuOfQ@L7*2v%BoJ_!bSx0@1)vauj3+V(SZu&zSecs|9hzR&2XNfv4OLsVHC7j; z@h~pU_+xm3Uhn8yup=1k7^T}MCqV5bDD760}LfQKdG`&<^QJ9@2jz=%H{^PIzb9=(UEoj(Ml*DE6IZV85>hbL^CCCBS z`(`59FVsnJNR}*%W$3%tHmfmMltvGuc*jfmbZUZ3V!idlsdk-L-+6zWy!)dMN>J0i z_JsUc+t7eD@2yXdR>XslQ878%(=*gJsYGPI_USu$-qDAnPSDnKAmyn-~ zS(%H(Wo5JMny4T@lWCc=MVYaV=}9|2F((0LJdS{Wv9J57+(E*lFoc8+(gZF6j0A$1 z)QZ9!E*K`pA@m)mzdqYzHFrH8_ZPkUPAOnUm%aIRne|?aIlX{9^7Ys4n4;Pu)J&f` z`IY0<-qv4Q4YX7t-n66&3dGpi{$(gB3A?^*<?d5#E7g+l1z}`wG$9pOh)jes^XT;N%pr>~aNI+?b!tLCoAd_XM$_ROE&kU(nC5 zE)#nDI_4Y>hOD}g-}&VQb@KKd8MIK}m67O{&yJw(U%uIAqo&psYcHH>4p#3@#xO#Y zV~eDn?-%*!x@LhGFG3nW|LE?laBm3)?eHLi)01f%5i{4CEt!(|iV`6`ys(o0hXm!V zi*o_b0>Gt{Fq5r_9UI67Z*pF=mmIjc`{X}ojR{VvW3{T zFNfK=b$eolmQxc@LM}SI@<@@KL#J?qAxXx}wP9Oo32^h~q&?}#I|=gxt0qC6G&0gU z$|xbPc#?8+h3?jFYGE#P@4p}O%F_9GqbISLVh-U23FZqI97$Q3ar!l4PP}H>!AT8Y z|4S#Up&`|~iYwZP)q=7dbkA?syhS|u03wxVoLcmVHl=utL83n>$mD^b$7FB@X65*N zzGYQ|D%i{Kyam;7wA~m$B&86i`zZ|xk52a>3hISx@@QEVYTle&QyjYW#pBp~no6#x z2|2*3o?4uXQp=~6I1YxCo`Tmb8k|G{7vt2cmga)u{5&C~lB;Nf$o!%uf(VRVS*v`# znq^)lym+)0m>DuBrbLJS@x@cT2(vb=VwP_fJD1FH)s^DFz#}CmbAyzko?45LAl=No z!3S7Io@%*b8Z#p+iOnEJp}3-oT!yCo;%q`=zVFT#CzR6drS6W4gYJxmhGgg9gBjYM zkB`Lp2c*^r`P;6ehfMkre@aFXEVJz51!^5fB1CLg2VakJ`^JC zc6e~Hf+U(t29jby?OVu~~*juC%-`}S1+X^*52$#rw;~GIBYi__QE_0K)Tf3wU9KFe8r2#>27C+K^ic7S77+KFgoD?K<#2 z^WH=H)|B@D?nvKGyLWOne>;6j9#fj(7_$g7@meD}U1*ziB;_z&N@El$yUiVP zugv&TGntx6PgVunWv9ZwosM%P&cY||$9+DMv)gx=1txb}d z6Q?wFZ)J{tea2pYI8Wa`%iR28y1nPoDzmhR*njdSqUp02Eaxw1HtZ<_#-0or2pPG_ zIIkTk%1Q9cr`-&uqxaSjB&{rS&o+q@kO`=uLYwH7)m4 z(s%!mp&eKgzxhV;;*Cd<{KTc-f9nGBCD!)#Wm-WdUbm>lmhUge>+$&;DBdvAJh@Df zMB09ON-JTFTz=rptV$~ILq?)vGcyD<1Z%Ot&6j)3Dz0$FoRQR5c=pctQq+#LCQzbE~Z&gX%Guw989Q zBA@G(F9xX`f_6+p;&U)A8(AWuxilsS0Y-yi5Mj4c(uFv8h|EM=-8eESs8JYP7NyD# z5irpRue_mDNFv10QMQ?9a--d}rqcMRY!ZUVW)YowH$lKdS*#Hx2F8HJ;tqw87%Ucx zK_bZvvTJ(6$dpMFF@5 z10TXD3Xe}k1VdOF*69eMv8WKh5yd!l9ts<8lrI{>cp`~H!GhG-Sgb?2qSR_kUXR-o zL?;#$q{fmUn@ZteiD_E-yd%CK1?AKz)dn*}rcKr|W0Aoz_4Iw2f}{7#+D$Bbn_fk?rdLo zjUmXpq;e(HA1r71Je1_z827~Bus&#=>`_E{aeyO06jyAPGNL$^IEn5y8oVge$dfUJ zFKkyTwU#hFk;^~?u<;^33xg)}nF!me5z8mq6-vF!tk!AQmKWx=Aut$ah($^K_>`>d z(oMOEpw)N@W~&EZH$TI=i+y z)_U*pGA5Q9jgSSRcnTr{g#BTLOh&bt@L8qeu)!2W15SGc?NKQf)~!DC%F?4*9ZvK{cbsq>P_ZlhMN zP|e9ll~|!HJAq11%P-AB>84j~Cgt*kT%iXbJc*si;_^Tok46djLrAyU6$D`(=_JT_ zYz#78CZYy{RH|=cU{Y^hneAv<138(6S=`i(wY4=8ej?WIH@IvIOCvp_qbn=3HjCa4 z@+Hztp_qc=C9#QQqtkDPm>7#MtgsLqR*Oc5c6#u11|bm%Mt!(2mOzL?BznXevW8JX zGSNrLNTx*{L(3YSe@(G89~31}5IFc$!r{0Hq69Vu6VT46EEd=L+?*4~2x~R|17X(^-&7GpjWi6uL+_fNX?3g zMmWWr5+<(R=$#t8{QV`@#>!2b8jrkvCp9dToG25tZ+HrAi!2iBD#PKqlIuxtDfAh-+w!i-I(L>v$tdMHp{)NB)_1oX>_4Y3SEJ6B)yuz}a z43fpPFfcYdw{GzT@Ck)4Y^|@`@ya{1w_H z&odY9J?kBtQ$k!xWrr}=D4t7?NtH>2RP%60S65GGTl@W6ciUzWyzIO9VJb@^<-Wm=zpcK7P#-_KpR)6qS)Vs_Yk$he%M{0x$D zbxA(ad;9G9mS+=s7Z|^xZ0nxA`;UJ5rw^J6xnzuMZSd~J3+K-~FIPk;TFzn!}JWN>!XN#-Ysld~!|*A(aHbP%Gk76F0j(oa_!fXU;X9l6Th6k z@OU{$peLkfW))V}Z*Hio+q|WrT$adTP!XE(zNr<(WOvWx{MfUn!^;-8PGJPu329m7 zdyfC{_|XHq8#gACd^*M4;LRVu_~NT?zx(d{3*D;$GB0D(ORvB8>8I}=-o7bU!~nh8 zsg8R$e!q16Vc+ohqRt7#h$I=(3|XcmU7D4jE8&uuY$;xL(XihS zeC_V2)(xQ%QCeDV^$U62nApVhWZe4n_^dV@v}@!O3J)3=G%U`}!>EQr7L~^6BnXnF zsSFenpSGnwi{iGTMJWQjd0|y!4@RSY!_4rM))RKBS2bQdTa=wH;KlONr11<%y2w$J5Hy6^#Qyiox0IKJ#_n0+k!g~ zB&BUE&Ms=$_ukukstdBDVkXLOUhHqVakuSJ%f0)zZnX_8X&+E`s(o)e2j zA{?`AHy=D{yMFn`!=8cBIkgMI(8W2KX&Jd?l|{1TWT}wgkC3P##h6^Jnta$cX*Nwf zY#y?M9*vDE%@s05HHQvYCnsf><;B9j3RwDIoSjn}*5>Eej6RS+1fv0Gh`?fz5Pm-b zM~F#GNlBogU`w~t=UDDM`@^N)1^Lj>qKlbPkYBdr^>^PoSS4XI`6=w6X=Y$xY-YUo zY5UVj2MP(HV^T`DY^%!6$S=+ob0F2^U|(nR`LF)+kB&8)+Y=z9ZrZ#V?y^WA%0tJ@6=a!QjAK%qe#SHNYFDNF_l;nYlZwl=r6 zx8J+dKCO=OrFnTJH3vTY=x}36RzXP`a%JFYU)TNL&t7;isnY6ARxg6aWY8#dUaCYY zm24<0m8E2DkR}p5rq#i_*Y7l6Kk=6@Pd}VoQaMS&%-oV~Z+!UPtGjm|KDNI`L?%)| z!_fVfzR9kur%v4+m|aw;tN;QcOE>SR$>1_$lO^#q4D5M~ICXlHLA^M?umqnDD>|#k z@A3wabbbPZ%Fn8-E0LvV7L{&DqC;ktQnfVkq`hZiMQ^iP96i^Lh(sWiy#v?*tX`ufM`7MGT+xL7`)K}#vC$QRM6taxz( z(eDl;LBMAL+YCkz zSu9Or!d1jEV`4}sB#6O8eIBR7X)|dx7Pl`5USSlPIS=1PGMn{MopC-$c6_n&VI;%VAcRBnJmP90B5NHgJNJ2%zP!xoD6RZ}af^I(&g8^X=F%lK=c^nRJC=~F! z-4Kz(X0llvE-#+P0A2d^b>+fPXV2K2LZ!7t2y~7hIbE8Tl94SF(IS2b44KweRjQSR zCA~Kgh+>&ME{#GWQ3z-d5%l?jC^7*7p-2n{hs)+L$T&P;QH)Pak9FR^^KeA5uF?na zJZXLrEO!(X7v-ffvC&Y#>oBVoiWRL3fy1JSG!~B+L%@PTyU}1YT3{1gFc?9S=oCB# zc3xvK5xY^VcS2y)1uuum4KIP+V2fagI24I5k;x=U!bCP6fX5Aa>}IPk1mMU-Sbw3j z=s3vdv{_9?y?T9J?*l+ICh89aArKAtZ6;R)M1f&1taic9^eBjgASeV7DDWf(LP!D* zjY8wd6ao%U!T~;yKLSJoHh3%9Lx_mmY71Z}6g(D(skL`PuJj*6{K+l8AX-#b>(@P$vj-Z zyuLg)+SAq5KQytZu?3LSxa7>N4TS~S85wCwJQ@ZG1sz89^767mp;Rf=I+G&=VhNNO z7L&>3iIS59Y!V)a3OS5x^Rv^l%S-ceShw>c2n-g7%@v4}MR9aI3Wq#V0Y8=-%OqogP$=j&tJjojy~(795rQQWNkj^p7ssYkhy)zW z+5=vA1qVoI@JKiwBkZy2*4MRq16-rt9YNy> zWIBr{6bs|nF)?&J5*{ARVU%l1rBbCeJ3KIS@pKM1mdEFDnN$J_3V2*jn;Gu8I}n1+ zI|wwMNWjC;CgKSsJQe{1&FAyDT~4`TLcpNWC=>`|*%t^!B0;a$2g5KN48dc7<42;;w+N0zr88(G0uGA;V5VlX!j}!U z%?2PO8c&U3vX~4yjY@=35%R-K(q@IH!v?eZ5CovGIC#D>D0rnKVR$aXQ6w4zTj+2& zJiO6C015{KexKj#dEP7pAdql#*ngM7aDc+$5L_MzK2M?NIDt12fCN!!3>r4PqG5&u zZ&Wza1tx=22p#|wMZlZ*c_9i!0?$t&xLvpi9@F#B5pWAAxa@g?2@nW)h%gDvUqUb$ zO!u4&f?GkrF$?h2!0n))0~PKH+>_^hfqN7BS5M)JFgPqs0H4G#lHqFL-u@>&?+4u4 zzXNj+@UY|cE8@v*_od1+Uc$? z@1YFdd+&q?fgDC4jPOnZA#We=o%gZt=DA@qGBWc-Mx1jqZX{%8rvm`w3VL!vLTqOG zB@Ms>fR{aC0C+T-g}&r3pA33>{3U_}`vp1VA8 z+zu8XG`GWjqOW|2i!t9`#3cp+bRI$SA&yo$#U!K#!mQGgw2W26MQaa&id~UMQ&-#0 z+;pwOcHv@%j%GGGL5i1m9Ywg0e^Eym>Nxa#^&sq4P;U*EE`Gn1lP}@~|HZR+k`g}t zkDWA^?k@iapz6bGag(2MW%w`CNd@aK4zrw^+Q`NFy1lf3{x8Of%8%Um#J%~zKiKyy zcsaH|)#o}c$jZJ}waLQtzrQgKJ7`0EpS`>2leYVKhD>Pd_PJ|1Z~Rp(v%`db@M0l6 zV5-%!6xX~=r}L@+S-8eIN)-3SezaxBRKx?^&{?8e(+f3K_K_2pw$W{R&8l^j9KG6x zy+v7A4#^SKNz(l0`tWJ6j?Jjp!vR&W=`@QNsu~mfk`H-ks@dEuCd8PzLGn4M9fw

kgZx#8g+X&>JGk#>u5V%1I_Ugh!gUqUFU(Q_8zks@S5GXS&|K+AMc;tNYpgL z=4R-*KAf`fTaV$SY0~SKuhP6Aak;_qAdoRbz%5 zd1rIRp@+Y>nY;4(EFJ_dZ%3x>R0zXxHT9Osigxwg+@qzCuP~L9{=TE-plkMh%cW@*#jPqPdRG-onEB+0la*#Crw@>2A&?L0+n zIL&N&+AI{d42tuZZ<9GIhBiWD&w5VCknUlJBtY+WAZfbC`kM6!*NZ&$R+`~9Ipviq ztKUtfaht*6s?W@XQph~Mggn$|AA9na73|Ar(f-44Zav6*>YY4;G`bLeRoACXwXb`j zr^)O1F*If+=!*5|YTT8B+Ouf*i)RK`&fDX{*saCTyXY2{hh_6qMY7_{tg$9tSXqDwj@X%uF+NeaAcJt}IwRT}}R86qbu8SoNQndBqAXxkOt#R;nGx%ZJ z+Kl&gST!reXY30!pE$^i$vyaVoaQmmW}5?S+DuR4H(|?Mx(3|i_dcKI1dX>?W@}&f zyLnDl0E&HPS^i1F=bSLl=^nd#o=X?`H>52mA&ANvTmobod@KKA(I!Fpx*6lR+>b2@ z-8l%P?|qmh8jlW{Cz)_AA}RcKi6@|E)-@5niYbiVoq+kCzVET6Y1o940L~=Njs0`K zz4h#v^Bpo@mJ!FVI`D-wkB~EVQ8LL$^>4D~~EJ;G8l1%?uPOB^TJwMO}P( zE1{U~WAA-ydt?%%eD(XPl2Iee&$A#D{K0O536*^KdDX>u9a!?6;|YO|seikNV18JQ zPDkle|1D&FlZb8m`!r70yF$C^qVV{NzSb|pPW`(X~Y{G4-;s6X7eKVp`tq2_pVlC|G{zsjo!nu#l7q)mK@{LlG z7Kz>b^pbJ3HYX3u^s@=b@IRSZ+v$B$Cou);g8ooq2Xpm1`Bb|mXsVOa0x|AiedjJV z*h|ZQojMq)*$R%q7VD{D|m?TaO21y7TC%MIe4Wy5IMz36;0Yh@!=#oY5fRX8EL zo=ky7V+YaKz2Sa0LxoHOa{9#}0=>FTxkZIoW`^(dZ0VU#8^A6=Rm6|kuyb=v-+xve z9}dpi=Xx8gvl9&hBX?O-w*tC22Fr>;W1?thogA2?XB6gmF)O16feb+j(4k44YIFch zwca`=2kC?+VJ3{ubK{)_bXMd!59)9_a^h{r?vyxaR}h&o;xVb+1>=D1#P3yy*`LB< zqs~W;9HBES);`)T^P*_607E)%pF?Te>b2o+di<3PH3v?!o*OW@sa8!2V$XSIX|@6p znZ&K%vXQn=5uA31&Vudvn|_5>>^*;8(@crl3qq|Lo3LHqli-=D>~^7gxXcGNOJRDd?9Y2mhDm@JiL(Un9dD!&~nb0X{r+mT1bYjk{&~#oBP8$BahvmPUrzY!m1OFU< zz_%duKVLMJ_bf)=^U!;j1+Os_fcC!*n&G)T|L^E}TuLCPf&-ZQsRrjGUHABxe2~(g zvhkT^uBmS(WV?th?p^~5%t9oe`!U$TFY+kj$_Xt|F$;+{9T+zCKk8Mah3*S|Ga!=+ zy6a>gJ{B}|NDEjQ!9?j=I9}eY216Q&y-SVQY?X#Ut2<16w|b$)aTn5*dw4cDi^^)$ zhZ(xo{DXy^a*EL#z zYZRE|XCU3ZOFGAAh08Rw9ET$fg*4Z30A@XUwyo}~ST#}gbc5`LBbqQz(P7XnFQr3S z2|?tPM`Eozd9Hn8St#o}^rnkdD-N*9HJ?=cHnt?o7?=O=bS*j~`d|*?scvkNNUI;u z1Nd*MWQXJOYriAe-!Q%5f^K2 zoAWRVjtUM0pTR9Iy6TvVZFS7UwU#d&%@JSim*9?YEW94!lks(qy?I2ktypd>>weQY zTlY&PXZroCdA)>t?oBl{qTDJ8kNxIfQyc>F=unBdtE8<>xLfzARWR}Fv$Z zmU&%|Kzly8MFNuZUD)gPq~&TR?4b6{ zeC5!~jWc2tWHda1wq_4N!p#>r#E=UPCeB5;Nur*QOC5n7)q6-z?J^cTIbiUEuc)XI z2$@HbzeGm~)pKQz%DRR#{C+zVp|1aM;D%efh%JDx5(;8Oe8)ViRp^!ElYTW7*2VKl z(v4n(pc=dIQNY3dV2j4LXI|RQB}xFVRTE{mbdvowL13I4y2f9Pi?9c!vKeHU;zhNI^T;m?&hVB_mwZt7X?pzbn00}1{kVI`(%ao| zi9B{WdFJXrl{_no?dx>;zjV2oS^fib$`0I9}2V;O-hMR(Zb5p+HTnzg#>$N09}cz}(>NqpW{(+rpG2?#);ws4IF+ z2z}3lUb^aT8@h_2&!Y+E>@!il%fZy;T5%9|kVU-)9n++T3i*Mh@P=uU!$g%LNb#Ws z>$=>i%?n&)Iwc{v$QyBs&7cIEWl2=D$mKdmoOd3@(GKTuVTKMS(RS>Gz#Y=o2KN^AoTt*y)_w2$ zEFZ*XX(xb5#MVl9guIsH=P_0Ryyh{(4N4QWfxb=`jJcHHMl|;e*K5JqgqE4G_=TSr z!^|6+>=O2#b7O)R`d#nfswU|9(sAqiu5BZ6-=llvSKK?QZ40D7wKzI-J_F>VUpDz( z5!c8{sgnc#4~&~Oi>_`rqDpNV27+^TUkcORo6B+O($}o`u)*JCS@?#T$dr{2+K2I6 zR_wQkPWj!;#U^xu_?OPh`_+FRCYUud!i&$Ul{cspy>8d^RXYVKYop#jlBYz)g@X68 zbdwKNrv3}R3A01SJ6vvCP0ET>m~S-M!~qs9>!i*2#~k4Tr3~4+6&p192@ntcGUT6l zSa*>VG|^}rDS0;@5Y8=^XOWqUN&iY@$coZ;8Fr=k$`SvF)z7j#uff59>)>W#M&e4F zS*dwluYdN@`@`Iju_mjl;18_Kg6+?$e4D1}q`PM?RxAuEy9M!1qM2-*o-$gZVCirwzpi`7Dh5`Z@ zmDpm-`jOC#wQ^a8V|RZ*nYu}HD}mi^nXi30LMAo;bQlA9+wGeoYS)*B&P@6j8LF4! z64$yd%A7{HQ6 zBya{vSAp**f}!1vwsWuS{%H%kjMO_5l(_hKC&jM0 z7M~!gI=O#SG=xr2zw3ALX8g7lZ9g>Pk_{SA-!D7u0H&EVjt5->4FfMPUPBI7wB-yJ zhvvU+`hi-PQtrYgjfz6qb6y3iCru_KPLFY+(-4#PfVhUcPGx*D#39-^l#s;+$emch zk{4b0b~(VVyAB<#YTeDqJ)gC|YTDFg8MgI??~Q6|A>Q}o$a2#6`+zBy9SoNcVW++@ zlD`;MhV0~d`LI5Vd}S}I%`&ia@>rkc8M_iE#)P@k>Hsh`U_%i3(0M~a^%o3b)1V*g z;2|o8F5Po>5T6WdnzY7uS6t9Ay~{}t2z)|W*b0wQAbr~FKpbgBCL`L`QZu*P4XKtb zgP!!2kEe-leSJZU^rKCNtPS=7b!BtBnjv7U;dO&4 zne}!*iqJD3RsC*o)bcPC(h z=StmcILq|suzYSf@B!Bng|ilksMaAnm(h2pG>e{Ai+EApUbOdg9VqgmMi7^LI&O2v zVN{rW^`cRd<=occmTzd;OZ1r;Uex zYw~fO?E00xK4k3q<6e&-L7P5Y@o_#TU&|z3$5af3+&~T~Vo_B?q4%(z8=-`{W`{y_ z!;GIBqs#Ft*PdY)KV~gB%c8EyKKfwD>U%nKGWw4=h9=v;?=?6^^npupAAF|Cg4MD@ zqnF=GbIjW~v8B2$=r=(FW4?LnFYAd8)t}9aEr)k9qGwvnZ+kK(N#>Q0&QqKxCOjkg z?btt+D){7tt*)CBE@MYhe*k}pNr zB5=hvHJefO3wthZ8|y*Y82-7J^XjTkDrR}h(QAF)ImKw8^^7R&hs4;f3?8^5R6O98QEFMTGI&!PN)eMTRWDPhk*1u zzPrmvW8Ru;B6g%*is7%g=Mu**vweH*5-Mr@{f0AW<~%A!#*q5}C&kf8su4NeeEK-` zt{q33KOF=ew!XOQege%UAd}qgbme1GWJ1e#>%wFrS(k_1B63v20LI%$fN}dfB!<`%9D`Xd7(1 zc*qth&62~k3O!f~y-n!p0y#5Z9)*Bj{U%Mdo>Z6S9`)*T{Wi5!LdTmOcTwAAYHhMj z6^m--IvWptSn%bYegU|AfT2%Z&Klh#-LN=(};)OlO>57csPWc5cJljaLsvh>s)m2TANu8}08HDa0yM!|yF2Ney!~cJJ?_}IHrquD8njuIrK!LlZRcUPisZe9RCF_s znjvjGEu^h%gcKp_=K>rW%K>59w{3o@o1N&Z{*(RQIl`BFsWf(j*)>3;_*#zO)k%c( zNxwIZ^;d3+8-t(rJ)w1{H0d&4bI}z&5xE=9*qfB$PLGV$UpOJ8`d>6j>gt1{l9L9+ z9mh5%H9_!nw>Wa18}+Ttg!*9tuL&8id*0|tn|*bW>Nq-0D>-_z8R;@ui%S%J+%L$z zV0nLIJ0dE~S$}s#H?Erq%DiZjm&VL9$i>iiz3%=a&n}X!+xr9W0-K~I3G8}o0qp%G zEqS-e=pl8C8GQ#>$qRRCcyFAdFP};%k~7`D51g6_Dm;F*LbdO$GcPr1-OR{2Zqa69 zpS{BcZoXMf^cm>(`@w~=79YunD(!OQ_0odSi4M|rXazeal3fWYap`3z-vf1s zGX1+hYj$gl9jCuO(xha9gPfB0+}yZY)Z9#{1anI(I{3$?8IX*&x1 zZYDAFv>*B~iN#BK2(4#Qd|H18#2FeVLrbJRxT`j;>;LxE_`UW(`Mt>iBQVayOUJkRe4dF_#>Z2 zo)~k>l-D2LxFMQxx=)^3jffb3vQHdkBi-h*zC$2PNW%bVl{l+kYM*pteW!X&|%!*%l>VNx9Hr7#Ft)#DPq^>#fmd~t!2 zFMrWZj#}?ByJpqLr2qLc{?jhcMIR3+AG5a@sRfnMSX@8aVYl=OeZI{k5;&tMexMyd zrkf9sS<<$jvOP^F$LxyDyEh_(*SqD>7Oex$LAxDCNy$fRk+-cld%;QPy-=E_soyLa zIjM`r_VpS?8Fg?Spp9Qt$$>k^QLz^+WKq^R3yvB8!0}B6En_{Ub7ESN$@qq0{(U!+ zPM8wf8L?OFuZFJAfMIjp$DXd+EQ@F}F*+&LNPzT}H}?Z@oQ9JKw-uIEytRaw>p4FR z57Cb5azc2c_#A(QMN!D;>qA#XJI9GQ@=6qEyNSx9&OOzu_ zZ0ClwwcAqoKi9fZ`Z~Od(Opx4@r)<>c*Cb=hupI^%fF-?9nkNns#Qf^y)~e~tyiLl z`3Ee|JNUZgtaRS{WAEdi8-q(!49lC2os6*S%2ss@pIj!Dg=F*cYu{Y z6479d3)FI@3x8VKhM+(e&+V~Xu0y87_L-CY9-mkk2?03S zY_Tv&?gFL;vr@N04v=y#OfSX{!;^q>`(_aKhEEZ+W^VUtUyeV9&BeU-u zwcMjkrwLkjEHty{iB}*TxrfP`EVT?hC~&lx?#HANr&t!Yygq0maeU6!bLq^VM-Tz#rt9s)V!UBjs$OazJTb+p zVW`9LS+$oJf#?F=+JpyE2v*+aCmT9lRcrv$sT8h)+*0{o}R`~&GEsW%+3W4 z(2BNKk8R0@gWXj=Z=K+WJ`)`r?H}31IH*<9iwlMGl>i_Rq&eF~(tV{{Yn<`kEt35q zpU;^d+V_t}9BlFV%UXJ_6Hp`GJHTY!@das5c!ONq1lt2Xd!l0m8twrUEsZn`K_UZ@ zmua@CdF$H`XhhK2(K`A{QIP4`45O3hoIr-}wl{Tit>~V3$QoBDvP-17*lRYo4^Tlt zrof}c<>d>f5Lf8-43j6Z@wC>gPfRh^?GhqQ4mj&e%U0QiPG=hjTV4A}f6M@`ZS8gU z+m|J3S2hKek43rZ(shu$?zOrkSJ2^DDEY76lz(xYQ5TV$dOWY2@v+%9UwZxHPrJ`E zC?kCV87EC#a`<)~EZ2B&Kmd0MjV*BE3ADR>`{;1^(1O`Ti-H=9?;FG+dQNB=WY!?T ziMbtcC32@nZ8@_TmKAnTvt!5VbI*-e*6^J6nl19K5IV*j^fkKN0;hp?8|&7+)M5&= z0pr=f5OY0dqf$+o?e)ly+k3m|x7ui(p9QJmQT27u>^$?vA#Xy}UP6KEV5gI7`*K*0 z-$I9(_vj2cHE_KH;?EherUxE%o@WYvBHSrcJzB_B|5Z_T2m7QW$?WeN1rJE?tHa%X zoxAc~Q0s?)xX(k0KO~MlwaRJx81Qw@+RxIftfx-j+)(_oSg3de`}$k6*8_>@pAL$@ zajs|xvwgmq_kBo5bwFq>JLCK0nb(Baw${K~$(+B55=Nhz7v)NRSxw#g1y)*O^mH~! z`!{iZG3rTgB={dkIoHi!cgI^i+0FUdqpCK{{}VUqVQ||k$Hb0SpLik?uW3p3cuvm2H%Hqqpz*g zM?Tr!PMCX!NSl36xRJi{43NWri@AOE;H9$Y_${>Ty5z;lHT5&e)iV84Za(gJLF#S7 zn}KAPr(-eqNEMZ#)DI25cf9M~cx81|xO^Qu`o!`k=cU=#S2rFT9!P%E-?^oDym1}z zXe;L?3$*L_k$}}bT5J<6JAI!fz03TY{;L9bRRA{qJqkCM&J3$F00FznU+5xmala z`%30*)9T^WsJh9xuY9_y+~eCC1HMgMX(FZ%{fi`f38 zx_;BDzflKl+RFXPpHnBoPcEnaIq9&PhZnHIen>fa*N<26e7;FM{O@uEVb!W6^62p! zvpBg?tjEr~FSa*Pr%n#asTsF>kd6y`E9ELCRr+E#EEYexU@rNhyKxOuUuk49p-PQ~ zkIi{SPK{bqNe8n4i{_euzg#~#yq4f{5l`&IHmG&(#&mpg1?ALzH*&tfe;w` zG#X@L(k*hZ0-H&{XkN8h?DZ)N+N|78#Wlzi)2-)btbwi2TN#SiEul%XOqXbP{;;t_ zKP#!&ZMp%UC2S|eQI8uADB@{yhTCcjuo(D4lvzUTnIU6))zJZfezpgyV(NlZ-r(!ZLl4~hsqtljhlOXR)Xn}N5yCx=gHtMRYDAGi0zGgI~!kY)z;z}H__{q zLt$4#!}$}A30@oB@QBqO*DQz0PmsIN-!@~jQFX%}xCUWFhQrLT394l~DG}N^8x>Xi z#_h-4r6-a^?Tkqn6~1Dy9&Zo(_sHqTiu+bC#=Ub%10&Y>sS7FvG{kl>shx=~G;3*e zPF|^p#D$4^^}a_lwpl*HPDrAvPMnm1>=ROq`cJ~6v<;j{w}BD!Sn}GqF?M*$F~N>E zMhsf0)TG6VYY&4#Y;8~=Xi7vr?>tS+Gi5N{tmc-TQk_`+c-tj5DlSw$D#Omtnk0vx zHSPzh`!?OvTxP~>F8^MWKJG(oM$oBR>V-BvuXae!j#|@ir}!f zw)ALHn6-d)DAD*b1w<$20wO5WUI=qoQx$pK@UNrwR`(2C<11XpB^er%%QR~1;8Ma zoQpIV3j$z!{aAq@AhmLl6lw$kN+n>ZN_MWsn7}azsYC_F!Ie7w!M@JY%jSIhU|)eX z$7+uCX7JNpu@M0x6YZQDJ3GR+1yV2=0zsGCt3tTCso0*P~{~6or(2Gs7e7qqK&lY zqDw`C8i;@!^ia6|LJ7mbv<3tcq|pFC03ZlrWQ>K$&on3#v=IcL(IYVsxeSZ~tAWNC z;Q5IRVuIBj9_lZl9Ebu*6)L6)B)d zuv(!78W{oQVwnK~GF;X?>a=Q^L~UdYRi4WYK%GjZhd{I!a;OPPD%{gyPP6TBO?R?4g&*$FeK`7APNpN03i@46m|&^h)V$o1cpE_ zHwl3wpg^5Q2fSPYpwV5{ZR&xS&H&JA43{pYS8KFd9S8;kY7{CR2n^6DRr*U^pg}E@ zUiy|ne_0f&Qz;ZmjR6P(Xq9p`0Ax@pGys5FuFyf@Ahk@c*6DNr2o!j!tI=uHY5?^A z&>8~>pwnnB=eV>K(4f<4b(a>qoY9aRM{&3;Aa%XO;7beu5Ob4r11>S-^1UoI&CQNY L{ePUlf586+Ygr;_ diff --git a/sound/direct_sound_samples/cries/uncomp_foongus.aif b/sound/direct_sound_samples/cries/uncomp_foongus.aif deleted file mode 100644 index dbd6f9c5cd7965630582620eebf54f230a5dca24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7608 zcmYj02YX!Am9MvX)4Ph*Wm$5;a>q8<-~fggLJ4J)KnOMEOTPUF`+dnr*buUt@bM+U zl1@liNP*<9cF#TMraSIB zfFPZJ-n;*%n{K@00JM=9fO$x-FM%<58i*F^`Zql z#Q**ito-*{o&Er5c!=vbZVSRcX!}jO)nU7c=h)Bz&_!C^C~~#KS?NGp9jNEp|LAaS z+e2FuQE0j->ilbmnemHmhEAvV_8=r;+PhKqmF5M zEr<}PZJH|(dThf&p~o;0@-t}ZCQ71~W?%rJO+edhwGF>tHxLrDHQfVf0K{!wcS*w0 zHHRc!L$?XSH8qQ%5OZakW}p--p`$eJPow;yE)7t1D9Y6oo2EToHYo-HNHVA{=>&@# zvW9cGDXBO|nv#NYlqJguN7;((akQg|4#&8PWV5WRh!)EtieNGvq6!8R0I0J(sx~wx zh-*!i4iZ{Jr9*^Pm+3I6)g?MYX?2l~(ppuZVvJsG`moj{W2{lF6LHS0*7112tX8o& zZ&oT;GU&rp&?r@ibkHc4$V^Z#RM<>F&e!-XE9M%JEZta;;u*3wuck6sdBMsg+~OkA z5i^&T$j*qiP~f`)(p)*-N!MqEOgmnhHM_FT(k#-K*5~Hw{+KwOj}7qEOO>_(rZ6dV z_u>l|t${A*@+7sUO_`htk0hJt7BeG}(wS2CFuO1&t{%jv&pIQ0_QiATHJ#GfRBAL? zIknKUA+&hBv37*GcoG@yGtQigY-(#9pXuEkng4rj-8$mp$HZv2cJgA|=0x#mX=Ip~ zJjrb75Km5ZkMgrDB1J>lF#AtB-6Mb~Gbb6|D3wP-xvc0c%barSvd+r#u zv#)SCw|*Ob@_6|A-lg}JH*Q6aeVn?!{mKW;O&jgw=dwGJmp?K$ua=I^^={-YoZ&WR z3n!HI1Io#T-VOA*vC!7c+(+t;we|OBhj%e2jzzBPoPAf?u}L{JIdEP0#L?ijJu~lV zTi1(+X4ht6d2_4tADr*n7xTjPfx-}q?g zx!2Y`HuQ&=Qjcyw^sM#h9TQJYfAQhw_mAxRR_I5suKo5kuRI@o;-*7CR35x<^80fK z9#WqUeDHU;m4E65CJxM(Cr!C*<`T5J)uV4G- ze-V$~ar&v{d%s+IdhC`*v1bo%|4!EnFL!?X+Si}OpSbhm|0sO*a>Z{oYHy-?-z=OO0{xkjFThBh%xbNPnr!U|Bu<*?3y^mqfytD1!JAeG^ z-fwOC%?q(7Zany`_tkq&|7Y#q`=+11a_7Uf?~m<$g!u2n+n!ARH{z4+e9gNc_v8hjx2^W&@U3jg~2x?8=#kon{^}uoOV{{E*=yr(O>Nk!{9fC$as2h@=LX(7GO~|-b#~kJ z#W$>N8^_*{T-$N@LdQ1mNWEvx@+7t@^r@K4Rwu)~?3u;Eb?V#AOF2BiLH+=MPY;X4cONkxGiDqJb z^|BjDDhFT zIj#?6W-rDE@e7r%Rn-Z$k2}9OG*JD}+TC;JgT&48ch3y$G5%KByy4R$%yrqrXM6Wp z?<}p`S~}V6@5>dP1X>SxYMJYI&n@(iHr`dQT{Heca&PFJPd9JN9mHL-k}%GAR(f>UDeXz$|BuOE>uz}xqxQfywM(5%%z9q zvHED=mD9x5@TIBf0J0>pl#5eBg;*7sosSQr6U*(L+MFFnG%H}%@HDkhObrQV#r3^2 zXX)+y+4=T0@}#wj&zDp2#xmXJE$SJjQ42-uC92!LB6nt%X1GCgN?4UF%tVKbOJZMk z@p5F)o2>UH%QH+5Jy(jx@rvrQJ?&Sg}s@^z`6O z&hO9dxx4s_#ankyy@zfIUarO2Wn&dHmFr(qId1KWk6-LsTRqPVTNBFq_}R+?n@UH_ z9jWuP?cKH6K$kR44ie{=hq`l@=r!&oqbo39?+h(2rPq|k@N1&uQys(FMKv2}nv_+i zI_#;+Ku_TuIZRE}yW&fW$4o0*`gFKMp2Aks6S;xD<|%J=G`|o`n^lLvG!Abz*t9cO>u!_InXB4_ z%SJS1)s~S|n>#~jb}Xwx!+jw}bG;*!%7UY_7qC+4Qeo=CBzCjw-%sAPJL z^K-qU-Usvj+l^yOUBk+3B@w~u3ho7LOF|h>wP;V%!jw|RI^4x-c9nR+8q6$C1_$X& zl|)v_Q9&DGBXp+R+bx~cM>>|rvED>(nTjGJMwkK~C5sh)6*^su4C*tLc)tc(+h*q* zfjC`})lk@N=BaF`u;g~c%XvG)NOgyyF-f-Kd_Ct4CO`cou_Jc))Zjkit(oDSjiYLR z+u{=2u9ck-RrUx$)+k7h~e1fiNpv!QBJohb3~MA=sYGEAzCUjDK{^sqvAZ4 zVJgK))F?V}s@#Z2v>C5IJa-{J${#!5zYBl&;>d38NN)8S;j)+ts+MbuMAFOGQd!}$ z(-)nci}xer&8~LgQ!LF^1)kPK7D7iafyhmo)eV<7n@E7I*RT}Zs2K5(U91OF)KZ>Z z#piNVC%asx5~w2JB!X+MO0$}*#R9@Ik)aApi7t0)sk7g@P+8TjU69*5~Z!bVdI@Or}x z1=X?@3(HGpCL%4^Z4q(7$%Mqb7w6@Y2X8B8Fs4?dP)c8J#?!`WjiHEZATEMAh~^TQCweStRM9XeR)`o~DYHquUS{HiTK0mxw=6Pk^jv{k!%fab zHd5oW$qm>RFSAq##kUX41ZAGU!tSQqx(Ud3_5mcVjt5%Y26wy^op-6O6l{y+l zHPi7t8WkbbCn{AgftJKT*cEhyB3-TNCAs=MG7!m4QLBSj=GjiJ*hDzmH5(?MHf9^? z)yjCedqg`^XdA|-t}uhi(s^ZINIF^UU#p#2?&(%%Ek_3=DB`+O0R(I3dQk$CRQY@;}Ervoo3s}t4 zmgKsY!}32-ps{FO0@A=sTLzt^s(B~LsS3qN6*nF?s!-;jT7arK5Nd-uuJn)f3iL=2RO&UD5DN*5g4wQ zn*j(6${zSSHxZX+q-fHuIXo`Z+;EswN=>jM4OH69HxvEL+_cvoltnhGF4n@`!A4Hz zLZ0MC_{OZ5?I&|NBu>jJ6Lu;!GS2CuMWBX?MmV)71*1sQ;n3pdzDMl1922mjSLD_XXBnc3w0@-u=h$31w#v z2Ec$dE{fD7B7_MF5rWmR2%*Uy?HLwHS&EK9no4tM%9K@#M-&m^a9u@dOqD#2F$IHS zY{}vnyQx>9itIN z$2m+E?EvRCMJz~5O)p5vO^+iD%|=iZGgXIWCyV^pnz#p!yDOyK1TnV`icY{@e<8)sZW1~(@+Aj{^- ziU$moZJJUI*<_cJjZnaFNLYHLy@-Wp{C{^ z^RkOOCg_p^I}N}wNRo~U`~+4}lp(r2BR5^1loW_0Yf2#E)K!W#A(&xw*&s+rm!gge zvP2<^2&q*FAxzMC$aK=+C3TV~)uzEP4hR{X780V>rWe3f5e-1}Y2pkB&~3emuu{bd z(yEF>Hqj<<$3i{R!htq~G~syTjfO!}7Fd+6L6{EdT-&rr5Q+)3sve0NI+(EwIaWAE z99e@`s>fj>$cRu?lrUA4r=+^g^I*FqIDZ9UV1EY9fGRR@=0RE#6(xklbx4Y$n&L9R zUXVC$s19UL4Fi_9Oayav3#U94w9QjBl657O4mcu21*Yuy+re0H8z@b|vKWnND#8(x zh=r+U1Jo5_p^(>5=pX|6N5bYH|BKnW3;TrJunQSu03a?ut!x1<6Hwcljp7dI7Mzfv zV1B0A&xK=%p|~s%ZZnhydVw}YunbK@U@6E)L#7*~fqQT^QJ$`$z){2Ya1R8AyO1uX ziB>Whv2+KJ>waF@geHj3!9Xu{jPos%rC=)S2?`lTMFoyz%?5@jpdY{nkhSF!xTP30 zi%1gY%i04G0+RzEEtWM!6H*5f09|r8%3qH*C7A5!kR}HadM@at?f9E@F~qbn$XmNO zru)fhNOcoFFI?NjQPc1s<81;T44a@F#b}X2fCB{M0DT3v!N+kCU=iHmG=#!611B8S zCUFavM4&ccTR82>Dgl05Az51jwX{ToWIY8;67}T^96)fyfYlt3i)+9H9~J9?0xAGYsYK=dR?5(i7vYz*oTK$`=)gqn)Yu%Mr`Z~YuNT8kur%^olb3>dS0 zuLNA7XcLaupaofa&i7OV=msd2ha;x1u|U6%1_}@2u6X_{Yo@R zm9qM5>yAAj$hpYje?DUg}{!06D|;ATCi!KE-)TYI{0A_J^D{y_Pl zrDJdr0%L@t5(Xq&u7~<-`eZ=^s3KttxUcgRSffM3q3@7{Z9t!I>ktI{6)iyFSwH8@< za3v!D|0pqJz>B_aDPQqhjR^ zz^jN>2)jDGHT7TT!?@4B{^M%;0J}*d+xgNHfZ_pc5FlbAEUpnivR!s diff --git a/sound/direct_sound_samples/cries/uncomp_keldeo.aif b/sound/direct_sound_samples/cries/uncomp_keldeo.aif deleted file mode 100644 index 4f73fc22da4ad6cfa83907f06449dec3e294a7d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13144 zcmYj&XLwxab>{75=1y;z!JrqS5FkK+U>8ME6iIc-Dz@b&$KE{NWS`CMvzyJ2{hdvA zH;I$All9uNBU_ea$+jvbiei!2K!6|tk^s?x0WgE<_4dAJ;OvtHK@8^JJ6}2HJ@0wX z_kDQmndhHEkdbGPpLy)D6VE&azaxGGMUcH2gn5{|%fWm2diwZNC*g${8{Oafm9ISg zDBQ2?+^GMs|MlPh_v^o2{KFHvO8QJiD(j?dc$^r96lJO*6hb+&prL+GfT3Jo+$a>e zm_O*U+nZG0@-%s^yz1se(H&rwQqgd`5xQwKHu=}TzOvo_;;aAh73S<4;}4pjfBNx9 z{KZc`%v${?S`W61lOLrEt=;{D5p?>s4|6U1+N#xvPrdf#+jDI%Jlk3Lr;j&U$NV(f z>B@X|lWRWOzBNbmh8&ne$~h6Ot=zbuE*J7mPo8!!emS`ya%`kCLaschs#Np9P*2EA z@zvrsy=V7mRJwaBfwudapBj~JTwklX5l@Ums-=7~<7keMmSk2pvL(|Qi<-qE?Jbu@ z4P_c)LA7d$+06{qGdj>>@I-NOPHY+*#I~nX`4WYOI@>!-%QLqnc2`$ZgiPO^n=3Nj zruG(lWA1jMWP3uL@yg2W`$90*+(}8i$fq}XXM1-Okt{K_FR>~#O*Vz`<#mx9>#q{kR9rYK}iK)qi zw&%zRuP$tE+?(f{4|NBb8o#mh;9kks*c=PEtWvI61-p2g+Wd<%CYBXCjy$}(*^^vY zyM69@x=xvGg?i~m`m>N$hw#yxkI+JN0Q%XwHaLk=i>Do#fE5?Qx z!yTkaHb6?Er`b^|2<3drc86KIJ2?OI*KU|y9V4$CWgmRGkhPty!+wLmb!oEHG1~49 z_)8N@x{KRbs+3l*JkU``_t-9U_TBRnYr)ac!8lvHer3EsIOhr*L$EXN@f$&UtHgCHg)uj>~6r)cW>Uvkgi~~@A%=6Tr4Cv6M3Yg zw`H)m0jn&}uC8vA1BXtXY^KX|S3kZyUX1N~?sShUf8n!p7uK-;v4e;EgN$9w7Dd+0 zxWZnW3VU66esVlZ2b)_v2m8o{sp*+jG<5jHz9BrfGI?vM;^;ou=He6Sja;H=S~#b# z))0j8`h9qHb9qxnP;X0<8?9CptB|ru6s3Jmn!{`*n=gvC>2QQw2ntEBudkP7NBgdh zC}t#Q?vF1l*4p>Bg*d`2-ko1dAe!xocJy~zt6P(|*OCI;bNH1PhRwCPb8k#a;e$^+ z_xxdQbMpFUR~LBS*s(nWjb8EYg-@Prsw9@?Z@&5Ngb+Xe)bo!=3imJk{1+e13b6ydO}pC7Qk5@fw0^T_8c3E zIK-Lrzk6>YMGrmuweS4dSG%`9{HOo+!`IHuOWwZ6zxK_?+lv!tfAOPVOh}>D_C1e0 z`QpoC)aIxE^w&Q;pLF*QkM{NSbvJjkyZM=$SH`CkMtI-jFP$6?W5Vo>@rgTkS1M%R z6W{*svqRS8Pkwg!p5|-c)7IMTR?@XnYH4=6hOyE9-TQ}H$zmZ_-A=40^V7oqqtAck)JT7eFm>+BYnN_kTzkIqgJ*Y<#bRk`>h4mikT2CRm%pv6 zz0qSO7ZxW!znk02*zwV0CmugDpk4UkU;pgA38CxsH@^FgCr28@`xoB+>3etbzQLm} zfA_nOxKkHzeDTqTi-Eof7LR&48dHU}`K{FYHbtd3GDK^0$I#*C!tD69skOW$QGF*L z8r~h|mv7x(T&&{3u7QKc2E(XcTfVzqkp+dNFjurQh`LC9W4V$~r7OHj`C^SNF(0EV z>Gh4ZnH51GcO4q-ZRLvTt@Z8PMk?nzc=XW&afeadda#r#8YIEC^n+g_W@6^*g~=^E z)G~Z%IFP-2<+F=lJfJ(SNuccD5tN)?r zUVVAkRhs(f^^b4NW{l|W!%uwUrM*mX;fu4MT)VwdGW@Y!BcuHhDV<7h&EHQ{c+J(^ z(G_!w*|N?$8G^KgicaE~sZ~p&?P=`V-QDU_lS|8+>EzaW!7%aI*b}D@hKoxV-}&`# zucjSAU!eEU{=Qga6It9^y+1WQn~;3HyW<|psA4T6{SAIUvpSb8CleKsw_HvAL&N*_ zcDicGg{eztZ*H4hv?&%1ha*upuB7fwEv70K?Q%F7&Oy0Iv8tkUZ127}&dZfMpT2*4 zZcXq#^yt&iKJoms$C|Z;&wu@+*FT-DFx>|pf9j#*`x}*oiBCUx_tJb0Z9RDOi8FoH z=IYI}7Z=K=iHGCiKtn9%Fw%4LRn{;`4;PGtZC=l%=9jYtPtX-+dWR2pu)=)tgHL83 z_-I#~x3#guD^(U2?#yka(3ZAH+=uIVLCT66FQ`;}IN~t{DZ{7dzr2y7LM^+ycXxUl zX;Vntn|`pmRlr?s@y1xR(MJ;w3aKp2CRR3cb|?}HB9-luyR*aRbLiRCOjcA>y^`Fl z2uwq?y?3y?J0MBhTe(6ijd;Bd5|gTYK9xvImhJCoZHu?YP^}`Qrf2TV&7{yk|K4Lq z`=YcZq-SQAr&m&{BhayDUr(E#)iT@bg%V#<-LdXqYnWhhO3v_>Sg2`)tr@0;k}g&? zEF@RcWtKv8k_>PJ%S0KAU%R)syp*e;CepNvb9$X^QPyV(`I&n+vo+mChCB|J%M}Sb z@ce3Slh-B0sqhlwz#_JRkRGfi*>-kudNrNL4F?y9_H?*iUM07@u$>o6CeE?3-lkYM z=&B~OiKMNoM3rj|(Ayhs4~+>{o13o{TO2|*S+1_nr*gJz$C`o;+{a-x-q^S^SK{+( zQ(LFs)7#(3CsT>d=~>YkXl(86=TsfnF|#aDgvAn06Lkav7-6VI)h1a-fI(H=sT4{D z9m6Vup*uNOAjr50zLYE!3Czw>jb2m|#Y&Zo_8k}i^lF+W;>zao!WQ9j z#hP0HSESphRTCLg=f!F6)PH8eh$AB{CKl zY6yGmN=4I3nN-TsMT~XRjH_|io*qDDq_wl7!9!FN8?u2gzCa-0_IUlAJKPX!Z4Wc$ znR9Rb_^U zbC)JIYa$zJ-hcGafxV5KUMY(>t8Y%7{mpytzBj&Hwmq=}U;X~~{^;uu_j}Fq#`-NZt1@z4!XB-~429X{#X9v9^Jur_Vfj`t&1vqv+PumEZsJH=myW;?`;+uQ4s1 z9r50WPd@*xSH7}8uHX9YuU`8(fg&?)e-9iL_ur@^0I6V02)x zzoj`EipC;NVe`TKT1sYVr#BLdME#+FClHM}%CnQx^Z86gttvGsTOrXvM`!2go}g1t zB>-<6hsn9*rs8hvXp4rM`uoPt?1|#)c4BM0Eb;~08*T^?+1bl)zxDq3e4)x~7U^$p z8$5XC*%x2<{$Kp(AG~n9m5~y2vkw+Gl9}9gA+ue{Y&^KXT4Ovuma#QS+g{6WYfNXn zA%a>(O4nj-qbFZJIXuwU?nO(p6E|+$y)||F^4W9eKe;##){1p>3><#sk&_SgI7_Ry zZcN^py!i3&K6-zAW{c||8#(p#OW%I=*+=&WiW6`DXUUFAY@d3Ju{;;jdZE31$U zL*e-DzP|pR=7uO*s#LO@m2^hPZzb{>(--I(-0gRI^m4IQDX6N-a1^B$3Zg-_GzKFc ze+ZZ?pSbm4Wu;04qD{?|B8wWyk%lB}Z)B3&RS|fZjqg4F+;dNi`qYYqH@5oh(){_4 zKKS_j<-1EsIkxBF=bk<>5)U-B_Qu`v($wYmKbe_NE4t|nH}&n^fAILpv4Oq2sLJxa ziK~}C`1NaVd^)p@dfIyrKJw_vW5*BdiDH(V&#W&_etGfQ%*>WxIDGN0o_(Wj&0&9g z+#j*G=C542z4%}~S2HZ9H{RbB^U)N|cw+%KW9qV4SYBLBm2{MhMx2^d%Bft}u85np zG)a*_MW7gB$hw}%E!>}5m9b#QuAVsfm1S^QC}&HVf*@&(Efh9#x+m)Qx}2148|AId zwe{7_)y-t8qR_rwhfke4I@<0da7-6+%lBt)P0g$&vI-g*IC}KxNPDC{B2wI({rv6s zE{!jwD!S>2#P=ONd9*j`rb$vNE!@6wWomAn*HMmjxZ8J+JalxV)o&Np?%#Otjo*HH zbv9WcLb2AS{)5LJ*}r$7!OpMD-1zc~Ytz#YvTCURp`(W%J~q_Z(HcaR_3NKsxqjjE zD|goA$gZYPOMCyw!-s~N{7&G3<=N}kzF1cSoh|-&=ia`aftChWdFuML3!7^*g~Y^? zqwmB+NA~S$15U&(b#?m6xf?e>y?(cZgds!^9_npxXoPBLX?}73{_<884|v?6hSq_x zJ^PM6yf>mQPhS4)t=E3>=BGE;N&?aU{Hw2i@4Mf6?m(zIf93q!KmGf^`sI6*HG=JY z;(LGor{DbAlRa)zNYCBA^6roR=RaIrw@8(Z?LPd{UwnUbSIn+S;?n)i+~WAMkepr< z5Ts-5@K8rrAnfBLLCfb1Qdxa4b@TSjX3DfmHL7h_b90PiyrBkQe$vU>BA;2gef`#h zjT-B!$9KzMcT;1t55v^$`L*=+%GAvA=2q6(Gu#6pY^5*{BPPpYF14_>HaE4VsTSM5 zcVu_}KzBUa$f=p7xw*NuT&5r)tUKU}boR70H2U3?SgceQ9wbGvX5(Hb>-YHFn8Qh_ zDFM=OMazknBj68(!oh$Gv9)q;`QH7dM7hf2u*}if+T7XG(b?7L4S0l&rHzf%#74;u zHin=TkAp!>DYv?q+*(@LSl`N3ZLV?P$dNAA)px9mpP#y$DDqW_jYb3R){$dJI|HPg zU7DY}b?yA6$$MEABuhj4;Gw5q`RdUaU0a{L@ag*>oV_-)ru$pF`nuYC`??Ol@Z168 z#`({t?tcE}-~497d-R(x9Xo#FRsUmpM6-~Htef4@YAozAW&|M<_ob85K1 zKWb(-S7$!`)obs(|H(Zw-Zu2ezMkC=4Tn1VU75w(7tdatygI(6`i37n_3)Et#(J8A zUJoU0=M&S{zL*6)CA$YlA0CPMf*~JkR_1S9zj14JZYjs^I&kF7Gf$k{w~Nc%I)Cxz z-L4xpx@4!Yb+2 zsf%ZSe|EZrM)sdNxqnYbc!!97_7CseD+p-g;NY&lU17GeG=A>-LIG>ucl@P4{??OY ztz7oXKmX1D_}kaszp{o8zVMw_zxmY{PIZ(&`k(*!&%b@^^^a~>oZ&r>JpRnl4rTK4 ztp|yeKnH>i{d)&{!@~XF{pKuWR6$`HhaP$P)vq22Brm@A`*+`ldVz^`4ts z#*?D$?mzMT$s-4b20A?A!rbcm()8VhjE12&8}96E@Woo18ofRb%@|v^CSc)UA*GVL z_8&TZ;*ouA{_^_5_~qYxGMg9kXn60lU;ozA2X;BOZ(hDOe)Y4-q}enuHr&}2F;=D) zc!w|6vG<`KL28{?5nu)cEjd7rlM^;d?|<{a z>^Skl%U?SjsLsu;Y$UVW>E-FAL{3M1eNTV;J74KkZvX!0|NEC;&Tq?}eJ_6d>3yw! zY2*IXM9RYWRLwx$9#2QBtCpCa8NYb-<_bM@=H>5v=XgJnU%2$)Z!RtrF?UB>$F8;z z=Cd}M@yeCSc`?{GHq;ZuE1C82>E&D|SN87TbL3EK zh^{8qRx;wmM2dF=gJes1%!+C95{8jGeB9w*5uscW_~?oHa2%eS^vODue-RO zDXgz1vW1dDHSX^9=<>=!V)Fg-vtr}O>BpZsbG#RwJ^RrIzrQs8K;>EwpM3J^!@C0J z-FJWT_GChGwVin7TTe6;r{4RUzy9y9U(33hPyOi+zVqq{PigwipT0j=u&KsF4<8=n zmM>kndUJkLcgFWW^XQrJ^TC1H!m+*!C>=1cPttdl1q1% zOTNwnXHJc^#;9s8IX^Q#abIBE{vf0{k1tr+l#&i#@8LcDes4LuGJWy=4?g(dvn;p! z;G<8SIDH^aOO>UmshLD6yOq6mw~7c8-*@Eek9C^qJLk^7{l&Ek7C7|u_g;CX70KPd`rd^b_mWoA z=|4I-=(Ur#-ucIOZlq;**NGRNJ=Ps>C{A9uxluMrr)Te8Kbm>~(zs-}Ld`vG9StpR zQ>~ztLZymQ9;YR3B~qDuRU}+)2a5Un;w04SN=*oLMZ73qrF|;nW(WdmIIfmW=d)?3 z>a*319PAu^Xcu7{hE_^R;zp4osSu-*q#&sxRGK>JqFu0n9PvTzpPRnFk`pmE9qH@k zaJ(=-KYOogDxRU!Pd&1?nJV4?{M?1RYrLcL@Yryas!hND_J^Nb*^CSh9eVM5$HPWt zbMowXu9~6tk9GIdRJG-=S*Y2+;YIL}L z?-PfceDP3uVRmxj&LYCOoJ|2lDHFC*uGoG*>2Gh1!D4PTy_%R=T3MVg(6PZ?LxV&8 zAy&^XEhQ6K8gwE`hngd{n9k)y+!bl;3`c#YT+7ZcuPtVAk0;a|pj|X-)P!n2S@Cx^ zN1FqI2v#gtwkw8>bC`;;M9`1fB0RBO)M#g0@6cd-Z-iBI^GmDu7PoSEsI{XlCglq& z3rpF&;%jK$Jsei6s<5@NoD_<5(9_zwhf?%vc400>N1~B^hlYZLk=vM=n%67>MKFKZ z$CNAS8jXqBBCRr;;n%8>a2+92)?3(My~2>nn@**A0y(q;h(5OGa&Hw6njd zA>J8x)1~xQ;=yJ;>IFroFEZz6K4p5AS$AQJH38Oc2Z(; z`qomhD!JW(&b^2Fq68=(r6S1~fe{)>S)wh8wPInr1Z5i+42Q!#9sX#LP+>u+STz_N z^)yFl+A^ekI<=j%-2O;&OOQbL?YTRN+}1MRG&+Mb$&739QH&F`WZx0jXI zC5m#mqutTMMzvPl=6SwcCb(etNV~h7F3M6y^|OVVArxv7V>_vKU1`j8ZNRBc0*)wwN2?E5$t2qLR)FCT=1g)>2{H53dreTu$e76d`F; zETcZmaCu0%h6O#8)8;qstc#i%j0Z`BYH(^cU)U(7U~j?U2-zBKu?+#g*Dw&-LNVHa z0*SXMrIbZ!5fbGz6w&4w6BV)w0(Bx{ z6VTRWgQr>W}}j9 zFr2|N4!cs-YMCmATeI1@Ba0NGQn)dpGPPDKM z?u5eF78Fe-0W%^bcZB0uCr6+PxZlJiNm03=gCTG&TZ2_C+lG!!()JlLQM{L8RK#!6 zLBtipBsRj9VM$7+9Fb7Kiz}64QI&E$YACWZ9>P#(Zp}h6vcr~Y8fI9gL3#)kv;nDO z3~IQ%wrUxo?(qiuv z?+%kXi4?1diAb8$>*BnyAE(P@K?B3n27;g@#}W0$RN3L8J(#Rmx~^J!Az9Wij%#ao zSU84|q=S+Q5P%4ZQCd|pv@%9ey2&<05RY8VEr~WTE>q0cYMS9}<`|-)psuiorEtAi zDCEju7Sj+&4n<6ifQ3BNpdAFOm@ccPV@Npxu~UMWpisM-6)>A72o%F~Si4pgQ7RQA zlB9izpeP7}Imwzp;7~YnXfl!E)v|($+d0h>j`wzWP+2flO-GEvR!J9ZMlIDUiV4dE zu-t2sG;BlAgleLs6S9z0spZNxrfUj8Ia@mW+T&hKOy;UZ1*aHPw2V@=py34D*6!n2 zySS088mKc8^8=7JQmVft*3uU8QYfm3h^^qTD#{X!u)4Zg)J<2E)lnSMDsJ-z>ks=m zFRj)pz_;EeTF7VlLPo+#0%g2T(rJmNP7oGBsIY6Mny%(14z+oiml54^c>Em0!k(HU z@X6(BEhi9^i*W=w+Tmc(nxGT_VNP1%EBT@zi{+|q$tK}x2>3X|BnSdSv`VRvDX5kO zgoM%_w-e}1QY{QOt;z<}28`1ktkVrj(u@zsP|ShjteLCSs-kJ5nk*Dcyh=IWd?u$Ew$tTiNYv6{{hl>-r;}t6 z5*JH0Qbb9T1a>ks#UM~s#Vk0006s-9OcHGP01VhB8H_SBnQ9eQH))1|ykr;_u2pzZ zwxA;vHalpBb>XO0&MKM!qk;irPC!wJv`Gx3otDe2Rr8pRAeI}$G?P$lgF=fMfng>r z-y4_%p=sSlWoQ>uamtiT2qZu`qJfcs?o8DxmjzXoO%f;+8gL^7#X^pCd4L@R-Vjwu zv!F;tYxw>&t>5 z3_}izf`lLniVpQFq&riDHxh3s8try6EbFu(c*IPqtnoUA!m$5M zoKa3R8Bb3eYKn@^n*>-G^RoU}5Uf|tW-OvsopX6G&|9>mAuwshV0^5f0}khlHA7Y_Wg8(}p&&>d z2gY~_P2iPMMTdN-Vs4)|=)_2zwG}4{ForECw-ci%+y*=tI&^DcU?CmAD+@Z96mftQ z2%*pkWIrD!8aNy-@+z4M>A-`nE={#EHMXKys=>HXkk*tW0kSH9VG=`3$mb-Y2!JD1Q$;Wg&a$vi zh~Nb7iIA#lr~m?SyJ%4e6Y`-l&Y^~rmC6u*8j6X9f>qx>2(u;*n6)e&1clShxd^#b zHV_OYA)^wQTC1r*GA63qlm`-qlQb!vJy%8!n!nSnqHq11IpG74Z{UpE@n$8X<}X%WE2mkTPSW+YpSB4UKe2#jHH2v6*WUr z36``?RfS}%N+K^CHtF#PI7{RKPKs13!-BX4gD|T=^|~x0Rt>gQNHB!X+n{-&bI^nc z3Zf1S1OnR9M4KQTEbDSPow%X`510nvN5_C6oeW<#SWsUc(!w2NRU}cE3?zRxLSr_R z2!amgvms9-a3%&s3JSklDCa>X14(MsAnL*l!3%D71_pUH^+f)N1Zg#9Kx$8BryjlF1ZX_-xQ=L+oqfhX^1AGLm&cHOx!|% zWF$+eJ4vm{Is}t08fq4507OtVQv~`aZP213_(F%WQ3b-mfIAJFCK*H*WL;1&L?+_ATol+FboH(MM=z% zWl@sKRoTJ`l;)s9vlU2=^{fMGjKC481~OTKnvDS6NHVauqr+JrO~Y{-B#cQh1VfWh zJ=#vE(-RKBi31I{Ov{Ezo3xX4I7k!1OTt;F1BWtDvk+a8cuCeUsy=7Jg4nD_9GDWN zoixB2F=a_t6!1L``bE=p6E+YbI5f4+wIHzw6ot_vx~3Zn%$-ER=a4W#*diJTL4Y1i z9z{`G195Mf2;?9g!3Yu(JG5xji&4n*kTw9InhH%|2ILwzyM}^pF?0wO_z66w+ZKS& zGEG^tOxs4_@w)%Ok4W8o6r^X?0k)(t5H7Y2Kfq%kSWIw>VWAe7k%WB;1l9~N5{eGE z3wF`KSQ_+=*85U*m^vIcvvrsVW|N$ggsfyD24EM)tb^gA@!IcNGPkX2aea4kN;Kz!nbJ6AjzqA%4M5 zvZQDz0YIW0aIgSJ8K*5*t2O~#E+7uVrZ5UhIork=907%6;TEJc(*i;VoC9zyND~+Y zwh8G5jQ**D3$@ELOelcAwk&?G$;mOUyyb>D0DD4cm$Lu7}hZB zJ=T3sf+mD#>Nv9zaHXz-z=6@58mMlXW=I5OV2cVQ0YohA;2aD@BWgoZAfb5`RGzE? z3Tr%o32w6hQYhw~m}zK2sm#le?!ZmpDibhh;iv()2BX%)(uACaL0tpt9HbWo86W7+ zR0SvwRTy7gCIb>l$hbIw9^^d&o4j=`0KfxBfW_+C6^3m?lVCegrZCDnj{qPcw4p~p zDOeoh2Dd?AgDK#m0TaWaPpS@g6T(rdyA%aXL2QD9a1y6jkiAg<)ia(c)m;K(h8|2f z?5Nix4>BGCk`E@S*A*cQ39t1l(Z2 z3h;%(H5j*zKt$GM9|n-HQHUB7Mhf8%ZxOsMU+j911Q?fu1wx#FF`>{NK_C=Ja{`_O zs~}L8VPJmPfyPWYmZqyW_r zR3bp*5F&5_-rO0K3Bv<6Qd9}{e2oQ(|+pIGm)F37Vo+?Y=4;URpF$DPzbwaiThl4Fq0%#iOqz=ToMZk8j$PFuW zV0P#eqtJS5;ENr)%rXUfM(slkcj|9(7XnE z78sg>WeWlUc@NQAM-Dh0gf)~#U?n)`hL~^x=mt923B39ba3c^YWPbPo(*bq{Zm4$) za|fLcMys2D=MKa!7!yjQ`ut&~5+Vuc06c~f3@{292g*cX2h{{1A>^g{XX;rR@Bu*x^8)&Ur+4NC=7(RQwfaZE2|yI}WC3(gw*|a_ z|7<`wv<1)ulEmO4coc5KJ9vfGp~X7i!8GbU*5_FNYlnIk0bfJ&5axAwfJxzl^#HG< z8Xy551dswHgX7_$x>M_80Ta}l2A=|N?fl(D9oBUSLNnlJxC7r%t1Ey5Kux_Z;JTgU zT6YYz0q^13&h>hzLL>D)pa7{`0H6aw2U7xw*ITZ42hYMM>YuAK5P%aJsUxo5KMWYY z01D9FAFQ=wf%;{5bZ0_9e|2lYqjesIhwI$7Lu7Rm!QATe*%{Ri(Zc8dFhRHpAE>vz z(=m7#^(K^bZ%Hk@^hkwyj^^`TvJ8Kr=f-t9J$ecE0Q0t9P(-wkEG#{Z@Hoep h!z-W_zTz*Od0{WS)^jWTVayB9pLpV5-VN^?{lE1pISv2- diff --git a/sound/direct_sound_samples/cries/uncomp_shelmet.aif b/sound/direct_sound_samples/cries/uncomp_shelmet.aif deleted file mode 100644 index b65d435f532cac99cb3e9415114cbebbf37a2eb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13888 zcmZX5_mgDTb>7RN`*rT=$vbg(HqB!50t6O8SS&<>5J-X)C5n`(WJ@mFvQ@Uq|A2mw zU9w9qmrS{Amn?}C1&YZeNCZ;Aa*17p&1rUW=n37^IlP?wo!7GzWn-rL^}Fxhd(wBl zbKafB#aBM_GQ*sG{JD=`y!iYpFXKCtWmtwebBj@))oyFJ$A7={+{-WEBAh*OcKp>> zf9V3AKa3vWBmB9apZofA!}K)}<8m#Yk#|xffg%USIOF=cm~72ApMG4c+{{;&nIqk; zv%CK%|AohwuXHBED^)u^75m|XXMQ>U&eBBUjrQcy^-pB}v;NY{Yd_}qS=X7Jj}Cp} z>#tq-HTIG%v2#28g9lFz{e^M<1@HR{hq6D~Ot0TRC4MdT^2y?zIwLwD+2mEGM8=gSA#uWo$#v+BZTu~H5D?_L`}_LJA9 z{?+F?-?%oEeNbdvU8vvH&;8yrm;Sds?mpb{)KTlb#S?#U@y@qH$uPH?&Etb_yf^d* zUkHA@>Ij9~i%j1c@!{3$eZTu}M#@3;+V$|M+|3PjsradvN?%*sfA;j_XWKuxnP@pP z+T69ulORNZ$HD87Rtr-=~MN$cVZLg^OfzL`g8wswo+;@U#a}+`ODu=544V) z>ArJk_*b6jo6g?&;nv`3X?e{q$)6i}?}3zh?4^tOyH|F~tz)zEueFDd%yPBTO6v>1 zIa04y|NchymGK{3(z5J{$2P9aIlu7BCltSX^@G-#r)<5`B(RGeIRs5qLA2=!G&t$HAbwNJ%>N5kI zH|}j2dVIos>t1}2NzUdrt}d3cFTFfnz4PwnC42T+=Wnm3hPbH<$)9}V#`egUJ~>i- z|L-3-iaM&idqtR5gQ@Y&?_TPjes=1}*xkSWu-nm|^#AVGzP|O`r)J*&^LMyc{>ka7 z(*OE)i`gALH}_Y&2Q}r%V+-HBw0r#5pBhvb-g>`c6ebof2cx?iXI_%8-&%K{`OJmb zTW>Da?u!>ww`009z6M~`u>NdiB~^;=;6(6Z`VGqtZud3 zQ!jAuU#foY_s_(ttMA@1re`W;=XUjrU*7#rW%RL`6WaX;jM`x(y;{_td3@=eTH?9i z{$%m%cUleh;>_ZWYuyVMg1H-|^S^$!e6zSZC!FnCgQe?xk^KY3<$ziL*;L zr$y^@`tB|Mw|<9vYtF5Im_PmPo7087r#tqi=zD(t_VLlU`n~URpZ$aJ`FB3jodNATwI`3ATl|yFXaB|H?%n@>Ieg-YAHF`G z%dwa1r+(vnXX*0XraW+I{mh}6;(xk&@ZY_fSo-Q)<|haK+t%#Ng}J|2I`PFZ;q9;A zANcg0HxK4cC;#@^*dIQtT>kT)v_9VapGOW&4SxGp_Sc>rSo_9`ey00hJHD{?{)aeD^Dh;~)E*otK=M@_&8*;_sgu{_zjYi;sU* z&l@kSz1Dtyc4+*AH_8{Z|1kE#)WyZWuRr&hl1(Y zY4P>9(z8!|bYp7c=;_xlX}@ssh3!A;4obr2U?DzOTe=mhpn6Q((helZ~k%hSZCePq>=Qs7MJ_C=T|>^dy^Mx58|nC zXnRrE_oYw8Kls{8t7tdWzIHCLQA~aAi9-D=YsS(!|FT+@PR}pzJNJp>bANHq+7X1g z?4)?I^x9VLbDv^v{A8=%9@^SGXqpqH%~tIBNxpPrxg72jw}Nn&@7`<9UVMD)N8c89 z+q1j({N~W1_4#t*H$NU<|H@Bex9xLxN>jU!JylG1i|5nQ+Mkxz-aGdRJ2!rJ;P^W$ zo9&nPn{WK({ulKVANyuE`;*k-QuD@Rm-WGNcvPx~Y^PDdly>Vn-f7)R|ijvsEdsYKl?a z;SWq^))q?YiJ6qSvTlbBUQ?8qGQ@VIqURvHo2zD(FGx3~RK zEo9n(+1%bqD+7n~i*MA1W(%vGK%CloXFhd!zp&gi6;B&t_|B5y3ZvTAM%5Ub$+Swf zq+khhrgW#092)n_v2JYGUELU*j1`w1JuSO@E0InsI_s4~B@xEMJ6dAh8q%6}f5vNA z{GeL2w0ughIAPb3WVzakOR79H(q8EdW&C{d?j1W}Rbz!rygy?&maBz&R%;r~dNpx& z%HLk@CNpA~97@)g3`ynsjBk{C3v#mDYcaT z@$~8)eYUW&*6N=~T4vpec}CzjTY6j+6|>q+4NmZ_(yH%QnRLilO`9K$Rb8jiKep3s zZf8fDbN-0Nr0nJ0t~8#gE_M>JxF*TL_GT+5bvtg%a6;V)lIa-JYBqC|vCY->#fIB= zSZ#W2|3s{L@3t{9&K7T5e7A2iE#wB*0B;9wmi3`otpJmbidI`46y7F z`X_#W-l^J6W_&QySzg-VrzQ((lHFP;rAE>|+uT(%_KKw@MhdcTWTckWkmCu7vp!lM z3arVA{yej?;Pp=?>zhqJGZn$PEH`LFUw>x?~t8|){ttK_WS1R+? z^lZ?L8O4?{+_&9Q8DCap)^L=%H99CXsyeH*np)5fwb)R><(xak_+YXTD}*a|v->SE z)nPL{H1t$0rOJZWSTaOe6BT_kIT6;H!)J_n&ucYp)!lCHLyNXy#QMgw{`#)jF&mj| zXm%uycQ~)w?HgblzTfrQ3d7~3%33{{@!Ps5aYCZY5BT-%x|EE$?YUAs);E!8nntad zcr3|uOVtL`Di;oMdeCxXK`_kJS>E5;*0Tj4-pq^)Wx~aIFP=;VJFeZ%=5#~mSuYGk zx54N19Y-4rDmHI=Nma``c5RhY60Fs1Dls*yb(>6(9Ah@uZ4HlGB~OZVd@a`>bkqGd zV3^49fzx!P+%Ok}w#C(qbb378X|S@yH@HMzTPa(injCOid?p`q&RTIhF`OB2Y`3N4 zrEU;P@~S(^n<8H_Gh;)Qon*n?HU&n`n597I8ypN9t)^v#p{AvSuE(%lrZAka$^m0& zcG+U$zR<@2F5%XOp{1p)STibdcPE((Dwz@0@SR#y>_?g>q-tfm)2*fYhEHbP>Xs9W zclBgwSeu(IyML^2Up^&ne)v$m5>6AA;!?Crj zBj>f|>Xs!ROv~Zo_C9H|*yN>sGx9RHl+6tfly~($sa#uavlD~4y1rac^&*$hMm1-y zv#PX%%04EpsC?UAW80$x=rTXpl?(ikI6v*X`~x z=6H3a$X4TKC0x_iC%7kEVXfu+_ARb-WN^?38Zn_5zbkJR(nkkv^|>(>sXtrof{TpxougMAT~N!5~aq$vKGHqnA;k&9*cE{ ztLc7KE0yN;Qt8mZM0!2xgkzfuzsmb%PBe3QSIbul@|t^NW3;NImiHfE_J^CfYB^Z1 zc+1v=nV;}tnv)Xhm1R9_#l2F3@smzq_bz>pu zG|rz)oy)t^rQ4M&@9?|x86p2vs_$eb8x$+6>!lChe5mxFJ2x}Nk4&<9W4k=}z3)DZ zCz1c9T{0R%|HFi-FF|(F#6MnGQW66IXbcWpnC7}#?7}j^Qq}y%nW^ge^+k4 z*GS!3*WX;p6+0J>WG~JHW8S9Fy}I9w~?-YxIox-+eK=bn&~Vha$e1;IioD{qHK z(%iUQ9~u>m&h3Yi-wow%--Os~@bZ3zrnq7ct}SF_XXJ1~oR*t|iS>rHyincR8P2o^4lCYc zXGAq!yyrOgx7^zcDb*O66{VA>hf@i=)UDpS{L#Zwm@8xpLkCYDn9Vmj`r5m=on9}M`*VgZ?cFJ4oc>3U}<5TGw$@NS3Zp@dK9&Q!mn!NAGz`0LO z=Ot%(@!tEF?rv?>e4&5#z|7$jBYk~L@&3ZiTczT?ouHvlJ#}RCz|`3EP;2?-hu81T zZ&br%I*}h3K9&=5qoUn;c)!#v?QC|+yM2@W!{;Wg{3&UDXYoN*w(j3+vhu(_R-T&d zi;HaNHr7jxj#;`^FQi9jhgCTjGd$H_uY1h}OWf$}%Q?eio;g;~4Uwr;+U*@3m2_gX zFcR}*nQ?Y@ON>%(WQII5(GE|JcAACO+8EA2hV*hiRSNefg@J+4^PSz*YPZyw&Qz1b zR^m)zEj_wiW$)ciYgmrfNrj~(9C2IiXD`wxZMayAo; zO=x2?Ld;*>wLVz1=ga$3@pBpZP|oYiY~L?0EL)q4*1-7q$$b8aiHhg`_#rocg)gq1 zo#I}6(m6P>(9GYuZv6E9oWFbYusnV;l^JtZP4oJOae46oC%&LnFN_z@rhg!1U#lg5 z)R<_*j(9T{*<|5PnO|BBx@BFL(%JoEIZfpF#(Hh5#(8bd&<qRck7d$_Y(rQoZ7p;w%y4@DfmAjOcIM|- zMLQEn$GD@prg*!xvg0j}jT|1-a=vC(Z{1%g=dAen!3)Rw8(a4l)*h_uIpOKt^nPYw zjeC2!)fu*q2KoM2e`9sN+wjv#wJ;Kwn5I=;EV@!^(jWE2f-m1UcNsNg&|xJ)kM-=( z5sbccQ{)0&bQ&#N6brJO3w0)Fa9-%kGHaFnFv*H~7)Ni@Y*Y&e10s8y?>I5?b045V7E#!gL=O&7$;xGuUz$<#YcHseDH zv(elLa*DulkjeB?f|L*dgOcikR-tgluD} z(ohDZs_7eSOiQOlXQ$TmQmMgsz3rP`KJJCP4|l}O&}h;!41ctc=-yv%Hq8ux(cJYC z14sL;jrm3>4NS>*ZdPOY%w)P%uh_Z4snqtu!zwpg2m)i*FC?-@T5NC|y^{Q4F&T)QAFN|xdv$nSD z#YG|R)X>6;d?GJ5>H?>;65F;sj@gysE-NVkn@+daOh)(Peacpu@z9nIsP(p}F!^j_ zc^Ca&E@M}lfy-uxlv>M-rKL=)_`y!#!a&lqm}aS~_Hhg=wQ5`}9#fTY$5mM~p}z!msTJ2X0>6XH-o5mlzcOT6r~thUG5$V$~$ zkU(MEUl*XLc93;2Y< zD_utQY@=z%xfaI&(48{>V?2wlT;6Dr60ye6`CM-L=P z;#kA%y0WS(Dn=a$Et}vuuPz=4IaUI$=`e z*skNVl3|5{#MumQqvVN-1gRb?ajvf$9xug2GYI{d%DUEWR}LjjuvrU-Ba*~)bYBn^ zoK_ePk8_pKlT<#&nN6eX2v)#R=(U*2yJpK08BefWM`sfX8zSWru_V{*1}2l}>Xz^O zs+!KRrfphIU|6gy#8r;71Bq$qW*Be^uY^M2a5CO)kjOk<@LZo2;vvK7x+g0Nf@#<+ zD~Jro2s{^>x*f8TilZ7n6k?(m+SP902PzZ9@Xjw_Z{0Cj-frjtpHHw%C@8Yf^?cJZ zO-B+#k5iKhj_RF20H1e3D~zNnq92L@E3$rIcK{MT=(c$;i1VJvhZ65Gg44mKylfdwsNk^>inQs}_LK6a8>>=KHiZwHQ~F{0uHUc~^?#6Y)sRuVNu_WtY6Wg|(F!V$&M80q_ z4z?Q>rfvE-;9zYt zU>GgVIKE?ZF+m8s9qg#YWyZo`S3)qm9UJ5#dI&!YZ}_f*!lSaG>{`4Rik#zEp1^XF zz}UXPD7@$Dy330aToIt8atvdGibCI0`GEDhmJA_aESHzWpwsTyd{%J+)(sMIg>wzV z@R+#RZi6`DD$m;RD6h&ezlD~72Wmtm6&EDNGTG2${7%>OLwkqO-jvD}> zI)uhm#&aD%a6AML8;NQRR15~>Lz*!a3}~ekmq^6Z90MHdVwr)k`#uV>-rAE zy6_^$i9ClJWHK9ux+|i12(HTr9FG>iV{xoVEeIb3EC6olzyOaF2^k!mF?fpwX~PzT z0itACU<4rmw;Mn&l;I?q18;<^YkHpJhYS)k@E~1^2@FT~ERIk;D8%w2fGaSp$ir@% zgfTu7lR_{izOxME!hDB8q7YcY1B`71AwUVtIxH*2yv22^=4M474M` zL(lY?(DwtDgD3`t08#f%7YQ41F$IdC$72QXnrrz8H@ZEvixSe!aXgM?xX^NJMn-&W zhXKI_uFJ9_@MR%Y1d#)4xtxHrwjkt?a6Ys^I>K+*C*)-0uWMpqh?u#kEMPm1BfF_y z`eY#&GIj_|^2i_h+i{3bRBRtr0Q3o2EUX2VJlMne$ZAOyUCXpNuhmLQ}a=$U1qJMu~8Y*bKI=6&BXkWCB^m01x1baaa) zYD6sxLli)`9dRbyf}A3(ApUSDYPazUC zt$+zd9^L@`Av!Mp`~Wm^KK>Sf+>pStw1N+ej=`!Za%hM+9G1{avB$?1-?q#^R)xUU zEk=y1tY;eNq+kpFioh%A`%qap4!{H*0S*Fk$a5q1gUcWr*hNMHy7=M+c<~|JBU=O& z2UrFWAo4&jVg!R77#0WwR_raKJ_A_+FA*ZZ-bhIl2u_6#mWe-_fj&IsDUm1AB>=V| zAETH^Ne<~A2!!#SkVg^$79cZ}X?V$lD>$r$(9rQfK`c*d(I?|rmWSEM2uN0y$d%N9 zJFpX|#8#Al0W#00T!76yhdf35OtJ$nKm|qSupB2)mcRx0=PW=8k`zz|nE{vR2mxsT z8|?10K8t<>4np$ya9+q@Q!oG+hXt%6QYSG;bJRbi9oa&#f-vZS4Y3uVhs;A;js=K% z$OBbqRmpic?e!oSeGWPk5H)2I?pf$gU$6-}DB1wMjE7wTKV-82!^yiyc@`W_%!u`1 zz=)H9X3Rrl12%y@m&u_NC?7|a3JqW*gb3tSIYMp+@mc!&oG(+5?6|11}E1p`zh z5PvMhP7x|8E1@RLfK{MzT0s%QI4MPSg*++pv!7jb<3&9{W&5M*0d| zfL_NZWr$J*iKPY+iGwBqfk5j*A%r&qAN=Maswf3`CkGCIZnzjIr3MG!B&CqA@DaJz zMT$@Yqt3FFGbrjkBqG&>5af$Oz)`fZnxGe;%@9yiy?{72;&?eGWP1cds@2dQBZN=H2x>;9f>H;?8@f@!1jb+(ff7pK3%wG+AD}A~Cu{~Kh_}(r zk)L}ozy!Dv{Uo|0cqXcKq%*7nUPutuAwLj2XaN;yB&yI*0BO=2r%c5QDJ4!6z-TU3 zQvv{j;3gOb7s61e2&EBo5{!Ng&jA_u5aMVa8X(}1R+8typddu}iBtp60Po0pN*iKY zM1Y8hQjRzPp@?oF0t%2ml*@1ziG*g5NJEsegno3CkxZbKK!68i5G_UJhpuEfqC@e; zI%>#}(!dI|L5>luX*b%M*qd-0)ncMYd_e(3T2KJV@aUH&L<6)B{D_GpGnznN#WR}O zTM_As89*WMicxqSt|DDY3mAv#04|b@0*J(jjG=fU{urmn6fep-OoR&wW5iDI7p#LL z(LhjqF&onm3=&T8BI=4vC5J*O3=pVjKXMD{z32AGR49#IKr+}Ifx)g32}4_|C)l3a z5@IoE9dRuwMRA8ii0-f@nU3}t*^J;)IHN*}=g^00a0&&T(NdC1xC&?uBS+)? z1LTN&0{b~2D6$FMh?m9yNe@#|Dgsm^_$cBI3KY4Y9Ml63lmINF&4{H4oMa&QpA00} zOCnB_(Z*4iYgst$z-a;;fWtG!HEmqcF@ogqhJ~&gouxqC85#+YAebmX?MB;-YCtw% zL)bt_hp`krLVx6M3M{z;2|`{*PWEC*6@}UwVkznu(AByif1I$OS>eDO=;}gL0ldoC zKFNr>UNACZ>r)Y-S6Kj(hz5>`qbNaL5Gt4wfkl;seZ&HY8DW}aMx_aWLOCEHM5R1p9>f~! zi8mk%nMv-410sAP?Z|9=Mu3HEcm}?KOv)Sb2Vs*i3(|^~;67p!>`4g)r7%EB(gT`E z350dju=zV}EAOQJAfr`}3>5bZ!Sfs>vH0?Z>> zm`D#u31~+ip%qaS$Y6Y--i;Q}IB5${fRd=yiMH-7!1LaYkpp^mMZSS@k(LoiDTm3q zd)kqgseaRID4q}`sId2Vj%W{!5k&)#q43Z+r9Cy@xR0JAuOnE}&IC_Pge15N)JivWKV0$5f5h!JF=(WE3>op5PlPMHi~-fCYW*l~PJ0nnokhXRl-uv?y46=|*<- zbVNCTohb7N3a-6PaUZ2A$%5_}M_Wr>SnoO6M!Jzs6oww!$#lYWBt2^UBcD(|5lxDe zB!!_bh8|raO);Uj85UD`N!e&`f*9!>;lCGcj7KscJVHf8*^zNSvm6umkQupV4<(Uu zv|Ud}@>`?@xd!Vgem&))I~v0eee_;)$PUbkgwvHCkn&N+;2ts~p@c*XN6~{(QIsN% zCCAV_{PeD5ThDDarc3*~>L1dZ?AN64e-_7;$1DSDJ1 zk>3dgq;zzT;Yi77pGW&WGLB;OGnecc9J%R{GLh_P*PbwP0F=Bq%1v%ZleVh5mJB_-~q0^nU4nGJOUSPqqUEO&_E<2y5e~>5RLrY4v{Zu z2a@^7RTPgXJUw>qxva;|qy#pict$I*Es2iIB>}XMG$2)a`}IPDS&?GV6^kN6NGwL_ zmp0wgVo&(bHl>OXxsa}rt4O)1pzUQ}sWcyYResrBFhrX!)M5 zk%i>8$RmUtQjS6$ef`;IFPJ~O{f8ORHyZE#!oHr4JyoO4BHjMMgh$W+-|IixoVJaW z=#B2(^hWV>dCv#&3^uXmKQHB~p~Z|N!Mw=%>)l43F|jNj z?=cN^yZ7&R1%*WvNgSIuH z!7d<7jF3}vyc-m8^T++j$|6H*TXIlT6Nn!%uq2;rbkZ3vH<3-SA$%XYFhcCwVJSZQ zMN3yNlLYd43TJ5$FR+Lza&dNPv~^t&WR!D5VQ)ef+ezd=(^nrX%2jSeF|9!tra_@j z@Zk}>K@zmSC=OO`N@Ru|t710lZ@WOt_>D*FuubiAKBDIFnoem*IvOkHi6};VqGU(w zWB=|cIXLl5C26Ru^Ttq+bMe6bN8fnJW2Wd>X}VZV3ng)-;Cy#mv!eWW6{Ue4)pJve zUj5JxZec4_pd|S+LUK6kf&|OV@QWsV3dI$Ykn_inB#!0!>LHbm&)=Sh{NgU22(_;b zef#Bz-|76>+e-xT>3>$hj;Sxc9+jL49_^S$QcvVcJ!|#fJeWz#o2q#|={oREUXlJIFw?*glc*#_ci?%sxX40)YdWVNZNPVZ6Z&j>Mu0vEDk#3a_J!n}r zz#<>IU!YZ0{FkC|+OiU7GZCnM5rOh+zs}lqItE3j)9ds9u|JwLK8g~(Od63#_0H4} z+So9G0wb1X^6~t{1oPnL=A6#9?c^~wpS)6%XlxnB4eE4z-i{H$D+;$0C-k8~+Rdj| zI+Z&n4!U6>*#duiD#_ntbDOPRhlA};_4L$^>+y6tK*TM&4wVLyO?tP%NTvZGmArHP zr&%>6T*UC<&itIzJ+`pcTVs1^VpMKJ#m45J-T~chR18PAKACHJHy_+2&z|FUfJ@~YC zKKl3Namg!Jt42ctrq&dKqj?e$bL7*Sz<|~Xt-W|}c6OTPi(eq0fhjrt$njMFwHvqU zmF7h|UKRA#={<>l-s!uSU)ovef4Y!PetD~TY|D-(I&`k&%JSS)KjY}tFBkUyrrdvG z%wgY9Y2+reTu%)?d?t=chD_F1_uvx;LPoxNu!MkK29M1KV-A-3S>_gPI1-LZq0-rc z)vI@(H&5tkECJCLe6}!%Yh7BFn_vcqO-IPOyEnTRXXPY{$7uEB{_bd;b!i)7f{5Ge zrWv00>1pu`di3Ag1wvqal0doTCiv|>o=i1tVeBHr z;YkFGs_JszCd?JMv?imCDhR4PAy}HV13Dtbg%F)P1J_?$IetE%eBJ1^Siqw95_Fq- z6i21wy#zL&Pmv{%9{l^>kV@+&`?!_z@mb)&@6&k<5)QHhe4Z$R@0Hiy9WVUzZc*1) z_gY3Zcs!G^v%YQh;DtvoqzXeKxMT|1WQ75g6IUQ@ztO%$l)QB@8c!Vg*H2xu(|vu@ zS`sga=D`O*D+`>n$BPqrHk82+iW4}tmshR+i7{(GKY6X9NYDNzjcn1p{PvgI%~N_0 zNTiTeYKvuYKwt4*#h!e>9V@|$3*eE-f}pTi*~Z|Ec2J5Kv^~#ymPL8Rr;a3$baEALr>kvvomlwp9&i1FUKg346J&ErlY$m+-0s(r z0)*m(?9^nLx_{ZUFwgQQ0>b3H;K{1TecR}f-zQS0f2dXk9?Wt~%p)`gJlr_AuA0=k z^mcM!WIS_jN_6x{7G-I6mB!dH$mi7Qe|Sgy;?`^8Z$1cLzuhA^uqTwL9;+IL2N+h1;o4&-xm%k{6um2t&+;bLgpNE85M^u_ZPPjr4# zfMa!{qhr&?qV_y%2Qn+q7jjm;k-5U@*R$)ylLzsuw&+8NjLC26jOCZ|y(qY(T^(+o z*l}x@7O^~i;BEi8)?eB+k^A$-JTcF`LlpZmoVUN7-Sa=C5#-*xeRG?>XV1ruU4OYL zJ5fTKz4b|>Bu~ciYCE3DQ?jCBVw5!#-h$o9%z>NtC(!&;toqtD8_GX)GHUB#E9Kq4 z9^`6mpv&eabEy+oU#UGPOoC9mQ5|;(C}9*jnv+nXrECx5SOv2|o8Dl?q!31F-_v-cN; zL2d*z_x*TnnMXIQ>3BRQ9+#Ho-~H)UXebMScb<&JWk=v`cxePxKtL`)1WRaqYhfd z^vS-7fzbtb@gL)we;!J_cqEkQ(vif(?(17+g{j`QPI=LX@V%>#C>gZZQ`{4240LFi zQz9~UR2fgbANJ~j>v)BD=E^JAkq@{}Z#gTna1E=w_xLIlgLfN>^hT=cw zAk%Ac$AUEXKJ8CD?Yc9u@1tVV&p*0~B1z5nc6ROA=np!VMpC^tm+ta;`EeCoOzhmw zI~uBJS&hr|UAT7Nk`uEyUUDf?`=VWt6{Gy-mUdtE_;CEuD7@0>9~mV7^1ofgAQC4e zHqO_%v6-B z{#lb(BI^EiE-_}aQIneDe68Abyv(ouN9zH~ee0Oau=7hFM7kMZWY@PHGZFP6}{6jokMg47-Z2mJe zDVFfvE6Tp~n%1D;vX~{SHC}Mw^$T z{jZP&adHzq)=jFJh})G2j129#OZiifA=~{WY}->ln?Ku+K0g|2KhU9?nz~2=UGikb zi@r(8?m+d_Jv6~Bd7>><=5*F2ZJ)%~bDDO=Dka}XBzU6l7~InR%S%)A_z?HRDv)Ou z_H`r}j`R-lX8){l(q>PO^3^rGnpEW|&vu4HMV%5CW81LhQg#@Y%R*d^(fxpoRTHAk zM5>h4g$Zoq4Qc2;iFUp>RKOXXP=%F}6wjGH`9fg2YZp7Nv3tvS7B6hkr)FnwnpXHi z#$5FxB#ArJp9d=_+aYn)R-_YFMY-q7-0Lc z&zXObHD$7^3){z$aEJFEtYz5Lq9wN3S+3c5Px#t6P@f*l(*rU zL6%9I@4=M_)gvuCk_2vN>qhiJsj1f}$xEblKZnYWtksXfZxzvZI(SF(!a8sEL#0d2 z%Z|76LOAMp9+jh9@7Yk#jp$-B6F4NhMHYdo*MNo3+q!lVGE)rRNM5+iNynSlKYuvE zd_NBNdO9&VgQnCw0-)ZSQ8=T-G1g_-m+0$Ugm^qn(}YD*%3Pgt>@O2Cm2Uc~aim=_ zpB!(oZl&c$7J7`p7CiUx)etQ{g=e8keSHaAUhTk8iyl9Z2#PBtQaaxcXH~S^8{)(* z4sTNO_U{i?^wLvVJ)hRFD{@SYec+kX!p$C^e9_FOFQN_=Y1>xyr}v80kH}%cs-GXr zgR>?2(FWoEoZuD>!)ossr9~!l9qU^nem&m}J|1@Wz2&uxIv^xEu+Ian0bH39i2Q?_4CdYsCMM(Cpp()rOvYI!^x9GxUb z8?QWTk9g~FOg};rFqR1e^L4-a#A zVVrl{$`cTlf2a*sZF=m-jj7YruU>hB*Dma*4A4CFHi zy6aaS4cZ}y&Of~yTDKJM2}6xGimUFcmY@%Qi#Bcf(^b<*`TONwl^$7c>w4unle6C3 zpn^DpgrgBgFxY4K+h-%TlxS#kmM%-KEDI&GaQexaMI>hY*RM41pG$6jBs@_eG0HdW zi=Wj>(-)pKDUTkpZo1>L>fPzbG8isr`>p!bT_5K1roa1fp6ChLf3XBN_?VFGm=+~U z=YOi#CdZ2+iezhsjJ^1pv6L)z=fbYc^;uJLk_XI-qP0K9g)TJ<_OLG3ZY6!V|9C1% zHTBcK9~sipf>qT6Hk@Dn?&x6ma`Ptxp%v-V*Bh3xs^y&{sR^3dx;q{EM5&|uHHdT5 z3;$L`+8ST%o#&>;8b$`!3`XDVw@U*(vvpNdg5w38iGh|jgnICgnPT%y-F-EQD9DkH z_6`#&%9COw(97=}0k%zIs<|7Nb(l5an@3+(ODN54M!dY1`sc&)tLpqn8H>Dr{eIVy zGwV;s7`4sYq2)pFRQ01NdTCjxgt>BWDDilPSKIJOr|A6(n7DNRuKK;h0*bujhNdVw zf+cT%rjOa5E1UkYOL8)rBkyVKL=XQim$anXu_woG-*2OA&WZMy;6iKZf#l7`n_L~$6suk zl8DA$H@B~cynUuv`20&{LX=~6ZpxBYd}<%R`X;>y-+Ax$isYkxzRBS}z4u{x>#O$d zn2IA8Vo9Afc-(Z&oLXBN%MynPUcX%LSI5(wyrhiGaQpoq`gO78L5gXp*gq)IFgGs~ z8jY_<@w*ZeBG$iXPEAW^&MjO04Mw0rm9jgNvD&%AG#OL5OUTBs)?!%YrZ5qe4G8zQ z&h;&}%(5)LA08LOj91-M`Md*?q;er?#Jb%%w=%sP^w+mTK%)lQzWsPgckmB|DHDUd zMDVA3!_J%>yhAH0;CSc0nJDkQ2kf$-&GokF6T5xjmt&q3a^Lo#E=8nt z6W0tvpRL6RnGnC)`(WBd$&In*l>-Q4`S!4DbOi?9{vgBONB0nLJ!)P>GT+`G8Z2~* z2rp{~R|E31cL%DFU_#@~HhbAyVbFA~Glf#$y08lQ%VLG&uES9c-;OG&5yAOI#4)G; zz}Xl9$uo*=y44-jyWX< z;w=p?y%~EjZT|fz{QU#WhFdMN1C<4n_j)9!rS_55VM|(3THyS^IypSp_N;CW-u?IE z)TIHXe~6F#(a-%UfA}b3d7c){#3TKWs$VisT}%?ivJfNDc<-mXt;(zq_GkEcOkR5X z$5p+0YW(5+%t+eO;zobZgU7S@^7qeGNOziFS%{;zhTMMVF6JaeE3ekO$#b&^F749s zcqxDKaktSjX(G7uk0wOMm~UKH$k4f&8PVGpvU#Mbhhwf_aBgla=yYKYZ)J95c5`8R zaF&^w8W<4e(ri5+l+O$~GO`YyhB?OR9)k%U1ebfq|wfX>DUA&Ft-yG7LvB6 z30jyO`_&~j6h---+8L3)Y_wgoXBhLMm=$zuqT=PmqZvPj9)h5RbY7gY)p_M*{IuV} zrTnO7nfFyp`?K;*+L2BN?P+v6{si=+o{CEmPWEiL((?6zw)XOX?Toc9pJ&c<#{Id~ z0`%n}(q#O@t#Wl{NF&E)PPSRJ?IT3M6yyz0UGQITPZ;t^dm`=aI?$Wx``{8mRPr?k zz8~Dy$sF}d4o()6d?R$a-d_zJa6(V2XZg@tT=LMK$({49^yP2!=E!^dqTz{P1wjUj z0{CQ(aY6Uoz?WyKooN#(@N`1G?C@IoP;YpDF25tVZA~&2#WshiVW&pB&GAWe8-+7M z?<)7Hd3*W1GAgux*N`&sSq8{E-yf`8D%ju+wYpn*kT~5QI1kx}>4WJZj9tA6-u1v= zh0~)6eOYwrt{K0l4xfqCW?zc=^lFi{8>$c8L8xOPJ&_PMVI*!6luYhYN76Nso#E}$ z9<|#N?4+6WaAD}dReZO7XugMzcvmN6+bCF(y2l!`IB;d18Eczfn$)?{cE3%DAyXII zpOd7AaD>GggE6c!GmPIg@N=LPU2?F2C3C=sx!e$o^-jHuvT1gu!_!DvzCWG`+N^+R zdHUCG8_|=LpT=UEJD(1Q3(4cv%}Ryf;OPQ^=FTT|;JLFz_dwnBcI3r;7PRo7kN2Ak z8Isl7Z+lXXrlvt1H%4~9ohhYueSD8nQJ5Y!e7lPAPK6(?<=+p<=L%Sc&bGOYn4-*J z-QbEs!9SVSe|Ji_EYH}_8-Ncw)skfJ>xEdy>z%VDQvoFr^;Ic>Edw#(ogEHdbn=1S z-s}HuQv@DPTc}^O=Uh51F|GXY+>~%8YNM`2$@%czXu?MGf97(tq36xZ!{oiEcgcWP z|8FAmwEyF;`xJt6M=N~g_5a^g%I@&im!q@NgBOeaww{lz(~5+{_r}HH*(qGx44Lv` zG>pBq94{GV6>nbEUuXT_&KetM7nk3du?J?hR>7F<@rZ)^tDf0II-zPQ@<{< zlM@5Re(h@XoH!NE2-GQpm}5J{Q_J%+fo^un@Q-y0 zeEeH+UMk=dx_S1#1P%z~m1Sqm)vdSnZ3!;rLJYAaXz}Xpxr$5K_J=F+ z!IQn4RzEJ%t3J7B_LKXh^Lt|kex_6e)Yhy=lnS)ZT)!)r{Glo7Vg|K-G$PN|)d#+x zV%z8@hT2;1)86|%cipNBP&^(V3_cVo!Y@rA44!&}C1sH6zDEw6_j^<-AgpU18%nDim#c`pWb^D=T0&S>{P#gsJtmmZ2??3U);fn~K zWT<;`g6}6Q!s%FchP-~>n7xa^fkDsRUtKB3Vh1PajJa0a*#gnExI z#svi_;}6s&X}VEUc)GfAH7(Dn+9XDjr(0GcGBP-urU2iynr@{uPeODNP1F4=P+^R! zWq8*|`fsljj~1(MOlKEw3=Pl^7U`;;yTFD)AaQpi$K%gwatSa4~oJ z>&YXhg|~kU+UGa$vH9Y0?^nIMF4AxRK>U5y;IGqr-}T<8js6X*riFK|Sl2inlIf^k zx$wJ?&ab9(irjNRLYCi)!RuQ z5+6-)-b*sf%o7}{ zk0l$Anqw-0djGF(_d&lKFQN1@Ro^P-i0|gWe0-{pu5CLi9;#{bd+#IK{qKP@Cp}k( z^ADs?eLq6W6w2{sds&lDex9WU$54V|0mM64-?qlc+9Ly(=16wAV#CAY`03^Z#fi^v zj|zXAW`B7LDGu$tttk7SP*+!T$X`q?7M^f4aJU<_|&5SHZG9 zg4Q}+RvFSg5s~NTep=@&cuO?A!i)CPv^`s6N5?~`BwXNVdE7r?i^&Q1VFG5QakFCv z$=c;ln0QSOQ`IcdqW1`l)AjVT{I&;k5hsd*wjVELrgYxj2`>qubLF1=u=anyiaeRg z_3Ok6z4!J5Bc-C-x@$Y`>Td7WH1MqFpLGP^fF1%8k5!bu;C3M!f&h zOZ)-plk3~r7t{T{&F$O^k{fpk#W{3d^xSi8vS4u78CqBnum1c#{kXKF1$xlfV zyy~+{LWrxc$JC`&IJ<#@etY=kLd(NlzaPm;((n)SMGJ(Fy9?PnHt%rk-jK{o_!SweH!H zAdxvZ!^o(JipJGET44H5cG+W&7ANr69zP%TayEN0tYCL0n!mU`!VWd`nsO@k?uLK) zchx8^$|tBOJCetQH+!EvUWqt;B-krR3Fjzpf75A`CdAMIf={Gtv2#RaVi1J9?QvU9 zJoWYWjpXtoMt{qCWCoi)RXYIX7KW+Dr^K;R>C%c#$RcU_l|g?#MAtPgh?3cBL$hG~ z?w|mkYIp+$SWdaz5RsFS2yRXpM7sMA=G?La#c2|2&-e8!a*MKuT$#+KP&XUf>z3jJ z)~4ApNhjYTJb&0ikFyO<@h-mi-u{U%u1}O6u=RBD-#J?%Y5t)DE)Q9lQG-Iiqi@T< z_+_WSe{576do&@6*8Jr0Al;v4bw!q?@bR^m`^G%}fgWpCyd*l%aQnNL+R!jkR+>0A z)n7O9?3Y>vEpA^H(>E?C5V-a4yBmSgi2+Pmysu(q>}ltqH#R95zo4U#e0V)SJVM?% zFP^QM$u9NXx>h&MKVFfxtz^TG8-crlzK;80e zzjD_p#6t+q5~Uz;i8qw^VY#^-%I;oJ^6!LKYUKEZ#j zYB)Hk|ZgPg`4{2#-pvo!<8cCjK)vKTfcdG zhL{p7AkS3K^HWoXer#IEJhPYe{Ifb?@qy@to*^J7DM-`Qu$_JBZ&~XPZh7)Aqzyl) z2G0KJBCYemW?pH`>Wv#q1%LltA#tpE!4(=j|LUbSvgA;RS+NC6!c14b?DY6XX2)=; zBt$p!_@`C_TNIfQKxL6_V=WzR>m)&7NJ6Y6(tqjk;|VW{Fhy}?yL017owc1>c+=(Q z8&tHfD8hFCdMA>^hd^&gR(LSq{_NK#YNb>+KEX~)jtq9+z1hhxW^K%=WjT>zqO#>l zgDcEOrzFY}Vq;^7&%b!GMG%{&XnAEBLE)6`f%~RR zQ8cJpwDA@me*3`p)H`vm)t1eu?BLN)|Jy1#Qy#R_+q@c;8}DtYdCkhpjWu?(Z$}+I z8ozwwrl$DpexUW`X7X<4oP$JQ(g{t$Wb!4m3@T z*mBh0agF!$37zt(NXdb?@f_G4gbE{W90Dhob;lclrYNd{cm2H zSuy_f(7cLtvSM_0VQy}~5|~z28bPy~3=Z?NYj+mX-#MMd)XnWU9Hy5yZ_E_Eb4X%X zn02zbyp@|@ccouE9j_kj)PH)#Dy#QK3JZ z&hl7A38L<+P3rVR33Q7$&>s&dpV!Xna6S1u~LnyZzD6 zPp52Q6_sZS11aw9m)C!2Fvc9(lad}SB$(vuiybcpOj#H9XNIzD8w$6l=d;V3rN2KJ z&4+c^x9pVl`?q>S{`_H#dSrar$rKto>PCG}yq~uAuvQ)zAB9fNDp}=6!?&L{&hZOV zgbbI?DajTtR<&;lvofQDnGUT9&okG*9D<5+qr@x$xH4zK%{0H-AP1+G3_PE5zIyxT3UKLI%bUF=Py-6OM)nK*KW0sYTZckr4LT!hBGFgDT!aZ}-+-Yt@HDKkG_f7mv>fM$RAK_;Kb z_tsqg@nN6SKYG`xgGqc}*Ym62Kk0R5=V$CGOOplQdj9*>lL6eG(@BB(IpG1G_NMl# z4rT1cLQ3GScx;E=@$Grx$i&PbGs! zOIx+kKS78$wy!7T@t0pectS2NOPBa)8nww$i{E|O8~4tMlEO?*0UGeMvo8Ts++`&t4VhOt6?7~3}X#edsv zIF+&By-UZW){UhHUp}8x8{Fw1UBuA5v)*#GW_(SJ$d130CvvLoI}Oz@$2F{+!p!IZ z2^ZFMjr6>jVxHU2^N}Tml2xs0-_gfog1wQV$ix72rClzewAZdkibFiyK*wawc1oe= z{#{LMHc>@}kdcRfZh(Z2jcpZ>QjwCF#vl9a0YT<$ ztYbKV zJTdUlnceB}5~Q{2)}2X@I65{rHzPNn-t>HWbXu-N*(rPT6J_|xX&lsbv)&XPObE=) z4b>}1>@aZA9eFmT!RY{Z=Z>y5v;m~FJ|NDuRB<0KdSUabynMpD{G#S zVMpPGqX{@0iM{>ZcM}FLi7N~*DoPMSmdX1+wJ+)M6!D%*hr=0o-26BHsdET%Xwabx zdlLk%t@^L4x5>5zQ{JE7&*LNZeJ_IAxHKl2Zw|TG_7;EiK{iP z;xoB4s!&4e={4AU>qja1d2FIgOfsmQ?uF{RAi7-|8{ccC$({Z+znG?636w&+%)yg2F|h56&XQv zSNp$O{G5+ki3z!9&LnYB)64&~E(|O|3{TL}Qkkz1==$u+I3yxjDW&gZ@_01ki+|nP zii!6cf{&HSm{dsp^!pxO0<;d4RAva-G<5LuD~mFb0gXAdPl|V&R;#XbAOUPVCn6&= zo~cd!kIg3$9xN9cxDu5)xsv*^sm2aPCgq4 z5YR=$kK+JCbl*MTpWDxvZ(0i7l}IA{A>gW z7A?__*LuSoW38$ap3Iktd}s`?>ADWr_h>$*ASp2=giUY_UAr?lGO1-mWgMzZ_r=?` zuYdV!OTGb!cb`6z7sr9;zx;lQqMWmYp8HLCh%cKq|KD$CXcjFPvb#7d){kMW`uMSx zqS3;s#}DNO5Il2NziwR8IGBdsq&()Q0@s#vP3W#5Qy-fiob*U8@e8ZxG;^$e|@(s7ocnd3N&+Zzs^V}`Vks1CI zqhY&n*M4-CmmnST)bfD(`+nt?Uw+kOr&G3Q1?lA4#>ljuPihEBVt}82AdRvxV6oQU zoFGy?(i4{sg+g9kLv{Dmjze!L`R9d9Ke~_p=g-F|`l(5z^6$qY_&guoPygvhl|yT+ z$_v>NAx~ht^Ktc#cHPV@j-{pEbF z1hg1-My}l)b};#grP+y6o_Bc_S^o9O3^Au7+)a%SW3CRnDT6;XlTREV&EnD$=o@oJ zmb>BRMEvbfzk)N>)3RLrk5Y7Tbc?xotphO3ZJ@#VzkScA=hg6ipAN27UYf9Hw>rHvQvk-8)h59gg;yzk0RPopGXA;I$b@GC#`v*I$nU2^UYKO1!V0 zjN?o9h!9}vsVO@_(Y?5CFdHbb=S~Zr{5(x5EeT+?r=g)fO9%&n6T6MH^ic>#l@Eu0Z5jHZc77kj-uAxYO#*KUIR(KOeK@Tqp_v z4MVq{C`$i&P~vX*VH_6_ieH#Ecu2Cn$Fl{t(XYPkXYMNv^}gx^ghD=p6G+-#o?U@M zBRJ09#yQ^pq6q5Z!=LL`7y*e#3V0;JPTi6iD;Ms(bR7KWQO^3()>Y1-mjePi~F}W+o(u1@T?$kFNKt1NWo}kgZKCNyv0M0G!wAV5OFZ zEPVfM&45~Z`j1B#L-iwDi;nbE*n;!R%;w5x7nK&Z%I&t$Lo!nMv)6A-hZN^#N7@GE z47PJ-4i^!_S#Ijn2~%Pm&%PYa_}gzYeW|v&p4RqNk~knFHP+hRwCNMhk@v0n<{#P> zMb>RB4L+=y12RsWIv6l=^|SkH08tQ|CS!*cq`5%%vvkn+5XcDbwqwrj4zpB zSzeqQ9?^vy*q@UmGW5P^>R2|LND)}Y>}OtC(Hhk1%{7;QbW&=R$UWK6IEU~eb8~%_ zqYD~1Jep@y>NGoQy;EGYTc+=O(y%5fE){K0tJrb=`jKI|PGhlKNl^)6G9FM*zg~cX zk|b_D%4h0^+6Ijgd-8*D7Q1an4^gPFPQI|o-f-(_q59| zh~_q#Aa+2Al)KsV9NQHhbMQnKWp#XVe7J3jUA$M~GNWuskgK=q=@c`2e>{O4%G=&l zEKiQD*+eOkz_tOhDol8`h`P1}i^y&gH#mg2qf{(TZsP<|>ESFqj4t%f%FSf|kht7k zF}kL@*NZw7!gBQ=~ zqT4VCQzHmFN)t$gFpV&sZ zk!dl0WX;OTj2t0g4J?qyq2J!r`R9jQ<~Om<4{T>V!KybpVUCc6Q}nf}Lrde4ZIf5C zvP}x$c%8%mu3}!P*;IQ(S^05fwL(7hYR(7?LX#2$xwxGz)yC-5wwDu}nikHs%QqC; zv$Hy?Z&+do3pH-ZtzHE6Xq0AxG$}1ruro0{v|#YyIf1?mE{}+ZZF8fW+uER#bPemg{bT;>BgA;^q z3m)4&PY0D->aBGLJJ4S!q#j~k3uG44FFn@A;Rx$n{dqF5D~$+v4MRcw}7IU zAlM1QZiB|+v^h~CSK#AAMJ=1F8(IXU3;lz{98|YHzirl7scfN`?8Q^4POWljW{c$K z=O5_HrP<}{>uLltC^c?A_MXqMC{#L&*+piPJTMtgfXypQDm%`DV1UQI@rDdrY8T)# zsckGj4&-!rQ4|LQIMfBXbY^;Z5XGb4F?bNGS#KlIDX1RhiLe!H$t@ILG5*alEE(!O zu+u>#6Ua0QV#m7W=yX(J42WjyXSX4oVP(~X6m!K5%aT?`SQWL6oRI09nBkwJ&m;Y4XP2m(Eb2Y?Ve z0w6ZK9l!&a0f}xi0uc}w9)}}>DC9C~Z7^)!Fp`)ew&x90s5qy|=pj=Ojf2Jjw%2tw zJd21}J!C3_26R|*1(Co@>t;GeiMFPmQqXXzHD%N_jqp^S-K97WAcEo^T zc6kA>+wH_UH3c*;L~?6XW{}9@fHo{#?HZL@r3VO9CJjd*dN3-n?AT$3(2q@_5H+cG%mfC3Os4=Q zy~T^elSw$c6=ZPmcC*#xH0z82m58C+hIk1AUlK;!ZV2|+AWTcU*W++udQ+H05G3RD zJ4Of06B6AX6vPN0WiVi?&PBoYgyZaM^IDpiOTmL~z1|73g$z``Eyp^!XlyE`vCC=m z5J1%Ja6ohx-e$CTARL}b2D~^T;ItTQAl`%E$yh{KEebg<>|Q#X zh+4HKH-Si?QfUOc-iS~cfE!1E0FTpQwqgLJklAAF9n#KxmxhV7m@Qrk z3vaQY1TwY`JL2^MC<>8yY@7>$@h-E?V1)=28WD6m-ENZ(rIYMt7la8ntK>SYigW7i zbRRm3;vu`m0TR6?D@bP&Q4c1`YIC808)RWfbvfM#;s!v}VFT$5B8UORfnt<}I9xCR zbU8g97m9TTy8)O)fE{mwfX1fTbruwp?9v+?9+w-y6RrzH=M7w<33R6f7AFOuvSPW{F%HSc;xIS!*8MiH1TzcJj zHitsQfrw3~G1>tdCIUh%S}Tc3MBFG0qbQMxVhewR3Y*nzK{I1Eq_iAL~%Fyysr4R#PCI*Qls@PdHLj8!Ih2qn-M zEUHtZad^F`2W!uUK!}J(oY+g$ji7)BV+;lrz;v|O-6)O#<4^>^lZbYu#!H4_I*;l! zn7n|^j)4hqBUsepU?SdWbYmd(V(AixLjgRDxKQ_w%7*s|@PS<(Y~fzeVQ}CHIOvUu zK)c?6EttZgL0EbN>;{A04&ppm*drj8LQohnV!+1$4MPyN#~epSbQ&AtcDqofSb%e( zc&wPRn=MX&M90V<1Z+B;-GzP9!85qnZ7`hMW_MaJ|2jcBhlWS&b{FDuxj`)DQ%QIt z4tP_CC~QO;6^}w>oZSI%#O#5EmAqD0Uph7Wsxq zu@-m$yBNZbfnJBnfw&M40%F;OhyobK9oTILJm7R-*I?enDA0*`K^*2hC+1)>9q)3u z-*^iXLW10HiYpj!**w@xc7Q-3;b9C27>}davQZoe;BX)aV%lJIoI+>F8`B>5W?saDNqA!n z@0%ZQfS@-<0WcfmAq4Xfgs}ujAYeOSum^$>#v6lS$FQ-Oh9K}JhH)^aFlGUl1A`4_ zB1|n5!ocIeK!N?n1CB_z@$JJ{4s#JG5Zr>2wN2L z#;lki7d8{-I&2=yo0!c1_34{s{_k%{c-@%C{}&zr3}c~z+0*U8kc+*9Fr#9HB&OXP z|AH|5zfpxj4#N_rD#mmuf}O+^!lb;J1B)KaMQ%(kCgu%<5X?rHMKPOVW3bCGT)r8C zffhs&j62^r`ORDy*fDN>V-8H_|6j!!Bqt2RP&7a|1)HuoK$)I^ZkX;mx&J*nA!*s0$s#m`Ncxvz>xOy2Us!z z4$G21!Y5Ic$^sz`5AMYz$K4~+8YYhQXPf&_xcJ32V3rw+WBFF3GDE##)pijIt{~+S zVjXVVAE>MfxeekTCWbL)UHJ}86VJDMm2r;Vuuosw=rES~p`!pWirH^(G uK>I4AK4~s(@pT@*w)FVCy@7M(eiCrFOpocE`^d%1XQuD_7b9)AkKqqG=9|U< diff --git a/sound/direct_sound_samples/cries/uncomp_yamask.aif b/sound/direct_sound_samples/cries/uncomp_yamask.aif deleted file mode 100644 index 8d44817f7b1a7bd3fd8338a544562c82ced47d85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13782 zcmZvD1wd3;`}cGg3@~(ecZUdwf*^{4je)tYvFhr&yYIX0>Y8g|7b0SzfQkr+bPI^| z&BkQmzz1ChCNI1)hRe@C6zQ z6(i?Mkz}Gqz)|B#2;r<8OC@Lo5+s$R<#SayGF&vPB+*G)p$thSDA_Y|EJ4fXDF`Mc zwMd4dVCB;+8JeII2{cp&MJth`sTkSRj2wg4iUfKZgQ5{D&?K~YlB>d#;c^+;#M($F zQ(}lH@f1fzAR`qDoT&vxEsRNES|Y;)E}qq(P_k)`f=t7yRX7s{TE>$i zkgAz!5yprJm&2&0L^+46(#xlZr&L5TQVpY7GcY2d5~1S`Get;(PAE_la5^qWfhOz3 zd<}_;;!SbXD4m3_#v5bh9KIf@Wsk6QbTbMPOEV)1hkM7lT;`_{y_K7*jf0oBg=VO; zr>D81qDN=%9~c^!67Qh+RR5vs<&*MJT5x>g;^iyn88fS1K7aD?S+mwNIb&JYhNV98 znu6PR?-ab9WW;2yUbAj>oN?c?tGTxxlyt$o)3esETb=4IuDW&c`oq#@fo1&a4eM8@ z2jf0IIDhH>>!wL^=*pa&wHZ;S<3)d;zE#pVg7jIIvu#~^1cUYJ(%IXkE#oM!jIG;N zCkL3!yuEheURfs#yardt+*l9ZCA>_2c6DVFAWDX;o&l zBNeTjXeqB~9TA{x!WYi>py>5**~G`zo(T!U#3RU)CYx0fD9G9I$ypVGXlhQ8kB`Yr z-JOl}Dm?L*m(c!-}xVgB($Ja z2M%qHHJPcpb3XTJ^SHt|c=e$po5JuzuWw(vRop(MF$rCL@X%U6U3badYxhdprgRoj z>ksZQrqaUu1*PqLl1I{-ZR_Tla@yV&J$_QwEo1m4 zWUNXLq47H3mp*&;Za{Az7&||4p0A0dud%%Jbv=vd78Ky?=kLkTj<(fQ)b`35o?iB5 z7ET^E81|=@);=!U*2w~;K$y8X5rrd6j-1G_rYlDJxg;kino5Q+ad5ICi@Pf;2avWd z=0?_j^JBeeyw>Np3hHI%ZoVNY8#kpnNIQzIpS}K$ZR{7Hxnu99Skh?KqwD8ylua_C zR_*>~|8jR_=i7%@&*#43*rn|_d~ox82CwyX{^c`QD`f%e4<6mUJODS?D=lj(r|m+Wc9tXXKuXX zJFfV8@4ERuW~!c|%V)2Z^rHh-Y}=d`=743_KFGaM+##d~rmtR+=t+}wzj^SWw0%ZP z_fA@t7G|kpHohsT>YNg3$jcRgE33b!`)9 z&*Y7}vg1kpB@Z7xDty_h^;x-V*Vbhrgx;rrpS}{M&MSKu)*d&xK~1q z3vPB|iYHghe0k-TLwc*A#XGMIQxZ*O*mbf4kY2{q*FC8?W0Zl(c~K9S66^ zqw6mJez~-3f~U1i*m-P!s%c;0`3sL4MtE|9_o_qRuCiy9<=rWK*D)c(yDZ50W>bi| z<@uu*Z|k~QNT+!#vscHOvTBNo%4$29O3Ubs3=hXJw5e3S*!6g|WUiWX*JQ z$+M~vq^*~?hl``F89_Su{&`s+&NIk`1jAW*I^ia2%W5a^ZhqG4(J8c7gp0hntW{?1 z4# zTRCIm9TE~gKPlXtTleBgQCTyK7O{HkhEyNIL|sYAyPD=6sq?CDze%^`^?dAXt1W-q zE^*5`d?=kU*3dFI-t+cJg&=U-v0bsG$?l$!@t*fDD>$B8j^zaFm;=-NiRO}`da3uC zJsU&O<3lVFyX{3`ohoqUhBR-AoX=q~+upry7CWb`O!lIobTU?V?fd3oxsgXyT)2yo zUNqU;-ujuP#851~qGG-96YX82Ldh(PB_+5-C50NZn%lT!OWbH(1K(-k;sDfe#|XmC z!+7dl@h4jH$}nwf1IIQljM7(H(t{65@Y40P@*Pu>8K0g!>81Gi84H;#lxuW^1^fN$ zk6H&O;tX?^<`?2d6b$tZb2S)@PNBqFxHy~WxD%6X-mDl#F*QQNP{y_l{YX>G7~I^J zrWQ)jRvxZ2err{`)F!}D)zikeUyx)yR{Zia&fCYB)7>j`nwQ`#c>laX=^AJ{RnsW- zTb61!QBgjOwlY(Wbd4cgW20SET{Rs-0!h)|F-{CjjI@+bj85}7lcVFaTC$B-fV-)B zvj6iSb7YK%Fm?6zaJDr;Of|fz_$iXT?6 z2sAj4i}FZL3BnFmzwhRwuzK;V+AK6N+-S7AW(;jXl`w}D76F0Qa5l8hpivPL){KH| z%|OqxBt%;WQ@DW3mq;X16^3eJVq$Ju^BQK*R)LGNbC&y| z`rbUab-$!bY7w51y=g@_dE{+Deo=YDkk(`6f&G~ty0MNAjS@Qu4NtfuQ4m5E)I`ws;?DJl z)icJSY0H-+1UnKr_4!wBRm{)>=fy_`2Y6cP`bzITs2nG_hlct%+uPYtC0(UY-VWp3 zLwqcWIAa@Y>~wuuJ&Ww-ZG%(D;bb~VH8n6IAv?NSz*qxJ0fJ0MsnmEIFArmW+q(~+ z`7k2g+A};Z(gnq=eERTt^?=5H{+g{D7I|Tq@9tf?oL|c`Ps}-daD4=6tg7(N?FX-W z-~sEtJ+e8!{6^tancP{KfZDK*6UGv((dmMuMH+nHy7W%cqzXH z7P{rwcR2~R>i&0k&z`*cZq{|#-Xr@~htatW56_+W`&ln0IBV~rT}yoseZ^PL{+(CL zF^yTj@4)5+3x0jU)hqYjeAYN7W$)R(%nvhE{^0h5k~TKpGkM+S)$!Jn_L9P(zs}^}{QcmOVN$#S_U?dMt%b zr{Q#Rkpyf4sZ=~%G0T}@^96FGk)vOTzavrD*I4ncu8W0ojLTfNV!jK!|JC)g7YbSx zP7BuMWM{_M$eQy`{&wljq*3US^_w>=4Kp4uIrr~B^E=e`F`1jTZA$afG~N3B*Nd-5 zuwKafOa%UpCviFHl=uB#;Xgi=02?9 zm`1JGv~F<_LpfCa^lskkUY$$AvdjfRwm9)ned*KUX0DO{{G=#v8yZqN)?QiOFaopn z5B9P(CgM?Q?!d>+5jn-y&J3^9An_!uR?HV^uw=Z3Gdjl8QLXH(%}wc4w1nAGS=Bm; zunkE{O^NX!vm2k>xc0Dmf*hK)_u!6HM@e&G?xmZ6&ena6APl^^b@^IB)iBC; z#s2U2WjG1z3UYJrylmky;}9(UEcio>gAh{Ka61m zS0DWGz)~l1^-I^Ew}~v{ z*6!T7I?hVk@#5B%+a*0}``FBNtHGW{(NhYN>irnnF(P?!%KRWpbzj-T{E`kn(ZM$~ zGBVVQp&t5BTw2FekgXhDJ-j>|jJ4w(bxr-V2nyYVPB&wiQQ*Rfktq?3NXF_FQiT?c z$74_!0?pJIubBAM*2xs1O&vY`0t3CQ5Mv*n+%K#iML0w+S+g#4p1q*FPTF7(tz`EzCW4;eIvW zE`9I6j&6!$h&qaLPaeNiI%S#i^^eDPq`1NRO0WF(@3YT`jpDX```zAEA>{G0++Y8F z=1DI$Fl*m;-)@O#%v4cXw6=Ww%w#JFcK#9JUZy(k2y=9r%NI)Z6e~vu239GUm1t2Y zxJIecBM~|&A3TZE?VM~G6pUUrGtgSs%2b>C#l%GhdDsvI?a!{|KIzmt#icLJNR9V5 z<-foB%P-gKBvz5>tJkl~jI|Zl-u&&COK-*qo(ooQ*|s6YL)-q~#Ls6QcdBfomTlg# zb$J+t`QqG9P?{MBrmWk(W5WVFK~?V0KV2vpM!L?=+VS;{OkaKL-Qz!<%5N5$g|FCk z=)i_3QvcJlzaGE-W*F_AzVpbD?MaO3va2Wly!fks{KV1=i;wcz|;f9F*)k?v``zW-rolG((Y zYp2d!D{AE%hpj#MC=>^ydCN0Qm}yIW^ZUwPcfrAMv%=GeZK ze#qVzxqqFy@v0x`xp>?Dy&LD-N?Qvr{Pp+41|cJI#nv6!X@L}0&4Y`7-!2=1yUbg* zZq3qIX9Tk{|Jv;r9RiwX^uood^MkCkgB6eNKdT+no4EysN5@9^FjNCoFJ8X?%tsno zIr{{M1-sGY!!0#+ADKKQie~NV7vN<_(Qrrldi#bacnXw}rGvARojC=m;7u}znPV)0 z0#0JsyL)>&njl5vechd(dWWVYIQxjyr70l{#c*3~<=Z!9bxf4+ssl%NE_BcgH@+#n zbv^IhglW>w@4w4g;HV$1dzyRt-2Fzm`||zYAKEz2M%nxN)|nF*pZDS-Hh%l#H)|un z(p7N&_Y*fNIaUjH9Qkg~GCv&ib?$FJoqpU6^I5j%yCXYNU6rl*fBp3P)$&PN#JYn& z9@!FaGF6uQ$FFA|Hj8Z%bB_LSV3i-Nv+(S1e_netg!W#t>*!ICquk2te;&W|v`u6Z zwqp0;eOUpBuBTVdUwu+DqPL4%3r-Uvsgoa`JSZrx{=@?rur_-|q`9=Ww!EyOzI$3{ z?jOG}F~|lrJKWjY`f-4zz%iV?yq(SQ8X;KQIQ&@=U>AWxA)w(fQ0K{bgi^p}O--}d zLJi58hK@e?D6@fDc@fy=}{yh2FT~;`2ZKa|emJ%*!JGqFcJ@+1Eyrx$rh|vJ zF0fbizALzSJ^$S>+HYyjjy3U4=$X!{;wR55KFcj5(w3*ixR9h{-Ay&M&3$}~T|iWX zpB+UjWKWF_509{F8`r)AL9BKKBicapV|F z@5p)4zUF#XS50~O`}T1SsEKJyQ=^!-@P{{)k*X|_m^KT zz3h?E0~Y6ilAS>7e{|~CzwW&KEM-KlJM^zZt2`Brd1p_YyZd$!>9zE$BL}nRSqK{P z&;EYuZr!X^{JNdHHm3TKCaZ3p`s;f6ILUue*80_H5jLt%#Wyb8dex`34O@`1C?VXH zD(ZTjpZB7bM|KVh3k4fZI}r7%;@6F1YLcmiwY|HqpPPw#q_wW4Z%QOr!-(c?fua76 zWcfr-N886wgHtlBjbB{yf^bLFOncSqH&gVXOKY|O$`sT-P*M(yGi?5$Pd#$)r<+S*# zAC7?<&Z)Y029%^)p4q%DM}ORx>80x^JoDQh*WXM~BiHW#cHi1aqw%s!zy5UL#Sq3X zee2g>Z%TF$ez^YI&lidZ5w7!AY~HzbsjnU!s{DGnWKe4zxNyz3oD~6xjtA$?+NC)VPOEG#XkSOsV3Q)e$rW$Y9j8R2V36b)3r zEG%i_83it0y)Glp0WtLU`iT=a>*XFxz+$#M%2Eov`suF+pRi$ByY_5a5^Or#aPP!V zXI_k&#;)JBd&A-Y+Vs2JpMSadj%$;&are%Ri+nIcMd$u~{9dchGkw$UoUB+YVcp%6 z$FG!)(?T-0?8r{_K@Y#W363b+Bo5v=7T^zVp+P0~zY+zMjsmuKr1lsdsdguNi!n!{)NbnM@wc z+|A2@sulmp4y#4#nf4>|=doSAb71&3cj=end(;v5M_$FbQ+xPEY;jOB@{_`)FUNJE~ zi?&9w}pO%AEb`K2l zb9XSqiG~{A*Y`^)4&V^pj7mT#xI?}DY%Sg1!IA>D0aB@WmM75Q&F$<=FcQ}I1XrZg zAnXGaE_*Wcbb#MfeJbPIcTH#@>?PhEZIjD}=HH?wy4@ibNT*S&8YQ{ads62sZw z-wrX}(bO}og2Oc$EW^Xwi69zdvgI(1gf%U~S~=TMbYcaPNF*LI(Jy_=zP%eFv7L91|9YilKx-Gb`s@9hqwrmYmo7bc*DE#&UcP-NNXYKD z&x>Bybo0mo%Qj|3(D^;h4NVO#JtDK%RjcNiO9nsn^!0oMCok?PnMuyD>A_*+<8JLzJtwI*1M={v7FJ4rBoB&6HDeE_++VQLIU%gw> z&ZmZC?)o}An%MXF!ih^opW*JQ;E8{kFRbIinZNGVi!6eZ)0d`1T8o<>-F@0BGy==C zm$$3AZltlgV+L#KWNStv;qQ3wtRE+YanZ^MLi2UORo^`H)G{?qlDq zbXU}a5^=3s=DqgFk2_=W;K}s#)z@S6#GOBUv&5WPbou-E8?&u^X z`5B2vK7;L=P)jzqHpQxD*)!0?f`g|kLq823vjFO7OTXB-08{x;Yh%mjNd?*7)6JTK z(rMK)kw}dpVMIgiJsiAKKv-y4fFt~4-pRAih6uik)^5*P>dGrV`R}vEOuT=_u5Y%* z;o9$C$SvxSSk2q8Jv!KxnI~p%PV<_WlotqsG})Rc zr@|&QHpG#l5l%6g9E@XVprxe!O>tF^&?q!(_qJry(b5}N?!M|nhi&=(yEX2!RkzPy zc+jNuU3+lvQfFy<@q_$V1NgA4%^9BBPvy^Ed>Fw7WNuj>M;j`>b~(R6;<9A-{_H4h z*TZw?9=7Ye7H4N?_`tfJ-vOspwBVGb$)1Q$#lUxsV{~d-ygR(>@zr}ZLd(d-%N9p6 zIPdfGE5=bap1yuw_C(>p$3C`>Xhb7pv|=_#hO=<6B7--xGpwm80m9tNA8h%@`Ub{l zRcMNtC4;09u=xrkfrvwBB<%4~F2W`_Ce#5t(^m4}(FcJ`=2yFx2NFhJU;O#xbDrPU zACGPb#r40ua_)YU)_d`)bm&m+&FfaNbflm)z zwrN9x#Y|OU!7GsL{>h7@ETsMIpT@!d(bmz5AYpcOkIE@d0l{A8fV!<6!vchnrL~nA z4G)t`BnpjEI6cl*5-l8ETBK;BIx4Dql-A+N zsfj-5j@!SVek1kE+P!0$kEY?qiHl{kZp(J>Ug|Vc{P)>{&!p%LyElaCKV1CnN*yw8 z=i!`iUHzT&*UDJ7%MKme=sI5T$In;lQSBXJ9#eIaxHS6O|S&eTi+PKDH zOBVaVdtN<$Q8#0jxP8xZS3ym|t^D#)YQ*xDN$yzg=jNs!9?FzKMXF>n4U%T<>_AhD zcD8nb_pUZRfnGKwtzdF+0F+)F2By(tD5h36)->gCV@>;nh6YYrf}PM)ADcTz#8`0h zf2WF^J$CNTx<&5R$R(j($GD zBROkDBxR`hdhWwIvD=EhyHYG>YG1ziFi!M~4KkVStZN!nJ1)##8v$>;bM8vA}XcowZHFaw46AR?H0bPh))2*QR-ZBZN!2rIVHm)~|`TmiE*(4C!nGd>Nv) z(xU1qvxR$(<^%~rtvy#J@W|S?Gm+d|`m}P46qK6ct8Ki0^>G&_ddH6k7h>yjPh2b+ zHIB{7iZd7Wv~-N9%)I^W^n-QPojig|cyyo@d}g4he_RA78AD}IuEEkRt&HG;(f)x6 zG0Mn{PQqewSTr0CQ;Vj@Cip58g<)-NjF1QvC^8AHU;)zhDQ)AHtxWO5etLN7Y|#ik zX65Q6J4tu*XA#BG-4;DoS@5_);j`xO;k9n8XMg^5u}a~yeA6-?`nB_MBTrT4 z=U4HZRvr0alQ;L}>0d9uSNgBYPIFcDRM+%roZ=Gwa08|HAJ$3Tmu^`b%b0B~d0sJu zu=8@az(_efCE3o^jw~DLXlNRcGyEe%U5&vB+2ANo2}i(S2rQ98A>k2fiC|WwgyTpA zgq+WlB8_eA7&tj=u#d@ugH5m#Su)hsGYz*13Uen;HI`L=Ry)O~Cx8>E4`uIrm9|j} zqO8Ro<>g%pr-bx43vTW6;uf(@Y}x`3M1Mu;`yrH9@{(B7$@0RIPcV<9^!bj`re{y; zW^EEyX87xy@~*!arp2t?oZ-T+%70WniFXSN_n?TzMtCr~oh=m{FI0C5O#_n_McHZk zKa|&kJ*%y=Egh#*X;B0+PA8a}n4ICu;8bfTHy7}pZSqrl$EQKI-YPU4>UIRiKuQN0XDj!`kF2QJ#c=s zGkgRToJqK)yQe)x%^e@->5Ob`jkK)(o?#)$IlvDbh))g;jBwNhGYc~+R<8ubSdW0~ zR0@Ss1H+IgM6_O`Q7a^~0;wKv%rK>*uW6dSn;MBe5b-cCen>0o0;Z;uPbR~+_4ds+Qc&=I?!4_^uD;P zgHLu13h^@4vL`tT6p@70aEH44I2ik&=rDJR@N<1_`fnp_Pk4 zf=PI6jzFeGk*HK63Z~I$by}5NCY7tngp;gFaN}vpfP>Fb4p&DasX=7=Gl1>c`j0>S5CPpN*7MLfMD^+Se0)<2%kZ9l^ za84Fean567JL#TMW5Dp&3yKNR?D5nB{|`W-QHwPQfF!N|{8eP-`?Q zrAmjyk!eO$JWRr!p5{vQcp9BXg#1;?Rceh&E>-AI1n|^@MQUXtp-hX!;?QulTqaW^ z2s9cA1=3R>l&N7TEP;qe>s1P18(gQ9$rKtG5{*G)AVU#wy+X+4fi%XFj7%9OB)Eh% zIyxm#qliXk<_se&c-O>Zv)BR^hGu4NO2O*oqS;w7Bm#;bLZ?=1;lNoW;39xkB$C4^ z=C+nbXmGMQKFI+!+r-j>j?;(*Vuc<&IV+_SnF=u0$b?QtDFriAEWQFkq|qn@U=B>H z1aOJvDjfoA@C>2Xs#V~rQX&SgFHj_7GczM1LcyOJ8)J!dL{m#khA|PP7K6v`X&?p! zlx|Fe&Ig5T)(j6Y1WPruFsBni;5gG$GqVafo@QcZMyFu4A{Kb1##dvFEp4snSe1}H z!xO8)=^_E8Qz_Lj@Tvrh0)zlhBWeT&hr>X01{GVcQAnjSl@5g?l8IP=wnVDb!jTA= zR;|{-QCK`4hXjbt3LviHDMm&VJX|fA<#PC94FJ%>l!8(Uxg79R498QbB#d6IP=K!r zLIMDTRa!^{0f&YuB|`8V1V^D!Xbc8q2|z)mR4RZj90@2!fK(R=#Sj6=6u=2UQK<~j zMyrRTaUj|#J+Mq9k}CBWkT4{04_uMRRiGbw9cJdz1#XQ3KG069hjQBv?(fJAZ_j%I3ZZbE`dxhxi-5J*B21(Xg5V~J1z;;KWF zs5A-=p;gM|3N^q9#73<{0`eJ=Ame7(vvN2I7)L>Cq$06Y37iCOfU{VrDqtXz%Onz+ zQVX4BL!nX0A$o)4MC0%{5DG1XfeNHJT2muSAhe0UU6-fHx~u!;qk6z=22%2CxEfP$UJ(Or%2Vk5UTi-<$ykyRkSN zO0NKc5JgvU#tWQAdkU(4af!qnkc|C$N)oF^*SIK z$OTaWK~YFSAa!UwD9RWRRwyMwA7mr~qOu_w0Am0Xpr}HIgNOk;A=4mk02j4NkcLV_ zO~vD|NI+CTGsrH04FRwNG7J)ngt7~W01_bIVIYryl^QMN7XtDZ>VV*av_t4Z;~+}` zkSM?>jS3{D2IL*I6V<7ebGZnx0$mXEkQg*rEfo+X2n^7SfGgi9C!OUVIZ7f8w0`sJjA16 zD!?iUU=@Kx1X?u)ICQ`dBuE226gMciY7MAJz-bf`$b~B#sDHL>O2rA#3MI0RabM4QK#b)p`^TtN;f14P^>a1%v@AfkFwe z0;&v}Ksf}{0gn_w2`H8zgF#{#DuWIRGTgZb%vw1W59n$>18w zJ!rt3Ca4EoLP-r>8O#Gi04QH(fa(moAkZM|fLsG4kg>onL#Y6E8TlA zl7C_{rxpq=MDjVCA;iBJVDKIYnL`x$PsxOo8q^qa)u039m;o!u`#Cs)>xOmeOVu%e z^94)@LC72^8x3RTB4miILGynFVGa{$fB{;F#n3E}_Xbi!>mO9{p*x@nf)wh8Pz65* z_kgW)1pvYm^nl;cClp6R_#uf<`y3G_68KMGW))yZy@yL*VC(oD%^d zF^4)tE{GO$w_oIc@f5-YqMjBA2IC>{AW4Qc0|Wmd3*?m{ZvW^oXfZU-;rGAnhQ!R7 z0h;GD&)pk52c5t*$YU@D=!S+sHPTRO<|y(X$RT}mfP7IucLSMeF!i7Ofjls{IENWz znc=TtkU_$i8DHiZJ|OE1hCuoJUqC~s|6}2t0LTdF3aA6l{WIF2e9pfAX#0K4(*8ep23Y@}8UK;+|LOYDWcYyM0{#5+`OieqFxT|IJLbmz zqjPSq;qHIteGzAn`9If?0z=E(jJex?8vke1|8)Tw1&uNMnd|#9;)^io4*dP{>&x&( ni9z;YhAa3)8fIE8U$i_BT%o`}@ZYkQFH1-TS5RMQ1nmC+I+5v_ diff --git a/sound/direct_sound_samples/cries/uncomp_urshifu.aif b/sound/direct_sound_samples/cries/urshifu.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_urshifu.aif rename to sound/direct_sound_samples/cries/urshifu.aif diff --git a/sound/direct_sound_samples/cries/uncomp_urshifu_rapid_strike_style.aif b/sound/direct_sound_samples/cries/urshifu_rapid_strike_style.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_urshifu_rapid_strike_style.aif rename to sound/direct_sound_samples/cries/urshifu_rapid_strike_style.aif diff --git a/sound/direct_sound_samples/cries/uncomp_vikavolt.aif b/sound/direct_sound_samples/cries/vikavolt.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_vikavolt.aif rename to sound/direct_sound_samples/cries/vikavolt.aif diff --git a/sound/direct_sound_samples/cries/uncomp_vivillon.aif b/sound/direct_sound_samples/cries/vivillon.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_vivillon.aif rename to sound/direct_sound_samples/cries/vivillon.aif diff --git a/sound/direct_sound_samples/cries/uncomp_volcanion.aif b/sound/direct_sound_samples/cries/volcanion.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_volcanion.aif rename to sound/direct_sound_samples/cries/volcanion.aif diff --git a/sound/direct_sound_samples/cries/uncomp_wimpod.aif b/sound/direct_sound_samples/cries/wimpod.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_wimpod.aif rename to sound/direct_sound_samples/cries/wimpod.aif diff --git a/sound/direct_sound_samples/cries/uncomp_wishiwashi.aif b/sound/direct_sound_samples/cries/wishiwashi.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_wishiwashi.aif rename to sound/direct_sound_samples/cries/wishiwashi.aif diff --git a/sound/direct_sound_samples/cries/uncomp_wishiwashi_school.aif b/sound/direct_sound_samples/cries/wishiwashi_school.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_wishiwashi_school.aif rename to sound/direct_sound_samples/cries/wishiwashi_school.aif diff --git a/sound/direct_sound_samples/cries/uncomp_wooloo.aif b/sound/direct_sound_samples/cries/wooloo.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_wooloo.aif rename to sound/direct_sound_samples/cries/wooloo.aif diff --git a/sound/direct_sound_samples/cries/uncomp_xerneas.aif b/sound/direct_sound_samples/cries/xerneas.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_xerneas.aif rename to sound/direct_sound_samples/cries/xerneas.aif diff --git a/sound/direct_sound_samples/cries/uncomp_xurkitree.aif b/sound/direct_sound_samples/cries/xurkitree.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_xurkitree.aif rename to sound/direct_sound_samples/cries/xurkitree.aif diff --git a/sound/direct_sound_samples/cries/yamask.aif b/sound/direct_sound_samples/cries/yamask.aif index 519952d07635691e5081f3b9ea26e3356168764a..8d44817f7b1a7bd3fd8338a544562c82ced47d85 100644 GIT binary patch literal 13782 zcmZvD1wd3;`}cGg3@~(ecZUdwf*^{4je)tYvFhr&yYIX0>Y8g|7b0SzfQkr+bPI^| z&BkQmzz1ChCNI1)hRe@C6zQ z6(i?Mkz}Gqz)|B#2;r<8OC@Lo5+s$R<#SayGF&vPB+*G)p$thSDA_Y|EJ4fXDF`Mc zwMd4dVCB;+8JeII2{cp&MJth`sTkSRj2wg4iUfKZgQ5{D&?K~YlB>d#;c^+;#M($F zQ(}lH@f1fzAR`qDoT&vxEsRNES|Y;)E}qq(P_k)`f=t7yRX7s{TE>$i zkgAz!5yprJm&2&0L^+46(#xlZr&L5TQVpY7GcY2d5~1S`Get;(PAE_la5^qWfhOz3 zd<}_;;!SbXD4m3_#v5bh9KIf@Wsk6QbTbMPOEV)1hkM7lT;`_{y_K7*jf0oBg=VO; zr>D81qDN=%9~c^!67Qh+RR5vs<&*MJT5x>g;^iyn88fS1K7aD?S+mwNIb&JYhNV98 znu6PR?-ab9WW;2yUbAj>oN?c?tGTxxlyt$o)3esETb=4IuDW&c`oq#@fo1&a4eM8@ z2jf0IIDhH>>!wL^=*pa&wHZ;S<3)d;zE#pVg7jIIvu#~^1cUYJ(%IXkE#oM!jIG;N zCkL3!yuEheURfs#yardt+*l9ZCA>_2c6DVFAWDX;o&l zBNeTjXeqB~9TA{x!WYi>py>5**~G`zo(T!U#3RU)CYx0fD9G9I$ypVGXlhQ8kB`Yr z-JOl}Dm?L*m(c!-}xVgB($Ja z2M%qHHJPcpb3XTJ^SHt|c=e$po5JuzuWw(vRop(MF$rCL@X%U6U3badYxhdprgRoj z>ksZQrqaUu1*PqLl1I{-ZR_Tla@yV&J$_QwEo1m4 zWUNXLq47H3mp*&;Za{Az7&||4p0A0dud%%Jbv=vd78Ky?=kLkTj<(fQ)b`35o?iB5 z7ET^E81|=@);=!U*2w~;K$y8X5rrd6j-1G_rYlDJxg;kino5Q+ad5ICi@Pf;2avWd z=0?_j^JBeeyw>Np3hHI%ZoVNY8#kpnNIQzIpS}K$ZR{7Hxnu99Skh?KqwD8ylua_C zR_*>~|8jR_=i7%@&*#43*rn|_d~ox82CwyX{^c`QD`f%e4<6mUJODS?D=lj(r|m+Wc9tXXKuXX zJFfV8@4ERuW~!c|%V)2Z^rHh-Y}=d`=743_KFGaM+##d~rmtR+=t+}wzj^SWw0%ZP z_fA@t7G|kpHohsT>YNg3$jcRgE33b!`)9 z&*Y7}vg1kpB@Z7xDty_h^;x-V*Vbhrgx;rrpS}{M&MSKu)*d&xK~1q z3vPB|iYHghe0k-TLwc*A#XGMIQxZ*O*mbf4kY2{q*FC8?W0Zl(c~K9S66^ zqw6mJez~-3f~U1i*m-P!s%c;0`3sL4MtE|9_o_qRuCiy9<=rWK*D)c(yDZ50W>bi| z<@uu*Z|k~QNT+!#vscHOvTBNo%4$29O3Ubs3=hXJw5e3S*!6g|WUiWX*JQ z$+M~vq^*~?hl``F89_Su{&`s+&NIk`1jAW*I^ia2%W5a^ZhqG4(J8c7gp0hntW{?1 z4# zTRCIm9TE~gKPlXtTleBgQCTyK7O{HkhEyNIL|sYAyPD=6sq?CDze%^`^?dAXt1W-q zE^*5`d?=kU*3dFI-t+cJg&=U-v0bsG$?l$!@t*fDD>$B8j^zaFm;=-NiRO}`da3uC zJsU&O<3lVFyX{3`ohoqUhBR-AoX=q~+upry7CWb`O!lIobTU?V?fd3oxsgXyT)2yo zUNqU;-ujuP#851~qGG-96YX82Ldh(PB_+5-C50NZn%lT!OWbH(1K(-k;sDfe#|XmC z!+7dl@h4jH$}nwf1IIQljM7(H(t{65@Y40P@*Pu>8K0g!>81Gi84H;#lxuW^1^fN$ zk6H&O;tX?^<`?2d6b$tZb2S)@PNBqFxHy~WxD%6X-mDl#F*QQNP{y_l{YX>G7~I^J zrWQ)jRvxZ2err{`)F!}D)zikeUyx)yR{Zia&fCYB)7>j`nwQ`#c>laX=^AJ{RnsW- zTb61!QBgjOwlY(Wbd4cgW20SET{Rs-0!h)|F-{CjjI@+bj85}7lcVFaTC$B-fV-)B zvj6iSb7YK%Fm?6zaJDr;Of|fz_$iXT?6 z2sAj4i}FZL3BnFmzwhRwuzK;V+AK6N+-S7AW(;jXl`w}D76F0Qa5l8hpivPL){KH| z%|OqxBt%;WQ@DW3mq;X16^3eJVq$Ju^BQK*R)LGNbC&y| z`rbUab-$!bY7w51y=g@_dE{+Deo=YDkk(`6f&G~ty0MNAjS@Qu4NtfuQ4m5E)I`ws;?DJl z)icJSY0H-+1UnKr_4!wBRm{)>=fy_`2Y6cP`bzITs2nG_hlct%+uPYtC0(UY-VWp3 zLwqcWIAa@Y>~wuuJ&Ww-ZG%(D;bb~VH8n6IAv?NSz*qxJ0fJ0MsnmEIFArmW+q(~+ z`7k2g+A};Z(gnq=eERTt^?=5H{+g{D7I|Tq@9tf?oL|c`Ps}-daD4=6tg7(N?FX-W z-~sEtJ+e8!{6^tancP{KfZDK*6UGv((dmMuMH+nHy7W%cqzXH z7P{rwcR2~R>i&0k&z`*cZq{|#-Xr@~htatW56_+W`&ln0IBV~rT}yoseZ^PL{+(CL zF^yTj@4)5+3x0jU)hqYjeAYN7W$)R(%nvhE{^0h5k~TKpGkM+S)$!Jn_L9P(zs}^}{QcmOVN$#S_U?dMt%b zr{Q#Rkpyf4sZ=~%G0T}@^96FGk)vOTzavrD*I4ncu8W0ojLTfNV!jK!|JC)g7YbSx zP7BuMWM{_M$eQy`{&wljq*3US^_w>=4Kp4uIrr~B^E=e`F`1jTZA$afG~N3B*Nd-5 zuwKafOa%UpCviFHl=uB#;Xgi=02?9 zm`1JGv~F<_LpfCa^lskkUY$$AvdjfRwm9)ned*KUX0DO{{G=#v8yZqN)?QiOFaopn z5B9P(CgM?Q?!d>+5jn-y&J3^9An_!uR?HV^uw=Z3Gdjl8QLXH(%}wc4w1nAGS=Bm; zunkE{O^NX!vm2k>xc0Dmf*hK)_u!6HM@e&G?xmZ6&ena6APl^^b@^IB)iBC; z#s2U2WjG1z3UYJrylmky;}9(UEcio>gAh{Ka61m zS0DWGz)~l1^-I^Ew}~v{ z*6!T7I?hVk@#5B%+a*0}``FBNtHGW{(NhYN>irnnF(P?!%KRWpbzj-T{E`kn(ZM$~ zGBVVQp&t5BTw2FekgXhDJ-j>|jJ4w(bxr-V2nyYVPB&wiQQ*Rfktq?3NXF_FQiT?c z$74_!0?pJIubBAM*2xs1O&vY`0t3CQ5Mv*n+%K#iML0w+S+g#4p1q*FPTF7(tz`EzCW4;eIvW zE`9I6j&6!$h&qaLPaeNiI%S#i^^eDPq`1NRO0WF(@3YT`jpDX```zAEA>{G0++Y8F z=1DI$Fl*m;-)@O#%v4cXw6=Ww%w#JFcK#9JUZy(k2y=9r%NI)Z6e~vu239GUm1t2Y zxJIecBM~|&A3TZE?VM~G6pUUrGtgSs%2b>C#l%GhdDsvI?a!{|KIzmt#icLJNR9V5 z<-foB%P-gKBvz5>tJkl~jI|Zl-u&&COK-*qo(ooQ*|s6YL)-q~#Ls6QcdBfomTlg# zb$J+t`QqG9P?{MBrmWk(W5WVFK~?V0KV2vpM!L?=+VS;{OkaKL-Qz!<%5N5$g|FCk z=)i_3QvcJlzaGE-W*F_AzVpbD?MaO3va2Wly!fks{KV1=i;wcz|;f9F*)k?v``zW-rolG((Y zYp2d!D{AE%hpj#MC=>^ydCN0Qm}yIW^ZUwPcfrAMv%=GeZK ze#qVzxqqFy@v0x`xp>?Dy&LD-N?Qvr{Pp+41|cJI#nv6!X@L}0&4Y`7-!2=1yUbg* zZq3qIX9Tk{|Jv;r9RiwX^uood^MkCkgB6eNKdT+no4EysN5@9^FjNCoFJ8X?%tsno zIr{{M1-sGY!!0#+ADKKQie~NV7vN<_(Qrrldi#bacnXw}rGvARojC=m;7u}znPV)0 z0#0JsyL)>&njl5vechd(dWWVYIQxjyr70l{#c*3~<=Z!9bxf4+ssl%NE_BcgH@+#n zbv^IhglW>w@4w4g;HV$1dzyRt-2Fzm`||zYAKEz2M%nxN)|nF*pZDS-Hh%l#H)|un z(p7N&_Y*fNIaUjH9Qkg~GCv&ib?$FJoqpU6^I5j%yCXYNU6rl*fBp3P)$&PN#JYn& z9@!FaGF6uQ$FFA|Hj8Z%bB_LSV3i-Nv+(S1e_netg!W#t>*!ICquk2te;&W|v`u6Z zwqp0;eOUpBuBTVdUwu+DqPL4%3r-Uvsgoa`JSZrx{=@?rur_-|q`9=Ww!EyOzI$3{ z?jOG}F~|lrJKWjY`f-4zz%iV?yq(SQ8X;KQIQ&@=U>AWxA)w(fQ0K{bgi^p}O--}d zLJi58hK@e?D6@fDc@fy=}{yh2FT~;`2ZKa|emJ%*!JGqFcJ@+1Eyrx$rh|vJ zF0fbizALzSJ^$S>+HYyjjy3U4=$X!{;wR55KFcj5(w3*ixR9h{-Ay&M&3$}~T|iWX zpB+UjWKWF_509{F8`r)AL9BKKBicapV|F z@5p)4zUF#XS50~O`}T1SsEKJyQ=^!-@P{{)k*X|_m^KT zz3h?E0~Y6ilAS>7e{|~CzwW&KEM-KlJM^zZt2`Brd1p_YyZd$!>9zE$BL}nRSqK{P z&;EYuZr!X^{JNdHHm3TKCaZ3p`s;f6ILUue*80_H5jLt%#Wyb8dex`34O@`1C?VXH zD(ZTjpZB7bM|KVh3k4fZI}r7%;@6F1YLcmiwY|HqpPPw#q_wW4Z%QOr!-(c?fua76 zWcfr-N886wgHtlBjbB{yf^bLFOncSqH&gVXOKY|O$`sT-P*M(yGi?5$Pd#$)r<+S*# zAC7?<&Z)Y029%^)p4q%DM}ORx>80x^JoDQh*WXM~BiHW#cHi1aqw%s!zy5UL#Sq3X zee2g>Z%TF$ez^YI&lidZ5w7!AY~HzbsjnU!s{DGnWKe4zxNyz3oD~6xjtA$?+NC)VPOEG#XkSOsV3Q)e$rW$Y9j8R2V36b)3r zEG%i_83it0y)Glp0WtLU`iT=a>*XFxz+$#M%2Eov`suF+pRi$ByY_5a5^Or#aPP!V zXI_k&#;)JBd&A-Y+Vs2JpMSadj%$;&are%Ri+nIcMd$u~{9dchGkw$UoUB+YVcp%6 z$FG!)(?T-0?8r{_K@Y#W363b+Bo5v=7T^zVp+P0~zY+zMjsmuKr1lsdsdguNi!n!{)NbnM@wc z+|A2@sulmp4y#4#nf4>|=doSAb71&3cj=end(;v5M_$FbQ+xPEY;jOB@{_`)FUNJE~ zi?&9w}pO%AEb`K2l zb9XSqiG~{A*Y`^)4&V^pj7mT#xI?}DY%Sg1!IA>D0aB@WmM75Q&F$<=FcQ}I1XrZg zAnXGaE_*Wcbb#MfeJbPIcTH#@>?PhEZIjD}=HH?wy4@ibNT*S&8YQ{ads62sZw z-wrX}(bO}og2Oc$EW^Xwi69zdvgI(1gf%U~S~=TMbYcaPNF*LI(Jy_=zP%eFv7L91|9YilKx-Gb`s@9hqwrmYmo7bc*DE#&UcP-NNXYKD z&x>Bybo0mo%Qj|3(D^;h4NVO#JtDK%RjcNiO9nsn^!0oMCok?PnMuyD>A_*+<8JLzJtwI*1M={v7FJ4rBoB&6HDeE_++VQLIU%gw> z&ZmZC?)o}An%MXF!ih^opW*JQ;E8{kFRbIinZNGVi!6eZ)0d`1T8o<>-F@0BGy==C zm$$3AZltlgV+L#KWNStv;qQ3wtRE+YanZ^MLi2UORo^`H)G{?qlDq zbXU}a5^=3s=DqgFk2_=W;K}s#)z@S6#GOBUv&5WPbou-E8?&u^X z`5B2vK7;L=P)jzqHpQxD*)!0?f`g|kLq823vjFO7OTXB-08{x;Yh%mjNd?*7)6JTK z(rMK)kw}dpVMIgiJsiAKKv-y4fFt~4-pRAih6uik)^5*P>dGrV`R}vEOuT=_u5Y%* z;o9$C$SvxSSk2q8Jv!KxnI~p%PV<_WlotqsG})Rc zr@|&QHpG#l5l%6g9E@XVprxe!O>tF^&?q!(_qJry(b5}N?!M|nhi&=(yEX2!RkzPy zc+jNuU3+lvQfFy<@q_$V1NgA4%^9BBPvy^Ed>Fw7WNuj>M;j`>b~(R6;<9A-{_H4h z*TZw?9=7Ye7H4N?_`tfJ-vOspwBVGb$)1Q$#lUxsV{~d-ygR(>@zr}ZLd(d-%N9p6 zIPdfGE5=bap1yuw_C(>p$3C`>Xhb7pv|=_#hO=<6B7--xGpwm80m9tNA8h%@`Ub{l zRcMNtC4;09u=xrkfrvwBB<%4~F2W`_Ce#5t(^m4}(FcJ`=2yFx2NFhJU;O#xbDrPU zACGPb#r40ua_)YU)_d`)bm&m+&FfaNbflm)z zwrN9x#Y|OU!7GsL{>h7@ETsMIpT@!d(bmz5AYpcOkIE@d0l{A8fV!<6!vchnrL~nA z4G)t`BnpjEI6cl*5-l8ETBK;BIx4Dql-A+N zsfj-5j@!SVek1kE+P!0$kEY?qiHl{kZp(J>Ug|Vc{P)>{&!p%LyElaCKV1CnN*yw8 z=i!`iUHzT&*UDJ7%MKme=sI5T$In;lQSBXJ9#eIaxHS6O|S&eTi+PKDH zOBVaVdtN<$Q8#0jxP8xZS3ym|t^D#)YQ*xDN$yzg=jNs!9?FzKMXF>n4U%T<>_AhD zcD8nb_pUZRfnGKwtzdF+0F+)F2By(tD5h36)->gCV@>;nh6YYrf}PM)ADcTz#8`0h zf2WF^J$CNTx<&5R$R(j($GD zBROkDBxR`hdhWwIvD=EhyHYG>YG1ziFi!M~4KkVStZN!nJ1)##8v$>;bM8vA}XcowZHFaw46AR?H0bPh))2*QR-ZBZN!2rIVHm)~|`TmiE*(4C!nGd>Nv) z(xU1qvxR$(<^%~rtvy#J@W|S?Gm+d|`m}P46qK6ct8Ki0^>G&_ddH6k7h>yjPh2b+ zHIB{7iZd7Wv~-N9%)I^W^n-QPojig|cyyo@d}g4he_RA78AD}IuEEkRt&HG;(f)x6 zG0Mn{PQqewSTr0CQ;Vj@Cip58g<)-NjF1QvC^8AHU;)zhDQ)AHtxWO5etLN7Y|#ik zX65Q6J4tu*XA#BG-4;DoS@5_);j`xO;k9n8XMg^5u}a~yeA6-?`nB_MBTrT4 z=U4HZRvr0alQ;L}>0d9uSNgBYPIFcDRM+%roZ=Gwa08|HAJ$3Tmu^`b%b0B~d0sJu zu=8@az(_efCE3o^jw~DLXlNRcGyEe%U5&vB+2ANo2}i(S2rQ98A>k2fiC|WwgyTpA zgq+WlB8_eA7&tj=u#d@ugH5m#Su)hsGYz*13Uen;HI`L=Ry)O~Cx8>E4`uIrm9|j} zqO8Ro<>g%pr-bx43vTW6;uf(@Y}x`3M1Mu;`yrH9@{(B7$@0RIPcV<9^!bj`re{y; zW^EEyX87xy@~*!arp2t?oZ-T+%70WniFXSN_n?TzMtCr~oh=m{FI0C5O#_n_McHZk zKa|&kJ*%y=Egh#*X;B0+PA8a}n4ICu;8bfTHy7}pZSqrl$EQKI-YPU4>UIRiKuQN0XDj!`kF2QJ#c=s zGkgRToJqK)yQe)x%^e@->5Ob`jkK)(o?#)$IlvDbh))g;jBwNhGYc~+R<8ubSdW0~ zR0@Ss1H+IgM6_O`Q7a^~0;wKv%rK>*uW6dSn;MBe5b-cCen>0o0;Z;uPbR~+_4ds+Qc&=I?!4_^uD;P zgHLu13h^@4vL`tT6p@70aEH44I2ik&=rDJR@N<1_`fnp_Pk4 zf=PI6jzFeGk*HK63Z~I$by}5NCY7tngp;gFaN}vpfP>Fb4p&DasX=7=Gl1>c`j0>S5CPpN*7MLfMD^+Se0)<2%kZ9l^ za84Fean567JL#TMW5Dp&3yKNR?D5nB{|`W-QHwPQfF!N|{8eP-`?Q zrAmjyk!eO$JWRr!p5{vQcp9BXg#1;?Rceh&E>-AI1n|^@MQUXtp-hX!;?QulTqaW^ z2s9cA1=3R>l&N7TEP;qe>s1P18(gQ9$rKtG5{*G)AVU#wy+X+4fi%XFj7%9OB)Eh% zIyxm#qliXk<_se&c-O>Zv)BR^hGu4NO2O*oqS;w7Bm#;bLZ?=1;lNoW;39xkB$C4^ z=C+nbXmGMQKFI+!+r-j>j?;(*Vuc<&IV+_SnF=u0$b?QtDFriAEWQFkq|qn@U=B>H z1aOJvDjfoA@C>2Xs#V~rQX&SgFHj_7GczM1LcyOJ8)J!dL{m#khA|PP7K6v`X&?p! zlx|Fe&Ig5T)(j6Y1WPruFsBni;5gG$GqVafo@QcZMyFu4A{Kb1##dvFEp4snSe1}H z!xO8)=^_E8Qz_Lj@Tvrh0)zlhBWeT&hr>X01{GVcQAnjSl@5g?l8IP=wnVDb!jTA= zR;|{-QCK`4hXjbt3LviHDMm&VJX|fA<#PC94FJ%>l!8(Uxg79R498QbB#d6IP=K!r zLIMDTRa!^{0f&YuB|`8V1V^D!Xbc8q2|z)mR4RZj90@2!fK(R=#Sj6=6u=2UQK<~j zMyrRTaUj|#J+Mq9k}CBWkT4{04_uMRRiGbw9cJdz1#XQ3KG069hjQBv?(fJAZ_j%I3ZZbE`dxhxi-5J*B21(Xg5V~J1z;;KWF zs5A-=p;gM|3N^q9#73<{0`eJ=Ame7(vvN2I7)L>Cq$06Y37iCOfU{VrDqtXz%Onz+ zQVX4BL!nX0A$o)4MC0%{5DG1XfeNHJT2muSAhe0UU6-fHx~u!;qk6z=22%2CxEfP$UJ(Or%2Vk5UTi-<$ykyRkSN zO0NKc5JgvU#tWQAdkU(4af!qnkc|C$N)oF^*SIK z$OTaWK~YFSAa!UwD9RWRRwyMwA7mr~qOu_w0Am0Xpr}HIgNOk;A=4mk02j4NkcLV_ zO~vD|NI+CTGsrH04FRwNG7J)ngt7~W01_bIVIYryl^QMN7XtDZ>VV*av_t4Z;~+}` zkSM?>jS3{D2IL*I6V<7ebGZnx0$mXEkQg*rEfo+X2n^7SfGgi9C!OUVIZ7f8w0`sJjA16 zD!?iUU=@Kx1X?u)ICQ`dBuE226gMciY7MAJz-bf`$b~B#sDHL>O2rA#3MI0RabM4QK#b)p`^TtN;f14P^>a1%v@AfkFwe z0;&v}Ksf}{0gn_w2`H8zgF#{#DuWIRGTgZb%vw1W59n$>18w zJ!rt3Ca4EoLP-r>8O#Gi04QH(fa(moAkZM|fLsG4kg>onL#Y6E8TlA zl7C_{rxpq=MDjVCA;iBJVDKIYnL`x$PsxOo8q^qa)u039m;o!u`#Cs)>xOmeOVu%e z^94)@LC72^8x3RTB4miILGynFVGa{$fB{;F#n3E}_Xbi!>mO9{p*x@nf)wh8Pz65* z_kgW)1pvYm^nl;cClp6R_#uf<`y3G_68KMGW))yZy@yL*VC(oD%^d zF^4)tE{GO$w_oIc@f5-YqMjBA2IC>{AW4Qc0|Wmd3*?m{ZvW^oXfZU-;rGAnhQ!R7 z0h;GD&)pk52c5t*$YU@D=!S+sHPTRO<|y(X$RT}mfP7IucLSMeF!i7Ofjls{IENWz znc=TtkU_$i8DHiZJ|OE1hCuoJUqC~s|6}2t0LTdF3aA6l{WIF2e9pfAX#0K4(*8ep23Y@}8UK;+|LOYDWcYyM0{#5+`OieqFxT|IJLbmz zqjPSq;qHIteGzAn`9If?0z=E(jJex?8vke1|8)Tw1&uNMnd|#9;)^io4*dP{>&x&( ni9z;YhAa3)8fIE8U$i_BT%o`}@ZYkQFH1-TS5RMQ1nmC+I+5v_ literal 16456 zcmeHuXH=BQ)^6uSM;e-(bIynaNg_!=Q88!CS!dMI3Ezw}9%meL&Vr(1Kokig2$Ce{ zoO5bA(K+9G8=P~#Z{54@y8myvmeAGpR_*ZYXYaSFSdx$!2ZM!#ghnq}5}ptTeurtp z;4oNlFANt#l!1>>i;iEh68z8!gu#9R|NdKBu_Ask7(e>&PPkI4M3QNEg;1tN!%LZ5 zp$w)*N|*vM9Q4BZN*G#;hLeg^Dh!#36>~UB0v@4KaXCsX6|WRa#Bw}Y3n^mrmEe1n zgvFDCp9m3~C&iOVC_aZH#c7k!VlGdKp=hZEGaNO6h?8=-5)_q$mGJm#B2`Pyo94p_ z6oi;Pt0L)=F~V6fl1xSkn3F;{5hv#|g)kbOq~;5xI1)k09-o#ViD)U0DWI%rUM4LsUyRd;~?Gj+F=`2qFQ&otP5ANhG*TpwiMa(Ln=wu|%AbHNli(CZyOR>_&- zEAb??h%<{IQSqY536=~Em-9Gs42^;i&dkV=2>JBT*eq6;LB*i7v>9aScz5^c3~QpR zV_3`wXg2neE2-;OSi%-IBC=7jcb<$7;#Eduibc*@wt8s;}ErJ z=Z=jlqufcud3P^fdz$mLYgWg1Rr2m_t78`!32UBTz4GW?SvwQ&5VLuA^6DsGb3{+h z{c8_0O4}#lroroW?N}Y*ZK=ho$$XshwzOkXPWMdMvMnjp)s(Clsmyx)p`?9WgtrO? zsw}jkZN;`6}^0-^U~zQ2R267(q`7=q^G8) z=hhBOsSb-b96YooSdZ6S_&z-?J*%uwOtlYLv2EwNP*Z8|*ZlWyUcWEt7SrtmqF1b5 z9&Cl2XfDlvpYg7!Q>f$M8yvQHvA+XNJkU^gdTu&_+B)CLw+<)x5RngA3bv4>65!w1lm#forTYCUA*+@^R!vQ!Ba;!Mthr+c+EKvFJHR-xlg2Q7^ zjZborM*b@|C%PefOFmcBHPwEt>E=;gm#p8jdwn2fwB&XAtCz3d7WSZBmhIZVXIo-` zA+PeqwZAVv$gJV$1+Ce!V`E~tx3RS4&E>OyrVx-nEG_GW5i#-caS>j+-0GM2@4qZ+XXDI# zB9|v7MEF?Zrs}fO(?67Vv5ZT84jg2v9W#Xy!lA;!|ZQO>W5GyiVIy>D{SMo9E zQ`H#JcisNos{*WPa8_&H<7>BHmJX_o16J=lvTv2Ip0F+N!Nm*rayms68^8FS$B!om z5qsX>xp48`+p1Bej(x!Lo!@`I*-KV-@7&+_vnsoo3aV4YhC|=&jxiqlaP?o;URU%? zu;o&ndEFoNP!TRq`?Fpfc6uwA#npxa9#8uH8muxwDFv&&H zlKblQhl29PejdR(X!)istAY%L&7U&ge=MnO8&l|e$F5u%?PpCE_EzM)&H2(eDk0hU zEr|;Dw9>`NCK^9wW>pNS_3d1o9c-;EjCBZ-k-EHh1?>tm4^N;vl4{{(P35;0e=6%! z7`V8aASMUdL??fD>O{q-$|<6)ixq*@(atTavdGqK^qteXX-Oj|o$jZUqREyJ){Ujy3O>X4su!Z$q7Ev*4*4wUGk}*c8U_X^~A{y?y#=P z+Rl-|#*Z0!U8L}Rr;jYRQxCVb^^Fd-mSpEPseQJeK9XP|9_Sfiu?B1MGV?p&Zb|$1 zCORR<`$pLOsiwS_SuHTP<(t<Kr?n+7_!g`J>J~dHNhA1m=iM+f`w0bxTiL!xvE1z zHlhjI%BrVy1LC9I@Z&8llW0>%GkEu>4>c0!<*WP&J>?CvCV|0rs^;9RN{+$8a8L4N zLlf61EWw}9l9~R6qwnTntePB{hMW2Zd+V~Ra*KPB=C*o@kwFgL&d1A|C>-hT9%RW- zIFwQ#8woszpK5EHz`KMkcEfakd{@EN_i&|7R+V&PeOD~= zLbMeWbjs)^+R~Bs4i?@nD8vgSqw?xuC5b2>ZfawKxC(Qn3CD&;nJnhm@X#b*O)|1` zceiE0W(GPtdj|%G#&}4&rIWLRwYfe~I`}pJQ_ZLxuZ6=9jopHR+;s)*U-G{+jfoIA zJdU7k;TaO@P8!O8ky*n9RjFv2gRu^ci*UvaRTh2i;UaM;8ILQaI0i5F)t#v=s+mCP z>7iKt{j+3SA9oWBZ)}1s!;!U#Fv0W$7p84&s3o1A7U7I6O|@aOEEZ2F6bQv?0##R6 zhhb=D#y~PVYU?_IkG1GVmew}bmR4puu#t+)^qh93iMywrv4N#mXs9!$>)pLuFDqG8 zJ1;M18*69ZARpt|qMK*_em6$<4DhnIatw%x3(}wdbmQ##r?nz|kA;5T9=;*rK{krI z)N|)js`)xL&MuyT(aYof4QFcrQ9jJ=l5%zBqs zIf`{o*mZDwq@`k@zPi4psj?uiVnRRWz=<7;wAtMqy(6Q2P31+E{YbY}dv-<}bLvYQ z#-wn5PsQg3q3yCA>jNlbHRTP%Vgy_a(h!H_9-9!vm@Ivt-!9cQq^fy5n4Zf5cSA*Q zIf%>=In~tC+RDPx%AA2=w|vfgThKB~we<~I9I-gSp2)0xmzMUvv~^rcaf(j<{`*b7 z=(Z0}(lS3+HFb?EOu~|XIJGlWd$cJ1NqSC6eb<b89Usbg!LWwmb}Kg}v@>KdF@ z8U}Cs;q=ZRt={|>&oVxi*0c-==zi;u|9mvjPSW@xEj2x>sHU5Rvy0w+`t+_a`uLZZ zsZU>hD5@Qh8U}AYar)pgdsy$6%x9@-ZwlM^IzG#j5A0sO$W-3*`Nf0#PqXW$akinW zwryJ%Xyn!PDCh-nU8(y@JCQ0dG26ka$hmX-`0c zBiVWTc{y2In41~kd2Iz5@5)B8R$kur`a~RA-^>ulYWfVw3uoctV2G266d0-w8O9mv z8Jfi!+1ltM*?_2K5k&BEB9o&THZJybQCC@EMF$hSSm~PBdk2O1*$|j@d9Tyo7B)g29y8`MPO z=gg<~?>{RVp$2X}`P0#L0fvgfs_e9Tw;sN05L?FXJ^kbUQZk_Tm?8 zJpS|dTf(g|(~WtlSI=L0_I1`gYRC5{4{ZpwLXA|sy7~9tce2_QR!g=XIeu_sn1!ku?JoMfEwSfkLmYmc(cT(S1jiIf>*6lrzyv&QnZpcY{{4}E&q<`z6 z#4X#_MLH2CYjR${&MIyi7U0diBUi0i7HFm(tSb0eRMk2#Ekf(N1job%J5h!GO||ua z;iowgw2rmAkB6-;f;%=iG(N)y9=LQzYKzzN%dU1ap(5+OBWc)JF@SbJA3_Y zi^O+K(Hom_4#~)W; zRZWv!mu?4kTpy$ls-x?Fp1=LJjzjlezVqv=BD_0+8w+IauuH3P2=ju=! z%w+9{CwJ~X`_v^j4O+2f%j!r^L-|QI9(Gn6GJ^+It446>ZmFzuIlFDExf~HmV!c2SJM0C)x&$KS+&zd zx40e0zT1=NK^!lCb?@e#w7e!Z)pN!EQ$OroYOn6fPrGyb;j7Q>0^Nmc4*z&^M}(=M zAuHwf-ITW_Ju;KfttWmtxn+^g^w-x9Zr^*F^>qkt9l7I&pTAr0OCBqIb^q4gC+{i- zRThi49slLTmPHJ9P3EIpw;sMO?vfYb&GlD3ae@7%oiJinE%>zB0e`(w#5 z4(Q?XHxF;!d6L`2rFq0{-Me>FtUHa@oR@a@&Xep$HrXkB#fA;5qP&e%L**Hd9z6Tl z%q3bcSRA`FCd|hY&u;pd{w$-oa~5yn=;ap>;OAjQl?+toeaNpK5Mmjo*0v5#PIl(n zaAsG{*Xph*IhID(rR(VE>*-T*GS0}*2wQ^IBIA(?u~4c&VhMOG8jT}r>*|mYv%_r- z4S@2{I;Qqc9>6Cy+RDMoch8@`D;<`P+LSuP*_MP*8UQe%_BsfKFIrQD3 z&EZzc&fG_rFI;I0L14&2zqrZPWb2Xz`WxI6e z$y3L7EOVzatJAOj_S;`iil<24iTjTK_+4_Ot-3qs{-0;g-G1LJG7MUG`1Fs5)-2Fw zeoepm*ZJ$|B_k+@$nD2YAKeyirRd2|yK(JiT3*|%j@Po}!w0v=x)GUm*=Y|Sy~wMZ zK$`m}ZrZUS!P`JGP@end&AWn{0TIbAFd=D8jK3*%y0g3}zo@LCcSf!4;1?AWwZK+O zGTc#DSKkU!f&i&);~wDWZ9$WBh6V>lCui7Pffz|NGP5z!!zg)Nu2_jeBLS^SU@!~} zCY)u?iZL`3D@#)b4U3YA#zAVVXc?5#>=y(F`};cE>Jd0yxzBDscvZ*Nb`4Kho){M! zD~$q^_Wkg~(X|0I zW@*}$bLX$W`~sq5@uu%io!lAkfExJx{QBj~4>GE!Km_hOdVF`%0)0u>msgK(-hGnW zEHLn2z4O41RY6t+PEUF6izlfWrTqxY(3M*@EDyHVQL%d(igMm%6*sf-_JKnHeS}vTLW{Qy{ zIvFo!k4|t@6az~WBZ?Lpg@&s*V=Z+Rbv-PUu7l^IMWKP7)+A}q*Ua>1Zwu=uWDKXM z4F`_yUE@oi_?mwA+RZ1KU%SOL&xAdve>%QCfI3~4e(U13dvA(+L=2zA{XhJCWP=}l zx;*{*#S3@S!9Irmf~0*v{rvrg0QzKE+Kuy9?!E?{j0GzWp8Dn3dOz}b@$>7Kt~_{C z(knLfTYd1ypAN6}24wQ==EY0U<4WU2>kghid0>S%dAjoD?Y}SFc=2TbVHvh||Ix$A zab8qz-Mf1iFWz`r0y0@B*y7r`F4}`GX!)3O^V3* zcEdEv%snJBZfR7oy9r{dHuuHTjKa1Vw4RN-Pe5R>zo#Wp&{_83eQrhf3=C{i+PZl8 z`FdH?6%%ch<>la&f+t6l49%U~JzT8}uyW>bPe*sx;0RNoz*CLPtZghU^ypZ%h&eeh z*grTr!4s%ZWPKBR2UiCxeVlS;q^qs9xwB(nl%uBD`Nb|zh;Y@Hjki{p7k|h-ZI{`_>^=R{v2|e<7-nwB1 zKwybP3LaDx+^MOF@u>+GPllsgIeB_IT56*uQ-duvrA4LH{Q{ChU|izzXg^17)nvox zmyaJj$*l*p7r$ZGj!nx0>~PHbjN50={GC!ZsqK@Hyl3C`RS_->apy;1uX7LbhtQ4@ ztCPXL>asQ`6J{QBpkf&sK$)zy~U|SM@u&yXO<85|%k5I=oV)@F15H|x9f4H;m zYgu`1`=p#=?GX^*<77lu3)qw6Ljwc-qtjv(#mLOkgib`Lm1-0U4U-F5%xShjq6SAB zDg>IWXJ%t%Mn{V$hq^ktx(7#QL~y!=M?gr3x1F|<*-=weP*_~o%|_|F1;s8~78~F| z6?7H8e*7r?W6Lzk*flsNY2(J#VfM)0{0CPq+Ol=O&cR-OwMEb#Jlwl+X>JInGue6AaoVCi~>CT4a{ z?rydQ2v%oxWp(=yQz%xbF*GAbPhTG=Q!U9+#!4fVaq-SZJSiDPS}t6=K6&rXHK8WL>a>ez z{(6|#C8PpkT${XmOS}uZ_rtx5S5otunQ&d(g)wWkZC<`Wd*)hm|_H(VP@;#XvrW*SR?&Iqb#u! zqeY@oDMSoh!edXf`7$(7$I#GFhlmo-40W`&bWe&1Mh?FI{@!+mSpHyje&*{OQ0|&6 zj9as5b*#TRcCz~I&AdTqE7W-Tiz{c&-puO7xF&2nuz%aiMYe>g zs`M+rpSh9Mjd5POb>IHvRg0a-tV-~<^82;-op5kevv=RFb&>8=cGdGszy5JMyASOU z4d9r(cCkHfq&W4$xriLj5o(8JHWp@OWEE8PfsIK2IA9`gL-kloMRC!Ws^&omU8X4>#7oZJno$ZalfgqH{P%trjnkj&3(Y3YI zd@f*FZ6iZ%oSe_&OXO0~%*5D~7^`pR>}+E|Mo4)RgB=a^jlCR{k&A!GB0nc%l60)O zC_6K|9GrnT27_a-m=I^Ws4Xw$+KtqLewamI!lvZpjWHgS@#2Sn{&wzh(Fo2qENT0` zJzL_OvHdx>|M=}vTE(Q6)8ciz4;|VXZKnXc=c#+6G{2WoKt$s0%7Bg)gi#85|L0e%Vl%KaFT(UxgiC?pBfvPWb>s87)DFi#LC8$j$rpUH?$A1 z)78@a#~BbXW=A0FszZtdmb z%{>?TI-8J@G9hPjq^}!nG=tM!eG?0FQ+*0nC7NZ;Oizprfelflj=4SXmo}M*LrSN+ zYs#xTS>X80!rI=+&CSjLF;V|1x3G4Qry_u)7aSWCXsPZm%gHNk8kpoM2xfjUD`LH9 zGmT%s4oUw6ON24>jED(y#7{MpmR7e9Gero7b4XlVpqZ@w^Si9VnjWT-?hv+m%f=X6 zWouT-y_C$-UXixv(rt$hYzon1gVW0MSD%613cHAPyASMGv4A#Rl6v_(cr%e1dW0`s zwmc@t4xDqoOieHBmC~&oU7Ver?M<|1yDI@2#AIVD3j-Z8kpLHrw$wHatBu_KeVvSm za0zF$1=O2OY?@c}iufQqZ54O8rQ&0DK^>Fm7`8Mf#KjORoa||?t*YysQtR4!csQDp z;bJbA$K%iPMRF98Lcz#56O*$rZBtP1l5q%?nAzV@@wJ6Tate!Gvd|vvXHT>gzDavs zKBW`5X2+HUe+xXX1HAp-eDY<+Fe3TLku6K?(4*k!_2RV`RRYVHy{CTI6Kf@JdVBNS zU-v$aP=i29`Yy>8*82X=#Ve0K_99(Z9QyhAMlVEb=AEmz(@Q};7Qgr8k+rU>ri}Zy z9%PgaB5dOh{Pe>n4`uDkJGWA^%6moni?*ElWq+j3V9xy;_g)q@Pvh)kk`L`paDev| zz0Ux$Jk=$r1uU>T#aG}NmW~eQ6xn!3Lt}gY6dz8r z@(vF1wZw6I>Z_}pdL|@zLpvv16B-t-QYyrPS)mF;Bq*8P4XvYc9XqHp@O87m4CLMZ z>+0(!siAM|x}Cc>M_KTSZ=X4HJ*z`z60mCTv4gAK)QvB1f$hB}4#h2Q+pZ0Z=;KAt zQ_>4N1XP#E4apl88?#DNuUtzl9K^UR+jr{3)<9zKhdUQ9Kg{h=*e>1o^N+hise`$9 zFJ5|>--mTi+;ezGtR1WuY@R;KtmB)6ZP>9P!WKDFnVtS3tA@h}ShacW5=SDZ?Q_QS z*F}Rkx45;dm$>T4M(PXRXMO2aTLmwT4zQ&ur#rvq=au%TEQ1r42HDe;Gu_pnvhwR# zRQJWvpLytRDESR*~Lv0 z(0SgTed`yJhYO$Hxto^TA~KEI^V3he!gR)po?gFt=S{7^JZAUtgR4C7qm^0DpS>-g zAp5M?wkgsE)>oGO_Csm6)HrB$@|L9z>h=#0Z$5a}C^B2T<;dYJp?cF_Qm%mVZ6;|P6Q7dJO&Yh4(#tGQ!TfF#jqV1H8~n3?7(h=vws;AD?CGd(pqKEY9v zEnGbu^bzcVuAU*L09?`0H8f;ssrWNYo(xGKYGDyd5qn~In5EKjTo~kQLzRHN;OEb? zn-%s6yALMExl?AU(l7n?XIe8Mc=yjg?TdFr_I*mZdgDbE-(*qZnuI_L-&G-j7P{`+6o-n6J)RvrE2)Ybsf;Kv7-ucmw+CU`8{ zp1i`FGSl>>u(WAZu5ItP$j2NpT3b|HJ0K$4ElOAw=R+O){NzqbPRp#eTlD(v8zKP9 z=e#RR3ri!Ce6p*hZEzN?Z|~{jW-@C3 zGjCjcP%y3?uy*gBBoBDQlfTYAtdKabK5`tKXbj~&xOV4llfrT3(Vq@4)gOF&@z-;y zwQA3eCr|GV)0r%Los#;tienJ6ZcBnIcBHznpuA&N+cRc)ggv~s`0bnQucJ8kmHQ5? z^}+QQraylAzIul4yKL?9U>m~hKvQ*1+oXc5uSdlwB_go`LDVz1vCx6f^fc8scTY&Q zOr1U5?F@-(!Sqm1?M$bp`VMMth*=^x#5=+|Kc>Gb z>`|HfM**CPTk>AN2h8c0ux?ejEvzdy<-x13(f(J65Dp`~kX@8Vzr&OJv* zr@2BgXhJ@hD}-y?`Ys9tC-$7C?8kS~%GgFBt2eF+cO-E;Dk~aCBzSFYBDfVe*xkp% zIYh2q8)*k*dUWGnRwvpmVbl6(XRVpmii*}5yrqYSC3d_z_g#Lo&@6h-564#9^9pbN z_WSLEDT9a|M|a1Vuq)rcE$jq|Xz5Zv`b1&s-Df3JjIdol{*>&is(gIm!oz|gf=4{K zd|{>nAZ+TN#hbgiTM=fO%Ss!^R17D;Q?^w3WN$}j{{(nBplOq_YN=QX!_y6o^+{^( zXm2<80zuJbXcKW*91e>{z~O4y?9|A}$+I#6HK+t55DrdYW;>Pb63K7W?mfpA}U{Ffu~CKGu#|M>H9g~%p$^QIUF z)JV;jicTTJYjHT(O#ce*3>A-27p_j;6zznctj){JsTxC>I67PDqQxvGPen1cwKl*B zhFhvD>jy+&YdXN&j)4(Q4)hLA36uyV90o_>w8#`tKOz*OSq_&kRfAVe0#Y{1;)oCw zLvvFGLCzlT=^g;t(bUn!mH|is@T5S?(%a9?NCl493Tj4CHozU-Vp4hj=Vq>scXWJ+rJ}PS^TXFMykmHLv=2kj`Z=edfk|?SSQhP}HB$U0qj(Ty z8xprP&`jEz_v(E$OJ_mC>Ud8=U(Vx)@7vV&(VMod@+I`;KY#JDl~1+z_4hQ#&5jI? z3(>l!=6V=*M@32XfZV_%JZ6cHv1+LLb75sS7o%rkZN?xX6>@M0MIvEU;DrTTYG4Z# zSh@*#&#^Y9D49LY4NYx5qkOEHPgq2d3!pBLMCwMBG-FeJ5<-r$a(Y*yF<^Qvw9l#MaK74(AMY zw)cz)v3lTss6I|IGd{r*BZxW-ZH#EFyS;Z>&2aJ$S!hq0?JUdxRNl!W+W0Q=cV@tO zQ}riKTHr^OguOGhVLBa(_YF*Gq@CZ3AN?Lk0yUnHd=zn&3#ly$gKQb12Bq+*dsEQ5Nr0jsD)TsBXnK;j5mcoa;t zsvO+*(bc8l)xw$a(Mc{i*<%3lkP47EBnmhNkB7uz&2U6&po@u#J{2ut4)ykqauj$P zg8>dpfhb}DUm%i5WpX79i9#WfNE8N(!(za7R2g_d7tGG`B`_RSSD&Fx!osApOt8hw z5o@%ifJ%=D`h>GQE{DSv$dS;Yp(eq}#6qD+Dpx8MGVnhFLm*RWG!QUC*3`rl8@wct zwdr8@8kh%IMk-e*b;ON#)KDOf=bh(`s6iDf_uGzK&@3W-1h$16l!7K;n4h9y#U77b0177Q=<746kXdHA9G*}L%{OljASDb1en-I+Qi((?5&+A< ziMqz7U=v8mXO4}GO>sdq&<%|AwQ(vD*fWxpDiR1GZ)j1$u`6(+kUcd4FfK=F zQE5~X0gFZ@q@|7In?&6=VdGBFa1C*UwZ9U*^KAOSwb;jtKCWjGwL z155=RCQqh6mRrv@np#fo~y~!jy8U6fhASg~1WPSv6860j3j5RR|Os zt?@muxm*S{Firts3dAJ_u8@lOz{EgutQHw?7#jSk0Tf>l`cyCk8iW#v zYCu|g4DdH2G9jN2MHVnT64)A;9ilia8e%x`st%zPGBlZ_g+;0XjG=G?@InH3;c;ll zi@1LR=Hk5Cs(gGOK|U}k^}$oMMo8?d-$Z3MKC zSgHWapn)u!w4*^I;5B$R6yAZ2XG3I9#RM-4Yh`0AZCPA23$Em zE%2NYiYv$#8WVx#HHDJKH}la00RiL}P5B9U6s!#(ri4geL*@ifF#!6V;{!R6Ra3

0VfeP zSwaILC?RPWWiEC=umQb6UVzd#WF!2XCm~7zM%08C8j8p{glfzTEw2GE6n%4C42=d0 zLr8!a1>$Cn<$zfsLWdFu)BvqOAJh=qH2#Ky3Se&z%m8QK;5e@@0K`AA)6{qKI95SA zg3JNVyFm!Z6%b%G@PXV8YGNp0K(Yhggl5!~R=|Xs#i5`9T4=%^QWk`UCMQDa4k7}; zu#k5l$V1@_2?rXK^B^&yIUtchC}>y^s0WDv@}OoV$PJoN8fE9vtO**3X(2p7^bf2C zxlhwHOaQU6CT<`DLeUQ)90;kgKV)jiUUQZP{lG2Xf)-d55=VmyjhGNLAXjNbgye_B zpCcK~Hvq(%obZpG=Yj=r#=Jv-((`kGT=8wFhLSZt0*2AJOd}IC`J7QTwwlvQ;|9$r zjc32n9AruevER(95mO^Pz^{f2Ah|)uKe}jaJ}(vs2WS`+CUZ~(YCt`ZS?0kA9@TIM z#1nIa=1ijzcg}U1;F?FA; z1kz#NB^v8%T&ID~JZ>O*h6J1+2&oG~8VUobL4tyTbHV?Qx{z*=ESja~F$OIQ8B6md zY-Vp!RTGKHvyJq-5K$!2Gdkm6szG-Z(kqR;q6zQ5m z4hjWL$2T&bw=JaioZ@q?f=r>YwFaSJPRJBcn_p;NLX9#&HK;)g&y9f?Wxfx>;J4g6 z=acyT2-^P&I$`Tx}d@!&6` bz%$ybLz5ylhbD$^UKY1HY_pH2FYJE-qBUiN diff --git a/sound/direct_sound_samples/cries/uncomp_yamper.aif b/sound/direct_sound_samples/cries/yamper.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_yamper.aif rename to sound/direct_sound_samples/cries/yamper.aif diff --git a/sound/direct_sound_samples/cries/uncomp_yungoos.aif b/sound/direct_sound_samples/cries/yungoos.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_yungoos.aif rename to sound/direct_sound_samples/cries/yungoos.aif diff --git a/sound/direct_sound_samples/cries/uncomp_yveltal.aif b/sound/direct_sound_samples/cries/yveltal.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_yveltal.aif rename to sound/direct_sound_samples/cries/yveltal.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zacian.aif b/sound/direct_sound_samples/cries/zacian.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zacian.aif rename to sound/direct_sound_samples/cries/zacian.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zacian_crowned_sword.aif b/sound/direct_sound_samples/cries/zacian_crowned_sword.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zacian_crowned_sword.aif rename to sound/direct_sound_samples/cries/zacian_crowned_sword.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zamazenta.aif b/sound/direct_sound_samples/cries/zamazenta.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zamazenta.aif rename to sound/direct_sound_samples/cries/zamazenta.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zamazenta_crowned_shield.aif b/sound/direct_sound_samples/cries/zamazenta_crowned_shield.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zamazenta_crowned_shield.aif rename to sound/direct_sound_samples/cries/zamazenta_crowned_shield.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zarude.aif b/sound/direct_sound_samples/cries/zarude.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zarude.aif rename to sound/direct_sound_samples/cries/zarude.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zeraora.aif b/sound/direct_sound_samples/cries/zeraora.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zeraora.aif rename to sound/direct_sound_samples/cries/zeraora.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zygarde.aif b/sound/direct_sound_samples/cries/zygarde.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zygarde.aif rename to sound/direct_sound_samples/cries/zygarde.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zygarde_10.aif b/sound/direct_sound_samples/cries/zygarde_10.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zygarde_10.aif rename to sound/direct_sound_samples/cries/zygarde_10.aif diff --git a/sound/direct_sound_samples/cries/uncomp_zygarde_complete.aif b/sound/direct_sound_samples/cries/zygarde_complete.aif similarity index 100% rename from sound/direct_sound_samples/cries/uncomp_zygarde_complete.aif rename to sound/direct_sound_samples/cries/zygarde_complete.aif From 2d536bf56054d558469fd965523269f69c48ed72 Mon Sep 17 00:00:00 2001 From: sphericalice Date: Sun, 2 Jan 2022 21:02:53 +0000 Subject: [PATCH 308/417] Use TEXT_SKIP_DRAW in CreateAvailableDecorationsMenu --- src/trader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/trader.c b/src/trader.c index 1d4424e751..abe581db31 100644 --- a/src/trader.c +++ b/src/trader.c @@ -77,11 +77,11 @@ void CreateAvailableDecorationsMenu(u8 taskId) for (i = 0; i < 4; i++) { if (trader->decorations[i] > NUM_DECORATIONS) - AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_FiveMarks, 8, 16 * i + 1, 255, NULL); + AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_FiveMarks, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); else - AddTextPrinterParameterized(data[3], FONT_NORMAL, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, 255, NULL); + AddTextPrinterParameterized(data[3], FONT_NORMAL, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); } - AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_Exit, 8, 16 * i + 1, 255, NULL); + AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_Exit, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); InitMenuInUpperLeftCornerNormal(data[3], 5, 0); ScheduleBgCopyTilemapToVram(0); } From 44a6c4c0ecedd4b8575ed87775676943b019e3e7 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 4 Jan 2022 00:23:24 +0100 Subject: [PATCH 309/417] changed `EGG_MOVES_ARRAY_COUN` to 19 to include all the added egg moves (19 is max value (Buneary)) --- include/constants/daycare.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/constants/daycare.h b/include/constants/daycare.h index e412d2ab77..9af7e6f79c 100644 --- a/include/constants/daycare.h +++ b/include/constants/daycare.h @@ -21,7 +21,7 @@ #define DAYCARE_EXITED_LEVEL_MENU 2 // would be redundant with above if GF had used the same value // Array buffers -#define EGG_MOVES_ARRAY_COUNT 10 +#define EGG_MOVES_ARRAY_COUNT 19 #define EGG_LVL_UP_MOVES_ARRAY_COUNT (MAX_LEVEL_UP_MOVES > 50 ? MAX_LEVEL_UP_MOVES : 50) #endif //GUARD_DAYCARE_CONSTANTS_H From 3779396d74408132f11525da9713671568eba40b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 3 Jan 2022 20:30:05 -0300 Subject: [PATCH 310/417] Adjusted sample rate for Noibat and Oricorio + slightly fixed Klefki --- sound/cry_tables.inc | 4 ++-- sound/direct_sound_data.inc | 2 +- sound/direct_sound_samples/cries/klefki.aif | Bin 15616 -> 0 bytes sound/direct_sound_samples/cries/noibat.aif | Bin 14362 -> 23848 bytes .../cries/oricorio_pom_pom.aif | Bin 22762 -> 37500 bytes .../cries/uncomp_klefki.aif | Bin 0 -> 25880 bytes 6 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 sound/direct_sound_samples/cries/klefki.aif create mode 100644 sound/direct_sound_samples/cries/uncomp_klefki.aif diff --git a/sound/cry_tables.inc b/sound/cry_tables.inc index de81150f03..d1b33a637e 100644 --- a/sound/cry_tables.inc +++ b/sound/cry_tables.inc @@ -706,7 +706,7 @@ gCryTable:: cry Cry_Goomy cry Cry_Sliggoo cry Cry_Goodra - cry Cry_Klefki + cry_uncomp Cry_Klefki cry Cry_Phantump cry Cry_Trevenant cry Cry_Pumpkaboo @@ -1980,7 +1980,7 @@ gCryTable_Reverse:: cry_reverse Cry_Goomy cry_reverse Cry_Sliggoo cry_reverse Cry_Goodra - cry_reverse Cry_Klefki + cry_reverse_uncomp Cry_Klefki cry_reverse Cry_Phantump cry_reverse Cry_Trevenant cry_reverse Cry_Pumpkaboo diff --git a/sound/direct_sound_data.inc b/sound/direct_sound_data.inc index 472c6d37bb..bddd27423d 100644 --- a/sound/direct_sound_data.inc +++ b/sound/direct_sound_data.inc @@ -3212,7 +3212,7 @@ Cry_Goodra:: .align 2 Cry_Klefki:: - .incbin "sound/direct_sound_samples/cries/klefki.bin" + .incbin "sound/direct_sound_samples/cries/uncomp_klefki.bin" .align 2 Cry_Phantump:: diff --git a/sound/direct_sound_samples/cries/klefki.aif b/sound/direct_sound_samples/cries/klefki.aif deleted file mode 100644 index f07f78dd9a22b96720bc664ae10c1556a89d0785..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15616 zcmai*X^$;gc9!=P^O_h*0pCrbU3_V@qj zd*AzmKl>A|)uqzh`S&XQ=Zo(z_|DIt{{El*3;ryA_cwp{<6r;ykN@4j`q%&V-~7d2 z{OKRk?mx^8_?Z4bKXU^WCjL!||3;&fpGK=kAKWwzL7T~U#@cZhomRaXbXre79=SAT z@FALXX{JRxos#0!cYnCB^-umWkA9pkf9-#(|Mct0cfNmf^R17&>aRcPf9G$L?|)mr z*p|`h+3g2E`{)PHx8J!{ubOAY^1o&;|LN}eU#i^W()KJzU;j9OEiez3Zaty)V*U>-5ydYBZsV z2W`?y2g7<Tq4`%+bYhtz4LDxA8CawVkH>bZyGY7SXBBa($?>tFYTfPm0^O>9fUl=bv00 zU-^sY^-X)R>D~^DY}$^Sb$ioXu7}sn`boI0mKWxBw_5u{nOqM0^75kD)zP!@^^mW+ zeZR??yJ2&6d_7!VbU$mp)0NHs>iOx_u-KT}!$r~DjhpvxztGR0oNnritM1mhbSOh% z4sEnFr+s`8zpbLp;&iW{Wc!0zN4uTdxN`3{$=xAc*wa4UOl4^|$?@oNb*kc(IW)4%;Tp&A!GEPD5UFWk_9fwCiMd@2>L0oqiIZ_I4F@d%KS7 zqg|@9N!CMIC7WT(;)mV1T(-Mmwdi)kCa?CZp?h-IK6Be+wy@1ET&wMvyD{w254tyc z;i9`fE5>rn^Rm}PXj`|@_qDywZVq}A^`*)}sgvM#-BW)YOqv|4Br#QEF7$3l^6AiI ziLL4^R*iOk>Y{8ssFl*?p(vuNR@u6*+9Wnzi(C28FTy@j&JL;>@~G|l*u-#KW0=qGWcJZ zB0Zdj#Pp4docF9Xpj(C-2Oldl)veC;I8EN5zS6lcPQK7}KCl3UnAYtu>ZtQ^@MzNY z!B4jD5V>yLBKWq+W5npwJRB;0ZBEf`{LIvY2}uz9b3^4b7j>nHZP!es@!B-JwgfP&aWN5KtLAR@OPy zH7+s3$z@U1YG(-4Ud!E!XRBD5b1RW1eh(r^~)JGHXI;kfUp@$(J!(;|E^-Al` z+Nm{Z7+f%YNGhdW@Ud+s(X?kbqtK73K`7J~RI3v&-OT8Fn+)9;vt@Q{?_8zrF}jSkIZO=OJ5H3pwf*sSZB(hth`w#fI>)wvECxjBB@_qB_$jH+ri=M+-ao z$*95L9A;{jw@Ih4M8ysT>q*PbG|G(VuMY-W(OOMueXd>9_-dW?UAY>MAhn|}I1@}*7E{b*ucEe4CjjYFTGHe0{a@m?>gg5=ehQ?9G72<5bydc9CB z&R4|)Dj#uYRF>DMK{W+_eIzrK-P*Uq!W~WOj@`x3^y|8d2gjcE+33}12V1$QXVZre zkG3;WXZxhK(+G~+UJZvd*86zXw$Z9PT=e~*@>7_Kc8CW%;J0xX5m=gZw57>PVsJAq zyM8Rf0cRYoI}wBle|2ED+M;q(<@D475l1@v2m{3#l2KO{rDA7ZPqx*V+=vm5cB*4V z6iI70d8K%wJc!E=4$+D1SgDU}hY!`-^`?s^`s)Ti#~Lun!40^UZQ~A|#9B2b>3lME ze%ZG!?&#ZNZHiHXRzt*=T0`J+-I#!60e{wvSUx_2g*z_A3-IX9>ttvx0WxwOErU!Q2-W7$1yl1iXRM4*#R#HOWP^#wVxsk zSP#k)a77(~0O)a091`Fi6a#i95I7JIkM%LJR+|o2Cu&W^T2O)ZZg5B(96=$B3cYCb zIT5`1^`oRqPb=KICrpF+abYr+IKAr7$7oG!B)pJHjp@C%JxT!S8{a!UqB6n&j&GQl z=)x`m@7YHQ8fsYXP1>_vqPD51Mw9GpHnw^(bQ1cF4ONlsLQ-spBCVQBd-UtJkzj)@ z*k0q)7!<_|lj=@Vj!($P_&1q{?GFq>c&&BX*ES}%C7!(}&XcSnAOr&DBPnrg$VYvy zn<*K*bYu!|N2T;Y`oV=KHn5wl?uKkSMe(#xiTi{{ZB^~i6R~!59ra4@vxe!(S_XR} zgT;KskN_;*$c7D>w{`f|{q172tMVkA;?!5W_p4n@pX6k$?vxB2^Qj?B zk{(>pljt?HCb6|zL|`3j`V6>{AN(qMIcBTzewm%_pQ&BF!~%)2&Q((pAEzvBswby> zba!s*dzJ1c8{PJc>$**^`VMTVm#2P{-<3tSZ>U2sqjFRy%jWj%r)tMEJq627HJM3C z8|A0!_4Jv46TX%0%Io)c<>tNpZT9iqn>5`Mi|(msit3a2-|H|Y>;*#ULx zcB7l)IyX(5MC#-t&=Ovn?tLCeL|_Uc=yI&^j-=ma@gDQ;fr&t+ZgNv&88n1(LB>aD zMF_y%5>ON#Cy80|D)E@81R#k4Dp@pG4R~)8H6BgTSA-}~F-S`fiN-@h8JTLt?z;#W zMhxlWsI&}eZKVscp9Zoy*L1l8f|9Q_XnFE3!n{N0Kp5aROdFE~tJR8VBhV#ynWIeY zHqCEtKS_QZzrTCES-n(O`_|=qWurlrX|lIdpcJ;_vxdCYof0XCh*_}%EQ4c4~oi$q|GTR)R5w| zUD9Ng0e2ePIDEvYX&75T#v54Y@$9yL-Kan757HPmCDAcylzyL2i140ez5r| zB2-0f8+%;>@#_U(RH-(>lVdjkv0KA7+KyyHgc~E$v*~p-=sxMueIJ);x4NN9>-TvP-X=xZJ1g~yE#h+b#0)#?uj#bG zJpHmwI<}CKO()yM6g6#O8*pb|XD%EIcWBb6I~2)%D6)!JKXrL>fcokDxTYe+O_s-H zH}y7cJ>fJf6H`YZmWkvuk&%Y{1aNgFD>`H(!j7Wv_>4j$^Hq`pzKz|dR1;%9#;`45 zOvyv)q{x6}KB|`V37kFTK0aE^>Uc4BLopH(^KCk84k4qSE&1M!BNVM09iLtD^dhT;OwLo>@X&jyII@0sP!gpeAHN45|t(@3N?bLDe456;0!7- zcA}|gqS~jhfk;Z8Ru<4g#YM}Bcu(IGi_fY_#i@JqkhSEt0 zf)*0PiNjL<5GVpuk;_d_AriAvTGR>Yl~e>ofhe&ydHvZ}{^F#o>o$LVtxS^?`&cIj zU{Fbw(__nuiq<$n9_XacqTM2N_wQGAb)B_QbG^O#{^nciN4LM(zd1g?`o;0H?d#}C z``WF*+XI}$+o5o8Lay8Wg%eogly}D=S9OCHwo!)u9HF z?*P(v7#bBjw`(%v-~)$ z(#D&_utA_8ibOA^HONP&aT8Ou#{fTqQaqUQVtAbvq}V7u5m>z~V`|)du|2%-QB5H1 zAP|zF%+d%2X71KMy^D*oIlku)hs&pL59XQqMe|{@y}h`eUWRA!D|0nci}!uC%C}LR z>Om(HF-&zU%!>_XM?ltA^@fa2$N=^`Gj@?lkv;zu9aXl6z z^+GnL!_kq(Zlc1oS*vlJhLlL#tReS;_rP@&6%a`TqA;7N3^au=HQ==bXtNJT49YTX{B+S4CRH}8M?(=RvE`sr6M;}_BKWpTCH?XS$Ty$!d*bKv$WD4(Yf}5ncCCB=C)JDV z=_Y&o;Yq+e2bH^C~*D(Nz*K~);nW4CqhdLUPTBQ|eRck@x`4=%pH?p|Mv%b}l6PgS^&;x4TQ zP04DozXW?ELXKnsY^^ZcCvUR#7f})VZ<&7bPYOll|6R>=p`UY9RR9G9%Mo z9y&GfvY>~iT5tAFaNTlHT2YD${0NVccTbyKRi zfWtja%jgceZRn`kN0T++D?^?br)T}~lo$SFhI*NIr^zn*rqA>=wf#EY#=XhL5j@~p z2cZVE94VwQWD4%7Oh+?N(K*7qp3F!zP<;#a-T|_RA3~s45t$2|JQ%g&`6PGUCua+9@(MS5fHMf@MHzxTuc_2ELj8n3&j_jl&%Mg7B9zkRuV z9o~y~rl~)@*#URm5Tg4yMUnUB(A-iaA)H;EgvY=y#ZRm(J-X`somA=+_Hx?}=@&!jYQ?9zPPV)g{z|%>t z5L%d9->)XHv=s67m@f7m96CjY3luh^T7W<6!~&%ve7_o_*bMEM%c-32QX5g!x#G|! zoErhYN1u?T`+<{96<-C}>FnSwA(;^ICqR5cbGs2$l5 z<&h6i6Fva(l2D1GL(X&uvKGh?8p#{elBwW62FY$3x8-z^f@=h&OFNRJ6_SY5pXgHp z^dL6Cws35~iB{H9IklI7$-YU`HZ&Q?k#A6tu36OO0_+Hyb``WbTU~P!dVSznreT9Y zn7-3-wd||s)nR=&CPhQN5taQAHKjFiM&!pGLPcg~r=a~X7Xj3AR72h~Y&e*l$iXnZ z>8At(hVY7dPzZc05PF2mpN^Sr(RM7HDU1?MDL9lGv(GzOTTSK145$tdK;XIN1Is|} zlck|@Fj*i0u?EV>^-~5%iYs#Pi#wu7h$mRNsKvQ8NQ@oF$3O;H0L>#)r;X46Od@s! z$2kg11+PcaNP4Mwq%hFlr@f?>fr6D2Ja~F4UD-LW`58DeqG`(xLud>_Af~Vlu)cAp zyH$N!*Aa&jt}hRvmhm<;}I*&M=&6?%}s0*%=83n`q)yzDJ)S)-ia z$T)BTY!_UzY#4A4;}DV$mliIRO+sJv;2r@)4k1Mb6pnVV7VKq)hAbq&yqKQFBLfad zX(vP_lh%l7VSx#d6ndUu#(oex**5eAzC_`&335im6a*Z2Ut$FDwd`rLQsz<(>(B4EKXJEpc5Ua+9(PEP|quETOD2?8TMW;sDKH* z0C~@;AiX&0r^=AihAB~a3|gK^a3q3hqrOL*XW6i@A;XI-+WGA@)hJ1H~PAjSPsa3<>HD8Q`wdh5&HmFD z=8K#3@2~5ZEk{6~hpWrx7wT8@et32N-Ov8!e|&lQTR@&t(z|MBze7p1+?-?qo;diCP=c6rx!QcN}0~xe}bn3IyhwLr;PdVS*q-nh@|ZI$NiBNF9*`Ig28-dA65$&zKad*uESO zXOQEgSg8v!!IVg0IF{~{2vmlL5Ff!ID&@SaRdJ~x)u7}E;)Hd0sJI8@FTo=~B{^aO z^-cB!-)MA|k^sPQrsLGhQi|ZVRQo)^DU?q+p(3+(P*YSP9AtB<6iuwSkBG!@)V+ZS zpsIB!qK3GXT8}ea3r7VB&=YYZ@pt0sNMIsM#)m@hmIEXUGm=wDpaE}zZ{#$PC~N4C zP1jDdFP>tU*ySL)ksI_!!fW8CB_{FtaJgc2mye z2)dk40jVfHNE8TbE5Lj{hfjC~QiB{3vJObcE~OC6*e;G{+Fp%ObexDT*j#ZG0zTPh zt4>q%@#>IS5YGt5=m@63u(9p%Yxi#*xb?CE*pDP{)q3b3k_#tM9REvO= z8b^3SqJvY;gd_Px_*?`gsSgMIk8@lO^9_YLv^QW9-xCHTk{ZpbmJ#8-zHfif*&49MjkJr%k{_v!oxouDOQjqQv%h9B(bVw?0{|`x2gcan!t}l3sV0cf)YX zH(1Q!GK2p*6|Ot{%J%fUTGfYom8tDl*+rz9+OAads(VlEr|Q{M{yf>#ANF_p^2;aL%S|cf-}3@ssZX!c_v6MM%Jf3l z+uAAKb}=v|1R!4M;`~QwW7&AsRVp9My6HIYTSo03GGb{@hY+u$p29PZLJKiX*2no| z3p9CMLY9=DyyOF_q=IAnfHgR>ynO<#>60)LZH&VKVAHa(hAZNoBKW^(B$>t_4*3LF z(3kQNh`?Vk18;iaWfErvL@*uE1}x1pEJ4yY&p~RS*|VV$<)!+h5%e^nnHLvex+&w> zW}!Ssq59Zt1_F}Mlt!@jlKKS&febh(#9FWu!acB$%79pfF-pMU8O8|cU;<8wfPF~H zbV9bv{M?X53nZRl(AQW&vN*{d#o%E6CCAOU6eF4{_@TsUXCjvl4Ls&BC!dv1{0gZJ{+u*o-50&@HtjYNHu7KMYjm!TVU2s${-RMXC+XN#8@yPo`m0kWk`)wKFmOX8|8H-A|mjd{Eu%?6|xGxTCo-E zOlBpb$*C3|GFu|8*m)Xb&d4vEI70JKsyf1=^t+97u8iDkx_M z;nUZgNI`S~t8vHn-{fZCD1KgbW!#93uFD-c{X3eEY&V_v8ArnBL%if@8_JgR3Ma+6& z`gxCMv1uneih+m)AP^Jd%@`RUL^m)ZkJsm&IT(NQ&*T1uPWBA{%-VwTrG$-MpoIVIUds z@nhEK{DCIt@%Z3Mx;-|M4v#;gKN(Se_#YXe!I`?_Fd!AWt%{^u5@=uzdhdOsaA>!Zs&eQ_WW`9IIVk**J z)Wwxp7+q(zF~C`kBGKcZ^ZfGYVMWZxXzwPZBMsPjQN&{_xt9C$FJp;?%j0QM-aOdj>??x7(WU=CwGUzd|1+X8Sj?DGwC8C z$ejF@C(>5tl}{c^qj{CHd=HPAZf-rRRWvDEk5$e(l|;cE2~hLcGWaa#Ji@F-ndaP< zC-X!PLdxv?%ILI^g)zE>RZ$GLCG?)PBkoO`c{o1jcJGGb`-AxM_q-1Ilw>TQBx_mH zJi>XcvdVc%W~PDkl0RZX^pn^(-+h={9`hs9NH6Xp3cn({OedG;i}~9;+}BqRU*9#D zRm{`*HXrkf=KeC$Lu2`KUe&pwEdBA$xr_9hTT8pMG)O(qBGSp7^XEMFypjho&wn0= zJGZ1U!@PSWePo@p9PUhk(v(V=|4`YA5)`#2g27K34+VLy8lt-e&`C`7ujrptG z6glRva%*lTH+XWs`AfTZmRWkukLR`h@&f1KWRAxn=f>aon0tRc<$U!^tte|Pbm;^UzstzIz~(JzhVEd|tym>*J$`uG0LM#Nq3_%!fYTc=pgx?mXQ6#>20N z;TTyJs>CUA{5E!@%cp-mT|xwr^aV`>@}dq83am;r|*0D+*4Mu{{UCDDvBnZy@9 zOMiloe4+7)G-!b!iWChX2o9!aYPx5-Yr4Dk%B)->BO_z=eYx(}^&O9hs_wxu5KTrR zvdZK7UCv$n-tT_r+~e_`-}oE9CJ29b@0;KK&Ub$KH+~Iap(Tid@OR!5j9;q$_OIX` zpYQ(qZ~aYtb-p18{|o*;_xY{g`gP>`J3m=P7Q&zBZz=#6{eOS@Km6?v ze}~;rKmK51H{|M@`;Pvdt4IBf+xqFzc>3ta7yic|*0+uyNN*n0J8ypdTII@B|D?U& z|Ng*=U%KrZTb;MxN}U_mkAE}^Klr@|v*=Q}(;imeT|07Xvmd;FGFTIWQ#EGUC zo|yBk_KExk|L9y!vc|PW{jU8m+dKV!vA4E$`#{xtv-gs#!Q|dwzP8bjW_cxi*?h+k z4zA1oY&;EBalm(qe!wpdk1m60EDie2+VOGfo(_0DE%vIz>KC%du@Ta{Wrn5QAUwo8odQbArR@0Wn zILKy?ha39C6SG}W-KQt zEBa4Q%9Kkk>0)Pg$G}`(%gUR-iF%g<&O>x z^XP-I8XS+fCMM?9>sqKCbOtYT+wV`3V06^?{KE&Qrgm}6+7{z>%@X9!PMasS-P(LC zS8^v1iNNObTvdczuGZv`)pqJ>Qr&E+N~KxVMWs?x;#h4rn44E> zLY#^ckNsE>qVYU4WOp1Xdgg_>D6l9N6d{-=ik`b}Vd#0BtGXr$g=%RC>y{7&xo*mN zF6*YD$g*K+f}quES|J*>sv!xorfae&$coG}E-P6WBwS!|6eldpk|a*kG)_@fo}`5& z6+ABrL6k&M5Q{v^xhNnL7m<+hqTrM!LtG)rs>E|HDT+w31;?krvdr^BQbc4Hk*(mg zQjrZZd7g8DD!`Ql2m}}?N`+8VM4#x2$i=59Q_30z3Zq3-h(5S2Ka1cpf)eQSr>B%+ z7CBb=Aa^0NyrSqU39rR0qUgH(lu3)cs}ifEKlz)aE=B)rhBA63@Gt!LtC4@*(ghHg z3lX*A-3wW4qp;Gp6h{`p<3s@VNV(oe%EwuY6Vb z>C=|+hyUckZ~XnyzdZidKX_a6%*}Q*$m_+U4{P6OKX}yn${w3aovs*~UFFdubEp5m z{edg?fAr85(^+8aCqH)gg!?}d_Ns1RRz)YW8qUe)x9>^o-}zf#zy8&~{%gPVjbHiA zuUGB2?p*%lQky^cdkJIe*$J6ze*w{U|dE@R^uNO0G&G~dBIA`Z4 zN6$VzjrKWA5Hz? zMV`H!U#&gsZ@D|cIg)*Jo%Ve9O7K2Vb5VDnC|e*10d zvAY%g-jBW0`;P)qGH$=SA4y+2xOgc@!{g!L=qzq-i~f~wZMuB-*7jywQ>9#!j-J-; zs)v*2m3pnxy>(~z_O|nhc)hrPKh&Ma4?Y(I2vFjnUDiAdE-mTK+iw(mR9q*&FwCU%ql@Q*CY=kMGCV)Bo#tMjh$pgR{Un z{OL(DfAC}ZTes%3JO9;h-sxWZ>X)zD_3PK~T;MvxfHj|ll{R=lbwd-$R%g%)_e@p%FdGD|M z(&~LV*K*i{onnkf8=cGPyYA!f>xbfj&e`|r=!>XQ$Ds(tf+yfb`ncJIIb&E50&9ymOkfBeIT{_gJjBwYU+ z|FHMs`~1dt->sj%|IyJrPTb>BvC~`=Yd8PuFBKpBk^Bq4d^>-6c>4U=AaFC@sim&J z^~Qg>{_y{Nyz`yE-g6&c#-qnihBLXg$) z`{c0pt^cBR_EUcI+h44VhDn-SJo@N3viRiD3-RrD?ZJ_9>+1)VOsF(WK74te7U9#6 zhT3M$c|10;k}}y|TkqL&0p8(`Jgt_VyqM=&HXDVE%c>~o?RG`BdOOu36l)D74KtpD z+;~CckH(%POwVV9$^$1zQ8yz}kmq{4B_+shir_7>REUZ!WD(O0HkorQ#waCr0b(QO ztT4>Xixor4GGtQ}1ssVBW<^ezYN`S!`XebiLLzu_luAm$av~t09h}O5gb5O78Rr=Y z5YIENsGM<-rW}|HQiBV~PLYGclstmyh`>RQSegqcnA3+-CJC{~BZ{IVp<3`Iuqp5w zh+S}`l3qz=WXXdt6vULMOqo?iDV zIgr$@vLCDVE+We7f7(kqUU=M}`NN=OW--*R1<%Z?$>ZIf`~UXpmmd6HWor^Pdb?}; zZ`#kItI_?jeEMu02ts|&IL&YJC#iNh@&rrkUM+?j*CuCj;xe^q)~?pil)K(1GnOf} zo~7+rpQJlSKXPmJ`g*qzI~U&*twZv>| z+CH1@C~4OY&j+Kd7`4`i>H3;s3%>aDVlSSk!MNIxZt~-`EZSzz9p`ed>0Sv=)*F&M zJ+Y<9zWOXo?5@h%@@cm__a^hO;A`ub_4P=vd&ka&wl>-9Je3bjF7`9|aBt(InI^7X z5o^k)wf1o`IZ-;+cKcK_+`4$_ByqLtnfg$zn?mkqwQ;dA>?f+xt?FBs{Vg_3<|E0{ z?ny_TV!qv+&1a`gyT4_8qFh_=n&VXXSh#k28hgO>&aQLR$!FE9KMS*FXKt)qXAIMq^j;~?d4tvx@FF3y~~?p3?Pqe}Lp$Au*5>uX`&_MQrri}Ci2 zt&MhzJEru^?@3PQ%^q~^aN-oxm-X&E+TAO>>BV4{3ul+tH%`O7_T+Rp97Iif;QYcH zXVYuzlf(1Lz~9*Nrf+>)9Bkaq&Q6Dyef7F>)cEerKzn1$8JrCc`*yp3cI#a`-+#NC z%qAC42U76i{N`F@-@3D=X7RWmL@yrjwll8pw7YdB8O?;rgF%Bon{IZ5#)cjA=j_?{ zEWea*_as&5ds_CVV8s&;4Skt-aCT8XaJkgZc zDjdy{xe&+6M6Co&6je)+lsPvdUZj~)NLD0Cv8rWhk%)4lrIBGtMHb0S*8N;pBsu0R zG2;-lL}z&x+Z-iDEtm4p;&Gk{AWunZ5s6U6OpOdJE?~1^Di>=h6GR>6l+?%)Nm5|r ziG?(hWjW8JR46h9RvSTLU=AwoxR}c_7zmLC23jLzVj*%t1)UOQLCVFv&_t1ewFtQc zz9LA-P{8JcoRUlw1XiFz00kmLPDUmk7;OY_paMd<$R*GqYz4?)$TIj4zEBN5v^`+_ z$YdmxCZ1d@$oNBa1Fb6eQ3M1k1ge6sGKCYLK@-UABcYD6ENyTkbU|r25j4sGLR6*@ z<$=7i5OE%&S*RW{bVC=2#vOIx^{33RNTyunrz}-wS+S?ZcDoR?%7gDRdU0P?KxHU) zd0k~#WGh>-kY7eDFBDBB=u?K40v0h8`7xm`41Rg5yelJF|f}i5#nJ5tRmXDW%>utt7)HF~Uh>=yRh>7+smUeBmU7vviD@1;f?N^RKxDe%)}+W!WnM3|>Lf`N zsEEv*XS&3L_AHYND-grpT-um~Gc##&+d4Ev+i9h)n6yJNT$@U3^Dxv{Gp>a*OA#}B zE&%YdTrtCX8bD<$~M z#;7d`Ns;S;&b+#mC&r{M8m<<}ZpY6R!_y_-(txj_=C3?ml;J>zgw_q4O2E_Zic7;U!^ zy$B`oW;ETH8(ZVkVAk5cY-=Z*Tb?sLT~mYW&Wp94AO}NhlH8s?;T3JYrZrA4_x&R` z2=#jFW<1`IydoH!2W;C)w>3}$#T$+_^`u>U>1&l_Gml`EdE9UY2>a;p(-rO%Wtc@}t=d^Ww;n--d>nwHgd z4{O?qqC3OW%XC{E-M)F6ZZ>xIg^|X8Z+tBYsxTt?L;D?(y(Paew%gsU_*}U7q15qI zb$T9aace!UH_nswrd9BH6g`u6gUCo(rBUs*UO4NA!>irI8$Aze{pc6X$AT(u-f7hj zPJf`X7g{&C822ZevUjh295g#?+ZDBW@v+KAkv9#bqOzUy^*LLwXgnHga=+DjI1&8D zZe8w8o^FYk_58_H<-NO(+52>UwHoB3Gb?nysC*jgO8bi0&Oeds=U#9zQI(y2uS(~g z@!4>!7_+sCZ?)=$@7w8RH#m#MdNmi<6xU7b|8(hOYgRW#pbY9sKNUlr0yYFSZ|rj1BcvWnmp#M>tIV5H>6FKM-$PR0hsX-MX(zVh6P|R|IvK`!_?xw+)Qzg%%v%4x!02M2t+EHo&k0%7 zv5-#ne)hAtUB=mEDmXG&5eMa`2Kt9d2}hp*}x$WW0MM#?j0ryAIhZz){!^@u}x z^Z^pNR=~DhjZLN|VwFjO5#m%n0*m3f=}2)SQDmm1YmpU$pP6Y9gAoc@oRCtMC4!_S zYND`uCW6*U6{OmJB`N|VftDDM%YYceET2Hdg9SZT1g$U=J+~4A_=z($0dYkFdpMUu zgfl4tPG$vqg9b=B&IM2%05KJz$qG!+F^}`yA`LFLiUQS|0?Uf%ub}0HDv97yI&fD?4FO1axKBeBq|#6 ziy0g@a(GcFTnvhW$+7N3SyvO7lDqL#B>A^j8+7phi?X0FNf8^3NkG= zqEw3|_*>w~Y8hsOHJ4PXO^aaefW0C&xL|}P3pAWRMA)cuNz09Z>jh5K3^;z^@Pg;e zW}<;3#j%;HG76_KQ>cP9W3^P$riL8mnPL~#Km+G)oHQlhmy$NCj|3P(v7fiy5D&-} z}7IhqhF>BeD=t0P^Gs$zGVCH7@Qofx88 z$c`3NOmSoc(UqL#`mEzsf@#%I-R&c|>)>H0#>JkK@+yWu;!Y!%u;yenB;$`BTIYtY zd(C*%V&Y7Tdeg1+R5FURb0G({B99u0&>q7VD6ePmBZ2}^bu2aVM9^YQZbz+DHRhH)Ff4mP^XoFi6UYO%b+x%J&BcZiK#ivMp)*8oN;I( z8Mq7pSxNz!pc^s?$HGMYWKe>Ysf2BuGQr$}b%l=zrURNo)B~y{fS&9y$c11A9s+tp z%mu3vWy%{mHY3|jd3=R03Q+_RA2J6an@A0UB>XS=4HRvldqT-nY4 z$P0=1`G21i{&TX^O2`CQ4j48rNeW~rCo%LBCBeR>WZ1_v>==bwVDZY>Rk0Cev=L`8 zXTTK?dJ3*`PDk0e!1WM&3awoQ3m@CK1Us};!0S-Xu{pyg%mE%i6Egm$$jV3-)|U*O zMS&+F%BQ%`pvFM|k(5jlRb*ALXJZ4)NQ9umdaKINhr|NThec9WEn)u`aUu_>VGO%{ zMuuVd4g!E64H2a|nvUBgk-QQi2d#t%Knl;W>d|)GV@m{dFf3ZwgwR;@7Hv+^j9h@} zT98FFqF@u?? z8Z4nTL1r3Htz4T{aRO5)Q!~a0C^0rA_;GNiW-6FvsxURK_*qeyZY{VwHS7K$o^NRqD%W7CnxIhD@ zkb*^uy5J3sgZaf|GRia`N{FVSh5{8nngX))| zWi22Lx*E_6`KfIfD^!IZqOHUX(J6>u)d5aeww+wV(H9^c@>0jKk^!Fd;0qDpiOGi* zQDiCBcn(i;;E~868XEx>L3hCLG5@6;HoKhTVZbscq0^Wpm`|7mco>8&*!zHf(9D4T zm~b>{m;wwW4|Zrz#A*eB<~5!ej!L0)q5*{l;KpO8tPoBWWxzcwA(~v+`GAZfGQ&6s zClhHAehupjYXu6h2P>>^q(JCuWC4l|vyc+Qw+e|xa)4EU%`X=TKP`9)!s1X3Os;r% zn!pq|f1uMmmL!$wn7sy`s}dMc)btR_Gv;!PhnPuN$^b-k1gBfPU@8C_hej&efc;2~ zuwx5&4+M({<_SD7m|jRRf(Zf(R*8sC$hcxz#K?)Q3^R}BiwKuOENvCDM3iwXf`RtnaUY$!I(-IY;2u?CKc->QvezWVPyivu#*f!H&>jW0B!C- z4VV#l8c0yd%dqA#E<~Zoya5aYwn8oz3CI|^e-a^Ekh2mjQ3a)!maL>jRJL$lc|)a=p2|+xg9__K$a>c7YG0hkQQKt#-nr8La;1? z{YBNUB7h*UMqyva@M9+cj)FP@s<3+jPJlgtXnNd9Nxd+TDdz^Pf`$Y<)j@Bt*`-+V z0z6JY7)5xUfNz{Sby7?2{RcP8p~H`pM{(9Y6?1UIkUgJOMR_>jeiT5Q>Pl zkQj}E5fa3dV_IW+qB|-ES~9R(i8Qt0yh2I`ED&%S(J{60G*es^5ID?TGzNw^9^--O zIrND_V?eS(PtgLL`_QXUI>$>-nB~OhV9lU27gP+^2?jz63b4q|br_*+&?o2{nk--= zkS!2Xh)`jB6yjhK6T^vN%VMtDX^SJkVmObJ%tytUC}J zz*eUFn0)~DnFO*GRYNJVu*+dCgW82kC}cV;vgnY_gj5$a7=D(o)$*hpzdunLH#B05MgZi;6d)xG&k-F5 zJi%zI!jgo6gq0X7BynX-(+Eo?mryT+VQyjSz>Nu8B&I5988Rt1z!XvkvFl@M5-^ed z2y>kn5_lG%0Yi%m&396Zz~KNOxL{_N%!Pmqiw`y`fCH8~F2H@PHmrLJ(Q*Y|K`

    (p$-u=<5>cx(K%`xz>BzF$z!QLAl8Bl zQib@BG+=D`%rFYn8R`hY608f16XG#6OH%=!YJgfTmz0Ju)S~%xQ#=Fn5Sl{XSia|0pFuR&qRP8 zo}8kiMghwd8VQ#Tc&+GOBZT{L1T_fnjwV6@trMH%1*laZHTumUp#P#FpE zGBWi-35@{9FJge53M8qBjabLgQdCPcO)UIstl%ud)3}EJEZ0DeaJpr|-$w*vO%0rJ z;Ax?Qm}5BfVb~Y&{%fMaX{X}gfyiNduE!N{)>L2>+Jdp~zd5En}&LXmd13YouRRuAuWjIk{26!W0BC%s=ym)GP!ea~|TCQPqM203} zM&N7+vqQm^lx5NaB$#9{O|Um&&E!B?XhMJ@P)C3mEG#r_G52BLf@+2l0T+P%1Q-h4 z7(tGvDC7|;gTSFtSYKQP=n2^AL14;|6G==RU2h>AJzzz!?lSs0R zZ3`|Ds0X_n7Cn(As9UsxA}m?*SjF7I@_+`T1NlWbTo;-OP||@4#JA95kWGLY79^Rp z$c{)a{6d9>bpa~@>nBCuh)7^<5|#qIf&Ey+;NU2VCx$&5rY=kw+96;+;xRH1Ng=Ha zDjZ(%p^0j-B5Y!%RgVF|v}g3+xF{<^gDAz<~JgVYC=ZBxE?!TQrPoiS=6zi z;xWRGn3&Mt;O!6W6l2>H3QZ?gkttXjeg#92G$yH*)?IFfQfeAtcyBo?gEjbRcPQ6s9Ph8<1RnD<7<4qxi0&dB^Ik1h&tjdntO5L&MdJ^0i7IDW%JEVR~ z0)sP#cBY4T3oT0en;e`ERa^IaV{x8$gd*sTvRab+ z@RDOSWeR;WY{2ciuzdwSkzzf_2DP-~*PD-ZX5#2IwdR{yFoDP89%Fu#*Co6&0~qsc z9_q5i#Y=l8uj7!^95q-w@_|g3n-fK96|R!#gB>^ns4^T7D&sYtz@o_4Vl{>}*{M1y zexyK2-6no|APy?CPUOP_z9L-8B0zgyJJ}By{Oh}M3g0w2QFCV}NhQmx2Yg!PYFxXh z!CYcRD$ckiOhz*lEgvAml?Z3GI5o^5Z5(}Frm?HxKWNIE83Y;yu z8W079dIcjREUKy}z!J++tYpB1ECjlg8?h({Sk-_lEKk_MjQ|c`Ak+q)EU=I)pCCMj z1KhBuGL(KCntIrFu!{9Kw^PFvE!Pb379p%2aOuaIs3b~c;WRzh9GT1qN(hTV0%aGD z6WH={E4H!xVmk#!Ks~{t253UT0UB2sDvu;P!@(@}O3BBP0SdYjt9v#&C)Fb>(o-Gg z)EGJlj22|uWUyg#%ZH&kS1X>LG=2Ds;ynV`d$5h*r2+}22fQpG!`7lF0Ddiks|D0O z2H;2x9Js*84ZAw%CSEyk>F^m=1JE^$H-HJ`TnEGACLjvuA$9mKXdx+KkqT8#bwqfP zNNS*_9bjXou{wbp%;tF>kx3$!d^M@C&_KHyB8*eb1b7F~lG6Zv#ke~_K$yLu8mnXu zBNqihaiHxe(+XN0Ree|}BmkHi$u_hP9qS64zc0ZB0o$JLnq~;=3bu9Pl6a{C6xyv7 zAVrDkt5qh#wj%=z@pgr$v_ci$yLc*v76n4s<^d>BHB?nqasu7k2z*h98lI||vg1|# zrg@5;gquzyU7LkL=i+KS#X#y>ZqK%(c(!(4Z@9pTq8V(TFr;;$v)4L6ylrq-NYNuNO&4D?B>FK@7P*o=}!(orYAw=oyC znHY|lu2m0B?0iFxh0 zRu#3GyBFy8BOC4!v&+5IXg`qF3Ozn;bNTACaYxbY^Fnm*B+oTlYQmT0sNOsCbXBg( z_GGxjMlq(K)@+`d@NSq)QBbfgx{kSZynXZGsUlkY?MmnHxEBu!_bk-RyKQ$vpP99!KOQO4q-T$WYP-gh zs&Q1aUW~?RyI!ofj~lyzHhmH*^X~Sc+VJ+)F2?a`WpCC}9#yx%6kZCtdsllbSW>e( zS1%^F*bqBjvu0R_^7=f*S&P&MrE|wEb8fWIFcIuYA4&YquC&79~Z4) zrz-@5VB=+KPc}D{e315@ae1`6uIHy(>#6C6*Q!c#w$4thi^h&3PJ=6l0DygivGc9u zq>^kjeBsinKB{O9IE#5g`$=U@Q7#q6S}z)#em<@iX>GVsInR^zm{*+kY-nlCiDgXW zq1{k~X>T&Oq_kELa{l>GBs>?)u_oMr#7=|V>(*2xfXUD9@R!0VeXnii`N2}vt1J} zL~$Q>a!WBrI5cF9v#J<}a@NQi7lI+i^-I`Xan4v}mX9@@;3ypDhB;YnC7;Z`#?ZuB zBeag(oaiPLq<#a+A4^TYG8JtlH0L@zW?*^`?HKl+05+5c&a))ge~qb`WpVwYt!OE> zId{WJvEJYTWE)}>TFhu1;Q%A7JJq5w6XKe)?cqHK`13;*#@3nHZi@wQfHDkO_Ta@9 zbo#cEIs)96Pj~0jplW=8?hj49~)OB!4V_YI%{o?eIRVs9$Ss$SgXr%8xH?3l6n)Pr1l$^-dalw z!sZ|`2F*1)oy+D?HD)_a!5`I@qGPq zxU2f2~IbVaAVd6-wj zUN3UkS+PD-%rjxTDI4xs8cN$UN7am~#mwQLUHEDo2)5BQ`nKAytR?f=3~x(@Zv@Yp zJDsjJVeJ0&jo?Ib$L4zNjXN*>jq@p-XQ?^BRD_pht=7|wFZ9uE8Ezw)o#~c7;7iec6>hR zf0BWkeK~ztgwy)%x^fUdwv|ESYIr>J239k9PEFW0iFI%ToF{=%*l=G+t5)v3Ro1Sgj5a$UJb>HQ^Y!*i2zL$5NFL1{dO#e)pWcWi*6khO;s)| z#h&!0pf;Lv_%T4JaMNs9w*xiRbbp$QKICDgO-Ecfj}S7vk)4}45& zvEWuN8di~N4xAJvSC*348nqNXPLsOd4d*h{Dxi&~IiOeR#yJiyyjrAlE0o|z0PjT{ zniZ9lURlkv=H*7@hGy7G6xUG2u;J*nF)T!&RCt#Hx@=|E3=7|2V7%}Mg;!(l*diz; z*qeE2=vvt9O9l+)u90fe)P}W19anh`KNn_Cn?<0(u8%|UwCfhY{WY9+*aOuspUJ>N6%xP@Be2kmj!yht-OYXq%9)l4R`KHOx+5N{9V`udTWnsXcG zw7BKNxRb$Lo;mP_)r!vChwUA|GKW`c;i=-cLeFBl4<4>g_M@2xHDJx@3eWKyEv`|S zSf>VlI$*Lr9W|qlhadL1@}jaiXBV<$cl%e&=V928mBx50d7|iTA#RP$XXxdWKVu4i8w+6fUYvX(mw;wu(_TmD^d!{JJ!< z8SmoP^<2#!soZbY3yv3#eP&FH7EU-lQFN?)BwBb$7z#pEPv%g`u`yVFTFJr`9$boM zB``AKBnpQka9Yk3CerV{ksm~+;awK|rU*G+B|4N=ymh8YvKD1v@X*q5o}_6wW59qw zA%_h$k8~B5B^99)9IP^2!^EcFCV^)Shv6POI^GF}VFx50@4e7_F)&rY zjD<5Mm|)10fZQ|S89_c&WK)JM57rfgU@L*b1l^15)3Eu#*h}^Tm>yx0fr$uq6$pmi zl-}KiJpzXF($-CW$!H1m1t@Mf1428o0+EdjcBIVVt8|q>g%CwYj+Bach$b@vZePhLgVZ)^0+sohAcm7314$@HwhX=!u!y8GcnoEQ%i@b{5Qr8p8nKX!o3bX{ z(Lbv2b;PR{EK;b>SGksHi{>GIk+6_ZN~FswuqE2(7@7ugY9O8D9PMFUpX*Hu!1QuOBvtVEVcuj(nYEDDrY+*5|~ zx(Y69SY<6+LwU-4^j%h6-Y%jLu}Gzdx{^h~#mZV{TBNM9F6B{V`M3J|i~velM8B$g zA#qiJQWxRZrONT9X!?}t^tJl8%(rYVl`TatlBvbGr#V~(%jvohMN1O1vrMPpXD0b_ zB2%Hoiia>dv_wH#ytE3-ra&Z}a8Vs3s=OkMPZ>j1E(3@uZ|Js^ut=jYWho1k=(i|A zQcD@AaEULJ3k{%VmTfAlUG$5}lh_hi76QuqMf3u1R_&x7EhJLS3)rNx<)?(=MVl7A zDS?oLujHXjIb;+;MP9WC_tYZ7fN~_L&?2;yN3C8KdYw|rfRI}BFkJ0k#wccvYpG@vbM4Yq)-xsQ?rn_9KkZM3R9M{6{R4ms_X&DEXAT+Ic#OZ zXM>9#FLIZ%%W}(7Wzj{EGKQos8u~hf9xcits_X+5T9%>ED|uzMGKHE{rck!>Uzw{6 zmoiET%Y-s%DQB5^RhVM&x5&5%(sdzXk+K-oGIo`<%t$w7#PW)-rI@llx_ce55VC52 znSr8~5wAp*_hms6O8-_#%kS0wQu?w2N~BUqrR(yt2rgw%Y#Bkh7J1726kPl*1(dOr zyNq3BeU<4|i`?6JK`s+-~Hb4deO<96+zs^;n>}obrww1850Oea0 zU6m-yE^ZdG%N)xlQRde{gy>|BnUX{{?N}Mu`9b literal 14362 zcmZvj`;Q&RmEXIopZ7I)-ZLC>$RR0GvL%^%Sh08Gc;onico+7@YyXrV0whQR>`(b6 zK>n8i$q&g-0fGb$0t7*Vtev%DNxNE!kwl3vaY)W^UiZ%2SHG*f^EuUbNC`;ad%LTv zPn|kdbQAz1qKWf9X@}+WL*8d#4@uuT=V} z|HQLW^=NPq4Aa(b`J|3E>U!%#ce34ksXFWZpPl}#aAoj#bMQx(*CuWpzgB+386T(4 z>Dp*E`FuRE_uTqnb=NQYt>UHo?rh~s@3p<1r^g%No8|RK1NXy??v7v7?*=DlJKeQ2 z>)E~KeZB2>rq#1&%a5j8dP%8dZ~gw0<+JsR?TyDIMHWO)%GupKJ5{O-77}&IsxP#He#`E(VrL~!7wc4&QBjZJH+1Z2ZWpn# zMx`IkLMwB8RfS$^wbCT;v}*avZCh#~sKW)X_5x)&Zc)2wq^mT}iz3bPq_m36w#urq z(XLWgR+*v`x|Rx6TdpcgM~VKFD3Y!mTh~fea$m|%(Nx(rs#%wOE6c8G1t&C1j>_gF zKe?}}8ZG3@&m5KTZ62YW7G?U7=e3~}ot36kQ^8e8M2-1CU>?nHn@XNH1w$*OO#@mP zdO3*@()Rpou1(!n&&_i~c}_1K8p)c|3u;5q@R`dhH`1y3Akw*1=hx?Ao>z#ZQf^N3 z$LFIl*M{;riQG1GVG487`LG(%=3<@8d4AgnIwzSA=*7@X>1z+=W`39%mAN;^`S9dM zBo=|@BQ{l(?b3BW|K`>IwfNn=r>p;F|DV6R_fId+*4l@y_;0@Dee~MaX=gd<+aIkT z{%3vgVS))Af3f}9gPpYK#rfjnn{PWm|Nd(~`|E6>fi)%mLx<1lRKV3hwzqN9sRS!P155DXr3;oJ|=*&L09u)2J%CpVZ=gvn_ z6}&xpd;OsM(del2ZTDun`BmZjlolC`b^z2F0o9t|iZ?*>0{rZ_&ymxgg-gsI* ze$;zcZ5D6U?drYm@9wC_*Dr3p{xF#QX8OUAa5iJewyz$m&!9UpCo4QAzXM68< zumAQhw(O7Z)$Z=_{qw89#8)Mk3LC$`RZp+@`r!%`vvd!pa0;8 zpB(?By!{XN?|%Q6`rQ-j=)I>GHwWAQOnq?iCo3O+GAITI3md`e zpRE7J`q9?o-3R+|vgC|AKi>GSQokEYziA*KVDbt-v_}tBRIWDo1&4>A7j?7676^rkfS2(7`izUmrga?C3Q zNg7*jFl-Jf=0;4P2Eqj>Ff9zgHkjQ&nBgyQARj{`Ele|W5%7@arb^0`OvO1hy~{Hr z>b%ZCj`0kPV9wfH&rkEpa}fRi(!6NLafmKfcYJxU6TScT`&n=JO83p+c=hgRc;C&gPwb_~?z7Zg+&bHt zOm(#6UmGo1U%2@twLQ@JUte&pN1M0vQF&8Y!|t8es>L{(t=q2q`#2Aa_;)9}-OlmI zb6&cbE-l~K)}zT}Wpp^5`YUDFTidjA1I)*q!dm=*$k?{j)*E4B1=W*Dr)$r8o#U+R=KK91Q0dBWG_zK#uIrDV zxb|}7Zk_4Vw)3ddU(@4oe3UM26k6GnQ43Qj7t^9Dg2SxeUY%6-ahz=SV#{4TIdQ7i zpmVdR4hnx)_qJBguz=}d&-0x0LTj8nvz)2ZT3JYDiE>YL;r4a976kEr-g2^$>WA%N zz1f+>_uX!56r~s2?fhhAMV$@ru2sv-z)rnWA1rj2bNxYZ^zuaC@g|pUr0%n=>Wzc7 zPfz_;a8&+f`{3oiIvs}NzumnuomAyc^6KI6XxK~FcfALX+U4b>ca-YUw-ztuDj6(A zFK?8|Nx8RBcvlCLNA@tj48Pss;f1};?PoWRo*u_Lhqtyz-#j>YHrv^|^-^~0^kDaJ z_0i5t^|$Tu{v+#)V6%8**`6F^pQX;(<)y{!r2e$X_qN>C@NxCw%=u`0dHJ<*>+{dM z|0BDo{?7J|-j^#MeH1?4y#D$t`Hko^>+YFzc_V(s9hT3=(ba|V&7{hn*|WD6)a%Ec zle^aNJHh6gd#ktaoDN=@y|#7|{?8|ScDsDzMDPAplB`58>8I%zg}Z*bVc+-jetqFU zxlgWlmY*y=^tS6;N&U&rvu|!C*@G;)`DF8>gR@Rz9o#8qFT3_}Prb92xqCm-8y`_JSg^+G#YMw5n9OemzYJdzRX@lUpraPE$XvJ>N;Ix+rVct}10^;9RC! zh1QNP1B+&v4s4yfd1))HRa#nhW>-L8Wx1IHCI*EC;;N!{%DT+KP2y3BH!A{FO}JWv ze1sg>q%z@bSvyo!HIXV1XalJPy5JqbF4zd)%8>`au^6x11E&J5@~bTcC)I#}K?X&H zE8r`DDHl57xeyTf$}`geErlO!k&LLAdq_aw2EPPos4?(nctbEJl1}6!U!I$?xfe{5 zHd1NWHP57mM-5-8XQKED$$3eNb1LD~G&dLM&Oy)=Ohe&lnoB!rDwp%?yr$_x9ta<} z($aLwMfyGGAy1p37^)YenGey7Q%1^@=MSG(ew|3}Uc~Lv=v*op#`(t-I5l6XogdGs zOgJUWy)f7xTq*V0ZIQ zdg=sLJ01th5678bgjVcUI!GOrI#uasm0S67>bNaEvnZA&z8(45>1NCEX1!=PvetYZ_B#6q zs=YWGEHApV!)~uQIayliIVWB3I31Rkv$|KW>#-GA(=XaqcQfkT@anUB9XlI5Rhyla zNpQ8D4|dBio1V6V1vd^h;_77FvQpQ%7>tVHO6$=$F0M?cYa3Vmhm%Ov_cFV^K2kfq zmD#=?k0ZUJX%>p&)ofi zQ}&A$Z=xc1kS?)ZX~zey@{5i?%vG3%?PyZ^sn;ndtc_~vDX9P^I(04EQ!`*!c`?AL zyeuWm^$N||&P(D|l?xn#uo8RPmL|z$p_|GnuoI$Ou(ogoBUNG120#~st8ffr=)f~c z2x=s+ASf!pVvyaK8+@q|(=%2n2qJdMPaccKay4y?_0DaydDc`*Ss;LuP@A*V2oqr? zWnp0oRGYTKN1mH5<_zSnVRa50rbe35-kb$cULcX_K)R#{!${iJD0vpjfS(NI0FcwRpr*!g1- z&@^f)&N(!E=7Xfu2Fd3_y^!te72LfT-}$J&GRm(F^87{`A%vM(IXAaRBZsM$bMrZ` zk_Up=r4wV&Rkr|9>Q zDRP33%yGfvP}ha3QnWj9h%4+6od)GgJIk#a$Yeo%48oPon=UL}K(8hCfY`yn6xlZt zZAeDYM9?9rIR;2@MA*URLJ{6zSHQT-mJd+~b}%FiNY}uzT@{ukn^i7U(2fpO#U@d{ zmTR$LWYZ`yineTBB19#ZN@Kp7HrlC)x2UlSgvdw^7RoA0Rp$)1^c+=@PgIh*a8(Yw zlp$nwnUOC{Rppd6qb_|0WYtt#MULFqKQgMiz_>NDg>Ac~<h2e z=Co6%2*<9c@~9uVahO*mkD~ygoWxRYTC^$^b;gd>i(}8SX6@Xz{W!6Gv3BN)m0oQ-SSdirPR%jUM}`cIrBm6M5dvV%KpAx!o;EjT2bT9$0dT!XrU-;L!$}0XvA8abO>rF?_Loq++9q-7^YDqAT{am_DOgN}# zDH_@tOP`S&oq{DfI}0ALFZWp@K_BffMMx{qja;dy zq)-*Mlh?V6*R$NhaeQ_ORv9zCtPC{i9Y({ODHNej9o7X;QJ17U6OgOcVd0<&+RkyO zC^;JpmmkssX|fJ1I_yT7X>dexj)((VxnFMJ zMpNWO#aS1iM{I(bmH@6vxUjCK0~SV^bERY1NQ#Ys&1i}+k}Mx3 zq83!bXghF1pj*f&YTOF2#k8}2f_&&KFiKnMO}QRY_8f&rwO2?LPj4HLFgkTb0_SG$>uAxf;9 zxg~O;^?;bIJn_7B%#vtL8YapY zDs%yy=OPG)HexlzCIU`GJMz~JG{XttxanLlN6<&WMG#QF=&FRwTj%u*m(LfVA1%GrQr(@ZZiDHO{tJwgsu40ug zY6iZGy7HBNSP)|{R7qgQ7{NtxRT7?g;3*~sE+e1_&cFqerE4Sv4h$BGED#V%fF@+( z83zW($a59}rO%lp+!d_~F;PAe2_deiIb&gj*qT@dqd-awjE-dp02={WiEra8^++gg z5AB!G4mORa0Llftr9#||tPeAa9g05`yOhz%SNaxwm&CewLlzCI7O0R7vMirjS0P}i zOskBVxd9i^b<9khEWH6^%z^kRwwbbvWbkM=@P`EuzF0Xy7u)3wD~gdiLGQ}aw_P3D zs=$oI5HV2}Lp0cRb5Famr2i%R1=J!N7?%q&SCYO}E>1yS^Qy27%B>MKjH75v(j{6KPkzR;1X_UQ|hX(4H1;$W-aEV`MAs zVt~xDpbsdg9gj&D_^~xHTftgU4NJmP3<%@S&q++C^2Y4?*1(!j|Y@wL~KQJVG z0y|CO0msK+(Evtm7JyWNqzR0jh*L&JF>P@)Vn7A6CvUb*3lIru2q_47%PN%#ktHiV zNh#XCQYOHz@kNr1KnIA<=nG?Hb!9mvAYu5dBbdhO36jwbVHZ4^o+jpkH+qY%(_G?c zX)e|(0S>lrA_i2I$k`@~jZ?(tD#B9+PDIa`aUk3gm5GZ6-dAoxgnXJPU0n2;Rmr7 zw`ZYdI~PvMvYjwEy&lNb}l0!VN)VroFPtQbm5$t1AEc@xpvoCxtMD+SVR?E^=Jle61&nBKzG z9vEM!)RvSEUJh3UfE1`M2t;K-2q}3j?ZoJNQSfSqS4XHJ=`NC8EN+JPS9M4#5Vi8y zTeumDhBIY`JfaDfPCN+yo+{qt$onSbg{|ddmyFHF|A=#y7d!ZRHvn-%!OD_p2Js~C z>GBSQ2oAs!9|8+{M;81X8ZFKOwlagRO_*R=3ArkXP{2JpW7C%jT%$^aCZJ==UJlK zZUv`a-B!oG7q}9-ehd`?Cx=Fx4rN*;#HiJpDjdW+{Udk z?UZrZKlOckxM+>NZaQAgl5%-ETQ0MBC7v!Sb-a+yx>o-r&?B!}i(9Rubh=!t3-xT* z4&$J|H9BOGhieygeAdfP!eC*VwaYy2cv;1psJNYm(}nHhXjpb1cea=MyV^aPoULtu ziE>@E@h?bM1x+-i$)jhVHRyfd;Q+!;@F)`PW9EW1$=+WJGyYP z)+&Q(aB$cOmrH+Xcsy;lVt>imOFHd*wq8zRfAvsx{o-UfN>yiJ&?=I+UQK#deiHTa z70-DVIeEX`+2gN4TZ`R25}?+F>dYIJ-sPdCr`fu9=1-E=+R(|T?%J$y&Vt1}_Rhk7 zlseOHds16*&l-o?YR!sn8WiIWd-qenlQ~h{k6F{Dn24tpRblCld52VyR!xecTV?EG z5*Ak%ZEIFnomfz!XieR;&s#y;OFdqHhG~`h9&uz4qfmJdJ8ltY63_W@p-9-{wjH2V zWx3}QnV_|0>V;)4!7qPK>*p94F@5Q)OmYc)WJiQq3xQR*Bp*CNYh45tZ&lf12|#Pl zBUAx;OYQQG6rBdY13zO6h{d6m8Gp_-D@j;+I7qLUSyYkwO@m2ocT(OJSOB75cP9Al zD()6!M>O`Y_=6fr6O*sV!bmn@vkuTZ>f_g=MgBS>?Z>5;2XWRX@{Rg9s@XzoY{%|m z2DbI=DY0~rPP=Rz;^}Hh+BjOnxkN>$&oWu+;#rxcYPomlpIO!AcxFv2=jv%uB$0h% zM8JNQ+$id4Fx$Hr_*1X9n|nPyUAMzTw>uC+Fu;b%EjaA(n9Yv z?%U&|qUV*xYJV1uLVMB+{PZ-)bKUB*yLY3}0<+jzJJ6Ax&t7({QRY5e>Mx~f=TWLI zSXuvM9B)+R!fZBOkDPXOTJ}dB*E;MKy5&#v&ba04(PE;)V$^bq-fZHA)xu~J2C97$ zb?u-&cG^0a@;0w?Ly@aSR1;4c&MmpyexV(NPdUbp@L+CZZTU%$YpOT}q!#Z<3 zU{rDiIFvFWpv5^5&hR&`U@_aZIw5N(p}Im-un+V6kyp2(PRe_Z;54WgW;nti$EHE|sqOgQm|X{d z3P1#(1mp~>_GA{SHh-;FdYa%tt4YhAhLsAB%dXXp25sMJo#cybLk7+=e~~qHmtu#% zfM1Mid*%Y4Ele>OyH@P^)wrG3svQ+#;_VsBti6Q@=aXB@WP9p7>EYB%d!*dJ&fSzh z{0s@u*umoXB|auBV$$$%coLi}8vx|Y@NiDSsg(C&#EBmGLfAxNm9SV`ne1OkbMTf7 z7b(dqCb1++5JtollCoh7#z_J?q7K{!9r7Vql?|x`t8zA3FI=ff>WM7$4)_oX%C1#@ zQh*c!esTygCyD2zV5(s*X$jL@Dur5lGqh9~Mp8SkX&S*=3L+2uq#I$$iCW@t%KQw) zi|*vUVJr8d0)-U&Knud z5R0h7f^jtyW2j-noe@@w&%2-VmS!T>yd7oJYr|9c@F9yKwcHshaA96D5<(+PO-n=G zv^CSvu)|y-5NnXihK=DwD=G~4`2rZahK6U&Q!dh<^dQZfi(IAc{MX!ZBaKA4cq)$! zJ-4O^F(uPNC@FDiXl0nvcupsM$WKo5YGEwT4gEQ#u#>)?clH$?(!c3YE>e1aYg#vb znTeOa5L(2R_U9#G+Vn}wX0!-ndK0lAZdyyRX=zIGX#O))GBne>sWwBRn?@!nP?Rw= z#ik=;!cFJG3R=^@A(H+%Oz+Lmg?lrV<_WYyZO-Rq8OnS;gq5K;R1JZQ!+g$#km`oW tbY=bYM{n;iE#KlwwvOYaU;Xq~Z*lGM`|7{+{p!zt_$O2e(cgOK{{g(ePdWeq diff --git a/sound/direct_sound_samples/cries/oricorio_pom_pom.aif b/sound/direct_sound_samples/cries/oricorio_pom_pom.aif index e4685dc530691e1e4a9c2470f0acd131099fdcdd..bb4c1f27a0768ad9e5965ab8c25a7cf2e620c656 100644 GIT binary patch literal 37500 zcmbrmb#!A%nlC7}WXsIVjIu4smYJDlW=Mvr>h9T{d3$!>AG_zwd)-}KRaup2JI&0@ zY>{nQW@cu#YzwTtlI^U_?$s}J4ZjCyFiC+2JTyGie{Z?# z|9Z@qmItE$yx|Mmdy+2{{~+gqCs5uG`bQET2n>9H0k^HwN<{ef>}dZ4 zgqD^SgK@4ekI#89FP+YKHcBnJ>kK{RON2Zw&zbIRdsZQwpSNcE`_BO z)TCJ_r|UaVw4Ax>@ygWbv6QN|wj^`sV0#~eLhI{uw-%|Z5-R!_<*SY5g*}9XgoYMx zZ<{eCB&}_4#914qt)W!ZbX2%oJB#yRDR~<#bYrw_0;XYRrOjGem|KM@$Qhf1H|IKs zz^WFmrkurL>VlBAfr%b#d7eB5S2OXza29B7vq*ict=7r-2yIDH+r&lxY=PQ5kJh($ z(L5L?QMMJ$tO!b*ljQatc~fU+#jWA)z9V&<10Fp)*hA&$Vw~}ag~5(NuAZ%n`3=3l zdrrc_#!2^pLGD_UGIg+5+oJT4&UEljIOI6BYZz{5ZEwyUr*utAVjLY+*C;*Yb8SmJ zR&;KtcMxP`<6v}2@9$YrwkF`^R;eV~l_3^q44E3}nGm-k*s5;Q`pFlDcxxm0)L{Q4 z8biPNsJ73^(|Mdrw~DHPV$T;-5TrXCnL;q|#g zH1QYaZPv5wRowK#B#^)@yfSq6j}t@hT}UDy)Cb>`a|ny+v{ zp*qXmwRJ3;h)A{R)~Z&peR!DSWOq#mj1U$qHP%tyE9w&MCp6qqH6-gu^n@}x%g2;F zV(rf9ZnkF_TEL>uwy@W33nBaL%X{gxK3r^IZ?J4OLCM1S}XpP0os@^G< z>m)w=C?aCGy>w2=J=t=LT-(mWM1(*FTdGzxe3Hyp`>MO4*w}zuYGdWLeqgfhY-cGI zZ5!`#L9MI1Fbs~C8E-3@ly^(SZIG(EAm-7*;KAC;T^+v|jk%tR5pmmCyTgInPL6R% z0Aj48eplU+GSJL;_LrQcbZpDo z`s-{AHcv@e1!8tbS_fc80nRt09Ua$tUVf-qQr)(qQ?SbVVAGt0Wq`^4Oe-C(?`Lzl z&`aiMx;S!|2D>j*?c7jHBb|HFI3M{%dfSSug^&LBMC&lp$Pa%$(Mg8rxVf_D``Rv5 zoqU9shdT}wao!ROBOM#^mj3E%<88B&=Kcm7<1M4&CIQxmGhHO8wwD8QzQ32N){FKOnhwmsFpAZ`|*zBSdgC~EAjvNqGZB5CF$w?5Io zE@|N{vohJYD{JW?vM@>6m&JPu&oQXyDmZ7*)bIdD)4_!^Nu{z?oE@&F1{e@c7wgkG z`V?HSLDG7VPi+D z6%uV--P}c%K0v=Vv~#`gB8`b*+_0;?1!N-ySm$Kmo_b%dwa{b)sPWRo`luft{tqaGqkQ{M$N-bx39E^p#Ic+p%j~7xlbcRXa<`LcV?utNHb7)_%U|nrga&kFUu=S5pTBNrK^NRB(0;A3amOma8(LK{qT%PS*;CL9_YAaM z%&p$D4e^0g77uF%1!|Fsy5Md>xW&?zGh2VBv$E=CvoJrgx?GA}P^38{tM1x`=(1m0 zwSfunfYg=F=m!PJHfQ(C2FGBAGb*oKW4-o^N>(wU{?OXuG5wH0iRN6YQfQQZ@246> zaH`{Mdftw6O4xNt)~F#d0^M3PsOldq(_Tzf435(7`q(HEl8hh8D86t_^4TdY+_s7E zIw~$+#m5C*<)x3Cr6h?}yy;YreWca?sYx_2*@TqYgz`@^r=?fJ0#a;7)63ajY0fhl z1?OIA9?O||2To~$dpX(bgp{CzysTBbl;E@cj73~(B(vbt6ec;6Rh~O%5)ph;S+tCe z3p&inS+h?IKgs$qgMXTEllN}YJU$ZWTgOEDY!wupc&2&Jz5Q_P|EKVk-+o?odKtN& zld)@`>@k;H#`Q`i41FwthrPo0|5AVmeQnkEz8n?w)UZ3FT`?q4s`}HASyD1M>*oR7 zcdvPw|4y}h_Lx)rVb(e+cs)D+(&x1Y^~ZEj_`kW){+7uL`WHO;U8Q*NW7U=q{kjQ{ zU`0OksJju~vfkom%Zrotg=+M2deJGD=Ik%6+$re-W~ho^kH= zN7un$a>0TBV%7JqPAv3=bi?~$gQT>poVRnh*NJ=Szi!&R3|z`9<2t4pc7E(qjd?9o z`tLn@Pyc`{{2z4Vr)if3?>7lA{H8zTaQy$99qG?`!o>f>xbtsy(osK1)&D}%PD^7K zzg@F8GI3c`p8vj@(?DJZ?=WVBQ)Jt^rUk40QAKw)Jykz;DxRsm9B)qg^e5jBJ z{9dE$udQlvKZsWS`;g(|C)fFZTf_Z((jL&J-_y;M?c|J{J4bu zK4$a7pHE%?FQ4f*pST|XW+VvK#%aM8f|Mik*L>=*B&{ zDfwy3`jy{8MmECjkNSPTw5vwFgw*`FX#OmGJu98-@&^mb&-Du7KZw-+&oQH?@dt(P znYOPmLm!)z!(YM6|K~LR`^3$Rzn;7On;qj#rBv`MRMXG%*yq6uAKroj{<~H8|6Qh> z^xs6Q{-1G^@4~mTKHa+hNtg1s9+jAs>)QAGm}fSVne|G+&!AO5&Rc&MwVLr8$Nhgd z8T_?NF*4zzHl1nz(vtpbwL;VnsMFrV=JHtE5Aop_|^#nkBn0xCk_DJrCNibibAP4%Z;+%v-5=Q@#qWC>Env}Tn1QC%I_E<$=Be@>6+ zwp&$p>kzL#lucI)_dlsCxUzp_IQ*eQB`Wc@_SZG+3)khW61dM}IcoZtcC_1mbv4u} zUYe9Ou9x7qS6aYvN>d-q8dM|tpVk1C6iwPEie_y1W!2|1yQjuu>7B~ND0Xw!AvW1$ zGOtG|IOM7!_rf7fe=xmUJua46`RT~#7e&POr@e-!!QtrrcKiwo7GT?z$Ru#x+ilwynDLA@`KTynP1c3OQ{AETLCyGp zy^>Op$0MnZ4>M+|Zu6fj#E6d()xWOdzjq$}wMsVT3B3Bv7XGEp#K#ty@F-SY&b582 z1|^-LALqMMQUr5Pe#`MCj`6NmIT1)mzwEgGt1bO66*5UL z5mmoz;9p{9GP>m>!+6Sxf@ckoXvCO@~!hsSXmKkeE)vY5_kl?jTzZO%TxrkYRYw#pM@c}<_Ttx|Cd z1r1`pQPAFkEwd<#g^~_gzerG9&W=@r^=whIxKAvsD|^E#9yecDD;ba?()n@PEX{qr zq!i|nBtyv>*N^qwDK7!Lr7BXg7@Cp3do@J>7*q!`hcu&uPHOV5?H=h2r}wKz6EAAB z&K;haj(uvBk4lC#zgxvT!ms4lq5b1fy_w6VskSSH^&&up^m)-R$#$*00qGfo=+9j< zNw8TesT1*!7wOKJHBNC_FRB*uOBC%*pEXKx+yp%4ogmVewP>7Zvs%_5>K6lR&sxVl z!cAn?%EY9AfM7cQ(SGzzp+wSm!ZrV62LG?_3-61N5zj@Me_62p!G8XI89MrzaPzxm z%NJIQ*{$M{(cFeC0CYwZ86^4Gfb*I{rsHF!!OT(hM6bQlYOq(LSYPIfNh*FRw^=MC z3fz)=fJ-$P&7i2p2cDJZ-nc(iqJ3oOrFv}Vm%@V6&>ioVFt2RqKGjRbCh_V%?b*FD z7}iXB442S`Tb9J3%}HgB_%;?K5XM(8%=(s$fo$6 zR+O+jQ>4l1bB0fC*0Y<0!=vGCS=-nrI@6gn`2?Ty%F-*>6nT2)q?94h=ai(NK zF`Tg9&{NOg-Ltx4ahOohSkT+%N^Z z3JeY=aytt4ty6U;b4f}ufhYCF*Upa>27qjz>b_T60&o`X|2S*>!hSiYN{E<-YX7)o z`U3d!%SyBi>-E zoGuz{chTO?atweE)gGBd%Fa~JDTbMC)l-mO9_-%6OKT!}qGnw)Tx+F%R5Flo*xCVd z3;_>R9~ed|F4W8`gqm)*(1cw*nf)y+ObBYCaZe*uWwB{i&ev+YqaW?;bKcj;v5piS zF5l3NFr2TV$pv`swKO1{W1zkHJC^4c<1L0%nSXAEUHqH&wg1Y z&o>3xm9=5=TyG|KP(I%6pu7R%9S7|$*fo2iKAk%v7vpqP(*p901oxI4nWv~uP$UtvacipK)yzETbtZbz9VSO*yEf6wLv#%GWyjVFQ z5oCMX(SBnSDm-4jt{$zoRW~5y>2^(Oy)-3?&s49I0tky#LsBDoeQFjf zKVH6|8fmd!PeXgSGkaRt_)yev&7Lk%bFpqh#@}|oy$9~#%^^2knGq$&Ygg4mO;;KQ z#63LDx|%_FB9aEcBvOB&YFN(S`LMMW>Oh2&D-TVgG^Q%X6^V{}O>HnIe$&25w8nJh zn0%PSesd?-F$_Yh+1HO$pQ)LW3AEd5>4p+QAk>;8gGi0pnhDtehr`x(9)Tz{P`RZY zrN2@)jP`cD>}$Wa2os;EUsnt^-f9^_I=Qnctrx~2va^i~a(Ezx49toa4b<~cD8Ad_;mfUqCaN8gA611g6R$W+M()8&Epat_UHW_Y)l|}qH$F@z-+UHf^_uZ zQku?8!jxxfClvx5kJ?&pZNky?$`y@Bi`CkGq-PMjzvjdwMs2)eQX$l3zo`Y}5Q`+2 zZR*BZELQf5_y=FLSDjfUDlv+u6eAsWYFl6~QSjcfUDJ5|nPR$ZnD-F?Hpe(IO8&Az zg5_Lsj~H;DX(~U%rzj2OO=!e9ua~wWeWM|5g@+c8bVdv43eg^W)eTUOI7D~hwsDH_ zRPlgxxYto_1K2qhO)A9?Hm^h`8l3A4~+x5zBVc&qO z_S$QkIPt-fRoys~rE;1?pvOr|>#ZG8h*Gt07^ON{IVT^2-D)HwoqcY)n{TX%62R=x zA{s1KjY|7D9W{4C2q92P&5==r%2d^yVhC=dfgaFD6D~PgzNQvw zzE(pM_4c~%X}GqGlo+d6RgW;@*Ic+#GMnZC4h-qSJM2O2PVjtwTsxw;Njfg-Ni~Y~6}tu-QQi73$>8p|zYE z66F_a=cI$MhwZ&!2R|si@j#ELx?Ddl5ny-L*}=hwh>ldPtA`tI)X+qHyx2XpXP8*U z>9Q&L2>f9~JIE~rF;KB>7_YNbHYgG1aoJpVNr;tZ6wRt9SZ`Hyzyrd-T_wAi6phLJ zA=w!Ble!v~Yn&*lU`am(vsBoFB8IYCi;oD8R7Ueg6%(8eD;jvdG4SrZO`|k}`Fx6G ztnXP}HPbakVjy=;JJo8nr~?@u#%eA*w0Wd7k~5~7V!u_<1P+LSbQNt|KGvSh8CYBWCE~q~YwB69iD**ps^MefxqOm%Y`{fr<&{ga1T}w2FV%dh zpieZ?|Ei&i>69!*D_GJ=FPBlXRsrNLr|lg)LMUvoW=}6td9fDA;Wmfu-B9~L-ax~NL4^EV&752i zZojP`>fnDn&~U0xRGhC{kPXD{wUVHAzM#RzQyrqpeC>>M0PeWGn`avUXVmX&5;a%q z#>IW?E_&M7*btG4+I7`1qwR(Pq`N1J(r{`LAwOF^EggzKYU#SQ4?!?$w>6`5*QTKx88aZ z5wy~Ey=0@cQZg#kpWRw{hD}tQEF6=Kb2zMNWP8M-27m~rny!`fAcI2K9VJKBsTxzc z!?H0RC-qe~E-B*F+&T3$>}FXDEFcEdnZIlHSZ@|UTa4dDW7(Bmnmi+WQZ>nOr>qX* zlZfca-7t7!x=_#~78-WlQhbU}Q(@$fD#p9+Rn_xc;!)K6RlOt(u#^`K2)}MGKCwL~MR5c?!qCkD6hh~X-Qzb+4VO~cKb+?Z3BDCUFgIM#$%5I6k zpv$&$CO$!SsAyU<#(u4;S;RY>-BogeNm3sx9aWBU-L7kdyT`yuC40t6debEXa-m+p zwhYJ-cr+;5GDoY6&)JKYfqMr$_Kk2H8w!)ViB~m9ldDdxk{Q;fX`W5EgKgjIb6J~5rti^ z=@#(_W%pH{o5d+lluycsIqfvIA?zby1LgaA5&H8r0}|eT7oD|i%V?RA$_3?M+wJB~ zlwBBvQgx^st~*~#m-O^G?`gO(i;$V9Sx^kL+ih)wVnY%1>Miw9v(**~${~O|P!k-jWpe;BS9TQA+(A;%~<2LIuhI?1WYd9)sHh;E+?UU!fty? z_6$-C=Znd}t&!bPd}5KRH4CJZh>**ck~7?6^^x2mxfo#Yri5wxNQIs=svP5cSX<6^ ze563j9@mI>->R+xxui%@vS)PToz|;r;conNwyYOxzf{#I;t>z)E?6^)v01Ea5%Y+G z^p#Aa!N2yL!j4B0r?6uW{Y@#F>WeXbNb{mbYLXJ@|YSEs4 zwCQ41kAzpqO;5>%MS|vZ@vvf$=W$yF*A`gb3%{rNkJ<&{&Dk?cHJi!nl@ANKY|g*7O;#Ds z8qtjQ+^#BzyCjH`fVFC(?NUjDxK9G8Gv@%4Y%)>MB_9%T(O7VWPgSSq($ypU_i9SP zj;X+g$gEzB%X&qPuzM1+7g)$7;OC25q`hOgU3o_qi58QEz4CtH%(jAaY@Gf`Aw|_c z=&YrLWfQA8Tr#8?=y%*w#>K^`&`U=({5+3at9aOOWk$uQy0^z+M?DV{sxn?Prta>3 z+*`*p2~wSD7*TR`yP(!z8waQ_w9;h=9vphZnYOq7dIwq5${RLTzoX`Dx!cnVGYb@- zsb5rZcR1^7Ve5w|E!B-nyLhsICklO{?rJSX)FB8qRJ@}dZn;y_Dr6raHk`k#7GZx- zUkAp;D2^A5D~0)-x0GL7C23C=P-XptINgOurg3JA#hv1AL^vsLO)nC^QB#kwkChrO zn9&S%JqFezma%G6#dJAuUrui+ur4rJt?ouUhM@*ZRy0HG4w@Qx*l5Lx;!$~jpR0~? zU@>5@RN61*83yYw*w&51ZdEkHoD;+ca%R$e_#GqDx$g{#aJO zd}su#A?MI46*HC9DH#w4Y0lg-OC!wXG>Q8p3Ad*&nk9wKVB~YZDlz<`KKt4xO?NDvq)Lpqtj}WN9_f!~ zkkmp#nT=VO_!Rxg%wCnyP-aWkIUsZm=v`8^uENGGR zi-z=OZX2iK77OdefJd4Bj8(%VyVa6vq(_=4C4Eji$!({i6zud=mi}=>BQD^mCXeIr zTx~R+q7*~CX!v}Adu}+B*&#!Wzis)rZTjwWqXCfWgmyNw`Pv5b4f?v(67WRE4O8YdandrL@?EKk2*PhJkks-$3c4clD zJhtB~DTlc{mK#YQRE!C|YR)_`e~wwnsYUswh!4CU(M<6_t*UST%d{Ref%uN|@pDWImGRxp2XSk5ej_?$F@Cz90nqv{C(XVtkEgr|BlnO#yLF_7+0 z>qaSd+r^a-msA->#)x7}z-3eJDdw@kVs4j60I)s!c||+fZojPR)*)44JcF(f7sPDN zJ;ppUTKwE15}W|*{j{wAjIdo)0rGqzMgKUgk{WPUm2+YHT5IwHphFy|_1(6`E33t< z8sVTvB7JXX4W7E~6cm8nUdYqm)70XL=XDvEw$BYFGuvcC5#>(_VLo=xg*LUz+OkeiD{zAYFVqWYn<>< z_Oxo0$7xgHrDdwld|tP>Zw!o*xulcqvR7HmAv{r^O7E4Ah~c$=+A?`c*vv16dOQVG zp{OQAGwVO>V_)LtvdcyMo=Nuq%Fsz7p45Cgvw4A;%mFs1p8#87WBLifht=7aw!n^e zLA``evS|P3ab052Dd0AXIP6kIt%zN`+;GvLvR5dZQm~;*blz>P;9z3)7AiYM9il}? zizgI)18&F#d)g6%{l*F|CQf^?xCiYVBQ}yVt{4({-I2R*kYKxAU3m+bJ(JfZ?iGik zeV$g02xKj?B{VYo+A~`$wu{S=}-K6)Am2JIepGCHKrc1;0{W3AayG8_nvI^#Nj@ zIj$0DAZNGP(`s?S`GzxXUc=`dKG~z*70UWCy{tw`R>^IxzlQP4#erD;mG?ssi0?4eQ&55(MjCKUzbhN zg7->3UE-b+7IRDB&d+oi87(qisZx}W18PArz^q%*B?ex$W*-Ckr)f_{xGke7| z{@N-R{7SU@ry=e56n5R4HPh7K-HK1Z>s_aX!UDKmn(;(Vy_7?WG9$N7-X$JAlsBgC z83v{nEU9|=vHJ@5G(ud@IttJAB5n2?%Q?oeW}8*DFv|q(#lj8|hXmQl>;Y+y801jq zjC^Pqw<}{qJ>L7gA^XJO5n-pa?AGe3(Q;NJ-07+E*axy?V2UvL?UZ6n6sYO#hTc=( z!=j8!%kOMgK9@qBU+av&X_W|iF4_Ofh)P`IZS$KoqsRV-r5Q}?7dFeEi{UP>w8q}G zNd-O;BmF$89v8!E`gPm*kF@PBd;1h0DGSv zyTv&m>{GLa&z0iNPk>zAuMn6lMEZ4FGdAL~@wX%6C$8Hi*|*r2CJPzWBA(9`8Sh96 z!O8IM-)6KEh?lh=56qsp?iA;8@XyTVGOEQqUMLT~@0a&WLH7MNsSy=*)%bA}7-aj(VESXdnAdZu!M9|&kYrTf8{ifRJTCmUY5dgZpgjG;>XqGcPCm%- zd*g{uwIbfHl?Hz6lns53?)ha{GcMt_?YDXTl<#~JqhPeGY1P0m4moF0Eii~p%3o6r47lmd-c%3w zzUt1|(uncA>B!#JO!7Q$$lTXUb33WYIW&6Wa#);xYWdP>EB7-K|2<(NJBvm57u?dv zJdpDrE#}@8L)`vkI{8}(%;OJ+lkdt=-rwttzpq4j{9rKlwo=&hwcZ3!bAM$p^{EQs z^4er7y#nF%(ror~G1%d?)k0PQ&-Oc;<=lK0{*~QoZswKsOXsbE^b5-u9(zR}j?JI> z9hLvKYn&EzS@YY5eoEvG@Ip*0A)eRv)1-QIGNSWugQ^jaMf-p1R|tD9Lw?gH8~9Rr z;I~EzpI4fU_tm2AuYk99rAWsYmh(BqVBBNET4@dwljgEhlXYwm?{nIazM~rzeBF_; zq#hOt>iIOK91tT+%@~sN29jYmNzyq~ZmXmNu%4}GMp;LhEZ5b7Ov14{tyS0Bq0YzMrF*J@zFbPd zlAJeDXfS(R$}?VOG?RpONmHH4XhzyUGg!_j=u@f!D=<8C8pYCQACTO~(IwjnNOKNT=tv%f*?O7D@hR z?H?92g5yPoKlexyQuLS0%2>c#>$9$mC8fYPG$XT1#O|rVdU4@}{$t;(=HKR&qn=6* z{@jf6{G-WyR{E9YcY#M$f1L-iIEwtHRm$@_!}Bl zjWF}XC^CXW%j%cHCmC(F6dkJvh9V}iyAYO-ut)Wo>#8xyqQk#7A{_o`yIJ&ZTQ@lc zLHey-%K4eqMs>!HR!9tbG`kgUlH_#R^zVdSZuY7EvuJSFU%DlH{x{2&&u_Mk zpFTo#{a7pI`3L*8;@?*FBGV)WvdUrB$=;{kABW}alZ@8u^Y@f}LcpXC zy-26;?e+?Pp4UkJPHy0DgKY%h#w7uxenig|@ zYPeRCxvPljPnzVwaU+% z>cPoC#x7%-CWdhPKJ|;)rV(}l1Z*ZMRkQ zW7Fhxt<#0(Yq#;dXow?+UUWmpo4$`nY#8Z!JDk_eGmH;~)6yGw76~CRN?tS6G&lf0R@=r_bMlv4>uTJU zunyNd=`WcTv5vu=_Y{tbSVY=gP|Amq`T>r-sd_S3+09#OwWaw;%7Li9-CDjbX&-KI z*jct9h6%R3q?L~f83j7>#wzR4^|0%b`^!&;xcIJ^K?($j(LE-kXf<=g$aHLkd(uE@#K+=YmuuFTaIKq{%C0zcbaV`Q;NB>dV~;@lZ9Ly?Oj6i-o`mkT3epCH^0S`(o%;UtZs0{WE4cM&h}4k zA>s;RywkN^wupwh(8==3ji{oU$oc;EIYLBC0?xiXyx>42c)m6?w?{<~9o< ztt`$x+1%qG6;wrTc2V|LbH2OJhDj<*aF14ZdE%<7@Wb^DmV}%f z>f+$!Mo1V2gYqDpOD2;iAur0^T|0%yYD(Ym)s~WzxIH;NzZHTBA)z4l`2`CkCL_W< z**ycJWhFt(qhk&fDTaoy&X2BmNLfkf<<33}DJ?I2b+~^C6A?v&ubJo9ASg-<$-Owd z0HGu$Am_)&T$G3ioW;Chg8{(^DCCxTbhE7n2lbpPn$`qG&khg2{uSVC-u)7>NX3 zoiia~5=hqJ@r{tQ6zuZw{+s1_6?8Z?4!7BnryDWCH#~@m&TM2F$oPXTbnwEPxqI80cnR0isbbzM?QR8qPXB zVRvYQR$vD1=WdIC{qAd!2X76`Wn;pHSlh9dHQXLcS`X>q{0`SQyGW zXY!B&YuSLyz|8Y2u&@XM;0z#K2*SBxalvpn1PD7DAclcBESA7`{Gh`4N8R{}0&oL9 zKzzXv5RU`E513dS{%JTEn8V`o$8lL4pphR-ptxlNkwrjnZ*G8az;CaaY?v?-d<~!n z1>gWc4O|2T22A7$2_tT=m@J6Uou?oOfC$hY3W-2y-Z z1Bw9V^6UKbc|a?m9Z=%|E`UG<$^qa7vv1fuH~@s38xG${E`T^dJupBiINc|3KOc2~ z)c|4u>-km#b-r;Rz-<2EzuQ~jN&sts7H|k)n?OGn-$DG4@?{7C2LP{FAOs42D*yxv zh&Lg4o^b14!V*3<5-g&379d4B(U>NdQt@2;wf1Krfg-7rqjE zC-qJ({ygJ@h#xe-Ph7ys{F3kNdmH)2@ofiS!v{B@$vwINyxr?BKpPN$zAGQVCK$zs z1)q?QB;c4RkR}Cg;&TT4#77i=4)7IcvG{ouh&xd7<9&~7z=M2>d!2wp%ZDH^0Re-7 znIu5K9X|LB0S^Otm9MKHQ35vK2TCwQ_<;kQz{l#nOM!3zlR^LxelivS=nm&>eo*<= z@h1&{Z~mkP?7oAFU>fmx@H_6?1sHnp#}|%#=r(n%`BL{5B2*%2|Dfr_eBVw6W`#! zkMDy&?qegE&kysLU*6eq7sW5Z;|K8z!Pj=)#a!S*U^ehQ$rF&?`QYo3clz+{xwHMj zYJu_hRzH}{A0f!?{Au?v@Sm1I=)NBIrOM|a@W2-yUu5(1&Yche*L&0MbJ{&zA7CrM z@m>7yL;Sn6hX4pn`j(?0JA9Q(1OR%_k|xPB?W;`AU;fRTF#e5(_G#9hljxBe@_yTK16zkA`q8~;!O zuH)kpknwxT7x_gC0dv4#|EmD}ZZ$s}JxsFS%Lh0Av-0nx{4Vudi}<>IJLB)G0?qGl zboWmBiseIYx(mcZKz=Xpxqh)!aB&x$Z`%a!_}x7MZ~+?rgO`5S{|o&;8TNJm-}AX+ zd(ZqE8GrAEdxQ$?xU>5UuP+yOcfNZ{VB}q_@6`Ir%lz^8)!$YAM)-a6w>bGKuwQAx zr+eV`_ocvX-w6JKJ$_^W^}gcCuYb$x@2dZW?yqG1C&Yix?2D>`jxUD%Q_}<^{(;GV zBJ}UNf$F`&-xd$8U&=2RU)lE`%Kk#|<>G%u`5&_QR;6!i4_v=u`ju&4welr=RsH9K z1f%}H>+?^TKQsfP?-ck-@I&9X68|I7Ul}0a_rT%n_Wz2V|4fPhf9-dY|0_Jc3B?zK zzg+wi7XPIA8&CYs`N20|$}blW-n!HG8>x5X53%}|^8*>b6c7m*enb9E&)4emhd$K5 z(B8|x>)`i(!|?ZpFI*q``3(RSf7t;v3GSqK#CL7L1EydFAz174^CLgE0jpyEZUC^- z0~Qa!+J(Q209H`IDiiHXhn5-)XnkH;o&tzNJ>fM=4@l_Rz^unnX|pV3T#SB$}6F-&Q3Rv5hC)& zGDjP;GZ#{d>S|(F`^Wo-5TuB<_U--}V+}2@VWh;~U0>dXh>Iy{z>W@Pr*EYcFedQb zdB!47R!LO_aj>_!a49NofR{R4q7GilX`AQ^@2#vXT}aC)o5>$fz&56+@3tjrYm#~4Egs#cc9VoSqAW4A`uW*XPy4912W#?n}FgE2J1)U`6# zh0M^0m&7eC4W+k7=wnwpR;Jppx#6KX5sa0Q^bUhDd97zfo((V6!yp zjIgx>MsABj9buW+T58-dXhW;Ac!HVaGKDe%u^?Ef91acA548z61K1>mJSA%FU@fyw z8yLPZvBhd#&?!{lH-8*0QIjO|8#>Wu@4jOv{z1=(7 z&K{OrMqlT&B;LhVdWlA&uuNUtbPfl4yEe5PJ*>c^N2&nuy@pa0nu>M*8Zf6&%9s zIgI|s2{}T53w(mwKo`gRyP>8?O+(`NKu_TbYU7}=rLU*>9HoJR#0UF|j`cOtM63dQ zBxcCo``m57k+vHBq6azFxu;q^5ZpTqyo@ zxUKz6%RNYAiP|zKWCr}2+jvjwmb^o#+4fLtKhMzH7d=I4n3u(e*c{P2JDIv}!3y(~ zhB35Nh%HdyAdAzUo_DI(VOxN8BJV)w2ki&Uv?u>Vh z!u32{!84@p9a)^O{{Beo5Jca@6}m)g+mf{Q*FBi(90cjOIYCz$om)~?-kJw9J>w8f z2OH2Dqwh!x!bG?f~x~}Gz3xfk}MJrc{?dhIXVSRU_ z)5U?|TNRumVq={DQp-*EXt8eutZql(Ei-x#WGuWi_80rcAZku{*7``_g`Byw%-%9- z0jcI_e7VIKW-D0RKsOc#_9gTjly_F?b3&T-=I4v!Lrg_$XNlEm(z=9!o6+73nE_UF zw1+H?^dC!Fc*$){_b!U)xfq`=4UX`XZE-iNV}n=HmQEt;Gn9Q911Gt)1=6yZo}0nJ z+yEfl&gybybdaTpwTG-t44z1uIf$;$4(&@BIm)cf(bq-woVB)Q>5C#db_P4MjCqun zqv_%F@FYUR26H??pAgcv!!sv`fFInka{|vZ$V?@iGi+&W;9Lgd0AHPAT*;c^d2>@^ z95o9(XL@p+rG~X(O^lD-s$+rr!~|Q}!j?HTF$q=0TAhrH&5P*Z%(q5H7bWx@jaG&k zYf^^xT1(?2Te1cYigObar-}x)BI6@dEG;t}Z)9QyqHTpc9~hfQ>*36{2glc>^$FT@ zgX2f)#&+_f0~1Vbb6eEl@B~lK5`Rq_T@=?bH`<_0?WtQ>DGl|HU76tQ(S6-?o`s$B zZFldm5XPQxL>X9+HN@*J42+%XTG*mU)EPJik3a1s&&lJQOy)bt+uBz4azoS!u$iUR zX$N^(jX=;HYo?x<+q+11w+z7WE_P?F-LonRW z_t*V*w71h;)dgl|u_fEG%*@PGrZO|LeUWmxx@UIwZm;TdhB7lU;>C;iB0`yZzoa$H z>G=8?3{V;m?EL)%*|kGrP9C<)^!z-5QmyPUF?Uz9uawqp>i}W zr>=PKEi!r23gvgkpsbjN2i?;vXH76j7^9$H10AK`h zx;_!P!(X^f=arwjMtiPQR$Y4FKxy>*pm^u$oRTxY)PSY@qFvVnzcnKD#390Qp}hLR zKhAzAgY+2u!fh<8l_T@w?_N6DSBAz%;k(pNox!mnjz?6{@{E))@Oy$B}V1J3BGg1WUhcDAo_k2s)^PMz>(eI?Dxm_%{n zhaS`9%$*57mzUHa?*JazE z{pT{P!~zp}t8-2qUfJ}1U@1qxxFdf&uzO=Zl-a2r9l2MWb?5UJ{q|pawF&SIB3Z;g zNvJk`-S(C1cxIgvI`))OaPRp-z2W_clE|8jBb+z>{?cqK=^-F zVEuL4@}<{g4qF8qxmTLcAN)?X_LoJw*Ir{^*edv_V`4FnU#e)$r!D6;PgH0rT(^of7%UnyigcSRX;49-_bV!4!HGi5 z>|M7My^hQ=vm~$Cyn00>@{mjy^20v@K#XUSQcKRFd5raB`G^kIZKk+I4TxJ(c2_Qvow zRGvCSYxNh+o8qh{%LcSi0h{G?klw|@K78;bJuoq=TcYg8mZAI&5kvc=A zb4HQQb9r@&k+^G8$)#7KVr%}2d5qa~$&f12ZG+k(6%>5Ipz-?QMd}N;odNeJy+@A_ zvRP6k7>wnrBj32<#TtvC6aDF(I)sp&GP+1u zmqg&M=zx9{Bid4QXcwc>TeJp#&OVqwY7*}?m&;O#LLF3Aih^2c1$Tj|5)B!f&S^Tm zS+i#G=Hq#T24FnQYSK)EujdlQqT+7L^KRjZf;IVv9sog^>tfD5ke)Cj~9%u;rtIH;bC&B7-*z>SSY32YF=S82n9P z1y@8Ae`V!u7*2pxc>|9UCKnzB$1BzpY}7totPDHfK&cC7bo;j9Dex zfM^|~1m~Ij9<3Oc<&thdGT9*YDU)uO#O^Xuf}LJo=g)}l6wRiLdFN!K-rOlmg869Pm}#8VSni;4 zyd%JlXvX`k<+J6ZgLjK+rEu`$Qi>1;cU4-#9g!qR%svWEQ>e{cb4k|f%3ZQ2==SGL zS|wYJW%cXEIe#tdRlzuYEdyK}-?ai@UWmO?su(u%s=Vj{l_EsT+y@w$=ImAH6kXuK zR;d=FIRm7{>+7`yPmD@Ca( zW63eiWFTY6G|6Tnw^u*G?Q0HOi4d|^UM-9WKC7-13JyAFF!@4J_tn&Ue>86`@h&)0 zfRTR~oTA7|U-Wow-1T|b`j!1?cBfvF`$9o8P~Nw)CV8CqR%N3M)_~=*9v_;jmGh$05NtL7JZil7F(erjg<0a`u2Y@ofs5}pi;HJ~L zFo^RCh9Exdq?9R)4LYo7kiogFm3L|qoTqa;4N{!Ov${;v>;^NtEnnLYX7pI3Sq~Kq zTgDsqmCifHsk*F;{42l%4CZ31mc_|f_=tw>~=?WhHP|e~B4?LsQ z3x@j~Rkw+SIc(MpDI+cB$Rj$D7URTmBfRlY`HWSJUQf}KO@dKx@sxFpPG7}>eY9F< z<%)B(a%=fF&uE3F%5Uy?xn|;~7f!N;y6cG+ZDE{v!FlUyuY$wx88x?X#crHfe}87^6)a zVReS97R@3whp0v#I$-6yY3oiXnJ(t0GeWeTb?6$**HVA! z6ZBA5cOMjZQQgQF>VHCO5W<3{utXw54vBRFxPT*igD~22r>a{DZnIuDq7-U4!(KE% zs0}igZLmt6)Kv$ZY%68k11s4;IrPU0*3eFa(Yy@CEgW&fsO1e0IHfg-X+3f{hgtHlPK@ag zaoQ|Sx2t@?E>^XbvgL*rt!JM5p&mg;B7#rIP2v&W8xbe-8jsRujj>uiv{m~^`4;My zN2Ej@b>BNeu(tX#DD<|ffd?LVNNE<0@Y^A`N=LY@QTr7!wlkD5J-pdCdCDYGZYBNO1J9X_FnGW*y;UgOdxzdGfp*=Xb<1O&mS_V? z80$I8h$hx@k~XD>(;ubJn_{*5=%ByVI;bo5Q7UcZ6$iX>J7pc{vx&Lm8X?xqJaESf z*E0`2QG$)NM;>APElua{fe(!>x1RpDjU8ORUgr&6{Qe$?Yyd%UJ7o0<2fFUC1|>rs zzSR!O!0lI=!*U3#m6}myq~!u*LJe&)1I!X*JXSRWjB}haV}LUlrp_5*4Mu1)#u%+( z=7KRwqo1{67Ov1+yI~V9-O1jy3m0#zKXQc&G_o%};5_y9S3V(+^$mC4f!DRIJb}LF zwQaBvufystkr3Cdnn78l?N{2cD$Z`2JPNQWljJeoXp51`34=)EVakjNPIrL*)dH*9 z%~-cZOSRP=x`Ycgvrj!kx!4W2eu07=GZHom&LmEhu>7!^S}d+s+vW^J+^@*MK~-`ht(rYCuuXlv-%+& zD|Rq;og>5=s?UAk+_k`Kg3lSv!f>y>sxE1S!*bQAI?8yGHfN00?58hVVH7%;J5J#u zke&M9vY}QU)pUx6xqPb{R*tZorA=yMjG!JwtM%7xSi_~->yDg5_*$B8JpHa4xM zLuyDm$a;k}sS;!`Q@5laqB_Xhu?my!V4XOH2sG5+`2^n7w8BEXk7ykdNcRm=k8*^= zLgla)-g2yR$~fAvw_?FAMytJI#W_l`fwb+36=P9P0WtT|r0hXhPZwUxN$5~a{Y+VqH$Ws~=Oa3Xc| z6W<6}4f8Sp#Z^;x7mT>6V)MX5&!`PBWZ)jTMJ&R9m)IhK@!cSG%3!@$D|;32?#t!9 ziczi$C)(~SbNd0OQp*=ub zw!mrh&{ixk>Rr?|8;oi@b;Aau)=68l!K$^>H*C>L9aUR)Ncncgz7tZWnQ`cZkZfWe zyCFo`Rj2M~VHWcocmS*V!Vd*wFs{MO&0t&wMDPMuNkBMPRn2{H*d2|<6N0#**71ag zT~O-zks-&VCK06n0l8HY?Y&vqDTno3E$;%2_*&kpf_Gl198iz88?PACjj|l6oHC3u z9w5$HM(OmBmM!rbZIpF~NZE#}eK)LV9plUw&Cg_j1=Az7hATAeiqZf>1RRoEBqF>v zDmoQ#u8U>;8Zi!&B|`==R>P&^<}rr7VDySsYpvLH#mljYhrW0bCgmas%}uT0L57|Z z>qRkv+h9o(?XgtStr6=qRWxKoumCf-b&P&z*|KwtQbYNcFZd>0c^rc0r;~5O(YIs< zFD~?`f(^hb>!q!L0kcrjqeZYEFC8|GH|Z~*vy0VeEn9PomTw^K_~3+UsxE_&4^`D% zh_F)M>v#AJU5k6VilftbT9BqJ6YV3-Oy4D^~}ki59OW9r#C!Rg;bbar_MGc?gb&!MF^?KGGOBh=^Ny z^?f+D`h@mvvgN48moN(kqJwe2*Skl-C}>OpIX4)+ z;K(<6w-nN2tEx*JY#BY`2zO`;cim=mi@-g$p#jZpx4K(2%zdZ2M>NcBx3)_R+IEYC zxq>4iq2O$fXsA0UkK0alw|KZ4xJnG}zFX5P8tS@L+b02c+NvFt4t3h79*_xlTB{nA z4R=^!3<7Y{5^YEUWw%r{s2E|tNF7p+u$iR{tKq0t~IKV}#+Iw(DW0x?2q z4OcIlqEz~sYc?p^F4m4cT)cyI=n^K>&OY-9;%#oZ_VK%IXa{r98M|8`$YrmtPdwCN zy>?J8%zCMILK$v6S39E_t~XJ=U;tMisaY~bC=b-ES%fR}u(oZ&B)aPNokK<2*vBqG zd~J;v?g0-?EjQl2_f2hFKAz_doxHy8XZ2lz0d9xve&ImJz50I9K)X%$uyla+X8ova zpxH|Oq*AcSQvEa-Vi(v`8X@{Kb#q#wIy0;V9k}*n&7wYBd%SK@AE`NB3w<7AEgK@V zM{5=hQJTZmiv}pIq3Q)Aq}FiNk}>#PwP1qL9-_?~V|0h0i9m0dHU%ceVd}IY9&D%d z@y4T+2}8W;7-d`sYc>fjSgoc>!x}i7ISL?c*ewwIm9dUriG4~~rxkLK9L9Bn+9`>0 z-==g(qdoVits+R@Lt3*SD)6MLju#$sL9cs+hutu1??Mm{wKbOj0#U~}_lXc@QxCnc zq7C#N53F<(b<;IczLm1(7^TudT(*hS=poKqMQQhwX3eAYhe(q~QO3ihalJ^hapH&; z4p_{PI?isE(yt0cq4g_9IIcj8QddCwlSH^})4RmOpgB(@)awxN%tC#R80~^VzF-js z3kbNbY2xw^xUOw^044+83*Z-g$7;Iu34UNV-gt#_)i+%Egz?qaUwVi0*0ayOfr-^! zc!cw_>rTB9u*TX`uW*6-+A}Yt0GoB{je>!#7mANnbK!&HtF5^J&8uZz1R%Iswb%X# z?rP?BAmWi(cN+x1XR>ZX!tWS0kD>4@dL2(#=q0V52N7}x$YhAXQ+mAsGU$-nC>#-R z07yDuEFiatVtlvBEm9Gl8{|%DoacHan55iSD|!^7+?Oi46>#p0;M-=D%VI^3GR}Fv zyk9-iX|{YoJ<5Kza!@1EZl+>bJKA=-d{`&idZKbvFWPFXVoWdEdZc1pKhg?pjiRka z%Ek?2EQia%0v>F~jbhA(DuA}lhRY_5BF&()(H3JBqXu}(3Fs<|iOO+3yd{`>HStz6 zq!D$T^#W;F1!Mb_Jfw(rTBQuiAb>&iN`$-Z(z}G=9*4{>SdjM_tA*PiEHRqEa_X_M z;lcwh&{lKegb?bg-m^nV^)c2hF-pVqC9p6Vqb}%S4QI&X8W@W?(vT9?afRF^jq%td zwTdGH4k&Da@bHT&CT}q2jzPWyB*d3l}Wn4F?ORP2#M^ zi-)wMoaV|p)g!!@iA@T~z%3d}GC2ICrV8eRx~r!@x<>G~QZMYWQr(n2iwKn=+L{5v zV1hBD8D_OmJ*pJoyiwmJ?csIM+$!Sa4^V1c)`8qZtP8VH@p0C!ez4MP?W#tI&N6#W zA;9um!?3iE-9dAYkf-NGYa6$7z+-3qjZLV)0P`5&)`l57`Y4qt`l=R6e~vb*iZENI zjmd}EuUGX;g}LulwTcG%ozyhI{6ntm0KgH&T~ELEh!AcjAG=_s+K4+2c!dt)hIOPy zU-^XP?%QD9f|;R(tRL`pFzL!M+sNc&V5l5b(ABo2pKkI-#r2>qIO)+D(%E?4j8Sj z%2gY*P9Jg65~Dv-F>eZ%kd;#gXsemZ3GD~~vKmoG*sqZWln_o^q+WTr>j9-xGR*TB zj07Q`myBkCAm7{S25z4qo|@VR?-0R;>MPeUvF551C%9Bc)xIrKp_jU4iP9V-t(c&6 z$BFa$NRwI8xF%R&lZKQLPV1B&8MwzTtxYV%@08vs;17_uEN*WkFRSXt9V6UGIdQ0&K}BoU>2o0SiEe2 zwVW**RRv~FYLg2Bh^8805A0(@<*h@McxTC;89{qAZ(c9PYQAVd1@E&}RxciozMv9$ z{o?rQ@-JMHWjnLJS*98crH|_;Ixl2*0J76g30)i&bxkhj4onncXCAwxsds((YLRL- zp3$!t@3CB1Cyx(5B3B58#5~sKgPXN7U4RywqCcE9W|-)-nBSrj8?;?Y6GKK`Gm7th zl7t&F_gr46^kgoWzO&M&FkilUG)g z8NGn`yPO9yq4vtkg%AmMwA@?&RMCbnyUwpPIzKL00>Jal~Bnf=f z8L5CfG?lj|>%`}+Z1d+;ho5wNKTevwv77kZrTfxnF{?&78L^#D5{rtxD9`6brE<~J z&ja6x*ZsER{Z^&@9hu8EF91Se%qYcrGOt@B-gBwAUMVtYr;;v;!~%8@PjKvGUEzgil4xteu0yI) zch0g!vi?}^s9vHSxVxkg=eb&1FO3V^CDKHZfEQlQ6BN(GE;x5jmTb%2c6_1Qlf7u3 zVmy{Tq?hP8TiB`^D;>MoB~n02uQ5Me;P2oH!=P z4deq1jQ(`NkZP>Ux6(!#G{D4Ac>SVz8VXOGljVD}mdsL(Cv*EW>9Im&NrxaW z>na{y;sB6y(>zXZvSdUJ?Y2Q@O9Y{=8!PS{qojulSB;}h=gNAN(LQ_3Y5`x&Lu=`o zeZ108!MuL7&DXLvMMU6HHHqH`Ae2GN2!PNyt%rA5sce!93q7eJ^0`L|cNFhg#Oh2G zk85E7td1=i6n@Dj-Z@8!^%k$2MH$Xk45~s4(OPlfg)NoW4pB1w0Gfz5nIjFT!hN=D z*up;O`xerLO{Cm##fol(DYVvrd+*iMig=*7+DR9dkqRRf%X(PzC1RgK2>7yE1M|Re zw^g3o#>x$qF6qZuE|m5uMfmPen1Vr=dv@uy3qh(gZ{0l6cp`ULo8Ylj*dT{R9Fd3u z{sf-d+*8+N#g446mMIovIRkpJKFdWcSv2ODTm~M=@U!yHoD$VKvjGL(Vxpi|3+MZ- zyjl*9K4Vt$dBq7e7aZ9W)cf-1jG_R;y+a)xv_WP_2H~z*<#(=ek{yLxmI?a9c@w(P z&I_e2%IMHt3PmI!=8;u&?UDe-fHkW`qwzdYE3jdf5(arpt$+n4@YMmKl9YS07R?i^ zr}I0tq65EGR7rye0nFk@?*#FtoNe1ggMsW(!x;DZLbehLbwsV;_l*&#&p&id)ac2Z zHYPaF7PqOQ;rk?_a9|V9PS0gx?;W0rQFyY%V;q zj58Q39MwSkZjqUy{&>EI;!_)f&T#&?HqK|goFN(%#l_CQa7a)e$eYlQ^x7z|mJSA> z`XWHT(j3YGt2xiLiW$fT+}~<+ei%1S^I6EQl19fr z(lajHUu$%I88?adUn!(Zhl24l_ry6#2i#27#Rq1^&@-^q}S`kbq3cJ-%AqR8{ zuWOt{SKfwEob^IsyF3B`hKUE4c)70ZCBt~f#eybT1oo0vdhe2;1dPLw;JldMAdif= zqLnIM`pUrPkLZQ!TWse^5(p@>LCJDB);Hfeienchly2p#QL|(6Wk+!@Yvt*OWoFR3*?@mRPP(UniecqXEipD_Bv`(!1x8i!KFzgMp_|7Rw zt~YblfMC0r+opg*p3utq+~TFWGB=Eq%%=1DlrSNOWFpLmAl#a>YnE& zF$oX!jAO^Q#>1aF)BruJGWXu|wMx&IG2O(Vo$?C)z!b^$^hKjY&($Kja9{$U6s=jL zH~^U>!(w?@8M`(wttK;@6|j-l%p3r=G8*{=?lfZ#%ku8POxXQl#PDV4MsBfC*jowq z`>z&1dCh*NN#j$wsqYV5{$w@up+P-9?yM;N*8iP)>#svbX`ySmrNSYvBv|iPZC<#| z5yt#XQX!P}tU3Sz&wh&Sk!Z1ekhiDBUB;BHyxu5a{uJ`U(5z&8uZ1w+A$7d~#OuUCzVJT1$8@Oq)t_Ho)I z$!95-E(MS0VrCsXrWlW8^=RS{dllvUK1ouo*{h}m=lSAB*--pl4S-@0bVhPV)gyxT zsWg~NlvHQIx?!aKN?D6^02(;Nxn+zVxQ(QU3O=r)ayt@adkPk{q5!<2PQ*V3)=;o- zl4v$p(4~MxURIUfIwYwLW=?5D`R|s|1^g1k+tXK#L7(IU{802`P42O6s?kJNj|v`f zOfGtGPf_YipVo`>+bSao1|*5KW~>>;IWHI2hzG~;Hs=9cs?}mqgG3OXry+0OG}#O+ zyCmUJ-0Z9ai&vI2nJrT2n8&J&Lz{PIlb@OuVq$MepU>TXHXi<^MKv+zqU_71*FPEb z{qGL#l*r@KFL%B_Yj^z>Jbwc}6Ue;v{}?&PR%@bdTBbA)vS()ys61LvQD;{DrCzA#BjIdY#YToFIQBHd4L%{dr2?S zXNN}OaZFSk$p&B0;3rjp=mB8J*~(e4q4i6%+3W@xL>zcm$EL+AhlO0GczBXv z>@xgnvaxRB>t)apJ<#6bY z6Q>pg^SSaCDFC7c*dqN%@G!hu&^2DRFLxG~Y)@0&(CERfiM94FCPyr>24Bv(-$ zY-4oCiu+`Pu#fdcdxp_YE9JF9UIb~-esyg4DW&+*J{7#}rco-4AXxup$tWRUtEi02 z&jRxiE2=7B}P8|Ak5Jvy<`=fw1V$5(Dsxg@dBG=MfsF3l6zzDcjS*x$n`**8m&&wWyBYJ5{asBe+?R$jkh7 z(e!QjR&Lgf=U;3`-qWSf@8sCO_UpyP-H?CVv`GzKEh@ZsO17QIV~Tl!`MR)E!9P~A zBY#X4j^}ACSkl3SpVt)Z8prr-j~DJKm{Nped726q zH899)M&71=Y|sICLT?V<{!&_TYx~N2KDP=W#SBK$K{YRwx;}R)B9et0f1A+3Mcvh8 ztQf~2j%c}uptenN>9u8?^EVRt(GtLy%Naa2iKcVKHT=%0`r|olQJ{)J;G&_a(j6bc z3K1ClrwNVdn7i69OZssrfI{3diVHiW7VewG`EJpQPfZfMwuq${=74QkT6Sgo%IRxv z1-IKftLbzSzwbMvp$}DJ;eXcX{H0L={Z^*wmu|JFG+6D25#8AM`|8iLhOv=n^z>zu zI6yJX-Y|}VAArZuhJ>&^O5TAnApj(Yrl|qj#JppRm%iVM^DpiGE(__! zTpmB$O@1op_5Imm_&1_Zz|Y40A82Ahf6?vvl_3uQC-u%>SkmyHmD_${%cFi)X!)g4 z3H?^O`9q5;_O)cohYlt5E6JAk?W&kpVomQmlpE(^uFd;xF?C3CR!De;v@ozLjkH(5w*fMt2~WChVN- zxIiqqG>#5Gt;<J(7WMG)F&@`Cb3n`D=E@ne|VoqsqT77{;dXHN5Xs3VN$O zoJ-<$O!L~HW^EZoLwv11`M}p2BN-H4$G0Aja(O*soP) z?->Dk8{YRRBi^YEeXf8xzx7@%`Lu0Dh~;Vc)TJ8uLT9Y7lFOP9a8Q>61`LAKXkjhP zCfQ}LI%icA7c1DE(Io2q&T76e_sHxefZ4tuR*m>cvF|e(=Jv*OjhMBehlvAR(q?g& z6uV_|!JZB_MxgU^tGM?&>&5(xQ|naR72{tAw2`k=`?D$qofF(QS@|nkzBuU_YAu&u zg!fHv;i#DR3;nMJg=gk((3jQ!dr&p<&&qwjmGis4@!6!O&ubwQWk!oAkLD>s=S}HD z((s>jrgL)6Y~BHY?*Hml#r%`z(5Jk6=hxv!HJ^sn0#bBlD@ra5Bd|P!xeY=93b$MR zWkDVDLSZbujLYs#*b(!u;NH|b&9SV4Te}q0c~eH0l2?k!LRHbOW(ZzJyhqdX`@}X~Z=L@nA zjR*vR?ku{14Z;7UyRcWnBFgEww`5evGRgY1C3{@l|BdN-<)>BE=vRv4nT408$&q}0 zpBcQ?FX2~hA6rCR-g@p=e;AevdS|{``DIxh@j`8;BzsRcDoJ`YtK`ZwEtO?5Fp`@kSEQFP!#IgkBo_+``k zCMl0Jw;guIu!2X54im0&60^{S_r(vOeyioFct$F%w=+$CxqX2Wj2f0 zr}&(-WOPe7ra136f)4h2X}wkZWk%lrmGLSmb5#ZYQtNAJ_Le3lMParWuqC4t#7FYV zuT5g31qSno_oj&vk3C-){MJc`>yGStQJXlwlkWU3QL|{T>%oE!m~p({P4DMsn8Qo| z^QMn&(rzzYcbhVY<(=Z~4q9>t#cdLtPC9b>#O+g@4qLMUkS)n+uO)j}$~NBNsH<>5 z%skfRysw~F*aRvszn#}G*8hGuuYubr5zaG`S$%I5kKr52q;nZ2pm|5~=+}BNQNmNj z<)_+_@lsQTrAOKkiSn}*#rtX@2`Wp>l5cVz@kZN?xwGO9sgB2OS^Yvbsos~JnQi=L ziD6uWd9~bzkr6QPOXw>NWVFmOwR9Ko*>tzrx$|OfFKmyRzx0XPr+J-srZ)>%#)ol@ z6fo~~(KxY1D(OhhJ5uYQy=Yp{g5dEuoZWb5lzYfo6U}q8&PWynadIOGOuo!#p6O% z|Gk=@x4>#k(}}#5ufoAp>za_FtvS!$@W82nuABP(*OsY!1$PI5t+tL+X-jW~qlxBK zAx&4~+qItII~h|4@x$q!Z4nhaoty39nR{_POVRU{kv(1+3thhBvGFsQo`dYweD^x9 zii6(W=FrT&sJ?~R)#~UDm$aoW?09ti6lUlkcRSy;3IZt%c{h7TFQu#;C630rc0~1@ zHO`iL0a(n!@Ns8m>PAASwGP`glsADE` zu{5#`Q#Mt*+n!r~5LeO=zBu}J@W>~pBEoaDw0SA0qbGi~FtNw4W}$q$F|qn6rK2No zx;}TnC#9{%bF#8Ufy@a9!-`V=k6-+@z zOw$9sVNBqavuQm41Pd;&s%-g0(!^C&DS{CEjqXfQ!x zzWaLs&$@eni2`KU;n6j(gskxW>E7{!kc1TM>g4d8UrbE!;S7-41YvjAcU*#i!F77} zC?+NRc)WKG3KxC2I6VU;0q)l|AR6&;gNRQaK7g6Jyx|uW5x6}%y5g0P7P>zJP%Qy5 zF}|B~4o(ZiZJu4+3y1*J6@YL7;?ec>BQFfbb#o12wFLPA`0MgPSW<-R>;Mqjq(tsc zPC$7=k5`v>d=NY8@*XB6z;k_mbqDBKymyyp0Qd!%YL}OQss-s60Lr)kqlX&+jUYG@ zAoKu~0|a4!B2c*jI_DO`b^%5efMp3oOt+J3P&^Mnxq<5eMhb!sJwmGGhXIPz4a6-2 zv8fP?1|l`_!2tj3`T<~`0LSYNqNagZRS1Xm0IK4|vvQ~kfD-eAq69I0pgo`)0G)aO z)Fue>1o42L2rN&5{m)dD?+}jfF}IvJT8Nne8U!L^AvhEy7C?;g!az_g)L4kf1bA7T zcv%oR3$A~L9dT$L96$@C3J%K(LbU-#5yYtCq<|m>S_%W;G@xF<<^uY>gt%$|Lk7rg zpshDgC@T<$3lssNjyUKx05=2jaNtTnr5t1u6vYeiU^p7*R0q+lo*+HYaflZK(R!dO zA*vI^$bx}jUeFYXnFJjNUBv+gfdhP;44{oXw^uh0fVss5f_{PWAp#xe0tkHuY)$|W z{jMNl9YiMsz$b9w!xME20HAi&KIf3j0J(`nKLZdk03qX0x;TiWCz2L0I1W(aDf$_T zgNFJV)chSi1Wb{GM}ba&@My?zp7x;=--EX~!PHQYHAi?(3eG&mRdb5t;E_P2^mob} z7l#7|MOK3@fnZ!u0I?_X62v(J`T&$I$Syfehaf)?QvxzIP%01-5`hzo&576s;58@! z8)`UE#MM2YkO21$!0rK(8`t&4H6RB96517@k$uPSL3(_$503Fa!KVPt39?53wBqIj zc0(*DU=^Ic28DCbP8@C+r&qpn-#8)TkRTkTK$1Q2be?+?+J$rmSsT>oCyp5e9D}S6 zs_usyaF|S-Mu86CxW<#e0yx)`9yp2uCmr6BCW2_UD>8ZuW$JgUlK-ZwLto3<|gvfCFA$-h&iE#Q}p8fRJ(^181axMjXz8 zTZj_K@f^ruIMQ(X>q$Du(m>6SKR;p4IJ*!o4z&E)%AT=I92(b?UY_*+gQ*2I5MtB( zfYWdeKx%$sL_xaXAnTr(fe%oFpHXETsh|-RSPvBE5B=v@=?~+1>dYUz;4JhHbn8>K zkWoN`$qn#aU^IWkpg~G~Y70lXPnHTH!JtuwBkq&SJjo4u2&&|ni~>3KceyxD1PKRa z=ePtk262XHNI4wYL7t~!meY#oLO3q*<2XlbPBu>F@0Q51z26~O&!s&z@<|!L7Y&{L z?%kkl2)gzC^6x3w2Xa4St-#eF*LTUj`#wjVPp0^z5uBDo8A0)!R&(48vI5S0#bF!% zFd|_49EJVp@gF+j=!;_sPs2A<3m6xly8v<)XrlV=8c#$&NTc612x$@$@(-9kMEp$~e8s*@JdDdmwoN zUpiHzcX1?3}58LP1()Y`LWP~n%?ukEs zeD0O!^hciO10dyG_~RnTIGIt_CDp{IUt%O6Ym z-7deM|Dk|q%|eR(-pBtR>3`&k|GPxMB7RrTvoM_WAKAtqj)7u1-UFroK;nOgTKJE$ zKHJcb!hd{tI>T`&NJwC|9FKl#HK$%E$3GU}`NWSLe?0Ji6XQAG_eMdbKOg#!mi0aV zKTQ6nu>Xi0f2{oP^8elL4~;w@|9>BN&IzP~dhGv4xF453UG~TAAM5@1#Q#y%j}QM| z&gbJlGXD7R$1{H?&L0}{J=fnR|E7%Rvi_L&`jZS$nOy=KRgyoNMo$Fc&h7hy#Hr+wmAAGBFJYv_VE7 zFwm0<(umWU(gDtaS86;C0eo16hXf`#_&TKh>4)M!{^^H5I(Xp!__HtY_H-bTQj>sL z8A|b&gB%3>Q@(%(NcR1oq66p#x?~{bF!1@i93TdaD9#nqFHMEG@=SRITHh5YKVHP- zN?D~!xePdY(f1;#Fah)dN`RNLr39z!RhWC}lPM-EG%5s@|9{s50RKK)@u|=W2H26y zl%QomQznthz$zfQ6c~{|KZBsEVA<2NOa&}`l&fp1Jl@=cH8tc94^SP|yW?9;GadQe z<)fydZ0|tF#pvPaSgdZTd$IoP=qz8^cr>!ny*@bCbT!+Wys~oDKi|6qTRMoxw+#L4 zu9l8eEo|f~OCT?Q>FB(=lbvj9kC<0dA9U4Ug*o5+Fg6m?#GFpYJgYvAI4x$MH4&1jB4{_FxKA=ql95NO(V#3% zfj}$EZ>Di46?@1S_RG<4Z`R238*e;LK_7BP12Uk3cH?|IQPX{D)GB);DeZ(a>Ybq_ zY&FSo=;AzO!e;0@nA8K>WMs}WqsO7ZSST>abL!D$Yel7q*ZZc-y=xaS!7Qu9etXxffLY&We(BafQb!;r^n18-z2ht|ZA!C&G=!9t^bY#Ik?q0O+7IWUW z?+@GSIf)Ee6p%=Ai=oF_z3l-b~j0ajZyX&WySExN~EiMIVhc7`q@-IqqBah6k) zx(Sf6MeBsyfnA@_?V;O9pShvuIIFQ4-2~OKbxYX!_@$rs(wIEfW_Z#7q1LzT5Pvzi z=i|3JC5<#2ThWht9y)dnT^pB%S`ROoBuF}ryx{9y_tEadle&o-?Yr)gTYb;b?p>3n zXsB@8J!V}bhuQY6+Q2W{?jrn$hjbG(+jczQE4`|*)@{p9iN^wQq|d;tS@doDW0Yst zm|e28;Se4((XO4SEjaNDp6)S4YO?l&;j==$Bt70iNa$FbWvWKqW^DW8=?47_gf(OO0#0=hsy$=iUBmSqt^ZH(FfUEyHB&^L`G9&?#x%yKgfPLdF5F(hD>Y~ zgl3Ia*!+0^x642Hd>l$e3)({QL-pQow*R93pQiuMbU`AuB`K|)6`VKy#pd5{|8n;29B|2X?UpZ{$BVY9%kbhaq=GnZ7<`qB62_1}!&-F$%lr13wG ze)jrhq#&WXDK)dDDx_ex#G!cSv(ZoDzdrui^smc*2rlW*j;C>PgqDV=qQTE@Kkxii z_m8r_J^W<+&&{7beiIcW(web29xFb(tJMGBR{yI1^V3&pk^JN1znTBn!cS43gp?Ex z6HRKZg8wl3SEoOp{RR3*=-)4Yvixo1wRh=YW;C@e4b5XFW_6eNzhC;*;-|~sRNsMq zef-JjADcgUe;6!^tKyT1teT{vzR!NI7fKx8ZvA5M=j;Cq^q+eFwezFP=j9^z@|i;a z@`0SVS|Jg`;$R6a_3>G~)#3T0rT(wyKD)kO|6u*Y{y&ZW?dq?pf0Y0F{0{t4`m@Sk z#Q(d|f9?E--LLC!>^^V(X!DPSKl%M-y>G zJLwnbtDACz+?{I2oY`u>tckiXVm~JiEfiwo*nMds^|R@2ZpO4Q3%SM_K6)h*>%m!B5ue7h?IS3q;_Dok>AtL-Q&G*7}9Ga{w0 z8IJ7eK*2b}q(Hz2|BBgs*UI&L>n}%dO+TN$*8g%_tXcwkCHbOObW^UIds=CcvkmyM zQstbrT_kU$hf@Mrb0pW=jeM(b2k#7jz5Jujf8YK|^S>Ye4E_h`r~6+F zemMTs^8HSUW9~w|Z~71umeS2niskjDgfb_{p7m>4mQ@$|8s(CL$4c$IgDQvYr7GXd z5qc!9qZysZ?k2&iC-S_?SBosZUcG~Sfc$v00+KRCRdEeR+TRYj+FFcFC6?zCXq zOr~S?UV&k$xDZ^XntxVpnY~u$L7HR*qx;+9BL&0BKI{dOBXvJrzu`VZUaygHK{F$7 zGMsU9yugIPUU+Eh6xxHePOzdLQ*^7J^JEp8MVDnJh1(U5+4BJOVRi(jw<95(H!Z{*BaKj|Uy>g?#s^s{!{@1%= z=oe`5%{Rlsy-K_6)p{@TI6D;8D@=@S?n@16oXT*oUCXtuIL_BCzb^olLG!MwOes6{ zj>LJ6A9|n_9@Ei>4C2jUT$no~!-kto)mljUEzKCe!*<5Z3PNK0`{RQ7(>Pc9R)z`n zilSPpnsrrgp0Po7!%sDZ#r6)w`8BVkTGB4bYPHbJ3#t`yi5r0G=|n}+hcmq^*NV(a z?p{kj>lg2pIpvU14GElPDMF0a?37 zmU9av?^>N7agZCAz!MSt>sN9tE3a}@sRs>?P2q{{{m6jkMS=zGDiczto_R{M z!_PGbCG>SCgb1cmTpIVuh7IBjDNQ%^kn4z^69z|%`s4gt<}nVO1H2ydo*-jtq@J;@ z(Q7T9F{AyVLA_IP?!ry91@|1Q+6=V%t4Le!Ax@X|kS1qn z;4e6q*foJi{A5=|WcNs-4}U4yo^eFfr9YCMX*z^Mrfu>9&nIcHJ1Rmri2-tlWKnlP zQLh7K-cgN-+e~-Vcx!lE=K#`=w~%Jra7NawQ^~k$Fea|Ez0kw$kS zk~L@%j<|NH`HrCQzNvU;-T_*-Ns=ONGC^*%yGMtZif8i3=igk&H&^6PJ zc=m~NJ;9;9vk8uZBa9XojJe`jCoXsTMGTC^c(iO|4VYrQl&OQ;Z+1dXbcIKBjUzpp zH*u!)JA#a^i9hDrpcmVGqXtLdK5ffLtEO|DIvbRF$1+OZZgxV;@Dsp z1pe_OUGRvuafDCPVww&8n5xm8LkEgmeZl;^nU1h1%sAiwl z+mKi2e#t|E=$O{w6fedq*|PpBL#0kL4mh>7+Hc-K&(KW{G8fxe$^Q2RiU)@Ws()msx6S-vSl0(g8| zA2yghgLi7!&C;oU$dXj+W*^o&kmgx|=zd{h6mJCQO2SsP0ZgXwxjgiF%Z-T_?}FuCpMlvi&dv?eP)( z$y68meug#>iyN8+ewFQy8t91&;m_mjXy;^gsv7Z>VVg4776|VdOY&^qN-<(Q62weH z+?K#Aenb?dVAzU#kp^OGC7(3eBj!3n!+NI@+<5!Rx-1#)o@1Q6F7${S8H@;QTSQwo zo!~UtVB8JI47Jwb6+Jct^X*(tvf`a#HMuX>knMK2=qXW1K>uuvbL$SukavRx@l>%F zd~?KRn|tiEC^$qk746Zsh5(c$YqOql&s@!vGma%{UEm%+)fEEk9ZK*KDz00*cq95P z3DTgNe$!x#-(xx97I=P0Q5QV2eF)*lUPyDG?_?O%-(`Sn)UvK>P11L%E`%9YAZAb) z9V-~X1hHp{F4Ub&v+ApCC~#}Ktuo5mt#>5Nu>!GxNKBgu8PGJF=G?fGVO)1hfz&`L z*R|&4twvY;RC5rbuQMT{Wi;7~u|~3@o@c7p$g{+ChUDEw$F!NIz$8&Gkn)qs?yL=x zDeWd5Qm+c!NGu2|Y%lDH5FXh!jPc>F5G@-nGSwPXGH-x|vcdMmjJCm}+eXmd>~(^9 z!$k(9UY&eKwN6{+_#*~8W5Ze|Qe0TO=|)s>y0k%ud`NdlofQCA`M&rd!F-B6>yQZC ze$ww74e#uv-GB#JO(&sFD8gz@DiXkM@;ByOuqqaq}gx7M{_dW>xf^Ko5B$ zFiYBNwM$s(^oXAA^$#B(3Jn&GNBMP6C%6fh5suB_Mjq~hf@O>Gh`RqTBdEyVU|Jdb&guKj3TMg%)Y2I zA|Ewa6E|4SslcNfYDy3kFY1bj>K=>@X`e{)5-g$|d7C&(_EDN1^9HZRkl>$L>S>p3 z1Kc6k2D8R@Nm^+0iyi5Wfb|W>1hvkh+?v*st=WeJJ-V0xp@Yd{x*p+(VS`)exTB|9 zLJ~yXF=6c^Xy4`qU?K0O0~wG3tpR7=*BEB*QyoYPEZ^i&epFI>PhuEb#VwkMJAoGZR-l8t=ILWDIEL6$u5t1S+Z?ygw8HH&?NZm- zj<|KUOWG30BXyqRg`MU4Bu_N^qQ-gt$T5B(Vhr$ov^6Mkq&+xpv@DiPCDQ8cT${?hJd29s0+aHSB7@SiV!e{NZSp-;HC@^$ONZ9qWolC|(v9klv&`yt zDK@nmnNHO!SuQn;6pxy@Y@eE$Y`^NsEWg@uN7F2^<%<${U{i}4+#_WBBF%d7`UJt6~pU9#WZ(g;mzHc=%((J7;bk; zG_yA~n%RSgG5Yb5bP+M4VUQF?8zP3&Mo7U8qog3l7%8A}j1a(>zy&fUQUf{Tm_W`L zHjp=h3Thcn3T+o9!rJ>{;T>J@xUROS#9m<}VxTz!JHQQ28)k%(#%O`*6Lr3sv(;XC zbCvG-OXZG*>!r3uyCoJyN8gN#&r5V)iNC1<-z;SX(2BcUo$9j;3+gV(p1Fea;7uWd z+J@pHdwaqY##?>RiyTMX4&9V^M$;xg*GVbR+G~mdbwAU-VVUU3oJbC7?nT753*qQN zZcy4(qbqr{&MND)N;gMRDbIseU1gcoY*U=-7f3$Lp=6k#GcmrWB_d^%?M<3*u+P}3 zHKANps^>_nA9J*-&M21DO|mn62JgomK}WWAB_#Cn!mtx8AHpKdF@2}jEa$9BBmb#P zmakfRTVPmrSYTbgn&(nGl^s|&oEb&!A|$W{$rv6Bf$wOD$>^&I&YLLpEu8=C{ATN; z)w{zF#_z9xRsVzZ7wONczux?$|I6`@7Qb!%VE<|9z2~Rt*FhztMX<6S;OCsSOca%e zPvNkzX+l~&xtkh68L9Ehny+@v*{U$lJ*&{my{!c0s8-)nbg3sK8~O^tl|7XlBt(}>n6z|jlIbUExdSKA1x$ny280& z=Zop<+Yc&lp`R|^nwP8=dQ^>NL^gC_&}|$TX_)Gky;*6Tds_hp9)pg^j|#kMh{GRCUC3)V_4UR`~LzJYwXdS(7? zGvA|nB0ZeZfkg%x;#%~znWPx(gQ_Hvx+X3~S1J(#4H=IFE`sxM`^ z+@|pKn^v*3L|kn6Z9mVodYT+c?@dMsc#&zN^3E{x@m#Avt_o$=U<_(G{2nWIakgRVcd>b z^Z?U~yj5pFk=Nd)ThN!$A#MFZ=xMec>7ovtsb9ZE@}UnVA-g#~Su5X+-#mS|du{i1 zHY=u1h{))!_ISJfo5p+XUk?g>D?}-&!iIptwJ*AF)W00$1XhcXxE`wetE0~C`m`d<%Ug_iVT$Q^Z_MJFF2z)xwbY2o~iK>R9Qm!v^E zKnAo8d1F^OS_Ey{9wMZr*PpmrubZn`zDo*aw8msiR++t(emE=it?WY*`sy4D#9!_x zZjHmym`R2y@KAY(4(jN3BOEt8r90Aw6L2H-7O&+W_VU83TH^9%KIy;L{j{1M&u97O zT$GA4yjlGrgbmNaJY}|CJI}CY7Ma{%Z~0d3<634ShvxnE;vZMVfz%dQ-qzRW z0ykXwz8d5AdS9keNQ0FIg;upgFv3oaI4!u9W0$X9I+H>kEYbdh!`F_4 z;+20sz73{we2N}RHgSky;I|wHPM=%mQ_UJ8WwIJl>{Zni_QToV4vLVh8ppTVpXU-% zSL+^=LwmVK8J6|^A$faOTdmMPPhPnQOF5(ML}Rw9Pt&p8Uo`*Z^O*tr)8k*3@u`ay z4@lSo?;#F0M}H*1J8BKzxRmq#iy&oFF#HX5BNThpupUV`EZs{bjDMEo#_;QmbKIMR z=Bf6=ZlhEue!E$YbzPTdo@&i>Na`bV-3Rd`SawItIEw+Px74jL%pvPIJnn#h5*&Bj zbQqer$2g6STVvlu!&aN_V_-|%$M~>0o;1OKrcEC0z1SrQ_g(9J3=dxEcz^}0c1c2f zw)^gUgO0mS{i991}R7tgWt=uI;>ThR;0xj|LvR zT@GiYHn!r`O9NNv!lr2;bZpx;@Ok{$##OR>W@M|neXMGuceE|Hw>VyVbh1BMd~&rp zT$0&ZT&zEt*gS2X89IZP4~^Zx3&)1ekc~qvN8PP$btj|kO{k;c;U?J1^m_Zj*!pqv z(%4?Uer{w3-n`T{S3SFw>l;4pU+LRR*Un8GBpWvdW-6ywas%W0-5WF8`?Wg@^N0O= z9X-|C%V%Aa=Yt!4E7|^~rls1+G04*Ja$90qM-QUU$b#6{&#=3Xs5=|YI>ub4@?#+?ZME~|! zs-q*h6@xXk9xk4A^&ifjbu=YnsR|ehc@#@@wZs<^10CR?qy2pKq^1eE7lYK)CE{ll z;4k-LnYxzb`awfaeks<}k=;J4LZv_nz>{24MSKg-owcaKo891M~?tEkKFrBH}e0+LE0YLYvdj{4mVR9EHZQB@t# z36TS31i+A7Rpt2+1OT~%>VWSapjz_#N2n_3Q38g_B{CJzvm63`e1d97Z=_o4;#;UT z=;l#NZVR2^a#rRpb&m1SFFJ z#TQ_yM6L>ce1@t&i^1C9+b1o}`x_Nq@b#01#*!a6a;)i09w?afKUS}H8daYK-!So2USg}SfZ{f zd626CdI7r<01tow1P03_02ZKZ0|b^yfzl0`6rdmY1fl~N2SMczQm87xof_!rSp@=; zNI@zpGKmbZtFQ$O0Afr2>)xGr$rB@aJbm2p>S|kjDprhxaJ@ zn6ml=C^-QNQ53Z=ipmuk7z`v2fD`afE&&o;rXXA@1*-ti6g^-d^<)r5H&B`)1u{u- z09*%(SAZY_nxEtIeN*|>_Mm?%1q7MNA3m5_t z7l0%ILBI+l0C1>^6ku9Ggu+b#j)HDwfecVBBYP1BR)h>7UM2_LK;8rOG(bS43T=Q& zz$8EcP)wr&1@Z)<$bR7T3D7QA=mQ7>tI7b%Ad*J~;ZID*6ps4Oq3Fp7o}4d4;LCiqzbB*L>q$veP=6quo;41f>l zRwf0IQE~`iRpCFdNR^Z*6H1{=NuvT7P$BfJU`Ig_z=y&UKv)qi;2;G81VjqRKLvz; z%~SBBpan20SLCSzq9R!pwMD?H1B?K10m27x4?qLbSD6sMd!f*!n6JzbMT#iYDD(mP zzjrE!00tCk^dg~5CB-Qq3>?2RqbPcM36u0?-6)a=@CXPY5GqCW6Ob~>1qB9jK!Hq= zS<0}!;8g}&K_1|M3cxc6SZPWl3PXyvB0H4ElmLL4FTqe;E);cDzZ(b66yO!I3T?l; zq^!mQ+15s3@=I?7k!Id%*6$c<^0FA&K zkXBk!x&?G8;t!~j04WOirNsL^WfTULs+AG_T?sHjL9en;;fTV|7heHsB{JnS021&Y z82Q~OP~rCCwgRj&5K6`YBMPz zjqfxA=9S*P$SbkDaIHk8@bP#1FU%=I0i>a#S7}`d={p%O6f50OOnNb-fU0Qy?&WvA zFH?YCB^ZS=Wt5fq4|KhVD`fwL2GIVm_DfzW=ux<=U_gmODWGWm4(NARzjrCRUx2+B zQ0n_muyT%aP-*A8xBrUp%ehj4!WTeL$>9rr1x}?=;8f}Ccf~JOzWbM~Jp8X{0WGDL7jG4`Dm?%F@VhxcgA$Pv&Ho3f!v2dvB_zc>h2-z1 zen+F6{I71s9A%FZBrxH-6E9Q0pDM=`2Zad*7r+$Yr5OFL{d>Q{-uIab>3>=IZu4ab z(DLGzQsVa%`2TVKFUG&yR7_D=dNBj2RRB@g`hNI6{4X@Wd#;4~-Q0IDFEd_<`L0Ik znG*T${3&FWn3alw){AB({ukrlnNh${lJcTZIZdHSX-uI(p&KAVIjoqjRHV2c11|-7 z;s{H;Lstvt8z1K3)kcqFKHT0y1 z$2xX~4`-+MYNon3JNK3jknL@;u7%$H$vMQ<>SFFl-_hjZ=v<=jptiCMc6L(P+<7*z z(mh_jwD2+AoVqf%(>vchQFnK}7+N#&vAS3WzHc~5rl%o6K9A!o8Xk_)g_&pX5Vi3U znV+wGW=7@~s5K|L^@-4&9DDW((wrAvdBgN)Mc00znv(X6TH^x`e&Je^ zqFc`hopI4qV7Th&fYdicV{GU-BvjTnrW)igA0C5-`9Jhc=!Sb;_sJdZzU#A_3gr3rz|7>Du$gGN zK*XQ7j@qPIP4KUV`HkuZL2$0SmJ)-Nl;2afqAeeP0XmodJ6Wu5Ir}0Tg{AmxedPlbw*?WqA zn2>NJnDNG|cJyndI!$zllfu?pHbW7&?K2KIoz6Zzoa0#AJtBOKzZ;Ic7S6b&K|6n1VvwTt$D;r`sS_C zTKyw>NbAvFFv5MY`wAYk+r1YWan---5&JZ-WF4(KK4TcCH#MaZZN4x9j&fWZxsCAL z8oUY&JRjWkjJO`&bcRVr06~q>X~P)Z$qCJP>xGdgxWoF;eVE(f$eFLt>BNz@&&AY% zOW^h7u5;MU__}?RY;?sc20Aon6sJ2jqZMa3IjIq2GC!#rX)-qpjWnB^QHwN~ozaLj znx0aF8_rFuM;pw}YDDVHF6l?APOTckA!F+nk&oj$c9A#3`!2!9gBO0myMyP!fjfg& zVVDZ1f?0odtGiYz}(#L&eMjmQ0x~dli8QQUhUk;pm1aFVs z2fEBHsfX$fZJUSR51qS)Y>h|)T_)!>BX#@stfOvvuRVj-hCv|?BP)g>kiHAIkj)+y zn8%>V0AboTXPflgdFm0kHmVLY?OwBwy%$`DgfDce!mayP>|s}e#|XdSUK4~VchL)Z z+H@c3IW%aQ1mWz5!B<*T6C66Go#L)rCE?EfW6p?2+G%XmI9n&xnmgl>c*c`OIdx3A zBwjJ@V*~oSY|v_~!?5t_4$~wp`X(%Xfv%No(=_FaK4i-hoP-m;sKa_G)}P z2dJ1%jy*-Kd>auX656Id(!^*lt|)}KTPDwPp$=yVF=4&lqJ^yz0%CDjynbO5~CoIt{imrZpc65+caGRUXCrU$o!Jfa*PqZ>!lsH3I}RlNnbq^x5%;laE@jC7&PP8U3>QL+H28 zG>o7*D!HE(LYypjd$a$G?vK!4ZeJOf?ibpATX_}utvxrDQy)Vd<@jSqSmD{jpWS~v z_(kXKZK=i^@js#eq5hZSf4BQ}<+Vq}T)un7bU{!>Z(c$zACGPlpivxlDzT|5DZjfc zykMv_tZ3|m{~s1UIKEl^==|f_->iQ={#F0|=_m6a_y1z@zg_>|kUz=)uKEY@FKYks z{9mAdSNXg22l=lmKg<57{EyII9^ZpMsr?}SyXK#t{)haJvQMhTXJ5>JI{Y6d|9SD> zIzL^0F)rNs=JLE&DtYvwpLlGMdUCU8XQ0cA7qT|aERGx>V|>ZZi{?fgf-w?h?C z#MYLy@S5q@P9G2cp#7W5>&tKUIpcM)1U@eYh8sfkn11kWI_)i=V#f=dRNOk)8cGpZe`wol?lF<5E}3Fe4tx9wfNd zpJmC)jdNG){4k<^tb5%-vCao+vAD_>Kh_!-$(~NPt-8y-FEh_ytPf1?>BD+bcXRa1 zRB{e!ZiGHwQXF%L;#hZ{Eh)1qnlBB^5wT*UdGiDl>O(njuD1w>qYsob_wcK?es0WFSfTcCAe-W-?H?+;I`75G}9av$y*>BS4dx7 zesjtm<0QaoGx=5}55<=i&iKI=Y*6*aYn|WJ-tLwJ5ZgOby=qQ?Kcd;?57U$4nUh(j z6_Bi5dO)IJBEzfaflFe@-hm~*V%d70t`}nD0l^ey-uV#7UG(=*@0T%A2FXWBGGLy&BD&wR#w)c_7QFUv*p{u5(4Vk7b#as29vPAY!Uk-$Fjw zX7va%y}sPOKQ0Txu}88^%5*cPTd+RWSA}OaK4{@IS*yl8QzS_9{dV={s5FSg?aQ?+ zQ_r5~B?eM2axZH9vHbB&;|iUeX%;e~VJGXk(HYr2nqtaO#V+^3U70r-=X9Sq;cSLZ zg?9ELJ0^s+m-STdgzN1i*w;Q&_UXaVEsI30Mx*5MUX)A2ZT2PAE2(2D)woWRyxas2 zXYXdpYi)=F?O3n6%iOD4Z*0d9!KMa8*=2>qHZKx&>-C9qZLz-WOUTa+K?ko-)u#SQnN z92k$p<7RJI`x+L?Hbsq#lI-cvq4pMV!M}dYIIA~&&*Bx^AYurvL!PCyCR9zQUoWiL&_woMRCWAquiDYHHCE{q5AAvXxd z+rrD~c1Y0#){w5F@YI#{NIYl?4Q<{fKGB^MduLK~SVowML4*xmj^7l9`wGr+7d#(W z+a?aga!3?SVU6h8$%}o_j!jR=2WS}Fyv@r7W!fUDEI?j z2*5U3(%^{h9!oQ=*3OvYC-~FOvd(F~h?eOL-D(rUWCzNXCeA$MghcY!ND!(Gc4!D= zLsiLG=R`)ZH?lyrHmL*s7ze5}eGib~t&^d3mbjr_j0;tqdBO;YZ<#0S)#;|swZ!=| z4>KPc?NOp3tW~3oyvGTOY+Fgyq8VW4y5l|B=Oi)1C8=)|YfXP9A2j(#wlCwf8Tz={ zF1R=6j3lNzBl|}&)(xPHZFWdBZ;`B1ZGfL?jq_!kQtqiP*q)&@t2&kRjb>OFXFEfI zYp@67-0(=*X9D6YWc50W)Uh6fEA2jGj~fgi%}}YgOdaUM+Skj{x0+y~?48V~dgqkR zA);lKI%TOD$kDT`OR9eoeU`!KWuGSXUJD6rwr4B5@gdo}(<+i~a zA)HOutT85zbYR`<@3Rk>p>Xbc2Dr`^C+fx9)yODYELb>mGh13?m)a-7+tkQ&HW|^8 z%+)MNl@(Fcne0)0mwiMHOcYFK7*y(I&hz4f8V|FcY8}!+En>T_9d(HllZOb@ahF0oYTSOp#i=aw30+JK% z%{@(hVp=1|2jZMKw`o_+&at9tgauoky5Hg(-nE>p$J9z*>xl4g*-3-2Oc67KvCjNk z+)XpEJZ4a)Oek)vB{;No4X@T{m@?fJ@69?T-!Yw&L?g*obQy7%9~>rJOM@~@Fq8dp z&g?tlDc1|$y^x~A)Jq1;do*9-ueolqJqu`khBj`o6Xwx;o_5D|jqaPp8Zxyp%Uw|( z{PWa1j$2IM0!p8yja})EbQfGD-w0e`{mW<#pt5*wFxs*C5pyE+4(Z&$Ksd&TslgbB zrU&4<;2qw%j#6tfN}3sncI1nb&syBW`d5)UO}a^|{b8=H7wCJT9c*MF&X^BP-0AlB z?c7I$c%}){!_kg{+mtJTBYb!kVaAo?_FMeIJ65ndKvn#5J1l?)(9vj`Jkt^D%|0PL z(QPoJy+~K)1?iUVgdQ9~In(dbFX=AG-eHVA?LPgI<(kwxnqo_PAfGcmk=;YdcGQQ= zGrA|TXBg`UWbGx*9k>f)9I4`rt43FJuL$Ezy9Jsq=spp~5olgEIwSgrP>zjv=~pb5 zr2b*F9Z)@e$#zW`7(-gKp75t!kJ!E`loj(i?U?5o-7||dWkPU!0zX*iQi=gXGj&54 z8rHIzrbaiw&3D3mxkp49-5NV8N^))#rvs=Eof9~-1}JHh6CS}^C#h162~%xJUi5RI z`Wd+Rj;2`EgEF?bVUhf0vU_Gqqhw)Z*(#&mEIGn#g)~q!kPXl)W;F9o2 zbxaoZr8rO@fmHQR5Y7;cYBV!en&1)a^-R?oGr~k$l279?<)O|2H_(fAq1{j}86F7W zLSajLCY`W7f2!oZ^Q@xv8ztmD;zJq~Nl!EnJG!L$xUIiUNZfM*@YT5-;Gy=!V;H^z&)pDV4hB2V(;LRqVs zS~Xh06)z;Vbqd(4`Aj-zJ0V9!@ov166cx4}cC9lYxPLLx1gLPo7Fxq+M?*cj4ihy5 z8i@TK*RYYfXsgy+)T6*Weo++a)wzk*YEsASw|YkQ%^)ne52;r`;rFm8&YgQgl+evm zXWF6zn>I+AR9)f{KO%y^NY<~@$k=2D#kNe7On@q*U1mUnZ~|{xC(k@&_$GCXrCHZX zC`U9OWY{fzE`=o!TTS(SdlbW0Qsqa7Gx(lyf=F+7NHVqKHO zEPM2@D8Yq$PIzEhU?zIvJb6cHAciq!t{dhr*h$rB)Wxj|gTvbwaE6U4gafWmY|l8x zmVQsXW;mgS`w*VYW3r5Dk~ZHG6~bF4>DQ`dY%~26I){PF&t0at!4@~x85hXeAZgcY zkat)C3EiU@XZi(j-!V;_7lcQ)&MLkGWZcqhk^$F4`Ac}S`segZnnT)nOMEDI38=@H z=3LY`6NmW7F#3G1QK`J>sM>=l;$g$7OZkQ+Dz6SJy+}O*Y#4Pp$EX}!a9rh18f-yD zG%n3xq26z}I_waF{wd+N?Uo?ug zDuW2ZHllCk_G`#zgTjS67`C~O;{NU8&BIsg{4qKri8fYX_4)bj$v2VTKnO&7Z{E z0ym+@TGRAJPIz4FV5)QdSvIIrKXZ*1gz4x?^{Ly+*Dlj2*sbv*_O_rSX!F3Agr|b* zD%;E{c4Q)NnBY!5%!XELWE|35Q^s3kBKT7&cJwn~Ba|ljsL>^5Oc)g@oJ@8E7O7gT zTIMm;1vf5;ifWlmb)+3l7wR*MmL%LJ)WGf8TI+^0gI3cT1 zHAsgnXY^!eWVmn!YsWexfE%>&2OKxVL^mu%xR7i^zaoGdb%;A`AH-l!VlZcwWK#Q( zeOGHuoZ&cIogDD=g{cJU0pY#sZFS(}^9o)DEY?+qloz^&$2YCoM zdzxZfepm2NZb4a~N1z2FyjSgho_eWfF2Gz`p8yGC%%)pa-4;Alm}M<7LNRUKDSot# zEQ2aZ_AL;bIc{)LXFtl9wN5mvd&qdIHzaPcJkUd((c!|WWM}$bhE5$g7UZqngHjG5%CKld9iW4;WSU$2F0-YDd(ZuG;@RDl`^V6H>uR6u2B{oH?<=#1?_2I-Wb|Q-30hDnMkpt@Hvz)6pa?Q)n3bo7c zfepy2udYi>3ic{&3zjPVDMR&9gmw-F!)i^3*AD0Tl`Oom`*8FJonIe+l>S5ahog_S z#fzmrc|&z@d?y!$;CAA}X`>X+s^vV}veQ@E-yVx4Uo?x4zF8M8RrqENHo#L`_$djr zeo9c~Vu4-BF;IjkeJB28^m@D0HFvT)g4oGHA=q8yklN`2=dVY_`X43l?min9ZI`*_ zOi;tp+6Bls?f|eUaw*#e*wU?8CC$69HlQ5V*%O!8KA7Rw$k+}MBDi@b#f`Z^Hlv@l1#eU9u*U8C4m?dO}6UKVNtw1PgXzQ6ro@_zr5&Aa6i&sXDR zp?Uo^ap`RhC>*aT8N(D36B@eGBkP8;f~zL;yeb#+T*}r9Y%BKiO)HM_4J*%cbgHj% zv}*3MG^!qRRBIk`R4S$U@(OUSq)fFy3~ZaeD$_4G`)X2nSZY3jQsI)nQ0bLB zTj`fIUKdCit`8#*(qQ;rW=v`~J36_&DIVP_NI(eN5D9`VWQ?!}6(#6Lg$o8yVJ*X` zQ2rEBiVDE^1e&li6;`tk5LtM@w}?Ott^Ip(iax@0fc zx@0U-T}jIg?)W9TbJ{Ay8Nb4CN?W5lrEN6Ylh$drq^$mu>0OT|DepQ z;N+X(tIIDsZ>~ORzq$XU`u^!xmG|-wlJ{yK@89Try(~1U*w3;~L8`o~7do_;ZqIvBxI8md2_ENQV!D)$lA@tjIo>k=r$)7%gjO`KzrOYv`GR}d$ zTlB?6FwpR709k_LW&+!+HL9*#e;VHUe9uBzlA5FN|x;=Za(ywUozr6F}OEX1b zS6^oxYHCf8KCKQd94}o1^|q8BSot<(U+aSy>0q6YOkHL?y-q%IBDTKka7IVtFXu)| zod2-?sX7-}{5JbwUE6-yv+|$|GZ*<6B!5j5Y%hD3lGffBUHJKL$?w$Vg~BamFMmsE zZHX!PQ0jJ`b4i&OR`x16wXHd_V5CHRUT|?PKT6(xH2r=<*x4BXy*;jsWF$1U#hw}} zb3I32p38}?>5P~5ReKh3t}JB7)OGI68K`tCawwk2j<0KvD;z9w`eV(-vD}2Z_L%%H z*Mu^!is6Lh?iR0n&filYaxb=U_=;1JTgjK?0}tE$vy631iLo6I0&>;z<(%lsNAU&y zB`z0S{`!=ebmvA$k-9{gz5T|67}>bo0RO}9*_+cZcRIWF>ie|h`wjkQEX6Zf`&#Zq z6wVbh`C-*hXRnni4aZeud@0I_k3Ztq!c4d!N^0I@PdbUfy zUgH+}mAy!kc9(hm)8X=H#-aPofqAB~nUwg4cLMSaWz!k^+HP(xQeRP=+S$+=T{wB! zP!L|zxhwlCBs%zd_x8;1HAZPz%af?w@oT#L@S2CQr$3$;9kAoIbrco z+VK~qk~8aTyW>twS1Etp*?U_o^=WysEnitYBRkku>vz^s{$}5?@fvkXT+a>3N#DlK zn3Kz;6UUEq*NOA}8y|;DnVOOPzkaRLq{ltJ?q29A?~Xq?_4m^8_~*BUX~B;=)@8Zh z=#I`)T^-F#eGaFv!kX>|opCJh+asI0I-8aFv`U!2<;LycGmi4!{ii01=W`D}sgaxv zxcw+NL)6?KnYmg!l5}jSlqrb2RUcF&DeaBVo|jK0A9-7Al14vh_AKzKeH2r;dgarx z^nqgY*_fv5!RN%~eeqd}ikYNC!;Sj1e{?rF%lw-p^R^(i_(ML)k0bLom;-A-Kx5xPch}65>md`FC9KG+@$?&=d*gpywDqW zgY(5TuVXUwbsyu>6g88HiNkf;wB6m!f{d+C+Fa88+aG&pdfa*zc*5a&Uu2HC^4)H! zqHH`V^;7ji+Tl0V+N`}@_59rEd$%Ono7(TYW%;)~T$i){=EIFL_r|UenYf`hT*|NS z-pmVlclWqeBk&()!5$Dh3ns9lUAGI3uaU8+t{4dYeRd}l{I5= zN7Q#ehbGbwUiqiGv_9LIvG(p$-*k`mF7GtoM_sN-{ym+dBO!widHW-VJ50N`eS4yb zj-2ma+#F?mIp!HB=^Jo8;MLRXdf2n~rE|R3yEk-rz~sP6NQC^af|utX{H?o}HqC+$TQsLf1`wHV1mD zMpxEtuzs79_=_f|==H9P6GnGW26%BF2gS5?!`h`WlefEi*5K$&>y|VwzLrsiN08;q zg3AVKR>60dXy&wH4{Bk7=jEcBV7xuG-?eMq&5Bil*nv@Lg)X#G$#Icr6&hy`%gl<{ zjk~Pl3LGe{%IqT1D0GswocTqE^`hw+M<04#EfN9KV%AtCBK0D|A&M@PV=%{&LbL1PjEldQ2iIqH`TPEMv3hUY+AG&;V7R;#&= zd^2M(3B(-bs?d#6swh_nwUXnE5Vyc!pauFB%9X#Y5;*hJ8p@F}Fo?8KT)m!l;wm*l zSMKsE{3(*Y*f0PM8dAQk~~zlN(d3%N+#0@6)e84K{)0DuCZD=-6D z&C?^IZ6uI4{1P4jJb;A)+H5fb6lw%)ngKio>HGoLnrTR0W%HUn>r{I^Mm95=%O_?qGJc|fMq z6tLYi56EMRLc*B~vWSu+r9{A23?T5pAc;i0z^XIR0;A3>L`a5yQ#FkArs8F*lZw6eK{Qx=Gp zLq$OY$T;%$20Tn)z_S$?Z)8+W5IOJ@jfBc2P&|QcNx?$>5~lz`GXdQW=s7fisapUj zw|Rt68}Mr^o@(b_5rspv4f^Exf`Ln04MvKBtwfAK)*s<~EL8&dvYQApgyF=vLC)X~ ztAp$o!j!Ydk_|*4KomkYlx6AIaolF;5}sACLE?ztkqhlaq|{z#pan#c<;NVd>TqGu zira^v-gds1H3X{3&dB4L22vw11}aJRAx&27vK5U`IAj+XK6||zG1kNa3=g_T3Y!EF zl(L_s)M1?1gy1q83={=hahwe{_zs?+H@F>OL9#tCBA@{;+)qdr!XNYrVN7(}GLE%| zGO#MXp-`9=!_9?cB9e#rs)W}FdrE@cpjgLPIrvJ038;^~zyNY%3n6*+;RwN`$=+id z6vtf+HbRTjF%I@Vu131pkYO;N%@~@BGl{!sxh=6MZwnXhGIELo4`<*D5Vk+=OfrpZ zPl9NZXxKCn%_L43IgEkLTM`!b?S$j_`hX#Ph(%`Wfj9{s5rBZ8r6fTZ1+WX9#UQ|+ z&BGsd+v7yMV1qy;?Q&!R@EJ6)IU*?r)$o7~9veICf(8;zR09uLpU4e1wi&iy6G^m; zUBuS4&0#}|TLdTmkU@8U^l>72VwWLqvMbt`feAPTL{S>spN(CHn9u64g^Kmzr`8{S z;RCWB-e9`f&|(s7%56hL9Xp7A+myouy#47ASq2B~R@?7T_s>aqM=p#nDbt^}v3-oT zeT-NFeVYx$OxA4>fpJpUsK|biiMAC`0lOCb@bA$>G5#RE2R0rw?5J S_eY5{(+?)YbDXgwj`KgJNPJlU diff --git a/sound/direct_sound_samples/cries/uncomp_klefki.aif b/sound/direct_sound_samples/cries/uncomp_klefki.aif new file mode 100644 index 0000000000000000000000000000000000000000..4ffa19b5759941c6bf7c21ad2698a8801bdb3382 GIT binary patch literal 25880 zcma&OSCcJEb{>|Q<^8tp&GF~nxn>+@h8Te2kT8m21VDwL2PuLPdZC{5BlI8isDD5O z6?&jZK@k+h;Rt317<=9Er+xSKwih zz`Ct5xIT&Pu}1FWi25cB@*3`vXvU^nG}==VrVT9y(ES%2;su$ zH67R29i^5=WZSfq>Kg61S?IF%{k$@p-WO&~xmFrsPOZ4JST*WI%enNZODipwow>if z_|6ahW&d1W9sKRZAAa{$KW6W4yU_gbTR&eJFaG!MKW`p=`o+K3&z2{jo@Pe-x4+tZ zvUvDMKYKmC{p*KM8|P{AzBk#`&dwtLp#JQ1`q$#w9r<+hzP2vk1=FGSK>Ihsy~=*P zce!u>^z6WDClBS)sQxzlj+cHA{hEhwuf9Fu?&xM=Y0LUMWEuKj<{vIEo=$G{L7w;$%qoiw(G>w4s`g`Z}7?Akjj(ugPQ=(ZmCt1enL zfq!LAn$+)BeiYY1aKpm5nuHgw-K0~#9Q*z+17{QDK{GAWwwz|erD3%CY!Z(aL2V5( z`)-t(n($?~=o{%*!`x|T+S&bRGhSfDNE3)*-8Iz6tln>ZWtEU3Hn(l}FNF_Ddcbwi~5onNjB?+bo}1@4EQJO4pumc#ACU zqdXi8?%J=afqRg+;A#F>_2~Jess{B#VkNcOM@Ud}`LNV@B& zJ8wsH>STGlw)N0$`I@t_VX-7hTzxNUvqd?N1_#u+eV4hj?nGgA)ce742`+*ypZ!=y`k9*zxb!q6)gC&=j zz3+_ud6R6$yP@7)m2x#XbeisSGN_KcdLwV_i9T-Td?6;g#`xx}sjP#s+1$Qc9Dc*g zZljArBhUBR*XC#TUOU~NC;hJ;>{a{eMIKy!aw6={-?PB^hF7K62_N~7%Vx85YOh{E-R5AF3~sAY7VORW@V5uOy+4r)^EFSgz^xTiWC>|HP&gX7dSbLkJ>aCYr6ISkA=EG zPj4=dQ+AwH2cO&i-M+rskuN?z)4p+cJG}@dx1(^Sdl$R2{8);E_ab~Z^3t7Fdb7+} z4j$Y!lXrux_M*;d-|nw1x77DvjrhyQaq+0gc4jU8EGZn?f93^waWuJ8^~)vep5t3A6bzWEme zF?(n)Kbf=gZ+_UXzWqXk;^mGpe^Ld-__NW~!}kxv&BcRX1&23dGtVBrh>~czM|Lj5 zySu|g9%=7SzamE0L(w;)n?;SGpS&HfGBTMxkcCzEh1;^?; zHZw~r?S}EF$t`33bhfw2#Hb!)D7BWFB1nd*l{xE!_n+K`OIzB%eUMKKlbB^gN{_p9 z|JqH)iJgvbA77s&qh^$h7t`Crh8RUEYQr(Q%D5g?q4W!_@@`Hq0^aq`Ww>_N`<$?* zHtIm?t!Z2b3lR~=P0ehy@P!B}ozr&aNm~=NGj)z*lbI$BEJ}H7p zvSOS0Lz6zfm_1rw%c*{9UW6HUtmUqA>sK#_cKSgV`^7>V=TVS3?VZ4`4Ohgx)M>S6 zW+u7igCZIylxC&A3U>=%T`Xsl&%v8F{Q0Ox@Km!TU!OI2P7V1q;);4qz?O(5KUld8msor+$=@t2-at# zwhDP^)KS0IG^sfpKB46oU0;PF_j6+4=1T8%L)I*_w4f`s%%=^d!fd3Ox0(!O1D8>H zh2_tKrs{1z?biO1I$F!xK1!n|hI^sune2#D^?ggmS>LaAO)58^hGL+$=#5L?_1t&0wzFfN$415YX>NOO2P@ZhhqtCY=8L8?p2zKc6I2gY zEx#UTdwT6_OHcRzd$BYqEgc@@zZ=;dM;ZXveFqAeayJFf{ zJ^XcQmC=%M3O%&eH&(B+-YVf%rc-Pa#yTh8X&oUUt3eWQ($9mCRq|dQ?q-Q4JSla zWG*9(maK2>K_1tGUA|7aHNj|S%1 z)%sf>k>I719Uqp~d)7{?zL-z5b}_DE^Ll3%c1~Yu<LkdOzbPe z9F$$sx`A7DWz@TqOU;HgqH`MZBDxA#V=b}KT(;>d7E=Gc-|Iecmzo0|UkBuRP>eIv zKBxMSv{jc6!k*2kZAPVBr~3|E@m@sXvZ0!tTh7eW7)=Kv$heEWVwP?)n)Cg_$&8X3 zeaBhr^&K^;dZ=eQlZ|Dhy{=>X_VrlKdpk7lDmEd+zi9Oxt00*ShD5~m(Cco7S?T(8 zskOa6Ex908%ec{3F1DSmb=3gAiY5x(YR#Vaab(GaGLvX@X_9eM$Wqs)Ri68%DL8hJ zC8|mbD_ZrK_%~CGX)d|l%?oWk2*0lTW8w|)tn4=rNwTcm4i#S8q3V3PNlFj zgX#?iV75lbI#=(wu!YV<0S~DmRF>$yR@>OgvT1Bn<4kf9Kzo>+z_k=zZ@{5)%Fd>h z9Mz(XT0`Sq;Zui~@E&@Z_bf7U!TmlgE2ddgFNJPGSFzThSew=$vN23bTFEt=me87p zCi}8;HP%YfT13yO4*e>HDI8!i%*6)NN{4nGWx|wZgO+f2RI25+-AbmKX6d|Xm_vah zP|7+?p3}9hCM><>jYX;K8$oTSv&Bg4EI}tj^wahGubn zqjkQ)>mumg8nTYzH>`)NQDYZdq!m5Y%@PB{yir#6CL9L154ypcPD-YmIYuOOU26rv zDjhyIg+*zp*TSg4S?vHwkyhi-*pg9LLJhB-WQ`7W??};@J?pf#g-;}aababk|Cx!W z_tIo-17+Q5w3bG%x2>`STHi_-C(YzigMrXV*Sex_ATUN@a0BzwLb|xtb(%7}h2Eg+ zSkKCVy`b>U2%#{v`p$u1<*mcLzDd3M8@JGE z55(@G&h(M30|gq5v=ULr)LsG>aB@El>((rs#>>ofr|zwd-%OW%Z`Qutz+tS0aZlRb zl%1?iQ!klbxUjrEl}+slr;)v6mR=yT5H2ry8;ZfEkkTXWf)<`Fjg=v$C2fSM1si3| z-9EM9GrCD{*o*^1Q<+dL6&2Rja!cSdgmu(PjM`?j==~bF z5|)rTD+&jLm@_z7R-0u5YB)*3r!DjYZ3hj>gEAsb)0>)BX_dv`PV_v?Sn0UQ?v+Wp z=>nrIgR1Ez01#e`s9u==^Tpwk>haSz zhj&)4?cY6qv44K#x5KNQ^N&)?7IgC{qh=PZKKVtkJPeD`&t?Dk{SV4>bMe9Y})cRwCuLnJF^@&tDDW?Dfi}mJ#;Miex2b2 zH+?QQr!&3VTQJ1!FP7A*2fS_2MlgjMe9J_u5!x95{ z^7iw(W2WsTMXkFQX5lgM~Moll3?sZk&A3EnFDY z(cH^eeq0WDQw^Jak+|0n)6;9C(D{HD@Y6b}b=RN#W`{$aXji-Ww3Ml|Lup=5-t1bu z-%RfIV=pVG4cE*o`(Vk8&rY0t_`bh;dj0Xa)0(5~={sY5r|l$9Ug@#h9N*^l+0n|6 zYijq?)nH+V>uC~b-r4clw}ruHd}O%!<@2u|i1j2~@4Xt8k=G(htp~kzwP&4q;{7)^ zzP)hX?RLjG@2=fp#3OzeY`pR2@Io)@9XM8WwKtDH`Nem%H(qA>dJY9*WP{Rj`h5tj z_;As~ntPcT=0SXGxqh{g>m#ojtpsH4+yx|R+&T9A@f8eyvpXB{_~8BFZ8+#^<94h$ zPQi)R?!9~TZeT8V(~(wn9q}}+jAjQLyKADGr!U7%6ZD%XG3=5s=mar7{~!iNZ(F`| zbvpCy*xn3o-FSz~@KunsAKci*atLIqYj*j>s9`UP>-k!*LbbY!q*aDU{Z^-Jf zw0Y^Ae{{Xyq>s){YeH6jxm(kNU8|3;*?T?TF;y;#k6U4{FoiObyv; zgzwCPJk@ifF{(tExnt)79%@jGYJaH>_+;rr(vy=jMmx7K(#Elcie>|tFIz}oWXy)y zft%c$2EupS#70Cg-os@NQ`72nxLWN%$c$+;l$%zs#aLF{LYxafV<1^+y6_yRW60F6 zX+9|$SF37=Yru4PL^H;?gUDm;SCg7<`mu~HhpfHFfBV7Ajp?&<-%9&KTIA1O*mCzG z8ol*yk25Vuo5ktXanXzHL8ePO^PIubU%^;BxVEe%t4}jpwE^|(<)mvFX}dvEmE+v* zdKhji-&uF28C<({)Yv3(8?S3^1b`v$1eAkYHdJ1=>ABw& zp~(@Z>2Ug)Az&Zj2~a_;zV96bBwC4pqw>tPZ6f?bP;2+14oh9v^LAJon#P+U9C*Z> zK{m)u;5LNBw(LzOZb@jgP{v^h-?8n?X&D=g^6{o7zG%Fnw4<~^;A9ZHXaP%@Gm_U?SMVe}F}~KQ26vCw%%%Bw&0TmvVNqGW=pj?uux0}KYy>22m`mGSQx`|QtPW_+ z21zHKT1+SC}KRvp7sy+Ct@y~}(FMse==l$|O z|JA4U7vI0s*9Tep;SEptx4$~#^O}#zuJJ-IEg(qlgU(bd@zuFg#9hJA!VlT7Zcca;{)cA5|wxjptE=mvk zJbV`#!{*An*n`i0SPj_aH_oHj*?;lm%j5R$!+CJEEAI~O9^6L3`zIH0l$^KI zTI12}~OcoyPA^xZKFv#@0Aq)v%|1P%-VWbW`D z+3{Z2MBn=jTybUs4Mng>5# zT+o`AdxfhdwrqeeGjBC1TrSLb+L%1o0iKP{1EZV(vYBKO?sDwv>v3HMq6uN5Qr)hi zv$$-BNRC)Wts9yER4G}Y6MsN2EqkyuQ#h-ou2 z)TU%1ig7d07g`(!DNCitNi(=Ol}pV{CXn+!*_5f^lXs~k;IMU8R^q5)*(M9K$MrL#f zIw^!jII_0ah#wq;sVzmIY6D3?eAK{F0*KLDzv*kkl{rvUjr1H`3^&!d7yuigw04yW z*8m%I?!tqFA^PqM#7o(*2v-{XN^Y=@Hx4i!gv`B*G3JieAH41#IK#g%esuBbpZ;&7 zQS$ur@4OQHAeayIcl!r7M_=twu{X1?0XIGR`SB`$^5*dsIr#0jZvEh5Hy_m5Q4aXi zyElG9ofzNf@qs)v_*KQfm7UBNO?~V-WmbH7;5osY!_CD9y_jaf zS#KR@j-C$Z-3O#z8Bz9#Up-CJeXn%&H^x!%=xV)tG4&IDBgmm1>sPu@4`Rf#(;;w~ z#L;Pp6y6%p+@QT4Erv$HaziG_l7u;+v;ja)q<3Q1a#;!e%7fL>RjV07FAvW4v)t7K z`AdDLIMS2YjK^}g$sv1#h1EHmG8l-atb>us(yRVqkl9u_gFm%%)w21Z9x$fe5!+Ug zXq!6Plteu;o5TGmWxvv$==sKd zw<*6}P08O3oyaej{Pw{KqV99Y7BjDCR?%{DDO;EIMSIXWnTUh|PGLTl39Z*+X*idXUZh6@AqGO&80HfC(AV4KI zS{GWha%$#v9Q)1#oSkq!(re2C{wjkONxdrJCN!1H=Q$W5nvmUEI-%AGCZNdm%(B}A zQvy7HNZ?T$j+J2)t);nnZ8Dg~7Iwuc1KDG8H5*Vq)R_ZJE@M=e zoewe=KrkRbZD;6u2Z#!Ysny7~(+RcURaYu83ox+)qzD@&y3(T1?;vM|R7QG~=EQSkJC|$UdhUf=7aE ztJDDcN^aF|)3&DBAvpxk5RN!tZb||W+Ir|p1>W@<)GVR`W^)@OY}&vv66KNWv=5rB zaft_42+k1bb3Jf&Sr*K(4Xc^Q;YgW?W}1_;^7MB`uP>UJQoe=4m-kx`(+R7h*SSD!73gkJXF%n_tO4d}V#%)o-5t z^Ym?TL+nNOq(SypP&NBaUfLqpL1F3=n{3sS#5%5NfR*T?#d zblHjQ{kQqU%Wl7etCJk`wbuw)kZE6dR%2fyNqho#V?A5!ooGX2T`!xR@oIefD|0a< z57&JK%hU{jK9)Rnnbd*cHrP0hQMSvF$}ZUSd{k4aNFb}lofA#45ps_XM zDj$vf(Yve7vmNcT`tacLfBO7S|KJh$itk=s{MdSSL%O@!EDT&PO+*ts*DhFCA0mqe zIv9J!>3+3y!}a*W^&9hzN^DuSS-Z$*MFZCKA2{(mgEHjVhO{m!VY^de0h9Wnx8v^k45mWU$4T z2)ebduA&%%iiBgV1CC~3fLOHFJTuoJmsSppQQEWL`NjPE3;NZk?eS97%Ta#vK6_dZ zelnU~e{^{yuXk=oXa2``VG|di^Z-8f=Lqum+F;!nd?=AFgCEi7V4~El0tpj|OI?TF zYUp9sCH~>d)u*h!K(6ETt8v%rFNpoUB3=FZRC5e}6mMPzqv1}!0?Dm?2z?WS8Q=_h zca=PO>kSSsF28*~kp9XxuAFw)6lIVpCKjV(iS3kEneD4;;8?H7dMQK3nOA zWi(P4jMrHFa1(>Q$D#MU4U#*%K`!qmJ$Dn!I9YYK_TyN;eIn|*8|!et?X_Y0JaLPY z8TfQzP-Lq|NLSyCTE9S=W?BxxKjV z{^UJlaW$-6msMF$Sw4=!tQ0S7WAZ>OW=yxcRCBCp++K9!=wNMMbqKk4vR1SnUn7Zd z7;CSQemUK^SvjJFSvONbr*RI7L36NT)4PL>Q?y3`%i}bkkR6&fJ<=l!Z>QV4p-KAi z)wkMg^eQL~g!r84S8#w2j;@y~~3oHs*sExgu|4(6G<^+$ou91!pJkC)V|o z_fgyI$Ht26Uk^CqV<_I{@Z9JC^d8me>4jI`op8h7u%e-s-y+MJjhB&e{^{B1rrpUw z!O+(u!YxD^nr_0ENFUt=B0jhsnMm`~Nj#y1&K&ScGmkX`}Ypq@3Nd-0C+qkyD#6C)l=)4R%PdDHVr=PvgPVs=pRhUDqpve^l~exqE+tB z9(YDLZ`#DR*uHs$2>u142H=5n$v_k@TLbAOyT(pQjk#n@p zBg+5{*jeuthF(M)kcFjiPBv?r+oRHAHGBsIfEBVHB9pCd46EAW#)b?!BjR~m*iL66 zQeF{81B8CHc?UFWicERs5Z)rhiCX4;9)gBY@6}g^aA3zof)FKK1x4#CAkNH?b+kG| z)D4#iRl@>lEQ|Dr=US+?9tpp;w~;Gla7HO(Ex<5juoUp+Ai6**1$Y!f9z91|kr9uA z4UR-zt>AjtQ-i`SPy{k0S~UPy1UXF;fe=^{cp4lJ!CJs^P;I=o;8kcKCsT&a0}dc! zB{(b+iTob95CSlvV|XxYb);YI47sBU+z~@V7N~OyTay%IFCAgDM6Ob$VQZDjMdG)o z2)jE*x{e`$N9KrF%3+e_Fd`)nCDPCc43S(k##e*d0J?y(}PxJU{$G!`KA^8(FRc} zoN^>RHN?MKBRh)&{*XW)lofNU+Ngw&K%}7s6lWJotEfu1m`$1YmXPVt;IWkONC$ES)Gd@~OVcCxMx~J0ewF0OntED@cyP?{hB^A93ghe<#&~ZpggRTKt2IeNQa;5^!nut4K>oh7-k<5nt zNl*bIOpKJGb*;u|sM#P{+`G62ys`>Vh{}>aJ0(iGpF9)uQJpg^Tj-fa60d%i$ zyJ3=r*+J9UOVAgesA^~$Q4eGdOSl;VGGrCVFmdZB zblqz_Nx{4C-9l<2st7_vB03=1En=t~M9{XG(9)AeisZZ1+ieM=n9`uw#ZVB!q@d5h z3m&fF==D5k!NW2t(3cQ`z&Qj0-)K-(XrV*I)o7->1ZFOn1m*?;4QO(h1n}e#ZX|v$ zfI_xO0JrFflZ^4QNb}eHIOTUpbJ`IQ+fdghp^B_kr326=qH7wo>mE9rl?#& zB8`GR3J!+KLwCs1a~A*yC=_6aLZpKfY@ytC+NSZLUZDb+?o|?T9V}Yob1eo`0+Nv; zW*|@NT02ddk7{m;iA)vaY zU4mW$u1DVtIL$*^a38sBrxL`22$Tn4 z4G5eyEO%*vZDbj}%8OP3s~X3urPrm>)jA_Hb1*hLEyIRyqQcF`;8P9-xQmjcuF$|` zL2jrAg#@%AsB8vm2vU_C4ms6FID#9|N()Lr zC!!v?qA@+Sh_`VYKM89;_G*BPWw`Mwe+8XU z1aNC@kcN=2R4g5ES~MMY)@mH#Y>-|q;8JbEG|aptDhKO9sWm8>$f9a%;-C(C4RlOU zNE^EfN+%7IFb%RGjglan0F4QAD~n1K8cXL6Y%&N@It&D>yxNJw($2<(7Ecp*HAU<_ zF5Mj7E~xpSB!l2#Kzjj&1sRSTxzia)uG^bY?j(cCUL$&|{Z#Qy?Fw;iWh#m(D5qTn z9T+tJYMcS5&VnRLF+;UK54m2tjR6M-1SX&|K#q`~2%?iZXD)bp=jZ@D$*mYg*rhA9)R&-6Kz6R47UI# zw~FFX3bK+8rSG#MtxbP;^^3iK==>iazdcB<$G7~y(QZS2d-Sq0*H3qDC*^vaRu)WT z5@{IE^*FZO4LQC8QyiOQy!XxmdrbE*)5Y8|-%=wb^jpjW*qQIqqOS=R@Rw>)wmo z=z0g#w6Z!~L~I$j>pk%K@VlgLYRhzzWrsNs4c$Pf+@cRw*19N@xb~m}j1}aEBEv0u zY^wtI)uVVw;*db%bT@&O@A@!pHpp9hCQ4LXV_|~^X}}vr2B@S`cVg4X9#u%mQh|yD zhTL~Y8&EuCvk6d1syK`Uju#kvz$0tD@IlIUfPldTg-5B?78C=lBwQtKc19ld_5xc3 zPN`kNSWyCN>fL;Ic0T*qzoXHsY4GOb8)NS((*N@L5B{AzxO@23=*c@W{_;Qjjp^I3 z9>3;OfBwV297Ml7ZZ1D*&F_41l%A8}JJf;<2fzH`OM7(1zWwVDvevmW2eYt-r83f! z-#nie!^`>i&Zdd5*MN6S*JoPXAJyj08MqYxm&_U&pHS%6{?li=+>EgZ31Obp$gYtHIq9?{_p<7?*0F=I=guM!{~?oqF67CBYQxz8+tK4(69K#&hxPKy*% z@pK%T{?*ZrlqbvQi;MSd{PEGF`C0z@u}w!0Uk-nLc=e6*Z{8hWJbOh}uK9_nfxtA{ zZ|pbai^uv0+0M^S*C5G5cqLltx*6GNLI>ygncY<@Ig! z528WdGnz9_)@P1n{S^@iQieC*clWWihy1oUAbb_ z$#);!_7YW1yZJDx%G2K-e>sHK_TmShO;YZH;toG(WNd!;V$gKw_TuB#*o3<^LLFe2 zNX5osT^zRa(K>AF+%$R*8=&9#WC%Z?(8I;UF0~e8B$jl z6X;#*RB#r>h=QHmBE3S~vr!tDEP+QiI|6%`#Z=K!bq9fZKi(kHmBYIc{70b@uM9pK z&_NymO+tXk4H7#9vJ4JYhiw`qptYd9z|1^k^m@3}UDUP0tH7RV)h-XS2({K+;-krp z+RrJV)h-E`o`G}=`mLqWXcYiiGm!v508&&^1f=oxmgWvzF>Xliac);qQA!YHX-hC% zY@~=SnrRNa3Bwa`M-V|1hR7ToZ=rD~0PPf@CV0?ryy2X3VpST~nGdQF;*?S|%niIT zP(u*Ebgc*7%7L=O-~nrb0ixVQlEd^Z#KAxqRNWMEnVMVD(q(W-G@du0wwEB`t%XYv zh=RN+GzoA3IWyEKvEImfVBNU`ifijQi2@r;6`Ud=>X zN>~IC6CBWu1;t1@+d?G}tSwwu2EX1y5txcdgn=NTK=dTx8+Ntsb4(L5Rrs<1a4O)g zgChbL0$4+ifRj*^ijY)8Y8?z7AAIpnk7kCY*Nxi;3&W{~qAuZfF$xmp+Yja;Ne{c7 z|EoJZUdwiOoX#EBmuKZ}Zm#%2>COa#Hdjv1#yN1yzMZsu$t-6LC)XojmziL`8TxJ5 zxMizZ9ibU42S%j%%cGeIrZnX>LaqvteVZA{aaCE}06Yxv{2Lc!a-`WnSRa&b3Niu; zwoHUd;9xZ!%7#$7Jg8-EDJpyf(A%p#Ug?HkLPXTc7!;%ilnx;TM8O22J?SdX?DnKG zf_G15Qxx9oyKa|ans_+E~9$MRmfQ$3so-TM&se!6Pg)N>p= z%fscMM15|H!^A^DA}#bP*Tj!E=gZbvJ)QHTW6JA8+iKAHkFgw*d_pd`f?0HeGb8F4S0U2cLL?RhcASXA*Dclk)lOqb_ZO~ zP0Sj!ZXb@d0Z=p}Voz!1b(Ak#F?t;RxlY1JsY$A^Zi9)Buc2`+`lnblaX;Ve*IzYlHJw* z^|guEfcZOj)wLv%c8Ed~ezQ04jcSj_(lE6`)KaD;s9?}PkgK{^+ADwM><}afM2f>Ya`+yjqJ^S9z%g?m)>bWLUE#D+?T?8b)UblmnL zzQKM2XA@+PrrMN!8Oj|es^l_3(aAV4?LyT__+12jD^pl^7%>}xEkH-)5Gaz{*pw!$ z5pYWIf-IoK3|Tkulz?~wUtvhy0<3`m6G$}d1`2pI90J40Lp}^ZFu=)H=AF*HPPZu_ z{W@=16WS;cF6!DaJlz5++At5O0&q33D^Ry&z?8SZ`hj#3z)dK(Kp6};aOi@HK=Ex3 zr~^fm3NR2x4R{kxf4+TcsZ=%6w1Qy9uF(&9$sH(vW2nP~mRe)~j6ewN5 z$N}twl!XE)>}OmHR1VcxL?SWIP+*}hNA(T`M8G>JAz`6F3ULx38(e@292f>*Yd{Z? z!-tkaB`5)~O%Ni%JA+TcfbgQ=v$iP#bql59s`?%MWJnr-)q+L<{)2|Az(AaWN`!$# zJrcGdt5Cp-3=X(H7 zC=S9>fMN&!gkuxnF2Y;@grJOeU=%}O;bp1pIBbm$381jJa7HO`QXOb2SNa&UWT5Ox ztKnNhP#|3$2B>btTI1#hP@tk$;~sc+ut-Q8xiA0_6NnfbRZwM+Wdi5}nZhQ8F+(*O ziuORNU;^+V&_bknV9`{C90Ur+4Hah&I)o)ET6h=AK2!kc?6$Xft%EbrsP)52$qo#4 z1n-z}h%I(1(rFC#16{&GF~C{)(i9IPs8NmwloUnA0#d3ApnOWok;3vIHYg^<9tMzy z^-y^YX~WaTQw5O0N*Ui0j;R1#jN&oo#}Sekpx6Q{YQWn8XaJxNmvqS1DQ}uA|(k=xq~NbqC%n2{RC{;C!R7uauZ^P=gpU`3(Yq9&|;(%PdHN zm@@cuSal1KI0~;3abc4KvBt)NMZ&iWfryP+??IsfzKqENVx?X+a3j!Y0OQ=EmJ)gc z!i55OY2ix(u$air!eN(cOF`3YArPxuR{-A(SZ4}hTBbSY4!G2Ixe~OiaJSmVf zV80FWW>r`sCc(85hWq1JZ +I9QXQ7S}5(&w$I#4uG2?uHt zb}0@3zwA*pu2KQ`$}P21kwQc#p%Ac97>e1|`eF}b4luV6NF0LxQ)eNBh#0US zxF14|quXc=>k18tov)NSc0NUnfO$qcm?*{EQODH@hz`^=Q#t|=xJsHr=AlZIM#Tf~ z4Fq-%dJPq&p%G9;IiztR^k^7|(FG(m zp!HEojDy%<=#bLBIHndJ5G6tf6nCO2T!K(oBOWr)itPq&ATcp-pqxRU!=u^enNj*$ zbhd+jK?n01g%4mEnye8`4$dCFv&`*eQ6ZlO&JAjIYovqWBJ~6?KEB0FMba90To7_q zyJ_GUqDrW*7DMZ>=WzsMM^}-w>CkITkXjgMHH-!mq_hMi5&IcA2TUc}#BK(U5!5m0 zOK>9qfvXZ~tcw~vDnBu=a6mOIJ*GoVr?Pwa$Djl|JPuQ-v>&t?)(7i=SyOpnr7>$< z21(djOgs~cN-csSx1sP^1?in8kk(cHEhbde%R;{i2$!-FTZA2k5WNKTPl*AhUDfzX zRVKXEE4X@_kXM^asWGLhwx$&gDT#niMNc8Vs`DUwDrxGGS5%e0*F3hN>Pu2 zPT-+!5B##Hb#tG`~`zYAG>zwSCa8@*d#xKrsMmzy}ObEf4ZFDrt_)5B32(C3F-iY|un; zHyBu84MM-bfx<4tP+@N{DJW7#(oe_wVBJv~Ce{36^{}!U9DVS%p)@c=EFshoR4aBI zxD-k`gXT~J;zd$J`5G7#@`0!|#Mp7L7|>7etFGzl^Sl029-NHM5kjha?W z7?Ay~;X>LDcrSb>Y*q9I&;vtZf*~Sc6cu`(!~Lo_ECUj+u)uhu+(GDDj2+Vs1#Du$ zm3xM2V|4%%0qIt&hacr~Kr>*Ip(#kkRgp0qCTnQ8NLT&jA3E~@9L9;n~@r>kkWAD?Op|F<8u&E6ltjp|x;O0|JkHFw*GY^mf^+wip;kq8=>9gS3-x@}0J@5;j3ve`SYRkSY-VV$?ab~s- z_@jEE8pn}s`;bPg0wxG12BHS7bHBZC1$wMn!%g?|r<%l-YQ~}eluA>(8-3l1-?kBS zK+Od1!W`jd>;XJ{`)t*9_33^nYMi(gFZVrGT~t44R6R|d##?o{(#YGLLUlPhsrshg-v7s6wMg3^CE)0YnxE}l-j5Vl zs;;Yhaq7M;wG23n@#D?*23)IHQxK}{G^!3LUf6w9sxIByAlPRpM70!3uGEC60mAgC zUMW3}&+4o?2&I74Qj?)10R2>dws&D>)HJCfptowI3bs)m^!5rR#?Z>>0yq-NEa6(@ zYL!oedYya6OKlrW>2`iphoQ{To*LG6TDHrk296)NR@--5MThQT!nfKFmqN18B{fnt zV;BS)P>YQRZTqKOW2`7V51fFeP$GivsPJ`rp=t;J)DkE$fb~E#h~L%et-(~|xtC~k z1d^sUqMFO?#Hcshp56cXPdcs^Y&$-@;0MibAF+L}rVxj=4XNvJZhN)*qpn3`+u!X4 z_uW&M-5>w@vwHdZs_lz9dw=Zyy8F}HBlox7w}_MIIu38|Rx|Whf*#U%#k> zs>j>o+dH-`ssmrQynUw{*mh|91T{=`8h^I0_p-XZUVXmr%=U~DV_XBNxWD-CN3dNL zB_rza*QfA7U5uBnJEY#;-+%_x^OYQ9$Ef#TKlxr|;DGwY|F3&;|6zNJ61D%>_4_$h z8fDut+@S7M6R^DuN4I|CeV^1B_582Lsy?W;R2T10sk7S_)F$7)x$o82V^uHr@_=(+ z-?F`Kd*AlJ_ON=!{S&us+&A>~v$uDu4&svS`}^1X=iIAXoZTuzrKeOw>i7SB!Clx7 z+dZIe-9A;F|9`qJm*ggbAc(T$S}a(?Eg*t0_g|CmW!6a8mb$C+S3NDwINY0>yFDwf zktZI<7l03qF~^0FlMlct@yrR9gYG5oyW^B7@Au4k;Bk8CF?EU8f`edSMOjney;-cikqtN)EeA5g`vxH;Ok2e5~Paj+lLLcoB&2e6J3? zQ@;7}%w<9X3~JP;F;r7tUFdoJS{tCQxfl1Q(u1wdp2kR&-zM5mq2kf#Sl5rE+X8|B z5ZoELETTj;mHMhX1_65;XA=aMV&umJA!;hD@lnR@B)=Fy?u&aGPNy7Jv-`vY{i zh~A#Wug4)S;lsGee4VzO+C7E!dsdsHw0WzZI$dbQw9wR)g{)W|&^qhdU@%~@E^y@e zDnHSBy-TrYZRZYSFX`qbGI0|*FRyp8DXJuWNc1rf&<6|7`stJv4~+bJ57%iosb^a@ zobQ;)oVb^}^W-JUZ2lrd4Dkw91t?Xb>^wN+nfQrNHK3SyC9=iahGRGoqq1sEDLsvr zwu$65D*EYq*{lV`kpMVbY>i~=m9tOF zv?%PCLL4@R`mH{pT-ebm>hGm(jH?wBiml?J5)>UFND%Ed5R2w?g)^QTn%}Frfrp{;M=eHRkk&T^dRdxHN}a0BQYBrcK}BC&kEz#-xcz9Aw{V8DQd%?c za{6ynFr?yc_vIuNH=?%)FQBR2MY9pE6?#pLH$w=eB869HuGgTU3uQ&_Ly=JVn?k`P zr#+W)O!O>iSve|*o4RlWtih25>rTgEC41D%DD(^zy9Oe%)bq>~qMMCdEK>Z}=yGg3 i*MBup4TPQbtz&za$oTWykMBwU`tkSI?~gxUzWf7s#X;Ku literal 0 HcmV?d00001 From 48bf1ab98dc5e540b9674b087be25548c292d3f7 Mon Sep 17 00:00:00 2001 From: sphericalice Date: Tue, 4 Jan 2022 13:46:46 +0000 Subject: [PATCH 311/417] Use SPECIES_NONE and ITEM_NONE in battle_tower.c --- src/battle_tower.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/battle_tower.c b/src/battle_tower.c index d1c95285b3..b747a3dc0d 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1006,7 +1006,7 @@ static bool8 ChooseSpecialBattleTowerTrainer(void) validMons = 0; for (j = 0; j < MAX_FRONTIER_PARTY_SIZE; j++) { - if (gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species != 0 + if (gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species != SPECIES_NONE && gSaveBlock2Ptr->frontier.towerRecords[i].party[j].level <= GetFrontierEnemyMonLevel(lvlMode)) validMons++; } @@ -1664,7 +1664,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) // Record mixed player. for (j = 0, i = firstMonId; i < firstMonId + monCount; j++, i++) { - if (gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].species != 0 + if (gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].species != SPECIES_NONE && gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j].level <= level) { CreateBattleTowerMon_HandleLevel(&gEnemyParty[i], &gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[j], FALSE); @@ -1706,7 +1706,7 @@ static void FillTrainerParty(u16 trainerId, u8 firstMonId, u8 monCount) // Ensure this Pokemon's held item isn't a duplicate. for (j = 0; j < i + firstMonId; j++) { - if (GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) != 0 + if (GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) != ITEM_NONE && GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) == gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]) break; } @@ -2244,7 +2244,7 @@ static void GetRecordMixFriendMultiPartnerParty(u16 trainerId) if (gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].species != species1 && gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].species != species2 && gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].level <= GetFrontierEnemyMonLevel(lvlMode) - && gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].species != 0) + && gSaveBlock2Ptr->frontier.towerRecords[trainerId - TRAINER_RECORD_MIXING_FRIEND].party[i].species != SPECIES_NONE) { validSpecies[count] = i; count++; @@ -2383,7 +2383,7 @@ static void LoadMultiPartnerCandidatesData(void) if (species1 != gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species && species2 != gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species && gSaveBlock2Ptr->frontier.towerRecords[i].party[j].level <= GetFrontierEnemyMonLevel(lvlMode) - && gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species != 0) + && gSaveBlock2Ptr->frontier.towerRecords[i].party[j].species != SPECIES_NONE) { k++; } @@ -3410,7 +3410,7 @@ static void FillTentTrainerParty_(u16 trainerId, u8 firstMonId, u8 monCount) // Ensure this Pokemon's held item isn't a duplicate. for (j = 0; j < i + firstMonId; j++) { - if (GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) != 0 + if (GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) != ITEM_NONE && GetMonData(&gEnemyParty[j], MON_DATA_HELD_ITEM, NULL) == gBattleFrontierHeldItems[gFacilityTrainerMons[monId].itemTableId]) break; } From ce55e58ad83e57b7e1fde7eeb3c3c94365fe0f12 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 4 Jan 2022 10:09:42 -0500 Subject: [PATCH 312/417] Misc cleanup --- asm/macros/event.inc | 5 +-- data/script_cmd_table.inc | 12 +++--- include/bike.h | 10 ++--- src/bike.c | 26 ++++++------ src/field_control_avatar.c | 2 +- src/field_player_avatar.c | 2 +- src/field_tasks.c | 2 +- src/region_map.c | 37 +++++++++-------- src/rotating_gate.c | 12 ++---- src/scrcmd.c | 12 +++--- src/wallclock.c | 84 ++++++++++++++++---------------------- 11 files changed, 95 insertions(+), 109 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 28f010ef28..8d65f602de 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -604,9 +604,8 @@ .endm @ Blocks script execution until the movements being applied to the specified (localId) object finish. - @ If the specified object is 0, then the command will block script execution until all objects - @ affected by applymovement finish their movements. If the specified object is not currently being - @ manipulated with applymovement, then this command does nothing. + @ If localId is 0, then the id of the last-moved object will be used instead. If the specified object + @ is not currently being manipulated with applymovement, then this command does nothing. @ If no map is specified, then the current map is used. .macro waitmovement localId:req, map .ifb \map diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index 48ec7918a4..51b7f966e4 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -80,16 +80,16 @@ gScriptCmdTable:: .4byte ScrCmd_checkdecor @ 0x4d .4byte ScrCmd_checkdecorspace @ 0x4e .4byte ScrCmd_applymovement @ 0x4f - .4byte ScrCmd_applymovement_at @ 0x50 + .4byte ScrCmd_applymovementat @ 0x50 .4byte ScrCmd_waitmovement @ 0x51 - .4byte ScrCmd_waitmovement_at @ 0x52 + .4byte ScrCmd_waitmovementat @ 0x52 .4byte ScrCmd_removeobject @ 0x53 - .4byte ScrCmd_removeobject_at @ 0x54 + .4byte ScrCmd_removeobjectat @ 0x54 .4byte ScrCmd_addobject @ 0x55 - .4byte ScrCmd_addobject_at @ 0x56 + .4byte ScrCmd_addobjectat @ 0x56 .4byte ScrCmd_setobjectxy @ 0x57 - .4byte ScrCmd_showobject_at @ 0x58 - .4byte ScrCmd_hideobject_at @ 0x59 + .4byte ScrCmd_showobjectat @ 0x58 + .4byte ScrCmd_hideobjectat @ 0x59 .4byte ScrCmd_faceplayer @ 0x5a .4byte ScrCmd_turnobject @ 0x5b .4byte ScrCmd_trainerbattle @ 0x5c diff --git a/include/bike.h b/include/bike.h index afe773d42e..00f11aefe3 100644 --- a/include/bike.h +++ b/include/bike.h @@ -17,11 +17,11 @@ struct BikeHistoryInputInfo // Player speeds enum { - BIKE_SPEED_STANDING, - BIKE_SPEED_NORMAL, - BIKE_SPEED_FAST, - BIKE_SPEED_FASTER, - BIKE_SPEED_FASTEST, + PLAYER_SPEED_STANDING, + PLAYER_SPEED_NORMAL, + PLAYER_SPEED_FAST, + PLAYER_SPEED_FASTER, + PLAYER_SPEED_FASTEST, }; // mach bike transitions enum diff --git a/src/bike.c b/src/bike.c index 20166392e9..c99d514cb6 100644 --- a/src/bike.c +++ b/src/bike.c @@ -108,7 +108,7 @@ static u8 (*const sAcroBikeInputHandlers[])(u8 *, u16, u16) = }; // used with bikeFrameCounter from mach bike -static const u16 sMachBikeSpeeds[] = {BIKE_SPEED_NORMAL, BIKE_SPEED_FAST, BIKE_SPEED_FASTEST}; +static const u16 sMachBikeSpeeds[] = {PLAYER_SPEED_NORMAL, PLAYER_SPEED_FAST, PLAYER_SPEED_FASTEST}; // this is a list of timers to compare against later, terminated with 0. the only timer being compared against is 4 frames in this list. static const u8 sAcroBikeJumpTimerList[] = {4, 0}; @@ -147,7 +147,7 @@ static u8 GetMachBikeTransition(u8 *dirTraveling) if (*dirTraveling == 0) { *dirTraveling = direction; // update the direction, since below we either faced a direction or we started moving. - if (gPlayerAvatar.bikeSpeed == BIKE_SPEED_STANDING) + if (gPlayerAvatar.bikeSpeed == PLAYER_SPEED_STANDING) { gPlayerAvatar.runningState = NOT_MOVING; return MACH_TRANS_FACE_DIRECTION; @@ -159,7 +159,7 @@ static u8 GetMachBikeTransition(u8 *dirTraveling) // we need to check if the last traveled direction changed from the new direction as well as ensuring that we dont update the state while the player is moving: see the else check. if (*dirTraveling != direction && gPlayerAvatar.runningState != MOVING) { - if (gPlayerAvatar.bikeSpeed != BIKE_SPEED_STANDING) + if (gPlayerAvatar.bikeSpeed != PLAYER_SPEED_STANDING) { *dirTraveling = direction; // implement the new direction gPlayerAvatar.runningState = MOVING; @@ -246,7 +246,7 @@ static void MachBikeTransition_TrySlowDown(u8 direction) { u8 collision; - if (gPlayerAvatar.bikeSpeed != BIKE_SPEED_STANDING) + if (gPlayerAvatar.bikeSpeed != PLAYER_SPEED_STANDING) gPlayerAvatar.bikeFrameCounter = --gPlayerAvatar.bikeSpeed; collision = GetBikeCollision(direction); @@ -306,7 +306,7 @@ static u8 AcroBikeHandleInputNormal(u8 *newDirection, u16 newKeys, u16 heldKeys) return ACRO_TRANS_FACE_DIRECTION; } } - if (*newDirection == direction && (heldKeys & B_BUTTON) && gPlayerAvatar.bikeSpeed == BIKE_SPEED_STANDING) + if (*newDirection == direction && (heldKeys & B_BUTTON) && gPlayerAvatar.bikeSpeed == PLAYER_SPEED_STANDING) { gPlayerAvatar.bikeSpeed++; gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_MOVING; @@ -342,7 +342,7 @@ static u8 AcroBikeHandleInputTurning(u8 *newDirection, u16 newKeys, u16 heldKeys if (*newDirection == AcroBike_GetJumpDirection()) { Bike_SetBikeStill(); // Bike_SetBikeStill sets speed to standing, but the next line immediately overrides it. could have just reset acroBikeState to 0 here instead of wasting a jump. - gPlayerAvatar.bikeSpeed = BIKE_SPEED_NORMAL; + gPlayerAvatar.bikeSpeed = PLAYER_SPEED_NORMAL; if (*newDirection == GetOppositeDirection(direction)) { // do a turn jump. @@ -775,7 +775,7 @@ static void AcroBike_TryHistoryUpdate(u16 newKeys, u16 heldKeys) // newKeys is u else { Bike_UpdateDirTimerHistory(direction); - gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING; + gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING; } direction = heldKeys & (A_BUTTON | B_BUTTON | SELECT_BUTTON | START_BUTTON); // directions is reused for some reason. @@ -787,7 +787,7 @@ static void AcroBike_TryHistoryUpdate(u16 newKeys, u16 heldKeys) // newKeys is u else { Bike_UpdateABStartSelectHistory(direction); - gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING; + gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING; } } @@ -994,7 +994,7 @@ void BikeClearState(int newDirHistory, int newAbStartHistory) gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL; gPlayerAvatar.newDirBackup = DIR_NONE; gPlayerAvatar.bikeFrameCounter = 0; - gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING; + gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING; gPlayerAvatar.directionHistory = newDirHistory; gPlayerAvatar.abStartSelectHistory = newAbStartHistory; @@ -1014,7 +1014,7 @@ void Bike_UpdateBikeCounterSpeed(u8 counter) static void Bike_SetBikeStill(void) { gPlayerAvatar.bikeFrameCounter = 0; - gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING; + gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING; } s16 GetPlayerSpeed(void) @@ -1027,11 +1027,11 @@ s16 GetPlayerSpeed(void) if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_MACH_BIKE) return machSpeeds[gPlayerAvatar.bikeFrameCounter]; else if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_ACRO_BIKE) - return BIKE_SPEED_FASTER; + return PLAYER_SPEED_FASTER; else if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_SURFING | PLAYER_AVATAR_FLAG_DASH)) - return BIKE_SPEED_FAST; + return PLAYER_SPEED_FAST; else - return BIKE_SPEED_NORMAL; + return PLAYER_SPEED_NORMAL; } void Bike_HandleBumpySlopeJump(void) diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 8d6b564d25..b5fcfdadfd 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -94,7 +94,7 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys) if ((tileTransitionState == T_TILE_CENTER && forcedMove == FALSE) || tileTransitionState == T_NOT_MOVING) { - if (GetPlayerSpeed() != 4) + if (GetPlayerSpeed() != PLAYER_SPEED_FASTEST) { if (newKeys & START_BUTTON) input->pressedStartButton = TRUE; diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 6cf468b3e0..a5703b8bdb 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -557,7 +557,7 @@ static bool8 ForcedMovement_MuddySlope(void) { struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; - if (playerObjEvent->movementDirection != DIR_NORTH || GetPlayerSpeed() <= 3) + if (playerObjEvent->movementDirection != DIR_NORTH || GetPlayerSpeed() < PLAYER_SPEED_FASTEST) { Bike_UpdateBikeCounterSpeed(0); playerObjEvent->facingDirectionLocked = TRUE; diff --git a/src/field_tasks.c b/src/field_tasks.c index 760d853693..244036471a 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -820,7 +820,7 @@ static void CrackedFloorPerStepCallback(u8 taskId) tPrevY = y; if (MetatileBehavior_IsCrackedFloor(behavior)) { - if (GetPlayerSpeed() != BIKE_SPEED_FASTEST) + if (GetPlayerSpeed() != PLAYER_SPEED_FASTEST) VarSet(VAR_ICE_STEP_COUNT, 0); // this var does double duty if (tFloor1Delay == 0) diff --git a/src/region_map.c b/src/region_map.c index 0dc9026742..09e2d69bf2 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1516,28 +1516,26 @@ static void UnhideRegionMapPlayerIcon(void) } } +#define sY data[0] +#define sX data[1] +#define sVisible data[2] +#define sTimer data[7] + static void SpriteCB_PlayerIconMapZoomed(struct Sprite *sprite) { sprite->x2 = -2 * gRegionMap->scrollX; sprite->y2 = -2 * gRegionMap->scrollY; - sprite->data[0] = sprite->y + sprite->y2 + sprite->centerToCornerVecY; - sprite->data[1] = sprite->x + sprite->x2 + sprite->centerToCornerVecX; - if (sprite->data[0] < -8 || sprite->data[0] > 0xa8 || sprite->data[1] < -8 || sprite->data[1] > 0xf8) - { - sprite->data[2] = FALSE; - } + sprite->sY = sprite->y + sprite->y2 + sprite->centerToCornerVecY; + sprite->sX = sprite->x + sprite->x2 + sprite->centerToCornerVecX; + if (sprite->sY < -8 || sprite->sY > DISPLAY_HEIGHT + 8 || sprite->sX < -8 || sprite->sX > DISPLAY_WIDTH + 8) + sprite->sVisible = FALSE; else - { - sprite->data[2] = TRUE; - } - if (sprite->data[2] == TRUE) - { + sprite->sVisible = TRUE; + + if (sprite->sVisible == TRUE) SpriteCB_PlayerIcon(sprite); - } else - { sprite->invisible = TRUE; - } } static void SpriteCB_PlayerIconMapFull(struct Sprite *sprite) @@ -1549,9 +1547,9 @@ static void SpriteCB_PlayerIcon(struct Sprite *sprite) { if (gRegionMap->blinkPlayerIcon) { - if (++sprite->data[7] > 16) + if (++sprite->sTimer > 16) { - sprite->data[7] = 0; + sprite->sTimer = 0; sprite->invisible = sprite->invisible ? FALSE : TRUE; } } @@ -1567,6 +1565,11 @@ void TrySetPlayerIconBlink(void) gRegionMap->blinkPlayerIcon = TRUE; } +#undef sY +#undef sX +#undef sVisible +#undef sTimer + u8 *GetMapName(u8 *dest, u16 regionMapId, u16 padLength) { u8 *str; @@ -1709,7 +1712,7 @@ void CB2_OpenFlyMap(void) gMain.state++; break; case 7: - LoadPalette(sRegionMapFramePal, 0x10, 0x20); + LoadPalette(sRegionMapFramePal, 0x10, sizeof(sRegionMapFramePal)); PutWindowTilemap(2); FillWindowPixelBuffer(2, PIXEL_FILL(0)); AddTextPrinterParameterized(2, FONT_NORMAL, gText_FlyToWhere, 0, 1, 0, NULL); diff --git a/src/rotating_gate.c b/src/rotating_gate.c index 23fbb3e1d6..3f73698a87 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -684,13 +684,11 @@ static void RotatingGate_LoadPuzzleConfig(void) { case PUZZLE_FORTREE_CITY_GYM: gRotatingGate_PuzzleConfig = sRotatingGate_FortreePuzzleConfig; - gRotatingGate_PuzzleCount = - sizeof(sRotatingGate_FortreePuzzleConfig) / sizeof(struct RotatingGatePuzzle); + gRotatingGate_PuzzleCount = ARRAY_COUNT(sRotatingGate_FortreePuzzleConfig); break; case PUZZLE_ROUTE110_TRICK_HOUSE_PUZZLE6: gRotatingGate_PuzzleConfig = sRotatingGate_TrickHousePuzzleConfig; - gRotatingGate_PuzzleCount = - sizeof(sRotatingGate_TrickHousePuzzleConfig) / sizeof(struct RotatingGatePuzzle); + gRotatingGate_PuzzleCount = ARRAY_COUNT(sRotatingGate_TrickHousePuzzleConfig); break; case PUZZLE_NONE: default: @@ -698,9 +696,7 @@ static void RotatingGate_LoadPuzzleConfig(void) } for (i = 0; i < ROTATING_GATE_PUZZLE_MAX - 1; i++) - { gRotatingGate_GateSpriteIds[i] = MAX_SPRITES; - } } static void RotatingGate_CreateGatesWithinViewport(s16 deltaX, s16 deltaY) @@ -773,7 +769,7 @@ static void SpriteCallback_RotatingGate(struct Sprite *sprite) { affineAnimation = orientation + 4; - if (GetPlayerSpeed() != 1) + if (GetPlayerSpeed() != PLAYER_SPEED_NORMAL) affineAnimation += 8; PlaySE(SE_ROTATING_GATE); @@ -783,7 +779,7 @@ static void SpriteCallback_RotatingGate(struct Sprite *sprite) { affineAnimation = orientation + 8; - if (GetPlayerSpeed() != 1) + if (GetPlayerSpeed() != PLAYER_SPEED_NORMAL) affineAnimation += 8; PlaySE(SE_ROTATING_GATE); diff --git a/src/scrcmd.c b/src/scrcmd.c index 2c18cb565e..4b7477fe13 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -999,7 +999,7 @@ bool8 ScrCmd_applymovement(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_applymovement_at(struct ScriptContext *ctx) +bool8 ScrCmd_applymovementat(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); const void *movementScript = (const void *)ScriptReadWord(ctx); @@ -1028,7 +1028,7 @@ bool8 ScrCmd_waitmovement(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_waitmovement_at(struct ScriptContext *ctx) +bool8 ScrCmd_waitmovementat(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup; @@ -1052,7 +1052,7 @@ bool8 ScrCmd_removeobject(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_removeobject_at(struct ScriptContext *ctx) +bool8 ScrCmd_removeobjectat(struct ScriptContext *ctx) { u16 objectId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); @@ -1070,7 +1070,7 @@ bool8 ScrCmd_addobject(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_addobject_at(struct ScriptContext *ctx) +bool8 ScrCmd_addobjectat(struct ScriptContext *ctx) { u16 objectId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); @@ -1108,7 +1108,7 @@ bool8 ScrCmd_copyobjectxytoperm(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_showobject_at(struct ScriptContext *ctx) +bool8 ScrCmd_showobjectat(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); @@ -1118,7 +1118,7 @@ bool8 ScrCmd_showobject_at(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_hideobject_at(struct ScriptContext *ctx) +bool8 ScrCmd_hideobjectat(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); diff --git a/src/wallclock.c b/src/wallclock.c index 759b1d11ff..5e0fae3a13 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -41,6 +41,8 @@ static void SpriteCB_HourHand(struct Sprite *sprite); static void SpriteCB_PMIndicator(struct Sprite *sprite); static void SpriteCB_AMIndicator(struct Sprite *sprite); +#define sTaskId data[0] + #define tMinuteHandAngle data[0] #define tHourHandAngle data[1] #define tHours data[2] @@ -696,21 +698,21 @@ void CB2_StartWallClock(void) gTasks[taskId].tHourHandAngle = 300; spriteId = CreateSprite(&sSpriteTemplate_MinuteHand, 120, 80, 1); - gSprites[spriteId].data[0] = taskId; + gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[spriteId].oam.matrixNum = 0; spriteId = CreateSprite(&sSpriteTemplate_HourHand, 120, 80, 0); - gSprites[spriteId].data[0] = taskId; + gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[spriteId].oam.matrixNum = 1; spriteId = CreateSprite(&sSpriteTemplate_PM, 120, 80, 2); - gSprites[spriteId].data[0] = taskId; + gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].data[1] = 45; spriteId = CreateSprite(&sSpriteTemplate_AM, 120, 80, 2); - gSprites[spriteId].data[0] = taskId; + gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].data[1] = 90; WallClockInit(); @@ -744,21 +746,21 @@ void CB2_ViewWallClock(void) } spriteId = CreateSprite(&sSpriteTemplate_MinuteHand, 120, 80, 1); - gSprites[spriteId].data[0] = taskId; + gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[spriteId].oam.matrixNum = 0; spriteId = CreateSprite(&sSpriteTemplate_HourHand, 120, 80, 0); - gSprites[spriteId].data[0] = taskId; + gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[spriteId].oam.matrixNum = 1; spriteId = CreateSprite(&sSpriteTemplate_PM, 120, 80, 2); - gSprites[spriteId].data[0] = taskId; + gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].data[1] = angle1; spriteId = CreateSprite(&sSpriteTemplate_AM, 120, 80, 2); - gSprites[spriteId].data[0] = taskId; + gSprites[spriteId].sTaskId = taskId; gSprites[spriteId].data[1] = angle2; WallClockInit(); @@ -1015,7 +1017,7 @@ static void InitClockWithRtc(u8 taskId) static void SpriteCB_MinuteHand(struct Sprite *sprite) { - u16 angle = gTasks[sprite->data[0]].tMinuteHandAngle; + u16 angle = gTasks[sprite->sTaskId].tMinuteHandAngle; s16 sin = Sin2(angle) / 16; s16 cos = Cos2(angle) / 16; u16 x, y; @@ -1035,7 +1037,7 @@ static void SpriteCB_MinuteHand(struct Sprite *sprite) static void SpriteCB_HourHand(struct Sprite *sprite) { - u16 angle = gTasks[sprite->data[0]].tHourHandAngle; + u16 angle = gTasks[sprite->sTaskId].tHourHandAngle; s16 sin = Sin2(angle) / 16; s16 cos = Cos2(angle) / 16; u16 x, y; @@ -1053,58 +1055,44 @@ static void SpriteCB_HourHand(struct Sprite *sprite) sprite->y2 = y; } +#define sAngle data[1] + static void SpriteCB_PMIndicator(struct Sprite *sprite) { - if (gTasks[sprite->data[0]].tPeriod != PERIOD_AM) + if (gTasks[sprite->sTaskId].tPeriod != PERIOD_AM) { - if (sprite->data[1] >= 60 && sprite->data[1] < 90) - { - sprite->data[1] += 5; - } - if (sprite->data[1] < 60) - { - sprite->data[1]++; - } + if (sprite->sAngle >= 60 && sprite->sAngle < 90) + sprite->sAngle += 5; + if (sprite->sAngle < 60) + sprite->sAngle++; } else { - if (sprite->data[1] >= 46 && sprite->data[1] < 76) - { - sprite->data[1] -= 5; - } - if (sprite->data[1] > 75) - { - sprite->data[1]--; - } + if (sprite->sAngle >= 46 && sprite->sAngle < 76) + sprite->sAngle -= 5; + if (sprite->sAngle > 75) + sprite->sAngle--; } - sprite->x2 = Cos2(sprite->data[1]) * 30 / 0x1000; - sprite->y2 = Sin2(sprite->data[1]) * 30 / 0x1000; + sprite->x2 = Cos2(sprite->sAngle) * 30 / 0x1000; + sprite->y2 = Sin2(sprite->sAngle) * 30 / 0x1000; } static void SpriteCB_AMIndicator(struct Sprite *sprite) { - if (gTasks[sprite->data[0]].tPeriod != PERIOD_AM) + if (gTasks[sprite->sTaskId].tPeriod != PERIOD_AM) { - if (sprite->data[1] >= 105 && sprite->data[1] < 135) - { - sprite->data[1] += 5; - } - if (sprite->data[1] < 105) - { - sprite->data[1]++; - } + if (sprite->sAngle >= 105 && sprite->sAngle < 135) + sprite->sAngle += 5; + if (sprite->sAngle < 105) + sprite->sAngle++; } else { - if (sprite->data[1] >= 91 && sprite->data[1] < 121) - { - sprite->data[1] -= 5; - } - if (sprite->data[1] > 120) - { - sprite->data[1]--; - } + if (sprite->sAngle >= 91 && sprite->sAngle < 121) + sprite->sAngle -= 5; + if (sprite->sAngle > 120) + sprite->sAngle--; } - sprite->x2 = Cos2(sprite->data[1]) * 30 / 0x1000; - sprite->y2 = Sin2(sprite->data[1]) * 30 / 0x1000; + sprite->x2 = Cos2(sprite->sAngle) * 30 / 0x1000; + sprite->y2 = Sin2(sprite->sAngle) * 30 / 0x1000; } From 3a93e50a983bed3ad3161105f353f227bb428e4b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Tue, 4 Jan 2022 20:47:32 -0300 Subject: [PATCH 313/417] Voltorb --- src/data/pokemon_graphics/enemy_mon_elevation.h | 1 - src/data/pokemon_graphics/front_pic_coordinates.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/data/pokemon_graphics/enemy_mon_elevation.h b/src/data/pokemon_graphics/enemy_mon_elevation.h index c0896e3feb..46f1414613 100644 --- a/src/data/pokemon_graphics/enemy_mon_elevation.h +++ b/src/data/pokemon_graphics/enemy_mon_elevation.h @@ -14,7 +14,6 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_MAGNETON] = 9, [SPECIES_GASTLY] = 10, [SPECIES_HAUNTER] = 11, - [SPECIES_VOLTORB] = 11, [SPECIES_ELECTRODE] = 12, [SPECIES_KOFFING] = 14, [SPECIES_WEEZING] = 6, diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index 62bb697257..e4dff6784f 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -507,7 +507,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_VOLTORB] = { .size = MON_COORDS_SIZE(32, 40), - .y_offset = 15, + .y_offset = 11, }, [SPECIES_ELECTRODE] = { From db9a59b67c1cb5e3f9d0e0076ec67eadd9494036 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Tue, 4 Jan 2022 22:13:22 -0300 Subject: [PATCH 314/417] More adjustments --- .../pokemon_graphics/enemy_mon_elevation.h | 38 +++++++++++++++++-- .../pokemon_graphics/front_pic_coordinates.h | 18 ++++----- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/data/pokemon_graphics/enemy_mon_elevation.h b/src/data/pokemon_graphics/enemy_mon_elevation.h index 46f1414613..fcc2e2bc44 100644 --- a/src/data/pokemon_graphics/enemy_mon_elevation.h +++ b/src/data/pokemon_graphics/enemy_mon_elevation.h @@ -14,7 +14,6 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_MAGNETON] = 9, [SPECIES_GASTLY] = 10, [SPECIES_HAUNTER] = 11, - [SPECIES_ELECTRODE] = 12, [SPECIES_KOFFING] = 14, [SPECIES_WEEZING] = 6, [SPECIES_AERODACTYL] = 9, @@ -30,6 +29,8 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_MISDREAVUS] = 12, [SPECIES_UNOWN] = 8, [SPECIES_GLIGAR] = 8, + [SPECIES_MANTINE] = 6, + [SPECIES_PORYGON2] = 9, [SPECIES_LUGIA] = 6, [SPECIES_HO_OH] = 6, [SPECIES_CELEBI] = 15, @@ -40,13 +41,12 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_WINGULL] = 15, [SPECIES_PELIPPER] = 8, [SPECIES_MASQUERAIN] = 10, - [SPECIES_BALTOY] = 1, + [SPECIES_BALTOY] = 5, [SPECIES_CLAYDOL] = 10, [SPECIES_FLYGON] = 7, [SPECIES_GLALIE] = 12, [SPECIES_LUNATONE] = 13, [SPECIES_SOLROCK] = 4, - [SPECIES_SWABLU] = 12, [SPECIES_ALTARIA] = 8, [SPECIES_DUSKULL] = 13, [SPECIES_SHUPPET] = 14, @@ -65,11 +65,14 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_DRIFLOON] = 5, [SPECIES_DRIFBLIM] = 7, [SPECIES_MISMAGIUS] = 3, + [SPECIES_CHINGLING] = 5, [SPECIES_BRONZONG] = 4, [SPECIES_MAGNEZONE] = 4, [SPECIES_TOGEKISS] = 14, [SPECIES_YANMEGA] = 6, - [SPECIES_GLISCOR] = 6, + [SPECIES_GLISCOR] = 9, + [SPECIES_PORYGON_Z] = 12, + [SPECIES_PROBOPASS] = 6, [SPECIES_ROTOM] = 10, [SPECIES_UXIE] = 6, [SPECIES_MESPRIT] = 6, @@ -127,6 +130,33 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = // Galarian Forms [SPECIES_WEEZING_GALARIAN] = 3, [SPECIES_YAMASK_GALARIAN] = 4, + [SPECIES_UNOWN_B] = 8, + [SPECIES_UNOWN_C] = 8, + [SPECIES_UNOWN_D] = 8, + [SPECIES_UNOWN_E] = 8, + [SPECIES_UNOWN_F] = 8, + [SPECIES_UNOWN_G] = 8, + [SPECIES_UNOWN_H] = 8, + [SPECIES_UNOWN_I] = 8, + [SPECIES_UNOWN_J] = 8, + [SPECIES_UNOWN_K] = 8, + [SPECIES_UNOWN_L] = 8, + [SPECIES_UNOWN_M] = 8, + [SPECIES_UNOWN_N] = 8, + [SPECIES_UNOWN_O] = 8, + [SPECIES_UNOWN_P] = 8, + [SPECIES_UNOWN_Q] = 8, + [SPECIES_UNOWN_R] = 8, + [SPECIES_UNOWN_S] = 8, + [SPECIES_UNOWN_T] = 8, + [SPECIES_UNOWN_U] = 8, + [SPECIES_UNOWN_V] = 8, + [SPECIES_UNOWN_W] = 8, + [SPECIES_UNOWN_X] = 8, + [SPECIES_UNOWN_Y] = 8, + [SPECIES_UNOWN_Z] = 8, + [SPECIES_UNOWN_QMARK] = 8, + [SPECIES_UNOWN_EMARK] = 8, // Misc Forms [SPECIES_GIRATINA_ORIGIN] = 7, [SPECIES_THUNDURUS_THERIAN] = 7, diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index e4dff6784f..22aa6f71aa 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -512,7 +512,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_ELECTRODE] = { .size = MON_COORDS_SIZE(48, 48), - .y_offset = 11, + .y_offset = 8, }, [SPECIES_EXEGGCUTE] = { @@ -1137,7 +1137,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_MANTINE] = { .size = MON_COORDS_SIZE(64, 56), - .y_offset = 10, + .y_offset = 9, }, [SPECIES_SKARMORY] = { @@ -1242,7 +1242,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_PUPITAR] = { .size = MON_COORDS_SIZE(40, 48), - .y_offset = 11, + .y_offset = 9, }, [SPECIES_TYRANITAR] = { @@ -1472,7 +1472,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_BALTOY] = { .size = MON_COORDS_SIZE(40, 40), - .y_offset = 14, + .y_offset = 11, }, [SPECIES_CLAYDOL] = { @@ -1497,7 +1497,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_BARBOACH] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 15, + .y_offset = 11, }, [SPECIES_WHISCASH] = { @@ -1507,7 +1507,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_LUVDISC] = { .size = MON_COORDS_SIZE(32, 40), - .y_offset = 14, + .y_offset = 11, }, [SPECIES_CORPHISH] = { @@ -1672,7 +1672,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_SWABLU] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 14, + .y_offset = 12, }, [SPECIES_ALTARIA] = { @@ -2172,7 +2172,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_CHINGLING] = { .size = MON_COORDS_SIZE(40, 40), - .y_offset = 15, + .y_offset = 12, }, [SPECIES_STUNKY] = { @@ -2392,7 +2392,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_DUSKNOIR] = { .size = MON_COORDS_SIZE(64, 64), - .y_offset = 4, + .y_offset = 2, }, [SPECIES_FROSLASS] = { From 813fc6d726840eb5868caa4b9680b302db9c95de Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Wed, 5 Jan 2022 12:34:54 +0100 Subject: [PATCH 315/417] fixes: -const and offset data not beeing reset on form change -new offset values not beeing applied on normal/shiny change --- src/pokemon_debug.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index d43120e6a5..5223a31918 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -782,6 +782,13 @@ static void SetConstSpriteValues(struct PokemonDebugMenu *data) data->constSpriteValues.backPicCoords = gMonBackPicCoords[species].y_offset; } +static void ResetOffsetSpriteValues(struct PokemonDebugMenu *data) +{ + data->offsetsSpriteValues.offset_back_picCoords = 0; + data->offsetsSpriteValues.offset_front_picCoords = 0; + data->offsetsSpriteValues.offset_front_elevation = 0; +} + static u8 GetBattlerSpriteFinal_YCustom(u16 species, s8 offset_picCoords, s8 offset_elevation) { u16 offset; @@ -1281,6 +1288,17 @@ static void ResetBGs_Debug_Menu(u16 a) } } +static void ApplyOffsetSpriteValues(struct PokemonDebugMenu *data) +{ + u16 species = data->currentmonId; + //Back + gSprites[data->backspriteId].y = DEBUG_MON_BACK_Y + gMonBackPicCoords[species].y_offset + data->offsetsSpriteValues.offset_back_picCoords; + //Front + gSprites[data->frontspriteId].y = GetBattlerSpriteFinal_YCustom(species, data->offsetsSpriteValues.offset_front_picCoords, data->offsetsSpriteValues.offset_front_elevation); + //Shadow if one was added + UpdateShadowSpriteInvisible(data); +} + static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment) { struct PokemonDebugMenu *data = GetStructPtr(taskId); @@ -1355,6 +1373,7 @@ static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment) data->animIdBack = GetSpeciesBackAnimSet(modArrows->currValue) + 1; data->animIdFront = sMonFrontAnimIdsTable[modArrows->currValue - 1]; UpdateMonAnimNames(taskId); + ResetOffsetSpriteValues(data); UpdateBattlerValue(data); ReloadPokemonSprites(data); @@ -1442,7 +1461,6 @@ static void UpdateSubmenuTwoOptionValue(u8 taskId, bool8 increment) UpdateYPosOffsetText(data); } - static void Handle_Input_Debug_Pokemon(u8 taskId) { struct PokemonDebugMenu *data = GetStructPtr(taskId); @@ -1454,7 +1472,6 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) PlayCryInternal(data->currentmonId, 0, 120, 10, 0); LaunchAnimationTaskForBackSprite(Backsprite, data->animIdBack-1); } - if (JOY_NEW(R_BUTTON) && (Frontsprite->callback == SpriteCallbackDummy)) { PlayCryInternal(data->currentmonId, 0, 120, 10, 0); @@ -1462,6 +1479,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) StartSpriteAnim(Frontsprite, 1); LaunchAnimationTaskForFrontSprite(Frontsprite, data->animIdFront); } + if (JOY_NEW(START_BUTTON)) { data->isShiny = !data->isShiny; @@ -1470,7 +1488,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) PlaySE(SE_SHINY); ReloadPokemonSprites(data); - + ApplyOffsetSpriteValues(data); } if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifference[data->currentmonId]) { @@ -1488,7 +1506,6 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) { data->currentSubmenu = 1; SetArrowInvisibility(data); - SetConstSpriteValues(data); PrintInstructionsOnWindow(data); } else if (JOY_NEW(B_BUTTON)) @@ -1508,9 +1525,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; UpdateMonAnimNames(taskId); - data->offsetsSpriteValues.offset_back_picCoords = 0; - data->offsetsSpriteValues.offset_front_picCoords = 0; - data->offsetsSpriteValues.offset_front_elevation = 0; + ResetOffsetSpriteValues(data); } PlaySE(SE_DEX_SCROLL); while (!(gMain.intrCheck & INTR_FLAG_VBLANK)); @@ -1526,9 +1541,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) data->animIdBack = GetSpeciesBackAnimSet(data->currentmonId) + 1; data->animIdFront = sMonFrontAnimIdsTable[data->currentmonId - 1]; UpdateMonAnimNames(taskId); - data->offsetsSpriteValues.offset_back_picCoords = 0; - data->offsetsSpriteValues.offset_front_picCoords = 0; - data->offsetsSpriteValues.offset_front_elevation = 0; + ResetOffsetSpriteValues(data); } PlaySE(SE_DEX_SCROLL); @@ -1560,6 +1573,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId) data->currentSubmenu = 2; PrintInstructionsOnWindow(data); SetArrowInvisibility(data); + SetConstSpriteValues(data); UpdateYPosOffsetText(data); } else if (JOY_NEW(B_BUTTON)) From 5d033c2e4d5001c65e85fdcf5c780e5b88307063 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 5 Jan 2022 12:18:49 -0500 Subject: [PATCH 316/417] Convert pokedex defines to enums --- include/constants/pokedex.h | 848 ++++++++++++++++++++++++++++++++++++ include/constants/species.h | 843 ----------------------------------- include/global.h | 13 +- src/pokedex.c | 2 +- 4 files changed, 857 insertions(+), 849 deletions(-) create mode 100644 include/constants/pokedex.h diff --git a/include/constants/pokedex.h b/include/constants/pokedex.h new file mode 100644 index 0000000000..7ee1b3760e --- /dev/null +++ b/include/constants/pokedex.h @@ -0,0 +1,848 @@ +#ifndef GUARD_CONSTANTS_POKEDEX_H +#define GUARD_CONSTANTS_POKEDEX_H + +// National Pokedex order +enum { + NATIONAL_DEX_NONE, + // Kanto + NATIONAL_DEX_BULBASAUR, + NATIONAL_DEX_IVYSAUR, + NATIONAL_DEX_VENUSAUR, + NATIONAL_DEX_CHARMANDER, + NATIONAL_DEX_CHARMELEON, + NATIONAL_DEX_CHARIZARD, + NATIONAL_DEX_SQUIRTLE, + NATIONAL_DEX_WARTORTLE, + NATIONAL_DEX_BLASTOISE, + NATIONAL_DEX_CATERPIE, + NATIONAL_DEX_METAPOD, + NATIONAL_DEX_BUTTERFREE, + NATIONAL_DEX_WEEDLE, + NATIONAL_DEX_KAKUNA, + NATIONAL_DEX_BEEDRILL, + NATIONAL_DEX_PIDGEY, + NATIONAL_DEX_PIDGEOTTO, + NATIONAL_DEX_PIDGEOT, + NATIONAL_DEX_RATTATA, + NATIONAL_DEX_RATICATE, + NATIONAL_DEX_SPEAROW, + NATIONAL_DEX_FEAROW, + NATIONAL_DEX_EKANS, + NATIONAL_DEX_ARBOK, + NATIONAL_DEX_PIKACHU, + NATIONAL_DEX_RAICHU, + NATIONAL_DEX_SANDSHREW, + NATIONAL_DEX_SANDSLASH, + NATIONAL_DEX_NIDORAN_F, + NATIONAL_DEX_NIDORINA, + NATIONAL_DEX_NIDOQUEEN, + NATIONAL_DEX_NIDORAN_M, + NATIONAL_DEX_NIDORINO, + NATIONAL_DEX_NIDOKING, + NATIONAL_DEX_CLEFAIRY, + NATIONAL_DEX_CLEFABLE, + NATIONAL_DEX_VULPIX, + NATIONAL_DEX_NINETALES, + NATIONAL_DEX_JIGGLYPUFF, + NATIONAL_DEX_WIGGLYTUFF, + NATIONAL_DEX_ZUBAT, + NATIONAL_DEX_GOLBAT, + NATIONAL_DEX_ODDISH, + NATIONAL_DEX_GLOOM, + NATIONAL_DEX_VILEPLUME, + NATIONAL_DEX_PARAS, + NATIONAL_DEX_PARASECT, + NATIONAL_DEX_VENONAT, + NATIONAL_DEX_VENOMOTH, + NATIONAL_DEX_DIGLETT, + NATIONAL_DEX_DUGTRIO, + NATIONAL_DEX_MEOWTH, + NATIONAL_DEX_PERSIAN, + NATIONAL_DEX_PSYDUCK, + NATIONAL_DEX_GOLDUCK, + NATIONAL_DEX_MANKEY, + NATIONAL_DEX_PRIMEAPE, + NATIONAL_DEX_GROWLITHE, + NATIONAL_DEX_ARCANINE, + NATIONAL_DEX_POLIWAG, + NATIONAL_DEX_POLIWHIRL, + NATIONAL_DEX_POLIWRATH, + NATIONAL_DEX_ABRA, + NATIONAL_DEX_KADABRA, + NATIONAL_DEX_ALAKAZAM, + NATIONAL_DEX_MACHOP, + NATIONAL_DEX_MACHOKE, + NATIONAL_DEX_MACHAMP, + NATIONAL_DEX_BELLSPROUT, + NATIONAL_DEX_WEEPINBELL, + NATIONAL_DEX_VICTREEBEL, + NATIONAL_DEX_TENTACOOL, + NATIONAL_DEX_TENTACRUEL, + NATIONAL_DEX_GEODUDE, + NATIONAL_DEX_GRAVELER, + NATIONAL_DEX_GOLEM, + NATIONAL_DEX_PONYTA, + NATIONAL_DEX_RAPIDASH, + NATIONAL_DEX_SLOWPOKE, + NATIONAL_DEX_SLOWBRO, + NATIONAL_DEX_MAGNEMITE, + NATIONAL_DEX_MAGNETON, + NATIONAL_DEX_FARFETCHD, + NATIONAL_DEX_DODUO, + NATIONAL_DEX_DODRIO, + NATIONAL_DEX_SEEL, + NATIONAL_DEX_DEWGONG, + NATIONAL_DEX_GRIMER, + NATIONAL_DEX_MUK, + NATIONAL_DEX_SHELLDER, + NATIONAL_DEX_CLOYSTER, + NATIONAL_DEX_GASTLY, + NATIONAL_DEX_HAUNTER, + NATIONAL_DEX_GENGAR, + NATIONAL_DEX_ONIX, + NATIONAL_DEX_DROWZEE, + NATIONAL_DEX_HYPNO, + NATIONAL_DEX_KRABBY, + NATIONAL_DEX_KINGLER, + NATIONAL_DEX_VOLTORB, + NATIONAL_DEX_ELECTRODE, + NATIONAL_DEX_EXEGGCUTE, + NATIONAL_DEX_EXEGGUTOR, + NATIONAL_DEX_CUBONE, + NATIONAL_DEX_MAROWAK, + NATIONAL_DEX_HITMONLEE, + NATIONAL_DEX_HITMONCHAN, + NATIONAL_DEX_LICKITUNG, + NATIONAL_DEX_KOFFING, + NATIONAL_DEX_WEEZING, + NATIONAL_DEX_RHYHORN, + NATIONAL_DEX_RHYDON, + NATIONAL_DEX_CHANSEY, + NATIONAL_DEX_TANGELA, + NATIONAL_DEX_KANGASKHAN, + NATIONAL_DEX_HORSEA, + NATIONAL_DEX_SEADRA, + NATIONAL_DEX_GOLDEEN, + NATIONAL_DEX_SEAKING, + NATIONAL_DEX_STARYU, + NATIONAL_DEX_STARMIE, + NATIONAL_DEX_MR_MIME, + NATIONAL_DEX_SCYTHER, + NATIONAL_DEX_JYNX, + NATIONAL_DEX_ELECTABUZZ, + NATIONAL_DEX_MAGMAR, + NATIONAL_DEX_PINSIR, + NATIONAL_DEX_TAUROS, + NATIONAL_DEX_MAGIKARP, + NATIONAL_DEX_GYARADOS, + NATIONAL_DEX_LAPRAS, + NATIONAL_DEX_DITTO, + NATIONAL_DEX_EEVEE, + NATIONAL_DEX_VAPOREON, + NATIONAL_DEX_JOLTEON, + NATIONAL_DEX_FLAREON, + NATIONAL_DEX_PORYGON, + NATIONAL_DEX_OMANYTE, + NATIONAL_DEX_OMASTAR, + NATIONAL_DEX_KABUTO, + NATIONAL_DEX_KABUTOPS, + NATIONAL_DEX_AERODACTYL, + NATIONAL_DEX_SNORLAX, + NATIONAL_DEX_ARTICUNO, + NATIONAL_DEX_ZAPDOS, + NATIONAL_DEX_MOLTRES, + NATIONAL_DEX_DRATINI, + NATIONAL_DEX_DRAGONAIR, + NATIONAL_DEX_DRAGONITE, + NATIONAL_DEX_MEWTWO, + NATIONAL_DEX_MEW, + // Johto + NATIONAL_DEX_CHIKORITA, + NATIONAL_DEX_BAYLEEF, + NATIONAL_DEX_MEGANIUM, + NATIONAL_DEX_CYNDAQUIL, + NATIONAL_DEX_QUILAVA, + NATIONAL_DEX_TYPHLOSION, + NATIONAL_DEX_TOTODILE, + NATIONAL_DEX_CROCONAW, + NATIONAL_DEX_FERALIGATR, + NATIONAL_DEX_SENTRET, + NATIONAL_DEX_FURRET, + NATIONAL_DEX_HOOTHOOT, + NATIONAL_DEX_NOCTOWL, + NATIONAL_DEX_LEDYBA, + NATIONAL_DEX_LEDIAN, + NATIONAL_DEX_SPINARAK, + NATIONAL_DEX_ARIADOS, + NATIONAL_DEX_CROBAT, + NATIONAL_DEX_CHINCHOU, + NATIONAL_DEX_LANTURN, + NATIONAL_DEX_PICHU, + NATIONAL_DEX_CLEFFA, + NATIONAL_DEX_IGGLYBUFF, + NATIONAL_DEX_TOGEPI, + NATIONAL_DEX_TOGETIC, + NATIONAL_DEX_NATU, + NATIONAL_DEX_XATU, + NATIONAL_DEX_MAREEP, + NATIONAL_DEX_FLAAFFY, + NATIONAL_DEX_AMPHAROS, + NATIONAL_DEX_BELLOSSOM, + NATIONAL_DEX_MARILL, + NATIONAL_DEX_AZUMARILL, + NATIONAL_DEX_SUDOWOODO, + NATIONAL_DEX_POLITOED, + NATIONAL_DEX_HOPPIP, + NATIONAL_DEX_SKIPLOOM, + NATIONAL_DEX_JUMPLUFF, + NATIONAL_DEX_AIPOM, + NATIONAL_DEX_SUNKERN, + NATIONAL_DEX_SUNFLORA, + NATIONAL_DEX_YANMA, + NATIONAL_DEX_WOOPER, + NATIONAL_DEX_QUAGSIRE, + NATIONAL_DEX_ESPEON, + NATIONAL_DEX_UMBREON, + NATIONAL_DEX_MURKROW, + NATIONAL_DEX_SLOWKING, + NATIONAL_DEX_MISDREAVUS, + NATIONAL_DEX_UNOWN, + NATIONAL_DEX_WOBBUFFET, + NATIONAL_DEX_GIRAFARIG, + NATIONAL_DEX_PINECO, + NATIONAL_DEX_FORRETRESS, + NATIONAL_DEX_DUNSPARCE, + NATIONAL_DEX_GLIGAR, + NATIONAL_DEX_STEELIX, + NATIONAL_DEX_SNUBBULL, + NATIONAL_DEX_GRANBULL, + NATIONAL_DEX_QWILFISH, + NATIONAL_DEX_SCIZOR, + NATIONAL_DEX_SHUCKLE, + NATIONAL_DEX_HERACROSS, + NATIONAL_DEX_SNEASEL, + NATIONAL_DEX_TEDDIURSA, + NATIONAL_DEX_URSARING, + NATIONAL_DEX_SLUGMA, + NATIONAL_DEX_MAGCARGO, + NATIONAL_DEX_SWINUB, + NATIONAL_DEX_PILOSWINE, + NATIONAL_DEX_CORSOLA, + NATIONAL_DEX_REMORAID, + NATIONAL_DEX_OCTILLERY, + NATIONAL_DEX_DELIBIRD, + NATIONAL_DEX_MANTINE, + NATIONAL_DEX_SKARMORY, + NATIONAL_DEX_HOUNDOUR, + NATIONAL_DEX_HOUNDOOM, + NATIONAL_DEX_KINGDRA, + NATIONAL_DEX_PHANPY, + NATIONAL_DEX_DONPHAN, + NATIONAL_DEX_PORYGON2, + NATIONAL_DEX_STANTLER, + NATIONAL_DEX_SMEARGLE, + NATIONAL_DEX_TYROGUE, + NATIONAL_DEX_HITMONTOP, + NATIONAL_DEX_SMOOCHUM, + NATIONAL_DEX_ELEKID, + NATIONAL_DEX_MAGBY, + NATIONAL_DEX_MILTANK, + NATIONAL_DEX_BLISSEY, + NATIONAL_DEX_RAIKOU, + NATIONAL_DEX_ENTEI, + NATIONAL_DEX_SUICUNE, + NATIONAL_DEX_LARVITAR, + NATIONAL_DEX_PUPITAR, + NATIONAL_DEX_TYRANITAR, + NATIONAL_DEX_LUGIA, + NATIONAL_DEX_HO_OH, + NATIONAL_DEX_CELEBI, + // Hoenn + NATIONAL_DEX_TREECKO, + NATIONAL_DEX_GROVYLE, + NATIONAL_DEX_SCEPTILE, + NATIONAL_DEX_TORCHIC, + NATIONAL_DEX_COMBUSKEN, + NATIONAL_DEX_BLAZIKEN, + NATIONAL_DEX_MUDKIP, + NATIONAL_DEX_MARSHTOMP, + NATIONAL_DEX_SWAMPERT, + NATIONAL_DEX_POOCHYENA, + NATIONAL_DEX_MIGHTYENA, + NATIONAL_DEX_ZIGZAGOON, + NATIONAL_DEX_LINOONE, + NATIONAL_DEX_WURMPLE, + NATIONAL_DEX_SILCOON, + NATIONAL_DEX_BEAUTIFLY, + NATIONAL_DEX_CASCOON, + NATIONAL_DEX_DUSTOX, + NATIONAL_DEX_LOTAD, + NATIONAL_DEX_LOMBRE, + NATIONAL_DEX_LUDICOLO, + NATIONAL_DEX_SEEDOT, + NATIONAL_DEX_NUZLEAF, + NATIONAL_DEX_SHIFTRY, + NATIONAL_DEX_TAILLOW, + NATIONAL_DEX_SWELLOW, + NATIONAL_DEX_WINGULL, + NATIONAL_DEX_PELIPPER, + NATIONAL_DEX_RALTS, + NATIONAL_DEX_KIRLIA, + NATIONAL_DEX_GARDEVOIR, + NATIONAL_DEX_SURSKIT, + NATIONAL_DEX_MASQUERAIN, + NATIONAL_DEX_SHROOMISH, + NATIONAL_DEX_BRELOOM, + NATIONAL_DEX_SLAKOTH, + NATIONAL_DEX_VIGOROTH, + NATIONAL_DEX_SLAKING, + NATIONAL_DEX_NINCADA, + NATIONAL_DEX_NINJASK, + NATIONAL_DEX_SHEDINJA, + NATIONAL_DEX_WHISMUR, + NATIONAL_DEX_LOUDRED, + NATIONAL_DEX_EXPLOUD, + NATIONAL_DEX_MAKUHITA, + NATIONAL_DEX_HARIYAMA, + NATIONAL_DEX_AZURILL, + NATIONAL_DEX_NOSEPASS, + NATIONAL_DEX_SKITTY, + NATIONAL_DEX_DELCATTY, + NATIONAL_DEX_SABLEYE, + NATIONAL_DEX_MAWILE, + NATIONAL_DEX_ARON, + NATIONAL_DEX_LAIRON, + NATIONAL_DEX_AGGRON, + NATIONAL_DEX_MEDITITE, + NATIONAL_DEX_MEDICHAM, + NATIONAL_DEX_ELECTRIKE, + NATIONAL_DEX_MANECTRIC, + NATIONAL_DEX_PLUSLE, + NATIONAL_DEX_MINUN, + NATIONAL_DEX_VOLBEAT, + NATIONAL_DEX_ILLUMISE, + NATIONAL_DEX_ROSELIA, + NATIONAL_DEX_GULPIN, + NATIONAL_DEX_SWALOT, + NATIONAL_DEX_CARVANHA, + NATIONAL_DEX_SHARPEDO, + NATIONAL_DEX_WAILMER, + NATIONAL_DEX_WAILORD, + NATIONAL_DEX_NUMEL, + NATIONAL_DEX_CAMERUPT, + NATIONAL_DEX_TORKOAL, + NATIONAL_DEX_SPOINK, + NATIONAL_DEX_GRUMPIG, + NATIONAL_DEX_SPINDA, + NATIONAL_DEX_TRAPINCH, + NATIONAL_DEX_VIBRAVA, + NATIONAL_DEX_FLYGON, + NATIONAL_DEX_CACNEA, + NATIONAL_DEX_CACTURNE, + NATIONAL_DEX_SWABLU, + NATIONAL_DEX_ALTARIA, + NATIONAL_DEX_ZANGOOSE, + NATIONAL_DEX_SEVIPER, + NATIONAL_DEX_LUNATONE, + NATIONAL_DEX_SOLROCK, + NATIONAL_DEX_BARBOACH, + NATIONAL_DEX_WHISCASH, + NATIONAL_DEX_CORPHISH, + NATIONAL_DEX_CRAWDAUNT, + NATIONAL_DEX_BALTOY, + NATIONAL_DEX_CLAYDOL, + NATIONAL_DEX_LILEEP, + NATIONAL_DEX_CRADILY, + NATIONAL_DEX_ANORITH, + NATIONAL_DEX_ARMALDO, + NATIONAL_DEX_FEEBAS, + NATIONAL_DEX_MILOTIC, + NATIONAL_DEX_CASTFORM, + NATIONAL_DEX_KECLEON, + NATIONAL_DEX_SHUPPET, + NATIONAL_DEX_BANETTE, + NATIONAL_DEX_DUSKULL, + NATIONAL_DEX_DUSCLOPS, + NATIONAL_DEX_TROPIUS, + NATIONAL_DEX_CHIMECHO, + NATIONAL_DEX_ABSOL, + NATIONAL_DEX_WYNAUT, + NATIONAL_DEX_SNORUNT, + NATIONAL_DEX_GLALIE, + NATIONAL_DEX_SPHEAL, + NATIONAL_DEX_SEALEO, + NATIONAL_DEX_WALREIN, + NATIONAL_DEX_CLAMPERL, + NATIONAL_DEX_HUNTAIL, + NATIONAL_DEX_GOREBYSS, + NATIONAL_DEX_RELICANTH, + NATIONAL_DEX_LUVDISC, + NATIONAL_DEX_BAGON, + NATIONAL_DEX_SHELGON, + NATIONAL_DEX_SALAMENCE, + NATIONAL_DEX_BELDUM, + NATIONAL_DEX_METANG, + NATIONAL_DEX_METAGROSS, + NATIONAL_DEX_REGIROCK, + NATIONAL_DEX_REGICE, + NATIONAL_DEX_REGISTEEL, + NATIONAL_DEX_LATIAS, + NATIONAL_DEX_LATIOS, + NATIONAL_DEX_KYOGRE, + NATIONAL_DEX_GROUDON, + NATIONAL_DEX_RAYQUAZA, + NATIONAL_DEX_JIRACHI, + NATIONAL_DEX_DEOXYS, + // Old Unown + NATIONAL_DEX_OLD_UNOWN_B, + NATIONAL_DEX_OLD_UNOWN_C, + NATIONAL_DEX_OLD_UNOWN_D, + NATIONAL_DEX_OLD_UNOWN_E, + NATIONAL_DEX_OLD_UNOWN_F, + NATIONAL_DEX_OLD_UNOWN_G, + NATIONAL_DEX_OLD_UNOWN_H, + NATIONAL_DEX_OLD_UNOWN_I, + NATIONAL_DEX_OLD_UNOWN_J, + NATIONAL_DEX_OLD_UNOWN_K, + NATIONAL_DEX_OLD_UNOWN_L, + NATIONAL_DEX_OLD_UNOWN_M, + NATIONAL_DEX_OLD_UNOWN_N, + NATIONAL_DEX_OLD_UNOWN_O, + NATIONAL_DEX_OLD_UNOWN_P, + NATIONAL_DEX_OLD_UNOWN_Q, + NATIONAL_DEX_OLD_UNOWN_R, + NATIONAL_DEX_OLD_UNOWN_S, + NATIONAL_DEX_OLD_UNOWN_T, + NATIONAL_DEX_OLD_UNOWN_U, + NATIONAL_DEX_OLD_UNOWN_V, + NATIONAL_DEX_OLD_UNOWN_W, + NATIONAL_DEX_OLD_UNOWN_X, + NATIONAL_DEX_OLD_UNOWN_Y, + NATIONAL_DEX_OLD_UNOWN_Z, +}; + +#define KANTO_DEX_COUNT NATIONAL_DEX_MEW +#define JOHTO_DEX_COUNT NATIONAL_DEX_CELEBI +#define NATIONAL_DEX_COUNT NATIONAL_DEX_DEOXYS + +// Hoenn Pokedex order +enum { + HOENN_DEX_NONE, + HOENN_DEX_TREECKO, + HOENN_DEX_GROVYLE, + HOENN_DEX_SCEPTILE, + HOENN_DEX_TORCHIC, + HOENN_DEX_COMBUSKEN, + HOENN_DEX_BLAZIKEN, + HOENN_DEX_MUDKIP, + HOENN_DEX_MARSHTOMP, + HOENN_DEX_SWAMPERT, + HOENN_DEX_POOCHYENA, + HOENN_DEX_MIGHTYENA, + HOENN_DEX_ZIGZAGOON, + HOENN_DEX_LINOONE, + HOENN_DEX_WURMPLE, + HOENN_DEX_SILCOON, + HOENN_DEX_BEAUTIFLY, + HOENN_DEX_CASCOON, + HOENN_DEX_DUSTOX, + HOENN_DEX_LOTAD, + HOENN_DEX_LOMBRE, + HOENN_DEX_LUDICOLO, + HOENN_DEX_SEEDOT, + HOENN_DEX_NUZLEAF, + HOENN_DEX_SHIFTRY, + HOENN_DEX_TAILLOW, + HOENN_DEX_SWELLOW, + HOENN_DEX_WINGULL, + HOENN_DEX_PELIPPER, + HOENN_DEX_RALTS, + HOENN_DEX_KIRLIA, + HOENN_DEX_GARDEVOIR, + HOENN_DEX_SURSKIT, + HOENN_DEX_MASQUERAIN, + HOENN_DEX_SHROOMISH, + HOENN_DEX_BRELOOM, + HOENN_DEX_SLAKOTH, + HOENN_DEX_VIGOROTH, + HOENN_DEX_SLAKING, + HOENN_DEX_ABRA, + HOENN_DEX_KADABRA, + HOENN_DEX_ALAKAZAM, + HOENN_DEX_NINCADA, + HOENN_DEX_NINJASK, + HOENN_DEX_SHEDINJA, + HOENN_DEX_WHISMUR, + HOENN_DEX_LOUDRED, + HOENN_DEX_EXPLOUD, + HOENN_DEX_MAKUHITA, + HOENN_DEX_HARIYAMA, + HOENN_DEX_GOLDEEN, + HOENN_DEX_SEAKING, + HOENN_DEX_MAGIKARP, + HOENN_DEX_GYARADOS, + HOENN_DEX_AZURILL, + HOENN_DEX_MARILL, + HOENN_DEX_AZUMARILL, + HOENN_DEX_GEODUDE, + HOENN_DEX_GRAVELER, + HOENN_DEX_GOLEM, + HOENN_DEX_NOSEPASS, + HOENN_DEX_SKITTY, + HOENN_DEX_DELCATTY, + HOENN_DEX_ZUBAT, + HOENN_DEX_GOLBAT, + HOENN_DEX_CROBAT, + HOENN_DEX_TENTACOOL, + HOENN_DEX_TENTACRUEL, + HOENN_DEX_SABLEYE, + HOENN_DEX_MAWILE, + HOENN_DEX_ARON, + HOENN_DEX_LAIRON, + HOENN_DEX_AGGRON, + HOENN_DEX_MACHOP, + HOENN_DEX_MACHOKE, + HOENN_DEX_MACHAMP, + HOENN_DEX_MEDITITE, + HOENN_DEX_MEDICHAM, + HOENN_DEX_ELECTRIKE, + HOENN_DEX_MANECTRIC, + HOENN_DEX_PLUSLE, + HOENN_DEX_MINUN, + HOENN_DEX_MAGNEMITE, + HOENN_DEX_MAGNETON, + HOENN_DEX_VOLTORB, + HOENN_DEX_ELECTRODE, + HOENN_DEX_VOLBEAT, + HOENN_DEX_ILLUMISE, + HOENN_DEX_ODDISH, + HOENN_DEX_GLOOM, + HOENN_DEX_VILEPLUME, + HOENN_DEX_BELLOSSOM, + HOENN_DEX_DODUO, + HOENN_DEX_DODRIO, + HOENN_DEX_ROSELIA, + HOENN_DEX_GULPIN, + HOENN_DEX_SWALOT, + HOENN_DEX_CARVANHA, + HOENN_DEX_SHARPEDO, + HOENN_DEX_WAILMER, + HOENN_DEX_WAILORD, + HOENN_DEX_NUMEL, + HOENN_DEX_CAMERUPT, + HOENN_DEX_SLUGMA, + HOENN_DEX_MAGCARGO, + HOENN_DEX_TORKOAL, + HOENN_DEX_GRIMER, + HOENN_DEX_MUK, + HOENN_DEX_KOFFING, + HOENN_DEX_WEEZING, + HOENN_DEX_SPOINK, + HOENN_DEX_GRUMPIG, + HOENN_DEX_SANDSHREW, + HOENN_DEX_SANDSLASH, + HOENN_DEX_SPINDA, + HOENN_DEX_SKARMORY, + HOENN_DEX_TRAPINCH, + HOENN_DEX_VIBRAVA, + HOENN_DEX_FLYGON, + HOENN_DEX_CACNEA, + HOENN_DEX_CACTURNE, + HOENN_DEX_SWABLU, + HOENN_DEX_ALTARIA, + HOENN_DEX_ZANGOOSE, + HOENN_DEX_SEVIPER, + HOENN_DEX_LUNATONE, + HOENN_DEX_SOLROCK, + HOENN_DEX_BARBOACH, + HOENN_DEX_WHISCASH, + HOENN_DEX_CORPHISH, + HOENN_DEX_CRAWDAUNT, + HOENN_DEX_BALTOY, + HOENN_DEX_CLAYDOL, + HOENN_DEX_LILEEP, + HOENN_DEX_CRADILY, + HOENN_DEX_ANORITH, + HOENN_DEX_ARMALDO, + HOENN_DEX_IGGLYBUFF, + HOENN_DEX_JIGGLYPUFF, + HOENN_DEX_WIGGLYTUFF, + HOENN_DEX_FEEBAS, + HOENN_DEX_MILOTIC, + HOENN_DEX_CASTFORM, + HOENN_DEX_STARYU, + HOENN_DEX_STARMIE, + HOENN_DEX_KECLEON, + HOENN_DEX_SHUPPET, + HOENN_DEX_BANETTE, + HOENN_DEX_DUSKULL, + HOENN_DEX_DUSCLOPS, + HOENN_DEX_TROPIUS, + HOENN_DEX_CHIMECHO, + HOENN_DEX_ABSOL, + HOENN_DEX_VULPIX, + HOENN_DEX_NINETALES, + HOENN_DEX_PICHU, + HOENN_DEX_PIKACHU, + HOENN_DEX_RAICHU, + HOENN_DEX_PSYDUCK, + HOENN_DEX_GOLDUCK, + HOENN_DEX_WYNAUT, + HOENN_DEX_WOBBUFFET, + HOENN_DEX_NATU, + HOENN_DEX_XATU, + HOENN_DEX_GIRAFARIG, + HOENN_DEX_PHANPY, + HOENN_DEX_DONPHAN, + HOENN_DEX_PINSIR, + HOENN_DEX_HERACROSS, + HOENN_DEX_RHYHORN, + HOENN_DEX_RHYDON, + HOENN_DEX_SNORUNT, + HOENN_DEX_GLALIE, + HOENN_DEX_SPHEAL, + HOENN_DEX_SEALEO, + HOENN_DEX_WALREIN, + HOENN_DEX_CLAMPERL, + HOENN_DEX_HUNTAIL, + HOENN_DEX_GOREBYSS, + HOENN_DEX_RELICANTH, + HOENN_DEX_CORSOLA, + HOENN_DEX_CHINCHOU, + HOENN_DEX_LANTURN, + HOENN_DEX_LUVDISC, + HOENN_DEX_HORSEA, + HOENN_DEX_SEADRA, + HOENN_DEX_KINGDRA, + HOENN_DEX_BAGON, + HOENN_DEX_SHELGON, + HOENN_DEX_SALAMENCE, + HOENN_DEX_BELDUM, + HOENN_DEX_METANG, + HOENN_DEX_METAGROSS, + HOENN_DEX_REGIROCK, + HOENN_DEX_REGICE, + HOENN_DEX_REGISTEEL, + HOENN_DEX_LATIAS, + HOENN_DEX_LATIOS, + HOENN_DEX_KYOGRE, + HOENN_DEX_GROUDON, + HOENN_DEX_RAYQUAZA, + HOENN_DEX_JIRACHI, + HOENN_DEX_DEOXYS, + // End of Hoenn Dex (see HOENN_DEX_COUNT) + // Here below have values but are excluded from the Pokedex + HOENN_DEX_BULBASAUR, + HOENN_DEX_IVYSAUR, + HOENN_DEX_VENUSAUR, + HOENN_DEX_CHARMANDER, + HOENN_DEX_CHARMELEON, + HOENN_DEX_CHARIZARD, + HOENN_DEX_SQUIRTLE, + HOENN_DEX_WARTORTLE, + HOENN_DEX_BLASTOISE, + HOENN_DEX_CATERPIE, + HOENN_DEX_METAPOD, + HOENN_DEX_BUTTERFREE, + HOENN_DEX_WEEDLE, + HOENN_DEX_KAKUNA, + HOENN_DEX_BEEDRILL, + HOENN_DEX_PIDGEY, + HOENN_DEX_PIDGEOTTO, + HOENN_DEX_PIDGEOT, + HOENN_DEX_RATTATA, + HOENN_DEX_RATICATE, + HOENN_DEX_SPEAROW, + HOENN_DEX_FEAROW, + HOENN_DEX_EKANS, + HOENN_DEX_ARBOK, + HOENN_DEX_NIDORAN_F, + HOENN_DEX_NIDORINA, + HOENN_DEX_NIDOQUEEN, + HOENN_DEX_NIDORAN_M, + HOENN_DEX_NIDORINO, + HOENN_DEX_NIDOKING, + HOENN_DEX_CLEFAIRY, + HOENN_DEX_CLEFABLE, + HOENN_DEX_PARAS, + HOENN_DEX_PARASECT, + HOENN_DEX_VENONAT, + HOENN_DEX_VENOMOTH, + HOENN_DEX_DIGLETT, + HOENN_DEX_DUGTRIO, + HOENN_DEX_MEOWTH, + HOENN_DEX_PERSIAN, + HOENN_DEX_MANKEY, + HOENN_DEX_PRIMEAPE, + HOENN_DEX_GROWLITHE, + HOENN_DEX_ARCANINE, + HOENN_DEX_POLIWAG, + HOENN_DEX_POLIWHIRL, + HOENN_DEX_POLIWRATH, + HOENN_DEX_BELLSPROUT, + HOENN_DEX_WEEPINBELL, + HOENN_DEX_VICTREEBEL, + HOENN_DEX_PONYTA, + HOENN_DEX_RAPIDASH, + HOENN_DEX_SLOWPOKE, + HOENN_DEX_SLOWBRO, + HOENN_DEX_FARFETCHD, + HOENN_DEX_SEEL, + HOENN_DEX_DEWGONG, + HOENN_DEX_SHELLDER, + HOENN_DEX_CLOYSTER, + HOENN_DEX_GASTLY, + HOENN_DEX_HAUNTER, + HOENN_DEX_GENGAR, + HOENN_DEX_ONIX, + HOENN_DEX_DROWZEE, + HOENN_DEX_HYPNO, + HOENN_DEX_KRABBY, + HOENN_DEX_KINGLER, + HOENN_DEX_EXEGGCUTE, + HOENN_DEX_EXEGGUTOR, + HOENN_DEX_CUBONE, + HOENN_DEX_MAROWAK, + HOENN_DEX_HITMONLEE, + HOENN_DEX_HITMONCHAN, + HOENN_DEX_LICKITUNG, + HOENN_DEX_CHANSEY, + HOENN_DEX_TANGELA, + HOENN_DEX_KANGASKHAN, + HOENN_DEX_MR_MIME, + HOENN_DEX_SCYTHER, + HOENN_DEX_JYNX, + HOENN_DEX_ELECTABUZZ, + HOENN_DEX_MAGMAR, + HOENN_DEX_TAUROS, + HOENN_DEX_LAPRAS, + HOENN_DEX_DITTO, + HOENN_DEX_EEVEE, + HOENN_DEX_VAPOREON, + HOENN_DEX_JOLTEON, + HOENN_DEX_FLAREON, + HOENN_DEX_PORYGON, + HOENN_DEX_OMANYTE, + HOENN_DEX_OMASTAR, + HOENN_DEX_KABUTO, + HOENN_DEX_KABUTOPS, + HOENN_DEX_AERODACTYL, + HOENN_DEX_SNORLAX, + HOENN_DEX_ARTICUNO, + HOENN_DEX_ZAPDOS, + HOENN_DEX_MOLTRES, + HOENN_DEX_DRATINI, + HOENN_DEX_DRAGONAIR, + HOENN_DEX_DRAGONITE, + HOENN_DEX_MEWTWO, + HOENN_DEX_MEW, + HOENN_DEX_CHIKORITA, + HOENN_DEX_BAYLEEF, + HOENN_DEX_MEGANIUM, + HOENN_DEX_CYNDAQUIL, + HOENN_DEX_QUILAVA, + HOENN_DEX_TYPHLOSION, + HOENN_DEX_TOTODILE, + HOENN_DEX_CROCONAW, + HOENN_DEX_FERALIGATR, + HOENN_DEX_SENTRET, + HOENN_DEX_FURRET, + HOENN_DEX_HOOTHOOT, + HOENN_DEX_NOCTOWL, + HOENN_DEX_LEDYBA, + HOENN_DEX_LEDIAN, + HOENN_DEX_SPINARAK, + HOENN_DEX_ARIADOS, + HOENN_DEX_CLEFFA, + HOENN_DEX_TOGEPI, + HOENN_DEX_TOGETIC, + HOENN_DEX_MAREEP, + HOENN_DEX_FLAAFFY, + HOENN_DEX_AMPHAROS, + HOENN_DEX_SUDOWOODO, + HOENN_DEX_POLITOED, + HOENN_DEX_HOPPIP, + HOENN_DEX_SKIPLOOM, + HOENN_DEX_JUMPLUFF, + HOENN_DEX_AIPOM, + HOENN_DEX_SUNKERN, + HOENN_DEX_SUNFLORA, + HOENN_DEX_YANMA, + HOENN_DEX_WOOPER, + HOENN_DEX_QUAGSIRE, + HOENN_DEX_ESPEON, + HOENN_DEX_UMBREON, + HOENN_DEX_MURKROW, + HOENN_DEX_SLOWKING, + HOENN_DEX_MISDREAVUS, + HOENN_DEX_UNOWN, + HOENN_DEX_PINECO, + HOENN_DEX_FORRETRESS, + HOENN_DEX_DUNSPARCE, + HOENN_DEX_GLIGAR, + HOENN_DEX_STEELIX, + HOENN_DEX_SNUBBULL, + HOENN_DEX_GRANBULL, + HOENN_DEX_QWILFISH, + HOENN_DEX_SCIZOR, + HOENN_DEX_SHUCKLE, + HOENN_DEX_SNEASEL, + HOENN_DEX_TEDDIURSA, + HOENN_DEX_URSARING, + HOENN_DEX_SWINUB, + HOENN_DEX_PILOSWINE, + HOENN_DEX_REMORAID, + HOENN_DEX_OCTILLERY, + HOENN_DEX_DELIBIRD, + HOENN_DEX_MANTINE, + HOENN_DEX_HOUNDOUR, + HOENN_DEX_HOUNDOOM, + HOENN_DEX_PORYGON2, + HOENN_DEX_STANTLER, + HOENN_DEX_SMEARGLE, + HOENN_DEX_TYROGUE, + HOENN_DEX_HITMONTOP, + HOENN_DEX_SMOOCHUM, + HOENN_DEX_ELEKID, + HOENN_DEX_MAGBY, + HOENN_DEX_MILTANK, + HOENN_DEX_BLISSEY, + HOENN_DEX_RAIKOU, + HOENN_DEX_ENTEI, + HOENN_DEX_SUICUNE, + HOENN_DEX_LARVITAR, + HOENN_DEX_PUPITAR, + HOENN_DEX_TYRANITAR, + HOENN_DEX_LUGIA, + HOENN_DEX_HO_OH, + HOENN_DEX_CELEBI, + HOENN_DEX_OLD_UNOWN_B, + HOENN_DEX_OLD_UNOWN_C, + HOENN_DEX_OLD_UNOWN_D, + HOENN_DEX_OLD_UNOWN_E, + HOENN_DEX_OLD_UNOWN_F, + HOENN_DEX_OLD_UNOWN_G, + HOENN_DEX_OLD_UNOWN_H, + HOENN_DEX_OLD_UNOWN_I, + HOENN_DEX_OLD_UNOWN_J, + HOENN_DEX_OLD_UNOWN_K, + HOENN_DEX_OLD_UNOWN_L, + HOENN_DEX_OLD_UNOWN_M, + HOENN_DEX_OLD_UNOWN_N, + HOENN_DEX_OLD_UNOWN_O, + HOENN_DEX_OLD_UNOWN_P, + HOENN_DEX_OLD_UNOWN_Q, + HOENN_DEX_OLD_UNOWN_R, + HOENN_DEX_OLD_UNOWN_S, + HOENN_DEX_OLD_UNOWN_T, + HOENN_DEX_OLD_UNOWN_U, + HOENN_DEX_OLD_UNOWN_V, + HOENN_DEX_OLD_UNOWN_W, + HOENN_DEX_OLD_UNOWN_X, + HOENN_DEX_OLD_UNOWN_Y, + HOENN_DEX_OLD_UNOWN_Z, +}; + +#define HOENN_DEX_COUNT HOENN_DEX_DEOXYS + +#endif // GUARD_CONSTANTS_POKEDEX_H diff --git a/include/constants/species.h b/include/constants/species.h index 983e1a7964..ec60c142ed 100644 --- a/include/constants/species.h +++ b/include/constants/species.h @@ -447,847 +447,4 @@ #define SPECIES_UNOWN_EMARK (SPECIES_UNOWN_B + 25) #define SPECIES_UNOWN_QMARK (SPECIES_UNOWN_B + 26) -// National Dex Index Defines - -#define NATIONAL_DEX_NONE 0 -#define NATIONAL_DEX_BULBASAUR 1 -#define NATIONAL_DEX_IVYSAUR 2 -#define NATIONAL_DEX_VENUSAUR 3 -#define NATIONAL_DEX_CHARMANDER 4 -#define NATIONAL_DEX_CHARMELEON 5 -#define NATIONAL_DEX_CHARIZARD 6 -#define NATIONAL_DEX_SQUIRTLE 7 -#define NATIONAL_DEX_WARTORTLE 8 -#define NATIONAL_DEX_BLASTOISE 9 -#define NATIONAL_DEX_CATERPIE 10 -#define NATIONAL_DEX_METAPOD 11 -#define NATIONAL_DEX_BUTTERFREE 12 -#define NATIONAL_DEX_WEEDLE 13 -#define NATIONAL_DEX_KAKUNA 14 -#define NATIONAL_DEX_BEEDRILL 15 -#define NATIONAL_DEX_PIDGEY 16 -#define NATIONAL_DEX_PIDGEOTTO 17 -#define NATIONAL_DEX_PIDGEOT 18 -#define NATIONAL_DEX_RATTATA 19 -#define NATIONAL_DEX_RATICATE 20 -#define NATIONAL_DEX_SPEAROW 21 -#define NATIONAL_DEX_FEAROW 22 -#define NATIONAL_DEX_EKANS 23 -#define NATIONAL_DEX_ARBOK 24 -#define NATIONAL_DEX_PIKACHU 25 -#define NATIONAL_DEX_RAICHU 26 -#define NATIONAL_DEX_SANDSHREW 27 -#define NATIONAL_DEX_SANDSLASH 28 -#define NATIONAL_DEX_NIDORAN_F 29 -#define NATIONAL_DEX_NIDORINA 30 -#define NATIONAL_DEX_NIDOQUEEN 31 -#define NATIONAL_DEX_NIDORAN_M 32 -#define NATIONAL_DEX_NIDORINO 33 -#define NATIONAL_DEX_NIDOKING 34 -#define NATIONAL_DEX_CLEFAIRY 35 -#define NATIONAL_DEX_CLEFABLE 36 -#define NATIONAL_DEX_VULPIX 37 -#define NATIONAL_DEX_NINETALES 38 -#define NATIONAL_DEX_JIGGLYPUFF 39 -#define NATIONAL_DEX_WIGGLYTUFF 40 -#define NATIONAL_DEX_ZUBAT 41 -#define NATIONAL_DEX_GOLBAT 42 -#define NATIONAL_DEX_ODDISH 43 -#define NATIONAL_DEX_GLOOM 44 -#define NATIONAL_DEX_VILEPLUME 45 -#define NATIONAL_DEX_PARAS 46 -#define NATIONAL_DEX_PARASECT 47 -#define NATIONAL_DEX_VENONAT 48 -#define NATIONAL_DEX_VENOMOTH 49 -#define NATIONAL_DEX_DIGLETT 50 -#define NATIONAL_DEX_DUGTRIO 51 -#define NATIONAL_DEX_MEOWTH 52 -#define NATIONAL_DEX_PERSIAN 53 -#define NATIONAL_DEX_PSYDUCK 54 -#define NATIONAL_DEX_GOLDUCK 55 -#define NATIONAL_DEX_MANKEY 56 -#define NATIONAL_DEX_PRIMEAPE 57 -#define NATIONAL_DEX_GROWLITHE 58 -#define NATIONAL_DEX_ARCANINE 59 -#define NATIONAL_DEX_POLIWAG 60 -#define NATIONAL_DEX_POLIWHIRL 61 -#define NATIONAL_DEX_POLIWRATH 62 -#define NATIONAL_DEX_ABRA 63 -#define NATIONAL_DEX_KADABRA 64 -#define NATIONAL_DEX_ALAKAZAM 65 -#define NATIONAL_DEX_MACHOP 66 -#define NATIONAL_DEX_MACHOKE 67 -#define NATIONAL_DEX_MACHAMP 68 -#define NATIONAL_DEX_BELLSPROUT 69 -#define NATIONAL_DEX_WEEPINBELL 70 -#define NATIONAL_DEX_VICTREEBEL 71 -#define NATIONAL_DEX_TENTACOOL 72 -#define NATIONAL_DEX_TENTACRUEL 73 -#define NATIONAL_DEX_GEODUDE 74 -#define NATIONAL_DEX_GRAVELER 75 -#define NATIONAL_DEX_GOLEM 76 -#define NATIONAL_DEX_PONYTA 77 -#define NATIONAL_DEX_RAPIDASH 78 -#define NATIONAL_DEX_SLOWPOKE 79 -#define NATIONAL_DEX_SLOWBRO 80 -#define NATIONAL_DEX_MAGNEMITE 81 -#define NATIONAL_DEX_MAGNETON 82 -#define NATIONAL_DEX_FARFETCHD 83 -#define NATIONAL_DEX_DODUO 84 -#define NATIONAL_DEX_DODRIO 85 -#define NATIONAL_DEX_SEEL 86 -#define NATIONAL_DEX_DEWGONG 87 -#define NATIONAL_DEX_GRIMER 88 -#define NATIONAL_DEX_MUK 89 -#define NATIONAL_DEX_SHELLDER 90 -#define NATIONAL_DEX_CLOYSTER 91 -#define NATIONAL_DEX_GASTLY 92 -#define NATIONAL_DEX_HAUNTER 93 -#define NATIONAL_DEX_GENGAR 94 -#define NATIONAL_DEX_ONIX 95 -#define NATIONAL_DEX_DROWZEE 96 -#define NATIONAL_DEX_HYPNO 97 -#define NATIONAL_DEX_KRABBY 98 -#define NATIONAL_DEX_KINGLER 99 -#define NATIONAL_DEX_VOLTORB 100 -#define NATIONAL_DEX_ELECTRODE 101 -#define NATIONAL_DEX_EXEGGCUTE 102 -#define NATIONAL_DEX_EXEGGUTOR 103 -#define NATIONAL_DEX_CUBONE 104 -#define NATIONAL_DEX_MAROWAK 105 -#define NATIONAL_DEX_HITMONLEE 106 -#define NATIONAL_DEX_HITMONCHAN 107 -#define NATIONAL_DEX_LICKITUNG 108 -#define NATIONAL_DEX_KOFFING 109 -#define NATIONAL_DEX_WEEZING 110 -#define NATIONAL_DEX_RHYHORN 111 -#define NATIONAL_DEX_RHYDON 112 -#define NATIONAL_DEX_CHANSEY 113 -#define NATIONAL_DEX_TANGELA 114 -#define NATIONAL_DEX_KANGASKHAN 115 -#define NATIONAL_DEX_HORSEA 116 -#define NATIONAL_DEX_SEADRA 117 -#define NATIONAL_DEX_GOLDEEN 118 -#define NATIONAL_DEX_SEAKING 119 -#define NATIONAL_DEX_STARYU 120 -#define NATIONAL_DEX_STARMIE 121 -#define NATIONAL_DEX_MR_MIME 122 -#define NATIONAL_DEX_SCYTHER 123 -#define NATIONAL_DEX_JYNX 124 -#define NATIONAL_DEX_ELECTABUZZ 125 -#define NATIONAL_DEX_MAGMAR 126 -#define NATIONAL_DEX_PINSIR 127 -#define NATIONAL_DEX_TAUROS 128 -#define NATIONAL_DEX_MAGIKARP 129 -#define NATIONAL_DEX_GYARADOS 130 -#define NATIONAL_DEX_LAPRAS 131 -#define NATIONAL_DEX_DITTO 132 -#define NATIONAL_DEX_EEVEE 133 -#define NATIONAL_DEX_VAPOREON 134 -#define NATIONAL_DEX_JOLTEON 135 -#define NATIONAL_DEX_FLAREON 136 -#define NATIONAL_DEX_PORYGON 137 -#define NATIONAL_DEX_OMANYTE 138 -#define NATIONAL_DEX_OMASTAR 139 -#define NATIONAL_DEX_KABUTO 140 -#define NATIONAL_DEX_KABUTOPS 141 -#define NATIONAL_DEX_AERODACTYL 142 -#define NATIONAL_DEX_SNORLAX 143 -#define NATIONAL_DEX_ARTICUNO 144 -#define NATIONAL_DEX_ZAPDOS 145 -#define NATIONAL_DEX_MOLTRES 146 -#define NATIONAL_DEX_DRATINI 147 -#define NATIONAL_DEX_DRAGONAIR 148 -#define NATIONAL_DEX_DRAGONITE 149 -#define NATIONAL_DEX_MEWTWO 150 -#define NATIONAL_DEX_MEW 151 - -#define KANTO_DEX_COUNT NATIONAL_DEX_MEW - -#define NATIONAL_DEX_CHIKORITA 152 -#define NATIONAL_DEX_BAYLEEF 153 -#define NATIONAL_DEX_MEGANIUM 154 -#define NATIONAL_DEX_CYNDAQUIL 155 -#define NATIONAL_DEX_QUILAVA 156 -#define NATIONAL_DEX_TYPHLOSION 157 -#define NATIONAL_DEX_TOTODILE 158 -#define NATIONAL_DEX_CROCONAW 159 -#define NATIONAL_DEX_FERALIGATR 160 -#define NATIONAL_DEX_SENTRET 161 -#define NATIONAL_DEX_FURRET 162 -#define NATIONAL_DEX_HOOTHOOT 163 -#define NATIONAL_DEX_NOCTOWL 164 -#define NATIONAL_DEX_LEDYBA 165 -#define NATIONAL_DEX_LEDIAN 166 -#define NATIONAL_DEX_SPINARAK 167 -#define NATIONAL_DEX_ARIADOS 168 -#define NATIONAL_DEX_CROBAT 169 -#define NATIONAL_DEX_CHINCHOU 170 -#define NATIONAL_DEX_LANTURN 171 -#define NATIONAL_DEX_PICHU 172 -#define NATIONAL_DEX_CLEFFA 173 -#define NATIONAL_DEX_IGGLYBUFF 174 -#define NATIONAL_DEX_TOGEPI 175 -#define NATIONAL_DEX_TOGETIC 176 -#define NATIONAL_DEX_NATU 177 -#define NATIONAL_DEX_XATU 178 -#define NATIONAL_DEX_MAREEP 179 -#define NATIONAL_DEX_FLAAFFY 180 -#define NATIONAL_DEX_AMPHAROS 181 -#define NATIONAL_DEX_BELLOSSOM 182 -#define NATIONAL_DEX_MARILL 183 -#define NATIONAL_DEX_AZUMARILL 184 -#define NATIONAL_DEX_SUDOWOODO 185 -#define NATIONAL_DEX_POLITOED 186 -#define NATIONAL_DEX_HOPPIP 187 -#define NATIONAL_DEX_SKIPLOOM 188 -#define NATIONAL_DEX_JUMPLUFF 189 -#define NATIONAL_DEX_AIPOM 190 -#define NATIONAL_DEX_SUNKERN 191 -#define NATIONAL_DEX_SUNFLORA 192 -#define NATIONAL_DEX_YANMA 193 -#define NATIONAL_DEX_WOOPER 194 -#define NATIONAL_DEX_QUAGSIRE 195 -#define NATIONAL_DEX_ESPEON 196 -#define NATIONAL_DEX_UMBREON 197 -#define NATIONAL_DEX_MURKROW 198 -#define NATIONAL_DEX_SLOWKING 199 -#define NATIONAL_DEX_MISDREAVUS 200 -#define NATIONAL_DEX_UNOWN 201 -#define NATIONAL_DEX_WOBBUFFET 202 -#define NATIONAL_DEX_GIRAFARIG 203 -#define NATIONAL_DEX_PINECO 204 -#define NATIONAL_DEX_FORRETRESS 205 -#define NATIONAL_DEX_DUNSPARCE 206 -#define NATIONAL_DEX_GLIGAR 207 -#define NATIONAL_DEX_STEELIX 208 -#define NATIONAL_DEX_SNUBBULL 209 -#define NATIONAL_DEX_GRANBULL 210 -#define NATIONAL_DEX_QWILFISH 211 -#define NATIONAL_DEX_SCIZOR 212 -#define NATIONAL_DEX_SHUCKLE 213 -#define NATIONAL_DEX_HERACROSS 214 -#define NATIONAL_DEX_SNEASEL 215 -#define NATIONAL_DEX_TEDDIURSA 216 -#define NATIONAL_DEX_URSARING 217 -#define NATIONAL_DEX_SLUGMA 218 -#define NATIONAL_DEX_MAGCARGO 219 -#define NATIONAL_DEX_SWINUB 220 -#define NATIONAL_DEX_PILOSWINE 221 -#define NATIONAL_DEX_CORSOLA 222 -#define NATIONAL_DEX_REMORAID 223 -#define NATIONAL_DEX_OCTILLERY 224 -#define NATIONAL_DEX_DELIBIRD 225 -#define NATIONAL_DEX_MANTINE 226 -#define NATIONAL_DEX_SKARMORY 227 -#define NATIONAL_DEX_HOUNDOUR 228 -#define NATIONAL_DEX_HOUNDOOM 229 -#define NATIONAL_DEX_KINGDRA 230 -#define NATIONAL_DEX_PHANPY 231 -#define NATIONAL_DEX_DONPHAN 232 -#define NATIONAL_DEX_PORYGON2 233 -#define NATIONAL_DEX_STANTLER 234 -#define NATIONAL_DEX_SMEARGLE 235 -#define NATIONAL_DEX_TYROGUE 236 -#define NATIONAL_DEX_HITMONTOP 237 -#define NATIONAL_DEX_SMOOCHUM 238 -#define NATIONAL_DEX_ELEKID 239 -#define NATIONAL_DEX_MAGBY 240 -#define NATIONAL_DEX_MILTANK 241 -#define NATIONAL_DEX_BLISSEY 242 -#define NATIONAL_DEX_RAIKOU 243 -#define NATIONAL_DEX_ENTEI 244 -#define NATIONAL_DEX_SUICUNE 245 -#define NATIONAL_DEX_LARVITAR 246 -#define NATIONAL_DEX_PUPITAR 247 -#define NATIONAL_DEX_TYRANITAR 248 -#define NATIONAL_DEX_LUGIA 249 -#define NATIONAL_DEX_HO_OH 250 -#define NATIONAL_DEX_CELEBI 251 - -#define JOHTO_DEX_COUNT NATIONAL_DEX_CELEBI - -#define NATIONAL_DEX_TREECKO 252 -#define NATIONAL_DEX_GROVYLE 253 -#define NATIONAL_DEX_SCEPTILE 254 -#define NATIONAL_DEX_TORCHIC 255 -#define NATIONAL_DEX_COMBUSKEN 256 -#define NATIONAL_DEX_BLAZIKEN 257 -#define NATIONAL_DEX_MUDKIP 258 -#define NATIONAL_DEX_MARSHTOMP 259 -#define NATIONAL_DEX_SWAMPERT 260 -#define NATIONAL_DEX_POOCHYENA 261 -#define NATIONAL_DEX_MIGHTYENA 262 -#define NATIONAL_DEX_ZIGZAGOON 263 -#define NATIONAL_DEX_LINOONE 264 -#define NATIONAL_DEX_WURMPLE 265 -#define NATIONAL_DEX_SILCOON 266 -#define NATIONAL_DEX_BEAUTIFLY 267 -#define NATIONAL_DEX_CASCOON 268 -#define NATIONAL_DEX_DUSTOX 269 -#define NATIONAL_DEX_LOTAD 270 -#define NATIONAL_DEX_LOMBRE 271 -#define NATIONAL_DEX_LUDICOLO 272 -#define NATIONAL_DEX_SEEDOT 273 -#define NATIONAL_DEX_NUZLEAF 274 -#define NATIONAL_DEX_SHIFTRY 275 -#define NATIONAL_DEX_TAILLOW 276 -#define NATIONAL_DEX_SWELLOW 277 -#define NATIONAL_DEX_WINGULL 278 -#define NATIONAL_DEX_PELIPPER 279 -#define NATIONAL_DEX_RALTS 280 -#define NATIONAL_DEX_KIRLIA 281 -#define NATIONAL_DEX_GARDEVOIR 282 -#define NATIONAL_DEX_SURSKIT 283 -#define NATIONAL_DEX_MASQUERAIN 284 -#define NATIONAL_DEX_SHROOMISH 285 -#define NATIONAL_DEX_BRELOOM 286 -#define NATIONAL_DEX_SLAKOTH 287 -#define NATIONAL_DEX_VIGOROTH 288 -#define NATIONAL_DEX_SLAKING 289 -#define NATIONAL_DEX_NINCADA 290 -#define NATIONAL_DEX_NINJASK 291 -#define NATIONAL_DEX_SHEDINJA 292 -#define NATIONAL_DEX_WHISMUR 293 -#define NATIONAL_DEX_LOUDRED 294 -#define NATIONAL_DEX_EXPLOUD 295 -#define NATIONAL_DEX_MAKUHITA 296 -#define NATIONAL_DEX_HARIYAMA 297 -#define NATIONAL_DEX_AZURILL 298 -#define NATIONAL_DEX_NOSEPASS 299 -#define NATIONAL_DEX_SKITTY 300 -#define NATIONAL_DEX_DELCATTY 301 -#define NATIONAL_DEX_SABLEYE 302 -#define NATIONAL_DEX_MAWILE 303 -#define NATIONAL_DEX_ARON 304 -#define NATIONAL_DEX_LAIRON 305 -#define NATIONAL_DEX_AGGRON 306 -#define NATIONAL_DEX_MEDITITE 307 -#define NATIONAL_DEX_MEDICHAM 308 -#define NATIONAL_DEX_ELECTRIKE 309 -#define NATIONAL_DEX_MANECTRIC 310 -#define NATIONAL_DEX_PLUSLE 311 -#define NATIONAL_DEX_MINUN 312 -#define NATIONAL_DEX_VOLBEAT 313 -#define NATIONAL_DEX_ILLUMISE 314 -#define NATIONAL_DEX_ROSELIA 315 -#define NATIONAL_DEX_GULPIN 316 -#define NATIONAL_DEX_SWALOT 317 -#define NATIONAL_DEX_CARVANHA 318 -#define NATIONAL_DEX_SHARPEDO 319 -#define NATIONAL_DEX_WAILMER 320 -#define NATIONAL_DEX_WAILORD 321 -#define NATIONAL_DEX_NUMEL 322 -#define NATIONAL_DEX_CAMERUPT 323 -#define NATIONAL_DEX_TORKOAL 324 -#define NATIONAL_DEX_SPOINK 325 -#define NATIONAL_DEX_GRUMPIG 326 -#define NATIONAL_DEX_SPINDA 327 -#define NATIONAL_DEX_TRAPINCH 328 -#define NATIONAL_DEX_VIBRAVA 329 -#define NATIONAL_DEX_FLYGON 330 -#define NATIONAL_DEX_CACNEA 331 -#define NATIONAL_DEX_CACTURNE 332 -#define NATIONAL_DEX_SWABLU 333 -#define NATIONAL_DEX_ALTARIA 334 -#define NATIONAL_DEX_ZANGOOSE 335 -#define NATIONAL_DEX_SEVIPER 336 -#define NATIONAL_DEX_LUNATONE 337 -#define NATIONAL_DEX_SOLROCK 338 -#define NATIONAL_DEX_BARBOACH 339 -#define NATIONAL_DEX_WHISCASH 340 -#define NATIONAL_DEX_CORPHISH 341 -#define NATIONAL_DEX_CRAWDAUNT 342 -#define NATIONAL_DEX_BALTOY 343 -#define NATIONAL_DEX_CLAYDOL 344 -#define NATIONAL_DEX_LILEEP 345 -#define NATIONAL_DEX_CRADILY 346 -#define NATIONAL_DEX_ANORITH 347 -#define NATIONAL_DEX_ARMALDO 348 -#define NATIONAL_DEX_FEEBAS 349 -#define NATIONAL_DEX_MILOTIC 350 -#define NATIONAL_DEX_CASTFORM 351 -#define NATIONAL_DEX_KECLEON 352 -#define NATIONAL_DEX_SHUPPET 353 -#define NATIONAL_DEX_BANETTE 354 -#define NATIONAL_DEX_DUSKULL 355 -#define NATIONAL_DEX_DUSCLOPS 356 -#define NATIONAL_DEX_TROPIUS 357 -#define NATIONAL_DEX_CHIMECHO 358 -#define NATIONAL_DEX_ABSOL 359 -#define NATIONAL_DEX_WYNAUT 360 -#define NATIONAL_DEX_SNORUNT 361 -#define NATIONAL_DEX_GLALIE 362 -#define NATIONAL_DEX_SPHEAL 363 -#define NATIONAL_DEX_SEALEO 364 -#define NATIONAL_DEX_WALREIN 365 -#define NATIONAL_DEX_CLAMPERL 366 -#define NATIONAL_DEX_HUNTAIL 367 -#define NATIONAL_DEX_GOREBYSS 368 -#define NATIONAL_DEX_RELICANTH 369 -#define NATIONAL_DEX_LUVDISC 370 -#define NATIONAL_DEX_BAGON 371 -#define NATIONAL_DEX_SHELGON 372 -#define NATIONAL_DEX_SALAMENCE 373 -#define NATIONAL_DEX_BELDUM 374 -#define NATIONAL_DEX_METANG 375 -#define NATIONAL_DEX_METAGROSS 376 -#define NATIONAL_DEX_REGIROCK 377 -#define NATIONAL_DEX_REGICE 378 -#define NATIONAL_DEX_REGISTEEL 379 -#define NATIONAL_DEX_LATIAS 380 -#define NATIONAL_DEX_LATIOS 381 -#define NATIONAL_DEX_KYOGRE 382 -#define NATIONAL_DEX_GROUDON 383 -#define NATIONAL_DEX_RAYQUAZA 384 -#define NATIONAL_DEX_JIRACHI 385 -#define NATIONAL_DEX_DEOXYS 386 - -#define NATIONAL_DEX_COUNT NATIONAL_DEX_DEOXYS - -#define NATIONAL_DEX_OLD_UNOWN_B (NATIONAL_DEX_COUNT + 1) -#define NATIONAL_DEX_OLD_UNOWN_C (NATIONAL_DEX_OLD_UNOWN_B + 1) -#define NATIONAL_DEX_OLD_UNOWN_D (NATIONAL_DEX_OLD_UNOWN_B + 2) -#define NATIONAL_DEX_OLD_UNOWN_E (NATIONAL_DEX_OLD_UNOWN_B + 3) -#define NATIONAL_DEX_OLD_UNOWN_F (NATIONAL_DEX_OLD_UNOWN_B + 4) -#define NATIONAL_DEX_OLD_UNOWN_G (NATIONAL_DEX_OLD_UNOWN_B + 5) -#define NATIONAL_DEX_OLD_UNOWN_H (NATIONAL_DEX_OLD_UNOWN_B + 6) -#define NATIONAL_DEX_OLD_UNOWN_I (NATIONAL_DEX_OLD_UNOWN_B + 7) -#define NATIONAL_DEX_OLD_UNOWN_J (NATIONAL_DEX_OLD_UNOWN_B + 8) -#define NATIONAL_DEX_OLD_UNOWN_K (NATIONAL_DEX_OLD_UNOWN_B + 9) -#define NATIONAL_DEX_OLD_UNOWN_L (NATIONAL_DEX_OLD_UNOWN_B + 10) -#define NATIONAL_DEX_OLD_UNOWN_M (NATIONAL_DEX_OLD_UNOWN_B + 11) -#define NATIONAL_DEX_OLD_UNOWN_N (NATIONAL_DEX_OLD_UNOWN_B + 12) -#define NATIONAL_DEX_OLD_UNOWN_O (NATIONAL_DEX_OLD_UNOWN_B + 13) -#define NATIONAL_DEX_OLD_UNOWN_P (NATIONAL_DEX_OLD_UNOWN_B + 14) -#define NATIONAL_DEX_OLD_UNOWN_Q (NATIONAL_DEX_OLD_UNOWN_B + 15) -#define NATIONAL_DEX_OLD_UNOWN_R (NATIONAL_DEX_OLD_UNOWN_B + 16) -#define NATIONAL_DEX_OLD_UNOWN_S (NATIONAL_DEX_OLD_UNOWN_B + 17) -#define NATIONAL_DEX_OLD_UNOWN_T (NATIONAL_DEX_OLD_UNOWN_B + 18) -#define NATIONAL_DEX_OLD_UNOWN_U (NATIONAL_DEX_OLD_UNOWN_B + 19) -#define NATIONAL_DEX_OLD_UNOWN_V (NATIONAL_DEX_OLD_UNOWN_B + 20) -#define NATIONAL_DEX_OLD_UNOWN_W (NATIONAL_DEX_OLD_UNOWN_B + 21) -#define NATIONAL_DEX_OLD_UNOWN_X (NATIONAL_DEX_OLD_UNOWN_B + 22) -#define NATIONAL_DEX_OLD_UNOWN_Y (NATIONAL_DEX_OLD_UNOWN_B + 23) -#define NATIONAL_DEX_OLD_UNOWN_Z (NATIONAL_DEX_OLD_UNOWN_B + 24) - -// Hoenn Dex Index Defines - -#define HOENN_DEX_NONE 0 -#define HOENN_DEX_TREECKO 1 -#define HOENN_DEX_GROVYLE 2 -#define HOENN_DEX_SCEPTILE 3 -#define HOENN_DEX_TORCHIC 4 -#define HOENN_DEX_COMBUSKEN 5 -#define HOENN_DEX_BLAZIKEN 6 -#define HOENN_DEX_MUDKIP 7 -#define HOENN_DEX_MARSHTOMP 8 -#define HOENN_DEX_SWAMPERT 9 -#define HOENN_DEX_POOCHYENA 10 -#define HOENN_DEX_MIGHTYENA 11 -#define HOENN_DEX_ZIGZAGOON 12 -#define HOENN_DEX_LINOONE 13 -#define HOENN_DEX_WURMPLE 14 -#define HOENN_DEX_SILCOON 15 -#define HOENN_DEX_BEAUTIFLY 16 -#define HOENN_DEX_CASCOON 17 -#define HOENN_DEX_DUSTOX 18 -#define HOENN_DEX_LOTAD 19 -#define HOENN_DEX_LOMBRE 20 -#define HOENN_DEX_LUDICOLO 21 -#define HOENN_DEX_SEEDOT 22 -#define HOENN_DEX_NUZLEAF 23 -#define HOENN_DEX_SHIFTRY 24 -#define HOENN_DEX_TAILLOW 25 -#define HOENN_DEX_SWELLOW 26 -#define HOENN_DEX_WINGULL 27 -#define HOENN_DEX_PELIPPER 28 -#define HOENN_DEX_RALTS 29 -#define HOENN_DEX_KIRLIA 30 -#define HOENN_DEX_GARDEVOIR 31 -#define HOENN_DEX_SURSKIT 32 -#define HOENN_DEX_MASQUERAIN 33 -#define HOENN_DEX_SHROOMISH 34 -#define HOENN_DEX_BRELOOM 35 -#define HOENN_DEX_SLAKOTH 36 -#define HOENN_DEX_VIGOROTH 37 -#define HOENN_DEX_SLAKING 38 -#define HOENN_DEX_ABRA 39 -#define HOENN_DEX_KADABRA 40 -#define HOENN_DEX_ALAKAZAM 41 -#define HOENN_DEX_NINCADA 42 -#define HOENN_DEX_NINJASK 43 -#define HOENN_DEX_SHEDINJA 44 -#define HOENN_DEX_WHISMUR 45 -#define HOENN_DEX_LOUDRED 46 -#define HOENN_DEX_EXPLOUD 47 -#define HOENN_DEX_MAKUHITA 48 -#define HOENN_DEX_HARIYAMA 49 -#define HOENN_DEX_GOLDEEN 50 -#define HOENN_DEX_SEAKING 51 -#define HOENN_DEX_MAGIKARP 52 -#define HOENN_DEX_GYARADOS 53 -#define HOENN_DEX_AZURILL 54 -#define HOENN_DEX_MARILL 55 -#define HOENN_DEX_AZUMARILL 56 -#define HOENN_DEX_GEODUDE 57 -#define HOENN_DEX_GRAVELER 58 -#define HOENN_DEX_GOLEM 59 -#define HOENN_DEX_NOSEPASS 60 -#define HOENN_DEX_SKITTY 61 -#define HOENN_DEX_DELCATTY 62 -#define HOENN_DEX_ZUBAT 63 -#define HOENN_DEX_GOLBAT 64 -#define HOENN_DEX_CROBAT 65 -#define HOENN_DEX_TENTACOOL 66 -#define HOENN_DEX_TENTACRUEL 67 -#define HOENN_DEX_SABLEYE 68 -#define HOENN_DEX_MAWILE 69 -#define HOENN_DEX_ARON 70 -#define HOENN_DEX_LAIRON 71 -#define HOENN_DEX_AGGRON 72 -#define HOENN_DEX_MACHOP 73 -#define HOENN_DEX_MACHOKE 74 -#define HOENN_DEX_MACHAMP 75 -#define HOENN_DEX_MEDITITE 76 -#define HOENN_DEX_MEDICHAM 77 -#define HOENN_DEX_ELECTRIKE 78 -#define HOENN_DEX_MANECTRIC 79 -#define HOENN_DEX_PLUSLE 80 -#define HOENN_DEX_MINUN 81 -#define HOENN_DEX_MAGNEMITE 82 -#define HOENN_DEX_MAGNETON 83 -#define HOENN_DEX_VOLTORB 84 -#define HOENN_DEX_ELECTRODE 85 -#define HOENN_DEX_VOLBEAT 86 -#define HOENN_DEX_ILLUMISE 87 -#define HOENN_DEX_ODDISH 88 -#define HOENN_DEX_GLOOM 89 -#define HOENN_DEX_VILEPLUME 90 -#define HOENN_DEX_BELLOSSOM 91 -#define HOENN_DEX_DODUO 92 -#define HOENN_DEX_DODRIO 93 -#define HOENN_DEX_ROSELIA 94 -#define HOENN_DEX_GULPIN 95 -#define HOENN_DEX_SWALOT 96 -#define HOENN_DEX_CARVANHA 97 -#define HOENN_DEX_SHARPEDO 98 -#define HOENN_DEX_WAILMER 99 -#define HOENN_DEX_WAILORD 100 -#define HOENN_DEX_NUMEL 101 -#define HOENN_DEX_CAMERUPT 102 -#define HOENN_DEX_SLUGMA 103 -#define HOENN_DEX_MAGCARGO 104 -#define HOENN_DEX_TORKOAL 105 -#define HOENN_DEX_GRIMER 106 -#define HOENN_DEX_MUK 107 -#define HOENN_DEX_KOFFING 108 -#define HOENN_DEX_WEEZING 109 -#define HOENN_DEX_SPOINK 110 -#define HOENN_DEX_GRUMPIG 111 -#define HOENN_DEX_SANDSHREW 112 -#define HOENN_DEX_SANDSLASH 113 -#define HOENN_DEX_SPINDA 114 -#define HOENN_DEX_SKARMORY 115 -#define HOENN_DEX_TRAPINCH 116 -#define HOENN_DEX_VIBRAVA 117 -#define HOENN_DEX_FLYGON 118 -#define HOENN_DEX_CACNEA 119 -#define HOENN_DEX_CACTURNE 120 -#define HOENN_DEX_SWABLU 121 -#define HOENN_DEX_ALTARIA 122 -#define HOENN_DEX_ZANGOOSE 123 -#define HOENN_DEX_SEVIPER 124 -#define HOENN_DEX_LUNATONE 125 -#define HOENN_DEX_SOLROCK 126 -#define HOENN_DEX_BARBOACH 127 -#define HOENN_DEX_WHISCASH 128 -#define HOENN_DEX_CORPHISH 129 -#define HOENN_DEX_CRAWDAUNT 130 -#define HOENN_DEX_BALTOY 131 -#define HOENN_DEX_CLAYDOL 132 -#define HOENN_DEX_LILEEP 133 -#define HOENN_DEX_CRADILY 134 -#define HOENN_DEX_ANORITH 135 -#define HOENN_DEX_ARMALDO 136 -#define HOENN_DEX_IGGLYBUFF 137 -#define HOENN_DEX_JIGGLYPUFF 138 -#define HOENN_DEX_WIGGLYTUFF 139 -#define HOENN_DEX_FEEBAS 140 -#define HOENN_DEX_MILOTIC 141 -#define HOENN_DEX_CASTFORM 142 -#define HOENN_DEX_STARYU 143 -#define HOENN_DEX_STARMIE 144 -#define HOENN_DEX_KECLEON 145 -#define HOENN_DEX_SHUPPET 146 -#define HOENN_DEX_BANETTE 147 -#define HOENN_DEX_DUSKULL 148 -#define HOENN_DEX_DUSCLOPS 149 -#define HOENN_DEX_TROPIUS 150 -#define HOENN_DEX_CHIMECHO 151 -#define HOENN_DEX_ABSOL 152 -#define HOENN_DEX_VULPIX 153 -#define HOENN_DEX_NINETALES 154 -#define HOENN_DEX_PICHU 155 -#define HOENN_DEX_PIKACHU 156 -#define HOENN_DEX_RAICHU 157 -#define HOENN_DEX_PSYDUCK 158 -#define HOENN_DEX_GOLDUCK 159 -#define HOENN_DEX_WYNAUT 160 -#define HOENN_DEX_WOBBUFFET 161 -#define HOENN_DEX_NATU 162 -#define HOENN_DEX_XATU 163 -#define HOENN_DEX_GIRAFARIG 164 -#define HOENN_DEX_PHANPY 165 -#define HOENN_DEX_DONPHAN 166 -#define HOENN_DEX_PINSIR 167 -#define HOENN_DEX_HERACROSS 168 -#define HOENN_DEX_RHYHORN 169 -#define HOENN_DEX_RHYDON 170 -#define HOENN_DEX_SNORUNT 171 -#define HOENN_DEX_GLALIE 172 -#define HOENN_DEX_SPHEAL 173 -#define HOENN_DEX_SEALEO 174 -#define HOENN_DEX_WALREIN 175 -#define HOENN_DEX_CLAMPERL 176 -#define HOENN_DEX_HUNTAIL 177 -#define HOENN_DEX_GOREBYSS 178 -#define HOENN_DEX_RELICANTH 179 -#define HOENN_DEX_CORSOLA 180 -#define HOENN_DEX_CHINCHOU 181 -#define HOENN_DEX_LANTURN 182 -#define HOENN_DEX_LUVDISC 183 -#define HOENN_DEX_HORSEA 184 -#define HOENN_DEX_SEADRA 185 -#define HOENN_DEX_KINGDRA 186 -#define HOENN_DEX_BAGON 187 -#define HOENN_DEX_SHELGON 188 -#define HOENN_DEX_SALAMENCE 189 -#define HOENN_DEX_BELDUM 190 -#define HOENN_DEX_METANG 191 -#define HOENN_DEX_METAGROSS 192 -#define HOENN_DEX_REGIROCK 193 -#define HOENN_DEX_REGICE 194 -#define HOENN_DEX_REGISTEEL 195 -#define HOENN_DEX_LATIAS 196 -#define HOENN_DEX_LATIOS 197 -#define HOENN_DEX_KYOGRE 198 -#define HOENN_DEX_GROUDON 199 -#define HOENN_DEX_RAYQUAZA 200 -#define HOENN_DEX_JIRACHI 201 -#define HOENN_DEX_DEOXYS 202 - -#define HOENN_DEX_COUNT HOENN_DEX_DEOXYS - -#define HOENN_DEX_BULBASAUR 203 -#define HOENN_DEX_IVYSAUR 204 -#define HOENN_DEX_VENUSAUR 205 -#define HOENN_DEX_CHARMANDER 206 -#define HOENN_DEX_CHARMELEON 207 -#define HOENN_DEX_CHARIZARD 208 -#define HOENN_DEX_SQUIRTLE 209 -#define HOENN_DEX_WARTORTLE 210 -#define HOENN_DEX_BLASTOISE 211 -#define HOENN_DEX_CATERPIE 212 -#define HOENN_DEX_METAPOD 213 -#define HOENN_DEX_BUTTERFREE 214 -#define HOENN_DEX_WEEDLE 215 -#define HOENN_DEX_KAKUNA 216 -#define HOENN_DEX_BEEDRILL 217 -#define HOENN_DEX_PIDGEY 218 -#define HOENN_DEX_PIDGEOTTO 219 -#define HOENN_DEX_PIDGEOT 220 -#define HOENN_DEX_RATTATA 221 -#define HOENN_DEX_RATICATE 222 -#define HOENN_DEX_SPEAROW 223 -#define HOENN_DEX_FEAROW 224 -#define HOENN_DEX_EKANS 225 -#define HOENN_DEX_ARBOK 226 -#define HOENN_DEX_NIDORAN_F 227 -#define HOENN_DEX_NIDORINA 228 -#define HOENN_DEX_NIDOQUEEN 229 -#define HOENN_DEX_NIDORAN_M 230 -#define HOENN_DEX_NIDORINO 231 -#define HOENN_DEX_NIDOKING 232 -#define HOENN_DEX_CLEFAIRY 233 -#define HOENN_DEX_CLEFABLE 234 -#define HOENN_DEX_PARAS 235 -#define HOENN_DEX_PARASECT 236 -#define HOENN_DEX_VENONAT 237 -#define HOENN_DEX_VENOMOTH 238 -#define HOENN_DEX_DIGLETT 239 -#define HOENN_DEX_DUGTRIO 240 -#define HOENN_DEX_MEOWTH 241 -#define HOENN_DEX_PERSIAN 242 -#define HOENN_DEX_MANKEY 243 -#define HOENN_DEX_PRIMEAPE 244 -#define HOENN_DEX_GROWLITHE 245 -#define HOENN_DEX_ARCANINE 246 -#define HOENN_DEX_POLIWAG 247 -#define HOENN_DEX_POLIWHIRL 248 -#define HOENN_DEX_POLIWRATH 249 -#define HOENN_DEX_BELLSPROUT 250 -#define HOENN_DEX_WEEPINBELL 251 -#define HOENN_DEX_VICTREEBEL 252 -#define HOENN_DEX_PONYTA 253 -#define HOENN_DEX_RAPIDASH 254 -#define HOENN_DEX_SLOWPOKE 255 -#define HOENN_DEX_SLOWBRO 256 -#define HOENN_DEX_FARFETCHD 257 -#define HOENN_DEX_SEEL 258 -#define HOENN_DEX_DEWGONG 259 -#define HOENN_DEX_SHELLDER 260 -#define HOENN_DEX_CLOYSTER 261 -#define HOENN_DEX_GASTLY 262 -#define HOENN_DEX_HAUNTER 263 -#define HOENN_DEX_GENGAR 264 -#define HOENN_DEX_ONIX 265 -#define HOENN_DEX_DROWZEE 266 -#define HOENN_DEX_HYPNO 267 -#define HOENN_DEX_KRABBY 268 -#define HOENN_DEX_KINGLER 269 -#define HOENN_DEX_EXEGGCUTE 270 -#define HOENN_DEX_EXEGGUTOR 271 -#define HOENN_DEX_CUBONE 272 -#define HOENN_DEX_MAROWAK 273 -#define HOENN_DEX_HITMONLEE 274 -#define HOENN_DEX_HITMONCHAN 275 -#define HOENN_DEX_LICKITUNG 276 -#define HOENN_DEX_CHANSEY 277 -#define HOENN_DEX_TANGELA 278 -#define HOENN_DEX_KANGASKHAN 279 -#define HOENN_DEX_MR_MIME 280 -#define HOENN_DEX_SCYTHER 281 -#define HOENN_DEX_JYNX 282 -#define HOENN_DEX_ELECTABUZZ 283 -#define HOENN_DEX_MAGMAR 284 -#define HOENN_DEX_TAUROS 285 -#define HOENN_DEX_LAPRAS 286 -#define HOENN_DEX_DITTO 287 -#define HOENN_DEX_EEVEE 288 -#define HOENN_DEX_VAPOREON 289 -#define HOENN_DEX_JOLTEON 290 -#define HOENN_DEX_FLAREON 291 -#define HOENN_DEX_PORYGON 292 -#define HOENN_DEX_OMANYTE 293 -#define HOENN_DEX_OMASTAR 294 -#define HOENN_DEX_KABUTO 295 -#define HOENN_DEX_KABUTOPS 296 -#define HOENN_DEX_AERODACTYL 297 -#define HOENN_DEX_SNORLAX 298 -#define HOENN_DEX_ARTICUNO 299 -#define HOENN_DEX_ZAPDOS 300 -#define HOENN_DEX_MOLTRES 301 -#define HOENN_DEX_DRATINI 302 -#define HOENN_DEX_DRAGONAIR 303 -#define HOENN_DEX_DRAGONITE 304 -#define HOENN_DEX_MEWTWO 305 -#define HOENN_DEX_MEW 306 -#define HOENN_DEX_CHIKORITA 307 -#define HOENN_DEX_BAYLEEF 308 -#define HOENN_DEX_MEGANIUM 309 -#define HOENN_DEX_CYNDAQUIL 310 -#define HOENN_DEX_QUILAVA 311 -#define HOENN_DEX_TYPHLOSION 312 -#define HOENN_DEX_TOTODILE 313 -#define HOENN_DEX_CROCONAW 314 -#define HOENN_DEX_FERALIGATR 315 -#define HOENN_DEX_SENTRET 316 -#define HOENN_DEX_FURRET 317 -#define HOENN_DEX_HOOTHOOT 318 -#define HOENN_DEX_NOCTOWL 319 -#define HOENN_DEX_LEDYBA 320 -#define HOENN_DEX_LEDIAN 321 -#define HOENN_DEX_SPINARAK 322 -#define HOENN_DEX_ARIADOS 323 -#define HOENN_DEX_CLEFFA 324 -#define HOENN_DEX_TOGEPI 325 -#define HOENN_DEX_TOGETIC 326 -#define HOENN_DEX_MAREEP 327 -#define HOENN_DEX_FLAAFFY 328 -#define HOENN_DEX_AMPHAROS 329 -#define HOENN_DEX_SUDOWOODO 330 -#define HOENN_DEX_POLITOED 331 -#define HOENN_DEX_HOPPIP 332 -#define HOENN_DEX_SKIPLOOM 333 -#define HOENN_DEX_JUMPLUFF 334 -#define HOENN_DEX_AIPOM 335 -#define HOENN_DEX_SUNKERN 336 -#define HOENN_DEX_SUNFLORA 337 -#define HOENN_DEX_YANMA 338 -#define HOENN_DEX_WOOPER 339 -#define HOENN_DEX_QUAGSIRE 340 -#define HOENN_DEX_ESPEON 341 -#define HOENN_DEX_UMBREON 342 -#define HOENN_DEX_MURKROW 343 -#define HOENN_DEX_SLOWKING 344 -#define HOENN_DEX_MISDREAVUS 345 -#define HOENN_DEX_UNOWN 346 -#define HOENN_DEX_PINECO 347 -#define HOENN_DEX_FORRETRESS 348 -#define HOENN_DEX_DUNSPARCE 349 -#define HOENN_DEX_GLIGAR 350 -#define HOENN_DEX_STEELIX 351 -#define HOENN_DEX_SNUBBULL 352 -#define HOENN_DEX_GRANBULL 353 -#define HOENN_DEX_QWILFISH 354 -#define HOENN_DEX_SCIZOR 355 -#define HOENN_DEX_SHUCKLE 356 -#define HOENN_DEX_SNEASEL 357 -#define HOENN_DEX_TEDDIURSA 358 -#define HOENN_DEX_URSARING 359 -#define HOENN_DEX_SWINUB 360 -#define HOENN_DEX_PILOSWINE 361 -#define HOENN_DEX_REMORAID 362 -#define HOENN_DEX_OCTILLERY 363 -#define HOENN_DEX_DELIBIRD 364 -#define HOENN_DEX_MANTINE 365 -#define HOENN_DEX_HOUNDOUR 366 -#define HOENN_DEX_HOUNDOOM 367 -#define HOENN_DEX_PORYGON2 368 -#define HOENN_DEX_STANTLER 369 -#define HOENN_DEX_SMEARGLE 370 -#define HOENN_DEX_TYROGUE 371 -#define HOENN_DEX_HITMONTOP 372 -#define HOENN_DEX_SMOOCHUM 373 -#define HOENN_DEX_ELEKID 374 -#define HOENN_DEX_MAGBY 375 -#define HOENN_DEX_MILTANK 376 -#define HOENN_DEX_BLISSEY 377 -#define HOENN_DEX_RAIKOU 378 -#define HOENN_DEX_ENTEI 379 -#define HOENN_DEX_SUICUNE 380 -#define HOENN_DEX_LARVITAR 381 -#define HOENN_DEX_PUPITAR 382 -#define HOENN_DEX_TYRANITAR 383 -#define HOENN_DEX_LUGIA 384 -#define HOENN_DEX_HO_OH 385 -#define HOENN_DEX_CELEBI 386 - -#define HOENN_DEX_OLD_UNOWN_B (HOENN_DEX_CELEBI + 1) -#define HOENN_DEX_OLD_UNOWN_C (HOENN_DEX_OLD_UNOWN_B + 1) -#define HOENN_DEX_OLD_UNOWN_D (HOENN_DEX_OLD_UNOWN_B + 2) -#define HOENN_DEX_OLD_UNOWN_E (HOENN_DEX_OLD_UNOWN_B + 3) -#define HOENN_DEX_OLD_UNOWN_F (HOENN_DEX_OLD_UNOWN_B + 4) -#define HOENN_DEX_OLD_UNOWN_G (HOENN_DEX_OLD_UNOWN_B + 5) -#define HOENN_DEX_OLD_UNOWN_H (HOENN_DEX_OLD_UNOWN_B + 6) -#define HOENN_DEX_OLD_UNOWN_I (HOENN_DEX_OLD_UNOWN_B + 7) -#define HOENN_DEX_OLD_UNOWN_J (HOENN_DEX_OLD_UNOWN_B + 8) -#define HOENN_DEX_OLD_UNOWN_K (HOENN_DEX_OLD_UNOWN_B + 9) -#define HOENN_DEX_OLD_UNOWN_L (HOENN_DEX_OLD_UNOWN_B + 10) -#define HOENN_DEX_OLD_UNOWN_M (HOENN_DEX_OLD_UNOWN_B + 11) -#define HOENN_DEX_OLD_UNOWN_N (HOENN_DEX_OLD_UNOWN_B + 12) -#define HOENN_DEX_OLD_UNOWN_O (HOENN_DEX_OLD_UNOWN_B + 13) -#define HOENN_DEX_OLD_UNOWN_P (HOENN_DEX_OLD_UNOWN_B + 14) -#define HOENN_DEX_OLD_UNOWN_Q (HOENN_DEX_OLD_UNOWN_B + 15) -#define HOENN_DEX_OLD_UNOWN_R (HOENN_DEX_OLD_UNOWN_B + 16) -#define HOENN_DEX_OLD_UNOWN_S (HOENN_DEX_OLD_UNOWN_B + 17) -#define HOENN_DEX_OLD_UNOWN_T (HOENN_DEX_OLD_UNOWN_B + 18) -#define HOENN_DEX_OLD_UNOWN_U (HOENN_DEX_OLD_UNOWN_B + 19) -#define HOENN_DEX_OLD_UNOWN_V (HOENN_DEX_OLD_UNOWN_B + 20) -#define HOENN_DEX_OLD_UNOWN_W (HOENN_DEX_OLD_UNOWN_B + 21) -#define HOENN_DEX_OLD_UNOWN_X (HOENN_DEX_OLD_UNOWN_B + 22) -#define HOENN_DEX_OLD_UNOWN_Y (HOENN_DEX_OLD_UNOWN_B + 23) -#define HOENN_DEX_OLD_UNOWN_Z (HOENN_DEX_OLD_UNOWN_B + 24) - #endif // GUARD_CONSTANTS_SPECIES_H diff --git a/include/global.h b/include/global.h index 024280f986..377e20e0e8 100644 --- a/include/global.h +++ b/include/global.h @@ -9,6 +9,7 @@ #include "constants/flags.h" #include "constants/vars.h" #include "constants/species.h" +#include "constants/pokedex.h" #include "constants/berry.h" #include "constants/maps.h" @@ -125,7 +126,9 @@ #define ROUND_BITS_TO_BYTES(numBits) DIV_ROUND_UP(numBits, 8) -#define DEX_FLAGS_NO ROUND_BITS_TO_BYTES(NUM_SPECIES) +// NUM_DEX_FLAG_BYTES allocates more flags than it needs to, as NUM_SPECIES includes the "old unown" +// values that don't appear in the Pokedex. NATIONAL_DEX_COUNT does not include these values. +#define NUM_DEX_FLAG_BYTES ROUND_BITS_TO_BYTES(NUM_SPECIES) #define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT) struct Coords8 @@ -181,8 +184,8 @@ struct Pokedex /*0x04*/ u32 unownPersonality; // set when you first see Unown /*0x08*/ u32 spindaPersonality; // set when you first see Spinda /*0x0C*/ u32 unknown3; - /*0x10*/ u8 owned[DEX_FLAGS_NO]; - /*0x44*/ u8 seen[DEX_FLAGS_NO]; + /*0x10*/ u8 owned[NUM_DEX_FLAG_BYTES]; + /*0x44*/ u8 seen[NUM_DEX_FLAG_BYTES]; }; struct PokemonJumpRecords @@ -944,7 +947,7 @@ struct SaveBlock1 /*0x690*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT]; /*0x790*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT]; /*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT]; - /*0x988*/ u8 seen1[DEX_FLAGS_NO]; + /*0x988*/ u8 seen1[NUM_DEX_FLAG_BYTES]; /*0x9BC*/ u16 berryBlenderRecords[3]; /*0x9C2*/ u8 unused_9C2[6]; /*0x9C8*/ u16 trainerRematchStepCounter; @@ -1000,7 +1003,7 @@ struct SaveBlock1 /*0x3718*/ u32 trainerHillTimes[4]; /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; - /*0x3B24*/ u8 seen2[DEX_FLAGS_NO]; + /*0x3B24*/ u8 seen2[NUM_DEX_FLAG_BYTES]; /*0x3B58*/ LilycoveLady lilycoveLady; /*0x3B98*/ struct TrainerNameRecord trainerNameRecords[20]; /*0x3C88*/ u8 registeredTexts[UNION_ROOM_KB_ROW_COUNT][21]; diff --git a/src/pokedex.c b/src/pokedex.c index b419373024..206782e59e 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -1512,7 +1512,7 @@ void ResetPokedex(void) gSaveBlock2Ptr->pokedex.spindaPersonality = 0; gSaveBlock2Ptr->pokedex.unknown3 = 0; DisableNationalPokedex(); - for (i = 0; i < DEX_FLAGS_NO; i++) + for (i = 0; i < NUM_DEX_FLAG_BYTES; i++) { gSaveBlock2Ptr->pokedex.owned[i] = 0; gSaveBlock2Ptr->pokedex.seen[i] = 0; From d4111d55208d0f6ded77352859f6460a0c41e7e5 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 5 Jan 2022 14:50:19 -0500 Subject: [PATCH 317/417] Add comment about pokedex reordering --- src/pokemon.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index 939c2429da..9476dbb2e7 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -88,11 +88,14 @@ static const struct CombinedMove sCombinedMoves[2] = {0xFFFF, 0xFFFF, 0xFFFF} }; +// NOTE: The order of the elements in the 3 arrays below is irrelevant. +// To reorder the pokedex, see the values in include/constants/pokedex.h. + #define SPECIES_TO_HOENN(name) [SPECIES_##name - 1] = HOENN_DEX_##name #define SPECIES_TO_NATIONAL(name) [SPECIES_##name - 1] = NATIONAL_DEX_##name #define HOENN_TO_NATIONAL(name) [HOENN_DEX_##name - 1] = NATIONAL_DEX_##name - // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) +// Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) static const u16 sSpeciesToHoennPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_HOENN(BULBASAUR), @@ -508,7 +511,7 @@ static const u16 sSpeciesToHoennPokedexNum[NUM_SPECIES - 1] = SPECIES_TO_HOENN(CHIMECHO), }; - // Assigns all species to the National Dex Index (Summary No. for National Dex) +// Assigns all species to the National Dex Index (Summary No. for National Dex) static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_NATIONAL(BULBASAUR), @@ -924,7 +927,7 @@ static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] = SPECIES_TO_NATIONAL(CHIMECHO), }; - // Assigns all Hoenn Dex Indexes to a National Dex Index +// Assigns all Hoenn Dex Indexes to a National Dex Index static const u16 sHoennToNationalOrder[NUM_SPECIES - 1] = { HOENN_TO_NATIONAL(TREECKO), From 051ec7951d5de785102902082272ac29debded75 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Wed, 5 Jan 2022 22:26:14 -0300 Subject: [PATCH 318/417] Gen V and VI --- .../pokemon_graphics/enemy_mon_elevation.h | 49 ++++++++++++++++++- .../pokemon_graphics/front_pic_coordinates.h | 6 +-- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/src/data/pokemon_graphics/enemy_mon_elevation.h b/src/data/pokemon_graphics/enemy_mon_elevation.h index fcc2e2bc44..6971482d6b 100644 --- a/src/data/pokemon_graphics/enemy_mon_elevation.h +++ b/src/data/pokemon_graphics/enemy_mon_elevation.h @@ -80,6 +80,8 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_CRESSELIA] = 3, [SPECIES_DARKRAI] = 4, // Gen 5 + [SPECIES_MUNNA] = 7, + [SPECIES_MUSHARNA] = 5, [SPECIES_WOOBAT] = 19, [SPECIES_SWOOBAT] = 12, [SPECIES_PETILIL] = 7, @@ -88,21 +90,35 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_ARCHEOPS] = 8, [SPECIES_SOLOSIS] = 14, [SPECIES_DUOSION] = 7, - [SPECIES_REUNICLUS] = 3, + [SPECIES_REUNICLUS] = 8, [SPECIES_EMOLGA] = 19, [SPECIES_TYNAMO] = 16, [SPECIES_EELEKTRIK] = 8, [SPECIES_EELEKTROSS] = 8, + [SPECIES_CRYOGONAL] = 3, [SPECIES_BRAVIARY] = 8, [SPECIES_HYDREIGON] = 3, + [SPECIES_VOLCARONA] = 6, [SPECIES_TORNADUS] = 7, [SPECIES_THUNDURUS] = 7, [SPECIES_LANDORUS] = 7, + [SPECIES_MELOETTA] = 8, // Gen 6 [SPECIES_FLETCHINDER] = 9, [SPECIES_TALONFLAME] = 7, [SPECIES_VIVILLON] = 9, + [SPECIES_FLABEBE] = 6, + [SPECIES_FLOETTE] = 4, + [SPECIES_HONEDGE] = 4, + [SPECIES_DOUBLADE] = 5, + [SPECIES_AEGISLASH] = 3, + [SPECIES_SPRITZEE] = 14, + [SPECIES_INKAY] = 14, + [SPECIES_CARBINK] = 4, + [SPECIES_KLEFKI] = 5, + [SPECIES_PHANTUMP] = 5, [SPECIES_NOIBAT] = 8, + [SPECIES_YVELTAL] = 5, [SPECIES_HOOPA] = 13, // Gen 7 [SPECIES_VIKAVOLT] = 8, @@ -157,8 +173,37 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_UNOWN_Z] = 8, [SPECIES_UNOWN_QMARK] = 8, [SPECIES_UNOWN_EMARK] = 8, - // Misc Forms + // Forms [SPECIES_GIRATINA_ORIGIN] = 7, [SPECIES_THUNDURUS_THERIAN] = 7, + [SPECIES_VIVILLON_POLAR] = 9, + [SPECIES_VIVILLON_TUNDRA] = 9, + [SPECIES_VIVILLON_CONTINENTAL] = 9, + [SPECIES_VIVILLON_GARDEN] = 9, + [SPECIES_VIVILLON_ELEGANT] = 9, + [SPECIES_VIVILLON_MEADOW] = 9, + [SPECIES_VIVILLON_MODERN] = 9, + [SPECIES_VIVILLON_MARINE] = 9, + [SPECIES_VIVILLON_ARCHIPELAGO] = 9, + [SPECIES_VIVILLON_HIGH_PLAINS] = 9, + [SPECIES_VIVILLON_SANDSTORM] = 9, + [SPECIES_VIVILLON_RIVER] = 9, + [SPECIES_VIVILLON_MONSOON] = 9, + [SPECIES_VIVILLON_SAVANNA] = 9, + [SPECIES_VIVILLON_SUN] = 9, + [SPECIES_VIVILLON_OCEAN] = 9, + [SPECIES_VIVILLON_JUNGLE] = 9, + [SPECIES_VIVILLON_FANCY] = 9, + [SPECIES_VIVILLON_POKE_BALL] = 9, + [SPECIES_FLABEBE_YELLOW_FLOWER] = 6, + [SPECIES_FLABEBE_ORANGE_FLOWER] = 6, + [SPECIES_FLABEBE_BLUE_FLOWER] = 6, + [SPECIES_FLABEBE_WHITE_FLOWER] = 6, + [SPECIES_FLOETTE_YELLOW_FLOWER] = 4, + [SPECIES_FLOETTE_ORANGE_FLOWER] = 4, + [SPECIES_FLOETTE_BLUE_FLOWER] = 4, + [SPECIES_FLOETTE_WHITE_FLOWER] = 4, + [SPECIES_FLOETTE_ETERNAL_FLOWER] = 4, + [SPECIES_AEGISLASH_BLADE] = 3, [SPECIES_ETERNATUS_ETERNAMAX] = 4, }; diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index 22aa6f71aa..f0ea8d81a3 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -2452,12 +2452,12 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_PHIONE] = { .size = MON_COORDS_SIZE(56, 40), - .y_offset = 12, + .y_offset = 8, }, [SPECIES_MANAPHY] = { .size = MON_COORDS_SIZE(64, 40), - .y_offset = 13, + .y_offset = 10, }, [SPECIES_DARKRAI] = { @@ -2592,7 +2592,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_MUNNA] = { .size = MON_COORDS_SIZE(32, 32), - .y_offset = 16, + .y_offset = 14, }, [SPECIES_MUSHARNA] = { From f67137ddb23fc5fb5aea18ae3665dc0e9a68b409 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Thu, 6 Jan 2022 19:29:58 +0100 Subject: [PATCH 319/417] Update field_specials.c --- src/field_specials.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/field_specials.c b/src/field_specials.c index bd6d53caf1..fd8a69ecad 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -352,7 +352,9 @@ bool32 ShouldDoWallyCall(void) case MAP_TYPE_ROUTE: case MAP_TYPE_OCEAN_ROUTE: if (++(*GetVarPointer(VAR_WALLY_CALL_STEP_COUNTER)) < 250) + { return FALSE; + } break; default: return FALSE; From ba9b533845c08c58739784027a122cf178bc4d2e Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Thu, 6 Jan 2022 19:45:38 +0100 Subject: [PATCH 320/417] Revert "Update field_specials.c" This reverts commit f67137ddb23fc5fb5aea18ae3665dc0e9a68b409. --- src/field_specials.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/field_specials.c b/src/field_specials.c index fd8a69ecad..bd6d53caf1 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -352,9 +352,7 @@ bool32 ShouldDoWallyCall(void) case MAP_TYPE_ROUTE: case MAP_TYPE_OCEAN_ROUTE: if (++(*GetVarPointer(VAR_WALLY_CALL_STEP_COUNTER)) < 250) - { return FALSE; - } break; default: return FALSE; From 8a9740b819907b63da542518fc777bc2d5f636cf Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Thu, 6 Jan 2022 19:47:56 +0100 Subject: [PATCH 321/417] Update field_specials.c --- src/field_specials.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/field_specials.c b/src/field_specials.c index bd6d53caf1..d97a17a7d3 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -377,9 +377,7 @@ bool32 ShouldDoScottFortreeCall(void) case MAP_TYPE_ROUTE: case MAP_TYPE_OCEAN_ROUTE: if (++(*GetVarPointer(VAR_SCOTT_FORTREE_CALL_STEP_COUNTER)) < 10) - { return FALSE; - } break; default: return FALSE; @@ -404,9 +402,7 @@ bool32 ShouldDoScottBattleFrontierCall(void) case MAP_TYPE_ROUTE: case MAP_TYPE_OCEAN_ROUTE: if (++(*GetVarPointer(VAR_SCOTT_BF_CALL_STEP_COUNTER)) < 10) - { return FALSE; - } break; default: return FALSE; @@ -431,9 +427,7 @@ bool32 ShouldDoRoxanneCall(void) case MAP_TYPE_ROUTE: case MAP_TYPE_OCEAN_ROUTE: if (++(*GetVarPointer(VAR_ROXANNE_CALL_STEP_COUNTER)) < 250) - { return FALSE; - } break; default: return FALSE; @@ -458,9 +452,7 @@ bool32 ShouldDoRivalRayquazaCall(void) case MAP_TYPE_ROUTE: case MAP_TYPE_OCEAN_ROUTE: if (++(*GetVarPointer(VAR_RIVAL_RAYQUAZA_CALL_STEP_COUNTER)) < 250) - { return FALSE; - } break; default: return FALSE; From 713cd6616ea8c159bbcaeba223cbb6097a74e393 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 6 Jan 2022 22:33:00 -0500 Subject: [PATCH 322/417] Add glow tile empty --- src/data/pokedex_area_glow.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/pokedex_area_glow.h b/src/data/pokedex_area_glow.h index 0da4f1dac7..ff24d8d6c0 100644 --- a/src/data/pokedex_area_glow.h +++ b/src/data/pokedex_area_glow.h @@ -56,6 +56,7 @@ enum { // with edge flags are cancelled out before lookup. For example, GLOW_CORNER_TL | GLOW_EDGE_L // will never be read, and has the same value as GLOW_EDGE_L. static const u8 sAreaGlowTilemapMapping[] = { + [0] = GLOW_TILE_EMPTY, [GLOW_EDGE_R] = GLOW_TILE_EDGE_R, [GLOW_EDGE_L] = GLOW_TILE_EDGE_L, [GLOW_EDGE_L | GLOW_EDGE_R] = GLOW_TILE_EDGE_L_R, From 1c6232bc2ec2b97c51f6bf210168b65bb83ecbee Mon Sep 17 00:00:00 2001 From: laqieer Date: Sat, 8 Jan 2022 00:57:09 +0800 Subject: [PATCH 323/417] Fix macro v069 in sound/MPlayDef.s --- sound/MPlayDef.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/MPlayDef.s b/sound/MPlayDef.s index f5dd6484d9..95a788e85e 100644 --- a/sound/MPlayDef.s +++ b/sound/MPlayDef.s @@ -333,7 +333,7 @@ .equ v066, 66 @ .equ v067, 67 @ .equ v068, 68 @ - .equ v069, 79 @ + .equ v069, 69 @ .equ v070, 70 @ .equ v071, 71 @ .equ v072, 72 @ From 5cbe572607dbed0dfd4937fa05e115da99ef9e69 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 7 Jan 2022 17:02:12 -0500 Subject: [PATCH 324/417] Add window constants in pokemon_storage_system --- src/pokemon_storage_system.c | 58 ++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 755cc7de07..604f665ed1 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -331,6 +331,13 @@ enum { TILEMAPID_COUNT }; +// Window IDs for sWindowTemplates +enum { + WIN_DISPLAY_INFO, + WIN_MESSAGE, + WIN_ITEM_DESC, +}; + struct Wallpaper { const u32 *tiles; @@ -981,7 +988,8 @@ static const u16 sUnknown_Pal[] = INCBIN_U16("graphics/pokemon_storage/unknown. static const struct WindowTemplate sWindowTemplates[] = { - { + // The panel below the currently displayed Pokémon + [WIN_DISPLAY_INFO] = { .bg = 1, .tilemapLeft = 0, .tilemapTop = 11, @@ -990,7 +998,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 3, .baseBlock = 0xC0, }, - { + [WIN_MESSAGE] = { .bg = 0, .tilemapLeft = 11, .tilemapTop = 17, @@ -999,7 +1007,7 @@ static const struct WindowTemplate sWindowTemplates[] = .paletteNum = 15, .baseBlock = 0x14, }, - { + [WIN_ITEM_DESC] = { .bg = 0, .tilemapLeft = 0, .tilemapTop = 13, @@ -2136,10 +2144,10 @@ static void Task_InitPokeStorage(u8 taskId) } break; case 2: - PutWindowTilemap(0); - ClearWindowTilemap(1); + PutWindowTilemap(WIN_DISPLAY_INFO); + ClearWindowTilemap(WIN_MESSAGE); CpuFill32(0, (void *)VRAM, 0x200); - LoadUserWindowBorderGfx(1, 0xB, 0xE0); + LoadUserWindowBorderGfx(WIN_MESSAGE, 0xB, 0xE0); break; case 3: ResetAllBgCoords(); @@ -4001,23 +4009,23 @@ static void LoadDisplayMonGfx(u16 species, u32 pid) static void PrintDisplayMonInfo(void) { - FillWindowPixelBuffer(0, PIXEL_FILL(1)); + FillWindowPixelBuffer(WIN_DISPLAY_INFO, PIXEL_FILL(1)); if (sStorage->boxOption != OPTION_MOVE_ITEMS) { - AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 0, TEXT_SKIP_DRAW, NULL); - AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 15, TEXT_SKIP_DRAW, NULL); - AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SKIP_DRAW, NULL); - AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 43, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_DISPLAY_INFO, FONT_NORMAL, sStorage->displayMonNameText, 6, 0, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_DISPLAY_INFO, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 15, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_DISPLAY_INFO, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 29, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_DISPLAY_INFO, FONT_SMALL, sStorage->displayMonItemName, 6, 43, TEXT_SKIP_DRAW, NULL); } else { - AddTextPrinterParameterized(0, FONT_SMALL, sStorage->displayMonItemName, 6, 0, TEXT_SKIP_DRAW, NULL); - AddTextPrinterParameterized(0, FONT_NORMAL, sStorage->displayMonNameText, 6, 13, TEXT_SKIP_DRAW, NULL); - AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 28, TEXT_SKIP_DRAW, NULL); - AddTextPrinterParameterized(0, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_DISPLAY_INFO, FONT_SMALL, sStorage->displayMonItemName, 6, 0, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_DISPLAY_INFO, FONT_NORMAL, sStorage->displayMonNameText, 6, 13, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_DISPLAY_INFO, FONT_SHORT, sStorage->displayMonSpeciesName, 6, 28, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_DISPLAY_INFO, FONT_SHORT, sStorage->displayMonGenderLvlText, 10, 42, TEXT_SKIP_DRAW, NULL); } - CopyWindowToVram(0, COPYWIN_GFX); + CopyWindowToVram(WIN_DISPLAY_INFO, COPYWIN_GFX); if (sStorage->displayMonSpecies != SPECIES_NONE) { UpdateMonMarkingTiles(sStorage->displayMonMarkings, sStorage->markingComboTilesPtr); @@ -4278,7 +4286,7 @@ static void UpdateBoxToSendMons(void) static void InitPokeStorageBg0(void) { SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(29)); - LoadUserWindowBorderGfx(1, 2, 208); + LoadUserWindowBorderGfx(WIN_MESSAGE, 2, 208); FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 17); CopyBgTilemapBufferToVram(0); } @@ -4317,11 +4325,11 @@ static void PrintMessage(u8 id) } DynamicPlaceholderTextUtil_ExpandPlaceholders(sStorage->messageText, sMessages[id].text); - FillWindowPixelBuffer(1, PIXEL_FILL(1)); - AddTextPrinterParameterized(1, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SKIP_DRAW, NULL); - DrawTextBorderOuter(1, 2, 14); - PutWindowTilemap(1); - CopyWindowToVram(1, COPYWIN_GFX); + FillWindowPixelBuffer(WIN_MESSAGE, PIXEL_FILL(1)); + AddTextPrinterParameterized(WIN_MESSAGE, FONT_NORMAL, sStorage->messageText, 0, 1, TEXT_SKIP_DRAW, NULL); + DrawTextBorderOuter(WIN_MESSAGE, 2, 14); + PutWindowTilemap(WIN_MESSAGE); + CopyWindowToVram(WIN_MESSAGE, COPYWIN_GFX); ScheduleBgCopyTilemapToVram(0); } @@ -4333,7 +4341,7 @@ static void ShowYesNoWindow(s8 cursorPos) static void ClearBottomWindow(void) { - ClearStdWindowAndFrameToTransparent(1, FALSE); + ClearStdWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); ScheduleBgCopyTilemapToVram(0); } @@ -9201,8 +9209,8 @@ static void PrintItemDescription(void) else description = ItemId_GetDescription(sStorage->displayMonItemId); - FillWindowPixelBuffer(2, PIXEL_FILL(1)); - AddTextPrinterParameterized5(2, FONT_NORMAL, description, 4, 0, 0, NULL, 0, 1); + FillWindowPixelBuffer(WIN_ITEM_DESC, PIXEL_FILL(1)); + AddTextPrinterParameterized5(WIN_ITEM_DESC, FONT_NORMAL, description, 4, 0, 0, NULL, 0, 1); } static void InitItemInfoWindow(void) From ca9bc34bea71d12e335e2a009580b3a8b4d01e65 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 7 Jan 2022 17:26:23 -0500 Subject: [PATCH 325/417] Clean up pokemon_storage_system graphics --- graphics/pokemon_storage/close_box_button.bin | 1 + graphics/pokemon_storage/party_slot_empty.bin | 1 + .../pokemon_storage/party_slot_filled.bin | 1 + graphics/pokemon_storage/pkmn_data.bin | 1 + .../{unknown.pal => text_windows.pal} | 0 src/pokemon_storage_system.c | 77 +++++++------------ 6 files changed, 33 insertions(+), 48 deletions(-) create mode 100755 graphics/pokemon_storage/close_box_button.bin create mode 100755 graphics/pokemon_storage/party_slot_empty.bin create mode 100755 graphics/pokemon_storage/party_slot_filled.bin create mode 100755 graphics/pokemon_storage/pkmn_data.bin rename graphics/pokemon_storage/{unknown.pal => text_windows.pal} (100%) diff --git a/graphics/pokemon_storage/close_box_button.bin b/graphics/pokemon_storage/close_box_button.bin new file mode 100755 index 0000000000..8b130a4818 --- /dev/null +++ b/graphics/pokemon_storage/close_box_button.bin @@ -0,0 +1 @@ +LMNOpqrst\]^_uvwxyz{|} \ No newline at end of file diff --git a/graphics/pokemon_storage/party_slot_empty.bin b/graphics/pokemon_storage/party_slot_empty.bin new file mode 100755 index 0000000000..991c232f73 --- /dev/null +++ b/graphics/pokemon_storage/party_slot_empty.bin @@ -0,0 +1 @@ +CDDESTTUcdde \ No newline at end of file diff --git a/graphics/pokemon_storage/party_slot_filled.bin b/graphics/pokemon_storage/party_slot_filled.bin new file mode 100755 index 0000000000..c0b93bf145 --- /dev/null +++ b/graphics/pokemon_storage/party_slot_filled.bin @@ -0,0 +1 @@ +@AABPQQR`aab \ No newline at end of file diff --git a/graphics/pokemon_storage/pkmn_data.bin b/graphics/pokemon_storage/pkmn_data.bin new file mode 100755 index 0000000000..3336797aac --- /dev/null +++ b/graphics/pokemon_storage/pkmn_data.bin @@ -0,0 +1 @@ +!!!!!!!!!!!!!!!! \ No newline at end of file diff --git a/graphics/pokemon_storage/unknown.pal b/graphics/pokemon_storage/text_windows.pal similarity index 100% rename from graphics/pokemon_storage/unknown.pal rename to graphics/pokemon_storage/text_windows.pal diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 604f665ed1..8bf12c2bda 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -946,45 +946,26 @@ static const union AffineAnimCmd *const sAffineAnims_ChooseBoxMenu[] = static const u8 sChooseBoxMenu_TextColors[] = {TEXT_COLOR_RED, TEXT_DYNAMIC_COLOR_6, TEXT_DYNAMIC_COLOR_5}; static const u8 sText_OutOf30[] = _("/30"); -static const u16 sChooseBoxMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/box_selection_popup.gbapal"); -static const u8 sChooseBoxMenuCenter_Gfx[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_center.4bpp"); -static const u8 sChooseBoxMenuSides_Gfx[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_sides.4bpp"); -static const u32 sScrollingBg_Gfx[] = INCBIN_U32("graphics/pokemon_storage/scrolling_bg.4bpp.lz"); -static const u32 sScrollingBg_Tilemap[] = INCBIN_U32("graphics/pokemon_storage/scrolling_bg.bin.lz"); -static const u16 sDisplayMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/display_menu.gbapal"); // Unused -static const u32 sDisplayMenu_Tilemap[] = INCBIN_U32("graphics/pokemon_storage/display_menu.bin.lz"); - -static const u16 sPkmnData_Tilemap[] = -{ - 0x0101, 0x0102, 0x0103, 0x0104, 0x0105, 0x0106, 0x0107, 0x0108, 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117, 0x0118, - 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, 0x2106, 0x2107, 0x2108, 0x2111, 0x2112, 0x2113, 0x2114, 0x2115, 0x2116, 0x2117, 0x2118, -}; - +static const u16 sChooseBoxMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/box_selection_popup.gbapal"); +static const u8 sChooseBoxMenuCenter_Gfx[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_center.4bpp"); +static const u8 sChooseBoxMenuSides_Gfx[] = INCBIN_U8("graphics/pokemon_storage/box_selection_popup_sides.4bpp"); +static const u32 sScrollingBg_Gfx[] = INCBIN_U32("graphics/pokemon_storage/scrolling_bg.4bpp.lz"); +static const u32 sScrollingBg_Tilemap[] = INCBIN_U32("graphics/pokemon_storage/scrolling_bg.bin.lz"); +static const u16 sDisplayMenu_Pal[] = INCBIN_U16("graphics/pokemon_storage/display_menu.gbapal"); // Unused +static const u32 sDisplayMenu_Tilemap[] = INCBIN_U32("graphics/pokemon_storage/display_menu.bin.lz"); +static const u16 sPkmnData_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/pkmn_data.bin"); // sInterface_Pal - parts of the display frame, "PkmnData"'s normal color, Close Box -static const u16 sInterface_Pal[] = INCBIN_U16("graphics/pokemon_storage/interface.gbapal"); -static const u16 sPkmnDataGray_Pal[] = INCBIN_U16("graphics/pokemon_storage/pkmn_data_gray.gbapal"); -static const u16 sBg_Pal[] = INCBIN_U16("graphics/pokemon_storage/bg.gbapal"); -static const u16 sBgMoveItems_Pal[] = INCBIN_U16("graphics/pokemon_storage/bg_move_items.gbapal"); - -static const u16 sCloseBoxButton_Tilemap[] = -{ - 0x014c, 0x014d, 0x014e, 0x014f, 0x0170, 0x0171, 0x0172, 0x0173, 0x0174, 0x015c, 0x015d, 0x015e, 0x015f, 0x0180, 0x0181, 0x0182, - 0x0183, 0x0184, 0x0175, 0x0176, 0x0177, 0x0178, 0x0179, 0x017a, 0x017b, 0x017c, 0x017d, 0x0185, 0x0186, 0x0187, 0x0188, 0x0189, - 0x018a, 0x018b, 0x018c, 0x018d -}; -static const u16 sPartySlotFilled_Tilemap[] = -{ - 0x1140, 0x1141, 0x1141, 0x1142, 0x1150, 0x1151, 0x1151, 0x1152, 0x1160, 0x1161, 0x1161, 0x1162, -}; -static const u16 sPartySlotEmpty_Tilemap[] = -{ - 0x1143, 0x1144, 0x1144, 0x1145, 0x1153, 0x1154, 0x1154, 0x1155, 0x1163, 0x1164, 0x1164, 0x1165, -}; - -static const u16 sWaveform_Pal[] = INCBIN_U16("graphics/pokemon_storage/waveform.gbapal"); -static const u32 sWaveform_Gfx[] = INCBIN_U32("graphics/pokemon_storage/waveform.4bpp"); -static const u16 sUnused_Pal[] = INCBIN_U16("graphics/pokemon_storage/unused.gbapal"); -static const u16 sUnknown_Pal[] = INCBIN_U16("graphics/pokemon_storage/unknown.gbapal"); +static const u16 sInterface_Pal[] = INCBIN_U16("graphics/pokemon_storage/interface.gbapal"); +static const u16 sPkmnDataGray_Pal[] = INCBIN_U16("graphics/pokemon_storage/pkmn_data_gray.gbapal"); +static const u16 sBg_Pal[] = INCBIN_U16("graphics/pokemon_storage/bg.gbapal"); +static const u16 sBgMoveItems_Pal[] = INCBIN_U16("graphics/pokemon_storage/bg_move_items.gbapal"); +static const u16 sCloseBoxButton_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/close_box_button.bin"); +static const u16 sPartySlotFilled_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/party_slot_filled.bin"); +static const u16 sPartySlotEmpty_Tilemap[] = INCBIN_U16("graphics/pokemon_storage/party_slot_empty.bin"); +static const u16 sWaveform_Pal[] = INCBIN_U16("graphics/pokemon_storage/waveform.gbapal"); +static const u32 sWaveform_Gfx[] = INCBIN_U32("graphics/pokemon_storage/waveform.4bpp"); +static const u16 sUnused_Pal[] = INCBIN_U16("graphics/pokemon_storage/unused.gbapal"); +static const u16 sTextWindows_Pal[] = INCBIN_U16("graphics/pokemon_storage/text_windows.gbapal"); static const struct WindowTemplate sWindowTemplates[] = { @@ -1357,7 +1338,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero windowId = AddWindow(&winTemplate); FillWindowPixelBuffer(windowId, PIXEL_FILL(zero2)); tileData1 = (u8*) GetWindowAttribute(windowId, WINDOW_TILE_DATA); - tileData2 = (winTemplate.width * 32) + tileData1; + tileData2 = (winTemplate.width * TILE_SIZE_4BPP) + tileData1; if (!zero1) txtColor[0] = TEXT_COLOR_TRANSPARENT; @@ -1393,7 +1374,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero // Unused static void UnusedDrawTextWindow(const u8 *string, void *dst, u16 offset, u8 bgColor, u8 fgColor, u8 shadowColor) { - u32 tileSize; + u32 tilesSize; u8 windowId; u8 txtColor[3]; u8 *tileData1, *tileData2; @@ -1401,17 +1382,17 @@ static void UnusedDrawTextWindow(const u8 *string, void *dst, u16 offset, u8 bgC winTemplate.width = StringLength_Multibyte(string); winTemplate.height = 2; - tileSize = winTemplate.width * 32; + tilesSize = winTemplate.width * TILE_SIZE_4BPP; windowId = AddWindow(&winTemplate); FillWindowPixelBuffer(windowId, PIXEL_FILL(bgColor)); tileData1 = (u8*) GetWindowAttribute(windowId, WINDOW_TILE_DATA); - tileData2 = (winTemplate.width * 32) + tileData1; + tileData2 = (winTemplate.width * TILE_SIZE_4BPP) + tileData1; txtColor[0] = bgColor; txtColor[1] = fgColor; txtColor[2] = shadowColor; AddTextPrinterParameterized4(windowId, FONT_NORMAL, 0, 2, 0, 0, txtColor, TEXT_SKIP_DRAW, string); - CpuCopy16(tileData1, dst, tileSize); - CpuCopy16(tileData2, dst + offset, tileSize); + CpuCopy16(tileData1, dst, tilesSize); + CpuCopy16(tileData2, dst + offset, tilesSize); RemoveWindow(windowId); } @@ -3870,7 +3851,7 @@ static void InitPalettesAndSprites(void) { LoadPalette(sInterface_Pal, 0, sizeof(sInterface_Pal)); LoadPalette(sPkmnDataGray_Pal, 0x20, sizeof(sPkmnDataGray_Pal)); - LoadPalette(sUnknown_Pal, 0xF0, sizeof(sUnknown_Pal)); + LoadPalette(sTextWindows_Pal, 0xF0, sizeof(sTextWindows_Pal)); if (sStorage->boxOption != OPTION_MOVE_ITEMS) LoadPalette(sBg_Pal, 0x30, sizeof(sBg_Pal)); else @@ -3978,7 +3959,7 @@ static void CreateDisplayMonSprite(void) sStorage->displayMonSprite = &gSprites[spriteId]; sStorage->displayMonPalOffset = palSlot * 16 + 0x100; - sStorage->displayMonTilePtr = (void*) OBJ_VRAM0 + tileStart * 32; + sStorage->displayMonTilePtr = (void*) OBJ_VRAM0 + tileStart * TILE_SIZE_4BPP; } while (0); if (sStorage->displayMonSprite == NULL) @@ -5138,7 +5119,7 @@ static u16 TryLoadMonIconTiles(u16 species) sStorage->iconSpeciesList[i] = species; sStorage->numIconsPerSpecies[i]++; offset = 16 * i; - CpuCopy32(GetMonIconTiles(species, TRUE), (void*)(OBJ_VRAM0) + offset * 32, 0x200); + CpuCopy32(GetMonIconTiles(species, TRUE), (void*)(OBJ_VRAM0) + offset * TILE_SIZE_4BPP, 0x200); return offset; } @@ -8763,7 +8744,7 @@ static void CreateItemIconSprites(void) { spriteSheet.tag = GFXTAG_ITEM_ICON_0 + i; LoadCompressedSpriteSheet(&spriteSheet); - sStorage->itemIcons[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * 32 + (void*)(OBJ_VRAM0); + sStorage->itemIcons[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * TILE_SIZE_4BPP + (void*)(OBJ_VRAM0); sStorage->itemIcons[i].palIndex = AllocSpritePalette(PALTAG_ITEM_ICON_0 + i); sStorage->itemIcons[i].palIndex *= 16; sStorage->itemIcons[i].palIndex += 0x100; From fa2657bb614c4de51407a708db20a364484fe609 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Fri, 7 Jan 2022 21:36:50 -0300 Subject: [PATCH 326/417] Gen VII --- .../pokemon_graphics/enemy_mon_elevation.h | 30 +++++++++++++++++++ .../pokemon_graphics/front_pic_coordinates.h | 16 +++++----- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/data/pokemon_graphics/enemy_mon_elevation.h b/src/data/pokemon_graphics/enemy_mon_elevation.h index 6971482d6b..7204ab40d4 100644 --- a/src/data/pokemon_graphics/enemy_mon_elevation.h +++ b/src/data/pokemon_graphics/enemy_mon_elevation.h @@ -123,7 +123,22 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = // Gen 7 [SPECIES_VIKAVOLT] = 8, [SPECIES_CUTIEFLY] = 10, + [SPECIES_RIBOMBEE] = 6, + [SPECIES_COMFEY] = 8, [SPECIES_MINIOR] = 17, + [SPECIES_DHELMISE] = 2, + [SPECIES_TAPU_KOKO] = 9, + [SPECIES_TAPU_LELE] = 8, + [SPECIES_TAPU_BULU] = 5, + [SPECIES_TAPU_FINI] = 6, + [SPECIES_COSMOG] = 7, + [SPECIES_COSMOEM] = 3, + [SPECIES_LUNALA] = 6, + [SPECIES_NIHILEGO] = 6, + [SPECIES_KARTANA] = 3, + [SPECIES_NECROZMA] = 6, + [SPECIES_POIPOLE] = 9, + [SPECIES_NAGANADEL] = 7, // Gen 8 [SPECIES_CORVISQUIRE] = 6, [SPECIES_DRAGAPULT] = 3, @@ -205,5 +220,20 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_FLOETTE_WHITE_FLOWER] = 4, [SPECIES_FLOETTE_ETERNAL_FLOWER] = 4, [SPECIES_AEGISLASH_BLADE] = 3, + [SPECIES_MINIOR_METEOR_ORANGE] = 17, + [SPECIES_MINIOR_METEOR_YELLOW] = 17, + [SPECIES_MINIOR_METEOR_GREEN] = 17, + [SPECIES_MINIOR_METEOR_BLUE] = 17, + [SPECIES_MINIOR_METEOR_INDIGO] = 17, + [SPECIES_MINIOR_METEOR_VIOLET] = 17, + [SPECIES_MINIOR_CORE_RED] = 17, + [SPECIES_MINIOR_CORE_ORANGE] = 17, + [SPECIES_MINIOR_CORE_YELLOW] = 17, + [SPECIES_MINIOR_CORE_GREEN] = 17, + [SPECIES_MINIOR_CORE_BLUE] = 17, + [SPECIES_MINIOR_CORE_INDIGO] = 17, + [SPECIES_MINIOR_CORE_VIOLET] = 17, + [SPECIES_NECROZMA_DAWN_WINGS] = 6, + [SPECIES_NECROZMA_ULTRA] = 5, [SPECIES_ETERNATUS_ETERNAMAX] = 4, }; diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index f0ea8d81a3..09c37cec6a 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -3737,7 +3737,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_WISHIWASHI] = { .size = MON_COORDS_SIZE(40, 24), - .y_offset = 20, + .y_offset = 15, }, [SPECIES_MAREANIE] = { @@ -5915,37 +5915,37 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_MINIOR_CORE_RED] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 16, + .y_offset = 14, }, [SPECIES_MINIOR_CORE_ORANGE] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 16, + .y_offset = 14, }, [SPECIES_MINIOR_CORE_YELLOW] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 16, + .y_offset = 14, }, [SPECIES_MINIOR_CORE_GREEN] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 16, + .y_offset = 14, }, [SPECIES_MINIOR_CORE_BLUE] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 16, + .y_offset = 14, }, [SPECIES_MINIOR_CORE_INDIGO] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 16, + .y_offset = 14, }, [SPECIES_MINIOR_CORE_VIOLET] = { .size = MON_COORDS_SIZE(48, 40), - .y_offset = 16, + .y_offset = 14, }, // Mimikyu [SPECIES_MIMIKYU_BUSTED] = From 6a21c3f5f30a29e953c20ed09bacfa3d7f4b1a79 Mon Sep 17 00:00:00 2001 From: sphericalice Date: Sat, 8 Jan 2022 20:39:45 +0000 Subject: [PATCH 327/417] Remove unneeded brackets in GetWeekCount --- src/field_specials.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/field_specials.c b/src/field_specials.c index d97a17a7d3..0a72369138 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -932,9 +932,8 @@ u16 GetWeekCount(void) { u16 weekCount = gLocalTime.days / 7; if (weekCount > 9999) - { weekCount = 9999; - } + return weekCount; } From 787b9a040243852c46b1d4419af299ba2d2925c5 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 8 Jan 2022 18:24:21 -0300 Subject: [PATCH 328/417] Gen VIII and missing forms --- .../pokemon_graphics/enemy_mon_elevation.h | 61 +++++++++++++------ .../pokemon_graphics/front_pic_coordinates.h | 4 +- 2 files changed, 46 insertions(+), 19 deletions(-) diff --git a/src/data/pokemon_graphics/enemy_mon_elevation.h b/src/data/pokemon_graphics/enemy_mon_elevation.h index 7204ab40d4..59da792ab1 100644 --- a/src/data/pokemon_graphics/enemy_mon_elevation.h +++ b/src/data/pokemon_graphics/enemy_mon_elevation.h @@ -140,27 +140,44 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_POIPOLE] = 9, [SPECIES_NAGANADEL] = 7, // Gen 8 - [SPECIES_CORVISQUIRE] = 6, + [SPECIES_CORVISQUIRE] = 10, + [SPECIES_ORBEETLE] = 8, + [SPECIES_FLAPPLE] = 9, + [SPECIES_SINISTEA] = 9, + [SPECIES_POLTEAGEIST] = 11, + [SPECIES_RUNERIGUS] = 5, + [SPECIES_MILCERY] = 10, + [SPECIES_FROSMOTH] = 7, + [SPECIES_DREEPY] = 5, + [SPECIES_DRAKLOAK] = 5, [SPECIES_DRAGAPULT] = 3, - [SPECIES_FROSMOTH] = 3, + [SPECIES_ETERNATUS] = 4, + [SPECIES_REGIELEKI] = 8, + [SPECIES_REGIDRAGO] = 5, // Megas + [SPECIES_BEEDRILL_MEGA] = 5, + [SPECIES_PIDGEOT_MEGA] = 8, + [SPECIES_ALAKAZAM_MEGA] = 7, + [SPECIES_PINSIR_MEGA] = 4, + [SPECIES_GYARADOS_MEGA] = 6, + [SPECIES_AERODACTYL_MEGA] = 7, + [SPECIES_MEWTWO_MEGA_Y] = 3, + [SPECIES_SHARPEDO_MEGA] = 1, + [SPECIES_ALTARIA_MEGA] = 6, + [SPECIES_BANETTE_MEGA] = 5, + [SPECIES_GLALIE_MEGA] = 8, + [SPECIES_METAGROSS_MEGA] = 4, [SPECIES_LATIAS_MEGA] = 8, [SPECIES_LATIOS_MEGA] = 8, - [SPECIES_METAGROSS_MEGA] = 4, - [SPECIES_GLALIE_MEGA] = 8, - [SPECIES_ALTARIA_MEGA] = 6, - [SPECIES_SHARPEDO_MEGA] = 1, - [SPECIES_PIDGEOT_MEGA] = 8, - [SPECIES_BEEDRILL_MEGA] = 5, - [SPECIES_BANETTE_MEGA] = 5, - [SPECIES_MEWTWO_MEGA_Y] = 3, - [SPECIES_AERODACTYL_MEGA] = 3, - [SPECIES_GYARADOS_MEGA] = 6, - [SPECIES_PINSIR_MEGA] = 4, - [SPECIES_ALAKAZAM_MEGA] = 7, + [SPECIES_RAYQUAZA_MEGA] = 4, + // Alolan Forms + [SPECIES_RAICHU_ALOLAN] = 4, + [SPECIES_GEODUDE_ALOLAN] = 16, // Galarian Forms - [SPECIES_WEEZING_GALARIAN] = 3, + [SPECIES_WEEZING_GALARIAN] = 6, + [SPECIES_ARTICUNO_GALARIAN] = 10, [SPECIES_YAMASK_GALARIAN] = 4, + // Other Forms [SPECIES_UNOWN_B] = 8, [SPECIES_UNOWN_C] = 8, [SPECIES_UNOWN_D] = 8, @@ -188,9 +205,17 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_UNOWN_Z] = 8, [SPECIES_UNOWN_QMARK] = 8, [SPECIES_UNOWN_EMARK] = 8, - // Forms + [SPECIES_CASTFORM_SUNNY] = 5, + [SPECIES_CASTFORM_RAINY] = 5, + [SPECIES_CASTFORM_SNOWY] = 5, + [SPECIES_ROTOM_HEAT] = 6, + [SPECIES_ROTOM_WASH] = 6, + [SPECIES_ROTOM_FROST] = 6, + [SPECIES_ROTOM_FAN] = 6, + [SPECIES_ROTOM_MOW] = 6, [SPECIES_GIRATINA_ORIGIN] = 7, [SPECIES_THUNDURUS_THERIAN] = 7, + [SPECIES_MELOETTA_PIROUETTE] = 5, [SPECIES_VIVILLON_POLAR] = 9, [SPECIES_VIVILLON_TUNDRA] = 9, [SPECIES_VIVILLON_CONTINENTAL] = 9, @@ -235,5 +260,7 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_MINIOR_CORE_VIOLET] = 17, [SPECIES_NECROZMA_DAWN_WINGS] = 6, [SPECIES_NECROZMA_ULTRA] = 5, - [SPECIES_ETERNATUS_ETERNAMAX] = 4, + [SPECIES_SINISTEA_ANTIQUE] = 10, + [SPECIES_POLTEAGEIST_ANTIQUE] = 12, + [SPECIES_ETERNATUS_ETERNAMAX] = 13, }; diff --git a/src/data/pokemon_graphics/front_pic_coordinates.h b/src/data/pokemon_graphics/front_pic_coordinates.h index 09c37cec6a..02a0e06135 100644 --- a/src/data/pokemon_graphics/front_pic_coordinates.h +++ b/src/data/pokemon_graphics/front_pic_coordinates.h @@ -4237,7 +4237,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_ARROKUDA] = { .size = MON_COORDS_SIZE(56, 32), - .y_offset = 17, + .y_offset = 13, }, [SPECIES_BARRASKEWDA] = { @@ -5249,7 +5249,7 @@ const struct MonCoords gMonFrontPicCoords[] = [SPECIES_ROTOM_MOW] = { .size = MON_COORDS_SIZE(56, 64), - .y_offset = 3, + .y_offset = 12, }, // Giratina [SPECIES_GIRATINA_ORIGIN] = From 241aea9dfd0315a234db5aa32f0487d497c612d2 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 8 Jan 2022 19:58:01 -0300 Subject: [PATCH 329/417] Missing actually adding Hoopa Unbound --- src/data/pokemon_graphics/enemy_mon_elevation.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/pokemon_graphics/enemy_mon_elevation.h b/src/data/pokemon_graphics/enemy_mon_elevation.h index 59da792ab1..84a5ea9fac 100644 --- a/src/data/pokemon_graphics/enemy_mon_elevation.h +++ b/src/data/pokemon_graphics/enemy_mon_elevation.h @@ -245,6 +245,7 @@ const u8 gEnemyMonElevation[NUM_SPECIES] = [SPECIES_FLOETTE_WHITE_FLOWER] = 4, [SPECIES_FLOETTE_ETERNAL_FLOWER] = 4, [SPECIES_AEGISLASH_BLADE] = 3, + [SPECIES_HOOPA_UNBOUND] = 3, [SPECIES_MINIOR_METEOR_ORANGE] = 17, [SPECIES_MINIOR_METEOR_YELLOW] = 17, [SPECIES_MINIOR_METEOR_GREEN] = 17, From 8d0548f73219b26fc6101bf222ade2b24d0cad39 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 8 Jan 2022 20:26:16 -0300 Subject: [PATCH 330/417] Fixed Wormadam sprite. Credit to Jaizu --- graphics/pokemon/wormadam/icon.png | Bin 419 -> 374 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/graphics/pokemon/wormadam/icon.png b/graphics/pokemon/wormadam/icon.png index 7aa1d61d8bbd70c6bb8e1acf6f2528b9a62ccdc1..eb622fca237ba80cb52986b29f1014a02c3397a2 100644 GIT binary patch delta 301 zcmV+|0n+}X1NH)t7#0Wv0000?P=%ZT0004VQb$4nuFf3kks&^R0Q5;jK~zYI?Uc<9 z!Y~YjSDIYo_kUZQc1SEuTOl|BowmdL&H0h$8sBeI>tUz(<0JtjDEd^jE z0`PVNBy}Jialp9*5HX*jAl02{awD=5>;ko%L@O3`W%VwXv!9@=l;+?Mb`c2z^)$Hk z8Wt_8bb=008wp5%6|_Y_RMlq~{HPJ}h)R{Aap(JgoAg$HO!~JRU?g`60{vXvBx}BQPO9hQBA~ zhgtaj#{3|2jfZP~jE#o;&~efsKaxSeIzR5LQ4;0!p|c(g00000NkvXXu0mjfwr7Zd delta 346 zcmV-g0j2)-0;2zQoC-$Fbvcm5JdJ0{R9Kf z+M+PCnnSF$`FYK@)lh3#rtm}Z(y`@ao{!{-Jm>y4^qBiPhjaw|T<3GePzA=R_&t(R znqi+KhNM||2WU#Dw6_ILh+g*+m>NWU(1zq>jAWgbA_yN1p3qa|6?nH6uRiwcoO^$l zjFCr*OO3R`D&Z#m+C(IWYZzEpDWD;=ZNE!(`5d}fNOjN=ak)fjiR%ps)wzS?(*JQB zrNVFiP%K|-->KTpG%J)0h%D))1bPzoZo9z~VD(TeQKF(R4CF-39=eyf$K3!Qx5L2A zTkd Date: Sat, 8 Jan 2022 23:53:55 -0500 Subject: [PATCH 331/417] Add missing array constants in field_player_avatar --- src/field_player_avatar.c | 102 ++++++++++++++++++++++---------------- src/naming_screen.c | 6 +-- 2 files changed, 61 insertions(+), 47 deletions(-) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 3c0276a27b..aa4b99a57b 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -30,6 +30,15 @@ #include "constants/songs.h" #include "constants/trainer_types.h" +#define NUM_FORCED_MOVEMENTS 18 +#define NUM_ACRO_BIKE_COLLISIONS 5 + +enum { + PLAYER_STILL, + PLAYER_TURNING, + PLAYER_MOVING, +}; + static EWRAM_DATA u8 sSpinStartFacingDir = 0; EWRAM_DATA struct ObjectEvent gObjectEvents[OBJECT_EVENTS_COUNT] = {}; EWRAM_DATA struct PlayerAvatar gPlayerAvatar = {}; @@ -139,9 +148,7 @@ static void AlignFishingAnimationFrames(void); static u8 TrySpinPlayerForWarp(struct ObjectEvent *object, s16 *a1); -// .rodata - -static bool8 (*const sForcedMovementTestFuncs[])(u8) = +static bool8 (*const sForcedMovementTestFuncs[NUM_FORCED_MOVEMENTS])(u8) = { MetatileBehavior_IsTrickHouseSlipperyFloor, MetatileBehavior_IsIce_2, @@ -163,7 +170,8 @@ static bool8 (*const sForcedMovementTestFuncs[])(u8) = MetatileBehavior_IsMuddySlope, }; -static bool8 (*const sForcedMovementFuncs[])(void) = +// + 1 for ForcedMovement_None, which is excluded above +static bool8 (*const sForcedMovementFuncs[NUM_FORCED_MOVEMENTS + 1])(void) = { ForcedMovement_None, ForcedMovement_Slip, @@ -188,12 +196,12 @@ static bool8 (*const sForcedMovementFuncs[])(void) = static void (*const sPlayerNotOnBikeFuncs[])(u8, u16) = { - PlayerNotOnBikeNotMoving, - PlayerNotOnBikeTurningInPlace, - PlayerNotOnBikeMoving, + [PLAYER_STILL] = PlayerNotOnBikeNotMoving, + [PLAYER_TURNING] = PlayerNotOnBikeTurningInPlace, + [PLAYER_MOVING] = PlayerNotOnBikeMoving, }; -static bool8 (*const sAcroBikeTrickMetatiles[])(u8) = +static bool8 (*const sAcroBikeTrickMetatiles[NUM_ACRO_BIKE_COLLISIONS])(u8) = { MetatileBehavior_IsBumpySlope, MetatileBehavior_IsIsolatedVerticalRail, @@ -202,7 +210,7 @@ static bool8 (*const sAcroBikeTrickMetatiles[])(u8) = MetatileBehavior_IsHorizontalRail, }; -static const u8 sAcroBikeTrickCollisionTypes[] = { +static const u8 sAcroBikeTrickCollisionTypes[NUM_ACRO_BIKE_COLLISIONS] = { COLLISION_WHEELIE_HOP, COLLISION_ISOLATED_VERTICAL_RAIL, COLLISION_ISOLATED_HORIZONTAL_RAIL, @@ -232,33 +240,41 @@ static bool8 (*const sArrowWarpMetatileBehaviorChecks[])(u8) = static const u8 sRivalAvatarGfxIds[][2] = { - {OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL}, - {OBJ_EVENT_GFX_RIVAL_BRENDAN_MACH_BIKE, OBJ_EVENT_GFX_RIVAL_MAY_MACH_BIKE}, - {OBJ_EVENT_GFX_RIVAL_BRENDAN_ACRO_BIKE, OBJ_EVENT_GFX_RIVAL_MAY_ACRO_BIKE}, - {OBJ_EVENT_GFX_RIVAL_BRENDAN_SURFING, OBJ_EVENT_GFX_RIVAL_MAY_SURFING}, - {OBJ_EVENT_GFX_BRENDAN_UNDERWATER, OBJ_EVENT_GFX_MAY_UNDERWATER}, - {OBJ_EVENT_GFX_RIVAL_BRENDAN_FIELD_MOVE, OBJ_EVENT_GFX_RIVAL_MAY_FIELD_MOVE}, - {OBJ_EVENT_GFX_BRENDAN_FISHING, OBJ_EVENT_GFX_MAY_FISHING}, - {OBJ_EVENT_GFX_BRENDAN_WATERING, OBJ_EVENT_GFX_MAY_WATERING} + [PLAYER_AVATAR_STATE_NORMAL] = {OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL}, + [PLAYER_AVATAR_STATE_MACH_BIKE] = {OBJ_EVENT_GFX_RIVAL_BRENDAN_MACH_BIKE, OBJ_EVENT_GFX_RIVAL_MAY_MACH_BIKE}, + [PLAYER_AVATAR_STATE_ACRO_BIKE] = {OBJ_EVENT_GFX_RIVAL_BRENDAN_ACRO_BIKE, OBJ_EVENT_GFX_RIVAL_MAY_ACRO_BIKE}, + [PLAYER_AVATAR_STATE_SURFING] = {OBJ_EVENT_GFX_RIVAL_BRENDAN_SURFING, OBJ_EVENT_GFX_RIVAL_MAY_SURFING}, + [PLAYER_AVATAR_STATE_UNDERWATER] = {OBJ_EVENT_GFX_BRENDAN_UNDERWATER, OBJ_EVENT_GFX_MAY_UNDERWATER}, + [PLAYER_AVATAR_STATE_FIELD_MOVE] = {OBJ_EVENT_GFX_RIVAL_BRENDAN_FIELD_MOVE, OBJ_EVENT_GFX_RIVAL_MAY_FIELD_MOVE}, + [PLAYER_AVATAR_STATE_FISHING] = {OBJ_EVENT_GFX_BRENDAN_FISHING, OBJ_EVENT_GFX_MAY_FISHING}, + [PLAYER_AVATAR_STATE_WATERING] = {OBJ_EVENT_GFX_BRENDAN_WATERING, OBJ_EVENT_GFX_MAY_WATERING} }; static const u8 sPlayerAvatarGfxIds[][2] = { - {OBJ_EVENT_GFX_BRENDAN_NORMAL, OBJ_EVENT_GFX_MAY_NORMAL}, - {OBJ_EVENT_GFX_BRENDAN_MACH_BIKE, OBJ_EVENT_GFX_MAY_MACH_BIKE}, - {OBJ_EVENT_GFX_BRENDAN_ACRO_BIKE, OBJ_EVENT_GFX_MAY_ACRO_BIKE}, - {OBJ_EVENT_GFX_BRENDAN_SURFING, OBJ_EVENT_GFX_MAY_SURFING}, - {OBJ_EVENT_GFX_BRENDAN_UNDERWATER, OBJ_EVENT_GFX_MAY_UNDERWATER}, - {OBJ_EVENT_GFX_BRENDAN_FIELD_MOVE, OBJ_EVENT_GFX_MAY_FIELD_MOVE}, - {OBJ_EVENT_GFX_BRENDAN_FISHING, OBJ_EVENT_GFX_MAY_FISHING}, - {OBJ_EVENT_GFX_BRENDAN_WATERING, OBJ_EVENT_GFX_MAY_WATERING}, + [PLAYER_AVATAR_STATE_NORMAL] = {OBJ_EVENT_GFX_BRENDAN_NORMAL, OBJ_EVENT_GFX_MAY_NORMAL}, + [PLAYER_AVATAR_STATE_MACH_BIKE] = {OBJ_EVENT_GFX_BRENDAN_MACH_BIKE, OBJ_EVENT_GFX_MAY_MACH_BIKE}, + [PLAYER_AVATAR_STATE_ACRO_BIKE] = {OBJ_EVENT_GFX_BRENDAN_ACRO_BIKE, OBJ_EVENT_GFX_MAY_ACRO_BIKE}, + [PLAYER_AVATAR_STATE_SURFING] = {OBJ_EVENT_GFX_BRENDAN_SURFING, OBJ_EVENT_GFX_MAY_SURFING}, + [PLAYER_AVATAR_STATE_UNDERWATER] = {OBJ_EVENT_GFX_BRENDAN_UNDERWATER, OBJ_EVENT_GFX_MAY_UNDERWATER}, + [PLAYER_AVATAR_STATE_FIELD_MOVE] = {OBJ_EVENT_GFX_BRENDAN_FIELD_MOVE, OBJ_EVENT_GFX_MAY_FIELD_MOVE}, + [PLAYER_AVATAR_STATE_FISHING] = {OBJ_EVENT_GFX_BRENDAN_FISHING, OBJ_EVENT_GFX_MAY_FISHING}, + [PLAYER_AVATAR_STATE_WATERING] = {OBJ_EVENT_GFX_BRENDAN_WATERING, OBJ_EVENT_GFX_MAY_WATERING}, }; -static const u8 sFRLGAvatarGfxIds[] = {OBJ_EVENT_GFX_RED, OBJ_EVENT_GFX_LEAF}; +static const u8 sFRLGAvatarGfxIds[GENDER_COUNT] = +{ + [MALE] = OBJ_EVENT_GFX_RED, + [FEMALE] = OBJ_EVENT_GFX_LEAF +}; -static const u8 sRSAvatarGfxIds[] = {OBJ_EVENT_GFX_LINK_RS_BRENDAN, OBJ_EVENT_GFX_LINK_RS_MAY}; +static const u8 sRSAvatarGfxIds[GENDER_COUNT] = +{ + [MALE] = OBJ_EVENT_GFX_LINK_RS_BRENDAN, + [FEMALE] = OBJ_EVENT_GFX_LINK_RS_MAY +}; -static const u8 sPlayerAvatarGfxToStateFlag[2][5][2] = +static const u8 sPlayerAvatarGfxToStateFlag[GENDER_COUNT][5][2] = { [MALE] = { @@ -306,8 +322,6 @@ static bool8 (*const sPlayerAvatarSecretBaseMatSpin[])(struct Task *, struct Obj PlayerAvatar_SecretBaseMatSpinStep3, }; -// .text - void MovementType_Player(struct Sprite *sprite) { UpdateObjectEventCurrentMovement(&gObjectEvents[sprite->data[0]], sprite, ObjectEventCB2_NoMovement2); @@ -406,7 +420,7 @@ static u8 GetForcedMovementByMetatileBehavior(void) { u8 metatileBehavior = gObjectEvents[gPlayerAvatar.objectEventId].currentMetatileBehavior; - for (i = 0; i < 18; i++) + for (i = 0; i < NUM_FORCED_MOVEMENTS; i++) { if (sForcedMovementTestFuncs[i](metatileBehavior)) return i + 1; @@ -429,7 +443,7 @@ static bool8 ForcedMovement_None(void) return FALSE; } -static u8 DoForcedMovement(u8 direction, void (*b)(u8)) +static bool8 DoForcedMovement(u8 direction, void (*moveFunc)(u8)) { struct PlayerAvatar *playerAvatar = &gPlayerAvatar; u8 collision = CheckForPlayerAvatarCollision(direction); @@ -440,7 +454,7 @@ static u8 DoForcedMovement(u8 direction, void (*b)(u8)) ForcedMovement_None(); if (collision < COLLISION_STOP_SURFING) { - return 0; + return FALSE; } else { @@ -448,23 +462,23 @@ static u8 DoForcedMovement(u8 direction, void (*b)(u8)) PlayerJumpLedge(direction); playerAvatar->flags |= PLAYER_AVATAR_FLAG_FORCED_MOVE; playerAvatar->runningState = MOVING; - return 1; + return TRUE; } } else { playerAvatar->runningState = MOVING; - b(direction); - return 1; + moveFunc(direction); + return TRUE; } } -static u8 DoForcedMovementInCurrentDirection(void (*a)(u8)) +static bool8 DoForcedMovementInCurrentDirection(void (*moveFunc)(u8)) { struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; playerObjEvent->disableAnim = TRUE; - return DoForcedMovement(playerObjEvent->movementDirection, a); + return DoForcedMovement(playerObjEvent->movementDirection, moveFunc); } static bool8 ForcedMovement_Slip(void) @@ -512,13 +526,13 @@ static bool8 ForcedMovement_PushedEastByCurrent(void) return DoForcedMovement(DIR_EAST, PlayerRideWaterCurrent); } -static u8 ForcedMovement_Slide(u8 direction, void (*b)(u8)) +static bool8 ForcedMovement_Slide(u8 direction, void (*moveFunc)(u8)) { struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; playerObjEvent->disableAnim = TRUE; playerObjEvent->facingDirectionLocked = TRUE; - return DoForcedMovement(direction, b); + return DoForcedMovement(direction, moveFunc); } static bool8 ForcedMovement_SlideSouth(void) @@ -579,17 +593,17 @@ static u8 CheckMovementInputNotOnBike(u8 direction) if (direction == DIR_NONE) { gPlayerAvatar.runningState = NOT_MOVING; - return 0; + return PLAYER_STILL; } else if (direction != GetPlayerMovementDirection() && gPlayerAvatar.runningState != MOVING) { gPlayerAvatar.runningState = TURN_DIRECTION; - return 1; + return PLAYER_TURNING; } else { gPlayerAvatar.runningState = MOVING; - return 2; + return PLAYER_MOVING; } } @@ -755,7 +769,7 @@ static void CheckAcroBikeCollision(s16 x, s16 y, u8 metatileBehavior, u8 *collis { u8 i; - for (i = 0; i < ARRAY_COUNT(sAcroBikeTrickMetatiles); i++) + for (i = 0; i < NUM_ACRO_BIKE_COLLISIONS; i++) { if (sAcroBikeTrickMetatiles[i](metatileBehavior)) { diff --git a/src/naming_screen.c b/src/naming_screen.c index 5aef44f149..0019a51b1d 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -1408,10 +1408,10 @@ static void NamingScreen_CreatePlayerIcon(void) u8 rivalGfxId; u8 spriteId; - rivalGfxId = GetRivalAvatarGraphicsIdByStateIdAndGender(0, sNamingScreen->monSpecies); + rivalGfxId = GetRivalAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, sNamingScreen->monSpecies); spriteId = CreateObjectGraphicsSprite(rivalGfxId, SpriteCallbackDummy, 56, 37, 0); gSprites[spriteId].oam.priority = 3; - StartSpriteAnim(&gSprites[spriteId], 4); + StartSpriteAnim(&gSprites[spriteId], ANIM_STD_GO_SOUTH); } static void NamingScreen_CreatePCIcon(void) @@ -1438,7 +1438,7 @@ static void NamingScreen_CreateWaldaDadIcon(void) spriteId = CreateObjectGraphicsSprite(OBJ_EVENT_GFX_MAN_1, SpriteCallbackDummy, 56, 37, 0); gSprites[spriteId].oam.priority = 3; - StartSpriteAnim(&gSprites[spriteId], 4); + StartSpriteAnim(&gSprites[spriteId], ANIM_STD_GO_SOUTH); } //-------------------------------------------------- From 8b920691e6a7ac3b14cd553cc3020ded2f1ca4d9 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 9 Jan 2022 01:31:42 -0500 Subject: [PATCH 332/417] Fix FLAG_DECORATION_0 name --- data/maps/SecretBase_BlueCave1/map.json | 2 +- data/maps/SecretBase_BlueCave2/map.json | 2 +- data/maps/SecretBase_BlueCave3/map.json | 2 +- data/maps/SecretBase_BlueCave4/map.json | 2 +- data/maps/SecretBase_BrownCave1/map.json | 2 +- data/maps/SecretBase_BrownCave2/map.json | 2 +- data/maps/SecretBase_BrownCave3/map.json | 2 +- data/maps/SecretBase_BrownCave4/map.json | 2 +- data/maps/SecretBase_RedCave1/map.json | 2 +- data/maps/SecretBase_RedCave2/map.json | 2 +- data/maps/SecretBase_RedCave3/map.json | 2 +- data/maps/SecretBase_RedCave4/map.json | 2 +- data/maps/SecretBase_Shrub1/map.json | 2 +- data/maps/SecretBase_Shrub2/map.json | 2 +- data/maps/SecretBase_Shrub3/map.json | 2 +- data/maps/SecretBase_Shrub4/map.json | 2 +- data/maps/SecretBase_Tree1/map.json | 2 +- data/maps/SecretBase_Tree2/map.json | 2 +- data/maps/SecretBase_Tree3/map.json | 2 +- data/maps/SecretBase_Tree4/map.json | 2 +- data/maps/SecretBase_YellowCave1/map.json | 2 +- data/maps/SecretBase_YellowCave2/map.json | 2 +- data/maps/SecretBase_YellowCave3/map.json | 2 +- data/maps/SecretBase_YellowCave4/map.json | 2 +- data/scripts/secret_base.inc | 6 +++--- include/constants/flags.h | 2 +- src/decoration.c | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/data/maps/SecretBase_BlueCave1/map.json b/data/maps/SecretBase_BlueCave1/map.json index 3fb6157cca..066cfb3857 100644 --- a/data/maps/SecretBase_BlueCave1/map.json +++ b/data/maps/SecretBase_BlueCave1/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_BlueCave2/map.json b/data/maps/SecretBase_BlueCave2/map.json index ca15e39f18..b74fa5afb6 100644 --- a/data/maps/SecretBase_BlueCave2/map.json +++ b/data/maps/SecretBase_BlueCave2/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_BlueCave3/map.json b/data/maps/SecretBase_BlueCave3/map.json index 356b4894d4..dd67e2d546 100644 --- a/data/maps/SecretBase_BlueCave3/map.json +++ b/data/maps/SecretBase_BlueCave3/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_BlueCave4/map.json b/data/maps/SecretBase_BlueCave4/map.json index 078bada8e6..3c97371f53 100644 --- a/data/maps/SecretBase_BlueCave4/map.json +++ b/data/maps/SecretBase_BlueCave4/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_BrownCave1/map.json b/data/maps/SecretBase_BrownCave1/map.json index 6f2dc92f24..062eac9f4b 100644 --- a/data/maps/SecretBase_BrownCave1/map.json +++ b/data/maps/SecretBase_BrownCave1/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_BrownCave2/map.json b/data/maps/SecretBase_BrownCave2/map.json index 11559c12fb..eb04f2a8de 100644 --- a/data/maps/SecretBase_BrownCave2/map.json +++ b/data/maps/SecretBase_BrownCave2/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_BrownCave3/map.json b/data/maps/SecretBase_BrownCave3/map.json index c2dbb7fc45..1d00ee139a 100644 --- a/data/maps/SecretBase_BrownCave3/map.json +++ b/data/maps/SecretBase_BrownCave3/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_BrownCave4/map.json b/data/maps/SecretBase_BrownCave4/map.json index e7147ae85d..f1fb82eb4f 100644 --- a/data/maps/SecretBase_BrownCave4/map.json +++ b/data/maps/SecretBase_BrownCave4/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_RedCave1/map.json b/data/maps/SecretBase_RedCave1/map.json index fd264fc6cf..e83458a87a 100644 --- a/data/maps/SecretBase_RedCave1/map.json +++ b/data/maps/SecretBase_RedCave1/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_RedCave2/map.json b/data/maps/SecretBase_RedCave2/map.json index b60b3bbff2..9a0ac210f4 100644 --- a/data/maps/SecretBase_RedCave2/map.json +++ b/data/maps/SecretBase_RedCave2/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_RedCave3/map.json b/data/maps/SecretBase_RedCave3/map.json index 079837a621..ce405a40ab 100644 --- a/data/maps/SecretBase_RedCave3/map.json +++ b/data/maps/SecretBase_RedCave3/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_RedCave4/map.json b/data/maps/SecretBase_RedCave4/map.json index 10fbbfeb0d..2b1ad8c2c9 100644 --- a/data/maps/SecretBase_RedCave4/map.json +++ b/data/maps/SecretBase_RedCave4/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_Shrub1/map.json b/data/maps/SecretBase_Shrub1/map.json index e0d1015cbb..a028cbe62a 100644 --- a/data/maps/SecretBase_Shrub1/map.json +++ b/data/maps/SecretBase_Shrub1/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_Shrub2/map.json b/data/maps/SecretBase_Shrub2/map.json index 879b7464e9..60977e70d4 100644 --- a/data/maps/SecretBase_Shrub2/map.json +++ b/data/maps/SecretBase_Shrub2/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_Shrub3/map.json b/data/maps/SecretBase_Shrub3/map.json index 6751a74147..a513b0bd2b 100644 --- a/data/maps/SecretBase_Shrub3/map.json +++ b/data/maps/SecretBase_Shrub3/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_Shrub4/map.json b/data/maps/SecretBase_Shrub4/map.json index c193b8348e..6aded553b8 100644 --- a/data/maps/SecretBase_Shrub4/map.json +++ b/data/maps/SecretBase_Shrub4/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_Tree1/map.json b/data/maps/SecretBase_Tree1/map.json index cd0cad5f08..cd6a0b33af 100644 --- a/data/maps/SecretBase_Tree1/map.json +++ b/data/maps/SecretBase_Tree1/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_Tree2/map.json b/data/maps/SecretBase_Tree2/map.json index 1ac393a158..3aad151ffe 100644 --- a/data/maps/SecretBase_Tree2/map.json +++ b/data/maps/SecretBase_Tree2/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_Tree3/map.json b/data/maps/SecretBase_Tree3/map.json index b7eec22440..498852c024 100644 --- a/data/maps/SecretBase_Tree3/map.json +++ b/data/maps/SecretBase_Tree3/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_Tree4/map.json b/data/maps/SecretBase_Tree4/map.json index 0e068ec94d..b24d1d8a99 100644 --- a/data/maps/SecretBase_Tree4/map.json +++ b/data/maps/SecretBase_Tree4/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_YellowCave1/map.json b/data/maps/SecretBase_YellowCave1/map.json index 1d873bfe29..54916fda32 100644 --- a/data/maps/SecretBase_YellowCave1/map.json +++ b/data/maps/SecretBase_YellowCave1/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_YellowCave2/map.json b/data/maps/SecretBase_YellowCave2/map.json index af2e957bc6..f9d9a572be 100644 --- a/data/maps/SecretBase_YellowCave2/map.json +++ b/data/maps/SecretBase_YellowCave2/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_YellowCave3/map.json b/data/maps/SecretBase_YellowCave3/map.json index d78aa28628..fdcc94c18b 100644 --- a/data/maps/SecretBase_YellowCave3/map.json +++ b/data/maps/SecretBase_YellowCave3/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/maps/SecretBase_YellowCave4/map.json b/data/maps/SecretBase_YellowCave4/map.json index 0ca4bc4d32..246974eaad 100644 --- a/data/maps/SecretBase_YellowCave4/map.json +++ b/data/maps/SecretBase_YellowCave4/map.json @@ -26,7 +26,7 @@ "trainer_type": "TRAINER_TYPE_NONE", "trainer_sight_or_berry_tree_id": "0", "script": "SecretBase_EventScript_RecordMixTrainer", - "flag": "FLAG_DECORATION_0" + "flag": "FLAG_HIDE_SECRET_BASE_TRAINER" }, { "graphics_id": "OBJ_EVENT_GFX_VAR_0", diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index d21bb9aab5..918a9d6301 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -133,7 +133,7 @@ SecretBase_EventScript_InitSecretBase:: closemessage playse SE_EXIT setvar VAR_INIT_SECRET_BASE, 0 - setflag FLAG_DECORATION_0 + setflag FLAG_HIDE_SECRET_BASE_TRAINER special SetPlayerSecretBase special EnterSecretBase setvar VAR_0x8004, 0 @@ -172,14 +172,14 @@ SecretBase_EventScript_Enter:: playse SE_EXIT special IsCurSecretBaseOwnedByAnotherPlayer goto_if_eq VAR_RESULT, FALSE, SecretBase_EventScript_EnterPlayersBase - clearflag FLAG_DECORATION_0 + clearflag FLAG_HIDE_SECRET_BASE_TRAINER special EnterSecretBase setvar VAR_SECRET_BASE_INITIALIZED, 0 waitstate end SecretBase_EventScript_EnterPlayersBase:: - setflag FLAG_DECORATION_0 + setflag FLAG_HIDE_SECRET_BASE_TRAINER special EnterSecretBase setvar VAR_SECRET_BASE_INITIALIZED, 0 waitstate diff --git a/include/constants/flags.h b/include/constants/flags.h index 793fe11354..eacb2426db 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -190,7 +190,7 @@ #define FLAG_RECEIVED_TM40 0xAA #define FLAG_RECEIVED_TM04 0xAB #define FLAG_RECEIVED_TM03 0xAC -#define FLAG_DECORATION_0 0xAD +#define FLAG_HIDE_SECRET_BASE_TRAINER 0xAD #define FLAG_DECORATION_1 0xAE #define FLAG_DECORATION_2 0xAF #define FLAG_DECORATION_3 0xB0 diff --git a/src/decoration.c b/src/decoration.c index 118b4918e6..78f6ccb407 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -41,7 +41,7 @@ #define PLACE_DECORATION_SELECTOR_TAG 0xbe5 #define PLACE_DECORATION_PLAYER_TAG 0x008 -#define NUM_DECORATION_FLAGS (FLAG_DECORATION_14 - FLAG_DECORATION_0) +#define NUM_DECORATION_FLAGS (FLAG_DECORATION_14 - FLAG_DECORATION_1 + 1) #define tCursorX data[0] #define tCursorY data[1] From 429d53b95c6e7555931486fd2f713d9182a7f150 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 9 Jan 2022 11:12:35 -0500 Subject: [PATCH 333/417] Use runningState directly in CheckMovementInputNotOnBike --- src/field_player_avatar.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index aa4b99a57b..fce23ee8ea 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -33,12 +33,6 @@ #define NUM_FORCED_MOVEMENTS 18 #define NUM_ACRO_BIKE_COLLISIONS 5 -enum { - PLAYER_STILL, - PLAYER_TURNING, - PLAYER_MOVING, -}; - static EWRAM_DATA u8 sSpinStartFacingDir = 0; EWRAM_DATA struct ObjectEvent gObjectEvents[OBJECT_EVENTS_COUNT] = {}; EWRAM_DATA struct PlayerAvatar gPlayerAvatar = {}; @@ -196,9 +190,9 @@ static bool8 (*const sForcedMovementFuncs[NUM_FORCED_MOVEMENTS + 1])(void) = static void (*const sPlayerNotOnBikeFuncs[])(u8, u16) = { - [PLAYER_STILL] = PlayerNotOnBikeNotMoving, - [PLAYER_TURNING] = PlayerNotOnBikeTurningInPlace, - [PLAYER_MOVING] = PlayerNotOnBikeMoving, + [NOT_MOVING] = PlayerNotOnBikeNotMoving, + [TURN_DIRECTION] = PlayerNotOnBikeTurningInPlace, + [MOVING] = PlayerNotOnBikeMoving, }; static bool8 (*const sAcroBikeTrickMetatiles[NUM_ACRO_BIKE_COLLISIONS])(u8) = @@ -591,20 +585,11 @@ static void MovePlayerNotOnBike(u8 direction, u16 heldKeys) static u8 CheckMovementInputNotOnBike(u8 direction) { if (direction == DIR_NONE) - { - gPlayerAvatar.runningState = NOT_MOVING; - return PLAYER_STILL; - } + return gPlayerAvatar.runningState = NOT_MOVING; else if (direction != GetPlayerMovementDirection() && gPlayerAvatar.runningState != MOVING) - { - gPlayerAvatar.runningState = TURN_DIRECTION; - return PLAYER_TURNING; - } + return gPlayerAvatar.runningState = TURN_DIRECTION; else - { - gPlayerAvatar.runningState = MOVING; - return PLAYER_MOVING; - } + return gPlayerAvatar.runningState = MOVING; } static void PlayerNotOnBikeNotMoving(u8 direction, u16 heldKeys) From ded2021361ce8cef9c9a785ec52b42f8d4f653f9 Mon Sep 17 00:00:00 2001 From: Wiz <94323898+GBAWiz420@users.noreply.github.com> Date: Tue, 16 Nov 2021 13:25:33 -0500 Subject: [PATCH 334/417] Remove redundant assembler --- berry_fix/payload/src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/berry_fix/payload/src/main.c b/berry_fix/payload/src/main.c index 325d3830eb..32d90f9c19 100644 --- a/berry_fix/payload/src/main.c +++ b/berry_fix/payload/src/main.c @@ -268,9 +268,9 @@ void main_callback(u32 * state, void * unused1, void * unused2) void DBG_LoadDigitsPal(void) { - const u16 * src; s32 i; - register vu16 * dest asm("r3") = (vu16 *)BG_PLTT + 1; + const u16 * src; + vu16 * dest = (vu16 *)BG_PLTT + 1; DmaFill16(3, RGB(31, 31, 31), (vu16 *)BG_PLTT, BG_PLTT_SIZE); src = sDebugPals; for (i = 0; i < 4; i++) From 110fbc559cc658179e127117c68d9eea9474a61a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 02:08:14 -0500 Subject: [PATCH 335/417] Make item optional for givemon and setwildbattle --- asm/macros/event.inc | 4 ++-- data/maps/AncientTomb/scripts.inc | 2 +- data/maps/AquaHideout_B1F/scripts.inc | 4 ++-- data/maps/BattleFrontier_OutsideEast/scripts.inc | 2 +- data/maps/DesertRuins/scripts.inc | 2 +- data/maps/IslandCave/scripts.inc | 2 +- data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc | 6 +++--- data/maps/MarineCave_End/scripts.inc | 2 +- data/maps/MossdeepCity_StevensHouse/scripts.inc | 2 +- data/maps/NewMauville_Inside/scripts.inc | 6 +++--- data/maps/Route120/scripts.inc | 2 +- data/maps/RustboroCity_DevonCorp_2F/scripts.inc | 4 ++-- data/maps/SkyPillar_Top/scripts.inc | 2 +- data/maps/TerraCave_End/scripts.inc | 2 +- data/scripts/kecleon.inc | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 8d65f602de..d85cfb9752 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -986,7 +986,7 @@ @ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters. @ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome. - .macro givemon species:req, level:req, item:req + .macro givemon species:req, level:req, item=ITEM_NONE .byte 0x79 .2byte \species .byte \level @@ -1432,7 +1432,7 @@ @ Prepares to start a wild battle against a 'species' at 'level' holding 'item'. Running this command will not affect @ normal wild battles. You start the prepared battle with dowildbattle. - .macro setwildbattle species:req, level:req, item:req + .macro setwildbattle species:req, level:req, item=ITEM_NONE .byte 0xb6 .2byte \species .byte \level diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index d28ac7bc35..dd22359558 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -61,7 +61,7 @@ AncientTomb_EventScript_Registeel:: playmoncry SPECIES_REGISTEEL, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setwildbattle SPECIES_REGISTEEL, 40, ITEM_NONE + setwildbattle SPECIES_REGISTEEL, 40 setflag FLAG_SYS_CTRL_OBJ_DELETE special StartRegiBattle waitstate diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc index 4f2eb836f5..f644f6ae56 100644 --- a/data/maps/AquaHideout_B1F/scripts.inc +++ b/data/maps/AquaHideout_B1F/scripts.inc @@ -29,7 +29,7 @@ AquaHideout_B1F_EventScript_ShowElectrode2:: AquaHideout_B1F_EventScript_Electrode1:: lock faceplayer - setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE + setwildbattle SPECIES_ELECTRODE, 30 waitse playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER delay 40 @@ -53,7 +53,7 @@ AquaHideout_B1F_EventScript_DefeatedElectrode1:: AquaHideout_B1F_EventScript_Electrode2:: lock faceplayer - setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE + setwildbattle SPECIES_ELECTRODE, 30 waitse playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER delay 40 diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc index f343734806..e8eec6f160 100644 --- a/data/maps/BattleFrontier_OutsideEast/scripts.inc +++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc @@ -129,7 +129,7 @@ BattleFrontier_OutsideEast_EventScript_WaterSudowoodo:: delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_SUDOWOODO - setwildbattle SPECIES_SUDOWOODO, 40, ITEM_NONE + setwildbattle SPECIES_SUDOWOODO, 40 setflag FLAG_SYS_CTRL_OBJ_DELETE dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index 2aaa61ebb9..21473e87a3 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -61,7 +61,7 @@ DesertRuins_EventScript_Regirock:: playmoncry SPECIES_REGIROCK, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setwildbattle SPECIES_REGIROCK, 40, ITEM_NONE + setwildbattle SPECIES_REGIROCK, 40 setflag FLAG_SYS_CTRL_OBJ_DELETE special StartRegiBattle waitstate diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index 8f8236a5c0..d15802aaa8 100644 --- a/data/maps/IslandCave/scripts.inc +++ b/data/maps/IslandCave/scripts.inc @@ -94,7 +94,7 @@ IslandCave_EventScript_Regice:: playmoncry SPECIES_REGICE, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setwildbattle SPECIES_REGICE, 40, ITEM_NONE + setwildbattle SPECIES_REGICE, 40 setflag FLAG_SYS_CTRL_OBJ_DELETE special StartRegiBattle waitstate diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index 7c7f47d2ee..d645db4405 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -340,7 +340,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime:: LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil:: bufferspeciesname STR_VAR_1, SPECIES_CYNDAQUIL setvar VAR_TEMP_1, SPECIES_CYNDAQUIL - givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE + givemon SPECIES_CYNDAQUIL, 5 goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC hidemonpic @@ -381,7 +381,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil:: LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile:: bufferspeciesname STR_VAR_1, SPECIES_TOTODILE setvar VAR_TEMP_1, SPECIES_TOTODILE - givemon SPECIES_TOTODILE, 5, ITEM_NONE + givemon SPECIES_TOTODILE, 5 goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC hidemonpic @@ -422,7 +422,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile:: LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita:: bufferspeciesname STR_VAR_1, SPECIES_CHIKORITA setvar VAR_TEMP_1, SPECIES_CHIKORITA - givemon SPECIES_CHIKORITA, 5, ITEM_NONE + givemon SPECIES_CHIKORITA, 5 goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC hidemonpic diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc index 1d988a4448..a7ff583695 100644 --- a/data/maps/MarineCave_End/scripts.inc +++ b/data/maps/MarineCave_End/scripts.inc @@ -35,7 +35,7 @@ MarineCave_End_EventScript_Kyogre:: delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_KYOGRE - setwildbattle SPECIES_KYOGRE, 70, ITEM_NONE + setwildbattle SPECIES_KYOGRE, 70 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle waitstate diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index aac12ec2af..00814ce194 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -86,7 +86,7 @@ MossdeepCity_StevensHouse_EventScript_LeaveBeldum:: MossdeepCity_StevensHouse_EventScript_GiveBeldum:: setvar VAR_TEMP_1, SPECIES_BELDUM - givemon SPECIES_BELDUM, 5, ITEM_NONE + givemon SPECIES_BELDUM, 5 goto_if_eq VAR_RESULT, 0, MossdeepCity_StevensHouse_EventScript_SendBeldumParty goto_if_eq VAR_RESULT, 1, MossdeepCity_StevensHouse_EventScript_SendBeldumPC goto Common_EventScript_NoMoreRoomForPokemon diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc index 51748380ad..244eea436f 100644 --- a/data/maps/NewMauville_Inside/scripts.inc +++ b/data/maps/NewMauville_Inside/scripts.inc @@ -176,7 +176,7 @@ NewMauville_Inside_EventScript_GeneratorOff:: NewMauville_Inside_EventScript_Voltorb1:: lock faceplayer - setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE + setwildbattle SPECIES_VOLTORB, 25 waitse playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER delay 40 @@ -200,7 +200,7 @@ NewMauville_Inside_EventScript_DefeatedVoltorb1:: NewMauville_Inside_EventScript_Voltorb2:: lock faceplayer - setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE + setwildbattle SPECIES_VOLTORB, 25 waitse playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER delay 40 @@ -224,7 +224,7 @@ NewMauville_Inside_EventScript_DefeatedVoltorb2:: NewMauville_Inside_EventScript_Voltorb3:: lock faceplayer - setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE + setwildbattle SPECIES_VOLTORB, 25 waitse playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER delay 40 diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index baf721a5ca..a0bfbc60c3 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -193,7 +193,7 @@ Route120_EventScript_StevenBattleKecleon:: playmoncry SPECIES_KECLEON, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setwildbattle SPECIES_KECLEON, 30, ITEM_NONE + setwildbattle SPECIES_KECLEON, 30 setvar VAR_0x8009, 0 setflag FLAG_SYS_CTRL_OBJ_DELETE dowildbattle diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index 987828a295..a85cbc8be8 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -145,7 +145,7 @@ RustboroCity_DevonCorp_2F_EventScript_AnorithReady:: RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep:: setvar VAR_TEMP_1, SPECIES_LILEEP - givemon SPECIES_LILEEP, 20, ITEM_NONE + givemon SPECIES_LILEEP, 20 goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC goto Common_EventScript_NoMoreRoomForPokemon @@ -190,7 +190,7 @@ RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep:: RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith:: setvar VAR_TEMP_1, SPECIES_ANORITH - givemon SPECIES_ANORITH, 20, ITEM_NONE + givemon SPECIES_ANORITH, 20 goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC goto Common_EventScript_NoMoreRoomForPokemon diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc index 5c71bbe4bf..7b65d9e257 100644 --- a/data/maps/SkyPillar_Top/scripts.inc +++ b/data/maps/SkyPillar_Top/scripts.inc @@ -48,7 +48,7 @@ SkyPillar_Top_EventScript_Rayquaza:: playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setwildbattle SPECIES_RAYQUAZA, 70, ITEM_NONE + setwildbattle SPECIES_RAYQUAZA, 70 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle waitstate diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc index 5f0051becf..8b2732d45e 100644 --- a/data/maps/TerraCave_End/scripts.inc +++ b/data/maps/TerraCave_End/scripts.inc @@ -35,7 +35,7 @@ TerraCave_End_EventScript_Groudon:: delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_GROUDON - setwildbattle SPECIES_GROUDON, 70, ITEM_NONE + setwildbattle SPECIES_GROUDON, 70 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle waitstate diff --git a/data/scripts/kecleon.inc b/data/scripts/kecleon.inc index f51dc2fbd2..6345519026 100644 --- a/data/scripts/kecleon.inc +++ b/data/scripts/kecleon.inc @@ -71,7 +71,7 @@ EventScript_BattleKecleon:: playmoncry SPECIES_KECLEON, CRY_MODE_ENCOUNTER delay 40 waitmoncry - setwildbattle SPECIES_KECLEON, 30, ITEM_NONE + setwildbattle SPECIES_KECLEON, 30 setflag FLAG_SYS_CTRL_OBJ_DELETE dowildbattle clearflag FLAG_SYS_CTRL_OBJ_DELETE From 3a6c633905c3fddb893aa6484a2cce4f0135ca26 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 02:16:25 -0500 Subject: [PATCH 336/417] Add seteventmon --- asm/macros/event.inc | 8 ++++++++ data/maps/BirthIsland_Exterior/scripts.inc | 5 +---- data/maps/FarawayIsland_Interior/scripts.inc | 5 +---- data/maps/NavelRock_Bottom/scripts.inc | 5 +---- data/maps/NavelRock_Top/scripts.inc | 5 +---- data/maps/SouthernIsland_Interior/scripts.inc | 10 ++-------- 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index d85cfb9752..58e37d0a6a 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1931,3 +1931,11 @@ waitbuttonpress closebraillemessage .endm + + @ Creates an "event legal" Pokémon for an encounter + .macro seteventmon species:req, level:req, item=ITEM_NONE + setvar VAR_0x8004, \species + setvar VAR_0x8005, \level + setvar VAR_0x8006, \item + special CreateEventLegalEnemyMon + .endm diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index 57d54d6fdc..68d3124d95 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -82,10 +82,7 @@ BirthIsland_Exterior_EventScript_Deoxys:: delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_DEOXYS - setvar VAR_0x8004, SPECIES_DEOXYS - setvar VAR_0x8005, 30 @ level - setvar VAR_0x8006, ITEM_NONE - special CreateEventLegalEnemyMon + seteventmon SPECIES_DEOXYS, 30 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle waitstate diff --git a/data/maps/FarawayIsland_Interior/scripts.inc b/data/maps/FarawayIsland_Interior/scripts.inc index 983b4709a2..d3d519ed15 100644 --- a/data/maps/FarawayIsland_Interior/scripts.inc +++ b/data/maps/FarawayIsland_Interior/scripts.inc @@ -129,10 +129,7 @@ FarawayIsland_Interior_EventScript_Mew:: special DestroyMewEmergingGrassSprite delay 40 waitmoncry - setvar VAR_0x8004, SPECIES_MEW - setvar VAR_0x8005, 30 @ level - setvar VAR_0x8006, ITEM_NONE - special CreateEventLegalEnemyMon + seteventmon SPECIES_MEW, 30 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle waitstate diff --git a/data/maps/NavelRock_Bottom/scripts.inc b/data/maps/NavelRock_Bottom/scripts.inc index f6687a36f5..90cc229895 100644 --- a/data/maps/NavelRock_Bottom/scripts.inc +++ b/data/maps/NavelRock_Bottom/scripts.inc @@ -53,10 +53,7 @@ NavelRock_Bottom_EventScript_Lugia:: playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER waitmoncry delay 20 - setvar VAR_0x8004, SPECIES_LUGIA - setvar VAR_0x8005, 70 @ level - setvar VAR_0x8006, ITEM_NONE - special CreateEventLegalEnemyMon + seteventmon SPECIES_LUGIA, 70 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle waitstate diff --git a/data/maps/NavelRock_Top/scripts.inc b/data/maps/NavelRock_Top/scripts.inc index 2805f56771..10969367a1 100644 --- a/data/maps/NavelRock_Top/scripts.inc +++ b/data/maps/NavelRock_Top/scripts.inc @@ -57,10 +57,7 @@ NavelRock_Top_EventScript_HoOh:: applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhApproach waitmovement 0 special RemoveCameraObject - setvar VAR_0x8004, SPECIES_HO_OH - setvar VAR_0x8005, 70 @ level - setvar VAR_0x8006, ITEM_NONE - special CreateEventLegalEnemyMon + seteventmon SPECIES_HO_OH, 70 setflag FLAG_SYS_CTRL_OBJ_DELETE special BattleSetup_StartLegendaryBattle waitstate diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index c46cefefc6..7bd16b523a 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -105,17 +105,11 @@ SouthernIsland_Interior_EventScript_Sign:: end SouthernIsland_Interior_EventScript_SetLatiosBattleVars:: - setvar VAR_0x8004, SPECIES_LATIOS - setvar VAR_0x8005, 50 @ level - setvar VAR_0x8006, ITEM_SOUL_DEW - special CreateEventLegalEnemyMon + seteventmon SPECIES_LATIOS, 50, ITEM_SOUL_DEW return SouthernIsland_Interior_EventScript_SetLatiasBattleVars:: - setvar VAR_0x8004, SPECIES_LATIAS - setvar VAR_0x8005, 50 @ level - setvar VAR_0x8006, ITEM_SOUL_DEW - special CreateEventLegalEnemyMon + seteventmon SPECIES_LATIAS, 50, ITEM_SOUL_DEW return SouthernIsland_Interior_Movement_CameraPanUp: From 49418f8c017bf012e738527c14b3a92edec54d3e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 02:19:20 -0500 Subject: [PATCH 337/417] Add missing commas --- data/maps/BattleFrontier_BattlePikeLobby/scripts.inc | 2 +- data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc | 2 +- data/maps/LavaridgeTown_Gym_1F/scripts.inc | 4 ++-- data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc | 2 +- data/maps/MtPyre_3F/scripts.inc | 2 +- data/maps/SouthernIsland_Interior/scripts.inc | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc index fb91ee752a..320e12d996 100644 --- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc @@ -31,7 +31,7 @@ BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving:: lockall msgbox BattleFrontier_BattlePikeLobby_Text_FailedToSaveBeforeQuitting, MSGBOX_DEFAULT closemessage - pike_set PIKE_DATA_WIN_STREAK 0 + pike_set PIKE_DATA_WIN_STREAK, 0 pike_set PIKE_DATA_WIN_STREAK_ACTIVE, FALSE frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0 setvar VAR_TEMP_0, 255 diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc index 9d060214de..45f042e4f8 100644 --- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc +++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc @@ -193,7 +193,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_DefeatedLucy:: waitmovement 0 pike_get PIKE_DATA_WIN_STREAK addvar VAR_RESULT, 1 - pike_set PIKE_DATA_WIN_STREAK VAR_RESULT + pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT call BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom waitstate end diff --git a/data/maps/LavaridgeTown_Gym_1F/scripts.inc b/data/maps/LavaridgeTown_Gym_1F/scripts.inc index 6628360c15..530d6e9598 100644 --- a/data/maps/LavaridgeTown_Gym_1F/scripts.inc +++ b/data/maps/LavaridgeTown_Gym_1F/scripts.inc @@ -19,7 +19,7 @@ LavaridgeTown_Gym_1F_EventScript_SetTrainerTempVars:: setvar VAR_TEMP_D, 0 setvar VAR_TEMP_E, 0 setvar VAR_TEMP_F, 0 - goto_if_defeated TRAINER_COLE LavaridgeTown_Gym_1F_EventScript_SetGeraldTempVar + goto_if_defeated TRAINER_COLE, LavaridgeTown_Gym_1F_EventScript_SetGeraldTempVar setvar VAR_TEMP_B, 1 LavaridgeTown_Gym_1F_EventScript_SetGeraldTempVar:: goto_if_defeated TRAINER_GERALD, LavaridgeTown_Gym_1F_EventScript_SetAxleTempVar @@ -105,7 +105,7 @@ LavaridgeTown_Gym_1F_EventScript_FlanneryRematch:: LavaridgeTown_Gym_1F_EventScript_Cole:: trainerbattle TRAINER_BATTLE_CONTINUE_SCRIPT, TRAINER_COLE, LOCALID_COLE, LavaridgeTown_Gym_1F_Text_ColeIntro, LavaridgeTown_Gym_1F_Text_ColeDefeat, LavaridgeTown_Gym_EventScript_CheckTrainerScript - msgbox LavaridgeTown_Gym_1F_Text_ColePostBattle MSGBOX_AUTOCLOSE + msgbox LavaridgeTown_Gym_1F_Text_ColePostBattle, MSGBOX_AUTOCLOSE end LavaridgeTown_Gym_EventScript_CheckTrainerScript:: diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index 9931726833..901940ab8e 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -22,7 +22,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos:: checkplayergender goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_2F_EventScript_Ret @ Odd that the MaysHouse equivalent was used below instead - goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 LittlerootTown_MaysHouse_2F_EventScript_Ret + goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2, LittlerootTown_MaysHouse_2F_EventScript_Ret setobjectxyperm LOCALID_RIVAL, 0, 2 setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP return diff --git a/data/maps/MtPyre_3F/scripts.inc b/data/maps/MtPyre_3F/scripts.inc index ff15f99393..3c79e807a4 100644 --- a/data/maps/MtPyre_3F/scripts.inc +++ b/data/maps/MtPyre_3F/scripts.inc @@ -7,7 +7,7 @@ MtPyre_3F_EventScript_William:: end MtPyre_3F_EventScript_Kayla:: - trainerbattle_single TRAINER_KAYLA, MtPyre_3F_Text_KaylaIntro MtPyre_3F_Text_KaylaDefeat + trainerbattle_single TRAINER_KAYLA, MtPyre_3F_Text_KaylaIntro, MtPyre_3F_Text_KaylaDefeat msgbox MtPyre_3F_Text_KaylaPostBattle, MSGBOX_AUTOCLOSE end diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc index 7bd16b523a..8486739d93 100644 --- a/data/maps/SouthernIsland_Interior/scripts.inc +++ b/data/maps/SouthernIsland_Interior/scripts.inc @@ -47,7 +47,7 @@ SouthernIsland_Interior_EventScript_SetMayGfx:: SouthernIsland_Interior_EventScript_TryLatiEncounter:: lockall - setvar VAR_0x8008, 12 + setvar VAR_0x8008, 12 @ Player's Y coordinate. Not read goto SouthernIsland_Interior_EventScript_Lati end From 0a78cb5c9edf7d6b39297a5b4c874d59c6a69b39 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 10:04:47 -0500 Subject: [PATCH 338/417] Fix some battle dome graphics names --- .../{tourney_line_mask_map.bin => tourney_tree.bin} | Bin .../{tourney_bg.png => tourney_tree.png} | Bin .../text_pp.pal | 0 include/graphics.h | 4 ++-- src/battle_dome.c | 4 ++-- src/graphics.c | 6 +++--- 6 files changed, 7 insertions(+), 7 deletions(-) rename graphics/battle_frontier/{tourney_line_mask_map.bin => tourney_tree.bin} (100%) rename graphics/battle_frontier/{tourney_bg.png => tourney_tree.png} (100%) rename graphics/{battle_frontier => battle_interface}/text_pp.pal (100%) diff --git a/graphics/battle_frontier/tourney_line_mask_map.bin b/graphics/battle_frontier/tourney_tree.bin similarity index 100% rename from graphics/battle_frontier/tourney_line_mask_map.bin rename to graphics/battle_frontier/tourney_tree.bin diff --git a/graphics/battle_frontier/tourney_bg.png b/graphics/battle_frontier/tourney_tree.png similarity index 100% rename from graphics/battle_frontier/tourney_bg.png rename to graphics/battle_frontier/tourney_tree.png diff --git a/graphics/battle_frontier/text_pp.pal b/graphics/battle_interface/text_pp.pal similarity index 100% rename from graphics/battle_frontier/text_pp.pal rename to graphics/battle_interface/text_pp.pal diff --git a/include/graphics.h b/include/graphics.h index e2fe5cf778..c072babf3d 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4121,11 +4121,11 @@ extern const u32 gDomeTourneyInfoCardBg_Tilemap[]; extern const u32 gDomeTourneyTree_Pal[]; extern const u32 gDomeTourneyTreeButtons_Pal[]; extern const u32 gDomeTourneyMatchCardBg_Pal[]; -extern const u32 gDomeTourneyBg_Gfx[]; +extern const u32 gDomeTourneyTree_Gfx[]; extern const u32 gDomeTourneyLine_Gfx[]; extern const u32 gDomeTourneyLineDown_Tilemap[]; extern const u32 gDomeTourneyLineUp_Tilemap[]; -extern const u32 gDomeTourneyLineMask_Tilemap[]; +extern const u32 gDomeTourneyTree_Tilemap[]; extern const u32 gDomeTourneyTreeButtons_Gfx[]; extern const u16 gTilesetAnims_BattleDomePals0_0[]; extern const u16 gTilesetAnims_BattleDomePals0_1[]; diff --git a/src/battle_dome.c b/src/battle_dome.c index 2f77491c9e..aadd85afd6 100644 --- a/src/battle_dome.c +++ b/src/battle_dome.c @@ -5304,10 +5304,10 @@ static void Task_ShowTourneyTree(u8 taskId) break; case 2: sTilemapBuffer = AllocZeroed(BG_SCREEN_SIZE); - LZDecompressWram(gDomeTourneyLineMask_Tilemap, sTilemapBuffer); + LZDecompressWram(gDomeTourneyTree_Tilemap, sTilemapBuffer); SetBgTilemapBuffer(1, sTilemapBuffer); CopyBgTilemapBufferToVram(1); - DecompressAndLoadBgGfxUsingHeap(1, gDomeTourneyBg_Gfx, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(1, gDomeTourneyTree_Gfx, 0x2000, 0, 0); DecompressAndLoadBgGfxUsingHeap(2, gDomeTourneyLine_Gfx, 0x2000, 0, 0); DecompressAndLoadBgGfxUsingHeap(2, gDomeTourneyLineDown_Tilemap, 0x2000, 0, 1); DecompressAndLoadBgGfxUsingHeap(3, gDomeTourneyLineUp_Tilemap, 0x2000, 0, 1); diff --git a/src/graphics.c b/src/graphics.c index 47b82b6b72..b79d449ae6 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -950,9 +950,9 @@ const u32 gVsLettersGfx[] = INCBIN_U32("graphics/battle_transitions/vs.4bpp.lz") #include "data/graphics/battle_terrain.h" // Battle Dome -const u32 gDomeTourneyBg_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_bg.4bpp.lz"); +const u32 gDomeTourneyTree_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_tree.4bpp.lz"); const u32 gDomeTourneyLine_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_line.4bpp.lz"); // the red glow mask for the tourney advancement lines -const u32 gDomeTourneyLineMask_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_line_mask_map.bin.lz"); +const u32 gDomeTourneyTree_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_tree.bin.lz"); const u32 gDomeTourneyLineDown_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_line_down_map.bin.lz"); const u32 gDomeTourneyLineUp_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_line_up_map.bin.lz"); const u32 gDomeTourneyInfoCard_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_info_card.4bpp.lz"); @@ -967,7 +967,7 @@ const u32 gBattleArenaJudgementSymbolsGfx[] = INCBIN_U32("graphics/battle_fronti const u32 gBattleArenaJudgementSymbolsPalette[] = INCBIN_U32("graphics/battle_frontier/arena_judgement_symbols.gbapal.lz"); const u32 gBattleWindowTextPalette[] = INCBIN_U32("graphics/battle_interface/text.gbapal.lz"); -const u16 gPPTextPalette[] = INCBIN_U16("graphics/battle_frontier/text_pp.gbapal"); +const u16 gPPTextPalette[] = INCBIN_U16("graphics/battle_interface/text_pp.gbapal"); const u16 gTilesetAnims_BattleDomePals0_0[] = INCBIN_U16("graphics/battle_frontier/dome_anim1.gbapal"); const u16 gTilesetAnims_BattleDomePals0_1[] = INCBIN_U16("graphics/battle_frontier/dome_anim2.gbapal"); From fde18b47746b577c4d2037ab065ce66062da2a67 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 10:42:00 -0500 Subject: [PATCH 339/417] Fix berry crusher graphics name --- decompress.sh | 5 +++++ graphics/berry_crush/{crusher.bin => text_windows.bin} | 0 include/graphics.h | 2 +- src/berry_crush.c | 8 ++++---- src/graphics.c | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) create mode 100755 decompress.sh rename graphics/berry_crush/{crusher.bin => text_windows.bin} (100%) diff --git a/decompress.sh b/decompress.sh new file mode 100755 index 0000000000..26b5a0db74 --- /dev/null +++ b/decompress.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +FILEPATH=$1 + +tools/gbagfx/gbagfx graphics/$FILEPATH.bin.lz graphics/$FILEPATH.bin diff --git a/graphics/berry_crush/crusher.bin b/graphics/berry_crush/text_windows.bin similarity index 100% rename from graphics/berry_crush/crusher.bin rename to graphics/berry_crush/text_windows.bin diff --git a/include/graphics.h b/include/graphics.h index c072babf3d..7b29a70b79 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -5002,7 +5002,7 @@ extern const u16 gUsePokeblockCondition_Pal[]; // Berry Crush extern const u32 gBerryCrush_Crusher_Gfx[]; extern const u16 gBerryCrush_Crusher_Pal[]; -extern const u32 gBerryCrush_Crusher_Tilemap[]; +extern const u32 gBerryCrush_TextWindows_Tilemap[]; // Pokenav extern const u32 gPokenavMessageBox_Gfx[]; diff --git a/src/berry_crush.c b/src/berry_crush.c index 9b8323e2d7..e7a5df951c 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1947,15 +1947,15 @@ static void DrawPlayerNameWindows(struct BerryCrushGame *game) static void CopyPlayerNameWindowGfxToBg(struct BerryCrushGame *game) { u8 i = 0; - u8 * crusherGfx; + u8 * windowGfx; - LZ77UnCompWram(gBerryCrush_Crusher_Tilemap, gDecompressionBuffer); + LZ77UnCompWram(gBerryCrush_TextWindows_Tilemap, gDecompressionBuffer); - for (crusherGfx = gDecompressionBuffer; i < game->playerCount; i++) + for (windowGfx = gDecompressionBuffer; i < game->playerCount; i++) { CopyToBgTilemapBufferRect( 3, - &crusherGfx[game->gfx.playerCoords[i]->playerId * 40], + &windowGfx[game->gfx.playerCoords[i]->playerId * 40], game->gfx.playerCoords[i]->windowGfxX, game->gfx.playerCoords[i]->windowGfxY, 10, diff --git a/src/graphics.c b/src/graphics.c index b79d449ae6..d1a3654eac 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1523,7 +1523,7 @@ const u16 gFrontierPassCancelButtonHighlighted_Tilemap[] = INCBIN_U16("graphics/ // Berry Crush const u16 gBerryCrush_Crusher_Pal[] = INCBIN_U16("graphics/berry_crush/crusher.gbapal"); const u32 gBerryCrush_Crusher_Gfx[] = INCBIN_U32("graphics/berry_crush/crusher.4bpp.lz"); -const u32 gBerryCrush_Crusher_Tilemap[] = INCBIN_U32("graphics/berry_crush/crusher.bin.lz"); +const u32 gBerryCrush_TextWindows_Tilemap[] = INCBIN_U32("graphics/berry_crush/text_windows.bin.lz"); // random garbage at the end. static const u8 sEmpty3[0x54BAC] = {0}; From 7103839a615463eeadeb671ad75436dd2e4a52e3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 11:14:59 -0500 Subject: [PATCH 340/417] Move summary screen graphics out of interface, fix some names --- .../a_button.png} | Bin .../b_button.png} | Bin .../effect_battle.bin} | Bin .../effect_cancel.bin} | Bin .../effect_contest.bin} | Bin .../markings.pal} | 0 .../move_select.png} | Bin .../page_battle_moves.bin} | Bin .../page_contest_moves.bin} | Bin .../page_info.bin} | Bin .../page_info_egg.bin} | Bin .../page_skills.bin} | Bin .../status_tilemap.bin | Bin .../tiles.pal} | 0 .../tiles.png} | Bin include/graphics.h | 8 ++--- src/graphics.c | 24 ++++++------- src/pokemon_summary_screen.c | 33 +++++++++--------- 18 files changed, 33 insertions(+), 32 deletions(-) rename graphics/{interface/summary_a_button.png => summary_screen/a_button.png} (100%) rename graphics/{interface/summary_b_button.png => summary_screen/b_button.png} (100%) rename graphics/{interface/powacc_tilemap.bin => summary_screen/effect_battle.bin} (100%) rename graphics/{interface/summary.bin => summary_screen/effect_cancel.bin} (100%) rename graphics/{interface/appealjam_tilemap.bin => summary_screen/effect_contest.bin} (100%) rename graphics/{interface/summary_markings.pal => summary_screen/markings.pal} (100%) rename graphics/{interface/summary_frames.png => summary_screen/move_select.png} (100%) rename graphics/{interface/summary_page_battle_moves.bin => summary_screen/page_battle_moves.bin} (100%) rename graphics/{interface/summary_page_contest_moves.bin => summary_screen/page_contest_moves.bin} (100%) rename graphics/{interface/summary_page_info.bin => summary_screen/page_info.bin} (100%) rename graphics/{interface/summary_page_info_copy.bin => summary_screen/page_info_egg.bin} (100%) rename graphics/{interface/summary_page_skills.bin => summary_screen/page_skills.bin} (100%) rename graphics/{interface => summary_screen}/status_tilemap.bin (100%) rename graphics/{interface/summary_screen.pal => summary_screen/tiles.pal} (100%) rename graphics/{interface/summary_screen.png => summary_screen/tiles.png} (100%) diff --git a/graphics/interface/summary_a_button.png b/graphics/summary_screen/a_button.png similarity index 100% rename from graphics/interface/summary_a_button.png rename to graphics/summary_screen/a_button.png diff --git a/graphics/interface/summary_b_button.png b/graphics/summary_screen/b_button.png similarity index 100% rename from graphics/interface/summary_b_button.png rename to graphics/summary_screen/b_button.png diff --git a/graphics/interface/powacc_tilemap.bin b/graphics/summary_screen/effect_battle.bin similarity index 100% rename from graphics/interface/powacc_tilemap.bin rename to graphics/summary_screen/effect_battle.bin diff --git a/graphics/interface/summary.bin b/graphics/summary_screen/effect_cancel.bin similarity index 100% rename from graphics/interface/summary.bin rename to graphics/summary_screen/effect_cancel.bin diff --git a/graphics/interface/appealjam_tilemap.bin b/graphics/summary_screen/effect_contest.bin similarity index 100% rename from graphics/interface/appealjam_tilemap.bin rename to graphics/summary_screen/effect_contest.bin diff --git a/graphics/interface/summary_markings.pal b/graphics/summary_screen/markings.pal similarity index 100% rename from graphics/interface/summary_markings.pal rename to graphics/summary_screen/markings.pal diff --git a/graphics/interface/summary_frames.png b/graphics/summary_screen/move_select.png similarity index 100% rename from graphics/interface/summary_frames.png rename to graphics/summary_screen/move_select.png diff --git a/graphics/interface/summary_page_battle_moves.bin b/graphics/summary_screen/page_battle_moves.bin similarity index 100% rename from graphics/interface/summary_page_battle_moves.bin rename to graphics/summary_screen/page_battle_moves.bin diff --git a/graphics/interface/summary_page_contest_moves.bin b/graphics/summary_screen/page_contest_moves.bin similarity index 100% rename from graphics/interface/summary_page_contest_moves.bin rename to graphics/summary_screen/page_contest_moves.bin diff --git a/graphics/interface/summary_page_info.bin b/graphics/summary_screen/page_info.bin similarity index 100% rename from graphics/interface/summary_page_info.bin rename to graphics/summary_screen/page_info.bin diff --git a/graphics/interface/summary_page_info_copy.bin b/graphics/summary_screen/page_info_egg.bin similarity index 100% rename from graphics/interface/summary_page_info_copy.bin rename to graphics/summary_screen/page_info_egg.bin diff --git a/graphics/interface/summary_page_skills.bin b/graphics/summary_screen/page_skills.bin similarity index 100% rename from graphics/interface/summary_page_skills.bin rename to graphics/summary_screen/page_skills.bin diff --git a/graphics/interface/status_tilemap.bin b/graphics/summary_screen/status_tilemap.bin similarity index 100% rename from graphics/interface/status_tilemap.bin rename to graphics/summary_screen/status_tilemap.bin diff --git a/graphics/interface/summary_screen.pal b/graphics/summary_screen/tiles.pal similarity index 100% rename from graphics/interface/summary_screen.pal rename to graphics/summary_screen/tiles.pal diff --git a/graphics/interface/summary_screen.png b/graphics/summary_screen/tiles.png similarity index 100% rename from graphics/interface/summary_screen.png rename to graphics/summary_screen/tiles.png diff --git a/include/graphics.h b/include/graphics.h index 7b29a70b79..5c6a043cc5 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4035,16 +4035,16 @@ extern const u32 gPokenavRibbonsSummaryBg_Tilemap[]; extern const u32 gSummaryScreen_Gfx[]; extern const u32 gSummaryScreen_Pal[]; extern const u32 gSummaryPage_Info_Tilemap[]; -extern const u32 gSummaryPage_InfoCopy_Tilemap[]; +extern const u32 gSummaryPage_InfoEgg_Tilemap[]; extern const u32 gSummaryPage_Skills_Tilemap[]; extern const u32 gSummaryPage_BattleMoves_Tilemap[]; extern const u32 gSummaryPage_ContestMoves_Tilemap[]; extern const u16 gPPTextPalette[]; -extern const u16 gSummaryScreenWindow_Tilemap[]; extern const u32 gMoveTypes_Pal[]; -extern const u16 gSummaryScreenPowAcc_Tilemap[]; -extern const u16 gSummaryScreenAppealJam_Tilemap[]; +extern const u16 gSummaryScreen_MoveEffect_Battle_Tilemap[]; +extern const u16 gSummaryScreen_MoveEffect_Contest_Tilemap[]; +extern const u16 gSummaryScreen_MoveEffect_Cancel_Tilemap[]; extern const u32 gMoveTypes_Gfx[]; extern const u32 gSummaryMoveSelect_Gfx[]; diff --git a/src/graphics.c b/src/graphics.c index d1a3654eac..51e585489d 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1126,16 +1126,16 @@ const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapa const u32 gMoveTypes_Gfx[] = INCBIN_U32("graphics/types/move_types.4bpp.lz"); const u32 gMoveTypes_Pal[] = INCBIN_U32("graphics/types/move_types.gbapal.lz"); -const u32 gSummaryMoveSelect_Gfx[] = INCBIN_U32("graphics/interface/summary_frames.4bpp.lz"); -const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/interface/summary_frames.gbapal.lz"); +const u32 gSummaryMoveSelect_Gfx[] = INCBIN_U32("graphics/summary_screen/move_select.4bpp.lz"); +const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/summary_screen/move_select.gbapal.lz"); -const u32 gSummaryScreen_Gfx[] = INCBIN_U32("graphics/interface/summary_screen.4bpp.lz"); -const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/interface/summary_screen.gbapal.lz"); -const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info.bin.lz"); -const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_skills.bin.lz"); -const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_battle_moves.bin.lz"); -const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_contest_moves.bin.lz"); -const u32 gSummaryPage_InfoCopy_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info_copy.bin.lz"); +const u32 gSummaryScreen_Gfx[] = INCBIN_U32("graphics/summary_screen/tiles.4bpp.lz"); +const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/summary_screen/tiles.gbapal.lz"); +const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info.bin.lz"); +const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_skills.bin.lz"); +const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_battle_moves.bin.lz"); +const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_contest_moves.bin.lz"); +const u32 gSummaryPage_InfoEgg_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info_egg.bin.lz"); const u32 gBagMaleTiles[] = INCBIN_U32("graphics/misc/bag_male.4bpp.lz"); const u32 gBagFemaleTiles[] = INCBIN_U32("graphics/misc/bag_female.4bpp.lz"); @@ -1259,9 +1259,9 @@ const u32 gPokedexSearchMenu_Gfx[] = INCBIN_U32("graphics/pokedex/search_menu.4b const u32 gPokedexSearchMenuNational_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_national.bin.lz"); const u32 gPokedexSearchMenuHoenn_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_hoenn.bin.lz"); -const u16 gSummaryScreenPowAcc_Tilemap[] = INCBIN_U16("graphics/interface/powacc_tilemap.bin"); -const u16 gSummaryScreenAppealJam_Tilemap[] = INCBIN_U16("graphics/interface/appealjam_tilemap.bin"); -const u16 gSummaryScreenWindow_Tilemap[] = INCBIN_U16("graphics/interface/summary.bin"); +const u16 gSummaryScreen_MoveEffect_Battle_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_battle.bin"); +const u16 gSummaryScreen_MoveEffect_Contest_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_contest.bin"); +const u16 gSummaryScreen_MoveEffect_Cancel_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_cancel.bin"); const u16 gIntroCopyright_Pal[] = INCBIN_U16("graphics/intro/copyright.gbapal"); const u32 gIntroCopyright_Gfx[] = INCBIN_U32("graphics/intro/copyright.4bpp.lz"); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index c5aeb6b47a..10c69a4226 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -365,7 +365,7 @@ struct TilemapCtrl u8 field_9; }; -static const u16 sStatusTilemap[] = INCBIN_U16("graphics/interface/status_tilemap.bin"); +static const u16 sStatusTilemap[] = INCBIN_U16("graphics/summary_screen/status_tilemap.bin"); static const struct TilemapCtrl sStatusTilemapCtrl1 = { sStatusTilemap, 1, 10, 2, 0, 18 @@ -376,11 +376,11 @@ static const struct TilemapCtrl sStatusTilemapCtrl2 = }; static const struct TilemapCtrl sBattleMoveTilemapCtrl = { - gSummaryScreenPowAcc_Tilemap, 0, 10, 7, 0, 45 + gSummaryScreen_MoveEffect_Battle_Tilemap, 0, 10, 7, 0, 45 }; static const struct TilemapCtrl sContestMoveTilemapCtrl = { - gSummaryScreenAppealJam_Tilemap, 0, 10, 7, 0, 45 + gSummaryScreen_MoveEffect_Contest_Tilemap, 0, 10, 7, 0, 45 }; static const s8 sMultiBattleOrder[] = {0, 2, 3, 1, 4, 5}; static const struct WindowTemplate sSummaryTemplate[] = @@ -701,8 +701,8 @@ static const u8 sTextColors[][3] = {0, 7, 8} }; -static const u8 sSummaryAButtonBitmap[] = INCBIN_U8("graphics/interface/summary_a_button.4bpp"); -static const u8 sSummaryBButtonBitmap[] = INCBIN_U8("graphics/interface/summary_b_button.4bpp"); +static const u8 sAButton_Gfx[] = INCBIN_U8("graphics/summary_screen/a_button.4bpp"); +static const u8 sBButton_Gfx[] = INCBIN_U8("graphics/summary_screen/b_button.4bpp"); static void (*const sTextPrinterFunctions[])(void) = { @@ -1071,7 +1071,7 @@ static const struct SpriteTemplate sSpriteTemplate_StatusCondition = .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy }; -static const u16 sSummaryMarkingsPalette[] = INCBIN_U16("graphics/interface/summary_markings.gbapal"); +static const u16 sMarkings_Pal[] = INCBIN_U16("graphics/summary_screen/markings.gbapal"); // code void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)) @@ -1312,7 +1312,7 @@ static bool8 DecompressGraphics(void) } break; case 2: - LZDecompressWram(gSummaryPage_InfoCopy_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]); + LZDecompressWram(gSummaryPage_InfoEgg_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]); sMonSummaryScreen->switchCounter++; break; case 3: @@ -2551,6 +2551,7 @@ static void Task_ShowStatusWindow(u8 taskId) } } +// Toggles the "Cancel" window that appears when selecting a move static void TilemapFiveMovesDisplay(u16 *dst, u16 palette, bool8 remove) { u16 i, id; @@ -2561,18 +2562,18 @@ static void TilemapFiveMovesDisplay(u16 *dst, u16 palette, bool8 remove) { for (i = 0; i < 20; i++) { - dst[id + i] = gSummaryScreenWindow_Tilemap[i] + palette; - dst[id + i + 0x20] = gSummaryScreenWindow_Tilemap[i] + palette; - dst[id + i + 0x40] = gSummaryScreenWindow_Tilemap[i + 20] + palette; + dst[id + i] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i] + palette; + dst[id + i + 0x20] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i] + palette; + dst[id + i + 0x40] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 20] + palette; } } else // Remove { for (i = 0; i < 20; i++) { - dst[id + i] = gSummaryScreenWindow_Tilemap[i + 20] + palette; - dst[id + i + 0x20] = gSummaryScreenWindow_Tilemap[i + 40] + palette; - dst[id + i + 0x40] = gSummaryScreenWindow_Tilemap[i + 40] + palette; + dst[id + i] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 20] + palette; + dst[id + i + 0x20] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 40] + palette; + dst[id + i + 0x40] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 40] + palette; } } } @@ -2788,8 +2789,8 @@ static void PrintGenderSymbol(struct Pokemon *mon, u16 species) static void PrintAOrBButtonIcon(u8 windowId, bool8 bButton, u32 x) { - // sSummaryBButtonBitmap - 0x80 = sSummaryAButtonBitmap - BlitBitmapToWindow(windowId, (bButton) ? sSummaryBButtonBitmap : sSummaryBButtonBitmap - 0x80, x, 0, 16, 16); + // sBButton_Gfx - sizeof(sBButton_Gfx) = sAButton_Gfx + BlitBitmapToWindow(windowId, (bButton) ? sBButton_Gfx : sBButton_Gfx - sizeof(sBButton_Gfx), x, 0, 16, 16); } static void PrintPageNamesAndStats(void) @@ -4011,7 +4012,7 @@ static void StopPokemonAnimations(void) // A subtle effect, this function stops static void CreateMonMarkingsSprite(struct Pokemon *mon) { - struct Sprite *sprite = CreateMonMarkingAllCombosSprite(TAG_MON_MARKINGS, TAG_MON_MARKINGS, sSummaryMarkingsPalette); + struct Sprite *sprite = CreateMonMarkingAllCombosSprite(TAG_MON_MARKINGS, TAG_MON_MARKINGS, sMarkings_Pal); sMonSummaryScreen->markingsSprite = sprite; if (sprite != NULL) From 565dd243098013c8665bc7f95106e2b5657e4e82 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 11:37:13 -0500 Subject: [PATCH 341/417] Move party menu graphics out of interface --- ...{party_menu_hpbar.png => unused_hpbar.png} | Bin .../party_menu_bg.bin => party_menu/bg.bin} | Bin .../party_menu_bg.pal => party_menu/bg.pal} | 0 .../party_menu_bg.png => party_menu/bg.png} | Bin .../cancel_button.bin} | 0 .../confirm_button.bin} | 0 .../pokeball.png} | Bin .../pokeball_small.png} | Bin graphics_file_rules.mk | 2 +- src/data/party_menu.h | 32 +++++++++++------- src/graphics.c | 14 ++++---- 11 files changed, 27 insertions(+), 21 deletions(-) rename graphics/interface/{party_menu_hpbar.png => unused_hpbar.png} (100%) rename graphics/{interface/party_menu_bg.bin => party_menu/bg.bin} (100%) rename graphics/{interface/party_menu_bg.pal => party_menu/bg.pal} (100%) rename graphics/{interface/party_menu_bg.png => party_menu/bg.png} (100%) rename graphics/{interface/party_menu_cancel_button.bin => party_menu/cancel_button.bin} (100%) rename graphics/{interface/party_menu_confirm_button.bin => party_menu/confirm_button.bin} (100%) rename graphics/{interface/party_menu_pokeball.png => party_menu/pokeball.png} (100%) rename graphics/{interface/party_menu_pokeball_small.png => party_menu/pokeball_small.png} (100%) diff --git a/graphics/interface/party_menu_hpbar.png b/graphics/interface/unused_hpbar.png similarity index 100% rename from graphics/interface/party_menu_hpbar.png rename to graphics/interface/unused_hpbar.png diff --git a/graphics/interface/party_menu_bg.bin b/graphics/party_menu/bg.bin similarity index 100% rename from graphics/interface/party_menu_bg.bin rename to graphics/party_menu/bg.bin diff --git a/graphics/interface/party_menu_bg.pal b/graphics/party_menu/bg.pal similarity index 100% rename from graphics/interface/party_menu_bg.pal rename to graphics/party_menu/bg.pal diff --git a/graphics/interface/party_menu_bg.png b/graphics/party_menu/bg.png similarity index 100% rename from graphics/interface/party_menu_bg.png rename to graphics/party_menu/bg.png diff --git a/graphics/interface/party_menu_cancel_button.bin b/graphics/party_menu/cancel_button.bin similarity index 100% rename from graphics/interface/party_menu_cancel_button.bin rename to graphics/party_menu/cancel_button.bin diff --git a/graphics/interface/party_menu_confirm_button.bin b/graphics/party_menu/confirm_button.bin similarity index 100% rename from graphics/interface/party_menu_confirm_button.bin rename to graphics/party_menu/confirm_button.bin diff --git a/graphics/interface/party_menu_pokeball.png b/graphics/party_menu/pokeball.png similarity index 100% rename from graphics/interface/party_menu_pokeball.png rename to graphics/party_menu/pokeball.png diff --git a/graphics/interface/party_menu_pokeball_small.png b/graphics/party_menu/pokeball_small.png similarity index 100% rename from graphics/interface/party_menu_pokeball_small.png rename to graphics/party_menu/pokeball_small.png diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 7a37c5e4f1..3b4bbeabfa 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -429,7 +429,7 @@ $(MASKSGFXDIR)/unused_level_up.4bpp: %.4bpp: %.png $(BATTRANSGFXDIR)/vs_frame.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 16 -$(INTERFACEGFXDIR)/party_menu_bg.4bpp: %.4bpp: %.png +graphics/party_menu/bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 62 $(TYPESGFXDIR)/move_types.4bpp: $(types:%=$(TYPESGFXDIR)/%.4bpp) $(contest_types:%=$(TYPESGFXDIR)/contest_%.4bpp) diff --git a/src/data/party_menu.h b/src/data/party_menu.h index f3a8a50ec0..f8321298ce 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -1,3 +1,9 @@ +enum { + TAG_POKEBALL = 1200, + TAG_POKEBALL_SMALL, + TAG_STATUS_ICONS, +}; + static const struct BgTemplate sPartyMenuBgTemplates[] = { { @@ -112,8 +118,8 @@ static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = }; // Used only when both Cancel and Confirm are present -static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_confirm_button.bin"); -static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_cancel_button.bin"); +static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/party_menu/confirm_button.bin"); +static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/party_menu/cancel_button.bin"); // Text colors for BG, FG, and Shadow in that order static const u8 sFontColorTable[][3] = @@ -969,19 +975,19 @@ static const union AnimCmd *const sSpriteAnimTable_MenuPokeball[] = static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeball = { - gPartyMenuPokeball_Gfx, 0x400, 0x04b0 + gPartyMenuPokeball_Gfx, 0x400, TAG_POKEBALL }; static const struct CompressedSpritePalette sSpritePalette_MenuPokeball = { - gPartyMenuPokeball_Pal, 0x04b0 + gPartyMenuPokeball_Pal, TAG_POKEBALL }; // Used for the pokeball sprite on each party slot / Cancel button static const struct SpriteTemplate sSpriteTemplate_MenuPokeball = { - .tileTag = 0x04b0, - .paletteTag = 0x04b0, + .tileTag = TAG_POKEBALL, + .paletteTag = TAG_POKEBALL, .oam = &sOamData_MenuPokeball, .anims = sSpriteAnimTable_MenuPokeball, .images = NULL, @@ -1055,14 +1061,14 @@ static const union AnimCmd *const sSpriteAnimTable_MenuPokeballSmall[] = static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeballSmall = { - gPartyMenuPokeballSmall_Gfx, 0x0300, 0x04b1 + gPartyMenuPokeballSmall_Gfx, 0x0300, TAG_POKEBALL_SMALL }; // Used for the pokeball sprite next to Cancel and Confirm when both are present, otherwise sSpriteTemplate_MenuPokeball is used static const struct SpriteTemplate sSpriteTemplate_MenuPokeballSmall = { - .tileTag = 1201, - .paletteTag = 1200, + .tileTag = TAG_POKEBALL_SMALL, + .paletteTag = TAG_POKEBALL, .oam = &sOamData_MenuPokeballSmall, .anims = sSpriteAnimTable_MenuPokeballSmall, .images = NULL, @@ -1149,18 +1155,18 @@ static const union AnimCmd *const sSpriteTemplate_StatusCondition[] = static const struct CompressedSpriteSheet sSpriteSheet_StatusIcons = { - gStatusGfx_Icons, 0x400, 1202 + gStatusGfx_Icons, 0x400, TAG_STATUS_ICONS }; static const struct CompressedSpritePalette sSpritePalette_StatusIcons = { - gStatusPal_Icons, 1202 + gStatusPal_Icons, TAG_STATUS_ICONS }; static const struct SpriteTemplate sSpriteTemplate_StatusIcons = { - .tileTag = 1202, - .paletteTag = 1202, + .tileTag = TAG_STATUS_ICONS, + .paletteTag = TAG_STATUS_ICONS, .oam = &sOamData_StatusCondition, .anims = sSpriteTemplate_StatusCondition, .images = NULL, diff --git a/src/graphics.c b/src/graphics.c index 51e585489d..fda9a3fd5e 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -147,7 +147,7 @@ const u32 gBattleAnimSpriteGfx_ClawSlash[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpriteGfx_Scratch3[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_3.4bpp.lz"); const u32 gBattleAnimSpriteGfx_Scratch2[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_2.4bpp.lz"); -const u32 gPartyMenuHpBar_Gfx[] = INCBIN_U32("graphics/interface/party_menu_hpbar.4bpp.lz"); +const u32 gUnusedHpBar_Gfx[] = INCBIN_U32("graphics/interface/unused_hpbar.4bpp.lz"); const u32 gBattleAnimSpriteGfx_BubbleBurst2[] = INCBIN_U32("graphics/battle_anims/sprites/bubble_burst_2.4bpp.lz"); @@ -1112,13 +1112,13 @@ const u32 gBattleAnimSpritePal_Slash2[] = INCBIN_U32("graphics/battle_anims/spri const u32 gBattleAnimSpriteGfx_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.4bpp.lz"); const u32 gBattleAnimSpritePal_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.gbapal.lz"); -const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/interface/party_menu_bg.4bpp.lz"); -const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/interface/party_menu_bg.gbapal.lz"); -const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_bg.bin.lz"); +const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/party_menu/bg.4bpp.lz"); +const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/party_menu/bg.gbapal.lz"); +const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/party_menu/bg.bin.lz"); -const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball.4bpp.lz"); -const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball_small.4bpp.lz"); //unused -const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/interface/party_menu_pokeball.gbapal.lz"); +const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball.4bpp.lz"); +const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball_small.4bpp.lz"); //unused +const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/party_menu/pokeball.gbapal.lz"); const u32 gStatusGfx_Icons[] = INCBIN_U32("graphics/interface/status_icons.4bpp.lz"); const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapal.lz"); From d782d3544dd3c43ac2034df4a9a445d7ccda1982 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 11:46:58 -0500 Subject: [PATCH 342/417] Move pokeblock graphics out of interface --- .../pokeblock_device.png => pokeblock/device.png} | Bin .../feeding_bg.bin} | Bin .../pokeblock.bin => pokeblock/menu.bin} | Bin .../menu.pal} | 0 .../menu.png} | Bin src/graphics.c | 13 +++++++------ 6 files changed, 7 insertions(+), 6 deletions(-) rename graphics/{interface/pokeblock_device.png => pokeblock/device.png} (100%) rename graphics/{interface/pokeblock_feeding_bg_map.bin => pokeblock/feeding_bg.bin} (100%) rename graphics/{interface/pokeblock.bin => pokeblock/menu.bin} (100%) rename graphics/{interface/pokeblock_case_frame.pal => pokeblock/menu.pal} (100%) rename graphics/{interface/pokeblock_case_frame.png => pokeblock/menu.png} (100%) diff --git a/graphics/interface/pokeblock_device.png b/graphics/pokeblock/device.png similarity index 100% rename from graphics/interface/pokeblock_device.png rename to graphics/pokeblock/device.png diff --git a/graphics/interface/pokeblock_feeding_bg_map.bin b/graphics/pokeblock/feeding_bg.bin similarity index 100% rename from graphics/interface/pokeblock_feeding_bg_map.bin rename to graphics/pokeblock/feeding_bg.bin diff --git a/graphics/interface/pokeblock.bin b/graphics/pokeblock/menu.bin similarity index 100% rename from graphics/interface/pokeblock.bin rename to graphics/pokeblock/menu.bin diff --git a/graphics/interface/pokeblock_case_frame.pal b/graphics/pokeblock/menu.pal similarity index 100% rename from graphics/interface/pokeblock_case_frame.pal rename to graphics/pokeblock/menu.pal diff --git a/graphics/interface/pokeblock_case_frame.png b/graphics/pokeblock/menu.png similarity index 100% rename from graphics/interface/pokeblock_case_frame.png rename to graphics/pokeblock/menu.png diff --git a/src/graphics.c b/src/graphics.c index fda9a3fd5e..ebb7be3cac 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1163,13 +1163,14 @@ const u32 gMenuMoneyGfx[] = INCBIN_U32("graphics/interface/money.4bpp.lz"); // Pokeblock -const u32 gMenuPokeblock_Gfx[] = INCBIN_U32("graphics/interface/pokeblock_case_frame.4bpp.lz"); -const u32 gMenuPokeblock_Pal[] = INCBIN_U32("graphics/interface/pokeblock_case_frame.gbapal.lz"); +const u32 gMenuPokeblock_Gfx[] = INCBIN_U32("graphics/pokeblock/menu.4bpp.lz"); +const u32 gMenuPokeblock_Pal[] = INCBIN_U32("graphics/pokeblock/menu.gbapal.lz"); -const u32 gMenuPokeblockDevice_Gfx[] = INCBIN_U32("graphics/interface/pokeblock_device.4bpp.lz"); -const u32 gMenuPokeblockDevice_Pal[] = INCBIN_U32("graphics/interface/pokeblock_device.gbapal.lz"); +const u32 gMenuPokeblockDevice_Gfx[] = INCBIN_U32("graphics/pokeblock/device.4bpp.lz"); +const u32 gMenuPokeblockDevice_Pal[] = INCBIN_U32("graphics/pokeblock/device.gbapal.lz"); + +const u32 gMenuPokeblock_Tilemap[] = INCBIN_U32("graphics/pokeblock/menu.bin.lz"); -const u32 gMenuPokeblock_Tilemap[] = INCBIN_U32("graphics/interface/pokeblock.bin.lz"); const u32 gPokeblock_Gfx[] = INCBIN_U32("graphics/pokeblock/pokeblock.4bpp.lz"); const u32 gPokeblockRed_Pal[] = INCBIN_U32("graphics/pokeblock/red.gbapal.lz"); const u32 gPokeblockBlue_Pal[] = INCBIN_U32("graphics/pokeblock/blue.gbapal.lz"); @@ -1186,7 +1187,7 @@ const u32 gPokeblockBlack_Pal[] = INCBIN_U32("graphics/pokeblock/black.gbapal.lz const u32 gPokeblockWhite_Pal[] = INCBIN_U32("graphics/pokeblock/white.gbapal.lz"); const u32 gPokeblockGold_Pal[] = INCBIN_U32("graphics/pokeblock/gold.gbapal.lz"); -const u32 gPokeblockFeedBg_Tilemap[] = INCBIN_U32("graphics/interface/pokeblock_feeding_bg_map.bin.lz"); +const u32 gPokeblockFeedBg_Tilemap[] = INCBIN_U32("graphics/pokeblock/feeding_bg.bin.lz"); #include "data/graphics/berries.h" #include "data/graphics/rayquaza_scene.h" From 694aa3c65dd4d926616dcab414e8c1647f357c54 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 11:59:24 -0500 Subject: [PATCH 343/417] Move balls, shop, link, map popups, and bag out of interface --- graphics/{misc => bag}/bag.pal | 0 graphics/{misc => bag}/bag_female.png | Bin graphics/{misc => bag}/bag_male.png | Bin graphics/{interface => bag}/bag_pyramid.pal | 0 graphics/{interface => bag}/bag_pyramid.png | Bin graphics/{interface => bag}/berry_tag.bin | Bin .../{interface => bag}/berry_tag_screen.pal | 0 .../{interface => bag}/berry_tag_title.bin | Bin graphics/{interface => bag}/check_berry.pal | 0 graphics/{interface => bag}/check_berry.png | Bin .../{interface => bag}/check_berry_circle.png | Bin graphics/{interface => bag}/hm.png | Bin .../bag_screen_tilemap.bin => bag/menu.bin} | Bin .../bag_screen.png => bag/menu.png} | Bin .../menu_female.pal} | 0 .../bag_screen_male.pal => bag/menu_male.pal} | 0 .../menu_pyramid.bin} | Bin .../menu_pyramid.pal} | 0 .../bag_spinner.png => bag/rotating_ball.png} | Bin graphics/{interface => bag}/select_button.png | Bin graphics/{interface/ball => balls}/dive.png | Bin graphics/{interface/ball => balls}/great.png | Bin graphics/{interface/ball => balls}/luxury.png | Bin graphics/{interface/ball => balls}/master.png | Bin graphics/{interface/ball => balls}/nest.png | Bin graphics/{interface/ball => balls}/net.png | Bin .../ball_open.png => balls/open.png} | Bin graphics/{interface/ball => balls}/poke.png | Bin .../{interface/ball => balls}/premier.png | Bin graphics/{interface/ball => balls}/repeat.png | Bin graphics/{interface/ball => balls}/safari.png | Bin graphics/{interface/ball => balls}/timer.png | Bin graphics/{interface/ball => balls}/ultra.png | Bin .../interface/{bag_swap.png => swap_line.png} | Bin .../{minigame_countdown => link}/321start.png | Bin .../321start_static.png | Bin .../{interface => link}/comm_error_bg.png | Bin .../test_digits.png} | Bin .../wireless_display.bin} | Bin .../wireless_display.png} | Bin .../wireless_icon.png} | Bin .../wireless_info_screen.bin | Bin .../wireless_info_screen.pal | 0 .../wireless_info_screen.png | Bin graphics/{interface => }/map_popup/brick.png | Bin .../map_popup/brick_outline.png | Bin graphics/{interface => }/map_popup/marble.png | Bin .../map_popup/marble_outline.png | Bin graphics/{interface => }/map_popup/stone.png | Bin graphics/{interface => }/map_popup/stone2.png | Bin .../map_popup/stone2_outline.png | Bin .../map_popup/stone_outline.png | Bin .../{interface => }/map_popup/underwater.pal | 0 .../{interface => }/map_popup/underwater.png | Bin .../map_popup/underwater_outline.png | Bin graphics/{interface => }/map_popup/wood.png | Bin .../map_popup/wood_outline.png | Bin .../{interface => party_menu}/hold_icons.png | Bin .../mart_frame.bin => shop/menu.bin} | Bin .../mart_frame.png => shop/menu.png} | Bin graphics/{interface => shop}/money.png | Bin graphics_file_rules.mk | 2 +- include/graphics.h | 62 +++++++++--------- src/berry_tag_screen.c | 2 +- src/data/graphics/berries.h | 10 +-- src/data/graphics/interface_pokeballs.h | 37 ----------- src/data/graphics/pokeballs.h | 37 +++++++++++ src/data/party_menu.h | 4 +- src/graphics.c | 43 ++++++------ src/item_menu.c | 2 +- src/item_menu_icons.c | 8 +-- src/link.c | 12 ++-- src/link_rfu_3.c | 4 +- src/map_name_popup.c | 38 +++++------ src/menu_helpers.c | 4 +- src/minigame_countdown.c | 8 +-- src/money.c | 6 +- src/pokeball.c | 48 +++++++------- src/shop.c | 6 +- src/wireless_communication_status_screen.c | 6 +- 80 files changed, 168 insertions(+), 171 deletions(-) rename graphics/{misc => bag}/bag.pal (100%) rename graphics/{misc => bag}/bag_female.png (100%) rename graphics/{misc => bag}/bag_male.png (100%) rename graphics/{interface => bag}/bag_pyramid.pal (100%) rename graphics/{interface => bag}/bag_pyramid.png (100%) rename graphics/{interface => bag}/berry_tag.bin (100%) rename graphics/{interface => bag}/berry_tag_screen.pal (100%) rename graphics/{interface => bag}/berry_tag_title.bin (100%) rename graphics/{interface => bag}/check_berry.pal (100%) rename graphics/{interface => bag}/check_berry.png (100%) rename graphics/{interface => bag}/check_berry_circle.png (100%) rename graphics/{interface => bag}/hm.png (100%) rename graphics/{interface/bag_screen_tilemap.bin => bag/menu.bin} (100%) rename graphics/{interface/bag_screen.png => bag/menu.png} (100%) rename graphics/{interface/bag_screen_female.pal => bag/menu_female.pal} (100%) rename graphics/{interface/bag_screen_male.pal => bag/menu_male.pal} (100%) rename graphics/{interface/bag_pyramid_tilemap.bin => bag/menu_pyramid.bin} (100%) rename graphics/{interface/bag_pyramid_interface.pal => bag/menu_pyramid.pal} (100%) rename graphics/{interface/bag_spinner.png => bag/rotating_ball.png} (100%) rename graphics/{interface => bag}/select_button.png (100%) rename graphics/{interface/ball => balls}/dive.png (100%) rename graphics/{interface/ball => balls}/great.png (100%) rename graphics/{interface/ball => balls}/luxury.png (100%) rename graphics/{interface/ball => balls}/master.png (100%) rename graphics/{interface/ball => balls}/nest.png (100%) rename graphics/{interface/ball => balls}/net.png (100%) rename graphics/{interface/ball_open.png => balls/open.png} (100%) rename graphics/{interface/ball => balls}/poke.png (100%) rename graphics/{interface/ball => balls}/premier.png (100%) rename graphics/{interface/ball => balls}/repeat.png (100%) rename graphics/{interface/ball => balls}/safari.png (100%) rename graphics/{interface/ball => balls}/timer.png (100%) rename graphics/{interface/ball => balls}/ultra.png (100%) rename graphics/interface/{bag_swap.png => swap_line.png} (100%) rename graphics/{minigame_countdown => link}/321start.png (100%) rename graphics/{minigame_countdown => link}/321start_static.png (100%) rename graphics/{interface => link}/comm_error_bg.png (100%) rename graphics/{interface/link_test_digits.png => link/test_digits.png} (100%) rename graphics/{interface/wireless_link_display.bin => link/wireless_display.bin} (100%) rename graphics/{interface/wireless_link_display.png => link/wireless_display.png} (100%) rename graphics/{interface/wireless_link_icon.png => link/wireless_icon.png} (100%) rename graphics/{interface => link}/wireless_info_screen.bin (100%) rename graphics/{interface => link}/wireless_info_screen.pal (100%) rename graphics/{interface => link}/wireless_info_screen.png (100%) rename graphics/{interface => }/map_popup/brick.png (100%) rename graphics/{interface => }/map_popup/brick_outline.png (100%) rename graphics/{interface => }/map_popup/marble.png (100%) rename graphics/{interface => }/map_popup/marble_outline.png (100%) rename graphics/{interface => }/map_popup/stone.png (100%) rename graphics/{interface => }/map_popup/stone2.png (100%) rename graphics/{interface => }/map_popup/stone2_outline.png (100%) rename graphics/{interface => }/map_popup/stone_outline.png (100%) rename graphics/{interface => }/map_popup/underwater.pal (100%) rename graphics/{interface => }/map_popup/underwater.png (100%) rename graphics/{interface => }/map_popup/underwater_outline.png (100%) rename graphics/{interface => }/map_popup/wood.png (100%) rename graphics/{interface => }/map_popup/wood_outline.png (100%) rename graphics/{interface => party_menu}/hold_icons.png (100%) rename graphics/{interface/mart_frame.bin => shop/menu.bin} (100%) rename graphics/{interface/mart_frame.png => shop/menu.png} (100%) rename graphics/{interface => shop}/money.png (100%) delete mode 100644 src/data/graphics/interface_pokeballs.h create mode 100644 src/data/graphics/pokeballs.h diff --git a/graphics/misc/bag.pal b/graphics/bag/bag.pal similarity index 100% rename from graphics/misc/bag.pal rename to graphics/bag/bag.pal diff --git a/graphics/misc/bag_female.png b/graphics/bag/bag_female.png similarity index 100% rename from graphics/misc/bag_female.png rename to graphics/bag/bag_female.png diff --git a/graphics/misc/bag_male.png b/graphics/bag/bag_male.png similarity index 100% rename from graphics/misc/bag_male.png rename to graphics/bag/bag_male.png diff --git a/graphics/interface/bag_pyramid.pal b/graphics/bag/bag_pyramid.pal similarity index 100% rename from graphics/interface/bag_pyramid.pal rename to graphics/bag/bag_pyramid.pal diff --git a/graphics/interface/bag_pyramid.png b/graphics/bag/bag_pyramid.png similarity index 100% rename from graphics/interface/bag_pyramid.png rename to graphics/bag/bag_pyramid.png diff --git a/graphics/interface/berry_tag.bin b/graphics/bag/berry_tag.bin similarity index 100% rename from graphics/interface/berry_tag.bin rename to graphics/bag/berry_tag.bin diff --git a/graphics/interface/berry_tag_screen.pal b/graphics/bag/berry_tag_screen.pal similarity index 100% rename from graphics/interface/berry_tag_screen.pal rename to graphics/bag/berry_tag_screen.pal diff --git a/graphics/interface/berry_tag_title.bin b/graphics/bag/berry_tag_title.bin similarity index 100% rename from graphics/interface/berry_tag_title.bin rename to graphics/bag/berry_tag_title.bin diff --git a/graphics/interface/check_berry.pal b/graphics/bag/check_berry.pal similarity index 100% rename from graphics/interface/check_berry.pal rename to graphics/bag/check_berry.pal diff --git a/graphics/interface/check_berry.png b/graphics/bag/check_berry.png similarity index 100% rename from graphics/interface/check_berry.png rename to graphics/bag/check_berry.png diff --git a/graphics/interface/check_berry_circle.png b/graphics/bag/check_berry_circle.png similarity index 100% rename from graphics/interface/check_berry_circle.png rename to graphics/bag/check_berry_circle.png diff --git a/graphics/interface/hm.png b/graphics/bag/hm.png similarity index 100% rename from graphics/interface/hm.png rename to graphics/bag/hm.png diff --git a/graphics/interface/bag_screen_tilemap.bin b/graphics/bag/menu.bin similarity index 100% rename from graphics/interface/bag_screen_tilemap.bin rename to graphics/bag/menu.bin diff --git a/graphics/interface/bag_screen.png b/graphics/bag/menu.png similarity index 100% rename from graphics/interface/bag_screen.png rename to graphics/bag/menu.png diff --git a/graphics/interface/bag_screen_female.pal b/graphics/bag/menu_female.pal similarity index 100% rename from graphics/interface/bag_screen_female.pal rename to graphics/bag/menu_female.pal diff --git a/graphics/interface/bag_screen_male.pal b/graphics/bag/menu_male.pal similarity index 100% rename from graphics/interface/bag_screen_male.pal rename to graphics/bag/menu_male.pal diff --git a/graphics/interface/bag_pyramid_tilemap.bin b/graphics/bag/menu_pyramid.bin similarity index 100% rename from graphics/interface/bag_pyramid_tilemap.bin rename to graphics/bag/menu_pyramid.bin diff --git a/graphics/interface/bag_pyramid_interface.pal b/graphics/bag/menu_pyramid.pal similarity index 100% rename from graphics/interface/bag_pyramid_interface.pal rename to graphics/bag/menu_pyramid.pal diff --git a/graphics/interface/bag_spinner.png b/graphics/bag/rotating_ball.png similarity index 100% rename from graphics/interface/bag_spinner.png rename to graphics/bag/rotating_ball.png diff --git a/graphics/interface/select_button.png b/graphics/bag/select_button.png similarity index 100% rename from graphics/interface/select_button.png rename to graphics/bag/select_button.png diff --git a/graphics/interface/ball/dive.png b/graphics/balls/dive.png similarity index 100% rename from graphics/interface/ball/dive.png rename to graphics/balls/dive.png diff --git a/graphics/interface/ball/great.png b/graphics/balls/great.png similarity index 100% rename from graphics/interface/ball/great.png rename to graphics/balls/great.png diff --git a/graphics/interface/ball/luxury.png b/graphics/balls/luxury.png similarity index 100% rename from graphics/interface/ball/luxury.png rename to graphics/balls/luxury.png diff --git a/graphics/interface/ball/master.png b/graphics/balls/master.png similarity index 100% rename from graphics/interface/ball/master.png rename to graphics/balls/master.png diff --git a/graphics/interface/ball/nest.png b/graphics/balls/nest.png similarity index 100% rename from graphics/interface/ball/nest.png rename to graphics/balls/nest.png diff --git a/graphics/interface/ball/net.png b/graphics/balls/net.png similarity index 100% rename from graphics/interface/ball/net.png rename to graphics/balls/net.png diff --git a/graphics/interface/ball_open.png b/graphics/balls/open.png similarity index 100% rename from graphics/interface/ball_open.png rename to graphics/balls/open.png diff --git a/graphics/interface/ball/poke.png b/graphics/balls/poke.png similarity index 100% rename from graphics/interface/ball/poke.png rename to graphics/balls/poke.png diff --git a/graphics/interface/ball/premier.png b/graphics/balls/premier.png similarity index 100% rename from graphics/interface/ball/premier.png rename to graphics/balls/premier.png diff --git a/graphics/interface/ball/repeat.png b/graphics/balls/repeat.png similarity index 100% rename from graphics/interface/ball/repeat.png rename to graphics/balls/repeat.png diff --git a/graphics/interface/ball/safari.png b/graphics/balls/safari.png similarity index 100% rename from graphics/interface/ball/safari.png rename to graphics/balls/safari.png diff --git a/graphics/interface/ball/timer.png b/graphics/balls/timer.png similarity index 100% rename from graphics/interface/ball/timer.png rename to graphics/balls/timer.png diff --git a/graphics/interface/ball/ultra.png b/graphics/balls/ultra.png similarity index 100% rename from graphics/interface/ball/ultra.png rename to graphics/balls/ultra.png diff --git a/graphics/interface/bag_swap.png b/graphics/interface/swap_line.png similarity index 100% rename from graphics/interface/bag_swap.png rename to graphics/interface/swap_line.png diff --git a/graphics/minigame_countdown/321start.png b/graphics/link/321start.png similarity index 100% rename from graphics/minigame_countdown/321start.png rename to graphics/link/321start.png diff --git a/graphics/minigame_countdown/321start_static.png b/graphics/link/321start_static.png similarity index 100% rename from graphics/minigame_countdown/321start_static.png rename to graphics/link/321start_static.png diff --git a/graphics/interface/comm_error_bg.png b/graphics/link/comm_error_bg.png similarity index 100% rename from graphics/interface/comm_error_bg.png rename to graphics/link/comm_error_bg.png diff --git a/graphics/interface/link_test_digits.png b/graphics/link/test_digits.png similarity index 100% rename from graphics/interface/link_test_digits.png rename to graphics/link/test_digits.png diff --git a/graphics/interface/wireless_link_display.bin b/graphics/link/wireless_display.bin similarity index 100% rename from graphics/interface/wireless_link_display.bin rename to graphics/link/wireless_display.bin diff --git a/graphics/interface/wireless_link_display.png b/graphics/link/wireless_display.png similarity index 100% rename from graphics/interface/wireless_link_display.png rename to graphics/link/wireless_display.png diff --git a/graphics/interface/wireless_link_icon.png b/graphics/link/wireless_icon.png similarity index 100% rename from graphics/interface/wireless_link_icon.png rename to graphics/link/wireless_icon.png diff --git a/graphics/interface/wireless_info_screen.bin b/graphics/link/wireless_info_screen.bin similarity index 100% rename from graphics/interface/wireless_info_screen.bin rename to graphics/link/wireless_info_screen.bin diff --git a/graphics/interface/wireless_info_screen.pal b/graphics/link/wireless_info_screen.pal similarity index 100% rename from graphics/interface/wireless_info_screen.pal rename to graphics/link/wireless_info_screen.pal diff --git a/graphics/interface/wireless_info_screen.png b/graphics/link/wireless_info_screen.png similarity index 100% rename from graphics/interface/wireless_info_screen.png rename to graphics/link/wireless_info_screen.png diff --git a/graphics/interface/map_popup/brick.png b/graphics/map_popup/brick.png similarity index 100% rename from graphics/interface/map_popup/brick.png rename to graphics/map_popup/brick.png diff --git a/graphics/interface/map_popup/brick_outline.png b/graphics/map_popup/brick_outline.png similarity index 100% rename from graphics/interface/map_popup/brick_outline.png rename to graphics/map_popup/brick_outline.png diff --git a/graphics/interface/map_popup/marble.png b/graphics/map_popup/marble.png similarity index 100% rename from graphics/interface/map_popup/marble.png rename to graphics/map_popup/marble.png diff --git a/graphics/interface/map_popup/marble_outline.png b/graphics/map_popup/marble_outline.png similarity index 100% rename from graphics/interface/map_popup/marble_outline.png rename to graphics/map_popup/marble_outline.png diff --git a/graphics/interface/map_popup/stone.png b/graphics/map_popup/stone.png similarity index 100% rename from graphics/interface/map_popup/stone.png rename to graphics/map_popup/stone.png diff --git a/graphics/interface/map_popup/stone2.png b/graphics/map_popup/stone2.png similarity index 100% rename from graphics/interface/map_popup/stone2.png rename to graphics/map_popup/stone2.png diff --git a/graphics/interface/map_popup/stone2_outline.png b/graphics/map_popup/stone2_outline.png similarity index 100% rename from graphics/interface/map_popup/stone2_outline.png rename to graphics/map_popup/stone2_outline.png diff --git a/graphics/interface/map_popup/stone_outline.png b/graphics/map_popup/stone_outline.png similarity index 100% rename from graphics/interface/map_popup/stone_outline.png rename to graphics/map_popup/stone_outline.png diff --git a/graphics/interface/map_popup/underwater.pal b/graphics/map_popup/underwater.pal similarity index 100% rename from graphics/interface/map_popup/underwater.pal rename to graphics/map_popup/underwater.pal diff --git a/graphics/interface/map_popup/underwater.png b/graphics/map_popup/underwater.png similarity index 100% rename from graphics/interface/map_popup/underwater.png rename to graphics/map_popup/underwater.png diff --git a/graphics/interface/map_popup/underwater_outline.png b/graphics/map_popup/underwater_outline.png similarity index 100% rename from graphics/interface/map_popup/underwater_outline.png rename to graphics/map_popup/underwater_outline.png diff --git a/graphics/interface/map_popup/wood.png b/graphics/map_popup/wood.png similarity index 100% rename from graphics/interface/map_popup/wood.png rename to graphics/map_popup/wood.png diff --git a/graphics/interface/map_popup/wood_outline.png b/graphics/map_popup/wood_outline.png similarity index 100% rename from graphics/interface/map_popup/wood_outline.png rename to graphics/map_popup/wood_outline.png diff --git a/graphics/interface/hold_icons.png b/graphics/party_menu/hold_icons.png similarity index 100% rename from graphics/interface/hold_icons.png rename to graphics/party_menu/hold_icons.png diff --git a/graphics/interface/mart_frame.bin b/graphics/shop/menu.bin similarity index 100% rename from graphics/interface/mart_frame.bin rename to graphics/shop/menu.bin diff --git a/graphics/interface/mart_frame.png b/graphics/shop/menu.png similarity index 100% rename from graphics/interface/mart_frame.png rename to graphics/shop/menu.png diff --git a/graphics/interface/money.png b/graphics/shop/money.png similarity index 100% rename from graphics/interface/money.png rename to graphics/shop/money.png diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 3b4bbeabfa..25ac181421 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -440,7 +440,7 @@ $(TYPESGFXDIR)/move_types.gbapal: $(TYPESGFXDIR)/move_types_1.gbapal \ $(TYPESGFXDIR)/move_types_3.gbapal @cat $^ >$@ -$(INTERFACEGFXDIR)/bag_screen.4bpp: %.4bpp: %.png +graphics/bag/menu.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 53 $(RAYQUAZAGFXDIR)/scene_2/rayquaza.8bpp: %.8bpp: %.png diff --git a/include/graphics.h b/include/graphics.h index 5c6a043cc5..0972743c5f 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -5,31 +5,31 @@ extern const u32 gMessageBox_Gfx[]; extern const u16 gMessageBox_Pal[]; -// interface pokeballs -extern const u32 gInterfaceGfx_PokeBall[]; -extern const u32 gInterfacePal_PokeBall[]; -extern const u32 gInterfaceGfx_GreatBall[]; -extern const u32 gInterfacePal_GreatBall[]; -extern const u32 gInterfaceGfx_SafariBall[]; -extern const u32 gInterfacePal_SafariBall[]; -extern const u32 gInterfaceGfx_UltraBall[]; -extern const u32 gInterfacePal_UltraBall[]; -extern const u32 gInterfaceGfx_MasterBall[]; -extern const u32 gInterfacePal_MasterBall[]; -extern const u32 gInterfaceGfx_NetBall[]; -extern const u32 gInterfacePal_NetBall[]; -extern const u32 gInterfaceGfx_DiveBall[]; -extern const u32 gInterfacePal_DiveBall[]; -extern const u32 gInterfaceGfx_NestBall[]; -extern const u32 gInterfacePal_NestBall[]; -extern const u32 gInterfaceGfx_RepeatBall[]; -extern const u32 gInterfacePal_RepeatBall[]; -extern const u32 gInterfaceGfx_TimerBall[]; -extern const u32 gInterfacePal_TimerBall[]; -extern const u32 gInterfaceGfx_LuxuryBall[]; -extern const u32 gInterfacePal_LuxuryBall[]; -extern const u32 gInterfaceGfx_PremierBall[]; -extern const u32 gInterfacePal_PremierBall[]; +// pokeballs +extern const u32 gBallGfx_Poke[]; +extern const u32 gBallPal_Poke[]; +extern const u32 gBallGfx_Great[]; +extern const u32 gBallPal_Great[]; +extern const u32 gBallGfx_Safari[]; +extern const u32 gBallPal_Safari[]; +extern const u32 gBallGfx_Ultra[]; +extern const u32 gBallPal_Ultra[]; +extern const u32 gBallGfx_Master[]; +extern const u32 gBallPal_Master[]; +extern const u32 gBallGfx_Net[]; +extern const u32 gBallPal_Net[]; +extern const u32 gBallGfx_Dive[]; +extern const u32 gBallPal_Dive[]; +extern const u32 gBallGfx_Nest[]; +extern const u32 gBallPal_Nest[]; +extern const u32 gBallGfx_Repeat[]; +extern const u32 gBallPal_Repeat[]; +extern const u32 gBallGfx_Timer[]; +extern const u32 gBallPal_Timer[]; +extern const u32 gBallGfx_Luxury[]; +extern const u32 gBallPal_Luxury[]; +extern const u32 gBallGfx_Premier[]; +extern const u32 gBallPal_Premier[]; extern const u32 gOpenPokeballGfx[]; // pokemon gfx @@ -4052,10 +4052,10 @@ extern const u32 gSummaryMoveSelect_Pal[]; extern const u32 gStatusGfx_Icons[]; extern const u32 gStatusPal_Icons[]; -extern const u32 gBuyMenuFrame_Gfx[]; -extern const u32 gBuyMenuFrame_Tilemap[]; -extern const u32 gMenuMoneyGfx[]; -extern const u32 gMenuMoneyPal[]; +extern const u32 gShopMenu_Gfx[]; +extern const u32 gShopMenu_Tilemap[]; +extern const u32 gShopMenu_Pal[]; +extern const u32 gShopMenuMoney_Gfx[]; extern const u32 gBattleInterface_BallStatusBarGfx[]; extern const u8 gBattleInterface_BallDisplayGfx[]; @@ -4094,8 +4094,8 @@ extern const u32 gBlankGfxCompressed[]; extern const u16 gBattleInterface_BallStatusBarPal[]; extern const u16 gBattleInterface_BallDisplayPal[]; -extern const u32 gBagSwapLineGfx[]; -extern const u32 gBagSwapLinePal[]; +extern const u32 gSwapLineGfx[]; +extern const u32 gSwapLinePal[]; extern const u32 gBattlePyramidBag_Gfx[]; extern const u32 gBattlePyramidBag_Pal[]; diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index 92b1f65d1b..219454ab26 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -92,7 +92,7 @@ static const struct BgTemplate sBackgroundTemplates[] = } }; -static const u16 sFontPalette[] = INCBIN_U16("graphics/interface/berry_tag_screen.gbapal"); +static const u16 sFontPalette[] = INCBIN_U16("graphics/bag/berry_tag_screen.gbapal"); static const u8 sTextColors[2][3] = { diff --git a/src/data/graphics/berries.h b/src/data/graphics/berries.h index eb3f9f4dc7..e33384a846 100644 --- a/src/data/graphics/berries.h +++ b/src/data/graphics/berries.h @@ -1,10 +1,10 @@ -const u32 gBerryCheck_Gfx[] = INCBIN_U32("graphics/interface/check_berry.4bpp.lz"); -const u32 gBerryCheck_Pal[] = INCBIN_U32("graphics/interface/check_berry.gbapal.lz"); +const u32 gBerryCheck_Gfx[] = INCBIN_U32("graphics/bag/check_berry.4bpp.lz"); +const u32 gBerryCheck_Pal[] = INCBIN_U32("graphics/bag/check_berry.gbapal.lz"); -const u32 gBerryTag_Gfx[] = INCBIN_U32("graphics/interface/berry_tag.bin.lz"); -const u32 gBerryTag_Pal[] = INCBIN_U32("graphics/interface/berry_tag_title.bin.lz"); +const u32 gBerryTag_Gfx[] = INCBIN_U32("graphics/bag/berry_tag.bin.lz"); +const u32 gBerryTag_Pal[] = INCBIN_U32("graphics/bag/berry_tag_title.bin.lz"); -const u32 gBerryCheckCircle_Gfx[] = INCBIN_U32("graphics/interface/check_berry_circle.4bpp.lz"); +const u32 gBerryCheckCircle_Gfx[] = INCBIN_U32("graphics/bag/check_berry_circle.4bpp.lz"); const u32 gBerryPic_Cheri[] = INCBIN_U32("graphics/berries/cheri.4bpp.lz"); const u32 gBerryPic_Oran[] = INCBIN_U32("graphics/berries/oran.4bpp.lz"); diff --git a/src/data/graphics/interface_pokeballs.h b/src/data/graphics/interface_pokeballs.h deleted file mode 100644 index fe9a4e5be3..0000000000 --- a/src/data/graphics/interface_pokeballs.h +++ /dev/null @@ -1,37 +0,0 @@ -const u32 gInterfaceGfx_PokeBall[] = INCBIN_U32("graphics/interface/ball/poke.4bpp.lz"); -const u32 gInterfacePal_PokeBall[] = INCBIN_U32("graphics/interface/ball/poke.gbapal.lz"); - -const u32 gInterfaceGfx_GreatBall[] = INCBIN_U32("graphics/interface/ball/great.4bpp.lz"); -const u32 gInterfacePal_GreatBall[] = INCBIN_U32("graphics/interface/ball/great.gbapal.lz"); - -const u32 gInterfaceGfx_SafariBall[] = INCBIN_U32("graphics/interface/ball/safari.4bpp.lz"); -const u32 gInterfacePal_SafariBall[] = INCBIN_U32("graphics/interface/ball/safari.gbapal.lz"); - -const u32 gInterfaceGfx_UltraBall[] = INCBIN_U32("graphics/interface/ball/ultra.4bpp.lz"); -const u32 gInterfacePal_UltraBall[] = INCBIN_U32("graphics/interface/ball/ultra.gbapal.lz"); - -const u32 gInterfaceGfx_MasterBall[] = INCBIN_U32("graphics/interface/ball/master.4bpp.lz"); -const u32 gInterfacePal_MasterBall[] = INCBIN_U32("graphics/interface/ball/master.gbapal.lz"); - -const u32 gInterfaceGfx_NetBall[] = INCBIN_U32("graphics/interface/ball/net.4bpp.lz"); -const u32 gInterfacePal_NetBall[] = INCBIN_U32("graphics/interface/ball/net.gbapal.lz"); - -const u32 gInterfaceGfx_DiveBall[] = INCBIN_U32("graphics/interface/ball/dive.4bpp.lz"); -const u32 gInterfacePal_DiveBall[] = INCBIN_U32("graphics/interface/ball/dive.gbapal.lz"); - -const u32 gInterfaceGfx_NestBall[] = INCBIN_U32("graphics/interface/ball/nest.4bpp.lz"); -const u32 gInterfacePal_NestBall[] = INCBIN_U32("graphics/interface/ball/nest.gbapal.lz"); - -const u32 gInterfaceGfx_RepeatBall[] = INCBIN_U32("graphics/interface/ball/repeat.4bpp.lz"); -const u32 gInterfacePal_RepeatBall[] = INCBIN_U32("graphics/interface/ball/repeat.gbapal.lz"); - -const u32 gInterfaceGfx_TimerBall[] = INCBIN_U32("graphics/interface/ball/timer.4bpp.lz"); -const u32 gInterfacePal_TimerBall[] = INCBIN_U32("graphics/interface/ball/timer.gbapal.lz"); - -const u32 gInterfaceGfx_LuxuryBall[] = INCBIN_U32("graphics/interface/ball/luxury.4bpp.lz"); -const u32 gInterfacePal_LuxuryBall[] = INCBIN_U32("graphics/interface/ball/luxury.gbapal.lz"); - -const u32 gInterfaceGfx_PremierBall[] = INCBIN_U32("graphics/interface/ball/premier.4bpp.lz"); -const u32 gInterfacePal_PremierBall[] = INCBIN_U32("graphics/interface/ball/premier.gbapal.lz"); - -const u32 gOpenPokeballGfx[] = INCBIN_U32("graphics/interface/ball_open.4bpp.lz"); diff --git a/src/data/graphics/pokeballs.h b/src/data/graphics/pokeballs.h new file mode 100644 index 0000000000..8203fca538 --- /dev/null +++ b/src/data/graphics/pokeballs.h @@ -0,0 +1,37 @@ +const u32 gBallGfx_Poke[] = INCBIN_U32("graphics/balls/poke.4bpp.lz"); +const u32 gBallPal_Poke[] = INCBIN_U32("graphics/balls/poke.gbapal.lz"); + +const u32 gBallGfx_Great[] = INCBIN_U32("graphics/balls/great.4bpp.lz"); +const u32 gBallPal_Great[] = INCBIN_U32("graphics/balls/great.gbapal.lz"); + +const u32 gBallGfx_Safari[] = INCBIN_U32("graphics/balls/safari.4bpp.lz"); +const u32 gBallPal_Safari[] = INCBIN_U32("graphics/balls/safari.gbapal.lz"); + +const u32 gBallGfx_Ultra[] = INCBIN_U32("graphics/balls/ultra.4bpp.lz"); +const u32 gBallPal_Ultra[] = INCBIN_U32("graphics/balls/ultra.gbapal.lz"); + +const u32 gBallGfx_Master[] = INCBIN_U32("graphics/balls/master.4bpp.lz"); +const u32 gBallPal_Master[] = INCBIN_U32("graphics/balls/master.gbapal.lz"); + +const u32 gBallGfx_Net[] = INCBIN_U32("graphics/balls/net.4bpp.lz"); +const u32 gBallPal_Net[] = INCBIN_U32("graphics/balls/net.gbapal.lz"); + +const u32 gBallGfx_Dive[] = INCBIN_U32("graphics/balls/dive.4bpp.lz"); +const u32 gBallPal_Dive[] = INCBIN_U32("graphics/balls/dive.gbapal.lz"); + +const u32 gBallGfx_Nest[] = INCBIN_U32("graphics/balls/nest.4bpp.lz"); +const u32 gBallPal_Nest[] = INCBIN_U32("graphics/balls/nest.gbapal.lz"); + +const u32 gBallGfx_Repeat[] = INCBIN_U32("graphics/balls/repeat.4bpp.lz"); +const u32 gBallPal_Repeat[] = INCBIN_U32("graphics/balls/repeat.gbapal.lz"); + +const u32 gBallGfx_Timer[] = INCBIN_U32("graphics/balls/timer.4bpp.lz"); +const u32 gBallPal_Timer[] = INCBIN_U32("graphics/balls/timer.gbapal.lz"); + +const u32 gBallGfx_Luxury[] = INCBIN_U32("graphics/balls/luxury.4bpp.lz"); +const u32 gBallPal_Luxury[] = INCBIN_U32("graphics/balls/luxury.gbapal.lz"); + +const u32 gBallGfx_Premier[] = INCBIN_U32("graphics/balls/premier.4bpp.lz"); +const u32 gBallPal_Premier[] = INCBIN_U32("graphics/balls/premier.gbapal.lz"); + +const u32 gOpenPokeballGfx[] = INCBIN_U32("graphics/balls/open.4bpp.lz"); diff --git a/src/data/party_menu.h b/src/data/party_menu.h index f8321298ce..f8093a9b6b 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -879,8 +879,8 @@ static const u8 *const sUnionRoomTradeMessages[] = [UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2 - 1] = gText_CantTradeWithTrainer, }; -static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/interface/hold_icons.4bpp"); -static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/interface/hold_icons.gbapal"); +static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/party_menu/hold_icons.4bpp"); +static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/party_menu/hold_icons.gbapal"); static const struct OamData sOamData_HeldItem = { diff --git a/src/graphics.c b/src/graphics.c index ebb7be3cac..09cae59ce5 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -16,7 +16,7 @@ const u32 gUnusedPal_OldCharmap[] = INCBIN_U32("graphics/unused/old_charmap.gbap const u32 gSmokescreenImpactTiles[] = INCBIN_U32("graphics/battle_anims/sprites/smokescreen_impact.4bpp.lz"); const u32 gSmokescreenImpactPalette[] = INCBIN_U32("graphics/battle_anims/sprites/smokescreen_impact.gbapal.lz"); -#include "data/graphics/interface_pokeballs.h" +#include "data/graphics/pokeballs.h" const u32 gBlankGfxCompressed[] = INCBIN_U32("graphics/interface/blank.4bpp.lz"); @@ -1137,29 +1137,28 @@ const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/summary_scr const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_contest_moves.bin.lz"); const u32 gSummaryPage_InfoEgg_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info_egg.bin.lz"); -const u32 gBagMaleTiles[] = INCBIN_U32("graphics/misc/bag_male.4bpp.lz"); -const u32 gBagFemaleTiles[] = INCBIN_U32("graphics/misc/bag_female.4bpp.lz"); -const u32 gBagPalette[] = INCBIN_U32("graphics/misc/bag.gbapal.lz"); +const u32 gBagMaleTiles[] = INCBIN_U32("graphics/bag/bag_male.4bpp.lz"); +const u32 gBagFemaleTiles[] = INCBIN_U32("graphics/bag/bag_female.4bpp.lz"); +const u32 gBagPalette[] = INCBIN_U32("graphics/bag/bag.gbapal.lz"); -const u32 gBagScreenMale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_male.gbapal.lz"); -const u32 gBagScreenFemale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_female.gbapal.lz"); +const u32 gBagScreenMale_Pal[] = INCBIN_U32("graphics/bag/menu_male.gbapal.lz"); +const u32 gBagScreenFemale_Pal[] = INCBIN_U32("graphics/bag/menu_female.gbapal.lz"); -const u32 gBagScreen_Gfx[] = INCBIN_U32("graphics/interface/bag_screen.4bpp.lz"); -const u32 gBagScreen_GfxTileMap[] = INCBIN_U32("graphics/interface/bag_screen_tilemap.bin.lz"); +const u32 gBagScreen_Gfx[] = INCBIN_U32("graphics/bag/menu.4bpp.lz"); +const u32 gBagScreen_GfxTileMap[] = INCBIN_U32("graphics/bag/menu.bin.lz"); -const u32 gBattlePyramidBag_Gfx[] = INCBIN_U32("graphics/interface/bag_pyramid.4bpp.lz"); -const u32 gBattlePyramidBag_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid.gbapal.lz"); // female palette is first and male is second. -const u32 gBattlePyramidBagTilemap[] = INCBIN_U32("graphics/interface/bag_pyramid_tilemap.bin.lz"); -const u32 gBattlePyramidBagInterface_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid_interface.gbapal.lz"); +const u32 gBattlePyramidBag_Gfx[] = INCBIN_U32("graphics/bag/bag_pyramid.4bpp.lz"); +const u32 gBattlePyramidBag_Pal[] = INCBIN_U32("graphics/bag/bag_pyramid.gbapal.lz"); // female palette is first and male is second. +const u32 gBattlePyramidBagTilemap[] = INCBIN_U32("graphics/bag/menu_pyramid.bin.lz"); +const u32 gBattlePyramidBagInterface_Pal[] = INCBIN_U32("graphics/bag/menu_pyramid.gbapal.lz"); -const u32 gBagSwapLineGfx[] = INCBIN_U32("graphics/interface/bag_swap.4bpp.lz"); -const u32 gBagSwapLinePal[] = INCBIN_U32("graphics/interface/bag_swap.gbapal.lz"); +const u32 gSwapLineGfx[] = INCBIN_U32("graphics/interface/swap_line.4bpp.lz"); +const u32 gSwapLinePal[] = INCBIN_U32("graphics/interface/swap_line.gbapal.lz"); -const u32 gBuyMenuFrame_Gfx[] = INCBIN_U32("graphics/interface/mart_frame.4bpp.lz"); -const u32 gMenuMoneyPal[] = INCBIN_U32("graphics/interface/mart_frame.gbapal.lz"); -const u32 gBuyMenuFrame_Tilemap[] = INCBIN_U32("graphics/interface/mart_frame.bin.lz"); - -const u32 gMenuMoneyGfx[] = INCBIN_U32("graphics/interface/money.4bpp.lz"); +const u32 gShopMenu_Gfx[] = INCBIN_U32("graphics/shop/menu.4bpp.lz"); +const u32 gShopMenu_Pal[] = INCBIN_U32("graphics/shop/menu.gbapal.lz"); +const u32 gShopMenu_Tilemap[] = INCBIN_U32("graphics/shop/menu.bin.lz"); +const u32 gShopMenuMoney_Gfx[] = INCBIN_U32("graphics/shop/money.4bpp.lz"); // Pokeblock @@ -1271,14 +1270,12 @@ const u32 gIntroCopyright_Tilemap[] = INCBIN_U32("graphics/intro/copyright.bin.l const u16 gPokedexAreaScreenAreaUnknown_Pal[] = INCBIN_U16("graphics/pokedex/area_unknown.gbapal"); const u32 gPokedexAreaScreenAreaUnknown_Gfx[] = INCBIN_U32("graphics/pokedex/area_unknown.4bpp.lz"); -// seems to be fire red leftovers, but the menu elements is reused in the item menu for TM descriptions. - const u16 gMenuInfoElements1_Pal[] = INCBIN_U16("graphics/interface/menu_info1.gbapal"); const u16 gMenuInfoElements2_Pal[] = INCBIN_U16("graphics/interface/menu_info2.gbapal"); const u16 gMenuInfoElements3_Pal[] = INCBIN_U16("graphics/interface/menu_info3.gbapal"); -const u8 gMenuInfoElements_Gfx[] = INCBIN_U8("graphics/interface/menu_info.4bpp"); //the types are reused for item menu +const u8 gMenuInfoElements_Gfx[] = INCBIN_U8("graphics/interface/menu_info.4bpp"); -const u8 gBagMenuHMIcon_Gfx[] = INCBIN_U8("graphics/interface/hm.4bpp"); +const u8 gBagMenuHMIcon_Gfx[] = INCBIN_U8("graphics/bag/hm.4bpp"); // contest results screen diff --git a/src/item_menu.c b/src/item_menu.c index 56ef3cba32..9eaca9597d 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -372,7 +372,7 @@ static const struct ScrollArrowsTemplate sBagScrollArrowsTemplate = { .palNum = 0, }; -static const u8 sRegisteredSelect_Gfx[] = INCBIN_U8("graphics/interface/select_button.4bpp"); +static const u8 sRegisteredSelect_Gfx[] = INCBIN_U8("graphics/bag/select_button.4bpp"); enum { COLORID_NORMAL, diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index 60de132b04..a5c265f908 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -33,8 +33,8 @@ static void SpriteCB_SwitchPocketRotatingBallInit(struct Sprite *sprite); static void SpriteCB_SwitchPocketRotatingBallContinue(struct Sprite *sprite); // static const rom data -static const u16 gRotatingBall_Pal[] = INCBIN_U16("graphics/interface/bag_spinner.gbapal"); -static const u8 gRotatingBall[] = INCBIN_U8("graphics/interface/bag_spinner.4bpp"); +static const u16 sRotatingBall_Pal[] = INCBIN_U16("graphics/bag/rotating_ball.gbapal"); +static const u8 sRotatingBall_Gfx[] = INCBIN_U8("graphics/bag/rotating_ball.4bpp"); static const u8 gCherryUnused[] = INCBIN_U8("graphics/unused/cherry.4bpp"); static const u16 gCherryUnused_Pal[] = INCBIN_U16("graphics/unused/cherry.gbapal"); @@ -200,12 +200,12 @@ static const union AffineAnimCmd *const sRotatingBallAnimCmds_FullRotation[] = static const struct SpriteSheet sRotatingBallTable = { - gRotatingBall, 0x80, TAG_ROTATING_BALL_GFX + sRotatingBall_Gfx, 0x80, TAG_ROTATING_BALL_GFX }; static const struct SpritePalette sRotatingBallPaletteTable = { - gRotatingBall_Pal, TAG_ROTATING_BALL_GFX + sRotatingBall_Pal, TAG_ROTATING_BALL_GFX }; static const struct SpriteTemplate sRotatingBallSpriteTemplate = diff --git a/src/link.c b/src/link.c index 1084d4a6de..aa9a0d73df 100644 --- a/src/link.c +++ b/src/link.c @@ -158,13 +158,13 @@ static void DoSend(void); static void StopTimer(void); static void SendRecvDone(void); -static const u16 sWirelessLinkDisplayPal[] = INCBIN_U16("graphics/interface/wireless_link_display.gbapal"); -static const u32 sWirelessLinkDisplayGfx[] = INCBIN_U32("graphics/interface/wireless_link_display.4bpp.lz"); -static const u32 sWirelessLinkDisplayTilemap[] = INCBIN_U32("graphics/interface/wireless_link_display.bin.lz"); -static const u16 sLinkTestDigitsPal[] = INCBIN_U16("graphics/interface/link_test_digits.gbapal"); -static const u16 sLinkTestDigitsGfx[] = INCBIN_U16("graphics/interface/link_test_digits.4bpp"); +static const u16 sWirelessLinkDisplayPal[] = INCBIN_U16("graphics/link/wireless_display.gbapal"); +static const u32 sWirelessLinkDisplayGfx[] = INCBIN_U32("graphics/link/wireless_display.4bpp.lz"); +static const u32 sWirelessLinkDisplayTilemap[] = INCBIN_U32("graphics/link/wireless_display.bin.lz"); +static const u16 sLinkTestDigitsPal[] = INCBIN_U16("graphics/link/test_digits.gbapal"); +static const u16 sLinkTestDigitsGfx[] = INCBIN_U16("graphics/link/test_digits.4bpp"); static const u8 sUnusedTransparentWhite[] = _("{HIGHLIGHT TRANSPARENT}{COLOR WHITE}"); -static const u16 sCommErrorBg_Gfx[] = INCBIN_U16("graphics/interface/comm_error_bg.4bpp"); +static const u16 sCommErrorBg_Gfx[] = INCBIN_U16("graphics/link/comm_error_bg.4bpp"); static const struct BlockRequest sBlockRequests[] = { [BLOCK_REQ_SIZE_NONE] = {gBlockSendBuffer, 200}, [BLOCK_REQ_SIZE_200] = {gBlockSendBuffer, 200}, diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index 571f305d0e..1e1fe5b347 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -34,8 +34,8 @@ EWRAM_DATA u8 gWirelessStatusIndicatorSpriteId = 0; static u8 sSequenceArrayValOffset; -static const u16 sWirelessLinkIconPalette[] = INCBIN_U16("graphics/interface/wireless_link_icon.gbapal"); -static const u32 sWirelessLinkIconPic[] = INCBIN_U32("graphics/interface/wireless_link_icon.4bpp.lz"); +static const u16 sWirelessLinkIconPalette[] = INCBIN_U16("graphics/link/wireless_icon.gbapal"); +static const u32 sWirelessLinkIconPic[] = INCBIN_U32("graphics/link/wireless_icon.4bpp.lz"); // Most of the below two tables won't make sense with ASCII encoding. static const u8 sWireless_ASCIItoRSETable[256] = { diff --git a/src/map_name_popup.c b/src/map_name_popup.c index e44fb33833..8cf1a6bab1 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -38,35 +38,35 @@ static EWRAM_DATA u8 sPopupTaskId = 0; // .rodata static const u8 sMapPopUp_Table[][960] = { - [MAPPOPUP_THEME_WOOD] = INCBIN_U8("graphics/interface/map_popup/wood.4bpp"), - [MAPPOPUP_THEME_MARBLE] = INCBIN_U8("graphics/interface/map_popup/marble.4bpp"), - [MAPPOPUP_THEME_STONE] = INCBIN_U8("graphics/interface/map_popup/stone.4bpp"), - [MAPPOPUP_THEME_BRICK] = INCBIN_U8("graphics/interface/map_popup/brick.4bpp"), - [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U8("graphics/interface/map_popup/underwater.4bpp"), - [MAPPOPUP_THEME_STONE2] = INCBIN_U8("graphics/interface/map_popup/stone2.4bpp"), + [MAPPOPUP_THEME_WOOD] = INCBIN_U8("graphics/map_popup/wood.4bpp"), + [MAPPOPUP_THEME_MARBLE] = INCBIN_U8("graphics/map_popup/marble.4bpp"), + [MAPPOPUP_THEME_STONE] = INCBIN_U8("graphics/map_popup/stone.4bpp"), + [MAPPOPUP_THEME_BRICK] = INCBIN_U8("graphics/map_popup/brick.4bpp"), + [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U8("graphics/map_popup/underwater.4bpp"), + [MAPPOPUP_THEME_STONE2] = INCBIN_U8("graphics/map_popup/stone2.4bpp"), }; static const u8 sMapPopUp_OutlineTable[][960] = { - [MAPPOPUP_THEME_WOOD] = INCBIN_U8("graphics/interface/map_popup/wood_outline.4bpp"), - [MAPPOPUP_THEME_MARBLE] = INCBIN_U8("graphics/interface/map_popup/marble_outline.4bpp"), - [MAPPOPUP_THEME_STONE] = INCBIN_U8("graphics/interface/map_popup/stone_outline.4bpp"), - [MAPPOPUP_THEME_BRICK] = INCBIN_U8("graphics/interface/map_popup/brick_outline.4bpp"), - [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U8("graphics/interface/map_popup/underwater_outline.4bpp"), - [MAPPOPUP_THEME_STONE2] = INCBIN_U8("graphics/interface/map_popup/stone2_outline.4bpp"), + [MAPPOPUP_THEME_WOOD] = INCBIN_U8("graphics/map_popup/wood_outline.4bpp"), + [MAPPOPUP_THEME_MARBLE] = INCBIN_U8("graphics/map_popup/marble_outline.4bpp"), + [MAPPOPUP_THEME_STONE] = INCBIN_U8("graphics/map_popup/stone_outline.4bpp"), + [MAPPOPUP_THEME_BRICK] = INCBIN_U8("graphics/map_popup/brick_outline.4bpp"), + [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U8("graphics/map_popup/underwater_outline.4bpp"), + [MAPPOPUP_THEME_STONE2] = INCBIN_U8("graphics/map_popup/stone2_outline.4bpp"), }; static const u16 sMapPopUp_PaletteTable[][16] = { - [MAPPOPUP_THEME_WOOD] = INCBIN_U16("graphics/interface/map_popup/wood.gbapal"), - [MAPPOPUP_THEME_MARBLE] = INCBIN_U16("graphics/interface/map_popup/marble_outline.gbapal"), - [MAPPOPUP_THEME_STONE] = INCBIN_U16("graphics/interface/map_popup/stone_outline.gbapal"), - [MAPPOPUP_THEME_BRICK] = INCBIN_U16("graphics/interface/map_popup/brick_outline.gbapal"), - [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U16("graphics/interface/map_popup/underwater_outline.gbapal"), - [MAPPOPUP_THEME_STONE2] = INCBIN_U16("graphics/interface/map_popup/stone2_outline.gbapal"), + [MAPPOPUP_THEME_WOOD] = INCBIN_U16("graphics/map_popup/wood.gbapal"), + [MAPPOPUP_THEME_MARBLE] = INCBIN_U16("graphics/map_popup/marble_outline.gbapal"), + [MAPPOPUP_THEME_STONE] = INCBIN_U16("graphics/map_popup/stone_outline.gbapal"), + [MAPPOPUP_THEME_BRICK] = INCBIN_U16("graphics/map_popup/brick_outline.gbapal"), + [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U16("graphics/map_popup/underwater_outline.gbapal"), + [MAPPOPUP_THEME_STONE2] = INCBIN_U16("graphics/map_popup/stone2_outline.gbapal"), }; -static const u16 sMapPopUp_Palette_Underwater[16] = INCBIN_U16("graphics/interface/map_popup/underwater.gbapal"); +static const u16 sMapPopUp_Palette_Underwater[16] = INCBIN_U16("graphics/map_popup/underwater.gbapal"); static const u8 sRegionMapSectionId_To_PopUpThemeIdMapping[] = { diff --git a/src/menu_helpers.c b/src/menu_helpers.c index d5cf83bd24..e9f3e571f0 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -71,12 +71,12 @@ static const union AnimCmd *const sAnims_SwapLine[] = static const struct CompressedSpriteSheet sSpriteSheet_SwapLine = { - gBagSwapLineGfx, 0x100, TAG_SWAP_LINE + gSwapLineGfx, 0x100, TAG_SWAP_LINE }; static const struct CompressedSpritePalette sSpritePalette_SwapLine = { - gBagSwapLinePal, TAG_SWAP_LINE + gSwapLinePal, TAG_SWAP_LINE }; static const struct SpriteTemplate sSpriteTemplate_SwapLine = diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c index 178b6d5b79..4c72136d4c 100644 --- a/src/minigame_countdown.c +++ b/src/minigame_countdown.c @@ -48,8 +48,8 @@ static void Task_StaticCountdown_Free(u8 taskId); static void Task_StaticCountdown_Start(u8 taskId); static void Task_StaticCountdown_Run(u8 taskId); -static const u16 s321Start_Static_Pal[] = INCBIN_U16("graphics/minigame_countdown/321start_static.gbapal"); -static const u32 s321Start_Static_Gfx[] = INCBIN_U32("graphics/minigame_countdown/321start_static.4bpp.lz"); +static const u16 s321Start_Static_Pal[] = INCBIN_U16("graphics/link/321start_static.gbapal"); +static const u32 s321Start_Static_Gfx[] = INCBIN_U32("graphics/link/321start_static.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheet_321Start_Static[] = { @@ -374,8 +374,8 @@ static void CreateStartSprite(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subprior static void InitStartGraphic(u8 spriteId1, u8 spriteId2, u8 spriteId3); static void SpriteCB_Start(struct Sprite *sprite); -static const u16 s321Start_Pal[] = INCBIN_U16("graphics/minigame_countdown/321start.gbapal"); -static const u32 s321Start_Gfx[] = INCBIN_U32("graphics/minigame_countdown/321start.4bpp.lz"); +static const u16 s321Start_Pal[] = INCBIN_U16("graphics/link/321start.gbapal"); +static const u32 s321Start_Gfx[] = INCBIN_U32("graphics/link/321start.4bpp.lz"); #define tState data[0] #define tTilesTag data[2] diff --git a/src/money.c b/src/money.c index c331462d4e..592ce9f753 100644 --- a/src/money.c +++ b/src/money.c @@ -58,14 +58,14 @@ static const struct SpriteTemplate sSpriteTemplate_MoneyLabel = static const struct CompressedSpriteSheet sSpriteSheet_MoneyLabel = { - .data = gMenuMoneyGfx, + .data = gShopMenuMoney_Gfx, .size = 256, .tag = MONEY_LABEL_TAG, }; static const struct CompressedSpritePalette sSpritePalette_MoneyLabel = { - .data = gMenuMoneyPal, + .data = gShopMenu_Pal, .tag = MONEY_LABEL_TAG }; @@ -146,7 +146,7 @@ void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed) txtPtr = gStringVar4; while (strLength-- > 0) - *(txtPtr++) = 0x77; + *(txtPtr++) = CHAR_SPACER; StringExpandPlaceholders(txtPtr, gText_PokedollarVar1); AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, speed, NULL); diff --git a/src/pokeball.c b/src/pokeball.c index cb68d68833..0250a0c5ba 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -59,34 +59,34 @@ static u16 GetBattlerPokeballItemId(u8 battlerId); const struct CompressedSpriteSheet gBallSpriteSheets[POKEBALL_COUNT] = { - [BALL_POKE] = {gInterfaceGfx_PokeBall, 384, GFX_TAG_POKEBALL}, - [BALL_GREAT] = {gInterfaceGfx_GreatBall, 384, GFX_TAG_GREATBALL}, - [BALL_SAFARI] = {gInterfaceGfx_SafariBall, 384, GFX_TAG_SAFARIBALL}, - [BALL_ULTRA] = {gInterfaceGfx_UltraBall, 384, GFX_TAG_ULTRABALL}, - [BALL_MASTER] = {gInterfaceGfx_MasterBall, 384, GFX_TAG_MASTERBALL}, - [BALL_NET] = {gInterfaceGfx_NetBall, 384, GFX_TAG_NETBALL}, - [BALL_DIVE] = {gInterfaceGfx_DiveBall, 384, GFX_TAG_DIVEBALL}, - [BALL_NEST] = {gInterfaceGfx_NestBall, 384, GFX_TAG_NESTBALL}, - [BALL_REPEAT] = {gInterfaceGfx_RepeatBall, 384, GFX_TAG_REPEATBALL}, - [BALL_TIMER] = {gInterfaceGfx_TimerBall, 384, GFX_TAG_TIMERBALL}, - [BALL_LUXURY] = {gInterfaceGfx_LuxuryBall, 384, GFX_TAG_LUXURYBALL}, - [BALL_PREMIER] = {gInterfaceGfx_PremierBall, 384, GFX_TAG_PREMIERBALL}, + [BALL_POKE] = {gBallGfx_Poke, 384, GFX_TAG_POKEBALL}, + [BALL_GREAT] = {gBallGfx_Great, 384, GFX_TAG_GREATBALL}, + [BALL_SAFARI] = {gBallGfx_Safari, 384, GFX_TAG_SAFARIBALL}, + [BALL_ULTRA] = {gBallGfx_Ultra, 384, GFX_TAG_ULTRABALL}, + [BALL_MASTER] = {gBallGfx_Master, 384, GFX_TAG_MASTERBALL}, + [BALL_NET] = {gBallGfx_Net, 384, GFX_TAG_NETBALL}, + [BALL_DIVE] = {gBallGfx_Dive, 384, GFX_TAG_DIVEBALL}, + [BALL_NEST] = {gBallGfx_Nest, 384, GFX_TAG_NESTBALL}, + [BALL_REPEAT] = {gBallGfx_Repeat, 384, GFX_TAG_REPEATBALL}, + [BALL_TIMER] = {gBallGfx_Timer, 384, GFX_TAG_TIMERBALL}, + [BALL_LUXURY] = {gBallGfx_Luxury, 384, GFX_TAG_LUXURYBALL}, + [BALL_PREMIER] = {gBallGfx_Premier, 384, GFX_TAG_PREMIERBALL}, }; const struct CompressedSpritePalette gBallSpritePalettes[POKEBALL_COUNT] = { - [BALL_POKE] = {gInterfacePal_PokeBall, GFX_TAG_POKEBALL}, - [BALL_GREAT] = {gInterfacePal_GreatBall, GFX_TAG_GREATBALL}, - [BALL_SAFARI] = {gInterfacePal_SafariBall, GFX_TAG_SAFARIBALL}, - [BALL_ULTRA] = {gInterfacePal_UltraBall, GFX_TAG_ULTRABALL}, - [BALL_MASTER] = {gInterfacePal_MasterBall, GFX_TAG_MASTERBALL}, - [BALL_NET] = {gInterfacePal_NetBall, GFX_TAG_NETBALL}, - [BALL_DIVE] = {gInterfacePal_DiveBall, GFX_TAG_DIVEBALL}, - [BALL_NEST] = {gInterfacePal_NestBall, GFX_TAG_NESTBALL}, - [BALL_REPEAT] = {gInterfacePal_RepeatBall, GFX_TAG_REPEATBALL}, - [BALL_TIMER] = {gInterfacePal_TimerBall, GFX_TAG_TIMERBALL}, - [BALL_LUXURY] = {gInterfacePal_LuxuryBall, GFX_TAG_LUXURYBALL}, - [BALL_PREMIER] = {gInterfacePal_PremierBall, GFX_TAG_PREMIERBALL}, + [BALL_POKE] = {gBallPal_Poke, GFX_TAG_POKEBALL}, + [BALL_GREAT] = {gBallPal_Great, GFX_TAG_GREATBALL}, + [BALL_SAFARI] = {gBallPal_Safari, GFX_TAG_SAFARIBALL}, + [BALL_ULTRA] = {gBallPal_Ultra, GFX_TAG_ULTRABALL}, + [BALL_MASTER] = {gBallPal_Master, GFX_TAG_MASTERBALL}, + [BALL_NET] = {gBallPal_Net, GFX_TAG_NETBALL}, + [BALL_DIVE] = {gBallPal_Dive, GFX_TAG_DIVEBALL}, + [BALL_NEST] = {gBallPal_Nest, GFX_TAG_NESTBALL}, + [BALL_REPEAT] = {gBallPal_Repeat, GFX_TAG_REPEATBALL}, + [BALL_TIMER] = {gBallPal_Timer, GFX_TAG_TIMERBALL}, + [BALL_LUXURY] = {gBallPal_Luxury, GFX_TAG_LUXURYBALL}, + [BALL_PREMIER] = {gBallPal_Premier, GFX_TAG_PREMIERBALL}, }; static const struct OamData sBallOamData = diff --git a/src/shop.c b/src/shop.c index f41ae315f1..b65cace09e 100755 --- a/src/shop.c +++ b/src/shop.c @@ -674,9 +674,9 @@ static void BuyMenuInitBgs(void) static void BuyMenuDecompressBgGraphics(void) { - DecompressAndCopyTileDataToVram(1, gBuyMenuFrame_Gfx, 0x3A0, 0x3E3, 0); - LZDecompressWram(gBuyMenuFrame_Tilemap, sShopData->tilemapBuffers[0]); - LoadCompressedPalette(gMenuMoneyPal, 0xC0, 0x20); + DecompressAndCopyTileDataToVram(1, gShopMenu_Gfx, 0x3A0, 0x3E3, 0); + LZDecompressWram(gShopMenu_Tilemap, sShopData->tilemapBuffers[0]); + LoadCompressedPalette(gShopMenu_Pal, 0xC0, 0x20); } static void BuyMenuInitWindows(void) diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index ffb86488aa..1fbd83fcda 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -51,9 +51,9 @@ static void Task_WirelessCommunicationScreen(u8); static void WCSS_AddTextPrinterParameterized(u8, u8, const u8 *, u8, u8, u8); static bool32 UpdateCommunicationCounts(u32 *, u32 *, u32 *, u8); -static const u16 sBgTiles_Pal[] = INCBIN_U16("graphics/interface/wireless_info_screen.gbapal"); -static const u32 sBgTiles_Gfx[] = INCBIN_U32("graphics/interface/wireless_info_screen.4bpp.lz"); -static const u32 sBgTiles_Tilemap[] = INCBIN_U32("graphics/interface/wireless_info_screen.bin.lz"); +static const u16 sBgTiles_Pal[] = INCBIN_U16("graphics/link/wireless_info_screen.gbapal"); +static const u32 sBgTiles_Gfx[] = INCBIN_U32("graphics/link/wireless_info_screen.4bpp.lz"); +static const u32 sBgTiles_Tilemap[] = INCBIN_U32("graphics/link/wireless_info_screen.bin.lz"); static const struct BgTemplate sBgTemplates[] = { { From 01af8e877f039a0e1427de5e52442602446719cc Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 11 Jan 2022 14:18:22 -0500 Subject: [PATCH 344/417] Move starter choose out of interface/misc --- .../hpbar_anim_unused.png} | Bin .../hpbar_unused.png} | Bin .../numbers1.png | Bin .../numbers2.png | Bin graphics/{misc => interface}/mon_markings.png | Bin .../{misc => interface}/mon_markings_menu.png | Bin .../birch_bag.bin} | Bin .../{misc => starter_choose}/birch_bag.png | Bin .../birch_grass.bin} | Bin .../{misc => starter_choose}/birch_grass.png | Bin .../pokeball_selection.png | Bin .../starter_circle.png | Bin graphics/{link => trade}/gba.png | Bin graphics/{link => trade}/gba_pal2.pal | 0 graphics_file_rules.mk | 9 +++++---- src/graphics.c | 14 +++++++------- src/mon_markings.c | 4 ++-- src/starter_choose.c | 18 +++++++++--------- 18 files changed, 23 insertions(+), 22 deletions(-) rename graphics/{interface/hpbar_anim.png => battle_interface/hpbar_anim_unused.png} (100%) rename graphics/{interface/unused_hpbar.png => battle_interface/hpbar_unused.png} (100%) rename graphics/{interface => battle_interface}/numbers1.png (100%) rename graphics/{interface => battle_interface}/numbers2.png (100%) rename graphics/{misc => interface}/mon_markings.png (100%) rename graphics/{misc => interface}/mon_markings_menu.png (100%) rename graphics/{misc/birch_bag_map.bin => starter_choose/birch_bag.bin} (100%) rename graphics/{misc => starter_choose}/birch_bag.png (100%) rename graphics/{misc/birch_grass_map.bin => starter_choose/birch_grass.bin} (100%) rename graphics/{misc => starter_choose}/birch_grass.png (100%) rename graphics/{misc => starter_choose}/pokeball_selection.png (100%) rename graphics/{misc => starter_choose}/starter_circle.png (100%) rename graphics/{link => trade}/gba.png (100%) rename graphics/{link => trade}/gba_pal2.pal (100%) diff --git a/graphics/interface/hpbar_anim.png b/graphics/battle_interface/hpbar_anim_unused.png similarity index 100% rename from graphics/interface/hpbar_anim.png rename to graphics/battle_interface/hpbar_anim_unused.png diff --git a/graphics/interface/unused_hpbar.png b/graphics/battle_interface/hpbar_unused.png similarity index 100% rename from graphics/interface/unused_hpbar.png rename to graphics/battle_interface/hpbar_unused.png diff --git a/graphics/interface/numbers1.png b/graphics/battle_interface/numbers1.png similarity index 100% rename from graphics/interface/numbers1.png rename to graphics/battle_interface/numbers1.png diff --git a/graphics/interface/numbers2.png b/graphics/battle_interface/numbers2.png similarity index 100% rename from graphics/interface/numbers2.png rename to graphics/battle_interface/numbers2.png diff --git a/graphics/misc/mon_markings.png b/graphics/interface/mon_markings.png similarity index 100% rename from graphics/misc/mon_markings.png rename to graphics/interface/mon_markings.png diff --git a/graphics/misc/mon_markings_menu.png b/graphics/interface/mon_markings_menu.png similarity index 100% rename from graphics/misc/mon_markings_menu.png rename to graphics/interface/mon_markings_menu.png diff --git a/graphics/misc/birch_bag_map.bin b/graphics/starter_choose/birch_bag.bin similarity index 100% rename from graphics/misc/birch_bag_map.bin rename to graphics/starter_choose/birch_bag.bin diff --git a/graphics/misc/birch_bag.png b/graphics/starter_choose/birch_bag.png similarity index 100% rename from graphics/misc/birch_bag.png rename to graphics/starter_choose/birch_bag.png diff --git a/graphics/misc/birch_grass_map.bin b/graphics/starter_choose/birch_grass.bin similarity index 100% rename from graphics/misc/birch_grass_map.bin rename to graphics/starter_choose/birch_grass.bin diff --git a/graphics/misc/birch_grass.png b/graphics/starter_choose/birch_grass.png similarity index 100% rename from graphics/misc/birch_grass.png rename to graphics/starter_choose/birch_grass.png diff --git a/graphics/misc/pokeball_selection.png b/graphics/starter_choose/pokeball_selection.png similarity index 100% rename from graphics/misc/pokeball_selection.png rename to graphics/starter_choose/pokeball_selection.png diff --git a/graphics/misc/starter_circle.png b/graphics/starter_choose/starter_circle.png similarity index 100% rename from graphics/misc/starter_circle.png rename to graphics/starter_choose/starter_circle.png diff --git a/graphics/link/gba.png b/graphics/trade/gba.png similarity index 100% rename from graphics/link/gba.png rename to graphics/trade/gba.png diff --git a/graphics/link/gba_pal2.pal b/graphics/trade/gba_pal2.pal similarity index 100% rename from graphics/link/gba_pal2.pal rename to graphics/trade/gba_pal2.pal diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 25ac181421..cb12b9c183 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -19,6 +19,7 @@ OBJEVENTGFXDIR := graphics/object_events MISCGFXDIR := graphics/misc JPCONTESTGFXDIR := graphics/contest/japanese POKEDEXGFXDIR := graphics/pokedex +STARTERGFXDIR := graphics/starter_choose types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark contest_types := cool beauty cute smart tough @@ -371,9 +372,9 @@ $(UNUSEDGFXDIR)/obi2.4bpp: $(UNUSEDGFXDIR)/old_bulbasaur2.4bpp \ $(UNUSEDGFXDIR)/old_battle_interface_3.4bpp @cat $^ >$@ -$(INTERFACEGFXDIR)/battle_bar.4bpp: $(INTERFACEGFXDIR)/hpbar_anim.4bpp \ - $(INTERFACEGFXDIR)/numbers1.4bpp \ - $(INTERFACEGFXDIR)/numbers2.4bpp +$(BATINTGFXDIR)/battle_bar.4bpp: $(BATINTGFXDIR)/hpbar_anim_unused.4bpp \ + $(BATINTGFXDIR)/numbers1.4bpp \ + $(BATINTGFXDIR)/numbers2.4bpp @cat $^ >$@ $(UNUSEDGFXDIR)/redyellowgreen_frame.bin: $(UNUSEDGFXDIR)/red_frame.bin \ @@ -707,5 +708,5 @@ $(POKEDEXGFXDIR)/region_map.8bpp: %.8bpp: %.png $(POKEDEXGFXDIR)/region_map_affine.8bpp: %.8bpp: %.png $(GFX) $< $@ -num_tiles 233 -$(MISCGFXDIR)/birch_help.4bpp: $(MISCGFXDIR)/birch_bag.4bpp $(MISCGFXDIR)/birch_grass.4bpp +$(STARTERGFXDIR)/birch_help.4bpp: $(STARTERGFXDIR)/birch_bag.4bpp $(STARTERGFXDIR)/birch_grass.4bpp @cat $^ >$@ diff --git a/src/graphics.c b/src/graphics.c index 09cae59ce5..9f708f18b4 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -147,7 +147,7 @@ const u32 gBattleAnimSpriteGfx_ClawSlash[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpriteGfx_Scratch3[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_3.4bpp.lz"); const u32 gBattleAnimSpriteGfx_Scratch2[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_2.4bpp.lz"); -const u32 gUnusedHpBar_Gfx[] = INCBIN_U32("graphics/interface/unused_hpbar.4bpp.lz"); +const u32 gUnusedHpBar_Gfx[] = INCBIN_U32("graphics/battle_interface/hpbar_unused.4bpp.lz"); const u32 gBattleAnimSpriteGfx_BubbleBurst2[] = INCBIN_U32("graphics/battle_anims/sprites/bubble_burst_2.4bpp.lz"); @@ -165,7 +165,7 @@ const u32 gBattleAnimSpriteGfx_PinkHeart2[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleInterfaceGfx_UnusedWindow1[] = INCBIN_U32("graphics/battle_interface/unused_window.4bpp.lz"); const u32 gBattleInterfacePal_UnusedWindow1[] = INCBIN_U32("graphics/battle_interface/unused_window.gbapal.lz"); -const u32 gBattleInterfaceGfx_BattleBar[] = INCBIN_U32("graphics/interface/battle_bar.4bpp.lz"); +const u32 gBattleInterfaceGfx_BattleBar[] = INCBIN_U32("graphics/battle_interface/battle_bar.4bpp.lz"); const u32 gBattleAnimSpriteGfx_SapDrip[] = INCBIN_U32("graphics/battle_anims/sprites/sap_drip.4bpp.lz"); const u32 gBattleAnimSpritePal_SapDrip[] = INCBIN_U32("graphics/battle_anims/sprites/sap_drip.gbapal.lz"); @@ -1329,8 +1329,8 @@ const u32 gRegionMapCityZoomText_Gfx[] = INCBIN_U32("graphics/pokenav/city_zoom_ const u16 gPokenavConditionCancel_Pal[] = INCBIN_U16("graphics/pokenav/condition/cancel.gbapal"); const u8 gPokenavConditionCancel_Gfx[] = INCBIN_U8("graphics/pokenav/condition/cancel.4bpp"); -const u16 gMonMarkingsMenu_Pal[] = INCBIN_U16("graphics/misc/mon_markings_menu.gbapal"); -const u8 gMonMarkingsMenu_Gfx[] = INCBIN_U8("graphics/misc/mon_markings_menu.4bpp"); +const u16 gMonMarkingsMenu_Pal[] = INCBIN_U16("graphics/interface/mon_markings_menu.gbapal"); +const u8 gMonMarkingsMenu_Gfx[] = INCBIN_U8("graphics/interface/mon_markings_menu.4bpp"); const u16 gBerryBlenderMiscPalette[] = INCBIN_U16("graphics/berry_blender/misc.gbapal"); const u16 gBerryBlenderArrowPalette[] = INCBIN_U16("graphics/berry_blender/arrow.gbapal"); @@ -1447,9 +1447,9 @@ const u32 gTilesetTiles_General[] = INCBIN_U32("data/tilesets/primary/general/ti // trade/egg hatch -const u16 gTradeGba_Pal[] = INCBIN_U16("graphics/link/gba.gbapal"); -const u16 gTradeGba2_Pal[] = INCBIN_U16("graphics/link/gba_pal2.gbapal"); -const u8 gTradeGba_Gfx[] = INCBIN_U8("graphics/link/gba.4bpp"); +const u16 gTradeGba_Pal[] = INCBIN_U16("graphics/trade/gba.gbapal"); +const u16 gTradeGba2_Pal[] = INCBIN_U16("graphics/trade/gba_pal2.gbapal"); +const u8 gTradeGba_Gfx[] = INCBIN_U8("graphics/trade/gba.4bpp"); static const u16 sEmptyPal[16] = {0}; diff --git a/src/mon_markings.c b/src/mon_markings.c index dbd5a2fa81..1e03179e94 100644 --- a/src/mon_markings.c +++ b/src/mon_markings.c @@ -22,8 +22,8 @@ static void SpriteCB_Marking(struct Sprite *); static void SpriteCB_Cursor(struct Sprite *); static struct Sprite *CreateMarkingComboSprite(u16, u16, const u16 *, u16); -static const u16 sMonMarkings_Pal[] = INCBIN_U16("graphics/misc/mon_markings.gbapal"); -static const u8 sMonMarkings_Gfx[] = INCBIN_U8("graphics/misc/mon_markings.4bpp"); +static const u16 sMonMarkings_Pal[] = INCBIN_U16("graphics/interface/mon_markings.gbapal"); +static const u8 sMonMarkings_Gfx[] = INCBIN_U8("graphics/interface/mon_markings.4bpp"); static const struct OamData sOamData_MenuWindow = { diff --git a/src/starter_choose.c b/src/starter_choose.c index ca393c4d81..81a88e7714 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -53,17 +53,17 @@ static u16 sStarterLabelWindowId; const u16 gBirchBagGrassPal[][16] = { - INCBIN_U16("graphics/misc/birch_bag.gbapal"), - INCBIN_U16("graphics/misc/birch_grass.gbapal"), + INCBIN_U16("graphics/starter_choose/birch_bag.gbapal"), + INCBIN_U16("graphics/starter_choose/birch_grass.gbapal"), }; -static const u16 sPokeballSelection_Pal[] = INCBIN_U16("graphics/misc/pokeball_selection.gbapal"); -static const u16 sStarterCircle_Pal[] = INCBIN_U16("graphics/misc/starter_circle.gbapal"); -const u32 gBirchBagTilemap[] = INCBIN_U32("graphics/misc/birch_bag_map.bin.lz"); -const u32 gBirchGrassTilemap[] = INCBIN_U32("graphics/misc/birch_grass_map.bin.lz"); -const u32 gBirchHelpGfx[] = INCBIN_U32("graphics/misc/birch_help.4bpp.lz"); // Birch bag and grass combined -const u32 gPokeballSelection_Gfx[] = INCBIN_U32("graphics/misc/pokeball_selection.4bpp.lz"); -static const u32 sStarterCircle_Gfx[] = INCBIN_U32("graphics/misc/starter_circle.4bpp.lz"); +static const u16 sPokeballSelection_Pal[] = INCBIN_U16("graphics/starter_choose/pokeball_selection.gbapal"); +static const u16 sStarterCircle_Pal[] = INCBIN_U16("graphics/starter_choose/starter_circle.gbapal"); +const u32 gBirchBagTilemap[] = INCBIN_U32("graphics/starter_choose/birch_bag.bin.lz"); +const u32 gBirchGrassTilemap[] = INCBIN_U32("graphics/starter_choose/birch_grass.bin.lz"); +const u32 gBirchHelpGfx[] = INCBIN_U32("graphics/starter_choose/birch_help.4bpp.lz"); // Birch bag and grass combined +const u32 gPokeballSelection_Gfx[] = INCBIN_U32("graphics/starter_choose/pokeball_selection.4bpp.lz"); +static const u32 sStarterCircle_Gfx[] = INCBIN_U32("graphics/starter_choose/starter_circle.4bpp.lz"); static const struct WindowTemplate sWindowTemplates[] = { From f899a02ac642e66ab9b6baa28903921863529171 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 12 Jan 2022 18:34:21 -0500 Subject: [PATCH 345/417] Use MON_GIVEN_TO_ constants for givemon --- .../LittlerootTown_ProfessorBirchsLab/scripts.inc | 12 ++++++------ data/maps/MossdeepCity_StevensHouse/scripts.inc | 4 ++-- data/maps/Route119_WeatherInstitute_2F/scripts.inc | 4 ++-- data/maps/RustboroCity_DevonCorp_2F/scripts.inc | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc index d645db4405..acf80f0e40 100644 --- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc +++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc @@ -341,8 +341,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil:: bufferspeciesname STR_VAR_1, SPECIES_CYNDAQUIL setvar VAR_TEMP_1, SPECIES_CYNDAQUIL givemon SPECIES_CYNDAQUIL, 5 - goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty - goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end @@ -382,8 +382,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile:: bufferspeciesname STR_VAR_1, SPECIES_TOTODILE setvar VAR_TEMP_1, SPECIES_TOTODILE givemon SPECIES_TOTODILE, 5 - goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty - goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end @@ -423,8 +423,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita:: bufferspeciesname STR_VAR_1, SPECIES_CHIKORITA setvar VAR_TEMP_1, SPECIES_CHIKORITA givemon SPECIES_CHIKORITA, 5 - goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty - goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC hidemonpic goto Common_EventScript_NoMoreRoomForPokemon end diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index 00814ce194..0470e977a6 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -87,8 +87,8 @@ MossdeepCity_StevensHouse_EventScript_LeaveBeldum:: MossdeepCity_StevensHouse_EventScript_GiveBeldum:: setvar VAR_TEMP_1, SPECIES_BELDUM givemon SPECIES_BELDUM, 5 - goto_if_eq VAR_RESULT, 0, MossdeepCity_StevensHouse_EventScript_SendBeldumParty - goto_if_eq VAR_RESULT, 1, MossdeepCity_StevensHouse_EventScript_SendBeldumPC + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, MossdeepCity_StevensHouse_EventScript_SendBeldumParty + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, MossdeepCity_StevensHouse_EventScript_SendBeldumPC goto Common_EventScript_NoMoreRoomForPokemon end diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc index 0b2227e8ba..2060cb03c9 100644 --- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc +++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc @@ -90,8 +90,8 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastform:: msgbox Route119_WeatherInstitute_2F_Text_ThanksPleaseTakePokemon, MSGBOX_DEFAULT setvar VAR_TEMP_1, SPECIES_CASTFORM givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER - goto_if_eq VAR_RESULT, 0, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty - goto_if_eq VAR_RESULT, 1, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC goto Common_EventScript_NoMoreRoomForPokemon end diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc index a85cbc8be8..747070645c 100644 --- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc +++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc @@ -146,8 +146,8 @@ RustboroCity_DevonCorp_2F_EventScript_AnorithReady:: RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep:: setvar VAR_TEMP_1, SPECIES_LILEEP givemon SPECIES_LILEEP, 20 - goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty - goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC goto Common_EventScript_NoMoreRoomForPokemon end @@ -191,8 +191,8 @@ RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep:: RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith:: setvar VAR_TEMP_1, SPECIES_ANORITH givemon SPECIES_ANORITH, 20 - goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty - goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty + goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC goto Common_EventScript_NoMoreRoomForPokemon end From fd7457b05a1b109ae42cb4a956266b6acebb5644 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 13 Jan 2022 15:26:20 -0500 Subject: [PATCH 346/417] Remove berry fix --- .gitignore | 1 + Makefile | 16 +- berry_fix/Makefile | 203 ---- berry_fix/asm/berry_fix_header.inc | 35 - berry_fix/asm/loader.s | 119 -- berry_fix/charmap.txt | 1067 ----------------- berry_fix/data/data.s | 4 - berry_fix/ld_script.sed | 14 - berry_fix/ld_script.txt | 31 - berry_fix/payload/Makefile | 209 ---- berry_fix/payload/asm/crt0.s | 82 -- berry_fix/payload/asm/libagbsyscall.s | 46 - berry_fix/payload/asm/macros/function.inc | 29 - berry_fix/payload/charmap.txt | 1067 ----------------- berry_fix/payload/common_syms/agb_flash.txt | 10 - berry_fix/payload/common_syms/main.txt | 9 - berry_fix/payload/common_syms/rtc.txt | 2 - berry_fix/payload/constants/gba_constants.inc | 490 -------- berry_fix/payload/graphics/debug_digits.png | Bin 166 -> 0 bytes berry_fix/payload/graphics/msg_box.png | Bin 2631 -> 0 bytes berry_fix/payload/graphics/msg_box.tilemap | Bin 8192 -> 0 bytes .../payload/include/constants/game_stat.h | 56 - berry_fix/payload/include/constants/vars.h | 196 --- berry_fix/payload/include/flash.h | 55 - berry_fix/payload/include/gba/defines.h | 87 -- .../payload/include/gba/flash_internal.h | 85 -- berry_fix/payload/include/gba/gba.h | 12 - berry_fix/payload/include/gba/io_reg.h | 770 ------------ berry_fix/payload/include/gba/isagbprint.h | 50 - berry_fix/payload/include/gba/m4a_internal.h | 467 -------- berry_fix/payload/include/gba/macro.h | 247 ---- berry_fix/payload/include/gba/multiboot.h | 55 - berry_fix/payload/include/gba/syscall.h | 57 - berry_fix/payload/include/gba/types.h | 146 --- berry_fix/payload/include/global.berry.h | 62 - berry_fix/payload/include/global.fieldmap.h | 310 ----- berry_fix/payload/include/global.h | 876 -------------- berry_fix/payload/include/main.h | 45 - berry_fix/payload/include/pokemon.h | 154 --- berry_fix/payload/include/rtc.h | 15 - berry_fix/payload/include/siirtc.h | 54 - berry_fix/payload/ld_script.sed | 14 - berry_fix/payload/ld_script.txt | 107 -- berry_fix/payload/rom.sha1 | 1 - berry_fix/payload/src/agb_flash.c | 296 ----- berry_fix/payload/src/agb_flash_1m.c | 86 -- berry_fix/payload/src/agb_flash_le.c | 31 - berry_fix/payload/src/agb_flash_mx.c | 193 --- berry_fix/payload/src/flash.c | 752 ------------ berry_fix/payload/src/main.c | 289 ----- berry_fix/payload/src/rtc.c | 346 ------ berry_fix/payload/src/siirtc.c | 432 ------- berry_fix/payload/sym_bss.txt | 5 - berry_fix/payload/sym_common.txt | 29 - berry_fix/payload/sym_ewram.txt | 3 - berry_fix/rom.sha1 | 1 - data/ereader_link_data.s | 6 - data/mb_berry_fix.gba | Bin 0 -> 15348 bytes ...{pokemon_colosseum.mb => mb_colosseum.gba} | Bin .../{ereader_link_data.bin => mb_ereader.gba} | Bin data/multiboot_berry_glitch_fix.s | 2 +- data/multiboot_ereader.s | 6 + data/multiboot_pokemon_colosseum.s | 2 +- ld_script.txt | 4 +- ld_script_modern.txt | 4 +- src/ereader_screen.c | 8 +- 66 files changed, 22 insertions(+), 9828 deletions(-) delete mode 100644 berry_fix/Makefile delete mode 100644 berry_fix/asm/berry_fix_header.inc delete mode 100644 berry_fix/asm/loader.s delete mode 100644 berry_fix/charmap.txt delete mode 100644 berry_fix/data/data.s delete mode 100644 berry_fix/ld_script.sed delete mode 100644 berry_fix/ld_script.txt delete mode 100644 berry_fix/payload/Makefile delete mode 100644 berry_fix/payload/asm/crt0.s delete mode 100644 berry_fix/payload/asm/libagbsyscall.s delete mode 100644 berry_fix/payload/asm/macros/function.inc delete mode 100644 berry_fix/payload/charmap.txt delete mode 100644 berry_fix/payload/common_syms/agb_flash.txt delete mode 100644 berry_fix/payload/common_syms/main.txt delete mode 100644 berry_fix/payload/common_syms/rtc.txt delete mode 100644 berry_fix/payload/constants/gba_constants.inc delete mode 100644 berry_fix/payload/graphics/debug_digits.png delete mode 100644 berry_fix/payload/graphics/msg_box.png delete mode 100644 berry_fix/payload/graphics/msg_box.tilemap delete mode 100644 berry_fix/payload/include/constants/game_stat.h delete mode 100644 berry_fix/payload/include/constants/vars.h delete mode 100644 berry_fix/payload/include/flash.h delete mode 100644 berry_fix/payload/include/gba/defines.h delete mode 100644 berry_fix/payload/include/gba/flash_internal.h delete mode 100644 berry_fix/payload/include/gba/gba.h delete mode 100644 berry_fix/payload/include/gba/io_reg.h delete mode 100644 berry_fix/payload/include/gba/isagbprint.h delete mode 100644 berry_fix/payload/include/gba/m4a_internal.h delete mode 100644 berry_fix/payload/include/gba/macro.h delete mode 100644 berry_fix/payload/include/gba/multiboot.h delete mode 100644 berry_fix/payload/include/gba/syscall.h delete mode 100644 berry_fix/payload/include/gba/types.h delete mode 100644 berry_fix/payload/include/global.berry.h delete mode 100644 berry_fix/payload/include/global.fieldmap.h delete mode 100644 berry_fix/payload/include/global.h delete mode 100644 berry_fix/payload/include/main.h delete mode 100644 berry_fix/payload/include/pokemon.h delete mode 100644 berry_fix/payload/include/rtc.h delete mode 100644 berry_fix/payload/include/siirtc.h delete mode 100644 berry_fix/payload/ld_script.sed delete mode 100644 berry_fix/payload/ld_script.txt delete mode 100644 berry_fix/payload/rom.sha1 delete mode 100644 berry_fix/payload/src/agb_flash.c delete mode 100644 berry_fix/payload/src/agb_flash_1m.c delete mode 100644 berry_fix/payload/src/agb_flash_le.c delete mode 100644 berry_fix/payload/src/agb_flash_mx.c delete mode 100644 berry_fix/payload/src/flash.c delete mode 100644 berry_fix/payload/src/main.c delete mode 100644 berry_fix/payload/src/rtc.c delete mode 100644 berry_fix/payload/src/siirtc.c delete mode 100644 berry_fix/payload/sym_bss.txt delete mode 100644 berry_fix/payload/sym_common.txt delete mode 100644 berry_fix/payload/sym_ewram.txt delete mode 100644 berry_fix/rom.sha1 delete mode 100644 data/ereader_link_data.s create mode 100755 data/mb_berry_fix.gba rename data/{pokemon_colosseum.mb => mb_colosseum.gba} (100%) rename data/{ereader_link_data.bin => mb_ereader.gba} (100%) create mode 100644 data/multiboot_ereader.s diff --git a/.gitignore b/.gitignore index 23b01d1e0d..cac4a07e61 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.i *.elf *.gba +!data/*.gba *.sgm *.sa1 *.ss[0-9] diff --git a/Makefile b/Makefile index 7b2f79877a..6283a87fe3 100644 --- a/Makefile +++ b/Makefile @@ -150,7 +150,7 @@ MAKEFLAGS += --no-print-directory # Secondary expansion is required for dependency variables in object rules. .SECONDEXPANSION: -.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) berry_fix libagbsyscall modern tidymodern tidynonmodern +.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) libagbsyscall modern tidymodern tidynonmodern infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line)))) @@ -158,7 +158,7 @@ infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst # Disable dependency scanning for clean/tidy/tools # Use a separate minimal makefile for speed # Since we don't need to reload most of this makefile -ifeq (,$(filter-out all rom compare modern berry_fix libagbsyscall syms,$(MAKECMDGOALS))) +ifeq (,$(filter-out all rom compare modern libagbsyscall syms,$(MAKECMDGOALS))) $(call infoshell, $(MAKE) -f make_tools.mk) else NODEP ?= 1 @@ -169,8 +169,8 @@ ifeq (,$(MAKECMDGOALS)) SCAN_DEPS ?= 1 else # clean, tidy, tools, mostlyclean, clean-tools, $(TOOLDIRS), tidymodern, tidynonmodern don't even build the ROM - # berry_fix and libagbsyscall do their own thing - ifeq (,$(filter-out clean tidy tools mostlyclean clean-tools $(TOOLDIRS) tidymodern tidynonmodern berry_fix libagbsyscall,$(MAKECMDGOALS))) + # libagbsyscall does its own thing + ifeq (,$(filter-out clean tidy tools mostlyclean clean-tools $(TOOLDIRS) tidymodern tidynonmodern libagbsyscall,$(MAKECMDGOALS))) SCAN_DEPS ?= 0 else SCAN_DEPS ?= 1 @@ -243,7 +243,6 @@ mostlyclean: tidynonmodern tidymodern rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} + rm -f $(AUTO_GEN_TARGETS) - @$(MAKE) clean -C berry_fix @$(MAKE) clean -C libagbsyscall tidy: tidynonmodern tidymodern @@ -417,7 +416,7 @@ endif $(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS) cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT) > ld_script.ld -$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) berry_fix libagbsyscall +$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) libagbsyscall @echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ " @cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB) $(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent @@ -428,11 +427,6 @@ $(ROM): $(ELF) modern: all -berry_fix/berry_fix.gba: berry_fix - -berry_fix: - @$(MAKE) -C berry_fix COMPARE=$(COMPARE) TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN) - libagbsyscall: @$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN) diff --git a/berry_fix/Makefile b/berry_fix/Makefile deleted file mode 100644 index 464e5f9e9c..0000000000 --- a/berry_fix/Makefile +++ /dev/null @@ -1,203 +0,0 @@ -TOOLCHAIN := $(DEVKITARM) -COMPARE ?= 0 - -# don't use dkP's base_tools anymore -# because the redefinition of $(CC) conflicts -# with when we want to use $(CC) to preprocess files -# thus, manually create the variables for the bin -# files, or use arm-none-eabi binaries on the system -# if dkP is not installed on this system - -ifneq (,$(TOOLCHAIN)) -ifneq ($(wildcard $(TOOLCHAIN)/bin),) -export PATH := $(TOOLCHAIN)/bin:$(PATH) -endif -endif - -PREFIX := arm-none-eabi- -OBJCOPY := $(PREFIX)objcopy -AS := $(PREFIX)as -LD := $(PREFIX)ld - -# note: the makefile must be set up so MODERNCC is never called -# if MODERN=0 -MODERNCC := $(PREFIX)gcc - -ifeq ($(OS),Windows_NT) -EXE := .exe -else -EXE := -endif - -# use arm-none-eabi-cpp for macOS -# as macOS's default compiler is clang -# and clang's preprocessor will warn on \u -# when preprocessing asm files, expecting a unicode literal -# we can't unconditionally use arm-none-eabi-cpp -# as installations which install binutils-arm-none-eabi -# don't come with it -ifneq ($(MODERN),1) - ifeq ($(shell uname -s),Darwin) - CPP := $(PREFIX)cpp - else - CPP := $(CC) -E - endif -else - CPP := $(PREFIX)cpp -endif - -GAME_CODE := AGBJ -MAKER_CODE := 01 -REVISION := 0 - -SHELL := /bin/bash -o pipefail - -CPPFLAGS := -I ../tools/agbcc/include -I ../tools/agbcc -iquote include -nostdinc -undef - -ROM := berry_fix.gba -OBJ_DIR := build -CC1 := ../tools/agbcc/bin/agbcc$(EXE) -override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm - - -ELF = $(ROM:.gba=.elf) -MAP = $(ROM:.gba=.map) - -C_SUBDIR = src -ASM_SUBDIR = asm -DATA_ASM_SUBDIR = data - -C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR) -ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR) -DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR) - -ASFLAGS := -mcpu=arm7tdmi - -LDFLAGS = -Map ../$(MAP) - -SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c -GFX := ../tools/gbagfx/gbagfx$(EXE) -AIF := ../tools/aif2pcm/aif2pcm$(EXE) -MID := ../tools/mid2agb/mid2agb$(EXE) -SCANINC := ../tools/scaninc/scaninc$(EXE) -PREPROC := ../tools/preproc/preproc$(EXE) -RAMSCRGEN := ../tools/ramscrgen/ramscrgen$(EXE) -FIX := ../tools/gbafix/gbafix$(EXE) - -# Clear the default suffixes -.SUFFIXES: -# Don't delete intermediate files -.SECONDARY: -# Delete files that weren't built properly -.DELETE_ON_ERROR: - -# Secondary expansion is required for dependency variables in object rules. -.SECONDEXPANSION: - -.PHONY: all rom clean compare tidy payload - -C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c) -C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS)) - -ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s) -ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS)) - -DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s) -DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS)) - -SONG_SRCS := $(wildcard $(SONG_SUBDIR)/*.s) -SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS)) - -MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid) -MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS)) - -OBJS := $(C_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS) -# OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS)) - -SUBDIRS := $(sort $(dir $(OBJS))) - -$(shell mkdir -p $(SUBDIRS)) - -all: payload rom - @: - -rom: $(ROM) -ifeq ($(COMPARE),1) - @$(SHA1) rom.sha1 -endif - -# For contributors to make sure a change didn't affect the contents of the ROM. -compare: ; @$(MAKE) COMPARE=1 - -clean: tidy - rm -f sound/direct_sound_samples/*.bin - rm -f $(SONG_OBJS) $(MID_OBJS) $(MID_SUBDIR)/*.s - find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} + - make -C payload clean - -tidy: - rm -f $(ROM) $(ELF) $(MAP) - rm -r build/* - make -C payload tidy - -%.s: ; -%.png: ; -%.pal: ; -%.aif: ; - -%.1bpp: %.png ; $(GFX) $< $@ -%.4bpp: %.png ; $(GFX) $< $@ -%.8bpp: %.png ; $(GFX) $< $@ -%.gbapal: %.pal ; $(GFX) $< $@ -%.gbapal: %.png ; $(GFX) $< $@ -%.lz: % ; $(GFX) $< $@ -%.rl: % ; $(GFX) $< $@ - - -ifeq ($(NODEP),1) -$(C_BUILDDIR)/%.o: c_dep := -else -$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include $(C_SUBDIR)/$*.c) -endif - -$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep) - @$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i - @$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s - $(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s - -ifeq ($(NODEP),1) -$(ASM_BUILDDIR)/%.o: asm_dep := -else -$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) $(ASM_SUBDIR)/$*.s) -endif - -$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep) - $(AS) $(ASFLAGS) -o $@ $< - -ifeq ($(NODEP),1) -$(DATA_ASM_BUILDDIR)/%.o: data_dep := -else -$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) $(DATA_ASM_SUBDIR)/$*.s) -endif - -payload: - @$(MAKE) -C payload COMPARE=$(COMPARE) TOOLCHAIN=$(TOOLCHAIN) MODERN=$(MODERN) - -payload/payload.gba: payload - -data/payload.gba.lz: payload/payload.gba - $(GFX) $< $@ -search 1 - -$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep) - $(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@ - -$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s - $(AS) $(ASFLAGS) -I sound -o $@ $< - -$(ELF): ld_script.txt $(OBJS) - cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../ld_script.txt -o ../$@ - -$(ROM): $(ELF) - $(OBJCOPY) -O binary $< $@ - $(FIX) $@ -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent - diff --git a/berry_fix/asm/berry_fix_header.inc b/berry_fix/asm/berry_fix_header.inc deleted file mode 100644 index 5167d2ff03..0000000000 --- a/berry_fix/asm/berry_fix_header.inc +++ /dev/null @@ -1,35 +0,0 @@ - .global BerryFixMBHeaderNintendoLogo -BerryFixMBHeaderNintendoLogo: - .space 156 - -BerryFixMBHeaderGameTitle: - .space 12 - - .global BerryFixMBHeaderGameCode -BerryFixMBHeaderGameCode: - .space 4 - -BerryFixMBHeaderMakerCode: - .space 2 - -BerryFixMBHeaderMagic: - .byte 0 - -BerryFixMBHeaderMainUnitCode: - .byte 0 - -BerryFixMBHeaderDeviceType: - .byte 0 - -BerryFixMBHeaderReserved1: - .space 7 - - .global BerryFixMBHeaderSoftwareVersion -BerryFixMBHeaderSoftwareVersion: - .byte 0 - -BerryFixMBHeaderChecksum: - .byte 0 - -BerryFixMBHeaderReserved2: - .space 2 diff --git a/berry_fix/asm/loader.s b/berry_fix/asm/loader.s deleted file mode 100644 index a780140785..0000000000 --- a/berry_fix/asm/loader.s +++ /dev/null @@ -1,119 +0,0 @@ - .include "../asm/macros/asm.inc" - .include "../asm/macros/function.inc" - .include "../constants/gba_constants.inc" - - .set SIO_ERROR, 0x0040 - .set SIO_MULTI_BUSY, 0x0080 - - .set EWRAM_ORIG, 0x02000000 - .set gCode, 0x02010000 - .set PROG_ORIG, 0x00008000 - - .syntax unified - - .text - - arm_func_start _start -_start: @ 0 - b _entry - arm_func_end _start - - .include "asm/berry_fix_header.inc" - -@ C0 - .word 0 - - .global _GPIOPortData -_GPIOPortData: @ C4 - .2byte 0 - - .global _GPIOPortDirection -_GPIOPortDirection: @ C6 - .2byte 0 - - .global _GPIOPortReadEnable -_GPIOPortReadEnable: @ C8 - .2byte 0 - -@ CA - .2byte 0 - -@ CC - .space 0x34 - - arm_func_start _entry -_entry: @ 100 - b _send - arm_func_end _entry - - .space 0x1C - - arm_func_start _recv -_recv: - @ Waits until link cable is no longer busy. - @ Returns nz if an error has occurred - @ Otherwise, returns the received short in r1. - @ Preserves r0 -_120: - ldrh r1, [r0, 0x8] @ SIOCNT - tst r1, SIO_MULTI_BUSY - beq _120 -_12c: - ldrh r1, [r0, 0x8] @ SIOCNT - tst r1, SIO_MULTI_BUSY - bne _12c - ldrh r1, [r0, 0x8] @ SIOCNT - tst r1, SIO_ERROR - bxne lr - ldrh r1, [r0] @ SIOMULTI0 - bx lr - arm_func_end _recv - - arm_func_start _send -_send: @ 14c - ldr r0, =REG_SIOMULTI0 -_150: - bl _recv - bne _150 - mov r2, #0 - strh r2, [r0, 0xa] @ SIOMLT_SEND - cmp r1, #0 - bne _150 - mov r2, 0x8000 -_16c: - mov r1, #0 -_170: - strh r1, [r0, 0xa] @ SIOMLT_SEND - bl _recv - bne _150 - cmp r1, r2 - bne _16c - lsr r2, #5 - cmp r1, #0 - bne _170 - ldr r3, =BerryFixMBHeaderGameCode - ldrh r2, [r3] - strh r2, [r0, 0xa] @ SIOMLT_SEND - bl _recv -_1a0: - bne _1a0 - cmp r1, r2 - bne _1a0 - ldrh r2, [r3, 0x2] - strh r2, [r0, 0xa] @ SIOMLT_SEND - bl _recv - bne _1a0 - cmp r1, r2 - bne _1a0 - mov r1, #0 - strh r1, [r0, 0xa] @ SIOMLT_SEND - ldr r0, =_data_2f0 - ldr r1, =gCode - swi 0x11 << 16 - ldr lr, =gCode - bx lr - .pool - arm_func_end _send - @ 1f0 - - .align 2, 0 @ don't pad with nop diff --git a/berry_fix/charmap.txt b/berry_fix/charmap.txt deleted file mode 100644 index 1c143ada4f..0000000000 --- a/berry_fix/charmap.txt +++ /dev/null @@ -1,1067 +0,0 @@ -' ' = 00 -'À' = 01 -'Á' = 02 -'Â' = 03 -'Ç' = 04 -'È' = 05 -'É' = 06 -'Ê' = 07 -'Ë' = 08 -'Ì' = 09 -'Î' = 0B -'Ï' = 0C -'Ò' = 0D -'Ó' = 0E -'Ô' = 0F -'Œ' = 10 -'Ù' = 11 -'Ú' = 12 -'Û' = 13 -'Ñ' = 14 -'ß' = 15 -'à' = 16 -'á' = 17 -'ç' = 19 -'è' = 1A -'é' = 1B -'ê' = 1C -'ë' = 1D -'ì' = 1E -'î' = 20 -'ï' = 21 -'ò' = 22 -'ó' = 23 -'ô' = 24 -'œ' = 25 -'ù' = 26 -'ú' = 27 -'û' = 28 -'ñ' = 29 -'º' = 2A -'ª' = 2B -SUPER_ER = 2C -'&' = 2D -'+' = 2E -LV = 34 -'=' = 35 -';' = 36 -'¿' = 51 -'¡' = 52 -PK = 53 -PKMN = 53 54 -POKEBLOCK = 55 56 57 58 59 -'Í' = 5A -'%' = 5B -'(' = 5C -')' = 5D -'â' = 68 -'í' = 6F -UNK_SPACER = 77 -UP_ARROW = 79 -DOWN_ARROW = 7A -LEFT_ARROW = 7B -RIGHT_ARROW = 7C -'0' = A1 -'1' = A2 -'2' = A3 -'3' = A4 -'4' = A5 -'5' = A6 -'6' = A7 -'7' = A8 -'8' = A9 -'9' = AA -'!' = AB -'?' = AC -'.' = AD -'-' = AE -'·' = AF -'…' = B0 -'“' = B1 -'”' = B2 -'‘' = B3 -'’' = B4 -'♂' = B5 -'♀' = B6 -'¥' = B7 -',' = B8 -'×' = B9 -'/' = BA -'A' = BB -'B' = BC -'C' = BD -'D' = BE -'E' = BF -'F' = C0 -'G' = C1 -'H' = C2 -'I' = C3 -'J' = C4 -'K' = C5 -'L' = C6 -'M' = C7 -'N' = C8 -'O' = C9 -'P' = CA -'Q' = CB -'R' = CC -'S' = CD -'T' = CE -'U' = CF -'V' = D0 -'W' = D1 -'X' = D2 -'Y' = D3 -'Z' = D4 -'a' = D5 -'b' = D6 -'c' = D7 -'d' = D8 -'e' = D9 -'f' = DA -'g' = DB -'h' = DC -'i' = DD -'j' = DE -'k' = DF -'l' = E0 -'m' = E1 -'n' = E2 -'o' = E3 -'p' = E4 -'q' = E5 -'r' = E6 -'s' = E7 -'t' = E8 -'u' = E9 -'v' = EA -'w' = EB -'x' = EC -'y' = ED -'z' = EE -'▶' = EF -':' = F0 -'Ä' = F1 -'Ö' = F2 -'Ü' = F3 -'ä' = F4 -'ö' = F5 -'ü' = F6 -TALL_PLUS = FC 0C FB -'$' = FF - -@ Hiragana -'あ' = 01 -'い' = 02 -'う' = 03 -'え' = 04 -'お' = 05 -'か' = 06 -'き' = 07 -'く' = 08 -'け' = 09 -'こ' = 0A -'さ' = 0B -'し' = 0C -'す' = 0D -'せ' = 0E -'そ' = 0F -'た' = 10 -'ち' = 11 -'つ' = 12 -'て' = 13 -'と' = 14 -'な' = 15 -'に' = 16 -'ぬ' = 17 -'ね' = 18 -'の' = 19 -'は' = 1A -'ひ' = 1B -'ふ' = 1C -'へ' = 1D -'ほ' = 1E -'ま' = 1F -'み' = 20 -'む' = 21 -'め' = 22 -'も' = 23 -'や' = 24 -'ゆ' = 25 -'よ' = 26 -'ら' = 27 -'り' = 28 -'る' = 29 -'れ' = 2A -'ろ' = 2B -'わ' = 2C -'を' = 2D -'ん' = 2E -'ぁ' = 2F -'ぃ' = 30 -'ぅ' = 31 -'ぇ' = 32 -'ぉ' = 33 -'ゃ' = 34 -'ゅ' = 35 -'ょ' = 36 -'が' = 37 -'ぎ' = 38 -'ぐ' = 39 -'げ' = 3A -'ご' = 3B -'ざ' = 3C -'じ' = 3D -'ず' = 3E -'ぜ' = 3F -'ぞ' = 40 -'だ' = 41 -'ぢ' = 42 -'づ' = 43 -'で' = 44 -'ど' = 45 -'ば' = 46 -'び' = 47 -'ぶ' = 48 -'べ' = 49 -'ぼ' = 4A -'ぱ' = 4B -'ぴ' = 4C -'ぷ' = 4D -'ぺ' = 4E -'ぽ' = 4F -'っ' = 50 - -@ Katakana -'ア' = 51 -'イ' = 52 -'ウ' = 53 -'エ' = 54 -'オ' = 55 -'カ' = 56 -'キ' = 57 -'ク' = 58 -'ケ' = 59 -'コ' = 5A -'サ' = 5B -'シ' = 5C -'ス' = 5D -'セ' = 5E -'ソ' = 5F -'タ' = 60 -'チ' = 61 -'ツ' = 62 -'テ' = 63 -'ト' = 64 -'ナ' = 65 -'ニ' = 66 -'ヌ' = 67 -'ネ' = 68 -'ノ' = 69 -'ハ' = 6A -'ヒ' = 6B -'フ' = 6C -'ヘ' = 6D -'ホ' = 6E -'マ' = 6F -'ミ' = 70 -'ム' = 71 -'メ' = 72 -'モ' = 73 -'ヤ' = 74 -'ユ' = 75 -'ヨ' = 76 -'ラ' = 77 -'リ' = 78 -'ル' = 79 -'レ' = 7A -'ロ' = 7B -'ワ' = 7C -'ヲ' = 7D -'ン' = 7E -'ァ' = 7F -'ィ' = 80 -'ゥ' = 81 -'ェ' = 82 -'ォ' = 83 -'ャ' = 84 -'ュ' = 85 -'ョ' = 86 -'ガ' = 87 -'ギ' = 88 -'グ' = 89 -'ゲ' = 8A -'ゴ' = 8B -'ザ' = 8C -'ジ' = 8D -'ズ' = 8E -'ゼ' = 8F -'ゾ' = 90 -'ダ' = 91 -'ヂ' = 92 -'ヅ' = 93 -'デ' = 94 -'ド' = 95 -'バ' = 96 -'ビ' = 97 -'ブ' = 98 -'ベ' = 99 -'ボ' = 9A -'パ' = 9B -'ピ' = 9C -'プ' = 9D -'ペ' = 9E -'ポ' = 9F -'ッ' = A0 - -@ Japanese punctuation -' ' = 00 -'!' = AB -'?' = AC -'。' = AD -'ー' = AE -'⋯' = B0 - -STRING = FD - -@ string placeholders -PLAYER = FD 01 -STR_VAR_1 = FD 02 -STR_VAR_2 = FD 03 -STR_VAR_3 = FD 04 -KUN = FD 05 -RIVAL = FD 06 -@ version-dependent strings (originally made for Ruby/Sapphire differences) -@ Emerald uses the Sapphire strings (except for VERSION). -VERSION = FD 07 @ "EMERALD" -AQUA = FD 08 -MAGMA = FD 09 -ARCHIE = FD 0A -MAXIE = FD 0B -KYOGRE = FD 0C -GROUDON = FD 0D - -@ battle string placeholders - -B_BUFF1 = FD 00 -B_BUFF2 = FD 01 -B_COPY_VAR_1 = FD 02 -B_COPY_VAR_2 = FD 03 -B_COPY_VAR_3 = FD 04 -B_PLAYER_MON1_NAME = FD 05 -B_OPPONENT_MON1_NAME = FD 06 -B_PLAYER_MON2_NAME = FD 07 -B_OPPONENT_MON2_NAME = FD 08 -B_LINK_PLAYER_MON1_NAME = FD 09 -B_LINK_OPPONENT_MON1_NAME = FD 0A -B_LINK_PLAYER_MON2_NAME = FD 0B -B_LINK_OPPONENT_MON2_NAME = FD 0C -B_ATK_NAME_WITH_PREFIX_MON1 = FD 0D -B_ATK_PARTNER_NAME = FD 0E -B_ATK_NAME_WITH_PREFIX = FD 0F -B_DEF_NAME_WITH_PREFIX = FD 10 -B_EFF_NAME_WITH_PREFIX = FD 11 @ EFF = short for gEffectBattler -B_ACTIVE_NAME_WITH_PREFIX = FD 12 -B_SCR_ACTIVE_NAME_WITH_PREFIX = FD 13 -B_CURRENT_MOVE = FD 14 -B_LAST_MOVE = FD 15 -B_LAST_ITEM = FD 16 -B_LAST_ABILITY = FD 17 -B_ATK_ABILITY = FD 18 -B_DEF_ABILITY = FD 19 -B_SCR_ACTIVE_ABILITY = FD 1A -B_EFF_ABILITY = FD 1B -B_TRAINER1_CLASS = FD 1C -B_TRAINER1_NAME = FD 1D -B_LINK_PLAYER_NAME = FD 1E -B_LINK_PARTNER_NAME = FD 1F -B_LINK_OPPONENT1_NAME = FD 20 -B_LINK_OPPONENT2_NAME = FD 21 -B_LINK_SCR_TRAINER_NAME = FD 22 -B_PLAYER_NAME = FD 23 -B_TRAINER1_LOSE_TEXT = FD 24 -B_TRAINER1_WIN_TEXT = FD 25 -B_26 = FD 26 -B_PC_CREATOR_NAME = FD 27 -B_ATK_PREFIX1 = FD 28 -B_DEF_PREFIX1 = FD 29 -B_ATK_PREFIX2 = FD 2A -B_DEF_PREFIX2 = FD 2B -B_ATK_PREFIX3 = FD 2C -B_DEF_PREFIX3 = FD 2D -B_TRAINER2_CLASS = FD 2E -B_TRAINER2_NAME = FD 2F -B_TRAINER2_LOSE_TEXT = FD 30 -B_TRAINER2_WIN_TEXT = FD 31 -B_PARTNER_CLASS = FD 32 -B_PARTNER_NAME = FD 33 -B_BUFF3 = FD 34 - -@ indicates the end of a town/city name (before " TOWN" or " CITY") -NAME_END = FC 00 - -@ special 0xF7 character -SPECIAL_F7 = F7 - -@ more text functions - -COLOR = FC 01 @ use a color listed below right after -HIGHLIGHT = FC 02 @ same as fc 01 -SHADOW = FC 03 @ same as fc 01 -COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes -PALETTE = FC 05 @ used in credits -SIZE = FC 06 @ note that anything other than "SMALL" is invalid -UNKNOWN_7 = FC 07 -PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them -PAUSE_UNTIL_PRESS = FC 09 -WAIT_SE = FC 0A -PLAY_BGM = FC 0B -ESCAPE = FC 0C -SHIFT_TEXT = FC 0D -UNKNOWN_E = FC 0E -UNKNOWN_F = FC 0F -PLAY_SE = FC 10 -CLEAR = FC 11 -SKIP = FC 12 -CLEAR_TO = FC 13 -UNKNOWN_14 = FC 14 -JPN = FC 15 -ENG = FC 16 -PAUSE_MUSIC = FC 17 -RESUME_MUSIC = FC 18 - -@ colors - -TRANSPARENT = 00 -WHITE = 01 -DARK_GRAY = 02 -LIGHT_GRAY = 03 -RED = 04 -LIGHT_RED = 05 -GREEN = 06 -LIGHT_GREEN = 07 -BLUE = 08 -LIGHT_BLUE = 09 -@ these next colors can be set to anything arbitrary at runtime -@ usually though they'll have the textbox border colors as described below -DYNAMIC_COLOR1 = 0A @ white -DYNAMIC_COLOR2 = 0B @ white with a tinge of green -DYNAMIC_COLOR3 = 0C @ white 2 -DYNAMIC_COLOR4 = 0D @ aquamarine -DYNAMIC_COLOR5 = 0E @ blue-green -DYNAMIC_COLOR6 = 0F @ cerulean - -@ sound and music - -MUS_DUMMY = 00 00 -SE_USE_ITEM = 01 00 -SE_PC_LOGIN = 02 00 -SE_PC_OFF = 03 00 -SE_PC_ON = 04 00 -SE_SELECT = 05 00 -SE_WIN_OPEN = 06 00 -SE_WALL_HIT = 07 00 -SE_DOOR = 08 00 -SE_EXIT = 09 00 -SE_LEDGE = 0A 00 -SE_BIKE_BELL = 0B 00 -SE_NOT_EFFECTIVE = 0C 00 -SE_EFFECTIVE = 0D 00 -SE_SUPER_EFFECTIVE = 0E 00 -SE_BALL_OPEN = 0F 00 -SE_FAINT = 10 00 -SE_FLEE = 11 00 -SE_SLIDING_DOOR = 12 00 -SE_SHIP = 13 00 -SE_BANG = 14 00 -SE_PIN = 15 00 -SE_BOO = 16 00 -SE_BALL = 17 00 -SE_CONTEST_PLACE = 18 00 -SE_A = 19 00 -SE_I = 1A 00 -SE_U = 1B 00 -SE_E = 1C 00 -SE_O = 1D 00 -SE_N = 1E 00 -SE_SUCCESS = 1F 00 -SE_FAILURE = 20 00 -SE_EXP = 21 00 -SE_BIKE_HOP = 22 00 -SE_SWITCH = 23 00 -SE_CLICK = 24 00 -SE_FU_ZAKU = 25 00 -SE_CONTEST_CONDITION_LOSE = 26 00 -SE_LAVARIDGE_FALL_WARP = 27 00 -SE_ICE_STAIRS = 28 00 -SE_ICE_BREAK = 29 00 -SE_ICE_CRACK = 2A 00 -SE_FALL = 2B 00 -SE_UNLOCK = 2C 00 -SE_WARP_IN = 2D 00 -SE_WARP_OUT = 2E 00 -SE_REPEL = 2F 00 -SE_ROTATING_GATE = 30 00 -SE_TRUCK_MOVE = 31 00 -SE_TRUCK_STOP = 32 00 -SE_TRUCK_UNLOAD = 33 00 -SE_TRUCK_DOOR = 34 00 -SE_BERRY_BLENDER = 35 00 -SE_CARD = 36 00 -SE_SAVE = 37 00 -SE_BALL_BOUNCE_1 = 38 00 -SE_BALL_BOUNCE_2 = 39 00 -SE_BALL_BOUNCE_3 = 3A 00 -SE_BALL_BOUNCE_4 = 3B 00 -SE_BALL_TRADE = 3C 00 -SE_BALL_THROW = 3D 00 -SE_NOTE_C = 3E 00 -SE_NOTE_D = 3F 00 -SE_NOTE_E = 40 00 -SE_NOTE_F = 41 00 -SE_NOTE_G = 42 00 -SE_NOTE_A = 43 00 -SE_NOTE_B = 44 00 -SE_NOTE_C_HIGH = 45 00 -SE_PUDDLE = 46 00 -SE_BRIDGE_WALK = 47 00 -SE_ITEMFINDER = 48 00 -SE_DING_DONG = 49 00 -SE_BALLOON_RED = 4A 00 -SE_BALLOON_BLUE = 4B 00 -SE_BALLOON_YELLOW = 4C 00 -SE_BREAKABLE_DOOR = 4D 00 -SE_MUD_BALL = 4E 00 -SE_FIELD_POISON = 4F 00 -SE_ESCALATOR = 50 00 -SE_THUNDERSTORM = 51 00 -SE_THUNDERSTORM_STOP = 52 00 -SE_DOWNPOUR = 53 00 -SE_DOWNPOUR_STOP = 54 00 -SE_RAIN = 55 00 -SE_RAIN_STOP = 56 00 -SE_THUNDER = 57 00 -SE_THUNDER2 = 58 00 -SE_ELEVATOR = 59 00 -SE_LOW_HEALTH = 5A 00 -SE_EXP_MAX = 5B 00 -SE_ROULETTE_BALL = 5C 00 -SE_ROULETTE_BALL2 = 5D 00 -SE_TAILLOW_WING_FLAP = 5E 00 -SE_SHOP = 5F 00 -SE_CONTEST_HEART = 60 00 -SE_CONTEST_CURTAIN_RISE = 61 00 -SE_CONTEST_CURTAIN_FALL = 62 00 -SE_CONTEST_ICON_CHANGE = 63 00 -SE_CONTEST_ICON_CLEAR = 64 00 -SE_CONTEST_MONS_TURN = 65 00 -SE_SHINY = 66 00 -SE_INTRO_BLAST = 67 00 -SE_MUGSHOT = 68 00 -SE_APPLAUSE = 69 00 -SE_VEND = 6A 00 -SE_ORB = 6B 00 -SE_DEX_SCROLL = 6C 00 -SE_DEX_PAGE = 6D 00 -SE_POKENAV_ON = 6E 00 -SE_POKENAV_OFF = 6F 00 -SE_DEX_SEARCH = 70 00 -SE_EGG_HATCH = 71 00 -SE_BALL_TRAY_ENTER = 72 00 -SE_BALL_TRAY_BALL = 73 00 -SE_BALL_TRAY_EXIT = 74 00 -SE_GLASS_FLUTE = 75 00 -SE_M_THUNDERBOLT = 76 00 -SE_M_THUNDERBOLT2 = 77 00 -SE_M_HARDEN = 78 00 -SE_M_NIGHTMARE = 79 00 -SE_M_VITAL_THROW = 7A 00 -SE_M_VITAL_THROW2 = 7B 00 -SE_M_BUBBLE = 7C 00 -SE_M_BUBBLE2 = 7D 00 -SE_M_BUBBLE3 = 7E 00 -SE_M_RAIN_DANCE = 7F 00 -SE_M_CUT = 80 00 -SE_M_STRING_SHOT = 81 00 -SE_M_STRING_SHOT2 = 82 00 -SE_M_ROCK_THROW = 83 00 -SE_M_GUST = 84 00 -SE_M_GUST2 = 85 00 -SE_M_DOUBLE_SLAP = 86 00 -SE_M_DOUBLE_TEAM = 87 00 -SE_M_RAZOR_WIND = 88 00 -SE_M_ICY_WIND = 89 00 -SE_M_THUNDER_WAVE = 8A 00 -SE_M_COMET_PUNCH = 8B 00 -SE_M_MEGA_KICK = 8C 00 -SE_M_MEGA_KICK2 = 8D 00 -SE_M_CRABHAMMER = 8E 00 -SE_M_JUMP_KICK = 8F 00 -SE_M_FLAME_WHEEL = 90 00 -SE_M_FLAME_WHEEL2 = 91 00 -SE_M_FLAMETHROWER = 92 00 -SE_M_FIRE_PUNCH = 93 00 -SE_M_TOXIC = 94 00 -SE_M_SACRED_FIRE = 95 00 -SE_M_SACRED_FIRE2 = 96 00 -SE_M_EMBER = 97 00 -SE_M_TAKE_DOWN = 98 00 -SE_M_BLIZZARD = 99 00 -SE_M_BLIZZARD2 = 9A 00 -SE_M_SCRATCH = 9B 00 -SE_M_VICEGRIP = 9C 00 -SE_M_WING_ATTACK = 9D 00 -SE_M_FLY = 9E 00 -SE_M_SAND_ATTACK = 9F 00 -SE_M_RAZOR_WIND2 = A0 00 -SE_M_BITE = A1 00 -SE_M_HEADBUTT = A2 00 -SE_M_SURF = A3 00 -SE_M_HYDRO_PUMP = A4 00 -SE_M_WHIRLPOOL = A5 00 -SE_M_HORN_ATTACK = A6 00 -SE_M_TAIL_WHIP = A7 00 -SE_M_MIST = A8 00 -SE_M_POISON_POWDER = A9 00 -SE_M_BIND = AA 00 -SE_M_DRAGON_RAGE = AB 00 -SE_M_SING = AC 00 -SE_M_PERISH_SONG = AD 00 -SE_M_PAY_DAY = AE 00 -SE_M_DIG = AF 00 -SE_M_DIZZY_PUNCH = B0 00 -SE_M_SELF_DESTRUCT = B1 00 -SE_M_EXPLOSION = B2 00 -SE_M_ABSORB_2 = B3 00 -SE_M_ABSORB = B4 00 -SE_M_SCREECH = B5 00 -SE_M_BUBBLE_BEAM = B6 00 -SE_M_BUBBLE_BEAM2 = B7 00 -SE_M_SUPERSONIC = B8 00 -SE_M_BELLY_DRUM = B9 00 -SE_M_METRONOME = BA 00 -SE_M_BONEMERANG = BB 00 -SE_M_LICK = BC 00 -SE_M_PSYBEAM = BD 00 -SE_M_FAINT_ATTACK = BE 00 -SE_M_SWORDS_DANCE = BF 00 -SE_M_LEER = C0 00 -SE_M_SWAGGER = C1 00 -SE_M_SWAGGER2 = C2 00 -SE_M_HEAL_BELL = C3 00 -SE_M_CONFUSE_RAY = C4 00 -SE_M_SNORE = C5 00 -SE_M_BRICK_BREAK = C6 00 -SE_M_GIGA_DRAIN = C7 00 -SE_M_PSYBEAM2 = C8 00 -SE_M_SOLAR_BEAM = C9 00 -SE_M_PETAL_DANCE = CA 00 -SE_M_TELEPORT = CB 00 -SE_M_MINIMIZE = CC 00 -SE_M_SKETCH = CD 00 -SE_M_SWIFT = CE 00 -SE_M_REFLECT = CF 00 -SE_M_BARRIER = D0 00 -SE_M_DETECT = D1 00 -SE_M_LOCK_ON = D2 00 -SE_M_MOONLIGHT = D3 00 -SE_M_CHARM = D4 00 -SE_M_CHARGE = D5 00 -SE_M_STRENGTH = D6 00 -SE_M_HYPER_BEAM = D7 00 -SE_M_WATERFALL = D8 00 -SE_M_REVERSAL = D9 00 -SE_M_ACID_ARMOR = DA 00 -SE_M_SANDSTORM = DB 00 -SE_M_TRI_ATTACK = DC 00 -SE_M_TRI_ATTACK2 = DD 00 -SE_M_ENCORE = DE 00 -SE_M_ENCORE2 = DF 00 -SE_M_BATON_PASS = E0 00 -SE_M_MILK_DRINK = E1 00 -SE_M_ATTRACT = E2 00 -SE_M_ATTRACT2 = E3 00 -SE_M_MORNING_SUN = E4 00 -SE_M_FLATTER = E5 00 -SE_M_SAND_TOMB = E6 00 -SE_M_GRASSWHISTLE = E7 00 -SE_M_SPIT_UP = E8 00 -SE_M_DIVE = E9 00 -SE_M_EARTHQUAKE = EA 00 -SE_M_TWISTER = EB 00 -SE_M_SWEET_SCENT = EC 00 -SE_M_YAWN = ED 00 -SE_M_SKY_UPPERCUT = EE 00 -SE_M_STAT_INCREASE = EF 00 -SE_M_HEAT_WAVE = F0 00 -SE_M_UPROAR = F1 00 -SE_M_HAIL = F2 00 -SE_M_COSMIC_POWER = F3 00 -SE_M_TEETER_DANCE = F4 00 -SE_M_STAT_DECREASE = F5 00 -SE_M_HAZE = F6 00 -SE_M_HYPER_BEAM2 = F7 00 -SE_RG_DOOR = F8 00 -SE_RG_CARD_FLIP = F9 00 -SE_RG_CARD_FLIPPING = FA 00 -SE_RG_CARD_OPEN = FB 00 -SE_RG_BAG_CURSOR = FC 00 -SE_RG_BAG_POCKET = FD 00 -SE_RG_BALL_CLICK = FE 00 -SE_RG_SHOP = FF 00 -SE_RG_SS_ANNE_HORN = 00 01 -SE_RG_HELP_OPEN = 01 01 -SE_RG_HELP_CLOSE = 02 01 -SE_RG_HELP_ERROR = 03 01 -SE_RG_DEOXYS_MOVE = 04 01 -SE_RG_POKE_JUMP_SUCCESS = 05 01 -SE_RG_POKE_JUMP_FAILURE = 06 01 -SE_POKENAV_CALL = 07 01 -SE_POKENAV_HANG_UP = 08 01 -SE_ARENA_TIMEUP1 = 09 01 -SE_ARENA_TIMEUP2 = 0A 01 -SE_PIKE_CURTAIN_CLOSE = 0B 01 -SE_PIKE_CURTAIN_OPEN = 0C 01 -SE_SUDOWOODO_SHAKE = 0D 01 -MUS_LITTLEROOT_TEST = 5E 01 -MUS_GSC_ROUTE38 = 5F 01 -MUS_CAUGHT = 60 01 -MUS_VICTORY_WILD = 61 01 -MUS_VICTORY_GYM_LEADER = 62 01 -MUS_VICTORY_LEAGUE = 63 01 -MUS_C_COMM_CENTER = 64 01 -MUS_GSC_PEWTER = 65 01 -MUS_C_VS_LEGEND_BEAST = 66 01 -MUS_ROUTE101 = 67 01 -MUS_ROUTE110 = 68 01 -MUS_ROUTE120 = 69 01 -MUS_PETALBURG = 6A 01 -MUS_OLDALE = 6B 01 -MUS_GYM = 6C 01 -MUS_SURF = 6D 01 -MUS_PETALBURG_WOODS = 6E 01 -MUS_LEVEL_UP = 6F 01 -MUS_HEAL = 70 01 -MUS_OBTAIN_BADGE = 71 01 -MUS_OBTAIN_ITEM = 72 01 -MUS_EVOLVED = 73 01 -MUS_OBTAIN_TMHM = 74 01 -MUS_LILYCOVE_MUSEUM = 75 01 -MUS_ROUTE122 = 76 01 -MUS_OCEANIC_MUSEUM = 77 01 -MUS_EVOLUTION_INTRO = 78 01 -MUS_EVOLUTION = 79 01 -MUS_MOVE_DELETED = 7A 01 -MUS_ENCOUNTER_GIRL = 7B 01 -MUS_ENCOUNTER_MALE = 7C 01 -MUS_ABANDONED_SHIP = 7D 01 -MUS_FORTREE = 7E 01 -MUS_BIRCH_LAB = 7F 01 -MUS_B_TOWER_RS = 80 01 -MUS_ENCOUNTER_SWIMMER = 81 01 -MUS_CAVE_OF_ORIGIN = 82 01 -MUS_OBTAIN_BERRY = 83 01 -MUS_AWAKEN_LEGEND = 84 01 -MUS_SLOTS_JACKPOT = 85 01 -MUS_SLOTS_WIN = 86 01 -MUS_TOO_BAD = 87 01 -MUS_ROULETTE = 88 01 -MUS_LINK_CONTEST_P1 = 89 01 -MUS_LINK_CONTEST_P2 = 8A 01 -MUS_LINK_CONTEST_P3 = 8B 01 -MUS_LINK_CONTEST_P4 = 8C 01 -MUS_ENCOUNTER_RICH = 8D 01 -MUS_VERDANTURF = 8E 01 -MUS_RUSTBORO = 8F 01 -MUS_POKE_CENTER = 90 01 -MUS_ROUTE104 = 91 01 -MUS_ROUTE119 = 92 01 -MUS_CYCLING = 93 01 -MUS_POKE_MART = 94 01 -MUS_LITTLEROOT = 95 01 -MUS_MT_CHIMNEY = 96 01 -MUS_ENCOUNTER_FEMALE = 97 01 -MUS_LILYCOVE = 98 01 -MUS_ROUTE111 = 99 01 -MUS_HELP = 9A 01 -MUS_UNDERWATER = 9B 01 -MUS_VICTORY_TRAINER = 9C 01 -MUS_TITLE = 9D 01 -MUS_INTRO = 9E 01 -MUS_ENCOUNTER_MAY = 9F 01 -MUS_ENCOUNTER_INTENSE = A0 01 -MUS_ENCOUNTER_COOL = A1 01 -MUS_ROUTE113 = A2 01 -MUS_ENCOUNTER_AQUA = A3 01 -MUS_FOLLOW_ME = A4 01 -MUS_ENCOUNTER_BRENDAN = A5 01 -MUS_EVER_GRANDE = A6 01 -MUS_ENCOUNTER_SUSPICIOUS = A7 01 -MUS_VICTORY_AQUA_MAGMA = A8 01 -MUS_CABLE_CAR = A9 01 -MUS_GAME_CORNER = AA 01 -MUS_DEWFORD = AB 01 -MUS_SAFARI_ZONE = AC 01 -MUS_VICTORY_ROAD = AD 01 -MUS_AQUA_MAGMA_HIDEOUT = AE 01 -MUS_SAILING = AF 01 -MUS_MT_PYRE = B0 01 -MUS_SLATEPORT = B1 01 -MUS_MT_PYRE_EXTERIOR = B2 01 -MUS_SCHOOL = B3 01 -MUS_HALL_OF_FAME = B4 01 -MUS_FALLARBOR = B5 01 -MUS_SEALED_CHAMBER = B6 01 -MUS_CONTEST_WINNER = B7 01 -MUS_CONTEST = B8 01 -MUS_ENCOUNTER_MAGMA = B9 01 -MUS_INTRO_BATTLE = BA 01 -MUS_ABNORMAL_WEATHER = BB 01 -MUS_WEATHER_GROUDON = BC 01 -MUS_SOOTOPOLIS = BD 01 -MUS_CONTEST_RESULTS = BE 01 -MUS_HALL_OF_FAME_ROOM = BF 01 -MUS_TRICK_HOUSE = C0 01 -MUS_ENCOUNTER_TWINS = C1 01 -MUS_ENCOUNTER_ELITE_FOUR = C2 01 -MUS_ENCOUNTER_HIKER = C3 01 -MUS_CONTEST_LOBBY = C4 01 -MUS_ENCOUNTER_INTERVIEWER = C5 01 -MUS_ENCOUNTER_CHAMPION = C6 01 -MUS_CREDITS = C7 01 -MUS_END = C8 01 -MUS_B_FRONTIER = C9 01 -MUS_B_ARENA = CA 01 -MUS_OBTAIN_B_POINTS = CB 01 -MUS_REGISTER_MATCH_CALL = CC 01 -MUS_B_PYRAMID = CD 01 -MUS_B_PYRAMID_TOP = CE 01 -MUS_B_PALACE = CF 01 -MUS_RAYQUAZA_APPEARS = D0 01 -MUS_B_TOWER = D1 01 -MUS_OBTAIN_SYMBOL = D2 01 -MUS_B_DOME = D3 01 -MUS_B_PIKE = D4 01 -MUS_B_FACTORY = D5 01 -MUS_VS_RAYQUAZA = D6 01 -MUS_VS_FRONTIER_BRAIN = D7 01 -MUS_VS_MEW = D8 01 -MUS_B_DOME_LOBBY = D9 01 -MUS_VS_WILD = DA 01 -MUS_VS_AQUA_MAGMA = DB 01 -MUS_VS_TRAINER = DC 01 -MUS_VS_GYM_LEADER = DD 01 -MUS_VS_CHAMPION = DE 01 -MUS_VS_REGI = DF 01 -MUS_VS_KYOGRE_GROUDON = E0 01 -MUS_VS_RIVAL = E1 01 -MUS_VS_ELITE_FOUR = E2 01 -MUS_VS_AQUA_MAGMA_LEADER = E3 01 -MUS_RG_FOLLOW_ME = E4 01 -MUS_RG_GAME_CORNER = E5 01 -MUS_RG_ROCKET_HIDEOUT = E6 01 -MUS_RG_GYM = E7 01 -MUS_RG_JIGGLYPUFF = E8 01 -MUS_RG_INTRO_FIGHT = E9 01 -MUS_RG_TITLE = EA 01 -MUS_RG_CINNABAR = EB 01 -MUS_RG_LAVENDER = EC 01 -MUS_RG_HEAL = ED 01 -MUS_RG_CYCLING = EE 01 -MUS_RG_ENCOUNTER_ROCKET = EF 01 -MUS_RG_ENCOUNTER_GIRL = F0 01 -MUS_RG_ENCOUNTER_BOY = F1 01 -MUS_RG_HALL_OF_FAME = F2 01 -MUS_RG_VIRIDIAN_FOREST = F3 01 -MUS_RG_MT_MOON = F4 01 -MUS_RG_POKE_MANSION = F5 01 -MUS_RG_CREDITS = F6 01 -MUS_RG_ROUTE1 = F7 01 -MUS_RG_ROUTE24 = F8 01 -MUS_RG_ROUTE3 = F9 01 -MUS_RG_ROUTE11 = FA 01 -MUS_RG_VICTORY_ROAD = FB 01 -MUS_RG_VS_GYM_LEADER = FC 01 -MUS_RG_VS_TRAINER = FD 01 -MUS_RG_VS_WILD = FE 01 -MUS_RG_VS_CHAMPION = FF 01 -MUS_RG_PALLET = 00 02 -MUS_RG_OAK_LAB = 01 02 -MUS_RG_OAK = 02 02 -MUS_RG_POKE_CENTER = 03 02 -MUS_RG_SS_ANNE = 04 02 -MUS_RG_SURF = 05 02 -MUS_RG_POKE_TOWER = 06 02 -MUS_RG_SILPH = 07 02 -MUS_RG_FUCHSIA = 08 02 -MUS_RG_CELADON = 09 02 -MUS_RG_VICTORY_TRAINER = 0A 02 -MUS_RG_VICTORY_WILD = 0B 02 -MUS_RG_VICTORY_GYM_LEADER = 0C 02 -MUS_RG_VERMILLION = 0D 02 -MUS_RG_PEWTER = 0E 02 -MUS_RG_ENCOUNTER_RIVAL = 0F 02 -MUS_RG_RIVAL_EXIT = 10 02 -MUS_RG_DEX_RATING = 11 02 -MUS_RG_OBTAIN_KEY_ITEM = 12 02 -MUS_RG_CAUGHT_INTRO = 13 02 -MUS_RG_PHOTO = 14 02 -MUS_RG_GAME_FREAK = 15 02 -MUS_RG_CAUGHT = 16 02 -MUS_RG_NEW_GAME_INSTRUCT = 17 02 -MUS_RG_NEW_GAME_INTRO = 18 02 -MUS_RG_NEW_GAME_EXIT = 19 02 -MUS_RG_POKE_JUMP = 1A 02 -MUS_RG_UNION_ROOM = 1B 02 -MUS_RG_NET_CENTER = 1C 02 -MUS_RG_MYSTERY_GIFT = 1D 02 -MUS_RG_BERRY_PICK = 1E 02 -MUS_RG_SEVII_CAVE = 1F 02 -MUS_RG_TEACHY_TV_SHOW = 20 02 -MUS_RG_SEVII_ROUTE = 21 02 -MUS_RG_SEVII_DUNGEON = 22 02 -MUS_RG_SEVII_123 = 23 02 -MUS_RG_SEVII_45 = 24 02 -MUS_RG_SEVII_67 = 25 02 -MUS_RG_POKE_FLUTE = 26 02 -MUS_RG_VS_DEOXYS = 27 02 -MUS_RG_VS_MEWTWO = 28 02 -MUS_RG_VS_LEGEND = 29 02 -MUS_RG_ENCOUNTER_GYM_LEADER = 2A 02 -MUS_RG_ENCOUNTER_DEOXYS = 2B 02 -MUS_RG_TRAINER_TOWER = 2C 02 -MUS_RG_SLOW_PALLET = 2D 02 -MUS_RG_TEACHY_TV_MENU = 2E 02 -PH_TRAP_BLEND = 2F 02 -PH_TRAP_HELD = 30 02 -PH_TRAP_SOLO = 31 02 -PH_FACE_BLEND = 32 02 -PH_FACE_HELD = 33 02 -PH_FACE_SOLO = 34 02 -PH_CLOTH_BLEND = 35 02 -PH_CLOTH_HELD = 36 02 -PH_CLOTH_SOLO = 37 02 -PH_DRESS_BLEND = 38 02 -PH_DRESS_HELD = 39 02 -PH_DRESS_SOLO = 3A 02 -PH_FLEECE_BLEND = 3B 02 -PH_FLEECE_HELD = 3C 02 -PH_FLEECE_SOLO = 3D 02 -PH_KIT_BLEND = 3E 02 -PH_KIT_HELD = 3F 02 -PH_KIT_SOLO = 40 02 -PH_PRICE_BLEND = 41 02 -PH_PRICE_HELD = 42 02 -PH_PRICE_SOLO = 43 02 -PH_LOT_BLEND = 44 02 -PH_LOT_HELD = 45 02 -PH_LOT_SOLO = 46 02 -PH_GOAT_BLEND = 47 02 -PH_GOAT_HELD = 48 02 -PH_GOAT_SOLO = 49 02 -PH_THOUGHT_BLEND = 4A 02 -PH_THOUGHT_HELD = 4B 02 -PH_THOUGHT_SOLO = 4C 02 -PH_CHOICE_BLEND = 4D 02 -PH_CHOICE_HELD = 4E 02 -PH_CHOICE_SOLO = 4F 02 -PH_MOUTH_BLEND = 50 02 -PH_MOUTH_HELD = 51 02 -PH_MOUTH_SOLO = 52 02 -PH_FOOT_BLEND = 53 02 -PH_FOOT_HELD = 54 02 -PH_FOOT_SOLO = 55 02 -PH_GOOSE_BLEND = 56 02 -PH_GOOSE_HELD = 57 02 -PH_GOOSE_SOLO = 58 02 -PH_STRUT_BLEND = 59 02 -PH_STRUT_HELD = 5A 02 -PH_STRUT_SOLO = 5B 02 -PH_CURE_BLEND = 5C 02 -PH_CURE_HELD = 5D 02 -PH_CURE_SOLO = 5E 02 -PH_NURSE_BLEND = 5F 02 -PH_NURSE_HELD = 60 02 -PH_NURSE_SOLO = 61 02 - -A_BUTTON = F8 00 -B_BUTTON = F8 01 -DPAD_UPDOWN = F8 0A -DPAD_NONE = F8 0C - -UP_ARROW_2 = F9 00 -DOWN_ARROW_2 = F9 01 -LEFT_ARROW_2 = F9 02 -RIGHT_ARROW_2 = F9 03 -PLUS = F9 04 -LV_2 = F9 05 -PP = F9 06 -ID = F9 07 -NO = F9 08 -UNDERSCORE = F9 09 -CIRCLE_1 = F9 0A -CIRCLE_2 = F9 0B -CIRCLE_3 = F9 0C -CIRCLE_4 = F9 0D -CIRCLE_5 = F9 0E -CIRCLE_6 = F9 0F -CIRCLE_7 = F9 10 -CIRCLE_8 = F9 11 -CIRCLE_9 = F9 12 -ROUND_LEFT_PAREN = F9 13 -ROUND_RIGHT_PAREN = F9 14 -CIRCLE_DOT = F9 15 -TRIANGLE = F9 16 -BIG_MULT_X = F9 17 - -EMOJI_UNDERSCORE = F9 D0 -EMOJI_PIPE = F9 D1 -EMOJI_HIGHBAR = F9 D2 -EMOJI_TILDE = F9 D3 -EMOJI_LEFT_PAREN = F9 D4 -EMOJI_RIGHT_PAREN = F9 D5 -EMOJI_UNION = F9 D6 @ ⊂ -EMOJI_GREATER_THAN = F9 D7 -EMOJI_LEFT_EYE = F9 D8 -EMOJI_RIGHT_EYE = F9 D9 -EMOJI_AT = F9 DA -EMOJI_SEMICOLON = F9 DB -EMOJI_PLUS = F9 DC -EMOJI_MINUS = F9 DD -EMOJI_EQUALS = F9 DE -EMOJI_SPIRAL = F9 DF -EMOJI_TONGUE = F9 E0 -EMOJI_TRIANGLE_OUTLINE = F9 E1 -EMOJI_ACUTE = F9 E2 -EMOJI_GRAVE = F9 E3 -EMOJI_CIRCLE = F9 E4 -EMOJI_TRIANGLE = F9 E5 -EMOJI_SQUARE = F9 E6 -EMOJI_HEART = F9 E7 -EMOJI_MOON = F9 E8 -EMOJI_NOTE = F9 E9 -EMOJI_BALL = F9 EA -EMOJI_BOLT = F9 EB -EMOJI_LEAF = F9 EC -EMOJI_FIRE = F9 ED -EMOJI_WATER = F9 EE -EMOJI_LEFT_FIST = F9 EF -EMOJI_RIGHT_FIST = F9 F0 -EMOJI_BIGWHEEL = F9 F1 -EMOJI_SMALLWHEEL = F9 F2 -EMOJI_SPHERE = F9 F3 -EMOJI_IRRITATED = F9 F4 -EMOJI_MISCHIEVOUS = F9 F5 -EMOJI_HAPPY = F9 F6 -EMOJI_ANGRY = F9 F7 -EMOJI_SURPRISED = F9 F8 -EMOJI_BIGSMILE = F9 F9 -EMOJI_EVIL = F9 FA -EMOJI_TIRED = F9 FB -EMOJI_NEUTRAL = F9 FC -EMOJI_SHOCKED = F9 FD -EMOJI_BIGANGER = F9 FE - -'\l' = FA @ scroll up window text -'\p' = FB @ new paragraph -'\n' = FE @ new line diff --git a/berry_fix/data/data.s b/berry_fix/data/data.s deleted file mode 100644 index dbb86b13ba..0000000000 --- a/berry_fix/data/data.s +++ /dev/null @@ -1,4 +0,0 @@ - .section .rodata - -_data_2f0:: - .incbin "data/payload.gba.lz" diff --git a/berry_fix/ld_script.sed b/berry_fix/ld_script.sed deleted file mode 100644 index b91542b6f8..0000000000 --- a/berry_fix/ld_script.sed +++ /dev/null @@ -1,14 +0,0 @@ -// { - r sym_ewram.ld - d -} - -// { - r sym_bss.ld - d -} - -// { - r sym_common.ld - d -} diff --git a/berry_fix/ld_script.txt b/berry_fix/ld_script.txt deleted file mode 100644 index 2edeaef7cb..0000000000 --- a/berry_fix/ld_script.txt +++ /dev/null @@ -1,31 +0,0 @@ -ENTRY(_start) - -SECTIONS { - . = 0x2000000; - - .text : - ALIGN(4) - { - asm/loader.o(.text); - } =0 - - . += 0x100; - .rodata : - ALIGN(4) - { - data/data.o(.rodata); - } =0 - - . = 0x2010000; - - ewram (NOLOAD) : - ALIGN(4) - { - gCode = .; - } - - /DISCARD/ : - { - *(*); - } -} diff --git a/berry_fix/payload/Makefile b/berry_fix/payload/Makefile deleted file mode 100644 index 2779c43ba8..0000000000 --- a/berry_fix/payload/Makefile +++ /dev/null @@ -1,209 +0,0 @@ -TOOLCHAIN := $(DEVKITARM) -COMPARE ?= 0 - -# don't use dkP's base_tools anymore -# because the redefinition of $(CC) conflicts -# with when we want to use $(CC) to preprocess files -# thus, manually create the variables for the bin -# files, or use arm-none-eabi binaries on the system -# if dkP is not installed on this system - -ifneq (,$(TOOLCHAIN)) -ifneq ($(wildcard $(TOOLCHAIN)/bin),) -export PATH := $(TOOLCHAIN)/bin:$(PATH) -endif -endif - -PREFIX := arm-none-eabi- -OBJCOPY := $(PREFIX)objcopy -AS := $(PREFIX)as -LD := $(PREFIX)ld - -# note: the makefile must be set up so MODERNCC is never called -# if MODERN=0 -MODERNCC := $(PREFIX)gcc - -ifeq ($(OS),Windows_NT) -EXE := .exe -else -EXE := -endif - -# use arm-none-eabi-cpp for macOS -# as macOS's default compiler is clang -# and clang's preprocessor will warn on \u -# when preprocessing asm files, expecting a unicode literal -# we can't unconditionally use arm-none-eabi-cpp -# as installations which install binutils-arm-none-eabi -# don't come with it -ifneq ($(MODERN),1) - ifeq ($(shell uname -s),Darwin) - CPP := $(PREFIX)cpp - else - CPP := $(CC) -E - endif -else - CPP := $(PREFIX)cpp -endif - -SHELL := /bin/bash -o pipefail - -CPPFLAGS := -I ../../tools/agbcc/include -I ../../tools/agbcc -iquote include -nostdinc -undef - -ROM := payload.gba -OBJ_DIR := build -CC1 := ../../tools/agbcc/bin/agbcc$(EXE) -override CC1FLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm - - -ELF = $(ROM:.gba=.elf) -MAP = $(ROM:.gba=.map) - -C_SUBDIR = src -ASM_SUBDIR = asm -DATA_ASM_SUBDIR = data - -C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR) -ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR) -DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR) - -ASFLAGS := -mcpu=arm7tdmi - -LDFLAGS = -Map ../$(MAP) - -LIB := -L ../../../tools/agbcc/lib -lgcc - -SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c -GFX := ../../tools/gbagfx/gbagfx$(EXE) -AIF := ../../tools/aif2pcm/aif2pcm$(EXE) -MID := ../../tools/mid2agb/mid2agb$(EXE) -SCANINC := ../../tools/scaninc/scaninc$(EXE) -PREPROC := ../../tools/preproc/preproc$(EXE) -RAMSCRGEN := ../../tools/ramscrgen/ramscrgen$(EXE) -FIX := ../../tools/gbafix/gbafix$(EXE) - -# Clear the default suffixes -.SUFFIXES: -# Don't delete intermediate files -.SECONDARY: -# Delete files that weren't built properly -.DELETE_ON_ERROR: - -# Secondary expansion is required for dependency variables in object rules. -.SECONDEXPANSION: - -.PHONY: all rom clean compare tidy - -C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c $(C_SUBDIR)/*/*/*.c) -C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS)) - -ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s) -ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS)) - -DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s) -DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS)) - -SONG_SRCS := $(wildcard $(SONG_SUBDIR)/*.s) -SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS)) - -MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid) -MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS)) - -OBJS := $(C_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS) -# OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS)) - -SUBDIRS := $(sort $(dir $(OBJS))) - -$(shell mkdir -p $(SUBDIRS)) - -$(C_BUILDDIR)/siirtc.o: CC1FLAGS := -mthumb-interwork -$(C_BUILDDIR)/agb_flash.o: CC1FLAGS := -O1 -mthumb-interwork -$(C_BUILDDIR)/agb_flash_1m.o: CC1FLAGS := -O1 -mthumb-interwork -$(C_BUILDDIR)/agb_flash_mx.o: CC1FLAGS := -O1 -mthumb-interwork -$(C_BUILDDIR)/agb_flash_le.o: CC1FLAGS := -O1 -mthumb-interwork - -all: rom - @: - -rom: $(ROM) -ifeq ($(COMPARE),1) - @$(SHA1) rom.sha1 -endif - -# For contributors to make sure a change didn't affect the contents of the ROM. -compare: ; @$(MAKE) COMPARE=1 - -clean: tidy - rm -f sound/direct_sound_samples/*.bin - rm -f $(SONG_OBJS) $(MID_OBJS) $(MID_SUBDIR)/*.s - find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} + - -tidy: - rm -f $(ROM) $(ELF) $(MAP) - rm -r build/* - -%.s: ; -%.png: ; -%.pal: ; -%.aif: ; - -%.1bpp: %.png ; $(GFX) $< $@ -%.4bpp: %.png ; $(GFX) $< $@ -%.8bpp: %.png ; $(GFX) $< $@ -%.gbapal: %.pal ; $(GFX) $< $@ -%.gbapal: %.png ; $(GFX) $< $@ -%.lz: % ; $(GFX) $< $@ -%.rl: % ; $(GFX) $< $@ - - -ifeq ($(NODEP),1) -$(C_BUILDDIR)/%.o: c_dep := -else -$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include $(C_SUBDIR)/$*.c) -endif - -$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep) - @$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i - @$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CC1FLAGS) -o $(C_BUILDDIR)/$*.s - @echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s - $(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s - -ifeq ($(NODEP),1) -$(ASM_BUILDDIR)/%.o: asm_dep := -else -$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) $(ASM_SUBDIR)/$*.s) -endif - -$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep) - $(AS) $(ASFLAGS) -o $@ $< - -ifeq ($(NODEP),1) -$(DATA_ASM_BUILDDIR)/%.o: data_dep := -else -$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) $(DATA_ASM_SUBDIR)/$*.s) -endif - -$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep) - $(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@ - -$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s - $(AS) $(ASFLAGS) -I sound -o $@ $< - -$(OBJ_DIR)/sym_bss.ld: sym_bss.txt - $(RAMSCRGEN) .bss $< ENGLISH > $@ - -$(OBJ_DIR)/sym_common.ld: sym_common.txt $(C_OBJS) $(wildcard common_syms/*.txt) - $(RAMSCRGEN) COMMON $< ENGLISH -c $(C_BUILDDIR),common_syms > $@ - -$(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt - $(RAMSCRGEN) ewram_data $< ENGLISH > $@ - -$(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld - cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../$< | sed "s#tools/#../tools/#g" > ld_script.ld - -$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) - cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../$@ $(LIB) - -$(ROM): $(ELF) - $(OBJCOPY) -O binary $< $@ - diff --git a/berry_fix/payload/asm/crt0.s b/berry_fix/payload/asm/crt0.s deleted file mode 100644 index 2bca006365..0000000000 --- a/berry_fix/payload/asm/crt0.s +++ /dev/null @@ -1,82 +0,0 @@ - .include "asm/macros/function.inc" - .include "constants/gba_constants.inc" - - .syntax unified - - .text - - .arm - .align 2, 0 - .global Init -Init: - mov r0, #PSR_IRQ_MODE - msr cpsr_cf, r0 - ldr sp, sp_irq - mov r0, #PSR_SYS_MODE - msr cpsr_cf, r0 - ldr sp, sp_sys - ldr r1, =INTR_VECTOR - ldr r0, =IntrMain - str r0, [r1] - ldr r1, =AgbMain + 1 - mov lr, pc - bx r1 - b Init - - .align 2, 0 -sp_sys: .word IWRAM_END - 0x100 -sp_irq: .word IWRAM_END - 0x60 - - .pool - .size Init, .-Init - - .arm - .align 2, 0 - .global IntrMain -IntrMain: @ 0x2010048 - mov ip, #REG_BASE - add r3, ip, #OFFSET_REG_IE - ldr r2, [r3] - and r1, r2, r2, lsr #16 - mov r2, #0 - ands r0, r1, #0x2000 - strbne r0, [r3, #-0x17c] -_02010064: - bne _02010064 - ands r0, r1, #0xc0 - bne _020100DC - add r2, r2, #4 - ands r0, r1, #1 - strhne r0, [ip, #-8] - bne _020100DC - add r2, r2, #4 - ands r0, r1, #2 - bne _020100DC - add r2, r2, #4 - ands r0, r1, #4 - bne _020100DC - add r2, r2, #4 - ands r0, r1, #0x100 - bne _020100DC - add r2, r2, #4 - ands r0, r1, #0x200 - bne _020100DC - add r2, r2, #4 - ands r0, r1, #0x400 - bne _020100DC - add r2, r2, #4 - ands r0, r1, #0x800 - bne _020100DC - add r2, r2, #4 - ands r0, r1, #0x1000 - bne _020100DC - add r2, r2, #4 - ands r0, r1, #8 -_020100DC: - strh r0, [r3, #2] - ldr r1, =gIntrTable - add r1, r1, r2 - ldr r0, [r1] - bx r0 - .pool - .size IntrMain, .-IntrMain diff --git a/berry_fix/payload/asm/libagbsyscall.s b/berry_fix/payload/asm/libagbsyscall.s deleted file mode 100644 index f13d08d76f..0000000000 --- a/berry_fix/payload/asm/libagbsyscall.s +++ /dev/null @@ -1,46 +0,0 @@ - .include "asm/macros/function.inc" - .include "constants/gba_constants.inc" - - .syntax unified - - .text - - thumb_func_start CpuSet -CpuSet: - svc 0xB - bx lr - thumb_func_end CpuSet - - thumb_func_start Div -Div: - svc 0x6 - bx lr - thumb_func_end Div - - thumb_func_start Mod -Mod: - svc 0x6 - adds r0, r1, 0 - bx lr - thumb_func_end Mod - - thumb_func_start LZ77UnCompVram -LZ77UnCompVram: - svc 0x12 - bx lr - thumb_func_end LZ77UnCompVram - - thumb_func_start RegisterRamReset -RegisterRamReset: - svc 0x1 - bx lr - thumb_func_end RegisterRamReset - - thumb_func_start VBlankIntrWait -VBlankIntrWait: - movs r2, 0 - svc 0x5 - bx lr - thumb_func_end VBlankIntrWait - - .align 2, 0 @ Don't pad with nop. diff --git a/berry_fix/payload/asm/macros/function.inc b/berry_fix/payload/asm/macros/function.inc deleted file mode 100644 index 67fb373a80..0000000000 --- a/berry_fix/payload/asm/macros/function.inc +++ /dev/null @@ -1,29 +0,0 @@ - .macro arm_func_start name - .align 2, 0 - .global \name - .arm - .type \name, function - .endm - - .macro arm_func_end name - .size \name, .-\name - .endm - - .macro thumb_func_start name - .align 2, 0 - .global \name - .thumb - .thumb_func - .type \name, function - .endm - - .macro non_word_aligned_thumb_func_start name - .global \name - .thumb - .thumb_func - .type \name, function - .endm - - .macro thumb_func_end name - .size \name, .-\name - .endm diff --git a/berry_fix/payload/charmap.txt b/berry_fix/payload/charmap.txt deleted file mode 100644 index 1c143ada4f..0000000000 --- a/berry_fix/payload/charmap.txt +++ /dev/null @@ -1,1067 +0,0 @@ -' ' = 00 -'À' = 01 -'Á' = 02 -'Â' = 03 -'Ç' = 04 -'È' = 05 -'É' = 06 -'Ê' = 07 -'Ë' = 08 -'Ì' = 09 -'Î' = 0B -'Ï' = 0C -'Ò' = 0D -'Ó' = 0E -'Ô' = 0F -'Œ' = 10 -'Ù' = 11 -'Ú' = 12 -'Û' = 13 -'Ñ' = 14 -'ß' = 15 -'à' = 16 -'á' = 17 -'ç' = 19 -'è' = 1A -'é' = 1B -'ê' = 1C -'ë' = 1D -'ì' = 1E -'î' = 20 -'ï' = 21 -'ò' = 22 -'ó' = 23 -'ô' = 24 -'œ' = 25 -'ù' = 26 -'ú' = 27 -'û' = 28 -'ñ' = 29 -'º' = 2A -'ª' = 2B -SUPER_ER = 2C -'&' = 2D -'+' = 2E -LV = 34 -'=' = 35 -';' = 36 -'¿' = 51 -'¡' = 52 -PK = 53 -PKMN = 53 54 -POKEBLOCK = 55 56 57 58 59 -'Í' = 5A -'%' = 5B -'(' = 5C -')' = 5D -'â' = 68 -'í' = 6F -UNK_SPACER = 77 -UP_ARROW = 79 -DOWN_ARROW = 7A -LEFT_ARROW = 7B -RIGHT_ARROW = 7C -'0' = A1 -'1' = A2 -'2' = A3 -'3' = A4 -'4' = A5 -'5' = A6 -'6' = A7 -'7' = A8 -'8' = A9 -'9' = AA -'!' = AB -'?' = AC -'.' = AD -'-' = AE -'·' = AF -'…' = B0 -'“' = B1 -'”' = B2 -'‘' = B3 -'’' = B4 -'♂' = B5 -'♀' = B6 -'¥' = B7 -',' = B8 -'×' = B9 -'/' = BA -'A' = BB -'B' = BC -'C' = BD -'D' = BE -'E' = BF -'F' = C0 -'G' = C1 -'H' = C2 -'I' = C3 -'J' = C4 -'K' = C5 -'L' = C6 -'M' = C7 -'N' = C8 -'O' = C9 -'P' = CA -'Q' = CB -'R' = CC -'S' = CD -'T' = CE -'U' = CF -'V' = D0 -'W' = D1 -'X' = D2 -'Y' = D3 -'Z' = D4 -'a' = D5 -'b' = D6 -'c' = D7 -'d' = D8 -'e' = D9 -'f' = DA -'g' = DB -'h' = DC -'i' = DD -'j' = DE -'k' = DF -'l' = E0 -'m' = E1 -'n' = E2 -'o' = E3 -'p' = E4 -'q' = E5 -'r' = E6 -'s' = E7 -'t' = E8 -'u' = E9 -'v' = EA -'w' = EB -'x' = EC -'y' = ED -'z' = EE -'▶' = EF -':' = F0 -'Ä' = F1 -'Ö' = F2 -'Ü' = F3 -'ä' = F4 -'ö' = F5 -'ü' = F6 -TALL_PLUS = FC 0C FB -'$' = FF - -@ Hiragana -'あ' = 01 -'い' = 02 -'う' = 03 -'え' = 04 -'お' = 05 -'か' = 06 -'き' = 07 -'く' = 08 -'け' = 09 -'こ' = 0A -'さ' = 0B -'し' = 0C -'す' = 0D -'せ' = 0E -'そ' = 0F -'た' = 10 -'ち' = 11 -'つ' = 12 -'て' = 13 -'と' = 14 -'な' = 15 -'に' = 16 -'ぬ' = 17 -'ね' = 18 -'の' = 19 -'は' = 1A -'ひ' = 1B -'ふ' = 1C -'へ' = 1D -'ほ' = 1E -'ま' = 1F -'み' = 20 -'む' = 21 -'め' = 22 -'も' = 23 -'や' = 24 -'ゆ' = 25 -'よ' = 26 -'ら' = 27 -'り' = 28 -'る' = 29 -'れ' = 2A -'ろ' = 2B -'わ' = 2C -'を' = 2D -'ん' = 2E -'ぁ' = 2F -'ぃ' = 30 -'ぅ' = 31 -'ぇ' = 32 -'ぉ' = 33 -'ゃ' = 34 -'ゅ' = 35 -'ょ' = 36 -'が' = 37 -'ぎ' = 38 -'ぐ' = 39 -'げ' = 3A -'ご' = 3B -'ざ' = 3C -'じ' = 3D -'ず' = 3E -'ぜ' = 3F -'ぞ' = 40 -'だ' = 41 -'ぢ' = 42 -'づ' = 43 -'で' = 44 -'ど' = 45 -'ば' = 46 -'び' = 47 -'ぶ' = 48 -'べ' = 49 -'ぼ' = 4A -'ぱ' = 4B -'ぴ' = 4C -'ぷ' = 4D -'ぺ' = 4E -'ぽ' = 4F -'っ' = 50 - -@ Katakana -'ア' = 51 -'イ' = 52 -'ウ' = 53 -'エ' = 54 -'オ' = 55 -'カ' = 56 -'キ' = 57 -'ク' = 58 -'ケ' = 59 -'コ' = 5A -'サ' = 5B -'シ' = 5C -'ス' = 5D -'セ' = 5E -'ソ' = 5F -'タ' = 60 -'チ' = 61 -'ツ' = 62 -'テ' = 63 -'ト' = 64 -'ナ' = 65 -'ニ' = 66 -'ヌ' = 67 -'ネ' = 68 -'ノ' = 69 -'ハ' = 6A -'ヒ' = 6B -'フ' = 6C -'ヘ' = 6D -'ホ' = 6E -'マ' = 6F -'ミ' = 70 -'ム' = 71 -'メ' = 72 -'モ' = 73 -'ヤ' = 74 -'ユ' = 75 -'ヨ' = 76 -'ラ' = 77 -'リ' = 78 -'ル' = 79 -'レ' = 7A -'ロ' = 7B -'ワ' = 7C -'ヲ' = 7D -'ン' = 7E -'ァ' = 7F -'ィ' = 80 -'ゥ' = 81 -'ェ' = 82 -'ォ' = 83 -'ャ' = 84 -'ュ' = 85 -'ョ' = 86 -'ガ' = 87 -'ギ' = 88 -'グ' = 89 -'ゲ' = 8A -'ゴ' = 8B -'ザ' = 8C -'ジ' = 8D -'ズ' = 8E -'ゼ' = 8F -'ゾ' = 90 -'ダ' = 91 -'ヂ' = 92 -'ヅ' = 93 -'デ' = 94 -'ド' = 95 -'バ' = 96 -'ビ' = 97 -'ブ' = 98 -'ベ' = 99 -'ボ' = 9A -'パ' = 9B -'ピ' = 9C -'プ' = 9D -'ペ' = 9E -'ポ' = 9F -'ッ' = A0 - -@ Japanese punctuation -' ' = 00 -'!' = AB -'?' = AC -'。' = AD -'ー' = AE -'⋯' = B0 - -STRING = FD - -@ string placeholders -PLAYER = FD 01 -STR_VAR_1 = FD 02 -STR_VAR_2 = FD 03 -STR_VAR_3 = FD 04 -KUN = FD 05 -RIVAL = FD 06 -@ version-dependent strings (originally made for Ruby/Sapphire differences) -@ Emerald uses the Sapphire strings (except for VERSION). -VERSION = FD 07 @ "EMERALD" -AQUA = FD 08 -MAGMA = FD 09 -ARCHIE = FD 0A -MAXIE = FD 0B -KYOGRE = FD 0C -GROUDON = FD 0D - -@ battle string placeholders - -B_BUFF1 = FD 00 -B_BUFF2 = FD 01 -B_COPY_VAR_1 = FD 02 -B_COPY_VAR_2 = FD 03 -B_COPY_VAR_3 = FD 04 -B_PLAYER_MON1_NAME = FD 05 -B_OPPONENT_MON1_NAME = FD 06 -B_PLAYER_MON2_NAME = FD 07 -B_OPPONENT_MON2_NAME = FD 08 -B_LINK_PLAYER_MON1_NAME = FD 09 -B_LINK_OPPONENT_MON1_NAME = FD 0A -B_LINK_PLAYER_MON2_NAME = FD 0B -B_LINK_OPPONENT_MON2_NAME = FD 0C -B_ATK_NAME_WITH_PREFIX_MON1 = FD 0D -B_ATK_PARTNER_NAME = FD 0E -B_ATK_NAME_WITH_PREFIX = FD 0F -B_DEF_NAME_WITH_PREFIX = FD 10 -B_EFF_NAME_WITH_PREFIX = FD 11 @ EFF = short for gEffectBattler -B_ACTIVE_NAME_WITH_PREFIX = FD 12 -B_SCR_ACTIVE_NAME_WITH_PREFIX = FD 13 -B_CURRENT_MOVE = FD 14 -B_LAST_MOVE = FD 15 -B_LAST_ITEM = FD 16 -B_LAST_ABILITY = FD 17 -B_ATK_ABILITY = FD 18 -B_DEF_ABILITY = FD 19 -B_SCR_ACTIVE_ABILITY = FD 1A -B_EFF_ABILITY = FD 1B -B_TRAINER1_CLASS = FD 1C -B_TRAINER1_NAME = FD 1D -B_LINK_PLAYER_NAME = FD 1E -B_LINK_PARTNER_NAME = FD 1F -B_LINK_OPPONENT1_NAME = FD 20 -B_LINK_OPPONENT2_NAME = FD 21 -B_LINK_SCR_TRAINER_NAME = FD 22 -B_PLAYER_NAME = FD 23 -B_TRAINER1_LOSE_TEXT = FD 24 -B_TRAINER1_WIN_TEXT = FD 25 -B_26 = FD 26 -B_PC_CREATOR_NAME = FD 27 -B_ATK_PREFIX1 = FD 28 -B_DEF_PREFIX1 = FD 29 -B_ATK_PREFIX2 = FD 2A -B_DEF_PREFIX2 = FD 2B -B_ATK_PREFIX3 = FD 2C -B_DEF_PREFIX3 = FD 2D -B_TRAINER2_CLASS = FD 2E -B_TRAINER2_NAME = FD 2F -B_TRAINER2_LOSE_TEXT = FD 30 -B_TRAINER2_WIN_TEXT = FD 31 -B_PARTNER_CLASS = FD 32 -B_PARTNER_NAME = FD 33 -B_BUFF3 = FD 34 - -@ indicates the end of a town/city name (before " TOWN" or " CITY") -NAME_END = FC 00 - -@ special 0xF7 character -SPECIAL_F7 = F7 - -@ more text functions - -COLOR = FC 01 @ use a color listed below right after -HIGHLIGHT = FC 02 @ same as fc 01 -SHADOW = FC 03 @ same as fc 01 -COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes -PALETTE = FC 05 @ used in credits -SIZE = FC 06 @ note that anything other than "SMALL" is invalid -UNKNOWN_7 = FC 07 -PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them -PAUSE_UNTIL_PRESS = FC 09 -WAIT_SE = FC 0A -PLAY_BGM = FC 0B -ESCAPE = FC 0C -SHIFT_TEXT = FC 0D -UNKNOWN_E = FC 0E -UNKNOWN_F = FC 0F -PLAY_SE = FC 10 -CLEAR = FC 11 -SKIP = FC 12 -CLEAR_TO = FC 13 -UNKNOWN_14 = FC 14 -JPN = FC 15 -ENG = FC 16 -PAUSE_MUSIC = FC 17 -RESUME_MUSIC = FC 18 - -@ colors - -TRANSPARENT = 00 -WHITE = 01 -DARK_GRAY = 02 -LIGHT_GRAY = 03 -RED = 04 -LIGHT_RED = 05 -GREEN = 06 -LIGHT_GREEN = 07 -BLUE = 08 -LIGHT_BLUE = 09 -@ these next colors can be set to anything arbitrary at runtime -@ usually though they'll have the textbox border colors as described below -DYNAMIC_COLOR1 = 0A @ white -DYNAMIC_COLOR2 = 0B @ white with a tinge of green -DYNAMIC_COLOR3 = 0C @ white 2 -DYNAMIC_COLOR4 = 0D @ aquamarine -DYNAMIC_COLOR5 = 0E @ blue-green -DYNAMIC_COLOR6 = 0F @ cerulean - -@ sound and music - -MUS_DUMMY = 00 00 -SE_USE_ITEM = 01 00 -SE_PC_LOGIN = 02 00 -SE_PC_OFF = 03 00 -SE_PC_ON = 04 00 -SE_SELECT = 05 00 -SE_WIN_OPEN = 06 00 -SE_WALL_HIT = 07 00 -SE_DOOR = 08 00 -SE_EXIT = 09 00 -SE_LEDGE = 0A 00 -SE_BIKE_BELL = 0B 00 -SE_NOT_EFFECTIVE = 0C 00 -SE_EFFECTIVE = 0D 00 -SE_SUPER_EFFECTIVE = 0E 00 -SE_BALL_OPEN = 0F 00 -SE_FAINT = 10 00 -SE_FLEE = 11 00 -SE_SLIDING_DOOR = 12 00 -SE_SHIP = 13 00 -SE_BANG = 14 00 -SE_PIN = 15 00 -SE_BOO = 16 00 -SE_BALL = 17 00 -SE_CONTEST_PLACE = 18 00 -SE_A = 19 00 -SE_I = 1A 00 -SE_U = 1B 00 -SE_E = 1C 00 -SE_O = 1D 00 -SE_N = 1E 00 -SE_SUCCESS = 1F 00 -SE_FAILURE = 20 00 -SE_EXP = 21 00 -SE_BIKE_HOP = 22 00 -SE_SWITCH = 23 00 -SE_CLICK = 24 00 -SE_FU_ZAKU = 25 00 -SE_CONTEST_CONDITION_LOSE = 26 00 -SE_LAVARIDGE_FALL_WARP = 27 00 -SE_ICE_STAIRS = 28 00 -SE_ICE_BREAK = 29 00 -SE_ICE_CRACK = 2A 00 -SE_FALL = 2B 00 -SE_UNLOCK = 2C 00 -SE_WARP_IN = 2D 00 -SE_WARP_OUT = 2E 00 -SE_REPEL = 2F 00 -SE_ROTATING_GATE = 30 00 -SE_TRUCK_MOVE = 31 00 -SE_TRUCK_STOP = 32 00 -SE_TRUCK_UNLOAD = 33 00 -SE_TRUCK_DOOR = 34 00 -SE_BERRY_BLENDER = 35 00 -SE_CARD = 36 00 -SE_SAVE = 37 00 -SE_BALL_BOUNCE_1 = 38 00 -SE_BALL_BOUNCE_2 = 39 00 -SE_BALL_BOUNCE_3 = 3A 00 -SE_BALL_BOUNCE_4 = 3B 00 -SE_BALL_TRADE = 3C 00 -SE_BALL_THROW = 3D 00 -SE_NOTE_C = 3E 00 -SE_NOTE_D = 3F 00 -SE_NOTE_E = 40 00 -SE_NOTE_F = 41 00 -SE_NOTE_G = 42 00 -SE_NOTE_A = 43 00 -SE_NOTE_B = 44 00 -SE_NOTE_C_HIGH = 45 00 -SE_PUDDLE = 46 00 -SE_BRIDGE_WALK = 47 00 -SE_ITEMFINDER = 48 00 -SE_DING_DONG = 49 00 -SE_BALLOON_RED = 4A 00 -SE_BALLOON_BLUE = 4B 00 -SE_BALLOON_YELLOW = 4C 00 -SE_BREAKABLE_DOOR = 4D 00 -SE_MUD_BALL = 4E 00 -SE_FIELD_POISON = 4F 00 -SE_ESCALATOR = 50 00 -SE_THUNDERSTORM = 51 00 -SE_THUNDERSTORM_STOP = 52 00 -SE_DOWNPOUR = 53 00 -SE_DOWNPOUR_STOP = 54 00 -SE_RAIN = 55 00 -SE_RAIN_STOP = 56 00 -SE_THUNDER = 57 00 -SE_THUNDER2 = 58 00 -SE_ELEVATOR = 59 00 -SE_LOW_HEALTH = 5A 00 -SE_EXP_MAX = 5B 00 -SE_ROULETTE_BALL = 5C 00 -SE_ROULETTE_BALL2 = 5D 00 -SE_TAILLOW_WING_FLAP = 5E 00 -SE_SHOP = 5F 00 -SE_CONTEST_HEART = 60 00 -SE_CONTEST_CURTAIN_RISE = 61 00 -SE_CONTEST_CURTAIN_FALL = 62 00 -SE_CONTEST_ICON_CHANGE = 63 00 -SE_CONTEST_ICON_CLEAR = 64 00 -SE_CONTEST_MONS_TURN = 65 00 -SE_SHINY = 66 00 -SE_INTRO_BLAST = 67 00 -SE_MUGSHOT = 68 00 -SE_APPLAUSE = 69 00 -SE_VEND = 6A 00 -SE_ORB = 6B 00 -SE_DEX_SCROLL = 6C 00 -SE_DEX_PAGE = 6D 00 -SE_POKENAV_ON = 6E 00 -SE_POKENAV_OFF = 6F 00 -SE_DEX_SEARCH = 70 00 -SE_EGG_HATCH = 71 00 -SE_BALL_TRAY_ENTER = 72 00 -SE_BALL_TRAY_BALL = 73 00 -SE_BALL_TRAY_EXIT = 74 00 -SE_GLASS_FLUTE = 75 00 -SE_M_THUNDERBOLT = 76 00 -SE_M_THUNDERBOLT2 = 77 00 -SE_M_HARDEN = 78 00 -SE_M_NIGHTMARE = 79 00 -SE_M_VITAL_THROW = 7A 00 -SE_M_VITAL_THROW2 = 7B 00 -SE_M_BUBBLE = 7C 00 -SE_M_BUBBLE2 = 7D 00 -SE_M_BUBBLE3 = 7E 00 -SE_M_RAIN_DANCE = 7F 00 -SE_M_CUT = 80 00 -SE_M_STRING_SHOT = 81 00 -SE_M_STRING_SHOT2 = 82 00 -SE_M_ROCK_THROW = 83 00 -SE_M_GUST = 84 00 -SE_M_GUST2 = 85 00 -SE_M_DOUBLE_SLAP = 86 00 -SE_M_DOUBLE_TEAM = 87 00 -SE_M_RAZOR_WIND = 88 00 -SE_M_ICY_WIND = 89 00 -SE_M_THUNDER_WAVE = 8A 00 -SE_M_COMET_PUNCH = 8B 00 -SE_M_MEGA_KICK = 8C 00 -SE_M_MEGA_KICK2 = 8D 00 -SE_M_CRABHAMMER = 8E 00 -SE_M_JUMP_KICK = 8F 00 -SE_M_FLAME_WHEEL = 90 00 -SE_M_FLAME_WHEEL2 = 91 00 -SE_M_FLAMETHROWER = 92 00 -SE_M_FIRE_PUNCH = 93 00 -SE_M_TOXIC = 94 00 -SE_M_SACRED_FIRE = 95 00 -SE_M_SACRED_FIRE2 = 96 00 -SE_M_EMBER = 97 00 -SE_M_TAKE_DOWN = 98 00 -SE_M_BLIZZARD = 99 00 -SE_M_BLIZZARD2 = 9A 00 -SE_M_SCRATCH = 9B 00 -SE_M_VICEGRIP = 9C 00 -SE_M_WING_ATTACK = 9D 00 -SE_M_FLY = 9E 00 -SE_M_SAND_ATTACK = 9F 00 -SE_M_RAZOR_WIND2 = A0 00 -SE_M_BITE = A1 00 -SE_M_HEADBUTT = A2 00 -SE_M_SURF = A3 00 -SE_M_HYDRO_PUMP = A4 00 -SE_M_WHIRLPOOL = A5 00 -SE_M_HORN_ATTACK = A6 00 -SE_M_TAIL_WHIP = A7 00 -SE_M_MIST = A8 00 -SE_M_POISON_POWDER = A9 00 -SE_M_BIND = AA 00 -SE_M_DRAGON_RAGE = AB 00 -SE_M_SING = AC 00 -SE_M_PERISH_SONG = AD 00 -SE_M_PAY_DAY = AE 00 -SE_M_DIG = AF 00 -SE_M_DIZZY_PUNCH = B0 00 -SE_M_SELF_DESTRUCT = B1 00 -SE_M_EXPLOSION = B2 00 -SE_M_ABSORB_2 = B3 00 -SE_M_ABSORB = B4 00 -SE_M_SCREECH = B5 00 -SE_M_BUBBLE_BEAM = B6 00 -SE_M_BUBBLE_BEAM2 = B7 00 -SE_M_SUPERSONIC = B8 00 -SE_M_BELLY_DRUM = B9 00 -SE_M_METRONOME = BA 00 -SE_M_BONEMERANG = BB 00 -SE_M_LICK = BC 00 -SE_M_PSYBEAM = BD 00 -SE_M_FAINT_ATTACK = BE 00 -SE_M_SWORDS_DANCE = BF 00 -SE_M_LEER = C0 00 -SE_M_SWAGGER = C1 00 -SE_M_SWAGGER2 = C2 00 -SE_M_HEAL_BELL = C3 00 -SE_M_CONFUSE_RAY = C4 00 -SE_M_SNORE = C5 00 -SE_M_BRICK_BREAK = C6 00 -SE_M_GIGA_DRAIN = C7 00 -SE_M_PSYBEAM2 = C8 00 -SE_M_SOLAR_BEAM = C9 00 -SE_M_PETAL_DANCE = CA 00 -SE_M_TELEPORT = CB 00 -SE_M_MINIMIZE = CC 00 -SE_M_SKETCH = CD 00 -SE_M_SWIFT = CE 00 -SE_M_REFLECT = CF 00 -SE_M_BARRIER = D0 00 -SE_M_DETECT = D1 00 -SE_M_LOCK_ON = D2 00 -SE_M_MOONLIGHT = D3 00 -SE_M_CHARM = D4 00 -SE_M_CHARGE = D5 00 -SE_M_STRENGTH = D6 00 -SE_M_HYPER_BEAM = D7 00 -SE_M_WATERFALL = D8 00 -SE_M_REVERSAL = D9 00 -SE_M_ACID_ARMOR = DA 00 -SE_M_SANDSTORM = DB 00 -SE_M_TRI_ATTACK = DC 00 -SE_M_TRI_ATTACK2 = DD 00 -SE_M_ENCORE = DE 00 -SE_M_ENCORE2 = DF 00 -SE_M_BATON_PASS = E0 00 -SE_M_MILK_DRINK = E1 00 -SE_M_ATTRACT = E2 00 -SE_M_ATTRACT2 = E3 00 -SE_M_MORNING_SUN = E4 00 -SE_M_FLATTER = E5 00 -SE_M_SAND_TOMB = E6 00 -SE_M_GRASSWHISTLE = E7 00 -SE_M_SPIT_UP = E8 00 -SE_M_DIVE = E9 00 -SE_M_EARTHQUAKE = EA 00 -SE_M_TWISTER = EB 00 -SE_M_SWEET_SCENT = EC 00 -SE_M_YAWN = ED 00 -SE_M_SKY_UPPERCUT = EE 00 -SE_M_STAT_INCREASE = EF 00 -SE_M_HEAT_WAVE = F0 00 -SE_M_UPROAR = F1 00 -SE_M_HAIL = F2 00 -SE_M_COSMIC_POWER = F3 00 -SE_M_TEETER_DANCE = F4 00 -SE_M_STAT_DECREASE = F5 00 -SE_M_HAZE = F6 00 -SE_M_HYPER_BEAM2 = F7 00 -SE_RG_DOOR = F8 00 -SE_RG_CARD_FLIP = F9 00 -SE_RG_CARD_FLIPPING = FA 00 -SE_RG_CARD_OPEN = FB 00 -SE_RG_BAG_CURSOR = FC 00 -SE_RG_BAG_POCKET = FD 00 -SE_RG_BALL_CLICK = FE 00 -SE_RG_SHOP = FF 00 -SE_RG_SS_ANNE_HORN = 00 01 -SE_RG_HELP_OPEN = 01 01 -SE_RG_HELP_CLOSE = 02 01 -SE_RG_HELP_ERROR = 03 01 -SE_RG_DEOXYS_MOVE = 04 01 -SE_RG_POKE_JUMP_SUCCESS = 05 01 -SE_RG_POKE_JUMP_FAILURE = 06 01 -SE_POKENAV_CALL = 07 01 -SE_POKENAV_HANG_UP = 08 01 -SE_ARENA_TIMEUP1 = 09 01 -SE_ARENA_TIMEUP2 = 0A 01 -SE_PIKE_CURTAIN_CLOSE = 0B 01 -SE_PIKE_CURTAIN_OPEN = 0C 01 -SE_SUDOWOODO_SHAKE = 0D 01 -MUS_LITTLEROOT_TEST = 5E 01 -MUS_GSC_ROUTE38 = 5F 01 -MUS_CAUGHT = 60 01 -MUS_VICTORY_WILD = 61 01 -MUS_VICTORY_GYM_LEADER = 62 01 -MUS_VICTORY_LEAGUE = 63 01 -MUS_C_COMM_CENTER = 64 01 -MUS_GSC_PEWTER = 65 01 -MUS_C_VS_LEGEND_BEAST = 66 01 -MUS_ROUTE101 = 67 01 -MUS_ROUTE110 = 68 01 -MUS_ROUTE120 = 69 01 -MUS_PETALBURG = 6A 01 -MUS_OLDALE = 6B 01 -MUS_GYM = 6C 01 -MUS_SURF = 6D 01 -MUS_PETALBURG_WOODS = 6E 01 -MUS_LEVEL_UP = 6F 01 -MUS_HEAL = 70 01 -MUS_OBTAIN_BADGE = 71 01 -MUS_OBTAIN_ITEM = 72 01 -MUS_EVOLVED = 73 01 -MUS_OBTAIN_TMHM = 74 01 -MUS_LILYCOVE_MUSEUM = 75 01 -MUS_ROUTE122 = 76 01 -MUS_OCEANIC_MUSEUM = 77 01 -MUS_EVOLUTION_INTRO = 78 01 -MUS_EVOLUTION = 79 01 -MUS_MOVE_DELETED = 7A 01 -MUS_ENCOUNTER_GIRL = 7B 01 -MUS_ENCOUNTER_MALE = 7C 01 -MUS_ABANDONED_SHIP = 7D 01 -MUS_FORTREE = 7E 01 -MUS_BIRCH_LAB = 7F 01 -MUS_B_TOWER_RS = 80 01 -MUS_ENCOUNTER_SWIMMER = 81 01 -MUS_CAVE_OF_ORIGIN = 82 01 -MUS_OBTAIN_BERRY = 83 01 -MUS_AWAKEN_LEGEND = 84 01 -MUS_SLOTS_JACKPOT = 85 01 -MUS_SLOTS_WIN = 86 01 -MUS_TOO_BAD = 87 01 -MUS_ROULETTE = 88 01 -MUS_LINK_CONTEST_P1 = 89 01 -MUS_LINK_CONTEST_P2 = 8A 01 -MUS_LINK_CONTEST_P3 = 8B 01 -MUS_LINK_CONTEST_P4 = 8C 01 -MUS_ENCOUNTER_RICH = 8D 01 -MUS_VERDANTURF = 8E 01 -MUS_RUSTBORO = 8F 01 -MUS_POKE_CENTER = 90 01 -MUS_ROUTE104 = 91 01 -MUS_ROUTE119 = 92 01 -MUS_CYCLING = 93 01 -MUS_POKE_MART = 94 01 -MUS_LITTLEROOT = 95 01 -MUS_MT_CHIMNEY = 96 01 -MUS_ENCOUNTER_FEMALE = 97 01 -MUS_LILYCOVE = 98 01 -MUS_ROUTE111 = 99 01 -MUS_HELP = 9A 01 -MUS_UNDERWATER = 9B 01 -MUS_VICTORY_TRAINER = 9C 01 -MUS_TITLE = 9D 01 -MUS_INTRO = 9E 01 -MUS_ENCOUNTER_MAY = 9F 01 -MUS_ENCOUNTER_INTENSE = A0 01 -MUS_ENCOUNTER_COOL = A1 01 -MUS_ROUTE113 = A2 01 -MUS_ENCOUNTER_AQUA = A3 01 -MUS_FOLLOW_ME = A4 01 -MUS_ENCOUNTER_BRENDAN = A5 01 -MUS_EVER_GRANDE = A6 01 -MUS_ENCOUNTER_SUSPICIOUS = A7 01 -MUS_VICTORY_AQUA_MAGMA = A8 01 -MUS_CABLE_CAR = A9 01 -MUS_GAME_CORNER = AA 01 -MUS_DEWFORD = AB 01 -MUS_SAFARI_ZONE = AC 01 -MUS_VICTORY_ROAD = AD 01 -MUS_AQUA_MAGMA_HIDEOUT = AE 01 -MUS_SAILING = AF 01 -MUS_MT_PYRE = B0 01 -MUS_SLATEPORT = B1 01 -MUS_MT_PYRE_EXTERIOR = B2 01 -MUS_SCHOOL = B3 01 -MUS_HALL_OF_FAME = B4 01 -MUS_FALLARBOR = B5 01 -MUS_SEALED_CHAMBER = B6 01 -MUS_CONTEST_WINNER = B7 01 -MUS_CONTEST = B8 01 -MUS_ENCOUNTER_MAGMA = B9 01 -MUS_INTRO_BATTLE = BA 01 -MUS_ABNORMAL_WEATHER = BB 01 -MUS_WEATHER_GROUDON = BC 01 -MUS_SOOTOPOLIS = BD 01 -MUS_CONTEST_RESULTS = BE 01 -MUS_HALL_OF_FAME_ROOM = BF 01 -MUS_TRICK_HOUSE = C0 01 -MUS_ENCOUNTER_TWINS = C1 01 -MUS_ENCOUNTER_ELITE_FOUR = C2 01 -MUS_ENCOUNTER_HIKER = C3 01 -MUS_CONTEST_LOBBY = C4 01 -MUS_ENCOUNTER_INTERVIEWER = C5 01 -MUS_ENCOUNTER_CHAMPION = C6 01 -MUS_CREDITS = C7 01 -MUS_END = C8 01 -MUS_B_FRONTIER = C9 01 -MUS_B_ARENA = CA 01 -MUS_OBTAIN_B_POINTS = CB 01 -MUS_REGISTER_MATCH_CALL = CC 01 -MUS_B_PYRAMID = CD 01 -MUS_B_PYRAMID_TOP = CE 01 -MUS_B_PALACE = CF 01 -MUS_RAYQUAZA_APPEARS = D0 01 -MUS_B_TOWER = D1 01 -MUS_OBTAIN_SYMBOL = D2 01 -MUS_B_DOME = D3 01 -MUS_B_PIKE = D4 01 -MUS_B_FACTORY = D5 01 -MUS_VS_RAYQUAZA = D6 01 -MUS_VS_FRONTIER_BRAIN = D7 01 -MUS_VS_MEW = D8 01 -MUS_B_DOME_LOBBY = D9 01 -MUS_VS_WILD = DA 01 -MUS_VS_AQUA_MAGMA = DB 01 -MUS_VS_TRAINER = DC 01 -MUS_VS_GYM_LEADER = DD 01 -MUS_VS_CHAMPION = DE 01 -MUS_VS_REGI = DF 01 -MUS_VS_KYOGRE_GROUDON = E0 01 -MUS_VS_RIVAL = E1 01 -MUS_VS_ELITE_FOUR = E2 01 -MUS_VS_AQUA_MAGMA_LEADER = E3 01 -MUS_RG_FOLLOW_ME = E4 01 -MUS_RG_GAME_CORNER = E5 01 -MUS_RG_ROCKET_HIDEOUT = E6 01 -MUS_RG_GYM = E7 01 -MUS_RG_JIGGLYPUFF = E8 01 -MUS_RG_INTRO_FIGHT = E9 01 -MUS_RG_TITLE = EA 01 -MUS_RG_CINNABAR = EB 01 -MUS_RG_LAVENDER = EC 01 -MUS_RG_HEAL = ED 01 -MUS_RG_CYCLING = EE 01 -MUS_RG_ENCOUNTER_ROCKET = EF 01 -MUS_RG_ENCOUNTER_GIRL = F0 01 -MUS_RG_ENCOUNTER_BOY = F1 01 -MUS_RG_HALL_OF_FAME = F2 01 -MUS_RG_VIRIDIAN_FOREST = F3 01 -MUS_RG_MT_MOON = F4 01 -MUS_RG_POKE_MANSION = F5 01 -MUS_RG_CREDITS = F6 01 -MUS_RG_ROUTE1 = F7 01 -MUS_RG_ROUTE24 = F8 01 -MUS_RG_ROUTE3 = F9 01 -MUS_RG_ROUTE11 = FA 01 -MUS_RG_VICTORY_ROAD = FB 01 -MUS_RG_VS_GYM_LEADER = FC 01 -MUS_RG_VS_TRAINER = FD 01 -MUS_RG_VS_WILD = FE 01 -MUS_RG_VS_CHAMPION = FF 01 -MUS_RG_PALLET = 00 02 -MUS_RG_OAK_LAB = 01 02 -MUS_RG_OAK = 02 02 -MUS_RG_POKE_CENTER = 03 02 -MUS_RG_SS_ANNE = 04 02 -MUS_RG_SURF = 05 02 -MUS_RG_POKE_TOWER = 06 02 -MUS_RG_SILPH = 07 02 -MUS_RG_FUCHSIA = 08 02 -MUS_RG_CELADON = 09 02 -MUS_RG_VICTORY_TRAINER = 0A 02 -MUS_RG_VICTORY_WILD = 0B 02 -MUS_RG_VICTORY_GYM_LEADER = 0C 02 -MUS_RG_VERMILLION = 0D 02 -MUS_RG_PEWTER = 0E 02 -MUS_RG_ENCOUNTER_RIVAL = 0F 02 -MUS_RG_RIVAL_EXIT = 10 02 -MUS_RG_DEX_RATING = 11 02 -MUS_RG_OBTAIN_KEY_ITEM = 12 02 -MUS_RG_CAUGHT_INTRO = 13 02 -MUS_RG_PHOTO = 14 02 -MUS_RG_GAME_FREAK = 15 02 -MUS_RG_CAUGHT = 16 02 -MUS_RG_NEW_GAME_INSTRUCT = 17 02 -MUS_RG_NEW_GAME_INTRO = 18 02 -MUS_RG_NEW_GAME_EXIT = 19 02 -MUS_RG_POKE_JUMP = 1A 02 -MUS_RG_UNION_ROOM = 1B 02 -MUS_RG_NET_CENTER = 1C 02 -MUS_RG_MYSTERY_GIFT = 1D 02 -MUS_RG_BERRY_PICK = 1E 02 -MUS_RG_SEVII_CAVE = 1F 02 -MUS_RG_TEACHY_TV_SHOW = 20 02 -MUS_RG_SEVII_ROUTE = 21 02 -MUS_RG_SEVII_DUNGEON = 22 02 -MUS_RG_SEVII_123 = 23 02 -MUS_RG_SEVII_45 = 24 02 -MUS_RG_SEVII_67 = 25 02 -MUS_RG_POKE_FLUTE = 26 02 -MUS_RG_VS_DEOXYS = 27 02 -MUS_RG_VS_MEWTWO = 28 02 -MUS_RG_VS_LEGEND = 29 02 -MUS_RG_ENCOUNTER_GYM_LEADER = 2A 02 -MUS_RG_ENCOUNTER_DEOXYS = 2B 02 -MUS_RG_TRAINER_TOWER = 2C 02 -MUS_RG_SLOW_PALLET = 2D 02 -MUS_RG_TEACHY_TV_MENU = 2E 02 -PH_TRAP_BLEND = 2F 02 -PH_TRAP_HELD = 30 02 -PH_TRAP_SOLO = 31 02 -PH_FACE_BLEND = 32 02 -PH_FACE_HELD = 33 02 -PH_FACE_SOLO = 34 02 -PH_CLOTH_BLEND = 35 02 -PH_CLOTH_HELD = 36 02 -PH_CLOTH_SOLO = 37 02 -PH_DRESS_BLEND = 38 02 -PH_DRESS_HELD = 39 02 -PH_DRESS_SOLO = 3A 02 -PH_FLEECE_BLEND = 3B 02 -PH_FLEECE_HELD = 3C 02 -PH_FLEECE_SOLO = 3D 02 -PH_KIT_BLEND = 3E 02 -PH_KIT_HELD = 3F 02 -PH_KIT_SOLO = 40 02 -PH_PRICE_BLEND = 41 02 -PH_PRICE_HELD = 42 02 -PH_PRICE_SOLO = 43 02 -PH_LOT_BLEND = 44 02 -PH_LOT_HELD = 45 02 -PH_LOT_SOLO = 46 02 -PH_GOAT_BLEND = 47 02 -PH_GOAT_HELD = 48 02 -PH_GOAT_SOLO = 49 02 -PH_THOUGHT_BLEND = 4A 02 -PH_THOUGHT_HELD = 4B 02 -PH_THOUGHT_SOLO = 4C 02 -PH_CHOICE_BLEND = 4D 02 -PH_CHOICE_HELD = 4E 02 -PH_CHOICE_SOLO = 4F 02 -PH_MOUTH_BLEND = 50 02 -PH_MOUTH_HELD = 51 02 -PH_MOUTH_SOLO = 52 02 -PH_FOOT_BLEND = 53 02 -PH_FOOT_HELD = 54 02 -PH_FOOT_SOLO = 55 02 -PH_GOOSE_BLEND = 56 02 -PH_GOOSE_HELD = 57 02 -PH_GOOSE_SOLO = 58 02 -PH_STRUT_BLEND = 59 02 -PH_STRUT_HELD = 5A 02 -PH_STRUT_SOLO = 5B 02 -PH_CURE_BLEND = 5C 02 -PH_CURE_HELD = 5D 02 -PH_CURE_SOLO = 5E 02 -PH_NURSE_BLEND = 5F 02 -PH_NURSE_HELD = 60 02 -PH_NURSE_SOLO = 61 02 - -A_BUTTON = F8 00 -B_BUTTON = F8 01 -DPAD_UPDOWN = F8 0A -DPAD_NONE = F8 0C - -UP_ARROW_2 = F9 00 -DOWN_ARROW_2 = F9 01 -LEFT_ARROW_2 = F9 02 -RIGHT_ARROW_2 = F9 03 -PLUS = F9 04 -LV_2 = F9 05 -PP = F9 06 -ID = F9 07 -NO = F9 08 -UNDERSCORE = F9 09 -CIRCLE_1 = F9 0A -CIRCLE_2 = F9 0B -CIRCLE_3 = F9 0C -CIRCLE_4 = F9 0D -CIRCLE_5 = F9 0E -CIRCLE_6 = F9 0F -CIRCLE_7 = F9 10 -CIRCLE_8 = F9 11 -CIRCLE_9 = F9 12 -ROUND_LEFT_PAREN = F9 13 -ROUND_RIGHT_PAREN = F9 14 -CIRCLE_DOT = F9 15 -TRIANGLE = F9 16 -BIG_MULT_X = F9 17 - -EMOJI_UNDERSCORE = F9 D0 -EMOJI_PIPE = F9 D1 -EMOJI_HIGHBAR = F9 D2 -EMOJI_TILDE = F9 D3 -EMOJI_LEFT_PAREN = F9 D4 -EMOJI_RIGHT_PAREN = F9 D5 -EMOJI_UNION = F9 D6 @ ⊂ -EMOJI_GREATER_THAN = F9 D7 -EMOJI_LEFT_EYE = F9 D8 -EMOJI_RIGHT_EYE = F9 D9 -EMOJI_AT = F9 DA -EMOJI_SEMICOLON = F9 DB -EMOJI_PLUS = F9 DC -EMOJI_MINUS = F9 DD -EMOJI_EQUALS = F9 DE -EMOJI_SPIRAL = F9 DF -EMOJI_TONGUE = F9 E0 -EMOJI_TRIANGLE_OUTLINE = F9 E1 -EMOJI_ACUTE = F9 E2 -EMOJI_GRAVE = F9 E3 -EMOJI_CIRCLE = F9 E4 -EMOJI_TRIANGLE = F9 E5 -EMOJI_SQUARE = F9 E6 -EMOJI_HEART = F9 E7 -EMOJI_MOON = F9 E8 -EMOJI_NOTE = F9 E9 -EMOJI_BALL = F9 EA -EMOJI_BOLT = F9 EB -EMOJI_LEAF = F9 EC -EMOJI_FIRE = F9 ED -EMOJI_WATER = F9 EE -EMOJI_LEFT_FIST = F9 EF -EMOJI_RIGHT_FIST = F9 F0 -EMOJI_BIGWHEEL = F9 F1 -EMOJI_SMALLWHEEL = F9 F2 -EMOJI_SPHERE = F9 F3 -EMOJI_IRRITATED = F9 F4 -EMOJI_MISCHIEVOUS = F9 F5 -EMOJI_HAPPY = F9 F6 -EMOJI_ANGRY = F9 F7 -EMOJI_SURPRISED = F9 F8 -EMOJI_BIGSMILE = F9 F9 -EMOJI_EVIL = F9 FA -EMOJI_TIRED = F9 FB -EMOJI_NEUTRAL = F9 FC -EMOJI_SHOCKED = F9 FD -EMOJI_BIGANGER = F9 FE - -'\l' = FA @ scroll up window text -'\p' = FB @ new paragraph -'\n' = FE @ new line diff --git a/berry_fix/payload/common_syms/agb_flash.txt b/berry_fix/payload/common_syms/agb_flash.txt deleted file mode 100644 index cb421ec80d..0000000000 --- a/berry_fix/payload/common_syms/agb_flash.txt +++ /dev/null @@ -1,10 +0,0 @@ -gFlashTimeoutFlag -PollFlashStatus -WaitForFlashWrite -ProgramFlashSector -gFlash -ProgramFlashByte -gFlashNumRemainingBytes -EraseFlashChip -EraseFlashSector -gFlashMaxTime diff --git a/berry_fix/payload/common_syms/main.txt b/berry_fix/payload/common_syms/main.txt deleted file mode 100644 index b62c721240..0000000000 --- a/berry_fix/payload/common_syms/main.txt +++ /dev/null @@ -1,9 +0,0 @@ -gIntrTable -gHeldKeys -gNewKeys -gIntrVector -gUpdateSuccessful -gUnknown_3001194 -gUnknown_30011A0 -gMainCallbackState -gGameVersion diff --git a/berry_fix/payload/common_syms/rtc.txt b/berry_fix/payload/common_syms/rtc.txt deleted file mode 100644 index 7aafbe65df..0000000000 --- a/berry_fix/payload/common_syms/rtc.txt +++ /dev/null @@ -1,2 +0,0 @@ -gTimeSinceBerryUpdate -gRtcUTCTime diff --git a/berry_fix/payload/constants/gba_constants.inc b/berry_fix/payload/constants/gba_constants.inc deleted file mode 100644 index 9d59c8fcdd..0000000000 --- a/berry_fix/payload/constants/gba_constants.inc +++ /dev/null @@ -1,490 +0,0 @@ - .set PSR_USR_MODE, 0x00000010 - .set PSR_FIQ_MODE, 0x00000011 - .set PSR_IRQ_MODE, 0x00000012 - .set PSR_SVC_MODE, 0x00000013 - .set PSR_ABT_MODE, 0x00000017 - .set PSR_UND_MODE, 0x0000001b - .set PSR_SYS_MODE, 0x0000001f - .set PSR_MODE_MASK, 0x0000001f - .set PSR_T_BIT, 0x00000020 - .set PSR_F_BIT, 0x00000040 - .set PSR_I_BIT, 0x00000080 - - .set EWRAM_START, 0x02000000 - .set EWRAM_END, EWRAM_START + 0x40000 - .set IWRAM_START, 0x03000000 - .set IWRAM_END, IWRAM_START + 0x8000 - - .set PLTT, 0x5000000 - .set BG_PLTT, PLTT - .set OBJ_PLTT, PLTT + 0x200 - - .set VRAM, 0x6000000 - .set BG_VRAM, VRAM - .set OBJ_VRAM0, VRAM + 0x10000 @ text-mode BG - .set OBJ_VRAM1, VRAM + 0x14000 @ bitmap-mode BG - - .set OAM, 0x7000000 - - .set SOUND_INFO_PTR, 0x3007FF0 - .set INTR_CHECK, 0x3007FF8 - .set INTR_VECTOR, 0x3007FFC - - .set INTR_FLAG_VBLANK, 1 << 0 - .set INTR_FLAG_HBLANK, 1 << 1 - .set INTR_FLAG_VCOUNT, 1 << 2 - .set INTR_FLAG_TIMER0, 1 << 3 - .set INTR_FLAG_TIMER1, 1 << 4 - .set INTR_FLAG_TIMER2, 1 << 5 - .set INTR_FLAG_TIMER3, 1 << 6 - .set INTR_FLAG_SERIAL, 1 << 7 - .set INTR_FLAG_DMA0, 1 << 8 - .set INTR_FLAG_DMA1, 1 << 9 - .set INTR_FLAG_DMA2, 1 << 10 - .set INTR_FLAG_DMA3, 1 << 11 - .set INTR_FLAG_KEYPAD, 1 << 12 - .set INTR_FLAG_GAMEPAK, 1 << 13 - - .set VCOUNT_VBLANK, 160 - .set TOTAL_SCANLINES, 228 - - .set REG_BASE, 0x4000000 @ I/O register base address - -@ I/O register offsets - .set OFFSET_REG_DISPCNT, 0x0 - .set OFFSET_REG_DISPSTAT, 0x4 - .set OFFSET_REG_VCOUNT, 0x6 - .set OFFSET_REG_BG0CNT, 0x8 - .set OFFSET_REG_BG1CNT, 0xa - .set OFFSET_REG_BG2CNT, 0xc - .set OFFSET_REG_BG3CNT, 0xe - .set OFFSET_REG_BG0HOFS, 0x10 - .set OFFSET_REG_BG0VOFS, 0x12 - .set OFFSET_REG_BG1HOFS, 0x14 - .set OFFSET_REG_BG1VOFS, 0x16 - .set OFFSET_REG_BG2HOFS, 0x18 - .set OFFSET_REG_BG2VOFS, 0x1a - .set OFFSET_REG_BG3HOFS, 0x1c - .set OFFSET_REG_BG3VOFS, 0x1e - .set OFFSET_REG_BG2PA, 0x20 - .set OFFSET_REG_BG2PB, 0x22 - .set OFFSET_REG_BG2PC, 0x24 - .set OFFSET_REG_BG2PD, 0x26 - .set OFFSET_REG_BG2X_L, 0x28 - .set OFFSET_REG_BG2X_H, 0x2a - .set OFFSET_REG_BG2Y_L, 0x2c - .set OFFSET_REG_BG2Y_H, 0x2e - .set OFFSET_REG_BG3PA, 0x30 - .set OFFSET_REG_BG3PB, 0x32 - .set OFFSET_REG_BG3PC, 0x34 - .set OFFSET_REG_BG3PD, 0x36 - .set OFFSET_REG_BG3X_L, 0x38 - .set OFFSET_REG_BG3X_H, 0x3a - .set OFFSET_REG_BG3Y_L, 0x3c - .set OFFSET_REG_BG3Y_H, 0x3e - .set OFFSET_REG_WIN0H, 0x40 - .set OFFSET_REG_WIN1H, 0x42 - .set OFFSET_REG_WIN0V, 0x44 - .set OFFSET_REG_WIN1V, 0x46 - .set OFFSET_REG_WININ, 0x48 - .set OFFSET_REG_WINOUT, 0x4a - .set OFFSET_REG_MOSAIC, 0x4c - .set OFFSET_REG_BLDCNT, 0x50 - .set OFFSET_REG_BLDALPHA, 0x52 - .set OFFSET_REG_BLDY, 0x54 - - .set OFFSET_REG_SOUND1CNT, 0x60 - .set OFFSET_REG_SOUND1CNT_L, 0x60 - .set OFFSET_REG_NR10, 0x60 - .set OFFSET_REG_SOUND1CNT_H, 0x62 - .set OFFSET_REG_NR11, 0x62 - .set OFFSET_REG_NR12, 0x63 - .set OFFSET_REG_SOUND1CNT_X, 0x64 - .set OFFSET_REG_NR13, 0x64 - .set OFFSET_REG_NR14, 0x65 - .set OFFSET_REG_SOUND2CNT, 0x68 - .set OFFSET_REG_SOUND2CNT_L, 0x68 - .set OFFSET_REG_NR21, 0x68 - .set OFFSET_REG_NR22, 0x69 - .set OFFSET_REG_SOUND2CNT_H, 0x6c - .set OFFSET_REG_NR23, 0x6c - .set OFFSET_REG_NR24, 0x6d - .set OFFSET_REG_SOUND3CNT, 0x70 - .set OFFSET_REG_SOUND3CNT_L, 0x70 - .set OFFSET_REG_NR30, 0x70 - .set OFFSET_REG_SOUND3CNT_H, 0x72 - .set OFFSET_REG_NR31, 0x72 - .set OFFSET_REG_NR32, 0x73 - .set OFFSET_REG_SOUND3CNT_X, 0x74 - .set OFFSET_REG_NR33, 0x74 - .set OFFSET_REG_NR34, 0x75 - .set OFFSET_REG_SOUND4CNT, 0x78 - .set OFFSET_REG_SOUND4CNT_L, 0x78 - .set OFFSET_REG_NR41, 0x78 - .set OFFSET_REG_NR42, 0x79 - .set OFFSET_REG_SOUND4CNT_H, 0x7c - .set OFFSET_REG_NR43, 0x7c - .set OFFSET_REG_NR44, 0x7d - .set OFFSET_REG_SOUNDCNT, 0x80 - .set OFFSET_REG_SOUNDCNT_L, 0x80 - .set OFFSET_REG_NR50, 0x80 - .set OFFSET_REG_NR51, 0x81 - .set OFFSET_REG_SOUNDCNT_H, 0x82 - .set OFFSET_REG_SOUNDCNT_X, 0x84 - .set OFFSET_REG_NR52, 0x84 - .set OFFSET_REG_SOUNDBIAS, 0x88 - .set OFFSET_REG_WAVE_RAM, 0x90 - .set OFFSET_REG_WAVE_RAM0, 0x90 - .set OFFSET_REG_WAVE_RAM0_L, 0x90 - .set OFFSET_REG_WAVE_RAM0_H, 0x92 - .set OFFSET_REG_WAVE_RAM1, 0x94 - .set OFFSET_REG_WAVE_RAM1_L, 0x94 - .set OFFSET_REG_WAVE_RAM1_H, 0x96 - .set OFFSET_REG_WAVE_RAM2, 0x98 - .set OFFSET_REG_WAVE_RAM2_L, 0x98 - .set OFFSET_REG_WAVE_RAM2_H, 0x9a - .set OFFSET_REG_WAVE_RAM3, 0x9c - .set OFFSET_REG_WAVE_RAM3_L, 0x9c - .set OFFSET_REG_WAVE_RAM3_H, 0x9e - .set OFFSET_REG_FIFO, 0xa0 - .set OFFSET_REG_FIFO_A, 0xa0 - .set OFFSET_REG_FIFO_A_L, 0xa0 - .set OFFSET_REG_FIFO_A_H, 0xa2 - .set OFFSET_REG_FIFO_B, 0xa4 - .set OFFSET_REG_FIFO_B_L, 0xa4 - .set OFFSET_REG_FIFO_B_H, 0xa6 - - .set OFFSET_REG_DMA0, 0xb0 - .set OFFSET_REG_DMA0SAD, 0xb0 - .set OFFSET_REG_DMA0SAD_L, 0xb0 - .set OFFSET_REG_DMA0SAD_H, 0xb2 - .set OFFSET_REG_DMA0DAD, 0xb4 - .set OFFSET_REG_DMA0DAD_L, 0xb4 - .set OFFSET_REG_DMA0DAD_H, 0xb6 - .set OFFSET_REG_DMA0CNT, 0xb8 - .set OFFSET_REG_DMA0CNT_L, 0xb8 - .set OFFSET_REG_DMA0CNT_H, 0xba - .set OFFSET_REG_DMA1, 0xbc - .set OFFSET_REG_DMA1SAD, 0xbc - .set OFFSET_REG_DMA1SAD_L, 0xbc - .set OFFSET_REG_DMA1SAD_H, 0xbe - .set OFFSET_REG_DMA1DAD, 0xc0 - .set OFFSET_REG_DMA1DAD_L, 0xc0 - .set OFFSET_REG_DMA1DAD_H, 0xc2 - .set OFFSET_REG_DMA1CNT, 0xc4 - .set OFFSET_REG_DMA1CNT_L, 0xc4 - .set OFFSET_REG_DMA1CNT_H, 0xc6 - .set OFFSET_REG_DMA2, 0xc8 - .set OFFSET_REG_DMA2SAD, 0xc8 - .set OFFSET_REG_DMA2SAD_L, 0xc8 - .set OFFSET_REG_DMA2SAD_H, 0xca - .set OFFSET_REG_DMA2DAD, 0xcc - .set OFFSET_REG_DMA2DAD_L, 0xcc - .set OFFSET_REG_DMA2DAD_H, 0xce - .set OFFSET_REG_DMA2CNT, 0xd0 - .set OFFSET_REG_DMA2CNT_L, 0xd0 - .set OFFSET_REG_DMA2CNT_H, 0xd2 - .set OFFSET_REG_DMA3, 0xd4 - .set OFFSET_REG_DMA3SAD, 0xd4 - .set OFFSET_REG_DMA3SAD_L, 0xd4 - .set OFFSET_REG_DMA3SAD_H, 0xd6 - .set OFFSET_REG_DMA3DAD, 0xd8 - .set OFFSET_REG_DMA3DAD_L, 0xd8 - .set OFFSET_REG_DMA3DAD_H, 0xda - .set OFFSET_REG_DMA3CNT, 0xdc - .set OFFSET_REG_DMA3CNT_L, 0xdc - .set OFFSET_REG_DMA3CNT_H, 0xde - - .set OFFSET_REG_TM0CNT, 0x100 - .set OFFSET_REG_TM0CNT_L, 0x100 - .set OFFSET_REG_TM0CNT_H, 0x102 - .set OFFSET_REG_TM1CNT, 0x104 - .set OFFSET_REG_TM1CNT_L, 0x104 - .set OFFSET_REG_TM1CNT_H, 0x106 - .set OFFSET_REG_TM2CNT, 0x108 - .set OFFSET_REG_TM2CNT_L, 0x108 - .set OFFSET_REG_TM2CNT_H, 0x10a - .set OFFSET_REG_TM3CNT, 0x10c - .set OFFSET_REG_TM3CNT_L, 0x10c - .set OFFSET_REG_TM3CNT_H, 0x10e - - .set OFFSET_REG_SIOCNT, 0x128 - .set OFFSET_REG_SIODATA8, 0x12a - .set OFFSET_REG_SIODATA32, 0x120 - .set OFFSET_REG_SIOMLT_SEND, 0x12a - .set OFFSET_REG_SIOMLT_RECV, 0x120 - .set OFFSET_REG_SIOMULTI0, 0x120 - .set OFFSET_REG_SIOMULTI1, 0x122 - .set OFFSET_REG_SIOMULTI2, 0x124 - .set OFFSET_REG_SIOMULTI3, 0x126 - - .set OFFSET_REG_KEYINPUT, 0x130 - .set OFFSET_REG_KEYCNT, 0x132 - - .set OFFSET_REG_RCNT, 0x134 - - .set OFFSET_REG_JOYCNT, 0x140 - .set OFFSET_REG_JOYSTAT, 0x158 - .set OFFSET_REG_JOY_RECV, 0x150 - .set OFFSET_REG_JOY_RECV_L, 0x150 - .set OFFSET_REG_JOY_RECV_H, 0x152 - .set OFFSET_REG_JOY_TRANS, 0x154 - .set OFFSET_REG_JOY_TRANS_L, 0x154 - .set OFFSET_REG_JOY_TRANS_H, 0x156 - - .set OFFSET_REG_IME, 0x208 - .set OFFSET_REG_IE, 0x200 - .set OFFSET_REG_IF, 0x202 - - .set OFFSET_REG_WAITCNT, 0x204 - -@ I/O register addresses - .set REG_DISPCNT, REG_BASE + OFFSET_REG_DISPCNT - .set REG_DISPSTAT, REG_BASE + OFFSET_REG_DISPSTAT - .set REG_VCOUNT, REG_BASE + OFFSET_REG_VCOUNT - .set REG_BG0CNT, REG_BASE + OFFSET_REG_BG0CNT - .set REG_BG1CNT, REG_BASE + OFFSET_REG_BG1CNT - .set REG_BG2CNT, REG_BASE + OFFSET_REG_BG2CNT - .set REG_BG3CNT, REG_BASE + OFFSET_REG_BG3CNT - .set REG_BG0HOFS, REG_BASE + OFFSET_REG_BG0HOFS - .set REG_BG0VOFS, REG_BASE + OFFSET_REG_BG0VOFS - .set REG_BG1HOFS, REG_BASE + OFFSET_REG_BG1HOFS - .set REG_BG1VOFS, REG_BASE + OFFSET_REG_BG1VOFS - .set REG_BG2HOFS, REG_BASE + OFFSET_REG_BG2HOFS - .set REG_BG2VOFS, REG_BASE + OFFSET_REG_BG2VOFS - .set REG_BG3HOFS, REG_BASE + OFFSET_REG_BG3HOFS - .set REG_BG3VOFS, REG_BASE + OFFSET_REG_BG3VOFS - .set REG_BG2PA, REG_BASE + OFFSET_REG_BG2PA - .set REG_BG2PB, REG_BASE + OFFSET_REG_BG2PB - .set REG_BG2PC, REG_BASE + OFFSET_REG_BG2PC - .set REG_BG2PD, REG_BASE + OFFSET_REG_BG2PD - .set REG_BG2X_L, REG_BASE + OFFSET_REG_BG2X_L - .set REG_BG2X_H, REG_BASE + OFFSET_REG_BG2X_H - .set REG_BG2Y_L, REG_BASE + OFFSET_REG_BG2Y_L - .set REG_BG2Y_H, REG_BASE + OFFSET_REG_BG2Y_H - .set REG_BG3PA, REG_BASE + OFFSET_REG_BG3PA - .set REG_BG3PB, REG_BASE + OFFSET_REG_BG3PB - .set REG_BG3PC, REG_BASE + OFFSET_REG_BG3PC - .set REG_BG3PD, REG_BASE + OFFSET_REG_BG3PD - .set REG_BG3X_L, REG_BASE + OFFSET_REG_BG3X_L - .set REG_BG3X_H, REG_BASE + OFFSET_REG_BG3X_H - .set REG_BG3Y_L, REG_BASE + OFFSET_REG_BG3Y_L - .set REG_BG3Y_H, REG_BASE + OFFSET_REG_BG3Y_H - .set REG_WIN0H, REG_BASE + OFFSET_REG_WIN0H - .set REG_WIN1H, REG_BASE + OFFSET_REG_WIN1H - .set REG_WIN0V, REG_BASE + OFFSET_REG_WIN0V - .set REG_WIN1V, REG_BASE + OFFSET_REG_WIN1V - .set REG_WININ, REG_BASE + OFFSET_REG_WININ - .set REG_WINOUT, REG_BASE + OFFSET_REG_WINOUT - .set REG_MOSAIC, REG_BASE + OFFSET_REG_MOSAIC - .set REG_BLDCNT, REG_BASE + OFFSET_REG_BLDCNT - .set REG_BLDALPHA, REG_BASE + OFFSET_REG_BLDALPHA - .set REG_BLDY, REG_BASE + OFFSET_REG_BLDY - - .set REG_SOUND1CNT, REG_BASE + OFFSET_REG_SOUND1CNT - .set REG_SOUND1CNT_L, REG_BASE + OFFSET_REG_SOUND1CNT_L - .set REG_NR10, REG_BASE + OFFSET_REG_NR10 - .set REG_SOUND1CNT_H, REG_BASE + OFFSET_REG_SOUND1CNT_H - .set REG_NR11, REG_BASE + OFFSET_REG_NR11 - .set REG_NR12, REG_BASE + OFFSET_REG_NR12 - .set REG_SOUND1CNT_X, REG_BASE + OFFSET_REG_SOUND1CNT_X - .set REG_NR13, REG_BASE + OFFSET_REG_NR13 - .set REG_NR14, REG_BASE + OFFSET_REG_NR14 - .set REG_SOUND2CNT, REG_BASE + OFFSET_REG_SOUND2CNT - .set REG_SOUND2CNT_L, REG_BASE + OFFSET_REG_SOUND2CNT_L - .set REG_NR21, REG_BASE + OFFSET_REG_NR21 - .set REG_NR22, REG_BASE + OFFSET_REG_NR22 - .set REG_SOUND2CNT_H, REG_BASE + OFFSET_REG_SOUND2CNT_H - .set REG_NR23, REG_BASE + OFFSET_REG_NR23 - .set REG_NR24, REG_BASE + OFFSET_REG_NR24 - .set REG_SOUND3CNT, REG_BASE + OFFSET_REG_SOUND3CNT - .set REG_SOUND3CNT_L, REG_BASE + OFFSET_REG_SOUND3CNT_L - .set REG_NR30, REG_BASE + OFFSET_REG_NR30 - .set REG_SOUND3CNT_H, REG_BASE + OFFSET_REG_SOUND3CNT_H - .set REG_NR31, REG_BASE + OFFSET_REG_NR31 - .set REG_NR32, REG_BASE + OFFSET_REG_NR32 - .set REG_SOUND3CNT_X, REG_BASE + OFFSET_REG_SOUND3CNT_X - .set REG_NR33, REG_BASE + OFFSET_REG_NR33 - .set REG_NR34, REG_BASE + OFFSET_REG_NR34 - .set REG_SOUND4CNT, REG_BASE + OFFSET_REG_SOUND4CNT - .set REG_SOUND4CNT_L, REG_BASE + OFFSET_REG_SOUND4CNT_L - .set REG_NR41, REG_BASE + OFFSET_REG_NR41 - .set REG_NR42, REG_BASE + OFFSET_REG_NR42 - .set REG_SOUND4CNT_H, REG_BASE + OFFSET_REG_SOUND4CNT_H - .set REG_NR43, REG_BASE + OFFSET_REG_NR43 - .set REG_NR44, REG_BASE + OFFSET_REG_NR44 - .set REG_SOUNDCNT, REG_BASE + OFFSET_REG_SOUNDCNT - .set REG_SOUNDCNT_L, REG_BASE + OFFSET_REG_SOUNDCNT_L - .set REG_NR50, REG_BASE + OFFSET_REG_NR50 - .set REG_NR51, REG_BASE + OFFSET_REG_NR51 - .set REG_SOUNDCNT_H, REG_BASE + OFFSET_REG_SOUNDCNT_H - .set REG_SOUNDCNT_X, REG_BASE + OFFSET_REG_SOUNDCNT_X - .set REG_NR52, REG_BASE + OFFSET_REG_NR52 - .set REG_SOUNDBIAS, REG_BASE + OFFSET_REG_SOUNDBIAS - .set REG_WAVE_RAM, REG_BASE + OFFSET_REG_WAVE_RAM - .set REG_WAVE_RAM0, REG_BASE + OFFSET_REG_WAVE_RAM0 - .set REG_WAVE_RAM0_L, REG_BASE + OFFSET_REG_WAVE_RAM0_L - .set REG_WAVE_RAM0_H, REG_BASE + OFFSET_REG_WAVE_RAM0_H - .set REG_WAVE_RAM1, REG_BASE + OFFSET_REG_WAVE_RAM1 - .set REG_WAVE_RAM1_L, REG_BASE + OFFSET_REG_WAVE_RAM1_L - .set REG_WAVE_RAM1_H, REG_BASE + OFFSET_REG_WAVE_RAM1_H - .set REG_WAVE_RAM2, REG_BASE + OFFSET_REG_WAVE_RAM2 - .set REG_WAVE_RAM2_L, REG_BASE + OFFSET_REG_WAVE_RAM2_L - .set REG_WAVE_RAM2_H, REG_BASE + OFFSET_REG_WAVE_RAM2_H - .set REG_WAVE_RAM3, REG_BASE + OFFSET_REG_WAVE_RAM3 - .set REG_WAVE_RAM3_L, REG_BASE + OFFSET_REG_WAVE_RAM3_L - .set REG_WAVE_RAM3_H, REG_BASE + OFFSET_REG_WAVE_RAM3_H - .set REG_FIFO, REG_BASE + OFFSET_REG_FIFO - .set REG_FIFO_A, REG_BASE + OFFSET_REG_FIFO_A - .set REG_FIFO_A_L, REG_BASE + OFFSET_REG_FIFO_A_L - .set REG_FIFO_A_H, REG_BASE + OFFSET_REG_FIFO_A_H - .set REG_FIFO_B, REG_BASE + OFFSET_REG_FIFO_B - .set REG_FIFO_B_L, REG_BASE + OFFSET_REG_FIFO_B_L - .set REG_FIFO_B_H, REG_BASE + OFFSET_REG_FIFO_B_H - - .set REG_DMA0, REG_BASE + OFFSET_REG_DMA0 - .set REG_DMA0SAD, REG_BASE + OFFSET_REG_DMA0SAD - .set REG_DMA0SAD_L, REG_BASE + OFFSET_REG_DMA0SAD_L - .set REG_DMA0SAD_H, REG_BASE + OFFSET_REG_DMA0SAD_H - .set REG_DMA0DAD, REG_BASE + OFFSET_REG_DMA0DAD - .set REG_DMA0DAD_L, REG_BASE + OFFSET_REG_DMA0DAD_L - .set REG_DMA0DAD_H, REG_BASE + OFFSET_REG_DMA0DAD_H - .set REG_DMA0CNT, REG_BASE + OFFSET_REG_DMA0CNT - .set REG_DMA0CNT_L, REG_BASE + OFFSET_REG_DMA0CNT_L - .set REG_DMA0CNT_H, REG_BASE + OFFSET_REG_DMA0CNT_H - .set REG_DMA1, REG_BASE + OFFSET_REG_DMA1 - .set REG_DMA1SAD, REG_BASE + OFFSET_REG_DMA1SAD - .set REG_DMA1SAD_L, REG_BASE + OFFSET_REG_DMA1SAD_L - .set REG_DMA1SAD_H, REG_BASE + OFFSET_REG_DMA1SAD_H - .set REG_DMA1DAD, REG_BASE + OFFSET_REG_DMA1DAD - .set REG_DMA1DAD_L, REG_BASE + OFFSET_REG_DMA1DAD_L - .set REG_DMA1DAD_H, REG_BASE + OFFSET_REG_DMA1DAD_H - .set REG_DMA1CNT, REG_BASE + OFFSET_REG_DMA1CNT - .set REG_DMA1CNT_L, REG_BASE + OFFSET_REG_DMA1CNT_L - .set REG_DMA1CNT_H, REG_BASE + OFFSET_REG_DMA1CNT_H - .set REG_DMA2, REG_BASE + OFFSET_REG_DMA2 - .set REG_DMA2SAD, REG_BASE + OFFSET_REG_DMA2SAD - .set REG_DMA2SAD_L, REG_BASE + OFFSET_REG_DMA2SAD_L - .set REG_DMA2SAD_H, REG_BASE + OFFSET_REG_DMA2SAD_H - .set REG_DMA2DAD, REG_BASE + OFFSET_REG_DMA2DAD - .set REG_DMA2DAD_L, REG_BASE + OFFSET_REG_DMA2DAD_L - .set REG_DMA2DAD_H, REG_BASE + OFFSET_REG_DMA2DAD_H - .set REG_DMA2CNT, REG_BASE + OFFSET_REG_DMA2CNT - .set REG_DMA2CNT_L, REG_BASE + OFFSET_REG_DMA2CNT_L - .set REG_DMA2CNT_H, REG_BASE + OFFSET_REG_DMA2CNT_H - .set REG_DMA3, REG_BASE + OFFSET_REG_DMA3 - .set REG_DMA3SAD, REG_BASE + OFFSET_REG_DMA3SAD - .set REG_DMA3SAD_L, REG_BASE + OFFSET_REG_DMA3SAD_L - .set REG_DMA3SAD_H, REG_BASE + OFFSET_REG_DMA3SAD_H - .set REG_DMA3DAD, REG_BASE + OFFSET_REG_DMA3DAD - .set REG_DMA3DAD_L, REG_BASE + OFFSET_REG_DMA3DAD_L - .set REG_DMA3DAD_H, REG_BASE + OFFSET_REG_DMA3DAD_H - .set REG_DMA3CNT, REG_BASE + OFFSET_REG_DMA3CNT - .set REG_DMA3CNT_L, REG_BASE + OFFSET_REG_DMA3CNT_L - .set REG_DMA3CNT_H, REG_BASE + OFFSET_REG_DMA3CNT_H - - .set REG_TM0CNT, REG_BASE + OFFSET_REG_TM0CNT - .set REG_TM0CNT_L, REG_BASE + OFFSET_REG_TM0CNT_L - .set REG_TM0CNT_H, REG_BASE + OFFSET_REG_TM0CNT_H - .set REG_TM1CNT, REG_BASE + OFFSET_REG_TM1CNT - .set REG_TM1CNT_L, REG_BASE + OFFSET_REG_TM1CNT_L - .set REG_TM1CNT_H, REG_BASE + OFFSET_REG_TM1CNT_H - .set REG_TM2CNT, REG_BASE + OFFSET_REG_TM2CNT - .set REG_TM2CNT_L, REG_BASE + OFFSET_REG_TM2CNT_L - .set REG_TM2CNT_H, REG_BASE + OFFSET_REG_TM2CNT_H - .set REG_TM3CNT, REG_BASE + OFFSET_REG_TM3CNT - .set REG_TM3CNT_L, REG_BASE + OFFSET_REG_TM3CNT_L - .set REG_TM3CNT_H, REG_BASE + OFFSET_REG_TM3CNT_H - - .set REG_SIOCNT, REG_BASE + OFFSET_REG_SIOCNT - .set REG_SIODATA8, REG_BASE + OFFSET_REG_SIODATA8 - .set REG_SIODATA32, REG_BASE + OFFSET_REG_SIODATA32 - .set REG_SIOMLT_SEND, REG_BASE + OFFSET_REG_SIOMLT_SEND - .set REG_SIOMLT_RECV, REG_BASE + OFFSET_REG_SIOMLT_RECV - .set REG_SIOMULTI0, REG_BASE + OFFSET_REG_SIOMULTI0 - .set REG_SIOMULTI1, REG_BASE + OFFSET_REG_SIOMULTI1 - .set REG_SIOMULTI2, REG_BASE + OFFSET_REG_SIOMULTI2 - .set REG_SIOMULTI3, REG_BASE + OFFSET_REG_SIOMULTI3 - - .set REG_KEYINPUT, REG_BASE + OFFSET_REG_KEYINPUT - .set REG_KEYCNT, REG_BASE + OFFSET_REG_KEYCNT - - .set REG_RCNT, REG_BASE + OFFSET_REG_RCNT - - .set REG_JOYCNT, REG_BASE + OFFSET_REG_JOYCNT - .set REG_JOYSTAT, REG_BASE + OFFSET_REG_JOYSTAT - .set REG_JOY_RECV, REG_BASE + OFFSET_REG_JOY_RECV - .set REG_JOY_RECV_L, REG_BASE + OFFSET_REG_JOY_RECV_L - .set REG_JOY_RECV_H, REG_BASE + OFFSET_REG_JOY_RECV_H - .set REG_JOY_TRANS, REG_BASE + OFFSET_REG_JOY_TRANS - .set REG_JOY_TRANS_L, REG_BASE + OFFSET_REG_JOY_TRANS_L - .set REG_JOY_TRANS_H, REG_BASE + OFFSET_REG_JOY_TRANS_H - - .set REG_IME, REG_BASE + OFFSET_REG_IME - .set REG_IE, REG_BASE + OFFSET_REG_IE - .set REG_IF, REG_BASE + OFFSET_REG_IF - - .set REG_WAITCNT, REG_BASE + OFFSET_REG_WAITCNT - -@ DMA register constants - - .set DMA_DEST_INC, 0x0000 - .set DMA_DEST_DEC, 0x0020 - .set DMA_DEST_FIXED, 0x0040 - .set DMA_DEST_RELOAD, 0x0060 - .set DMA_SRC_INC, 0x0000 - .set DMA_SRC_DEC, 0x0080 - .set DMA_SRC_FIXED, 0x0100 - .set DMA_REPEAT, 0x0200 - .set DMA_16BIT, 0x0000 - .set DMA_32BIT, 0x0400 - .set DMA_DREQ_ON, 0x0800 - .set DMA_START_NOW, 0x0000 - .set DMA_START_VBLANK, 0x1000 - .set DMA_START_HBLANK, 0x2000 - .set DMA_START_SPECIAL, 0x3000 - .set DMA_INTR_ENABLE, 0x4000 - .set DMA_ENABLE, 0x8000 - -@ OAM attribute constants - - .set OAM_OBJ_NORMAL, 0x00000000 - .set OAM_OBJ_BLEND, 0x00000400 - .set OAM_OBJ_WINDOW, 0x00000800 - - .set OAM_AFFINE_NONE, 0x00000000 - .set OAM_AFFINE_NORMAL_SIZE, 0x00000100 - .set OAM_OBJ_DISABLED, 0x00000200 - .set OAM_AFFINE_DOUBLE_SIZE, 0x00000300 - - .set OAM_MOSAIC_OFF, 0x00000000 - .set OAM_MOSAIC_ON, 0x00001000 - - .set OAM_4BPP, 0x00000000 - .set OAM_8BPP, 0x00002000 - - .set OAM_H_FLIP, 0x10000000 - .set OAM_V_FLIP, 0x20000000 - - .set OAM_SQUARE, 0x00000000 - .set OAM_H_RECTANGLE, 0x00004000 - .set OAM_V_RECTANGLE, 0x00008000 - .set OAM_SIZE_0, 0x00000000 - .set OAM_SIZE_1, 0x40000000 - .set OAM_SIZE_2, 0x80000000 - .set OAM_SIZE_3, 0xc0000000 - - .set OAM_SIZE_8x8, OAM_SIZE_0 | OAM_SQUARE - .set OAM_SIZE_16x16, OAM_SIZE_1 | OAM_SQUARE - .set OAM_SIZE_32x32, OAM_SIZE_2 | OAM_SQUARE - .set OAM_SIZE_64x64, OAM_SIZE_3 | OAM_SQUARE - - .set OAM_SIZE_16x8, OAM_SIZE_0 | OAM_H_RECTANGLE - .set OAM_SIZE_32x8, OAM_SIZE_1 | OAM_H_RECTANGLE - .set OAM_SIZE_32x16, OAM_SIZE_2 | OAM_H_RECTANGLE - .set OAM_SIZE_64x32, OAM_SIZE_3 | OAM_H_RECTANGLE - - .set OAM_SIZE_8x16, OAM_SIZE_0 | OAM_V_RECTANGLE - .set OAM_SIZE_8x32, OAM_SIZE_1 | OAM_V_RECTANGLE - .set OAM_SIZE_16x32, OAM_SIZE_2 | OAM_V_RECTANGLE - .set OAM_SIZE_32x64, OAM_SIZE_3 | OAM_V_RECTANGLE diff --git a/berry_fix/payload/graphics/debug_digits.png b/berry_fix/payload/graphics/debug_digits.png deleted file mode 100644 index edf0d36c96f0e22f213b6ea63ccdaf77acdef638..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^96%hv0wfrYc($DZQn{Wkjv*3LODA09Wl-dBzFB`` zlVdg0qs&EhCQbUf8BM1(PAL3RD>?Nk^zn_1vy*N<@ly7zNx!eZU3Bl`k>(9t$Wrs?N=11*XBQM{ya-RJmLRm_9IbdeJ`9p QtAHHf>FVdQ&MBb@00o6a2><{9 diff --git a/berry_fix/payload/graphics/msg_box.png b/berry_fix/payload/graphics/msg_box.png deleted file mode 100644 index 00d1bbe37ed295a83eabd4dd35f4356fbd9f0ba1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2631 zcmZ`*c{J2}8~@G>W6RK?FpRyp2%#8UTMX0HSduM!VU#RGOd`K)8;qqa$!$pXr8ip= zvV_S}NvXI@*_W(i$)36HdEYfNZ%~{ z?6^Eb&!B&n#ClxIpgUfpJ@#JS2Y~A%-q_HFOj~jqsh&E?-~7wmG0221p3~_B+%nUQ zRIxw4lI$52*h_uW+kyu3_mNO<5iE}+1>V+L zyPSTnU9a_vy-mr~ik1F?3+ASD#Igcr%gsS}MTsMnV{{kys^;kkvGQvbL~peEUgz^_ zKprz0aBE;`D7*HPowmKNy*i~JDM0l?lq3-LY~Mdg=ZP&90EIm6jV63{Z?xyk{Ru4> zd`c&@aw=WjX1?FF_b!=~zPfIX8=0G1c^CHQ71OoIOGRru6n2fGgDXRm$I-ZYe+ufU z4otFo{4$g{P@1A1W<52(-fpn;y`_ced^SP=@KtskxBYPhSbc@(Ewb{@PrrxtAA?m* zmvn}ZV#_;UBLJ#9x6e$u^p=C5g-CdX!+W>j>{D`jEXscL90L>s4y|xrbjeW(K;wUxh@lf%^PF)tJwQ zO>Dqjiv+F{naX*`1Bnxod8o-Y?I43ZOOnhz2wcIn24WWG-4YoslU=J^yq*u#ECU4U32g;n;<_f76g}FHwC5?&!zB#j5vc^Kwju&Tgbd?Po zMkA(gBysvzo73^)qTP^R0U`Zg@fVCn5Ro=E^t)xeYF8*G62*5W7^INtF7 z5B5+obA}ovLDb80><*9i31B~FeBxsNhJBoguv=FV0HRuf%@!{&X90r_UJ{)7PMomq z;Ik?v5sa-3dyth2SL09fmsQkSWqAPIMid{!<;SLaz2fV%@{u!qkWU>91c!Qw&Q(_i z=RMVE^58J?WB9S|qXn&M{0=mr_N$s2(0Z3P>$fW z>x<9YE|IJBR@|J|$s7D~Gyx_;1_r%~L=Kz1Cdvzkdx#P>(Ff2gI5PUI} zA$9tZIK@RgvQVyMQGoH7aHXuEy8VSNP(bcdZL|4oy8@BAr`t}6kjCc3k6;@qheI9H z3&i*eX<|886Gk2N4~uzi>^q*PoVS$K8SeFaxKG(UHDcvYoxhQe7R1=Rc$lttpOVvw zO?rvtM%;$bci_H)sHWB9Q*fgoa;_T-<^LnSz>t>eAuX_4hg}vM7DJgC8iNe>vsSj# z53gr*r3NTPEHB?C-Qm!1ZES5yNuAnV<<*=`W@Iy(I6Eq1L-|&^6#=u4+apC_eq`SDGL>;~ENd&nLr%JQKk0#fb7lkiOHx*=pZ>{NKAT&P z^tA+p(s_cy=K8p{1-I40rw#!gebl^4@y@oASh+=k5f+v=xHIY8E2v*MWEE-7#V-rd8GTAvV+U!N2k^G0a6Dxz@Y*9> ztTo)=q(mV%Q}i1ZrVa#!KFk!2;`$zyuGwd5&SyPMI~i7wDI6?uwl}}HD-Oa}x&T@D zSR#i(?^4A#IgbAE)sS)sK*D=wgEF3wxdACR^TqZ(hXAS9P5$@RvFee9y=AI?xlAb| z{?;Bl^CQAPskcxZJ%tZK`uC_5hoiaWuE()WyI-K)wEbh2#sk= zL|vF9^5uH~Xo{hiw$%G*8F6vezlgiPX|QeRcB4z6QCr%}`-*|9Mh^sT8E))qcJI)# z^{uCMl@V^v4d(ZTI#q&#&0nkx-LTZg>&*S6cjz*0WOTgJlsN7ZyLwPkJ&$Q4`~#xK z$+WEqy-sPxRh$hQAan0$2JLkYmy^Ysa}*5rmBx6-z4`scK?at8u(g}cp;pIJ52g0} ztz|Xc*`@}FKe$4>`>fM=(*tB;<3uzR5eD+Uc%3#XWg&*TWnOn$_t)*m4ep>{R^(Bm zEFLw@h$AODR8EP?OjQeT%V*M$M0xhhEzKbk<`G*u0NF!Ac}JOMCvb4|CO@n)l+s3DZR!Z zc-A{zbnPJ3a`Dj{`uZ5c>(0yZftBHcjUCyS_kITK#BYl3GH}zdfKQ`$w<2RaSWe1c zc3|p}Z%XuMN7nIVnZ0q^2vc;AVeJY^#G4R|pBlME{RL(=#7qDH diff --git a/berry_fix/payload/graphics/msg_box.tilemap b/berry_fix/payload/graphics/msg_box.tilemap deleted file mode 100644 index 5b82401bad50d7be7f5ca611a9fd6c0eec53d25a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeI01&|a+6o&tA;SO$r!`)qiy9alIy99T)K#QAv2TI*0p|g&fF7=% zKJszuEy$u!3T;32RTzbppR5X}@QNURMN}k3Run~5G(}eo#Z)ZWEUs$r?kLtD^rL=K zZ}m}M^;3Th&_E5+U=7hw4byOq&`6EaXpPZWjnnu5y}wHzTX7Uu@f2SPJlEVd{^@9+ zp40vWP1Gb!))Y;Z&1&;EwvSs@&+o<+L+@uZS?vz8myq~3?}2}V{~UAhW-;$Qn{(R1 zT`vchOjSFu9L17QiIiALlvK%-Tq%@Nsgzo2^p(;oozg3VGAffYD~qx!TOh(1{IdM4 zX_~GXnyFcutvQ;jd77^UTBt=@tR-5iWm>KkTB%>O>TmSfl|wm|OSzRtd6iH3^|h;) zubp0w&AtEd=tMr{gY#i=)l`(fMATMMY53aPM)sHlpmxJsy` zN~yHUsI0zGIh9uhRa7NaRuxrMHP6^C{ss5=@%H?K9=~NM%QuvxJQb)&B`Q;es#K#o zHK<7~YEy^0d`ms*(}0FFqA`w0FrL3!=dQbeBjvr(F->l!YMO(E^+qFYGwM)CTM|-tT`*lDEbx4PGL`QW@$8|y{ zKZ-wDtE+};s+MZ2j_T@L)l+>nP(w9RV>MAzHB)o7P)oH^Yqe2ZwKGOA)^F=6oz@wh z)w$5;bwL+(Ntbm+S9ML-bwf9GOSg4LcXdzq^*|5xNUj{g&|BK8gF32{I;)GmQ&)A< z_v)@5>Zx9yxjOv)ah2=-Eq~~-p6IEb>A7C$rC#Z^-sr8~>HVkZO=cf9zmWXHf&ZYs z|Bf-dS%NzM|GPfu{B1&0n$esVw4@cSX+vAu(Vh-;q!XR#!gq9~8{gBN9`vM_lfD7` zy}?axahp5bLT`Ri2M z?Hk`upRG4Y=+>Lyw=*+x^Vh>~eKNnDGjRJanDaZV&1?j>7{cO*m2iY70{%oK5|N2QRH7NwwR!R|_xt|?Kk^g3=|f-o(VqbfWDtWH z!cc}WoDqy<6r-Ivuc3DF$H?EJ6N8wcoBRv_&NG39qg{)*FyJu`Se}85g)0x3c zW-*&N%w-<)S-?UTv6v++Wf{v^!AgE%6~AKp@c%DM4sw!<+~grI`N+@L6rdo5C`=KG zQjFr1pd_Uz?Xm3gfpPzq-&oBW*0PTEY+xgs*v#*2VJq9%&JK36i{0#D@89b~@?X;o z{}TK%_5J0_KaBV_wSN2C{N3xn$@SZlKbidga_d9l&%5#Gt~34^B(vT{4;Oe X=8W7By?GCWJU^LcufywK!he4PFQf!E diff --git a/berry_fix/payload/include/constants/game_stat.h b/berry_fix/payload/include/constants/game_stat.h deleted file mode 100644 index 47d703d853..0000000000 --- a/berry_fix/payload/include/constants/game_stat.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef GUARD_CONSTANTS_GAME_STAT_H -#define GUARD_CONSTANTS_GAME_STAT_H - -#define GAME_STAT_SAVED_GAME 0 -#define GAME_STAT_FIRST_HOF_PLAY_TIME 1 -#define GAME_STAT_STARTED_TRENDS 2 -#define GAME_STAT_PLANTED_BERRIES 3 -#define GAME_STAT_TRADED_BIKES 4 -#define GAME_STAT_STEPS 5 -#define GAME_STAT_GOT_INTERVIEWED 6 -#define GAME_STAT_TOTAL_BATTLES 7 -#define GAME_STAT_WILD_BATTLES 8 -#define GAME_STAT_TRAINER_BATTLES 9 -#define GAME_STAT_ENTERED_HOF 10 -#define GAME_STAT_POKEMON_CAPTURES 11 -#define GAME_STAT_FISHING_CAPTURES 12 -#define GAME_STAT_HATCHED_EGGS 13 -#define GAME_STAT_EVOLVED_POKEMON 14 -#define GAME_STAT_USED_POKECENTER 15 -#define GAME_STAT_RESTED_AT_HOME 16 -#define GAME_STAT_ENTERED_SAFARI_ZONE 17 -#define GAME_STAT_USED_CUT 18 -#define GAME_STAT_USED_ROCK_SMASH 19 -#define GAME_STAT_MOVED_SECRET_BASE 20 -#define GAME_STAT_POKEMON_TRADES 21 -#define GAME_STAT_UNKNOWN_22 22 -#define GAME_STAT_LINK_BATTLE_WINS 23 -#define GAME_STAT_LINK_BATTLE_LOSSES 24 -#define GAME_STAT_LINK_BATTLE_DRAWS 25 -#define GAME_STAT_USED_SPLASH 26 -#define GAME_STAT_USED_STRUGGLE 27 -#define GAME_STAT_SLOT_JACKPOTS 28 -#define GAME_STAT_CONSECUTIVE_ROULETTE_WINS 29 -#define GAME_STAT_ENTERED_BATTLE_TOWER 30 -#define GAME_STAT_UNKNOWN_31 31 -#define GAME_STAT_BATTLE_TOWER_BEST_STREAK 32 -#define GAME_STAT_POKEBLOCKS 33 -#define GAME_STAT_POKEBLOCKS_WITH_FRIENDS 34 -#define GAME_STAT_WON_LINK_CONTEST 35 -#define GAME_STAT_ENTERED_CONTEST 36 -#define GAME_STAT_WON_CONTEST 37 -#define GAME_STAT_SHOPPED 38 -#define GAME_STAT_USED_ITEMFINDER 39 -#define GAME_STAT_GOT_RAINED_ON 40 -#define GAME_STAT_CHECKED_POKEDEX 41 -#define GAME_STAT_RECEIVED_RIBBONS 42 -#define GAME_STAT_JUMPED_DOWN_LEDGES 43 -#define GAME_STAT_WATCHED_TV 44 -#define GAME_STAT_CHECKED_CLOCK 45 -#define GAME_STAT_WON_POKEMON_LOTTERY 46 -#define GAME_STAT_USED_DAYCARE 47 -#define GAME_STAT_RODE_CABLE_CAR 48 -#define GAME_STAT_ENTERED_HOT_SPRINGS 49 -#define NUM_GAME_STATS 50 - -#endif // GUARD_CONSTANTS_GAME_STAT_H diff --git a/berry_fix/payload/include/constants/vars.h b/berry_fix/payload/include/constants/vars.h deleted file mode 100644 index 4b40c1d8c3..0000000000 --- a/berry_fix/payload/include/constants/vars.h +++ /dev/null @@ -1,196 +0,0 @@ -#ifndef GUARD_CONSTANTS_VARS_H -#define GUARD_CONSTANTS_VARS_H - -#define VAR_0x3F20 0x3F20 - -#define VARS_START 0x4000 - -// temporary vars -// The first 0x10 vars are are temporary--they are cleared every time a map is loaded. -#define VAR_TEMP_0 0x4000 -#define VAR_TEMP_1 0x4001 -#define VAR_TEMP_2 0x4002 -#define VAR_TEMP_3 0x4003 -#define VAR_TEMP_4 0x4004 -#define VAR_TEMP_5 0x4005 -#define VAR_TEMP_6 0x4006 -#define VAR_TEMP_7 0x4007 -#define VAR_TEMP_8 0x4008 -#define VAR_TEMP_9 0x4009 -#define VAR_TEMP_A 0x400A -#define VAR_TEMP_B 0x400B -#define VAR_TEMP_C 0x400C -#define VAR_TEMP_D 0x400D -#define VAR_TEMP_E 0x400E -#define VAR_TEMP_F 0x400F - -// object gfx id vars -// These 0x10 vars are used to dynamically control a event object's sprite. -// For example, the rival's sprite id is dynamically set based on the player's gender. -// See VarGetEventObjectGraphicsId(). -#define VAR_OBJ_GFX_ID_0 0x4010 -#define VAR_OBJ_GFX_ID_1 0x4011 -#define VAR_OBJ_GFX_ID_2 0x4012 -#define VAR_OBJ_GFX_ID_3 0x4013 -#define VAR_OBJ_GFX_ID_4 0x4014 -#define VAR_OBJ_GFX_ID_5 0x4015 -#define VAR_OBJ_GFX_ID_6 0x4016 -#define VAR_OBJ_GFX_ID_7 0x4017 -#define VAR_OBJ_GFX_ID_8 0x4018 -#define VAR_OBJ_GFX_ID_9 0x4019 -#define VAR_OBJ_GFX_ID_A 0x401A -#define VAR_OBJ_GFX_ID_B 0x401B -#define VAR_OBJ_GFX_ID_C 0x401C -#define VAR_OBJ_GFX_ID_D 0x401D -#define VAR_OBJ_GFX_ID_E 0x401E -#define VAR_OBJ_GFX_ID_F 0x401F - -// general purpose vars -#define VAR_RECYCLE_GOODS 0x4020 -#define VAR_REPEL_STEP_COUNT 0x4021 -#define VAR_ICE_STEP_COUNT 0x4022 -#define VAR_STARTER_MON 0x4023 // 0=Treecko, 1=Torchic, 2=Mudkip -#define VAR_MIRAGE_RND_H 0x4024 -#define VAR_MIRAGE_RND_L 0x4025 -#define VAR_SECRET_BASE_MAP 0x4026 -#define VAR_CYCLING_ROAD_RECORD_COLLISIONS 0x4027 -#define VAR_CYCLING_ROAD_RECORD_TIME_L 0x4028 -#define VAR_CYCLING_ROAD_RECORD_TIME_H 0x4029 -#define VAR_HAPPINESS_STEP_COUNTER 0x402A -#define VAR_POISON_STEP_COUNTER 0x402B -#define VAR_RESET_RTC_ENABLE 0x402C -#define VAR_ENIGMA_BERRY_AVAILABLE 0x402D - -#define VAR_DAYS 0x4040 -#define VAR_FANCLUB_UNKNOWN_1 0x4041 // TODO: document these two fanclub vars -#define VAR_FANCLUB_UNKNOWN_2 0x4042 -#define VAR_DEPT_STORE_FLOOR 0x4043 -#define VAR_TRICK_HOUSE_ROOMS_COMPLETED 0x4044 -#define VAR_LOTTERY_PRIZE 0x4045 -#define VAR_NATIONAL_DEX 0x4046 -#define VAR_SHROOMISH_SIZE_RECORD 0x4047 -#define VAR_ASH_GATHER_COUNT 0x4048 -#define VAR_BIRCH_STATE 0x4049 -#define VAR_CRUISE_STEP_COUNT 0x404A -#define VAR_LOTTERY_RND_L 0x404B -#define VAR_LOTTERY_RND_H 0x404C - -#define VAR_BARBOACH_SIZE_RECORD 0x404F -#define VAR_LITTLEROOT_STATE 0x4050 -#define VAR_ROUTE102_ACCESSIBLE 0x4051 - -#define VAR_LAVARIDGE_RIVAL_STATE 0x4053 -#define VAR_CURRENT_SECRET_BASE 0x4054 - -#define VAR_PETALBURG_STATE 0x4057 -#define VAR_SLATEPORT_STATE 0x4058 - -#define VAR_RUSTBORO_STATE 0x405A - -#define VAR_SOOTOPOLIS_STATE 0x405E - -#define VAR_ROUTE101_STATE 0x4060 - -#define VAR_ROUTE103_STATE 0x4062 - -#define VAR_ROUTE110_STATE 0x4069 - -#define VAR_ROUTE116_STATE 0x406F - -#define VAR_ROUTE118_STATE 0x4071 -#define VAR_ROUTE119_STATE 0x4072 - -#define VAR_ROUTE121_STATE 0x4074 -#define VAR_ROUTE128_STATE 0x407B - -#define VAR_LITTLEROOT_HOUSES_STATE 0x4082 // TODO: needs more investigation - -#define VAR_BIRCH_LAB_STATE 0x4084 -#define VAR_PETALBURG_GYM_STATE 0x4085 -#define VAR_LINK_CONTEST_ROOM_STATE 0x4086 -#define VAR_CABLE_CLUB_STATE 0x4087 -#define VAR_CONTEST_LOCATION 0x4088 -#define VAR_MAP_SCENE_SIX_ISLAND_POKEMON_CENTER_1F 0x4089 // TODO: related to decorations -#define VAR_CONTEST_PRIZE_PICKUP 0x408A - -#define VAR_LITTLEROOT_HOUSES_STATE_2 0x408C // TODO: needs more investigation -#define VAR_LITTLEROOT_RIVAL_STATE 0x408D -#define VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE 0x408E -#define VAR_DEVON_CORP_3F_STATE 0x408F -#define VAR_BRINEY_HOUSE_STATE 0x4090 - -#define VAR_LITTLEROOT_INTRO_STATE 0x4092 -#define VAR_MAUVILLE_GYM_STATE 0x4093 -#define VAR_LILYCOVE_MUSEUM_2F_STATE 0x4094 -#define VAR_LILYCOVE_FAN_CLUB_STATE 0x4095 -#define VAR_BRINEY_LOCATION 0x4096 -#define VAR_0x4097 0x4097 // TODO: related to creating new secret base -#define VAR_PETALBURG_WOODS_STATE 0x4098 -#define VAR_LILYCOVE_CONTEST_LOBBY_STATE 0x4099 -#define VAR_RUSTURF_TUNNEL_STATE 0x409a -#define VAR_CAVE_OF_ORIGIN_B4F_STATE 0x409B -#define VAR_ELITE_4_STATE 0x409C - -#define VAR_SLATEPORT_HARBOR_STATE 0x40A0 - -#define VAR_SEAFLOOR_CAVERN_STATE 0x40A2 -#define VAR_CABLE_CAR_STATION_STATE 0x40A3 -#define VAR_SAFARI_ZONE_STATE 0x40A4 -#define VAR_TRICK_HOUSE_ENTRANCE_STATE 0x40A5 -#define VAR_TRICK_HOUSE_ENTRANCE_STATE_2 0x40A6 -#define VAR_TRICK_HOUSE_ENTRANCE_STATE_3 0x40A7 - -#define VAR_CYCLING_CHALLENGE_STATE 0x40A9 -#define VAR_SLATEPORT_MUSEUM_1F_STATE 0x40AA -#define VAR_TRICK_HOUSE_PUZZLE_1_STATE 0x40AB -#define VAR_TRICK_HOUSE_PUZZLE_2_STATE 0x40AC -#define VAR_TRICK_HOUSE_PUZZLE_3_STATE 0x40AD -#define VAR_TRICK_HOUSE_PUZZLE_4_STATE 0x40AE -#define VAR_TRICK_HOUSE_PUZZLE_5_STATE 0x40AF -#define VAR_TRICK_HOUSE_PUZZLE_6_STATE 0x40B0 -#define VAR_TRICK_HOUSE_PUZZLE_7_STATE 0x40B1 -#define VAR_TRICK_HOUSE_PUZZLE_8_STATE 0x40B2 -#define VAR_WEATHER_INSTITUTE_STATE 0x40B3 -#define VAR_PORTHOLE_STATE 0x40B4 -#define VAR_TRICK_HOUSE_STATE 0x40B5 // TODO: needs some further investigation -#define VAR_TRICK_HOUSE_PUZZLE_7_STATE_2 0x40B6 -#define VAR_SLATEPORT_FAN_CLUB_STATE 0x40B7 - -#define VAR_MT_PYRE_STATE 0x40B9 -#define VAR_NEW_MAUVILLE_STATE 0x40BA - -#define VAR_BRAVO_TRAINER_BATTLE_TOWER_ON 0x40BC -#define VAR_JAGGED_PASS_VOLCANIC_ASH_WEATHER 0x40BD -#define VAR_GLASS_WORKSHOP_STATE 0x40BE -#define VAR_METEOR_FALLS_STATE 0x40BF -#define VAR_GAME_CORNER_STATE 0x40C0 -#define VAR_TRICK_HOUSE_PRIZE_PICKUP 0x40C1 -#define VAR_PACIFIDLOG_TM_RECEIVED_DAY 0x40C2 -#define VAR_VICTORY_ROAD_1F_STATE 0x40C3 -#define VAR_FOSSIL_RESURRECTION_STATE 0x40C4 -#define VAR_WHICH_FOSSIL_REVIVED 0x40C5 -#define VAR_STEVENS_HOUSE_STATE 0x40C6 -#define VAR_OLDALE_STATE 0x40C7 - -// special vars -// They are commonly used as parameters to commands, or return values from commands. -#define VAR_SPECIAL_0 0x8000 -#define VAR_SPECIAL_1 0x8001 -#define VAR_SPECIAL_2 0x8002 -#define VAR_SPECIAL_3 0x8003 -#define VAR_SPECIAL_4 0x8004 -#define VAR_SPECIAL_5 0x8005 -#define VAR_SPECIAL_6 0x8006 -#define VAR_SPECIAL_7 0x8007 -#define VAR_SPECIAL_8 0x8008 -#define VAR_SPECIAL_9 0x8009 -#define VAR_SPECIAL_A 0x800A -#define VAR_SPECIAL_B 0x800B -#define FACING 0x800C -#define RESULT 0x800D -#define ITEM_ID 0x800E -#define LAST_TALKED 0x800F -#define CONTEST_RANK 0x8010 -#define CONTEST_CATEGORY 0x8011 - -#endif // GUARD_CONSTANTS_VARS_H diff --git a/berry_fix/payload/include/flash.h b/berry_fix/payload/include/flash.h deleted file mode 100644 index 7fc35896d0..0000000000 --- a/berry_fix/payload/include/flash.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef GUARD_FLASH_H -#define GUARD_FLASH_H - -#include "gba/gba.h" - -enum -{ - SECTOR_DAMAGED, - SECTOR_OK, - SECTOR_CHECK, // unused -}; - -enum MsgBoxUpdateMessage -{ - MSGBOX_WILL_NOW_UPDATE = 0, - MSGBOX_HAS_BEEN_UPDATED, - MSGBOX_UNABLE_TO_UPDATE, - MSGBOX_NO_NEED_TO_UPDATE, - MSGBOX_UPDATING -}; - -struct SaveSector -{ - u8 data[0xFF4]; - u16 id; - u16 checksum; - u32 signature; - u32 counter; -}; // size is 0x1000 - -// headless save section? -struct UnkSaveSection -{ - u8 data[0xFF4]; - u32 signature; -}; // size is 0xFF8 - -#define eSaveSection ((struct SaveSector *)0x2020000) - -#define NUM_SECTORS_PER_SAVE_SLOT 14 // Number of sectors occupied by a save slot -#define FILE_SIGNATURE 0x08012025 - -#define SAVE_STATUS_EMPTY 0 -#define SAVE_STATUS_OK 1 -#define SAVE_STATUS_NO_FLASH 4 -#define SAVE_STATUS_ERROR 0xFF - -bool32 flash_maincb_ident_is_valid(void); -bool8 flash_maincb_read_save(u32); -void msg_load_gfx(void); -void msg_display(enum MsgBoxUpdateMessage); -bool32 flash_maincb_check_need_reset_pacifidlog_tm(void); -bool32 flash_maincb_reset_pacifidlog_tm(void); - -#endif //GUARD_FLASH_H diff --git a/berry_fix/payload/include/gba/defines.h b/berry_fix/payload/include/gba/defines.h deleted file mode 100644 index 4037af5846..0000000000 --- a/berry_fix/payload/include/gba/defines.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef GUARD_GBA_DEFINES_H -#define GUARD_GBA_DEFINES_H - -#include - -#define TRUE 1 -#define FALSE 0 - -#define BSS_DATA __attribute__((section(".bss"))) -#define IWRAM_DATA __attribute__((section("iwram_data"))) -#define EWRAM_DATA __attribute__((section("ewram_data"))) -#define UNUSED __attribute__((unused)) -#define NAKED __attribute__((naked)) - -#define ALIGNED(n) __attribute__((aligned(n))) - -#define SOUND_INFO_PTR (*(struct SoundInfo **)0x3007FF0) -#define INTR_CHECK (*(u16 *)0x3007FF8) -#define INTR_VECTOR (*(void **)0x3007FFC) - -#define EWRAM_START 0x02000000 -#define EWRAM_END (EWRAM_START + 0x40000) -#define IWRAM_START 0x03000000 -#define IWRAM_END (IWRAM_START + 0x8000) - -#define PLTT 0x5000000 -#define PLTT_SIZE 0x400 - -#define BG_PLTT PLTT -#define BG_PLTT_SIZE 0x200 - -#define OBJ_PLTT (PLTT + 0x200) -#define OBJ_PLTT_SIZE 0x200 - -#define VRAM 0x6000000 -#define VRAM_SIZE 0x18000 - -#define BG_VRAM VRAM -#define BG_VRAM_SIZE 0x10000 -#define BG_CHAR_SIZE 0x4000 -#define BG_SCREEN_SIZE 0x800 -#define BG_CHAR_ADDR(n) (void *)(BG_VRAM + (0x4000 * (n))) -#define BG_SCREEN_ADDR(n) (void *)(BG_VRAM + (0x800 * (n))) -#define BG_TILE_ADDR(n) (void *)(BG_VRAM + (0x80 * (n))) - -#define BG_TILE_H_FLIP(n) (0x400 + (n)) -#define BG_TILE_V_FLIP(n) (0x800 + (n)) - -// text-mode BG -#define OBJ_VRAM0 (void *)(VRAM + 0x10000) -#define OBJ_VRAM0_SIZE 0x8000 - -// bitmap-mode BG -#define OBJ_VRAM1 (void *)(VRAM + 0x14000) -#define OBJ_VRAM1_SIZE 0x4000 - -#define OAM 0x7000000 -#define OAM_SIZE 0x400 - -#define ROM_HEADER_SIZE 0xC0 - -#define DISPLAY_WIDTH 240 -#define DISPLAY_HEIGHT 160 - -#define TILE_SIZE_4BPP 32 -#define TILE_SIZE_8BPP 64 - -#define TILE_OFFSET_4BPP(n) ((n) * TILE_SIZE_4BPP) -#define TILE_OFFSET_8BPP(n) ((n) * TILE_SIZE_8BPP) - -#define TOTAL_OBJ_TILE_COUNT 1024 - -#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10)) -#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r)) -#define _RGB(r, g, b) ((((b) & 0x1F) << 10) + (((g) & 0x1F) << 5) + ((r) & 0x1F)) - -#define RGB_BLACK RGB(0, 0, 0) -#define RGB_WHITE RGB(31, 31, 31) -#define RGB_RED RGB(31, 0, 0) -#define RGB_GREEN RGB(0, 31, 0) -#define RGB_BLUE RGB(0, 0, 31) -#define RGB_YELLOW RGB(31, 31, 0) -#define RGB_MAGENTA RGB(31, 0, 31) -#define RGB_CYAN RGB(0, 31, 31) -#define RGB_WHITEALPHA (RGB_WHITE | 0x8000) - -#endif // GUARD_GBA_DEFINES_H diff --git a/berry_fix/payload/include/gba/flash_internal.h b/berry_fix/payload/include/gba/flash_internal.h deleted file mode 100644 index 6fbec31f1b..0000000000 --- a/berry_fix/payload/include/gba/flash_internal.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef GUARD_GBA_FLASH_INTERNAL_H -#define GUARD_GBA_FLASH_INTERNAL_H - -#include "gba/gba.h" - -#define FLASH_BASE ((u8 *)0xE000000) - -#define FLASH_WRITE(addr, data) ((*(vu8 *)(FLASH_BASE + (addr))) = (data)) - -#define FLASH_ROM_SIZE_1M 131072 // 1 megabit ROM - -#define SECTORS_PER_BANK 16 - -struct FlashSector -{ - u32 size; - u8 shift; - u16 count; - u16 top; -}; - -struct FlashType { - u32 romSize; - struct FlashSector sector; - u16 wait[2]; // game pak bus read/write wait - - // TODO: add support for anonymous unions/structs if possible - union { - struct { - u8 makerId; - u8 deviceId; - } separate; - u16 joined; - } ids; -}; - -struct FlashSetupInfo -{ - u16 (*programFlashByte)(u16, u32, u8); - u16 (*programFlashSector)(u16, void *); - u16 (*eraseFlashChip)(void); - u16 (*eraseFlashSector)(u16); - u16 (*WaitForFlashWrite)(u8, u8 *, u8); - const u16 *maxTime; - struct FlashType type; -}; - -extern u16 gFlashNumRemainingBytes; - -extern u16 (*ProgramFlashByte)(u16, u32, u8); -extern u16 (*ProgramFlashSector)(u16, void *); -extern u16 (*EraseFlashChip)(void); -extern u16 (*EraseFlashSector)(u16); -extern u16 (*WaitForFlashWrite)(u8, u8 *, u8); -extern const u16 *gFlashMaxTime; -extern const struct FlashType *gFlash; - -extern u8 (*PollFlashStatus)(u8 *); -extern u8 gFlashTimeoutFlag; - -extern const struct FlashSetupInfo MX29L010; -extern const struct FlashSetupInfo LE26FV10N1TS; -extern const struct FlashSetupInfo DefaultFlash; - -void SwitchFlashBank(u8 bankNum); -u16 ReadFlashId(void); -void StartFlashTimer(u8 phase); -void SetReadFlash1(u16 *dest); -void StopFlashTimer(void); -u16 SetFlashTimerIntr(u8 timerNum, void (**intrFunc)(void)); -u32 ProgramFlashSectorAndVerify(u16 sectorNum, u8 *src); -void ReadFlash(u16 sectorNum, u32 offset, void *dest, u32 size); -u32 ProgramFlashSectorAndVerifyNBytes(u16 sectorNum, void *dataSrc, u32 n); - -u16 WaitForFlashWrite_Common(u8 phase, u8 *addr, u8 lastData); - -u16 EraseFlashChip_MX(void); -u16 EraseFlashSector_MX(u16 sectorNum); -u16 ProgramFlashByte_MX(u16 sectorNum, u32 offset, u8 data); -u16 ProgramFlashSector_MX(u16 sectorNum, void *src); - -// agb_flash_1m -u32 IdentifyFlash(void); - -#endif // GUARD_GBA_FLASH_INTERNAL_H diff --git a/berry_fix/payload/include/gba/gba.h b/berry_fix/payload/include/gba/gba.h deleted file mode 100644 index 349344031f..0000000000 --- a/berry_fix/payload/include/gba/gba.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef GUARD_GBA_GBA_H -#define GUARD_GBA_GBA_H - -#include "gba/defines.h" -#include "gba/io_reg.h" -#include "gba/types.h" -#include "gba/multiboot.h" -#include "gba/syscall.h" -#include "gba/macro.h" -#include "gba/isagbprint.h" - -#endif // GUARD_GBA_GBA_H diff --git a/berry_fix/payload/include/gba/io_reg.h b/berry_fix/payload/include/gba/io_reg.h deleted file mode 100644 index df79b084d3..0000000000 --- a/berry_fix/payload/include/gba/io_reg.h +++ /dev/null @@ -1,770 +0,0 @@ -#ifndef GUARD_GBA_IO_REG_H -#define GUARD_GBA_IO_REG_H - -#define REG_BASE 0x4000000 // I/O register base address - -// I/O register offsets - -#define REG_OFFSET_DISPCNT 0x0 -#define REG_OFFSET_DISPSTAT 0x4 -#define REG_OFFSET_VCOUNT 0x6 -#define REG_OFFSET_BG0CNT 0x8 -#define REG_OFFSET_BG1CNT 0xa -#define REG_OFFSET_BG2CNT 0xc -#define REG_OFFSET_BG3CNT 0xe -#define REG_OFFSET_BG0HOFS 0x10 -#define REG_OFFSET_BG0VOFS 0x12 -#define REG_OFFSET_BG1HOFS 0x14 -#define REG_OFFSET_BG1VOFS 0x16 -#define REG_OFFSET_BG2HOFS 0x18 -#define REG_OFFSET_BG2VOFS 0x1a -#define REG_OFFSET_BG3HOFS 0x1c -#define REG_OFFSET_BG3VOFS 0x1e -#define REG_OFFSET_BG2PA 0x20 -#define REG_OFFSET_BG2PB 0x22 -#define REG_OFFSET_BG2PC 0x24 -#define REG_OFFSET_BG2PD 0x26 -#define REG_OFFSET_BG2X 0x28 -#define REG_OFFSET_BG2X_L 0x28 -#define REG_OFFSET_BG2X_H 0x2a -#define REG_OFFSET_BG2Y 0x2c -#define REG_OFFSET_BG2Y_L 0x2c -#define REG_OFFSET_BG2Y_H 0x2e -#define REG_OFFSET_BG3PA 0x30 -#define REG_OFFSET_BG3PB 0x32 -#define REG_OFFSET_BG3PC 0x34 -#define REG_OFFSET_BG3PD 0x36 -#define REG_OFFSET_BG3X 0x38 -#define REG_OFFSET_BG3X_L 0x38 -#define REG_OFFSET_BG3X_H 0x3a -#define REG_OFFSET_BG3Y 0x3c -#define REG_OFFSET_BG3Y_L 0x3c -#define REG_OFFSET_BG3Y_H 0x3e -#define REG_OFFSET_WIN0H 0x40 -#define REG_OFFSET_WIN1H 0x42 -#define REG_OFFSET_WIN0V 0x44 -#define REG_OFFSET_WIN1V 0x46 -#define REG_OFFSET_WININ 0x48 -#define REG_OFFSET_WINOUT 0x4a -#define REG_OFFSET_MOSAIC 0x4c -#define REG_OFFSET_BLDCNT 0x50 -#define REG_OFFSET_BLDALPHA 0x52 -#define REG_OFFSET_BLDY 0x54 - -#define REG_OFFSET_SOUND1CNT_L 0x60 -#define REG_OFFSET_NR10 0x60 -#define REG_OFFSET_SOUND1CNT_H 0x62 -#define REG_OFFSET_NR11 0x62 -#define REG_OFFSET_NR12 0x63 -#define REG_OFFSET_SOUND1CNT_X 0x64 -#define REG_OFFSET_NR13 0x64 -#define REG_OFFSET_NR14 0x65 -#define REG_OFFSET_SOUND2CNT_L 0x68 -#define REG_OFFSET_NR21 0x68 -#define REG_OFFSET_NR22 0x69 -#define REG_OFFSET_SOUND2CNT_H 0x6c -#define REG_OFFSET_NR23 0x6c -#define REG_OFFSET_NR24 0x6d -#define REG_OFFSET_SOUND3CNT_L 0x70 -#define REG_OFFSET_NR30 0x70 -#define REG_OFFSET_SOUND3CNT_H 0x72 -#define REG_OFFSET_NR31 0x72 -#define REG_OFFSET_NR32 0x73 -#define REG_OFFSET_SOUND3CNT_X 0x74 -#define REG_OFFSET_NR33 0x74 -#define REG_OFFSET_NR34 0x75 -#define REG_OFFSET_SOUND4CNT_L 0x78 -#define REG_OFFSET_NR41 0x78 -#define REG_OFFSET_NR42 0x79 -#define REG_OFFSET_SOUND4CNT_H 0x7c -#define REG_OFFSET_NR43 0x7c -#define REG_OFFSET_NR44 0x7d -#define REG_OFFSET_SOUNDCNT_L 0x80 -#define REG_OFFSET_NR50 0x80 -#define REG_OFFSET_NR51 0x81 -#define REG_OFFSET_SOUNDCNT_H 0x82 -#define REG_OFFSET_SOUNDCNT_X 0x84 -#define REG_OFFSET_NR52 0x84 -#define REG_OFFSET_SOUNDBIAS 0x88 -#define REG_OFFSET_SOUNDBIAS_L 0x88 -#define REG_OFFSET_SOUNDBIAS_H 0x89 -#define REG_OFFSET_WAVE_RAM0 0x90 -#define REG_OFFSET_WAVE_RAM1 0x94 -#define REG_OFFSET_WAVE_RAM2 0x98 -#define REG_OFFSET_WAVE_RAM3 0x9c -#define REG_OFFSET_FIFO_A 0xa0 -#define REG_OFFSET_FIFO_B 0xa4 - -#define REG_OFFSET_DMA0 0xb0 -#define REG_OFFSET_DMA0SAD 0xb0 -#define REG_OFFSET_DMA0SAD_L 0xb0 -#define REG_OFFSET_DMA0SAD_H 0xb2 -#define REG_OFFSET_DMA0DAD 0xb4 -#define REG_OFFSET_DMA0DAD_L 0xb4 -#define REG_OFFSET_DMA0DAD_H 0xb6 -#define REG_OFFSET_DMA0CNT 0xb8 -#define REG_OFFSET_DMA0CNT_L 0xb8 -#define REG_OFFSET_DMA0CNT_H 0xba -#define REG_OFFSET_DMA1 0xbc -#define REG_OFFSET_DMA1SAD 0xbc -#define REG_OFFSET_DMA1SAD_L 0xbc -#define REG_OFFSET_DMA1SAD_H 0xbe -#define REG_OFFSET_DMA1DAD 0xc0 -#define REG_OFFSET_DMA1DAD_L 0xc0 -#define REG_OFFSET_DMA1DAD_H 0xc2 -#define REG_OFFSET_DMA1CNT 0xc4 -#define REG_OFFSET_DMA1CNT_L 0xc4 -#define REG_OFFSET_DMA1CNT_H 0xc6 -#define REG_OFFSET_DMA2 0xc8 -#define REG_OFFSET_DMA2SAD 0xc8 -#define REG_OFFSET_DMA2SAD_L 0xc8 -#define REG_OFFSET_DMA2SAD_H 0xca -#define REG_OFFSET_DMA2DAD 0xcc -#define REG_OFFSET_DMA2DAD_L 0xcc -#define REG_OFFSET_DMA2DAD_H 0xce -#define REG_OFFSET_DMA2CNT 0xd0 -#define REG_OFFSET_DMA2CNT_L 0xd0 -#define REG_OFFSET_DMA2CNT_H 0xd2 -#define REG_OFFSET_DMA3 0xd4 -#define REG_OFFSET_DMA3SAD 0xd4 -#define REG_OFFSET_DMA3SAD_L 0xd4 -#define REG_OFFSET_DMA3SAD_H 0xd6 -#define REG_OFFSET_DMA3DAD 0xd8 -#define REG_OFFSET_DMA3DAD_L 0xd8 -#define REG_OFFSET_DMA3DAD_H 0xda -#define REG_OFFSET_DMA3CNT 0xdc -#define REG_OFFSET_DMA3CNT_L 0xdc -#define REG_OFFSET_DMA3CNT_H 0xde - -#define REG_OFFSET_TMCNT 0x100 -#define REG_OFFSET_TMCNT_L 0x100 -#define REG_OFFSET_TMCNT_H 0x102 -#define REG_OFFSET_TM0CNT 0x100 -#define REG_OFFSET_TM0CNT_L 0x100 -#define REG_OFFSET_TM0CNT_H 0x102 -#define REG_OFFSET_TM1CNT 0x104 -#define REG_OFFSET_TM1CNT_L 0x104 -#define REG_OFFSET_TM1CNT_H 0x106 -#define REG_OFFSET_TM2CNT 0x108 -#define REG_OFFSET_TM2CNT_L 0x108 -#define REG_OFFSET_TM2CNT_H 0x10a -#define REG_OFFSET_TM3CNT 0x10c -#define REG_OFFSET_TM3CNT_L 0x10c -#define REG_OFFSET_TM3CNT_H 0x10e - -#define REG_OFFSET_SIOCNT 0x128 -#define REG_OFFSET_SIODATA8 0x12a -#define REG_OFFSET_SIODATA32 0x120 -#define REG_OFFSET_SIOMLT_SEND 0x12a -#define REG_OFFSET_SIOMLT_RECV 0x120 -#define REG_OFFSET_SIOMULTI0 0x120 -#define REG_OFFSET_SIOMULTI1 0x122 -#define REG_OFFSET_SIOMULTI2 0x124 -#define REG_OFFSET_SIOMULTI3 0x126 - -#define REG_OFFSET_KEYINPUT 0x130 -#define REG_OFFSET_KEYCNT 0x132 - -#define REG_OFFSET_RCNT 0x134 - -#define REG_OFFSET_JOYCNT 0x140 -#define REG_OFFSET_JOYSTAT 0x158 -#define REG_OFFSET_JOY_RECV 0x150 -#define REG_OFFSET_JOY_RECV_L 0x150 -#define REG_OFFSET_JOY_RECV_H 0x152 -#define REG_OFFSET_JOY_TRANS 0x154 -#define REG_OFFSET_JOY_TRANS_L 0x154 -#define REG_OFFSET_JOY_TRANS_H 0x156 - -#define REG_OFFSET_IME 0x208 -#define REG_OFFSET_IE 0x200 -#define REG_OFFSET_IF 0x202 - -#define REG_OFFSET_WAITCNT 0x204 - -// I/O register addresses - -#define REG_ADDR_DISPCNT (REG_BASE + REG_OFFSET_DISPCNT) -#define REG_ADDR_DISPSTAT (REG_BASE + REG_OFFSET_DISPSTAT) -#define REG_ADDR_VCOUNT (REG_BASE + REG_OFFSET_VCOUNT) -#define REG_ADDR_BG0CNT (REG_BASE + REG_OFFSET_BG0CNT) -#define REG_ADDR_BG1CNT (REG_BASE + REG_OFFSET_BG1CNT) -#define REG_ADDR_BG2CNT (REG_BASE + REG_OFFSET_BG2CNT) -#define REG_ADDR_BG3CNT (REG_BASE + REG_OFFSET_BG3CNT) -#define REG_ADDR_BG0HOFS (REG_BASE + REG_OFFSET_BG0HOFS) -#define REG_ADDR_BG0VOFS (REG_BASE + REG_OFFSET_BG0VOFS) -#define REG_ADDR_BG1HOFS (REG_BASE + REG_OFFSET_BG1HOFS) -#define REG_ADDR_BG1VOFS (REG_BASE + REG_OFFSET_BG1VOFS) -#define REG_ADDR_BG2HOFS (REG_BASE + REG_OFFSET_BG2HOFS) -#define REG_ADDR_BG2VOFS (REG_BASE + REG_OFFSET_BG2VOFS) -#define REG_ADDR_BG3HOFS (REG_BASE + REG_OFFSET_BG3HOFS) -#define REG_ADDR_BG3VOFS (REG_BASE + REG_OFFSET_BG3VOFS) -#define REG_ADDR_BG2PA (REG_BASE + REG_OFFSET_BG2PA) -#define REG_ADDR_BG2PB (REG_BASE + REG_OFFSET_BG2PB) -#define REG_ADDR_BG2PC (REG_BASE + REG_OFFSET_BG2PC) -#define REG_ADDR_BG2PD (REG_BASE + REG_OFFSET_BG2PD) -#define REG_ADDR_BG2X (REG_BASE + REG_OFFSET_BG2X) -#define REG_ADDR_BG2X_L (REG_BASE + REG_OFFSET_BG2X_L) -#define REG_ADDR_BG2X_H (REG_BASE + REG_OFFSET_BG2X_H) -#define REG_ADDR_BG2Y (REG_BASE + REG_OFFSET_BG2Y) -#define REG_ADDR_BG2Y_L (REG_BASE + REG_OFFSET_BG2Y_L) -#define REG_ADDR_BG2Y_H (REG_BASE + REG_OFFSET_BG2Y_H) -#define REG_ADDR_BG3PA (REG_BASE + REG_OFFSET_BG3PA) -#define REG_ADDR_BG3PB (REG_BASE + REG_OFFSET_BG3PB) -#define REG_ADDR_BG3PC (REG_BASE + REG_OFFSET_BG3PC) -#define REG_ADDR_BG3PD (REG_BASE + REG_OFFSET_BG3PD) -#define REG_ADDR_BG3X (REG_BASE + REG_OFFSET_BG3X) -#define REG_ADDR_BG3X_L (REG_BASE + REG_OFFSET_BG3X_L) -#define REG_ADDR_BG3X_H (REG_BASE + REG_OFFSET_BG3X_H) -#define REG_ADDR_BG3Y (REG_BASE + REG_OFFSET_BG3Y) -#define REG_ADDR_BG3Y_L (REG_BASE + REG_OFFSET_BG3Y_L) -#define REG_ADDR_BG3Y_H (REG_BASE + REG_OFFSET_BG3Y_H) -#define REG_ADDR_WIN0H (REG_BASE + REG_OFFSET_WIN0H) -#define REG_ADDR_WIN1H (REG_BASE + REG_OFFSET_WIN1H) -#define REG_ADDR_WIN0V (REG_BASE + REG_OFFSET_WIN0V) -#define REG_ADDR_WIN1V (REG_BASE + REG_OFFSET_WIN1V) -#define REG_ADDR_WININ (REG_BASE + REG_OFFSET_WININ) -#define REG_ADDR_WINOUT (REG_BASE + REG_OFFSET_WINOUT) -#define REG_ADDR_MOSAIC (REG_BASE + REG_OFFSET_MOSAIC) -#define REG_ADDR_BLDCNT (REG_BASE + REG_OFFSET_BLDCNT) -#define REG_ADDR_BLDALPHA (REG_BASE + REG_OFFSET_BLDALPHA) -#define REG_ADDR_BLDY (REG_BASE + REG_OFFSET_BLDY) - -#define REG_ADDR_SOUND1CNT_L (REG_BASE + REG_OFFSET_SOUND1CNT_L) -#define REG_ADDR_NR10 (REG_BASE + REG_OFFSET_NR10) -#define REG_ADDR_SOUND1CNT_H (REG_BASE + REG_OFFSET_SOUND1CNT_H) -#define REG_ADDR_NR11 (REG_BASE + REG_OFFSET_NR11) -#define REG_ADDR_NR12 (REG_BASE + REG_OFFSET_NR12) -#define REG_ADDR_SOUND1CNT_X (REG_BASE + REG_OFFSET_SOUND1CNT_X) -#define REG_ADDR_NR13 (REG_BASE + REG_OFFSET_NR13) -#define REG_ADDR_NR14 (REG_BASE + REG_OFFSET_NR14) -#define REG_ADDR_SOUND2CNT_L (REG_BASE + REG_OFFSET_SOUND2CNT_L) -#define REG_ADDR_NR21 (REG_BASE + REG_OFFSET_NR21) -#define REG_ADDR_NR22 (REG_BASE + REG_OFFSET_NR22) -#define REG_ADDR_SOUND2CNT_H (REG_BASE + REG_OFFSET_SOUND2CNT_H) -#define REG_ADDR_NR23 (REG_BASE + REG_OFFSET_NR23) -#define REG_ADDR_NR24 (REG_BASE + REG_OFFSET_NR24) -#define REG_ADDR_SOUND3CNT_L (REG_BASE + REG_OFFSET_SOUND3CNT_L) -#define REG_ADDR_NR30 (REG_BASE + REG_OFFSET_NR30) -#define REG_ADDR_SOUND3CNT_H (REG_BASE + REG_OFFSET_SOUND3CNT_H) -#define REG_ADDR_NR31 (REG_BASE + REG_OFFSET_NR31) -#define REG_ADDR_NR32 (REG_BASE + REG_OFFSET_NR32) -#define REG_ADDR_SOUND3CNT_X (REG_BASE + REG_OFFSET_SOUND3CNT_X) -#define REG_ADDR_NR33 (REG_BASE + REG_OFFSET_NR33) -#define REG_ADDR_NR34 (REG_BASE + REG_OFFSET_NR34) -#define REG_ADDR_SOUND4CNT_L (REG_BASE + REG_OFFSET_SOUND4CNT_L) -#define REG_ADDR_NR41 (REG_BASE + REG_OFFSET_NR41) -#define REG_ADDR_NR42 (REG_BASE + REG_OFFSET_NR42) -#define REG_ADDR_SOUND4CNT_H (REG_BASE + REG_OFFSET_SOUND4CNT_H) -#define REG_ADDR_NR43 (REG_BASE + REG_OFFSET_NR43) -#define REG_ADDR_NR44 (REG_BASE + REG_OFFSET_NR44) -#define REG_ADDR_SOUNDCNT_L (REG_BASE + REG_OFFSET_SOUNDCNT_L) -#define REG_ADDR_NR50 (REG_BASE + REG_OFFSET_NR50) -#define REG_ADDR_NR51 (REG_BASE + REG_OFFSET_NR51) -#define REG_ADDR_SOUNDCNT_H (REG_BASE + REG_OFFSET_SOUNDCNT_H) -#define REG_ADDR_SOUNDCNT_X (REG_BASE + REG_OFFSET_SOUNDCNT_X) -#define REG_ADDR_NR52 (REG_BASE + REG_OFFSET_NR52) -#define REG_ADDR_SOUNDBIAS (REG_BASE + REG_OFFSET_SOUNDBIAS) -#define REG_ADDR_SOUNDBIAS_L (REG_BASE + REG_OFFSET_SOUNDBIAS_L) -#define REG_ADDR_SOUNDBIAS_H (REG_BASE + REG_OFFSET_SOUNDBIAS_H) -#define REG_ADDR_WAVE_RAM0 (REG_BASE + REG_OFFSET_WAVE_RAM0) -#define REG_ADDR_WAVE_RAM1 (REG_BASE + REG_OFFSET_WAVE_RAM1) -#define REG_ADDR_WAVE_RAM2 (REG_BASE + REG_OFFSET_WAVE_RAM2) -#define REG_ADDR_WAVE_RAM3 (REG_BASE + REG_OFFSET_WAVE_RAM3) -#define REG_ADDR_FIFO_A (REG_BASE + REG_OFFSET_FIFO_A) -#define REG_ADDR_FIFO_B (REG_BASE + REG_OFFSET_FIFO_B) - -#define REG_ADDR_DMA0 (REG_BASE + REG_OFFSET_DMA0) -#define REG_ADDR_DMA0SAD (REG_BASE + REG_OFFSET_DMA0SAD) -#define REG_ADDR_DMA0DAD (REG_BASE + REG_OFFSET_DMA0DAD) -#define REG_ADDR_DMA0CNT (REG_BASE + REG_OFFSET_DMA0CNT) -#define REG_ADDR_DMA0CNT_L (REG_BASE + REG_OFFSET_DMA0CNT_L) -#define REG_ADDR_DMA0CNT_H (REG_BASE + REG_OFFSET_DMA0CNT_H) -#define REG_ADDR_DMA1 (REG_BASE + REG_OFFSET_DMA1) -#define REG_ADDR_DMA1SAD (REG_BASE + REG_OFFSET_DMA1SAD) -#define REG_ADDR_DMA1DAD (REG_BASE + REG_OFFSET_DMA1DAD) -#define REG_ADDR_DMA1CNT (REG_BASE + REG_OFFSET_DMA1CNT) -#define REG_ADDR_DMA1CNT_L (REG_BASE + REG_OFFSET_DMA1CNT_L) -#define REG_ADDR_DMA1CNT_H (REG_BASE + REG_OFFSET_DMA1CNT_H) -#define REG_ADDR_DMA2 (REG_BASE + REG_OFFSET_DMA2) -#define REG_ADDR_DMA2SAD (REG_BASE + REG_OFFSET_DMA2SAD) -#define REG_ADDR_DMA2DAD (REG_BASE + REG_OFFSET_DMA2DAD) -#define REG_ADDR_DMA2CNT (REG_BASE + REG_OFFSET_DMA2CNT) -#define REG_ADDR_DMA2CNT_L (REG_BASE + REG_OFFSET_DMA2CNT_L) -#define REG_ADDR_DMA2CNT_H (REG_BASE + REG_OFFSET_DMA2CNT_H) -#define REG_ADDR_DMA3 (REG_BASE + REG_OFFSET_DMA3) -#define REG_ADDR_DMA3SAD (REG_BASE + REG_OFFSET_DMA3SAD) -#define REG_ADDR_DMA3DAD (REG_BASE + REG_OFFSET_DMA3DAD) -#define REG_ADDR_DMA3CNT (REG_BASE + REG_OFFSET_DMA3CNT) -#define REG_ADDR_DMA3CNT_L (REG_BASE + REG_OFFSET_DMA3CNT_L) -#define REG_ADDR_DMA3CNT_H (REG_BASE + REG_OFFSET_DMA3CNT_H) - -#define REG_ADDR_TMCNT (REG_BASE + REG_OFFSET_TMCNT) -#define REG_ADDR_TMCNT_L (REG_BASE + REG_OFFSET_TMCNT_L) -#define REG_ADDR_TMCNT_H (REG_BASE + REG_OFFSET_TMCNT_H) -#define REG_ADDR_TM0CNT (REG_BASE + REG_OFFSET_TM0CNT) -#define REG_ADDR_TM0CNT_L (REG_BASE + REG_OFFSET_TM0CNT_L) -#define REG_ADDR_TM0CNT_H (REG_BASE + REG_OFFSET_TM0CNT_H) -#define REG_ADDR_TM1CNT (REG_BASE + REG_OFFSET_TM1CNT) -#define REG_ADDR_TM1CNT_L (REG_BASE + REG_OFFSET_TM1CNT_L) -#define REG_ADDR_TM1CNT_H (REG_BASE + REG_OFFSET_TM1CNT_H) -#define REG_ADDR_TM2CNT (REG_BASE + REG_OFFSET_TM2CNT) -#define REG_ADDR_TM2CNT_L (REG_BASE + REG_OFFSET_TM2CNT_L) -#define REG_ADDR_TM2CNT_H (REG_BASE + REG_OFFSET_TM2CNT_H) -#define REG_ADDR_TM3CNT (REG_BASE + REG_OFFSET_TM3CNT) -#define REG_ADDR_TM3CNT_L (REG_BASE + REG_OFFSET_TM3CNT_L) -#define REG_ADDR_TM3CNT_H (REG_BASE + REG_OFFSET_TM3CNT_H) - -#define REG_ADDR_SIOCNT (REG_BASE + REG_OFFSET_SIOCNT) -#define REG_ADDR_SIODATA8 (REG_BASE + REG_OFFSET_SIODATA8) -#define REG_ADDR_SIODATA32 (REG_BASE + REG_OFFSET_SIODATA32) -#define REG_ADDR_SIOMLT_SEND (REG_BASE + REG_OFFSET_SIOMLT_SEND) -#define REG_ADDR_SIOMLT_RECV (REG_BASE + REG_OFFSET_SIOMLT_RECV) -#define REG_ADDR_SIOMULTI0 (REG_BASE + REG_OFFSET_SIOMULTI0) -#define REG_ADDR_SIOMULTI1 (REG_BASE + REG_OFFSET_SIOMULTI1) -#define REG_ADDR_SIOMULTI2 (REG_BASE + REG_OFFSET_SIOMULTI2) -#define REG_ADDR_SIOMULTI3 (REG_BASE + REG_OFFSET_SIOMULTI3) - -#define REG_ADDR_KEYINPUT (REG_BASE + REG_OFFSET_KEYINPUT) -#define REG_ADDR_KEYCNT (REG_BASE + REG_OFFSET_KEYCNT) - -#define REG_ADDR_RCNT (REG_BASE + REG_OFFSET_RCNT) - -#define REG_ADDR_JOYCNT (REG_BASE + REG_OFFSET_JOYCNT) -#define REG_ADDR_JOYSTAT (REG_BASE + REG_OFFSET_JOYSTAT) -#define REG_ADDR_JOY_RECV (REG_BASE + REG_OFFSET_JOY_RECV) -#define REG_ADDR_JOY_RECV_L (REG_BASE + REG_OFFSET_JOY_RECV_L) -#define REG_ADDR_JOY_RECV_H (REG_BASE + REG_OFFSET_JOY_RECV_H) -#define REG_ADDR_JOY_TRANS (REG_BASE + REG_OFFSET_JOY_TRANS) -#define REG_ADDR_JOY_TRANS_L (REG_BASE + REG_OFFSET_JOY_TRANS_L) -#define REG_ADDR_JOY_TRANS_H (REG_BASE + REG_OFFSET_JOY_TRANS_H) - -#define REG_ADDR_IME (REG_BASE + REG_OFFSET_IME) -#define REG_ADDR_IE (REG_BASE + REG_OFFSET_IE) -#define REG_ADDR_IF (REG_BASE + REG_OFFSET_IF) - -#define REG_ADDR_WAITCNT (REG_BASE + REG_OFFSET_WAITCNT) - -// I/O registers - -#define REG_DISPCNT (*(vu16 *)REG_ADDR_DISPCNT) -#define REG_DISPSTAT (*(vu16 *)REG_ADDR_DISPSTAT) -#define REG_VCOUNT (*(vu16 *)REG_ADDR_VCOUNT) -#define REG_BG0CNT (*(vu16 *)REG_ADDR_BG0CNT) -#define REG_BG1CNT (*(vu16 *)REG_ADDR_BG1CNT) -#define REG_BG2CNT (*(vu16 *)REG_ADDR_BG2CNT) -#define REG_BG3CNT (*(vu16 *)REG_ADDR_BG3CNT) -#define REG_BG0HOFS (*(vu16 *)REG_ADDR_BG0HOFS) -#define REG_BG0VOFS (*(vu16 *)REG_ADDR_BG0VOFS) -#define REG_BG1HOFS (*(vu16 *)REG_ADDR_BG1HOFS) -#define REG_BG1VOFS (*(vu16 *)REG_ADDR_BG1VOFS) -#define REG_BG2HOFS (*(vu16 *)REG_ADDR_BG2HOFS) -#define REG_BG2VOFS (*(vu16 *)REG_ADDR_BG2VOFS) -#define REG_BG3HOFS (*(vu16 *)REG_ADDR_BG3HOFS) -#define REG_BG3VOFS (*(vu16 *)REG_ADDR_BG3VOFS) -#define REG_BG2PA (*(vu16 *)REG_ADDR_BG2PA) -#define REG_BG2PB (*(vu16 *)REG_ADDR_BG2PB) -#define REG_BG2PC (*(vu16 *)REG_ADDR_BG2PC) -#define REG_BG2PD (*(vu16 *)REG_ADDR_BG2PD) -#define REG_BG2X (*(vu32 *)REG_ADDR_BG2X) -#define REG_BG2X_L (*(vu16 *)REG_ADDR_BG2X_L) -#define REG_BG2X_H (*(vu16 *)REG_ADDR_BG2X_H) -#define REG_BG2Y (*(vu32 *)REG_ADDR_BG2Y) -#define REG_BG2Y_L (*(vu16 *)REG_ADDR_BG2Y_L) -#define REG_BG2Y_H (*(vu16 *)REG_ADDR_BG2Y_H) -#define REG_BG3PA (*(vu16 *)REG_ADDR_BG3PA) -#define REG_BG3PB (*(vu16 *)REG_ADDR_BG3PB) -#define REG_BG3PC (*(vu16 *)REG_ADDR_BG3PC) -#define REG_BG3PD (*(vu16 *)REG_ADDR_BG3PD) -#define REG_BG3X (*(vu32 *)REG_ADDR_BG3X) -#define REG_BG3X_L (*(vu16 *)REG_ADDR_BG3X_L) -#define REG_BG3X_H (*(vu16 *)REG_ADDR_BG3X_H) -#define REG_BG3Y (*(vu32 *)REG_ADDR_BG3Y) -#define REG_BG3Y_L (*(vu16 *)REG_ADDR_BG3Y_L) -#define REG_BG3Y_H (*(vu16 *)REG_ADDR_BG3Y_H) -#define REG_WIN0H (*(vu16 *)REG_ADDR_WIN0H) -#define REG_WIN1H (*(vu16 *)REG_ADDR_WIN1H) -#define REG_WIN0V (*(vu16 *)REG_ADDR_WIN0V) -#define REG_WIN1V (*(vu16 *)REG_ADDR_WIN1V) -#define REG_WININ (*(vu16 *)REG_ADDR_WININ) -#define REG_WINOUT (*(vu16 *)REG_ADDR_WINOUT) -#define REG_MOSAIC (*(vu16 *)REG_ADDR_MOSAIC) -#define REG_BLDCNT (*(vu16 *)REG_ADDR_BLDCNT) -#define REG_BLDALPHA (*(vu16 *)REG_ADDR_BLDALPHA) -#define REG_BLDY (*(vu16 *)REG_ADDR_BLDY) - -#define REG_SOUND1CNT_L (*(vu16 *)REG_ADDR_SOUND1CNT_L) -#define REG_NR10 (*(vu8 *)REG_ADDR_NR10) -#define REG_SOUND1CNT_H (*(vu16 *)REG_ADDR_SOUND1CNT_H) -#define REG_NR11 (*(vu8 *)REG_ADDR_NR11) -#define REG_NR12 (*(vu8 *)REG_ADDR_NR12) -#define REG_SOUND1CNT_X (*(vu16 *)REG_ADDR_SOUND1CNT_X) -#define REG_NR13 (*(vu8 *)REG_ADDR_NR13) -#define REG_NR14 (*(vu8 *)REG_ADDR_NR14) -#define REG_SOUND2CNT_L (*(vu16 *)REG_ADDR_SOUND2CNT_L) -#define REG_NR21 (*(vu8 *)REG_ADDR_NR21) -#define REG_NR22 (*(vu8 *)REG_ADDR_NR22) -#define REG_SOUND2CNT_H (*(vu16 *)REG_ADDR_SOUND2CNT_H) -#define REG_NR23 (*(vu8 *)REG_ADDR_NR23) -#define REG_NR24 (*(vu8 *)REG_ADDR_NR24) -#define REG_SOUND3CNT_L (*(vu16 *)REG_ADDR_SOUND3CNT_L) -#define REG_NR30 (*(vu8 *)REG_ADDR_NR30) -#define REG_SOUND3CNT_H (*(vu16 *)REG_ADDR_SOUND3CNT_H) -#define REG_NR31 (*(vu8 *)REG_ADDR_NR31) -#define REG_NR32 (*(vu8 *)REG_ADDR_NR32) -#define REG_SOUND3CNT_X (*(vu16 *)REG_ADDR_SOUND3CNT_X) -#define REG_NR33 (*(vu8 *)REG_ADDR_NR33) -#define REG_NR34 (*(vu8 *)REG_ADDR_NR34) -#define REG_SOUND4CNT_L (*(vu16 *)REG_ADDR_SOUND4CNT_L) -#define REG_NR41 (*(vu8 *)REG_ADDR_NR41) -#define REG_NR42 (*(vu8 *)REG_ADDR_NR42) -#define REG_SOUND4CNT_H (*(vu16 *)REG_ADDR_SOUND4CNT_H) -#define REG_NR43 (*(vu8 *)REG_ADDR_NR43) -#define REG_NR44 (*(vu8 *)REG_ADDR_NR44) -#define REG_SOUNDCNT_L (*(vu16 *)REG_ADDR_SOUNDCNT_L) -#define REG_NR50 (*(vu8 *)REG_ADDR_NR50) -#define REG_NR51 (*(vu8 *)REG_ADDR_NR51) -#define REG_SOUNDCNT_H (*(vu16 *)REG_ADDR_SOUNDCNT_H) -#define REG_SOUNDCNT_X (*(vu16 *)REG_ADDR_SOUNDCNT_X) -#define REG_NR52 (*(vu8 *)REG_ADDR_NR52) -#define REG_SOUNDBIAS (*(vu16 *)REG_ADDR_SOUNDBIAS) -#define REG_SOUNDBIAS_L (*(vu8 *)REG_ADDR_SOUNDBIAS_L) -#define REG_SOUNDBIAS_H (*(vu8 *)REG_ADDR_SOUNDBIAS_H) -#define REG_WAVE_RAM0 (*(vu32 *)REG_ADDR_WAVE_RAM0) -#define REG_WAVE_RAM1 (*(vu32 *)REG_ADDR_WAVE_RAM1) -#define REG_WAVE_RAM2 (*(vu32 *)REG_ADDR_WAVE_RAM2) -#define REG_WAVE_RAM3 (*(vu32 *)REG_ADDR_WAVE_RAM3) -#define REG_FIFO_A (*(vu32 *)REG_ADDR_FIFO_A) -#define REG_FIFO_B (*(vu32 *)REG_ADDR_FIFO_B) - -#define REG_DMA0SAD (*(vu32 *)REG_ADDR_DMA0SAD) -#define REG_DMA0DAD (*(vu32 *)REG_ADDR_DMA0DAD) -#define REG_DMA0CNT (*(vu32 *)REG_ADDR_DMA0CNT) -#define REG_DMA0CNT_L (*(vu16 *)REG_ADDR_DMA0CNT_L) -#define REG_DMA0CNT_H (*(vu16 *)REG_ADDR_DMA0CNT_H) - -#define REG_DMA1SAD (*(vu32 *)REG_ADDR_DMA1SAD) -#define REG_DMA1DAD (*(vu32 *)REG_ADDR_DMA1DAD) -#define REG_DMA1CNT (*(vu32 *)REG_ADDR_DMA1CNT) -#define REG_DMA1CNT_L (*(vu16 *)REG_ADDR_DMA1CNT_L) -#define REG_DMA1CNT_H (*(vu16 *)REG_ADDR_DMA1CNT_H) - -#define REG_DMA2SAD (*(vu32 *)REG_ADDR_DMA2SAD) -#define REG_DMA2DAD (*(vu32 *)REG_ADDR_DMA2DAD) -#define REG_DMA2CNT (*(vu32 *)REG_ADDR_DMA2CNT) -#define REG_DMA2CNT_L (*(vu16 *)REG_ADDR_DMA2CNT_L) -#define REG_DMA2CNT_H (*(vu16 *)REG_ADDR_DMA2CNT_H) - -#define REG_DMA3SAD (*(vu32 *)REG_ADDR_DMA3SAD) -#define REG_DMA3DAD (*(vu32 *)REG_ADDR_DMA3DAD) -#define REG_DMA3CNT (*(vu32 *)REG_ADDR_DMA3CNT) -#define REG_DMA3CNT_L (*(vu16 *)REG_ADDR_DMA3CNT_L) -#define REG_DMA3CNT_H (*(vu16 *)REG_ADDR_DMA3CNT_H) - -#define REG_TMCNT(n) (*(vu16 *)(REG_ADDR_TMCNT + ((n) * 4))) -#define REG_TMCNT_L(n) (*(vu16 *)(REG_ADDR_TMCNT_L + ((n) * 4))) -#define REG_TMCNT_H(n) (*(vu16 *)(REG_ADDR_TMCNT_H + ((n) * 4))) -#define REG_TM0CNT (*(vu32 *)REG_ADDR_TM0CNT) -#define REG_TM0CNT_L (*(vu16 *)REG_ADDR_TM0CNT_L) -#define REG_TM0CNT_H (*(vu16 *)REG_ADDR_TM0CNT_H) -#define REG_TM1CNT (*(vu32 *)REG_ADDR_TM1CNT) -#define REG_TM1CNT_L (*(vu16 *)REG_ADDR_TM1CNT_L) -#define REG_TM1CNT_H (*(vu16 *)REG_ADDR_TM1CNT_H) -#define REG_TM2CNT (*(vu32 *)REG_ADDR_TM2CNT) -#define REG_TM2CNT_L (*(vu16 *)REG_ADDR_TM2CNT_L) -#define REG_TM2CNT_H (*(vu16 *)REG_ADDR_TM2CNT_H) -#define REG_TM3CNT (*(vu32 *)REG_ADDR_TM3CNT) -#define REG_TM3CNT_L (*(vu16 *)REG_ADDR_TM3CNT_L) -#define REG_TM3CNT_H (*(vu16 *)REG_ADDR_TM3CNT_H) - -#define REG_SIOCNT (*(vu16 *)REG_ADDR_SIOCNT) -#define REG_SIODATA8 (*(vu16 *)REG_ADDR_SIODATA8) -#define REG_SIODATA32 (*(vu32 *)REG_ADDR_SIODATA32) -#define REG_SIOMLT_SEND (*(vu16 *)REG_ADDR_SIOMLT_SEND) -#define REG_SIOMLT_RECV (*(vu64 *)REG_ADDR_SIOMLT_RECV) -#define REG_SIOMULTI0 (*(vu16 *)REG_ADDR_SIOMULTI0) -#define REG_SIOMULTI1 (*(vu16 *)REG_ADDR_SIOMULTI1) -#define REG_SIOMULTI2 (*(vu16 *)REG_ADDR_SIOMULTI2) -#define REG_SIOMULTI3 (*(vu16 *)REG_ADDR_SIOMULTI3) - -#define REG_KEYINPUT (*(vu16 *)REG_ADDR_KEYINPUT) -#define REG_KEYCNT (*(vu16 *)REG_ADDR_KEYCNT) - -#define REG_RCNT (*(vu16 *)REG_ADDR_RCNT) - -#define REG_IME (*(vu16 *)REG_ADDR_IME) -#define REG_IE (*(vu16 *)REG_ADDR_IE) -#define REG_IF (*(vu16 *)REG_ADDR_IF) - -#define REG_WAITCNT (*(vu16 *)REG_ADDR_WAITCNT) - -// I/O register fields - -// DISPCNT -#define DISPCNT_MODE_0 0x0000 // BG0: text, BG1: text, BG2: text, BG3: text -#define DISPCNT_MODE_1 0x0001 // BG0: text, BG1: text, BG2: affine, BG3: off -#define DISPCNT_MODE_2 0x0002 // BG0: off, BG1: off, BG2: affine, BG3: affine -#define DISPCNT_MODE_3 0x0003 // Bitmap mode, 240x160, BGR555 color -#define DISPCNT_MODE_4 0x0004 // Bitmap mode, 240x160, 256 color palette -#define DISPCNT_MODE_5 0x0005 // Bitmap mode, 160x128, BGR555 color -#define DISPCNT_HBLANK_INTERVAL 0x0020 // Allow access to OAM during H-Blank -#define DISPCNT_OBJ_1D_MAP 0x0040 -#define DISPCNT_FORCED_BLANK 0x0080 -#define DISPCNT_BG0_ON 0x0100 -#define DISPCNT_BG1_ON 0x0200 -#define DISPCNT_BG2_ON 0x0400 -#define DISPCNT_BG3_ON 0x0800 -#define DISPCNT_BG_ALL_ON 0x0F00 -#define DISPCNT_OBJ_ON 0x1000 -#define DISPCNT_WIN0_ON 0x2000 -#define DISPCNT_WIN1_ON 0x4000 -#define DISPCNT_OBJWIN_ON 0x8000 - -// DISPSTAT -#define DISPSTAT_VBLANK 0x0001 // in V-Blank -#define DISPSTAT_HBLANK 0x0002 // in H-Blank -#define DISPSTAT_VCOUNT 0x0004 // V-Count match -#define DISPSTAT_VBLANK_INTR 0x0008 // V-Blank interrupt enabled -#define DISPSTAT_HBLANK_INTR 0x0010 // H-Blank interrupt enabled -#define DISPSTAT_VCOUNT_INTR 0x0020 // V-Count interrupt enabled - -// BGCNT -#define BGCNT_PRIORITY(n) (n) // Values 0 - 3. Lower priority BGs will be drawn on top of higher priority BGs. -#define BGCNT_CHARBASE(n) ((n) << 2) // Values 0 - 3. Base block for tile pixel data. -#define BGCNT_MOSAIC 0x0040 -#define BGCNT_16COLOR 0x0000 // 4 bits per pixel -#define BGCNT_256COLOR 0x0080 // 8 bits per pixel -#define BGCNT_SCREENBASE(n) ((n) << 8) // Values 0 - 31. Base block for tile map. -#define BGCNT_WRAP 0x2000 // Only affects affine BGs. Text BGs wrap by default. -#define BGCNT_TXT256x256 0x0000 // Internal screen size size of text mode BG in pixels. -#define BGCNT_TXT512x256 0x4000 -#define BGCNT_TXT256x512 0x8000 -#define BGCNT_TXT512x512 0xC000 -#define BGCNT_AFF128x128 0x0000 // Internal screen size size of affine mode BG in pixels. -#define BGCNT_AFF256x256 0x4000 -#define BGCNT_AFF512x512 0x8000 -#define BGCNT_AFF1024x1024 0xC000 - -// WININ/OUT -#define WININ_WIN0_BG0 (1 << 0) -#define WININ_WIN0_BG1 (1 << 1) -#define WININ_WIN0_BG2 (1 << 2) -#define WININ_WIN0_BG3 (1 << 3) -#define WININ_WIN0_BG_ALL (WININ_WIN0_BG0 | WININ_WIN0_BG1 | WININ_WIN0_BG2 | WININ_WIN0_BG3) -#define WININ_WIN0_OBJ (1 << 4) -#define WININ_WIN0_CLR (1 << 5) -#define WININ_WIN1_BG0 (1 << 8) -#define WININ_WIN1_BG1 (1 << 9) -#define WININ_WIN1_BG2 (1 << 10) -#define WININ_WIN1_BG3 (1 << 11) -#define WININ_WIN1_BG_ALL (WININ_WIN1_BG0 | WININ_WIN1_BG1 | WININ_WIN1_BG2 | WININ_WIN1_BG3) -#define WININ_WIN1_OBJ (1 << 12) -#define WININ_WIN1_CLR (1 << 13) - -#define WINOUT_WIN01_BG0 (1 << 0) -#define WINOUT_WIN01_BG1 (1 << 1) -#define WINOUT_WIN01_BG2 (1 << 2) -#define WINOUT_WIN01_BG3 (1 << 3) -#define WINOUT_WIN01_BG_ALL (WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3) -#define WINOUT_WIN01_OBJ (1 << 4) -#define WINOUT_WIN01_CLR (1 << 5) -#define WINOUT_WINOBJ_BG0 (1 << 8) -#define WINOUT_WINOBJ_BG1 (1 << 9) -#define WINOUT_WINOBJ_BG2 (1 << 10) -#define WINOUT_WINOBJ_BG3 (1 << 11) -#define WINOUT_WINOBJ_BG_ALL (WINOUT_WINOBJ_BG0 | WINOUT_WINOBJ_BG1 | WINOUT_WINOBJ_BG2 | WINOUT_WINOBJ_BG3) -#define WINOUT_WINOBJ_OBJ (1 << 12) -#define WINOUT_WINOBJ_CLR (1 << 13) - -#define WIN_RANGE(a, b) (((a) << 8) | (b)) -#define WIN_RANGE2(a, b) ((b) | ((a) << 8)) - -// BLDCNT -// Bits 0-5 select layers for the 1st target -#define BLDCNT_TGT1_BG0 (1 << 0) -#define BLDCNT_TGT1_BG1 (1 << 1) -#define BLDCNT_TGT1_BG2 (1 << 2) -#define BLDCNT_TGT1_BG3 (1 << 3) -#define BLDCNT_TGT1_OBJ (1 << 4) -#define BLDCNT_TGT1_BD (1 << 5) -#define BLDCNT_TGT1_ALL (BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD) -// Bits 6-7 select the special effect -#define BLDCNT_EFFECT_NONE (0 << 6) // no special effect -#define BLDCNT_EFFECT_BLEND (1 << 6) // 1st+2nd targets mixed (controlled by BLDALPHA) -#define BLDCNT_EFFECT_LIGHTEN (2 << 6) // 1st target becomes whiter (controlled by BLDY) -#define BLDCNT_EFFECT_DARKEN (3 << 6) // 1st target becomes blacker (controlled by BLDY) -// Bits 8-13 select layers for the 2nd target -#define BLDCNT_TGT2_BG0 (1 << 8) -#define BLDCNT_TGT2_BG1 (1 << 9) -#define BLDCNT_TGT2_BG2 (1 << 10) -#define BLDCNT_TGT2_BG3 (1 << 11) -#define BLDCNT_TGT2_OBJ (1 << 12) -#define BLDCNT_TGT2_BD (1 << 13) -#define BLDCNT_TGT2_ALL (BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD) - -// BLDALPHA -#define BLDALPHA_BLEND(target1, target2) (((target2) << 8) | (target1)) - -// SOUNDCNT_H -#define SOUND_CGB_MIX_QUARTER 0x0000 -#define SOUND_CGB_MIX_HALF 0x0001 -#define SOUND_CGB_MIX_FULL 0x0002 -#define SOUND_A_MIX_HALF 0x0000 -#define SOUND_A_MIX_FULL 0x0004 -#define SOUND_B_MIX_HALF 0x0000 -#define SOUND_B_MIX_FULL 0x0008 -#define SOUND_ALL_MIX_FULL 0x000E -#define SOUND_A_RIGHT_OUTPUT 0x0100 -#define SOUND_A_LEFT_OUTPUT 0x0200 -#define SOUND_A_TIMER_0 0x0000 -#define SOUND_A_TIMER_1 0x0400 -#define SOUND_A_FIFO_RESET 0x0800 -#define SOUND_B_RIGHT_OUTPUT 0x1000 -#define SOUND_B_LEFT_OUTPUT 0x2000 -#define SOUND_B_TIMER_0 0x0000 -#define SOUND_B_TIMER_1 0x4000 -#define SOUND_B_FIFO_RESET 0x8000 - -// SOUNDCNT_X -#define SOUND_1_ON 0x0001 -#define SOUND_2_ON 0x0002 -#define SOUND_3_ON 0x0004 -#define SOUND_4_ON 0x0008 -#define SOUND_MASTER_ENABLE 0x0080 - -// DMA -#define DMA_DEST_INC 0x0000 -#define DMA_DEST_DEC 0x0020 -#define DMA_DEST_FIXED 0x0040 -#define DMA_DEST_RELOAD 0x0060 -#define DMA_SRC_INC 0x0000 -#define DMA_SRC_DEC 0x0080 -#define DMA_SRC_FIXED 0x0100 -#define DMA_REPEAT 0x0200 -#define DMA_16BIT 0x0000 -#define DMA_32BIT 0x0400 -#define DMA_DREQ_ON 0x0800 -#define DMA_START_NOW 0x0000 -#define DMA_START_VBLANK 0x1000 -#define DMA_START_HBLANK 0x2000 -#define DMA_START_SPECIAL 0x3000 -#define DMA_START_MASK 0x3000 -#define DMA_INTR_ENABLE 0x4000 -#define DMA_ENABLE 0x8000 - -// timer -#define TIMER_1CLK 0x00 -#define TIMER_64CLK 0x01 -#define TIMER_256CLK 0x02 -#define TIMER_1024CLK 0x03 -#define TIMER_INTR_ENABLE 0x40 -#define TIMER_ENABLE 0x80 - -// serial -#define SIO_ID 0x0030 // Communication ID - -#define SIO_8BIT_MODE 0x0000 // Normal 8-bit communication mode -#define SIO_32BIT_MODE 0x1000 // Normal 32-bit communication mode -#define SIO_MULTI_MODE 0x2000 // Multi-player communication mode -#define SIO_UART_MODE 0x3000 // UART communication mode - -#define SIO_9600_BPS 0x0000 // baud rate 9600 bps -#define SIO_38400_BPS 0x0001 // 38400 bps -#define SIO_57600_BPS 0x0002 // 57600 bps -#define SIO_115200_BPS 0x0003 // 115200 bps - -#define SIO_MULTI_SI 0x0004 // Multi-player communication SI terminal -#define SIO_MULTI_SD 0x0008 // SD terminal -#define SIO_MULTI_BUSY 0x0080 - -#define SIO_ERROR 0x0040 // Detect error -#define SIO_START 0x0080 // Start transfer -#define SIO_ENABLE 0x0080 // Enable SIO - -#define SIO_INTR_ENABLE 0x4000 - -#define SIO_MULTI_SI_SHIFT 2 -#define SIO_MULTI_SI_MASK 0x1 -#define SIO_MULTI_DI_SHIFT 3 -#define SIO_MULTI_DI_MASK 0x1 - -// keys -#define A_BUTTON 0x0001 -#define B_BUTTON 0x0002 -#define SELECT_BUTTON 0x0004 -#define START_BUTTON 0x0008 -#define DPAD_RIGHT 0x0010 -#define DPAD_LEFT 0x0020 -#define DPAD_UP 0x0040 -#define DPAD_DOWN 0x0080 -#define R_BUTTON 0x0100 -#define L_BUTTON 0x0200 -#define KEYS_MASK 0x03FF -#define KEY_INTR_ENABLE 0x0400 -#define KEY_OR_INTR 0x0000 -#define KEY_AND_INTR 0x8000 -#define DPAD_ANY ((DPAD_RIGHT | DPAD_LEFT | DPAD_UP | DPAD_DOWN)) -#define JOY_EXCL_DPAD 0x030F - -// interrupt flags -#define INTR_FLAG_VBLANK (1 << 0) -#define INTR_FLAG_HBLANK (1 << 1) -#define INTR_FLAG_VCOUNT (1 << 2) -#define INTR_FLAG_TIMER0 (1 << 3) -#define INTR_FLAG_TIMER1 (1 << 4) -#define INTR_FLAG_TIMER2 (1 << 5) -#define INTR_FLAG_TIMER3 (1 << 6) -#define INTR_FLAG_SERIAL (1 << 7) -#define INTR_FLAG_DMA0 (1 << 8) -#define INTR_FLAG_DMA1 (1 << 9) -#define INTR_FLAG_DMA2 (1 << 10) -#define INTR_FLAG_DMA3 (1 << 11) -#define INTR_FLAG_KEYPAD (1 << 12) -#define INTR_FLAG_GAMEPAK (1 << 13) - -// WAITCNT -#define WAITCNT_SRAM_4 (0 << 0) -#define WAITCNT_SRAM_3 (1 << 0) -#define WAITCNT_SRAM_2 (2 << 0) -#define WAITCNT_SRAM_8 (3 << 0) -#define WAITCNT_SRAM_MASK (3 << 0) - -#define WAITCNT_WS0_N_4 (0 << 2) -#define WAITCNT_WS0_N_3 (1 << 2) -#define WAITCNT_WS0_N_2 (2 << 2) -#define WAITCNT_WS0_N_8 (3 << 2) -#define WAITCNT_WS0_N_MASK (3 << 2) - -#define WAITCNT_WS0_S_2 (0 << 4) -#define WAITCNT_WS0_S_1 (1 << 4) - -#define WAITCNT_WS1_N_4 (0 << 5) -#define WAITCNT_WS1_N_3 (1 << 5) -#define WAITCNT_WS1_N_2 (2 << 5) -#define WAITCNT_WS1_N_8 (3 << 5) -#define WAITCNT_WS1_N_MASK (3 << 5) - -#define WAITCNT_WS1_S_4 (0 << 7) -#define WAITCNT_WS1_S_1 (1 << 7) - -#define WAITCNT_WS2_N_4 (0 << 8) -#define WAITCNT_WS2_N_3 (1 << 8) -#define WAITCNT_WS2_N_2 (2 << 8) -#define WAITCNT_WS2_N_8 (3 << 8) -#define WAITCNT_WS2_N_MASK (3 << 8) - -#define WAITCNT_WS2_S_8 (0 << 10) -#define WAITCNT_WS2_S_1 (1 << 10) - -#define WAITCNT_PHI_OUT_NONE (0 << 11) -#define WAITCNT_PHI_OUT_4MHZ (1 << 11) -#define WAITCNT_PHI_OUT_8MHZ (2 << 11) -#define WAITCNT_PHI_OUT_16MHZ (3 << 11) -#define WAITCNT_PHI_OUT_MASK (3 << 11) - -#define WAITCNT_PREFETCH_ENABLE (1 << 14) - -#define WAITCNT_AGB (0 << 15) -#define WAITCNT_CGB (1 << 15) - -#endif // GUARD_GBA_IO_REG_H diff --git a/berry_fix/payload/include/gba/isagbprint.h b/berry_fix/payload/include/gba/isagbprint.h deleted file mode 100644 index c5eb456c3f..0000000000 --- a/berry_fix/payload/include/gba/isagbprint.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef GUARD_GBA_ISAGBPRINT_H -#define GUARD_GBA_ISAGBPRINT_H - -#ifdef NDEBUG -#define AGBPrintInit() -#define AGBPutc(cChr) -#define AGBPrint(pBuf) -#define AGBPrintf(pBuf, ...) -#define AGBPrintFlush1Block() -#define AGBPrintFlush() -#define AGBAssert(pFile, nLine, pExpression, nStopProgram) -#else -void AGBPrintInit(void); -void AGBPutc(const char cChr); -void AGBPrint(const char *pBuf); -void AGBPrintf(const char *pBuf, ...); -void AGBPrintFlush1Block(void); -void AGBPrintFlush(void); -void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopProgram); -#endif - -#undef AGB_ASSERT -#ifdef NDEBUG -#define AGB_ASSERT(exp) -#else -#define AGB_ASSERT(exp) (exp) ? ((void*)0) : AGBAssert(__FILE__, __LINE__, #exp, 1); -#endif - -#undef AGB_WARNING -#ifdef NDEBUG -#define AGB_WARNING(exp) -#else -#define AGB_WARNING(exp) (exp) ? ((void*)0) : AGBAssert(__FILE__, __LINE__, #exp, 0); -#endif - -// for matching purposes - -#ifdef NDEBUG -#define AGB_ASSERT_EX(exp, file, line) -#else -#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void*)0) : AGBAssert(file, line, #exp, 1); -#endif - -#ifdef NDEBUG -#define AGB_WARNING_EX(exp, file, line) -#else -#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void*)0) : AGBAssert(file, line, #exp, 0); -#endif - -#endif // GUARD_GBA_ISAGBPRINT_H diff --git a/berry_fix/payload/include/gba/m4a_internal.h b/berry_fix/payload/include/gba/m4a_internal.h deleted file mode 100644 index 1aca675854..0000000000 --- a/berry_fix/payload/include/gba/m4a_internal.h +++ /dev/null @@ -1,467 +0,0 @@ -#ifndef GUARD_GBA_M4A_INTERNAL_H -#define GUARD_GBA_M4A_INTERNAL_H - -#include "gba/gba.h" - -// ASCII encoding of 'Smsh' in reverse -// This is presumably short for SMASH, the developer of MKS4AGB. -#define ID_NUMBER 0x68736D53 - -#define C_V 0x40 // center value for PAN, BEND, and TUNE - -#define SOUND_MODE_REVERB_VAL 0x0000007F -#define SOUND_MODE_REVERB_SET 0x00000080 -#define SOUND_MODE_MAXCHN 0x00000F00 -#define SOUND_MODE_MAXCHN_SHIFT 8 -#define SOUND_MODE_MASVOL 0x0000F000 -#define SOUND_MODE_MASVOL_SHIFT 12 -#define SOUND_MODE_FREQ_05734 0x00010000 -#define SOUND_MODE_FREQ_07884 0x00020000 -#define SOUND_MODE_FREQ_10512 0x00030000 -#define SOUND_MODE_FREQ_13379 0x00040000 -#define SOUND_MODE_FREQ_15768 0x00050000 -#define SOUND_MODE_FREQ_18157 0x00060000 -#define SOUND_MODE_FREQ_21024 0x00070000 -#define SOUND_MODE_FREQ_26758 0x00080000 -#define SOUND_MODE_FREQ_31536 0x00090000 -#define SOUND_MODE_FREQ_36314 0x000A0000 -#define SOUND_MODE_FREQ_40137 0x000B0000 -#define SOUND_MODE_FREQ_42048 0x000C0000 -#define SOUND_MODE_FREQ 0x000F0000 -#define SOUND_MODE_FREQ_SHIFT 16 -#define SOUND_MODE_DA_BIT_9 0x00800000 -#define SOUND_MODE_DA_BIT_8 0x00900000 -#define SOUND_MODE_DA_BIT_7 0x00A00000 -#define SOUND_MODE_DA_BIT_6 0x00B00000 -#define SOUND_MODE_DA_BIT 0x00B00000 -#define SOUND_MODE_DA_BIT_SHIFT 20 - -struct WaveData -{ - u16 type; - u16 status; - u32 freq; - u32 loopStart; - u32 size; // number of samples - s8 data[1]; // samples -}; - -#define TONEDATA_TYPE_CGB 0x07 -#define TONEDATA_TYPE_FIX 0x08 -#define TONEDATA_TYPE_SPL 0x40 // key split -#define TONEDATA_TYPE_RHY 0x80 // rhythm - -#define TONEDATA_P_S_PAN 0xc0 -#define TONEDATA_P_S_PAM TONEDATA_P_S_PAN - -struct ToneData -{ - u8 type; - u8 key; - u8 length; // sound length (compatible sound) - u8 pan_sweep; // pan or sweep (compatible sound ch. 1) - struct WaveData *wav; - u8 attack; - u8 decay; - u8 sustain; - u8 release; -}; - -struct CgbChannel -{ - u8 sf; - u8 ty; - u8 rightVolume; - u8 leftVolume; - u8 at; - u8 de; - u8 su; - u8 re; - u8 ky; - u8 ev; - u8 eg; - u8 ec; - u8 echoVolume; - u8 echoLength; - u8 d1; - u8 d2; - u8 gt; - u8 mk; - u8 ve; - u8 pr; - u8 rp; - u8 d3[3]; - u8 d5; - u8 sg; - u8 n4; - u8 pan; - u8 panMask; - u8 mo; - u8 le; - u8 sw; - u32 fr; - u32 wp; - u32 cp; - u32 tp; - u32 pp; - u32 np; - u8 d4[8]; -}; - -struct MusicPlayerTrack; - -struct SoundChannel -{ - u8 status; - u8 type; - u8 rightVolume; - u8 leftVolume; - u8 attack; - u8 decay; - u8 sustain; - u8 release; - u8 ky; - u8 ev; - u8 er; - u8 el; - u8 echoVolume; - u8 echoLength; - u8 d1; - u8 d2; - u8 gt; - u8 mk; - u8 ve; - u8 pr; - u8 rp; - u8 d3[3]; - u32 ct; - u32 fw; - u32 freq; - struct WaveData *wav; - u32 cp; - struct MusicPlayerTrack *track; - u32 pp; - u32 np; - u32 d4; - u16 xpi; - u16 xpc; -}; - -#define MAX_DIRECTSOUND_CHANNELS 12 - -#define PCM_DMA_BUF_SIZE 1584 // size of Direct Sound buffer - -struct SoundInfo -{ - // This field is normally equal to ID_NUMBER but it is set to other - // values during sensitive operations for locking purposes. - // This field should be volatile but isn't. This could potentially cause - // race conditions. - u32 ident; - - vu8 pcmDmaCounter; - - // Direct Sound - u8 reverb; - u8 maxChans; - u8 masterVolume; - u8 freq; - - u8 mode; - u8 c15; - u8 pcmDmaPeriod; // number of V-blanks per PCM DMA - u8 maxLines; - u8 gap[3]; - s32 pcmSamplesPerVBlank; - s32 pcmFreq; - s32 divFreq; - struct CgbChannel *cgbChans; - u32 func; - u32 intp; - void (*CgbSound)(void); - void (*CgbOscOff)(u8); - u32 (*MidiKeyToCgbFreq)(u8, u8, u8); - u32 MPlayJumpTable; - u32 plynote; - u32 ExtVolPit; - u8 gap2[16]; - struct SoundChannel chans[MAX_DIRECTSOUND_CHANNELS]; - s8 pcmBuffer[PCM_DMA_BUF_SIZE * 2]; -}; - -struct SongHeader -{ - u8 trackCount; - u8 blockCount; - u8 priority; - u8 reverb; - struct ToneData *tone; - u8 *part[1]; -}; - -struct PokemonCrySong -{ - u8 trackCount; - u8 blockCount; - u8 priority; - u8 reverb; - struct ToneData *tone; - u8 *part[2]; - u8 gap; - u8 part0; // 0x11 - u8 tuneValue; // 0x12 - u8 gotoCmd; // 0x13 - u32 gotoTarget; // 0x14 - u8 part1; // 0x18 - u8 tuneValue2; // 0x19 - u8 cont[2]; // 0x1A - u8 volCmd; // 0x1C - u8 volumeValue; // 0x1D - u8 unkCmd0D[2]; // 0x1E - u32 unkCmd0DParam; // 0x20 - u8 xreleCmd[2]; // 0x24 - u8 releaseValue; // 0x26 - u8 panCmd; - u8 panValue; // 0x28 - u8 tieCmd; // 0x29 - u8 tieKeyValue; // 0x2A - u8 tieVelocityValue; // 0x2B - u8 unkCmd0C[2]; // 0x2C - u16 unkCmd0CParam; // 0x2E - u8 end[2]; // 0x30 -}; - -#define MPT_FLG_VOLSET 0x01 -#define MPT_FLG_VOLCHG 0x03 -#define MPT_FLG_PITSET 0x04 -#define MPT_FLG_PITCHG 0x0C -#define MPT_FLG_START 0x40 -#define MPT_FLG_EXIST 0x80 - -struct MusicPlayerTrack -{ - u8 flags; - u8 wait; - u8 patternLevel; - u8 repN; - u8 gateTime; - u8 key; - u8 velocity; - u8 runningStatus; - u8 keyM; - u8 pitM; - s8 keyShift; - s8 keyShiftX; - s8 tune; - u8 pitX; - s8 bend; - u8 bendRange; - u8 volMR; - u8 volML; - u8 vol; - u8 volX; - s8 pan; - s8 panX; - s8 modM; - u8 mod; - u8 modT; - u8 lfoSpeed; - u8 lfoSpeedC; - u8 lfoDelay; - u8 lfoDelayC; - u8 priority; - u8 echoVolume; - u8 echoLength; - struct SoundChannel *chan; - struct ToneData tone; - u8 gap[10]; - u16 unk_3A; - u32 unk_3C; - u8 *cmdPtr; - u8 *patternStack[3]; -}; - -#define MUSICPLAYER_STATUS_TRACK 0x0000ffff -#define MUSICPLAYER_STATUS_PAUSE 0x80000000 - -#define MAX_MUSICPLAYER_TRACKS 16 - -#define TEMPORARY_FADE 0x0001 -#define FADE_IN 0x0002 -#define FADE_VOL_MAX 64 -#define FADE_VOL_SHIFT 2 - -struct MusicPlayerInfo -{ - struct SongHeader *songHeader; - u32 status; - u8 trackCount; - u8 priority; - u8 cmd; - u8 unk_B; - u32 clock; - u8 gap[8]; - u8 *memAccArea; - u16 tempoD; - u16 tempoU; - u16 tempoI; - u16 tempoC; - u16 fadeOI; - u16 fadeOC; - u16 fadeOV; - struct MusicPlayerTrack *tracks; - struct ToneData *tone; - u32 ident; - u32 func; - u32 intp; -}; - -struct MusicPlayer -{ - struct MusicPlayerInfo *info; - struct MusicPlayerTrack *track; - u8 unk_8; - u16 unk_A; -}; - -struct Song -{ - struct SongHeader *header; - u16 ms; - u16 me; -}; - -extern const struct MusicPlayer gMPlayTable[]; -extern const struct Song gSongTable[]; - - - -extern u8 gMPlayMemAccArea[]; - -//u8 gPokemonCrySong[52]; -//u8 gPokemonCrySongs[52 * MAX_POKEMON_CRIES]; - -#define MAX_POKEMON_CRIES 2 - -extern struct PokemonCrySong gPokemonCrySong; -extern struct PokemonCrySong gPokemonCrySongs[]; - -extern struct MusicPlayerInfo gPokemonCryMusicPlayers[]; -extern struct MusicPlayerTrack gPokemonCryTracks[]; - -extern char SoundMainRAM[]; - -extern void *gMPlayJumpTable[]; - -typedef void (*XcmdFunc)(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -extern const XcmdFunc gXcmdTable[]; - -extern struct CgbChannel gCgbChans[]; - -extern const u8 gScaleTable[]; -extern const u32 gFreqTable[]; -extern const u16 gPcmSamplesPerVBlankTable[]; - -extern const u8 gCgbScaleTable[]; -extern const s16 gCgbFreqTable[]; -extern const u8 gNoiseTable[]; - -extern const struct PokemonCrySong gPokemonCrySongTemplate; - -extern const struct ToneData voicegroup000; - -extern char gNumMusicPlayers[]; -extern char gMaxLines[]; - -#define NUM_MUSIC_PLAYERS ((u16)gNumMusicPlayers) -#define MAX_LINES ((u32)gMaxLines) - -u32 umul3232H32(u32 multiplier, u32 multiplicand); -void SoundMain(void); -void SoundMainBTM(void); -void TrackStop(struct MusicPlayerInfo *mplayInfo, struct MusicPlayerTrack *track); -void MPlayMain(void); -void RealClearChain(void *x); - -void MPlayContinue(struct MusicPlayerInfo *mplayInfo); -void MPlayStart(struct MusicPlayerInfo *mplayInfo, struct SongHeader *songHeader); -void m4aMPlayStop(struct MusicPlayerInfo *mplayInfo); -void FadeOutBody(struct MusicPlayerInfo *mplayInfo); -void TrkVolPitSet(struct MusicPlayerInfo *mplayInfo, struct MusicPlayerTrack *track); -void MPlayFadeOut(struct MusicPlayerInfo *mplayInfo, u16 speed); -void ClearChain(void *x); -void Clear64byte(void *addr); -void SoundInit(struct SoundInfo *soundInfo); -void MPlayExtender(struct CgbChannel *cgbChans); -void m4aSoundMode(u32 mode); -void MPlayOpen(struct MusicPlayerInfo *mplayInfo, struct MusicPlayerTrack *track, u8 a3); -void CgbSound(void); -void CgbOscOff(u8); -u32 MidiKeyToCgbFreq(u8, u8, u8); -void DummyFunc(void); -void MPlayJumpTableCopy(void **mplayJumpTable); -void SampleFreqSet(u32 freq); -void m4aSoundVSyncOn(void); -void m4aSoundVSyncOff(void); - -void m4aMPlayTempoControl(struct MusicPlayerInfo *mplayInfo, u16 tempo); -void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume); -void m4aMPlayPitchControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s16 pitch); -void m4aMPlayPanpotControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, s8 pan); -void ClearModM(struct MusicPlayerTrack *track); -void m4aMPlayModDepthSet(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u8 modDepth); -void m4aMPlayLFOSpeedSet(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u8 lfoSpeed); - -struct MusicPlayerInfo *SetPokemonCryTone(struct ToneData *tone); -void SetPokemonCryVolume(u8 val); -void SetPokemonCryPanpot(s8 val); -void SetPokemonCryPitch(s16 val); -void SetPokemonCryLength(u16 val); -void SetPokemonCryRelease(u8 val); -void SetPokemonCryProgress(u32 val); -bool32 IsPokemonCryPlaying(struct MusicPlayerInfo *mplayInfo); -void SetPokemonCryChorus(s8 val); -void SetPokemonCryStereo(u32 val); -void SetPokemonCryPriority(u8 val); - -// sound command handler functions -void ply_fine(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_goto(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_patt(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_pend(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_rept(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_memacc(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_prio(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_tempo(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_keysh(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_voice(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_vol(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_pan(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_bend(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_bendr(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_lfos(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_lfodl(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_mod(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_modt(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_tune(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_port(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xcmd(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_endtie(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_note(struct MusicPlayerInfo *, struct MusicPlayerTrack *); - -// extended sound command handler functions -void ply_xxx(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xwave(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xtype(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xatta(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xdeca(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xsust(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xrele(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xiecv(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xiecl(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xleng(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xswee(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xcmd_0C(struct MusicPlayerInfo *, struct MusicPlayerTrack *); -void ply_xcmd_0D(struct MusicPlayerInfo *, struct MusicPlayerTrack *); - -#endif // GUARD_GBA_M4A_INTERNAL_H diff --git a/berry_fix/payload/include/gba/macro.h b/berry_fix/payload/include/gba/macro.h deleted file mode 100644 index 6f9c55f2ed..0000000000 --- a/berry_fix/payload/include/gba/macro.h +++ /dev/null @@ -1,247 +0,0 @@ -#ifndef GUARD_GBA_MACRO_H -#define GUARD_GBA_MACRO_H - -#define CPU_FILL(value, dest, size, bit) \ -{ \ - vu##bit tmp = (vu##bit)(value); \ - CpuSet((void *)&tmp, \ - dest, \ - CPU_SET_##bit##BIT | CPU_SET_SRC_FIXED | ((size)/(bit/8) & 0x1FFFFF)); \ -} - -#define CpuFill16(value, dest, size) CPU_FILL(value, dest, size, 16) -#define CpuFill32(value, dest, size) CPU_FILL(value, dest, size, 32) - -#define CPU_COPY(src, dest, size, bit) CpuSet(src, dest, CPU_SET_##bit##BIT | ((size)/(bit/8) & 0x1FFFFF)) - -#define CpuCopy16(src, dest, size) CPU_COPY(src, dest, size, 16) -#define CpuCopy32(src, dest, size) CPU_COPY(src, dest, size, 32) - -#define CpuFastFill(value, dest, size) \ -{ \ - vu32 tmp = (vu32)(value); \ - CpuFastSet((void *)&tmp, \ - dest, \ - CPU_FAST_SET_SRC_FIXED | ((size)/(32/8) & 0x1FFFFF)); \ -} - -#define CpuFastFill16(value, dest, size) CpuFastFill(((value) << 16) | (value), (dest), (size)) - -#define CpuFastFill8(value, dest, size) CpuFastFill(((value) << 24) | ((value) << 16) | ((value) << 8) | (value), (dest), (size)) - -#define CpuFastCopy(src, dest, size) CpuFastSet(src, dest, ((size)/(32/8) & 0x1FFFFF)) - -#define DmaSet(dmaNum, src, dest, control) \ -{ \ - vu32 *dmaRegs = (vu32 *)REG_ADDR_DMA##dmaNum; \ - dmaRegs[0] = (vu32)(src); \ - dmaRegs[1] = (vu32)(dest); \ - dmaRegs[2] = (vu32)(control); \ - dmaRegs[2]; \ -} - -#define DMA_FILL(dmaNum, value, dest, size, bit) \ -{ \ - vu##bit tmp = (vu##bit)(value); \ - DmaSet(dmaNum, \ - &tmp, \ - dest, \ - (DMA_ENABLE | DMA_START_NOW | DMA_##bit##BIT | DMA_SRC_FIXED | DMA_DEST_INC) << 16 \ - | ((size)/(bit/8))); \ -} - -#define DmaFill16(dmaNum, value, dest, size) DMA_FILL(dmaNum, value, dest, size, 16) -#define DmaFill32(dmaNum, value, dest, size) DMA_FILL(dmaNum, value, dest, size, 32) - -// Note that the DMA clear macros cause the DMA control value to be calculated -// at runtime rather than compile time. The size is divided by the DMA transfer -// unit size (2 or 4 bytes) and then combined with the DMA control flags using a -// bitwise OR operation. - -#define DMA_CLEAR(dmaNum, dest, size, bit) \ -{ \ - vu##bit *_dest = (vu##bit *)(dest); \ - u32 _size = size; \ - DmaFill##bit(dmaNum, 0, _dest, _size); \ -} - -#define DmaClear16(dmaNum, dest, size) DMA_CLEAR(dmaNum, dest, size, 16) -#define DmaClear32(dmaNum, dest, size) DMA_CLEAR(dmaNum, dest, size, 32) - -#define DMA_COPY(dmaNum, src, dest, size, bit) \ - DmaSet(dmaNum, \ - src, \ - dest, \ - (DMA_ENABLE | DMA_START_NOW | DMA_##bit##BIT | DMA_SRC_INC | DMA_DEST_INC) << 16 \ - | ((size)/(bit/8))) - -#define DmaCopy16(dmaNum, src, dest, size) DMA_COPY(dmaNum, src, dest, size, 16) -#define DmaCopy32(dmaNum, src, dest, size) DMA_COPY(dmaNum, src, dest, size, 32) - -#define DmaCopyLarge(dmaNum, src, dest, size, block, bit) \ -{ \ - const void *_src = src; \ - void *_dest = (void *)dest; \ - u32 _size = size; \ - while (1) \ - { \ - DmaCopy##bit(dmaNum, _src, _dest, (block)); \ - _src += (block); \ - _dest += (block); \ - _size -= (block); \ - if (_size <= (block)) \ - { \ - DmaCopy##bit(dmaNum, _src, _dest, _size); \ - break; \ - } \ - } \ -} - -#define DmaCopyLarge16(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 16) - -#define DmaCopyLarge32(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 32) - -#define DmaFillLarge(dmaNum, value, dest, size, block, bit) \ -{ \ - void *_dest = (void *)dest; \ - u32 _size = size; \ - while (1) \ - { \ - DmaFill##bit(dmaNum, value, _dest, (block)); \ - _dest += (block); \ - _size -= (block); \ - if (_size <= (block)) \ - { \ - DmaFill##bit(dmaNum, value, _dest, _size); \ - break; \ - } \ - } \ -} - -#define DmaFillLarge16(dmaNum, value, dest, size, block) DmaFillLarge(dmaNum, value, dest, size, block, 16) - -#define DmaFillLarge32(dmaNum, value, dest, size, block) DmaFillLarge(dmaNum, value, dest, size, block, 32) - -#define DmaClearLarge(dmaNum, dest, size, block, bit) \ -{ \ - void *_dest = (void *)dest; \ - u32 _size = size; \ - while (1) \ - { \ - DmaFill##bit(dmaNum, 0, _dest, (block)); \ - _dest += (block); \ - _size -= (block); \ - if (_size <= (block)) \ - { \ - DmaFill##bit(dmaNum, 0, _dest, _size); \ - break; \ - } \ - } \ -} - -#define DmaClearLarge16(dmaNum, dest, size, block) DmaClearLarge(dmaNum, dest, size, block, 16) - -#define DmaClearLarge32(dmaNum, dest, size, block) DmaClearLarge(dmaNum, dest, size, block, 32) - -#define DmaCopyDefvars(dmaNum, src, dest, size, bit) \ -{ \ - const void *_src = src; \ - void *_dest = (void *)(dest); \ - u32 _size = size; \ - DmaCopy##bit(dmaNum, _src, _dest, _size); \ -} - -#define DmaCopy16Defvars(dmaNum, src, dest, size) DmaCopyDefvars(dmaNum, src, dest, size, 16) -#define DmaCopy32Defvars(dmaNum, src, dest, size) DmaCopyDefvars(dmaNum, src, dest, size, 32) - -#define DmaFillDefvars(dmaNum, value, dest, size, bit) \ -{ \ - void *_dest = (void *)dest; \ - u32 _size = size; \ - DmaFill##bit(dmaNum, value, _dest, _size); \ -} - -#define DmaFill16Defvars(dmaNum, value, dest, size) DmaFillDefvars(dmaNum, value, dest, size, 16) -#define DmaFill32Defvars(dmaNum, value, dest, size) DmaFillDefvars(dmaNum, value, dest, size, 32) - -#define DmaClearDefvars(dmaNum, dest, size, bit) \ -{ \ - void *_dest = (void *)dest; \ - u32 _size = size; \ - DmaClear##bit(dmaNum, _dest, _size); \ -} - -#define DmaClear16Defvars(dmaNum, dest, size) DmaClearDefvars(dmaNum, dest, size, 16) -#define DmaClear32Defvars(dmaNum, dest, size) DmaClearDefvars(dmaNum, dest, size, 32) - -#define DmaStop(dmaNum) \ -{ \ - vu16 *dmaRegs = (vu16 *)REG_ADDR_DMA##dmaNum; \ - dmaRegs[5] &= ~(DMA_START_MASK | DMA_DREQ_ON | DMA_REPEAT); \ - dmaRegs[5] &= ~DMA_ENABLE; \ - dmaRegs[5]; \ -} - -#define IntrEnable(flags) \ -{ \ - u16 imeTemp; \ - \ - imeTemp = REG_IME; \ - REG_IME = 0; \ - REG_IE |= flags; \ - REG_IME = imeTemp; \ -} \ -// from pokeemerald -// Maximum amount of data we will transfer in one operation -#define MAX_DMA_BLOCK_SIZE 0x1000 - -#define MAX_DMA_REQUESTS 128 - -#define DMA_REQUEST_COPY32 1 -#define DMA_REQUEST_FILL32 2 -#define DMA_REQUEST_COPY16 3 -#define DMA_REQUEST_FILL16 4 - -#define Dma3CopyLarge_(src, dest, size, bit) \ -{ \ - const void *_src = src; \ - void *_dest = (void *)dest; \ - u32 _size = size; \ - while (1) \ - { \ - if (_size <= MAX_DMA_BLOCK_SIZE) \ - { \ - DmaCopy##bit(3, _src, _dest, _size); \ - break; \ - } \ - DmaCopy##bit(3, _src, _dest, MAX_DMA_BLOCK_SIZE); \ - _src += MAX_DMA_BLOCK_SIZE; \ - _dest += MAX_DMA_BLOCK_SIZE; \ - _size -= MAX_DMA_BLOCK_SIZE; \ - } \ -} - -#define Dma3CopyLarge16_(src, dest, size) Dma3CopyLarge_(src, dest, size, 16) -#define Dma3CopyLarge32_(src, dest, size) Dma3CopyLarge_(src, dest, size, 32) - -#define Dma3FillLarge_(value, dest, size, bit) \ -{ \ - void *_dest = (void *)dest; \ - u32 _size = size; \ - while (1) \ - { \ - if (_size <= MAX_DMA_BLOCK_SIZE) \ - { \ - DmaFill##bit(3, value, _dest, _size); \ - break; \ - } \ - DmaFill##bit(3, value, _dest, MAX_DMA_BLOCK_SIZE); \ - _dest += MAX_DMA_BLOCK_SIZE; \ - _size -= MAX_DMA_BLOCK_SIZE; \ - } \ -} - -#define Dma3FillLarge16_(value, dest, size) Dma3FillLarge_(value, dest, size, 16) -#define Dma3FillLarge32_(value, dest, size) Dma3FillLarge_(value, dest, size, 32) - -#endif // GUARD_GBA_MACRO_H diff --git a/berry_fix/payload/include/gba/multiboot.h b/berry_fix/payload/include/gba/multiboot.h deleted file mode 100644 index 14b6594b29..0000000000 --- a/berry_fix/payload/include/gba/multiboot.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef GUARD_GBA_MULTIBOOT_H -#define GUARD_GBA_MULTIBOOT_H - -#define MULTIBOOT_NCHILD 3 // Maximum number of slaves -#define MULTIBOOT_HEADER_SIZE 0xc0 // Header size -#define MULTIBOOT_SEND_SIZE_MIN 0x100 // Minimum transmission size -#define MULTIBOOT_SEND_SIZE_MAX 0x40000 // Maximum transmission size - -struct MultiBootParam -{ - u32 system_work[5]; // 00 - u8 handshake_data; // 14 - u8 padding; // 15 - u16 handshake_timeout; // 16 - u8 probe_count; // 18 - u8 client_data[MULTIBOOT_NCHILD]; // 19 - u8 palette_data; // 1c - u8 response_bit; // 1d - u8 client_bit; // 1e - u8 reserved1; // 1f - const u8 *boot_srcp; // 20 - const u8 *boot_endp; // 24 - const u8 *masterp; - u8 *reserved2[MULTIBOOT_NCHILD]; - u32 system_work2[4]; - u8 sendflag; - u8 probe_target_bit; - u8 check_wait; - u8 server_type; -}; - -#define MULTIBOOT_ERROR_04 0x04 -#define MULTIBOOT_ERROR_08 0x08 -#define MULTIBOOT_ERROR_0c 0x0c -#define MULTIBOOT_ERROR_40 0x40 -#define MULTIBOOT_ERROR_44 0x44 -#define MULTIBOOT_ERROR_48 0x48 -#define MULTIBOOT_ERROR_4c 0x4c -#define MULTIBOOT_ERROR_80 0x80 -#define MULTIBOOT_ERROR_84 0x84 -#define MULTIBOOT_ERROR_88 0x88 -#define MULTIBOOT_ERROR_8c 0x8c -#define MULTIBOOT_ERROR_NO_PROBE_TARGET 0x50 -#define MULTIBOOT_ERROR_NO_DLREADY 0x60 -#define MULTIBOOT_ERROR_BOOT_FAILURE 0x70 -#define MULTIBOOT_ERROR_HANDSHAKE_FAILURE 0x71 - -#define MULTIBOOT_CONNECTION_CHECK_WAIT 15 - -#define MULTIBOOT_SERVER_TYPE_NORMAL 0 -#define MULTIBOOT_SERVER_TYPE_QUICK 1 - -#define MULTIBOOT_HANDSHAKE_TIMEOUT 400 - -#endif // GUARD_GBA_MULTIBOOT_H diff --git a/berry_fix/payload/include/gba/syscall.h b/berry_fix/payload/include/gba/syscall.h deleted file mode 100644 index eb1bd4e20f..0000000000 --- a/berry_fix/payload/include/gba/syscall.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef GUARD_GBA_SYSCALL_H -#define GUARD_GBA_SYSCALL_H - -#include "gba/types.h" - -#define RESET_EWRAM 0x01 -#define RESET_IWRAM 0x02 -#define RESET_PALETTE 0x04 -#define RESET_VRAM 0x08 -#define RESET_OAM 0x10 -#define RESET_SIO_REGS 0x20 -#define RESET_SOUND_REGS 0x40 -#define RESET_REGS 0x80 -#define RESET_ALL 0xFF - -void SoftReset(u32 resetFlags); - -void RegisterRamReset(u32 resetFlags); - -void VBlankIntrWait(void); - -u16 Sqrt(u32 num); - -u16 ArcTan2(s16 x, s16 y); - -#define CPU_SET_SRC_FIXED 0x01000000 -#define CPU_SET_16BIT 0x00000000 -#define CPU_SET_32BIT 0x04000000 - -void CpuSet(const void *src, void *dest, u32 control); - -#define CPU_FAST_SET_SRC_FIXED 0x01000000 - -void CpuFastSet(const void *src, void *dest, u32 control); - -void BgAffineSet(struct BgAffineSrcData *src, struct BgAffineDstData *dest, s32 count); - -void ObjAffineSet(struct ObjAffineSrcData *src, void *dest, s32 count, s32 offset); - -void LZ77UnCompWram(const void *src, void *dest); - -void LZ77UnCompVram(const void *src, void *dest); - -void RLUnCompWram(const void *src, void *dest); - -void RLUnCompVram(const void *src, void *dest); - -int MultiBoot(struct MultiBootParam *mp); - -void SoundBiasReset(void); - -void SoundBiasSet(void); - -u32 Div(u32 divisor, u32 dividend); -u32 Mod(u32 divisor, u32 dividend); - -#endif // GUARD_GBA_SYSCALL_H diff --git a/berry_fix/payload/include/gba/types.h b/berry_fix/payload/include/gba/types.h deleted file mode 100644 index e919abc22a..0000000000 --- a/berry_fix/payload/include/gba/types.h +++ /dev/null @@ -1,146 +0,0 @@ -#ifndef GUARD_GBA_TYPES_H -#define GUARD_GBA_TYPES_H - -#include - -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; -typedef int8_t s8; -typedef int16_t s16; -typedef int32_t s32; -typedef int64_t s64; - -typedef volatile u8 vu8; -typedef volatile u16 vu16; -typedef volatile u32 vu32; -typedef volatile u64 vu64; -typedef volatile s8 vs8; -typedef volatile s16 vs16; -typedef volatile s32 vs32; -typedef volatile s64 vs64; - -typedef float f32; -typedef double f64; - -typedef u8 bool8; -typedef u16 bool16; -typedef u32 bool32; - -struct BgCnt -{ - u16 priority:2; - u16 charBaseBlock:2; - u16 dummy:2; - u16 mosaic:1; - u16 palettes:1; - u16 screenBaseBlock:5; - u16 areaOverflowMode:1; - u16 screenSize:2; -}; -typedef volatile struct BgCnt vBgCnt; - -struct PlttData -{ - u16 r:5; // red - u16 g:5; // green - u16 b:5; // blue - u16 unused_15:1; -}; - -struct OamData -{ - /*0x00*/ u32 y:8; - /*0x01*/ u32 affineMode:2; // 0x1, 0x2 -> 0x4 - u32 objMode:2; // 0x4, 0x8 -> 0xC - u32 mosaic:1; // 0x10 - u32 bpp:1; // 0x20 - u32 shape:2; // 0x40, 0x80 -> 0xC0 - - /*0x02*/ u32 x:9; - u32 matrixNum:5; // bits 3/4 are h-flip/v-flip if not in affine mode - u32 size:2; - - /*0x04*/ u16 tileNum:10; // 0x3FF - u16 priority:2; // 0x400, 0x800 -> 0xC00 - u16 paletteNum:4; - /*0x06*/ u16 affineParam; -}; - -#define ST_OAM_OBJ_NORMAL 0 -#define ST_OAM_OBJ_BLEND 1 -#define ST_OAM_OBJ_WINDOW 2 - -#define ST_OAM_AFFINE_OFF 0 -#define ST_OAM_AFFINE_NORMAL 1 -#define ST_OAM_AFFINE_ERASE 2 -#define ST_OAM_AFFINE_DOUBLE 3 - -#define ST_OAM_AFFINE_ON_MASK 1 -#define ST_OAM_AFFINE_DOUBLE_MASK 2 - -#define ST_OAM_4BPP 0 -#define ST_OAM_8BPP 1 - -#define ST_OAM_SQUARE 0 -#define ST_OAM_H_RECTANGLE 1 -#define ST_OAM_V_RECTANGLE 2 - -struct BgAffineSrcData -{ - s32 texX; - s32 texY; - s16 scrX; - s16 scrY; - s16 sx; - s16 sy; - u16 alpha; -}; - -struct BgAffineDstData -{ - s16 pa; - s16 pb; - s16 pc; - s16 pd; - s32 dx; - s32 dy; -}; - -struct ObjAffineSrcData -{ - s16 xScale; - s16 yScale; - u16 rotation; -}; - -// Multi-player SIO Control Structure -struct SioMultiCnt -{ - u16 baudRate:2; // baud rate - u16 si:1; // SI terminal - u16 sd:1; // SD terminal - u16 id:2; // ID - u16 error:1; // error flag - u16 enable:1; // SIO enable - u16 unused_11_8:4; - u16 mode:2; // communication mode (should equal 2) - u16 intrEnable:1; // IRQ enable - u16 unused_15:1; - u16 data; // data -}; - -#define ST_SIO_MULTI_MODE 2 // Multi-player communication mode - -// baud rate -#define ST_SIO_9600_BPS 0 // 9600 bps -#define ST_SIO_38400_BPS 1 // 38400 bps -#define ST_SIO_57600_BPS 2 // 57600 bps -#define ST_SIO_115200_BPS 3 // 115200 bps - -typedef void (*MainCallback)(void); -typedef void (*IntrCallback)(void); -typedef void (*IntrFunc)(void); - -#endif // GUARD_GBA_TYPES_H diff --git a/berry_fix/payload/include/global.berry.h b/berry_fix/payload/include/global.berry.h deleted file mode 100644 index 8f185c8f9d..0000000000 --- a/berry_fix/payload/include/global.berry.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef GUARD_GLOBAL_BERRY_H -#define GUARD_GLOBAL_BERRY_H - -struct Berry -{ - /*0x00*/ u8 name[7]; - /*0x07*/ u8 firmness; - /*0x08*/ u16 size; - /*0x0A*/ u8 maxYield; - /*0x0B*/ u8 minYield; - /*0x0C*/ const u8 *description1; - /*0x10*/ const u8 *description2; - /*0x14*/ u8 stageDuration; - /*0x15*/ u8 spicy; - /*0x16*/ u8 dry; - /*0x17*/ u8 sweet; - /*0x18*/ u8 bitter; - /*0x19*/ u8 sour; - /*0x1A*/ u8 smoothness; -}; - -struct EnigmaBerry -{ - /*0x000*/ struct Berry berry; - /*0x01B*/ u8 pic[(6 * 6) * TILE_SIZE_4BPP]; - /*0x49C*/ u16 palette[16]; - /*0x4BC*/ u8 description1[45]; - /*0x4E9*/ u8 description2[45]; - /*0x516*/ u8 itemEffect[18]; - /*0x528*/ u8 holdEffect; - /*0x529*/ u8 holdEffectParam; - /*0x52C*/ u32 checksum; -}; - -struct BattleEnigmaBerry -{ - /*0x00*/ u8 name[7]; - /*0x07*/ u8 holdEffect; - /*0x08*/ u8 itemEffect[18]; - /*0x1A*/ u8 holdEffectParam; -}; - -struct BerryTree -{ - /*0x00*/ u8 berry; - /*0x01*/ u8 stage:7; - /* - A berry sparkle is a state that a berry tree - can be in after growing within the player's - viewport. - */ - /*0x01*/ bool8 growthSparkle:1; - /*0x02*/ u16 minutesUntilNextStage; - /*0x04*/ u8 berryYield; - /*0x05*/ u8 regrowthCount:4; - /*0x05*/ u8 watered1:1; - /*0x05*/ u8 watered2:1; - /*0x05*/ u8 watered3:1; - /*0x05*/ u8 watered4:1; -}; - -#endif // GUARD_GLOBAL_BERRY_H diff --git a/berry_fix/payload/include/global.fieldmap.h b/berry_fix/payload/include/global.fieldmap.h deleted file mode 100644 index e7150b429f..0000000000 --- a/berry_fix/payload/include/global.fieldmap.h +++ /dev/null @@ -1,310 +0,0 @@ -#ifndef GUARD_GLOBAL_FIELDMAP_H -#define GUARD_GLOBAL_FIELDMAP_H - -enum -{ - CONNECTION_SOUTH = 1, - CONNECTION_NORTH, - CONNECTION_WEST, - CONNECTION_EAST, - CONNECTION_DIVE, - CONNECTION_EMERGE -}; - -typedef void (*TilesetCB)(void); - -struct Tileset -{ - /*0x00*/ bool8 isCompressed; - /*0x01*/ bool8 isSecondary; - /*0x04*/ void *tiles; - /*0x08*/ void *palettes; - /*0x0c*/ void *metatiles; - /*0x10*/ void *metatileAttributes; - /*0x14*/ TilesetCB callback; -}; - -struct MapLayout -{ - /*0x00*/ s32 width; - /*0x04*/ s32 height; - /*0x08*/ u16 *border; - /*0x0c*/ u16 *map; - /*0x10*/ struct Tileset *primaryTileset; - /*0x14*/ struct Tileset *secondaryTileset; -}; - -struct BackupMapLayout -{ - s32 width; - s32 height; - u16 *map; -}; - -struct EventObjectTemplate -{ - /*0x00*/ u8 localId; - /*0x01*/ u8 graphicsId; - /*0x02*/ u8 unk2; - /*0x04*/ s16 x; - /*0x06*/ s16 y; - /*0x08*/ u8 elevation; - /*0x09*/ u8 movementType; - /*0x0A*/ u8 movementRangeX:4; - u8 movementRangeY:4; - /*0x0C*/ u16 trainerType; - /*0x0E*/ u16 trainerRange_berryTreeId; - /*0x10*/ u8 *script; - /*0x14*/ u16 flagId; -}; - -struct WarpEvent -{ - s16 x, y; - u8 elevation; - u8 warpId; - u8 mapNum; - u8 mapGroup; -}; - -struct CoordEvent -{ - s16 x, y; - u8 elevation; - u16 trigger; - u16 index; - u8 filler_A[0x2]; - u8 *script; -}; - -struct BgEvent -{ - u16 x, y; - u8 elevation; - u8 kind; // The "kind" field determines how to access bgUnion union below. - union { - u8 *script; - struct { - u16 item; - u16 hiddenItemId; - } hiddenItem; - u32 secretBaseId; - } bgUnion; -}; - -struct MapEvents -{ - u8 eventObjectCount; - u8 warpCount; - u8 coordEventCount; - u8 bgEventCount; - - struct EventObjectTemplate *eventObjects; - struct WarpEvent *warps; - struct CoordEvent *coordEvents; - struct BgEvent *bgEvents; -}; - -struct MapConnection -{ - /*0x00*/ u8 direction; - /*0x01*/ u32 offset; - /*0x05*/ u8 mapGroup; - /*0x06*/ u8 mapNum; -}; - -struct MapConnections -{ - s32 count; - struct MapConnection *connections; -}; - -struct MapHeader -{ - /* 0x00 */ struct MapLayout *mapLayout; - /* 0x04 */ struct MapEvents *events; - /* 0x08 */ u8 *mapScripts; - /* 0x0C */ struct MapConnections *connections; - /* 0x10 */ u16 music; - /* 0x12 */ u16 mapLayoutId; - /* 0x14 */ u8 regionMapSectionId; - /* 0x15 */ u8 cave; - /* 0x16 */ u8 weather; - /* 0x17 */ u8 mapType; - /* 0x18 */ u8 filler_18; - /* 0x19 */ u8 escapeRope; - /* 0x1A */ u8 flags; - /* 0x1B */ u8 battleType; -}; - -struct EventObject -{ - /*0x00*/ u32 active:1; - u32 singleMovementActive:1; - u32 triggerGroundEffectsOnMove:1; - u32 triggerGroundEffectsOnStop:1; - u32 disableCoveringGroundEffects:1; // disables ground effects that cover parts of the object's sprite - u32 landingJump:1; - u32 heldMovementActive:1; - u32 heldMovementFinished:1; - /*0x01*/ u32 frozen:1; - u32 facingDirectionLocked:1; - u32 disableAnim:1; // used to disable forced movement sliding animations (like on ice) - u32 enableAnim:1; - u32 inanimate:1; - u32 invisible:1; - u32 offScreen:1; - u32 trackedByCamera:1; // only set for the player object - /*0x02*/ u32 isPlayer:1; - u32 hasReflection:1; - u32 inShortGrass:1; - u32 inShallowFlowingWater:1; - u32 inSandPile:1; - u32 inHotSprings:1; - u32 hasShadow:1; - u32 spriteAnimPausedBackup:1; - /*0x03*/ u32 spriteAffineAnimPausedBackup:1; - u32 disableJumpLandingGroundEffect:1; - u32 fixedPriority:1; - /*0x04*/ u8 spriteId; - /*0x05*/ u8 graphicsId; - /*0x06*/ u8 movementType; - /*0x07*/ u8 trainerType; - /*0x08*/ u8 localId; - /*0x09*/ u8 mapNum; - /*0x0A*/ u8 mapGroup; - /*0x0B*/ u8 currentElevation:4; - u8 previousElevation:4; - /*0x0C*/ struct Coords16 initialCoords; - /*0x10*/ struct Coords16 currentCoords; - /*0x14*/ struct Coords16 previousCoords; - /*0x18*/ u8 facingDirection:4; - /*0x18*/ u8 movementDirection:4; - /*0x19*/ union __attribute__((packed)) { - u8 as_byte; - struct __attribute__((packed)) { - u16 x:4; - u16 y:4; - } as_nybbles; - } range; - /*0x1A*/ u8 fieldEffectSpriteId; - /*0x1B*/ u8 warpArrowSpriteId; - /*0x1C*/ u8 movementActionId; - /*0x1D*/ u8 trainerRange_berryTreeId; - /*0x1E*/ u8 currentMetatileBehavior; - /*0x1F*/ u8 previousMetatileBehavior; - /*0x20*/ u8 previousMovementDirection; - /*0x21*/ u8 directionSequenceIndex; - /*0x22*/ u8 playerCopyableMovement; // used as an index to gCopyPlayerMovementFuncs for the "copy player" movement types - /*size = 0x24*/ -}; - -struct EventObjectGraphicsInfo -{ - /*0x00*/ u16 tileTag; - /*0x02*/ u16 paletteTag; - /*0x04*/ u16 bridgeReflectionPaletteTag; - /*0x06*/ u16 size; - /*0x08*/ s16 width; - /*0x0A*/ s16 height; - /*0x0C*/ u8 paletteSlot:4; - u8 shadowSize:2; - u8 inanimate:1; - u8 disableReflectionPaletteLoad:1; - /*0x0D*/ u8 tracks; - /*0x10*/ const struct OamData *oam; - /*0x14*/ const struct SubspriteTable *subspriteTables; - /*0x18*/ const union AnimCmd *const *anims; - /*0x1C*/ const struct SpriteFrameImage *images; - /*0x20*/ const union AffineAnimCmd *const *affineAnims; -}; - -#define PLAYER_AVATAR_FLAG_ON_FOOT (1 << 0) -#define PLAYER_AVATAR_FLAG_MACH_BIKE (1 << 1) -#define PLAYER_AVATAR_FLAG_ACRO_BIKE (1 << 2) -#define PLAYER_AVATAR_FLAG_SURFING (1 << 3) -#define PLAYER_AVATAR_FLAG_UNDERWATER (1 << 4) -#define PLAYER_AVATAR_FLAG_CONTROLLABLE (1 << 5) -#define PLAYER_AVATAR_FLAG_FORCED_MOVE (1 << 6) -#define PLAYER_AVATAR_FLAG_DASH (1 << 7) - -enum -{ - ACRO_BIKE_NORMAL, - ACRO_BIKE_TURNING, - ACRO_BIKE_WHEELIE_STANDING, - ACRO_BIKE_BUNNY_HOP, - ACRO_BIKE_WHEELIE_MOVING, - ACRO_BIKE_STATE5, - ACRO_BIKE_STATE6, -}; - -enum -{ - DIR_NONE, - DIR_SOUTH, - DIR_NORTH, - DIR_WEST, - DIR_EAST, - DIR_SOUTHWEST, - DIR_SOUTHEAST, - DIR_NORTHWEST, - DIR_NORTHEAST, -}; - -enum -{ - COLLISION_LEDGE_JUMP = 6 -}; - -// player running states -enum -{ - NOT_MOVING, - TURN_DIRECTION, // not the same as turning! turns your avatar without moving. also known as a turn frame in some circles - MOVING, -}; - -// player tile transition states -enum -{ - T_NOT_MOVING, - T_TILE_TRANSITION, - T_TILE_CENTER, // player is on a frame in which they are centered on a tile during which the player either stops or keeps their momentum and keeps going, changing direction if necessary. -}; - -struct PlayerAvatar /* 0x202E858 */ -{ - /*0x00*/ u8 flags; - /*0x01*/ u8 unk1; // used to be named bike, but its definitely not that. seems to be some transition flags - /*0x02*/ u8 runningState; // this is a static running state. 00 is not moving, 01 is turn direction, 02 is moving. - /*0x03*/ u8 tileTransitionState; // this is a transition running state: 00 is not moving, 01 is transition between tiles, 02 means you are on the frame in which you have centered on a tile but are about to keep moving, even if changing directions. 2 is also used for a ledge hop, since you are transitioning. - /*0x04*/ u8 spriteId; - /*0x05*/ u8 eventObjectId; - /*0x06*/ bool8 preventStep; - /*0x07*/ u8 gender; - /*0x08*/ u8 acroBikeState; // 00 is normal, 01 is turning, 02 is standing wheelie, 03 is hopping wheelie - /*0x09*/ u8 newDirBackup; // during bike movement, the new direction as opposed to player's direction is backed up here. - /*0x0A*/ u8 bikeFrameCounter; // on the mach bike, when this value is 1, the bike is moving but not accelerating yet for 1 tile. on the acro bike, this acts as a timer for acro bike. - /*0x0B*/ u8 bikeSpeed; - // acro bike only - /*0x0C*/ u32 directionHistory; // up/down/left/right history is stored in each nybble, but using the field directions and not the io inputs. - /*0x10*/ u32 abStartSelectHistory; // same as above but for A + B + start + select only - // these two are timer history arrays which [0] is the active timer for acro bike. every element is backed up to the next element upon update. - /*0x14*/ u8 dirTimerHistory[8]; - /*0x1C*/ u8 abStartSelectTimerHistory[8]; -}; - -struct Camera -{ - bool8 active:1; - s32 x; - s32 y; -}; - -extern struct EventObject gMapObjects[]; -extern u8 gSelectedEventObject; -extern struct MapHeader gMapHeader; -extern struct PlayerAvatar gPlayerAvatar; - -#endif // GUARD_GLOBAL_FIELDMAP_H diff --git a/berry_fix/payload/include/global.h b/berry_fix/payload/include/global.h deleted file mode 100644 index 4bea138d67..0000000000 --- a/berry_fix/payload/include/global.h +++ /dev/null @@ -1,876 +0,0 @@ -#ifndef GUARD_GLOBAL_H -#define GUARD_GLOBAL_H - -#include "gba/gba.h" - -// global.h from pokemon ruby - -// IDE support -#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__INTELLISENSE__) -// We define these when using certain IDEs to fool preproc -#define _(x) (x) -#define __(x) (x) -#define INCBIN(...) {0} -#define INCBIN_U8 INCBIN -#define INCBIN_U16 INCBIN -#define INCBIN_U32 INCBIN -#define INCBIN_S8 INCBIN -#define INCBIN_S16 INCBIN -#define INCBIN_S32 INCBIN -#endif // IDE support - -// Prevent cross-jump optimization. -#define BLOCK_CROSS_JUMP asm(""); - -// to help in decompiling -#define asm_comment(x) asm volatile("@ -- " x " -- ") - -#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided\n") - -#define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) - - -#define POKEMON_SLOTS_NUMBER 412 -#define POKEMON_NAME_LENGTH 10 -#define OT_NAME_LENGTH 7 - -#define min(a, b) ((a) < (b) ? (a) : (b)) -#define max(a, b) ((a) >= (b) ? (a) : (b)) - -// why does GF hate 2d arrays -#define MULTI_DIM_ARR(x, dim, y) ((x) * dim + (y)) - -// dim access enums -enum -{ - B_8 = 1, - B_16 = 2, - B_32 = 4 -}; - -// There are many quirks in the source code which have overarching behavioral differences from -// a number of other files. For example, diploma.c seems to declare rodata before each use while -// other files declare out of order and must be at the beginning. There are also a number of -// macros which differ from one file to the next due to the method of obtaining the result, such -// as these below. Because of this, there is a theory (Two Team Theory) that states that these -// programming projects had more than 1 "programming team" which utilized different macros for -// each of the files that were worked on. -#define T1_READ_8(ptr) ((ptr)[0]) -#define T1_READ_16(ptr) ((ptr)[0] | ((ptr)[1] << 8)) -#define T1_READ_32(ptr) ((ptr)[0] | ((ptr)[1] << 8) | ((ptr)[2] << 16) | ((ptr)[3] << 24)) -#define T1_READ_PTR(ptr) (u8*) T1_READ_32(ptr) - -// T2_READ_8 is a duplicate to remain consistent with each group. -#define T2_READ_8(ptr) ((ptr)[0]) -#define T2_READ_16(ptr) ((ptr)[0] + ((ptr)[1] << 8)) -#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24)) -#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr) - -// Credits to Made (dolphin emoji) -#define S16TOPOSFLOAT(val) \ -({ \ - s16 v = (val); \ - float f = (float)v; \ - if(v < 0) f += 65536.0f; \ - f; \ -}) - -enum -{ - VERSION_SAPPHIRE = 1, - VERSION_RUBY = 2, - VERSION_EMERALD = 3, -}; - -enum LanguageId -{ - LANGUAGE_JAPANESE = 1, - LANGUAGE_ENGLISH = 2, - LANGUAGE_GERMAN = 5, -}; - -// capacities of various saveblock objects -#define DAYCARE_MON_COUNT 2 -#define POKEBLOCKS_COUNT 40 -#define PARTY_SIZE 6 -#define EVENT_OBJECTS_COUNT 16 -#define BERRY_TREES_COUNT 128 -#define FLAGS_COUNT 288 -#define VARS_COUNT 256 -#define MAIL_COUNT 16 -#define SECRET_BASES_COUNT 20 -#define TV_SHOWS_COUNT 25 -#define POKE_NEWS_COUNT 16 -#define PC_ITEMS_COUNT 50 -#define BAG_ITEMS_COUNT 20 -#define BAG_KEYITEMS_COUNT 20 -#define BAG_POKEBALLS_COUNT 16 -#define BAG_TMHM_COUNT 64 -#define BAG_BERRIES_COUNT 46 - -enum -{ - MALE, - FEMALE -}; - -enum -{ - OPTIONS_BUTTON_MODE_NORMAL, - OPTIONS_BUTTON_MODE_LR, - OPTIONS_BUTTON_MODE_L_EQUALS_A -}; - -enum -{ - OPTIONS_TEXT_SPEED_SLOW, - OPTIONS_TEXT_SPEED_MID, - OPTIONS_TEXT_SPEED_FAST -}; - -enum -{ - OPTIONS_SOUND_MONO, - OPTIONS_SOUND_STEREO -}; - -enum -{ - OPTIONS_BATTLE_STYLE_SHIFT, - OPTIONS_BATTLE_STYLE_SET -}; - -enum -{ - BAG_ITEMS = 1, - BAG_POKEBALLS, - BAG_TMsHMs, - BAG_BERRIES, - BAG_KEYITEMS -}; - -struct Coords16 -{ - s16 x; - s16 y; -}; - -struct UCoords16 -{ - u16 x; - u16 y; -}; - -struct SecretBaseRecord -{ - /*0x1A08*/ u8 secretBaseId; - /*0x1A09*/ u8 sbr_field_1_0:4; - /*0x1A09*/ u8 gender:1; - /*0x1A09*/ u8 sbr_field_1_5:1; - /*0x1A09*/ u8 sbr_field_1_6:2; - /*0x1A0A*/ u8 playerName[OT_NAME_LENGTH]; - /*0x1A11*/ u8 trainerId[4]; // byte 0 is used for determining trainer class - /*0x1A16*/ u16 sbr_field_e; - /*0x1A18*/ u8 sbr_field_10; - /*0x1A19*/ u8 sbr_field_11; - /*0x1A1A*/ u8 decorations[16]; - /*0x1A2A*/ u8 decorationPos[16]; - /*0x1A3C*/ u32 partyPersonality[6]; - /*0x1A54*/ u16 partyMoves[6 * 4]; - /*0x1A84*/ u16 partySpecies[6]; - /*0x1A90*/ u16 partyHeldItems[6]; - /*0x1A9C*/ u8 partyLevels[6]; - /*0x1AA2*/ u8 partyEVs[6]; -}; - -#include "constants/game_stat.h" -#include "global.fieldmap.h" -#include "global.berry.h" -#include "pokemon.h" - -struct WarpData -{ - s8 mapGroup; - s8 mapNum; - s8 warpId; - s16 x, y; -}; - -struct ItemSlot -{ - u16 itemId; - u16 quantity; -}; - -struct Pokeblock -{ - u8 color; - u8 spicy; - u8 dry; - u8 sweet; - u8 bitter; - u8 sour; - u8 feel; -}; - -struct Roamer -{ - /*0x00*/ u32 ivs; - /*0x04*/ u32 personality; - /*0x08*/ u16 species; - /*0x0A*/ u16 hp; - /*0x0C*/ u8 level; - /*0x0D*/ u8 status; - /*0x0E*/ u8 cool; - /*0x0F*/ u8 beauty; - /*0x10*/ u8 cute; - /*0x11*/ u8 smart; - /*0x12*/ u8 tough; - /*0x13*/ bool8 active; - /*0x14*/ u8 filler[0x8]; -}; - -struct RamScriptData -{ - u8 magic; - u8 mapGroup; - u8 mapNum; - u8 objectId; - u8 script[995]; -}; - -struct RamScript -{ - u32 checksum; - struct RamScriptData data; -}; - -struct EasyChatPair -{ - u16 unk0_0:7; - u16 unk0_7:7; - u16 unk1_6:1; - u16 unk2; - u16 words[2]; -}; /*size = 0x8*/ - -struct TVShowCommon -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u8 pad02[20]; - /*0x16*/ u16 var16[3]; - /*0x1C*/ u8 srcTrainerId3Lo; - /*0x1D*/ u8 srcTrainerId3Hi; - /*0x1E*/ u8 srcTrainerId2Lo; - /*0x1F*/ u8 srcTrainerId2Hi; - /*0x20*/ u8 srcTrainerIdLo; - /*0x21*/ u8 srcTrainerIdHi; - /*0x22*/ u8 trainerIdLo; - /*0x23*/ u8 trainerIdHi; -}; - -struct TVShowFanClubLetter -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u16 species; - /*0x04*/ u16 pad04[6]; - /*0x10*/ u8 playerName[8]; - /*0x18*/ u8 language; -}; - -struct TVShowRecentHappenings -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u16 var02; - /*0x04*/ u16 var04[6]; - /*0x10*/ u8 playerName[8]; - /*0x18*/ u8 language; - /*0x19*/ u8 pad19[10]; -}; - -struct TVShowFanclubOpinions -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u16 var02; - /*0x04*/ u8 var04A:4; - /*0x04*/ u8 var04B:4; - /*0x05*/ u8 playerName[8]; - /*0x0D*/ u8 language; - /*0x0E*/ u8 var0E; - /*0x0F*/ u8 var0F; - /*0x10*/ u8 var10[8]; - /*0x18*/ u16 var18[2]; - /*0x1C*/ u16 var1C[4]; -}; - -struct TVShowUnknownType04 -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u8 pad02[4]; - /*0x06*/ u16 var06; -}; - -struct TVShowNameRaterShow -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u16 species; - /*0x04*/ u8 pokemonName[11]; - /*0x0F*/ u8 trainerName[11]; - /*0x1A*/ u8 random; - /*0x1B*/ u8 random2; - /*0x1C*/ u16 var1C; - /*0x1E*/ u8 language; - /*0x1F*/ u8 pokemonNameLanguage; -}; - -struct TVShowBravoTrainerPokemonProfiles -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u16 species; - /*0x04*/ u16 var04[2]; - /*0x08*/ u8 pokemonNickname[11]; - /*0x13*/ u8 contestCategory:3; - /*0x13*/ u8 contestRank:2; - /*0x13*/ u8 contestResult:2; - /*0x13*/ u8 var13_7:1; - /*0x14*/ u16 var14; - /*0x16*/ u8 playerName[8]; - /*0x1E*/ u8 language; - /*0x1F*/ u8 var1f; -}; - -struct TVShowBravoTrainerBattleTowerSpotlight -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u8 trainerName[8]; - /*0x0A*/ u16 species; - /*0x0C*/ u8 enemyTrainerName[8]; - /*0x14*/ u16 defeatedSpecies; - /*0x16*/ u16 var16; - /*0x18*/ u16 var18[1]; - /*0x1A*/ u8 btLevel; - /*0x1B*/ u8 var1b; - /*0x1C*/ u8 var1c; - /*0x1D*/ u8 language; -}; - -struct TVShowPokemonToday -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u8 language; - /*0x03*/ u8 language2; - /*0x04*/ u8 nickname[11]; - /*0x0F*/ u8 ball; - /*0x10*/ u16 species; - /*0x12*/ u8 var12; - /*0x13*/ u8 playerName[8]; -}; - -struct TVShowSmartShopper -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u8 priceReduced; - /*0x03*/ u8 language; - /*0x04*/ u8 pad04[2]; - /*0x06*/ u16 itemIds[3]; - /*0x0C*/ u16 itemAmounts[3]; - /*0x12*/ u8 shopLocation; - /*0x13*/ u8 playerName[8]; -}; - -struct TVShowPokemonTodayFailed -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u8 language; - /*0x03*/ u8 pad03[9]; - /*0x0c*/ u16 species; - /*0x0e*/ u16 species2; - /*0x10*/ u8 var10; - /*0x11*/ u8 var11; - /*0x12*/ u8 var12; - /*0x13*/ u8 playerName[8]; -}; - -struct TVShowPokemonAngler -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u8 var02; - /*0x03*/ u8 var03; - /*0x04*/ u16 var04; - /*0x06*/ u8 language; - u8 pad07[12]; - /*0x13*/ u8 playerName[8]; -}; - -struct TVShowWorldOfMasters -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u16 var02; - /*0x04*/ u16 var04; - /*0x06*/ u16 var06; - /*0x08*/ u16 var08; - /*0x0a*/ u8 var0a; - /*0x0b*/ u8 language; - u8 pad0c[7]; - /*0x13*/ u8 playerName[8]; -}; - -struct TVShowMassOutbreak -{ - /*0x00*/ u8 kind; - /*0x01*/ bool8 active; - /*0x02*/ u8 var02; - /*0x03*/ u8 var03; - /*0x04*/ u16 moves[4]; - /*0x0C*/ u16 species; - /*0x0E*/ u16 var0E; - /*0x10*/ u8 locationMapNum; - /*0x11*/ u8 locationMapGroup; - /*0x12*/ u8 var12; - /*0x13*/ u8 probability; - /*0x14*/ u8 level; - /*0x15*/ u8 var15; - /*0x16*/ u16 daysLeft; - /*0x18*/ u8 language; - u8 pad19[11]; -}; - -typedef union TVShow -{ - struct TVShowCommon common; - struct TVShowFanClubLetter fanclubLetter; - struct TVShowRecentHappenings recentHappenings; - struct TVShowFanclubOpinions fanclubOpinions; - struct TVShowUnknownType04 unkShow04; - struct TVShowNameRaterShow nameRaterShow; - struct TVShowBravoTrainerPokemonProfiles bravoTrainer; - struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; - struct TVShowPokemonToday pokemonToday; - struct TVShowSmartShopper smartshopperShow; - struct TVShowPokemonTodayFailed pokemonTodayFailed; - struct TVShowPokemonAngler pokemonAngler; - struct TVShowWorldOfMasters worldOfMasters; - struct TVShowMassOutbreak massOutbreak; -} TVShow; - -struct MailStruct -{ - /*0x00*/ u16 words[9]; - /*0x12*/ u8 playerName[8]; - /*0x1A*/ u8 trainerId[4]; - /*0x1E*/ u16 species; - /*0x20*/ u16 itemId; -}; - - -// Mauville Pokemon Center men - -struct MauvilleManCommon -{ - u8 id; -}; - -struct MauvilleManBard -{ - /*0x00*/ u8 id; - /*0x02*/ u16 songLyrics[6]; - /*0x0E*/ u16 temporaryLyrics[6]; - /*0x1A*/ u8 playerName[8]; - /*0x22*/ u8 filler_2DB6[0x3]; - /*0x25*/ u8 playerTrainerId[4]; - /*0x29*/ bool8 hasChangedSong; -}; /*size = 0x2C*/ - -struct MauvilleManHipster -{ - u8 id; - bool8 alreadySpoken; -}; - -struct MauvilleManTrader -{ - u8 id; - u8 unk1[4]; - u8 unk5[4][11]; - bool8 alreadyTraded; -}; - -struct MauvilleManStoryteller -{ - u8 id; - bool8 alreadyRecorded; - u8 filler2[2]; - u8 gameStatIDs[4]; - u8 trainerNames[4][7]; - u8 statValues[4][4]; -}; - -struct MauvilleManGiddy -{ - /*0x00*/ u8 id; - /*0x01*/ u8 taleCounter; - /*0x02*/ u8 questionNum; - /*0x04*/ u16 randomWords[10]; - /*0x18*/ u8 questionList[12]; -}; /*size = 0x2C*/ - - -union MauvilleMan -{ - struct MauvilleManCommon common; - struct MauvilleManBard bard; - struct MauvilleManHipster hipster; - struct MauvilleManTrader trader; - struct MauvilleManStoryteller storyteller; - struct MauvilleManGiddy giddy; - u8 filler[0x40]; // needed to pad out the struct -}; - -struct PokeNews -{ - u8 kind; - u8 state; - u16 days; -}; - -struct GabbyAndTyData -{ - /*2b10*/ u16 mon1; - /*2b12*/ u16 mon2; - /*2b14*/ u16 lastMove; - /*2b16*/ u16 quote; - /*2b18*/ u8 mapnum; - /*2b19*/ u8 battleNum; - /*2b1a*/ u8 valA_0:1; - /*2b1a*/ u8 valA_1:1; - /*2b1a*/ u8 valA_2:1; - /*2b1a*/ u8 valA_3:1; - /*2b1a*/ u8 valA_4:1; - /*2b1a*/ u8 valA_5:3; - /*2b1b*/ u8 valB_0:1; - /*2b1b*/ u8 valB_1:1; - /*2b1b*/ u8 valB_2:1; - /*2b1b*/ u8 valB_3:1; - /*2b1b*/ u8 valB_4:1; - /*2b1b*/ u8 valB_5:3; -}; - -struct DayCareMail -{ - /*0x00*/ struct MailStruct message; - /*0x24*/ u8 names[19]; -}; - -struct DayCareStepCountersEtc { - u32 steps[DAYCARE_MON_COUNT]; - u16 pendingEggPersonality; - u8 eggCycleStepsRemaining; -}; - -struct RecordMixingDayCareMail -{ - struct DayCareMail mail[DAYCARE_MON_COUNT]; - u32 numDaycareMons; - u16 itemsHeld[DAYCARE_MON_COUNT]; // marks whether or not each daycare mon is currently holding an item. -}; - -struct DayCareMisc -{ - struct DayCareMail mail[DAYCARE_MON_COUNT]; - struct DayCareStepCountersEtc countersEtc; -}; - -struct DayCare { - struct BoxPokemon mons[DAYCARE_MON_COUNT]; - struct DayCareMisc misc; -}; - -struct LinkBattleRecord -{ - u8 name[8]; - u16 trainerId; - u16 wins; - u16 losses; - u16 draws; -}; - -struct RecordMixingGiftData -{ - u8 unk0; - u8 quantity; - u16 itemId; - u8 filler4[8]; -}; - -struct RecordMixingGift -{ - int checksum; - struct RecordMixingGiftData data; -}; - -struct ContestWinner -{ - /*0x00*/ u32 personality; // personality - /*0x04*/ u32 otId; // otId - /*0x08*/ u16 species; // species - /*0x0A*/ u8 contestCategory; - /*0x0B*/ u8 nickname[11]; - /*0x16*/ u8 trainerName[8]; -}; - -// there should be enough flags for all 412 slots -// each slot takes up 8 flags -// if the value is not divisible by 8, we need to account for the reminder as well -#define DEX_FLAGS_NO ((POKEMON_SLOTS_NUMBER / 8) + ((POKEMON_SLOTS_NUMBER % 8) ? 1 : 0)) - -struct SaveBlock1 /* 0x02025734 */ -{ - /*0x00*/ struct Coords16 pos; - /*0x04*/ struct WarpData location; - /*0x0C*/ struct WarpData warp1; - /*0x14*/ struct WarpData warp2; - /*0x1C*/ struct WarpData lastHealLocation; - /*0x24*/ struct WarpData warp4; - /*0x2C*/ u16 savedMusic; - /*0x2E*/ u8 weather; - /*0x2F*/ u8 weatherCycleStage; - /*0x30*/ u8 flashLevel; // flash level on current map, 0 being normal and 4 being the darkest - /*0x32*/ u16 mapLayoutId; - /*0x34*/ u16 mapView[0x100]; - /*0x234*/ u8 playerPartyCount; - /*0x238*/ struct Pokemon playerParty[6]; - /*0x490*/ u32 money; - /*0x494*/ u16 coins; - /*0x496*/ u16 registeredItem; // registered for use with SELECT button - /*0x498*/ struct ItemSlot pcItems[PC_ITEMS_COUNT]; - /*0x560*/ struct ItemSlot bagPocket_Items[BAG_ITEMS_COUNT]; - /*0x5B0*/ struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT]; - /*0x600*/ struct ItemSlot bagPocket_PokeBalls[BAG_POKEBALLS_COUNT]; - /*0x640*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT]; - /*0x740*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT]; - /*0x7F8*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT]; - /*0x938*/ u8 dexSeen2[DEX_FLAGS_NO]; - /*0x96C*/ u16 berryBlenderRecords[3]; - /*0x972*/ u8 filler_972[0x6]; - /*0x978*/ u16 trainerRematchStepCounter; - /*0x97A*/ u8 trainerRematches[100]; - /*0x9E0*/ struct EventObject eventObjects[EVENT_OBJECTS_COUNT]; - /*0xC20*/ struct EventObjectTemplate eventObjectTemplates[64]; - /*0x1220*/ u8 flags[FLAGS_COUNT]; - /*0x1340*/ u16 vars[VARS_COUNT]; - /*0x1540*/ u32 gameStats[NUM_GAME_STATS]; - /*0x1608*/ struct BerryTree berryTrees[BERRY_TREES_COUNT]; - /*0x1A08*/ struct SecretBaseRecord secretBases[SECRET_BASES_COUNT]; - /*0x2688*/ u8 playerRoomDecor[12]; - /*0x2694*/ u8 playerRoomDecorPos[12]; - /*0x26A0*/ u8 decorDesk[10]; - /*0x26AA*/ u8 decorChair[10]; - /*0x26B4*/ u8 decorPlant[10]; - /*0x26BE*/ u8 decorOrnament[30]; - /*0x26DC*/ u8 decorMat[30]; - /*0x26FA*/ u8 decorPoster[10]; - /*0x2704*/ u8 decorDoll[40]; - /*0x272C*/ u8 decorCushion[10]; - /*0x2736*/ u8 padding_2736[2]; - /*0x2738*/ TVShow tvShows[TV_SHOWS_COUNT]; - /*0x2ABC*/ struct PokeNews pokeNews[POKE_NEWS_COUNT]; - /*0x2AFC*/ u16 outbreakPokemonSpecies; - /*0x2AFE*/ u8 outbreakLocationMapNum; - /*0x2AFF*/ u8 outbreakLocationMapGroup; - /*0x2B00*/ u8 outbreakPokemonLevel; - /*0x2B01*/ u8 outbreakUnk1; - /*0x2B02*/ u16 outbreakUnk2; - /*0x2B04*/ u16 outbreakPokemonMoves[4]; - /*0x2B0C*/ u8 outbreakUnk4; - /*0x2B0D*/ u8 outbreakPokemonProbability; - /*0x2B0E*/ u16 outbreakUnk5; - /*0x2B10*/ struct GabbyAndTyData gabbyAndTyData; - /*0x2B1C*/ struct { - /*0x2B1C*/ u16 unk2B1C[6]; - /*0x2B28*/ u16 unk2B28[6]; - /*0x2B34*/ u16 unk2B34[6]; - /*0x2B40*/ u16 unk2B40[6]; - } easyChats; - /*0x2B4C*/ struct MailStruct mail[MAIL_COUNT]; - /*0x2D8C*/ u8 unk2D8C[4]; // What is this? Apparently it's supposed to be 64 bytes in size. - /*0x2D90*/ u8 filler_2D90[0x4]; - /*0x2D94*/ union MauvilleMan mauvilleMan; - /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff - /*0x2DFC*/ struct ContestWinner contestWinners[8]; - /*0x2EFC*/ struct ContestWinner museumPortraits[5]; - /*0x2F9C*/ struct DayCare daycare; - /*0x30B8*/ struct LinkBattleRecord linkBattleRecords[5]; - struct { - /*0x3108*/ u8 unknown1[8]; - /*0x3110*/ u8 giftRibbons[11]; - /*0x311B*/ u8 unknown2[8]; - /*0x3123*/ u32 currentPokeCoupons; - /*0x3127*/ u32 totalEarnedPokeCoupons; - /*0x312B*/ u8 unknown3[6]; - /*0x3131*/ u8 receivedWishmakerJirachi; - /*0x3132*/ u8 unknown4[18]; - } __attribute__((packed)) externalReservedData; - /*0x3144*/ struct Roamer roamer; - /*0x3160*/ struct EnigmaBerry enigmaBerry; - /*0x3690*/ struct RamScript ramScript; - /*0x3A7C*/ struct RecordMixingGift recordMixingGift; - /*0x3A8C*/ u8 dexSeen3[DEX_FLAGS_NO]; -}; - -extern struct SaveBlock1 gSaveBlock1; - -struct Time -{ - /*0x00*/ s16 days; - /*0x02*/ s8 hours; - /*0x03*/ s8 minutes; - /*0x04*/ s8 seconds; -}; - -struct Pokedex -{ - /*0x00*/ u8 order; - /*0x01*/ u8 unknown1; - /*0x02*/ u8 nationalMagic; // must equal 0xDA in order to have National mode - /*0x03*/ u8 unknown2; - /*0x04*/ u32 unownPersonality; // set when you first see Unown - /*0x08*/ u32 spindaPersonality; // set when you first see Spinda - /*0x0C*/ u32 unknown3; - /*0x10*/ u8 owned[DEX_FLAGS_NO]; - /*0x44*/ u8 seen[DEX_FLAGS_NO]; -}; - -struct BattleTowerTrainer -{ - /*0x00*/ u8 trainerClass; - /*0x01*/ u8 name[8]; - /*0x09*/ u8 teamFlags; - u8 filler0A[2]; - /*0x0C*/ u16 greeting[6]; -}; - -struct BattleTowerRecord // record mixing -{ - /*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100 - /*0x01*/ u8 trainerClass; - /*0x02*/ u16 winStreak; - /*0x04*/ u8 name[8]; - /*0x0C*/ u8 trainerId[4]; - /*0x10*/ u16 greeting[6]; - /*0x1C*/ struct BattleTowerPokemon party[3]; - /*0xA0*/ u32 checksum; -}; - -struct BattleTowerEReaderTrainer -{ - /*0x00*/ u8 unk0; - /*0x01*/ u8 trainerClass; - /*0x02*/ u16 winStreak; - /*0x04*/ u8 name[8]; - /*0x0C*/ u8 trainerId[4]; - /*0x10*/ u16 greeting[6]; - /*0x1C*/ u16 farewellPlayerLost[6]; - /*0x28*/ u16 farewellPlayerWon[6]; - /*0x34*/ struct BattleTowerPokemon party[3]; - /*0xB8*/ u32 checksum; -}; - -struct BattleTowerData -{ - /*0x0000, 0x00A8*/ struct BattleTowerRecord playerRecord; - /*0x00A4, 0x014C*/ struct BattleTowerRecord records[5]; // from record mixing - /*0x03D8, 0x0480*/ u16 firstMonSpecies; // species of the first pokemon in the player's battle tower party - /*0x03DA, 0x0482*/ u16 defeatedBySpecies; // species of the pokemon that defated the player - /*0x03DC, 0x0484*/ u8 defeatedByTrainerName[8]; - /*0x03E4, 0x048C*/ u8 firstMonNickname[POKEMON_NAME_LENGTH]; // nickname of the first pokemon in the player's battle tower party - /*0x03F0, 0x0498*/ struct BattleTowerEReaderTrainer ereaderTrainer; - /*0x04AC, 0x0554*/ u8 battleTowerLevelType:1; // 0 = level 50; 1 = level 100 - /*0x04AC, 0x0554*/ u8 unk_554:1; - /*0x04AD, 0x0555*/ u8 battleOutcome; - /*0x04AE, 0x0556*/ u8 var_4AE[2]; - /*0x04B0, 0x0558*/ u16 curChallengeBattleNum[2]; // 1-based index of battle in the current challenge. (challenges consist of 7 battles) - /*0x04B4, 0x055C*/ u16 curStreakChallengesNum[2]; // 1-based index of the current challenge in the current streak. - /*0x04B8, 0x0560*/ u16 recordWinStreaks[2]; - /*0x04BC, 0x0564*/ u8 battleTowerTrainerId; // index for gBattleTowerTrainers table - /*0x04BD, 0x0565*/ u8 selectedPartyMons[0x3]; // indices of the 3 selected player party mons. - /*0x04C0, 0x0568*/ u16 prizeItem; - /*0x04C2, 0x056A*/ u8 battledTrainerIds[6]; - /*0x04C8, 0x0570*/ u16 totalBattleTowerWins; - /*0x04CA, 0x0572*/ u16 bestBattleTowerWinStreak; - /*0x04CC, 0x0574*/ u16 currentWinStreaks[2]; - /*0x04D0, 0x0578*/ u8 lastStreakLevelType; // 0 = level 50, 1 = level 100. level type of the last streak. Used by tv to report the level mode. - /*0x04D1, 0x0579*/ u8 filler_4D1[0x317]; -}; - -struct SaveBlock2 /* 0x02024EA4 */ -{ - /*0x00*/ u8 playerName[8]; - /*0x08*/ u8 playerGender; // MALE, FEMALE - /*0x09*/ u8 specialSaveWarp; - /*0x0A*/ u8 playerTrainerId[4]; - /*0x0E*/ u16 playTimeHours; - /*0x10*/ u8 playTimeMinutes; - /*0x11*/ u8 playTimeSeconds; - /*0x12*/ u8 playTimeVBlanks; - /*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A] - /*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] - u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes - u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO] - u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET] - u16 optionsBattleSceneOff:1; // whether battle animations are disabled - u16 regionMapZoom:1; // whether the map is zoomed in - /*0x18*/ struct Pokedex pokedex; - /*0x90*/ u8 filler_90[0x8]; - /*0x98*/ struct Time localTimeOffset; - /*0xA0*/ struct Time lastBerryTreeUpdate; - /*0xA8*/ struct BattleTowerData battleTower; -}; - -struct MapPosition -{ - s16 x; - s16 y; - s8 height; -}; - -struct UnkStruct_8054FF8 -{ - u8 a; - u8 b; - u8 c; - u8 d; - struct MapPosition sub; - u16 field_C; -}; - -// wasnt defined so I had to define it -struct HallOfFame -{ - u8 filler[0x1F00]; -}; - -extern struct SaveBlock2 gSaveBlock2; - -#define RomHeaderGameTitle ((const char *)0x080000A0) -#define RomHeaderGameCode ((const char *)0x080000AC) -#define RomHeaderMakerCode ((const char *)0x080000B0) -#define RomHeaderMagic ((const u8 *) 0x080000B2) -#define RomHeaderSoftwareVersion ((const u8 *) 0x080000BC) - -#define LocalTimeOffset ((struct Time *)0x02028098) -#define LastBerryTreeUpdate ((struct Time *)0x020280A0) - -#endif //GUARD_GLOBAL_H diff --git a/berry_fix/payload/include/main.h b/berry_fix/payload/include/main.h deleted file mode 100644 index cb58d59826..0000000000 --- a/berry_fix/payload/include/main.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef GUARD_MAIN_H -#define GUARD_MAIN_H - -#include "gba/gba.h" - -enum RomHeaderValidationResult -{ - SAPPHIRE_UPDATABLE = 2, - RUBY_UPDATABLE, - SAPPHIRE_NONEED, - RUBY_NONEED, - INVALID -}; - -enum MainCallbackState -{ - MAINCB_INIT = 0, - MAINCB_CHECK_RTC, - MAINCB_CHECK_FLASH, - MAINCB_READ_SAVE, - MAINCB_CHECK_TIME, - MAINCB_FIX_DATE, - MAINCB_NO_NEED_TO_FIX, - MAINCB_YEAR_MAKES_NO_SENSE, - MAINCB_FINISHED, - MAINCB_CHECK_PACIFIDLOG_TM, - MAINCB_FIX_PACIFIDLOG_TM, - MAINCB_ERROR -}; - -extern IntrFunc gIntrTable[]; -extern u16 gHeldKeys; -extern u16 gNewKeys; -extern u8 gIntrVector[]; -extern u32 gUpdateSuccessful; -extern u32 gUnknown_3001194; -extern u32 gUnknown_30011A0[]; -extern u32 gMainCallbackState; -extern u32 gGameVersion; - -extern u8 gSharedMem[0x8000]; - -extern const IntrFunc gIntrFuncPointers[]; - -#endif //GUARD_MAIN_H diff --git a/berry_fix/payload/include/pokemon.h b/berry_fix/payload/include/pokemon.h deleted file mode 100644 index d3a14ffff9..0000000000 --- a/berry_fix/payload/include/pokemon.h +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef GUARD_POKEMON_H -#define GUARD_POKEMON_H - -struct PokemonSubstruct0 -{ - u16 species; - u16 heldItem; - u32 experience; - u8 ppBonuses; - u8 friendship; -}; - -struct PokemonSubstruct1 -{ - u16 moves[4]; - u8 pp[4]; -}; - -struct PokemonSubstruct2 -{ - u8 hpEV; - u8 attackEV; - u8 defenseEV; - u8 speedEV; - u8 spAttackEV; - u8 spDefenseEV; - u8 cool; - u8 beauty; - u8 cute; - u8 smart; - u8 tough; - u8 sheen; -}; - -struct PokemonSubstruct3 -{ - /*0x00*/ u8 pokerus; - /*0x01*/ u8 metLocation; - - /*0x02*/ u16 metLevel:7; - /*0x02*/ u16 metGame:4; - /*0x03*/ u16 pokeball:4; - /*0x03*/ u16 otGender:1; - - /*0x04*/ u32 hpIV:5; - /*0x04*/ u32 attackIV:5; - /*0x05*/ u32 defenseIV:5; - /*0x05*/ u32 speedIV:5; - /*0x05*/ u32 spAttackIV:5; - /*0x06*/ u32 spDefenseIV:5; - /*0x07*/ u32 isEgg:1; - /*0x07*/ u32 altAbility:1; - - /*0x08*/ u32 coolRibbon:3; - /*0x08*/ u32 beautyRibbon:3; - /*0x08*/ u32 cuteRibbon:3; - /*0x09*/ u32 smartRibbon:3; - /*0x09*/ u32 toughRibbon:3; - /*0x09*/ u32 championRibbon:1; - /*0x0A*/ u32 winningRibbon:1; - /*0x0A*/ u32 victoryRibbon:1; - /*0x0A*/ u32 artistRibbon:1; - /*0x0A*/ u32 effortRibbon:1; - /*0x0A*/ u32 giftRibbon1:1; - /*0x0A*/ u32 giftRibbon2:1; - /*0x0A*/ u32 giftRibbon3:1; - /*0x0A*/ u32 giftRibbon4:1; - /*0x0B*/ u32 giftRibbon5:1; - /*0x0B*/ u32 giftRibbon6:1; - /*0x0B*/ u32 giftRibbon7:1; - /*0x0B*/ u32 fatefulEncounter:5; // unused in Ruby/Sapphire, but the high bit must be set for Mew/Deoxys to obey in FR/LG/Emerald -}; - -union PokemonSubstruct -{ - struct PokemonSubstruct0 type0; - struct PokemonSubstruct1 type1; - struct PokemonSubstruct2 type2; - struct PokemonSubstruct3 type3; - u16 raw[6]; -}; - -struct BoxPokemon -{ - /*0x00*/ u32 personality; - /*0x04*/ u32 otId; - /*0x08*/ u8 nickname[POKEMON_NAME_LENGTH]; - /*0x12*/ u8 language; - /*0x13*/ u8 isBadEgg:1; - u8 hasSpecies:1; - u8 isEgg:1; - /*0x14*/ u8 otName[OT_NAME_LENGTH]; - /*0x1B*/ u8 markings; - /*0x1C*/ u16 checksum; - /*0x1E*/ u16 unknown; - - union - { - u32 raw[12]; - union PokemonSubstruct substructs[4]; - } secure; -}; /*size = 0x50*/ - -struct Pokemon -{ - /*0x00*/ struct BoxPokemon box; - /*0x50*/ u32 status; - /*0x54*/ u8 level; - /*0x55*/ u8 mail; - /*0x56*/ u16 hp; - /*0x58*/ u16 maxHP; - /*0x5A*/ u16 attack; - /*0x5C*/ u16 defense; - /*0x5E*/ u16 speed; - /*0x60*/ u16 spAttack; - /*0x62*/ u16 spDefense; -}; - -struct BattleTowerPokemon -{ - /*0x00*/u16 species; - /*0x02*/u16 heldItem; - /*0x04*/u16 moves[4]; - /*0x0C*/u8 level; - /*0x0D*/u8 ppBonuses; - /*0x0E*/u8 hpEV; - /*0x0F*/u8 attackEV; - /*0x10*/u8 defenseEV; - /*0x11*/u8 speedEV; - /*0x12*/u8 spAttackEV; - /*0x13*/u8 spDefenseEV; - /*0x14*/u32 otId; - /*0x18*/u32 hpIV:5; - /*0x18*/u32 attackIV:5; - /*0x19*/u32 defenseIV:5; - /*0x19*/u32 speedIV:5; - /*0x1A*/u32 spAttackIV:5; - /*0x1A*/u32 spDefenseIV:5; - /*0x1B*/u32 gap:1; - /*0x1B*/u32 altAbility:1; - /*0x1C*/u32 personality; - /*0x20*/u8 nickname[POKEMON_NAME_LENGTH + 1]; - /*0x2B*/u8 friendship; -}; - -struct PokemonStorage -{ - /*0x0000*/ u8 currentBox; - /*0x0004*/ struct BoxPokemon boxes[14][30]; - /*0x8344*/ u8 boxNames[14][9]; - /*0x83c2*/ u8 wallpaper[14]; -}; - -#endif // GUARD_POKEMON_H diff --git a/berry_fix/payload/include/rtc.h b/berry_fix/payload/include/rtc.h deleted file mode 100644 index 35654d866b..0000000000 --- a/berry_fix/payload/include/rtc.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef GUARD_RTC_H -#define GUARD_RTC_H - -#include "gba/gba.h" -#include "siirtc.h" -#include "global.h" - -extern struct Time gTimeSinceBerryUpdate; -extern struct Time gRtcUTCTime; - -bool32 rtc_maincb_is_rtc_working(void); -bool32 rtc_maincb_is_time_since_last_berry_update_positive(u8 *); -void rtc_maincb_fix_date(void); - -#endif //GUARD_RTC_H diff --git a/berry_fix/payload/include/siirtc.h b/berry_fix/payload/include/siirtc.h deleted file mode 100644 index de4fd634df..0000000000 --- a/berry_fix/payload/include/siirtc.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef GUARD_RTC_H -#define GUARD_RTC_H - -#include "gba/gba.h" - -#define SIIRTCINFO_INTFE 0x01 // frequency interrupt enable -#define SIIRTCINFO_INTME 0x02 // per-minute interrupt enable -#define SIIRTCINFO_INTAE 0x04 // alarm interrupt enable -#define SIIRTCINFO_24HOUR 0x40 // 0: 12-hour mode, 1: 24-hour mode -#define SIIRTCINFO_POWER 0x80 // power on or power failure occurred - -enum -{ - MONTH_JAN = 1, - MONTH_FEB, - MONTH_MAR, - MONTH_APR, - MONTH_MAY, - MONTH_JUN, - MONTH_JUL, - MONTH_AUG, - MONTH_SEP, - MONTH_OCT, - MONTH_NOV, - MONTH_DEC -}; - -struct SiiRtcInfo -{ - u8 year; - u8 month; - u8 day; - u8 dayOfWeek; - u8 hour; - u8 minute; - u8 second; - u8 status; - u8 alarmHour; - u8 alarmMinute; -}; - -void SiiRtcUnprotect(void); -void SiiRtcProtect(void); -u8 SiiRtcProbe(void); -bool8 SiiRtcReset(void); -bool8 SiiRtcGetStatus(struct SiiRtcInfo *rtc); -bool8 SiiRtcSetStatus(struct SiiRtcInfo *rtc); -bool8 SiiRtcGetDateTime(struct SiiRtcInfo *rtc); -bool8 SiiRtcSetDateTime(struct SiiRtcInfo *rtc); -bool8 SiiRtcGetTime(struct SiiRtcInfo *rtc); -bool8 SiiRtcSetTime(struct SiiRtcInfo *rtc); -bool8 SiiRtcSetAlarm(struct SiiRtcInfo *rtc); - -#endif // GUARD_RTC_H diff --git a/berry_fix/payload/ld_script.sed b/berry_fix/payload/ld_script.sed deleted file mode 100644 index b91542b6f8..0000000000 --- a/berry_fix/payload/ld_script.sed +++ /dev/null @@ -1,14 +0,0 @@ -// { - r sym_ewram.ld - d -} - -// { - r sym_bss.ld - d -} - -// { - r sym_common.ld - d -} diff --git a/berry_fix/payload/ld_script.txt b/berry_fix/payload/ld_script.txt deleted file mode 100644 index d0a0af9edb..0000000000 --- a/berry_fix/payload/ld_script.txt +++ /dev/null @@ -1,107 +0,0 @@ -ENTRY(Init) - -SECTIONS { - . = 0x2010000; - - .text : - ALIGN(4) - { - asm/crt0.o(.text); - src/main.o(.text); - src/rtc.o(.text); - src/flash.o(.text); - } =0 - - lib_text : - ALIGN(4) - { - src/agb_flash.o(.text); - src/agb_flash_1m.o(.text); - src/agb_flash_mx.o(.text); - asm/libagbsyscall.o(.text); - src/siirtc.o(.text); - *libgcc.a:_call_via_rX.o(.text); - *libgcc.a:_modsi3.o(.text); - *libgcc.a:_umodsi3.o(.text); - *libgcc.a:_dvmd_tls.o(.text); - } =0 - - .rodata : - ALIGN(4) - { - src/main.o(.rodata); - src/rtc.o(.rodata); - src/flash.o(.rodata); - } =0 - - lib_rodata : - ALIGN(4) - { - src/agb_flash.o(.rodata); - src/agb_flash_1m.o(.rodata); - src/agb_flash_mx.o(.rodata); - src/agb_flash_le.o(.rodata); - src/siirtc.o(.rodata); - } - - . = 0x2020000; - - ewram (NOLOAD) : - ALIGN(4) - { - - } - - . = 0x3001000; - - iwram (NOLOAD) : - ALIGN(4) - { - - . = 0x40; - - end = .; - } - - . = 0x8000000; - - RS_Rom (NOLOAD) : - ALIGN(4) - { - _start = .; - . += 4; - RomHeaderNintendoLogo = .; - . += 156; - RS_RomHeader = .; - RomHeaderGameTitle = .; - . += 12; - RomHeaderGameCode = .; - . += 4; - RomHeaderMakerCode = .; - . += 2; - RomHeaderMagic = .; - . += 1; - RomHeaderMainUnitCode = .; - . += 1; - RomHeaderDeviceType = .; - . += 1; - RomHeaderReserved1 = .; - . += 7; - RomHeaderSoftwareVersion = .; - . += 1; - RomHeaderChecksum = .; - . += 1; - RomHeaderReserved2 = .; - . += 6; - GPIOPortData = .; - . += 2; - GPIOPortDirection = .; - . += 2; - GPIOPortReadEnable = .; - } =0 - - /DISCARD/ : - { - *(*); - } -} diff --git a/berry_fix/payload/rom.sha1 b/berry_fix/payload/rom.sha1 deleted file mode 100644 index 92eee7e879..0000000000 --- a/berry_fix/payload/rom.sha1 +++ /dev/null @@ -1 +0,0 @@ -866991e2b5a8de02d12f53abe0ee9af03a2b6e01 payload.gba diff --git a/berry_fix/payload/src/agb_flash.c b/berry_fix/payload/src/agb_flash.c deleted file mode 100644 index 2c2c96e6e9..0000000000 --- a/berry_fix/payload/src/agb_flash.c +++ /dev/null @@ -1,296 +0,0 @@ -#include "gba/gba.h" -#include "gba/flash_internal.h" - -static u8 sTimerNum; -static u16 sTimerCount; -static vu16 *sTimerReg; -static u16 sSavedIme; - -u8 gFlashTimeoutFlag; -u8 (*PollFlashStatus)(u8 *); -const struct FlashType *gFlash; -u16 gFlashNumRemainingBytes; -const u16 *gFlashMaxTime; - -u16 (*ProgramFlashByte)(u16, u32, u8); -u16 (*ProgramFlashSector)(u16, void *); -u16 (*EraseFlashChip)(void); -u16 (*EraseFlashSector)(u16); -u16 (*WaitForFlashWrite)(u8, u8 *, u8); - -void SetReadFlash1(u16 *dest); - -void SwitchFlashBank(u8 bankNum) -{ - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - FLASH_WRITE(0x5555, 0xB0); - FLASH_WRITE(0x0000, bankNum); -} - -#define DELAY() \ -do { \ - vu16 i; \ - for (i = 20000; i != 0; i--) \ - ; \ -} while (0) - -u16 ReadFlashId(void) -{ - u16 flashId; - u16 readFlash1Buffer[0x20]; - u8 (*readFlash1)(u8 *); - - SetReadFlash1(readFlash1Buffer); - readFlash1 = (u8 (*)(u8 *))((s32)readFlash1Buffer + 1); - - // Enter ID mode. - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - FLASH_WRITE(0x5555, 0x90); - DELAY(); - - flashId = readFlash1(FLASH_BASE + 1) << 8; - flashId |= readFlash1(FLASH_BASE); - - // Leave ID mode. - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - FLASH_WRITE(0x5555, 0xF0); - FLASH_WRITE(0x5555, 0xF0); - DELAY(); - - return flashId; -} - -void FlashTimerIntr(void) -{ - if (sTimerCount != 0 && --sTimerCount == 0) - gFlashTimeoutFlag = 1; -} - -u16 SetFlashTimerIntr(u8 timerNum, void (**intrFunc)(void)) -{ - if (timerNum >= 4) - return 1; - - sTimerNum = timerNum; - sTimerReg = ®_TMCNT(sTimerNum); - *intrFunc = FlashTimerIntr; - return 0; -} - -void StartFlashTimer(u8 phase) -{ - const u16 *maxTime = &gFlashMaxTime[phase * 3]; - sSavedIme = REG_IME; - REG_IME = 0; - sTimerReg[1] = 0; - REG_IE |= (INTR_FLAG_TIMER0 << sTimerNum); - gFlashTimeoutFlag = 0; - sTimerCount = *maxTime++; - *sTimerReg++ = *maxTime++; - *sTimerReg-- = *maxTime++; - REG_IF = (INTR_FLAG_TIMER0 << sTimerNum); - REG_IME = 1; -} - -void StopFlashTimer(void) -{ - REG_IME = 0; - *sTimerReg++ = 0; - *sTimerReg-- = 0; - REG_IE &= ~(INTR_FLAG_TIMER0 << sTimerNum); - REG_IME = sSavedIme; -} - -u8 ReadFlash1(u8 *addr) -{ - return *addr; -} - -void SetReadFlash1(u16 *dest) -{ - u16 *src; - u16 i; - - PollFlashStatus = (u8 (*)(u8 *))((s32)dest + 1); - - src = (u16 *)ReadFlash1; - src = (u16 *)((s32)src ^ 1); - - i = ((s32)SetReadFlash1 - (s32)ReadFlash1) >> 1; - - while (i != 0) - { - *dest++ = *src++; - i--; - } -} - -void ReadFlash_Core(u8 *src, u8 *dest, u32 size) -{ - while (size-- != 0) - { - *dest++ = *src++; - } -} - -void ReadFlash(u16 sectorNum, u32 offset, void *dest, u32 size) -{ - u8 *src; - u16 i; - u16 readFlash_Core_Buffer[0x40]; - u16 *funcSrc; - u16 *funcDest; - void (*readFlash_Core)(u8 *, u8 *, u32); - - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | WAITCNT_SRAM_8; - - if (gFlash->romSize == FLASH_ROM_SIZE_1M) - { - SwitchFlashBank(sectorNum / SECTORS_PER_BANK); - sectorNum %= SECTORS_PER_BANK; - } - - funcSrc = (u16 *)ReadFlash_Core; - funcSrc = (u16 *)((s32)funcSrc ^ 1); - funcDest = readFlash_Core_Buffer; - - i = ((s32)ReadFlash - (s32)ReadFlash_Core) >> 1; - - while (i != 0) - { - *funcDest++ = *funcSrc++; - i--; - } - - readFlash_Core = (void (*)(u8 *, u8 *, u32))((s32)readFlash_Core_Buffer + 1); - - src = FLASH_BASE + (sectorNum << gFlash->sector.shift) + offset; - - readFlash_Core(src, dest, size); -} - -u32 VerifyFlashSector_Core(u8 *src, u8 *tgt, u32 size) -{ - while (size-- != 0) - { - if (*tgt++ != *src++) - return (u32)(tgt - 1); - } - - return 0; -} - -u32 VerifyFlashSector(u16 sectorNum, u8 *src) -{ - u16 i; - u16 verifyFlashSector_Core_Buffer[0x80]; - u16 *funcSrc; - u16 *funcDest; - u8 *tgt; - u16 size; - u32 (*verifyFlashSector_Core)(u8 *, u8 *, u32); - - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | WAITCNT_SRAM_8; - - if (gFlash->romSize == FLASH_ROM_SIZE_1M) - { - SwitchFlashBank(sectorNum / SECTORS_PER_BANK); - sectorNum %= SECTORS_PER_BANK; - } - - funcSrc = (u16 *)VerifyFlashSector_Core; - funcSrc = (u16 *)((s32)funcSrc ^ 1); - funcDest = verifyFlashSector_Core_Buffer; - - i = ((s32)VerifyFlashSector - (s32)VerifyFlashSector_Core) >> 1; - - while (i != 0) - { - *funcDest++ = *funcSrc++; - i--; - } - - verifyFlashSector_Core = (u32 (*)(u8 *, u8 *, u32))((s32)verifyFlashSector_Core_Buffer + 1); - - tgt = FLASH_BASE + (sectorNum << gFlash->sector.shift); - size = gFlash->sector.size; - - return verifyFlashSector_Core(src, tgt, size); -} - -u32 VerifyFlashSectorNBytes(u16 sectorNum, u8 *src, u32 n) -{ - u16 i; - u16 verifyFlashSector_Core_Buffer[0x80]; - u16 *funcSrc; - u16 *funcDest; - u8 *tgt; - u32 (*verifyFlashSector_Core)(u8 *, u8 *, u32); - - if (gFlash->romSize == FLASH_ROM_SIZE_1M) - { - SwitchFlashBank(sectorNum / SECTORS_PER_BANK); - sectorNum %= SECTORS_PER_BANK; - } - - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | WAITCNT_SRAM_8; - - funcSrc = (u16 *)VerifyFlashSector_Core; - funcSrc = (u16 *)((s32)funcSrc ^ 1); - funcDest = verifyFlashSector_Core_Buffer; - - i = ((s32)VerifyFlashSector - (s32)VerifyFlashSector_Core) >> 1; - - while (i != 0) - { - *funcDest++ = *funcSrc++; - i--; - } - - verifyFlashSector_Core = (u32 (*)(u8 *, u8 *, u32))((s32)verifyFlashSector_Core_Buffer + 1); - - tgt = FLASH_BASE + (sectorNum << gFlash->sector.shift); - - return verifyFlashSector_Core(src, tgt, n); -} - -u32 ProgramFlashSectorAndVerify(u16 sectorNum, u8 *src) -{ - u8 i; - u32 result; - - for (i = 0; i < 3; i++) - { - result = ProgramFlashSector(sectorNum, src); - if (result != 0) - continue; - - result = VerifyFlashSector(sectorNum, src); - if (result == 0) - break; - } - - return result; -} - -u32 ProgramFlashSectorAndVerifyNBytes(u16 sectorNum, void *src, u32 n) -{ - u8 i; - u32 result; - - for (i = 0; i < 3; i++) - { - result = ProgramFlashSector(sectorNum, src); - if (result != 0) - continue; - - result = VerifyFlashSectorNBytes(sectorNum, src, n); - if (result == 0) - break; - } - - return result; -} diff --git a/berry_fix/payload/src/agb_flash_1m.c b/berry_fix/payload/src/agb_flash_1m.c deleted file mode 100644 index 7f8bdeb5f0..0000000000 --- a/berry_fix/payload/src/agb_flash_1m.c +++ /dev/null @@ -1,86 +0,0 @@ -#include "gba/gba.h" -#include "gba/flash_internal.h" - -static const char AgbLibFlashVersion[] = "FLASH1M_V103"; - -const struct FlashSetupInfo * const sSetupInfos[] = -{ - &MX29L010, - &LE26FV10N1TS, - &DefaultFlash -}; - -u32 IdentifyFlash(void) -{ - u16 result; - u16 flashId; - const struct FlashSetupInfo * const *setupInfo; - - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | WAITCNT_SRAM_8; - - flashId = ReadFlashId(); - - setupInfo = sSetupInfos; - result = 1; - - for (;;) - { - if ((*setupInfo)->type.ids.separate.makerId == 0) - break; - - if (flashId == (*setupInfo)->type.ids.joined) - { - result = 0; - break; - } - - setupInfo++; - } - - ProgramFlashByte = (*setupInfo)->programFlashByte; - ProgramFlashSector = (*setupInfo)->programFlashSector; - EraseFlashChip = (*setupInfo)->eraseFlashChip; - EraseFlashSector = (*setupInfo)->eraseFlashSector; - WaitForFlashWrite = (*setupInfo)->WaitForFlashWrite; - gFlashMaxTime = (*setupInfo)->maxTime; - gFlash = &(*setupInfo)->type; - - return result; -} - -u16 WaitForFlashWrite_Common(u8 phase, u8 *addr, u8 lastData) -{ - u16 result = 0; - u8 status; - - StartFlashTimer(phase); - - while ((status = PollFlashStatus(addr)) != lastData) - { - if (status & 0x20) - { - // The write operation exceeded the flash chip's time limit. - - if (PollFlashStatus(addr) == lastData) - break; - - FLASH_WRITE(0x5555, 0xF0); - result = phase | 0xA000u; - break; - } - - if (gFlashTimeoutFlag) - { - if (PollFlashStatus(addr) == lastData) - break; - - FLASH_WRITE(0x5555, 0xF0); - result = phase | 0xC000u; - break; - } - } - - StopFlashTimer(); - - return result; -} diff --git a/berry_fix/payload/src/agb_flash_le.c b/berry_fix/payload/src/agb_flash_le.c deleted file mode 100644 index 39d956e277..0000000000 --- a/berry_fix/payload/src/agb_flash_le.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "gba/gba.h" -#include "gba/flash_internal.h" - -const u16 leMaxTime[] = -{ - 10, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK, - 10, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK, - 2000, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK, - 2000, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK, -}; - -const struct FlashSetupInfo LE26FV10N1TS = -{ - ProgramFlashByte_MX, - ProgramFlashSector_MX, - EraseFlashChip_MX, - EraseFlashSector_MX, - WaitForFlashWrite_Common, - leMaxTime, - { - 131072, // ROM size - { - 4096, // sector size - 12, // bit shift to multiply by sector size (4096 == 1 << 12) - 32, // number of sectors - 0 // appears to be unused - }, - { 3, 1 }, // wait state setup data - { { 0x62, 0x13 } } // ID - } -}; diff --git a/berry_fix/payload/src/agb_flash_mx.c b/berry_fix/payload/src/agb_flash_mx.c deleted file mode 100644 index 68eb00cd8d..0000000000 --- a/berry_fix/payload/src/agb_flash_mx.c +++ /dev/null @@ -1,193 +0,0 @@ -#include "gba/gba.h" -#include "gba/flash_internal.h" - -const u16 mxMaxTime[] = -{ - 10, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK, - 10, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK, - 2000, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK, - 2000, 65469, TIMER_ENABLE | TIMER_INTR_ENABLE | TIMER_256CLK, -}; - -const struct FlashSetupInfo MX29L010 = -{ - ProgramFlashByte_MX, - ProgramFlashSector_MX, - EraseFlashChip_MX, - EraseFlashSector_MX, - WaitForFlashWrite_Common, - mxMaxTime, - { - 131072, // ROM size - { - 4096, // sector size - 12, // bit shift to multiply by sector size (4096 == 1 << 12) - 32, // number of sectors - 0 // appears to be unused - }, - { 3, 1 }, // wait state setup data - { { 0xC2, 0x09 } } // ID - } -}; - -const struct FlashSetupInfo DefaultFlash = -{ - ProgramFlashByte_MX, - ProgramFlashSector_MX, - EraseFlashChip_MX, - EraseFlashSector_MX, - WaitForFlashWrite_Common, - mxMaxTime, - { - 131072, // ROM size - { - 4096, // sector size - 12, // bit shift to multiply by sector size (4096 == 1 << 12) - 32, // number of sectors - 0 // appears to be unused - }, - { 3, 1 }, // wait state setup data - { { 0x00, 0x00 } } // ID of 0 - } -}; - -u16 EraseFlashChip_MX(void) -{ - u16 result; - u16 readFlash1Buffer[0x20]; - - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | gFlash->wait[0]; - - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - FLASH_WRITE(0x5555, 0x80); - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - FLASH_WRITE(0x5555, 0x10); - - SetReadFlash1(readFlash1Buffer); - - result = WaitForFlashWrite(3, FLASH_BASE, 0xFF); - - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | WAITCNT_SRAM_8; - - return result; -} - -u16 EraseFlashSector_MX(u16 sectorNum) -{ - u16 numTries; - u16 result; - u8 *addr; - u16 readFlash1Buffer[0x20]; - - if (sectorNum >= gFlash->sector.count) - return 0x80FF; - - SwitchFlashBank(sectorNum / SECTORS_PER_BANK); - sectorNum %= SECTORS_PER_BANK; - - numTries = 0; - -try_erase: - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | gFlash->wait[0]; - - addr = FLASH_BASE + (sectorNum << gFlash->sector.shift); - - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - FLASH_WRITE(0x5555, 0x80); - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - *addr = 0x30; - - SetReadFlash1(readFlash1Buffer); - - result = WaitForFlashWrite(2, addr, 0xFF); - - if (!(result & 0xA000) || numTries > 3) - goto done; - - numTries++; - - goto try_erase; - -done: - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | WAITCNT_SRAM_8; - - return result; -} - -u16 ProgramFlashByte_MX(u16 sectorNum, u32 offset, u8 data) -{ - u8 *addr; - u16 readFlash1Buffer[0x20]; - - if (offset >= gFlash->sector.size) - return 0x8000; - - SwitchFlashBank(sectorNum / SECTORS_PER_BANK); - sectorNum %= SECTORS_PER_BANK; - - addr = FLASH_BASE + (sectorNum << gFlash->sector.shift) + offset; - - SetReadFlash1(readFlash1Buffer); - - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | gFlash->wait[0]; - - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - FLASH_WRITE(0x5555, 0xA0); - *addr = data; - - return WaitForFlashWrite(1, addr, data); -} - -static u16 ProgramByte(u8 *src, u8 *dest) -{ - FLASH_WRITE(0x5555, 0xAA); - FLASH_WRITE(0x2AAA, 0x55); - FLASH_WRITE(0x5555, 0xA0); - *dest = *src; - - return WaitForFlashWrite(1, dest, *src); -} - -u16 ProgramFlashSector_MX(u16 sectorNum, void *src) -{ - u16 result; - u8 *dest; - u16 readFlash1Buffer[0x20]; - - if (sectorNum >= gFlash->sector.count) - return 0x80FF; - - result = EraseFlashSector_MX(sectorNum); - - if (result != 0) - return result; - - SwitchFlashBank(sectorNum / SECTORS_PER_BANK); - sectorNum %= SECTORS_PER_BANK; - - SetReadFlash1(readFlash1Buffer); - - REG_WAITCNT = (REG_WAITCNT & ~WAITCNT_SRAM_MASK) | gFlash->wait[0]; - - gFlashNumRemainingBytes = gFlash->sector.size; - dest = FLASH_BASE + (sectorNum << gFlash->sector.shift); - - while (gFlashNumRemainingBytes > 0) - { - result = ProgramByte(src, dest); - - if (result != 0) - break; - - gFlashNumRemainingBytes--; - src++; - dest++; - } - - return result; -} diff --git a/berry_fix/payload/src/flash.c b/berry_fix/payload/src/flash.c deleted file mode 100644 index 1f09d0b8f7..0000000000 --- a/berry_fix/payload/src/flash.c +++ /dev/null @@ -1,752 +0,0 @@ -#include "gba/gba.h" -#include "gba/flash_internal.h" -#include "constants/vars.h" -#include "global.h" -#include "main.h" -#include "flash.h" -#include "rtc.h" - -struct SaveBlockChunk -{ - u8 * data; - u16 size; -}; - -u8 WriteSaveBlockChunks(u16 a0, const struct SaveBlockChunk * a1); -u8 WriteSingleChunk(u16 a0, const struct SaveBlockChunk * a1); -u8 TryWriteSector(u8, u8 *); -u8 EraseCurrentChunk(u16 a0, const struct SaveBlockChunk * a1); -u8 TryReadAllSaveSectorsCurrentSlot(u16 a0, const struct SaveBlockChunk * a1); -u8 ReadAllSaveSectorsCurrentSlot(u16 a0, const struct SaveBlockChunk * a1); -u8 GetSaveValidStatus(const struct SaveBlockChunk * a1); -u32 DoReadFlashWholeSection(u8 a0, struct SaveSector * a1); -u16 CalculateChecksum(const void *, u16); - -u16 gFirstSaveSector; -u32 gPrevSaveCounter; -u16 gLastKnownGoodSector; -u32 gDamagedSaveSectors; -u32 gSaveCounter; -struct SaveSector * gFastSaveSection; -u16 gCurSaveChunk; -bool32 gFlashIdentIsValid; - -EWRAM_DATA struct SaveBlock2 gSaveBlock2 = {}; -EWRAM_DATA struct SaveBlock1 gSaveBlock1 = {}; -EWRAM_DATA struct PokemonStorage gPokemonStorage = {}; - -// Each 4 KiB flash sector contains 3968 bytes of actual data followed by a 128 byte footer -#define SECTOR_DATA_SIZE 3968 -#define SECTOR_FOOTER_SIZE 128 - -#define SAVEBLOCK_CHUNK(structure, chunkNum) \ -{ \ - (u8 *)&structure + chunkNum * SECTOR_DATA_SIZE, \ - min(sizeof(structure) - chunkNum * SECTOR_DATA_SIZE, SECTOR_DATA_SIZE) \ -} \ - -static const struct SaveBlockChunk sSaveBlockChunks[] = -{ - SAVEBLOCK_CHUNK(gSaveBlock2, 0), - - SAVEBLOCK_CHUNK(gSaveBlock1, 0), - SAVEBLOCK_CHUNK(gSaveBlock1, 1), - SAVEBLOCK_CHUNK(gSaveBlock1, 2), - SAVEBLOCK_CHUNK(gSaveBlock1, 3), - - SAVEBLOCK_CHUNK(gPokemonStorage, 0), - SAVEBLOCK_CHUNK(gPokemonStorage, 1), - SAVEBLOCK_CHUNK(gPokemonStorage, 2), - SAVEBLOCK_CHUNK(gPokemonStorage, 3), - SAVEBLOCK_CHUNK(gPokemonStorage, 4), - SAVEBLOCK_CHUNK(gPokemonStorage, 5), - SAVEBLOCK_CHUNK(gPokemonStorage, 6), - SAVEBLOCK_CHUNK(gPokemonStorage, 7), - SAVEBLOCK_CHUNK(gPokemonStorage, 8), -}; - -const u16 gInfoMessagesPal[] = INCBIN_U16("graphics/msg_box.gbapal"); -const u8 gInfoMessagesTilemap[] = INCBIN_U8("graphics/msg_box.tilemap.lz"); -const u8 gInfoMessagesGfx[] = INCBIN_U8("graphics/msg_box.4bpp.lz"); - -bool32 flash_maincb_ident_is_valid(void) -{ - gFlashIdentIsValid = TRUE; - if (!IdentifyFlash()) - { - SetFlashTimerIntr(0, &((IntrFunc *)gIntrFuncPointers)[9]); - return TRUE; - } - gFlashIdentIsValid = FALSE; - return FALSE; -} - -void Call_ReadFlash(u16 sectorNum, ptrdiff_t offset, void * dest, size_t size) -{ - ReadFlash(sectorNum, offset, dest, size); -} - -u8 Call_WriteSaveBlockChunks(u16 a0, const struct SaveBlockChunk * a1) -{ - return WriteSaveBlockChunks(a0, a1); -} - -u8 Call_TryReadAllSaveSectorsCurrentSlot(u16 a0, const struct SaveBlockChunk * a1) -{ - return TryReadAllSaveSectorsCurrentSlot(a0, a1); -} - -u32 * GetDamagedSaveSectorsPtr(void) -{ - return &gDamagedSaveSectors; -} - -s32 flash_write_save_block_chunks(u8 a0) -{ - u8 i; - - switch (a0) - { - case 0: - default: - Call_WriteSaveBlockChunks(0xFFFF, sSaveBlockChunks); - break; - case 1: - for (i = 0; i < 5; i++) - { - Call_WriteSaveBlockChunks(i, sSaveBlockChunks); - } - break; - case 2: - Call_WriteSaveBlockChunks(0, sSaveBlockChunks); - break; - } - - return 0; -} - -u8 flash_write_save_block_chunks_check_damage(u8 a0) -{ - flash_write_save_block_chunks(a0); - if (*GetDamagedSaveSectorsPtr() == 0) - return 1; - return 0xFF; -} - -u8 flash_maincb_read_save(u32 unused) -{ - return Call_TryReadAllSaveSectorsCurrentSlot(0xFFFF, sSaveBlockChunks); -} - -void msg_load_gfx(void) -{ - REG_DISPCNT = 0; - REG_BG0HOFS = 0; - REG_BG0VOFS = 0; - REG_BLDCNT = 0; - LZ77UnCompVram(gInfoMessagesGfx, (void *)BG_VRAM); - LZ77UnCompVram(gInfoMessagesTilemap, (void *)BG_SCREEN_ADDR(28)); - CpuCopy16(gInfoMessagesPal, (void *)BG_PLTT, 0x200); - REG_BG0CNT = BGCNT_SCREENBASE(28) | BGCNT_TXT512x512; - REG_DISPCNT = DISPCNT_BG0_ON; -} - -void msg_display(enum MsgBoxUpdateMessage a0) -{ - switch (a0) - { - case MSGBOX_WILL_NOW_UPDATE: - REG_BG0HOFS = 0; - REG_BG0VOFS = 0; - break; - case MSGBOX_HAS_BEEN_UPDATED: - REG_BG0HOFS = 0x100; - REG_BG0VOFS = 0; - break; - case MSGBOX_UNABLE_TO_UPDATE: - REG_BG0HOFS = 0x100; - REG_BG0VOFS = 0xB0; - break; - case MSGBOX_NO_NEED_TO_UPDATE: - REG_BG0HOFS = 0; - REG_BG0VOFS = 0xB0; - break; - case MSGBOX_UPDATING: - REG_BG0HOFS = 0; - REG_BG0VOFS = 0x160; - break; - } -} - -void Save_EraseAllData(void) -{ - u16 i; - for (i = 0; i < 32; i++) - EraseFlashSector(i); -} - -void Save_ResetSaveCounters(void) -{ - gSaveCounter = 0; - gFirstSaveSector = 0; - gDamagedSaveSectors = 0; -} - -bool32 SetSectorDamagedStatus(u8 op, u8 sectorNum) -{ - bool32 retVal = FALSE; - - switch (op) - { - case SECTOR_DAMAGED: - gDamagedSaveSectors |= (1 << sectorNum); - break; - case SECTOR_OK: - gDamagedSaveSectors &= ~(1 << sectorNum); - break; - case SECTOR_CHECK: // unused - if (gDamagedSaveSectors & (1 << sectorNum)) - retVal = TRUE; - break; - } - - return retVal; -} - -u8 WriteSaveBlockChunks(u16 chunkId, const struct SaveBlockChunk *chunks) -{ - u32 retVal; - u16 i; - - gFastSaveSection = eSaveSection; - - if (chunkId != 0xFFFF) // write single chunk - { - retVal = WriteSingleChunk(chunkId, chunks); - } - else // write all chunks - { - gLastKnownGoodSector = gFirstSaveSector; - gPrevSaveCounter = gSaveCounter; - gFirstSaveSector++; - gFirstSaveSector %= NUM_SECTORS_PER_SAVE_SLOT; - gSaveCounter++; - retVal = SAVE_STATUS_OK; - - for (i = 0; i < NUM_SECTORS_PER_SAVE_SLOT; i++) - WriteSingleChunk(i, chunks); - - // Check for any bad sectors - if (gDamagedSaveSectors != 0) // skip the damaged sector. - { - retVal = SAVE_STATUS_ERROR; - gFirstSaveSector = gLastKnownGoodSector; - gSaveCounter = gPrevSaveCounter; - } - } - - return retVal; -} - -u8 WriteSingleChunk(u16 chunkId, const struct SaveBlockChunk * chunks) -{ - u16 i; - u16 sectorNum; - u8 *chunkData; - u16 chunkSize; - - // select sector number - sectorNum = chunkId + gFirstSaveSector; - sectorNum %= NUM_SECTORS_PER_SAVE_SLOT; - // select save slot - sectorNum += NUM_SECTORS_PER_SAVE_SLOT * (gSaveCounter % 2); - - chunkData = chunks[chunkId].data; - chunkSize = chunks[chunkId].size; - - // clear save section. - for (i = 0; i < sizeof(struct SaveSector); i++) - ((u8 *)gFastSaveSection)[i] = 0; - - gFastSaveSection->id = chunkId; - gFastSaveSection->signature = FILE_SIGNATURE; - gFastSaveSection->counter = gSaveCounter; - for (i = 0; i < chunkSize; i++) - gFastSaveSection->data[i] = chunkData[i]; - gFastSaveSection->checksum = CalculateChecksum(chunkData, chunkSize); - - return TryWriteSector(sectorNum, gFastSaveSection->data); -} - -u8 HandleWriteSectorNBytes(u8 sectorNum, u8 *data, u16 size) -{ - u16 i; - struct SaveSector *section = eSaveSection; - - for (i = 0; i < sizeof(struct SaveSector); i++) - ((char *)section)[i] = 0; - - section->signature = FILE_SIGNATURE; - for (i = 0; i < size; i++) - section->data[i] = data[i]; - section->id = CalculateChecksum(data, size); // though this appears to be incorrect, it might be some sector checksum instead of a whole save checksum and only appears to be relevent to HOF data, if used. - - return TryWriteSector(sectorNum, section->data); -} - -u8 TryWriteSector(u8 sectorNum, u8 *data) -{ - if (ProgramFlashSectorAndVerify(sectorNum, data) != 0) // is damaged? - { - SetSectorDamagedStatus(SECTOR_DAMAGED, sectorNum); // set damaged sector bits. - return SAVE_STATUS_ERROR; - } - else - { - SetSectorDamagedStatus(SECTOR_OK, sectorNum); // unset damaged sector bits. it's safe now. - return SAVE_STATUS_OK; - } -} - -u32 RestoreSaveBackupVarsAndIncrement(const struct SaveBlockChunk *chunk) // chunk is unused -{ - gFastSaveSection = eSaveSection; - gLastKnownGoodSector = gFirstSaveSector; - gPrevSaveCounter = gSaveCounter; - gFirstSaveSector++; - gFirstSaveSector %= NUM_SECTORS_PER_SAVE_SLOT; - gSaveCounter++; - gCurSaveChunk = 0; - gDamagedSaveSectors = 0; - return 0; -} - -u32 RestoreSaveBackupVars(const struct SaveBlockChunk *chunk) -{ - gFastSaveSection = eSaveSection; - gLastKnownGoodSector = gFirstSaveSector; - gPrevSaveCounter = gSaveCounter; - gCurSaveChunk = 0; - gDamagedSaveSectors = 0; - return 0; -} - -u8 WriteSingleChunkAndIncrement(u16 a1, const struct SaveBlockChunk * chunk) -{ - u8 retVal; - - if (gCurSaveChunk < a1 - 1) - { - retVal = SAVE_STATUS_OK; - WriteSingleChunk(gCurSaveChunk, chunk); - gCurSaveChunk++; - if (gDamagedSaveSectors) - { - retVal = SAVE_STATUS_ERROR; - gFirstSaveSector = gLastKnownGoodSector; - gSaveCounter = gPrevSaveCounter; - } - } - else - { - retVal = SAVE_STATUS_ERROR; - } - - return retVal; -} - -u8 ErasePreviousChunk(u16 a1, const struct SaveBlockChunk *chunk) -{ - u8 retVal = SAVE_STATUS_OK; - - EraseCurrentChunk(a1 - 1, chunk); - - if (gDamagedSaveSectors) - { - retVal = SAVE_STATUS_ERROR; - gFirstSaveSector = gLastKnownGoodSector; - gSaveCounter = gPrevSaveCounter; - } - return retVal; -} - -u8 EraseCurrentChunk(u16 chunkId, const struct SaveBlockChunk *chunks) -{ - u16 i; - u16 sector; - u8 *data; - u16 size; - u8 status; - - // select sector number - sector = chunkId + gFirstSaveSector; - sector %= NUM_SECTORS_PER_SAVE_SLOT; - // select save slot - sector += NUM_SECTORS_PER_SAVE_SLOT * (gSaveCounter % 2); - - data = chunks[chunkId].data; - size = chunks[chunkId].size; - - // clear temp save section. - for (i = 0; i < sizeof(struct SaveSector); i++) - ((char *)gFastSaveSection)[i] = 0; - - gFastSaveSection->id = chunkId; - gFastSaveSection->signature = FILE_SIGNATURE; - gFastSaveSection->counter = gSaveCounter; - - // set temp section's data. - for (i = 0; i < size; i++) - gFastSaveSection->data[i] = data[i]; - - // calculate checksum. - gFastSaveSection->checksum = CalculateChecksum(data, size); - - EraseFlashSector(sector); - - status = SAVE_STATUS_OK; - - for (i = 0; i < sizeof(struct UnkSaveSection); i++) - { - if (ProgramFlashByte(sector, i, gFastSaveSection->data[i])) - { - status = SAVE_STATUS_ERROR; - break; - } - } - - if (status == SAVE_STATUS_ERROR) - { - SetSectorDamagedStatus(SECTOR_DAMAGED, sector); - return SAVE_STATUS_ERROR; - } - else - { - status = SAVE_STATUS_OK; - - for (i = 0; i < 7; i++) - { - if (ProgramFlashByte(sector, 0xFF9 + i, ((u8 *)gFastSaveSection)[0xFF9 + i])) - { - status = SAVE_STATUS_ERROR; - break; - } - } - - if (status == SAVE_STATUS_ERROR) - { - SetSectorDamagedStatus(SECTOR_DAMAGED, sector); - return SAVE_STATUS_ERROR; - } - else - { - SetSectorDamagedStatus(SECTOR_OK, sector); - return SAVE_STATUS_OK; - } - } -} - -u8 WriteSomeFlashByteToPrevSector(u16 a1, const struct SaveBlockChunk *chunk) -{ - u16 sector; - - // select sector number - sector = a1 + gFirstSaveSector - 1; - sector %= NUM_SECTORS_PER_SAVE_SLOT; - // select save slot - sector += NUM_SECTORS_PER_SAVE_SLOT * (gSaveCounter % 2); - - if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), ((u8 *)gFastSaveSection)[sizeof(struct UnkSaveSection)])) - { - // sector is damaged, so enable the bit in gDamagedSaveSectors and restore the last written sector and save counter. - SetSectorDamagedStatus(SECTOR_DAMAGED, sector); - gFirstSaveSector = gLastKnownGoodSector; - gSaveCounter = gPrevSaveCounter; - return SAVE_STATUS_ERROR; - } - else - { - SetSectorDamagedStatus(SECTOR_OK, sector); - return SAVE_STATUS_OK; - } -} - -u8 WriteSomeFlashByte0x25ToPrevSector(u16 a1, const struct SaveBlockChunk *chunk) -{ - u16 sector; - - sector = a1 + gFirstSaveSector - 1; - sector %= NUM_SECTORS_PER_SAVE_SLOT; - sector += NUM_SECTORS_PER_SAVE_SLOT * (gSaveCounter % 2); - - if (ProgramFlashByte(sector, sizeof(struct UnkSaveSection), 0x25)) - { - // sector is damaged, so enable the bit in gDamagedSaveSectors and restore the last written sector and save counter. - SetSectorDamagedStatus(SECTOR_DAMAGED, sector); - gFirstSaveSector = gLastKnownGoodSector; - gSaveCounter = gPrevSaveCounter; - return SAVE_STATUS_ERROR; - } - else - { - SetSectorDamagedStatus(SECTOR_OK, sector); - return SAVE_STATUS_OK; - } -} - -u8 TryReadAllSaveSectorsCurrentSlot(u16 a1, const struct SaveBlockChunk *chunk) -{ - u8 retVal; - gFastSaveSection = eSaveSection; - if (a1 != 0xFFFF) - { - retVal = SAVE_STATUS_ERROR; - } - else - { - retVal = GetSaveValidStatus(chunk); - ReadAllSaveSectorsCurrentSlot(0xFFFF, chunk); - } - - return retVal; -} - -u8 ReadAllSaveSectorsCurrentSlot(u16 a1, const struct SaveBlockChunk *chunks) -{ - u16 i; - u16 checksum; - u16 sector = NUM_SECTORS_PER_SAVE_SLOT * (gSaveCounter % 2); - u16 id; - - for (i = 0; i < NUM_SECTORS_PER_SAVE_SLOT; i++) - { - DoReadFlashWholeSection(i + sector, gFastSaveSection); - id = gFastSaveSection->id; - if (id == 0) - gFirstSaveSector = i; - checksum = CalculateChecksum(gFastSaveSection->data, chunks[id].size); - if (gFastSaveSection->signature == FILE_SIGNATURE - && gFastSaveSection->checksum == checksum) - { - u16 j; - for (j = 0; j < chunks[id].size; j++) - chunks[id].data[j] = gFastSaveSection->data[j]; - } - } - - return 1; -} - -u8 GetSaveValidStatus(const struct SaveBlockChunk *chunks) -{ - u16 sector; - bool8 signatureValid; - u16 checksum; - u32 slot1saveCounter = 0; - u32 slot2saveCounter = 0; - u8 slot1Status; - u8 slot2Status; - u32 validSectors; - const u32 ALL_SECTORS = (1 << NUM_SECTORS_PER_SAVE_SLOT) - 1; // bitmask of all saveblock sectors - - // check save slot 1. - validSectors = 0; - signatureValid = FALSE; - for (sector = 0; sector < NUM_SECTORS_PER_SAVE_SLOT; sector++) - { - DoReadFlashWholeSection(sector, gFastSaveSection); - if (gFastSaveSection->signature == FILE_SIGNATURE) - { - signatureValid = TRUE; - checksum = CalculateChecksum(gFastSaveSection->data, chunks[gFastSaveSection->id].size); - if (gFastSaveSection->checksum == checksum) - { - slot1saveCounter = gFastSaveSection->counter; - validSectors |= 1 << gFastSaveSection->id; - } - } - } - - if (signatureValid) - { - if (validSectors == ALL_SECTORS) - slot1Status = SAVE_STATUS_OK; - else - slot1Status = SAVE_STATUS_ERROR; - } - else - { - slot1Status = SAVE_STATUS_EMPTY; - } - - // check save slot 2. - validSectors = 0; - signatureValid = FALSE; - for (sector = 0; sector < NUM_SECTORS_PER_SAVE_SLOT; sector++) - { - DoReadFlashWholeSection(NUM_SECTORS_PER_SAVE_SLOT + sector, gFastSaveSection); - if (gFastSaveSection->signature == FILE_SIGNATURE) - { - signatureValid = TRUE; - checksum = CalculateChecksum(gFastSaveSection->data, chunks[gFastSaveSection->id].size); - if (gFastSaveSection->checksum == checksum) - { - slot2saveCounter = gFastSaveSection->counter; - validSectors |= 1 << gFastSaveSection->id; - } - } - } - - if (signatureValid) - { - if (validSectors == ALL_SECTORS) - slot2Status = SAVE_STATUS_OK; - else - slot2Status = SAVE_STATUS_ERROR; - } - else - { - slot2Status = SAVE_STATUS_EMPTY; - } - - if (slot1Status == SAVE_STATUS_OK && slot2Status == SAVE_STATUS_OK) - { - // Choose counter of the most recent save file - if ((slot1saveCounter == -1 && slot2saveCounter == 0) || (slot1saveCounter == 0 && slot2saveCounter == -1)) - { - if ((unsigned)(slot1saveCounter + 1) < (unsigned)(slot2saveCounter + 1)) - gSaveCounter = slot2saveCounter; - else - gSaveCounter = slot1saveCounter; - } - else - { - if (slot1saveCounter < slot2saveCounter) - gSaveCounter = slot2saveCounter; - else - gSaveCounter = slot1saveCounter; - } - return SAVE_STATUS_OK; - } - - if (slot1Status == SAVE_STATUS_OK) - { - gSaveCounter = slot1saveCounter; - if (slot2Status == SAVE_STATUS_ERROR) - return SAVE_STATUS_ERROR; - else - return SAVE_STATUS_OK; - } - - if (slot2Status == SAVE_STATUS_OK) - { - gSaveCounter = slot2saveCounter; - if (slot1Status == SAVE_STATUS_ERROR) - return SAVE_STATUS_ERROR; - else - return SAVE_STATUS_OK; - } - - if (slot1Status == SAVE_STATUS_EMPTY && slot2Status == SAVE_STATUS_EMPTY) - { - gSaveCounter = 0; - gFirstSaveSector = 0; - return SAVE_STATUS_EMPTY; - } - - gSaveCounter = 0; - gFirstSaveSector = 0; - return 2; -} - -u8 ReadSomeUnknownSectorAndVerify(u8 sector, u8 *data, u16 size) -{ - u16 i; - struct SaveSector *section = eSaveSection; - - DoReadFlashWholeSection(sector, section); - if (section->signature == FILE_SIGNATURE) - { - u16 checksum = CalculateChecksum(section->data, size); - if (section->id == checksum) - { - for (i = 0; i < size; i++) - data[i] = section->data[i]; - return SAVE_STATUS_OK; - } - else - { - return 2; - } - } - else - { - return SAVE_STATUS_EMPTY; - } -} - -u32 DoReadFlashWholeSection(u8 sector, struct SaveSector *section) -{ - ReadFlash(sector, 0, section->data, sizeof(struct SaveSector)); - return 1; -} - -u16 CalculateChecksum(const void *data, u16 size) -{ - u16 i; - u32 checksum = 0; - - for (i = 0; i < (size / 4); i++) - { - checksum += *((u32 *)data); - data += sizeof(u32); - } - - return ((checksum >> 16) + checksum); -} - -void nullsub_0201182C() -{ -} - -void nullsub_02011830() -{ -} - -void nullsub_02011834() -{ -} - -u16 * get_var_addr(u16 a0) -{ - if (a0 < VARS_START) - return NULL; - if (a0 < VAR_SPECIAL_0) - return &gSaveBlock1.vars[a0 - VARS_START]; - return NULL; -} - -bool32 flash_maincb_check_need_reset_pacifidlog_tm(void) -{ - u8 sp0; - u16 * data = get_var_addr(VAR_PACIFIDLOG_TM_RECEIVED_DAY); - rtc_maincb_is_time_since_last_berry_update_positive(&sp0); - if (*data <= gRtcUTCTime.days) - return TRUE; - else - return FALSE; -} - -bool32 flash_maincb_reset_pacifidlog_tm(void) -{ - u8 sp0; - if (flash_maincb_check_need_reset_pacifidlog_tm() == TRUE) - return TRUE; - rtc_maincb_is_time_since_last_berry_update_positive(&sp0); - if (gRtcUTCTime.days < 0) - return FALSE; - *get_var_addr(VAR_PACIFIDLOG_TM_RECEIVED_DAY) = 1; - if (flash_write_save_block_chunks_check_damage(0) != TRUE) - return FALSE; - return TRUE; -} diff --git a/berry_fix/payload/src/main.c b/berry_fix/payload/src/main.c deleted file mode 100644 index 32d90f9c19..0000000000 --- a/berry_fix/payload/src/main.c +++ /dev/null @@ -1,289 +0,0 @@ -#include "gba/gba.h" -#include "global.h" -#include "main.h" -#include "rtc.h" -#include "flash.h" - -static s32 gInitialWaitTimer; -IntrFunc gIntrTable[16]; -u16 gHeldKeys; -u16 gNewKeys; -u8 gIntrVector[0x100]; -u32 gUpdateSuccessful; -u32 gUnknown_3001194; -u32 gUnknown_30011A0[0x19]; -u32 gMainCallbackState; -u32 gGameVersion; - -EWRAM_DATA u8 gSharedMem[0x8000] = {}; - -void IntrMain(void); -void ReadKeys(void); -void dummy_intr_0(void); -void dummy_intr_1(void); -void main_callback(u32 *, void *, void *); - - -const char gBerryFixGameCode[] = "AGBJ"; -const IntrFunc gIntrFuncPointers[] = { - dummy_intr_0, - dummy_intr_1, - dummy_intr_0, - dummy_intr_0, - dummy_intr_0, - dummy_intr_0, - dummy_intr_0, - dummy_intr_0, - dummy_intr_0, - dummy_intr_0, - NULL, - NULL, - NULL -}; -const char gVersionData[][2] = { - {'J', 1}, - {'E', 2}, - {'D', 1}, - {'F', 1}, - {'I', 1}, - {'S', 1} -}; -const char gRubyTitleAndCode[] = "POKEMON RUBYAXV"; -const char gSapphireTitleAndCode[] = "POKEMON SAPPAXP"; -const u16 sDebugPals[20] = { - RGB(00, 00, 00), - RGB(31, 00, 00), - RGB(00, 31, 00), - RGB(00, 00, 31) -}; -const u16 sDebugDigitsGfx[] = INCBIN_U16("graphics/debug_digits.4bpp"); - -void AgbMain(void) -{ - RegisterRamReset(0x1E); - DmaCopy32(3, gIntrFuncPointers, gIntrTable, sizeof gIntrFuncPointers); - DmaCopy32(3, IntrMain, gIntrVector, sizeof(gIntrVector)); - INTR_VECTOR = gIntrVector; - REG_IE = INTR_FLAG_VBLANK; - if (*RomHeaderMagic == 0x96 && *(u32 *)RomHeaderGameCode == *(u32 *)gBerryFixGameCode) - REG_IE |= INTR_FLAG_GAMEPAK; - REG_DISPSTAT = DISPSTAT_VBLANK_INTR; - REG_IME = INTR_FLAG_VBLANK; - msg_load_gfx(); - gMainCallbackState = MAINCB_INIT; - gUnknown_3001194 = 0; - for (;;) - { - VBlankIntrWait(); - ReadKeys(); - main_callback(&gMainCallbackState, gUnknown_30011A0, gSharedMem); - } -} - -void dummy_intr_1(void) -{} - -void dummy_intr_0(void) -{} - -void ReadKeys(void) -{ - u16 keyInput = REG_KEYINPUT ^ KEYS_MASK; - gNewKeys = keyInput & ~gHeldKeys; - gHeldKeys = keyInput; -} - -void fill_palette(const u8 * src, u16 * dest, u8 value) -{ - s32 i; - for (i = 0; src[i] != 0; i++) - dest[i] = src[i] | value << 12; -} - -bool32 berry_fix_memcmp(const char * src1, const char * src2, size_t size) -{ - s32 i; - for (i = 0; i < size; i++) - { - if (src1[i] != src2[i]) - return FALSE; - } - return TRUE; -} - -s32 validate_rom_header_internal(void) -{ - char languageCode = *(RomHeaderGameCode + 3); - s32 softwareVersion = *RomHeaderSoftwareVersion; - s32 shouldUpdate = -1; - s32 i; - for (i = 0; i < ARRAY_COUNT(gVersionData); i++) - { - if (languageCode == gVersionData[i][0]) - { - if (softwareVersion >= gVersionData[i][1]) - { - shouldUpdate = 0; - } - else - { - shouldUpdate = 1; - } - break; - } - } - if (shouldUpdate != -1) - { - if (berry_fix_memcmp(RomHeaderGameTitle, gRubyTitleAndCode, 15) == TRUE) - { - if (shouldUpdate == 0) - return RUBY_NONEED; - else - { - gGameVersion = VERSION_RUBY; - return RUBY_UPDATABLE; - } - } - else if (berry_fix_memcmp(RomHeaderGameTitle, gSapphireTitleAndCode, 15) == TRUE) - { - if (shouldUpdate == 0) - return SAPPHIRE_NONEED; - else - { - gGameVersion = VERSION_SAPPHIRE; - return SAPPHIRE_UPDATABLE; - } - } - } - return INVALID; -} - -s32 validate_rom_header(void) -{ - if (*RomHeaderMakerCode == '0' && *(RomHeaderMakerCode + 1) == '1' && *RomHeaderMagic == 0x96) - return validate_rom_header_internal(); - else - return INVALID; -} - -void main_callback(u32 * state, void * unused1, void * unused2) -{ - u8 year; - switch (*state) - { - case MAINCB_INIT: - msg_display(MSGBOX_WILL_NOW_UPDATE); - if (++gInitialWaitTimer >= 180) - { - gInitialWaitTimer = 0; - gUpdateSuccessful = 0; - switch (validate_rom_header()) - { - case SAPPHIRE_UPDATABLE: - case RUBY_UPDATABLE: // Should Update Ruby - ++(*state); // MAINCB_CHECK_RTC - break; - case INVALID: // Invalid header - *state = MAINCB_ERROR; - break; - case SAPPHIRE_NONEED: // Should not update Sapphire - case RUBY_NONEED: // Should not update Ruby - *state = MAINCB_NO_NEED_TO_FIX; - break; - } - } - break; - case MAINCB_CHECK_RTC: - if (!rtc_maincb_is_rtc_working()) - *state = MAINCB_ERROR; - else - ++(*state); // MAINCB_CHECK_FLASH - break; - case MAINCB_CHECK_FLASH: - if (flash_maincb_ident_is_valid() == TRUE) - ++(*state); // MAINCB_READ_SAVE - else - *state = MAINCB_ERROR; - break; - case MAINCB_READ_SAVE: - if (flash_maincb_read_save(0) == SAVE_STATUS_OK) - ++(*state); // MAINCB_CHECK_TIME - else - *state = MAINCB_ERROR; - break; - case MAINCB_CHECK_TIME: - if (rtc_maincb_is_time_since_last_berry_update_positive(&year) == TRUE) - { - if (year == 0) - ++(*state); // MAINCB_FIX_DATE - else - *state = MAINCB_CHECK_PACIFIDLOG_TM; - } - else - { - if (year != 1) - *state = MAINCB_YEAR_MAKES_NO_SENSE; - else - ++(*state); // MAINCB_FIX_DATE - } - break; - case MAINCB_FIX_DATE: - rtc_maincb_fix_date(); - gUpdateSuccessful |= 1; - *state = MAINCB_CHECK_PACIFIDLOG_TM; - break; - case MAINCB_CHECK_PACIFIDLOG_TM: - if (flash_maincb_check_need_reset_pacifidlog_tm() == TRUE) - *state = MAINCB_FINISHED; - else - *state = MAINCB_FIX_PACIFIDLOG_TM; - break; - case MAINCB_FIX_PACIFIDLOG_TM: - msg_display(MSGBOX_UPDATING); - if (flash_maincb_reset_pacifidlog_tm() == TRUE) - { - gUpdateSuccessful |= 1; - *state = MAINCB_FINISHED; - } - else - *state = MAINCB_ERROR; - break; - case MAINCB_FINISHED: - if (gUpdateSuccessful == 0) - *state = MAINCB_NO_NEED_TO_FIX; - else - msg_display(MSGBOX_HAS_BEEN_UPDATED); - break; - case MAINCB_NO_NEED_TO_FIX: - msg_display(MSGBOX_NO_NEED_TO_UPDATE); - break; - case MAINCB_YEAR_MAKES_NO_SENSE: - msg_display(MSGBOX_UNABLE_TO_UPDATE); - break; - case MAINCB_ERROR: - msg_display(MSGBOX_UNABLE_TO_UPDATE); - break; - } -} - -void DBG_LoadDigitsPal(void) -{ - s32 i; - const u16 * src; - vu16 * dest = (vu16 *)BG_PLTT + 1; - DmaFill16(3, RGB(31, 31, 31), (vu16 *)BG_PLTT, BG_PLTT_SIZE); - src = sDebugPals; - for (i = 0; i < 4; i++) - { - *dest = *src; - dest += 16; - src++; - } -} - -void DBG_LoadDigits(void) -{ - DmaFill16(3, 0x1111, (void *)VRAM + 0x8420, 0x1800); - DmaCopy32(3, sDebugDigitsGfx, (void *)VRAM + 0x8600, 0x200); - DBG_LoadDigitsPal(); -} diff --git a/berry_fix/payload/src/rtc.c b/berry_fix/payload/src/rtc.c deleted file mode 100644 index e73f522aad..0000000000 --- a/berry_fix/payload/src/rtc.c +++ /dev/null @@ -1,346 +0,0 @@ -#include "gba/gba.h" -#include "siirtc.h" -#include "global.h" -#include "main.h" - -struct Time gTimeSinceBerryUpdate; -struct Time gRtcUTCTime; - -static u16 sRtcProbeStatus; -static struct SiiRtcInfo sRtcInfoBuffer; -static u8 sRtcProbeCode; -static u16 sImeBak; -static struct SiiRtcInfo sRtcInfoWork; - -const struct SiiRtcInfo sDefaultRTC = { - .year = 0, // 2000 - .month = 1, // January - .day = 1, // 01 - .dayOfWeek = 0, - .hour = 0, - .minute = 0, - .second = 0, - .status = 0, - .alarmHour = 0, - .alarmMinute = 0 -}; -const s32 sDaysPerMonth[] = { - 31, - 28, - 31, - 30, - 31, - 30, - 31, - 31, - 30, - 31, - 30, - 31 -}; - -void rtc_get_status_and_datetime(struct SiiRtcInfo *); -u16 rtc_validate_datetime(struct SiiRtcInfo *); - - -void rtc_intr_disable(void) -{ - sImeBak = REG_IME; - REG_IME = 0; -} - -void rtc_intr_enable(void) -{ - REG_IME = sImeBak; -} - -s32 bcd_to_hex(u8 a0) -{ - if (a0 >= 0xa0 || (a0 & 0xF) >= 10) - return 0xFF; - return ((a0 >> 4) & 0xF) * 10 + (a0 & 0xF); -} - -bool8 is_leap_year(u8 year) -{ - if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) - return TRUE; - return FALSE; -} - -u16 rtc_count_days_parameterized(u8 year, u8 month, u8 day) -{ - u16 numDays = 0; - s32 i; - for (i = year - 1; i > 0; i--) - { - numDays += 365; - if (is_leap_year(i) == TRUE) - numDays++; - } - for (i = 0; i < month - 1; i++) - numDays += sDaysPerMonth[i]; - if (month > MONTH_FEB && is_leap_year(year) == TRUE) - numDays++; - numDays += day; - return numDays; -} - -u16 rtc_count_days_from_info(struct SiiRtcInfo *info) -{ - return rtc_count_days_parameterized(bcd_to_hex(info->year), bcd_to_hex(info->month), bcd_to_hex(info->day)); -} - -static void rtc_probe_status(void) -{ - sRtcProbeStatus = 0; - rtc_intr_disable(); - SiiRtcUnprotect(); - sRtcProbeCode = SiiRtcProbe(); - rtc_intr_enable(); - if ((sRtcProbeCode & 0xF) != 1) - sRtcProbeStatus = 1; - else - { - if (sRtcProbeCode & 0xF0) - sRtcProbeStatus = 2; - else - sRtcProbeStatus = 0; - rtc_get_status_and_datetime(&sRtcInfoBuffer); - sRtcProbeStatus = rtc_validate_datetime(&sRtcInfoBuffer); - } -} - -u16 rtc_get_probe_status(void) -{ - return sRtcProbeStatus; -} - -void sub_020106EC(struct SiiRtcInfo * info) -{ - if (sRtcProbeStatus & 0xFF0) - *info = sDefaultRTC; - else - rtc_get_status_and_datetime(info); -} - -void rtc_get_datetime(struct SiiRtcInfo * info) -{ - rtc_intr_disable(); - SiiRtcGetDateTime(info); - rtc_intr_enable(); -} - -void rtc_get_status(struct SiiRtcInfo * info) -{ - rtc_intr_disable(); - SiiRtcGetStatus(info); - rtc_intr_enable(); -} - -void rtc_get_status_and_datetime(struct SiiRtcInfo * info) -{ - rtc_get_status(info); - rtc_get_datetime(info); -} - -u16 rtc_validate_datetime(struct SiiRtcInfo * info) -{ - s32 year, month, day; - u16 r4 = (info->status & SIIRTCINFO_POWER) ? 0x20 : 0; - if (!(info->status & SIIRTCINFO_24HOUR)) - r4 |= 0x10; - year = bcd_to_hex(info->year); - if (year == 0xFF) - r4 |= 0x40; - month = bcd_to_hex(info->month); - if (month == 0xFF || month == 0 || month > 12) - r4 |= 0x80; - day = bcd_to_hex(info->day); - if (day == 0xFF) - r4 |= 0x100; - if (month == MONTH_FEB) - { - if (day > is_leap_year(year) + sDaysPerMonth[1]) - r4 |= 0x100; - } - else - { - if (day > sDaysPerMonth[month - 1]) - r4 |= 0x100; - } - day = bcd_to_hex(info->hour); - if (day > 24) - r4 |= 0x200; - day = bcd_to_hex(info->minute); - if (day > 60) - r4 |= 0x400; - day = bcd_to_hex(info->second); - if (day > 60) - r4 |= 0x800; - return r4; -} - -void rtc_reset(void) -{ - rtc_intr_disable(); - SiiRtcReset(); - rtc_intr_enable(); -} - -void rtc_sub_time_from_datetime(struct SiiRtcInfo * datetime, struct Time * dest, struct Time * timediff) -{ - u16 r4 = rtc_count_days_from_info(datetime); - dest->seconds = bcd_to_hex(datetime->second) - timediff->seconds; - dest->minutes = bcd_to_hex(datetime->minute) - timediff->minutes; - dest->hours = bcd_to_hex(datetime->hour) - timediff->hours; - dest->days = r4 - timediff->days; - if (dest->seconds < 0) - { - dest->seconds += 60; - dest->minutes--; - } - if (dest->minutes < 0) - { - dest->minutes += 60; - dest->hours--; - } - if (dest->hours < 0) - { - dest->hours += 24; - dest->days--; - } -} - -void rtc_sub_time_from_time(struct Time * dest, struct Time * diff, struct Time * src) -{ - dest->seconds = src->seconds - diff->seconds; - dest->minutes = src->minutes - diff->minutes; - dest->hours = src->hours - diff->hours; - dest->days = src->days - diff->days; - if (dest->seconds < 0) - { - dest->seconds += 60; - dest->minutes--; - } - if (dest->minutes < 0) - { - dest->minutes += 60; - dest->hours--; - } - if (dest->hours < 0) - { - dest->hours += 24; - dest->days--; - } -} - -bool32 rtc_maincb_is_rtc_working(void) -{ - rtc_probe_status(); - if (rtc_get_probe_status() & 0xFF0) - return FALSE; - return TRUE; -} - -void rtc_set_datetime(struct SiiRtcInfo * info) -{ - vu16 imeBak = REG_IME; - REG_IME = 0; - SiiRtcSetDateTime(info); - REG_IME = imeBak; -} - -bool32 rtc_maincb_is_time_since_last_berry_update_positive(u8 * a0) -{ - rtc_get_status_and_datetime(&sRtcInfoWork); - *a0 = bcd_to_hex(sRtcInfoWork.year); - rtc_sub_time_from_datetime(&sRtcInfoWork, &gRtcUTCTime, LocalTimeOffset); - rtc_sub_time_from_time(&gTimeSinceBerryUpdate, LastBerryTreeUpdate, &gRtcUTCTime); - if (gTimeSinceBerryUpdate.days * 1440 + gTimeSinceBerryUpdate.hours * 60 + gTimeSinceBerryUpdate.minutes >= 0) - return TRUE; - return FALSE; -} - -u32 hex_to_bcd(u8 a0) -{ - u32 r4; - if (a0 > 99) - return 0xFF; - r4 = Div(a0, 10) << 4; - r4 |= Mod(a0, 10); - return r4; -} - -void sii_rtc_inc(u8 * a0) -{ - *a0 = hex_to_bcd(bcd_to_hex(*a0) + 1); -} - -void sii_rtc_inc_month(struct SiiRtcInfo * a0) -{ - sii_rtc_inc(&a0->month); - if (bcd_to_hex(a0->month) > 12) - { - sii_rtc_inc(&a0->year); - a0->month = MONTH_JAN; - } -} - -void sii_rtc_inc_day(struct SiiRtcInfo * a0) -{ - sii_rtc_inc(&a0->day); - if (bcd_to_hex(a0->day) > sDaysPerMonth[bcd_to_hex(a0->month) - 1]) - { - if (!is_leap_year(bcd_to_hex(a0->year)) || bcd_to_hex(a0->month) != MONTH_FEB || bcd_to_hex(a0->day) != 29) - { - a0->day = 1; - sii_rtc_inc_month(a0); - } - } -} - -bool32 rtc_is_past_feb_28_2000(struct SiiRtcInfo * a0) -{ - if (bcd_to_hex(a0->year) == 0) - { - if (bcd_to_hex(a0->month) == MONTH_JAN) - return FALSE; - if (bcd_to_hex(a0->month) > MONTH_FEB) - return TRUE; - if (bcd_to_hex(a0->day) == 29) - return TRUE; - return FALSE; - } - if (bcd_to_hex(a0->year) == 1) - return TRUE; - return FALSE; -} - -void rtc_maincb_fix_date(void) -{ - rtc_get_status_and_datetime(&sRtcInfoWork); - if (bcd_to_hex(sRtcInfoWork.year) == 0 || bcd_to_hex(sRtcInfoWork.year) == 1) - { - if (bcd_to_hex(sRtcInfoWork.year) == 1) - { - sRtcInfoWork.year = 2; - sRtcInfoWork.month = MONTH_JAN; - sRtcInfoWork.day = 2; - rtc_set_datetime(&sRtcInfoWork); - } - else - { - if (rtc_is_past_feb_28_2000(&sRtcInfoWork) == TRUE) - { - sii_rtc_inc_day(&sRtcInfoWork); - sii_rtc_inc(&sRtcInfoWork.year); - } - else - { - sii_rtc_inc(&sRtcInfoWork.year); - } - rtc_set_datetime(&sRtcInfoWork); - } - } -} diff --git a/berry_fix/payload/src/siirtc.c b/berry_fix/payload/src/siirtc.c deleted file mode 100644 index 965a068f13..0000000000 --- a/berry_fix/payload/src/siirtc.c +++ /dev/null @@ -1,432 +0,0 @@ -// Ruby/Sapphire/Emerald cartridges contain a Seiko Instruments Inc. (SII) -// S-3511A real-time clock (RTC). This library ("SIIRTC_V001") is for -// communicating with the RTC. - -#include "gba/gba.h" -#include "siirtc.h" - -#define STATUS_INTFE 0x02 // frequency interrupt enable -#define STATUS_INTME 0x08 // per-minute interrupt enable -#define STATUS_INTAE 0x20 // alarm interrupt enable -#define STATUS_24HOUR 0x40 // 0: 12-hour mode, 1: 24-hour mode -#define STATUS_POWER 0x80 // power on or power failure occurred - -#define TEST_MODE 0x80 // flag in the "second" byte - -#define ALARM_AM 0x00 -#define ALARM_PM 0x80 - -#define OFFSET_YEAR offsetof(struct SiiRtcInfo, year) -#define OFFSET_MONTH offsetof(struct SiiRtcInfo, month) -#define OFFSET_DAY offsetof(struct SiiRtcInfo, day) -#define OFFSET_DAY_OF_WEEK offsetof(struct SiiRtcInfo, dayOfWeek) -#define OFFSET_HOUR offsetof(struct SiiRtcInfo, hour) -#define OFFSET_MINUTE offsetof(struct SiiRtcInfo, minute) -#define OFFSET_SECOND offsetof(struct SiiRtcInfo, second) -#define OFFSET_STATUS offsetof(struct SiiRtcInfo, status) -#define OFFSET_ALARM_HOUR offsetof(struct SiiRtcInfo, alarmHour) -#define OFFSET_ALARM_MINUTE offsetof(struct SiiRtcInfo, alarmMinute) - -#define INFO_BUF(info, index) (*((u8 *)(info) + (index))) - -#define DATETIME_BUF(info, index) INFO_BUF(info, OFFSET_YEAR + index) -#define DATETIME_BUF_LEN (OFFSET_SECOND - OFFSET_YEAR + 1) - -#define TIME_BUF(info, index) INFO_BUF(info, OFFSET_HOUR + index) -#define TIME_BUF_LEN (OFFSET_SECOND - OFFSET_HOUR + 1) - -#define WR 0 // command for writing data -#define RD 1 // command for reading data - -#define CMD(n) (0x60 | (n << 1)) - -#define CMD_RESET CMD(0) -#define CMD_STATUS CMD(1) -#define CMD_DATETIME CMD(2) -#define CMD_TIME CMD(3) -#define CMD_ALARM CMD(4) - -#define GPIO_PORT_DATA (*(vu16 *)0x80000C4) -#define GPIO_PORT_DIRECTION (*(vu16 *)0x80000C6) -#define GPIO_PORT_READ_ENABLE (*(vu16 *)0x80000C8) - -extern vu16 GPIOPortDirection; - -static u16 sDummy; // unused variable -static bool8 sLocked; - -static int WriteCommand(u8 value); -static int WriteData(u8 value); -static u8 ReadData(); -static void EnableGpioPortRead(); -static void DisableGpioPortRead(); - -static const char AgbLibRtcVersion[] = "SIIRTC_V001"; - -void SiiRtcUnprotect() -{ - EnableGpioPortRead(); - sLocked = FALSE; -} - -void SiiRtcProtect() -{ - DisableGpioPortRead(); - sLocked = TRUE; -} - -u8 SiiRtcProbe() -{ - u8 errorCode; - struct SiiRtcInfo rtc; - - if (!SiiRtcGetStatus(&rtc)) - return 0; - - errorCode = 0; - - if ((rtc.status & (SIIRTCINFO_POWER | SIIRTCINFO_24HOUR)) == SIIRTCINFO_POWER - || (rtc.status & (SIIRTCINFO_POWER | SIIRTCINFO_24HOUR)) == 0) - { - // The RTC is in 12-hour mode. Reset it and switch to 24-hour mode. - - // Note that the conditions are redundant and equivalent to simply - // "(rtc.status & SIIRTCINFO_24HOUR) == 0". It's possible that this - // was also intended to handle resetting the clock after power failure - // but a mistake was made. - - if (!SiiRtcReset()) - return 0; - - errorCode++; - } - - SiiRtcGetTime(&rtc); - - if (rtc.second & TEST_MODE) - { - // The RTC is in test mode. Reset it to leave test mode. - - if (!SiiRtcReset()) - return (errorCode << 4) & 0xF0; - - errorCode++; - } - - return (errorCode << 4) | 1; -} - -bool8 SiiRtcReset() -{ - u8 result; - struct SiiRtcInfo rtc; - - if (sLocked == TRUE) - return FALSE; - - sLocked = TRUE; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 5; - - GPIO_PORT_DIRECTION = 7; - - WriteCommand(CMD_RESET | WR); - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 1; - - sLocked = FALSE; - - rtc.status = SIIRTCINFO_24HOUR; - - result = SiiRtcSetStatus(&rtc); - - return result; -} - -bool8 SiiRtcGetStatus(struct SiiRtcInfo *rtc) -{ - u8 statusData; - - if (sLocked == TRUE) - return FALSE; - - sLocked = TRUE; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 5; - - GPIO_PORT_DIRECTION = 7; - - WriteCommand(CMD_STATUS | RD); - - GPIO_PORT_DIRECTION = 5; - - statusData = ReadData(); - - rtc->status = (statusData & (STATUS_POWER | STATUS_24HOUR)) - | ((statusData & STATUS_INTAE) >> 3) - | ((statusData & STATUS_INTME) >> 2) - | ((statusData & STATUS_INTFE) >> 1); - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 1; - - sLocked = FALSE; - - return TRUE; -} - -bool8 SiiRtcSetStatus(struct SiiRtcInfo *rtc) -{ - u8 statusData; - - if (sLocked == TRUE) - return FALSE; - - sLocked = TRUE; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 5; - - statusData = STATUS_24HOUR - | ((rtc->status & SIIRTCINFO_INTAE) << 3) - | ((rtc->status & SIIRTCINFO_INTME) << 2) - | ((rtc->status & SIIRTCINFO_INTFE) << 1); - - GPIO_PORT_DIRECTION = 7; - - WriteCommand(CMD_STATUS | WR); - - WriteData(statusData); - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 1; - - sLocked = FALSE; - - return TRUE; -} - -bool8 SiiRtcGetDateTime(struct SiiRtcInfo *rtc) -{ - u8 i; - - if (sLocked == TRUE) - return FALSE; - - sLocked = TRUE; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 5; - - GPIO_PORT_DIRECTION = 7; - - WriteCommand(CMD_DATETIME | RD); - - GPIO_PORT_DIRECTION = 5; - - for (i = 0; i < DATETIME_BUF_LEN; i++) - DATETIME_BUF(rtc, i) = ReadData(); - - INFO_BUF(rtc, OFFSET_HOUR) &= 0x7F; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 1; - - sLocked = FALSE; - - return TRUE; -} - -bool8 SiiRtcSetDateTime(struct SiiRtcInfo *rtc) -{ - u8 i; - - if (sLocked == TRUE) - return FALSE; - - sLocked = TRUE; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 5; - - GPIO_PORT_DIRECTION = 7; - - WriteCommand(CMD_DATETIME | WR); - - for (i = 0; i < DATETIME_BUF_LEN; i++) - WriteData(DATETIME_BUF(rtc, i)); - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 1; - - sLocked = FALSE; - - return TRUE; -} - -bool8 SiiRtcGetTime(struct SiiRtcInfo *rtc) -{ - u8 i; - - if (sLocked == TRUE) - return FALSE; - - sLocked = TRUE; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 5; - - GPIO_PORT_DIRECTION = 7; - - WriteCommand(CMD_TIME | RD); - - GPIO_PORT_DIRECTION = 5; - - for (i = 0; i < TIME_BUF_LEN; i++) - TIME_BUF(rtc, i) = ReadData(); - - INFO_BUF(rtc, OFFSET_HOUR) &= 0x7F; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 1; - - sLocked = FALSE; - - return TRUE; -} - -bool8 SiiRtcSetTime(struct SiiRtcInfo *rtc) -{ - u8 i; - - if (sLocked == TRUE) - return FALSE; - - sLocked = TRUE; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 5; - - GPIO_PORT_DIRECTION = 7; - - WriteCommand(CMD_TIME | WR); - - for (i = 0; i < TIME_BUF_LEN; i++) - WriteData(TIME_BUF(rtc, i)); - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 1; - - sLocked = FALSE; - - return TRUE; -} - -bool8 SiiRtcSetAlarm(struct SiiRtcInfo *rtc) -{ - u8 i; - u8 alarmData[2]; - - if (sLocked == TRUE) - return FALSE; - - sLocked = TRUE; - - // Decode BCD. - alarmData[0] = (rtc->alarmHour & 0xF) + 10 * ((rtc->alarmHour >> 4) & 0xF); - - // The AM/PM flag must be set correctly even in 24-hour mode. - - if (alarmData[0] < 12) - alarmData[0] = rtc->alarmHour | ALARM_AM; - else - alarmData[0] = rtc->alarmHour | ALARM_PM; - - alarmData[1] = rtc->alarmMinute; - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 5; - - GPIOPortDirection = 7; // Why is this the only instance that uses a symbol? - - WriteCommand(CMD_ALARM | WR); - - for (i = 0; i < 2; i++) - WriteData(alarmData[i]); - - GPIO_PORT_DATA = 1; - GPIO_PORT_DATA = 1; - - sLocked = FALSE; - - return TRUE; -} - -static int WriteCommand(u8 value) -{ - u8 i; - u8 temp; - - for (i = 0; i < 8; i++) - { - temp = ((value >> (7 - i)) & 1); - GPIO_PORT_DATA = (temp << 1) | 4; - GPIO_PORT_DATA = (temp << 1) | 4; - GPIO_PORT_DATA = (temp << 1) | 4; - GPIO_PORT_DATA = (temp << 1) | 5; - } - - // control reaches end of non-void function -} - -static int WriteData(u8 value) -{ - u8 i; - u8 temp; - - for (i = 0; i < 8; i++) - { - temp = ((value >> i) & 1); - GPIO_PORT_DATA = (temp << 1) | 4; - GPIO_PORT_DATA = (temp << 1) | 4; - GPIO_PORT_DATA = (temp << 1) | 4; - GPIO_PORT_DATA = (temp << 1) | 5; - } - - // control reaches end of non-void function -} - -static u8 ReadData() -{ - u8 i; - u8 temp; - u8 value; - - for (i = 0; i < 8; i++) - { - GPIO_PORT_DATA = 4; - GPIO_PORT_DATA = 4; - GPIO_PORT_DATA = 4; - GPIO_PORT_DATA = 4; - GPIO_PORT_DATA = 4; - GPIO_PORT_DATA = 5; - - temp = ((GPIO_PORT_DATA & 2) >> 1); - value = (value >> 1) | (temp << 7); // UB: accessing uninitialized var - } - - return value; -} - -static void EnableGpioPortRead() -{ - GPIO_PORT_READ_ENABLE = 1; -} - -static void DisableGpioPortRead() -{ - GPIO_PORT_READ_ENABLE = 0; -} diff --git a/berry_fix/payload/sym_bss.txt b/berry_fix/payload/sym_bss.txt deleted file mode 100644 index 3b1c62ae96..0000000000 --- a/berry_fix/payload/sym_bss.txt +++ /dev/null @@ -1,5 +0,0 @@ - .include "src/main.o" - .include "src/rtc.o" - .include "src/flash.o" - .include "src/agb_flash.o" - .include "src/siirtc.o" diff --git a/berry_fix/payload/sym_common.txt b/berry_fix/payload/sym_common.txt deleted file mode 100644 index 28b47f52e3..0000000000 --- a/berry_fix/payload/sym_common.txt +++ /dev/null @@ -1,29 +0,0 @@ - .include "main.o" - .include "rtc.o" - - .align 4 -gFirstSaveSector: @ 0x03001220 - .space 0x4 - -gPrevSaveCounter: @ 0x03001224 - .space 0x4 - -gLastKnownGoodSector: @ 0x03001228 - .space 0x4 - -gDamagedSaveSectors: @ 0x0300122C - .space 0x4 - -gSaveCounter: @ 0x03001230 - .space 0x4 - -gFastSaveSection: @ 0x03001234 - .space 0x4 - -gCurSaveChunk: - .space 0x4 - -gFlashIdentIsValid: @ 0x0300123C - .space 0x4 - - .include "agb_flash.o" diff --git a/berry_fix/payload/sym_ewram.txt b/berry_fix/payload/sym_ewram.txt deleted file mode 100644 index 2c61f5e7e5..0000000000 --- a/berry_fix/payload/sym_ewram.txt +++ /dev/null @@ -1,3 +0,0 @@ - .include "src/main.o" - .include "src/rtc.o" - .include "src/flash.o" diff --git a/berry_fix/rom.sha1 b/berry_fix/rom.sha1 deleted file mode 100644 index 145b083b2c..0000000000 --- a/berry_fix/rom.sha1 +++ /dev/null @@ -1 +0,0 @@ -2eb0a94a913bebfb4cb59ceb57f3f965da55ef6d berry_fix.gba diff --git a/data/ereader_link_data.s b/data/ereader_link_data.s deleted file mode 100644 index d3269ebfe0..0000000000 --- a/data/ereader_link_data.s +++ /dev/null @@ -1,6 +0,0 @@ - .section .rodata - - .align 2 -gEReaderLinkData_Start:: - .incbin "data/ereader_link_data.bin" -gEReaderLinkData_End:: diff --git a/data/mb_berry_fix.gba b/data/mb_berry_fix.gba new file mode 100755 index 0000000000000000000000000000000000000000..0afff07f5d2314e2bd35d99de518cbc114009b5e GIT binary patch literal 15348 zcmd_ReRva9`ak?RGkKZ3v^{AWnzm^(Nm^-nO&CUKjcb1}yk*JW@O)=ugKOKI zy=j{ae-~+>qGE7#{=eoQ_^EL9>A!cZ`?dF(zgHT%o|*S}r}dugL$S59?%np;3ybD& z-ZpxOfBt??=7B}L=Fjswiq=Bfo;a+|8R3^d>+RcowR2tMD>>)QC3|@?yXe&AS0<@@ zrt_usXg<_rx&E1@oewQ}Ou1p#S2;gyC^G)(9@jqx_4pqz|BT`aZ~k-ttLD4^Rs8>3 zvatLAe>(Sl+I>=n<@AuM8vjQ*{aRUK^;zmfOB*Y*?~_j;cIJYro*P!xbcn5||0;H# z1gcM8X1}?-*3+P@j&`2>nYH=#S{(`oaIIzr?=(yWbRc{S+EI16a#v~GG{seFe2M!?Y|Nrb4{V)V1 zgH48#cT$_%9XsQcOm>(=2L;dM2hhed>~~U}&54BxkWJ`6wP*m}3VsN@rkn}!B6zZ& z^}*fn#3_i_bjEGx;t*vd87-$CA|*Clo3>6^P9Ysg*NCf6`3X$#W2R-4lvK+h$tsyN zFwxNH1heH-LdXM?F_fBMvYgU~Qeo1BQs2OGBAEotcpLl0lLGc|v@s3=8_!U5NEB?a z?O7tH)MGF+m{l%Bvc&Ro@J*4Xy3Ex`$gHS{WJ(DfBAJy$w95{ZqyD*EQ%?rU9YL;6 zs9TLRmbq-TX|!(x!k@r5V{|imH3F=fWboc+EMyfM zJ~&Q@&S3K9X}g{cuSs8FarhzWX6h@`n*=zTOGG(MrudM2h#6jjF&Y*5Yq3NYRUVFH zU2>wm9>^8ClX-hRB_)DP3b}l05eIt2!gj60>;OEQij7Bpvg4#3^@jSUVvuf#e4G?w zQ}M4yiRk^1avutGO}n<7M}2}%je)F1==zCV>(*@ zPBFqchWaO1yKj+0L9X6g_W9Z7C=U_VrnOM5V0XYA36E|j#QnKR$4?ZPDks+sQ0yJES`EV7U-bQ&!y%b zt?NsnM;*|{R9(Cc^L8`oS{~4e-mhtUV;eLMvCfo><9I7Bg9IfzQ1@7%h$mca9rzEy ze*(T6y#G7!It}5X;A`u_&jT-lp8#Hx*}RBQ4i3Q-6zYgqh-lu)#dm9Yj}U=AC`8nO zHr2)zX|VJ`EY(O$%K&yxGdcGL7Thu-@e5H&`4F9}p!*7P%eph-fb#QIlAGEs`7jqs z?GSW8;-#~70Vw?GDL{1#(C(=gdts=gWf;HJtpdJ93pK6Z=#>v3v=b20doa)K#t?Q;4>}A@M6}W*nu>Nn$0f$b@W+tku}X%qjN zboxYtE>TLfe$gC2&O=$iILnE&V4YpVwz*m4wCX_q-__&<(%)0(pf->jFz%P{qFFM3 z^#l!S9OPgmR~%1M2Ya{)2JU!~LmhahbFyCwc<1Iigb$w&%u&QOcWdvuYXaBb4xPhW zuMVtJiPkY*H$E{66B<;FBU_i9SjrU4N|noAp6jS^;pSIVvejJjEZ}W7&VraLLmddI zM0s}@MEPu3H&cwVni@5`K1n2^L~?cA1TI^0Tp%|&z$>t6kc(~(HtkGKbU-N{q}m`i z$Oi@4>kiWIEG8!W@HQ& zJW1QxdfcT^MF&y1vm@$&No`IYoHIgGT}V|&np2f0Fi{;iDUHqFu6Nikuaqq($y}-U zZ(OPK~trq#8&lRa~7}kO8!-14~AT zQmGwQ2bPT#E>Uy~l9L>xNY1GdE=NPN&2OOU_L2OR8Y#VKMIB6$5z<#Lr4L4PnHX;w z+0ATW)Z2vY^c&=WjD<{?-6jo`oy-l7$Q^`uBM7`ifC3!JbDsK#mLflG|-BrtVc7w!`YclbmPIi25iQO(f*a zJ#hb$-yxu%>1whtrRs9YL@|zNw`Deo@_p8nxv5WCxpNwI;PVlY3?CjwZj{clREQ3L z9<1}!q?uH2k;cIEvZXP~_|4yiT4BhBU*D~X@1}WKaN5r!PRj1J(e^}Fqsi5nh+v+E zwKgEn-9ru8nqm8s#vaZRU9=?1nJ_+4P0?3cmc2$3_6WT?)?#h;Xkn4c%%c8Qm5-LE z%&qRH6KT74W(m>ziIR1h3uA*#jObB$1KG*z>={sWq|Dp$;dSS2H&2CPC@Eg$P4Zl} zOg>hyJY=1g>yfPG(HZxQ!`x9DZ2jhLTs{FVcT_i5&IM)5W?NiUffv_W4`+)G4XiyX zA`a*@iJEcFOUHHCL^J57)XI6=PKp!7xs+|_L#o|2m2_(x$lTCVnsQnd|IKo*HMGpz zF6aCL4P1FLEhpu&u|%E@KC!$Lu7et)Ja@&+l_vy=@-&<6)v(Cfx52I5xSG3S2!7{I z)*ckR^0+`kS_L%orwD`_HxZlS(1py<3-+c73XqO zWTT6(Ag(PEeXuUAH~A@A2&;oyn?8WmC|UJRj7Ht476-Zs`6d4l%~0C?N!ZMpbwPbX z9`xm_ixax3W7*Wv4JqR%qGS?AJ6dGR{!ziyS-DLD!zlXMlj_V7!g+J$+@?g0e+Nc# zWin|}ge=WTuA+X|ptnB({gQdijY7AYqYuVSufZ?s>x4+IkQkY^HIf{H=y{^@koHwIZ)AL*U65`&tP|y(}-jCdNHjEqZyL& zjE8PpvFXU-fQ73&XrC8Q5+)0;NYl0@c1ag` zYw&n-xoD3h8_#7P5RRO*|0K&BHx*wxn(JViZR7A&V{nmO@W@4m7!)c#6?*J~>yW&P zK9;;plbE*RiRg%Cv+i)(*Lz2ZxLBk6nws7pQA_!#(4H7f;yZ=&J-*FMyoTt_&Aj3pY9ZK{y% zw)^t42I)5Ux7k7vw_au{Uytg!cUtaMRpqA7FZ3SiRfjJ0zTLZ~$%X7Ay-4Gtg{w-R zc)NG@<7w{Rs)IDGBA}TXLG}be*A{rO_@p82ru0BjT5^^5#uwcu)1KyRUtV#atXR*@ zO>9kcXDh zdWY!RT!^h2a~;*5Sg~0on>A*$P-zY(V4Y;=a_cj4uD&ETT6$b#bp~;j6{|)yPNWAe zSVq$g)I&FrVOx%Ow5&leH)42johNz9t8}wf*{qz!GL2bER5qK9<;Ebt8c*f8iBcnO zOl*v7{A`Hf(|Gq&FN8Mi8B#X1ZD3lT7lRspkEVQWvHn^9*2MU8Q@mWs9oJP;(UA|6 zb}-lRNodB6RZW3x?xsk)26{7cT(f^llT$v(uY=Nb*_&OLrSBn48Ot5z(8}JrgD4K* z3H#P2DC;iEDQZDoYA|Fcs7oy;lN*aii9Mr`fTrh*EzHSqw>Ig%J>r4GJTt9syLal>&g?XJE#hm#LkoO2FO-YL)B)7Z8;z?^$7&=|mV z(5a44m2>-4w2!}heVvphZb~a}EY9fBkQ{quH#T*`7%FXS%G#2P4>-;|wa!}kDN>t- zVndIG--$XI0dCqsd#=NvX=;*mB{v0+90$ga>Nb|EE@0!M#nv9;&cf5Q_`tJ=Y0P@B zTI$n0=)tDQW=CSz*u%7?ckuc;yVx?vF14g~wtO?_ZApGB(n7_SMx_NU-DpWk={BI{ zQL=)#B1y{Tw#_a)&m67EJtS|eZn;zpxs2-x29PId_}4JT+S6DjSrRXk{PFFBvM`y;N20MXyVF?8K@QVjNJ*|j673M zF^?I{{5%snujOWTmP>7SX^-sP67y1bpb^!LOYNZY%4A&%cne16WNTsqna(P-~W~xC0H`9Xa&5sxBju6Y|$@V(mQEKKc z58~k&hf+>UykiD28{G~bZ*s>4jf>xyI9C(5>q>`NSD8C!{W* z4s4-=t|pDsEiY{3ighO-YVpCoED6Zkz#mN<_-#gGaa&d;$+dRVDGxuMdZSBPsC9lz zt3H~n64R!X`#v9clH_ifqKVTPv?p}wOD zxtF;fb2(A=Yu?eo92XhCqkObFuS`>-5AHyTeoRFz$`lv`RBHC4(()EzS5vCIRf6cS zw9PL;yMAVn+JtVe%k~u4GlmapRz)3|6B5Ttoi?BAG)d(1tj9V{2hf3fncYQpr`>iZ zjTkKPacvmuWsJf@n%B}uXVUq3d*%gZ1xf>A^j-R1X0RB^u+M=|mu%0l2Q$hwJB2sl z2_j&U)5_(526anh`)qsgaUo!+7ldD$Bm#%GNhtBkDa;9urUWU*b10w;h_^E4h`HyX zrig4tBq=y2K9pMxZUCG$K?OO6mnyV~RwZ%wNd-!%g;k@UUgi|K^B%BENx5 zA|#(o+f+Q*6W$M{y|pdDG0Fj_gV#9BNfn??NkKv4U9Aag<@#^$+Ws8yd4Ld(<)!ri)$VS<)r0a7^Tod>a25*={{D#@F6 z$)4}HUNb`%RmC<%+(JvdJY&sFjv90&{UW0)tvyJZ+NEo*B;Ce z=dAIzcjAz8KsoR>JrKC|&0og;yof_N5IsO1d_r=q77whquWri4#|e{EX-O(AiHe&? zIchm=Nn+~;Ds6zc;XwiIraPtf=oXE*CFv1{Q$sDxvTPPN^FJH5>W&v+bJvK}Hh){( zyE&mn_cN~J;!&A@R+q?4pvR1p$~i-=?dR=@8#r?c#wh&HdFB;WD&ZU$^K%a^|G8}D z*z*aF)OeXiE-PM(GTzJjAEqc3?sV2h{t zTD_is!b1|@EH)XtMNvp_oRFq{FH6%7GrsWe!;&{(&)%}?>*hAwERxq`o1HJ&theHE zQj#a9Fintcj#?{g-RWXf)~+{4)1!1B^rPPF9!@MDwTMR@FRE@RZ_8vk%y~`u5EAx1{&B#ch0Ol#7n zl@lqA%bI}7y(*@?yEvC^e%z+&> zI%>d21RtfG8E(l+Fehv~+`L^*o+`C~wi{>eaJ!=+gUiNRa`ncjsISc2Ktw2CGmKWy z)zgx6!^f_d))wouM@hLP-fL+Qo4F61s`CMipVTu`^uPJx)s)BR(XOEy19|J(-=eql zL0za$kg4{){9TEo9On4OW%F(C=!d{9I5(bm`Vv#J8mu2LUy+=7k-&J#HDYKE|9NFy{t?YCQ4k}2T!-7mX*C=&&Tdz6#>RAeeqNb445Wt%N6CvO19NFqT*xT`RsdA7JoU)E49u zQ+xBFbgr#gIV2t`6Gvwq6A!VACq2dNOy*Rf?lZ=J?KV1kG`PO*=t}Q;t3&$&^Oq%R zD#6xQkV>S~TVNqKbGgw3mwqwP^H+*WGA%bl30?8NX1v@kzozpa?%poPw+F@TXP6zH z!n!w#+l}I~z)~#x;<8@)Ait0B^}0OW@szE4tc8+I+Zk1vb9 zsXsod%S2NR*Vi@K^L=fX+uoXX`mA?L{>9K14N8=j_U@L-zRJeRJJ2%vWaT`LRNA^K z|AI~VmBxvgv}@K6eX|zLQr=PC`Db5MU)74L+b!x~^IQ7skEixk_)r4O_D)=aH4KA2Q^uFlFmm~OB-lGf}`fnyt5?6+XO-Okl- zI^dl~>P=~RNyofpA*bQNkn8sr>1b%Foc)C|gJu@LBH4n{jsB=nJTB~TO%YsE>d2J* z#wlcao|c@+f67%zgTy7jRJ`u)!JadHg&Pa`lEW!&?Tw_62)re#S?Pe=2(7Um`Y|}} zi+|w2G)H>v^8nSYfsI`e&tEdeni(2YBSMNv+QWk-5Z!|g5HG;)lAtaA}-|@lgsT%~k z;u|t~&wE=x>oLxyYu+F2RL_znv9ZeoxohO2HJ`%cwRYhp*@_vR0f8}06uccgV}P#F zO$^^L#!32*X{!x^pAS9)zK&Hz8FB7G-a^Jwe;F*M?~->JMT9S1^QV_A2|N+8aBoVM z&m$IIvb-3`T!0J%={6XSpS?X1ck>@~FY!8)8a_`Dkha9@L&6hcLbn)3!b}$S`4Hn| zx|4o55V#gNQI-rs#77`N-u!Mh+AYo_>`0ID@&Elkd+kg5nDo$1%0cDevCu(p7bkYH zaD;z`SX_aF=puxBL*i0TKk6OF~tZWwTH0Sf^USSc(Zl!SPYUNKb! zMfFN>Qc0RY)1)P$Nt9KZEoRU(k%S7pGrU!jNsar&DN$!+zvPrE#TN0X8ks45-&xr0 z>$FOP^sL{xm`Hlp3cw-hv*Mk4#R@RaxmjR?X>Q^;Iq6m0{JdA+yj@Cqk4xbsbAoff zH>vx`GhTh@l$6vbB@zBLZxUrcMJZ{blms8ob?bq<;Z_^g()M{bK%-uNo9;+u083L= z)l7V8NivrG;GMO2=Pdds?$sMjE7;xAABmc$*u(^%r1hzCVymbhiYBs|BT15MYz5z} zRSYbq*3_ogvOOmHIO3egC*GAPut=g_^A7`za>72CnX8}3rZdUim<+IcNr4Tcz%w!0 ziG#(DC&-{aV+mS>7|?|EcpTUOJb@=c|A?nZJ~rZMU=#2Ro&}!6W`v%P z`j`vmOG7${ltG@!L{=mtF4NaSzAbnGEv(NM@e*EULd-PEi4qIX7`pX|l5d*9FMAIe zh}hR5{;Q$SdqF%yjq+7WTNA6D$D_nsq9`SlJkvq7TxXorbU4X_F4miyQFqzka==)J z(b`?iHew9MYR%)>u?d(6FY*CWfI>_HCa+y2mv(S5pcPwzSAcDJ6|VuW1KaTi-ef23 zz)t)LZ?V#!u?ub3%}#$C@38P5+7%zT-(ZS>B1~nZ{50SO+-Smd_~6aaNqk7#iZ;D2 za_7wTr;SjZbirj&$ea$wUy@m5HmM>Z4M;Va zqv>PkkXka2+(hQH(#_-+vVh>XAh(i*Bn%P(Swt2SEFrg1vXnfHhR?|t1b-(uOuAWM z6GuRfl7Emd3Gfy9nj9m?S?L?{E%}a|V4C22(o5n5CkZ)4PLm%%&QRar;)V;7kCJ;D zI?)9I`>0iJv_&3f&WGZI6%B{dXtnYjA2i%AI zS?K}h%(58TgCMJP+{1VT{g2804O|~^0sX+QjIYEc41i^S;4-e@D)d7J3}eLFJ9x7z zHhr+c|0F+hPaB-C{5o*=6JCAsiGjuEp2_ibmPi-HTjY-$ZYOtu)R8+uen+s3+(qsN z`MpS%8;4ea+(U3L`2)ERDbyp1%;fFM4CrGUe_T|T`#8) z5Ocp6@4t%g8n`ka}trb*!gbaA=xB{m9Aq!&Rl{#kTHx$9|tlXWCEE;L@!C%&EU->g2`U; zo5%vT`eLM&U@LhAWE**v;5CBR$#(JvVakQnzXhkQtwL$(*BgLINEkbNNg$=?V*CZB*DAfFO)kbLGNhsf7|cF9-f?7z_X z*(QC#rF*kG21L^2quR3_LPO$k12xEG$$l{v`4QiRo5k`1ePLh2d!diD15do}vxZbk zUvba^rR3S**=?8pqLloglnk7e5+lB}RIrq!0`T`V6N?3H#BFpJ6cnV>YeN8N{ z$y#V(c?Q-3oEMjN7NREK-TbO%={Ryo*w>6K#oxR^$=nL(g;-zssPYHk>3r{VR#%_s z>wBQBzoWl{g}IdB)eSrp8=me^tllpRLpGDzSNJMJd|BjEIMwbfCD!M}1?PpA`+faB z(w8@)BzMkWc1DedL#xCFD|h(UaP!|h*wbcI73&Y=h%F^01cq3DRWI(n)J*TW#I$MO zXhpu~k|jnplq$W{&#po`_HoVug={=TJYm!*y<2@smnyV6l`Kn|#ph;=Q&kGCp1QjgS7L@mB}xCFSkw(kv@d`)B(k|cpE}|{N7saSInlQ^!6&@=CO>?4J(~WM;l?` zz=6qK1>73$(P5k7yoj4s$S*6sPdk-f6n2ift-;>FX9m)Igedrg{Ul)8R zf)tu(3!l0ZFpfnNJ#I@O@>`t?^dt6V2hHQE9)O6cl1^-V7^Y_?yNq!)g}OF?Vp!kXvMC9%9rUx?Qzsd^bL2 z{u3U~x{BxMk65TucC5CCEISn9#b4G~Z|&{xn7IvwoQ)}#AG;V@@C~EWaRKxnA$_N8 z-X`ljy{=A}3U|XtrzB6A8#_hfK92{#2^m-6Z6|HOOC6%XyDu!{?{{KYHvFYiO+0_f z*@xa=doR3v+UF&t-#6H(GIT9Xq+hx{t6Wf#*-v?Kd!a@n^S@ng#UKCX22{7SIQ)kg z_HujO7}wPxC#HS_zMzBc3=j8Gr_;aLinEgbLRgiUk(9Vg&U%(+=*{bI*d2~@ERD`t z5GhD5fW@lri}aiOvts?R!jJjxkkCmBrIn@w{QmEaYgVGxeE#~}=P$2!r0d494qg%1UcHogv`? z`;Isn6aL+D_)BX`tH;*b(B|_eyyeG!7?LW>z*kqJ&0k{}OEdl~GGA+=1-*GQm>Q}6 ze$2yd9SoJqN#{a5pPKc~Bw~3D7Iuai2K_K`hNw4HjkKm%nz^5G zi^vl!ExSk#jU5U}rJ5+R%8=EMwlI~*_t3*uYg~@3j#ex#P0sNB`GQkUnTW4c$L(wY ziuCddM-`31d6Rehc`+737dO487@=1gR^?hmTMY$YR+CawU2mgrJFEF;7yD{zP`x*@ zunY@#qgQ&EUPp-y(`s$4vp4zxsfO%5`HFg2bG}c-V)D@=1i$ZzRez+Cf6CmCx%{Ki zJLp_AFKP7+VGEDd-tdL66y`9h#{UubBZKGPceO5JCzZi6<`1_0D&GoRZ(*6EewO=u zGVZi?B>uz>j;hU4)HYO|Gwe0YePauL<7mT;>|Pp~!_)!3^t)uah`sn!O9 zSjrE5F{+NBkr4&^ri+W>7ThFe&^%CDpaz1PAM4_Mi5(}%<&V@=0NaB_*dYyD=@ojCxiZbqz zHgx8zrKNrn7e(Jf$Ji=ut)7>JH>e_0k zttH7}JhB+!&PRIBp9<&W>#JVgd6=7y(<-^&#!xEss%{pEcSo2WroBgpau~!;A5nU@ z`7F2vKk~j$oCNpR>;hjZ>6t(lb;hixQ*d^=zeX$AMsQ}4LJq6n2sm+K#|g^s*@GR< z6B(9fen>OBm86Z<&Y6D|#y-XO{3iQZD2ok`8LjF#Ql&Uwn1+b1O4hCIE>@M~=n0rd zDZMYWFfU%QjhQwS;=lea&W)++bGC&Gs9QDao_ugmUlw|n#Ty_S=RggeR@|*SnfYoH zGY=~y%EgA1-n|R-s|n&ArqKoYDqD(5e>1OibZTbyh1$NB$--M< zZFPEx>$_MobDYh-sE;x6u2-`mqX3$UaO&9E`a4IoX z`Axw(%qi__Ff3-Fd&gNayDmf7yB}f2>gvCH69Zy%A5guIFx&X)DrSoBdx?!fP7tq3 zd_R2MVMT4ev&_~P-iLDy&U}`7BZ#rAr%+t|jYEhkj$ehv_n0oB!%KLNr_jPI*I@5^ zv8$Iz_*35{$uL=`MPTXWn40=t01X4a&fuWjhM3ZE^SxI@9`yEsdks#=up-myb9n~1 z*p6JK_cQ$Iee|jWz0Y?jBjX->2?r|mx8tG7j~k~ezAM7FQH)%Xoaz7m`9ipBXFNH) zF_XM>N)@JuG2~OOmwClmKE(fWwGVZDu?1YmT&IfxmHaI$degqqA7eI)ZAJnmb2xmo zm-!STKYTUpvTADBxE{T5v_SKbplar`)ZuSCeieN?h5O$LUsd7=$&u5FE7D7tSywXE z3;Hjg&wOdzUd$)alZRDJ(iM^H0hAJSnm?9!kGl}={KEd6xy;b%O0o_W6ix^L{AgD1 zV%R}UU9kkNw8V8ahU!!%hu30Pe*>hNA=4q-)5Mh zfSk`tXMMw8cyYy4QReMZtgs=0S* zJlnT@PA6Z;)FyW)SBpm;VNhkbbr*dJlE_sF(g;VX57zg*Grml!ex4~~_f_%^{VVdf zVs>}TQ;3=FL$~LTez;4D>D{8p7oN8=*Wb&+{-Nt&@kueVZ>5L8KKV$ErL}NcYHE!;D_8*U`M<6)9olDfziym&QEqhyE=tL@rX9bzIH~qG7n3xPmDZNj z+<$Q-L(0utRh00U$l|8w%O0+V)EWjxW#vv7R|~w>U~6Lx~ z&~mi3mf?>G-6;CI9EOI zp9U8fW{ilQ{H_#PZOjB%YLfn};tI!}r&!(-v-UIZB6fOsU%225s(-|b?ga&5ri)MP z+`Y&KA!d_e#$O*XpM(;dy}wZMm%&!byVR2n5FE{fB^huFvv9lR%kv?9SC;>2{r+S9 z9f_Z6ULt(!-0zo9aSA^|4AbQ}e?EdTO-AdI>fODlakA%yoJpmy*=qOua6iFHa+>$s z%4$(viW6)tWt%z6W*5D!+(X zKg~XIFI`kia9vbQe)mI`HsWXAFrWQ>7h+{)UthiRm!F%BU4M~Az2oxu;CAaz zq#6c%j7!z`UH5T^83P4)_*37s$5HM>I3r`Y9y4O&B)+v%k9!5lHCn5(E!)<+{$<8V z;N^o2$iiLQaZ9YgFkDbbkQ=$KsdpvYo-xz;F+N%Kz}n2;P?+D=fG%J6Ucb-kVnJcv z?IL3;5PPhb#eJS{VEXWrtg3IqQ}J}{e4F?}LkEo03-oHY`T|})=X+$Q^3i#5VToZ} zmWyO%V8N;|GhT)(vhhY^xxrbqID|m6I%NDE#-UBMbZ{-ERGOWJ zhHstfs_#W!bMWQwVv6Q)S4>D??-?gx3D>K3| z^+X19L3wRYet4?x{-{x*3RSOt{LlCQmWuebD}Z>JvO|(Wn#tVH6z{dV|Ib&0u>&TR zY82Oh5BmSTi{bxn%FVVX}*GIZnd) zw}4-lMYvYX71=o1LjWwc5fSM<#?J}%85kciQJEN-NI}=or@Hka)BW?67NtdAb^`{K jWrXp`R$y*0h&eSS;dx$fei5!G%N1T>ZW((Z5BR?TL@#y7 literal 0 HcmV?d00001 diff --git a/data/pokemon_colosseum.mb b/data/mb_colosseum.gba similarity index 100% rename from data/pokemon_colosseum.mb rename to data/mb_colosseum.gba diff --git a/data/ereader_link_data.bin b/data/mb_ereader.gba similarity index 100% rename from data/ereader_link_data.bin rename to data/mb_ereader.gba diff --git a/data/multiboot_berry_glitch_fix.s b/data/multiboot_berry_glitch_fix.s index 7d65c0d4de..d0d54d5502 100644 --- a/data/multiboot_berry_glitch_fix.s +++ b/data/multiboot_berry_glitch_fix.s @@ -1,5 +1,5 @@ .section .rodata gMultiBootProgram_BerryGlitchFix_Start:: - .incbin "berry_fix/berry_fix.gba" + .incbin "data/mb_berry_fix.gba" gMultiBootProgram_BerryGlitchFix_End:: diff --git a/data/multiboot_ereader.s b/data/multiboot_ereader.s new file mode 100644 index 0000000000..ab97f72799 --- /dev/null +++ b/data/multiboot_ereader.s @@ -0,0 +1,6 @@ + .section .rodata + + .align 2 +gMultiBootProgram_EReader_Start:: + .incbin "data/mb_ereader.gba" +gMultiBootProgram_EReader_End:: diff --git a/data/multiboot_pokemon_colosseum.s b/data/multiboot_pokemon_colosseum.s index 179f8a0671..a5f894908a 100644 --- a/data/multiboot_pokemon_colosseum.s +++ b/data/multiboot_pokemon_colosseum.s @@ -1,5 +1,5 @@ .section .rodata gMultiBootProgram_PokemonColosseum_Start:: - .incbin "data/pokemon_colosseum.mb" + .incbin "data/mb_colosseum.gba" gMultiBootProgram_PokemonColosseum_End:: diff --git a/ld_script.txt b/ld_script.txt index 61f61ab863..d68498a8ba 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -1251,10 +1251,10 @@ SECTIONS { src/libisagbprn.o(.rodata); } =0 - other_data : + multiboot_data : ALIGN(4) { - data/ereader_link_data.o(.rodata); + data/multiboot_ereader.o(.rodata); data/multiboot_berry_glitch_fix.o(.rodata); data/multiboot_pokemon_colosseum.o(.rodata); } =0 diff --git a/ld_script_modern.txt b/ld_script_modern.txt index ac62abe276..092ff26c63 100644 --- a/ld_script_modern.txt +++ b/ld_script_modern.txt @@ -111,10 +111,10 @@ SECTIONS { src/libisagbprn.o(.rodata); } =0 - other_data : + multiboot_data : ALIGN(4) { - data/ereader_link_data.o(.rodata); + data/multiboot_ereader.o(.rodata); data/multiboot_berry_glitch_fix.o(.rodata); data/multiboot_pokemon_colosseum.o(.rodata); } =0 diff --git a/src/ereader_screen.c b/src/ereader_screen.c index f98a0247d3..a22b85babd 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -41,8 +41,8 @@ static void Task_EReader(u8); struct EReaderData gEReaderData; -extern const u8 gEReaderLinkData_Start[]; -extern const u8 gEReaderLinkData_End[]; +extern const u8 gMultiBootProgram_EReader_Start[]; +extern const u8 gMultiBootProgram_EReader_End[]; static void EReader_Load(struct EReaderData *eReader, int size, u32 *data) { @@ -397,8 +397,8 @@ static void Task_EReader(u8 taskId) break; case ER_STATE_CONNECTING: AddTextPrinterToWindow1(gJPText_Connecting); - // XXX: This (u32*) cast is discarding the const qualifier from gEReaderLinkData_Start - EReader_Load(&gEReaderData, gEReaderLinkData_End - gEReaderLinkData_Start, (u32*)gEReaderLinkData_Start); + // XXX: This (u32*) cast is discarding the const qualifier from gMultiBootProgram_EReader_Start + EReader_Load(&gEReaderData, gMultiBootProgram_EReader_End - gMultiBootProgram_EReader_Start, (u32*)gMultiBootProgram_EReader_Start); data->state = ER_STATE_TRANSFER; break; case ER_STATE_TRANSFER: From 998900bd1b8394edaeafe7c32debcda62cf06561 Mon Sep 17 00:00:00 2001 From: MCboy <16516292+atasro2@users.noreply.github.com> Date: Fri, 14 Jan 2022 13:37:27 +0330 Subject: [PATCH 347/417] Give sensical names to Unused_AdjustBgMosaic --- gflib/bg.c | 77 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/gflib/bg.c b/gflib/bg.c index c3a4be1d46..eb00fa7c79 100644 --- a/gflib/bg.c +++ b/gflib/bg.c @@ -776,75 +776,86 @@ void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dis SetBgAffineInternal(bg, srcCenterX, srcCenterY, dispCenterX, dispCenterY, scaleX, scaleY, rotationAngle); } -u8 Unused_AdjustBgMosaic(u8 a1, u8 a2) +enum { - u16 result = GetGpuReg(REG_OFFSET_MOSAIC); - s16 test1 = result & 0xF; - s16 test2 = (result >> 4) & 0xF; + MOSAIC_SET_HV, + MOSAIC_SET_H, + MOSAIC_ADD_H, + MOSAIC_SUB_H, + MOSAIC_SET_V, + MOSAIC_ADD_V, + MOSAIC_SUB_V, +}; - result &= 0xFF00; +u8 Unused_AdjustBgMosaic(u8 val, u8 mode) +{ + u16 mosaic = GetGpuReg(REG_OFFSET_MOSAIC); + s16 bgH = mosaic & 0xF; + s16 bgV = (mosaic >> 4) & 0xF; - switch (a2) + mosaic &= 0xFF00; // clear background mosaic sizes + + switch (mode) { - case 0: + case MOSAIC_SET_HV: default: - test1 = a1 & 0xF; - test2 = a1 >> 0x4; + bgH = val & 0xF; + bgV = val >> 0x4; break; - case 1: - test1 = a1 & 0xF; + case MOSAIC_SET_H: + bgH = val & 0xF; break; - case 2: - if ((test1 + a1) > 0xF) + case MOSAIC_ADD_H: + if ((bgH + val) > 0xF) { - test1 = 0xF; + bgH = 0xF; } else { - test1 += a1; + bgH += val; } break; - case 3: - if ((test1 - a1) < 0) + case MOSAIC_SUB_H: + if ((bgH - val) < 0) { - test1 = 0x0; + bgH = 0x0; } else { - test1 -= a1; + bgH -= val; } break; - case 4: - test2 = a1 & 0xF; + case MOSAIC_SET_V: + bgV = val & 0xF; break; - case 5: - if ((test2 + a1) > 0xF) + case MOSAIC_ADD_V: + if ((bgV + val) > 0xF) { - test2 = 0xF; + bgV = 0xF; } else { - test2 += a1; + bgV += val; } break; - case 6: - if ((test2 - a1) < 0) + case MOSAIC_SUB_V: + if ((bgV - val) < 0) { - test2 = 0x0; + bgV = 0x0; } else { - test2 -= a1; + bgV -= val; } break; } - result |= ((test2 << 0x4) & 0xF0); - result |= (test1 & 0xF); + mosaic |= ((bgV << 0x4) & 0xF0); + mosaic |= (bgH & 0xF); - SetGpuReg(REG_OFFSET_MOSAIC, result); + SetGpuReg(REG_OFFSET_MOSAIC, mosaic); - return result; + return mosaic; } void SetBgTilemapBuffer(u8 bg, void *tilemap) From 1a33187badc9e5530f75be99957bfea9daf3f2ff Mon Sep 17 00:00:00 2001 From: MCboy <16516292+atasro2@users.noreply.github.com> Date: Fri, 14 Jan 2022 13:48:46 +0330 Subject: [PATCH 348/417] Move enum to bg.h --- gflib/bg.c | 25 +++++++------------------ gflib/bg.h | 11 +++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gflib/bg.c b/gflib/bg.c index eb00fa7c79..c96bcbc233 100644 --- a/gflib/bg.c +++ b/gflib/bg.c @@ -776,17 +776,6 @@ void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dis SetBgAffineInternal(bg, srcCenterX, srcCenterY, dispCenterX, dispCenterY, scaleX, scaleY, rotationAngle); } -enum -{ - MOSAIC_SET_HV, - MOSAIC_SET_H, - MOSAIC_ADD_H, - MOSAIC_SUB_H, - MOSAIC_SET_V, - MOSAIC_ADD_V, - MOSAIC_SUB_V, -}; - u8 Unused_AdjustBgMosaic(u8 val, u8 mode) { u16 mosaic = GetGpuReg(REG_OFFSET_MOSAIC); @@ -797,15 +786,15 @@ u8 Unused_AdjustBgMosaic(u8 val, u8 mode) switch (mode) { - case MOSAIC_SET_HV: + case BG_MOSAIC_SET_HV: default: bgH = val & 0xF; bgV = val >> 0x4; break; - case MOSAIC_SET_H: + case BG_MOSAIC_SET_H: bgH = val & 0xF; break; - case MOSAIC_ADD_H: + case BG_MOSAIC_ADD_H: if ((bgH + val) > 0xF) { bgH = 0xF; @@ -815,7 +804,7 @@ u8 Unused_AdjustBgMosaic(u8 val, u8 mode) bgH += val; } break; - case MOSAIC_SUB_H: + case BG_MOSAIC_SUB_H: if ((bgH - val) < 0) { bgH = 0x0; @@ -825,10 +814,10 @@ u8 Unused_AdjustBgMosaic(u8 val, u8 mode) bgH -= val; } break; - case MOSAIC_SET_V: + case BG_MOSAIC_SET_V: bgV = val & 0xF; break; - case MOSAIC_ADD_V: + case BG_MOSAIC_ADD_V: if ((bgV + val) > 0xF) { bgV = 0xF; @@ -838,7 +827,7 @@ u8 Unused_AdjustBgMosaic(u8 val, u8 mode) bgV += val; } break; - case MOSAIC_SUB_V: + case BG_MOSAIC_SUB_V: if ((bgV - val) < 0) { bgV = 0x0; diff --git a/gflib/bg.h b/gflib/bg.h index 3a0bf3bf90..d8b5a54043 100644 --- a/gflib/bg.h +++ b/gflib/bg.h @@ -28,6 +28,17 @@ enum { BG_COORD_SUB, }; +// Modes for Unused_AdjustBgMosaic +enum { + BG_MOSAIC_SET_HV, + BG_MOSAIC_SET_H, + BG_MOSAIC_ADD_H, + BG_MOSAIC_SUB_H, + BG_MOSAIC_SET_V, + BG_MOSAIC_ADD_V, + BG_MOSAIC_SUB_V, +}; + struct BgTemplate { u16 bg:2; // 0x1, 0x2 -> 0x3 From 4dec9b83a3a0b424284dae02506d159931cc1408 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 14 Jan 2022 12:29:30 -0500 Subject: [PATCH 349/417] Move more graphics out of misc --- decompress.sh | 5 --- .../unused_beauty.png} | Bin .../black.pal} | 0 .../enter.pal} | 0 .../exit.pal} | 0 .../tilemap.bin} | Bin .../tiles.png} | Bin .../white.pal} | 0 .../put_away_cursor.png} | Bin .../diploma_hoenn.pal => diploma/hoenn.pal} | 0 .../national.pal} | 0 .../diploma_map.bin => diploma/tilemap.bin} | Bin .../{misc/diploma.png => diploma/tiles.png} | Bin .../palettes/deoxys_rock_1.pal} | 0 .../palettes/deoxys_rock_10.pal} | 0 .../palettes/deoxys_rock_11.pal} | 0 .../palettes/deoxys_rock_2.pal} | 0 .../palettes/deoxys_rock_3.pal} | 0 .../palettes/deoxys_rock_4.pal} | 0 .../palettes/deoxys_rock_5.pal} | 0 .../palettes/deoxys_rock_6.pal} | 0 .../palettes/deoxys_rock_7.pal} | 0 .../palettes/deoxys_rock_8.pal} | 0 .../palettes/deoxys_rock_9.pal} | 0 .../deoxys_rock_fragment_bottom_left.png | Bin .../deoxys_rock_fragment_bottom_right.png | Bin .../pics}/deoxys_rock_fragment_top_left.png | Bin .../pics}/deoxys_rock_fragment_top_right.png | Bin .../pics}/emotion_exclamation.png | Bin .../pics}/emotion_heart.png | Bin .../pics}/emotion_question.png | Bin .../pics/field_move_streaks.bin} | Bin .../pics}/field_move_streaks.png | Bin .../pics/field_move_streaks_indoors.bin} | Bin .../pics/field_move_streaks_indoors.png} | Bin .../pics}/hof_monitor_big.png | Bin .../pics}/hof_monitor_small.png | Bin .../pics}/pokeball_glow.png | Bin .../pics}/pokecenter_monitor/0.png | Bin .../pics}/pokecenter_monitor/1.png | Bin .../pics}/spotlight.png | Bin graphics/{misc => interface}/main_menu_bg.pal | 0 .../{misc => interface}/main_menu_text.pal | 0 .../option_menu_equals_sign.png | Bin .../{misc => interface}/option_menu_text.pal | 0 .../l1.png} | Bin .../l2.png} | Bin .../l3.png} | Bin .../l4.png} | Bin .../t1.png} | Bin .../t2.png} | Bin .../t3.png} | Bin .../t4.png} | Bin .../ereader.pal} | 0 graphics_file_rules.mk | 2 +- src/decoration.c | 2 +- src/diploma.c | 8 ++-- src/field_effect.c | 37 +++++++++--------- src/field_specials.c | 22 +++++------ src/fldeff_flash.c | 12 +++--- src/main_menu.c | 4 +- src/option_menu.c | 4 +- src/rotating_gate.c | 16 ++++---- src/trainer_hill.c | 2 +- src/trainer_see.c | 6 +-- 65 files changed, 58 insertions(+), 62 deletions(-) delete mode 100755 decompress.sh rename graphics/{unused/intro_birch_beauty.png => birch_speech/unused_beauty.png} (100%) rename graphics/{misc/cave_transition_black.pal => cave_transition/black.pal} (100%) rename graphics/{misc/cave_transition_enter.pal => cave_transition/enter.pal} (100%) rename graphics/{misc/cave_transition_exit.pal => cave_transition/exit.pal} (100%) rename graphics/{misc/cave_transition_map.bin => cave_transition/tilemap.bin} (100%) rename graphics/{misc/cave_transition.png => cave_transition/tiles.png} (100%) rename graphics/{misc/cave_transition_white.pal => cave_transition/white.pal} (100%) rename graphics/{misc/decoration_putting_away_cursor.png => decorations/put_away_cursor.png} (100%) rename graphics/{misc/diploma_hoenn.pal => diploma/hoenn.pal} (100%) rename graphics/{misc/diploma_national.pal => diploma/national.pal} (100%) rename graphics/{misc/diploma_map.bin => diploma/tilemap.bin} (100%) rename graphics/{misc/diploma.png => diploma/tiles.png} (100%) rename graphics/{misc/deoxys1.pal => field_effects/palettes/deoxys_rock_1.pal} (100%) rename graphics/{misc/deoxys10.pal => field_effects/palettes/deoxys_rock_10.pal} (100%) rename graphics/{misc/deoxys11.pal => field_effects/palettes/deoxys_rock_11.pal} (100%) rename graphics/{misc/deoxys2.pal => field_effects/palettes/deoxys_rock_2.pal} (100%) rename graphics/{misc/deoxys3.pal => field_effects/palettes/deoxys_rock_3.pal} (100%) rename graphics/{misc/deoxys4.pal => field_effects/palettes/deoxys_rock_4.pal} (100%) rename graphics/{misc/deoxys5.pal => field_effects/palettes/deoxys_rock_5.pal} (100%) rename graphics/{misc/deoxys6.pal => field_effects/palettes/deoxys_rock_6.pal} (100%) rename graphics/{misc/deoxys7.pal => field_effects/palettes/deoxys_rock_7.pal} (100%) rename graphics/{misc/deoxys8.pal => field_effects/palettes/deoxys_rock_8.pal} (100%) rename graphics/{misc/deoxys9.pal => field_effects/palettes/deoxys_rock_9.pal} (100%) rename graphics/{misc => field_effects/pics}/deoxys_rock_fragment_bottom_left.png (100%) rename graphics/{misc => field_effects/pics}/deoxys_rock_fragment_bottom_right.png (100%) rename graphics/{misc => field_effects/pics}/deoxys_rock_fragment_top_left.png (100%) rename graphics/{misc => field_effects/pics}/deoxys_rock_fragment_top_right.png (100%) rename graphics/{misc => field_effects/pics}/emotion_exclamation.png (100%) rename graphics/{misc => field_effects/pics}/emotion_heart.png (100%) rename graphics/{misc => field_effects/pics}/emotion_question.png (100%) rename graphics/{misc/field_move_streaks_map.bin => field_effects/pics/field_move_streaks.bin} (100%) rename graphics/{misc => field_effects/pics}/field_move_streaks.png (100%) rename graphics/{misc/darkness_field_move_streaks_map.bin => field_effects/pics/field_move_streaks_indoors.bin} (100%) rename graphics/{misc/darkness_field_move_streaks.png => field_effects/pics/field_move_streaks_indoors.png} (100%) rename graphics/{misc => field_effects/pics}/hof_monitor_big.png (100%) rename graphics/{misc => field_effects/pics}/hof_monitor_small.png (100%) rename graphics/{misc => field_effects/pics}/pokeball_glow.png (100%) rename graphics/{misc => field_effects/pics}/pokecenter_monitor/0.png (100%) rename graphics/{misc => field_effects/pics}/pokecenter_monitor/1.png (100%) rename graphics/{misc => field_effects/pics}/spotlight.png (100%) rename graphics/{misc => interface}/main_menu_bg.pal (100%) rename graphics/{misc => interface}/main_menu_text.pal (100%) rename graphics/{misc => interface}/option_menu_equals_sign.png (100%) rename graphics/{misc => interface}/option_menu_text.pal (100%) rename graphics/{misc/rotating_gate_1.png => rotating_gates/l1.png} (100%) rename graphics/{misc/rotating_gate_2.png => rotating_gates/l2.png} (100%) rename graphics/{misc/rotating_gate_3.png => rotating_gates/l3.png} (100%) rename graphics/{misc/rotating_gate_4.png => rotating_gates/l4.png} (100%) rename graphics/{misc/rotating_gate_5.png => rotating_gates/t1.png} (100%) rename graphics/{misc/rotating_gate_6.png => rotating_gates/t2.png} (100%) rename graphics/{misc/rotating_gate_7.png => rotating_gates/t3.png} (100%) rename graphics/{misc/rotating_gate_8.png => rotating_gates/t4.png} (100%) rename graphics/{misc/trainer_hill_ereader.pal => trainer_hill/ereader.pal} (100%) diff --git a/decompress.sh b/decompress.sh deleted file mode 100755 index 26b5a0db74..0000000000 --- a/decompress.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -FILEPATH=$1 - -tools/gbagfx/gbagfx graphics/$FILEPATH.bin.lz graphics/$FILEPATH.bin diff --git a/graphics/unused/intro_birch_beauty.png b/graphics/birch_speech/unused_beauty.png similarity index 100% rename from graphics/unused/intro_birch_beauty.png rename to graphics/birch_speech/unused_beauty.png diff --git a/graphics/misc/cave_transition_black.pal b/graphics/cave_transition/black.pal similarity index 100% rename from graphics/misc/cave_transition_black.pal rename to graphics/cave_transition/black.pal diff --git a/graphics/misc/cave_transition_enter.pal b/graphics/cave_transition/enter.pal similarity index 100% rename from graphics/misc/cave_transition_enter.pal rename to graphics/cave_transition/enter.pal diff --git a/graphics/misc/cave_transition_exit.pal b/graphics/cave_transition/exit.pal similarity index 100% rename from graphics/misc/cave_transition_exit.pal rename to graphics/cave_transition/exit.pal diff --git a/graphics/misc/cave_transition_map.bin b/graphics/cave_transition/tilemap.bin similarity index 100% rename from graphics/misc/cave_transition_map.bin rename to graphics/cave_transition/tilemap.bin diff --git a/graphics/misc/cave_transition.png b/graphics/cave_transition/tiles.png similarity index 100% rename from graphics/misc/cave_transition.png rename to graphics/cave_transition/tiles.png diff --git a/graphics/misc/cave_transition_white.pal b/graphics/cave_transition/white.pal similarity index 100% rename from graphics/misc/cave_transition_white.pal rename to graphics/cave_transition/white.pal diff --git a/graphics/misc/decoration_putting_away_cursor.png b/graphics/decorations/put_away_cursor.png similarity index 100% rename from graphics/misc/decoration_putting_away_cursor.png rename to graphics/decorations/put_away_cursor.png diff --git a/graphics/misc/diploma_hoenn.pal b/graphics/diploma/hoenn.pal similarity index 100% rename from graphics/misc/diploma_hoenn.pal rename to graphics/diploma/hoenn.pal diff --git a/graphics/misc/diploma_national.pal b/graphics/diploma/national.pal similarity index 100% rename from graphics/misc/diploma_national.pal rename to graphics/diploma/national.pal diff --git a/graphics/misc/diploma_map.bin b/graphics/diploma/tilemap.bin similarity index 100% rename from graphics/misc/diploma_map.bin rename to graphics/diploma/tilemap.bin diff --git a/graphics/misc/diploma.png b/graphics/diploma/tiles.png similarity index 100% rename from graphics/misc/diploma.png rename to graphics/diploma/tiles.png diff --git a/graphics/misc/deoxys1.pal b/graphics/field_effects/palettes/deoxys_rock_1.pal similarity index 100% rename from graphics/misc/deoxys1.pal rename to graphics/field_effects/palettes/deoxys_rock_1.pal diff --git a/graphics/misc/deoxys10.pal b/graphics/field_effects/palettes/deoxys_rock_10.pal similarity index 100% rename from graphics/misc/deoxys10.pal rename to graphics/field_effects/palettes/deoxys_rock_10.pal diff --git a/graphics/misc/deoxys11.pal b/graphics/field_effects/palettes/deoxys_rock_11.pal similarity index 100% rename from graphics/misc/deoxys11.pal rename to graphics/field_effects/palettes/deoxys_rock_11.pal diff --git a/graphics/misc/deoxys2.pal b/graphics/field_effects/palettes/deoxys_rock_2.pal similarity index 100% rename from graphics/misc/deoxys2.pal rename to graphics/field_effects/palettes/deoxys_rock_2.pal diff --git a/graphics/misc/deoxys3.pal b/graphics/field_effects/palettes/deoxys_rock_3.pal similarity index 100% rename from graphics/misc/deoxys3.pal rename to graphics/field_effects/palettes/deoxys_rock_3.pal diff --git a/graphics/misc/deoxys4.pal b/graphics/field_effects/palettes/deoxys_rock_4.pal similarity index 100% rename from graphics/misc/deoxys4.pal rename to graphics/field_effects/palettes/deoxys_rock_4.pal diff --git a/graphics/misc/deoxys5.pal b/graphics/field_effects/palettes/deoxys_rock_5.pal similarity index 100% rename from graphics/misc/deoxys5.pal rename to graphics/field_effects/palettes/deoxys_rock_5.pal diff --git a/graphics/misc/deoxys6.pal b/graphics/field_effects/palettes/deoxys_rock_6.pal similarity index 100% rename from graphics/misc/deoxys6.pal rename to graphics/field_effects/palettes/deoxys_rock_6.pal diff --git a/graphics/misc/deoxys7.pal b/graphics/field_effects/palettes/deoxys_rock_7.pal similarity index 100% rename from graphics/misc/deoxys7.pal rename to graphics/field_effects/palettes/deoxys_rock_7.pal diff --git a/graphics/misc/deoxys8.pal b/graphics/field_effects/palettes/deoxys_rock_8.pal similarity index 100% rename from graphics/misc/deoxys8.pal rename to graphics/field_effects/palettes/deoxys_rock_8.pal diff --git a/graphics/misc/deoxys9.pal b/graphics/field_effects/palettes/deoxys_rock_9.pal similarity index 100% rename from graphics/misc/deoxys9.pal rename to graphics/field_effects/palettes/deoxys_rock_9.pal diff --git a/graphics/misc/deoxys_rock_fragment_bottom_left.png b/graphics/field_effects/pics/deoxys_rock_fragment_bottom_left.png similarity index 100% rename from graphics/misc/deoxys_rock_fragment_bottom_left.png rename to graphics/field_effects/pics/deoxys_rock_fragment_bottom_left.png diff --git a/graphics/misc/deoxys_rock_fragment_bottom_right.png b/graphics/field_effects/pics/deoxys_rock_fragment_bottom_right.png similarity index 100% rename from graphics/misc/deoxys_rock_fragment_bottom_right.png rename to graphics/field_effects/pics/deoxys_rock_fragment_bottom_right.png diff --git a/graphics/misc/deoxys_rock_fragment_top_left.png b/graphics/field_effects/pics/deoxys_rock_fragment_top_left.png similarity index 100% rename from graphics/misc/deoxys_rock_fragment_top_left.png rename to graphics/field_effects/pics/deoxys_rock_fragment_top_left.png diff --git a/graphics/misc/deoxys_rock_fragment_top_right.png b/graphics/field_effects/pics/deoxys_rock_fragment_top_right.png similarity index 100% rename from graphics/misc/deoxys_rock_fragment_top_right.png rename to graphics/field_effects/pics/deoxys_rock_fragment_top_right.png diff --git a/graphics/misc/emotion_exclamation.png b/graphics/field_effects/pics/emotion_exclamation.png similarity index 100% rename from graphics/misc/emotion_exclamation.png rename to graphics/field_effects/pics/emotion_exclamation.png diff --git a/graphics/misc/emotion_heart.png b/graphics/field_effects/pics/emotion_heart.png similarity index 100% rename from graphics/misc/emotion_heart.png rename to graphics/field_effects/pics/emotion_heart.png diff --git a/graphics/misc/emotion_question.png b/graphics/field_effects/pics/emotion_question.png similarity index 100% rename from graphics/misc/emotion_question.png rename to graphics/field_effects/pics/emotion_question.png diff --git a/graphics/misc/field_move_streaks_map.bin b/graphics/field_effects/pics/field_move_streaks.bin similarity index 100% rename from graphics/misc/field_move_streaks_map.bin rename to graphics/field_effects/pics/field_move_streaks.bin diff --git a/graphics/misc/field_move_streaks.png b/graphics/field_effects/pics/field_move_streaks.png similarity index 100% rename from graphics/misc/field_move_streaks.png rename to graphics/field_effects/pics/field_move_streaks.png diff --git a/graphics/misc/darkness_field_move_streaks_map.bin b/graphics/field_effects/pics/field_move_streaks_indoors.bin similarity index 100% rename from graphics/misc/darkness_field_move_streaks_map.bin rename to graphics/field_effects/pics/field_move_streaks_indoors.bin diff --git a/graphics/misc/darkness_field_move_streaks.png b/graphics/field_effects/pics/field_move_streaks_indoors.png similarity index 100% rename from graphics/misc/darkness_field_move_streaks.png rename to graphics/field_effects/pics/field_move_streaks_indoors.png diff --git a/graphics/misc/hof_monitor_big.png b/graphics/field_effects/pics/hof_monitor_big.png similarity index 100% rename from graphics/misc/hof_monitor_big.png rename to graphics/field_effects/pics/hof_monitor_big.png diff --git a/graphics/misc/hof_monitor_small.png b/graphics/field_effects/pics/hof_monitor_small.png similarity index 100% rename from graphics/misc/hof_monitor_small.png rename to graphics/field_effects/pics/hof_monitor_small.png diff --git a/graphics/misc/pokeball_glow.png b/graphics/field_effects/pics/pokeball_glow.png similarity index 100% rename from graphics/misc/pokeball_glow.png rename to graphics/field_effects/pics/pokeball_glow.png diff --git a/graphics/misc/pokecenter_monitor/0.png b/graphics/field_effects/pics/pokecenter_monitor/0.png similarity index 100% rename from graphics/misc/pokecenter_monitor/0.png rename to graphics/field_effects/pics/pokecenter_monitor/0.png diff --git a/graphics/misc/pokecenter_monitor/1.png b/graphics/field_effects/pics/pokecenter_monitor/1.png similarity index 100% rename from graphics/misc/pokecenter_monitor/1.png rename to graphics/field_effects/pics/pokecenter_monitor/1.png diff --git a/graphics/misc/spotlight.png b/graphics/field_effects/pics/spotlight.png similarity index 100% rename from graphics/misc/spotlight.png rename to graphics/field_effects/pics/spotlight.png diff --git a/graphics/misc/main_menu_bg.pal b/graphics/interface/main_menu_bg.pal similarity index 100% rename from graphics/misc/main_menu_bg.pal rename to graphics/interface/main_menu_bg.pal diff --git a/graphics/misc/main_menu_text.pal b/graphics/interface/main_menu_text.pal similarity index 100% rename from graphics/misc/main_menu_text.pal rename to graphics/interface/main_menu_text.pal diff --git a/graphics/misc/option_menu_equals_sign.png b/graphics/interface/option_menu_equals_sign.png similarity index 100% rename from graphics/misc/option_menu_equals_sign.png rename to graphics/interface/option_menu_equals_sign.png diff --git a/graphics/misc/option_menu_text.pal b/graphics/interface/option_menu_text.pal similarity index 100% rename from graphics/misc/option_menu_text.pal rename to graphics/interface/option_menu_text.pal diff --git a/graphics/misc/rotating_gate_1.png b/graphics/rotating_gates/l1.png similarity index 100% rename from graphics/misc/rotating_gate_1.png rename to graphics/rotating_gates/l1.png diff --git a/graphics/misc/rotating_gate_2.png b/graphics/rotating_gates/l2.png similarity index 100% rename from graphics/misc/rotating_gate_2.png rename to graphics/rotating_gates/l2.png diff --git a/graphics/misc/rotating_gate_3.png b/graphics/rotating_gates/l3.png similarity index 100% rename from graphics/misc/rotating_gate_3.png rename to graphics/rotating_gates/l3.png diff --git a/graphics/misc/rotating_gate_4.png b/graphics/rotating_gates/l4.png similarity index 100% rename from graphics/misc/rotating_gate_4.png rename to graphics/rotating_gates/l4.png diff --git a/graphics/misc/rotating_gate_5.png b/graphics/rotating_gates/t1.png similarity index 100% rename from graphics/misc/rotating_gate_5.png rename to graphics/rotating_gates/t1.png diff --git a/graphics/misc/rotating_gate_6.png b/graphics/rotating_gates/t2.png similarity index 100% rename from graphics/misc/rotating_gate_6.png rename to graphics/rotating_gates/t2.png diff --git a/graphics/misc/rotating_gate_7.png b/graphics/rotating_gates/t3.png similarity index 100% rename from graphics/misc/rotating_gate_7.png rename to graphics/rotating_gates/t3.png diff --git a/graphics/misc/rotating_gate_8.png b/graphics/rotating_gates/t4.png similarity index 100% rename from graphics/misc/rotating_gate_8.png rename to graphics/rotating_gates/t4.png diff --git a/graphics/misc/trainer_hill_ereader.pal b/graphics/trainer_hill/ereader.pal similarity index 100% rename from graphics/misc/trainer_hill_ereader.pal rename to graphics/trainer_hill/ereader.pal diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index cb12b9c183..9e5c191930 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -502,7 +502,7 @@ $(SLOTMACHINEGFXDIR)/reel_time_gfx.4bpp: $(SLOTMACHINEGFXDIR)/reel_time_pikachu. $(SLOTMACHINEGFXDIR)/reel_time_machine.4bpp @cat $^ >$@ -$(UNUSEDGFXDIR)/intro_birch_beauty.4bpp: %.4bpp: %.png +graphics/birch_speech/unused_beauty.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 822 diff --git a/src/decoration.c b/src/decoration.c index 118b4918e6..c5a05f7cc1 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -440,7 +440,7 @@ static const struct YesNoFuncTable sStopPuttingAwayDecorationsYesNoFunctions = .noFunc = ContinuePuttingAwayDecorations, }; -static const u8 sDecorationPuttingAwayCursor[] = INCBIN_U8("graphics/misc/decoration_putting_away_cursor.4bpp"); +static const u8 sDecorationPuttingAwayCursor[] = INCBIN_U8("graphics/decorations/put_away_cursor.4bpp"); static const struct SpritePalette sSpritePal_PuttingAwayCursorBrendan = { diff --git a/src/diploma.c b/src/diploma.c index 76b4ae65c5..ce31578dcb 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -40,12 +40,12 @@ static void VBlankCB(void) static const u16 sDiplomaPalettes[][16] = { - INCBIN_U16("graphics/misc/diploma_national.gbapal"), - INCBIN_U16("graphics/misc/diploma_hoenn.gbapal"), + INCBIN_U16("graphics/diploma/national.gbapal"), + INCBIN_U16("graphics/diploma/hoenn.gbapal"), }; -static const u32 sDiplomaTilemap[] = INCBIN_U32("graphics/misc/diploma_map.bin.lz"); -static const u32 sDiplomaTiles[] = INCBIN_U32("graphics/misc/diploma.4bpp.lz"); +static const u32 sDiplomaTilemap[] = INCBIN_U32("graphics/diploma/tilemap.bin.lz"); +static const u32 sDiplomaTiles[] = INCBIN_U32("graphics/diploma/tiles.4bpp.lz"); void CB2_ShowDiploma(void) { diff --git a/src/field_effect.c b/src/field_effect.c index 3f0ba24555..446d3cc275 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -243,32 +243,33 @@ extern u8 *gFieldEffectScriptPointers[]; extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; static const u32 sNewGameBirch_Gfx[] = INCBIN_U32("graphics/birch_speech/birch.4bpp"); -static const u32 sUnusedBirchBeauty[] = INCBIN_U32("graphics/unused/intro_birch_beauty.4bpp"); +static const u32 sUnusedBirchBeauty[] = INCBIN_U32("graphics/birch_speech/unused_beauty.4bpp"); static const u16 sNewGameBirch_Pal[16] = INCBIN_U16("graphics/birch_speech/birch.gbapal"); -static const u32 sPokeballGlow_Gfx[] = INCBIN_U32("graphics/misc/pokeball_glow.4bpp"); + +static const u32 sPokeballGlow_Gfx[] = INCBIN_U32("graphics/field_effects/pics/pokeball_glow.4bpp"); static const u16 sPokeballGlow_Pal[16] = INCBIN_U16("graphics/field_effects/palettes/pokeball_glow.gbapal"); -static const u32 sPokecenterMonitor0_Gfx[] = INCBIN_U32("graphics/misc/pokecenter_monitor/0.4bpp"); -static const u32 sPokecenterMonitor1_Gfx[] = INCBIN_U32("graphics/misc/pokecenter_monitor/1.4bpp"); -static const u32 sHofMonitorBig_Gfx[] = INCBIN_U32("graphics/misc/hof_monitor_big.4bpp"); -static const u8 sHofMonitorSmall_Gfx[] = INCBIN_U8("graphics/misc/hof_monitor_small.4bpp"); +static const u32 sPokecenterMonitor0_Gfx[] = INCBIN_U32("graphics/field_effects/pics/pokecenter_monitor/0.4bpp"); +static const u32 sPokecenterMonitor1_Gfx[] = INCBIN_U32("graphics/field_effects/pics/pokecenter_monitor/1.4bpp"); +static const u32 sHofMonitorBig_Gfx[] = INCBIN_U32("graphics/field_effects/pics/hof_monitor_big.4bpp"); +static const u8 sHofMonitorSmall_Gfx[] = INCBIN_U8("graphics/field_effects/pics/hof_monitor_small.4bpp"); static const u16 sHofMonitor_Pal[16] = INCBIN_U16("graphics/field_effects/palettes/hof_monitor.gbapal"); // Graphics for the lights streaking past your Pokemon when it uses a field move. -static const u32 sFieldMoveStreaksOutdoors_Gfx[] = INCBIN_U32("graphics/misc/field_move_streaks.4bpp"); -static const u16 sFieldMoveStreaksOutdoors_Pal[16] = INCBIN_U16("graphics/misc/field_move_streaks.gbapal"); -static const u16 sFieldMoveStreaksOutdoors_Tilemap[320] = INCBIN_U16("graphics/misc/field_move_streaks_map.bin"); +static const u32 sFieldMoveStreaksOutdoors_Gfx[] = INCBIN_U32("graphics/field_effects/pics/field_move_streaks.4bpp"); +static const u16 sFieldMoveStreaksOutdoors_Pal[16] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks.gbapal"); +static const u16 sFieldMoveStreaksOutdoors_Tilemap[320] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks.bin"); // The following light streaks effect is used when the map is indoors -static const u32 sFieldMoveStreaksIndoors_Gfx[] = INCBIN_U32("graphics/misc/darkness_field_move_streaks.4bpp"); -static const u16 sFieldMoveStreaksIndoors_Pal[16] = INCBIN_U16("graphics/misc/darkness_field_move_streaks.gbapal"); -static const u16 sFieldMoveStreaksIndoors_Tilemap[320] = INCBIN_U16("graphics/misc/darkness_field_move_streaks_map.bin"); +static const u32 sFieldMoveStreaksIndoors_Gfx[] = INCBIN_U32("graphics/field_effects/pics/field_move_streaks_indoors.4bpp"); +static const u16 sFieldMoveStreaksIndoors_Pal[16] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks_indoors.gbapal"); +static const u16 sFieldMoveStreaksIndoors_Tilemap[320] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks_indoors.bin"); -static const u16 sSpotlight_Pal[16] = INCBIN_U16("graphics/misc/spotlight.gbapal"); -static const u8 sSpotlight_Gfx[] = INCBIN_U8("graphics/misc/spotlight.4bpp"); -static const u8 sRockFragment_TopLeft[] = INCBIN_U8("graphics/misc/deoxys_rock_fragment_top_left.4bpp"); -static const u8 sRockFragment_TopRight[] = INCBIN_U8("graphics/misc/deoxys_rock_fragment_top_right.4bpp"); -static const u8 sRockFragment_BottomLeft[] = INCBIN_U8("graphics/misc/deoxys_rock_fragment_bottom_left.4bpp"); -static const u8 sRockFragment_BottomRight[] = INCBIN_U8("graphics/misc/deoxys_rock_fragment_bottom_right.4bpp"); +static const u16 sSpotlight_Pal[16] = INCBIN_U16("graphics/field_effects/pics/spotlight.gbapal"); +static const u8 sSpotlight_Gfx[] = INCBIN_U8("graphics/field_effects/pics/spotlight.4bpp"); +static const u8 sRockFragment_TopLeft[] = INCBIN_U8("graphics/field_effects/pics/deoxys_rock_fragment_top_left.4bpp"); +static const u8 sRockFragment_TopRight[] = INCBIN_U8("graphics/field_effects/pics/deoxys_rock_fragment_top_right.4bpp"); +static const u8 sRockFragment_BottomLeft[] = INCBIN_U8("graphics/field_effects/pics/deoxys_rock_fragment_bottom_left.4bpp"); +static const u8 sRockFragment_BottomRight[] = INCBIN_U8("graphics/field_effects/pics/deoxys_rock_fragment_bottom_right.4bpp"); bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) = { diff --git a/src/field_specials.c b/src/field_specials.c index 0a72369138..45585bcd36 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3194,17 +3194,17 @@ void DoDeoxysRockInteraction(void) } static const u16 sDeoxysRockPalettes[][16] = { - INCBIN_U16("graphics/misc/deoxys1.gbapal"), - INCBIN_U16("graphics/misc/deoxys2.gbapal"), - INCBIN_U16("graphics/misc/deoxys3.gbapal"), - INCBIN_U16("graphics/misc/deoxys4.gbapal"), - INCBIN_U16("graphics/misc/deoxys5.gbapal"), - INCBIN_U16("graphics/misc/deoxys6.gbapal"), - INCBIN_U16("graphics/misc/deoxys7.gbapal"), - INCBIN_U16("graphics/misc/deoxys8.gbapal"), - INCBIN_U16("graphics/misc/deoxys9.gbapal"), - INCBIN_U16("graphics/misc/deoxys10.gbapal"), - INCBIN_U16("graphics/misc/deoxys11.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_1.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_2.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_3.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_4.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_5.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_6.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_7.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_8.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_9.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_10.gbapal"), + INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_11.gbapal"), }; static const u8 sDeoxysRockCoords[][2] = { diff --git a/src/fldeff_flash.c b/src/fldeff_flash.c index 9c166d0085..a303b8423b 100644 --- a/src/fldeff_flash.c +++ b/src/fldeff_flash.c @@ -61,13 +61,13 @@ static const struct FlashStruct sTransitionTypes[] = {}, }; -static const u16 sCaveTransitionPalette_White[] = INCBIN_U16("graphics/misc/cave_transition_white.gbapal"); -static const u16 sCaveTransitionPalette_Black[] = INCBIN_U16("graphics/misc/cave_transition_black.gbapal"); +static const u16 sCaveTransitionPalette_White[] = INCBIN_U16("graphics/cave_transition/white.gbapal"); +static const u16 sCaveTransitionPalette_Black[] = INCBIN_U16("graphics/cave_transition/black.gbapal"); -static const u16 sCaveTransitionPalette_Enter[] = INCBIN_U16("graphics/misc/cave_transition_enter.gbapal"); -static const u16 sCaveTransitionPalette_Exit[] = INCBIN_U16("graphics/misc/cave_transition_exit.gbapal"); -static const u32 sCaveTransitionTilemap[] = INCBIN_U32("graphics/misc/cave_transition_map.bin.lz"); -static const u32 sCaveTransitionTiles[] = INCBIN_U32("graphics/misc/cave_transition.4bpp.lz"); +static const u16 sCaveTransitionPalette_Enter[] = INCBIN_U16("graphics/cave_transition/enter.gbapal"); +static const u16 sCaveTransitionPalette_Exit[] = INCBIN_U16("graphics/cave_transition/exit.gbapal"); +static const u32 sCaveTransitionTilemap[] = INCBIN_U32("graphics/cave_transition/tilemap.bin.lz"); +static const u32 sCaveTransitionTiles[] = INCBIN_U32("graphics/cave_transition/tiles.4bpp.lz"); bool8 SetUpFieldMove_Flash(void) { diff --git a/src/main_menu.c b/src/main_menu.c index e7802b1e7a..54a4f68917 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -403,8 +403,8 @@ static const struct WindowTemplate gNewGameBirchSpeechTextWindows[] = DUMMY_WIN_TEMPLATE }; -static const u16 sMainMenuBgPal[] = INCBIN_U16("graphics/misc/main_menu_bg.gbapal"); -static const u16 sMainMenuTextPal[] = INCBIN_U16("graphics/misc/main_menu_text.gbapal"); +static const u16 sMainMenuBgPal[] = INCBIN_U16("graphics/interface/main_menu_bg.gbapal"); +static const u16 sMainMenuTextPal[] = INCBIN_U16("graphics/interface/main_menu_text.gbapal"); static const u8 sTextColor_Headers[] = {TEXT_DYNAMIC_COLOR_1, TEXT_DYNAMIC_COLOR_2, TEXT_DYNAMIC_COLOR_3}; static const u8 sTextColor_MenuInfo[] = {TEXT_DYNAMIC_COLOR_1, TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_3}; diff --git a/src/option_menu.c b/src/option_menu.c index e66bddd7f2..2991913d78 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -79,9 +79,9 @@ static void DrawBgWindowFrames(void); EWRAM_DATA static bool8 sArrowPressed = FALSE; -static const u16 sOptionMenuText_Pal[] = INCBIN_U16("graphics/misc/option_menu_text.gbapal"); +static const u16 sOptionMenuText_Pal[] = INCBIN_U16("graphics/interface/option_menu_text.gbapal"); // note: this is only used in the Japanese release -static const u8 sEqualSignGfx[] = INCBIN_U8("graphics/misc/option_menu_equals_sign.4bpp"); +static const u8 sEqualSignGfx[] = INCBIN_U8("graphics/interface/option_menu_equals_sign.4bpp"); static const u8 *const sOptionMenuItemsNames[MENUITEM_COUNT] = { diff --git a/src/rotating_gate.c b/src/rotating_gate.c index 23fbb3e1d6..78ffcabc99 100644 --- a/src/rotating_gate.c +++ b/src/rotating_gate.c @@ -219,14 +219,14 @@ static const struct RotatingGatePuzzle sRotatingGate_TrickHousePuzzleConfig[] = {10, 19, GATE_SHAPE_L3, GATE_ORIENTATION_180}, }; -static const u8 sRotatingGateTiles_1[] = INCBIN_U8("graphics/misc/rotating_gate_1.4bpp"); -static const u8 sRotatingGateTiles_2[] = INCBIN_U8("graphics/misc/rotating_gate_2.4bpp"); -static const u8 sRotatingGateTiles_3[] = INCBIN_U8("graphics/misc/rotating_gate_3.4bpp"); -static const u8 sRotatingGateTiles_4[] = INCBIN_U8("graphics/misc/rotating_gate_4.4bpp"); -static const u8 sRotatingGateTiles_5[] = INCBIN_U8("graphics/misc/rotating_gate_5.4bpp"); -static const u8 sRotatingGateTiles_6[] = INCBIN_U8("graphics/misc/rotating_gate_6.4bpp"); -static const u8 sRotatingGateTiles_7[] = INCBIN_U8("graphics/misc/rotating_gate_7.4bpp"); -static const u8 sRotatingGateTiles_8[] = INCBIN_U8("graphics/misc/rotating_gate_8.4bpp"); +static const u8 sRotatingGateTiles_1[] = INCBIN_U8("graphics/rotating_gates/l1.4bpp"); +static const u8 sRotatingGateTiles_2[] = INCBIN_U8("graphics/rotating_gates/l2.4bpp"); +static const u8 sRotatingGateTiles_3[] = INCBIN_U8("graphics/rotating_gates/l3.4bpp"); +static const u8 sRotatingGateTiles_4[] = INCBIN_U8("graphics/rotating_gates/l4.4bpp"); +static const u8 sRotatingGateTiles_5[] = INCBIN_U8("graphics/rotating_gates/t1.4bpp"); +static const u8 sRotatingGateTiles_6[] = INCBIN_U8("graphics/rotating_gates/t2.4bpp"); +static const u8 sRotatingGateTiles_7[] = INCBIN_U8("graphics/rotating_gates/t3.4bpp"); +static const u8 sRotatingGateTiles_8[] = INCBIN_U8("graphics/rotating_gates/t4.4bpp"); static const struct OamData sOamData_RotatingGateLarge = { diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 3ada262e56..8d5be01160 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -199,7 +199,7 @@ static const u16 *const *const sPrizeListSets[] = sPrizeLists2 }; -static const u16 sEReader_Pal[] = INCBIN_U16("graphics/misc/trainer_hill_ereader.gbapal"); +static const u16 sEReader_Pal[] = INCBIN_U16("graphics/trainer_hill/ereader.gbapal"); static const u8 sRecordWinColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}; static const struct TrHillTag *const sDataPerTag[] = diff --git a/src/trainer_see.c b/src/trainer_see.c index ce06c5e9ce..07021a316a 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -59,9 +59,9 @@ bool8 gTrainerApproachedPlayer; EWRAM_DATA u8 gApproachingTrainerId = 0; // const rom data -static const u8 sEmotion_ExclamationMarkGfx[] = INCBIN_U8("graphics/misc/emotion_exclamation.4bpp"); -static const u8 sEmotion_QuestionMarkGfx[] = INCBIN_U8("graphics/misc/emotion_question.4bpp"); -static const u8 sEmotion_HeartGfx[] = INCBIN_U8("graphics/misc/emotion_heart.4bpp"); +static const u8 sEmotion_ExclamationMarkGfx[] = INCBIN_U8("graphics/field_effects/pics/emotion_exclamation.4bpp"); +static const u8 sEmotion_QuestionMarkGfx[] = INCBIN_U8("graphics/field_effects/pics/emotion_question.4bpp"); +static const u8 sEmotion_HeartGfx[] = INCBIN_U8("graphics/field_effects/pics/emotion_heart.4bpp"); static u8 (*const sDirectionalApproachDistanceFuncs[])(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) = { From bd43b905b7ce5489224d3a2144504df6f7687f1f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 14 Jan 2022 12:39:00 -0500 Subject: [PATCH 350/417] Apply palettes to some field effect pngs --- .../pics/deoxys_rock_fragment_bottom_left.png | Bin 100 -> 155 bytes .../pics/deoxys_rock_fragment_bottom_right.png | Bin 91 -> 146 bytes .../pics/deoxys_rock_fragment_top_left.png | Bin 99 -> 157 bytes .../pics/deoxys_rock_fragment_top_right.png | Bin 102 -> 157 bytes .../field_effects/pics/emotion_exclamation.png | Bin 108 -> 166 bytes graphics/field_effects/pics/emotion_heart.png | Bin 126 -> 183 bytes .../field_effects/pics/emotion_question.png | Bin 117 -> 175 bytes graphics/field_effects/pics/hof_monitor_big.png | Bin 184 -> 189 bytes .../field_effects/pics/hof_monitor_small.png | Bin 177 -> 236 bytes graphics/field_effects/pics/pokeball_glow.png | Bin 100 -> 155 bytes src/field_effect.c | 4 ++-- 11 files changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/field_effects/pics/deoxys_rock_fragment_bottom_left.png b/graphics/field_effects/pics/deoxys_rock_fragment_bottom_left.png index 3f5b8d5c39badd3726117d6f643e9b9950e0259c..bc4f27a40dc7a80e93a4deac028d64ba4cda1092 100644 GIT binary patch literal 155 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U41_3@HuEj@}{69PAe^Ag_1%+k~ zkQ)5p+2>+=pb9ll7sn8enaK$Z%#Mz1Y;LN_jBJjH%C2l~j*89-@+v0|XfT8^Feu71 UcCL@pIt4P*)78&qol`;+0FN{tQ2+n{ delta 81 zcmbQum@+}qn*j(^rtpLTDQ!;|#}JO0qNffrG6)DTAAGytti*x!iIs=Jdqw_+=pbA+}7sn8enaK$bOiT`EGB{LPL>pTc2zBUdFic}&;9bFR`>1DuE66BM LS3j3^P6yrtpLTDJ4%A#}JO0$v^m6cmf{TPWVyI=doueyUM-0wfrL0-{o|; Y84BFw*&VX^gFw1GUHx3vIVCg!0N4{0vj6}9 diff --git a/graphics/field_effects/pics/deoxys_rock_fragment_top_left.png b/graphics/field_effects/pics/deoxys_rock_fragment_top_left.png index d601cb6e5415fdf45257700ec456b17c54d25b44..f0eb9c0cb9b4e0799db3df159f2ade0b439fe82d 100644 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U41_3@HuEj@}{69PAe^Ag_1%+k~ zkQ)5p+2>+=pb8C77sn8enaK$WDGW@Cj%;jhsj7@@ipr|aY>BF=&TNhf3|vhd3P6Rq VOiXr%C-8$z^>p=fS?83{1OTU09Q^mdKI;Vst0BjBznE(I) diff --git a/graphics/field_effects/pics/deoxys_rock_fragment_top_right.png b/graphics/field_effects/pics/deoxys_rock_fragment_top_right.png index 01f10cd07bafb67c95fc88af29ec352b012a2dcb..1fac486c904ca4bd22c26ea88e6f6eee51b2f8d2 100644 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U41_3@HuEj@}{69PAe^Ag_1%+k~ zkQ)5p+2>+=pb8C77sn8enaK$WA_)lz0zoW-Z9F_Zr`(u$dX9ND@$|GcIfw}~hcYmz WIy2t>yg%?5$W%{PKbLh*2~7Z6J|h|c delta 83 zcmbQsm^MMumjMV=rtpLTDP2z&#}JO0$v^(T|6AYoKmUDWNAZ8je|If^&wF@(=I-|r k|K?V+r|e}u#T5F7ogrei9J}yDS6+|-p00i_>zopr0Dh$*egFUf diff --git a/graphics/field_effects/pics/emotion_exclamation.png b/graphics/field_effects/pics/emotion_exclamation.png index 595566d2fea26b6281516e483fef6bbb92b861c4..798b830923460bebef2921a75a8ddbc1e3955656 100644 GIT binary patch delta 148 zcmc~<#yCN;o|%Dx;qBc=K|snNz$e7D_~?@VSGW8>I_2J!;%Z07|4X)9&8qHp44QKE zTU7U60mGmzOOmRK9W5;-{{R0E)Fhib?>LY$^mK6y;h346(9m3-aNxj!@Bi!t{!{~L yew7b$XMX&bSAYE1zJx7C+)s0cXn}Vk14DmNwEbCmzP=owZU#?RKbLh*2~7Y>YCmiM delta 89 zcmZ3+m@`2#m;ng>XZY>`QpTPxjv*W~lYj8D^89B#_`v?KJ0qJy!j$wMCpd%z7>p$( p3XE7JE=m@}S}aWnJD}TY$;{xtTgAC%lE8Y9F`lk|F6*2UngG>P8rF;XZY>`Qm&pZjv*W~OZzqo9x&iwcJ)?OJMrpD&U4NUoEEY3p7k@c z6gk}TP7-9V+^|GSCo!~hSC#jX`38&HefM7PH8Nt)KO$ar|HeLLorUHlk3B#Jd%F6$ JtaD0e0stgEC`teT diff --git a/graphics/field_effects/pics/emotion_question.png b/graphics/field_effects/pics/emotion_question.png index 7376fd058ef5b3d284631bc224350f76cc076419..4907f14b7f60b82a91cb4dcd6f81fe72e0f61ff7 100644 GIT binary patch delta 157 zcmXS2&p1J{o|%Dx;qBc=K|snNz$e7D_~?@VSGW8>I_2J!;%Z07|4X)9&8qHp44QKE zTU7U60mGmzOOmRK9W5;-{{R0E)Fhib?>LaM@^o`QZ}A0jv*W~lYj8D^89B#_`v?KJ0qJy!j$wMCpd%z7>p$( z6nGc~ToO6BoR+e%N?epIc>6-hK>NY8Lvt7z{2f)C&3KGtLFRe7`njxgN@xNAvWXnY diff --git a/graphics/field_effects/pics/hof_monitor_big.png b/graphics/field_effects/pics/hof_monitor_big.png index 510e6a232d74f5e953b84d1c89f87fcb3dbc0a5b..c70046ad710e9d983bef6949c8df1eacf6d07d10 100644 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^4nQox!VDxsPNql!DT4r?5LX~=Xz8_P$^Yi+XIV*W zg1oi_c_n@O|G#*RWA$FIDQBaSqNa4uxoT;d1!Ob)XJG&SN*Sof!_&nvL}OxdfKlN= z<~dU(rcCMm$e_G|$=y-Lfo0JFmn>1f4HqQW94NS2FOx9Uz~$ht?-mF2XEfDY99SPH j9N;sfReMD^lPCkj+{W-0zwb>T2QqlN`njxgN@xNAzhpy2 literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA*0wfqdKXdg4QuUrLjv*Qo*PgfLYA_IBxvFLcr~N5c|HfnTZ&heTQgy!fTK zEM{Ljk)R^Y>Be`@Bk|m``*UaHr2FjJY*etgk3+8RR5SS3j3^P6gd**6ltWrv}Qc7a> z|NnEWL3_PQl+9XVT9k{N)j2t8l+9WI{{RQ~>LUOE0C!15K~xx(RgW%gu9 zgYMo3OnNX!-5h1%XzmUwrC%FgLIN)z$|oWw#~fspZNYi|h*Uwu7(3u65yV3RTfIU} zxRG002ovPDHLkV1i{DTL%CD delta 160 zcmV;R0AK&?0kHv)8Gir(005Vp&x8N~0C-76K~xx(RgW%R0&bU7EX{>5lp)WW4XeQcfemN`YzLC zS{0#}gUB|ODZvscs<1@VE0(~cHGwJ9H+E1##|##9v9F_xl^H{qU;P)ECzKbTG^jZM O0000CJY5_^IA$g%FfdgTe~DWM4fdR~Wfv0N{LlE$%Q-veJv@JR_jAdA i^Y=1~{4SRBU|?i0;+84WPWSu^((dW%=d#Wzp$PzElpL=B diff --git a/src/field_effect.c b/src/field_effect.c index 446d3cc275..f57ce8cddc 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -2620,7 +2620,7 @@ static void FieldMoveShowMonOutdoorsEffect_LoadGfx(struct Task *task) u16 delta = ((REG_BG0CNT >> 8) << 11); CpuCopy16(sFieldMoveStreaksOutdoors_Gfx, (void *)(VRAM + offset), 0x200); CpuFill32(0, (void *)(VRAM + delta), 0x800); - LoadPalette(sFieldMoveStreaksOutdoors_Pal, 0xf0, 0x20); + LoadPalette(sFieldMoveStreaksOutdoors_Pal, 0xf0, sizeof(sFieldMoveStreaksOutdoors_Pal)); LoadFieldMoveOutdoorStreaksTilemap(delta); task->tState++; } @@ -2783,7 +2783,7 @@ static void FieldMoveShowMonIndoorsEffect_LoadGfx(struct Task *task) task->data[12] = delta; CpuCopy16(sFieldMoveStreaksIndoors_Gfx, (void *)(VRAM + offset), 0x80); CpuFill32(0, (void *)(VRAM + delta), 0x800); - LoadPalette(sFieldMoveStreaksIndoors_Pal, 0xf0, 0x20); + LoadPalette(sFieldMoveStreaksIndoors_Pal, 0xf0, sizeof(sFieldMoveStreaksIndoors_Pal)); task->tState++; } From 6d6ff9126854d5439fb859a74fbe8db4e4d0f96e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 16 Jan 2022 10:29:15 -0500 Subject: [PATCH 351/417] Allow right single quotation mark in charmap --- charmap.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/charmap.txt b/charmap.txt index 4c01451c80..2606076784 100644 --- a/charmap.txt +++ b/charmap.txt @@ -84,6 +84,7 @@ SUPER_RE = A0 '“' = B1 '”' = B2 '‘' = B3 +'’' = B4 '\'' = B4 '♂' = B5 '♀' = B6 From a4d31da9233f238be28c397d7f83c2028bcdffb7 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 16 Jan 2022 19:22:28 -0300 Subject: [PATCH 352/417] Updated the value of MAX_MAP_DATA_SIZE --- include/fieldmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fieldmap.h b/include/fieldmap.h index 28da8da2a3..aabfce461e 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -7,7 +7,7 @@ #define NUM_METATILES_TOTAL 1024 #define NUM_PALS_IN_PRIMARY 6 #define NUM_PALS_TOTAL 13 -#define MAX_MAP_DATA_SIZE 0x2800 +#define MAX_MAP_DATA_SIZE 10240 // Map coordinates are offset by 7 when using the map // buffer because it needs to load sufficient border From 225147a94f8baf30c6e7db7084c5b8663d52ca3c Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 17 Jan 2022 13:19:52 -0500 Subject: [PATCH 353/417] Document Spinda spot algorithm --- include/pokemon.h | 5 ++- src/pokemon.c | 84 +++++++++++++++++++++++++++++++++-------------- 2 files changed, 63 insertions(+), 26 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index 28460bbe64..8039a4fdd4 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -239,10 +239,13 @@ struct BattleMove u8 flags; }; +#define SPINDA_SPOT_WIDTH 16 +#define SPINDA_SPOT_HEIGHT 16 + struct SpindaSpot { u8 x, y; - u16 image[16]; + u16 image[SPINDA_SPOT_HEIGHT]; }; struct __attribute__((packed)) LevelUpMove diff --git a/src/pokemon.c b/src/pokemon.c index 9476dbb2e7..e5d321f5a7 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1345,10 +1345,10 @@ static const u16 sHoennToNationalOrder[NUM_SPECIES - 1] = const struct SpindaSpot gSpindaSpotGraphics[] = { - {16, 7, INCBIN_U16("graphics/spinda_spots/spot_0.bin")}, - {40, 8, INCBIN_U16("graphics/spinda_spots/spot_1.bin")}, - {22, 25, INCBIN_U16("graphics/spinda_spots/spot_2.bin")}, - {34, 26, INCBIN_U16("graphics/spinda_spots/spot_3.bin")} + {.x = 16, .y = 7, .image = INCBIN_U16("graphics/spinda_spots/spot_0.bin")}, + {.x = 40, .y = 8, .image = INCBIN_U16("graphics/spinda_spots/spot_1.bin")}, + {.x = 22, .y = 25, .image = INCBIN_U16("graphics/spinda_spots/spot_2.bin")}, + {.x = 34, .y = 26, .image = INCBIN_U16("graphics/spinda_spots/spot_3.bin")} }; #include "data/pokemon/item_effects.h" @@ -5653,42 +5653,76 @@ u16 SpeciesToCryId(u16 species) return gSpeciesIdToCryId[species - (SPECIES_TREECKO - 1)]; } -#define DRAW_SPINDA_SPOTS \ +// To draw the spot, add 4 to the color indexes +#define SPOT_COLOR_ADJUSTMENT 4 + +/* + The macro below handles drawing the randomly-placed spots on Spinda's front sprite. + Spinda has 4 spots, each with an entry in gSpindaSpotGraphics. Each entry contains + a base x and y coordinate for the spot and a 16x16 binary image. Each bit in the image + determines whether that pixel should be considered part of the spot. + + The position of each spot is randomized using the Spinda's personality. The entire 32 bit + personality value is used, 4 bits for each coordinate of the 4 spots. If the personality + value is 0x87654321, then 0x1 will be used for the 1st spot's x coord, 0x2 will be used for + the 1st spot's y coord, 0x3 will be used for the 2nd spot's x coord, and so on. Each + coordinate is calculated as (baseCoord + (given 4 bits of personality) - 8). In effect this + means each spot can start at any position -8 to +7 off of its base coordinates (256 possibilities). + + The macro then loops over the 16x16 spot image. For each bit in the spot's binary image, if + if the bit is set then it's part of the spot; try to draw it. A pixel is drawn on Spinda + if the pixel on Spinda satisfies the following formula: (colorIndex - 1 <= 2). The -1 excludes + transparent pixels, as these are index 0. Therefore only colors 1, 2, or 3 on Spinda will + allow a spot to be drawn. These color indexes are Spinda's light brown body colors. To create + the spot it adds 4 to the color index, so Spinda's spots will be colors 5, 6, and 7. + + The above is done two different ways in the macro: one with << 4, and one without. This + is because Spinda's sprite is a 4 bits per pixel image, but the pointer to Spinda's pixels + (destPixels) is an 8 bit pointer, so it addresses two pixels. Shifting by 4 accesses the 2nd + of these pixels, so this is done every other time. +*/ +#define DRAW_SPINDA_SPOTS(personality, dest) \ { \ - int i; \ - for (i = 0; i < 4; i++) \ + s32 i; \ + for (i = 0; i < (s32)ARRAY_COUNT(gSpindaSpotGraphics); i++) \ { \ - int j; \ + s32 row; \ u8 x = gSpindaSpotGraphics[i].x + ((personality & 0x0F) - 8); \ u8 y = gSpindaSpotGraphics[i].y + (((personality & 0xF0) >> 4) - 8); \ \ - for (j = 0; j < 16; j++) \ + for (row = 0; row < SPINDA_SPOT_HEIGHT; row++) \ { \ - int k; \ - s32 row = gSpindaSpotGraphics[i].image[j]; \ + s32 column; \ + s32 spotPixelRow = gSpindaSpotGraphics[i].image[row]; \ \ - for (k = x; k < x + 16; k++) \ + for (column = x; column < x + SPINDA_SPOT_WIDTH; column++) \ { \ - u8 *val = dest + ((k / 8) * 32) + \ - ((k % 8) / 2) + \ - ((y >> 3) << 8) + \ - ((y & 7) << 2); \ + /* Get target pixels on Spinda's sprite */ \ + u8 *destPixels = dest + ((column / 8) * TILE_SIZE_4BPP) + \ + ((column % 8) / 2) + \ + ((y / 8) * TILE_SIZE_4BPP * 8) + \ + ((y % 8) * 4); \ \ - if (row & 1) \ + /* Is this pixel in the 16x16 spot image part of the spot? */ \ + if (spotPixelRow & 1) \ { \ - if (k & 1) \ + /* destPixels addressess two pixels, alternate which */ \ + /* of the two pixels is being considered for drawing */ \ + if (column & 1) \ { \ - if ((u8)((*val & 0xF0) - 0x10) <= 0x20) \ - *val += 0x40; \ + /* Draw spot pixel if this is Spinda's body color */ \ + if ((u8)((*destPixels & 0xF0) - (1 << 4)) <= (2 << 4)) \ + *destPixels += (SPOT_COLOR_ADJUSTMENT << 4); \ } \ else \ { \ - if ((u8)((*val & 0xF) - 0x01) <= 0x02) \ - *val += 0x04; \ + /* Draw spot pixel if this is Spinda's body color */ \ + if ((u8)((*destPixels & 0xF) - 1) <= 2) \ + *destPixels += SPOT_COLOR_ADJUSTMENT; \ } \ } \ \ - row >>= 1; \ + spotPixelRow >>= 1; \ } \ \ y++; \ @@ -5705,13 +5739,13 @@ static void DrawSpindaSpotsUnused(u16 species, u32 personality, u8 *dest) if (species == SPECIES_SPINDA && dest != gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT] && dest != gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_RIGHT]) - DRAW_SPINDA_SPOTS; + DRAW_SPINDA_SPOTS(personality, dest); } void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, bool8 isFrontPic) { if (species == SPECIES_SPINDA && isFrontPic) - DRAW_SPINDA_SPOTS; + DRAW_SPINDA_SPOTS(personality, dest); } void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies) From 177863da4728237c8fef4e6b69417d91d1b003cd Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 17 Jan 2022 16:04:02 -0500 Subject: [PATCH 354/417] Fix typo --- src/pokemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index e5d321f5a7..bc83bc5884 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5670,8 +5670,8 @@ u16 SpeciesToCryId(u16 species) means each spot can start at any position -8 to +7 off of its base coordinates (256 possibilities). The macro then loops over the 16x16 spot image. For each bit in the spot's binary image, if - if the bit is set then it's part of the spot; try to draw it. A pixel is drawn on Spinda - if the pixel on Spinda satisfies the following formula: (colorIndex - 1 <= 2). The -1 excludes + the bit is set then it's part of the spot; try to draw it. A pixel is drawn on Spinda if the + pixel on Spinda satisfies the following formula: (colorIndex - 1 <= 2). The -1 excludes transparent pixels, as these are index 0. Therefore only colors 1, 2, or 3 on Spinda will allow a spot to be drawn. These color indexes are Spinda's light brown body colors. To create the spot it adds 4 to the color index, so Spinda's spots will be colors 5, 6, and 7. From 313f14ed63f52b6b4371cabe858c5cde5705cc0f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 17 Jan 2022 17:00:18 -0500 Subject: [PATCH 355/417] Add Spinda spot color constants --- src/pokemon.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index bc83bc5884..902d576f7c 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5653,9 +5653,12 @@ u16 SpeciesToCryId(u16 species) return gSpeciesIdToCryId[species - (SPECIES_TREECKO - 1)]; } -// To draw the spot, add 4 to the color indexes -#define SPOT_COLOR_ADJUSTMENT 4 +// Spots can be drawn on Spinda's color indexes 1, 2, or 3 +#define FIRST_SPOT_COLOR 1 +#define LAST_SPOT_COLOR 3 +// To draw a spot pixel, add 4 to the color index +#define SPOT_COLOR_ADJUSTMENT 4 /* The macro below handles drawing the randomly-placed spots on Spinda's front sprite. Spinda has 4 spots, each with an entry in gSpindaSpotGraphics. Each entry contains @@ -5711,13 +5714,15 @@ u16 SpeciesToCryId(u16 species) if (column & 1) \ { \ /* Draw spot pixel if this is Spinda's body color */ \ - if ((u8)((*destPixels & 0xF0) - (1 << 4)) <= (2 << 4)) \ + if ((u8)((*destPixels & 0xF0) - (FIRST_SPOT_COLOR << 4))\ + <= ((LAST_SPOT_COLOR - FIRST_SPOT_COLOR) << 4))\ *destPixels += (SPOT_COLOR_ADJUSTMENT << 4); \ } \ else \ { \ /* Draw spot pixel if this is Spinda's body color */ \ - if ((u8)((*destPixels & 0xF) - 1) <= 2) \ + if ((u8)((*destPixels & 0xF) - FIRST_SPOT_COLOR) \ + <= (LAST_SPOT_COLOR - FIRST_SPOT_COLOR)) \ *destPixels += SPOT_COLOR_ADJUSTMENT; \ } \ } \ From 30d970441839e8b2473f6962ab9b70f4f8422507 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 17 Jan 2022 17:27:17 -0500 Subject: [PATCH 356/417] Specify unsigned in spot comment --- src/pokemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokemon.c b/src/pokemon.c index 902d576f7c..08a6fd0f90 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5674,7 +5674,7 @@ u16 SpeciesToCryId(u16 species) The macro then loops over the 16x16 spot image. For each bit in the spot's binary image, if the bit is set then it's part of the spot; try to draw it. A pixel is drawn on Spinda if the - pixel on Spinda satisfies the following formula: (colorIndex - 1 <= 2). The -1 excludes + pixel on Spinda satisfies the following formula: ((u8)(colorIndex - 1) <= 2). The -1 excludes transparent pixels, as these are index 0. Therefore only colors 1, 2, or 3 on Spinda will allow a spot to be drawn. These color indexes are Spinda's light brown body colors. To create the spot it adds 4 to the color index, so Spinda's spots will be colors 5, 6, and 7. From f127e64a3ca2899510622f012bc3823da2c5cd23 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 19 Jan 2022 09:37:12 -0500 Subject: [PATCH 357/417] Name overworld tilemaps for their bg, add layer type constants --- common_syms/overworld.txt | 6 +-- include/global.fieldmap.h | 6 +++ include/overworld.h | 8 ++- src/field_camera.c | 102 ++++++++++++++++++-------------------- src/overworld.c | 27 +++++----- 5 files changed, 73 insertions(+), 76 deletions(-) diff --git a/common_syms/overworld.txt b/common_syms/overworld.txt index e136f54449..dcada0bbef 100644 --- a/common_syms/overworld.txt +++ b/common_syms/overworld.txt @@ -1,6 +1,6 @@ -gBGTilemapBuffers1 -gBGTilemapBuffers2 -gBGTilemapBuffers3 +gOverworldTilemapBuffer_Bg2 +gOverworldTilemapBuffer_Bg1 +gOverworldTilemapBuffer_Bg3 gHeldKeyCodeToSend gFieldCallback gFieldCallback2 diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 33be942c80..2613682fd2 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -9,6 +9,12 @@ #define METATILE_COLLISION_SHIFT 10 #define METATILE_ELEVATION_MASK 0xF000 +enum { + METATILE_LAYER_TYPE_NORMAL, // Metatile uses middle and top bg layers + METATILE_LAYER_TYPE_COVERED, // Metatile uses bottom and middle bg layers + METATILE_LAYER_TYPE_SPLIT, // Metatile uses bottom and top bg layers +}; + #define METATILE_ID(tileset, name) (METATILE_##tileset##_##name) // Rows of metatiles do not actually have a strict width. diff --git a/include/overworld.h b/include/overworld.h index 04b61f7fd7..b8794ea70f 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -40,20 +40,18 @@ struct LinkPlayerObjectEvent u8 movementMode; }; -// Exported RAM declarations extern struct WarpData gLastUsedWarp; extern struct LinkPlayerObjectEvent gLinkPlayerObjectEvents[4]; -extern u16 *gBGTilemapBuffers1; -extern u16 *gBGTilemapBuffers2; -extern u16 *gBGTilemapBuffers3; +extern u16 *gOverworldTilemapBuffer_Bg2; +extern u16 *gOverworldTilemapBuffer_Bg1; +extern u16 *gOverworldTilemapBuffer_Bg3; extern u16 gHeldKeyCodeToSend; extern void (*gFieldCallback)(void); extern bool8 (*gFieldCallback2)(void); extern u8 gLocalLinkPlayerId; extern u8 gFieldLinkPlayerCount; -// Exported ROM declarations extern const struct UCoords32 gDirectionToVectors[]; void DoWhiteOut(void); diff --git a/src/field_camera.c b/src/field_camera.c index a36b6883c1..0a00dcbee9 100644 --- a/src/field_camera.c +++ b/src/field_camera.c @@ -14,7 +14,6 @@ EWRAM_DATA bool8 gUnusedBikeCameraAheadPanback = FALSE; -// Static type declarations struct FieldCameraOffset { u8 xPixelOffset; @@ -24,18 +23,16 @@ struct FieldCameraOffset bool8 copyBGToVRAM; }; -// static functions -static void RedrawMapSliceNorth(struct FieldCameraOffset *cameraOffset, const struct MapLayout *mapLayout); -static void RedrawMapSliceSouth(struct FieldCameraOffset *cameraOffset, const struct MapLayout *mapLayout); -static void RedrawMapSliceEast(struct FieldCameraOffset *cameraOffset, const struct MapLayout *mapLayout); -static void RedrawMapSliceWest(struct FieldCameraOffset *cameraOffset, const struct MapLayout *mapLayout); -static s32 MapPosToBgTilemapOffset(struct FieldCameraOffset *a, s32 x, s32 y); -static void DrawWholeMapViewInternal(int x, int y, const struct MapLayout *mapLayout); -static void DrawMetatileAt(const struct MapLayout *mapLayout, u16, int, int); -static void DrawMetatile(s32 a, u16 *b, u16 c); +static void RedrawMapSliceNorth(struct FieldCameraOffset *, const struct MapLayout *); +static void RedrawMapSliceSouth(struct FieldCameraOffset *, const struct MapLayout *); +static void RedrawMapSliceEast(struct FieldCameraOffset *, const struct MapLayout *); +static void RedrawMapSliceWest(struct FieldCameraOffset *, const struct MapLayout *); +static s32 MapPosToBgTilemapOffset(struct FieldCameraOffset *, s32, s32); +static void DrawWholeMapViewInternal(int, int, const struct MapLayout *); +static void DrawMetatileAt(const struct MapLayout *, u16, int, int); +static void DrawMetatile(s32, u16 *, u16); static void CameraPanningCB_PanAhead(void); -// IWRAM bss vars static struct FieldCameraOffset sFieldCameraOffset; static s16 sHorizontalCameraPan; static s16 sVerticalCameraPan; @@ -46,7 +43,6 @@ struct CameraObject gFieldCamera; u16 gTotalCameraPixelOffsetY; u16 gTotalCameraPixelOffsetX; -// text static void ResetCameraOffset(struct FieldCameraOffset *cameraOffset) { cameraOffset->xTileOffset = 0; @@ -222,7 +218,7 @@ void DrawDoorMetatileAt(int x, int y, u16 *arr) if (offset >= 0) { - DrawMetatile(1, arr, offset); + DrawMetatile(METATILE_LAYER_TYPE_COVERED, arr, offset); sFieldCameraOffset.copyBGToVRAM = TRUE; } } @@ -244,66 +240,66 @@ static void DrawMetatileAt(const struct MapLayout *mapLayout, u16 offset, int x, DrawMetatile(MapGridGetMetatileLayerTypeAt(x, y), metatiles + metatileId * 8, offset); } -static void DrawMetatile(s32 metatileLayerType, u16 *metatiles, u16 offset) +static void DrawMetatile(s32 metatileLayerType, u16 *tiles, u16 offset) { switch (metatileLayerType) { - case 2: // LAYER_TYPE_ + case METATILE_LAYER_TYPE_SPLIT: // Draw metatile's bottom layer to the bottom background layer. - gBGTilemapBuffers3[offset] = metatiles[0]; - gBGTilemapBuffers3[offset + 1] = metatiles[1]; - gBGTilemapBuffers3[offset + 0x20] = metatiles[2]; - gBGTilemapBuffers3[offset + 0x21] = metatiles[3]; + gOverworldTilemapBuffer_Bg3[offset] = tiles[0]; + gOverworldTilemapBuffer_Bg3[offset + 1] = tiles[1]; + gOverworldTilemapBuffer_Bg3[offset + 0x20] = tiles[2]; + gOverworldTilemapBuffer_Bg3[offset + 0x21] = tiles[3]; // Draw transparent tiles to the middle background layer. - gBGTilemapBuffers1[offset] = 0; - gBGTilemapBuffers1[offset + 1] = 0; - gBGTilemapBuffers1[offset + 0x20] = 0; - gBGTilemapBuffers1[offset + 0x21] = 0; + gOverworldTilemapBuffer_Bg2[offset] = 0; + gOverworldTilemapBuffer_Bg2[offset + 1] = 0; + gOverworldTilemapBuffer_Bg2[offset + 0x20] = 0; + gOverworldTilemapBuffer_Bg2[offset + 0x21] = 0; // Draw metatile's top layer to the top background layer. - gBGTilemapBuffers2[offset] = metatiles[4]; - gBGTilemapBuffers2[offset + 1] = metatiles[5]; - gBGTilemapBuffers2[offset + 0x20] = metatiles[6]; - gBGTilemapBuffers2[offset + 0x21] = metatiles[7]; + gOverworldTilemapBuffer_Bg1[offset] = tiles[4]; + gOverworldTilemapBuffer_Bg1[offset + 1] = tiles[5]; + gOverworldTilemapBuffer_Bg1[offset + 0x20] = tiles[6]; + gOverworldTilemapBuffer_Bg1[offset + 0x21] = tiles[7]; break; - case 1: // LAYER_TYPE_COVERED_BY_OBJECTS + case METATILE_LAYER_TYPE_COVERED: // Draw metatile's bottom layer to the bottom background layer. - gBGTilemapBuffers3[offset] = metatiles[0]; - gBGTilemapBuffers3[offset + 1] = metatiles[1]; - gBGTilemapBuffers3[offset + 0x20] = metatiles[2]; - gBGTilemapBuffers3[offset + 0x21] = metatiles[3]; + gOverworldTilemapBuffer_Bg3[offset] = tiles[0]; + gOverworldTilemapBuffer_Bg3[offset + 1] = tiles[1]; + gOverworldTilemapBuffer_Bg3[offset + 0x20] = tiles[2]; + gOverworldTilemapBuffer_Bg3[offset + 0x21] = tiles[3]; // Draw metatile's top layer to the middle background layer. - gBGTilemapBuffers1[offset] = metatiles[4]; - gBGTilemapBuffers1[offset + 1] = metatiles[5]; - gBGTilemapBuffers1[offset + 0x20] = metatiles[6]; - gBGTilemapBuffers1[offset + 0x21] = metatiles[7]; + gOverworldTilemapBuffer_Bg2[offset] = tiles[4]; + gOverworldTilemapBuffer_Bg2[offset + 1] = tiles[5]; + gOverworldTilemapBuffer_Bg2[offset + 0x20] = tiles[6]; + gOverworldTilemapBuffer_Bg2[offset + 0x21] = tiles[7]; // Draw transparent tiles to the top background layer. - gBGTilemapBuffers2[offset] = 0; - gBGTilemapBuffers2[offset + 1] = 0; - gBGTilemapBuffers2[offset + 0x20] = 0; - gBGTilemapBuffers2[offset + 0x21] = 0; + gOverworldTilemapBuffer_Bg1[offset] = 0; + gOverworldTilemapBuffer_Bg1[offset + 1] = 0; + gOverworldTilemapBuffer_Bg1[offset + 0x20] = 0; + gOverworldTilemapBuffer_Bg1[offset + 0x21] = 0; break; - case 0: // LAYER_TYPE_NORMAL + case METATILE_LAYER_TYPE_NORMAL: // Draw garbage to the bottom background layer. - gBGTilemapBuffers3[offset] = 0x3014; - gBGTilemapBuffers3[offset + 1] = 0x3014; - gBGTilemapBuffers3[offset + 0x20] = 0x3014; - gBGTilemapBuffers3[offset + 0x21] = 0x3014; + gOverworldTilemapBuffer_Bg3[offset] = 0x3014; + gOverworldTilemapBuffer_Bg3[offset + 1] = 0x3014; + gOverworldTilemapBuffer_Bg3[offset + 0x20] = 0x3014; + gOverworldTilemapBuffer_Bg3[offset + 0x21] = 0x3014; // Draw metatile's bottom layer to the middle background layer. - gBGTilemapBuffers1[offset] = metatiles[0]; - gBGTilemapBuffers1[offset + 1] = metatiles[1]; - gBGTilemapBuffers1[offset + 0x20] = metatiles[2]; - gBGTilemapBuffers1[offset + 0x21] = metatiles[3]; + gOverworldTilemapBuffer_Bg2[offset] = tiles[0]; + gOverworldTilemapBuffer_Bg2[offset + 1] = tiles[1]; + gOverworldTilemapBuffer_Bg2[offset + 0x20] = tiles[2]; + gOverworldTilemapBuffer_Bg2[offset + 0x21] = tiles[3]; // Draw metatile's top layer to the top background layer, which covers object event sprites. - gBGTilemapBuffers2[offset] = metatiles[4]; - gBGTilemapBuffers2[offset + 1] = metatiles[5]; - gBGTilemapBuffers2[offset + 0x20] = metatiles[6]; - gBGTilemapBuffers2[offset + 0x21] = metatiles[7]; + gOverworldTilemapBuffer_Bg1[offset] = tiles[4]; + gOverworldTilemapBuffer_Bg1[offset + 1] = tiles[5]; + gOverworldTilemapBuffer_Bg1[offset + 0x20] = tiles[6]; + gOverworldTilemapBuffer_Bg1[offset + 0x21] = tiles[7]; break; } ScheduleBgCopyTilemapToVram(1); diff --git a/src/overworld.c b/src/overworld.c index 4aa579fdd2..a18313d326 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -183,9 +183,9 @@ static u16 (*sPlayerKeyInterceptCallback)(u32); static bool8 sReceivingFromLink; static u8 sRfuKeepAliveTimer; -u16 *gBGTilemapBuffers1; -u16 *gBGTilemapBuffers2; -u16 *gBGTilemapBuffers3; +u16 *gOverworldTilemapBuffer_Bg2; +u16 *gOverworldTilemapBuffer_Bg1; +u16 *gOverworldTilemapBuffer_Bg3; u16 gHeldKeyCodeToSend; void (*gFieldCallback)(void); bool8 (*gFieldCallback2)(void); @@ -1394,12 +1394,12 @@ static void InitOverworldBgs(void) SetBgAttribute(1, BG_ATTR_MOSAIC, 1); SetBgAttribute(2, BG_ATTR_MOSAIC, 1); SetBgAttribute(3, BG_ATTR_MOSAIC, 1); - gBGTilemapBuffers2 = AllocZeroed(BG_SCREEN_SIZE); - gBGTilemapBuffers1 = AllocZeroed(BG_SCREEN_SIZE); - gBGTilemapBuffers3 = AllocZeroed(BG_SCREEN_SIZE); - SetBgTilemapBuffer(1, gBGTilemapBuffers2); - SetBgTilemapBuffer(2, gBGTilemapBuffers1); - SetBgTilemapBuffer(3, gBGTilemapBuffers3); + gOverworldTilemapBuffer_Bg1 = AllocZeroed(BG_SCREEN_SIZE); + gOverworldTilemapBuffer_Bg2 = AllocZeroed(BG_SCREEN_SIZE); + gOverworldTilemapBuffer_Bg3 = AllocZeroed(BG_SCREEN_SIZE); + SetBgTilemapBuffer(1, gOverworldTilemapBuffer_Bg1); + SetBgTilemapBuffer(2, gOverworldTilemapBuffer_Bg2); + SetBgTilemapBuffer(3, gOverworldTilemapBuffer_Bg3); InitStandardTextBoxWindows(); } @@ -1407,12 +1407,9 @@ void CleanupOverworldWindowsAndTilemaps(void) { ClearMirageTowerPulseBlendEffect(); FreeAllOverworldWindowBuffers(); - if (gBGTilemapBuffers3) - FREE_AND_SET_NULL(gBGTilemapBuffers3); - if (gBGTilemapBuffers1) - FREE_AND_SET_NULL(gBGTilemapBuffers1); - if (gBGTilemapBuffers2) - FREE_AND_SET_NULL(gBGTilemapBuffers2); + TRY_FREE_AND_SET_NULL(gOverworldTilemapBuffer_Bg3); + TRY_FREE_AND_SET_NULL(gOverworldTilemapBuffer_Bg2); + TRY_FREE_AND_SET_NULL(gOverworldTilemapBuffer_Bg1); } static void ResetSafariZoneFlag_(void) From a8b466dc80eb22146c6bc517d44fdc133a646555 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 19 Jan 2022 10:15:32 -0500 Subject: [PATCH 358/417] Disambiguate fieldmap names --- gflib/bg.c | 4 +-- include/fieldmap.h | 2 +- include/global.fieldmap.h | 25 ++++++++++++----- src/battle_pyramid.c | 6 ++--- src/braille_puzzles.c | 12 ++++----- src/decoration.c | 37 +++++++++++++------------- src/field_specials.c | 50 +++++++++++++++++----------------- src/fieldmap.c | 56 +++++++++++++++++++-------------------- src/fldeff_escalator.c | 4 +-- src/fldeff_misc.c | 8 +++--- src/scrcmd.c | 2 +- src/secret_base.c | 16 +++++------ src/trainer_hill.c | 4 +-- src/tv.c | 4 +-- 14 files changed, 120 insertions(+), 110 deletions(-) diff --git a/gflib/bg.c b/gflib/bg.c index c96bcbc233..6e97be2073 100644 --- a/gflib/bg.c +++ b/gflib/bg.c @@ -1053,7 +1053,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt for (x16 = x; x16 < (x + width); x16++) { CopyTileMapEntry(&firstTileNum, &((u16*)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0); - firstTileNum = (firstTileNum & (METATILE_COLLISION_MASK | METATILE_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & METATILE_ID_MASK); + firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK); } } break; @@ -1064,7 +1064,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt for (x16 = x; x16 < (x + width); x16++) { ((u8*)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum; - firstTileNum = (firstTileNum & (METATILE_COLLISION_MASK | METATILE_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & METATILE_ID_MASK); + firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK); } } break; diff --git a/include/fieldmap.h b/include/fieldmap.h index aabfce461e..db060497a9 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -29,7 +29,7 @@ void GetCameraCoords(u16*, u16*); bool8 MapGridIsImpassableAt(int, int); int GetMapBorderIdAt(int x, int y); bool32 CanCameraMoveInDirection(int direction); -u16 GetBehaviorByMetatileId(u16 metatileId); +u16 GetMetatileAttributesById(u16 metatileId); void GetCameraFocusCoords(u16 *x, u16 *y); u8 MapGridGetMetatileLayerTypeAt(int x, int y); u8 MapGridGetZCoordAt(int x, int y); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 2613682fd2..46450ed446 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -1,13 +1,24 @@ #ifndef GUARD_GLOBAL_FIELDMAP_H #define GUARD_GLOBAL_FIELDMAP_H -#define METATILE_BEHAVIOR_MASK 0x00FF -#define METATILE_COLLISION_MASK 0x0C00 -#define METATILE_ID_MASK 0x03FF -#define METATILE_ID_UNDEFINED 0x03FF -#define METATILE_ELEVATION_SHIFT 12 -#define METATILE_COLLISION_SHIFT 10 -#define METATILE_ELEVATION_MASK 0xF000 +// Masks/shifts for blocks in the map grid +// Map grid blocks consist of a 10 bit metatile id, a 2 bit collision value, and a 4 bit elevation value +// This is the data stored in each data/layouts/*/map.bin and border.bin file +#define MAPGRID_METATILE_ID_MASK 0x03FF // Bits 1-10 +#define MAPGRID_COLLISION_MASK 0x0C00 // Bits 11-12 +#define MAPGRID_ELEVATION_MASK 0xF000 // Bits 13-16 +#define MAPGRID_COLLISION_SHIFT 10 +#define MAPGRID_ELEVATION_SHIFT 12 + +// An undefined map grid block has all metatile id bits set and nothing else +#define MAPGRID_UNDEFINED MAPGRID_METATILE_ID_MASK + +// Masks/shifts for metatile attributes +// Metatile attributes consist of an 8 bit behavior value, 4 unused bits, and a 4 bit layer type value +// This is the data stored in each data/tilesets/*/*/metatile_attributes.bin file +#define METATILE_ATTR_BEHAVIOR_MASK 0x00FF // Bits 1-8 +#define METATILE_ATTR_LAYER_MASK 0xF000 // Bits 13-16 +#define METATILE_ATTR_LAYER_SHIFT 12 enum { METATILE_LAYER_TYPE_NORMAL, // Metatile uses middle and top bg layers diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index b10690ce45..1547603968 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -1239,7 +1239,7 @@ static u8 GetPostBattleDirectionHintTextIndex(int *hintType, u8 minDistanceForEx { for (x = 0; x < 32; x++) { - if ((map[x] & METATILE_ID_MASK) == METATILE_BattlePyramid_Exit) + if ((map[x] & MAPGRID_METATILE_ID_MASK) == METATILE_BattlePyramid_Exit) { x += MAP_OFFSET - gObjectEvents[gSelectedObjectEvent].initialCoords.x; y += MAP_OFFSET - gObjectEvents[gSelectedObjectEvent].initialCoords.y; @@ -1545,7 +1545,7 @@ void GenerateBattlePyramidFloorLayout(u16 *backupMapData, bool8 setPlayerPositio { for (x = 0; x < mapLayout->width; x++) { - if ((layoutMap[x] & METATILE_ID_MASK) != METATILE_BattlePyramid_Exit) + if ((layoutMap[x] & MAPGRID_METATILE_ID_MASK) != METATILE_BattlePyramid_Exit) { map[x] = layoutMap[x]; } @@ -1556,7 +1556,7 @@ void GenerateBattlePyramidFloorLayout(u16 *backupMapData, bool8 setPlayerPositio gSaveBlock1Ptr->pos.x = (mapLayout->width * (i % 4)) + x; gSaveBlock1Ptr->pos.y = (mapLayout->height * (i / 4)) + y; } - map[x] = (layoutMap[x] & (METATILE_ELEVATION_MASK | METATILE_COLLISION_MASK)) | METATILE_BattlePyramid_Floor; + map[x] = (layoutMap[x] & (MAPGRID_ELEVATION_MASK | MAPGRID_COLLISION_MASK)) | METATILE_BattlePyramid_Floor; } else { diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 26caa830d3..876e6b4a73 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -80,9 +80,9 @@ void DoBrailleDigEffect(void) MapGridSetMetatileIdAt( 9 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopLeft); MapGridSetMetatileIdAt(10 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopMid); MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopRight); - MapGridSetMetatileIdAt( 9 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 9 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | MAPGRID_COLLISION_MASK); MapGridSetMetatileIdAt(10 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomMid); - MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | MAPGRID_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BANG); FlagSet(FLAG_SYS_BRAILLE_DIG); @@ -207,9 +207,9 @@ static void DoBrailleRegirockEffect(void) MapGridSetMetatileIdAt(7 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopLeft); MapGridSetMetatileIdAt(8 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopMid); MapGridSetMetatileIdAt(9 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopRight); - MapGridSetMetatileIdAt(7 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(7 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | MAPGRID_COLLISION_MASK); MapGridSetMetatileIdAt(8 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomMid); - MapGridSetMetatileIdAt(9 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(9 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | MAPGRID_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BANG); FlagSet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED); @@ -246,9 +246,9 @@ static void DoBrailleRegisteelEffect(void) MapGridSetMetatileIdAt(7 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopLeft); MapGridSetMetatileIdAt(8 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopMid); MapGridSetMetatileIdAt(9 + MAP_OFFSET, 19 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_TopRight); - MapGridSetMetatileIdAt(7 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(7 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomLeft | MAPGRID_COLLISION_MASK); MapGridSetMetatileIdAt(8 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomMid); - MapGridSetMetatileIdAt(9 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(9 + MAP_OFFSET, 20 + MAP_OFFSET, METATILE_Cave_SealedChamberEntrance_BottomRight | MAPGRID_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BANG); FlagSet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED); diff --git a/src/decoration.c b/src/decoration.c index 78f6ccb407..825c868187 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -1185,10 +1185,10 @@ static u16 GetDecorationElevation(u8 decoration, u8 tileIndex) switch (decoration) { case DECOR_STAND: - elevation = sDecorationStandElevations[tileIndex] << METATILE_ELEVATION_SHIFT; + elevation = sDecorationStandElevations[tileIndex] << MAPGRID_ELEVATION_SHIFT; return elevation; case DECOR_SLIDE: - elevation = sDecorationSlideElevation[tileIndex] << METATILE_ELEVATION_SHIFT; + elevation = sDecorationSlideElevation[tileIndex] << MAPGRID_ELEVATION_SHIFT; return elevation; default: return elevation; @@ -1199,7 +1199,7 @@ static void ShowDecorationOnMap_(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight, { u16 i, j; s16 x, y; - u16 behavior; + u16 attributes; u16 impassableFlag; u16 overlapsWall; u16 elevation; @@ -1210,9 +1210,9 @@ static void ShowDecorationOnMap_(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight, for (i = 0; i < decWidth; i++) { x = mapX + i; - behavior = GetBehaviorByMetatileId(NUM_TILES_IN_PRIMARY + gDecorations[decoration].tiles[j * decWidth + i]); - if (MetatileBehavior_IsSecretBaseImpassable(behavior) == TRUE || (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (behavior >> METATILE_ELEVATION_SHIFT))) - impassableFlag = METATILE_COLLISION_MASK; + attributes = GetMetatileAttributesById(NUM_TILES_IN_PRIMARY + gDecorations[decoration].tiles[j * decWidth + i]); + if (MetatileBehavior_IsSecretBaseImpassable(attributes) == TRUE || (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (attributes >> METATILE_ATTR_LAYER_SHIFT))) + impassableFlag = MAPGRID_COLLISION_MASK; else impassableFlag = 0; @@ -1471,17 +1471,16 @@ static void AttemptCancelPlaceDecoration(u8 taskId) DisplayItemMessageOnField(taskId, gStringVar4, CancelDecoratingPrompt); } -// Note: behaviorBy is pre-anded with METATILE_ELEVATION_MASK. -static bool8 IsNonBlockNonElevated(u8 behaviorAt, u16 behaviorBy) +static bool8 IsNonBlockNonElevated(u8 behaviorAt, u16 layerType) { - if (MetatileBehavior_IsBlockDecoration(behaviorAt) != TRUE || behaviorBy != 0) + if (MetatileBehavior_IsBlockDecoration(behaviorAt) != TRUE || layerType != 0) return FALSE; return TRUE; } -static bool8 IsntInitialPosition(u8 taskId, s16 x, s16 y, u16 behaviorBy) +static bool8 IsntInitialPosition(u8 taskId, s16 x, s16 y, u16 layerType) { - if (x == gTasks[taskId].tInitialX + MAP_OFFSET && y == gTasks[taskId].tInitialY + MAP_OFFSET && behaviorBy != 0) + if (x == gTasks[taskId].tInitialX + MAP_OFFSET && y == gTasks[taskId].tInitialY + MAP_OFFSET && layerType != 0) return FALSE; return TRUE; } @@ -1505,7 +1504,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) u8 i; u8 j; u8 behaviorAt; - u16 behaviorBy; + u16 layerType; u8 mapY; u8 mapX; s16 curY; @@ -1524,11 +1523,11 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) { curX = gTasks[taskId].tCursorX + j; behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY); - behaviorBy = GetBehaviorByMetatileId(NUM_TILES_IN_PRIMARY + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ELEVATION_MASK; + layerType = GetMetatileAttributesById(NUM_TILES_IN_PRIMARY + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ATTR_LAYER_MASK; if (!IsFloorOrBoardAndHole(behaviorAt, decoration)) return FALSE; - if (!IsntInitialPosition(taskId, curX, curY, behaviorBy)) + if (!IsntInitialPosition(taskId, curX, curY, layerType)) return FALSE; behaviorAt = GetObjectEventIdByXYZ(curX, curY, 0); @@ -1545,11 +1544,11 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) { curX = gTasks[taskId].tCursorX + j; behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY); - behaviorBy = GetBehaviorByMetatileId(NUM_TILES_IN_PRIMARY + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ELEVATION_MASK; - if (!MetatileBehavior_IsNormal(behaviorAt) && !IsNonBlockNonElevated(behaviorAt, behaviorBy)) + layerType = GetMetatileAttributesById(NUM_TILES_IN_PRIMARY + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ATTR_LAYER_MASK; + if (!MetatileBehavior_IsNormal(behaviorAt) && !IsNonBlockNonElevated(behaviorAt, layerType)) return FALSE; - if (!IsntInitialPosition(taskId, curX, curY, behaviorBy)) + if (!IsntInitialPosition(taskId, curX, curY, layerType)) return FALSE; if (GetObjectEventIdByXYZ(curX, curY, 0) != OBJECT_EVENTS_COUNT) @@ -1562,11 +1561,11 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) { curX = gTasks[taskId].tCursorX + j; behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY); - behaviorBy = GetBehaviorByMetatileId(NUM_TILES_IN_PRIMARY + decoration->tiles[j]) & METATILE_ELEVATION_MASK; + layerType = GetMetatileAttributesById(NUM_TILES_IN_PRIMARY + decoration->tiles[j]) & METATILE_ATTR_LAYER_MASK; if (!MetatileBehavior_IsNormal(behaviorAt) && !MetatileBehavior_IsSecretBaseNorthWall(behaviorAt)) return FALSE; - if (!IsntInitialPosition(taskId, curX, curY, behaviorBy)) + if (!IsntInitialPosition(taskId, curX, curY, layerType)) return FALSE; behaviorAt = GetObjectEventIdByXYZ(curX, curY, 0); diff --git a/src/field_specials.c b/src/field_specials.c index 0a72369138..f676600c0e 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -650,10 +650,10 @@ void MauvilleGymSetDefaultBarriers(void) MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH2_On); break; case METATILE_MauvilleGym_GreenBeamH3_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH3_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH3_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_GreenBeamH4_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH4_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamH4_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_RedBeamH1_On: MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH1_Off); @@ -674,37 +674,37 @@ void MauvilleGymSetDefaultBarriers(void) MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH2_On); break; case METATILE_MauvilleGym_RedBeamH3_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH3_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH3_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_RedBeamH4_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_GreenBeamV1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_GreenBeamV2_On: MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_FloorTile); break; case METATILE_MauvilleGym_RedBeamV1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_Off | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_Off | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_RedBeamV2_On: MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_FloorTile); break; case METATILE_MauvilleGym_PoleBottom_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamV1_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamV1_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_FloorTile: if (MapGridGetMetatileIdAt(x, y - 1) == METATILE_MauvilleGym_GreenBeamV1_On) - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamV2_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_GreenBeamV2_On | MAPGRID_COLLISION_MASK); else - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamV2_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamV2_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_PoleBottom_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamV1_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamV1_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_PoleTop_Off: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_PoleTop_On: MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleTop_Off); @@ -755,10 +755,10 @@ void MauvilleGymDeactivatePuzzle(void) MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_RedBeamH4_Off); break; case METATILE_MauvilleGym_GreenBeamV1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_On | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_On | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_RedBeamV1_On: - MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_Off | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_MauvilleGym_PoleBottom_Off | MAPGRID_COLLISION_MASK); break; case METATILE_MauvilleGym_GreenBeamV2_On: case METATILE_MauvilleGym_RedBeamV2_On: @@ -867,8 +867,8 @@ static void PetalburgGymSetDoorMetatiles(u8 roomNumber, u16 metatileId) } for (i = 0; i < nDoors; i++) { - MapGridSetMetatileIdAt(doorCoordsX[i] + MAP_OFFSET, doorCoordsY[i] + MAP_OFFSET, metatileId | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(doorCoordsX[i] + MAP_OFFSET, doorCoordsY[i] + MAP_OFFSET + 1, (metatileId + 8) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(doorCoordsX[i] + MAP_OFFSET, doorCoordsY[i] + MAP_OFFSET, metatileId | MAPGRID_COLLISION_MASK); + MapGridSetMetatileIdAt(doorCoordsX[i] + MAP_OFFSET, doorCoordsY[i] + MAP_OFFSET + 1, (metatileId + 8) | MAPGRID_COLLISION_MASK); } DrawWholeMapView(); } @@ -1040,7 +1040,7 @@ static void PCTurnOnEffect_1(s16 isPcTurnedOn, s8 dx, s8 dy) else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE) tileId = METATILE_BrendansMaysHouse_MayPC_On; } - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK); } void DoPCTurnOffEffect(void) @@ -1075,7 +1075,7 @@ static void PCTurnOffEffect(void) tileId = METATILE_BrendansMaysHouse_BrendanPC_Off; else if (gSpecialVar_0x8004 == 2) tileId = METATILE_BrendansMaysHouse_MayPC_Off; - MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK); DrawWholeMapView(); } @@ -1106,13 +1106,13 @@ static void LotteryCornerComputerEffect(struct Task *task) task->data[3] = 0; if (task->data[4] != 0) { - MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Normal | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Normal | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Normal | MAPGRID_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Normal | MAPGRID_COLLISION_MASK); } else { - MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Flash | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Flash | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Flash | MAPGRID_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Flash | MAPGRID_COLLISION_MASK); } DrawWholeMapView(); task->data[4] ^= 1; @@ -1124,8 +1124,8 @@ static void LotteryCornerComputerEffect(struct Task *task) void EndLotteryCornerComputerEffect(void) { - MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Normal | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Normal | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 1 + MAP_OFFSET, METATILE_Shop_Laptop1_Normal | MAPGRID_COLLISION_MASK); + MapGridSetMetatileIdAt(11 + MAP_OFFSET, 2 + MAP_OFFSET, METATILE_Shop_Laptop2_Normal | MAPGRID_COLLISION_MASK); DrawWholeMapView(); } @@ -1872,7 +1872,7 @@ static void Task_MoveElevatorWindowLights(u8 taskId) for (y = 0; y < 3; y++) { for (x = 0; x < 3; x++) - MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Ascending[y][data[0] % 3] | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Ascending[y][data[0] % 3] | MAPGRID_COLLISION_MASK); } } // descending @@ -1881,7 +1881,7 @@ static void Task_MoveElevatorWindowLights(u8 taskId) for (y = 0; y < 3; y++) { for (x = 0; x < 3; x++) - MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Descending[y][data[0] % 3] | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x + MAP_OFFSET + 1, y + MAP_OFFSET, sElevatorWindowTiles_Descending[y][data[0] % 3] | MAPGRID_COLLISION_MASK); } } DrawWholeMapView(); diff --git a/src/fieldmap.c b/src/fieldmap.c index aff72c4c68..8be4206e23 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -43,12 +43,12 @@ static void FillWestConnection(struct MapHeader const *mapHeader, struct MapHead static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset); static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader); static void LoadSavedMapView(void); -static bool8 SkipCopyingMetatileFromSavedMap(u16* mapMetatilePtr, u16 mapWidth, u8 yMode); +static bool8 SkipCopyingMetatileFromSavedMap(u16* mapBlock, u16 mapWidth, u8 yMode); static struct MapConnection *GetIncomingConnection(u8 direction, int x, int y); static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, struct MapConnection *connection); static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, int offset); -#define MapGridGetBorderTileAt(x, y) ({ \ +#define GetBorderBlockAt(x, y)({ \ u16 block; \ int i; \ u16 *border = gMapHeader.mapLayout->border; \ @@ -56,12 +56,12 @@ static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, i = (x + 1) & 1; \ i += ((y + 1) & 1) * 2; \ \ - block = gMapHeader.mapLayout->border[i] | METATILE_COLLISION_MASK; \ + block = gMapHeader.mapLayout->border[i] | MAPGRID_COLLISION_MASK; \ }) #define AreCoordsWithinMapGridBounds(x, y) (x >= 0 && x < gBackupMapLayout.width && y >= 0 && y < gBackupMapLayout.height) -#define MapGridGetTileAt(x, y) (AreCoordsWithinMapGridBounds(x, y) ? gBackupMapLayout.map[x + gBackupMapLayout.width * y] : MapGridGetBorderTileAt(x, y)) +#define GetMapGridBlockAt(x, y) (AreCoordsWithinMapGridBounds(x, y) ? gBackupMapLayout.map[x + gBackupMapLayout.width * y] : GetBorderBlockAt(x, y)) struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection) { @@ -87,13 +87,13 @@ void InitMapFromSavedGame(void) void InitBattlePyramidMap(bool8 setPlayerPosition) { - CpuFastFill(METATILE_ID_UNDEFINED << 16 | METATILE_ID_UNDEFINED, gBackupMapData, sizeof(gBackupMapData)); + CpuFastFill(MAPGRID_UNDEFINED << 16 | MAPGRID_UNDEFINED, gBackupMapData, sizeof(gBackupMapData)); GenerateBattlePyramidFloorLayout(gBackupMapData, setPlayerPosition); } void InitTrainerHillMap(void) { - CpuFastFill(METATILE_ID_UNDEFINED << 16 | METATILE_ID_UNDEFINED, gBackupMapData, sizeof(gBackupMapData)); + CpuFastFill(MAPGRID_UNDEFINED << 16 | MAPGRID_UNDEFINED, gBackupMapData, sizeof(gBackupMapData)); GenerateTrainerHillFloorLayout(gBackupMapData); } @@ -103,7 +103,7 @@ static void InitMapLayoutData(struct MapHeader *mapHeader) int width; int height; mapLayout = mapHeader->mapLayout; - CpuFastFill16(METATILE_ID_UNDEFINED, gBackupMapData, sizeof(gBackupMapData)); + CpuFastFill16(MAPGRID_UNDEFINED, gBackupMapData, sizeof(gBackupMapData)); gBackupMapLayout.map = gBackupMapData; width = mapLayout->width + MAP_OFFSET_W; gBackupMapLayout.width = width; @@ -344,44 +344,44 @@ static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHead u8 MapGridGetZCoordAt(int x, int y) { - u16 block = MapGridGetTileAt(x, y); + u16 block = GetMapGridBlockAt(x, y); - if (block == METATILE_ID_UNDEFINED) + if (block == MAPGRID_UNDEFINED) return 0; - return block >> METATILE_ELEVATION_SHIFT; + return block >> MAPGRID_ELEVATION_SHIFT; } bool8 MapGridIsImpassableAt(int x, int y) { - u16 block = MapGridGetTileAt(x, y); + u16 block = GetMapGridBlockAt(x, y); - if (block == METATILE_ID_UNDEFINED) + if (block == MAPGRID_UNDEFINED) return TRUE; - return (block & METATILE_COLLISION_MASK) >> METATILE_COLLISION_SHIFT; + return (block & MAPGRID_COLLISION_MASK) >> MAPGRID_COLLISION_SHIFT; } u32 MapGridGetMetatileIdAt(int x, int y) { - u16 block = MapGridGetTileAt(x, y); + u16 block = GetMapGridBlockAt(x, y); - if (block == METATILE_ID_UNDEFINED) - return MapGridGetBorderTileAt(x, y) & METATILE_ID_MASK; + if (block == MAPGRID_UNDEFINED) + return GetBorderBlockAt(x, y) & MAPGRID_METATILE_ID_MASK; - return block & METATILE_ID_MASK; + return block & MAPGRID_METATILE_ID_MASK; } u32 MapGridGetMetatileBehaviorAt(int x, int y) { u16 metatile = MapGridGetMetatileIdAt(x, y); - return GetBehaviorByMetatileId(metatile) & METATILE_BEHAVIOR_MASK; + return GetMetatileAttributesById(metatile) & METATILE_ATTR_BEHAVIOR_MASK; } u8 MapGridGetMetatileLayerTypeAt(int x, int y) { u16 metatile = MapGridGetMetatileIdAt(x, y); - return (GetBehaviorByMetatileId(metatile) & METATILE_ELEVATION_MASK) >> METATILE_ELEVATION_SHIFT; + return (GetMetatileAttributesById(metatile) & METATILE_ATTR_LAYER_MASK) >> METATILE_ATTR_LAYER_SHIFT; } void MapGridSetMetatileIdAt(int x, int y, u16 metatile) @@ -390,7 +390,7 @@ void MapGridSetMetatileIdAt(int x, int y, u16 metatile) if (AreCoordsWithinMapGridBounds(x, y)) { i = x + y * gBackupMapLayout.width; - gBackupMapLayout.map[i] = (gBackupMapLayout.map[i] & METATILE_ELEVATION_MASK) | (metatile & ~METATILE_ELEVATION_MASK); + gBackupMapLayout.map[i] = (gBackupMapLayout.map[i] & MAPGRID_ELEVATION_MASK) | (metatile & ~MAPGRID_ELEVATION_MASK); } } @@ -404,7 +404,7 @@ void MapGridSetMetatileEntryAt(int x, int y, u16 metatile) } } -u16 GetBehaviorByMetatileId(u16 metatile) +u16 GetMetatileAttributesById(u16 metatile) { u16 *attributes; if (metatile < NUM_METATILES_IN_PRIMARY) @@ -565,7 +565,7 @@ static void MoveMapViewToBackup(u8 direction) int GetMapBorderIdAt(int x, int y) { - if (MapGridGetTileAt(x, y) == METATILE_ID_UNDEFINED) + if (GetMapGridBlockAt(x, y) == MAPGRID_UNDEFINED) return CONNECTION_INVALID; if (x >= (gBackupMapLayout.width - (MAP_OFFSET + 1))) @@ -817,23 +817,23 @@ void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable) if (AreCoordsWithinMapGridBounds(x, y)) { if (impassable) - gBackupMapLayout.map[x + gBackupMapLayout.width * y] |= METATILE_COLLISION_MASK; + gBackupMapLayout.map[x + gBackupMapLayout.width * y] |= MAPGRID_COLLISION_MASK; else - gBackupMapLayout.map[x + gBackupMapLayout.width * y] &= ~METATILE_COLLISION_MASK; + gBackupMapLayout.map[x + gBackupMapLayout.width * y] &= ~MAPGRID_COLLISION_MASK; } } -static bool8 SkipCopyingMetatileFromSavedMap(u16* mapMetatilePtr, u16 mapWidth, u8 yMode) +static bool8 SkipCopyingMetatileFromSavedMap(u16* mapBlock, u16 mapWidth, u8 yMode) { if (yMode == 0xFF) return FALSE; if (yMode == 0) - mapMetatilePtr -= mapWidth; + mapBlock -= mapWidth; else - mapMetatilePtr += mapWidth; + mapBlock += mapWidth; - if (IsLargeBreakableDecoration(*mapMetatilePtr & METATILE_ID_MASK, yMode) == TRUE) + if (IsLargeBreakableDecoration(*mapBlock & MAPGRID_METATILE_ID_MASK, yMode) == TRUE) return TRUE; return FALSE; } diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c index 769e735623..0dc98c319c 100644 --- a/src/fldeff_escalator.c +++ b/src/fldeff_escalator.c @@ -126,13 +126,13 @@ static void Task_DrawEscalator(u8 taskId) SetEscalatorMetatile(taskId, sEscalatorMetatiles_1F_1, 0); break; case 2: - SetEscalatorMetatile(taskId, sEscalatorMetatiles_1F_2, METATILE_COLLISION_MASK); + SetEscalatorMetatile(taskId, sEscalatorMetatiles_1F_2, MAPGRID_COLLISION_MASK); break; case 3: SetEscalatorMetatile(taskId, sEscalatorMetatiles_1F_3, 0); break; case 4: - SetEscalatorMetatile(taskId, sEscalatorMetatiles_2F_0, METATILE_COLLISION_MASK); + SetEscalatorMetatile(taskId, sEscalatorMetatiles_2F_0, MAPGRID_COLLISION_MASK); break; case 5: SetEscalatorMetatile(taskId, sEscalatorMetatiles_2F_1, 0); diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index c01babb68a..4f3f53fa60 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -840,9 +840,9 @@ void DoSecretBasePCTurnOffEffect(void) PlaySE(SE_PC_OFF); if (!VarGet(VAR_CURRENT_SECRET_BASE)) - MapGridSetMetatileIdAt(x, y, METATILE_SecretBase_PC | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_SecretBase_PC | MAPGRID_COLLISION_MASK); else - MapGridSetMetatileIdAt(x, y, METATILE_SecretBase_RegisterPC | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_SecretBase_RegisterPC | MAPGRID_COLLISION_MASK); CurrentMapDrawMetatileAt(x, y); } @@ -1083,7 +1083,7 @@ static void SpriteCB_SandPillar_BreakTop(struct Sprite *sprite) PlaySE(SE_M_ROCK_THROW); if (MapGridGetMetatileIdAt(gFieldEffectArguments[5], gFieldEffectArguments[6] - 1) == METATILE_SecretBase_SandOrnament_TopWall) - MapGridSetMetatileIdAt(gFieldEffectArguments[5], gFieldEffectArguments[6] - 1, METATILE_SecretBase_Wall_TopMid | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(gFieldEffectArguments[5], gFieldEffectArguments[6] - 1, METATILE_SecretBase_Wall_TopMid | MAPGRID_COLLISION_MASK); else MapGridSetMetatileIdAt(gFieldEffectArguments[5], gFieldEffectArguments[6] - 1, METATILE_SecretBase_SandOrnament_BrokenTop); @@ -1103,7 +1103,7 @@ static void SpriteCB_SandPillar_BreakBase(struct Sprite *sprite) } else { - MapGridSetMetatileIdAt(gFieldEffectArguments[5], gFieldEffectArguments[6], METATILE_SecretBase_SandOrnament_BrokenBase | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(gFieldEffectArguments[5], gFieldEffectArguments[6], METATILE_SecretBase_SandOrnament_BrokenBase | MAPGRID_COLLISION_MASK); CurrentMapDrawMetatileAt(gFieldEffectArguments[5], gFieldEffectArguments[6]); sprite->data[0] = 0; sprite->callback = SpriteCB_SandPillar_End; diff --git a/src/scrcmd.c b/src/scrcmd.c index 2c18cb565e..a5a380759e 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2046,7 +2046,7 @@ bool8 ScrCmd_setmetatile(struct ScriptContext *ctx) if (!isImpassable) MapGridSetMetatileIdAt(x, y, tileId); else - MapGridSetMetatileIdAt(x, y, tileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, tileId | MAPGRID_COLLISION_MASK); return FALSE; } diff --git a/src/secret_base.c b/src/secret_base.c index 8fc97141fc..9398c4bb2f 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -305,7 +305,7 @@ static void FindMetatileIdMapCoords(s16 *x, s16 *y, u16 metatileId) { for (i = 0; i < mapLayout->width; i++) { - if ((mapLayout->map[j * mapLayout->width + i] & METATILE_ID_MASK) == metatileId) + if ((mapLayout->map[j * mapLayout->width + i] & MAPGRID_METATILE_ID_MASK) == metatileId) { *x = i; *y = j; @@ -330,7 +330,7 @@ void ToggleSecretBaseEntranceMetatile(void) { if (sSecretBaseEntranceMetatiles[i].closedMetatileId == metatileId) { - MapGridSetMetatileIdAt(x, y, sSecretBaseEntranceMetatiles[i].openMetatileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, sSecretBaseEntranceMetatiles[i].openMetatileId | MAPGRID_COLLISION_MASK); CurrentMapDrawMetatileAt(x, y); return; } @@ -341,7 +341,7 @@ void ToggleSecretBaseEntranceMetatile(void) { if (sSecretBaseEntranceMetatiles[i].openMetatileId == metatileId) { - MapGridSetMetatileIdAt(x, y, sSecretBaseEntranceMetatiles[i].closedMetatileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, sSecretBaseEntranceMetatiles[i].closedMetatileId | MAPGRID_COLLISION_MASK); CurrentMapDrawMetatileAt(x, y); return; } @@ -396,7 +396,7 @@ void SetOccupiedSecretBaseEntranceMetatiles(struct MapEvents const *events) { if (sSecretBaseEntranceMetatiles[i].closedMetatileId == tile_id) { - MapGridSetMetatileIdAt(x, y, sSecretBaseEntranceMetatiles[i].openMetatileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, sSecretBaseEntranceMetatiles[i].openMetatileId | MAPGRID_COLLISION_MASK); break; } } @@ -475,7 +475,7 @@ static void EnterNewlyCreatedSecretBase_StartFadeIn(void) FindMetatileIdMapCoords(&x, &y, METATILE_SecretBase_PC); x += MAP_OFFSET; y += MAP_OFFSET; - MapGridSetMetatileIdAt(x, y, METATILE_SecretBase_PC | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_SecretBase_PC | MAPGRID_COLLISION_MASK); CurrentMapDrawMetatileAt(x, y); FadeInFromBlack(); CreateTask(EnterNewlyCreatedSecretBase_WaitFadeIn, 0); @@ -536,13 +536,13 @@ void InitSecretBaseAppearance(bool8 hidePC) { // Another player's secret base. Change PC type to the "Register" PC. FindMetatileIdMapCoords(&x, &y, METATILE_SecretBase_PC); - MapGridSetMetatileIdAt(x + MAP_OFFSET, y + MAP_OFFSET, METATILE_SecretBase_RegisterPC | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x + MAP_OFFSET, y + MAP_OFFSET, METATILE_SecretBase_RegisterPC | MAPGRID_COLLISION_MASK); } else if (hidePC == TRUE && VarGet(VAR_SECRET_BASE_INITIALIZED) == 1) { // Change PC to regular ground tile. FindMetatileIdMapCoords(&x, &y, METATILE_SecretBase_PC); - MapGridSetMetatileIdAt(x + MAP_OFFSET, y + MAP_OFFSET, METATILE_SecretBase_Ground | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x + MAP_OFFSET, y + MAP_OFFSET, METATILE_SecretBase_Ground | MAPGRID_COLLISION_MASK); } } } @@ -838,7 +838,7 @@ static void ClosePlayerSecretBaseEntrance(void) { MapGridSetMetatileIdAt(events->bgEvents[i].x + MAP_OFFSET, events->bgEvents[i].y + MAP_OFFSET, - sSecretBaseEntranceMetatiles[j].closedMetatileId | METATILE_COLLISION_MASK); + sSecretBaseEntranceMetatiles[j].closedMetatileId | MAPGRID_COLLISION_MASK); break; } } diff --git a/src/trainer_hill.c b/src/trainer_hill.c index 3ada262e56..bf988b49a3 100644 --- a/src/trainer_hill.c +++ b/src/trainer_hill.c @@ -677,9 +677,9 @@ static u16 GetMetatileForFloor(u8 floorId, u32 x, u32 y, u32 stride) // stride i impassable = (sHillData->floors[floorId].display.collisionData[y] >> (15 - x) & 1); metatile = sHillData->floors[floorId].display.metatileData[stride * y + x] + NUM_METATILES_IN_PRIMARY; - elevation = 3 << METATILE_ELEVATION_SHIFT; + elevation = 3 << MAPGRID_ELEVATION_SHIFT; - return ((impassable << METATILE_COLLISION_SHIFT) & METATILE_COLLISION_MASK) | elevation | (metatile & METATILE_ID_MASK); + return ((impassable << MAPGRID_COLLISION_SHIFT) & MAPGRID_COLLISION_MASK) | elevation | (metatile & MAPGRID_METATILE_ID_MASK); } void GenerateTrainerHillFloorLayout(u16 *mapArg) diff --git a/src/tv.c b/src/tv.c index 710b989681..b9d064026c 100644 --- a/src/tv.c +++ b/src/tv.c @@ -852,7 +852,7 @@ void UpdateTVScreensOnMap(int width, int height) } } -static void SetTVMetatilesOnMap(int width, int height, u16 tileId) +static void SetTVMetatilesOnMap(int width, int height, u16 metatileId) { int x; int y; @@ -862,7 +862,7 @@ static void SetTVMetatilesOnMap(int width, int height, u16 tileId) for (x = 0; x < width; x++) { if (MapGridGetMetatileBehaviorAt(x, y) == MB_TELEVISION) - MapGridSetMetatileIdAt(x, y, tileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, metatileId | MAPGRID_COLLISION_MASK); } } } From 8200fda14e5cddabcd2a4aaddf4f558cfbf898fb Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 19 Jan 2022 10:56:54 -0500 Subject: [PATCH 359/417] Fix decorations metatile attribute names --- include/constants/metatile_behaviors.h | 4 ++-- include/metatile_behavior.h | 2 +- src/decoration.c | 16 ++++++++++------ src/metatile_behavior.c | 18 ++++++++++-------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h index 5f37713f30..1c3d33c00b 100755 --- a/include/constants/metatile_behaviors.h +++ b/include/constants/metatile_behaviors.h @@ -179,8 +179,8 @@ #define MB_UNUSED_AF 0xAF #define MB_SECRET_BASE_PC 0xB0 #define MB_SECRET_BASE_REGISTER_PC 0xB1 -#define MB_SECRET_BASE_UNUSED 0xB2 -#define MB_BLOCK_DECORATION 0xB3 +#define MB_SECRET_BASE_OBSTACLE 0xB2 +#define MB_SECRET_BASE_TRAINER_SPOT 0xB3 #define MB_SECRET_BASE_DECORATION 0xB4 #define MB_HOLDS_SMALL_DECORATION 0xB5 #define MB_UNUSED_B6 0xB6 diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index 5895426cf0..c2d0d23ee3 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -57,7 +57,7 @@ bool8 MetatileBehavior_IsSecretBaseTree(u8); bool8 MetatileBehavior_IsSecretBaseShrub(u8); bool8 MetatileBehavior_IsSecretBasePC(u8); bool8 MetatileBehavior_IsRecordMixingSecretBasePC(u8); -bool8 MetatileBehavior_IsBlockDecoration(u8); +bool8 MetatileBehavior_IsSecretBaseTrainerSpot(u8); bool8 MetatileBehavior_IsSecretBaseImpassable(u8); bool8 MetatileBehavior_IsSecretBaseDecorationBase(u8); bool8 MetatileBehavior_IsSecretBasePoster(u8); diff --git a/src/decoration.c b/src/decoration.c index 825c868187..0448778c39 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -1211,7 +1211,8 @@ static void ShowDecorationOnMap_(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight, { x = mapX + i; attributes = GetMetatileAttributesById(NUM_TILES_IN_PRIMARY + gDecorations[decoration].tiles[j * decWidth + i]); - if (MetatileBehavior_IsSecretBaseImpassable(attributes) == TRUE || (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (attributes >> METATILE_ATTR_LAYER_SHIFT))) + if (MetatileBehavior_IsSecretBaseImpassable(attributes & METATILE_ATTR_BEHAVIOR_MASK) == TRUE + || (gDecorations[decoration].permission != DECORPERM_PASS_FLOOR && (attributes >> METATILE_ATTR_LAYER_SHIFT) != METATILE_LAYER_TYPE_NORMAL)) impassableFlag = MAPGRID_COLLISION_MASK; else impassableFlag = 0; @@ -1471,23 +1472,26 @@ static void AttemptCancelPlaceDecoration(u8 taskId) DisplayItemMessageOnField(taskId, gStringVar4, CancelDecoratingPrompt); } -static bool8 IsNonBlockNonElevated(u8 behaviorAt, u16 layerType) +static bool8 IsSecretBaseTrainerSpot(u8 behaviorAt, u16 layerType) { - if (MetatileBehavior_IsBlockDecoration(behaviorAt) != TRUE || layerType != 0) + if (!(MetatileBehavior_IsSecretBaseTrainerSpot(behaviorAt) == TRUE && layerType == METATILE_LAYER_TYPE_NORMAL)) return FALSE; return TRUE; } +// Can't place decoration where the player was standing when they interacted with the PC static bool8 IsntInitialPosition(u8 taskId, s16 x, s16 y, u16 layerType) { - if (x == gTasks[taskId].tInitialX + MAP_OFFSET && y == gTasks[taskId].tInitialY + MAP_OFFSET && layerType != 0) + if (x == gTasks[taskId].tInitialX + MAP_OFFSET + && y == gTasks[taskId].tInitialY + MAP_OFFSET + && layerType != METATILE_LAYER_TYPE_NORMAL) return FALSE; return TRUE; } static bool8 IsFloorOrBoardAndHole(u16 behaviorAt, const struct Decoration *decoration) { - if (MetatileBehavior_IsBlockDecoration(behaviorAt) != TRUE) + if (MetatileBehavior_IsSecretBaseTrainerSpot(behaviorAt) != TRUE) { if (decoration->id == DECOR_SOLID_BOARD && MetatileBehavior_IsSecretBaseHole(behaviorAt) == TRUE) return TRUE; @@ -1545,7 +1549,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) curX = gTasks[taskId].tCursorX + j; behaviorAt = MapGridGetMetatileBehaviorAt(curX, curY); layerType = GetMetatileAttributesById(NUM_TILES_IN_PRIMARY + decoration->tiles[(mapY - 1 - i) * mapX + j]) & METATILE_ATTR_LAYER_MASK; - if (!MetatileBehavior_IsNormal(behaviorAt) && !IsNonBlockNonElevated(behaviorAt, layerType)) + if (!MetatileBehavior_IsNormal(behaviorAt) && !IsSecretBaseTrainerSpot(behaviorAt, layerType)) return FALSE; if (!IsntInitialPosition(taskId, curX, curY, layerType)) diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 6b58e3f05b..452e68cff2 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -188,8 +188,8 @@ static const u8 sTileBitAttributes[] = [MB_UNUSED_AF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_SECRET_BASE_PC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_SECRET_BASE_REGISTER_PC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_UNUSED] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BLOCK_DECORATION] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_SECRET_BASE_OBSTACLE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), + [MB_SECRET_BASE_TRAINER_SPOT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_SECRET_BASE_DECORATION] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), [MB_HOLDS_SMALL_DECORATION] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), [MB_UNUSED_B6] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), @@ -687,17 +687,19 @@ bool8 MetatileBehavior_IsRecordMixingSecretBasePC(u8 metatileBehavior) return FALSE; } -bool8 Unref_MetatileBehavior_IsSecretBaseUnused_B2(u8 metatileBehavior) +// Used by the rock/grass floor spaces that the secret base trainer is not standing on +bool8 MetatileBehavior_IsSecretBaseObstacle1(u8 metatileBehavior) { - if (metatileBehavior == MB_SECRET_BASE_UNUSED) + if (metatileBehavior == MB_SECRET_BASE_OBSTACLE) return TRUE; else return FALSE; } -bool8 MetatileBehavior_IsBlockDecoration(u8 metatileBehavior) +// Used by the rock/grass floor space that the secret base trainer stands on +bool8 MetatileBehavior_IsSecretBaseTrainerSpot(u8 metatileBehavior) { - if (metatileBehavior == MB_BLOCK_DECORATION) + if (metatileBehavior == MB_SECRET_BASE_TRAINER_SPOT) return TRUE; else return FALSE; @@ -743,9 +745,9 @@ bool8 MetatileBehavior_IsSecretBaseNorthWall(u8 metatileBehavior) return FALSE; } -bool8 Unref_MetatileBehavior_IsSecretBaseUnused_B2_2(u8 metatileBehavior) +bool8 MetatileBehavior_IsSecretBaseObstacle2(u8 metatileBehavior) { - if (metatileBehavior == MB_SECRET_BASE_UNUSED) + if (metatileBehavior == MB_SECRET_BASE_OBSTACLE) return TRUE; else return FALSE; From e3b49604d4d8981c9fa599cbc23874ac61036c9e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 19 Jan 2022 10:59:37 -0500 Subject: [PATCH 360/417] Use metatile layer constants in shop --- src/shop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shop.c b/src/shop.c index f41ae315f1..e011c4f629 100755 --- a/src/shop.c +++ b/src/shop.c @@ -743,7 +743,7 @@ static void BuyMenuDrawMapBg(void) if (BuyMenuCheckForOverlapWithMenuBg(i, j) == TRUE) metatileLayerType = MapGridGetMetatileLayerTypeAt(x + i, y + j); else - metatileLayerType = 1; + metatileLayerType = METATILE_LAYER_TYPE_COVERED; if (metatile < NUM_METATILES_IN_PRIMARY) { @@ -764,15 +764,15 @@ static void BuyMenuDrawMapMetatile(s16 x, s16 y, const u16 *src, u8 metatileLaye switch (metatileLayerType) { - case 0: + case METATILE_LAYER_TYPE_NORMAL: BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[3], offset1, offset2, src); BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[1], offset1, offset2, src + 4); break; - case 1: + case METATILE_LAYER_TYPE_COVERED: BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[2], offset1, offset2, src); BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[3], offset1, offset2, src + 4); break; - case 2: + case METATILE_LAYER_TYPE_SPLIT: BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[2], offset1, offset2, src); BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[1], offset1, offset2, src + 4); break; @@ -866,7 +866,7 @@ static void BuyMenuDrawObjectEvents(void) static bool8 BuyMenuCheckIfObjectEventOverlapsMenuBg(s16 *object) { - if (!BuyMenuCheckForOverlapWithMenuBg(object[X_COORD], object[Y_COORD] + 2) && object[LAYER_TYPE] != MB_SECRET_BASE_WALL) + if (!BuyMenuCheckForOverlapWithMenuBg(object[X_COORD], object[Y_COORD] + 2) && object[LAYER_TYPE] != METATILE_LAYER_TYPE_COVERED) { return TRUE; } From e682c12519377741bc55fa55c6b9deb963614ed6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 19 Jan 2022 12:39:11 -0500 Subject: [PATCH 361/417] sTileBitAttributes to sparse array, rename MB_UNNUSED_CAVE --- include/constants/metatile_behaviors.h | 5 +- src/metatile_behavior.c | 369 ++++++++----------------- 2 files changed, 126 insertions(+), 248 deletions(-) diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h index 1c3d33c00b..97ba01a63a 100755 --- a/include/constants/metatile_behaviors.h +++ b/include/constants/metatile_behaviors.h @@ -9,7 +9,7 @@ #define MB_UNUSED_05 0x05 #define MB_DEEP_SAND 0x06 #define MB_SHORT_GRASS 0x07 -#define MB_UNUSED_CAVE 0x08 +#define MB_CAVE 0x08 #define MB_LONG_GRASS_SOUTH_EDGE 0x09 #define MB_NO_RUNNING 0x0A #define MB_INDOOR_ENCOUNTER 0x0B @@ -241,6 +241,9 @@ #define MB_UNUSED_ED 0xED #define MB_UNUSED_EE 0xEE #define MB_UNUSED_EF 0xEF + +#define NUM_METATILE_BEHAVIORS 0xF0 + #define MB_INVALID 0xFF #endif // GUARD_METATILE_BEHAVIORS_H diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 452e68cff2..b38198b9c3 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -2,254 +2,129 @@ #include "metatile_behavior.h" #include "constants/metatile_behaviors.h" -#define TILE_FLAG_ENCOUNTER_TILE 1 -#define TILE_FLAG_SURFABLE 2 +#define TILE_FLAG_HAS_ENCOUNTERS (1 << 0) +#define TILE_FLAG_SURFABLE (1 << 1) +#define TILE_FLAG_TRAVERSABLE (1 << 2) // Set but never read -#define TILE_ATTRIBUTES(unused, surfable, wildEncounter) (((wildEncounter) ? 1 : 0) | ((surfable) ? 2 : 0) | ((unused) ? 4 : 0)) - -// wonder what the third flag is supposed to do -static const u8 sTileBitAttributes[] = +static const u8 sTileBitAttributes[NUM_METATILE_BEHAVIORS] = { - [MB_NORMAL] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_WALL] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_TALL_GRASS] = TILE_ATTRIBUTES(TRUE, FALSE, TRUE), - [MB_LONG_GRASS] = TILE_ATTRIBUTES(TRUE, FALSE, TRUE), - [MB_UNUSED_04] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_05] = TILE_ATTRIBUTES(FALSE, FALSE, TRUE), - [MB_DEEP_SAND] = TILE_ATTRIBUTES(TRUE, FALSE, TRUE), - [MB_SHORT_GRASS] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_CAVE] = TILE_ATTRIBUTES(TRUE, FALSE, TRUE), - [MB_LONG_GRASS_SOUTH_EDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_NO_RUNNING] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_INDOOR_ENCOUNTER] = TILE_ATTRIBUTES(TRUE, FALSE, TRUE), - [MB_MOUNTAIN_TOP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BATTLE_PYRAMID_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_MOSSDEEP_GYM_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_MT_PYRE_HOLE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_POND_WATER] = TILE_ATTRIBUTES(TRUE, TRUE, TRUE), - [MB_SEMI_DEEP_WATER] = TILE_ATTRIBUTES(TRUE, TRUE, TRUE), - [MB_DEEP_WATER] = TILE_ATTRIBUTES(TRUE, TRUE, TRUE), - [MB_WATERFALL] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_SOOTOPOLIS_DEEP_WATER] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_OCEAN_WATER] = TILE_ATTRIBUTES(TRUE, TRUE, TRUE), - [MB_PUDDLE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SHALLOW_WATER] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_SOOTOPOLIS_DEEP_WATER] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_NO_SURFACING] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_UNUSED_SOOTOPOLIS_DEEP_WATER_2] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_STAIRS_OUTSIDE_ABANDONED_SHIP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SHOAL_CAVE_ENTRANCE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_1D] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_1E] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_1F] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_ICE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SAND] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SEAWEED] = TILE_ATTRIBUTES(TRUE, TRUE, TRUE), - [MB_UNUSED_23] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ASHGRASS] = TILE_ATTRIBUTES(TRUE, FALSE, TRUE), - [MB_FOOTPRINTS] = TILE_ATTRIBUTES(TRUE, FALSE, TRUE), - [MB_THIN_ICE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_CRACKED_ICE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_HOT_SPRINGS] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_LAVARIDGE_GYM_B1F_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SEAWEED_NO_SURFACING] = TILE_ATTRIBUTES(TRUE, TRUE, TRUE), - [MB_REFLECTION_UNDER_BRIDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_2C] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_2D] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_2E] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_2F] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_IMPASSABLE_EAST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_IMPASSABLE_WEST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_IMPASSABLE_NORTH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_IMPASSABLE_SOUTH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_IMPASSABLE_NORTHEAST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_IMPASSABLE_NORTHWEST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_IMPASSABLE_SOUTHEAST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_IMPASSABLE_SOUTHWEST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_JUMP_EAST] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_JUMP_WEST] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_JUMP_NORTH] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_JUMP_SOUTH] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_JUMP_NORTHEAST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_JUMP_NORTHWEST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_JUMP_SOUTHEAST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_JUMP_SOUTHWEST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_WALK_EAST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_WALK_WEST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_WALK_NORTH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_WALK_SOUTH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SLIDE_EAST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SLIDE_WEST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SLIDE_NORTH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SLIDE_SOUTH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_TRICK_HOUSE_PUZZLE_8_FLOOR] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_49] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_4A] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_4B] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_4C] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_4D] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_4E] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_4F] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_EASTWARD_CURRENT] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_WESTWARD_CURRENT] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_NORTHWARD_CURRENT] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_SOUTHWARD_CURRENT] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_UNUSED_54] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_55] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_56] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_57] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_58] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_59] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_5A] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_5B] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_5C] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_5D] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_5E] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_5F] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_NON_ANIMATED_DOOR] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_LADDER] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_EAST_ARROW_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_WEST_ARROW_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_NORTH_ARROW_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SOUTH_ARROW_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_CRACKED_FLOOR_HOLE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_AQUA_HIDEOUT_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_LAVARIDGE_GYM_1F_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ANIMATED_DOOR] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UP_ESCALATOR] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_DOWN_ESCALATOR] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_WATER_DOOR] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_WATER_SOUTH_ARROW_WARP] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_DEEP_SOUTH_WARP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_6F] = TILE_ATTRIBUTES(TRUE, TRUE, FALSE), - [MB_BRIDGE_OVER_OCEAN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_BRIDGE_OVER_POND_LOW] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BRIDGE_OVER_POND_MED] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BRIDGE_OVER_POND_HIGH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PACIFIDLOG_VERTICAL_LOG_TOP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_FORTREE_BRIDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_79] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_BRIDGE_OVER_POND_MED_EDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BRIDGE_OVER_POND_MED_EDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BRIDGE_OVER_POND_HIGH_EDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BRIDGE_OVER_POND_HIGH_EDGE_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_BRIDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BIKE_BRIDGE_OVER_BARRIER] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_COUNTER] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_81] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_82] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_PC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_CABLE_BOX_RESULTS_1] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_REGION_MAP] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_TELEVISION] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_POKEBLOCK_FEEDER] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_88] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SLOT_MACHINE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_ROULETTE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_CLOSED_SOOTOPOLIS_DOOR] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_TRICK_HOUSE_PUZZLE_DOOR] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_PETALBURG_GYM_DOOR] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_RUNNING_SHOES_INSTRUCTION] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_QUESTIONNAIRE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_RED_CAVE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_RED_CAVE_OPEN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_BROWN_CAVE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_BROWN_CAVE_OPEN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_YELLOW_CAVE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_YELLOW_CAVE_OPEN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_TREE_LEFT] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_TREE_LEFT_OPEN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_SHRUB] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_SHRUB_OPEN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_BLUE_CAVE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_BLUE_CAVE_OPEN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_TREE_RIGHT] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_SPOT_TREE_RIGHT_OPEN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_9E] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_9F] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_BERRY_TREE_SOIL] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A1] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A2] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A3] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A4] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A5] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A6] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A7] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A8] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_A9] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_AA] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_AB] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_AC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_AD] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_AE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_AF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_PC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_REGISTER_PC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_OBSTACLE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_TRAINER_SPOT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_DECORATION] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_HOLDS_SMALL_DECORATION] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_B6] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_NORTH_WALL] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_BALLOON] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_IMPASSABLE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_GLITTER_MAT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_JUMP_MAT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_SPIN_MAT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_SOUND_MAT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_BREAKABLE_DOOR] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_SAND_ORNAMENT] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_IMPASSABLE_SOUTH_AND_NORTH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_IMPASSABLE_WEST_AND_EAST] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_HOLE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_HOLDS_LARGE_DECORATION] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_TV_SHIELD] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_PLAYER_ROOM_PC_ON] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_SECRET_BASE_DECORATION_BASE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SECRET_BASE_POSTER] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_C8] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_C9] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_CA] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_CB] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_CC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_CD] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_CE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_CF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_MUDDY_SLOPE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_BUMPY_SLOPE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_CRACKED_FLOOR] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ISOLATED_VERTICAL_RAIL] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_ISOLATED_HORIZONTAL_RAIL] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_VERTICAL_RAIL] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_HORIZONTAL_RAIL] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE), - [MB_UNUSED_D7] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_D8] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_D9] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_DA] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_DB] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_DC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_DD] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_DE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_DF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_PICTURE_BOOK_SHELF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_BOOKSHELF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_POKEMON_CENTER_BOOKSHELF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_VASE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_TRASH_CAN] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SHOP_SHELF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_BLUEPRINT] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_CABLE_BOX_RESULTS_2] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_WIRELESS_BOX_RESULTS] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_TRAINER_HILL_TIMER] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_SKY_PILLAR_CLOSED_DOOR] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_EB] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_EC] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_ED] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_EE] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), - [MB_UNUSED_EF] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE), + [MB_NORMAL] = TILE_FLAG_TRAVERSABLE, + [MB_TALL_GRASS] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_LONG_GRASS] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_UNUSED_05] = TILE_FLAG_HAS_ENCOUNTERS, + [MB_DEEP_SAND] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_SHORT_GRASS] = TILE_FLAG_TRAVERSABLE, + [MB_CAVE] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_LONG_GRASS_SOUTH_EDGE] = TILE_FLAG_TRAVERSABLE, + [MB_NO_RUNNING] = TILE_FLAG_TRAVERSABLE, + [MB_INDOOR_ENCOUNTER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_MOUNTAIN_TOP] = TILE_FLAG_TRAVERSABLE, + [MB_BATTLE_PYRAMID_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_MOSSDEEP_GYM_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_MT_PYRE_HOLE] = TILE_FLAG_TRAVERSABLE, + [MB_POND_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_SEMI_DEEP_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_DEEP_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_WATERFALL] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_SOOTOPOLIS_DEEP_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_OCEAN_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_PUDDLE] = TILE_FLAG_TRAVERSABLE, + [MB_SHALLOW_WATER] = TILE_FLAG_TRAVERSABLE, + [MB_NO_SURFACING] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_STAIRS_OUTSIDE_ABANDONED_SHIP] = TILE_FLAG_TRAVERSABLE, + [MB_SHOAL_CAVE_ENTRANCE] = TILE_FLAG_TRAVERSABLE, + [MB_ICE] = TILE_FLAG_TRAVERSABLE, + [MB_SAND] = TILE_FLAG_TRAVERSABLE, + [MB_SEAWEED] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_UNUSED_23] = TILE_FLAG_TRAVERSABLE, + [MB_ASHGRASS] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_FOOTPRINTS] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_THIN_ICE] = TILE_FLAG_TRAVERSABLE, + [MB_CRACKED_ICE] = TILE_FLAG_TRAVERSABLE, + [MB_HOT_SPRINGS] = TILE_FLAG_TRAVERSABLE, + [MB_LAVARIDGE_GYM_B1F_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_SEAWEED_NO_SURFACING] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_REFLECTION_UNDER_BRIDGE] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_EAST] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_WEST] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_NORTH] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_SOUTH] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_NORTHEAST] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_NORTHWEST] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_SOUTHEAST] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_SOUTHWEST] = TILE_FLAG_TRAVERSABLE, + [MB_JUMP_NORTHEAST] = TILE_FLAG_TRAVERSABLE, + [MB_JUMP_NORTHWEST] = TILE_FLAG_TRAVERSABLE, + [MB_JUMP_SOUTHEAST] = TILE_FLAG_TRAVERSABLE, + [MB_JUMP_SOUTHWEST] = TILE_FLAG_TRAVERSABLE, + [MB_WALK_EAST] = TILE_FLAG_TRAVERSABLE, + [MB_WALK_WEST] = TILE_FLAG_TRAVERSABLE, + [MB_WALK_NORTH] = TILE_FLAG_TRAVERSABLE, + [MB_WALK_SOUTH] = TILE_FLAG_TRAVERSABLE, + [MB_SLIDE_EAST] = TILE_FLAG_TRAVERSABLE, + [MB_SLIDE_WEST] = TILE_FLAG_TRAVERSABLE, + [MB_SLIDE_NORTH] = TILE_FLAG_TRAVERSABLE, + [MB_SLIDE_SOUTH] = TILE_FLAG_TRAVERSABLE, + [MB_TRICK_HOUSE_PUZZLE_8_FLOOR] = TILE_FLAG_TRAVERSABLE, + [MB_UNUSED_49] = TILE_FLAG_TRAVERSABLE, + [MB_UNUSED_4A] = TILE_FLAG_TRAVERSABLE, + [MB_EASTWARD_CURRENT] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_WESTWARD_CURRENT] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_NORTHWARD_CURRENT] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_SOUTHWARD_CURRENT] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_NON_ANIMATED_DOOR] = TILE_FLAG_TRAVERSABLE, + [MB_LADDER] = TILE_FLAG_TRAVERSABLE, + [MB_EAST_ARROW_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_WEST_ARROW_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_NORTH_ARROW_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_SOUTH_ARROW_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_CRACKED_FLOOR_HOLE] = TILE_FLAG_TRAVERSABLE, + [MB_AQUA_HIDEOUT_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_LAVARIDGE_GYM_1F_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_ANIMATED_DOOR] = TILE_FLAG_TRAVERSABLE, + [MB_UP_ESCALATOR] = TILE_FLAG_TRAVERSABLE, + [MB_DOWN_ESCALATOR] = TILE_FLAG_TRAVERSABLE, + [MB_WATER_DOOR] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_WATER_SOUTH_ARROW_WARP] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_DEEP_SOUTH_WARP] = TILE_FLAG_TRAVERSABLE, + [MB_UNUSED_6F] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, + [MB_BRIDGE_OVER_POND_LOW] = TILE_FLAG_TRAVERSABLE, + [MB_BRIDGE_OVER_POND_MED] = TILE_FLAG_TRAVERSABLE, + [MB_BRIDGE_OVER_POND_HIGH] = TILE_FLAG_TRAVERSABLE, + [MB_PACIFIDLOG_VERTICAL_LOG_TOP] = TILE_FLAG_TRAVERSABLE, + [MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM] = TILE_FLAG_TRAVERSABLE, + [MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT] = TILE_FLAG_TRAVERSABLE, + [MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT] = TILE_FLAG_TRAVERSABLE, + [MB_FORTREE_BRIDGE] = TILE_FLAG_TRAVERSABLE, + [MB_BRIDGE_OVER_POND_MED_EDGE_1] = TILE_FLAG_TRAVERSABLE, + [MB_BRIDGE_OVER_POND_MED_EDGE_2] = TILE_FLAG_TRAVERSABLE, + [MB_BRIDGE_OVER_POND_HIGH_EDGE_1] = TILE_FLAG_TRAVERSABLE, + [MB_BRIDGE_OVER_POND_HIGH_EDGE_2] = TILE_FLAG_TRAVERSABLE, + [MB_UNUSED_BRIDGE] = TILE_FLAG_TRAVERSABLE, + [MB_BIKE_BRIDGE_OVER_BARRIER] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_OBSTACLE] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_TRAINER_SPOT] = TILE_FLAG_TRAVERSABLE, + [MB_HOLDS_SMALL_DECORATION] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_BALLOON] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_IMPASSABLE] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_GLITTER_MAT] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_JUMP_MAT] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_SPIN_MAT] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_SOUND_MAT] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_BREAKABLE_DOOR] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_SOUTH_AND_NORTH] = TILE_FLAG_TRAVERSABLE, + [MB_IMPASSABLE_WEST_AND_EAST] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_HOLE] = TILE_FLAG_TRAVERSABLE, + [MB_HOLDS_LARGE_DECORATION] = TILE_FLAG_TRAVERSABLE, + [MB_SECRET_BASE_TV_SHIELD] = TILE_FLAG_TRAVERSABLE, + [MB_PLAYER_ROOM_PC_ON] = TILE_FLAG_TRAVERSABLE, + [MB_MUDDY_SLOPE] = TILE_FLAG_TRAVERSABLE, + [MB_BUMPY_SLOPE] = TILE_FLAG_TRAVERSABLE, + [MB_CRACKED_FLOOR] = TILE_FLAG_TRAVERSABLE, + [MB_ISOLATED_VERTICAL_RAIL] = TILE_FLAG_TRAVERSABLE, + [MB_ISOLATED_HORIZONTAL_RAIL] = TILE_FLAG_TRAVERSABLE, + [MB_VERTICAL_RAIL] = TILE_FLAG_TRAVERSABLE, + [MB_HORIZONTAL_RAIL] = TILE_FLAG_TRAVERSABLE, }; bool8 MetatileBehavior_IsATile(u8 metatileBehavior) @@ -259,7 +134,7 @@ bool8 MetatileBehavior_IsATile(u8 metatileBehavior) bool8 MetatileBehavior_IsEncounterTile(u8 metatileBehavior) { - if ((sTileBitAttributes[metatileBehavior] & TILE_FLAG_ENCOUNTER_TILE)) + if ((sTileBitAttributes[metatileBehavior] & TILE_FLAG_HAS_ENCOUNTERS)) return TRUE; else return FALSE; From c4f33f2b2bbddaafff817721d9266273ee619162 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 19 Jan 2022 12:54:55 -0500 Subject: [PATCH 362/417] TRAVERSABLE->UNUSED, rename MB_SECRET_BASE_OBSTACLE --- include/constants/metatile_behaviors.h | 2 +- src/metatile_behavior.c | 242 ++++++++++++------------- 2 files changed, 122 insertions(+), 122 deletions(-) diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h index 97ba01a63a..86f35ce50d 100755 --- a/include/constants/metatile_behaviors.h +++ b/include/constants/metatile_behaviors.h @@ -179,7 +179,7 @@ #define MB_UNUSED_AF 0xAF #define MB_SECRET_BASE_PC 0xB0 #define MB_SECRET_BASE_REGISTER_PC 0xB1 -#define MB_SECRET_BASE_OBSTACLE 0xB2 +#define MB_SECRET_BASE_SCENERY 0xB2 #define MB_SECRET_BASE_TRAINER_SPOT 0xB3 #define MB_SECRET_BASE_DECORATION 0xB4 #define MB_HOLDS_SMALL_DECORATION 0xB5 diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index b38198b9c3..72d3ac632f 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -4,127 +4,127 @@ #define TILE_FLAG_HAS_ENCOUNTERS (1 << 0) #define TILE_FLAG_SURFABLE (1 << 1) -#define TILE_FLAG_TRAVERSABLE (1 << 2) // Set but never read +#define TILE_FLAG_UNUSED (1 << 2) // Roughly all of the traversable metatiles. Set but never read static const u8 sTileBitAttributes[NUM_METATILE_BEHAVIORS] = { - [MB_NORMAL] = TILE_FLAG_TRAVERSABLE, - [MB_TALL_GRASS] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_LONG_GRASS] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_NORMAL] = TILE_FLAG_UNUSED, + [MB_TALL_GRASS] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS, + [MB_LONG_GRASS] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS, [MB_UNUSED_05] = TILE_FLAG_HAS_ENCOUNTERS, - [MB_DEEP_SAND] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_SHORT_GRASS] = TILE_FLAG_TRAVERSABLE, - [MB_CAVE] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_LONG_GRASS_SOUTH_EDGE] = TILE_FLAG_TRAVERSABLE, - [MB_NO_RUNNING] = TILE_FLAG_TRAVERSABLE, - [MB_INDOOR_ENCOUNTER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_MOUNTAIN_TOP] = TILE_FLAG_TRAVERSABLE, - [MB_BATTLE_PYRAMID_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_MOSSDEEP_GYM_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_MT_PYRE_HOLE] = TILE_FLAG_TRAVERSABLE, - [MB_POND_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_SEMI_DEEP_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_DEEP_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_WATERFALL] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_SOOTOPOLIS_DEEP_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_OCEAN_WATER] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_PUDDLE] = TILE_FLAG_TRAVERSABLE, - [MB_SHALLOW_WATER] = TILE_FLAG_TRAVERSABLE, - [MB_NO_SURFACING] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_STAIRS_OUTSIDE_ABANDONED_SHIP] = TILE_FLAG_TRAVERSABLE, - [MB_SHOAL_CAVE_ENTRANCE] = TILE_FLAG_TRAVERSABLE, - [MB_ICE] = TILE_FLAG_TRAVERSABLE, - [MB_SAND] = TILE_FLAG_TRAVERSABLE, - [MB_SEAWEED] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_UNUSED_23] = TILE_FLAG_TRAVERSABLE, - [MB_ASHGRASS] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_FOOTPRINTS] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_THIN_ICE] = TILE_FLAG_TRAVERSABLE, - [MB_CRACKED_ICE] = TILE_FLAG_TRAVERSABLE, - [MB_HOT_SPRINGS] = TILE_FLAG_TRAVERSABLE, - [MB_LAVARIDGE_GYM_B1F_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_SEAWEED_NO_SURFACING] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, - [MB_REFLECTION_UNDER_BRIDGE] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_EAST] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_WEST] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_NORTH] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_SOUTH] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_NORTHEAST] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_NORTHWEST] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_SOUTHEAST] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_SOUTHWEST] = TILE_FLAG_TRAVERSABLE, - [MB_JUMP_NORTHEAST] = TILE_FLAG_TRAVERSABLE, - [MB_JUMP_NORTHWEST] = TILE_FLAG_TRAVERSABLE, - [MB_JUMP_SOUTHEAST] = TILE_FLAG_TRAVERSABLE, - [MB_JUMP_SOUTHWEST] = TILE_FLAG_TRAVERSABLE, - [MB_WALK_EAST] = TILE_FLAG_TRAVERSABLE, - [MB_WALK_WEST] = TILE_FLAG_TRAVERSABLE, - [MB_WALK_NORTH] = TILE_FLAG_TRAVERSABLE, - [MB_WALK_SOUTH] = TILE_FLAG_TRAVERSABLE, - [MB_SLIDE_EAST] = TILE_FLAG_TRAVERSABLE, - [MB_SLIDE_WEST] = TILE_FLAG_TRAVERSABLE, - [MB_SLIDE_NORTH] = TILE_FLAG_TRAVERSABLE, - [MB_SLIDE_SOUTH] = TILE_FLAG_TRAVERSABLE, - [MB_TRICK_HOUSE_PUZZLE_8_FLOOR] = TILE_FLAG_TRAVERSABLE, - [MB_UNUSED_49] = TILE_FLAG_TRAVERSABLE, - [MB_UNUSED_4A] = TILE_FLAG_TRAVERSABLE, - [MB_EASTWARD_CURRENT] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_WESTWARD_CURRENT] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_NORTHWARD_CURRENT] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_SOUTHWARD_CURRENT] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_NON_ANIMATED_DOOR] = TILE_FLAG_TRAVERSABLE, - [MB_LADDER] = TILE_FLAG_TRAVERSABLE, - [MB_EAST_ARROW_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_WEST_ARROW_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_NORTH_ARROW_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_SOUTH_ARROW_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_CRACKED_FLOOR_HOLE] = TILE_FLAG_TRAVERSABLE, - [MB_AQUA_HIDEOUT_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_LAVARIDGE_GYM_1F_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_ANIMATED_DOOR] = TILE_FLAG_TRAVERSABLE, - [MB_UP_ESCALATOR] = TILE_FLAG_TRAVERSABLE, - [MB_DOWN_ESCALATOR] = TILE_FLAG_TRAVERSABLE, - [MB_WATER_DOOR] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_WATER_SOUTH_ARROW_WARP] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_DEEP_SOUTH_WARP] = TILE_FLAG_TRAVERSABLE, - [MB_UNUSED_6F] = TILE_FLAG_TRAVERSABLE | TILE_FLAG_SURFABLE, - [MB_BRIDGE_OVER_POND_LOW] = TILE_FLAG_TRAVERSABLE, - [MB_BRIDGE_OVER_POND_MED] = TILE_FLAG_TRAVERSABLE, - [MB_BRIDGE_OVER_POND_HIGH] = TILE_FLAG_TRAVERSABLE, - [MB_PACIFIDLOG_VERTICAL_LOG_TOP] = TILE_FLAG_TRAVERSABLE, - [MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM] = TILE_FLAG_TRAVERSABLE, - [MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT] = TILE_FLAG_TRAVERSABLE, - [MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT] = TILE_FLAG_TRAVERSABLE, - [MB_FORTREE_BRIDGE] = TILE_FLAG_TRAVERSABLE, - [MB_BRIDGE_OVER_POND_MED_EDGE_1] = TILE_FLAG_TRAVERSABLE, - [MB_BRIDGE_OVER_POND_MED_EDGE_2] = TILE_FLAG_TRAVERSABLE, - [MB_BRIDGE_OVER_POND_HIGH_EDGE_1] = TILE_FLAG_TRAVERSABLE, - [MB_BRIDGE_OVER_POND_HIGH_EDGE_2] = TILE_FLAG_TRAVERSABLE, - [MB_UNUSED_BRIDGE] = TILE_FLAG_TRAVERSABLE, - [MB_BIKE_BRIDGE_OVER_BARRIER] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_OBSTACLE] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_TRAINER_SPOT] = TILE_FLAG_TRAVERSABLE, - [MB_HOLDS_SMALL_DECORATION] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_BALLOON] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_IMPASSABLE] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_GLITTER_MAT] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_JUMP_MAT] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_SPIN_MAT] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_SOUND_MAT] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_BREAKABLE_DOOR] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_SOUTH_AND_NORTH] = TILE_FLAG_TRAVERSABLE, - [MB_IMPASSABLE_WEST_AND_EAST] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_HOLE] = TILE_FLAG_TRAVERSABLE, - [MB_HOLDS_LARGE_DECORATION] = TILE_FLAG_TRAVERSABLE, - [MB_SECRET_BASE_TV_SHIELD] = TILE_FLAG_TRAVERSABLE, - [MB_PLAYER_ROOM_PC_ON] = TILE_FLAG_TRAVERSABLE, - [MB_MUDDY_SLOPE] = TILE_FLAG_TRAVERSABLE, - [MB_BUMPY_SLOPE] = TILE_FLAG_TRAVERSABLE, - [MB_CRACKED_FLOOR] = TILE_FLAG_TRAVERSABLE, - [MB_ISOLATED_VERTICAL_RAIL] = TILE_FLAG_TRAVERSABLE, - [MB_ISOLATED_HORIZONTAL_RAIL] = TILE_FLAG_TRAVERSABLE, - [MB_VERTICAL_RAIL] = TILE_FLAG_TRAVERSABLE, - [MB_HORIZONTAL_RAIL] = TILE_FLAG_TRAVERSABLE, + [MB_DEEP_SAND] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS, + [MB_SHORT_GRASS] = TILE_FLAG_UNUSED, + [MB_CAVE] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS, + [MB_LONG_GRASS_SOUTH_EDGE] = TILE_FLAG_UNUSED, + [MB_NO_RUNNING] = TILE_FLAG_UNUSED, + [MB_INDOOR_ENCOUNTER] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS, + [MB_MOUNTAIN_TOP] = TILE_FLAG_UNUSED, + [MB_BATTLE_PYRAMID_WARP] = TILE_FLAG_UNUSED, + [MB_MOSSDEEP_GYM_WARP] = TILE_FLAG_UNUSED, + [MB_MT_PYRE_HOLE] = TILE_FLAG_UNUSED, + [MB_POND_WATER] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_SEMI_DEEP_WATER] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_DEEP_WATER] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_WATERFALL] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_SOOTOPOLIS_DEEP_WATER] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_OCEAN_WATER] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_PUDDLE] = TILE_FLAG_UNUSED, + [MB_SHALLOW_WATER] = TILE_FLAG_UNUSED, + [MB_NO_SURFACING] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_STAIRS_OUTSIDE_ABANDONED_SHIP] = TILE_FLAG_UNUSED, + [MB_SHOAL_CAVE_ENTRANCE] = TILE_FLAG_UNUSED, + [MB_ICE] = TILE_FLAG_UNUSED, + [MB_SAND] = TILE_FLAG_UNUSED, + [MB_SEAWEED] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_UNUSED_23] = TILE_FLAG_UNUSED, + [MB_ASHGRASS] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS, + [MB_FOOTPRINTS] = TILE_FLAG_UNUSED | TILE_FLAG_HAS_ENCOUNTERS, + [MB_THIN_ICE] = TILE_FLAG_UNUSED, + [MB_CRACKED_ICE] = TILE_FLAG_UNUSED, + [MB_HOT_SPRINGS] = TILE_FLAG_UNUSED, + [MB_LAVARIDGE_GYM_B1F_WARP] = TILE_FLAG_UNUSED, + [MB_SEAWEED_NO_SURFACING] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE | TILE_FLAG_HAS_ENCOUNTERS, + [MB_REFLECTION_UNDER_BRIDGE] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_EAST] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_WEST] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_NORTH] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_SOUTH] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_NORTHEAST] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_NORTHWEST] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_SOUTHEAST] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_SOUTHWEST] = TILE_FLAG_UNUSED, + [MB_JUMP_NORTHEAST] = TILE_FLAG_UNUSED, + [MB_JUMP_NORTHWEST] = TILE_FLAG_UNUSED, + [MB_JUMP_SOUTHEAST] = TILE_FLAG_UNUSED, + [MB_JUMP_SOUTHWEST] = TILE_FLAG_UNUSED, + [MB_WALK_EAST] = TILE_FLAG_UNUSED, + [MB_WALK_WEST] = TILE_FLAG_UNUSED, + [MB_WALK_NORTH] = TILE_FLAG_UNUSED, + [MB_WALK_SOUTH] = TILE_FLAG_UNUSED, + [MB_SLIDE_EAST] = TILE_FLAG_UNUSED, + [MB_SLIDE_WEST] = TILE_FLAG_UNUSED, + [MB_SLIDE_NORTH] = TILE_FLAG_UNUSED, + [MB_SLIDE_SOUTH] = TILE_FLAG_UNUSED, + [MB_TRICK_HOUSE_PUZZLE_8_FLOOR] = TILE_FLAG_UNUSED, + [MB_UNUSED_49] = TILE_FLAG_UNUSED, + [MB_UNUSED_4A] = TILE_FLAG_UNUSED, + [MB_EASTWARD_CURRENT] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_WESTWARD_CURRENT] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_NORTHWARD_CURRENT] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_SOUTHWARD_CURRENT] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_NON_ANIMATED_DOOR] = TILE_FLAG_UNUSED, + [MB_LADDER] = TILE_FLAG_UNUSED, + [MB_EAST_ARROW_WARP] = TILE_FLAG_UNUSED, + [MB_WEST_ARROW_WARP] = TILE_FLAG_UNUSED, + [MB_NORTH_ARROW_WARP] = TILE_FLAG_UNUSED, + [MB_SOUTH_ARROW_WARP] = TILE_FLAG_UNUSED, + [MB_CRACKED_FLOOR_HOLE] = TILE_FLAG_UNUSED, + [MB_AQUA_HIDEOUT_WARP] = TILE_FLAG_UNUSED, + [MB_LAVARIDGE_GYM_1F_WARP] = TILE_FLAG_UNUSED, + [MB_ANIMATED_DOOR] = TILE_FLAG_UNUSED, + [MB_UP_ESCALATOR] = TILE_FLAG_UNUSED, + [MB_DOWN_ESCALATOR] = TILE_FLAG_UNUSED, + [MB_WATER_DOOR] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_WATER_SOUTH_ARROW_WARP] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_DEEP_SOUTH_WARP] = TILE_FLAG_UNUSED, + [MB_UNUSED_6F] = TILE_FLAG_UNUSED | TILE_FLAG_SURFABLE, + [MB_BRIDGE_OVER_POND_LOW] = TILE_FLAG_UNUSED, + [MB_BRIDGE_OVER_POND_MED] = TILE_FLAG_UNUSED, + [MB_BRIDGE_OVER_POND_HIGH] = TILE_FLAG_UNUSED, + [MB_PACIFIDLOG_VERTICAL_LOG_TOP] = TILE_FLAG_UNUSED, + [MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM] = TILE_FLAG_UNUSED, + [MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT] = TILE_FLAG_UNUSED, + [MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT] = TILE_FLAG_UNUSED, + [MB_FORTREE_BRIDGE] = TILE_FLAG_UNUSED, + [MB_BRIDGE_OVER_POND_MED_EDGE_1] = TILE_FLAG_UNUSED, + [MB_BRIDGE_OVER_POND_MED_EDGE_2] = TILE_FLAG_UNUSED, + [MB_BRIDGE_OVER_POND_HIGH_EDGE_1] = TILE_FLAG_UNUSED, + [MB_BRIDGE_OVER_POND_HIGH_EDGE_2] = TILE_FLAG_UNUSED, + [MB_UNUSED_BRIDGE] = TILE_FLAG_UNUSED, + [MB_BIKE_BRIDGE_OVER_BARRIER] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_SCENERY] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_TRAINER_SPOT] = TILE_FLAG_UNUSED, + [MB_HOLDS_SMALL_DECORATION] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_BALLOON] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_IMPASSABLE] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_GLITTER_MAT] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_JUMP_MAT] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_SPIN_MAT] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_SOUND_MAT] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_BREAKABLE_DOOR] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_SOUTH_AND_NORTH] = TILE_FLAG_UNUSED, + [MB_IMPASSABLE_WEST_AND_EAST] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_HOLE] = TILE_FLAG_UNUSED, + [MB_HOLDS_LARGE_DECORATION] = TILE_FLAG_UNUSED, + [MB_SECRET_BASE_TV_SHIELD] = TILE_FLAG_UNUSED, + [MB_PLAYER_ROOM_PC_ON] = TILE_FLAG_UNUSED, + [MB_MUDDY_SLOPE] = TILE_FLAG_UNUSED, + [MB_BUMPY_SLOPE] = TILE_FLAG_UNUSED, + [MB_CRACKED_FLOOR] = TILE_FLAG_UNUSED, + [MB_ISOLATED_VERTICAL_RAIL] = TILE_FLAG_UNUSED, + [MB_ISOLATED_HORIZONTAL_RAIL] = TILE_FLAG_UNUSED, + [MB_VERTICAL_RAIL] = TILE_FLAG_UNUSED, + [MB_HORIZONTAL_RAIL] = TILE_FLAG_UNUSED, }; bool8 MetatileBehavior_IsATile(u8 metatileBehavior) @@ -563,9 +563,9 @@ bool8 MetatileBehavior_IsRecordMixingSecretBasePC(u8 metatileBehavior) } // Used by the rock/grass floor spaces that the secret base trainer is not standing on -bool8 MetatileBehavior_IsSecretBaseObstacle1(u8 metatileBehavior) +bool8 MetatileBehavior_IsSecretBaseScenery1(u8 metatileBehavior) { - if (metatileBehavior == MB_SECRET_BASE_OBSTACLE) + if (metatileBehavior == MB_SECRET_BASE_SCENERY) return TRUE; else return FALSE; @@ -620,9 +620,9 @@ bool8 MetatileBehavior_IsSecretBaseNorthWall(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsSecretBaseObstacle2(u8 metatileBehavior) +bool8 MetatileBehavior_IsSecretBaseScenery2(u8 metatileBehavior) { - if (metatileBehavior == MB_SECRET_BASE_OBSTACLE) + if (metatileBehavior == MB_SECRET_BASE_SCENERY) return TRUE; else return FALSE; From 7d75e16312381074fe4e31cf28f2e5b405a9bc59 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 20 Jan 2022 12:25:48 -0300 Subject: [PATCH 363/417] Small documentation and cleanup --- include/battle.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/battle.h b/include/battle.h index 9434b9aa88..9656bab8d4 100644 --- a/include/battle.h +++ b/include/battle.h @@ -57,7 +57,7 @@ struct ResourceFlags { - u32 flags[4]; + u32 flags[MAX_BATTLERS_COUNT]; }; #define RESOURCE_FLAG_FLASH_FIRE 1 @@ -590,8 +590,8 @@ struct MonSpritesGfx { void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon union { - void* ptr[MAX_BATTLERS_COUNT]; - u8* byte[MAX_BATTLERS_COUNT]; + void* ptr[MAX_BATTLERS_COUNT]; + u8* byte[MAX_BATTLERS_COUNT]; } sprites; struct SpriteTemplate templates[MAX_BATTLERS_COUNT]; struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][4]; From fb81d9ad4a19b7d653e44787e5647bda794757fd Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 20 Jan 2022 23:26:39 -0500 Subject: [PATCH 364/417] Correct map data comment --- include/global.fieldmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 46450ed446..21c354658d 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -3,7 +3,7 @@ // Masks/shifts for blocks in the map grid // Map grid blocks consist of a 10 bit metatile id, a 2 bit collision value, and a 4 bit elevation value -// This is the data stored in each data/layouts/*/map.bin and border.bin file +// This is the data stored in each data/layouts/*/map.bin file #define MAPGRID_METATILE_ID_MASK 0x03FF // Bits 1-10 #define MAPGRID_COLLISION_MASK 0x0C00 // Bits 11-12 #define MAPGRID_ELEVATION_MASK 0xF000 // Bits 13-16 From 3d0326106ed683911da66eee1bf94becadc7a2db Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 21 Jan 2022 12:48:19 -0500 Subject: [PATCH 365/417] Z coord / height -> elevation --- include/event_object_movement.h | 18 +++--- include/field_player_avatar.h | 2 +- include/fieldmap.h | 2 +- include/global.h | 2 +- src/bike.c | 2 +- src/decoration.c | 8 +-- src/event_object_movement.c | 110 +++++++++++++++++--------------- src/field_control_avatar.c | 30 ++++----- src/field_effect_helpers.c | 12 ++-- src/field_player_avatar.c | 8 +-- src/field_tasks.c | 14 ++-- src/fieldmap.c | 2 +- src/fldeff_cut.c | 4 +- src/fldeff_rocksmash.c | 6 +- src/item_use.c | 6 +- src/overworld.c | 12 ++-- 16 files changed, 119 insertions(+), 119 deletions(-) diff --git a/include/event_object_movement.h b/include/event_object_movement.h index bd82320271..d31802a67f 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -98,7 +98,7 @@ void ObjectEventClearHeldMovementIfActive(struct ObjectEvent *); void TrySpawnObjectEvents(s16, s16); u8 CreateObjectGraphicsSprite(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subpriority); u8 TrySpawnObjectEvent(u8, u8, u8); -u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z); +u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 elevation); u8 SpawnSpecialObjectEvent(struct ObjectEventTemplate *); void SetSpritePosToMapCoords(s16, s16, s16 *, s16 *); void CameraObjectReset1(void); @@ -128,7 +128,7 @@ u8 GetCollisionAtCoords(struct ObjectEvent *, s16, s16, u32); void MoveCoords(u8, s16 *, s16 *); bool8 ObjectEventIsHeldMovementActive(struct ObjectEvent *); u8 ObjectEventClearHeldMovementIfFinished(struct ObjectEvent *); -u8 GetObjectEventIdByXYZ(u16 x, u16 y, u8 z); +u8 GetObjectEventIdByPosition(u16 x, u16 y, u8 elevation); void SetTrainerMovementType(struct ObjectEvent *objectEvent, u8 movementType); u8 GetTrainerFacingDirectionMovementType(u8 direction); const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId); @@ -162,17 +162,15 @@ u8 ObjectEventCheckHeldMovementStatus(struct ObjectEvent *objectEvent); u8 ObjectEventGetHeldMovementActionId(struct ObjectEvent *objectEvent); void TryOverrideTemplateCoordsForObjectEvent(const struct ObjectEvent *objectEvent, u8 movementType); void OverrideTemplateCoordsForObjectEvent(const struct ObjectEvent *objectEvent); -void ShiftStillObjectEventCoords(struct ObjectEvent *pObject); -void ObjectEventMoveDestCoords(struct ObjectEvent *pObject, u32 unk_19, s16 *pInt, s16 *pInt1); +void ShiftStillObjectEventCoords(struct ObjectEvent *objEvent); +void ObjectEventMoveDestCoords(struct ObjectEvent *objEvent, u32 direction, s16 *x, s16 *y); u8 AddCameraObject(u8 linkedSpriteId); void UpdateObjectEventsForCameraUpdate(s16 x, s16 y); u8 GetWalkSlowMovementAction(u32); u8 GetJumpMovementAction(u32); -bool8 AreZCoordsCompatible(u8, u8); -u8 ZCoordToPriority(u8); -void ObjectEventUpdateZCoord(struct ObjectEvent *pObject); -void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8); -bool8 IsZCoordMismatchAt(u8, s16, s16); +u8 ElevationToPriority(u8); +void ObjectEventUpdateElevation(struct ObjectEvent *objEvent); +void SetObjectSubpriorityByElevation(u8, struct Sprite *, u8); void UnfreezeObjectEvent(struct ObjectEvent *); u8 FindLockedObjectEventIndex(struct ObjectEvent *); void SetAndStartSpriteAnim(struct Sprite *, u8, u8); @@ -413,7 +411,7 @@ u8 MovementType_Invisible_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementType_Invisible_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementType_Invisible_Step2(struct ObjectEvent *, struct Sprite *); -u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 z, u8 direction); +u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 elevation, u8 direction); void TurnVirtualObject(u8 virtualObjId, u8 direction); void SetVirtualObjectGraphics(u8 virtualObjId, u8 graphicsId); void SetVirtualObjectInvisibility(u8 virtualObjId, bool32 invisible); diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 823564f226..d382de08c8 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -30,7 +30,7 @@ void PlayerSetAnimId(u8 a, u8 b); bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction); void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction); u8 CheckForObjectEventCollision(struct ObjectEvent *a, s16 b, s16 c, u8 d, u8 e); -u8 PlayerGetZCoord(void); +u8 PlayerGetElevation(void); void SetPlayerAvatarTransitionFlags(u16 a); void CancelPlayerForcedMovement(void); void InitPlayerAvatar(s16 a, s16 b, u8 c, u8 d); diff --git a/include/fieldmap.h b/include/fieldmap.h index db060497a9..e7497f7bd4 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -32,7 +32,7 @@ bool32 CanCameraMoveInDirection(int direction); u16 GetMetatileAttributesById(u16 metatileId); void GetCameraFocusCoords(u16 *x, u16 *y); u8 MapGridGetMetatileLayerTypeAt(int x, int y); -u8 MapGridGetZCoordAt(int x, int y); +u8 MapGridGetElevationAt(int x, int y); bool8 CameraMove(int deltaX, int deltaY); void SaveMapView(void); void SetCameraFocusCoords(u16 x, u16 y); diff --git a/include/global.h b/include/global.h index 51ecbcbce5..0122ecd5c4 100644 --- a/include/global.h +++ b/include/global.h @@ -1022,7 +1022,7 @@ struct MapPosition { s16 x; s16 y; - s8 height; + s8 elevation; }; #endif // GUARD_GLOBAL_H diff --git a/src/bike.c b/src/bike.c index 20166392e9..f1a95d7edd 100644 --- a/src/bike.c +++ b/src/bike.c @@ -900,7 +900,7 @@ static bool8 IsRunningDisallowedByMetatile(u8 tile) { if (MetatileBehavior_IsRunningDisallowed(tile)) return TRUE; - if (MetatileBehavior_IsFortreeBridge(tile) && (PlayerGetZCoord() & 1) == 0) + if (MetatileBehavior_IsFortreeBridge(tile) && (PlayerGetElevation() & 1) == 0) return TRUE; return FALSE; } diff --git a/src/decoration.c b/src/decoration.c index 0448778c39..7538e85b56 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -1534,7 +1534,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) if (!IsntInitialPosition(taskId, curX, curY, layerType)) return FALSE; - behaviorAt = GetObjectEventIdByXYZ(curX, curY, 0); + behaviorAt = GetObjectEventIdByPosition(curX, curY, 0); if (behaviorAt != 0 && behaviorAt != OBJECT_EVENTS_COUNT) return FALSE; } @@ -1555,7 +1555,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) if (!IsntInitialPosition(taskId, curX, curY, layerType)) return FALSE; - if (GetObjectEventIdByXYZ(curX, curY, 0) != OBJECT_EVENTS_COUNT) + if (GetObjectEventIdByPosition(curX, curY, 0) != OBJECT_EVENTS_COUNT) return FALSE; } } @@ -1572,7 +1572,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) if (!IsntInitialPosition(taskId, curX, curY, layerType)) return FALSE; - behaviorAt = GetObjectEventIdByXYZ(curX, curY, 0); + behaviorAt = GetObjectEventIdByPosition(curX, curY, 0); if (behaviorAt != 0 && behaviorAt != OBJECT_EVENTS_COUNT) return FALSE; } @@ -1609,7 +1609,7 @@ static bool8 CanPlaceDecoration(u8 taskId, const struct Decoration *decoration) return FALSE; } - if (GetObjectEventIdByXYZ(curX, curY, 0) != OBJECT_EVENTS_COUNT) + if (GetObjectEventIdByPosition(curX, curY, 0) != OBJECT_EVENTS_COUNT) return FALSE; } break; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 2c7ceedf4c..4bd8d56035 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -110,7 +110,7 @@ static void GetGroundEffectFlags_Seaweed(struct ObjectEvent*, u32*); static void GetGroundEffectFlags_JumpLanding(struct ObjectEvent*, u32*); static u8 ObjectEventGetNearbyReflectionType(struct ObjectEvent*); static u8 GetReflectionTypeByMetatileBehavior(u32); -static void InitObjectPriorityByZCoord(struct Sprite *sprite, u8 z); +static void InitObjectPriorityByElevation(struct Sprite *, u8); static void ObjectEventUpdateSubpriority(struct ObjectEvent*, struct Sprite*); static void DoTracksGroundEffect_None(struct ObjectEvent*, struct Sprite*, u8); static void DoTracksGroundEffect_Footprints(struct ObjectEvent*, struct Sprite*, u8); @@ -142,27 +142,29 @@ static void ResetObjectEventFldEffData(struct ObjectEvent *); static u8 LoadSpritePaletteIfTagExists(const struct SpritePalette *); static u8 FindObjectEventPaletteIndexByTag(u16); static void _PatchObjectPalette(u16, u8); -static bool8 ObjectEventDoesZCoordMatch(struct ObjectEvent *, u8); +static bool8 ObjectEventDoesElevationMatch(struct ObjectEvent *, u8); static void SpriteCB_CameraObject(struct Sprite *); static void CameraObject_0(struct Sprite *); static void CameraObject_1(struct Sprite *); static void CameraObject_2(struct Sprite *); -static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count); +static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8, struct ObjectEventTemplate *, u8); static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *); static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8); static void SetSpriteDataForNormalStep(struct Sprite *, u8, u8); -static void InitSpriteForFigure8Anim(struct Sprite *sprite); -static bool8 AnimateSpriteInFigure8(struct Sprite *sprite); +static void InitSpriteForFigure8Anim(struct Sprite *); +static bool8 AnimateSpriteInFigure8(struct Sprite *); static void SpriteCB_VirtualObject(struct Sprite *); static void DoShadowFieldEffect(struct ObjectEvent *); static void SetJumpSpriteData(struct Sprite *, u8, u8, u8); -static void SetWalkSlowSpriteData(struct Sprite *sprite, u8 direction); -static bool8 UpdateWalkSlowAnim(struct Sprite *sprite); -static u8 DoJumpSpriteMovement(struct Sprite *sprite); -static u8 DoJumpSpecialSpriteMovement(struct Sprite *sprite); +static void SetWalkSlowSpriteData(struct Sprite *, u8); +static bool8 UpdateWalkSlowAnim(struct Sprite *); +static u8 DoJumpSpriteMovement(struct Sprite *); +static u8 DoJumpSpecialSpriteMovement(struct Sprite *); static void CreateLevitateMovementTask(struct ObjectEvent *); static void DestroyLevitateMovementTask(u8); -static bool8 NpcTakeStep(struct Sprite *sprite); +static bool8 NpcTakeStep(struct Sprite *); +static bool8 IsElevationMismatchAt(u8, s16, s16); +static bool8 AreElevationsCompatible(u8 a, u8 b); static const struct SpriteFrameImage sPicTable_PechaBerryTree[]; @@ -1433,7 +1435,7 @@ static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTempl if (!objectEvent->inanimate) StartSpriteAnim(sprite, GetFaceDirectionAnimNum(objectEvent->facingDirection)); - SetObjectSubpriorityByZCoord(objectEvent->previousElevation, sprite, 1); + SetObjectSubpriorityByElevation(objectEvent->previousElevation, sprite, 1); UpdateObjectEventVisibility(objectEvent, sprite); return objectEventId; } @@ -1470,7 +1472,7 @@ u8 SpawnSpecialObjectEvent(struct ObjectEventTemplate *objectEventTemplate) return TrySpawnObjectEventTemplate(objectEventTemplate, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY); } -u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z) +u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 elevation) { struct ObjectEventTemplate objectEventTemplate; @@ -1481,7 +1483,7 @@ u8 SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 l objectEventTemplate.inConnection = 0; objectEventTemplate.x = x; objectEventTemplate.y = y; - objectEventTemplate.elevation = z; + objectEventTemplate.elevation = elevation; objectEventTemplate.movementType = movementBehavior; objectEventTemplate.movementRangeX = 0; objectEventTemplate.movementRangeY = 0; @@ -1560,7 +1562,7 @@ u8 CreateObjectGraphicsSprite(u16 graphicsId, void (*callback)(struct Sprite *), // A unique id is given as an argument and stored in the sprite data to allow referring back to the same virtual object. // They can be turned (and, in the case of the Union Room, animated teleporting in and out) but do not have movement types // or any of the other data normally associated with object events. -u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 z, u8 direction) +u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 elevation, u8 direction) { u8 spriteId; struct Sprite *sprite; @@ -1587,7 +1589,7 @@ u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 z, u8 di sprite->coordOffsetEnabled = TRUE; sprite->sVirtualObjId = virtualObjId; - sprite->sVirtualObjElev = z; + sprite->sVirtualObjElev = elevation; if (graphicsInfo->paletteSlot == 10) LoadSpecialObjectReflectionPalette(graphicsInfo->paletteTag, graphicsInfo->paletteSlot); else if (graphicsInfo->paletteSlot >= 16) @@ -1598,8 +1600,8 @@ u8 CreateVirtualObject(u8 graphicsId, u8 virtualObjId, s16 x, s16 y, u8 z, u8 di SetSubspriteTables(sprite, subspriteTables); sprite->subspriteMode = SUBSPRITES_IGNORE_PRIORITY; } - InitObjectPriorityByZCoord(sprite, z); - SetObjectSubpriorityByZCoord(z, sprite, 1); + InitObjectPriorityByElevation(sprite, elevation); + SetObjectSubpriorityByElevation(elevation, sprite, 1); StartSpriteAnim(sprite, GetFaceDirectionAnimNum(direction)); } return spriteId; @@ -1755,7 +1757,7 @@ static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y) StartSpriteAnim(sprite, GetFaceDirectionAnimNum(objectEvent->facingDirection)); ResetObjectEventFldEffData(objectEvent); - SetObjectSubpriorityByZCoord(objectEvent->previousElevation, sprite, 1); + SetObjectSubpriorityByElevation(objectEvent->previousElevation, sprite, 1); } } @@ -2148,7 +2150,7 @@ void UpdateObjectEventCoordsForCameraUpdate(void) } } -u8 GetObjectEventIdByXYZ(u16 x, u16 y, u8 z) +u8 GetObjectEventIdByPosition(u16 x, u16 y, u8 elevation) { u8 i; @@ -2156,16 +2158,18 @@ u8 GetObjectEventIdByXYZ(u16 x, u16 y, u8 z) { if (gObjectEvents[i].active) { - if (gObjectEvents[i].currentCoords.x == x && gObjectEvents[i].currentCoords.y == y && ObjectEventDoesZCoordMatch(&gObjectEvents[i], z)) + if (gObjectEvents[i].currentCoords.x == x + && gObjectEvents[i].currentCoords.y == y + && ObjectEventDoesElevationMatch(&gObjectEvents[i], elevation)) return i; } } return OBJECT_EVENTS_COUNT; } -static bool8 ObjectEventDoesZCoordMatch(struct ObjectEvent *objectEvent, u8 z) +static bool8 ObjectEventDoesElevationMatch(struct ObjectEvent *objectEvent, u8 elevation) { - if (objectEvent->currentElevation != 0 && z != 0 && objectEvent->currentElevation != z) + if (objectEvent->currentElevation != 0 && elevation != 0 && objectEvent->currentElevation != elevation) return FALSE; return TRUE; @@ -4630,7 +4634,7 @@ u8 GetCollisionAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u32 dir) return COLLISION_IMPASSABLE; else if (objectEvent->trackedByCamera && !CanCameraMoveInDirection(direction)) return COLLISION_IMPASSABLE; - else if (IsZCoordMismatchAt(objectEvent->currentElevation, x, y)) + else if (IsElevationMismatchAt(objectEvent->currentElevation, x, y)) return COLLISION_ELEVATION_MISMATCH; else if (DoesObjectCollideWithObjectAt(objectEvent, x, y)) return COLLISION_OBJECT_EVENT; @@ -4645,7 +4649,7 @@ u8 GetCollisionFlagsAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 d flags |= 1; if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == -1 || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction) || (objectEvent->trackedByCamera && !CanCameraMoveInDirection(direction))) flags |= 2; - if (IsZCoordMismatchAt(objectEvent->currentElevation, x, y)) + if (IsElevationMismatchAt(objectEvent->currentElevation, x, y)) flags |= 4; if (DoesObjectCollideWithObjectAt(objectEvent, x, y)) flags |= 8; @@ -4699,7 +4703,7 @@ static bool8 DoesObjectCollideWithObjectAt(struct ObjectEvent *objectEvent, s16 { if ((curObject->currentCoords.x == x && curObject->currentCoords.y == y) || (curObject->previousCoords.x == x && curObject->previousCoords.y == y)) { - if (AreZCoordsCompatible(objectEvent->currentElevation, curObject->currentElevation)) + if (AreElevationsCompatible(objectEvent->currentElevation, curObject->currentElevation)) return TRUE; } } @@ -7667,23 +7671,23 @@ static void SetObjectEventSpriteOamTableForLongGrass(struct ObjectEvent *objEven sprite->subspriteTableNum = 4; - if (ZCoordToPriority(objEvent->previousElevation) == 1) + if (ElevationToPriority(objEvent->previousElevation) == 1) sprite->subspriteTableNum = 5; } -bool8 IsZCoordMismatchAt(u8 z, s16 x, s16 y) +static bool8 IsElevationMismatchAt(u8 elevation, s16 x, s16 y) { - u8 mapZ; + u8 mapElevation; - if (z == 0) + if (elevation == 0) return FALSE; - mapZ = MapGridGetZCoordAt(x, y); + mapElevation = MapGridGetElevationAt(x, y); - if (mapZ == 0 || mapZ == 15) + if (mapElevation == 0 || mapElevation == 15) return FALSE; - if (mapZ != z) + if (mapElevation != elevation) return TRUE; return FALSE; @@ -7701,43 +7705,43 @@ static const u8 sElevationToSubspriteTableNum[] = { 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 0, 1, }; -void UpdateObjectEventZCoordAndPriority(struct ObjectEvent *objEvent, struct Sprite *sprite) +static void UpdateObjectEventElevationAndPriority(struct ObjectEvent *objEvent, struct Sprite *sprite) { if (objEvent->fixedPriority) return; - ObjectEventUpdateZCoord(objEvent); + ObjectEventUpdateElevation(objEvent); sprite->subspriteTableNum = sElevationToSubspriteTableNum[objEvent->previousElevation]; sprite->oam.priority = sElevationToPriority[objEvent->previousElevation]; } -static void InitObjectPriorityByZCoord(struct Sprite *sprite, u8 z) +static void InitObjectPriorityByElevation(struct Sprite *sprite, u8 elevation) { - sprite->subspriteTableNum = sElevationToSubspriteTableNum[z]; - sprite->oam.priority = sElevationToPriority[z]; + sprite->subspriteTableNum = sElevationToSubspriteTableNum[elevation]; + sprite->oam.priority = sElevationToPriority[elevation]; } -u8 ZCoordToPriority(u8 z) +u8 ElevationToPriority(u8 elevation) { - return sElevationToPriority[z]; + return sElevationToPriority[elevation]; } -void ObjectEventUpdateZCoord(struct ObjectEvent *objEvent) +void ObjectEventUpdateElevation(struct ObjectEvent *objEvent) { - u8 z = MapGridGetZCoordAt(objEvent->currentCoords.x, objEvent->currentCoords.y); - u8 z2 = MapGridGetZCoordAt(objEvent->previousCoords.x, objEvent->previousCoords.y); + u8 curElevation = MapGridGetElevationAt(objEvent->currentCoords.x, objEvent->currentCoords.y); + u8 prevElevation = MapGridGetElevationAt(objEvent->previousCoords.x, objEvent->previousCoords.y); - if (z == 0xF || z2 == 0xF) + if (curElevation == 15 || prevElevation == 15) return; - objEvent->currentElevation = z; + objEvent->currentElevation = curElevation; - if (z != 0 && z != 0xF) - objEvent->previousElevation = z; + if (curElevation != 0 && curElevation != 15) + objEvent->previousElevation = curElevation; } -void SetObjectSubpriorityByZCoord(u8 elevation, struct Sprite *sprite, u8 subpriority) +void SetObjectSubpriorityByElevation(u8 elevation, struct Sprite *sprite, u8 subpriority) { s32 tmp = sprite->centerToCornerVecY; u32 tmpa = *(u16 *)&sprite->y; @@ -7752,10 +7756,10 @@ static void ObjectEventUpdateSubpriority(struct ObjectEvent *objEvent, struct Sp if (objEvent->fixedPriority) return; - SetObjectSubpriorityByZCoord(objEvent->previousElevation, sprite, 1); + SetObjectSubpriorityByElevation(objEvent->previousElevation, sprite, 1); } -bool8 AreZCoordsCompatible(u8 a, u8 b) +static bool8 AreElevationsCompatible(u8 a, u8 b) { if (a == 0 || b == 0) return TRUE; @@ -8051,7 +8055,7 @@ static void DoGroundEffects_OnSpawn(struct ObjectEvent *objEvent, struct Sprite if (objEvent->triggerGroundEffectsOnMove) { flags = 0; - UpdateObjectEventZCoordAndPriority(objEvent, sprite); + UpdateObjectEventElevationAndPriority(objEvent, sprite); GetAllGroundEffectFlags_OnSpawn(objEvent, &flags); SetObjectEventSpriteOamTableForLongGrass(objEvent, sprite); DoFlaggedGroundEffects(objEvent, sprite, flags); @@ -8067,7 +8071,7 @@ static void DoGroundEffects_OnBeginStep(struct ObjectEvent *objEvent, struct Spr if (objEvent->triggerGroundEffectsOnMove) { flags = 0; - UpdateObjectEventZCoordAndPriority(objEvent, sprite); + UpdateObjectEventElevationAndPriority(objEvent, sprite); GetAllGroundEffectFlags_OnBeginStep(objEvent, &flags); SetObjectEventSpriteOamTableForLongGrass(objEvent, sprite); filters_out_some_ground_effects(objEvent, &flags); @@ -8084,7 +8088,7 @@ static void DoGroundEffects_OnFinishStep(struct ObjectEvent *objEvent, struct Sp if (objEvent->triggerGroundEffectsOnStop) { flags = 0; - UpdateObjectEventZCoordAndPriority(objEvent, sprite); + UpdateObjectEventElevationAndPriority(objEvent, sprite); GetAllGroundEffectFlags_OnFinishStep(objEvent, &flags); SetObjectEventSpriteOamTableForLongGrass(objEvent, sprite); FilterOutStepOnPuddleGroundEffectIfJumping(objEvent, &flags); @@ -8548,7 +8552,7 @@ void UpdateObjectEventSpriteInvisibility(struct Sprite *sprite, bool8 invisible) static void SpriteCB_VirtualObject(struct Sprite *sprite) { VirtualObject_UpdateAnim(sprite); - SetObjectSubpriorityByZCoord(sprite->sVirtualObjElev, sprite, 1); + SetObjectSubpriorityByElevation(sprite->sVirtualObjElev, sprite, 1); UpdateObjectEventSpriteInvisibility(sprite, sprite->sInvisible); } diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 8d6b564d25..490b152ce3 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -194,7 +194,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input) static void GetPlayerPosition(struct MapPosition *position) { PlayerGetDestCoords(&position->x, &position->y); - position->height = PlayerGetZCoord(); + position->elevation = PlayerGetElevation(); } static void GetInFrontOfPlayerPosition(struct MapPosition *position) @@ -203,10 +203,10 @@ static void GetInFrontOfPlayerPosition(struct MapPosition *position) GetXYCoordsOneStepInFrontOfPlayer(&position->x, &position->y); PlayerGetDestCoords(&x, &y); - if (MapGridGetZCoordAt(x, y) != 0) - position->height = PlayerGetZCoord(); + if (MapGridGetElevationAt(x, y) != 0) + position->elevation = PlayerGetElevation(); else - position->height = 0; + position->elevation = 0; } static u16 GetPlayerCurMetatileBehavior(int runningState) @@ -264,9 +264,9 @@ const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatil s32 i; if (!MetatileBehavior_IsCounter(MapGridGetMetatileBehaviorAt(position->x, position->y))) - objectEventId = GetObjectEventIdByXYZ(position->x, position->y, position->height); + objectEventId = GetObjectEventIdByPosition(position->x, position->y, position->elevation); else - objectEventId = GetObjectEventIdByXYZ(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->height); + objectEventId = GetObjectEventIdByPosition(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->elevation); if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER) return NULL; @@ -288,14 +288,14 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8 u8 objectEventId; const u8 *script; - objectEventId = GetObjectEventIdByXYZ(position->x, position->y, position->height); + objectEventId = GetObjectEventIdByPosition(position->x, position->y, position->elevation); if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER) { if (MetatileBehavior_IsCounter(metatileBehavior) != TRUE) return NULL; // Look for an object event on the other side of the counter. - objectEventId = GetObjectEventIdByXYZ(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->height); + objectEventId = GetObjectEventIdByPosition(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->elevation); if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER) return NULL; } @@ -315,7 +315,7 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8 static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position, u8 metatileBehavior, u8 direction) { - struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->height); + struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); if (bgEvent == NULL) return NULL; @@ -366,7 +366,7 @@ static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 metatileBehavior, u8 direction) { - s8 height; + s8 elevation; if (MetatileBehavior_IsPlayerFacingTVScreen(metatileBehavior, direction) == TRUE) return EventScript_TV; @@ -409,8 +409,8 @@ static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 me if (MetatileBehavior_IsTrainerHillTimer(metatileBehavior) == TRUE) return EventScript_TrainerHillTimer; - height = position->height; - if (height == MapGridGetZCoordAt(position->x, position->y)) + elevation = position->elevation; + if (elevation == MapGridGetElevationAt(position->x, position->y)) { if (MetatileBehavior_IsSecretBasePC(metatileBehavior) == TRUE) return SecretBase_EventScript_PC; @@ -497,7 +497,7 @@ static bool8 TryStartStepBasedScript(struct MapPosition *position, u16 metatileB static bool8 TryStartCoordEventScript(struct MapPosition *position) { - u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->height); + u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); if (script == NULL) return FALSE; @@ -783,7 +783,7 @@ static bool8 IsArrowWarpMetatileBehavior(u16 metatileBehavior, u8 direction) static s8 GetWarpEventAtMapPosition(struct MapHeader *mapHeader, struct MapPosition *position) { - return GetWarpEventAtPosition(mapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->height); + return GetWarpEventAtPosition(mapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); } static void SetupWarp(struct MapHeader *unused, s8 warpEventId, struct MapPosition *position) @@ -918,7 +918,7 @@ static u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position) { - return GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->height); + return GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation); } static struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index 0acb158637..65617038d1 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -359,7 +359,7 @@ void UpdateTallGrassFieldEffect(struct Sprite *sprite) || objectEvent->previousCoords.y != sprite->sY)) sprite->sObjectMoved = TRUE; - // Metatile behavior var re-used + // Metatile behavior var re-used as subpriority metatileBehavior = 0; if (sprite->animCmdIndex == 0) metatileBehavior = 4; @@ -423,7 +423,7 @@ u32 FldEff_LongGrass(void) { sprite = &gSprites[spriteId]; sprite->coordOffsetEnabled = TRUE; - sprite->oam.priority = ZCoordToPriority(gFieldEffectArguments[2]); + sprite->oam.priority = ElevationToPriority(gFieldEffectArguments[2]); sprite->sElevation = gFieldEffectArguments[2]; sprite->sX = gFieldEffectArguments[0]; sprite->sY = gFieldEffectArguments[1]; @@ -1108,7 +1108,7 @@ void SynchroniseSurfPosition(struct ObjectEvent *playerObj, struct Sprite *sprit for (i = DIR_SOUTH; i <= DIR_EAST; i++, x = sprite->data[6], y = sprite->data[7]) { MoveCoords(i, &x, &y); - if (MapGridGetZCoordAt(x, y) == 3) + if (MapGridGetElevationAt(x, y) == 3) { sprite->data[5]++; break; @@ -1646,7 +1646,7 @@ void UpdateJumpImpactEffect(struct Sprite *sprite) else { UpdateObjectEventSpriteInvisibility(sprite, FALSE); - SetObjectSubpriorityByZCoord(sprite->sElevation, sprite, 0); + SetObjectSubpriorityByElevation(sprite->sElevation, sprite, 0); } } @@ -1658,14 +1658,14 @@ void WaitFieldEffectSpriteAnim(struct Sprite *sprite) UpdateObjectEventSpriteInvisibility(sprite, FALSE); } -static void UpdateGrassFieldEffectSubpriority(struct Sprite *sprite, u8 z, u8 offset) +static void UpdateGrassFieldEffectSubpriority(struct Sprite *sprite, u8 elevation, u8 subpriority) { u8 i; s16 var, xhi, lyhi, yhi, ylo; const struct ObjectEventGraphicsInfo *graphicsInfo; // Unused Variable struct Sprite *linkedSprite; - SetObjectSubpriorityByZCoord(z, sprite, offset); + SetObjectSubpriorityByElevation(elevation, sprite, subpriority); for (i = 0; i < OBJECT_EVENTS_COUNT; i ++) { struct ObjectEvent *objectEvent = &gObjectEvents[i]; diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index fce23ee8ea..188b31833f 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -708,8 +708,8 @@ static u8 CheckForObjectEventStaticCollision(struct ObjectEvent *objectEvent, s1 static bool8 CanStopSurfing(s16 x, s16 y, u8 direction) { if ((gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING) - && MapGridGetZCoordAt(x, y) == 3 - && GetObjectEventIdByXYZ(x, y, 3) == OBJECT_EVENTS_COUNT) + && MapGridGetElevationAt(x, y) == 3 + && GetObjectEventIdByPosition(x, y, 3) == OBJECT_EVENTS_COUNT) { CreateStopSurfingTask(direction); return TRUE; @@ -1168,7 +1168,7 @@ u8 GetPlayerMovementDirection(void) return gObjectEvents[gPlayerAvatar.objectEventId].movementDirection; } -u8 PlayerGetZCoord(void) +u8 PlayerGetElevation(void) { return gObjectEvents[gPlayerAvatar.objectEventId].previousElevation; } @@ -1306,7 +1306,7 @@ bool8 IsPlayerFacingSurfableFishableWater(void) MoveCoords(playerObjEvent->facingDirection, &x, &y); if (GetCollisionAtCoords(playerObjEvent, x, y, playerObjEvent->facingDirection) == COLLISION_ELEVATION_MISMATCH - && PlayerGetZCoord() == 3 + && PlayerGetElevation() == 3 && MetatileBehavior_IsSurfableFishableWater(MapGridGetMetatileBehaviorAt(x, y))) return TRUE; else diff --git a/src/field_tasks.c b/src/field_tasks.c index 760d853693..e6197505df 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -445,8 +445,8 @@ static void PacifidlogBridgePerStepCallback(u8 taskId) static void TryLowerFortreeBridge(s16 x, s16 y) { - u8 z = PlayerGetZCoord(); - if (!(z & 1)) + u8 elevation = PlayerGetElevation(); + if (!(elevation & 1)) { switch (MapGridGetMetatileIdAt(x, y)) { @@ -462,8 +462,8 @@ static void TryLowerFortreeBridge(s16 x, s16 y) static void TryRaiseFortreeBridge(s16 x, s16 y) { - u8 z = PlayerGetZCoord(); - if (!(z & 1)) + u8 elevation = PlayerGetElevation(); + if (!(elevation & 1)) { switch (MapGridGetMetatileIdAt(x, y)) { @@ -488,7 +488,7 @@ static void FortreeBridgePerStepCallback(u8 taskId) { bool8 isFortreeBridgeCur; bool8 isFortreeBridgePrev; - u8 z, onBridgeElevation; + u8 elevation, onBridgeElevation; s16 x, y, prevX, prevY; s16 *data = gTasks[taskId].data; PlayerGetDestCoords(&x, &y); @@ -520,9 +520,9 @@ static void FortreeBridgePerStepCallback(u8 taskId) isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(prevX, prevY)); // Make sure player isn't below bridge - z = PlayerGetZCoord(); + elevation = PlayerGetElevation(); onBridgeElevation = FALSE; - if ((u8)(z & 1) == 0) + if ((u8)(elevation & 1) == 0) onBridgeElevation = TRUE; if (onBridgeElevation && (isFortreeBridgeCur == TRUE || isFortreeBridgePrev == TRUE)) diff --git a/src/fieldmap.c b/src/fieldmap.c index 8be4206e23..4dbf981cf5 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -342,7 +342,7 @@ static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHead } } -u8 MapGridGetZCoordAt(int x, int y) +u8 MapGridGetElevationAt(int x, int y) { u16 block = GetMapGridBlockAt(x, y); diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index daa46ad765..9129c5208c 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -181,7 +181,7 @@ bool8 SetUpFieldMove_Cut(void) for (j = 0; j < CUT_NORMAL_SIDE; j++) { x = j - 1 + gPlayerFacingPosition.x; - if (MapGridGetZCoordAt(x, y) == gPlayerFacingPosition.height) + if (MapGridGetElevationAt(x, y) == gPlayerFacingPosition.elevation) { tileBehavior = MapGridGetMetatileBehaviorAt(x, y); if (MetatileBehavior_IsPokeGrass(tileBehavior) == TRUE @@ -238,7 +238,7 @@ bool8 SetUpFieldMove_Cut(void) if (tileCuttable == TRUE) { - if (MapGridGetZCoordAt(x, y) == gPlayerFacingPosition.height) + if (MapGridGetElevationAt(x, y) == gPlayerFacingPosition.elevation) { u8 tileArrayId = ((sHyperCutStruct[i].y * 5) + 12) + (sHyperCutStruct[i].x); tileBehavior = MapGridGetMetatileBehaviorAt(x, y); diff --git a/src/fldeff_rocksmash.c b/src/fldeff_rocksmash.c index 6f4ce8002b..a30000e526 100644 --- a/src/fldeff_rocksmash.c +++ b/src/fldeff_rocksmash.c @@ -19,7 +19,6 @@ #include "constants/map_types.h" #include "constants/songs.h" -// static functions static void Task_DoFieldMove_Init(u8 taskId); static void Task_DoFieldMove_ShowMonAfterPose(u8 taskId); static void Task_DoFieldMove_WaitForMon(u8 taskId); @@ -28,14 +27,13 @@ static void Task_DoFieldMove_RunFunc(u8 taskId); static void FieldCallback_RockSmash(void); static void FieldMove_RockSmash(void); -// text bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId) { u8 objEventId; GetXYCoordsOneStepInFrontOfPlayer(&gPlayerFacingPosition.x, &gPlayerFacingPosition.y); - gPlayerFacingPosition.height = PlayerGetZCoord(); - objEventId = GetObjectEventIdByXYZ(gPlayerFacingPosition.x, gPlayerFacingPosition.y, gPlayerFacingPosition.height); + gPlayerFacingPosition.elevation = PlayerGetElevation(); + objEventId = GetObjectEventIdByPosition(gPlayerFacingPosition.x, gPlayerFacingPosition.y, gPlayerFacingPosition.elevation); if (gObjectEvents[objEventId].graphicsId != graphicsId) { return FALSE; diff --git a/src/item_use.c b/src/item_use.c index 29ceb7caeb..c9a7fe1c7b 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -725,11 +725,11 @@ static void ItemUseOnFieldCB_WailmerPailBerry(u8 taskId) static bool8 TryToWaterSudowoodo(void) { u16 x, y; - u8 z; + u8 elevation; u8 objId; GetXYCoordsOneStepInFrontOfPlayer(&x, &y); - z = PlayerGetZCoord(); - objId = GetObjectEventIdByXYZ(x, y, z); + elevation = PlayerGetElevation(); + objId = GetObjectEventIdByPosition(x, y, elevation); if (objId == OBJECT_EVENTS_COUNT || gObjectEvents[objId].graphicsId != OBJ_EVENT_GFX_SUDOWOODO) return FALSE; else diff --git a/src/overworld.c b/src/overworld.c index a18313d326..ba6eaa1679 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -2692,7 +2692,7 @@ static void LoadCableClubPlayer(s32 linkPlayerId, s32 myPlayerId, struct CableCl GetLinkPlayerCoords(linkPlayerId, &x, &y); trainer->pos.x = x; trainer->pos.y = y; - trainer->pos.height = GetLinkPlayerElevation(linkPlayerId); + trainer->pos.elevation = GetLinkPlayerElevation(linkPlayerId); trainer->metatileBehavior = MapGridGetMetatileBehaviorAt(x, y); } @@ -2745,7 +2745,7 @@ static const u8 *TryInteractWithPlayer(struct CableClubPlayer *player) otherPlayerPos = player->pos; otherPlayerPos.x += gDirectionToVectors[player->facing].x; otherPlayerPos.y += gDirectionToVectors[player->facing].y; - otherPlayerPos.height = 0; + otherPlayerPos.elevation = 0; linkPlayerId = GetLinkPlayerIdAt(otherPlayerPos.x, otherPlayerPos.y); if (linkPlayerId != MAX_LINK_PLAYERS) @@ -2955,7 +2955,7 @@ static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s1 objEvent->previousCoords.y = y; SetSpritePosToMapCoords(x, y, &objEvent->initialCoords.x, &objEvent->initialCoords.y); objEvent->initialCoords.x += 8; - ObjectEventUpdateZCoord(objEvent); + ObjectEventUpdateElevation(objEvent); } static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir) @@ -3095,7 +3095,7 @@ static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayer { objEvent->directionSequenceIndex = 16; ShiftObjectEventCoords(objEvent, x, y); - ObjectEventUpdateZCoord(objEvent); + ObjectEventUpdateElevation(objEvent); return TRUE; } } @@ -3201,8 +3201,8 @@ static void SpriteCB_LinkPlayer(struct Sprite *sprite) struct ObjectEvent *objEvent = &gObjectEvents[linkPlayerObjEvent->objEventId]; sprite->x = objEvent->initialCoords.x; sprite->y = objEvent->initialCoords.y; - SetObjectSubpriorityByZCoord(objEvent->previousElevation, sprite, 1); - sprite->oam.priority = ZCoordToPriority(objEvent->previousElevation); + SetObjectSubpriorityByElevation(objEvent->previousElevation, sprite, 1); + sprite->oam.priority = ElevationToPriority(objEvent->previousElevation); if (linkPlayerObjEvent->movementMode == MOVEMENT_MODE_FREE) StartSpriteAnim(sprite, GetFaceDirectionAnimNum(linkDirection(objEvent))); From a83e41b2ccf87fe8b396280b34f71328b191a861 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Sat, 22 Jan 2022 19:37:46 -0500 Subject: [PATCH 366/417] move m4a track definitions --- sound/music_player_table.inc | 38 ++++++++++++++++++++++++++++++++---- src/m4a_1.s | 22 +-------------------- sym_bss.txt | 1 + 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/sound/music_player_table.inc b/sound/music_player_table.inc index 6c74a13528..c4c4d4b626 100644 --- a/sound/music_player_table.inc +++ b/sound/music_player_table.inc @@ -1,6 +1,36 @@ + .equiv TRACK_SIZE, 0x50 + .equiv NUM_TRACKS_BGM, 10 + .equiv NUM_TRACKS_SE1, 3 + .equiv NUM_TRACKS_SE2, 9 + .equiv NUM_TRACKS_SE3, 1 + + .bss + + .global gMPlayTrack_BGM +gMPlayTrack_BGM: + .space TRACK_SIZE * NUM_TRACKS_BGM + .size gMPlayTrack_BGM, .-gMPlayTrack_BGM + + .global gMPlayTrack_SE1 +gMPlayTrack_SE1: + .space TRACK_SIZE * NUM_TRACKS_SE1 + .size gMPlayTrack_SE1, .-gMPlayTrack_SE1 + + .global gMPlayTrack_SE2 +gMPlayTrack_SE2: + .space TRACK_SIZE * NUM_TRACKS_SE2 + .size gMPlayTrack_SE2, .-gMPlayTrack_SE2 + + .global gMPlayTrack_SE3 +gMPlayTrack_SE3: + .space TRACK_SIZE * NUM_TRACKS_SE3 + .size gMPlayTrack_SE3, .-gMPlayTrack_SE3 + + .section .rodata + .align 2 gMPlayTable:: - music_player gMPlayInfo_BGM, gMPlayTrack_BGM, 10, 0 - music_player gMPlayInfo_SE1, gMPlayTrack_SE1, 3, 1 - music_player gMPlayInfo_SE2, gMPlayTrack_SE2, 9, 1 - music_player gMPlayInfo_SE3, gMPlayTrack_SE3, 1, 0 + music_player gMPlayInfo_BGM, gMPlayTrack_BGM, NUM_TRACKS_BGM, 0 + music_player gMPlayInfo_SE1, gMPlayTrack_SE1, NUM_TRACKS_SE1, 1 + music_player gMPlayInfo_SE2, gMPlayTrack_SE2, NUM_TRACKS_SE2, 1 + music_player gMPlayInfo_SE3, gMPlayTrack_SE3, NUM_TRACKS_SE3, 0 diff --git a/src/m4a_1.s b/src/m4a_1.s index f71a5546e4..be5d3576ef 100644 --- a/src/m4a_1.s +++ b/src/m4a_1.s @@ -1910,27 +1910,7 @@ _081DDD90: .align 2, 0 @ Don't pad with nop. - .bss + .bss gDecodingBuffer: @ Used as a buffer for audio decoded from compressed DPCM .space 0x40 .size gDecodingBuffer, .-gDecodingBuffer - - .global gMPlayTrack_BGM -gMPlayTrack_BGM: - .space 0x320 - .size gMPlayTrack_BGM, .-gMPlayTrack_BGM - - .global gMPlayTrack_SE1 -gMPlayTrack_SE1: - .space 0xF0 - .size gMPlayTrack_SE1, .-gMPlayTrack_SE1 - - .global gMPlayTrack_SE2 -gMPlayTrack_SE2: - .space 0x2D0 - .size gMPlayTrack_SE2, .-gMPlayTrack_SE2 - - .global gMPlayTrack_SE3 -gMPlayTrack_SE3: - .space 0x50 - .size gMPlayTrack_SE3, .-gMPlayTrack_SE3 diff --git a/sym_bss.txt b/sym_bss.txt index 75da960bf9..3a23e74789 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -55,6 +55,7 @@ .include "src/ereader_helpers.o" .include "src/faraway_island.o" .include "src/m4a_1.o" + .include "data/sound_data.o" .include "src/agb_flash.o" .include "src/siirtc.o" .include "*libgcc.a:dp-bit.o" From 04013fbdf2e3d06ba27ec25111c54798d92bc31d Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Sat, 22 Jan 2022 19:41:31 -0500 Subject: [PATCH 367/417] forgot we could do this --- sound/music_player_table.inc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/music_player_table.inc b/sound/music_player_table.inc index c4c4d4b626..5981a4d037 100644 --- a/sound/music_player_table.inc +++ b/sound/music_player_table.inc @@ -6,23 +6,19 @@ .bss - .global gMPlayTrack_BGM -gMPlayTrack_BGM: +gMPlayTrack_BGM:: .space TRACK_SIZE * NUM_TRACKS_BGM .size gMPlayTrack_BGM, .-gMPlayTrack_BGM - .global gMPlayTrack_SE1 -gMPlayTrack_SE1: +gMPlayTrack_SE1:: .space TRACK_SIZE * NUM_TRACKS_SE1 .size gMPlayTrack_SE1, .-gMPlayTrack_SE1 - .global gMPlayTrack_SE2 -gMPlayTrack_SE2: +gMPlayTrack_SE2:: .space TRACK_SIZE * NUM_TRACKS_SE2 .size gMPlayTrack_SE2, .-gMPlayTrack_SE2 - .global gMPlayTrack_SE3 -gMPlayTrack_SE3: +gMPlayTrack_SE3:: .space TRACK_SIZE * NUM_TRACKS_SE3 .size gMPlayTrack_SE3, .-gMPlayTrack_SE3 From 317e302147672d97bfcfa73efeb8372d797cee95 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Sat, 22 Jan 2022 19:43:11 -0500 Subject: [PATCH 368/417] fix inconsistent indentation --- src/m4a_1.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/m4a_1.s b/src/m4a_1.s index be5d3576ef..cc5d3238d6 100644 --- a/src/m4a_1.s +++ b/src/m4a_1.s @@ -1912,5 +1912,5 @@ _081DDD90: .bss gDecodingBuffer: @ Used as a buffer for audio decoded from compressed DPCM - .space 0x40 - .size gDecodingBuffer, .-gDecodingBuffer + .space 0x40 + .size gDecodingBuffer, .-gDecodingBuffer From 3b756bfb3dd23bbdb2fb74606c0b064e92002a45 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Sat, 22 Jan 2022 20:38:41 -0500 Subject: [PATCH 369/417] fix compilation on modern --- ld_script_modern.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ld_script_modern.txt b/ld_script_modern.txt index 092ff26c63..153ce7f6d4 100644 --- a/ld_script_modern.txt +++ b/ld_script_modern.txt @@ -27,6 +27,7 @@ SECTIONS { /* .bss starts at 0x3000000 */ src/*.o(.bss); gflib/*.o(.bss); + data/*.o(.bss); *libc.a:*.o(.bss*); *libnosys.a:*.o(.bss*); From 2cc301603e47ece925deeceaf3c363b7250781ce Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Sat, 22 Jan 2022 21:30:39 -0500 Subject: [PATCH 370/417] lmao whitespace --- ld_script_modern.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ld_script_modern.txt b/ld_script_modern.txt index 153ce7f6d4..a988fe0cd5 100644 --- a/ld_script_modern.txt +++ b/ld_script_modern.txt @@ -27,7 +27,7 @@ SECTIONS { /* .bss starts at 0x3000000 */ src/*.o(.bss); gflib/*.o(.bss); - data/*.o(.bss); + data/*.o(.bss); *libc.a:*.o(.bss*); *libnosys.a:*.o(.bss*); From dc2e210ade38bc5789764d0c3836c3d995a1d4ef Mon Sep 17 00:00:00 2001 From: laqieer Date: Sun, 23 Jan 2022 17:31:54 +0800 Subject: [PATCH 371/417] Install libpng using pacman instead of manual build for msys2 --- INSTALL.md | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 1ad3b4b0c9..1f1e1164be 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -125,12 +125,12 @@ Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or conti Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert. -1. Open msys2 at C:\devkitPro\msys2\msys2_shell.bat. +1. Open msys2 at C:\devkitPro\msys2\mingw64.exe or run `C:\devkitPro\msys2\msys2_shell.bat -mingw64`. 2. Certain packages are required to build pokeemerald. Install these by running the following command: ```bash - pacman -S make gcc zlib-devel git + pacman -S make zlib-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-libpng ```
    Note... @@ -138,39 +138,6 @@ Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert. > This command will ask for confirmation, just enter the yes action when prompted.
    -3. Download [libpng](https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.xz/download). - -4. Change directory to where libpng was downloaded. By default, msys2 will start in the current user's profile folder, located at **C:\Users\\⁠_\_**, where *\* is your Windows username. In most cases, libpng should be saved within a subfolder of the profile folder. For example, if libpng was saved to **C:\Users\\_\_\Downloads** (the Downloads location for most users), enter this command: - - ```bash - cd Downloads - ``` - -
    - Notes... - - > Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator. - > Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`. - > Note 3: Windows path names are case-insensitive so adhering to capitalization isn’t needed. - > Note 4: If libpng was saved elsewhere, you will need to specify the full path to where libpng was downloaded, e.g. `cd c:/devkitpro/msys2` if it was saved there. -
    - -5. Run the following commands to uncompress and install libpng. - - ```bash - tar xf libpng-1.6.37.tar.xz - cd libpng-1.6.37 - ./configure --prefix=/usr - make check - make install - ``` - -6. Then finally, run the following command to change back to the user profile folder. - - ```bash - cd - ``` - ### Choosing where to store pokeemerald (msys2) At this point, you can choose a folder to store pokeemerald into. If you're okay with storing pokeemerald in the user profile folder, then proceed to [Installation](#installation). Otherwise, you'll need to account for where pokeemerald is stored when changing directory to the pokeemerald folder. From 2495d1813239cd8d888c160b08c23500ba4759a7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 23 Jan 2022 18:51:56 -0500 Subject: [PATCH 372/417] Add missing :req, remove old macros --- asm/macros.inc | 129 ----------------------------- asm/macros/asm.inc | 4 +- asm/macros/field_effect_script.inc | 14 ++-- asm/macros/function.inc | 10 +-- asm/macros/m4a.inc | 10 +-- asm/macros/map.inc | 98 ++++++++++++---------- asm/macros/pokemon_data.inc | 56 ------------- asm/macros/window.inc | 35 -------- data/map_events.s | 1 + data/maps.s | 1 + include/constants/global.h | 9 ++ include/gba/m4a_internal.h | 2 +- include/global.fieldmap.h | 12 --- src/m4a.c | 2 +- tools/mapjson/mapjson.cpp | 2 +- 15 files changed, 87 insertions(+), 298 deletions(-) delete mode 100644 asm/macros/pokemon_data.inc delete mode 100644 asm/macros/window.inc diff --git a/asm/macros.inc b/asm/macros.inc index 77f44a8475..95bb4e31b0 100644 --- a/asm/macros.inc +++ b/asm/macros.inc @@ -1,8 +1,6 @@ .include "asm/macros/asm.inc" .include "asm/macros/function.inc" .include "asm/macros/movement.inc" - .include "asm/macros/window.inc" - .include "asm/macros/pokemon_data.inc" .include "asm/macros/map.inc" .include "asm/macros/field_effect_script.inc" .include "asm/macros/trainer_hill.inc" @@ -16,130 +14,3 @@ .include "asm/macros/battle_frontier/battle_pyramid.inc" .include "asm/macros/battle_frontier/battle_tower.inc" .include "asm/macros/battle_frontier/frontier_util.inc" - - .macro region_map_entry x, y, width, height, name - .byte \x - .byte \y - .byte \width - .byte \height - .4byte gMapName_\name - .endm - - .macro obj_tiles address, uncompressed_size, tag = 0 - .4byte \address - .2byte \uncompressed_size - .2byte \tag - .endm - - .macro null_obj_tiles - obj_tiles 0, 0, 0 - .endm - - .macro obj_pal address, tag - .4byte \address - .2byte \tag - .2byte 0@ padding - .endm - - .macro null_obj_pal - obj_pal 0, 0 - .endm - - .macro paired_pals tag, address - .2byte \tag - .2byte 0 @ padding - .4byte \address - .endm - -@ For object animation frames. - .macro obj_frame_tiles address, uncompressed_size - .4byte \address - .2byte \uncompressed_size - .2byte 0 @ padding - .endm - - .macro spr_template tile_tag, pal_tag, oam, anims, images, affine_anims, callback - .2byte \tile_tag - .2byte \pal_tag - .4byte \oam - .4byte \anims - .4byte \images - .4byte \affine_anims - .4byte \callback - .endm - -@ Berry trees have a table defining the palette slot used for each of their 5 -@ stages. However, the first 2 stages always use the same slots regardless of -@ the type of tree and the slots of the last 3 stages always equal each other. - .macro berry_tree_palette_slot_table slot - .byte 3, 4, \slot, \slot, \slot - .endm - - .macro subsprite x, y, priority, tile_num_offset, size - .byte \x - .byte \y - .2byte ((\priority) << 14) | ((\tile_num_offset) << 4) | SPRITE_SIZE_\size - .endm - - .macro obj_image_anim_frame pic_id, duration, flags = 0 - .2byte \pic_id - .byte (\flags) | (\duration) - .byte 0 @ padding - .endm - - .macro obj_image_anim_loop count - .2byte 0xfffd - .byte \count - .byte 0 @ padding - .endm - - .macro obj_image_anim_jump target_index - .2byte 0xfffe - .byte \target_index - .byte 0 @ padding - .endm - - .macro obj_image_anim_end - .2byte 0xffff - .2byte 0 @ padding - .endm - - .macro obj_rot_scal_anim_frame delta_x_scale, delta_y_scale, delta_angle, duration - .2byte \delta_x_scale - .2byte \delta_y_scale - .byte \delta_angle - .byte \duration - .2byte 0 @ padding - .endm - - .macro obj_rot_scal_anim_loop count - .2byte 0x7ffd - .2byte \count - .4byte 0 @ padding - .endm - - .macro obj_rot_scal_anim_jump target_index - .2byte 0x7ffe - .2byte \target_index - .4byte 0 @ padding - .endm - - .macro obj_rot_scal_anim_end unknown=0 - .2byte 0x7fff - .2byte \unknown - .fill 4 @ padding - .endm - - .macro door_anim_frame unknown, offset - .byte \unknown - .byte 0 @ padding - .2byte \offset - .endm - - .macro door_anim_gfx metatile_num, unknown, unknown2, tile_addr, palette_addr - .2byte \metatile_num - .byte \unknown - .byte \unknown2 - .4byte \tile_addr - .4byte \palette_addr - .endm diff --git a/asm/macros/asm.inc b/asm/macros/asm.inc index 4ac003fabd..3f70145d31 100644 --- a/asm/macros/asm.inc +++ b/asm/macros/asm.inc @@ -1,4 +1,4 @@ - .macro inc x + .macro inc x:req .set \x, \x + 1 .endm @@ -6,7 +6,7 @@ .set __enum__, \x .endm - .macro enum constant + .macro enum constant:req .equiv \constant, __enum__ inc __enum__ .endm diff --git a/asm/macros/field_effect_script.inc b/asm/macros/field_effect_script.inc index 597b89acbb..2a1e2abeef 100644 --- a/asm/macros/field_effect_script.inc +++ b/asm/macros/field_effect_script.inc @@ -1,19 +1,19 @@ - .macro field_eff_loadtiles address + .macro field_eff_loadtiles address:req .byte 0 .4byte \address .endm - .macro field_eff_loadfadedpal address + .macro field_eff_loadfadedpal address:req .byte 1 .4byte \address .endm - .macro field_eff_loadpal address + .macro field_eff_loadpal address:req .byte 2 .4byte \address .endm - .macro field_eff_callnative address + .macro field_eff_callnative address:req .byte 3 .4byte \address .endm @@ -22,20 +22,20 @@ .byte 4 .endm - .macro field_eff_loadgfx_callnative tiles_address, palette_address, function_address + .macro field_eff_loadgfx_callnative tiles_address:req, palette_address:req, function_address:req .byte 5 .4byte \tiles_address .4byte \palette_address .4byte \function_address .endm - .macro field_eff_loadtiles_callnative tiles_address, function_address + .macro field_eff_loadtiles_callnative tiles_address:req, function_address:req .byte 6 .4byte \tiles_address .4byte \function_address .endm - .macro field_eff_loadfadedpal_callnative palette_address, function_address + .macro field_eff_loadfadedpal_callnative palette_address:req, function_address:req .byte 7 .4byte \palette_address .4byte \function_address diff --git a/asm/macros/function.inc b/asm/macros/function.inc index b109595dfd..0f4e6720c9 100644 --- a/asm/macros/function.inc +++ b/asm/macros/function.inc @@ -1,15 +1,15 @@ - .macro arm_func_start name + .macro arm_func_start name:req .align 2, 0 .global \name .arm .type \name, %function .endm - .macro arm_func_end name + .macro arm_func_end name:req .size \name, .-\name .endm - .macro thumb_func_start name + .macro thumb_func_start name:req .align 2, 0 .global \name .thumb @@ -17,13 +17,13 @@ .type \name, %function .endm - .macro non_word_aligned_thumb_func_start name + .macro non_word_aligned_thumb_func_start name:req .global \name .thumb .thumb_func .type \name, %function .endm - .macro thumb_func_end name + .macro thumb_func_end name:req .size \name, .-\name .endm diff --git a/asm/macros/m4a.inc b/asm/macros/m4a.inc index 6c5abc09b5..3407c3f692 100644 --- a/asm/macros/m4a.inc +++ b/asm/macros/m4a.inc @@ -1,13 +1,13 @@ - .macro song label, music_player, unknown + .macro song label:req, music_player:req, unknown:req .4byte \label .2byte \music_player .2byte \unknown .endm - .macro music_player info_struct, track_struct, unknown_1, unknown_2 + .macro music_player info_struct:req, track_struct:req, num_tracks:req, unknown:req .4byte \info_struct .4byte \track_struct - .byte \unknown_1 - .space 1 - .2byte \unknown_2 + .byte \num_tracks + .byte 0 @ Padding + .2byte \unknown .endm diff --git a/asm/macros/map.inc b/asm/macros/map.inc index 74ed069179..737a900066 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -1,78 +1,88 @@ - .macro map map_id + .macro map map_id:req .byte \map_id >> 8 @ map group .byte \map_id & 0xFF @ map num .endm - .macro map_script type, address + .macro map_script type:req, script:req .byte \type - .4byte \address + .4byte \script .endm - .macro map_script_2 word1, word2, address - .2byte \word1 - .2byte \word2 - .4byte \address + .macro map_script_2 var:req, compare:req, script:req + .2byte \var + .2byte \compare + .4byte \script .endm - .macro object_event index:req, gfx:req, replacement:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req - .byte \index, \gfx, \replacement, 0 - .2byte \x - .2byte \y - .byte \elevation, \movement_type, ((\y_radius << 4) | \x_radius), 0 - .2byte \trainer_type, \sight_radius_tree_etc + .macro object_event index:req, gfx:req, inConnection:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req + .byte \index + .byte \gfx + .byte \inConnection + .byte 0 @ Padding + .2byte \x, \y + .byte \elevation + .byte \movement_type + .byte ((\y_radius << 4) | \x_radius) + .byte 0 @ Padding + .2byte \trainer_type + .2byte \sight_radius_tree_etc .4byte \script .2byte \event_flag - .2byte 0 + .2byte 0 @ Padding inc _num_npcs .endm - .macro warp_def x, y, byte, warp, map_id + .macro warp_def x:req, y:req, elevation:req, warpId:req, map_id:req .2byte \x, \y - .byte \byte, \warp + .byte \elevation + .byte \warpId .byte \map_id & 0xFF @ map num .byte \map_id >> 8 @ map group inc _num_warps .endm - .macro coord_event x, y, elevation, trigger, index, script + .macro coord_event x:req, y:req, elevation:req, trigger:req, index:req, script:req .2byte \x, \y - .byte \elevation, 0 - .2byte \trigger, \index, 0 + .byte \elevation + .byte 0 @ Padding + .2byte \trigger + .2byte \index + .2byte 0 @ Padding .4byte \script inc _num_traps .endm - .macro coord_weather_event x, y, elevation, weather - .2byte \x, \y - .byte \elevation, 0 - .2byte \weather - .2byte 0, 0 - .4byte 0 - inc _num_traps + .macro coord_weather_event x:req, y:req, elevation:req, weather:req + coord_event \x, \y, \elevation, \weather, 0, NULL .endm - .macro bg_event x, y, elevation, kind, arg6, arg7 + .macro bg_event x:req, y:req, elevation:req, kind:req, arg6:req, arg7 .2byte \x, \y - .byte \elevation, \kind - .2byte 0 + .byte \elevation + .byte \kind + .2byte 0 @ Padding .if \kind != BG_EVENT_HIDDEN_ITEM - .4byte \arg6 + .4byte \arg6 .else - .2byte \arg6 - .2byte \arg7 + .2byte \arg6 + .2byte \arg7 .endif inc _num_signs .endm - .macro bg_hidden_item_event x, y, height, item, flag - bg_event \x, \y, \height, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START) + .macro bg_sign_event x:req, y:req, elevation:req, facing_dir:req, script:req + bg_event \x, \y, \elevation, \facing_dir, \script .endm - .macro bg_secret_base_event x, y, height, secret_base_id - bg_event \x, \y, \height, BG_EVENT_SECRET_BASE, \secret_base_id + .macro bg_hidden_item_event x:req, y:req, elevation:req, item:req, flag:req + bg_event \x, \y, \elevation, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START) .endm - .macro map_events npcs, warps, traps, signs + .macro bg_secret_base_event x:req, y:req, elevation:req, secret_base_id:req + bg_event \x, \y, \elevation, BG_EVENT_SECRET_BASE, \secret_base_id + .endm + + .macro map_events npcs:req, warps:req, traps:req, signs:req .byte _num_npcs, _num_warps, _num_traps, _num_signs .4byte \npcs, \warps, \traps, \signs reset_map_events @@ -88,14 +98,14 @@ reset_map_events - .equiv connection_down, 1 - .equiv connection_up, 2 - .equiv connection_left, 3 - .equiv connection_right, 4 - .equiv connection_dive, 5 - .equiv connection_emerge, 6 + .equiv connection_down, CONNECTION_SOUTH + .equiv connection_up, CONNECTION_NORTH + .equiv connection_left, CONNECTION_WEST + .equiv connection_right, CONNECTION_EAST + .equiv connection_dive, CONNECTION_DIVE + .equiv connection_emerge, CONNECTION_EMERGE - .macro connection direction, offset, map + .macro connection direction:req, offset:req, map:req .4byte connection_\direction .4byte \offset map \map diff --git a/asm/macros/pokemon_data.inc b/asm/macros/pokemon_data.inc deleted file mode 100644 index ce8ef98ac3..0000000000 --- a/asm/macros/pokemon_data.inc +++ /dev/null @@ -1,56 +0,0 @@ - .macro pokedex_entry height, width, text_pointer, pokemon_scale, pokemon_offset, trainer_scale, trainer_offset - .2byte \height @ in decimeters - .2byte \width @ in hectograms - .4byte \text_pointer - .2byte 0 @ unused - .2byte \pokemon_scale - .2byte \pokemon_offset - .2byte \trainer_scale - .2byte \trainer_offset - .2byte 0 @ padding - .endm - - .macro base_stats hp, attack, defense, speed, sp_attack, sp_defense - .byte \hp - .byte \attack - .byte \defense - .byte \speed - .byte \sp_attack - .byte \sp_defense - .endm - - .macro ev_yield hp, attack, defense, speed, sp_attack, sp_defense - .2byte (\sp_defense << 10) | (\sp_attack << 8) | (\speed << 6) | (\defense << 4) | (\attack << 2) | \hp - .endm - - .macro level_up_move level, move - .2byte (\level << 9) | \move - .endm - - .macro evo_entry method, parameter, target_species - .2byte \method - .2byte \parameter - .2byte \target_species - .2byte 0 @ padding - .endm - - .macro empty_evo_entries count - .fill 8 * \count, 1, 0 - .endm - - .macro egg_moves_begin species - .2byte 20000 + \species - .endm - -@ If the min level equals the max level, only one level argument is needed. - .macro wild_mon species, min_level, max_level - .byte \min_level - - .ifb \max_level - .byte \min_level - .else - .byte \max_level - .endif - - .2byte \species - .endm diff --git a/asm/macros/window.inc b/asm/macros/window.inc deleted file mode 100644 index a91782bbf8..0000000000 --- a/asm/macros/window.inc +++ /dev/null @@ -1,35 +0,0 @@ - .macro window_template bg_id, x, y, width, height, palette, vram_tile_offset - .byte \bg_id - .byte \x - .byte \y - .byte \width - .byte \height - .byte \palette - .2byte \vram_tile_offset - .endm - - .macro null_window_template - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 - .endm - - .macro glyph_width_func font_id, func - .4byte \font_id - .4byte \func - .endm - - .macro keypad_icon tile_offset, width, height - .2byte \tile_offset - .byte \width - .byte \height - .endm - - .macro font_info func, max_glyph_width, glyph_height, glyph_spacing, line_spacing, text_color, shadow_color, bg_color - .4byte \func - .byte \max_glyph_width - .byte \glyph_height - .byte \glyph_spacing - .byte \line_spacing - .byte \text_color << 4 @ low nybble seems unused - .byte (\shadow_color << 4) | \bg_color - .2byte 0 @ padding - .endm diff --git a/data/map_events.s b/data/map_events.s index dcbb9cfb17..cfa5799d37 100644 --- a/data/map_events.s +++ b/data/map_events.s @@ -1,3 +1,4 @@ +#include "constants/global.h" #include "constants/event_bg.h" #include "constants/event_object_movement.h" #include "constants/event_objects.h" diff --git a/data/maps.s b/data/maps.s index beb28ddec8..9d9ac2101c 100644 --- a/data/maps.s +++ b/data/maps.s @@ -1,3 +1,4 @@ +#include "constants/global.h" #include "constants/layouts.h" #include "constants/map_types.h" #include "constants/maps.h" diff --git a/include/constants/global.h b/include/constants/global.h index 48b03b5ccb..096094220d 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -138,4 +138,13 @@ #define DIR_NORTHWEST 7 #define DIR_NORTHEAST 8 +#define CONNECTION_INVALID -1 +#define CONNECTION_NONE 0 +#define CONNECTION_SOUTH 1 +#define CONNECTION_NORTH 2 +#define CONNECTION_WEST 3 +#define CONNECTION_EAST 4 +#define CONNECTION_DIVE 5 +#define CONNECTION_EMERGE 6 + #endif // GUARD_CONSTANTS_GLOBAL_H diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h index eeb79391b5..a057c2da61 100644 --- a/include/gba/m4a_internal.h +++ b/include/gba/m4a_internal.h @@ -349,7 +349,7 @@ struct MusicPlayer { struct MusicPlayerInfo *info; struct MusicPlayerTrack *track; - u8 unk_8; + u8 numTracks; u16 unk_A; }; diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 33be942c80..cb00343f8f 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -16,18 +16,6 @@ // for constructing large tiles, such as the Battle Pike's curtain tile. #define METATILE_ROW_WIDTH 8 -enum -{ - CONNECTION_INVALID = -1, - CONNECTION_NONE, - CONNECTION_SOUTH, - CONNECTION_NORTH, - CONNECTION_WEST, - CONNECTION_EAST, - CONNECTION_DIVE, - CONNECTION_EMERGE -}; - typedef void (*TilesetCB)(void); struct Tileset diff --git a/src/m4a.c b/src/m4a.c index b159e3873d..faeef83e79 100644 --- a/src/m4a.c +++ b/src/m4a.c @@ -83,7 +83,7 @@ void m4aSoundInit(void) for (i = 0; i < NUM_MUSIC_PLAYERS; i++) { struct MusicPlayerInfo *mplayInfo = gMPlayTable[i].info; - MPlayOpen(mplayInfo, gMPlayTable[i].track, gMPlayTable[i].unk_8); + MPlayOpen(mplayInfo, gMPlayTable[i].track, gMPlayTable[i].numTracks); mplayInfo->unk_B = gMPlayTable[i].unk_A; mplayInfo->memAccArea = gMPlayMemAccArea; } diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index d767b469e9..3eab98f2be 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -230,7 +230,7 @@ string generate_map_events_text(Json map_data) { text << bgs_label << ":\n"; for (auto &bg_event : map_data["bg_events"].array_items()) { if (bg_event["type"] == "sign") { - text << "\tbg_event " + text << "\tbg_sign_event " << bg_event["x"].int_value() << ", " << bg_event["y"].int_value() << ", " << bg_event["elevation"].int_value() << ", " From dc7d86f026c01682bd024fabb0ce206eacb81c35 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 23 Jan 2022 19:26:22 -0500 Subject: [PATCH 373/417] Add new macro comments --- asm/macros/field_effect_script.inc | 2 ++ asm/macros/m4a.inc | 2 +- asm/macros/map.inc | 39 ++++++++++++++++++++++++------ 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/asm/macros/field_effect_script.inc b/asm/macros/field_effect_script.inc index 2a1e2abeef..38f7e31750 100644 --- a/asm/macros/field_effect_script.inc +++ b/asm/macros/field_effect_script.inc @@ -1,3 +1,5 @@ +@ The first .byte argument of each macro below is an index into gFieldEffectScriptFuncs + .macro field_eff_loadtiles address:req .byte 0 .4byte \address diff --git a/asm/macros/m4a.inc b/asm/macros/m4a.inc index 3407c3f692..b22da3d634 100644 --- a/asm/macros/m4a.inc +++ b/asm/macros/m4a.inc @@ -8,6 +8,6 @@ .4byte \info_struct .4byte \track_struct .byte \num_tracks - .byte 0 @ Padding + .space 1 @ Padding .2byte \unknown .endm diff --git a/asm/macros/map.inc b/asm/macros/map.inc index 737a900066..662257e416 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -1,37 +1,44 @@ +@ Most of the macros in this file are for arranging map event data, and are output by mapjson using data from each map's JSON file. + + @ Takes a MAP constant and outputs the map group and map number as separate bytes .macro map map_id:req .byte \map_id >> 8 @ map group .byte \map_id & 0xFF @ map num .endm + @ Defines a map script. 'type' is any MAP_SCRIPT_* constant (see include/constants/map_scripts.h) .macro map_script type:req, script:req .byte \type .4byte \script .endm + @ Defines an entry in a map script table (for either ON_WARP_INTO_MAP_TABLE or ON_FRAME_TABLE) .macro map_script_2 var:req, compare:req, script:req .2byte \var .2byte \compare .4byte \script .endm + @ Defines an object event template for map data. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h .macro object_event index:req, gfx:req, inConnection:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req .byte \index .byte \gfx .byte \inConnection - .byte 0 @ Padding + .space 1 @ Padding .2byte \x, \y .byte \elevation .byte \movement_type .byte ((\y_radius << 4) | \x_radius) - .byte 0 @ Padding + .space 1 @ Padding .2byte \trainer_type .2byte \sight_radius_tree_etc .4byte \script .2byte \event_flag - .2byte 0 @ Padding + .space 2 @ Padding inc _num_npcs .endm + @ Defines a warp event for map data. Mirrors the struct layout of WarpEvent in include/global.fieldmap.h .macro warp_def x:req, y:req, elevation:req, warpId:req, map_id:req .2byte \x, \y .byte \elevation @@ -41,26 +48,31 @@ inc _num_warps .endm + @ Defines a coord event for map data. Mirrors the struct layout of CoordEvent in include/global.fieldmap.h .macro coord_event x:req, y:req, elevation:req, trigger:req, index:req, script:req .2byte \x, \y .byte \elevation - .byte 0 @ Padding + .space 1 @ Padding .2byte \trigger .2byte \index - .2byte 0 @ Padding + .space 2 @ Padding .4byte \script inc _num_traps .endm + @ Defines a weather coord event for map data. Any coord event is treated as a weather coord event if its script is NULL .macro coord_weather_event x:req, y:req, elevation:req, weather:req coord_event \x, \y, \elevation, \weather, 0, NULL .endm + @ Defines a generic background event for map data. Mirrors the struct layout of BgEvent in include/global.fieldmap.h + @ 'kind' is any BG_EVENT_* constant (see include/constants/event_bg.h). + @ 'arg6' and 'arg7' are used differently depending on the bg event type. See macros below .macro bg_event x:req, y:req, elevation:req, kind:req, arg6:req, arg7 .2byte \x, \y .byte \elevation .byte \kind - .2byte 0 @ Padding + .space 2 @ Padding .if \kind != BG_EVENT_HIDDEN_ITEM .4byte \arg6 .else @@ -70,24 +82,29 @@ inc _num_signs .endm + @ Defines a background sign event for map data. 'facing_dir' is any of the BG_EVENT_PLAYER_FACING_* constants (see include/constants/event_bg.h) .macro bg_sign_event x:req, y:req, elevation:req, facing_dir:req, script:req bg_event \x, \y, \elevation, \facing_dir, \script .endm + @ Defines a background hidden item event for map data .macro bg_hidden_item_event x:req, y:req, elevation:req, item:req, flag:req bg_event \x, \y, \elevation, BG_EVENT_HIDDEN_ITEM, \item, ((\flag) - FLAG_HIDDEN_ITEMS_START) .endm + @ Defines a background secret base event for map data .macro bg_secret_base_event x:req, y:req, elevation:req, secret_base_id:req bg_event \x, \y, \elevation, BG_EVENT_SECRET_BASE, \secret_base_id .endm + @ Defines the table of event data for a map. Mirrors the struct layout of MapEvents in include/global.fieldmap.h .macro map_events npcs:req, warps:req, traps:req, signs:req .byte _num_npcs, _num_warps, _num_traps, _num_signs .4byte \npcs, \warps, \traps, \signs reset_map_events .endm + @ Resets the event counters used to track how many events a map has. Run when the events table is created by map_events .macro reset_map_events .set _num_npcs, 0 .set _num_warps, 0 @@ -95,9 +112,12 @@ .set _num_signs, 0 .endm + @ Initialize the event counters for the first map reset_map_events + @ Directions for connecting maps + @ The map.json files will only have e.g. "down" as direction data, and this will be appended to "connection_" by the connection macro .equiv connection_down, CONNECTION_SOUTH .equiv connection_up, CONNECTION_NORTH .equiv connection_left, CONNECTION_WEST @@ -105,13 +125,16 @@ .equiv connection_dive, CONNECTION_DIVE .equiv connection_emerge, CONNECTION_EMERGE + @ Defines a map connection. Mirrors the struct layout of MapConnection in include/global.fieldmap.h .macro connection direction:req, offset:req, map:req - .4byte connection_\direction + .byte connection_\direction + .space 3 @ Padding .4byte \offset map \map - .space 2 + .space 2 @ Padding .endm + @ Defines the flags for a map header. Mirrors the layout of the bitfield in struct MapHeader in include/global.fieldmap.h .macro map_header_flags allow_cycling:req, allow_escaping:req, allow_running:req, show_map_name:req .byte ((\show_map_name & 1) << 3) | ((\allow_running & 1) << 2) | ((\allow_escaping & 1) << 1) | \allow_cycling .endm From 6470b0d0044c0db27f53a10dede99db7bf51a9fd Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 26 Jan 2022 18:36:21 -0300 Subject: [PATCH 374/417] Used ball constants in gBallSpriteTemplates --- src/pokeball.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pokeball.c b/src/pokeball.c index 0250a0c5ba..a9ccd42d60 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -204,6 +204,7 @@ static const union AffineAnimCmd *const sAffineAnim_BallRotate[] = const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = { + [BALL_POKE] = { .tileTag = GFX_TAG_POKEBALL, .paletteTag = GFX_TAG_POKEBALL, @@ -213,6 +214,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_GREAT] = { .tileTag = GFX_TAG_GREATBALL, .paletteTag = GFX_TAG_GREATBALL, @@ -222,6 +224,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_SAFARI] = { .tileTag = GFX_TAG_SAFARIBALL, .paletteTag = GFX_TAG_SAFARIBALL, @@ -231,6 +234,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_ULTRA] = { .tileTag = GFX_TAG_ULTRABALL, .paletteTag = GFX_TAG_ULTRABALL, @@ -240,6 +244,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_MASTER] = { .tileTag = GFX_TAG_MASTERBALL, .paletteTag = GFX_TAG_MASTERBALL, @@ -249,6 +254,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_NET] = { .tileTag = GFX_TAG_NETBALL, .paletteTag = GFX_TAG_NETBALL, @@ -258,6 +264,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_DIVE] = { .tileTag = GFX_TAG_DIVEBALL, .paletteTag = GFX_TAG_DIVEBALL, @@ -267,6 +274,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_NEST] = { .tileTag = GFX_TAG_NESTBALL, .paletteTag = GFX_TAG_NESTBALL, @@ -276,6 +284,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_REPEAT] = { .tileTag = GFX_TAG_REPEATBALL, .paletteTag = GFX_TAG_REPEATBALL, @@ -285,6 +294,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_TIMER] = { .tileTag = GFX_TAG_TIMERBALL, .paletteTag = GFX_TAG_TIMERBALL, @@ -294,6 +304,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_LUXURY] = { .tileTag = GFX_TAG_LUXURYBALL, .paletteTag = GFX_TAG_LUXURYBALL, @@ -303,6 +314,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .affineAnims = sAffineAnim_BallRotate, .callback = SpriteCB_BallThrow, }, + [BALL_PREMIER] = { .tileTag = GFX_TAG_PREMIERBALL, .paletteTag = GFX_TAG_PREMIERBALL, From e30b16f0fd1c5e7b81e5ca62064869fa036e5a58 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 26 Jan 2022 21:50:15 -0500 Subject: [PATCH 375/417] Fix Swap_HandleQuitSwappingResposne typo --- src/battle_factory_screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index 247b8712fe..787dc47406 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -2509,7 +2509,7 @@ static void Swap_Task_HandleYesNo(u8 taskId) } } -static void Swap_HandleQuitSwappingResposne(u8 taskId) +static void Swap_HandleQuitSwappingResponse(u8 taskId) { if (gTasks[taskId].tSaidYes == TRUE) { @@ -2533,8 +2533,8 @@ static void Swap_AskQuitSwapping(u8 taskId) Swap_PrintOnInfoWindow(gText_QuitSwapping); sFactorySwapScreen->monSwapped = FALSE; gTasks[taskId].tState = STATE_YESNO_SHOW; - gTasks[taskId].tFollowUpTaskPtrHi = (u32)(Swap_HandleQuitSwappingResposne) >> 16; - gTasks[taskId].tFollowUpTaskPtrLo = (u32)(Swap_HandleQuitSwappingResposne); + gTasks[taskId].tFollowUpTaskPtrHi = (u32)(Swap_HandleQuitSwappingResponse) >> 16; + gTasks[taskId].tFollowUpTaskPtrLo = (u32)(Swap_HandleQuitSwappingResponse); gTasks[taskId].func = Swap_Task_HandleYesNo; } } From 1ff0b0efa96180a774273a4c222a805237e6e7c6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 29 Jan 2022 21:13:46 -0500 Subject: [PATCH 376/417] Add missing collision constant usage --- src/event_object_movement.c | 12 ++++++------ src/trainer_see.c | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 4bd8d56035..df79a1d62a 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -4630,7 +4630,7 @@ u8 GetCollisionAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u32 dir) u8 direction = dir; if (IsCoordOutsideObjectEventMovementRange(objectEvent, x, y)) return COLLISION_OUTSIDE_RANGE; - else if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == -1 || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction)) + else if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == CONNECTION_INVALID || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction)) return COLLISION_IMPASSABLE; else if (objectEvent->trackedByCamera && !CanCameraMoveInDirection(direction)) return COLLISION_IMPASSABLE; @@ -4646,13 +4646,13 @@ u8 GetCollisionFlagsAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 d u8 flags = 0; if (IsCoordOutsideObjectEventMovementRange(objectEvent, x, y)) - flags |= 1; - if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == -1 || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction) || (objectEvent->trackedByCamera && !CanCameraMoveInDirection(direction))) - flags |= 2; + flags |= 1 << (COLLISION_OUTSIDE_RANGE - 1); + if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == CONNECTION_INVALID || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction) || (objectEvent->trackedByCamera && !CanCameraMoveInDirection(direction))) + flags |= 1 << (COLLISION_IMPASSABLE - 1); if (IsElevationMismatchAt(objectEvent->currentElevation, x, y)) - flags |= 4; + flags |= 1 << (COLLISION_ELEVATION_MISMATCH - 1); if (DoesObjectCollideWithObjectAt(objectEvent, x, y)) - flags |= 8; + flags |= 1 << (COLLISION_OBJECT_EVENT - 1); return flags; } diff --git a/src/trainer_see.c b/src/trainer_see.c index 07021a316a..dc6c3b9177 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -367,8 +367,6 @@ static u8 GetTrainerApproachDistanceEast(struct ObjectEvent *trainerObj, s16 ran return 0; } -#define COLLISION_MASK (~1) - static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 approachDistance, u8 direction) { s16 x, y; @@ -385,8 +383,9 @@ static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 ap MoveCoords(direction, &x, &y); for (i = 0; i < approachDistance - 1; i++, MoveCoords(direction, &x, &y)) { + // Check for collisions on approach, ignoring the "out of range" collision for regular movement collision = GetCollisionFlagsAtCoords(trainerObj, x, y, direction); - if (collision != 0 && (collision & COLLISION_MASK)) + if (collision != 0 && (collision & ~(1 << (COLLISION_OUTSIDE_RANGE - 1)))) return 0; } From a86a279184ce1013ca0b41a079419192ac07e736 Mon Sep 17 00:00:00 2001 From: kiliwily <69381603+kiliwily@users.noreply.github.com> Date: Sun, 6 Feb 2022 16:25:56 +0100 Subject: [PATCH 377/417] Update money.c --- src/money.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/money.c b/src/money.c index 592ce9f753..5723974a83 100644 --- a/src/money.c +++ b/src/money.c @@ -132,7 +132,7 @@ void SubtractMoneyFromVar0x8005(void) void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed) { - PrintMoneyAmount(windowId, 0x26, 1, amount, speed); + PrintMoneyAmount(windowId, 38, 1, amount, speed); } void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed) From e7df0acafb692858ea93d5ee427ac6e69f1bd093 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 13 Feb 2022 01:56:40 -0300 Subject: [PATCH 378/417] =?UTF-8?q?Fixed=20Pok=C3=A9dex=20entry=20upon=20c?= =?UTF-8?q?atch=20not=20properly=20handling=20gender=20differences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pokedex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pokedex.c b/src/pokedex.c index 162afb3c11..5764f300bf 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3989,7 +3989,10 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) gTasks[taskId].tState++; break; case 4: - spriteId = CreateMonSpriteFromNationalDexNumber(dexNum, MON_PAGE_X, MON_PAGE_Y, 0); + if ((gBaseStats[dexNum].flags & FLAG_GENDER_DIFFERENCE)) + spriteId = CreateMonPicSprite(dexNum, 0, ((u16)gTasks[taskId].tPersonalityHi << 16) | (u16)gTasks[taskId].tPersonalityLo, TRUE, MON_PAGE_X, MON_PAGE_Y, 0, TAG_NONE); + else + spriteId = CreateMonSpriteFromNationalDexNumber(dexNum, MON_PAGE_X, MON_PAGE_Y, 0); gSprites[spriteId].oam.priority = 0; BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); SetVBlankCallback(gPokedexVBlankCB); From 7ddb9cb84cbc67d4a5a34e480f9648a55fc16163 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 14 Feb 2022 17:34:01 -0500 Subject: [PATCH 379/417] Add missing direction constant usage --- src/item_use.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/item_use.c b/src/item_use.c index c9a7fe1c7b..c03ede61bd 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -403,25 +403,25 @@ static bool8 IsHiddenItemPresentInConnection(struct MapConnection *connection, i switch (connection->direction) { // same weird temp variable behavior seen in IsHiddenItemPresentAtCoords - case 2: + case CONNECTION_NORTH: localOffset = connection->offset + MAP_OFFSET; localX = x - localOffset; localLength = mapHeader->mapLayout->height - MAP_OFFSET; localY = localLength + y; // additions are reversed for some reason break; - case 1: + case CONNECTION_SOUTH: localOffset = connection->offset + MAP_OFFSET; localX = x - localOffset; localLength = gMapHeader.mapLayout->height + MAP_OFFSET; localY = y - localLength; break; - case 3: + case CONNECTION_WEST: localLength = mapHeader->mapLayout->width - MAP_OFFSET; localX = localLength + x; // additions are reversed for some reason localOffset = connection->offset + MAP_OFFSET; localY = y - localOffset; break; - case 4: + case CONNECTION_EAST: localLength = gMapHeader.mapLayout->width + MAP_OFFSET; localX = x - localLength; localOffset = connection->offset + MAP_OFFSET; From 49eca609552f0dc981b656345e94f62b4cc08b52 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 15 Feb 2022 16:04:51 -0500 Subject: [PATCH 380/417] Convert party menu slots to bin files --- graphics/party_menu/slot_main.bin | 1 + graphics/party_menu/slot_main_egg.bin | 1 + graphics/party_menu/slot_wide.bin | 1 + graphics/party_menu/slot_wide_egg.bin | 1 + graphics/party_menu/slot_wide_empty.bin | Bin 0 -> 54 bytes src/data/party_menu.h | 36 ++++++------------------ src/party_menu.c | 10 +++---- 7 files changed, 17 insertions(+), 33 deletions(-) create mode 100755 graphics/party_menu/slot_main.bin create mode 100755 graphics/party_menu/slot_main_egg.bin create mode 100755 graphics/party_menu/slot_wide.bin create mode 100755 graphics/party_menu/slot_wide_egg.bin create mode 100755 graphics/party_menu/slot_wide_empty.bin diff --git a/graphics/party_menu/slot_main.bin b/graphics/party_menu/slot_main.bin new file mode 100755 index 0000000000..2f3e729f6d --- /dev/null +++ b/graphics/party_menu/slot_main.bin @@ -0,0 +1 @@ + !!!!!!!!" !!!!!!!!" !!!!!!!!"(;<::::::=.////////0 \ No newline at end of file diff --git a/graphics/party_menu/slot_main_egg.bin b/graphics/party_menu/slot_main_egg.bin new file mode 100755 index 0000000000..653ad1a64b --- /dev/null +++ b/graphics/party_menu/slot_main_egg.bin @@ -0,0 +1 @@ + !!!!!!!!" !!!!!!!!" !!!!!!!!"())))))))*.////////0 \ No newline at end of file diff --git a/graphics/party_menu/slot_wide.bin b/graphics/party_menu/slot_wide.bin new file mode 100755 index 0000000000..c88b73bf78 --- /dev/null +++ b/graphics/party_menu/slot_wide.bin @@ -0,0 +1 @@ ++,,,,,,,,,,,,,,,,-1!!!!!!!!453333336788888888888888889 \ No newline at end of file diff --git a/graphics/party_menu/slot_wide_egg.bin b/graphics/party_menu/slot_wide_egg.bin new file mode 100755 index 0000000000..8f662da0ae --- /dev/null +++ b/graphics/party_menu/slot_wide_egg.bin @@ -0,0 +1 @@ ++,,,,,,,,,,,,,,,,-1!!!!!!!!!!!!!!!!2788888888888888889 \ No newline at end of file diff --git a/graphics/party_menu/slot_wide_empty.bin b/graphics/party_menu/slot_wide_empty.bin new file mode 100755 index 0000000000000000000000000000000000000000..3592178b3fc0a6256883b968542bb851d2cb2f42 GIT binary patch literal 54 VcmWd?Lj&S+3}`@JRSgZO0{~`S1a<%b literal 0 HcmV?d00001 diff --git a/src/data/party_menu.h b/src/data/party_menu.h index f8093a9b6b..e462f95c0c 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -571,34 +571,14 @@ static const struct WindowTemplate sUnusedWindowTemplate2 = .baseBlock = 0x39D, }; -// Tile nums -static const u8 sMainSlotTileNums[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; - -static const u8 sMainSlotTileNums_Egg[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48}; - -static const u8 sOtherSlotsTileNums[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; - -static const u8 sOtherSlotsTileNums_Egg[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57}; - -static const u8 sEmptySlotTileNums[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, - 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39}; +// Plain tilemaps for party menu slots. +// The difference between the egg and regular versions is the lack of an HP bar. +// There is no empty version of the main slot because it shouldn't ever be empty. +static const u8 sSlotTilemap_Main[] = INCBIN_U8("graphics/party_menu/slot_main.bin"); +static const u8 sSlotTilemap_MainEgg[] = INCBIN_U8("graphics/party_menu/slot_main_egg.bin"); +static const u8 sSlotTilemap_Wide[] = INCBIN_U8("graphics/party_menu/slot_wide.bin"); +static const u8 sSlotTilemap_WideEgg[] = INCBIN_U8("graphics/party_menu/slot_wide_egg.bin"); +static const u8 sSlotTilemap_WideEmpty[] = INCBIN_U8("graphics/party_menu/slot_wide_empty.bin"); // Palette offsets static const u8 sGenderPalOffsets[] = {11, 12}; diff --git a/src/party_menu.c b/src/party_menu.c index 36e83a168e..2557d31ee5 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2094,9 +2094,9 @@ static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width height = 7; } if (isEgg == FALSE) - BlitBitmapToPartyWindow(windowId, sMainSlotTileNums, 10, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_Main, 10, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sMainSlotTileNums_Egg, 10, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_MainEgg, 10, x, y, width, height); } static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) @@ -2107,14 +2107,14 @@ static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 widt height = 3; } if (isEgg == FALSE) - BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums, 18, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_Wide, 18, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums_Egg, 18, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEgg, 18, x, y, width, height); } static void DrawEmptySlot(u8 windowId) { - BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEmpty, 18, 0, 0, 18, 3); } #define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \ From 131ed1916ec66009ad52b3dce9cd2d7e056a19e6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 15 Feb 2022 16:24:19 -0500 Subject: [PATCH 381/417] Generalize name of party slot without HP --- .../{slot_main_egg.bin => slot_main_no_hp.bin} | 0 .../{slot_wide_egg.bin => slot_wide_no_hp.bin} | 0 src/data/party_menu.h | 6 +++--- src/party_menu.c | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) rename graphics/party_menu/{slot_main_egg.bin => slot_main_no_hp.bin} (100%) rename graphics/party_menu/{slot_wide_egg.bin => slot_wide_no_hp.bin} (100%) diff --git a/graphics/party_menu/slot_main_egg.bin b/graphics/party_menu/slot_main_no_hp.bin similarity index 100% rename from graphics/party_menu/slot_main_egg.bin rename to graphics/party_menu/slot_main_no_hp.bin diff --git a/graphics/party_menu/slot_wide_egg.bin b/graphics/party_menu/slot_wide_no_hp.bin similarity index 100% rename from graphics/party_menu/slot_wide_egg.bin rename to graphics/party_menu/slot_wide_no_hp.bin diff --git a/src/data/party_menu.h b/src/data/party_menu.h index e462f95c0c..7735dae58d 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -572,12 +572,12 @@ static const struct WindowTemplate sUnusedWindowTemplate2 = }; // Plain tilemaps for party menu slots. -// The difference between the egg and regular versions is the lack of an HP bar. +// The versions with no HP bar are used by eggs, and in certain displays like registering at a battle facility. // There is no empty version of the main slot because it shouldn't ever be empty. static const u8 sSlotTilemap_Main[] = INCBIN_U8("graphics/party_menu/slot_main.bin"); -static const u8 sSlotTilemap_MainEgg[] = INCBIN_U8("graphics/party_menu/slot_main_egg.bin"); +static const u8 sSlotTilemap_MainNoHP[] = INCBIN_U8("graphics/party_menu/slot_main_no_hp.bin"); static const u8 sSlotTilemap_Wide[] = INCBIN_U8("graphics/party_menu/slot_wide.bin"); -static const u8 sSlotTilemap_WideEgg[] = INCBIN_U8("graphics/party_menu/slot_wide_egg.bin"); +static const u8 sSlotTilemap_WideNoHP[] = INCBIN_U8("graphics/party_menu/slot_wide_no_hp.bin"); static const u8 sSlotTilemap_WideEmpty[] = INCBIN_U8("graphics/party_menu/slot_wide_empty.bin"); // Palette offsets diff --git a/src/party_menu.c b/src/party_menu.c index 2557d31ee5..e15d001c6d 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -97,7 +97,7 @@ enum struct PartyMenuBoxInfoRects { - void (*blitFunc)(u8, u8, u8, u8, u8, u8); + void (*blitFunc)(u8, u8, u8, u8, u8, bool8); u8 dimensions[24]; u8 descTextLeft; u8 descTextTop; @@ -377,8 +377,8 @@ static void Task_ChooseMonForMoveRelearner(u8); static void CB2_ChooseMonForMoveRelearner(void); static void Task_BattlePyramidChooseMonHeldItems(u8); static void ShiftMoveSlot(struct Pokemon*, u8, u8); -static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, u8); -static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, u8); +static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, bool8); +static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, bool8); static void CursorCb_Summary(u8); static void CursorCb_Switch(u8); static void CursorCb_Cancel1(u8); @@ -2086,30 +2086,30 @@ static void BlitBitmapToPartyWindow(u8 windowId, const u8 *b, u8 c, u8 x, u8 y, } } -static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP) { if (width == 0 && height == 0) { width = 10; height = 7; } - if (isEgg == FALSE) + if (hideHP == FALSE) BlitBitmapToPartyWindow(windowId, sSlotTilemap_Main, 10, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sSlotTilemap_MainEgg, 10, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_MainNoHP, 10, x, y, width, height); } -static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP) { if (width == 0 && height == 0) { width = 18; height = 3; } - if (isEgg == FALSE) + if (hideHP == FALSE) BlitBitmapToPartyWindow(windowId, sSlotTilemap_Wide, 18, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEgg, 18, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideNoHP, 18, x, y, width, height); } static void DrawEmptySlot(u8 windowId) From 0710a5467b88c7d927cb0cb20acf455707ac141a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 15 Feb 2022 21:55:51 -0500 Subject: [PATCH 382/417] Add some missing RGB constant usage --- data/battle_anim_scripts.s | 62 +++++++++++++++++++------------------- src/evolution_graphics.c | 10 +++--- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 7e970ed176..1cfc5230c0 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -763,7 +763,7 @@ Move_TAKE_DOWN: setalpha 12, 8 createvisualtask AnimTask_WindUpLunge, 5, ANIM_ATTACKER, -24, 8, 23, 10, 40, 10 delay 35 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, RGB_BLACK, 0 createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, -10, 0, ANIM_TARGET, 0 playsewithpan SE_M_MEGA_KICK2, SOUND_PAN_TARGET delay 1 @@ -783,7 +783,7 @@ Move_TAKE_DOWN: Move_DOUBLE_EDGE: loadspritegfx ANIM_TAG_IMPACT playsewithpan SE_M_SWIFT, SOUND_PAN_ATTACKER - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 4, 2, RGB_WHITE, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 4, 2, RGB_WHITE, 10, RGB_BLACK, 0 waitforvisualfinish delay 10 playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER @@ -951,7 +951,7 @@ Move_MEGA_PUNCH: createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 22, 1 createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, RGB_BLACK, 0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -995,7 +995,7 @@ Move_MEGA_KICK: createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 22, 1 createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, RGB_BLACK, 0 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -1247,7 +1247,7 @@ Move_REVERSAL: loadspritegfx ANIM_TAG_HANDS_AND_FEET loadspritegfx ANIM_TAG_IMPACT playsewithpan SE_M_DETECT, SOUND_PAN_ATTACKER - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB_WHITE, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB_WHITE, 8, RGB_BLACK, 0 waitforvisualfinish delay 30 createvisualtask AnimTask_BlendColorCycle, 2, 31, 3, 2, 0, 10, RGB_WHITE @@ -1264,7 +1264,7 @@ Move_REVERSAL: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 8 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 8, RGB_BLACK, 0 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 10, 1, 0 createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 5, FALSE, 1, 8, 1, 0 @@ -1446,13 +1446,13 @@ FuryCutterRight: createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 40, -32, 1 goto FuryCutterContinue FuryCutterMedium: - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(9, 8, 10), 4, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(9, 8, 10), 4, RGB_BLACK, 0 goto FuryCutterContinue2 FuryCutterStrong: - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB(9, 8, 10), 4, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB(9, 8, 10), 4, RGB_BLACK, 0 goto FuryCutterContinue2 FuryCutterStrongest: - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB(9, 8, 10), 4, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB(9, 8, 10), 4, RGB_BLACK, 0 goto FuryCutterContinue2 Move_SELF_DESTRUCT: @@ -1623,7 +1623,7 @@ RisingWaterHitEffect: Move_EXPLOSION: loadspritegfx ANIM_TAG_EXPLOSION - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 9, RGB(26, 8, 8), 8, 0, 8 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 9, RGB(26, 8, 8), 8, RGB_BLACK, 8 createvisualtask AnimTask_ShakeMon2, 5, 4, 8, 0, 40, 1 createvisualtask AnimTask_ShakeMon2, 5, 5, 8, 0, 40, 1 createvisualtask AnimTask_ShakeMon2, 5, 6, 8, 0, 40, 1 @@ -1870,7 +1870,7 @@ Move_GUILLOTINE: delay 46 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 8, 1 createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 0 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, RGB_BLACK, 0 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -2601,9 +2601,9 @@ Move_EARTHQUAKE: createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 10, 50 playsewithpan SE_M_EARTHQUAKE, 0 delay 10 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 delay 16 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 end Move_FISSURE: @@ -2614,11 +2614,11 @@ Move_FISSURE: delay 8 call FissureDirtPlumeFar delay 15 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 delay 15 call FissureDirtPlumeClose delay 15 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 delay 15 call FissureDirtPlumeFar delay 50 @@ -2846,7 +2846,7 @@ SkullBashAttack: playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER waitforvisualfinish playse SE_BANG - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 40, 1 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 10, 0, 40, 1 createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 4, 0, 0, ANIM_TARGET, 0 @@ -3025,7 +3025,7 @@ Move_SUPER_FANG: createsprite gSuperFangSpriteTemplate, ANIM_TARGET, 2 playsewithpan SE_M_BITE, SOUND_PAN_TARGET delay 8 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB(31, 2, 2), 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB(31, 2, 2), 14, RGB_WHITE, 14 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 7, 12, 1 waitforvisualfinish blendoff @@ -3332,9 +3332,9 @@ MagnitudeIntense: createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 0, 50 loopsewithpan SE_M_STRENGTH, SOUND_PAN_TARGET, 8, 10 delay 10 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 delay 16 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, RGB_WHITE, 14 goto MagnitudeEnd Move_RAPID_SPIN: @@ -3955,7 +3955,7 @@ Move_MIST_BALL: waitforvisualfinish playsewithpan SE_M_SAND_ATTACK, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 10, 0 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 1, 1, RGB(23, 16, 31), 16, 0x7FFF, 16 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 1, 1, RGB(23, 16, 31), 16, RGB_WHITE, 16 delay 0 playsewithpan SE_M_HAZE, 0 createvisualtask AnimTask_LoadMistTiles, 5 @@ -4223,7 +4223,7 @@ Move_ODOR_SLEUTH: waitforvisualfinish clearmonbg ANIM_TARGET delay 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_WHITEALPHA, 16, -1, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_WHITEALPHA, 16, RGB_WHITEALPHA, 0 playsewithpan SE_M_LEER, SOUND_PAN_ATTACKER end @@ -4351,7 +4351,7 @@ Move_AERIAL_ACE: playsewithpan SE_M_RAZOR_WIND2, SOUND_PAN_ATTACKER delay 5 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 10, 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, RGB_BLACK, 0 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -4361,7 +4361,7 @@ Move_AERIAL_ACE: Move_IRON_DEFENSE: loopsewithpan SE_SHINY, SOUND_PAN_ATTACKER, 28, 2 createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 2, RGB_WHITEALPHA, 14, -1, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 2, RGB_WHITEALPHA, 14, RGB_WHITEALPHA, 0 waitforvisualfinish end @@ -5665,7 +5665,7 @@ Move_SIGNAL_BEAM: call SignalBeamOrbs call SignalBeamOrbs createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 25, 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 4, 8, 5, RGB_RED, 8, 961, 8 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 4, 8, 5, RGB_RED, 8, RGB(1, 30, 0), 8 call SignalBeamOrbs call SignalBeamOrbs call SignalBeamOrbs @@ -6060,7 +6060,7 @@ Move_BONE_CLUB: delay 12 createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 5, 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_BLACK, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_BLACK, 10, RGB_BLACK, 0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6124,7 +6124,7 @@ MegahornContinue: createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -16, 4, 1, 4 waitforvisualfinish createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, -4, 1, 12, 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_WHITE, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_WHITE, 10, RGB_BLACK, 0 delay 10 createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 11 delay 3 @@ -6266,7 +6266,7 @@ Move_CRABHAMMER: createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, ANIM_TARGET, 0 playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET delay 1 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(13, 21, 31), 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(13, 21, 31), 10, RGB_BLACK, 0 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -24, 0, 0, 4 waitforvisualfinish delay 8 @@ -6469,7 +6469,7 @@ Move_CROSS_CHOP: createsprite gCrossChopHandSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1 delay 40 playsewithpan SE_M_RAZOR_WIND, SOUND_PAN_TARGET - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 10, 0, 10 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 10, RGB_BLACK, 10 createsprite gCrossImpactSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 20 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 7, 0, 9, 1 waitforvisualfinish @@ -8491,7 +8491,7 @@ Move_BLAZE_KICK: createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 14, 1 createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, RGB_BLACK, 0 call FireSpreadEffect waitforvisualfinish clearmonbg ANIM_TARGET @@ -9558,7 +9558,7 @@ Move_KNOCK_OFF: playsewithpan SE_M_VITAL_THROW, SOUND_PAN_TARGET createsprite gKnockOffStrikeSpriteTemplate, ANIM_TARGET, 2, -16, -16 delay 8 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, RGB_BLACK, 0 createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 2 playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -12, 10, 0, 3 @@ -9836,7 +9836,7 @@ Move_WEATHER_BALL: waitforvisualfinish delay 15 playsewithpan SE_M_DETECT, 0 - createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0 + createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, RGB_BLACK, 0 waitforvisualfinish createvisualtask AnimTask_GetWeather, 2 delay 1 diff --git a/src/evolution_graphics.c b/src/evolution_graphics.c index 50098743db..5d17cca84e 100644 --- a/src/evolution_graphics.c +++ b/src/evolution_graphics.c @@ -501,12 +501,12 @@ static void SpriteCB_EvolutionMonSprite(struct Sprite* sprite) u8 CycleEvolutionMonSprite(u8 preEvoSpriteId, u8 postEvoSpriteId) { u16 i; - u16 stack[16]; + u16 monPalette[16]; u8 taskId; s32 toDiv; - for (i = 0; i < ARRAY_COUNT(stack); i++) - stack[i] = 0x7FFF; + for (i = 0; i < ARRAY_COUNT(monPalette); i++) + monPalette[i] = RGB_WHITE; taskId = CreateTask(Task_CycleEvolutionMonSprite_Init, 0); gTasks[taskId].tPreEvoSpriteId = preEvoSpriteId; @@ -522,13 +522,13 @@ u8 CycleEvolutionMonSprite(u8 preEvoSpriteId, u8 postEvoSpriteId) gSprites[preEvoSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[preEvoSpriteId].oam.matrixNum = MATRIX_PRE_EVO; gSprites[preEvoSpriteId].invisible = FALSE; - CpuSet(stack, &gPlttBufferFaded[0x100 + (gSprites[preEvoSpriteId].oam.paletteNum * 16)], 16); + CpuSet(monPalette, &gPlttBufferFaded[0x100 + (gSprites[preEvoSpriteId].oam.paletteNum * 16)], 16); gSprites[postEvoSpriteId].callback = SpriteCB_EvolutionMonSprite; gSprites[postEvoSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL; gSprites[postEvoSpriteId].oam.matrixNum = MATRIX_POST_EVO; gSprites[postEvoSpriteId].invisible = FALSE; - CpuSet(stack, &gPlttBufferFaded[0x100 + (gSprites[postEvoSpriteId].oam.paletteNum * 16)], 16); + CpuSet(monPalette, &gPlttBufferFaded[0x100 + (gSprites[postEvoSpriteId].oam.paletteNum * 16)], 16); gTasks[taskId].tEvoStopped = FALSE; return taskId; From ccfbee8b2380d40d41f15c2b8c497231f9a7f493 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 19 Feb 2022 17:57:18 -0300 Subject: [PATCH 383/417] Addressed inconsistency in behavior with Shiny mon with gender differences upon catch --- src/pokedex.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pokedex.c b/src/pokedex.c index 5764f300bf..971f96dfac 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3989,10 +3989,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) gTasks[taskId].tState++; break; case 4: - if ((gBaseStats[dexNum].flags & FLAG_GENDER_DIFFERENCE)) - spriteId = CreateMonPicSprite(dexNum, 0, ((u16)gTasks[taskId].tPersonalityHi << 16) | (u16)gTasks[taskId].tPersonalityLo, TRUE, MON_PAGE_X, MON_PAGE_Y, 0, TAG_NONE); - else - spriteId = CreateMonSpriteFromNationalDexNumber(dexNum, MON_PAGE_X, MON_PAGE_Y, 0); + spriteId = CreateMonPicSprite(dexNum, 0, ((u16)gTasks[taskId].tPersonalityHi << 16) | (u16)gTasks[taskId].tPersonalityLo, TRUE, MON_PAGE_X, MON_PAGE_Y, 0, TAG_NONE); gSprites[spriteId].oam.priority = 0; BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); SetVBlankCallback(gPokedexVBlankCB); From c39b0ff6d7e58920ccc91b42e82409e683cb7665 Mon Sep 17 00:00:00 2001 From: Abaresk Date: Wed, 2 Feb 2022 03:30:50 +0000 Subject: [PATCH 384/417] Document slot machine more (unabridged) --- src/scrcmd.c | 4 +- src/slot_machine.c | 2512 +++++++++++++++++++++++++++----------------- 2 files changed, 1537 insertions(+), 979 deletions(-) diff --git a/src/scrcmd.c b/src/scrcmd.c index 44bd14c281..418bf58770 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1916,9 +1916,9 @@ bool8 ScrCmd_pokemartdecoration2(struct ScriptContext *ctx) bool8 ScrCmd_playslotmachine(struct ScriptContext *ctx) { - u8 slotMachineIndex = VarGet(ScriptReadHalfword(ctx)); + u8 machineId = VarGet(ScriptReadHalfword(ctx)); - PlaySlotMachine(slotMachineIndex, CB2_ReturnToFieldContinueScriptPlayMapMusic); + PlaySlotMachine(machineId, CB2_ReturnToFieldContinueScriptPlayMapMusic); ScriptContext1_Stop(); return TRUE; } diff --git a/src/slot_machine.c b/src/slot_machine.c index c58de415bc..9db6e67fdf 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -31,18 +31,39 @@ #define SLOTMACHINE_GFX_TILES 233 #define MAX_BET 3 -#define SYMBOLS_PER_REEL 21 -#define REEL_SYMBOL_HEIGHT 24 +#define TAGS_PER_REEL 21 +#define TAG_HEIGHT 24 +#define REEL_HEIGHT (TAGS_PER_REEL * TAG_HEIGHT) -// Lucky Flags -#define LUCKY_BIAS_REPLAY (1 << 0) -#define LUCKY_BIAS_CHERRY (1 << 1) -#define LUCKY_BIAS_LOTAD (1 << 2) -#define LUCKY_BIAS_AZURILL (1 << 3) -#define LUCKY_BIAS_POWER (1 << 4) -#define LUCKY_BIAS_REELTIME (1 << 5) -#define LUCKY_BIAS_MIXED_777 (1 << 6) -#define LUCKY_BIAS_777 (1 << 7) +#define REELTIME_TAGS 6 +#define REELTIME_TAG_HEIGHT 20 +#define REELTIME_REEL_HEIGHT (REELTIME_TAGS * REELTIME_TAG_HEIGHT) + +// There are three categories of biases: 7's, ReelTime, Regular +// - 7's: BIAS_STRAIGHT_7, BIAS_MIXED_7 +// - ReelTime: BIAS_REELTIME +// - Regular: everything else +// +// The 7's and ReelTime biases can be grouped together as 'Special' biases. +// +// There can be at most two biases at a time. If there are two, one bias will be +// ReelTime and the other will be one of the Regular biases. +// +// A new bias is drawn every round, except during ReelTime. Bias towards 7's +// persists across rounds until you match 7's. All other biases are reset after +// the round. +#define BIAS_REPLAY (1 << 0) +#define BIAS_CHERRY (1 << 1) +#define BIAS_LOTAD (1 << 2) +#define BIAS_AZURILL (1 << 3) +#define BIAS_POWER (1 << 4) +#define BIAS_REELTIME (1 << 5) +#define BIAS_MIXED_7 (1 << 6) +#define BIAS_STRAIGHT_7 (1 << 7) + +#define BIAS_7 (BIAS_STRAIGHT_7 | BIAS_MIXED_7) +#define BIAS_SPECIAL (BIAS_7 | BIAS_REELTIME) +#define BIAS_REGULAR (BIAS_REPLAY | BIAS_CHERRY | BIAS_LOATAD | BIAS_AZURILL | BIAS_POWER) enum { GFXTAG_7_RED, @@ -72,6 +93,10 @@ enum { #define GFXTAG_SYMBOLS_START (GFXTAG_7_RED) #define GFXTAG_NUMBERS_START (GFXTAG_NUM_0) +#define REEL_NORMAL_SPEED 8 +#define REEL_HALF_SPEED 4 +#define REEL_QUARTER_SPEED 2 + enum { PALTAG_REEL, PALTAG_REEL_TIME_PIKACHU, @@ -84,25 +109,25 @@ enum { }; enum { - MATCHED_1CHERRY, - MATCHED_2CHERRY, - MATCHED_REPLAY, - MATCHED_LOTAD, - MATCHED_AZURILL, - MATCHED_POWER, - MATCHED_777_MIXED, - MATCHED_777_RED, - MATCHED_777_BLUE, - MATCHED_NONE, + MATCH_CHERRY, // Cherry in center of first reel + MATCH_TOPBOT_CHERRY, // Cherry in top/bottom of first reel + MATCH_REPLAY, + MATCH_LOTAD, + MATCH_AZURILL, + MATCH_POWER, + MATCH_MIXED_7, // First two 7's are same color; last is other color + MATCH_RED_7, + MATCH_BLUE_7, + MATCH_NONE, }; enum { - MATCH_MIDDLE_ROW, - MATCH_TOP_ROW, - MATCH_BOTTOM_ROW, - MATCH_NWSE_DIAG, - MATCH_NESW_DIAG, - NUM_MATCH_LINES, + ROW_MIDDLE, + ROW_TOP, + ROW_BOTTOM, + ROW_DIAG_NWSE, + ROW_DIAG_NESW, + NUM_MATCH_ROWS, }; enum { @@ -113,45 +138,80 @@ enum { }; enum { - SLOT_ACTION_UNFADE, - SLOT_ACTION_WAIT_FADE, - SLOT_ACTION_READY_NEW_SPIN, - SLOT_ACTION_READY_NEW_RT_SPIN, - SLOT_ACTION_ASK_INSERT_BET, - SLOT_ACTION_BET_INPUT, - SLOT_ACTION_MSG_NEED_3_COINS, - SLOT_ACTION_WAIT_MSG_NEED_3_COINS, - SLOT_ACTION_WAIT_INFO_BOX, - SLOT_ACTION_START_SPIN, - SLOT_ACTION_START_RT_SPIN, - SLOT_ACTION_SET_LUCKY_SPINS, - SLOT_ACTION_AWAIT_REEL_STOP, - SLOT_ACTION_AWAIT_ALL_REELS_STOP, - SLOT_ACTION_CHECK_MATCHES, - SLOT_ACTION_WAIT_PAYOUT, - SLOT_ACTION_END_PAYOUT, - SLOT_ACTION_MATCHED_POWER, - SLOT_ACTION_WAIT_RT_ANIM, - SLOT_ACTION_RESET_BET_TILES, - SLOT_ACTION_NO_MATCHES, - SLOT_ACTION_ASK_QUIT, - SLOT_ACTION_HANDLE_QUIT_INPUT, - SLOT_ACTION_MSG_MAX_COINS, - SLOT_ACTION_WAIT_MSG_MAX_COINS, - SLOT_ACTION_MSG_NO_MORE_COINS, - SLOT_ACTION_WAIT_MSG_NO_MORE_COINS, - SLOT_ACTION_END, - SLOT_ACTION_FREE, + SLOTTASK_UNFADE, + SLOTTASK_WAIT_FADE, + SLOTTASK_READY_NEW_SPIN, + SLOTTASK_READY_NEW_RT_SPIN, + SLOTTASK_ASK_INSERT_BET, + SLOTTASK_BET_INPUT, + SLOTTASK_MSG_NEED_3_COINS, + SLOTTASK_WAIT_MSG_NEED_3_COINS, + SLOTTASK_WAIT_INFO_BOX, + SLOTTASK_START_SPIN, + SLOTTASK_START_RT_SPIN, + SLOTTASK_RESET_BIAS_FAILURE, + SLOTTASK_WAIT_REEL_STOP, + SLOTTASK_WAIT_ALL_REELS_STOP, + SLOTTASK_CHECK_MATCHES, + SLOTTASK_WAIT_PAYOUT, + SLOTTASK_END_PAYOUT, + SLOTTASK_MATCHED_POWER, + SLOTTASK_WAIT_RT_ANIM, + SLOTTASK_RESET_BET_TILES, + SLOTTASK_NO_MATCHES, + SLOTTASK_ASK_QUIT, + SLOTTASK_HANDLE_QUIT_INPUT, + SLOTTASK_MSG_MAX_COINS, + SLOTTASK_WAIT_MSG_MAX_COINS, + SLOTTASK_MSG_NO_MORE_COINS, + SLOTTASK_WAIT_MSG_NO_MORE_COINS, + SLOTTASK_END, + SLOTTASK_FREE, +}; +enum +{ + PAYOUT_TASK_INIT, + PAYOUT_TASK_GIVE_PAYOUT, + PAYOUT_TASK_FREE, }; enum { - REEL_ACTION_STILL, - REEL_ACTION_SPIN, - REEL_ACTION_STOP, - REEL_ACTION_STOP_MOVE, + REEL_TASK_STILL, + REEL_TASK_SPIN, + REEL_TASK_DECIDE_STOP, + REEL_TASK_STOP_MOVE, REEL_ACTION_STOP_SHAKE, }; +enum { + PIKABOLT_TASK_IDLE, + PIKABOLT_TASK_ADD_BOLT, + PIKABOLT_TASK_WAIT_ANIM, + PIKABOLT_TASK_CLEAR_ALL, +}; + +enum { + RT_TASK_INIT, + RT_TASK_WINDOW_ENTER, + RT_TASK_WAIT_START_PIKA, + RT_TASK_PIKA_SPEEDUP1, + RT_TASK_PIKA_SPEEDUP2, + RT_TASK_WAIT_REEL, + RT_TASK_CHECK_EXPLODE, + RT_TASK_LAND, + RT_TASK_PIKA_REACT, + RT_TASK_WAIT_CLEAR_POWER, + RT_TASK_CLOSE_WINDOW_SUCCESS, + RT_TASK_DESTROY_SPRITES, + RT_TASK_SET_REEL_SPEED, + RT_TASK_END_SUCCESS, + RT_TASK_EXPLODE, + RT_TASK_WAIT_EXPLODE, + RT_TASK_WAIT_SMOKE, + RT_TASK_CLOSE_WINDOW_FAILURE, + RT_TASK_END_FAILURE, +}; + #define DIG_SPRITE_DUMMY {255, 0, 0} // Sprite template IDs for the digital display in the right panel @@ -235,29 +295,75 @@ enum { DIG_DISPLAY_BONUS_BIG }; +// DO NOT SUBMIT until committing in the 'DO NOT SUBMIT' state. +// Keep for posterity as more of an unabridged explanation. + +// How ReelTime works +// ================== +// Entering ReelTime: +// - If the bias you draw at the start of the round is BIAS_REELTIME, the +// ReelTime lottery begins. +// - At the start of the lottery, the game selects how many ReelTime spins you +// will get, based on how many Power bolts you've collected and whether it +// is a lucky game. +// - The lottery machine rolls until it lands on the selected number. If it +// selected 0 spins, the lottery machine will mostly likely explode before +// landing on 0. +// - If you win: +// - You receive the selected number of ReelTime spins +// - You lose all the Power bolts you've collected thus far +// - The lottery window closes and ReelTime officially begins +// +// During ReelTime: +// - You still have to pay coins for bets. +// - The slot reels may spin slower than usual in ReelTime. The machine draws a +// reel speed at the beginning of each ReelTime spin. The more coins you've +// lost to the machine, and the more consecutive ReelTime spins you've done, +// the higher your chances of getting a slower reel speed. +// - In ReelTime, the reel stops exactly on your input. That is, it won't add +// extra turns to manipulate the outcome. +// - ReelTime ends early if you win red 7's or blue 7's. + +// Field explanations: +// +// luckyGame: +// Determined at random when you start playing. Some events modify this: +// - Blue 7 match: game becomes lucky +// - Red 7 match: game becomes normal +// +// Effectively, a lucky game inreases the odds of getting more ReelTime spins. +// If the game is lucky, you have a slightly higher chance of matching Power +// bolts (at the expense of Replays). This helps you fill your Power bolt +// gauge faster. +// +// During ReelTime, the more Power bolts you have, the greater your chances +// of drawing more ReelTime spins. In a lucky game, you have greater odds of +// drawing high yields (3+ RT spins). You also have greater odds of drawing 0 +// RT spins. But drawing 0 lets you keep all your Power bolts, allowing you to +// fill your gauge further. struct SlotMachine { /*0x00*/ u8 state; /*0x01*/ u8 machineId; - /*0x02*/ u8 pikaPower; - /*0x03*/ u8 luckyGame; - /*0x04*/ u8 luckyFlags; + /*0x02*/ u8 pikaPowerBolts; + /*0x03*/ bool8 luckyGame; + /*0x04*/ u8 machineBias; /*0x05*/ u8 reelTimeDraw; - /*0x06*/ u8 isLuckySpin; + /*0x06*/ bool8 didNotFailBias; /*0x07*/ u8 biasTag; - /*0x08*/ u16 matchedSymbols; + /*0x08*/ u16 matches; /*0x0A*/ u8 reelTimeSpinsLeft; /*0x0B*/ u8 reelTimeSpinsUsed; /*0x0C*/ s16 coins; /*0x0E*/ s16 payout; - /*0x10*/ s16 netCoinLoss; // coins lost to machine (but never goes below 0) + /*0x10*/ s16 netCoinLoss; // never negative /*0x12*/ s16 bet; /*0x14*/ s16 reeltimePixelOffset; /*0x16*/ s16 reeltimePosition; - /*0x18*/ s16 currReel; - /*0x1A*/ s16 reelIncrement; // speed of reel + /*0x18*/ s16 currentReel; + /*0x1A*/ s16 reelSpeed; /*0x1C*/ s16 reelPixelOffsets[NUM_REELS]; - /*0x22*/ u16 reelPixelOffsetsWhileStopping[NUM_REELS]; + /*0x22*/ u16 reelShockOffsets[NUM_REELS]; /*0x28*/ s16 reelPositions[NUM_REELS]; /*0x2E*/ s16 reelExtraTurns[NUM_REELS]; /*0x34*/ s16 winnerRows[NUM_REELS]; @@ -269,7 +375,7 @@ struct SlotMachine /*0x41*/ u8 reelTimeExplosionSpriteId; /*0x42*/ u8 reelTimeBrokenMachineSpriteId; /*0x43*/ u8 reelTimeSmokeSpriteId; - /*0x44*/ u8 flashMatchLineSpriteIds[NUM_MATCH_LINES]; + /*0x44*/ u8 flashMatchLineSpriteIds[NUM_MATCH_ROWS]; /*0x49*/ u8 reelTimeMachineSpriteIds[2]; /*0x49*/ u8 reelTimeNumberSpriteIds[3]; /*0x4E*/ u8 reelTimeShadowSpriteIds[2]; @@ -299,7 +405,7 @@ static void SlotMachineSetup_InitBgsWindows(void); static void SlotMachineSetup_InitVRAM(void); static void SlotMachineSetup_InitOAM(void); static void SlotMachineSetup_InitGpuRegs(void); -static void SlotMachineSetup_InitSlotMachineStruct(void); +static void InitSlotMachine(void); static void SlotMachineSetup_InitPalsSpritesTasks(void); static void SlotMachineSetup_InitTilemaps(void); static void SlotMachineSetup_LoadGfxAndTilemaps(void); @@ -308,84 +414,84 @@ static void AllocDigitalDisplayGfx(void); static void SetDigitalDisplayImagePtrs(void); static void CreateSlotMachineSprites(void); static void CreateGameplayTasks(void); -static void CreateSlotMachineTask(void); +static void CreateSlotMachineTasks(void); static void DestroyDigitalDisplayScene(void); static void Task_SlotMachine(u8); -static bool8 SlotAction_UnfadeScreen(struct Task *); -static bool8 SlotAction_WaitForUnfade(struct Task *); -static bool8 SlotAction_ReadyNewSpin(struct Task *); -static bool8 SlotAction_ReadyNewReelTimeSpin(struct Task *); -static bool8 SlotAction_AskInsertBet(struct Task *); -static bool8 SlotAction_HandleBetInput(struct Task *); -static bool8 SlotAction_PrintMsg_Need3Coins(struct Task *); -static bool8 SlotAction_WaitMsg_Need3Coins(struct Task *); -static bool8 SlotAction_WaitForInfoBox(struct Task *); -static bool8 SlotAction_StartSpin(struct Task *); -static bool8 SlotAction_StartReelTimeSpin(struct Task *); -static bool8 SlotAction_SetLuckySpins(struct Task *); -static bool8 SlotAction_AwaitReelStop(struct Task *); -static bool8 SlotAction_WaitForAllReelsToStop(struct Task *); -static bool8 SlotAction_CheckMatches(struct Task *); -static bool8 SlotAction_WaitForPayoutToBeAwarded(struct Task *); -static bool8 SlotAction_EndPayout(struct Task *); -static bool8 SlotAction_MatchedPower(struct Task *); -static bool8 SlotAction_WaitReelTimeAnim(struct Task *); -static bool8 SlotAction_ResetBetTiles(struct Task *); -static bool8 SlotAction_NoMatches(struct Task *); -static bool8 SlotAction_AskQuit(struct Task *); -static bool8 SlotAction_HandleQuitInput(struct Task *); -static bool8 SlotAction_PrintMsg_9999Coins(struct Task *); -static bool8 SlotAction_WaitMsg_9999Coins(struct Task *); -static bool8 SlotAction_PrintMsg_NoMoreCoins(struct Task *); -static bool8 SlotAction_WaitMsg_NoMoreCoins(struct Task *); -static bool8 SlotAction_EndGame(struct Task *); -static bool8 SlotAction_FreeDataStructures(struct Task *); -static void DrawLuckyFlags(void); -static void SetLuckySpins(void); -static bool8 IsThisRoundLucky(void); -static u8 AttemptsAtLuckyFlags_Top3(void); -static u16 SlowReelSpeed(void); -static u8 AttemptsAtLuckyFlags_NotTop3(void); +static bool8 SlotTask_UnfadeScreen(struct Task *); +static bool8 SlotTask_WaitUnfade(struct Task *); +static bool8 SlotTask_ReadyNewSpin(struct Task *); +static bool8 SlotTask_ReadyNewReelTimeSpin(struct Task *); +static bool8 SlotTask_AskInsertBet(struct Task *); +static bool8 SlotTask_HandleBetInput(struct Task *); +static bool8 SlotTask_PrintMsg_Need3Coins(struct Task *); +static bool8 SlotTask_WaitMsg_Need3Coins(struct Task *); +static bool8 SlotTask_WaitInfoBox(struct Task *); +static bool8 SlotTask_StartSpin(struct Task *); +static bool8 SlotTask_StartReelTimeSpin(struct Task *); +static bool8 SlotTask_ResetBiasFailure(struct Task *); +static bool8 SlotTask_WaitReelStop(struct Task *); +static bool8 SlotTask_WaitAllReelsStop(struct Task *); +static bool8 SlotTask_CheckMatches(struct Task *); +static bool8 SlotTask_WaitPayout(struct Task *); +static bool8 SlotTask_EndPayout(struct Task *); +static bool8 SlotTask_MatchedPower(struct Task *); +static bool8 SlotTask_WaitReelTimeAnim(struct Task *); +static bool8 SlotTask_ResetBetTiles(struct Task *); +static bool8 SlotTask_NoMatches(struct Task *); +static bool8 SlotTask_AskQuit(struct Task *); +static bool8 SlotTask_HandleQuitInput(struct Task *); +static bool8 SlotTask_PrintMsg_MaxCoins(struct Task *); +static bool8 SlotTask_WaitMsg_MaxCoins(struct Task *); +static bool8 SlotTask_PrintMsg_NoMoreCoins(struct Task *); +static bool8 SlotTask_WaitMsg_NoMoreCoins(struct Task *); +static bool8 SlotTask_EndGame(struct Task *); +static bool8 SlotTask_FreeDataStructures(struct Task *); +static void DrawMachineBias(void); +static void ResetBiasFailure(void); +static bool8 ShouldTrySpecialBias(void); +static u8 TrySelectBias_Special(void); +static u16 ReelTimeSpeed(void); +static u8 TrySelectBias_Regular(void); static void CheckMatch(void); static void CheckMatch_CenterRow(void); static void CheckMatch_TopAndBottom(void); static void CheckMatch_Diagonals(void); -static u8 GetMatchFromSymbols(u8, u8, u8); +static u8 GetMatchFromTags(u8, u8, u8); static void AwardPayout(void); -static void RunAwardPayoutActions(u8); -static bool8 IsFinalTask_RunAwardPayoutActions(void); -static bool8 AwardPayoutAction0(struct Task *); -static bool8 AwardPayoutAction_GivePayoutToPlayer(struct Task *); -static bool8 AwardPayoutAction_FreeTask(struct Task *); +static void Task_Payout(u8); +static bool8 IsFinalTask_Task_Payout(void); +static bool8 PayoutTask_Init(struct Task *); +static bool8 PayoutTask_GivePayout(struct Task *); +static bool8 PayoutTask_Free(struct Task *); static u8 GetTagAtRest(u8, s16); -static void CreateSlotReelTasks(void); +static void CreateReelTasks(void); static void SpinSlotReel(u8); static void StopSlotReel(u8); static bool8 IsSlotReelMoving(u8); -static void Task_RunSlotReelActions(u8); -static bool8 SlotReelAction_StayStill(struct Task *); -static bool8 SlotReelAction_Spin(struct Task *); -static bool8 SlotReelAction_DecideWhereToStop(struct Task *); -static bool8 SlotReelAction_MoveToStop(struct Task *); -static bool8 SlotReelAction_OscillatingStop(struct Task *); -static bool8 DecideReelTurns_BiasTag_Reel1(void); -static bool8 DecideReelTurns_BiasTag_Reel1_Bet1(u8, u8); -static bool8 DecideReelTurns_BiasTag_Reel1_Bet2or3(u8, u8); -static bool8 DecideReelTurns_BiasTag_Reel2(void); -static bool8 DecideReelTurns_BiasTag_Reel2_Bet1or2(void); -static bool8 DecideReelTurns_BiasTag_Reel2_Bet3(void); -static bool8 DecideReelTurns_BiasTag_Reel3(void); -static bool8 DecideReelTurns_BiasTag_Reel3_Bet1or2(u8); -static bool8 DecideReelTurns_BiasTag_Reel3_Bet3(u8); -static void DecideReelTurns_NoBiasTag_Reel1(void); -static void DecideReelTurns_NoBiasTag_Reel2(void); -static void DecideReelTurns_NoBiasTag_Reel2_Bet1(void); -static void DecideReelTurns_NoBiasTag_Reel2_Bet2(void); -static void DecideReelTurns_NoBiasTag_Reel2_Bet3(void); -static void DecideReelTurns_NoBiasTag_Reel3(void); -static void DecideReelTurns_NoBiasTag_Reel3_Bet1(void); -static void DecideReelTurns_NoBiasTag_Reel3_Bet2(void); -static void DecideReelTurns_NoBiasTag_Reel3_Bet3(void); +static void Task_Reel(u8); +static bool8 ReelTask_StayStill(struct Task *); +static bool8 ReelTask_Spin(struct Task *); +static bool8 ReelTask_DecideStop(struct Task *); +static bool8 ReelTask_MoveToStop(struct Task *); +static bool8 ReelTask_ShakingStop(struct Task *); +static bool8 DecideStop_Bias_Reel1(void); +static bool8 DecideStop_Bias_Reel1_Bet1(u8, u8); +static bool8 DecideStop_Bias_Reel1_Bet2or3(u8, u8); +static bool8 DecideStop_Bias_Reel2(void); +static bool8 DecideStop_Bias_Reel2_Bet1or2(void); +static bool8 DecideStop_Bias_Reel2_Bet3(void); +static bool8 DecideStop_Bias_Reel3(void); +static bool8 DecideStop_Bias_Reel3_Bet1or2(u8); +static bool8 DecideStop_Bias_Reel3_Bet3(u8); +static void DecideStop_NoBias_Reel1(void); +static void DecideStop_NoBias_Reel2(void); +static void DecideStop_NoBias_Reel2_Bet1(void); +static void DecideStop_NoBias_Reel2_Bet2(void); +static void DecideStop_NoBias_Reel2_Bet3(void); +static void DecideStop_NoBias_Reel3(void); +static void DecideStop_NoBias_Reel3_Bet1(void); +static void DecideStop_NoBias_Reel3_Bet2(void); +static void DecideStop_NoBias_Reel3_Bet3(void); static void PressStopReelButton(u8); static void Task_PressStopReelButton(u8); static void LightenBetTiles(u8); @@ -427,7 +533,7 @@ static void ReelTime_PikachuReact(struct Task *); static void ReelTime_WaitClearPikaPower(struct Task *); static void ReelTime_CloseWindow(struct Task *); static void ReelTime_DestroySprites(struct Task *); -static void ReelTime_SetReelIncrement(struct Task *); +static void ReelTime_SetReelSpeed(struct Task *); static void ReelTime_EndSuccess(struct Task *); static void ReelTime_ExplodeMachine(struct Task *); static void ReelTime_WaitExplode(struct Task *); @@ -439,9 +545,9 @@ static void OpenInfoBox(u8); static bool8 IsInfoBoxClosed(void); static void RunInfoBoxActions(u8 ); static void InfoBox_FadeIn(struct Task *); -static void InfoBox_WaitForFade(struct Task *); +static void InfoBox_WaitFade(struct Task *); static void InfoBox_DrawWindow(struct Task *); -static void InfoBox_AwaitPlayerInput(struct Task *); +static void InfoBox_WaitInput(struct Task *); static void InfoBox_AddText(struct Task *); static void InfoBox_LoadPikaPowerMeter(struct Task *); static void InfoBox_LoadSlotMachineTilemap(struct Task *); @@ -557,10 +663,10 @@ static struct SpriteFrameImage *sImageTables_DigitalDisplay[NUM_DIG_DISPLAY_SPRI // Const rom data. static const struct DigitalDisplaySprite *const sDigitalDisplayScenes[]; static const u16 sUnkPalette[]; -static const u8 sLuckyRoundProbabilities[NUM_SLOT_MACHINE_IDS][MAX_BET]; +static const u8 sSpecialDrawOdds[NUM_SLOT_MACHINE_IDS][MAX_BET]; static const u8 sBiasTags[]; -static const u16 sLuckyFlagSettings_Top3[3]; -static const u16 sLuckyFlagSettings_NotTop3[5]; +static const u16 sBiasesSpecial[3]; +static const u16 sBiasesRegular[5]; static const s16 sDigitalDisplay_SpriteCoords[][2]; static const SpriteCallback sDigitalDisplay_SpriteCallbacks[]; static const struct SpriteTemplate *const sSpriteTemplates_DigitalDisplay[NUM_DIG_DISPLAY_SPRITES]; @@ -572,8 +678,8 @@ static const struct SpriteTemplate sSpriteTemplate_ReelTimeExplosion; static const struct SpriteTemplate sSpriteTemplate_ReelTimePikachuAura; static const u16 sReelTimeExplodeProbability[]; static const u16 *const sPokeballShiningPalTable[]; -static const u16 sReelIncrementTable[][2]; -static const u16 sReelTimeBonusIncrementTable[]; +static const u16 sReelTimeSpeed_Probabilities[][2]; +static const u16 sQuarterSpeed_ProbabilityBoost[]; static const u16 sSlotMatchFlags[]; static const u16 sSlotPayouts[]; static const u8 *const sReelBackground_Tilemap; @@ -582,16 +688,16 @@ static const struct SpriteSheet sSlotMachineSpriteSheets[22]; static const struct SpritePalette sSlotMachineSpritePalettes[]; static const u16 *const sDigitalDisplay_Pal; static const s16 sInitialReelPositions[NUM_REELS][2]; -static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS]; -static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS]; -static const u8 sReeltimeProbabilities_UnluckyGame[][17]; +static const u8 sBiasProbabilities_Special[][NUM_SLOT_MACHINE_IDS]; +static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS]; +static const u8 sReelTimeProbabilities_NormalGame[][17]; static const u8 sReelTimeProbabilities_LuckyGame[][17]; -static const u8 sSymToMatch[]; +static const u8 sTagToMatch[]; static const u8 sReelTimeTags[]; -static const u8 sReelSymbolTileTags[NUM_REELS][SYMBOLS_PER_REEL]; -static const u16 *const sLitMatchLinePalTable[NUM_MATCH_LINES]; -static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_LINES]; -static const u8 sMatchLinePalOffsets[NUM_MATCH_LINES]; +static const u8 sReelTileTags[NUM_REELS][TAGS_PER_REEL]; +static const u16 *const sLitMatchLinePalTable[NUM_MATCH_ROWS]; +static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_ROWS]; +static const u8 sMatchLinePalOffsets[NUM_MATCH_ROWS]; static const u8 sBetToMatchLineIds[MAX_BET][2]; static const u8 sMatchLinesPerBet[MAX_BET]; static const u16 *const sFlashingLightsPalTable[]; @@ -684,123 +790,131 @@ static const struct WindowTemplate sWindowTemplate_InfoBox = static const u8 sColors_ReeltimeHelp[] = {TEXT_COLOR_LIGHT_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY}; -static bool8 (*const sSlotActions[])(struct Task *task) = +static bool8 (*const sSlotTasks[])(struct Task *task) = { - [SLOT_ACTION_UNFADE] = SlotAction_UnfadeScreen, - [SLOT_ACTION_WAIT_FADE] = SlotAction_WaitForUnfade, - [SLOT_ACTION_READY_NEW_SPIN] = SlotAction_ReadyNewSpin, - [SLOT_ACTION_READY_NEW_RT_SPIN] = SlotAction_ReadyNewReelTimeSpin, - [SLOT_ACTION_ASK_INSERT_BET] = SlotAction_AskInsertBet, - [SLOT_ACTION_BET_INPUT] = SlotAction_HandleBetInput, - [SLOT_ACTION_MSG_NEED_3_COINS] = SlotAction_PrintMsg_Need3Coins, - [SLOT_ACTION_WAIT_MSG_NEED_3_COINS] = SlotAction_WaitMsg_Need3Coins, - [SLOT_ACTION_WAIT_INFO_BOX] = SlotAction_WaitForInfoBox, - [SLOT_ACTION_START_SPIN] = SlotAction_StartSpin, - [SLOT_ACTION_START_RT_SPIN] = SlotAction_StartReelTimeSpin, - [SLOT_ACTION_SET_LUCKY_SPINS] = SlotAction_SetLuckySpins, - [SLOT_ACTION_AWAIT_REEL_STOP] = SlotAction_AwaitReelStop, - [SLOT_ACTION_AWAIT_ALL_REELS_STOP] = SlotAction_WaitForAllReelsToStop, - [SLOT_ACTION_CHECK_MATCHES] = SlotAction_CheckMatches, - [SLOT_ACTION_WAIT_PAYOUT] = SlotAction_WaitForPayoutToBeAwarded, - [SLOT_ACTION_END_PAYOUT] = SlotAction_EndPayout, - [SLOT_ACTION_MATCHED_POWER] = SlotAction_MatchedPower, - [SLOT_ACTION_WAIT_RT_ANIM] = SlotAction_WaitReelTimeAnim, - [SLOT_ACTION_RESET_BET_TILES] = SlotAction_ResetBetTiles, - [SLOT_ACTION_NO_MATCHES] = SlotAction_NoMatches, - [SLOT_ACTION_ASK_QUIT] = SlotAction_AskQuit, - [SLOT_ACTION_HANDLE_QUIT_INPUT] = SlotAction_HandleQuitInput, - [SLOT_ACTION_MSG_MAX_COINS] = SlotAction_PrintMsg_9999Coins, - [SLOT_ACTION_WAIT_MSG_MAX_COINS] = SlotAction_WaitMsg_9999Coins, - [SLOT_ACTION_MSG_NO_MORE_COINS] = SlotAction_PrintMsg_NoMoreCoins, - [SLOT_ACTION_WAIT_MSG_NO_MORE_COINS] = SlotAction_WaitMsg_NoMoreCoins, - [SLOT_ACTION_END] = SlotAction_EndGame, - [SLOT_ACTION_FREE] = SlotAction_FreeDataStructures, + [SLOTTASK_UNFADE] = SlotTask_UnfadeScreen, + [SLOTTASK_WAIT_FADE] = SlotTask_WaitUnfade, + [SLOTTASK_READY_NEW_SPIN] = SlotTask_ReadyNewSpin, + [SLOTTASK_READY_NEW_RT_SPIN] = SlotTask_ReadyNewReelTimeSpin, + [SLOTTASK_ASK_INSERT_BET] = SlotTask_AskInsertBet, + [SLOTTASK_BET_INPUT] = SlotTask_HandleBetInput, + [SLOTTASK_MSG_NEED_3_COINS] = SlotTask_PrintMsg_Need3Coins, + [SLOTTASK_WAIT_MSG_NEED_3_COINS] = SlotTask_WaitMsg_Need3Coins, + [SLOTTASK_WAIT_INFO_BOX] = SlotTask_WaitInfoBox, + [SLOTTASK_START_SPIN] = SlotTask_StartSpin, + [SLOTTASK_START_RT_SPIN] = SlotTask_StartReelTimeSpin, + [SLOTTASK_RESET_BIAS_FAILURE] = SlotTask_ResetBiasFailure, + [SLOTTASK_WAIT_REEL_STOP] = SlotTask_WaitReelStop, + [SLOTTASK_WAIT_ALL_REELS_STOP] = SlotTask_WaitAllReelsStop, + [SLOTTASK_CHECK_MATCHES] = SlotTask_CheckMatches, + [SLOTTASK_WAIT_PAYOUT] = SlotTask_WaitPayout, + [SLOTTASK_END_PAYOUT] = SlotTask_EndPayout, + [SLOTTASK_MATCHED_POWER] = SlotTask_MatchedPower, + [SLOTTASK_WAIT_RT_ANIM] = SlotTask_WaitReelTimeAnim, + [SLOTTASK_RESET_BET_TILES] = SlotTask_ResetBetTiles, + [SLOTTASK_NO_MATCHES] = SlotTask_NoMatches, + [SLOTTASK_ASK_QUIT] = SlotTask_AskQuit, + [SLOTTASK_HANDLE_QUIT_INPUT] = SlotTask_HandleQuitInput, + [SLOTTASK_MSG_MAX_COINS] = SlotTask_PrintMsg_MaxCoins, + [SLOTTASK_WAIT_MSG_MAX_COINS] = SlotTask_WaitMsg_MaxCoins, + [SLOTTASK_MSG_NO_MORE_COINS] = SlotTask_PrintMsg_NoMoreCoins, + [SLOTTASK_WAIT_MSG_NO_MORE_COINS] = SlotTask_WaitMsg_NoMoreCoins, + [SLOTTASK_END] = SlotTask_EndGame, + [SLOTTASK_FREE] = SlotTask_FreeDataStructures, }; -static bool8 (*const sAwardPayoutActions[])(struct Task *task) = +static bool8 (*const sPayoutTasks[])(struct Task *task) = { - AwardPayoutAction0, - AwardPayoutAction_GivePayoutToPlayer, - AwardPayoutAction_FreeTask + [PAYOUT_TASK_INIT] = PayoutTask_Init, + [PAYOUT_TASK_GIVE_PAYOUT] = PayoutTask_GivePayout, + [PAYOUT_TASK_FREE] = PayoutTask_Free, }; -static bool8 (*const sSlotReelActions[])(struct Task *task) = +static bool8 (*const sReelTasks[])(struct Task *task) = { - [REEL_ACTION_STILL] = SlotReelAction_StayStill, - [REEL_ACTION_SPIN] = SlotReelAction_Spin, - [REEL_ACTION_STOP] = SlotReelAction_DecideWhereToStop, - [REEL_ACTION_STOP_MOVE] = SlotReelAction_MoveToStop, - [REEL_ACTION_STOP_SHAKE] = SlotReelAction_OscillatingStop + [REEL_TASK_STILL] = ReelTask_StayStill, + [REEL_TASK_SPIN] = ReelTask_Spin, + [REEL_TASK_DECIDE_STOP] = ReelTask_DecideStop, + [REEL_TASK_STOP_MOVE] = ReelTask_MoveToStop, + [REEL_ACTION_STOP_SHAKE] = ReelTask_ShakingStop, }; -// returns True if a match with the biasTag is possible in that reel -// also modifies data in sSlotMachine reel arrays to indicate how to get to the matching state -static bool8 (*const sDecideReelTurns_BiasTag[NUM_REELS])(void) = +// Returns true if it is possible to match the bias tag in the reel. +// +// Modifies the winnerRows and reelExtraTurns to indicate how to match the bias +// tag. +static bool8 (*const sDecideStop_Bias[NUM_REELS])(void) = { - DecideReelTurns_BiasTag_Reel1, - DecideReelTurns_BiasTag_Reel2, - DecideReelTurns_BiasTag_Reel3 + DecideStop_Bias_Reel1, + DecideStop_Bias_Reel2, + DecideStop_Bias_Reel3, }; -static void (*const sDecideReelTurns_NoBiasTag[NUM_REELS])(void) = +// The player will always lose (barring a few rare circumstances that were not +// accounted for in implementation). +// +// Modifies the winnerRows and reelExtraTurns to indicate how to make the player +// lose. +static void (*const sDecideStop_NoBias[NUM_REELS])(void) = { - DecideReelTurns_NoBiasTag_Reel1, - DecideReelTurns_NoBiasTag_Reel2, - DecideReelTurns_NoBiasTag_Reel3 + DecideStop_NoBias_Reel1, + DecideStop_NoBias_Reel2, + DecideStop_NoBias_Reel3, }; +// The magnitude of the shock depends on how many extra turns are added. static const u16 sReelStopShocks[] = {2, 4, 4, 4, 8}; -static bool8 (*const sDecideReelTurns_BiasTag_Reel1_Bets[MAX_BET])(u8 tag1, u8 tag2) = +static bool8 (*const sDecideStop_Bias_Reel1_Bets[MAX_BET])(u8 tag1, u8 tag2) = { - DecideReelTurns_BiasTag_Reel1_Bet1, - DecideReelTurns_BiasTag_Reel1_Bet2or3, - DecideReelTurns_BiasTag_Reel1_Bet2or3 + DecideStop_Bias_Reel1_Bet1, + DecideStop_Bias_Reel1_Bet2or3, + DecideStop_Bias_Reel1_Bet2or3, }; -static bool8 (*const sDecideReelTurns_BiasTag_Reel2_Bets[MAX_BET])(void) = +static bool8 (*const sDecideStop_Bias_Reel2_Bets[MAX_BET])(void) = { - DecideReelTurns_BiasTag_Reel2_Bet1or2, - DecideReelTurns_BiasTag_Reel2_Bet1or2, - DecideReelTurns_BiasTag_Reel2_Bet3 + DecideStop_Bias_Reel2_Bet1or2, + DecideStop_Bias_Reel2_Bet1or2, + DecideStop_Bias_Reel2_Bet3, }; -static bool8 (*const sDecideReelTurns_BiasTag_Reel3_Bets[MAX_BET])(u8 biasTag) = +static bool8 (*const sDecideStop_Bias_Reel3_Bets[MAX_BET])(u8 biasTag) = { - DecideReelTurns_BiasTag_Reel3_Bet1or2, - DecideReelTurns_BiasTag_Reel3_Bet1or2, - DecideReelTurns_BiasTag_Reel3_Bet3 + DecideStop_Bias_Reel3_Bet1or2, + DecideStop_Bias_Reel3_Bet1or2, + DecideStop_Bias_Reel3_Bet3, }; -static void (*const sDecideReelTurns_NoBiasTag_Reel2_Bets[MAX_BET])(void) = +static void (*const sDecideStop_NoBias_Reel2_Bets[MAX_BET])(void) = { - DecideReelTurns_NoBiasTag_Reel2_Bet1, - DecideReelTurns_NoBiasTag_Reel2_Bet2, - DecideReelTurns_NoBiasTag_Reel2_Bet3 + DecideStop_NoBias_Reel2_Bet1, + DecideStop_NoBias_Reel2_Bet2, + DecideStop_NoBias_Reel2_Bet3, }; -static void (*const sDecideReelTurns_NoBiasTag_Reel3_Bets[MAX_BET])(void) = +static void (*const sDecideStop_NoBias_Reel3_Bets[MAX_BET])(void) = { - DecideReelTurns_NoBiasTag_Reel3_Bet1, - DecideReelTurns_NoBiasTag_Reel3_Bet2, - DecideReelTurns_NoBiasTag_Reel3_Bet3 + DecideStop_NoBias_Reel3_Bet1, + DecideStop_NoBias_Reel3_Bet2, + DecideStop_NoBias_Reel3_Bet3, }; -static void (*const sReelStopButtonFuncs[])(struct Task *task, u8 taskId) = +static void (*const sReelStopButtonTasks[])(struct Task *task, u8 taskId) = { StopReelButton_Press, StopReelButton_Wait, - StopReelButton_Unpress + StopReelButton_Unpress, }; static const s16 sReelButtonOffsets[NUM_REELS] = {5, 10, 15}; -static void (*const sPikaPowerBoltFuncs[])(struct Task *task) = +static void (*const sPikaPowerBoltTasks[])(struct Task *task) = { PikaPowerBolt_Idle, PikaPowerBolt_AddBolt, PikaPowerBolt_WaitAnim, - PikaPowerBolt_ClearAll + PikaPowerBolt_ClearAll, }; static const u16 sPikaPowerTileTable[][2] = @@ -810,52 +924,52 @@ static const u16 sPikaPowerTileTable[][2] = {0xaf, 0x7f}, }; -static void (*const sReelTimeActions[])(struct Task *task) = +static void (*const sReelTimeTasks[])(struct Task *task) = { - ReelTime_Init, - ReelTime_WindowEnter, - ReelTime_WaitStartPikachu, - ReelTime_PikachuSpeedUp1, - ReelTime_PikachuSpeedUp2, - ReelTime_WaitReel, - ReelTime_CheckExplode, - ReelTime_LandOnOutcome, - ReelTime_PikachuReact, - ReelTime_WaitClearPikaPower, - ReelTime_CloseWindow, - ReelTime_DestroySprites, - ReelTime_SetReelIncrement, - ReelTime_EndSuccess, - ReelTime_ExplodeMachine, - ReelTime_WaitExplode, - ReelTime_WaitSmoke, - ReelTime_CloseWindow, - ReelTime_EndFailure + [RT_TASK_INIT] = ReelTime_Init, + [RT_TASK_WINDOW_ENTER] = ReelTime_WindowEnter, + [RT_TASK_WAIT_START_PIKA] = ReelTime_WaitStartPikachu, + [RT_TASK_PIKA_SPEEDUP1] = ReelTime_PikachuSpeedUp1, + [RT_TASK_PIKA_SPEEDUP2] = ReelTime_PikachuSpeedUp2, + [RT_TASK_WAIT_REEL] = ReelTime_WaitReel, + [RT_TASK_CHECK_EXPLODE] = ReelTime_CheckExplode, + [RT_TASK_LAND] = ReelTime_LandOnOutcome, + [RT_TASK_PIKA_REACT] = ReelTime_PikachuReact, + [RT_TASK_WAIT_CLEAR_POWER] = ReelTime_WaitClearPikaPower, + [RT_TASK_CLOSE_WINDOW_SUCCESS] = ReelTime_CloseWindow, + [RT_TASK_DESTROY_SPRITES] = ReelTime_DestroySprites, + [RT_TASK_SET_REEL_SPEED] = ReelTime_SetReelSpeed, + [RT_TASK_END_SUCCESS] = ReelTime_EndSuccess, + [RT_TASK_EXPLODE] = ReelTime_ExplodeMachine, + [RT_TASK_WAIT_EXPLODE] = ReelTime_WaitExplode, + [RT_TASK_WAIT_SMOKE] = ReelTime_WaitSmoke, + [RT_TASK_CLOSE_WINDOW_FAILURE] = ReelTime_CloseWindow, + [RT_TASK_END_FAILURE] = ReelTime_EndFailure, }; static const u8 sReelTimePikachuAnimIds[] = {1, 1, 2, 2}; static const s16 sReelTimeBoltDelays[] = {64, 48, 24, 8}; static const s16 sPikachuAuraFlashDelays[] = {10, 8, 6, 4}; -static void (*const sInfoBoxActions[])(struct Task *task) = +static void (*const sInfoBoxTasks[])(struct Task *task) = { // Go to Info screen InfoBox_FadeIn, - InfoBox_WaitForFade, + InfoBox_WaitFade, InfoBox_DrawWindow, - InfoBox_WaitForFade, + InfoBox_WaitFade, InfoBox_AddText, - InfoBox_WaitForFade, + InfoBox_WaitFade, // On Info screen - InfoBox_AwaitPlayerInput, + InfoBox_WaitInput, // Exit Info screen - InfoBox_WaitForFade, + InfoBox_WaitFade, InfoBox_LoadSlotMachineTilemap, - InfoBox_WaitForFade, + InfoBox_WaitFade, InfoBox_CreateDigitalDisplay, - InfoBox_WaitForFade, + InfoBox_WaitFade, InfoBox_LoadPikaPowerMeter, - InfoBox_WaitForFade, + InfoBox_WaitFade, InfoBox_FreeTask, }; @@ -865,10 +979,6 @@ static void (*const sDigitalDisplayActions[])(struct Task *task) = DigitalDisplay_Idle, }; - - - -// code #define tState data[0] static void Task_FadeToSlotMachine(u8 taskId) @@ -889,12 +999,12 @@ static void Task_FadeToSlotMachine(u8 taskId) } } -void PlaySlotMachine(u8 slotMachineIndex, MainCallback exitCallback) +void PlaySlotMachine(u8 machineId, MainCallback exitCallback) { u8 taskId; sSlotMachine = AllocZeroed(sizeof(*sSlotMachine)); - PlaySlotMachine_Internal(slotMachineIndex, exitCallback); + PlaySlotMachine_Internal(machineId, exitCallback); taskId = CreateTask(Task_FadeToSlotMachine, 0); gTasks[taskId].tState = 0; } @@ -907,7 +1017,7 @@ static void CB2_SlotMachineSetup(void) { case 0: SlotMachineSetup_InitBgsWindows(); - SlotMachineSetup_InitSlotMachineStruct(); + InitSlotMachine(); gMain.state++; break; case 1: @@ -981,25 +1091,31 @@ static void SlotMachine_VBlankCB(void) SetGpuReg(REG_OFFSET_WINOUT, sSlotMachine->winOut); } -static void PlaySlotMachine_Internal(u8 slotMachineIndex, MainCallback exitCallback) +#define tMachineId data[0] +#define tExitCallback data[1] + +static void PlaySlotMachine_Internal(u8 machineId, MainCallback exitCallback) { struct Task *task = &gTasks[CreateTask(SlotMachineDummyTask, 0xFF)]; - task->data[0] = slotMachineIndex; - StoreWordInTwoHalfwords(&task->data[1], (intptr_t)exitCallback); + task->tMachineId = machineId; + StoreWordInTwoHalfwords(&task->tExitCallback, (intptr_t)exitCallback); } - -static void SlotMachineInitDummyTask(void) +// Extracts and assigns machineId and exit callback from task. +static void SlotMachine_InitFromTask(void) { struct Task *task = &gTasks[FindTaskIdByFunc(SlotMachineDummyTask)]; - sSlotMachine->machineId = task->data[0]; - LoadWordFromTwoHalfwords((u16 *)&task->data[1], (u32 *)&sSlotMachine->prevMainCb); + sSlotMachine->machineId = task->tMachineId; + LoadWordFromTwoHalfwords((u16 *)&task->tExitCallback, (u32 *)&sSlotMachine->prevMainCb); } static void SlotMachineDummyTask(u8 taskId) { } +#undef tMachineId +#undef tExitCallback + static void SlotMachineSetup_InitBgsWindows(void) { SetVBlankCallback(NULL); @@ -1048,25 +1164,25 @@ static void SlotMachineSetup_InitGpuRegs(void) SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(9, 8)); } -// set up initial state of slot machine -static void SlotMachineSetup_InitSlotMachineStruct(void) +// Set up initial state of slot machine +static void InitSlotMachine(void) { u8 i; - SlotMachineInitDummyTask(); // assigns sSlotMachine->machineId, etc. - sSlotMachine->state = 0; - sSlotMachine->pikaPower = 0; + SlotMachine_InitFromTask(); + sSlotMachine->state = SLOTTASK_UNFADE; + sSlotMachine->pikaPowerBolts = 0; sSlotMachine->luckyGame = Random() & 1; - sSlotMachine->luckyFlags = 0; - sSlotMachine->matchedSymbols = 0; + sSlotMachine->machineBias = 0; + sSlotMachine->matches = 0; sSlotMachine->reelTimeSpinsLeft = 0; sSlotMachine->reelTimeSpinsUsed = 0; sSlotMachine->coins = GetCoins(); sSlotMachine->payout = 0; sSlotMachine->netCoinLoss = 0; sSlotMachine->bet = 0; - sSlotMachine->currReel = 0; - sSlotMachine->reelIncrement = 8; + sSlotMachine->currentReel = LEFT_REEL; + sSlotMachine->reelSpeed = REEL_NORMAL_SPEED; sSlotMachine->win0h = DISPLAY_WIDTH; sSlotMachine->win0v = DISPLAY_HEIGHT; sSlotMachine->winIn = WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR; @@ -1075,10 +1191,10 @@ static void SlotMachineSetup_InitSlotMachineStruct(void) for (i = 0; i < NUM_REELS; i++) { - sSlotMachine->reelPixelOffsetsWhileStopping[i] = 0; - sSlotMachine->reelPositions[i] = sInitialReelPositions[i][sSlotMachine->luckyGame] % SYMBOLS_PER_REEL; - sSlotMachine->reelPixelOffsets[i] = SYMBOLS_PER_REEL * REEL_SYMBOL_HEIGHT - sSlotMachine->reelPositions[i] * REEL_SYMBOL_HEIGHT; - sSlotMachine->reelPixelOffsets[i] %= SYMBOLS_PER_REEL * REEL_SYMBOL_HEIGHT; + sSlotMachine->reelShockOffsets[i] = 0; + sSlotMachine->reelPositions[i] = sInitialReelPositions[i][sSlotMachine->luckyGame] % TAGS_PER_REEL; + sSlotMachine->reelPixelOffsets[i] = REEL_HEIGHT - sSlotMachine->reelPositions[i] * TAG_HEIGHT; + sSlotMachine->reelPixelOffsets[i] %= REEL_HEIGHT; } AlertTVThatPlayerPlayedSlotMachine(GetCoins()); } @@ -1129,89 +1245,92 @@ static void CreateSlotMachineSprites(void) static void CreateGameplayTasks(void) { CreatePikaPowerBoltTask(); - CreateSlotReelTasks(); + CreateReelTasks(); CreateDigitalDisplayTask(); - CreateSlotMachineTask(); + CreateSlotMachineTasks(); } -static void CreateSlotMachineTask(void) +static void CreateSlotMachineTasks(void) { Task_SlotMachine(CreateTask(Task_SlotMachine, 0)); } -// task->data[0] is a timer static void Task_SlotMachine(u8 taskId) { - while (sSlotActions[sSlotMachine->state](&gTasks[taskId])) + while (sSlotTasks[sSlotMachine->state](&gTasks[taskId])) ; } -// SLOT_ACTION_UNFADE -static bool8 SlotAction_UnfadeScreen(struct Task *task) +#define tTimer data[0] +#define tTimer2 data[1] + +// SLOTTASK_UNFADE +static bool8 SlotTask_UnfadeScreen(struct Task *task) { BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0)); - LoadPikaPowerMeter(sSlotMachine->pikaPower); - sSlotMachine->state++; // SLOT_ACTION_WAIT_FADE + LoadPikaPowerMeter(sSlotMachine->pikaPowerBolts); + sSlotMachine->state++; // SLOTTASK_WAIT_FADE return FALSE; } -// SLOT_ACTION_WAIT_FADE -static bool8 SlotAction_WaitForUnfade(struct Task *task) +// SLOTTASK_WAIT_FADE +static bool8 SlotTask_WaitUnfade(struct Task *task) { if (!gPaletteFade.active) sSlotMachine->state++; return FALSE; } -// SLOT_ACTION_READY_NEW_SPIN -static bool8 SlotAction_ReadyNewSpin(struct Task *task) +// SLOTTASK_READY_NEW_SPIN +static bool8 SlotTask_ReadyNewSpin(struct Task *task) { sSlotMachine->payout = 0; sSlotMachine->bet = 0; - sSlotMachine->currReel = 0; - sSlotMachine->luckyFlags &= (LUCKY_BIAS_777 | LUCKY_BIAS_MIXED_777); - sSlotMachine->state = SLOT_ACTION_ASK_INSERT_BET; + sSlotMachine->currentReel = LEFT_REEL; + sSlotMachine->machineBias &= (BIAS_STRAIGHT_7 | BIAS_MIXED_7); + sSlotMachine->state = SLOTTASK_ASK_INSERT_BET; if (sSlotMachine->coins <= 0) { - sSlotMachine->state = SLOT_ACTION_MSG_NO_MORE_COINS; + sSlotMachine->state = SLOTTASK_MSG_NO_MORE_COINS; } else if (sSlotMachine->reelTimeSpinsLeft) { - sSlotMachine->state = SLOT_ACTION_READY_NEW_RT_SPIN; + sSlotMachine->state = SLOTTASK_READY_NEW_RT_SPIN; CreateDigitalDisplayScene(DIG_DISPLAY_REEL_TIME); } return TRUE; } -// SLOT_ACTION_READY_NEW_RT_SPIN -static bool8 SlotAction_ReadyNewReelTimeSpin(struct Task *task) +// SLOTTASK_READY_NEW_RT_SPIN +static bool8 SlotTask_ReadyNewReelTimeSpin(struct Task *task) { if (IsDigitalDisplayAnimFinished()) - sSlotMachine->state = SLOT_ACTION_ASK_INSERT_BET; + sSlotMachine->state = SLOTTASK_ASK_INSERT_BET; return FALSE; } -// SLOT_ACTION_ASK_INSERT_BET -static bool8 SlotAction_AskInsertBet(struct Task *task) +// SLOTTASK_ASK_INSERT_BET +static bool8 SlotTask_AskInsertBet(struct Task *task) { CreateDigitalDisplayScene(DIG_DISPLAY_INSERT_BET); - sSlotMachine->state = SLOT_ACTION_BET_INPUT; + sSlotMachine->state = SLOTTASK_BET_INPUT; if (sSlotMachine->coins >= MAX_COINS) - sSlotMachine->state = SLOT_ACTION_MSG_MAX_COINS; + sSlotMachine->state = SLOTTASK_MSG_MAX_COINS; return TRUE; } -// SLOT_ACTION_BET_INPUT -static bool8 SlotAction_HandleBetInput(struct Task *task) +// SLOTTASK_BET_INPUT +static bool8 SlotTask_HandleBetInput(struct Task *task) { s16 i; if (JOY_NEW(SELECT_BUTTON)) { OpenInfoBox(DIG_DISPLAY_INSERT_BET); - sSlotMachine->state = SLOT_ACTION_WAIT_INFO_BOX; + sSlotMachine->state = SLOTTASK_WAIT_INFO_BOX; } - else if (JOY_NEW(R_BUTTON)) // bet the max amount + // Try to bet the max amount + else if (JOY_NEW(R_BUTTON)) { if (sSlotMachine->coins - (MAX_BET - sSlotMachine->bet) >= 0) { @@ -1219,12 +1338,13 @@ static bool8 SlotAction_HandleBetInput(struct Task *task) LightenBetTiles(i); sSlotMachine->coins -= (MAX_BET - sSlotMachine->bet); sSlotMachine->bet = MAX_BET; - sSlotMachine->state = SLOT_ACTION_START_SPIN; + sSlotMachine->state = SLOTTASK_START_SPIN; PlaySE(SE_SHOP); } - else // you didn't have enough coins to bet the max + // Not enough coins + else { - sSlotMachine->state = SLOT_ACTION_MSG_NEED_3_COINS; + sSlotMachine->state = SLOTTASK_MSG_NEED_3_COINS; } } else @@ -1240,48 +1360,48 @@ static bool8 SlotAction_HandleBetInput(struct Task *task) // Maxed bet or finished betting if (sSlotMachine->bet >= MAX_BET || (sSlotMachine->bet != 0 && JOY_NEW(A_BUTTON))) - sSlotMachine->state = SLOT_ACTION_START_SPIN; + sSlotMachine->state = SLOTTASK_START_SPIN; // Quit prompt if (JOY_NEW(B_BUTTON)) - sSlotMachine->state = SLOT_ACTION_ASK_QUIT; + sSlotMachine->state = SLOTTASK_ASK_QUIT; } return FALSE; } // SLOT_ACTION_NEED_3_COINS -static bool8 SlotAction_PrintMsg_Need3Coins(struct Task *task) +static bool8 SlotTask_PrintMsg_Need3Coins(struct Task *task) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouDontHaveThreeCoins, 0, 1, 0, 0); CopyWindowToVram(0, COPYWIN_FULL); - sSlotMachine->state = SLOT_ACTION_WAIT_MSG_NEED_3_COINS; + sSlotMachine->state = SLOTTASK_WAIT_MSG_NEED_3_COINS; return FALSE; } -// SLOT_ACTION_WAIT_MSG_NEED_3_COINS -static bool8 SlotAction_WaitMsg_Need3Coins(struct Task *task) +// SLOTTASK_WAIT_MSG_NEED_3_COINS +static bool8 SlotTask_WaitMsg_Need3Coins(struct Task *task) { if (JOY_NEW(A_BUTTON | B_BUTTON)) { ClearDialogWindowAndFrame(0, TRUE); - sSlotMachine->state = SLOT_ACTION_BET_INPUT; + sSlotMachine->state = SLOTTASK_BET_INPUT; } return FALSE; } -// SLOT_ACTION_WAIT_INFO_BOX -static bool8 SlotAction_WaitForInfoBox(struct Task *task) +// SLOTTASK_WAIT_INFO_BOX +static bool8 SlotTask_WaitInfoBox(struct Task *task) { if (IsInfoBoxClosed()) - sSlotMachine->state = SLOT_ACTION_BET_INPUT; + sSlotMachine->state = SLOTTASK_BET_INPUT; return FALSE; } -// SLOT_ACTION_START_SPIN -static bool8 SlotAction_StartSpin(struct Task *task) +// SLOTTASK_START_SPIN +static bool8 SlotTask_StartSpin(struct Task *task) { - DrawLuckyFlags(); + DrawMachineBias(); DestroyDigitalDisplayScene(); SpinSlotReel(LEFT_REEL); @@ -1290,79 +1410,79 @@ static bool8 SlotAction_StartSpin(struct Task *task) IncrementDailySlotsUses(); - task->data[0] = 0; - if (sSlotMachine->luckyFlags & LUCKY_BIAS_REELTIME) + task->tTimer = 0; + if (sSlotMachine->machineBias & BIAS_REELTIME) { BeginReelTime(); - sSlotMachine->state = SLOT_ACTION_START_RT_SPIN; + sSlotMachine->state = SLOTTASK_START_RT_SPIN; } else { CreateDigitalDisplayScene(DIG_DISPLAY_STOP_REEL); - sSlotMachine->state = SLOT_ACTION_SET_LUCKY_SPINS; + sSlotMachine->state = SLOTTASK_RESET_BIAS_FAILURE; } - sSlotMachine->reelIncrement = 8; + sSlotMachine->reelSpeed = REEL_NORMAL_SPEED; if (sSlotMachine->reelTimeSpinsLeft) - sSlotMachine->reelIncrement = SlowReelSpeed(); + sSlotMachine->reelSpeed = ReelTimeSpeed(); return FALSE; } -// SLOT_ACTION_START_RT_SPIN -static bool8 SlotAction_StartReelTimeSpin(struct Task *task) +// SLOTTASK_START_RT_SPIN +static bool8 SlotTask_StartReelTimeSpin(struct Task *task) { if (IsReelTimeTaskDone()) { CreateDigitalDisplayScene(DIG_DISPLAY_STOP_REEL); - sSlotMachine->luckyFlags &= ~LUCKY_BIAS_REELTIME; - sSlotMachine->state = SLOT_ACTION_SET_LUCKY_SPINS; + sSlotMachine->machineBias &= ~BIAS_REELTIME; + sSlotMachine->state = SLOTTASK_RESET_BIAS_FAILURE; } return FALSE; } -// SLOT_ACTION_SET_LUCKY_SPINS -static bool8 SlotAction_SetLuckySpins(struct Task *task) +// SLOTTASK_RESET_BIAS_FAILURE +static bool8 SlotTask_ResetBiasFailure(struct Task *task) { - if (++task->data[0] >= 30) + if (++task->tTimer >= 30) { - SetLuckySpins(); - sSlotMachine->state = SLOT_ACTION_AWAIT_REEL_STOP; + ResetBiasFailure(); + sSlotMachine->state = SLOTTASK_WAIT_REEL_STOP; } return FALSE; } -// SLOT_ACTION_AWAIT_REEL_STOP -static bool8 SlotAction_AwaitReelStop(struct Task *task) +// SLOTTASK_WAIT_REEL_STOP +static bool8 SlotTask_WaitReelStop(struct Task *task) { if (JOY_NEW(A_BUTTON)) { PlaySE(SE_CONTEST_PLACE); - StopSlotReel(sSlotMachine->currReel); - PressStopReelButton(sSlotMachine->currReel); - sSlotMachine->state = SLOT_ACTION_AWAIT_ALL_REELS_STOP; + StopSlotReel(sSlotMachine->currentReel); + PressStopReelButton(sSlotMachine->currentReel); + sSlotMachine->state = SLOTTASK_WAIT_ALL_REELS_STOP; } return FALSE; } -// SLOT_ACTION_AWAIT_ALL_REELS_STOP -static bool8 SlotAction_WaitForAllReelsToStop(struct Task *task) +// SLOTTASK_WAIT_ALL_REELS_STOP +static bool8 SlotTask_WaitAllReelsStop(struct Task *task) { - if (!IsSlotReelMoving(sSlotMachine->currReel)) + if (!IsSlotReelMoving(sSlotMachine->currentReel)) { - sSlotMachine->currReel++; - sSlotMachine->state = SLOT_ACTION_AWAIT_REEL_STOP; - if (sSlotMachine->currReel >= NUM_REELS) + sSlotMachine->currentReel++; + sSlotMachine->state = SLOTTASK_WAIT_REEL_STOP; + if (sSlotMachine->currentReel >= NUM_REELS) { - sSlotMachine->state = SLOT_ACTION_CHECK_MATCHES; + sSlotMachine->state = SLOTTASK_CHECK_MATCHES; } return TRUE; } return FALSE; } -// SLOT_ACTION_CHECK_MATCHES -static bool8 SlotAction_CheckMatches(struct Task *task) +// SLOTTASK_CHECK_MATCHES +static bool8 SlotTask_CheckMatches(struct Task *task) { - sSlotMachine->luckyFlags &= (LUCKY_BIAS_777 | LUCKY_BIAS_MIXED_777); + sSlotMachine->machineBias &= (BIAS_STRAIGHT_7 | BIAS_MIXED_7); CheckMatch(); if (sSlotMachine->reelTimeSpinsLeft) { @@ -1370,21 +1490,21 @@ static bool8 SlotAction_CheckMatches(struct Task *task) sSlotMachine->reelTimeSpinsUsed++; } - if (sSlotMachine->matchedSymbols) + if (sSlotMachine->matches) { - sSlotMachine->state = SLOT_ACTION_WAIT_PAYOUT; + sSlotMachine->state = SLOTTASK_WAIT_PAYOUT; AwardPayout(); FlashSlotMachineLights(); if ((sSlotMachine->netCoinLoss -= sSlotMachine->payout) < 0) { sSlotMachine->netCoinLoss = 0; } - if (sSlotMachine->matchedSymbols & ((1 << MATCHED_777_BLUE) | (1 << MATCHED_777_RED))) + if (sSlotMachine->matches & ((1 << MATCH_BLUE_7) | (1 << MATCH_RED_7))) { PlayFanfare(MUS_SLOTS_JACKPOT); CreateDigitalDisplayScene(DIG_DISPLAY_BONUS_BIG); } - else if (sSlotMachine->matchedSymbols & (1 << MATCHED_777_MIXED)) + else if (sSlotMachine->matches & (1 << MATCH_MIXED_7)) { PlayFanfare(MUS_SLOTS_JACKPOT); CreateDigitalDisplayScene(DIG_DISPLAY_BONUS_REG); @@ -1394,212 +1514,212 @@ static bool8 SlotAction_CheckMatches(struct Task *task) PlayFanfare(MUS_SLOTS_WIN); CreateDigitalDisplayScene(DIG_DISPLAY_WIN); } - // if you matched 777... - if (sSlotMachine->matchedSymbols & ((1 << MATCHED_777_MIXED) | (1 << MATCHED_777_BLUE) | (1 << MATCHED_777_RED))) + + if (sSlotMachine->matches & ((1 << MATCH_MIXED_7) | (1 << MATCH_BLUE_7) | (1 << MATCH_RED_7))) { - sSlotMachine->luckyFlags &= ~(LUCKY_BIAS_777 | LUCKY_BIAS_MIXED_777); - if (sSlotMachine->matchedSymbols & ((1 << MATCHED_777_BLUE) | (1 << MATCHED_777_RED))) + sSlotMachine->machineBias &= ~(BIAS_STRAIGHT_7 | BIAS_MIXED_7); + if (sSlotMachine->matches & ((1 << MATCH_BLUE_7) | (1 << MATCH_RED_7))) { + // ReelTime ends if it was ongoing sSlotMachine->reelTimeSpinsLeft = 0; sSlotMachine->reelTimeSpinsUsed = 0; sSlotMachine->luckyGame = FALSE; - if (sSlotMachine->matchedSymbols & (1 << MATCHED_777_BLUE)) - // this may be an error, but if you get blue 777, the game becomes lucky + if (sSlotMachine->matches & (1 << MATCH_BLUE_7)) sSlotMachine->luckyGame = TRUE; } } - if (sSlotMachine->matchedSymbols & (1 << MATCHED_POWER) && sSlotMachine->pikaPower < 16) + if (sSlotMachine->matches & (1 << MATCH_POWER) && sSlotMachine->pikaPowerBolts < 16) { - sSlotMachine->pikaPower++; - AddPikaPowerBolt(sSlotMachine->pikaPower); + sSlotMachine->pikaPowerBolts++; + AddPikaPowerBolt(sSlotMachine->pikaPowerBolts); } } else { CreateDigitalDisplayScene(DIG_DISPLAY_LOSE); - sSlotMachine->state = SLOT_ACTION_NO_MATCHES; + sSlotMachine->state = SLOTTASK_NO_MATCHES; if ((sSlotMachine->netCoinLoss += sSlotMachine->bet) > MAX_COINS) sSlotMachine->netCoinLoss = MAX_COINS; } return FALSE; } -// SLOT_ACTION_WAIT_PAYOUT -static bool8 SlotAction_WaitForPayoutToBeAwarded(struct Task *task) +// SLOTTASK_WAIT_PAYOUT +static bool8 SlotTask_WaitPayout(struct Task *task) { - if (IsFinalTask_RunAwardPayoutActions()) - sSlotMachine->state = SLOT_ACTION_END_PAYOUT; + if (IsFinalTask_Task_Payout()) + sSlotMachine->state = SLOTTASK_END_PAYOUT; return FALSE; } -// SLOT_ACTION_END_PAYOUT -static bool8 SlotAction_EndPayout(struct Task *task) +// SLOTTASK_END_PAYOUT +static bool8 SlotTask_EndPayout(struct Task *task) { if (TryStopSlotMachineLights()) { - sSlotMachine->state = SLOT_ACTION_RESET_BET_TILES; + sSlotMachine->state = SLOTTASK_RESET_BET_TILES; - if (sSlotMachine->matchedSymbols & ((1 << MATCHED_777_RED) | (1 << MATCHED_777_BLUE))) + if (sSlotMachine->matches & ((1 << MATCH_RED_7) | (1 << MATCH_BLUE_7))) IncrementGameStat(GAME_STAT_SLOT_JACKPOTS); - if (sSlotMachine->matchedSymbols & (1 << MATCHED_REPLAY)) + if (sSlotMachine->matches & (1 << MATCH_REPLAY)) { - sSlotMachine->currReel = 0; - sSlotMachine->state = SLOT_ACTION_START_SPIN; + sSlotMachine->currentReel = LEFT_REEL; + sSlotMachine->state = SLOTTASK_START_SPIN; } - if (sSlotMachine->matchedSymbols & (1 << MATCHED_POWER)) - sSlotMachine->state = SLOT_ACTION_MATCHED_POWER; + if (sSlotMachine->matches & (1 << MATCH_POWER)) + sSlotMachine->state = SLOTTASK_MATCHED_POWER; - if (sSlotMachine->reelTimeSpinsLeft && sSlotMachine->matchedSymbols & (1 << MATCHED_REPLAY)) + if (sSlotMachine->reelTimeSpinsLeft && sSlotMachine->matches & (1 << MATCH_REPLAY)) { CreateDigitalDisplayScene(DIG_DISPLAY_REEL_TIME); - sSlotMachine->state = SLOT_ACTION_WAIT_RT_ANIM; + sSlotMachine->state = SLOTTASK_WAIT_RT_ANIM; } } return FALSE; } -// SLOT_ACTION_MATCHED_POWER -static bool8 SlotAction_MatchedPower(struct Task *task) +// SLOTTASK_MATCHED_POWER +static bool8 SlotTask_MatchedPower(struct Task *task) { if (!IsPikaPowerBoltAnimating()) { - sSlotMachine->state = SLOT_ACTION_RESET_BET_TILES; - if (sSlotMachine->matchedSymbols & (1 << MATCHED_REPLAY)) + sSlotMachine->state = SLOTTASK_RESET_BET_TILES; + if (sSlotMachine->matches & (1 << MATCH_REPLAY)) { - sSlotMachine->state = SLOT_ACTION_START_SPIN; + sSlotMachine->state = SLOTTASK_START_SPIN; if (sSlotMachine->reelTimeSpinsLeft) { CreateDigitalDisplayScene(DIG_DISPLAY_REEL_TIME); - sSlotMachine->state = SLOT_ACTION_WAIT_RT_ANIM; + sSlotMachine->state = SLOTTASK_WAIT_RT_ANIM; } } } return FALSE; } -// SLOT_ACTION_WAIT_RT_ANIM -static bool8 SlotAction_WaitReelTimeAnim(struct Task *task) +// SLOTTASK_WAIT_RT_ANIM +static bool8 SlotTask_WaitReelTimeAnim(struct Task *task) { if (IsDigitalDisplayAnimFinished()) { - sSlotMachine->state = SLOT_ACTION_RESET_BET_TILES; - if (sSlotMachine->matchedSymbols & (1 << MATCHED_REPLAY)) + sSlotMachine->state = SLOTTASK_RESET_BET_TILES; + if (sSlotMachine->matches & (1 << MATCH_REPLAY)) { - sSlotMachine->state = SLOT_ACTION_START_SPIN; + sSlotMachine->state = SLOTTASK_START_SPIN; } } return FALSE; } -// SLOT_ACTION_RESET_BET_TILES -static bool8 SlotAction_ResetBetTiles(struct Task *task) +// SLOTTASK_RESET_BET_TILES +static bool8 SlotTask_ResetBetTiles(struct Task *task) { DarkenBetTiles(0); DarkenBetTiles(1); DarkenBetTiles(2); - sSlotMachine->state = SLOT_ACTION_READY_NEW_SPIN; + sSlotMachine->state = SLOTTASK_READY_NEW_SPIN; return FALSE; } -// SLOT_ACTION_NO_MATCHES -static bool8 SlotAction_NoMatches(struct Task *task) +// SLOTTASK_NO_MATCHES +static bool8 SlotTask_NoMatches(struct Task *task) { - if (++task->data[1] > 64) + if (++task->tTimer2 > 64) { - task->data[1] = 0; - sSlotMachine->state = SLOT_ACTION_RESET_BET_TILES; + task->tTimer2 = 0; + sSlotMachine->state = SLOTTASK_RESET_BET_TILES; } return FALSE; } -// SLOT_ACTION_ASK_QUIT -static bool8 SlotAction_AskQuit(struct Task *task) +// SLOTTASK_ASK_QUIT +static bool8 SlotTask_AskQuit(struct Task *task) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_QuitTheGame, 0, 1, 0, 0); CopyWindowToVram(0, COPYWIN_FULL); CreateYesNoMenuParameterized(0x15, 7, 0x214, 0x180, 0xE, 0xF); - sSlotMachine->state = SLOT_ACTION_HANDLE_QUIT_INPUT; + sSlotMachine->state = SLOTTASK_HANDLE_QUIT_INPUT; return FALSE; } -// SLOT_ACTION_HANDLE_QUIT_INPUT -static bool8 SlotAction_HandleQuitInput(struct Task *task) +// SLOTTASK_HANDLE_QUIT_INPUT +static bool8 SlotTask_HandleQuitInput(struct Task *task) { s8 input = Menu_ProcessInputNoWrapClearOnChoose(); - if (input == 0) // player chooses to quit + if (input == 0) // Chose to quit { ClearDialogWindowAndFrame(0, TRUE); DarkenBetTiles(0); DarkenBetTiles(1); DarkenBetTiles(2); sSlotMachine->coins += sSlotMachine->bet; - sSlotMachine->state = SLOT_ACTION_END; + sSlotMachine->state = SLOTTASK_END; } - else if (input == 1 || input == -1) // player chooses not to quit + else if (input == 1 || input == -1) // Chose not to quit { ClearDialogWindowAndFrame(0, TRUE); - sSlotMachine->state = SLOT_ACTION_BET_INPUT; + sSlotMachine->state = SLOTTASK_BET_INPUT; } return FALSE; } -// SLOT_ACTION_MSG_MAX_COINS -static bool8 SlotAction_PrintMsg_9999Coins(struct Task *task) +// SLOTTASK_MSG_MAX_COINS +static bool8 SlotTask_PrintMsg_MaxCoins(struct Task *task) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouveGot9999Coins, 0, 1, 0, 0); CopyWindowToVram(0, COPYWIN_FULL); - sSlotMachine->state = SLOT_ACTION_WAIT_MSG_MAX_COINS; + sSlotMachine->state = SLOTTASK_WAIT_MSG_MAX_COINS; return FALSE; } -// SLOT_ACTION_WAIT_MSG_MAX_COINS -static bool8 SlotAction_WaitMsg_9999Coins(struct Task *task) +// SLOTTASK_WAIT_MSG_MAX_COINS +static bool8 SlotTask_WaitMsg_MaxCoins(struct Task *task) { if (JOY_NEW(A_BUTTON | B_BUTTON)) { ClearDialogWindowAndFrame(0, TRUE); - sSlotMachine->state = SLOT_ACTION_BET_INPUT; + sSlotMachine->state = SLOTTASK_BET_INPUT; } return FALSE; } -// SLOT_ACTION_MSG_NO_MORE_COINS -static bool8 SlotAction_PrintMsg_NoMoreCoins(struct Task *task) +// SLOTTASK_MSG_NO_MORE_COINS +static bool8 SlotTask_PrintMsg_NoMoreCoins(struct Task *task) { DrawDialogueFrame(0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouveRunOutOfCoins, 0, 1, 0, 0); CopyWindowToVram(0, COPYWIN_FULL); - sSlotMachine->state = SLOT_ACTION_WAIT_MSG_NO_MORE_COINS; + sSlotMachine->state = SLOTTASK_WAIT_MSG_NO_MORE_COINS; return FALSE; } -// SLOT_ACTION_WAIT_MSG_NO_MORE_COINS -static bool8 SlotAction_WaitMsg_NoMoreCoins(struct Task *task) +// SLOTTASK_WAIT_MSG_NO_MORE_COINS +static bool8 SlotTask_WaitMsg_NoMoreCoins(struct Task *task) { if (JOY_NEW(A_BUTTON | B_BUTTON)) { ClearDialogWindowAndFrame(0, TRUE); - sSlotMachine->state = SLOT_ACTION_END; + sSlotMachine->state = SLOTTASK_END; } return FALSE; } -// SLOT_ACTION_END -static bool8 SlotAction_EndGame(struct Task *task) +// SLOTTASK_END +static bool8 SlotTask_EndGame(struct Task *task) { SetCoins(sSlotMachine->coins); TryPutFindThatGamerOnAir(GetCoins()); BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0)); - sSlotMachine->state++; // SLOT_ACTION_FREE + sSlotMachine->state++; // SLOTTASK_FREE return FALSE; } -// SLOT_ACTION_FREE -static bool8 SlotAction_FreeDataStructures(struct Task *task) +// SLOTTASK_FREE +static bool8 SlotTask_FreeDataStructures(struct Task *task) { if (!gPaletteFade.active) { @@ -1640,93 +1760,129 @@ static bool8 SlotAction_FreeDataStructures(struct Task *task) return FALSE; } -static void DrawLuckyFlags(void) +# undef tTimer +# undef tTimer2 + +// Determine the biases for this round. There can be at most two biases, one of +// which would need to be a ReelTime bias. +// +// HOW IT WORKS: +// If the machine is already biased toward 7's, keep this bias. +// +// Otherwise, there are up to three draws. You first draw to see if you'll get +// to draw a Special bias. If so, then you draw for the Special bias (and can +// still potentially miss). +// +// If you didn't get to draw a Special bias, missed a Special bias, or drew a +// ReelTime bias, then you can still try to draw a Regular bias. +static void DrawMachineBias(void) { - u8 attempts; + u8 whichBias; if (sSlotMachine->reelTimeSpinsLeft == 0) { - if (!(sSlotMachine->luckyFlags & (LUCKY_BIAS_777 | LUCKY_BIAS_MIXED_777))) + // DO NOT SUBMIT until deleting this!!! Test code to see effects of + // power bolts on ReelTime. + // if ((Random() % 100) < 30) { + // sSlotMachine->machineBias = BIAS_REELTIME; + // } else { + // sSlotMachine->machineBias = BIAS_POWER; + // } + if (!(sSlotMachine->machineBias & (BIAS_STRAIGHT_7 | BIAS_MIXED_7))) { - if (IsThisRoundLucky()) + if (ShouldTrySpecialBias()) { - attempts = AttemptsAtLuckyFlags_Top3(); - if (attempts != ARRAY_COUNT(sLuckyFlagSettings_Top3)) // if you found a lucky number + whichBias = TrySelectBias_Special(); + if (whichBias != ARRAY_COUNT(sBiasesSpecial)) // A bias was selected { - // attempts == 1: reelTime flag set - sSlotMachine->luckyFlags |= sLuckyFlagSettings_Top3[attempts]; - if (attempts != 1) - return; + sSlotMachine->machineBias |= sBiasesSpecial[whichBias]; + + // ReelTime was not selected; don't add other biases + if (whichBias != 1) return; } } - // if it's not a lucky round or you got reel time, roll for the lower lucky flags - attempts = AttemptsAtLuckyFlags_NotTop3(); - if (attempts != ARRAY_COUNT(sLuckyFlagSettings_NotTop3)) // if you found a lucky number - sSlotMachine->luckyFlags |= sLuckyFlagSettings_NotTop3[attempts]; + + whichBias = TrySelectBias_Regular(); + if (whichBias != ARRAY_COUNT(sBiasesRegular)) // A bias was selected + sSlotMachine->machineBias |= sBiasesRegular[whichBias]; } } } -static void SetLuckySpins(void) +// Reset `didNotFailBias` to match `machineBias`. +static void ResetBiasFailure(void) { - sSlotMachine->isLuckySpin = FALSE; - if (sSlotMachine->luckyFlags) - sSlotMachine->isLuckySpin = TRUE; + sSlotMachine->didNotFailBias = FALSE; + if (sSlotMachine->machineBias) + sSlotMachine->didNotFailBias = TRUE; } -static u8 GetBiasTag(u8 luckyFlags) +// See sBiasTags for each bias's corresponding tag. +static u8 GetBiasTag(u8 machineBias) { u8 i; for (i = 0; i < 8; i++) { - if (luckyFlags & 1) + if (machineBias & 1) return sBiasTags[i]; - luckyFlags >>= 1; + machineBias >>= 1; } return 0; } -// you have way more luck betting 3 coins than anything lower -static bool8 IsThisRoundLucky(void) +// Decides whether you will be given the opportunity to draw for a Special bias. +// Depends on your bet and the machine you're using. +// +// The probability of getting to draw a Special is miniscule if you don't bet 3 +// coins: barely 1% even on the luckiest machine. +// +// The odds increase to roughly ~5% if you bet 3 coins. +static bool8 ShouldTrySpecialBias(void) { u8 rval = Random(); - if (sLuckyRoundProbabilities[sSlotMachine->machineId][sSlotMachine->bet - 1] > rval) + if (sSpecialDrawOdds[sSlotMachine->machineId][sSlotMachine->bet - 1] > rval) return TRUE; return FALSE; } -static u8 AttemptsAtLuckyFlags_Top3(void) +// Draws for a Special bias. Note that even when you're given the opportunity to +// draw a Special bias, you can still miss. +// +// On the luckiest machine, there's a 61% chance of drawing no Special bias. On +// the unluckiest, a 73% chance. +static u8 TrySelectBias_Special(void) { - s16 count; + s16 whichBias; - for (count = 0; count < (int)ARRAY_COUNT(sLuckyFlagSettings_Top3); count++) + for (whichBias = 0; whichBias < (int)ARRAY_COUNT(sBiasesSpecial); whichBias++) { s16 rval = Random() & 0xff; - s16 value = sLuckyFlagProbabilities_Top3[count][sSlotMachine->machineId]; + s16 value = sBiasProbabilities_Special[whichBias][sSlotMachine->machineId]; if (value > rval) break; } - return count; + return whichBias; } -static u8 AttemptsAtLuckyFlags_NotTop3(void) +static u8 TrySelectBias_Regular(void) { - s16 count; + s16 whichBias; - for (count = 0; count < (int)ARRAY_COUNT(sLuckyFlagSettings_NotTop3); count++) + for (whichBias = 0; whichBias < (int)ARRAY_COUNT(sBiasesRegular); whichBias++) { - s16 rval = Random() & 0xff; // random byte - s16 value = sLuckyFlagProbabilities_NotTop3[count][sSlotMachine->machineId]; - // make first attempt easier if it's a lucky game - if (count == 0 && sSlotMachine->luckyGame == TRUE) + s16 rval = Random() & 0xff; + s16 value = sBiasProbabilities_Regular[whichBias][sSlotMachine->machineId]; + + // Boost odds of BIAS_POWER if it's a lucky game. + if (whichBias == 0 && sSlotMachine->luckyGame == TRUE) { value += 10; if (value > 0x100) value = 0x100; } - // make last attempt harder if it's a lucky game - else if (count == 4 && sSlotMachine->luckyGame == TRUE) + // Reduce odds of BIAS_REPLAY if it's a lucky game + else if (whichBias == 4 && sSlotMachine->luckyGame == TRUE) { value -= 10; if (value < 0) @@ -1735,45 +1891,60 @@ static u8 AttemptsAtLuckyFlags_NotTop3(void) if (value > rval) break; } - return count; + return whichBias; } -static u8 GetReelTimeProbability(u8 reelTimeDraw) +// Return the probability of drawing the given number of ReelTime spins. +// +// This depends on whether it is a lucky game and the number of Power bolts you +// have collected. +static u8 GetReelTimeSpinProbability(u8 spins) { if (sSlotMachine->luckyGame == FALSE) - return sReeltimeProbabilities_UnluckyGame[reelTimeDraw][sSlotMachine->pikaPower]; + return sReelTimeProbabilities_NormalGame[spins][sSlotMachine->pikaPowerBolts]; else - return sReelTimeProbabilities_LuckyGame[reelTimeDraw][sSlotMachine->pikaPower]; + return sReelTimeProbabilities_LuckyGame[spins][sSlotMachine->pikaPowerBolts]; } -static void GetReeltimeDraw(void) +// The way this is computed skews the odds much more toward drawing a 0 than +// intended. It initially checks whether you draw a 0 (using the intended +// probability). It then tries to draw positive values, but if these draws all +// miss, you'll still draw a 0. +// +// As a result, even when the power gauge is maxed out, you still have a ~30% +// chance of drawing 0 spins. See sReelTimeProbabilities for more details. +// +// Drawing a random number via a cumulative pdf would have prevented this. +static void GetReelTimeDraw(void) { u8 rval; - s16 reelTimeDraw; + s16 spins; sSlotMachine->reelTimeDraw = 0; rval = Random(); - if (rval < GetReelTimeProbability(0)) + if (rval < GetReelTimeSpinProbability(0)) return; - for (reelTimeDraw = 5; reelTimeDraw > 0; reelTimeDraw--) + for (spins = 5; spins > 0; spins--) { rval = Random(); - if (rval < GetReelTimeProbability(reelTimeDraw)) + if (rval < GetReelTimeSpinProbability(spins)) break; } - sSlotMachine->reelTimeDraw = reelTimeDraw; + sSlotMachine->reelTimeDraw = spins; } -static bool8 ShouldReelTimeMachineExplode(u16 i) +// Returns true if the ReelTime machine should explode. Each time we check, +// the odds of explosion increase. +static bool8 ShouldReelTimeMachineExplode(u16 check) { u16 rval = Random() & 0xff; - if (rval < sReelTimeExplodeProbability[i]) + if (rval < sReelTimeExplodeProbability[check]) return TRUE; else return FALSE; } -static u16 SlowReelSpeed(void) +static u16 ReelTimeSpeed(void) { u8 i = 0; u8 rval; @@ -1786,20 +1957,23 @@ static u16 SlowReelSpeed(void) i = 2; else if (sSlotMachine->netCoinLoss >= 150) i = 1; + rval = Random() % 100; - value = sReelIncrementTable[i][0]; + value = sReelTimeSpeed_Probabilities[i][0]; if (rval < value) - return 4; + return REEL_HALF_SPEED; + rval = Random() % 100; - value = sReelIncrementTable[i][1] + sReelTimeBonusIncrementTable[sSlotMachine->reelTimeSpinsUsed]; + value = sReelTimeSpeed_Probabilities[i][1] + sQuarterSpeed_ProbabilityBoost[sSlotMachine->reelTimeSpinsUsed]; if (rval < value) - return 2; - return 8; + return REEL_QUARTER_SPEED; + + return REEL_NORMAL_SPEED; } static void CheckMatch(void) { - sSlotMachine->matchedSymbols = 0; + sSlotMachine->matches = 0; CheckMatch_CenterRow(); if (sSlotMachine->bet > 1) CheckMatch_TopAndBottom(); @@ -1809,140 +1983,146 @@ static void CheckMatch(void) static void CheckMatch_CenterRow(void) { - u8 c1, c2, c3, match; + u8 tag1, tag2, tag3, match; - c1 = GetTagAtRest(LEFT_REEL, 2); - c2 = GetTagAtRest(MIDDLE_REEL, 2); - c3 = GetTagAtRest(RIGHT_REEL, 2); - match = GetMatchFromSymbols(c1, c2, c3); - if (match != MATCHED_NONE) + tag1 = GetTagAtRest(LEFT_REEL, 2); + tag2 = GetTagAtRest(MIDDLE_REEL, 2); + tag3 = GetTagAtRest(RIGHT_REEL, 2); + match = GetMatchFromTags(tag1, tag2, tag3); + if (match != MATCH_NONE) { sSlotMachine->payout += sSlotPayouts[match]; - sSlotMachine->matchedSymbols |= sSlotMatchFlags[match]; - FlashMatchLine(MATCH_MIDDLE_ROW); + sSlotMachine->matches |= sSlotMatchFlags[match]; + FlashMatchLine(ROW_MIDDLE); } } static void CheckMatch_TopAndBottom(void) { - u8 c1, c2, c3, match; + u8 tag1, tag2, tag3, match; - c1 = GetTagAtRest(LEFT_REEL, 1); - c2 = GetTagAtRest(MIDDLE_REEL, 1); - c3 = GetTagAtRest(RIGHT_REEL, 1); - match = GetMatchFromSymbols(c1, c2, c3); - if (match != MATCHED_NONE) + tag1 = GetTagAtRest(LEFT_REEL, 1); + tag2 = GetTagAtRest(MIDDLE_REEL, 1); + tag3 = GetTagAtRest(RIGHT_REEL, 1); + match = GetMatchFromTags(tag1, tag2, tag3); + if (match != MATCH_NONE) { - if (match == MATCHED_1CHERRY) - match = MATCHED_2CHERRY; + if (match == MATCH_CHERRY) + match = MATCH_TOPBOT_CHERRY; sSlotMachine->payout += sSlotPayouts[match]; - sSlotMachine->matchedSymbols |= sSlotMatchFlags[match]; - FlashMatchLine(MATCH_TOP_ROW); + sSlotMachine->matches |= sSlotMatchFlags[match]; + FlashMatchLine(ROW_TOP); } - c1 = GetTagAtRest(LEFT_REEL, 3); - c2 = GetTagAtRest(MIDDLE_REEL, 3); - c3 = GetTagAtRest(RIGHT_REEL, 3); - match = GetMatchFromSymbols(c1, c2, c3); - if (match != MATCHED_NONE) + tag1 = GetTagAtRest(LEFT_REEL, 3); + tag2 = GetTagAtRest(MIDDLE_REEL, 3); + tag3 = GetTagAtRest(RIGHT_REEL, 3); + match = GetMatchFromTags(tag1, tag2, tag3); + if (match != MATCH_NONE) { - if (match == MATCHED_1CHERRY) - match = MATCHED_2CHERRY; + if (match == MATCH_CHERRY) + match = MATCH_TOPBOT_CHERRY; sSlotMachine->payout += sSlotPayouts[match]; - sSlotMachine->matchedSymbols |= sSlotMatchFlags[match]; - FlashMatchLine(MATCH_BOTTOM_ROW); + sSlotMachine->matches |= sSlotMatchFlags[match]; + FlashMatchLine(ROW_BOTTOM); } } static void CheckMatch_Diagonals(void) { - u8 c1, c2, c3, match; + u8 tag1, tag2, tag3, match; - c1 = GetTagAtRest(LEFT_REEL, 1); - c2 = GetTagAtRest(MIDDLE_REEL, 2); - c3 = GetTagAtRest(RIGHT_REEL, 3); - match = GetMatchFromSymbols(c1, c2, c3); - if (match != MATCHED_NONE) + tag1 = GetTagAtRest(LEFT_REEL, 1); + tag2 = GetTagAtRest(MIDDLE_REEL, 2); + tag3 = GetTagAtRest(RIGHT_REEL, 3); + match = GetMatchFromTags(tag1, tag2, tag3); + if (match != MATCH_NONE) { - if (match != MATCHED_1CHERRY) + // Don't add payout for cherry, since it's already counted in + // CheckMatch_TopAndBottom(). + if (match != MATCH_CHERRY) { sSlotMachine->payout += sSlotPayouts[match]; - sSlotMachine->matchedSymbols |= sSlotMatchFlags[match]; + sSlotMachine->matches |= sSlotMatchFlags[match]; } - FlashMatchLine(MATCH_NWSE_DIAG); + FlashMatchLine(ROW_DIAG_NWSE); } - c1 = GetTagAtRest(LEFT_REEL, 3); - c2 = GetTagAtRest(MIDDLE_REEL, 2); - c3 = GetTagAtRest(RIGHT_REEL, 1); - match = GetMatchFromSymbols(c1, c2, c3); - if (match != MATCHED_NONE) + tag1 = GetTagAtRest(LEFT_REEL, 3); + tag2 = GetTagAtRest(MIDDLE_REEL, 2); + tag3 = GetTagAtRest(RIGHT_REEL, 1); + match = GetMatchFromTags(tag1, tag2, tag3); + if (match != MATCH_NONE) { - if (match != MATCHED_1CHERRY) + // Don't add payout for cherry, since it's already counted in + // CheckMatch_TopAndBottom(). + if (match != MATCH_CHERRY) { sSlotMachine->payout += sSlotPayouts[match]; - sSlotMachine->matchedSymbols |= sSlotMatchFlags[match]; + sSlotMachine->matches |= sSlotMatchFlags[match]; } - FlashMatchLine(MATCH_NESW_DIAG); + FlashMatchLine(ROW_DIAG_NESW); } } -static u8 GetMatchFromSymbols(u8 c1, u8 c2, u8 c3) +static u8 GetMatchFromTags(u8 tag1, u8 tag2, u8 tag3) { - if (c1 == c2 && c1 == c3) - return sSymToMatch[c1]; - if (c1 == GFXTAG_7_RED && c2 == GFXTAG_7_RED && c3 == GFXTAG_7_BLUE) - return MATCHED_777_MIXED; - if (c1 == GFXTAG_7_BLUE && c2 == GFXTAG_7_BLUE && c3 == GFXTAG_7_RED) - return MATCHED_777_MIXED; - if (c1 == GFXTAG_CHERRY) - return MATCHED_1CHERRY; - return MATCHED_NONE; + if (tag1 == tag2 && tag1 == tag3) + return sTagToMatch[tag1]; + if (tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) + return MATCH_MIXED_7; + if (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) + return MATCH_MIXED_7; + if (tag1 == GFXTAG_CHERRY) + return MATCH_CHERRY; + return MATCH_NONE; } static void AwardPayout(void) { - RunAwardPayoutActions(CreateTask(RunAwardPayoutActions, 4)); + Task_Payout(CreateTask(Task_Payout, 4)); } -static bool8 IsFinalTask_RunAwardPayoutActions(void) +static bool8 IsFinalTask_Task_Payout(void) { - if (FindTaskIdByFunc(RunAwardPayoutActions) == TAIL_SENTINEL) + if (FindTaskIdByFunc(Task_Payout) == TAIL_SENTINEL) return TRUE; else return FALSE; } -static void RunAwardPayoutActions(u8 taskId) +static void Task_Payout(u8 taskId) { - while (sAwardPayoutActions[gTasks[taskId].data[0]](&gTasks[taskId])) + while (sPayoutTasks[gTasks[taskId].data[0]](&gTasks[taskId])) ; } -static bool8 AwardPayoutAction0(struct Task *task) +#define tState data[0] +#define tTimer data[1] + +static bool8 PayoutTask_Init(struct Task *task) { if (IsMatchLineDoneFlashingBeforePayout()) { - task->data[0]++; + task->tState++; // PAYOUT_TASK_GIVE_PAYOUT if (sSlotMachine->payout == 0) { - task->data[0] = 2; + task->tState = PAYOUT_TASK_FREE; return TRUE; } } return FALSE; } -// task->data[1]: timer -static bool8 AwardPayoutAction_GivePayoutToPlayer(struct Task *task) +static bool8 PayoutTask_GivePayout(struct Task *task) { - if (!task->data[1]--) + if (!task->tTimer--) { if (IsFanfareTaskInactive()) PlaySE(SE_PIN); sSlotMachine->payout--; if (sSlotMachine->coins < MAX_COINS) sSlotMachine->coins++; - task->data[1] = 8; + task->tTimer = 8; if (JOY_HELD(A_BUTTON)) - task->data[1] = 4; + task->tTimer = 4; } if (IsFanfareTaskInactive() && JOY_NEW(START_BUTTON)) { @@ -1953,17 +2133,20 @@ static bool8 AwardPayoutAction_GivePayoutToPlayer(struct Task *task) sSlotMachine->payout = 0; } if (sSlotMachine->payout == 0) - task->data[0]++; + task->tState++; // PAYOUT_TASK_FREE return FALSE; } -static bool8 AwardPayoutAction_FreeTask(struct Task *task) +static bool8 PayoutTask_Free(struct Task *task) { if (TryStopMatchLinesFlashing()) - DestroyTask(FindTaskIdByFunc(RunAwardPayoutActions)); + DestroyTask(FindTaskIdByFunc(Task_Payout)); return FALSE; } +#undef tState +#undef tTimer + // Get the tag at position `offset` below the top of the reel's tape. Note that // if `offset` is negative, it wraps around to the bottom of the tape. // .-----------------. @@ -1978,46 +2161,48 @@ static bool8 AwardPayoutAction_FreeTask(struct Task *task) // .-----------------. static u8 GetTagAtRest(u8 reel, s16 offset) { - s16 pos = (sSlotMachine->reelPositions[reel] + offset) % SYMBOLS_PER_REEL; + s16 pos = (sSlotMachine->reelPositions[reel] + offset) % TAGS_PER_REEL; if (pos < 0) - pos += SYMBOLS_PER_REEL; - return sReelSymbolTileTags[reel][pos]; + pos += TAGS_PER_REEL; + return sReelTileTags[reel][pos]; } // Calculates GetTagAtRest as if the reel were snapped downwards into place. static u8 GetTag(u8 reel, s16 offset) { s16 inc = 0; - s16 pixelOffset = sSlotMachine->reelPixelOffsets[reel] % REEL_SYMBOL_HEIGHT; + s16 pixelOffset = sSlotMachine->reelPixelOffsets[reel] % TAG_HEIGHT; if (pixelOffset != 0) inc = -1; return GetTagAtRest(reel, offset + inc); } -static u8 GetNearbyReelTimeTag(s16 n) +static u8 GetReelTimeTag(s16 offset) { - s16 newPosition = (sSlotMachine->reeltimePosition + n) % 6; + s16 newPosition = (sSlotMachine->reeltimePosition + offset) % REELTIME_TAGS; if (newPosition < 0) - newPosition += 6; + newPosition += REELTIME_TAGS; return sReelTimeTags[newPosition]; } static void AdvanceSlotReel(u8 reelIndex, s16 value) { sSlotMachine->reelPixelOffsets[reelIndex] += value; - sSlotMachine->reelPixelOffsets[reelIndex] %= 504; - sSlotMachine->reelPositions[reelIndex] = SYMBOLS_PER_REEL - sSlotMachine->reelPixelOffsets[reelIndex] / REEL_SYMBOL_HEIGHT; + sSlotMachine->reelPixelOffsets[reelIndex] %= REEL_HEIGHT; + sSlotMachine->reelPositions[reelIndex] = TAGS_PER_REEL - sSlotMachine->reelPixelOffsets[reelIndex] / TAG_HEIGHT; } +// Advances the reel no further than the next tag. Returns the remaining pixels +// until the next tag. s16 AdvanceSlotReelToNextTag(u8 reelIndex, s16 value) { - s16 offset = sSlotMachine->reelPixelOffsets[reelIndex] % REEL_SYMBOL_HEIGHT; + s16 offset = sSlotMachine->reelPixelOffsets[reelIndex] % TAG_HEIGHT; if (offset != 0) { if (offset < value) value = offset; AdvanceSlotReel(reelIndex, value); - offset = sSlotMachine->reelPixelOffsets[reelIndex] % REEL_SYMBOL_HEIGHT; + offset = sSlotMachine->reelPixelOffsets[reelIndex] % TAG_HEIGHT; } return offset; } @@ -2025,48 +2210,53 @@ s16 AdvanceSlotReelToNextTag(u8 reelIndex, s16 value) static void AdvanceReeltimeReel(s16 value) { sSlotMachine->reeltimePixelOffset += value; - sSlotMachine->reeltimePixelOffset %= 120; - sSlotMachine->reeltimePosition = 6 - sSlotMachine->reeltimePixelOffset / 20; + sSlotMachine->reeltimePixelOffset %= REELTIME_REEL_HEIGHT; + sSlotMachine->reeltimePosition = REELTIME_TAGS - sSlotMachine->reeltimePixelOffset / REELTIME_TAG_HEIGHT; } +// Advances the reel no further than the next tag. Returns the remaining pixels +// until the next tag. s16 AdvanceReeltimeReelToNextTag(s16 value) { - s16 offset = sSlotMachine->reeltimePixelOffset % 20; + s16 offset = sSlotMachine->reeltimePixelOffset % REELTIME_TAG_HEIGHT; if (offset != 0) { if (offset < value) value = offset; AdvanceReeltimeReel(value); - offset = sSlotMachine->reeltimePixelOffset % 20; + offset = sSlotMachine->reeltimePixelOffset % REELTIME_TAG_HEIGHT; } return offset; } -#define tState data[0] -#define tMoving data[14] -#define tReelId data[15] +#define tState data[0] +#define tExtraTurns data[1] +#define tShockMagnitude data[1] +#define tTimer data[2] +#define tMoving data[14] +#define tReelId data[15] -static void CreateSlotReelTasks(void) +static void CreateReelTasks(void) { u8 i; for (i = 0; i < NUM_REELS; i++) { - u8 taskId = CreateTask(Task_RunSlotReelActions, 2); + u8 taskId = CreateTask(Task_Reel, 2); gTasks[taskId].tReelId = i; sSlotMachine->slotReelTasks[i] = taskId; - Task_RunSlotReelActions(taskId); + Task_Reel(taskId); } } static void SpinSlotReel(u8 reelIndex) { - gTasks[sSlotMachine->slotReelTasks[reelIndex]].tState = REEL_ACTION_SPIN; + gTasks[sSlotMachine->slotReelTasks[reelIndex]].tState = REEL_TASK_SPIN; gTasks[sSlotMachine->slotReelTasks[reelIndex]].tMoving = TRUE; } static void StopSlotReel(u8 reelIndex) { - gTasks[sSlotMachine->slotReelTasks[reelIndex]].tState = REEL_ACTION_STOP; + gTasks[sSlotMachine->slotReelTasks[reelIndex]].tState = REEL_TASK_DECIDE_STOP; } static bool8 IsSlotReelMoving(u8 reelIndex) @@ -2074,100 +2264,118 @@ static bool8 IsSlotReelMoving(u8 reelIndex) return gTasks[sSlotMachine->slotReelTasks[reelIndex]].tMoving; } -static void Task_RunSlotReelActions(u8 taskId) +static void Task_Reel(u8 taskId) { - while (sSlotReelActions[gTasks[taskId].tState](&gTasks[taskId])) + while (sReelTasks[gTasks[taskId].tState](&gTasks[taskId])) ; } -// task->data[1] reel turns -static bool8 SlotReelAction_StayStill(struct Task *task) +static bool8 ReelTask_StayStill(struct Task *task) { return FALSE; } -static bool8 SlotReelAction_Spin(struct Task *task) +static bool8 ReelTask_Spin(struct Task *task) { - AdvanceSlotReel(task->tReelId, sSlotMachine->reelIncrement); + AdvanceSlotReel(task->tReelId, sSlotMachine->reelSpeed); return FALSE; } -// As in previous generations, the slot machine often doesn't stop exactly when you press stop -static bool8 SlotReelAction_DecideWhereToStop(struct Task *task) +// In ReelTime, the reel stops immediately. Otherwise, the game may manipulate +// the results by stopping after at most 4 extra turns. The exact behavior +// differs depending on whether the machine has a bias. +// +// If the machine has a bias, it will try to match the bias tag in each reel. +// +// Otherwise, if the machine doesn't have a bias or it could not line up the +// bias tag in any of the previous reels, it will perform the NoBias stopping +// routine, which manipulates the outcome so the player loses. +static bool8 ReelTask_DecideStop(struct Task *task) { - task->tState++; - // initialize data for that reel --> these will be changed if sBiasTags can be lined up + task->tState++; // REEL_TASK_STOP_MOVE sSlotMachine->winnerRows[task->tReelId] = 0; sSlotMachine->reelExtraTurns[task->tReelId] = 0; - if (sSlotMachine->reelTimeSpinsLeft == 0 && (sSlotMachine->luckyFlags == 0 || !sSlotMachine->isLuckySpin || !sDecideReelTurns_BiasTag[task->tReelId]())) + if (sSlotMachine->reelTimeSpinsLeft == 0) { - sSlotMachine->isLuckySpin = FALSE; - sDecideReelTurns_NoBiasTag[task->tReelId](); + if (sSlotMachine->machineBias == 0 || !sSlotMachine->didNotFailBias || !sDecideStop_Bias[task->tReelId]()) + { + sSlotMachine->didNotFailBias = FALSE; + sDecideStop_NoBias[task->tReelId](); + } } - task->data[1] = sSlotMachine->reelExtraTurns[task->tReelId]; + task->tExtraTurns = sSlotMachine->reelExtraTurns[task->tReelId]; return TRUE; } -// go to next tag and then do any additional turns -static bool8 SlotReelAction_MoveToStop(struct Task *task) +// Go to the next tag, then add any extra turns. +static bool8 ReelTask_MoveToStop(struct Task *task) { u16 reelStopShocks[ARRAY_COUNT(sReelStopShocks)]; s16 reelPixelPos; memcpy(reelStopShocks, sReelStopShocks, sizeof(sReelStopShocks)); - reelPixelPos = sSlotMachine->reelPixelOffsets[task->tReelId] % REEL_SYMBOL_HEIGHT; + reelPixelPos = sSlotMachine->reelPixelOffsets[task->tReelId] % TAG_HEIGHT; if (reelPixelPos != 0) - reelPixelPos = AdvanceSlotReelToNextTag(task->tReelId, sSlotMachine->reelIncrement); + reelPixelPos = AdvanceSlotReelToNextTag(task->tReelId, sSlotMachine->reelSpeed); else if (sSlotMachine->reelExtraTurns[task->tReelId]) { sSlotMachine->reelExtraTurns[task->tReelId]--; - AdvanceSlotReel(task->tReelId, sSlotMachine->reelIncrement); - reelPixelPos = sSlotMachine->reelPixelOffsets[task->tReelId] % REEL_SYMBOL_HEIGHT; + AdvanceSlotReel(task->tReelId, sSlotMachine->reelSpeed); + reelPixelPos = sSlotMachine->reelPixelOffsets[task->tReelId] % TAG_HEIGHT; } + if (reelPixelPos == 0 && sSlotMachine->reelExtraTurns[task->tReelId] == 0) { - task->tState++; - task->data[1] = reelStopShocks[task->data[1]]; - task->data[2] = 0; + task->tState++; // REEL_ACTION_STOP_SHAKE + task->tShockMagnitude = reelStopShocks[task->tExtraTurns]; + task->tTimer = 0; } return FALSE; } -// make selected tag oscillate before it becomes still -static bool8 SlotReelAction_OscillatingStop(struct Task *task) +// The reel shakes a little at the selected tag before settling. +static bool8 ReelTask_ShakingStop(struct Task *task) { - sSlotMachine->reelPixelOffsetsWhileStopping[task->tReelId] = task->data[1]; - task->data[1] = -task->data[1]; - task->data[2]++; - if ((task->data[2] & 0x3) == 0) - task->data[1] >>= 1; - if (task->data[1] == 0) + sSlotMachine->reelShockOffsets[task->tReelId] = task->tShockMagnitude; + task->tShockMagnitude = -task->tShockMagnitude; + task->tTimer++; + if ((task->tTimer & 0x3) == 0) + task->tShockMagnitude >>= 1; + if (task->tShockMagnitude == 0) { task->tState = 0; task->tMoving = FALSE; - sSlotMachine->reelPixelOffsetsWhileStopping[task->tReelId] = 0; + sSlotMachine->reelShockOffsets[task->tReelId] = 0; } return FALSE; } #undef tState +#undef tExtraTurns +#undef tShockMagnitude +#undef tTimer #undef tMoving #undef tReelId -static bool8 DecideReelTurns_BiasTag_Reel1(void) +// We pass along two tags to bias toward. If the machine is biased toward 7's, +// we pass both the 7 tags. Otherwise, we just pass the bias tag twice. +static bool8 DecideStop_Bias_Reel1(void) { - u8 tag2 = GetBiasTag(sSlotMachine->luckyFlags); + u8 tag2 = GetBiasTag(sSlotMachine->machineBias); u8 tag1 = tag2; - if (sSlotMachine->luckyFlags & (LUCKY_BIAS_777 | LUCKY_BIAS_MIXED_777)) + if (sSlotMachine->machineBias & (BIAS_STRAIGHT_7 | BIAS_MIXED_7)) { tag1 = GFXTAG_7_RED; tag2 = GFXTAG_7_BLUE; } - return sDecideReelTurns_BiasTag_Reel1_Bets[sSlotMachine->bet - 1](tag1, tag2); + return sDecideStop_Bias_Reel1_Bets[sSlotMachine->bet - 1](tag1, tag2); } -static bool8 AreTagsAtPosition_Reel1(s16 pos, u8 tag1, u8 tag2) +// The biasTag for subsequent reels is determined based on which of the bias +// tags can be found in reel 1. This really only matters when the machine is +// biased toward 7's. It will try to match a 7 of the same color as reel 1. +static bool8 EitherTagAtPos_Reel1(s16 pos, u8 tag1, u8 tag2) { u8 tag = GetTag(LEFT_REEL, pos); if (tag == tag1 || tag == tag2) @@ -2178,52 +2386,77 @@ static bool8 AreTagsAtPosition_Reel1(s16 pos, u8 tag1, u8 tag2) return FALSE; } -static bool8 AreCherriesOnScreen_Reel1(s16 offsetFromCenter) +// Returns true if there are cherries on screen in reel 1 after the given number +// of turns. +static bool8 AreCherriesOnScreen_Reel1(s16 turns) { - if (GetTag(LEFT_REEL, 1 - offsetFromCenter) == GFXTAG_CHERRY - || GetTag(LEFT_REEL, 2 - offsetFromCenter) == GFXTAG_CHERRY - || GetTag(LEFT_REEL, 3 - offsetFromCenter) == GFXTAG_CHERRY) + if (GetTag(LEFT_REEL, 1 - turns) == GFXTAG_CHERRY || + GetTag(LEFT_REEL, 2 - turns) == GFXTAG_CHERRY || + GetTag(LEFT_REEL, 3 - turns) == GFXTAG_CHERRY) return TRUE; else return FALSE; } -static bool8 IsBiasTowardsCherryOr7s(void) +static bool8 BiasedTowardCherryOr7s(void) { - if (sSlotMachine->luckyFlags & (LUCKY_BIAS_777 | LUCKY_BIAS_MIXED_777 | LUCKY_BIAS_CHERRY)) + if (sSlotMachine->machineBias & (BIAS_STRAIGHT_7 | BIAS_MIXED_7 | BIAS_CHERRY)) return TRUE; else return FALSE; } -static bool8 DecideReelTurns_BiasTag_Reel1_Bet1(u8 tag1, u8 tag2) +// If a biased tag appears in the center of reel 1 within the next 4 turns, stop +// there. That tag becomes the biasTag for the subsequent reels. +static bool8 DecideStop_Bias_Reel1_Bet1(u8 tag1, u8 tag2) { s16 i; - for (i = 0; i < 5; i++) + for (i = 0; i <= 4; i++) { - // if a lucky tag appears in the center row within 4 turns - if (AreTagsAtPosition_Reel1(2 - i, tag1, tag2)) + if (EitherTagAtPos_Reel1(2 - i, tag1, tag2)) { sSlotMachine->winnerRows[LEFT_REEL] = 2; - sSlotMachine->reelExtraTurns[0] = i; + sSlotMachine->reelExtraTurns[LEFT_REEL] = i; return TRUE; } } return FALSE; } -static bool8 DecideReelTurns_BiasTag_Reel1_Bet2or3(u8 tag1, u8 tag2) +// There is slightly different behavior depending on the machine's bias. +// +// Bias toward cherry or 7s: +// - Check if a cherry or 7 is currently on screen. If so, stop immediately. +// - Roll up to 4 extra turns to see if a cherry or 7 enters the screen: +// - If it enters after 1 turn, stop the reel when it gets the bottom row. +// - Otherwise, if it enters before the 4th turn, stop the reel when it gets +// to the middle row. +// - If it enters on the 4th turn, stop here. It will be in the top row. +// +// Other bias: +// - This is very similar, except the game is checking for the bias tag rather +// than cherries / 7s. +// +// However, the game adds an additional constraint: it will not stop if there +// will be any cherries on screen. Presumably, this ensures that you will not +// get any matches if you fail to line up the bias tag in the remaining +// reels. +// +// This is programmed in such a way that it excludes more options than +// necessary. If there are cherries in the two positions below the bias tag, +// it will skip over this option, even if those cherries would not have ended +// up on screen. +static bool8 DecideStop_Bias_Reel1_Bet2or3(u8 tag1, u8 tag2) { s16 i; - bool8 biased = IsBiasTowardsCherryOr7s(); - // if lucky numbers or no cherries are currently on screen in reel 1... - if (biased || !AreCherriesOnScreen_Reel1(0)) + bool8 cherry7Bias = BiasedTowardCherryOr7s(); + if (cherry7Bias || !AreCherriesOnScreen_Reel1(0)) { - for (i = 1; i < 4; i++) + // Check the current screen + for (i = 1; i <= 3; i++) { - // if a bias tag is currently on the screen - if (AreTagsAtPosition_Reel1(i, tag1, tag2)) + if (EitherTagAtPos_Reel1(i, tag1, tag2)) { sSlotMachine->winnerRows[0] = i; sSlotMachine->reelExtraTurns[0] = 0; @@ -2231,30 +2464,27 @@ static bool8 DecideReelTurns_BiasTag_Reel1_Bet2or3(u8 tag1, u8 tag2) } } } - for (i = 1; i < 5; i++) + + // Check the next 4 turns + for (i = 1; i <= 4; i++) { - bool8 biasedCopy = biased; // redundant - // if biased or if in the next 4 turns there is a screen with no cherries... - if (biasedCopy || !AreCherriesOnScreen_Reel1(i)) + bool8 cherry7BiasCopy = cherry7Bias; // redundant + if (cherry7BiasCopy || !AreCherriesOnScreen_Reel1(i)) { - //...and if a bias tag is in top row of that screen - if (AreTagsAtPosition_Reel1(1 - i, tag1, tag2)) + if (EitherTagAtPos_Reel1(1 - i, tag1, tag2)) { - //...and if it only took 1 turn and the lucky tag could also be the bottom row of a screen with no cherries... - if (i == 1 && (biasedCopy || !AreCherriesOnScreen_Reel1(3))) + if (i == 1 && (cherry7BiasCopy || !AreCherriesOnScreen_Reel1(3))) { sSlotMachine->winnerRows[0] = 3; sSlotMachine->reelExtraTurns[0] = 3; return TRUE; } - //...or if it isn't the last turn and the lucky tag could be in the center row of a screen with no cherries... - if (i < 4 && (biasedCopy || !AreCherriesOnScreen_Reel1(i + 1))) + if (i <= 3 && (cherry7BiasCopy || !AreCherriesOnScreen_Reel1(i + 1))) { sSlotMachine->winnerRows[0] = 2; sSlotMachine->reelExtraTurns[0] = i + 1; return TRUE; } - //...else sSlotMachine->winnerRows[0] = 1; sSlotMachine->reelExtraTurns[0] = i; return TRUE; @@ -2264,22 +2494,23 @@ static bool8 DecideReelTurns_BiasTag_Reel1_Bet2or3(u8 tag1, u8 tag2) return FALSE; } -static bool8 DecideReelTurns_BiasTag_Reel2(void) +static bool8 DecideStop_Bias_Reel2(void) { - return sDecideReelTurns_BiasTag_Reel2_Bets[sSlotMachine->bet - 1](); + return sDecideStop_Bias_Reel2_Bets[sSlotMachine->bet - 1](); } -static bool8 DecideReelTurns_BiasTag_Reel2_Bet1or2(void) +// Turn at most 4 extra turns to try to line up the bias tag in the same row as +// reel 1. +static bool8 DecideStop_Bias_Reel2_Bet1or2(void) { s16 i; - s16 biasTagLocation_Reel1 = sSlotMachine->winnerRows[0]; + s16 reel1BiasRow = sSlotMachine->winnerRows[0]; - for (i = 0; i < 5; i++) + for (i = 0; i <= 4; i++) { - // if biasTag appears in the same row within 4 turns - if (GetTag(MIDDLE_REEL, biasTagLocation_Reel1 - i) == sSlotMachine->biasTag) + if (GetTag(MIDDLE_REEL, reel1BiasRow - i) == sSlotMachine->biasTag) { - sSlotMachine->winnerRows[1] = biasTagLocation_Reel1; + sSlotMachine->winnerRows[1] = reel1BiasRow; sSlotMachine->reelExtraTurns[1] = i; return TRUE; } @@ -2287,18 +2518,79 @@ static bool8 DecideReelTurns_BiasTag_Reel2_Bet1or2(void) return FALSE; } -static bool8 DecideReelTurns_BiasTag_Reel2_Bet3(void) +// Checks whether it can match the bias tag diagonally, and sometimes skews +// toward this type of match rather than a match straight across. +// +// The behavior is different depending on where the bias tag landed in reel 1: +// +// Landed in middle row: +// A diagonal match is impossible. Just try to match the bias tag in the +// middle row of reel 2 within 4 turns. +// +// Landed in top/bottom row: +// - If it would take 2 or 3 turns to get the bias tag into the same row as +// reel 1, force a diagonal match by stopping it in the middle row instead. +// - Check if the bias tag is already in the same row as reel 1, or if it takes +// 1 or 4 turns to get it there. If so, stop when it reaches that row. +// - Otherwise, check if the bias tag is already in the middle row of reel 2. +// If so, stop here. +// +// So in how many more cases would betting 3 coins let you win compared to +// betting 2? +// Not many. Most of the time, the game would have matched the tag in the same +// row as reel 1 if you had bet 2 coins. Betting 3 effectively adds coverage +// for only two additional cases: +// - Bias tag is in top row of reel 1 and bias tag is currently in middle row +// of reel 2. +// - Bias tag is in bottom row of reel 1 and bias tag could get to the middle +// row of reel 2 in 4 turns. +// +// Assuming this is the implementation Game Freak intended, the game effectively +// turns straight matches into diagonal matches with 2/5 probability. +// Presumably, this makes the player feel fortunate that they bet 3 coins rather +// than 2, even though most times the game would have still forced a match with +// only 2 coins. +static bool8 DecideStop_Bias_Reel2_Bet3(void) { s16 i; - // if biasTag appears in the same row within 4 turns... - if (DecideReelTurns_BiasTag_Reel2_Bet1or2()) + // If you can line up the bias tag in the same row as reel 1 within 4 turns + if (DecideStop_Bias_Reel2_Bet1or2()) { - //...and if the biasTag is not in middle row of reel 1 and if biasTag appears in middle row of reel 2 in 2 or 3 turns... + // DO NOT SUBMIT until cleaning up this long-winded musing on Game + // Freak's choices... + // + // QUESTION: Why is the 2-3 turn requirement in place?? That leaves out + // some potential middle row matches. E.g., + // - Bias tag in top of reel 1 and it takes 1 turn to get it in the top + // of reel 2 + // - Bias tag in bottom row of reel 1 and it takes 4 turns to get it in + // the bottom row of reel 2 + // * In both cases above, it would have been possible to get the bias + // tag in the middle row of reel 2, but we aren't considering it... + // It'll just be matched in the same row instead + // + // The exact intent is a bit unclear. It could either be: + // 1. Skewing toward a diagonal match rather than a straight match with + // 2/5 probability. + // 2. A programming error: They meant to guard against scenarios where a + // match in the middle is impossible within 4 turns. E.g., + // - Bias tag in top of reel 1 and it would take 5 turns to get it + // to match in the middle of reel 2 + // - Bias tag in bottom of reel 1 and bias tag is currently in + // bottom of reel 2 + // But if this were the case, you would expect the inequality to be + // sSlotMachine->reelExtraTurns[1] >= 1 ... + // * I'll give them the benefit of the doubt and assume it was (1). + // After all, the fact that they then check whether it's even + // possible to match in the middle makes (2) redundant. + // + // If bias tag is not in the middle row of reel 1 and it takes either + // 2 or 3 turns to get it in the same row for reel 2 if (sSlotMachine->winnerRows[0] != 2 && sSlotMachine->reelExtraTurns[1] > 1 && sSlotMachine->reelExtraTurns[1] != 4) { - for (i = 0; i < 5; i++) + // Try to match the bias tag in middle row of reel 2 within 4 turns + for (i = 0; i <= 4; i++) { - //...and if the bias tag will appear in the middle row within 4 turns if (GetTag(MIDDLE_REEL, 2 - i) == sSlotMachine->biasTag) { sSlotMachine->winnerRows[1] = 2; @@ -2309,12 +2601,15 @@ static bool8 DecideReelTurns_BiasTag_Reel2_Bet3(void) } return TRUE; } - // else if the biasTag is not in middle row of reel 1... + + // If you can't line up the bias tag in the same row in 4 turns, and the + // bias tag is not in the middle row of reel 1. Adds coverage for the two + // cases mentioned above. if (sSlotMachine->winnerRows[0] != 2) { - for (i = 0; i < 5; i++) + // Try to match the bias tag in middle row of reel 2 within 4 turns + for (i = 0; i <= 4; i++) { - //...and if the biasTag will appear in the center row of reel 2 within 4 turns if (GetTag(MIDDLE_REEL, 2 - i) == sSlotMachine->biasTag) { sSlotMachine->winnerRows[1] = 2; @@ -2326,10 +2621,12 @@ static bool8 DecideReelTurns_BiasTag_Reel2_Bet3(void) return FALSE; } -static bool8 DecideReelTurns_BiasTag_Reel3(void) +// If the machine is biased toward mixed 7's, swap the color of the bias tag +// from red 7 to blue 7, or vice versa. +static bool8 DecideStop_Bias_Reel3(void) { u8 biasTag = sSlotMachine->biasTag; - if (sSlotMachine->luckyFlags & LUCKY_BIAS_MIXED_777) + if (sSlotMachine->machineBias & BIAS_MIXED_7) { biasTag = GFXTAG_7_RED; if (sSlotMachine->biasTag == GFXTAG_7_RED) @@ -2337,20 +2634,21 @@ static bool8 DecideReelTurns_BiasTag_Reel3(void) biasTag = GFXTAG_7_BLUE; } } - return sDecideReelTurns_BiasTag_Reel3_Bets[sSlotMachine->bet - 1](biasTag); + return sDecideStop_Bias_Reel3_Bets[sSlotMachine->bet - 1](biasTag); } -static bool8 DecideReelTurns_BiasTag_Reel3_Bet1or2(u8 biasTag) +// Turn at most 4 extra turns to try to line up the bias tag in the same row as +// reel 2. +static bool8 DecideStop_Bias_Reel3_Bet1or2(u8 biasTag) { s16 i; - s16 biasTagLocation_Reel2 = sSlotMachine->winnerRows[1]; + s16 reel2BiasRow = sSlotMachine->winnerRows[1]; - for (i = 0; i < 5; i++) + for (i = 0; i <= 4; i++) { - // if the biasTag appears in the same row as in reel 2 within 4 turns - if (GetTag(RIGHT_REEL, biasTagLocation_Reel2 - i) == biasTag) + if (GetTag(RIGHT_REEL, reel2BiasRow - i) == biasTag) { - sSlotMachine->winnerRows[2] = biasTagLocation_Reel2; + sSlotMachine->winnerRows[2] = reel2BiasRow; sSlotMachine->reelExtraTurns[2] = i; return TRUE; } @@ -2358,35 +2656,40 @@ static bool8 DecideReelTurns_BiasTag_Reel3_Bet1or2(u8 biasTag) return FALSE; } -static bool8 DecideReelTurns_BiasTag_Reel3_Bet3(u8 biasTag) +// Try to complete a match in reel 3 by lining up a bias tag with the bias tags +// from the first two reels. +static bool8 DecideStop_Bias_Reel3_Bet3(u8 biasTag) { s16 i; - s16 biasTagFinalPos; - // if the final position of the biasTag matches in reel 1 and reel 2... + s16 biasRow; + + // First two bias tags in the same row. Try to line up bias tag in same the + // row here too if (sSlotMachine->winnerRows[0] == sSlotMachine->winnerRows[1]) - //...then try to line it up in reel 3 - return DecideReelTurns_BiasTag_Reel3_Bet1or2(biasTag); - // else place it in the row opposite reel 1's + return DecideStop_Bias_Reel3_Bet1or2(biasTag); + + // Otherwise, try to line up the bias tag diagonally if (sSlotMachine->winnerRows[0] == 1) - biasTagFinalPos = 3; + biasRow = 3; else - biasTagFinalPos = 1; - for (i = 0; i < 5; i++) + biasRow = 1; + for (i = 0; i <= 4; i++) { - // if the biasTag lands in that position within 4 turns - if (GetTag(RIGHT_REEL, biasTagFinalPos - i) == biasTag) + if (GetTag(RIGHT_REEL, biasRow - i) == biasTag) { sSlotMachine->reelExtraTurns[2] = i; - sSlotMachine->winnerRows[2] = biasTagFinalPos; + sSlotMachine->winnerRows[2] = biasRow; return TRUE; } } return FALSE; } -// Advance until there are no cherries on screen in reel 1 - -static void DecideReelTurns_NoBiasTag_Reel1(void) +// Advance as many turns as needed until there are no cherries on screen in +// reel 1, as cherries would cause a match. +// +// Based on the distribution of reel 1, this will add at most 3 extra turns. +static void DecideStop_NoBias_Reel1(void) { s16 i = 0; @@ -2395,41 +2698,60 @@ static void DecideReelTurns_NoBiasTag_Reel1(void) sSlotMachine->reelExtraTurns[0] = i; } -static bool8 IsBiasTag777_SwitchColor(u8 *biasTagPtr) +// If the bias tag is one of the 7's, switch to the opposite color and return +// true. Otherwise, return false. +static bool8 IfTag7_SwitchColor(u8 *tagPtr) { - if (*biasTagPtr == GFXTAG_7_RED) + if (*tagPtr == GFXTAG_7_RED) { - *biasTagPtr = GFXTAG_7_BLUE; + *tagPtr = GFXTAG_7_BLUE; return TRUE; } - if (*biasTagPtr == GFXTAG_7_BLUE) + if (*tagPtr == GFXTAG_7_BLUE) { - *biasTagPtr = GFXTAG_7_RED; + *tagPtr = GFXTAG_7_RED; return TRUE; } return FALSE; } -static void DecideReelTurns_NoBiasTag_Reel2(void) +// If the machine doesn't have a bias, the reel stops immediately. +// +// Otherwise, the machine tries to taunt the player if it is biased toward +// straight 7's. This would only happen if the player did not stop near the +// correct-color 7, so the machine couldn't force a match. +// +// Instead, the machine now tries to line up the opposite-color 7, which is not +// a valid match. +static void DecideStop_NoBias_Reel2(void) { - sDecideReelTurns_NoBiasTag_Reel2_Bets[sSlotMachine->bet - 1](); + sDecideStop_NoBias_Reel2_Bets[sSlotMachine->bet - 1](); } -// only does stuff if the biasTag is one of the 7's, plus other conditions -static void DecideReelTurns_NoBiasTag_Reel2_Bet1(void) +// If the machine has no bias, stop immediately. +// +// Otherwise, the machine manipulates the results if all the following +// conditions are met: +// If +// - The machine is biased toward straight 7's +// - The machine managed to match a 7 in the middle of reel 1 +// - The machine could not line up a 7 of the same color in reel 2 +// Then +// The machine will try to line up a 7 of the opposite color in reel 2 +static void DecideStop_NoBias_Reel2_Bet1(void) { - if (sSlotMachine->winnerRows[0] != 0 && sSlotMachine->luckyFlags & LUCKY_BIAS_777) + if (sSlotMachine->winnerRows[0] != 0 && sSlotMachine->machineBias & BIAS_STRAIGHT_7) { - u8 biasTag = GetTag(LEFT_REEL, 2 - sSlotMachine->reelExtraTurns[0]); - //...and if biasTag is one of the 7's... - if (IsBiasTag777_SwitchColor(&biasTag)) - //...swap color of biasTag... + // Note here and in other NoBias functions, reelExtraTurns is 0 if it + // corresponds to a previous reel. That reel has already stopped and any + // extra turns were applied. + u8 reel1MiddleTag = GetTag(LEFT_REEL, 2 - sSlotMachine->reelExtraTurns[0]); + if (IfTag7_SwitchColor(&reel1MiddleTag)) { s16 i; - for (i = 0; i < 5; i++) + for (i = 0; i <= 4; i++) { - //...and if the biasTag appears within 4 turns - if (biasTag == GetTag(MIDDLE_REEL, 2 - i)) + if (reel1MiddleTag == GetTag(MIDDLE_REEL, 2 - i)) { sSlotMachine->winnerRows[1] = 2; sSlotMachine->reelExtraTurns[1] = i; @@ -2440,20 +2762,27 @@ static void DecideReelTurns_NoBiasTag_Reel2_Bet1(void) } } -static void DecideReelTurns_NoBiasTag_Reel2_Bet2(void) +// If the machine has no bias, stop immediately. +// +// Otherwise, the machine manipulates the results if all the following +// conditions are met: +// If +// - The machine is biased toward straight 7's +// - The machine managed to match a 7 anywhere in reel 1 +// - The machine could not line up a 7 of the same color in reel 2 +// Then +// The machine will try to line up a 7 of the opposite color in reel 2 +static void DecideStop_NoBias_Reel2_Bet2(void) { - if (sSlotMachine->winnerRows[0] != 0 && sSlotMachine->luckyFlags & LUCKY_BIAS_777) + if (sSlotMachine->winnerRows[0] != 0 && sSlotMachine->machineBias & BIAS_STRAIGHT_7) { - u8 biasTag = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); - //...and if biasTag is one of the 7's... - if (IsBiasTag777_SwitchColor(&biasTag)) - //...swap color of biasTag... + u8 reel1BiasTag = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); + if (IfTag7_SwitchColor(&reel1BiasTag)) { s16 i; - for (i = 0; i < 5; i++) + for (i = 0; i <= 4; i++) { - //...and if the biasTag appears in same row in reel 2 within 4 turns - if (biasTag == GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[0] - i)) + if (reel1BiasTag == GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[0] - i)) { sSlotMachine->winnerRows[1] = sSlotMachine->winnerRows[0]; sSlotMachine->reelExtraTurns[1] = i; @@ -2464,76 +2793,127 @@ static void DecideReelTurns_NoBiasTag_Reel2_Bet2(void) } } -static void DecideReelTurns_NoBiasTag_Reel2_Bet3(void) +// If the machine has no bias, stop immediately. +// +// Otherwise, the machine manipulates the results if all the following +// conditions are met: +// If +// - The machine is biased toward straight 7's +// - The machine managed to match a 7 anywhere in reel 1 +// - The machine could not line up a 7 of the same color in reel 2 +// Then +// The machine will try to line up a 7 of the opposite color in reel 2 +// +// The way it tries to line up an opposite-color 7 differs depending on where +// the 7 is in reel 1: +// +// Middle row: +// Try to line up an opposite-color 7 in the middle of reel 2 within 4 turns. +// +// Top row: +// - First check for an opposite-color 7 in the top and middle rows of the +// current screen. If found, stop immediately. +// - Otherwise, check if an opposite-color 7 will enter the top row within 4 +// turns. +// - If one enters in 1 or 2 turns, stop the reel when it gets to the middle +// row. +// - If one enters in 3 or 4 turns, stop the reel when it gets to the top +// row. +// +// Bottom row: +// - First check for an opposite-color 7 in the middle and bottom rows of the +// current screen. If found, stop immediately. +// - Otherwise, check if an opposite-color 7 will enter the bottom row within 4 +// turns. +// - If one enters in 1 or 2 turns, stop the reel when it gets to the bottom +// row. +// - If one enters in 3 or 4 turns, stop the reel when it gets to the middle +// row. +// +// BUG: This procedure misses an opportunity to line up an opposite-color 7 in +// one scenario, when: +// - There is a 7 in the bottom row of reel 1 +// - And, you can get an opposite-color 7 in the middle row of reel 2 in 4 +// turns +static void DecideStop_NoBias_Reel2_Bet3(void) { s16 i; s16 j; - // if reel 1 has a biasTag and bit 7 is set in luckyFlags... - if (sSlotMachine->winnerRows[0] != 0 && sSlotMachine->luckyFlags & LUCKY_BIAS_777) + u8 reel1BiasTag; + + if (sSlotMachine->winnerRows[0] != 0 && sSlotMachine->machineBias & BIAS_STRAIGHT_7) { - //...and if biasTag appeared in the center row of reel 1 + // Lined up 7 in middle of reel 1 if (sSlotMachine->winnerRows[0] == 2) { - DecideReelTurns_NoBiasTag_Reel2_Bet2(); + DecideStop_NoBias_Reel2_Bet2(); + return; } - else + + reel1BiasTag = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); + if (IfTag7_SwitchColor(&reel1BiasTag)) { - u8 biasTag = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); - //...and if biasTag is one of the 7's... - if (IsBiasTag777_SwitchColor(&biasTag)) - //...swap the color of the 7... + // Check current screen to see if there is already an opposite-color + // 7 lined up for a match. + j = 2; + if (sSlotMachine->winnerRows[0] == 3) + j = 3; + for (i = 0; i < 2; i++, j--) { - j = 2; - if (sSlotMachine->winnerRows[0] == 3) - j = 3; - for (i = 0; i < 2; i++, j--) + if (reel1BiasTag == GetTag(MIDDLE_REEL, j)) { - if (biasTag == GetTag(MIDDLE_REEL, j)) - { - sSlotMachine->winnerRows[1] = j; - sSlotMachine->reelExtraTurns[1] = 0; - return; - } + sSlotMachine->winnerRows[1] = j; + sSlotMachine->reelExtraTurns[1] = 0; + return; } - for (j = 1; j < 5; j++) + } + + // Check if opposite-color 7 will appear in same row as reel 1 in + // over the next 4 turns + for (j = 1; j <= 4; j++) + { + if (reel1BiasTag == GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[0] - j)) { - if (biasTag == GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[0] - j)) + // If 7 appeared in top row of reel 1 + if (sSlotMachine->winnerRows[0] == 1) { - if (sSlotMachine->winnerRows[0] == 1) + if (j <= 2) { - if (j < 3) - { - sSlotMachine->winnerRows[1] = 2; - sSlotMachine->reelExtraTurns[1] = j + 1; - } - else - { - sSlotMachine->winnerRows[1] = 1; - sSlotMachine->reelExtraTurns[1] = j; - } + sSlotMachine->winnerRows[1] = 2; + sSlotMachine->reelExtraTurns[1] = j + 1; } else { - if (j < 3) - { - sSlotMachine->winnerRows[1] = 3; - sSlotMachine->reelExtraTurns[1] = j; - } - else - { - sSlotMachine->winnerRows[1] = 2; - sSlotMachine->reelExtraTurns[1] = j - 1; - } + sSlotMachine->winnerRows[1] = 1; + sSlotMachine->reelExtraTurns[1] = j; } - return; } + // If 7 appeared in bottom row of reel 1 + else + { + if (j <= 2) + { + sSlotMachine->winnerRows[1] = 3; + sSlotMachine->reelExtraTurns[1] = j; + } + else + { + sSlotMachine->winnerRows[1] = 2; + sSlotMachine->reelExtraTurns[1] = j - 1; + } + } + return; } } } } } -static bool8 AreTagsMixed77(u8 tag1, u8 tag2) +// Returns true if the reel 1 and reel 2 tags are opposite-color 7's. +// +// Note that if true, this does not constitue a MATCH_MIXED_7, as the first two +// reels are not the same color. +static bool8 MismatchedTags_77(u8 tag1, u8 tag2) { if ((tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_BLUE) || (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_RED)) return TRUE; @@ -2541,7 +2921,9 @@ static bool8 AreTagsMixed77(u8 tag1, u8 tag2) return FALSE; } -static bool8 AreTagsMixed777(u8 tag1, u8 tag2, u8 tag3) +// Returns true if the reel 1, reel 2 and reel 3 tags form a 7 mismatch, i.e. +// {7R, 7B, 7R} or {7B, 7R, 7B}. +static bool8 MismatchedTags_777(u8 tag1, u8 tag2, u8 tag3) { if ((tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) || (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE)) @@ -2550,7 +2932,12 @@ static bool8 AreTagsMixed777(u8 tag1, u8 tag2, u8 tag3) return FALSE; } -static bool8 TagsDontMatchOrHaveAny7s(u8 tag1, u8 tag2, u8 tag3) +// Returns false if either: +// - The tags form a match (including MATCH_MIXED_7) +// - Or, the tags form a 7 mismatch (i.e., {7R, 7B, 7R} or {7B, 7R, 7B}) +// +// Note, this does not account for cherry matches. +static bool8 NeitherMatchNor7Mismatch(u8 tag1, u8 tag2, u8 tag3) { if ((tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) || (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) || @@ -2563,34 +2950,54 @@ static bool8 TagsDontMatchOrHaveAny7s(u8 tag1, u8 tag2, u8 tag3) return TRUE; } -static void DecideReelTurns_NoBiasTag_Reel3(void) +// Spin until there's no match, or try to taunt the player with a 7 mismatch if +// they failed the straight 7 bias. +static void DecideStop_NoBias_Reel3(void) { - sDecideReelTurns_NoBiasTag_Reel3_Bets[sSlotMachine->bet - 1](); + sDecideStop_NoBias_Reel3_Bets[sSlotMachine->bet - 1](); } -static void DecideReelTurns_NoBiasTag_Reel3_Bet1(void) +// Spin until there is no match in reel 3. Additionally, if the player failed a +// straight 7 bias, try to taunt them with a 7 mismatch. +// +// The way this plays out depends on the first two matched tags. +// +// If first two tags are the same: +// Spin until you get a tag that won't complete a match. +// +// Otherwise, if the first two tags are opposite-color 7's: +// - If the machine is biased toward straight 7's, then the player must have +// failed with this bias. The machine tries to taunt the player by turning +// up to 4 turns to complete a 7 mismatch (i.e., {7R, 7B, 7R} or +// {7B, 7R, 7B}). +// - Otherwise, spin until you get a tag that won't complete a match. +static void DecideStop_NoBias_Reel3_Bet1(void) { s16 i = 0; u8 tag1 = GetTag(LEFT_REEL, 2 - sSlotMachine->reelExtraTurns[0]); u8 tag2 = GetTag(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); - // if tags match in first 2 reels... + + // If first two tags match, spin until you get a non-matching tag if (tag1 == tag2) { - //...spin until you get non-matching tag - while (1) + while (TRUE) { u8 tag3; - if (!(tag1 == (tag3 = GetTag(RIGHT_REEL, 2 - i)) || (tag1 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) || (tag1 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED))) + if (!((tag1 == (tag3 = GetTag(RIGHT_REEL, 2 - i))) || + (tag1 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) || + (tag1 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED))) break; i++; } } - else if (AreTagsMixed77(tag1, tag2)) + // First two tags are opposite-color 7's + else if (MismatchedTags_77(tag1, tag2)) { - if (sSlotMachine->luckyFlags & LUCKY_BIAS_777) + // If biased toward straight 7's, try to complete the 7 mismatch in 4 + // turns + if (sSlotMachine->machineBias & BIAS_STRAIGHT_7) { - //...see if you can match with reel 1 within 4 turns - for (i = 0; i < 5; i++) + for (i = 0; i <= 4; i++) { if (tag1 == GetTag(RIGHT_REEL, 2 - i)) { @@ -2599,9 +3006,10 @@ static void DecideReelTurns_NoBiasTag_Reel3_Bet1(void) } } } - // turn until you aren't matching with reel 1 + + // Otherwise, just spin until you get a non-matching tag i = 0; - while (1) + while (TRUE) { if (tag1 != GetTag(RIGHT_REEL, 2 - i)) break; @@ -2611,22 +3019,46 @@ static void DecideReelTurns_NoBiasTag_Reel3_Bet1(void) sSlotMachine->reelExtraTurns[2] = i; } -static void DecideReelTurns_NoBiasTag_Reel3_Bet2(void) +// Spin until there is no match in reel 3. Additionally, if the player failed a +// straight 7 bias, try to taunt them with a 7 mismatch. +// +// There are up to two stages, depending on the first two matched tags: +// +// 1. [Optional] If first two tags are opposite-color 7's in the same row and +// the machine is biased toward straight 7's: +// Check if a 7 with the same color as reel 1 appears in the same row +// within 4 turns. If so, initially advance to that position. +// +// 2. Check rows. Keep advancing the reel a turn at a time as long as: +// - There is a match in any row +// - Or, there is a 7 mismatch in any row and the machine isn't biased +// toward straight 7's +// +// Note, stage 2 is not limited to 4 turns. The reel keeps spinning until you +// lose. +static void DecideStop_NoBias_Reel3_Bet2(void) { s16 extraTurns = 0; s16 i; u8 tag1; u8 tag2; u8 tag3; - if (sSlotMachine->winnerRows[1] != 0 && sSlotMachine->winnerRows[0] == sSlotMachine->winnerRows[1] && sSlotMachine->luckyFlags & LUCKY_BIAS_777) + + // Effectively, if you lined up two 7's in the same row + if (sSlotMachine->winnerRows[1] != 0 && + sSlotMachine->winnerRows[0] == sSlotMachine->winnerRows[1] && + sSlotMachine->machineBias & BIAS_STRAIGHT_7) { tag1 = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); tag2 = GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[1] - sSlotMachine->reelExtraTurns[1]); - //...and if tags are mixed 7s... - if (AreTagsMixed77(tag1, tag2)) + + // If the first two 7's are opposite colors, see if you can line up a 7 + // mismatch in the same row. If so, advance initially to that position. + // More turns may be added further below. + if (MismatchedTags_77(tag1, tag2)) { - //...try to match with reel 1 within 4 turns - for (i = 0; i < 5; i++) + // Iterate over the next 4 turns + for (i = 0; i <= 4; i++) { tag3 = GetTag(RIGHT_REEL, sSlotMachine->winnerRows[1] - i); if (tag1 == tag3) @@ -2637,52 +3069,99 @@ static void DecideReelTurns_NoBiasTag_Reel3_Bet2(void) } } } - // GUESS: spin until there's no possible match within 4 turns of you stopping - while (1) + + while (TRUE) { - s16 loopExit; - for (i = 1, loopExit = 0; i < 4; i++) + s16 numMatches; + // Iterate over the rows of the screen after `extraTurns` turns + for (i = 1, numMatches = 0; i <= 3; i++) { - tag1 = GetTag(LEFT_REEL, i - sSlotMachine->reelExtraTurns[0]); // why does this update with i + tag1 = GetTag(LEFT_REEL, i - sSlotMachine->reelExtraTurns[0]); tag2 = GetTag(MIDDLE_REEL, i - sSlotMachine->reelExtraTurns[1]); tag3 = GetTag(RIGHT_REEL, i - extraTurns); - // if bit 7 of luckyFlags is unset... - //...and if all 3 tags match and they're not mixed 7s - if (!TagsDontMatchOrHaveAny7s(tag1, tag2, tag3) && (!AreTagsMixed777(tag1, tag2, tag3) || !(sSlotMachine->luckyFlags & LUCKY_BIAS_777))) + + // This boils down to: + // If there's a match on screen, keep spinning. Otherwise, if + // there's a 7 mismatch on screen, keep spinning if the machine + // isn't biased toward straight 7's. + if (!NeitherMatchNor7Mismatch(tag1, tag2, tag3) && + !(MismatchedTags_777(tag1, tag2, tag3) && (sSlotMachine->machineBias & BIAS_STRAIGHT_7))) { - loopExit++; + numMatches++; break; } } - if (loopExit == 0) + + // If no matches were found, stop here. Otherwise, add an extra spin and + // check again. + if (numMatches == 0) break; extraTurns++; } sSlotMachine->reelExtraTurns[2] = extraTurns; } -static void DecideReelTurns_NoBiasTag_Reel3_Bet3(void) +// Try to spin until there is no match in reel 3. Additionally, if the player +// failed a straight 7 bias, try to taunt them with a 7 mismatch. +// +// There are up to four stages: +// +// 1. Advance the reel as if 2 coins were bet: to mildly oversimplify, spin +// until there's no matches straight across in any rows. +// +// 2. [Optional] If you've lined up two opposite-color 7's diagonally and the +// machine is biased toward straight 7's: +// Check if a 7 with the same color as reel 1 appears in the final diagonal +// position within 4 turns. If so, advance to that position. +// +// 3. Check NWSE diagonal. Keep advancing the reel a turn at a time as long as: +// - There is a match in the diagonal +// - Or, there is a 7 mismatch in the diagonal and the machine isn't +// biased toward straight 7's +// +// 3. Check NESW diagonal. Keep advancing the reel a turn at a time as long as: +// - There is a match in the diagonal +// - Or, there is a 7 mismatch in the diagonal and the machine isn't +// biased toward straight 7's +// +// Note that stages 3 and 4 are not limited to 4 turns. +// +// Also, note that it actually is possible to win a match here. After stage 1, +// the game never again checks whether it will be matching any rows straight +// across. So any extra turns added in stages 2-4 could result in a match +// occurring straight across. +static void DecideStop_NoBias_Reel3_Bet3(void) { u8 tag1; u8 tag2; u8 tag3; - s16 j; + s16 row; s16 i; - DecideReelTurns_NoBiasTag_Reel3_Bet2(); - if (sSlotMachine->winnerRows[1] != 0 && sSlotMachine->winnerRows[0] != sSlotMachine->winnerRows[1] && sSlotMachine->luckyFlags & LUCKY_BIAS_777) + // Spin until there's no matches in any row straight across, potentially + // skewing toward a 7 mismatch. Consider this the new starting position for + // this function. + DecideStop_NoBias_Reel3_Bet2(); + + // Essentially, if you lined up two 7's diagonally + if (sSlotMachine->winnerRows[1] != 0 && + sSlotMachine->winnerRows[0] != sSlotMachine->winnerRows[1] && + sSlotMachine->machineBias & BIAS_STRAIGHT_7) { tag1 = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); tag2 = GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[1] - sSlotMachine->reelExtraTurns[1]); - //..and if tags are mixed 7s... - if (AreTagsMixed77(tag1, tag2)) + + // If the first two 7's are opposite colors, try advancing up to 4 + // additional turns to line up a diagonal 7 mismatch. More turns may be + // added further below. + if (MismatchedTags_77(tag1, tag2)) { - j = 1; + row = 1; if (sSlotMachine->winnerRows[0] == 1) - j = 3; - for (i = 0; i < 5; i++) + row = 3; + for (i = 0; i <= 4; i++) { - tag3 = GetTag(RIGHT_REEL, j - (sSlotMachine->reelExtraTurns[2] + i)); + tag3 = GetTag(RIGHT_REEL, row - (sSlotMachine->reelExtraTurns[2] + i)); if (tag1 == tag3) { sSlotMachine->reelExtraTurns[2] += i; @@ -2691,21 +3170,27 @@ static void DecideReelTurns_NoBiasTag_Reel3_Bet3(void) } } } - while (1) + + while (TRUE) { + // Check NWSE diagonal tag1 = GetTag(LEFT_REEL, 1 - sSlotMachine->reelExtraTurns[0]); tag2 = GetTag(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); tag3 = GetTag(RIGHT_REEL, 3 - sSlotMachine->reelExtraTurns[2]); - if (TagsDontMatchOrHaveAny7s(tag1, tag2, tag3) || (AreTagsMixed777(tag1, tag2, tag3) && sSlotMachine->luckyFlags & LUCKY_BIAS_777)) + if (NeitherMatchNor7Mismatch(tag1, tag2, tag3) || + (MismatchedTags_777(tag1, tag2, tag3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) break; sSlotMachine->reelExtraTurns[2]++; } - while (1) + + while (TRUE) { + // Check NESW diagonal tag1 = GetTag(LEFT_REEL, 3 - sSlotMachine->reelExtraTurns[0]); tag2 = GetTag(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); tag3 = GetTag(RIGHT_REEL, 1 - sSlotMachine->reelExtraTurns[2]); - if (TagsDontMatchOrHaveAny7s(tag1, tag2, tag3) || (AreTagsMixed777(tag1, tag2, tag3) && sSlotMachine->luckyFlags & LUCKY_BIAS_777)) + if (NeitherMatchNor7Mismatch(tag1, tag2, tag3) || + (MismatchedTags_777(tag1, tag2, tag3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) break; sSlotMachine->reelExtraTurns[2]++; } @@ -2720,7 +3205,7 @@ static void PressStopReelButton(u8 reelNum) static void Task_PressStopReelButton(u8 taskId) { - sReelStopButtonFuncs[gTasks[taskId].data[0]](&gTasks[taskId], taskId); + sReelStopButtonTasks[gTasks[taskId].data[0]](&gTasks[taskId], taskId); } static void StopReelButton_Press(struct Task *task, u8 taskId) @@ -2926,11 +3411,11 @@ static void CreatePikaPowerBoltTask(void) sSlotMachine->pikaPowerBoltTaskId = CreateTask(Task_CreatePikaPowerBolt, 8); } -static void AddPikaPowerBolt(u8 pikaPower) +static void AddPikaPowerBolt(u8 bolts) { struct Task *task = &gTasks[sSlotMachine->pikaPowerBoltTaskId]; ResetPikaPowerBoltTask(task); - task->tState = 1; + task->tState = PIKABOLT_TASK_ADD_BOLT; task->tNumBolts++; task->tAnimating = TRUE; } @@ -2939,7 +3424,7 @@ static void ResetPikaPowerBolts(void) { struct Task *task = &gTasks[sSlotMachine->pikaPowerBoltTaskId]; ResetPikaPowerBoltTask(task); - task->tState = 3; + task->tState = PIKABOLT_TASK_CLEAR_ALL; task->tAnimating = TRUE; } @@ -2950,7 +3435,7 @@ static bool8 IsPikaPowerBoltAnimating(void) static void Task_CreatePikaPowerBolt(u8 taskId) { - sPikaPowerBoltFuncs[gTasks[taskId].tState](&gTasks[taskId]); + sPikaPowerBoltTasks[gTasks[taskId].tState](&gTasks[taskId]); } static void PikaPowerBolt_Idle(struct Task *task) @@ -2960,7 +3445,7 @@ static void PikaPowerBolt_Idle(struct Task *task) static void PikaPowerBolt_AddBolt(struct Task *task) { task->tSpriteId = CreatePikaPowerBoltSprite((task->tNumBolts << 3) + 20, 20); - task->tState++; + task->tState++; // PIKABOLT_TASK_WAIT_ANIM } // The bolt sprite spins around as it appears @@ -2979,7 +3464,7 @@ static void PikaPowerBolt_WaitAnim(struct Task *task) sSelectedPikaPowerTile[r2] = sPikaPowerTileTable[r3][0]; LoadBgTilemap(2, &sSelectedPikaPowerTile[r2], 2, r5 + 0x40); DestroyPikaPowerBoltSprite(task->tSpriteId); - task->tState = 0; + task->tState = PIKABOLT_TASK_IDLE; task->tAnimating = 0; } } @@ -3003,7 +3488,7 @@ static void PikaPowerBolt_ClearAll(struct Task *task) task->tTimer = 0; if (task->tNumBolts == 0) { - task->tState = 0; + task->tState = PIKABOLT_TASK_IDLE; task->tAnimating = 0; } } @@ -3016,17 +3501,17 @@ static void ResetPikaPowerBoltTask(struct Task *task) task->data[i] = 0; } -static void LoadPikaPowerMeter(u8 pikaPower) +static void LoadPikaPowerMeter(u8 bolts) { s16 i; s16 r3 = 0, r1 = 0; s16 r4 = 3; - for (i = 0; i < pikaPower; i++, r4++) + for (i = 0; i < bolts; i++, r4++) { r3 = 0, r1 = 0; if (i == 0) r3 = 1, r1 = 1; - else if (i == 15) // pikaPower meter is full + else if (i == 15) // meter is full r3 = 2, r1 = 2; sSelectedPikaPowerTile[r1] = sPikaPowerTileTable[r3][0]; LoadBgTilemap(2, &sSelectedPikaPowerTile[r1], 2, r4 + 0x40); @@ -3041,7 +3526,7 @@ static void LoadPikaPowerMeter(u8 pikaPower) sSelectedPikaPowerTile[r1] = sPikaPowerTileTable[r3][1]; LoadBgTilemap(2, &sSelectedPikaPowerTile[r1], 2, r4 + 0x40); } - gTasks[sSlotMachine->pikaPowerBoltTaskId].data[1] = pikaPower; + gTasks[sSlotMachine->pikaPowerBoltTaskId].data[1] = bolts; } #undef tState @@ -3050,7 +3535,13 @@ static void LoadPikaPowerMeter(u8 pikaPower) #undef tTimer #undef tAnimating -#define tState data[0] +#define tState data[0] +#define tReelSpeed data[1] +#define tTimer3 data[2] +#define tRtReelSpeed data[4] +#define tTimer2 data[4] +#define tTimer1 data[5] +#define tExplodeChecks data[6] static void BeginReelTime(void) { @@ -3067,10 +3558,7 @@ static bool8 IsReelTimeTaskDone(void) static void Task_ReelTime(u8 taskId) { - // task.data[1] has something to do with the threshold - // task.data[4] says how many pixels to advance the reel - // task.data[5] is a timer - sReelTimeActions[gTasks[taskId].tState](&gTasks[taskId]); + sReelTimeTasks[gTasks[taskId].tState](&gTasks[taskId]); } static void ReelTime_Init(struct Task *task) @@ -3078,10 +3566,10 @@ static void ReelTime_Init(struct Task *task) sSlotMachine->reelTimeSpinsLeft = 0; sSlotMachine->reeltimePixelOffset = 0; sSlotMachine->reeltimePosition = 0; - task->tState++; + task->tState++; // RT_TASK_WINDOW_ENTER task->data[1] = 0; task->data[2] = 30; - task->data[4] = 1280; // reel speed + task->tRtReelSpeed = 1280; gSpriteCoordOffsetX = 0; gSpriteCoordOffsetY = 0; SetGpuReg(REG_OFFSET_BG1HOFS, 0); @@ -3092,7 +3580,7 @@ static void ReelTime_Init(struct Task *task) CreateReelTimeNumberSprites(); CreateReelTimeShadowSprites(); CreateReelTimeNumberGapSprite(); - GetReeltimeDraw(); + GetReelTimeDraw(); StopMapMusic(); PlayNewMapMusic(MUS_ROULETTE); } @@ -3112,18 +3600,18 @@ static void ReelTime_WindowEnter(struct Task *task) } if (task->data[1] >= 200) { - task->tState++; + task->tState++; // RT_TASK_WAIT_START_PIKA task->data[3] = 0; } - AdvanceReeltimeReel(task->data[4] >> 8); + AdvanceReeltimeReel(task->tRtReelSpeed >> 8); } static void ReelTime_WaitStartPikachu(struct Task *task) { - AdvanceReeltimeReel(task->data[4] >> 8); - if (++task->data[5] >= 60) + AdvanceReeltimeReel(task->tRtReelSpeed >> 8); + if (++task->tTimer1 >= 60) { - task->tState++; + task->tState++; // RT_TASK_PIKA_SPEEDUP1 CreateReelTimeBoltSprites(); CreateReelTimePikachuAuraSprites(); } @@ -3140,29 +3628,29 @@ static void ReelTime_PikachuSpeedUp1(struct Task *task) memcpy(reelTimeBoltDelays, sReelTimeBoltDelays, sizeof(sReelTimeBoltDelays)); memcpy(pikachuAuraFlashDelays, sPikachuAuraFlashDelays, sizeof(sPikachuAuraFlashDelays)); - AdvanceReeltimeReel(task->data[4] >> 8); + AdvanceReeltimeReel(task->tRtReelSpeed >> 8); // gradually slow down the reel - task->data[4] -= 4; - i = 4 - (task->data[4] >> 8); + task->tRtReelSpeed -= 4; + i = 4 - (task->tRtReelSpeed >> 8); SetReelTimeBoltDelay(reelTimeBoltDelays[i]); SetReelTimePikachuAuraFlashDelay(pikachuAuraFlashDelays[i]); StartSpriteAnimIfDifferent(&gSprites[sSlotMachine->reelTimePikachuSpriteId], pikachuAnimIds[i]); // once speed goes below 256, go to next ReelTimeAction and keep the speed level - if (task->data[4] <= 0x100) + if (task->tRtReelSpeed <= 0x100) { - task->tState++; - task->data[4] = 0x100; - task->data[5] = 0; + task->tState++; // RT_TASK_PIKA_SPEEDUP2 + task->tRtReelSpeed = 0x100; + task->tTimer1 = 0; } } static void ReelTime_PikachuSpeedUp2(struct Task *task) { - AdvanceReeltimeReel(task->data[4] >> 8); - if (++task->data[5] >= 80) + AdvanceReeltimeReel(task->tRtReelSpeed >> 8); + if (++task->tTimer1 >= 80) { - task->tState++; - task->data[5] = 0; + task->tState++; // RT_TASK_WAIT_REEL + task->tTimer1 = 0; SetReelTimePikachuAuraFlashDelay(2); StartSpriteAnimIfDifferent(&gSprites[sSlotMachine->reelTimePikachuSpriteId], 3); } @@ -3170,83 +3658,94 @@ static void ReelTime_PikachuSpeedUp2(struct Task *task) static void ReelTime_WaitReel(struct Task *task) { - AdvanceReeltimeReel(task->data[4] >> 8); - task->data[4] = (u8)task->data[4] + 0x80; - if (++task->data[5] >= 80) + AdvanceReeltimeReel(task->tRtReelSpeed >> 8); + task->tRtReelSpeed = (u8)task->tRtReelSpeed + 0x80; + if (++task->tTimer1 >= 80) { - task->tState++; - task->data[5] = 0; + task->tState++; // RT_TASK_CHECK_EXPLODE + task->tTimer1 = 0; } } +// Check whether the ReelTime machine should explode. +// +// The ReelTime machine displays 0 when this task starts. If there is a positive +// ReelTime draw, the machine keeps spinning until it lands on that number. +// +// Otherwise, it checks every 40 frames whether it should explode. If so, it +// explodes immediately. After 4 checks, the machine won't explode but continues +// to spin until it lands on 0. static void ReelTime_CheckExplode(struct Task *task) { - AdvanceReeltimeReel(task->data[4] >> 8); - task->data[4] = (u8)task->data[4] + 0x40; - if (++task->data[5] >= 40) + AdvanceReeltimeReel(task->tRtReelSpeed >> 8); + task->tRtReelSpeed = (u8)task->tRtReelSpeed + 0x40; + if (++task->tTimer1 >= 40) { - task->data[5] = 0; + task->tTimer1 = 0; if (sSlotMachine->reelTimeDraw) { - if (sSlotMachine->reelTimeSpinsLeft <= task->data[6]) - task->tState++; + if (sSlotMachine->reelTimeSpinsLeft <= task->tExplodeChecks) + task->tState++; // RT_TASK_LAND } - else if (task->data[6] > 3) + else if (task->tExplodeChecks > 3) { - task->tState++; + task->tState++; // RT_TASK_LAND } - else if (ShouldReelTimeMachineExplode(task->data[6])) + else if (ShouldReelTimeMachineExplode(task->tExplodeChecks)) { - task->tState = 14; // ReelTime_ExplodeMachine + task->tState = RT_TASK_EXPLODE; } - task->data[6]++; + task->tExplodeChecks++; } } +// Reel spins until it lands on the selected outcome. static void ReelTime_LandOnOutcome(struct Task *task) { s16 reeltimePixelOffset = sSlotMachine->reeltimePixelOffset % 20; if (reeltimePixelOffset) { - reeltimePixelOffset = AdvanceReeltimeReelToNextTag(task->data[4] >> 8); - task->data[4] = (u8)task->data[4] + 0x40; + reeltimePixelOffset = AdvanceReeltimeReelToNextTag(task->tRtReelSpeed >> 8); + task->tRtReelSpeed = (u8)task->tRtReelSpeed + 0x40; } - else if (GetNearbyReelTimeTag(1) != sSlotMachine->reelTimeDraw) + else if (GetReelTimeTag(1) != sSlotMachine->reelTimeDraw) { - AdvanceReeltimeReel(task->data[4] >> 8); + AdvanceReeltimeReel(task->tRtReelSpeed >> 8); reeltimePixelOffset = sSlotMachine->reeltimePixelOffset % 20; - task->data[4] = (u8)task->data[4] + 0x40; + task->tRtReelSpeed = (u8)task->tRtReelSpeed + 0x40; } - if (reeltimePixelOffset == 0 && GetNearbyReelTimeTag(1) == sSlotMachine->reelTimeDraw) + if (reeltimePixelOffset == 0 && GetReelTimeTag(1) == sSlotMachine->reelTimeDraw) { - task->data[4] = 0; // stop moving - task->tState++; + task->tRtReelSpeed = 0; // Also initializes task->tTimer2 + task->tState++; // RT_TASK_PIKA_REACT } } +// Animate Pikachu reaction. Clear any power bolts the player may have won if +// they got a positive ReelTime draw. static void ReelTime_PikachuReact(struct Task *task) { - if (++task->data[4] >= 60) + if (++task->tTimer2 >= 60) { StopMapMusic(); DestroyReelTimeBoltSprites(); DestroyReelTimePikachuAuraSprites(); - task->tState++; + task->tState++; // RT_TASK_WAIT_CLEAR_POWER if(sSlotMachine->reelTimeDraw == 0) { - task->data[4] = 0xa0; + task->tTimer2 = 0xa0; StartSpriteAnimIfDifferent(&gSprites[sSlotMachine->reelTimePikachuSpriteId], 5); PlayFanfare(MUS_TOO_BAD); } else { - task->data[4] = 0xc0; + task->tTimer2 = 0xc0; StartSpriteAnimIfDifferent(&gSprites[sSlotMachine->reelTimePikachuSpriteId], 4); gSprites[sSlotMachine->reelTimePikachuSpriteId].animCmdIndex = 0; - if (sSlotMachine->pikaPower) + if (sSlotMachine->pikaPowerBolts) { ResetPikaPowerBolts(); - sSlotMachine->pikaPower = 0; + sSlotMachine->pikaPowerBolts = 0; } PlayFanfare(MUS_SLOTS_WIN); } @@ -3255,8 +3754,8 @@ static void ReelTime_PikachuReact(struct Task *task) static void ReelTime_WaitClearPikaPower(struct Task *task) { - if ((task->data[4] == 0 || --task->data[4] == 0) && !IsPikaPowerBoltAnimating()) - task->tState++; + if ((task->tTimer2 == 0 || --task->tTimer2 == 0) && !IsPikaPowerBoltAnimating()) + task->tState++; // RT_TASK_CLOSE_WINDOW_SUCCESS } static void ReelTime_CloseWindow(struct Task *task) @@ -3270,16 +3769,20 @@ static void ReelTime_CloseWindow(struct Task *task) if (task->data[3] >> 3 <= 25) ClearReelTimeWindowTilemap(r4); else - task->tState++; + task->tState++; // RT_TASK_DESTROY_SPRITES } +// Destroy sprites and wrap up the ReelTime task. +// +// If the player got a positive ReelTime draw, select the speed that the slot +// reels will initially move at. static void ReelTime_DestroySprites(struct Task *task) { sSlotMachine->reelTimeSpinsUsed = 0; sSlotMachine->reelTimeSpinsLeft = sSlotMachine->reelTimeDraw; gSpriteCoordOffsetX = 0; SetGpuReg(REG_OFFSET_BG1HOFS, 0); - sSlotMachine->reelIncrement = 8; + sSlotMachine->reelSpeed = REEL_NORMAL_SPEED; DestroyReelTimePikachuSprite(); DestroyReelTimeMachineSprites(); DestroyReelTimeShadowSprites(); @@ -3291,19 +3794,20 @@ static void ReelTime_DestroySprites(struct Task *task) else { CreateDigitalDisplayScene(DIG_DISPLAY_REEL_TIME); - task->data[1] = SlowReelSpeed(); - task->data[2] = 0; + task->tReelSpeed = ReelTimeSpeed(); + task->tTimer3 = 0; task->data[3] = 0; - task->tState++; + task->tState++; // RT_TASK_SET_REEL_SPEED } } -static void ReelTime_SetReelIncrement(struct Task *task) +// Slow the slot reels down until they match the selected speed. +static void ReelTime_SetReelSpeed(struct Task *task) { - if (sSlotMachine->reelIncrement == task->data[1]) - task->tState++; - else if (sSlotMachine->reelPixelOffsets[0] % REEL_SYMBOL_HEIGHT == 0 && (++task->data[2]& 0x07) == 0) - sSlotMachine->reelIncrement >>= 1; + if (sSlotMachine->reelSpeed == task->tReelSpeed) + task->tState++; // RT_TASK_END_SUCCESS + else if (sSlotMachine->reelPixelOffsets[0] % TAG_HEIGHT == 0 && (++task->tTimer3 & 0x07) == 0) + sSlotMachine->reelSpeed >>= 1; } static void ReelTime_EndSuccess(struct Task *task) @@ -3320,9 +3824,9 @@ static void ReelTime_ExplodeMachine(struct Task *task) CreateReelTimeExplosionSprite(); gSprites[sSlotMachine->reelTimeShadowSpriteIds[0]].invisible = TRUE; StartSpriteAnimIfDifferent(&gSprites[sSlotMachine->reelTimePikachuSpriteId], 5); - task->tState++; + task->tState++; // RT_TASK_WAIT_EXPLODE task->data[4] = 4; - task->data[5] = 0; + task->tTimer1 = 0; StopMapMusic(); PlayFanfare(MUS_TOO_BAD); PlaySE(SE_M_EXPLOSION); @@ -3332,9 +3836,9 @@ static void ReelTime_WaitExplode(struct Task *task) { gSpriteCoordOffsetY = task->data[4]; SetGpuReg(REG_OFFSET_BG1VOFS, task->data[4]); - if (task->data[5] & 0x01) + if (task->tTimer1 & 0x01) task->data[4] = -task->data[4]; - if ((++task->data[5] & 0x1f) == 0) + if ((++task->tTimer1 & 0x1f) == 0) task->data[4] >>= 1; if (task->data[4] == 0) { @@ -3343,8 +3847,8 @@ static void ReelTime_WaitExplode(struct Task *task) CreateBrokenReelTimeMachineSprite(); CreateReelTimeSmokeSprite(); gSprites[sSlotMachine->reelTimeShadowSpriteIds[0]].invisible = FALSE; - task->tState++; - task->data[5] = 0; + task->tState++; // RT_TASK_WAIT_SMOKE + task->tTimer1 = 0; } } @@ -3354,7 +3858,7 @@ static void ReelTime_WaitSmoke(struct Task *task) SetGpuReg(REG_OFFSET_BG1VOFS, 0); if (IsReelTimeSmokeAnimFinished()) { - task->tState++; + task->tState++; // RT_TASK_CLOSE_WINDOW_FAILURE DestroyReelTimeSmokeSprite(); } } @@ -3392,6 +3896,11 @@ static void ClearReelTimeWindowTilemap(s16 a0) } #undef tState +#undef tReelSpeed +#undef tRtReelSpeed +#undef tTimer2 +#undef tTimer1 +#undef tExplodeChecks #define tState data[0] @@ -3413,7 +3922,7 @@ static bool8 IsInfoBoxClosed(void) static void RunInfoBoxActions(u8 taskId) { - sInfoBoxActions[gTasks[taskId].tState](&gTasks[taskId]); + sInfoBoxTasks[gTasks[taskId].tState](&gTasks[taskId]); } static void InfoBox_FadeIn(struct Task *task) @@ -3422,7 +3931,7 @@ static void InfoBox_FadeIn(struct Task *task) task->tState++; } -static void InfoBox_WaitForFade(struct Task *task) +static void InfoBox_WaitFade(struct Task *task) { if (!gPaletteFade.active) task->tState++; @@ -3446,7 +3955,7 @@ static void InfoBox_AddText(struct Task *task) task->tState++; } -static void InfoBox_AwaitPlayerInput(struct Task *task) +static void InfoBox_WaitInput(struct Task *task) { if (JOY_NEW(B_BUTTON | SELECT_BUTTON)) { @@ -3474,7 +3983,7 @@ static void InfoBox_CreateDigitalDisplay(struct Task *task) static void InfoBox_LoadPikaPowerMeter(struct Task *task) { - LoadPikaPowerMeter(sSlotMachine->pikaPower); + LoadPikaPowerMeter(sSlotMachine->pikaPowerBolts); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0)); task->tState++; } @@ -3601,7 +4110,7 @@ static void SpriteCB_ReelSymbol(struct Sprite *sprite) { sprite->data[2] = sSlotMachine->reelPixelOffsets[sprite->data[0]] + sprite->data[1]; sprite->data[2] %= 120; - sprite->y = sSlotMachine->reelPixelOffsetsWhileStopping[sprite->data[0]] + 28 + sprite->data[2]; + sprite->y = sSlotMachine->reelShockOffsets[sprite->data[0]] + 28 + sprite->data[2]; sprite->sheetTileStart = GetSpriteTileStartByTag(GetTagAtRest(sprite->data[0], sprite->data[2] / 24)); SetSpriteSheetFrameTileNum(sprite); } @@ -3773,7 +4282,7 @@ static void SpriteCB_ReelTimeNumbers(struct Sprite *sprite) s16 r0 = (u16)(sSlotMachine->reeltimePixelOffset + sprite->data[7]); r0 %= 40; sprite->y = r0 + 59; - StartSpriteAnimIfDifferent(sprite, GetNearbyReelTimeTag(r0 / 20)); + StartSpriteAnimIfDifferent(sprite, GetReelTimeTag(r0 / 20)); } static void CreateReelTimeShadowSprites(void) @@ -4720,7 +5229,7 @@ static void AllocDigitalDisplayGfx(void) sImageTable_DigitalDisplay_DPad[1].size = 0x180; } -static const u8 sReelSymbolTileTags[NUM_REELS][SYMBOLS_PER_REEL] = +static const u8 sReelTileTags[NUM_REELS][TAGS_PER_REEL] = { [LEFT_REEL] = { GFXTAG_7_RED, @@ -4797,13 +5306,15 @@ static const u8 sReelTimeTags[] = { 1, 0, 5, 4, 3, 2 }; +// Column 0: Normal game +// Column 1: Lucky game static const s16 sInitialReelPositions[NUM_REELS][2] = { [LEFT_REEL] = {0, 6}, [MIDDLE_REEL] = {0, 10}, [RIGHT_REEL] = {0, 2} }; -static const u8 sLuckyRoundProbabilities[NUM_SLOT_MACHINE_IDS][MAX_BET] = { +static const u8 sSpecialDrawOdds[NUM_SLOT_MACHINE_IDS][MAX_BET] = { [SLOT_MACHINE_UNLUCKIEST] = {1, 1, 12}, [SLOT_MACHINE_UNLUCKIER] = {1, 1, 14}, [SLOT_MACHINE_UNLUCKY] = {2, 2, 14}, @@ -4812,8 +5323,9 @@ static const u8 sLuckyRoundProbabilities[NUM_SLOT_MACHINE_IDS][MAX_BET] = { [SLOT_MACHINE_LUCKIEST] = {3, 3, 16} }; -static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS] = { - { // Probabilities for LUCKY_BIAS_777 +static const u8 sBiasProbabilities_Special[][NUM_SLOT_MACHINE_IDS] = { + { + // Probabilities for BIAS_STRAIGHT_7 [SLOT_MACHINE_UNLUCKIEST] = 25, [SLOT_MACHINE_UNLUCKIER] = 25, [SLOT_MACHINE_UNLUCKY] = 30, @@ -4821,7 +5333,8 @@ static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS] = { [SLOT_MACHINE_LUCKIER] = 40, [SLOT_MACHINE_LUCKIEST] = 50 }, - { // Probabilities for LUCKY_BIAS_REELTIME + { + // Probabilities for BIAS_REELTIME [SLOT_MACHINE_UNLUCKIEST] = 25, [SLOT_MACHINE_UNLUCKIER] = 25, [SLOT_MACHINE_UNLUCKY] = 30, @@ -4829,7 +5342,8 @@ static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS] = { [SLOT_MACHINE_LUCKIER] = 35, [SLOT_MACHINE_LUCKIEST] = 35 }, - { // Probabilities for LUCKY_BIAS_MIXED_777 + { + // Probabilities for BIAS_MIXED_7 [SLOT_MACHINE_UNLUCKIEST] = 25, [SLOT_MACHINE_UNLUCKIER] = 25, [SLOT_MACHINE_UNLUCKY] = 30, @@ -4839,8 +5353,9 @@ static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS] = { } }; -static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS] = { - { // Probabilities for LUCKY_BIAS_POWER +static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS] = { + { + // Probabilities for BIAS_POWER [SLOT_MACHINE_UNLUCKIEST] = 20, [SLOT_MACHINE_UNLUCKIER] = 25, [SLOT_MACHINE_UNLUCKY] = 25, @@ -4848,7 +5363,8 @@ static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS] = { [SLOT_MACHINE_LUCKIER] = 25, [SLOT_MACHINE_LUCKIEST] = 25 }, - { // Probabilities for LUCKY_BIAS_AZURILL + { + // Probabilities for BIAS_AZURILL [SLOT_MACHINE_UNLUCKIEST] = 12, [SLOT_MACHINE_UNLUCKIER] = 15, [SLOT_MACHINE_UNLUCKY] = 15, @@ -4856,7 +5372,8 @@ static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS] = { [SLOT_MACHINE_LUCKIER] = 19, [SLOT_MACHINE_LUCKIEST] = 22 }, - { // Probabilities for LUCKY_BIAS_LOTAD + { + // Probabilities for BIAS_LOTAD [SLOT_MACHINE_UNLUCKIEST] = 25, [SLOT_MACHINE_UNLUCKIER] = 25, [SLOT_MACHINE_UNLUCKY] = 25, @@ -4864,7 +5381,8 @@ static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS] = { [SLOT_MACHINE_LUCKIER] = 30, [SLOT_MACHINE_LUCKIEST] = 40 }, - { // Probabilities for LUCKY_BIAS_CHERRY + { + // Probabilities for BIAS_CHERRY [SLOT_MACHINE_UNLUCKIEST] = 25, [SLOT_MACHINE_UNLUCKIER] = 25, [SLOT_MACHINE_UNLUCKY] = 20, @@ -4872,7 +5390,8 @@ static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS] = { [SLOT_MACHINE_LUCKIER] = 15, [SLOT_MACHINE_LUCKIEST] = 15 }, - { // Probabilities for LUCKY_BIAS_REPLAY + { + // Probabilities for BIAS_REPLAY [SLOT_MACHINE_UNLUCKIEST] = 40, [SLOT_MACHINE_UNLUCKIER] = 40, [SLOT_MACHINE_UNLUCKY] = 35, @@ -4882,29 +5401,61 @@ static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS] = { } }; -static const u8 sReeltimeProbabilities_UnluckyGame[][17] = { - {243, 243, 243, 80, 80, 80, 80, 40, 40, 40, 40, 40, 40, 5, 5, 5, 5}, - { 5, 5, 5, 150, 150, 150, 150, 130, 130, 130, 130, 130, 130, 100, 100, 100, 5}, - { 4, 4, 4, 20, 20, 20, 20, 80, 80, 80, 80, 80, 80, 100, 100, 100, 40}, - { 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 45, 45, 45, 100}, - { 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 100}, - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6} +// INTENTION: +// As you get more Power bolts, the odds of getting higher yields (3+ spins) +// increases modestly. There's a high chance of getting at least 1 spin, which +// will clear your Power bolts. +// +// NOTE: The way these probabilities are drawn significantly skews the odds +// toward drawing 0 spins: +// +// | Up to N bolts | Prob intended | Prob actual | +// |---------------|---------------|-------------| +// | 2 | 94% | 99% | +// | 6 | 31% | 57% | +// | 12 | 16% | 44% | +// | 15 | 2% | 31% | +// | 16 | 2% | 31% | +static const u8 sReelTimeProbabilities_NormalGame[][17] = { + {243, 243, 243, 80, 80, 80, 80, 40, 40, 40, 40, 40, 40, 5, 5, 5, 5}, // 0 spins + { 5, 5, 5, 150, 150, 150, 150, 130, 130, 130, 130, 130, 130, 100, 100, 100, 5}, // 1 spin + { 4, 4, 4, 20, 20, 20, 20, 80, 80, 80, 80, 80, 80, 100, 100, 100, 40}, // 2 spins + { 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 45, 45, 45, 100}, // 3 spins + { 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 100}, // 4 spins + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6} // 5 spins }; +// INTENTION: +// As you get more Power bolts, the odds of getting higher yields (3+ spins) +// increases substantially. There is always a high chance of getting no spins, +// which lets you keep your Power bolts. +// +// NOTE: The way these probabilities are drawn significantly skews the odds +// toward drawing 0 spins: +// +// | Up to N bolts | Prob intended | Prob actual | +// |---------------|---------------|-------------| +// | 2 | 94% | 99% | +// | 6 | 78% | 96% | +// | 12 | 63% | 88% | +// | 15 | 27% | 58% | +// | 16 | 2% | 33% | static const u8 sReelTimeProbabilities_LuckyGame[][17] = { - { 243, 243, 243, 200, 200, 200, 200, 160, 160, 160, 160, 160, 160, 70, 70, 70, 5}, - { 5, 5, 5, 25, 25, 25, 25, 5, 5, 5, 5, 5, 5, 2, 2, 2, 6}, - { 4, 4, 4, 25, 25, 25, 25, 30, 30, 30, 30, 30, 30, 40, 40, 40, 35}, - { 2, 2, 2, 3, 3, 3, 3, 30, 30, 30, 30, 30, 30, 100, 100, 100, 50}, - { 1, 1, 1, 2, 2, 2, 2, 30, 30, 30, 30, 30, 30, 40, 40, 40, 100}, - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 60} + { 243, 243, 243, 200, 200, 200, 200, 160, 160, 160, 160, 160, 160, 70, 70, 70, 5}, // 0 spins + { 5, 5, 5, 25, 25, 25, 25, 5, 5, 5, 5, 5, 5, 2, 2, 2, 6}, // 1 spin + { 4, 4, 4, 25, 25, 25, 25, 30, 30, 30, 30, 30, 30, 40, 40, 40, 35}, // 2 spins + { 2, 2, 2, 3, 3, 3, 3, 30, 30, 30, 30, 30, 30, 100, 100, 100, 50}, // 3 spins + { 1, 1, 1, 2, 2, 2, 2, 30, 30, 30, 30, 30, 30, 40, 40, 40, 100}, // 4 spins + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 60} // 5 spins }; static const u16 sReelTimeExplodeProbability[] = { 128, 175, 200, 225, 256 }; -static const u16 sReelIncrementTable[][2] = { +// Column 0: Probability of half-speed +// Column 1: Base probability of quarter-speed +static const u16 sReelTimeSpeed_Probabilities[][2] = { {10, 5}, {10, 10}, {10, 15}, @@ -4912,55 +5463,62 @@ static const u16 sReelIncrementTable[][2] = { {10, 35} }; -static const u16 sReelTimeBonusIncrementTable[] = { +// Boosted odds of quarter speed during ReelTime +static const u16 sQuarterSpeed_ProbabilityBoost[] = { 0, 5, 10, 15, 20 }; -// tentative name static const u8 sBiasTags[] = { - GFXTAG_REPLAY, GFXTAG_CHERRY, GFXTAG_LOTAD, GFXTAG_AZURILL, GFXTAG_POWER, GFXTAG_7_RED, GFXTAG_7_RED, GFXTAG_7_RED + GFXTAG_REPLAY, // BIAS_REPLAY + GFXTAG_CHERRY, // BIAS_CHERRY + GFXTAG_LOTAD, // BIAS_LOTAD + GFXTAG_AZURILL, // BIAS_AZURILL + GFXTAG_POWER, // BIAS_POWER + GFXTAG_7_RED, // BIAS_REELTIME + GFXTAG_7_RED, // BIAS_MIXED_7 + GFXTAG_7_RED // BIAS_STRAIGHT_7 }; -static const u16 sLuckyFlagSettings_Top3[] = { - LUCKY_BIAS_777, LUCKY_BIAS_REELTIME, LUCKY_BIAS_MIXED_777 +static const u16 sBiasesSpecial[] = { + BIAS_STRAIGHT_7, BIAS_REELTIME, BIAS_MIXED_7 }; -static const u16 sLuckyFlagSettings_NotTop3[] = { - LUCKY_BIAS_POWER, LUCKY_BIAS_AZURILL, LUCKY_BIAS_LOTAD, LUCKY_BIAS_CHERRY, LUCKY_BIAS_REPLAY +static const u16 sBiasesRegular[] = { + BIAS_POWER, BIAS_AZURILL, BIAS_LOTAD, BIAS_CHERRY, BIAS_REPLAY }; -static const u8 sSymToMatch[] = { - [GFXTAG_7_RED] = MATCHED_777_RED, - [GFXTAG_7_BLUE] = MATCHED_777_BLUE, - [GFXTAG_AZURILL] = MATCHED_AZURILL, - [GFXTAG_LOTAD] = MATCHED_LOTAD, - [GFXTAG_CHERRY] = MATCHED_1CHERRY, - [GFXTAG_POWER] = MATCHED_POWER, - [GFXTAG_REPLAY] = MATCHED_REPLAY +static const u8 sTagToMatch[] = { + [GFXTAG_7_RED] = MATCH_RED_7, + [GFXTAG_7_BLUE] = MATCH_BLUE_7, + [GFXTAG_AZURILL] = MATCH_AZURILL, + [GFXTAG_LOTAD] = MATCH_LOTAD, + [GFXTAG_CHERRY] = MATCH_CHERRY, + [GFXTAG_POWER] = MATCH_POWER, + [GFXTAG_REPLAY] = MATCH_REPLAY }; static const u16 sSlotMatchFlags[] = { - [MATCHED_1CHERRY] = 1 << MATCHED_1CHERRY, - [MATCHED_2CHERRY] = 1 << MATCHED_2CHERRY, - [MATCHED_REPLAY] = 1 << MATCHED_REPLAY, - [MATCHED_LOTAD] = 1 << MATCHED_LOTAD, - [MATCHED_AZURILL] = 1 << MATCHED_AZURILL, - [MATCHED_POWER] = 1 << MATCHED_POWER, - [MATCHED_777_MIXED] = 1 << MATCHED_777_MIXED, - [MATCHED_777_RED] = 1 << MATCHED_777_RED, - [MATCHED_777_BLUE] = 1 << MATCHED_777_BLUE + [MATCH_CHERRY] = 1 << MATCH_CHERRY, + [MATCH_TOPBOT_CHERRY] = 1 << MATCH_TOPBOT_CHERRY, + [MATCH_REPLAY] = 1 << MATCH_REPLAY, + [MATCH_LOTAD] = 1 << MATCH_LOTAD, + [MATCH_AZURILL] = 1 << MATCH_AZURILL, + [MATCH_POWER] = 1 << MATCH_POWER, + [MATCH_MIXED_7] = 1 << MATCH_MIXED_7, + [MATCH_RED_7] = 1 << MATCH_RED_7, + [MATCH_BLUE_7] = 1 << MATCH_BLUE_7 }; static const u16 sSlotPayouts[] = { - [MATCHED_1CHERRY] = 2, - [MATCHED_2CHERRY] = 4, - [MATCHED_REPLAY] = 0, - [MATCHED_LOTAD] = 6, - [MATCHED_AZURILL] = 12, - [MATCHED_POWER] = 3, - [MATCHED_777_MIXED] = 90, - [MATCHED_777_RED] = 300, - [MATCHED_777_BLUE] = 300 + [MATCH_CHERRY] = 2, + [MATCH_TOPBOT_CHERRY] = 4, + [MATCH_REPLAY] = 0, + [MATCH_LOTAD] = 6, + [MATCH_AZURILL] = 12, + [MATCH_POWER] = 3, + [MATCH_MIXED_7] = 90, + [MATCH_RED_7] = 300, + [MATCH_BLUE_7] = 300 }; static const s16 sDigitalDisplay_SpriteCoords[][2] = { @@ -7174,37 +7732,37 @@ static const u16 sTopRowLit_Pal[] = {RGB(31, 29, 16)}; static const u16 sBottomRowt_Pal[] = {RGB(31, 29, 16)}; static const u16 sNWSEDiagLit_Pal[] = {RGB(31, 21, 18)}; static const u16 sNESWDiagLit_Pal[] = {RGB(31, 21, 18)}; -static const u16 *const sLitMatchLinePalTable[NUM_MATCH_LINES] = +static const u16 *const sLitMatchLinePalTable[NUM_MATCH_ROWS] = { - [MATCH_MIDDLE_ROW] = sMiddleRowLit_Pal, - [MATCH_TOP_ROW] = sTopRowLit_Pal, - [MATCH_BOTTOM_ROW] = sBottomRowt_Pal, - [MATCH_NWSE_DIAG] = sNWSEDiagLit_Pal, - [MATCH_NESW_DIAG] = sNESWDiagLit_Pal, + [ROW_MIDDLE] = sMiddleRowLit_Pal, + [ROW_TOP] = sTopRowLit_Pal, + [ROW_BOTTOM] = sBottomRowt_Pal, + [ROW_DIAG_NWSE] = sNWSEDiagLit_Pal, + [ROW_DIAG_NESW] = sNESWDiagLit_Pal, }; -static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_LINES] = +static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_ROWS] = { - [MATCH_MIDDLE_ROW] = &gSlotMachineMenu_Pal[74], - [MATCH_TOP_ROW] = &gSlotMachineMenu_Pal[75], - [MATCH_BOTTOM_ROW] = &gSlotMachineMenu_Pal[76], - [MATCH_NWSE_DIAG] = &gSlotMachineMenu_Pal[77], - [MATCH_NESW_DIAG] = &gSlotMachineMenu_Pal[78], + [ROW_MIDDLE] = &gSlotMachineMenu_Pal[74], + [ROW_TOP] = &gSlotMachineMenu_Pal[75], + [ROW_BOTTOM] = &gSlotMachineMenu_Pal[76], + [ROW_DIAG_NWSE] = &gSlotMachineMenu_Pal[77], + [ROW_DIAG_NESW] = &gSlotMachineMenu_Pal[78], }; -static const u8 sMatchLinePalOffsets[NUM_MATCH_LINES] = { - [MATCH_MIDDLE_ROW] = 74, - [MATCH_TOP_ROW] = 75, - [MATCH_BOTTOM_ROW] = 76, - [MATCH_NWSE_DIAG] = 78, // Diag colors flipped for some reason - [MATCH_NESW_DIAG] = 77 // Doesn't matter as both are identical +static const u8 sMatchLinePalOffsets[NUM_MATCH_ROWS] = { + [ROW_MIDDLE] = 74, + [ROW_TOP] = 75, + [ROW_BOTTOM] = 76, + [ROW_DIAG_NWSE] = 78, // Diag colors flipped for some reason + [ROW_DIAG_NESW] = 77 // Doesn't matter as both are identical }; static const u8 sBetToMatchLineIds[MAX_BET][2] = { - {MATCH_MIDDLE_ROW, MATCH_MIDDLE_ROW}, // Bet 1 - {MATCH_TOP_ROW, MATCH_BOTTOM_ROW}, // Bet 2 - {MATCH_NWSE_DIAG, MATCH_NESW_DIAG}, // Bet 3 + {ROW_MIDDLE, ROW_MIDDLE}, // Bet 1 + {ROW_TOP, ROW_BOTTOM}, // Bet 2 + {ROW_DIAG_NWSE, ROW_DIAG_NESW}, // Bet 3 }; static const u8 sMatchLinesPerBet[MAX_BET] = { 1, 2, 2 }; From 50cb504d4cf6de822f56d3e110015e626b811186 Mon Sep 17 00:00:00 2001 From: hondew Date: Sun, 20 Feb 2022 10:15:07 -0500 Subject: [PATCH 385/417] Remove stuff --- src/slot_machine.c | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/src/slot_machine.c b/src/slot_machine.c index 9db6e67fdf..9c81bcfb69 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -295,9 +295,6 @@ enum { DIG_DISPLAY_BONUS_BIG }; -// DO NOT SUBMIT until committing in the 'DO NOT SUBMIT' state. -// Keep for posterity as more of an unabridged explanation. - // How ReelTime works // ================== // Entering ReelTime: @@ -1781,13 +1778,6 @@ static void DrawMachineBias(void) if (sSlotMachine->reelTimeSpinsLeft == 0) { - // DO NOT SUBMIT until deleting this!!! Test code to see effects of - // power bolts on ReelTime. - // if ((Random() % 100) < 30) { - // sSlotMachine->machineBias = BIAS_REELTIME; - // } else { - // sSlotMachine->machineBias = BIAS_POWER; - // } if (!(sSlotMachine->machineBias & (BIAS_STRAIGHT_7 | BIAS_MIXED_7))) { if (ShouldTrySpecialBias()) @@ -2556,39 +2546,12 @@ static bool8 DecideStop_Bias_Reel2_Bet3(void) // If you can line up the bias tag in the same row as reel 1 within 4 turns if (DecideStop_Bias_Reel2_Bet1or2()) { - // DO NOT SUBMIT until cleaning up this long-winded musing on Game - // Freak's choices... - // - // QUESTION: Why is the 2-3 turn requirement in place?? That leaves out - // some potential middle row matches. E.g., - // - Bias tag in top of reel 1 and it takes 1 turn to get it in the top - // of reel 2 - // - Bias tag in bottom row of reel 1 and it takes 4 turns to get it in - // the bottom row of reel 2 - // * In both cases above, it would have been possible to get the bias - // tag in the middle row of reel 2, but we aren't considering it... - // It'll just be matched in the same row instead - // - // The exact intent is a bit unclear. It could either be: - // 1. Skewing toward a diagonal match rather than a straight match with - // 2/5 probability. - // 2. A programming error: They meant to guard against scenarios where a - // match in the middle is impossible within 4 turns. E.g., - // - Bias tag in top of reel 1 and it would take 5 turns to get it - // to match in the middle of reel 2 - // - Bias tag in bottom of reel 1 and bias tag is currently in - // bottom of reel 2 - // But if this were the case, you would expect the inequality to be - // sSlotMachine->reelExtraTurns[1] >= 1 ... - // * I'll give them the benefit of the doubt and assume it was (1). - // After all, the fact that they then check whether it's even - // possible to match in the middle makes (2) redundant. - // // If bias tag is not in the middle row of reel 1 and it takes either // 2 or 3 turns to get it in the same row for reel 2 if (sSlotMachine->winnerRows[0] != 2 && sSlotMachine->reelExtraTurns[1] > 1 && sSlotMachine->reelExtraTurns[1] != 4) { - // Try to match the bias tag in middle row of reel 2 within 4 turns + // Try turning this into a diagonal match by lining up the bias tag + // in the middle row of reel 2 within 4 turns. for (i = 0; i <= 4; i++) { if (GetTag(MIDDLE_REEL, 2 - i) == sSlotMachine->biasTag) From a578fa5e2bf34c32d7d6325ee255a73e9bd76a06 Mon Sep 17 00:00:00 2001 From: hondew Date: Sun, 20 Feb 2022 12:06:29 -0500 Subject: [PATCH 386/417] Minor fixes --- src/slot_machine.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/slot_machine.c b/src/slot_machine.c index 9c81bcfb69..5a077da2df 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -295,6 +295,7 @@ enum { DIG_DISPLAY_BONUS_BIG }; + // How ReelTime works // ================== // Entering ReelTime: @@ -321,7 +322,8 @@ enum { // extra turns to manipulate the outcome. // - ReelTime ends early if you win red 7's or blue 7's. -// Field explanations: + +// SlotMachine field explanations: // // luckyGame: // Determined at random when you start playing. Some events modify this: @@ -2566,11 +2568,11 @@ static bool8 DecideStop_Bias_Reel2_Bet3(void) } // If you can't line up the bias tag in the same row in 4 turns, and the - // bias tag is not in the middle row of reel 1. Adds coverage for the two - // cases mentioned above. + // bias tag is not in the middle row of reel 1 if (sSlotMachine->winnerRows[0] != 2) { - // Try to match the bias tag in middle row of reel 2 within 4 turns + // Try to match the bias tag in middle row of reel 2 within 4 turns. + // Adds coverage for the two cases mentioned above. for (i = 0; i <= 4; i++) { if (GetTag(MIDDLE_REEL, 2 - i) == sSlotMachine->biasTag) @@ -7697,35 +7699,35 @@ static const u16 sNWSEDiagLit_Pal[] = {RGB(31, 21, 18)}; static const u16 sNESWDiagLit_Pal[] = {RGB(31, 21, 18)}; static const u16 *const sLitMatchLinePalTable[NUM_MATCH_ROWS] = { - [ROW_MIDDLE] = sMiddleRowLit_Pal, - [ROW_TOP] = sTopRowLit_Pal, - [ROW_BOTTOM] = sBottomRowt_Pal, - [ROW_DIAG_NWSE] = sNWSEDiagLit_Pal, - [ROW_DIAG_NESW] = sNESWDiagLit_Pal, + [ROW_MIDDLE] = sMiddleRowLit_Pal, + [ROW_TOP] = sTopRowLit_Pal, + [ROW_BOTTOM] = sBottomRowt_Pal, + [ROW_DIAG_NWSE] = sNWSEDiagLit_Pal, + [ROW_DIAG_NESW] = sNESWDiagLit_Pal, }; static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_ROWS] = { - [ROW_MIDDLE] = &gSlotMachineMenu_Pal[74], - [ROW_TOP] = &gSlotMachineMenu_Pal[75], - [ROW_BOTTOM] = &gSlotMachineMenu_Pal[76], - [ROW_DIAG_NWSE] = &gSlotMachineMenu_Pal[77], - [ROW_DIAG_NESW] = &gSlotMachineMenu_Pal[78], + [ROW_MIDDLE] = &gSlotMachineMenu_Pal[74], + [ROW_TOP] = &gSlotMachineMenu_Pal[75], + [ROW_BOTTOM] = &gSlotMachineMenu_Pal[76], + [ROW_DIAG_NWSE] = &gSlotMachineMenu_Pal[77], + [ROW_DIAG_NESW] = &gSlotMachineMenu_Pal[78], }; static const u8 sMatchLinePalOffsets[NUM_MATCH_ROWS] = { - [ROW_MIDDLE] = 74, - [ROW_TOP] = 75, - [ROW_BOTTOM] = 76, - [ROW_DIAG_NWSE] = 78, // Diag colors flipped for some reason - [ROW_DIAG_NESW] = 77 // Doesn't matter as both are identical + [ROW_MIDDLE] = 74, + [ROW_TOP] = 75, + [ROW_BOTTOM] = 76, + [ROW_DIAG_NWSE] = 78, // Diag colors flipped for some reason + [ROW_DIAG_NESW] = 77 // Doesn't matter as both are identical }; static const u8 sBetToMatchLineIds[MAX_BET][2] = { - {ROW_MIDDLE, ROW_MIDDLE}, // Bet 1 - {ROW_TOP, ROW_BOTTOM}, // Bet 2 - {ROW_DIAG_NWSE, ROW_DIAG_NESW}, // Bet 3 + {ROW_MIDDLE, ROW_MIDDLE}, // Bet 1 + {ROW_TOP, ROW_BOTTOM}, // Bet 2 + {ROW_DIAG_NWSE, ROW_DIAG_NESW}, // Bet 3 }; static const u8 sMatchLinesPerBet[MAX_BET] = { 1, 2, 2 }; From 26e87eed0a09379efcb50ace4c2f2fe8143e7c0e Mon Sep 17 00:00:00 2001 From: hondew Date: Sun, 20 Feb 2022 15:32:32 -0500 Subject: [PATCH 387/417] Address comments --- src/slot_machine.c | 146 ++++++++++++++++++++++++--------------------- 1 file changed, 77 insertions(+), 69 deletions(-) diff --git a/src/slot_machine.c b/src/slot_machine.c index 5a077da2df..f95cc98b70 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -65,6 +65,14 @@ #define BIAS_SPECIAL (BIAS_7 | BIAS_REELTIME) #define BIAS_REGULAR (BIAS_REPLAY | BIAS_CHERRY | BIAS_LOATAD | BIAS_AZURILL | BIAS_POWER) +// The slot machine will try to manipulate the outcome by adding up to 4 extra +// turns to the reel after you press stop. +// +// The only exception is when it is stopping the third reel and it has decided +// you will lose. In this case, it adds as many turns as necessary to prevent a +// match. +#define MAX_EXTRA_TURNS 4 + enum { GFXTAG_7_RED, GFXTAG_7_BLUE, @@ -122,12 +130,12 @@ enum { }; enum { - ROW_MIDDLE, - ROW_TOP, - ROW_BOTTOM, - ROW_DIAG_NWSE, - ROW_DIAG_NESW, - NUM_MATCH_ROWS, + MATCH_MIDDLE_ROW, + MATCH_TOP_ROW, + MATCH_BOTTOM_ROW, + MATCH_NWSE_DIAG, + MATCH_NESW_DIAG, + NUM_MATCH_LINES, }; enum { @@ -374,7 +382,7 @@ struct SlotMachine /*0x41*/ u8 reelTimeExplosionSpriteId; /*0x42*/ u8 reelTimeBrokenMachineSpriteId; /*0x43*/ u8 reelTimeSmokeSpriteId; - /*0x44*/ u8 flashMatchLineSpriteIds[NUM_MATCH_ROWS]; + /*0x44*/ u8 flashMatchLineSpriteIds[NUM_MATCH_LINES]; /*0x49*/ u8 reelTimeMachineSpriteIds[2]; /*0x49*/ u8 reelTimeNumberSpriteIds[3]; /*0x4E*/ u8 reelTimeShadowSpriteIds[2]; @@ -694,9 +702,9 @@ static const u8 sReelTimeProbabilities_LuckyGame[][17]; static const u8 sTagToMatch[]; static const u8 sReelTimeTags[]; static const u8 sReelTileTags[NUM_REELS][TAGS_PER_REEL]; -static const u16 *const sLitMatchLinePalTable[NUM_MATCH_ROWS]; -static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_ROWS]; -static const u8 sMatchLinePalOffsets[NUM_MATCH_ROWS]; +static const u16 *const sLitMatchLinePalTable[NUM_MATCH_LINES]; +static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_LINES]; +static const u8 sMatchLinePalOffsets[NUM_MATCH_LINES]; static const u8 sBetToMatchLineIds[MAX_BET][2]; static const u8 sMatchLinesPerBet[MAX_BET]; static const u16 *const sFlashingLightsPalTable[]; @@ -1985,7 +1993,7 @@ static void CheckMatch_CenterRow(void) { sSlotMachine->payout += sSlotPayouts[match]; sSlotMachine->matches |= sSlotMatchFlags[match]; - FlashMatchLine(ROW_MIDDLE); + FlashMatchLine(MATCH_MIDDLE_ROW); } } @@ -2003,7 +2011,7 @@ static void CheckMatch_TopAndBottom(void) match = MATCH_TOPBOT_CHERRY; sSlotMachine->payout += sSlotPayouts[match]; sSlotMachine->matches |= sSlotMatchFlags[match]; - FlashMatchLine(ROW_TOP); + FlashMatchLine(MATCH_TOP_ROW); } tag1 = GetTagAtRest(LEFT_REEL, 3); tag2 = GetTagAtRest(MIDDLE_REEL, 3); @@ -2015,7 +2023,7 @@ static void CheckMatch_TopAndBottom(void) match = MATCH_TOPBOT_CHERRY; sSlotMachine->payout += sSlotPayouts[match]; sSlotMachine->matches |= sSlotMatchFlags[match]; - FlashMatchLine(ROW_BOTTOM); + FlashMatchLine(MATCH_BOTTOM_ROW); } } @@ -2036,7 +2044,7 @@ static void CheckMatch_Diagonals(void) sSlotMachine->payout += sSlotPayouts[match]; sSlotMachine->matches |= sSlotMatchFlags[match]; } - FlashMatchLine(ROW_DIAG_NWSE); + FlashMatchLine(MATCH_NWSE_DIAG); } tag1 = GetTagAtRest(LEFT_REEL, 3); tag2 = GetTagAtRest(MIDDLE_REEL, 2); @@ -2051,7 +2059,7 @@ static void CheckMatch_Diagonals(void) sSlotMachine->payout += sSlotPayouts[match]; sSlotMachine->matches |= sSlotMatchFlags[match]; } - FlashMatchLine(ROW_DIAG_NESW); + FlashMatchLine(MATCH_NESW_DIAG); } } @@ -2382,9 +2390,9 @@ static bool8 EitherTagAtPos_Reel1(s16 pos, u8 tag1, u8 tag2) // of turns. static bool8 AreCherriesOnScreen_Reel1(s16 turns) { - if (GetTag(LEFT_REEL, 1 - turns) == GFXTAG_CHERRY || - GetTag(LEFT_REEL, 2 - turns) == GFXTAG_CHERRY || - GetTag(LEFT_REEL, 3 - turns) == GFXTAG_CHERRY) + if (GetTag(LEFT_REEL, 1 - turns) == GFXTAG_CHERRY + || GetTag(LEFT_REEL, 2 - turns) == GFXTAG_CHERRY + || GetTag(LEFT_REEL, 3 - turns) == GFXTAG_CHERRY) return TRUE; else return FALSE; @@ -2404,7 +2412,7 @@ static bool8 DecideStop_Bias_Reel1_Bet1(u8 tag1, u8 tag2) { s16 i; - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (EitherTagAtPos_Reel1(2 - i, tag1, tag2)) { @@ -2458,7 +2466,7 @@ static bool8 DecideStop_Bias_Reel1_Bet2or3(u8 tag1, u8 tag2) } // Check the next 4 turns - for (i = 1; i <= 4; i++) + for (i = 1; i <= MAX_EXTRA_TURNS; i++) { bool8 cherry7BiasCopy = cherry7Bias; // redundant if (cherry7BiasCopy || !AreCherriesOnScreen_Reel1(i)) @@ -2498,7 +2506,7 @@ static bool8 DecideStop_Bias_Reel2_Bet1or2(void) s16 i; s16 reel1BiasRow = sSlotMachine->winnerRows[0]; - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (GetTag(MIDDLE_REEL, reel1BiasRow - i) == sSlotMachine->biasTag) { @@ -2554,7 +2562,7 @@ static bool8 DecideStop_Bias_Reel2_Bet3(void) { // Try turning this into a diagonal match by lining up the bias tag // in the middle row of reel 2 within 4 turns. - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (GetTag(MIDDLE_REEL, 2 - i) == sSlotMachine->biasTag) { @@ -2573,7 +2581,7 @@ static bool8 DecideStop_Bias_Reel2_Bet3(void) { // Try to match the bias tag in middle row of reel 2 within 4 turns. // Adds coverage for the two cases mentioned above. - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (GetTag(MIDDLE_REEL, 2 - i) == sSlotMachine->biasTag) { @@ -2609,7 +2617,7 @@ static bool8 DecideStop_Bias_Reel3_Bet1or2(u8 biasTag) s16 i; s16 reel2BiasRow = sSlotMachine->winnerRows[1]; - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (GetTag(RIGHT_REEL, reel2BiasRow - i) == biasTag) { @@ -2638,7 +2646,7 @@ static bool8 DecideStop_Bias_Reel3_Bet3(u8 biasTag) biasRow = 3; else biasRow = 1; - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (GetTag(RIGHT_REEL, biasRow - i) == biasTag) { @@ -2665,16 +2673,16 @@ static void DecideStop_NoBias_Reel1(void) // If the bias tag is one of the 7's, switch to the opposite color and return // true. Otherwise, return false. -static bool8 IfTag7_SwitchColor(u8 *tagPtr) +static bool8 IfTag7_SwitchColor(u8 *tag) { - if (*tagPtr == GFXTAG_7_RED) + if (*tag == GFXTAG_7_RED) { - *tagPtr = GFXTAG_7_BLUE; + *tag = GFXTAG_7_BLUE; return TRUE; } - if (*tagPtr == GFXTAG_7_BLUE) + if (*tag == GFXTAG_7_BLUE) { - *tagPtr = GFXTAG_7_RED; + *tag = GFXTAG_7_RED; return TRUE; } return FALSE; @@ -2714,7 +2722,7 @@ static void DecideStop_NoBias_Reel2_Bet1(void) if (IfTag7_SwitchColor(&reel1MiddleTag)) { s16 i; - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (reel1MiddleTag == GetTag(MIDDLE_REEL, 2 - i)) { @@ -2745,7 +2753,7 @@ static void DecideStop_NoBias_Reel2_Bet2(void) if (IfTag7_SwitchColor(&reel1BiasTag)) { s16 i; - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (reel1BiasTag == GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[0] - i)) { @@ -2835,7 +2843,7 @@ static void DecideStop_NoBias_Reel2_Bet3(void) // Check if opposite-color 7 will appear in same row as reel 1 in // over the next 4 turns - for (j = 1; j <= 4; j++) + for (j = 1; j <= MAX_EXTRA_TURNS; j++) { if (reel1BiasTag == GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[0] - j)) { @@ -2904,11 +2912,11 @@ static bool8 MismatchedTags_777(u8 tag1, u8 tag2, u8 tag3) // Note, this does not account for cherry matches. static bool8 NeitherMatchNor7Mismatch(u8 tag1, u8 tag2, u8 tag3) { - if ((tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) || - (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) || - (tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) || - (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) || - (tag1 == tag2 && tag1 == tag3)) + if ((tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) + || (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) + || (tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) + || (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) + || (tag1 == tag2 && tag1 == tag3)) { return FALSE; } @@ -2948,9 +2956,9 @@ static void DecideStop_NoBias_Reel3_Bet1(void) while (TRUE) { u8 tag3; - if (!((tag1 == (tag3 = GetTag(RIGHT_REEL, 2 - i))) || - (tag1 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) || - (tag1 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED))) + if (!((tag1 == (tag3 = GetTag(RIGHT_REEL, 2 - i))) + || (tag1 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) + || (tag1 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED))) break; i++; } @@ -2962,7 +2970,7 @@ static void DecideStop_NoBias_Reel3_Bet1(void) // turns if (sSlotMachine->machineBias & BIAS_STRAIGHT_7) { - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { if (tag1 == GetTag(RIGHT_REEL, 2 - i)) { @@ -3023,7 +3031,7 @@ static void DecideStop_NoBias_Reel3_Bet2(void) if (MismatchedTags_77(tag1, tag2)) { // Iterate over the next 4 turns - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { tag3 = GetTag(RIGHT_REEL, sSlotMachine->winnerRows[1] - i); if (tag1 == tag3) @@ -3124,7 +3132,7 @@ static void DecideStop_NoBias_Reel3_Bet3(void) row = 1; if (sSlotMachine->winnerRows[0] == 1) row = 3; - for (i = 0; i <= 4; i++) + for (i = 0; i <= MAX_EXTRA_TURNS; i++) { tag3 = GetTag(RIGHT_REEL, row - (sSlotMachine->reelExtraTurns[2] + i)); if (tag1 == tag3) @@ -3142,8 +3150,8 @@ static void DecideStop_NoBias_Reel3_Bet3(void) tag1 = GetTag(LEFT_REEL, 1 - sSlotMachine->reelExtraTurns[0]); tag2 = GetTag(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); tag3 = GetTag(RIGHT_REEL, 3 - sSlotMachine->reelExtraTurns[2]); - if (NeitherMatchNor7Mismatch(tag1, tag2, tag3) || - (MismatchedTags_777(tag1, tag2, tag3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) + if (NeitherMatchNor7Mismatch(tag1, tag2, tag3) + || (MismatchedTags_777(tag1, tag2, tag3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) break; sSlotMachine->reelExtraTurns[2]++; } @@ -3154,8 +3162,8 @@ static void DecideStop_NoBias_Reel3_Bet3(void) tag1 = GetTag(LEFT_REEL, 3 - sSlotMachine->reelExtraTurns[0]); tag2 = GetTag(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); tag3 = GetTag(RIGHT_REEL, 1 - sSlotMachine->reelExtraTurns[2]); - if (NeitherMatchNor7Mismatch(tag1, tag2, tag3) || - (MismatchedTags_777(tag1, tag2, tag3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) + if (NeitherMatchNor7Mismatch(tag1, tag2, tag3) + || (MismatchedTags_777(tag1, tag2, tag3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) break; sSlotMachine->reelExtraTurns[2]++; } @@ -7697,37 +7705,37 @@ static const u16 sTopRowLit_Pal[] = {RGB(31, 29, 16)}; static const u16 sBottomRowt_Pal[] = {RGB(31, 29, 16)}; static const u16 sNWSEDiagLit_Pal[] = {RGB(31, 21, 18)}; static const u16 sNESWDiagLit_Pal[] = {RGB(31, 21, 18)}; -static const u16 *const sLitMatchLinePalTable[NUM_MATCH_ROWS] = +static const u16 *const sLitMatchLinePalTable[NUM_MATCH_LINES] = { - [ROW_MIDDLE] = sMiddleRowLit_Pal, - [ROW_TOP] = sTopRowLit_Pal, - [ROW_BOTTOM] = sBottomRowt_Pal, - [ROW_DIAG_NWSE] = sNWSEDiagLit_Pal, - [ROW_DIAG_NESW] = sNESWDiagLit_Pal, + [MATCH_MIDDLE_ROW] = sMiddleRowLit_Pal, + [MATCH_TOP_ROW] = sTopRowLit_Pal, + [MATCH_BOTTOM_ROW] = sBottomRowt_Pal, + [MATCH_NWSE_DIAG] = sNWSEDiagLit_Pal, + [MATCH_NESW_DIAG] = sNESWDiagLit_Pal, }; -static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_ROWS] = +static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_LINES] = { - [ROW_MIDDLE] = &gSlotMachineMenu_Pal[74], - [ROW_TOP] = &gSlotMachineMenu_Pal[75], - [ROW_BOTTOM] = &gSlotMachineMenu_Pal[76], - [ROW_DIAG_NWSE] = &gSlotMachineMenu_Pal[77], - [ROW_DIAG_NESW] = &gSlotMachineMenu_Pal[78], + [MATCH_MIDDLE_ROW] = &gSlotMachineMenu_Pal[74], + [MATCH_TOP_ROW] = &gSlotMachineMenu_Pal[75], + [MATCH_BOTTOM_ROW] = &gSlotMachineMenu_Pal[76], + [MATCH_NWSE_DIAG] = &gSlotMachineMenu_Pal[77], + [MATCH_NESW_DIAG] = &gSlotMachineMenu_Pal[78], }; -static const u8 sMatchLinePalOffsets[NUM_MATCH_ROWS] = { - [ROW_MIDDLE] = 74, - [ROW_TOP] = 75, - [ROW_BOTTOM] = 76, - [ROW_DIAG_NWSE] = 78, // Diag colors flipped for some reason - [ROW_DIAG_NESW] = 77 // Doesn't matter as both are identical +static const u8 sMatchLinePalOffsets[NUM_MATCH_LINES] = { + [MATCH_MIDDLE_ROW] = 74, + [MATCH_TOP_ROW] = 75, + [MATCH_BOTTOM_ROW] = 76, + [MATCH_NWSE_DIAG] = 78, // Diag colors flipped for some reason + [MATCH_NESW_DIAG] = 77 // Doesn't matter as both are identical }; static const u8 sBetToMatchLineIds[MAX_BET][2] = { - {ROW_MIDDLE, ROW_MIDDLE}, // Bet 1 - {ROW_TOP, ROW_BOTTOM}, // Bet 2 - {ROW_DIAG_NWSE, ROW_DIAG_NESW}, // Bet 3 + {MATCH_MIDDLE_ROW, MATCH_MIDDLE_ROW}, // Bet 1 + {MATCH_TOP_ROW, MATCH_BOTTOM_ROW}, // Bet 2 + {MATCH_NWSE_DIAG, MATCH_NESW_DIAG}, // Bet 3 }; static const u8 sMatchLinesPerBet[MAX_BET] = { 1, 2, 2 }; From 39fc1cd414b93b2a9ec7fcde2710081f8ecffe9f Mon Sep 17 00:00:00 2001 From: hondew Date: Sun, 20 Feb 2022 16:43:06 -0500 Subject: [PATCH 388/417] Switch to 'symbol' nomenclature --- src/slot_machine.c | 670 +++++++++++++++++++++++---------------------- 1 file changed, 342 insertions(+), 328 deletions(-) diff --git a/src/slot_machine.c b/src/slot_machine.c index f95cc98b70..6935631f8c 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -31,13 +31,13 @@ #define SLOTMACHINE_GFX_TILES 233 #define MAX_BET 3 -#define TAGS_PER_REEL 21 -#define TAG_HEIGHT 24 -#define REEL_HEIGHT (TAGS_PER_REEL * TAG_HEIGHT) +#define SYBMOLS_PER_REEL 21 +#define REEL_SYMBOL_HEIGHT 24 +#define REEL_HEIGHT (SYBMOLS_PER_REEL * REEL_SYMBOL_HEIGHT) -#define REELTIME_TAGS 6 -#define REELTIME_TAG_HEIGHT 20 -#define REELTIME_REEL_HEIGHT (REELTIME_TAGS * REELTIME_TAG_HEIGHT) +#define REELTIME_SYMBOLS 6 +#define REELTIME_SYMBOL_HEIGHT 20 +#define REELTIME_REEL_HEIGHT (REELTIME_SYMBOLS * REELTIME_SYMBOL_HEIGHT) // There are three categories of biases: 7's, ReelTime, Regular // - 7's: BIAS_STRAIGHT_7, BIAS_MIXED_7 @@ -74,6 +74,17 @@ #define MAX_EXTRA_TURNS 4 enum { + SYMBOL_7_RED, + SYMBOL_7_BLUE, + SYMBOL_AZURILL, + SYMBOL_LOTAD, + SYMBOL_CHERRY, + SYMBOL_POWER, + SYMBOL_REPLAY, +}; + +enum +{ GFXTAG_7_RED, GFXTAG_7_BLUE, GFXTAG_AZURILL, @@ -357,7 +368,7 @@ struct SlotMachine /*0x04*/ u8 machineBias; /*0x05*/ u8 reelTimeDraw; /*0x06*/ bool8 didNotFailBias; - /*0x07*/ u8 biasTag; + /*0x07*/ u8 biasSymbol; /*0x08*/ u16 matches; /*0x0A*/ u8 reelTimeSpinsLeft; /*0x0B*/ u8 reelTimeSpinsUsed; @@ -463,14 +474,14 @@ static void CheckMatch(void); static void CheckMatch_CenterRow(void); static void CheckMatch_TopAndBottom(void); static void CheckMatch_Diagonals(void); -static u8 GetMatchFromTags(u8, u8, u8); +static u8 GetMatchFromSymbols(u8, u8, u8); static void AwardPayout(void); static void Task_Payout(u8); static bool8 IsFinalTask_Task_Payout(void); static bool8 PayoutTask_Init(struct Task *); static bool8 PayoutTask_GivePayout(struct Task *); static bool8 PayoutTask_Free(struct Task *); -static u8 GetTagAtRest(u8, s16); +static u8 GetSymbolAtRest(u8, s16); static void CreateReelTasks(void); static void SpinSlotReel(u8); static void StopSlotReel(u8); @@ -671,7 +682,7 @@ static struct SpriteFrameImage *sImageTables_DigitalDisplay[NUM_DIG_DISPLAY_SPRI static const struct DigitalDisplaySprite *const sDigitalDisplayScenes[]; static const u16 sUnkPalette[]; static const u8 sSpecialDrawOdds[NUM_SLOT_MACHINE_IDS][MAX_BET]; -static const u8 sBiasTags[]; +static const u8 sBiasSymbols[]; static const u16 sBiasesSpecial[3]; static const u16 sBiasesRegular[5]; static const s16 sDigitalDisplay_SpriteCoords[][2]; @@ -699,9 +710,9 @@ static const u8 sBiasProbabilities_Special[][NUM_SLOT_MACHINE_IDS]; static const u8 sBiasProbabilities_Regular[][NUM_SLOT_MACHINE_IDS]; static const u8 sReelTimeProbabilities_NormalGame[][17]; static const u8 sReelTimeProbabilities_LuckyGame[][17]; -static const u8 sTagToMatch[]; -static const u8 sReelTimeTags[]; -static const u8 sReelTileTags[NUM_REELS][TAGS_PER_REEL]; +static const u8 sSymbolToMatch[]; +static const u8 sReelTimeSymbols[]; +static const u8 sReelSymbols[NUM_REELS][SYBMOLS_PER_REEL]; static const u16 *const sLitMatchLinePalTable[NUM_MATCH_LINES]; static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_LINES]; static const u8 sMatchLinePalOffsets[NUM_MATCH_LINES]; @@ -846,10 +857,10 @@ static bool8 (*const sReelTasks[])(struct Task *task) = [REEL_ACTION_STOP_SHAKE] = ReelTask_ShakingStop, }; -// Returns true if it is possible to match the bias tag in the reel. +// Returns true if it is possible to match the bias symbol in the reel. // // Modifies the winnerRows and reelExtraTurns to indicate how to match the bias -// tag. +// symbol. static bool8 (*const sDecideStop_Bias[NUM_REELS])(void) = { DecideStop_Bias_Reel1, @@ -872,7 +883,7 @@ static void (*const sDecideStop_NoBias[NUM_REELS])(void) = // The magnitude of the shock depends on how many extra turns are added. static const u16 sReelStopShocks[] = {2, 4, 4, 4, 8}; -static bool8 (*const sDecideStop_Bias_Reel1_Bets[MAX_BET])(u8 tag1, u8 tag2) = +static bool8 (*const sDecideStop_Bias_Reel1_Bets[MAX_BET])(u8 sym1, u8 sym2) = { DecideStop_Bias_Reel1_Bet1, DecideStop_Bias_Reel1_Bet2or3, @@ -886,7 +897,7 @@ static bool8 (*const sDecideStop_Bias_Reel2_Bets[MAX_BET])(void) = DecideStop_Bias_Reel2_Bet3, }; -static bool8 (*const sDecideStop_Bias_Reel3_Bets[MAX_BET])(u8 biasTag) = +static bool8 (*const sDecideStop_Bias_Reel3_Bets[MAX_BET])(u8 biasSymbol) = { DecideStop_Bias_Reel3_Bet1or2, DecideStop_Bias_Reel3_Bet1or2, @@ -1199,8 +1210,8 @@ static void InitSlotMachine(void) for (i = 0; i < NUM_REELS; i++) { sSlotMachine->reelShockOffsets[i] = 0; - sSlotMachine->reelPositions[i] = sInitialReelPositions[i][sSlotMachine->luckyGame] % TAGS_PER_REEL; - sSlotMachine->reelPixelOffsets[i] = REEL_HEIGHT - sSlotMachine->reelPositions[i] * TAG_HEIGHT; + sSlotMachine->reelPositions[i] = sInitialReelPositions[i][sSlotMachine->luckyGame] % SYBMOLS_PER_REEL; + sSlotMachine->reelPixelOffsets[i] = REEL_HEIGHT - sSlotMachine->reelPositions[i] * REEL_SYMBOL_HEIGHT; sSlotMachine->reelPixelOffsets[i] %= REEL_HEIGHT; } AlertTVThatPlayerPlayedSlotMachine(GetCoins()); @@ -1817,15 +1828,15 @@ static void ResetBiasFailure(void) sSlotMachine->didNotFailBias = TRUE; } -// See sBiasTags for each bias's corresponding tag. -static u8 GetBiasTag(u8 machineBias) +// See sBiasSymbols for each bias's corresponding symbol. +static u8 GetBiasSymbol(u8 machineBias) { u8 i; for (i = 0; i < 8; i++) { if (machineBias & 1) - return sBiasTags[i]; + return sBiasSymbols[i]; machineBias >>= 1; } return 0; @@ -1983,12 +1994,12 @@ static void CheckMatch(void) static void CheckMatch_CenterRow(void) { - u8 tag1, tag2, tag3, match; + u8 sym1, sym2, sym3, match; - tag1 = GetTagAtRest(LEFT_REEL, 2); - tag2 = GetTagAtRest(MIDDLE_REEL, 2); - tag3 = GetTagAtRest(RIGHT_REEL, 2); - match = GetMatchFromTags(tag1, tag2, tag3); + sym1 = GetSymbolAtRest(LEFT_REEL, 2); + sym2 = GetSymbolAtRest(MIDDLE_REEL, 2); + sym3 = GetSymbolAtRest(RIGHT_REEL, 2); + match = GetMatchFromSymbols(sym1, sym2, sym3); if (match != MATCH_NONE) { sSlotMachine->payout += sSlotPayouts[match]; @@ -1999,12 +2010,12 @@ static void CheckMatch_CenterRow(void) static void CheckMatch_TopAndBottom(void) { - u8 tag1, tag2, tag3, match; + u8 sym1, sym2, sym3, match; - tag1 = GetTagAtRest(LEFT_REEL, 1); - tag2 = GetTagAtRest(MIDDLE_REEL, 1); - tag3 = GetTagAtRest(RIGHT_REEL, 1); - match = GetMatchFromTags(tag1, tag2, tag3); + sym1 = GetSymbolAtRest(LEFT_REEL, 1); + sym2 = GetSymbolAtRest(MIDDLE_REEL, 1); + sym3 = GetSymbolAtRest(RIGHT_REEL, 1); + match = GetMatchFromSymbols(sym1, sym2, sym3); if (match != MATCH_NONE) { if (match == MATCH_CHERRY) @@ -2013,10 +2024,10 @@ static void CheckMatch_TopAndBottom(void) sSlotMachine->matches |= sSlotMatchFlags[match]; FlashMatchLine(MATCH_TOP_ROW); } - tag1 = GetTagAtRest(LEFT_REEL, 3); - tag2 = GetTagAtRest(MIDDLE_REEL, 3); - tag3 = GetTagAtRest(RIGHT_REEL, 3); - match = GetMatchFromTags(tag1, tag2, tag3); + sym1 = GetSymbolAtRest(LEFT_REEL, 3); + sym2 = GetSymbolAtRest(MIDDLE_REEL, 3); + sym3 = GetSymbolAtRest(RIGHT_REEL, 3); + match = GetMatchFromSymbols(sym1, sym2, sym3); if (match != MATCH_NONE) { if (match == MATCH_CHERRY) @@ -2029,12 +2040,12 @@ static void CheckMatch_TopAndBottom(void) static void CheckMatch_Diagonals(void) { - u8 tag1, tag2, tag3, match; + u8 sym1, sym2, sym3, match; - tag1 = GetTagAtRest(LEFT_REEL, 1); - tag2 = GetTagAtRest(MIDDLE_REEL, 2); - tag3 = GetTagAtRest(RIGHT_REEL, 3); - match = GetMatchFromTags(tag1, tag2, tag3); + sym1 = GetSymbolAtRest(LEFT_REEL, 1); + sym2 = GetSymbolAtRest(MIDDLE_REEL, 2); + sym3 = GetSymbolAtRest(RIGHT_REEL, 3); + match = GetMatchFromSymbols(sym1, sym2, sym3); if (match != MATCH_NONE) { // Don't add payout for cherry, since it's already counted in @@ -2046,10 +2057,10 @@ static void CheckMatch_Diagonals(void) } FlashMatchLine(MATCH_NWSE_DIAG); } - tag1 = GetTagAtRest(LEFT_REEL, 3); - tag2 = GetTagAtRest(MIDDLE_REEL, 2); - tag3 = GetTagAtRest(RIGHT_REEL, 1); - match = GetMatchFromTags(tag1, tag2, tag3); + sym1 = GetSymbolAtRest(LEFT_REEL, 3); + sym2 = GetSymbolAtRest(MIDDLE_REEL, 2); + sym3 = GetSymbolAtRest(RIGHT_REEL, 1); + match = GetMatchFromSymbols(sym1, sym2, sym3); if (match != MATCH_NONE) { // Don't add payout for cherry, since it's already counted in @@ -2063,15 +2074,15 @@ static void CheckMatch_Diagonals(void) } } -static u8 GetMatchFromTags(u8 tag1, u8 tag2, u8 tag3) +static u8 GetMatchFromSymbols(u8 sym1, u8 sym2, u8 sym3) { - if (tag1 == tag2 && tag1 == tag3) - return sTagToMatch[tag1]; - if (tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) + if (sym1 == sym2 && sym1 == sym3) + return sSymbolToMatch[sym1]; + if (sym1 == SYMBOL_7_RED && sym2 == SYMBOL_7_RED && sym3 == SYMBOL_7_BLUE) return MATCH_MIXED_7; - if (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) + if (sym1 == SYMBOL_7_BLUE && sym2 == SYMBOL_7_BLUE && sym3 == SYMBOL_7_RED) return MATCH_MIXED_7; - if (tag1 == GFXTAG_CHERRY) + if (sym1 == SYMBOL_CHERRY) return MATCH_CHERRY; return MATCH_NONE; } @@ -2147,8 +2158,8 @@ static bool8 PayoutTask_Free(struct Task *task) #undef tState #undef tTimer -// Get the tag at position `offset` below the top of the reel's tape. Note that -// if `offset` is negative, it wraps around to the bottom of the tape. +// Get the symbol at position `offset` below the top of the reel's tape. Note +// that if `offset` is negative, it wraps around to the bottom of the tape. // .-----------------. // | [ ] | [ ] | [ ] | <- offset = 0 // /-----|-----|-----\ @@ -2159,50 +2170,50 @@ static bool8 PayoutTask_Free(struct Task *task) // | ... | ... | ... | // | [ ] | [ ] | [ ] | <- offset = 20 // .-----------------. -static u8 GetTagAtRest(u8 reel, s16 offset) +static u8 GetSymbolAtRest(u8 reel, s16 offset) { - s16 pos = (sSlotMachine->reelPositions[reel] + offset) % TAGS_PER_REEL; + s16 pos = (sSlotMachine->reelPositions[reel] + offset) % SYBMOLS_PER_REEL; if (pos < 0) - pos += TAGS_PER_REEL; - return sReelTileTags[reel][pos]; + pos += SYBMOLS_PER_REEL; + return sReelSymbols[reel][pos]; } -// Calculates GetTagAtRest as if the reel were snapped downwards into place. -static u8 GetTag(u8 reel, s16 offset) +// Calculates GetSymbolAtRest as if the reel were snapped downwards into place. +static u8 GetSymbol(u8 reel, s16 offset) { s16 inc = 0; - s16 pixelOffset = sSlotMachine->reelPixelOffsets[reel] % TAG_HEIGHT; + s16 pixelOffset = sSlotMachine->reelPixelOffsets[reel] % REEL_SYMBOL_HEIGHT; if (pixelOffset != 0) inc = -1; - return GetTagAtRest(reel, offset + inc); + return GetSymbolAtRest(reel, offset + inc); } -static u8 GetReelTimeTag(s16 offset) +static u8 GetReelTimeSymbol(s16 offset) { - s16 newPosition = (sSlotMachine->reeltimePosition + offset) % REELTIME_TAGS; + s16 newPosition = (sSlotMachine->reeltimePosition + offset) % REELTIME_SYMBOLS; if (newPosition < 0) - newPosition += REELTIME_TAGS; - return sReelTimeTags[newPosition]; + newPosition += REELTIME_SYMBOLS; + return sReelTimeSymbols[newPosition]; } static void AdvanceSlotReel(u8 reelIndex, s16 value) { sSlotMachine->reelPixelOffsets[reelIndex] += value; sSlotMachine->reelPixelOffsets[reelIndex] %= REEL_HEIGHT; - sSlotMachine->reelPositions[reelIndex] = TAGS_PER_REEL - sSlotMachine->reelPixelOffsets[reelIndex] / TAG_HEIGHT; + sSlotMachine->reelPositions[reelIndex] = SYBMOLS_PER_REEL - sSlotMachine->reelPixelOffsets[reelIndex] / REEL_SYMBOL_HEIGHT; } -// Advances the reel no further than the next tag. Returns the remaining pixels -// until the next tag. -s16 AdvanceSlotReelToNextTag(u8 reelIndex, s16 value) +// Advances the reel no further than the next symbol. Returns the remaining +// pixels until the next symbol. +s16 AdvanceSlotReelToNextSymbol(u8 reelIndex, s16 value) { - s16 offset = sSlotMachine->reelPixelOffsets[reelIndex] % TAG_HEIGHT; + s16 offset = sSlotMachine->reelPixelOffsets[reelIndex] % REEL_SYMBOL_HEIGHT; if (offset != 0) { if (offset < value) value = offset; AdvanceSlotReel(reelIndex, value); - offset = sSlotMachine->reelPixelOffsets[reelIndex] % TAG_HEIGHT; + offset = sSlotMachine->reelPixelOffsets[reelIndex] % REEL_SYMBOL_HEIGHT; } return offset; } @@ -2211,20 +2222,20 @@ static void AdvanceReeltimeReel(s16 value) { sSlotMachine->reeltimePixelOffset += value; sSlotMachine->reeltimePixelOffset %= REELTIME_REEL_HEIGHT; - sSlotMachine->reeltimePosition = REELTIME_TAGS - sSlotMachine->reeltimePixelOffset / REELTIME_TAG_HEIGHT; + sSlotMachine->reeltimePosition = REELTIME_SYMBOLS - sSlotMachine->reeltimePixelOffset / REELTIME_SYMBOL_HEIGHT; } -// Advances the reel no further than the next tag. Returns the remaining pixels -// until the next tag. -s16 AdvanceReeltimeReelToNextTag(s16 value) +// Advances the reel no further than the next symbol. Returns the remaining +// pixels until the next symbol. +s16 AdvanceReeltimeReelToNextSymbol(s16 value) { - s16 offset = sSlotMachine->reeltimePixelOffset % REELTIME_TAG_HEIGHT; + s16 offset = sSlotMachine->reeltimePixelOffset % REELTIME_SYMBOL_HEIGHT; if (offset != 0) { if (offset < value) value = offset; AdvanceReeltimeReel(value); - offset = sSlotMachine->reeltimePixelOffset % REELTIME_TAG_HEIGHT; + offset = sSlotMachine->reeltimePixelOffset % REELTIME_SYMBOL_HEIGHT; } return offset; } @@ -2285,10 +2296,10 @@ static bool8 ReelTask_Spin(struct Task *task) // the results by stopping after at most 4 extra turns. The exact behavior // differs depending on whether the machine has a bias. // -// If the machine has a bias, it will try to match the bias tag in each reel. +// If the machine has a bias, it will try to match the bias symbol in each reel. // // Otherwise, if the machine doesn't have a bias or it could not line up the -// bias tag in any of the previous reels, it will perform the NoBias stopping +// bias symbol in any of the previous reels, it will perform the NoBias stopping // routine, which manipulates the outcome so the player loses. static bool8 ReelTask_DecideStop(struct Task *task) { @@ -2308,21 +2319,21 @@ static bool8 ReelTask_DecideStop(struct Task *task) return TRUE; } -// Go to the next tag, then add any extra turns. +// Go to the next symbol, then add any extra turns. static bool8 ReelTask_MoveToStop(struct Task *task) { u16 reelStopShocks[ARRAY_COUNT(sReelStopShocks)]; s16 reelPixelPos; memcpy(reelStopShocks, sReelStopShocks, sizeof(sReelStopShocks)); - reelPixelPos = sSlotMachine->reelPixelOffsets[task->tReelId] % TAG_HEIGHT; + reelPixelPos = sSlotMachine->reelPixelOffsets[task->tReelId] % REEL_SYMBOL_HEIGHT; if (reelPixelPos != 0) - reelPixelPos = AdvanceSlotReelToNextTag(task->tReelId, sSlotMachine->reelSpeed); + reelPixelPos = AdvanceSlotReelToNextSymbol(task->tReelId, sSlotMachine->reelSpeed); else if (sSlotMachine->reelExtraTurns[task->tReelId]) { sSlotMachine->reelExtraTurns[task->tReelId]--; AdvanceSlotReel(task->tReelId, sSlotMachine->reelSpeed); - reelPixelPos = sSlotMachine->reelPixelOffsets[task->tReelId] % TAG_HEIGHT; + reelPixelPos = sSlotMachine->reelPixelOffsets[task->tReelId] % REEL_SYMBOL_HEIGHT; } if (reelPixelPos == 0 && sSlotMachine->reelExtraTurns[task->tReelId] == 0) @@ -2334,7 +2345,7 @@ static bool8 ReelTask_MoveToStop(struct Task *task) return FALSE; } -// The reel shakes a little at the selected tag before settling. +// The reel shakes a little at the selected symbol before settling. static bool8 ReelTask_ShakingStop(struct Task *task) { sSlotMachine->reelShockOffsets[task->tReelId] = task->tShockMagnitude; @@ -2358,29 +2369,30 @@ static bool8 ReelTask_ShakingStop(struct Task *task) #undef tMoving #undef tReelId -// We pass along two tags to bias toward. If the machine is biased toward 7's, -// we pass both the 7 tags. Otherwise, we just pass the bias tag twice. +// We pass along two symbols to bias toward. If the machine is biased toward +// 7's, we pass both the 7 symbols. Otherwise, we just pass the bias symbol +// twice. static bool8 DecideStop_Bias_Reel1(void) { - u8 tag2 = GetBiasTag(sSlotMachine->machineBias); - u8 tag1 = tag2; + u8 sym2 = GetBiasSymbol(sSlotMachine->machineBias); + u8 sym1 = sym2; if (sSlotMachine->machineBias & (BIAS_STRAIGHT_7 | BIAS_MIXED_7)) { - tag1 = GFXTAG_7_RED; - tag2 = GFXTAG_7_BLUE; + sym1 = SYMBOL_7_RED; + sym2 = SYMBOL_7_BLUE; } - return sDecideStop_Bias_Reel1_Bets[sSlotMachine->bet - 1](tag1, tag2); + return sDecideStop_Bias_Reel1_Bets[sSlotMachine->bet - 1](sym1, sym2); } -// The biasTag for subsequent reels is determined based on which of the bias -// tags can be found in reel 1. This really only matters when the machine is +// The biasSymbol for subsequent reels is determined based on which of the bias +// symbols can be found in reel 1. This really only matters when the machine is // biased toward 7's. It will try to match a 7 of the same color as reel 1. -static bool8 EitherTagAtPos_Reel1(s16 pos, u8 tag1, u8 tag2) +static bool8 EitherSymbolAtPos_Reel1(s16 pos, u8 sym1, u8 sym2) { - u8 tag = GetTag(LEFT_REEL, pos); - if (tag == tag1 || tag == tag2) + u8 sym = GetSymbol(LEFT_REEL, pos); + if (sym == sym1 || sym == sym2) { - sSlotMachine->biasTag = tag; + sSlotMachine->biasSymbol = sym; return TRUE; } return FALSE; @@ -2390,9 +2402,9 @@ static bool8 EitherTagAtPos_Reel1(s16 pos, u8 tag1, u8 tag2) // of turns. static bool8 AreCherriesOnScreen_Reel1(s16 turns) { - if (GetTag(LEFT_REEL, 1 - turns) == GFXTAG_CHERRY - || GetTag(LEFT_REEL, 2 - turns) == GFXTAG_CHERRY - || GetTag(LEFT_REEL, 3 - turns) == GFXTAG_CHERRY) + if (GetSymbol(LEFT_REEL, 1 - turns) == SYMBOL_CHERRY + || GetSymbol(LEFT_REEL, 2 - turns) == SYMBOL_CHERRY + || GetSymbol(LEFT_REEL, 3 - turns) == SYMBOL_CHERRY) return TRUE; else return FALSE; @@ -2406,15 +2418,15 @@ static bool8 BiasedTowardCherryOr7s(void) return FALSE; } -// If a biased tag appears in the center of reel 1 within the next 4 turns, stop -// there. That tag becomes the biasTag for the subsequent reels. -static bool8 DecideStop_Bias_Reel1_Bet1(u8 tag1, u8 tag2) +// If a bias symbol appears in the center of reel 1 within the next 4 turns, +// stop there. That symbol becomes the biasSymbol for the subsequent reels. +static bool8 DecideStop_Bias_Reel1_Bet1(u8 sym1, u8 sym2) { s16 i; for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (EitherTagAtPos_Reel1(2 - i, tag1, tag2)) + if (EitherSymbolAtPos_Reel1(2 - i, sym1, sym2)) { sSlotMachine->winnerRows[LEFT_REEL] = 2; sSlotMachine->reelExtraTurns[LEFT_REEL] = i; @@ -2435,19 +2447,19 @@ static bool8 DecideStop_Bias_Reel1_Bet1(u8 tag1, u8 tag2) // - If it enters on the 4th turn, stop here. It will be in the top row. // // Other bias: -// - This is very similar, except the game is checking for the bias tag rather -// than cherries / 7s. +// - This is very similar, except the game is checking for the bias symbol +// rather than cherries / 7s. // // However, the game adds an additional constraint: it will not stop if there // will be any cherries on screen. Presumably, this ensures that you will not -// get any matches if you fail to line up the bias tag in the remaining +// get any matches if you fail to line up the bias symbol in the remaining // reels. // // This is programmed in such a way that it excludes more options than -// necessary. If there are cherries in the two positions below the bias tag, +// necessary. If there are cherries in the two positions below the bias symbol, // it will skip over this option, even if those cherries would not have ended // up on screen. -static bool8 DecideStop_Bias_Reel1_Bet2or3(u8 tag1, u8 tag2) +static bool8 DecideStop_Bias_Reel1_Bet2or3(u8 sym1, u8 sym2) { s16 i; bool8 cherry7Bias = BiasedTowardCherryOr7s(); @@ -2456,7 +2468,7 @@ static bool8 DecideStop_Bias_Reel1_Bet2or3(u8 tag1, u8 tag2) // Check the current screen for (i = 1; i <= 3; i++) { - if (EitherTagAtPos_Reel1(i, tag1, tag2)) + if (EitherSymbolAtPos_Reel1(i, sym1, sym2)) { sSlotMachine->winnerRows[0] = i; sSlotMachine->reelExtraTurns[0] = 0; @@ -2471,7 +2483,7 @@ static bool8 DecideStop_Bias_Reel1_Bet2or3(u8 tag1, u8 tag2) bool8 cherry7BiasCopy = cherry7Bias; // redundant if (cherry7BiasCopy || !AreCherriesOnScreen_Reel1(i)) { - if (EitherTagAtPos_Reel1(1 - i, tag1, tag2)) + if (EitherSymbolAtPos_Reel1(1 - i, sym1, sym2)) { if (i == 1 && (cherry7BiasCopy || !AreCherriesOnScreen_Reel1(3))) { @@ -2499,8 +2511,8 @@ static bool8 DecideStop_Bias_Reel2(void) return sDecideStop_Bias_Reel2_Bets[sSlotMachine->bet - 1](); } -// Turn at most 4 extra turns to try to line up the bias tag in the same row as -// reel 1. +// Turn at most 4 extra turns to try to line up the bias symbol in the same row +// as reel 1. static bool8 DecideStop_Bias_Reel2_Bet1or2(void) { s16 i; @@ -2508,7 +2520,7 @@ static bool8 DecideStop_Bias_Reel2_Bet1or2(void) for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (GetTag(MIDDLE_REEL, reel1BiasRow - i) == sSlotMachine->biasTag) + if (GetSymbol(MIDDLE_REEL, reel1BiasRow - i) == sSlotMachine->biasSymbol) { sSlotMachine->winnerRows[1] = reel1BiasRow; sSlotMachine->reelExtraTurns[1] = i; @@ -2518,32 +2530,33 @@ static bool8 DecideStop_Bias_Reel2_Bet1or2(void) return FALSE; } -// Checks whether it can match the bias tag diagonally, and sometimes skews +// Checks whether it can match the bias symbol diagonally, and sometimes skews // toward this type of match rather than a match straight across. // -// The behavior is different depending on where the bias tag landed in reel 1: +// The behavior is different depending on where the bias symbol landed in +// reel 1: // // Landed in middle row: -// A diagonal match is impossible. Just try to match the bias tag in the +// A diagonal match is impossible. Just try to match the bias symbol in the // middle row of reel 2 within 4 turns. // // Landed in top/bottom row: -// - If it would take 2 or 3 turns to get the bias tag into the same row as +// - If it would take 2 or 3 turns to get the bias symbol into the same row as // reel 1, force a diagonal match by stopping it in the middle row instead. -// - Check if the bias tag is already in the same row as reel 1, or if it takes -// 1 or 4 turns to get it there. If so, stop when it reaches that row. -// - Otherwise, check if the bias tag is already in the middle row of reel 2. -// If so, stop here. +// - Check if the bias symbol is already in the same row as reel 1, or if it +// takes 1 or 4 turns to get it there. If so, stop when it reaches that row. +// - Otherwise, check if the bias symbol is already in the middle row of +// reel 2. If so, stop here. // // So in how many more cases would betting 3 coins let you win compared to // betting 2? -// Not many. Most of the time, the game would have matched the tag in the same -// row as reel 1 if you had bet 2 coins. Betting 3 effectively adds coverage -// for only two additional cases: -// - Bias tag is in top row of reel 1 and bias tag is currently in middle row -// of reel 2. -// - Bias tag is in bottom row of reel 1 and bias tag could get to the middle -// row of reel 2 in 4 turns. +// Not many. Most of the time, the game would have matched the symbol in the +// same row as reel 1 if you had bet 2 coins. Betting 3 effectively adds +// coverage for only two additional cases: +// - Bias symbol is in top row of reel 1 and bias symbol is currently in +// middle row of reel 2. +// - Bias symbol is in bottom row of reel 1 and bias symbol could get to the +// middle row of reel 2 in 4 turns. // // Assuming this is the implementation Game Freak intended, the game effectively // turns straight matches into diagonal matches with 2/5 probability. @@ -2553,18 +2566,19 @@ static bool8 DecideStop_Bias_Reel2_Bet1or2(void) static bool8 DecideStop_Bias_Reel2_Bet3(void) { s16 i; - // If you can line up the bias tag in the same row as reel 1 within 4 turns + // If you can line up the bias symbol in the same row as reel 1 within 4 + // turns if (DecideStop_Bias_Reel2_Bet1or2()) { - // If bias tag is not in the middle row of reel 1 and it takes either + // If bias symbol is not in the middle row of reel 1 and it takes either // 2 or 3 turns to get it in the same row for reel 2 if (sSlotMachine->winnerRows[0] != 2 && sSlotMachine->reelExtraTurns[1] > 1 && sSlotMachine->reelExtraTurns[1] != 4) { - // Try turning this into a diagonal match by lining up the bias tag - // in the middle row of reel 2 within 4 turns. + // Try turning this into a diagonal match by lining up the bias + // symbol in the middle row of reel 2 within 4 turns. for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (GetTag(MIDDLE_REEL, 2 - i) == sSlotMachine->biasTag) + if (GetSymbol(MIDDLE_REEL, 2 - i) == sSlotMachine->biasSymbol) { sSlotMachine->winnerRows[1] = 2; sSlotMachine->reelExtraTurns[1] = i; @@ -2575,15 +2589,15 @@ static bool8 DecideStop_Bias_Reel2_Bet3(void) return TRUE; } - // If you can't line up the bias tag in the same row in 4 turns, and the - // bias tag is not in the middle row of reel 1 + // If you can't line up the bias symbol in the same row in 4 turns, and the + // bias symbol is not in the middle row of reel 1 if (sSlotMachine->winnerRows[0] != 2) { - // Try to match the bias tag in middle row of reel 2 within 4 turns. + // Try to match the bias symbol in middle row of reel 2 within 4 turns. // Adds coverage for the two cases mentioned above. for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (GetTag(MIDDLE_REEL, 2 - i) == sSlotMachine->biasTag) + if (GetSymbol(MIDDLE_REEL, 2 - i) == sSlotMachine->biasSymbol) { sSlotMachine->winnerRows[1] = 2; sSlotMachine->reelExtraTurns[1] = i; @@ -2594,32 +2608,32 @@ static bool8 DecideStop_Bias_Reel2_Bet3(void) return FALSE; } -// If the machine is biased toward mixed 7's, swap the color of the bias tag +// If the machine is biased toward mixed 7's, swap the color of the bias symbol // from red 7 to blue 7, or vice versa. static bool8 DecideStop_Bias_Reel3(void) { - u8 biasTag = sSlotMachine->biasTag; + u8 biasSymbol = sSlotMachine->biasSymbol; if (sSlotMachine->machineBias & BIAS_MIXED_7) { - biasTag = GFXTAG_7_RED; - if (sSlotMachine->biasTag == GFXTAG_7_RED) + biasSymbol = SYMBOL_7_RED; + if (sSlotMachine->biasSymbol == SYMBOL_7_RED) { - biasTag = GFXTAG_7_BLUE; + biasSymbol = SYMBOL_7_BLUE; } } - return sDecideStop_Bias_Reel3_Bets[sSlotMachine->bet - 1](biasTag); + return sDecideStop_Bias_Reel3_Bets[sSlotMachine->bet - 1](biasSymbol); } -// Turn at most 4 extra turns to try to line up the bias tag in the same row as -// reel 2. -static bool8 DecideStop_Bias_Reel3_Bet1or2(u8 biasTag) +// Turn at most 4 extra turns to try to line up the bias symbol in the same +// row as reel 2. +static bool8 DecideStop_Bias_Reel3_Bet1or2(u8 biasSymbol) { s16 i; s16 reel2BiasRow = sSlotMachine->winnerRows[1]; for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (GetTag(RIGHT_REEL, reel2BiasRow - i) == biasTag) + if (GetSymbol(RIGHT_REEL, reel2BiasRow - i) == biasSymbol) { sSlotMachine->winnerRows[2] = reel2BiasRow; sSlotMachine->reelExtraTurns[2] = i; @@ -2629,26 +2643,26 @@ static bool8 DecideStop_Bias_Reel3_Bet1or2(u8 biasTag) return FALSE; } -// Try to complete a match in reel 3 by lining up a bias tag with the bias tags -// from the first two reels. -static bool8 DecideStop_Bias_Reel3_Bet3(u8 biasTag) +// Try to complete a match in reel 3 by lining up a bias symbol with the bias +// symbols from the first two reels. +static bool8 DecideStop_Bias_Reel3_Bet3(u8 biasSymbol) { s16 i; s16 biasRow; - // First two bias tags in the same row. Try to line up bias tag in same the - // row here too + // First two bias symbols in the same row. Try to line up bias symbol in + // same the row here too if (sSlotMachine->winnerRows[0] == sSlotMachine->winnerRows[1]) - return DecideStop_Bias_Reel3_Bet1or2(biasTag); + return DecideStop_Bias_Reel3_Bet1or2(biasSymbol); - // Otherwise, try to line up the bias tag diagonally + // Otherwise, try to line up the bias symbol diagonally if (sSlotMachine->winnerRows[0] == 1) biasRow = 3; else biasRow = 1; for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (GetTag(RIGHT_REEL, biasRow - i) == biasTag) + if (GetSymbol(RIGHT_REEL, biasRow - i) == biasSymbol) { sSlotMachine->reelExtraTurns[2] = i; sSlotMachine->winnerRows[2] = biasRow; @@ -2671,18 +2685,18 @@ static void DecideStop_NoBias_Reel1(void) sSlotMachine->reelExtraTurns[0] = i; } -// If the bias tag is one of the 7's, switch to the opposite color and return +// If the bias symbol is one of the 7's, switch to the opposite color and return // true. Otherwise, return false. -static bool8 IfTag7_SwitchColor(u8 *tag) +static bool8 IfSymbol7_SwitchColor(u8 *symbol) { - if (*tag == GFXTAG_7_RED) + if (*symbol == SYMBOL_7_RED) { - *tag = GFXTAG_7_BLUE; + *symbol = SYMBOL_7_BLUE; return TRUE; } - if (*tag == GFXTAG_7_BLUE) + if (*symbol == SYMBOL_7_BLUE) { - *tag = GFXTAG_7_RED; + *symbol = SYMBOL_7_RED; return TRUE; } return FALSE; @@ -2718,13 +2732,13 @@ static void DecideStop_NoBias_Reel2_Bet1(void) // Note here and in other NoBias functions, reelExtraTurns is 0 if it // corresponds to a previous reel. That reel has already stopped and any // extra turns were applied. - u8 reel1MiddleTag = GetTag(LEFT_REEL, 2 - sSlotMachine->reelExtraTurns[0]); - if (IfTag7_SwitchColor(&reel1MiddleTag)) + u8 reel1MiddleSym = GetSymbol(LEFT_REEL, 2 - sSlotMachine->reelExtraTurns[0]); + if (IfSymbol7_SwitchColor(&reel1MiddleSym)) { s16 i; for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (reel1MiddleTag == GetTag(MIDDLE_REEL, 2 - i)) + if (reel1MiddleSym == GetSymbol(MIDDLE_REEL, 2 - i)) { sSlotMachine->winnerRows[1] = 2; sSlotMachine->reelExtraTurns[1] = i; @@ -2749,13 +2763,13 @@ static void DecideStop_NoBias_Reel2_Bet2(void) { if (sSlotMachine->winnerRows[0] != 0 && sSlotMachine->machineBias & BIAS_STRAIGHT_7) { - u8 reel1BiasTag = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); - if (IfTag7_SwitchColor(&reel1BiasTag)) + u8 reel1BiasSym = GetSymbol(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); + if (IfSymbol7_SwitchColor(&reel1BiasSym)) { s16 i; for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (reel1BiasTag == GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[0] - i)) + if (reel1BiasSym == GetSymbol(MIDDLE_REEL, sSlotMachine->winnerRows[0] - i)) { sSlotMachine->winnerRows[1] = sSlotMachine->winnerRows[0]; sSlotMachine->reelExtraTurns[1] = i; @@ -2812,7 +2826,7 @@ static void DecideStop_NoBias_Reel2_Bet3(void) { s16 i; s16 j; - u8 reel1BiasTag; + u8 reel1BiasSym; if (sSlotMachine->winnerRows[0] != 0 && sSlotMachine->machineBias & BIAS_STRAIGHT_7) { @@ -2823,8 +2837,8 @@ static void DecideStop_NoBias_Reel2_Bet3(void) return; } - reel1BiasTag = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); - if (IfTag7_SwitchColor(&reel1BiasTag)) + reel1BiasSym = GetSymbol(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); + if (IfSymbol7_SwitchColor(&reel1BiasSym)) { // Check current screen to see if there is already an opposite-color // 7 lined up for a match. @@ -2833,7 +2847,7 @@ static void DecideStop_NoBias_Reel2_Bet3(void) j = 3; for (i = 0; i < 2; i++, j--) { - if (reel1BiasTag == GetTag(MIDDLE_REEL, j)) + if (reel1BiasSym == GetSymbol(MIDDLE_REEL, j)) { sSlotMachine->winnerRows[1] = j; sSlotMachine->reelExtraTurns[1] = 0; @@ -2845,7 +2859,7 @@ static void DecideStop_NoBias_Reel2_Bet3(void) // over the next 4 turns for (j = 1; j <= MAX_EXTRA_TURNS; j++) { - if (reel1BiasTag == GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[0] - j)) + if (reel1BiasSym == GetSymbol(MIDDLE_REEL, sSlotMachine->winnerRows[0] - j)) { // If 7 appeared in top row of reel 1 if (sSlotMachine->winnerRows[0] == 1) @@ -2882,41 +2896,41 @@ static void DecideStop_NoBias_Reel2_Bet3(void) } } -// Returns true if the reel 1 and reel 2 tags are opposite-color 7's. +// Returns true if the reel 1 and reel 2 symbols are opposite-color 7's. // // Note that if true, this does not constitue a MATCH_MIXED_7, as the first two // reels are not the same color. -static bool8 MismatchedTags_77(u8 tag1, u8 tag2) +static bool8 MismatchedSyms_77(u8 sym1, u8 sym2) { - if ((tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_BLUE) || (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_RED)) + if ((sym1 == SYMBOL_7_RED && sym2 == SYMBOL_7_BLUE) || (sym1 == SYMBOL_7_BLUE && sym2 == SYMBOL_7_RED)) return TRUE; else return FALSE; } -// Returns true if the reel 1, reel 2 and reel 3 tags form a 7 mismatch, i.e. -// {7R, 7B, 7R} or {7B, 7R, 7B}. -static bool8 MismatchedTags_777(u8 tag1, u8 tag2, u8 tag3) +// Returns true if the reel 1, reel 2 and reel 3 symbolss form a 7 mismatch, +// i.e. {7R, 7B, 7R} or {7B, 7R, 7B}. +static bool8 MismatchedSyms_777(u8 sym1, u8 sym2, u8 sym3) { - if ((tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) || - (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE)) + if ((sym1 == SYMBOL_7_RED && sym2 == SYMBOL_7_BLUE && sym3 == SYMBOL_7_RED) || + (sym1 == SYMBOL_7_BLUE && sym2 == SYMBOL_7_RED && sym3 == SYMBOL_7_BLUE)) return TRUE; else return FALSE; } // Returns false if either: -// - The tags form a match (including MATCH_MIXED_7) -// - Or, the tags form a 7 mismatch (i.e., {7R, 7B, 7R} or {7B, 7R, 7B}) +// - The symbols form a match (including MATCH_MIXED_7) +// - Or, the symbols form a 7 mismatch (i.e., {7R, 7B, 7R} or {7B, 7R, 7B}) // // Note, this does not account for cherry matches. -static bool8 NeitherMatchNor7Mismatch(u8 tag1, u8 tag2, u8 tag3) +static bool8 NeitherMatchNor7Mismatch(u8 sym1, u8 sym2, u8 sym3) { - if ((tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) - || (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) - || (tag1 == GFXTAG_7_RED && tag2 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) - || (tag1 == GFXTAG_7_BLUE && tag2 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED) - || (tag1 == tag2 && tag1 == tag3)) + if ((sym1 == SYMBOL_7_RED && sym2 == SYMBOL_7_BLUE && sym3 == SYMBOL_7_RED) + || (sym1 == SYMBOL_7_BLUE && sym2 == SYMBOL_7_RED && sym3 == SYMBOL_7_BLUE) + || (sym1 == SYMBOL_7_RED && sym2 == SYMBOL_7_RED && sym3 == SYMBOL_7_BLUE) + || (sym1 == SYMBOL_7_BLUE && sym2 == SYMBOL_7_BLUE && sym3 == SYMBOL_7_RED) + || (sym1 == sym2 && sym1 == sym3)) { return FALSE; } @@ -2933,38 +2947,38 @@ static void DecideStop_NoBias_Reel3(void) // Spin until there is no match in reel 3. Additionally, if the player failed a // straight 7 bias, try to taunt them with a 7 mismatch. // -// The way this plays out depends on the first two matched tags. +// The way this plays out depends on the first two matched symbols. // -// If first two tags are the same: -// Spin until you get a tag that won't complete a match. +// If first two symbols are the same: +// Spin until you get a symbol that won't complete a match. // -// Otherwise, if the first two tags are opposite-color 7's: +// Otherwise, if the first two symbols are opposite-color 7's: // - If the machine is biased toward straight 7's, then the player must have // failed with this bias. The machine tries to taunt the player by turning // up to 4 turns to complete a 7 mismatch (i.e., {7R, 7B, 7R} or // {7B, 7R, 7B}). -// - Otherwise, spin until you get a tag that won't complete a match. +// - Otherwise, spin until you get a symbol that won't complete a match. static void DecideStop_NoBias_Reel3_Bet1(void) { s16 i = 0; - u8 tag1 = GetTag(LEFT_REEL, 2 - sSlotMachine->reelExtraTurns[0]); - u8 tag2 = GetTag(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); + u8 sym1 = GetSymbol(LEFT_REEL, 2 - sSlotMachine->reelExtraTurns[0]); + u8 sym2 = GetSymbol(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); - // If first two tags match, spin until you get a non-matching tag - if (tag1 == tag2) + // If first two symbols match, spin until you get a non-matching symbol + if (sym1 == sym2) { while (TRUE) { - u8 tag3; - if (!((tag1 == (tag3 = GetTag(RIGHT_REEL, 2 - i))) - || (tag1 == GFXTAG_7_RED && tag3 == GFXTAG_7_BLUE) - || (tag1 == GFXTAG_7_BLUE && tag3 == GFXTAG_7_RED))) + u8 sym3; + if (!((sym1 == (sym3 = GetSymbol(RIGHT_REEL, 2 - i))) + || (sym1 == SYMBOL_7_RED && sym3 == SYMBOL_7_BLUE) + || (sym1 == SYMBOL_7_BLUE && sym3 == SYMBOL_7_RED))) break; i++; } } - // First two tags are opposite-color 7's - else if (MismatchedTags_77(tag1, tag2)) + // First two symbols are opposite-color 7's + else if (MismatchedSyms_77(sym1, sym2)) { // If biased toward straight 7's, try to complete the 7 mismatch in 4 // turns @@ -2972,7 +2986,7 @@ static void DecideStop_NoBias_Reel3_Bet1(void) { for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - if (tag1 == GetTag(RIGHT_REEL, 2 - i)) + if (sym1 == GetSymbol(RIGHT_REEL, 2 - i)) { sSlotMachine->reelExtraTurns[2] = i; return; @@ -2980,11 +2994,11 @@ static void DecideStop_NoBias_Reel3_Bet1(void) } } - // Otherwise, just spin until you get a non-matching tag + // Otherwise, just spin until you get a non-matching symbol i = 0; while (TRUE) { - if (tag1 != GetTag(RIGHT_REEL, 2 - i)) + if (sym1 != GetSymbol(RIGHT_REEL, 2 - i)) break; i++; } @@ -2995,9 +3009,9 @@ static void DecideStop_NoBias_Reel3_Bet1(void) // Spin until there is no match in reel 3. Additionally, if the player failed a // straight 7 bias, try to taunt them with a 7 mismatch. // -// There are up to two stages, depending on the first two matched tags: +// There are up to two stages, depending on the first two matched symbols: // -// 1. [Optional] If first two tags are opposite-color 7's in the same row and +// 1. [Optional] If first two symbols are opposite-color 7's in the same row and // the machine is biased toward straight 7's: // Check if a 7 with the same color as reel 1 appears in the same row // within 4 turns. If so, initially advance to that position. @@ -3013,28 +3027,28 @@ static void DecideStop_NoBias_Reel3_Bet2(void) { s16 extraTurns = 0; s16 i; - u8 tag1; - u8 tag2; - u8 tag3; + u8 sym1; + u8 sym2; + u8 sym3; // Effectively, if you lined up two 7's in the same row if (sSlotMachine->winnerRows[1] != 0 && sSlotMachine->winnerRows[0] == sSlotMachine->winnerRows[1] && sSlotMachine->machineBias & BIAS_STRAIGHT_7) { - tag1 = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); - tag2 = GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[1] - sSlotMachine->reelExtraTurns[1]); + sym1 = GetSymbol(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); + sym2 = GetSymbol(MIDDLE_REEL, sSlotMachine->winnerRows[1] - sSlotMachine->reelExtraTurns[1]); // If the first two 7's are opposite colors, see if you can line up a 7 // mismatch in the same row. If so, advance initially to that position. // More turns may be added further below. - if (MismatchedTags_77(tag1, tag2)) + if (MismatchedSyms_77(sym1, sym2)) { // Iterate over the next 4 turns for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - tag3 = GetTag(RIGHT_REEL, sSlotMachine->winnerRows[1] - i); - if (tag1 == tag3) + sym3 = GetSymbol(RIGHT_REEL, sSlotMachine->winnerRows[1] - i); + if (sym1 == sym3) { extraTurns = i; break; @@ -3049,16 +3063,16 @@ static void DecideStop_NoBias_Reel3_Bet2(void) // Iterate over the rows of the screen after `extraTurns` turns for (i = 1, numMatches = 0; i <= 3; i++) { - tag1 = GetTag(LEFT_REEL, i - sSlotMachine->reelExtraTurns[0]); - tag2 = GetTag(MIDDLE_REEL, i - sSlotMachine->reelExtraTurns[1]); - tag3 = GetTag(RIGHT_REEL, i - extraTurns); + sym1 = GetSymbol(LEFT_REEL, i - sSlotMachine->reelExtraTurns[0]); + sym2 = GetSymbol(MIDDLE_REEL, i - sSlotMachine->reelExtraTurns[1]); + sym3 = GetSymbol(RIGHT_REEL, i - extraTurns); // This boils down to: // If there's a match on screen, keep spinning. Otherwise, if // there's a 7 mismatch on screen, keep spinning if the machine // isn't biased toward straight 7's. - if (!NeitherMatchNor7Mismatch(tag1, tag2, tag3) && - !(MismatchedTags_777(tag1, tag2, tag3) && (sSlotMachine->machineBias & BIAS_STRAIGHT_7))) + if (!NeitherMatchNor7Mismatch(sym1, sym2, sym3) && + !(MismatchedSyms_777(sym1, sym2, sym3) && (sSlotMachine->machineBias & BIAS_STRAIGHT_7))) { numMatches++; break; @@ -3105,9 +3119,9 @@ static void DecideStop_NoBias_Reel3_Bet2(void) // occurring straight across. static void DecideStop_NoBias_Reel3_Bet3(void) { - u8 tag1; - u8 tag2; - u8 tag3; + u8 sym1; + u8 sym2; + u8 sym3; s16 row; s16 i; @@ -3121,21 +3135,21 @@ static void DecideStop_NoBias_Reel3_Bet3(void) sSlotMachine->winnerRows[0] != sSlotMachine->winnerRows[1] && sSlotMachine->machineBias & BIAS_STRAIGHT_7) { - tag1 = GetTag(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); - tag2 = GetTag(MIDDLE_REEL, sSlotMachine->winnerRows[1] - sSlotMachine->reelExtraTurns[1]); + sym1 = GetSymbol(LEFT_REEL, sSlotMachine->winnerRows[0] - sSlotMachine->reelExtraTurns[0]); + sym2 = GetSymbol(MIDDLE_REEL, sSlotMachine->winnerRows[1] - sSlotMachine->reelExtraTurns[1]); // If the first two 7's are opposite colors, try advancing up to 4 // additional turns to line up a diagonal 7 mismatch. More turns may be // added further below. - if (MismatchedTags_77(tag1, tag2)) + if (MismatchedSyms_77(sym1, sym2)) { row = 1; if (sSlotMachine->winnerRows[0] == 1) row = 3; for (i = 0; i <= MAX_EXTRA_TURNS; i++) { - tag3 = GetTag(RIGHT_REEL, row - (sSlotMachine->reelExtraTurns[2] + i)); - if (tag1 == tag3) + sym3 = GetSymbol(RIGHT_REEL, row - (sSlotMachine->reelExtraTurns[2] + i)); + if (sym1 == sym3) { sSlotMachine->reelExtraTurns[2] += i; break; @@ -3147,11 +3161,11 @@ static void DecideStop_NoBias_Reel3_Bet3(void) while (TRUE) { // Check NWSE diagonal - tag1 = GetTag(LEFT_REEL, 1 - sSlotMachine->reelExtraTurns[0]); - tag2 = GetTag(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); - tag3 = GetTag(RIGHT_REEL, 3 - sSlotMachine->reelExtraTurns[2]); - if (NeitherMatchNor7Mismatch(tag1, tag2, tag3) - || (MismatchedTags_777(tag1, tag2, tag3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) + sym1 = GetSymbol(LEFT_REEL, 1 - sSlotMachine->reelExtraTurns[0]); + sym2 = GetSymbol(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); + sym3 = GetSymbol(RIGHT_REEL, 3 - sSlotMachine->reelExtraTurns[2]); + if (NeitherMatchNor7Mismatch(sym1, sym2, sym3) + || (MismatchedSyms_777(sym1, sym2, sym3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) break; sSlotMachine->reelExtraTurns[2]++; } @@ -3159,11 +3173,11 @@ static void DecideStop_NoBias_Reel3_Bet3(void) while (TRUE) { // Check NESW diagonal - tag1 = GetTag(LEFT_REEL, 3 - sSlotMachine->reelExtraTurns[0]); - tag2 = GetTag(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); - tag3 = GetTag(RIGHT_REEL, 1 - sSlotMachine->reelExtraTurns[2]); - if (NeitherMatchNor7Mismatch(tag1, tag2, tag3) - || (MismatchedTags_777(tag1, tag2, tag3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) + sym1 = GetSymbol(LEFT_REEL, 3 - sSlotMachine->reelExtraTurns[0]); + sym2 = GetSymbol(MIDDLE_REEL, 2 - sSlotMachine->reelExtraTurns[1]); + sym3 = GetSymbol(RIGHT_REEL, 1 - sSlotMachine->reelExtraTurns[2]); + if (NeitherMatchNor7Mismatch(sym1, sym2, sym3) + || (MismatchedSyms_777(sym1, sym2, sym3) && sSlotMachine->machineBias & BIAS_STRAIGHT_7)) break; sSlotMachine->reelExtraTurns[2]++; } @@ -3678,16 +3692,16 @@ static void ReelTime_LandOnOutcome(struct Task *task) s16 reeltimePixelOffset = sSlotMachine->reeltimePixelOffset % 20; if (reeltimePixelOffset) { - reeltimePixelOffset = AdvanceReeltimeReelToNextTag(task->tRtReelSpeed >> 8); + reeltimePixelOffset = AdvanceReeltimeReelToNextSymbol(task->tRtReelSpeed >> 8); task->tRtReelSpeed = (u8)task->tRtReelSpeed + 0x40; } - else if (GetReelTimeTag(1) != sSlotMachine->reelTimeDraw) + else if (GetReelTimeSymbol(1) != sSlotMachine->reelTimeDraw) { AdvanceReeltimeReel(task->tRtReelSpeed >> 8); reeltimePixelOffset = sSlotMachine->reeltimePixelOffset % 20; task->tRtReelSpeed = (u8)task->tRtReelSpeed + 0x40; } - if (reeltimePixelOffset == 0 && GetReelTimeTag(1) == sSlotMachine->reelTimeDraw) + if (reeltimePixelOffset == 0 && GetReelTimeSymbol(1) == sSlotMachine->reelTimeDraw) { task->tRtReelSpeed = 0; // Also initializes task->tTimer2 task->tState++; // RT_TASK_PIKA_REACT @@ -3779,7 +3793,7 @@ static void ReelTime_SetReelSpeed(struct Task *task) { if (sSlotMachine->reelSpeed == task->tReelSpeed) task->tState++; // RT_TASK_END_SUCCESS - else if (sSlotMachine->reelPixelOffsets[0] % TAG_HEIGHT == 0 && (++task->tTimer3 & 0x07) == 0) + else if (sSlotMachine->reelPixelOffsets[0] % REEL_SYMBOL_HEIGHT == 0 && (++task->tTimer3 & 0x07) == 0) sSlotMachine->reelSpeed >>= 1; } @@ -4084,7 +4098,7 @@ static void SpriteCB_ReelSymbol(struct Sprite *sprite) sprite->data[2] = sSlotMachine->reelPixelOffsets[sprite->data[0]] + sprite->data[1]; sprite->data[2] %= 120; sprite->y = sSlotMachine->reelShockOffsets[sprite->data[0]] + 28 + sprite->data[2]; - sprite->sheetTileStart = GetSpriteTileStartByTag(GetTagAtRest(sprite->data[0], sprite->data[2] / 24)); + sprite->sheetTileStart = GetSpriteTileStartByTag(GetSymbolAtRest(sprite->data[0], sprite->data[2] / 24)); SetSpriteSheetFrameTileNum(sprite); } @@ -4255,7 +4269,7 @@ static void SpriteCB_ReelTimeNumbers(struct Sprite *sprite) s16 r0 = (u16)(sSlotMachine->reeltimePixelOffset + sprite->data[7]); r0 %= 40; sprite->y = r0 + 59; - StartSpriteAnimIfDifferent(sprite, GetReelTimeTag(r0 / 20)); + StartSpriteAnimIfDifferent(sprite, GetReelTimeSymbol(r0 / 20)); } static void CreateReelTimeShadowSprites(void) @@ -5202,80 +5216,80 @@ static void AllocDigitalDisplayGfx(void) sImageTable_DigitalDisplay_DPad[1].size = 0x180; } -static const u8 sReelTileTags[NUM_REELS][TAGS_PER_REEL] = +static const u8 sReelSymbols[NUM_REELS][SYBMOLS_PER_REEL] = { [LEFT_REEL] = { - GFXTAG_7_RED, - GFXTAG_CHERRY, - GFXTAG_AZURILL, - GFXTAG_REPLAY, - GFXTAG_POWER, - GFXTAG_LOTAD, - GFXTAG_7_BLUE, - GFXTAG_LOTAD, - GFXTAG_CHERRY, - GFXTAG_POWER, - GFXTAG_REPLAY, - GFXTAG_AZURILL, - GFXTAG_7_RED, - GFXTAG_POWER, - GFXTAG_LOTAD, - GFXTAG_REPLAY, - GFXTAG_AZURILL, - GFXTAG_7_BLUE, - GFXTAG_POWER, - GFXTAG_LOTAD, - GFXTAG_REPLAY + SYMBOL_7_RED, + SYMBOL_CHERRY, + SYMBOL_AZURILL, + SYMBOL_REPLAY, + SYMBOL_POWER, + SYMBOL_LOTAD, + SYMBOL_7_BLUE, + SYMBOL_LOTAD, + SYMBOL_CHERRY, + SYMBOL_POWER, + SYMBOL_REPLAY, + SYMBOL_AZURILL, + SYMBOL_7_RED, + SYMBOL_POWER, + SYMBOL_LOTAD, + SYMBOL_REPLAY, + SYMBOL_AZURILL, + SYMBOL_7_BLUE, + SYMBOL_POWER, + SYMBOL_LOTAD, + SYMBOL_REPLAY }, [MIDDLE_REEL] = { - GFXTAG_7_RED, - GFXTAG_CHERRY, - GFXTAG_REPLAY, - GFXTAG_LOTAD, - GFXTAG_AZURILL, - GFXTAG_CHERRY, - GFXTAG_REPLAY, - GFXTAG_POWER, - GFXTAG_POWER, - GFXTAG_LOTAD, - GFXTAG_7_BLUE, - GFXTAG_LOTAD, - GFXTAG_REPLAY, - GFXTAG_CHERRY, - GFXTAG_AZURILL, - GFXTAG_LOTAD, - GFXTAG_REPLAY, - GFXTAG_CHERRY, - GFXTAG_LOTAD, - GFXTAG_REPLAY, - GFXTAG_CHERRY + SYMBOL_7_RED, + SYMBOL_CHERRY, + SYMBOL_REPLAY, + SYMBOL_LOTAD, + SYMBOL_AZURILL, + SYMBOL_CHERRY, + SYMBOL_REPLAY, + SYMBOL_POWER, + SYMBOL_POWER, + SYMBOL_LOTAD, + SYMBOL_7_BLUE, + SYMBOL_LOTAD, + SYMBOL_REPLAY, + SYMBOL_CHERRY, + SYMBOL_AZURILL, + SYMBOL_LOTAD, + SYMBOL_REPLAY, + SYMBOL_CHERRY, + SYMBOL_LOTAD, + SYMBOL_REPLAY, + SYMBOL_CHERRY }, [RIGHT_REEL] = { - GFXTAG_7_RED, - GFXTAG_POWER, - GFXTAG_7_BLUE, - GFXTAG_REPLAY, - GFXTAG_LOTAD, - GFXTAG_AZURILL, - GFXTAG_REPLAY, - GFXTAG_LOTAD, - GFXTAG_POWER, - GFXTAG_AZURILL, - GFXTAG_REPLAY, - GFXTAG_LOTAD, - GFXTAG_AZURILL, - GFXTAG_POWER, - GFXTAG_REPLAY, - GFXTAG_LOTAD, - GFXTAG_AZURILL, - GFXTAG_POWER, - GFXTAG_REPLAY, - GFXTAG_LOTAD, - GFXTAG_CHERRY + SYMBOL_7_RED, + SYMBOL_POWER, + SYMBOL_7_BLUE, + SYMBOL_REPLAY, + SYMBOL_LOTAD, + SYMBOL_AZURILL, + SYMBOL_REPLAY, + SYMBOL_LOTAD, + SYMBOL_POWER, + SYMBOL_AZURILL, + SYMBOL_REPLAY, + SYMBOL_LOTAD, + SYMBOL_AZURILL, + SYMBOL_POWER, + SYMBOL_REPLAY, + SYMBOL_LOTAD, + SYMBOL_AZURILL, + SYMBOL_POWER, + SYMBOL_REPLAY, + SYMBOL_LOTAD, + SYMBOL_CHERRY }, }; -static const u8 sReelTimeTags[] = { +static const u8 sReelTimeSymbols[] = { 1, 0, 5, 4, 3, 2 }; @@ -5441,15 +5455,15 @@ static const u16 sQuarterSpeed_ProbabilityBoost[] = { 0, 5, 10, 15, 20 }; -static const u8 sBiasTags[] = { - GFXTAG_REPLAY, // BIAS_REPLAY - GFXTAG_CHERRY, // BIAS_CHERRY - GFXTAG_LOTAD, // BIAS_LOTAD - GFXTAG_AZURILL, // BIAS_AZURILL - GFXTAG_POWER, // BIAS_POWER - GFXTAG_7_RED, // BIAS_REELTIME - GFXTAG_7_RED, // BIAS_MIXED_7 - GFXTAG_7_RED // BIAS_STRAIGHT_7 +static const u8 sBiasSymbols[] = { + SYMBOL_REPLAY, // BIAS_REPLAY + SYMBOL_CHERRY, // BIAS_CHERRY + SYMBOL_LOTAD, // BIAS_LOTAD + SYMBOL_AZURILL, // BIAS_AZURILL + SYMBOL_POWER, // BIAS_POWER + SYMBOL_7_RED, // BIAS_REELTIME + SYMBOL_7_RED, // BIAS_MIXED_7 + SYMBOL_7_RED // BIAS_STRAIGHT_7 }; static const u16 sBiasesSpecial[] = { @@ -5460,14 +5474,14 @@ static const u16 sBiasesRegular[] = { BIAS_POWER, BIAS_AZURILL, BIAS_LOTAD, BIAS_CHERRY, BIAS_REPLAY }; -static const u8 sTagToMatch[] = { - [GFXTAG_7_RED] = MATCH_RED_7, - [GFXTAG_7_BLUE] = MATCH_BLUE_7, - [GFXTAG_AZURILL] = MATCH_AZURILL, - [GFXTAG_LOTAD] = MATCH_LOTAD, - [GFXTAG_CHERRY] = MATCH_CHERRY, - [GFXTAG_POWER] = MATCH_POWER, - [GFXTAG_REPLAY] = MATCH_REPLAY +static const u8 sSymbolToMatch[] = { + [SYMBOL_7_RED] = MATCH_RED_7, + [SYMBOL_7_BLUE] = MATCH_BLUE_7, + [SYMBOL_AZURILL] = MATCH_AZURILL, + [SYMBOL_LOTAD] = MATCH_LOTAD, + [SYMBOL_CHERRY] = MATCH_CHERRY, + [SYMBOL_POWER] = MATCH_POWER, + [SYMBOL_REPLAY] = MATCH_REPLAY }; static const u16 sSlotMatchFlags[] = { From 08bf2587ce99a6731c60fe77fddb53fe748db193 Mon Sep 17 00:00:00 2001 From: hondew Date: Sun, 20 Feb 2022 17:47:24 -0500 Subject: [PATCH 389/417] Fix typos --- src/slot_machine.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/slot_machine.c b/src/slot_machine.c index 6935631f8c..1dfa026e5f 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -31,9 +31,9 @@ #define SLOTMACHINE_GFX_TILES 233 #define MAX_BET 3 -#define SYBMOLS_PER_REEL 21 +#define SYMBOLS_PER_REEL 21 #define REEL_SYMBOL_HEIGHT 24 -#define REEL_HEIGHT (SYBMOLS_PER_REEL * REEL_SYMBOL_HEIGHT) +#define REEL_HEIGHT (SYMBOLS_PER_REEL * REEL_SYMBOL_HEIGHT) #define REELTIME_SYMBOLS 6 #define REELTIME_SYMBOL_HEIGHT 20 @@ -199,7 +199,7 @@ enum { REEL_TASK_SPIN, REEL_TASK_DECIDE_STOP, REEL_TASK_STOP_MOVE, - REEL_ACTION_STOP_SHAKE, + REEL_TASK_STOP_SHAKE, }; enum { @@ -561,7 +561,7 @@ static void LoadReelTimeWindowTilemap(s16, s16); static void ClearReelTimeWindowTilemap(s16); static void OpenInfoBox(u8); static bool8 IsInfoBoxClosed(void); -static void RunInfoBoxActions(u8 ); +static void Task_InfoBox(u8 ); static void InfoBox_FadeIn(struct Task *); static void InfoBox_WaitFade(struct Task *); static void InfoBox_DrawWindow(struct Task *); @@ -712,7 +712,7 @@ static const u8 sReelTimeProbabilities_NormalGame[][17]; static const u8 sReelTimeProbabilities_LuckyGame[][17]; static const u8 sSymbolToMatch[]; static const u8 sReelTimeSymbols[]; -static const u8 sReelSymbols[NUM_REELS][SYBMOLS_PER_REEL]; +static const u8 sReelSymbols[NUM_REELS][SYMBOLS_PER_REEL]; static const u16 *const sLitMatchLinePalTable[NUM_MATCH_LINES]; static const u16 *const sDarkMatchLinePalTable[NUM_MATCH_LINES]; static const u8 sMatchLinePalOffsets[NUM_MATCH_LINES]; @@ -854,7 +854,7 @@ static bool8 (*const sReelTasks[])(struct Task *task) = [REEL_TASK_SPIN] = ReelTask_Spin, [REEL_TASK_DECIDE_STOP] = ReelTask_DecideStop, [REEL_TASK_STOP_MOVE] = ReelTask_MoveToStop, - [REEL_ACTION_STOP_SHAKE] = ReelTask_ShakingStop, + [REEL_TASK_STOP_SHAKE] = ReelTask_ShakingStop, }; // Returns true if it is possible to match the bias symbol in the reel. @@ -992,7 +992,7 @@ static void (*const sInfoBoxTasks[])(struct Task *task) = }; // Just idles, digital display is handled by CreateDigitalDisplayScene and sprite callbacks -static void (*const sDigitalDisplayActions[])(struct Task *task) = +static void (*const sDigitalDisplayTasks[])(struct Task *task) = { DigitalDisplay_Idle, }; @@ -1210,7 +1210,7 @@ static void InitSlotMachine(void) for (i = 0; i < NUM_REELS; i++) { sSlotMachine->reelShockOffsets[i] = 0; - sSlotMachine->reelPositions[i] = sInitialReelPositions[i][sSlotMachine->luckyGame] % SYBMOLS_PER_REEL; + sSlotMachine->reelPositions[i] = sInitialReelPositions[i][sSlotMachine->luckyGame] % SYMBOLS_PER_REEL; sSlotMachine->reelPixelOffsets[i] = REEL_HEIGHT - sSlotMachine->reelPositions[i] * REEL_SYMBOL_HEIGHT; sSlotMachine->reelPixelOffsets[i] %= REEL_HEIGHT; } @@ -1387,7 +1387,7 @@ static bool8 SlotTask_HandleBetInput(struct Task *task) return FALSE; } -// SLOT_ACTION_NEED_3_COINS +// SLOTTASK_MSG_NEED_3_COINS static bool8 SlotTask_PrintMsg_Need3Coins(struct Task *task) { DrawDialogueFrame(0, 0); @@ -2172,9 +2172,9 @@ static bool8 PayoutTask_Free(struct Task *task) // .-----------------. static u8 GetSymbolAtRest(u8 reel, s16 offset) { - s16 pos = (sSlotMachine->reelPositions[reel] + offset) % SYBMOLS_PER_REEL; + s16 pos = (sSlotMachine->reelPositions[reel] + offset) % SYMBOLS_PER_REEL; if (pos < 0) - pos += SYBMOLS_PER_REEL; + pos += SYMBOLS_PER_REEL; return sReelSymbols[reel][pos]; } @@ -2200,7 +2200,7 @@ static void AdvanceSlotReel(u8 reelIndex, s16 value) { sSlotMachine->reelPixelOffsets[reelIndex] += value; sSlotMachine->reelPixelOffsets[reelIndex] %= REEL_HEIGHT; - sSlotMachine->reelPositions[reelIndex] = SYBMOLS_PER_REEL - sSlotMachine->reelPixelOffsets[reelIndex] / REEL_SYMBOL_HEIGHT; + sSlotMachine->reelPositions[reelIndex] = SYMBOLS_PER_REEL - sSlotMachine->reelPixelOffsets[reelIndex] / REEL_SYMBOL_HEIGHT; } // Advances the reel no further than the next symbol. Returns the remaining @@ -2338,7 +2338,7 @@ static bool8 ReelTask_MoveToStop(struct Task *task) if (reelPixelPos == 0 && sSlotMachine->reelExtraTurns[task->tReelId] == 0) { - task->tState++; // REEL_ACTION_STOP_SHAKE + task->tState++; // REEL_TASK_STOP_SHAKE task->tShockMagnitude = reelStopShocks[task->tExtraTurns]; task->tTimer = 0; } @@ -3622,7 +3622,7 @@ static void ReelTime_PikachuSpeedUp1(struct Task *task) SetReelTimeBoltDelay(reelTimeBoltDelays[i]); SetReelTimePikachuAuraFlashDelay(pikachuAuraFlashDelays[i]); StartSpriteAnimIfDifferent(&gSprites[sSlotMachine->reelTimePikachuSpriteId], pikachuAnimIds[i]); - // once speed goes below 256, go to next ReelTimeAction and keep the speed level + // once speed goes below 256, go to next ReelTime task and keep the speed level if (task->tRtReelSpeed <= 0x100) { task->tState++; // RT_TASK_PIKA_SPEEDUP2 @@ -3894,20 +3894,20 @@ static void ClearReelTimeWindowTilemap(s16 a0) // Info Box is the screen shown when Select is pressed static void OpenInfoBox(u8 digDisplayId) { - u8 taskId = CreateTask(RunInfoBoxActions, 1); + u8 taskId = CreateTask(Task_InfoBox, 1); gTasks[taskId].data[1] = digDisplayId; - RunInfoBoxActions(taskId); + Task_InfoBox(taskId); } static bool8 IsInfoBoxClosed(void) { - if (FindTaskIdByFunc(RunInfoBoxActions) == TASK_NONE) + if (FindTaskIdByFunc(Task_InfoBox) == TASK_NONE) return TRUE; else return FALSE; } -static void RunInfoBoxActions(u8 taskId) +static void Task_InfoBox(u8 taskId) { sInfoBoxTasks[gTasks[taskId].tState](&gTasks[taskId]); } @@ -3977,7 +3977,7 @@ static void InfoBox_LoadPikaPowerMeter(struct Task *task) static void InfoBox_FreeTask(struct Task *task) { - DestroyTask(FindTaskIdByFunc(RunInfoBoxActions)); + DestroyTask(FindTaskIdByFunc(Task_InfoBox)); } #undef tState @@ -4068,7 +4068,7 @@ static bool8 IsDigitalDisplayAnimFinished(void) static void Task_DigitalDisplay(u8 taskId) { - sDigitalDisplayActions[gTasks[taskId].data[0]](&gTasks[taskId]); + sDigitalDisplayTasks[gTasks[taskId].data[0]](&gTasks[taskId]); } static void DigitalDisplay_Idle(struct Task *task) @@ -5216,7 +5216,7 @@ static void AllocDigitalDisplayGfx(void) sImageTable_DigitalDisplay_DPad[1].size = 0x180; } -static const u8 sReelSymbols[NUM_REELS][SYBMOLS_PER_REEL] = +static const u8 sReelSymbols[NUM_REELS][SYMBOLS_PER_REEL] = { [LEFT_REEL] = { SYMBOL_7_RED, From 40efac0ddf1b6f89bcebc371e2c46b163abb6a3c Mon Sep 17 00:00:00 2001 From: sphericalice Date: Tue, 22 Feb 2022 19:13:17 +0000 Subject: [PATCH 390/417] Rename GetBattlePyramindTrainerEncounterMusicId to fix typo --- include/battle_pyramid.h | 2 +- src/battle_pyramid.c | 2 +- src/pokemon.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/battle_pyramid.h b/include/battle_pyramid.h index c4a72095f0..62320358b6 100644 --- a/include/battle_pyramid.h +++ b/include/battle_pyramid.h @@ -14,7 +14,7 @@ void SoftResetInBattlePyramid(void); void CopyPyramidTrainerSpeechBefore(u16 trainerId); void CopyPyramidTrainerWinSpeech(u16 trainerId); void CopyPyramidTrainerLoseSpeech(u16 trainerId); -u8 GetBattlePyramindTrainerEncounterMusicId(u16 trainerId); +u8 GetTrainerEncounterMusicIdInBattlePyramid(u16 trainerId); void GenerateBattlePyramidFloorLayout(u16 *mapArg, bool8 setPlayerPosition); void LoadBattlePyramidObjectEventTemplates(void); void LoadBattlePyramidFloorObjectEventScripts(void); diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c index 1547603968..9039f60f2c 100644 --- a/src/battle_pyramid.c +++ b/src/battle_pyramid.c @@ -1465,7 +1465,7 @@ void CopyPyramidTrainerLoseSpeech(u16 trainerId) FrontierSpeechToString(gFacilityTrainers[trainerId].speechLose); } -u8 GetBattlePyramindTrainerEncounterMusicId(u16 trainerId) +u8 GetTrainerEncounterMusicIdInBattlePyramid(u16 trainerId) { int i; diff --git a/src/pokemon.c b/src/pokemon.c index 08a6fd0f90..61125e3620 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5810,7 +5810,7 @@ s32 GetBattlerMultiplayerId(u16 a1) u8 GetTrainerEncounterMusicId(u16 trainerOpponentId) { if (InBattlePyramid()) - return GetBattlePyramindTrainerEncounterMusicId(trainerOpponentId); + return GetTrainerEncounterMusicIdInBattlePyramid(trainerOpponentId); else if (InTrainerHillChallenge()) return GetTrainerEncounterMusicIdInTrainerHill(trainerOpponentId); else From f826a5a82d3563cf30f7acd5270f200119cc6745 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Wed, 23 Feb 2022 15:07:22 +0800 Subject: [PATCH 391/417] Use constants for PC locations --- data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc | 4 ++-- data/maps/LittlerootTown_MaysHouse_2F/scripts.inc | 4 ++-- data/scripts/pc.inc | 4 ++-- src/field_specials.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc index 901940ab8e..cd4d155192 100644 --- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc @@ -243,7 +243,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_PC:: end LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC:: - setvar VAR_0x8004, 1 + setvar VAR_0x8004, PC_LOCATION_BRENDANS_HOUSE special DoPCTurnOnEffect playse SE_PC_ON msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT @@ -253,7 +253,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC:: end LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC:: - setvar VAR_0x8004, 1 + setvar VAR_0x8004, PC_LOCATION_BRENDANS_HOUSE playse SE_PC_OFF special DoPCTurnOffEffect releaseall diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc index 7403f3fcf6..ef8e83bf7e 100644 --- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc @@ -294,7 +294,7 @@ LittlerootTown_MaysHouse_2F_EventScript_CheckRivalsPC:: end LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC:: - setvar VAR_0x8004, 2 + setvar VAR_0x8004, PC_LOCATION_MAYS_HOUSE special DoPCTurnOnEffect playse SE_PC_ON msgbox gText_PlayerHouseBootPC, MSGBOX_DEFAULT @@ -304,7 +304,7 @@ LittlerootTown_MaysHouse_2F_EventScript_CheckPlayersPC:: end LittlerootTown_MaysHouse_2F_EventScript_TurnOffPlayerPC:: - setvar VAR_0x8004, 2 + setvar VAR_0x8004, PC_LOCATION_MAYS_HOUSE playse SE_PC_OFF special DoPCTurnOffEffect releaseall diff --git a/data/scripts/pc.inc b/data/scripts/pc.inc index 43c0bca0d7..1993aaf63f 100644 --- a/data/scripts/pc.inc +++ b/data/scripts/pc.inc @@ -1,6 +1,6 @@ EventScript_PC:: lockall - setvar VAR_0x8004, 0 + setvar VAR_0x8004, PC_LOCATION_OTHER special DoPCTurnOnEffect playse SE_PC_ON msgbox Text_BootUpPC, MSGBOX_DEFAULT @@ -51,7 +51,7 @@ EventScript_AccessLanettesPC:: return EventScript_TurnOffPC:: - setvar VAR_0x8004, 0 + setvar VAR_0x8004, PC_LOCATION_OTHER playse SE_PC_OFF special DoPCTurnOffEffect releaseall diff --git a/src/field_specials.c b/src/field_specials.c index f749ea8fca..a4cdafafc2 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1069,11 +1069,11 @@ static void PCTurnOffEffect(void) dy = -1; break; } - if (gSpecialVar_0x8004 == 0) + if (gSpecialVar_0x8004 == PC_LOCATION_OTHER) tileId = METATILE_Building_PC_Off; - else if (gSpecialVar_0x8004 == 1) + else if (gSpecialVar_0x8004 == PC_LOCATION_BRENDANS_HOUSE) tileId = METATILE_BrendansMaysHouse_BrendanPC_Off; - else if (gSpecialVar_0x8004 == 2) + else if (gSpecialVar_0x8004 == PC_LOCATION_MAYS_HOUSE) tileId = METATILE_BrendansMaysHouse_MayPC_Off; MapGridSetMetatileIdAt(gSaveBlock1Ptr->pos.x + dx + MAP_OFFSET, gSaveBlock1Ptr->pos.y + dy + MAP_OFFSET, tileId | MAPGRID_COLLISION_MASK); DrawWholeMapView(); From 9a31fdf7becd6e1e3e59ee5f0b9589469f81837f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 11:38:08 -0300 Subject: [PATCH 392/417] Updated Applin, Sinistea and Galarian Slowpoke evolution data --- src/data/pokemon/evolution.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data/pokemon/evolution.h b/src/data/pokemon/evolution.h index b431b88a3b..093fcce98b 100644 --- a/src/data/pokemon/evolution.h +++ b/src/data/pokemon/evolution.h @@ -467,15 +467,15 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_YAMPER] = {{EVO_LEVEL, 25, SPECIES_BOLTUND}}, [SPECIES_ROLYCOLY] = {{EVO_LEVEL, 18, SPECIES_CARKOL}}, [SPECIES_CARKOL] = {{EVO_LEVEL, 34, SPECIES_COALOSSAL}}, - [SPECIES_APPLIN] = {{EVO_ITEM, ITEM_NONE, SPECIES_FLAPPLE}, - {EVO_ITEM, ITEM_NONE, SPECIES_APPLETUN}}, + [SPECIES_APPLIN] = {{EVO_ITEM, ITEM_TART_APPLE, SPECIES_FLAPPLE}, + {EVO_ITEM, ITEM_SWEET_APPLE, SPECIES_APPLETUN}}, [SPECIES_SILICOBRA] = {{EVO_LEVEL, 36, SPECIES_SANDACONDA}}, [SPECIES_ARROKUDA] = {{EVO_LEVEL, 26, SPECIES_BARRASKEWDA}}, [SPECIES_TOXEL] = {{EVO_LEVEL_NATURE_AMPED, 30, SPECIES_TOXTRICITY}, {EVO_LEVEL_NATURE_LOW_KEY, 30, SPECIES_TOXTRICITY_LOW_KEY}}, [SPECIES_SIZZLIPEDE] = {{EVO_LEVEL, 28, SPECIES_CENTISKORCH}}, [SPECIES_CLOBBOPUS] = {{EVO_MOVE, MOVE_TAUNT, SPECIES_GRAPPLOCT}}, - [SPECIES_SINISTEA] = {{EVO_ITEM, ITEM_NONE, SPECIES_POLTEAGEIST}}, + [SPECIES_SINISTEA] = {{EVO_ITEM, ITEM_CRACKED_POT, SPECIES_POLTEAGEIST}}, [SPECIES_HATENNA] = {{EVO_LEVEL, 32, SPECIES_HATTREM}}, [SPECIES_HATTREM] = {{EVO_LEVEL, 42, SPECIES_HATTERENE}}, [SPECIES_IMPIDIMP] = {{EVO_LEVEL, 32, SPECIES_MORGREM}}, @@ -505,8 +505,8 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_GRIMER_ALOLAN] = {{EVO_LEVEL, 38, SPECIES_MUK_ALOLAN}}, [SPECIES_MEOWTH_GALARIAN] = {{EVO_LEVEL, 28, SPECIES_PERRSERKER}}, [SPECIES_PONYTA_GALARIAN] = {{EVO_LEVEL, 40, SPECIES_RAPIDASH_GALARIAN}}, - [SPECIES_SLOWPOKE_GALARIAN] = {{EVO_ITEM, ITEM_NONE, SPECIES_SLOWBRO_GALARIAN}, - {EVO_ITEM, ITEM_NONE, SPECIES_SLOWKING_GALARIAN}}, + [SPECIES_SLOWPOKE_GALARIAN] = {{EVO_ITEM, ITEM_GALARICA_CUFF, SPECIES_SLOWBRO_GALARIAN}, + {EVO_ITEM, ITEM_GALARICA_WREATH, SPECIES_SLOWKING_GALARIAN}}, [SPECIES_FARFETCHD_GALARIAN] = {{EVO_LEVEL, 0, SPECIES_SIRFETCHD}}, [SPECIES_MR_MIME_GALARIAN] = {{EVO_LEVEL, 42, SPECIES_MR_RIME}}, [SPECIES_CORSOLA_GALARIAN] = {{EVO_LEVEL, 38, SPECIES_CURSOLA}}, @@ -534,5 +534,5 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] = [SPECIES_PUMPKABOO_LARGE] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_LARGE}}, [SPECIES_PUMPKABOO_SUPER] = {{EVO_TRADE, 0, SPECIES_GOURGEIST_SUPER}}, [SPECIES_ROCKRUFF_OWN_TEMPO] = {{EVO_LEVEL_DUSK, 25, SPECIES_LYCANROC_DUSK}}, - [SPECIES_SINISTEA_ANTIQUE] = {{EVO_ITEM, ITEM_NONE, SPECIES_POLTEAGEIST_ANTIQUE}}, + [SPECIES_SINISTEA_ANTIQUE] = {{EVO_ITEM, ITEM_CHIPPED_POT, SPECIES_POLTEAGEIST_ANTIQUE}}, }; From 755b31bee0a500a963f5c4de137c9b8c9953b03f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 12:19:38 -0300 Subject: [PATCH 393/417] Enable form change for the Forces of Nature --- include/constants/pokemon_config.h | 4 +-- src/data/pokemon/form_change_table_pointers.h | 10 +++--- src/data/pokemon/form_change_tables.h | 35 +++++-------------- 3 files changed, 15 insertions(+), 34 deletions(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 257c06b7c0..91561ab7c1 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -159,8 +159,8 @@ //FORM_ITEM_USE #define ITEM_GRACIDEA 10125 - // #define ITEM_REVEAL_GLASS 10126 - // #define ITEM_PRISON_BOTTLE 10127 + #define ITEM_REVEAL_GLASS 10126 + #define ITEM_PRISON_BOTTLE 10127 #define ITEM_RED_NECTAR 10128 #define ITEM_YELLOW_NECTAR 10129 #define ITEM_PINK_NECTAR 10130 diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index 39fcc7aee2..d44b70dce8 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -3,7 +3,7 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_GIRATINA] = sGiratinaFormChangeTable, [SPECIES_GIRATINA_ORIGIN] = sGiratinaFormChangeTable, [SPECIES_SHAYMIN] = sShayminFormChangeTable, - [SPECIES_SHAYMIN_SKY] = sShayminSkyFormChangeTable, + [SPECIES_SHAYMIN_SKY] = sShayminFormChangeTable, [SPECIES_ARCEUS] = sArceusFormChangeTable, [SPECIES_ARCEUS_FIGHTING] = sArceusFormChangeTable, [SPECIES_ARCEUS_FLYING] = sArceusFormChangeTable, @@ -23,13 +23,13 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_ARCEUS_DARK] = sArceusFormChangeTable, [SPECIES_ARCEUS_FAIRY] = sArceusFormChangeTable, [SPECIES_TORNADUS] = sTornadusFormChangeTable, - [SPECIES_TORNADUS_THERIAN] = sTornadusTherianFormChangeTable, + [SPECIES_TORNADUS_THERIAN] = sTornadusFormChangeTable, [SPECIES_THUNDURUS] = sThundurusFormChangeTable, - [SPECIES_THUNDURUS_THERIAN] = sThundurusTherianFormChangeTable, + [SPECIES_THUNDURUS_THERIAN] = sThundurusFormChangeTable, [SPECIES_LANDORUS] = sLandorusFormChangeTable, - [SPECIES_LANDORUS_THERIAN] = sLandorusTherianFormChangeTable, + [SPECIES_LANDORUS_THERIAN] = sLandorusFormChangeTable, [SPECIES_KELDEO] = sKeldeoFormChangeTable, - [SPECIES_KELDEO_RESOLUTE] = sKeldeoResoluteFormChangeTable, + [SPECIES_KELDEO_RESOLUTE] = sKeldeoFormChangeTable, [SPECIES_GENESECT] = sGenesectFormChangeTable, [SPECIES_GENESECT_DOUSE_DRIVE] = sGenesectFormChangeTable, [SPECIES_GENESECT_SHOCK_DRIVE] = sGenesectFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index f980f14b89..a333d62c18 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -47,10 +47,6 @@ static const struct FormChange sGiratinaFormChangeTable[] = { static const struct FormChange sShayminFormChangeTable[] = { {FORM_ITEM_USE_TIME, SPECIES_SHAYMIN_SKY, ITEM_GRACIDEA, DAY}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sShayminSkyFormChangeTable[] = { {FORM_WITHDRAW, SPECIES_SHAYMIN}, {FORM_CHANGE_END}, }; @@ -95,41 +91,25 @@ static const struct FormChange sArceusFormChangeTable[] = { }; static const struct FormChange sTornadusFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sTornadusTherianFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sThundurusFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sThundurusTherianFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sLandorusFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sLandorusTherianFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sKeldeoFormChangeTable[] = { {FORM_MOVE, SPECIES_KELDEO_RESOLUTE, MOVE_SECRET_SWORD, WHEN_LEARNED}, - {FORM_CHANGE_END}, -}; - -static const struct FormChange sKeldeoResoluteFormChangeTable[] = { {FORM_MOVE, SPECIES_KELDEO, MOVE_SECRET_SWORD, WHEN_FORGOTTEN}, {FORM_CHANGE_END}, }; @@ -144,7 +124,8 @@ static const struct FormChange sGenesectFormChangeTable[] = { }; static const struct FormChange sHoopaFormChangeTable[] = { - // {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, + {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, + {FORM_WITHDRAW, SPECIES_HOOPA}, {FORM_CHANGE_END}, }; From e2daf2c258bb9a9971a76a12d978e0f530aaa0f6 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 12:23:37 -0300 Subject: [PATCH 394/417] Fixed bug where switching between 2 forms with the same method would cause only one to change --- src/pokemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pokemon.c b/src/pokemon.c index 73df906c28..658f88519a 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8267,6 +8267,8 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg } break; } + if (species != targetSpecies) + break; } } } From b1227af13b27ee235c0f23dac7a0864577fd76f5 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 12:58:49 -0300 Subject: [PATCH 395/417] Reverted to separate form change tables for Forces of Nature. It was causing form changes with holding items to break --- src/data/pokemon/form_change_table_pointers.h | 8 +++---- src/data/pokemon/form_change_tables.h | 23 +++++++++++++++++-- src/pokemon.c | 2 -- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/data/pokemon/form_change_table_pointers.h b/src/data/pokemon/form_change_table_pointers.h index d44b70dce8..d40d332abf 100644 --- a/src/data/pokemon/form_change_table_pointers.h +++ b/src/data/pokemon/form_change_table_pointers.h @@ -23,13 +23,13 @@ const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] = [SPECIES_ARCEUS_DARK] = sArceusFormChangeTable, [SPECIES_ARCEUS_FAIRY] = sArceusFormChangeTable, [SPECIES_TORNADUS] = sTornadusFormChangeTable, - [SPECIES_TORNADUS_THERIAN] = sTornadusFormChangeTable, + [SPECIES_TORNADUS_THERIAN] = sTornadusTherianFormChangeTable, [SPECIES_THUNDURUS] = sThundurusFormChangeTable, - [SPECIES_THUNDURUS_THERIAN] = sThundurusFormChangeTable, + [SPECIES_THUNDURUS_THERIAN] = sThundurusTherianFormChangeTable, [SPECIES_LANDORUS] = sLandorusFormChangeTable, - [SPECIES_LANDORUS_THERIAN] = sLandorusFormChangeTable, + [SPECIES_LANDORUS_THERIAN] = sLandorusTherianFormChangeTable, [SPECIES_KELDEO] = sKeldeoFormChangeTable, - [SPECIES_KELDEO_RESOLUTE] = sKeldeoFormChangeTable, + [SPECIES_KELDEO_RESOLUTE] = sKeldeoResoluteFormChangeTable, [SPECIES_GENESECT] = sGenesectFormChangeTable, [SPECIES_GENESECT_DOUSE_DRIVE] = sGenesectFormChangeTable, [SPECIES_GENESECT_SHOCK_DRIVE] = sGenesectFormChangeTable, diff --git a/src/data/pokemon/form_change_tables.h b/src/data/pokemon/form_change_tables.h index a333d62c18..c224a1a028 100644 --- a/src/data/pokemon/form_change_tables.h +++ b/src/data/pokemon/form_change_tables.h @@ -1,4 +1,8 @@ /* +For cycling between forms with the same method and parameters but different target species (eg. Tornadus using the +Reveal Glass to change between its two forms), a separate form change table is required for each form. +Otherwise, only the last form change on the table will trigger. + FORM_ITEM_HOLD: Form change activates when the item is given to or taken from the selected Pokémon. param1 = item to hold @@ -92,24 +96,40 @@ static const struct FormChange sArceusFormChangeTable[] = { static const struct FormChange sTornadusFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_TORNADUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sTornadusTherianFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_TORNADUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sThundurusFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_THUNDURUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sThundurusTherianFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_THUNDURUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sLandorusFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_LANDORUS_THERIAN, ITEM_REVEAL_GLASS}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sLandorusTherianFormChangeTable[] = { {FORM_ITEM_USE, SPECIES_LANDORUS, ITEM_REVEAL_GLASS}, {FORM_CHANGE_END}, }; static const struct FormChange sKeldeoFormChangeTable[] = { {FORM_MOVE, SPECIES_KELDEO_RESOLUTE, MOVE_SECRET_SWORD, WHEN_LEARNED}, + {FORM_CHANGE_END}, +}; + +static const struct FormChange sKeldeoResoluteFormChangeTable[] = { {FORM_MOVE, SPECIES_KELDEO, MOVE_SECRET_SWORD, WHEN_FORGOTTEN}, {FORM_CHANGE_END}, }; @@ -124,8 +144,7 @@ static const struct FormChange sGenesectFormChangeTable[] = { }; static const struct FormChange sHoopaFormChangeTable[] = { - {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, - {FORM_WITHDRAW, SPECIES_HOOPA}, + // {FORM_ITEM_USE, SPECIES_HOOPA_UNBOUND, ITEM_PRISON_BOTTLE, SPECIES_HOOPA}, {FORM_CHANGE_END}, }; diff --git a/src/pokemon.c b/src/pokemon.c index 658f88519a..73df906c28 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8267,8 +8267,6 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *mon, u16 method, u32 arg } break; } - if (species != targetSpecies) - break; } } } From ed1ea69759ab2efaa4cf9568b57b2d0c311d4dc9 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 21:40:20 -0300 Subject: [PATCH 396/417] Fixed Shelmet and Karrablast being able to evolve if the partner is holding an Everstone --- include/pokemon.h | 2 +- src/battle_main.c | 2 +- src/party_menu.c | 4 ++-- src/pokemon.c | 26 +++++++++++++++++++++++--- src/trade.c | 6 +++--- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index 1dc3ed461b..fbb6612e3c 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -385,7 +385,7 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit); u8 *UseStatIncreaseItem(u16 itemId); u8 GetNature(struct Pokemon *mon); u8 GetNatureFromPersonality(u32 personality); -u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem, u16 tradePartnerSpecies); +u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem, struct Pokemon *tradePartner); u16 HoennPokedexNumToSpecies(u16 hoennNum); u16 NationalPokedexNumToSpecies(u16 nationalNum); u16 NationalToHoennOrder(u16 nationalNum); diff --git a/src/battle_main.c b/src/battle_main.c index 9f33450f52..594c3779d6 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5150,7 +5150,7 @@ static void TryEvolvePokemon(void) levelUpBits &= ~(gBitTable[i]); gLeveledUpInBattle = levelUpBits; - species = GetEvolutionTargetSpecies(&gPlayerParty[i], EVO_MODE_NORMAL, levelUpBits, SPECIES_NONE); + species = GetEvolutionTargetSpecies(&gPlayerParty[i], EVO_MODE_NORMAL, levelUpBits, NULL); if (species != SPECIES_NONE) { FreeAllWindowBuffers(); diff --git a/src/party_menu.c b/src/party_menu.c index 7c24eeb7a7..1e281032e9 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -915,7 +915,7 @@ static bool8 DisplayPartyPokemonDataForMoveTutorOrEvolutionItem(u8 slot) DisplayPartyPokemonDataToTeachMove(slot, item, 0); break; case 2: // Evolution stone - if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, EVO_MODE_ITEM_CHECK, item, SPECIES_NONE) != SPECIES_NONE) + if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, EVO_MODE_ITEM_CHECK, item, NULL) != SPECIES_NONE) return FALSE; DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NO_USE); break; @@ -5026,7 +5026,7 @@ static void Task_TryLearningNextMove(u8 taskId) static void PartyMenuTryEvolution(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; - u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE, SPECIES_NONE); + u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, ITEM_NONE, NULL); if (targetSpecies != SPECIES_NONE) { diff --git a/src/pokemon.c b/src/pokemon.c index 73df906c28..a57bbd2032 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6086,7 +6086,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov case 7: // ITEM4_EVO_STONE { - u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_ITEM_USE, item, SPECIES_NONE); + u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_ITEM_USE, item, NULL); if (targetSpecies != SPECIES_NONE) { @@ -6410,7 +6410,7 @@ u8 GetNatureFromPersonality(u32 personality) return personality % NUM_NATURES; } -u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u16 tradePartnerSpecies) +u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, struct Pokemon *tradePartner) { int i, j; u16 targetSpecies = 0; @@ -6423,6 +6423,26 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u u16 upperPersonality = personality >> 16; u8 holdEffect; u16 currentMap; + u16 partnerSpecies; + u16 partnerHeldItem; + u8 partnerHoldEffect; + + if (tradePartner != NULL) + { + partnerSpecies = GetMonData(tradePartner, MON_DATA_SPECIES, 0); + partnerHeldItem = GetMonData(tradePartner, MON_DATA_HELD_ITEM, 0); + + if (partnerHeldItem == ITEM_ENIGMA_BERRY) + partnerHoldEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + else + partnerHoldEffect = ItemId_GetHoldEffect(partnerHeldItem); + } + else + { + partnerSpecies = SPECIES_NONE; + partnerHeldItem = ITEM_NONE; + partnerHoldEffect = HOLD_EFFECT_NONE; + } if (heldItem == ITEM_ENIGMA_BERRY) holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; @@ -6654,7 +6674,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u } break; case EVO_TRADE_SPECIFIC_MON: - if (gEvolutionTable[species][i].param == tradePartnerSpecies) + if (gEvolutionTable[species][i].param == partnerSpecies && partnerHoldEffect != HOLD_EFFECT_PREVENT_EVOLVE) targetSpecies = gEvolutionTable[species][i].targetSpecies; break; } diff --git a/src/trade.c b/src/trade.c index ba07b9291b..cd3c5f4361 100644 --- a/src/trade.c +++ b/src/trade.c @@ -3798,7 +3798,7 @@ static bool8 AnimateTradeSequenceCable(void) case TS_STATE_TRY_EVOLUTION: // Only if in-game trade, link trades use CB2_TryLinkTradeEvolution TradeMons(gSpecialVar_0x8005, 0); gCB2_AfterEvolution = CB2_UpdateInGameTrade; - evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]], MON_DATA_SPECIES)); + evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, &gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]]); if (evoTarget != SPECIES_NONE) { TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeData->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); @@ -4298,7 +4298,7 @@ static bool8 AnimateTradeSequenceWireless(void) case TS_STATE_TRY_EVOLUTION: // Only if in-game trade, link trades use CB2_TryLinkTradeEvolution TradeMons(gSpecialVar_0x8005, 0); gCB2_AfterEvolution = CB2_UpdateInGameTrade; - evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]], MON_DATA_SPECIES)); + evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, &gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]]); if (evoTarget != SPECIES_NONE) { TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeData->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); @@ -4343,7 +4343,7 @@ static void CB2_TryLinkTradeEvolution(void) break; case 4: gCB2_AfterEvolution = CB2_SaveAndEndTrade; - evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]], MON_DATA_SPECIES)); + evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], EVO_MODE_TRADE, ITEM_NONE, &gPlayerParty[gSelectedTradeMonPositions[TRADE_PARTNER]]); if (evoTarget != SPECIES_NONE) TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], evoTarget, sTradeData->monSpriteIds[TRADE_PARTNER], gSelectedTradeMonPositions[TRADE_PLAYER]); else if (IsWirelessTrade()) From 054f667446e2c786ee9ac98b29406151ec07535f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 26 Feb 2022 22:04:24 -0300 Subject: [PATCH 397/417] Config for Kadabra ignoring Everstone upon evolving --- include/constants/pokemon_config.h | 1 + src/pokemon.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 257c06b7c0..310e6398ae 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -17,6 +17,7 @@ #define P_UPDATED_ABILITIES GEN_8 // Since Gen 6, certain Pokémon have their abilities changed. Requires BATTLE_ENGINE for Gen4+ abilities. #define P_UPDATED_EGG_GROUPS GEN_8 // Since Gen 8, certain Pokémon have gained new egg groups. #define P_SHEDINJA_BALL GEN_8 // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. +#define P_KADABRA_EVERSTONE GEN_8 // Since Gen 4, Kadabra can evolve even when holding an Everstone. #define P_ENABLE_DEBUG TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. diff --git a/src/pokemon.c b/src/pokemon.c index 73df906c28..8296614b1e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6430,7 +6430,9 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, u holdEffect = ItemId_GetHoldEffect(heldItem); // Prevent evolution with Everstone, unless we're just viewing the party menu with an evolution item - if (holdEffect == HOLD_EFFECT_PREVENT_EVOLVE && mode != EVO_MODE_ITEM_CHECK) + if (holdEffect == HOLD_EFFECT_PREVENT_EVOLVE + && mode != EVO_MODE_ITEM_CHECK + && (P_KADABRA_EVERSTONE < GEN_4 || species != SPECIES_KADABRA)) return SPECIES_NONE; switch (mode) From 36e5d5e759d32e4987ffbbac70f84978e1893d16 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 27 Feb 2022 13:47:50 -0500 Subject: [PATCH 398/417] Add missing menu array counts --- src/main_menu.c | 2 +- src/menu.c | 8 ++++---- src/player_pc.c | 4 ++-- src/secret_base.c | 2 +- src/trade.c | 2 +- src/trader.c | 18 +++++++----------- src/union_room_chat.c | 2 +- 7 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/main_menu.c b/src/main_menu.c index 54a4f68917..ed6158a9cf 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -2090,7 +2090,7 @@ static void NewGameBirchSpeech_ShowGenderMenu(void) DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3); FillWindowPixelBuffer(1, PIXEL_FILL(1)); PrintMenuTable(1, ARRAY_COUNT(sMenuActions_Gender), sMenuActions_Gender); - InitMenuInUpperLeftCornerNormal(1, 2, 0); + InitMenuInUpperLeftCornerNormal(1, ARRAY_COUNT(sMenuActions_Gender), 0); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_FULL); } diff --git a/src/menu.c b/src/menu.c index 6b915f9cec..49baddded5 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1542,25 +1542,25 @@ static s8 Menu_ProcessGridInputRepeat(void) { return MENU_B_PRESSED; } - else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_UP) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_UP) { if (oldPos != ChangeGridMenuCursorPosition(0, -1)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_DOWN) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_DOWN) { if (oldPos != ChangeGridMenuCursorPosition(0, 1)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) { if (oldPos != ChangeGridMenuCursorPosition(-1, 0)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((JOY_REPEAT(DPAD_ANY)) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) + else if (JOY_REPEAT(DPAD_ANY) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) { if (oldPos != ChangeGridMenuCursorPosition(1, 0)) PlaySE(SE_SELECT); diff --git a/src/player_pc.c b/src/player_pc.c index 06f58fdeb4..bf8479ce11 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -511,7 +511,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var) tWindowId = AddWindow(&windowTemplate); SetStandardWindowBorderStyle(tWindowId, 0); PrintMenuTable(tWindowId, ARRAY_COUNT(sItemStorage_MenuActions), sItemStorage_MenuActions); - InitMenuInUpperLeftCornerNormal(tWindowId, 4, var); + InitMenuInUpperLeftCornerNormal(tWindowId, ARRAY_COUNT(sItemStorage_MenuActions), var); ScheduleBgCopyTilemapToVram(0); ItemStorageMenuPrint(sItemStorage_OptionDescriptions[var]); } @@ -753,7 +753,7 @@ static void Mailbox_PrintMailOptions(u8 taskId) { u8 windowId = MailboxMenu_AddWindow(MAILBOXWIN_OPTIONS); PrintMenuTable(windowId, ARRAY_COUNT(gMailboxMailOptions), gMailboxMailOptions); - InitMenuInUpperLeftCornerNormal(windowId, 4, 0); + InitMenuInUpperLeftCornerNormal(windowId, ARRAY_COUNT(gMailboxMailOptions), 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = Mailbox_MailOptionsProcessInput; } diff --git a/src/secret_base.c b/src/secret_base.c index 9398c4bb2f..fa424889e0 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -1027,7 +1027,7 @@ static void ShowRegistryMenuActions(u8 taskId) tActionWindowId = AddWindow(&template); SetStandardWindowBorderStyle(tActionWindowId, 0); PrintMenuTable(tActionWindowId, ARRAY_COUNT(sRegistryMenuActions), sRegistryMenuActions); - InitMenuInUpperLeftCornerNormal(tActionWindowId, 2, 0); + InitMenuInUpperLeftCornerNormal(tActionWindowId, ARRAY_COUNT(sRegistryMenuActions), 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = HandleRegistryMenuActionsInput; } diff --git a/src/trade.c b/src/trade.c index b48d1abf51..dd0851bbda 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1394,7 +1394,7 @@ static void TradeMenuProcessInput(void) DrawTextBorderOuter(1, 1, 14); FillWindowPixelBuffer(1, PIXEL_FILL(1)); PrintMenuTable(1, ARRAY_COUNT(sSelectTradeMonActions), sSelectTradeMonActions); - InitMenuInUpperLeftCornerNormal(1, 2, 0); + InitMenuInUpperLeftCornerNormal(1, ARRAY_COUNT(sSelectTradeMonActions), 0); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_FULL); sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_SELECTED_MON; diff --git a/src/trader.c b/src/trader.c index abe581db31..b89ad60438 100644 --- a/src/trader.c +++ b/src/trader.c @@ -15,7 +15,7 @@ #include "task.h" #include "script_menu.h" -static const u8 * const sDefaultTraderNames[] = +static const u8 * const sDefaultTraderNames[NUM_TRADER_ITEMS] = { gText_Tristan, gText_Philip, @@ -23,7 +23,7 @@ static const u8 * const sDefaultTraderNames[] = gText_Roberto, }; -static const u8 sDefaultTraderDecorations[] = +static const u8 sDefaultTraderDecorations[NUM_TRADER_ITEMS] = { DECOR_DUSKULL_DOLL, DECOR_BALL_CUSHION, @@ -39,7 +39,7 @@ void TraderSetup(void) trader->id = MAUVILLE_MAN_TRADER; trader->alreadyTraded = FALSE; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRADER_ITEMS; i++) { StringCopy(trader->playerNames[i], sDefaultTraderNames[i]); trader->decorations[i] = sDefaultTraderDecorations[i]; @@ -61,7 +61,7 @@ void CreateAvailableDecorationsMenu(u8 taskId) struct WindowTemplate windowTemplate = {0, 1, 1, 10, 10, 15, 1}; s32 windowWidth = GetStringWidth(FONT_NORMAL, gText_Exit, 0); s32 fiveMarksWidth = GetStringWidth(FONT_NORMAL, gText_FiveMarks, 0); - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRADER_ITEMS; i++) { s32 curWidth; if (trader->decorations[i] > NUM_DECORATIONS) @@ -74,7 +74,7 @@ void CreateAvailableDecorationsMenu(u8 taskId) windowTemplate.width = ConvertPixelWidthToTileWidth(windowWidth); data[3] = AddWindow(&windowTemplate); DrawStdFrameWithCustomTileAndPalette(data[3], FALSE, 0x214, 14); - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_TRADER_ITEMS; i++) { if (trader->decorations[i] > NUM_DECORATIONS) AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_FiveMarks, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); @@ -82,7 +82,7 @@ void CreateAvailableDecorationsMenu(u8 taskId) AddTextPrinterParameterized(data[3], FONT_NORMAL, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); } AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_Exit, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); - InitMenuInUpperLeftCornerNormal(data[3], 5, 0); + InitMenuInUpperLeftCornerNormal(data[3], NUM_TRADER_ITEMS + 1, 0); ScheduleBgCopyTilemapToVram(0); } @@ -90,13 +90,9 @@ void Task_BufferDecorSelectionAndCloseWindow(u8 taskId, u8 decorationId) { s16 * data = gTasks[taskId].data; if (decorationId > NUM_DECORATIONS) - { gSpecialVar_0x8004 = 0xFFFF; - } else - { gSpecialVar_0x8004 = decorationId; - } ClearStdWindowAndFrameToTransparent(data[3], FALSE); ClearWindowTilemap(data[3]); @@ -116,7 +112,7 @@ void Task_HandleGetDecorationMenuInput(u8 taskId) case MENU_NOTHING_CHOSEN: break; case MENU_B_PRESSED: - case 4: + case NUM_TRADER_ITEMS: PlaySE(SE_SELECT); Task_BufferDecorSelectionAndCloseWindow(taskId, 0); break; diff --git a/src/union_room_chat.c b/src/union_room_chat.c index 22268ef4ac..9890bc1f88 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -2987,7 +2987,7 @@ static void ShowKeyboardSwapMenu(void) { FillWindowPixelBuffer(3, PIXEL_FILL(1)); DrawTextBorderOuter(3, 1, 13); - PrintMenuActionTextsAtPos(3, FONT_SHORT, 8, 1, 14, 5, sKeyboardPageTitleTexts); + PrintMenuActionTextsAtPos(3, FONT_SHORT, 8, 1, 14, ARRAY_COUNT(sKeyboardPageTitleTexts), sKeyboardPageTitleTexts); InitMenuNormal(3, FONT_SHORT, 0, 1, 14, 5, GetCurrentKeyboardPage()); PutWindowTilemap(3); } From 3d0663fe811cdd01010b391b88423f91387f89e1 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 27 Feb 2022 13:58:48 -0500 Subject: [PATCH 399/417] Additional trader clean up --- src/decoration_inventory.c | 2 +- src/trader.c | 34 ++++++++++++++++++++++------------ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/decoration_inventory.c b/src/decoration_inventory.c index af1071b1b1..c84ee69a46 100644 --- a/src/decoration_inventory.c +++ b/src/decoration_inventory.c @@ -33,7 +33,7 @@ static void ClearDecorationInventory(u8 category) void ClearDecorationInventories(void) { u8 category; - for (category = 0; category < 8; category++) + for (category = 0; category < DECORCAT_COUNT; category++) ClearDecorationInventory(category); } diff --git a/src/trader.c b/src/trader.c index b89ad60438..040ee695b3 100644 --- a/src/trader.c +++ b/src/trader.c @@ -53,12 +53,22 @@ void Trader_ResetFlag(void) trader->alreadyTraded = FALSE; } +#define tWindowId data[3] + void CreateAvailableDecorationsMenu(u8 taskId) { u8 i; s16 * data = gTasks[taskId].data; struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader; - struct WindowTemplate windowTemplate = {0, 1, 1, 10, 10, 15, 1}; + struct WindowTemplate windowTemplate = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 10, + .height = 10, + .paletteNum = 15, + .baseBlock = 1 + }; s32 windowWidth = GetStringWidth(FONT_NORMAL, gText_Exit, 0); s32 fiveMarksWidth = GetStringWidth(FONT_NORMAL, gText_FiveMarks, 0); for (i = 0; i < NUM_TRADER_ITEMS; i++) @@ -72,17 +82,17 @@ void CreateAvailableDecorationsMenu(u8 taskId) windowWidth = curWidth; } windowTemplate.width = ConvertPixelWidthToTileWidth(windowWidth); - data[3] = AddWindow(&windowTemplate); - DrawStdFrameWithCustomTileAndPalette(data[3], FALSE, 0x214, 14); + tWindowId = AddWindow(&windowTemplate); + DrawStdFrameWithCustomTileAndPalette(tWindowId, FALSE, 0x214, 14); for (i = 0; i < NUM_TRADER_ITEMS; i++) { if (trader->decorations[i] > NUM_DECORATIONS) - AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_FiveMarks, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(tWindowId, FONT_NORMAL, gText_FiveMarks, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); else - AddTextPrinterParameterized(data[3], FONT_NORMAL, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(tWindowId, FONT_NORMAL, gDecorations[trader->decorations[i]].name, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); } - AddTextPrinterParameterized(data[3], FONT_NORMAL, gText_Exit, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); - InitMenuInUpperLeftCornerNormal(data[3], NUM_TRADER_ITEMS + 1, 0); + AddTextPrinterParameterized(tWindowId, FONT_NORMAL, gText_Exit, 8, 16 * i + 1, TEXT_SKIP_DRAW, NULL); + InitMenuInUpperLeftCornerNormal(tWindowId, NUM_TRADER_ITEMS + 1, 0); ScheduleBgCopyTilemapToVram(0); } @@ -94,9 +104,9 @@ void Task_BufferDecorSelectionAndCloseWindow(u8 taskId, u8 decorationId) else gSpecialVar_0x8004 = decorationId; - ClearStdWindowAndFrameToTransparent(data[3], FALSE); - ClearWindowTilemap(data[3]); - RemoveWindow(data[3]); + ClearStdWindowAndFrameToTransparent(tWindowId, FALSE); + ClearWindowTilemap(tWindowId); + RemoveWindow(tWindowId); ScheduleBgCopyTilemapToVram(0); DestroyTask(taskId); EnableBothScriptContexts(); @@ -112,7 +122,7 @@ void Task_HandleGetDecorationMenuInput(u8 taskId) case MENU_NOTHING_CHOSEN: break; case MENU_B_PRESSED: - case NUM_TRADER_ITEMS: + case NUM_TRADER_ITEMS: // EXIT PlaySE(SE_SELECT); Task_BufferDecorSelectionAndCloseWindow(taskId, 0); break; @@ -136,7 +146,7 @@ void DoesPlayerHaveNoDecorations(void) { u8 i; - for (i = 0; i < 8; i++) + for (i = 0; i < DECORCAT_COUNT; i++) { if (GetNumOwnedDecorationsInCategory(i)) { From 5d58cdd2971b8644e60bc65bd79177d4f5bf4d93 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 28 Feb 2022 13:34:39 -0500 Subject: [PATCH 400/417] Fix bunny hoppy typo --- include/constants/event_object_movement.h | 16 ++++----- src/data/object_events/object_event_anims.h | 32 +++++++++--------- src/event_object_movement.c | 36 ++++++++++----------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/include/constants/event_object_movement.h b/include/constants/event_object_movement.h index 2c42735248..a9d59935ec 100755 --- a/include/constants/event_object_movement.h +++ b/include/constants/event_object_movement.h @@ -273,14 +273,14 @@ #define ANIM_RUN_WEST (ANIM_STD_COUNT + 2) #define ANIM_RUN_EAST (ANIM_STD_COUNT + 3) -#define ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH (ANIM_STD_COUNT + 0) -#define ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH (ANIM_STD_COUNT + 1) -#define ANIM_BUNNY_HOPPY_BACK_WHEEL_WEST (ANIM_STD_COUNT + 2) -#define ANIM_BUNNY_HOPPY_BACK_WHEEL_EAST (ANIM_STD_COUNT + 3) -#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH (ANIM_STD_COUNT + 4) -#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH (ANIM_STD_COUNT + 5) -#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_WEST (ANIM_STD_COUNT + 6) -#define ANIM_BUNNY_HOPPY_FRONT_WHEEL_EAST (ANIM_STD_COUNT + 7) +#define ANIM_BUNNY_HOP_BACK_WHEEL_SOUTH (ANIM_STD_COUNT + 0) +#define ANIM_BUNNY_HOP_BACK_WHEEL_NORTH (ANIM_STD_COUNT + 1) +#define ANIM_BUNNY_HOP_BACK_WHEEL_WEST (ANIM_STD_COUNT + 2) +#define ANIM_BUNNY_HOP_BACK_WHEEL_EAST (ANIM_STD_COUNT + 3) +#define ANIM_BUNNY_HOP_FRONT_WHEEL_SOUTH (ANIM_STD_COUNT + 4) +#define ANIM_BUNNY_HOP_FRONT_WHEEL_NORTH (ANIM_STD_COUNT + 5) +#define ANIM_BUNNY_HOP_FRONT_WHEEL_WEST (ANIM_STD_COUNT + 6) +#define ANIM_BUNNY_HOP_FRONT_WHEEL_EAST (ANIM_STD_COUNT + 7) #define ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH (ANIM_STD_COUNT + 8) #define ANIM_STANDING_WHEELIE_BACK_WHEEL_NORTH (ANIM_STD_COUNT + 9) #define ANIM_STANDING_WHEELIE_BACK_WHEEL_WEST (ANIM_STD_COUNT + 10) diff --git a/src/data/object_events/object_event_anims.h b/src/data/object_events/object_event_anims.h index a5fb414628..f96e52de53 100755 --- a/src/data/object_events/object_event_anims.h +++ b/src/data/object_events/object_event_anims.h @@ -413,56 +413,56 @@ static const union AnimCmd sAnim_GetOnOffSurfBlobEast[] = ANIMCMD_JUMP(0), }; -static const union AnimCmd sAnim_BunnyHoppyBackWheelSouth[] = +static const union AnimCmd sAnim_BunnyHopBackWheelSouth[] = { ANIMCMD_FRAME(9, 4), ANIMCMD_FRAME(10, 4), ANIMCMD_END, }; -static const union AnimCmd sAnim_BunnyHoppyBackWheelNorth[] = +static const union AnimCmd sAnim_BunnyHopBackWheelNorth[] = { ANIMCMD_FRAME(13, 4), ANIMCMD_FRAME(14, 4), ANIMCMD_END, }; -static const union AnimCmd sAnim_BunnyHoppyBackWheelWest[] = +static const union AnimCmd sAnim_BunnyHopBackWheelWest[] = { ANIMCMD_FRAME(17, 4), ANIMCMD_FRAME(18, 4), ANIMCMD_END, }; -static const union AnimCmd sAnim_BunnyHoppyBackWheelEast[] = +static const union AnimCmd sAnim_BunnyHopBackWheelEast[] = { ANIMCMD_FRAME(17, 4, .hFlip = TRUE), ANIMCMD_FRAME(18, 4, .hFlip = TRUE), ANIMCMD_END, }; -static const union AnimCmd sAnim_BunnyHoppyFrontWheelSouth[] = +static const union AnimCmd sAnim_BunnyHopFrontWheelSouth[] = { ANIMCMD_FRAME(11, 4), ANIMCMD_FRAME(12, 4), ANIMCMD_END, }; -static const union AnimCmd sAnim_BunnyHoppyFrontWheelNorth[] = +static const union AnimCmd sAnim_BunnyHopFrontWheelNorth[] = { ANIMCMD_FRAME(15, 4), ANIMCMD_FRAME(16, 4), ANIMCMD_END, }; -static const union AnimCmd sAnim_BunnyHoppyFrontWheelWest[] = +static const union AnimCmd sAnim_BunnyHopFrontWheelWest[] = { ANIMCMD_FRAME(19, 4), ANIMCMD_FRAME(20, 4), ANIMCMD_END, }; -static const union AnimCmd sAnim_BunnyHoppyFrontWheelEast[] = +static const union AnimCmd sAnim_BunnyHopFrontWheelEast[] = { ANIMCMD_FRAME(19, 4, .hFlip = TRUE), ANIMCMD_FRAME(20, 4, .hFlip = TRUE), @@ -1024,14 +1024,14 @@ static const union AnimCmd *const sAnimTable_AcroBike[] = { [ANIM_STD_GO_FASTEST_NORTH] = sAnim_GoFastestNorth, [ANIM_STD_GO_FASTEST_WEST] = sAnim_GoFastestWest, [ANIM_STD_GO_FASTEST_EAST] = sAnim_GoFastestEast, - [ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH] = sAnim_BunnyHoppyBackWheelSouth, - [ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH] = sAnim_BunnyHoppyBackWheelNorth, - [ANIM_BUNNY_HOPPY_BACK_WHEEL_WEST] = sAnim_BunnyHoppyBackWheelWest, - [ANIM_BUNNY_HOPPY_BACK_WHEEL_EAST] = sAnim_BunnyHoppyBackWheelEast, - [ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH] = sAnim_BunnyHoppyFrontWheelSouth, - [ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH] = sAnim_BunnyHoppyFrontWheelNorth, - [ANIM_BUNNY_HOPPY_FRONT_WHEEL_WEST] = sAnim_BunnyHoppyFrontWheelWest, - [ANIM_BUNNY_HOPPY_FRONT_WHEEL_EAST] = sAnim_BunnyHoppyFrontWheelEast, + [ANIM_BUNNY_HOP_BACK_WHEEL_SOUTH] = sAnim_BunnyHopBackWheelSouth, + [ANIM_BUNNY_HOP_BACK_WHEEL_NORTH] = sAnim_BunnyHopBackWheelNorth, + [ANIM_BUNNY_HOP_BACK_WHEEL_WEST] = sAnim_BunnyHopBackWheelWest, + [ANIM_BUNNY_HOP_BACK_WHEEL_EAST] = sAnim_BunnyHopBackWheelEast, + [ANIM_BUNNY_HOP_FRONT_WHEEL_SOUTH] = sAnim_BunnyHopFrontWheelSouth, + [ANIM_BUNNY_HOP_FRONT_WHEEL_NORTH] = sAnim_BunnyHopFrontWheelNorth, + [ANIM_BUNNY_HOP_FRONT_WHEEL_WEST] = sAnim_BunnyHopFrontWheelWest, + [ANIM_BUNNY_HOP_FRONT_WHEEL_EAST] = sAnim_BunnyHopFrontWheelEast, [ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH] = sAnim_StandingWheelieBackWheelSouth, [ANIM_STANDING_WHEELIE_BACK_WHEEL_NORTH] = sAnim_StandingWheelieBackWheelNorth, [ANIM_STANDING_WHEELIE_BACK_WHEEL_WEST] = sAnim_StandingWheelieBackWheelWest, diff --git a/src/event_object_movement.c b/src/event_object_movement.c index df79a1d62a..eb699e89f8 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -744,26 +744,26 @@ static const u8 sJumpSpecialDirectionAnimNums[] = { // used for jumping onto sur [DIR_NORTHEAST] = ANIM_GET_ON_OFF_POKEMON_NORTH, }; static const u8 sAcroWheelieDirectionAnimNums[] = { - [DIR_NONE] = ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH, - [DIR_SOUTH] = ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH, - [DIR_NORTH] = ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH, - [DIR_WEST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_WEST, - [DIR_EAST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_EAST, - [DIR_SOUTHWEST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH, - [DIR_SOUTHEAST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_SOUTH, - [DIR_NORTHWEST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH, - [DIR_NORTHEAST] = ANIM_BUNNY_HOPPY_BACK_WHEEL_NORTH, + [DIR_NONE] = ANIM_BUNNY_HOP_BACK_WHEEL_SOUTH, + [DIR_SOUTH] = ANIM_BUNNY_HOP_BACK_WHEEL_SOUTH, + [DIR_NORTH] = ANIM_BUNNY_HOP_BACK_WHEEL_NORTH, + [DIR_WEST] = ANIM_BUNNY_HOP_BACK_WHEEL_WEST, + [DIR_EAST] = ANIM_BUNNY_HOP_BACK_WHEEL_EAST, + [DIR_SOUTHWEST] = ANIM_BUNNY_HOP_BACK_WHEEL_SOUTH, + [DIR_SOUTHEAST] = ANIM_BUNNY_HOP_BACK_WHEEL_SOUTH, + [DIR_NORTHWEST] = ANIM_BUNNY_HOP_BACK_WHEEL_NORTH, + [DIR_NORTHEAST] = ANIM_BUNNY_HOP_BACK_WHEEL_NORTH, }; static const u8 sAcroUnusedDirectionAnimNums[] = { - [DIR_NONE] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH, - [DIR_SOUTH] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH, - [DIR_NORTH] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH, - [DIR_WEST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_WEST, - [DIR_EAST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_EAST, - [DIR_SOUTHWEST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH, - [DIR_SOUTHEAST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_SOUTH, - [DIR_NORTHWEST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH, - [DIR_NORTHEAST] = ANIM_BUNNY_HOPPY_FRONT_WHEEL_NORTH, + [DIR_NONE] = ANIM_BUNNY_HOP_FRONT_WHEEL_SOUTH, + [DIR_SOUTH] = ANIM_BUNNY_HOP_FRONT_WHEEL_SOUTH, + [DIR_NORTH] = ANIM_BUNNY_HOP_FRONT_WHEEL_NORTH, + [DIR_WEST] = ANIM_BUNNY_HOP_FRONT_WHEEL_WEST, + [DIR_EAST] = ANIM_BUNNY_HOP_FRONT_WHEEL_EAST, + [DIR_SOUTHWEST] = ANIM_BUNNY_HOP_FRONT_WHEEL_SOUTH, + [DIR_SOUTHEAST] = ANIM_BUNNY_HOP_FRONT_WHEEL_SOUTH, + [DIR_NORTHWEST] = ANIM_BUNNY_HOP_FRONT_WHEEL_NORTH, + [DIR_NORTHEAST] = ANIM_BUNNY_HOP_FRONT_WHEEL_NORTH, }; static const u8 sAcroEndWheelieDirectionAnimNums[] = { [DIR_NONE] = ANIM_STANDING_WHEELIE_BACK_WHEEL_SOUTH, From 8bf7e7b6f5abad1a4f0772a88ed415079edb7df8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 2 Mar 2022 19:45:28 -0500 Subject: [PATCH 401/417] Improve egg hatch documentation --- .../egg_hatch.png => pokemon/egg/hatch.png} | Bin .../egg_shard.png => pokemon/egg/shard.png} | Bin src/egg_hatch.c | 476 ++++++++++-------- 3 files changed, 265 insertions(+), 211 deletions(-) rename graphics/{misc/egg_hatch.png => pokemon/egg/hatch.png} (100%) rename graphics/{misc/egg_shard.png => pokemon/egg/shard.png} (100%) diff --git a/graphics/misc/egg_hatch.png b/graphics/pokemon/egg/hatch.png similarity index 100% rename from graphics/misc/egg_hatch.png rename to graphics/pokemon/egg/hatch.png diff --git a/graphics/misc/egg_shard.png b/graphics/pokemon/egg/shard.png similarity index 100% rename from graphics/misc/egg_shard.png rename to graphics/pokemon/egg/shard.png diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 283ec753af..5dd83c9b1f 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -37,16 +37,24 @@ #include "battle.h" // to get rid of later #include "constants/rgb.h" +#define GFXTAG_EGG 12345 +#define GFXTAG_EGG_SHARD 23456 + +#define PALTAG_EGG 54321 + +#define EGG_X (DISPLAY_WIDTH / 2) +#define EGG_Y (DISPLAY_HEIGHT / 2 - 5) + struct EggHatchData { - u8 eggSpriteID; - u8 pokeSpriteID; - u8 CB2_state; - u8 CB2_PalCounter; - u8 eggPartyID; + u8 eggSpriteId; + u8 monSpriteId; + u8 state; + u8 delayTimer; + u8 eggPartyId; u8 unused_5; u8 unused_6; - u8 eggShardVelocityID; + u8 eggShardVelocityId; u8 windowId; u8 unused_9; u8 unused_A; @@ -58,29 +66,27 @@ extern const u32 gTradePlatform_Tilemap[]; extern const u8 gText_HatchedFromEgg[]; extern const u8 gText_NicknameHatchPrompt[]; -static void Task_EggHatch(u8 taskID); -static void CB2_EggHatch_0(void); -static void CB2_EggHatch_1(void); -static void SpriteCB_Egg_0(struct Sprite* sprite); -static void SpriteCB_Egg_1(struct Sprite* sprite); -static void SpriteCB_Egg_2(struct Sprite* sprite); -static void SpriteCB_Egg_3(struct Sprite* sprite); -static void SpriteCB_Egg_4(struct Sprite* sprite); -static void SpriteCB_Egg_5(struct Sprite* sprite); -static void SpriteCB_EggShard(struct Sprite* sprite); -static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed); +static void Task_EggHatch(u8); +static void CB2_LoadEggHatch(void); +static void CB2_EggHatch(void); +static void SpriteCB_Egg_Shake1(struct Sprite*); +static void SpriteCB_Egg_Shake2(struct Sprite*); +static void SpriteCB_Egg_Shake3(struct Sprite*); +static void SpriteCB_Egg_WaitHatch(struct Sprite*); +static void SpriteCB_Egg_Hatch(struct Sprite*); +static void SpriteCB_Egg_Reveal(struct Sprite*); +static void SpriteCB_EggShard(struct Sprite*); +static void EggHatchPrintMessage(u8, u8*, u8, u8, u8); static void CreateRandomEggShardSprite(void); -static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex); +static void CreateEggShardSprite(u8, u8, s16, s16, s16, u8); -// IWRAM bss static struct EggHatchData *sEggHatchData; -// rom data -static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/egg/normal.gbapal"); -static const u8 sEggHatchTiles[] = INCBIN_U8("graphics/misc/egg_hatch.4bpp"); -static const u8 sEggShardTiles[] = INCBIN_U8("graphics/misc/egg_shard.4bpp"); +static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/egg/normal.gbapal"); +static const u8 sEggHatchTiles[] = INCBIN_U8("graphics/pokemon/egg/hatch.4bpp"); +static const u8 sEggShardTiles[] = INCBIN_U8("graphics/pokemon/egg/shard.4bpp"); -static const struct OamData sOamData_EggHatch = +static const struct OamData sOamData_Egg = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -97,64 +103,71 @@ static const struct OamData sOamData_EggHatch = .affineParam = 0, }; -static const union AnimCmd sSpriteAnim_EggHatch0[] = +static const union AnimCmd sSpriteAnim_Egg_Normal[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_EggHatch1[] = +static const union AnimCmd sSpriteAnim_Egg_Cracked1[] = { ANIMCMD_FRAME(16, 5), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_EggHatch2[] = +static const union AnimCmd sSpriteAnim_Egg_Cracked2[] = { ANIMCMD_FRAME(32, 5), ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_EggHatch3[] = +static const union AnimCmd sSpriteAnim_Egg_Cracked3[] = { ANIMCMD_FRAME(48, 5), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_EggHatch[] = +enum { + EGG_ANIM_NORMAL, + EGG_ANIM_CRACKED_1, + EGG_ANIM_CRACKED_2, + EGG_ANIM_CRACKED_3, +}; + +static const union AnimCmd *const sSpriteAnimTable_Egg[] = { - sSpriteAnim_EggHatch0, - sSpriteAnim_EggHatch1, - sSpriteAnim_EggHatch2, - sSpriteAnim_EggHatch3, + [EGG_ANIM_NORMAL] = sSpriteAnim_Egg_Normal, + [EGG_ANIM_CRACKED_1] = sSpriteAnim_Egg_Cracked1, + [EGG_ANIM_CRACKED_2] = sSpriteAnim_Egg_Cracked2, + [EGG_ANIM_CRACKED_3] = sSpriteAnim_Egg_Cracked3, }; static const struct SpriteSheet sEggHatch_Sheet = { .data = sEggHatchTiles, - .size = 2048, - .tag = 12345, + .size = 0x800, + .tag = GFXTAG_EGG, }; static const struct SpriteSheet sEggShards_Sheet = { .data = sEggShardTiles, - .size = 128, - .tag = 23456, + .size = 0x80, + .tag = GFXTAG_EGG_SHARD, }; static const struct SpritePalette sEgg_SpritePalette = { .data = sEggPalette, - .tag = 54321 + .tag = PALTAG_EGG }; -static const struct SpriteTemplate sSpriteTemplate_EggHatch = +static const struct SpriteTemplate sSpriteTemplate_Egg = { - .tileTag = 12345, - .paletteTag = 54321, - .oam = &sOamData_EggHatch, - .anims = sSpriteAnimTable_EggHatch, + .tileTag = GFXTAG_EGG, + .paletteTag = PALTAG_EGG, + .oam = &sOamData_Egg, + .anims = sSpriteAnimTable_Egg, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy @@ -211,8 +224,8 @@ static const union AnimCmd *const sSpriteAnimTable_EggShard[] = static const struct SpriteTemplate sSpriteTemplate_EggShard = { - .tileTag = 23456, - .paletteTag = 54321, + .tileTag = GFXTAG_EGG_SHARD, + .paletteTag = PALTAG_EGG, .oam = &sOamData_EggShard, .anims = sSpriteAnimTable_EggShard, .images = NULL, @@ -220,7 +233,7 @@ static const struct SpriteTemplate sSpriteTemplate_EggShard = .callback = SpriteCB_EggShard }; -static const struct BgTemplate sBgTemplates_EggHatch[2] = +static const struct BgTemplate sBgTemplates_EggHatch[] = { { .bg = 0, @@ -243,7 +256,7 @@ static const struct BgTemplate sBgTemplates_EggHatch[2] = }, }; -static const struct WindowTemplate sWinTemplates_EggHatch[2] = +static const struct WindowTemplate sWinTemplates_EggHatch[] = { { .bg = 0, @@ -270,9 +283,14 @@ static const struct WindowTemplate sYesNoWinTemplate = static const s16 sEggShardVelocities[][2] = { + // First shake {Q_8_8(-1.5), Q_8_8(-3.75)}, + + // Third shake {Q_8_8(-5), Q_8_8(-3)}, {Q_8_8(3.5), Q_8_8(-3)}, + + // Hatching {Q_8_8(-4), Q_8_8(-3.75)}, {Q_8_8(2), Q_8_8(-1.5)}, {Q_8_8(-0.5), Q_8_8(-6.75)}, @@ -291,8 +309,6 @@ static const s16 sEggShardVelocities[][2] = {Q_8_8(2.5), Q_8_8(-7.5)}, }; -// code - static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp) { u16 species; @@ -301,21 +317,17 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp) u16 moves[MAX_MON_MOVES]; u32 ivs[NUM_STATS]; - species = GetMonData(egg, MON_DATA_SPECIES); for (i = 0; i < MAX_MON_MOVES; i++) - { moves[i] = GetMonData(egg, MON_DATA_MOVE1 + i); - } personality = GetMonData(egg, MON_DATA_PERSONALITY); for (i = 0; i < NUM_STATS; i++) - { ivs[i] = GetMonData(egg, MON_DATA_HP_IV + i); - } + // The language is initially read from the Egg but is later overwritten below language = GetMonData(egg, MON_DATA_LANGUAGE); gameMet = GetMonData(egg, MON_DATA_MET_GAME); markings = GetMonData(egg, MON_DATA_MARKINGS); @@ -325,14 +337,10 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp) CreateMon(temp, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0); for (i = 0; i < MAX_MON_MOVES; i++) - { SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]); - } for (i = 0; i < NUM_STATS; i++) - { SetMonData(temp, MON_DATA_HP_IV + i, &ivs[i]); - } language = GAME_LANGUAGE; SetMonData(temp, MON_DATA_LANGUAGE, &language); @@ -350,34 +358,35 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp) static void AddHatchedMonToParty(u8 id) { u8 isEgg = 0x46; // ? - u16 pokeNum; - u8 name[12]; + u16 species; + u8 name[POKEMON_NAME_LENGTH + 1]; u16 ball; - u16 caughtLvl; - u8 mapNameID; + u16 metLevel; + u8 metLocation; struct Pokemon* mon = &gPlayerParty[id]; CreateHatchedMon(mon, &gEnemyParty[0]); SetMonData(mon, MON_DATA_IS_EGG, &isEgg); - pokeNum = GetMonData(mon, MON_DATA_SPECIES); - GetSpeciesName(name, pokeNum); + species = GetMonData(mon, MON_DATA_SPECIES); + GetSpeciesName(name, species); SetMonData(mon, MON_DATA_NICKNAME, name); - pokeNum = SpeciesToNationalPokedexNum(pokeNum); - GetSetPokedexFlag(pokeNum, FLAG_SET_SEEN); - GetSetPokedexFlag(pokeNum, FLAG_SET_CAUGHT); + species = SpeciesToNationalPokedexNum(species); + GetSetPokedexFlag(species, FLAG_SET_SEEN); + GetSetPokedexFlag(species, FLAG_SET_CAUGHT); GetMonNickname2(mon, gStringVar1); ball = ITEM_POKE_BALL; SetMonData(mon, MON_DATA_POKEBALL, &ball); - caughtLvl = 0; - SetMonData(mon, MON_DATA_MET_LEVEL, &caughtLvl); + // A met level of 0 is interpreted on the summary screen as "hatched at" + metLevel = 0; + SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel); - mapNameID = GetCurrentRegionMapSectionId(); - SetMonData(mon, MON_DATA_MET_LOCATION, &mapNameID); + metLocation = GetCurrentRegionMapSectionId(); + SetMonData(mon, MON_DATA_MET_LOCATION, &metLocation); MonRestorePP(mon); CalculateMonStats(mon); @@ -396,7 +405,7 @@ static bool8 _CheckDaycareMonReceivedMail(struct DayCare *daycare, u8 daycareId) GetBoxMonNickname(&daycareMon->mon, nickname); if (daycareMon->mail.message.itemId != ITEM_NONE && (StringCompareWithoutExtCtrlCodes(nickname, daycareMon->mail.monName) != 0 - || StringCompareWithoutExtCtrlCodes(gSaveBlock2Ptr->playerName, daycareMon->mail.otName) != 0)) + || StringCompareWithoutExtCtrlCodes(gSaveBlock2Ptr->playerName, daycareMon->mail.otName) != 0)) { StringCopy(gStringVar1, nickname); TVShowConvertInternationalString(gStringVar2, daycareMon->mail.otName, daycareMon->mail.gameLanguage); @@ -411,26 +420,27 @@ bool8 CheckDaycareMonReceivedMail(void) return _CheckDaycareMonReceivedMail(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004); } -static u8 EggHatchCreateMonSprite(u8 useAlt, u8 switchID, u8 pokeID, u16* speciesLoc) +static u8 EggHatchCreateMonSprite(u8 useAlt, u8 state, u8 partyId, u16* speciesLoc) { u8 position = 0; - u8 spriteID = 0; + u8 spriteId = 0; struct Pokemon* mon = NULL; if (useAlt == FALSE) { - mon = &gPlayerParty[pokeID]; + mon = &gPlayerParty[partyId]; position = B_POSITION_OPPONENT_LEFT; } if (useAlt == TRUE) { // Alternate sprite allocation position. Never reached. - mon = &gPlayerParty[pokeID]; + mon = &gPlayerParty[partyId]; position = B_POSITION_OPPONENT_RIGHT; } - switch (switchID) + switch (state) { case 0: + // Load mon sprite gfx { u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 pid = GetMonData(mon, MON_DATA_PERSONALITY); @@ -442,13 +452,14 @@ static u8 EggHatchCreateMonSprite(u8 useAlt, u8 switchID, u8 pokeID, u16* specie } break; case 1: + // Create mon sprite SetMultiuseSpriteTemplateToPokemon(GetMonSpritePalStruct(mon)->tag, position); - spriteID = CreateSprite(&gMultiuseSpriteTemplate, 120, 75, 6); - gSprites[spriteID].invisible = TRUE; - gSprites[spriteID].callback = SpriteCallbackDummy; + spriteId = CreateSprite(&gMultiuseSpriteTemplate, EGG_X, EGG_Y, 6); + gSprites[spriteId].invisible = TRUE; + gSprites[spriteId].callback = SpriteCallbackDummy; break; } - return spriteID; + return spriteId; } static void VBlankCB_EggHatch(void) @@ -465,28 +476,28 @@ void EggHatch(void) FadeScreen(FADE_TO_BLACK, 0); } -static void Task_EggHatch(u8 taskID) +static void Task_EggHatch(u8 taskId) { if (!gPaletteFade.active) { CleanupOverworldWindowsAndTilemaps(); - SetMainCallback2(CB2_EggHatch_0); + SetMainCallback2(CB2_LoadEggHatch); gFieldCallback = FieldCB_ContinueScriptHandleMusic; - DestroyTask(taskID); + DestroyTask(taskId); } } -static void CB2_EggHatch_0(void) +static void CB2_LoadEggHatch(void) { switch (gMain.state) { case 0: SetGpuReg(REG_OFFSET_DISPCNT, 0); - sEggHatchData = Alloc(sizeof(struct EggHatchData)); + sEggHatchData = Alloc(sizeof(*sEggHatchData)); AllocateMonSpritesGfx(); - sEggHatchData->eggPartyID = gSpecialVar_0x8004; - sEggHatchData->eggShardVelocityID = 0; + sEggHatchData->eggPartyId = gSpecialVar_0x8004; + sEggHatchData->eggShardVelocityId = 0; SetVBlankCallback(VBlankCB_EggHatch); gSpecialVar_0x8005 = GetCurrentMapMusic(); @@ -532,15 +543,15 @@ static void CB2_EggHatch_0(void) break; case 4: CopyBgTilemapBufferToVram(0); - AddHatchedMonToParty(sEggHatchData->eggPartyID); + AddHatchedMonToParty(sEggHatchData->eggPartyId); gMain.state++; break; case 5: - EggHatchCreateMonSprite(FALSE, 0, sEggHatchData->eggPartyID, &sEggHatchData->species); + EggHatchCreateMonSprite(FALSE, 0, sEggHatchData->eggPartyId, &sEggHatchData->species); gMain.state++; break; case 6: - sEggHatchData->pokeSpriteID = EggHatchCreateMonSprite(FALSE, 1, sEggHatchData->eggPartyID, &sEggHatchData->species); + sEggHatchData->monSpriteId = EggHatchCreateMonSprite(FALSE, 1, sEggHatchData->eggPartyId, &sEggHatchData->species); gMain.state++; break; case 7: @@ -552,8 +563,8 @@ static void CB2_EggHatch_0(void) gMain.state++; break; case 8: - SetMainCallback2(CB2_EggHatch_1); - sEggHatchData->CB2_state = 0; + SetMainCallback2(CB2_EggHatch); + sEggHatchData->state = 0; break; } RunTasks(); @@ -571,121 +582,127 @@ static void EggHatchSetMonNickname(void) SetMainCallback2(CB2_ReturnToField); } -static void Task_EggHatchPlayBGM(u8 taskID) +#define tTimer data[0] + +static void Task_EggHatchPlayBGM(u8 taskId) { - if (gTasks[taskID].data[0] == 0) + if (gTasks[taskId].tTimer == 0) { StopMapMusic(); PlayRainStoppingSoundEffect(); } - if (gTasks[taskID].data[0] == 1) + + if (gTasks[taskId].tTimer == 1) PlayBGM(MUS_EVOLUTION_INTRO); - if (gTasks[taskID].data[0] > 60) + + if (gTasks[taskId].tTimer > 60) { PlayBGM(MUS_EVOLUTION); - DestroyTask(taskID); - // UB: task is destroyed, yet the value is incremented - #ifdef UBFIX - return; - #endif + DestroyTask(taskId); } - gTasks[taskID].data[0]++; + gTasks[taskId].tTimer++; } -static void CB2_EggHatch_1(void) +static void CB2_EggHatch(void) { u16 species; u8 gender; u32 personality; - switch (sEggHatchData->CB2_state) + switch (sEggHatchData->state) { case 0: - BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); - sEggHatchData->eggSpriteID = CreateSprite(&sSpriteTemplate_EggHatch, 120, 75, 5); + BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); + sEggHatchData->eggSpriteId = CreateSprite(&sSpriteTemplate_Egg, EGG_X, EGG_Y, 5); ShowBg(0); ShowBg(1); - sEggHatchData->CB2_state++; + sEggHatchData->state++; CreateTask(Task_EggHatchPlayBGM, 5); break; case 1: if (!gPaletteFade.active) { FillWindowPixelBuffer(sEggHatchData->windowId, PIXEL_FILL(0)); - sEggHatchData->CB2_PalCounter = 0; - sEggHatchData->CB2_state++; + sEggHatchData->delayTimer = 0; + sEggHatchData->state++; } break; case 2: - if (++sEggHatchData->CB2_PalCounter > 30) + if (++sEggHatchData->delayTimer > 30) { - sEggHatchData->CB2_state++; - gSprites[sEggHatchData->eggSpriteID].callback = SpriteCB_Egg_0; + // Start hatching animation + sEggHatchData->state++; + gSprites[sEggHatchData->eggSpriteId].callback = SpriteCB_Egg_Shake1; } break; case 3: - if (gSprites[sEggHatchData->eggSpriteID].callback == SpriteCallbackDummy) + // Wait for hatching animation to finish + if (gSprites[sEggHatchData->eggSpriteId].callback == SpriteCallbackDummy) { - species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); - DoMonFrontSpriteAnimation(&gSprites[sEggHatchData->pokeSpriteID], species, FALSE, 1); - sEggHatchData->CB2_state++; + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyId], MON_DATA_SPECIES); + DoMonFrontSpriteAnimation(&gSprites[sEggHatchData->monSpriteId], species, FALSE, 1); + sEggHatchData->state++; } break; case 4: - if (gSprites[sEggHatchData->pokeSpriteID].callback == SpriteCallbackDummy) - { - sEggHatchData->CB2_state++; - } + // Wait for Pokémon's front sprite animation + if (gSprites[sEggHatchData->monSpriteId].callback == SpriteCallbackDummy) + sEggHatchData->state++; break; case 5: - GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1); + // "{mon} hatched from egg" message/fanfare + GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyId], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_HatchedFromEgg); EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, TEXT_SKIP_DRAW); PlayFanfare(MUS_EVOLVED); - sEggHatchData->CB2_state++; + sEggHatchData->state++; PutWindowTilemap(sEggHatchData->windowId); CopyWindowToVram(sEggHatchData->windowId, COPYWIN_FULL); break; case 6: if (IsFanfareTaskInactive()) - sEggHatchData->CB2_state++; + sEggHatchData->state++; break; - case 7: + case 7: // Twice? if (IsFanfareTaskInactive()) - sEggHatchData->CB2_state++; + sEggHatchData->state++; break; case 8: - GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1); + // Ready the nickname prompt + GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyId], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_NicknameHatchPrompt); EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 2, 1); - sEggHatchData->CB2_state++; + sEggHatchData->state++; break; case 9: + // Print the nickname prompt if (!IsTextPrinterActive(sEggHatchData->windowId)) { LoadUserWindowBorderGfx(sEggHatchData->windowId, 0x140, 0xE0); CreateYesNoMenu(&sYesNoWinTemplate, 0x140, 0xE, 0); - sEggHatchData->CB2_state++; + sEggHatchData->state++; } break; case 10: + // Handle the nickname prompt input switch (Menu_ProcessInputNoWrapClearOnChoose()) { - case 0: - GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3); - species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); - gender = GetMonGender(&gPlayerParty[sEggHatchData->eggPartyID]); - personality = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_PERSONALITY, 0); + case 0: // Yes + GetMonNickname2(&gPlayerParty[sEggHatchData->eggPartyId], gStringVar3); + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyId], MON_DATA_SPECIES); + gender = GetMonGender(&gPlayerParty[sEggHatchData->eggPartyId]); + personality = GetMonData(&gPlayerParty[sEggHatchData->eggPartyId], MON_DATA_PERSONALITY, 0); DoNamingScreen(NAMING_SCREEN_NICKNAME, gStringVar3, species, gender, personality, EggHatchSetMonNickname); break; - case 1: - case -1: - sEggHatchData->CB2_state++; + case 1: // No + case MENU_B_PRESSED: + sEggHatchData->state++; + break; } break; case 11: - BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK); - sEggHatchData->CB2_state++; + BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK); + sEggHatchData->state++; break; case 12: if (!gPaletteFade.active) @@ -707,136 +724,170 @@ static void CB2_EggHatch_1(void) UpdatePaletteFade(); } -static void SpriteCB_Egg_0(struct Sprite* sprite) +#define sTimer data[0] +#define sSinIdx data[1] +#define sDelayTimer data[2] + +static void SpriteCB_Egg_Shake1(struct Sprite* sprite) { - if (++sprite->data[0] > 20) + if (++sprite->sTimer > 20) { - sprite->callback = SpriteCB_Egg_1; - sprite->data[0] = 0; + sprite->callback = SpriteCB_Egg_Shake2; + sprite->sTimer = 0; } else { - sprite->data[1] = (sprite->data[1] + 20) & 0xFF; - sprite->x2 = Sin(sprite->data[1], 1); - if (sprite->data[0] == 15) + // Shake egg + sprite->sSinIdx = (sprite->sSinIdx + 20) & 0xFF; + sprite->x2 = Sin(sprite->sSinIdx, 1); + if (sprite->sTimer == 15) { + // First egg crack PlaySE(SE_BALL); - StartSpriteAnim(sprite, 1); + StartSpriteAnim(sprite, EGG_ANIM_CRACKED_1); CreateRandomEggShardSprite(); } } } -static void SpriteCB_Egg_1(struct Sprite* sprite) +static void SpriteCB_Egg_Shake2(struct Sprite* sprite) { - if (++sprite->data[2] > 30) + if (++sprite->sDelayTimer > 30) { - if (++sprite->data[0] > 20) + if (++sprite->sTimer > 20) { - sprite->callback = SpriteCB_Egg_2; - sprite->data[0] = 0; - sprite->data[2] = 0; + sprite->callback = SpriteCB_Egg_Shake3; + sprite->sTimer = 0; + sprite->sDelayTimer = 0; } else { - sprite->data[1] = (sprite->data[1] + 20) & 0xFF; - sprite->x2 = Sin(sprite->data[1], 2); - if (sprite->data[0] == 15) + // Shake egg + sprite->sSinIdx = (sprite->sSinIdx + 20) & 0xFF; + sprite->x2 = Sin(sprite->sSinIdx, 2); + if (sprite->sTimer == 15) { + // Second egg crack PlaySE(SE_BALL); - StartSpriteAnim(sprite, 2); + StartSpriteAnim(sprite, EGG_ANIM_CRACKED_2); } } } } -static void SpriteCB_Egg_2(struct Sprite* sprite) +static void SpriteCB_Egg_Shake3(struct Sprite* sprite) { - if (++sprite->data[2] > 30) + if (++sprite->sDelayTimer > 30) { - if (++sprite->data[0] > 38) + if (++sprite->sTimer > 38) { u16 species; - - sprite->callback = SpriteCB_Egg_3; - sprite->data[0] = 0; - species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); - gSprites[sEggHatchData->pokeSpriteID].x2 = 0; - gSprites[sEggHatchData->pokeSpriteID].y2 = 0; + sprite->callback = SpriteCB_Egg_WaitHatch; + sprite->sTimer = 0; + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyId], MON_DATA_SPECIES); + gSprites[sEggHatchData->monSpriteId].x2 = 0; + gSprites[sEggHatchData->monSpriteId].y2 = 0; } else { - sprite->data[1] = (sprite->data[1] + 20) & 0xFF; - sprite->x2 = Sin(sprite->data[1], 2); - if (sprite->data[0] == 15) + // Shake egg + sprite->sSinIdx = (sprite->sSinIdx + 20) & 0xFF; + sprite->x2 = Sin(sprite->sSinIdx, 2); + if (sprite->sTimer == 15) { + // Third egg crack + // This ineffectually sets the animation to the frame it's already using. + // They likely meant to use the 3rd and final cracked frame of the egg, which goes unused as a result. PlaySE(SE_BALL); - StartSpriteAnim(sprite, 2); + #ifdef BUGFIX + StartSpriteAnim(sprite, EGG_ANIM_CRACKED_3); + #else + StartSpriteAnim(sprite, EGG_ANIM_CRACKED_2); + #endif CreateRandomEggShardSprite(); CreateRandomEggShardSprite(); } - if (sprite->data[0] == 30) + if (sprite->sTimer == 30) PlaySE(SE_BALL); } } } -static void SpriteCB_Egg_3(struct Sprite* sprite) +static void SpriteCB_Egg_WaitHatch(struct Sprite* sprite) { - if (++sprite->data[0] > 50) + if (++sprite->sTimer > 50) { - sprite->callback = SpriteCB_Egg_4; - sprite->data[0] = 0; + sprite->callback = SpriteCB_Egg_Hatch; + sprite->sTimer = 0; } } -static void SpriteCB_Egg_4(struct Sprite* sprite) +static void SpriteCB_Egg_Hatch(struct Sprite* sprite) { s16 i; - if (sprite->data[0] == 0) - BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 0x10, RGB_WHITEALPHA); - if (sprite->data[0] < 4u) + + // Fade to white to hide transition from egg to Pokémon + if (sprite->sTimer == 0) + BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_WHITEALPHA); + + // Create a shower of 16 egg shards in 4 groups of 4 + if ((u32)sprite->sTimer < 4) { - for (i = 0; i <= 3; i++) + for (i = 0; i < 4; i++) CreateRandomEggShardSprite(); } - sprite->data[0]++; + + sprite->sTimer++; + if (!gPaletteFade.active) { + // Screen is hidden by the fade to white, hide egg PlaySE(SE_EGG_HATCH); sprite->invisible = TRUE; - sprite->callback = SpriteCB_Egg_5; - sprite->data[0] = 0; + sprite->callback = SpriteCB_Egg_Reveal; + sprite->sTimer = 0; } } -static void SpriteCB_Egg_5(struct Sprite* sprite) +static void SpriteCB_Egg_Reveal(struct Sprite* sprite) { - if (sprite->data[0] == 0) + if (sprite->sTimer == 0) { - gSprites[sEggHatchData->pokeSpriteID].invisible = FALSE; - StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], BATTLER_AFFINE_EMERGE); + // Reveal hatched Pokémon + gSprites[sEggHatchData->monSpriteId].invisible = FALSE; + StartSpriteAffineAnim(&gSprites[sEggHatchData->monSpriteId], BATTLER_AFFINE_EMERGE); } - if (sprite->data[0] == 8) - BeginNormalPaletteFade(PALETTES_ALL, -1, 0x10, 0, RGB_WHITEALPHA); - if (sprite->data[0] <= 9) - gSprites[sEggHatchData->pokeSpriteID].y -= 1; - if (sprite->data[0] > 40) - sprite->callback = SpriteCallbackDummy; - sprite->data[0]++; + + // Fade back from white for reveal + if (sprite->sTimer == 8) + BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_WHITEALPHA); + + if (sprite->sTimer <= 9) + gSprites[sEggHatchData->monSpriteId].y--; + + if (sprite->sTimer > 40) + sprite->callback = SpriteCallbackDummy; // Finished + + sprite->sTimer++; } +#define sVelocX data[1] +#define sVelocY data[2] +#define sAccelY data[3] +#define sDeltaX data[4] +#define sDeltaY data[5] + static void SpriteCB_EggShard(struct Sprite* sprite) { - sprite->data[4] += sprite->data[1]; - sprite->data[5] += sprite->data[2]; + sprite->sDeltaX += sprite->sVelocX; + sprite->sDeltaY += sprite->sVelocY; - sprite->x2 = sprite->data[4] / 256; - sprite->y2 = sprite->data[5] / 256; + sprite->x2 = sprite->sDeltaX / 256; + sprite->y2 = sprite->sDeltaY / 256; - sprite->data[2] += sprite->data[3]; + sprite->sVelocY += sprite->sAccelY; - if (sprite->y + sprite->y2 > sprite->y + 20 && sprite->data[2] > 0) + if (sprite->y + sprite->y2 > sprite->y + 20 && sprite->sVelocY > 0) DestroySprite(sprite); } @@ -844,20 +895,23 @@ static void CreateRandomEggShardSprite(void) { u16 spriteAnimIndex; - s16 velocity1 = sEggShardVelocities[sEggHatchData->eggShardVelocityID][0]; - s16 velocity2 = sEggShardVelocities[sEggHatchData->eggShardVelocityID][1]; - sEggHatchData->eggShardVelocityID++; - spriteAnimIndex = Random() % 4; - CreateEggShardSprite(120, 60, velocity1, velocity2, 100, spriteAnimIndex); + s16 velocityX = sEggShardVelocities[sEggHatchData->eggShardVelocityId][0]; + s16 velocityY = sEggShardVelocities[sEggHatchData->eggShardVelocityId][1]; + sEggHatchData->eggShardVelocityId++; + + // Randomly choose one of the 4 shard images + spriteAnimIndex = Random() % ARRAY_COUNT(sSpriteAnimTable_EggShard); + + CreateEggShardSprite(EGG_X, EGG_Y - 15, velocityX, velocityY, 100, spriteAnimIndex); } -static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex) +static void CreateEggShardSprite(u8 x, u8 y, s16 velocityX, s16 velocityY, s16 acceleration, u8 spriteAnimIndex) { - u8 spriteID = CreateSprite(&sSpriteTemplate_EggShard, x, y, 4); - gSprites[spriteID].data[1] = data1; - gSprites[spriteID].data[2] = data2; - gSprites[spriteID].data[3] = data3; - StartSpriteAnim(&gSprites[spriteID], spriteAnimIndex); + u8 spriteId = CreateSprite(&sSpriteTemplate_EggShard, x, y, 4); + gSprites[spriteId].sVelocX = velocityX; + gSprites[spriteId].sVelocY = velocityY; + gSprites[spriteId].sAccelY = acceleration; + StartSpriteAnim(&gSprites[spriteId], spriteAnimIndex); } static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) From f78f46a1e28667632bf25c968ffb97aea84bdb15 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 3 Mar 2022 14:54:05 -0500 Subject: [PATCH 402/417] Use ARRAY_COUNT for obj event subsprite tables --- .../object_events/object_event_subsprites.h | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/data/object_events/object_event_subsprites.h b/src/data/object_events/object_event_subsprites.h index b508509cad..8084919927 100755 --- a/src/data/object_events/object_event_subsprites.h +++ b/src/data/object_events/object_event_subsprites.h @@ -78,12 +78,12 @@ static const struct Subsprite sOamTable_16x16_4[] = { }; static const struct SubspriteTable sOamTables_16x16[] = { - {0, NULL}, - {1, sOamTable_16x16_0}, - {1, sOamTable_16x16_1}, - {2, sOamTable_16x16_2}, - {2, sOamTable_16x16_3}, - {2, sOamTable_16x16_4} + {}, + {ARRAY_COUNT(sOamTable_16x16_0), sOamTable_16x16_0}, + {ARRAY_COUNT(sOamTable_16x16_1), sOamTable_16x16_1}, + {ARRAY_COUNT(sOamTable_16x16_2), sOamTable_16x16_2}, + {ARRAY_COUNT(sOamTable_16x16_3), sOamTable_16x16_3}, + {ARRAY_COUNT(sOamTable_16x16_4), sOamTable_16x16_4} }; static const struct Subsprite sOamTable_16x32_0[] = { @@ -174,12 +174,12 @@ static const struct Subsprite sOamTable_16x32_4[] = { }; static const struct SubspriteTable sOamTables_16x32[] = { - {0, NULL}, - {1, sOamTable_16x32_0}, - {1, sOamTable_16x32_1}, - {3, sOamTable_16x32_2}, - {2, sOamTable_16x32_3}, - {2, sOamTable_16x32_4} + {}, + {ARRAY_COUNT(sOamTable_16x32_0), sOamTable_16x32_0}, + {ARRAY_COUNT(sOamTable_16x32_1), sOamTable_16x32_1}, + {ARRAY_COUNT(sOamTable_16x32_2), sOamTable_16x32_2}, + {ARRAY_COUNT(sOamTable_16x32_3), sOamTable_16x32_3}, + {ARRAY_COUNT(sOamTable_16x32_4), sOamTable_16x32_4} }; static const struct Subsprite sOamTable_32x32_0[] = { @@ -270,12 +270,12 @@ static const struct Subsprite sOamTable_32x32_4[] = { }; static const struct SubspriteTable sOamTables_32x32[] = { - {0, NULL}, - {1, sOamTable_32x32_0}, - {1, sOamTable_32x32_1}, - {3, sOamTable_32x32_2}, - {2, sOamTable_32x32_3}, - {2, sOamTable_32x32_4} + {}, + {ARRAY_COUNT(sOamTable_32x32_0), sOamTable_32x32_0}, + {ARRAY_COUNT(sOamTable_32x32_1), sOamTable_32x32_1}, + {ARRAY_COUNT(sOamTable_32x32_2), sOamTable_32x32_2}, + {ARRAY_COUNT(sOamTable_32x32_3), sOamTable_32x32_3}, + {ARRAY_COUNT(sOamTable_32x32_4), sOamTable_32x32_4} }; static const struct Subsprite sOamTable_48x48[] = { @@ -378,12 +378,12 @@ static const struct Subsprite sOamTable_48x48[] = { }; static const struct SubspriteTable sOamTables_48x48[] = { - {12, sOamTable_48x48}, - {12, sOamTable_48x48}, - {12, sOamTable_48x48}, - {12, sOamTable_48x48}, - {12, sOamTable_48x48}, - {12, sOamTable_48x48} + {ARRAY_COUNT(sOamTable_48x48), sOamTable_48x48}, + {ARRAY_COUNT(sOamTable_48x48), sOamTable_48x48}, + {ARRAY_COUNT(sOamTable_48x48), sOamTable_48x48}, + {ARRAY_COUNT(sOamTable_48x48), sOamTable_48x48}, + {ARRAY_COUNT(sOamTable_48x48), sOamTable_48x48}, + {ARRAY_COUNT(sOamTable_48x48), sOamTable_48x48} }; static const struct Subsprite sOamTable_64x32_0[] = { @@ -432,12 +432,12 @@ static const struct Subsprite sOamTable_64x32_3[] = { // Unused static const struct SubspriteTable sOamTables_64x32[] = { - {0, NULL}, - {1, sOamTable_64x32_0}, - {1, sOamTable_64x32_1}, - {1, sOamTable_64x32_2}, - {1, sOamTable_64x32_3}, - {1, sOamTable_64x32_3} + {}, + {ARRAY_COUNT(sOamTable_64x32_0), sOamTable_64x32_0}, + {ARRAY_COUNT(sOamTable_64x32_1), sOamTable_64x32_1}, + {ARRAY_COUNT(sOamTable_64x32_2), sOamTable_64x32_2}, + {ARRAY_COUNT(sOamTable_64x32_3), sOamTable_64x32_3}, + {ARRAY_COUNT(sOamTable_64x32_3), sOamTable_64x32_3} }; static const struct Subsprite sOamTable_64x64_0[] = { @@ -485,12 +485,12 @@ static const struct Subsprite sOamTable_64x64_3[] = { }; static const struct SubspriteTable sOamTables_64x64[] = { - {0, NULL}, - {1, sOamTable_64x64_0}, - {1, sOamTable_64x64_1}, - {1, sOamTable_64x64_2}, - {1, sOamTable_64x64_3}, - {1, sOamTable_64x64_3} + {}, + {ARRAY_COUNT(sOamTable_64x64_0), sOamTable_64x64_0}, + {ARRAY_COUNT(sOamTable_64x64_1), sOamTable_64x64_1}, + {ARRAY_COUNT(sOamTable_64x64_2), sOamTable_64x64_2}, + {ARRAY_COUNT(sOamTable_64x64_3), sOamTable_64x64_3}, + {ARRAY_COUNT(sOamTable_64x64_3), sOamTable_64x64_3} }; static const struct Subsprite sOamTable_96x40_0[] = { @@ -987,12 +987,12 @@ static const struct Subsprite sOamTable_96x40_3[] = { // Used by SS Tidal static const struct SubspriteTable sOamTables_96x40[] = { - {15, sOamTable_96x40_0}, - {15, sOamTable_96x40_0}, - {15, sOamTable_96x40_1}, - {15, sOamTable_96x40_2}, - {15, sOamTable_96x40_3}, - {15, sOamTable_96x40_3} + {ARRAY_COUNT(sOamTable_96x40_0), sOamTable_96x40_0}, + {ARRAY_COUNT(sOamTable_96x40_0), sOamTable_96x40_0}, + {ARRAY_COUNT(sOamTable_96x40_1), sOamTable_96x40_1}, + {ARRAY_COUNT(sOamTable_96x40_2), sOamTable_96x40_2}, + {ARRAY_COUNT(sOamTable_96x40_3), sOamTable_96x40_3}, + {ARRAY_COUNT(sOamTable_96x40_3), sOamTable_96x40_3} }; static const struct Subsprite sOamTable_88x32_0[] = { @@ -1521,10 +1521,10 @@ static const struct Subsprite sOamTable_88x32_3[] = { // Used by Submarine Shadow static const struct SubspriteTable sOamTables_88x32[] = { - {16, sOamTable_88x32_0}, - {16, sOamTable_88x32_0}, - {16, sOamTable_88x32_1}, - {16, sOamTable_88x32_2}, - {16, sOamTable_88x32_3}, - {16, sOamTable_88x32_3} + {ARRAY_COUNT(sOamTable_88x32_0), sOamTable_88x32_0}, + {ARRAY_COUNT(sOamTable_88x32_0), sOamTable_88x32_0}, + {ARRAY_COUNT(sOamTable_88x32_1), sOamTable_88x32_1}, + {ARRAY_COUNT(sOamTable_88x32_2), sOamTable_88x32_2}, + {ARRAY_COUNT(sOamTable_88x32_3), sOamTable_88x32_3}, + {ARRAY_COUNT(sOamTable_88x32_3), sOamTable_88x32_3} }; From d66413557288082f0b553b209b51fede7d8810c8 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 10 Mar 2022 10:33:23 -0500 Subject: [PATCH 403/417] Add usage of battle strings table offset constant --- include/battle_arena.h | 2 +- include/constants/battle_string_ids.h | 10 +- src/battle_arena.c | 2 +- src/battle_controller_opponent.c | 2 +- src/battle_controller_player.c | 2 +- src/battle_message.c | 746 +++++++++++++------------- src/battle_tv.c | 2 +- src/evolution_scene.c | 44 +- 8 files changed, 406 insertions(+), 404 deletions(-) diff --git a/include/battle_arena.h b/include/battle_arena.h index c9a18ef618..cc0e72c0c1 100644 --- a/include/battle_arena.h +++ b/include/battle_arena.h @@ -6,7 +6,7 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state); void BattleArena_InitPoints(void); void BattleArena_AddMindPoints(u8 battler); void BattleArena_AddSkillPoints(u8 battler); -void BattleArena_DeductMindPoints(u8 battler, u16 stringId); +void BattleArena_DeductSkillPoints(u8 battler, u16 stringId); void DrawArenaRefereeTextBox(void); void EraseArenaRefereeTextBox(void); diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index c8d37aac61..d5d0698b91 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -1,10 +1,6 @@ #ifndef GUARD_CONSTANTS_BATTLE_STRING_IDS_H #define GUARD_CONSTANTS_BATTLE_STRING_IDS_H -#define BATTLESTRINGS_COUNT 369 - -#define BATTLESTRINGS_ID_ADDER 12 // all battlestrings have its ID + 12, because first 5 are reserved - #define STRINGID_INTROMSG 0 #define STRINGID_INTROSENDOUT 1 #define STRINGID_RETURNMON 2 @@ -383,6 +379,12 @@ #define STRINGID_TRAINER1WINTEXT 379 #define STRINGID_TRAINER2WINTEXT 380 +#define BATTLESTRINGS_COUNT 381 + +// This is the string id that gBattleStringsTable starts with. +// String ids before this (e.g. STRINGID_INTROMSG) are not in the table, +// and are instead handled explicitly by BufferStringBattle. +#define BATTLESTRINGS_TABLE_START STRINGID_TRAINER1LOSETEXT // The below IDs are all indexes into battle message tables, // used to determine which of a set of messages to print. diff --git a/src/battle_arena.c b/src/battle_arena.c index f744a3b2b5..a7c74366b5 100644 --- a/src/battle_arena.c +++ b/src/battle_arena.c @@ -741,7 +741,7 @@ void BattleArena_AddSkillPoints(u8 battler) } } -void BattleArena_DeductMindPoints(u8 battler, u16 stringId) +void BattleArena_DeductSkillPoints(u8 battler, u16 stringId) { s8 *skillPoints = gBattleStruct->arenaSkillPoints; diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index c3830780b3..ead5a8768a 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -1523,7 +1523,7 @@ static void OpponentHandlePrintString(void) BufferStringBattle(*stringId); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; - BattleArena_DeductMindPoints(gActiveBattler, *stringId); + BattleArena_DeductSkillPoints(gActiveBattler, *stringId); } static void OpponentHandlePrintSelectionString(void) diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 2133d5b6f4..5b69030dfc 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -2551,7 +2551,7 @@ static void PlayerHandlePrintString(void) BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2; BattleTv_SetDataBasedOnString(*stringId); - BattleArena_DeductMindPoints(gActiveBattler, *stringId); + BattleArena_DeductSkillPoints(gActiveBattler, *stringId); } static void PlayerHandlePrintSelectionString(void) diff --git a/src/battle_message.c b/src/battle_message.c index 1df9356945..9d1b88ba7f 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -514,377 +514,377 @@ static const u8 sText_Trainer2WinText[]; static const u8 sText_TwoInGameTrainersDefeated[]; static const u8 sText_Trainer2LoseText[]; -const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] = +const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT - BATTLESTRINGS_TABLE_START] = { - [STRINGID_TRAINER1LOSETEXT - 12] = sText_Trainer1LoseText, - [STRINGID_PKMNGAINEDEXP - 12] = sText_PkmnGainedEXP, - [STRINGID_PKMNGREWTOLV - 12] = sText_PkmnGrewToLv, - [STRINGID_PKMNLEARNEDMOVE - 12] = sText_PkmnLearnedMove, - [STRINGID_TRYTOLEARNMOVE1 - 12] = sText_TryToLearnMove1, - [STRINGID_TRYTOLEARNMOVE2 - 12] = sText_TryToLearnMove2, - [STRINGID_TRYTOLEARNMOVE3 - 12] = sText_TryToLearnMove3, - [STRINGID_PKMNFORGOTMOVE - 12] = sText_PkmnForgotMove, - [STRINGID_STOPLEARNINGMOVE - 12] = sText_StopLearningMove, - [STRINGID_DIDNOTLEARNMOVE - 12] = sText_DidNotLearnMove, - [STRINGID_PKMNLEARNEDMOVE2 - 12] = sText_PkmnLearnedMove2, - [STRINGID_ATTACKMISSED - 12] = sText_AttackMissed, - [STRINGID_PKMNPROTECTEDITSELF - 12] = sText_PkmnProtectedItself, - [STRINGID_STATSWONTINCREASE2 - 12] = sText_StatsWontIncrease2, - [STRINGID_AVOIDEDDAMAGE - 12] = sText_AvoidedDamage, - [STRINGID_ITDOESNTAFFECT - 12] = sText_ItDoesntAffect, - [STRINGID_ATTACKERFAINTED - 12] = sText_AttackerFainted, - [STRINGID_TARGETFAINTED - 12] = sText_TargetFainted, - [STRINGID_PLAYERGOTMONEY - 12] = sText_PlayerGotMoney, - [STRINGID_PLAYERWHITEOUT - 12] = sText_PlayerWhiteout, - [STRINGID_PLAYERWHITEOUT2 - 12] = sText_PlayerWhiteout2, - [STRINGID_PREVENTSESCAPE - 12] = sText_PreventsEscape, - [STRINGID_HITXTIMES - 12] = sText_HitXTimes, - [STRINGID_PKMNFELLASLEEP - 12] = sText_PkmnFellAsleep, - [STRINGID_PKMNMADESLEEP - 12] = sText_PkmnMadeSleep, - [STRINGID_PKMNALREADYASLEEP - 12] = sText_PkmnAlreadyAsleep, - [STRINGID_PKMNALREADYASLEEP2 - 12] = sText_PkmnAlreadyAsleep2, - [STRINGID_PKMNWASNTAFFECTED - 12] = sText_PkmnWasntAffected, - [STRINGID_PKMNWASPOISONED - 12] = sText_PkmnWasPoisoned, - [STRINGID_PKMNPOISONEDBY - 12] = sText_PkmnPoisonedBy, - [STRINGID_PKMNHURTBYPOISON - 12] = sText_PkmnHurtByPoison, - [STRINGID_PKMNALREADYPOISONED - 12] = sText_PkmnAlreadyPoisoned, - [STRINGID_PKMNBADLYPOISONED - 12] = sText_PkmnBadlyPoisoned, - [STRINGID_PKMNENERGYDRAINED - 12] = sText_PkmnEnergyDrained, - [STRINGID_PKMNWASBURNED - 12] = sText_PkmnWasBurned, - [STRINGID_PKMNBURNEDBY - 12] = sText_PkmnBurnedBy, - [STRINGID_PKMNHURTBYBURN - 12] = sText_PkmnHurtByBurn, - [STRINGID_PKMNWASFROZEN - 12] = sText_PkmnWasFrozen, - [STRINGID_PKMNFROZENBY - 12] = sText_PkmnFrozenBy, - [STRINGID_PKMNISFROZEN - 12] = sText_PkmnIsFrozen, - [STRINGID_PKMNWASDEFROSTED - 12] = sText_PkmnWasDefrosted, - [STRINGID_PKMNWASDEFROSTED2 - 12] = sText_PkmnWasDefrosted2, - [STRINGID_PKMNWASDEFROSTEDBY - 12] = sText_PkmnWasDefrostedBy, - [STRINGID_PKMNWASPARALYZED - 12] = sText_PkmnWasParalyzed, - [STRINGID_PKMNWASPARALYZEDBY - 12] = sText_PkmnWasParalyzedBy, - [STRINGID_PKMNISPARALYZED - 12] = sText_PkmnIsParalyzed, - [STRINGID_PKMNISALREADYPARALYZED - 12] = sText_PkmnIsAlreadyParalyzed, - [STRINGID_PKMNHEALEDPARALYSIS - 12] = sText_PkmnHealedParalysis, - [STRINGID_PKMNDREAMEATEN - 12] = sText_PkmnDreamEaten, - [STRINGID_STATSWONTINCREASE - 12] = sText_StatsWontIncrease, - [STRINGID_STATSWONTDECREASE - 12] = sText_StatsWontDecrease, - [STRINGID_TEAMSTOPPEDWORKING - 12] = sText_TeamStoppedWorking, - [STRINGID_FOESTOPPEDWORKING - 12] = sText_FoeStoppedWorking, - [STRINGID_PKMNISCONFUSED - 12] = sText_PkmnIsConfused, - [STRINGID_PKMNHEALEDCONFUSION - 12] = sText_PkmnHealedConfusion, - [STRINGID_PKMNWASCONFUSED - 12] = sText_PkmnWasConfused, - [STRINGID_PKMNALREADYCONFUSED - 12] = sText_PkmnAlreadyConfused, - [STRINGID_PKMNFELLINLOVE - 12] = sText_PkmnFellInLove, - [STRINGID_PKMNINLOVE - 12] = sText_PkmnInLove, - [STRINGID_PKMNIMMOBILIZEDBYLOVE - 12] = sText_PkmnImmobilizedByLove, - [STRINGID_PKMNBLOWNAWAY - 12] = sText_PkmnBlownAway, - [STRINGID_PKMNCHANGEDTYPE - 12] = sText_PkmnChangedType, - [STRINGID_PKMNFLINCHED - 12] = sText_PkmnFlinched, - [STRINGID_PKMNREGAINEDHEALTH - 12] = sText_PkmnRegainedHealth, - [STRINGID_PKMNHPFULL - 12] = sText_PkmnHPFull, - [STRINGID_PKMNRAISEDSPDEF - 12] = sText_PkmnRaisedSpDef, - [STRINGID_PKMNRAISEDDEF - 12] = sText_PkmnRaisedDef, - [STRINGID_PKMNCOVEREDBYVEIL - 12] = sText_PkmnCoveredByVeil, - [STRINGID_PKMNUSEDSAFEGUARD - 12] = sText_PkmnUsedSafeguard, - [STRINGID_PKMNSAFEGUARDEXPIRED - 12] = sText_PkmnSafeguardExpired, - [STRINGID_PKMNWENTTOSLEEP - 12] = sText_PkmnWentToSleep, - [STRINGID_PKMNSLEPTHEALTHY - 12] = sText_PkmnSleptHealthy, - [STRINGID_PKMNWHIPPEDWHIRLWIND - 12] = sText_PkmnWhippedWhirlwind, - [STRINGID_PKMNTOOKSUNLIGHT - 12] = sText_PkmnTookSunlight, - [STRINGID_PKMNLOWEREDHEAD - 12] = sText_PkmnLoweredHead, - [STRINGID_PKMNISGLOWING - 12] = sText_PkmnIsGlowing, - [STRINGID_PKMNFLEWHIGH - 12] = sText_PkmnFlewHigh, - [STRINGID_PKMNDUGHOLE - 12] = sText_PkmnDugHole, - [STRINGID_PKMNSQUEEZEDBYBIND - 12] = sText_PkmnSqueezedByBind, - [STRINGID_PKMNTRAPPEDINVORTEX - 12] = sText_PkmnTrappedInVortex, - [STRINGID_PKMNWRAPPEDBY - 12] = sText_PkmnWrappedBy, - [STRINGID_PKMNCLAMPED - 12] = sText_PkmnClamped, - [STRINGID_PKMNHURTBY - 12] = sText_PkmnHurtBy, - [STRINGID_PKMNFREEDFROM - 12] = sText_PkmnFreedFrom, - [STRINGID_PKMNCRASHED - 12] = sText_PkmnCrashed, - [STRINGID_PKMNSHROUDEDINMIST - 12] = gText_PkmnShroudedInMist, - [STRINGID_PKMNPROTECTEDBYMIST - 12] = sText_PkmnProtectedByMist, - [STRINGID_PKMNGETTINGPUMPED - 12] = gText_PkmnGettingPumped, - [STRINGID_PKMNHITWITHRECOIL - 12] = sText_PkmnHitWithRecoil, - [STRINGID_PKMNPROTECTEDITSELF2 - 12] = sText_PkmnProtectedItself2, - [STRINGID_PKMNBUFFETEDBYSANDSTORM - 12] = sText_PkmnBuffetedBySandstorm, - [STRINGID_PKMNPELTEDBYHAIL - 12] = sText_PkmnPeltedByHail, - [STRINGID_PKMNSEEDED - 12] = sText_PkmnSeeded, - [STRINGID_PKMNEVADEDATTACK - 12] = sText_PkmnEvadedAttack, - [STRINGID_PKMNSAPPEDBYLEECHSEED - 12] = sText_PkmnSappedByLeechSeed, - [STRINGID_PKMNFASTASLEEP - 12] = sText_PkmnFastAsleep, - [STRINGID_PKMNWOKEUP - 12] = sText_PkmnWokeUp, - [STRINGID_PKMNUPROARKEPTAWAKE - 12] = sText_PkmnUproarKeptAwake, - [STRINGID_PKMNWOKEUPINUPROAR - 12] = sText_PkmnWokeUpInUproar, - [STRINGID_PKMNCAUSEDUPROAR - 12] = sText_PkmnCausedUproar, - [STRINGID_PKMNMAKINGUPROAR - 12] = sText_PkmnMakingUproar, - [STRINGID_PKMNCALMEDDOWN - 12] = sText_PkmnCalmedDown, - [STRINGID_PKMNCANTSLEEPINUPROAR - 12] = sText_PkmnCantSleepInUproar, - [STRINGID_PKMNSTOCKPILED - 12] = sText_PkmnStockpiled, - [STRINGID_PKMNCANTSTOCKPILE - 12] = sText_PkmnCantStockpile, - [STRINGID_PKMNCANTSLEEPINUPROAR2 - 12] = sText_PkmnCantSleepInUproar2, - [STRINGID_UPROARKEPTPKMNAWAKE - 12] = sText_UproarKeptPkmnAwake, - [STRINGID_PKMNSTAYEDAWAKEUSING - 12] = sText_PkmnStayedAwakeUsing, - [STRINGID_PKMNSTORINGENERGY - 12] = sText_PkmnStoringEnergy, - [STRINGID_PKMNUNLEASHEDENERGY - 12] = sText_PkmnUnleashedEnergy, - [STRINGID_PKMNFATIGUECONFUSION - 12] = sText_PkmnFatigueConfusion, - [STRINGID_PLAYERPICKEDUPMONEY - 12] = sText_PlayerPickedUpMoney, - [STRINGID_PKMNUNAFFECTED - 12] = sText_PkmnUnaffected, - [STRINGID_PKMNTRANSFORMEDINTO - 12] = sText_PkmnTransformedInto, - [STRINGID_PKMNMADESUBSTITUTE - 12] = sText_PkmnMadeSubstitute, - [STRINGID_PKMNHASSUBSTITUTE - 12] = sText_PkmnHasSubstitute, - [STRINGID_SUBSTITUTEDAMAGED - 12] = sText_SubstituteDamaged, - [STRINGID_PKMNSUBSTITUTEFADED - 12] = sText_PkmnSubstituteFaded, - [STRINGID_PKMNMUSTRECHARGE - 12] = sText_PkmnMustRecharge, - [STRINGID_PKMNRAGEBUILDING - 12] = sText_PkmnRageBuilding, - [STRINGID_PKMNMOVEWASDISABLED - 12] = sText_PkmnMoveWasDisabled, - [STRINGID_PKMNMOVEISDISABLED - 12] = sText_PkmnMoveIsDisabled, - [STRINGID_PKMNMOVEDISABLEDNOMORE - 12] = sText_PkmnMoveDisabledNoMore, - [STRINGID_PKMNGOTENCORE - 12] = sText_PkmnGotEncore, - [STRINGID_PKMNENCOREENDED - 12] = sText_PkmnEncoreEnded, - [STRINGID_PKMNTOOKAIM - 12] = sText_PkmnTookAim, - [STRINGID_PKMNSKETCHEDMOVE - 12] = sText_PkmnSketchedMove, - [STRINGID_PKMNTRYINGTOTAKEFOE - 12] = sText_PkmnTryingToTakeFoe, - [STRINGID_PKMNTOOKFOE - 12] = sText_PkmnTookFoe, - [STRINGID_PKMNREDUCEDPP - 12] = sText_PkmnReducedPP, - [STRINGID_PKMNSTOLEITEM - 12] = sText_PkmnStoleItem, - [STRINGID_TARGETCANTESCAPENOW - 12] = sText_TargetCantEscapeNow, - [STRINGID_PKMNFELLINTONIGHTMARE - 12] = sText_PkmnFellIntoNightmare, - [STRINGID_PKMNLOCKEDINNIGHTMARE - 12] = sText_PkmnLockedInNightmare, - [STRINGID_PKMNLAIDCURSE - 12] = sText_PkmnLaidCurse, - [STRINGID_PKMNAFFLICTEDBYCURSE - 12] = sText_PkmnAfflictedByCurse, - [STRINGID_SPIKESSCATTERED - 12] = sText_SpikesScattered, - [STRINGID_PKMNHURTBYSPIKES - 12] = sText_PkmnHurtBySpikes, - [STRINGID_PKMNIDENTIFIED - 12] = sText_PkmnIdentified, - [STRINGID_PKMNPERISHCOUNTFELL - 12] = sText_PkmnPerishCountFell, - [STRINGID_PKMNBRACEDITSELF - 12] = sText_PkmnBracedItself, - [STRINGID_PKMNENDUREDHIT - 12] = sText_PkmnEnduredHit, - [STRINGID_MAGNITUDESTRENGTH - 12] = sText_MagnitudeStrength, - [STRINGID_PKMNCUTHPMAXEDATTACK - 12] = sText_PkmnCutHPMaxedAttack, - [STRINGID_PKMNCOPIEDSTATCHANGES - 12] = sText_PkmnCopiedStatChanges, - [STRINGID_PKMNGOTFREE - 12] = sText_PkmnGotFree, - [STRINGID_PKMNSHEDLEECHSEED - 12] = sText_PkmnShedLeechSeed, - [STRINGID_PKMNBLEWAWAYSPIKES - 12] = sText_PkmnBlewAwaySpikes, - [STRINGID_PKMNFLEDFROMBATTLE - 12] = sText_PkmnFledFromBattle, - [STRINGID_PKMNFORESAWATTACK - 12] = sText_PkmnForesawAttack, - [STRINGID_PKMNTOOKATTACK - 12] = sText_PkmnTookAttack, - [STRINGID_PKMNATTACK - 12] = sText_PkmnAttack, - [STRINGID_PKMNCENTERATTENTION - 12] = sText_PkmnCenterAttention, - [STRINGID_PKMNCHARGINGPOWER - 12] = sText_PkmnChargingPower, - [STRINGID_NATUREPOWERTURNEDINTO - 12] = sText_NaturePowerTurnedInto, - [STRINGID_PKMNSTATUSNORMAL - 12] = sText_PkmnStatusNormal, - [STRINGID_PKMNHASNOMOVESLEFT - 12] = sText_PkmnHasNoMovesLeft, - [STRINGID_PKMNSUBJECTEDTOTORMENT - 12] = sText_PkmnSubjectedToTorment, - [STRINGID_PKMNCANTUSEMOVETORMENT - 12] = sText_PkmnCantUseMoveTorment, - [STRINGID_PKMNTIGHTENINGFOCUS - 12] = sText_PkmnTighteningFocus, - [STRINGID_PKMNFELLFORTAUNT - 12] = sText_PkmnFellForTaunt, - [STRINGID_PKMNCANTUSEMOVETAUNT - 12] = sText_PkmnCantUseMoveTaunt, - [STRINGID_PKMNREADYTOHELP - 12] = sText_PkmnReadyToHelp, - [STRINGID_PKMNSWITCHEDITEMS - 12] = sText_PkmnSwitchedItems, - [STRINGID_PKMNCOPIEDFOE - 12] = sText_PkmnCopiedFoe, - [STRINGID_PKMNMADEWISH - 12] = sText_PkmnMadeWish, - [STRINGID_PKMNWISHCAMETRUE - 12] = sText_PkmnWishCameTrue, - [STRINGID_PKMNPLANTEDROOTS - 12] = sText_PkmnPlantedRoots, - [STRINGID_PKMNABSORBEDNUTRIENTS - 12] = sText_PkmnAbsorbedNutrients, - [STRINGID_PKMNANCHOREDITSELF - 12] = sText_PkmnAnchoredItself, - [STRINGID_PKMNWASMADEDROWSY - 12] = sText_PkmnWasMadeDrowsy, - [STRINGID_PKMNKNOCKEDOFF - 12] = sText_PkmnKnockedOff, - [STRINGID_PKMNSWAPPEDABILITIES - 12] = sText_PkmnSwappedAbilities, - [STRINGID_PKMNSEALEDOPPONENTMOVE - 12] = sText_PkmnSealedOpponentMove, - [STRINGID_PKMNCANTUSEMOVESEALED - 12] = sText_PkmnCantUseMoveSealed, - [STRINGID_PKMNWANTSGRUDGE - 12] = sText_PkmnWantsGrudge, - [STRINGID_PKMNLOSTPPGRUDGE - 12] = sText_PkmnLostPPGrudge, - [STRINGID_PKMNSHROUDEDITSELF - 12] = sText_PkmnShroudedItself, - [STRINGID_PKMNMOVEBOUNCED - 12] = sText_PkmnMoveBounced, - [STRINGID_PKMNWAITSFORTARGET - 12] = sText_PkmnWaitsForTarget, - [STRINGID_PKMNSNATCHEDMOVE - 12] = sText_PkmnSnatchedMove, - [STRINGID_PKMNMADEITRAIN - 12] = sText_PkmnMadeItRain, - [STRINGID_PKMNRAISEDSPEED - 12] = sText_PkmnRaisedSpeed, - [STRINGID_PKMNPROTECTEDBY - 12] = sText_PkmnProtectedBy, - [STRINGID_PKMNPREVENTSUSAGE - 12] = sText_PkmnPreventsUsage, - [STRINGID_PKMNRESTOREDHPUSING - 12] = sText_PkmnRestoredHPUsing, - [STRINGID_PKMNCHANGEDTYPEWITH - 12] = sText_PkmnChangedTypeWith, - [STRINGID_PKMNPREVENTSPARALYSISWITH - 12] = sText_PkmnPreventsParalysisWith, - [STRINGID_PKMNPREVENTSROMANCEWITH - 12] = sText_PkmnPreventsRomanceWith, - [STRINGID_PKMNPREVENTSPOISONINGWITH - 12] = sText_PkmnPreventsPoisoningWith, - [STRINGID_PKMNPREVENTSCONFUSIONWITH - 12] = sText_PkmnPreventsConfusionWith, - [STRINGID_PKMNRAISEDFIREPOWERWITH - 12] = sText_PkmnRaisedFirePowerWith, - [STRINGID_PKMNANCHORSITSELFWITH - 12] = sText_PkmnAnchorsItselfWith, - [STRINGID_PKMNCUTSATTACKWITH - 12] = sText_PkmnCutsAttackWith, - [STRINGID_PKMNPREVENTSSTATLOSSWITH - 12] = sText_PkmnPreventsStatLossWith, - [STRINGID_PKMNHURTSWITH - 12] = sText_PkmnHurtsWith, - [STRINGID_PKMNTRACED - 12] = sText_PkmnTraced, - [STRINGID_STATSHARPLY - 12] = sText_StatSharply, - [STRINGID_STATROSE - 12] = gText_StatRose, - [STRINGID_STATHARSHLY - 12] = sText_StatHarshly, - [STRINGID_STATFELL - 12] = sText_StatFell, - [STRINGID_ATTACKERSSTATROSE - 12] = sText_AttackersStatRose, - [STRINGID_DEFENDERSSTATROSE - 12] = gText_DefendersStatRose, - [STRINGID_ATTACKERSSTATFELL - 12] = sText_AttackersStatFell, - [STRINGID_DEFENDERSSTATFELL - 12] = sText_DefendersStatFell, - [STRINGID_CRITICALHIT - 12] = sText_CriticalHit, - [STRINGID_ONEHITKO - 12] = sText_OneHitKO, - [STRINGID_123POOF - 12] = sText_123Poof, - [STRINGID_ANDELLIPSIS - 12] = sText_AndEllipsis, - [STRINGID_NOTVERYEFFECTIVE - 12] = sText_NotVeryEffective, - [STRINGID_SUPEREFFECTIVE - 12] = sText_SuperEffective, - [STRINGID_GOTAWAYSAFELY - 12] = sText_GotAwaySafely, - [STRINGID_WILDPKMNFLED - 12] = sText_WildPkmnFled, - [STRINGID_NORUNNINGFROMTRAINERS - 12] = sText_NoRunningFromTrainers, - [STRINGID_CANTESCAPE - 12] = sText_CantEscape, - [STRINGID_DONTLEAVEBIRCH - 12] = sText_DontLeaveBirch, - [STRINGID_BUTNOTHINGHAPPENED - 12] = sText_ButNothingHappened, - [STRINGID_BUTITFAILED - 12] = sText_ButItFailed, - [STRINGID_ITHURTCONFUSION - 12] = sText_ItHurtConfusion, - [STRINGID_MIRRORMOVEFAILED - 12] = sText_MirrorMoveFailed, - [STRINGID_STARTEDTORAIN - 12] = sText_StartedToRain, - [STRINGID_DOWNPOURSTARTED - 12] = sText_DownpourStarted, - [STRINGID_RAINCONTINUES - 12] = sText_RainContinues, - [STRINGID_DOWNPOURCONTINUES - 12] = sText_DownpourContinues, - [STRINGID_RAINSTOPPED - 12] = sText_RainStopped, - [STRINGID_SANDSTORMBREWED - 12] = sText_SandstormBrewed, - [STRINGID_SANDSTORMRAGES - 12] = sText_SandstormRages, - [STRINGID_SANDSTORMSUBSIDED - 12] = sText_SandstormSubsided, - [STRINGID_SUNLIGHTGOTBRIGHT - 12] = sText_SunlightGotBright, - [STRINGID_SUNLIGHTSTRONG - 12] = sText_SunlightStrong, - [STRINGID_SUNLIGHTFADED - 12] = sText_SunlightFaded, - [STRINGID_STARTEDHAIL - 12] = sText_StartedHail, - [STRINGID_HAILCONTINUES - 12] = sText_HailContinues, - [STRINGID_HAILSTOPPED - 12] = sText_HailStopped, - [STRINGID_FAILEDTOSPITUP - 12] = sText_FailedToSpitUp, - [STRINGID_FAILEDTOSWALLOW - 12] = sText_FailedToSwallow, - [STRINGID_WINDBECAMEHEATWAVE - 12] = sText_WindBecameHeatWave, - [STRINGID_STATCHANGESGONE - 12] = sText_StatChangesGone, - [STRINGID_COINSSCATTERED - 12] = sText_CoinsScattered, - [STRINGID_TOOWEAKFORSUBSTITUTE - 12] = sText_TooWeakForSubstitute, - [STRINGID_SHAREDPAIN - 12] = sText_SharedPain, - [STRINGID_BELLCHIMED - 12] = sText_BellChimed, - [STRINGID_FAINTINTHREE - 12] = sText_FaintInThree, - [STRINGID_NOPPLEFT - 12] = sText_NoPPLeft, - [STRINGID_BUTNOPPLEFT - 12] = sText_ButNoPPLeft, - [STRINGID_PLAYERUSEDITEM - 12] = sText_PlayerUsedItem, - [STRINGID_WALLYUSEDITEM - 12] = sText_WallyUsedItem, - [STRINGID_TRAINERBLOCKEDBALL - 12] = sText_TrainerBlockedBall, - [STRINGID_DONTBEATHIEF - 12] = sText_DontBeAThief, - [STRINGID_ITDODGEDBALL - 12] = sText_ItDodgedBall, - [STRINGID_YOUMISSEDPKMN - 12] = sText_YouMissedPkmn, - [STRINGID_PKMNBROKEFREE - 12] = sText_PkmnBrokeFree, - [STRINGID_ITAPPEAREDCAUGHT - 12] = sText_ItAppearedCaught, - [STRINGID_AARGHALMOSTHADIT - 12] = sText_AarghAlmostHadIt, - [STRINGID_SHOOTSOCLOSE - 12] = sText_ShootSoClose, - [STRINGID_GOTCHAPKMNCAUGHT - 12] = sText_GotchaPkmnCaught, - [STRINGID_GOTCHAPKMNCAUGHT2 - 12] = sText_GotchaPkmnCaught2, - [STRINGID_GIVENICKNAMECAPTURED - 12] = sText_GiveNicknameCaptured, - [STRINGID_PKMNSENTTOPC - 12] = sText_PkmnSentToPC, - [STRINGID_PKMNDATAADDEDTODEX - 12] = sText_PkmnDataAddedToDex, - [STRINGID_ITISRAINING - 12] = sText_ItIsRaining, - [STRINGID_SANDSTORMISRAGING - 12] = sText_SandstormIsRaging, - [STRINGID_CANTESCAPE2 - 12] = sText_CantEscape2, - [STRINGID_PKMNIGNORESASLEEP - 12] = sText_PkmnIgnoresAsleep, - [STRINGID_PKMNIGNOREDORDERS - 12] = sText_PkmnIgnoredOrders, - [STRINGID_PKMNBEGANTONAP - 12] = sText_PkmnBeganToNap, - [STRINGID_PKMNLOAFING - 12] = sText_PkmnLoafing, - [STRINGID_PKMNWONTOBEY - 12] = sText_PkmnWontObey, - [STRINGID_PKMNTURNEDAWAY - 12] = sText_PkmnTurnedAway, - [STRINGID_PKMNPRETENDNOTNOTICE - 12] = sText_PkmnPretendNotNotice, - [STRINGID_ENEMYABOUTTOSWITCHPKMN - 12] = sText_EnemyAboutToSwitchPkmn, - [STRINGID_CREPTCLOSER - 12] = sText_CreptCloser, - [STRINGID_CANTGETCLOSER - 12] = sText_CantGetCloser, - [STRINGID_PKMNWATCHINGCAREFULLY - 12] = sText_PkmnWatchingCarefully, - [STRINGID_PKMNCURIOUSABOUTX - 12] = sText_PkmnCuriousAboutX, - [STRINGID_PKMNENTHRALLEDBYX - 12] = sText_PkmnEnthralledByX, - [STRINGID_PKMNIGNOREDX - 12] = sText_PkmnIgnoredX, - [STRINGID_THREWPOKEBLOCKATPKMN - 12] = sText_ThrewPokeblockAtPkmn, - [STRINGID_OUTOFSAFARIBALLS - 12] = sText_OutOfSafariBalls, - [STRINGID_PKMNSITEMCUREDPARALYSIS - 12] = sText_PkmnsItemCuredParalysis, - [STRINGID_PKMNSITEMCUREDPOISON - 12] = sText_PkmnsItemCuredPoison, - [STRINGID_PKMNSITEMHEALEDBURN - 12] = sText_PkmnsItemHealedBurn, - [STRINGID_PKMNSITEMDEFROSTEDIT - 12] = sText_PkmnsItemDefrostedIt, - [STRINGID_PKMNSITEMWOKEIT - 12] = sText_PkmnsItemWokeIt, - [STRINGID_PKMNSITEMSNAPPEDOUT - 12] = sText_PkmnsItemSnappedOut, - [STRINGID_PKMNSITEMCUREDPROBLEM - 12] = sText_PkmnsItemCuredProblem, - [STRINGID_PKMNSITEMRESTOREDHEALTH - 12] = sText_PkmnsItemRestoredHealth, - [STRINGID_PKMNSITEMRESTOREDPP - 12] = sText_PkmnsItemRestoredPP, - [STRINGID_PKMNSITEMRESTOREDSTATUS - 12] = sText_PkmnsItemRestoredStatus, - [STRINGID_PKMNSITEMRESTOREDHPALITTLE - 12] = sText_PkmnsItemRestoredHPALittle, - [STRINGID_ITEMALLOWSONLYYMOVE - 12] = sText_ItemAllowsOnlyYMove, - [STRINGID_PKMNHUNGONWITHX - 12] = sText_PkmnHungOnWithX, - [STRINGID_EMPTYSTRING3 - 12] = gText_EmptyString3, - [STRINGID_PKMNSXPREVENTSBURNS - 12] = sText_PkmnsXPreventsBurns, - [STRINGID_PKMNSXBLOCKSY - 12] = sText_PkmnsXBlocksY, - [STRINGID_PKMNSXRESTOREDHPALITTLE2 - 12] = sText_PkmnsXRestoredHPALittle2, - [STRINGID_PKMNSXWHIPPEDUPSANDSTORM - 12] = sText_PkmnsXWhippedUpSandstorm, - [STRINGID_PKMNSXPREVENTSYLOSS - 12] = sText_PkmnsXPreventsYLoss, - [STRINGID_PKMNSXINFATUATEDY - 12] = sText_PkmnsXInfatuatedY, - [STRINGID_PKMNSXMADEYINEFFECTIVE - 12] = sText_PkmnsXMadeYIneffective, - [STRINGID_PKMNSXCUREDYPROBLEM - 12] = sText_PkmnsXCuredYProblem, - [STRINGID_ITSUCKEDLIQUIDOOZE - 12] = sText_ItSuckedLiquidOoze, - [STRINGID_PKMNTRANSFORMED - 12] = sText_PkmnTransformed, - [STRINGID_ELECTRICITYWEAKENED - 12] = sText_ElectricityWeakened, - [STRINGID_FIREWEAKENED - 12] = sText_FireWeakened, - [STRINGID_PKMNHIDUNDERWATER - 12] = sText_PkmnHidUnderwater, - [STRINGID_PKMNSPRANGUP - 12] = sText_PkmnSprangUp, - [STRINGID_HMMOVESCANTBEFORGOTTEN - 12] = sText_HMMovesCantBeForgotten, - [STRINGID_XFOUNDONEY - 12] = sText_XFoundOneY, - [STRINGID_PLAYERDEFEATEDTRAINER1 - 12] = sText_PlayerDefeatedLinkTrainerTrainer1, - [STRINGID_SOOTHINGAROMA - 12] = sText_SoothingAroma, - [STRINGID_ITEMSCANTBEUSEDNOW - 12] = sText_ItemsCantBeUsedNow, - [STRINGID_FORXCOMMAYZ - 12] = sText_ForXCommaYZ, - [STRINGID_USINGITEMSTATOFPKMNROSE - 12] = sText_UsingItemTheStatOfPkmnRose, - [STRINGID_PKMNUSEDXTOGETPUMPED - 12] = sText_PkmnUsedXToGetPumped, - [STRINGID_PKMNSXMADEYUSELESS - 12] = sText_PkmnsXMadeYUseless, - [STRINGID_PKMNTRAPPEDBYSANDTOMB - 12] = sText_PkmnTrappedBySandTomb, - [STRINGID_EMPTYSTRING4 - 12] = sText_EmptyString4, - [STRINGID_ABOOSTED - 12] = sText_ABoosted, - [STRINGID_PKMNSXINTENSIFIEDSUN - 12] = sText_PkmnsXIntensifiedSun, - [STRINGID_PKMNMAKESGROUNDMISS - 12] = sText_PkmnMakesGroundMiss, - [STRINGID_YOUTHROWABALLNOWRIGHT - 12] = sText_YouThrowABallNowRight, - [STRINGID_PKMNSXTOOKATTACK - 12] = sText_PkmnsXTookAttack, - [STRINGID_PKMNCHOSEXASDESTINY - 12] = sText_PkmnChoseXAsDestiny, - [STRINGID_PKMNLOSTFOCUS - 12] = sText_PkmnLostFocus, - [STRINGID_USENEXTPKMN - 12] = sText_UseNextPkmn, - [STRINGID_PKMNFLEDUSINGITS - 12] = sText_PkmnFledUsingIts, - [STRINGID_PKMNFLEDUSING - 12] = sText_PkmnFledUsing, - [STRINGID_PKMNWASDRAGGEDOUT - 12] = sText_PkmnWasDraggedOut, - [STRINGID_PREVENTEDFROMWORKING - 12] = sText_PreventedFromWorking, - [STRINGID_PKMNSITEMNORMALIZEDSTATUS - 12] = sText_PkmnsItemNormalizedStatus, - [STRINGID_TRAINER1USEDITEM - 12] = sText_Trainer1UsedItem, - [STRINGID_BOXISFULL - 12] = sText_BoxIsFull, - [STRINGID_PKMNAVOIDEDATTACK - 12] = sText_PkmnAvoidedAttack, - [STRINGID_PKMNSXMADEITINEFFECTIVE - 12] = sText_PkmnsXMadeItIneffective, - [STRINGID_PKMNSXPREVENTSFLINCHING - 12] = sText_PkmnsXPreventsFlinching, - [STRINGID_PKMNALREADYHASBURN - 12] = sText_PkmnAlreadyHasBurn, - [STRINGID_STATSWONTDECREASE2 - 12] = sText_StatsWontDecrease2, - [STRINGID_PKMNSXBLOCKSY2 - 12] = sText_PkmnsXBlocksY2, - [STRINGID_PKMNSXWOREOFF - 12] = sText_PkmnsXWoreOff, - [STRINGID_PKMNRAISEDDEFALITTLE - 12] = sText_PkmnRaisedDefALittle, - [STRINGID_PKMNRAISEDSPDEFALITTLE - 12] = sText_PkmnRaisedSpDefALittle, - [STRINGID_THEWALLSHATTERED - 12] = sText_TheWallShattered, - [STRINGID_PKMNSXPREVENTSYSZ - 12] = sText_PkmnsXPreventsYsZ, - [STRINGID_PKMNSXCUREDITSYPROBLEM - 12] = sText_PkmnsXCuredItsYProblem, - [STRINGID_ATTACKERCANTESCAPE - 12] = sText_AttackerCantEscape, - [STRINGID_PKMNOBTAINEDX - 12] = sText_PkmnObtainedX, - [STRINGID_PKMNOBTAINEDX2 - 12] = sText_PkmnObtainedX2, - [STRINGID_PKMNOBTAINEDXYOBTAINEDZ - 12] = sText_PkmnObtainedXYObtainedZ, - [STRINGID_BUTNOEFFECT - 12] = sText_ButNoEffect, - [STRINGID_PKMNSXHADNOEFFECTONY - 12] = sText_PkmnsXHadNoEffectOnY, - [STRINGID_TWOENEMIESDEFEATED - 12] = sText_TwoInGameTrainersDefeated, - [STRINGID_TRAINER2LOSETEXT - 12] = sText_Trainer2LoseText, - [STRINGID_PKMNINCAPABLEOFPOWER - 12] = sText_PkmnIncapableOfPower, - [STRINGID_GLINTAPPEARSINEYE - 12] = sText_GlintAppearsInEye, - [STRINGID_PKMNGETTINGINTOPOSITION - 12] = sText_PkmnGettingIntoPosition, - [STRINGID_PKMNBEGANGROWLINGDEEPLY - 12] = sText_PkmnBeganGrowlingDeeply, - [STRINGID_PKMNEAGERFORMORE - 12] = sText_PkmnEagerForMore, - [STRINGID_DEFEATEDOPPONENTBYREFEREE - 12] = sText_DefeatedOpponentByReferee, - [STRINGID_LOSTTOOPPONENTBYREFEREE - 12] = sText_LostToOpponentByReferee, - [STRINGID_TIEDOPPONENTBYREFEREE - 12] = sText_TiedOpponentByReferee, - [STRINGID_QUESTIONFORFEITMATCH - 12] = sText_QuestionForfeitMatch, - [STRINGID_FORFEITEDMATCH - 12] = sText_ForfeitedMatch, - [STRINGID_PKMNTRANSFERREDSOMEONESPC - 12] = gText_PkmnTransferredSomeonesPC, - [STRINGID_PKMNTRANSFERREDLANETTESPC - 12] = gText_PkmnTransferredLanettesPC, - [STRINGID_PKMNBOXSOMEONESPCFULL - 12] = gText_PkmnTransferredSomeonesPCBoxFull, - [STRINGID_PKMNBOXLANETTESPCFULL - 12] = gText_PkmnTransferredLanettesPCBoxFull, - [STRINGID_TRAINER1WINTEXT - 12] = sText_Trainer1WinText, - [STRINGID_TRAINER2WINTEXT - 12] = sText_Trainer2WinText, + [STRINGID_TRAINER1LOSETEXT - BATTLESTRINGS_TABLE_START] = sText_Trainer1LoseText, + [STRINGID_PKMNGAINEDEXP - BATTLESTRINGS_TABLE_START] = sText_PkmnGainedEXP, + [STRINGID_PKMNGREWTOLV - BATTLESTRINGS_TABLE_START] = sText_PkmnGrewToLv, + [STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnLearnedMove, + [STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_TABLE_START] = sText_TryToLearnMove1, + [STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_TABLE_START] = sText_TryToLearnMove2, + [STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_TABLE_START] = sText_TryToLearnMove3, + [STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnForgotMove, + [STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_TABLE_START] = sText_StopLearningMove, + [STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_TABLE_START] = sText_DidNotLearnMove, + [STRINGID_PKMNLEARNEDMOVE2 - BATTLESTRINGS_TABLE_START] = sText_PkmnLearnedMove2, + [STRINGID_ATTACKMISSED - BATTLESTRINGS_TABLE_START] = sText_AttackMissed, + [STRINGID_PKMNPROTECTEDITSELF - BATTLESTRINGS_TABLE_START] = sText_PkmnProtectedItself, + [STRINGID_STATSWONTINCREASE2 - BATTLESTRINGS_TABLE_START] = sText_StatsWontIncrease2, + [STRINGID_AVOIDEDDAMAGE - BATTLESTRINGS_TABLE_START] = sText_AvoidedDamage, + [STRINGID_ITDOESNTAFFECT - BATTLESTRINGS_TABLE_START] = sText_ItDoesntAffect, + [STRINGID_ATTACKERFAINTED - BATTLESTRINGS_TABLE_START] = sText_AttackerFainted, + [STRINGID_TARGETFAINTED - BATTLESTRINGS_TABLE_START] = sText_TargetFainted, + [STRINGID_PLAYERGOTMONEY - BATTLESTRINGS_TABLE_START] = sText_PlayerGotMoney, + [STRINGID_PLAYERWHITEOUT - BATTLESTRINGS_TABLE_START] = sText_PlayerWhiteout, + [STRINGID_PLAYERWHITEOUT2 - BATTLESTRINGS_TABLE_START] = sText_PlayerWhiteout2, + [STRINGID_PREVENTSESCAPE - BATTLESTRINGS_TABLE_START] = sText_PreventsEscape, + [STRINGID_HITXTIMES - BATTLESTRINGS_TABLE_START] = sText_HitXTimes, + [STRINGID_PKMNFELLASLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnFellAsleep, + [STRINGID_PKMNMADESLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnMadeSleep, + [STRINGID_PKMNALREADYASLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyAsleep, + [STRINGID_PKMNALREADYASLEEP2 - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyAsleep2, + [STRINGID_PKMNWASNTAFFECTED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasntAffected, + [STRINGID_PKMNWASPOISONED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasPoisoned, + [STRINGID_PKMNPOISONEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnPoisonedBy, + [STRINGID_PKMNHURTBYPOISON - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtByPoison, + [STRINGID_PKMNALREADYPOISONED - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyPoisoned, + [STRINGID_PKMNBADLYPOISONED - BATTLESTRINGS_TABLE_START] = sText_PkmnBadlyPoisoned, + [STRINGID_PKMNENERGYDRAINED - BATTLESTRINGS_TABLE_START] = sText_PkmnEnergyDrained, + [STRINGID_PKMNWASBURNED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasBurned, + [STRINGID_PKMNBURNEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnBurnedBy, + [STRINGID_PKMNHURTBYBURN - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtByBurn, + [STRINGID_PKMNWASFROZEN - BATTLESTRINGS_TABLE_START] = sText_PkmnWasFrozen, + [STRINGID_PKMNFROZENBY - BATTLESTRINGS_TABLE_START] = sText_PkmnFrozenBy, + [STRINGID_PKMNISFROZEN - BATTLESTRINGS_TABLE_START] = sText_PkmnIsFrozen, + [STRINGID_PKMNWASDEFROSTED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasDefrosted, + [STRINGID_PKMNWASDEFROSTED2 - BATTLESTRINGS_TABLE_START] = sText_PkmnWasDefrosted2, + [STRINGID_PKMNWASDEFROSTEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnWasDefrostedBy, + [STRINGID_PKMNWASPARALYZED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasParalyzed, + [STRINGID_PKMNWASPARALYZEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnWasParalyzedBy, + [STRINGID_PKMNISPARALYZED - BATTLESTRINGS_TABLE_START] = sText_PkmnIsParalyzed, + [STRINGID_PKMNISALREADYPARALYZED - BATTLESTRINGS_TABLE_START] = sText_PkmnIsAlreadyParalyzed, + [STRINGID_PKMNHEALEDPARALYSIS - BATTLESTRINGS_TABLE_START] = sText_PkmnHealedParalysis, + [STRINGID_PKMNDREAMEATEN - BATTLESTRINGS_TABLE_START] = sText_PkmnDreamEaten, + [STRINGID_STATSWONTINCREASE - BATTLESTRINGS_TABLE_START] = sText_StatsWontIncrease, + [STRINGID_STATSWONTDECREASE - BATTLESTRINGS_TABLE_START] = sText_StatsWontDecrease, + [STRINGID_TEAMSTOPPEDWORKING - BATTLESTRINGS_TABLE_START] = sText_TeamStoppedWorking, + [STRINGID_FOESTOPPEDWORKING - BATTLESTRINGS_TABLE_START] = sText_FoeStoppedWorking, + [STRINGID_PKMNISCONFUSED - BATTLESTRINGS_TABLE_START] = sText_PkmnIsConfused, + [STRINGID_PKMNHEALEDCONFUSION - BATTLESTRINGS_TABLE_START] = sText_PkmnHealedConfusion, + [STRINGID_PKMNWASCONFUSED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasConfused, + [STRINGID_PKMNALREADYCONFUSED - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyConfused, + [STRINGID_PKMNFELLINLOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnFellInLove, + [STRINGID_PKMNINLOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnInLove, + [STRINGID_PKMNIMMOBILIZEDBYLOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnImmobilizedByLove, + [STRINGID_PKMNBLOWNAWAY - BATTLESTRINGS_TABLE_START] = sText_PkmnBlownAway, + [STRINGID_PKMNCHANGEDTYPE - BATTLESTRINGS_TABLE_START] = sText_PkmnChangedType, + [STRINGID_PKMNFLINCHED - BATTLESTRINGS_TABLE_START] = sText_PkmnFlinched, + [STRINGID_PKMNREGAINEDHEALTH - BATTLESTRINGS_TABLE_START] = sText_PkmnRegainedHealth, + [STRINGID_PKMNHPFULL - BATTLESTRINGS_TABLE_START] = sText_PkmnHPFull, + [STRINGID_PKMNRAISEDSPDEF - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedSpDef, + [STRINGID_PKMNRAISEDDEF - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedDef, + [STRINGID_PKMNCOVEREDBYVEIL - BATTLESTRINGS_TABLE_START] = sText_PkmnCoveredByVeil, + [STRINGID_PKMNUSEDSAFEGUARD - BATTLESTRINGS_TABLE_START] = sText_PkmnUsedSafeguard, + [STRINGID_PKMNSAFEGUARDEXPIRED - BATTLESTRINGS_TABLE_START] = sText_PkmnSafeguardExpired, + [STRINGID_PKMNWENTTOSLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnWentToSleep, + [STRINGID_PKMNSLEPTHEALTHY - BATTLESTRINGS_TABLE_START] = sText_PkmnSleptHealthy, + [STRINGID_PKMNWHIPPEDWHIRLWIND - BATTLESTRINGS_TABLE_START] = sText_PkmnWhippedWhirlwind, + [STRINGID_PKMNTOOKSUNLIGHT - BATTLESTRINGS_TABLE_START] = sText_PkmnTookSunlight, + [STRINGID_PKMNLOWEREDHEAD - BATTLESTRINGS_TABLE_START] = sText_PkmnLoweredHead, + [STRINGID_PKMNISGLOWING - BATTLESTRINGS_TABLE_START] = sText_PkmnIsGlowing, + [STRINGID_PKMNFLEWHIGH - BATTLESTRINGS_TABLE_START] = sText_PkmnFlewHigh, + [STRINGID_PKMNDUGHOLE - BATTLESTRINGS_TABLE_START] = sText_PkmnDugHole, + [STRINGID_PKMNSQUEEZEDBYBIND - BATTLESTRINGS_TABLE_START] = sText_PkmnSqueezedByBind, + [STRINGID_PKMNTRAPPEDINVORTEX - BATTLESTRINGS_TABLE_START] = sText_PkmnTrappedInVortex, + [STRINGID_PKMNWRAPPEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnWrappedBy, + [STRINGID_PKMNCLAMPED - BATTLESTRINGS_TABLE_START] = sText_PkmnClamped, + [STRINGID_PKMNHURTBY - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtBy, + [STRINGID_PKMNFREEDFROM - BATTLESTRINGS_TABLE_START] = sText_PkmnFreedFrom, + [STRINGID_PKMNCRASHED - BATTLESTRINGS_TABLE_START] = sText_PkmnCrashed, + [STRINGID_PKMNSHROUDEDINMIST - BATTLESTRINGS_TABLE_START] = gText_PkmnShroudedInMist, + [STRINGID_PKMNPROTECTEDBYMIST - BATTLESTRINGS_TABLE_START] = sText_PkmnProtectedByMist, + [STRINGID_PKMNGETTINGPUMPED - BATTLESTRINGS_TABLE_START] = gText_PkmnGettingPumped, + [STRINGID_PKMNHITWITHRECOIL - BATTLESTRINGS_TABLE_START] = sText_PkmnHitWithRecoil, + [STRINGID_PKMNPROTECTEDITSELF2 - BATTLESTRINGS_TABLE_START] = sText_PkmnProtectedItself2, + [STRINGID_PKMNBUFFETEDBYSANDSTORM - BATTLESTRINGS_TABLE_START] = sText_PkmnBuffetedBySandstorm, + [STRINGID_PKMNPELTEDBYHAIL - BATTLESTRINGS_TABLE_START] = sText_PkmnPeltedByHail, + [STRINGID_PKMNSEEDED - BATTLESTRINGS_TABLE_START] = sText_PkmnSeeded, + [STRINGID_PKMNEVADEDATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnEvadedAttack, + [STRINGID_PKMNSAPPEDBYLEECHSEED - BATTLESTRINGS_TABLE_START] = sText_PkmnSappedByLeechSeed, + [STRINGID_PKMNFASTASLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnFastAsleep, + [STRINGID_PKMNWOKEUP - BATTLESTRINGS_TABLE_START] = sText_PkmnWokeUp, + [STRINGID_PKMNUPROARKEPTAWAKE - BATTLESTRINGS_TABLE_START] = sText_PkmnUproarKeptAwake, + [STRINGID_PKMNWOKEUPINUPROAR - BATTLESTRINGS_TABLE_START] = sText_PkmnWokeUpInUproar, + [STRINGID_PKMNCAUSEDUPROAR - BATTLESTRINGS_TABLE_START] = sText_PkmnCausedUproar, + [STRINGID_PKMNMAKINGUPROAR - BATTLESTRINGS_TABLE_START] = sText_PkmnMakingUproar, + [STRINGID_PKMNCALMEDDOWN - BATTLESTRINGS_TABLE_START] = sText_PkmnCalmedDown, + [STRINGID_PKMNCANTSLEEPINUPROAR - BATTLESTRINGS_TABLE_START] = sText_PkmnCantSleepInUproar, + [STRINGID_PKMNSTOCKPILED - BATTLESTRINGS_TABLE_START] = sText_PkmnStockpiled, + [STRINGID_PKMNCANTSTOCKPILE - BATTLESTRINGS_TABLE_START] = sText_PkmnCantStockpile, + [STRINGID_PKMNCANTSLEEPINUPROAR2 - BATTLESTRINGS_TABLE_START] = sText_PkmnCantSleepInUproar2, + [STRINGID_UPROARKEPTPKMNAWAKE - BATTLESTRINGS_TABLE_START] = sText_UproarKeptPkmnAwake, + [STRINGID_PKMNSTAYEDAWAKEUSING - BATTLESTRINGS_TABLE_START] = sText_PkmnStayedAwakeUsing, + [STRINGID_PKMNSTORINGENERGY - BATTLESTRINGS_TABLE_START] = sText_PkmnStoringEnergy, + [STRINGID_PKMNUNLEASHEDENERGY - BATTLESTRINGS_TABLE_START] = sText_PkmnUnleashedEnergy, + [STRINGID_PKMNFATIGUECONFUSION - BATTLESTRINGS_TABLE_START] = sText_PkmnFatigueConfusion, + [STRINGID_PLAYERPICKEDUPMONEY - BATTLESTRINGS_TABLE_START] = sText_PlayerPickedUpMoney, + [STRINGID_PKMNUNAFFECTED - BATTLESTRINGS_TABLE_START] = sText_PkmnUnaffected, + [STRINGID_PKMNTRANSFORMEDINTO - BATTLESTRINGS_TABLE_START] = sText_PkmnTransformedInto, + [STRINGID_PKMNMADESUBSTITUTE - BATTLESTRINGS_TABLE_START] = sText_PkmnMadeSubstitute, + [STRINGID_PKMNHASSUBSTITUTE - BATTLESTRINGS_TABLE_START] = sText_PkmnHasSubstitute, + [STRINGID_SUBSTITUTEDAMAGED - BATTLESTRINGS_TABLE_START] = sText_SubstituteDamaged, + [STRINGID_PKMNSUBSTITUTEFADED - BATTLESTRINGS_TABLE_START] = sText_PkmnSubstituteFaded, + [STRINGID_PKMNMUSTRECHARGE - BATTLESTRINGS_TABLE_START] = sText_PkmnMustRecharge, + [STRINGID_PKMNRAGEBUILDING - BATTLESTRINGS_TABLE_START] = sText_PkmnRageBuilding, + [STRINGID_PKMNMOVEWASDISABLED - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveWasDisabled, + [STRINGID_PKMNMOVEISDISABLED - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveIsDisabled, + [STRINGID_PKMNMOVEDISABLEDNOMORE - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveDisabledNoMore, + [STRINGID_PKMNGOTENCORE - BATTLESTRINGS_TABLE_START] = sText_PkmnGotEncore, + [STRINGID_PKMNENCOREENDED - BATTLESTRINGS_TABLE_START] = sText_PkmnEncoreEnded, + [STRINGID_PKMNTOOKAIM - BATTLESTRINGS_TABLE_START] = sText_PkmnTookAim, + [STRINGID_PKMNSKETCHEDMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnSketchedMove, + [STRINGID_PKMNTRYINGTOTAKEFOE - BATTLESTRINGS_TABLE_START] = sText_PkmnTryingToTakeFoe, + [STRINGID_PKMNTOOKFOE - BATTLESTRINGS_TABLE_START] = sText_PkmnTookFoe, + [STRINGID_PKMNREDUCEDPP - BATTLESTRINGS_TABLE_START] = sText_PkmnReducedPP, + [STRINGID_PKMNSTOLEITEM - BATTLESTRINGS_TABLE_START] = sText_PkmnStoleItem, + [STRINGID_TARGETCANTESCAPENOW - BATTLESTRINGS_TABLE_START] = sText_TargetCantEscapeNow, + [STRINGID_PKMNFELLINTONIGHTMARE - BATTLESTRINGS_TABLE_START] = sText_PkmnFellIntoNightmare, + [STRINGID_PKMNLOCKEDINNIGHTMARE - BATTLESTRINGS_TABLE_START] = sText_PkmnLockedInNightmare, + [STRINGID_PKMNLAIDCURSE - BATTLESTRINGS_TABLE_START] = sText_PkmnLaidCurse, + [STRINGID_PKMNAFFLICTEDBYCURSE - BATTLESTRINGS_TABLE_START] = sText_PkmnAfflictedByCurse, + [STRINGID_SPIKESSCATTERED - BATTLESTRINGS_TABLE_START] = sText_SpikesScattered, + [STRINGID_PKMNHURTBYSPIKES - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtBySpikes, + [STRINGID_PKMNIDENTIFIED - BATTLESTRINGS_TABLE_START] = sText_PkmnIdentified, + [STRINGID_PKMNPERISHCOUNTFELL - BATTLESTRINGS_TABLE_START] = sText_PkmnPerishCountFell, + [STRINGID_PKMNBRACEDITSELF - BATTLESTRINGS_TABLE_START] = sText_PkmnBracedItself, + [STRINGID_PKMNENDUREDHIT - BATTLESTRINGS_TABLE_START] = sText_PkmnEnduredHit, + [STRINGID_MAGNITUDESTRENGTH - BATTLESTRINGS_TABLE_START] = sText_MagnitudeStrength, + [STRINGID_PKMNCUTHPMAXEDATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnCutHPMaxedAttack, + [STRINGID_PKMNCOPIEDSTATCHANGES - BATTLESTRINGS_TABLE_START] = sText_PkmnCopiedStatChanges, + [STRINGID_PKMNGOTFREE - BATTLESTRINGS_TABLE_START] = sText_PkmnGotFree, + [STRINGID_PKMNSHEDLEECHSEED - BATTLESTRINGS_TABLE_START] = sText_PkmnShedLeechSeed, + [STRINGID_PKMNBLEWAWAYSPIKES - BATTLESTRINGS_TABLE_START] = sText_PkmnBlewAwaySpikes, + [STRINGID_PKMNFLEDFROMBATTLE - BATTLESTRINGS_TABLE_START] = sText_PkmnFledFromBattle, + [STRINGID_PKMNFORESAWATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnForesawAttack, + [STRINGID_PKMNTOOKATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnTookAttack, + [STRINGID_PKMNATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnAttack, + [STRINGID_PKMNCENTERATTENTION - BATTLESTRINGS_TABLE_START] = sText_PkmnCenterAttention, + [STRINGID_PKMNCHARGINGPOWER - BATTLESTRINGS_TABLE_START] = sText_PkmnChargingPower, + [STRINGID_NATUREPOWERTURNEDINTO - BATTLESTRINGS_TABLE_START] = sText_NaturePowerTurnedInto, + [STRINGID_PKMNSTATUSNORMAL - BATTLESTRINGS_TABLE_START] = sText_PkmnStatusNormal, + [STRINGID_PKMNHASNOMOVESLEFT - BATTLESTRINGS_TABLE_START] = sText_PkmnHasNoMovesLeft, + [STRINGID_PKMNSUBJECTEDTOTORMENT - BATTLESTRINGS_TABLE_START] = sText_PkmnSubjectedToTorment, + [STRINGID_PKMNCANTUSEMOVETORMENT - BATTLESTRINGS_TABLE_START] = sText_PkmnCantUseMoveTorment, + [STRINGID_PKMNTIGHTENINGFOCUS - BATTLESTRINGS_TABLE_START] = sText_PkmnTighteningFocus, + [STRINGID_PKMNFELLFORTAUNT - BATTLESTRINGS_TABLE_START] = sText_PkmnFellForTaunt, + [STRINGID_PKMNCANTUSEMOVETAUNT - BATTLESTRINGS_TABLE_START] = sText_PkmnCantUseMoveTaunt, + [STRINGID_PKMNREADYTOHELP - BATTLESTRINGS_TABLE_START] = sText_PkmnReadyToHelp, + [STRINGID_PKMNSWITCHEDITEMS - BATTLESTRINGS_TABLE_START] = sText_PkmnSwitchedItems, + [STRINGID_PKMNCOPIEDFOE - BATTLESTRINGS_TABLE_START] = sText_PkmnCopiedFoe, + [STRINGID_PKMNMADEWISH - BATTLESTRINGS_TABLE_START] = sText_PkmnMadeWish, + [STRINGID_PKMNWISHCAMETRUE - BATTLESTRINGS_TABLE_START] = sText_PkmnWishCameTrue, + [STRINGID_PKMNPLANTEDROOTS - BATTLESTRINGS_TABLE_START] = sText_PkmnPlantedRoots, + [STRINGID_PKMNABSORBEDNUTRIENTS - BATTLESTRINGS_TABLE_START] = sText_PkmnAbsorbedNutrients, + [STRINGID_PKMNANCHOREDITSELF - BATTLESTRINGS_TABLE_START] = sText_PkmnAnchoredItself, + [STRINGID_PKMNWASMADEDROWSY - BATTLESTRINGS_TABLE_START] = sText_PkmnWasMadeDrowsy, + [STRINGID_PKMNKNOCKEDOFF - BATTLESTRINGS_TABLE_START] = sText_PkmnKnockedOff, + [STRINGID_PKMNSWAPPEDABILITIES - BATTLESTRINGS_TABLE_START] = sText_PkmnSwappedAbilities, + [STRINGID_PKMNSEALEDOPPONENTMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnSealedOpponentMove, + [STRINGID_PKMNCANTUSEMOVESEALED - BATTLESTRINGS_TABLE_START] = sText_PkmnCantUseMoveSealed, + [STRINGID_PKMNWANTSGRUDGE - BATTLESTRINGS_TABLE_START] = sText_PkmnWantsGrudge, + [STRINGID_PKMNLOSTPPGRUDGE - BATTLESTRINGS_TABLE_START] = sText_PkmnLostPPGrudge, + [STRINGID_PKMNSHROUDEDITSELF - BATTLESTRINGS_TABLE_START] = sText_PkmnShroudedItself, + [STRINGID_PKMNMOVEBOUNCED - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveBounced, + [STRINGID_PKMNWAITSFORTARGET - BATTLESTRINGS_TABLE_START] = sText_PkmnWaitsForTarget, + [STRINGID_PKMNSNATCHEDMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnSnatchedMove, + [STRINGID_PKMNMADEITRAIN - BATTLESTRINGS_TABLE_START] = sText_PkmnMadeItRain, + [STRINGID_PKMNRAISEDSPEED - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedSpeed, + [STRINGID_PKMNPROTECTEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnProtectedBy, + [STRINGID_PKMNPREVENTSUSAGE - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsUsage, + [STRINGID_PKMNRESTOREDHPUSING - BATTLESTRINGS_TABLE_START] = sText_PkmnRestoredHPUsing, + [STRINGID_PKMNCHANGEDTYPEWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnChangedTypeWith, + [STRINGID_PKMNPREVENTSPARALYSISWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsParalysisWith, + [STRINGID_PKMNPREVENTSROMANCEWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsRomanceWith, + [STRINGID_PKMNPREVENTSPOISONINGWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsPoisoningWith, + [STRINGID_PKMNPREVENTSCONFUSIONWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsConfusionWith, + [STRINGID_PKMNRAISEDFIREPOWERWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedFirePowerWith, + [STRINGID_PKMNANCHORSITSELFWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnAnchorsItselfWith, + [STRINGID_PKMNCUTSATTACKWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnCutsAttackWith, + [STRINGID_PKMNPREVENTSSTATLOSSWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsStatLossWith, + [STRINGID_PKMNHURTSWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtsWith, + [STRINGID_PKMNTRACED - BATTLESTRINGS_TABLE_START] = sText_PkmnTraced, + [STRINGID_STATSHARPLY - BATTLESTRINGS_TABLE_START] = sText_StatSharply, + [STRINGID_STATROSE - BATTLESTRINGS_TABLE_START] = gText_StatRose, + [STRINGID_STATHARSHLY - BATTLESTRINGS_TABLE_START] = sText_StatHarshly, + [STRINGID_STATFELL - BATTLESTRINGS_TABLE_START] = sText_StatFell, + [STRINGID_ATTACKERSSTATROSE - BATTLESTRINGS_TABLE_START] = sText_AttackersStatRose, + [STRINGID_DEFENDERSSTATROSE - BATTLESTRINGS_TABLE_START] = gText_DefendersStatRose, + [STRINGID_ATTACKERSSTATFELL - BATTLESTRINGS_TABLE_START] = sText_AttackersStatFell, + [STRINGID_DEFENDERSSTATFELL - BATTLESTRINGS_TABLE_START] = sText_DefendersStatFell, + [STRINGID_CRITICALHIT - BATTLESTRINGS_TABLE_START] = sText_CriticalHit, + [STRINGID_ONEHITKO - BATTLESTRINGS_TABLE_START] = sText_OneHitKO, + [STRINGID_123POOF - BATTLESTRINGS_TABLE_START] = sText_123Poof, + [STRINGID_ANDELLIPSIS - BATTLESTRINGS_TABLE_START] = sText_AndEllipsis, + [STRINGID_NOTVERYEFFECTIVE - BATTLESTRINGS_TABLE_START] = sText_NotVeryEffective, + [STRINGID_SUPEREFFECTIVE - BATTLESTRINGS_TABLE_START] = sText_SuperEffective, + [STRINGID_GOTAWAYSAFELY - BATTLESTRINGS_TABLE_START] = sText_GotAwaySafely, + [STRINGID_WILDPKMNFLED - BATTLESTRINGS_TABLE_START] = sText_WildPkmnFled, + [STRINGID_NORUNNINGFROMTRAINERS - BATTLESTRINGS_TABLE_START] = sText_NoRunningFromTrainers, + [STRINGID_CANTESCAPE - BATTLESTRINGS_TABLE_START] = sText_CantEscape, + [STRINGID_DONTLEAVEBIRCH - BATTLESTRINGS_TABLE_START] = sText_DontLeaveBirch, + [STRINGID_BUTNOTHINGHAPPENED - BATTLESTRINGS_TABLE_START] = sText_ButNothingHappened, + [STRINGID_BUTITFAILED - BATTLESTRINGS_TABLE_START] = sText_ButItFailed, + [STRINGID_ITHURTCONFUSION - BATTLESTRINGS_TABLE_START] = sText_ItHurtConfusion, + [STRINGID_MIRRORMOVEFAILED - BATTLESTRINGS_TABLE_START] = sText_MirrorMoveFailed, + [STRINGID_STARTEDTORAIN - BATTLESTRINGS_TABLE_START] = sText_StartedToRain, + [STRINGID_DOWNPOURSTARTED - BATTLESTRINGS_TABLE_START] = sText_DownpourStarted, + [STRINGID_RAINCONTINUES - BATTLESTRINGS_TABLE_START] = sText_RainContinues, + [STRINGID_DOWNPOURCONTINUES - BATTLESTRINGS_TABLE_START] = sText_DownpourContinues, + [STRINGID_RAINSTOPPED - BATTLESTRINGS_TABLE_START] = sText_RainStopped, + [STRINGID_SANDSTORMBREWED - BATTLESTRINGS_TABLE_START] = sText_SandstormBrewed, + [STRINGID_SANDSTORMRAGES - BATTLESTRINGS_TABLE_START] = sText_SandstormRages, + [STRINGID_SANDSTORMSUBSIDED - BATTLESTRINGS_TABLE_START] = sText_SandstormSubsided, + [STRINGID_SUNLIGHTGOTBRIGHT - BATTLESTRINGS_TABLE_START] = sText_SunlightGotBright, + [STRINGID_SUNLIGHTSTRONG - BATTLESTRINGS_TABLE_START] = sText_SunlightStrong, + [STRINGID_SUNLIGHTFADED - BATTLESTRINGS_TABLE_START] = sText_SunlightFaded, + [STRINGID_STARTEDHAIL - BATTLESTRINGS_TABLE_START] = sText_StartedHail, + [STRINGID_HAILCONTINUES - BATTLESTRINGS_TABLE_START] = sText_HailContinues, + [STRINGID_HAILSTOPPED - BATTLESTRINGS_TABLE_START] = sText_HailStopped, + [STRINGID_FAILEDTOSPITUP - BATTLESTRINGS_TABLE_START] = sText_FailedToSpitUp, + [STRINGID_FAILEDTOSWALLOW - BATTLESTRINGS_TABLE_START] = sText_FailedToSwallow, + [STRINGID_WINDBECAMEHEATWAVE - BATTLESTRINGS_TABLE_START] = sText_WindBecameHeatWave, + [STRINGID_STATCHANGESGONE - BATTLESTRINGS_TABLE_START] = sText_StatChangesGone, + [STRINGID_COINSSCATTERED - BATTLESTRINGS_TABLE_START] = sText_CoinsScattered, + [STRINGID_TOOWEAKFORSUBSTITUTE - BATTLESTRINGS_TABLE_START] = sText_TooWeakForSubstitute, + [STRINGID_SHAREDPAIN - BATTLESTRINGS_TABLE_START] = sText_SharedPain, + [STRINGID_BELLCHIMED - BATTLESTRINGS_TABLE_START] = sText_BellChimed, + [STRINGID_FAINTINTHREE - BATTLESTRINGS_TABLE_START] = sText_FaintInThree, + [STRINGID_NOPPLEFT - BATTLESTRINGS_TABLE_START] = sText_NoPPLeft, + [STRINGID_BUTNOPPLEFT - BATTLESTRINGS_TABLE_START] = sText_ButNoPPLeft, + [STRINGID_PLAYERUSEDITEM - BATTLESTRINGS_TABLE_START] = sText_PlayerUsedItem, + [STRINGID_WALLYUSEDITEM - BATTLESTRINGS_TABLE_START] = sText_WallyUsedItem, + [STRINGID_TRAINERBLOCKEDBALL - BATTLESTRINGS_TABLE_START] = sText_TrainerBlockedBall, + [STRINGID_DONTBEATHIEF - BATTLESTRINGS_TABLE_START] = sText_DontBeAThief, + [STRINGID_ITDODGEDBALL - BATTLESTRINGS_TABLE_START] = sText_ItDodgedBall, + [STRINGID_YOUMISSEDPKMN - BATTLESTRINGS_TABLE_START] = sText_YouMissedPkmn, + [STRINGID_PKMNBROKEFREE - BATTLESTRINGS_TABLE_START] = sText_PkmnBrokeFree, + [STRINGID_ITAPPEAREDCAUGHT - BATTLESTRINGS_TABLE_START] = sText_ItAppearedCaught, + [STRINGID_AARGHALMOSTHADIT - BATTLESTRINGS_TABLE_START] = sText_AarghAlmostHadIt, + [STRINGID_SHOOTSOCLOSE - BATTLESTRINGS_TABLE_START] = sText_ShootSoClose, + [STRINGID_GOTCHAPKMNCAUGHT - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaught, + [STRINGID_GOTCHAPKMNCAUGHT2 - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaught2, + [STRINGID_GIVENICKNAMECAPTURED - BATTLESTRINGS_TABLE_START] = sText_GiveNicknameCaptured, + [STRINGID_PKMNSENTTOPC - BATTLESTRINGS_TABLE_START] = sText_PkmnSentToPC, + [STRINGID_PKMNDATAADDEDTODEX - BATTLESTRINGS_TABLE_START] = sText_PkmnDataAddedToDex, + [STRINGID_ITISRAINING - BATTLESTRINGS_TABLE_START] = sText_ItIsRaining, + [STRINGID_SANDSTORMISRAGING - BATTLESTRINGS_TABLE_START] = sText_SandstormIsRaging, + [STRINGID_CANTESCAPE2 - BATTLESTRINGS_TABLE_START] = sText_CantEscape2, + [STRINGID_PKMNIGNORESASLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnIgnoresAsleep, + [STRINGID_PKMNIGNOREDORDERS - BATTLESTRINGS_TABLE_START] = sText_PkmnIgnoredOrders, + [STRINGID_PKMNBEGANTONAP - BATTLESTRINGS_TABLE_START] = sText_PkmnBeganToNap, + [STRINGID_PKMNLOAFING - BATTLESTRINGS_TABLE_START] = sText_PkmnLoafing, + [STRINGID_PKMNWONTOBEY - BATTLESTRINGS_TABLE_START] = sText_PkmnWontObey, + [STRINGID_PKMNTURNEDAWAY - BATTLESTRINGS_TABLE_START] = sText_PkmnTurnedAway, + [STRINGID_PKMNPRETENDNOTNOTICE - BATTLESTRINGS_TABLE_START] = sText_PkmnPretendNotNotice, + [STRINGID_ENEMYABOUTTOSWITCHPKMN - BATTLESTRINGS_TABLE_START] = sText_EnemyAboutToSwitchPkmn, + [STRINGID_CREPTCLOSER - BATTLESTRINGS_TABLE_START] = sText_CreptCloser, + [STRINGID_CANTGETCLOSER - BATTLESTRINGS_TABLE_START] = sText_CantGetCloser, + [STRINGID_PKMNWATCHINGCAREFULLY - BATTLESTRINGS_TABLE_START] = sText_PkmnWatchingCarefully, + [STRINGID_PKMNCURIOUSABOUTX - BATTLESTRINGS_TABLE_START] = sText_PkmnCuriousAboutX, + [STRINGID_PKMNENTHRALLEDBYX - BATTLESTRINGS_TABLE_START] = sText_PkmnEnthralledByX, + [STRINGID_PKMNIGNOREDX - BATTLESTRINGS_TABLE_START] = sText_PkmnIgnoredX, + [STRINGID_THREWPOKEBLOCKATPKMN - BATTLESTRINGS_TABLE_START] = sText_ThrewPokeblockAtPkmn, + [STRINGID_OUTOFSAFARIBALLS - BATTLESTRINGS_TABLE_START] = sText_OutOfSafariBalls, + [STRINGID_PKMNSITEMCUREDPARALYSIS - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemCuredParalysis, + [STRINGID_PKMNSITEMCUREDPOISON - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemCuredPoison, + [STRINGID_PKMNSITEMHEALEDBURN - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemHealedBurn, + [STRINGID_PKMNSITEMDEFROSTEDIT - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemDefrostedIt, + [STRINGID_PKMNSITEMWOKEIT - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemWokeIt, + [STRINGID_PKMNSITEMSNAPPEDOUT - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemSnappedOut, + [STRINGID_PKMNSITEMCUREDPROBLEM - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemCuredProblem, + [STRINGID_PKMNSITEMRESTOREDHEALTH - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemRestoredHealth, + [STRINGID_PKMNSITEMRESTOREDPP - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemRestoredPP, + [STRINGID_PKMNSITEMRESTOREDSTATUS - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemRestoredStatus, + [STRINGID_PKMNSITEMRESTOREDHPALITTLE - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemRestoredHPALittle, + [STRINGID_ITEMALLOWSONLYYMOVE - BATTLESTRINGS_TABLE_START] = sText_ItemAllowsOnlyYMove, + [STRINGID_PKMNHUNGONWITHX - BATTLESTRINGS_TABLE_START] = sText_PkmnHungOnWithX, + [STRINGID_EMPTYSTRING3 - BATTLESTRINGS_TABLE_START] = gText_EmptyString3, + [STRINGID_PKMNSXPREVENTSBURNS - BATTLESTRINGS_TABLE_START] = sText_PkmnsXPreventsBurns, + [STRINGID_PKMNSXBLOCKSY - BATTLESTRINGS_TABLE_START] = sText_PkmnsXBlocksY, + [STRINGID_PKMNSXRESTOREDHPALITTLE2 - BATTLESTRINGS_TABLE_START] = sText_PkmnsXRestoredHPALittle2, + [STRINGID_PKMNSXWHIPPEDUPSANDSTORM - BATTLESTRINGS_TABLE_START] = sText_PkmnsXWhippedUpSandstorm, + [STRINGID_PKMNSXPREVENTSYLOSS - BATTLESTRINGS_TABLE_START] = sText_PkmnsXPreventsYLoss, + [STRINGID_PKMNSXINFATUATEDY - BATTLESTRINGS_TABLE_START] = sText_PkmnsXInfatuatedY, + [STRINGID_PKMNSXMADEYINEFFECTIVE - BATTLESTRINGS_TABLE_START] = sText_PkmnsXMadeYIneffective, + [STRINGID_PKMNSXCUREDYPROBLEM - BATTLESTRINGS_TABLE_START] = sText_PkmnsXCuredYProblem, + [STRINGID_ITSUCKEDLIQUIDOOZE - BATTLESTRINGS_TABLE_START] = sText_ItSuckedLiquidOoze, + [STRINGID_PKMNTRANSFORMED - BATTLESTRINGS_TABLE_START] = sText_PkmnTransformed, + [STRINGID_ELECTRICITYWEAKENED - BATTLESTRINGS_TABLE_START] = sText_ElectricityWeakened, + [STRINGID_FIREWEAKENED - BATTLESTRINGS_TABLE_START] = sText_FireWeakened, + [STRINGID_PKMNHIDUNDERWATER - BATTLESTRINGS_TABLE_START] = sText_PkmnHidUnderwater, + [STRINGID_PKMNSPRANGUP - BATTLESTRINGS_TABLE_START] = sText_PkmnSprangUp, + [STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_TABLE_START] = sText_HMMovesCantBeForgotten, + [STRINGID_XFOUNDONEY - BATTLESTRINGS_TABLE_START] = sText_XFoundOneY, + [STRINGID_PLAYERDEFEATEDTRAINER1 - BATTLESTRINGS_TABLE_START] = sText_PlayerDefeatedLinkTrainerTrainer1, + [STRINGID_SOOTHINGAROMA - BATTLESTRINGS_TABLE_START] = sText_SoothingAroma, + [STRINGID_ITEMSCANTBEUSEDNOW - BATTLESTRINGS_TABLE_START] = sText_ItemsCantBeUsedNow, + [STRINGID_FORXCOMMAYZ - BATTLESTRINGS_TABLE_START] = sText_ForXCommaYZ, + [STRINGID_USINGITEMSTATOFPKMNROSE - BATTLESTRINGS_TABLE_START] = sText_UsingItemTheStatOfPkmnRose, + [STRINGID_PKMNUSEDXTOGETPUMPED - BATTLESTRINGS_TABLE_START] = sText_PkmnUsedXToGetPumped, + [STRINGID_PKMNSXMADEYUSELESS - BATTLESTRINGS_TABLE_START] = sText_PkmnsXMadeYUseless, + [STRINGID_PKMNTRAPPEDBYSANDTOMB - BATTLESTRINGS_TABLE_START] = sText_PkmnTrappedBySandTomb, + [STRINGID_EMPTYSTRING4 - BATTLESTRINGS_TABLE_START] = sText_EmptyString4, + [STRINGID_ABOOSTED - BATTLESTRINGS_TABLE_START] = sText_ABoosted, + [STRINGID_PKMNSXINTENSIFIEDSUN - BATTLESTRINGS_TABLE_START] = sText_PkmnsXIntensifiedSun, + [STRINGID_PKMNMAKESGROUNDMISS - BATTLESTRINGS_TABLE_START] = sText_PkmnMakesGroundMiss, + [STRINGID_YOUTHROWABALLNOWRIGHT - BATTLESTRINGS_TABLE_START] = sText_YouThrowABallNowRight, + [STRINGID_PKMNSXTOOKATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnsXTookAttack, + [STRINGID_PKMNCHOSEXASDESTINY - BATTLESTRINGS_TABLE_START] = sText_PkmnChoseXAsDestiny, + [STRINGID_PKMNLOSTFOCUS - BATTLESTRINGS_TABLE_START] = sText_PkmnLostFocus, + [STRINGID_USENEXTPKMN - BATTLESTRINGS_TABLE_START] = sText_UseNextPkmn, + [STRINGID_PKMNFLEDUSINGITS - BATTLESTRINGS_TABLE_START] = sText_PkmnFledUsingIts, + [STRINGID_PKMNFLEDUSING - BATTLESTRINGS_TABLE_START] = sText_PkmnFledUsing, + [STRINGID_PKMNWASDRAGGEDOUT - BATTLESTRINGS_TABLE_START] = sText_PkmnWasDraggedOut, + [STRINGID_PREVENTEDFROMWORKING - BATTLESTRINGS_TABLE_START] = sText_PreventedFromWorking, + [STRINGID_PKMNSITEMNORMALIZEDSTATUS - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemNormalizedStatus, + [STRINGID_TRAINER1USEDITEM - BATTLESTRINGS_TABLE_START] = sText_Trainer1UsedItem, + [STRINGID_BOXISFULL - BATTLESTRINGS_TABLE_START] = sText_BoxIsFull, + [STRINGID_PKMNAVOIDEDATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnAvoidedAttack, + [STRINGID_PKMNSXMADEITINEFFECTIVE - BATTLESTRINGS_TABLE_START] = sText_PkmnsXMadeItIneffective, + [STRINGID_PKMNSXPREVENTSFLINCHING - BATTLESTRINGS_TABLE_START] = sText_PkmnsXPreventsFlinching, + [STRINGID_PKMNALREADYHASBURN - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyHasBurn, + [STRINGID_STATSWONTDECREASE2 - BATTLESTRINGS_TABLE_START] = sText_StatsWontDecrease2, + [STRINGID_PKMNSXBLOCKSY2 - BATTLESTRINGS_TABLE_START] = sText_PkmnsXBlocksY2, + [STRINGID_PKMNSXWOREOFF - BATTLESTRINGS_TABLE_START] = sText_PkmnsXWoreOff, + [STRINGID_PKMNRAISEDDEFALITTLE - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedDefALittle, + [STRINGID_PKMNRAISEDSPDEFALITTLE - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedSpDefALittle, + [STRINGID_THEWALLSHATTERED - BATTLESTRINGS_TABLE_START] = sText_TheWallShattered, + [STRINGID_PKMNSXPREVENTSYSZ - BATTLESTRINGS_TABLE_START] = sText_PkmnsXPreventsYsZ, + [STRINGID_PKMNSXCUREDITSYPROBLEM - BATTLESTRINGS_TABLE_START] = sText_PkmnsXCuredItsYProblem, + [STRINGID_ATTACKERCANTESCAPE - BATTLESTRINGS_TABLE_START] = sText_AttackerCantEscape, + [STRINGID_PKMNOBTAINEDX - BATTLESTRINGS_TABLE_START] = sText_PkmnObtainedX, + [STRINGID_PKMNOBTAINEDX2 - BATTLESTRINGS_TABLE_START] = sText_PkmnObtainedX2, + [STRINGID_PKMNOBTAINEDXYOBTAINEDZ - BATTLESTRINGS_TABLE_START] = sText_PkmnObtainedXYObtainedZ, + [STRINGID_BUTNOEFFECT - BATTLESTRINGS_TABLE_START] = sText_ButNoEffect, + [STRINGID_PKMNSXHADNOEFFECTONY - BATTLESTRINGS_TABLE_START] = sText_PkmnsXHadNoEffectOnY, + [STRINGID_TWOENEMIESDEFEATED - BATTLESTRINGS_TABLE_START] = sText_TwoInGameTrainersDefeated, + [STRINGID_TRAINER2LOSETEXT - BATTLESTRINGS_TABLE_START] = sText_Trainer2LoseText, + [STRINGID_PKMNINCAPABLEOFPOWER - BATTLESTRINGS_TABLE_START] = sText_PkmnIncapableOfPower, + [STRINGID_GLINTAPPEARSINEYE - BATTLESTRINGS_TABLE_START] = sText_GlintAppearsInEye, + [STRINGID_PKMNGETTINGINTOPOSITION - BATTLESTRINGS_TABLE_START] = sText_PkmnGettingIntoPosition, + [STRINGID_PKMNBEGANGROWLINGDEEPLY - BATTLESTRINGS_TABLE_START] = sText_PkmnBeganGrowlingDeeply, + [STRINGID_PKMNEAGERFORMORE - BATTLESTRINGS_TABLE_START] = sText_PkmnEagerForMore, + [STRINGID_DEFEATEDOPPONENTBYREFEREE - BATTLESTRINGS_TABLE_START] = sText_DefeatedOpponentByReferee, + [STRINGID_LOSTTOOPPONENTBYREFEREE - BATTLESTRINGS_TABLE_START] = sText_LostToOpponentByReferee, + [STRINGID_TIEDOPPONENTBYREFEREE - BATTLESTRINGS_TABLE_START] = sText_TiedOpponentByReferee, + [STRINGID_QUESTIONFORFEITMATCH - BATTLESTRINGS_TABLE_START] = sText_QuestionForfeitMatch, + [STRINGID_FORFEITEDMATCH - BATTLESTRINGS_TABLE_START] = sText_ForfeitedMatch, + [STRINGID_PKMNTRANSFERREDSOMEONESPC - BATTLESTRINGS_TABLE_START] = gText_PkmnTransferredSomeonesPC, + [STRINGID_PKMNTRANSFERREDLANETTESPC - BATTLESTRINGS_TABLE_START] = gText_PkmnTransferredLanettesPC, + [STRINGID_PKMNBOXSOMEONESPCFULL - BATTLESTRINGS_TABLE_START] = gText_PkmnTransferredSomeonesPCBoxFull, + [STRINGID_PKMNBOXLANETTESPCFULL - BATTLESTRINGS_TABLE_START] = gText_PkmnTransferredLanettesPCBoxFull, + [STRINGID_TRAINER1WINTEXT - BATTLESTRINGS_TABLE_START] = sText_Trainer1WinText, + [STRINGID_TRAINER2WINTEXT - BATTLESTRINGS_TABLE_START] = sText_Trainer2WinText, }; const u16 gMissStringIds[] = @@ -2331,14 +2331,14 @@ void BufferStringBattle(u16 stringID) } break; default: // load a string from the table - if (stringID >= BATTLESTRINGS_COUNT + BATTLESTRINGS_ID_ADDER) + if (stringID >= BATTLESTRINGS_COUNT) { gDisplayedStringBattle[0] = EOS; return; } else { - stringPtr = gBattleStringsTable[stringID - BATTLESTRINGS_ID_ADDER]; + stringPtr = gBattleStringsTable[stringID - BATTLESTRINGS_TABLE_START]; } break; } @@ -2862,7 +2862,7 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst) { case B_BUFF_STRING: // battle string hword = T1_READ_16(&src[srcID + 1]); - StringAppend(dst, gBattleStringsTable[hword - BATTLESTRINGS_ID_ADDER]); + StringAppend(dst, gBattleStringsTable[hword - BATTLESTRINGS_TABLE_START]); srcID += 3; break; case B_BUFF_NUMBER: // int to string diff --git a/src/battle_tv.c b/src/battle_tv.c index f65bf73ea0..b9008b47a7 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -570,7 +570,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId) moveSlot = GetBattlerMoveSlotId(gBattlerAttacker, gBattleMsgDataPtr->currentMove); - if (moveSlot >= MAX_MON_MOVES && IsNotSpecialBattleString(stringId) && stringId > BATTLESTRINGS_ID_ADDER) + if (moveSlot >= MAX_MON_MOVES && IsNotSpecialBattleString(stringId) && stringId > BATTLESTRINGS_TABLE_START) { tvPtr->side[atkSide].faintCause = FNT_OTHER; return; diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 327e48d195..bde11ddb5e 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -855,7 +855,7 @@ static void Task_EvolutionScene(u8 taskId) { BufferMoveToLearnIntoBattleTextBuff2(); PlayFanfare(MUS_LEVEL_UP); - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnsFirstMove = 0x40; // re-used as a counter gTasks[taskId].tState++; @@ -873,7 +873,7 @@ static void Task_EvolutionScene(u8 taskId) { // "{mon} is trying to learn {move}" BufferMoveToLearnIntoBattleTextBuff2(); - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState++; } @@ -882,7 +882,7 @@ static void Task_EvolutionScene(u8 taskId) if (!IsTextPrinterActive(0) && !IsSEPlaying()) { // "But, {mon} can't learn more than four moves" - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState++; } @@ -891,7 +891,7 @@ static void Task_EvolutionScene(u8 taskId) if (!IsTextPrinterActive(0) && !IsSEPlaying()) { // "Delete a move to make room for {move}?" - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveYesState = MVSTATE_SHOW_MOVE_SELECT; gTasks[taskId].tLearnMoveNoState = MVSTATE_ASK_CANCEL; @@ -979,7 +979,7 @@ static void Task_EvolutionScene(u8 taskId) if (IsHMMove2(move)) { // Can't forget HMs - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState = MVSTATE_RETRY_AFTER_HM; } @@ -996,14 +996,14 @@ static void Task_EvolutionScene(u8 taskId) } break; case MVSTATE_FORGET_MSG_1: - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState++; break; case MVSTATE_FORGET_MSG_2: if (!IsTextPrinterActive(0) && !IsSEPlaying()) { - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveState++; } @@ -1011,20 +1011,20 @@ static void Task_EvolutionScene(u8 taskId) case MVSTATE_LEARNED_MOVE: if (!IsTextPrinterActive(0) && !IsSEPlaying()) { - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tState = EVOSTATE_LEARNED_MOVE; } break; case MVSTATE_ASK_CANCEL: - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tLearnMoveYesState = MVSTATE_CANCEL; gTasks[taskId].tLearnMoveNoState = MVSTATE_INTRO_MSG_1; gTasks[taskId].tLearnMoveState = MVSTATE_PRINT_YES_NO; break; case MVSTATE_CANCEL: - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_TABLE_START]); BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gTasks[taskId].tState = EVOSTATE_TRY_LEARN_MOVE; break; @@ -1258,7 +1258,7 @@ static void Task_TradeEvolutionScene(u8 taskId) { BufferMoveToLearnIntoBattleTextBuff2(); PlayFanfare(MUS_LEVEL_UP); - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnsFirstMove = 0x40; // re-used as a counter gTasks[taskId].tState++; @@ -1276,7 +1276,7 @@ static void Task_TradeEvolutionScene(u8 taskId) { // "{mon} is trying to learn {move}" BufferMoveToLearnIntoBattleTextBuff2(); - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveState++; } @@ -1285,7 +1285,7 @@ static void Task_TradeEvolutionScene(u8 taskId) if (!IsTextPrinterActive(0) && !IsSEPlaying()) { // "But, {mon} can't learn more than four moves" - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveState++; } @@ -1294,7 +1294,7 @@ static void Task_TradeEvolutionScene(u8 taskId) if (!IsTextPrinterActive(0) && !IsSEPlaying()) { // "Delete a move to make room for {move}?" - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveYesState = T_MVSTATE_SHOW_MOVE_SELECT; gTasks[taskId].tLearnMoveNoState = T_MVSTATE_ASK_CANCEL; @@ -1315,7 +1315,7 @@ static void Task_TradeEvolutionScene(u8 taskId) { case 0: // YES sEvoCursorPos = 0; - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveYesState; if (gTasks[taskId].tLearnMoveState == T_MVSTATE_SHOW_MOVE_SELECT) @@ -1324,7 +1324,7 @@ static void Task_TradeEvolutionScene(u8 taskId) case 1: // NO case MENU_B_PRESSED: sEvoCursorPos = 1; - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_EMPTYSTRING3 - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveNoState; break; @@ -1363,7 +1363,7 @@ static void Task_TradeEvolutionScene(u8 taskId) if (IsHMMove2(move)) { // Can't forget HMs - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveState = T_MVSTATE_RETRY_AFTER_HM; } @@ -1374,7 +1374,7 @@ static void Task_TradeEvolutionScene(u8 taskId) RemoveMonPPBonus(mon, var); SetMonMoveSlot(mon, gMoveToLearn, var); - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_123POOF - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveState++; } @@ -1384,7 +1384,7 @@ static void Task_TradeEvolutionScene(u8 taskId) case T_MVSTATE_FORGET_MSG: if (!IsTextPrinterActive(0) && !IsSEPlaying()) { - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveState++; } @@ -1392,20 +1392,20 @@ static void Task_TradeEvolutionScene(u8 taskId) case T_MVSTATE_LEARNED_MOVE: if (!IsTextPrinterActive(0) && !IsSEPlaying()) { - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_ANDELLIPSIS - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tState = T_EVOSTATE_LEARNED_MOVE; } break; case T_MVSTATE_ASK_CANCEL: - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tLearnMoveYesState = T_MVSTATE_CANCEL; gTasks[taskId].tLearnMoveNoState = T_MVSTATE_INTRO_MSG_1; gTasks[taskId].tLearnMoveState = T_MVSTATE_PRINT_YES_NO; break; case T_MVSTATE_CANCEL: - BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_ID_ADDER]); + BattleStringExpandPlaceholdersToDisplayedString(gBattleStringsTable[STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_TABLE_START]); DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1); gTasks[taskId].tState = T_EVOSTATE_TRY_LEARN_MOVE; break; From bb91b1b0d1cf70fa49cb0b1f2a309ad541927164 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 10 Mar 2022 16:36:41 -0500 Subject: [PATCH 404/417] Update generic macro argument names --- asm/macros/event.inc | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 58e37d0a6a..661e675c97 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -828,10 +828,10 @@ .endm @ Sets the movement type (MOVEMENT_TYPE_*) for an object's template. - .macro setobjectmovementtype word:req, byte:req + .macro setobjectmovementtype localId:req, movementType:req .byte 0x65 - .2byte \word - .byte \byte + .2byte \localId + .byte \movementType .endm @ If a standard message box (or its text) is being drawn on-screen, this command blocks script execution until the @@ -1451,48 +1451,48 @@ .endm @ Equivalent to goto using the relative address set by setvaddress. - .macro vgoto pointer:req + .macro vgoto destination:req .byte 0xb9 - .4byte \pointer + .4byte \destination .endm @ Equivalent to call using the relative address set by setvaddress. - .macro vcall pointer:req + .macro vcall destination:req .byte 0xba - .4byte \pointer + .4byte \destination .endm @ Equivalent to goto_if using the relative address set by setvaddress. - .macro vgoto_if byte:req, pointer:req + .macro vgoto_if condition:req, destination:req .byte 0xbb - .byte \byte - .4byte \pointer + .byte \condition + .4byte \destination .endm @ Equivalent to call_if using the relative address set by setvaddress. - .macro vcall_if byte:req, pointer:req + .macro vcall_if condition:req, destination:req .byte 0xbc - .byte \byte - .4byte \pointer + .byte \condition + .4byte \destination .endm @ Equivalent to message using the relative address set by setvaddress. - .macro vmessage pointer:req + .macro vmessage text:req .byte 0xbd - .4byte \pointer + .4byte \text .endm @ Expands the given text at the pointer (- the relative address set by setvaddress) into gStringVar4 - .macro vbuffermessage ptr:req + .macro vbuffermessage text:req .byte 0xbe - .4byte \ptr + .4byte \text .endm @ Equivalent to bufferstring using the relative address set by setvaddress. - .macro vbufferstring stringVarIndex:req, pointer:req + .macro vbufferstring stringVarIndex:req, text:req .byte 0xbf stringvar \stringVarIndex - .4byte \pointer + .4byte \text .endm @ Create a window showing how many Coins the player has. @@ -1549,9 +1549,9 @@ .endm @ Used only in FireRed/LeafGreen, does nothing in Emerald. - .macro loadhelp pointer:req + .macro loadhelp text:req .byte 0xc8 - .4byte \pointer + .4byte \text .endm @ Used only in FireRed/LeafGreen, does nothing in Emerald. From 8f34249ab23bb38412c3b239e231581f05634ebf Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 13 Mar 2022 11:25:37 -0300 Subject: [PATCH 405/417] Update include/constants/pokedex.h --- include/constants/pokedex.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/constants/pokedex.h b/include/constants/pokedex.h index a0966a92de..4b821c68da 100644 --- a/include/constants/pokedex.h +++ b/include/constants/pokedex.h @@ -818,6 +818,7 @@ enum { NATIONAL_DEX_STAKATAKA, NATIONAL_DEX_BLACEPHALON, NATIONAL_DEX_ZERAORA, + // Unknown NATIONAL_DEX_MELTAN, NATIONAL_DEX_MELMETAL, // Galar From ff9556cb44f37f32881e15e0322bda5ba1dfd803 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 13 Mar 2022 11:25:44 -0300 Subject: [PATCH 406/417] Update include/constants/pokedex.h --- include/constants/pokedex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/constants/pokedex.h b/include/constants/pokedex.h index 4b821c68da..8f40f9a7be 100644 --- a/include/constants/pokedex.h +++ b/include/constants/pokedex.h @@ -915,7 +915,7 @@ enum { #define KANTO_DEX_COUNT NATIONAL_DEX_MEW #define JOHTO_DEX_COUNT NATIONAL_DEX_CELEBI -#define NATIONAL_DEX_COUNT NATIONAL_DEX_CALYREX +#define NATIONAL_DEX_COUNT NATIONAL_DEX_CALYREX #define POKEMON_SLOTS_NUMBER (NATIONAL_DEX_COUNT + 1) // Hoenn Pokedex order From 0a0157b62c29172eabd07f0c0eb02d6567957c2c Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 14 Mar 2022 15:54:47 -0400 Subject: [PATCH 407/417] Name unknown_16.png --- .../pics/{unknown_16.png => jump_long_grass.png} | Bin spritesheet_rules.mk | 2 +- src/data/object_events/object_event_graphics.h | 2 +- src/field_effect_helpers.c | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) rename graphics/field_effects/pics/{unknown_16.png => jump_long_grass.png} (100%) diff --git a/graphics/field_effects/pics/unknown_16.png b/graphics/field_effects/pics/jump_long_grass.png similarity index 100% rename from graphics/field_effects/pics/unknown_16.png rename to graphics/field_effects/pics/jump_long_grass.png diff --git a/spritesheet_rules.mk b/spritesheet_rules.mk index ae79719602..9fb184638a 100644 --- a/spritesheet_rules.mk +++ b/spritesheet_rules.mk @@ -636,7 +636,7 @@ $(FLDEFFGFXDIR)/tall_grass.4bpp: %.4bpp: %.png $(FLDEFFGFXDIR)/tree_disguise.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 2 -mheight 4 -$(FLDEFFGFXDIR)/unknown_16.4bpp: %.4bpp: %.png +$(FLDEFFGFXDIR)/jump_long_grass.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 2 -mheight 2 $(FLDEFFGFXDIR)/unknown_17.4bpp: %.4bpp: %.png diff --git a/src/data/object_events/object_event_graphics.h b/src/data/object_events/object_event_graphics.h index 81d83a8563..6ee56cc78e 100755 --- a/src/data/object_events/object_event_graphics.h +++ b/src/data/object_events/object_event_graphics.h @@ -305,7 +305,7 @@ const u16 gFieldEffectObjectPalette1[] = INCBIN_U16("graphics/field_effects/pale const u32 gFieldEffectObjectPic_GroundImpactDust[] = INCBIN_U32("graphics/field_effects/pics/ground_impact_dust.4bpp"); const u32 gFieldEffectObjectPic_JumpTallGrass[] = INCBIN_U32("graphics/field_effects/pics/jump_tall_grass.4bpp"); const u32 gUnusedGrass3[] = INCBIN_U32("graphics/field_effects/pics/unused_grass_3.4bpp"); -const u32 gFieldEffectObjectPic_JumpLongGrass[] = INCBIN_U32("graphics/field_effects/pics/unknown_16.4bpp"); +const u32 gFieldEffectObjectPic_JumpLongGrass[] = INCBIN_U32("graphics/field_effects/pics/jump_long_grass.4bpp"); const u32 gFieldEffectObjectPic_Unknown17[] = INCBIN_U32("graphics/field_effects/pics/unknown_17.4bpp"); const u32 gFieldEffectObjectPic_UnusedGrass2[] = INCBIN_U32("graphics/field_effects/pics/unused_grass_2.4bpp"); const u32 gFieldEffectObjectPic_LongGrass[] = INCBIN_U32("graphics/field_effects/pics/long_grass.4bpp"); diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index 65617038d1..036ff33f2c 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -487,6 +487,8 @@ void UpdateLongGrassFieldEffect(struct Sprite *sprite) #undef sCurrentMap #undef sObjectMoved +// Effectively unused as it's not possible in vanilla to jump onto long grass (no adjacent ledges, and can't ride the Acro Bike in it). +// The graphics for this effect do not visually correspond to tall grass either. Perhaps these graphics were its original design? u32 FldEff_JumpLongGrass(void) { u8 spriteId; From 058783c14841b87dab93b114f216ed1417b27db3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 14 Mar 2022 16:01:17 -0400 Subject: [PATCH 408/417] Fix comment mistake --- src/field_effect_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index 036ff33f2c..c3332c7fc6 100755 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -488,7 +488,7 @@ void UpdateLongGrassFieldEffect(struct Sprite *sprite) #undef sObjectMoved // Effectively unused as it's not possible in vanilla to jump onto long grass (no adjacent ledges, and can't ride the Acro Bike in it). -// The graphics for this effect do not visually correspond to tall grass either. Perhaps these graphics were its original design? +// The graphics for this effect do not visually correspond to long grass either. Perhaps these graphics were its original design? u32 FldEff_JumpLongGrass(void) { u8 spriteId; From 66cbe29c1408feef07772ba0b8a5b89995fa3056 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 30 Mar 2022 09:37:03 -0400 Subject: [PATCH 409/417] Add bugfix for Battle Factory trainer IVs --- include/battle_factory.h | 2 +- src/battle_factory.c | 24 ++++++++++++++++-------- src/battle_tower.c | 11 ++++++++--- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/include/battle_factory.h b/include/battle_factory.h index 5606d60d1e..d414bdb3b1 100644 --- a/include/battle_factory.h +++ b/include/battle_factory.h @@ -3,7 +3,7 @@ void CallBattleFactoryFunction(void); bool8 InBattleFactory(void); -u8 GetFactoryMonFixedIV(u8 arg0, u8 arg1); +u8 GetFactoryMonFixedIV(u8 challengeNum, bool8 isLastBattle); void FillFactoryBrainParty(void); u8 GetNumPastRentalsRank(u8 battleMode, u8 lvlMode); u32 GetAiScriptsInBattleFactory(void); diff --git a/src/battle_factory.c b/src/battle_factory.c index 23fa664f33..d88ed37f95 100644 --- a/src/battle_factory.c +++ b/src/battle_factory.c @@ -720,17 +720,25 @@ static void RestorePlayerPartyHeldItems(void) } } -u8 GetFactoryMonFixedIV(u8 arg0, u8 arg1) +// Get the IV to use for the opponent's pokémon. +// The IVs get higher for each subsequent challenge and for +// the last trainer in each challenge. Noland is an exception +// to this, as he uses the IVs that would be used by the regular +// trainers 2 challenges ahead of the current one. +// Due to a mistake in FillFactoryFrontierTrainerParty, the +// challenge number used to determine the IVs for regular trainers +// is Battle Tower's instead of Battle Factory's. +u8 GetFactoryMonFixedIV(u8 challengeNum, bool8 isLastBattle) { - u8 a1; - u8 a2 = (arg1 != 0) ? 1 : 0; + u8 ivSet; + bool8 useHigherIV = isLastBattle ? TRUE : FALSE; - if (arg0 > 8) - a1 = 7; + if (challengeNum > 8) + ivSet = 7; else - a1 = arg0; + ivSet = challengeNum; - return sFixedIVTable[a1][a2]; + return sFixedIVTable[ivSet][useHigherIV]; } void FillFactoryBrainParty(void) @@ -746,7 +754,7 @@ void FillFactoryBrainParty(void) u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u8 challengeNum = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] / 7; - fixedIV = GetFactoryMonFixedIV(challengeNum + 2, 0); + fixedIV = GetFactoryMonFixedIV(challengeNum + 2, FALSE); monLevel = SetFacilityPtrsGetLevel(); i = 0; otId = T1_READ_32(gSaveBlock2Ptr->playerTrainerId); diff --git a/src/battle_tower.c b/src/battle_tower.c index b747a3dc0d..989412e9e6 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -1827,13 +1827,18 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId) if (trainerId < FRONTIER_TRAINERS_COUNT) { - u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; // Unused variable. + u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode; u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); + // By mistake Battle Tower's Level 50 challenge number is used to determine the IVs for Battle Factory. + #ifdef BUGFIX + u8 challengeNum = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] / 7; + #else u8 challengeNum = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][FRONTIER_LVL_50] / 7; + #endif if (gSaveBlock2Ptr->frontier.curChallengeBattleNum < 6) - fixedIV = GetFactoryMonFixedIV(challengeNum, 0); + fixedIV = GetFactoryMonFixedIV(challengeNum, FALSE); else - fixedIV = GetFactoryMonFixedIV(challengeNum, 1); + fixedIV = GetFactoryMonFixedIV(challengeNum, TRUE); // Last trainer in challenge uses higher IVs } else if (trainerId == TRAINER_EREADER) { From e1f89c70d9c0f1d34fa5d3eb45c6baf0d7a42287 Mon Sep 17 00:00:00 2001 From: Eldred Habert Date: Sat, 2 Apr 2022 00:22:36 +0200 Subject: [PATCH 410/417] Add Arch Linux install instructions I didn't test the devkitARM install instructions, but they are pretty much transcribed from the Ubuntu/Deb ones, so that should be fine. --- INSTALL.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 1f1e1164be..f6434c07be 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -305,6 +305,20 @@ Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to > then you will have to install devkitARM. Install all the above packages except binutils-arm-none-eabi, and follow the instructions to > [install devkitARM on Debian/Ubuntu-based distributions](#installing-devkitarm-on-debianubuntu-based-distributions). + +### Arch Linux +Run this command as root to install the necessary packages: +```bash +pacman -S base-devel arm-none-eabi-binutils git libpng +``` +Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to-store-pokeemerald-linux). +
    + Note for legacy repos... + +> If the repository you plan to build has an **[older revision of the INSTALL.md](https://github.com/pret/pokeemerald/blob/571c598/INSTALL.md)**, +> then you will have to install devkitARM. Install all the above packages except binutils-arm-none-eabi, and follow the instructions to +> [install devkitARM on Arch Linux](#installing-devkitarm-on-arch-linux). +
    ### Other distributions _(Specific instructions for other distributions would be greatly appreciated!)_ @@ -520,6 +534,24 @@ devkitARM is now installed. devkitARM is now installed. +## Installing devkitARM on Arch Linux + +1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages. +2. Install `gba-dev`: run the following command as root. + + ```console + pacman -S gba-dev + ``` + This will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation. + +3. Run the following command to set devkitPro related environment variables (alternatively, close and re-open the Terminal): + + ```bash + source /etc/profile.d/devkit-env.sh + ``` + +devkitARM is now installed. + ## Other toolchains To build using a toolchain other than devkitARM, override the `TOOLCHAIN` environment variable with the path to your toolchain, which must contain the subdirectory `bin`. From 5fc72c2bfe6556654742a564d45e2fbe13430e60 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 9 Apr 2022 22:40:36 -0400 Subject: [PATCH 411/417] =?UTF-8?q?Heights=20and=20weights=20in=20Pok?= =?UTF-8?q?=C3=A9dex=20Orders=20lists?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/pokemon/pokedex_orders.h | 130 ++++++++++++++++++------------ 1 file changed, 78 insertions(+), 52 deletions(-) diff --git a/src/data/pokemon/pokedex_orders.h b/src/data/pokemon/pokedex_orders.h index 68b09bf9ec..f51bdeb445 100644 --- a/src/data/pokemon/pokedex_orders.h +++ b/src/data/pokemon/pokedex_orders.h @@ -927,6 +927,7 @@ const u16 gPokedexOrder_Alphabetical[] = const u16 gPokedexOrder_Weight[] = { + // 0.0 - 21.8 lbs / 0.0 - 9.9 kg NATIONAL_DEX_GASTLY, NATIONAL_DEX_HAUNTER, NATIONAL_DEX_FLABEBE, @@ -1195,7 +1196,7 @@ const u16 gPokedexOrder_Weight[] = NATIONAL_DEX_VULPIX, //NATIONAL_DEX_VULPIX, // Alolan Form NATIONAL_DEX_TEPIG, - + // 22.0 - 44.1 lbs / 10.0 - 20.0 kg NATIONAL_DEX_KAKUNA, NATIONAL_DEX_MAGIKARP, NATIONAL_DEX_SILCOON, @@ -1339,7 +1340,7 @@ const u16 gPokedexOrder_Weight[] = NATIONAL_DEX_GEODUDE, NATIONAL_DEX_BIDOOF, NATIONAL_DEX_MIENFOO, - + // 44.3 - 54.9 lbs / 20.1 - 24.9 kg NATIONAL_DEX_REUNICLUS, NATIONAL_DEX_KIRLIA, NATIONAL_DEX_RIOLU, @@ -1392,7 +1393,7 @@ const u16 gPokedexOrder_Weight[] = NATIONAL_DEX_DEWOTT, NATIONAL_DEX_TALONFLAME, NATIONAL_DEX_STARAPTOR, - + // 55.1 - 110.0 lbs / 25.0 - 49.9 kg NATIONAL_DEX_SEADRA, NATIONAL_DEX_FLAREON, NATIONAL_DEX_CROCONAW, @@ -1592,7 +1593,7 @@ const u16 gPokedexOrder_Weight[] = //NATIONAL_DEX_HOUNDOOM, // Mega NATIONAL_DEX_HIPPOPOTAS, NATIONAL_DEX_HITMONLEE, - + // 110.2 - 132.1 lbs / 50.0 - 59.9 kg NATIONAL_DEX_ZWEILOUS, NATIONAL_DEX_DRAGAPULT, NATIONAL_DEX_HITMONCHAN, @@ -1649,7 +1650,7 @@ const u16 gPokedexOrder_Weight[] = //NATIONAL_DEX_PINSIR, // Mega NATIONAL_DEX_AERODACTYL, NATIONAL_DEX_SHIFTRY, - + // 132.3 - 218.0 lbs / 60.0 - 98.9 kg NATIONAL_DEX_NIDOQUEEN, NATIONAL_DEX_MAGNETON, NATIONAL_DEX_KINGLER, @@ -1767,9 +1768,9 @@ const u16 gPokedexOrder_Weight[] = NATIONAL_DEX_NOSEPASS, NATIONAL_DEX_GROTLE, //NATIONAL_DEX_MAROWAK, // Alolan Form, Totem-sized - + // 218.3 - 220.2 lbs / 99.0 - 99.9 kg NATIONAL_DEX_BERGMITE, - + // 220.5 - 225.5 lbs / 100.0 - 102.3 kg NATIONAL_DEX_VENUSAUR, //NATIONAL_DEX_KANGASKHAN, // Mega NATIONAL_DEX_TROPIUS, @@ -1781,7 +1782,7 @@ const u16 gPokedexOrder_Weight[] = //NATIONAL_DEX_BLASTOISE, // Mega //NATIONAL_DEX_SWAMPERT, // Mega NATIONAL_DEX_BOLDORE, - + // 225.8 - 330.5 lbs / 102.4 - 149.9 kg NATIONAL_DEX_RAMPARDOS, NATIONAL_DEX_SALAMENCE, NATIONAL_DEX_GRAVELER, @@ -1838,7 +1839,7 @@ const u16 gPokedexOrder_Weight[] = //NATIONAL_DEX_VIKAVOLT, // Totem-sized NATIONAL_DEX_CRYOGONAL, NATIONAL_DEX_BASTIODON, - + // 330.7 - 440.7 lbs / 150.0 - 199.9 kg NATIONAL_DEX_EMBOAR, NATIONAL_DEX_NAGANADEL, NATIONAL_DEX_ARCTOZOLT, @@ -1866,7 +1867,7 @@ const u16 gPokedexOrder_Weight[] = NATIONAL_DEX_VOLCANION, NATIONAL_DEX_ENTEI, NATIONAL_DEX_HO_OH, - + // 440.9 - 451.3 lbs / 200.0 - 204.7 kg NATIONAL_DEX_CRUSTLE, NATIONAL_DEX_VIRIZION, NATIONAL_DEX_REGIDRAGO, @@ -1874,11 +1875,10 @@ const u16 gPokedexOrder_Weight[] = NATIONAL_DEX_TYRANITAR, NATIONAL_DEX_METANG, NATIONAL_DEX_YVELTAL, - + // 451.5 - 661.2 lbs / 204.8 - 299.9 kg NATIONAL_DEX_REGISTEEL, NATIONAL_DEX_RAYQUAZA, //NATIONAL_DEX_KOMMO_O, // Totem-sized - NATIONAL_DEX_ONIX, NATIONAL_DEX_DRAGONITE, NATIONAL_DEX_DHELMISE, @@ -1906,15 +1906,14 @@ const u16 gPokedexOrder_Weight[] = NATIONAL_DEX_BEARTIC, NATIONAL_DEX_TERRAKION, NATIONAL_DEX_TYRANTRUM, - NATIONAL_DEX_RHYPERIOR, NATIONAL_DEX_MAMOSWINE, - + // 661.4 - 667.0 lbs / 300.0 - 307.1 kg NATIONAL_DEX_GOLEM, NATIONAL_DEX_HIPPOWDON, //NATIONAL_DEX_GYARADOS, // Mega NATIONAL_DEX_ZYGARDE, // 50% Forme - + // 677.3 - 667.0 lbs / 307.2 - 359.9 kg NATIONAL_DEX_TORTERRA, NATIONAL_DEX_COALOSSAL, //NATIONAL_DEX_GOLEM, // Alolan Form @@ -1931,13 +1930,13 @@ const u16 gPokedexOrder_Weight[] = //NATIONAL_DEX_GLALIE, // Mega NATIONAL_DEX_KYOGRE, //NATIONAL_DEX_ZACIAN, // Crowned Sword - + // 793.7 - 902.8 lbs / 360.0 - 409.5 kg NATIONAL_DEX_AGGRON, //NATIONAL_DEX_RAYQUAZA, // Mega //NATIONAL_DEX_AGGRON, // Mega NATIONAL_DEX_WAILORD, NATIONAL_DEX_STEELIX, - + // 903.0 - 2204.4 lbs / 409.6 - 999.9 kg //NATIONAL_DEX_EXEGGUTOR, // Alolan Form NATIONAL_DEX_REGIGIGAS, //NATIONAL_DEX_KYOGRE, // Primal @@ -1970,12 +1969,14 @@ const u16 gPokedexOrder_Weight[] = const u16 gPokedexOrder_Height[] = { + // 0'04" / 0.1m NATIONAL_DEX_JOLTIK, NATIONAL_DEX_FLABEBE, NATIONAL_DEX_CUTIEFLY, NATIONAL_DEX_COMFEY, NATIONAL_DEX_COSMOEM, NATIONAL_DEX_SINISTEA, + // 0'08" / 0.2m NATIONAL_DEX_DIGLETT, //NATIONAL_DEX_DIGLETT, // Alolan Form NATIONAL_DEX_NATU, @@ -2000,7 +2001,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_APPLIN, NATIONAL_DEX_POLTEAGEIST, NATIONAL_DEX_MILCERY, - + // 1'00" / 0.3m NATIONAL_DEX_CATERPIE, NATIONAL_DEX_WEEDLE, NATIONAL_DEX_PIDGEY, @@ -2147,7 +2148,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_TOXEL, NATIONAL_DEX_HATENNA, NATIONAL_DEX_IMPIDIMP, - + // 1'08" / 0.5m NATIONAL_DEX_SQUIRTLE, NATIONAL_DEX_NIDORAN_M, NATIONAL_DEX_JIGGLYPUFF, @@ -2217,7 +2218,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_ELDEGOSS, NATIONAL_DEX_ARROKUDA, NATIONAL_DEX_DREEPY, - + // 2'00" / 0.6m NATIONAL_DEX_CHARMANDER, NATIONAL_DEX_KAKUNA, NATIONAL_DEX_SANDSHREW, @@ -2303,7 +2304,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_CLOBBOPUS, NATIONAL_DEX_HATTREM, NATIONAL_DEX_KUBFU, - + // 2'04" / 0.7m NATIONAL_DEX_BULBASAUR, NATIONAL_DEX_METAPOD, NATIONAL_DEX_RATICATE, @@ -2355,7 +2356,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_THWACKEY, NATIONAL_DEX_DRIZZILE, NATIONAL_DEX_SIZZLIPEDE, - + // 2'07" / 0.8m NATIONAL_DEX_RAICHU, NATIONAL_DEX_NIDORINA, NATIONAL_DEX_ZUBAT, @@ -2409,6 +2410,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_MORGREM, NATIONAL_DEX_PERRSERKER, NATIONAL_DEX_SIRFETCHD, + // 2'11" / 0.9m NATIONAL_DEX_NIDORINO, NATIONAL_DEX_ABRA, NATIONAL_DEX_TENTACOOL, @@ -2445,7 +2447,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_LURANTIS, NATIONAL_DEX_BRUXISH, NATIONAL_DEX_INDEEDEE, - + // 3'03" / 1.0m NATIONAL_DEX_IVYSAUR, NATIONAL_DEX_WARTORTLE, NATIONAL_DEX_BEEDRILL, @@ -2516,6 +2518,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_DREDNAW, NATIONAL_DEX_BOLTUND, NATIONAL_DEX_CURSOLA, + // 3'07" / 1.1m NATIONAL_DEX_CHARMELEON, NATIONAL_DEX_BUTTERFREE, NATIONAL_DEX_PIDGEOTTO, @@ -2560,6 +2563,7 @@ const u16 gPokedexOrder_Height[] = //NATIONAL_DEX_LYCANROC, // Midnight Form NATIONAL_DEX_CARKOL, NATIONAL_DEX_CALYREX, + // 3'11" / 1.2m NATIONAL_DEX_FEAROW, //NATIONAL_DEX_SANDSLASH, // Alolan Form NATIONAL_DEX_VILEPLUME, @@ -2619,7 +2623,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_THIEVUL, NATIONAL_DEX_CUFANT, NATIONAL_DEX_REGIELEKI, - + // 4'03" / 1.3m NATIONAL_DEX_NIDOQUEEN, NATIONAL_DEX_CLEFABLE, NATIONAL_DEX_POLIWRATH, @@ -2656,6 +2660,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_DUBWOOL, NATIONAL_DEX_BARRASKEWDA, NATIONAL_DEX_FROSMOTH, + // 4'07" / 1.4m //NATIONAL_DEX_BEEDRILL, // Mega //NATIONAL_DEX_RATICATE, // Alolan Form, Totem-sized NATIONAL_DEX_NIDOKING, @@ -2695,6 +2700,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_CINDERACE, NATIONAL_DEX_EISCUE, NATIONAL_DEX_DRAKLOAK, + // 4'11" / 1.5m NATIONAL_DEX_PIDGEOT, NATIONAL_DEX_VENOMOTH, NATIONAL_DEX_ALAKAZAM, @@ -2747,7 +2753,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_ZERAORA, NATIONAL_DEX_GRIMMSNARL, NATIONAL_DEX_MR_RIME, - + // 5'03" / 1.6m NATIONAL_DEX_BLASTOISE, //NATIONAL_DEX_BLASTOISE, // Mega NATIONAL_DEX_GOLBAT, @@ -2782,6 +2788,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_GRAPPLOCT, NATIONAL_DEX_OBSTAGOON, NATIONAL_DEX_RUNERIGUS, + // 5'07" / 1.7m NATIONAL_DEX_CHARIZARD, //NATIONAL_DEX_CHARIZARD, // Mega X //NATIONAL_DEX_CHARIZARD, // Mega Y @@ -2816,6 +2823,7 @@ const u16 gPokedexOrder_Height[] = //NATIONAL_DEX_GOURGEIST, // Super Size NATIONAL_DEX_VOLCANION, NATIONAL_DEX_CRABOMINABLE, + // 5'11" / 1.8m NATIONAL_DEX_DODRIO, NATIONAL_DEX_AERODACTYL, NATIONAL_DEX_DRATINI, @@ -2845,7 +2853,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_DRACOZOLT, NATIONAL_DEX_DURALUDON, NATIONAL_DEX_ZARUDE, - + // 6'03" / 1.9m NATIONAL_DEX_ARCANINE, NATIONAL_DEX_RHYDON, //NATIONAL_DEX_HOUNDOOM, // Mega @@ -2867,6 +2875,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_INTELEON, NATIONAL_DEX_URSHIFU, // Single Strike Style //NATIONAL_DEX_URSHIFU, // Rapid Strike Style + // 6'07" / 2.0m NATIONAL_DEX_VENUSAUR, NATIONAL_DEX_EKANS, //NATIONAL_DEX_SLOWBRO, // Mega @@ -2894,6 +2903,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_TURTONATOR, NATIONAL_DEX_ARCTOVISH, NATIONAL_DEX_SPECTRIER, + // 6'11" / 2.1m //NATIONAL_DEX_AERODACTYL, // Mega NATIONAL_DEX_SNORLAX, NATIONAL_DEX_MANTINE, @@ -2908,7 +2918,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_RILLABOOM, NATIONAL_DEX_HATTERENE, NATIONAL_DEX_REGIDRAGO, - + // 7'03" / 2.2m //NATIONAL_DEX_PIDGEOT, // Mega NATIONAL_DEX_KANGASKHAN, //NATIONAL_DEX_KANGASKHAN, // Mega @@ -2922,6 +2932,7 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_CORVIKNIGHT, NATIONAL_DEX_SILICOBRA, NATIONAL_DEX_GLASTRIER, + // 7'07" / 2.3m //NATIONAL_DEX_MEWTWO, // Mega X NATIONAL_DEX_FERALIGATR, NATIONAL_DEX_HARIYAMA, @@ -2929,13 +2940,14 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_SILVALLY, NATIONAL_DEX_ARCTOZOLT, NATIONAL_DEX_DRACOVISH, + // 7'10" / 2.4m //NATIONAL_DEX_VENUSAUR, // Mega NATIONAL_DEX_RHYPERIOR, NATIONAL_DEX_BUZZWOLE, NATIONAL_DEX_NECROZMA, //NATIONAL_DEX_CALYREX, // Ice Rider //NATIONAL_DEX_CALYREX, // Shadow Rider - + // 8'02" / 2.5m NATIONAL_DEX_LAPRAS, //NATIONAL_DEX_TYRANITAR, // Mega //NATIONAL_DEX_SHARPEDO, // Mega @@ -2947,19 +2959,23 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_MUDSDALE, NATIONAL_DEX_MELMETAL, NATIONAL_DEX_STONJOURNER, + // 8'06" / 2.6m NATIONAL_DEX_BEARTIC, //NATIONAL_DEX_VIKAVOLT, // Totem-sized + // 8'10" / 2.7m NATIONAL_DEX_SEVIPER, //NATIONAL_DEX_ABOMASNOW, // Mega NATIONAL_DEX_AURORUS, - + // 9'02" / 2.8m NATIONAL_DEX_GOLURK, NATIONAL_DEX_COALOSSAL, NATIONAL_DEX_ZACIAN, // Hero of Many Battles //NATIONAL_DEX_ZACIAN, // Crowned Sword + // 9'06" / 2.9m NATIONAL_DEX_ZEKROM, NATIONAL_DEX_ZAMAZENTA, // Hero of Many Battles //NATIONAL_DEX_ZAMAZENTA, // Crowned Shield + // 9'10" / 3.0m //NATIONAL_DEX_WEEZING, // Galarian Form //NATIONAL_DEX_THUNDURUS, // Therian Form NATIONAL_DEX_KYUREM, @@ -2969,74 +2985,84 @@ const u16 gPokedexOrder_Height[] = NATIONAL_DEX_FALINKS, NATIONAL_DEX_COPPERAJAH, NATIONAL_DEX_DRAGAPULT, - + // 10'02" / 3.1m //NATIONAL_DEX_ARAQUANID, // Totem-sized + // 10'06" / 3.2m NATIONAL_DEX_ARCEUS, NATIONAL_DEX_RESHIRAM, + // 10'10" / 3.3m NATIONAL_DEX_SERPERIOR, //NATIONAL_DEX_KYUREM, // Black - + // 11'02" / 3.4m NATIONAL_DEX_SOLGALEO, + // 11'06" / 3.5m NATIONAL_DEX_ARBOK, NATIONAL_DEX_GROUDON, + // 11'10" / 3.6m //NATIONAL_DEX_KYUREM, // White NATIONAL_DEX_NAGANADEL, - + // 12'02" / 3.7m NATIONAL_DEX_REGIGIGAS, + // 12'06" / 3.8m NATIONAL_DEX_HO_OH, NATIONAL_DEX_XURKITREE, //NATIONAL_DEX_NECROZMA, // Dusk Mane NATIONAL_DEX_SANDACONDA, + // 12'10" / 3.9m NATIONAL_DEX_DHELMISE, - + // 13'01" / 4.0m NATIONAL_DEX_DRAGONAIR, NATIONAL_DEX_LUNALA, + // 13'09" / 4.2m NATIONAL_DEX_PALKIA, //NATIONAL_DEX_NECROZMA, // Dawn Wings - + // 14'09" / 4.5m NATIONAL_DEX_KYOGRE, NATIONAL_DEX_GIRATINA, // Altered Forme //NATIONAL_DEX_ZYGARDE, // Complete Forme - + // 16'05" / 5.0m //NATIONAL_DEX_GROUDON, // Primal NATIONAL_DEX_ZYGARDE, // 50% Forme - + // 17'01" / 5.2m NATIONAL_DEX_LUGIA, + // 17'09" / 5.4m NATIONAL_DEX_DIALGA, - + // 18'01" / 5.5m NATIONAL_DEX_GUZZLORD, NATIONAL_DEX_STAKATAKA, - + // 19'00" / 5.8m NATIONAL_DEX_YVELTAL, - + // 20'04" / 6.2m NATIONAL_DEX_MILOTIC, - + // 21'04" / 6.5m NATIONAL_DEX_GYARADOS, //NATIONAL_DEX_GYARADOS, // Mega //NATIONAL_DEX_HOOPA, // Unbound - + // 22'08" / 6.9m //NATIONAL_DEX_GIRATINA, // Origin Forme - + // 23'00" / 7.0m NATIONAL_DEX_RAYQUAZA, - + // 24'07" / 7.5m //NATIONAL_DEX_NECROZMA, // Ultra - + // 26'11" / 8.2m //NATIONAL_DEX_WISHIWASHI, // School Form - + // 28'10" / 8.8m NATIONAL_DEX_ONIX, - + // 30'02" / 9.2m NATIONAL_DEX_STEELIX, NATIONAL_DEX_CELESTEELA, - + // 32'02" / 9.8m //NATIONAL_DEX_KYOGRE, // Primal - + // 34'05" / 10.5m //NATIONAL_DEX_STEELIX, // Mega - + // 35'05" / 10.8m //NATIONAL_DEX_RAYQUAZA, // Mega - + // 35'09" / 10.9m //NATIONAL_DEX_EXEGGUTOR, // Alolan Form - + // 47'07" / 14.5m NATIONAL_DEX_WAILORD, - + // 65'07" / 20m NATIONAL_DEX_ETERNATUS, + // 328'01" / 100m + //NATIONAL_DEX_ETERNATUS, // Eternamax }; From 17f5f96f74e87236add433cd9bbed40469eaf254 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 10 Apr 2022 15:45:23 -0400 Subject: [PATCH 412/417] =?UTF-8?q?Added=20Pok=C3=A9mon=20Jump=20data.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pokemon_jump.c | 182 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index ddf300e15a..81f1ecccad 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -434,17 +434,37 @@ static const struct PokemonJumpMons sPokeJumpMons[] = { .species = SPECIES_WEEDLE, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_KAKUNA, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_RATTATA, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_RATTATA_ALOLAN, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_RATICATE, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_RATICATE_ALOLAN, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_PIKACHU, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_COSPLAY, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_ROCK_STAR, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_BELLE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_POP_STAR, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_PH_D, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_LIBRE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_ORIGINAL_CAP, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_HOENN_CAP, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_SINNOH_CAP, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_UNOVA_CAP, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_KALOS_CAP, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_ALOLA_CAP, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_PARTNER_CAP, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PIKACHU_WORLD_CAP, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_SANDSHREW, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_SANDSHREW_ALOLAN, .jumpType = JUMP_TYPE_SLOW, }, { .species = SPECIES_NIDORAN_F, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_NIDORAN_M, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_CLEFAIRY, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_VULPIX, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_VULPIX_ALOLAN, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_JIGGLYPUFF, .jumpType = JUMP_TYPE_SLOW, }, { .species = SPECIES_ODDISH, .jumpType = JUMP_TYPE_SLOW, }, { .species = SPECIES_PARAS, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_MEOWTH, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MEOWTH_ALOLAN, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MEOWTH_GALARIAN, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_PSYDUCK, .jumpType = JUMP_TYPE_SLOW, }, { .species = SPECIES_MANKEY, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_GROWLITHE, .jumpType = JUMP_TYPE_FAST, }, @@ -463,6 +483,7 @@ static const struct PokemonJumpMons sPokeJumpMons[] = { .species = SPECIES_TOTODILE, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_SPINARAK, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_PICHU, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PICHU_SPIKY_EARED, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_CLEFFA, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_IGGLYBUFF, .jumpType = JUMP_TYPE_SLOW, }, { .species = SPECIES_TOGEPI, .jumpType = JUMP_TYPE_SLOW, }, @@ -491,7 +512,9 @@ static const struct PokemonJumpMons sPokeJumpMons[] = { .species = SPECIES_MARSHTOMP, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_POOCHYENA, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_ZIGZAGOON, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_ZIGZAGOON_GALARIAN, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_LINOONE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_LINOONE_GALARIAN, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_WURMPLE, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_SILCOON, .jumpType = JUMP_TYPE_SLOW, }, { .species = SPECIES_CASCOON, .jumpType = JUMP_TYPE_SLOW, }, @@ -506,6 +529,7 @@ static const struct PokemonJumpMons sPokeJumpMons[] = { .species = SPECIES_AZURILL, .jumpType = JUMP_TYPE_SLOW, }, { .species = SPECIES_SKITTY, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_SABLEYE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_SABLEYE_MEGA, .jumpType = JUMP_TYPE_SLOW, }, { .species = SPECIES_MAWILE, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_ARON, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_MEDITITE, .jumpType = JUMP_TYPE_SLOW, }, @@ -526,6 +550,164 @@ static const struct PokemonJumpMons sPokeJumpMons[] = { .species = SPECIES_SNORUNT, .jumpType = JUMP_TYPE_NORMAL, }, { .species = SPECIES_CLAMPERL, .jumpType = JUMP_TYPE_FAST, }, { .species = SPECIES_BAGON, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_TURTWIG, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_CHIMCHAR, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_PIPLUP, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_BIDOOF, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_KRICKETOT, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SHINX, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_BUDEW, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_SHIELDON, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_PACHIRISU, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_BUIZEL, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_CHERUBI, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_CHERRIM, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_CHERRIM_SUNSHINE, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SHELLOS, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_SHELLOS_EAST_SEA, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_BUNEARY, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_GLAMEOW, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_STUNKY, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_BONSLY, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_MIME_JR, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_HAPPINY, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_GIBLE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MUNCHLAX, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_RIOLU, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_CROAGUNK, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SHAYMIN, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_SNIVY, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_TEPIG, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_OSHAWOTT, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PATRAT, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_LILLIPUP, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_PURRLOIN, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_PANSAGE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PANSEAR, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_PANPOUR, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_ROGGENROLA, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_DRILBUR, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_EXCADRILL, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_TIMBURR, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_SEWADDLE, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SWADLOON, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_VENIPEDE, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_PETILIL, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_SANDILE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_DARUMAKA, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_DARUMAKA_GALARIAN, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_DWEBBLE, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_SCRAGGY, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ARCHEN, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_TRUBBISH, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_ZORUA, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_MINCCINO, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_CINCCINO, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_GOTHITA, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_GOTHORITA, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_DEERLING, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_DEERLING_SUMMER, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_DEERLING_AUTUMN, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_DEERLING_WINTER, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_KARRABLAST, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_FOONGUS, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_AMOONGUSS, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_JOLTIK, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_LITWICK, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_AXEW, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_CUBCHOO, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SHELMET, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_STUNFISK, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_STUNFISK_GALARIAN, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_PAWNIARD, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_DURANT, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_CHESPIN, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_QUILLADIN, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_FENNEKIN, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_FROAKIE, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_FROGADIER, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_BUNNELBY, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SCATTERBUG, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SPEWPA, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_LITLEO, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_PANCHAM, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_ESPURR, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MEOWSTIC, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MEOWSTIC_FEMALE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_BINACLE, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_CLAUNCHER, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_HELIOPTILE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_DEDENNE, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_GOOMY, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ROWLET, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_DARTRIX, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_LITTEN, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_TORRACAT, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_POPPLIO, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_BRIONNE, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_YUNGOOS, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_GUMSHOOS, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_GRUBBIN, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_CHARJABUG, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_CRABRAWLER, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ROCKRUFF, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_ROCKRUFF_OWN_TEMPO, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MAREANIE, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_DEWPIDER, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_FOMANTIS, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_MORELULL, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_SALANDIT, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_STUFFUL, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_BOUNSWEET, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_STEENEE, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_WIMPOD, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_PYUKUMUKU, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_KOMALA, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_TOGEDEMARU, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MIMIKYU, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MIMIKYU_BUSTED, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_JANGMO_O, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_MARSHADOW, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_MELTAN, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_GROOKEY, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_THWACKEY, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_SCORBUNNY, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_RABOOT, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SOBBLE, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_DRIZZILE, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_SKWOVET, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SKWOVET, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_BLIPBUG, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_DOTTLER, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_NICKIT, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_GOSSIFLEUR, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ELDEGOSS, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_WOOLOO, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_CHEWTLE, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_YAMPER, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_ROLYCOLY, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_APPLIN, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_APPLETUN, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_TOXEL, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_SIZZLIPEDE, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_CLOBBOPUS, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_HATENNA, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_HATTREM, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_IMPIDIMP, .jumpType = JUMP_TYPE_FAST, }, + { .species = SPECIES_ALCREMIE, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ALCREMIE_RUBY_CREAM, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ALCREMIE_MATCHA_CREAM, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ALCREMIE_MINT_CREAM, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ALCREMIE_LEMON_CREAM, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ALCREMIE_SALTED_CREAM, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ALCREMIE_RUBY_SWIRL, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ALCREMIE_CARAMEL_SWIRL, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_ALCREMIE_RAINBOW_SWIRL, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_PINCURCHIN, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_SNOM, .jumpType = JUMP_TYPE_SLOW, }, + { .species = SPECIES_MORPEKO, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_MORPEKO_HANGRY, .jumpType = JUMP_TYPE_NORMAL, }, + { .species = SPECIES_KUBFU, .jumpType = JUMP_TYPE_FAST, }, }; void StartPokemonJump(u16 partyId, MainCallback exitCallback) From 84d713a50f01061e019a4b27d3d04401ad646908 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Thu, 14 Apr 2022 18:44:20 -0400 Subject: [PATCH 413/417] Legendary and Mythical flags --- include/constants/pokemon.h | 8 ++ include/constants/species.h | 6 -- src/data/pokemon/base_stats.h | 148 +++++++++++++++++++++++++++++++++- 3 files changed, 153 insertions(+), 9 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index f0a4ef6490..224a3f892a 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -387,4 +387,12 @@ #define NUM_NORMAL_ABILITY_SLOTS 2 #define NUM_HIDDEN_ABILITY_SLOTS 1 +// Species Flags +#define FLAG_LEGENDARY (1 << 0) +#define FLAG_MYTHICAL (1 << 1) +#define FLAG_ULTRA_BEAST (1 << 2) +#define FLAG_ALOLAN_FORM (1 << 3) +#define FLAG_GALARIAN_FORM (1 << 4) +#define FLAG_GENDER_DIFFERENCE (1 << 5) + #endif // GUARD_CONSTANTS_POKEMON_H diff --git a/include/constants/species.h b/include/constants/species.h index b3ba54c466..b8689a32af 100644 --- a/include/constants/species.h +++ b/include/constants/species.h @@ -1344,10 +1344,4 @@ #define SPECIES_EGG SPECIES_CALYREX_SHADOW_RIDER + 1 #define NUM_SPECIES SPECIES_EGG -// Species Flags -#define FLAG_ULTRA_BEAST (1 << 0) -#define FLAG_ALOLAN_FORM (1 << 1) -#define FLAG_GALARIAN_FORM (1 << 2) -#define FLAG_GENDER_DIFFERENCE (1 << 3) - #endif // GUARD_CONSTANTS_SPECIES_H diff --git a/src/data/pokemon/base_stats.h b/src/data/pokemon/base_stats.h index 8295f12ee1..636e8c8f49 100644 --- a/src/data/pokemon/base_stats.h +++ b/src/data/pokemon/base_stats.h @@ -4097,6 +4097,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ZAPDOS] = @@ -4125,6 +4126,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_MOLTRES] = @@ -4149,6 +4151,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_PRESSURE, ABILITY_NONE, ABILITY_FLAME_BODY}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_DRATINI] = @@ -4256,6 +4259,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_MEW] = @@ -4282,6 +4286,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_CHIKORITA] = @@ -6902,6 +6907,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ENTEI] = @@ -6931,6 +6937,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SUICUNE] = @@ -6960,6 +6967,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_LARVITAR] = @@ -7064,6 +7072,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_HO_OH] = @@ -7094,6 +7103,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_CELEBI] = @@ -7120,6 +7130,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_TREECKO] = @@ -10692,6 +10703,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE, ABILITY_STURDY}, .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_REGICE] = @@ -10720,6 +10732,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_REGISTEEL] = @@ -10749,6 +10762,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_LATIAS] = @@ -10773,6 +10787,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_LATIOS] = @@ -10797,6 +10812,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_KYOGRE] = @@ -10821,6 +10837,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_DRIZZLE, ABILITY_NONE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_GROUDON] = @@ -10845,6 +10862,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_DROUGHT, ABILITY_NONE}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_RAYQUAZA] = @@ -10870,6 +10888,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_AIR_LOCK, ABILITY_NONE}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_JIRACHI] = @@ -10896,6 +10915,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_SERENE_GRACE, ABILITY_NONE}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_DEOXYS] = @@ -10922,6 +10942,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_TURTWIG] = @@ -13568,6 +13589,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_MESPRIT] = @@ -13594,6 +13616,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_AZELF] = @@ -13619,6 +13642,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_DIALGA] = @@ -13647,6 +13671,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_PALKIA] = @@ -13675,6 +13700,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_HEATRAN] = @@ -13699,6 +13725,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE, ABILITY_FLAME_BODY}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_REGIGIGAS] = @@ -13727,6 +13754,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_GIRATINA] = @@ -13755,6 +13783,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_CRESSELIA] = @@ -13779,6 +13808,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_PHIONE] = @@ -13807,6 +13837,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_MANAPHY] = @@ -13835,6 +13866,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_DARKRAI] = @@ -13864,6 +13896,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_SHAYMIN] = @@ -13890,6 +13923,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS] = @@ -13918,6 +13952,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_VICTINI] = @@ -13946,6 +13981,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_SNIVY] = @@ -18050,6 +18086,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_TERRAKION] = @@ -18078,6 +18115,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_VIRIZION] = @@ -18106,6 +18144,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_TORNADUS] = @@ -18134,6 +18173,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_THUNDURUS] = @@ -18162,6 +18202,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_RESHIRAM] = @@ -18190,6 +18231,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ZEKROM] = @@ -18218,6 +18260,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_LANDORUS] = @@ -18246,6 +18289,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_KYUREM] = @@ -18272,6 +18316,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .bodyColor = BODY_COLOR_GRAY, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_KELDEO] = @@ -18300,6 +18345,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_MELOETTA] = @@ -18328,6 +18374,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_SERENE_GRACE, ABILITY_NONE}, .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, + .flags = FLAG_MYTHICAL, }, [SPECIES_GENESECT] = @@ -18358,6 +18405,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_CHESPIN] = @@ -20270,6 +20318,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_YVELTAL] = @@ -20298,6 +20347,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ZYGARDE] = @@ -20326,6 +20376,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_DIANCIE] = @@ -20351,6 +20402,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_HOOPA] = @@ -20379,6 +20431,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_VOLCANION] = @@ -20403,6 +20456,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_WATER_ABSORB, ABILITY_NONE}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ROWLET] = @@ -21850,6 +21904,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY] = @@ -21878,6 +21933,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_MINIOR] = @@ -22230,6 +22286,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_TAPU_LELE] = @@ -22258,6 +22315,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_TAPU_BULU] = @@ -22286,6 +22344,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_TAPU_FINI] = @@ -22314,6 +22373,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_COSMOG] = @@ -22342,6 +22402,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_COSMOEM] = @@ -22367,6 +22428,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_STURDY, ABILITY_NONE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SOLGALEO] = @@ -22395,6 +22457,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_LUNALA] = @@ -22423,6 +22486,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_NIHILEGO] = @@ -22658,6 +22722,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_MAGEARNA] = @@ -22686,6 +22751,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_MARSHADOW] = @@ -22715,6 +22781,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = TRUE, + .flags = FLAG_MYTHICAL, }, [SPECIES_POIPOLE] = @@ -22855,6 +22922,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_VOLT_ABSORB, ABILITY_NONE}, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_MELTAN] = @@ -22879,6 +22947,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_MAGNET_PULL, ABILITY_NONE}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_MELMETAL] = @@ -22907,6 +22976,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_GROOKEY] = @@ -25131,6 +25201,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ZAMAZENTA] = @@ -25159,6 +25230,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ETERNATUS] = @@ -25183,6 +25255,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_KUBFU] = @@ -25207,6 +25280,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_URSHIFU] = @@ -25235,6 +25309,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ZARUDE] = @@ -25263,6 +25338,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_REGIELEKI] = @@ -25291,6 +25367,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_REGIDRAGO] = @@ -25319,6 +25396,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_GLASTRIER] = @@ -25347,6 +25425,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SPECTRIER] = @@ -25375,6 +25454,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_CALYREX] = @@ -25403,6 +25483,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_VENUSAUR_MEGA] = @@ -25784,6 +25865,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_MEWTWO_MEGA_Y] = @@ -25808,6 +25890,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_INSOMNIA, ABILITY_INSOMNIA}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_AMPHAROS_MEGA] = @@ -26457,6 +26540,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_LEVITATE, ABILITY_LEVITATE}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_LATIOS_MEGA] = @@ -26481,6 +26565,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_LEVITATE, ABILITY_LEVITATE}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_LOPUNNY_MEGA] = @@ -26679,6 +26764,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_RAYQUAZA_MEGA] = @@ -26708,6 +26794,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_KYOGRE_PRIMAL] = @@ -26736,6 +26823,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_GROUDON_PRIMAL] = @@ -26764,6 +26852,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_RATTATA_ALOLAN] = @@ -27573,7 +27662,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, - .flags = FLAG_GALARIAN_FORM, + .flags = FLAG_LEGENDARY | FLAG_GALARIAN_FORM, }, [SPECIES_ZAPDOS_GALARIAN] = @@ -27602,7 +27691,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, - .flags = FLAG_GALARIAN_FORM, + .flags = FLAG_LEGENDARY | FLAG_GALARIAN_FORM, }, [SPECIES_MOLTRES_GALARIAN] = @@ -27631,7 +27720,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, - .flags = FLAG_GALARIAN_FORM, + .flags = FLAG_LEGENDARY | FLAG_GALARIAN_FORM, }, [SPECIES_SLOWKING_GALARIAN] = @@ -29456,6 +29545,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_FLYING] = @@ -29484,6 +29574,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_POISON] = @@ -29512,6 +29603,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_GROUND] = @@ -29540,6 +29632,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_ROCK] = @@ -29568,6 +29661,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_BUG] = @@ -29596,6 +29690,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_GHOST] = @@ -29624,6 +29719,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_STEEL] = @@ -29652,6 +29748,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_FIRE] = @@ -29680,6 +29777,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_WATER] = @@ -29708,6 +29806,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_GRASS] = @@ -29736,6 +29835,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_ELECTRIC] = @@ -29764,6 +29864,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_PSYCHIC] = @@ -29792,6 +29893,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_ICE] = @@ -29820,6 +29922,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_DRAGON] = @@ -29848,6 +29951,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_DARK] = @@ -29876,6 +29980,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ARCEUS_FAIRY] = @@ -29904,6 +30009,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_BASCULIN_BLUE_STRIPED] = @@ -30186,6 +30292,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_THUNDURUS_THERIAN] = @@ -30210,6 +30317,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_VOLT_ABSORB, ABILITY_NONE}, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_LANDORUS_THERIAN] = @@ -30234,6 +30342,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_KYUREM_WHITE] = @@ -30262,6 +30371,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_KYUREM_BLACK] = @@ -30290,6 +30400,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_KELDEO_RESOLUTE] = @@ -30318,6 +30429,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, + .flags = FLAG_MYTHICAL, }, [SPECIES_MELOETTA_PIROUETTE] = @@ -30346,6 +30458,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_SERENE_GRACE, ABILITY_NONE}, .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, + .flags = FLAG_MYTHICAL, }, [SPECIES_GENESECT_DOUSE_DRIVE] = @@ -30376,6 +30489,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_GENESECT_SHOCK_DRIVE] = @@ -30406,6 +30520,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_GENESECT_BURN_DRIVE] = @@ -30436,6 +30551,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_GENESECT_CHILL_DRIVE] = @@ -30466,6 +30582,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_GRENINJA_BATTLE_BOND] = @@ -32106,6 +32223,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_ORICORIO_POM_POM] = @@ -32335,6 +32453,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_FLYING] = @@ -32363,6 +32482,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_POISON] = @@ -32391,6 +32511,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_GROUND] = @@ -32419,6 +32540,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_ROCK] = @@ -32447,6 +32569,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_BUG] = @@ -32475,6 +32598,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_GHOST] = @@ -32503,6 +32627,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_STEEL] = @@ -32531,6 +32656,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_FIRE] = @@ -32559,6 +32685,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_WATER] = @@ -32587,6 +32714,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_GRASS] = @@ -32615,6 +32743,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_ELECTRIC] = @@ -32643,6 +32772,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_PSYCHIC] = @@ -32671,6 +32801,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_ICE] = @@ -32699,6 +32830,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_DRAGON] = @@ -32727,6 +32859,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_DARK] = @@ -32755,6 +32888,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_SILVALLY_FAIRY] = @@ -32783,6 +32917,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_MINIOR_METEOR_ORANGE] = @@ -33229,6 +33364,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_NECROZMA_DAWN_WINGS] = @@ -33257,6 +33393,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_NECROZMA_ULTRA] = @@ -33287,6 +33424,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, + .flags = FLAG_LEGENDARY, }, [SPECIES_MAGEARNA_ORIGINAL_COLOR] = @@ -33315,6 +33453,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_MYTHICAL, }, [SPECIES_CRAMORANT_GULPING] = @@ -33791,6 +33930,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ZAMAZENTA_CROWNED_SHIELD] = @@ -33819,6 +33959,7 @@ const struct BaseStats gBaseStats[] = #endif .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_ETERNATUS_ETERNAMAX] = @@ -33843,6 +33984,7 @@ const struct BaseStats gBaseStats[] = .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, + .flags = FLAG_LEGENDARY, }, [SPECIES_URSHIFU_RAPID_STRIKE_STYLE] = From a6175d262219e68848d6d02fd234a2314b8cb639 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 16 Apr 2022 12:51:02 -0400 Subject: [PATCH 414/417] Config for Legendaries, Mythicals and Ultra Beasts to have at least 3 perfect IVs --- include/constants/pokemon.h | 2 + include/constants/pokemon_config.h | 1 + src/pokemon.c | 69 ++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 224a3f892a..ba9495158a 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -395,4 +395,6 @@ #define FLAG_GALARIAN_FORM (1 << 4) #define FLAG_GENDER_DIFFERENCE (1 << 5) +#define LEGENDARY_PERFECT_IV_COUNT 3 + #endif // GUARD_CONSTANTS_POKEMON_H diff --git a/include/constants/pokemon_config.h b/include/constants/pokemon_config.h index 257c06b7c0..aafa898d90 100644 --- a/include/constants/pokemon_config.h +++ b/include/constants/pokemon_config.h @@ -17,6 +17,7 @@ #define P_UPDATED_ABILITIES GEN_8 // Since Gen 6, certain Pokémon have their abilities changed. Requires BATTLE_ENGINE for Gen4+ abilities. #define P_UPDATED_EGG_GROUPS GEN_8 // Since Gen 8, certain Pokémon have gained new egg groups. #define P_SHEDINJA_BALL GEN_8 // Since Gen 4, Shedinja requires a Poké Ball for its evolution. In Gen 3, Shedinja inherits Nincada's Ball. +#define P_LEGENDARY_PERFECT_IVS GEN_8 // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs. #define P_ENABLE_DEBUG TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. diff --git a/src/pokemon.c b/src/pokemon.c index f654dcf52a..5af93106a0 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -65,6 +65,7 @@ static bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 battlerId); static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move); static bool8 ShouldSkipFriendshipChange(void); static u8 SendMonToPC(struct Pokemon* mon); +static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv); EWRAM_DATA static u8 sLearningMoveTableID = 0; EWRAM_DATA u8 gPlayerPartyCount = 0; @@ -3204,6 +3205,9 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, u32 personality; u32 value; u16 checksum; + u8 i; + u8 availableIVs[NUM_STATS]; + u8 selectedIvs[LEGENDARY_PERFECT_IV_COUNT]; ZeroBoxMonData(boxMon); @@ -3286,6 +3290,52 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, SetBoxMonData(boxMon, MON_DATA_SPATK_IV, &iv); iv = (value & (MAX_IV_MASK << 10)) >> 10; SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv); + + #if P_LEGENDARY_PERFECT_IVS >= GEN_6 + if (gBaseStats[species].flags & (FLAG_LEGENDARY | FLAG_MYTHICAL | FLAG_ULTRA_BEAST)) + { + // Initialize a list of IV indices. + for (i = 0; i < NUM_STATS; i++) + { + availableIVs[i] = i; + } + + // Select the 3 IVs that will be perfected. + for (i = 0; i < LEGENDARY_PERFECT_IV_COUNT; i++) + { + u8 index = Random() % (NUM_STATS - i); + selectedIvs[i] = availableIVs[index]; + RemoveIVIndexFromList(availableIVs, index); + } + for (i = 0; i < LEGENDARY_PERFECT_IV_COUNT; i++) + { + switch (selectedIvs[i]) + { + case STAT_HP: + SetBoxMonData(boxMon, MON_DATA_HP_IV, MAX_PER_STAT_IVS); + //iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_HP_IV); + //SetMonData(egg, MON_DATA_HP_IV, &iv); + break; + case STAT_ATK: + SetBoxMonData(boxMon, MON_DATA_ATK_IV, MAX_PER_STAT_IVS); + break; + case STAT_DEF: + SetBoxMonData(boxMon, MON_DATA_DEF_IV, MAX_PER_STAT_IVS); + break; + case STAT_SPEED: + SetBoxMonData(boxMon, MON_DATA_SPEED_IV, MAX_PER_STAT_IVS); + break; + case STAT_SPATK: + SetBoxMonData(boxMon, MON_DATA_SPATK_IV, MAX_PER_STAT_IVS); + break; + case STAT_SPDEF: + SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, MAX_PER_STAT_IVS); + break; + } + } + } + #endif + } if (gBaseStats[species].abilities[1]) @@ -8341,3 +8391,22 @@ u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove) } return 0; } + +static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv) +{ + s32 i, j; + u8 temp[NUM_STATS]; + + ivs[selectedIv] = 0xFF; + for (i = 0; i < NUM_STATS; i++) + { + temp[i] = ivs[i]; + } + + j = 0; + for (i = 0; i < NUM_STATS; i++) + { + if (temp[i] != 0xFF) + ivs[j++] = temp[i]; + } +} From 16283b47c799c0968fbd21afbf0542b338c98286 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sat, 16 Apr 2022 15:57:38 -0400 Subject: [PATCH 415/417] Fixed compile. I had these changes in a testing branch but forgot to add them back here. --- src/pokemon.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/pokemon.c b/src/pokemon.c index 5af93106a0..f136fb03a7 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -3294,6 +3294,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, #if P_LEGENDARY_PERFECT_IVS >= GEN_6 if (gBaseStats[species].flags & (FLAG_LEGENDARY | FLAG_MYTHICAL | FLAG_ULTRA_BEAST)) { + iv = MAX_PER_STAT_IVS; // Initialize a list of IV indices. for (i = 0; i < NUM_STATS; i++) { @@ -3312,24 +3313,22 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, switch (selectedIvs[i]) { case STAT_HP: - SetBoxMonData(boxMon, MON_DATA_HP_IV, MAX_PER_STAT_IVS); - //iv = GetBoxMonData(&daycare->mons[whichParents[i]].mon, MON_DATA_HP_IV); - //SetMonData(egg, MON_DATA_HP_IV, &iv); + SetBoxMonData(boxMon, MON_DATA_HP_IV, &iv); break; case STAT_ATK: - SetBoxMonData(boxMon, MON_DATA_ATK_IV, MAX_PER_STAT_IVS); + SetBoxMonData(boxMon, MON_DATA_ATK_IV, &iv); break; case STAT_DEF: - SetBoxMonData(boxMon, MON_DATA_DEF_IV, MAX_PER_STAT_IVS); + SetBoxMonData(boxMon, MON_DATA_DEF_IV, &iv); break; case STAT_SPEED: - SetBoxMonData(boxMon, MON_DATA_SPEED_IV, MAX_PER_STAT_IVS); + SetBoxMonData(boxMon, MON_DATA_SPEED_IV, &iv); break; case STAT_SPATK: - SetBoxMonData(boxMon, MON_DATA_SPATK_IV, MAX_PER_STAT_IVS); + SetBoxMonData(boxMon, MON_DATA_SPATK_IV, &iv); break; case STAT_SPDEF: - SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, MAX_PER_STAT_IVS); + SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv); break; } } From b3294c60a2b1a28a469d552b55e8a7576d49493a Mon Sep 17 00:00:00 2001 From: Greenphx9 Date: Fri, 22 Apr 2022 16:31:17 +1000 Subject: [PATCH 416/417] Calyrex Rider Icons --- graphics/pokemon/calyrex/ice_rider/icon.png | Bin 0 -> 600 bytes graphics/pokemon/calyrex/shadow_rider/icon.png | Bin 0 -> 534 bytes include/graphics.h | 4 ++-- src/data/graphics/pokemon.h | 4 ++-- src/pokemon_icon.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 graphics/pokemon/calyrex/ice_rider/icon.png create mode 100644 graphics/pokemon/calyrex/shadow_rider/icon.png diff --git a/graphics/pokemon/calyrex/ice_rider/icon.png b/graphics/pokemon/calyrex/ice_rider/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..33a9879200e64e05c580d71d6f2a32b88acd53e2 GIT binary patch literal 600 zcmV-e0;m0nP)e_ zfN;3DxcK<^xS&Ar@F>t=K=6<#hblQE0iFcio24IaIzLoWqq>TnKMEe;sv zvt6?^V3N{I8FF7Hivz07b*^JCq)miRb{O;cCd( zv1kGK8-KRMgpIo#`l=eHX#GL8e&`wUDd5YUv6$N7N-%s&4S8@ z=>n;R85bfih9I!6xnwbTULPQBy$poR4BzZL_xb?j)L!vS^wrb;pVDx(Emii(K)h~u zYs)g2ye90ZEn#Gqu#8!L@1 z!=(iR60m4}CyX#8n9p-(q$lk_C+r3DG3QPyo5zI>4(XRw&W^X~;v9jEPw8w)2uYM` zB9h{8g)zq(pt%ECM_OS}lYrW}89oa$YVQrkbo;#(=54h2Tlw(b6Bl9X7(^`4e;20m mMNgRepF+KYD__t*`SKfkwHo@eW-SQ-0000e_ zfN;3DxcK<^xS&Ar@F>t=K=6<#hrlCf@sFc60Q1}D_1L$S)#4y6)IS?KGT z1%@nUsCl7QQ93t?OqL+EV9J7}7S~M(Hf&Xg{tNOi-{HIeL+B(B3QhF6dJ@)A!RuqW z17o#nvyFDGF(A6yM(%?t0gt=Bdv7=Ki>fdcLZFXDP@4jbVHx^X%Q!{7&n+X%)$`kW zHJ;lA$-gdNcH^r;N=WW|-Y^Y>3qs;JtBN}{7`G%QW$wG{&8csDlN@Nq_xydRX(JxR zjJX_pVwfzvmWPr%xTuegj2ukMvUYHPy3*~rtP_@3H5z{7D)wWje4L&2eNzd&!SmDd zTsP2Pm5%$6z1~Jo&A_rx5hPYL0NSvlQpk=;Ur5n3Nf3}CG_%m3^&h}!O@RS41*U1l z6qt?*uz^7`Q}Ad3qe2=hH3vo-V2(u5%mC8{l+Yw=MqnTyRU9*C1O~$D;*e=xMqt`~ zfLX%u85me{M<$HnGcb@um~|Sd5tycyl{O48pfoV<9GK>}!03L{^gA)*K^?uRW?373 Y15@Q5i%TP^?*IS*07*qoM6N<$f+qp%#{d8T literal 0 HcmV?d00001 diff --git a/include/graphics.h b/include/graphics.h index e0eee136f5..04162f9c50 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -5826,8 +5826,8 @@ extern const u8 gMonIcon_ZacianCrownedSword[]; extern const u8 gMonIcon_ZamazentaCrownedShield[]; extern const u8 gMonIcon_EternatusEternamax[]; extern const u8 gMonIcon_ZarudeDada[]; -//extern const u8 gMonIcon_CalyrexIceRider[]; -//extern const u8 gMonIcon_CalyrexShadowRider[]; +extern const u8 gMonIcon_CalyrexIceRider[]; +extern const u8 gMonIcon_CalyrexShadowRider[]; extern const u8 gMonIcon_Egg[]; extern const u8 gMonFootprint_QuestionMark[]; diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index 4db994c0dd..05332ea459 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -5788,8 +5788,8 @@ const u8 gMonIcon_ZacianCrownedSword[] = INCBIN_U8("graphics/pokemon/zacian/crow const u8 gMonIcon_ZamazentaCrownedShield[] = INCBIN_U8("graphics/pokemon/zamazenta/crowned_shield/icon.4bpp"); const u8 gMonIcon_EternatusEternamax[] = INCBIN_U8("graphics/pokemon/eternatus/eternamax/icon.4bpp"); const u8 gMonIcon_ZarudeDada[] = INCBIN_U8("graphics/pokemon/zarude/dada/icon.4bpp"); -//const u8 gMonIcon_CalyrexIceRider[] = INCBIN_U8("graphics/pokemon/calyrex/ice_rider/icon.4bpp"); -//const u8 gMonIcon_CalyrexShadowRider[] = INCBIN_U8("graphics/pokemon/calyrex/shadow_rider/icon.4bpp"); +const u8 gMonIcon_CalyrexIceRider[] = INCBIN_U8("graphics/pokemon/calyrex/ice_rider/icon.4bpp"); +const u8 gMonIcon_CalyrexShadowRider[] = INCBIN_U8("graphics/pokemon/calyrex/shadow_rider/icon.4bpp"); const u8 gMonIcon_Egg[] = INCBIN_U8("graphics/pokemon/egg/icon.4bpp"); const u8 gMonFootprint_QuestionMark[] = INCBIN_U8("graphics/pokemon/question_mark/footprint.1bpp"); diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 666330975e..0faebfe74b 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1235,8 +1235,8 @@ const u8 *const gMonIconTable[] = [SPECIES_ETERNATUS_ETERNAMAX] = gMonIcon_EternatusEternamax, [SPECIES_URSHIFU_RAPID_STRIKE_STYLE] = gMonIcon_Urshifu, [SPECIES_ZARUDE_DADA] = gMonIcon_ZarudeDada, - [SPECIES_CALYREX_ICE_RIDER] = gMonIcon_QuestionMark,//gMonIcon_CalyrexIceRider, - [SPECIES_CALYREX_SHADOW_RIDER] = gMonIcon_QuestionMark,//gMonIcon_CalyrexShadowRider, + [SPECIES_CALYREX_ICE_RIDER] = gMonIcon_CalyrexIceRider, + [SPECIES_CALYREX_SHADOW_RIDER] = gMonIcon_CalyrexShadowRider, [SPECIES_EGG] = gMonIcon_Egg, }; From 12082e033ddf0a141676fd581318aee283c51da9 Mon Sep 17 00:00:00 2001 From: sneed Date: Mon, 2 May 2022 04:02:58 +0300 Subject: [PATCH 417/417] Fix potential dex pic bug --- src/pokedex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pokedex.c b/src/pokedex.c index 176934935b..e3d2f988ba 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -3989,7 +3989,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId) gTasks[taskId].tState++; break; case 4: - spriteId = CreateMonPicSprite(dexNum, 0, ((u16)gTasks[taskId].tPersonalityHi << 16) | (u16)gTasks[taskId].tPersonalityLo, TRUE, MON_PAGE_X, MON_PAGE_Y, 0, TAG_NONE); + spriteId = CreateMonPicSprite(NationalPokedexNumToSpecies(dexNum), 0, ((u16)gTasks[taskId].tPersonalityHi << 16) | (u16)gTasks[taskId].tPersonalityLo, TRUE, MON_PAGE_X, MON_PAGE_Y, 0, TAG_NONE); gSprites[spriteId].oam.priority = 0; BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); SetVBlankCallback(gPokedexVBlankCB);